… | |
… | |
49 | |
49 | |
50 | #undef LINENO |
50 | #undef LINENO |
51 | #define LINENO(n) MOD (THIS->term_start + int(n), THIS->total_rows) |
51 | #define LINENO(n) MOD (THIS->term_start + int(n), THIS->total_rows) |
52 | #undef ROW |
52 | #undef ROW |
53 | #define ROW(n) THIS->row_buf [LINENO (n)] |
53 | #define ROW(n) THIS->row_buf [LINENO (n)] |
|
|
54 | |
|
|
55 | #define ENABLE_PERL_FRILLS 1 |
54 | |
56 | |
55 | ///////////////////////////////////////////////////////////////////////////// |
57 | ///////////////////////////////////////////////////////////////////////////// |
56 | |
58 | |
57 | static SV * |
59 | static SV * |
58 | taint (SV *sv) |
60 | taint (SV *sv) |
… | |
… | |
891 | RETVAL |
893 | RETVAL |
892 | |
894 | |
893 | void |
895 | void |
894 | rxvt_term::destroy () |
896 | rxvt_term::destroy () |
895 | |
897 | |
|
|
898 | #if ENABLE_PERL_FRILLS |
|
|
899 | |
|
|
900 | void |
|
|
901 | rxvt_term::XListProperties (U32 window) |
|
|
902 | PPCODE: |
|
|
903 | { |
|
|
904 | int count; |
|
|
905 | Atom *props = XListProperties (THIS->display->display, (Window)window, &count); |
|
|
906 | |
|
|
907 | EXTEND (SP, count); |
|
|
908 | while (count--) |
|
|
909 | PUSHs (newSVuv ((U32)props [count])); |
|
|
910 | |
|
|
911 | XFree (props); |
|
|
912 | } |
|
|
913 | |
|
|
914 | void |
|
|
915 | rxvt_term::XGetWindowProperty (U32 window, U32 property) |
|
|
916 | PPCODE: |
|
|
917 | { |
|
|
918 | Atom type; |
|
|
919 | int format; |
|
|
920 | unsigned long nitems; |
|
|
921 | unsigned long bytes_after; |
|
|
922 | unsigned char *prop; |
|
|
923 | XGetWindowProperty (THIS->display->display, (Window)window, (Atom)property, |
|
|
924 | 0, 1<<30, 0, AnyPropertyType, |
|
|
925 | &type, &format, &nitems, &bytes_after, &prop); |
|
|
926 | if (type != None) |
|
|
927 | { |
|
|
928 | EXTEND (SP, 3); |
|
|
929 | PUSHs (newSVuv ((U32)type)); |
|
|
930 | PUSHs (newSViv (format)); |
|
|
931 | PUSHs (newSVpvn ((char *)prop, nitems * format / 8)); |
|
|
932 | XFree (prop); |
|
|
933 | } |
|
|
934 | } |
|
|
935 | |
|
|
936 | void |
|
|
937 | rxvt_term::XChangeWindowProperty (U32 window, U32 property, U32 type, int format, SV *data) |
|
|
938 | CODE: |
|
|
939 | { |
|
|
940 | STRLEN len; |
|
|
941 | char *data_ = SvPVbyte (data, len); |
|
|
942 | |
|
|
943 | XChangeProperty (THIS->display->display, (Window)window, (Atom)property, |
|
|
944 | type, format, PropModeReplace, |
|
|
945 | (unsigned char *)data, len * 8 / format); |
|
|
946 | } |
|
|
947 | |
|
|
948 | void |
|
|
949 | rxvt_term::XDeleteProperty (U32 window, U32 property) |
|
|
950 | CODE: |
|
|
951 | XDeleteProperty (THIS->display->display, (Window)window, (Atom)property); |
|
|
952 | |
|
|
953 | U32 |
|
|
954 | rxvt_term::DefaultRootWindow () |
|
|
955 | CODE: |
|
|
956 | RETVAL = (U32)THIS->display->root; |
|
|
957 | OUTPUT: |
|
|
958 | RETVAL |
|
|
959 | |
|
|
960 | U32 |
|
|
961 | rxvt_term::XCreateSimpleWindow (U32 parent, int x, int y, unsigned int width, unsigned int height) |
|
|
962 | CODE: |
|
|
963 | RETVAL = XCreateSimpleWindow (THIS->display->display, (Window)parent, |
|
|
964 | x, y, width, height, 0, |
|
|
965 | THIS->pix_colors_focused[Color_border], |
|
|
966 | THIS->pix_colors_focused[Color_border]); |
|
|
967 | OUTPUT: |
|
|
968 | RETVAL |
|
|
969 | |
|
|
970 | void |
|
|
971 | rxvt_term::XReparentWindow (U32 window, U32 parent, int x = 0, int y = 0) |
|
|
972 | CODE: |
|
|
973 | XReparentWindow (THIS->display->display, (Window)window, (Window)parent, x, y); |
|
|
974 | |
|
|
975 | void |
|
|
976 | rxvt_term::XMapWindow (U32 window) |
|
|
977 | CODE: |
|
|
978 | XMapWindow (THIS->display->display, (Window)window); |
|
|
979 | |
|
|
980 | void |
|
|
981 | rxvt_term::XUnmapWindow (U32 window) |
|
|
982 | CODE: |
|
|
983 | XUnmapWindow (THIS->display->display, (Window)window); |
|
|
984 | |
|
|
985 | #endif |
|
|
986 | |
896 | void |
987 | void |
897 | rxvt_term::set_should_invoke (int htype, int inc) |
988 | rxvt_term::set_should_invoke (int htype, int inc) |
898 | CODE: |
989 | CODE: |
899 | THIS->perl.should_invoke [htype] += inc; |
990 | THIS->perl.should_invoke [htype] += inc; |
900 | |
991 | |
… | |
… | |
1112 | THIS->vt_select_input (); |
1203 | THIS->vt_select_input (); |
1113 | |
1204 | |
1114 | U32 |
1205 | U32 |
1115 | rxvt_term::rstyle (U32 new_rstyle = THIS->rstyle) |
1206 | rxvt_term::rstyle (U32 new_rstyle = THIS->rstyle) |
1116 | CODE: |
1207 | CODE: |
1117 | { |
|
|
1118 | RETVAL = THIS->rstyle; |
1208 | RETVAL = THIS->rstyle; |
1119 | THIS->rstyle = new_rstyle; |
1209 | THIS->rstyle = new_rstyle; |
1120 | } |
|
|
1121 | OUTPUT: |
1210 | OUTPUT: |
1122 | RETVAL |
1211 | RETVAL |
1123 | |
1212 | |
1124 | int |
1213 | int |
1125 | rxvt_term::view_start (int newval = -1) |
1214 | rxvt_term::view_start (int newval = -1) |