#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <X11/Xlib.h>
#include <X11/Xutil.h>
#include <cairo.h>
#include <cairo-xlib.h>
#include "mb_redraw_man.h"
#include "mb_timer.h"
#include "mb_X_supp.h"
Go to the source code of this file.
Classes | |
struct | _X_kb_info |
struct | _X_MB_runtime |
Defines | |
#define | ERR -1 |
#define | OK 0 |
#define | ERR -1 |
#define | OK 0 |
Functions | |
static int | keycode2sym (X_kb_info_t *kbinfo, unsigned int keycode) |
static int | X_kb_init (X_kb_info_t *kbinfo, Display *display, redraw_man_t *rdman) |
static void | X_kb_destroy (X_kb_info_t *kbinfo) |
static void | X_kb_handle_event (X_kb_info_t *kbinfo, XKeyEvent *xkey) |
Accept X keyboard events from handle_x_event() and dispatch it. | |
static unsigned int | get_button_state (unsigned int state) |
static unsigned int | get_button (unsigned int button) |
static void | notify_shapes (redraw_man_t *rdman, shape_t *shape, co_aix x, co_aix y, int etype, unsigned int state, unsigned int button) |
Notify observers of the shape at specified position for mouse event. | |
static void | handle_x_event (X_MB_runtime_t *rt) |
Dispatch all X events in the queue. | |
void | X_MB_handle_connection (X_MB_runtime_t *rt) |
Handle connection coming data and timeout of timers. | |
static int | X_init_connection (const char *display_name, int w, int h, Display **displayp, Visual **visualp, Window *winp) |
static int | X_MB_init (const char *display_name, int w, int h, X_MB_runtime_t *xmb_rt) |
Initialize a MadButterfy runtime for Xlib. | |
static void | X_MB_destroy (X_MB_runtime_t *xmb_rt) |
X_MB_runtime_t * | X_MB_new (const char *display_name, int w, int h) |
void | X_MB_free (X_MB_runtime_t *rt) |
subject_t * | X_MB_kbevents (X_MB_runtime_t *xmb_rt) |
redraw_man_t * | X_MB_rdman (X_MB_runtime_t *xmb_rt) |
mb_tman_t * | X_MB_tman (X_MB_runtime_t *xmb_rt) |
ob_factory_t * | X_MB_ob_factory (X_MB_runtime_t *xmb_rt) |
static unsigned int get_button | ( | unsigned int | button | ) | [static] |
static unsigned int get_button_state | ( | unsigned int | state | ) | [static] |
static void handle_x_event | ( | X_MB_runtime_t * | rt | ) | [static] |
static void notify_shapes | ( | redraw_man_t * | rdman, | |
shape_t * | shape, | |||
co_aix | x, | |||
co_aix | y, | |||
int | etype, | |||
unsigned int | state, | |||
unsigned int | button | |||
) | [static] |
Notify observers of the shape at specified position for mouse event.
Observers of parent shapes may be called if the subject is not with SUBF_STOP_PROPAGATE flag. The subject of mouse event for a shape is returned by sh_get_mouse_event_subject().
static int X_init_connection | ( | const char * | display_name, | |
int | w, | |||
int | h, | |||
Display ** | displayp, | |||
Visual ** | visualp, | |||
Window * | winp | |||
) | [static] |
static void X_MB_destroy | ( | X_MB_runtime_t * | xmb_rt | ) | [static] |
void X_MB_free | ( | X_MB_runtime_t * | rt | ) |
void X_MB_handle_connection | ( | X_MB_runtime_t * | rt | ) |
Handle connection coming data and timeout of timers.
display | is a Display returned by XOpenDisplay(). | |
rdman | is a redraw manager. | |
tman | is a timer manager. |
static int X_MB_init | ( | const char * | display_name, | |
int | w, | |||
int | h, | |||
X_MB_runtime_t * | xmb_rt | |||
) | [static] |
subject_t* X_MB_kbevents | ( | X_MB_runtime_t * | xmb_rt | ) |
X_MB_runtime_t* X_MB_new | ( | const char * | display_name, | |
int | w, | |||
int | h | |||
) |
ob_factory_t* X_MB_ob_factory | ( | X_MB_runtime_t * | xmb_rt | ) |
redraw_man_t* X_MB_rdman | ( | X_MB_runtime_t * | xmb_rt | ) |
mb_tman_t* X_MB_tman | ( | X_MB_runtime_t * | xmb_rt | ) |