Mercurial > kinput2.yaz
comparison include/KIProtoP.h @ 0:92745d501b9a
initial import from kinput2-v3.1
author | Yoshiki Yazawa <yaz@honeyplanet.jp> |
---|---|
date | Mon, 08 Mar 2010 04:44:30 +0900 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:92745d501b9a |
---|---|
1 /* $Id: KIProtoP.h,v 1.12 1993/09/16 02:45:33 ishisone Rel $ */ | |
2 /* | |
3 * Copyright (c) 1991 Software Research Associates, Inc. | |
4 * | |
5 * Permission to use, copy, modify, and distribute this software and its | |
6 * documentation for any purpose and without fee is hereby granted, provided | |
7 * that the above copyright notice appear in all copies and that both that | |
8 * copyright notice and this permission notice appear in supporting | |
9 * documentation, and that the name of Software Research Associates not be | |
10 * used in advertising or publicity pertaining to distribution of the | |
11 * software without specific, written prior permission. Software Research | |
12 * Associates makes no representations about the suitability of this software | |
13 * for any purpose. It is provided "as is" without express or implied | |
14 * warranty. | |
15 * | |
16 * Author: Makoto Ishisone, Software Research Associates, Inc., Japan | |
17 */ | |
18 | |
19 #ifndef _KinputProtocolP_h | |
20 #define _KinputProtocolP_h | |
21 | |
22 #include "KIProto.h" | |
23 #include "ConvCtrl.h" | |
24 | |
25 typedef struct { | |
26 int empty; | |
27 } KinputProtocolClassPart; | |
28 | |
29 typedef struct _KinputProtocolClassRec { | |
30 CoreClassPart core_class; | |
31 KinputProtocolClassPart kinputprotocol_class; | |
32 } KinputProtocolClassRec; | |
33 | |
34 extern KinputProtocolClassRec kinputProtocolClassRec; | |
35 | |
36 typedef enum { | |
37 unresolved_protocol, | |
38 kinput1_protocol, /* old kinput protocol */ | |
39 kinput2_protocol, /* new kinput protocol */ | |
40 jinput_protocol, /* Matsushita's jinput protocol */ | |
41 xlc_protocol /* Sony's xlc protocol */ | |
42 } KinputProtocol; | |
43 | |
44 typedef enum { | |
45 offthespot_style, | |
46 overthespot_style, | |
47 separate_style | |
48 } ConversionStyle; | |
49 | |
50 typedef struct { | |
51 int state; | |
52 #define JINPUT_MULTI_COLOR 1 | |
53 #define JINPUT_MULTI_FONT 2 | |
54 Position rawspotx, rawspoty; | |
55 } JinputData; | |
56 | |
57 typedef struct _convclient_ { | |
58 KinputProtocol protocol; | |
59 ConversionStyle style; | |
60 Widget protocolwidget; /* protocol widget */ | |
61 Widget conversion; /* conversion widget */ | |
62 Window reqwin; /* conversion requestor window */ | |
63 Atom selection; /* selection atom */ | |
64 Atom target; /* type of converted string */ | |
65 Atom property; /* property to store converted string */ | |
66 EventSelectMethod esm; | |
67 unsigned long attrmask; | |
68 unsigned long validattrmask; | |
69 ConversionAttributes attrs; | |
70 XtPointer data; /* protocol dependent data */ | |
71 void (*start_proc)();/* protocol dependent proc. routines */ | |
72 void (*detach_proc)(); | |
73 void (*fix_proc)(); | |
74 void (*end_proc)(); | |
75 void (*free_resources)(); | |
76 struct _convclient_ *next; | |
77 } ConvClient; | |
78 | |
79 typedef struct { | |
80 /* resources */ | |
81 String language; | |
82 WidgetClass inputObjClass; | |
83 WidgetClass displayObjClass; | |
84 Boolean backward_compatible; | |
85 String xlcstartkey; | |
86 /* private state */ | |
87 ConvClient *clients; | |
88 Position defaultascent; | |
89 /* atoms -- common */ | |
90 Atom convAtom; /* _<language>_CONVERSION */ | |
91 Atom oldConvAtom; /* <language>_CONVERSION (obsolete) */ | |
92 Atom ctextAtom; /* COMPOUND_TEXT */ | |
93 Atom convStringAtom; /* CONVERSION_STRING */ | |
94 Atom convNotifyAtom; /* CONVERSION_NOTIFY */ | |
95 Atom convEndAtom; /* CONVERSION_END */ | |
96 /* atoms -- kinput2 specific */ | |
97 #ifdef notdef | |
98 Atom convInitializeAtom; /* CONVERSION_INITIALIZE */ | |
99 #endif | |
100 Atom convAttributeAtom; /* CONVERSION_ATTRIBUTE */ | |
101 /* atoms -- jinput specific (whew!) */ | |
102 Atom convVersionAtom; /* CONVERSION_VERSION */ | |
103 Atom convInitialTypeAtom; /* CONVERSION_INITIAL_TYPE */ | |
104 Atom convOpenNotifyAtom; /* CONVERSION_OPEN_NOTIFY */ | |
105 Atom convXYRequestAtom; /* CONVERSION_XY_REQUEST */ | |
106 Atom convFontsRequestAtom; /* CONVERSION_FONTS_REQUEST */ | |
107 Atom convColorRequestAtom; /* CONVERSION_COLOR_REQUEST */ | |
108 Atom convCloseNotifyAtom; /* CONVERSION_CLOSE_NOTIFY */ | |
109 /* atoms -- xlc specific */ | |
110 Atom xlcStatusAtom; /* _XLC_STATUS */ | |
111 Atom xlcOnTheSpotAtom; /* _XLC_ON_THE_SPOT */ | |
112 Atom xlcBcModifierAtom; /* _XLC_BC_MODIFIER */ | |
113 Atom xlcBcKeycodeAtom; /* _XLC_BC_KEYCODE */ | |
114 } KinputProtocolPart; | |
115 | |
116 typedef struct _KinputProtocolRec { | |
117 CorePart core; | |
118 KinputProtocolPart kinput; | |
119 } KinputProtocolRec; | |
120 | |
121 #endif |