1XmbLookupString(3)              XLIB FUNCTIONS              XmbLookupString(3)
2
3
4

NAME

6       XmbLookupString, XwcLookupString, Xutf8LookupString - obtain composed
7       input from an input method
8

SYNTAX

10       int XmbLookupString(XIC ic, XKeyPressedEvent *event, char *buf‐
11              fer_return, int bytes_buffer, KeySym *keysym_return, Status
12              *status_return);
13
14       int XwcLookupString(XIC ic, XKeyPressedEvent *event, wchar_t *buf‐
15              fer_return, int wchars_buffer, KeySym *keysym_return, Status
16              *status_return);
17
18       int Xutf8LookupString(XIC ic, XKeyPressedEvent *event, char *buf‐
19              fer_return, int bytes_buffer, KeySym *keysym_return, Status
20              *status_return);
21

ARGUMENTS

23       buffer_return
24                 Returns a multibyte string or wide character string (if any)
25                 from the input method.
26
27       bytes_buffer
28       wchars_buffer
29                 Specifies space available in the return buffer.
30
31       event     Specifies the key event to be used.
32
33       ic        Specifies the input context.
34
35       keysym_return
36                 Returns the KeySym computed from the event if this argument
37                 is not NULL.
38
39       status_return
40                 Returns a value indicating what kind of data is returned.
41

DESCRIPTION

43       The XmbLookupString, XwcLookupString and Xutf8LookupString functions
44       return the string from the input method specified in the buffer_return
45       argument.  If no string is returned, the buffer_return argument is
46       unchanged.
47
48       The KeySym into which the KeyCode from the event was mapped is returned
49       in the keysym_return argument if it is non-NULL and the status_return
50       argument indicates that a KeySym was returned.  If both a string and a
51       KeySym are returned, the KeySym value does not necessarily correspond
52       to the string returned.
53
54       XmbLookupString and Xutf8LookupString return the length of the string
55       in bytes, and XwcLookupString returns the length of the string in char‐
56       acters.  Both XmbLookupString and XwcLookupString return text in the
57       encoding of the locale bound to the input method of the specified input
58       context, and Xutf8LookupString returns text in UTF-8 encoding.
59
60       Each string returned by XmbLookupString and XwcLookupString begins in
61       the initial state of the encoding of the locale (if the encoding of the
62       locale is state-dependent).
63
64                                        Note
65
66            ®To ensure proper input processing, it is essential that the
67            client pass only KeyPress events to XmbLookupString,
68            XwcLookupString and Xutf8LookupString.  Their behavior when a
69            client passes a KeyRelease event is undefined.
70
71
72       Clients should check the status_return argument before using the other
73       returned values.  These three functions each return a value to sta‐
74       tus_return that indicates what has been returned in the other argu‐
75       ments.  The possible values returned are:
76
77       XBufferOverflow   The input string to be returned is too
78                         large for the supplied buffer_return.  The
79                         required size (for XmbLookupString,
80                         Xutf8LookupString in bytes; for XwcLookup‐
81                         String in characters) is returned as the
82                         value of the function, and the contents of
83                         buffer_return and keysym_return are not
84                         modified.  The client should recall the
85                         function with the same event and a buffer
86                         of adequate size to obtain the string.
87       XLookupNone       No consistent input has been composed so
88                         far.  The contents of buffer_return and
89                         keysym_return are not modified, and the
90                         function returns zero.
91       XLookupChars      Some input characters have been composed.
92                         They are placed in the buffer_return argu‐
93                         ment, using the encoding described above,
94                         and the string length is returned as the
95                         value of the function.  The content of the
96                         keysym_return argument is not modified.
97       XLookupKeySym     A KeySym has been returned instead of a
98                         string and is returned in keysym_return.
99                         The content of the buffer_return argument
100                         is not modified, and the function returns
101                         zero.
102       XLookupBoth       Both a KeySym and a string are returned;
103                         XLookupChars and XLookupKeySym occur simul‐
104                         taneously.
105
106       It does not make any difference if the input context passed as an argu‐
107       ment to XmbLookupString, XwcLookupString and Xutf8LookupString is the
108       one currently in possession of the focus or not.  Input may have been
109       composed within an input context before it lost the focus, and that
110       input may be returned on subsequent calls to XmbLookupString,
111       XwcLookupString or Xutf8LookupString even though it does not have any
112       more keyboard focus.
113
114       The function Xutf8LookupString is an extension introduced by The
115       XFree86 Project, Inc. in their 4.0.2 release. Its presence is indicated
116       by the macro X_HAVE_UTF8_STRING.
117

SEE ALSO

119       XLookupKeysym(3), Compose(5)
120       Xlib - C Language X Interface
121
122
123
124X Version 11                     libX11 1.3.4               XmbLookupString(3)
Impressum