/*ARGSUSED*/ static void XawSmeBSBInitialize(Widget request, Widget cnew, ArgList args, Cardinal *num_args) { SmeBSBObject entry = (SmeBSBObject)cnew; if (!entry->sme_bsb.font) XtError("Aborting: no font found\n"); if (entry->sme_bsb.label == NULL) entry->sme_bsb.label = XtName(cnew); else entry->sme_bsb.label = XtNewString(entry->sme_bsb.label); GetDefaultSize(cnew, &entry->rectangle.width, &entry->rectangle.height); CreateGCs(cnew); entry->sme_bsb.left_bitmap_width = entry->sme_bsb.left_bitmap_height = 0; entry->sme_bsb.right_bitmap_width = entry->sme_bsb.right_bitmap_height = 0; GetBitmapInfo(cnew, True); /* Left Bitmap Info */ GetBitmapInfo(cnew, False); /* Right Bitmap Info */ }
void InitVariables(void) { FvwmContext = XUniqueContext(); MenuContext = XUniqueContext(); /* initialize some lists */ Scr.AllBindings = NULL; Scr.AllMenus = NULL; Scr.TheList = NULL; Scr.DefaultIcon = NULL; Scr.d_depth = DefaultDepth(dpy, Scr.screen); Scr.FvwmRoot.w = Scr.Root; Scr.FvwmRoot.next = 0; /* RBW - 05/15/1998 - 2 new fields to init - stacking order chain. */ Scr.FvwmRoot.stack_next = &Scr.FvwmRoot; Scr.FvwmRoot.stack_prev = &Scr.FvwmRoot; XGetWindowAttributes(dpy, Scr.Root, &(Scr.FvwmRoot.attr)); Scr.root_pushes = 0; Scr.pushed_window = &Scr.FvwmRoot; Scr.FvwmRoot.number_cmap_windows = 0; /* create graphics contexts */ CreateGCs(); SetupButtons(); /* setup win-95 title bar buttons */ Scr.MyDisplayWidth = DisplayWidth(dpy, Scr.screen); Scr.MyDisplayHeight = DisplayHeight(dpy, Scr.screen); Scr.NoBoundaryWidth = 1; Scr.BoundaryWidth = BOUNDARY_WIDTH; Scr.CornerWidth = CORNER_WIDTH; Scr.Hilite = NULL; Scr.Focus = NULL; Scr.Ungrabbed = NULL; Scr.StdFont.font = NULL; #ifndef NON_VIRTUAL Scr.VxMax = 2 * Scr.MyDisplayWidth; Scr.VyMax = 2 * Scr.MyDisplayHeight; #else Scr.VxMax = 0; Scr.VyMax = 0; #endif Scr.Vx = Scr.Vy = 0; Scr.SizeWindow = None; /* Sets the current desktop number to zero */ /* Multiple desks are available even in non-virtual * compilations */ { Atom atype; int aformat; unsigned long nitems, bytes_remain; unsigned char *prop; Scr.CurrentDesk = 0; if ((XGetWindowProperty(dpy, Scr.Root, _XA_WM_DESKTOP, 0L, 1L, True, _XA_WM_DESKTOP, &atype, &aformat, &nitems, &bytes_remain, &prop)) == Success) { if (prop != NULL) { Restarting = True; Scr.CurrentDesk = *(unsigned long *) prop; } } } Scr.EdgeScrollX = Scr.EdgeScrollY = 100; Scr.ScrollResistance = Scr.MoveResistance = 0; Scr.OpaqueSize = 5; Scr.ClickTime = 150; Scr.ColormapFocus = COLORMAP_FOLLOWS_MOUSE; /* set major operating modes */ Scr.NumBoxes = 0; Scr.randomx = Scr.randomy = 0; Scr.buttons2grab = 7; return; }