Back to index

im-sdk  12.3.91
Public Member Functions | Static Public Member Functions | Public Attributes | Private Types | Private Member Functions | Static Private Member Functions | Private Attributes
XIMPInputContext Class Reference

#include <XIMPInputContext.hh>

Inheritance diagram for XIMPInputContext:
Inheritance graph
[legend]
Collaboration diagram for XIMPInputContext:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 XIMPInputContext (XIMProtocol *ximp, XClientMessageEvent *ev)
 ~XIMPInputContext ()
const CompoundStringgetUser () const
const CompoundStringgetLocaleName () const
const CompoundStringgetEngineName () const
const CompoundStringgetApplicationName () const
const CompoundStringgetOSName () const
const CompoundStringgetOSArch () const
const CompoundStringgetOSVersion () const
const CompoundStringgetXDisplayString () const
const CompoundStringgetXServerVendor () const
int commit_string (IMText *text)
int forward_event (IMKeyEventStruct *event)
int preedit_start (IMPreeditStruct *preedit)
int preedit_draw (IMPreeditStruct *preedit)
int preedit_caret (IMPreeditStruct *preedit)
int preedit_done (IMPreeditStruct *preedit)
int status_start (IMStatusStruct *status)
int status_draw (IMStatusStruct *status)
int status_done (IMStatusStruct *status)
int lookup_start (IMLookupStruct *lookup)
int lookup_draw (IMLookupStruct *lookup)
int lookup_process (IMLookupStruct *lookup)
int lookup_done (IMLookupStruct *lookup)
int auxiliary_start (IMAuxStruct *auxiliary)
int auxiliary_draw (IMAuxStruct *auxiliary)
int auxiliary_done (IMAuxStruct *auxiliary)
int conversion_start ()
int conversion_end ()
int conversion_start (Bool reply_back)
int conversion_end (Bool reply_back)
Window focus_window ()
Window client_window ()
int focus_window (Window &) const
int client_window (Window &) const
Bool is_version_40 ()
Bool is_conv_state ()
Bool set_conv_state (Bool flag)
Bool is_ximp_type (long type)
Bool is_sync ()
void set_client_window (Window new_win)
void set_focus_window (Window new_win)
void set_fwin_select_mask (long mask)
void set_preedit_spot_location (long x, long y)
void set_preedit_maxlen (unsigned long len)
void set_preedit_caret_position (unsigned long pos)
void set_preedit_area (long x, long y, unsigned long width, unsigned long height)
void set_preedit_area_needed (unsigned long width, unsigned long height)
void set_preedit_colormap (Colormap colormap)
void set_preedit_fg (unsigned long)
void set_preedit_bg (unsigned long)
void set_preedit_bg_pixmap (Pixmap pixmap)
void set_preedit_line_spacing (long)
void set_preedit_cursor (Cursor cursor)
void set_status_area (long x, long y, unsigned long width, unsigned long height)
void set_status_area_needed (unsigned long width, unsigned long height)
void set_status_colormap (Colormap colormap)
void set_status_fg (unsigned long)
void set_status_bg (unsigned long)
void set_status_bg_pixmap (Pixmap pixmap)
void set_status_line_spacing (long)
void set_status_cursor (Cursor cursor)
void set_values (XClientMessageEvent *ev)
void get_values (XClientMessageEvent *ev)
void select_destroy_emask ()
void select_destroy_clientwin_emask ()
void select_keypress_emask ()
void select_keyrelease_emask ()
void unselect_destroy_emask ()
void unselect_destroy_clientwin_emask ()
void unselect_keypress_emask ()
void unselect_keyrelease_emask ()
void set_match (int kcode, int state)
Bool process_match (int kcode, int state)
char * get_commit_string ()
char * reset_xic ()
void destroy_xic ()
void set_xicfocus ()
void unset_xicfocus ()
Bool checkAltKey (XClientMessageEvent *ev)
int forward_xevent (XEvent *event)
void set_icvalues (IMArg *args, int n)
void get_icvalues (IMArg *args, int n) const

Static Public Member Functions

static int preedit_start_cbproc (XIC xic, XPointer client_data, XPointer call_data_p)
static void preedit_draw_cbproc (XIC xic, XPointer client_data, XPointer call_data_p)
static void preedit_caret_cbproc (XIC xic, XPointer client_data, XPointer call_data_p)
static void preedit_done_cbproc (XIC xic, XPointer client_data, XPointer call_data_p)
static void status_start_cbproc (XIC xic, XPointer client_data, XPointer call_data_p)
static void status_draw_cbproc (XIC xic, XPointer client_data, XPointer call_data_p)
static void status_done_cbproc (XIC xic, XPointer client_data, XPointer call_data_p)
static void state_notify_cbproc (XIC xic, XPointer client_data, XPointer call_data_p)
static void commit_string_cbproc (XIC xic, XPointer client_data, XPointer call_data_p)
static void forward_event_cbproc (XIC xic, XPointer client_data, XPointer call_data_p)

Public Attributes

XIMProtocolximp_protocol

Private Types

enum  XimpProtocolVersion { XIMP_VERSION_35, XIMP_VERSION_40, XIMP_VERSION_UNKNOWN }
enum  XimpFilterMode { FLT_NONE = (0L), FLT_KEYPRESS = (1L<<0), FLT_KEYRELEASE = (1L<<1), FLT_DESTROY = (1L<<2) }
enum  Ximp40ICMask {
  XIMP_FOCUS_WIN_MASK4 = (1L << 0), XIMP_PRE_AREA_MASK4 = (1L << 1), XIMP_PRE_AREANEED_MASK4 = (1L << 2), XIMP_PRE_COLORMAP_MASK4 = (1L << 3),
  XIMP_PRE_STD_COLORMAP_MASK4 = (1L << 4), XIMP_PRE_FG_MASK4 = (1L << 5), XIMP_PRE_BG_MASK4 = (1L << 6), XIMP_PRE_BGPIXMAP_MASK4 = (1L << 7),
  XIMP_PRE_LINESP_MASK4 = (1L << 8), XIMP_PRE_CURSOR_MASK4 = (1L << 9), XIMP_PRE_SPOTL_MASK4 = (1L << 10), XIMP_STS_AREA_MASK4 = (1L << 11),
  XIMP_STS_AREANEED_MASK4 = (1L << 12), XIMP_STS_COLORMAP_MASK4 = (1L << 13), XIMP_STS_STD_COLORMAP_MASK4 = (1L << 14), XIMP_STS_FG_MASK4 = (1L << 15),
  XIMP_STS_BG_MASK4 = (1L << 16), XIMP_STS_BGPIXMAP_MASK4 = (1L << 17), XIMP_STS_LINESP_MASK4 = (1L << 18), XIMP_STS_CURSOR_MASK4 = (1L << 19),
  XIMP_STS_WINDOW_MASK4 = (1L << 20), XIMP_PRE_FONT_MASK4 = (1L << 21), XIMP_STS_FONT_MASK4 = (1L << 22), XIMP_SERVERTYPE_MASK4 = (1L << 23)
}
enum  Ximp35ICMask {
  XIMP_FOCUS_WIN_MASK3 = (1L << 0), XIMP_PRE_AREA_MASK3 = (1L << 1), XIMP_PRE_FG_MASK3 = (1L << 2), XIMP_PRE_BG_MASK3 = (1L << 3),
  XIMP_PRE_COLORMAP_MASK3 = (1L << 4), XIMP_PRE_BGPIXMAP_MASK3 = (1L << 5), XIMP_PRE_LINESP_MASK3 = (1L << 6), XIMP_PRE_CURSOR_MASK3 = (1L << 7),
  XIMP_PRE_AREANEED_MASK3 = (1L << 8), XIMP_PRE_SPOTL_MASK3 = (1L << 9), XIMP_STS_AREA_MASK3 = (1L << 10), XIMP_STS_FG_MASK3 = (1L << 11),
  XIMP_STS_BG_MASK3 = (1L << 12), XIMP_STS_COLORMAP_MASK3 = (1L << 13), XIMP_STS_BGPIXMAP_MASK3 = (1L << 14), XIMP_STS_LINESP_MASK3 = (1L << 15),
  XIMP_STS_CURSOR_MASK3 = (1L << 16), XIMP_STS_AREANEED_MASK3 = (1L << 17), XIMP_STS_WINDOW_MASK3 = (1L << 18), XIMP_PRE_FONT_MASK3 = (1L << 19),
  XIMP_STS_FONT_MASK3 = (1L << 20)
}
enum  XIC_MASK { PREEDIT_MASK4, STATUS_MASK4, PREEDIT_MASK3, STATUS_MASK3 }
enum  XimpClientMessageSize { COMMIT_CMSG_MAX = 30 }
enum  XimpPDCBStates { XIMP_PDCBSTATUS_NOTEXT = 0x0001, XIMP_PDCBSTATUS_NOFEEDBACK = 0x0002, XIMP_PDCBSTATUS_FEEDBACKS_VIA_PROP = 0x0004 }

Private Member Functions

void register_clientwin_destroy_filter ()
void unregister_clientwin_destroy_filter ()
Bool get_xicvalues (unsigned long &)
Bool get_focus_win ()
Bool get_preedit_font ()
Bool get_status_font ()
Bool get_preedit4 (unsigned long)
Bool get_status4 (unsigned long)
Bool get_server_type4 ()
Bool get_preedit3 (unsigned long)
Bool get_status3 (unsigned long)
Bool set_xicvalues (unsigned long &)
Bool set_focus_win ()
Bool set_preedit_font ()
Bool set_status_font ()
Bool set_preedit4 ()
Bool set_status4 ()
Bool set_server_type4 ()
Bool set_preedit3 ()
Bool set_status3 ()
int commit_string (char *text)
int preedit_draw (XIMPreeditDrawCallbackStruct *draw)
int preedit_caret (XIMPreeditCaretCallbackStruct *caret)
int status_draw (XIMStatusDrawCallbackStruct *draw)
int preedit_draw_by_cm (XIMPreeditDrawCallbackStruct *draw)
int preedit_draw_feedback (XIMPreeditDrawCallbackStruct *draw)
int preedit_draw_tiny (XIMPreeditDrawCallbackStruct *draw)
void DelayBind ()
void CreateXIC ()
void SetExtensionCallbacks ()
void SetPreeditCallbacks ()
void SetStatusCallbacks ()

Static Private Member Functions

static Bool destroy_clientwin_filter (Display *, Window, XEvent *, XPointer)

Private Attributes

XIC xic
Display * dpy
XIMStyle inputstyle
Window client_win
Window focus_win
Ximp_PreeditPropRec4 preedit_attr4
char * preedit_fontname
Ximp_StatusPropRec4 status_attr4
char * status_fontname
long attr_mask
long ev_flow_type
long ev_masks
long filters
Bool is_conv_on
int og_code
int og_state
Bool being_reset
CompoundString reset_text
XIMCallback1preedit_start_cb
XIMCallback2preedit_draw_cb
XIMCallback2preedit_caret_cb
XIMCallback2preedit_done_cb
XIMCallback2status_start_cb
XIMCallback2status_draw_cb
XIMCallback2status_done_cb
XIMCallback2state_notify_cb
XIMCallback2commit_string_cb
XIMCallback2forward_event_cb
CompoundString user_name
CompoundString application_name
CompoundString os_name
CompoundString os_arch
CompoundString os_version
CompoundString xDisplayName
CompoundString xServerVendor
unsigned long preedit_maxlen
unsigned long preedit_caret_position
XimpProtocolVersion proto_version

Detailed Description

Definition at line 65 of file XIMPInputContext.hh.


Member Enumeration Documentation

Enumerator:
XIMP_FOCUS_WIN_MASK3 
XIMP_PRE_AREA_MASK3 
XIMP_PRE_FG_MASK3 
XIMP_PRE_BG_MASK3 
XIMP_PRE_COLORMAP_MASK3 
XIMP_PRE_BGPIXMAP_MASK3 
XIMP_PRE_LINESP_MASK3 
XIMP_PRE_CURSOR_MASK3 
XIMP_PRE_AREANEED_MASK3 
XIMP_PRE_SPOTL_MASK3 
XIMP_STS_AREA_MASK3 
XIMP_STS_FG_MASK3 
XIMP_STS_BG_MASK3 
XIMP_STS_COLORMAP_MASK3 
XIMP_STS_BGPIXMAP_MASK3 
XIMP_STS_LINESP_MASK3 
XIMP_STS_CURSOR_MASK3 
XIMP_STS_AREANEED_MASK3 
XIMP_STS_WINDOW_MASK3 
XIMP_PRE_FONT_MASK3 
XIMP_STS_FONT_MASK3 

Definition at line 284 of file XIMPInputContext.hh.

                    {
    XIMP_FOCUS_WIN_MASK3    = (1L <<  0),
    XIMP_PRE_AREA_MASK3            = (1L <<  1),
    XIMP_PRE_FG_MASK3              = (1L <<  2),
    XIMP_PRE_BG_MASK3              = (1L <<  3),
    XIMP_PRE_COLORMAP_MASK3 = (1L <<  4),
    XIMP_PRE_BGPIXMAP_MASK3 = (1L <<  5),
    XIMP_PRE_LINESP_MASK3   = (1L <<  6),
    XIMP_PRE_CURSOR_MASK3   = (1L <<  7),
    XIMP_PRE_AREANEED_MASK3 = (1L <<  8),
    XIMP_PRE_SPOTL_MASK3    = (1L <<  9),
    XIMP_STS_AREA_MASK3            = (1L << 10),
    XIMP_STS_FG_MASK3              = (1L << 11),
    XIMP_STS_BG_MASK3              = (1L << 12),
    XIMP_STS_COLORMAP_MASK3 = (1L << 13),
    XIMP_STS_BGPIXMAP_MASK3 = (1L << 14),
    XIMP_STS_LINESP_MASK3   = (1L << 15),
    XIMP_STS_CURSOR_MASK3   = (1L << 16),
    XIMP_STS_AREANEED_MASK3 = (1L << 17),
    XIMP_STS_WINDOW_MASK3   = (1L << 18),
    XIMP_PRE_FONT_MASK3            = (1L << 19),
    XIMP_STS_FONT_MASK3            = (1L << 20)
  };
Enumerator:
XIMP_FOCUS_WIN_MASK4 
XIMP_PRE_AREA_MASK4 
XIMP_PRE_AREANEED_MASK4 
XIMP_PRE_COLORMAP_MASK4 
XIMP_PRE_STD_COLORMAP_MASK4 
XIMP_PRE_FG_MASK4 
XIMP_PRE_BG_MASK4 
XIMP_PRE_BGPIXMAP_MASK4 
XIMP_PRE_LINESP_MASK4 
XIMP_PRE_CURSOR_MASK4 
XIMP_PRE_SPOTL_MASK4 
XIMP_STS_AREA_MASK4 
XIMP_STS_AREANEED_MASK4 
XIMP_STS_COLORMAP_MASK4 
XIMP_STS_STD_COLORMAP_MASK4 
XIMP_STS_FG_MASK4 
XIMP_STS_BG_MASK4 
XIMP_STS_BGPIXMAP_MASK4 
XIMP_STS_LINESP_MASK4 
XIMP_STS_CURSOR_MASK4 
XIMP_STS_WINDOW_MASK4 
XIMP_PRE_FONT_MASK4 
XIMP_STS_FONT_MASK4 
XIMP_SERVERTYPE_MASK4 

Definition at line 257 of file XIMPInputContext.hh.

                    {
    XIMP_FOCUS_WIN_MASK4    = (1L <<  0),
    XIMP_PRE_AREA_MASK4            = (1L <<  1),
    XIMP_PRE_AREANEED_MASK4 = (1L <<  2),
    XIMP_PRE_COLORMAP_MASK4 = (1L <<  3),
    XIMP_PRE_STD_COLORMAP_MASK4 = (1L <<  4),
    XIMP_PRE_FG_MASK4              = (1L <<  5),
    XIMP_PRE_BG_MASK4              = (1L <<  6),
    XIMP_PRE_BGPIXMAP_MASK4 = (1L <<  7),
    XIMP_PRE_LINESP_MASK4   = (1L <<  8),
    XIMP_PRE_CURSOR_MASK4   = (1L <<  9),
    XIMP_PRE_SPOTL_MASK4    = (1L << 10),
    XIMP_STS_AREA_MASK4            = (1L << 11),
    XIMP_STS_AREANEED_MASK4 = (1L << 12),
    XIMP_STS_COLORMAP_MASK4 = (1L << 13),
    XIMP_STS_STD_COLORMAP_MASK4    = (1L << 14),
    XIMP_STS_FG_MASK4              = (1L << 15),
    XIMP_STS_BG_MASK4              = (1L << 16),
    XIMP_STS_BGPIXMAP_MASK4 = (1L << 17),
    XIMP_STS_LINESP_MASK4   = (1L << 18),
    XIMP_STS_CURSOR_MASK4   = (1L << 19),
    XIMP_STS_WINDOW_MASK4   = (1L << 20),
    XIMP_PRE_FONT_MASK4            = (1L << 21),
    XIMP_STS_FONT_MASK4            = (1L << 22),
    XIMP_SERVERTYPE_MASK4   = (1L << 23)
  };
Enumerator:
COMMIT_CMSG_MAX 

Definition at line 333 of file XIMPInputContext.hh.

                             {
    COMMIT_CMSG_MAX = 30
  };
Enumerator:
FLT_NONE 
FLT_KEYPRESS 
FLT_KEYRELEASE 
FLT_DESTROY 

Definition at line 252 of file XIMPInputContext.hh.

                      {
    FLT_NONE = (0L), FLT_KEYPRESS = (1L<<0),
    FLT_KEYRELEASE = (1L<<1), FLT_DESTROY = (1L<<2)
  };
Enumerator:
XIMP_PDCBSTATUS_NOTEXT 
XIMP_PDCBSTATUS_NOFEEDBACK 
XIMP_PDCBSTATUS_FEEDBACKS_VIA_PROP 

Definition at line 337 of file XIMPInputContext.hh.

Enumerator:
XIMP_VERSION_35 
XIMP_VERSION_40 
XIMP_VERSION_UNKNOWN 

Definition at line 248 of file XIMPInputContext.hh.


Constructor & Destructor Documentation

XIMPInputContext::XIMPInputContext ( XIMProtocol ximp,
XClientMessageEvent *  ev 
)

Definition at line 147 of file XIMPInputContext.cpp.

                                                             {
  ximp_protocol = ximp;
  xic = 0;
  ev_flow_type = 0;
  ev_masks = 0;
  filters = 0;
  preedit_maxlen = 0;
  preedit_caret_position = 0;
  is_conv_on = 0;
  og_code = og_state = 0;

  // for XIMProtocol::reset() can return reset text
  being_reset = False;
  reset_text = "";

  inputstyle = 0;
  client_win = focus_win = 0;
  preedit_fontname = 0;
  status_fontname = 0;
  attr_mask = 0;
  preedit_start_cb = 0;
  preedit_draw_cb = 0;
  preedit_caret_cb = 0;
  preedit_done_cb = 0;
  status_start_cb = 0;
  status_draw_cb = 0;
  status_done_cb = 0;
  dpy = ev->display;

  user_name = getpwuid(getuid())->pw_name;
  application_name = "Unused";

  xDisplayName = DisplayString(dpy);
  xServerVendor = ServerVendor(dpy);

  /* os properties */
  {
    struct utsname name;
#if 0
    char arch[12];
#endif
    uname(&name);
    os_name = name.sysname;
    os_version = name.release;

#ifdef ARCH
    os_arch = ARCH;
#else
    sysinfo(SI_ARCHITECTURE, arch, sizeof(arch));
    if (strcmp(arch,"sparc") == 0 ) {
      os_arch = "sparc";
    } else if (strcmp(arch,"i386") == 0 ) {
      /* use x86 to match the value received on win32 */
      os_arch = "x86";
    } else if (strcmp(arch, "ppc") == 0 ) {
      os_arch = "ppc";
    } else {
      os_arch = "Unknown";
    }
#endif
  }

  memset((void*)&preedit_attr4, 0, sizeof(Ximp_PreeditPropRec4));
  memset((void*)&status_attr4, 0, sizeof(Ximp_StatusPropRec4));

  inputstyle = ev->data.l[2];
  set_client_window(ev->data.l[1]);

  char *prop_ret = (char*)0;
  proto_version = XIMP_VERSION_UNKNOWN;

  if (ximp_protocol->get_protocol_version(client_win, prop_ret)) {
    if (prop_ret != 0 && *prop_ret != 0) {
      if (!strcmp(prop_ret, "XIMP.4.0")) {
       proto_version = XIMP_VERSION_40;
      } else if (!strcmp(prop_ret, "XIMP.3.5")) {
       proto_version = XIMP_VERSION_35;
      } else if (!strcmp(prop_ret, "XIMP_1.0")) {
       proto_version = XIMP_VERSION_40;
      } else if (!strcmp(prop_ret, "XIMP.3.4")) {
       proto_version = XIMP_VERSION_35;
      }
      XFree(prop_ret);
    }
  }

  CreateXIC();

  register_clientwin_destroy_filter();

  state_notify_cb = new XIMCallback2;
  state_notify_cb->client_data = (char*)this;
  state_notify_cb->callback = state_notify_cbproc;

  commit_string_cb = new XIMCallback2;
  commit_string_cb->client_data = (char*)this;
  commit_string_cb->callback = commit_string_cbproc;

  forward_event_cb = new XIMCallback2;
  forward_event_cb->client_data = (char*)this;
  forward_event_cb->callback = forward_event_cbproc;

  SetExtensionCallbacks();

  // callback styles?
  if (inputstyle & XIMPreeditCallbacks) {
    preedit_start_cb = new XIMCallback1;
    preedit_start_cb->client_data = (char*)this;
    preedit_start_cb->callback = preedit_start_cbproc;

    preedit_draw_cb = new XIMCallback2;
    preedit_draw_cb->client_data = (char*)this;
    preedit_draw_cb->callback = preedit_draw_cbproc;

    preedit_caret_cb = new XIMCallback2;
    preedit_caret_cb->client_data = (char*)this;
    preedit_caret_cb->callback = preedit_caret_cbproc;

    preedit_done_cb = new XIMCallback2;
    preedit_done_cb->client_data = (char*)this;
    preedit_done_cb->callback = preedit_done_cbproc;

    SetPreeditCallbacks();
  }
  if (inputstyle & XIMStatusCallbacks) {
    status_start_cb = new XIMCallback2;
    status_start_cb->client_data = (char*)this;
    status_start_cb->callback = status_start_cbproc;

    status_draw_cb = new XIMCallback2;
    status_draw_cb->client_data = (char*)this;
    status_draw_cb->callback = status_draw_cbproc;

    status_done_cb = new XIMCallback2;
    status_done_cb->client_data = (char*)this;
    status_done_cb->callback = status_done_cbproc;

    SetStatusCallbacks();
  }
  unsigned long mask = ev->data.l[3];
  get_xicvalues(mask);

  if (focus_win == 0) {
    focus_win = client_win;
  }

  select_destroy_emask();

  if (is_version_40()) {
    if (((ev_flow_type == XIMProtocol::XIMP_FE_TYPE2) ||
        (ev_flow_type == XIMProtocol::XIMP_FE_TYPE3))) {
      select_keypress_emask();
      select_keyrelease_emask();
    }
  }
}

Here is the call graph for this function:

Definition at line 432 of file XIMPInputContext.cpp.


Member Function Documentation

int XIMPInputContext::auxiliary_done ( IMAuxStruct auxiliary) [virtual]

Implements InputContext.

Definition at line 607 of file XIMPInputContext.cpp.

                                                       {
  return 0;
}
int XIMPInputContext::auxiliary_draw ( IMAuxStruct auxiliary) [virtual]

Implements InputContext.

Definition at line 603 of file XIMPInputContext.cpp.

                                                       {
  return 0;
}
int XIMPInputContext::auxiliary_start ( IMAuxStruct auxiliary) [virtual]

Implements InputContext.

Definition at line 599 of file XIMPInputContext.cpp.

                                                        {
  return 0;
}
Bool XIMPInputContext::checkAltKey ( XClientMessageEvent *  ev)

Definition at line 1767 of file XIMPInputContext.cpp.

                                                     {
  unsigned int kcode = ev->data.l[2];
  unsigned int kstate = ev->data.l[3];

  if (is_version_40()) {
    switch (ev_flow_type) {
    case XIMProtocol::XIMP_SYNC_BE_TYPE2: // Solaris XIMP support this
      return ximp_protocol->isConversionKey(kcode, kstate, is_conv_on);
    case XIMProtocol::XIMP_FE_TYPE1:      // Solaris XIMP support this
    default:
      return False;
    }
  } else {
    return ximp_protocol->isConversionKey(kcode, kstate, is_conv_on);
  }
}

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 684 of file XIMPInputContext.cpp.

{return client_win;}

Here is the caller graph for this function:

int XIMPInputContext::client_window ( Window &  ret) const

Definition at line 1761 of file XIMPInputContext.cpp.

                                                 {
  ret = client_win;
  return client_win != 0;
}
int XIMPInputContext::commit_string ( IMText text) [virtual]

Implements InputContext.

Definition at line 502 of file XIMPInputContext.cpp.

                                            {
  return True;
}
int XIMPInputContext::commit_string ( char *  text) [private]

Definition at line 1398 of file XIMPInputContext.cpp.

                                          {
  int input_context_id = ximp_protocol->getICID(this);
  int length = strlen(text);

  if (length > 20) {
    Atom atom = ximp_protocol->set_ctext_property((unsigned char*)text ,
                                            length, True);
    ximp_protocol->send_client_message(focus_win,
                                   (is_version_40() ?
                                   XIMProtocol::XIMP_READPROP4 :
                                   XIMProtocol::XIMP_READPROP3),
                                   input_context_id,
                                   atom, 0, 0);
  } else {
    ximp_protocol->commit_by_client_message(focus_win,
                                       input_context_id,
                                       text, length);
  }
  return True;
}

Here is the call graph for this function:

void XIMPInputContext::commit_string_cbproc ( XIC  xic,
XPointer  client_data,
XPointer  call_data_p 
) [static]

Definition at line 400 of file XIMPInputContext.cpp.

                                                         {
  XIMText *cbtext = (XIMText*)call_data_p;
  char *mb_data = (char*)cbtext->string.multi_byte;
  XIMPInputContext *ic = (XIMPInputContext*)client_data;

  if (mb_data == 0 || *mb_data == 0) return;

  // mb_data is native encoding, so need to convert to CT
  XTextProperty prop;
  XmbTextListToTextProperty(ic->dpy, &mb_data,
                         1, XCompoundTextStyle, &prop);
  char *ret = (char *)prop.value;
  if (ic->being_reset)
    ic->reset_text += ret;
  else
    ic->commit_string(ret);

  if (prop.value) XFree(prop.value);
  return;
}

Here is the caller graph for this function:

Implements InputContext.

Definition at line 616 of file XIMPInputContext.cpp.

                                 {
  return conversion_end(True);
}

Here is the caller graph for this function:

Definition at line 658 of file XIMPInputContext.cpp.

                                                {
  int input_context_id = ximp_protocol->getICID(this);
  unselect_keypress_emask();
  unselect_keyrelease_emask();
  set_conv_state(False);

  if (reply_back) {
    if (!xic) DelayBind();
    XSetICValues(xic,
               XNPreeditState, XIMPreeditDisable,
               0);
  }

  ximp_protocol->send_client_message(focus_win,
                                 (is_version_40() ?
                                  XIMProtocol::XIMP_SPROC_STOPPED4 :
                                  XIMProtocol::XIMP_PROCESS_END3),
                                 input_context_id,
                                 0, 0, 0);
  return 0;
}

Here is the call graph for this function:

Implements InputContext.

Definition at line 612 of file XIMPInputContext.cpp.

                                   {
  return conversion_start(True);
}

Here is the caller graph for this function:

Definition at line 621 of file XIMPInputContext.cpp.

                                                  {
  int input_context_id = ximp_protocol->getICID(this);
  if (is_version_40()) {
    if (is_ximp_type(XIMProtocol::XIMP_FE_TYPE1)) {
      select_keypress_emask();
      select_keyrelease_emask();
    }
  } else {
    if (is_ximp_type(XIMProtocol::XIMP_FRONTEND)) {
      select_keypress_emask();
    }
  }
  set_conv_state(True);

  if (reply_back) {
    if (!xic) DelayBind();
    if (xic) {
      XSetICValues(xic,
                 XNPreeditState, XIMPreeditEnable,
                 0);
    } else {
      conversion_end();
      return 0;
    }
  }

  // this return message is necessary for XIMP_EXTENSION EXT_CONV
  ximp_protocol->send_client_message(focus_win,
                                 (is_version_40() ?
                                  XIMProtocol::XIMP_SPROC_STARTED4 :
                                  XIMProtocol::XIMP_PROCESS_BEGIN3),
                                 input_context_id,
                                 0, 0, 0);
  return 0;
}

Here is the call graph for this function:

void XIMPInputContext::CreateXIC ( ) [private]

Definition at line 77 of file XIMPInputContext.cpp.

            {
  XIM xim = 0;
  if ((xim = ximp_protocol->getXIM())) {
    xic = XCreateIC(xim,
                  XNInputStyle, inputstyle,
                  XNClientWindow, client_win,
                  0);
    if (!xic) {
      // need to reconnect
      ximp_protocol->CloseIM();
      ximp_protocol->OpenIM();
      if ((xim = ximp_protocol->getXIM())) {
       xic = XCreateIC(xim,
                     XNInputStyle, inputstyle,
                     XNClientWindow, client_win,
                     0);
      }
    }
  }
  return;
}

Here is the call graph for this function:

Here is the caller graph for this function:

void XIMPInputContext::DelayBind ( ) [private]

Definition at line 57 of file XIMPInputContext.cpp.

            {
  CreateXIC();
  register_clientwin_destroy_filter();

  SetExtensionCallbacks();
  if (inputstyle & XIMPreeditCallbacks) {
    SetPreeditCallbacks();
  }
  if (inputstyle & XIMStatusCallbacks) {
    SetStatusCallbacks();
  }
  if (focus_win && xic) {
    XSetICValues(xic,
               XNFocusWindow, focus_win,
               0);
  }
}

Here is the call graph for this function:

Here is the caller graph for this function:

Bool XIMPInputContext::destroy_clientwin_filter ( Display *  display,
Window  win,
XEvent *  ev,
XPointer  client_data 
) [static, private]

Definition at line 1273 of file XIMPInputContext.cpp.

                                                            {
  XIMPInputContext *ic = (XIMPInputContext*)client_data;
  ic->unregister_clientwin_destroy_filter();
  // client_window is destroyed, so xic is no longer valid
  if (ic->xic) {
    ic->destroy_xic();
    return True;
  }
  return False;
}

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 1732 of file XIMPInputContext.cpp.

                              {
  unregister_clientwin_destroy_filter();
  if (xic) XDestroyIC(xic);
  xic = 0;
}

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 681 of file XIMPInputContext.cpp.

{return focus_win;}

Here is the caller graph for this function:

int XIMPInputContext::focus_window ( Window &  ret) const

Definition at line 1754 of file XIMPInputContext.cpp.

                                                {
  if (!(attr_mask & XIMP_FOCUS_WIN_MASK4)) return False;
  ret = focus_win;
  return True;
}

Implements InputContext.

Definition at line 507 of file XIMPInputContext.cpp.

                                                       {
  return True;
}
void XIMPInputContext::forward_event_cbproc ( XIC  xic,
XPointer  client_data,
XPointer  call_data_p 
) [static]

Definition at line 423 of file XIMPInputContext.cpp.

                                                         {
  XEvent *call_data = (XEvent*)call_data_p;
  XIMPInputContext *ic = (XIMPInputContext*)client_data;

  ic->forward_xevent(call_data);
  return;
}

Here is the call graph for this function:

Here is the caller graph for this function:

int XIMPInputContext::forward_xevent ( XEvent *  event)

Definition at line 1366 of file XIMPInputContext.cpp.

                                              {
  int input_context_id = ximp_protocol->getICID(this);
  switch (event->type) {
  case KeyPress:
    ximp_protocol->send_client_message(focus_win,
                                   (is_version_40() ?
                                   XIMProtocol::XIMP_KEYPRESS4 :
                                   XIMProtocol::XIMP_KEYPRESS3),
                                   input_context_id,
                                   event->xkey.keycode,
                                   event->xkey.state,
                                   (is_version_40() ?
                                   event->xkey.time : 0));
    if (is_version_40()) {
      set_match(event->xkey.keycode, event->xkey.state);
    }
    break;
  case KeyRelease:
    if (process_match(event->xkey.keycode, event->xkey.state)) {
      ximp_protocol->send_client_message(focus_win,
                             XIMProtocol::XIMP_KEYRELEASE4,
                             input_context_id,
                             event->xkey.keycode,
                             event->xkey.state,
                             event->xkey.time);
    }
    break;
  }
  return True;
}

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 1716 of file XIMPInputContext.cpp.

                                    {
  being_reset = False;
  return (char*)reset_text;
}

Here is the caller graph for this function:

Definition at line 858 of file XIMPInputContext.cpp.

                {
  Window new_focus_win;
  if (!ximp_protocol->get_focus_window(client_win,
                                   new_focus_win)) {
    return False;
  }
  set_focus_window(new_focus_win);
  return True;
}

Here is the call graph for this function:

Here is the caller graph for this function:

void InputContext::get_icvalues ( IMArg args,
int  n 
) const [inherited]

Definition at line 53 of file InputContext.cpp.

                                                   {
  for (int i = 0; i < n; i++) {
    args[i].value = &(arg_list.getItemByKey(args[i].id));
  }
}

Here is the call graph for this function:

Bool XIMPInputContext::get_preedit3 ( unsigned long  mask) [private]

Definition at line 968 of file XIMPInputContext.cpp.

                                 {
  Ximp_PreeditPropRec3 preedit_attr3;
  if (!ximp_protocol->get_preedit3(client_win,
                               preedit_attr3)) {
    return False;
  }
  if (mask & XIMP_PRE_AREA_MASK3) {
    preedit_attr4.area.x = preedit_attr3.area.x;
    preedit_attr4.area.y = preedit_attr3.area.y;
    preedit_attr4.area.width = preedit_attr3.area.width;
    preedit_attr4.area.height = preedit_attr3.area.height;
    set_preedit_area(preedit_attr4.area.x, preedit_attr4.area.y,
                   preedit_attr4.area.width, preedit_attr4.area.height);
  }
  if (mask & XIMP_PRE_AREANEED_MASK3) {
    preedit_attr4.area_needed.width = preedit_attr3.area_needed.width;
    preedit_attr4.area_needed.height = preedit_attr3.area_needed.height;
    set_preedit_area_needed(preedit_attr4.area_needed.width,
                         preedit_attr4.area_needed.height);
  }

  if (mask & XIMP_PRE_SPOTL_MASK3) {
    preedit_attr4.spot_location.x = preedit_attr3.spot_location.x;
    preedit_attr4.spot_location.y = preedit_attr3.spot_location.y;
    set_preedit_spot_location(preedit_attr4.spot_location.x,
                           preedit_attr4.spot_location.y);
  }

  if (mask & XIMP_PRE_COLORMAP_MASK3) {
    preedit_attr4.colormap = preedit_attr3.colormap;
    set_preedit_colormap(preedit_attr4.colormap);
  }

  if (mask & XIMP_PRE_FG_MASK3) {
    preedit_attr4.foreground = preedit_attr3.foreground;
    set_preedit_fg(preedit_attr4.foreground);
  }

  if (mask & XIMP_PRE_BG_MASK3) {
    preedit_attr4.background = preedit_attr3.background;
    set_preedit_bg(preedit_attr4.background);
  }

  if (mask & XIMP_PRE_BGPIXMAP_MASK3) {
    preedit_attr4.bg_pixmap = preedit_attr3.bg_pixmap;
    set_preedit_bg_pixmap(preedit_attr4.bg_pixmap);
  }

  if (mask & XIMP_PRE_LINESP_MASK3) {
    preedit_attr4.line_spacing = preedit_attr3.line_spacing;
    set_preedit_line_spacing(preedit_attr4.line_spacing);
  }

  if (mask & XIMP_PRE_CURSOR_MASK3) {
    preedit_attr4.cursor = preedit_attr3.cursor;
    set_preedit_cursor(preedit_attr4.cursor);
  }

  return True;
}

Here is the call graph for this function:

Here is the caller graph for this function:

Bool XIMPInputContext::get_preedit4 ( unsigned long  mask) [private]

Definition at line 207 of file XIMPPreeditIC.cpp.

                                   {
  if (!ximp_protocol->get_preedit_font(client_win,
                                   (char **)&preedit_fontname)) {
    return False;
  }

  // as XIM client
  XVaNestedList preedit_attr;
  XFontSet font_set = XFactory::create_fontset(dpy, preedit_fontname);
  preedit_attr = XVaCreateNestedList(0,
                                 XNFontSet, font_set,
                                 NULL);
  XSetICValues(xic,
              XNPreeditAttributes, preedit_attr,
              0);
  XFree(preedit_attr);
  return True;
}

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 956 of file XIMPInputContext.cpp.

                   {
  unsigned long ximp_type_mask;
  if (!ximp_protocol->get_server_type4(client_win,
                                   ximp_type_mask)) {
    return False;
  }
  ev_flow_type = ximp_type_mask;
  return True;
}

Here is the call graph for this function:

Here is the caller graph for this function:

Bool XIMPInputContext::get_status3 ( unsigned long  mask) [private]

Definition at line 1031 of file XIMPInputContext.cpp.

                                {
  Ximp_StatusPropRec3 status_attr3;
  if (!ximp_protocol->get_status3(client_win,
                              status_attr3)) {
    return False;
  }
  if (mask & XIMP_STS_AREA_MASK3) {
    status_attr4.area.x = status_attr3.area.x;
    status_attr4.area.y = status_attr3.area.y;
    status_attr4.area.width = status_attr3.area.width;
    status_attr4.area.height = status_attr3.area.height;
    set_status_area(status_attr4.area.x, status_attr4.area.y,
                  status_attr4.area.width, status_attr4.area.height);
  }

  if (mask & XIMP_STS_AREANEED_MASK3) {
    status_attr4.area_needed.width = status_attr3.area_needed.width;
    status_attr4.area_needed.height = status_attr3.area_needed.height;
    set_status_area_needed(status_attr4.area_needed.width,
                        status_attr4.area_needed.height);
  }

  if (mask & XIMP_STS_COLORMAP_MASK3) {
    status_attr4.colormap = status_attr3.colormap;
    set_status_colormap(status_attr4.colormap);
  }

  if (mask & XIMP_STS_FG_MASK3) {
    status_attr4.foreground = status_attr3.foreground;
    set_status_fg(status_attr3.foreground);
  }

  if (mask & XIMP_STS_BG_MASK3) {
    status_attr4.background = status_attr3.background;
    set_status_bg(status_attr3.background);
  }

  if (mask & XIMP_STS_BGPIXMAP_MASK3) {
    status_attr4.bg_pixmap = status_attr3.bg_pixmap;
    set_status_bg_pixmap(status_attr4.bg_pixmap);
  }

  if (mask & XIMP_STS_LINESP_MASK3) {
    status_attr4.line_spacing = status_attr3.line_spacing;
    set_status_line_spacing(status_attr4.line_spacing);
  }

  if (mask & XIMP_STS_CURSOR_MASK3) {
    status_attr4.cursor = status_attr3.cursor;
    set_status_cursor(status_attr4.cursor);
  }
  return True;
}

Here is the call graph for this function:

Here is the caller graph for this function:

Bool XIMPInputContext::get_status4 ( unsigned long  mask) [private]

Definition at line 192 of file XIMPStatusIC.cpp.

                                  {
  if (!ximp_protocol->get_status_font(client_win,
                                  (char **)&status_fontname)) {
    return False;
  }
  // as XIM client
  XVaNestedList status_attr;
  XFontSet font_set = XFactory::create_fontset(dpy, status_fontname);
  status_attr = XVaCreateNestedList(0,
                                XNFontSet, font_set,
                                NULL);
  XSetICValues(xic,
              XNStatusAttributes, status_attr,
              0);
  XFree(status_attr);
  return True;
}

Here is the call graph for this function:

Here is the caller graph for this function:

void XIMPInputContext::get_values ( XClientMessageEvent *  ev)

Definition at line 759 of file XIMPInputContext.cpp.

                                                    {
  unsigned long mask = ev->data.l[2];
  set_xicvalues(mask);
  return;
}

Here is the call graph for this function:

Here is the caller graph for this function:

Bool XIMPInputContext::get_xicvalues ( unsigned long &  u_mask) [private]

Definition at line 781 of file XIMPInputContext.cpp.

                                     {

  long mask = (long)u_mask;
  if (is_version_40()) {
    if (mask & XIMP_FOCUS_WIN_MASK4) {
      if (get_focus_win())
       attr_mask |= XIMP_FOCUS_WIN_MASK4;
      else
       return False;
    }
    if (mask & XIMP_PRE_FONT_MASK4) {
      if (get_preedit_font())
       attr_mask |= XIMP_PRE_FONT_MASK4;
      else
       return False;
    }
    if (mask & XIMP_STS_FONT_MASK4) {
      if (get_status_font())
       attr_mask |= XIMP_STS_FONT_MASK4;
      else
       return False;
    }
    if (mask & PREEDIT_MASK4) {
      if (get_preedit4(mask))
       attr_mask |= mask & PREEDIT_MASK4;
      else
       return False;
    }
    if (mask & STATUS_MASK4) {
      if (get_status4(mask))
       attr_mask |= mask & STATUS_MASK4;
      else
       return False;
    }
    if (mask & XIMP_SERVERTYPE_MASK4) {
      if (get_server_type4())
       attr_mask |= mask & XIMP_SERVERTYPE_MASK4;
      else
       return False;
    }
  } else {
    if (mask & XIMP_FOCUS_WIN_MASK3) {
      if (get_focus_win())
       attr_mask |= XIMP_FOCUS_WIN_MASK3;
      else
       return False;
    }
    if (mask & XIMP_PRE_FONT_MASK3) {
      if (get_preedit_font())
       attr_mask |= XIMP_PRE_FONT_MASK3;
      else
       return False;
    }
    if (mask & XIMP_STS_FONT_MASK3) {
      if (get_status_font())
       attr_mask |= XIMP_STS_FONT_MASK3;
      else
       return False;
    }
    if (mask & PREEDIT_MASK3) {
      if (get_preedit3(mask))
       attr_mask |= mask & PREEDIT_MASK3;
      else
       return False;
    }
    if (mask & STATUS_MASK3) {
      if (get_status3(mask))
       attr_mask |= mask & STATUS_MASK3;
      else
       return False;
    }
  }
  return True;
}

Here is the call graph for this function:

Here is the caller graph for this function:

Implements InputContext.

Definition at line 454 of file XIMPInputContext.cpp.

                           {
  return application_name;
}
const CompoundString & XIMPInputContext::getEngineName ( ) const [virtual]

Implements InputContext.

Definition at line 497 of file XIMPInputContext.cpp.

                      {
  return ximp_protocol->getIfName();
}

Here is the call graph for this function:

const CompoundString & XIMPInputContext::getLocaleName ( ) const [virtual]

Implements InputContext.

Definition at line 491 of file XIMPInputContext.cpp.

Here is the call graph for this function:

const CompoundString & XIMPInputContext::getOSArch ( ) const [virtual]

Implements InputContext.

Definition at line 466 of file XIMPInputContext.cpp.

                  {
  return os_arch;
}
const CompoundString & XIMPInputContext::getOSName ( ) const [virtual]

Implements InputContext.

Definition at line 460 of file XIMPInputContext.cpp.

                  {
  return os_name;
}
const CompoundString & XIMPInputContext::getOSVersion ( ) const [virtual]

Implements InputContext.

Definition at line 472 of file XIMPInputContext.cpp.

                     {
  return os_version;
}
const CompoundString & XIMPInputContext::getUser ( ) const [virtual]

Implements InputContext.

Definition at line 448 of file XIMPInputContext.cpp.

                {
  return user_name;
}

Implements InputContext.

Definition at line 479 of file XIMPInputContext.cpp.

                          {
  return xDisplayName;
}

Implements InputContext.

Definition at line 485 of file XIMPInputContext.cpp.

                         {
  return xServerVendor;
}

Definition at line 134 of file XIMPInputContext.hh.

{return is_conv_on;}

Here is the caller graph for this function:

Definition at line 1749 of file XIMPInputContext.cpp.

Here is the caller graph for this function:

Definition at line 133 of file XIMPInputContext.hh.

Here is the caller graph for this function:

Bool XIMPInputContext::is_ximp_type ( long  type) [inline]

Definition at line 136 of file XIMPInputContext.hh.

{return (ev_flow_type == type);}

Here is the caller graph for this function:

int XIMPInputContext::lookup_done ( IMLookupStruct lookup) [virtual]

Implements InputContext.

Definition at line 594 of file XIMPInputContext.cpp.

                                                    {
  return 0;
}
int XIMPInputContext::lookup_draw ( IMLookupStruct lookup) [virtual]

Implements InputContext.

Definition at line 584 of file XIMPInputContext.cpp.

                                                    {
  return True;
}

Definition at line 589 of file XIMPInputContext.cpp.

                                                       {
  return 0;
}
int XIMPInputContext::lookup_start ( IMLookupStruct lookup) [virtual]

Implements InputContext.

Definition at line 579 of file XIMPInputContext.cpp.

                                                     {
  return 0;
}
int XIMPInputContext::preedit_caret ( IMPreeditStruct preedit) [virtual]

Implements InputContext.

Definition at line 530 of file XIMPInputContext.cpp.

                                                        {
  return True;
}

Here is the caller graph for this function:

int XIMPInputContext::preedit_caret ( XIMPreeditCaretCallbackStruct *  caret) [private]

Definition at line 1526 of file XIMPInputContext.cpp.

                                                                    {
  int input_context_id = ximp_protocol->getICID(this);

  ximp_protocol->send_client_message(focus_win,
                                 (is_version_40() ?
                                  XIMProtocol::XIMP_PREEDITCARET4 :
                                  XIMProtocol::XIMP_PREEDITCARET3),
                                 input_context_id,
                                 caret->position,
                                 caret->direction,
                                 caret->style);
  return True;
}

Here is the call graph for this function:

void XIMPInputContext::preedit_caret_cbproc ( XIC  xic,
XPointer  client_data,
XPointer  call_data_p 
) [static]

Definition at line 350 of file XIMPInputContext.cpp.

                                                         {
  XIMPInputContext *ic = (XIMPInputContext*)client_data;
  XIMPreeditCaretCallbackStruct *call_data =
    (XIMPreeditCaretCallbackStruct*)call_data_p;
  ic->preedit_caret(call_data);
}

Here is the call graph for this function:

Here is the caller graph for this function:

int XIMPInputContext::preedit_done ( IMPreeditStruct preedit) [virtual]

Implements InputContext.

Definition at line 535 of file XIMPInputContext.cpp.

                                                       {
  int input_context_id = ximp_protocol->getICID(this);

  ximp_protocol->send_client_message(focus_win,
                                 (is_version_40() ?
                                  XIMProtocol::XIMP_PREEDITDONE4 :
                                  XIMProtocol::XIMP_PREEDITDONE3),
                                 input_context_id,
                                 0, 0, 0);
  return 0;
}

Here is the call graph for this function:

Here is the caller graph for this function:

void XIMPInputContext::preedit_done_cbproc ( XIC  xic,
XPointer  client_data,
XPointer  call_data_p 
) [static]

Definition at line 358 of file XIMPInputContext.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

int XIMPInputContext::preedit_draw ( IMPreeditStruct preedit) [virtual]

Implements InputContext.

Definition at line 525 of file XIMPInputContext.cpp.

                                                       {
  return True;
}

Here is the caller graph for this function:

int XIMPInputContext::preedit_draw ( XIMPreeditDrawCallbackStruct *  draw) [private]

Definition at line 1420 of file XIMPInputContext.cpp.

                                                                 {
  int input_context_id = ximp_protocol->getICID(this);
  int length;

  if (!(inputstyle & XIMPreeditCallbacks)) {
    return True;
  }
  
  if (draw->text) {
    length = strlen((char*)draw->text->string.multi_byte);
  } else {
    length = 0;
  }

  if (length <= COMMIT_CMSG_MAX) {
    /* send by client message */
    preedit_draw_by_cm(draw);
  } else {
    Atom atom1, atom2, atom3;
    CARD32 l[3];
    char *ctext;
    CARD32 *feedback;
    int n;

    l[0] = draw->caret; l[1] = draw->chg_first; l[2] = draw->chg_length;
    atom1 = ximp_protocol->set_preedit_draw_data_property((unsigned char*)l,
                                                   3);

    if (draw->text) {
      ctext = draw->text->string.multi_byte;
      atom2 = ximp_protocol->set_ctext_property((unsigned char*)ctext,
                                          length);
    } else {
      atom2 = ximp_protocol->set_ctext_property((unsigned char*)0,
                                          0);
    }

    if (draw->text) {
      feedback = draw->text->feedback;
      for (n = 0; (feedback[n] != 0) && (n < draw->text->length); n++) ;
      atom3 = ximp_protocol->set_feedback_property((unsigned char*)feedback,
                                             n);
    } else {
      atom3 = ximp_protocol->set_feedback_property((unsigned char*)0, 0);
    }
    ximp_protocol->send_client_message(focus_win,
                                   (is_version_40() ?
                                   XIMProtocol::XIMP_PREEDITDRAW4 :
                                   XIMProtocol::XIMP_PREEDITDRAW3),
                                   input_context_id,
                                   atom1, atom2, atom3);
  }
  return True;
}

Here is the call graph for this function:

int XIMPInputContext::preedit_draw_by_cm ( XIMPreeditDrawCallbackStruct *  draw) [private]

Definition at line 1583 of file XIMPInputContext.cpp.

                                                                       {
  CARD32 l[5];
  int chg_count;
  int chg_first = draw->chg_first;
  int chg_length = draw->chg_length;
  int i;
  int input_context_id = ximp_protocol->getICID(this);
  XIMFeedback first_feedback;
  XIMFeedback *feedback;
  int size;

  l[0] = (is_version_40() ?
         XIMProtocol::XIMP_PREEDITDRAW_CM4 :
         XIMProtocol::XIMP_PREEDITDRAW_CM3);
  l[1] = input_context_id;
  l[2] = (unsigned long)draw->caret;

  if (!draw->text) {
    l[2] |= (XIMP_PDCBSTATUS_NOTEXT | XIMP_PDCBSTATUS_NOFEEDBACK) << 16;
    l[3] = chg_length;
    l[3] |= chg_first << 16;
    l[4]  = 0;
  } else if (!draw->text->feedback) {
#ifdef USE_PREEDITDRAW_TINY
    cont int PREEDITDRAW_TINY_SIZE = 8;
    if (draw->text->length < PREEDITDRAW_TINY_SIZE) {
      return preedit_draw_tiny(draw);
    }
#endif /* USE_PREEDITDRAW_TINY */
    l[2] |= XIMP_PDCBSTATUS_NOFEEDBACK << 16;
    l[3]  = chg_length;
    l[3] |= chg_first << 16;
    l[4]  = 0;
  } else if (!draw->text->string.wide_char) {
#ifdef USE_PREEDITDRAW_FEEDBACK
    chg_count = 0;
    first_feedback = *draw->text->feedback;
    for (i = 0, feedback = draw->text->feedback;
        i < draw->text->length; i++, feedback++) {
      if (first_feedback != *feedback) {
       chg_count++;
       first_feedback = *feedback;
      }
    }
#endif /* USE_PREEDITDRAW_FEEDBACK */
    if (is_version_40()) {
#ifdef USE_PREEDITDRAW_FEEDBACK
      if (chg_count < 2) {
       return preedit_draw_feedback(draw);
      } else {
#endif /* USE_PREEDITDRAW_FEEDBACK */
       l[2] |= (XIMP_PDCBSTATUS_FEEDBACKS_VIA_PROP
               | XIMP_PDCBSTATUS_NOTEXT ) << 16;
       l[3] = chg_length;
       l[3] |= chg_first << 16;
       l[4] = ximp_protocol->replace_prop_pool((unsigned char *)draw->text->feedback,
                                          draw->text->length);
#ifdef USE_PREEDITDRAW_FEEDBACK
      }
#endif /* USE_PREEDITDRAW_FEEDBACK */
    } else {
      l[2] |= XIMP_PDCBSTATUS_NOTEXT << 16;
      l[3] = chg_length;
      l[3] |= chg_first << 16;
      l[4] = *draw->text->feedback;
    }
  } else {
    chg_count = 0;
    first_feedback = *draw->text->feedback;
    for (i = 0, feedback = draw->text->feedback;
        i < (int)draw->text->length; i++, feedback++ ) {
      if (first_feedback != *feedback) {
       chg_count++;
       first_feedback = *feedback;
      }
    }
    if (chg_count == 0) {
      l[3] = chg_length;
      l[3] |= chg_first << 16;
      l[4] = *draw->text->feedback;
    } else if (is_version_40()) {
      l[2] |= XIMP_PDCBSTATUS_FEEDBACKS_VIA_PROP << 16;
      l[3] = chg_length;
      l[3] |= chg_first << 16;
      l[4] = ximp_protocol->replace_prop_pool((unsigned char *)draw->text->feedback,
                                         draw->text->length);
    } else {
      int first_chg_first = chg_first;
      first_feedback = *draw->text->feedback;
      size = 0;
      for (i = 0, feedback = draw->text->feedback;
          i < (int)draw->text->length;
          i++, size++, feedback++, chg_first++) {
       if (first_feedback != *feedback) {
         l[3] = chg_length;
         l[3] |= first_chg_first << 16;
         l[4] = first_feedback;
         first_chg_first = chg_first;
         first_feedback = *feedback;
         ximp_protocol->send_client_message(focus_win,
                                        l[0], l[1], l[2], l[3], l[4]);
         const char *text = draw->text->string.multi_byte;
         ximp_protocol->commit_by_client_message(focus_win,
                                            input_context_id,
                                            text, strlen(text));
         chg_length = 0;
       }
      }
      l[3]  = chg_length;
      l[3] |= first_chg_first << 16;
      l[4]  = first_feedback;
      first_feedback = *feedback;
      ximp_protocol->send_client_message(focus_win,
                                    l[0], l[1], l[2], l[3], l[4]);
      const char *text = draw->text->string.multi_byte;
      ximp_protocol->commit_by_client_message(focus_win,
                                         input_context_id,
                                         text, strlen(text));
      return True;
    }
  }
  ximp_protocol->send_client_message(focus_win,
                                 l[0], l[1], l[2], l[3], l[4]);
  if (draw->text != NULL && draw->text->string.multi_byte != NULL) {
    const char *text = draw->text->string.multi_byte;
    ximp_protocol->commit_by_client_message(focus_win,
                                       input_context_id,
                                       text, strlen(text));
  }
  return True;
}

Here is the call graph for this function:

Here is the caller graph for this function:

void XIMPInputContext::preedit_draw_cbproc ( XIC  xic,
XPointer  client_data,
XPointer  call_data_p 
) [static]

Definition at line 328 of file XIMPInputContext.cpp.

                                                        {
  XIMPInputContext *ic = (XIMPInputContext*)client_data;
  XIMPreeditDrawCallbackStruct *call_data =
    (XIMPreeditDrawCallbackStruct*)call_data_p;
  char *mb_data;
  XTextProperty prop;
  prop.value = 0;
  if (call_data->text) {
    // call_data is native encoding, so need to convert to CT
    mb_data = call_data->text->string.multi_byte;
    XmbTextListToTextProperty(ic->dpy, &mb_data,
                           1, XCompoundTextStyle, &prop);
    call_data->text->string.multi_byte = (char*)prop.value;
  }
  ic->preedit_draw(call_data);

  if (call_data->text) call_data->text->string.multi_byte = mb_data;
  if (prop.value) XFree(prop.value);
  return;
}

Here is the call graph for this function:

Here is the caller graph for this function:

int XIMPInputContext::preedit_draw_feedback ( XIMPreeditDrawCallbackStruct *  draw) [private]

Definition at line 1476 of file XIMPInputContext.cpp.

                                                                          {
  CARD32 l[5];
  int count;
  int length = draw->text->length;
  int chg_first = draw->chg_first;
  XIMFeedback *feedback = draw->text->feedback;
  XIMFeedback  first_feedback;
  int input_context_id = ximp_protocol->getICID(this);

  first_feedback = *feedback;
  l[0] = XIMProtocol::XIMP_PREEDITDRAW_CM_FEEDBACK4;
  l[1] = input_context_id;
  l[2] = chg_first << 24;
  l[3] = (unsigned long)first_feedback;
  for (count = 0; ((count < length ) && (*feedback == first_feedback));
       count++, chg_first++, feedback++)
    ;

  l[2] |= count << 16;
  if (count < length) {
    l[2] |= chg_first << 8;
    l[2] |= length - count;
    l[4] = (unsigned long)*feedback;
  } else {
    l[2] |= 0xffff;
  }
  ximp_protocol->send_client_message(focus_win,
                                 l[0], l[1], l[2], l[3], l[4]);
  return True;
}

Here is the call graph for this function:

Here is the caller graph for this function:

int XIMPInputContext::preedit_draw_tiny ( XIMPreeditDrawCallbackStruct *  draw) [private]

Definition at line 1508 of file XIMPInputContext.cpp.

                                                                      {
  CARD32 l[5];
  char *text = (char *)&l[3];
  int ct_length = strlen(draw->text->string.multi_byte);
  int input_context_id = ximp_protocol->getICID(this);

  l[0] = XIMProtocol::XIMP_PREEDITDRAW_CM_TINY4;
  l[1] = input_context_id;
  l[2] = ct_length;
  l[2] |= draw->chg_length << 8;
  l[2] |= draw->chg_first << 16;
  memmove(text, draw->text->string.multi_byte, ct_length); // l[3]-l[4]
  ximp_protocol->send_client_message(focus_win,
                                 l[0], l[1], l[2], l[3], l[4]);
  return True;
}

Here is the call graph for this function:

Here is the caller graph for this function:

int XIMPInputContext::preedit_start ( IMPreeditStruct preedit) [virtual]

Implements InputContext.

Definition at line 512 of file XIMPInputContext.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

int XIMPInputContext::preedit_start_cbproc ( XIC  xic,
XPointer  client_data,
XPointer  call_data_p 
) [static]

Definition at line 320 of file XIMPInputContext.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

Bool XIMPInputContext::process_match ( int  kcode,
int  state 
)

Definition at line 772 of file XIMPInputContext.cpp.

                                                    {
  if (og_code == kcode && og_state == state) {
    return True;
  }
  return False;
}

Here is the caller graph for this function:

Definition at line 1287 of file XIMPInputContext.cpp.

                                                    {
#if 0
  XFactory::register_filter(dpy, client_win,
                         DestroyNotify, DestroyNotify,
                         destroy_clientwin_filter, (XPointer)this);
#endif
}

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 1722 of file XIMPInputContext.cpp.

                            {
  char *ret = NULL;
  being_reset = True;
  reset_text = "";
  if (!xic) DelayBind();
  if (xic) 
    ret = XmbResetIC(xic);
  return ret;
}

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 1342 of file XIMPInputContext.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 1334 of file XIMPInputContext.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 1350 of file XIMPInputContext.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 1357 of file XIMPInputContext.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void XIMPInputContext::set_client_window ( Window  new_win)

Definition at line 688 of file XIMPInputContext.cpp.

                                                  {
  if (client_win != new_win) {
    // We may have to unregister only in case of reregistering 
    filters &= ~FLT_DESTROY;
    unselect_destroy_clientwin_emask();
    unregister_clientwin_destroy_filter();
    client_win = new_win;
    if (xic) {
      // client_win might have been set already, but even for
      // such cases, we allow to set client_win again.
      XSetICValues(xic,
                 XNClientWindow, client_win,
                 0);
      filters &= ~FLT_DESTROY;
      select_destroy_clientwin_emask();
      register_clientwin_destroy_filter();
    }
  }
  return;
}

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 135 of file XIMPInputContext.hh.

{return is_conv_on = flag;}

Here is the caller graph for this function:

Definition at line 1163 of file XIMPInputContext.cpp.

                                {
  if (!ximp_protocol->set_focus_window(client_win,
                                   focus_win)) {
    return False;
  }
  return True;
}

Here is the call graph for this function:

Here is the caller graph for this function:

void XIMPInputContext::set_focus_window ( Window  new_win)

Definition at line 709 of file XIMPInputContext.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 732 of file XIMPInputContext.cpp.

                                                {
  ev_masks = mask;
  return;
}

Here is the caller graph for this function:

void InputContext::set_icvalues ( IMArg args,
int  n 
) [inherited]

Definition at line 46 of file InputContext.cpp.

                                             {
  for (int i = 0; i < n; i++) {
    arg_list.addItemByKey(args[i].value, args[i].id);
  }
}

Here is the call graph for this function:

void XIMPInputContext::set_match ( int  kcode,
int  state 
)

Definition at line 766 of file XIMPInputContext.cpp.

                                                {
  og_code = kcode; og_state = state;
  return;
}

Here is the caller graph for this function:

Definition at line 1222 of file XIMPInputContext.cpp.

                               {
  // check area needed width/height to see if 0
#if 0
  const int MIN_PREEDIT_CHARNUM = 20; 
#endif
  Ximp_PreeditPropRec3 preedit_attr3;
  preedit_attr3.area.x = preedit_attr4.area.x;
  preedit_attr3.area.y = preedit_attr4.area.y;
  preedit_attr3.area.width = preedit_attr4.area.width;
  preedit_attr3.area.height = preedit_attr4.area.height;
  preedit_attr3.area_needed.width = preedit_attr4.area_needed.width;
  preedit_attr3.area_needed.height = preedit_attr4.area_needed.height;
  preedit_attr3.spot_location.x = preedit_attr4.spot_location.x;
  preedit_attr3.spot_location.y = preedit_attr4.spot_location.y;
  preedit_attr3.colormap = preedit_attr4.colormap;
  preedit_attr3.foreground = preedit_attr4.foreground;
  preedit_attr3.background = preedit_attr4.background;
  preedit_attr3.bg_pixmap = preedit_attr4.bg_pixmap;
  preedit_attr3.line_spacing = preedit_attr4.line_spacing;
  preedit_attr3.cursor = preedit_attr4.cursor;
  if (!ximp_protocol->set_preedit3(client_win,
                               preedit_attr3)) {
    return False;
  }
  return True;
}

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 1190 of file XIMPInputContext.cpp.

                               {
  // check area needed width/height to see if 0
#if 0
  const int MIN_PREEDIT_CHARNUM = 20;
#endif
  if (!ximp_protocol->set_preedit4(client_win,
                               preedit_attr4)) {
    return False;
  }
  return True;
}

Here is the call graph for this function:

Here is the caller graph for this function:

void XIMPInputContext::set_preedit_area ( long  x,
long  y,
unsigned long  width,
unsigned long  height 
)

Definition at line 70 of file XIMPPreeditIC.cpp.

                                                     {
  // as XIM client
  XVaNestedList preedit_attr;
  XRectangle area;
  area.x = x; area.y = y; area.width = width; area.height = height;
  preedit_attr = XVaCreateNestedList(0,
                                 XNArea, &area,
                                 NULL);
  XSetICValues(xic,
              XNPreeditAttributes, preedit_attr,
              0);
  XFree(preedit_attr);
  return;
}

Here is the caller graph for this function:

void XIMPInputContext::set_preedit_area_needed ( unsigned long  width,
unsigned long  height 
)

Definition at line 86 of file XIMPPreeditIC.cpp.

                                                           {
  // as XIM client
  XVaNestedList preedit_attr;
  XRectangle area;
  area.x = 0; area.y = 0; area.width = width; area.height = height;
  preedit_attr = XVaCreateNestedList(0,
                                 XNAreaNeeded, &area,
                                 NULL);
  XSetICValues(xic,
              XNPreeditAttributes, preedit_attr,
              0);
  XFree(preedit_attr);
  if (width == 0 || height == 0) {
    // do geometry negotiation
    XRectangle *area2 = (XRectangle*)0;
    preedit_attr = XVaCreateNestedList(0,
                                   XNAreaNeeded, &area2,
                                   NULL);
    XGetICValues(xic,
               XNPreeditAttributes, preedit_attr,
               0);
    XFree(preedit_attr);
    if (area2) {
      if (width == 0) {
       preedit_attr4.area_needed.width = area2->width;
      }
      if (height == 0) {
       preedit_attr4.area_needed.height = area2->height;
      }
      XFree(area2);
    }
    // fallback to avoid setting 0
    if (preedit_attr4.area_needed.width == 0) {
      XFontSet font_set = XFactory::create_fontset(dpy, preedit_fontname);
      XFontSetExtents *fsx = XExtentsOfFontSet(font_set);
      preedit_attr4.area_needed.width = fsx->max_logical_extent.width *10;
      XFactory::free_fontset(dpy, font_set);
    }
    if (preedit_attr4.area_needed.height == 0) {
      XFontSet font_set = XFactory::create_fontset(dpy, preedit_fontname);
      XFontSetExtents *fsx = XExtentsOfFontSet(font_set);
      preedit_attr4.area_needed.height = fsx->max_logical_extent.height;
      XFactory::free_fontset(dpy, font_set);
    }
  }
  return;
}

Here is the call graph for this function:

Here is the caller graph for this function:

void XIMPInputContext::set_preedit_bg ( unsigned long  bg)

Definition at line 184 of file XIMPPreeditIC.cpp.

                                                 {
  // as XIM client
  XVaNestedList preedit_attr;
  preedit_attr = XVaCreateNestedList(0,
                                 XNBackground, bg,
                                 NULL);
  XSetICValues(xic,
              XNPreeditAttributes, preedit_attr,
              0);
  XFree(preedit_attr);
}

Here is the caller graph for this function:

void XIMPInputContext::set_preedit_bg_pixmap ( Pixmap  pixmap)

Definition at line 148 of file XIMPPreeditIC.cpp.

                                                        {
  // as XIM client
  XVaNestedList preedit_attr;
  preedit_attr = XVaCreateNestedList(0,
                                 XNBackgroundPixmap, bg_pixmap,
                                 NULL);
  XSetICValues(xic,
              XNPreeditAttributes, preedit_attr,
              0);
  XFree(preedit_attr);
}

Here is the caller graph for this function:

void XIMPInputContext::set_preedit_caret_position ( unsigned long  pos)

Definition at line 743 of file XIMPInputContext.cpp.

                                                              {
  preedit_caret_position = pos;
  return;
}

Here is the caller graph for this function:

void XIMPInputContext::set_preedit_colormap ( Colormap  colormap)

Definition at line 135 of file XIMPPreeditIC.cpp.

                                                        {
  // as XIM client
  XVaNestedList preedit_attr;
  preedit_attr = XVaCreateNestedList(0,
                                 XNColormap, colormap,
                                 NULL);
  XSetICValues(xic,
              XNPreeditAttributes, preedit_attr,
              0);
  XFree(preedit_attr);
  return;
}

Here is the caller graph for this function:

void XIMPInputContext::set_preedit_cursor ( Cursor  cursor)

Definition at line 172 of file XIMPPreeditIC.cpp.

                                                  {
  // as XIM client
  XVaNestedList preedit_attr;
  preedit_attr = XVaCreateNestedList(0,
                                 XNCursor, cursor,
                                 NULL);
  XSetICValues(xic,
              XNPreeditAttributes, preedit_attr,
              0);
  XFree(preedit_attr);
}

Here is the caller graph for this function:

void XIMPInputContext::set_preedit_fg ( unsigned long  fg)

Definition at line 196 of file XIMPPreeditIC.cpp.

                                                 {
  XVaNestedList preedit_attr;
  preedit_attr = XVaCreateNestedList(0,
                                 XNForeground, fg,
                                 NULL);
  XSetICValues(xic,
              XNPreeditAttributes, preedit_attr,
              0);
  XFree(preedit_attr);
}

Here is the caller graph for this function:

Definition at line 1172 of file XIMPInputContext.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void XIMPInputContext::set_preedit_line_spacing ( long  line_spacing)

Definition at line 160 of file XIMPPreeditIC.cpp.

                                                            {
  // as XIM client
  XVaNestedList preedit_attr;
  preedit_attr = XVaCreateNestedList(0,
                                 XNLineSpace, line_spacing,
                                 NULL);
  XSetICValues(xic,
              XNPreeditAttributes, preedit_attr,
              0);
  XFree(preedit_attr);
}

Here is the caller graph for this function:

void XIMPInputContext::set_preedit_maxlen ( unsigned long  len)

Definition at line 737 of file XIMPInputContext.cpp.

                                                      {
  preedit_maxlen = len;
  return;
}

Here is the caller graph for this function:

void XIMPInputContext::set_preedit_spot_location ( long  x,
long  y 
)

Definition at line 51 of file XIMPPreeditIC.cpp.

                                                          {
  attr_mask |= XIMP_PRE_SPOTL_MASK4;
  preedit_attr4.spot_location.x = x;
  preedit_attr4.spot_location.y = y;

  // as XIM client
  XVaNestedList preedit_attr;
  XPoint spot;
  spot.x = x; spot.y = y;
  preedit_attr = XVaCreateNestedList(0,
                                 XNSpotLocation, &spot,
                                 NULL);
  XSetICValues(xic,
              XNPreeditAttributes, preedit_attr,
              0);
  XFree(preedit_attr);
  return;
}

Here is the caller graph for this function:

Definition at line 1213 of file XIMPInputContext.cpp.

                                   {
  if (!ximp_protocol->set_server_type4(client_win,
                                   ev_flow_type)) {
    return False;
  }
  return True;
}

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 1250 of file XIMPInputContext.cpp.

                              {
  // check area needed width/height to see if 0
  Ximp_StatusPropRec3 status_attr3;
  status_attr3.area.x = status_attr4.area.x;
  status_attr3.area.y = status_attr4.area.y;
  status_attr3.area.width = status_attr4.area.width;
  status_attr3.area.height = status_attr4.area.height;
  status_attr3.area_needed.width = status_attr4.area_needed.width;
  status_attr3.area_needed.height = status_attr4.area_needed.height;
  status_attr3.colormap = status_attr4.colormap;
  status_attr3.foreground = status_attr4.foreground;
  status_attr3.background = status_attr4.background;
  status_attr3.bg_pixmap = status_attr4.bg_pixmap;
  status_attr3.line_spacing = status_attr4.line_spacing;
  status_attr3.cursor = status_attr4.cursor;
  if (!ximp_protocol->set_status3(client_win,
                              status_attr3)) {
    return False;
  }
  return True;
}

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 1203 of file XIMPInputContext.cpp.

                              {
  // check area needed width/height to see if 0
  if (!ximp_protocol->set_status4(client_win,
                              status_attr4)) {
    return False;
  }
  return True;
}

Here is the call graph for this function:

Here is the caller graph for this function:

void XIMPInputContext::set_status_area ( long  x,
long  y,
unsigned long  width,
unsigned long  height 
)

Definition at line 51 of file XIMPStatusIC.cpp.

                                                    {
  // as XIM client
  XVaNestedList status_attr;
  XRectangle area;
  area.x = x; area.y = y; area.width = width; area.height = height;
  status_attr = XVaCreateNestedList(0,
                                XNArea, &area,
                                NULL);
  XSetICValues(xic,
              XNStatusAttributes, status_attr,
              0);
  XFree(status_attr);
  return;
}

Here is the caller graph for this function:

void XIMPInputContext::set_status_area_needed ( unsigned long  width,
unsigned long  height 
)

Definition at line 67 of file XIMPStatusIC.cpp.

                                                           {
  if (!xic) DelayBind();

  // as XIM client
  XVaNestedList status_attr;
  XRectangle area;
  area.x = 0; area.y = 0; area.width = width; area.height = height;
  status_attr = XVaCreateNestedList(0,
                                XNAreaNeeded, &area,
                                NULL);
  XSetICValues(xic,
              XNStatusAttributes, status_attr,
              0);
  XFree(status_attr);
  if (width == 0 || height == 0) {
    // do geometry negotiation
    XRectangle *area2 = (XRectangle*)0;
    status_attr = XVaCreateNestedList(0,
                                  XNAreaNeeded, &area2,
                                  NULL);
    XGetICValues(xic,
               XNStatusAttributes, status_attr,
               0);
    XFree(status_attr);
    if (area2) {
      if (width == 0 ||
         inputstyle & XIMPreeditArea) {
       status_attr4.area_needed.width = area2->width;
      }
      if (height == 0) {
       status_attr4.area_needed.height = area2->height;
      }
      XFree(area2);
    }
    // fallback to avoid setting 0
    if (status_attr4.area_needed.width == 0) {
      XFontSet font_set = XFactory::create_fontset(dpy, status_fontname);
      XFontSetExtents *fsx = XExtentsOfFontSet(font_set);
      status_attr4.area_needed.width = fsx->max_logical_extent.width *10;
      XFactory::free_fontset(dpy, font_set);
    }
    if (status_attr4.area_needed.height == 0) {
      XFontSet font_set = XFactory::create_fontset(dpy, status_fontname);
      XFontSetExtents *fsx = XExtentsOfFontSet(font_set);
      status_attr4.area_needed.height = fsx->max_logical_extent.height;
      XFactory::free_fontset(dpy, font_set);
    }
  }
  return;
}

Here is the call graph for this function:

Here is the caller graph for this function:

void XIMPInputContext::set_status_bg ( unsigned long  bg)

Definition at line 132 of file XIMPStatusIC.cpp.

                                                {
  // as XIM client
  XVaNestedList status_attr;
  status_attr = XVaCreateNestedList(0,
                                XNBackground, bg,
                                NULL);
  XSetICValues(xic,
              XNStatusAttributes, status_attr,
              0);
  XFree(status_attr);
}

Here is the caller graph for this function:

void XIMPInputContext::set_status_bg_pixmap ( Pixmap  pixmap)

Definition at line 156 of file XIMPStatusIC.cpp.

                                                       {
  // as XIM client
  XVaNestedList status_attr;
  status_attr = XVaCreateNestedList(0,
                                XNBackgroundPixmap, bg_pixmap,
                                NULL);
  XSetICValues(xic,
              XNStatusAttributes, status_attr,
              0);
  XFree(status_attr);
}

Here is the caller graph for this function:

void XIMPInputContext::set_status_colormap ( Colormap  colormap)

Definition at line 119 of file XIMPStatusIC.cpp.

                                                       {
  // as XIM client
  XVaNestedList status_attr;
  status_attr = XVaCreateNestedList(0,
                                XNColormap, colormap,
                                NULL);
  XSetICValues(xic,
              XNStatusAttributes, status_attr,
              0);
  XFree(status_attr);
  return;
}

Here is the caller graph for this function:

void XIMPInputContext::set_status_cursor ( Cursor  cursor)

Definition at line 180 of file XIMPStatusIC.cpp.

                                                 {
  // as XIM client
  XVaNestedList status_attr;
  status_attr = XVaCreateNestedList(0,
                                XNCursor, cursor,
                                NULL);
  XSetICValues(xic,
              XNStatusAttributes, status_attr,
              0);
  XFree(status_attr);
}

Here is the caller graph for this function:

void XIMPInputContext::set_status_fg ( unsigned long  fg)

Definition at line 144 of file XIMPStatusIC.cpp.

                                                {
  // as XIM client
  XVaNestedList status_attr;
  status_attr = XVaCreateNestedList(0,
                                XNForeground, fg,
                                NULL);
  XSetICValues(xic,
              XNStatusAttributes, status_attr,
              0);
  XFree(status_attr);
}

Here is the caller graph for this function:

Definition at line 1181 of file XIMPInputContext.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void XIMPInputContext::set_status_line_spacing ( long  line_spacing)

Definition at line 168 of file XIMPStatusIC.cpp.

                                                           {
  // as XIM client
  XVaNestedList status_attr;
  status_attr = XVaCreateNestedList(0,
                                XNLineSpace, line_spacing,
                                NULL);
  XSetICValues(xic,
              XNStatusAttributes, status_attr,
              0);
  XFree(status_attr);
}

Here is the caller graph for this function:

void XIMPInputContext::set_values ( XClientMessageEvent *  ev)

Definition at line 749 of file XIMPInputContext.cpp.

                                                    {
  unsigned long mask = ev->data.l[2];
  if (is_version_40()) {
    mask &= ~(XIMP_FOCUS_WIN_MASK4|XIMP_SERVERTYPE_MASK4);
  }
  get_xicvalues(mask);
  return;
}

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 1738 of file XIMPInputContext.cpp.

                               {
  if (!xic) DelayBind();
  if (xic) XSetICFocus(xic);
}

Here is the call graph for this function:

Here is the caller graph for this function:

Bool XIMPInputContext::set_xicvalues ( unsigned long &  u_mask) [private]

Definition at line 1087 of file XIMPInputContext.cpp.

                                     {

  long mask = (long)u_mask;
  if (is_version_40()) {
    if (mask & XIMP_FOCUS_WIN_MASK4) {
      if (set_focus_win())
       attr_mask |= XIMP_FOCUS_WIN_MASK4;
      else
       return False;
    }
    if (mask & XIMP_PRE_FONT_MASK4) {
      if (set_preedit_font())
       attr_mask |= XIMP_PRE_FONT_MASK4;
      else
       return False;
    }
    if (mask & XIMP_STS_FONT_MASK4) {
      if (set_status_font())
       attr_mask |= XIMP_STS_FONT_MASK4;
      else
       return False;
    }
    if (mask & PREEDIT_MASK4) {
      if (set_preedit4())
       attr_mask |= mask & PREEDIT_MASK4;
      else
       return False;
    }
    if (mask & STATUS_MASK4) {
      if (set_status4())
       attr_mask |= mask & STATUS_MASK4;
      else
       return False;
    }
    if (mask & XIMP_SERVERTYPE_MASK4) {
      if (set_server_type4())
       attr_mask |= mask & XIMP_SERVERTYPE_MASK4;
      else
       return False;
    }
  } else {
    if (mask & XIMP_FOCUS_WIN_MASK3) {
      if (set_focus_win())
       attr_mask |= XIMP_FOCUS_WIN_MASK3;
      else
       return False;
    }
    if (mask & XIMP_PRE_FONT_MASK3) {
      if (set_preedit_font())
       attr_mask |= XIMP_PRE_FONT_MASK3;
      else
       return False;
    }
    if (mask & XIMP_STS_FONT_MASK3) {
      if (set_status_font())
       attr_mask |= XIMP_STS_FONT_MASK3;
      else
       return False;
    }
    if (mask & PREEDIT_MASK3) {
      if (set_preedit3())
       attr_mask |= mask & PREEDIT_MASK3;
      else
       return False;
    }
    if (mask & STATUS_MASK3) {
      if (set_status3())
       attr_mask |= mask & STATUS_MASK3;
      else
       return False;
    }
  }
  return True;
}

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 101 of file XIMPInputContext.cpp.

                        {
  if (xic)
    XSetICValues(xic,
               XNPreeditStateNotifyCallback, state_notify_cb,
               // private XIC attribute
               "commitStringCallback", commit_string_cb,
               "forwardEventCallback", forward_event_cb,
               0);
  return;
}

Here is the caller graph for this function:

Definition at line 114 of file XIMPInputContext.cpp.

                      {
  if (xic) {
    XVaNestedList preedit_attr = XVaCreateNestedList(0,
                          XNPreeditStartCallback, preedit_start_cb,
                          XNPreeditDrawCallback, preedit_draw_cb,
                          XNPreeditCaretCallback, preedit_caret_cb,
                          XNPreeditDoneCallback, preedit_done_cb,
                          0);
    XSetICValues(xic,
               XNPreeditAttributes, preedit_attr,
               0);
    XFree(preedit_attr);
  }
  return;
}

Here is the caller graph for this function:

Definition at line 132 of file XIMPInputContext.cpp.

                     {
  if (xic) {
    XVaNestedList status_attr = XVaCreateNestedList(0,
                         XNStatusStartCallback, status_start_cb,
                         XNStatusDrawCallback, status_draw_cb,
                         XNStatusDoneCallback, status_done_cb,
                         0);
    XSetICValues(xic,
               XNStatusAttributes, status_attr,
               0);
    XFree(status_attr);
  }
}

Here is the caller graph for this function:

void XIMPInputContext::state_notify_cbproc ( XIC  xic,
XPointer  client_data,
XPointer  call_data_p 
) [static]

Definition at line 305 of file XIMPInputContext.cpp.

                                                         {
  XIMPreeditStateNotifyCallbackStruct *call_data =
    (XIMPreeditStateNotifyCallbackStruct *)call_data_p;
  XIMPInputContext *ic = (XIMPInputContext*)client_data;
  if (call_data->state == XIMPreeditDisable) {
    ic->conversion_end(False);
  }
  if (call_data->state == XIMPreeditEnable) {
    ic->conversion_start(False);
  }
}

Here is the call graph for this function:

Here is the caller graph for this function:

int XIMPInputContext::status_done ( IMStatusStruct status) [virtual]

Implements InputContext.

Definition at line 566 of file XIMPInputContext.cpp.

                                                    {
  int input_context_id = ximp_protocol->getICID(this);

  ximp_protocol->send_client_message(focus_win,
                                 (is_version_40() ?
                                  XIMProtocol::XIMP_STATUSDONE4 :
                                  XIMProtocol::XIMP_STATUSDONE3),
                                 input_context_id,
                                 0, 0, 0);
  return 0;
}

Here is the call graph for this function:

Here is the caller graph for this function:

void XIMPInputContext::status_done_cbproc ( XIC  xic,
XPointer  client_data,
XPointer  call_data_p 
) [static]

Definition at line 392 of file XIMPInputContext.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

int XIMPInputContext::status_draw ( IMStatusStruct status) [virtual]

Implements InputContext.

Definition at line 561 of file XIMPInputContext.cpp.

                                                    {
  return True;
}

Here is the caller graph for this function:

int XIMPInputContext::status_draw ( XIMStatusDrawCallbackStruct *  draw) [private]

Definition at line 1541 of file XIMPInputContext.cpp.

                                                               {
  int input_context_id = ximp_protocol->getICID(this);
  Atom atom1, atom2;
  char *ctext;
  CARD32 *feedback;
  int len;
  int n;

  switch (draw->type) {
  case XIMTextType:
    ctext = draw->data.text->string.multi_byte;
    len = strlen(draw->data.text->string.multi_byte);
    atom1 = ximp_protocol->set_ctext_property((unsigned char*)ctext, len);

    feedback = draw->data.text->feedback;
    for (n = 0;
        draw->data.text->feedback[n] != 0 && n < draw->data.text->length;
        n++) ;
    atom2 = ximp_protocol->set_feedback_property((unsigned char*)feedback,
                                           n);

    ximp_protocol->send_client_message(focus_win,
                                   (is_version_40() ?
                                   XIMProtocol::XIMP_STATUSDRAW4 :
                                   XIMProtocol::XIMP_STATUSDRAW3),
                                   input_context_id,
                                   XIMTextType, atom1, atom2);
    break;
  case XIMBitmapType:
    ximp_protocol->send_client_message(focus_win,
                                   (is_version_40() ?
                                   XIMProtocol::XIMP_STATUSDRAW4 :
                                   XIMProtocol::XIMP_STATUSDRAW3),
                                   input_context_id,
                                   XIMBitmapType,
                                   (CARD32)draw->data.bitmap, 0);
    break;
  }
  return True;
}

Here is the call graph for this function:

void XIMPInputContext::status_draw_cbproc ( XIC  xic,
XPointer  client_data,
XPointer  call_data_p 
) [static]

Definition at line 370 of file XIMPInputContext.cpp.

                                                       {
  XIMPInputContext *ic = (XIMPInputContext*)client_data;
  XIMStatusDrawCallbackStruct *call_data =
    (XIMStatusDrawCallbackStruct*)call_data_p;

  XTextProperty prop;
  prop.value = 0;
  if (call_data->data.text) {
    // call_data is native encoding, so need to convert to CT
    char *mb_data = call_data->data.text->string.multi_byte;
    XmbTextListToTextProperty(ic->dpy, &mb_data,
                           1, XCompoundTextStyle, &prop);
    call_data->data.text->string.multi_byte = (char*)prop.value;
  }

  ic->status_draw(call_data);

  if (prop.value) XFree(prop.value);
  return;
}

Here is the call graph for this function:

Here is the caller graph for this function:

int XIMPInputContext::status_start ( IMStatusStruct status) [virtual]

Implements InputContext.

Definition at line 548 of file XIMPInputContext.cpp.

                                                     {
  int input_context_id = ximp_protocol->getICID(this);

  ximp_protocol->send_client_message(focus_win,
                                 (is_version_40() ?
                                  XIMProtocol::XIMP_STATUSSTART4 :
                                  XIMProtocol::XIMP_STATUSSTART3),
                                 input_context_id,
                                 0, 0, 0);
  return True;
}

Here is the call graph for this function:

Here is the caller graph for this function:

void XIMPInputContext::status_start_cbproc ( XIC  xic,
XPointer  client_data,
XPointer  call_data_p 
) [static]

Definition at line 364 of file XIMPInputContext.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 1295 of file XIMPInputContext.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 1311 of file XIMPInputContext.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 1303 of file XIMPInputContext.cpp.

Here is the call graph for this function:

Definition at line 1319 of file XIMPInputContext.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 1326 of file XIMPInputContext.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 1743 of file XIMPInputContext.cpp.

                                 {
  if (!xic) DelayBind();
  if (xic) XUnsetICFocus(xic);
}

Here is the call graph for this function:

Here is the caller graph for this function:


Member Data Documentation

Definition at line 237 of file XIMPInputContext.hh.

Definition at line 212 of file XIMPInputContext.hh.

Definition at line 219 of file XIMPInputContext.hh.

Window XIMPInputContext::client_win [private]

Definition at line 204 of file XIMPInputContext.hh.

Definition at line 232 of file XIMPInputContext.hh.

Display* XIMPInputContext::dpy [private]

Definition at line 201 of file XIMPInputContext.hh.

Definition at line 213 of file XIMPInputContext.hh.

Definition at line 214 of file XIMPInputContext.hh.

long XIMPInputContext::filters [private]

Definition at line 215 of file XIMPInputContext.hh.

Window XIMPInputContext::focus_win [private]

Definition at line 205 of file XIMPInputContext.hh.

Definition at line 233 of file XIMPInputContext.hh.

XIMStyle XIMPInputContext::inputstyle [private]

Definition at line 203 of file XIMPInputContext.hh.

Definition at line 216 of file XIMPInputContext.hh.

Definition at line 217 of file XIMPInputContext.hh.

Definition at line 218 of file XIMPInputContext.hh.

Definition at line 239 of file XIMPInputContext.hh.

Definition at line 238 of file XIMPInputContext.hh.

Definition at line 240 of file XIMPInputContext.hh.

Definition at line 206 of file XIMPInputContext.hh.

Definition at line 225 of file XIMPInputContext.hh.

Definition at line 246 of file XIMPInputContext.hh.

Definition at line 226 of file XIMPInputContext.hh.

Definition at line 224 of file XIMPInputContext.hh.

Definition at line 207 of file XIMPInputContext.hh.

unsigned long XIMPInputContext::preedit_maxlen [private]

Definition at line 245 of file XIMPInputContext.hh.

Definition at line 222 of file XIMPInputContext.hh.

Definition at line 308 of file XIMPInputContext.hh.

Definition at line 220 of file XIMPInputContext.hh.

Definition at line 231 of file XIMPInputContext.hh.

Definition at line 208 of file XIMPInputContext.hh.

Definition at line 229 of file XIMPInputContext.hh.

Definition at line 228 of file XIMPInputContext.hh.

Definition at line 209 of file XIMPInputContext.hh.

Definition at line 227 of file XIMPInputContext.hh.

Definition at line 235 of file XIMPInputContext.hh.

Definition at line 242 of file XIMPInputContext.hh.

XIC XIMPInputContext::xic [private]

Definition at line 200 of file XIMPInputContext.hh.

Definition at line 181 of file XIMPInputContext.hh.

Definition at line 243 of file XIMPInputContext.hh.


The documentation for this class was generated from the following files: