From f02532383f76edee44affc4cfd2ab5d47db34904 Mon Sep 17 00:00:00 2001 From: Donghee Ye Date: Mon, 6 Mar 2017 10:32:11 +0900 Subject: [PATCH] Add Window Role property Change-Id: I0645dc99b2d1424446202f8165011a7d1dbabdd8 --- packaging/elm-sharp.spec | 2 +- src/ElmSharp/ElmSharp/Window.cs | 12 ++++++++++++ src/ElmSharp/Interop/Interop.Elementary.Win.cs | 12 ++++++++++++ 3 files changed, 25 insertions(+), 1 deletion(-) diff --git a/packaging/elm-sharp.spec b/packaging/elm-sharp.spec index 2adb00e..f84fa0b 100644 --- a/packaging/elm-sharp.spec +++ b/packaging/elm-sharp.spec @@ -1,4 +1,4 @@ -%define DEV_VERSION beta-011 +%define DEV_VERSION beta-012 Name: elm-sharp Summary: C# Binding for Elementary diff --git a/src/ElmSharp/ElmSharp/Window.cs b/src/ElmSharp/ElmSharp/Window.cs index 0bb0df7..be5a376 100644 --- a/src/ElmSharp/ElmSharp/Window.cs +++ b/src/ElmSharp/ElmSharp/Window.cs @@ -161,6 +161,18 @@ namespace ElmSharp } } + public string Role + { + get + { + return Interop.Elementary.elm_win_role_get(Handle); + } + set + { + Interop.Elementary.elm_win_role_set(Handle, value); + } + } + public StatusBarMode StatusBarMode { get diff --git a/src/ElmSharp/Interop/Interop.Elementary.Win.cs b/src/ElmSharp/Interop/Interop.Elementary.Win.cs index 345e918..89af78e 100644 --- a/src/ElmSharp/Interop/Interop.Elementary.Win.cs +++ b/src/ElmSharp/Interop/Interop.Elementary.Win.cs @@ -58,6 +58,18 @@ internal static partial class Interop internal static extern void elm_win_alpha_set(IntPtr obj, bool alpha); [DllImport(Libraries.Elementary)] + internal static extern IntPtr _elm_win_role_get(IntPtr obj); + + internal static string elm_win_role_get(IntPtr obj) + { + var text = _elm_win_role_get(obj); + return Marshal.PtrToStringAnsi(text); + } + + [DllImport(Libraries.Elementary)] + internal static extern void elm_win_role_set(IntPtr obj, string role); + + [DllImport(Libraries.Elementary)] internal static extern void elm_win_autodel_set(IntPtr obj, bool autodel); [DllImport(Libraries.Elementary)] -- 2.7.4