[Application] Fix widget instance id bug (#1197) (#1373)
[platform/core/csapi/tizenfx.git] / src / Tizen.Applications.WidgetApplication / Interop / Interop.Widget.cs
old mode 100755 (executable)
new mode 100644 (file)
index 5a17df4..87abc41
@@ -98,15 +98,23 @@ internal static partial class Interop
         [DllImport(Libraries.AppcoreWidget, EntryPoint = "widget_app_terminate_context")]
         internal static extern ErrorCode TerminateContext(IntPtr handle);
 
-        [DllImport(Libraries.AppcoreWidget, EntryPoint = "widget_app_set_content_info")]
+        [DllImport(Libraries.AppcoreWidget, EntryPoint = "widget_app_context_set_content_info")]
         internal static extern ErrorCode SetContent(IntPtr handle, SafeBundleHandle content);
 
-        [DllImport(Libraries.AppcoreWidget, EntryPoint = "widget_app_set_title")]
+        [DllImport(Libraries.AppcoreWidget, EntryPoint = "widget_app_context_set_title")]
         internal static extern ErrorCode SetTitle(IntPtr handle, string title);
 
         [DllImport(Libraries.AppcoreWidget, EntryPoint = "widget_app_get_elm_win")]
         internal static extern ErrorCode GetWin(IntPtr handle, out IntPtr win);
 
+        [DllImport(Libraries.AppcoreWidget)]
+        internal static extern IntPtr widget_app_get_id(IntPtr handle);
+
+        internal static string GetId(IntPtr handle)
+        {
+            return Marshal.PtrToStringAnsi(widget_app_get_id(handle));
+        }
+
         [DllImport(Libraries.AppCommon, EntryPoint = "app_event_get_low_memory_status")]
         internal static extern Tizen.Internals.Errors.ErrorCode AppEventGetLowMemoryStatus(IntPtr handle, out LowMemoryStatus status);