port to new API
[swfdec.git] / player / swfdec_player_manager.h
blobd68ef3ece59e88df1462df0ff1d59696faf7f142
1 /* Swfdec
2 * Copyright (C) 2006 Benjamin Otte <otte@gnome.org>
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.1 of the License, or (at your option) any later version.
8 *
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 Free Software
16 * Foundation, Inc., 51 Franklin Street, Fifth Floor,
17 * Boston, MA 02110-1301 USA
20 #ifndef _SWFDEC_PLAYER_MANAGER_H_
21 #define _SWFDEC_PLAYER_MANAGER_H_
23 #include <gtk/gtk.h>
24 #include <libswfdec/swfdec.h>
25 #include <libswfdec/swfdec_debugger.h>
27 G_BEGIN_DECLS
29 typedef struct _SwfdecPlayerManager SwfdecPlayerManager;
30 typedef struct _SwfdecPlayerManagerClass SwfdecPlayerManagerClass;
32 #define SWFDEC_TYPE_PLAYER_MANAGER (swfdec_player_manager_get_type())
33 #define SWFDEC_IS_PLAYER_MANAGER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), SWFDEC_TYPE_PLAYER_MANAGER))
34 #define SWFDEC_IS_PLAYER_MANAGER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), SWFDEC_TYPE_PLAYER_MANAGER))
35 #define SWFDEC_PLAYER_MANAGER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), SWFDEC_TYPE_PLAYER_MANAGER, SwfdecPlayerManager))
36 #define SWFDEC_PLAYER_MANAGER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), SWFDEC_TYPE_PLAYER_MANAGER, SwfdecPlayerManagerClass))
38 struct _SwfdecPlayerManager
40 GObject object;
42 SwfdecPlayer * player; /* the video we play */
43 GSource * source; /* the source that is ticking */
44 double speed; /* speed of playback */
45 gboolean playing; /* if we should be playing */
46 SwfdecDebuggerScript *interrupt_script; /* script that caused the interrupt */
47 guint interrupt_line; /* line in script that caused the interrupt */
48 GMainLoop * interrupt_loop; /* loop we run during an interruption */
49 guint next_id; /* id of breakpoint for "next" command */
52 struct _SwfdecPlayerManagerClass
54 GObjectClass object_class;
57 GType swfdec_player_manager_get_type (void);
59 SwfdecPlayerManager *
60 swfdec_player_manager_new (SwfdecPlayer * player);
62 void swfdec_player_manager_set_speed (SwfdecPlayerManager * manager,
63 double speed);
64 double swfdec_player_manager_get_speed (SwfdecPlayerManager * manager);
65 void swfdec_player_manager_set_playing (SwfdecPlayerManager * manager,
66 gboolean playing);
67 gboolean swfdec_player_manager_get_playing (SwfdecPlayerManager * manager);
68 gboolean swfdec_player_manager_get_interrupted (SwfdecPlayerManager * manager);
70 guint swfdec_player_manager_iterate (SwfdecPlayerManager * manager);
72 void swfdec_player_manager_continue (SwfdecPlayerManager * manager);
73 void swfdec_player_manager_next (SwfdecPlayerManager * manager);
74 void swfdec_player_manager_get_interrupt (SwfdecPlayerManager * manager,
75 SwfdecDebuggerScript **script,
76 guint * line);
78 void swfdec_player_manager_execute (SwfdecPlayerManager * manager,
79 const char * command);
81 G_END_DECLS
82 #endif