1 /* 2 * Clutter. 3 * 4 * An OpenGL based 'interactive canvas' library. 5 * 6 * Authored By: Matthew Allum <mallum@openedhand.com> 7 * Emmanuele Bassi <ebassi@linux.intel.com> 8 * 9 * Copyright (C) 2006 OpenedHand 10 * Copyright (C) 2009 Intel Corp. 11 * 12 * This library is free software; you can redistribute it and/or 13 * modify it under the terms of the GNU Lesser General Public 14 * License as published by the Free Software Foundation; either 15 * version 2 of the License, or (at your option) any later version. 16 * 17 * This library is distributed in the hope that it will be useful, 18 * but WITHOUT ANY WARRANTY; without even the implied warranty of 19 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 20 * Lesser General Public License for more details. 21 * 22 * You should have received a copy of the GNU Lesser General Public 23 * License along with this library. If not, see <http://www.gnu.org/licenses/>. 24 */ 25 26 #if !defined(__CLUTTER_H_INSIDE__) && !defined(CLUTTER_COMPILATION) 27 #error "Only <clutter/clutter.h> can be included directly." 28 #endif 29 30 #ifndef __CLUTTER_MEDIA_H__ 31 #define __CLUTTER_MEDIA_H__ 32 33 #include <glib-object.h> 34 35 G_BEGIN_DECLS 36 37 #define CLUTTER_TYPE_MEDIA (clutter_media_get_type ()) 38 #define CLUTTER_MEDIA(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), CLUTTER_TYPE_MEDIA, ClutterMedia)) 39 #define CLUTTER_IS_MEDIA(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), CLUTTER_TYPE_MEDIA)) 40 #define CLUTTER_MEDIA_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), CLUTTER_TYPE_MEDIA, ClutterMediaIface)) 41 42 typedef struct _ClutterMedia ClutterMedia; /* dummy typedef */ 43 typedef struct _ClutterMediaIface ClutterMediaIface; 44 45 /** 46 * ClutterMedia: 47 * 48 * #ClutterMedia is an opaque structure whose members cannot be directly 49 * accessed 50 * 51 * Since: 0.2 52 */ 53 54 /** 55 * ClutterMediaIface: 56 * @eos: handler for the #ClutterMedia::eos signal 57 * @error: handler for the #ClutterMedia::error signal 58 * 59 * Interface vtable for #ClutterMedia implementations 60 * 61 * Since: 0.2 62 */ 63 struct _ClutterMediaIface 64 { 65 /*< private >*/ 66 GTypeInterface base_iface; 67 68 /*< public >*/ 69 /* signals */ 70 void (* eos) (ClutterMedia *media); 71 void (* error) (ClutterMedia *media, 72 const GError *error); 73 }; 74 75 CLUTTER_DEPRECATED_IN_1_12 76 GType clutter_media_get_type (void) G_GNUC_CONST; 77 78 CLUTTER_DEPRECATED_IN_1_12 79 void clutter_media_set_uri (ClutterMedia *media, 80 const gchar *uri); 81 CLUTTER_DEPRECATED_IN_1_12 82 gchar * clutter_media_get_uri (ClutterMedia *media); 83 CLUTTER_DEPRECATED_IN_1_12 84 void clutter_media_set_filename (ClutterMedia *media, 85 const gchar *filename); 86 87 CLUTTER_DEPRECATED_IN_1_12 88 void clutter_media_set_playing (ClutterMedia *media, 89 gboolean playing); 90 CLUTTER_DEPRECATED_IN_1_12 91 gboolean clutter_media_get_playing (ClutterMedia *media); 92 CLUTTER_DEPRECATED_IN_1_12 93 void clutter_media_set_progress (ClutterMedia *media, 94 gdouble progress); 95 CLUTTER_DEPRECATED_IN_1_12 96 gdouble clutter_media_get_progress (ClutterMedia *media); 97 CLUTTER_DEPRECATED_IN_1_12 98 void clutter_media_set_subtitle_uri (ClutterMedia *media, 99 const gchar *uri); 100 CLUTTER_DEPRECATED_IN_1_12 101 gchar * clutter_media_get_subtitle_uri (ClutterMedia *media); 102 CLUTTER_DEPRECATED_IN_1_12 103 void clutter_media_set_subtitle_font_name (ClutterMedia *media, 104 const char *font_name); 105 CLUTTER_DEPRECATED_IN_1_12 106 gchar * clutter_media_get_subtitle_font_name (ClutterMedia *media); 107 CLUTTER_DEPRECATED_IN_1_12 108 void clutter_media_set_audio_volume (ClutterMedia *media, 109 gdouble volume); 110 CLUTTER_DEPRECATED_IN_1_12 111 gdouble clutter_media_get_audio_volume (ClutterMedia *media); 112 CLUTTER_DEPRECATED_IN_1_12 113 gboolean clutter_media_get_can_seek (ClutterMedia *media); 114 CLUTTER_DEPRECATED_IN_1_12 115 gdouble clutter_media_get_buffer_fill (ClutterMedia *media); 116 CLUTTER_DEPRECATED_IN_1_12 117 gdouble clutter_media_get_duration (ClutterMedia *media); 118 119 G_END_DECLS 120 121 #endif /* __CLUTTER_MEDIA_H__ */ 122