WidgetNode.h revision 6c321187
1/* $Xorg: WidgetNode.h,v 1.5 2001/02/09 02:03:53 xorgcvs Exp $ */ 2 3/* 4 5Copyright 1990, 1998 The Open Group 6 7Permission to use, copy, modify, distribute, and sell this software and its 8documentation for any purpose is hereby granted without fee, provided that 9the above copyright notice appear in all copies and that both that 10copyright notice and this permission notice appear in supporting 11documentation. 12 13The above copyright notice and this permission notice shall be included in 14all copies or substantial portions of the Software. 15 16THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN 20AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 21CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 22 23Except as contained in this notice, the name of The Open Group shall not be 24used in advertising or otherwise to promote the sale, use or other dealings 25in this Software without prior written authorization from The Open Group. 26 27*/ 28/* $XFree86: xc/lib/Xmu/WidgetNode.h,v 1.5 2001/01/17 19:42:57 dawes Exp $ */ 29 30/* 31 * Author: Jim Fulton, MIT X Consortium 32 */ 33 34#ifndef _XmuWidgetNode_h 35#define _XmuWidgetNode_h 36 37#include <X11/Intrinsic.h> 38#include <X11/Xfuncproto.h> 39 40/* 41 * This is usually initialized by setting the first two fields and letting 42 * rest be implicitly nulled (by genlist.sh, for example) 43 */ 44typedef struct _XmuWidgetNode { 45 char *label; /* mixed case name */ 46 WidgetClass *widget_class_ptr; /* addr of widget class */ 47 struct _XmuWidgetNode *superclass; /* superclass of widget_class */ 48 struct _XmuWidgetNode *children, *siblings; /* subclass links */ 49 char *lowered_label; /* lowercase version of label */ 50 char *lowered_classname; /* lowercase version of class_name */ 51 Bool have_resources; /* resources have been fetched */ 52 XtResourceList resources; /* extracted resource database */ 53 struct _XmuWidgetNode **resourcewn; /* where resources come from */ 54 Cardinal nresources; /* number of resources */ 55 XtResourceList constraints; /* extracted constraint resources */ 56 struct _XmuWidgetNode **constraintwn; /* where constraints come from */ 57 Cardinal nconstraints; /* number of constraint resources */ 58 XtPointer data; /* extra data */ 59} XmuWidgetNode; 60 61#define XmuWnClass(wn) ((wn)->widget_class_ptr[0]) 62#define XmuWnClassname(wn) (XmuWnClass(wn)->core_class.class_name) 63#define XmuWnSuperclass(wn) ((XmuWnClass(wn))->core_class.superclass) 64 65 /* external interfaces */ 66_XFUNCPROTOBEGIN 67 68void XmuWnInitializeNodes 69( 70 XmuWidgetNode *nodearray, 71 int nnodes 72 ); 73 74void XmuWnFetchResources 75( 76 XmuWidgetNode *node, 77 Widget toplevel, 78 XmuWidgetNode *topnode 79 ); 80 81int XmuWnCountOwnedResources 82( 83 XmuWidgetNode *node, 84 XmuWidgetNode *ownernode, 85 Bool constraints 86 ); 87 88XmuWidgetNode *XmuWnNameToNode 89( 90 XmuWidgetNode *nodelist, 91 int nnodes, 92 _Xconst char *name 93 ); 94 95_XFUNCPROTOEND 96 97#endif /* _XmuWidgetNode_h */ 98 99