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"
22 #include <Ecore_Drm.h>
27 E_OUTPUT_DPMS_STANDBY,
28 E_OUTPUT_DPMS_SUSPEND,
34 int w, h; // resolution width and height
35 double refresh; // refresh in hz
36 Eina_Bool preferred : 1; // is this the preferred mode for the device?
38 const tdm_output_mode *tmode;
44 char *id; // string id which is "name/edid";
46 char *screen; // name of the screen device attached
47 char *name; // name of the output itself
48 char *edid; // full edid data
49 Eina_Bool connected : 1; // some screen is plugged in or not
50 Eina_List *modes; // available screen modes here
52 int w, h; // physical width and height in mm
56 Eina_Rectangle geom; // the geometry that is set (as a result)
57 E_Output_Mode mode; // screen res/refresh to use
58 int rotation; // 0, 90, 180, 270
59 int priority; // larger num == more important
60 Eina_Bool enabled : 1; // should this monitor be enabled?
69 E_Comp_Screen *e_comp_screen;
90 Eina_Bool need_touch_set;
92 Ecore_Event_Handler *touch_up_handler;
96 tdm_capture *tcapture;
99 Eina_Bool possible_tdm_capture;
101 Eina_Bool wait_vblank;
105 enum _E_Output_Hook_Point
107 E_OUTPUT_HOOK_DPMS_CHANGE,
111 struct _E_Output_Hook
114 E_Output_Hook_Point hookpoint;
115 E_Output_Hook_Cb func;
117 unsigned char delete_me : 1;
120 EINTERN Eina_Bool e_output_init(void);
121 EINTERN void e_output_shutdown(void);
122 EINTERN E_Output * e_output_new(E_Comp_Screen *e_comp_screen, int index);
123 EINTERN void e_output_del(E_Output *output);
124 EINTERN Eina_Bool e_output_rotate(E_Output *output, int rotate);
125 EINTERN Eina_Bool e_output_update(E_Output *output);
126 EINTERN Eina_Bool e_output_mode_apply(E_Output *output, E_Output_Mode *mode);
127 EINTERN Eina_Bool e_output_commit(E_Output *output);
128 EINTERN Eina_Bool e_output_render(E_Output *output);
129 EINTERN Eina_Bool e_output_setup(E_Output *output);
130 EINTERN E_Output_Mode * e_output_best_mode_find(E_Output *output);
131 EINTERN Eina_Bool e_output_connected(E_Output *output);
132 EINTERN Eina_Bool e_output_dpms_set(E_Output *output, E_OUTPUT_DPMS val);
133 E_API E_OUTPUT_DPMS e_output_dpms_get(E_Output *output);
134 EINTERN void e_output_size_get(E_Output *output, int *w, int *h);
135 EINTERN E_Plane * e_output_default_fb_target_get(E_Output *output);
136 EINTERN Eina_Bool e_output_fake_config_set(E_Output *output, int w, int h);
137 EINTERN Eina_Bool e_output_zoom_set(E_Output *output, double zoomx, double zoomy, int cx, int cy);
138 EINTERN void e_output_zoom_unset(E_Output *output);
139 EINTERN Eina_Bool e_output_capture(E_Output *output, tbm_surface_h surface, Eina_Bool auto_rotate, E_Output_Capture_Cb func, void *data);
140 EINTERN Eina_Bool e_output_stream_capture_queue(E_Output *output, tbm_surface_h surface, E_Output_Capture_Cb func, void *data);
141 EINTERN Eina_Bool e_output_stream_capture_dequeue(E_Output *output, tbm_surface_h surface);
142 EINTERN Eina_Bool e_output_stream_capture_start(E_Output *output);
143 EINTERN void e_output_stream_capture_stop(E_Output *output);
144 E_API E_Output * e_output_find(const char *id);
145 E_API E_Output * e_output_find_by_index(int index);
146 E_API const Eina_List * e_output_planes_get(E_Output *output);
147 E_API void e_output_util_planes_print(void);
148 E_API Eina_Bool e_output_is_fb_composing(E_Output *output);
149 E_API Eina_Bool e_output_is_fb_full_compositing(E_Output *output);
150 E_API E_Plane * e_output_fb_target_get(E_Output *output);
151 E_API E_Plane * e_output_plane_get_by_zpos(E_Output *output, int zpos);
152 E_API E_Output_Hook * e_output_hook_add(E_Output_Hook_Point hookpoint, E_Output_Hook_Cb func, const void *data);
153 E_API void e_output_hook_del(E_Output_Hook *ch);