Back to index

im-sdk  12.3.91
Classes | Defines | Typedefs | Enumerations | Functions | Variables
xaux_ext_common.h File Reference
#include <Xm/Xm.h>
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  aux_ext_string_struct
struct  aux_ext_data_struct

Defines

#define DEFAULT_HELP_PATH   "file:/usr/lib/iiim/sampleja3/help/"

Typedefs

typedef enum aux_ext_data_type_enum aux_ext_data_type_t
typedef struct
aux_ext_string_struct 
aux_ext_string_t
typedef struct aux_ext_data_struct aux_ext_data_t

Enumerations

enum  aux_ext_data_type_enum {
  AUX_EXT_DATA_NONE = 0, AUX_EXT_DATA_START = 1, AUX_EXT_DATA_DRAW = 2, AUX_EXT_DATA_DONE = 3,
  AUX_EXT_DATA_SETVALUE = 4, AUX_EXT_DATA_NONE = 0, AUX_EXT_DATA_START = 1, AUX_EXT_DATA_DRAW = 2,
  AUX_EXT_DATA_DONE = 3, AUX_EXT_DATA_SETVALUE = 4, AUX_EXT_DATA_NONE = 0, AUX_EXT_DATA_START = 1,
  AUX_EXT_DATA_DRAW = 2, AUX_EXT_DATA_DONE = 3, AUX_EXT_DATA_SETVALUE = 4, AUX_EXT_DATA_NONE = 0,
  AUX_EXT_DATA_START = 1, AUX_EXT_DATA_DRAW = 2, AUX_EXT_DATA_DONE = 3, AUX_EXT_DATA_SETVALUE = 4,
  AUX_EXT_DATA_NONE = 0, AUX_EXT_DATA_START = 1, AUX_EXT_DATA_DRAW = 2, AUX_EXT_DATA_DONE = 3,
  AUX_EXT_DATA_SETVALUE = 4, AUX_EXT_DATA_NONE = 0, AUX_EXT_DATA_START = 1, AUX_EXT_DATA_DRAW = 2,
  AUX_EXT_DATA_DONE = 3, AUX_EXT_DATA_SETVALUE = 4, AUX_EXT_DATA_NONE = 0, AUX_EXT_DATA_START = 1,
  AUX_EXT_DATA_DRAW = 2, AUX_EXT_DATA_DONE = 3, AUX_EXT_DATA_SETVALUE = 4
}

Functions

Bool xaux_ext_init_classes (Display *, xaux_class_t *, Window)
Bool xaux_ext_process_client_message (Display *, XClientMessageEvent *)
Bool xaux_ext_Start (xaux_class_t *, aux_ext_data_t *)
Bool xaux_ext_Draw (xaux_class_t *, aux_ext_data_t *)
Bool xaux_ext_Done (xaux_class_t *, aux_ext_data_t *)
size_t utf16_mb (const char **, size_t *, char **, size_t *)
size_t mb_utf16 (const char **, size_t *, char **, size_t *)
void HelpInvoke (char *)

Variables

xaux_class_t xaux_class

Class Documentation

struct aux_ext_string_struct

Definition at line 54 of file xaux_ext_common.h.

Class Members
int length
unsigned char * ptr
struct aux_ext_data_struct

Definition at line 59 of file xaux_ext_common.h.

Collaboration diagram for aux_ext_data_struct:
Class Members
int aux_index
unsigned char * aux_name
int aux_name_length
Window clientwin
Window focuswin
int ic
int im
int integer_count
int * integer_list
XPoint point
int string_count
aux_ext_string_t * string_list
unsigned char * string_ptr
aux_ext_data_type_t type

Define Documentation

#define DEFAULT_HELP_PATH   "file:/usr/lib/iiim/sampleja3/help/"

Definition at line 100 of file xaux_ext_common.h.


Typedef Documentation


Enumeration Type Documentation

Enumerator:
AUX_EXT_DATA_NONE 
AUX_EXT_DATA_START 
AUX_EXT_DATA_DRAW 
AUX_EXT_DATA_DONE 
AUX_EXT_DATA_SETVALUE 
AUX_EXT_DATA_NONE 
AUX_EXT_DATA_START 
AUX_EXT_DATA_DRAW 
AUX_EXT_DATA_DONE 
AUX_EXT_DATA_SETVALUE 
AUX_EXT_DATA_NONE 
AUX_EXT_DATA_START 
AUX_EXT_DATA_DRAW 
AUX_EXT_DATA_DONE 
AUX_EXT_DATA_SETVALUE 
AUX_EXT_DATA_NONE 
AUX_EXT_DATA_START 
AUX_EXT_DATA_DRAW 
AUX_EXT_DATA_DONE 
AUX_EXT_DATA_SETVALUE 
AUX_EXT_DATA_NONE 
AUX_EXT_DATA_START 
AUX_EXT_DATA_DRAW 
AUX_EXT_DATA_DONE 
AUX_EXT_DATA_SETVALUE 
AUX_EXT_DATA_NONE 
AUX_EXT_DATA_START 
AUX_EXT_DATA_DRAW 
AUX_EXT_DATA_DONE 
AUX_EXT_DATA_SETVALUE 
AUX_EXT_DATA_NONE 
AUX_EXT_DATA_START 
AUX_EXT_DATA_DRAW 
AUX_EXT_DATA_DONE 
AUX_EXT_DATA_SETVALUE 

Definition at line 45 of file xaux_ext_common.h.


Function Documentation

void HelpInvoke ( char *  )

Definition at line 822 of file xaux_ext_common.c.

{
    char *browser;
    char *basepath;

    pid_t pid, pid2;

    if (!path) {
      return;
    }

#ifdef linux
    pid = fork();
#else
    pid = fork1();
#endif

    if (getenv("HTT_HELP_BROWSER")){
      browser = getenv("HTT_HELP_BROWSER");
    } else {
      browser = "/usr/bin/netscape";
    }

    if (getenv("HTT_HELP_PATH")){
      basepath = getenv("HTT_HELP_PATH");
    } else {
      basepath = DEFAULT_HELP_PATH;
    }

    if (pid == (pid_t) (-1)) {
        return;
    } else if (0 == pid) {
        pid2 = fork();
        if(pid2 == -1) {
            _exit(1);
        } else if(pid2 == 0) {
           char *help = (char*)malloc(strlen(basepath) + strlen(path) +1 );
           sprintf(help, "%s%s", basepath, path);
           execl(browser, browser, help, NULL);
           free(help);
            _exit(1);
        } else {
            _exit(0);
        }
    } else {
        waitpid(pid, NULL, 0);
    }
    return;
}
size_t mb_utf16 ( const char **  ,
size_t *  ,
char **  ,
size_t *   
)

Definition at line 74 of file xaux_ext_common.c.

{
        int     r;

        r = IIimpConvertToUTF16((char *)(*inbuf), *inbytesleft,
                                  outbuf, outbytesleft);
        return (size_t)r;
}
size_t utf16_mb ( const char **  ,
size_t *  ,
char **  ,
size_t *   
)

Definition at line 60 of file xaux_ext_common.c.

{
        int     r;

        r = IIimpConvertFromUTF16((char *)(*inbuf), *inbytesleft,
                                  outbuf, outbytesleft);
        return (size_t)r;
}

Definition at line 1247 of file menu.c.

{
#if 0
    gtk_main_quit();
#endif

    return True;
}

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 900 of file menu.c.

{
    int mode, i, len;
    GtkWidget *widget, *fwidget, *frame, *flabel;
    gchar *item, *p, *pp, *value = NULL;
    static gboolean update_win_pos = FALSE;

    ENTER;

    if (aux_ext_data->integer_count > 0) {
       mode = aux_ext_data->integer_list[INT_STATE];
       switch (aux_ext_data->integer_list[INT_AUXMODE]) {
           case AUX_UPDATE_STATE:
              frame = g_object_get_data(G_OBJECT(auxwindow), DATA_FRAME);
              flabel = gtk_frame_get_label_widget(GTK_FRAME(frame));
              fwidget = g_object_get_data(G_OBJECT(auxwindow), DATA_FATTACHED);
              widget = g_object_get_data(G_OBJECT(auxwindow), DATA_ATTACHED);

              /* unfocus before removing the widget */
              change_focus(fwidget, 0);

              if (widget != NULL) {
                  gtk_container_remove(GTK_CONTAINER(auxwindow), widget);
              }
              if (fwidget != NULL) {
                  gtk_container_remove(GTK_CONTAINER(frame), fwidget);
              }
              widget = NULL;
              fwidget = NULL;

              DEBUG_printf("*** mode = %d\n", mode);
              DEBUG_printf("*** items = %d/(%d-%d)\n",
                          aux_ext_data->integer_list[INT_CURPOS],
                          aux_ext_data->integer_list[INT_BEGINPOS],
                          aux_ext_data->integer_list[INT_CANDCOUNT]);

              switch (mode) {
                  case CANNA_MODE_HexMode:
                     if (aux_ext_data->string_count > 0) {
                         gchar *item;

                         fwidget = g_object_get_data(G_OBJECT(auxwindow), DATA_ENTRY);
                         aux_ext_data->string_list[0].ptr[aux_ext_data->string_list[0].length] = 0;
                         aux_ext_data->string_list[0].ptr[aux_ext_data->string_list[0].length+1] = 0;
                         item = g_utf16_to_utf8((gunichar2 *)aux_ext_data->string_list[0].ptr, -1, NULL, NULL, NULL);
                         gtk_entry_set_text(GTK_ENTRY(fwidget), "");
                         gtk_entry_set_max_length(GTK_ENTRY(fwidget), 4);
                         gtk_label_set_text(GTK_LABEL(flabel), item);
                         g_free(item);
                         widget = frame;
                     }
                     break;
                  case CANNA_MODE_TourokuHinshiMode:
                  case CANNA_MODE_TourokuDicMode:
                     if (aux_ext_data->integer_list[INT_CANDCOUNT] == 0)
                         goto label;
                  case CANNA_MODE_ExtendMode:
                  menu:
                     if (aux_ext_data->string_count > 0) {
                         fwidget = g_object_get_data(G_OBJECT(auxwindow), DATA_TREEVIEW);
                         g_object_set_data(G_OBJECT(auxwindow), DATA_FTITLE, "Menu");
                         g_object_set_data(G_OBJECT(auxwindow),
                                         DATA_BEGIN_ITEM,
                                         GUINT_TO_POINTER(aux_ext_data->integer_list[INT_BEGINPOS]));
                         g_object_set_data(G_OBJECT(auxwindow),
                                         DATA_CUR_ITEM,
                                         GUINT_TO_POINTER(aux_ext_data->integer_list[INT_CURPOS]));
                         g_object_set_data(G_OBJECT(auxwindow),
                                         DATA_END_ITEM,
                                         GUINT_TO_POINTER(aux_ext_data->integer_list[INT_CANDCOUNT]));
                         update_menu(fwidget, aux_ext_data->string_count, aux_ext_data->string_list);
                         move_menu_position(aux_ext_data->integer_list[INT_CURPOS]);
                         update_entry_count(aux_ext_data->integer_list[INT_CURPOS] - aux_ext_data->integer_list[INT_BEGINPOS]);
                         widget = frame;
                     }
                     break;
                  case CANNA_MODE_MountDicMode:
                     if (aux_ext_data->string_count > 0) {
                         fwidget = g_object_get_data(G_OBJECT(auxwindow), DATA_TREEVIEW);
                         g_object_set_data(G_OBJECT(auxwindow), DATA_FTITLE, "Menu");
                         g_object_set_data(G_OBJECT(auxwindow),
                                         DATA_BEGIN_ITEM,
                                         GUINT_TO_POINTER(aux_ext_data->integer_list[INT_BEGINPOS]));
                         g_object_set_data(G_OBJECT(auxwindow),
                                         DATA_CUR_ITEM,
                                         GUINT_TO_POINTER(aux_ext_data->integer_list[INT_CURPOS]));
                         g_object_set_data(G_OBJECT(auxwindow),
                                         DATA_END_ITEM,
                                         GUINT_TO_POINTER(aux_ext_data->integer_list[INT_CANDCOUNT]));
                         update_dictmenu(fwidget, aux_ext_data->string_count, aux_ext_data->string_list);
                         move_menu_position(aux_ext_data->integer_list[INT_CURPOS]);
                         update_entry_count(aux_ext_data->integer_list[INT_CURPOS] - aux_ext_data->integer_list[INT_BEGINPOS]);
                         widget = frame;
                     }
                     break;
                  case CANNA_MODE_ChangingServerMode:
                     if (aux_ext_data->string_count > 0) {
                         fwidget = g_object_get_data(G_OBJECT(auxwindow), DATA_ENTRY);
                         aux_ext_data->string_list[0].ptr[aux_ext_data->string_list[0].length] = 0;
                         aux_ext_data->string_list[0].ptr[aux_ext_data->string_list[0].length+1] = 0;
                         item = g_utf16_to_utf8((gunichar2 *)aux_ext_data->string_list[0].ptr, -1, NULL, NULL, NULL);
                         /* find the value */
                         p = rindex(item, '[');
                         pp = rindex(item, ']');
                         if (p != NULL && pp != NULL) {
                            value = g_strndup(p + 1, pp - p - 1);
                            *p = 0;
                            gtk_entry_set_text(GTK_ENTRY(fwidget), value);
                            len = strlen(value);
                         } else {
                            len = 0;
                         }
                         gtk_entry_set_max_length(GTK_ENTRY(fwidget), 0);
                         gtk_frame_set_label(GTK_FRAME(frame), item);
                         /*
                          * this is bad hack. but no way to wrap it on here.
                          * send a request to remove the current value to cannaserver first
                          */
                         for (i = 0; i < len; i++) {
                            send_key_event(aux_ext_data->im,
                                          aux_ext_data->ic,
                                          xc, IM_VK_RIGHT, 0, CANNA_KEY_Right);
                            send_key_event(aux_ext_data->im,
                                          aux_ext_data->ic,
                                          xc, IM_VK_BACK_SPACE, 0, 0x08);
                         }
                         if (item != NULL)
                            g_free(item);
                         if (value != NULL)
                            g_free(value);
                         widget = frame;
                     }
                     break;
                  case CANNA_MODE_TourokuMode:
                     if (aux_ext_data->string_count > 0) {
                         aux_ext_data->string_list[0].ptr[aux_ext_data->string_list[0].length] = 0;
                         aux_ext_data->string_list[0].ptr[aux_ext_data->string_list[0].length+1] = 0;
                         item = g_utf16_to_utf8((gunichar2 *)aux_ext_data->string_list[0].ptr, -1, NULL, NULL, NULL);
                         p = rindex(item, '(');
                         if (p != NULL && strncmp(p, "(y/n)", 5) == 0) {
                            widget = g_object_get_data(G_OBJECT(auxwindow), DATA_LABEL);
                            gtk_label_set_label(GTK_LABEL(widget), item);
                         } else {
                            p = rindex(item, '[');
                            pp = rindex(item, ']');
                            if (p != NULL && pp != NULL) {
                                value = g_strndup(p + 1, pp - p - 1);
                                *p = 0;
                                fwidget = g_object_get_data(G_OBJECT(auxwindow), DATA_ENTRY);
                                widget = frame;
                                if (value != NULL)
                                   gtk_entry_set_text(GTK_ENTRY(fwidget), value);
                                gtk_entry_set_max_length(GTK_ENTRY(fwidget), 0);
                                gtk_frame_set_label(GTK_FRAME(frame), item);
                            } else {
                                widget = g_object_get_data(G_OBJECT(auxwindow), DATA_LABEL);
                                gtk_label_set_label(GTK_LABEL(widget), item);
                            }
                         }
                         if (value != NULL)
                            g_free(value);
                         if (item != NULL)
                            g_free(item);
                     }
                     break;
                  case CANNA_MODE_DeleteDicMode:
                     if (aux_ext_data->string_count > 0) {
                         aux_ext_data->string_list[0].ptr[aux_ext_data->string_list[0].length] = 0;
                         aux_ext_data->string_list[0].ptr[aux_ext_data->string_list[0].length+1] = 0;
                         item = g_utf16_to_utf8((gunichar2 *)aux_ext_data->string_list[0].ptr, -1, NULL, NULL, NULL);
                         p = rindex(item, '[');
                         pp = rindex(item, ']');
                         if (p != NULL && pp != NULL) {
                            value = g_strndup(p + 1, pp - p - 1);
                            *p = 0;
                            fwidget = g_object_get_data(G_OBJECT(auxwindow), DATA_ENTRY);
                            widget = frame;
                            if (value != NULL)
                                gtk_entry_set_text(GTK_ENTRY(fwidget), value);
                            gtk_entry_set_max_length(GTK_ENTRY(fwidget), 0);
                            gtk_frame_set_label(GTK_FRAME(frame), item);
                         } else if (aux_ext_data->integer_list[INT_CANDCOUNT] > 0) {
                            g_free(item);
                            goto menu;
                         } else {
                            widget = g_object_get_data(G_OBJECT(auxwindow), DATA_LABEL);
                            gtk_label_set_label(GTK_LABEL(widget), item);
                         }
                         if (value != NULL)
                            g_free(value);
                         if (item != NULL)
                            g_free(item);
                     }
                     break;
                  case CANNA_MODE_HenkanMethodMode:
                     widget = g_object_get_data(G_OBJECT(auxwindow), DATA_LABEL);
                     gtk_label_set_label(GTK_LABEL(widget), "not implemented yet. please hit any key to be back");
                     break;
                  default:
                  label:
                     if (aux_ext_data->string_count > 0) {
                         widget = g_object_get_data(G_OBJECT(auxwindow), DATA_LABEL);
                         aux_ext_data->string_list[0].ptr[aux_ext_data->string_list[0].length] = 0;
                         aux_ext_data->string_list[0].ptr[aux_ext_data->string_list[0].length+1] = 0;
                         item = g_utf16_to_utf8((gunichar2 *)aux_ext_data->string_list[0].ptr, -1, NULL, NULL, NULL);
                         gtk_label_set_label(GTK_LABEL(widget), item);
                         g_free(item);
                     }
                     break;
              }
              if (fwidget != NULL) {
                  gtk_container_add(GTK_CONTAINER(frame), fwidget);
                  change_focus(fwidget, 1);
              }
              if (widget != NULL) {
                  gtk_container_add(GTK_CONTAINER(auxwindow), widget);
                  if (!update_win_pos) {
                     set_position(auxwindow);
                     update_win_pos = TRUE;
                  }
                  gtk_widget_show_all(auxwindow);
              } else {
                  gtk_widget_hide_all(auxwindow);
                  update_win_pos = FALSE;
              }
              g_object_set_data(G_OBJECT(auxwindow), DATA_FATTACHED, fwidget);
              g_object_set_data(G_OBJECT(auxwindow), DATA_ATTACHED, widget);
              break;
           case AUX_UPDATE_KEY:
              switch (mode) {
                  case CANNA_MODE_HexMode:
                     update_codeinput_position(aux_ext_data->integer_list[INT_KEYCODE],
                                            aux_ext_data->integer_list[INT_KEYMOD],
                                            aux_ext_data->integer_list[INT_TRANSLATEDCODE],
                                            aux_ext_data->im,
                                            aux_ext_data->ic,
                                            xc);
                     break;
                  case CANNA_MODE_ExtendMode:
                  case CANNA_MODE_TourokuHinshiMode:
                     if (aux_ext_data->integer_list[INT_CANDCOUNT] == 0) {
                         label_keyevent(aux_ext_data->integer_list[INT_KEYCODE],
                                      aux_ext_data->integer_list[INT_KEYMOD],
                                      aux_ext_data->integer_list[INT_TRANSLATEDCODE],
                                      aux_ext_data->im,
                                      aux_ext_data->ic,
                                      xc);
                         break;
                     }
                  case CANNA_MODE_TourokuDicMode:
                     update_menu_position(aux_ext_data->integer_list[INT_KEYCODE],
                                        aux_ext_data->integer_list[INT_KEYMOD],
                                        aux_ext_data->integer_list[INT_TRANSLATEDCODE],
                                        aux_ext_data->im,
                                        aux_ext_data->ic,
                                        xc, (mode == CANNA_MODE_TourokuHinshiMode ? FALSE : TRUE));
                     break;
                  case CANNA_MODE_MountDicMode:
                     update_dictmenu_position(aux_ext_data->integer_list[INT_KEYCODE],
                                           aux_ext_data->integer_list[INT_KEYMOD],
                                           aux_ext_data->integer_list[INT_TRANSLATEDCODE],
                                           aux_ext_data->im,
                                           aux_ext_data->ic,
                                           xc);
                     break;
                  case CANNA_MODE_ChangingServerMode:
                     update_server_position(aux_ext_data->integer_list[INT_KEYCODE],
                                          aux_ext_data->integer_list[INT_KEYMOD],
                                          aux_ext_data->integer_list[INT_TRANSLATEDCODE],
                                          aux_ext_data->im,
                                          aux_ext_data->ic,
                                          xc);
                     break;
                  case CANNA_MODE_TourokuMode:
                     update_wordregist_position(aux_ext_data->integer_list[INT_KEYCODE],
                                             aux_ext_data->integer_list[INT_KEYMOD],
                                             aux_ext_data->integer_list[INT_TRANSLATEDCODE],
                                             aux_ext_data->im,
                                             aux_ext_data->ic,
                                             xc);
                     break;
                  case CANNA_MODE_DeleteDicMode:
                     if (aux_ext_data->integer_list[INT_CANDCOUNT] == 0) {
                         update_wordregist_position(aux_ext_data->integer_list[INT_KEYCODE],
                                                 aux_ext_data->integer_list[INT_KEYMOD],
                                                 aux_ext_data->integer_list[INT_TRANSLATEDCODE],
                                                 aux_ext_data->im,
                                                 aux_ext_data->ic,
                                                 xc);
                     } else {
                         update_menu_position(aux_ext_data->integer_list[INT_KEYCODE],
                                           aux_ext_data->integer_list[INT_KEYMOD],
                                           aux_ext_data->integer_list[INT_TRANSLATEDCODE],
                                           aux_ext_data->im,
                                           aux_ext_data->ic,
                                           xc, TRUE);
                     }
                     break;
                  case CANNA_MODE_HenkanMethodMode:
                     unknown_keyevent(aux_ext_data->integer_list[INT_KEYCODE],
                                    aux_ext_data->integer_list[INT_KEYMOD],
                                    aux_ext_data->integer_list[INT_TRANSLATEDCODE],
                                    aux_ext_data->im,
                                    aux_ext_data->ic,
                                    xc);
                     break;
                  default:
                     break;
              }
              break;
           case AUX_FOCUS_CHANGE:
              fwidget = g_object_get_data(G_OBJECT(auxwindow), DATA_FATTACHED);
              change_focus(fwidget, aux_ext_data->integer_list[INT_STATE]);
              if (aux_ext_data->integer_list[INT_STATE] == 0) {
                  gtk_widget_hide_all(auxwindow);
              }
              break;
           case AUX_FORCE_SAVE_STATE:
              switch (aux_ext_data->integer_list[INT_STATE]) {
                  case CANNA_MODE_HexMode:
                  case CANNA_MODE_ExtendMode:
                  case CANNA_MODE_MountDicMode:
                  case CANNA_MODE_ChangingServerMode:
                  case CANNA_MODE_HenkanMethodMode:
                  case CANNA_MODE_DeleteDicMode:
                  case CANNA_MODE_TourokuHinshiMode:
                  case CANNA_MODE_TourokuDicMode:
                     /* FIXME: imlement me */
                     break;
                  case CANNA_MODE_TourokuMode:
                     break;
                  default:
                     break;
              }
              break;
       }
    } else {
       gtk_widget_hide_all(auxwindow);
    }

    LEAVE;

    return True;
}

Here is the call graph for this function:

Here is the caller graph for this function:

Bool xaux_ext_init_classes ( Display *  ,
xaux_class_t ,
Window   
)

Definition at line 374 of file xaux_ext_common.c.

{
       char          buf[1024];
       int           i;

       DEBUG_printf("xaux_ext_init_classes classname:%s, extwin:%d\n", p->classname, extwin);
       p->atom_classname = XInternAtom(display, p->classname, False);

       sprintf(buf, "%s%s", p->classname, XAUX_SOWIN_SUFFIX);
       p->atom_sowin = XInternAtom(display, buf, False);


       sprintf(buf, "%s%s", p->classname, XAUX_EXTWIN_SUFFIX);
       p->atom_extwin = XInternAtom(display, buf, False);

       for (i = 0; i < p->atom_sx_num; i++) {
              sprintf(buf, "%s%s_%d", p->classname, XAUX_SX_SUFFIX, i);
              p->atom_sx[i] = XInternAtom(display, buf, False);
       }

       p->atom_sx_idx = 1;

       for (i = 0; i < p->atom_xs_num; i++) {
              sprintf(buf, "%s%s_%d", p->classname, XAUX_XS_SUFFIX, i);
              p->atom_xs[i] = XInternAtom(display, buf, False);
       }

       p->atom_xs_idx = 1;

       p->sowin = (Window)0;

       p->extwin = extwin;

       if (XGetSelectionOwner(display, p->atom_extwin) != None) {
              DEBUG_printf("%s: %s already exists.[%s](1)\n",
                     ME_EXT, ME_EXT, p->classname);
              return False;
       }

       XSetSelectionOwner(display, p->atom_extwin, p->extwin, CurrentTime);

       if (XGetSelectionOwner(display, p->atom_extwin) != p->extwin) {
              DEBUG_printf("%s: %s already exists.[%s](2)\n",
                     ME_EXT, ME_EXT, p->classname);
              XDestroyWindow(display, p->extwin);
              p->extwin = (Window)0;
              return False;
       }

       /* process sx properties which has been put on sowin before
          extwin is prepared */
       if (xaux_xs_get_sowin(p, display) == True) {
              for (i = p->atom_sx_idx; i < p->atom_sx_num; i++) {
                     if (xaux_ext_process_property_update(
                            display, p->sowin, p->atom_sx[i]) == False) {
                            break;
                     }
              }
       }
       return True;
}
Bool xaux_ext_process_client_message ( Display *  ,
XClientMessageEvent *   
)

Definition at line 292 of file xaux_ext_common.c.

{
       aux_ext_data_t       aux_ext_data_;
       aux_ext_data_t       *aux_ext_data = &(aux_ext_data_);
       aux_ext_data_type_t  type;
       xaux_class_t  *xc = &xaux_class;

       if (event->data.l[0] != xc->atom_classname) {
              return False;
       }

       if (event->message_type != xc->atom_sx[0]) {
              return False;
       }

       if (event->window != xc->extwin) {
              return False;
       }

       aux_ext_data->im = ((CARD32)(event->data.l[1])) >> 16;
       aux_ext_data->ic = ((CARD32)(event->data.l[1])) & 0xffff;
       aux_ext_data->aux_index = (CARD32)(event->data.l[2]);

       type = (CARD32)(event->data.l[3]);

       switch (type) {
       case AUX_EXT_DATA_START:
              DEBUG_printf("[%s] received START via ClientMessage\n",
                     xc->classname);
              //return xaux_ext_Start(xc, aux_ext_data);
              break;
       case AUX_EXT_DATA_DRAW:
              DEBUG_printf("[%s] notified DRAW via ClientMessage\n",
                     xc->classname);
              return xaux_ext_process_property_update(
                     display, xc->extwin, (Atom)(CARD32)(event->data.l[4]));
       case AUX_EXT_DATA_DONE:
              DEBUG_printf("[%s] received DONE via ClientMessage\n",
                     xc->classname);
              return xaux_ext_Done(xc, aux_ext_data);
       default:
              return False;
       }

       return True;
}

Definition at line 114 of file LookupAux.c.

{
    return True;
}

Variable Documentation

Definition at line 39 of file menu.c.