aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDimitri Sokolyuk <demon@dim13.org>2014-10-21 08:08:46 +0000
committerDimitri Sokolyuk <demon@dim13.org>2014-10-21 08:08:46 +0000
commit0c8e0dd208d4d0d32c72067701c76bf09b8660a9 (patch)
tree08e76ecbfaa6048c19cc0948108ed02a20d145be
parentaf7ec2225f37d80514575fedf92d68c8e99d1051 (diff)
bring parts closer together
-rw-r--r--Sgraph.c58
1 files changed, 29 insertions, 29 deletions
diff --git a/Sgraph.c b/Sgraph.c
index d6d2b3c..33107fc 100644
--- a/Sgraph.c
+++ b/Sgraph.c
@@ -103,35 +103,6 @@ SgraphClassRec sgraphClassRec = {
WidgetClass sgraphWidgetClass = (WidgetClass)&sgraphClassRec;
static void
-GetGC(Widget w)
-{
- SgraphWidget sw = (SgraphWidget)w;
- XGCValues xgcv;
- XtGCMask gc_mask = GCForeground;
-
- Trace(w);
-
- gc_mask = GCForeground;
- xgcv.foreground = sw->core.background_pixel;
- sw->sgraph.backGC = XtGetGC(w, gc_mask, &xgcv);
-
- gc_mask = GCForeground;
- xgcv.foreground = sw->sgraph.foreground;
- sw->sgraph.foreGC = XtGetGC(w, gc_mask, &xgcv);
-
-#if 1
- gc_mask = GCForeground|GCClipMask;
- xgcv.clip_mask = sw->sgraph.mask;
- sw->sgraph.clipGC = XtGetGC(w, gc_mask, &xgcv);
-#endif
-
- gc_mask = GCForeground|GCPlaneMask;
- xgcv.plane_mask = 1;
- xgcv.foreground = 1;
- sw->sgraph.maskGC = XtGetGC(w, gc_mask, &xgcv);
-}
-
-static void
Initialize(Widget request, Widget w, ArgList args, Cardinal *nargs)
{
SgraphWidget sw = (SgraphWidget)w;
@@ -195,6 +166,35 @@ Resize(Widget w)
}
static void
+GetGC(Widget w)
+{
+ SgraphWidget sw = (SgraphWidget)w;
+ XGCValues xgcv;
+ XtGCMask gc_mask = GCForeground;
+
+ Trace(w);
+
+ gc_mask = GCForeground;
+ xgcv.foreground = sw->core.background_pixel;
+ sw->sgraph.backGC = XtGetGC(w, gc_mask, &xgcv);
+
+ gc_mask = GCForeground;
+ xgcv.foreground = sw->sgraph.foreground;
+ sw->sgraph.foreGC = XtGetGC(w, gc_mask, &xgcv);
+
+#if 1
+ gc_mask = GCForeground|GCClipMask;
+ xgcv.clip_mask = sw->sgraph.mask;
+ sw->sgraph.clipGC = XtGetGC(w, gc_mask, &xgcv);
+#endif
+
+ gc_mask = GCForeground|GCPlaneMask;
+ xgcv.plane_mask = 1;
+ xgcv.foreground = 1;
+ sw->sgraph.maskGC = XtGetGC(w, gc_mask, &xgcv);
+}
+
+static void
Redisplay(Widget w, XEvent *event, Region r)
{
SgraphWidget sw = (SgraphWidget)w;