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.294 by sasha, Fri Aug 17 22:01:33 2007 UTC vs.
Revision 1.304 by sasha, Wed Sep 12 19:51:41 2007 UTC

99 ***************************************************************************** 99 *****************************************************************************
100 * PROTOTYPES 100 * PROTOTYPES
101 ***************************************************************************** 101 *****************************************************************************
102 */ 102 */
103// main.C 103// main.C
104RETSIGTYPE rxvt_Child_signal (int sig) NOTHROW;
105RETSIGTYPE rxvt_Exit_signal (int sig) NOTHROW;
106void rxvt_clean_exit () NOTHROW;
107void * rxvt_malloc (size_t size); 104void * rxvt_malloc (size_t size);
108void * rxvt_calloc (size_t number, size_t size); 105void * rxvt_calloc (size_t number, size_t size);
109void * rxvt_realloc (void *ptr, size_t size); 106void * rxvt_realloc (void *ptr, size_t size);
110 107
111// misc.C 108// misc.C
114char * rxvt_wcstoutf8 (const wchar_t *str, int len = -1); 111char * rxvt_wcstoutf8 (const wchar_t *str, int len = -1);
115wchar_t * rxvt_utf8towcs (const char *str, int len = -1); 112wchar_t * rxvt_utf8towcs (const char *str, int len = -1);
116 113
117#define rxvt_strdup(s) ((s) ? strdup(s) : 0) 114#define rxvt_strdup(s) ((s) ? strdup(s) : 0)
118 115
119char * rxvt_r_basename (const char *str) NOTHROW; 116char * rxvt_basename (const char *str) NOTHROW;
120void rxvt_vlog (const char *fmt, va_list arg_ptr) NOTHROW; 117void rxvt_vlog (const char *fmt, va_list arg_ptr) NOTHROW;
121void rxvt_log (const char *fmt,...) NOTHROW; 118void rxvt_log (const char *fmt,...) NOTHROW;
122void rxvt_warn (const char *fmt,...) NOTHROW; 119void rxvt_warn (const char *fmt,...) NOTHROW;
123void rxvt_fatal (const char *fmt, ...) THROW ((class rxvt_failure_exception)) NORETURN; 120void rxvt_fatal (const char *fmt, ...) THROW ((class rxvt_failure_exception)) NORETURN;
124void rxvt_exit_failure () THROW ((class rxvt_failure_exception)) NORETURN; 121void rxvt_exit_failure () THROW ((class rxvt_failure_exception)) NORETURN;
125 122
126int rxvt_Str_match (const char *s1, const char *s2) NOTHROW;
127const char * rxvt_Str_skip_space (const char *str) NOTHROW;
128char * rxvt_Str_trim (char *str) NOTHROW; 123char * rxvt_strtrim (char *str) NOTHROW;
129int rxvt_Str_escaped (char *str) NOTHROW;
130char ** rxvt_splitcommastring (const char *cs) NOTHROW; 124char ** rxvt_splitcommastring (const char *cs) NOTHROW;
131void rxvt_freecommastring (char **cs) NOTHROW; 125void rxvt_freecommastring (char **cs) NOTHROW;
132 126
133///////////////////////////////////////////////////////////////////////////// 127/////////////////////////////////////////////////////////////////////////////
134 128
135// temporarily replace the process environment 129// temporarily replace the process environment
136extern char **environ; 130extern char **environ;
137extern char **rxvt_environ; // the original environ pointer 131extern char **rxvt_environ; // the original environ pointer
138 132
139inline void set_environ (stringvec *envv) 133static inline void set_environ (stringvec *envv)
140{ 134{
141#if ENABLE_PERL 135#if ENABLE_PERL
142 assert (envv); 136 assert (envv);
143#else 137#else
144 if (envv) 138 if (envv)
145#endif 139#endif
146 environ = (char **)envv->begin (); 140 environ = (char **)envv->begin ();
147} 141}
148 142
149inline void set_environ (char **envv) 143static inline void set_environ (char **envv)
150{ 144{
151#if ENABLE_PERL 145#if ENABLE_PERL
152 assert (envv); 146 assert (envv);
153#else 147#else
154 if (envv) 148 if (envv)
181 propScale = (1UL<<1), 175 propScale = (1UL<<1),
182 geometryFlags = (geometrySet|propScale), 176 geometryFlags = (geometrySet|propScale),
183 177
184 tintSet = (1UL<<8), 178 tintSet = (1UL<<8),
185 tintNeeded = (1UL<<9), 179 tintNeeded = (1UL<<9),
180 tintWholesome = (1UL<<10),
186 tintServerSide = (1UL<<10), 181 tintServerSide = (1UL<<11),
187 tintFlags = (tintSet|tintServerSide|tintNeeded), 182 tintFlags = (tintSet|tintServerSide|tintNeeded|tintWholesome),
188 blurNeeded = (1UL<<11), 183 blurNeeded = (1UL<<12),
184 blurServerSide = (1UL<<13), /* this don't work yet */
189 185
190 isTransparent = (1UL<<16), 186 isTransparent = (1UL<<16),
191 isInvalid = (1UL<<17) 187 isInvalid = (1UL<<17),
188 isVtOrigin = (1UL<<18) /* if set pixmap has origin at corner of
189 vt window instead of parent[0]! */
192 }; 190 };
193 191
194 unsigned long flags; 192 unsigned long flags;
195 193
196 enum { 194 enum {
247 Pixmap pixmap; 245 Pixmap pixmap;
248 unsigned int pmap_width, pmap_height; 246 unsigned int pmap_width, pmap_height;
249 unsigned int pmap_depth; 247 unsigned int pmap_depth;
250 248
251 bool window_size_sensitive (); 249 bool window_size_sensitive ();
250 bool window_position_sensitive () {
251 return (flags & isTransparent);
252 };
253
254 bool is_parentOrigin () {
255 return !(flags & isVtOrigin);
256 };
257
252 bool need_client_side_rendering (); 258 bool need_client_side_rendering ();
253 void apply (); 259 void apply ();
254 bool render (); 260 bool render ();
255 void invalidate () { 261 void invalidate () {
256 if (!(flags & isInvalid)) 262 if (!(flags & isInvalid))
698#define PrivMode_LFNL (1UL<<19) 704#define PrivMode_LFNL (1UL<<19)
699/* too annoying to implement X11 highlight tracking */ 705/* too annoying to implement X11 highlight tracking */
700/* #define PrivMode_MouseX11Track (1LU<<20) */ 706/* #define PrivMode_MouseX11Track (1LU<<20) */
701 707
702#define PrivMode_mouse_report (PrivMode_MouseX10|PrivMode_MouseX11) 708#define PrivMode_mouse_report (PrivMode_MouseX10|PrivMode_MouseX11)
703#define PrivMode(test,bit) \
704 if (test) \
705 priv_modes |= (bit); \
706 else \
707 priv_modes &= ~(bit)
708 709
709#ifdef ALLOW_132_MODE 710#ifdef ALLOW_132_MODE
710# define PrivMode_Default (PrivMode_Autowrap|PrivMode_ShiftKeys|PrivMode_VisibleCursor|PrivMode_132OK) 711# define PrivMode_Default (PrivMode_Autowrap|PrivMode_ShiftKeys|PrivMode_VisibleCursor|PrivMode_132OK)
711#else 712#else
712# define PrivMode_Default (PrivMode_Autowrap|PrivMode_ShiftKeys|PrivMode_VisibleCursor) 713# define PrivMode_Default (PrivMode_Autowrap|PrivMode_ShiftKeys|PrivMode_VisibleCursor)
969 rxvt_perl_term perl; 970 rxvt_perl_term perl;
970#endif 971#endif
971 struct mbstate mbstate; // current input multibyte state 972 struct mbstate mbstate; // current input multibyte state
972 973
973 unsigned char want_refresh:1, 974 unsigned char want_refresh:1,
974#ifdef ENABLE_TRANSPARENCY
975 want_full_refresh:1, /* awaiting full screen refresh */
976#endif
977 current_screen:1, /* primary or secondary */ 975 current_screen:1, /* primary or secondary */
978 num_scr_allow:1, 976 num_scr_allow:1,
979 bypass_keystate:1, 977 bypass_keystate:1,
980#ifdef CURSOR_BLINK 978#ifdef CURSOR_BLINK
981 hidden_cursor:1, 979 hidden_cursor:1,
1076 char * incr_buf; 1074 char * incr_buf;
1077 size_t incr_buf_size, incr_buf_fill; 1075 size_t incr_buf_size, incr_buf_fill;
1078/* ---------- */ 1076/* ---------- */
1079 Cursor leftptr_cursor; 1077 Cursor leftptr_cursor;
1080/* ---------- */ 1078/* ---------- */
1081#ifndef NO_BACKSPACE_KEY
1082 const char *key_backspace;
1083#endif
1084#ifndef NO_DELETE_KEY
1085 const char *key_delete;
1086#endif
1087 struct mouse_event MEvent; 1079 struct mouse_event MEvent;
1088 XComposeStatus compose; 1080 XComposeStatus compose;
1089 ttymode_t tio; 1081 ttymode_t tio;
1090 row_col_t oldcursor; 1082 row_col_t oldcursor;
1091#ifdef HAVE_BG_PIXMAP 1083#ifdef HAVE_BG_PIXMAP
1397 { 1389 {
1398 if (set) 1390 if (set)
1399 options[opt >> 3] |= (1 << (opt & 7)); 1391 options[opt >> 3] |= (1 << (opt & 7));
1400 else 1392 else
1401 options[opt >> 3] &= ~(1 << (opt & 7)); 1393 options[opt >> 3] &= ~(1 << (opt & 7));
1394 }
1395
1396 void PrivMode (int set, unsigned bit) NOTHROW
1397 {
1398 if (set)
1399 priv_modes |= bit;
1400 else
1401 priv_modes &= ~bit;
1402 } 1402 }
1403 1403
1404 void scr_blank_line (line_t &l, unsigned int col, unsigned int width, rend_t efs) const NOTHROW; 1404 void scr_blank_line (line_t &l, unsigned int col, unsigned int width, rend_t efs) const NOTHROW;
1405 void scr_blank_screen_mem (line_t &l, rend_t efs) const NOTHROW; 1405 void scr_blank_screen_mem (line_t &l, rend_t efs) const NOTHROW;
1406 int scr_scroll_text (int row1, int row2, int count) NOTHROW; 1406 int scr_scroll_text (int row1, int row2, int count) NOTHROW;
1516 // xpm.C 1516 // xpm.C
1517 void get_window_origin (int &x, int &y); 1517 void get_window_origin (int &x, int &y);
1518 Pixmap get_pixmap_property (int prop_id); 1518 Pixmap get_pixmap_property (int prop_id);
1519}; 1519};
1520 1520
1521/*
1522 *****************************************************************************
1523 * PROTOTYPES
1524 *****************************************************************************
1525 */
1526#ifdef PROTOTYPES
1527# define __PROTO(p) p
1528#else
1529# define __PROTO(p) ()
1530#endif
1531
1532#endif /* _RXVT_H_ */ 1521#endif /* _RXVT_H_ */
1533 1522

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines