Back to index

im-sdk  12.3.91
Defines | Functions | Variables
aux_manager_methods.c File Reference
#include <stdio.h>
#include <gdk/gdk.h>
#include <gtk/gtk.h>
#include <gdk/gdkx.h>
#include <X11/Xlib.h>
#include <X11/Xmd.h>
#include "aux_module.h"
#include "xaux_common.h"
#include "xaux_ext_common.h"

Go to the source code of this file.

Defines

#define XAUX_MANAGER_CLASS_NAME   "com.sun.iiim.cle.aux.manager.gtk2"
#define ATOM_NUM_XAUX_MANAGER   32

Functions

void aux_manager_proc_le_notify (aux_ext_data_t *aux_ext_data)
GdkFilterReturn xaux_ext_event_handler (GdkXEvent *gdk_xevent, GdkEvent *event, gpointer user_data)
int xaux_ext_register_classes (GdkWindow *window)
Bool xaux_ext_Start (xaux_class_t *xc, aux_ext_data_t *aux_ext_data, Atom atom)
Bool xaux_ext_Draw (xaux_class_t *xc, aux_ext_data_t *aux_ext_data, Atom atom)
Bool xaux_ext_Done (xaux_class_t *xc, aux_ext_data_t *aux_ext_data, Atom atom)
 NotifyIntegerListDataToLanguageEngine (Display *display, int nIntegerCount, int *pIntegerList)
 NotifyStringListDataToLanguageEngine (Display *display, int nIntegerCount, int *pIntegerList, int nStringCount, int *pStringLen, char **pStringList)

Variables

xaux_class_txc_ = 0
int im_ = 0
int ic_ = 0
xaux_class_t xaux_class
GtkWidget * _toolbar_window
Display * gDisplay = NULL
Window gWindow = 0

Define Documentation

#define ATOM_NUM_XAUX_MANAGER   32

Definition at line 18 of file aux_manager_methods.c.

#define XAUX_MANAGER_CLASS_NAME   "com.sun.iiim.cle.aux.manager.gtk2"

Definition at line 17 of file aux_manager_methods.c.


Function Documentation

void aux_manager_proc_le_notify ( aux_ext_data_t aux_ext_data)
NotifyIntegerListDataToLanguageEngine ( Display *  display,
int  nIntegerCount,
int *  pIntegerList 
)

Definition at line 166 of file aux_manager_methods.c.

{
       aux_ext_data_t aux_ext_data;

       DEBUG_printf("im_:%d, ic_:%d\n", im_, ic_);

/*
       if (!im_ || !ic_ || !xc_)
              return;
*/

       aux_ext_data.im = im_;
       aux_ext_data.ic = ic_;
       aux_ext_data.integer_count = nIntegerCount;
       aux_ext_data.integer_list = pIntegerList;
       aux_ext_data.string_count = 0;
       aux_ext_data.string_list = NULL;
       aux_ext_data.string_ptr = NULL;
       aux_ext_data.point.x = 0;
       aux_ext_data.point.y = 0;

       DEBUG_printf("begin xaux_exe_setValue =============\n");
       xaux_ext_SetValue(display, xc_, &aux_ext_data);
       XFlush(display);
}

Here is the call graph for this function:

NotifyStringListDataToLanguageEngine ( Display *  display,
int  nIntegerCount,
int *  pIntegerList,
int  nStringCount,
int *  pStringLen,
char **  pStringList 
)

Definition at line 193 of file aux_manager_methods.c.

{
       int i;

       aux_ext_data_t aux_ext_data;
       aux_ext_string_t *p;

       DEBUG_printf("im_:%d, ic_:%d\n", im_, ic_);

/*
       if (!im_ || !ic_ || !xc_)
              return;
*/

       aux_ext_data.im = im_;
       aux_ext_data.ic = ic_;
       aux_ext_data.integer_count = nIntegerCount;
       aux_ext_data.integer_list = pIntegerList;
       aux_ext_data.point.x = 0;
       aux_ext_data.point.y = 0;

       aux_ext_data.string_count = nStringCount;
       aux_ext_data.string_ptr = NULL;

       if (nStringCount > 0) {
              aux_ext_data.string_list = (aux_ext_string_t *) calloc(nStringCount, sizeof(aux_ext_string_t));
              for (i = 0; i < nStringCount; i++) {
                     aux_ext_string_t *p = &aux_ext_data.string_list[i];
                     p->length = pStringLen[i];
                     p->ptr = (unsigned char *) (pStringList[i]);
              }
       }

       xaux_ext_SetValue(display, xc_, &aux_ext_data);
       XFlush(display);

       free(aux_ext_data.string_list);
}

Here is the call graph for this function:

Bool xaux_ext_Done ( xaux_class_t xc,
aux_ext_data_t aux_ext_data,
Atom  atom 
)

Definition at line 143 of file aux_manager_methods.c.

{
       AuxModule aux_module = NULL;
       char *class_name = NULL;

       DEBUG_printf("ext_Done im:0x%x, ic_id:0x%x\n", aux_ext_data->im, aux_ext_data->ic);
       DEBUG_printf("ext_Done: integer_count: %d, strings_count: %d\n", aux_ext_data->integer_count, aux_ext_data->string_count);

       class_name = XGetAtomName(gDisplay, atom);
       if (class_name == NULL)
              return False;

       DEBUG_printf("class_name: %s\n", class_name);
       aux_module = (AuxModule)aux_manager_get_module_by_classname(class_name);
       DEBUG_printf("aux_module: %p\n", aux_module);
       if (aux_module == NULL || aux_module->methods == NULL)
              return False;

       aux_module->methods->aux_module_Done(aux_ext_data);

       return True;
}

Here is the call graph for this function:

Bool xaux_ext_Draw ( xaux_class_t xc,
aux_ext_data_t aux_ext_data,
Atom  atom 
)

Definition at line 116 of file aux_manager_methods.c.

{
       AuxModule aux_module = NULL;
       char *class_name = NULL;

       DEBUG_printf("ext_Draw == im:0x%x, ic:0x%x\n",aux_ext_data->im, aux_ext_data->ic);
       DEBUG_printf("ext_Draw: integer_count: %d, strings_count: %d\n", aux_ext_data->integer_count, aux_ext_data->string_count);
       im_ = aux_ext_data->im;
       ic_ = aux_ext_data->ic;
       xc_ = xc;

       class_name = XGetAtomName(gDisplay, atom);
       if (class_name == NULL)
              return False;

       DEBUG_printf("class_name: %s\n", class_name);
       aux_module = (AuxModule)aux_manager_get_module_by_classname(class_name);
       DEBUG_printf("aux_module: %p\n", aux_module);
       if (aux_module == NULL || aux_module->methods == NULL)
              return False;

       aux_module->methods->aux_module_Draw(aux_ext_data);

       return True;
}

Here is the call graph for this function:

GdkFilterReturn xaux_ext_event_handler ( GdkXEvent *  gdk_xevent,
GdkEvent *  event,
gpointer  user_data 
)

Definition at line 42 of file aux_manager_methods.c.

{
       XEvent *xevent = (XEvent *) gdk_xevent;

       switch (xevent->type) {
              case ClientMessage:
                     xaux_ext_process_client_message((Display *)gDisplay,
                            (XClientMessageEvent *) xevent);
                     break;
              case SelectionClear:
                     break;
       }
       return GDK_FILTER_CONTINUE;
}

Here is the call graph for this function:

int xaux_ext_register_classes ( GdkWindow *  window)

Definition at line 61 of file aux_manager_methods.c.

{
       char *locale;

       gDisplay = (Display *)GDK_WINDOW_XDISPLAY(window);
       gWindow  = (Window)GDK_WINDOW_XWINDOW(window);

       /* Register aux class */
       if (xaux_ext_init_classes(gDisplay, (xaux_class_t *)&xaux_class, gWindow) == False)
              return(False);

       aux_manager_register_aux_modules(gDisplay, gWindow);

       return(True);
}

Here is the call graph for this function:

Bool xaux_ext_Start ( xaux_class_t xc,
aux_ext_data_t aux_ext_data,
Atom  atom 
)

Definition at line 86 of file aux_manager_methods.c.

{
       AuxModule aux_module = NULL;
       char *class_name = NULL;

       char *locale = NULL;
       int  locale_id;

       DEBUG_printf("ext_Start: im:%d, ic:%d\n", aux_ext_data->im, aux_ext_data->ic);
       DEBUG_printf("ext_Start: integer_count: %d, strings_count: %d\n", aux_ext_data->integer_count, aux_ext_data->string_count);
       im_ = aux_ext_data->im;
       ic_ = aux_ext_data->ic;
       xc_ = xc;

       class_name = XGetAtomName(gDisplay, atom);
       if (class_name == NULL)
              return False;

       DEBUG_printf("class_name: %s\n", class_name);
       aux_module = (AuxModule)aux_manager_get_module_by_classname(class_name);
       DEBUG_printf("aux_module: %p\n", aux_module);
       if (aux_module == NULL || aux_module->methods == NULL)
              return False;

       aux_module->methods->aux_module_Start(aux_ext_data);

       return True;
}

Here is the call graph for this function:


Variable Documentation

GtkWidget* _toolbar_window
Display* gDisplay = NULL

Definition at line 34 of file aux_manager_methods.c.

Window gWindow = 0

Definition at line 35 of file aux_manager_methods.c.

int ic_ = 0

Definition at line 15 of file aux_manager_methods.c.

int im_ = 0

Definition at line 14 of file aux_manager_methods.c.

Initial value:
 {
       XAUX_MANAGER_CLASS_NAME, 1,
       NULL,
       (Window)0, (Window)0, (Window)0,
       (Atom)0, (Atom)0, (Atom)0, (Atom)0,
       { (Atom)0 }, ATOM_NUM_XAUX_MANAGER, 0,
       { (Atom)0 }, ATOM_NUM_XAUX_MANAGER, 0,
       NULL,
}

Definition at line 21 of file aux_manager_methods.c.

Definition at line 13 of file aux_manager_methods.c.