_fallcint.h 22 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875
  1. /*
  2. * CDE - Common Desktop Environment
  3. *
  4. * Copyright (c) 1993-2012, The Open Group. All rights reserved.
  5. *
  6. * These libraries and programs are free software; you can
  7. * redistribute them and/or modify them under the terms of the GNU
  8. * Lesser General Public License as published by the Free Software
  9. * Foundation; either version 2 of the License, or (at your option)
  10. * any later version.
  11. *
  12. * These libraries and programs are distributed in the hope that
  13. * they will be useful, but WITHOUT ANY WARRANTY; without even the
  14. * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
  15. * PURPOSE. See the GNU Lesser General Public License for more
  16. * details.
  17. *
  18. * You should have received a copy of the GNU Lesser General Public
  19. * License along with these libraries and programs; if not, write
  20. * to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
  21. * Floor, Boston, MA 02110-1301 USA
  22. */
  23. /* Xlcint.h 1.4 - Fujitsu source for CDEnext 95/12/07 10:53:09 */
  24. /* $XConsortium: _fallcint.h /main/1 1996/04/08 15:20:05 cde-fuj $ */
  25. /*
  26. Copyright (c) 1991 X Consortium
  27. Permission is hereby granted, free of charge, to any person obtaining
  28. a copy of this software and associated documentation files (the
  29. "Software"), to deal in the Software without restriction, including
  30. without limitation the rights to use, copy, modify, merge, publish,
  31. distribute, sublicense, and/or sell copies of the Software, and to
  32. permit persons to whom the Software is furnished to do so, subject to
  33. the following conditions:
  34. The above copyright notice and this permission notice shall be included
  35. in all copies or substantial portions of the Software.
  36. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
  37. OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
  38. MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
  39. IN NO EVENT SHALL THE X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR
  40. OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
  41. ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
  42. OTHER DEALINGS IN THE SOFTWARE.
  43. Except as contained in this notice, the name of the X Consortium shall
  44. not be used in advertising or otherwise to promote the sale, use or
  45. other dealings in this Software without prior written authorization
  46. from the X Consortium.
  47. */
  48. /*
  49. * Copyright 1990, 1991 by OMRON Corporation, NTT Software Corporation,
  50. * and Nippon Telegraph and Telephone Corporation
  51. * Copyright 1991 by the Open Software Foundation
  52. * Copyright 1993 by the TOSHIBA Corp.
  53. * Copyright 1993, 1994 by Sony Corporation
  54. * Copyright 1993, 1994 by the FUJITSU LIMITED
  55. *
  56. * Permission to use, copy, modify, distribute, and sell this software and its
  57. * documentation for any purpose is hereby granted without fee, provided that
  58. * the above copyright notice appear in all copies and that both that
  59. * copyright notice and this permission notice appear in supporting
  60. * documentation, and that the names of OMRON, NTT Software, NTT, Open
  61. * Software Foundation, and Sony Corporation not be used in advertising
  62. * or publicity pertaining to distribution of the software without specific,
  63. * written prior permission. OMRON, NTT Software, NTT, Open Software
  64. * Foundation, and Sony Corporation make no representations about the
  65. * suitability of this software for any purpose. It is provided "as is"
  66. * without express or implied warranty.
  67. *
  68. * OMRON, NTT SOFTWARE, NTT, OPEN SOFTWARE FOUNDATION, AND SONY
  69. * CORPORATION DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
  70. * ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT
  71. * SHALL OMRON, NTT SOFTWARE, NTT, OPEN SOFTWARE FOUNDATION, OR SONY
  72. * CORPORATION BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
  73. * ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER
  74. * IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
  75. * OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
  76. *
  77. * Authors: Li Yuhong OMRON Corporation
  78. * Tatsuya Kato NTT Software Corporation
  79. * Hiroshi Kuribayashi OMRON Coproration
  80. * Muneiyoshi Suzuki Nippon Telegraph and Telephone Co.
  81. *
  82. * M. Collins OSF
  83. * Katsuhisa Yano TOSHIBA Corp.
  84. * Makoto Wakamatsu Sony Corporation
  85. * Takashi Fujiwara FUJITSU LIMITED
  86. */
  87. /*
  88. * (c) Copyright 1995 FUJITSU LIMITED
  89. * This is source code modified by FUJITSU LIMITED under the Joint
  90. * Development Agreement for the CDEnext PST.
  91. * This is unpublished proprietary source code of FUJITSU LIMITED
  92. */
  93. #ifndef _XLCINT_H_
  94. #define _XLCINT_H_
  95. #include <X11/Xresource.h>
  96. #include "_falutil.h"
  97. #include "_falvarargs.h"
  98. typedef Bool (*XFilterEventProc)(
  99. Display* /* display */,
  100. Window /* window */,
  101. XEvent* /* event */,
  102. XPointer /* client_data */
  103. );
  104. typedef struct _XIMFilter {
  105. struct _XIMFilter *next;
  106. Window window;
  107. unsigned long event_mask;
  108. int start_type, end_type;
  109. XFilterEventProc filter;
  110. XPointer client_data;
  111. } XFilterEventRec, *XFilterEventList;
  112. typedef struct {
  113. char *name;
  114. XPointer value;
  115. } XIMArg;
  116. #ifdef offsetof
  117. #define XOffsetOf(s_type,field) offsetof(s_type,field)
  118. #else
  119. #define XOffsetOf(s_type,field) ((unsigned int)&(((s_type*)NULL)->field))
  120. #endif
  121. #define XIMNumber(arr) ((unsigned int) (sizeof(arr) / sizeof(arr[0])))
  122. /*
  123. * define secondary data structs which are part of Input Methods
  124. * and Input Context
  125. */
  126. typedef struct {
  127. char *resource_name; /* Resource string */
  128. XrmQuark xrm_name; /* Resource name quark */
  129. int resource_size; /* Size in bytes of data */
  130. long resource_offset; /* Offset from base */
  131. unsigned short mode; /* Read Write Permission */
  132. unsigned short id; /* Input Method Protocol */
  133. } XIMResource, *XIMResourceList;
  134. /*
  135. * data block describing the visual attributes associated with
  136. * an input context
  137. */
  138. typedef struct {
  139. XRectangle area;
  140. XRectangle area_needed;
  141. XPoint spot_location;
  142. Colormap colormap;
  143. Atom std_colormap;
  144. unsigned long foreground;
  145. unsigned long background;
  146. Pixmap background_pixmap;
  147. XFontSet fontset;
  148. int line_spacing;
  149. Cursor cursor;
  150. XIMCallback start_callback;
  151. XIMCallback done_callback;
  152. XIMCallback draw_callback;
  153. XIMCallback caret_callback;
  154. XIMPreeditState preedit_state;
  155. XIMCallback state_notify_callback;
  156. } ICPreeditAttributes, *ICPreeditAttributesPtr;
  157. typedef struct {
  158. XRectangle area;
  159. XRectangle area_needed;
  160. Colormap colormap;
  161. Atom std_colormap;
  162. unsigned long foreground;
  163. unsigned long background;
  164. Pixmap background_pixmap;
  165. XFontSet fontset;
  166. int line_spacing;
  167. Cursor cursor;
  168. XIMCallback start_callback;
  169. XIMCallback done_callback;
  170. XIMCallback draw_callback;
  171. } ICStatusAttributes, *ICStatusAttributesPtr;
  172. /*
  173. * Methods for Xrm parsing
  174. */
  175. typedef void (*XmbInitProc)(
  176. XPointer /* state */
  177. );
  178. typedef char (*XmbCharProc)(
  179. XPointer /* state */,
  180. char* /* str */,
  181. int* /* lenp */
  182. );
  183. typedef void (*XmbFinishProc)(
  184. XPointer /* state */
  185. );
  186. typedef char* (*XlcNameProc)(
  187. XPointer /* state */
  188. );
  189. typedef void (*XrmDestroyProc)(
  190. XPointer /* state */
  191. );
  192. typedef struct {
  193. XmbInitProc mbinit;
  194. XmbCharProc mbchar;
  195. XmbFinishProc mbfinish;
  196. XlcNameProc lcname;
  197. XrmDestroyProc destroy;
  198. } XrmMethodsRec, *XrmMethods;
  199. typedef struct _XLCd *XLCd; /* need forward reference */
  200. /*
  201. * define an LC, it's methods, and data.
  202. */
  203. typedef void (*XCloseLCProc)(
  204. XLCd /* lcd */
  205. );
  206. typedef char* (*XlcMapModifiersProc)(
  207. XLCd /* lcd */,
  208. char* /* user_mods */,
  209. char* /* prog_mods */
  210. );
  211. typedef XOM (*XOpenOMProc)(
  212. XLCd /* lcd */,
  213. Display* /* display */,
  214. XrmDatabase /* rdb */,
  215. const char* /* res_name */,
  216. const char* /* res_class */
  217. );
  218. typedef XIM (*XOpenIMProc)(
  219. XLCd /* lcd */,
  220. Display* /* display */,
  221. XrmDatabase /* rdb */,
  222. char* /* res_name */,
  223. char* /* res_class */
  224. );
  225. typedef Bool (*XRegisterIMInstantiateCBProc)(
  226. XLCd /* lcd */,
  227. Display* /* display */,
  228. XrmDatabase /* rdb */,
  229. char* /* res_name */,
  230. char* /* res_class */,
  231. XIMProc /* callback */,
  232. XPointer* /* client_data */
  233. );
  234. typedef Bool (*XUnregisterIMInstantiateCBProc)(
  235. XLCd /* lcd */,
  236. Display* /* display */,
  237. XrmDatabase /* rdb */,
  238. char* /* res_name */,
  239. char* /* res_class */,
  240. XIMProc /* callback */,
  241. XPointer* /* client_data */
  242. );
  243. typedef XrmMethods (*XrmInitParseInfoProc)(
  244. XLCd /* lcd */,
  245. XPointer* /* state */
  246. );
  247. typedef int (*falmbTextPropertyToTextListProc)(
  248. XLCd /* lcd */,
  249. Display* /* display */,
  250. XTextProperty* /* text_prop */,
  251. char*** /* list_return */,
  252. int* /* count_return */
  253. );
  254. typedef int (*falwcTextPropertyToTextListProc)(
  255. XLCd /* lcd */,
  256. Display* /* display */,
  257. XTextProperty* /* text_prop */,
  258. wchar_t*** /* list_return */,
  259. int* /* count_return */
  260. );
  261. typedef int (*falmbTextListToTextPropertyProc)(
  262. XLCd /* lcd */,
  263. Display* /* display */,
  264. char** /* list */,
  265. int /* count */,
  266. XICCEncodingStyle /* style */,
  267. XTextProperty* /* text_prop_return */
  268. );
  269. typedef int (*falwcTextListToTextPropertyProc)(
  270. XLCd /* lcd */,
  271. Display* /* display */,
  272. wchar_t** /* list */,
  273. int /* count */,
  274. XICCEncodingStyle /* style */,
  275. XTextProperty* /* text_prop_return */
  276. );
  277. typedef void (*falwcFreeStringListProc)(
  278. XLCd /* lcd */,
  279. wchar_t** /* list */
  280. );
  281. typedef char* (*falDefaultStringProc)(
  282. XLCd /* lcd */
  283. );
  284. typedef struct {
  285. XCloseLCProc close;
  286. XlcMapModifiersProc map_modifiers;
  287. XOpenOMProc open_om;
  288. XOpenIMProc open_im;
  289. XrmInitParseInfoProc init_parse_info;
  290. falmbTextPropertyToTextListProc mb_text_prop_to_list;
  291. falwcTextPropertyToTextListProc wc_text_prop_to_list;
  292. falmbTextListToTextPropertyProc mb_text_list_to_prop;
  293. falwcTextListToTextPropertyProc wc_text_list_to_prop;
  294. falwcFreeStringListProc wc_free_string_list;
  295. falDefaultStringProc default_string;
  296. XRegisterIMInstantiateCBProc register_callback;
  297. XUnregisterIMInstantiateCBProc unregister_callback;
  298. } XLCdMethodsRec, *XLCdMethods;
  299. typedef struct {
  300. char* name; /* name of this LC */
  301. char* modifiers; /* modifiers of locale */
  302. } XLCdCoreRec, *XLCdCore;
  303. typedef struct _XLCd {
  304. XLCdMethods methods; /* methods of this LC */
  305. XLCdCore core; /* data of this LC */
  306. XPointer opaque; /* LDX specific data */
  307. } XLCdRec;
  308. typedef int XlcPosition;
  309. #define XlcHead 0
  310. #define XlcTail -1
  311. typedef struct {
  312. char *name;
  313. XPointer value;
  314. } XlcArg, *XlcArgList;
  315. typedef struct _XlcResource {
  316. char *name;
  317. XrmQuark xrm_name;
  318. int size;
  319. int offset;
  320. unsigned long mask;
  321. } XlcResource, *XlcResourceList;
  322. #define XlcCreateMask (1L<<0)
  323. #define XlcDefaultMask (1L<<1)
  324. #define XlcGetMask (1L<<2)
  325. #define XlcSetMask (1L<<3)
  326. #define XlcIgnoreMask (1L<<4)
  327. #define XlcNumber(arr) (sizeof(arr) / sizeof(arr[0]))
  328. typedef Status (*XCloseOMProc)(
  329. XOM /* om */
  330. );
  331. typedef char* (*XSetOMValuesProc)(
  332. XOM /* om */,
  333. XlcArgList /* args */,
  334. int /* num_args */
  335. );
  336. typedef char* (*XGetOMValuesProc)(
  337. XOM /* om */,
  338. XlcArgList /* args */,
  339. int /* num_args */
  340. );
  341. typedef XOC (*XCreateOCProc)(
  342. XOM /* om */,
  343. XlcArgList /* args */,
  344. int /* num_args */
  345. );
  346. typedef struct _XOMMethodsRec {
  347. XCloseOMProc close;
  348. XSetOMValuesProc set_values;
  349. XGetOMValuesProc get_values;
  350. XCreateOCProc create_oc;
  351. } XOMMethodsRec, *XOMMethods;
  352. typedef struct _XOMCoreRec {
  353. XLCd lcd; /* lcd */
  354. Display *display; /* display */
  355. XrmDatabase rdb; /* database */
  356. char *res_name; /* resource name */
  357. char *res_class; /* resource class */
  358. XOC oc_list; /* xoc list */
  359. XlcResourceList resources; /* xom resources */
  360. int num_resources; /* number of xom resources */
  361. XOMCharSetList required_charset; /* required charset list */
  362. XOMOrientation orientation_list; /* orientation list */
  363. Bool directional_dependent; /* directional-dependent */
  364. Bool contextual_drawing; /* contextual drawing */
  365. Bool context_dependent; /* context-dependent drawing */
  366. } XOMCoreRec, *XOMCore;
  367. typedef struct _XOM {
  368. XOMMethods methods;
  369. XOMCoreRec core;
  370. } XOMRec;
  371. typedef void (*XDestroyOCProc)(
  372. XOC /* oc */
  373. );
  374. typedef char* (*XSetOCValuesProc)(
  375. XOC /* oc */,
  376. XlcArgList /* args */,
  377. int /* num_args */
  378. );
  379. typedef char* (*XGetOCValuesProc)(
  380. XOC /* oc */,
  381. XlcArgList /* args */,
  382. int /* num_args */
  383. );
  384. /*
  385. * X Font Sets are an instantiable object, so we define it, the
  386. * object itself, a method list and data
  387. */
  388. /*
  389. * XFontSet object method list
  390. */
  391. typedef int (*XmbTextEscapementProc)(
  392. XFontSet /* font_set */,
  393. const char* /* text */,
  394. int /* text_len */
  395. );
  396. typedef int (*XmbTextExtentsProc)(
  397. XFontSet /* font_set */,
  398. const char* /* text */,
  399. int /* text_len */,
  400. XRectangle* /* overall_ink_extents */,
  401. XRectangle* /* overall_logical_extents */
  402. );
  403. typedef Status (*XmbTextPerCharExtentsProc)(
  404. XFontSet /* font_set */,
  405. const char* /* text */,
  406. int /* text_len */,
  407. XRectangle* /* ink_extents_buffer */,
  408. XRectangle* /* logical_extents_buffer */,
  409. int /* buffer_size */,
  410. int* /* num_chars */,
  411. XRectangle* /* max_ink_extents */,
  412. XRectangle* /* max_logical_extents */
  413. );
  414. typedef int (*XmbDrawStringProc)(
  415. Display* /* display */,
  416. Drawable /* drawable */,
  417. XFontSet /* font_set */,
  418. GC /* gc */,
  419. int /* x */,
  420. int /* y */,
  421. const char* /* text */,
  422. int /* text_len */
  423. );
  424. typedef void (*XmbDrawImageStringProc)(
  425. Display* /* display */,
  426. Drawable /* drawable */,
  427. XFontSet /* font_set */,
  428. GC /* gc */,
  429. int /* x */,
  430. int /* y */,
  431. const char* /* text */,
  432. int /* text_len */
  433. );
  434. typedef int (*XwcTextEscapementProc)(
  435. XFontSet /* font_set */,
  436. const wchar_t* /* text */,
  437. int /* text_len */
  438. );
  439. typedef int (*XwcTextExtentsProc)(
  440. XFontSet /* font_set */,
  441. const wchar_t* /* text */,
  442. int /* text_len */,
  443. XRectangle* /* overall_ink_extents */,
  444. XRectangle* /* overall_logical_extents */
  445. );
  446. typedef Status (*XwcTextPerCharExtentsProc)(
  447. XFontSet /* font_set */,
  448. const wchar_t* /* text */,
  449. int /* text_len */,
  450. XRectangle* /* ink_extents_buffer */,
  451. XRectangle* /* logical_extents_buffer */,
  452. int /* buffer_size */,
  453. int* /* num_chars */,
  454. XRectangle* /* max_ink_extents */,
  455. XRectangle* /* max_logical_extents */
  456. );
  457. typedef int (*XwcDrawStringProc)(
  458. Display* /* display */,
  459. Drawable /* drawable */,
  460. XFontSet /* font_set */,
  461. GC /* gc */,
  462. int /* x */,
  463. int /* y */,
  464. const wchar_t* /* text */,
  465. int /* text_len */
  466. );
  467. typedef void (*XwcDrawImageStringProc)(
  468. Display* /* display */,
  469. Drawable /* drawable */,
  470. XFontSet /* font_set */,
  471. GC /* gc */,
  472. int /* x */,
  473. int /* y */,
  474. const wchar_t* /* text */,
  475. int /* text_len */
  476. );
  477. typedef struct {
  478. XDestroyOCProc destroy;
  479. XSetOCValuesProc set_values;
  480. XGetOCValuesProc get_values;
  481. /* multi-byte text drawing methods */
  482. XmbTextEscapementProc mb_escapement;
  483. XmbTextExtentsProc mb_extents;
  484. XmbTextPerCharExtentsProc mb_extents_per_char;
  485. XmbDrawStringProc mb_draw_string;
  486. XmbDrawImageStringProc mb_draw_image_string;
  487. /* wide character text drawing methods */
  488. XwcTextEscapementProc wc_escapement;
  489. XwcTextExtentsProc wc_extents;
  490. XwcTextPerCharExtentsProc wc_extents_per_char;
  491. XwcDrawStringProc wc_draw_string;
  492. XwcDrawImageStringProc wc_draw_image_string;
  493. } XOCMethodsRec, *XOCMethods;
  494. /*
  495. * XOC independent data
  496. */
  497. typedef struct {
  498. XOM om; /* XOM */
  499. XOC next; /* next XOC */
  500. XlcResourceList resources; /* xoc resources */
  501. int num_resources; /* number of xoc resources */
  502. char *base_name_list; /* base font name list */
  503. Bool om_automatic; /* OM Automatic */
  504. XOMFontInfo font_info; /* font info */
  505. XFontSetExtents font_set_extents; /* font set extents */
  506. char *default_string; /* default string */
  507. XOMCharSetList missing_list; /* missing charset list */
  508. XOrientation orientation; /* orientation */
  509. char *res_name; /* resource name */
  510. char *res_class; /* resource class */
  511. } XOCCoreRec, *XOCCore;
  512. typedef struct _XOC {
  513. XOCMethods methods;
  514. XOCCoreRec core;
  515. } XOCRec;
  516. /*
  517. * X Input Managers are an instantiable object, so we define it, the
  518. * object itself, a method list and data.
  519. */
  520. /*
  521. * an Input Manager object method list
  522. */
  523. typedef struct {
  524. Status (*close)(
  525. XIM
  526. );
  527. char* (*set_values)(
  528. XIM, XIMArg*
  529. );
  530. char* (*get_values)(
  531. XIM, XIMArg*
  532. );
  533. XIC (*create_ic)(
  534. XIM, XIMArg*
  535. );
  536. int (*ctstombs)(
  537. XIM, char*, int, char*, int, Status *
  538. );
  539. int (*ctstowcs)(
  540. XIM, char*, int, wchar_t*, int, Status *
  541. );
  542. } XIMMethodsRec, *XIMMethods;
  543. /*
  544. * Input Manager LC independent data
  545. */
  546. typedef struct {
  547. XLCd lcd; /* LC of this input method */
  548. XIC ic_chain; /* list of ICs for this IM */
  549. Display * display; /* display */
  550. XrmDatabase rdb;
  551. char * res_name;
  552. char * res_class;
  553. XIMValuesList *im_values_list;
  554. XIMValuesList *ic_values_list;
  555. XIMStyles *styles;
  556. XIMCallback destroy_callback;
  557. char * im_name; /* XIMMODIFIER name */
  558. XIMResourceList im_resources; /* compiled IM resource list */
  559. unsigned int im_num_resources;
  560. XIMResourceList ic_resources; /* compiled IC resource list */
  561. unsigned int ic_num_resources;
  562. Bool visible_position;
  563. } XIMCoreRec, *XIMCore;
  564. /*
  565. * An X Input Manager (IM). Implementations may need to extend this data
  566. * structure to accommodate additional data, state information etc.
  567. */
  568. typedef struct _XIM {
  569. XIMMethods methods; /* method list of this IM */
  570. XIMCoreRec core; /* data of this IM */
  571. } XIMRec;
  572. /*
  573. * X Input Contexts (IC) are an instantiable object, so we define it, the
  574. * object itself, a method list and data for this object
  575. */
  576. /*
  577. * Input Context method list
  578. */
  579. typedef struct {
  580. void (*destroy)(
  581. XIC
  582. );
  583. void (*set_focus)(
  584. XIC
  585. );
  586. void (*unset_focus)(
  587. XIC
  588. );
  589. char* (*set_values)(
  590. XIC, XIMArg*
  591. );
  592. char* (*get_values)(
  593. XIC, XIMArg*
  594. );
  595. char* (*mb_reset)(
  596. XIC
  597. );
  598. wchar_t* (*wc_reset)(
  599. XIC
  600. );
  601. int (*mb_lookup_string)(
  602. XIC, XKeyEvent*, char*, int, KeySym*, Status*
  603. );
  604. int (*wc_lookup_string)(
  605. XIC, XKeyEvent*, wchar_t*, int, KeySym*, Status*
  606. );
  607. } XICMethodsRec, *XICMethods;
  608. /*
  609. * Input Context LC independent data
  610. */
  611. typedef struct {
  612. XIM im; /* XIM this IC belongs too */
  613. XIC next; /* linked list of ICs for IM */
  614. Window client_window; /* window IM can use for */
  615. /* display or subwindows */
  616. XIMStyle input_style; /* IM's input style */
  617. Window focus_window; /* where key events go */
  618. unsigned long filter_events; /* event mask from IM */
  619. XIMCallback geometry_callback; /* client callback */
  620. char * res_name;
  621. char * res_class;
  622. XIMCallback destroy_callback;
  623. XIMCallback string_conversion_callback;
  624. XIMStringConversionText string_conversion;
  625. XIMResetState reset_state;
  626. XIMHotKeyTriggers *hotkey;
  627. XIMHotKeyState hotkey_state;
  628. ICPreeditAttributes preedit_attr; /* visuals of preedit area */
  629. ICStatusAttributes status_attr; /* visuals of status area */
  630. } XICCoreRec, *XICCore;
  631. /*
  632. * an Input Context. Implementations may need to extend this data
  633. * structure to accommodate additional data, state information etc.
  634. */
  635. typedef struct _XIC {
  636. XICMethods methods; /* method list of this IC */
  637. XICCoreRec core; /* data of this IC */
  638. } XICRec;
  639. typedef XLCd (*XLCdLoadProc)(
  640. char*
  641. );
  642. _XFUNCPROTOBEGIN
  643. extern XLCd _falOpenLC(
  644. char* /* name */
  645. );
  646. extern void _falCloseLC(
  647. XLCd /* lcd */
  648. );
  649. extern XLCd _fallcCurrentLC(
  650. void
  651. );
  652. extern Bool _fallcValidModSyntax(
  653. char* /* mods */,
  654. char** /* valid */
  655. );
  656. extern char *_fallcDefaultMapModifiers(
  657. XLCd /* lcd */,
  658. char* /* user_mods */,
  659. char* /* prog_mods */
  660. );
  661. extern void _XIMCompileResourceList(
  662. XIMResourceList /* res */,
  663. unsigned int /* num_res */
  664. );
  665. extern void _XCopyToArg(
  666. XPointer /* src */,
  667. XPointer* /* dst */,
  668. unsigned int /* size */
  669. );
  670. extern char ** _falParseBaseFontNameList(
  671. char* /* str */,
  672. int* /* num */
  673. );
  674. extern XrmMethods _falrmInitParseInfo(
  675. XPointer* /* statep */
  676. );
  677. extern void _XRegisterFilterByMask(
  678. Display* /* dpy */,
  679. Window /* window */,
  680. unsigned long /* event_mask */,
  681. Bool (*)(
  682. Display* /* display */,
  683. Window /* window */,
  684. XEvent* /* event */,
  685. XPointer /* client_data */
  686. ) /* filter */,
  687. XPointer /* client_data */
  688. );
  689. extern void _XRegisterFilterByType(
  690. Display* /* dpy */,
  691. Window /* window */,
  692. int /* start_type */,
  693. int /* end_type */,
  694. Bool (*)(
  695. Display* /* display */,
  696. Window /* window */,
  697. XEvent* /* event */,
  698. XPointer /* client_data */
  699. ) /* filter */,
  700. XPointer /* client_data */
  701. );
  702. extern void _XUnregisterFilter(
  703. Display* /* dpy */,
  704. Window /* window */,
  705. Bool (*)(
  706. Display* /* display */,
  707. Window /* window */,
  708. XEvent* /* event */,
  709. XPointer /* client_data */
  710. ) /* filter */,
  711. XPointer /* client_data */
  712. );
  713. extern void _fallcCountVaList(
  714. va_list /* var */,
  715. int* /* count_return */
  716. );
  717. extern void _fallcVaToArgList(
  718. va_list /* var */,
  719. int /* count */,
  720. XlcArgList* /* args_return */
  721. );
  722. extern void _fallcCompileResourceList(
  723. XlcResourceList /* resources */,
  724. int /* num_resources */
  725. );
  726. extern char *_fallcGetValues(
  727. XPointer /* base */,
  728. XlcResourceList /* resources */,
  729. int /* num_resources */,
  730. XlcArgList /* args */,
  731. int /* num_args */,
  732. unsigned long /* mask */
  733. );
  734. extern char *_fallcSetValues(
  735. XPointer /* base */,
  736. XlcResourceList /* resources */,
  737. int /* num_resources */,
  738. XlcArgList /* args */,
  739. int /* num_args */,
  740. unsigned long /* mask */
  741. );
  742. extern Bool _fallcAddLoader(
  743. XLCdLoadProc /* proc */,
  744. XlcPosition /* position */
  745. );
  746. extern void _fallcRemoveLoader(
  747. XLCdLoadProc /* proc */
  748. );
  749. _XFUNCPROTOEND
  750. #endif /* _XLCINT_H_ */