CvtCache.c File Reference

#include <stdio.h>
#include <X11/Xlib.h>
#include <X11/Xos.h>
#include <X11/Xmu/CvtCache.h>
#include <stdlib.h>

Include dependency graph for CvtCache.c:

Go to the source code of this file.

Functions

static int _CloseDisplay (XmuDisplayQueue *, XmuDisplayQueueEntry *)
static int _FreeCCDQ (XmuDisplayQueue *)
static void _InitializeCvtCache (XmuCvtCache *)
static void _InitializeCvtCache (register XmuCvtCache *c)
XmuCvtCache_XmuCCLookupDisplay (Display *dpy)

Variables

static XmuDisplayQueuedq = NULL


Function Documentation

static int _CloseDisplay ( XmuDisplayQueue ,
XmuDisplayQueueEntry  
) [static]

Definition at line 67 of file CvtCache.c.

References _XmuStringToBitmapFreeCache(), and _XmuDisplayQueueEntry::data.

Referenced by _XmuCCLookupDisplay().

00068 {
00069     XmuCvtCache *c;
00070 
00071     if (e && (c = (XmuCvtCache *)(e->data))) {
00072         _XmuStringToBitmapFreeCache (c);
00073         /* insert calls to free any cached memory */
00074 
00075     }
00076     return 0;
00077 }

Here is the call graph for this function:

Here is the caller graph for this function:

static int _FreeCCDQ ( XmuDisplayQueue  )  [static]

Definition at line 58 of file CvtCache.c.

References dq, NULL, and XmuDQDestroy().

Referenced by _XmuCCLookupDisplay().

00059 {
00060     XmuDQDestroy (dq, False);
00061     dq = NULL;
00062     return (0);
00063 }

Here is the call graph for this function:

Here is the caller graph for this function:

static void _InitializeCvtCache ( register XmuCvtCache c  )  [static]

Definition at line 80 of file CvtCache.c.

References _XmuStringToBitmapInitCache().

00081 {
00082     _XmuStringToBitmapInitCache (c);
00083     /* insert calls to init any cached memory */
00084 }

Here is the call graph for this function:

static void _InitializeCvtCache ( XmuCvtCache  )  [static]

Referenced by _XmuCCLookupDisplay().

Here is the caller graph for this function:

XmuCvtCache* _XmuCCLookupDisplay ( Display *  dpy  ) 

Definition at line 92 of file CvtCache.c.

References _CloseDisplay(), _FreeCCDQ(), _InitializeCvtCache(), _XmuDisplayQueueEntry::data, dq, free(), malloc(), NULL, XmuDQAddDisplay(), XmuDQCreate(), and XmuDQLookupDisplay().

Referenced by XmuLocatePixmapFile().

00093 {
00094     XmuDisplayQueueEntry *e;
00095 
00096     /*
00097      * If no displays have been added before this, create the display queue.
00098      */
00099     if (!dq) {
00100         dq = XmuDQCreate (_CloseDisplay, _FreeCCDQ, NULL);
00101         if (!dq) return NULL;
00102     }
00103     
00104     /*
00105      * See if the display is already there
00106      */
00107     e = XmuDQLookupDisplay (dq, dpy);   /* see if it's there */
00108     if (!e) {                           /* else create it */
00109         XmuCvtCache *c = (XmuCvtCache *) malloc (sizeof (XmuCvtCache));
00110         if (!c) return NULL;
00111 
00112         /*
00113          * Add the display to the queue
00114          */
00115         e = XmuDQAddDisplay (dq, dpy, (XPointer) c);
00116         if (!e) {
00117             free ((char *) c);
00118             return NULL;
00119         }
00120 
00121         /*
00122          * initialize fields in cache
00123          */
00124         _InitializeCvtCache (c);
00125     }
00126 
00127     /*
00128      * got it
00129      */
00130     return (XmuCvtCache *)(e->data);
00131 }

Here is the call graph for this function:

Here is the caller graph for this function:


Variable Documentation

XmuDisplayQueue* dq = NULL [static]

Definition at line 50 of file CvtCache.c.

Referenced by _FreeCCDQ(), and _XmuCCLookupDisplay().


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