| adg-container.h | | adg-container.h | |
| | | | |
| skipping to change at line 34 | | skipping to change at line 34 | |
| | | | |
| G_BEGIN_DECLS | | G_BEGIN_DECLS | |
| | | | |
| #define ADG_TYPE_CONTAINER (adg_container_get_type ()) | | #define ADG_TYPE_CONTAINER (adg_container_get_type ()) | |
| #define ADG_CONTAINER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj),
ADG_TYPE_CONTAINER, AdgContainer)) | | #define ADG_CONTAINER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj),
ADG_TYPE_CONTAINER, AdgContainer)) | |
| #define ADG_CONTAINER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), A
DG_TYPE_CONTAINER, AdgContainerClass)) | | #define ADG_CONTAINER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), A
DG_TYPE_CONTAINER, AdgContainerClass)) | |
| #define ADG_IS_CONTAINER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj),
ADG_TYPE_CONTAINER)) | | #define ADG_IS_CONTAINER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj),
ADG_TYPE_CONTAINER)) | |
| #define ADG_IS_CONTAINER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), A
DG_TYPE_CONTAINER)) | | #define ADG_IS_CONTAINER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), A
DG_TYPE_CONTAINER)) | |
| #define ADG_CONTAINER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), A
DG_TYPE_CONTAINER, AdgContainerClass)) | | #define ADG_CONTAINER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), A
DG_TYPE_CONTAINER, AdgContainerClass)) | |
| | | | |
|
| typedef struct _AdgContainer AdgContainer; | | typedef struct _AdgContainer AdgContainer; | |
| typedef struct _AdgContainerClass AdgContainerClass; | | typedef struct _AdgContainerClass AdgContainerClass; | |
| | | typedef struct _AdgContainerPrivate AdgContainerPrivate; | |
| | | | |
| struct _AdgContainer | | struct _AdgContainer | |
| { | | { | |
| AdgEntity entity; | | AdgEntity entity; | |
| | | | |
| /*< private >*/ | | /*< private >*/ | |
|
| | | AdgContainerPrivate *priv; | |
| GSList *children; | | | |
| | | | |
| AdgMatrix matrix; | | | |
| AdgMatrix ctm; | | | |
| }; | | }; | |
| | | | |
| struct _AdgContainerClass | | struct _AdgContainerClass | |
| { | | { | |
|
| AdgEntityClass parent_class; | | AdgEntityClass parent_class; | |
| | | | |
| /* Signals */ | | | |
| | | | |
| void (*scale) (AdgContainer *co | | | |
| ntainer, | | | |
| AdgPair *fa | | | |
| ctor); | | | |
| }; | | }; | |
| | | | |
|
| GType adg_container_get_type (void) G_GNUC_CONST; | | GType adg_container_get_type (void) G_GNUC_CONST; | |
| | | const AdgMatrix *adg_container_get_model_transformation (AdgContaine | |
| const AdgMatrix * adg_container_get_matrix (AdgContainer *co | | r *container); | |
| ntainer); | | void adg_container_set_model_transformation (AdgContainer *con | |
| void adg_container_set_matrix (AdgContainer *co | | tainer, | |
| ntainer, | | AdgMatrix *tra | |
| AdgMatrix *ma | | nsformation); | |
| trix); | | const AdgMatrix *adg_container_get_paper_transformation (AdgContaine | |
| | | r *container); | |
| void adg_container_scale (AdgContainer *co | | void adg_container_set_paper_transformation (AdgContainer *con | |
| ntainer, | | tainer, | |
| AdgPair *fa | | AdgMatrix *tra | |
| ctor); | | nsformation); | |
| void adg_container_scale_explicit (AdgContainer *co | | | |
| ntainer, | | | |
| double sx | | | |
| , | | | |
| double sy | | | |
| ); | | | |
| void adg_container_translate (AdgContainer *co | | | |
| ntainer, | | | |
| AdgPair *de | | | |
| vice_offset, | | | |
| AdgPair *us | | | |
| er_offset); | | | |
| void adg_container_translate_explicit(AdgContainer *co | | | |
| ntainer, | | | |
| double dx | | | |
| , | | | |
| double dy | | | |
| , | | | |
| double ux | | | |
| , | | | |
| double uy | | | |
| ); | | | |
| | | | |
| G_END_DECLS | | G_END_DECLS | |
| | | | |
| #endif /* __ADG_CONTAINER_H__ */ | | #endif /* __ADG_CONTAINER_H__ */ | |
| | | | |
End of changes. 4 change blocks. |
| 50 lines changed or deleted | | 18 lines changed or added | |
|
| adg-entity.h | | adg-entity.h | |
| | | | |
| skipping to change at line 23 | | skipping to change at line 23 | |
| * | | * | |
| * You should have received a copy of the GNU Lesser General Public | | * You should have received a copy of the GNU Lesser General Public | |
| * License along with this library; if not, write to the | | * License along with this library; if not, write to the | |
| * Free Software Foundation, Inc., 59 Temple Place - Suite 330, | | * Free Software Foundation, Inc., 59 Temple Place - Suite 330, | |
| * Boston, MA 02111-1307, USA. | | * Boston, MA 02111-1307, USA. | |
| */ | | */ | |
| | | | |
| #ifndef __ADG_ENTITY_H__ | | #ifndef __ADG_ENTITY_H__ | |
| #define __ADG_ENTITY_H__ | | #define __ADG_ENTITY_H__ | |
| | | | |
|
| #include <adg/adg-pair.h> | | | |
| #include <adg/adg-matrix.h> | | #include <adg/adg-matrix.h> | |
| #include <adg/adg-style.h> | | #include <adg/adg-style.h> | |
| | | | |
| G_BEGIN_DECLS | | G_BEGIN_DECLS | |
| | | | |
| /* Forward declarations */ | | /* Forward declarations */ | |
| typedef struct _AdgCanvas AdgCanvas; | | typedef struct _AdgCanvas AdgCanvas; | |
| | | | |
| #define ADG_TYPE_ENTITY (adg_entity_get_type ()) | | #define ADG_TYPE_ENTITY (adg_entity_get_type ()) | |
| #define ADG_ENTITY(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), ADG
_TYPE_ENTITY, AdgEntity)) | | #define ADG_ENTITY(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), ADG
_TYPE_ENTITY, AdgEntity)) | |
| | | | |
| skipping to change at line 45 | | skipping to change at line 44 | |
| #define ADG_IS_ENTITY(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), ADG
_TYPE_ENTITY)) | | #define ADG_IS_ENTITY(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), ADG
_TYPE_ENTITY)) | |
| #define ADG_IS_ENTITY_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), ADG_
TYPE_ENTITY)) | | #define ADG_IS_ENTITY_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), ADG_
TYPE_ENTITY)) | |
| #define ADG_ENTITY_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), ADG_
TYPE_ENTITY, AdgEntityClass)) | | #define ADG_ENTITY_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), ADG_
TYPE_ENTITY, AdgEntityClass)) | |
| | | | |
| typedef struct _AdgEntity AdgEntity; | | typedef struct _AdgEntity AdgEntity; | |
| typedef struct _AdgEntityClass AdgEntityClass; | | typedef struct _AdgEntityClass AdgEntityClass; | |
| typedef struct _AdgEntityPrivate AdgEntityPrivate; | | typedef struct _AdgEntityPrivate AdgEntityPrivate; | |
| | | | |
| struct _AdgEntity | | struct _AdgEntity | |
| { | | { | |
|
| GInitiallyUnowned child; | | GInitiallyUnowned initially_unowned; | |
| | | | |
| /*< private >*/ | | /*< private >*/ | |
| AdgEntityPrivate *priv; | | AdgEntityPrivate *priv; | |
| }; | | }; | |
| | | | |
| struct _AdgEntityClass | | struct _AdgEntityClass | |
| { | | { | |
| GInitiallyUnownedClass parent_class; | | GInitiallyUnownedClass parent_class; | |
| | | | |
| /* Signals */ | | /* Signals */ | |
|
| void (*uptodate_set) (AdgEntity *ent | | void (*model_matrix_changed) (AdgEntity *ent | |
| ity, | | ity, | |
| gboolean old | | AdgMatrix *par | |
| _state); | | ent_matrix); | |
| void (*ctm_changed) (AdgEntity *ent | | void (*paper_matrix_changed) (AdgEntity *ent | |
| ity, | | ity, | |
| AdgMatrix *old | | AdgMatrix *par | |
| _ctm); | | ent_matrix); | |
| | | void (*render) (AdgEntity *ent | |
| | | ity, | |
| | | cairo_t *cr) | |
| | | ; | |
| | | | |
| /* Virtual Table */ | | /* Virtual Table */ | |
| const AdgLineStyle * (*get_line_style) (AdgEntity *ent
ity); | | const AdgLineStyle * (*get_line_style) (AdgEntity *ent
ity); | |
| void (*set_line_style) (AdgEntity *ent
ity, | | void (*set_line_style) (AdgEntity *ent
ity, | |
| AdgLineStyle *lin
e_style); | | AdgLineStyle *lin
e_style); | |
| const AdgFontStyle * (*get_font_style) (AdgEntity *ent
ity); | | const AdgFontStyle * (*get_font_style) (AdgEntity *ent
ity); | |
| void (*set_font_style) (AdgEntity *ent
ity, | | void (*set_font_style) (AdgEntity *ent
ity, | |
| AdgFontStyle *fon
t_style); | | AdgFontStyle *fon
t_style); | |
| const AdgArrowStyle * (*get_arrow_style) (AdgEntity
*entity); | | const AdgArrowStyle * (*get_arrow_style) (AdgEntity
*entity); | |
| void (*set_arrow_style) (AdgEntity *ent
ity, | | void (*set_arrow_style) (AdgEntity *ent
ity, | |
| AdgArrowStyle *arr
ow_style); | | AdgArrowStyle *arr
ow_style); | |
| const AdgDimStyle * (*get_dim_style) (AdgEntity *ent
ity); | | const AdgDimStyle * (*get_dim_style) (AdgEntity *ent
ity); | |
| void (*set_dim_style) (AdgEntity *ent
ity, | | void (*set_dim_style) (AdgEntity *ent
ity, | |
| AdgDimStyle *dim
_style); | | AdgDimStyle *dim
_style); | |
|
| const AdgMatrix * (*get_ctm) (AdgEntity *ent | | const AdgMatrix * (*get_model_matrix) (AdgEntity *ent | |
| ity); | | ity); | |
| void (*update) (AdgEntity *ent | | const AdgMatrix * (*get_paper_matrix) (AdgEntity *ent | |
| ity, | | ity); | |
| gboolean rec | | | |
| ursive); | | | |
| void (*outdate) (AdgEntity *ent | | | |
| ity, | | | |
| gboolean rec | | | |
| ursive); | | | |
| void (*render) (AdgEntity *ent | | | |
| ity, | | | |
| cairo_t *cr) | | | |
| ; | | | |
| }; | | }; | |
| | | | |
| #define ADG_CALLBACK(f) ((AdgCallback) (f)) | | #define ADG_CALLBACK(f) ((AdgCallback) (f)) | |
| | | | |
| typedef void (*AdgCallback) (AdgEntity *entity, gpointer user_data); | | typedef void (*AdgCallback) (AdgEntity *entity, gpointer user_data); | |
| | | | |
| GType adg_entity_get_type (void) G_GNUC_CONST; | | GType adg_entity_get_type (void) G_GNUC_CONST; | |
|
| | | | |
| AdgCanvas * adg_entity_get_canvas (AdgEntity *ent
ity); | | AdgCanvas * adg_entity_get_canvas (AdgEntity *ent
ity); | |
|
| | | const AdgMatrix * adg_entity_get_model_matrix (AdgEntity *ent | |
| void adg_entity_ctm_changed (AdgEntity *ent | | ity); | |
| ity); | | const AdgMatrix * adg_entity_get_paper_matrix (AdgEntity *ent | |
| const AdgMatrix * adg_entity_get_ctm (AdgEntity *ent | | ity); | |
| ity); | | void adg_entity_model_matrix_changed (AdgEntity *ent | |
| | | ity, | |
| | | const AdgMatrix*par | |
| | | ent_matrix); | |
| | | void adg_entity_paper_matrix_changed (AdgEntity *ent | |
| | | ity, | |
| | | const AdgMatrix*par | |
| | | ent_matrix); | |
| const AdgLineStyle * adg_entity_get_line_style (AdgEntity *ent
ity); | | const AdgLineStyle * adg_entity_get_line_style (AdgEntity *ent
ity); | |
| void adg_entity_set_line_style (AdgEntity *ent
ity, | | void adg_entity_set_line_style (AdgEntity *ent
ity, | |
| AdgLineStyle *lin
e_style); | | AdgLineStyle *lin
e_style); | |
| const AdgFontStyle * adg_entity_get_font_style (AdgEntity *ent
ity); | | const AdgFontStyle * adg_entity_get_font_style (AdgEntity *ent
ity); | |
| void adg_entity_set_font_style (AdgEntity *ent
ity, | | void adg_entity_set_font_style (AdgEntity *ent
ity, | |
| AdgFontStyle *fon
t_style); | | AdgFontStyle *fon
t_style); | |
| const AdgArrowStyle * adg_entity_get_arrow_style (AdgEntity *ent
ity); | | const AdgArrowStyle * adg_entity_get_arrow_style (AdgEntity *ent
ity); | |
| void adg_entity_set_arrow_style (AdgEntity *ent
ity, | | void adg_entity_set_arrow_style (AdgEntity *ent
ity, | |
| AdgArrowStyle *arr
ow_style); | | AdgArrowStyle *arr
ow_style); | |
| const AdgDimStyle * adg_entity_get_dim_style (AdgEntity *ent
ity); | | const AdgDimStyle * adg_entity_get_dim_style (AdgEntity *ent
ity); | |
| void adg_entity_set_dim_style (AdgEntity *ent
ity, | | void adg_entity_set_dim_style (AdgEntity *ent
ity, | |
| AdgDimStyle *dim
_style); | | AdgDimStyle *dim
_style); | |
|
| | | gboolean adg_entity_model_matrix_applied (AdgEntity *ent | |
| gboolean adg_entity_is_uptodate (AdgEntity *ent | | ity); | |
| ity); | | gboolean adg_entity_paper_matrix_applied (AdgEntity *ent | |
| | | ity); | |
| void adg_entity_update (AdgEntity *ent | | gboolean adg_entity_model_applied (AdgEntity *ent | |
| ity); | | ity); | |
| void adg_entity_update_all (AdgEntity *ent | | | |
| ity); | | | |
| void adg_entity_outdate (AdgEntity *ent | | | |
| ity); | | | |
| void adg_entity_outdate_all (AdgEntity *ent | | | |
| ity); | | | |
| void adg_entity_render (AdgEntity *ent
ity, | | void adg_entity_render (AdgEntity *ent
ity, | |
| cairo_t *cr)
; | | cairo_t *cr)
; | |
| | | | |
| G_END_DECLS | | G_END_DECLS | |
| | | | |
| #endif /* __ADG_ENTITY_H__ */ | | #endif /* __ADG_ENTITY_H__ */ | |
| | | | |
End of changes. 7 change blocks. |
| 43 lines changed or deleted | | 35 lines changed or added | |
|