Added YUV routines needed for v4l driver, and in the future possibly
[wine/gsoc-2012-control.git] / dlls / wintab32 / wintab_internal.h
blobc8511b1e228f6842c4863e07f444987372192130
1 /*
2 * Tablet header
4 * Copyright 2003 CodeWeavers (Aric Stewart)
6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Lesser General Public
8 * License as published by the Free Software Foundation; either
9 * version 2.1 of the License, or (at your option) any later version.
11 * This library is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * Lesser General Public License for more details.
16 * You should have received a copy of the GNU Lesser General Public
17 * License along with this library; if not, write to the Free Software
18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
21 #ifndef __WINE_WINTAB_INTERNAL_H
22 #define __WINE_WINTAB_INTERNAL_H
24 typedef struct tagWTI_INTERFACE_INFO {
25 CHAR WINTABID[1024];
26 /* a copy of the null-terminated tablet hardware identification string
27 * in the user buffer. This string should include make, model, and
28 * revision information in user-readable format.
30 WORD SPECVERSION;
31 /* the specification version number. The high-order byte contains the
32 * major version number; the low-order byte contains the minor version
33 * number.
35 WORD IMPLVERSION;
36 /* the implementation version number. The high-order byte contains the
37 * major version number; the low-order byte contains the minor version
38 * number.
40 UINT NDEVICES;
41 /* the number of devices supported. */
42 UINT NCURSORS;
43 /* the total number of cursor types supported. */
44 UINT NCONTEXTS;
45 /* the number of contexts supported. */
46 UINT CTXOPTIONS;
47 /* flags indicating which context options are supported */
48 UINT CTXSAVESIZE;
49 /* the size of the save information returned from WTSave.*/
50 UINT NEXTENSIONS;
51 /* the number of extension data items supported.*/
52 UINT NMANAGERS;
53 /* the number of manager handles supported.*/
54 }WTI_INTERFACE_INFO, *LPWTI_INTERFACE_INFO;
56 typedef struct tagWTI_STATUS_INFO{
57 UINT CONTEXTS;
58 /* the number of contexts currently open.*/
59 UINT SYSCTXS;
60 /* the number of system contexts currently open.*/
61 UINT PKTRATE;
62 /* the maximum packet report rate currently being received by any
63 * context, in Hertz.
65 WTPKT PKTDATA;
66 /* a mask indicating which packet data items are requested by at
67 * least one context.
69 UINT MANAGERS;
70 /* the number of manager handles currently open.*/
71 BOOL SYSTEM;
72 /* a non-zero value if system pointing is available to the whole
73 * screen; zero otherwise.
75 DWORD BUTTONUSE;
76 /* a button mask indicating the logical buttons whose events are
77 * requested by at least one context.
79 DWORD SYSBTNUSE;
80 /* a button mask indicating which logical buttons are assigned a system
81 * button function by the current cursor's system button map.
83 } WTI_STATUS_INFO, *LPWTI_STATUS_INFO;
85 typedef struct tagWTI_EXTENSIONS_INFO
87 CHAR NAME[256];
88 /* a unique, null-terminated string describing the extension.*/
89 UINT TAG;
90 /* a unique identifier for the extension. */
91 WTPKT MASK;
92 /* a mask that can be bitwise OR'ed with WTPKT-type variables to select
93 * the extension.
95 UINT SIZE[2];
96 /* an array of two UINTs specifying the extension's size within a packet
97 * (in bytes). The first is for absolute mode; the second is for
98 * relative mode.
100 AXIS *AXES;
101 /* an array of axis descriptions, as needed for the extension. */
102 BYTE *DEFAULT;
103 /* the current global default data, as needed for the extension. This
104 * data is modified via the WTMgrExt function.
106 BYTE *DEFCONTEXT;
107 BYTE *DEFSYSCTX;
108 /* the current default context-specific data, as needed for the
109 * extension. The indices identify the digitizing- and system-context
110 * defaults, respectively.
112 BYTE *CURSORS;
113 /* Is the first of one or more consecutive indices, one per cursor type.
114 * Each returns the current default cursor-specific data, as need for
115 * the extension. This data is modified via the WTMgrCsrExt function.
117 } WTI_EXTENSIONS_INFO, *LPWTI_EXTENSIONS_INFO;
119 typedef struct tagWTPACKET {
120 HCTX pkContext;
121 UINT pkStatus;
122 LONG pkTime;
123 WTPKT pkChanged;
124 UINT pkSerialNumber;
125 UINT pkCursor;
126 DWORD pkButtons;
127 DWORD pkX;
128 DWORD pkY;
129 DWORD pkZ;
130 UINT pkNormalPressure;
131 UINT pkTangentPressure;
132 ORIENTATION pkOrientation;
133 ROTATION pkRotation; /* 1.1 */
134 } WTPACKET, *LPWTPACKET;
136 typedef struct tagOPENCONTEXT
138 HCTX handle;
139 LOGCONTEXTA context;
140 HWND hwndOwner;
141 BOOL enabled;
142 INT ActiveCursor;
143 INT QueueSize;
144 INT PacketsQueued;
145 LPWTPACKET PacketQueue;
146 struct tagOPENCONTEXT *next;
147 } OPENCONTEXT, *LPOPENCONTEXT;
149 int TABLET_PostTabletMessage(LPOPENCONTEXT newcontext, UINT msg, WPARAM wParam,
150 LPARAM lParam, BOOL send_always);
151 LPOPENCONTEXT AddPacketToContextQueue(LPWTPACKET packet, HWND hwnd);
152 LPOPENCONTEXT FindOpenContext(HWND hwnd);
154 /* X11drv functions */
155 extern int (*pLoadTabletInfo)(HWND hwnddefault);
156 extern int (*pGetCurrentPacket)(LPWTPACKET packet);
157 extern int (*pAttachEventQueueToTablet)(HWND hOwner);
158 extern UINT (*pWTInfoA)(UINT wCategory, UINT nIndex, LPVOID lpOutput);
160 extern HWND hwndDefault;
161 extern CRITICAL_SECTION csTablet;
163 #endif /* __WINE_WINTAB_INTERNAL_H */