… | |
… | |
78 | |
78 | |
79 | #if defined(BG_IMAGE_FROM_FILE) || defined(ENABLE_TRANSPARENCY) |
79 | #if defined(BG_IMAGE_FROM_FILE) || defined(ENABLE_TRANSPARENCY) |
80 | # define HAVE_BG_PIXMAP 1 |
80 | # define HAVE_BG_PIXMAP 1 |
81 | #endif |
81 | #endif |
82 | |
82 | |
|
|
83 | #include <ecb.h> |
83 | #include "encoding.h" |
84 | #include "encoding.h" |
84 | #include "rxvtutil.h" |
85 | #include "rxvtutil.h" |
85 | #include "rxvtfont.h" |
86 | #include "rxvtfont.h" |
86 | #include "rxvttoolkit.h" |
87 | #include "rxvttoolkit.h" |
87 | #include "scrollbar.h" |
88 | #include "scrollbar.h" |
… | |
… | |
236 | int h_align, v_align; /* percents of the window size: |
237 | int h_align, v_align; /* percents of the window size: |
237 | 0 - left align, 50 - center, 100 - right */ |
238 | 0 - left align, 50 - center, 100 - right */ |
238 | |
239 | |
239 | # ifdef HAVE_PIXBUF |
240 | # ifdef HAVE_PIXBUF |
240 | GdkPixbuf *pixbuf; |
241 | GdkPixbuf *pixbuf; |
241 | # endif |
|
|
242 | |
242 | |
243 | ~rxvt_image () |
243 | ~rxvt_image () |
244 | { |
244 | { |
245 | # ifdef HAVE_PIXBUF |
|
|
246 | if (pixbuf) |
245 | if (pixbuf) |
247 | g_object_unref (pixbuf); |
246 | g_object_unref (pixbuf); |
|
|
247 | } |
|
|
248 | |
|
|
249 | int width () |
|
|
250 | { |
|
|
251 | return gdk_pixbuf_get_width (pixbuf); |
|
|
252 | } |
|
|
253 | int height () |
|
|
254 | { |
|
|
255 | return gdk_pixbuf_get_height (pixbuf); |
|
|
256 | } |
248 | # endif |
257 | # endif |
249 | } |
|
|
250 | |
258 | |
251 | int width () |
|
|
252 | { |
|
|
253 | # ifdef HAVE_PIXBUF |
|
|
254 | return gdk_pixbuf_get_width (pixbuf); |
|
|
255 | # endif |
|
|
256 | } |
|
|
257 | int height () |
|
|
258 | { |
|
|
259 | # ifdef HAVE_PIXBUF |
|
|
260 | return gdk_pixbuf_get_height (pixbuf); |
|
|
261 | # endif |
|
|
262 | } |
|
|
263 | bool set_file (const char *file); |
259 | bool set_file (const char *file); |
264 | bool set_geometry (const char *geom, bool update = false); |
260 | bool set_geometry (const char *geom, bool update = false); |
265 | void set_default_geometry () |
261 | void set_default_geometry () |
266 | { |
262 | { |
267 | h_scale = v_scale = defaultScale; |
263 | h_scale = v_scale = defaultScale; |
… | |
… | |
831 | // that are not representable in unicode, as well as characters |
827 | // that are not representable in unicode, as well as characters |
832 | // not fitting in the BMP. |
828 | // not fitting in the BMP. |
833 | struct compose_char |
829 | struct compose_char |
834 | { |
830 | { |
835 | unicode_t c1, c2; // any chars != NOCHAR are valid |
831 | unicode_t c1, c2; // any chars != NOCHAR are valid |
836 | #if __cplusplus >= 201103L |
832 | #if __cplusplus >= 201103L || ECB_GCC_VERSION(4,4) |
837 | compose_char () = default; |
833 | compose_char () = default; |
838 | #endif |
834 | #endif |
839 | compose_char (unicode_t c1, unicode_t c2) |
835 | compose_char (unicode_t c1, unicode_t c2) |
840 | : c1(c1), c2(c2) |
836 | : c1(c1), c2(c2) |
841 | { } |
837 | { } |