… | |
… | |
923 | RETVAL |
923 | RETVAL |
924 | |
924 | |
925 | int |
925 | int |
926 | SET_FGCOLOR (int rend, int new_color) |
926 | SET_FGCOLOR (int rend, int new_color) |
927 | CODE: |
927 | CODE: |
928 | RETVAL = SET_FGCOLOR (rend, new_color); |
928 | RETVAL = SET_FGCOLOR (rend, clamp (new_color, 0, TOTAL_COLORS - 1)); |
929 | OUTPUT: |
929 | OUTPUT: |
930 | RETVAL |
930 | RETVAL |
931 | |
931 | |
932 | int |
932 | int |
933 | SET_BGCOLOR (int rend, int new_color) |
933 | SET_BGCOLOR (int rend, int new_color) |
934 | CODE: |
934 | CODE: |
935 | RETVAL = SET_BGCOLOR (rend, new_color); |
935 | RETVAL = SET_BGCOLOR (rend, clamp (new_color, 0, TOTAL_COLORS - 1)); |
936 | OUTPUT: |
936 | OUTPUT: |
937 | RETVAL |
937 | RETVAL |
938 | |
938 | |
939 | int |
939 | int |
940 | GET_CUSTOM (int rend) |
940 | GET_CUSTOM (int rend) |
… | |
… | |
1209 | } |
1209 | } |
1210 | OUTPUT: |
1210 | OUTPUT: |
1211 | RETVAL |
1211 | RETVAL |
1212 | |
1212 | |
1213 | SV * |
1213 | SV * |
1214 | rxvt_term::_env () |
1214 | rxvt_term::envv () |
|
|
1215 | ALIAS: |
|
|
1216 | argv = 1 |
1215 | CODE: |
1217 | PPCODE: |
1216 | { |
1218 | { |
1217 | if (THIS->envv) |
1219 | stringvec *vec = ix ? THIS->argv : THIS->envv; |
1218 | { |
|
|
1219 | AV *av = newAV (); |
|
|
1220 | |
1220 | |
|
|
1221 | EXTEND (SP, vec->size ()); |
|
|
1222 | |
1221 | for (char **i = THIS->envv->begin (); i != THIS->envv->end (); ++i) |
1223 | for (char **i = vec->begin (); i != vec->end (); ++i) |
1222 | if (*i) |
1224 | if (*i) |
1223 | av_push (av, newSVpv (*i, 0)); |
1225 | PUSHs (sv_2mortal (newSVpv (*i, 0))); |
1224 | |
|
|
1225 | RETVAL = newRV_noinc ((SV *)av); |
|
|
1226 | } |
|
|
1227 | else |
|
|
1228 | RETVAL = &PL_sv_undef; |
|
|
1229 | } |
1226 | } |
1230 | OUTPUT: |
|
|
1231 | RETVAL |
|
|
1232 | |
1227 | |
1233 | int |
1228 | int |
1234 | rxvt_term::pty_ev_events (int events = EVENT_UNDEF) |
1229 | rxvt_term::pty_ev_events (int events = EVENT_UNDEF) |
1235 | CODE: |
1230 | CODE: |
1236 | RETVAL = THIS->pty_ev.events; |
1231 | RETVAL = THIS->pty_ev.events; |
… | |
… | |
1290 | void |
1285 | void |
1291 | rxvt_term::focus_in () |
1286 | rxvt_term::focus_in () |
1292 | |
1287 | |
1293 | void |
1288 | void |
1294 | rxvt_term::focus_out () |
1289 | rxvt_term::focus_out () |
|
|
1290 | |
|
|
1291 | void |
|
|
1292 | rxvt_term::key_press (unsigned int state, unsigned int keycode, Time time = CurrentTime) |
|
|
1293 | ALIAS: |
|
|
1294 | key_release = 1 |
|
|
1295 | CODE: |
|
|
1296 | { |
|
|
1297 | XKeyEvent xkey; |
|
|
1298 | |
|
|
1299 | memset (&xkey, 0, sizeof (xkey)); |
|
|
1300 | |
|
|
1301 | xkey.time = time; |
|
|
1302 | xkey.state = state; |
|
|
1303 | xkey.keycode = keycode; |
|
|
1304 | |
|
|
1305 | xkey.type = ix ? KeyRelease : KeyPress; |
|
|
1306 | xkey.display = THIS->dpy; |
|
|
1307 | xkey.window = THIS->vt; |
|
|
1308 | xkey.root = THIS->display->root; |
|
|
1309 | xkey.subwindow = THIS->vt; |
|
|
1310 | |
|
|
1311 | if (ix) |
|
|
1312 | THIS->key_release (xkey); |
|
|
1313 | else |
|
|
1314 | THIS->key_press (xkey); |
|
|
1315 | } |
1295 | |
1316 | |
1296 | void |
1317 | void |
1297 | rxvt_term::want_refresh () |
1318 | rxvt_term::want_refresh () |
1298 | CODE: |
1319 | CODE: |
1299 | THIS->want_refresh = 1; |
1320 | THIS->want_refresh = 1; |
… | |
… | |
1786 | : 1; |
1807 | : 1; |
1787 | |
1808 | |
1788 | XChangeProperty (THIS->dpy, window, property, |
1809 | XChangeProperty (THIS->dpy, window, property, |
1789 | type, format, PropModeReplace, |
1810 | type, format, PropModeReplace, |
1790 | (unsigned char *)data_, len / elemsize); |
1811 | (unsigned char *)data_, len / elemsize); |
1791 | XSync (THIS->dpy, 0); |
|
|
1792 | } |
1812 | } |
1793 | |
1813 | |
1794 | Atom |
1814 | Atom |
1795 | XInternAtom (rxvt_term *term, char *atom_name, int only_if_exists = FALSE) |
1815 | XInternAtom (rxvt_term *term, char *atom_name, int only_if_exists = FALSE) |
1796 | C_ARGS: term->dpy, atom_name, only_if_exists |
1816 | C_ARGS: term->dpy, atom_name, only_if_exists |