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.
20 namespace Tizen.Applications
23 /// Represents a factory class for making the RemoteView objects.
25 /// <since_tizen> 3 </since_tizen>
26 [Obsolete("Deprecated since API10. Will be removed in API12.")]
27 public static class RemoteViewFactory
29 private static bool _ready;
32 /// Initializes RemoteViewFactory.
34 /// <param name="win">Window object that will contain RemoteViews that are generated by RemoteViewFactory.
35 /// All the remote views will be located in the specified window object.
37 /// <privilege>http://tizen.org/privilege/widget.viewer</privilege>
38 /// <exception cref="InvalidOperationException">Thrown when this operation failed.</exception>
39 /// <exception cref="UnauthorizedAccessException">Thrown when this operation is denied.</exception>
40 /// <exception cref="NotSupportedException">Thrown when this operation is not supported for this device.</exception>
41 /// <since_tizen> 3 </since_tizen>
42 [Obsolete("Deprecated since API10. Will be removed in API12.")]
43 public static void Init(EvasObject win)
46 throw new InvalidOperationException("Already initialized");
47 RemoteView.CheckException(Interop.WidgetViewerEvas.Init(win));
52 /// Creates a RemoteView object.
54 /// <param name="parent">Parent object.</param>
55 /// <param name="widgetId">Widget ID.</param>
56 /// <param name="content">Contents that will be given to the widget instance.</param>
57 /// <param name="period">Update period.</param>
58 /// <param name="previewImage">True if you want to show the preview image.</param>
59 /// <param name="overlayText">True if you want to show the overlay text.</param>
60 /// <param name="loadingMessage">True if you want to show the loading message.</param>
61 /// <returns>RemoteView object.</returns>
62 /// <privilege>http://tizen.org/privilege/widget.viewer</privilege>
63 /// <exception cref="InvalidOperationException">Thrown when this operation failed.</exception>
64 /// <exception cref="UnauthorizedAccessException">Thrown when this operation is denied.</exception>
65 /// <exception cref="NotSupportedException">Thrown when this operation is not supported for this device.</exception>
66 /// <since_tizen> 3 </since_tizen>
67 [Obsolete("Deprecated since API10. Will be removed in API12.")]
68 public static RemoteView Create(EvasObject parent, string widgetId, string content, double period,
69 bool previewImage = true, bool overlayText = true, bool loadingMessage = true)
72 throw new InvalidOperationException("Not initialized");
74 var obj = new RemoteView()
76 Layout = new RemoteWindow(parent, widgetId, content, period)
80 obj.HidePreviewImage();
83 obj.HideOverlayText();
86 obj.HideLoadingMessage();
92 /// Finalizes the RemoteViewFactory.
94 /// <privilege>http://tizen.org/privilege/widget.viewer</privilege>
95 /// <exception cref="InvalidOperationException">Thrown when this operation failed.</exception>
96 /// <exception cref="UnauthorizedAccessException">Thrown when this operation is denied.</exception>
97 /// <exception cref="NotSupportedException">Thrown when this operation is not supported for this device.</exception>
98 /// <since_tizen> 3 </since_tizen>
99 [Obsolete("Deprecated since API10. Will be removed in API12.")]
100 public static void Shutdown()
103 throw new InvalidOperationException("Not initialized");
104 RemoteView.CheckException(Interop.WidgetViewerEvas.Fini());