summaryrefslogtreecommitdiff
path: root/include/hal-tdm-interface.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/hal-tdm-interface.h')
-rw-r--r--include/hal-tdm-interface.h144
1 files changed, 1 insertions, 143 deletions
diff --git a/include/hal-tdm-interface.h b/include/hal-tdm-interface.h
index 8fdcf1b..0c38014 100644
--- a/include/hal-tdm-interface.h
+++ b/include/hal-tdm-interface.h
@@ -35,148 +35,6 @@
#ifndef __HAL_TDM_INTERFACE__
#define __HAL_TDM_INTERFACE__
-#include <hal-common-interface.h>
-#include <tbm_surface.h>
-#include <tbm_surface_queue.h>
+#include <hal-tdm-interface-1.h>
-#include "hal-tdm-types.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-typedef struct _hal_tdm_backend_data hal_tdm_backend_data;
-
-typedef struct _hal_tdm_display_funcs hal_tdm_display_funcs;
-typedef struct _hal_tdm_output_funcs hal_tdm_output_funcs;
-typedef struct _hal_tdm_hwc_funcs hal_tdm_hwc_funcs;
-typedef struct _hal_tdm_hwc_window_funcs hal_tdm_hwc_window_funcs;
-typedef struct _hal_tdm_pp_funcs hal_tdm_pp_funcs;
-typedef struct _hal_tdm_capture_funcs hal_tdm_capture_funcs;
-typedef struct _hal_tdm_voutput_funcs hal_tdm_voutput_funcs;
-
-typedef hal_tdm_error (*hal_tdm_master_drm_fd_handler)(hal_tdm_fd master_drm_fd, void *user_data);
-
-struct _hal_tdm_backend_data {
- hal_tdm_display *display; // handle
-
- int has_drm_device;
- struct {
- hal_tdm_fd drm_fd;
- int is_master;
- hal_tdm_master_drm_fd_handler master_drm_fd_func;
- void *user_data;
- } drm_info;
-
- int num_event_sources;
- hal_tdm_event_source *event_sources[HAL_TDM_EVENT_SOURCE_MAX];
-
- hal_tdm_display_funcs *display_funcs;
- hal_tdm_output_funcs *output_funcs;
- hal_tdm_hwc_funcs *hwc_funcs;
- hal_tdm_hwc_window_funcs *hwc_window_funcs;
- hal_tdm_pp_funcs *pp_funcs;
- hal_tdm_capture_funcs *capture_funcs;
- hal_tdm_voutput_funcs *voutput_funcs;
-};
-
-struct _hal_tdm_display_funcs {
- hal_tdm_error (*display_get_capability)(hal_tdm_display *display, hal_tdm_caps_display *caps);
- hal_tdm_error (*display_get_pp_capability)(hal_tdm_display *display, hal_tdm_caps_pp *caps);
- hal_tdm_error (*display_get_capture_capability)(hal_tdm_display *display, hal_tdm_caps_capture *caps);
- hal_tdm_output **(*display_get_outputs)(hal_tdm_display *display, int *count, hal_tdm_error *error);
- hal_tdm_error (*display_get_fd)(hal_tdm_display *display, int *fd);
- hal_tdm_error (*display_handle_events)(hal_tdm_display *display);
- hal_tdm_pp *(*display_create_pp)(hal_tdm_display *display, hal_tdm_error *error);
- hal_tdm_voutput *(*display_voutput_create)(hal_tdm_display *display, const char *name, hal_tdm_error *error);
-};
-
-struct _hal_tdm_output_funcs {
- hal_tdm_error (*output_get_capability)(hal_tdm_output *output, hal_tdm_caps_output *caps);
- hal_tdm_error (*output_set_property)(hal_tdm_output *output, unsigned int id, hal_tdm_value value);
- hal_tdm_error (*output_get_property)(hal_tdm_output *output, unsigned int id, hal_tdm_value *value);
- hal_tdm_error (*output_wait_vblank)(hal_tdm_output *output, int interval, int sync, void *user_data);
- hal_tdm_error (*output_set_vblank_handler)(hal_tdm_output *output, hal_tdm_output_vblank_handler func);
- hal_tdm_error (*output_set_dpms)(hal_tdm_output *output, hal_tdm_output_dpms dpms_value);
- hal_tdm_error (*output_get_dpms)(hal_tdm_output *output, hal_tdm_output_dpms *dpms_value);
- hal_tdm_error (*output_set_mode)(hal_tdm_output *output, const hal_tdm_output_mode *mode);
- hal_tdm_error (*output_get_mode)(hal_tdm_output *output, const hal_tdm_output_mode **mode);
- hal_tdm_capture *(*output_create_capture)(hal_tdm_output *output, hal_tdm_error *error);
- hal_tdm_error (*output_set_status_handler)(hal_tdm_output *output, hal_tdm_output_status_handler func, void *user_data);
- hal_tdm_error (*output_set_dpms_handler)(hal_tdm_output *output, hal_tdm_output_dpms_handler func, void *user_data);
- hal_tdm_error (*output_set_dpms_async)(hal_tdm_output *output, hal_tdm_output_dpms dpms_value, int *sync);
- hal_tdm_hwc *(*output_get_hwc)(hal_tdm_output *output, hal_tdm_error *error);
- hal_tdm_error (*output_set_mirror)(hal_tdm_output *output, hal_tdm_output *src_output, hal_tdm_transform transform);
- hal_tdm_error (*output_unset_mirror)(hal_tdm_output *output);
-};
-
-struct _hal_tdm_voutput_funcs {
- hal_tdm_error (*voutput_destroy)(hal_tdm_voutput *voutput);
- hal_tdm_error (*voutput_set_available_mode)(hal_tdm_voutput *voutput, const hal_tdm_output_mode *modes, int count);
- hal_tdm_error (*voutput_set_physical_size)(hal_tdm_voutput *voutput, unsigned int mmwidth, unsigned int mmheight);
- hal_tdm_error (*voutput_connect)(hal_tdm_voutput *voutput);
- hal_tdm_error (*voutput_disconnect)(hal_tdm_voutput *voutput);
- hal_tdm_output *(*voutput_get_output)(hal_tdm_voutput *voutput, hal_tdm_error *error);
- hal_tdm_error (*voutput_set_commit_func)(hal_tdm_voutput *voutput, hal_tdm_voutput_commit_handler commit_func);
- hal_tdm_error (*voutput_commit_done)(hal_tdm_voutput *voutput);
- hal_tdm_error (*voutput_set_target_buffer_queue_flag)(hal_tdm_voutput *voutput, int flags);
-};
-
-struct _hal_tdm_hwc_funcs {
- hal_tdm_hwc_window *(*hwc_create_window)(hal_tdm_hwc *hwc, hal_tdm_error *error);
- hal_tdm_error (*hwc_get_video_supported_formats)(hal_tdm_hwc *hwc, const tbm_format **formats, int *count);
- hal_tdm_error (*hwc_get_video_available_properties)(hal_tdm_hwc *hwc, const hal_tdm_prop **props, int *count);
- hal_tdm_error (*hwc_get_capabilities)(hal_tdm_hwc *hwc, hal_tdm_hwc_capability *capabilities);
- hal_tdm_error (*hwc_get_available_properties)(hal_tdm_hwc *hwc, const hal_tdm_prop **props, int *count);
- tbm_surface_queue_h (*hwc_get_client_target_buffer_queue)(hal_tdm_hwc *hwc, hal_tdm_error *error);
- hal_tdm_error (*hwc_set_client_target_buffer)(hal_tdm_hwc *hwc, tbm_surface_h target_buffer, hal_tdm_region damage);
- hal_tdm_error (*hwc_set_client_target_acquire_fence)(hal_tdm_hwc *hwc, int acquire_fence);
- hal_tdm_error (*hwc_validate)(hal_tdm_hwc *hwc, hal_tdm_hwc_window **composited_wnds, uint32_t num_wnds, uint32_t *num_types);
- hal_tdm_error (*hwc_get_changed_composition_types)(hal_tdm_hwc *hwc, uint32_t *num_elements, hal_tdm_hwc_window **hwc_window, hal_tdm_hwc_window_composition *composition_types);
- hal_tdm_error (*hwc_accept_validation)(hal_tdm_hwc *hwc);
- hal_tdm_error (*hwc_commit)(hal_tdm_hwc *hwc, int sync, void *user_data);
- hal_tdm_error (*hwc_set_commit_handler)(hal_tdm_hwc *hwc, hal_tdm_hwc_commit_handler func);
- hal_tdm_error (*hwc_get_commit_fence)(hal_tdm_hwc *hwc, int *commit_fence);
- hal_tdm_error (*hwc_get_release_fences)(hal_tdm_hwc *hwc, uint32_t *num_elements, hal_tdm_hwc_window **hwc_windows, int *release_fences);
- hal_tdm_error (*hwc_set_property)(hal_tdm_hwc *hwc, uint32_t id, hal_tdm_value value);
- hal_tdm_error (*hwc_get_property)(hal_tdm_hwc *hwc, uint32_t id, hal_tdm_value *value);
- hal_tdm_error (*hwc_get_commit_interval)(hal_tdm_hwc *hwc, hal_tdm_hwc_commit_interval *interval);
- hal_tdm_error (*hwc_set_client_target_buffer_info)(hal_tdm_hwc *hwc, hal_tdm_hwc_window_info *info);
-};
-
-struct _hal_tdm_hwc_window_funcs {
- void (*hwc_window_destroy)(hal_tdm_hwc_window *hwc_window);
- tbm_surface_queue_h (*hwc_window_acquire_buffer_queue)(hal_tdm_hwc_window *hwc_window, hal_tdm_error *error);
- void (*hwc_window_release_buffer_queue)(hal_tdm_hwc_window *hwc_window, tbm_surface_queue_h queue);
- hal_tdm_error (*hwc_window_set_composition_type)(hal_tdm_hwc_window *hwc_window, hal_tdm_hwc_window_composition composition_type);
- hal_tdm_error (*hwc_window_set_buffer_damage)(hal_tdm_hwc_window *hwc_window, hal_tdm_region damage);
- hal_tdm_error (*hwc_window_set_info)(hal_tdm_hwc_window *hwc_window, hal_tdm_hwc_window_info *info);
- hal_tdm_error (*hwc_window_set_buffer)(hal_tdm_hwc_window *hwc_window, tbm_surface_h buffer);
- hal_tdm_error (*hwc_window_set_property)(hal_tdm_hwc_window *hwc_window, uint32_t id, hal_tdm_value value);
- hal_tdm_error (*hwc_window_get_property)(hal_tdm_hwc_window *hwc_window, uint32_t id, hal_tdm_value *value);
- hal_tdm_error (*hwc_window_get_constraints)(hal_tdm_hwc_window *hwc_window, int *constraints);
- hal_tdm_error (*hwc_window_set_name)(hal_tdm_hwc_window *hwc_window, const char *name);
- hal_tdm_error (*hwc_window_set_cursor_image)(hal_tdm_hwc_window *hwc_window, int width, int height, int stride, void *ptr);
- hal_tdm_error (*hwc_window_set_acquire_fence)(hal_tdm_hwc_window *hwc_window, int acquire_fence);
-};
-
-struct _hal_tdm_pp_funcs {
- void (*pp_destroy)(hal_tdm_pp *pp);
- hal_tdm_error (*pp_set_info)(hal_tdm_pp *pp, hal_tdm_info_pp *info);
- hal_tdm_error (*pp_attach)(hal_tdm_pp *pp, tbm_surface_h src, tbm_surface_h dst);
- hal_tdm_error (*pp_commit)(hal_tdm_pp *pp);
- hal_tdm_error (*pp_set_done_handler)(hal_tdm_pp *pp, hal_tdm_pp_done_handler func, void *user_data);
-};
-
-typedef struct _hal_tdm_capture_funcs {
- void (*capture_destroy)(hal_tdm_capture *capture);
- hal_tdm_error (*capture_set_info)(hal_tdm_capture *capture, hal_tdm_info_capture *info);
- hal_tdm_error (*capture_attach)(hal_tdm_capture *capture, tbm_surface_h buffer);
- hal_tdm_error (*capture_commit)(hal_tdm_capture *capture);
- hal_tdm_error (*capture_set_done_handler)(hal_tdm_capture *capture, hal_tdm_capture_done_handler func, void *user_data);
-} hal_tdm_capture_funcs;
-
-#ifdef __cplusplus
-}
-#endif
#endif /* __HAL_TDM_INTERFACE__ */