ECORE_X_SHAPE_INPUT
} Ecore_X_Shape_Type;
+typedef enum _Ecore_X_Mapping_Type
+{
+ ECORE_X_MAPPING_MODIFIER,
+ ECORE_X_MAPPING_KEYBOARD,
+ ECORE_X_MAPPING_MOUSE
+} Ecore_X_Mapping_Type;
+
+typedef enum _Ecore_X_Randr_Property_Change
+{
+ ECORE_X_RANDR_PROPERTY_CHANGE_ADD,
+ ECORE_X_RANDR_PROPERTY_CHANGE_DEL
+} Ecore_X_Randr_Property_Change;
+
typedef struct _Ecore_X_Event_Mouse_In Ecore_X_Event_Mouse_In;
typedef struct _Ecore_X_Event_Mouse_Out Ecore_X_Event_Mouse_Out;
typedef struct _Ecore_X_Event_Window_Focus_In Ecore_X_Event_Window_Focus_In;
typedef struct _Ecore_X_Event_Window_Stack_Request Ecore_X_Event_Window_Stack_Request;
typedef struct _Ecore_X_Event_Window_Property Ecore_X_Event_Window_Property;
typedef struct _Ecore_X_Event_Window_Colormap Ecore_X_Event_Window_Colormap;
+typedef struct _Ecore_X_Event_Mapping_Change Ecore_X_Event_Mapping_Change;
typedef struct _Ecore_X_Event_Window_Mapping Ecore_X_Event_Window_Mapping;
typedef struct _Ecore_X_Event_Selection_Clear Ecore_X_Event_Selection_Clear;
typedef struct _Ecore_X_Event_Selection_Request Ecore_X_Event_Selection_Request;
typedef struct _Ecore_X_Event_Randr_Output_Change Ecore_X_Event_Randr_Output_Change;
typedef struct _Ecore_X_Event_Randr_Output_Property_Notify Ecore_X_Event_Randr_Output_Property_Notify;
-typedef struct _Ecore_X_Event_Window_Delete_Request
-Ecore_X_Event_Window_Delete_Request;
-typedef struct _Ecore_X_Event_Window_Prop_Title_Change
-Ecore_X_Event_Window_Prop_Title_Change;
-typedef struct _Ecore_X_Event_Window_Prop_Visible_Title_Change
-Ecore_X_Event_Window_Prop_Visible_Title_Change;
-typedef struct _Ecore_X_Event_Window_Prop_Icon_Name_Change
-Ecore_X_Event_Window_Prop_Icon_Name_Change;
-typedef struct _Ecore_X_Event_Window_Prop_Visible_Icon_Name_Change
-Ecore_X_Event_Window_Prop_Visible_Icon_Name_Change;
-typedef struct _Ecore_X_Event_Window_Prop_Client_Machine_Change
-Ecore_X_Event_Window_Prop_Client_Machine_Change;
-typedef struct _Ecore_X_Event_Window_Prop_Name_Class_Change
-Ecore_X_Event_Window_Prop_Name_Class_Change;
-typedef struct _Ecore_X_Event_Window_Prop_Pid_Change
-Ecore_X_Event_Window_Prop_Pid_Change;
-typedef struct _Ecore_X_Event_Window_Prop_Desktop_Change
-Ecore_X_Event_Window_Prop_Desktop_Change;
-
-typedef struct _Ecore_X_Event_Window_Move_Resize_Request
-Ecore_X_Event_Window_Move_Resize_Request;
-typedef struct _Ecore_X_Event_Window_State_Request
-Ecore_X_Event_Window_State_Request;
-typedef struct _Ecore_X_Event_Frame_Extents_Request
-Ecore_X_Event_Frame_Extents_Request;
-typedef struct _Ecore_X_Event_Ping Ecore_X_Event_Ping;
-typedef struct _Ecore_X_Event_Desktop_Change Ecore_X_Event_Desktop_Change;
+typedef struct _Ecore_X_Event_Window_Delete_Request Ecore_X_Event_Window_Delete_Request;
+typedef struct _Ecore_X_Event_Window_Move_Resize_Request Ecore_X_Event_Window_Move_Resize_Request;
+typedef struct _Ecore_X_Event_Window_State_Request Ecore_X_Event_Window_State_Request;
+typedef struct _Ecore_X_Event_Frame_Extents_Request Ecore_X_Event_Frame_Extents_Request;
+typedef struct _Ecore_X_Event_Ping Ecore_X_Event_Ping;
+typedef struct _Ecore_X_Event_Desktop_Change Ecore_X_Event_Desktop_Change;
typedef struct _Ecore_X_Event_Startup_Sequence Ecore_X_Event_Startup_Sequence;
typedef struct _Ecore_X_Randr_Screen_Size Ecore_X_Randr_Screen_Size;
typedef struct _Ecore_X_Randr_Screen_Size_MM Ecore_X_Randr_Screen_Size_MM;
-typedef struct _Ecore_X_Xdnd_Position Ecore_X_Xdnd_Position;
+typedef struct _Ecore_X_Xdnd_Position Ecore_X_Xdnd_Position;
struct _Ecore_X_Event_Mouse_In
{
int modifiers;
int x, y;
- int same_screen;
- struct
- {
- int x, y;
+ Eina_Bool same_screen : 1;
+ struct {
+ int x, y;
} root;
Ecore_X_Window win;
Ecore_X_Window event_win;
int modifiers;
int x, y;
int same_screen;
- struct
- {
- int x, y;
+ struct {
+ int x, y;
} root;
Ecore_X_Window win;
Ecore_X_Window event_win;
Ecore_X_Window abovewin;
int x, y, w, h;
int border;
- unsigned int override : 1;
- unsigned int from_wm : 1;
+ Eina_Bool override : 1;
+ Eina_Bool from_wm : 1;
Ecore_X_Time time;
};
{
Ecore_X_Window win;
Ecore_X_Colormap cmap;
- int installed;
+ Eina_Bool installed : 1;
Ecore_X_Time time;
};
+struct _Ecore_X_Event_Mapping_Change
+{
+ Ecore_X_Mapping_Type type;
+ int keycode;
+ int num;
+};
+
struct _Ecore_X_Event_Selection_Clear
{
Ecore_X_Window win;
unsigned char *data;
int length;
int format;
-
int (*free)(void *data);
};
struct _Ecore_X_Event_Xdnd_Position
{
Ecore_X_Window win, source;
- struct
- {
- int x, y;
+ struct {
+ int x, y;
} position;
Ecore_X_Atom action;
};
struct _Ecore_X_Xdnd_Position
{
Ecore_X_Window win, prev;
- struct
- {
- int x, y;
+ struct {
+ int x, y;
} position;
};
struct _Ecore_X_Event_Xdnd_Status
{
Ecore_X_Window win, target;
- int will_accept;
+ Eina_Bool will_accept : 1;
Ecore_X_Rectangle rectangle;
Ecore_X_Atom action;
};
{
Ecore_X_Window win, source;
Ecore_X_Atom action;
- struct
- {
- int x, y;
+ struct {
+ int x, y;
} position;
};
struct _Ecore_X_Event_Xdnd_Finished
{
Ecore_X_Window win, target;
- int completed;
+ Eina_Bool completed : 1;
Ecore_X_Atom action;
};
Ecore_X_Atom message_type;
int format;
union {
- char b[20];
- short s[10];
- long l[5];
- } data;
+ char b[20];
+ short s[10];
+ long l[5];
+ } data;
Ecore_X_Time time;
};
struct _Ecore_X_Event_Window_Shape
{
- Ecore_X_Window win;
- Ecore_X_Time time;
+ Ecore_X_Window win;
+ Ecore_X_Time time;
Ecore_X_Shape_Type type;
- int x, y, w, h;
- Eina_Bool shaped : 1;
+ int x, y, w, h;
+ Eina_Bool shaped : 1;
};
struct _Ecore_X_Event_Screensaver_Notify
{
Ecore_X_Window win;
- int on;
+ Eina_Bool on : 1;
Ecore_X_Time time;
};
struct _Ecore_X_Event_Randr_Output_Property_Notify
{
- Ecore_X_Window win;
- Ecore_X_Randr_Output output;
- Ecore_X_Atom property;
- Ecore_X_Time time;
- int state; /* NewValue, Deleted */
+ Ecore_X_Window win;
+ Ecore_X_Randr_Output output;
+ Ecore_X_Atom property;
+ Ecore_X_Time time;
+ Ecore_X_Randr_Property_Change state;
};
struct _Ecore_X_Event_Window_Delete_Request
Ecore_X_Window win;
Ecore_X_Time time;
};
-
-struct _Ecore_X_Event_Window_Prop_Title_Change
-{
- Ecore_X_Window win;
- char *title;
- Ecore_X_Time time;
-};
-
-struct _Ecore_X_Event_Window_Prop_Visible_Title_Change
-{
- Ecore_X_Window win;
- char *title;
- Ecore_X_Time time;
-};
-
-struct _Ecore_X_Event_Window_Prop_Icon_Name_Change
-{
- Ecore_X_Window win;
- char *name;
- Ecore_X_Time time;
-};
-
-struct _Ecore_X_Event_Window_Prop_Visible_Icon_Name_Change
-{
- Ecore_X_Window win;
- char *name;
- Ecore_X_Time time;
-};
-
-struct _Ecore_X_Event_Window_Prop_Client_Machine_Change
-{
- Ecore_X_Window win;
- char *name;
- Ecore_X_Time time;
-};
-
-struct _Ecore_X_Event_Window_Prop_Name_Class_Change
-{
- Ecore_X_Window win;
- char *name;
- char *clas;
- Ecore_X_Time time;
-};
-
-struct _Ecore_X_Event_Window_Prop_Pid_Change
-{
- Ecore_X_Window win;
- pid_t pid;
- Ecore_X_Time time;
-};
-
-struct _Ecore_X_Event_Window_Prop_Desktop_Change
-{
- Ecore_X_Window win;
- long desktop;
- Ecore_X_Time time;
-};
-
+
struct _Ecore_X_Event_Startup_Sequence
{
Ecore_X_Window win;
EAPI extern int ECORE_X_EVENT_WINDOW_PROPERTY;
EAPI extern int ECORE_X_EVENT_WINDOW_COLORMAP;
EAPI extern int ECORE_X_EVENT_WINDOW_MAPPING;
+EAPI extern int ECORE_X_EVENT_MAPPING_CHANGE;
EAPI extern int ECORE_X_EVENT_SELECTION_CLEAR;
EAPI extern int ECORE_X_EVENT_SELECTION_REQUEST;
EAPI extern int ECORE_X_EVENT_SELECTION_NOTIFY;
EAPI extern int ECORE_X_EVENT_DAMAGE_NOTIFY;
EAPI extern int ECORE_X_EVENT_WINDOW_DELETE_REQUEST;
-/*
- EAPI extern int ECORE_X_EVENT_WINDOW_PROP_TITLE_CHANGE;
- EAPI extern int ECORE_X_EVENT_WINDOW_PROP_VISIBLE_TITLE_CHANGE;
- EAPI extern int ECORE_X_EVENT_WINDOW_PROP_ICON_NAME_CHANGE;
- EAPI extern int ECORE_X_EVENT_WINDOW_PROP_VISIBLE_ICON_NAME_CHANGE;
- EAPI extern int ECORE_X_EVENT_WINDOW_PROP_CLIENT_MACHINE_CHANGE;
- EAPI extern int ECORE_X_EVENT_WINDOW_PROP_NAME_CLASS_CHANGE;
- EAPI extern int ECORE_X_EVENT_WINDOW_PROP_PID_CHANGE;
- EAPI extern int ECORE_X_EVENT_WINDOW_PROP_DESKTOP_CHANGE;
- */
EAPI extern int ECORE_X_EVENT_WINDOW_MOVE_RESIZE_REQUEST;
EAPI extern int ECORE_X_EVENT_WINDOW_STATE_REQUEST;
EAPI int ECORE_X_EVENT_WINDOW_PROPERTY = 0;
EAPI int ECORE_X_EVENT_WINDOW_COLORMAP = 0;
EAPI int ECORE_X_EVENT_WINDOW_MAPPING = 0;
+EAPI int ECORE_X_EVENT_MAPPING_CHANGE = 0;
EAPI int ECORE_X_EVENT_SELECTION_CLEAR = 0;
EAPI int ECORE_X_EVENT_SELECTION_REQUEST = 0;
EAPI int ECORE_X_EVENT_SELECTION_NOTIFY = 0;
EAPI int ECORE_X_EVENT_DAMAGE_NOTIFY = 0;
EAPI int ECORE_X_EVENT_WINDOW_DELETE_REQUEST = 0;
-/*
- EAPI int ECORE_X_EVENT_WINDOW_PROP_TITLE_CHANGE = 0;
- EAPI int ECORE_X_EVENT_WINDOW_PROP_VISIBLE_TITLE_CHANGE = 0;
- EAPI int ECORE_X_EVENT_WINDOW_PROP_NAME_CLASS_CHANGE = 0;
- EAPI int ECORE_X_EVENT_WINDOW_PROP_ICON_NAME_CHANGE = 0;
- EAPI int ECORE_X_EVENT_WINDOW_PROP_VISIBLE_ICON_NAME_CHANGE = 0;
- EAPI int ECORE_X_EVENT_WINDOW_PROP_CLIENT_MACHINE_CHANGE = 0;
- EAPI int ECORE_X_EVENT_WINDOW_PROP_PID_CHANGE = 0;
- EAPI int ECORE_X_EVENT_WINDOW_PROP_DESKTOP_CHANGE = 0;
- */
EAPI int ECORE_X_EVENT_WINDOW_MOVE_RESIZE_REQUEST = 0;
EAPI int ECORE_X_EVENT_WINDOW_STATE_REQUEST = 0;
ECORE_X_EVENT_WINDOW_PROPERTY = ecore_event_type_new();
ECORE_X_EVENT_WINDOW_COLORMAP = ecore_event_type_new();
ECORE_X_EVENT_WINDOW_MAPPING = ecore_event_type_new();
+ ECORE_X_EVENT_MAPPING_CHANGE = ecore_event_type_new();
ECORE_X_EVENT_SELECTION_CLEAR = ecore_event_type_new();
ECORE_X_EVENT_SELECTION_REQUEST = ecore_event_type_new();
ECORE_X_EVENT_SELECTION_NOTIFY = ecore_event_type_new();
ECORE_X_EVENT_DAMAGE_NOTIFY = ecore_event_type_new();
ECORE_X_EVENT_WINDOW_DELETE_REQUEST = ecore_event_type_new();
- /*
- ECORE_X_EVENT_WINDOW_PROP_TITLE_CHANGE = ecore_event_type_new();
- ECORE_X_EVENT_WINDOW_PROP_VISIBLE_TITLE_CHANGE = ecore_event_type_new();
- ECORE_X_EVENT_WINDOW_PROP_NAME_CLASS_CHANGE = ecore_event_type_new();
- ECORE_X_EVENT_WINDOW_PROP_ICON_NAME_CHANGE = ecore_event_type_new();
- ECORE_X_EVENT_WINDOW_PROP_VISIBLE_ICON_NAME_CHANGE = ecore_event_type_new();
- ECORE_X_EVENT_WINDOW_PROP_CLIENT_MACHINE_CHANGE = ecore_event_type_new();
- ECORE_X_EVENT_WINDOW_PROP_PID_CHANGE = ecore_event_type_new();
- ECORE_X_EVENT_WINDOW_PROP_DESKTOP_CHANGE = ecore_event_type_new();
- */
-
ECORE_X_EVENT_DESKTOP_CHANGE = ecore_event_type_new();
ECORE_X_EVENT_WINDOW_MOVE_RESIZE_REQUEST = ecore_event_type_new();
ECORE_X_EVENT_WINDOW_STATE_REQUEST = ecore_event_type_new();
#define CODESET "INVALID"
#endif /* ifndef CODESET */
-#if 0
-static void _ecore_x_event_free_window_prop_name_class_change(void *data, void *ev);
-static void _ecore_x_event_free_window_prop_title_change(void *data, void *ev);
-static void _ecore_x_event_free_window_prop_visible_title_change(void *data, void *ev);
-static void _ecore_x_event_free_window_prop_icon_name_change(void *data, void *ev);
-static void _ecore_x_event_free_window_prop_visible_icon_name_change(void *data, void *ev);
-static void _ecore_x_event_free_window_prop_client_machine_change(void *data, void *ev);
-#endif /* if 0 */
-
static Ecore_X_Window _ecore_xcb_mouse_down_last_window = 0;
static Ecore_X_Window _ecore_xcb_mouse_down_last_last_window = 0;
static Ecore_X_Window _ecore_xcb_mouse_down_last_event_window = 0;
free(reply);
} /* ecore_x_event_mask_unset */
-#if 0
-static void
-_ecore_x_event_free_window_prop_name_class_change(void *data, void *ev)
-{
- Ecore_X_Event_Window_Prop_Name_Class_Change *e;
-
- e = ev;
- if (e->name)
- free(e->name);
-
- if (e->clas)
- free(e->clas);
-
- free(e);
-} /* _ecore_x_event_free_window_prop_name_class_change */
-
-static void
-_ecore_x_event_free_window_prop_title_change(void *data, void *ev)
-{
- Ecore_X_Event_Window_Prop_Title_Change *e;
-
- e = ev;
- if (e->title)
- free(e->title);
-
- free(e);
-} /* _ecore_x_event_free_window_prop_title_change */
-
-static void
-_ecore_x_event_free_window_prop_visible_title_change(void *data, void *ev)
-{
- Ecore_X_Event_Window_Prop_Visible_Title_Change *e;
-
- e = ev;
- if (e->title)
- free(e->title);
-
- free(e);
-} /* _ecore_x_event_free_window_prop_visible_title_change */
-
-static void
-_ecore_x_event_free_window_prop_icon_name_change(void *data, void *ev)
-{
- Ecore_X_Event_Window_Prop_Icon_Name_Change *e;
-
- e = ev;
- if (e->name)
- free(e->name);
-
- free(e);
-} /* _ecore_x_event_free_window_prop_icon_name_change */
-
-static void
-_ecore_x_event_free_window_prop_visible_icon_name_change(void *data, void *ev)
-{
- Ecore_X_Event_Window_Prop_Visible_Icon_Name_Change *e;
-
- e = ev;
- if (e->name)
- free(e->name);
-
- free(e);
-} /* _ecore_x_event_free_window_prop_visible_icon_name_change */
-
-static void
-_ecore_x_event_free_window_prop_client_machine_change(void *data, void *ev)
-{
- Ecore_X_Event_Window_Prop_Client_Machine_Change *e;
-
- e = ev;
- if (e->name)
- free(e->name);
-
- free(e);
-} /* _ecore_x_event_free_window_prop_client_machine_change */
-
-#endif /* if 0 */
-
static void
_ecore_x_event_free_xdnd_enter(void *data __UNUSED__, void *ev)
{
void
_ecore_x_event_handle_property_notify(xcb_generic_event_t *event)
{
-#if 0 /* for now i disabled this. nice idea though this is - it leaves a lot
- * to be desired for efficiency that is better left to the app layer
- */
- if (xevent->xproperty.atom == ECORE_X_ATOM_WM_CLASS)
- {
- Ecore_X_Event_Window_Prop_Name_Class_Change *e;
-
- e = calloc(1, sizeof(Ecore_X_Event_Window_Prop_Name_Class_Change));
- if (!e)
- return;
-
- ecore_x_window_prop_name_class_get(xevent->xproperty.window,
- &(e->name), &(e->clas));
- e->time = xevent->xproperty.time;
- _ecore_x_event_last_time = e->time;
- ecore_event_add(ECORE_X_EVENT_WINDOW_PROP_NAME_CLASS_CHANGE, e, _ecore_x_event_free_window_prop_name_class_change, NULL);
- }
- else if ((xevent->xproperty.atom == ECORE_X_ATOM_WM_NAME) || (xevent->xproperty.atom == ECORE_X_ATOM_NET_WM_NAME))
- {
- Ecore_X_Event_Window_Prop_Title_Change *e;
-
- e = calloc(1, sizeof(Ecore_X_Event_Window_Prop_Title_Change));
- if (!e)
- return;
-
- e->title = ecore_x_window_prop_title_get(xevent->xproperty.window);
- e->time = xevent->xproperty.time;
- _ecore_x_event_last_time = e->time;
- ecore_event_add(ECORE_X_EVENT_WINDOW_PROP_TITLE_CHANGE, e, _ecore_x_event_free_window_prop_title_change, NULL);
- }
- else if (xevent->xproperty.atom == ECORE_X_ATOM_NET_WM_VISIBLE_NAME)
- {
- Ecore_X_Event_Window_Prop_Visible_Title_Change *e;
-
- e = calloc(1, sizeof(Ecore_X_Event_Window_Prop_Visible_Title_Change));
- if (!e)
- return;
-
- e->title = ecore_x_window_prop_visible_title_get(xevent->xproperty.window);
- e->time = xevent->xproperty.time;
- _ecore_x_event_last_time = e->time;
- ecore_event_add(ECORE_X_EVENT_WINDOW_PROP_VISIBLE_TITLE_CHANGE, e, _ecore_x_event_free_window_prop_visible_title_change, NULL);
- }
- else if ((xevent->xproperty.atom == ECORE_X_ATOM_WM_ICON_NAME) || (xevent->xproperty.atom == ECORE_X_ATOM_NET_WM_ICON_NAME))
- {
- Ecore_X_Event_Window_Prop_Icon_Name_Change *e;
-
- e = calloc(1, sizeof(Ecore_X_Event_Window_Prop_Icon_Name_Change));
- if (!e)
- return;
-
- e->name = ecore_x_window_prop_icon_name_get(xevent->xproperty.window);
- e->time = xevent->xproperty.time;
- _ecore_x_event_last_time = e->time;
- ecore_event_add(ECORE_X_EVENT_WINDOW_PROP_ICON_NAME_CHANGE, e, _ecore_x_event_free_window_prop_icon_name_change, NULL);
- }
- else if (xevent->xproperty.atom == ECORE_X_ATOM_NET_WM_VISIBLE_ICON_NAME)
- {
- Ecore_X_Event_Window_Prop_Visible_Icon_Name_Change *e;
-
- e = calloc(1, sizeof(Ecore_X_Event_Window_Prop_Visible_Icon_Name_Change));
- if (!e)
- return;
-
- e->name = ecore_x_window_prop_visible_icon_name_get(xevent->xproperty.window);
- e->time = xevent->xproperty.time;
- _ecore_x_event_last_time = e->time;
- ecore_event_add(ECORE_X_EVENT_WINDOW_PROP_VISIBLE_ICON_NAME_CHANGE, e, _ecore_x_event_free_window_prop_visible_icon_name_change, NULL);
- }
- else if (xevent->xproperty.atom == ECORE_X_ATOM_WM_CLIENT_MACHINE)
- {
- Ecore_X_Event_Window_Prop_Client_Machine_Change *e;
-
- e = calloc(1, sizeof(Ecore_X_Event_Window_Prop_Client_Machine_Change));
- if (!e)
- return;
-
- e->name = ecore_x_window_prop_client_machine_get(xevent->xproperty.window);
- e->time = xevent->xproperty.time;
- _ecore_x_event_last_time = e->time;
- ecore_event_add(ECORE_X_EVENT_WINDOW_PROP_CLIENT_MACHINE_CHANGE, e, _ecore_x_event_free_window_prop_client_machine_change, NULL);
- }
- else if (xevent->xproperty.atom == ECORE_X_ATOM_NET_WM_PID)
- {
- Ecore_X_Event_Window_Prop_Pid_Change *e;
-
- e = calloc(1, sizeof(Ecore_X_Event_Window_Prop_Pid_Change));
- if (!e)
- return;
-
- e->pid = ecore_x_window_prop_pid_get(xevent->xproperty.window);
- e->time = xevent->xproperty.time;
- _ecore_x_event_last_time = e->time;
- ecore_event_add(ECORE_X_EVENT_WINDOW_PROP_PID_CHANGE, e, NULL, NULL);
- }
- else if (xevent->xproperty.atom == ECORE_X_ATOM_NET_WM_DESKTOP)
- {
- Ecore_X_Event_Window_Prop_Desktop_Change *e;
-
- e = calloc(1, sizeof(Ecore_X_Event_Window_Prop_Desktop_Change));
- if (!e)
- return;
-
- e->desktop = ecore_x_window_prop_desktop_get(xevent->xproperty.window);
- ecore_event_add(ECORE_X_EVENT_WINDOW_PROP_PID_CHANGE, e, NULL, NULL);
- }
- else
-#endif /* if 0 */
{
xcb_property_notify_event_t *ev;
Ecore_X_Event_Window_Property *e;
EAPI int ECORE_X_EVENT_WINDOW_PROPERTY = 0;
EAPI int ECORE_X_EVENT_WINDOW_COLORMAP = 0;
EAPI int ECORE_X_EVENT_WINDOW_MAPPING = 0;
+EAPI int ECORE_X_EVENT_MAPPING_CHANGE = 0;
EAPI int ECORE_X_EVENT_SELECTION_CLEAR = 0;
EAPI int ECORE_X_EVENT_SELECTION_REQUEST = 0;
EAPI int ECORE_X_EVENT_SELECTION_NOTIFY = 0;
EAPI int ECORE_X_EVENT_RANDR_OUTPUT_CHANGE = 0;
EAPI int ECORE_X_EVENT_RANDR_OUTPUT_PROPERTY_NOTIFY = 0;
EAPI int ECORE_X_EVENT_WINDOW_DELETE_REQUEST = 0;
-/*
- EAPI int ECORE_X_EVENT_WINDOW_PROP_TITLE_CHANGE = 0;
- EAPI int ECORE_X_EVENT_WINDOW_PROP_VISIBLE_TITLE_CHANGE = 0;
- EAPI int ECORE_X_EVENT_WINDOW_PROP_NAME_CLASS_CHANGE = 0;
- EAPI int ECORE_X_EVENT_WINDOW_PROP_ICON_NAME_CHANGE = 0;
- EAPI int ECORE_X_EVENT_WINDOW_PROP_VISIBLE_ICON_NAME_CHANGE = 0;
- EAPI int ECORE_X_EVENT_WINDOW_PROP_CLIENT_MACHINE_CHANGE = 0;
- EAPI int ECORE_X_EVENT_WINDOW_PROP_PID_CHANGE = 0;
- EAPI int ECORE_X_EVENT_WINDOW_PROP_DESKTOP_CHANGE = 0;
- */
-
EAPI int ECORE_X_EVENT_WINDOW_MOVE_RESIZE_REQUEST = 0;
EAPI int ECORE_X_EVENT_WINDOW_STATE_REQUEST = 0;
EAPI int ECORE_X_EVENT_FRAME_EXTENTS_REQUEST = 0;
ECORE_X_EVENT_WINDOW_PROPERTY = ecore_event_type_new();
ECORE_X_EVENT_WINDOW_COLORMAP = ecore_event_type_new();
ECORE_X_EVENT_WINDOW_MAPPING = ecore_event_type_new();
+ ECORE_X_EVENT_MAPPING_CHANGE = ecore_event_type_new();
ECORE_X_EVENT_SELECTION_CLEAR = ecore_event_type_new();
ECORE_X_EVENT_SELECTION_REQUEST = ecore_event_type_new();
ECORE_X_EVENT_SELECTION_NOTIFY = ecore_event_type_new();
ECORE_X_EVENT_DAMAGE_NOTIFY = ecore_event_type_new();
ECORE_X_EVENT_WINDOW_DELETE_REQUEST = ecore_event_type_new();
- /*
- ECORE_X_EVENT_WINDOW_PROP_TITLE_CHANGE = ecore_event_type_new();
- ECORE_X_EVENT_WINDOW_PROP_VISIBLE_TITLE_CHANGE = ecore_event_type_new();
- ECORE_X_EVENT_WINDOW_PROP_NAME_CLASS_CHANGE = ecore_event_type_new();
- ECORE_X_EVENT_WINDOW_PROP_ICON_NAME_CHANGE = ecore_event_type_new();
- ECORE_X_EVENT_WINDOW_PROP_VISIBLE_ICON_NAME_CHANGE = ecore_event_type_new();
- ECORE_X_EVENT_WINDOW_PROP_CLIENT_MACHINE_CHANGE = ecore_event_type_new();
- ECORE_X_EVENT_WINDOW_PROP_PID_CHANGE = ecore_event_type_new();
- ECORE_X_EVENT_WINDOW_PROP_DESKTOP_CHANGE = ecore_event_type_new();
- */
ECORE_X_EVENT_DESKTOP_CHANGE = ecore_event_type_new();
ECORE_X_EVENT_WINDOW_MOVE_RESIZE_REQUEST = ecore_event_type_new();
#define CODESET "INVALID"
#endif /* ifndef CODESET */
-#if 0
-static void _ecore_x_event_free_window_prop_name_class_change(void *data,
- void *ev);
-static void _ecore_x_event_free_window_prop_title_change(void *data, void *ev);
-static void _ecore_x_event_free_window_prop_visible_title_change(void *data,
- void *ev);
-static void _ecore_x_event_free_window_prop_icon_name_change(void *data,
- void *ev);
-static void _ecore_x_event_free_window_prop_visible_icon_name_change(void *data,
- void *ev);
-static void _ecore_x_event_free_window_prop_client_machine_change(void *data,
- void *ev);
-#endif /* if 0 */
-
static Window _ecore_x_mouse_down_last_win = 0;
static Window _ecore_x_mouse_down_last_last_win = 0;
static Window _ecore_x_mouse_down_last_event_win = 0;
XChangeWindowAttributes(_ecore_x_disp, w, CWEventMask, &s_attr);
} /* ecore_x_event_mask_unset */
-#if 0
-static void
-_ecore_x_event_free_window_prop_name_class_change(void *data, void *ev)
-{
- Ecore_X_Event_Window_Prop_Name_Class_Change *e;
-
- e = ev;
- if (e->name)
- free(e->name);
-
- if (e->clas)
- free(e->clas);
-
- free(e);
-} /* _ecore_x_event_free_window_prop_name_class_change */
-
-static void
-_ecore_x_event_free_window_prop_title_change(void *data, void *ev)
-{
- Ecore_X_Event_Window_Prop_Title_Change *e;
-
- e = ev;
- if (e->title)
- free(e->title);
-
- free(e);
-} /* _ecore_x_event_free_window_prop_title_change */
-
-static void
-_ecore_x_event_free_window_prop_visible_title_change(void *data, void *ev)
-{
- Ecore_X_Event_Window_Prop_Visible_Title_Change *e;
-
- e = ev;
- if (e->title)
- free(e->title);
-
- free(e);
-} /* _ecore_x_event_free_window_prop_visible_title_change */
-
-static void
-_ecore_x_event_free_window_prop_icon_name_change(void *data, void *ev)
-{
- Ecore_X_Event_Window_Prop_Icon_Name_Change *e;
-
- e = ev;
- if (e->name)
- free(e->name);
-
- free(e);
-} /* _ecore_x_event_free_window_prop_icon_name_change */
-
-static void
-_ecore_x_event_free_window_prop_visible_icon_name_change(void *data, void *ev)
-{
- Ecore_X_Event_Window_Prop_Visible_Icon_Name_Change *e;
-
- e = ev;
- if (e->name)
- free(e->name);
-
- free(e);
-} /* _ecore_x_event_free_window_prop_visible_icon_name_change */
-
-static void
-_ecore_x_event_free_window_prop_client_machine_change(void *data, void *ev)
-{
- Ecore_X_Event_Window_Prop_Client_Machine_Change *e;
-
- e = ev;
- if (e->name)
- free(e->name);
-
- free(e);
-} /* _ecore_x_event_free_window_prop_client_machine_change */
-
-#endif /* if 0 */
-
static void
_ecore_x_event_free_xdnd_enter(void *data __UNUSED__, void *ev)
{
_ecore_x_event_handle_property_notify(XEvent *xevent)
{
_ecore_x_last_event_mouse_move = 0;
-#if 0 /* for now i disabled this. nice idea though this is - it leaves a lot
- * to be desired for efficiency that is better left to the app layer
- */
- if (xevent->xproperty.atom == ECORE_X_ATOM_WM_CLASS)
- {
- Ecore_X_Event_Window_Prop_Name_Class_Change *e;
-
- e = calloc(1, sizeof(Ecore_X_Event_Window_Prop_Name_Class_Change));
- if (!e)
- return;
-
- ecore_x_window_prop_name_class_get(xevent->xproperty.window,
- &(e->name), &(e->clas));
- e->time = xevent->xproperty.time;
- _ecore_x_event_last_time = e->time;
- ecore_event_add(ECORE_X_EVENT_WINDOW_PROP_NAME_CLASS_CHANGE, e,
- _ecore_x_event_free_window_prop_name_class_change, NULL);
- }
- else if ((xevent->xproperty.atom == ECORE_X_ATOM_WM_NAME) ||
- (xevent->xproperty.atom == ECORE_X_ATOM_NET_WM_NAME))
- {
- Ecore_X_Event_Window_Prop_Title_Change *e;
-
- e = calloc(1, sizeof(Ecore_X_Event_Window_Prop_Title_Change));
- if (!e)
- return;
-
- e->title = ecore_x_window_prop_title_get(xevent->xproperty.window);
- e->time = xevent->xproperty.time;
- _ecore_x_event_last_time = e->time;
- ecore_event_add(ECORE_X_EVENT_WINDOW_PROP_TITLE_CHANGE, e,
- _ecore_x_event_free_window_prop_title_change, NULL);
- }
- else if (xevent->xproperty.atom == ECORE_X_ATOM_NET_WM_VISIBLE_NAME)
- {
- Ecore_X_Event_Window_Prop_Visible_Title_Change *e;
-
- e = calloc(1, sizeof(Ecore_X_Event_Window_Prop_Visible_Title_Change));
- if (!e)
- return;
-
- e->title = ecore_x_window_prop_visible_title_get(
- xevent->xproperty.window);
- e->time = xevent->xproperty.time;
- _ecore_x_event_last_time = e->time;
- ecore_event_add(ECORE_X_EVENT_WINDOW_PROP_VISIBLE_TITLE_CHANGE,
- e,
- _ecore_x_event_free_window_prop_visible_title_change,
- NULL);
- }
- else if ((xevent->xproperty.atom == ECORE_X_ATOM_WM_ICON_NAME) ||
- (xevent->xproperty.atom == ECORE_X_ATOM_NET_WM_ICON_NAME))
- {
- Ecore_X_Event_Window_Prop_Icon_Name_Change *e;
-
- e = calloc(1, sizeof(Ecore_X_Event_Window_Prop_Icon_Name_Change));
- if (!e)
- return;
-
- e->name = ecore_x_window_prop_icon_name_get(xevent->xproperty.window);
- e->time = xevent->xproperty.time;
- _ecore_x_event_last_time = e->time;
- ecore_event_add(ECORE_X_EVENT_WINDOW_PROP_ICON_NAME_CHANGE, e,
- _ecore_x_event_free_window_prop_icon_name_change, NULL);
- }
- else if (xevent->xproperty.atom == ECORE_X_ATOM_NET_WM_VISIBLE_ICON_NAME)
- {
- Ecore_X_Event_Window_Prop_Visible_Icon_Name_Change *e;
-
- e = calloc(1, sizeof(Ecore_X_Event_Window_Prop_Visible_Icon_Name_Change));
- if (!e)
- return;
-
- e->name = ecore_x_window_prop_visible_icon_name_get(
- xevent->xproperty.window);
- e->time = xevent->xproperty.time;
- _ecore_x_event_last_time = e->time;
- ecore_event_add(
- ECORE_X_EVENT_WINDOW_PROP_VISIBLE_ICON_NAME_CHANGE,
- e,
- _ecore_x_event_free_window_prop_visible_icon_name_change,
- NULL);
- }
- else if (xevent->xproperty.atom == ECORE_X_ATOM_WM_CLIENT_MACHINE)
- {
- Ecore_X_Event_Window_Prop_Client_Machine_Change *e;
-
- e = calloc(1, sizeof(Ecore_X_Event_Window_Prop_Client_Machine_Change));
- if (!e)
- return;
-
- e->name = ecore_x_window_prop_client_machine_get(
- xevent->xproperty.window);
- e->time = xevent->xproperty.time;
- _ecore_x_event_last_time = e->time;
- ecore_event_add(ECORE_X_EVENT_WINDOW_PROP_CLIENT_MACHINE_CHANGE,
- e,
- _ecore_x_event_free_window_prop_client_machine_change,
- NULL);
- }
- else if (xevent->xproperty.atom == ECORE_X_ATOM_NET_WM_PID)
- {
- Ecore_X_Event_Window_Prop_Pid_Change *e;
-
- e = calloc(1, sizeof(Ecore_X_Event_Window_Prop_Pid_Change));
- if (!e)
- return;
-
- e->pid = ecore_x_window_prop_pid_get(xevent->xproperty.window);
- e->time = xevent->xproperty.time;
- _ecore_x_event_last_time = e->time;
- ecore_event_add(ECORE_X_EVENT_WINDOW_PROP_PID_CHANGE, e, NULL, NULL);
- }
- else if (xevent->xproperty.atom == ECORE_X_ATOM_NET_WM_DESKTOP)
- {
- Ecore_X_Event_Window_Prop_Desktop_Change *e;
-
- e = calloc(1, sizeof(Ecore_X_Event_Window_Prop_Desktop_Change));
- if (!e)
- return;
-
- e->desktop = ecore_x_window_prop_desktop_get(xevent->xproperty.window);
- ecore_event_add(ECORE_X_EVENT_WINDOW_PROP_PID_CHANGE, e, NULL, NULL);
- }
- else
-#endif /* if 0 */
{
Ecore_X_Event_Window_Property *e;
e->cmap = xevent->xcolormap.colormap;
e->time = _ecore_x_event_last_time;
if (xevent->xcolormap.state == ColormapInstalled)
- e->installed = 1;
+ e->installed = EINA_TRUE;
else
- e->installed = 0;
+ e->installed = EINA_FALSE;
ecore_event_add(ECORE_X_EVENT_WINDOW_COLORMAP, e, NULL, NULL);
} /* _ecore_x_event_handle_colormap_notify */
{
Ecore_X_Event_Xdnd_Finished *e;
Ecore_X_DND_Source *source;
- int completed = 1;
+ Eina_Bool completed = EINA_TRUE;
LOGFN(__FILE__, __LINE__, __FUNCTION__);
source = _ecore_x_dnd_source_get();
}
else if (source->version >= 5)
{
- completed = 0;
+ completed = EINA_FALSE;
source->state = ECORE_X_DND_SOURCE_CONVERTING;
/* FIXME: Probably need to add a timer to switch back to idle
void
_ecore_x_event_handle_mapping_notify(XEvent *xevent)
{
+ Ecore_X_Event_Mapping_Change *e;
+
_ecore_x_last_event_mouse_move = 0;
XRefreshKeyboardMapping((XMappingEvent *)xevent);
+ e = calloc(1, sizeof(Ecore_X_Event_Mapping_Change));
+ if (!e) return;
+ switch (xevent->xmapping.request)
+ {
+ case MappingModifier:
+ e->type = ECORE_X_MAPPING_MODIFIER;
+ break;
+ case MappingKeyboard:
+ e->type = ECORE_X_MAPPING_KEYBOARD;
+ break;
+ case MappingPointer:
+ default:
+ e->type = ECORE_X_MAPPING_MOUSE;
+ break;
+ }
+ e->keycode = xevent->xmapping.first_keycode;
+ e->num = xevent->xmapping.count;
+ ecore_event_add(ECORE_X_EVENT_MAPPING_CHANGE, e, NULL, NULL);
} /* _ecore_x_event_handle_mapping_notify */
void
e->win = screensaver_event->window;
if (screensaver_event->state == ScreenSaverOn)
- e->on = 1;
+ e->on = EINA_TRUE;
else
- e->on = 0;
+ e->on = EINA_TRUE;
e->time = screensaver_event->time;
ecore_event_add(ECORE_X_EVENT_SCREENSAVER_NOTIFY, e, NULL, NULL);
e->output = randr_event->output;
e->property = randr_event->property;
e->time = randr_event->timestamp;
- e->state = randr_event->state;
+ if (randr_event->state == PropertyNewValue)
+ e->state = ECORE_X_RANDR_PROPERTY_CHANGE_ADD;
+ else
+ e->state = ECORE_X_RANDR_PROPERTY_CHANGE_DEL;
ecore_event_add(ECORE_X_EVENT_RANDR_OUTPUT_PROPERTY_NOTIFY, e, NULL, NULL);
} /* _ecore_x_event_handle_randr_notify_output_property */