lynx-dev
[Top][All Lists]
Advanced

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

lynx-dev Scrollbar with SLang


From: Gisle Vanem
Subject: lynx-dev Scrollbar with SLang
Date: Sat, 10 Jun 2000 23:02:06 +0200 (CEST)

Currently it's not possible to define USE_SCROLLBAR with SLang. The
following patches fixes that.


--- lycurses.org.h        Fri Apr  7 01:18:52 2000
+++ lycurses.h            Sat Jun 10 21:18:36 2000
@@ -50,6 +51,22 @@
 #define WINDOW void
 #define waddstr(w,s) addstr(s)
 
+#ifndef ACS_UARROW  
+#define ACS_UARROW  SLSMG_UARROW_CHAR
+#endif
+
+#ifndef ACS_DARROW
+#define ACS_DARROW  SLSMG_DARROW_CHAR
+#endif
+
+#ifndef ACS_CKBOARD
+#define ACS_CKBOARD SLSMG_CKBRD_CHAR
+#endif
+
+#ifndef ACS_BLOCK
+#define ACS_BLOCK   SLSMG_BLOCK_CHAR
+#endif
+
 #else /* Using curses: */
 
 #ifdef VMS
@@ -218,6 +235,11 @@
 extern int LYlines;  /* replaces LINES */
 extern int LYcols;   /* replaces COLS */
 
+#if defined(USE_COLOR_TABLE) || defined(USE_SLANG)
+extern int Current_Attr;
+extern int Masked_Attr;
+#endif
+
 extern void start_curses NOPARAMS;
 extern void stop_curses NOPARAMS;
 extern BOOLEAN setup PARAMS((char *terminal));
@@ -316,9 +338,14 @@
 #define scrollok(a,b) SLsmg_Newline_Moves = ((b) ? 1 : -1)
 #endif
 
-#define addch SLsmg_write_char
+#define addch(ch)     SLsmg_write_char(ch)
+#define addch_raw(ch) do {                                \
+                        SLsmg_Char_Type buf;              \
+                        buf = (ch) | (Current_Attr << 4); \
+                        SLsmg_write_raw (&buf, 1);        \
+                      } while (0)
 #define echo()
-#define printw SLsmg_printf
+#define printw        SLsmg_printf
 
 extern int curscr;
 extern BOOLEAN FullRefresh;
@@ -451,6 +478,7 @@
 #define stop_underline()       /* nothing */
 #define stop_reverse()         standend()
 #define wstop_reverse(a)       wstandend(a)
+#define addch_raw(ch)           addch_raw(ch)
 
 #endif /* FANCY_CURSES */
 #endif /* USE_SLANG */

--- lycurses.org.c        Sat Jun  3 01:01:04 2000
+++ lycurses.c            Sat Jun 10 22:54:54 2000
@@ -56,8 +60,7 @@
 BOOLEAN LYCursesON = FALSE;
 
 #if USE_COLOR_TABLE || defined(USE_SLANG)
-PRIVATE int Current_Attr;
-PRIVATE int Masked_Attr;
+PUBLIC int Current_Attr, Masked_Attr;
 #endif
 
 #define OMIT_SCN_KEEPING 0 /* whether to omit keeping of Style_className

--- gridtext.org.c        Sat Jun  3 01:01:04 2000
+++ gridtext.c            Sat Jun 10 20:48:36 2000
@@ -1649,7 +1649,7 @@
        }
 #endif /* USE_COLOR_STYLE */
        move(1, LYcols - 1);
-       addch(ACS_UARROW);
+       addch_raw (ACS_UARROW);
 #ifdef USE_COLOR_STYLE
        LynxChangeStyle(s, STACK_OFF, 0);
 #endif /* USE_COLOR_STYLE */
@@ -1690,7 +1690,7 @@
        }
 #endif /* USE_COLOR_STYLE */
        move(h + 2, LYcols - 1);
-       addch(ACS_DARROW);
+       addch_raw (ACS_DARROW);
 #ifdef USE_COLOR_STYLE
        LynxChangeStyle(s, STACK_OFF, 0);
 #endif /* USE_COLOR_STYLE */

---------------------------


Gisle V.


; To UNSUBSCRIBE: Send "unsubscribe lynx-dev" to address@hidden

reply via email to

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