#define ANALOG_SIZE_DEFAULT 164 #define max(a, b) ((a) > (b) ? (a) : (b)) #define min(a, b) ((a) < (b) ? (a) : (b)) #define abs(a) ((a) < 0 ? -(a) : (a)) /* Initialization of defaults */ #define offset(field) XtOffsetOf(ClockRec, clock.field) #define goffset(field) XtOffsetOf(WidgetRec, core.field) static XtResource resources[] = { {XtNwidth, XtCWidth, XtRDimension, sizeof(Dimension), goffset(width), XtRImmediate, (XtPointer) 0}, {XtNheight, XtCHeight, XtRDimension, sizeof(Dimension), goffset(height), XtRImmediate, (XtPointer) 0}, {XtNupdate, XtCInterval, XtRInt, sizeof(int), offset(update), XtRImmediate, (XtPointer) 60 }, {XtNforeground, XtCForeground, XtRPixel, sizeof(Pixel), offset(fgpixel), XtRString, XtDefaultForeground}, {XtNhand, XtCForeground, XtRPixel, sizeof(Pixel), offset(Hdpixel), XtRString, XtDefaultForeground}, {XtNhighlight, XtCForeground, XtRPixel, sizeof(Pixel), offset(Hipixel), XtRString, XtDefaultForeground}, {XtNanalog, XtCBoolean, XtRBoolean, sizeof(Boolean), offset(analog), XtRImmediate, (XtPointer) TRUE}, {XtNchime, XtCBoolean, XtRBoolean, sizeof(Boolean), offset(chime), XtRImmediate, (XtPointer) FALSE }, {XtNpadding, XtCMargin, XtRInt, sizeof(int),
<MotionNotify>: Notify()\n\ <ResizeRequest>: Notify()\n\ <ConfigureNotify>: Notify()\n\ <VisibilityNotify>: Notify()\n\ <EnterNotify>: Notify()\n\ <LeaveNotify>: Notify()\n\ <Expose>: Notify()"; #define offset(field) XtOffset(CanvasWidget,canvas.field) #define goffset(field) XtOffset(Widget,core.field) static XtResource resources[] = { {XtNcallback, XtCCallback, XtRCallback, sizeof(XtPointer), offset(callbacks), XtRCallback, (XtPointer)NULL}, {XtNwidth, XtCWidth, XtRDimension, sizeof(Dimension), goffset(width), XtRString, "512"}, {XtNheight, XtCHeight, XtRDimension, sizeof(Dimension), goffset(height), XtRString, "512"}, {XtNforeground, XtCForeground, XtRPixel, sizeof(Pixel), offset(foreground), XtRString, "Black"}, {XtNbackground, XtCBackground, XtRPixel, sizeof (Pixel), offset(background), XtRString, "White"}, {XtNbackingStore, XtCBackingStore, XtRBackingStore, sizeof (int), offset (backing_store), XtRString, "default"}, {XtNcursor, XtCCursor, XtRCursor, sizeof(Cursor), offset(cursor), XtRString, "tcross"}, {XtNlabel, XtCLabel, XtRString, sizeof(String), offset(label), XtRString, NULL}, }; #undef offset