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.439 by sf-exg, Thu Apr 7 12:19:41 2011 UTC vs.
Revision 1.448 by sf-exg, Wed Aug 31 22:39:49 2011 UTC

125#endif 125#endif
126 126
127#ifndef EXIT_SUCCESS /* missing from <stdlib.h> */ 127#ifndef EXIT_SUCCESS /* missing from <stdlib.h> */
128# define EXIT_SUCCESS 0 /* exit function success */ 128# define EXIT_SUCCESS 0 /* exit function success */
129# define EXIT_FAILURE 1 /* exit function failure */ 129# define EXIT_FAILURE 1 /* exit function failure */
130#endif
131
132#ifndef PATH_MAX
133# define PATH_MAX 16384
134#endif 130#endif
135 131
136/****************************************************************************/ 132/****************************************************************************/
137 133
138// exception thrown on fatal (per-instance) errors 134// exception thrown on fatal (per-instance) errors
161 157
162const char * rxvt_basename (const char *str) NOTHROW; 158const char * rxvt_basename (const char *str) NOTHROW;
163void rxvt_vlog (const char *fmt, va_list arg_ptr) NOTHROW; 159void rxvt_vlog (const char *fmt, va_list arg_ptr) NOTHROW;
164void rxvt_log (const char *fmt,...) NOTHROW; 160void rxvt_log (const char *fmt,...) NOTHROW;
165void rxvt_warn (const char *fmt,...) NOTHROW; 161void rxvt_warn (const char *fmt,...) NOTHROW;
166void rxvt_fatal (const char *fmt, ...) THROW ((class rxvt_failure_exception)) NORETURN; 162void rxvt_fatal (const char *fmt, ...) THROW ((class rxvt_failure_exception)) ecb_noreturn;
167void rxvt_exit_failure () THROW ((class rxvt_failure_exception)) NORETURN; 163void rxvt_exit_failure () THROW ((class rxvt_failure_exception)) ecb_noreturn;
168 164
169char * rxvt_strtrim (char *str) NOTHROW; 165char * rxvt_strtrim (char *str) NOTHROW;
170char ** rxvt_strsplit (char delim, const char *str) NOTHROW; 166char ** rxvt_strsplit (char delim, const char *str) NOTHROW;
171 167
172static inline void 168static inline void
308# define NSCREENS 0 304# define NSCREENS 0
309#else 305#else
310# define NSCREENS 1 306# define NSCREENS 1
311#endif 307#endif
312 308
313/* special (internal) prefix for font commands */
314#define FONT_CMD '#'
315#define FONT_DN "#-"
316#define FONT_UP "#+"
317
318/* flags for rxvt_scr_gotorc () */ 309/* flags for rxvt_term::scr_gotorc () */
319enum { 310enum {
320 C_RELATIVE = 1, /* col movement is relative */ 311 C_RELATIVE = 1, /* col movement is relative */
321 R_RELATIVE = 2, /* row movement is relative */ 312 R_RELATIVE = 2, /* row movement is relative */
322 RELATIVE = C_RELATIVE | R_RELATIVE, 313 RELATIVE = C_RELATIVE | R_RELATIVE,
323}; 314};
324 315
325/* modes for rxvt_scr_insdel_chars (), rxvt_scr_insdel_lines () */ 316/* modes for rxvt_term::scr_insdel_chars (), rxvt_term::scr_insdel_lines () */
326enum { 317enum {
327 INSERT = -1, /* don't change these values */ 318 INSERT = -1, /* don't change these values */
328 DELETE = +1, 319 DELETE = +1,
329 ERASE = +2, 320 ERASE = +2,
330}; 321};
331 322
332/* modes for rxvt_scr_page () - scroll page. used by scrollbar window */ 323/* modes for rxvt_term::scr_page () - scroll page. used by scrollbar window */
333enum page_dirn { 324enum page_dirn {
334 UP, 325 UP,
335 DN, 326 DN,
336 NO_DIR, 327 NO_DIR,
337}; 328};
338 329
339/* arguments for rxvt_scr_change_screen () */ 330/* arguments for rxvt_term::scr_change_screen () */
340enum { 331enum {
341 PRIMARY = 0, 332 PRIMARY = 0,
342 SECONDARY, 333 SECONDARY,
343}; 334};
344 335
676 667
677#define GET_ATTR(x) (((x) & RS_attrMask)) 668#define GET_ATTR(x) (((x) & RS_attrMask))
678// return attributes defining the background, encoding doesn't matter 669// return attributes defining the background, encoding doesn't matter
679// depends on RS_fgShift > RS_bgShift 670// depends on RS_fgShift > RS_bgShift
680#define GET_BGATTR(x) \ 671#define GET_BGATTR(x) \
681 (expect_false ((x) & RS_RVid) \ 672 (ecb_unlikely ((x) & RS_RVid) \
682 ? (((x) & (RS_attrMask & ~RS_RVid)) \ 673 ? (((x) & (RS_attrMask & ~RS_RVid)) \
683 | (((x) & RS_fgMask) >> (RS_fgShift - RS_bgShift))) \ 674 | (((x) & RS_fgMask) >> (RS_fgShift - RS_bgShift))) \
684 : ((x) & (RS_attrMask | RS_bgMask))) 675 : ((x) & (RS_attrMask | RS_bgMask)))
685#define SET_FGCOLOR(x,fg) (((x) & ~RS_fgMask) | ((fg) << RS_fgShift)) 676#define SET_FGCOLOR(x,fg) (((x) & ~RS_fgMask) | ((fg) << RS_fgShift))
686#define SET_BGCOLOR(x,bg) (((x) & ~RS_bgMask) | ((bg) << RS_bgShift)) 677#define SET_BGCOLOR(x,bg) (((x) & ~RS_bgMask) | ((bg) << RS_bgShift))
886 int fwidth; /* font width [pixels] */ 877 int fwidth; /* font width [pixels] */
887 int fheight; /* font height [pixels] */ 878 int fheight; /* font height [pixels] */
888 int fbase; /* font ascent (baseline) [pixels] */ 879 int fbase; /* font ascent (baseline) [pixels] */
889 int ncol; /* window columns [characters] */ 880 int ncol; /* window columns [characters] */
890 int nrow; /* window rows [characters] */ 881 int nrow; /* window rows [characters] */
891 int focus; /* window has focus */ 882 bool focus; /* window has focus */
892 int mapped; /* window state mapped? */ 883 bool mapped; /* window state mapped? */
893 int int_bwidth; /* internal border width */ 884 int int_bwidth; /* internal border width */
894 int ext_bwidth; /* external border width */ 885 int ext_bwidth; /* external border width */
895 int lineSpace; /* number of extra pixels between rows */ 886 int lineSpace; /* number of extra pixels between rows */
896 int letterSpace; /* number of extra pixels between columns */ 887 int letterSpace; /* number of extra pixels between columns */
897 int saveLines; /* number of lines that fit in scrollback */ 888 int saveLines; /* number of lines that fit in scrollback */
990 scrollBar_t scrollBar; 981 scrollBar_t scrollBar;
991 uint8_t options[(Opt_count + 7) >> 3]; 982 uint8_t options[(Opt_count + 7) >> 3];
992 XSizeHints szHint; 983 XSizeHints szHint;
993 rxvt_color *pix_colors; 984 rxvt_color *pix_colors;
994 Cursor TermWin_cursor; /* cursor for vt window */ 985 Cursor TermWin_cursor; /* cursor for vt window */
995 line_t *row_buf; // all lines, scrollback + terminal, circular, followed by temp_buf 986 line_t *row_buf; // all lines, scrollback + terminal, circular
996 line_t *drawn_buf; // text on screen 987 line_t *drawn_buf; // text on screen
997 line_t *swap_buf; // lines for swap buffer 988 line_t *swap_buf; // lines for swap buffer
998 char *tabs; /* per location: 1 == tab-stop */ 989 char *tabs; /* per location: 1 == tab-stop */
999 screen_t screen; 990 screen_t screen;
1000 screen_t swap; 991 screen_t swap;
1110 1101
1111 BG_EFFECTS_FLAGS = BG_NEEDS_TINT | BG_NEEDS_BLUR, 1102 BG_EFFECTS_FLAGS = BG_NEEDS_TINT | BG_NEEDS_BLUR,
1112 1103
1113 BG_PROP_SCALE = 1 << 3, 1104 BG_PROP_SCALE = 1 << 3,
1114 BG_ROOT_ALIGN = 1 << 4, 1105 BG_ROOT_ALIGN = 1 << 4,
1106 BG_TILE = 1 << 14,
1115 BG_GEOMETRY_FLAGS = BG_PROP_SCALE | BG_ROOT_ALIGN, 1107 BG_GEOMETRY_FLAGS = BG_PROP_SCALE | BG_ROOT_ALIGN | BG_TILE,
1116 1108
1117 BG_TINT_SET = 1 << 5, 1109 BG_TINT_SET = 1 << 5,
1118 BG_TINT_BITAND = 1 << 6, 1110 BG_TINT_BITAND = 1 << 6,
1119 BG_TINT_FLAGS = BG_NEEDS_TINT | BG_TINT_BITAND, 1111 BG_TINT_FLAGS = BG_NEEDS_TINT | BG_TINT_BITAND,
1120 1112
1350 void im_set_size (XRectangle &size); 1342 void im_set_size (XRectangle &size);
1351 void im_set_position (XPoint &pos) NOTHROW; 1343 void im_set_position (XPoint &pos) NOTHROW;
1352 void im_set_color (unsigned long &fg, unsigned long &bg); 1344 void im_set_color (unsigned long &fg, unsigned long &bg);
1353 void im_set_preedit_area (XRectangle &preedit_rect, XRectangle &status_rect, const XRectangle &needed_rect); 1345 void im_set_preedit_area (XRectangle &preedit_rect, XRectangle &status_rect, const XRectangle &needed_rect);
1354 1346
1355 bool IMisRunning (); 1347 bool im_is_running ();
1356 void IMSendSpot (); 1348 void im_send_spot ();
1357 bool IM_get_IC (const char *modifiers); 1349 bool im_get_ic (const char *modifiers);
1358 void IMSetPosition (); 1350 void im_set_position ();
1359#endif 1351#endif
1360 1352
1361 // command.C 1353 // command.C
1362 void key_press (XKeyEvent &ev); 1354 void key_press (XKeyEvent &ev);
1363 void key_release (XKeyEvent &ev); 1355 void key_release (XKeyEvent &ev);
1498 return options[opt >> 3] & (1 << (opt & 7)); 1490 return options[opt >> 3] & (1 << (opt & 7));
1499 } 1491 }
1500 1492
1501 void set_option (uint8_t opt, bool set = true) NOTHROW; 1493 void set_option (uint8_t opt, bool set = true) NOTHROW;
1502 1494
1503 void set_privmode (unsigned bit, int set) NOTHROW
1504 {
1505 if (set)
1506 priv_modes |= bit;
1507 else
1508 priv_modes &= ~bit;
1509 }
1510
1511 // modifies first argument(!) 1495 // modifies first argument(!)
1512 void tt_paste (char *data, unsigned int len) NOTHROW; 1496 void tt_paste (char *data, unsigned int len) NOTHROW;
1513 void paste (char *data, unsigned int len) NOTHROW; 1497 void paste (char *data, unsigned int len) NOTHROW;
1514 void scr_blank_line (line_t &l, unsigned int col, unsigned int width, rend_t efs) const NOTHROW; 1498 void scr_blank_line (line_t &l, unsigned int col, unsigned int width, rend_t efs) const NOTHROW;
1515 void scr_blank_screen_mem (line_t &l, rend_t efs) const NOTHROW; 1499 void scr_blank_screen_mem (line_t &l, rend_t efs) const NOTHROW;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines