Release 4.0.0-preview1-00051
[platform/core/csapi/tizenfx.git] / src / ElmSharp / Interop / Interop.Elementary.Item.cs
1 /*
2  * Copyright (c) 2016 Samsung Electronics Co., Ltd All Rights Reserved
3  *
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
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
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.
15  */
16
17 using System;
18 using System.Runtime.InteropServices;
19
20 internal static partial class Interop
21 {
22     internal static partial class Elementary
23     {
24         [DllImport(Libraries.Elementary)]
25         internal static extern void elm_object_item_part_content_set(IntPtr obj, string part, IntPtr content);
26
27         [DllImport(Libraries.Elementary)]
28         internal static extern IntPtr elm_object_item_part_content_unset(IntPtr obj, string part);
29
30         [DllImport(Libraries.Elementary)]
31         internal static extern void elm_object_item_part_content_set(IntPtr obj, IntPtr part, IntPtr content);
32
33         [DllImport(Libraries.Elementary, EntryPoint = "elm_object_item_part_text_get", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true, CharSet = CharSet.Ansi)]
34         internal static extern IntPtr _elm_object_item_part_text_get(IntPtr obj, string part);
35
36         internal static string elm_object_item_part_text_get(IntPtr obj, string part)
37         {
38             var text = _elm_object_item_part_text_get(obj, part);
39             return Marshal.PtrToStringAnsi(text);
40         }
41
42         [DllImport(Libraries.Elementary)]
43         internal static extern void elm_object_item_color_class_color_set(IntPtr it, string part, int r, int g, int b, int a);
44
45         [DllImport(Libraries.Elementary)]
46         internal static extern void elm_object_item_color_class_color_get(IntPtr obj, string part, out int r, out int g, out int b, out int a);
47
48         [DllImport(Libraries.Elementary)]
49         internal static extern void elm_object_item_color_class_del(IntPtr obj, string part);
50
51         [DllImport(Libraries.Elementary)]
52         internal static extern void elm_object_item_part_text_set(IntPtr obj, string part, string label);
53
54         [DllImport(Libraries.Elementary)]
55         internal static extern void elm_object_item_part_text_set(IntPtr obj, IntPtr part, string label);
56
57         [DllImport(Libraries.Elementary)]
58         internal static extern IntPtr elm_object_item_data_get(IntPtr it);
59
60         [DllImport(Libraries.Elementary)]
61         internal static extern void elm_object_item_data_set(IntPtr it, IntPtr data);
62
63         [DllImport(Libraries.Elementary)]
64         internal static extern void elm_object_item_del(IntPtr obj);
65
66         [DllImport(Libraries.Elementary)]
67         internal static extern void elm_object_item_del_cb_set(IntPtr obj, Interop.Evas.SmartCallback callback);
68
69         [DllImport(Libraries.Elementary)]
70         internal static extern void elm_object_item_disabled_set(IntPtr obj, bool disable);
71
72         [DllImport(Libraries.Elementary)]
73         internal static extern bool elm_object_item_disabled_get(IntPtr obj);
74
75         [DllImport(Libraries.Elementary)]
76         internal static extern IntPtr elm_object_item_part_content_get(IntPtr obj, string part);
77
78         [DllImport(Libraries.Elementary)]
79         internal static extern IntPtr elm_object_item_access_object_get(IntPtr obj);
80
81         [DllImport(Libraries.Elementary)]
82         internal static extern void elm_object_item_access_unregister(IntPtr obj);
83
84         [DllImport(Libraries.Elementary)]
85         internal static extern IntPtr elm_object_item_track(IntPtr obj);
86
87         [DllImport(Libraries.Elementary)]
88         internal static extern void elm_object_item_untrack(IntPtr obj);
89
90         [DllImport(Libraries.Elementary)]
91         internal static extern IntPtr elm_object_item_widget_get(IntPtr obj);
92
93         [DllImport(Libraries.Elementary)]
94         internal static extern void elm_object_item_signal_emit(IntPtr obj, string emission, string source);
95
96         [DllImport(Libraries.Elementary)]
97         internal static extern void elm_object_item_signal_callback_add(IntPtr obj, string emission, string source, Elm_Object_Item_Signal_Cb func, IntPtr data);
98
99         [DllImport(Libraries.Elementary)]
100         internal static extern IntPtr elm_object_item_signal_callback_del(IntPtr obj, string emission, string source, Elm_Object_Item_Signal_Cb func);
101
102         [UnmanagedFunctionPointer(CallingConvention.Cdecl)]
103         internal delegate bool Elm_Object_Item_Signal_Cb(IntPtr data, IntPtr item, string emission, string source);
104
105         [UnmanagedFunctionPointer(CallingConvention.Cdecl)]
106         internal delegate IntPtr Elm_Tooltip_Item_Content_Cb(IntPtr data, IntPtr obj, IntPtr tooltip, IntPtr item);
107
108         internal enum Elm_Object_Select_Mode
109         {
110             ELM_OBJECT_SELECT_MODE_DEFAULT,
111             ELM_OBJECT_SELECT_MODE_ALWAYS,
112             ELM_OBJECT_SELECT_MODE_NONE,
113             ELM_OBJECT_SELECT_MODE_DISPLAY_ONLY
114         }
115     }
116 }