ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/rxvt-unicode/src/rxvt.h
(Generate patch)

Comparing rxvt-unicode/src/rxvt.h (file contents):
Revision 1.78 by root, Mon Jul 26 18:01:19 2004 UTC vs.
Revision 1.91 by root, Fri Aug 13 18:38:23 2004 UTC

9 9
10#include <X11/cursorfont.h> 10#include <X11/cursorfont.h>
11#include <X11/keysym.h> 11#include <X11/keysym.h>
12#include <X11/keysymdef.h> 12#include <X11/keysymdef.h>
13#include <X11/Xatom.h> 13#include <X11/Xatom.h>
14#ifndef NO_FRILLS
15#include <X11/Xmd.h>
16#endif
14 17
15#include "encoding.h" 18#include "encoding.h"
16#include "defaultfont.h" 19#include "defaultfont.h"
17#include "rxvtcolor.h" 20#include "rxvtcolor.h"
18#include "iom.h" 21#include "iom.h"
131#define BOUND_POSITIVE_INT16(val) \ 134#define BOUND_POSITIVE_INT16(val) \
132 (int16_t) ((val) <= 0 \ 135 (int16_t) ((val) <= 0 \
133 ? 0 \ 136 ? 0 \
134 : min ((val), (((uint16_t)-1)>>1))) 137 : min ((val), (((uint16_t)-1)>>1)))
135 138
139#ifndef NO_FRILLS
140typedef struct _mwmhints {
141 CARD32 flags;
142 CARD32 functions;
143 CARD32 decorations;
144 INT32 input_mode;
145 CARD32 status;
146} MWMHints;
147#endif
148
136/* 149/*
137 ***************************************************************************** 150 *****************************************************************************
138 * NORMAL DEFINES 151 * NORMAL DEFINES
139 ***************************************************************************** 152 *****************************************************************************
140 */ 153 */
172#define menuBar_esc 10 185#define menuBar_esc 10
173#define scrollBar_esc 30 186#define scrollBar_esc 30
174#define menuBar_margin 2 /* margin below text */ 187#define menuBar_margin 2 /* margin below text */
175 188
176#if defined(RXVT_SCROLLBAR) || defined(NEXT_SCROLLBAR) || defined(XTERM_SCROLLBAR) || defined(PLAIN_SCROLLBAR) 189#if defined(RXVT_SCROLLBAR) || defined(NEXT_SCROLLBAR) || defined(XTERM_SCROLLBAR) || defined(PLAIN_SCROLLBAR)
177# define HAVE_SCROLLBARS 190# define HAVE_SCROLLBARS 1
178#endif 191#endif
179 192
180/* width of scrollBar, menuBar shadow, must be 1 or 2 */ 193/* width of scrollBar, menuBar shadow, must be 1 or 2 */
181#ifdef HALFSHADOW 194#ifdef HALFSHADOW
182# define SHADOW 1 195# define SHADOW 1
266enum { 279enum {
267 NO_REFRESH = 0 , /* Window not visible at all! */ 280 NO_REFRESH = 0 , /* Window not visible at all! */
268 FAST_REFRESH = 1<<0, /* Fully exposed window */ 281 FAST_REFRESH = 1<<0, /* Fully exposed window */
269 SLOW_REFRESH = 1<<1, /* Partially exposed window */ 282 SLOW_REFRESH = 1<<1, /* Partially exposed window */
270 SMOOTH_REFRESH = 1<<2, /* Do sync'ing to make it smooth */ 283 SMOOTH_REFRESH = 1<<2, /* Do sync'ing to make it smooth */
271#if 0
272 REFRESH_BOUNDS = 1<<3
273#endif
274 REFRESH_BOUNDS = 0 /* only required for old int_bwidth code. */ //TODO: remove this and all depending code
275}; 284};
276 285
277#ifdef NO_SECONDARY_SCREEN 286#ifdef NO_SECONDARY_SCREEN
278# define NSCREENS 0 287# define NSCREENS 0
279#else 288#else
533 Rs_transparent_all, 542 Rs_transparent_all,
534#endif 543#endif
535#ifndef NO_FRILLS 544#ifndef NO_FRILLS
536 Rs_ext_bwidth, 545 Rs_ext_bwidth,
537 Rs_int_bwidth, 546 Rs_int_bwidth,
547 Rs_borderLess,
538#endif 548#endif
539 Rs_scrollBar_thickness, 549 Rs_scrollBar_thickness,
540#ifndef NO_LINESPACE 550#ifndef NO_LINESPACE
541 Rs_lineSpace, 551 Rs_lineSpace,
542#endif 552#endif
553 Rs_secondaryScreen, 563 Rs_secondaryScreen,
554 Rs_secondaryScroll, 564 Rs_secondaryScroll,
555#endif 565#endif
556#ifndef NO_BOLD_UNDERLINE_REVERSE 566#ifndef NO_BOLD_UNDERLINE_REVERSE
557 Rs_realBold, 567 Rs_realBold,
568#endif
569#ifdef OFF_FOCUS_FADING
570 Rs_fade,
571#endif
572#ifdef TINTING
573 Rs_shade,
558#endif 574#endif
559 NUM_RESOURCES 575 NUM_RESOURCES
560}; 576};
561 577
562// see init.C:xa_names, which must be kept in sync 578// see init.C:xa_names, which must be kept in sync
617# define PrivMode_Default (PrivMode_Autowrap|PrivMode_aplKP|PrivMode_ShiftKeys|PrivMode_VisibleCursor|PrivMode_132OK) 633# define PrivMode_Default (PrivMode_Autowrap|PrivMode_aplKP|PrivMode_ShiftKeys|PrivMode_VisibleCursor|PrivMode_132OK)
618#else 634#else
619# define PrivMode_Default (PrivMode_Autowrap|PrivMode_aplKP|PrivMode_ShiftKeys|PrivMode_VisibleCursor) 635# define PrivMode_Default (PrivMode_Autowrap|PrivMode_aplKP|PrivMode_ShiftKeys|PrivMode_VisibleCursor)
620#endif 636#endif
621 637
622#define XDEPTH display->depth 638// do not change these constants lightly, there are many interdependencies
623#define XCMAP display->cmap
624#define XVISUAL display->visual
625
626#define IMBUFSIZ 128 // input modifier buffer sizes 639#define IMBUFSIZ 128 // input modifier buffer sizes
627#define KBUFSZ 512 // size of keyboard mapping buffer 640#define KBUFSZ 512 // size of keyboard mapping buffer
628#define CBUFSIZ 4096 // size of command buffer 641#define CBUFSIZ 4096 // size of command buffer
629#define UBUFSIZ 4096 // character buffer 642#define UBUFSIZ 4096 // character buffer
630 643
631#ifndef PATH_MAX 644#ifndef PATH_MAX
632# define PATH_MAX 16384 645# define PATH_MAX 16384
633#endif 646#endif
647
648/* Motif window hints */
649#define MWM_HINTS_FUNCTIONS (1L << 0)
650#define MWM_HINTS_DECORATIONS (1L << 1)
651#define MWM_HINTS_INPUT_MODE (1L << 2)
652#define MWM_HINTS_STATUS (1L << 3)
653/* bit definitions for MwmHints.functions */
654#define MWM_FUNC_ALL (1L << 0)
655#define MWM_FUNC_RESIZE (1L << 1)
656#define MWM_FUNC_MOVE (1L << 2)
657#define MWM_FUNC_MINIMIZE (1L << 3)
658#define MWM_FUNC_MAXIMIZE (1L << 4)
659#define MWM_FUNC_CLOSE (1L << 5)
660/* bit definitions for MwmHints.decorations */
661#define MWM_DECOR_ALL (1L << 0)
662#define MWM_DECOR_BORDER (1L << 1)
663#define MWM_DECOR_RESIZEH (1L << 2)
664#define MWM_DECOR_TITLE (1L << 3)
665#define MWM_DECOR_MENU (1L << 4)
666#define MWM_DECOR_MINIMIZE (1L << 5)
667#define MWM_DECOR_MAXIMIZE (1L << 6)
668/* bit definitions for MwmHints.inputMode */
669#define MWM_INPUT_MODELESS 0
670#define MWM_INPUT_PRIMARY_APPLICATION_MODAL 1
671#define MWM_INPUT_SYSTEM_MODAL 2
672#define MWM_INPUT_FULL_APPLICATION_MODAL 3
673#define PROP_MWM_HINTS_ELEMENTS 5
634 674
635/* 675/*
636 ***************************************************************************** 676 *****************************************************************************
637 * MACRO DEFINES 677 * MACRO DEFINES
638 ***************************************************************************** 678 *****************************************************************************
956#if defined(MOUSE_WHEEL) && defined(MOUSE_SLIP_WHEELING) 996#if defined(MOUSE_WHEEL) && defined(MOUSE_SLIP_WHEELING)
957 mouse_slip_wheel_speed, 997 mouse_slip_wheel_speed,
958#endif 998#endif
959 refresh_count, 999 refresh_count,
960 refresh_limit, 1000 refresh_limit,
961 fnum, /* logical font number */
962 last_bot, /* scrollbar last bottom position */ 1001 last_bot, /* scrollbar last bottom position */
963 last_top, /* scrollbar last top position */ 1002 last_top, /* scrollbar last top position */
964 last_state, /* scrollbar last state */ 1003 last_state, /* scrollbar last state */
965 scrollbar_len, 1004 scrollbar_len,
966#ifdef MENUBAR 1005#ifdef MENUBAR
1109 rxvt_salloc *talloc; // text line allocator 1148 rxvt_salloc *talloc; // text line allocator
1110 rxvt_salloc *ralloc; // rend line allocator 1149 rxvt_salloc *ralloc; // rend line allocator
1111 1150
1112 static vector<rxvt_term *> termlist; // a vector of all running rxvt_term's 1151 static vector<rxvt_term *> termlist; // a vector of all running rxvt_term's
1113 1152
1153#ifndef NO_FRILLS
1154 // ISO 14755 entry support
1155 unicode_t iso14755buf;
1156 void commit_iso14755 ();
1157 int hex_keyval (XKeyEvent &ev);
1158#endif
1159
1114 void paste (const unsigned char *data, unsigned int len); 1160 void paste (const unsigned char *data, unsigned int len);
1115 1161
1116 void flush (); 1162 void flush ();
1117 1163
1164#if TRANSPARENT
1118 void rootwin_cb (XEvent &xev); 1165 void rootwin_cb (XEvent &xev);
1119 xevent_watcher rootwin_ev; 1166 xevent_watcher rootwin_ev;
1167#endif
1120 1168
1121 void x_cb (XEvent &xev); 1169 void x_cb (XEvent &xev);
1122 xevent_watcher termwin_ev; 1170 xevent_watcher termwin_ev;
1123 xevent_watcher vt_ev; 1171 xevent_watcher vt_ev;
1124#ifdef HAVE_SCROLLBARS 1172#ifdef HAVE_SCROLLBARS
1126#endif 1174#endif
1127#ifdef MENUBAR 1175#ifdef MENUBAR
1128 xevent_watcher menubar_ev; 1176 xevent_watcher menubar_ev;
1129#endif 1177#endif
1130 1178
1131 void check_cb (check_watcher &w); check_watcher check_ev; 1179 void check_cb (check_watcher &w); check_watcher check_ev;
1132 void destroy_cb (time_watcher &w); time_watcher destroy_ev; 1180 void destroy_cb (time_watcher &w); time_watcher destroy_ev;
1181 void flush_cb (time_watcher &w); time_watcher flush_ev;
1133 1182
1134 void pty_cb (io_watcher &w, short revents); io_watcher pty_ev; 1183 void pty_cb (io_watcher &w, short revents); io_watcher pty_ev;
1135 1184
1136 void incr_cb (time_watcher &w); time_watcher incr_ev; 1185 void incr_cb (time_watcher &w); time_watcher incr_ev;
1137 1186
1153#endif 1202#endif
1154 1203
1155#ifdef POINTER_BLANK 1204#ifdef POINTER_BLANK
1156 void pointer_cb (time_watcher &w); time_watcher pointer_ev; 1205 void pointer_cb (time_watcher &w); time_watcher pointer_ev;
1157 void pointer_blank (); 1206 void pointer_blank ();
1207#endif
1158 void pointer_unblank (); 1208 void pointer_unblank ();
1159#endif
1160 1209
1161 void tt_printf (const char *fmt,...); 1210 void tt_printf (const char *fmt,...);
1162 void tt_write (const unsigned char *data, unsigned int len); 1211 void tt_write (const unsigned char *data, unsigned int len);
1163 1212
1164 void tt_winch (); 1213 void tt_winch ();
1179 const char **init_resources (int argc, const char *const *argv); 1228 const char **init_resources (int argc, const char *const *argv);
1180 void init_env (); 1229 void init_env ();
1181 void set_locale (const char *locale); 1230 void set_locale (const char *locale);
1182 void init_xlocale (); 1231 void init_xlocale ();
1183 void init_command (const char *const *argv); 1232 void init_command (const char *const *argv);
1184 int run_command (const char *const *argv); 1233 void run_command (const char *const *argv);
1185 int run_child (const char *const *argv); 1234 int run_child (const char *const *argv);
1186 static void child_exited (int pid); 1235 static void child_exited (int pid);
1187 1236
1188 void color_aliases (int idx); 1237 void color_aliases (int idx);
1189 void recolour_cursor (); 1238 void recolour_cursor ();

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines