/** Copyright (c) 2017 Samsung Electronics Co., Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ // This File has been auto-generated by SWIG and then modified using DALi Ruby Scripts //------------------------------------------------------------------------------ // // // This file was automatically generated by SWIG (http://www.swig.org). // Version 3.0.10 // // Do not make changes to this file unless you know what you are doing--modify // the SWIG interface file instead. //------------------------------------------------------------------------------ namespace Dali { public class ImageView : View { private global::System.Runtime.InteropServices.HandleRef swigCPtr; internal ImageView(global::System.IntPtr cPtr, bool cMemoryOwn) : base(NDalicPINVOKE.ImageView_SWIGUpcast(cPtr), cMemoryOwn) { swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); } internal static global::System.Runtime.InteropServices.HandleRef getCPtr(ImageView obj) { return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; } ~ImageView() { DisposeQueue.Instance.Add(this); } public override void Dispose() { if (!Window.IsInstalled()) { DisposeQueue.Instance.Add(this); return; } lock(this) { if (swigCPtr.Handle != global::System.IntPtr.Zero) { if (swigCMemOwn) { swigCMemOwn = false; NDalicPINVOKE.delete_ImageView(swigCPtr); } swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); } global::System.GC.SuppressFinalize(this); base.Dispose(); } } public class Property : global::System.IDisposable { private global::System.Runtime.InteropServices.HandleRef swigCPtr; protected bool swigCMemOwn; internal Property(global::System.IntPtr cPtr, bool cMemoryOwn) { swigCMemOwn = cMemoryOwn; swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); } internal static global::System.Runtime.InteropServices.HandleRef getCPtr(Property obj) { return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; } ~Property() { Dispose(); } public virtual void Dispose() { lock(this) { if (swigCPtr.Handle != global::System.IntPtr.Zero) { if (swigCMemOwn) { swigCMemOwn = false; NDalicPINVOKE.delete_ImageView_Property(swigCPtr); } swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); } global::System.GC.SuppressFinalize(this); } } public Property() : this(NDalicPINVOKE.new_ImageView_Property(), true) { if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); } public static readonly int RESOURCE_URL = NDalicPINVOKE.ImageView_Property_RESOURCE_URL_get(); public static readonly int IMAGE = NDalicPINVOKE.ImageView_Property_IMAGE_get(); public static readonly int PRE_MULTIPLIED_ALPHA = NDalicPINVOKE.ImageView_Property_PRE_MULTIPLIED_ALPHA_get(); public static readonly int PIXEL_AREA = NDalicPINVOKE.ImageView_Property_PIXEL_AREA_get(); } public ImageView () : this (NDalicPINVOKE.ImageView_New__SWIG_0(), true) { if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); } public ImageView (Image image) : this (NDalicPINVOKE.ImageView_New__SWIG_1(Image.getCPtr(image)), true) { if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); } public ImageView (string url) : this (NDalicPINVOKE.ImageView_New__SWIG_2(url), true) { if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); } public ImageView (string url, Uint16Pair size) : this (NDalicPINVOKE.ImageView_New__SWIG_3(url, Uint16Pair.getCPtr(size)), true) { if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); } public ImageView(ImageView imageView) : this(NDalicPINVOKE.new_ImageView__SWIG_1(ImageView.getCPtr(imageView)), true) { if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); } public ImageView Assign(ImageView imageView) { ImageView ret = new ImageView(NDalicPINVOKE.ImageView_Assign(swigCPtr, ImageView.getCPtr(imageView)), false); if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); return ret; } public new static ImageView DownCast(BaseHandle handle) { ImageView ret = new ImageView(NDalicPINVOKE.ImageView_DownCast(BaseHandle.getCPtr(handle)), true); if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); return ret; } public void SetImage(Image image) { NDalicPINVOKE.ImageView_SetImage__SWIG_0(swigCPtr, Image.getCPtr(image)); if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); } public void SetImage(string url) { NDalicPINVOKE.ImageView_SetImage__SWIG_1(swigCPtr, url); if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); } public void SetImage(string url, Uint16Pair size) { NDalicPINVOKE.ImageView_SetImage__SWIG_2(swigCPtr, url, Uint16Pair.getCPtr(size)); if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); } public Image GetImage() { Image ret = new Image(NDalicPINVOKE.ImageView_GetImage(swigCPtr), true); if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); return ret; } public enum PropertyRange { PROPERTY_START_INDEX = PropertyRanges.PROPERTY_REGISTRATION_START_INDEX, PROPERTY_END_INDEX = View.PropertyRange.PROPERTY_START_INDEX+1000, ANIMATABLE_PROPERTY_START_INDEX = PropertyRanges.ANIMATABLE_PROPERTY_REGISTRATION_START_INDEX, ANIMATABLE_PROPERTY_END_INDEX = PropertyRanges.ANIMATABLE_PROPERTY_REGISTRATION_START_INDEX+1000 } public string ResourceUrl { get { string temp; GetProperty( ImageView.Property.RESOURCE_URL).Get( out temp ); return temp; } set { SetProperty( ImageView.Property.RESOURCE_URL, new Dali.Property.Value( value ) ); } } public Dali.Property.Map ImageMap { get { Dali.Property.Map temp = new Dali.Property.Map(); GetProperty( ImageView.Property.IMAGE).Get( temp ); return temp; } set { SetProperty( ImageView.Property.IMAGE, new Dali.Property.Value( value ) ); } } public bool PreMultipliedAlpha { get { bool temp = false; GetProperty( ImageView.Property.PRE_MULTIPLIED_ALPHA).Get( ref temp ); return temp; } set { SetProperty( ImageView.Property.PRE_MULTIPLIED_ALPHA, new Dali.Property.Value( value ) ); } } public Vector4 PixelArea { get { Vector4 temp = new Vector4(0.0f,0.0f,0.0f,0.0f); GetProperty( ImageView.Property.PIXEL_AREA).Get( temp ); return temp; } set { SetProperty( ImageView.Property.PIXEL_AREA, new Dali.Property.Value( value ) ); } } } }