1 //------------------------------------------------------------------------------
4 // This file was automatically generated by SWIG (http://www.swig.org).
7 // Do not make changes to this file unless you know what you are doing--modify
8 // the SWIG interface file instead.
9 //------------------------------------------------------------------------------
15 /// VisualFactory is a singleton object that provides and shares visuals between views
17 internal class VisualFactory : BaseHandle
19 private global::System.Runtime.InteropServices.HandleRef swigCPtr;
21 internal VisualFactory(global::System.IntPtr cPtr, bool cMemoryOwn) : base(NDalicPINVOKE.VisualFactory_SWIGUpcast(cPtr), cMemoryOwn)
23 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
26 internal static global::System.Runtime.InteropServices.HandleRef getCPtr(VisualFactory obj)
28 return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr;
33 DisposeQueue.Instance.Add(this);
36 public override void Dispose()
38 if (!Stage.IsInstalled())
40 DisposeQueue.Instance.Add(this);
46 if (swigCPtr.Handle != global::System.IntPtr.Zero)
51 NDalicPINVOKE.delete_VisualFactory(swigCPtr);
53 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
55 global::System.GC.SuppressFinalize(this);
62 /// Create or retrieve VisualFactory singleton.
64 /// <returns>A handle to the VisualFactory control.</returns>
65 public static VisualFactory Get()
67 VisualFactory ret = new VisualFactory(NDalicPINVOKE.VisualFactory_Get(), true);
68 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
72 internal VisualFactory() : this(NDalicPINVOKE.new_VisualFactory__SWIG_0(), true)
74 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
77 internal VisualFactory(VisualFactory handle) : this(NDalicPINVOKE.new_VisualFactory__SWIG_1(VisualFactory.getCPtr(handle)), true)
79 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
82 internal VisualFactory Assign(VisualFactory handle)
84 VisualFactory ret = new VisualFactory(NDalicPINVOKE.VisualFactory_Assign(swigCPtr, VisualFactory.getCPtr(handle)), false);
85 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
90 /// Request the visual
92 /// <param name="propertyMap">The map contains the properties required by the visual. The content of the map determines the type of visual that will be returned.</param>
93 /// <returns>The handle to the created visual</returns>
94 public VisualBase CreateVisual(PropertyMap propertyMap)
96 VisualBase ret = new VisualBase(NDalicPINVOKE.VisualFactory_CreateVisual__SWIG_0(swigCPtr, PropertyMap.getCPtr(propertyMap)), true);
97 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
101 internal VisualBase CreateVisual(Image image)
103 VisualBase ret = new VisualBase(NDalicPINVOKE.VisualFactory_CreateVisual__SWIG_1(swigCPtr, Image.getCPtr(image)), true);
104 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
108 internal VisualBase CreateVisual(string url, Uint16Pair size)
110 VisualBase ret = new VisualBase(NDalicPINVOKE.VisualFactory_CreateVisual__SWIG_2(swigCPtr, url, Uint16Pair.getCPtr(size)), true);
111 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
114 private static readonly VisualFactory instance = VisualFactory.Get();
117 /// retrieve VisualFactory singleton.
119 public static VisualFactory Instance