Back to index

plt-scheme  4.2.1
xwCanvas.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 <./xwCanvasP.h>
00007 static void _resolve_inheritance(
00008 #if NeedFunctionPrototypes
00009 WidgetClass
00010 #endif
00011 );
00012 static void realize(
00013 #if NeedFunctionPrototypes
00014 Widget,XtValueMask *,XSetWindowAttributes *
00015 #endif
00016 );
00017 static Boolean  set_values(
00018 #if NeedFunctionPrototypes
00019 Widget ,Widget ,Widget,ArgList ,Cardinal *
00020 #endif
00021 );
00022 
00023 static XtResource resources[] = {
00024 {XtNbackingStore,XtCBackingStore,XtRInt,sizeof(((XfwfCanvasRec*)NULL)->xfwfCanvas.backingStore),XtOffsetOf(XfwfCanvasRec,xfwfCanvas.backingStore),XtRImmediate,(XtPointer)NotUseful },
00025 };
00026 
00027 XfwfCanvasClassRec xfwfCanvasClassRec = {
00028 { /* core_class part */
00029 /* superclass        */  (WidgetClass) &xfwfBoardClassRec,
00030 /* class_name        */  "XfwfCanvas",
00031 /* widget_size       */  sizeof(XfwfCanvasRec),
00032 /* class_initialize  */  NULL,
00033 /* class_part_initialize*/  _resolve_inheritance,
00034 /* class_inited      */  FALSE,
00035 /* initialize        */  NULL,
00036 /* initialize_hook   */  NULL,
00037 /* realize           */  realize,
00038 /* actions           */  NULL,
00039 /* num_actions       */  0,
00040 /* resources         */  resources,
00041 /* num_resources     */  1,
00042 /* xrm_class         */  NULLQUARK,
00043 /* compres_motion    */  True ,
00044 /* compress_exposure        */  XtExposeCompressMaximal ,
00045 /* compress_enterleave      */  True ,
00046 /* visible_interest  */  False ,
00047 /* destroy           */  NULL,
00048 /* resize            */  XtInheritResize,
00049 /* expose            */  XtInheritExpose,
00050 /* set_values        */  set_values,
00051 /* set_values_hook   */  NULL,
00052 /* set_values_almost        */  XtInheritSetValuesAlmost,
00053 /* get_values+hook   */  NULL,
00054 /* accept_focus      */  XtInheritAcceptFocus,
00055 /* version           */  XtVersion,
00056 /* callback_private  */  NULL,
00057 /* tm_table          */  NULL,
00058 /* query_geometry    */  XtInheritQueryGeometry,
00059 /* display_acceleator       */  XtInheritDisplayAccelerator,
00060 /* extension         */  NULL 
00061 },
00062 { /* composite_class part */
00063 XtInheritGeometryManager,
00064 XtInheritChangeManaged,
00065 XtInheritInsertChild,
00066 XtInheritDeleteChild,
00067 NULL
00068 },
00069 { /* XfwfCommon_class part */
00070 XtInherit_compute_inside,
00071 XtInherit_total_frame_width,
00072 XtInherit__expose,
00073 XtInherit_highlight_border,
00074 XtInherit_unhighlight_border,
00075 XtInherit_hilite_callbacks,
00076 XtInherit_would_accept_focus,
00077 XtInherit_traverse,
00078 XtInherit_lighter_color,
00079 XtInherit_darker_color,
00080 XtInherit_set_color,
00081 /* traversal_trans */  NULL ,
00082 /* traversal_trans_small */  NULL ,
00083 /* travMode */  1 ,
00084 },
00085 { /* XfwfFrame_class part */
00086  /* dummy */  0
00087 },
00088 { /* XfwfBoard_class part */
00089 XtInherit_set_abs_location,
00090 },
00091 { /* XfwfCanvas_class part */
00092  /* dummy */  0
00093 },
00094 };
00095 WidgetClass xfwfCanvasWidgetClass = (WidgetClass) &xfwfCanvasClassRec;
00096 static void _resolve_inheritance(class)
00097 WidgetClass class;
00098 {
00099   XfwfCanvasWidgetClass c = (XfwfCanvasWidgetClass) class;
00100   XfwfCanvasWidgetClass super;
00101   static CompositeClassExtensionRec extension_rec = {
00102     NULL, NULLQUARK, XtCompositeExtensionVersion,
00103     sizeof(CompositeClassExtensionRec), True};
00104   CompositeClassExtensionRec *ext;
00105   ext = (XtPointer)XtMalloc(sizeof(*ext));
00106   *ext = extension_rec;
00107   ext->next_extension = c->composite_class.extension;
00108   c->composite_class.extension = ext;
00109   if (class == xfwfCanvasWidgetClass) return;
00110   super = (XfwfCanvasWidgetClass)class->core_class.superclass;
00111 }
00112 /*ARGSUSED*/
00113 #if NeedFunctionPrototypes
00114 static void realize(Widget self,XtValueMask * mask,XSetWindowAttributes * attributes)
00115 #else
00116 static void realize(self,mask,attributes)Widget self;XtValueMask * mask;XSetWindowAttributes * attributes;
00117 #endif
00118 {
00119     if ((((XfwfCanvasWidget)self)->xfwfCanvas.backingStore == Always)
00120     ||  (((XfwfCanvasWidget)self)->xfwfCanvas.backingStore == NotUseful)
00121     ||  (((XfwfCanvasWidget)self)->xfwfCanvas.backingStore == WhenMapped)) {
00122        *mask |= CWBackingStore;
00123        attributes->backing_store = ((XfwfCanvasWidget)self)->xfwfCanvas.backingStore;
00124     } else {
00125        *mask &= ~CWBackingStore;
00126     }
00127     /* chain to parent method */
00128     xfwfBoardClassRec.core_class.realize(self, mask, attributes);
00129 }
00130 /*ARGSUSED*/
00131 #if NeedFunctionPrototypes
00132 static Boolean  set_values(Widget  old,Widget  request,Widget self,ArgList  args,Cardinal * num_args)
00133 #else
00134 static Boolean  set_values(old,request,self,args,num_args)Widget  old;Widget  request;Widget self;ArgList  args;Cardinal * num_args;
00135 #endif
00136 {
00137     if (((XfwfCanvasWidget)old)->xfwfCanvas.backingStore != ((XfwfCanvasWidget)self)->xfwfCanvas.backingStore) {
00138        if ((((XfwfCanvasWidget)self)->xfwfCanvas.backingStore == Always)
00139        ||  (((XfwfCanvasWidget)self)->xfwfCanvas.backingStore == NotUseful)
00140        ||  (((XfwfCanvasWidget)self)->xfwfCanvas.backingStore == WhenMapped)) {
00141            XSetWindowAttributes attributes;
00142            unsigned long     mask = CWBackingStore;
00143 
00144            attributes.backing_store = ((XfwfCanvasWidget)self)->xfwfCanvas.backingStore;
00145            XChangeWindowAttributes(XtDisplay(self), XtWindow(self), mask, &attributes);
00146        }
00147     }
00148 
00149     return FALSE; /* there is no need to redraw */
00150 }