Exemple #1
0
        private void SwigDirectorOnResize(global::System.IntPtr window)
        {
            Window ret = Registry.GetManagedBaseHandleFromNativePtr(window) as Window;

            if (ret == null)
            {
                ret = new Window(window, true);
            }
            OnResize(ret);
        }
Exemple #2
0
        public static RenderTask DownCast(BaseHandle handle)
        {
            RenderTask ret = Registry.GetManagedBaseHandleFromNativePtr(handle) as RenderTask;

            if (NDalicPINVOKE.SWIGPendingException.Pending)
            {
                throw NDalicPINVOKE.SWIGPendingException.Retrieve();
            }
            return(ret);
        }
        /// <summary>
        /// Downcast a PropertyNotification instance.
        /// </summary>
        /// <param name="handle">Handle to an object of BaseHandle type.</param>
        /// <returns>Handle to an object of the PropertyNotification type.</returns>
        /// <since_tizen> 4 </since_tizen>
        public static PropertyNotification DownCast(BaseHandle handle)
        {
            PropertyNotification ret = Registry.GetManagedBaseHandleFromNativePtr(handle) as PropertyNotification;

            if (NDalicPINVOKE.SWIGPendingException.Pending)
            {
                throw NDalicPINVOKE.SWIGPendingException.Retrieve();
            }
            return(ret);
        }
        internal new static PanGestureDetector DownCast(BaseHandle handle)
        {
            PanGestureDetector ret = Registry.GetManagedBaseHandleFromNativePtr(handle) as PanGestureDetector;

            if (NDalicPINVOKE.SWIGPendingException.Pending)
            {
                throw NDalicPINVOKE.SWIGPendingException.Retrieve();
            }
            return(ret);
        }
Exemple #5
0
        private void OnPageLoadError(IntPtr data, string pageUrl, int errorCode)
        {
            WebViewPageLoadErrorEventArgs e = new WebViewPageLoadErrorEventArgs();

            e.WebView   = Registry.GetManagedBaseHandleFromNativePtr(data) as WebView;
            e.PageUrl   = pageUrl;
            e.ErrorCode = (WebViewPageLoadErrorEventArgs.LoadErrorCode)errorCode;

            pageLoadErrorEventHandler?.Invoke(this, e);
        }
Exemple #6
0
        private float DirectorCalculateChildSize(global::System.IntPtr child, int dimension)
        {
            View view = Registry.GetManagedBaseHandleFromNativePtr(child) as View;

            if (view)
            {
                return(CalculateChildSize(view, (DimensionType)dimension));
            }
            return(0.0f);
        }
        public static ScrollViewPagePathEffect DownCast(BaseHandle handle)
        {
            ScrollViewPagePathEffect ret = Registry.GetManagedBaseHandleFromNativePtr(handle) as ScrollViewPagePathEffect;

            if (NDalicPINVOKE.SWIGPendingException.Pending)
            {
                throw NDalicPINVOKE.SWIGPendingException.Retrieve();
            }
            return(ret);
        }
        public static GaussianBlurView DownCast(BaseHandle handle)
        {
            GaussianBlurView ret = Registry.GetManagedBaseHandleFromNativePtr(handle) as GaussianBlurView;

            if (NDalicPINVOKE.SWIGPendingException.Pending)
            {
                throw NDalicPINVOKE.SWIGPendingException.Retrieve();
            }
            return(ret);
        }
Exemple #9
0
 private MeasuredSize measureChild(global::System.IntPtr child, float width, int measureModeWidth, float height, int measureModeHeight)
 {
     View view = Registry.GetManagedBaseHandleFromNativePtr(child) as View;
     Size2D viewSize = new Size2D(8,8);
     if(view)
     {
       viewSize = view.NaturalSize2D;
     }
     return new MeasuredSize(viewSize.Width,viewSize.Height);
 }
Exemple #10
0
        internal static ItemView DownCast(BaseHandle handle)
        {
            ItemView ret = Registry.GetManagedBaseHandleFromNativePtr(handle) as ItemView;

            if (NDalicPINVOKE.SWIGPendingException.Pending)
            {
                throw NDalicPINVOKE.SWIGPendingException.Retrieve();
            }
            return(ret);
        }
Exemple #11
0
        public new static Alignment DownCast(BaseHandle handle)
        {
            Alignment ret = Registry.GetManagedBaseHandleFromNativePtr(handle) as Alignment;

            if (NDalicPINVOKE.SWIGPendingException.Pending)
            {
                throw NDalicPINVOKE.SWIGPendingException.Retrieve();
            }
            return(ret);
        }
Exemple #12
0
        /// <summary>
        /// Gets the target handle that this notification is observing.
        /// </summary>
        /// <since_tizen> 4 </since_tizen>
        public Animatable GetTarget()
        {
            BaseHandle ret = Registry.GetManagedBaseHandleFromNativePtr(Interop.PropertyNotification.GetTarget(SwigCPtr));

            if (NDalicPINVOKE.SWIGPendingException.Pending)
            {
                throw NDalicPINVOKE.SWIGPendingException.Retrieve();
            }
            return(ret as Animatable);
        }
Exemple #13
0
        private void SwigDirectorOnCreate(string contentInfo, global::System.IntPtr window)
        {
            Window ret = Registry.GetManagedBaseHandleFromNativePtr(window) as Window;

            if (ret == null)
            {
                ret = new Window(window, true);
            }
            OnCreate(contentInfo, ret);
        }
Exemple #14
0
        /*public LayoutItemWrapper (Handle handle) : this (LayoutPINVOKE.LayoutItemWrapper_New(Handle.getCPtr(handle)), true)
         * {
         *  if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
         * }*/

        public View GetOwner()
        {
            global::System.IntPtr cPtr = LayoutPINVOKE.LayoutItemWrapper_GetOwner(swigCPtr);
            View ret = Registry.GetManagedBaseHandleFromNativePtr(cPtr) as View;

            if (NDalicPINVOKE.SWIGPendingException.Pending)
            {
                throw NDalicPINVOKE.SWIGPendingException.Retrieve();
            }
            return(ret);
        }
Exemple #15
0
        public VisualBase GetVisual(int index)
        {
            System.IntPtr cPtr = NDalicManualPINVOKE.ViewWrapperImpl_GetVisual(swigCPtr, index);
            VisualBase    ret  = Registry.GetManagedBaseHandleFromNativePtr(cPtr) as VisualBase;

            if (NDalicPINVOKE.SWIGPendingException.Pending)
            {
                throw NDalicPINVOKE.SWIGPendingException.Retrieve();
            }
            return(ret);
        }
Exemple #16
0
        internal View GetFocusIndicatorView()
        {
            //to fix memory leak issue, match the handle count with native side.
            IntPtr cPtr = NDalicManualPINVOKE.FocusManager_GetFocusIndicatorActor(swigCPtr);
            HandleRef CPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
            View ret = Registry.GetManagedBaseHandleFromNativePtr(CPtr.Handle) as View;
            NDalicPINVOKE.delete_BaseHandle(CPtr);
            CPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);

            return ret;
        }
Exemple #17
0
        /// <summary>
        /// Retrieves the actor that was underneath the point specified.<br />
        /// If a point is greater than GetPointCount(), then this method will return an empty handle.<br />
        /// </summary>
        /// <param name="point">The point required.</param>
        /// <returns>The actor that was underneath the point specified.</returns>
        /// <since_tizen> 3 </since_tizen>
        public View GetHitView(uint point)
        {
            global::System.IntPtr cPtr = NDalicPINVOKE.Touch_GetHitActor(swigCPtr, point);
            View ret = Registry.GetManagedBaseHandleFromNativePtr(cPtr) as View;

            if (NDalicPINVOKE.SWIGPendingException.Pending)
            {
                throw NDalicPINVOKE.SWIGPendingException.Retrieve();
            }
            return(ret);
        }
Exemple #18
0
        private void OnListEvent(IntPtr control)
        {
            ListEventArgs e = new ListEventArgs();

            e.Control = Registry.GetManagedBaseHandleFromNativePtr(control) as BaseComponents.View;

            if (_listEventHandler != null)
            {
                _listEventHandler(this, e);
            }
        }
Exemple #19
0
        /// <summary>
        /// Search through this layer's hierarchy for a view with the given unique ID.
        /// </summary>
        /// <pre>This layer (the parent) has been initialized.</pre>
        /// <remarks>The actor itself is also considered in the search.</remarks>
        /// <param name="id">The id of the child to find</param>
        /// <returns> A handle to the view if found, or an empty handle if not. </returns>
        /// <since_tizen> 3 </since_tizen>
        public View FindChildById(uint id)
        {
            IntPtr cPtr = NDalicPINVOKE.Actor_FindChildById(swigCPtr, id);
            View   ret  = Registry.GetManagedBaseHandleFromNativePtr(cPtr) as View;

            if (NDalicPINVOKE.SWIGPendingException.Pending)
            {
                throw NDalicPINVOKE.SWIGPendingException.Retrieve();
            }
            return(ret);
        }
Exemple #20
0
        private void OnFocusedViewEnterKey(IntPtr view)
        {
            FocusedViewActivatedEventArgs e = new FocusedViewActivatedEventArgs();

            e.View = Registry.GetManagedBaseHandleFromNativePtr(view) as View;

            if (_focusedViewEnterKeyEventHandler != null)
            {
                _focusedViewEnterKeyEventHandler(this, e);
            }
        }
Exemple #21
0
        private void OnServiceEvent(IntPtr autofillContainer)
        {
            AuthenticationEventArgs e = new AuthenticationEventArgs();

            e.AutofillContainer = Registry.GetManagedBaseHandleFromNativePtr(autofillContainer) as AutofillContainer;

            if (_authenticationEventHandler != null)
            {
                _authenticationEventHandler(this, e);
            }
        }
Exemple #22
0
        private void OnFocusGroupChanged(IntPtr current, bool forwardDirection)
        {
            if (focusGroupChangedEventHandler != null)
            {
                FocusGroupChangedEventArgs e = new FocusGroupChangedEventArgs();

                e.CurrentView      = Registry.GetManagedBaseHandleFromNativePtr(current) as View;
                e.ForwardDirection = forwardDirection;
                focusGroupChangedEventHandler(this, e);
            }
        }
        private global::System.IntPtr DirectorGetNextFocusableActor(global::System.IntPtr currentFocusedActor, int direction, bool loopEnabled)
        {
            View view = GetNextFocusableView(Registry.GetManagedBaseHandleFromNativePtr(currentFocusedActor) as View, (View.FocusDirection)direction, loopEnabled);

            if (view != null)
            {
                return(View.getCPtr(view).Handle);
            }

            return(global::System.IntPtr.Zero);
        }
Exemple #24
0
        private void OnFocusChanged(IntPtr current, IntPtr next)
        {
            if (focusChangedEventHandler != null)
            {
                FocusChangedEventArgs e = new FocusChangedEventArgs();

                e.CurrentView = Registry.GetManagedBaseHandleFromNativePtr(current) as View;
                e.NextView    = Registry.GetManagedBaseHandleFromNativePtr(next) as View;
                focusChangedEventHandler(this, e);
            }
        }
Exemple #25
0
        private void OnPageLoadFinished(IntPtr data, string pageUrl)
        {
            WebViewPageLoadEventArgs e = new WebViewPageLoadEventArgs();

            e.WebView = Registry.GetManagedBaseHandleFromNativePtr(data) as WebView;
            e.PageUrl = pageUrl;

            if (pageLoadFinishedEventHandler != null)
            {
                pageLoadFinishedEventHandler(this, e);
            }
        }
Exemple #26
0
        /// <summary>
        /// Returns the closest ancestor of the given view that is a focus group.
        /// </summary>
        /// <param name="view">The view to be checked for its focus group.</param>
        /// <returns>The focus group the given view belongs to or an empty handle if the given view.</returns>
        /// <since_tizen> 3 </since_tizen>
        public View GetFocusGroup(View view)
        {
            //to fix memory leak issue, match the handle count with native side.
            IntPtr    cPtr = NDalicManualPINVOKE.FocusManager_GetFocusGroup(swigCPtr, View.getCPtr(view));
            HandleRef CPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
            View      ret  = Registry.GetManagedBaseHandleFromNativePtr(CPtr.Handle) as View;

            NDalicPINVOKE.delete_BaseHandle(CPtr);
            CPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);

            return(ret);
        }
        private void DirectorOnChildAdd(global::System.IntPtr child)
        {
            View view = Registry.GetManagedBaseHandleFromNativePtr(child) as View;

            if (view)
            {
                if (null != OnChildAdd)
                {
                    OnChildAdd(view);
                }
            }
        }
Exemple #28
0
        /// <summary>
        /// Gets the current focused view.
        /// </summary>
        /// <returns>A handle to the current focused view or an empty handle if no view is focused.</returns>
        /// <since_tizen> 3 </since_tizen>
        public View GetCurrentFocusView()
        {
            //to fix memory leak issue, match the handle count with native side.
            IntPtr    cPtr = Interop.FocusManager.FocusManager_GetCurrentFocusActor(swigCPtr);
            HandleRef CPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
            View      ret  = Registry.GetManagedBaseHandleFromNativePtr(CPtr.Handle) as View;

            Interop.BaseHandle.delete_BaseHandle(CPtr);
            CPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);

            return(ret);
        }
Exemple #29
0
        // Callback for StyleManager StyleChangedsignal
        private void OnStyleChanged(IntPtr styleManager, StyleChangeType styleChange)
        {
            if (styleManagerStyleChangedEventHandler != null)
            {
                StyleChangedEventArgs e = new StyleChangedEventArgs();

                // Populate all members of "e" (StyleChangedEventArgs) with real data.
                e.StyleManager = Registry.GetManagedBaseHandleFromNativePtr(styleManager) as StyleManager;
                e.StyleChange  = styleChange;
                //Here we send all data to user event handlers.
                styleManagerStyleChangedEventHandler(this, e);
            }
        }
Exemple #30
0
        // Callback for GaussianBlurView FinishedSignal
        private void OnFinished(IntPtr data)
        {
            FinishedEventArgs e = new FinishedEventArgs();

            // Populate all members of "e" (FinishedEventArgs) with real data
            e.GaussianBlurView = Registry.GetManagedBaseHandleFromNativePtr(data) as GaussianBlurView;

            if (_gaussianFinishedEventHandler != null)
            {
                //here we send all data to user event handlers
                _gaussianFinishedEventHandler(this, e);
            }
        }