2 * Copyright (c) 2018 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.Collections.Generic;
19 using System.ComponentModel;
24 /// Enumeration for the display rotation of window.
26 /// <since_tizen> preview </since_tizen>
27 [Obsolete("This has been deprecated in API12")]
29 public enum DisplayRotation
32 /// Rotation value of the window is 0 degree.
37 /// Rotation value of the window is 90 degrees.
42 /// Rotation value of the window is 180 degrees.
47 /// Rotation value of the window is 270 degrees.
53 /// Enumeration for the indicator opacity.
55 /// <since_tizen> preview </since_tizen>
56 [Obsolete("This has been deprecated in API12")]
57 public enum StatusBarMode
60 /// Opacifies the status bar.
65 /// Be translucent the status bar.
73 /// Transparentizes the status bar.
79 /// Enumeration for the keygrab modes of the window.
81 /// <since_tizen> preview </since_tizen>
82 [Obsolete("This has been deprecated in API12")]
83 [EditorBrowsable(EditorBrowsableState.Never)]
84 public enum KeyGrabMode
87 /// Unknown keygrab mode.
92 /// Getting the grabbed-key together with the other client windows.
97 /// Getting the grabbed-key only when the window is top of the stack.
102 /// Getting the grabbed-key exclusively regardless of the window's position.
104 OverrideExclusive = 2048,
108 /// Enumeration for the indicator mode.
110 /// <since_tizen> preview </since_tizen>
111 [Obsolete("This has been deprecated in API12")]
112 public enum IndicatorMode
115 /// Unknown indicator state.
120 /// Hides the indicator.
125 /// Shows the indicator.
131 /// Enumeration for the keyboard mode.
133 /// <since_tizen> preview </since_tizen>
134 [Obsolete("This has been deprecated in API12")]
135 public enum KeyboardMode
138 /// Unknown keyboard state.
143 /// Request to deactivate the keyboard.
148 /// Enable keyboard with default layout.
153 /// Alpha (a-z) keyboard layout.
158 /// Numeric keyboard layout.
163 /// Pin keyboard layout.
168 /// Phone keyboard layout.
173 /// Hexadecimal numeric keyboard layout.
178 /// Full (QWERTY) keyboard layout.
183 /// Password keyboard layout.
188 /// IP keyboard layout.
193 /// Host keyboard layout.
198 /// File keyboard layout.
203 /// URL keyboard layout.
213 /// J2ME keyboard layout.
219 /// Enumeration for the window type.
221 /// <since_tizen> preview </since_tizen>
222 [Obsolete("This has been deprecated in API12")]
223 public enum WindowType
231 /// A normal window. Indicates a normal, top-level window. Almost every window will be created with this type.
236 /// Used for simple dialog windows.
241 /// For special desktop windows, like a background window holding desktop icons.
246 /// The window is used as a dock or panel. Usually would be kept on top of any other window by the Window Manager.
251 /// The window is used to hold a floating toolbar, or similar.
256 /// Similar to Toolbar.
261 /// A persistent utility window, like a toolbox or palette.
266 /// Splash window for a starting up application.
271 /// The window is a dropdown menu, as when an entry in a menubar is clicked.
276 /// Like DropdownMenu, but for the menu triggered by right-clicking an object.
281 /// The window is a tooltip. A short piece of explanatory text that typically appears after the mouse cursor hovers over an object for a while.
286 /// A notification window, like a warning about battery life or a new e-mail received.
291 /// A window holding the contents of a combo box.
296 /// Used to indicate the window as a representation of an object being dragged across different windows, or even applications.
301 /// The window is rendered onto an image buffer. No actual window is created for this type, instead the window and all of its contents will be rendered to an image buffer.
302 /// This allows to have children windows inside a parent one just like any other object would be, and do other things like applying Evas_Map effects to it.
307 /// The window is rendered onto an image buffer and can be shown other process's plug image object.
308 /// No actual window is created for this type, instead the window and all of its contents will be rendered to an image buffer and can be shown other process's plug image object.
313 /// This window was created using a pre-existing canvas. The window widget can be deleted, but the canvas must be managed externally.
319 /// Enumeration of notification window's priority level.
321 /// <since_tizen> preview </since_tizen>
322 [Obsolete("This has been deprecated in API12")]
323 public enum NotificationLevel
326 /// No (reset) notification level. This value makes the window place in normal layer.
331 /// Default notification level.
336 /// Higher notification level than default.
341 /// Higher notification level than medium.
346 /// The highest notification level.
352 /// Enumeration of screen mode.
354 /// <since_tizen> preview </since_tizen>
355 [Obsolete("This has been deprecated in API12")]
356 public enum ScreenMode
359 /// The mode which turns the screen off after a timeout.
364 /// The mode which keeps the screen turned on.
370 /// The Window is a container that contains the graphical user interface of a program.
372 /// <since_tizen> preview </since_tizen>
373 [Obsolete("This has been deprecated in API12")]
374 public class Window : Widget
376 SmartEvent _deleteRequest;
377 SmartEvent _rotationChanged;
378 HashSet<EvasObject> _referenceHolder = new HashSet<EvasObject>();
381 /// Creates and initializes a new instance of the Window class.
383 /// <param name="name">Window name.</param>
384 /// <since_tizen> preview </since_tizen>
385 [Obsolete("This has been deprecated in API12")]
386 public Window(string name) : this(null, name)
391 /// Creates and initializes a new instance of the Window class.
393 /// <param name="parent">
394 /// Parent widget which this window is created on.
396 /// <param name="name">
400 /// Window constructor.show window indicator, set callback
401 /// when closing the window in any way outside the program control,
402 /// and set callback when window rotation is changed.
404 /// <since_tizen> preview </since_tizen>
405 [Obsolete("This has been deprecated in API12")]
406 public Window(Window parent, string name) : this(parent, name, WindowType.Basic)
411 /// Creates and initializes a new instance of the Window class.
413 /// <param name="parent">
414 /// Parent widget which this window is created on.
416 /// <param name="name">
419 /// <param name="type">
423 /// Window constructor.show window indicator, set callback
424 /// when closing the window in any way outside the program control,
425 /// and set callback when window rotation is changed.
427 /// <since_tizen> preview </since_tizen>
428 [Obsolete("This has been deprecated in API12")]
429 public Window(Window parent, string name, WindowType type)
434 IndicatorMode = IndicatorMode.Show;
436 _deleteRequest = new SmartEvent(this, "delete,request");
437 _rotationChanged = new SmartEvent(this, "wm,rotation,changed");
438 _deleteRequest.On += (s, e) => CloseRequested?.Invoke(this, EventArgs.Empty);
439 _rotationChanged.On += (s, e) => RotationChanged?.Invoke(this, EventArgs.Empty);
443 /// Creates and initializes a new instance of the Window class.
445 /// <since_tizen> preview </since_tizen>
446 [Obsolete("This has been deprecated in API12")]
452 /// CloseRequested will be triggered when window is closed.
454 /// <since_tizen> preview </since_tizen>
455 [Obsolete("This has been deprecated in API12")]
456 public event EventHandler CloseRequested;
459 /// RotationChanged will be triggered when window is rotated.
461 /// <since_tizen> preview </since_tizen>
462 [Obsolete("This has been deprecated in API12")]
463 public event EventHandler RotationChanged;
466 /// Sets or gets the window name.
468 /// <since_tizen> preview </since_tizen>
469 [Obsolete("This has been deprecated in API12")]
470 public string Name { get; set; }
473 /// Gets the window type.
475 /// <since_tizen> preview </since_tizen>
476 [Obsolete("This has been deprecated in API12")]
477 public WindowType Type { get; } = WindowType.Basic;
480 /// Gets the window size with Size value(w,h)
482 /// <since_tizen> preview </since_tizen>
483 [Obsolete("This has been deprecated in API12")]
484 public Size ScreenSize
489 Interop.Elementary.elm_win_screen_size_get(Handle, out x, out y, out w, out h);
490 return new Size(w, h);
495 /// Gets the screen dpi for the screen that the window is on.
497 /// <since_tizen> preview </since_tizen>
498 [Obsolete("This has been deprecated in API12")]
499 public Point ScreenDpi
503 Point point = default(Point);
504 Interop.Elementary.elm_win_screen_dpi_get(Handle, out point.X, out point.Y);
510 /// Gets the rotation of the window. The rotation of the window in degrees (0-360).
512 /// <since_tizen> preview </since_tizen>
513 [Obsolete("This has been deprecated in API12")]
518 return Interop.Elementary.elm_win_rotation_get(Handle);
523 /// Gets whether the window manager supports window rotation or not.
525 /// <since_tizen> preview </since_tizen>
526 [Obsolete("This has been deprecated in API12")]
527 public bool IsRotationSupported
531 return Interop.Elementary.elm_win_wm_rotation_supported_get(Handle);
536 /// Sets or gets the available rotation degree.
538 /// <since_tizen> preview </since_tizen>
539 [Obsolete("Sorry, it's error typo of AvailableRotations, please use AvailableRotations")]
540 public DisplayRotation AavailableRotations { get; set; }
543 /// Sets or gets the available rotation degree.
545 /// <since_tizen> preview </since_tizen>
546 [Obsolete("This has been deprecated in API12")]
547 public DisplayRotation AvailableRotations
552 Interop.Elementary.elm_win_wm_rotation_available_rotations_get(Handle, out rotations);
553 if (rotations == null)
557 return ConvertToDisplayRotation(rotations);
561 Interop.Elementary.elm_win_wm_rotation_available_rotations_set(Handle, ConvertDegreeArray(value));
566 /// Sets or gets whether the auto deletion function is enabled.
569 /// If you enable auto deletion, the window is automatically destroyed after the signal is emitted.
570 /// If auto deletion is disabled, the window is not destroyed and the program has to handle it.
572 /// <since_tizen> preview </since_tizen>
573 [Obsolete("This has been deprecated in API12")]
574 public bool AutoDeletion
578 return Interop.Elementary.elm_win_autodel_get(Handle);
582 Interop.Elementary.elm_win_autodel_set(Handle, value);
587 /// Sets or gets the alpha channel state of the window.
590 /// true if the window alpha channel is enabled, false otherwise.
591 /// If alpha is true, the alpha channel of the canvas will be enabled possibly making parts of the window completely or partially transparent.
593 /// <since_tizen> preview </since_tizen>
594 [Obsolete("This has been deprecated in API12")]
599 return Interop.Elementary.elm_win_alpha_get(Handle);
603 Interop.Elementary.elm_win_alpha_set(Handle, value);
608 /// Sets or gets the role of the window.
611 /// The Role will be invalid if a new role is set or if the window is destroyed.
613 /// <since_tizen> preview </since_tizen>
614 [Obsolete("This has been deprecated in API12")]
619 return Interop.Elementary.elm_win_role_get(Handle);
623 Interop.Elementary.elm_win_role_set(Handle, value);
628 /// Sets or gets the mode of the status bar.
630 /// <since_tizen> preview </since_tizen>
631 [Obsolete("This has been deprecated in API12")]
632 public StatusBarMode StatusBarMode
636 return (StatusBarMode)Interop.Elementary.elm_win_indicator_opacity_get(Handle);
640 Interop.Elementary.elm_win_indicator_opacity_set(Handle, (int)value);
645 /// Sets or gets the iconified state of the window.
647 /// <since_tizen> preview </since_tizen>
648 [Obsolete("This has been deprecated in API12")]
649 [EditorBrowsable(EditorBrowsableState.Never)]
650 public bool Iconified
654 return Interop.Elementary.elm_win_iconified_get(RealHandle);
658 Interop.Elementary.elm_win_iconified_set(RealHandle, value);
663 /// Gets or sets the window's indicator mode.
665 /// <value>The indicator mode.</value>
666 /// <since_tizen> preview </since_tizen>
667 [Obsolete("This has been deprecated in API12")]
668 public IndicatorMode IndicatorMode
672 return Interop.Elementary.elm_win_indicator_mode_get(RealHandle);
676 Interop.Elementary.elm_win_indicator_mode_set(RealHandle, value);
681 /// Gets or sets the aspect ratio of the window.
683 /// <since_tizen> preview </since_tizen>
684 [Obsolete("This has been deprecated in API12")]
689 return Interop.Elementary.elm_win_aspect_get(RealHandle);
693 Interop.Elementary.elm_win_aspect_set(RealHandle, value);
698 /// Window's autohide state.
700 /// <since_tizen> preview </since_tizen>
701 [Obsolete("This has been deprecated in API12")]
706 return Interop.Elementary.elm_win_autohide_get(RealHandle);
710 Interop.Elementary.elm_win_autohide_set(RealHandle, value);
715 /// Gets the borderless state of the window.
716 /// This function requests the Window Manager to not draw any decoration around the window.
718 /// <since_tizen> preview </since_tizen>
719 [Obsolete("This has been deprecated in API12")]
720 public bool Borderless
724 return Interop.Elementary.elm_win_borderless_get(RealHandle);
728 Interop.Elementary.elm_win_borderless_set(RealHandle, value);
733 /// Gets or sets the demand attention state of the window.
735 /// <since_tizen> preview </since_tizen>
736 [Obsolete("This has been deprecated in API12")]
737 public bool DemandAttention
741 return Interop.Elementary.elm_win_demand_attention_get(RealHandle);
745 Interop.Elementary.elm_win_demand_attention_set(RealHandle, value);
750 /// Gets or sets the floating mode of the window.
752 /// <since_tizen> preview </since_tizen>
753 [Obsolete("This has been deprecated in API12")]
754 public bool FloatingMode
758 return Interop.Elementary.elm_win_floating_mode_get(RealHandle);
762 Interop.Elementary.elm_win_floating_mode_set(RealHandle, value);
767 /// Gets or sets the animate status for the focus highlight for this window.
768 /// This function will enable or disable the animation of focus highlight only for the given window, regardless of the global setting for it.
770 /// <since_tizen> preview </since_tizen>
771 [Obsolete("This has been deprecated in API12")]
772 public bool FocusHighlightAnimation
776 return Interop.Elementary.elm_win_focus_highlight_animate_get(RealHandle);
780 Interop.Elementary.elm_win_focus_highlight_animate_set(RealHandle, value);
785 /// Gets or sets the enabled status for the focus highlight in the window.
786 /// This function will enable or disable the focus highlight only for the given window, regardless of the global setting for it.
788 /// <since_tizen> preview </since_tizen>
789 [Obsolete("This has been deprecated in API12")]
790 public bool FocusHighlightEnabled
794 return Interop.Elementary.elm_win_focus_highlight_enabled_get(RealHandle);
798 Interop.Elementary.elm_win_focus_highlight_enabled_set(RealHandle, value);
803 /// Gets or sets the style for the focus highlight on this window.
804 /// Sets the style to use for theming the highlight of focused objects on the given window. If style is NULL, the default will be used.
806 /// <since_tizen> preview </since_tizen>
807 [Obsolete("This has been deprecated in API12")]
808 public string FocusHighlightStyle
812 return Interop.Elementary.elm_win_focus_highlight_style_get(RealHandle);
816 Interop.Elementary.elm_win_focus_highlight_style_set(RealHandle, value);
821 /// Gets the keyboard mode of the window.
823 /// <since_tizen> preview </since_tizen>
824 [Obsolete("This has been deprecated in API12")]
825 public KeyboardMode KeyboardMode
829 return (KeyboardMode)Interop.Elementary.elm_win_keyboard_mode_get(RealHandle);
833 Interop.Elementary.elm_win_keyboard_mode_set(RealHandle, (int)value);
838 /// Gets or sets the layer of the window.
839 /// What this means exactly will depend on the underlying engine used.
840 /// In the case of X11 backed engines, the value in layer has the following meanings:
841 /// less than 3 means that the window will be placed below all others,
842 /// more than 5 means that the window will be placed above all others,
843 /// and anything else means that the window will be placed in the default layer.
845 /// <since_tizen> preview </since_tizen>
846 [Obsolete("This has been deprecated in API12")]
847 public override int Layer
851 return Interop.Elementary.elm_win_layer_get(RealHandle);
855 Interop.Elementary.elm_win_layer_set(RealHandle, value);
860 /// Gets or sets the modal state of the window.
862 /// <since_tizen> preview </since_tizen>
863 [Obsolete("This has been deprecated in API12")]
868 return Interop.Elementary.elm_win_modal_get(RealHandle);
872 Interop.Elementary.elm_win_modal_set(RealHandle, value);
877 /// Gets or sets the noblank property of the window.
878 /// This is a way to request the display on which the window is shown is not blank, screensave, or otherwise hidden or obscure. It is intended for use such as media playback on a television where a user may not want to be interrupted by an idle screen.
879 /// The noblank property may have no effect if the window is iconified/minimized or hidden.
881 /// <since_tizen> preview </since_tizen>
882 [Obsolete("This has been deprecated in API12")]
887 return Interop.Elementary.elm_win_noblank_get(RealHandle);
891 Interop.Elementary.elm_win_noblank_set(RealHandle, value);
896 /// Gets the profile of the window.
898 /// <since_tizen> preview </since_tizen>
899 [Obsolete("This has been deprecated in API12")]
900 public string Profile
904 return Interop.Elementary.elm_win_profile_get(RealHandle);
908 Interop.Elementary.elm_win_profile_set(RealHandle, value);
913 /// Gets the constraints on the maximum width and height of the window relative to the width and height of its screen.
914 /// When this function returns true, object will never resize larger than the screen.
916 /// <since_tizen> preview </since_tizen>
917 [Obsolete("This has been deprecated in API12")]
918 public bool ScreenConstrain
922 return Interop.Elementary.elm_win_screen_constrain_get(RealHandle);
926 Interop.Elementary.elm_win_screen_constrain_set(RealHandle, value);
931 /// Gets or sets the base size of the window.
933 /// <since_tizen> preview </since_tizen>
934 [Obsolete("This has been deprecated in API12")]
940 Interop.Elementary.elm_win_size_base_get(RealHandle, out w, out h);
941 return new Size(w, h);
945 Interop.Elementary.elm_win_size_base_set(RealHandle, value.Width, value.Height);
950 /// Gets or sets the step size of the window.
952 /// <since_tizen> preview </since_tizen>
953 [Obsolete("This has been deprecated in API12")]
959 Interop.Elementary.elm_win_size_step_get(RealHandle, out w, out h);
960 return new Size(w, h);
964 Interop.Elementary.elm_win_size_step_set(RealHandle, value.Width, value.Height);
969 /// Gets the screen position X of a window.
971 /// <since_tizen> preview </since_tizen>
972 [Obsolete("This has been deprecated in API12")]
973 public int ScreenPositionX
978 Interop.Elementary.elm_win_screen_position_get(Handle, out x, out y);
984 /// Gets the screen position Y of a window.
986 /// <since_tizen> preview </since_tizen>
987 [Obsolete("This has been deprecated in API12")]
988 public int ScreenPositionY
993 Interop.Elementary.elm_win_screen_position_get(Handle, out x, out y);
999 /// Gets or sets the title of the window.
1001 /// <since_tizen> preview </since_tizen>
1002 [Obsolete("This has been deprecated in API12")]
1007 return Interop.Elementary.elm_win_title_get(Handle);
1011 Interop.Elementary.elm_win_title_set(Handle, value);
1016 /// Gets or sets the urgent state of the window.
1018 /// <since_tizen> preview </since_tizen>
1019 [Obsolete("This has been deprecated in API12")]
1024 return Interop.Elementary.elm_win_urgent_get(Handle);
1028 Interop.Elementary.elm_win_urgent_set(Handle, value);
1033 /// Gets or sets the withdrawn state of the window.
1035 /// <since_tizen> preview </since_tizen>
1036 [Obsolete("This has been deprecated in API12")]
1037 public bool Withdrawn
1041 return Interop.Elementary.elm_win_withdrawn_get(Handle);
1045 Interop.Elementary.elm_win_withdrawn_set(Handle, value);
1050 /// Gets or sets the priority level for the specified notification window.
1053 /// http://tizen.org/privilege/window.priority.set
1056 /// This can be used for a notification type window only.
1058 /// <since_tizen> preview </since_tizen>
1059 [Obsolete("This has been deprecated in API12")]
1060 public NotificationLevel NotificationLevel
1065 Interop.Eutil.efl_util_get_notification_window_level(Handle, out level);
1066 return (NotificationLevel)level;
1070 Interop.Eutil.efl_util_set_notification_window_level(Handle, (int)value);
1075 /// Gets or sets the window's screen mode.
1076 /// This API is useful when the application need to keep the display turned on.
1077 /// If the application set the mode to ScreenMode.AlwaysOn to its window and the window is shown wholly or partially,
1078 /// the window manager requests the display system to keep the display on as long as the window is shown.
1079 /// If the window is no longer shown, then the window manger request the display system to go back to normal operation.
1080 /// Default screen mode of window is ScreenMode.Default.
1083 /// http://tizen.org/privilege/display
1086 /// This needs the privilege. If the application which is not get the privilege use this API, the window manager generates the permission deny error.
1088 /// <since_tizen> preview </since_tizen>
1089 [Obsolete("This has been deprecated in API12")]
1090 public ScreenMode ScreenMode
1095 Interop.Eutil.efl_util_get_window_screen_mode(Handle, out mode);
1096 return (ScreenMode)mode;
1100 Interop.Eutil.efl_util_set_window_screen_mode(Handle, (int)value);
1105 /// Gets or sets the user's preferred brightness of the specified window.
1106 /// This is useful when the application need to change the brightness of the screen when it is appeared on the screen.
1107 /// If the application sets the brightness 0 to 100 to its window and the application window is shown wholly or partially,
1108 /// the window manager requests the display system to change the brightness of the screen using user's preferred brightness.
1109 /// If the window is no longer shown, then the window manger request the display system to go back to default brightness.
1110 /// If the brightness is less than 0, this means to use the default screen brightness.
1113 /// http://tizen.org/privilege/display
1116 /// This needs the privilege. If the application which is not get the privilege use this API, the window manager generates the permission deny error.
1118 /// <since_tizen> preview </since_tizen>
1119 [Obsolete("This has been deprecated in API12")]
1120 public int Brightness
1125 Interop.Eutil.efl_util_get_window_brightness(Handle, out brightness);
1130 Interop.Eutil.efl_util_set_window_brightness(Handle, value);
1134 internal static bool IsPreloaded { get; private set; }
1137 /// Creates a socket to provide the service for the Plug widget.
1139 /// <param name="name">A service name.</param>
1140 /// <param name="number">A number (any value, 0 being the common default) to differentiate multiple instances of services with the same name.</param>
1141 /// <param name="systemWide">A boolean that if true, specifies to create a system-wide service all users can connect to, otherwise the service is private to the user ID that created the service.</param>
1142 /// <returns>If true creates successful, otherwise false.</returns>
1143 /// <since_tizen> preview </since_tizen>
1144 [Obsolete("This has been deprecated in API12")]
1145 public bool CreateServiceSocket(string name, int number, bool systemWide)
1147 return Interop.Elementary.elm_win_socket_listen(RealHandle, name, number, systemWide);
1151 /// Sets the rotation of the window.
1153 /// <param name="degree">The rotation of the window, in degrees (0-360), counter-clockwise.</param>
1154 /// <param name="resize">Resizes the window's contents so that they fit inside the current window geometry.</param>
1155 /// <since_tizen> preview </since_tizen>
1156 [Obsolete("This has been deprecated in API12")]
1157 public void SetRotation(int degree, bool resize)
1160 Interop.Elementary.elm_win_rotation_with_resize_set(RealHandle, degree);
1162 Interop.Elementary.elm_win_rotation_set(RealHandle, degree);
1166 /// Sets the alpha window's visual state to opaque state.
1167 /// This sets the alpha window's visual state to opaque state.
1168 /// If the alpha window sets the visual state to the opaque,
1169 /// then the window manager could handle it as the opaque window while calculating visibility.
1170 /// This will have no effect when used by a non-alpha window.
1172 /// <since_tizen> preview </since_tizen>
1173 [Obsolete("This has been deprecated in API12")]
1174 public void SetOpaqueState()
1176 Interop.Eutil.efl_util_set_window_opaque_state(RealHandle, 1);
1180 /// Unsets the alpha window's visual state to opaque state.
1182 /// <since_tizen> preview </since_tizen>
1183 [Obsolete("This has been deprecated in API12")]
1184 public void UnsetOpaqueState()
1186 Interop.Eutil.efl_util_set_window_opaque_state(RealHandle, 0);
1190 /// Sets the window to be skipped by focus.
1191 /// This sets the window to be skipped by normal input.
1192 /// This means the Windows Manager will be asked to not focus this window as well as omit it from things like the taskbar, pager etc.
1193 /// Call this and enable it on the window BEFORE you show it for the first time, otherwise it may have no effect.
1194 /// Use this for windows that have only output information or might only be interacted with by the mouse or fingers, and never for typing input.
1195 /// Be careful that this may have side-effects like making the window non-accessible in some cases unless the window is specially handled. Use this with care.
1197 /// <since_tizen> preview </since_tizen>
1198 [Obsolete("This has been deprecated in API12")]
1199 public void FocusSkip(bool skip)
1201 Interop.Elementary.elm_win_prop_focus_skip_set(Handle, skip);
1205 /// Pulls up the window object.
1206 /// Places the window pointed by object at the top of the stack, so that it's not covered by any other window.
1208 /// <since_tizen> preview </since_tizen>
1209 [Obsolete("This has been deprecated in API12")]
1210 public void PullUp()
1212 Interop.Elementary.elm_win_raise(Handle);
1216 /// Brings down the window object.
1217 /// Places the window pointed by object at the bottom of the stack, so that no other window is covered by it.
1219 /// <since_tizen> preview </since_tizen>
1220 [Obsolete("This has been deprecated in API12")]
1221 public void BringDown()
1223 Interop.Elementary.elm_win_lower(Handle);
1227 /// This function sends a request to the Windows Manager to activate the window.
1228 /// If honored by the Windows Manager, the window receives the keyboard focus.
1231 /// This is just a request that the Windows Manager may ignore, so calling this function does not ensure
1232 /// in any way that the window is going to be the active one after it.
1234 /// <since_tizen> preview </since_tizen>
1235 [Obsolete("This has been deprecated in API12")]
1236 public void Active()
1238 Interop.Elementary.elm_win_activate(Handle);
1242 /// Deletes the subobj as a resize object of the window object.
1243 /// This function removes the object subobj from the resize objects of the window object.
1244 /// It will not delete the object itself, which will be left unmanaged and should be deleted by the developer, manually handled, or set as child of some other container.
1246 /// <param name="obj">Resize object.</param>
1247 /// <since_tizen> preview </since_tizen>
1248 [Obsolete("This has been deprecated in API12")]
1249 public void DeleteResizeObject(EvasObject obj)
1251 Interop.Elementary.elm_win_resize_object_del(Handle, obj);
1255 /// Adds an object as a resize object of the window.
1258 /// Setting an object as a resize object of the window means that the object child's size and
1259 /// position is controlled by the window directly. That is, the object is resized to match the window size
1260 /// and should never be moved or resized manually by the developer. In addition,
1261 /// resize objects of the window control the minimum size of it as well as whether it can or cannot be resized by the user.
1263 /// <param name="obj">
1266 /// <since_tizen> preview </since_tizen>
1267 [Obsolete("This has been deprecated in API12")]
1268 public void AddResizeObject(EvasObject obj)
1270 Interop.Elementary.elm_win_resize_object_add(Handle, obj);
1274 /// Sets the keygrab value of the window.
1275 /// This function grabs the key of the window using grab_mode.
1277 /// <param name="keyname">The keyname to grab.</param>
1278 /// <param name="mode">According to the grabmode, it can grab key differently.</param>
1279 /// <since_tizen> preview </since_tizen>
1280 [Obsolete("This has been deprecated in API12")]
1281 [EditorBrowsable(EditorBrowsableState.Never)]
1282 public void WinKeyGrab(string keyname, KeyGrabMode mode)
1284 Interop.Elementary.elm_win_keygrab_set(RealHandle, keyname, 0, 0, 0, mode);
1288 /// Unsets the keygrab value of the window.
1289 /// This function unsets keygrab value. Ungrab key of the window.
1291 /// <param name="keyname">The keyname to grab.</param>
1292 /// <since_tizen> preview </since_tizen>
1293 [Obsolete("This has been deprecated in API12")]
1294 [EditorBrowsable(EditorBrowsableState.Never)]
1295 public void WinKeyUngrab(string keyname)
1297 Interop.Elementary.elm_win_keygrab_unset(RealHandle, keyname, 0, 0);
1301 /// Sets the keygrab of the window.
1303 /// <param name="keyname">The keyname string to set keygrab.</param>
1304 /// <since_tizen> preview </since_tizen>
1305 [Obsolete("This has been deprecated in API12")]
1306 public void KeyGrabEx(string keyname)
1308 Interop.Elementary.eext_win_keygrab_set(RealHandle, keyname);
1312 /// Unsets the keygrab of the window.
1314 /// <param name="keyname">The keyname string to unset keygrab.</param>
1315 /// <since_tizen> preview </since_tizen>
1316 [Obsolete("This has been deprecated in API12")]
1317 public void KeyUngrabEx(string keyname)
1319 Interop.Elementary.eext_win_keygrab_unset(RealHandle, keyname);
1323 /// Creates an auxiliary hint of the window.
1326 /// Support for this depends on the underlying windowing system.
1328 /// <param name="hint">The auxiliary hint string</param>
1329 /// <param name="value">The value string</param>
1330 /// <returns>The ID of the created auxiliary hint, otherwise -1 on failure</returns>
1331 /// <since_tizen> preview </since_tizen>
1332 [Obsolete("This has been deprecated in API12")]
1333 [EditorBrowsable(EditorBrowsableState.Never)]
1334 public int AddAuxiliaryHint(string hint, string value)
1336 return Interop.Elementary.elm_win_aux_hint_add(RealHandle, hint, value);
1340 /// Deletes an auxiliary hint of the window.
1343 /// Support for this depends on the underlying windowing system.
1345 /// <param name="id">The ID of the auxiliary hint</param>
1346 /// <returns>If true deletes successful, otherwise false.</returns>
1347 /// <since_tizen> preview </since_tizen>
1348 [Obsolete("This has been deprecated in API12")]
1349 [EditorBrowsable(EditorBrowsableState.Never)]
1350 public bool DeleteAuxiliaryHint(int id)
1352 return Interop.Elementary.elm_win_aux_hint_del(RealHandle, id);
1356 /// Changes a value of the auxiliary hint.
1359 /// Support for this depends on the underlying windowing system.
1361 /// <param name="id">The auxiliary hint ID</param>
1362 /// <param name="value">The value string to be set</param>
1363 /// <returns>If true changes successful, otherwise false.</returns>
1364 /// <since_tizen> preview </since_tizen>
1365 [Obsolete("This has been deprecated in API12")]
1366 [EditorBrowsable(EditorBrowsableState.Never)]
1367 public bool SetAuxiliaryHintValue(int id, string value)
1369 return Interop.Elementary.elm_win_aux_hint_val_set(RealHandle, id, value);
1373 /// Gets a value of the auxiliary hint.
1376 /// Support for this depends on the underlying windowing system.
1378 /// <param name="id">The auxiliary hint ID</param>
1379 /// <returns>The string value of the auxiliary hint ID</returns>
1380 /// <since_tizen> preview </since_tizen>
1381 [Obsolete("This has been deprecated in API12")]
1382 [EditorBrowsable(EditorBrowsableState.Never)]
1383 public string GetAuxiliaryHintValue(int id)
1385 return Interop.Elementary.elm_win_aux_hint_val_get(RealHandle, id);
1389 /// Gets an ID of the auxiliary hint string.
1392 /// Support for this depends on the underlying windowing system.
1394 /// <param name="hint">The auxiliary hint string</param>
1395 /// <returns>The ID of the auxiliary hint, otherwise -1 on failure</returns>
1396 /// <since_tizen> preview </since_tizen>
1397 [Obsolete("This has been deprecated in API12")]
1398 [EditorBrowsable(EditorBrowsableState.Never)]
1399 public int GetAuxiliaryHintId(string hint)
1401 return Interop.Elementary.elm_win_aux_hint_id_get(RealHandle, hint);
1405 /// Creates a widget handle.
1407 /// <param name="parent">Parent EvasObject.</param>
1408 /// <returns>Handle IntPtr.</returns>
1409 /// <since_tizen> preview </since_tizen>
1410 [Obsolete("This has been deprecated in API12")]
1411 protected override IntPtr CreateHandle(EvasObject parent)
1413 Interop.Elementary.elm_config_accel_preference_set("3d");
1414 return Interop.Elementary.elm_win_add(parent != null ? parent.Handle : IntPtr.Zero, Name, (int)Type);
1417 internal void AddChild(EvasObject obj)
1419 _referenceHolder.Add(obj);
1422 internal void RemoveChild(EvasObject obj)
1424 _referenceHolder.Remove(obj);
1427 static int[] ConvertDegreeArray(DisplayRotation value)
1429 List<int> rotations = new List<int>();
1430 if (value.HasFlag(DisplayRotation.Degree_0))
1432 if (value.HasFlag(DisplayRotation.Degree_90))
1434 if (value.HasFlag(DisplayRotation.Degree_180))
1436 if (value.HasFlag(DisplayRotation.Degree_270))
1438 return rotations.ToArray();
1441 static DisplayRotation ConvertToDisplayRotation(int[] values)
1443 int orientation = 0;
1444 foreach (int v in values)
1446 orientation |= (1 << (v / 90));
1448 return (DisplayRotation)orientation;
1451 static void Preload()
1453 Elementary.Initialize();
1454 Elementary.ThemeOverlay();
1455 _ = new PreloadedWindow();
1460 /// For internal use only
1462 internal static Window CreateWindow(string name) => PreloadedWindow.GetInstance() ?? new Window(name);