From 83d54b9a1e789c31551b806cd7ef207aaef3f042 Mon Sep 17 00:00:00 2001 From: Paulo Cesar Pereira de Andrade Date: Fri, 14 Mar 2008 02:33:48 -0300 Subject: [PATCH] libXtst ansification. --- src/XRecord.c | 101 +++++++++++++++++++-------------------- src/XTest.c | 148 +++++++++++++++++++++++++++++---------------------------- 2 files changed, 124 insertions(+), 125 deletions(-) diff --git a/src/XRecord.c b/src/XRecord.c index 5d2623e..e4eb919 100644 --- a/src/XRecord.c +++ b/src/XRecord.c @@ -251,16 +251,16 @@ SendRange( **************************************************************************/ XID -XRecordIdBaseMask(dpy) - Display *dpy; +XRecordIdBaseMask(Display *dpy) { return 0x1fffffff & ~dpy->resource_mask; } Status -XRecordQueryVersion (dpy, cmajor_return, cminor_return) - Display *dpy; - int *cmajor_return, *cminor_return; +XRecordQueryVersion( + Display *dpy, + int *cmajor_return, + int *cminor_return) { XExtDisplayInfo *info = find_display (dpy); register xRecordQueryVersionReq *req; @@ -288,13 +288,13 @@ XRecordQueryVersion (dpy, cmajor_return, cminor_return) } XRecordContext -XRecordCreateContext(dpy, datum_flags, clients, nclients, ranges, nranges) - Display *dpy; - int datum_flags; - XRecordClientSpec *clients; - int nclients; - XRecordRange **ranges; - int nranges; +XRecordCreateContext( + Display *dpy, + int datum_flags, + XRecordClientSpec *clients, + int nclients, + XRecordRange **ranges, + int nranges) { XExtDisplayInfo *info = find_display (dpy); register xRecordCreateContextReq *req; @@ -322,20 +322,20 @@ XRecordCreateContext(dpy, datum_flags, clients, nclients, ranges, nranges) } XRecordRange * -XRecordAllocRange() +XRecordAllocRange(void) { return (XRecordRange*)Xcalloc(1, sizeof(XRecordRange)); } Status -XRecordRegisterClients(dpy, context, datum_flags, clients, nclients, ranges, nranges) - Display *dpy; - XRecordContext context; - int datum_flags; - XRecordClientSpec *clients; - int nclients; - XRecordRange **ranges; - int nranges; +XRecordRegisterClients( + Display *dpy, + XRecordContext context, + int datum_flags, + XRecordClientSpec *clients, + int nclients, + XRecordRange **ranges, + int nranges) { XExtDisplayInfo *info = find_display (dpy); register xRecordRegisterClientsReq *req; @@ -363,11 +363,11 @@ XRecordRegisterClients(dpy, context, datum_flags, clients, nclients, ranges, nra } Status -XRecordUnregisterClients(dpy, context, clients, nclients) - Display *dpy; - XRecordContext context; - XRecordClientSpec *clients; - int nclients; +XRecordUnregisterClients( + Display *dpy, + XRecordContext context, + XRecordClientSpec *clients, + int nclients) { XExtDisplayInfo *info = find_display (dpy); register xRecordUnregisterClientsReq *req; @@ -418,10 +418,10 @@ WireToLibRange( } Status -XRecordGetContext(dpy, context, state_return) - Display *dpy; - XRecordContext context; - XRecordState **state_return; +XRecordGetContext( + Display *dpy, + XRecordContext context, + XRecordState **state_return) { XExtDisplayInfo *info = find_display (dpy); register xRecordGetContextReq *req; @@ -519,8 +519,7 @@ XRecordGetContext(dpy, context, state_return) } void -XRecordFreeState(state) - XRecordState *state; +XRecordFreeState(XRecordState *state) { int i; @@ -608,8 +607,7 @@ static XRecordInterceptData *alloc_inter_data(XExtDisplayInfo *info) } void -XRecordFreeData(data) - XRecordInterceptData *data; +XRecordFreeData(XRecordInterceptData *data) { /* we can do this cast because that is what we really allocated */ struct intercept_queue *iq = (struct intercept_queue *)data; @@ -849,11 +847,11 @@ parse_reply_call_callback( } Status -XRecordEnableContext(dpy, context, callback, closure) - Display *dpy; - XRecordContext context; - XRecordInterceptProc callback; - XPointer closure; +XRecordEnableContext( + Display *dpy, + XRecordContext context, + XRecordInterceptProc callback, + XPointer closure) { XExtDisplayInfo *info = find_display (dpy); register xRecordEnableContextReq *req; @@ -986,11 +984,11 @@ record_async_handler( * to get the rest. */ Status -XRecordEnableContextAsync(dpy, context, callback, closure) - Display *dpy; - XRecordContext context; - XRecordInterceptProc callback; - XPointer closure; +XRecordEnableContextAsync( + Display *dpy, + XRecordContext context, + XRecordInterceptProc callback, + XPointer closure) { XExtDisplayInfo *info = find_display (dpy); register xRecordEnableContextReq *req; @@ -1059,16 +1057,15 @@ XRecordEnableContextAsync(dpy, context, callback, closure) } void -XRecordProcessReplies(dpy) - Display *dpy; +XRecordProcessReplies(Display *dpy) { (void) XPending(dpy); } Status -XRecordDisableContext(dpy, context) - Display *dpy; - XRecordContext context; +XRecordDisableContext( + Display *dpy, + XRecordContext context) { XExtDisplayInfo *info = find_display (dpy); register xRecordDisableContextReq *req; @@ -1086,9 +1083,9 @@ XRecordDisableContext(dpy, context) } Status -XRecordFreeContext(dpy, context) - Display *dpy; - XRecordContext context; +XRecordFreeContext( + Display *dpy, + XRecordContext context) { XExtDisplayInfo *info = find_display (dpy); register xRecordFreeContextReq *req; diff --git a/src/XTest.c b/src/XTest.c index eccf1fb..60eaffc 100644 --- a/src/XTest.c +++ b/src/XTest.c @@ -97,10 +97,12 @@ static XEXT_GENERATE_CLOSE_DISPLAY (close_display, xtest_info) *****************************************************************************/ Bool -XTestQueryExtension (dpy, event_basep, error_basep, majorp, minorp) - Display *dpy; - int *event_basep, *error_basep; - int *majorp, *minorp; +XTestQueryExtension( + Display *dpy, + int *event_basep, + int *error_basep, + int *majorp, + int *minorp) { XExtDisplayInfo *info = find_display (dpy); register xXTestGetVersionReq *req; @@ -131,10 +133,10 @@ XTestQueryExtension (dpy, event_basep, error_basep, majorp, minorp) } Bool -XTestCompareCursorWithWindow(dpy, window, cursor) - Display *dpy; - Window window; - Cursor cursor; +XTestCompareCursorWithWindow( + Display *dpy, + Window window, + Cursor cursor) { XExtDisplayInfo *info = find_display (dpy); register xXTestCompareCursorReq *req; @@ -159,19 +161,19 @@ XTestCompareCursorWithWindow(dpy, window, cursor) } Bool -XTestCompareCurrentCursorWithWindow(dpy, window) - Display *dpy; - Window window; +XTestCompareCurrentCursorWithWindow( + Display *dpy, + Window window) { return XTestCompareCursorWithWindow(dpy, window, XTestCurrentCursor); } int -XTestFakeKeyEvent(dpy, keycode, is_press, delay) - Display *dpy; - unsigned int keycode; - Bool is_press; - unsigned long delay; +XTestFakeKeyEvent( + Display *dpy, + unsigned int keycode, + Bool is_press, + unsigned long delay) { XExtDisplayInfo *info = find_display (dpy); register xXTestFakeInputReq *req; @@ -191,11 +193,11 @@ XTestFakeKeyEvent(dpy, keycode, is_press, delay) } int -XTestFakeButtonEvent(dpy, button, is_press, delay) - Display *dpy; - unsigned int button; - Bool is_press; - unsigned long delay; +XTestFakeButtonEvent( + Display *dpy, + unsigned int button, + Bool is_press, + unsigned long delay) { XExtDisplayInfo *info = find_display (dpy); register xXTestFakeInputReq *req; @@ -215,11 +217,12 @@ XTestFakeButtonEvent(dpy, button, is_press, delay) } int -XTestFakeMotionEvent(dpy, screen, x, y, delay) - Display *dpy; - int screen; - int x, y; - unsigned long delay; +XTestFakeMotionEvent( + Display *dpy, + int screen, + int x, + int y, + unsigned long delay) { XExtDisplayInfo *info = find_display (dpy); register xXTestFakeInputReq *req; @@ -245,10 +248,11 @@ XTestFakeMotionEvent(dpy, screen, x, y, delay) } int -XTestFakeRelativeMotionEvent(dpy, dx, dy, delay) - Display *dpy; - int dx, dy; - unsigned long delay; +XTestFakeRelativeMotionEvent( + Display *dpy, + int dx, + int dy, + unsigned long delay) { XExtDisplayInfo *info = find_display (dpy); register xXTestFakeInputReq *req; @@ -315,14 +319,14 @@ send_axes( } int -XTestFakeDeviceKeyEvent(dpy, dev, keycode, is_press, axes, n_axes, delay) - Display *dpy; - XDevice *dev; - unsigned int keycode; - Bool is_press; - int *axes; - int n_axes; - unsigned long delay; +XTestFakeDeviceKeyEvent( + Display *dpy, + XDevice *dev, + unsigned int keycode, + Bool is_press, + int *axes, + int n_axes, + unsigned long delay) { XExtDisplayInfo *info = find_display (dpy); register xXTestFakeInputReq *req; @@ -346,14 +350,14 @@ XTestFakeDeviceKeyEvent(dpy, dev, keycode, is_press, axes, n_axes, delay) } int -XTestFakeDeviceButtonEvent(dpy, dev, button, is_press, axes, n_axes, delay) - Display *dpy; - XDevice *dev; - unsigned int button; - Bool is_press; - int *axes; - int n_axes; - unsigned long delay; +XTestFakeDeviceButtonEvent( + Display *dpy, + XDevice *dev, + unsigned int button, + Bool is_press, + int *axes, + int n_axes, + unsigned long delay) { XExtDisplayInfo *info = find_display (dpy); register xXTestFakeInputReq *req; @@ -377,13 +381,13 @@ XTestFakeDeviceButtonEvent(dpy, dev, button, is_press, axes, n_axes, delay) } int -XTestFakeProximityEvent(dpy, dev, in_prox, axes, n_axes, delay) - Display *dpy; - XDevice *dev; - Bool in_prox; - int *axes; - int n_axes; - unsigned long delay; +XTestFakeProximityEvent( + Display *dpy, + XDevice *dev, + Bool in_prox, + int *axes, + int n_axes, + unsigned long delay) { XExtDisplayInfo *info = find_display (dpy); register xXTestFakeInputReq *req; @@ -406,15 +410,14 @@ XTestFakeProximityEvent(dpy, dev, in_prox, axes, n_axes, delay) } int -XTestFakeDeviceMotionEvent(dpy, dev, is_relative, - first_axis, axes, n_axes, delay) - Display *dpy; - XDevice *dev; - Bool is_relative; - int first_axis; - int *axes; - int n_axes; - unsigned long delay; +XTestFakeDeviceMotionEvent( + Display *dpy, + XDevice *dev, + Bool is_relative, + int first_axis, + int *axes, + int n_axes, + unsigned long delay) { XExtDisplayInfo *info = find_display (dpy); register xXTestFakeInputReq *req; @@ -436,9 +439,9 @@ XTestFakeDeviceMotionEvent(dpy, dev, is_relative, } int -XTestGrabControl(dpy, impervious) - Display *dpy; - Bool impervious; +XTestGrabControl( + Display *dpy, + Bool impervious) { XExtDisplayInfo *info = find_display (dpy); register xXTestGrabControlReq *req; @@ -456,17 +459,17 @@ XTestGrabControl(dpy, impervious) } void -XTestSetGContextOfGC(gc, gid) - GC gc; - GContext gid; +XTestSetGContextOfGC( + GC gc, + GContext gid) { gc->gid = gid; } void -XTestSetVisualIDOfVisual(visual, visualid) - Visual *visual; - VisualID visualid; +XTestSetVisualIDOfVisual( + Visual *visual, + VisualID visualid) { visual->visualid = visualid; } @@ -476,8 +479,7 @@ static xReq _dummy_request = { }; Status -XTestDiscard(dpy) - Display *dpy; +XTestDiscard(Display *dpy) { Bool something; register char *ptr; -- 1.5.3.2