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.386 by root, Wed Mar 31 23:01:51 2010 UTC vs.
Revision 1.460 by sf-exg, Mon Jan 9 15:30:17 2012 UTC

27#else 27#else
28// stdlib.h might provide it 28// stdlib.h might provide it
29#endif 29#endif
30 30
31using namespace std; 31using namespace std;
32
33// we assume that Xlib.h defines XPointer, and it does since at least 1994...
32 34
33extern "C" { 35extern "C" {
34#include <X11/Xlib.h> 36#include <X11/Xlib.h>
35#include <X11/Xutil.h> 37#include <X11/Xutil.h>
36#include <X11/Xresource.h> 38#include <X11/Xresource.h>
72#include <X11/cursorfont.h> 74#include <X11/cursorfont.h>
73#include <X11/keysym.h> 75#include <X11/keysym.h>
74#include <X11/keysymdef.h> 76#include <X11/keysymdef.h>
75#include <X11/Xatom.h> 77#include <X11/Xatom.h>
76 78
79#ifdef HAVE_AFTERIMAGE
80# include <afterimage.h>
81# undef min
82# undef max
83#endif
84
85#ifdef HAVE_PIXBUF
86# include <gdk-pixbuf/gdk-pixbuf.h>
87#endif
88
89#if defined(BG_IMAGE_FROM_FILE) || defined(ENABLE_TRANSPARENCY)
90# define HAVE_BG_PIXMAP 1
91#endif
92
77#include "encoding.h" 93#include "encoding.h"
78#include "rxvtutil.h" 94#include "rxvtutil.h"
79#include "rxvtfont.h" 95#include "rxvtfont.h"
80#include "rxvttoolkit.h" 96#include "rxvttoolkit.h"
81#include "scrollbar.h" 97#include "scrollbar.h"
98 ***************************************************************************** 114 *****************************************************************************
99 * SYSTEM HACKS 115 * SYSTEM HACKS
100 ***************************************************************************** 116 *****************************************************************************
101 */ 117 */
102 118
103#ifndef HAVE_XPOINTER
104typedef char *XPointer;
105#endif
106
107#include <termios.h> 119#include <termios.h>
108
109#include "background.h"
110 120
111#ifndef STDIN_FILENO 121#ifndef STDIN_FILENO
112# define STDIN_FILENO 0 122# define STDIN_FILENO 0
113# define STDOUT_FILENO 1 123# define STDOUT_FILENO 1
114# define STDERR_FILENO 2 124# define STDERR_FILENO 2
115#endif 125#endif
116 126
117#ifndef EXIT_SUCCESS /* missing from <stdlib.h> */ 127#ifndef EXIT_SUCCESS /* missing from <stdlib.h> */
118# define EXIT_SUCCESS 0 /* exit function success */ 128# define EXIT_SUCCESS 0 /* exit function success */
119# define EXIT_FAILURE 1 /* exit function failure */ 129# define EXIT_FAILURE 1 /* exit function failure */
120#endif
121
122#ifndef PATH_MAX
123# define PATH_MAX 16384
124#endif 130#endif
125 131
126/****************************************************************************/ 132/****************************************************************************/
127 133
128// exception thrown on fatal (per-instance) errors 134// exception thrown on fatal (per-instance) errors
151 157
152const char * rxvt_basename (const char *str) NOTHROW; 158const char * rxvt_basename (const char *str) NOTHROW;
153void rxvt_vlog (const char *fmt, va_list arg_ptr) NOTHROW; 159void rxvt_vlog (const char *fmt, va_list arg_ptr) NOTHROW;
154void rxvt_log (const char *fmt,...) NOTHROW; 160void rxvt_log (const char *fmt,...) NOTHROW;
155void rxvt_warn (const char *fmt,...) NOTHROW; 161void rxvt_warn (const char *fmt,...) NOTHROW;
156void rxvt_fatal (const char *fmt, ...) THROW ((class rxvt_failure_exception)) NORETURN; 162void rxvt_fatal (const char *fmt, ...) THROW ((class rxvt_failure_exception)) ecb_noreturn;
157void rxvt_exit_failure () THROW ((class rxvt_failure_exception)) NORETURN; 163void rxvt_exit_failure () THROW ((class rxvt_failure_exception)) ecb_noreturn;
158 164
159char * rxvt_strtrim (char *str) NOTHROW; 165char * rxvt_strtrim (char *str) NOTHROW;
160char ** rxvt_splitcommastring (const char *cs) NOTHROW; 166char ** rxvt_strsplit (char delim, const char *str) NOTHROW;
161void rxvt_freecommastring (char **cs) NOTHROW; 167
168static inline void
169rxvt_free_strsplit (char **ptr) NOTHROW
170{
171 free (ptr[0]);
172 free (ptr);
173}
162 174
163void * rxvt_malloc (size_t size); 175void * rxvt_malloc (size_t size);
164void * rxvt_calloc (size_t number, size_t size); 176void * rxvt_calloc (size_t number, size_t size);
165void * rxvt_realloc (void *ptr, size_t size); 177void * rxvt_realloc (void *ptr, size_t size);
166 178
189#else 201#else
190 if (envv) 202 if (envv)
191#endif 203#endif
192 environ = envv; 204 environ = envv;
193} 205}
206
207struct localise_env
208{
209 char **orig_env;
210
211 localise_env (char **new_env)
212 {
213 orig_env = environ;
214 environ = new_env;
215 }
216
217 ~localise_env ()
218 {
219 environ = orig_env;
220 }
221};
194 222
195/* 223/*
196 ***************************************************************************** 224 *****************************************************************************
197 * STRUCTURES AND TYPEDEFS 225 * STRUCTURES AND TYPEDEFS
198 ***************************************************************************** 226 *****************************************************************************
247# define COLORTERMENVFULL COLORTERMENV "-xpm" 275# define COLORTERMENVFULL COLORTERMENV "-xpm"
248#else 276#else
249# define COLORTERMENVFULL COLORTERMENV 277# define COLORTERMENVFULL COLORTERMENV
250#endif 278#endif
251#ifndef TERMENV 279#ifndef TERMENV
280# if USE_256_COLORS
281# define TERMENV "rxvt-unicode-256color"
282# else
252# define TERMENV "rxvt-unicode" 283# define TERMENV "rxvt-unicode"
284# endif
253#endif 285#endif
254 286
255#if defined (NO_MOUSE_REPORT) && !defined (NO_MOUSE_REPORT_SCROLLBAR) 287#if defined (NO_MOUSE_REPORT) && !defined (NO_MOUSE_REPORT_SCROLLBAR)
256# define NO_MOUSE_REPORT_SCROLLBAR 1 288# define NO_MOUSE_REPORT_SCROLLBAR 1
257#endif 289#endif
272# define NSCREENS 0 304# define NSCREENS 0
273#else 305#else
274# define NSCREENS 1 306# define NSCREENS 1
275#endif 307#endif
276 308
277/* special (internal) prefix for font commands */
278#define FONT_CMD '#'
279#define FONT_DN "#-"
280#define FONT_UP "#+"
281
282/* flags for rxvt_scr_gotorc () */ 309/* flags for rxvt_term::scr_gotorc () */
283enum { 310enum {
284 C_RELATIVE = 1, /* col movement is relative */ 311 C_RELATIVE = 1, /* col movement is relative */
285 R_RELATIVE = 2, /* row movement is relative */ 312 R_RELATIVE = 2, /* row movement is relative */
286 RELATIVE = C_RELATIVE | R_RELATIVE, 313 RELATIVE = C_RELATIVE | R_RELATIVE,
287}; 314};
288 315
289/* modes for rxvt_scr_insdel_chars (), rxvt_scr_insdel_lines () */ 316/* modes for rxvt_term::scr_insdel_chars (), rxvt_term::scr_insdel_lines () */
290enum { 317enum {
291 INSERT = -1, /* don't change these values */ 318 INSERT = -1, /* don't change these values */
292 DELETE = +1, 319 DELETE = +1,
293 ERASE = +2, 320 ERASE = +2,
294}; 321};
295 322
296/* modes for rxvt_scr_page () - scroll page. used by scrollbar window */ 323/* modes for rxvt_term::scr_page () - scroll page. used by scrollbar window */
297enum page_dirn { 324enum page_dirn {
298 UP, 325 UP,
299 DN, 326 DN,
300 NO_DIR, 327 NO_DIR,
301}; 328};
302 329
303/* arguments for rxvt_scr_change_screen () */ 330/* arguments for rxvt_term::scr_change_screen () */
304enum { 331enum {
305 PRIMARY = 0, 332 PRIMARY = 0,
306 SECONDARY, 333 SECONDARY,
307}; 334};
308 335
336// define various rendition bits and masks. the rendition word
337// is 32 bits in size, and we should use it as efficiently as possible
338
309#define RS_None 0 339#define RS_None 0
310 340
311#define RS_fgMask 0x0000007fUL // 128 colors 341// GET_BGATTR depends on RS_fgShift > RS_bgShift
312#define RS_bgMask 0x00003f80UL // 128 colors 342#define RS_colorMask ((1UL << Color_Bits) - 1UL)
343#define RS_bgShift 0
344#define RS_fgShift (RS_bgShift + Color_Bits)
345#define RS_bgMask (RS_colorMask << RS_bgShift)
346#define RS_fgMask (RS_colorMask << RS_fgShift)
347
348// must have space for rxvt_fontset::fontCount * 2 + 2 values
349#define RS_fontShift (RS_fgShift + Color_Bits)
350#define RS_Careful (1UL << RS_fontShift) /* be careful when drawing these */
351#define RS_fontCount rxvt_fontset::fontCount
352#define RS_fontMask ((RS_fontCount << (RS_fontShift + 1)) | RS_Careful) // includes RS_Careful
353
354// toggle this to force redraw, must be != RS_Careful and otherwise "pretty neutral"
355#define RS_redraw (2UL << RS_fontShift)
356
357#define RS_Sel (1UL << 22)
358
359// 4 custom bits for extensions
360#define RS_customCount 16UL
361#define RS_customShift 23
362#define RS_customMask ((RS_customCount - 1UL) << RS_customShift)
313 363
314// font styles 364// font styles
315#define RS_Bold 0x00004000UL // value 1 365#define RS_Bold (1UL << RS_styleShift)
316#define RS_Italic 0x00008000UL // value 2 366#define RS_Italic (2UL << RS_styleShift)
367
368#define RS_styleCount 4
369#define RS_styleShift 27
370#define RS_styleMask (RS_Bold | RS_Italic)
317 371
318// fake styles 372// fake styles
319#define RS_Blink 0x00010000UL // blink 373#define RS_Blink (1UL << 29)
320#define RS_RVid 0x00020000UL // reverse video 374#define RS_RVid (1UL << 30) // reverse video
321#define RS_Uline 0x00040000UL // underline 375#define RS_Uline (1UL << 31) // underline
322
323// toggle this to force redraw, must be != RS_Careful and otherwise "pretty neutral"
324#define RS_redraw 0x02000000UL
325
326// 5 custom bits for extensions
327#define RS_customCount 16
328#define RS_customMask 0x00780000UL
329#define RS_customShift 19
330
331// must have space for rxvt_fontset::fontCount * 2 + 2 values
332#define RS_fontMask 0xf8000000UL // includes RS_Careful
333#define RS_fontShift 27
334#define RS_Careful 0x08000000UL /* be careful when drawing these */
335
336#define RS_styleCount 4
337#define RS_styleMask (RS_Bold | RS_Italic)
338#define RS_styleShift 14
339 376
340#define RS_baseattrMask (RS_Italic | RS_Bold | RS_Blink | RS_RVid | RS_Uline) 377#define RS_baseattrMask (RS_Italic | RS_Bold | RS_Blink | RS_RVid | RS_Uline)
341#define RS_attrMask (RS_baseattrMask | RS_fontMask) 378#define RS_attrMask (RS_baseattrMask | RS_fontMask)
342 379
343#define DEFAULT_RSTYLE (RS_None | Color_fg | (Color_bg << Color_Bits)) 380#define DEFAULT_RSTYLE (RS_None | (Color_fg << RS_fgShift) | (Color_bg << RS_bgShift))
344#define OVERLAY_RSTYLE (RS_None | Color_Black | (Color_Yellow << Color_Bits)) 381#define OVERLAY_RSTYLE (RS_None | (Color_Black << RS_fgShift) | (Color_Yellow << RS_bgShift))
345
346#define Sel_none 0 /* Not waiting */
347#define Sel_normal 0x01 /* normal selection */
348#define Sel_incr 0x02 /* incremental selection */
349#define Sel_direct 0x00
350#define Sel_Primary 0x01
351#define Sel_Secondary 0x02
352#define Sel_Clipboard 0x03
353#define Sel_whereMask 0x0f
354#define Sel_CompoundText 0x10 /* last request was COMPOUND_TEXT */
355#define Sel_UTF8String 0x20 /* last request was UTF8_STRING */
356 382
357enum { 383enum {
358 C0_NUL = 0x00, 384 C0_NUL = 0x00,
359 C0_SOH, C0_STX, C0_ETX, C0_EOT, C0_ENQ, C0_ACK, C0_BEL, 385 C0_SOH, C0_STX, C0_ETX, C0_EOT, C0_ENQ, C0_ACK, C0_BEL,
360 C0_BS , C0_HT , C0_LF , C0_VT , C0_FF , C0_CR , C0_SO , C0_SI , 386 C0_BS , C0_HT , C0_LF , C0_VT , C0_FF , C0_CR , C0_SO , C0_SI ,
378 XTerm_Color_cursor = 12, // change actual 'Cursor' color 404 XTerm_Color_cursor = 12, // change actual 'Cursor' color
379 XTerm_Color_pointer_fg = 13, // change actual 'Pointer' fg color 405 XTerm_Color_pointer_fg = 13, // change actual 'Pointer' fg color
380 XTerm_Color_pointer_bg = 14, // change actual 'Pointer' bg color 406 XTerm_Color_pointer_bg = 14, // change actual 'Pointer' bg color
381 XTerm_Color05 = 15, // not implemented (tektronix fg) 407 XTerm_Color05 = 15, // not implemented (tektronix fg)
382 XTerm_Color06 = 16, // not implemented (tektronix bg) 408 XTerm_Color06 = 16, // not implemented (tektronix bg)
383 XTerm_Color_RV = 17, // change actual 'Highlight' color 409 XTerm_Color_HC = 17, // change actual 'Highlight' bg color
410 XTerm_Color_HTC = 19, // change actual 'Highlight' fg color
384 XTerm_logfile = 46, // not implemented 411 XTerm_logfile = 46, // not implemented
385 XTerm_font = 50, 412 XTerm_font = 50,
386 413
387 XTerm_konsole30 = 30, // reserved for konsole 414 XTerm_konsole30 = 30, // reserved for konsole
388 XTerm_konsole31 = 31, // reserved for konsole 415 XTerm_konsole31 = 31, // reserved for konsole
390 /* 417 /*
391 * rxvt extensions of XTerm OSCs: ESC ] Ps;Pt (ST|BEL) 418 * rxvt extensions of XTerm OSCs: ESC ] Ps;Pt (ST|BEL)
392 */ 419 */
393 420
394 // deprecated 421 // deprecated
395 Rxvt_Color_BD = 18,
396 Rxvt_Color_UL = 19,
397 Rxvt_restoreFG = 39, 422 Rxvt_restoreFG = 39,
398 Rxvt_restoreBG = 49, 423 Rxvt_restoreBG = 49,
399 424
400 Rxvt_Pixmap = 20, // new bg pixmap 425 Rxvt_Pixmap = 20, // new bg pixmap
401 Rxvt_dumpscreen = 55, // dump scrollback and all of screen 426 Rxvt_dumpscreen = 55, // dump scrollback and all of screen
455 Color_White = maxBrightCOLOR, 480 Color_White = maxBrightCOLOR,
456#else 481#else
457 Color_White = maxCOLOR, 482 Color_White = maxCOLOR,
458#endif 483#endif
459 minTermCOLOR = Color_White + 1, 484 minTermCOLOR = Color_White + 1,
485#if USE_256_COLORS
486 maxTermCOLOR = Color_White + 240,
487#else
460 maxTermCOLOR = Color_White + 72, 488 maxTermCOLOR = Color_White + 72,
489#endif
461#ifndef NO_CURSORCOLOR 490#ifndef NO_CURSORCOLOR
462 Color_cursor, 491 Color_cursor,
463 Color_cursor2, 492 Color_cursor2,
464#endif 493#endif
465 Color_pointer_fg, 494 Color_pointer_fg,
474#if ENABLE_FRILLS 503#if ENABLE_FRILLS
475 Color_underline, 504 Color_underline,
476#endif 505#endif
477#ifdef OPTION_HC 506#ifdef OPTION_HC
478 Color_HC, 507 Color_HC,
508 Color_HTC,
479#endif 509#endif
480 Color_scroll, 510 Color_scroll,
481#ifdef RXVT_SCROLLBAR 511#ifdef RXVT_SCROLLBAR
482 Color_trough, 512 Color_trough,
483#endif 513#endif
495#else 525#else
496 TOTAL_COLORS = NRS_COLORS 526 TOTAL_COLORS = NRS_COLORS
497#endif 527#endif
498}; 528};
499 529
530#if USE_256_COLORS
531# define Color_Bits 9 // 0 .. maxTermCOLOR
532#else
500#define Color_Bits 7 // 0 .. maxTermCOLOR 533# define Color_Bits 7 // 0 .. maxTermCOLOR
534#endif
501 535
502/* 536/*
503 * Resource list 537 * Resource list
504 */ 538 */
505enum { 539enum {
533#define PrivMode_vt52 (1UL<<18) 567#define PrivMode_vt52 (1UL<<18)
534#define PrivMode_LFNL (1UL<<19) 568#define PrivMode_LFNL (1UL<<19)
535#define PrivMode_MouseBtnEvent (1UL<<20) 569#define PrivMode_MouseBtnEvent (1UL<<20)
536#define PrivMode_MouseAnyEvent (1UL<<21) 570#define PrivMode_MouseAnyEvent (1UL<<21)
537#define PrivMode_BracketPaste (1UL<<22) 571#define PrivMode_BracketPaste (1UL<<22)
572#define PrivMode_ExtModeMouse (1UL<<23) // xterm pseudo-utf-8 hack
573#define PrivMode_ExtMouseRight (1UL<<24) // xterm pseudo-utf-8, but works in non-utf-8-locales
538 574
539#define PrivMode_mouse_report (PrivMode_MouseX10|PrivMode_MouseX11|PrivMode_MouseBtnEvent|PrivMode_MouseAnyEvent) 575#define PrivMode_mouse_report (PrivMode_MouseX10|PrivMode_MouseX11|PrivMode_MouseBtnEvent|PrivMode_MouseAnyEvent)
540 576
541#ifdef ALLOW_132_MODE 577#ifdef ALLOW_132_MODE
542# define PrivMode_Default (PrivMode_Autowrap|PrivMode_ShiftKeys|PrivMode_VisibleCursor|PrivMode_132OK) 578# define PrivMode_Default (PrivMode_Autowrap|PrivMode_ShiftKeys|PrivMode_VisibleCursor|PrivMode_132OK)
593/* 629/*
594 ***************************************************************************** 630 *****************************************************************************
595 * MACRO DEFINES 631 * MACRO DEFINES
596 ***************************************************************************** 632 *****************************************************************************
597 */ 633 */
634
635// speed hack, copy some member variable into a local variable of the same name
598#define dLocal(type,name) type const name = this->name 636#define dLocal(type,name) type const name = this->name
599 637
600// for speed reasons, we assume that all codepoints 32 to 126 are 638// for speed reasons, we assume that all codepoints 32 to 126 are
601// single-width. 639// single-width.
602#define WCWIDTH(c) (IN_RANGE_INC (c, 0x20, 0x7e) ? 1 : wcwidth (c)) 640#define WCWIDTH(c) (IN_RANGE_INC (c, 0x20, 0x7e) ? 1 : wcwidth (c))
616 654
617#define LINENO(n) LINENO_of (this, n) 655#define LINENO(n) LINENO_of (this, n)
618#define ROW(n) ROW_of (this, n) 656#define ROW(n) ROW_of (this, n)
619 657
620/* how to build & extract colors and attributes */ 658/* how to build & extract colors and attributes */
621#define GET_BASEFG(x) (((x) & RS_fgMask)) 659#define GET_BASEFG(x) (((x) & RS_fgMask) >> RS_fgShift)
622#define GET_BASEBG(x) (((x) & RS_bgMask)>>Color_Bits) 660#define GET_BASEBG(x) (((x) & RS_bgMask) >> RS_bgShift)
623 661
624#define GET_FONT(x) (((x) & RS_fontMask) >> RS_fontShift) 662#define GET_FONT(x) (((x) & RS_fontMask) >> RS_fontShift)
625#define SET_FONT(x,fid) (((x) & ~RS_fontMask) | ((fid) << RS_fontShift)) 663#define SET_FONT(x,fid) (((x) & ~RS_fontMask) | ((fid) << RS_fontShift))
626 664
627#define GET_STYLE(x) (((x) & RS_styleMask) >> RS_styleShift) 665#define GET_STYLE(x) (((x) & RS_styleMask) >> RS_styleShift)
628#define SET_STYLE(x,style) (((x) & ~RS_styleMask) | ((style) << RS_styleShift)) 666#define SET_STYLE(x,style) (((x) & ~RS_styleMask) | ((style) << RS_styleShift))
629 667
630#define GET_ATTR(x) (((x) & RS_attrMask)) 668#define GET_ATTR(x) (((x) & RS_attrMask))
669// return attributes defining the background, encoding doesn't matter
670// depends on RS_fgShift > RS_bgShift
631#define GET_BGATTR(x) \ 671#define GET_BGATTR(x) \
672 (ecb_unlikely ((x) & RS_RVid) \
632 (((x) & RS_RVid) ? (((x) & (RS_attrMask & ~RS_RVid)) \ 673 ? (((x) & (RS_attrMask & ~RS_RVid)) \
633 | (((x) & RS_fgMask)<<Color_Bits)) \ 674 | (((x) & RS_fgMask) >> (RS_fgShift - RS_bgShift))) \
634 : ((x) & (RS_attrMask | RS_bgMask))) 675 : ((x) & (RS_attrMask | RS_bgMask)))
635#define SET_FGCOLOR(x,fg) (((x) & ~RS_fgMask) | (fg)) 676#define SET_FGCOLOR(x,fg) (((x) & ~RS_fgMask) | ((fg) << RS_fgShift))
636#define SET_BGCOLOR(x,bg) (((x) & ~RS_bgMask) | ((bg)<<Color_Bits)) 677#define SET_BGCOLOR(x,bg) (((x) & ~RS_bgMask) | ((bg) << RS_bgShift))
637#define SET_ATTR(x,a) (((x) & ~RS_attrMask) | (a)) 678#define SET_ATTR(x,a) (((x) & ~RS_attrMask) | (a))
638 679
639#define RS_SAME(a,b) (!(((a) ^ (b)) & ~RS_Careful)) 680#define RS_SAME(a,b) (!(((a) ^ (b)) & ~RS_Careful))
640 681
641#define PIXCOLOR_NAME(idx) rs[Rs_color + (idx)] 682#define PIXCOLOR_NAME(idx) rs[Rs_color + (idx)]
780{ 821{
781 int x, y, w, h; // overlay dimensions 822 int x, y, w, h; // overlay dimensions
782 text_t **text; 823 text_t **text;
783 rend_t **rend; 824 rend_t **rend;
784 825
785 // while tempting to add swap() etc. here, it effetcively only increases code size 826 // while tempting to add swap() etc. here, it effectively only increases code size
786}; 827};
787 828
788/* ------------------------------------------------------------------------- */ 829/* ------------------------------------------------------------------------- */
789 830
790typedef struct 831typedef struct
847 int saveLines; /* number of lines that fit in scrollback */ 888 int saveLines; /* number of lines that fit in scrollback */
848 int total_rows; /* total number of rows in this terminal */ 889 int total_rows; /* total number of rows in this terminal */
849 int term_start; /* term lines start here */ 890 int term_start; /* term lines start here */
850 int view_start; /* scrollback view starts here */ 891 int view_start; /* scrollback view starts here */
851 int top_row; /* topmost row index of scrollback */ 892 int top_row; /* topmost row index of scrollback */
852 Window parent[6]; /* parent identifiers - we're parent[0] */ 893 Window parent; /* parent identifier */
853 Window vt; /* vt100 window */ 894 Window vt; /* vt100 window */
854 GC gc; /* GC for drawing */ 895 GC gc; /* GC for drawing */
855 Pixmap pixmap; 896 Pixmap pixmap;
856 rxvt_drawable *drawable; 897 rxvt_drawable *drawable;
857 rxvt_fontset *fontset[4]; 898 rxvt_fontset *fontset[4];
922#define Screen_WrapNext (1<<4) /* need to wrap for next char? */ 963#define Screen_WrapNext (1<<4) /* need to wrap for next char? */
923#define Screen_DefaultFlags (Screen_VisibleCursor | Screen_Autowrap) 964#define Screen_DefaultFlags (Screen_VisibleCursor | Screen_Autowrap)
924 965
925/* rxvt_vars.options */ 966/* rxvt_vars.options */
926enum { 967enum {
927# define def(name,idx) Opt_ ## name = idx,
928# define nodef(name) Opt_ ## name = 0, 968# define def(name) Opt_ ## name,
969# define nodef(name) Opt_prev_ ## name, Opt_ ## name = 0, Opt_next_ ## name = Opt_prev_ ## name - 1,
970 Opt_0,
929# include "optinc.h" 971# include "optinc.h"
930# undef nodef 972# undef nodef
931# undef def 973# undef def
932Opt_count 974 Opt_count
933}; 975};
934 976
935/* ------------------------------------------------------------------------- */ 977/* ------------------------------------------------------------------------- */
936 978
937struct rxvt_vars : TermWin_t 979struct rxvt_vars : TermWin_t
939 scrollBar_t scrollBar; 981 scrollBar_t scrollBar;
940 uint8_t options[(Opt_count + 7) >> 3]; 982 uint8_t options[(Opt_count + 7) >> 3];
941 XSizeHints szHint; 983 XSizeHints szHint;
942 rxvt_color *pix_colors; 984 rxvt_color *pix_colors;
943 Cursor TermWin_cursor; /* cursor for vt window */ 985 Cursor TermWin_cursor; /* cursor for vt window */
944 int numlock_state;
945 line_t *row_buf; // all lines, scrollback + terminal, circular, followed by temp_buf 986 line_t *row_buf; // all lines, scrollback + terminal, circular
946 line_t *drawn_buf; // text on screen 987 line_t *drawn_buf; // text on screen
947 line_t *swap_buf; // lines for swap buffer 988 line_t *swap_buf; // lines for swap buffer
948 char *tabs; /* per location: 1 == tab-stop */ 989 char *tabs; /* per location: 1 == tab-stop */
949 screen_t screen; 990 screen_t screen;
950 screen_t swap; 991 screen_t swap;
991 seen_resize:1, /* whether we had a resize event */ 1032 seen_resize:1, /* whether we had a resize event */
992 parsed_geometry:1; 1033 parsed_geometry:1;
993 1034
994 unsigned char refresh_type, 1035 unsigned char refresh_type,
995#ifdef META8_OPTION 1036#ifdef META8_OPTION
996 meta_char, /* Alt-key prefix */ 1037 meta_char; /* Alt-key prefix */
997#endif 1038#endif
998 selection_wait,
999 selection_type;
1000/* ---------- */ 1039/* ---------- */
1001 bool rvideo_state, rvideo_mode; 1040 bool rvideo_state, rvideo_mode;
1002#ifndef NO_BELL 1041#ifndef NO_BELL
1003 bool rvideo_bell; 1042 bool rvideo_bell;
1004#endif 1043#endif
1032 allowedxerror; 1071 allowedxerror;
1033/* ---------- */ 1072/* ---------- */
1034 unsigned int ModLevel3Mask, 1073 unsigned int ModLevel3Mask,
1035 ModMetaMask, 1074 ModMetaMask,
1036 ModNumLockMask; 1075 ModNumLockMask;
1037 int old_width, /* last used width in screen resize */
1038 old_height; /* last used height in screen resize */
1039 unsigned long priv_modes, 1076 unsigned long priv_modes,
1040 SavedModes; 1077 SavedModes;
1041/* ---------- */ 1078/* ---------- */
1042 Atom *xa; 1079 Atom *xa;
1043/* ---------- */ 1080/* ---------- */
1044 Time selection_time, 1081 Time selection_time,
1045 selection_request_time,
1046 clipboard_time; 1082 clipboard_time;
1083 rxvt_selection *selection_req;
1047 pid_t cmd_pid; /* process id of child */ 1084 pid_t cmd_pid; /* process id of child */
1048 char * incr_buf;
1049 size_t incr_buf_size, incr_buf_fill;
1050/* ---------- */ 1085/* ---------- */
1051 struct mouse_event MEvent; 1086 struct mouse_event MEvent;
1052 XComposeStatus compose; 1087 XComposeStatus compose;
1053 struct termios tio; 1088 static struct termios def_tio;
1054 row_col_t oldcursor; 1089 row_col_t oldcursor;
1055#ifdef HAVE_BG_PIXMAP 1090#ifdef HAVE_BG_PIXMAP
1056 bgPixmap_t bgPixmap; 1091 void bg_init ();
1092 void bg_destroy ();
1093
1094 enum {
1095 //subset returned by make_transparency_pixmap
1096 BG_IS_VALID = 1 << 0,
1097 BG_NEEDS_TINT = 1 << 1,
1098 BG_NEEDS_BLUR = 1 << 2,
1099
1100 BG_EFFECTS_FLAGS = BG_NEEDS_TINT | BG_NEEDS_BLUR,
1101
1102 BG_KEEP_ASPECT = 1 << 3,
1103 BG_ROOT_ALIGN = 1 << 4,
1104 BG_TILE = 1 << 14,
1105 BG_GEOMETRY_FLAGS = BG_KEEP_ASPECT | BG_ROOT_ALIGN | BG_TILE,
1106
1107 BG_TINT_SET = 1 << 5,
1108 BG_TINT_BITAND = 1 << 6,
1109 BG_TINT_FLAGS = BG_NEEDS_TINT | BG_TINT_BITAND,
1110
1111 BG_HAS_RENDER = 1 << 7,
1112 BG_HAS_RENDER_CONV = 1 << 8,
1113 BG_CLIENT_RENDER = 1 << 9,
1114
1115 BG_IS_TRANSPARENT = 1 << 10,
1116 BG_NEEDS_REFRESH = 1 << 11,
1117 BG_IS_SIZE_SENSITIVE = 1 << 12,
1118 BG_IS_FROM_FILE = 1 << 13,
1119 };
1120
1121 unsigned int bg_flags;
1122
1123# ifdef BG_IMAGE_FROM_FILE
1124 void get_image_geometry (int image_width, int image_height, int &w, int &h, int &x, int &y);
1125 bool render_image (unsigned long tr_flags);
1126
1127 enum {
1128 noScale = 0,
1129 windowScale = 100,
1130 defaultScale = windowScale,
1131 centerAlign = 50,
1132 defaultAlign = centerAlign,
1133 };
1134
1135 unsigned int h_scale, v_scale; /* percents of the window size */
1136 int h_align, v_align; /* percents of the window size:
1137 0 - left align, 50 - center, 100 - right */
1138
1139 bool bg_set_geometry (const char *geom, bool update = false);
1140 void bg_set_default_geometry ()
1141 {
1142 h_scale = v_scale = defaultScale;
1143 h_align = v_align = defaultAlign;
1144 }
1145
1146 bool bg_set_file (const char *file);
1147# endif
1148
1149# ifdef ENABLE_TRANSPARENCY
1150 Pixmap root_pixmap; /* current root pixmap set */
1151 rxvt_color tint;
1152 int shade;
1153 int h_blurRadius, v_blurRadius;
1154
1155 bool bg_set_transparent ();
1156 void bg_set_root_pixmap ();
1157 void set_tint_shade_flags ();
1158 bool bg_set_tint (rxvt_color &new_tint);
1159 bool bg_set_shade (const char *shade_str);
1160 bool bg_set_blur (const char *geom);
1161
1162 bool blur_pixmap (Pixmap pixmap, Visual *visual, int width, int height);
1163 bool tint_pixmap (Pixmap pixmap, Visual *visual, int width, int height);
1164 void tint_ximage (Visual *visual, XImage *ximage);
1165 unsigned long make_transparency_pixmap ();
1166# endif
1167
1168 ev_tstamp bg_valid_since;
1169
1170 Pixmap bg_pixmap;
1171 unsigned int bg_pmap_width, bg_pmap_height;
1172
1173 int target_x;
1174 int target_y;
1175 bool bg_set_position (int x, int y);
1176 bool bg_window_size_sensitive ();
1177 bool bg_window_position_sensitive ();
1178
1179 bool bg_render ();
1180 void bg_invalidate ()
1181 {
1182 bg_flags &= ~BG_IS_VALID;
1183 }
1057#endif 1184#endif
1058#ifdef HAVE_AFTERIMAGE 1185#ifdef HAVE_AFTERIMAGE
1186 ASImage *original_asim;
1059 ASVisual *asv; 1187 ASVisual *asv;
1060 ASImageManager *asimman; 1188 ASImageManager *asimman;
1061 1189
1062 void init_asv () 1190 void init_asv ()
1063 { 1191 {
1064 if (!asv) 1192 if (!asv)
1065 asv = create_asvisual_for_id (dpy, display->screen, depth, XVisualIDFromVisual (visual), cmap, NULL); 1193 asv = create_asvisual_for_id (dpy, display->screen, depth, XVisualIDFromVisual (visual), cmap, NULL);
1066 } 1194 }
1195#endif
1196#ifdef HAVE_PIXBUF
1197 GdkPixbuf *pixbuf;
1198 bool pixbuf_to_pixmap (GdkPixbuf *pixbuf, Pixmap pixmap, GC gc,
1199 int src_x, int src_y, int dst_x, int dst_y,
1200 unsigned int width, unsigned int height);
1067#endif 1201#endif
1068 1202
1069#if ENABLE_OVERLAY 1203#if ENABLE_OVERLAY
1070 overlay_base ov; 1204 overlay_base ov;
1071 1205
1081 1215
1082 vector<void *> allocated; // free these memory blocks with free() 1216 vector<void *> allocated; // free these memory blocks with free()
1083 1217
1084 char env_windowid[21]; /* environmental variable WINDOWID */ 1218 char env_windowid[21]; /* environmental variable WINDOWID */
1085 char env_colorfgbg[sizeof ("COLORFGBG=default;default;bg") + 1]; 1219 char env_colorfgbg[sizeof ("COLORFGBG=default;default;bg") + 1];
1086 char *env_display; /* environmental variable DISPLAY */
1087 char *env_term; /* environmental variable TERM */
1088 1220
1089 char *locale; 1221 char *locale;
1090 char charsets[4]; 1222 char charsets[4];
1091 char *v_buffer; /* pointer to physical buffer */ 1223 char *v_buffer; /* pointer to physical buffer */
1092 unsigned int v_buflen; /* size of area to write */ 1224 unsigned int v_buflen; /* size of area to write */
1132 void rootwin_cb (XEvent &xev); 1264 void rootwin_cb (XEvent &xev);
1133 xevent_watcher rootwin_ev; 1265 xevent_watcher rootwin_ev;
1134#endif 1266#endif
1135#ifdef HAVE_BG_PIXMAP 1267#ifdef HAVE_BG_PIXMAP
1136 void update_background (); 1268 void update_background ();
1137#if TRACE_PIXMAPS
1138 void trace_update_background (const char *file, int line);
1139# define update_background() trace_update_background (__FILE__, __LINE__)
1140#endif
1141 void update_background_cb (ev::timer &w, int revents); 1269 void update_background_cb (ev::timer &w, int revents);
1142 ev::timer update_background_ev; 1270 ev::timer update_background_ev;
1143#endif 1271#endif
1144 1272
1145 void x_cb (XEvent &xev); 1273 void x_cb (XEvent &xev);
1150 void child_cb (ev::child &w, int revents); ev::child child_ev; 1278 void child_cb (ev::child &w, int revents); ev::child child_ev;
1151 void destroy_cb (ev::idle &w, int revents); ev::idle destroy_ev; 1279 void destroy_cb (ev::idle &w, int revents); ev::idle destroy_ev;
1152 void refresh_check (); 1280 void refresh_check ();
1153 void flush (); 1281 void flush ();
1154 void flush_cb (ev::timer &w, int revents); ev::timer flush_ev; 1282 void flush_cb (ev::timer &w, int revents); ev::timer flush_ev;
1283 void cmdbuf_reify ();
1284 void cmdbuf_append (const char *str, size_t count);
1155 bool pty_fill (); 1285 bool pty_fill ();
1156 void pty_cb (ev::io &w, int revents); ev::io pty_ev; 1286 void pty_cb (ev::io &w, int revents); ev::io pty_ev;
1157 void incr_cb (ev::timer &w, int revents) NOTHROW; ev::timer incr_ev;
1158 1287
1159#ifdef CURSOR_BLINK 1288#ifdef CURSOR_BLINK
1160 void cursor_blink_cb (ev::timer &w, int revents); ev::timer cursor_blink_ev; 1289 void cursor_blink_cb (ev::timer &w, int revents); ev::timer cursor_blink_ev;
1161#endif 1290#endif
1162#ifdef TEXT_BLINK 1291#ifdef TEXT_BLINK
1183 void pointer_unblank (); 1312 void pointer_unblank ();
1184 1313
1185 void tt_printf (const char *fmt,...); 1314 void tt_printf (const char *fmt,...);
1186 void tt_write (const char *data, unsigned int len); 1315 void tt_write (const char *data, unsigned int len);
1187 void pty_write (); 1316 void pty_write ();
1188
1189 void init (stringvec *argv, stringvec *envv)
1190 {
1191 this->argv = argv;
1192 init (argv->size (), argv->begin (), envv);
1193 }
1194 1317
1195 void make_current () const // make this the "currently active" urxvt instance 1318 void make_current () const // make this the "currently active" urxvt instance
1196 { 1319 {
1197 SET_R (this); 1320 SET_R (this);
1198 set_environ (envv); 1321 set_environ (envv);
1210 void im_set_size (XRectangle &size); 1333 void im_set_size (XRectangle &size);
1211 void im_set_position (XPoint &pos) NOTHROW; 1334 void im_set_position (XPoint &pos) NOTHROW;
1212 void im_set_color (unsigned long &fg, unsigned long &bg); 1335 void im_set_color (unsigned long &fg, unsigned long &bg);
1213 void im_set_preedit_area (XRectangle &preedit_rect, XRectangle &status_rect, const XRectangle &needed_rect); 1336 void im_set_preedit_area (XRectangle &preedit_rect, XRectangle &status_rect, const XRectangle &needed_rect);
1214 1337
1215 bool IMisRunning (); 1338 bool im_is_running ();
1216 void IMSendSpot (); 1339 void im_send_spot ();
1217 bool IM_get_IC (const char *modifiers); 1340 bool im_get_ic (const char *modifiers);
1218 void IMSetPosition (); 1341 void im_set_position ();
1219#endif 1342#endif
1220 1343
1221 // command.C 1344 // command.C
1222 void key_press (XKeyEvent &ev); 1345 void key_press (XKeyEvent &ev);
1223 void key_release (XKeyEvent &ev); 1346 void key_release (XKeyEvent &ev);
1224 unsigned int cmd_write (const char *str, unsigned int count);
1225 1347
1226 wchar_t next_char () NOTHROW; 1348 wchar_t next_char () NOTHROW;
1227 wchar_t cmd_getc () THROW ((class out_of_input)); 1349 wchar_t cmd_getc () THROW ((class out_of_input));
1228 uint32_t next_octet () NOTHROW; 1350 uint32_t next_octet () NOTHROW;
1229 uint32_t cmd_get8 () THROW ((class out_of_input)); 1351 uint32_t cmd_get8 () THROW ((class out_of_input));
1256 void process_color_seq (int report, int color, const char *str, char resp); 1378 void process_color_seq (int report, int color, const char *str, char resp);
1257 void process_xterm_seq (int op, char *str, char resp); 1379 void process_xterm_seq (int op, char *str, char resp);
1258 int privcases (int mode, unsigned long bit); 1380 int privcases (int mode, unsigned long bit);
1259 void process_terminal_mode (int mode, int priv, unsigned int nargs, const int *arg); 1381 void process_terminal_mode (int mode, int priv, unsigned int nargs, const int *arg);
1260 void process_sgr_mode (unsigned int nargs, const int *arg); 1382 void process_sgr_mode (unsigned int nargs, const int *arg);
1261 void process_graphics ();
1262 // init.C 1383 // init.C
1384 void init (stringvec *argv, stringvec *envv);
1385 void init (int argc, const char *const *argv, const char *const *envv);
1386 void init2 (int argc, const char *const *argv);
1263 void init_vars (); 1387 void init_vars ();
1264 const char **init_resources (int argc, const char *const *argv); 1388 const char **init_resources (int argc, const char *const *argv);
1265 void init (int argc, const char *const *argv, stringvec *envv);
1266 void init_env (); 1389 void init_env ();
1267 void set_locale (const char *locale); 1390 void set_locale (const char *locale);
1268 void init_xlocale (); 1391 void init_xlocale ();
1269 void init_command (const char *const *argv); 1392 void init_command (const char *const *argv);
1270 void run_command (const char *const *argv); 1393 void run_command (const char *const *argv);
1271 int run_child (const char *const *argv); 1394 int run_child (const char *const *argv);
1272 void color_aliases (int idx); 1395 void color_aliases (int idx);
1273 void create_windows (int argc, const char *const *argv); 1396 void create_windows (int argc, const char *const *argv);
1274 void get_colours (); 1397 void get_colours ();
1275 void get_ourmods (); 1398 void get_ourmods ();
1399 void set_icon (const char *file);
1276 // main.C 1400 // main.C
1277 void tt_winch (); 1401 void tt_winch ();
1278 rxvt_term (); 1402 rxvt_term ();
1279 ~rxvt_term (); 1403 ~rxvt_term ();
1280 void destroy (); 1404 void destroy ();
1282 void recolour_cursor (); 1406 void recolour_cursor ();
1283 void resize_all_windows (unsigned int newwidth, unsigned int newheight, int ignoreparent); 1407 void resize_all_windows (unsigned int newwidth, unsigned int newheight, int ignoreparent);
1284 void window_calc (unsigned int newwidth, unsigned int newheight); 1408 void window_calc (unsigned int newwidth, unsigned int newheight);
1285 bool set_fonts (); 1409 bool set_fonts ();
1286 void set_string_property (Atom prop, const char *str, int len = -1); 1410 void set_string_property (Atom prop, const char *str, int len = -1);
1411 void set_mbstring_property (Atom prop, const char *str, int len = -1);
1287 void set_utf8_property (Atom prop, const char *str, int len = -1); 1412 void set_utf8_property (Atom prop, const char *str, int len = -1);
1288 void set_title (const char *str); 1413 void set_title (const char *str);
1289 void set_icon_name (const char *str); 1414 void set_icon_name (const char *str);
1290 void set_window_color (int idx, const char *color); 1415 void set_window_color (int idx, const char *color);
1291 void set_colorfgbg (); 1416 void set_colorfgbg ();
1292 bool set_color (rxvt_color &color, const char *name); 1417 bool set_color (rxvt_color &color, const char *name);
1293 void alias_color (int dst, int src); 1418 void alias_color (int dst, int src);
1294 void set_widthheight (unsigned int newwidth, unsigned int newheight); 1419 void set_widthheight (unsigned int newwidth, unsigned int newheight);
1295 void get_window_origin (int &x, int &y); 1420 void get_window_origin (int &x, int &y);
1296 Pixmap get_pixmap_property (int prop_id); 1421 Pixmap get_pixmap_property (Atom property);
1297 1422
1298 // screen.C 1423 // screen.C
1299 1424
1300 void lalloc (line_t &l) const 1425 void lalloc (line_t &l) const
1301 { 1426 {
1331#ifndef NO_BRIGHTCOLOR 1456#ifndef NO_BRIGHTCOLOR
1332 if (r & RS_Bold 1457 if (r & RS_Bold
1333# if ENABLE_STYLES 1458# if ENABLE_STYLES
1334 && option (Opt_intensityStyles) 1459 && option (Opt_intensityStyles)
1335# endif 1460# endif
1336 && IN_RANGE_INC (base, minCOLOR, minBrightCOLOR)) 1461 && IN_RANGE_EXC (base, minCOLOR, minBrightCOLOR))
1337 base += minBrightCOLOR - minCOLOR; 1462 base += minBrightCOLOR - minCOLOR;
1338#endif 1463#endif
1339 return base; 1464 return base;
1340 } 1465 }
1341 1466
1345#ifndef NO_BRIGHTCOLOR 1470#ifndef NO_BRIGHTCOLOR
1346 if (r & RS_Blink 1471 if (r & RS_Blink
1347# if ENABLE_STYLES 1472# if ENABLE_STYLES
1348 && option (Opt_intensityStyles) 1473 && option (Opt_intensityStyles)
1349# endif 1474# endif
1350 && IN_RANGE_INC (base, minCOLOR, minBrightCOLOR)) 1475 && IN_RANGE_EXC (base, minCOLOR, minBrightCOLOR))
1351 base += minBrightCOLOR - minCOLOR; 1476 base += minBrightCOLOR - minCOLOR;
1352#endif 1477#endif
1353 return base; 1478 return base;
1354 } 1479 }
1355 1480
1356 bool option (uint8_t opt) const NOTHROW 1481 bool option (uint8_t opt) const NOTHROW
1357 { 1482 {
1358 if (!opt)
1359 return 0;
1360
1361 --opt;
1362 return options[opt >> 3] & (1 << (opt & 7)); 1483 return options[opt >> 3] & (1 << (opt & 7));
1363 } 1484 }
1364 1485
1365 void set_option (uint8_t opt, bool set = true) NOTHROW 1486 void set_option (uint8_t opt, bool set = true) NOTHROW;
1366 {
1367 if (!opt)
1368 return;
1369
1370 --opt;
1371 if (set)
1372 options[opt >> 3] |= (1 << (opt & 7));
1373 else
1374 options[opt >> 3] &= ~(1 << (opt & 7));
1375 }
1376
1377 void set_privmode (unsigned bit, int set) NOTHROW
1378 {
1379 if (set)
1380 priv_modes |= bit;
1381 else
1382 priv_modes &= ~bit;
1383 }
1384 1487
1385 // modifies first argument(!) 1488 // modifies first argument(!)
1489 void tt_paste (char *data, unsigned int len) NOTHROW;
1386 void paste (char *data, unsigned int len) NOTHROW; 1490 void paste (char *data, unsigned int len) NOTHROW;
1387 void scr_blank_line (line_t &l, unsigned int col, unsigned int width, rend_t efs) const NOTHROW; 1491 void scr_blank_line (line_t &l, unsigned int col, unsigned int width, rend_t efs) const NOTHROW;
1388 void scr_blank_screen_mem (line_t &l, rend_t efs) const NOTHROW; 1492 void scr_blank_screen_mem (line_t &l, rend_t efs) const NOTHROW;
1389 void scr_kill_char (line_t &l, int col) const NOTHROW; 1493 void scr_kill_char (line_t &l, int col) const NOTHROW;
1390 int scr_scroll_text (int row1, int row2, int count) NOTHROW; 1494 int scr_scroll_text (int row1, int row2, int count) NOTHROW;
1399 void scr_backindex () NOTHROW; 1503 void scr_backindex () NOTHROW;
1400 void scr_forwardindex () NOTHROW; 1504 void scr_forwardindex () NOTHROW;
1401#endif 1505#endif
1402 void scr_touch (bool refresh) NOTHROW; 1506 void scr_touch (bool refresh) NOTHROW;
1403 void scr_expose (int x, int y, int width, int height, bool refresh) NOTHROW; 1507 void scr_expose (int x, int y, int width, int height, bool refresh) NOTHROW;
1404 void scr_recolour () NOTHROW; 1508 void scr_recolour (bool refresh = true) NOTHROW;
1405 void scr_remap_chars () NOTHROW; 1509 void scr_remap_chars () NOTHROW;
1406 void scr_remap_chars (line_t &l) NOTHROW; 1510 void scr_remap_chars (line_t &l) NOTHROW;
1407 1511
1408 enum cursor_mode { SAVE, RESTORE }; 1512 enum cursor_mode { SAVE, RESTORE };
1409 1513
1444 void scr_xor_span (int beg_row, int beg_col, int end_row, int end_col, rend_t rstyle) NOTHROW; 1548 void scr_xor_span (int beg_row, int beg_col, int end_row, int end_col, rend_t rstyle) NOTHROW;
1445 void scr_reverse_selection () NOTHROW; 1549 void scr_reverse_selection () NOTHROW;
1446 void scr_dump (int fd) NOTHROW; 1550 void scr_dump (int fd) NOTHROW;
1447 1551
1448 void selection_check (int check_more) NOTHROW; 1552 void selection_check (int check_more) NOTHROW;
1449 void selection_paste (Window win, Atom prop, bool delete_prop) NOTHROW;
1450 void selection_property (Window win, Atom prop) NOTHROW;
1451 void selection_request (Time tm, int selnum = Sel_Primary) NOTHROW; 1553 void selection_request (Time tm, int selnum = Sel_Primary) NOTHROW;
1452 int selection_request_other (Atom target, int selnum) NOTHROW;
1453 void selection_clear (bool clipboard = false) NOTHROW; 1554 void selection_clear (bool clipboard = false) NOTHROW;
1454 void clipboard_copy (Time tm);
1455 void selection_make (Time tm); 1555 void selection_make (Time tm);
1456 bool selection_grab (Time tm, bool clipboard = false) NOTHROW; 1556 bool selection_grab (Time tm, bool clipboard = false) NOTHROW;
1457 void selection_start_colrow (int col, int row) NOTHROW; 1557 void selection_start_colrow (int col, int row) NOTHROW;
1458 void selection_delimit_word (enum page_dirn dirn, const row_col_t *mark, row_col_t *ret) NOTHROW; 1558 void selection_delimit_word (enum page_dirn dirn, const row_col_t *mark, row_col_t *ret) NOTHROW;
1459 void selection_extend_colrow (int32_t col, int32_t row, int button3, int buttonpress, int clickchange) NOTHROW; 1559 void selection_extend_colrow (int32_t col, int32_t row, int button3, int buttonpress, int clickchange) NOTHROW;
1462 void selection_click (int clicks, int x, int y) NOTHROW; 1562 void selection_click (int clicks, int x, int y) NOTHROW;
1463 void selection_extend (int x, int y, int flag) NOTHROW; 1563 void selection_extend (int x, int y, int flag) NOTHROW;
1464 void selection_rotate (int x, int y) NOTHROW; 1564 void selection_rotate (int x, int y) NOTHROW;
1465 1565
1466 // xdefaults.C 1566 // xdefaults.C
1467 void get_options (int argc, const char *const *argv); 1567 const char **get_options (int argc, const char *const *argv);
1468 int parse_keysym (const char *str, const char *arg); 1568 int parse_keysym (const char *str, const char *arg);
1469 const char *x_resource (const char *name); 1569 const char *x_resource (const char *name);
1470 void extract_resources (); 1570 void extract_resources ();
1571 void extract_keysym_resources ();
1471}; 1572};
1472 1573
1473#endif /* _RXVT_H_ */ 1574#endif /* _RXVT_H_ */
1474 1575

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines