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:  To  ensure  proper  input  processing,  it is essential that the
65       client pass only KeyPress events  to  XmbLookupString,  XwcLookupString
66       and  Xutf8LookupString.   Their  behavior when a client passes a KeyRe‐
67       lease event is undefined.
68
69       Clients should check the status_return argument before using the  other
70       returned  values.   These  three  functions each return a value to sta‐
71       tus_return that indicates what has been returned  in  the  other  argu‐
72       ments.  The possible values returned are:
73
74       XBufferOver‐    The input string  to  be  returned  is  too
75       flow            large  for the supplied buffer_return.  The
76                       required   size    (for    XmbLookupString,
77                       Xutf8LookupString  in bytes; for XwcLookup‐
78                       String in characters) is  returned  as  the
79                       value  of the function, and the contents of
80                       buffer_return  and  keysym_return  are  not
81                       modified.   The  client  should  recall the
82                       function with the same event and  a  buffer
83                       of adequate size to obtain the string.
84       XLookupNone     No  consistent  input  has been composed so
85                       far.  The  contents  of  buffer_return  and
86                       keysym_return  are  not  modified,  and the
87                       function returns zero.
88       XLookupChars    Some input characters have  been  composed.
89                       They  are placed in the buffer_return argu‐
90                       ment, using the encoding  described  above,
91                       and  the  string  length is returned as the
92                       value of the function.  The content of  the
93                       keysym_return argument is not modified.
94       XLookupKeySym   A  KeySym  has  been  returned instead of a
95                       string and is  returned  in  keysym_return.
96                       The  content  of the buffer_return argument
97                       is not modified, and the  function  returns
98                       zero.
99       XLookupBoth     Both  a  KeySym  and a string are returned;
100                       XLookupChars and XLookupKeySym occur simul‐
101                       taneously.
102
103       It does not make any difference if the input context passed as an argu‐
104       ment to XmbLookupString, XwcLookupString and Xutf8LookupString  is  the
105       one  currently  in possession of the focus or not.  Input may have been
106       composed within an input context before it lost  the  focus,  and  that
107       input   may   be  returned  on  subsequent  calls  to  XmbLookupString,
108       XwcLookupString or Xutf8LookupString even though it does not  have  any
109       more keyboard focus.
110
111       The  function  Xutf8LookupString  is  an  extension  introduced  by The
112       XFree86 Project, Inc., in their 4.0.2 release.  Its presence  is  indi‐
113       cated by the macro X_HAVE_UTF8_STRING.
114

SEE ALSO

116       XLookupKeysym(3), Compose(5)
117       Xlib - C Language X Interface
118
119
120
121X Version 11                     libX11 1.6.9               XmbLookupString(3)
Impressum