Initer.c File Reference

#include <X11/Intrinsic.h>
#include <X11/Xmu/Initer.h>

Include dependency graph for Initer.c:

Go to the source code of this file.

Data Structures

struct  InitializerList

Functions

static Bool AddToAppconList (XtAppContext **, XtAppContext)
void XmuAddInitializer (XmuInitializerProc func, XPointer data)
void XmuCallInitializers (XtAppContext app_con)

Variables

static struct InitializerListinit_list = NULL
static Cardinal init_list_length = 0


Function Documentation

static Bool AddToAppconList ( XtAppContext **  ,
XtAppContext   
) [static]

Definition at line 93 of file Initer.c.

References i, and NULL.

Referenced by XmuCallInitializers().

00094 {
00095   int i;
00096   XtAppContext *local_list;
00097 
00098   i = 0;
00099   local_list = *app_list;
00100   if (*app_list != NULL) {
00101     for ( ; *local_list != NULL ; i++, local_list++) {
00102       if (*local_list == app_con)
00103         return (False);
00104     }
00105   }
00106 
00107   *app_list = (XtAppContext *)  XtRealloc((char *)(*app_list),
00108                                           sizeof(XtAppContext *) * (i + 2) );
00109   (*app_list)[i++] = app_con;
00110   (*app_list)[i] = NULL;
00111 
00112   return (True);
00113 }

Here is the caller graph for this function:

void XmuAddInitializer ( XmuInitializerProc  func,
XPointer  data 
)

Definition at line 53 of file Initer.c.

References InitializerList::function, init_list, init_list_length, and NULL.

00054 {
00055   init_list_length++;
00056   init_list = (struct InitializerList *) XtRealloc( (char *) init_list, 
00057                                             (sizeof(struct InitializerList) * 
00058                                              init_list_length) );
00059 
00060   init_list[init_list_length - 1].function = func;
00061   init_list[init_list_length - 1].data = data;
00062   init_list[init_list_length - 1].app_con_list = NULL;
00063 }

void XmuCallInitializers ( XtAppContext  app_con  ) 

Definition at line 66 of file Initer.c.

References AddToAppconList(), InitializerList::app_con_list, data, i, init_list, and init_list_length.

Referenced by Initialize(), and XawSimpleMenuAddGlobalActions().

00067 {
00068   unsigned i;
00069 
00070   for (i = 0 ; i < init_list_length ; i++) {
00071     if (AddToAppconList(&(init_list[i].app_con_list), app_con))
00072       (init_list[i].function) (app_con, init_list[i].data);
00073   }
00074 }

Here is the call graph for this function:

Here is the caller graph for this function:


Variable Documentation

struct InitializerList* init_list = NULL [static]

Definition at line 49 of file Initer.c.

Referenced by XmuAddInitializer(), and XmuCallInitializers().

Cardinal init_list_length = 0 [static]

Definition at line 50 of file Initer.c.

Referenced by XmuAddInitializer(), and XmuCallInitializers().


Generated on Sun Mar 4 16:04:09 2007 for Scilab [trunk] by  doxygen 1.5.1