2 * Copyright (c) 2016 Samsung Electronics Co., Ltd All Rights Reserved
4 * Licensed under the Apache License, Version 2.0 (the License);
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
8 * http://www.apache.org/licenses/LICENSE-2.0
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an AS IS BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
18 using System.Runtime.InteropServices;
20 internal static partial class Interop
22 internal static partial class Elementary
25 internal enum Elm_Colorselector_Mode
27 ELM_COLORSELECTOR_PALETTE = 0, /* Only color palette is displayed. */
28 ELM_COLORSELECTOR_COMPONENTS, /* Only color selector is displayed. */
29 ELM_COLORSELECTOR_BOTH, /* Both Palette and selector is displayed, default.*/
30 ELM_COLORSELECTOR_PICKER, /* Only color picker is displayed. */
31 ELM_COLORSELECTOR_ALL /* All possible color selector is displayed. */
34 [DllImport(Libraries.Elementary)]
35 internal static extern IntPtr elm_colorselector_add(IntPtr obj);
37 [DllImport(Libraries.Elementary)]
38 internal static extern void elm_colorselector_color_set(IntPtr obj, int r, int g, int b, int a);
40 [DllImport(Libraries.Elementary)]
41 internal static extern void elm_colorselector_color_get(IntPtr obj, out int r, out int g, out int b, out int a);
43 [DllImport(Libraries.Elementary)]
44 internal static extern void elm_colorselector_palette_name_set(IntPtr obj, string name);
46 [DllImport(Libraries.Elementary, EntryPoint = "elm_colorselector_palette_name_get", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true, CharSet = CharSet.Ansi)]
47 internal static extern IntPtr _elm_colorselector_palette_name_get(IntPtr obj);
48 internal static string elm_colorselector_palette_name_get(IntPtr obj)
50 var text = _elm_colorselector_palette_name_get(obj);
51 return Marshal.PtrToStringAnsi(text);
54 [DllImport(Libraries.Elementary)]
55 internal static extern void elm_colorselector_mode_set(IntPtr obj, Elm_Colorselector_Mode mode);
57 [DllImport(Libraries.Elementary)]
58 internal static extern Elm_Colorselector_Mode elm_colorselector_mode_get(IntPtr obj);
60 [DllImport(Libraries.Elementary)]
61 internal static extern IntPtr elm_colorselector_palette_color_add(IntPtr obj, int r, int g, int b, int a);
63 [DllImport(Libraries.Elementary)]
64 internal static extern void elm_colorselector_palette_clear(IntPtr obj);
66 [DllImport(Libraries.Elementary)]
67 internal static extern IntPtr elm_colorselector_palette_selected_item_get(IntPtr obj);
69 [DllImport(Libraries.Elementary)]
70 internal static extern void elm_colorselector_palette_item_color_get(IntPtr obj, out int r, out int g, out int b, out int a);
72 [DllImport(Libraries.Elementary)]
73 internal static extern void elm_colorselector_palette_item_color_set(IntPtr obj, int r, int g, int b, int a);
75 [DllImport(Libraries.Elementary)]
76 internal static extern bool elm_colorselector_palette_item_selected_get(IntPtr obj);
78 [DllImport(Libraries.Elementary)]
79 internal static extern void elm_colorselector_palette_item_selected_set(IntPtr obj, bool selected);