1 /*   EXTRAITS DE LA LICENCE
2 	Copyright CEA, contributeurs : Damien
3 	CALISTE, laboratoire L_Sim, (2017)
4 
5 	Adresse mèl :
6 	CALISTE, damien P caliste AT cea P fr.
7 
8 	Ce logiciel est un programme informatique servant à visualiser des
9 	structures atomiques dans un rendu pseudo-3D.
10 
11 	Ce logiciel est régi par la licence CeCILL soumise au droit français et
12 	respectant les principes de diffusion des logiciels libres. Vous pouvez
13 	utiliser, modifier et/ou redistribuer ce programme sous les conditions
14 	de la licence CeCILL telle que diffusée par le CEA, le CNRS et l'INRIA
15 	sur le site "http://www.cecill.info".
16 
17 	Le fait que vous puissiez accéder à cet en-tête signifie que vous avez
18 	pris connaissance de la licence CeCILL, et que vous en avez accepté les
19 	termes (cf. le fichier Documentation/licence.fr.txt fourni avec ce logiciel).
20 */
21 
22 /*   LICENCE SUM UP
23 	Copyright CEA, contributors : Damien
24 	CALISTE, laboratoire L_Sim, (2017)
25 
26 	E-mail address:
27 	BILLARD, not reachable any more ;
28 	CALISTE, damien P caliste AT cea P fr.
29 
30 	This software is a computer program whose purpose is to visualize atomic
31 	configurations in 3D.
32 
33 	This software is governed by the CeCILL  license under French law and
34 	abiding by the rules of distribution of free software.  You can  use,
35 	modify and/ or redistribute the software under the terms of the CeCILL
36 	license as circulated by CEA, CNRS and INRIA at the following URL
37 	"http://www.cecill.info".
38 
39 	The fact that you are presently reading this means that you have had
40 	knowledge of the CeCILL license and that you accept its terms. You can
41 	find a copy of this licence shipped with this software at Documentation/licence.en.txt.
42 */
43 #ifndef IFACE_ANIMATABLE_H
44 #define IFACE_ANIMATABLE_H
45 
46 #include <glib.h>
47 #include <glib-object.h>
48 
49 #include "visu_animation.h"
50 
51 G_BEGIN_DECLS
52 
53 /* Animatable interface. */
54 #define VISU_TYPE_ANIMATABLE                (visu_animatable_get_type ())
55 #define VISU_ANIMATABLE(obj)                (G_TYPE_CHECK_INSTANCE_CAST ((obj), VISU_TYPE_ANIMATABLE, VisuAnimatable))
56 #define VISU_IS_ANIMATABLE(obj)             (G_TYPE_CHECK_INSTANCE_TYPE ((obj), VISU_TYPE_ANIMATABLE))
57 #define VISU_ANIMATABLE_GET_INTERFACE(inst) (G_TYPE_INSTANCE_GET_INTERFACE ((inst), VISU_TYPE_ANIMATABLE, VisuAnimatableInterface))
58 
59 typedef struct _VisuAnimatableInterface VisuAnimatableInterface;
60 typedef struct _VisuAnimatable VisuAnimatable; /* dummy object */
61 
62 /**
63  * VisuAnimatable:
64  *
65  * Interface object.
66  *
67  * Since: 3.8
68  */
69 
70 /**
71  * VisuAnimatableInterface:
72  * @parent: its parent.
73  * @get_animation: a method retrieve the #VisuAnimation object of the
74  * given property.
75  *
76  * The different routines common to objects implementing a #VisuAnimatable interface.
77  *
78  * Since: 3.8
79  */
80 struct _VisuAnimatableInterface
81 {
82   GTypeInterface parent;
83 
84   VisuAnimation* (*get_animation)(const VisuAnimatable *self, const gchar *prop);
85 };
86 
87 GType visu_animatable_get_type(void);
88 
89 VisuAnimation* visu_animatable_getAnimation(const VisuAnimatable *animatable,
90                                             const gchar *prop);
91 gboolean visu_animatable_animate(VisuAnimatable *animatable, VisuAnimation *anim,
92                                  const GValue *to, gulong duration, gboolean loop, VisuAnimationType type);
93 
94 gboolean visu_animatable_animateFloat(VisuAnimatable *animatable, VisuAnimation *anim,
95                                       float to, gulong duration, gboolean loop, VisuAnimationType type);
96 gboolean visu_animatable_animateFloatByName(VisuAnimatable *animatable, const gchar *prop,
97                                             float to, gulong duration, gboolean loop, VisuAnimationType type);
98 
99 gboolean visu_animatable_animateDouble(VisuAnimatable *animatable, VisuAnimation *anim,
100                                        double to, gulong duration, gboolean loop, VisuAnimationType type);
101 gboolean visu_animatable_animateDoubleByName(VisuAnimatable *animatable, const gchar *prop,
102                                              double to, gulong duration, gboolean loop, VisuAnimationType type);
103 
104 G_END_DECLS
105 
106 #endif
107