Back to index

im-sdk  12.3.91
Defines | Functions
iiimpICG.h File Reference
#include "Xlcint.h"
#include "XimpIm.h"
#include "commonIM.h"
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Defines

#define _IIIMP_ICG_H

Functions

int GetAreaNeededWidth (XicCommon ic)
int GetAreaNeededHeight (XicCommon ic)
char * GetICValueData (XicCommon ic, XIMArg *values, XimpChangeaMask change_mask)

Define Documentation

#define _IIIMP_ICG_H

Definition at line 52 of file iiimpICG.h.


Function Documentation

Definition at line 62 of file iiimpICG.c.

                                  {
  unsigned int height = 0;
  if (XIMP_CHK_PREFONTMASK(ic)) { /* we can do something */
    XFontSet fs = ic->core.preedit_attr.fontset;
    XFontSetExtents *fsx = XExtentsOfFontSet(fs);
    if (fsx) {
      height  = fsx->max_logical_extent.height;
    }
  }
  if (height == 0) height = 16;
  return height;
}

Here is the caller graph for this function:

Definition at line 48 of file iiimpICG.c.

                                 {
  unsigned int width = 0;
  if (XIMP_CHK_PREFONTMASK(ic)) { /* we can do something */
    XFontSet fs = ic->core.preedit_attr.fontset;
    XFontSetExtents *fsx = XExtentsOfFontSet(fs);
    if (fsx) {
      width = fsx->max_logical_extent.width * MAX_PREEDIT_CHARNUM;
    }
  }
  if (width == 0) width = 100;
  return width;
}

Here is the caller graph for this function:

char* GetICValueData ( XicCommon  ic,
XIMArg values,
XimpChangeaMask  change_mask 
)

Definition at line 548 of file iiimpICG.c.

                                                                          {
  XIMArg *p;
  char *p_char;
  char *return_name = NULL;
  int len;

  for (p = values; p->name != NULL; p++) {
    if (strcmp(p->name, XNInputStyle) == 0) {
      if (ic->ximp_icpart->value_mask & XIMP_INPUT_STYLE) {
       *((XIMStyle *)(p->value)) = ic->core.input_style;
      } else {
       return_name = p->name;
       break;
      }
    } else if (strcmp(p->name, XNClientWindow)==0) {
      if (ic->ximp_icpart->value_mask & XIMP_CLIENT_WIN) {
       *((Window *)(p->value)) = ic->core.client_window;
      } else {
       return_name = p->name;
       break;
      }
    } else if (strcmp(p->name, XNFocusWindow)==0) {
      if (XIMP_CHK_FOCUSWINMASK(ic)) {
       *((Window *)(p->value)) = ic->core.focus_window;
      } else {
       return_name = p->name;
       break;
      }
    } else if (strcmp(p->name, XNResourceName)==0) {
      if (ic->core.im->core.res_name != (char *)NULL) {
       len = strlen(ic->core.im->core.res_name);
       if ((p_char = (char*)Xmalloc(len+1)) == NULL) {
         return_name = p->name;
         break;
       }
       strcpy(p_char, ic->core.im->core.res_name);
       *((char **)(p->value)) = p_char;
      } else {
       return_name = p->name;
       break;
      }
    } else if (strcmp(p->name, XNResourceClass)==0) {
      if (ic->core.im->core.res_class != (char *)NULL) {
       len = strlen(ic->core.im->core.res_class);
       if ((p_char = (char*)Xmalloc(len+1)) == NULL) {
         return_name = p->name;
         break;
       }
       strcpy(p_char, ic->core.im->core.res_class);
       *((char **)(p->value)) = p_char;
      } else {
       return_name = p->name;
       break;
      }
    } else if (strcmp(p->name, XNGeometryCallback)==0) {
      if (ic->ximp_icpart->value_mask & XIMP_GEOMETRY_CB) {
       *((XICCallback *)(p->value)) = ic->core.geometry_callback;
      } else {
       return_name = p->name;
       break;
      }
    } else if (strcmp(p->name, XNFilterEvents)==0) {
      *((unsigned long *)(p->value)) = ic->core.filter_events;
    } else if (strcmp(p->name, XNUnicodeCharacterSubset)==0) {
      XIMUnicodeCharacterSubset **value;
      XIMUnicodeCharacterSubset *subset;
      XimCommon xim = (XimCommon)ic->core.im;

      if (xim->unicode_char_subsets == NULL)
       return p->name;

      subset = &(xim->unicode_char_subsets->supported_subsets[ic->subset_id]);
      value = (XIMUnicodeCharacterSubset**)p->value;
      *value = subset;
    } else if (strcmp(p->name, XNPreeditAttributes)==0) {
      if (PreGetAttributes(ic, (XIMArg*)p->value,
                        change_mask,
                        &return_name) == False)
       break;
    } else if (strcmp(p->name, XNStatusAttributes)==0) {
      if (StatusGetAttributes(ic, (XIMArg*)p->value,
                           change_mask,
                           &return_name) == False)
       break;
    } else {
      return_name = p->name;
      break;
    }
  }
  return(return_name);
}

Here is the call graph for this function: