internal FrameProvider(Window window) { Interop.FrameProvider.ErrorCode err; if (window == null) { throw FrameProviderErrorFactory.GetException(Interop.FrameProvider.ErrorCode.InvalidParameter, "Invalid parameter"); } callbacks.OnShow = new Interop.FrameProvider.ShowCallback(OnShowNative); callbacks.OnHide = new Interop.FrameProvider.HideCallback(OnHideNative); err = Interop.FrameProvider.Create(window.GetNativeWindowHandler(), ref callbacks, IntPtr.Zero, out handle); if (err != Interop.FrameProvider.ErrorCode.None) { throw FrameProviderErrorFactory.GetException(err, "Failed to create frame provider handle"); } }
/// <summary> /// Initializes the FrameBroker class. /// </summary> /// <param name="window">The window instance of Ecore_Wl2_Window pointer.</param> /// <exception cref="ArgumentException">Thrown when failed because of an invalid parameter.</exception> /// <exception cref="Applications.Exceptions.OutOfMemoryException">Thrown when the memory is insufficient.</exception> /// <exception cref="InvalidOperationException">Thrown when failed to create the frame broker handle.</exception> /// <remarks>This class is only avaliable for platform level signed applications.</remarks> internal FrameBrokerBase(Window window) { Interop.FrameBroker.ErrorCode err; if (window == null) { throw FrameBrokerBaseErrorFactory.GetException(Interop.FrameBroker.ErrorCode.InvalidParameter, "Invalid parameter"); } callbacks.OnCreate = new Interop.FrameBroker.FrameContextCreateCallback(OnCreateNative); callbacks.OnResume = new Interop.FrameBroker.FrameContextResumeCallback(OnResumeNavie); callbacks.OnPause = new Interop.FrameBroker.FrameContextPauseCallback(OnPauseNative); callbacks.OnDestroy = new Interop.FrameBroker.FrameContextDestroyCallback(OnDestroyNative); callbacks.OnError = new Interop.FrameBroker.FrameContextErrorCallback(OnErrorNative); callbacks.OnUpdate = new Interop.FrameBroker.FrameContextUpdateCallback(OnUpdateNative); err = Interop.FrameBroker.Create(window.GetNativeWindowHandler(), ref callbacks, IntPtr.Zero, out handle); if (err != Interop.FrameBroker.ErrorCode.None) { throw FrameBrokerBaseErrorFactory.GetException(err, "Failed to create frame broker handle"); } }
/// <summary> /// Initializes a new instance of SafeNativeWindowHandle referencing the given window. /// </summary> internal SafeNativeWindowHandle(Window currentWindow) : base(IntPtr.Zero, false) { SetHandle(currentWindow != null ? currentWindow.GetNativeWindowHandler() : IntPtr.Zero); }