annotate src/pixbuf_util.h @ 1808:6c61c246506b

Fix a small issue with strptime strptime do not initialize all fields. So the undefined fields could end in crash later on.
author mow
date Sun, 28 Feb 2010 15:17:12 +0000
parents 956aab097ea7
children
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
1802
956aab097ea7 added 2010 to copyright text
nadvornik
parents: 1443
diff changeset
4 * Copyright (C) 2008 - 2010 The Geeqie Team
9
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
5 *
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
6 * Author: John Ellis
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
7 *
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
8 * This software is released under the GNU General Public License (GNU GPL).
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
9 * Please read the included file COPYING for more information.
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
10 * 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
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
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
14 #ifndef PIXBUF_UTIL_H
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
15 #define PIXBUF_UTIL_H
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
1000
4fe8f9656107 For the sake of consistency, use glib basic types everywhere.
zas_
parents: 864
diff changeset
18 gboolean pixbuf_to_file_as_png (GdkPixbuf *pixbuf, const gchar *filename);
9
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
19 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
20
1334
f97450e632a1 create toolbar from ui_manager
nadvornik
parents: 1284
diff changeset
21 void pixbuf_inline_register_stock_icons(void);
1341
63eb48237608 load icons for external editors
nadvornik
parents: 1334
diff changeset
22 gboolean register_theme_icon_as_stock(const gchar *key, const gchar *icon);
9
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
23
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
24 GdkPixbuf *pixbuf_inline(const gchar *key);
864
f40509d56fe3 added pixbuf_fallback function
nadvornik
parents: 839
diff changeset
25 GdkPixbuf *pixbuf_fallback(FileData *fd, gint requested_width, gint requested_height);
f40509d56fe3 added pixbuf_fallback function
nadvornik
parents: 839
diff changeset
26
1443
f879e7d94c6d gint -> gboolean.
zas_
parents: 1341
diff changeset
27 gboolean pixbuf_scale_aspect(gint req_w, gint req_h, gint old_w, gint old_h, gint *new_w, gint *new_h);
9
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
28
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
29 #define PIXBUF_INLINE_FOLDER_CLOSED "folder_closed"
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
30 #define PIXBUF_INLINE_FOLDER_LOCKED "folder_locked"
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
31 #define PIXBUF_INLINE_FOLDER_OPEN "folder_open"
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
32 #define PIXBUF_INLINE_FOLDER_UP "folder_up"
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
33 #define PIXBUF_INLINE_SCROLLER "scroller"
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
34 #define PIXBUF_INLINE_BROKEN "broken"
91
d063f97503b7 Wed Nov 1 11:39:48 2006 John Ellis <johne@verizon.net>
gqview
parents: 82
diff changeset
35 #define PIXBUF_INLINE_ICON "icon"
9
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
36 #define PIXBUF_INLINE_LOGO "logo"
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
37
41
6281cc38e5ca Wed Apr 27 15:17:57 2005 John Ellis <johne@verizon.net>
gqview
parents: 33
diff changeset
38 #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
39 #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
40
91
d063f97503b7 Wed Nov 1 11:39:48 2006 John Ellis <johne@verizon.net>
gqview
parents: 82
diff changeset
41 #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
42 #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
43 #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
44 #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
45
9
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
46
1443
f879e7d94c6d gint -> gboolean.
zas_
parents: 1341
diff changeset
47 GdkPixbuf *pixbuf_copy_rotate_90(GdkPixbuf *src, gboolean counter_clockwise);
f879e7d94c6d gint -> gboolean.
zas_
parents: 1341
diff changeset
48 GdkPixbuf *pixbuf_copy_mirror(GdkPixbuf *src, gboolean mirror, gboolean flip);
839
14520c3a91f8 rotate thumbnails by exif
nadvornik
parents: 475
diff changeset
49 GdkPixbuf* pixbuf_apply_orientation(GdkPixbuf *pixbuf, gint orientation);
9
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
50
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
51 void pixbuf_draw_rect_fill(GdkPixbuf *pb,
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
52 gint x, gint y, gint w, gint h,
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
53 gint r, gint g, gint b, gint a);
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
54
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
55 void pixbuf_draw_rect(GdkPixbuf *pb,
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
56 gint x, gint y, gint w, gint h,
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
57 gint r, gint g, gint b, gint a,
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
58 gint left, gint right, gint top, gint bottom);
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
59
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
60 void pixbuf_set_rect_fill(GdkPixbuf *pb,
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
61 gint x, gint y, gint w, gint h,
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
62 gint r, gint g, gint b, gint a);
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
63
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
64 void pixbuf_set_rect(GdkPixbuf *pb,
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
65 gint x, gint y, gint w, gint h,
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
66 gint r, gint g, gint b, gint a,
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
67 gint left, gint right, gint top, gint bottom);
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
68
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
69 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
70
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
71
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
72 void pixbuf_draw_layout(GdkPixbuf *pixbuf, PangoLayout *layout, GtkWidget *widget,
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
73 gint x, gint y,
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
74 guint8 r, guint8 g, guint8 b, guint8 a);
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
75
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
76
33
a41ecbb26a96 Wed Apr 6 06:41:25 2005 John Ellis <johne@verizon.net>
gqview
parents: 9
diff changeset
77 void pixbuf_draw_triangle(GdkPixbuf *pb,
a41ecbb26a96 Wed Apr 6 06:41:25 2005 John Ellis <johne@verizon.net>
gqview
parents: 9
diff changeset
78 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
79 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
80 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
81
a41ecbb26a96 Wed Apr 6 06:41:25 2005 John Ellis <johne@verizon.net>
gqview
parents: 9
diff changeset
82 void pixbuf_draw_line(GdkPixbuf *pb,
a41ecbb26a96 Wed Apr 6 06:41:25 2005 John Ellis <johne@verizon.net>
gqview
parents: 9
diff changeset
83 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
84 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
85 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
86
a41ecbb26a96 Wed Apr 6 06:41:25 2005 John Ellis <johne@verizon.net>
gqview
parents: 9
diff changeset
87 void pixbuf_draw_shadow(GdkPixbuf *pb,
a41ecbb26a96 Wed Apr 6 06:41:25 2005 John Ellis <johne@verizon.net>
gqview
parents: 9
diff changeset
88 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
89 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
90 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
91
82
a4c1b7014e6e Thu Oct 19 15:20:51 2006 John Ellis <johne@verizon.net>
gqview
parents: 41
diff changeset
92 void pixbuf_desaturate_rect(GdkPixbuf *pb,
a4c1b7014e6e Thu Oct 19 15:20:51 2006 John Ellis <johne@verizon.net>
gqview
parents: 41
diff changeset
93 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
94
a4c1b7014e6e Thu Oct 19 15:20:51 2006 John Ellis <johne@verizon.net>
gqview
parents: 41
diff changeset
95
33
a41ecbb26a96 Wed Apr 6 06:41:25 2005 John Ellis <johne@verizon.net>
gqview
parents: 9
diff changeset
96 /* clipping utils */
a41ecbb26a96 Wed Apr 6 06:41:25 2005 John Ellis <johne@verizon.net>
gqview
parents: 9
diff changeset
97
1443
f879e7d94c6d gint -> gboolean.
zas_
parents: 1341
diff changeset
98 gboolean util_clip_region(gint x, gint y, gint w, gint h,
f879e7d94c6d gint -> gboolean.
zas_
parents: 1341
diff changeset
99 gint clip_x, gint clip_y, gint clip_w, gint clip_h,
f879e7d94c6d gint -> gboolean.
zas_
parents: 1341
diff changeset
100 gint *rx, gint *ry, gint *rw, gint *rh);
33
a41ecbb26a96 Wed Apr 6 06:41:25 2005 John Ellis <johne@verizon.net>
gqview
parents: 9
diff changeset
101 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
102 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
103
a41ecbb26a96 Wed Apr 6 06:41:25 2005 John Ellis <johne@verizon.net>
gqview
parents: 9
diff changeset
104
9
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
105 #endif
1055
1646720364cf Adding a vim modeline to all files - patch by Klaus Ethgen
nadvornik
parents: 1000
diff changeset
106 /* vim: set shiftwidth=8 softtabstop=0 cindent cinoptions={1s: */