head 1.1; branch 1.1.1; access; symbols netbsd-10-1-RELEASE:1.1.1.3 libXaw-1-0-16:1.1.1.3 netbsd-8-3-RELEASE:1.1.1.2 netbsd-9-4-RELEASE:1.1.1.2 netbsd-10-0-RELEASE:1.1.1.3 netbsd-10-0-RC6:1.1.1.3 netbsd-10-0-RC5:1.1.1.3 netbsd-10-0-RC4:1.1.1.3 netbsd-10-0-RC3:1.1.1.3 netbsd-10-0-RC2:1.1.1.3 netbsd-10-0-RC1:1.1.1.3 libXaw-1-0-15:1.1.1.3 netbsd-10:1.1.1.3.0.2 netbsd-10-base:1.1.1.3 netbsd-9-3-RELEASE:1.1.1.2 netbsd-9-2-RELEASE:1.1.1.2 libXaw-1-0-14:1.1.1.3 netbsd-9-1-RELEASE:1.1.1.2 netbsd-8-2-RELEASE:1.1.1.2 netbsd-9-0-RELEASE:1.1.1.2 netbsd-9-0-RC2:1.1.1.2 netbsd-9-0-RC1:1.1.1.2 netbsd-9:1.1.1.2.0.12 netbsd-9-base:1.1.1.2 netbsd-8-1-RELEASE:1.1.1.2 netbsd-8-1-RC1:1.1.1.2 netbsd-7-2-RELEASE:1.1.1.2 netbsd-8-0-RELEASE:1.1.1.2 netbsd-8-0-RC2:1.1.1.2 netbsd-8-0-RC1:1.1.1.2 netbsd-7-1-2-RELEASE:1.1.1.2 netbsd-7-1-1-RELEASE:1.1.1.2 netbsd-8:1.1.1.2.0.10 netbsd-8-base:1.1.1.2 netbsd-7-1:1.1.1.2.0.8 netbsd-7-1-RELEASE:1.1.1.2 netbsd-7-1-RC2:1.1.1.2 netbsd-7-1-RC1:1.1.1.2 netbsd-7-0-2-RELEASE:1.1.1.2 netbsd-7-0-1-RELEASE:1.1.1.2 netbsd-7-0:1.1.1.2.0.6 netbsd-7-0-RELEASE:1.1.1.2 netbsd-7-0-RC3:1.1.1.2 netbsd-7-0-RC2:1.1.1.2 libXaw-1-0-13:1.1.1.2 netbsd-7-0-RC1:1.1.1.2 netbsd-6-0-6-RELEASE:1.1.1.1 netbsd-6-1-5-RELEASE:1.1.1.1 netbsd-7:1.1.1.2.0.4 netbsd-7-base:1.1.1.2 netbsd-6-1-4-RELEASE:1.1.1.1 netbsd-6-0-5-RELEASE:1.1.1.1 riastradh-xf86-video-intel-2-7-1-pre-2-21-15:1.1.1.2 libXaw-1-0-12:1.1.1.2 riastradh-drm2:1.1.1.2.0.2 riastradh-drm2-base:1.1.1.2 netbsd-6-1-3-RELEASE:1.1.1.1 netbsd-6-0-4-RELEASE:1.1.1.1 netbsd-6-1-2-RELEASE:1.1.1.1 netbsd-6-0-3-RELEASE:1.1.1.1 netbsd-6-1-1-RELEASE:1.1.1.1 libXaw-1-0-11:1.1.1.2 netbsd-6-1:1.1.1.1.0.6 netbsd-6-0-2-RELEASE:1.1.1.1 netbsd-6-1-RELEASE:1.1.1.1 netbsd-6-1-RC4:1.1.1.1 netbsd-6-1-RC3:1.1.1.1 netbsd-6-1-RC2:1.1.1.1 netbsd-6-1-RC1:1.1.1.1 netbsd-6-0-1-RELEASE:1.1.1.1 netbsd-6-0:1.1.1.1.0.4 netbsd-6-0-RELEASE:1.1.1.1 netbsd-6-0-RC2:1.1.1.1 netbsd-6-0-RC1:1.1.1.1 netbsd-6:1.1.1.1.0.2 netbsd-6-base:1.1.1.1 libXaw-1-0-9:1.1.1.1 libXaw-1-0-8:1.1.1.1 xorg:1.1.1; locks; strict; comment @# @; 1.1 date 2010.11.21.05.47.28; author mrg; state Exp; branches 1.1.1.1; next ; 1.1.1.1 date 2010.11.21.05.47.28; author mrg; state Exp; branches; next 1.1.1.2; 1.1.1.2 date 2013.05.31.00.34.37; author mrg; state Exp; branches; next 1.1.1.3; commitid USVyWKbDjF2swIRw; 1.1.1.3 date 2021.04.26.21.23.19; author mrg; state Exp; branches; next ; commitid HL9nhJwXbuukDQQC; desc @@ 1.1 log @Initial revision @ text @ Public Header File The public header file contains declarations that will be required by any application module that needs to refer to the widget; whether to create an instance of the class, to perform an XtSetValues operation, or to call a public routine implemented by the widget class. The contents of the Template public header file, < X11/Xaw/Template.h >, are: .. /* Copyright (c) X Consortium 1987, 1988 */ #ifndef _Template_h #define _Template_h /**************************************************************** * * Template widget * ****************************************************************/ /* Resources: Name Class RepType Default Value ---- ----- ------- ------------- background Background Pixel XtDefaultBackground border BorderColor Pixel XtDefaultForeground borderWidth BorderWidth Dimension 1 destroyCallback Callback Pointer NULL height Height Dimension 0 mappedWhenManaged MappedWhenManaged Boolean True sensitive Sensitive Boolean True width Width Dimension 0 x Position Position 0 y Position Position 0 */ /* define any special resource names here that are not in <X11/StringDefs.h> */ #define XtNtemplateResource "templateResource" #define XtCTemplateResource "TemplateResource" /* declare specific TemplateWidget class and instance datatypes */ typedef struct _TemplateClassRec* TemplateWidgetClass; typedef struct _TemplateRec* TemplateWidget; /* declare the class constant */ extern WidgetClass templateWidgetClass; #endif /* _Template_h */ You will notice that most of this file is documentation. The crucial parts are the last 8 lines where macros for any private resource names and classes are defined and where the widget class datatypes and class record pointer are declared. For the "WindowWidget", we want 2 drawing colors, a callback list for user input and an exposeCallback callback list, and we will declare three convenience procedures, so we need to add /* Resources: ... callback Callback Callback NULL drawingColor1 Color Pixel XtDefaultForeground drawingColor2 Color Pixel XtDefaultForeground exposeCallback Callback Callback NULL font Font XFontStruct* XtDefaultFont ... */ #define XtNdrawingColor1 "drawingColor1" #define XtNdrawingColor2 "drawingColor2" #define XtNexposeCallback "exposeCallback" extern Pixel WindowColor1(\|/* Widget */\|); extern Pixel WindowColor2(\|/* Widget */\|); extern Font\ \ WindowFont(\|/* Widget */\|); Note that we have chosen to call the input callback list by the generic name, callback, rather than a specific name. If widgets that define a single user-input action all choose the same resource name then there is greater possibility for an application to switch between widgets of different types. @ 1.1.1.1 log @initial import of libXaw-1.0.8 @ text @@ 1.1.1.2 log @initial import of libXaw-1.0.11 @ text @d7 1 a7 1 @ 1.1.1.3 log @initial import of libXaw-1.0.14 @ text @d13 1 a13 1 <X11/Xaw/Template.h>, d33 12 a44 12 Name Class RepType Default Value ---- ----- ------- ------------- background Background Pixel XtDefaultBackground border BorderColor Pixel XtDefaultForeground borderWidth BorderWidth Dimension 1 destroyCallback Callback Pointer NULL height Height Dimension 0 mappedWhenManaged MappedWhenManaged Boolean True sensitive Sensitive Boolean True width Width Dimension 0 x Position Position 0 y Position Position 0 d87 5 a91 5 callback Callback Callback NULL drawingColor1 Color Pixel XtDefaultForeground drawingColor2 Color Pixel XtDefaultForeground exposeCallback Callback Callback NULL font Font XFontStruct* XtDefaultFont d99 3 a101 3 extern Pixel WindowColor1( /* Widget */ ); extern Pixel WindowColor2( /* Widget */ ); extern Font WindowFont( /* Widget */ ); @