


XmbLookupString(3X11)					XmbLookupString(3X11)
X11R5									X11R5



NAME
  XmbLookupString, XwcLookupString - obtain composed input from	an input
  method

SYNTAX
  int XmbLookupString(_i_c, _e_v_e_n_t, _b_u_f_f_e_r__r_e_t_u_r_n,	_b_y_t_e_s__b_u_f_f_e_r, _k_e_y_s_y_m__r_e_t_u_r_n,
  _s_t_a_t_u_s__r_e_t_u_r_n)
	XIC _i_c;
	XKeyPressedEvent *_e_v_e_n_t;
	char *_b_u_f_f_e_r__r_e_t_u_r_n;
	int _b_y_t_e_s__b_u_f_f_e_r;
	KeySym *_k_e_y_s_y_m__r_e_t_u_r_n;
	Status *_s_t_a_t_u_s__r_e_t_u_r_n;

  int XwcLookupString(_i_c, _e_v_e_n_t, _b_u_f_f_e_r__r_e_t_u_r_n,	_b_y_t_e_s__b_u_f_f_e_r, _k_e_y_s_y_m__r_e_t_u_r_n,
  _s_t_a_t_u_s__r_e_t_u_r_n)
	XIC _i_c;
	XKeyPressedEvent *_e_v_e_n_t;
	wchar_t	*_b_u_f_f_e_r__r_e_t_u_r_n;
	int _w_c_h_a_r_s__b_u_f_f_e_r;
	KeySym *_k_e_y_s_y_m__r_e_t_u_r_n;
	Status *_s_t_a_t_u_s__r_e_t_u_r_n;

ARGUMENTS

  _b_u_f_f_e_r__r_e_t_u_r_n
	    Returns a multibyte	string or wide character string	(if any) from
	    the	input method.

  _b_y_t_e_s__b_u_f_f_e_r
  _w_c_h_a_r_s__b_u_f_f_e_r
	    Specifies space available in return	buffer.

  _e_v_e_n_t	    Specifies the key event to be used.

  _i_c	    Specifies the input	context.

  _k_e_y_s_y_m__r_e_t_u_r_n
	    Returns the	KeySym computed	from the event if this argument	is
	    not	NULL.

  _s_t_a_t_u_s__r_e_t_u_r_n
	    Returns a value indicating what kind of data is returned.

DESCRIPTION
  The _X_m_b_L_o_o_k_u_p_S_t_r_i_n_g and _X_w_c_L_o_o_k_u_p_S_t_r_i_n_g functions return the string from
  the input method specified in	the buffer_return argument.  If	no string is
  returned, the	buffer_return argument is unchanged.

  The KeySym into which	the KeyCode from the event was mapped is returned in
  the keysym_return argument if	it is non-NULL and the status_return argument
  indicates that a KeySym was returned.	 If both a string and a	KeySym are
  returned, the	KeySym value does not necessarily correspond to	the string
  returned.

  Note that _X_m_b_L_o_o_k_u_p_S_t_r_i_n_g returns the	length of the string in	bytes and
  that _X_w_c_L_o_o_k_u_p_S_t_r_i_n_g returns the length of the string	in characters.

  _X_m_b_L_o_o_k_u_p_S_t_r_i_n_g and _X_w_c_L_o_o_k_u_p_S_t_r_i_n_g return text in the encoding of the
  locale bound to the input method of the specified input context.

  Note that each string	returned by _X_m_b_L_o_o_k_u_p_S_t_r_i_n_g and	_X_w_c_L_o_o_k_u_p_S_t_r_i_n_g
  begins in the	initial	state of the encoding of the locale (if	the encoding
  of the locale	is state-dependent).

  In order to insure proper input processing, it is essential that the client
  pass only _K_e_y_P_r_e_s_s events to _X_m_b_L_o_o_k_u_p_S_t_r_i_n_g and _X_w_c_L_o_o_k_u_p_S_t_r_i_n_g.  Their
  behavior when	a client passes	a _K_e_y_R_e_l_e_a_s_e event is undefined.

  Clients should check the status_return argument before using the other
  returned values.  These two functions	both return a value to status_return
  that indicates what has been returned	in the other arguments.	 The possible
  values returned are in the following table:

  XBufferOverflow

		    The	input string to	be
		    returned is	too large for
		    the	supplied
		    buffer_return.  The
		    required size (XmbLookup-
		    String in bytes; _X_w_c_L_o_o_k-
		    _u_p_S_t_r_i_n_g in	characters) is
		    returned as	the value of
		    the	function, and the con-
		    tents of buffer_return and
		    keysym_return are not
		    modified.  The client
		    should recall the function
		    with the same event	and a
		    buffer of adequate size in
		    order to obtain the
		    string.
  XLookupNone

		    No consistent input	has
		    been composed so far.  The
		    contents of	buffer_return
		    and	keysym_return are not
		    modified, and the function
		    returns zero.
  XLookupChars

		    Some input characters have
		    been composed.  They are
		    placed in the
		    buffer_return argument,
		    and	the string length is
		    returned as	the value of
		    the	function.  The string
		    is encoded in the locale
		    bound to the input con-
		    text.  The contents	of the
		    keysym_return argument is
		    not	modified.
  XLookupKeySym

		    A KeySym has been returned
		    instead of a string	and is
		    returned in	keysym_return.
		    The	contents of the
		    buffer_return argument is
		    not	modified, and the
		    function returns zero.


  XLookupBoth

		    Both a KeySym and a	string
		    are	returned; _X_L_o_o_k_u_p_C_h_a_r_s
		    and	_X_L_o_o_k_u_p_K_e_y_S_y_m occur
		    simultaneously.


  It does not make any difference if the input context passed as an argument
  to _X_m_b_L_o_o_k_u_p_S_t_r_i_n_g and _X_w_c_L_o_o_k_u_p_S_t_r_i_n_g is the	one currently in possession
  of the focus or not.	Input may have been composed within an input context
  before it lost the focus, and	that input may be returned on subsequent
  calls	to _X_m_b_L_o_o_k_u_p_S_t_r_i_n_g or _X_w_c_L_o_o_k_u_p_S_t_r_i_n_g, even though it does not have
  any more keyboard focus.

SEE ALSO
  XLookupKeysym(3X11)
  _X_l_i_b - _C _L_a_n_g_u_a_g_e _X _I_n_t_e_r_f_a_c_e
























































