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.298 by ayin, Sun Aug 26 17:56:19 2007 UTC vs.
Revision 1.308 by ayin, Fri Oct 12 15:13:13 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
111char * rxvt_wcstoutf8 (const wchar_t *str, int len = -1); 113char * rxvt_wcstoutf8 (const wchar_t *str, int len = -1);
112wchar_t * rxvt_utf8towcs (const char *str, int len = -1); 114wchar_t * rxvt_utf8towcs (const char *str, int len = -1);
113 115
114#define rxvt_strdup(s) ((s) ? strdup(s) : 0) 116#define rxvt_strdup(s) ((s) ? strdup(s) : 0)
115 117
116char * rxvt_r_basename (const char *str) NOTHROW; 118char * rxvt_basename (const char *str) NOTHROW;
117void rxvt_vlog (const char *fmt, va_list arg_ptr) NOTHROW; 119void rxvt_vlog (const char *fmt, va_list arg_ptr) NOTHROW;
118void rxvt_log (const char *fmt,...) NOTHROW; 120void rxvt_log (const char *fmt,...) NOTHROW;
119void rxvt_warn (const char *fmt,...) NOTHROW; 121void rxvt_warn (const char *fmt,...) NOTHROW;
120void rxvt_fatal (const char *fmt, ...) THROW ((class rxvt_failure_exception)) NORETURN; 122void rxvt_fatal (const char *fmt, ...) THROW ((class rxvt_failure_exception)) NORETURN;
121void rxvt_exit_failure () THROW ((class rxvt_failure_exception)) NORETURN; 123void rxvt_exit_failure () THROW ((class rxvt_failure_exception)) NORETURN;
122 124
123int rxvt_Str_match (const char *s1, const char *s2) NOTHROW;
124const char * rxvt_Str_skip_space (const char *str) NOTHROW;
125char * rxvt_Str_trim (char *str) NOTHROW; 125char * rxvt_strtrim (char *str) NOTHROW;
126int rxvt_Str_escaped (char *str) NOTHROW;
127char ** rxvt_splitcommastring (const char *cs) NOTHROW; 126char ** rxvt_splitcommastring (const char *cs) NOTHROW;
128void rxvt_freecommastring (char **cs) NOTHROW; 127void rxvt_freecommastring (char **cs) NOTHROW;
129 128
130///////////////////////////////////////////////////////////////////////////// 129/////////////////////////////////////////////////////////////////////////////
131 130
165 */ 164 */
166#if defined(RXVT_SCROLLBAR) || defined(NEXT_SCROLLBAR) || defined(PLAIN_SCROLLBAR) 165#if defined(RXVT_SCROLLBAR) || defined(NEXT_SCROLLBAR) || defined(PLAIN_SCROLLBAR)
167# define KEEP_SCROLLCOLOR 1 166# define KEEP_SCROLLCOLOR 1
168#else 167#else
169# undef KEEP_SCROLLCOLOR 168# undef KEEP_SCROLLCOLOR
170#endif
171
172#if defined(XPM_BACKGROUND) || defined(ENABLE_TRANSPARENCY)
173# define HAVE_BG_PIXMAP 1/* to simplify further usage */
174struct bgPixmap_t {
175
176 enum {
177 geometrySet = (1UL<<0),
178 propScale = (1UL<<1),
179 geometryFlags = (geometrySet|propScale),
180
181 tintSet = (1UL<<8),
182 tintNeeded = (1UL<<9),
183 tintWholesome = (1UL<<10),
184 tintServerSide = (1UL<<11),
185 tintFlags = (tintSet|tintServerSide|tintNeeded|tintWholesome),
186 blurNeeded = (1UL<<12),
187
188 isTransparent = (1UL<<16),
189 isInvalid = (1UL<<17)
190 };
191
192 unsigned long flags;
193
194 enum {
195 transpPmapTiled = (1UL<<0),
196 transpPmapTinted = tintNeeded,
197 transpPmapBlured = blurNeeded,
198 transpTransformations = (tintNeeded|blurNeeded)
199 }; /* this flags are returned by make_transparency_pixmap if called */
200
201# ifdef XPM_BACKGROUND
202# ifdef HAVE_AFTERIMAGE
203 ASImage *original_asim;
204 bool render_asim (ASImage *background, ARGB32 background_tint);
205# endif
206
207 enum { defaultScale = 100, defaultAlign = 50 };
208
209 unsigned int h_scale, v_scale;/* percents of the window size */
210 int h_align, v_align; /* percents of the window size:
211 0 - left align, 50 - center, 100 - right */
212 void unset_geometry () { flags = flags & ~geometryFlags; };
213 bool set_geometry (const char *geom);
214 void set_defaultGeometry ()
215 {
216 h_scale = v_scale = defaultScale;
217 h_align = v_align = defaultAlign;
218 flags |= geometrySet;
219 };
220
221 bool set_file (const char *file);
222# endif /* XPM_BACKGROUND */
223
224 rxvt_term *target;
225 bool set_target (rxvt_term *new_target);
226
227# ifdef ENABLE_TRANSPARENCY
228 int root_depth; /* obtained when target is set */
229 Pixmap root_pixmap; /* current root pixmap set */
230 rxvt_color tint;
231 int shade;
232 int h_blurRadius, v_blurRadius;
233
234 bool set_transparent ();
235 bool set_blur_radius (const char *geom);
236 bool set_tint (rxvt_color &new_tint);
237 bool unset_tint ();
238 bool set_shade (const char *shade_str);
239 bool set_root_pixmap ();
240
241 unsigned long make_transparency_pixmap ();/* returns combination of the transpTransformations flags */
242# endif
243 double invalid_since;
244
245 Pixmap pixmap;
246 unsigned int pmap_width, pmap_height;
247 unsigned int pmap_depth;
248
249 bool window_size_sensitive ();
250 bool need_client_side_rendering ();
251 void apply ();
252 bool render ();
253 void invalidate () {
254 if (!(flags & isInvalid))
255 {
256 flags |= isInvalid;
257 invalid_since = NOW;
258 }
259 };
260};
261#else
262# undef HAVE_BG_PIXMAP
263#endif 169#endif
264 170
265/* 171/*
266 * the 'essential' information for reporting Mouse Events 172 * the 'essential' information for reporting Mouse Events
267 * pared down from XButtonEvent 173 * pared down from XButtonEvent
314 ***************************************************************************** 220 *****************************************************************************
315 */ 221 */
316 222
317/* COLORTERM, TERM environment variables */ 223/* COLORTERM, TERM environment variables */
318#define COLORTERMENV "rxvt" 224#define COLORTERMENV "rxvt"
319#ifdef XPM_BACKGROUND 225#ifdef BG_IMAGE_FROM_FILE
320# define COLORTERMENVFULL COLORTERMENV "-xpm" 226# define COLORTERMENVFULL COLORTERMENV "-xpm"
321#else 227#else
322# define COLORTERMENVFULL COLORTERMENV 228# define COLORTERMENVFULL COLORTERMENV
323#endif 229#endif
324#ifndef TERMENV 230#ifndef TERMENV
962 rxvt_perl_term perl; 868 rxvt_perl_term perl;
963#endif 869#endif
964 struct mbstate mbstate; // current input multibyte state 870 struct mbstate mbstate; // current input multibyte state
965 871
966 unsigned char want_refresh:1, 872 unsigned char want_refresh:1,
967#ifdef ENABLE_TRANSPARENCY
968 want_full_refresh:1, /* awaiting full screen refresh */
969#endif
970 current_screen:1, /* primary or secondary */ 873 current_screen:1, /* primary or secondary */
971 num_scr_allow:1, 874 num_scr_allow:1,
972 bypass_keystate:1, 875 bypass_keystate:1,
973#ifdef CURSOR_BLINK 876#ifdef CURSOR_BLINK
974 hidden_cursor:1, 877 hidden_cursor:1,
1069 char * incr_buf; 972 char * incr_buf;
1070 size_t incr_buf_size, incr_buf_fill; 973 size_t incr_buf_size, incr_buf_fill;
1071/* ---------- */ 974/* ---------- */
1072 Cursor leftptr_cursor; 975 Cursor leftptr_cursor;
1073/* ---------- */ 976/* ---------- */
1074#ifndef NO_BACKSPACE_KEY
1075 const char *key_backspace;
1076#endif
1077#ifndef NO_DELETE_KEY
1078 const char *key_delete;
1079#endif
1080 struct mouse_event MEvent; 977 struct mouse_event MEvent;
1081 XComposeStatus compose; 978 XComposeStatus compose;
1082 ttymode_t tio; 979 ttymode_t tio;
1083 row_col_t oldcursor; 980 row_col_t oldcursor;
1084#ifdef HAVE_BG_PIXMAP 981#ifdef HAVE_BG_PIXMAP
1320 void set_window_color (int idx, const char *color); 1217 void set_window_color (int idx, const char *color);
1321 void set_colorfgbg (); 1218 void set_colorfgbg ();
1322 bool set_color (rxvt_color &color, const char *name); 1219 bool set_color (rxvt_color &color, const char *name);
1323 void alias_color (int dst, int src); 1220 void alias_color (int dst, int src);
1324 void set_widthheight (unsigned int newwidth, unsigned int newheight); 1221 void set_widthheight (unsigned int newwidth, unsigned int newheight);
1222 void get_window_origin (int &x, int &y);
1223 Pixmap get_pixmap_property (int prop_id);
1325 1224
1326 // screen.C 1225 // screen.C
1327 1226
1328 void lalloc (line_t &l) const 1227 void lalloc (line_t &l) const
1329 { 1228 {
1512 // xdefaults.C 1411 // xdefaults.C
1513 void get_options (int argc, const char *const *argv); 1412 void get_options (int argc, const char *const *argv);
1514 int parse_keysym (const char *str, const char *arg); 1413 int parse_keysym (const char *str, const char *arg);
1515 void get_xdefaults (FILE *stream, const char *name); 1414 void get_xdefaults (FILE *stream, const char *name);
1516 void extract_resources (); 1415 void extract_resources ();
1517 // xpm.C
1518 void get_window_origin (int &x, int &y);
1519 Pixmap get_pixmap_property (int prop_id);
1520}; 1416};
1521 1417
1522#endif /* _RXVT_H_ */ 1418#endif /* _RXVT_H_ */
1523 1419

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines