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
XInputContext Class Reference

#include <XInputContext.hh>

Collaboration diagram for XInputContext:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 XInputContext (XIMPublic *, CARD16, int)
 ~XInputContext ()
int get_input_style (CARD32 &ret)
int get_client_window (Window &ret)
int get_focus_window (Window &ret)
int get_fwin_select_mask (CARD32 &ret)
Bool is_conv_state ()
int get_preedit_fontset (char *ret)
int get_preedit_area (long &x, long &y, unsigned long &width, unsigned long &height)
int get_preedit_area_needed (long &x, long &y, unsigned long &width, unsigned long &height)
int get_preedit_spot_location (long &x, long &y)
int get_preedit_fg (CARD32 &fg)
int get_preedit_bg (CARD32 &bg)
int get_preedit_bg_pixmap (CARD32 &bg_pixmap)
int get_preedit_line_spacing (CARD32 &linesp)
int get_preedit_cursor (Cursor &cursor)
int get_preedit_colormap (Colormap &colormap)
int get_status_fontset (char *ret)
int get_status_area (long &x, long &y, unsigned long &width, unsigned long &height)
int get_status_area_needed (long &x, long &y, unsigned long &width, unsigned long &height)
int get_status_fg (CARD32 &fg)
int get_status_bg (CARD32 &bg)
int get_status_bg_pixmap (CARD32 &bg_pixmap)
int get_status_line_spacing (CARD32 &linesp)
int get_status_cursor (Cursor &cursor)
int get_status_colormap (Colormap &colormap)
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_fontset (char *)
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_fontset (char *)
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_focus ()
void unset_focus ()
Bool is_focused ()
char * reset ()
void destroy ()
void filter_event (XEvent *)
void conversion_start (Bool reply_back)
void conversion_end (Bool reply_back)

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

Bool being_reset

Private Types

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)
}

Private Member Functions

void register_clientwin_destroy_filter ()
void unregister_clientwin_destroy_filter ()
void unselect_destroy_clientwin_emask ()
void select_destroy_clientwin_emask ()
void select_destroy_emask ()
void SetExtensionCallbacks ()
void SetPreeditCallbacks ()
void SetStatusCallbacks ()

Static Private Member Functions

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

Private Attributes

long filters
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
Ximp_PreeditPropRec4 preedit_attr4
CompoundString preedit_fontname
Ximp_StatusPropRec4 status_attr4
CompoundString status_fontname
XIMPublicximp_protocol
CARD16 connect_id
XIC xic
XIMStyle inputstyle
Display * dpy
Window client_win
Window focus_win
long attr_mask
long ev_masks
Bool is_conv_on
CompoundString reset_text
Bool focused

Detailed Description

Definition at line 65 of file XInputContext.hh.


Member Enumeration Documentation

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 317 of file XInputContext.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:
FLT_NONE 
FLT_KEYPRESS 
FLT_KEYRELEASE 
FLT_DESTROY 

Definition at line 272 of file XInputContext.hh.

                      {
    FLT_NONE = (0L), FLT_KEYPRESS = (1L<<0),
    FLT_KEYRELEASE = (1L<<1), FLT_DESTROY = (1L<<2)
  };

Constructor & Destructor Documentation

XInputContext::XInputContext ( XIMPublic ximp,
CARD16  imid,
int  style 
)

Definition at line 59 of file XInputContext.cpp.

                                     {
  XIM xim = ximp->getXIM();
  client_win = focus_win = 0;
  ev_masks = 0;
  attr_mask = 0;
  is_conv_on = 0;
  connect_id = imid;
  inputstyle = style;
  filters = 0;

  focused = False;

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

  ximp_protocol = ximp;

  dpy = ximp_protocol->getDisplay();

  if (xim)
    xic = XCreateIC(xim,
                  XNInputStyle, inputstyle,
                  0);
  else
    abort();

  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();
  }

}

Here is the call graph for this function:

Definition at line 139 of file XInputContext.cpp.

                              {
  delete state_notify_cb;
  delete commit_string_cb;
  delete forward_event_cb;

  if (inputstyle & XIMPreeditCallbacks) {
    delete preedit_start_cb;
    delete preedit_draw_cb;
    delete preedit_caret_cb;
    delete preedit_done_cb;
  }
  if (inputstyle & XIMStatusCallbacks) {
    delete status_start_cb;
    delete status_draw_cb;
    delete status_done_cb;
    delete state_notify_cb;
  }
}

Member Function Documentation

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

Definition at line 990 of file XInputContext.cpp.

                                                         {
  XIMText *cbtext = (XIMText*)call_data_p;
  char *mb_data = (char*)cbtext->string.multi_byte;
  XInputContext *ic = (XInputContext*)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)
    // XmbTextListToTextProperty() will be performed in ResetICMessageProc()
    ic->reset_text = mb_data;
  else {
    XIMPublic *ximp_protocol = ic->ximp_protocol;
    XIMS ims = ((R6IMProtocol*)ximp_protocol)->getXIMS();
    int icid = R6IMProtocol::getICID(ic);
    IMCommitEventStruct data;
    memset(&data, 0, sizeof(IMCommitEventStruct));
    data.icid = icid;
    data.connect_id = ic->connect_id;
    data.flag = XimLookupChars;
    data.commit_string = ret;
    ims->methods->commitString(ims, &data);
  }

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

Here is the call graph for this function:

Here is the caller graph for this function:

void XInputContext::conversion_end ( Bool  reply_back)

Definition at line 370 of file XInputContext.cpp.

                                             {
  if (reply_back && xic) {
    XSetICValues(xic,
               XNPreeditState, XIMPreeditDisable,
               0);
  }
  is_conv_on = 0;
}

Here is the caller graph for this function:

void XInputContext::conversion_start ( Bool  reply_back)

Definition at line 360 of file XInputContext.cpp.

                                               {
  if (reply_back && xic) {
    XSetICValues(xic,
               XNPreeditState, XIMPreeditEnable,
               0);
  }
  is_conv_on = 1;
}

Here is the caller graph for this function:

Definition at line 321 of file XInputContext.cpp.

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

Here is the caller graph for this function:

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

Definition at line 229 of file XInputContext.cpp.

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

Here is the call graph for this function:

Here is the caller graph for this function:

void XInputContext::filter_event ( XEvent *  event)

Definition at line 329 of file XInputContext.cpp.

                                         {
  /* Forward event doesn't work after commit on kedit */
  /*  sometimes focus_win isn't get jusst after Qt start up */
  if(focus_win == 0){
        focus_win = client_win;
        set_focus_window(focus_win);
  }
  if (event->type == KeyPress || event->type == KeyRelease) {
    event->xkey.window = focus_win;
  }
  if (!XFilterEvent(event, 0)) {
    forward_event_cbproc(xic, (XPointer)this, (XPointer)event);
  }
  return;
}

Here is the call graph for this function:

Here is the caller graph for this function:

void XInputContext::forward_event_cbproc ( XIC  xic,
XPointer  client_data,
XPointer  call_data_p 
) [static]

Definition at line 1024 of file XInputContext.cpp.

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

  XIMPublic *ximp_protocol = ic->ximp_protocol;
  XIMS ims = ((R6IMProtocol*)ximp_protocol)->getXIMS();
  int icid = R6IMProtocol::getICID(ic);
  IMForwardEventStruct data;
  memset(&data, 0, sizeof(IMForwardEventStruct));
  data.icid = icid;
  data.connect_id = ic->connect_id;
  data.event = *call_data;

  ims->methods->forwardEvent(ims, &data);

  return;
}

Here is the call graph for this function:

Here is the caller graph for this function:

int XInputContext::get_client_window ( Window &  ret) [inline]

Definition at line 97 of file XInputContext.hh.

                                     {
    ret = client_win;
    return client_win != 0;
  }

Here is the caller graph for this function:

int XInputContext::get_focus_window ( Window &  ret) [inline]

Definition at line 101 of file XInputContext.hh.

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

Here is the caller graph for this function:

Definition at line 106 of file XInputContext.hh.

                                        {
    ret = ev_masks;
    return ev_masks != 0;
  }

Here is the caller graph for this function:

int XInputContext::get_input_style ( CARD32 ret) [inline]

Definition at line 93 of file XInputContext.hh.

                                   {
    ret = inputstyle;
    return inputstyle != 0;
  }

Here is the caller graph for this function:

int XInputContext::get_preedit_area ( long &  x,
long &  y,
unsigned long &  width,
unsigned long &  height 
) [inline]

Definition at line 117 of file XInputContext.hh.

Here is the caller graph for this function:

int XInputContext::get_preedit_area_needed ( long &  x,
long &  y,
unsigned long &  width,
unsigned long &  height 
) [inline]

Definition at line 126 of file XInputContext.hh.

                                                  {
    if (!(attr_mask & XIMP_PRE_AREANEED_MASK4)) return False;
    x = 0;
    y = 0;
    width = preedit_attr4.area_needed.width;
    height = preedit_attr4.area_needed.height;
    return True;
  }

Here is the caller graph for this function:

int XInputContext::get_preedit_bg ( CARD32 bg) [inline]

Definition at line 146 of file XInputContext.hh.

                                 {
    if (!(attr_mask & XIMP_PRE_BG_MASK4)) return False;
    bg = preedit_attr4.background;
    return True;
  }

Here is the caller graph for this function:

int XInputContext::get_preedit_bg_pixmap ( CARD32 bg_pixmap) [inline]

Definition at line 151 of file XInputContext.hh.

                                               {
    if (!(attr_mask & XIMP_PRE_BGPIXMAP_MASK4)) return False;
    bg_pixmap = preedit_attr4.bg_pixmap;
    return True;
  }

Here is the caller graph for this function:

int XInputContext::get_preedit_colormap ( Colormap &  colormap) [inline]

Definition at line 166 of file XInputContext.hh.

Here is the caller graph for this function:

int XInputContext::get_preedit_cursor ( Cursor &  cursor) [inline]

Definition at line 161 of file XInputContext.hh.

                                         {
    if (!(attr_mask & XIMP_PRE_CURSOR_MASK4)) return False;
    cursor = preedit_attr4.cursor;
    return True;
  }

Here is the caller graph for this function:

int XInputContext::get_preedit_fg ( CARD32 fg) [inline]

Definition at line 141 of file XInputContext.hh.

                                 {
    if (!(attr_mask & XIMP_PRE_FG_MASK4)) return False;
    fg = preedit_attr4.foreground;
    return True;
  }

Here is the caller graph for this function:

int XInputContext::get_preedit_fontset ( char *  ret) [inline]

Definition at line 112 of file XInputContext.hh.

                                     {
    if (!(attr_mask & XIMP_PRE_FONT_MASK4)) return False;
    ret = (char*)preedit_fontname;
    return True;
  }

Here is the caller graph for this function:

int XInputContext::get_preedit_line_spacing ( CARD32 linesp) [inline]

Definition at line 156 of file XInputContext.hh.

                                               {
    if (!(attr_mask & XIMP_PRE_LINESP_MASK4)) return False;
    linesp = preedit_attr4.line_spacing;
    return True;
  }

Here is the caller graph for this function:

int XInputContext::get_preedit_spot_location ( long &  x,
long &  y 
) [inline]

Definition at line 135 of file XInputContext.hh.

Here is the caller graph for this function:

int XInputContext::get_status_area ( long &  x,
long &  y,
unsigned long &  width,
unsigned long &  height 
) [inline]

Definition at line 177 of file XInputContext.hh.

                                            {
    if (!(attr_mask & XIMP_STS_AREA_MASK4)) return False;
    x = status_attr4.area.x;
    y = status_attr4.area.y;    
    width = status_attr4.area.width;
    height = status_attr4.area.height;
    return True;
  }

Here is the caller graph for this function:

int XInputContext::get_status_area_needed ( long &  x,
long &  y,
unsigned long &  width,
unsigned long &  height 
) [inline]

Definition at line 186 of file XInputContext.hh.

                                                  {
    if (!(attr_mask & XIMP_STS_AREANEED_MASK4)) return False;
    x = 0;
    y = 0;
    width = status_attr4.area_needed.width;
    height = status_attr4.area_needed.height;
    return True;
  }

Here is the caller graph for this function:

int XInputContext::get_status_bg ( CARD32 bg) [inline]

Definition at line 200 of file XInputContext.hh.

                                {
    if (!(attr_mask & XIMP_STS_BG_MASK4)) return False;
    bg = status_attr4.background;
    return True;
  }

Here is the caller graph for this function:

int XInputContext::get_status_bg_pixmap ( CARD32 bg_pixmap) [inline]

Definition at line 205 of file XInputContext.hh.

                                              {
    if (!(attr_mask & XIMP_STS_BGPIXMAP_MASK4)) return False;
    bg_pixmap = status_attr4.bg_pixmap;
    return True;
  }

Here is the caller graph for this function:

int XInputContext::get_status_colormap ( Colormap &  colormap) [inline]

Definition at line 220 of file XInputContext.hh.

Here is the caller graph for this function:

int XInputContext::get_status_cursor ( Cursor &  cursor) [inline]

Definition at line 215 of file XInputContext.hh.

                                        {
    if (!(attr_mask & XIMP_STS_CURSOR_MASK4)) return False;
    cursor = status_attr4.cursor;
    return True;
  }

Here is the caller graph for this function:

int XInputContext::get_status_fg ( CARD32 fg) [inline]

Definition at line 195 of file XInputContext.hh.

                                {
    if (!(attr_mask & XIMP_STS_FG_MASK4)) return False;
    fg = status_attr4.foreground;
    return True;
  }

Here is the caller graph for this function:

int XInputContext::get_status_fontset ( char *  ret) [inline]

Definition at line 172 of file XInputContext.hh.

                                    {
    if (!(attr_mask & XIMP_STS_FONT_MASK4)) return False;
    ret = (char*)status_fontname;
    return True;
  }

Here is the caller graph for this function:

int XInputContext::get_status_line_spacing ( CARD32 linesp) [inline]

Definition at line 210 of file XInputContext.hh.

                                              {
    if (!(attr_mask & XIMP_STS_LINESP_MASK4)) return False;
    linesp = status_attr4.line_spacing;
    return True;
  }

Here is the caller graph for this function:

Definition at line 110 of file XInputContext.hh.

{return is_conv_on;}

Here is the caller graph for this function:

Definition at line 257 of file XInputContext.hh.

{return focused;}

Here is the caller graph for this function:

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

Definition at line 869 of file XInputContext.cpp.

                                                      {
  XInputContext *ic = (XInputContext*)client_data;
  XIMPreeditCaretCallbackStruct *call_data =
    (XIMPreeditCaretCallbackStruct*)call_data_p;

  // follow kinput2, it seems that PREEDIT_DRAW will be invoked while
  // destroying an IC just after RESET_IC is called
  if (ic->being_reset) {
       return;
  }

  XIMPublic *ximp_protocol = ic->ximp_protocol;
  XIMS ims = ((R6IMProtocol*)ximp_protocol)->getXIMS();
  int icid = R6IMProtocol::getICID(ic);
  IMPreeditCBStruct data;
  memset(&data, 0, sizeof(IMPreeditCBStruct));
  data.icid = icid;
  data.connect_id = ic->connect_id;
  data.todo.caret = *call_data;

  _Xi18nPreeditCaretCallback(ims, (X11R6IMProtocol)&data);

  return;
}

Here is the call graph for this function:

Here is the caller graph for this function:

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

Definition at line 895 of file XInputContext.cpp.

                                                   {
  XInputContext *ic = (XInputContext*)client_data;

  XIMPublic *ximp_protocol = ic->ximp_protocol;
  XIMS ims = ((R6IMProtocol*)ximp_protocol)->getXIMS();
  int icid = R6IMProtocol::getICID(ic);
  IMPreeditCBStruct data;
  memset(&data, 0, sizeof(IMPreeditCBStruct));
  data.icid = icid;
  data.connect_id = ic->connect_id;

  _Xi18nPreeditDoneCallback(ims, (X11R6IMProtocol)&data);

  return;
}

Here is the call graph for this function:

Here is the caller graph for this function:

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

Definition at line 822 of file XInputContext.cpp.

                                                     {
  XInputContext *ic = (XInputContext*)client_data;
  XIMPreeditDrawCallbackStruct preedit_cb;
  XIMPreeditDrawCallbackStruct *call_data =
    (XIMPreeditDrawCallbackStruct*)call_data_p;
  XTextProperty prop;

  // follow kinput2, it seems that PREEDIT_DRAW will be invoked while
  // destroying an IC just after RESET_IC is called
  if (ic->being_reset) {
       return;
  }

  memmove(&preedit_cb, call_data, sizeof(XIMPreeditDrawCallbackStruct));

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

  XIMPublic *ximp_protocol = ic->ximp_protocol;
  XIMS ims = ((R6IMProtocol*)ximp_protocol)->getXIMS();
  int icid = R6IMProtocol::getICID(ic);
  IMPreeditCBStruct data;
  memset(&data, 0, sizeof(IMPreeditCBStruct));
  data.icid = icid;
  data.connect_id = ic->connect_id;
  data.todo.draw = preedit_cb;

  _Xi18nPreeditDrawCallback(ims, (X11R6IMProtocol)&data);

  if (prop.value) XFree(prop.value);
  delete preedit_cb.text;

  return;
}

Here is the call graph for this function:

Here is the caller graph for this function:

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

Definition at line 805 of file XInputContext.cpp.

                                                    {
  XInputContext *ic = (XInputContext*)client_data;
  XIMPublic *ximp_protocol = ic->ximp_protocol;

  XIMS ims = ((R6IMProtocol*)ximp_protocol)->getXIMS();
  int icid = R6IMProtocol::getICID(ic);
  IMPreeditCBStruct data;
  memset(&data, 0, sizeof(IMPreeditCBStruct));
  data.icid = icid;
  data.connect_id = ic->connect_id;
  _Xi18nPreeditStartCallback(ims, (X11R6IMProtocol)&data);

  return -1;
}

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 243 of file XInputContext.cpp.

                                                 {
  XFactory::register_filter(dpy, client_win,
                         DestroyNotify, DestroyNotify,
                         destroy_clientwin_filter, (XPointer)this);
}

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 346 of file XInputContext.cpp.

                     {
  being_reset = True;
  reset_text = "";
  if (xic) {
    char *mb = XmbResetIC(xic);
    if (mb) return mb;
  }
  if(reset_text) {
    return reset_text;
  }
  return 0;
}

Here is the caller graph for this function:

Definition at line 282 of file XInputContext.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 255 of file XInputContext.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void XInputContext::set_client_window ( Window  new_win)

Definition at line 208 of file XInputContext.cpp.

                                               {
  if (client_win != new_win) {
    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 305 of file XInputContext.cpp.

                         {
  if (xic) {
    XSetICFocus(xic);
  }
  focused = True;
}

Here is the caller graph for this function:

void XInputContext::set_focus_window ( Window  new_win)

Definition at line 263 of file XInputContext.cpp.

                                              {
  if (focus_win != new_win) {
    filters &= ~FLT_KEYPRESS;
    filters &= ~FLT_KEYRELEASE;
    filters &= ~FLT_DESTROY;
    focus_win = new_win;
    select_destroy_emask();

    attr_mask |= XIMP_FOCUS_WIN_MASK4;
    // as XIM client
    if (xic)
      XSetICValues(xic,
                 XNFocusWindow, focus_win,
                 0);
  }
  return;
}

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 299 of file XInputContext.cpp.

                                             {
  ev_masks = mask;
  return;
}

Here is the caller graph for this function:

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

Definition at line 401 of file XInputContext.cpp.

                                                  {
  attr_mask |= XIMP_PRE_AREA_MASK4;

  preedit_attr4.area.x = x;
  preedit_attr4.area.y = y;
  preedit_attr4.area.width = width;
  preedit_attr4.area.height = height;

  // 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);
  if (xic)
    XSetICValues(xic,
               XNPreeditAttributes, preedit_attr,
               0);
  XFree(preedit_attr);
  return;
}

Here is the caller graph for this function:

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

Definition at line 425 of file XInputContext.cpp.

                                                           {
  attr_mask |= XIMP_PRE_AREANEED_MASK4;

  preedit_attr4.area_needed.width = width;
  preedit_attr4.area_needed.height = height;

  // 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);
  if (xic)
    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);
    if (xic)
      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 XInputContext::set_preedit_bg ( unsigned long  bg)

Definition at line 550 of file XInputContext.cpp.

                                              {
  attr_mask |= XIMP_PRE_BG_MASK4;

  preedit_attr4.background = bg;

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

Here is the caller graph for this function:

void XInputContext::set_preedit_bg_pixmap ( Pixmap  pixmap)

Definition at line 499 of file XInputContext.cpp.

                                                     {
  attr_mask |= XIMP_PRE_BGPIXMAP_MASK4;

  preedit_attr4.bg_pixmap = bg_pixmap;

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

Here is the caller graph for this function:

void XInputContext::set_preedit_colormap ( Colormap  colormap)

Definition at line 481 of file XInputContext.cpp.

                                                     {
  attr_mask |= XIMP_PRE_COLORMAP_MASK4;

  preedit_attr4.colormap = colormap;

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

Here is the caller graph for this function:

void XInputContext::set_preedit_cursor ( Cursor  cursor)

Definition at line 533 of file XInputContext.cpp.

                                               {
  attr_mask |= XIMP_PRE_CURSOR_MASK4;

  preedit_attr4.cursor = cursor;

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

Here is the caller graph for this function:

void XInputContext::set_preedit_fg ( unsigned long  fg)

Definition at line 567 of file XInputContext.cpp.

                                              {
  attr_mask |= XIMP_PRE_FG_MASK4;

  preedit_attr4.foreground = fg;

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

Here is the caller graph for this function:

void XInputContext::set_preedit_fontset ( char *  fontname)

Definition at line 583 of file XInputContext.cpp.

                                                 {
  attr_mask |= XIMP_PRE_FONT_MASK4;

  preedit_fontname = fontname;

  XVaNestedList preedit_attr;
  XFontSet font_set = XFactory::create_fontset(dpy, preedit_fontname);
  preedit_attr = XVaCreateNestedList(0,
                                 XNFontSet, font_set,
                                 NULL);
  if (xic)
    XSetICValues(xic,
               XNPreeditAttributes, preedit_attr,
               0);
  XFree(preedit_attr);
}

Here is the call graph for this function:

Here is the caller graph for this function:

void XInputContext::set_preedit_line_spacing ( long  line_spacing)

Definition at line 516 of file XInputContext.cpp.

                                                         {
  attr_mask |= XIMP_PRE_LINESP_MASK4;

  preedit_attr4.line_spacing = line_spacing;

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

Here is the caller graph for this function:

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

Definition at line 380 of file XInputContext.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);
  if (xic)
    XSetICValues(xic,
               XNPreeditAttributes, preedit_attr,
               0);
  XFree(preedit_attr);
  return;
}

Here is the caller graph for this function:

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

Definition at line 601 of file XInputContext.cpp.

                                                    {
  attr_mask |= XIMP_STS_AREA_MASK4;

  status_attr4.area.x = x;
  status_attr4.area.y = y;
  status_attr4.area.width = width;;
  status_attr4.area.height = height;

  // 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);
  if (xic)
    XSetICValues(xic,
               XNStatusAttributes, status_attr,
               0);
  XFree(status_attr);
  return;
}

Here is the caller graph for this function:

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

Definition at line 625 of file XInputContext.cpp.

                                                        {
  attr_mask |= XIMP_STS_AREANEED_MASK4;

  status_attr4.area_needed.width = width;;
  status_attr4.area_needed.height = height;

  // 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);
  if (xic)
    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);
    if (xic)
      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 XInputContext::set_status_bg ( unsigned long  bg)

Definition at line 701 of file XInputContext.cpp.

                                             {
  attr_mask |= XIMP_STS_BG_MASK4;

  status_attr4.background = bg;

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

Here is the caller graph for this function:

void XInputContext::set_status_bg_pixmap ( Pixmap  pixmap)

Definition at line 735 of file XInputContext.cpp.

                                                    {
  attr_mask |= XIMP_STS_BGPIXMAP_MASK4;

  status_attr4.bg_pixmap = bg_pixmap;

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

Here is the caller graph for this function:

void XInputContext::set_status_colormap ( Colormap  colormap)

Definition at line 683 of file XInputContext.cpp.

                                                    {
  attr_mask |= XIMP_STS_COLORMAP_MASK4;

  status_attr4.colormap = colormap;

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

Here is the caller graph for this function:

void XInputContext::set_status_cursor ( Cursor  cursor)

Definition at line 769 of file XInputContext.cpp.

                                              {
  attr_mask |= XIMP_STS_CURSOR_MASK4;

  status_attr4.cursor = cursor;

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

Here is the caller graph for this function:

void XInputContext::set_status_fg ( unsigned long  fg)

Definition at line 718 of file XInputContext.cpp.

                                             {
  attr_mask |= XIMP_STS_FG_MASK4;

  status_attr4.foreground = fg;

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

Here is the caller graph for this function:

void XInputContext::set_status_fontset ( char *  fontname)

Definition at line 786 of file XInputContext.cpp.

                                                {
  attr_mask |= XIMP_STS_FONT_MASK4;

  status_fontname = fontname;

  XVaNestedList status_attr;
  XFontSet font_set = XFactory::create_fontset(dpy, status_fontname);
  status_attr = XVaCreateNestedList(0,
                                XNFontSet, font_set,
                                NULL);
  if (xic)
    XSetICValues(xic,
               XNStatusAttributes, status_attr,
               0);
  XFree(status_attr);
}

Here is the call graph for this function:

Here is the caller graph for this function:

void XInputContext::set_status_line_spacing ( long  line_spacing)

Definition at line 752 of file XInputContext.cpp.

                                                        {
  attr_mask |= XIMP_STS_LINESP_MASK4;

  status_attr4.line_spacing = line_spacing;

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

Here is the caller graph for this function:

Definition at line 195 of file XInputContext.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 161 of file XInputContext.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 179 of file XInputContext.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 XInputContext::state_notify_cbproc ( XIC  xic,
XPointer  client_data,
XPointer  call_data_p 
) [static]

Definition at line 1044 of file XInputContext.cpp.

                                                         {
  XIMPreeditStateNotifyCallbackStruct *call_data =
    (XIMPreeditStateNotifyCallbackStruct *)call_data_p;
  XInputContext *ic = (XInputContext*)client_data;

  XIMPublic *ximp_protocol = ic->ximp_protocol;
  XIMS ims = ((R6IMProtocol*)ximp_protocol)->getXIMS();
  int icid = R6IMProtocol::getICID(ic);
  IMPreeditStateStruct data;
  memset(&data, 0, sizeof(IMPreeditStateStruct));
  data.icid = icid;
  data.connect_id = ic->connect_id;

  if (call_data->state == XIMPreeditDisable) {
    ic->conversion_end(False);
    ims->methods->preeditEnd(ims, (X11R6IMProtocol)&data);
  }
  if (call_data->state == XIMPreeditEnable) {
    ic->conversion_start(False);
    ims->methods->preeditStart(ims, (X11R6IMProtocol)&data);
  }
  return;
}

Here is the call graph for this function:

Here is the caller graph for this function:

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

Definition at line 971 of file XInputContext.cpp.

                                                  {
  XInputContext *ic = (XInputContext*)client_data;

  XIMPublic *ximp_protocol = ic->ximp_protocol;
  XIMS ims = ((R6IMProtocol*)ximp_protocol)->getXIMS();
  int icid = R6IMProtocol::getICID(ic);
  IMStatusCBStruct data;
  memset(&data, 0, sizeof(IMStatusCBStruct));
  data.icid = icid;
  data.connect_id = ic->connect_id;

  _Xi18nStatusDoneCallback(ims, (X11R6IMProtocol)&data);

  return;
}

Here is the call graph for this function:

Here is the caller graph for this function:

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

Definition at line 930 of file XInputContext.cpp.

                                                    {
  XInputContext *ic = (XInputContext*)client_data;
  XIMStatusDrawCallbackStruct status_cb;
  XIMStatusDrawCallbackStruct *call_data = 
    (XIMStatusDrawCallbackStruct*)call_data_p;
  XTextProperty prop;

  memmove(&status_cb, call_data, sizeof(XIMStatusDrawCallbackStruct));

  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);
    status_cb.data.text = new XIMText;
    status_cb.data.text->length = call_data->data.text->length;
    status_cb.data.text->feedback = call_data->data.text->feedback;
    status_cb.data.text->encoding_is_wchar =
      call_data->data.text->encoding_is_wchar;
    status_cb.data.text->string.multi_byte = (char*)prop.value;
  }

  XIMPublic *ximp_protocol = ic->ximp_protocol;
  XIMS ims = ((R6IMProtocol*)ximp_protocol)->getXIMS();
  int icid = R6IMProtocol::getICID(ic);
  IMStatusCBStruct data;
  memset(&data, 0, sizeof(IMStatusCBStruct));
  data.icid = icid;
  data.connect_id = ic->connect_id;
  data.todo.draw = status_cb;

  _Xi18nStatusDrawCallback(ims, (X11R6IMProtocol)&data);

  if (prop.value) XFree(prop.value);
  delete status_cb.data.text;

  return;
}

Here is the call graph for this function:

Here is the caller graph for this function:

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

Definition at line 912 of file XInputContext.cpp.

                                                   {
  XInputContext *ic = (XInputContext*)client_data;

  XIMPublic *ximp_protocol = ic->ximp_protocol;
  XIMS ims = ((R6IMProtocol*)ximp_protocol)->getXIMS();
  int icid = R6IMProtocol::getICID(ic);
  IMStatusCBStruct data;
  memset(&data, 0, sizeof(IMStatusCBStruct));
  data.icid = icid;
  data.connect_id = ic->connect_id;

  _Xi18nStatusStartCallback(ims, (X11R6IMProtocol)&data);

  return;
}

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 249 of file XInputContext.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 290 of file XInputContext.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 313 of file XInputContext.cpp.

                           {
  if (xic) {
    XUnsetICFocus(xic);
  }
  focused = False;
}

Here is the caller graph for this function:


Member Data Documentation

long XInputContext::attr_mask [private]

Definition at line 310 of file XInputContext.hh.

Definition at line 266 of file XInputContext.hh.

Window XInputContext::client_win [private]

Definition at line 307 of file XInputContext.hh.

Definition at line 287 of file XInputContext.hh.

Definition at line 301 of file XInputContext.hh.

Display* XInputContext::dpy [private]

Definition at line 305 of file XInputContext.hh.

long XInputContext::ev_masks [private]

Definition at line 311 of file XInputContext.hh.

long XInputContext::filters [private]

Definition at line 271 of file XInputContext.hh.

Window XInputContext::focus_win [private]

Definition at line 308 of file XInputContext.hh.

Definition at line 315 of file XInputContext.hh.

Definition at line 288 of file XInputContext.hh.

XIMStyle XInputContext::inputstyle [private]

Definition at line 304 of file XInputContext.hh.

Definition at line 312 of file XInputContext.hh.

Definition at line 290 of file XInputContext.hh.

Definition at line 280 of file XInputContext.hh.

Definition at line 281 of file XInputContext.hh.

Definition at line 279 of file XInputContext.hh.

Definition at line 291 of file XInputContext.hh.

Definition at line 277 of file XInputContext.hh.

Definition at line 313 of file XInputContext.hh.

Definition at line 286 of file XInputContext.hh.

Definition at line 292 of file XInputContext.hh.

Definition at line 284 of file XInputContext.hh.

Definition at line 283 of file XInputContext.hh.

Definition at line 293 of file XInputContext.hh.

Definition at line 282 of file XInputContext.hh.

XIC XInputContext::xic [private]

Definition at line 303 of file XInputContext.hh.

Definition at line 300 of file XInputContext.hh.


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