WidgetNode.h

Go to the documentation of this file.
00001 /* $Xorg: WidgetNode.h,v 1.5 2001/02/09 02:03:53 xorgcvs Exp $ */
00002 
00003 /*
00004 
00005 Copyright 1990, 1998  The Open Group
00006 
00007 Permission to use, copy, modify, distribute, and sell this software and its
00008 documentation for any purpose is hereby granted without fee, provided that
00009 the above copyright notice appear in all copies and that both that
00010 copyright notice and this permission notice appear in supporting
00011 documentation.
00012 
00013 The above copyright notice and this permission notice shall be included in
00014 all copies or substantial portions of the Software.
00015 
00016 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
00017 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
00018 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL THE
00019 OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
00020 AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
00021 CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
00022 
00023 Except as contained in this notice, the name of The Open Group shall not be
00024 used in advertising or otherwise to promote the sale, use or other dealings
00025 in this Software without prior written authorization from The Open Group.
00026 
00027 */
00028 /* $XFree86: xc/lib/Xmu/WidgetNode.h,v 1.5 2001/01/17 19:42:57 dawes Exp $ */
00029 
00030 /*
00031  * Author:  Jim Fulton, MIT X Consortium
00032  */
00033 
00034 #ifndef _XmuWidgetNode_h
00035 #define _XmuWidgetNode_h
00036 
00037 #include <X11/Intrinsic.h>
00038 #include <X11/Xfuncproto.h>
00039 
00040 /*
00041  * This is usually initialized by setting the first two fields and letting
00042  * rest be implicitly nulled (by genlist.sh, for example)
00043  */
00044 typedef struct _XmuWidgetNode {
00045     char *label;                        /* mixed case name */
00046     WidgetClass *widget_class_ptr;      /* addr of widget class */
00047     struct _XmuWidgetNode *superclass;  /* superclass of widget_class */
00048     struct _XmuWidgetNode *children, *siblings; /* subclass links */
00049     char *lowered_label;                /* lowercase version of label */
00050     char *lowered_classname;            /* lowercase version of class_name */
00051     Bool have_resources;                /* resources have been fetched */
00052     XtResourceList resources;           /* extracted resource database */
00053     struct _XmuWidgetNode **resourcewn; /* where resources come from */
00054     Cardinal nresources;                /* number of resources */
00055     XtResourceList constraints;         /* extracted constraint resources */
00056     struct _XmuWidgetNode **constraintwn;  /* where constraints come from */
00057     Cardinal nconstraints;              /* number of constraint resources */
00058     XtPointer data;                     /* extra data */
00059 } XmuWidgetNode;
00060 
00061 #define XmuWnClass(wn) ((wn)->widget_class_ptr[0])
00062 #define XmuWnClassname(wn) (XmuWnClass(wn)->core_class.class_name)
00063 #define XmuWnSuperclass(wn) ((XmuWnClass(wn))->core_class.superclass)
00064 
00065                                         /* external interfaces */
00066 _XFUNCPROTOBEGIN
00067 
00068 void XmuWnInitializeNodes
00069 (
00070  XmuWidgetNode          *nodearray,
00071  int                    nnodes
00072  );
00073 
00074 void XmuWnFetchResources
00075 (
00076  XmuWidgetNode          *node,
00077  Widget                 toplevel,
00078  XmuWidgetNode          *topnode
00079  );
00080 
00081 int XmuWnCountOwnedResources
00082 (
00083  XmuWidgetNode          *node,
00084  XmuWidgetNode          *ownernode,
00085  Bool                   constraints
00086  );
00087 
00088 XmuWidgetNode *XmuWnNameToNode
00089 (
00090  XmuWidgetNode          *nodelist,
00091  int                    nnodes,
00092  _Xconst char           *name
00093  );
00094 
00095 _XFUNCPROTOEND
00096 
00097 #endif /* _XmuWidgetNode_h */
00098 

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