… | |
… | |
51 | |
51 | |
52 | ///////////////////////////////////////////////////////////////////////////// |
52 | ///////////////////////////////////////////////////////////////////////////// |
53 | |
53 | |
54 | typedef char * octet_string; |
54 | typedef char * octet_string; |
55 | typedef char * utf8_string; |
55 | typedef char * utf8_string; |
|
|
56 | typedef SV * urxvt_color; |
56 | |
57 | |
57 | typedef GdkPixbuf * urxvt__pixbuf; |
58 | typedef GdkPixbuf * urxvt__pixbuf; |
58 | typedef rxvt_img * urxvt__img; |
59 | typedef rxvt_img * urxvt__img; |
|
|
60 | |
|
|
61 | ///////////////////////////////////////////////////////////////////////////// |
|
|
62 | |
|
|
63 | static void |
|
|
64 | parse_color (rxvt_screen *s, rxvt_color &c, SV *sv) |
|
|
65 | { |
|
|
66 | //TODO: support component stuff |
|
|
67 | c.set (s, SvPVbyte_nolen (sv)); |
|
|
68 | } |
59 | |
69 | |
60 | ///////////////////////////////////////////////////////////////////////////// |
70 | ///////////////////////////////////////////////////////////////////////////// |
61 | |
71 | |
62 | static wchar_t * |
72 | static wchar_t * |
63 | sv2wcs (SV *sv) |
73 | sv2wcs (SV *sv) |
… | |
… | |
1930 | |
1940 | |
1931 | INCLUDE: $PERL <iom_perl.xs -pe s/IOM_MODULE/urxvt/g,s/IOM_CLASS/urxvt/g | |
1941 | INCLUDE: $PERL <iom_perl.xs -pe s/IOM_MODULE/urxvt/g,s/IOM_CLASS/urxvt/g | |
1932 | |
1942 | |
1933 | MODULE = urxvt PACKAGE = urxvt::pixbuf PREFIX = gdk_pixbuf_ |
1943 | MODULE = urxvt PACKAGE = urxvt::pixbuf PREFIX = gdk_pixbuf_ |
1934 | |
1944 | |
|
|
1945 | #if HAVE_PIXBUF |
|
|
1946 | |
1935 | urxvt::pixbuf gdk_pixbuf_new_from_file (octet_string filename, GError **error = 0) |
1947 | urxvt::pixbuf gdk_pixbuf_new_from_file (SV *klass, octet_string filename) |
|
|
1948 | C_ARGS: filename, 0 |
1936 | |
1949 | |
1937 | void |
1950 | void |
1938 | DESTROY (urxvt::pixbuf self) |
1951 | DESTROY (urxvt::pixbuf self) |
1939 | CODE: |
1952 | CODE: |
1940 | gdk_pixbuf_unref (self); |
1953 | gdk_pixbuf_unref (self); |
1941 | |
1954 | |
|
|
1955 | #endif |
|
|
1956 | |
|
|
1957 | MODULE = urxvt PACKAGE = urxvt::img |
|
|
1958 | |
|
|
1959 | #if HAVE_IMG |
|
|
1960 | |
|
|
1961 | # rxvt_img (rxvt_screen *screen, XRenderPictFormat *format, int width, int height); |
|
|
1962 | # rxvt_img (rxvt_screen *screen, XRenderPictFormat *format, int width, int height, Pixmap pixmap); |
|
|
1963 | |
|
|
1964 | void fill (urxvt::img self, SV *c) |
|
|
1965 | CODE: |
|
|
1966 | rxvt_color rc; |
|
|
1967 | parse_color (self->s, rc, c); |
|
|
1968 | self->fill (rc); |
|
|
1969 | |
|
|
1970 | void blur (urxvt::img self, int rh, int rv) |
|
|
1971 | CODE: |
|
|
1972 | self->blur (rh, rv); |
|
|
1973 | |
|
|
1974 | void brightness (urxvt::img self, double r, double g, double b, double a = 1.) |
|
|
1975 | CODE: |
|
|
1976 | self->brightness (r, g, b, a); |
|
|
1977 | |
|
|
1978 | void contrast (urxvt::img self, double r, double g, double b, double a = 1.) |
|
|
1979 | CODE: |
|
|
1980 | self->contrast (r, g, b, a); |
|
|
1981 | |
|
|
1982 | urxvt::img copy (urxvt::img self) |
|
|
1983 | CODE: |
|
|
1984 | RETVAL = self->copy (); |
|
|
1985 | OUTPUT: |
|
|
1986 | RETVAL |
|
|
1987 | |
|
|
1988 | urxvt::img scale (urxvt::img self, int new_width, int new_height) |
|
|
1989 | CODE: |
|
|
1990 | RETVAL = self->scale (new_width, new_height); |
|
|
1991 | OUTPUT: |
|
|
1992 | RETVAL |
|
|
1993 | |
|
|
1994 | # rxvt_img *transform (urxvt::img self, int new_width, int new_height, double matrix[16]); |
|
|
1995 | |
|
|
1996 | #endif |
|
|
1997 | |