2 * Copyright (C) 2006-2007 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.
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_H_
21 #define _SWFDEC_PLAYER_H_
23 #include <glib-object.h>
25 #include <libswfdec/swfdec_as_types.h>
26 #include <libswfdec/swfdec_loader.h>
31 SWFDEC_MOUSE_CURSOR_NORMAL
,
32 SWFDEC_MOUSE_CURSOR_NONE
,
33 SWFDEC_MOUSE_CURSOR_TEXT
,
34 SWFDEC_MOUSE_CURSOR_CLICK
38 SWFDEC_ALIGNMENT_TOP_LEFT
,
40 SWFDEC_ALIGNMENT_TOP_RIGHT
,
41 SWFDEC_ALIGNMENT_LEFT
,
42 SWFDEC_ALIGNMENT_CENTER
,
43 SWFDEC_ALIGNMENT_RIGHT
,
44 SWFDEC_ALIGNMENT_BOTTOM_LEFT
,
45 SWFDEC_ALIGNMENT_BOTTOM
,
46 SWFDEC_ALIGNMENT_BOTTOM_RIGHT
50 SWFDEC_SCALE_SHOW_ALL
,
51 SWFDEC_SCALE_NO_BORDER
,
52 SWFDEC_SCALE_EXACT_FIT
,
56 typedef struct _SwfdecPlayer SwfdecPlayer
;
57 typedef struct _SwfdecPlayerClass SwfdecPlayerClass
;
59 #define SWFDEC_TYPE_PLAYER (swfdec_player_get_type())
60 #define SWFDEC_IS_PLAYER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), SWFDEC_TYPE_PLAYER))
61 #define SWFDEC_IS_PLAYER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), SWFDEC_TYPE_PLAYER))
62 #define SWFDEC_PLAYER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), SWFDEC_TYPE_PLAYER, SwfdecPlayer))
63 #define SWFDEC_PLAYER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), SWFDEC_TYPE_PLAYER, SwfdecPlayerClass))
64 #define SWFDEC_PLAYER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), SWFDEC_TYPE_PLAYER, SwfdecPlayerClass))
66 void swfdec_init (void);
68 GType
swfdec_player_get_type (void);
70 SwfdecPlayer
* swfdec_player_new (SwfdecAsDebugger
* debugger
);
71 SwfdecPlayer
* swfdec_player_new_from_file (const char * filename
);
72 void swfdec_player_set_loader (SwfdecPlayer
* player
,
73 SwfdecLoader
* loader
);
74 void swfdec_player_set_loader_with_variables
75 (SwfdecPlayer
* player
,
76 SwfdecLoader
* loader
,
77 const char * variables
);
79 gboolean
swfdec_player_is_initialized (SwfdecPlayer
* player
);
80 glong
swfdec_player_get_next_event (SwfdecPlayer
* player
);
81 double swfdec_player_get_rate (SwfdecPlayer
* player
);
82 void swfdec_player_get_image_size (SwfdecPlayer
* player
,
85 void swfdec_player_get_size (SwfdecPlayer
* player
,
88 void swfdec_player_set_size (SwfdecPlayer
* player
,
91 guint swfdec_player_get_background_color
92 (SwfdecPlayer
* player
);
93 void swfdec_player_set_background_color
94 (SwfdecPlayer
* player
,
96 SwfdecScaleMode
swfdec_player_get_scale_mode (SwfdecPlayer
* player
);
97 void swfdec_player_set_scale_mode (SwfdecPlayer
* player
,
98 SwfdecScaleMode mode
);
99 SwfdecAlignment
swfdec_player_get_alignment (SwfdecPlayer
* player
);
100 void swfdec_player_set_alignment (SwfdecPlayer
* player
,
101 SwfdecAlignment align
);
103 void swfdec_player_render (SwfdecPlayer
* player
,
109 void swfdec_player_advance (SwfdecPlayer
* player
,
111 gboolean
swfdec_player_handle_mouse (SwfdecPlayer
* player
,
115 gboolean
swfdec_player_key_press (SwfdecPlayer
* player
,
118 gboolean
swfdec_player_key_release (SwfdecPlayer
* player
,
121 /* audio - see swfdec_audio.c */
122 void swfdec_player_render_audio (SwfdecPlayer
* player
,
126 const GList
* swfdec_player_get_audio (SwfdecPlayer
* player
);