Back to index

im-sdk  12.3.91
Classes | Typedefs | Functions
status.h File Reference
#include "commonIM.h"
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  _LocalStatusExt

Typedefs

typedef struct _LocalStatusExt LocalStatusExt

Functions

void Ximp_Local_Status_Create (XicCommon ic)
void Ximp_Local_Status_Start (XicCommon ic)
void Ximp_Local_Status_Draw (XicCommon ic)
void Ximp_Local_Status_Done (XicCommon ic)
void Ximp_Local_Status_Destroy (XicCommon ic)
void Ximp_Local_Status_Set (XicCommon ic)
void Ximp_Local_Status_Window (XicCommon ic)
char * Ximp_Local_Status_ConvertToDisplayLanguage (char *)
void Ximp_Local_Status_Reset (XicCommon ic)

Class Documentation

struct _LocalStatusExt

Definition at line 48 of file status.h.

Class Members
GC gc
GC rgc
XIMText text
Window window

Typedef Documentation


Function Documentation

Definition at line 66 of file status.c.

                                       {
  setup_local_status_ext(ic);
  return;
}

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 140 of file status.c.

                                        {
  LocalStatusExt *hook = (LocalStatusExt *)(ic->local_icpart->status_ext);

  if (!hook) return;

  Xfree(hook);
  ic->local_icpart->status_ext = 0;
  return;
}

Definition at line 134 of file status.c.

                                     {
  /* do nothing */
  return;
}

Definition at line 84 of file status.c.

                                     {
  LocalStatusExt *hook = (LocalStatusExt *)(ic->local_icpart->status_ext);
  XIMDrawTextStruct status_draw;

  if (!(ic->ximp_icpart->value_mask & XIMP_CLIENT_WIN) ||
      !ic->core.client_window)
    return;

  if (!hook) {
    Ximp_Local_Status_Start(ic);
    hook = (LocalStatusExt *)(ic->local_icpart->status_ext);
    if (!hook) return;
  }
  if (hook->text.length == 0) return;

  if (XIM_USE_UNICODE(ic->core.im)) {
    XIMText status_text;
    size_t native_len = 64; /* enough */
    char buffer[64], *pbuffer;
    memset(&buffer, 0, 64);
    pbuffer = buffer;

    memset(&status_text, 0, sizeof(XIMText)) ;
    if (IMConvertFromUTF8(hook->text.string.multi_byte,
                       strlen(hook->text.string.multi_byte),
                       (char**)&pbuffer, &native_len) != -1) {
      status_text.string.multi_byte = buffer;
      status_text.length = 64 - native_len;
    } else {
      status_text.string.multi_byte = hook->text.string.multi_byte;
      status_text.length = strlen(hook->text.string.multi_byte);
    }
    status_draw.call_data = (XPointer)&status_text;
    status_draw.feedback_list = 0;
    XIC_GUI(ic, change_status)((XIC)ic, STATUS_DRAW, (XPointer)&status_draw);
  } else {
    status_draw.call_data = (XPointer)&hook->text;
    status_draw.feedback_list = 0;
    XIC_GUI(ic, change_status)((XIC)ic, STATUS_DRAW, (XPointer)&status_draw);
  }
  return;
}

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 191 of file status.c.

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 151 of file status.c.

                                    {
  LocalIMState *imstate = ic->local_icpart->imstate;
  LocalStatusExt *hook = (LocalStatusExt *)(ic->local_icpart->status_ext);
  char *state_name;

  if (!hook) {
    if (!setup_local_status_ext(ic))
      return;
    hook = (LocalStatusExt *)(ic->local_icpart->status_ext);
  }

  state_name = imstate->name;
  hook->text.string.multi_byte = state_name;
  hook->text.length = strlen(state_name);
  hook->text.feedback = 0;
  hook->text.encoding_is_wchar = False;
  return;
}

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 72 of file status.c.

                                      {
  LocalStatusExt *hook = (LocalStatusExt *)(ic->local_icpart->status_ext);

  if (!hook) {
    if (!setup_local_status_ext(ic))
      return;
    hook = (LocalStatusExt *)(ic->local_icpart->status_ext);
  }
  XIC_GUI(ic, change_status)((XIC)ic, STATUS_START, NULL);
}

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 128 of file status.c.

                                       {
  XIC_GUI(ic, change_status)((XIC)ic, STATUS_WIN, (XPointer)NULL);
  return;
}

Here is the caller graph for this function: