Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ XtGetResour(3) — OSF1 1.0

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

XtFree(1)

XtGetApplicationResources(1)

 

Name

XtGetResourceList — retrieve default values for a resource list. 

Synopsis

void XtGetResourceList(object_class, resources_return, num_resources_return);

    WidgetClass object_class;
    XtResourceList ∗resources_return;
    Cardinal ∗num_resources_return;

Arguments

object_class
Specifies the object class to be queried; may be of class objectClass or any subclass thereof.

resources_return
Returns the resource list.

num_resources_return
Returns the number of entries in the resource list.

Description

If XtGetResourceList is called before the widget class is initialized it returns the resource list as specified in the widget class record.  If it is called after the widget class has been initialized, XtGetResourceList returns a merged resource list that includes the resources for all superclasses.  The list returned by XtGetResourceList should be freed using XtFree when it is no longer needed. 

Here is an abbreviated version of the resource list in the Label widget:

/∗ Resources specific to Label ∗/
static XtResource resources[] = {
{XtNforeground, XtCForeground, XtRPixel, sizeof(Pixel),
   XtOffsetOf(LabelRec, label.foreground), XtRString,
XtDefaultForeground},
{XtNfont,  XtCFont, XtRFontStruct, sizeof(XFontStruct ∗),
   XtOffsetOf(LabelRec, label.font),XtRString, XtDefaultFont},
{XtNlabel,  XtCLabel, XtRString, sizeof(String),
   XtOffsetOf(LabelRec, label.label), XtRString, NULL},
                .
                .
                .
}

Structures

XtResource is defined as follows in <X11/Intrinsic.h>:

typedef struct _XtResource {
String    resource_name;/∗ Resource name ∗/
String    resource_class;/∗ Resource class ∗/
String    resource_type;/∗ Representation type desired ∗/
Cardinal  resource_size;/∗ Size in bytes of representation ∗/
Cardinal  resource_offset;/∗ Offset from base to put resource value ∗/
String    default_type;/∗ Representation type of specified default ∗/
XtPointer default_addr;/∗ Address of resource default value ∗/
} XtResource, XtResourceList;

See Also

XtFree(1), XtGetApplicationResources(1). 

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