public void AddCallback(DestroyCallback destroyCallback)
 {
     if (_callbacks == null)
     {
         _callbacks = new ArrayDeque <DestroyCallback>(2);
     }
     _callbacks.Add(destroyCallback);
 }
Beispiel #2
0
 private void ConnectDestroySignal(DestroyCallback callback, GClosureNotify destroyData)
 {
     RegisterHandler(
         "delete-event",
         Marshal.GetFunctionPointerForDelegate(callback),
         destroyData,
         GConnectFlags.GConnectAfter,
         IntPtr.Zero);
 }
    protected virtual void ConnectDestroySignal(DestroyCallback callback, GClosureNotify destroyData)
    {
        _onDestroySignal = Marshal.GetFunctionPointerForDelegate(callback);

        RegisterHandler(
            "delete-event",
            _onDestroySignal,
            destroyData,
            GConnectFlags.GConnectAfter,
            IntPtr.Zero);
    }
Beispiel #4
0
    public void Initialise(Tile tile, bool isForeground, DestroyCallback onDestroy = null)
    {
        if (this.isDestroying)
        {
            return;
        }

        this.currentTile        = tile;
        this.transform.position = this.currentTile.transform.position;

        this.SetForeground(isForeground);

        this.onDestroy = onDestroy;
    }
Beispiel #5
0
        public LinuxGtk3Host()
        {
            _isInitialized = false;
            _handle        = IntPtr.Zero;
            _xid           = IntPtr.Zero;

            _onRealizedDelegate     = new RealizeCallback(OnRealized);
            _onSizeAllocateDelegate = new SizeAllocateCallback(OnSizeAllocate);
            _onResizeDelegate       = new ResizeCallback(OnResize);
            _onDestroyDelegate      = new DestroyCallback(OnDestroy);

            _onFreeNotify = new GClosureNotify(FreeData);

            _onHandleErrorDelegate   = new XHandleXError(HandleError);
            _onHandleIOErrorDelegate = new XHandleXIOError(HandleIOError);
        }
Beispiel #6
0
 public EPStageImpl(
     string stageUri,
     int stageId,
     EPServicesContext servicesContext,
     StageSpecificServices stageSpecificServices,
     EPStageEventServiceSPI eventServiceStage,
     EPStageDeploymentServiceImpl deploymentServiceStage,
     DestroyCallback stageDestroyCallback)
 {
     _stageUri               = stageUri;
     _stageId                = stageId;
     _servicesContext        = servicesContext;
     _stageSpecificServices  = stageSpecificServices;
     _eventServiceStage      = eventServiceStage;
     _deploymentServiceStage = deploymentServiceStage;
     _stageDestroyCallback   = stageDestroyCallback;
 }
    public ChromelyLinuxHost()
    {
        gdk_set_allowed_backends("x11");

        _isInitialized = false;
        _handle        = IntPtr.Zero;
        _xid           = IntPtr.Zero;

        _onRealizedDelegate     = new RealizeCallback(OnRealized);
        _onSizeAllocateDelegate = new SizeAllocateCallback(OnSizeAllocate);
        _onResizeDelegate       = new ResizeCallback(OnResize);
        _onDestroyDelegate      = new DestroyCallback(OnDestroy);

        _onFreeNotify = new GClosureNotify(FreeData);

        _onHandleErrorDelegate   = new XHandleXError(HandleError);
        _onHandleIOErrorDelegate = new XHandleXIOError(HandleIOError);
    }
    public ChromelyLinuxHost(IChromelyConfiguration config)
    {
        _config    = config;
        _options   = _config?.WindowOptions ?? new WindowOptions();
        _debugging = _config == null ? false : _config.DebuggingMode;

        gdk_set_allowed_backends("x11");

        _isInitialized = false;
        _handle        = IntPtr.Zero;
        _xid           = IntPtr.Zero;

        _onRealizedDelegate     = new RealizeCallback(OnRealized);
        _onSizeAllocateDelegate = new SizeAllocateCallback(OnSizeAllocate);
        _onResizeDelegate       = new ResizeCallback(OnResize);
        _onDestroyDelegate      = new DestroyCallback(OnDestroy);

        _onFreeNotify = new GClosureNotify(FreeData);

        _onHandleErrorDelegate   = new XHandleXError(HandleError);
        _onHandleIOErrorDelegate = new XHandleXIOError(HandleIOError);
    }
Beispiel #9
0
 public void SetDestroyCallback(DestroyCallback callback)
 {
     destroyCallbackList.Add(callback);
 }
Beispiel #10
0
 public void SetDestroyCallback(DestroyCallback callback)
 {
     destroyCallbackList.Add(callback);
 }