[Tizen] Add ITizenWindowAttributes.NativeHandle accepted/tizen_5.0_unified accepted/tizen_5.5_unified_mobile_hotfix tizen_5.0 tizen_5.5_mobile_hotfix accepted/tizen/5.0/unified/20181212.062501 accepted/tizen/5.5/unified/20191031.034520 accepted/tizen/5.5/unified/mobile/hotfix/20201027.084852 accepted/tizen/unified/20181211.141137 submit/tizen/20181211.054236 submit/tizen_5.0/20181211.054111 submit/tizen_5.5/20191031.000003 submit/tizen_5.5/20191031.000011 submit/tizen_5.5/20191031.000012 submit/tizen_5.5/20191031.000013 submit/tizen_5.5_mobile_hotfix/20201026.185103 tizen_5.5.m2_release
authorWonyoung Choi <wy80.choi@samsung.com>
Tue, 11 Dec 2018 02:28:26 +0000 (11:28 +0900)
committerWonyoung Choi <wy80.choi@samsung.com>
Tue, 11 Dec 2018 05:36:22 +0000 (14:36 +0900)
Add NativeHandle property to provide the native window handle pointer.

packaging/opentk.spec
src/OpenTK/OpenTK.Tizen.csproj
src/OpenTK/Platform/Tizen/ITizenWindowAttributes.cs [changed mode: 0755->0644]
src/OpenTK/Platform/Tizen/Sdl2Extension.cs [changed mode: 0755->0644]
src/OpenTK/Platform/Tizen/TizenGameWindow.cs

index d2a35d5..260c31c 100644 (file)
@@ -1,6 +1,6 @@
 Name:       opentk
 Summary:    C# binding for OpenGL, OpenGL ES
-Version:    3.0.2
+Version:    3.0.3
 Release:    1
 Group:      Development/Libraries
 License:    MIT
index ed8fd38..ea537e4 100644 (file)
@@ -4,7 +4,7 @@
     <TargetFramework>netstandard2.0</TargetFramework>
     <AssemblyName>OpenTK</AssemblyName>
     <AssemblyVersion>3.0.0</AssemblyVersion>
-    <PackageVersion>3.0.2</PackageVersion>
+    <PackageVersion>3.0.3</PackageVersion>
     <Deterministic>true</Deterministic>
     <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
     <EnableDefaultItems>false</EnableDefaultItems>
old mode 100755 (executable)
new mode 100644 (file)
index ad0ff7a..da45d48
@@ -10,17 +10,22 @@ namespace OpenTK.Platform.Tizen
     public interface ITizenWindowAttributes
     {
         /// <summary>
-        /// Get or set whether the window accepts a focus or not.
+        /// Gets or sets whether the window accepts a focus or not.
         /// </summary>
         bool IsFocusAllowed { get; set; }
 
         /// <summary>
-        /// Get or set opacity of the window
+        /// Gets or sets opacity of the window
         /// </summary>
         float WindowOpacity { get; set; }
 
         /// <summary>
-        /// Add a supported auxiliary hint to the window
+        /// Gets the native window handle.
+        /// </summary>
+        IntPtr NativeHandle { get; }
+
+        /// <summary>
+        /// Adds a supported auxiliary hint to the window
         /// </summary>
         /// <param name="hint">The auxiliary hint string</param>
         /// <param name="value">The value string to be set</param>
old mode 100755 (executable)
new mode 100644 (file)
index 025287c..f08dca0
@@ -76,6 +76,10 @@ namespace OpenTK.Platform.SDL2
         public static extern bool SDL_Tizen_GetWindowAcceptFocus(IntPtr window);
 
         [SuppressUnmanagedCodeSecurity]
+        [DllImport(lib, CallingConvention = CallingConvention.Cdecl, EntryPoint = "SDL_Tizen_GetNativeWindow", ExactSpelling = true)]
+        public static extern IntPtr SDL_Tizen_GetNativeWindow(IntPtr window);
+
+        [SuppressUnmanagedCodeSecurity]
         [DllImport(lib, CallingConvention = CallingConvention.Cdecl, EntryPoint = "SDL_SetWindowOpacity", ExactSpelling = true)]
         public static extern int SDL_SetWindowOpacity(IntPtr window, float opacity);
 
index 666539b..1f58774 100644 (file)
@@ -77,6 +77,14 @@ namespace OpenTK.Platform.Tizen
             }
         }
 
+        public IntPtr NativeHandle
+        {
+            get
+            {
+                return SDL2.SDL.SDL_Tizen_GetNativeWindow(WindowInfo.Handle);
+            }
+        }
+
         protected override void OnUpdateFrame(FrameEventArgs e)
         {
             if (!Paused)
@@ -117,5 +125,6 @@ namespace OpenTK.Platform.Tizen
         {
             return SDL2.SDL.SDL_Tizen_AddAuxiliaryHint(WindowInfo.Handle, hint, value);
         }
+
     }
 }