2 * Copyright (C) 2008 Rov Juvano <rovjuvano@users.sourceforge.net>
4 * This program is free software: you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation, either version 3 of the License, or
7 * (at your option) any later version.
9 * This program 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
12 * GNU General Public License for more details.
14 * You should have received a copy of the GNU General Public License
15 * along with this program. If not, see <http://www.gnu.org/licenses/>.
18 #ifndef __DEMO_PLAYER_H_INCLUDED_
19 #define __DEMO_PLAYER_H_INCLUDED_
21 #include <glib-object.h>
25 #define DEMO_TYPE_PLAYER (demo_player_get_type())
26 #define DEMO_PLAYER(o) (G_TYPE_CHECK_INSTANCE_CAST((o), DEMO_TYPE_PLAYER, DemoPlayer))
27 #define DEMO_IS_PLAYER(o) (G_TYPE_CHECK_INSTANCE_TYPE((o), DEMO_TYPE_PLAYER))
28 #define DEMO_PLAYER_TYPE(o) (G_TYPE_FROM_INSTANCE (o))
29 #define DEMO_PLAYER_TYPE_NAME(o) (g_type_name (DEMO_PLAYER_TYPE (o)))
31 #define DEMO_PLAYER_CLASS(c) (G_TYPE_CHECK_CLASS_CAST((c), DEMO_TYPE_PLAYER, DemoPlayerClass))
32 #define DEMO_IS_PLAYER_CLASS(c) (G_TYPE_CHECK_CLASS_TYPE((c), DEMO_TYPE_PLAYER))
33 #define DEMO_PLAYER_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), DEMO_TYPE_PLAYER, DemoPlayerClass))
35 typedef struct _DemoPlayer DemoPlayer
;
36 typedef struct _DemoPlayerClass DemoPlayerClass
;
43 struct _DemoPlayerClass
46 void (*scale_rate
) (DemoPlayer
*player
, gdouble scale
);
47 void (*set_rate
) (DemoPlayer
*player
, gdouble new_rate
);
48 void (*load_uri
) (DemoPlayer
*player
, gchar
*uri
);
49 void (*play
) (DemoPlayer
*player
);
50 void (*pause
) (DemoPlayer
*player
);
51 void (*seek_by
) (DemoPlayer
*player
, gint seconds
);
52 void (*seek_to
) (DemoPlayer
*player
, gint seconds
);
53 gint (*get_position
) (DemoPlayer
*player
);
54 gint (*get_duration
) (DemoPlayer
*player
);
57 GType
demo_player_get_type (void);
59 void demo_player_scale_rate (DemoPlayer
*player
, gdouble scale
);
60 void demo_player_set_rate (DemoPlayer
*player
, gdouble new_rate
);
61 void demo_player_load_uri (DemoPlayer
*player
, gchar
*uri
);
62 void demo_player_play (DemoPlayer
*player
);
63 void demo_player_pause (DemoPlayer
*player
);
64 void demo_player_seek_by (DemoPlayer
*player
, gint seconds
);
65 void demo_player_seek_to (DemoPlayer
*player
, gint second
);
66 gint
demo_player_get_position (DemoPlayer
*player
);
67 gint
demo_player_get_duration (DemoPlayer
*player
);
71 #endif /* __DEMO_PLAYER_H_INCLUDED_ */