fixed dia_image_rgb_data() for non-alpha images
[dia.git] / lib / propinternals.h
blobd01eda827bd1902dba95db3855a87e30351ab0fb
1 /* Dia -- a diagram creation/manipulation program
2 * Copyright (C) 1998 Alexander Larsson
4 * Property system for dia objects/shapes.
5 * Copyright (C) 2000 James Henstridge
6 * Copyright (C) 2001 Cyrille Chepelov
7 * Major restructuration done in August 2001 by C. Chepelov
9 * propinternals.h: prototypes for routines which might be of use to other
10 * sections of the property support code (but whose use by external code is
11 * strongly discouraged !)
13 * This program is free software; you can redistribute it and/or modify
14 * it under the terms of the GNU General Public License as published by
15 * the Free Software Foundation; either version 2 of the License, or
16 * (at your option) any later version.
18 * This program is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU General Public License for more details.
23 * You should have received a copy of the GNU General Public License
24 * along with this program; if not, write to the Free Software
25 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
27 #ifndef PROPINTERNALS_H
28 #define PROPINTERNALS_H
30 #include <glib.h>
32 #include <gtk/gtk.h>
33 #include "properties.h" /* **after** gtk.h, please */
35 /* returns TRUE if two property descriptors describe properties
36 which can be merged. */
37 gboolean propdescs_can_be_merged(const PropDescription *p1,
38 const PropDescription *p2);
40 void prophandler_connect(const Property *prop, GtkObject *object,
41 const gchar *signal);
43 void prop_list_load(GPtrArray *props, DataNode data);
44 void prop_list_save(GPtrArray *props, DataNode data);
46 #define struct_member(sp, off, tp) (*(tp *)(((char *)sp) + off))
48 Property *find_prop_by_name(const GPtrArray *props, const gchar *name);
49 Property *find_prop_by_name_and_type(const GPtrArray *props, const gchar *name,
50 PropertyType type);
52 /* ************************ */
53 /* Property dialog methods */
55 /* Add a widget without a title. This will restart a new title+widget table
56 afterwards. */
57 void prop_dialog_add_raw(PropDialog *dialog, GtkWidget *widget);
58 void prop_dialog_add_raw_with_flags(PropDialog *dialog, GtkWidget *widget,
59 gboolean expand, gboolean fill);
60 /* Register a new container widget (which won't be automatically added) */
61 void prop_dialog_container_push(PropDialog *dialog, GtkWidget *container);
62 /* De-register the last container of the stack. */
63 GtkWidget *prop_dialog_container_pop(PropDialog *dialog);
64 void prop_dialog_add_property(PropDialog *dialog, Property *prop);
66 PropDialog *prop_dialog_new(Object *obj, gboolean is_default);
67 PropDialog *prop_dialog_from_widget(GtkWidget *dialog_widget);
68 void prop_dialog_destroy(PropDialog *dialog);
69 void prop_get_data_from_widgets(PropDialog *dialog);
70 WIDGET *prop_dialog_get_widget(const PropDialog *dialog);
72 void prophandler_connect(const Property *prop, GtkObject *object,
73 const gchar *signal);
75 /* Stuff in propoffsets.c: */
76 void prop_offset_list_calculate_quarks(PropOffset *offsets);
77 void do_set_props_from_offsets(void *base, GPtrArray *props,
78 const PropOffset *offsets);
79 void do_get_props_from_offsets(void *base, GPtrArray *props,
80 const PropOffset *offsets);
83 #include "prop_basic.h"
84 #include "prop_inttypes.h"
85 #include "prop_geomtypes.h"
86 #include "prop_attr.h"
87 #include "prop_text.h"
88 #include "prop_widgets.h"
89 #include "prop_sdarray.h"
91 #endif /* PROPINTERNALS_H */