There really isn't much to say about the header files. They are pretty much standard headers for a widget implementation (same procedure as every widget...). Here's the public header (from the file Trivial.h):
#ifndef TRIVIAL_H #define TRIVIAL_H #include <Xm/Xm.h> #include <Xm/BulletinB.h> extern WidgetClass xmTrivialWidgetClass; typedef struct _XmTrivialRec *XmTrivialWidget; typedef struct _XmTrivialConstraintRec *XmTrivialConstraint; #ifndef XmIsTrivial #define XmIsTrivial(a) (XtIsSubclass(a, xmTrivialWidgetClass)) #endif Widget XmCreateCreateTrivial(Widget _p, char *_n, ArgList _a, Cardinal _narg); #endif
Now, the private header (TrivialP.h):
#ifndef TRIVIAL_P_H #define TRIVIAL_P_H #include <Xm/XmP.h> #include <Xm/BulletinBP.h> #include "Trivial.h" typedef struct _XmTrivialClassPart { int duh; } XmTrivialClassPart; typedef struct _XmSmartMessageBoxClassRec { CoreClassPart core_class; CompositeClassPart composite_class; ConstraintClassPart constraint_class; XmManagerClassPart manager_class; XmBulletinBoardClassPart bulletin_board_class; XmTrivialClassPart trivial_class; } XmTrivialClassRec, *XmTrivialWidgetClass; typedef struct _XmTrivialPart { int gaah; } XmTrivialPart; typedef struct _XmTrivialRec { CorePart core; CompositePart composite; ConstraintPart constraint; XmManagerPart manager; XmBulletinBoardPart bulletin_board; XmTrivialPart trivial; } XmTrivialRec, *XmTrivialPtr; #endif