using System; using System.Runtime.InteropServices; namespace Rive { /// /// A view model instance property that holds a boolean. /// public sealed class ViewModelInstanceBooleanProperty : ViewModelInstancePrimitiveProperty { internal ViewModelInstanceBooleanProperty(IntPtr instanceValuePtr, ViewModelInstance rootInstance) : base(instanceValuePtr, rootInstance) { } /// /// The value of the property. /// public override bool Value { get { ThrowIfOwnerDisposed(); return getViewModelInstanceBooleanValue(InstancePropertyPtr); } set { ThrowIfOwnerDisposed(); setViewModelInstanceBooleanValue(InstancePropertyPtr, value); } } [DllImport(NativeLibrary.name)] private static extern bool getViewModelInstanceBooleanValue(IntPtr instanceProperty); [DllImport(NativeLibrary.name)] private static extern void setViewModelInstanceBooleanValue(IntPtr instanceProperty, bool value); } }