3 #include <tbm_surface.h>
5 typedef struct _E_Output E_Output;
6 typedef struct _E_Output_Mode E_Output_Mode;
7 typedef enum _E_Output_Dpms E_OUTPUT_DPMS;
9 typedef struct _E_Output_Hook E_Output_Hook;
10 typedef enum _E_Output_Hook_Point E_Output_Hook_Point;
11 typedef void (*E_Output_Hook_Cb) (void *data, E_Output *output);
13 typedef void (*E_Output_Capture_Cb) (E_Output *output, tbm_surface_h surface, void *user_data);
19 #define E_OUTPUT_TYPE (int)0xE0b11002
21 #include "e_comp_screen.h"
26 E_OUTPUT_DPMS_STANDBY,
27 E_OUTPUT_DPMS_SUSPEND,
33 int w, h; // resolution width and height
34 double refresh; // refresh in hz
35 Eina_Bool preferred : 1; // is this the preferred mode for the device?
37 const tdm_output_mode *tmode;
43 char *id; // string id which is "name/edid";
45 char *screen; // name of the screen device attached
46 char *name; // name of the output itself
47 char *edid; // full edid data
48 Eina_Bool connected : 1; // some screen is plugged in or not
49 Eina_List *modes; // available screen modes here
51 int w, h; // physical width and height in mm
55 Eina_Rectangle geom; // the geometry that is set (as a result)
56 E_Output_Mode mode; // screen res/refresh to use
57 int rotation; // 0, 90, 180, 270
58 int priority; // larger num == more important
59 Eina_Bool enabled : 1; // should this monitor be enabled?
68 E_Comp_Screen *e_comp_screen;
89 Eina_Bool need_touch_set;
91 Ecore_Event_Handler *touch_up_handler;
95 tdm_capture *tcapture;
98 Eina_Bool possible_tdm_capture;
100 Eina_Bool wait_vblank;
104 enum _E_Output_Hook_Point
106 E_OUTPUT_HOOK_DPMS_CHANGE,
110 struct _E_Output_Hook
113 E_Output_Hook_Point hookpoint;
114 E_Output_Hook_Cb func;
116 unsigned char delete_me : 1;
119 EINTERN Eina_Bool e_output_init(void);
120 EINTERN void e_output_shutdown(void);
121 EINTERN E_Output * e_output_new(E_Comp_Screen *e_comp_screen, int index);
122 EINTERN void e_output_del(E_Output *output);
123 EINTERN Eina_Bool e_output_rotate(E_Output *output, int rotate);
124 EINTERN Eina_Bool e_output_update(E_Output *output);
125 EINTERN Eina_Bool e_output_mode_apply(E_Output *output, E_Output_Mode *mode);
126 EINTERN Eina_Bool e_output_commit(E_Output *output);
127 EINTERN Eina_Bool e_output_render(E_Output *output);
128 EINTERN Eina_Bool e_output_setup(E_Output *output);
129 EINTERN E_Output_Mode * e_output_best_mode_find(E_Output *output);
130 EINTERN Eina_Bool e_output_connected(E_Output *output);
131 EINTERN Eina_Bool e_output_dpms_set(E_Output *output, E_OUTPUT_DPMS val);
132 E_API E_OUTPUT_DPMS e_output_dpms_get(E_Output *output);
133 EINTERN void e_output_size_get(E_Output *output, int *w, int *h);
134 EINTERN E_Plane * e_output_default_fb_target_get(E_Output *output);
135 EINTERN Eina_Bool e_output_fake_config_set(E_Output *output, int w, int h);
136 EINTERN Eina_Bool e_output_zoom_set(E_Output *output, double zoomx, double zoomy, int cx, int cy);
137 EINTERN void e_output_zoom_unset(E_Output *output);
138 EINTERN Eina_Bool e_output_capture(E_Output *output, tbm_surface_h surface, Eina_Bool auto_rotate, E_Output_Capture_Cb func, void *data);
139 EINTERN Eina_Bool e_output_stream_capture_queue(E_Output *output, tbm_surface_h surface, E_Output_Capture_Cb func, void *data);
140 EINTERN Eina_Bool e_output_stream_capture_dequeue(E_Output *output, tbm_surface_h surface);
141 EINTERN Eina_Bool e_output_stream_capture_start(E_Output *output);
142 EINTERN void e_output_stream_capture_stop(E_Output *output);
143 E_API E_Output * e_output_find(const char *id);
144 E_API E_Output * e_output_find_by_index(int index);
145 E_API const Eina_List * e_output_planes_get(E_Output *output);
146 E_API void e_output_util_planes_print(void);
147 E_API Eina_Bool e_output_is_fb_composing(E_Output *output);
148 E_API Eina_Bool e_output_is_fb_full_compositing(E_Output *output);
149 E_API E_Plane * e_output_fb_target_get(E_Output *output);
150 E_API E_Plane * e_output_plane_get_by_zpos(E_Output *output, int zpos);
151 E_API E_Output_Hook * e_output_hook_add(E_Output_Hook_Point hookpoint, E_Output_Hook_Cb func, const void *data);
152 E_API void e_output_hook_del(E_Output_Hook *ch);