Back to index

im-sdk  12.3.91
Classes | Typedefs | Enumerations | Functions | Variables
xaux_ext_common.h File Reference
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

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 *, Atom atom)
Bool xaux_ext_Draw (xaux_class_t *, aux_ext_data_t *, Atom atom)
Bool xaux_ext_Done (xaux_class_t *, aux_ext_data_t *, Atom atom)

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

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 4 of file xaux_ext_common.h.


Function Documentation

Bool xaux_ext_Done ( xaux_class_t ,
aux_ext_data_t ,
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 ,
aux_ext_data_t ,
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:

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

Here is the call graph for this function:

Here is the caller graph for this function:

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

Here is the call graph for this function:

Here is the caller graph for this function:

Bool xaux_ext_Start ( xaux_class_t ,
aux_ext_data_t ,
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

Definition at line 39 of file menu.c.