diff options
Diffstat (limited to 'matchbox/mb-wm-manager.h')
-rw-r--r-- | matchbox/mb-wm-manager.h | 73 |
1 files changed, 60 insertions, 13 deletions
diff --git a/matchbox/mb-wm-manager.h b/matchbox/mb-wm-manager.h index 72a27a2..4f143ab 100644 --- a/matchbox/mb-wm-manager.h +++ b/matchbox/mb-wm-manager.h @@ -22,24 +22,17 @@ #define _HAVE_MB_WM_MANAGER_H #include <matchbox/mb-wm-config.h> +#include <matchbox/mb-wm-types.h> #include <matchbox/mb-wm-object.h> #include <matchbox/mb-wm-keys.h> #include <matchbox/mb-wm-root-window.h> #include <matchbox/mb-wm-theme.h> #include <matchbox/mb-wm-layout.h> -#include <matchbox/mb-wm-main-context.h> #if ENABLE_COMPOSITE #include <matchbox/mb-wm-comp-mgr.h> #endif #include <matchbox/xas.h> -/* XXX: we have a circular dependency between mb-wm-main-context.h - * and mb-window-manager.h */ -#ifndef MB_WM_MAIN_CONTEXT_TYPEDEF_DEFINED -typedef struct MBWMMainContext MBWMMainContext; -#define MB_WM_MAIN_CONTEXT_TYPEDEF_DEFINED -#endif - #define MB_WM_MANAGER(c) ((MBWMManager*)(c)) #define MB_WM_MANAGER_CLASS(c) ((MBWMManagerClass*)(c)) #define MB_WM_TYPE_MANAGER (mb_wm_manager_class_type ()) @@ -66,6 +59,28 @@ typedef enum _MBWMManagerCursorLast } MBWMManagerCursor; +typedef Bool (*MBWMManagerEventFunc) (XEvent * xev, void * userdata); + +typedef struct MBWMEventFuncs +{ + /* FIXME: figure our X wrap / unwrap mechanism */ + GList *map_notify; + GList *unmap_notify; + GList *map_request; + GList *destroy_notify; + GList *configure_request; + GList *configure_notify; + GList *key_press; + GList *property_notify; + GList *button_press; + GList *button_release; + GList *motion_notify; + GList *client_message; + +#if ENABLE_COMPOSITE + GList *damage_notify; +#endif +} MBWMEventFuncs; struct MBWMManager { @@ -75,6 +90,13 @@ struct MBWMManager unsigned int xdpy_width, xdpy_height; int xscreen; + GList *xlib_event_filters; + GQueue *event_queue; + gboolean event_retrieval_disabled; + GSource *event_source; + unsigned int do_update_idle; + MBWMEventFuncs event_funcs; + MBWindowManagerClient *stack_top, *stack_bottom; GList *clients; MBWindowManagerClient *desktop; @@ -99,7 +121,6 @@ struct MBWMManager MBWMTheme *theme; MBWMLayout *layout; - MBWMMainContext *main_ctx; MBWMManagerFlag flags; #if ENABLE_COMPOSITE MBWMCompMgr *comp_mgr; @@ -136,8 +157,6 @@ struct MBWMManagerClass MBWMTheme * (*theme_new) (MBWMManager *wm, const char * path); void (*get_desktop_geometry) (MBWMManager *wm, MBGeometry *geom); - - void (*main) (MBWMManager *wm); }; /** @@ -157,10 +176,26 @@ MBWMManager * mb_wm_manager_new_with_dpy (int argc, char **argv, Display * dpy); void -mb_wm_manager_run (MBWMManager * wm); +mb_wm_manager_disable_x11_event_retrieval (MBWMManager *wm); void -mb_wm_manager_run_with_compositor (MBWMManager * wm, MBWMCompMgr *compositor); +mb_wm_manager_xlib_add_filter (MBWMManager *wm, + MBWMXlibFilterFunc filter, + void *data); + +void +mv_wm_manager_xlib_remove_filter (MBWMManager *wm, + MBWMXlibFilterFunc func, + void *data); + +gboolean +mb_wm_manager_handle_xlib_event (MBWMManager *wm, XEvent *xev); + +void +mb_wm_manager_start (MBWMManager * wm); + +void +mb_wm_manager_start_with_compositor (MBWMManager * wm, MBWMCompMgr *compositor); void mb_wm_manager_set_layout (MBWMManager *wm, MBWMLayout *layout); @@ -242,6 +277,18 @@ mb_wm_manager_compositing_enabled (MBWMManager * wm); MBWMModality mb_wm_manager_get_modality_type (MBWMManager * wm); +unsigned long +mb_wm_manager_add_event_handler (MBWMManager *wm, + Window xwin, + int type, + MBWMXEventFunc func, + void *userdata); + +void +mb_wm_manager_remove_event_handler (MBWMManager *wm, + int type, + unsigned long id); + void mb_wm_manager_sync (MBWMManager *wm); |