virtual output: Remove definition, 'tdm_client_output_set_buffer_queue'.
[platform/core/uifw/libtdm.git] / include / tdm_types.h
index a20049f..7c0f311 100644 (file)
@@ -9,7 +9,7 @@
  *          Taeheon Kim <th908.kim@samsung.com>,
  *          YoungJun Cho <yj44.cho@samsung.com>,
  *          SooChan Lim <sc1.lim@samsung.com>,
- *          Boram Park <sc1.lim@samsung.com>
+ *          Boram Park <boram1288.park@samsung.com>
  *
  * Permission is hereby granted, free of charge, to any person obtaining a
  * copy of this software and associated documentation files (the
@@ -67,6 +67,14 @@ typedef enum {
 } tdm_event_loop_mask;
 
 /**
+ * @brief The display capability enumeration
+ */
+typedef enum {
+       TDM_DISPLAY_CAPABILITY_PP       = (1 << 0), /**< if hardware supports pp operation */
+       TDM_DISPLAY_CAPABILITY_CAPTURE  = (1 << 1), /**< if hardware supports capture operation */
+} tdm_display_capability;
+
+/**
  * @brief The output mode structure
  */
 typedef struct _tdm_output_mode {
@@ -107,6 +115,15 @@ typedef struct _tdm_info_layer {
 } tdm_info_layer;
 
 /**
+ * @brief The region structure
+ * @since 2.0.0
+ */
+typedef struct _tdm_region {
+       unsigned int num_rects;
+       tdm_pos const *rects;
+} tdm_region;
+
+/**
  * @brief The hwc window info structure
  * @since 2.0.0
  */
@@ -116,11 +133,6 @@ typedef struct _tdm_hwc_window_info {
        tdm_transform transform;
 } tdm_hwc_window_info;
 
-typedef struct _tdm_hwc_region {
-       unsigned int num_rects;
-       tdm_pos const *rects;
-} tdm_hwc_region;
-
 /**
  * @brief The pp info structre
  */
@@ -165,18 +177,18 @@ typedef enum {
         */
        TDM_COMPOSITION_CLIENT = 1,
 
-       /** Set by the client before tdm_output_hwc_validate().
+       /** Set by the client before tdm_hwc_validate().
         *
-        * Upon tdm_output_hwc_validate(), the device may request a change from this type to
+        * Upon tdm_hwc_validate(), the device may request a change from this type to
         * TDM_COMPOSITION_DEVICE or TDM_COMPOSITION_CLIENT. */
        TDM_COMPOSITION_DEVICE_CANDIDATE = 2,
 
-       /** Set by the HWC after tdm_output_hwc_validate().
+       /** Set by the HWC after tdm_hwc_validate().
         *
         * The device will handle the composition of this window through a hardware
         * overlay or other similar means.
         *
-        * Upon tdm_output_hwc_validate(), the device may request a change from this type to
+        * Upon tdm_hwc_validate(), the device may request a change from this type to
         * TDM_COMPOSITION_CLIENT or TDM_COMPOSITION_DEVICE_CANDIDATE. */
        TDM_COMPOSITION_DEVICE = 3,
 
@@ -184,9 +196,9 @@ typedef enum {
         * asynchronously through layer_set_cursor_position. If this functionality is not
         * supported on a layer that the client sets to TDM_COMPOSITION_CURSOR, the
         * device must request that the composition type of that layer is changed to
-        * TDM_COMPOSITION_CLIENT upon the next call to tdm_output_hwc_validate().
+        * TDM_COMPOSITION_CLIENT upon the next call to tdm_hwc_validate().
         *
-        * Upon tdm_output_hwc_validate(), the device may request a change from this type to
+        * Upon tdm_hwc_validate(), the device may request a change from this type to
         * either TDM_COMPOSITION_DEVICE or TDM_COMPOSITION_CLIENT. Changing to
         * TDM_COMPOSITION_DEVICE will prevent the use of layer_set_cursor_position but
         * still permit the device to composite the layer. */
@@ -213,6 +225,11 @@ typedef enum {
 typedef void tdm_display;
 
 /**
+ * @brief The tdm backend object
+ */
+typedef void tdm_module;
+
+/**
  * @brief The tdm output object
  */
 typedef void tdm_output;
@@ -223,7 +240,13 @@ typedef void tdm_output;
 typedef void tdm_layer;
 
 /**
- * @brief The tdm window object
+ * @brief The tdm hwc object
+ * @since 2.0.0
+ */
+typedef void tdm_hwc;
+
+/**
+ * @brief The tdm hwc window object
  * @since 2.0.0
  */
 typedef void tdm_hwc_window;
@@ -243,6 +266,20 @@ typedef void tdm_pp;
  */
 typedef void tdm_vblank;
 
+/* virtual */
+typedef void (*tdm_output_create_handler)(tdm_display *dpy, tdm_output *output, void *user_data);
+typedef void (*tdm_output_destroy_handler)(tdm_output *output, void *user_data);
+
+/**
+ * @brief The output change handler
+ * @details This handler will be called when the status of a output object is
+ * changed in runtime.
+ */
+typedef void (*tdm_output_change_handler)(tdm_output *output,
+                                                                                 tdm_output_change_type type,
+                                                                                 tdm_value value,
+                                                                                 void *user_data);
+
 /**
  * @brief The vblank handler
  * @see output_set_vblank_handler() function of #tdm_func_display
@@ -284,10 +321,12 @@ typedef void (*tdm_capture_done_handler)(tdm_capture *capture,
 typedef void (*tdm_vblank_create_handler)(tdm_vblank *vblank, void *user_data);
 
 /**
- * @brief The 'need to validate' handler of an output object
- * @since 2.0.0
+ * @brief The hwc commit handler
+ * @see hwc_set_commit_handler() function of #tdm_func_hwc
  */
-typedef void (*tdm_output_need_validate_handler)(tdm_output *output);
+typedef void (*tdm_hwc_commit_handler)(tdm_hwc *hwc, unsigned int sequence,
+                                                                         unsigned int tv_sec, unsigned int tv_usec,
+                                                                         void *user_data);
 
 #ifdef __cplusplus
 }