[NUI] Change ColorDepth enum to ColorFormat
authorDaekwang Ryu <dkdk.ryu@samsung.com>
Thu, 5 Aug 2021 06:09:50 +0000 (15:09 +0900)
committerdongsug-song <35130733+dongsug-song@users.noreply.github.com>
Tue, 10 Aug 2021 09:08:13 +0000 (18:08 +0900)
ColorDepth was changed to ColorFormat in Dali.

src/Tizen.NUI/src/internal/Interop/Interop.NativeImageQueue.cs
src/Tizen.NUI/src/public/Images/NativeImageQueue.cs

index 50169d8..f62344d 100644 (file)
@@ -23,7 +23,7 @@ namespace Tizen.NUI
         internal static partial class NativeImageQueue
         {
             [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_new_NativeImageQueuePtr")]
-            public static extern IntPtr NewHandle(uint width, uint height, int colorDepth);
+            public static extern IntPtr NewHandle(uint width, uint height, int colorFormat);
 
             [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_NativeImageQueue_GetPtr")]
             public static extern IntPtr Get(IntPtr queue);
index 39ad41a..1de8bf8 100644 (file)
@@ -26,7 +26,7 @@ namespace Tizen.NUI
     /// </summary>
     /// <example>
     /// <code>
-    /// NativeImageQueue queue = new NativeImageQueue(width,height,ColorDepth.Default);
+    /// NativeImageQueue queue = new NativeImageQueue(width,height,ColorFormat.RGBA8888);
     /// if(queue.CanDequeueBuffer())
     /// {
     ///   var buffer = queue.DequeueBuffer(ref bufferWidth,ref bufferHeight,ref bufferStride);
@@ -42,15 +42,34 @@ namespace Tizen.NUI
     {
         private IntPtr handle;
 
+        [EditorBrowsable(EditorBrowsableState.Never)]
+        public enum ColorFormat
+        {
+            /// <summary>
+            /// 8 red bits, 8 green bits, 8 blue bits
+            /// </summary>
+            RGB888,
+
+            /// <summary>
+            /// 8 red bits, 8 green bits, 8 blue bits, alpha 8 bits
+            /// </summary>
+            RGBA8888,
+
+            /// <summary>
+            /// 8 red bits, 8 green bits, 8 blue bits, and 8 ignored bits
+            /// </summary>
+            RGBX8888
+        }
+
         /// <summary>
-        /// Creates an initialized NativeImageQueue with size and color depth.
+        /// Creates an initialized NativeImageQueue with size and color format.
         /// </summary>
         /// <param name="width">A Width of queue.</param>
         /// <param name="height">A Height of queue.</param>
-        /// <param name="depth">A color depth of queue.</param>
+        /// <param name="colorFormat">A color format of queue.</param>
         /// <returns>A NativeImageQueue.</returns>
         [EditorBrowsable(EditorBrowsableState.Never)]
-        public NativeImageQueue(uint width, uint height, NativeImageSource.ColorDepth depth) : this(Interop.NativeImageQueue.NewHandle(width, height, (int)depth), true)
+        public NativeImageQueue(uint width, uint height, ColorFormat colorFormat) : this(Interop.NativeImageQueue.NewHandle(width, height, (int)colorFormat), true)
         {
             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
         }