diff options
author | jim <empty> | 1989-10-03 12:41:09 +0000 |
---|---|---|
committer | jim <empty> | 1989-10-03 12:41:09 +0000 |
commit | cf9cc9780bc46a68ff773ebc0bc9ad793861114b (patch) | |
tree | ddd5079ae288fef6e5156315af8f874c56d14beb /xc/programs | |
parent | 01d88a533bdf170467045b5903e543b0b3188201 (diff) |
add pointerColorBackground
Diffstat (limited to 'xc/programs')
-rw-r--r-- | xc/programs/xterm/Tekproc.c | 10 | ||||
-rw-r--r-- | xc/programs/xterm/charproc.c | 43 | ||||
-rw-r--r-- | xc/programs/xterm/main.c | 14 | ||||
-rw-r--r-- | xc/programs/xterm/menu.c | 3 | ||||
-rw-r--r-- | xc/programs/xterm/ptyx.h | 3 | ||||
-rw-r--r-- | xc/programs/xterm/util.c | 32 |
6 files changed, 47 insertions, 58 deletions
diff --git a/xc/programs/xterm/Tekproc.c b/xc/programs/xterm/Tekproc.c index ade2cda28..e8fe1f235 100644 --- a/xc/programs/xterm/Tekproc.c +++ b/xc/programs/xterm/Tekproc.c @@ -1,5 +1,5 @@ /* - * $XConsortium: Tekproc.c,v 1.64 89/08/10 14:07:18 jim Exp $ + * $XConsortium: Tekproc.c,v 1.65 89/09/21 17:54:13 jim Exp $ * * Warning, there be crufty dragons here. */ @@ -110,7 +110,7 @@ extern long time(); #define unput(c) *Tpushback++ = c #ifndef lint -static char rcs_id[] = "$XConsortium: Tekproc.c,v 1.64 89/08/10 14:07:18 jim Exp $"; +static char rcs_id[] = "$XConsortium: Tekproc.c,v 1.65 89/09/21 17:54:13 jim Exp $"; #endif /* lint */ extern Widget toplevel; @@ -328,9 +328,9 @@ Tekparse() /* Do Tek GIN mode */ screen->TekGIN = &TekRecord->ptr[-1]; /* Set cross-hair cursor raster array */ - if (GINcursor = + if (GINcursor = make_colored_cursor (XC_tcross, screen->mousecolor, - term->core.background_pixel)) + screen->mousecolorback)) XDefineCursor (screen->display, TShellWindow, GINcursor); Tparsestate = Tbyptable; /* Bypass mode */ @@ -747,7 +747,7 @@ dorefresh() if (wait_cursor == None) wait_cursor = make_colored_cursor (XC_watch, screen->mousecolor, - term->core.background_pixel); + screen->mousecolorback); XDefineCursor(screen->display, TShellWindow, wait_cursor); XFlush(screen->display); if(!setjmp(Tekjump)) diff --git a/xc/programs/xterm/charproc.c b/xc/programs/xterm/charproc.c index 3711102f5..13b0afd60 100644 --- a/xc/programs/xterm/charproc.c +++ b/xc/programs/xterm/charproc.c @@ -1,5 +1,5 @@ /* - * $XConsortium: charproc.c,v 1.95 89/09/07 15:17:32 swick Exp $ + * $XConsortium: charproc.c,v 1.96 89/09/21 17:53:49 jim Exp $ */ @@ -86,6 +86,7 @@ static void VTallocbuf(); #define XtNloginShell "loginShell" #define XtNmarginBell "marginBell" #define XtNpointerColor "pointerColor" +#define XtNpointerColorBackground "pointerColorBackground" #define XtNpointerShape "pointerShape" #define XtNmultiClickTime "multiClickTime" #define XtNmultiScroll "multiScroll" @@ -139,7 +140,7 @@ static void VTallocbuf(); #define doinput() (bcnt-- > 0 ? *bptr++ : in_put()) #ifndef lint -static char rcs_id[] = "$XConsortium: charproc.c,v 1.95 89/09/07 15:17:32 swick Exp $"; +static char rcs_id[] = "$XConsortium: charproc.c,v 1.96 89/09/21 17:53:49 jim Exp $"; #endif /* lint */ static long arg; @@ -264,13 +265,13 @@ static XtResource resources[] = { XtRBoolean, (caddr_t) &defaultTRUE}, {XtNbackground, XtCBackground, XtRPixel, sizeof(Pixel), XtOffset(XtermWidget, core.background_pixel), - XtRString, "White"}, + XtRString, "XtDefaultBackground"}, {XtNforeground, XtCForeground, XtRPixel, sizeof(Pixel), XtOffset(XtermWidget, screen.foreground), - XtRString, "Black"}, + XtRString, "XtDefaultForeground"}, {XtNcursorColor, XtCForeground, XtRPixel, sizeof(Pixel), XtOffset(XtermWidget, screen.cursorcolor), - XtRString, "Black"}, + XtRString, "XtDefaultForeground"}, {XtNeightBitInput, XtCEightBitInput, XtRBoolean, sizeof(Boolean), XtOffset(XtermWidget, screen.eight_bits), XtRBoolean, (caddr_t) &defaultTRUE}, @@ -306,7 +307,10 @@ static XtResource resources[] = { XtRBoolean, (caddr_t) &defaultFALSE}, {XtNpointerColor, XtCForeground, XtRPixel, sizeof(Pixel), XtOffset(XtermWidget, screen.mousecolor), - XtRString, "Black"}, + XtRString, "XtDefaultForeground"}, +{XtNpointerColorBackground, XtCBackground, XtRPixel, sizeof(Pixel), + XtOffset(XtermWidget, screen.mousecolorback), + XtRString, "XtDefaultBackground"}, {XtNpointerShape,XtCCursor, XtRCursor, sizeof(Cursor), XtOffset(XtermWidget, screen.pointer_cursor), XtRString, (caddr_t) "xterm"}, @@ -1928,6 +1932,7 @@ static void VTInitialize (request, new) new->screen.logfile = request->screen.logfile; new->screen.marginbell = request->screen.marginbell; new->screen.mousecolor = request->screen.mousecolor; + new->screen.mousecolorback = request->screen.mousecolorback; new->screen.multiscroll = request->screen.multiscroll; new->screen.nmarginbell = request->screen.nmarginbell; new->screen.savelines = request->screen.savelines; @@ -1961,12 +1966,14 @@ static void VTInitialize (request, new) if (new->misc.re_verse) { unsigned long fg = new->screen.foreground; unsigned long bg = new->core.background_pixel; + unsigned long tmp = new->screen.mousecolor; - if (new->screen.mousecolor == fg) new->screen.mousecolor = bg; if (new->screen.cursorcolor == fg) new->screen.cursorcolor = bg; if (new->core.border_pixel == fg) new->core.border_pixel = bg; new->screen.foreground = bg; new->core.background_pixel = fg; + new->screen.mousecolor = new->screen.mousecolorback; + new->screen.mousecolorback = tmp; } new->keyboard.flags = 0; @@ -2054,21 +2061,13 @@ XSetWindowAttributes *values; screen->fnt_norm->descent; /* making cursor */ - { - unsigned long fg, bg; - - bg = term->core.background_pixel; - if (screen->mousecolor == term->core.background_pixel) { - fg = screen->foreground; - } else { - fg = screen->mousecolor; - } - - if (!screen->pointer_cursor) - screen->pointer_cursor = make_colored_cursor (XC_xterm, fg, bg); - else - recolor_cursor (screen->pointer_cursor, fg, bg); - } + if (!screen->pointer_cursor) + screen->pointer_cursor = make_colored_cursor (XC_xterm, + screen->mousecolor, + screen->mousecolorback); + else + recolor_cursor (screen->pointer_cursor, + screen->mousecolor, screen->mousecolorback); scrollbar_width = (term->misc.scrollbar ? screen->scrollWidget->core.width : 0); diff --git a/xc/programs/xterm/main.c b/xc/programs/xterm/main.c index f9867f6b9..345393137 100644 --- a/xc/programs/xterm/main.c +++ b/xc/programs/xterm/main.c @@ -1,5 +1,5 @@ #ifndef lint -static char rcs_id[] = "$XConsortium: main.c,v 1.125 89/08/10 14:07:32 jim Exp $"; +static char rcs_id[] = "$XConsortium: main.c,v 1.126 89/08/16 11:13:50 jim Exp $"; #endif /* lint */ /* @@ -917,15 +917,9 @@ get_terminal () { register TScreen *screen = &term->screen; - { - unsigned long fg, bg; - - fg = screen->mousecolor; - bg = (screen->mousecolor == term->core.background_pixel) ? - screen->foreground : term->core.background_pixel; - - screen->arrow = make_colored_cursor (XC_left_ptr, fg, bg); - } + screen->arrow = make_colored_cursor (XC_left_ptr, + screen->mousecolor, + screen->mousecolorback); } /* diff --git a/xc/programs/xterm/menu.c b/xc/programs/xterm/menu.c index 287d5b01f..e15e76189 100644 --- a/xc/programs/xterm/menu.c +++ b/xc/programs/xterm/menu.c @@ -5,6 +5,7 @@ #include <X11/Shell.h> #include <X11/Xaw/SimpleMenu.h> #include <X11/Xaw/BSBMenuEnt.h> +#include <X11/Xaw/LineMenuEn.h> #include "ptyx.h" #include <setjmp.h> /* for data.h */ #include "data.h" @@ -200,7 +201,7 @@ static Widget create_menu (xtw, toplevel, name, entries, nentries) entries->widget = XtCreateManagedWidget (entries->name, (entries->function ? bSBMenuEntryObjectClass : - menuEntryObjectClass), m, + lineMenuEntryObjectClass), m, &arg, (Cardinal) 1); } diff --git a/xc/programs/xterm/ptyx.h b/xc/programs/xterm/ptyx.h index 2a5e80d8f..312ffa1e9 100644 --- a/xc/programs/xterm/ptyx.h +++ b/xc/programs/xterm/ptyx.h @@ -1,5 +1,5 @@ /* - * $XConsortium: ptyx.h,v 1.31 89/05/30 19:01:18 jim Exp $ + * $XConsortium: ptyx.h,v 1.32 89/07/21 16:11:45 jim Exp $ */ #include <X11/copyright.h> @@ -213,6 +213,7 @@ typedef struct { Pixel foreground; /* foreground color */ Pixel cursorcolor; /* Cursor color */ Pixel mousecolor; /* Mouse color */ + Pixel mousecolorback; /* Mouse color background */ int border; /* inner border */ Cursor arrow; /* arrow cursor */ unsigned short send_mouse_pos; /* user wants mouse transition */ diff --git a/xc/programs/xterm/util.c b/xc/programs/xterm/util.c index 4bef11ecd..9c142311b 100644 --- a/xc/programs/xterm/util.c +++ b/xc/programs/xterm/util.c @@ -1,5 +1,5 @@ /* - * $XConsortium: util.c,v 1.14 89/05/25 15:12:30 jim Exp $ + * $XConsortium: util.c,v 1.15 89/05/26 11:48:16 jim Exp $ */ #include <X11/copyright.h> @@ -30,7 +30,7 @@ /* util.c */ #ifndef lint -static char rcs_id[] = "$XConsortium: util.c,v 1.14 89/05/25 15:12:30 jim Exp $"; +static char rcs_id[] = "$XConsortium: util.c,v 1.15 89/05/26 11:48:16 jim Exp $"; #endif /* lint */ #include <stdio.h> @@ -887,18 +887,20 @@ ReverseVideo (term) XtermWidget term; { register TScreen *screen = &term->screen; - register GC tmpGC; - register int tmp; - register Window tek = TWindow(screen); + GC tmpGC; + Window tek = TWindow(screen); + unsigned long tmp; tmp = term->core.background_pixel; if(screen->cursorcolor == screen->foreground) screen->cursorcolor = tmp; - if(screen->mousecolor == screen->foreground) - screen->mousecolor = tmp; term->core.background_pixel = screen->foreground; screen->foreground = tmp; + tmp = screen->mousecolorback; + screen->mousecolorback = screen->mousecolor; + screen->mousecolor = tmp; + tmpGC = screen->normalGC; screen->normalGC = screen->reverseGC; screen->reverseGC = tmpGC; @@ -907,19 +909,11 @@ ReverseVideo (term) screen->normalboldGC = screen->reverseboldGC; screen->reverseboldGC = tmpGC; - { - unsigned long fg, bg; - bg = term->core.background_pixel; - if (screen->mousecolor == term->core.background_pixel) { - fg = screen->foreground; - } else { - fg = screen->mousecolor; - } - - recolor_cursor (screen->pointer_cursor, fg, bg); - recolor_cursor (screen->arrow, fg, bg); + recolor_cursor (screen->pointer_cursor, + screen->mousecolor, screen->mousecolorback); + recolor_cursor (screen->arrow, + screen->mousecolor, screen->mousecolorback); - } term->misc.re_verse = !term->misc.re_verse; XDefineCursor(screen->display, TextWindow(screen), screen->pointer_cursor); |