Reimplement the timeline editing API
[platform/upstream/gst-editing-services.git] / ges / ges-auto-transition.h
1 /* -*- Mode: C; indent-tabs-mode: nil; c-basic-offset: 2; tab-width: 2 -*-  */
2 /*
3  * gst-editing-services
4  * Copyright (C) 2013 Thibault Saunier <thibault.saunier@collabora.com>
5  *
6  * gst-editing-services is free software: you can redistribute it and/or modify it
7  * under the terms of the GNU Lesser General Public License as published
8  * by the Free Software Foundation, either version 3 of the License, or
9  * (at your option) any later version.
10  *
11  * gst-editing-services is distributed in the hope that it will be useful, but
12  * WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
14  * See the GNU Lesser General Public License for more details.
15  *
16  * You should have received a copy of the GNU Lesser General Public License
17  * along with this program.  If not, see <http://www.gnu.org/licenses/>.";
18  */
19
20 #ifndef _GES_AUTO_TRANSITION_H_
21 #define _GES_AUTO_TRANSITION_H_
22
23 #include <glib-object.h>
24 #include "ges-track-element.h"
25 #include "ges-clip.h"
26 #include "ges-layer.h"
27
28 G_BEGIN_DECLS
29
30 #define GES_TYPE_AUTO_TRANSITION             (ges_auto_transition_get_type ())
31 #define GES_AUTO_TRANSITION(obj)             (G_TYPE_CHECK_INSTANCE_CAST ((obj), GES_TYPE_AUTO_TRANSITION, GESAutoTransition))
32 #define GES_AUTO_TRANSITION_CLASS(klass)     (G_TYPE_CHECK_CLASS_CAST ((klass), GES_TYPE_AUTO_TRANSITION, GESAutoTransitionClass))
33 #define GES_IS_AUTO_TRANSITION(obj)          (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GES_TYPE_AUTO_TRANSITION))
34 #define GES_IS_AUTO_TRANSITION_CLASS(klass)  (G_TYPE_CHECK_CLASS_TYPE ((klass), GES_TYPE_AUTO_TRANSITION))
35 #define GES_AUTO_TRANSITION_GET_CLASS(obj)   (G_TYPE_INSTANCE_GET_CLASS ((obj), GES_TYPE_AUTO_TRANSITION, GESAutoTransitionClass))
36
37 typedef struct _GESAutoTransitionClass GESAutoTransitionClass;
38 typedef struct _GESAutoTransition GESAutoTransition;
39
40
41
42 struct _GESAutoTransitionClass
43 {
44   GObjectClass parent_class;
45
46   /* Padding for API extension */
47   gpointer _ges_reserved[GES_PADDING];
48 };
49
50 struct _GESAutoTransition
51 {
52   GObject parent_instance;
53
54   /* <read only and construct only> */
55   GESTrackElement *previous_source;
56   GESTrackElement *next_source;
57   GESTrackElement *transition;
58
59   GESLayer *layer;
60
61   GESClip *previous_clip;
62   GESClip *next_clip;
63   GESClip *transition_clip;
64   gboolean positioning;
65
66   gchar *key;
67
68   /* Padding for API extension */
69   gpointer _ges_reserved[GES_PADDING];
70 };
71
72 G_GNUC_INTERNAL GType ges_auto_transition_get_type (void) G_GNUC_CONST;
73
74 G_GNUC_INTERNAL void ges_auto_transition_update (GESAutoTransition *self);
75 G_GNUC_INTERNAL GESAutoTransition * ges_auto_transition_new (GESTrackElement * transition,
76                                              GESTrackElement * previous_source,
77                                              GESTrackElement * next_source);
78
79 G_END_DECLS
80 #endif /* _GES_AUTO_TRANSITION_H_ */