doc: updated italian translations
[adg.git] / src / adg / adg-entity.h
blob6b59228c98d84494062d7e06ee3c1b5694e43177
1 /* ADG - Automatic Drawing Generation
2 * Copyright (C) 2007,2008,2009,2010,2011,2012 Nicola Fontana <ntd at entidi.it>
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Lesser General Public
6 * License as published by the Free Software Foundation; either
7 * version 2 of the License, or (at your option) any later version.
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Lesser General Public License for more details.
14 * You should have received a copy of the GNU Lesser General Public
15 * License along with this library; if not, write to the
16 * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
17 * Boston, MA 02110-1301, USA.
21 #if !defined(__ADG_H__)
22 #error "Only <adg.h> can be included directly."
23 #endif
26 #ifndef __ADG_ENTITY_H__
27 #define __ADG_ENTITY_H__
30 G_BEGIN_DECLS
32 #define ADG_TYPE_ENTITY (adg_entity_get_type())
33 #define ADG_ENTITY(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), ADG_TYPE_ENTITY, AdgEntity))
34 #define ADG_ENTITY_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass), ADG_TYPE_ENTITY, AdgEntityClass))
35 #define ADG_IS_ENTITY(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), ADG_TYPE_ENTITY))
36 #define ADG_IS_ENTITY_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass), ADG_TYPE_ENTITY))
37 #define ADG_ENTITY_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), ADG_TYPE_ENTITY, AdgEntityClass))
40 typedef struct _AdgEntity AdgEntity;
41 typedef struct _AdgEntityClass AdgEntityClass;
43 struct _AdgEntity {
44 /*< private >*/
45 GInitiallyUnowned parent;
46 gpointer data;
49 struct _AdgEntityClass {
50 /*< private >*/
51 GInitiallyUnownedClass parent_class;
52 /*< public >*/
53 /* Signals */
54 void (*destroy) (AdgEntity *entity);
55 void (*parent_set) (AdgEntity *entity,
56 AdgEntity *old_parent);
57 void (*global_changed) (AdgEntity *entity);
58 void (*local_changed) (AdgEntity *entity);
59 void (*invalidate) (AdgEntity *entity);
60 void (*arrange) (AdgEntity *entity);
61 void (*render) (AdgEntity *entity,
62 cairo_t *cr);
66 void adg_switch_extents (gboolean state);
68 GType adg_entity_get_type (void) G_GNUC_CONST;
69 void adg_entity_destroy (AdgEntity *entity);
70 AdgCanvas * adg_entity_get_canvas (AdgEntity *entity);
71 void adg_entity_set_parent (AdgEntity *entity,
72 AdgEntity *parent);
73 AdgEntity * adg_entity_get_parent (AdgEntity *entity);
74 void adg_entity_set_global_map (AdgEntity *entity,
75 const AdgMatrix *map);
76 void adg_entity_transform_global_map(AdgEntity *entity,
77 const AdgMatrix *transformation,
78 AdgTransformMode mode);
79 const AdgMatrix *adg_entity_get_global_map (AdgEntity *entity);
80 const AdgMatrix *adg_entity_get_global_matrix (AdgEntity *entity);
81 void adg_entity_set_local_map (AdgEntity *entity,
82 const AdgMatrix *map);
83 void adg_entity_transform_local_map (AdgEntity *entity,
84 const AdgMatrix *transformation,
85 AdgTransformMode mode);
86 const AdgMatrix *adg_entity_get_local_map (AdgEntity *entity);
87 const AdgMatrix *adg_entity_get_local_matrix (AdgEntity *entity);
88 void adg_entity_set_local_method (AdgEntity *entity,
89 AdgMixMethod local_method);
90 AdgMixMethod adg_entity_get_local_method (AdgEntity *entity);
91 void adg_entity_set_extents (AdgEntity *entity,
92 const CpmlExtents *extents);
93 const CpmlExtents *
94 adg_entity_get_extents (AdgEntity *entity);
95 void adg_entity_set_style (AdgEntity *entity,
96 AdgDress dress,
97 AdgStyle *style);
98 AdgStyle * adg_entity_get_style (AdgEntity *entity,
99 AdgDress dress);
100 AdgStyle * adg_entity_style (AdgEntity *entity,
101 AdgDress dress);
102 void adg_entity_apply_dress (AdgEntity *entity,
103 AdgDress dress,
104 cairo_t *cr);
105 void adg_entity_global_changed (AdgEntity *entity);
106 void adg_entity_local_changed (AdgEntity *entity);
107 void adg_entity_invalidate (AdgEntity *entity);
108 void adg_entity_arrange (AdgEntity *entity);
109 void adg_entity_render (AdgEntity *entity,
110 cairo_t *cr);
111 AdgPoint * adg_entity_point (AdgEntity *entity,
112 AdgPoint *point,
113 AdgPoint *new_point);
115 G_END_DECLS
118 #endif /* __ADG_ENTITY_H__ */