Added gst-plugins-base-subtitles0.10-0.10.34 for Meego Harmattan 1.2
[mafwsubrenderer] / gst-plugins-base-subtitles0.10 / gst-libs / gst / interfaces / xoverlay.h
1 /* GStreamer X-based Overlay
2  * Copyright (C) 2003 Ronald Bultje <rbultje@ronald.bitfreak.net>
3  * Copyright (C) 2003 Julien Moutte <julien@moutte.net>
4  *
5  * x-overlay.h: X-based overlay interface design
6  *
7  * This library is free software; you can redistribute it and/or
8  * modify it under the terms of the GNU Library General Public
9  * License as published by the Free Software Foundation; either
10  * version 2 of the License, or (at your option) any later version.
11  *
12  * This library is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
15  * Library General Public License for more details.
16  *
17  * You should have received a copy of the GNU Library General Public
18  * License along with this library; if not, write to the
19  * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
20  * Boston, MA 02111-1307, USA.
21  */
22
23 #ifndef __GST_X_OVERLAY_H__
24 #define __GST_X_OVERLAY_H__
25
26 #include <gst/gst.h>
27
28 G_BEGIN_DECLS
29
30 #define GST_TYPE_X_OVERLAY \
31   (gst_x_overlay_get_type ())
32 #define GST_X_OVERLAY(obj) \
33   (GST_IMPLEMENTS_INTERFACE_CHECK_INSTANCE_CAST ((obj), GST_TYPE_X_OVERLAY, \
34                                                  GstXOverlay))
35 #define GST_X_OVERLAY_CLASS(klass) \
36   (G_TYPE_CHECK_CLASS_CAST ((klass), GST_TYPE_X_OVERLAY, GstXOverlayClass))
37 #define GST_IS_X_OVERLAY(obj) \
38   (GST_IMPLEMENTS_INTERFACE_CHECK_INSTANCE_TYPE ((obj), GST_TYPE_X_OVERLAY))
39 #define GST_IS_X_OVERLAY_CLASS(klass) \
40   (G_TYPE_CHECK_CLASS_TYPE ((klass), GST_TYPE_X_OVERLAY))
41 #define GST_X_OVERLAY_GET_CLASS(inst) \
42   (G_TYPE_INSTANCE_GET_INTERFACE ((inst), GST_TYPE_X_OVERLAY, GstXOverlayClass))
43
44 /**
45  * GstXOverlay:
46  *
47  * Opaque #GstXOverlay data structure.
48  */
49 typedef struct _GstXOverlay GstXOverlay;
50 typedef struct _GstXOverlayClass GstXOverlayClass;
51
52 /**
53  * GstXOverlayClass:
54  * @klass: parent interface type.
55  * @set_xwindow_id: virtual method to configure the XWindow id
56  * @expose: virtual method to handle expose events
57  * @handle_events: virtual method to handle events
58  * @set_render_rectangle: virtual method to set the render rectangle (since 0.10.29)
59  *
60  * #GstXOverlay interface
61  */
62 struct _GstXOverlayClass {
63   GTypeInterface klass;
64
65   /* virtual functions */
66 #ifndef GST_DISABLE_DEPRECATED
67   void (* set_xwindow_id)      (GstXOverlay *overlay,
68                                 gulong       xwindow_id);
69 #else
70   void (* set_xwindow_id_disabled) (GstXOverlay *overlay,
71                                 gulong       xwindow_id);
72 #endif /* not GST_DISABLE_DEPRECATED */
73
74   void (* expose)              (GstXOverlay *overlay);
75   
76   void (* handle_events)       (GstXOverlay *overlay,
77                                 gboolean     handle_events);  
78
79   void (* set_render_rectangle) (GstXOverlay *overlay,
80                                  gint x, gint y,
81                                  gint width, gint height);
82
83   void (* set_window_handle)   (GstXOverlay *overlay,
84                                 guintptr    handle);
85     /*< private >*/
86   gpointer                 _gst_reserved[GST_PADDING - 3];
87 };
88
89 GType   gst_x_overlay_get_type          (void);
90
91 /* virtual class function wrappers */
92 #ifndef GST_DISABLE_DEPRECATED
93 void gst_x_overlay_set_xwindow_id      (GstXOverlay *overlay, 
94                                         gulong xwindow_id);
95 #endif
96
97 gboolean gst_x_overlay_set_render_rectangle (GstXOverlay *overlay,
98                                              gint x, gint y,
99                                              gint width, gint height);
100
101 void gst_x_overlay_expose              (GstXOverlay *overlay);
102
103 void gst_x_overlay_handle_events       (GstXOverlay *overlay,
104                                         gboolean     handle_events);
105
106 void gst_x_overlay_set_window_handle   (GstXOverlay *overlay, 
107                                         guintptr handle);
108
109 /* public methods to dispatch bus messages */
110 #ifndef GST_DISABLE_DEPRECATED
111 void gst_x_overlay_got_xwindow_id     (GstXOverlay *overlay, gulong xwindow_id);
112 #endif
113
114 void gst_x_overlay_got_window_handle  (GstXOverlay *overlay,
115     guintptr handle);
116
117 void gst_x_overlay_prepare_xwindow_id (GstXOverlay *overlay);
118
119 G_END_DECLS
120
121 #endif /* __GST_X_OVERLAY_H__ */