emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xpert]Default fonts for menus, dialogues, etc


From: pcpa
Subject: Re: [Xpert]Default fonts for menus, dialogues, etc
Date: Tue, 04 Dec 2001 14:30:16 -0200 (BRDT)
User-agent: IMP/PHP IMAP webmail program 2.2.7

Quoting Richard Stallman <address@hidden>:

  Hi,

>       Xaw uses the resources XtDefaultBackground and
> XtDefaultForeground,
> 
> I am confused.  I thought a resource was something like
> emacs.foreground that you can specify in .Xdefaults etc.
> XtDefaultBackground looks like a function or variable name.  What is
> it really?

  Sorry, I didn't make myself clear. In xc/lib/Xt/Core.c, one field of the
default resources of the core widget is:
    {XtNbackground, XtCBackground, XtRPixel,sizeof(Pixel),
         XtOffsetOf(CoreRec,core.background_pixel),
         XtRString, (XtPointer)"XtDefaultBackground"},

  And in xc/lib/Xt/Converters.c:XtCvtStringToPixel()
    if (CompareISOLatin1(str, XtDefaultBackground) == 0) {
        *closure_ret = False;
        if (pd->rv) donestr(Pixel, BlackPixelOfScreen(screen), XtRPixel)
        else        donestr(Pixel, WhitePixelOfScreen(screen), XtRPixel);
    }

  XtDefaultForeground is just the string "XtDefaultForeground".


>     Athena, it will be a simple rectangular window with white-color
> background,
>     black-color foreground, and 1 pixel black-color border.
> 
> That approach might work for LessTif and Motif as well, but we would
> have to check.
> 
> Is there any chance you could tell us for LessTif and/or Motif?

  I don't have too much knowledge about Motif and Lesstif, but in a quicky
look at the sources, it seens to use a more sofisticated resolution of the 
default colors, calling function to resolve the default Pixel values.

  In Primitive.c:
    {
        XmNbackground, XmCBackground, XmRPixel,
        sizeof(Pixel), XtOffsetOf(XmPrimitiveRec, core.background_pixel),
        XmRCallProc, (XtPointer)_XmBackgroundColorDefault
    },

  See lib/Xm/Visual.c for the function _XmBackgroundColorDefault.

Paulo



reply via email to

[Prev in Thread] Current Thread [Next in Thread]