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.186 by root, Wed Jan 4 04:42:45 2006 UTC vs.
Revision 1.189 by root, Fri Jan 6 20:50:58 2006 UTC

835#define SET_LOCALE(locale) rxvt_set_locale (locale) 835#define SET_LOCALE(locale) rxvt_set_locale (locale)
836extern bool rxvt_set_locale (const char *locale); 836extern bool rxvt_set_locale (const char *locale);
837extern bool rxvt_push_locale (const char *locale); 837extern bool rxvt_push_locale (const char *locale);
838extern void rxvt_pop_locale (); 838extern void rxvt_pop_locale ();
839 839
840/*
841 ***************************************************************************** 840/****************************************************************************/
842 * VARIABLES 841
843 *****************************************************************************
844 */
845#ifdef MENUBAR 842#ifdef MENUBAR
846# include "menubar.h" 843# include "menubar.h"
847#endif 844#endif
848 845
849#define BLINK_INTERVAL 0.5 846#define BLINK_INTERVAL 0.5
856# endif 853# endif
857# endif 854# endif
858# define __attribute__(x) 855# define __attribute__(x)
859#endif 856#endif
860 857
858/****************************************************************************/
859
860#define LINE_LONGER 0x0001 // line is continued on the next row
861#define LINE_FILTERED 0x0002 // line has been filtered
862#define LINE_COMPRESSED 0x0004 // line has been compressed (NYI)
863
864struct line_t {
865 text_t *t; // terminal the text
866 rend_t *r; // rendition, uses RS_ flags
867 tlen_t_ l; // length of each text line, LINE_CONT == continued on next line
868 uint32_t f; // flags
869
870 bool is_longer ()
871 {
872 return f & LINE_LONGER;
873 }
874
875 void is_longer (int set)
876 {
877 if (set)
878 f |= LINE_LONGER;
879 else
880 f &= ~LINE_LONGER;
881 }
882
883 void clear ()
884 {
885 t = 0;
886 r = 0;
887 l = 0;
888 f = 0;
889 }
890
891 void touch () // call whenever a line is changed/touched/updated
892 {
893#if ENABLE_PERL
894 f &= ~LINE_FILTERED;
895#endif
896 }
897
898 void touch (int col)
899 {
900 max_it (l, col);
901 touch ();
902 }
903};
904
905/****************************************************************************/
906
861// primivite wrapper around mbstate_t to ensure initialisation 907// primivite wrapper around mbstate_t to ensure initialisation
862struct mbstate { 908struct mbstate {
863 mbstate_t mbs; 909 mbstate_t mbs;
864 910
865 operator mbstate_t *() { return &mbs; } 911 operator mbstate_t *() { return &mbs; }
866 void reset () { memset (&mbs, 0, sizeof (mbs)); } 912 void reset () { memset (&mbs, 0, sizeof (mbs)); }
867 mbstate () { reset (); } 913 mbstate () { reset (); }
868}; 914};
869 915
916/****************************************************************************/
917
870#define UNICODE_MASK 0x1fffffUL 918#define UNICODE_MASK 0x1fffffUL
871 919
872#if UNICODE3 920#if UNICODE3
873# define COMPOSE_LO 0x40000000UL 921# define COMPOSE_LO 0x40000000UL
874# define COMPOSE_HI 0x400fffffUL 922# define COMPOSE_HI 0x400fffffUL
875# define IS_COMPOSE(n) ((int32_t)(n) >= COMPOSE_LO) 923# define IS_COMPOSE(n) ((int32_t)(n) >= COMPOSE_LO)
876#else 924#else
925# if ENABLE_PERL
926# define COMPOSE_LO 0xe000UL // our _own_ routiens don't like (illegal) surrogates
927# define COMPOSE_HI 0xf8ffUL // in utf-8, so use private use area only
928# else
877# define COMPOSE_LO 0xd800UL 929# define COMPOSE_LO 0xd800UL
878# define COMPOSE_HI 0xf8ffUL // dfff should be safer, but... 930# define COMPOSE_HI 0xf8ffUL
879# define IS_COMPOSE(n) (COMPOSE_LO <= (n) && (n) <= COMPOSE_HI) 931# endif
932# define IS_COMPOSE(n) IN_RANGE_INC ((n), COMPOSE_LO, COMPOSE_HI)
880#endif 933#endif
881 934
882#if ENABLE_COMBINING 935#if ENABLE_COMBINING
883// compose chars are used to represent composite characters 936// compose chars are used to represent composite characters
884// that are not representable in unicode, as well as characters 937// that are not representable in unicode, as well as characters
904}; 957};
905 958
906extern class rxvt_composite_vec rxvt_composite; 959extern class rxvt_composite_vec rxvt_composite;
907#endif 960#endif
908 961
962/****************************************************************************/
909 963
910#ifdef KEYSYM_RESOURCE 964#ifdef KEYSYM_RESOURCE
911 class keyboard_manager; 965 class keyboard_manager;
912#endif 966#endif
913 967
1245 1299
1246 // command.C 1300 // command.C
1247 void lookup_key (XKeyEvent &ev); 1301 void lookup_key (XKeyEvent &ev);
1248 unsigned int cmd_write (const char *str, unsigned int count); 1302 unsigned int cmd_write (const char *str, unsigned int count);
1249 1303
1250 unicode_t next_char (); 1304 wchar_t next_char ();
1251 unicode_t cmd_getc (); 1305 wchar_t cmd_getc ();
1252 unicode_t next_octet (); 1306 uint32_t next_octet ();
1253 unicode_t cmd_get8 (); 1307 uint32_t cmd_get8 ();
1254 1308
1255 bool cmd_parse (); 1309 bool cmd_parse ();
1256 void mouse_report (XButtonEvent &ev); 1310 void mouse_report (XButtonEvent &ev);
1257 void button_press (XButtonEvent &ev); 1311 void button_press (XButtonEvent &ev);
1258 void button_release (XButtonEvent &ev); 1312 void button_release (XButtonEvent &ev);
1404 void scr_touch (bool refresh); 1458 void scr_touch (bool refresh);
1405 void scr_expose (int x, int y, int width, int height, bool refresh); 1459 void scr_expose (int x, int y, int width, int height, bool refresh);
1406 rxvt_fontset *scr_find_fontset (rend_t r = DEFAULT_RSTYLE); 1460 rxvt_fontset *scr_find_fontset (rend_t r = DEFAULT_RSTYLE);
1407 void scr_recolour (); 1461 void scr_recolour ();
1408 void scr_remap_chars (); 1462 void scr_remap_chars ();
1409 void scr_remap_chars (const line_t &l); 1463 void scr_remap_chars (line_t &l);
1410 1464
1411 void scr_poweron (); 1465 void scr_poweron ();
1412 void scr_cursor (int mode); 1466 void scr_cursor (int mode);
1413 void scr_do_wrap (); 1467 void scr_do_wrap ();
1414 int scr_change_screen (int scrn); 1468 int scr_change_screen (int scrn);
1415 void scr_color (unsigned int color, int fgbg); 1469 void scr_color (unsigned int color, int fgbg);
1416 void scr_rendition (int set, int style); 1470 void scr_rendition (int set, int style);
1417 void scr_add_lines (const unicode_t *str, int nlines, int len); 1471 void scr_add_lines (const wchar_t *str, int len, int minlines = 0);
1418 void scr_backspace (); 1472 void scr_backspace ();
1419 void scr_tab (int count, bool ht = false); 1473 void scr_tab (int count, bool ht = false);
1420 void scr_gotorc (int row, int col, int relative); 1474 void scr_gotorc (int row, int col, int relative);
1421 void scr_index (enum page_dirn direction); 1475 void scr_index (enum page_dirn direction);
1422 void scr_erase_line (int mode); 1476 void scr_erase_line (int mode);

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines