XKMformat.h
上传用户:lctgjx
上传日期:2022-06-04
资源大小:8887k
文件大小:7k
源码类别:

流媒体/Mpeg4/MP4

开发平台:

Visual C++

  1. /* $Xorg: XKMformat.h,v 1.3 2000/08/17 19:46:43 cpqbld Exp $ */
  2. /************************************************************
  3.  Copyright (c) 1994 by Silicon Graphics Computer Systems, Inc.
  4.  Permission to use, copy, modify, and distribute this
  5.  software and its documentation for any purpose and without
  6.  fee is hereby granted, provided that the above copyright
  7.  notice appear in all copies and that both that copyright
  8.  notice and this permission notice appear in supporting
  9.  documentation, and that the name of Silicon Graphics not be 
  10.  used in advertising or publicity pertaining to distribution 
  11.  of the software without specific prior written permission.
  12.  Silicon Graphics makes no representation about the suitability 
  13.  of this software for any purpose. It is provided "as is"
  14.  without any express or implied warranty.
  15.  
  16.  SILICON GRAPHICS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS 
  17.  SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY 
  18.  AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL SILICON
  19.  GRAPHICS BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL 
  20.  DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, 
  21.  DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE 
  22.  OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION  WITH
  23.  THE USE OR PERFORMANCE OF THIS SOFTWARE.
  24.  ********************************************************/
  25. /* $XFree86$ */
  26. #ifndef _XKMFORMAT_H_
  27. #define _XKMFORMAT_H_ 1
  28. #include <X11/extensions/XKB.h>
  29. #include <X11/extensions/XKBproto.h>
  30. #include <X11/extensions/XKM.h>
  31. typedef struct _xkmFileInfo {
  32. CARD8 type;
  33. CARD8 min_kc;
  34. CARD8 max_kc;
  35. CARD8 num_toc;
  36. CARD16 present B16;
  37. CARD16 pad B16;
  38. } xkmFileInfo;
  39. #define sz_xkmFileInfo 8
  40. typedef struct _xkmSectionInfo {
  41. CARD16 type B16;
  42. CARD16 format B16;
  43. CARD16 size B16;
  44. CARD16 offset B16;
  45. } xkmSectionInfo;
  46. #define sz_xkmSectionInfo 8
  47. typedef struct _xkmKeyTypeDesc {
  48. CARD8 realMods;
  49. CARD8 numLevels;
  50. CARD16 virtualMods B16;
  51. CARD8 nMapEntries;
  52. CARD8 nLevelNames;
  53. CARD8 preserve;
  54. CARD8 pad;
  55. } xkmKeyTypeDesc;
  56. #define sz_xkmKeyTypeDesc 8
  57. typedef struct _xkmKTMapEntryDesc {
  58. CARD8 level;
  59. CARD8 realMods;
  60. CARD16 virtualMods B16;
  61. } xkmKTMapEntryDesc;
  62. #define sz_xkmKTMapEntryDesc 4
  63. typedef struct _xkmModsDesc {
  64. CARD8 realMods;
  65. CARD8 pad;
  66. CARD16 virtualMods B16;
  67. } xkmModsDesc;
  68. #define sz_xkmModsDesc 4
  69. typedef struct _xkmVModMapDesc {
  70. CARD8 key;
  71. CARD8 pad;
  72. CARD16 vmods B16;
  73. } xkmVModMapDesc;
  74. #define sz_xkmVModMapDesc 4
  75. typedef struct _xkmSymInterpretDesc {
  76. CARD32 sym B32;
  77. CARD8 mods;
  78. CARD8 match;
  79. CARD8 virtualMod;
  80. CARD8 flags;
  81. CARD8 actionType;
  82. CARD8 actionData[7];
  83. } xkmSymInterpretDesc;
  84. #define sz_xkmSymInterpretDesc 16
  85. typedef struct _xkmBehaviorDesc {
  86. CARD8 type;
  87. CARD8 data;
  88. CARD16 pad B16;
  89. } xkmBehaviorDesc;
  90. #define sz_xkmBehaviorDesc 4
  91. typedef struct _xkmActionDesc {
  92. CARD8 type;
  93. CARD8 data[7];
  94. } xkmActionDesc;
  95. #define sz_xkmActionDesc 8
  96. #define XkmKeyHasTypes (0x0f)
  97. #define XkmKeyHasGroup1Type (1<<0)
  98. #define XkmKeyHasGroup2Type (1<<1)
  99. #define XkmKeyHasGroup3Type (1<<2)
  100. #define XkmKeyHasGroup4Type (1<<3)
  101. #define XkmKeyHasActions (1<<4)
  102. #define XkmKeyHasBehavior (1<<5)
  103. #define XkmRepeatingKey (1<<6)
  104. #define XkmNonRepeatingKey (1<<7)
  105. typedef struct _xkmKeySymMapDesc {
  106. CARD8 width;
  107. CARD8 num_groups;
  108. CARD8 modifier_map;
  109. CARD8 flags;
  110. } xkmKeySymMapDesc;
  111. #define sz_xkmKeySymMapDesc 4
  112. typedef struct _xkmIndicatorMapDesc {
  113. CARD8 indicator;
  114. CARD8 flags;
  115. CARD8 which_mods;
  116. CARD8 real_mods;
  117. CARD16 vmods B16;
  118. CARD8 which_groups;
  119. CARD8 groups;
  120. CARD32 ctrls B32;
  121. } xkmIndicatorMapDesc;
  122. #define sz_xkmIndicatorMapDesc 12
  123. typedef struct _xkmGeometryDesc {
  124. CARD16 width_mm B16;
  125. CARD16 height_mm B16;
  126. CARD8 base_color_ndx;
  127. CARD8 label_color_ndx;
  128. CARD16 num_properties B16;
  129. CARD16 num_colors B16;
  130. CARD16 num_shapes B16;
  131. CARD16 num_sections B16;
  132. CARD16 num_doodads B16;
  133. CARD16 num_key_aliases B16;
  134. CARD16 pad1 B16;
  135. } xkmGeometryDesc;
  136. #define sz_xkmGeometryDesc 20
  137. typedef struct _xkmPointDesc {
  138. INT16 x B16;
  139. INT16 y B16;
  140. } xkmPointDesc;
  141. #define sz_xkmPointDesc 4
  142. typedef struct _xkmOutlineDesc {
  143. CARD8 num_points;
  144. CARD8 corner_radius;
  145. CARD16 pad B16;
  146. } xkmOutlineDesc;
  147. #define sz_xkmOutlineDesc 4
  148. typedef struct _xkmShapeDesc {
  149. CARD8 num_outlines;
  150. CARD8 primary_ndx;
  151. CARD8 approx_ndx;
  152. CARD8 pad;
  153. } xkmShapeDesc;
  154. #define sz_xkmShapeDesc 4
  155. typedef struct _xkmSectionDesc {
  156. INT16 top B16;
  157. INT16 left B16;
  158. CARD16 width B16;
  159. CARD16 height B16;
  160. INT16 angle B16;
  161. CARD8 priority;
  162. CARD8 num_rows;
  163. CARD8 num_doodads;
  164. CARD8 num_overlays;
  165. CARD16 pad2 B16;
  166. } xkmSectionDesc;
  167. #define sz_xkmSectionDesc 16
  168. typedef struct _xkmRowDesc {
  169. INT16 top B16;
  170. INT16 left B16;
  171. CARD8 num_keys;
  172. BOOL vertical;
  173. CARD16 pad B16;
  174. } xkmRowDesc;
  175. #define sz_xkmRowDesc 8
  176. typedef struct _xkmKeyDesc {
  177. CARD8 name[XkbKeyNameLength];
  178. INT16 gap B16;
  179. CARD8 shape_ndx;
  180. CARD8 color_ndx;
  181. } xkmKeyDesc;
  182. #define sz_xkmKeyDesc 8
  183. typedef struct _xkmOverlayDesc {
  184. CARD8 num_rows;
  185. CARD8 pad1;
  186. CARD16 pad2 B16;
  187. } xkmOverlayDesc;
  188. #define sz_xkmOverlayDesc 4
  189. typedef struct _xkmOverlayRowDesc {
  190. CARD8 row_under;
  191. CARD8 num_keys;
  192. CARD16 pad B16;
  193. } xkmOverlayRowDesc;
  194. #define sz_xkmOverlayRowDesc 4
  195. typedef struct _xkmOverlayKeyDesc {
  196. char over[XkbKeyNameLength];
  197. char under[XkbKeyNameLength];
  198. } xkmOverlayKeyDesc;
  199. #define sz_xkmOverlayKeyDesc 8
  200. typedef struct _xkmShapeDoodadDesc {
  201. CARD8 type;
  202. CARD8 priority;
  203. INT16 top B16;
  204. INT16 left B16;
  205. INT16 angle B16;
  206. CARD8 color_ndx;
  207. CARD8 shape_ndx;
  208. CARD16 pad B16;
  209. CARD32 pad1 B32;
  210. } xkmShapeDoodadDesc;
  211. #define sz_xkmShapeDoodadDesc 16
  212. typedef struct _xkmTextDoodadDesc {
  213. CARD8   type;
  214. CARD8   priority;
  215. INT16   top B16;
  216. INT16   left B16;
  217. INT16   angle B16;
  218. CARD16 width B16;
  219. CARD16 height B16;
  220. CARD8   color_ndx;
  221. CARD8 pad1;
  222. CARD16 pad2 B16;
  223. } xkmTextDoodadDesc;
  224. #define sz_xkmTextDoodadDesc 16
  225. typedef struct _xkmIndicatorDoodadDesc {
  226. CARD8 type;
  227. CARD8 priority;
  228. INT16 top B16;
  229. INT16 left B16;
  230. CARD8 shape_ndx;
  231. CARD8 on_color_ndx;
  232. CARD8 off_color_ndx;
  233. CARD8 pad1;
  234. CARD16 pad2 B16;
  235. CARD32 pad3 B32;
  236. } xkmIndicatorDoodadDesc;
  237. #define sz_xkmIndicatorDoodadDesc 16
  238. typedef struct _xkmLogoDoodadDesc {
  239. CARD8 type;
  240. CARD8 priority;
  241. INT16 top B16;
  242. INT16 left B16;
  243. INT16 angle B16;
  244. CARD8 color_ndx;
  245. CARD8 shape_ndx;
  246. CARD16 pad B16;
  247. CARD32 pad1 B32;
  248. } xkmLogoDoodadDesc;
  249. #define sz_xkmLogoDoodadDesc 16
  250. typedef struct _xkmAnyDoodadDesc {
  251. CARD8 type;
  252. CARD8 priority;
  253. INT16 top B16;
  254. INT16 left B16;
  255. CARD16 pad1 B16;
  256. CARD32 pad2 B32;
  257. CARD32 pad3 B32;
  258. } xkmAnyDoodadDesc;
  259. #define sz_xkmAnyDoodadDesc 16
  260. typedef union _xkmDoodadDesc {
  261. xkmAnyDoodadDesc any;
  262. xkmShapeDoodadDesc shape;
  263. xkmTextDoodadDesc text;
  264. xkmIndicatorDoodadDesc indicator;
  265. xkmLogoDoodadDesc logo;
  266. } xkmDoodadDesc;
  267. #define sz_xkmDoodadDesc 16
  268. #endif /* _XKMFORMAT_H_ */