1 /* -*- c-basic-offset:2; tab-width:2; indent-tabs-mode:nil -*- */
2 
3 #ifndef __UI_IMAGELIB_H__
4 #define __UI_IMAGELIB_H__
5 
6 #include "ui_window.h"
7 #include "ui_picture.h"
8 
9 typedef struct _GdkPixbuf* GdkPixbufPtr;
10 
11 void ui_imagelib_display_opened(Display *disp);
12 
13 void ui_imagelib_display_closed(Display *disp);
14 
15 Pixmap ui_imagelib_load_file_for_background(ui_window_t *win, char *path,
16                                             ui_picture_modifier_t *pic_mod);
17 
18 Pixmap ui_imagelib_get_transparent_background(ui_window_t *win, ui_picture_modifier_t *pic_mod);
19 
20 int ui_imagelib_load_file(ui_display_t *disp, char *path, u_int32_t **cardinal, Pixmap *pixmap,
21                           PixmapMask *mask, u_int *width, u_int *height, int keep_aspect);
22 
23 Pixmap ui_imagelib_pixbuf_to_pixmap(ui_window_t *win, ui_picture_modifier_t *pic_mod,
24                                     GdkPixbufPtr pixbuf);
25 
26 void ui_destroy_image(Display *display, Pixmap pixmap);
27 
28 #ifdef USE_XLIB
29 #define ui_destroy_mask(display, mask) if (mask) { ui_destroy_image(display, mask); }
30 #else
31 void ui_destroy_mask(Display *display, PixmapMask mask);
32 #endif
33 
34 #endif
35