package version up to 2.12.0
[platform/core/uifw/libtdm.git] / include / tdm_common.h
index db7e087..a3ccede 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
@@ -70,6 +70,7 @@ typedef enum {
        TDM_ERROR_OUTPUT_DISCONNECTED   = -11, /**< output disconnected */
        TDM_ERROR_PROTOCOL_ERROR        = -12, /**< protocol error */
        TDM_ERROR_TIMEOUT               = -13, /**< timeout */
+       TDM_ERROR_NO_MODULE             = -14, /**< no backend module */
 } tdm_error;
 
 /**
@@ -77,13 +78,13 @@ typedef enum {
  */
 typedef enum {
        TDM_TRANSFORM_NORMAL            = 0, /**< no transform */
-       TDM_TRANSFORM_90                = 1, /**< rotate 90 */
-       TDM_TRANSFORM_180               = 2, /**< rotate 180 */
-       TDM_TRANSFORM_270               = 3, /**< rotate 270 */
+       TDM_TRANSFORM_90                = 1, /**< rotate 90 degrees clockwise */
+       TDM_TRANSFORM_180               = 2, /**< rotate 180 degrees clockwise */
+       TDM_TRANSFORM_270               = 3, /**< rotate 270 degrees clockwise */
        TDM_TRANSFORM_FLIPPED           = 4, /**< no rotate and horizontal flip */
-       TDM_TRANSFORM_FLIPPED_90        = 5, /**< rotate 90 and horizontal flip */
-       TDM_TRANSFORM_FLIPPED_180       = 6, /**< rotate 180 and horizontal flip */
-       TDM_TRANSFORM_FLIPPED_270       = 7, /**< rotate 270 and horizontal flip */
+       TDM_TRANSFORM_FLIPPED_90        = 5, /**< rotate 90 degrees clockwise and horizontal flip */
+       TDM_TRANSFORM_FLIPPED_180       = 6, /**< rotate 180 degrees clockwise and horizontal flip */
+       TDM_TRANSFORM_FLIPPED_270       = 7, /**< rotate 270 degrees clockwise and horizontal flip */
 } tdm_transform;
 
 /**
@@ -98,6 +99,7 @@ typedef enum {
        TDM_OUTPUT_CAPABILITY_ASYNC_DPMS         = (1 << 0), /**< if a outupt supports asynchronous DPMS operation */
        TDM_OUTPUT_CAPABILITY_HWC                = (1 << 1), /**< if a outupt supports hwc operation @since 2.0.0*/
        TDM_OUTPUT_CAPABILITY_EXTENDED_DPMS      = (1 << 2), /**< if a outupt supports extended DPMS operation @since 2.0.0 */
+       TDM_OUTPUT_CAPABILITY_MIRROR             = (1 << 3), /**< if a outupt supports the displying mirror image of the src_output @since 2.9.0 */
 } tdm_output_capability;
 
 /**
@@ -137,28 +139,24 @@ typedef enum {
 } tdm_layer_capability;
 
 /**
- * @brief The hwc window capability enumeration
- * @since 2.0.0
- */
-typedef enum {
-       TDM_HWC_WINDOW_VIDEO_CAPABILITY_SCALE          = (1 << 1), /**< if a hwc window video has scale capability  */
-       TDM_HWC_WINDOW_VIDEO_CAPABILITY_TRANSFORM      = (1 << 2), /**< if a hwc window video has transform capability  */
-       TDM_HWC_WINDOW_VIDEO_CAPABILITY_SCANOUT        = (1 << 3), /**< if a hwc_window video allows a scanout buffer only */
-} tdm_hwc_window_video_capability;
-
-/**
  * @brief The pp capability enumeration
+ * @details The scale, transform and CSC functionalities seem the default functions of PP.
+ * If hardware device doesn't support one of them, we'd better let a developer know
+ * what a backend doesn't support like TDM_PP_CAPABILITY_NO_CSC.
  */
 typedef enum {
-       TDM_PP_CAPABILITY_SYNC           = (1 << 0), /**< The pp device supports synchronous operation */
-       TDM_PP_CAPABILITY_ASYNC          = (1 << 1), /**< The pp device supports asynchronous operation */
-       TDM_PP_CAPABILITY_SCALE          = (1 << 4), /**< The pp device supports scale operation */
-       TDM_PP_CAPABILITY_TRANSFORM      = (1 << 5), /**< The pp device supports transform operation */
-       TDM_PP_CAPABILITY_SCANOUT        = (1 << 6), /**< The pp device supports only scanout buffer */
+       TDM_PP_CAPABILITY_SYNC                  = (1 << 0), /**< The pp device supports synchronous operation */
+       TDM_PP_CAPABILITY_ASYNC                 = (1 << 1), /**< The pp device supports asynchronous operation */
+       TDM_PP_CAPABILITY_SCANOUT               = (1 << 4), /**< The pp device supports only scanout buffer */
+       TDM_PP_CAPABILITY_NO_CSC                = (1 << 5), /**< The pp device doesn't support Color Space Conversion */
+       TDM_PP_CAPABILITY_NO_TRANSFORM_ROTATION = (1 << 6), /**< The pp device doesn't support rotation transform */
 } tdm_pp_capability;
 
 /**
  * @brief The capture capability enumeration
+ * @details The scale, transform and CSC functionalities seem the default functions of capture.
+ * If hardware device doesn't support one of them, we'd better let a developer know
+ * what a backend doesn't support like TDM_PP_CAPABILITY_NO_CSC.
  */
 typedef enum {
        TDM_CAPTURE_CAPABILITY_OUTPUT    = (1 << 0), /**< The capture device supports to dump a output */
@@ -263,6 +261,18 @@ typedef enum {
        TDM_OUTPUT_MODE_FLAG_CLKDIV2    = (1 << 13),
 } tdm_output_mode_flag;
 
+/*
+ * @brief The hwc video capability enumeration
+ * @since 2.7.0
+ */
+typedef enum {
+       TDM_HWC_CAPABILITY_VIDEO_STREAM         = (1 << 1), /**< if a hwc has video stream capability  */
+       TDM_HWC_CAPABILITY_VIDEO_SCALE          = (1 << 2), /**< if a hwc allows to scale the video buffer  */
+       TDM_HWC_CAPABILITY_VIDEO_TRANSFORM      = (1 << 3), /**< if a hwc allows video to transform the video buffer  */
+       TDM_HWC_CAPABILITY_VIDEO_SCANOUT        = (1 << 4), /**< if a hwc allows video to accept the scanout buffer only */
+       TDM_HWC_CAPABILITY_FENCE                = (1 << 5), /**< if a hwc allows fence */
+} tdm_hwc_capability;
+
 /**
  * @brief The size structure
  */