2 This contains parts of the original header and thus contains its copyright notice:
4 Copyright (c) 2003-2009 uim Project http://code.google.com/p/uim/
8 Redistribution and use in source and binary forms, with or without
9 modification, are permitted provided that the following conditions
12 1. Redistributions of source code must retain the above copyright
13 notice, this list of conditions and the following disclaimer.
14 2. Redistributions in binary form must reproduce the above copyright
15 notice, this list of conditions and the following disclaimer in the
16 documentation and/or other materials provided with the distribution.
17 3. Neither the name of authors nor the names of its contributors
18 may be used to endorse or promote products derived from this software
19 without specific prior written permission.
21 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ``AS IS'' AND
22 ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
23 IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
24 ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE
25 FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
26 DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
27 OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
28 HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
29 LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
30 OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
45 typedef struct uim_context_ *uim_context;
46 typedef struct uim_candidate_ *uim_candidate;
49 qboolean UIM_Available(void);
50 qboolean UIM_Direct(void);
51 void UIM_Key(int key, Uchar unicode);
52 void UIM_KeyUp(int key, Uchar unicode);
53 void UIM_KeyDown(int key, Uchar unicode);
55 // exiting functions have a qUIM_ prefix
56 typedef void (*qUIM_SetCursor)(int pos);
58 void UIM_EnterBuffer(char *buffer, size_t bufsize, int pos, qUIM_SetCursor setcursor_cb);
59 void UIM_CancelBuffer(void);
61 // from the original uim.h:
85 UKey_Prior , /* page up */
86 UKey_Next , /* page down */
90 UKey_Multi_key, /* multi-key character compose */
93 UKey_MultipleCandidate,
94 UKey_PreviousCandidate,
95 UKey_Mode_switch, /* charcter set switch */
97 /* Japanese keyboard */
98 UKey_Kanji, /* kanji, kanji convert */
99 UKey_Muhenkan, /* cancel conversion */
100 UKey_Henkan_Mode, /* start/stop conversion */
101 UKey_Henkan = UKey_Henkan_Mode, /* alias for Henkan_Mode */
105 UKey_Hiragana_Katakana, /* hiragana/katakana toggle */
108 UKey_Zenkaku_Hankaku, /* zenkaku/hankaku toggle */
113 UKey_Eisu_Shift, /* alphanumeric shift */
114 UKey_Eisu_toggle, /* alphanumeric toggle */
116 /* Korean keyboard */
123 UKey_Hangul_Codeinput,
126 UKey_Hangul_PreHanja,
127 UKey_Hangul_PostHanja,
128 UKey_Hangul_SingleCandidate,
129 UKey_Hangul_MultipleCandidate,
130 UKey_Hangul_PreviousCandidate,
168 UKey_F35, /* X, Gtk and Qt supports up to F35 */
173 UKey_Dead_Circumflex,
180 UKey_Dead_Doubleacute,
185 UKey_Dead_VoicedSound,
186 UKey_Dead_SemivoicedSound,
191 /* Japanese Kana keys */
193 UKey_Kana_OpeningBracket,
194 UKey_Kana_ClosingBracket,
196 UKey_Kana_Conjunctive,
207 UKey_Kana_ProlongedSound,
253 UKey_Kana_VoicedSound,
254 UKey_Kana_SemivoicedSound,
256 /* non-standard platform specific keys (e.g. Zaurus PDA) */
296 /* lock modifier keys: unstable */
297 UKey_Caps_Lock = 0x9000,
316 UPreeditAttr_None = 0,
317 UPreeditAttr_UnderLine = 1,
318 UPreeditAttr_Reverse = 2,
319 UPreeditAttr_Cursor = 4,
320 UPreeditAttr_Separator = 8
323 /* Cursor of clipboard text is always positioned at end. */
325 UTextArea_Unspecified = 0,
326 UTextArea_Primary = 1, /* primary text area which IM commits to */
327 UTextArea_Selection = 2, /* user-selected region of primary text area */
328 UTextArea_Clipboard = 4 /* clipboard text */
332 UTextOrigin_Unspecified = 0,
333 UTextOrigin_Cursor = 1, /* current position of the cursor */
334 UTextOrigin_Beginning = 2, /* beginning of the text */
335 UTextOrigin_End = 3 /* end of the text */
339 UTextExtent_Unspecified = -1, /* invalid */
341 /* logical extents */
342 UTextExtent_Full = -2, /* beginning or end of the whole text */
343 UTextExtent_Paragraph = -3, /* the paragraph which the origin is included */
344 UTextExtent_Sentence = -5, /* the sentence which the origin is included */
345 UTextExtent_Word = -9, /* the word which the origin is included */
346 UTextExtent_CharFrags = -17, /* character fragments around the origin */
348 /* physical extents */
349 UTextExtent_DispRect = -33, /* the text region displayed in the widget */
350 UTextExtent_DispLine = -65, /* displayed line (eol: linebreak) */
351 UTextExtent_Line = -129 /* real line (eol: newline char) */
354 #endif // UIM_DPH_H__