ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/rxvt-unicode/src/rxvtperl.xs
(Generate patch)

Comparing rxvt-unicode/src/rxvtperl.xs (file contents):
Revision 1.125 by root, Fri Aug 22 15:36:45 2008 UTC vs.
Revision 1.126 by root, Wed Nov 5 14:43:54 2008 UTC

107 107
108///////////////////////////////////////////////////////////////////////////// 108/////////////////////////////////////////////////////////////////////////////
109 109
110#define SvOVERLAY(sv) (overlay *)SvPTR (sv, "urxvt::overlay") 110#define SvOVERLAY(sv) (overlay *)SvPTR (sv, "urxvt::overlay")
111 111
112class overlay { 112class overlay : overlay_base
113{
113 rxvt_term *THIS; 114 rxvt_term *THIS;
114 AV *overlay_av; 115 AV *overlay_av;
115 int x, y, w, h;
116 int border; 116 int border;
117 text_t **text;
118 rend_t **rend;
119 117
120public: 118public:
121 HV *self; 119 HV *self;
122 120
123 overlay (rxvt_term *THIS, int x_, int y_, int w_, int h_, rend_t rstyle, int border); 121 overlay (rxvt_term *THIS, int x_, int y_, int w_, int h_, rend_t rstyle, int border);
130 128
131 void set (int x, int y, SV *str, SV *rend); 129 void set (int x, int y, SV *str, SV *rend);
132}; 130};
133 131
134overlay::overlay (rxvt_term *THIS, int x_, int y_, int w_, int h_, rend_t rstyle, int border) 132overlay::overlay (rxvt_term *THIS, int x_, int y_, int w_, int h_, rend_t rstyle, int border)
135: THIS(THIS), x(x_), y(y_), w(w_), h(h_), border(border == 2), overlay_av (0) 133: THIS(THIS), border(border == 2), overlay_av (0)
136{ 134{
135 x = x_;
136 y = y_;
137 w = w_;
138 h = h_;
139
137 if (w < 0) w = 0; 140 if (w < 0) w = 0;
138 if (h < 0) h = 0; 141 if (h < 0) h = 0;
139 142
140 if (border == 2) 143 if (border == 2)
141 { 144 {
244 int ov_x = max (0, min (MOD (x, THIS->ncol), THIS->ncol - w)); 247 int ov_x = max (0, min (MOD (x, THIS->ncol), THIS->ncol - w));
245 int ov_y = max (0, min (MOD (y, THIS->nrow), THIS->nrow - h)); 248 int ov_y = max (0, min (MOD (y, THIS->nrow), THIS->nrow - h));
246 249
247 int ov_w = min (w, THIS->ncol - ov_x); 250 int ov_w = min (w, THIS->ncol - ov_x);
248 int ov_h = min (h, THIS->nrow - ov_y); 251 int ov_h = min (h, THIS->nrow - ov_y);
252
253 // hide cursor if it is within the overlay area
254 if (IN_RANGE_EXC (THIS->screen.cur.col - ov_x, 0, ov_w)
255 && IN_RANGE_EXC (THIS->screen.cur.row - ov_y, 0, ov_h))
256 THIS->screen.flags &= ~Screen_VisibleCursor;
249 257
250 for (int y = ov_h; y--; ) 258 for (int y = ov_h; y--; )
251 { 259 {
252 text_t *t1 = text [y]; 260 text_t *t1 = text [y];
253 rend_t *r1 = rend [y]; 261 rend_t *r1 = rend [y];

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines