log: check log level
[platform/core/uifw/libtdm.git] / include / tdm_backend.h
index e3940e9..09b1377 100644 (file)
@@ -592,9 +592,36 @@ typedef struct _tdm_func_output {
         * @return #TDM_ERROR_NONE if success. Otherwise, error value.
         * @since 2.0.0
         */
-       tdm_error (*output_hwc_set_client_target_buffer)(tdm_output *output, tbm_surface_h target_buffer,
-                                                                                                tdm_hwc_region damage, tdm_hwc_window **composited_wnds,
-                                                                                                uint32_t num_wnds);
+       tdm_error (*output_hwc_set_client_target_buffer)(tdm_output *output, tbm_surface_h target_buffer, tdm_hwc_region damage);
+
+       /**
+        * @brief Unset the client(relative to the TDM) target buffer
+        * @details TODO
+        * @param[in] output A output object
+        * @return #TDM_ERROR_NONE if success. Otherwise, error value.
+        * @since 2.0.0
+        */
+       tdm_error (*output_hwc_unset_client_target_buffer)(tdm_output *output);
+
+       /**
+        * @brief Get the layer associated with the client target buffer
+        * @details TODO:
+        * @param[in] output A output object
+        * @param[out] error #TDM_ERROR_NONE if success. Otherwise, error value.
+        * @return A layer object.
+        * @since 2.0.0
+        */
+       tdm_layer *(*output_hwc_get_client_target_buffer_layer)(tdm_output *output, tdm_error *error);
+
+       /**
+        * @brief Get the buffer which is set to the client target buffer
+        * @details TODO:
+        * @param[in] output A output object
+        * @param[out] error #TDM_ERROR_NONE if success. Otherwise, error value.
+        * @return A layer object.
+        * @since 2.0.0
+        */
+       tbm_surface_h (*output_hwc_get_client_target_buffer)(tdm_output *output, tdm_error *error);
 
        /**
         * @brief Validate the output
@@ -837,15 +864,6 @@ typedef struct _tdm_func_window {
                                                                                                                        tdm_error *error);
 
        /**
-        * @brief Sets the desired Z order (height) of the given window. A window with
-        * a greater Z value occludes a window with a lesser Z value.
-        * @param[in] hwc_window A window object
-        * @param[in] z the new Z order
-        * @return #TDM_ERROR_NONE if success. Otherwise, error value.
-        */
-       tdm_error (*hwc_window_set_zpos)(tdm_hwc_window *hwc_window, int32_t zpos);
-
-       /**
         * @brief Sets the desired composition type of the given window.
         * @details During output_hwc_validate(), the device may request changes to
         * the composition types of any of the layers as described in the definition
@@ -892,6 +910,15 @@ typedef struct _tdm_func_window {
                                                                         tdm_hwc_window_info *info);
 
        /**
+        * @brief Get the geometry information to a layer object
+        * @param[in] layer A layer object
+        * @param[out] info The geometry information
+        * @return #TDM_ERROR_NONE if success. Otherwise, error value.
+        */
+       tdm_error (*hwc_window_get_info)(tdm_hwc_window *hwc_window,
+                                                                        tdm_hwc_window_info *info);
+
+       /**
         * @brief Set a TDM buffer to a window object
         * @details A TDM buffer will be applied when the output object
         * of a layer object is committed.
@@ -907,6 +934,47 @@ typedef struct _tdm_func_window {
                                                                           tbm_surface_h buffer);
 
        /**
+        * @brief Unset a TDM buffer to a window object
+        * @details A TDM buffer will be applied when the output object
+        * of a layer object is committed.
+        * @param[in] hwc_window A window object
+        * @return #TDM_ERROR_NONE if success. Otherwise, error value.
+        *
+        * Implementation should return #TDM_ERROR_BUSY if #hwc_window can't
+        * be updated right now, this won't be interpreted like some critical
+        * error.
+        */
+       tdm_error (*hwc_window_unset_buffer)(tdm_hwc_window *hwc_window);
+
+       /**
+        * @brief Get a buffer which is set to a window object
+        * @details A TDM buffer will be applied when the output object
+        * of a layer object is committed.
+        * @param[in] hwc_window A window object
+        * @param[out] error #TDM_ERROR_NONE if success. Otherwise, error value.
+        * @return A buffer which is @b assigend to a window object
+        *
+        * Implementation should return #TDM_ERROR_BUSY if #hwc_window can't
+        * be updated right now, this won't be interpreted like some critical
+        * error.
+        */
+       tbm_surface_h (*hwc_window_get_buffer)(tdm_hwc_window *hwc_window,
+                                                                          tdm_error *error);
+
+       /**
+        * @brief Get a layer associated with a window object
+        * @param[in] hwc_window A window object
+        * @param[out] error #TDM_ERROR_NONE if success. Otherwise, error value.
+        * @return A layer which is @b assigend to a window object
+        * @remark
+        * A backend module @b SHOULD implement this function. The backend should
+        * return the tdm_layer assoicated with a hwc_window which must be assigend
+        * hw overlay.\n
+        */
+       tdm_layer *(*hwc_window_get_layer)(tdm_hwc_window *hwc_window,
+                                                                          tdm_error *error);
+
+       /**
         * @brief Set a flags to a window object
         * @param[in] hwc_window A window object
         * @param[in] flags A hwc_window flags