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.14 by pcg, Thu Dec 18 00:38:07 2003 UTC vs.
Revision 1.17 by pcg, Thu Dec 18 07:31:19 2003 UTC

1/* 1/*
2 * $Id: rxvt.h,v 1.14 2003/12/18 00:38:07 pcg Exp $ 2 * $Id: rxvt.h,v 1.17 2003/12/18 07:31:19 pcg Exp $
3 */ 3 */
4 4
5#ifndef _RXVT_H_ /* include once only */ 5#ifndef _RXVT_H_ /* include once only */
6#define _RXVT_H_ 6#define _RXVT_H_
7 7
16 16
17#include "defaultfont.h" 17#include "defaultfont.h"
18#include "rxvtcolor.h" 18#include "rxvtcolor.h"
19#include "iom.h" 19#include "iom.h"
20#include "salloc.h" 20#include "salloc.h"
21
22#include <wchar.h>
21 23
22/* 24/*
23 ***************************************************************************** 25 *****************************************************************************
24 * SYSTEM HACKS 26 * SYSTEM HACKS
25 ***************************************************************************** 27 *****************************************************************************
722#define scrollbar_isUp() (R->scrollBar.state == 'U') 724#define scrollbar_isUp() (R->scrollBar.state == 'U')
723#define scrollbar_isDn() (R->scrollBar.state == 'D') 725#define scrollbar_isDn() (R->scrollBar.state == 'D')
724#define scrollbar_isUpDn() isupper (R->scrollBar.state) 726#define scrollbar_isUpDn() isupper (R->scrollBar.state)
725#define isScrollbarWindow(w) (R->scrollBar.state && (w) == R->scrollBar.win) 727#define isScrollbarWindow(w) (R->scrollBar.state && (w) == R->scrollBar.win)
726 728
727#define scrollbar_setIdle() R->scrollBar.state = 1
728#define scrollbar_setMotion() R->scrollBar.state = 'm'
729#define scrollbar_setUp() R->scrollBar.state = 'U'
730#define scrollbar_setDn() R->scrollBar.state = 'D'
731
732#define scrollbarnext_dnval() (R->scrollBar.end + (R->scrollBar.width + 1)) 729#define scrollbarnext_dnval() (R->scrollBar.end + (R->scrollBar.width + 1))
733#define scrollbarnext_upButton(y) ((y) > R->scrollBar.end \ 730#define scrollbarnext_upButton(y) ((y) > R->scrollBar.end \
734 && (y) <= scrollbarnext_dnval()) 731 && (y) <= scrollbarnext_dnval())
735#define scrollbarnext_dnButton(y) ((y) > scrollbarnext_dnval()) 732#define scrollbarnext_dnButton(y) ((y) > scrollbarnext_dnval())
736#define SCROLLNEXT_MINHEIGHT SB_THUMB_MIN_HEIGHT 733#define SCROLLNEXT_MINHEIGHT SB_THUMB_MIN_HEIGHT
767 764
768#ifndef STRICT_FONT_CHECKING 765#ifndef STRICT_FONT_CHECKING
769# define rxvt_get_fontwidest(font) ((font)->max_bounds.width) 766# define rxvt_get_fontwidest(font) ((font)->max_bounds.width)
770#endif 767#endif
771 768
772#define rxvt_Gr_ButtonPress(x,y) rxvt_Gr_ButtonReport (r, 'P',(x),(y)) 769#define rxvt_Gr_ButtonPress(x,y) rxvt_Gr_ButtonReport (R, 'P',(x),(y))
773#define rxvt_Gr_ButtonRelease(x,y) rxvt_Gr_ButtonReport (r, 'R',(x),(y)) 770#define rxvt_Gr_ButtonRelease(x,y) rxvt_Gr_ButtonReport (R, 'R',(x),(y))
774 771
775#ifdef UTMP_SUPPORT 772#ifdef UTMP_SUPPORT
776# if !defined(RXVT_UTMPX_FILE) || !defined(HAVE_STRUCT_UTMPX) 773# if !defined(RXVT_UTMPX_FILE) || !defined(HAVE_STRUCT_UTMPX)
777# undef HAVE_UTMPX_H 774# undef HAVE_UTMPX_H
778# undef HAVE_STRUCT_UTMPX 775# undef HAVE_STRUCT_UTMPX
836#endif 833#endif
837 834
838#define BLINK_INTERVAL 0.5 835#define BLINK_INTERVAL 0.5
839 836
840struct mbstate { 837struct mbstate {
841 unsigned char orig; 838 mbstate_t mbs;
842 uint32_t reg;
843 int cnt;
844 839
845 mbstate () 840 mbstate ()
846 { 841 {
847 cnt = 0; 842 MEMSET (&mbs, 0, sizeof (mbs));
848 } 843 }
849}; 844};
850 845
851struct rxvt_term : rxvt_vars { 846struct rxvt_term : rxvt_vars {
852 struct mbstate mbstate; 847 struct mbstate mbstate;
868#endif 863#endif
869#ifdef POINTER_BLANK 864#ifdef POINTER_BLANK
870 hidden_pointer:1, 865 hidden_pointer:1,
871#endif 866#endif
872 parsed_geometry:1, 867 parsed_geometry:1,
873 seen_input:1; /* wether any input has been seen so far */ 868 seen_input:1, /* wether any input has been seen so far */
869 enc_utf8:1; /* wether terminal reads/writes utf-8 */
874 870
875 unsigned char refresh_type, 871 unsigned char refresh_type,
876#ifdef UTMP_SUPPORT 872#ifdef UTMP_SUPPORT
877 next_utmp_action, 873 next_utmp_action,
878#endif 874#endif
889#ifdef GREEK_SUPPORT 885#ifdef GREEK_SUPPORT
890 short greek_mode; /* greek keyboard mode */ 886 short greek_mode; /* greek keyboard mode */
891#endif 887#endif
892 short rvideo; 888 short rvideo;
893 int16_t num_scr; /* screen: number lines scrolled */ 889 int16_t num_scr; /* screen: number lines scrolled */
894 uint16_t prev_ncol, /* screen: previous number of columns */ 890 uint16_t prev_ncol, /* screen: previous number of columns */
895 prev_nrow; /* screen: previous number of rows */ 891 prev_nrow; /* screen: previous number of rows */
896#ifdef RXVT_GRAPHICS 892#ifdef RXVT_GRAPHICS
897 uint16_t gr_prev_start; 893 uint16_t gr_prev_start;
898#endif 894#endif
899/* ---------- */ 895/* ---------- */
900 rend_t rstyle; 896 rend_t rstyle;
901/* ---------- */ 897/* ---------- */
902 uint32_t pixcolor_set[NPIXCLR_SETS]; 898 uint32_t pixcolor_set[NPIXCLR_SETS];
903/* ---------- */ 899/* ---------- */
904#ifdef SELECTION_SCROLLING 900#ifdef SELECTION_SCROLLING
905 int scroll_selection_delay, 901 int scroll_selection_delay,
906 scroll_selection_lines; 902 scroll_selection_lines;
907 enum page_dirn scroll_selection_dir; 903 enum page_dirn scroll_selection_dir;
1071 char *env_display; /* environmental variable DISPLAY */ 1067 char *env_display; /* environmental variable DISPLAY */
1072 char *env_term; /* environmental variable TERM */ 1068 char *env_term; /* environmental variable TERM */
1073 char *env_colorfgbg; 1069 char *env_colorfgbg;
1074 char *buffer; 1070 char *buffer;
1075 char *locale; 1071 char *locale;
1072 char *codeset;
1076 char charsets[4]; 1073 char charsets[4];
1077 unsigned char *v_buffer; /* pointer to physical buffer */ 1074 unsigned char *v_buffer; /* pointer to physical buffer */
1078 unsigned int v_buflen; /* size of area to write */ 1075 unsigned int v_buflen; /* size of area to write */
1079 char *newfont[MAX_NFONTS]; 1076 char *newfont[MAX_NFONTS];
1080#ifdef KEYSYM_RESOURCE 1077#ifdef KEYSYM_RESOURCE
1128 bool pty_fill (); 1125 bool pty_fill ();
1129 void process_x_events (); 1126 void process_x_events ();
1130 1127
1131 void *operator new (size_t s); 1128 void *operator new (size_t s);
1132 void operator delete (void *p, size_t s); 1129 void operator delete (void *p, size_t s);
1130
1131 void init_secondary ();
1132 const char **init_resources (int argc, const char *const *argv);
1133 void init_env ();
1134 void set_locale (const char *locale);
1135 void init_xlocale ();
1136 void init_command (const char *const *argv);
1137 int run_command (const char *const *argv);
1138 int run_child (const char *const *argv);
1139
1140 void color_aliases(int idx);
1141 void recolour_cursor ();
1133 1142
1134 /* screen(!) */ 1143 /* screen(!) */
1135 void scr_blank_line (text_t *et, rend_t *er, unsigned int width, rend_t efs); 1144 void scr_blank_line (text_t *et, rend_t *er, unsigned int width, rend_t efs);
1136 void scr_blank_screen_mem (text_t **tp, rend_t **rp, unsigned int row, rend_t efs); 1145 void scr_blank_screen_mem (text_t **tp, rend_t **rp, unsigned int row, rend_t efs);
1137 int scr_scroll_text (int row1, int row2, int count, int spec); 1146 int scr_scroll_text (int row1, int row2, int count, int spec);
1138 void scr_reset (); 1147 void scr_reset ();
1139 void scr_reset_realloc (); 1148 void scr_reset_realloc ();
1140 void scr_release (); 1149 void scr_release ();
1141}; 1150};
1142 1151
1152#define SET_LOCALE(locale) rxvt_set_locale (locale)
1153extern void rxvt_set_locale (const char *locale);
1154
1143#ifndef __attribute__ 1155#ifndef __attribute__
1144# ifdef __GNUC__ 1156# ifdef __GNUC__
1145# if (__GNUC__ == 2 && __GNUC_MINOR__ < 5) || (__GNUC__ < 2) 1157# if (__GNUC__ == 2 && __GNUC_MINOR__ < 5) || (__GNUC__ < 2)
1146# define __attribute__(x) 1158# define __attribute__(x)
1147# endif 1159# endif

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines