2 * Copyright (c) 2017 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 using Tizen.Applications;
22 internal static partial class Interop
24 internal static partial class WidgetViewerEvas
26 internal enum ErrorCode : int
28 None = Tizen.Internals.Errors.ErrorCode.None,
29 InvalidParameter = Tizen.Internals.Errors.ErrorCode.InvalidParameter,
30 OutOfMemory = Tizen.Internals.Errors.ErrorCode.OutOfMemory,
31 ResourceBusy = Tizen.Internals.Errors.ErrorCode.ResourceBusy,
32 PermissionDenied = Tizen.Internals.Errors.ErrorCode.PermissionDenied,
33 Canceled = Tizen.Internals.Errors.ErrorCode.Canceled,
34 IoError = Tizen.Internals.Errors.ErrorCode.IoError,
35 TimedOut = Tizen.Internals.Errors.ErrorCode.TimedOut,
36 NotSupported = Tizen.Internals.Errors.ErrorCode.NotSupported,
37 FileNoSpaceOnDevice = Tizen.Internals.Errors.ErrorCode.FileNoSpaceOnDevice,
38 Fault = -0x02F40000 | 0x0001,
39 AlreadyExist = -0x02F40000 | 0x0002,
40 AlreadyStarted = -0x02F40000 | 0x0004,
41 NotExist = -0x02F40000 | 0x0008,
42 Disabled = -0x02F40000 | 0x0010,
43 MaxExceeded = -0x02F40000 | 0x0011,
46 [DllImport(Libraries.WidgetViewerEvas, EntryPoint = "widget_viewer_evas_init")]
47 internal static extern ErrorCode Init(IntPtr win);
49 [DllImport(Libraries.WidgetViewerEvas, EntryPoint = "widget_viewer_evas_fini")]
50 internal static extern ErrorCode Fini();
52 [DllImport(Libraries.WidgetViewerEvas, EntryPoint = "widget_viewer_evas_add_widget")]
53 internal static extern IntPtr AddWidget(IntPtr parent, string widgetId, string content, double period);
55 [DllImport(Libraries.WidgetViewerEvas, EntryPoint = "widget_viewer_evas_notify_resumed_status_of_viewer")]
56 internal static extern ErrorCode NotifyResumedStatusOfViewer();
58 [DllImport(Libraries.WidgetViewerEvas, EntryPoint = "widget_viewer_evas_notify_paused_status_of_viewer")]
59 internal static extern ErrorCode NotifyPausedStatusOfViewer();
61 [DllImport(Libraries.WidgetViewerEvas, EntryPoint = "widget_viewer_evas_pause_widget")]
62 internal static extern ErrorCode PauseWidget(IntPtr widget);
64 [DllImport(Libraries.WidgetViewerEvas, EntryPoint = "widget_viewer_evas_resume_widget")]
65 internal static extern ErrorCode ResumeWidget(IntPtr widget);
67 [DllImport(Libraries.WidgetViewerEvas, EntryPoint = "widget_viewer_evas_get_content_info")]
68 internal static extern IntPtr GetContentInfo(IntPtr widget);
70 [DllImport(Libraries.WidgetViewerEvas, EntryPoint = "widget_viewer_evas_get_title_string")]
71 internal static extern IntPtr GetTitleString(IntPtr widget);
73 [DllImport(Libraries.WidgetViewerEvas, EntryPoint = "widget_viewer_evas_get_widget_id")]
74 internal static extern IntPtr GetWidgetId(IntPtr widget);
76 [DllImport(Libraries.WidgetViewerEvas, EntryPoint = "widget_viewer_evas_get_period")]
77 internal static extern double GetPeriod(IntPtr widget);
79 [DllImport(Libraries.WidgetViewerEvas, EntryPoint = "widget_viewer_evas_cancel_click_event")]
80 internal static extern void CancelClickEvent(IntPtr widget);
82 [DllImport(Libraries.WidgetViewerEvas, EntryPoint = "widget_viewer_evas_disable_loading")]
83 internal static extern void DisableLoading(IntPtr widget);
85 [DllImport(Libraries.WidgetViewerEvas, EntryPoint = "widget_viewer_evas_feed_mouse_up_event")]
86 internal static extern ErrorCode FeedMouseUpEvent(IntPtr widget);
88 [DllImport(Libraries.WidgetViewerEvas, EntryPoint = "widget_viewer_evas_disable_preview")]
89 internal static extern void DisablePreview(IntPtr widget);
91 [DllImport(Libraries.WidgetViewerEvas, EntryPoint = "widget_viewer_evas_disable_overlay_text")]
92 internal static extern void DisableOverlayText(IntPtr widget);