src/mainx.c File Reference

#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/types.h>
#include <unistd.h>
#include <stdbool.h>
#include <assert.h>
#include <limits.h>
#include <locale.h>
#include <fcntl.h>
#include <getopt.h>
#include <X11/XKBlib.h>
#include <X11/extensions/XKB.h>
#include <xcb/xcb.h>
#include <xcb/xcb_atom.h>
#include <xcb/xcb_aux.h>
#include <xcb/xcb_event.h>
#include <xcb/xcb_property.h>
#include <xcb/xcb_keysyms.h>
#include <xcb/xcb_icccm.h>
#include <ev.h>
#include "config.h"
#include "data.h"
#include "debug.h"
#include "handlers.h"
#include "click.h"
#include "i3.h"
#include "layout.h"
#include "queue.h"
#include "table.h"
#include "util.h"
#include "xcb.h"
#include "randr.h"
#include "xinerama.h"
#include "manage.h"
#include "ipc.h"
#include "log.h"
#include "sighandler.h"
Include dependency graph for mainx.c:

Go to the source code of this file.

Defines

#define REQUEST_ATOM(name)   atom_cookies[name] = xcb_intern_atom(conn, 0, strlen(#name), #name);
#define GET_ATOM(name)

Functions

static void xcb_got_event (EV_P_ struct ev_io *w, int revents)
static void xcb_prepare_cb (EV_P_ ev_prepare *w, int revents)
static void xcb_check_cb (EV_P_ ev_check *w, int revents)
static void xkb_got_event (EV_P_ struct ev_io *w, int revents)
int main (int argc, char *argv[], char *env[])

Variables

static int xkb_event_base
int xkb_current_group
xcb_connection_t * global_conn
char ** start_argv
Display * xkbdpy
xcb_key_symbols_t * keysyms
struct bindings_head * bindings
struct autostarts_head autostarts = TAILQ_HEAD_INITIALIZER(autostarts)
struct assignments_head assignments = TAILQ_HEAD_INITIALIZER(assignments)
struct stack_wins_head stack_wins = SLIST_HEAD_INITIALIZER(stack_wins)
xcb_event_handlers_t evenths
xcb_atom_t atoms [NUM_ATOMS]
xcb_window_t root
int num_screens = 0
uint8_t root_depth
bool xkb_supported = true

Define Documentation

#define GET_ATOM ( name   ) 
Value:
{ \
                xcb_intern_atom_reply_t *reply = xcb_intern_atom_reply(conn, atom_cookies[name], NULL); \
                if (!reply) { \
                        ELOG("Could not get atom " #name "\n"); \
                        exit(-1); \
                } \
                atoms[name] = reply->atom; \
                free(reply); \
        }

Referenced by main().

#define REQUEST_ATOM ( name   )     atom_cookies[name] = xcb_intern_atom(conn, 0, strlen(#name), #name);

Referenced by main().


Function Documentation

int main ( int  argc,
char *  argv[],
char *  env[] 
)

Definition at line 193 of file mainx.c.

References _NET_ACTIVE_WINDOW, _NET_CURRENT_DESKTOP, _NET_SUPPORTED, _NET_SUPPORTING_WM_CHECK, _NET_WM_DESKTOP, _NET_WM_NAME, _NET_WM_STATE, _NET_WM_STATE_FULLSCREEN, _NET_WM_STRUT_PARTIAL, _NET_WM_WINDOW_TYPE, _NET_WM_WINDOW_TYPE_DIALOG, _NET_WM_WINDOW_TYPE_DOCK, _NET_WM_WINDOW_TYPE_SPLASH, _NET_WM_WINDOW_TYPE_TOOLBAR, _NET_WM_WINDOW_TYPE_UTILITY, _NET_WORKAREA, add_loglevel(), atoms, autostarts, c_ws, check_error(), Autostart::command, config, xoutput::current_workspace, die, DLOG, ELOG, evenths, expand_table_cols(), expand_table_rows(), GET_ATOM, get_first_output(), get_output_containing(), global_conn, grab_all_keys(), handle_button_press(), handle_client_message(), handle_clientleader_change(), handle_configure_event(), handle_configure_request(), handle_destroy_notify_event(), handle_enter_notify(), handle_event(), handle_expose_event(), handle_hints(), handle_key_press(), handle_map_request(), handle_mapping_notify(), handle_motion_notify(), handle_normal_hints(), handle_screen_change(), handle_transient_for(), handle_unmap_notify_event(), handle_window_type(), handle_windowclass_change(), handle_windowname_change(), handle_windowname_change_legacy(), init_table(), initialize_randr(), initialize_xinerama(), ipc_create_socket(), ipc_new_client(), Config::ipc_socket_path, keysyms, load_configuration(), LOG, manage_existing_windows(), NUM_ATOMS, REQUEST_ATOM, root, root_depth, scalloc(), set_verbosity(), setup_signal_handler(), sstrdup(), start_application(), start_argv, TAILQ_FIRST, TAILQ_FOREACH, translate_keysyms(), UTF8_STRING, WM_CLIENT_LEADER, WM_DELETE_WINDOW, WM_PROTOCOLS, WM_STATE, workspaces, xcb_check_cb(), xcb_get_numlock_mask(), xcb_got_event(), xcb_prepare_cb(), xkb_event_base, xkb_got_event(), xkb_supported, and xkbdpy.

Here is the call graph for this function:

static void xcb_check_cb ( EV_P_ ev_check *  w,
int  revents 
) [static]

Definition at line 116 of file mainx.c.

References evenths.

Referenced by main().

static void xcb_got_event ( EV_P_ struct ev_io *  w,
int  revents 
) [static]

Definition at line 99 of file mainx.c.

Referenced by main().

static void xcb_prepare_cb ( EV_P_ ev_prepare *  w,
int  revents 
) [static]

Definition at line 107 of file mainx.c.

References evenths.

Referenced by main().

static void xkb_got_event ( EV_P_ struct ev_io *  w,
int  revents 
) [static]

Definition at line 130 of file mainx.c.

References DLOG, ELOG, global_conn, grab_all_keys(), keysyms, translate_keysyms(), ungrab_all_keys(), xcb_get_numlock_mask(), xkb_current_group, xkb_event_base, and xkbdpy.

Referenced by main().

Here is the call graph for this function:


Variable Documentation

struct assignments_head assignments = TAILQ_HEAD_INITIALIZER(assignments)

Definition at line 75 of file mainx.c.

Referenced by load_configuration(), reparent_window(), and yyparse().

xcb_atom_t atoms[NUM_ATOMS]
struct autostarts_head autostarts = TAILQ_HEAD_INITIALIZER(autostarts)

Definition at line 72 of file mainx.c.

Referenced by main(), and yyparse().

struct bindings_head* bindings
xcb_event_handlers_t evenths

Definition at line 82 of file mainx.c.

Referenced by drag_pointer(), main(), xcb_check_cb(), and xcb_prepare_cb().

xcb_connection_t* global_conn
xcb_key_symbols_t* keysyms
int num_screens = 0

Definition at line 86 of file mainx.c.

Referenced by query_screens().

xcb_window_t root
uint8_t root_depth

Definition at line 89 of file mainx.c.

Referenced by cached_pixmap_prepare(), handle_signal(), and main().

struct stack_wins_head stack_wins = SLIST_HEAD_INITIALIZER(stack_wins)
char** start_argv

Definition at line 61 of file mainx.c.

Referenced by i3_restart(), and main().

Definition at line 56 of file mainx.c.

Referenced by handle_key_press(), and xkb_got_event().

int xkb_event_base [static]

Definition at line 54 of file mainx.c.

Referenced by main(), and xkb_got_event().

bool xkb_supported = true

Definition at line 92 of file mainx.c.

Referenced by main().

Display* xkbdpy

Definition at line 64 of file mainx.c.

Referenced by main(), and xkb_got_event().


Generated on 16 Apr 2010 for i3 by  doxygen 1.6.1