1 /** Copyright (c) 2017 Samsung Electronics Co., Ltd.
3 * Licensed under the Apache License, Version 2.0 (the "License");
4 * you may not use this file except in compliance with the License.
5 * You may obtain a copy of the License at
7 * http://www.apache.org/licenses/LICENSE-2.0
9 * Unless required by applicable law or agreed to in writing, software
10 * distributed under the License is distributed on an "AS IS" BASIS,
11 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 * See the License for the specific language governing permissions and
13 * limitations under the License.
16 // This File has been auto-generated by SWIG and then modified using DALi Ruby Scripts
17 //------------------------------------------------------------------------------
20 // This file was automatically generated by SWIG (http://www.swig.org).
23 // Do not make changes to this file unless you know what you are doing--modify
24 // the SWIG interface file instead.
25 //------------------------------------------------------------------------------
30 using System.Runtime.InteropServices;
33 public class Popup : View {
34 private global::System.Runtime.InteropServices.HandleRef swigCPtr;
36 internal Popup(global::System.IntPtr cPtr, bool cMemoryOwn) : base(NDalicPINVOKE.Popup_SWIGUpcast(cPtr), cMemoryOwn) {
37 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
40 internal static global::System.Runtime.InteropServices.HandleRef getCPtr(Popup obj) {
41 return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr;
45 DisposeQueue.Instance.Add(this);
48 public override void Dispose() {
49 if (!Window.IsInstalled()) {
50 DisposeQueue.Instance.Add(this);
55 if (swigCPtr.Handle != global::System.IntPtr.Zero) {
58 NDalicPINVOKE.delete_Popup(swigCPtr);
60 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
62 global::System.GC.SuppressFinalize(this);
69 public class OutsideTouchedEventArgs : EventArgs
73 public class ShowingEventArgs : EventArgs
77 public class ShownEventArgs : EventArgs
81 public class HidingEventArgs : EventArgs
85 public class HiddenEventArgs : EventArgs
89 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
90 private delegate void OutsideTouchedEventCallbackDelegate();
91 private DaliEventHandler<object,OutsideTouchedEventArgs> _popUpOutsideTouchedEventHandler;
92 private OutsideTouchedEventCallbackDelegate _popUpOutsideTouchedEventCallbackDelegate;
94 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
95 private delegate void ShowingEventCallbackDelegate();
96 private DaliEventHandler<object,ShowingEventArgs> _popUpShowingEventHandler;
97 private ShowingEventCallbackDelegate _popUpShowingEventCallbackDelegate;
99 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
100 private delegate void ShownEventCallbackDelegate();
101 private DaliEventHandler<object,ShownEventArgs> _popUpShownEventHandler;
102 private ShownEventCallbackDelegate _popUpShownEventCallbackDelegate;
104 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
105 private delegate void HidingEventCallbackDelegate();
106 private DaliEventHandler<object,HidingEventArgs> _popUpHidingEventHandler;
107 private HidingEventCallbackDelegate _popUpHidingEventCallbackDelegate;
109 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
110 private delegate void HiddenEventCallbackDelegate();
111 private DaliEventHandler<object,HiddenEventArgs> _popUpHiddenEventHandler;
112 private HiddenEventCallbackDelegate _popUpHiddenEventCallbackDelegate;
114 public event DaliEventHandler<object,OutsideTouchedEventArgs> OutsideTouched
120 // Restricted to only one listener
121 if (_popUpOutsideTouchedEventHandler == null)
123 _popUpOutsideTouchedEventHandler += value;
125 _popUpOutsideTouchedEventCallbackDelegate = new OutsideTouchedEventCallbackDelegate(OnOutsideTouched);
126 this.OutsideTouchedSignal().Connect(_popUpOutsideTouchedEventCallbackDelegate);
135 if (_popUpOutsideTouchedEventHandler != null)
137 this.OutsideTouchedSignal().Disconnect(_popUpOutsideTouchedEventCallbackDelegate);
140 _popUpOutsideTouchedEventHandler -= value;
145 // Callback for Popup OutsideTouchedSignal
146 private void OnOutsideTouched()
148 OutsideTouchedEventArgs e = new OutsideTouchedEventArgs();
150 if (_popUpOutsideTouchedEventHandler != null)
152 //here we send all data to user event handlers
153 _popUpOutsideTouchedEventHandler(this, e);
157 public event DaliEventHandler<object,ShowingEventArgs> Showing
163 // Restricted to only one listener
164 if (_popUpShowingEventHandler == null)
166 _popUpShowingEventHandler += value;
168 _popUpShowingEventCallbackDelegate = new ShowingEventCallbackDelegate(OnShowing);
169 this.ShowingSignal().Connect(_popUpShowingEventCallbackDelegate);
178 if (_popUpShowingEventHandler != null)
180 this.ShowingSignal().Disconnect(_popUpShowingEventCallbackDelegate);
183 _popUpShowingEventHandler -= value;
188 // Callback for ShowingSignal
189 private void OnShowing()
191 ShowingEventArgs e = new ShowingEventArgs();
193 if (_popUpShowingEventHandler != null)
195 //here we send all data to user event handlers
196 _popUpShowingEventHandler(this, e);
201 public event DaliEventHandler<object,ShownEventArgs> Shown
207 // Restricted to only one listener
208 if (_popUpShownEventHandler == null)
210 _popUpShownEventHandler += value;
212 _popUpShownEventCallbackDelegate = new ShownEventCallbackDelegate(OnShown);
213 this.ShownSignal().Connect(_popUpShownEventCallbackDelegate);
222 if (_popUpShownEventHandler != null)
224 this.ShownSignal().Disconnect(_popUpShownEventCallbackDelegate);
227 _popUpShownEventHandler -= value;
232 // Callback for ShownSignal
233 private void OnShown()
235 ShownEventArgs e = new ShownEventArgs();
237 if (_popUpShownEventHandler != null)
239 //here we send all data to user event handlers
240 _popUpShownEventHandler(this, e);
244 public event DaliEventHandler<object,HidingEventArgs> Hiding
250 // Restricted to only one listener
251 if (_popUpHidingEventHandler == null)
253 _popUpHidingEventHandler += value;
255 _popUpHidingEventCallbackDelegate = new HidingEventCallbackDelegate(OnHiding);
256 this.HidingSignal().Connect(_popUpHidingEventCallbackDelegate);
265 if (_popUpHidingEventHandler != null)
267 this.HidingSignal().Disconnect(_popUpHidingEventCallbackDelegate);
270 _popUpHidingEventHandler -= value;
275 // Callback for HidingSignal
276 private void OnHiding()
278 HidingEventArgs e = new HidingEventArgs();
280 if (_popUpHidingEventHandler != null)
282 //here we send all data to user event handlers
283 _popUpHidingEventHandler(this, e);
287 public event DaliEventHandler<object,HiddenEventArgs> Hidden
293 // Restricted to only one listener
294 if (_popUpHiddenEventHandler == null)
296 _popUpHiddenEventHandler += value;
298 _popUpHiddenEventCallbackDelegate = new HiddenEventCallbackDelegate(OnHidden);
299 this.HiddenSignal().Connect(_popUpHiddenEventCallbackDelegate);
308 if (_popUpHiddenEventHandler != null)
310 this.HiddenSignal().Disconnect(_popUpHiddenEventCallbackDelegate);
313 _popUpHiddenEventHandler -= value;
318 // Callback for HiddenSignal
319 private void OnHidden()
321 HiddenEventArgs e = new HiddenEventArgs();
323 if (_popUpHiddenEventHandler != null)
325 //here we send all data to user event handlers
326 _popUpHiddenEventHandler(this, e);
330 public class Property
332 public static readonly int TITLE = NDalicPINVOKE.Popup_Property_TITLE_get();
333 public static readonly int CONTENT = NDalicPINVOKE.Popup_Property_CONTENT_get();
334 public static readonly int FOOTER = NDalicPINVOKE.Popup_Property_FOOTER_get();
335 public static readonly int DISPLAY_STATE = NDalicPINVOKE.Popup_Property_DISPLAY_STATE_get();
336 public static readonly int TOUCH_TRANSPARENT = NDalicPINVOKE.Popup_Property_TOUCH_TRANSPARENT_get();
337 public static readonly int TAIL_VISIBILITY = NDalicPINVOKE.Popup_Property_TAIL_VISIBILITY_get();
338 public static readonly int TAIL_POSITION = NDalicPINVOKE.Popup_Property_TAIL_POSITION_get();
339 public static readonly int CONTEXTUAL_MODE = NDalicPINVOKE.Popup_Property_CONTEXTUAL_MODE_get();
340 public static readonly int ANIMATION_DURATION = NDalicPINVOKE.Popup_Property_ANIMATION_DURATION_get();
341 public static readonly int ANIMATION_MODE = NDalicPINVOKE.Popup_Property_ANIMATION_MODE_get();
342 public static readonly int ENTRY_ANIMATION = NDalicPINVOKE.Popup_Property_ENTRY_ANIMATION_get();
343 public static readonly int EXIT_ANIMATION = NDalicPINVOKE.Popup_Property_EXIT_ANIMATION_get();
344 public static readonly int AUTO_HIDE_DELAY = NDalicPINVOKE.Popup_Property_AUTO_HIDE_DELAY_get();
345 public static readonly int BACKING_ENABLED = NDalicPINVOKE.Popup_Property_BACKING_ENABLED_get();
346 public static readonly int BACKING_COLOR = NDalicPINVOKE.Popup_Property_BACKING_COLOR_get();
347 public static readonly int POPUP_BACKGROUND_IMAGE = NDalicPINVOKE.Popup_Property_POPUP_BACKGROUND_IMAGE_get();
348 public static readonly int POPUP_BACKGROUND_BORDER = NDalicPINVOKE.Popup_Property_POPUP_BACKGROUND_BORDER_get();
349 public static readonly int TAIL_UP_IMAGE = NDalicPINVOKE.Popup_Property_TAIL_UP_IMAGE_get();
350 public static readonly int TAIL_DOWN_IMAGE = NDalicPINVOKE.Popup_Property_TAIL_DOWN_IMAGE_get();
351 public static readonly int TAIL_LEFT_IMAGE = NDalicPINVOKE.Popup_Property_TAIL_LEFT_IMAGE_get();
352 public static readonly int TAIL_RIGHT_IMAGE = NDalicPINVOKE.Popup_Property_TAIL_RIGHT_IMAGE_get();
355 public Popup () : this (NDalicPINVOKE.Popup_New(), true) {
356 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
360 public new static Popup DownCast(BaseHandle handle) {
361 Popup ret = new Popup(NDalicPINVOKE.Popup_DownCast(BaseHandle.getCPtr(handle)), true);
362 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
366 public void SetTitle(View titleView) {
367 NDalicPINVOKE.Popup_SetTitle(swigCPtr, View.getCPtr(titleView));
368 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
371 public View GetTitle() {
372 View ret = new View(NDalicPINVOKE.Popup_GetTitle(swigCPtr), true);
373 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
377 public void SetContent(View content) {
378 NDalicPINVOKE.Popup_SetContent(swigCPtr, View.getCPtr(content));
379 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
382 public View GetContent() {
383 View ret = new View(NDalicPINVOKE.Popup_GetContent(swigCPtr), true);
384 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
388 public void SetFooter(View footer) {
389 NDalicPINVOKE.Popup_SetFooter(swigCPtr, View.getCPtr(footer));
390 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
393 public View GetFooter() {
394 View ret = new View(NDalicPINVOKE.Popup_GetFooter(swigCPtr), true);
395 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
399 public void SetDisplayState(Popup.DisplayStateType displayState) {
400 NDalicPINVOKE.Popup_SetDisplayState(swigCPtr, (int)displayState);
401 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
404 public Popup.DisplayStateType GetDisplayState() {
405 Popup.DisplayStateType ret = (Popup.DisplayStateType)NDalicPINVOKE.Popup_GetDisplayState(swigCPtr);
406 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
410 internal VoidSignal OutsideTouchedSignal() {
411 VoidSignal ret = new VoidSignal(NDalicPINVOKE.Popup_OutsideTouchedSignal(swigCPtr), false);
412 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
416 internal VoidSignal ShowingSignal() {
417 VoidSignal ret = new VoidSignal(NDalicPINVOKE.Popup_ShowingSignal(swigCPtr), false);
418 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
422 internal VoidSignal ShownSignal() {
423 VoidSignal ret = new VoidSignal(NDalicPINVOKE.Popup_ShownSignal(swigCPtr), false);
424 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
428 internal VoidSignal HidingSignal() {
429 VoidSignal ret = new VoidSignal(NDalicPINVOKE.Popup_HidingSignal(swigCPtr), false);
430 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
434 internal VoidSignal HiddenSignal() {
435 VoidSignal ret = new VoidSignal(NDalicPINVOKE.Popup_HiddenSignal(swigCPtr), false);
436 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
440 public enum DisplayStateType {
447 public enum AnimationModeType {
454 public enum ContextualModeType {
462 public Dali.Property.Map Title
466 Dali.Property.Map temp = new Dali.Property.Map();
467 GetProperty( Popup.Property.TITLE).Get( temp );
472 SetProperty( Popup.Property.TITLE, new Dali.Property.Value( value ) );
475 public Dali.Property.Map Content
479 Dali.Property.Map temp = new Dali.Property.Map();
480 GetProperty( Popup.Property.CONTENT).Get( temp );
485 SetProperty( Popup.Property.CONTENT, new Dali.Property.Value( value ) );
488 public Dali.Property.Map Footer
492 Dali.Property.Map temp = new Dali.Property.Map();
493 GetProperty( Popup.Property.FOOTER).Get( temp );
498 SetProperty( Popup.Property.FOOTER, new Dali.Property.Value( value ) );
501 public string DisplayState
506 GetProperty( Popup.Property.DISPLAY_STATE).Get( out temp );
511 SetProperty( Popup.Property.DISPLAY_STATE, new Dali.Property.Value( value ) );
514 public bool TouchTransparent
519 GetProperty( Popup.Property.TOUCH_TRANSPARENT).Get( out temp );
524 SetProperty( Popup.Property.TOUCH_TRANSPARENT, new Dali.Property.Value( value ) );
527 public bool TailVisibility
532 GetProperty( Popup.Property.TAIL_VISIBILITY).Get( out temp );
537 SetProperty( Popup.Property.TAIL_VISIBILITY, new Dali.Property.Value( value ) );
540 public Vector3 TailPosition
544 Vector3 temp = new Vector3(0.0f,0.0f,0.0f);
545 GetProperty( Popup.Property.TAIL_POSITION).Get( temp );
550 SetProperty( Popup.Property.TAIL_POSITION, new Dali.Property.Value( value ) );
553 public string ContextualMode
558 GetProperty( Popup.Property.CONTEXTUAL_MODE).Get( out temp );
563 SetProperty( Popup.Property.CONTEXTUAL_MODE, new Dali.Property.Value( value ) );
566 public float AnimationDuration
571 GetProperty( Popup.Property.ANIMATION_DURATION).Get( out temp );
576 SetProperty( Popup.Property.ANIMATION_DURATION, new Dali.Property.Value( value ) );
579 public string AnimationMode
584 GetProperty( Popup.Property.ANIMATION_MODE).Get( out temp );
589 SetProperty( Popup.Property.ANIMATION_MODE, new Dali.Property.Value( value ) );
592 public Dali.Property.Map EntryAnimation
596 Dali.Property.Map temp = new Dali.Property.Map();
597 GetProperty( Popup.Property.ENTRY_ANIMATION).Get( temp );
602 SetProperty( Popup.Property.ENTRY_ANIMATION, new Dali.Property.Value( value ) );
605 public Dali.Property.Map ExitAnimation
609 Dali.Property.Map temp = new Dali.Property.Map();
610 GetProperty( Popup.Property.EXIT_ANIMATION).Get( temp );
615 SetProperty( Popup.Property.EXIT_ANIMATION, new Dali.Property.Value( value ) );
618 public int AutoHideDelay
623 GetProperty( Popup.Property.AUTO_HIDE_DELAY).Get( out temp );
628 SetProperty( Popup.Property.AUTO_HIDE_DELAY, new Dali.Property.Value( value ) );
631 public bool BackingEnabled
636 GetProperty( Popup.Property.BACKING_ENABLED).Get( out temp );
641 SetProperty( Popup.Property.BACKING_ENABLED, new Dali.Property.Value( value ) );
644 public Vector4 BackingColor
648 Vector4 temp = new Vector4(0.0f,0.0f,0.0f,0.0f);
649 GetProperty( Popup.Property.BACKING_COLOR).Get( temp );
654 SetProperty( Popup.Property.BACKING_COLOR, new Dali.Property.Value( value ) );
657 public string PopupBackgroundImage
662 GetProperty( Popup.Property.POPUP_BACKGROUND_IMAGE).Get( out temp );
667 SetProperty( Popup.Property.POPUP_BACKGROUND_IMAGE, new Dali.Property.Value( value ) );
670 public Rectangle PopupBackgroundBorder
674 Rectangle temp = new Rectangle(0,0,0,0);
675 GetProperty( Popup.Property.POPUP_BACKGROUND_BORDER).Get( temp );
680 SetProperty( Popup.Property.POPUP_BACKGROUND_BORDER, new Dali.Property.Value( value ) );
683 public string TailUpImage
688 GetProperty( Popup.Property.TAIL_UP_IMAGE).Get( out temp );
693 SetProperty( Popup.Property.TAIL_UP_IMAGE, new Dali.Property.Value( value ) );
696 public string TailDownImage
701 GetProperty( Popup.Property.TAIL_DOWN_IMAGE).Get( out temp );
706 SetProperty( Popup.Property.TAIL_DOWN_IMAGE, new Dali.Property.Value( value ) );
709 public string TailLeftImage
714 GetProperty( Popup.Property.TAIL_LEFT_IMAGE).Get( out temp );
719 SetProperty( Popup.Property.TAIL_LEFT_IMAGE, new Dali.Property.Value( value ) );
722 public string TailRightImage
727 GetProperty( Popup.Property.TAIL_RIGHT_IMAGE).Get( out temp );
732 SetProperty( Popup.Property.TAIL_RIGHT_IMAGE, new Dali.Property.Value( value ) );