Back to index

plt-scheme  4.2.1
xwButton.c
Go to the documentation of this file.
00001 /* Generated by wbuild
00002  * (generator version 3.2)
00003  */
00004 #include <X11/IntrinsicP.h>
00005 #include <X11/StringDefs.h>
00006 #include <./xwButtonP.h>
00007 static void activate(
00008 #if NeedFunctionPrototypes
00009 Widget,XEvent*,String*,Cardinal*
00010 #endif
00011 );
00012 static void enter(
00013 #if NeedFunctionPrototypes
00014 Widget,XEvent*,String*,Cardinal*
00015 #endif
00016 );
00017 static void leave(
00018 #if NeedFunctionPrototypes
00019 Widget,XEvent*,String*,Cardinal*
00020 #endif
00021 );
00022 
00023 static XtActionsRec actionsList[] = {
00024 {"activate", activate},
00025 {"enter", enter},
00026 {"leave", leave},
00027 };
00028 
00029 static char defaultTranslations[] = "\
00030 <Btn1Down>: set_shadow(sunken) \n\
00031 <Btn1Up>: activate() set_shadow() \n\
00032 Button1<Leave>: set_shadow() leave() \n\
00033 Button1<Enter>: set_shadow(sunken) enter() \n\
00034 <Key>Return: set_shadow(sunken) activate() set_shadow() \n\
00035 <EnterNotify>: enter() \n\
00036 <LeaveNotify>: leave() \n\
00037 ";
00038 static void _resolve_inheritance(
00039 #if NeedFunctionPrototypes
00040 WidgetClass
00041 #endif
00042 );
00043 
00044 static XtResource resources[] = {
00045 {XtNactivate,XtCActivate,XtRCallback,sizeof(((XfwfButtonRec*)NULL)->xfwfButton.activate),XtOffsetOf(XfwfButtonRec,xfwfButton.activate),XtRImmediate,(XtPointer)NULL },
00046 {XtNenter,XtCEnter,XtRCallback,sizeof(((XfwfButtonRec*)NULL)->xfwfButton.enter),XtOffsetOf(XfwfButtonRec,xfwfButton.enter),XtRImmediate,(XtPointer)NULL },
00047 {XtNleave,XtCLeave,XtRCallback,sizeof(((XfwfButtonRec*)NULL)->xfwfButton.leave),XtOffsetOf(XfwfButtonRec,xfwfButton.leave),XtRImmediate,(XtPointer)NULL },
00048 {XtNframeWidth,XtCFrameWidth,XtRDimension,sizeof(((XfwfButtonRec*)NULL)->xfwfFrame.frameWidth),XtOffsetOf(XfwfButtonRec,xfwfFrame.frameWidth),XtRImmediate,(XtPointer)2 },
00049 {XtNtraversalOn,XtCTraversalOn,XtRBoolean,sizeof(((XfwfButtonRec*)NULL)->xfwfCommon.traversalOn),XtOffsetOf(XfwfButtonRec,xfwfCommon.traversalOn),XtRImmediate,(XtPointer)True },
00050 };
00051 
00052 XfwfButtonClassRec xfwfButtonClassRec = {
00053 { /* core_class part */
00054 /* superclass        */  (WidgetClass) &xfwfLabelClassRec,
00055 /* class_name        */  "XfwfButton",
00056 /* widget_size       */  sizeof(XfwfButtonRec),
00057 /* class_initialize  */  NULL,
00058 /* class_part_initialize*/  _resolve_inheritance,
00059 /* class_inited      */  FALSE,
00060 /* initialize        */  NULL,
00061 /* initialize_hook   */  NULL,
00062 /* realize           */  XtInheritRealize,
00063 /* actions           */  actionsList,
00064 /* num_actions       */  3,
00065 /* resources         */  resources,
00066 /* num_resources     */  5,
00067 /* xrm_class         */  NULLQUARK,
00068 /* compres_motion    */  True ,
00069 /* compress_exposure        */  XtExposeCompressMultiple ,
00070 /* compress_enterleave      */  True ,
00071 /* visible_interest  */  False ,
00072 /* destroy           */  NULL,
00073 /* resize            */  XtInheritResize,
00074 /* expose            */  XtInheritExpose,
00075 /* set_values        */  NULL,
00076 /* set_values_hook   */  NULL,
00077 /* set_values_almost        */  XtInheritSetValuesAlmost,
00078 /* get_values+hook   */  NULL,
00079 /* accept_focus      */  XtInheritAcceptFocus,
00080 /* version           */  XtVersion,
00081 /* callback_private  */  NULL,
00082 /* tm_table          */  defaultTranslations,
00083 /* query_geometry    */  XtInheritQueryGeometry,
00084 /* display_acceleator       */  XtInheritDisplayAccelerator,
00085 /* extension         */  NULL 
00086 },
00087 { /* composite_class part */
00088 XtInheritGeometryManager,
00089 XtInheritChangeManaged,
00090 XtInheritInsertChild,
00091 XtInheritDeleteChild,
00092 NULL
00093 },
00094 { /* XfwfCommon_class part */
00095 XtInherit_compute_inside,
00096 XtInherit_total_frame_width,
00097 XtInherit__expose,
00098 XtInherit_highlight_border,
00099 XtInherit_unhighlight_border,
00100 XtInherit_hilite_callbacks,
00101 XtInherit_would_accept_focus,
00102 XtInherit_traverse,
00103 XtInherit_lighter_color,
00104 XtInherit_darker_color,
00105 XtInherit_set_color,
00106 /* traversal_trans */  NULL ,
00107 /* traversal_trans_small */  NULL ,
00108 /* travMode */  1 ,
00109 },
00110 { /* XfwfFrame_class part */
00111  /* dummy */  0
00112 },
00113 { /* XfwfBoard_class part */
00114 XtInherit_set_abs_location,
00115 },
00116 { /* XfwfLabel_class part */
00117 XtInherit_set_label,
00118 },
00119 { /* XfwfButton_class part */
00120  /* dummy */  0
00121 },
00122 };
00123 WidgetClass xfwfButtonWidgetClass = (WidgetClass) &xfwfButtonClassRec;
00124 /*ARGSUSED*/
00125 static void activate(self,event,params,num_params)Widget self;XEvent*event;String*params;Cardinal*num_params;
00126 {
00127     if (((XfwfButtonWidget)self)->xfwfFrame.frameType == XfwfSunken)
00128       XtCallCallbackList(self, ((XfwfButtonWidget)self)->xfwfButton.activate, event);
00129 }
00130 
00131 /*ARGSUSED*/
00132 static void enter(self,event,params,num_params)Widget self;XEvent*event;String*params;Cardinal*num_params;
00133 {
00134     XtCallCallbackList(self, ((XfwfButtonWidget)self)->xfwfButton.enter, event);
00135 }
00136 
00137 /*ARGSUSED*/
00138 static void leave(self,event,params,num_params)Widget self;XEvent*event;String*params;Cardinal*num_params;
00139 {
00140     XtCallCallbackList(self, ((XfwfButtonWidget)self)->xfwfButton.leave, event);
00141 }
00142 
00143 static void _resolve_inheritance(class)
00144 WidgetClass class;
00145 {
00146   XfwfButtonWidgetClass c = (XfwfButtonWidgetClass) class;
00147   XfwfButtonWidgetClass super;
00148   static CompositeClassExtensionRec extension_rec = {
00149     NULL, NULLQUARK, XtCompositeExtensionVersion,
00150     sizeof(CompositeClassExtensionRec), True};
00151   CompositeClassExtensionRec *ext;
00152   ext = (XtPointer)XtMalloc(sizeof(*ext));
00153   *ext = extension_rec;
00154   ext->next_extension = c->composite_class.extension;
00155   c->composite_class.extension = ext;
00156   if (class == xfwfButtonWidgetClass) return;
00157   super = (XfwfButtonWidgetClass)class->core_class.superclass;
00158 }