From: SooChan Lim Date: Tue, 13 Mar 2018 06:28:08 +0000 (+0900) Subject: type: make the definitions into enum values. X-Git-Tag: accepted/tizen/unified/20180316.062629~12 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=b1cd66712a67a37a46f8fd650eb0e894cfd267d2;p=platform%2Fcore%2Fuifw%2Flibtbm.git type: make the definitions into enum values. for device and option Change-Id: Ie884c2cb9eb4d2c3a730eba55f68d32eebaba783 --- diff --git a/src/tbm_type_int.h b/src/tbm_type_int.h index 7cf375e..43f72a6 100644 --- a/src/tbm_type_int.h +++ b/src/tbm_type_int.h @@ -117,50 +117,28 @@ enum TBM_BUFMGR_CAPABILITY { }; /** - * @brief Definition for the device type to get the default handle + * @brief Definition for the device type to access tbm_bo * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif */ -#define TBM_DEVICE_DEFAULT 0 -/** - * @brief Definition for the device type to get the virtual memory - * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - */ -#define TBM_DEVICE_CPU 1 -/** - * @brief Definition for the device type to get the 2D memory handle - * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - */ -#define TBM_DEVICE_2D 2 -/** - * @brief Definition for the device type to get the 3D memory handle - * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - */ -#define TBM_DEVICE_3D 3 -/** - * @brief Definition for the device type to get the multimedia handle - * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - */ -#define TBM_DEVICE_MM 4 +typedef enum { + TBM_DEVICE_DEFAULT = 0, /**< the device type to get the default handle */ + TBM_DEVICE_CPU, /**< the device type to get the virtual memory */ + TBM_DEVICE_2D, /**< the device type to get the 2D memory handle */ + TBM_DEVICE_3D, /**< the device type to get the 3D memory handle */ + TBM_DEVICE_MM, /**< the device type to get the the multimedia handle */ -/* TBM_OPTION */ +} tbm_bo_device_type; /** - * @brief Definition for the access option to read - * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - */ -#define TBM_OPTION_READ (1 << 0) -/** - * @brief Definition for the access option to write + * @brief Definition for the optoin to access tbm_bo * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif */ -#define TBM_OPTION_WRITE (1 << 1) -/** - * @brief Definition for the vendor specific option that depends on the backend - * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - */ -#define TBM_OPTION_VENDOR (0xffff0000) - - +typedef enum { + TBM_OPTION_NONE = (1 << 0), /**< the option is none */ + TBM_OPTION_READ = (1 << 0), /**< the option to access to read the bo */ + TBM_OPTION_WRITE = (1 << 1), /**< the option to access to write the bo */ + TBM_OPTION_VENDOR = (0xffff0000), /**< the the vendor specific option that depends on the backend */ +} tbm_bo_access_option; /** * @brief tbm_bo_handle abstraction of the memory handle by TBM_DEVICE_TYPE