update for beta release
[framework/uifw/e17.git] / src / bin / e_randr.h
1 #ifdef E_TYPEDEFS
2
3 typedef struct _E_Randr_Crtc_Info E_Randr_Crtc_Info;
4 typedef struct _E_Randr_Edid_Hash E_Randr_Edid_Hash;
5 typedef struct _E_Randr_Output_Info E_Randr_Output_Info;
6 typedef struct _E_Randr_Screen_Info_11 E_Randr_Screen_Info_11;
7 typedef struct _E_Randr_Screen_Info_12 E_Randr_Screen_Info_12;
8 typedef union _E_Randr_Screen_RRVD_Info E_Randr_Screen_RRVD_Info;
9 typedef struct _E_Randr_Screen_Info E_Randr_Screen_Info;
10 typedef struct _E_Randr_Serialized_Output_Policy E_Randr_Serialized_Output_Policy;
11 typedef struct _E_Randr_Serialized_Output E_Randr_Serialized_Output;
12 typedef struct _E_Randr_Serialized_Crtc E_Randr_Serialized_Crtc;
13 typedef struct _E_Randr_Serialized_Setup_11 E_Randr_Serialized_Setup_11;
14 typedef struct _E_Randr_Serialized_Setup_12 E_Randr_Serialized_Setup_12;
15 typedef struct _E_Randr_Serialized_Setup E_Randr_Serialized_Setup;
16
17 EAPI void e_randr_store_configuration(E_Randr_Screen_Info *screen_info);
18
19 #else
20 #ifndef E_RANDR_H
21 #define E_RANDR_H
22
23 struct _E_Randr_Crtc_Info
24 {
25    Ecore_X_ID xid;
26    Eina_Rectangle geometry;
27    Eina_Rectangle panning;
28    Eina_Rectangle tracking;
29    Eina_Rectangle border;
30    Ecore_X_Randr_Orientation current_orientation;
31    Ecore_X_Randr_Orientation orientations;
32    Ecore_X_Randr_Crtc_Gamma **gamma_ramps;
33    int gamma_ramp_size;
34    Eina_List *outputs;
35    Eina_List *possible_outputs;
36    Eina_List *outputs_common_modes;
37    Ecore_X_Randr_Mode_Info *current_mode;
38 };
39
40 struct _E_Randr_Edid_Hash
41 {
42    int hash;
43 };
44
45 struct _E_Randr_Output_Info
46 {
47    Ecore_X_ID xid;
48    char *name;
49    int name_length;
50    E_Randr_Crtc_Info *crtc;
51    Eina_List *wired_clones;
52    Ecore_X_Randr_Signal_Format signalformats;
53    Ecore_X_Randr_Signal_Format signalformat;
54    int connector_number;
55    Ecore_X_Randr_Connector_Type connector_type;
56    Ecore_X_Randr_Connection_Status connection_status;
57    Ecore_X_Randr_Output_Policy policy;
58    /*
59     * Attached Monitor specific:
60     */
61    Eina_List *modes;
62    Eina_List *preferred_modes;
63    Eina_List *clones;
64    Eina_List *possible_crtcs;
65    Ecore_X_Randr_Screen_Size size_mm;
66    unsigned char *edid;
67    unsigned long edid_length;
68    E_Randr_Edid_Hash edid_hash;
69    int max_backlight;
70    double backlight_level;
71    Ecore_X_Render_Subpixel_Order subpixel_order;
72    Eina_List *compatible_outputs;
73 };
74
75 struct _E_Randr_Screen_Info_11
76 {
77    //List of Ecore_X_Randr_Screen_Size_MM*
78    Eina_List *sizes;
79    int csize_index;
80    Ecore_X_Randr_Orientation corientation;
81    Ecore_X_Randr_Orientation orientations;
82    //List of Ecore_X_Randr_Refresh_Rate*
83    Eina_List *rates;
84    Ecore_X_Randr_Refresh_Rate current_rate;
85 };
86
87 struct _E_Randr_Screen_Info_12
88 {
89    Ecore_X_Randr_Screen_Size min_size;
90    Ecore_X_Randr_Screen_Size max_size;
91    Ecore_X_Randr_Screen_Size current_size;
92    Eina_List *modes;
93    Eina_List *crtcs;
94    Eina_List *outputs;
95    E_Randr_Output_Info *primary_output;
96    Ecore_X_Randr_Relative_Alignment alignment;
97 };
98
99 //RRVD == RandR(R) Version Depended
100 union _E_Randr_Screen_RRVD_Info
101 {
102    E_Randr_Screen_Info_11 *randr_info_11;
103    E_Randr_Screen_Info_12 *randr_info_12;
104 };
105
106 struct _E_Randr_Screen_Info
107 {
108    Ecore_X_Window root;
109    int randr_version;
110    E_Randr_Screen_RRVD_Info rrvd_info;
111 };
112
113 //Following stuff is just for configuration purposes
114
115 struct _E_Randr_Serialized_Output_Policy
116 {
117    char *name;
118    int name_length;
119    Ecore_X_Randr_Output_Policy policy;
120 };
121
122 struct _E_Randr_Serialized_Output
123 {
124    char *name;
125    int name_length;
126    E_Randr_Edid_Hash edid_hash;
127    double backlight_level;
128 };
129
130 struct _E_Randr_Serialized_Crtc
131 {
132    //List of E_Randr_Serialized_Output objects that were used on the same output
133    Eina_List *serialized_outputs;
134    //the serialized mode_info misses its xid value
135    Ecore_X_Randr_Mode_Info mode_info;
136    Evas_Coord_Point pos;
137    //List of all possible outputs' names
138    //e.g. "LVDS", "CRT-0", "VGA"
139    Eina_List *possible_outputs_names;
140    Ecore_X_Randr_Orientation orientation;
141 };
142
143 struct _E_Randr_Serialized_Setup_12
144 {
145    double timestamp;
146    //List of E_Randr_Serialized_Crtc objects
147    Eina_List *serialized_crtcs;
148    /*
149     * List of E_Randr_Edid_Hash elements of monitors,
150     * that were enabled, when the setup was stored
151     */
152    Eina_List *serialized_edid_hashes;
153 };
154
155 struct _E_Randr_Serialized_Setup_11
156 {
157    Ecore_X_Randr_Screen_Size_MM size;
158    Ecore_X_Randr_Refresh_Rate refresh_rate;
159    Ecore_X_Randr_Orientation orientation;
160 };
161
162 struct _E_Randr_Serialized_Setup
163 {
164    E_Randr_Serialized_Setup_11 *serialized_setup_11;
165    //List of E_Randr_Serialized_Setup_12 objects
166    Eina_List *serialized_setups_12;
167    //List of E_Randr_Serialized_Output_Policy objects
168    Eina_List *serialized_outputs_policies;
169 };
170
171 EINTERN Eina_Bool e_randr_init(void);
172 EINTERN int e_randr_shutdown(void);
173
174 EAPI extern E_Randr_Screen_Info *e_randr_screen_info;
175
176 #endif
177 #endif