Git init
[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_Output_Info E_Randr_Output_Info;
5 typedef struct _E_Randr_Screen_Info_11 E_Randr_Screen_Info_11;
6 typedef struct _E_Randr_Screen_Info_12 E_Randr_Screen_Info_12;
7 typedef union _E_Randr_Screen_RRVD_Info E_Randr_Screen_RRVD_Info;
8 typedef struct _E_Randr_Screen_Info E_Randr_Screen_Info;
9 typedef struct _E_Randr_Output_Edid_Hash E_Randr_Output_Edid_Hash;
10 typedef struct _E_Randr_Output_Restore_Info E_Randr_Output_Restore_Info;
11 typedef struct _E_Randr_Crtc_Restore_Info E_Randr_Crtc_Restore_Info;
12 typedef struct _E_Randr_Screen_Restore_Info_11 E_Randr_Screen_Restore_Info_11;
13 typedef struct _E_Randr_Screen_Restore_Info_12 E_Randr_Screen_Restore_Info_12;
14 typedef union _E_Randr_Screen_Restore_Info_Union E_Randr_Screen_Restore_Info_Union;
15 typedef struct _E_Randr_Screen_Restore_Info E_Randr_Screen_Restore_Info;
16
17 #else
18 #ifndef E_RANDR_H
19 #define E_RANDR_H
20
21 struct _E_Randr_Crtc_Info 
22 {
23    Ecore_X_ID xid;
24    Eina_Rectangle geometry;
25    Eina_Rectangle panning;
26    Eina_Rectangle tracking;
27    Eina_Rectangle border;
28    Ecore_X_Randr_Orientation current_orientation;
29    Ecore_X_Randr_Orientation orientations;
30    Ecore_X_Randr_Crtc_Gamma **gamma_ramps;
31    int gamma_ramp_size;
32    Eina_List *outputs;
33    Eina_List *possible_outputs;
34    Eina_List *outputs_common_modes;
35    Ecore_X_Randr_Mode_Info *current_mode;
36 };
37
38 struct _E_Randr_Output_Info 
39 {
40    Ecore_X_ID xid;
41    char *name;
42    int name_length;
43    E_Randr_Crtc_Info *crtc;
44    Eina_List *wired_clones;
45    Ecore_X_Randr_Signal_Format signalformats;
46    Ecore_X_Randr_Signal_Format signalformat;
47    int connector_number;
48    Ecore_X_Randr_Connector_Type connector_type;
49    Ecore_X_Randr_Connection_Status connection_status;
50    /*
51     * Attached Monitor specific:
52     */
53    Eina_List *modes;
54    Eina_List *preferred_modes;
55    Eina_List *clones;
56    Eina_List *possible_crtcs;
57    Ecore_X_Randr_Screen_Size size_mm;
58    unsigned char *edid;
59    unsigned long edid_length;
60    int max_backlight;
61    double backlight_level;
62    Ecore_X_Render_Subpixel_Order subpixel_order;
63    Eina_List *compatible_outputs;
64 };
65
66 struct _E_Randr_Screen_Info_11
67 {
68    //List of Ecore_X_Randr_Screen_Size_MM*
69    Eina_List *sizes;
70    int csize_index;
71    Ecore_X_Randr_Orientation corientation;
72    Ecore_X_Randr_Orientation orientations;
73    //List of Ecore_X_Randr_Refresh_Rate*
74    Eina_List *rates;
75    Ecore_X_Randr_Refresh_Rate current_rate;
76 };
77
78 struct _E_Randr_Screen_Info_12 
79 {
80    Ecore_X_Randr_Screen_Size min_size;
81    Ecore_X_Randr_Screen_Size max_size;
82    Ecore_X_Randr_Screen_Size current_size;
83    Eina_List *modes;
84    Eina_List *crtcs;
85    Eina_List *outputs;
86    E_Randr_Output_Info *primary_output;
87    Ecore_X_Randr_Output_Policy output_policy;
88    Ecore_X_Randr_Relative_Alignment alignment;
89 };
90
91 //RRVD == RandR(R) Version Depended
92 union _E_Randr_Screen_RRVD_Info 
93 {
94    E_Randr_Screen_Info_11 *randr_info_11;
95    E_Randr_Screen_Info_12 *randr_info_12;
96 };
97
98 struct _E_Randr_Screen_Info 
99 {
100    Ecore_X_Window root;
101    int randr_version;
102    E_Randr_Screen_RRVD_Info rrvd_info;
103 };
104
105 //Following stuff is just for configuration purposes
106 struct _E_Randr_Output_Edid_Hash {
107    int hash;
108 };
109
110 struct _E_Randr_Output_Restore_Info
111 {
112    E_Randr_Output_Edid_Hash edid_hash;
113    double backlight_level;
114 };
115
116 struct _E_Randr_Crtc_Restore_Info
117 {
118    Eina_Rectangle geometry;
119    Ecore_X_Randr_Orientation orientation;
120    //list of the outputs;
121    Eina_List *outputs;
122 };
123
124 struct _E_Randr_Screen_Restore_Info_11 
125 {
126    Ecore_X_Randr_Screen_Size size;
127    Ecore_X_Randr_Refresh_Rate refresh_rate;
128    Ecore_X_Randr_Orientation orientation;
129 };
130
131 struct _E_Randr_Screen_Restore_Info_12 
132 {
133    Eina_List *outputs_edid_hashes;
134    int noutputs;
135    Eina_List *crtcs;
136    Ecore_X_Randr_Output_Policy output_policy;
137    Ecore_X_Randr_Relative_Alignment alignment;
138 };
139
140 union _E_Randr_Screen_Restore_Info_Union 
141 {
142    E_Randr_Screen_Restore_Info_11 *restore_info_11;
143    Eina_List *restore_info_12;
144 };
145
146 struct _E_Randr_Screen_Restore_Info 
147 {
148    int randr_version;
149    E_Randr_Screen_Restore_Info_Union rrvd_restore_info;
150 };
151
152 EINTERN Eina_Bool e_randr_init(void);
153 EINTERN int e_randr_shutdown(void);
154
155 extern E_Randr_Screen_Info *e_randr_screen_info;
156
157 #endif
158 #endif