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 (!Stage.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 : global::System.IDisposable {
331 private global::System.Runtime.InteropServices.HandleRef swigCPtr;
332 protected bool swigCMemOwn;
334 internal Property(global::System.IntPtr cPtr, bool cMemoryOwn) {
335 swigCMemOwn = cMemoryOwn;
336 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
339 internal static global::System.Runtime.InteropServices.HandleRef getCPtr(Property obj) {
340 return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr;
347 public virtual void Dispose() {
349 if (swigCPtr.Handle != global::System.IntPtr.Zero) {
352 NDalicPINVOKE.delete_Popup_Property(swigCPtr);
354 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
356 global::System.GC.SuppressFinalize(this);
360 public Property() : this(NDalicPINVOKE.new_Popup_Property(), true) {
361 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
364 public static readonly int TITLE = NDalicPINVOKE.Popup_Property_TITLE_get();
365 public static readonly int CONTENT = NDalicPINVOKE.Popup_Property_CONTENT_get();
366 public static readonly int FOOTER = NDalicPINVOKE.Popup_Property_FOOTER_get();
367 public static readonly int DISPLAY_STATE = NDalicPINVOKE.Popup_Property_DISPLAY_STATE_get();
368 public static readonly int TOUCH_TRANSPARENT = NDalicPINVOKE.Popup_Property_TOUCH_TRANSPARENT_get();
369 public static readonly int TAIL_VISIBILITY = NDalicPINVOKE.Popup_Property_TAIL_VISIBILITY_get();
370 public static readonly int TAIL_POSITION = NDalicPINVOKE.Popup_Property_TAIL_POSITION_get();
371 public static readonly int CONTEXTUAL_MODE = NDalicPINVOKE.Popup_Property_CONTEXTUAL_MODE_get();
372 public static readonly int ANIMATION_DURATION = NDalicPINVOKE.Popup_Property_ANIMATION_DURATION_get();
373 public static readonly int ANIMATION_MODE = NDalicPINVOKE.Popup_Property_ANIMATION_MODE_get();
374 public static readonly int ENTRY_ANIMATION = NDalicPINVOKE.Popup_Property_ENTRY_ANIMATION_get();
375 public static readonly int EXIT_ANIMATION = NDalicPINVOKE.Popup_Property_EXIT_ANIMATION_get();
376 public static readonly int AUTO_HIDE_DELAY = NDalicPINVOKE.Popup_Property_AUTO_HIDE_DELAY_get();
377 public static readonly int BACKING_ENABLED = NDalicPINVOKE.Popup_Property_BACKING_ENABLED_get();
378 public static readonly int BACKING_COLOR = NDalicPINVOKE.Popup_Property_BACKING_COLOR_get();
379 public static readonly int POPUP_BACKGROUND_IMAGE = NDalicPINVOKE.Popup_Property_POPUP_BACKGROUND_IMAGE_get();
380 public static readonly int POPUP_BACKGROUND_BORDER = NDalicPINVOKE.Popup_Property_POPUP_BACKGROUND_BORDER_get();
381 public static readonly int TAIL_UP_IMAGE = NDalicPINVOKE.Popup_Property_TAIL_UP_IMAGE_get();
382 public static readonly int TAIL_DOWN_IMAGE = NDalicPINVOKE.Popup_Property_TAIL_DOWN_IMAGE_get();
383 public static readonly int TAIL_LEFT_IMAGE = NDalicPINVOKE.Popup_Property_TAIL_LEFT_IMAGE_get();
384 public static readonly int TAIL_RIGHT_IMAGE = NDalicPINVOKE.Popup_Property_TAIL_RIGHT_IMAGE_get();
388 public Popup () : this (NDalicPINVOKE.Popup_New(), true) {
389 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
392 public Popup(Popup handle) : this(NDalicPINVOKE.new_Popup__SWIG_1(Popup.getCPtr(handle)), true) {
393 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
396 public Popup Assign(Popup handle) {
397 Popup ret = new Popup(NDalicPINVOKE.Popup_Assign(swigCPtr, Popup.getCPtr(handle)), false);
398 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
402 public new static Popup DownCast(BaseHandle handle) {
403 Popup ret = new Popup(NDalicPINVOKE.Popup_DownCast(BaseHandle.getCPtr(handle)), true);
404 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
408 public void SetTitle(Actor titleActor) {
409 NDalicPINVOKE.Popup_SetTitle(swigCPtr, Actor.getCPtr(titleActor));
410 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
413 public Actor GetTitle() {
414 Actor ret = new Actor(NDalicPINVOKE.Popup_GetTitle(swigCPtr), true);
415 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
419 public void SetContent(Actor content) {
420 NDalicPINVOKE.Popup_SetContent(swigCPtr, Actor.getCPtr(content));
421 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
424 public Actor GetContent() {
425 Actor ret = new Actor(NDalicPINVOKE.Popup_GetContent(swigCPtr), true);
426 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
430 public void SetFooter(Actor footer) {
431 NDalicPINVOKE.Popup_SetFooter(swigCPtr, Actor.getCPtr(footer));
432 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
435 public Actor GetFooter() {
436 Actor ret = new Actor(NDalicPINVOKE.Popup_GetFooter(swigCPtr), true);
437 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
441 public void SetDisplayState(Popup.DisplayStateType displayState) {
442 NDalicPINVOKE.Popup_SetDisplayState(swigCPtr, (int)displayState);
443 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
446 public Popup.DisplayStateType GetDisplayState() {
447 Popup.DisplayStateType ret = (Popup.DisplayStateType)NDalicPINVOKE.Popup_GetDisplayState(swigCPtr);
448 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
452 public VoidSignal OutsideTouchedSignal() {
453 VoidSignal ret = new VoidSignal(NDalicPINVOKE.Popup_OutsideTouchedSignal(swigCPtr), false);
454 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
458 public VoidSignal ShowingSignal() {
459 VoidSignal ret = new VoidSignal(NDalicPINVOKE.Popup_ShowingSignal(swigCPtr), false);
460 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
464 public VoidSignal ShownSignal() {
465 VoidSignal ret = new VoidSignal(NDalicPINVOKE.Popup_ShownSignal(swigCPtr), false);
466 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
470 public VoidSignal HidingSignal() {
471 VoidSignal ret = new VoidSignal(NDalicPINVOKE.Popup_HidingSignal(swigCPtr), false);
472 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
476 public VoidSignal HiddenSignal() {
477 VoidSignal ret = new VoidSignal(NDalicPINVOKE.Popup_HiddenSignal(swigCPtr), false);
478 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
482 public enum PropertyRange {
483 PROPERTY_START_INDEX = PropertyRanges.PROPERTY_REGISTRATION_START_INDEX,
484 PROPERTY_END_INDEX = View.PropertyRange.PROPERTY_START_INDEX+1000
487 public enum DisplayStateType {
494 public enum AnimationModeType {
501 public enum ContextualModeType {
509 public Dali.Property.Map Title
513 Dali.Property.Map temp = new Dali.Property.Map();
514 GetProperty( Popup.Property.TITLE).Get( temp );
519 SetProperty( Popup.Property.TITLE, new Dali.Property.Value( value ) );
522 public Dali.Property.Map Content
526 Dali.Property.Map temp = new Dali.Property.Map();
527 GetProperty( Popup.Property.CONTENT).Get( temp );
532 SetProperty( Popup.Property.CONTENT, new Dali.Property.Value( value ) );
535 public Dali.Property.Map Footer
539 Dali.Property.Map temp = new Dali.Property.Map();
540 GetProperty( Popup.Property.FOOTER).Get( temp );
545 SetProperty( Popup.Property.FOOTER, new Dali.Property.Value( value ) );
548 public string DisplayState
553 GetProperty( Popup.Property.DISPLAY_STATE).Get( out temp );
558 SetProperty( Popup.Property.DISPLAY_STATE, new Dali.Property.Value( value ) );
561 public bool TouchTransparent
566 GetProperty( Popup.Property.TOUCH_TRANSPARENT).Get( ref temp );
571 SetProperty( Popup.Property.TOUCH_TRANSPARENT, new Dali.Property.Value( value ) );
574 public bool TailVisibility
579 GetProperty( Popup.Property.TAIL_VISIBILITY).Get( ref temp );
584 SetProperty( Popup.Property.TAIL_VISIBILITY, new Dali.Property.Value( value ) );
587 public Vector3 TailPosition
591 Vector3 temp = new Vector3(0.0f,0.0f,0.0f);
592 GetProperty( Popup.Property.TAIL_POSITION).Get( temp );
597 SetProperty( Popup.Property.TAIL_POSITION, new Dali.Property.Value( value ) );
600 public string ContextualMode
605 GetProperty( Popup.Property.CONTEXTUAL_MODE).Get( out temp );
610 SetProperty( Popup.Property.CONTEXTUAL_MODE, new Dali.Property.Value( value ) );
613 public float AnimationDuration
618 GetProperty( Popup.Property.ANIMATION_DURATION).Get( ref temp );
623 SetProperty( Popup.Property.ANIMATION_DURATION, new Dali.Property.Value( value ) );
626 public string AnimationMode
631 GetProperty( Popup.Property.ANIMATION_MODE).Get( out temp );
636 SetProperty( Popup.Property.ANIMATION_MODE, new Dali.Property.Value( value ) );
639 public Dali.Property.Map EntryAnimation
643 Dali.Property.Map temp = new Dali.Property.Map();
644 GetProperty( Popup.Property.ENTRY_ANIMATION).Get( temp );
649 SetProperty( Popup.Property.ENTRY_ANIMATION, new Dali.Property.Value( value ) );
652 public Dali.Property.Map ExitAnimation
656 Dali.Property.Map temp = new Dali.Property.Map();
657 GetProperty( Popup.Property.EXIT_ANIMATION).Get( temp );
662 SetProperty( Popup.Property.EXIT_ANIMATION, new Dali.Property.Value( value ) );
665 public int AutoHideDelay
670 GetProperty( Popup.Property.AUTO_HIDE_DELAY).Get( ref temp );
675 SetProperty( Popup.Property.AUTO_HIDE_DELAY, new Dali.Property.Value( value ) );
678 public bool BackingEnabled
683 GetProperty( Popup.Property.BACKING_ENABLED).Get( ref temp );
688 SetProperty( Popup.Property.BACKING_ENABLED, new Dali.Property.Value( value ) );
691 public Vector4 BackingColor
695 Vector4 temp = new Vector4(0.0f,0.0f,0.0f,0.0f);
696 GetProperty( Popup.Property.BACKING_COLOR).Get( temp );
701 SetProperty( Popup.Property.BACKING_COLOR, new Dali.Property.Value( value ) );
704 public string PopupBackgroundImage
709 GetProperty( Popup.Property.POPUP_BACKGROUND_IMAGE).Get( out temp );
714 SetProperty( Popup.Property.POPUP_BACKGROUND_IMAGE, new Dali.Property.Value( value ) );
717 public Rectangle PopupBackgroundBorder
721 Rectangle temp = new Rectangle(0,0,0,0);
722 GetProperty( Popup.Property.POPUP_BACKGROUND_BORDER).Get( temp );
727 SetProperty( Popup.Property.POPUP_BACKGROUND_BORDER, new Dali.Property.Value( value ) );
730 public string TailUpImage
735 GetProperty( Popup.Property.TAIL_UP_IMAGE).Get( out temp );
740 SetProperty( Popup.Property.TAIL_UP_IMAGE, new Dali.Property.Value( value ) );
743 public string TailDownImage
748 GetProperty( Popup.Property.TAIL_DOWN_IMAGE).Get( out temp );
753 SetProperty( Popup.Property.TAIL_DOWN_IMAGE, new Dali.Property.Value( value ) );
756 public string TailLeftImage
761 GetProperty( Popup.Property.TAIL_LEFT_IMAGE).Get( out temp );
766 SetProperty( Popup.Property.TAIL_LEFT_IMAGE, new Dali.Property.Value( value ) );
769 public string TailRightImage
774 GetProperty( Popup.Property.TAIL_RIGHT_IMAGE).Get( out temp );
779 SetProperty( Popup.Property.TAIL_RIGHT_IMAGE, new Dali.Property.Value( value ) );