annotate src/color-man.h @ 1675:717374fb1bbd

fixed destroying of menu data Make sure that menu destroy functions do not access parent widget structures that are already destroyed There are 2 ways to achieve this: - use g_signal_handlers_disconnect_matched() like in vf_destroy_cb() - use separate data structure passed to *_popup_menu_destroy_cb() like in img-view.
author nadvornik
date Tue, 21 Jul 2009 14:17:01 +0000
parents 69f7270b3b27
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
113
55166d93498d Fri Nov 24 21:37:01 2006 John Ellis <johne@verizon.net>
gqview
parents:
diff changeset
1 /*
196
f6e307c7bad6 rename GQview -> Geeqie over the code
nadvornik
parents: 115
diff changeset
2 * Geeqie
113
55166d93498d Fri Nov 24 21:37:01 2006 John Ellis <johne@verizon.net>
gqview
parents:
diff changeset
3 * (C) 2006 John Ellis
1284
8b89e3ff286b Add year 2009 to copyright info everywhere.
zas_
parents: 1055
diff changeset
4 * Copyright (C) 2008 - 2009 The Geeqie Team
113
55166d93498d Fri Nov 24 21:37:01 2006 John Ellis <johne@verizon.net>
gqview
parents:
diff changeset
5 *
55166d93498d Fri Nov 24 21:37:01 2006 John Ellis <johne@verizon.net>
gqview
parents:
diff changeset
6 * Author: John Ellis
55166d93498d Fri Nov 24 21:37:01 2006 John Ellis <johne@verizon.net>
gqview
parents:
diff changeset
7 *
55166d93498d Fri Nov 24 21:37:01 2006 John Ellis <johne@verizon.net>
gqview
parents:
diff changeset
8 * This software is released under the GNU General Public License (GNU GPL).
55166d93498d Fri Nov 24 21:37:01 2006 John Ellis <johne@verizon.net>
gqview
parents:
diff changeset
9 * Please read the included file COPYING for more information.
55166d93498d Fri Nov 24 21:37:01 2006 John Ellis <johne@verizon.net>
gqview
parents:
diff changeset
10 * This software comes with no warranty of any kind, use at your own risk!
55166d93498d Fri Nov 24 21:37:01 2006 John Ellis <johne@verizon.net>
gqview
parents:
diff changeset
11 */
55166d93498d Fri Nov 24 21:37:01 2006 John Ellis <johne@verizon.net>
gqview
parents:
diff changeset
12
55166d93498d Fri Nov 24 21:37:01 2006 John Ellis <johne@verizon.net>
gqview
parents:
diff changeset
13
55166d93498d Fri Nov 24 21:37:01 2006 John Ellis <johne@verizon.net>
gqview
parents:
diff changeset
14 #ifndef COLOR_MAN_H
55166d93498d Fri Nov 24 21:37:01 2006 John Ellis <johne@verizon.net>
gqview
parents:
diff changeset
15 #define COLOR_MAN_H
55166d93498d Fri Nov 24 21:37:01 2006 John Ellis <johne@verizon.net>
gqview
parents:
diff changeset
16
55166d93498d Fri Nov 24 21:37:01 2006 John Ellis <johne@verizon.net>
gqview
parents:
diff changeset
17 typedef enum {
426
9fe0ca1b5263 show the AdobeRGB profile in the menu, indicate input profile from image
nadvornik
parents: 424
diff changeset
18 COLOR_PROFILE_NONE = -1,
9fe0ca1b5263 show the AdobeRGB profile in the menu, indicate input profile from image
nadvornik
parents: 424
diff changeset
19 COLOR_PROFILE_MEM = -2,
9fe0ca1b5263 show the AdobeRGB profile in the menu, indicate input profile from image
nadvornik
parents: 424
diff changeset
20 COLOR_PROFILE_SRGB = 0,
9fe0ca1b5263 show the AdobeRGB profile in the menu, indicate input profile from image
nadvornik
parents: 424
diff changeset
21 COLOR_PROFILE_ADOBERGB,
113
55166d93498d Fri Nov 24 21:37:01 2006 John Ellis <johne@verizon.net>
gqview
parents:
diff changeset
22 COLOR_PROFILE_FILE,
55166d93498d Fri Nov 24 21:37:01 2006 John Ellis <johne@verizon.net>
gqview
parents:
diff changeset
23 } ColorManProfileType;
55166d93498d Fri Nov 24 21:37:01 2006 John Ellis <johne@verizon.net>
gqview
parents:
diff changeset
24
55166d93498d Fri Nov 24 21:37:01 2006 John Ellis <johne@verizon.net>
gqview
parents:
diff changeset
25 typedef enum {
55166d93498d Fri Nov 24 21:37:01 2006 John Ellis <johne@verizon.net>
gqview
parents:
diff changeset
26 COLOR_RETURN_SUCCESS = 0,
55166d93498d Fri Nov 24 21:37:01 2006 John Ellis <johne@verizon.net>
gqview
parents:
diff changeset
27 COLOR_RETURN_ERROR,
55166d93498d Fri Nov 24 21:37:01 2006 John Ellis <johne@verizon.net>
gqview
parents:
diff changeset
28 COLOR_RETURN_IMAGE_CHANGED
55166d93498d Fri Nov 24 21:37:01 2006 John Ellis <johne@verizon.net>
gqview
parents:
diff changeset
29 } ColorManReturnType;
55166d93498d Fri Nov 24 21:37:01 2006 John Ellis <johne@verizon.net>
gqview
parents:
diff changeset
30
55166d93498d Fri Nov 24 21:37:01 2006 John Ellis <johne@verizon.net>
gqview
parents:
diff changeset
31 typedef struct _ColorMan ColorMan;
55166d93498d Fri Nov 24 21:37:01 2006 John Ellis <johne@verizon.net>
gqview
parents:
diff changeset
32 typedef void (* ColorManDoneFunc)(ColorMan *cm, ColorManReturnType success, gpointer data);
55166d93498d Fri Nov 24 21:37:01 2006 John Ellis <johne@verizon.net>
gqview
parents:
diff changeset
33
55166d93498d Fri Nov 24 21:37:01 2006 John Ellis <johne@verizon.net>
gqview
parents:
diff changeset
34
55166d93498d Fri Nov 24 21:37:01 2006 John Ellis <johne@verizon.net>
gqview
parents:
diff changeset
35 struct _ColorMan {
55166d93498d Fri Nov 24 21:37:01 2006 John Ellis <johne@verizon.net>
gqview
parents:
diff changeset
36 ImageWindow *imd;
55166d93498d Fri Nov 24 21:37:01 2006 John Ellis <johne@verizon.net>
gqview
parents:
diff changeset
37 GdkPixbuf *pixbuf;
115
53b2bfdcff69 Tue Nov 28 11:54:30 2006 John Ellis <johne@verizon.net>
gqview
parents: 114
diff changeset
38 gint incremental_sync;
113
55166d93498d Fri Nov 24 21:37:01 2006 John Ellis <johne@verizon.net>
gqview
parents:
diff changeset
39 gint row;
55166d93498d Fri Nov 24 21:37:01 2006 John Ellis <johne@verizon.net>
gqview
parents:
diff changeset
40
55166d93498d Fri Nov 24 21:37:01 2006 John Ellis <johne@verizon.net>
gqview
parents:
diff changeset
41 gpointer profile;
55166d93498d Fri Nov 24 21:37:01 2006 John Ellis <johne@verizon.net>
gqview
parents:
diff changeset
42
1523
24a12aa0cb54 Fix up event source ids type: gint -> guint.
zas_
parents: 1284
diff changeset
43 guint idle_id; /* event source id */
113
55166d93498d Fri Nov 24 21:37:01 2006 John Ellis <johne@verizon.net>
gqview
parents:
diff changeset
44
55166d93498d Fri Nov 24 21:37:01 2006 John Ellis <johne@verizon.net>
gqview
parents:
diff changeset
45 ColorManDoneFunc func_done;
55166d93498d Fri Nov 24 21:37:01 2006 John Ellis <johne@verizon.net>
gqview
parents:
diff changeset
46 gpointer func_done_data;
55166d93498d Fri Nov 24 21:37:01 2006 John Ellis <johne@verizon.net>
gqview
parents:
diff changeset
47 };
55166d93498d Fri Nov 24 21:37:01 2006 John Ellis <johne@verizon.net>
gqview
parents:
diff changeset
48
55166d93498d Fri Nov 24 21:37:01 2006 John Ellis <johne@verizon.net>
gqview
parents:
diff changeset
49
115
53b2bfdcff69 Tue Nov 28 11:54:30 2006 John Ellis <johne@verizon.net>
gqview
parents: 114
diff changeset
50 ColorMan *color_man_new(ImageWindow *imd, GdkPixbuf *pixbuf,
113
55166d93498d Fri Nov 24 21:37:01 2006 John Ellis <johne@verizon.net>
gqview
parents:
diff changeset
51 ColorManProfileType input_type, const gchar *input_file,
1586
c3416996fd97 Backed out changeset b5608391f479
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 1548
diff changeset
52 ColorManProfileType screen_type, const gchar *screen_file);
115
53b2bfdcff69 Tue Nov 28 11:54:30 2006 John Ellis <johne@verizon.net>
gqview
parents: 114
diff changeset
53 ColorMan *color_man_new_embedded(ImageWindow *imd, GdkPixbuf *pixbuf,
1000
4fe8f9656107 For the sake of consistency, use glib basic types everywhere.
zas_
parents: 475
diff changeset
54 guchar *input_data, guint input_data_len,
1586
c3416996fd97 Backed out changeset b5608391f479
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 1548
diff changeset
55 ColorManProfileType screen_type, const gchar *screen_file);
113
55166d93498d Fri Nov 24 21:37:01 2006 John Ellis <johne@verizon.net>
gqview
parents:
diff changeset
56 void color_man_free(ColorMan *cm);
55166d93498d Fri Nov 24 21:37:01 2006 John Ellis <johne@verizon.net>
gqview
parents:
diff changeset
57
55166d93498d Fri Nov 24 21:37:01 2006 John Ellis <johne@verizon.net>
gqview
parents:
diff changeset
58 void color_man_update(void);
55166d93498d Fri Nov 24 21:37:01 2006 John Ellis <johne@verizon.net>
gqview
parents:
diff changeset
59
398
c4080362d619 image post-processing (rotation and color management) moved to
nadvornik
parents: 196
diff changeset
60 void color_man_correct_region(ColorMan *cm, GdkPixbuf *pixbuf, gint x, gint y, gint w, gint h);
c4080362d619 image post-processing (rotation and color management) moved to
nadvornik
parents: 196
diff changeset
61
c4080362d619 image post-processing (rotation and color management) moved to
nadvornik
parents: 196
diff changeset
62 void color_man_start_bg(ColorMan *cm, ColorManDoneFunc don_func, gpointer done_data);
113
55166d93498d Fri Nov 24 21:37:01 2006 John Ellis <johne@verizon.net>
gqview
parents:
diff changeset
63
1590
69f7270b3b27 improved color management button:
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 1587
diff changeset
64 gboolean color_man_get_status(ColorMan *cm, gchar **image_profile, gchar **screen_profile);
69f7270b3b27 improved color management button:
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 1587
diff changeset
65
113
55166d93498d Fri Nov 24 21:37:01 2006 John Ellis <johne@verizon.net>
gqview
parents:
diff changeset
66 #endif
1055
1646720364cf Adding a vim modeline to all files - patch by Klaus Ethgen
nadvornik
parents: 1000
diff changeset
67 /* vim: set shiftwidth=8 softtabstop=0 cindent cinoptions={1s: */