Mercurial > geeqie.yaz
annotate src/pixbuf_util.h @ 89:b3149a34d0dd
Sat Oct 28 14:41:10 2006 John Ellis <johne@verizon.net>
* img-view.c: Use correct method to close the window using Escape key,
fixes bug #1231845. Also added more robust method to update window
list when a window is closed so this doesn't happen again.
* slideshow.c: Add sanity checks to exported functions to check for
NULL SlideShow pointers, to match rest of coding style.
author | gqview |
---|---|
date | Sat, 28 Oct 2006 18:49:38 +0000 |
parents | a4c1b7014e6e |
children | d063f97503b7 |
rev | line source |
---|---|
9 | 1 /* |
2 * GQview | |
3 * (C) 2004 John Ellis | |
4 * | |
5 * Author: John Ellis | |
6 * | |
7 * This software is released under the GNU General Public License (GNU GPL). | |
8 * Please read the included file COPYING for more information. | |
9 * This software comes with no warranty of any kind, use at your own risk! | |
10 */ | |
11 | |
12 | |
13 #ifndef PIXBUF_UTIL_H | |
14 #define PIXBUF_UTIL_H | |
15 | |
16 | |
17 gboolean pixbuf_to_file_as_png (GdkPixbuf *pixbuf, const char *filename); | |
18 gboolean pixbuf_to_file_as_jpg(GdkPixbuf *pixbuf, const gchar *filename, gint quality); | |
19 | |
20 | |
21 GdkPixbuf *pixbuf_inline(const gchar *key); | |
22 | |
23 #define PIXBUF_INLINE_FOLDER_CLOSED "folder_closed" | |
24 #define PIXBUF_INLINE_FOLDER_LOCKED "folder_locked" | |
25 #define PIXBUF_INLINE_FOLDER_OPEN "folder_open" | |
26 #define PIXBUF_INLINE_FOLDER_UP "folder_up" | |
27 #define PIXBUF_INLINE_SCROLLER "scroller" | |
28 #define PIXBUF_INLINE_BROKEN "broken" | |
29 #define PIXBUF_INLINE_LOGO "logo" | |
30 | |
41
6281cc38e5ca
Wed Apr 27 15:17:57 2005 John Ellis <johne@verizon.net>
gqview
parents:
33
diff
changeset
|
31 #define PIXBUF_INLINE_ICON_FLOAT "icon_float" |
6281cc38e5ca
Wed Apr 27 15:17:57 2005 John Ellis <johne@verizon.net>
gqview
parents:
33
diff
changeset
|
32 #define PIXBUF_INLINE_ICON_THUMB "icon_thumb" |
6281cc38e5ca
Wed Apr 27 15:17:57 2005 John Ellis <johne@verizon.net>
gqview
parents:
33
diff
changeset
|
33 |
9 | 34 |
35 GdkPixbuf *pixbuf_copy_rotate_90(GdkPixbuf *src, gint counter_clockwise); | |
36 GdkPixbuf *pixbuf_copy_mirror(GdkPixbuf *src, gint mirror, gint flip); | |
37 | |
38 | |
39 void pixbuf_draw_rect_fill(GdkPixbuf *pb, | |
40 gint x, gint y, gint w, gint h, | |
41 gint r, gint g, gint b, gint a); | |
42 | |
43 void pixbuf_draw_rect(GdkPixbuf *pb, | |
44 gint x, gint y, gint w, gint h, | |
45 gint r, gint g, gint b, gint a, | |
46 gint left, gint right, gint top, gint bottom); | |
47 | |
48 void pixbuf_set_rect_fill(GdkPixbuf *pb, | |
49 gint x, gint y, gint w, gint h, | |
50 gint r, gint g, gint b, gint a); | |
51 | |
52 void pixbuf_set_rect(GdkPixbuf *pb, | |
53 gint x, gint y, gint w, gint h, | |
54 gint r, gint g, gint b, gint a, | |
55 gint left, gint right, gint top, gint bottom); | |
56 | |
57 void pixbuf_pixel_set(GdkPixbuf *pb, gint x, gint y, gint r, gint g, gint b, gint a); | |
58 | |
59 | |
60 void pixbuf_draw_layout(GdkPixbuf *pixbuf, PangoLayout *layout, GtkWidget *widget, | |
61 gint x, gint y, | |
62 guint8 r, guint8 g, guint8 b, guint8 a); | |
63 | |
64 | |
33
a41ecbb26a96
Wed Apr 6 06:41:25 2005 John Ellis <johne@verizon.net>
gqview
parents:
9
diff
changeset
|
65 void pixbuf_draw_triangle(GdkPixbuf *pb, |
a41ecbb26a96
Wed Apr 6 06:41:25 2005 John Ellis <johne@verizon.net>
gqview
parents:
9
diff
changeset
|
66 gint clip_x, gint clip_y, gint clip_w, gint clip_h, |
a41ecbb26a96
Wed Apr 6 06:41:25 2005 John Ellis <johne@verizon.net>
gqview
parents:
9
diff
changeset
|
67 gint x1, gint y1, gint x2, gint y2, gint x3, gint y3, |
a41ecbb26a96
Wed Apr 6 06:41:25 2005 John Ellis <johne@verizon.net>
gqview
parents:
9
diff
changeset
|
68 guint8 r, guint8 g, guint8 b, guint8 a); |
a41ecbb26a96
Wed Apr 6 06:41:25 2005 John Ellis <johne@verizon.net>
gqview
parents:
9
diff
changeset
|
69 |
a41ecbb26a96
Wed Apr 6 06:41:25 2005 John Ellis <johne@verizon.net>
gqview
parents:
9
diff
changeset
|
70 void pixbuf_draw_line(GdkPixbuf *pb, |
a41ecbb26a96
Wed Apr 6 06:41:25 2005 John Ellis <johne@verizon.net>
gqview
parents:
9
diff
changeset
|
71 gint clip_x, gint clip_y, gint clip_w, gint clip_h, |
a41ecbb26a96
Wed Apr 6 06:41:25 2005 John Ellis <johne@verizon.net>
gqview
parents:
9
diff
changeset
|
72 gint x1, gint y1, gint x2, gint y2, |
a41ecbb26a96
Wed Apr 6 06:41:25 2005 John Ellis <johne@verizon.net>
gqview
parents:
9
diff
changeset
|
73 guint8 r, guint8 g, guint8 b, guint8 a); |
a41ecbb26a96
Wed Apr 6 06:41:25 2005 John Ellis <johne@verizon.net>
gqview
parents:
9
diff
changeset
|
74 |
a41ecbb26a96
Wed Apr 6 06:41:25 2005 John Ellis <johne@verizon.net>
gqview
parents:
9
diff
changeset
|
75 void pixbuf_draw_shadow(GdkPixbuf *pb, |
a41ecbb26a96
Wed Apr 6 06:41:25 2005 John Ellis <johne@verizon.net>
gqview
parents:
9
diff
changeset
|
76 gint clip_x, gint clip_y, gint clip_w, gint clip_h, |
a41ecbb26a96
Wed Apr 6 06:41:25 2005 John Ellis <johne@verizon.net>
gqview
parents:
9
diff
changeset
|
77 gint x, gint y, gint w, gint h, gint border, |
a41ecbb26a96
Wed Apr 6 06:41:25 2005 John Ellis <johne@verizon.net>
gqview
parents:
9
diff
changeset
|
78 guint8 r, guint8 g, guint8 b, guint8 a); |
a41ecbb26a96
Wed Apr 6 06:41:25 2005 John Ellis <johne@verizon.net>
gqview
parents:
9
diff
changeset
|
79 |
82
a4c1b7014e6e
Thu Oct 19 15:20:51 2006 John Ellis <johne@verizon.net>
gqview
parents:
41
diff
changeset
|
80 void pixbuf_desaturate_rect(GdkPixbuf *pb, |
a4c1b7014e6e
Thu Oct 19 15:20:51 2006 John Ellis <johne@verizon.net>
gqview
parents:
41
diff
changeset
|
81 gint x, gint y, gint w, gint h); |
a4c1b7014e6e
Thu Oct 19 15:20:51 2006 John Ellis <johne@verizon.net>
gqview
parents:
41
diff
changeset
|
82 |
a4c1b7014e6e
Thu Oct 19 15:20:51 2006 John Ellis <johne@verizon.net>
gqview
parents:
41
diff
changeset
|
83 |
33
a41ecbb26a96
Wed Apr 6 06:41:25 2005 John Ellis <johne@verizon.net>
gqview
parents:
9
diff
changeset
|
84 /* clipping utils */ |
a41ecbb26a96
Wed Apr 6 06:41:25 2005 John Ellis <johne@verizon.net>
gqview
parents:
9
diff
changeset
|
85 |
a41ecbb26a96
Wed Apr 6 06:41:25 2005 John Ellis <johne@verizon.net>
gqview
parents:
9
diff
changeset
|
86 gint util_clip_region(gint x, gint y, gint w, gint h, |
a41ecbb26a96
Wed Apr 6 06:41:25 2005 John Ellis <johne@verizon.net>
gqview
parents:
9
diff
changeset
|
87 gint clip_x, gint clip_y, gint clip_w, gint clip_h, |
a41ecbb26a96
Wed Apr 6 06:41:25 2005 John Ellis <johne@verizon.net>
gqview
parents:
9
diff
changeset
|
88 gint *rx, gint *ry, gint *rw, gint *rh); |
a41ecbb26a96
Wed Apr 6 06:41:25 2005 John Ellis <johne@verizon.net>
gqview
parents:
9
diff
changeset
|
89 void util_clip_triangle(gint x1, gint y1, gint x2, gint y2, gint x3, gint y3, |
a41ecbb26a96
Wed Apr 6 06:41:25 2005 John Ellis <johne@verizon.net>
gqview
parents:
9
diff
changeset
|
90 gint *rx, gint *ry, gint *rw, gint *rh); |
a41ecbb26a96
Wed Apr 6 06:41:25 2005 John Ellis <johne@verizon.net>
gqview
parents:
9
diff
changeset
|
91 |
a41ecbb26a96
Wed Apr 6 06:41:25 2005 John Ellis <johne@verizon.net>
gqview
parents:
9
diff
changeset
|
92 |
9 | 93 #endif |
94 | |
95 |