Exemple #1
0
        private static void StaticCallback(IntPtr loop, IntPtr watcher, EventTypes revents)
        {
            UnmanagedPrepareWatcher iow = (UnmanagedPrepareWatcher)Marshal.PtrToStructure(watcher, typeof(UnmanagedPrepareWatcher));

            GCHandle       gchandle = GCHandle.FromIntPtr(iow.data);
            PrepareWatcher w        = (PrepareWatcher)gchandle.Target;

            w.callback(w.Loop, w, revents);
        }
Exemple #2
0
        public PrepareWatcher(Loop loop, PrepareWatcherCallback callback) : base(loop)
        {
            this.callback = callback;

            unmanaged_watcher          = new UnmanagedPrepareWatcher();
            unmanaged_watcher.callback = unmanaged_callback_ptr;

            InitializeUnmanagedWatcher(unmanaged_watcher);
        }
Exemple #3
0
        public PrepareWatcher(Loop loop, PrepareWatcherCallback callback)
            : base(loop)
        {
            this.callback = callback;

            unmanaged_watcher = new UnmanagedPrepareWatcher ();
            unmanaged_watcher.callback = unmanaged_callback_ptr;

            InitializeUnmanagedWatcher (unmanaged_watcher);
        }