annotate src/pixbuf_util.h @ 309:99139bf9f380

Use path_from_utf8() on the passed filename. Add const attribute.
author zas_
date Fri, 11 Apr 2008 14:27:55 +0000
parents f6e307c7bad6
children ddabc4873a3f
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
9
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
1 /*
196
f6e307c7bad6 rename GQview -> Geeqie over the code
nadvornik
parents: 91
diff changeset
2 * Geeqie
9
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
3 * (C) 2004 John Ellis
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
4 *
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
5 * Author: John Ellis
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
6 *
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
7 * This software is released under the GNU General Public License (GNU GPL).
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
8 * Please read the included file COPYING for more information.
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
9 * This software comes with no warranty of any kind, use at your own risk!
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
10 */
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
11
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
12
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
13 #ifndef PIXBUF_UTIL_H
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
14 #define PIXBUF_UTIL_H
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
15
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
16
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
17 gboolean pixbuf_to_file_as_png (GdkPixbuf *pixbuf, const char *filename);
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
18 gboolean pixbuf_to_file_as_jpg(GdkPixbuf *pixbuf, const gchar *filename, gint quality);
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
19
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
20
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
21 GdkPixbuf *pixbuf_inline(const gchar *key);
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
22
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
23 #define PIXBUF_INLINE_FOLDER_CLOSED "folder_closed"
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
24 #define PIXBUF_INLINE_FOLDER_LOCKED "folder_locked"
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
25 #define PIXBUF_INLINE_FOLDER_OPEN "folder_open"
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
26 #define PIXBUF_INLINE_FOLDER_UP "folder_up"
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
27 #define PIXBUF_INLINE_SCROLLER "scroller"
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
28 #define PIXBUF_INLINE_BROKEN "broken"
91
d063f97503b7 Wed Nov 1 11:39:48 2006 John Ellis <johne@verizon.net>
gqview
parents: 82
diff changeset
29 #define PIXBUF_INLINE_ICON "icon"
9
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
30 #define PIXBUF_INLINE_LOGO "logo"
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
31
41
6281cc38e5ca Wed Apr 27 15:17:57 2005 John Ellis <johne@verizon.net>
gqview
parents: 33
diff changeset
32 #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
33 #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
34
91
d063f97503b7 Wed Nov 1 11:39:48 2006 John Ellis <johne@verizon.net>
gqview
parents: 82
diff changeset
35 #define PIXBUF_INLINE_ICON_BOOK "icon_book"
d063f97503b7 Wed Nov 1 11:39:48 2006 John Ellis <johne@verizon.net>
gqview
parents: 82
diff changeset
36 #define PIXBUF_INLINE_ICON_CONFIG "icon_config"
d063f97503b7 Wed Nov 1 11:39:48 2006 John Ellis <johne@verizon.net>
gqview
parents: 82
diff changeset
37 #define PIXBUF_INLINE_ICON_TOOLS "icon_tools"
d063f97503b7 Wed Nov 1 11:39:48 2006 John Ellis <johne@verizon.net>
gqview
parents: 82
diff changeset
38 #define PIXBUF_INLINE_ICON_VIEW "icon_view"
d063f97503b7 Wed Nov 1 11:39:48 2006 John Ellis <johne@verizon.net>
gqview
parents: 82
diff changeset
39
9
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
40
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
41 GdkPixbuf *pixbuf_copy_rotate_90(GdkPixbuf *src, gint counter_clockwise);
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
42 GdkPixbuf *pixbuf_copy_mirror(GdkPixbuf *src, gint mirror, gint flip);
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
43
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
44
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
45 void pixbuf_draw_rect_fill(GdkPixbuf *pb,
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
46 gint x, gint y, gint w, gint h,
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
47 gint r, gint g, gint b, gint a);
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
48
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
49 void pixbuf_draw_rect(GdkPixbuf *pb,
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
50 gint x, gint y, gint w, gint h,
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
51 gint r, gint g, gint b, gint a,
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
52 gint left, gint right, gint top, gint bottom);
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
53
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
54 void pixbuf_set_rect_fill(GdkPixbuf *pb,
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
55 gint x, gint y, gint w, gint h,
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
56 gint r, gint g, gint b, gint a);
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
57
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
58 void pixbuf_set_rect(GdkPixbuf *pb,
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
59 gint x, gint y, gint w, gint h,
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
60 gint r, gint g, gint b, gint a,
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
61 gint left, gint right, gint top, gint bottom);
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
62
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
63 void pixbuf_pixel_set(GdkPixbuf *pb, gint x, gint y, gint r, gint g, gint b, gint a);
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
64
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
65
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
66 void pixbuf_draw_layout(GdkPixbuf *pixbuf, PangoLayout *layout, GtkWidget *widget,
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
67 gint x, gint y,
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
68 guint8 r, guint8 g, guint8 b, guint8 a);
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
69
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
70
33
a41ecbb26a96 Wed Apr 6 06:41:25 2005 John Ellis <johne@verizon.net>
gqview
parents: 9
diff changeset
71 void pixbuf_draw_triangle(GdkPixbuf *pb,
a41ecbb26a96 Wed Apr 6 06:41:25 2005 John Ellis <johne@verizon.net>
gqview
parents: 9
diff changeset
72 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
73 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
74 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
75
a41ecbb26a96 Wed Apr 6 06:41:25 2005 John Ellis <johne@verizon.net>
gqview
parents: 9
diff changeset
76 void pixbuf_draw_line(GdkPixbuf *pb,
a41ecbb26a96 Wed Apr 6 06:41:25 2005 John Ellis <johne@verizon.net>
gqview
parents: 9
diff changeset
77 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
78 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
79 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
80
a41ecbb26a96 Wed Apr 6 06:41:25 2005 John Ellis <johne@verizon.net>
gqview
parents: 9
diff changeset
81 void pixbuf_draw_shadow(GdkPixbuf *pb,
a41ecbb26a96 Wed Apr 6 06:41:25 2005 John Ellis <johne@verizon.net>
gqview
parents: 9
diff changeset
82 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
83 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
84 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
85
82
a4c1b7014e6e Thu Oct 19 15:20:51 2006 John Ellis <johne@verizon.net>
gqview
parents: 41
diff changeset
86 void pixbuf_desaturate_rect(GdkPixbuf *pb,
a4c1b7014e6e Thu Oct 19 15:20:51 2006 John Ellis <johne@verizon.net>
gqview
parents: 41
diff changeset
87 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
88
a4c1b7014e6e Thu Oct 19 15:20:51 2006 John Ellis <johne@verizon.net>
gqview
parents: 41
diff changeset
89
33
a41ecbb26a96 Wed Apr 6 06:41:25 2005 John Ellis <johne@verizon.net>
gqview
parents: 9
diff changeset
90 /* clipping utils */
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 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
93 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
94 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
95 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
96 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
97
a41ecbb26a96 Wed Apr 6 06:41:25 2005 John Ellis <johne@verizon.net>
gqview
parents: 9
diff changeset
98
9
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
99 #endif
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
100
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
101