Download

Support

lib/ewl_events.h

Go to the documentation of this file.
00001 /* vim: set sw=8 ts=8 sts=8 expandtab: */
00002 #ifndef EWL_EVENTS_H
00003 #define EWL_EVENTS_H
00004 
00016 #define EWL_EVENT_WINDOW_EXPOSE(e) ((Ewl_Event_Window_Expose *)(e))
00017 
00021 typedef struct Ewl_Event_Window_Expose Ewl_Event_Window_Expose;
00022 
00026 struct Ewl_Event_Window_Expose
00027 {
00028         int x; 
00029         int y; 
00030         int w; 
00031         int h; 
00032 };
00033 
00038 #define EWL_EVENT_KEY(e) ((Ewl_Event_Key *)(e))
00039 
00040 
00044 typedef struct Ewl_Event_Key Ewl_Event_Key;
00045 
00049 struct Ewl_Event_Key
00050 {
00051         unsigned int modifiers; 
00052         char *keyname;          
00053 };
00054 
00059 #define EWL_EVENT_KEY_DOWN(e) ((Ewl_Event_Key_Down *)(e))
00060 
00064 typedef struct Ewl_Event_Key_Down Ewl_Event_Key_Down;
00065 
00069 struct Ewl_Event_Key_Down
00070 {
00071         Ewl_Event_Key base;     
00072 };
00073 
00078 #define EWL_EVENT_KEY_UP(e) ((Ewl_Event_Key_Up *)(e))
00079 
00083 typedef struct Ewl_Event_Key_Up Ewl_Event_Key_Up;
00084 
00088 struct Ewl_Event_Key_Up
00089 {
00090         Ewl_Event_Key base;     
00091 };
00092 
00097 #define EWL_EVENT_MOUSE(e) ((Ewl_Event_Mouse *)(e))
00098 
00102 typedef struct Ewl_Event_Mouse Ewl_Event_Mouse;
00103 
00107 struct Ewl_Event_Mouse
00108 {
00109         unsigned int modifiers; 
00110         int x;          
00111         int y;          
00112 };
00113 
00118 #define EWL_EVENT_MOUSE_DOWN(e) ((Ewl_Event_Mouse_Down *)(e))
00119 
00123 typedef struct Ewl_Event_Mouse_Down Ewl_Event_Mouse_Down;
00124 
00128 struct Ewl_Event_Mouse_Down
00129 {
00130         Ewl_Event_Mouse base;   
00131         int button;             
00132         int clicks;             
00133 };
00134 
00139 #define EWL_EVENT_MOUSE_UP(e) ((Ewl_Event_Mouse_Up *)(e))
00140 
00144 typedef struct Ewl_Event_Mouse_Up Ewl_Event_Mouse_Up;
00145 
00149 struct Ewl_Event_Mouse_Up
00150 {
00151         Ewl_Event_Mouse base;   
00152         int button;             
00153         int clicks;             
00154 };
00155 
00160 #define EWL_EVENT_MOUSE_MOVE(e) ((Ewl_Event_Mouse_Move *)(e))
00161 
00165 typedef struct Ewl_Event_Mouse_Move Ewl_Event_Mouse_Move;
00166 
00170 struct Ewl_Event_Mouse_Move
00171 {
00172         Ewl_Event_Mouse base;   
00173 };
00174 
00179 #define EWL_EVENT_MOUSE_IN(e) ((Ewl_Event_Mouse_In *)(e))
00180 
00184 typedef struct Ewl_Event_Mouse_In Ewl_Event_Mouse_In;
00185 
00189 struct Ewl_Event_Mouse_In
00190 {
00191         Ewl_Event_Mouse base;   
00192 };
00193 
00198 #define EWL_EVENT_MOUSE_OUT(e) ((Ewl_Event_Mouse_Out *)(e))
00199 
00203 typedef struct Ewl_Event_Mouse_Out Ewl_Event_Mouse_Out;
00204 
00208 struct Ewl_Event_Mouse_Out
00209 {
00210         Ewl_Event_Mouse base;   
00211 };
00212 
00217 #define EWL_EVENT_MOUSE_WHEEL(e) ((Ewl_Event_Mouse_Wheel *)(e))
00218 
00222 typedef struct Ewl_Event_Mouse_Wheel Ewl_Event_Mouse_Wheel;
00223 
00227 struct Ewl_Event_Mouse_Wheel
00228 {
00229         Ewl_Event_Mouse base;   
00230         int z;                  
00231         int dir;                
00232 };
00233 
00238 #define EWL_DND_TYPES(t) ((Ewl_Dnd_Types *)(t))
00239 
00243 typedef struct Ewl_Dnd_Types Ewl_Dnd_Types;
00244 
00248 struct Ewl_Dnd_Types
00249 {
00250         int num_types;          
00251         char **types;           
00252 };
00253 
00258 #define EWL_EVENT_DND_POSITION(e) ((Ewl_Event_Dnd_Position *)(e))
00259 
00263 typedef struct Ewl_Event_Dnd_Position Ewl_Event_Dnd_Position;
00264 
00268 struct Ewl_Event_Dnd_Position
00269 {
00270         int x;          
00271         int y;          
00272 };
00273 
00278 #define EWL_EVENT_DND_DROP(e) ((Ewl_Event_Dnd_Drop *)(e))
00279 
00283 typedef struct Ewl_Event_Dnd_Drop Ewl_Event_Dnd_Drop;
00284 
00288 struct Ewl_Event_Dnd_Drop
00289 {
00290         int x;          
00291         int y;          
00292         void *data;     
00293 };
00294 
00299 #define EWL_EVENT_DND_DATA_RECEIVED(e) ((Ewl_Event_Dnd_Data_Received *)(e))
00300 
00304 typedef struct Ewl_Event_Dnd_Data_Received Ewl_Event_Dnd_Data_Received;
00305 
00309 struct Ewl_Event_Dnd_Data_Received
00310 {
00311         char *type;             
00312         void *data;             
00313         unsigned int len;       
00314         unsigned int format;    
00315 };
00316 
00321 #define EWL_EVENT_DND_DATA_REQUEST(e) ((Ewl_Event_Dnd_Data_Request *)(e))
00322 
00326 typedef struct Ewl_Event_Dnd_Data_Request Ewl_Event_Dnd_Data_Request;
00327 
00331 struct Ewl_Event_Dnd_Data_Request
00332 {
00333         void *handle; 
00334         char *type;   
00335 };
00336 
00341 #define EWL_EVENT_ACTION_RESPONSE(e) ((Ewl_Event_Action_Response*)(e))
00342 
00346 typedef struct Ewl_Event_Action_Response Ewl_Event_Action_Response;
00347 
00351 struct Ewl_Event_Action_Response
00352 {
00353         unsigned int response;  
00354 };
00355 
00360 #define EWL_EVENT_STATE_CHANGE(e) ((Ewl_Event_State_Change*)(e))
00361 
00365 typedef struct Ewl_Event_State_Change Ewl_Event_State_Change;
00366 
00370 struct Ewl_Event_State_Change
00371 {
00372         const char *state;
00373         Ewl_State_Type flag;
00374 };
00375 
00376 #include <ewl_model.h>
00381 #define EWL_EVENT_MVC_CLICKED(e) ((Ewl_Event_MVC_Clicked*)(e))
00382 
00386 typedef struct Ewl_Event_MVC_Clicked Ewl_Event_MVC_Clicked;
00387 
00391 struct Ewl_Event_MVC_Clicked
00392 {
00393         unsigned int modifiers; 
00394         int button;             
00395         int clicks;             
00397         const Ewl_Model *model; 
00398         void *mvc_data;         
00400         unsigned int row;       
00401         unsigned int column;    
00402 };
00403 
00404 unsigned int         ewl_ev_modifiers_get(void);
00405 void                 ewl_ev_modifiers_set(unsigned int modifiers);
00406 
00411 #endif

Copyright © Enlightenment.org

Enlightened Widget Library Documentation Generated: Fri Jan 23 21:56:24 2009