]> www.fi.muni.cz Git - evince.git/blob - libview/ev-transition-animation.h
[presentation] Fix a crash when starting animation
[evince.git] / libview / ev-transition-animation.h
1 /* ev-transition-animation.h
2  *  this file is part of evince, a gnome document viewer
3  *
4  * Copyright (C) 2007 Carlos Garnacho <carlos@imendio.com>
5  *
6  * This library is free software; you can redistribute it and/or
7  * modify it under the terms of the GNU Library General Public
8  * License as published by the Free Software Foundation; either
9  * version 2 of the License, or (at your option) any later version.
10  *
11  * This library is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
14  * Library General Public License for more details.
15  *
16  * You should have received a copy of the GNU Library General Public
17  * License along with this library; if not, write to the
18  * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 
19  * Boston, MA 02110-1301, USA.
20  */
21
22 #if !defined (EVINCE_COMPILATION)
23 #error "This is a private header."
24 #endif
25
26 #ifndef __EV_TRANSITION_ANIMATION_H__
27 #define __EV_TRANSITION_ANIMATION_H__
28
29 #include <evince-document.h>
30 #include "ev-timeline.h"
31 #include "ev-transition-effect.h"
32
33 G_BEGIN_DECLS
34
35 #define EV_TYPE_TRANSITION_ANIMATION                 (ev_transition_animation_get_type ())
36 #define EV_TRANSITION_ANIMATION(obj)                 (G_TYPE_CHECK_INSTANCE_CAST ((obj), EV_TYPE_TRANSITION_ANIMATION, EvTransitionAnimation))
37 #define EV_TRANSITION_ANIMATION_CLASS(klass)         (G_TYPE_CHECK_CLASS_CAST ((klass),  EV_TYPE_TRANSITION_ANIMATION, EvTransitionAnimationClass))
38 #define EV_IS_TRANSITION_ANIMATION(obj)              (G_TYPE_CHECK_INSTANCE_TYPE ((obj), EV_TYPE_TRANSITION_ANIMATION))
39 #define EV_IS_TRANSITION_ANIMATION_CLASS(klass)      (G_TYPE_CHECK_CLASS_TYPE ((klass),  EV_TYPE_TRANSITION_ANIMATION))
40 #define EV_TRANSITION_ANIMATION_GET_CLASS(obj)       (G_TYPE_INSTANCE_GET_CLASS ((obj),  EV_TYPE_TRANSITION_ANIMATION, EvTransitionAnimationClass))
41
42 typedef struct EvTransitionAnimation      EvTransitionAnimation;
43 typedef struct EvTransitionAnimationClass EvTransitionAnimationClass;
44
45 struct EvTransitionAnimation {
46         EvTimeline parent_instance;
47 };
48
49 struct EvTransitionAnimationClass {
50         EvTimelineClass parent_class;
51 };
52
53
54 GType                   ev_transition_animation_get_type           (void) G_GNUC_CONST;
55
56 EvTransitionAnimation * ev_transition_animation_new                (EvTransitionEffect    *effect);
57
58 void                    ev_transition_animation_set_origin_surface (EvTransitionAnimation *animation,
59                                                                     cairo_surface_t       *origin_surface);
60 void                    ev_transition_animation_set_dest_surface   (EvTransitionAnimation *animation,
61                                                                     cairo_surface_t       *origin_surface);
62 gint                    ev_transition_animation_get_page_from      (EvTransitionAnimation *animation);
63 gint                    ev_transition_animation_get_page_to        (EvTransitionAnimation *animation);
64
65 void                    ev_transition_animation_paint              (EvTransitionAnimation *animation,
66                                                                     cairo_t               *cr,
67                                                                     GdkRectangle           page_area);
68 gboolean                ev_transition_animation_ready              (EvTransitionAnimation *animation);
69
70
71 G_END_DECLS
72
73 #endif /* __EV_TRANSITION_ANIMATION_H__ */