mirror of
https://github.com/gryf/wmaker.git
synced 2025-12-23 14:42:29 +01:00
- Moved the timer, idle and input handler definitions from WINGs.h to
WUtil.h among with their callbacks and prototypes, because they're not GUI related
This commit is contained in:
@@ -439,10 +439,6 @@ typedef struct {
|
|||||||
/* All indentation and tab markers are _relative_ to the left margin marker */
|
/* All indentation and tab markers are _relative_ to the left margin marker */
|
||||||
|
|
||||||
|
|
||||||
typedef void *WMHandlerID;
|
|
||||||
|
|
||||||
typedef void WMInputProc(int fd, int mask, void *clientData);
|
|
||||||
|
|
||||||
typedef void WMEventProc(XEvent *event, void *clientData);
|
typedef void WMEventProc(XEvent *event, void *clientData);
|
||||||
|
|
||||||
typedef void WMEventHook(XEvent *event);
|
typedef void WMEventHook(XEvent *event);
|
||||||
@@ -455,8 +451,6 @@ typedef void WMAction(WMWidget *self, void *clientData);
|
|||||||
typedef void WMAction2(void *self, void *clientData);
|
typedef void WMAction2(void *self, void *clientData);
|
||||||
|
|
||||||
|
|
||||||
typedef void WMCallback(void *data);
|
|
||||||
|
|
||||||
typedef void WMDropDataCallback(WMView *view, WMData *data);
|
typedef void WMDropDataCallback(WMView *view, WMData *data);
|
||||||
|
|
||||||
/* delegate method like stuff */
|
/* delegate method like stuff */
|
||||||
@@ -655,26 +649,6 @@ void WMNextEvent(Display *dpy, XEvent *event);
|
|||||||
|
|
||||||
void WMMaskEvent(Display *dpy, long mask, XEvent *event);
|
void WMMaskEvent(Display *dpy, long mask, XEvent *event);
|
||||||
|
|
||||||
WMHandlerID WMAddTimerHandler(int milliseconds, WMCallback *callback,
|
|
||||||
void *cdata);
|
|
||||||
|
|
||||||
WMHandlerID WMAddPersistentTimerHandler(int milliseconds, WMCallback *callback,
|
|
||||||
void *cdata);
|
|
||||||
|
|
||||||
void WMDeleteTimerWithClientData(void *cdata);
|
|
||||||
|
|
||||||
void WMDeleteTimerHandler(WMHandlerID handlerID);
|
|
||||||
|
|
||||||
WMHandlerID WMAddIdleHandler(WMCallback *callback, void *cdata);
|
|
||||||
|
|
||||||
void WMDeleteIdleHandler(WMHandlerID handlerID);
|
|
||||||
|
|
||||||
WMHandlerID WMAddInputHandler(int fd, int condition, WMInputProc *proc,
|
|
||||||
void *clientData);
|
|
||||||
|
|
||||||
void WMDeleteInputHandler(WMHandlerID handlerID);
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Bool WMCreateSelectionHandler(WMView *view, Atom selection, Time timestamp,
|
Bool WMCreateSelectionHandler(WMView *view, Atom selection, Time timestamp,
|
||||||
WMSelectionProcs *procs, void *cdata);
|
WMSelectionProcs *procs, void *cdata);
|
||||||
|
|||||||
@@ -130,6 +130,16 @@ typedef struct W_Host WMHost;
|
|||||||
typedef struct W_Connection WMConnection;
|
typedef struct W_Connection WMConnection;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/* Some typedefs for the handler stuff */
|
||||||
|
typedef void *WMHandlerID;
|
||||||
|
|
||||||
|
typedef void WMCallback(void *data);
|
||||||
|
|
||||||
|
typedef void WMInputProc(int fd, int mask, void *clientData);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
typedef int WMCompareDataProc(const void *item1, const void *item2);
|
typedef int WMCompareDataProc(const void *item1, const void *item2);
|
||||||
|
|
||||||
typedef void WMFreeDataProc(void *data);
|
typedef void WMFreeDataProc(void *data);
|
||||||
@@ -279,6 +289,28 @@ int wsprintesc(char *buffer, int length, char *format, WMSEscapes **escapes,
|
|||||||
|
|
||||||
/*......................................................................*/
|
/*......................................................................*/
|
||||||
|
|
||||||
|
/* Event handlers: timer, idle, input */
|
||||||
|
|
||||||
|
WMHandlerID WMAddTimerHandler(int milliseconds, WMCallback *callback,
|
||||||
|
void *cdata);
|
||||||
|
|
||||||
|
WMHandlerID WMAddPersistentTimerHandler(int milliseconds, WMCallback *callback,
|
||||||
|
void *cdata);
|
||||||
|
|
||||||
|
void WMDeleteTimerWithClientData(void *cdata);
|
||||||
|
|
||||||
|
void WMDeleteTimerHandler(WMHandlerID handlerID);
|
||||||
|
|
||||||
|
WMHandlerID WMAddIdleHandler(WMCallback *callback, void *cdata);
|
||||||
|
|
||||||
|
void WMDeleteIdleHandler(WMHandlerID handlerID);
|
||||||
|
|
||||||
|
WMHandlerID WMAddInputHandler(int fd, int condition, WMInputProc *proc,
|
||||||
|
void *clientData);
|
||||||
|
|
||||||
|
void WMDeleteInputHandler(WMHandlerID handlerID);
|
||||||
|
|
||||||
|
|
||||||
/* This function is used _only_ if you create a non-GUI program.
|
/* This function is used _only_ if you create a non-GUI program.
|
||||||
* For GUI based programs use WMNextEvent()/WMHandleEvent() instead.
|
* For GUI based programs use WMNextEvent()/WMHandleEvent() instead.
|
||||||
* This function will handle all input/timer/idle events, then return.
|
* This function will handle all input/timer/idle events, then return.
|
||||||
|
|||||||
Reference in New Issue
Block a user