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.17 by pcg, Thu Dec 18 07:31:19 2003 UTC vs.
Revision 1.21 by pcg, Sat Jan 17 01:20:01 2004 UTC

1/*
2 * $Id: rxvt.h,v 1.17 2003/12/18 07:31:19 pcg Exp $
3 */
4
5#ifndef _RXVT_H_ /* include once only */ 1#ifndef RXVT_H_ /* include once only */
6#define _RXVT_H_ 2#define RXVT_H_
7 3
8#include "rxvtlib.h" 4#include "rxvtlib.h"
9 5
10#include "feature.h" 6#include "feature.h"
11 7
662#define STRLEN(x) strlen((const char *)(x)) 658#define STRLEN(x) strlen((const char *)(x))
663#define STRCHR(x, y) strchr((const char *)(x), (int)(y)) 659#define STRCHR(x, y) strchr((const char *)(x), (int)(y))
664#define STRRCHR(x, y) strrchr((const char *)(x), (int)(y)) 660#define STRRCHR(x, y) strrchr((const char *)(x), (int)(y))
665 661
666/* convert pixel dimensions to row/column values. Everything as int32_t */ 662/* convert pixel dimensions to row/column values. Everything as int32_t */
667#define Pixel2Col(x) Pixel2Width((int32_t)(x) - (int32_t)R->TermWin.int_bwidth) 663#define Pixel2Col(x) Pixel2Width((int32_t)(x) - (int32_t)TermWin.int_bwidth)
668#define Pixel2Row(y) Pixel2Height((int32_t)(y) - (int32_t)R->TermWin.int_bwidth) 664#define Pixel2Row(y) Pixel2Height((int32_t)(y) - (int32_t)TermWin.int_bwidth)
669#define Pixel2Width(x) ((int32_t)(x) / (int32_t)R->TermWin.fwidth) 665#define Pixel2Width(x) ((int32_t)(x) / (int32_t)TermWin.fwidth)
670#define Pixel2Height(y) ((int32_t)(y) / (int32_t)R->TermWin.fheight) 666#define Pixel2Height(y) ((int32_t)(y) / (int32_t)TermWin.fheight)
671#define Col2Pixel(col) ((int32_t)Width2Pixel(col) + (int32_t)R->TermWin.int_bwidth) 667#define Col2Pixel(col) ((int32_t)Width2Pixel(col) + (int32_t)TermWin.int_bwidth)
672#define Row2Pixel(row) ((int32_t)Height2Pixel(row) + (int32_t)R->TermWin.int_bwidth) 668#define Row2Pixel(row) ((int32_t)Height2Pixel(row) + (int32_t)TermWin.int_bwidth)
673#define Width2Pixel(n) ((int32_t)(n) * (int32_t)R->TermWin.fwidth) 669#define Width2Pixel(n) ((int32_t)(n) * (int32_t)TermWin.fwidth)
674#define Height2Pixel(n) ((int32_t)(n) * (int32_t)R->TermWin.fheight) 670#define Height2Pixel(n) ((int32_t)(n) * (int32_t)TermWin.fheight)
675 671
676#define TermWin_TotalWidth() ((int32_t)R->TermWin.width + 2 * (int32_t)R->TermWin.int_bwidth) 672#define TermWin_TotalWidth() ((int32_t)TermWin.width + 2 * (int32_t)TermWin.int_bwidth)
677#define TermWin_TotalHeight() ((int32_t)R->TermWin.height + 2 * (int32_t)R->TermWin.int_bwidth) 673#define TermWin_TotalHeight() ((int32_t)TermWin.height + 2 * (int32_t)TermWin.int_bwidth)
678 674
679#define Xscreen DefaultScreen(R->Xdisplay) 675#define Xscreen DefaultScreen(R->Xdisplay)
680#define Xroot DefaultRootWindow(R->Xdisplay) 676#define Xroot DefaultRootWindow(R->Xdisplay)
681 677
682/* how to build & extract colors and attributes */ 678/* how to build & extract colors and attributes */
714 710
715#define SET_PIXCOLOR(h, x) ((h)->pixcolor_set[(x) / NPIXCLR_BITS] |= (1 << ((x) % NPIXCLR_BITS))) 711#define SET_PIXCOLOR(h, x) ((h)->pixcolor_set[(x) / NPIXCLR_BITS] |= (1 << ((x) % NPIXCLR_BITS)))
716#define ISSET_PIXCOLOR(h, x) ((h)->pixcolor_set[(x) / NPIXCLR_BITS] & (1 << ((x) % NPIXCLR_BITS))) 712#define ISSET_PIXCOLOR(h, x) ((h)->pixcolor_set[(x) / NPIXCLR_BITS] & (1 << ((x) % NPIXCLR_BITS)))
717 713
718#ifdef HAVE_SCROLLBARS 714#ifdef HAVE_SCROLLBARS
719# define scrollbar_TotalWidth() (R->scrollBar.width + R->sb_shadow * 2) 715# define scrollbar_TotalWidth() (scrollBar.width + sb_shadow * 2)
720#else 716#else
721# define scrollbar_TotalWidth() (0) 717# define scrollbar_TotalWidth() (0)
722#endif 718#endif
723#define scrollbar_isMotion() (R->scrollBar.state == 'm') 719#define scrollbar_isMotion() (R->scrollBar.state == 'm')
724#define scrollbar_isUp() (R->scrollBar.state == 'U') 720#define scrollbar_isUp() (R->scrollBar.state == 'U')
745#define scrollbar_size() (R->scrollBar.end - R->scrollBar.beg \ 741#define scrollbar_size() (R->scrollBar.end - R->scrollBar.beg \
746 - scrollbar_minheight()) 742 - scrollbar_minheight())
747 743
748#if (MENUBAR_MAX > 1) 744#if (MENUBAR_MAX > 1)
749/* rendition style flags */ 745/* rendition style flags */
750# define menuBar_height() (R->TermWin.fheight + SHADOW) 746# define menuBar_height() (TermWin.fheight + SHADOW)
751# define menuBar_TotalHeight() (menuBar_height() + SHADOW + menuBar_margin) 747# define menuBar_TotalHeight() (menuBar_height() + SHADOW + menuBar_margin)
752# define isMenuBarWindow(w) ((w) == R->menuBar.win) 748# define isMenuBarWindow(w) ((w) == R->menuBar.win)
753#else 749#else
754# define menuBar_height() (0) 750# define menuBar_height() (0)
755# define menuBar_TotalHeight() (0) 751# define menuBar_TotalHeight() (0)
885#ifdef GREEK_SUPPORT 881#ifdef GREEK_SUPPORT
886 short greek_mode; /* greek keyboard mode */ 882 short greek_mode; /* greek keyboard mode */
887#endif 883#endif
888 short rvideo; 884 short rvideo;
889 int16_t num_scr; /* screen: number lines scrolled */ 885 int16_t num_scr; /* screen: number lines scrolled */
890 uint16_t prev_ncol, /* screen: previous number of columns */ 886 unsigned int prev_ncol, /* screen: previous number of columns */
891 prev_nrow; /* screen: previous number of rows */ 887 prev_nrow; /* screen: previous number of rows */
892#ifdef RXVT_GRAPHICS 888#ifdef RXVT_GRAPHICS
893 uint16_t gr_prev_start; 889 uint16_t gr_prev_start;
894#endif 890#endif
895/* ---------- */ 891/* ---------- */
1079#endif 1075#endif
1080 const char *rs[NUM_RESOURCES]; 1076 const char *rs[NUM_RESOURCES];
1081/* command input buffering */ 1077/* command input buffering */
1082 unsigned char *cmdbuf_ptr, *cmdbuf_endp; 1078 unsigned char *cmdbuf_ptr, *cmdbuf_endp;
1083 unsigned char cmdbuf_base[BUFSIZ]; 1079 unsigned char cmdbuf_base[BUFSIZ];
1084 unsigned char kbuf[KBUFSZ];
1085 1080
1086 rxvt_salloc *ralloc; 1081 rxvt_salloc *ralloc;
1087 rxvt_salloc *talloc; 1082 rxvt_salloc *talloc;
1088 1083
1089 void paste (const unsigned char *data, unsigned int len); 1084 void paste (const unsigned char *data, unsigned int len);
1137 int run_command (const char *const *argv); 1132 int run_command (const char *const *argv);
1138 int run_child (const char *const *argv); 1133 int run_child (const char *const *argv);
1139 1134
1140 void color_aliases(int idx); 1135 void color_aliases(int idx);
1141 void recolour_cursor (); 1136 void recolour_cursor ();
1137 void create_windows (int argc, const char *const *argv);
1138 void resize_all_windows (unsigned int width, unsigned int height, int ignoreparent);
1139 void window_calc (unsigned int width, unsigned int height);
1140 void set_preedit_area (XRectangle * preedit_rect, XRectangle * status_rect, XRectangle * needed_rect);
1141
1142#if USE_XIM
1143 void set_size (XRectangle *size);
1144 void set_position (XPoint *pos);
1145 void set_color (unsigned long *fg, unsigned long *bg);
1146#endif
1147
1148 void resize_scrollbar ();
1149
1150 void pixel_position (int *x, int *y);
1151
1152 void selection_click (int clicks, int x, int y);
1153 void selection_extend (int x, int y, int flag);
1154 void selection_rotate (int x, int y);
1142 1155
1143 /* screen(!) */ 1156 /* screen(!) */
1144 void scr_blank_line (text_t *et, rend_t *er, unsigned int width, rend_t efs); 1157 void scr_blank_line (text_t *et, rend_t *er, unsigned int width, rend_t efs);
1145 void scr_blank_screen_mem (text_t **tp, rend_t **rp, unsigned int row, rend_t efs); 1158 void scr_blank_screen_mem (text_t **tp, rend_t **rp, unsigned int row, rend_t efs);
1146 int scr_scroll_text (int row1, int row2, int count, int spec); 1159 int scr_scroll_text (int row1, int row2, int count, int spec);
1147 void scr_reset (); 1160 void scr_reset ();
1148 void scr_reset_realloc (); 1161 void scr_reset_realloc ();
1149 void scr_release (); 1162 void scr_release ();
1163 void scr_clear ();
1164 void scr_refresh (unsigned char refresh_type);
1165 void scr_erase_screen (int mode);
1166 void scr_touch (bool refresh);
1167 void scr_expose (int x, int y, int width, int height, bool refresh);
1150}; 1168};
1151 1169
1152#define SET_LOCALE(locale) rxvt_set_locale (locale) 1170#define SET_LOCALE(locale) rxvt_set_locale (locale)
1153extern void rxvt_set_locale (const char *locale); 1171extern void rxvt_set_locale (const char *locale);
1154 1172

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines