Source code of Windows XP (NT5)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

436 lines
6.7 KiB

  1. /*++
  2. Copyright (c) 2000 Microsoft Corporation
  3. Module Name:
  4. tabletpc.h
  5. Abstract: Contains definitions of all constants and data types for the
  6. Tablet PC control panel applet.
  7. Environment:
  8. User mode
  9. Author:
  10. Michael Tsang (MikeTs) 20-Apr-2000
  11. Revision History:
  12. --*/
  13. #ifndef _TABLETPC_H
  14. #define _TABLETPC_H
  15. //
  16. // Constants
  17. //
  18. //
  19. // Macros
  20. //
  21. #define RPC_TRY(n,s) { \
  22. RpcTryExcept \
  23. { \
  24. s; \
  25. } \
  26. RpcExcept(1) \
  27. { \
  28. ErrorMsg(IDSERR_RPC_FAILED, \
  29. n, \
  30. RpcExceptionCode()); \
  31. } \
  32. RpcEndExcept \
  33. }
  34. //
  35. // Type Definitions
  36. //
  37. typedef struct _TABLETPC_PROPPAGE
  38. {
  39. LPCTSTR DlgTemplate;
  40. DLGPROC DlgProc;
  41. HPROPSHEETPAGE hPropSheetPage;
  42. } TABLETPC_PROPPAGE, *PTABLETPC_PROPPAGE;
  43. typedef struct _COMBOBOX_STRING
  44. {
  45. int StringIndex;
  46. UINT StringID;
  47. } COMBOBOX_STRING, *PCOMBOBOX_STRING;
  48. typedef struct _COMBO_MAP
  49. {
  50. UINT ComboBoxID;
  51. int ComboBoxIndex;
  52. } COMBO_MAP, *PCOMBO_MAP;
  53. //
  54. // Global Data Declarations
  55. //
  56. extern HINSTANCE ghInstance;
  57. extern RPC_BINDING_HANDLE ghBinding;
  58. #ifdef SYSACC
  59. extern HANDLE ghSysAcc;
  60. extern HFONT ghFont;
  61. #endif
  62. extern TCHAR gtszTitle[64];
  63. #ifdef PENPAGE
  64. extern TCHAR gtszCalibrate[16];
  65. extern PEN_SETTINGS PenSettings;
  66. #endif
  67. extern GESTURE_SETTINGS gGestureSettings;
  68. //
  69. // Function prototypes
  70. //
  71. // tabletpc.c
  72. BOOL WINAPI
  73. DllInitialize(
  74. IN HINSTANCE hDLLInstance,
  75. IN DWORD dwReason,
  76. IN LPVOID lpvReserved OPTIONAL
  77. );
  78. LONG APIENTRY
  79. CPlApplet(
  80. IN HWND hwnd,
  81. IN UINT uMsg,
  82. IN LONG lParam1,
  83. IN LONG lParam2
  84. );
  85. BOOL
  86. RunApplet(
  87. IN HWND hwnd,
  88. IN LPTSTR CmdLine OPTIONAL
  89. );
  90. UINT
  91. CreatePropertyPages(
  92. IN PTABLETPC_PROPPAGE TabletPCPages,
  93. OUT HPROPSHEETPAGE *hPages
  94. );
  95. VOID
  96. InsertComboBoxStrings(
  97. IN HWND hwnd,
  98. IN UINT ComboBoxID,
  99. IN PCOMBOBOX_STRING ComboString
  100. );
  101. VOID
  102. EnableDlgControls(
  103. IN HWND hwnd,
  104. IN int *piControls,
  105. IN BOOL fEnable
  106. );
  107. #ifdef PENPAGE
  108. // mutohpen.c
  109. INT_PTR APIENTRY
  110. MutohPenDlgProc(
  111. IN HWND hwnd,
  112. IN UINT uMsg,
  113. IN WPARAM wParam,
  114. IN LPARAM lParam
  115. );
  116. BOOL
  117. InitMutohPenPage(
  118. IN HWND hwnd
  119. );
  120. // tiltcal.c
  121. BOOL
  122. CreatePenTiltCalWindow(
  123. IN HWND hwndParent
  124. );
  125. ATOM
  126. RegisterPenTiltCalClass(
  127. IN HINSTANCE hInstance
  128. );
  129. LRESULT CALLBACK
  130. PenTiltCalWndProc(
  131. IN HWND hwnd,
  132. IN UINT uMsg,
  133. IN WPARAM wParam,
  134. IN LPARAM lParam
  135. );
  136. PCALIBRATE_PT
  137. FindVicinity(
  138. IN int x,
  139. IN int y,
  140. IN int offset
  141. );
  142. VOID
  143. DrawTarget(
  144. IN HDC hDC,
  145. IN PCALIBRATE_PT CalPt
  146. );
  147. int
  148. DoPenTiltCal(
  149. IN HWND hwnd,
  150. OUT PLONG pdxPenTilt,
  151. OUT PLONG pdyPenTilt
  152. );
  153. // linCal.c
  154. BOOL
  155. CreateLinearCalWindow(
  156. IN HWND hwndParent
  157. );
  158. ATOM
  159. RegisterLinearCalClass(
  160. IN HINSTANCE hInstance
  161. );
  162. LRESULT CALLBACK
  163. LinearCalWndProc(
  164. IN HWND hwnd,
  165. IN UINT uMsg,
  166. IN WPARAM wParam,
  167. IN LPARAM lParam
  168. );
  169. PCALIBRATE_PT
  170. FindPoint(
  171. IN int x,
  172. IN int y,
  173. IN int offset
  174. );
  175. VOID
  176. DoLinearCal(
  177. IN HWND hwnd,
  178. OUT PLINEAR_MAP LinearityMap
  179. );
  180. VOID
  181. DisplayMap(
  182. IN HWND hwnd,
  183. IN PLINEAR_MAP LinearityMap
  184. );
  185. #endif
  186. #ifdef BUTTONPAGE
  187. // buttons.c
  188. INT_PTR APIENTRY
  189. ButtonsDlgProc(
  190. IN HWND hwnd,
  191. IN UINT uMsg,
  192. IN WPARAM wParam,
  193. IN LPARAM lParam
  194. );
  195. BOOL
  196. InitButtonPage(
  197. IN HWND hwnd
  198. );
  199. int
  200. MapButtonTagIndex(
  201. IN int iButton
  202. );
  203. #endif
  204. // display.c
  205. INT_PTR APIENTRY
  206. DisplayDlgProc(
  207. IN HWND hwnd,
  208. IN UINT uMsg,
  209. IN WPARAM wParam,
  210. IN LPARAM lParam
  211. );
  212. BOOL
  213. InitDisplayPage(
  214. IN HWND hwnd
  215. );
  216. BOOL
  217. __stdcall
  218. SetRotation(
  219. IN DWORD dwRotation
  220. );
  221. DWORD
  222. RotateScreen(
  223. IN DWORD dwRotation
  224. );
  225. VOID
  226. EnumDisplayModes(
  227. VOID
  228. );
  229. BOOL
  230. GetBrightness(
  231. OUT PSMBLITE_BRIGHTNESS Brightness
  232. );
  233. BOOL
  234. SetBrightness(
  235. IN PSMBLITE_BRIGHTNESS Brightness,
  236. IN BOOLEAN fSaveSettings
  237. );
  238. // gesture.c
  239. INT_PTR APIENTRY
  240. GestureDlgProc(
  241. IN HWND hwnd,
  242. IN UINT uMsg,
  243. IN WPARAM wParam,
  244. IN LPARAM lParam
  245. );
  246. BOOL
  247. InitGesturePage(
  248. IN HWND hwnd
  249. );
  250. #ifdef DEBUG
  251. // tuning.c
  252. INT_PTR APIENTRY
  253. TuningDlgProc(
  254. IN HWND hwnd,
  255. IN UINT uMsg,
  256. IN WPARAM wParam,
  257. IN LPARAM lParam
  258. );
  259. BOOL
  260. InitTuningPage(
  261. IN HWND hwnd
  262. );
  263. #endif //ifdef DEBUG
  264. #ifdef SYSACC
  265. // smbdev.c
  266. BOOL
  267. GetSMBDevInfo(
  268. IN UCHAR bDevAddr,
  269. IN PSMBCMD_INFO SmbCmd,
  270. OUT PBYTE pbBuff
  271. );
  272. BOOL
  273. DisplaySMBDevInfo(
  274. IN HWND hwndEdit,
  275. IN PSMBCMD_INFO SmbCmd,
  276. IN PBYTE pbBuff
  277. );
  278. VOID
  279. DisplayDevBits(
  280. IN HWND hwndEdit,
  281. IN DWORD dwBitMask,
  282. IN PSZ *apszBitNames,
  283. IN DWORD dwData
  284. );
  285. VOID
  286. __cdecl
  287. EditPrintf(
  288. IN HWND hwndEdit,
  289. IN PSZ pszFormat,
  290. ...
  291. );
  292. #endif //ifdef SYSACC
  293. #ifdef BATTINFO
  294. // battinfo.c
  295. INT_PTR APIENTRY
  296. BatteryDlgProc(
  297. IN HWND hwnd,
  298. IN UINT uMsg,
  299. IN WPARAM wParam,
  300. IN LPARAM lParam
  301. );
  302. BOOL
  303. InitBatteryPage(
  304. IN HWND hwnd
  305. );
  306. VOID
  307. RefreshBatteryInfo(
  308. IN HWND hwndEdit
  309. );
  310. BOOL
  311. DisplayBatteryInfo(
  312. IN HWND hwndEdit,
  313. IN PSMBCMD_INFO BattCmd,
  314. IN PBYTE pbBuff,
  315. IN BOOL fWatt
  316. );
  317. #endif //ifdef BATTINFO
  318. #ifdef CHGRINFO
  319. // chgrinfo.c
  320. INT_PTR APIENTRY
  321. ChargerDlgProc(
  322. IN HWND hwnd,
  323. IN UINT uMsg,
  324. IN WPARAM wParam,
  325. IN LPARAM lParam
  326. );
  327. BOOL
  328. InitChargerPage(
  329. IN HWND hwnd
  330. );
  331. VOID
  332. RefreshChgrInfo(
  333. IN HWND hwndEdit
  334. );
  335. BOOL
  336. DisplayChgrInfo(
  337. IN HWND hwndEdit,
  338. IN PSMBCMD_INFO TmpCmd,
  339. IN PBYTE pbBuff
  340. );
  341. #endif //ifdef CHGRINFO
  342. #ifdef TMPINFO
  343. // tmpinfo.c
  344. INT_PTR APIENTRY
  345. TemperatureDlgProc(
  346. IN HWND hwnd,
  347. IN UINT uMsg,
  348. IN WPARAM wParam,
  349. IN LPARAM lParam
  350. );
  351. BOOL
  352. InitTemperaturePage(
  353. IN HWND hwnd
  354. );
  355. VOID
  356. RefreshTmpInfo(
  357. IN HWND hwndEdit
  358. );
  359. BOOL
  360. DisplayTmpInfo(
  361. IN HWND hwndEdit,
  362. IN PSMBCMD_INFO TmpCmd,
  363. IN PBYTE pbBuff
  364. );
  365. #endif //ifdef TMPINFO
  366. #endif //ifndef _TABLETPC_H