window: re-indent all GstVaapiWindow related source code.
[platform/upstream/gstreamer-vaapi.git] / gst-libs / gst / vaapi / gstvaapiwindow_x11_priv.h
1 /*
2  *  gstvaapiwindow_x11_priv.h - VA/X11 window abstraction (private definitions)
3  *
4  *  Copyright (C) 2010-2011 Splitted-Desktop Systems
5  *    Author: Gwenole Beauchesne <gwenole.beauchesne@splitted-desktop.com>
6  *  Copyright (C) 2012-2013 Intel Corporation
7  *    Author: Gwenole Beauchesne <gwenole.beauchesne@intel.com>
8  *
9  *  This library is free software; you can redistribute it and/or
10  *  modify it under the terms of the GNU Lesser General Public License
11  *  as published by the Free Software Foundation; either version 2.1
12  *  of the License, or (at your option) any later version.
13  *
14  *  This library is distributed in the hope that it will be useful,
15  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
16  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
17  *  Lesser General Public License for more details.
18  *
19  *  You should have received a copy of the GNU Lesser General Public
20  *  License along with this library; if not, write to the Free
21  *  Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
22  *  Boston, MA 02110-1301 USA
23  */
24
25 #ifndef GST_VAAPI_WINDOW_X11_PRIV_H
26 #define GST_VAAPI_WINDOW_X11_PRIV_H
27
28 #include "gstvaapiwindow_priv.h"
29
30 #ifdef HAVE_XRENDER
31 # include <X11/extensions/Xrender.h>
32 #endif
33
34 G_BEGIN_DECLS
35
36 #define GST_VAAPI_WINDOW_X11_GET_PRIVATE(obj) \
37     (&GST_VAAPI_WINDOW_X11(obj)->priv)
38
39 #define GST_VAAPI_WINDOW_X11_CLASS(klass) \
40     ((GstVaapiWindowX11Class *)(klass))
41
42 #define GST_VAAPI_WINDOW_X11_GET_CLASS(obj) \
43     GST_VAAPI_WINDOW_X11_CLASS(GST_VAAPI_WINDOW_GET_CLASS(obj))
44
45 typedef struct _GstVaapiWindowX11Private GstVaapiWindowX11Private;
46 typedef struct _GstVaapiWindowX11Class GstVaapiWindowX11Class;
47
48 struct _GstVaapiWindowX11Private
49 {
50   Atom atom_NET_WM_STATE;
51   Atom atom_NET_WM_STATE_FULLSCREEN;
52 #ifdef HAVE_XRENDER
53   Picture picture;
54 #endif
55   guint is_mapped:1;
56   guint fullscreen_on_map:1;
57   guint has_xrender:1;
58 };
59
60 /**
61  * GstVaapiWindowX11:
62  *
63  * An X11 #Window wrapper.
64  */
65 struct _GstVaapiWindowX11
66 {
67   /*< private >*/
68   GstVaapiWindow parent_instance;
69
70   GstVaapiWindowX11Private priv;
71 };
72
73 /**
74  * GstVaapiWindowX11Class:
75  * @get_visual: virtual function to get the desired visual used to
76  *   create the window
77  * @get_colormap: virtual function to get the desired colormap used to
78  *   create the window
79  *
80  * An X11 #Window wrapper class.
81  */
82 struct _GstVaapiWindowX11Class
83 {
84   /*< private >*/
85   GstVaapiWindowClass parent_class;
86
87   Visual *(*get_visual) (GstVaapiWindow * window);
88   Colormap (*get_colormap) (GstVaapiWindow * window);
89 };
90
91 void
92 gst_vaapi_window_x11_class_init (GstVaapiWindowX11Class * klass);
93
94 G_END_DECLS
95
96 #endif /* GST_VAAPI_WINDOW_X11_PRIV_H */