1 /*
2 INTEL CONFIDENTIAL
3 Copyright 2009 Intel Corporation All Rights Reserved.
4 The source code contained or described herein and all documents related to the source code ("Material") are owned by Intel Corporation or its suppliers or licensors. Title to the Material remains with Intel Corporation or its suppliers and licensors. The Material contains trade secrets and proprietary and confidential information of Intel or its suppliers and licensors. The Material is protected by worldwide copyright and trade secret laws and treaty provisions. No part of the Material may be used, copied, reproduced, modified, published, uploaded, posted, transmitted, distributed, or disclosed in any way without Intel’s prior express written permission.
5 
6 No license under any patent, copyright, trade secret or other intellectual property right is granted to or conferred upon you by disclosure or delivery of the Materials, either expressly, by implication, inducement, estoppel or otherwise. Any license under such intellectual property rights must be express and approved by Intel in writing.
7 */
8 
9 #ifndef __MIX_DISPLAYX11_H__
10 #define __MIX_DISPLAYX11_H__
11 
12 #include "mixdisplay.h"
13 #include "mixvideodef.h"
14 #include <X11/Xlib.h>
15 
16 /**
17 * MIX_TYPE_DISPLAYX11:
18 *
19 * Get type of class.
20 */
21 #define MIX_TYPE_DISPLAYX11 (mix_displayx11_get_type ())
22 
23 /**
24 * MIX_DISPLAYX11:
25 * @obj: object to be type-casted.
26 */
27 #define MIX_DISPLAYX11(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), MIX_TYPE_DISPLAYX11, MixDisplayX11))
28 
29 /**
30 * MIX_IS_DISPLAYX11:
31 * @obj: an object.
32 *
33 * Checks if the given object is an instance of #MixDisplay
34 */
35 #define MIX_IS_DISPLAYX11(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), MIX_TYPE_DISPLAYX11))
36 
37 /**
38 * MIX_DISPLAYX11_CLASS:
39 * @klass: class to be type-casted.
40 */
41 #define MIX_DISPLAYX11_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), MIX_TYPE_DISPLAYX11, MixDisplayX11Class))
42 
43 /**
44 * MIX_IS_DISPLAYX11_CLASS:
45 * @klass: a class.
46 *
47 * Checks if the given class is #MixDisplayClass
48 */
49 #define MIX_IS_DISPLAYX11_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), MIX_TYPE_DISPLAYX11))
50 
51 /**
52 * MIX_DISPLAYX11_GET_CLASS:
53 * @obj: a #MixDisplay object.
54 *
55 * Get the class instance of the object.
56 */
57 #define MIX_DISPLAYX11_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), MIX_TYPE_DISPLAYX11, MixDisplayX11Class))
58 
59 typedef struct _MixDisplayX11 MixDisplayX11;
60 typedef struct _MixDisplayX11Class MixDisplayX11Class;
61 
62 /**
63 * MixDisplayX11:
64 *
65 * MI-X VideoInit Parameter object
66 */
67 struct _MixDisplayX11
68 {
69   /*< public > */
70   MixDisplay parent;
71 
72   /*< public > */
73 
74   Display *display;
75   Drawable drawable;
76 };
77 
78 /**
79 * MixDisplayX11Class:
80 *
81 * MI-X VideoInit object class
82 */
83 struct _MixDisplayX11Class
84 {
85   /*< public > */
86   MixDisplayClass parent_class;
87 
88   /* class members */
89 };
90 
91 /**
92 * mix_displayx11_get_type:
93 * @returns: type
94 *
95 * Get the type of object.
96 */
97 GType mix_displayx11_get_type (void);
98 
99 /**
100 * mix_displayx11_new:
101 * @returns: A newly allocated instance of #MixDisplayX11
102 *
103 * Use this method to create new instance of #MixDisplayX11
104 */
105 MixDisplayX11 *mix_displayx11_new (void);
106 /**
107 * mix_displayx11_ref:
108 * @mix: object to add reference
109 * @returns: the MixDisplayX11 instance where reference count has been increased.
110 *
111 * Add reference count.
112 */
113 MixDisplayX11 *mix_displayx11_ref (MixDisplayX11 * mix);
114 
115 /**
116 * mix_displayx11_unref:
117 * @obj: object to unref.
118 *
119 * Decrement reference count of the object.
120 */
121 #define mix_displayx11_unref(obj) mix_display_unref(MIX_DISPLAY(obj))
122 
123 /* Class Methods */
124 
125 /*
126 TO DO: Add documents
127 */
128 
129 MIX_RESULT mix_displayx11_set_display (MixDisplayX11 * obj,
130 				       Display * display);
131 
132 MIX_RESULT mix_displayx11_get_display (MixDisplayX11 * obj,
133 				       Display ** dislay);
134 
135 MIX_RESULT mix_displayx11_set_drawable (MixDisplayX11 * obj,
136 					Drawable drawable);
137 
138 MIX_RESULT mix_displayx11_get_drawable (MixDisplayX11 * obj,
139 					Drawable * drawable);
140 
141 #endif /* __MIX_DISPLAYX11_H__ */
142