From 003f65f909d6184fdda5019174c75f17094530df Mon Sep 17 00:00:00 2001 From: raster Date: Sat, 7 Aug 2010 01:27:25 +0000 Subject: [PATCH] shape event gets info. git-svn-id: http://svn.enlightenment.org/svn/e/trunk/ecore@50878 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33 --- src/lib/ecore_x/Ecore_X.h | 27 +++++++++++---------------- src/lib/ecore_x/xlib/ecore_x_events.c | 16 ++++++++++++++++ 2 files changed, 27 insertions(+), 16 deletions(-) diff --git a/src/lib/ecore_x/Ecore_X.h b/src/lib/ecore_x/Ecore_X.h index 177856e..c12fa0b 100644 --- a/src/lib/ecore_x/Ecore_X.h +++ b/src/lib/ecore_x/Ecore_X.h @@ -288,24 +288,19 @@ typedef struct _Ecore_X_Event_Window_Focus_In Ecore_X_Event_Window_Focus_In; typedef struct _Ecore_X_Event_Window_Focus_Out Ecore_X_Event_Window_Focus_Out; typedef struct _Ecore_X_Event_Window_Keymap Ecore_X_Event_Window_Keymap; typedef struct _Ecore_X_Event_Window_Damage Ecore_X_Event_Window_Damage; -typedef struct _Ecore_X_Event_Window_Visibility_Change -Ecore_X_Event_Window_Visibility_Change; +typedef struct _Ecore_X_Event_Window_Visibility_Change Ecore_X_Event_Window_Visibility_Change; typedef struct _Ecore_X_Event_Window_Create Ecore_X_Event_Window_Create; typedef struct _Ecore_X_Event_Window_Destroy Ecore_X_Event_Window_Destroy; typedef struct _Ecore_X_Event_Window_Hide Ecore_X_Event_Window_Hide; typedef struct _Ecore_X_Event_Window_Show Ecore_X_Event_Window_Show; -typedef struct _Ecore_X_Event_Window_Show_Request -Ecore_X_Event_Window_Show_Request; +typedef struct _Ecore_X_Event_Window_Show_Request Ecore_X_Event_Window_Show_Request; typedef struct _Ecore_X_Event_Window_Reparent Ecore_X_Event_Window_Reparent; typedef struct _Ecore_X_Event_Window_Configure Ecore_X_Event_Window_Configure; -typedef struct _Ecore_X_Event_Window_Configure_Request -Ecore_X_Event_Window_Configure_Request; +typedef struct _Ecore_X_Event_Window_Configure_Request Ecore_X_Event_Window_Configure_Request; typedef struct _Ecore_X_Event_Window_Gravity Ecore_X_Event_Window_Gravity; -typedef struct _Ecore_X_Event_Window_Resize_Request -Ecore_X_Event_Window_Resize_Request; +typedef struct _Ecore_X_Event_Window_Resize_Request Ecore_X_Event_Window_Resize_Request; typedef struct _Ecore_X_Event_Window_Stack Ecore_X_Event_Window_Stack; -typedef struct _Ecore_X_Event_Window_Stack_Request -Ecore_X_Event_Window_Stack_Request; +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_Window_Mapping Ecore_X_Event_Window_Mapping; @@ -324,16 +319,13 @@ typedef struct _Ecore_X_Event_Xdnd_Drop Ecore_X_Event_Xdnd_Drop; typedef struct _Ecore_X_Event_Xdnd_Finished Ecore_X_Event_Xdnd_Finished; typedef struct _Ecore_X_Event_Client_Message Ecore_X_Event_Client_Message; typedef struct _Ecore_X_Event_Window_Shape Ecore_X_Event_Window_Shape; -typedef struct _Ecore_X_Event_Screensaver_Notify -Ecore_X_Event_Screensaver_Notify; +typedef struct _Ecore_X_Event_Screensaver_Notify Ecore_X_Event_Screensaver_Notify; typedef struct _Ecore_X_Event_Sync_Counter Ecore_X_Event_Sync_Counter; typedef struct _Ecore_X_Event_Sync_Alarm Ecore_X_Event_Sync_Alarm; typedef struct _Ecore_X_Event_Screen_Change Ecore_X_Event_Screen_Change; typedef struct _Ecore_X_Event_Randr_Crtc_Change Ecore_X_Event_Randr_Crtc_Change; -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_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; @@ -681,6 +673,9 @@ struct _Ecore_X_Event_Window_Shape { Ecore_X_Window win; Ecore_X_Time time; + Ecore_X_Shape_Type type; + int x, y, w, h; + Eina_Bool shaped : 1; }; struct _Ecore_X_Event_Screensaver_Notify diff --git a/src/lib/ecore_x/xlib/ecore_x_events.c b/src/lib/ecore_x/xlib/ecore_x_events.c index 8a449e0..1c57dd7 100644 --- a/src/lib/ecore_x/xlib/ecore_x_events.c +++ b/src/lib/ecore_x/xlib/ecore_x_events.c @@ -2146,6 +2146,22 @@ _ecore_x_event_handle_shape_change(XEvent *xevent) e->win = shape_event->window; e->time = shape_event->time; + switch (shape_event->kind) + { + case ShapeBounding: + e->type = ECORE_X_SHAPE_BOUNDING; + break; + case ShapeClip: + e->type = ECORE_X_SHAPE_CLIP; + break; + default: + break; + } + e->x = shape_event->x; + e->y = shape_event->y; + e->w = shape_event->width; + e->h = shape_event->height; + e->shaped = shape_event->shaped; ecore_event_add(ECORE_X_EVENT_WINDOW_SHAPE, e, NULL, NULL); } /* _ecore_x_event_handle_shape_change */ -- 2.7.4