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>
28 public enum DisplayRotation
31 /// Rotation value of the window is 0 degree.
36 /// Rotation value of the window is 90 degrees.
41 /// Rotation value of the window is 180 degrees.
46 /// Rotation value of the window is 270 degrees.
52 /// Enumeration for the indicator opacity.
54 /// <since_tizen> preview </since_tizen>
55 public enum StatusBarMode
58 /// Opacifies the status bar.
63 /// Be translucent the status bar.
71 /// Transparentizes the status bar.
77 /// Enumeration for the keygrab modes of the window.
79 /// <since_tizen> preview </since_tizen>
80 [EditorBrowsable(EditorBrowsableState.Never)]
81 public enum KeyGrabMode
84 /// Unknown keygrab mode.
89 /// Getting the grabbed-key together with the other client windows.
94 /// Getting the grabbed-key only when the window is top of the stack.
99 /// Getting the grabbed-key exclusively regardless of the window's position.
101 OverrideExclusive = 2048,
105 /// Enumeration for the indicator mode.
107 /// <since_tizen> preview </since_tizen>
108 public enum IndicatorMode
111 /// Unknown indicator state.
116 /// Hides the indicator.
121 /// Shows the indicator.
127 /// Enumeration for the keyboard mode.
129 /// <since_tizen> preview </since_tizen>
130 public enum KeyboardMode
133 /// Unknown keyboard state.
138 /// Request to deactivate the keyboard.
143 /// Enable keyboard with default layout.
148 /// Alpha (a-z) keyboard layout.
153 /// Numeric keyboard layout.
158 /// Pin keyboard layout.
163 /// Phone keyboard layout.
168 /// Hexadecimal numeric keyboard layout.
173 /// Full (QWERTY) keyboard layout.
178 /// Password keyboard layout.
183 /// IP keyboard layout.
188 /// Host keyboard layout.
193 /// File keyboard layout.
198 /// URL keyboard layout.
208 /// J2ME keyboard layout.
214 /// Enumeration for the window type.
216 /// <since_tizen> preview </since_tizen>
217 public enum WindowType
225 /// A normal window. Indicates a normal, top-level window. Almost every window will be created with this type.
230 /// Used for simple dialog windows.
235 /// For special desktop windows, like a background window holding desktop icons.
240 /// The window is used as a dock or panel. Usually would be kept on top of any other window by the Window Manager.
245 /// The window is used to hold a floating toolbar, or similar.
250 /// Similar to Toolbar.
255 /// A persistent utility window, like a toolbox or palette.
260 /// Splash window for a starting up application.
265 /// The window is a dropdown menu, as when an entry in a menubar is clicked.
270 /// Like DropdownMenu, but for the menu triggered by right-clicking an object.
275 /// 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.
280 /// A notification window, like a warning about battery life or a new e-mail received.
285 /// A window holding the contents of a combo box.
290 /// Used to indicate the window as a representation of an object being dragged across different windows, or even applications.
295 /// 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.
296 /// 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.
301 /// The window is rendered onto an image buffer and can be shown other process's plug image object.
302 /// 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.
307 /// This window was created using a pre-existing canvas. The window widget can be deleted, but the canvas must be managed externally.
313 /// Enumeration of notification window's priority level.
315 /// <since_tizen> preview </since_tizen>
316 public enum NotificationLevel
319 /// No (reset) notification level. This value makes the window place in normal layer.
324 /// Default notification level.
329 /// Higher notification level than default.
334 /// Higher notification level than medium.
339 /// The highest notification level.
345 /// Enumeration of screen mode.
347 /// <since_tizen> preview </since_tizen>
348 public enum ScreenMode
351 /// The mode which turns the screen off after a timeout.
356 /// The mode which keeps the screen turned on.
362 /// The Window is a container that contains the graphical user interface of a program.
364 /// <since_tizen> preview </since_tizen>
365 public class Window : Widget
367 SmartEvent _deleteRequest;
368 SmartEvent _rotationChanged;
369 HashSet<EvasObject> _referenceHolder = new HashSet<EvasObject>();
372 /// Creates and initializes a new instance of the Window class.
374 /// <param name="name">Window name.</param>
375 /// <since_tizen> preview </since_tizen>
376 public Window(string name) : this(null, name)
381 /// Creates and initializes a new instance of the Window class.
383 /// <param name="parent">
384 /// Parent widget which this window is created on.
386 /// <param name="name">
390 /// Window constructor.show window indicator, set callback
391 /// when closing the window in any way outside the program control,
392 /// and set callback when window rotation is changed.
394 /// <since_tizen> preview </since_tizen>
395 public Window(Window parent, string name) : this(parent, name, WindowType.Basic)
400 /// Creates and initializes a new instance of the Window class.
402 /// <param name="parent">
403 /// Parent widget which this window is created on.
405 /// <param name="name">
408 /// <param name="type">
412 /// Window constructor.show window indicator, set callback
413 /// when closing the window in any way outside the program control,
414 /// and set callback when window rotation is changed.
416 /// <since_tizen> preview </since_tizen>
417 public Window(Window parent, string name, WindowType type)
422 IndicatorMode = IndicatorMode.Show;
424 _deleteRequest = new SmartEvent(this, "delete,request");
425 _rotationChanged = new SmartEvent(this, "wm,rotation,changed");
426 _deleteRequest.On += (s, e) => CloseRequested?.Invoke(this, EventArgs.Empty);
427 _rotationChanged.On += (s, e) => RotationChanged?.Invoke(this, EventArgs.Empty);
431 /// Creates and initializes a new instance of the Window class.
433 /// <since_tizen> preview </since_tizen>
439 /// CloseRequested will be triggered when window is closed.
441 /// <since_tizen> preview </since_tizen>
442 public event EventHandler CloseRequested;
445 /// RotationChanged will be triggered when window is rotated.
447 /// <since_tizen> preview </since_tizen>
448 public event EventHandler RotationChanged;
451 /// Sets or gets the window name.
453 /// <since_tizen> preview </since_tizen>
454 public string Name { get; set; }
457 /// Gets the window type.
459 /// <since_tizen> preview </since_tizen>
460 public WindowType Type { get; } = WindowType.Basic;
463 /// Gets the window size with Size value(w,h)
465 /// <since_tizen> preview </since_tizen>
466 public Size ScreenSize
471 Interop.Elementary.elm_win_screen_size_get(Handle, out x, out y, out w, out h);
472 return new Size(w, h);
477 /// Gets the screen dpi for the screen that the window is on.
479 /// <since_tizen> preview </since_tizen>
480 public Point ScreenDpi
484 Point point = default(Point);
485 Interop.Elementary.elm_win_screen_dpi_get(Handle, out point.X, out point.Y);
491 /// Gets the rotation of the window. The rotation of the window in degrees (0-360).
493 /// <since_tizen> preview </since_tizen>
498 return Interop.Elementary.elm_win_rotation_get(Handle);
503 /// Gets whether the window manager supports window rotation or not.
505 /// <since_tizen> preview </since_tizen>
506 public bool IsRotationSupported
510 return Interop.Elementary.elm_win_wm_rotation_supported_get(Handle);
515 /// Sets or gets the available rotation degree.
517 /// <since_tizen> preview </since_tizen>
518 [Obsolete("Sorry, it's error typo of AvailableRotations, please use AvailableRotations")]
519 public DisplayRotation AavailableRotations { get; set; }
522 /// Sets or gets the available rotation degree.
524 /// <since_tizen> preview </since_tizen>
525 public DisplayRotation AvailableRotations
530 Interop.Elementary.elm_win_wm_rotation_available_rotations_get(Handle, out rotations);
531 if (rotations == null)
535 return ConvertToDisplayRotation(rotations);
539 Interop.Elementary.elm_win_wm_rotation_available_rotations_set(Handle, ConvertDegreeArray(value));
544 /// Sets or gets whether the auto deletion function is enabled.
547 /// If you enable auto deletion, the window is automatically destroyed after the signal is emitted.
548 /// If auto deletion is disabled, the window is not destroyed and the program has to handle it.
550 /// <since_tizen> preview </since_tizen>
551 public bool AutoDeletion
555 return Interop.Elementary.elm_win_autodel_get(Handle);
559 Interop.Elementary.elm_win_autodel_set(Handle, value);
564 /// Sets or gets the alpha channel state of the window.
567 /// true if the window alpha channel is enabled, false otherwise.
568 /// If alpha is true, the alpha channel of the canvas will be enabled possibly making parts of the window completely or partially transparent.
570 /// <since_tizen> preview </since_tizen>
575 return Interop.Elementary.elm_win_alpha_get(Handle);
579 Interop.Elementary.elm_win_alpha_set(Handle, value);
584 /// Sets or gets the role of the window.
587 /// The Role will be invalid if a new role is set or if the window is destroyed.
589 /// <since_tizen> preview </since_tizen>
594 return Interop.Elementary.elm_win_role_get(Handle);
598 Interop.Elementary.elm_win_role_set(Handle, value);
603 /// Sets or gets the mode of the status bar.
605 /// <since_tizen> preview </since_tizen>
606 public StatusBarMode StatusBarMode
610 return (StatusBarMode)Interop.Elementary.elm_win_indicator_opacity_get(Handle);
614 Interop.Elementary.elm_win_indicator_opacity_set(Handle, (int)value);
619 /// Sets or gets the iconified state of the window.
621 /// <since_tizen> preview </since_tizen>
622 [EditorBrowsable(EditorBrowsableState.Never)]
623 public bool Iconified
627 return Interop.Elementary.elm_win_iconified_get(RealHandle);
631 Interop.Elementary.elm_win_iconified_set(RealHandle, value);
636 /// Gets or sets the window's indicator mode.
638 /// <value>The indicator mode.</value>
639 /// <since_tizen> preview </since_tizen>
640 public IndicatorMode IndicatorMode
644 return Interop.Elementary.elm_win_indicator_mode_get(RealHandle);
648 Interop.Elementary.elm_win_indicator_mode_set(RealHandle, value);
653 /// Gets or sets the aspect ratio of the window.
655 /// <since_tizen> preview </since_tizen>
660 return Interop.Elementary.elm_win_aspect_get(RealHandle);
664 Interop.Elementary.elm_win_aspect_set(RealHandle, value);
669 /// Window's autohide state.
671 /// <since_tizen> preview </since_tizen>
676 return Interop.Elementary.elm_win_autohide_get(RealHandle);
680 Interop.Elementary.elm_win_autohide_set(RealHandle, value);
685 /// Gets the borderless state of the window.
686 /// This function requests the Window Manager to not draw any decoration around the window.
688 /// <since_tizen> preview </since_tizen>
689 public bool Borderless
693 return Interop.Elementary.elm_win_borderless_get(RealHandle);
697 Interop.Elementary.elm_win_borderless_set(RealHandle, value);
702 /// Gets or sets the demand attention state of the window.
704 /// <since_tizen> preview </since_tizen>
705 public bool DemandAttention
709 return Interop.Elementary.elm_win_demand_attention_get(RealHandle);
713 Interop.Elementary.elm_win_demand_attention_set(RealHandle, value);
718 /// Gets or sets the floating mode of the window.
720 /// <since_tizen> preview </since_tizen>
721 public bool FloatingMode
725 return Interop.Elementary.elm_win_floating_mode_get(RealHandle);
729 Interop.Elementary.elm_win_floating_mode_set(RealHandle, value);
734 /// Gets or sets the animate status for the focus highlight for this window.
735 /// This function will enable or disable the animation of focus highlight only for the given window, regardless of the global setting for it.
737 /// <since_tizen> preview </since_tizen>
738 public bool FocusHighlightAnimation
742 return Interop.Elementary.elm_win_focus_highlight_animate_get(RealHandle);
746 Interop.Elementary.elm_win_focus_highlight_animate_set(RealHandle, value);
751 /// Gets or sets the enabled status for the focus highlight in the window.
752 /// This function will enable or disable the focus highlight only for the given window, regardless of the global setting for it.
754 /// <since_tizen> preview </since_tizen>
755 public bool FocusHighlightEnabled
759 return Interop.Elementary.elm_win_focus_highlight_enabled_get(RealHandle);
763 Interop.Elementary.elm_win_focus_highlight_enabled_set(RealHandle, value);
768 /// Gets or sets the style for the focus highlight on this window.
769 /// 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.
771 /// <since_tizen> preview </since_tizen>
772 public string FocusHighlightStyle
776 return Interop.Elementary.elm_win_focus_highlight_style_get(RealHandle);
780 Interop.Elementary.elm_win_focus_highlight_style_set(RealHandle, value);
785 /// Gets the keyboard mode of the window.
787 /// <since_tizen> preview </since_tizen>
788 public KeyboardMode KeyboardMode
792 return (KeyboardMode)Interop.Elementary.elm_win_keyboard_mode_get(RealHandle);
796 Interop.Elementary.elm_win_keyboard_mode_set(RealHandle, (int)value);
801 /// Gets or sets the layer of the window.
802 /// What this means exactly will depend on the underlying engine used.
803 /// In the case of X11 backed engines, the value in layer has the following meanings:
804 /// less than 3 means that the window will be placed below all others,
805 /// more than 5 means that the window will be placed above all others,
806 /// and anything else means that the window will be placed in the default layer.
808 /// <since_tizen> preview </since_tizen>
809 public override int Layer
813 return Interop.Elementary.elm_win_layer_get(RealHandle);
817 Interop.Elementary.elm_win_layer_set(RealHandle, value);
822 /// Gets or sets the modal state of the window.
824 /// <since_tizen> preview </since_tizen>
829 return Interop.Elementary.elm_win_modal_get(RealHandle);
833 Interop.Elementary.elm_win_modal_set(RealHandle, value);
838 /// Gets or sets the noblank property of the window.
839 /// 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.
840 /// The noblank property may have no effect if the window is iconified/minimized or hidden.
842 /// <since_tizen> preview </since_tizen>
847 return Interop.Elementary.elm_win_noblank_get(RealHandle);
851 Interop.Elementary.elm_win_noblank_set(RealHandle, value);
856 /// Gets the profile of the window.
858 /// <since_tizen> preview </since_tizen>
859 public string Profile
863 return Interop.Elementary.elm_win_profile_get(RealHandle);
867 Interop.Elementary.elm_win_profile_set(RealHandle, value);
872 /// Gets the constraints on the maximum width and height of the window relative to the width and height of its screen.
873 /// When this function returns true, object will never resize larger than the screen.
875 /// <since_tizen> preview </since_tizen>
876 public bool ScreenConstrain
880 return Interop.Elementary.elm_win_screen_constrain_get(RealHandle);
884 Interop.Elementary.elm_win_screen_constrain_set(RealHandle, value);
889 /// Gets or sets the base size of the window.
891 /// <since_tizen> preview </since_tizen>
897 Interop.Elementary.elm_win_size_base_get(RealHandle, out w, out h);
898 return new Size(w, h);
902 Interop.Elementary.elm_win_size_base_set(RealHandle, value.Width, value.Height);
907 /// Gets or sets the step size of the window.
909 /// <since_tizen> preview </since_tizen>
915 Interop.Elementary.elm_win_size_step_get(RealHandle, out w, out h);
916 return new Size(w, h);
920 Interop.Elementary.elm_win_size_step_set(RealHandle, value.Width, value.Height);
925 /// Gets the screen position X of a window.
927 /// <since_tizen> preview </since_tizen>
928 public int ScreenPositionX
933 Interop.Elementary.elm_win_screen_position_get(Handle, out x, out y);
939 /// Gets the screen position Y of a window.
941 /// <since_tizen> preview </since_tizen>
942 public int ScreenPositionY
947 Interop.Elementary.elm_win_screen_position_get(Handle, out x, out y);
953 /// Gets or sets the title of the window.
955 /// <since_tizen> preview </since_tizen>
960 return Interop.Elementary.elm_win_title_get(Handle);
964 Interop.Elementary.elm_win_title_set(Handle, value);
969 /// Gets or sets the urgent state of the window.
971 /// <since_tizen> preview </since_tizen>
976 return Interop.Elementary.elm_win_urgent_get(Handle);
980 Interop.Elementary.elm_win_urgent_set(Handle, value);
985 /// Gets or sets the withdrawn state of the window.
987 /// <since_tizen> preview </since_tizen>
988 public bool Withdrawn
992 return Interop.Elementary.elm_win_withdrawn_get(Handle);
996 Interop.Elementary.elm_win_withdrawn_set(Handle, value);
1001 /// Gets or sets the priority level for the specified notification window.
1004 /// http://tizen.org/privilege/window.priority.set
1007 /// This can be used for a notification type window only.
1009 /// <since_tizen> preview </since_tizen>
1010 public NotificationLevel NotificationLevel
1015 Interop.Eutil.efl_util_get_notification_window_level(Handle, out level);
1016 return (NotificationLevel)level;
1020 Interop.Eutil.efl_util_set_notification_window_level(Handle, (int)value);
1025 /// Gets or sets the window's screen mode.
1026 /// This API is useful when the application need to keep the display turned on.
1027 /// If the application set the mode to ScreenMode.AlwaysOn to its window and the window is shown wholly or partially,
1028 /// the window manager requests the display system to keep the display on as long as the window is shown.
1029 /// If the window is no longer shown, then the window manger request the display system to go back to normal operation.
1030 /// Default screen mode of window is ScreenMode.Default.
1033 /// http://tizen.org/privilege/display
1036 /// This needs the privilege. If the application which is not get the privilege use this API, the window manager generates the permission deny error.
1038 /// <since_tizen> preview </since_tizen>
1039 public ScreenMode ScreenMode
1044 Interop.Eutil.efl_util_get_window_screen_mode(Handle, out mode);
1045 return (ScreenMode)mode;
1049 Interop.Eutil.efl_util_set_window_screen_mode(Handle, (int)value);
1054 /// Gets or sets the user's preferred brightness of the specified window.
1055 /// This is useful when the application need to change the brightness of the screen when it is appeared on the screen.
1056 /// If the application sets the brightness 0 to 100 to its window and the application window is shown wholly or partially,
1057 /// the window manager requests the display system to change the brightness of the screen using user's preferred brightness.
1058 /// If the window is no longer shown, then the window manger request the display system to go back to default brightness.
1059 /// If the brightness is less than 0, this means to use the default screen brightness.
1062 /// http://tizen.org/privilege/display
1065 /// This needs the privilege. If the application which is not get the privilege use this API, the window manager generates the permission deny error.
1067 /// <since_tizen> preview </since_tizen>
1068 public int Brightness
1073 Interop.Eutil.efl_util_get_window_brightness(Handle, out brightness);
1078 Interop.Eutil.efl_util_set_window_brightness(Handle, value);
1083 /// Creates a socket to provide the service for the Plug widget.
1085 /// <param name="name">A service name.</param>
1086 /// <param name="number">A number (any value, 0 being the common default) to differentiate multiple instances of services with the same name.</param>
1087 /// <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>
1088 /// <returns>If true creates successful, otherwise false.</returns>
1089 /// <since_tizen> preview </since_tizen>
1090 public bool CreateServiceSocket(string name, int number, bool systemWide)
1092 return Interop.Elementary.elm_win_socket_listen(RealHandle, name, number, systemWide);
1096 /// Sets the rotation of the window.
1098 /// <param name="degree">The rotation of the window, in degrees (0-360), counter-clockwise.</param>
1099 /// <param name="resize">Resizes the window's contents so that they fit inside the current window geometry.</param>
1100 /// <since_tizen> preview </since_tizen>
1101 public void SetRotation(int degree, bool resize)
1104 Interop.Elementary.elm_win_rotation_with_resize_set(RealHandle, degree);
1106 Interop.Elementary.elm_win_rotation_set(RealHandle, degree);
1110 /// Sets the alpha window's visual state to opaque state.
1111 /// This sets the alpha window's visual state to opaque state.
1112 /// If the alpha window sets the visual state to the opaque,
1113 /// then the window manager could handle it as the opaque window while calculating visibility.
1114 /// This will have no effect when used by a non-alpha window.
1116 /// <since_tizen> preview </since_tizen>
1117 public void SetOpaqueState()
1119 Interop.Eutil.efl_util_set_window_opaque_state(RealHandle, 1);
1123 /// Unsets the alpha window's visual state to opaque state.
1125 /// <since_tizen> preview </since_tizen>
1126 public void UnsetOpaqueState()
1128 Interop.Eutil.efl_util_set_window_opaque_state(RealHandle, 0);
1132 /// Sets the window to be skipped by focus.
1133 /// This sets the window to be skipped by normal input.
1134 /// 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.
1135 /// Call this and enable it on the window BEFORE you show it for the first time, otherwise it may have no effect.
1136 /// 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.
1137 /// 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.
1139 /// <since_tizen> preview </since_tizen>
1140 public void FocusSkip(bool skip)
1142 Interop.Elementary.elm_win_prop_focus_skip_set(Handle, skip);
1146 /// Pulls up the window object.
1147 /// Places the window pointed by object at the top of the stack, so that it's not covered by any other window.
1149 /// <since_tizen> preview </since_tizen>
1150 public void PullUp()
1152 Interop.Elementary.elm_win_raise(Handle);
1156 /// Brings down the window object.
1157 /// Places the window pointed by object at the bottom of the stack, so that no other window is covered by it.
1159 /// <since_tizen> preview </since_tizen>
1160 public void BringDown()
1162 Interop.Elementary.elm_win_lower(Handle);
1166 /// This function sends a request to the Windows Manager to activate the window.
1167 /// If honored by the Windows Manager, the window receives the keyboard focus.
1170 /// This is just a request that the Windows Manager may ignore, so calling this function does not ensure
1171 /// in any way that the window is going to be the active one after it.
1173 /// <since_tizen> preview </since_tizen>
1174 public void Active()
1176 Interop.Elementary.elm_win_activate(Handle);
1180 /// Deletes the subobj as a resize object of the window object.
1181 /// This function removes the object subobj from the resize objects of the window object.
1182 /// 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.
1184 /// <param name="obj">Resize object.</param>
1185 /// <since_tizen> preview </since_tizen>
1186 public void DeleteResizeObject(EvasObject obj)
1188 Interop.Elementary.elm_win_resize_object_del(Handle, obj);
1192 /// Adds an object as a resize object of the window.
1195 /// Setting an object as a resize object of the window means that the object child's size and
1196 /// position is controlled by the window directly. That is, the object is resized to match the window size
1197 /// and should never be moved or resized manually by the developer. In addition,
1198 /// resize objects of the window control the minimum size of it as well as whether it can or cannot be resized by the user.
1200 /// <param name="obj">
1203 /// <since_tizen> preview </since_tizen>
1204 public void AddResizeObject(EvasObject obj)
1206 Interop.Elementary.elm_win_resize_object_add(Handle, obj);
1210 /// Sets the keygrab value of the window.
1211 /// This function grabs the key of the window using grab_mode.
1213 /// <param name="keyname">The keyname to grab.</param>
1214 /// <param name="mode">According to the grabmode, it can grab key differently.</param>
1215 /// <since_tizen> preview </since_tizen>
1216 [EditorBrowsable(EditorBrowsableState.Never)]
1217 public void WinKeyGrab(string keyname, KeyGrabMode mode)
1219 Interop.Elementary.elm_win_keygrab_set(RealHandle, keyname, 0, 0, 0, mode);
1223 /// Unsets the keygrab value of the window.
1224 /// This function unsets keygrab value. Ungrab key of the window.
1226 /// <param name="keyname">The keyname to grab.</param>
1227 /// <since_tizen> preview </since_tizen>
1228 [EditorBrowsable(EditorBrowsableState.Never)]
1229 public void WinKeyUngrab(string keyname)
1231 Interop.Elementary.elm_win_keygrab_unset(RealHandle, keyname, 0, 0);
1235 /// Sets the keygrab of the window.
1237 /// <param name="keyname">The keyname string to set keygrab.</param>
1238 /// <since_tizen> preview </since_tizen>
1239 public void KeyGrabEx(string keyname)
1241 Interop.Elementary.eext_win_keygrab_set(RealHandle, keyname);
1245 /// Unsets the keygrab of the window.
1247 /// <param name="keyname">The keyname string to unset keygrab.</param>
1248 /// <since_tizen> preview </since_tizen>
1249 public void KeyUngrabEx(string keyname)
1251 Interop.Elementary.eext_win_keygrab_unset(RealHandle, keyname);
1255 /// Creates a widget handle.
1257 /// <param name="parent">Parent EvasObject.</param>
1258 /// <returns>Handle IntPtr.</returns>
1259 /// <since_tizen> preview </since_tizen>
1260 protected override IntPtr CreateHandle(EvasObject parent)
1262 Interop.Elementary.elm_config_accel_preference_set("3d");
1263 return Interop.Elementary.elm_win_add(parent != null ? parent.Handle : IntPtr.Zero, Name, (int)Type);
1266 internal void AddChild(EvasObject obj)
1268 _referenceHolder.Add(obj);
1271 internal void RemoveChild(EvasObject obj)
1273 _referenceHolder.Remove(obj);
1276 static int[] ConvertDegreeArray(DisplayRotation value)
1278 List<int> rotations = new List<int>();
1279 if (value.HasFlag(DisplayRotation.Degree_0))
1281 if (value.HasFlag(DisplayRotation.Degree_90))
1283 if (value.HasFlag(DisplayRotation.Degree_180))
1285 if (value.HasFlag(DisplayRotation.Degree_270))
1287 return rotations.ToArray();
1290 static DisplayRotation ConvertToDisplayRotation(int[] values)
1292 int orientation = 0;
1293 foreach (int v in values)
1295 orientation |= (1 << (v / 90));
1297 return (DisplayRotation)orientation;