Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ XmuWFhRsrcs(3X) — DeltaWindows 1.3.3 Release 4 Version 4.3

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

XmuWnCountOwnedResources(6)

XmuWnInitializeNodes(6)

XmuWnNameToNode(6)

 

NAME

XmuWnFetchResources − get the resource list of a widget class. 

SYNOPSIS

#include <X11/Xmu/WidgetNode.h>

void XmuWnFetchResources(node, toplevel, top_node)
    XmuWidgetNode ∗node;
    Widget toplevel;
    XmuWidgetNode ∗top_node;

Inputs

nodeSpecifies the widget class for that the resource list should be obtained. 

toplevelSpecifies a widget that can be used as the parent for a dummy instance of the specified widget class.  A top-level shell widget is suitable, for example. 

top_nodeSpecifies the widget class that should be treated as the top of the widget class hierarchy when determining which superclass contributed which resources to the widget class node. 

AVAILABILITY

Release 5 and later. 

DESCRIPTION

This function obtains a resource list for the normal resources and the constraint resources of a widget class.  For each resource it also obtains a pointer to the widget class that contributed that resource.  XmuWnFetchResources() creates and destroys a dummy widget instance of the specified class.  The argument toplevel is a widget that may be used as the parent of that dummy widget; a toplevel shell widget is suitable.  The top_node argument is used to specify the top of the widget hierarchy for the purposes of determining "ownership" of resources.  The XmuWidgetNode for the Core class could be used, for example, if the programmer were not interested in considering the Object and RectObj widget classes separately. 

XmuWnFetchResources() does not return a value; the resource lists it obtains are stored in its node argument, which is of type XmuWidgetNode ∗.  This structure is shown below.  The fields resources and constraints are the normal and constraint resource lists for the widget class, and the fields nresources, and nconstraints specify the number of elements in each list.  Additionally, the fields resourcewn and constraintwn are arrays of XmuWidgetNode ∗ whose elements point to the widget structure of the widget node class that "owns" the corresponding resource in the resource lists. 

The widget nodes passed to XmuWnFetchResources() must first have been initialized in a call to XmuWnInitializeNodes(). 

USAGE

The XmuWn functions were developed for the specific needs of the viewres client, and may not be of general utility. 

STRUCTURES

typedef struct _XmuWidgetNode {
    char ∗label;                                      /∗ mixed case name ∗/
    WidgetClass ∗widget_class_ptr;               /∗ addr of widget class ∗/
    struct _XmuWidgetNode ∗superclass;     /∗ superclass of widget_class ∗/
    struct _XmuWidgetNode ∗children, ∗siblings;        /∗ subclass links ∗/
    char ∗lowered_label;                   /∗ lowercase version of label ∗/
    char ∗lowered_classname;          /∗ lowercase version of class_name ∗/
    Bool have_resources;                  /∗ resources have been fetched ∗/
    XtResourceList resources;             /∗ extracted resource database ∗/
    struct _XmuWidgetNode ∗∗resourcewn;     /∗ where resources come from ∗/
    Cardinal nresources;                          /∗ number of resources ∗/
    XtResourceList constraints;        /∗ extracted constraint resources ∗/
    struct _XmuWidgetNode ∗∗constraintwn; /∗ where constraints come from ∗/
    Cardinal nconstraints;             /∗ number of constraint resources ∗/
    XtPointer data;                                        /∗ extra data ∗/ } XmuWidgetNode;

SEE ALSO

XmuWnCountOwnedResources(6), XmuWnInitializeNodes(6), XmuWnNameToNode(6). 

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026