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

流媒体/Mpeg4/MP4

开发平台:

Visual C++

  1. #ifndef _XKBCONFIG_H_
  2. #define _XKBCONFIG_H_ 1
  3. /* $Xorg: XKBconfig.h,v 1.3 2000/08/17 19:46:42 cpqbld Exp $ */
  4. /************************************************************
  5.  Copyright (c) 1995 by Silicon Graphics Computer Systems, Inc.
  6.  Permission to use, copy, modify, and distribute this
  7.  software and its documentation for any purpose and without
  8.  fee is hereby granted, provided that the above copyright
  9.  notice appear in all copies and that both that copyright
  10.  notice and this permission notice appear in supporting
  11.  documentation, and that the name of Silicon Graphics not be 
  12.  used in advertising or publicity pertaining to distribution 
  13.  of the software without specific prior written permission.
  14.  Silicon Graphics makes no representation about the suitability 
  15.  of this software for any purpose. It is provided "as is"
  16.  without any express or implied warranty.
  17.  
  18.  SILICON GRAPHICS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS 
  19.  SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY 
  20.  AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL SILICON
  21.  GRAPHICS BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL 
  22.  DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, 
  23.  DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE 
  24.  OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION  WITH
  25.  THE USE OR PERFORMANCE OF THIS SOFTWARE.
  26.  ********************************************************/
  27. /* $XFree86: xc/lib/xkbfile/XKBconfig.h,v 3.5 2001/01/17 19:43:39 dawes Exp $ */
  28. typedef struct _XkbConfigRtrn *XkbConfigRtrnPtr;
  29. typedef struct _XkbConfigField *XkbConfigFieldPtr;
  30. typedef struct _XkbConfigFields *XkbConfigFieldsPtr;
  31. typedef Bool (*XkbConfigParseFunc)(
  32. FILE * /* file */,
  33. XkbConfigFieldsPtr /* fields */,
  34. XkbConfigFieldPtr /* field */,
  35. XkbDescPtr /* xkb */,
  36. XkbConfigRtrnPtr /* rtrn */
  37. );
  38. #define XkbCF_Check 0
  39. #define XkbCF_Apply 1
  40. #define XkbCF_CleanUp 2
  41. #define XkbCF_Destroy 3
  42. typedef Bool (*XkbConfigFinishFunc)(
  43. XkbConfigFieldsPtr /* fields */,
  44. XkbDescPtr /* xkb */,
  45. XkbConfigRtrnPtr /* rtrn */,
  46. int /* what */
  47. );
  48. typedef struct _XkbConfigRtrnPriv {
  49. int cfg_id;
  50. XPointer priv;
  51. struct _XkbConfigRtrnPriv * next;
  52. } XkbConfigRtrnPrivRec,*XkbConfigRtrnPrivPtr;
  53. typedef struct _XkbConfigModInfo {
  54. Bool replace;
  55. unsigned char mods;
  56. unsigned char mods_clear;
  57. unsigned short vmods;
  58. unsigned short vmods_clear;
  59. } XkbConfigModInfoRec,*XkbConfigModInfoPtr;
  60. typedef struct _XkbConfigUnboundMod {
  61. unsigned char what;
  62. unsigned char mods;
  63. unsigned short vmods;
  64. short merge;
  65. char * name;
  66. } XkbConfigUnboundModRec,*XkbConfigUnboundModPtr;
  67. #define XkbCF_MergeSet 0
  68. #define XkbCF_MergeAdd 1
  69. #define XkbCF_MergeRemove 2
  70. #define XkbCF_InitialMods (1L<<0)
  71. #define XkbCF_InternalMods (1L<<1)
  72. #define XkbCF_IgnoreLockMods (1L<<2)
  73. #define XkbCF_InitialCtrls (1L<<3)
  74. #define XkbCF_AccessXTimeout (1L<<4)
  75. #define XkbCF_AccessXTimeoutCtrlsOn (1L<<5)
  76. #define XkbCF_AccessXTimeoutCtrlsOff (1L<<6)
  77. #define XkbCF_AccessXTimeoutOptsOn (1L<<7)
  78. #define XkbCF_AccessXTimeoutOptsOff (1L<<8)
  79. #define XkbCF_GroupsWrap (1L<<9)
  80. #define XkbCF_InitialOpts (1L<<10)
  81. typedef struct _XkbConfigRtrn {
  82. unsigned defined;
  83. int error;
  84. int line;
  85. int click_volume;
  86. int bell_volume;
  87. int bell_pitch;
  88. int bell_duration;
  89. int repeat_delay;
  90. int repeat_interval;
  91. char * rules_file;
  92. char * model;
  93. char * layout;
  94. char * variant;
  95. char * options;
  96. char * keymap;
  97. char * keycodes;
  98. char * geometry;
  99. char * phys_symbols;
  100. char * symbols;
  101. char * types;
  102. char * compat;
  103. Bool replace_initial_ctrls;
  104. unsigned long initial_ctrls;
  105. unsigned long initial_ctrls_clear;
  106. Bool replace_initial_opts;
  107. unsigned short initial_opts;
  108. unsigned short initial_opts_clear;
  109. XkbConfigModInfoRec initial_mods;
  110. XkbConfigModInfoRec internal_mods;
  111. XkbConfigModInfoRec ignore_lock_mods;
  112. short num_unbound_mods;
  113. short sz_unbound_mods;
  114. XkbConfigUnboundModPtr unbound_mods;
  115. int groups_wrap;
  116. int slow_keys_delay;
  117. int debounce_delay;
  118. int mk_delay;
  119. int mk_interval;
  120. int mk_time_to_max;
  121. int mk_max_speed;
  122. int mk_curve;
  123. int ax_timeout;
  124. Bool replace_axt_ctrls_on;
  125. Bool replace_axt_ctrls_off;
  126. unsigned long axt_ctrls_on;
  127. unsigned long axt_ctrls_off;
  128. unsigned long axt_ctrls_ignore;
  129. Bool replace_axt_opts_off;
  130. Bool replace_axt_opts_on;
  131. unsigned short axt_opts_off;
  132. unsigned short axt_opts_on;
  133. unsigned short axt_opts_ignore;
  134. XkbConfigRtrnPrivPtr priv;
  135. } XkbConfigRtrnRec;
  136. typedef struct _XkbConfigField {
  137. char * field;
  138. unsigned char field_id;
  139. } XkbConfigFieldRec;
  140. typedef struct _XkbConfigFields {
  141. unsigned short cfg_id;
  142. unsigned short num_fields;
  143. XkbConfigFieldPtr fields;
  144. XkbConfigParseFunc parser;
  145. XkbConfigFinishFunc finish;
  146. XPointer priv;
  147. struct _XkbConfigFields *next;
  148. } XkbConfigFieldsRec;
  149. #define XkbCF_EOF -1
  150. #define XkbCF_Unknown  0
  151. #define XkbCF_EOL  1
  152. #define XkbCF_Semi  2
  153. #define XkbCF_Equals  3
  154. #define XkbCF_PlusEquals  4
  155. #define XkbCF_MinusEquals  5
  156. #define XkbCF_Plus  6
  157. #define XkbCF_Minus  7
  158. #define XkbCF_String 10
  159. #define XkbCF_Ident 11
  160. #define XkbCF_Integer 12
  161. #define XkbCF_UnterminatedString 100
  162. #define XkbCF_BadAlloc 101
  163. #define XkbCF_MissingIdent 102
  164. #define XkbCF_MissingEquals 103
  165. #define XkbCF_ExpectedEOS 104
  166. #define XkbCF_ExpectedBoolean 105
  167. #define XkbCF_ExpectedInteger 106
  168. #define XkbCF_ExpectedString 107
  169. #define XkbCF_ExpectedModifier 108
  170. #define XkbCF_ExpectedControl 109
  171. #define XkbCF_ExpectedAXOption 110
  172. #define XkbCF_ExpectedOperator 111
  173. #define XkbCF_ExpectedOORGroupBehavior 112
  174. typedef union {
  175. int ival;
  176. char * str;
  177. } XkbCFScanResultRec,*XkbCFScanResultPtr;
  178. extern XkbConfigFieldsPtr XkbCFDflts;
  179. _XFUNCPROTOBEGIN
  180. extern int XkbCFScan(
  181. FILE * /* file */,
  182. XkbCFScanResultPtr /* val_rtrn */,
  183. XkbConfigRtrnPtr /* rtrn */
  184. );
  185. extern XkbConfigFieldsPtr XkbCFDup(
  186. XkbConfigFieldsPtr /* fields */
  187. );
  188. extern XkbConfigFieldsPtr XkbCFFree(
  189. XkbConfigFieldsPtr /* fields */,
  190. Bool /* all */
  191. );
  192. extern XkbConfigUnboundModPtr XkbCFAddModByName(
  193. XkbConfigRtrnPtr /* rtrn */,
  194. int /* what */,
  195. char * /* name */,
  196. Bool /* merge */,
  197. XkbConfigUnboundModPtr /* last */
  198. );
  199. extern Bool XkbCFBindMods(
  200. XkbConfigRtrnPtr /* rtrn */,
  201. XkbDescPtr /* xkb */
  202. );
  203. extern Bool XkbCFApplyMods(
  204. XkbConfigRtrnPtr /* rtrn */,
  205. int /* what */,
  206. XkbConfigModInfoPtr /* info */
  207. );
  208. extern Bool XkbCFApplyRtrnValues(
  209. XkbConfigRtrnPtr /* rtrn */,
  210. XkbConfigFieldsPtr /* fields */,
  211. XkbDescPtr /* xkb */
  212. );
  213. extern XkbConfigRtrnPrivPtr XkbCFAddPrivate(
  214. XkbConfigRtrnPtr /* rtrn */,
  215. XkbConfigFieldsPtr /* fields */,
  216. XPointer /* ptr */
  217. );
  218. extern void XkbCFFreeRtrn(
  219. XkbConfigRtrnPtr /* rtrn */,
  220. XkbConfigFieldsPtr /* fields */,
  221. XkbDescPtr /* xkb */
  222. );
  223. extern Bool XkbCFParse(
  224. FILE * /* file */,
  225. XkbConfigFieldsPtr /* fields */,
  226. XkbDescPtr /* xkb */,
  227. XkbConfigRtrnPtr /* rtrn */
  228. );
  229. extern void XkbCFReportError(
  230. FILE * /* file */,
  231. char * /* name */,
  232. int /* error */,
  233. int /* line */
  234. );
  235. _XFUNCPROTOEND
  236. #endif /* _XKBCONFIG_H_ */