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.302 by ayin, Sat Sep 8 21:25:56 2007 UTC vs.
Revision 1.307 by ayin, Thu Oct 11 16:01:26 2007 UTC

79# include <afterimage.h> 79# include <afterimage.h>
80#undef min 80#undef min
81#undef max 81#undef max
82#endif 82#endif
83 83
84#include "background.h"
85
84#ifndef STDIN_FILENO 86#ifndef STDIN_FILENO
85# define STDIN_FILENO 0 87# define STDIN_FILENO 0
86# define STDOUT_FILENO 1 88# define STDOUT_FILENO 1
87# define STDERR_FILENO 2 89# define STDERR_FILENO 2
88#endif 90#endif
162 */ 164 */
163#if defined(RXVT_SCROLLBAR) || defined(NEXT_SCROLLBAR) || defined(PLAIN_SCROLLBAR) 165#if defined(RXVT_SCROLLBAR) || defined(NEXT_SCROLLBAR) || defined(PLAIN_SCROLLBAR)
164# define KEEP_SCROLLCOLOR 1 166# define KEEP_SCROLLCOLOR 1
165#else 167#else
166# undef KEEP_SCROLLCOLOR 168# undef KEEP_SCROLLCOLOR
167#endif
168
169#if defined(XPM_BACKGROUND) || defined(ENABLE_TRANSPARENCY)
170# define HAVE_BG_PIXMAP 1/* to simplify further usage */
171struct bgPixmap_t {
172
173 enum {
174 geometrySet = (1UL<<0),
175 propScale = (1UL<<1),
176 geometryFlags = (geometrySet|propScale),
177
178 tintSet = (1UL<<8),
179 tintNeeded = (1UL<<9),
180 tintWholesome = (1UL<<10),
181 tintServerSide = (1UL<<11),
182 tintFlags = (tintSet|tintServerSide|tintNeeded|tintWholesome),
183 blurNeeded = (1UL<<12),
184
185 isTransparent = (1UL<<16),
186 isInvalid = (1UL<<17)
187 };
188
189 unsigned long flags;
190
191 enum {
192 transpPmapTiled = (1UL<<0),
193 transpPmapTinted = tintNeeded,
194 transpPmapBlured = blurNeeded,
195 transpTransformations = (tintNeeded|blurNeeded)
196 }; /* this flags are returned by make_transparency_pixmap if called */
197
198# ifdef XPM_BACKGROUND
199# ifdef HAVE_AFTERIMAGE
200 ASImage *original_asim;
201 bool render_asim (ASImage *background, ARGB32 background_tint);
202# endif
203
204 enum { defaultScale = 100, defaultAlign = 50 };
205
206 unsigned int h_scale, v_scale;/* percents of the window size */
207 int h_align, v_align; /* percents of the window size:
208 0 - left align, 50 - center, 100 - right */
209 void unset_geometry () { flags = flags & ~geometryFlags; };
210 bool set_geometry (const char *geom);
211 void set_defaultGeometry ()
212 {
213 h_scale = v_scale = defaultScale;
214 h_align = v_align = defaultAlign;
215 flags |= geometrySet;
216 };
217
218 bool set_file (const char *file);
219# endif /* XPM_BACKGROUND */
220
221 rxvt_term *target;
222 bool set_target (rxvt_term *new_target);
223
224# ifdef ENABLE_TRANSPARENCY
225 int root_depth; /* obtained when target is set */
226 Pixmap root_pixmap; /* current root pixmap set */
227 rxvt_color tint;
228 int shade;
229 int h_blurRadius, v_blurRadius;
230
231 bool set_transparent ();
232 bool set_blur_radius (const char *geom);
233 bool set_tint (rxvt_color &new_tint);
234 bool unset_tint ();
235 bool set_shade (const char *shade_str);
236 bool set_root_pixmap ();
237
238 unsigned long make_transparency_pixmap ();/* returns combination of the transpTransformations flags */
239# endif
240 double invalid_since;
241
242 Pixmap pixmap;
243 unsigned int pmap_width, pmap_height;
244 unsigned int pmap_depth;
245
246 bool window_size_sensitive ();
247 bool need_client_side_rendering ();
248 void apply ();
249 bool render ();
250 void invalidate () {
251 if (!(flags & isInvalid))
252 {
253 flags |= isInvalid;
254 invalid_since = NOW;
255 }
256 };
257};
258#else
259# undef HAVE_BG_PIXMAP
260#endif 169#endif
261 170
262/* 171/*
263 * the 'essential' information for reporting Mouse Events 172 * the 'essential' information for reporting Mouse Events
264 * pared down from XButtonEvent 173 * pared down from XButtonEvent
311 ***************************************************************************** 220 *****************************************************************************
312 */ 221 */
313 222
314/* COLORTERM, TERM environment variables */ 223/* COLORTERM, TERM environment variables */
315#define COLORTERMENV "rxvt" 224#define COLORTERMENV "rxvt"
316#ifdef XPM_BACKGROUND 225#ifdef BG_IMAGE_FROM_FILE
317# define COLORTERMENVFULL COLORTERMENV "-xpm" 226# define COLORTERMENVFULL COLORTERMENV "-xpm"
318#else 227#else
319# define COLORTERMENVFULL COLORTERMENV 228# define COLORTERMENVFULL COLORTERMENV
320#endif 229#endif
321#ifndef TERMENV 230#ifndef TERMENV
959 rxvt_perl_term perl; 868 rxvt_perl_term perl;
960#endif 869#endif
961 struct mbstate mbstate; // current input multibyte state 870 struct mbstate mbstate; // current input multibyte state
962 871
963 unsigned char want_refresh:1, 872 unsigned char want_refresh:1,
964#ifdef ENABLE_TRANSPARENCY
965 want_full_refresh:1, /* awaiting full screen refresh */
966#endif
967 current_screen:1, /* primary or secondary */ 873 current_screen:1, /* primary or secondary */
968 num_scr_allow:1, 874 num_scr_allow:1,
969 bypass_keystate:1, 875 bypass_keystate:1,
970#ifdef CURSOR_BLINK 876#ifdef CURSOR_BLINK
971 hidden_cursor:1, 877 hidden_cursor:1,
1066 char * incr_buf; 972 char * incr_buf;
1067 size_t incr_buf_size, incr_buf_fill; 973 size_t incr_buf_size, incr_buf_fill;
1068/* ---------- */ 974/* ---------- */
1069 Cursor leftptr_cursor; 975 Cursor leftptr_cursor;
1070/* ---------- */ 976/* ---------- */
1071#ifndef NO_BACKSPACE_KEY
1072 const char *key_backspace;
1073#endif
1074#ifndef NO_DELETE_KEY
1075 const char *key_delete;
1076#endif
1077 struct mouse_event MEvent; 977 struct mouse_event MEvent;
1078 XComposeStatus compose; 978 XComposeStatus compose;
1079 ttymode_t tio; 979 ttymode_t tio;
1080 row_col_t oldcursor; 980 row_col_t oldcursor;
1081#ifdef HAVE_BG_PIXMAP 981#ifdef HAVE_BG_PIXMAP
1232 rxvt_set_locale (locale); 1132 rxvt_set_locale (locale);
1233 } 1133 }
1234 1134
1235 void init_secondary (); 1135 void init_secondary ();
1236 const char **init_resources (int argc, const char *const *argv); 1136 const char **init_resources (int argc, const char *const *argv);
1237 const char *x_resource (const char *name);
1238 void init_env (); 1137 void init_env ();
1239 void set_locale (const char *locale); 1138 void set_locale (const char *locale);
1240 void init_xlocale (); 1139 void init_xlocale ();
1241 void init_command (const char *const *argv); 1140 void init_command (const char *const *argv);
1242 void run_command (const char *const *argv); 1141 void run_command (const char *const *argv);
1317 void set_window_color (int idx, const char *color); 1216 void set_window_color (int idx, const char *color);
1318 void set_colorfgbg (); 1217 void set_colorfgbg ();
1319 bool set_color (rxvt_color &color, const char *name); 1218 bool set_color (rxvt_color &color, const char *name);
1320 void alias_color (int dst, int src); 1219 void alias_color (int dst, int src);
1321 void set_widthheight (unsigned int newwidth, unsigned int newheight); 1220 void set_widthheight (unsigned int newwidth, unsigned int newheight);
1221 void get_window_origin (int &x, int &y);
1222 Pixmap get_pixmap_property (int prop_id);
1322 1223
1323 // screen.C 1224 // screen.C
1324 1225
1325 void lalloc (line_t &l) const 1226 void lalloc (line_t &l) const
1326 { 1227 {
1509 // xdefaults.C 1410 // xdefaults.C
1510 void get_options (int argc, const char *const *argv); 1411 void get_options (int argc, const char *const *argv);
1511 int parse_keysym (const char *str, const char *arg); 1412 int parse_keysym (const char *str, const char *arg);
1512 void get_xdefaults (FILE *stream, const char *name); 1413 void get_xdefaults (FILE *stream, const char *name);
1513 void extract_resources (); 1414 void extract_resources ();
1514 // xpm.C
1515 void get_window_origin (int &x, int &y);
1516 Pixmap get_pixmap_property (int prop_id);
1517}; 1415};
1518 1416
1519#endif /* _RXVT_H_ */ 1417#endif /* _RXVT_H_ */
1520 1418

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines