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.285 by sasha, Sat Aug 4 07:05:31 2007 UTC vs.
Revision 1.297 by ayin, Sun Aug 26 16:55:58 2007 UTC

99 ***************************************************************************** 99 *****************************************************************************
100 * PROTOTYPES 100 * PROTOTYPES
101 ***************************************************************************** 101 *****************************************************************************
102 */ 102 */
103// main.C 103// main.C
104RETSIGTYPE rxvt_Child_signal (int sig) NOTHROW;
105RETSIGTYPE rxvt_Exit_signal (int sig) NOTHROW;
106void rxvt_clean_exit () NOTHROW;
107void * rxvt_malloc (size_t size); 104void * rxvt_malloc (size_t size);
108void * rxvt_calloc (size_t number, size_t size); 105void * rxvt_calloc (size_t number, size_t size);
109void * rxvt_realloc (void *ptr, size_t size); 106void * rxvt_realloc (void *ptr, size_t size);
110 107
111// misc.C 108// misc.C
173#endif 170#endif
174 171
175#if defined(XPM_BACKGROUND) || defined(ENABLE_TRANSPARENCY) 172#if defined(XPM_BACKGROUND) || defined(ENABLE_TRANSPARENCY)
176# define HAVE_BG_PIXMAP 1/* to simplify further usage */ 173# define HAVE_BG_PIXMAP 1/* to simplify further usage */
177struct bgPixmap_t { 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
178# ifdef XPM_BACKGROUND 201# ifdef XPM_BACKGROUND
179
180# ifdef HAVE_AFTERIMAGE 202# ifdef HAVE_AFTERIMAGE
181 ASImage *original_asim; 203 ASImage *original_asim;
204 bool render_asim (ASImage *background, ARGB32 background_tint);
182# endif 205# endif
183 206
184#define bgPmap_defaultScale 100 207 enum { defaultScale = 100, defaultAlign = 50 };
185#define bgPmap_defaultAlign 50 208
186 unsigned int h_scale, v_scale;/* percents of the window size */ 209 unsigned int h_scale, v_scale;/* percents of the window size */
187 int h_align, v_align; /* percents of the window size: 210 int h_align, v_align; /* percents of the window size:
188 0 - left align, 50 - center, 100 - right */ 211 0 - left align, 50 - center, 100 - right */
189 212 void unset_geometry () { flags = flags & ~geometryFlags; };
190 bool handle_geometry (const char *geom); 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 };
191 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 */
192# endif 242# endif
193 243 double invalid_since;
194# define bgPmap_geometrySet (1UL<<0)
195# define bgPmap_propScale (1UL<<1)
196# define bgPmap_geometryFlags (bgPmap_geometrySet|bgPmap_propScale)
197
198# define bgPmap_Transparent (1UL<<16)
199 unsigned long flags;
200 244
201 Pixmap pixmap; 245 Pixmap pixmap;
202 unsigned int pmap_width, pmap_height; 246 unsigned int pmap_width, pmap_height;
203 unsigned int pmap_depth; 247 unsigned int pmap_depth;
204 248
205 bool window_size_sensitive(); 249 bool window_size_sensitive ();
206 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 };
207}; 260};
208#else 261#else
209# undef HAVE_BG_PIXMAP 262# undef HAVE_BG_PIXMAP
210#endif 263#endif
211 264
643#define PrivMode_LFNL (1UL<<19) 696#define PrivMode_LFNL (1UL<<19)
644/* too annoying to implement X11 highlight tracking */ 697/* too annoying to implement X11 highlight tracking */
645/* #define PrivMode_MouseX11Track (1LU<<20) */ 698/* #define PrivMode_MouseX11Track (1LU<<20) */
646 699
647#define PrivMode_mouse_report (PrivMode_MouseX10|PrivMode_MouseX11) 700#define PrivMode_mouse_report (PrivMode_MouseX10|PrivMode_MouseX11)
648#define PrivMode(test,bit) \
649 if (test) \
650 priv_modes |= (bit); \
651 else \
652 priv_modes &= ~(bit)
653 701
654#ifdef ALLOW_132_MODE 702#ifdef ALLOW_132_MODE
655# define PrivMode_Default (PrivMode_Autowrap|PrivMode_ShiftKeys|PrivMode_VisibleCursor|PrivMode_132OK) 703# define PrivMode_Default (PrivMode_Autowrap|PrivMode_ShiftKeys|PrivMode_VisibleCursor|PrivMode_132OK)
656#else 704#else
657# define PrivMode_Default (PrivMode_Autowrap|PrivMode_ShiftKeys|PrivMode_VisibleCursor) 705# define PrivMode_Default (PrivMode_Autowrap|PrivMode_ShiftKeys|PrivMode_VisibleCursor)
916 struct mbstate mbstate; // current input multibyte state 964 struct mbstate mbstate; // current input multibyte state
917 965
918 unsigned char want_refresh:1, 966 unsigned char want_refresh:1,
919#ifdef ENABLE_TRANSPARENCY 967#ifdef ENABLE_TRANSPARENCY
920 want_full_refresh:1, /* awaiting full screen refresh */ 968 want_full_refresh:1, /* awaiting full screen refresh */
921 am_transparent:1, /* is a transparent term */
922 am_pixmap_trans:1, /* transparency w/known root pixmap */
923#endif 969#endif
924 current_screen:1, /* primary or secondary */ 970 current_screen:1, /* primary or secondary */
925 num_scr_allow:1, 971 num_scr_allow:1,
926 bypass_keystate:1, 972 bypass_keystate:1,
927#ifdef CURSOR_BLINK 973#ifdef CURSOR_BLINK
1110 1156
1111#if ENABLE_TRANSPARENCY || ENABLE_PERL 1157#if ENABLE_TRANSPARENCY || ENABLE_PERL
1112 void rootwin_cb (XEvent &xev); 1158 void rootwin_cb (XEvent &xev);
1113 xevent_watcher rootwin_ev; 1159 xevent_watcher rootwin_ev;
1114#endif 1160#endif
1115#if ENABLE_TRANSPARENCY 1161#ifdef HAVE_BG_PIXMAP
1116 int check_our_parents (); 1162 int update_background ();
1117 void check_our_parents_cb (time_watcher &w); 1163 void update_background_cb (time_watcher &w);
1118 time_watcher check_our_parents_ev; 1164 time_watcher update_background_ev;
1119#endif 1165#endif
1120 1166
1121 void x_cb (XEvent &xev); 1167 void x_cb (XEvent &xev);
1122 void flush (); 1168 void flush ();
1123 xevent_watcher termwin_ev; 1169 xevent_watcher termwin_ev;
1344 { 1390 {
1345 if (set) 1391 if (set)
1346 options[opt >> 3] |= (1 << (opt & 7)); 1392 options[opt >> 3] |= (1 << (opt & 7));
1347 else 1393 else
1348 options[opt >> 3] &= ~(1 << (opt & 7)); 1394 options[opt >> 3] &= ~(1 << (opt & 7));
1395 }
1396
1397 void PrivMode (int set, unsigned bit) NOTHROW
1398 {
1399 if (set)
1400 priv_modes |= bit;
1401 else
1402 priv_modes &= ~bit;
1349 } 1403 }
1350 1404
1351 void scr_blank_line (line_t &l, unsigned int col, unsigned int width, rend_t efs) const NOTHROW; 1405 void scr_blank_line (line_t &l, unsigned int col, unsigned int width, rend_t efs) const NOTHROW;
1352 void scr_blank_screen_mem (line_t &l, rend_t efs) const NOTHROW; 1406 void scr_blank_screen_mem (line_t &l, rend_t efs) const NOTHROW;
1353 int scr_scroll_text (int row1, int row2, int count) NOTHROW; 1407 int scr_scroll_text (int row1, int row2, int count) NOTHROW;
1459 void get_options (int argc, const char *const *argv); 1513 void get_options (int argc, const char *const *argv);
1460 int parse_keysym (const char *str, const char *arg); 1514 int parse_keysym (const char *str, const char *arg);
1461 void get_xdefaults (FILE *stream, const char *name); 1515 void get_xdefaults (FILE *stream, const char *name);
1462 void extract_resources (); 1516 void extract_resources ();
1463 // xpm.C 1517 // xpm.C
1464//int scale_pixmap (const char *geom); 1518 void get_window_origin (int &x, int &y);
1465 void resize_pixmap (); 1519 Pixmap get_pixmap_property (int prop_id);
1466 void set_bgPixmap (const char *file);
1467}; 1520};
1468 1521
1469/*
1470 *****************************************************************************
1471 * PROTOTYPES
1472 *****************************************************************************
1473 */
1474#ifdef PROTOTYPES
1475# define __PROTO(p) p
1476#else
1477# define __PROTO(p) ()
1478#endif
1479
1480#endif /* _RXVT_H_ */ 1522#endif /* _RXVT_H_ */
1481 1523

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines