penwin.h 48 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929
  1. /**
  2. * This file has no copyright assigned and is placed in the Public Domain.
  3. * This file is part of the mingw-w64 runtime package.
  4. * No warranty is given; refer to the file DISCLAIMER.PD within this package.
  5. */
  6. #ifndef _INC_PENWIN
  7. #define _INC_PENWIN
  8. #ifndef NOJAPAN
  9. #ifndef JAPAN
  10. #define JAPAN
  11. #endif
  12. #endif
  13. #include <windows.h>
  14. #ifdef __cplusplus
  15. extern "C" {
  16. #endif
  17. #ifndef PENVER
  18. #define PENVER 0x0200
  19. #endif
  20. #define NOPENAPPS
  21. #define NOPENDICT
  22. #define NOPENRC1
  23. #define NOPENVIRTEVENT
  24. #define NOPENAPIFUN
  25. #ifndef NOPENAPPS
  26. #ifndef RC_INVOKED
  27. #include <skbapi.h>
  28. #endif
  29. #endif
  30. #ifdef NOPENCTL
  31. #define NOPENBEDIT
  32. #define NOPENIEDIT
  33. #endif
  34. #ifdef NOPENRES
  35. #define NOPENBMP
  36. #define NOPENCURS
  37. #endif
  38. #ifndef NOPENALC
  39. #define ALC_DEFAULT __MSABI_LONG(0x00000000)
  40. #define ALC_LCALPHA __MSABI_LONG(0x00000001)
  41. #define ALC_UCALPHA __MSABI_LONG(0x00000002)
  42. #define ALC_NUMERIC __MSABI_LONG(0x00000004)
  43. #define ALC_PUNC __MSABI_LONG(0x00000008)
  44. #define ALC_MATH __MSABI_LONG(0x00000010)
  45. #define ALC_MONETARY __MSABI_LONG(0x00000020)
  46. #define ALC_OTHER __MSABI_LONG(0x00000040)
  47. #define ALC_ASCII __MSABI_LONG(0x00000080)
  48. #define ALC_WHITE __MSABI_LONG(0x00000100)
  49. #define ALC_NONPRINT __MSABI_LONG(0x00000200)
  50. #define ALC_DBCS __MSABI_LONG(0x00000400)
  51. #define ALC_JIS1 __MSABI_LONG(0x00000800)
  52. #define ALC_GESTURE __MSABI_LONG(0x00004000)
  53. #define ALC_USEBITMAP __MSABI_LONG(0x00008000)
  54. #define ALC_HIRAGANA __MSABI_LONG(0x00010000)
  55. #define ALC_KATAKANA __MSABI_LONG(0x00020000)
  56. #define ALC_KANJI __MSABI_LONG(0x00040000)
  57. #define ALC_GLOBALPRIORITY __MSABI_LONG(0x10000000)
  58. #define ALC_OEM __MSABI_LONG(0x0FF80000)
  59. #define ALC_RESERVED __MSABI_LONG(0xE0003000)
  60. #define ALC_NOPRIORITY __MSABI_LONG(0x00000000)
  61. #define ALC_ALPHA (ALC_LCALPHA | ALC_UCALPHA)
  62. #define ALC_ALPHANUMERIC (ALC_ALPHA | ALC_NUMERIC)
  63. #define ALC_SYSMINIMUM (ALC_ALPHANUMERIC | ALC_PUNC | ALC_WHITE | ALC_GESTURE)
  64. #define ALC_ALL (ALC_SYSMINIMUM | ALC_MATH | ALC_MONETARY | ALC_OTHER | ALC_NONPRINT)
  65. #define ALC_KANJISYSMINIMUM (ALC_SYSMINIMUM | ALC_HIRAGANA | ALC_KATAKANA | ALC_JIS1)
  66. #define ALC_KANJIALL (ALC_ALL | ALC_HIRAGANA | ALC_KATAKANA | ALC_KANJI)
  67. #endif
  68. #ifndef NOPENBEDIT
  69. #define BXS_NONE 0x0000U
  70. #define BXS_RECT 0x0001U
  71. #define BXS_BOXCROSS 0x0004U
  72. #ifdef JAPAN
  73. #define BXS_NOWRITING 0x0008U
  74. #endif
  75. #endif
  76. #ifndef NOPENBMP
  77. #define OBM_SKBBTNUP 32767
  78. #define OBM_SKBBTNDOWN 32766
  79. #define OBM_SKBBTNDISABLED 32765
  80. #define OBM_ZENBTNUP 32764
  81. #define OBM_ZENBTNDOWN 32763
  82. #define OBM_ZENBTNDISABLED 32762
  83. #define OBM_HANBTNUP 32761
  84. #define OBM_HANBTNDOWN 32760
  85. #define OBM_HANBTNDISABLED 32759
  86. #define OBM_KKCBTNUP 32758
  87. #define OBM_KKCBTNDOWN 32757
  88. #define OBM_KKCBTNDISABLED 32756
  89. #define OBM_SIPBTNUP 32755
  90. #define OBM_SIPBTNDOWN 32754
  91. #define OBM_SIPBTNDISABLED 32753
  92. #define OBM_PTYBTNUP 32752
  93. #define OBM_PTYBTNDOWN 32751
  94. #define OBM_PTYBTNDISABLED 32750
  95. #endif
  96. #ifndef NOPENCURS
  97. #define IDC_PEN MAKEINTRESOURCE(32631)
  98. #define IDC_ALTSELECT MAKEINTRESOURCE(32501)
  99. #endif
  100. #ifndef NOPENHRC
  101. #define SYV_NULL __MSABI_LONG(0x00000000)
  102. #define SYV_UNKNOWN __MSABI_LONG(0x00000001)
  103. #define SYV_EMPTY __MSABI_LONG(0x00000003)
  104. #define SYV_BEGINOR __MSABI_LONG(0x00000010)
  105. #define SYV_ENDOR __MSABI_LONG(0x00000011)
  106. #define SYV_OR __MSABI_LONG(0x00000012)
  107. #define SYV_SOFTNEWLINE __MSABI_LONG(0x00000020)
  108. #define SYV_SPACENULL __MSABI_LONG(0x00010000)
  109. #define SYV_SELECTFIRST __MSABI_LONG(0x0002FFC0)
  110. #define SYV_LASSO __MSABI_LONG(0x0002FFC1)
  111. #define SYV_SELECTLEFT __MSABI_LONG(0x0002FFC2)
  112. #define SYV_SELECTRIGHT __MSABI_LONG(0x0002FFC3)
  113. #define SYV_SELECTLAST __MSABI_LONG(0x0002FFCF)
  114. #define SYV_CLEARCHAR __MSABI_LONG(0x0002FFD2)
  115. #define SYV_HELP __MSABI_LONG(0x0002FFD3)
  116. #define SYV_KKCONVERT __MSABI_LONG(0x0002FFD4)
  117. #define SYV_CLEAR __MSABI_LONG(0x0002FFD5)
  118. #define SYV_INSERT __MSABI_LONG(0x0002FFD6)
  119. #define SYV_CONTEXT __MSABI_LONG(0x0002FFD7)
  120. #define SYV_EXTENDSELECT __MSABI_LONG(0x0002FFD8)
  121. #define SYV_UNDO __MSABI_LONG(0x0002FFD9)
  122. #define SYV_COPY __MSABI_LONG(0x0002FFDA)
  123. #define SYV_CUT __MSABI_LONG(0x0002FFDB)
  124. #define SYV_PASTE __MSABI_LONG(0x0002FFDC)
  125. #define SYV_CLEARWORD __MSABI_LONG(0x0002FFDD)
  126. #define SYV_USER __MSABI_LONG(0x0002FFDE)
  127. #define SYV_CORRECT __MSABI_LONG(0x0002FFDF)
  128. #define SYV_BACKSPACE __MSABI_LONG(0x00020008)
  129. #define SYV_TAB __MSABI_LONG(0x00020009)
  130. #define SYV_RETURN __MSABI_LONG(0x0002000D)
  131. #define SYV_SPACE __MSABI_LONG(0x00020020)
  132. #define SYV_APPGESTUREMASK __MSABI_LONG(0x00020000)
  133. #define SYV_CIRCLEUPA __MSABI_LONG(0x000224B6)
  134. #define SYV_CIRCLEUPZ __MSABI_LONG(0x000224CF)
  135. #define SYV_CIRCLELOA __MSABI_LONG(0x000224D0)
  136. #define SYV_CIRCLELOZ __MSABI_LONG(0x000224E9)
  137. #define SYV_SHAPELINE __MSABI_LONG(0x00040001)
  138. #define SYV_SHAPEELLIPSE __MSABI_LONG(0x00040002)
  139. #define SYV_SHAPERECT __MSABI_LONG(0x00040003)
  140. #define SYV_SHAPEMIN SYV_SHAPELINE
  141. #define SYV_SHAPEMAX SYV_SHAPERECT
  142. #define SYVHI_SPECIAL 0
  143. #define SYVHI_ANSI 1
  144. #define SYVHI_GESTURE 2
  145. #define SYVHI_KANJI 3
  146. #define SYVHI_SHAPE 4
  147. #define SYVHI_UNICODE 5
  148. #define SYVHI_VKEY 6
  149. #endif
  150. #ifndef NOPENIEDIT
  151. #define IEM_UNDO 1
  152. #define IEM_CUT 2
  153. #define IEM_COPY 3
  154. #define IEM_PASTE 4
  155. #define IEM_CLEAR 5
  156. #define IEM_SELECTALL 6
  157. #define IEM_ERASE 7
  158. #define IEM_PROPERTIES 8
  159. #define IEM_LASSO 9
  160. #define IEM_RESIZE 10
  161. #define IEM_USER 100
  162. #define IES_BORDER 0x0001
  163. #define IES_HSCROLL 0x0002
  164. #define IES_VSCROLL 0x0004
  165. #define IES_OWNERDRAW 0x0008
  166. #endif
  167. #ifndef RC_INVOKED
  168. #ifndef NOPENDATA
  169. #define AI_CBSTROKE 0xFFFF
  170. #define AI_SKIPUPSTROKES 0x0001
  171. #define CMPD_COMPRESS 0x0001
  172. #define CMPD_DECOMPRESS 0x0002
  173. #define CPDR_BOX 1
  174. #define CPDR_LASSO 2
  175. #define CPD_DEFAULT 0x047F
  176. #define CPD_USERBYTE 0x0100
  177. #define CPD_USERWORD 0x0200
  178. #define CPD_USERDWORD 0x0300
  179. #define CPD_TIME 0x0400
  180. #define DPD_HDCPEN 0x0001
  181. #define DPD_DRAWSEL 0x0002
  182. #define EPDP_REMOVE 0x0001
  183. #define EPDS_SELECT 1
  184. #define EPDS_STROKEINDEX 2
  185. #define EPDS_USER 3
  186. #define EPDS_PENTIP 4
  187. #define EPDS_TIPCOLOR 5
  188. #define EPDS_TIPWIDTH 6
  189. #define EPDS_TIPNIB 7
  190. #define EPDS_INKSET 8
  191. #define EPDS_EQ 0x0000
  192. #define EPDS_LT 0x0010
  193. #define EPDS_GT 0x0020
  194. #define EPDS_NOT 0x0040
  195. #define EPDS_NE 0x0040
  196. #define EPDS_GTE 0x0050
  197. #define EPDS_LTE 0x0060
  198. #define EPDS_REMOVE 0x8000
  199. #define GPA_MAXLEN 1
  200. #define GPA_POINTS 2
  201. #define GPA_PDTS 3
  202. #define GPA_RATE 4
  203. #define GPA_RECTBOUND 5
  204. #define GPA_RECTBOUNDINK 6
  205. #define GPA_SIZE 7
  206. #define GPA_STROKES 8
  207. #define GPA_TIME 9
  208. #define GPA_USER 10
  209. #define GPA_VERSION 11
  210. #define GSA_PENTIP 1
  211. #define GSA_PENTIPCLASS 2
  212. #define GSA_USER 3
  213. #define GSA_USERCLASS 4
  214. #define GSA_TIME 5
  215. #define GSA_SIZE 6
  216. #define GSA_SELECT 7
  217. #define GSA_DOWN 8
  218. #define GSA_RECTBOUND 9
  219. #define GSA_PENTIPTABLE 10
  220. #define GSA_SIZETABLE 11
  221. #define GSA_USERTABLE 12
  222. #ifndef IX_END
  223. #define IX_END 0xFFFF
  224. #endif
  225. #define PENTIP_NIBDEFAULT ((BYTE)0)
  226. #define PENTIP_HEIGHTDEFAULT ((BYTE)0)
  227. #define PENTIP_OPAQUE ((BYTE)0xFF)
  228. #define PENTIP_HILITE ((BYTE)0x80)
  229. #define PENTIP_TRANSPARENT ((BYTE)0)
  230. #define PDR_NOHIT 3
  231. #define PDR_HIT 2
  232. #define PDR_OK 1
  233. #define PDR_CANCEL 0
  234. #define PDR_ERROR (-1)
  235. #define PDR_PNDTERR (-2)
  236. #define PDR_VERSIONERR (-3)
  237. #define PDR_COMPRESSED (-4)
  238. #define PDR_STRKINDEXERR (-5)
  239. #define PDR_PNTINDEXERR (-6)
  240. #define PDR_MEMERR (-7)
  241. #define PDR_INKSETERR (-8)
  242. #define PDR_ABORT (-9)
  243. #define PDR_NA (-10)
  244. #define PDR_USERDATAERR (-16)
  245. #define PDR_SCALINGERR (-17)
  246. #define PDR_TIMESTAMPERR (-18)
  247. #define PDR_OEMDATAERR (-19)
  248. #define PDR_SCTERR (-20)
  249. #define PDTS_LOMETRIC 0
  250. #define PDTS_HIMETRIC 1
  251. #define PDTS_HIENGLISH 2
  252. #define PDTS_STANDARDSCALE 2
  253. #define PDTS_DISPLAY 3
  254. #define PDTS_ARBITRARY 4
  255. #define PDTS_SCALEMASK 0x000F
  256. #define PDTT_DEFAULT 0x0000
  257. #define PDTT_PENINFO 0x0100
  258. #define PDTT_UPPOINTS 0x0200
  259. #define PDTT_OEMDATA 0x0400
  260. #define PDTT_COLLINEAR 0x0800
  261. #define PDTT_COLINEAR 0x0800
  262. #define PDTT_DECOMPRESS 0x4000
  263. #define PDTT_COMPRESS 0x8000
  264. #define PDTT_ALL 0x0F00
  265. #define PHW_NONE 0x0000
  266. #define PHW_PRESSURE 0x0001
  267. #define PHW_HEIGHT 0x0002
  268. #define PHW_ANGLEXY 0x0004
  269. #define PHW_ANGLEZ 0x0008
  270. #define PHW_BARRELROTATION 0x0010
  271. #define PHW_OEMSPECIFIC 0x0020
  272. #define PHW_PDK 0x0040
  273. #define PHW_ALL 0x007F
  274. #define PDTS_COMPRESS2NDDERIV 0x0010
  275. #define PDTS_COMPRESSMETHOD 0x00F0
  276. #define PDTS_NOPENINFO 0x0100
  277. #define PDTS_NOUPPOINTS 0x0200
  278. #define PDTS_NOOEMDATA 0x0400
  279. #define PDTS_NOCOLLINEAR 0x0800
  280. #define PDTS_NOCOLINEAR 0x0800
  281. #define PDTS_NOTICK 0x1000
  282. #define PDTS_NOUSER 0x2000
  283. #define PDTS_NOEMPTYSTROKES 0x4000
  284. #define PDTS_COMPRESSED 0x8000
  285. #define SSA_PENTIP 1
  286. #define SSA_PENTIPCLASS 2
  287. #define SSA_USER 3
  288. #define SSA_USERCLASS 4
  289. #define SSA_TIME 5
  290. #define SSA_SELECT 6
  291. #define SSA_DOWN 7
  292. #define SSA_PENTIPTABLE 8
  293. #define SSA_USERTABLE 9
  294. #define TIP_ERASECOLOR 1
  295. #define TPD_RECALCSIZE 0x0000
  296. #define TPD_USER 0x0080
  297. #define TPD_TIME 0x0100
  298. #define TPD_UPPOINTS 0x0200
  299. #define TPD_COLLINEAR 0x0400
  300. #define TPD_COLINEAR 0x0400
  301. #define TPD_PENINFO 0x0800
  302. #define TPD_PHW 0x1000
  303. #define TPD_OEMDATA 0x1000
  304. #define TPD_EMPTYSTROKES 0x2000
  305. #define TPD_EVERYTHING 0x3FFF
  306. #endif
  307. #ifndef NOPENDICT
  308. #define cbDictPathMax 255
  309. #define DIRQ_QUERY 1
  310. #define DIRQ_DESCRIPTION 2
  311. #define DIRQ_CONFIGURE 3
  312. #define DIRQ_OPEN 4
  313. #define DIRQ_CLOSE 5
  314. #define DIRQ_SETWORDLISTS 6
  315. #define DIRQ_STRING 7
  316. #define DIRQ_SUGGEST 8
  317. #define DIRQ_ADD 9
  318. #define DIRQ_DELETE 10
  319. #define DIRQ_FLUSH 11
  320. #define DIRQ_RCCHANGE 12
  321. #define DIRQ_SYMBOLGRAPH 13
  322. #define DIRQ_INIT 14
  323. #define DIRQ_CLEANUP 15
  324. #define DIRQ_COPYRIGHT 16
  325. #define DIRQ_USER 4096
  326. #endif
  327. #ifndef NOPENDRIVER
  328. #define BITPENUP 0x8000
  329. #define DRV_SetPenDriverEntryPoints DRV_RESERVED+1
  330. #define DRV_SetEntryPoints DRV_RESERVED+1
  331. #define DRV_RemovePenDriverEntryPoints DRV_RESERVED+2
  332. #define DRV_RemoveEntryPoints DRV_RESERVED+2
  333. #define DRV_SetPenSamplingRate DRV_RESERVED+3
  334. #define DRV_SetPenSamplingDist DRV_RESERVED+4
  335. #define DRV_GetName DRV_RESERVED+5
  336. #define DRV_GetVersion DRV_RESERVED+6
  337. #define DRV_GetPenInfo DRV_RESERVED+7
  338. #define DRV_PenPlayStart DRV_RESERVED+8
  339. #define DRV_PenPlayBack DRV_RESERVED+9
  340. #define DRV_PenPlayStop DRV_RESERVED+10
  341. #define DRV_GetCalibration DRV_RESERVED+11
  342. #define DRV_SetCalibration DRV_RESERVED+12
  343. #define DRV_Reserved1 DRV_RESERVED+13
  344. #define DRV_Reserved2 DRV_RESERVED+14
  345. #define DRV_Query DRV_RESERVED+15
  346. #define DRV_GetPenSamplingRate DRV_RESERVED+16
  347. #define DRV_Calibrate DRV_RESERVED+17
  348. #define PLAY_VERSION_10_DATA 0
  349. #define PLAY_VERSION_20_DATA 1
  350. #define DRV_FAILURE 0x00000000
  351. #define DRV_SUCCESS 0x00000001
  352. #define DRV_BADPARAM1 0xFFFFFFFF
  353. #define DRV_BADPARAM2 0xFFFFFFFE
  354. #define DRV_BADSTRUCT 0xFFFFFFFD
  355. #define PENREG_DEFAULT 0x00000002
  356. #define PENREG_WILLHANDLEMOUSE 0x00000001
  357. #define MAXOEMDATAWORDS 6
  358. #define PCM_PENUP __MSABI_LONG(0x00000001)
  359. #define PCM_RANGE __MSABI_LONG(0x00000002)
  360. #define PCM_INVERT __MSABI_LONG(0x00000020)
  361. #define PCM_RECTEXCLUDE __MSABI_LONG(0x00002000)
  362. #define PCM_RECTBOUND __MSABI_LONG(0x00004000)
  363. #define PCM_TIMEOUT __MSABI_LONG(0x00008000)
  364. #define PCM_RGNBOUND __MSABI_LONG(0x00010000)
  365. #define PCM_RGNEXCLUDE __MSABI_LONG(0x00020000)
  366. #define PCM_DOPOLLING __MSABI_LONG(0x00040000)
  367. #define PCM_TAPNHOLD __MSABI_LONG(0x00080000)
  368. #define PCM_ADDDEFAULTS RC_LDEFAULTFLAGS
  369. #define PDC_INTEGRATED __MSABI_LONG(0x00000001)
  370. #define PDC_PROXIMITY __MSABI_LONG(0x00000002)
  371. #define PDC_RANGE __MSABI_LONG(0x00000004)
  372. #define PDC_INVERT __MSABI_LONG(0x00000008)
  373. #define PDC_RELATIVE __MSABI_LONG(0x00000010)
  374. #define PDC_BARREL1 __MSABI_LONG(0x00000020)
  375. #define PDC_BARREL2 __MSABI_LONG(0x00000040)
  376. #define PDC_BARREL3 __MSABI_LONG(0x00000080)
  377. #define PDK_NULL 0x0000
  378. #define PDK_UP 0x0000
  379. #define PDK_DOWN 0x0001
  380. #define PDK_BARREL1 0x0002
  381. #define PDK_BARREL2 0x0004
  382. #define PDK_BARREL3 0x0008
  383. #define PDK_SWITCHES 0x000f
  384. #define PDK_TRANSITION 0x0010
  385. #define PDK_UNUSED10 0x0020
  386. #define PDK_UNUSED20 0x0040
  387. #define PDK_INVERTED 0x0080
  388. #define PDK_PENIDMASK 0x0F00
  389. #define PDK_UNUSED1000 0x1000
  390. #define PDK_INKSTOPPED 0x2000
  391. #define PDK_OUTOFRANGE 0x4000
  392. #define PDK_DRIVER 0x8000
  393. #define PDK_TIPMASK 0x0001
  394. #define PDT_NULL 0
  395. #define PDT_PRESSURE 1
  396. #define PDT_HEIGHT 2
  397. #define PDT_ANGLEXY 3
  398. #define PDT_ANGLEZ 4
  399. #define PDT_BARRELROTATION 5
  400. #define PDT_OEMSPECIFIC 16
  401. #define PID_CURRENT (UINT)(-1)
  402. #define REC_OEM (-1024)
  403. #define REC_LANGUAGE (-48)
  404. #define REC_GUIDE (-47)
  405. #define REC_PARAMERROR (-46)
  406. #define REC_INVALIDREF (-45)
  407. #define REC_RECTEXCLUDE (-44)
  408. #define REC_RECTBOUND (-43)
  409. #define REC_PCM (-42)
  410. #define REC_RESULTMODE (-41)
  411. #define REC_HWND (-40)
  412. #define REC_ALC (-39)
  413. #define REC_ERRORLEVEL (-38)
  414. #define REC_CLVERIFY (-37)
  415. #define REC_DICT (-36)
  416. #define REC_HREC (-35)
  417. #define REC_BADEVENTREF (-33)
  418. #define REC_NOCOLLECTION (-32)
  419. #define REC_DEBUG (-32)
  420. #define REC_POINTEREVENT (-31)
  421. #define REC_BADHPENDATA (-9)
  422. #define REC_OOM (-8)
  423. #define REC_NOINPUT (-7)
  424. #define REC_NOTABLET (-6)
  425. #define REC_BUSY (-5)
  426. #define REC_BUFFERTOOSMALL (-4)
  427. #define REC_ABORT (-3)
  428. #define REC_NA (-2)
  429. #define REC_OVERFLOW (-1)
  430. #define REC_OK 0
  431. #define REC_TERMBOUND 1
  432. #define REC_TERMEX 2
  433. #define REC_TERMPENUP 3
  434. #define REC_TERMRANGE 4
  435. #define REC_TERMTIMEOUT 5
  436. #define REC_DONE 6
  437. #define REC_TERMOEM 512
  438. #endif
  439. #ifndef NOPENHRC
  440. #define GRH_ALL 0
  441. #define GRH_GESTURE 1
  442. #define GRH_NONGESTURE 2
  443. #ifdef JAPAN
  444. #define GST_SEL __MSABI_LONG(0x00000001)
  445. #define GST_CLIP __MSABI_LONG(0x00000002)
  446. #define GST_WHITE __MSABI_LONG(0x00000004)
  447. #define GST_KKCONVERT __MSABI_LONG(0x00000008)
  448. #define GST_EDIT __MSABI_LONG(0x00000010)
  449. #define GST_SYS __MSABI_LONG(0x0000001F)
  450. #define GST_CIRCLELO __MSABI_LONG(0x00000100)
  451. #define GST_CIRCLEUP __MSABI_LONG(0x00000200)
  452. #define GST_CIRCLE __MSABI_LONG(0x00000300)
  453. #define GST_ALL __MSABI_LONG(0x0000031F)
  454. #else
  455. #define GST_SEL __MSABI_LONG(0x00000001)
  456. #define GST_CLIP __MSABI_LONG(0x00000002)
  457. #define GST_WHITE __MSABI_LONG(0x00000004)
  458. #define GST_EDIT __MSABI_LONG(0x00000010)
  459. #define GST_SYS __MSABI_LONG(0x00000017)
  460. #define GST_CIRCLELO __MSABI_LONG(0x00000100)
  461. #define GST_CIRCLEUP __MSABI_LONG(0x00000200)
  462. #define GST_CIRCLE __MSABI_LONG(0x00000300)
  463. #define GST_ALL __MSABI_LONG(0x00000317)
  464. #endif
  465. #define HRCR_NORESULTS 4
  466. #define HRCR_COMPLETE 3
  467. #define HRCR_GESTURE 2
  468. #define HRCR_OK 1
  469. #define HRCR_INCOMPLETE 0
  470. #define HRCR_ERROR (-1)
  471. #define HRCR_MEMERR (-2)
  472. #define HRCR_INVALIDGUIDE (-3)
  473. #define HRCR_INVALIDPNDT (-4)
  474. #define HRCR_UNSUPPORTED (-5)
  475. #define HRCR_CONFLICT (-6)
  476. #define HRCR_HOOKED (-8)
  477. #define HWL_SYSTEM ((HWL)1)
  478. #define ISR_ERROR (-1)
  479. #define ISR_BADINKSET (-2)
  480. #define ISR_BADINDEX (-3)
  481. #ifndef IX_END
  482. #define IX_END 0xFFFF
  483. #endif
  484. #define MAXHOTSPOT 8
  485. #define PH_MAX __MSABI_LONG(0xFFFFFFFF)
  486. #define PH_DEFAULT __MSABI_LONG(0xFFFFFFFE)
  487. #define PH_MIN __MSABI_LONG(0xFFFFFFFD)
  488. #define RHH_STD 0
  489. #define RHH_BOX 1
  490. #define SCH_NONE 0
  491. #define SCH_ADVISE 1
  492. #define SCH_FORCE 2
  493. #define SCIM_INSERT 0
  494. #define SCIM_OVERWRITE 1
  495. #define SRH_HOOKALL (HREC)1
  496. #define SSH_RD 1
  497. #define SSH_RU 2
  498. #define SSH_LD 3
  499. #define SSH_LU 4
  500. #define SSH_DL 5
  501. #define SSH_DR 6
  502. #define SSH_UL 7
  503. #define SSH_UR 8
  504. #define SIH_ALLANSICHAR 1
  505. #define TH_QUERY 0
  506. #define TH_FORCE 1
  507. #define TH_SUGGEST 2
  508. #define TRAIN_NONE 0x0000
  509. #define TRAIN_DEFAULT 0x0001
  510. #define TRAIN_CUSTOM 0x0002
  511. #define TRAIN_BOTH (TRAIN_DEFAULT | TRAIN_CUSTOM)
  512. #define TRAIN_SAVE 0
  513. #define TRAIN_REVERT 1
  514. #define TRAIN_RESET 2
  515. #define WCR_RECOGNAME 0
  516. #define WCR_QUERY 1
  517. #define WCR_CONFIGDIALOG 2
  518. #define WCR_DEFAULT 3
  519. #define WCR_RCCHANGE 4
  520. #define WCR_VERSION 5
  521. #define WCR_TRAIN 6
  522. #define WCR_TRAINSAVE 7
  523. #define WCR_TRAINMAX 8
  524. #define WCR_TRAINDIRTY 9
  525. #define WCR_TRAINCUSTOM 10
  526. #define WCR_QUERYLANGUAGE 11
  527. #define WCR_USERCHANGE 12
  528. #define WCR_PWVERSION 13
  529. #define WCR_GETALCPRIORITY 14
  530. #define WCR_SETALCPRIORITY 15
  531. #define WCR_GETANSISTATE 16
  532. #define WCR_SETANSISTATE 17
  533. #define WCR_GETHAND 18
  534. #define WCR_SETHAND 19
  535. #define WCR_GETDIRECTION 20
  536. #define WCR_SETDIRECTION 21
  537. #define WCR_INITRECOGNIZER 22
  538. #define WCR_CLOSERECOGNIZER 23
  539. #define WCR_PRIVATE 1024
  540. #define CRUC_NOTIFY 0
  541. #define CRUC_REMOVE 1
  542. #define WLT_STRING 0
  543. #define WLT_STRINGTABLE 1
  544. #define WLT_EMPTY 2
  545. #define WLT_WORDLIST 3
  546. #endif
  547. #ifndef NOPENIEDIT
  548. #define IEB_DEFAULT 0
  549. #define IEB_BRUSH 1
  550. #define IEB_BIT_UL 2
  551. #define IEB_BIT_CENTER 3
  552. #define IEB_BIT_TILE 4
  553. #define IEB_BIT_STRETCH 5
  554. #define IEB_OWNERDRAW 6
  555. #define IEDO_NONE 0x0000
  556. #define IEDO_FAST 0x0001
  557. #define IEDO_SAVEUPSTROKES 0x0002
  558. #define IEDO_RESERVED 0xFFFC
  559. #define IEI_MOVE 0x0001
  560. #define IEI_RESIZE 0x0002
  561. #define IEI_CROP 0x0004
  562. #define IEI_DISCARD 0x0008
  563. #define IEI_RESERVED 0xFFF0
  564. #define IEGI_ALL 0x0000
  565. #define IEGI_SELECTION 0x0001
  566. #define IEMODE_READY 0
  567. #define IEMODE_ERASE 1
  568. #define IEMODE_LASSO 2
  569. #define IEN_NULL 0x0000
  570. #define IEN_PDEVENT 0x0001
  571. #define IEN_PAINT 0x0002
  572. #define IEN_FOCUS 0x0004
  573. #define IEN_SCROLL 0x0008
  574. #define IEN_EDIT 0x0010
  575. #define IEN_PROPERTIES 0x0020
  576. #define IEN_RESERVED 0xFF80
  577. #define IER_OK 0
  578. #define IER_NO 0
  579. #define IER_YES 1
  580. #define IER_ERROR (-1)
  581. #define IER_PARAMERR (-2)
  582. #define IER_OWNERDRAW (-3)
  583. #define IER_SECURITY (-4)
  584. #define IER_SELECTION (-5)
  585. #define IER_SCALE (-6)
  586. #define IER_MEMERR (-7)
  587. #define IER_NOCOMMAND (-8)
  588. #define IER_NOGESTURE (-9)
  589. #define IER_NOPDEVENT (-10)
  590. #define IER_NOTINPAINT (-11)
  591. #define IER_PENDATA (-12)
  592. #define IEREC_NONE 0x0000
  593. #define IEREC_GESTURE 0x0001
  594. #define IEREC_ALL (IEREC_GESTURE)
  595. #define IEREC_RESERVED 0xFFFE
  596. #define IESEC_NOCOPY 0x0001
  597. #define IESEC_NOCUT 0x0002
  598. #define IESEC_NOPASTE 0x0004
  599. #define IESEC_NOUNDO 0x0008
  600. #define IESEC_NOINK 0x0010
  601. #define IESEC_NOERASE 0x0020
  602. #define IESEC_NOGET 0x0040
  603. #define IESEC_NOSET 0x0080
  604. #define IESEC_RESERVED 0xFF00
  605. #define IESF_ALL 0x0001
  606. #define IESF_SELECTION 0x0002
  607. #define IESF_STROKE 0x0004
  608. #define IESF_TIPCOLOR 0x0008
  609. #define IESF_TIPWIDTH 0x0010
  610. #define IESF_PENTIP (IESF_TIPCOLOR|IESF_TIPWIDTH)
  611. #define IESI_REPLACE 0x0000
  612. #define IESI_APPEND 0x0001
  613. #define IN_PDEVENT ((IEN_PDEVENT<<8)|0)
  614. #define IN_ERASEBKGND ((IEN_NULL<<8)|1)
  615. #define IN_PREPAINT ((IEN_PAINT<<8)|2)
  616. #define IN_PAINT ((IEN_NULL<<8)|3)
  617. #define IN_POSTPAINT ((IEN_PAINT<<8)|4)
  618. #define IN_MODECHANGED ((IEN_EDIT<<8)|5)
  619. #define IN_CHANGE ((IEN_EDIT<<8)|6)
  620. #define IN_UPDATE ((IEN_EDIT<<8)|7)
  621. #define IN_SETFOCUS ((IEN_FOCUS<<8)|8)
  622. #define IN_KILLFOCUS ((IEN_FOCUS<<8)|9)
  623. #define IN_MEMERR ((IEN_NULL<<8)|10)
  624. #define IN_HSCROLL ((IEN_SCROLL<<8)|11)
  625. #define IN_VSCROLL ((IEN_SCROLL<<8)|12)
  626. #define IN_GESTURE ((IEN_EDIT<<8)|13)
  627. #define IN_COMMAND ((IEN_EDIT<<8)|14)
  628. #define IN_CLOSE ((IEN_NULL<<8)|15)
  629. #define IN_PROPERTIES ((IEN_PROPERTIES<<8)|16)
  630. #endif
  631. #ifndef NOPENINKPUT
  632. #define LRET_DONE __MSABI_LONG(1)
  633. #define LRET_ABORT (__MSABI_LONG(-1))
  634. #define LRET_HRC (__MSABI_LONG(-2))
  635. #define LRET_HPENDATA (__MSABI_LONG(-3))
  636. #define LRET_PRIVATE (__MSABI_LONG(-4))
  637. #define PCMR_OK 0
  638. #define PCMR_ALREADYCOLLECTING (-1)
  639. #define PCMR_INVALIDCOLLECTION (-2)
  640. #define PCMR_EVENTLOCK (-3)
  641. #define PCMR_INVALID_PACKETID (-4)
  642. #define PCMR_TERMTIMEOUT (-5)
  643. #define PCMR_TERMRANGE (-6)
  644. #define PCMR_TERMPENUP (-7)
  645. #define PCMR_TERMEX (-8)
  646. #define PCMR_TERMBOUND (-9)
  647. #define PCMR_APPTERMINATED (-10)
  648. #define PCMR_TAP (-11)
  649. #define PCMR_SELECT (-12)
  650. #define PCMR_OVERFLOW (-13)
  651. #define PCMR_ERROR (-14)
  652. #define PCMR_DISPLAYERR (-15)
  653. #define PCMR_TERMINVERT (-16)
  654. #define PII_INKCLIPRECT 0x0001
  655. #define PII_INKSTOPRECT 0x0002
  656. #define PII_INKCLIPRGN 0x0004
  657. #define PII_INKSTOPRGN 0x0008
  658. #define PII_INKPENTIP 0x0010
  659. #define PII_SAVEBACKGROUND 0x0020
  660. #define PII_CLIPSTOP 0x0040
  661. #define PIT_RGNBOUND 0x0001
  662. #define PIT_RGNEXCLUDE 0x0002
  663. #define PIT_TIMEOUT 0x0004
  664. #define PIT_TAPNHOLD 0x0008
  665. #endif
  666. #ifndef NOPENMISC
  667. #define CL_NULL 0
  668. #define CL_MINIMUM 1
  669. #define CL_MAXIMUM 100
  670. #define cwRcReservedMax 8
  671. #define ENUM_MINIMUM 1
  672. #define ENUM_MAXIMUM 4096
  673. #define HKP_SETHOOK 0
  674. #define HKP_UNHOOK 0xFFFF
  675. #define HWR_RESULTS 0
  676. #define HWR_APPWIDE 1
  677. #define iSycNull (-1)
  678. #define LPDFNULL ((LPDF)NULL)
  679. #define MAXDICTIONARIES 16
  680. #define wPntAll (UINT)0xFFFF
  681. #define cbRcLanguageMax 44
  682. #define cbRcUserMax 32
  683. #define cbRcrgbfAlcMax 32
  684. #define RC_WDEFAULT 0xffff
  685. #define RC_LDEFAULT __MSABI_LONG(0xffffffff)
  686. #define RC_WDEFAULTFLAGS 0x8000
  687. #define RC_LDEFAULTFLAGS __MSABI_LONG(0x80000000)
  688. #define CWR_REPLACECR 0x0001
  689. #define CWR_STRIPCR CWR_REPLACECR
  690. #define CWR_STRIPLF 0x0002
  691. #define CWR_REPLACETAB 0x0004
  692. #define CWR_STRIPTAB CWR_REPLACETAB
  693. #define CWR_SINGLELINEEDIT (CWR_REPLACECR|CWR_STRIPLF|CWR_REPLACETAB)
  694. #define CWR_INSERT 0x0008
  695. #define CWR_TITLE 0x0010
  696. #define CWR_SIMPLE 0x0040
  697. #define CWR_HEDIT 0x0080
  698. #define CWR_KEYBOARD 0x0100
  699. #define CWR_BOXES 0x0200
  700. #define CWRK_DEFAULT 0
  701. #define CWRK_BASIC 1
  702. #define CWRK_FULL 2
  703. #define CWRK_NUMPAD 3
  704. #define CWRK_TELPAD 4
  705. #ifdef JAPAN
  706. #define CBCAPTIONCWX 256
  707. #define CKBCWX 6
  708. #define XCWX 20
  709. #define YCWX 20
  710. #define CXCWX 300
  711. #define CYCWX 200
  712. #define CWX_TOPMOST __MSABI_LONG(0x00000001)
  713. #define CWX_NOTOOLTIPS __MSABI_LONG(0x00000002)
  714. #define CWX_EPERIOD __MSABI_LONG(0x00000004)
  715. #define CWX_ECOMMA __MSABI_LONG(0x00000008)
  716. #define CWX_DEFAULT __MSABI_LONG(0x00000000)
  717. #define CWXA_CONTEXT 0x0001
  718. #define CWXA_KBD 0x0002
  719. #define CWXA_STATE 0x0004
  720. #define CWXA_PTUL 0x0008
  721. #define CWXA_SIZE 0x0010
  722. #define CWXA_NOUPDATEMRU 0x0020
  723. #define CWXK_HW 0
  724. #define CWXK_FIRST 0x0100
  725. #define CWXK_50 0x0100
  726. #define CWXK_QWERTY 0x0101
  727. #define CWXK_NUM 0x0102
  728. #define CWXK_KANJI 0x0103
  729. #define CWXK_CODE 0x0104
  730. #define CWXK_YOMI 0x0105
  731. #define CWXKS_DEFAULT 0xffff
  732. #define CWXKS_ZEN 0
  733. #define CWXKS_HAN 1
  734. #define CWXKS_ROMAZEN 2
  735. #define CWXKS_ROMAHAN 3
  736. #define CWXKS_HIRAZEN 4
  737. #define CWXKS_KATAZEN 5
  738. #define CWXKS_KATAHAN 6
  739. #define CWXR_ERROR -1
  740. #define CWXR_UNMODIFIED 0
  741. #define CWXR_MODIFIED 1
  742. #endif
  743. #ifdef JAPAN
  744. #define GPMI_OK __MSABI_LONG(0)
  745. #define GPMI_INVALIDPMI __MSABI_LONG(0x8000)
  746. #endif
  747. #define INKWIDTH_MINIMUM 0
  748. #define INKWIDTH_MAXIMUM 15
  749. #define PMI_RCCHANGE 0
  750. #define PMI_BEDIT 1
  751. #define PMI_CXTABLET 3
  752. #define PMI_CYTABLET 4
  753. #define PMI_PENTIP 6
  754. #define PMI_ENABLEFLAGS 7
  755. #define PMI_TIMEOUT 8
  756. #define PMI_TIMEOUTGEST 9
  757. #define PMI_TIMEOUTSEL 10
  758. #define PMI_SYSFLAGS 11
  759. #define PMI_INDEXFROMRGB 12
  760. #define PMI_RGBFROMINDEX 13
  761. #define PMI_SYSREC 14
  762. #define PMI_TICKREF 15
  763. #define PMI_SAVE 0x1000
  764. #ifdef JAPAN
  765. #define GPR_CURSPEN 1
  766. #define GPR_CURSCOPY 2
  767. #define GPR_CURSUNKNOWN 3
  768. #define GPR_CURSERASE 4
  769. #define GPR_BMCRMONO 5
  770. #define GPR_BMLFMONO 6
  771. #define GPR_BMTABMONO 7
  772. #define GPR_BMDELETE 8
  773. #define GPR_BMLENSBTN 9
  774. #ifdef JAPAN
  775. #define GPR_BMHSPMONO 10
  776. #define GPR_BMZSPMONO 11
  777. #endif
  778. #endif
  779. #define PWE_AUTOWRITE 0x0001
  780. #define PWE_ACTIONHANDLES 0x0002
  781. #define PWE_INPUTCURSOR 0x0004
  782. #define PWE_LENS 0x0008
  783. #define PWF_RC1 0x0001
  784. #define PWF_PEN 0x0004
  785. #define PWF_INKDISPLAY 0x0008
  786. #define PWF_RECOGNIZER 0x0010
  787. #define PWF_BEDIT 0x0100
  788. #define PWF_HEDIT 0x0200
  789. #define PWF_IEDIT 0x0400
  790. #define PWF_ENHANCED 0x1000
  791. #define PWF_FULL PWF_RC1|PWF_PEN|PWF_INKDISPLAY|PWF_RECOGNIZER| PWF_BEDIT|PWF_HEDIT |PWF_IEDIT|PWF_ENHANCED
  792. #define RPA_DEFAULT 0x0001
  793. #define RPA_HEDIT 0x0001
  794. #define RPA_KANJIFIXEDBEDIT 0x0002
  795. #define RPA_DBCSPRIORITY 0x0004
  796. #define RPA_SBCSPRIORITY 0x0008
  797. #define PMIR_OK __MSABI_LONG(0)
  798. #define PMIR_INDEX (__MSABI_LONG(-1))
  799. #define PMIR_VALUE (__MSABI_LONG(-2))
  800. #define PMIR_INVALIDBOXEDITINFO (__MSABI_LONG(-3))
  801. #define PMIR_INIERROR (__MSABI_LONG(-4))
  802. #define PMIR_ERROR (__MSABI_LONG(-5))
  803. #define PMIR_NA (__MSABI_LONG(-6))
  804. #ifdef JAPAN
  805. #define SPMI_OK __MSABI_LONG(0)
  806. #define SPMI_INVALIDBOXEDITINFO __MSABI_LONG(1)
  807. #define SPMI_INIERROR __MSABI_LONG(2)
  808. #define SPMI_INVALIDPMI __MSABI_LONG(0x8000)
  809. #endif
  810. #endif
  811. #ifndef NOPENRC1
  812. #define GGRC_OK 0
  813. #define GGRC_DICTBUFTOOSMALL 1
  814. #define GGRC_PARAMERROR 2
  815. #define GGRC_NA 3
  816. #define RCD_DEFAULT 0
  817. #define RCD_LR 1
  818. #define RCD_RL 2
  819. #define RCD_TB 3
  820. #define RCD_BT 4
  821. #define RCIP_ALLANSICHAR 0x0001
  822. #define RCIP_MASK 0x0001
  823. #define RCO_NOPOINTEREVENT __MSABI_LONG(0x00000001)
  824. #define RCO_SAVEALLDATA __MSABI_LONG(0x00000002)
  825. #define RCO_SAVEHPENDATA __MSABI_LONG(0x00000004)
  826. #define RCO_NOFLASHUNKNOWN __MSABI_LONG(0x00000008)
  827. #define RCO_TABLETCOORD __MSABI_LONG(0x00000010)
  828. #define RCO_NOSPACEBREAK __MSABI_LONG(0x00000020)
  829. #define RCO_NOHIDECURSOR __MSABI_LONG(0x00000040)
  830. #define RCO_NOHOOK __MSABI_LONG(0x00000080)
  831. #define RCO_BOXED __MSABI_LONG(0x00000100)
  832. #define RCO_SUGGEST __MSABI_LONG(0x00000200)
  833. #define RCO_DISABLEGESMAP __MSABI_LONG(0x00000400)
  834. #define RCO_NOFLASHCURSOR __MSABI_LONG(0x00000800)
  835. #define RCO_BOXCROSS __MSABI_LONG(0x00001000)
  836. #define RCO_COLDRECOG __MSABI_LONG(0x00008000)
  837. #define RCO_SAVEBACKGROUND __MSABI_LONG(0x00010000)
  838. #define RCO_DODEFAULT __MSABI_LONG(0x00020000)
  839. #define RCOR_NORMAL 1
  840. #define RCOR_RIGHT 2
  841. #define RCOR_UPSIDEDOWN 3
  842. #define RCOR_LEFT 4
  843. #define RCP_LEFTHAND 0x0001
  844. #define RCP_MAPCHAR 0x0004
  845. #define RCRT_DEFAULT 0x0000
  846. #define RCRT_UNIDENTIFIED 0x0001
  847. #define RCRT_GESTURE 0x0002
  848. #define RCRT_NOSYMBOLMATCH 0x0004
  849. #define RCRT_PRIVATE 0x4000
  850. #define RCRT_NORECOG 0x8000
  851. #define RCRT_ALREADYPROCESSED 0x0008
  852. #define RCRT_GESTURETRANSLATED 0x0010
  853. #define RCRT_GESTURETOKEYS 0x0020
  854. #define RRM_STROKE 0
  855. #define RRM_SYMBOL 1
  856. #define RRM_WORD 2
  857. #define RRM_NEWLINE 3
  858. #define RRM_COMPLETE 16
  859. #define SGRC_OK 0x0000
  860. #define SGRC_USER 0x0001
  861. #define SGRC_PARAMERROR 0x0002
  862. #define SGRC_RC 0x0004
  863. #define SGRC_RECOGNIZER 0x0008
  864. #define SGRC_DICTIONARY 0x0010
  865. #define SGRC_INIFILE 0x0020
  866. #define SGRC_NA 0x8000
  867. #endif
  868. #ifndef NOPENTARGET
  869. #define TPT_CLOSEST 0x0001
  870. #define TPT_INTERSECTINK 0x0002
  871. #define TPT_TEXTUAL 0x0004
  872. #define TPT_DEFAULT (TPT_TEXTUAL | TPT_INTERSECTINK | TPT_CLOSEST)
  873. #endif
  874. #ifndef NOPENVIRTEVENT
  875. #define VWM_MOUSEMOVE 0x0001
  876. #define VWM_MOUSELEFTDOWN 0x0002
  877. #define VWM_MOUSELEFTUP 0x0004
  878. #define VWM_MOUSERIGHTDOWN 0x0008
  879. #define VWM_MOUSERIGHTUP 0x0010
  880. #endif
  881. #endif
  882. #ifndef NOPENMSGS
  883. #ifndef NOPENRC1
  884. #define WM_RCRESULT (WM_PENWINFIRST+1)
  885. #define WM_HOOKRCRESULT (WM_PENWINFIRST+2)
  886. #endif
  887. #define WM_PENMISCINFO (WM_PENWINFIRST+3)
  888. #define WM_GLOBALRCCHANGE (WM_PENWINFIRST+3)
  889. #ifndef NOPENAPPS
  890. #define WM_SKB (WM_PENWINFIRST+4)
  891. #endif
  892. #define WM_PENCTL (WM_PENWINFIRST+5)
  893. #define WM_HEDITCTL (WM_PENWINFIRST+5)
  894. #define HE_GETUNDERLINE 7
  895. #define HE_SETUNDERLINE 8
  896. #define HE_GETINKHANDLE 9
  897. #define HE_SETINKMODE 10
  898. #define HE_STOPINKMODE 11
  899. #define HE_DEFAULTFONT 13
  900. #define HE_CHARPOSITION 14
  901. #define HE_CHAROFFSET 15
  902. #define HE_GETBOXLAYOUT 20
  903. #define HE_SETBOXLAYOUT 21
  904. #ifdef JAPAN
  905. #define HE_KKCONVERT 30
  906. #define HE_GETKKCONVERT 31
  907. #define HE_CANCELKKCONVERT 32
  908. #define HE_FIXKKCONVERT 33
  909. #define HE_GETKKSTATUS 34
  910. #define HE_SETCONVERTRANGE 35
  911. #define HE_GETCONVERTRANGE 36
  912. #define HE_PUTCONVERTCHAR 37
  913. #endif
  914. #define HE_ENABLEALTLIST 40
  915. #define HE_SHOWALTLIST 41
  916. #define HE_HIDEALTLIST 42
  917. #ifndef JAPAN
  918. #define HE_GETLENSTYPE 43
  919. #define HE_SETLENSTYPE 44
  920. #endif
  921. #ifdef JAPAN
  922. #define HEKK_DEFAULT 0
  923. #define HEKK_CONVERT 1
  924. #define HEKK_CANDIDATE 2
  925. #define HEKK_DBCSCHAR 3
  926. #define HEKK_SBCSCHAR 4
  927. #define HEKK_HIRAGANA 5
  928. #define HEKK_KATAKANA 6
  929. #define HEKKR_NOCONVERT 0
  930. #define HEKKR_PRECONVERT 1
  931. #define HEKKR_CONVERT 2
  932. #endif
  933. #define HEP_NORECOG 0
  934. #define HEP_RECOG 1
  935. #define HEP_WAITFORTAP 2
  936. #define HN_ENDREC 4
  937. #define HN_DELAYEDRECOGFAIL 5
  938. #define HN_RESULT 20
  939. #ifdef JAPAN
  940. #define HN_ENDKKCONVERT 30
  941. #endif
  942. #define HN_BEGINDIALOG 40
  943. #define HN_ENDDIALOG 41
  944. #ifndef NOPENIEDIT
  945. #define IE_GETMODIFY (EM_GETMODIFY)
  946. #define IE_SETMODIFY (EM_SETMODIFY)
  947. #define IE_CANUNDO (EM_CANUNDO)
  948. #define IE_UNDO (EM_UNDO)
  949. #define IE_EMPTYUNDOBUFFER (EM_EMPTYUNDOBUFFER)
  950. #define IE_MSGFIRST (WM_USER+150)
  951. #define IE_GETINK (IE_MSGFIRST+0)
  952. #define IE_SETINK (IE_MSGFIRST+1)
  953. #define IE_GETPENTIP (IE_MSGFIRST+2)
  954. #define IE_SETPENTIP (IE_MSGFIRST+3)
  955. #define IE_GETERASERTIP (IE_MSGFIRST+4)
  956. #define IE_SETERASERTIP (IE_MSGFIRST+5)
  957. #define IE_GETBKGND (IE_MSGFIRST+6)
  958. #define IE_SETBKGND (IE_MSGFIRST+7)
  959. #define IE_GETGRIDORIGIN (IE_MSGFIRST+8)
  960. #define IE_SETGRIDORIGIN (IE_MSGFIRST+9)
  961. #define IE_GETGRIDPEN (IE_MSGFIRST+10)
  962. #define IE_SETGRIDPEN (IE_MSGFIRST+11)
  963. #define IE_GETGRIDSIZE (IE_MSGFIRST+12)
  964. #define IE_SETGRIDSIZE (IE_MSGFIRST+13)
  965. #define IE_GETMODE (IE_MSGFIRST+14)
  966. #define IE_SETMODE (IE_MSGFIRST+15)
  967. #define IE_GETINKRECT (IE_MSGFIRST+16)
  968. #define IE_GETAPPDATA (IE_MSGFIRST+34)
  969. #define IE_SETAPPDATA (IE_MSGFIRST+35)
  970. #define IE_GETDRAWOPTS (IE_MSGFIRST+36)
  971. #define IE_SETDRAWOPTS (IE_MSGFIRST+37)
  972. #define IE_GETFORMAT (IE_MSGFIRST+38)
  973. #define IE_SETFORMAT (IE_MSGFIRST+39)
  974. #define IE_GETINKINPUT (IE_MSGFIRST+40)
  975. #define IE_SETINKINPUT (IE_MSGFIRST+41)
  976. #define IE_GETNOTIFY (IE_MSGFIRST+42)
  977. #define IE_SETNOTIFY (IE_MSGFIRST+43)
  978. #define IE_GETRECOG (IE_MSGFIRST+44)
  979. #define IE_SETRECOG (IE_MSGFIRST+45)
  980. #define IE_GETSECURITY (IE_MSGFIRST+46)
  981. #define IE_SETSECURITY (IE_MSGFIRST+47)
  982. #define IE_GETSEL (IE_MSGFIRST+48)
  983. #define IE_SETSEL (IE_MSGFIRST+49)
  984. #define IE_DOCOMMAND (IE_MSGFIRST+50)
  985. #define IE_GETCOMMAND (IE_MSGFIRST+51)
  986. #define IE_GETCOUNT (IE_MSGFIRST+52)
  987. #define IE_GETGESTURE (IE_MSGFIRST+53)
  988. #define IE_GETMENU (IE_MSGFIRST+54)
  989. #define IE_GETPAINTDC (IE_MSGFIRST+55)
  990. #define IE_GETPDEVENT (IE_MSGFIRST+56)
  991. #define IE_GETSELCOUNT (IE_MSGFIRST+57)
  992. #define IE_GETSELITEMS (IE_MSGFIRST+58)
  993. #define IE_GETSTYLE (IE_MSGFIRST+59)
  994. #endif
  995. #ifndef NOPENHEDIT
  996. #define CIH_NOGDMSG 0x0001
  997. #define CIH_NOACTIONHANDLE 0x0002
  998. #define CIH_NOEDITTEXT 0x0004
  999. #define CIH_NOFLASHCURSOR 0x0008
  1000. #endif
  1001. #ifndef NOPENBEDIT
  1002. #define HEAL_DEFAULT __MSABI_LONG(-1)
  1003. #define BEI_FACESIZE 32
  1004. #define BEIF_BOXCROSS 0x0001
  1005. #define BESC_DEFAULT 0
  1006. #define BESC_ROMANFIXED 1
  1007. #define BESC_KANJIFIXED 2
  1008. #define BESC_USERDEFINED 3
  1009. #define CIB_NOGDMSG 0x0001
  1010. #define CIB_NOACTIONHANDLE 0x0002
  1011. #define CIB_NOFLASHCURSOR 0x0004
  1012. #ifdef JAPAN
  1013. #define CIB_NOWRITING 0x0010
  1014. #endif
  1015. #define BXD_CELLWIDTH 12
  1016. #define BXD_CELLHEIGHT 16
  1017. #define BXD_BASEHEIGHT 13
  1018. #define BXD_BASEHORZ 0
  1019. #define BXD_MIDFROMBASE 0
  1020. #define BXD_CUSPHEIGHT 2
  1021. #define BXD_ENDCUSPHEIGHT 4
  1022. #define BXDK_CELLWIDTH 32
  1023. #define BXDK_CELLHEIGHT 32
  1024. #define BXDK_BASEHEIGHT 28
  1025. #define BXDK_BASEHORZ 0
  1026. #define BXDK_MIDFROMBASE 0
  1027. #define BXDK_CUSPHEIGHT 28
  1028. #define BXDK_ENDCUSPHEIGHT 10
  1029. #endif
  1030. #define WM_PENMISC (WM_PENWINFIRST+6)
  1031. #define PMSC_BEDITCHANGE 1
  1032. #define PMSC_GETPCMINFO 5
  1033. #define PMSC_SETPCMINFO 6
  1034. #define PMSC_GETINKINGINFO 7
  1035. #define PMSC_SETINKINGINFO 8
  1036. #define PMSC_GETHRC 9
  1037. #define PMSC_SETHRC 10
  1038. #define PMSC_GETSYMBOLCOUNT 11
  1039. #define PMSC_GETSYMBOLS 12
  1040. #define PMSC_SETSYMBOLS 13
  1041. #define PMSC_LOADPW 15
  1042. #define PMSC_INKSTOP 16
  1043. #define PMSCL_UNLOADED __MSABI_LONG(0)
  1044. #define PMSCL_LOADED __MSABI_LONG(1)
  1045. #define PMSCL_UNLOADING __MSABI_LONG(2)
  1046. #define WM_CTLINIT (WM_PENWINFIRST+7)
  1047. #define CTLINIT_HEDIT 1
  1048. #define CTLINIT_BEDIT 7
  1049. #define CTLINIT_IEDIT 9
  1050. #define CTLINIT_MAX 10
  1051. #define WM_PENEVENT (WM_PENWINFIRST+8)
  1052. #define PE_PENDOWN 1
  1053. #define PE_PENUP 2
  1054. #define PE_PENMOVE 3
  1055. #define PE_TERMINATING 4
  1056. #define PE_TERMINATED 5
  1057. #define PE_BUFFERWARNING 6
  1058. #define PE_BEGININPUT 7
  1059. #define PE_SETTARGETS 8
  1060. #define PE_BEGINDATA 9
  1061. #define PE_MOREDATA 10
  1062. #define PE_ENDDATA 11
  1063. #define PE_GETPCMINFO 12
  1064. #define PE_GETINKINGINFO 13
  1065. #define PE_ENDINPUT 14
  1066. #define PE_RESULT 15
  1067. #endif
  1068. #ifndef RC_INVOKED
  1069. #ifndef NOPENDRIVER
  1070. #define FPenUpX(x) ((WINBOOL)(((x) & BITPENUP)!=0))
  1071. #define GetWEventRef() (LOWORD(GetMessageExtraInfo()))
  1072. #endif
  1073. #ifndef NOPENALC
  1074. #define MpAlcB(lprc,i) ((lprc)->rgbfAlc[((i) & 0xff) >> 3])
  1075. #define MpIbf(i) ((BYTE)(1 << ((i) & 7)))
  1076. #define SetAlcBitAnsi(lprc,i) do {MpAlcB(lprc,i) |= MpIbf(i);} while (0)
  1077. #define ResetAlcBitAnsi(lprc,i) do {MpAlcB(lprc,i) &= ~MpIbf(i);} while (0)
  1078. #define IsAlcBitAnsi(lprc,i) ((MpAlcB(lprc,i) & MpIbf(i))!=0)
  1079. #endif
  1080. #ifndef NOPENDATA
  1081. #define DrawPenDataFmt(hdc,lprect,hpndt) DrawPenDataEx(hdc,lprect,hpndt,0,IX_END,0,IX_END,NULL,NULL,0)
  1082. #endif
  1083. #ifndef NOPENHRC
  1084. #define dwDiffAT(at1,at2) (1000*((at2).sec - (at1).sec) - (DWORD)(at1).ms + (DWORD)(at2).ms)
  1085. #define FLTAbsTime(at1,at2) ((at1).sec < (at2).sec || ((at1).sec==(at2).sec && (at1).ms < (at2).ms))
  1086. #define FLTEAbsTime(at1,at2) ((at1).sec < (at2).sec || ((at1).sec==(at2).sec && (at1).ms <= (at2).ms))
  1087. #define FEQAbsTime(at1,at2) ((at1).sec==(at2).sec && (at1).ms==(at2).ms)
  1088. #define FAbsTimeInInterval(at,lpi) (FLTEAbsTime((lpi)->atBegin,at) && FLTEAbsTime(at,(lpi)->atEnd))
  1089. #define FIntervalInInterval(lpiT,lpiS) (FLTEAbsTime((lpiS)->atBegin,(lpiT)->atBegin) && FLTEAbsTime((lpiT)->atEnd,(lpiS)->atEnd))
  1090. #define FIntervalXInterval(lpiT,lpiS) (!(FLTAbsTime((lpiT)->atEnd,(lpiS)->atBegin) || FLTAbsTime((lpiS)->atEnd,(lpiT)->atBegin)))
  1091. #define dwDurInterval(lpi) dwDiffAT((lpi)->atBegin,(lpi)->atEnd)
  1092. #define MakeAbsTime(lpat,sec,ms) do { (lpat)->sec = sec + ((ms) / 1000); (lpat)->ms = (ms) % 1000; } while (0)
  1093. #define FIsSpecial(syv) (HIWORD((syv))==SYVHI_SPECIAL)
  1094. #define FIsAnsi(syv) (HIWORD((syv))==SYVHI_ANSI)
  1095. #define FIsGesture(syv) (HIWORD((syv))==SYVHI_GESTURE)
  1096. #define FIsKanji(syv) (HIWORD((syv))==SYVHI_KANJI)
  1097. #define FIsShape(syv) (HIWORD((syv))==SYVHI_SHAPE)
  1098. #define FIsUniCode(syv) (HIWORD((syv))==SYVHI_UNICODE)
  1099. #define FIsVKey(syv) (HIWORD((syv))==SYVHI_VKEY)
  1100. #define ChSyvToAnsi(syv) ((BYTE) (LOBYTE(LOWORD((syv)))))
  1101. #define WSyvToKanji(syv) ((WORD) (LOWORD((syv))))
  1102. #define SyvCharacterToSymbol(c) ((LONG)(unsigned char)(c) | 0x00010000)
  1103. #define SyvKanjiToSymbol(c) ((LONG)(UINT)(c) | 0x00030000)
  1104. #define FIsSelectGesture(syv) ((syv) >= SYVSELECTFIRST && (syv) <= SYVSELECTLAST)
  1105. #define FIsStdGesture(syv) (FIsSelectGesture(syv) || (syv)==SYV_CLEAR || (syv)==SYV_HELP || (syv)==SYV_EXTENDSELECT || (syv)==SYV_UNDO || (syv)==SYV_COPY || (syv)==SYV_CUT || (syv)==SYV_PASTE || (syv)==SYV_CLEARWORD || (syv)==SYV_KKCONVERT || (syv)==SYV_USER || (syv)==SYV_CORRECT)
  1106. #define FIsAnsiGesture(syv) ((syv)==SYV_BACKSPACE || (syv)==SYV_TAB || (syv)==SYV_RETURN || (syv)==SYV_SPACE)
  1107. #endif
  1108. #ifndef NOPENINKPUT
  1109. #define SubPenMsgFromWpLp(wp,lp) (LOWORD(wp))
  1110. #define EventRefFromWpLp(wp,lp) (HIWORD(wp))
  1111. #define TerminationFromWpLp(wp,lp) ((int)HIWORD(wp))
  1112. #define HpcmFromWpLp(wp,lp) ((HPCM)(lp))
  1113. #endif
  1114. #ifndef NOPENTARGET
  1115. #define HwndFromHtrg(htrg) ((HWND)(DWORD)(htrg))
  1116. #define HtrgFromHwnd(hwnd) ((HTRG)(UINT)(hwnd))
  1117. #endif
  1118. typedef LONG ALC;
  1119. typedef int CL;
  1120. typedef UINT HKP;
  1121. typedef int REC;
  1122. typedef LONG SYV;
  1123. #ifndef DECLARE_HANDLE32
  1124. #define DECLARE_HANDLE32(name) struct name##__ { int unused; }; typedef const struct name##__ *name
  1125. #endif
  1126. DECLARE_HANDLE32(HTRG);
  1127. DECLARE_HANDLE(HPCM);
  1128. DECLARE_HANDLE(HPENDATA);
  1129. DECLARE_HANDLE(HREC);
  1130. typedef ALC *LPALC;
  1131. typedef LPVOID LPOEM;
  1132. typedef SYV *LPSYV;
  1133. typedef HPENDATA *LPHPENDATA;
  1134. typedef int (CALLBACK *ENUMPROC)(LPSYV,int,VOID *);
  1135. typedef int (CALLBACK *LPDF)(int,LPVOID,LPVOID,int,DWORD,DWORD);
  1136. typedef WINBOOL (CALLBACK *RCYIELDPROC)(VOID);
  1137. typedef struct tagABSTIME {
  1138. DWORD sec;
  1139. UINT ms;
  1140. } ABSTIME,*LPABSTIME;
  1141. #ifndef NOPENHEDIT
  1142. typedef struct tagCTLINITHEDIT {
  1143. DWORD cbSize;
  1144. HWND hwnd;
  1145. int id;
  1146. DWORD dwFlags;
  1147. DWORD dwReserved;
  1148. } CTLINITHEDIT,*LPCTLINITHEDIT;
  1149. #endif
  1150. #ifndef NOPENBEDIT
  1151. typedef struct tagBOXLAYOUT {
  1152. int cyCusp;
  1153. int cyEndCusp;
  1154. UINT style;
  1155. DWORD dwReserved1;
  1156. DWORD dwReserved2;
  1157. DWORD dwReserved3;
  1158. } BOXLAYOUT,*LPBOXLAYOUT;
  1159. typedef struct tagCTLINITBEDIT {
  1160. DWORD cbSize;
  1161. HWND hwnd;
  1162. int id;
  1163. WORD wSizeCategory;
  1164. WORD wFlags;
  1165. DWORD dwReserved;
  1166. } CTLINITBEDIT,*LPCTLINITBEDIT;
  1167. typedef struct tagBOXEDITINFO {
  1168. int cxBox;
  1169. int cyBox;
  1170. int cxBase;
  1171. int cyBase;
  1172. int cyMid;
  1173. BOXLAYOUT boxlayout;
  1174. UINT wFlags;
  1175. BYTE szFaceName[BEI_FACESIZE];
  1176. UINT wFontHeight;
  1177. UINT rgwReserved[8];
  1178. } BOXEDITINFO,*LPBOXEDITINFO;
  1179. #endif
  1180. #ifndef NOPENCTL
  1181. typedef struct tagRECTOFS {
  1182. int dLeft;
  1183. int dTop;
  1184. int dRight;
  1185. int dBottom;
  1186. } RECTOFS,*LPRECTOFS;
  1187. #endif
  1188. #ifndef NOPENDATA
  1189. typedef struct tagPENDATAHEADER {
  1190. UINT wVersion;
  1191. UINT cbSizeUsed;
  1192. UINT cStrokes;
  1193. UINT cPnt;
  1194. UINT cPntStrokeMax;
  1195. RECT rectBound;
  1196. UINT wPndts;
  1197. int nInkWidth;
  1198. DWORD rgbInk;
  1199. } PENDATAHEADER,*LPPENDATAHEADER,*LPPENDATA;
  1200. typedef struct tagSTROKEINFO {
  1201. UINT cPnt;
  1202. UINT cbPnts;
  1203. UINT wPdk;
  1204. DWORD dwTick;
  1205. } STROKEINFO,*LPSTROKEINFO;
  1206. typedef struct tagPENTIP {
  1207. DWORD cbSize;
  1208. BYTE btype;
  1209. BYTE bwidth;
  1210. BYTE bheight;
  1211. BYTE bOpacity;
  1212. COLORREF rgb;
  1213. DWORD dwFlags;
  1214. DWORD dwReserved;
  1215. } PENTIP,*LPPENTIP;
  1216. typedef WINBOOL (CALLBACK *ANIMATEPROC)(HPENDATA,UINT,UINT,UINT *,LPARAM);
  1217. typedef struct tagANIMATEINFO {
  1218. DWORD cbSize;
  1219. UINT uSpeedPct;
  1220. UINT uPeriodCB;
  1221. UINT fuFlags;
  1222. LPARAM lParam;
  1223. DWORD dwReserved;
  1224. } ANIMATEINFO,*LPANIMATEINFO;
  1225. #endif
  1226. #ifndef NOPENDRIVER
  1227. typedef struct tagOEMPENINFO {
  1228. UINT wPdt;
  1229. UINT wValueMax;
  1230. UINT wDistinct;
  1231. } OEMPENINFO,*LPOEMPENINFO;
  1232. typedef struct tagPENPACKET {
  1233. UINT wTabletX;
  1234. UINT wTabletY;
  1235. UINT wPDK;
  1236. UINT rgwOemData[MAXOEMDATAWORDS];
  1237. } PENPACKET,*LPPENPACKET;
  1238. typedef struct tagOEM_PENPACKET {
  1239. UINT wTabletX;
  1240. UINT wTabletY;
  1241. UINT wPDK;
  1242. UINT rgwOemData[MAXOEMDATAWORDS];
  1243. DWORD dwTime;
  1244. } OEM_PENPACKET,*LPOEM_PENPACKET;
  1245. typedef struct tagPENINFO {
  1246. UINT cxRawWidth;
  1247. UINT cyRawHeight;
  1248. UINT wDistinctWidth;
  1249. UINT wDistinctHeight;
  1250. int nSamplingRate;
  1251. int nSamplingDist;
  1252. LONG lPdc;
  1253. int cPens;
  1254. int cbOemData;
  1255. OEMPENINFO rgoempeninfo[MAXOEMDATAWORDS];
  1256. UINT rgwReserved[7];
  1257. UINT fuOEM;
  1258. } PENINFO,*LPPENINFO;
  1259. typedef struct tagCALBSTRUCT {
  1260. int wOffsetX;
  1261. int wOffsetY;
  1262. int wDistinctWidth;
  1263. int wDistinctHeight;
  1264. } CALBSTRUCT,*LPCALBSTRUCT;
  1265. typedef WINBOOL (CALLBACK *LPFNRAWHOOK)(LPPENPACKET);
  1266. #endif
  1267. #ifndef NOPENHRC
  1268. DECLARE_HANDLE32(HRC);
  1269. DECLARE_HANDLE32(HRCRESULT);
  1270. DECLARE_HANDLE32(HWL);
  1271. DECLARE_HANDLE32(HRECHOOK);
  1272. typedef HRC *LPHRC;
  1273. typedef HRCRESULT *LPHRCRESULT;
  1274. typedef HWL *LPHWL;
  1275. typedef WINBOOL (CALLBACK *HRCRESULTHOOKPROC)(HREC,HRC,UINT,UINT,UINT,LPVOID);
  1276. DECLARE_HANDLE(HINKSET);
  1277. typedef HINKSET *LPHINKSET;
  1278. typedef struct tagINTERVAL {
  1279. ABSTIME atBegin;
  1280. ABSTIME atEnd;
  1281. } INTERVAL,*LPINTERVAL;
  1282. typedef struct tagBOXRESULTS {
  1283. UINT indxBox;
  1284. HINKSET hinksetBox;
  1285. SYV rgSyv[1];
  1286. } BOXRESULTS,*LPBOXRESULTS;
  1287. typedef struct tagGUIDE {
  1288. int xOrigin;
  1289. int yOrigin;
  1290. int cxBox;
  1291. int cyBox;
  1292. int cxBase;
  1293. int cyBase;
  1294. int cHorzBox;
  1295. int cVertBox;
  1296. int cyMid;
  1297. } GUIDE,*LPGUIDE;
  1298. #endif
  1299. #ifndef NOPENIEDIT
  1300. typedef struct tagCTLINITIEDIT {
  1301. DWORD cbSize;
  1302. HWND hwnd;
  1303. int id;
  1304. WORD ieb;
  1305. WORD iedo;
  1306. WORD iei;
  1307. WORD ien;
  1308. WORD ierec;
  1309. WORD ies;
  1310. WORD iesec;
  1311. WORD pdts;
  1312. HPENDATA hpndt;
  1313. HGDIOBJ hgdiobj;
  1314. HPEN hpenGrid;
  1315. POINT ptOrgGrid;
  1316. WORD wVGrid;
  1317. WORD wHGrid;
  1318. DWORD dwApp;
  1319. DWORD dwReserved;
  1320. } CTLINITIEDIT,*LPCTLINITIEDIT;
  1321. typedef struct tagPDEVENT {
  1322. DWORD cbSize;
  1323. HWND hwnd;
  1324. UINT wm;
  1325. WPARAM wParam;
  1326. LPARAM lParam;
  1327. POINT pt;
  1328. WINBOOL fPen;
  1329. LONG lExInfo;
  1330. DWORD dwReserved;
  1331. } PDEVENT,*LPPDEVENT;
  1332. typedef struct tagSTRKFMT {
  1333. DWORD cbSize;
  1334. UINT iesf;
  1335. UINT iStrk;
  1336. PENTIP tip;
  1337. DWORD dwUser;
  1338. DWORD dwReserved;
  1339. } STRKFMT,*LPSTRKFMT;
  1340. #endif
  1341. #ifndef NOPENINKPUT
  1342. typedef struct tagPCMINFO {
  1343. DWORD cbSize;
  1344. DWORD dwPcm;
  1345. RECT rectBound;
  1346. RECT rectExclude;
  1347. HRGN hrgnBound;
  1348. HRGN hrgnExclude;
  1349. DWORD dwTimeout;
  1350. } PCMINFO,*LPPCMINFO;
  1351. typedef struct tagINKINGINFO {
  1352. DWORD cbSize;
  1353. UINT wFlags;
  1354. PENTIP tip;
  1355. RECT rectClip;
  1356. RECT rectInkStop;
  1357. HRGN hrgnClip;
  1358. HRGN hrgnInkStop;
  1359. } INKINGINFO,*LPINKINGINFO;
  1360. #endif
  1361. #ifndef NOPENRC1
  1362. typedef struct tagSYC {
  1363. UINT wStrokeFirst;
  1364. UINT wPntFirst;
  1365. UINT wStrokeLast;
  1366. UINT wPntLast;
  1367. WINBOOL fLastSyc;
  1368. } SYC,*LPSYC;
  1369. typedef struct tagSYE {
  1370. SYV syv;
  1371. LONG lRecogVal;
  1372. CL cl;
  1373. int iSyc;
  1374. } SYE,*LPSYE;
  1375. typedef struct tagSYG {
  1376. POINT rgpntHotSpots[MAXHOTSPOT];
  1377. int cHotSpot;
  1378. int nFirstBox;
  1379. LONG lRecogVal;
  1380. LPSYE lpsye;
  1381. int cSye;
  1382. LPSYC lpsyc;
  1383. int cSyc;
  1384. } SYG,*LPSYG;
  1385. typedef struct tagRC {
  1386. HREC hrec;
  1387. HWND hwnd;
  1388. UINT wEventRef;
  1389. UINT wRcPreferences;
  1390. LONG lRcOptions;
  1391. RCYIELDPROC lpfnYield;
  1392. BYTE lpUser[cbRcUserMax];
  1393. UINT wCountry;
  1394. UINT wIntlPreferences;
  1395. char lpLanguage[cbRcLanguageMax];
  1396. LPDF rglpdf[MAXDICTIONARIES];
  1397. UINT wTryDictionary;
  1398. CL clErrorLevel;
  1399. ALC alc;
  1400. ALC alcPriority;
  1401. BYTE rgbfAlc[cbRcrgbfAlcMax];
  1402. UINT wResultMode;
  1403. UINT wTimeOut;
  1404. LONG lPcm;
  1405. RECT rectBound;
  1406. RECT rectExclude;
  1407. GUIDE guide;
  1408. UINT wRcOrient;
  1409. UINT wRcDirect;
  1410. int nInkWidth;
  1411. COLORREF rgbInk;
  1412. DWORD dwAppParam;
  1413. DWORD dwDictParam;
  1414. DWORD dwRecognizer;
  1415. UINT rgwReserved[cwRcReservedMax];
  1416. } RC,*LPRC;
  1417. typedef struct tagRCRESULT {
  1418. SYG syg;
  1419. UINT wResultsType;
  1420. int cSyv;
  1421. LPSYV lpsyv;
  1422. HANDLE hSyv;
  1423. int nBaseLine;
  1424. int nMidLine;
  1425. HPENDATA hpendata;
  1426. RECT rectBoundInk;
  1427. POINT pntEnd;
  1428. LPRC lprc;
  1429. } RCRESULT,*LPRCRESULT;
  1430. typedef int (CALLBACK *LPFUNCRESULTS)(LPRCRESULT,REC);
  1431. #endif
  1432. #ifndef NOPENTARGET
  1433. typedef struct tagTARGET {
  1434. DWORD dwFlags;
  1435. DWORD idTarget;
  1436. HTRG htrgTarget;
  1437. RECTL rectBound;
  1438. DWORD dwData;
  1439. RECTL rectBoundInk;
  1440. RECTL rectBoundLastInk;
  1441. } TARGET,*LPTARGET;
  1442. typedef struct tagTARGINFO {
  1443. DWORD cbSize;
  1444. DWORD dwFlags;
  1445. HTRG htrgOwner;
  1446. WORD cTargets;
  1447. WORD iTargetLast;
  1448. TARGET rgTarget[1];
  1449. } TARGINFO,*LPTARGINFO;
  1450. typedef struct tagINPPARAMS {
  1451. DWORD cbSize;
  1452. DWORD dwFlags;
  1453. HPENDATA hpndt;
  1454. TARGET target;
  1455. } INPPARAMS,*LPINPPARAMS;
  1456. #endif
  1457. #ifdef JAPAN
  1458. typedef struct tagCWX {
  1459. DWORD cbSize;
  1460. WORD wApplyFlags;
  1461. HWND hwndText;
  1462. HRC hrc;
  1463. char szCaption[CBCAPTIONCWX];
  1464. DWORD dwEditStyle;
  1465. DWORD dwSel;
  1466. DWORD dwFlags;
  1467. WORD ixkb;
  1468. WORD rgState[CKBCWX];
  1469. POINT ptUL;
  1470. SIZE sizeHW;
  1471. } CWX,*LPCWX;
  1472. #endif
  1473. LRESULT CALLBACK DefPenWindowProc(HWND,UINT,WPARAM,LPARAM);
  1474. #ifndef NOPENAPPS
  1475. WINBOOL WINAPI ShowKeyboard(HWND,UINT,LPPOINT,LPSKBINFO);
  1476. #endif
  1477. #ifndef NOPENDATA
  1478. #ifndef NOPENAPIFUN
  1479. LPPENDATA WINAPI BeginEnumStrokes(HPENDATA);
  1480. LPPENDATA WINAPI EndEnumStrokes(HPENDATA);
  1481. HPENDATA WINAPI CompactPenData(HPENDATA,UINT);
  1482. HPENDATA WINAPI CreatePenData(LPPENINFO,int,UINT,UINT);
  1483. VOID WINAPI DrawPenData(HDC,LPRECT,HPENDATA);
  1484. WINBOOL WINAPI GetPenDataStroke(LPPENDATA,UINT,LPPOINT *,LPVOID *,LPSTROKEINFO);
  1485. #endif
  1486. HPENDATA WINAPI AddPointsPenData(HPENDATA,LPPOINT,LPVOID,LPSTROKEINFO);
  1487. int WINAPI CompressPenData(HPENDATA,UINT,DWORD);
  1488. HPENDATA WINAPI CreatePenDataEx(LPPENINFO,UINT,UINT,UINT);
  1489. HRGN WINAPI CreatePenDataRegion(HPENDATA,UINT);
  1490. WINBOOL WINAPI DestroyPenData(HPENDATA);
  1491. int WINAPI DrawPenDataEx(HDC,LPRECT,HPENDATA,UINT,UINT,UINT,UINT,ANIMATEPROC,LPANIMATEINFO,UINT);
  1492. HPENDATA WINAPI DuplicatePenData(HPENDATA,UINT);
  1493. int WINAPI ExtractPenDataPoints(HPENDATA,UINT,UINT,UINT,LPPOINT,LPVOID,UINT);
  1494. int WINAPI ExtractPenDataStrokes(HPENDATA,UINT,LPARAM,LPHPENDATA,UINT);
  1495. int WINAPI GetPenDataAttributes(HPENDATA,LPVOID,UINT);
  1496. WINBOOL WINAPI GetPenDataInfo(HPENDATA,LPPENDATAHEADER,LPPENINFO,DWORD);
  1497. WINBOOL WINAPI GetPointsFromPenData(HPENDATA,UINT,UINT,UINT,LPPOINT);
  1498. int WINAPI GetStrokeAttributes(HPENDATA,UINT,LPVOID,UINT);
  1499. int WINAPI GetStrokeTableAttributes(HPENDATA,UINT,LPVOID,UINT);
  1500. int WINAPI HitTestPenData(HPENDATA,LPPOINT,UINT,UINT *,UINT *);
  1501. int WINAPI InsertPenData(HPENDATA,HPENDATA,UINT);
  1502. int WINAPI InsertPenDataPoints(HPENDATA,UINT,UINT,UINT,LPPOINT,LPVOID);
  1503. int WINAPI InsertPenDataStroke(HPENDATA,UINT,LPPOINT,LPVOID,LPSTROKEINFO);
  1504. WINBOOL WINAPI MetricScalePenData(HPENDATA,UINT);
  1505. WINBOOL WINAPI OffsetPenData(HPENDATA,int,int);
  1506. LONG WINAPI PenDataFromBuffer(LPHPENDATA,UINT,LPBYTE,LONG,LPDWORD);
  1507. LONG WINAPI PenDataToBuffer(HPENDATA,LPBYTE,LONG,LPDWORD);
  1508. WINBOOL WINAPI RedisplayPenData(HDC,HPENDATA,LPPOINT,LPPOINT,int,DWORD);
  1509. int WINAPI RemovePenDataStrokes(HPENDATA,UINT,UINT);
  1510. WINBOOL WINAPI ResizePenData(HPENDATA,LPRECT);
  1511. int WINAPI SetStrokeAttributes(HPENDATA,UINT,LPARAM,UINT);
  1512. int WINAPI SetStrokeTableAttributes(HPENDATA,UINT,LPARAM,UINT);
  1513. int WINAPI TrimPenData(HPENDATA,DWORD,DWORD);
  1514. #endif
  1515. #ifndef NOPENDICT
  1516. WINBOOL WINAPI DictionarySearch(LPRC,LPSYE,int,LPSYV,int);
  1517. #endif
  1518. #ifndef NOPENDRIVER
  1519. #ifndef NOPENAPIFUN
  1520. WINBOOL WINAPI EndPenCollection(REC);
  1521. REC WINAPI GetPenHwData(LPPOINT,LPVOID,int,UINT,LPSTROKEINFO);
  1522. REC WINAPI GetPenHwEventData(UINT,UINT,LPPOINT,LPVOID,int,LPSTROKEINFO);
  1523. WINBOOL WINAPI SetPenHook(HKP,LPFNRAWHOOK);
  1524. VOID WINAPI UpdatePenInfo(LPPENINFO);
  1525. #endif
  1526. WINBOOL WINAPI GetPenAsyncState(UINT);
  1527. WINBOOL WINAPI IsPenEvent(UINT,LONG);
  1528. #endif
  1529. #ifndef NOPENHRC
  1530. int WINAPI AddPenDataHRC(HRC,HPENDATA);
  1531. int WINAPI AddPenInputHRC(HRC,LPPOINT,LPVOID,UINT,LPSTROKEINFO);
  1532. int WINAPI AddWordsHWL(HWL,LPSTR,UINT);
  1533. int WINAPI ConfigHREC(HREC,UINT,WPARAM,LPARAM);
  1534. HRC WINAPI CreateCompatibleHRC(HRC,HREC);
  1535. HWL WINAPI CreateHWL(HREC,LPSTR,UINT,DWORD);
  1536. HINKSET WINAPI CreateInksetHRCRESULT(HRCRESULT,UINT,UINT);
  1537. HPENDATA WINAPI CreatePenDataHRC(HRC);
  1538. int WINAPI DestroyHRC(HRC);
  1539. int WINAPI DestroyHRCRESULT(HRCRESULT);
  1540. int WINAPI DestroyHWL(HWL);
  1541. int WINAPI EnableGestureSetHRC(HRC,SYV,WINBOOL);
  1542. int WINAPI EnableSystemDictionaryHRC(HRC,WINBOOL);
  1543. int WINAPI EndPenInputHRC(HRC);
  1544. int WINAPI GetAlphabetHRC(HRC,LPALC,LPBYTE);
  1545. int WINAPI GetAlphabetPriorityHRC(HRC,LPALC,LPBYTE);
  1546. int WINAPI GetAlternateWordsHRCRESULT(HRCRESULT,UINT,UINT,LPHRCRESULT,UINT);
  1547. int WINAPI GetBoxMappingHRCRESULT(HRCRESULT,UINT,UINT,UINT *);
  1548. int WINAPI GetBoxResultsHRC(HRC,UINT,UINT,UINT,LPBOXRESULTS,WINBOOL);
  1549. int WINAPI GetGuideHRC(HRC,LPGUIDE,UINT *);
  1550. int WINAPI GetHotspotsHRCRESULT(HRCRESULT,UINT,LPPOINT,UINT);
  1551. HREC WINAPI GetHRECFromHRC(HRC);
  1552. int WINAPI GetInternationalHRC(HRC,UINT *,LPSTR,UINT *,UINT *);
  1553. int WINAPI GetMaxResultsHRC(HRC);
  1554. int WINAPI GetResultsHRC(HRC,UINT,LPHRCRESULT,UINT);
  1555. int WINAPI GetSymbolCountHRCRESULT(HRCRESULT);
  1556. int WINAPI GetSymbolsHRCRESULT(HRCRESULT,UINT,LPSYV,UINT);
  1557. int WINAPI GetWordlistHRC(HRC,LPHWL);
  1558. int WINAPI GetWordlistCoercionHRC(HRC);
  1559. int WINAPI ProcessHRC(HRC,DWORD);
  1560. int WINAPI ReadHWL(HWL,HFILE);
  1561. int WINAPI SetAlphabetHRC(HRC,ALC,LPBYTE);
  1562. int WINAPI SetAlphabetPriorityHRC(HRC,ALC,LPBYTE);
  1563. int WINAPI SetBoxAlphabetHRC(HRC,LPALC,UINT);
  1564. int WINAPI SetGuideHRC(HRC,LPGUIDE,UINT);
  1565. int WINAPI SetInternationalHRC(HRC,UINT,LPCSTR,UINT,UINT);
  1566. int WINAPI SetMaxResultsHRC(HRC,UINT);
  1567. HRECHOOK WINAPI SetResultsHookHREC(HREC,HRCRESULTHOOKPROC);
  1568. int WINAPI SetWordlistCoercionHRC(HRC,UINT);
  1569. int WINAPI SetWordlistHRC(HRC,HWL);
  1570. int WINAPI TrainHREC(HREC,LPSYV,UINT,HPENDATA,UINT);
  1571. int WINAPI UnhookResultsHookHREC(HREC,HRECHOOK);
  1572. int WINAPI WriteHWL(HWL,HFILE);
  1573. HREC WINAPI InstallRecognizer(LPSTR);
  1574. VOID WINAPI UninstallRecognizer(HREC);
  1575. WINBOOL WINAPI AddInksetInterval(HINKSET,LPINTERVAL);
  1576. HINKSET WINAPI CreateInkset(UINT);
  1577. WINBOOL WINAPI DestroyInkset(HINKSET);
  1578. int WINAPI GetInksetInterval(HINKSET,UINT,LPINTERVAL);
  1579. int WINAPI GetInksetIntervalCount(HINKSET);
  1580. int WINAPI CharacterToSymbol(LPSTR,int,LPSYV);
  1581. WINBOOL WINAPI SymbolToCharacter(LPSYV,int,LPSTR,LPINT);
  1582. #endif
  1583. #ifndef NOPENINKPUT
  1584. int WINAPI DoDefaultPenInput(HWND,UINT);
  1585. int WINAPI GetPenInput(HPCM,LPPOINT,LPVOID,UINT,UINT,LPSTROKEINFO);
  1586. int WINAPI PeekPenInput(HPCM,UINT,LPPOINT,LPVOID,UINT);
  1587. int WINAPI StartInking(HPCM,UINT,LPINKINGINFO);
  1588. HPCM WINAPI StartPenInput(HWND,UINT,LPPCMINFO,LPINT);
  1589. int WINAPI StopInking(HPCM);
  1590. int WINAPI StopPenInput(HPCM,UINT,int);
  1591. #endif
  1592. #ifndef NOPENMISC
  1593. VOID WINAPI BoundingRectFromPoints(LPPOINT,UINT,LPRECT);
  1594. WINBOOL WINAPI DPtoTP(LPPOINT,int);
  1595. UINT WINAPI GetPenAppFlags(VOID);
  1596. VOID WINAPI SetPenAppFlags(UINT,UINT);
  1597. LONG WINAPI GetPenMiscInfo(WPARAM,LPARAM);
  1598. UINT WINAPI GetVersionPenWin(VOID);
  1599. LONG WINAPI SetPenMiscInfo(WPARAM,LPARAM);
  1600. WINBOOL WINAPI TPtoDP(LPPOINT,int);
  1601. WINBOOL WINAPI CorrectWriting(HWND,LPSTR,UINT,LPVOID,DWORD,DWORD);
  1602. #ifdef JAPAN
  1603. int WINAPI CorrectWritingEx(HWND,LPSTR,UINT,LPCWX);
  1604. #endif
  1605. #ifdef JAPAN
  1606. HANDLE WINAPI GetPenResource(WPARAM);
  1607. #endif
  1608. #endif
  1609. #ifndef NOPENRC1
  1610. VOID WINAPI EmulatePen(WINBOOL);
  1611. UINT WINAPI EnumSymbols(LPSYG,UINT,ENUMPROC,LPVOID);
  1612. WINBOOL WINAPI ExecuteGesture(HWND,SYV,LPRCRESULT);
  1613. VOID WINAPI FirstSymbolFromGraph(LPSYG,LPSYV,int,LPINT);
  1614. UINT WINAPI GetGlobalRC(LPRC,LPSTR,LPSTR,int);
  1615. int WINAPI GetSymbolCount(LPSYG);
  1616. int WINAPI GetSymbolMaxLength(LPSYG);
  1617. VOID WINAPI InitRC(HWND,LPRC);
  1618. REC WINAPI ProcessWriting(HWND,LPRC);
  1619. REC WINAPI Recognize(LPRC);
  1620. REC WINAPI RecognizeData(LPRC,HPENDATA);
  1621. UINT WINAPI SetGlobalRC(LPRC,LPSTR,LPSTR);
  1622. WINBOOL WINAPI SetRecogHook(UINT,UINT,HWND);
  1623. WINBOOL WINAPI TrainContext(LPRCRESULT,LPSYE,int,LPSYC,int);
  1624. WINBOOL WINAPI TrainInk(LPRC,HPENDATA,LPSYV);
  1625. VOID WINAPI CloseRecognizer(VOID);
  1626. UINT WINAPI ConfigRecognizer(UINT,WPARAM,LPARAM);
  1627. WINBOOL WINAPI InitRecognizer(LPRC);
  1628. REC WINAPI RecognizeDataInternal(LPRC,HPENDATA,LPFUNCRESULTS);
  1629. REC WINAPI RecognizeInternal(LPRC,LPFUNCRESULTS);
  1630. WINBOOL WINAPI TrainContextInternal(LPRCRESULT,LPSYE,int,LPSYC,int);
  1631. WINBOOL WINAPI TrainInkInternal(LPRC,HPENDATA,LPSYV);
  1632. #endif
  1633. #ifndef NOPENTARGET
  1634. int WINAPI TargetPoints(LPTARGINFO,LPPOINT,DWORD,UINT,LPSTROKEINFO);
  1635. #endif
  1636. #ifndef NOPENVIRTEVENT
  1637. VOID WINAPI AtomicVirtualEvent(WINBOOL);
  1638. VOID WINAPI PostVirtualKeyEvent(UINT,WINBOOL);
  1639. VOID WINAPI PostVirtualMouseEvent(UINT,int,int);
  1640. #endif
  1641. #ifdef JAPAN
  1642. WINBOOL WINAPI KKConvert(HWND hwndConvert,HWND hwndCaller,LPSTR lpBuf,UINT cbBuf,LPPOINT lpPnt);
  1643. #endif
  1644. #endif
  1645. #ifdef __cplusplus
  1646. }
  1647. #endif
  1648. #endif