summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--xtrapdi.h3
-rw-r--r--xtraplib.h9
-rw-r--r--xtraplibp.h7
3 files changed, 14 insertions, 5 deletions
diff --git a/xtrapdi.h b/xtrapdi.h
index d58b907..34aa94c 100644
--- a/xtrapdi.h
+++ b/xtrapdi.h
@@ -80,9 +80,6 @@ SOFTWARE.
# define False 0L
#endif
-typedef int (*int_function)();
-typedef void (*void_function)();
-
/* This is used as flags to indicate desired request traps
* Note: This has been padded to a CARD32 to keep structure aligned
*/
diff --git a/xtraplib.h b/xtraplib.h
index f3f273a..db0289f 100644
--- a/xtraplib.h
+++ b/xtraplib.h
@@ -52,6 +52,11 @@ SOFTWARE.
#include <X11/extensions/xtrapdi.h>
#include <X11/extensions/xtrapemacros.h>
+typedef struct _XETC XETC;
+
+typedef int (*int_function)(XETC *tc, XETrapDatum *pdatum, BYTE *userp);
+typedef void (*void_function)(XETC *tc, XETrapDatum *pdatum, BYTE *userp);
+
typedef struct /* Callback structure */
{
void_function func;
@@ -100,7 +105,7 @@ typedef struct {
} XETrapDataEvent;
/* Trap Context structure for maintaining XTrap State for client */
-typedef struct _XETC
+struct _XETC
{
struct _XETC *next; /* Ptr to next linked-listed TC */
Display *dpy; /* Display ptr of current TC */
@@ -122,7 +127,7 @@ typedef struct _XETC
unsigned dirty /*B32*/; /* cache dirty bits */
XETCValues values; /* shadow structure of values */
Boolean (*eventFunc[XETrapNumberEvents])(XETrapDataEvent *event, struct _XETC *tc);
-} XETC;
+};
#endif /* __XTRAPLIB__ */
diff --git a/xtraplibp.h b/xtraplibp.h
index ff2042e..0c6ced2 100644
--- a/xtraplibp.h
+++ b/xtraplibp.h
@@ -42,8 +42,12 @@ SOFTWARE.
* routines sorted by module (globally defined routines *only*).
*/
+#include <X11/Xfuncproto.h>
+
#include <stdio.h>
+_XFUNCPROTOBEGIN
+
/* XEConTxt.c */
XETC *XECreateTC (Display *dpy , CARD32 valuemask , XETCValues *value );
int XEChangeTC (XETC *tc , CARD32 mask , XETCValues *values );
@@ -102,6 +106,7 @@ XtInputMask XETrapAppPending (XtAppContext app);
void XETrapAppMainLoop (XtAppContext app , XETC *tc );
int XETrapAppWhileLoop (XtAppContext app , XETC *tc , Bool *done );
int XETrapWaitForSomething (XtAppContext app );
+Boolean (*XETrapGetEventHandler(XETC *tc, CARD32 id))(XETrapDataEvent *event, XETC *tc);
Boolean (*XETrapSetEventHandler(XETC *tc, CARD32 id, Boolean (*pfunc)(XETrapDataEvent *event, XETC *tc))) (XETrapDataEvent *event, XETC *tc);
/* XEPrInfo.c */
@@ -141,4 +146,6 @@ Bool XETrapQueryExtension (Display *dpy,INT32 *event_base_return,
INT32 *error_base_return, INT32 *opcode_return);
+_XFUNCPROTOEND
+
#endif /* __XTRAPLIBP__ */