Signed-off-by: Elaine Lefler elaineclefler@gmail.com ---
v2: Splitting into smaller patches as per feedback. --- dlls/winex11.drv/wintab.c | 16 ++++++++-------- dlls/wintab32/context.c | 20 ++++++++++---------- dlls/wintab32/wintab32.c | 6 +++--- dlls/wintab32/wintab_internal.h | 6 +++--- include/wintab.h | 4 ++-- tools/winapi/win32.api | 2 +- 6 files changed, 27 insertions(+), 27 deletions(-)
diff --git a/dlls/winex11.drv/wintab.c b/dlls/winex11.drv/wintab.c index ef9bbc6be45..a157d44807c 100644 --- a/dlls/winex11.drv/wintab.c +++ b/dlls/winex11.drv/wintab.c @@ -248,9 +248,9 @@ static int proximity_in_type; static int proximity_out_type;
static HWND hwndTabletDefault; -static WTPACKET gMsgPacket; +static PACKET gMsgPacket; static DWORD gSerial; -static WTPACKET last_packet; +static PACKET last_packet;
/* Reference: http://www.wacomeng.com/devsupport/ibmpc/gddevpc.html * @@ -828,7 +828,7 @@ static int cursor_from_device(DWORD deviceid, LPWTI_CURSORS_INFO *cursorp) return -1; }
-static DWORD get_changed_state( WTPACKET *pkt) +static DWORD get_changed_state( PACKET *pkt) { DWORD change = 0;
@@ -870,7 +870,7 @@ static BOOL motion_event( HWND hwnd, XEvent *event ) if (curnum < 0) return FALSE;
- memset(&gMsgPacket,0,sizeof(WTPACKET)); + memset(&gMsgPacket,0,sizeof(PACKET));
TRACE("Received tablet motion event (%p); device id %d, cursor num %d\n",hwnd, (int) motion->deviceid, curnum);
@@ -902,7 +902,7 @@ static BOOL button_event( HWND hwnd, XEvent *event ) if (curnum < 0) return FALSE;
- memset(&gMsgPacket,0,sizeof(WTPACKET)); + memset(&gMsgPacket,0,sizeof(PACKET));
TRACE("Received tablet button %s event\n", (event->type == button_press_type)?"press":"release");
@@ -954,7 +954,7 @@ static BOOL proximity_event( HWND hwnd, XEvent *event ) if (curnum < 0) return FALSE;
- memset(&gMsgPacket,0,sizeof(WTPACKET)); + memset(&gMsgPacket,0,sizeof(PACKET));
/* Set cursor to inverted if cursor is the eraser */ gMsgPacket.pkStatus = (cursor->TYPE == CSR_TYPE_ERASER ? TPS_INVERT:0); @@ -1078,7 +1078,7 @@ int CDECL X11DRV_AttachEventQueueToTablet(HWND hOwner) /*********************************************************************** * X11DRV_GetCurrentPacket (X11DRV.@) */ -int CDECL X11DRV_GetCurrentPacket(LPWTPACKET packet) +int CDECL X11DRV_GetCurrentPacket(LPPACKET packet) { *packet = gMsgPacket; return 1; @@ -1539,7 +1539,7 @@ int CDECL X11DRV_AttachEventQueueToTablet(HWND hOwner) /*********************************************************************** * GetCurrentPacket (X11DRV.@) */ -int CDECL X11DRV_GetCurrentPacket(LPWTPACKET packet) +int CDECL X11DRV_GetCurrentPacket(LPPACKET packet) { return 0; } diff --git a/dlls/wintab32/context.c b/dlls/wintab32/context.c index 58ba6b49074..af013073bc4 100644 --- a/dlls/wintab32/context.c +++ b/dlls/wintab32/context.c @@ -100,7 +100,7 @@ static const char* DUMPBITS(int x) return wine_dbg_sprintf("{%s}",buf); }
-static inline void DUMPPACKET(WTPACKET packet) +static inline void DUMPPACKET(PACKET packet) { TRACE("pkContext: %p pkStatus: 0x%x pkTime : 0x%lx pkChanged: 0x%lx pkSerialNumber: 0x%x pkCursor : %i pkButtons: %lx pkX: %li pkY: %li pkZ: %li pkNormalPressure: %i pkTangentPressure: %i pkOrientation: (%i,%i,%i) pkRotation: (%i,%i,%i)\n", packet.pkContext, packet.pkStatus, packet.pkTime, packet.pkChanged, packet.pkSerialNumber, @@ -183,7 +183,7 @@ static inline DWORD ScaleForContext(DWORD In, LONG InOrg, LONG InExt, LONG OutOr return MulDiv(abs(InExt) - (In - InOrg), abs(OutExt), abs(InExt)) + OutOrg; }
-LPOPENCONTEXT AddPacketToContextQueue(LPWTPACKET packet, HWND hwnd) +LPOPENCONTEXT AddPacketToContextQueue(LPPACKET packet, HWND hwnd) { LPOPENCONTEXT ptr=NULL;
@@ -274,7 +274,7 @@ static inline int CopyTabletData(LPVOID target, LPVOID src, INT size) }
static INT TABLET_FindPacket(LPOPENCONTEXT context, UINT wSerial, - LPWTPACKET *pkt) + LPPACKET *pkt) { int loop; int index = -1; @@ -293,7 +293,7 @@ static INT TABLET_FindPacket(LPOPENCONTEXT context, UINT wSerial,
static LPVOID TABLET_CopyPacketData(LPOPENCONTEXT context, LPVOID lpPkt, - LPWTPACKET wtp) + LPPACKET wtp) { LPBYTE ptr;
@@ -470,7 +470,7 @@ HCTX WINAPI WTOpenW(HWND hWnd, LPLOGCONTEXTW lpLogCtx, BOOL fEnable) newcontext->ActiveCursor = -1; newcontext->QueueSize = 10; newcontext->PacketsQueued = 0; - newcontext->PacketQueue=HeapAlloc(GetProcessHeap(),0,sizeof(WTPACKET)*10); + newcontext->PacketQueue=HeapAlloc(GetProcessHeap(),0,sizeof(PACKET)*10);
EnterCriticalSection(&csTablet); newcontext->handle = gTopContext++; @@ -598,7 +598,7 @@ int WINAPI WTPacketsGet(HCTX hCtx, int cMaxPkts, LPVOID lpPkts) if (limit < context->PacketsQueued) { memmove(context->PacketQueue, &context->PacketQueue[limit], - (context->PacketsQueued - (limit))*sizeof(WTPACKET)); + (context->PacketsQueued - (limit))*sizeof(PACKET)); } context->PacketsQueued -= limit; LeaveCriticalSection(&csTablet); @@ -615,7 +615,7 @@ BOOL WINAPI WTPacket(HCTX hCtx, UINT wSerial, LPVOID lpPkt) { int rc = 0; LPOPENCONTEXT context; - LPWTPACKET wtp = NULL; + LPPACKET wtp = NULL;
TRACE("(%p, %d, %p)\n", hCtx, wSerial, lpPkt);
@@ -641,7 +641,7 @@ BOOL WINAPI WTPacket(HCTX hCtx, UINT wSerial, LPVOID lpPkt) if ((rc+1) < context->QueueSize) { memmove(context->PacketQueue, &context->PacketQueue[rc+1], - (context->PacketsQueued - (rc+1))*sizeof(WTPACKET)); + (context->PacketsQueued - (rc+1))*sizeof(PACKET)); } context->PacketsQueued -= (rc+1); } @@ -990,7 +990,7 @@ int WINAPI WTDataGet(HCTX hCtx, UINT wBegin, UINT wEnd, /* remove read packets */ if ((end+1) < context->PacketsQueued) memmove( &context->PacketQueue[bgn], &context->PacketQueue[end+1], - (context->PacketsQueued - (end+1)) * sizeof (WTPACKET)); + (context->PacketsQueued - (end+1)) * sizeof (PACKET));
context->PacketsQueued -= ((end-bgn)+1); *lpNPkts = ((end-bgn)+1); @@ -1125,7 +1125,7 @@ BOOL WINAPI WTQueueSizeSet(HCTX hCtx, int nPkts) }
context->PacketQueue = HeapReAlloc(GetProcessHeap(), 0, - context->PacketQueue, sizeof(WTPACKET)*nPkts); + context->PacketQueue, sizeof(PACKET)*nPkts);
context->QueueSize = nPkts; LeaveCriticalSection(&csTablet); diff --git a/dlls/wintab32/wintab32.c b/dlls/wintab32/wintab32.c index b13c0573454..416398a2633 100644 --- a/dlls/wintab32/wintab32.c +++ b/dlls/wintab32/wintab32.c @@ -43,7 +43,7 @@ static CRITICAL_SECTION_DEBUG csTablet_debug = CRITICAL_SECTION csTablet = { &csTablet_debug, -1, 0, 0, 0, 0 };
int (CDECL *pLoadTabletInfo)(HWND hwnddefault) = NULL; -int (CDECL *pGetCurrentPacket)(LPWTPACKET packet) = NULL; +int (CDECL *pGetCurrentPacket)(LPPACKET packet) = NULL; int (CDECL *pAttachEventQueueToTablet)(HWND hOwner) = NULL; UINT (CDECL *pWTInfoW)(UINT wCategory, UINT nIndex, LPVOID lpOutput) = NULL;
@@ -143,7 +143,7 @@ static LRESULT WINAPI TABLET_WindowProc(HWND hwnd, UINT uMsg, WPARAM wParam,
case WT_PACKET: { - WTPACKET packet; + PACKET packet; LPOPENCONTEXT handler; if (pGetCurrentPacket) { @@ -158,7 +158,7 @@ static LRESULT WINAPI TABLET_WindowProc(HWND hwnd, UINT uMsg, WPARAM wParam, } case WT_PROXIMITY: { - WTPACKET packet; + PACKET packet; LPOPENCONTEXT handler; if (pGetCurrentPacket) { diff --git a/dlls/wintab32/wintab_internal.h b/dlls/wintab32/wintab_internal.h index 3b31d021f66..09a5c5098f3 100644 --- a/dlls/wintab32/wintab_internal.h +++ b/dlls/wintab32/wintab_internal.h @@ -125,17 +125,17 @@ typedef struct tagOPENCONTEXT INT ActiveCursor; INT QueueSize; INT PacketsQueued; - LPWTPACKET PacketQueue; + LPPACKET PacketQueue; struct tagOPENCONTEXT *next; } OPENCONTEXT, *LPOPENCONTEXT;
int TABLET_PostTabletMessage(LPOPENCONTEXT newcontext, UINT msg, WPARAM wParam, LPARAM lParam, BOOL send_always) DECLSPEC_HIDDEN; -LPOPENCONTEXT AddPacketToContextQueue(LPWTPACKET packet, HWND hwnd) DECLSPEC_HIDDEN; +LPOPENCONTEXT AddPacketToContextQueue(LPPACKET packet, HWND hwnd) DECLSPEC_HIDDEN;
/* X11drv functions */ extern int (CDECL *pLoadTabletInfo)(HWND hwnddefault) DECLSPEC_HIDDEN; -extern int (CDECL *pGetCurrentPacket)(LPWTPACKET packet) DECLSPEC_HIDDEN; +extern int (CDECL *pGetCurrentPacket)(LPPACKET packet) DECLSPEC_HIDDEN; extern int (CDECL *pAttachEventQueueToTablet)(HWND hOwner) DECLSPEC_HIDDEN; extern UINT (CDECL *pWTInfoW)(UINT wCategory, UINT nIndex, LPVOID lpOutput) DECLSPEC_HIDDEN;
diff --git a/include/wintab.h b/include/wintab.h index 9f607bbe7ef..d1298b9c20b 100644 --- a/include/wintab.h +++ b/include/wintab.h @@ -491,7 +491,7 @@ typedef struct tagROTATION { /* 1.1 */ #define TBN_UP 1 #define TBN_DOWN 2
-typedef struct tagWTPACKET { +typedef struct tagPACKET { HCTX pkContext; UINT pkStatus; LONG pkTime; @@ -506,7 +506,7 @@ typedef struct tagWTPACKET { UINT pkTangentPressure; ORIENTATION pkOrientation; ROTATION pkRotation; /* 1.1 */ -} WTPACKET, *LPWTPACKET; +} PACKET, *LPPACKET;
/*********************************************************************** * DEVICE CONFIG CONSTANTS diff --git a/tools/winapi/win32.api b/tools/winapi/win32.api index 5f3dd85cc93..49116614a4b 100644 --- a/tools/winapi/win32.api +++ b/tools/winapi/win32.api @@ -5756,7 +5756,7 @@ LPPOINT LPRECT LPSIZE LPVOID -LPWTPACKET * +LPPACKET * MONITORENUMPROC PIXELFORMATDESCRIPTOR * POINT *