summaryrefslogtreecommitdiff
path: root/src/devices.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/devices.h')
-rw-r--r--src/devices.h52
1 files changed, 38 insertions, 14 deletions
diff --git a/src/devices.h b/src/devices.h
index 9dce947b..46acbc3b 100644
--- a/src/devices.h
+++ b/src/devices.h
@@ -31,6 +31,10 @@
#include "common.h"
#include "boxes.h"
+#ifdef HAVE_XSYNC
+#include <X11/extensions/sync.h>
+#endif
+
/* By default, the MetaDevInfo lists have size 4. Almost no client has more
* than 4 mice or keyboards... */
#define DEFAULT_INPUT_ARRAY_SIZE 4
@@ -41,11 +45,11 @@ typedef struct _MetaDevices MetaDevices;
typedef struct _MetaGrabOpInfo MetaGrabOpInfo;
+typedef struct _MetaDevList MetaDevList;
+
/* TODO: create MetaPtrInfo and MetaKbdInfo, so that you can differentiate it
* and force correct type using in function prototypes */
-#if 0
---> To be used soon!! (next commit)
struct _MetaGrabOpInfo
{
/* current window operation */
@@ -69,7 +73,7 @@ struct _MetaGrabOpInfo
MetaRectangle wireframe_rect;
MetaRectangle wireframe_last_xor_rect;
MetaRectangle initial_window_pos;
- int initial_x, grab_initial_y; /* These are only relevant for */
+ int initial_x, initial_y; /* These are only relevant for */
gboolean threshold_movement_reached; /* raise_on_click == FALSE. */
MetaResizePopup *resize_popup;
GTimeVal last_moveresize_time;
@@ -79,8 +83,12 @@ struct _MetaGrabOpInfo
GList* old_window_stacking;
MetaEdgeResistanceData *edge_resistance_data;
unsigned int last_user_action_was_snap;
-};
+ int resize_timeout_id;
+#ifdef HAVE_XSYNC
+ /* alarm monitoring client's _NET_WM_SYNC_REQUEST_COUNTER */
+ XSyncAlarm sync_request_alarm;
#endif
+};
struct _MetaDevInfo
{
@@ -102,20 +110,36 @@ struct _MetaDevices
/* TODO: consider creating a structure to store the pairs!! */
};
-MetaDevInfo* meta_devices_find_mouse_by_name (MetaDisplay *display,
- gchar *name);
+struct _MetaDevList
+{
+ MetaDevInfo **devices;
+ int used;
+ int size;
+};
+
+MetaDevInfo* meta_devices_find_mouse_by_name (MetaDisplay *display,
+ gchar *name);
+
+MetaDevInfo* meta_devices_find_mouse_by_id (MetaDisplay *display,
+ XID id);
-MetaDevInfo* meta_devices_find_mouse_by_id (MetaDisplay *display,
- XID id);
+MetaDevInfo* meta_devices_find_keyboard_by_id (MetaDisplay *display,
+ XID id);
-MetaDevInfo* meta_devices_find_keyboard_by_id (MetaDisplay *display,
- XID id);
+MetaDevInfo* meta_devices_find_paired_mouse (MetaDisplay *display,
+ XID id);
-MetaDevInfo* meta_devices_find_paired_mouse (MetaDisplay *display,
- XID id);
+MetaDevInfo* meta_devices_find_paired_keyboard (MetaDisplay *display,
+ XID id);
+void meta_devices_list_create (MetaDevList *list);
+void meta_devices_list_destroy (MetaDevList *list);
+gboolean meta_devices_list_add (MetaDevList *list,
+ MetaDevInfo *dev);
+gboolean meta_devices_list_remove (MetaDevList *list,
+ MetaDevInfo *dev);
+gboolean meta_devices_list_is_member (MetaDevList *list,
+ MetaDevInfo *dev);
-MetaDevInfo* meta_devices_find_paired_keyboard (MetaDisplay *display,
- XID id);
#else
#error "This branch will ONLY compile if you enable --enable-mpx!"