Mercurial > kinput2.yaz
comparison include/ConvDisp.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: ConvDisp.h,v 1.9 1999/01/07 03:06:21 ishisone Exp $ */ | |
2 /* | |
3 * Copyright (c) 1990 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 _ConvDisplay_h | |
20 #define _ConvDisplay_h | |
21 | |
22 #include <X11/Object.h> | |
23 #include "ICtypes.h" | |
24 | |
25 /* | |
26 ConvDisplay new resources: | |
27 | |
28 name class type default access | |
29 ---------------------------------------------------------------------------- | |
30 foreground Foreground Pixel DefaultForeground CSG | |
31 background Background Pixel DefaultBackground CSG | |
32 cursorBitmap CursorBitmap Bitmap *1 CSG | |
33 hotX HotX Position 3 CSG | |
34 hotY HotY Position 2 CSG | |
35 | |
36 note: *1) default is a small caret | |
37 | |
38 */ | |
39 | |
40 #define XtNcursorBitmap "cursorBitmap" | |
41 #define XtCCursorBitmap "CursorBitmap" | |
42 #define XtNhotX "hotX" | |
43 #define XtNhotY "hotY" | |
44 #define XtCHotX "HotX" | |
45 #define XtCHotY "HotY" | |
46 | |
47 typedef struct _ConvDisplayClassRec *ConvDisplayObjectClass; | |
48 typedef struct _ConvDisplayRec *ConvDisplayObject; | |
49 | |
50 extern WidgetClass convDisplayObjectClass; | |
51 | |
52 /* | |
53 * public interface functions | |
54 */ | |
55 | |
56 /* | |
57 * int CDStringWidth(Widget object, ICString *str, int start, int end) | |
58 * $B;XDj$5$l$?J8;zNs$N(B start $BJ8;zL\$+$i(B end - 1 $BJ8;zL\$^$G$N(B | |
59 * $BI}(B ($BC10L$O%T%/%;%k(B) $B$rJV$9(B | |
60 * end $B$,Ii$N;~$OJ8;zNs$N:G8e$^$G$rI=$9(B | |
61 */ | |
62 extern int CDStringWidth( | |
63 #if NeedFunctionPrototypes | |
64 Widget /* object */, | |
65 ICString * /* str */, | |
66 int /* start */, | |
67 int /* end */ | |
68 #endif | |
69 ); | |
70 | |
71 /* | |
72 * int CDLineHeight(Widget object, Position *ascentp) | |
73 * $B9T$N9b$5(B ($BC10L$O%T%/%;%k(B) $B$rJV$9(B | |
74 * ascentp $B$,(B NULL $B$G$J$$;~$K$O(B ascent $B$,JV$5$l$k(B | |
75 */ | |
76 extern int CDLineHeight( | |
77 #if NeedFunctionPrototypes | |
78 Widget /* object */, | |
79 Position * /* ascentp */ | |
80 #endif | |
81 ); | |
82 | |
83 /* | |
84 * void CDDrawString(Widget object, Widget canvas, ICString *str, | |
85 * int start, int end, int x, int y) | |
86 * canvas $B$G;XDj$5$l$k(B widget $B$N:BI8(B (x, y) $B$+$i!";XDj$5$l$?(B | |
87 * $BJ8;zNs$N(B start $BJ8;zL\$+$i(B end - 1 $BJ8;zL\$^$G$r=q$/(B | |
88 * end $B$,Ii$N;~$OJ8;zNs$N:G8e$^$G$rI=$9(B | |
89 * $B$?$@$7!"(B(x, y) $B$OJ8;zNs$N:8>e$N:BI8$G$"$k(B | |
90 */ | |
91 extern void CDDrawString( | |
92 #if NeedFunctionPrototypes | |
93 Widget /* object */, | |
94 Widget /* canvas */, | |
95 ICString * /* str */, | |
96 int /* start */, | |
97 int /* end */, | |
98 int /* x */, | |
99 int /* y */ | |
100 #endif | |
101 ); | |
102 | |
103 /* | |
104 * int CDMaxChar(Widget object, ICString *str, int start, int width) | |
105 * $B;XDj$5$l$?J8;zNs$N(B start $BJ8;zL\$+$i!"%T%/%;%kI}(B width $B$K(B | |
106 * $BF~$kJ8;z?t$rJV$9(B | |
107 */ | |
108 extern int CDMaxChar( | |
109 #if NeedFunctionPrototypes | |
110 Widget /* object */, | |
111 ICString * /* str */, | |
112 int /* start */, | |
113 int /* end */ | |
114 #endif | |
115 ); | |
116 | |
117 /* | |
118 * void CDDrawCursor(Widget object, Widget canvas, int x, int y, int on) | |
119 * canvas $B$G;XDj$5$l$k(B widget $B$N:BI8(B (x, y) $B$K%$%s%5!<%H%+!<%=%k$r(B | |
120 * $BI=<($9$k(B | |
121 * on $B$,(B False $B$N;~$K$O%+!<%=%k$r>C$9(B | |
122 * $B;XDj$9$k(B y $B:BI8$K$O%U%)%s%H$N%Y!<%9%i%$%s$r;XDj$9$k(B | |
123 */ | |
124 extern void CDDrawCursor( | |
125 #if NeedFunctionPrototypes | |
126 Widget /* object */, | |
127 Widget /* canvas */, | |
128 int /* x */, | |
129 int /* y */, | |
130 int /* on */ | |
131 #endif | |
132 ); | |
133 | |
134 /* | |
135 * void CDGetCursorBounds(Widget object, XRectangle *bounds) | |
136 * $BI=<($5$l$k%+!<%=%k$NI=<(NN0h$r(B bounds $B$KJV$9(B | |
137 * $B:BI8(B (x, y) $B$K%+!<%=%k$r=q$$$?;~$NI=<(NN0h$O(B | |
138 * (x + bounds->x, y + bounds->y): $B:8>e:BI8(B | |
139 * (bounds->width, bounds->height): $BNN0h$NBg$-$5(B | |
140 * $B$K$J$k(B | |
141 */ | |
142 extern void CDGetCursorBounds( | |
143 #if NeedFunctionPrototypes | |
144 Widget /* object */, | |
145 XRectangle * /* bounds */ | |
146 #endif | |
147 ); | |
148 | |
149 | |
150 /* | |
151 * void CDSetFonts(Widget object, XFontStruct **fontset, Cardinal num_fonts) | |
152 * (note: fontset is an array of (XFontStruct *).) | |
153 * $BIA2h$K(B fontset $B$G;XDj$5$l$k%U%)%s%H$r;HMQ$9$k$h$&$K@_Dj$9$k(B | |
154 * $B%*%V%8%'%/%H$O(B fontset $B$NCf$+$i<+J,$N;HMQ$9$k%-%c%i%/%?%;%C%H$N(B | |
155 * $B%U%)%s%H$rA*$s$G@_Dj$9$k(B | |
156 * $B$b$7!"I,MW$J%-%c%i%/%?%;%C%H$N%U%)%s%H$,$J$1$l$PE,Ev$J%U%)%s%H$r(B | |
157 * $B@_Dj$9$k(B | |
158 * $B$3$l$OB>$N%-%c%i%/%?%;%C%H$N%U%)%s%H$K9g$o$;$FA*$V$N$,$h$$$H(B | |
159 * $B;W$o$l$k$,!"%G%U%)%k%H%U%)%s%H$G4V$K9g$o$;$F$b$h$$(B | |
160 * $B$b$7(B num_fonts $B$,(B 0 $B$G$"$l$P3F%*%V%8%'%/%H$N%G%U%)%k%H%U%)%s%H$r(B | |
161 * $B;HMQ$9$k$h$&$K@_Dj$5$l$k(B | |
162 */ | |
163 extern void CDSetFonts( | |
164 #if NeedFunctionPrototypes | |
165 Widget /* object */, | |
166 XFontStruct ** /* fontset */, | |
167 Cardinal /* num_fonts */ | |
168 #endif | |
169 ); | |
170 | |
171 /* | |
172 * void CDSetBlockCursor(Widget object, XRectangle *shape) | |
173 * shape $B$G;XDj$5$l$k%V%m%C%/%+!<%=%k$r@_Dj$9$k(B | |
174 * shape $B$N;XDj$O(B CDGetCursorBounds() $B$N(B bounds $B$HF1$8$G$"$k(B | |
175 */ | |
176 extern void CDSetBlockCursor( | |
177 #if NeedFunctionPrototypes | |
178 Widget /* object */, | |
179 XRectangle * /* shape */ | |
180 #endif | |
181 ); | |
182 | |
183 #endif /* _ConvDisplay_h */ |