Thread View: gnu.epoch.misc
1 messages
1 total messages
Started by Alan M. Carroll
Thu, 20 Jun 1991 13:36
UNOFFICIAL style patch
Author: Alan M. Carroll
Date: Thu, 20 Jun 1991 13:36
Date: Thu, 20 Jun 1991 13:36
102 lines
4382 bytes
4382 bytes
Here is a diff file that will patch ./src/button.c. What it does is
allow a style color to be set to t in addition to an X-pixel resource
or nil. A value of t indicates the the current screen value should be
used, instead of a fixed color. So, to get an underline in the
foreground color on all screens (even if they have different colors),
just (set-style-underline s t).
Now, I give you fair warning - this is not official, which means that
support for it may be lacking even more than for official patches.
This will probably be included in the next official patch, due out
Real Soon Now :-)
*** button.c.orig Tue Jun 11 13:16:54 1991
--- button.c Tue Jun 18 08:27:03 1991
***************
*** 789,795 ****
(style,value) Lisp_Object style,value;\
{\
CHECK_STYLE(style,0);\
! XSTYLE(style)->field = EQ(Qnil,value) ? value : conversion(value);\
return style;\
}
#define STYLE_GET_FUNCTION(field) \
--- 789,797 ----
(style,value) Lisp_Object style,value;\
{\
CHECK_STYLE(style,0);\
! if (EQ(Qnil, value)) XSTYLE(style)->field = Qnil;\
! else if (EQ(Qt, value)) XSTYLE(style)->field = Qt;\
! else XSTYLE(style)->field = conversion(value);\
return style;\
}
#define STYLE_GET_FUNCTION(field) \
***************
*** 922,929 ****
--- 924,935 ----
case 0 : /* text */
if (XRESOURCEP(s->foreground))
gcv.foreground = XXRESOURCE(s->foreground)->id;
+ else if (EQ(Qt, s->foreground)) gcv.foreground = xs->foreground;
+
if (XRESOURCEP(s->background))
gcv.background = XXRESOURCE(s->background)->id;
+ else if (EQ(Qt, s->background)) gcv.background = xs->background;
+
break;
case 1 : /* cursor */
***************
*** 930,935 ****
--- 936,943 ----
/* cursor foreground */
if (XRESOURCEP(s->cursor_foreground))
gcv.foreground = XXRESOURCE(s->cursor_foreground)->id;
+ else if (EQ(Qt, s->cursor_foreground))
+ gcv.foreground = xs->cursor_color;
else if (XRESOURCEP(s->background))
gcv.foreground = XXRESOURCE(s->background)->id;
***************
*** 936,941 ****
--- 944,951 ----
/* cursor background */
if (XRESOURCEP(s->cursor_background))
gcv.background = XXRESOURCE(s->cursor_background)->id;
+ else if (EQ(Qt, s->cursor_background))
+ gcv.background = xs->foreground;
else if (XRESOURCEP(s->foreground))
gcv.background = XXRESOURCE(s->foreground)->id;
break;
***************
*** 1015,1025 ****
count*xs->font_width,xs->font_height);
XDrawString(xs->display,xs->xid,theGC,x,y,str,count);
! if (XRESOURCEP(s->underline))
{
int uy = (y - xs->font_base) + xs->font_height - 1;
! gcv.foreground = XXRESOURCE(s->underline)->id;
gcv.line_style = LineSolid; gcv.line_width = 0;
gcv.fill_style = FillSolid;
gcmask = GCForeground + GCLineStyle + GCLineWidth + GCFillStyle;
--- 1025,1036 ----
count*xs->font_width,xs->font_height);
XDrawString(xs->display,xs->xid,theGC,x,y,str,count);
! if (XRESOURCEP(s->underline) || EQ(Qt, s->underline))
{
int uy = (y - xs->font_base) + xs->font_height - 1;
! gcv.foreground = EQ(Qt, s->underline)
! ? xs->foreground : XXRESOURCE(s->underline)->id;
gcv.line_style = LineSolid; gcv.line_width = 0;
gcv.fill_style = FillSolid;
gcmask = GCForeground + GCLineStyle + GCLineWidth + GCFillStyle;
--
Alan M. Carroll <-- Another casualty of applied metaphysics
Epoch Development Team
Urbana Il. "I hate shopping with the reality-impaired" - Susan
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads