/// <summary> /// Unregisters a listener from image events. /// </summary> /// <param name="listener"> /// Listener which should be unregistered. /// </param> /// <param name="clientData"> /// Pointer value used as parameter during the registration of the /// listener. /// </param> /// <returns> /// <c>true</c>, if the listener was unregistered successfully; /// <c>false</c> otherwise. /// </returns> /// <seealso cref="VLImageWrapper"/> public bool RemoveImageListener(ImageWrapperCallback listener, IntPtr clientData) { if (this.disposed) { throw new ObjectDisposedException("VLWorker"); } return(vlWorker_RemoveImageListener(this.handle, listener, clientData)); }
/// <summary> /// Registers a listener for named image events. /// </summary> /// <param name="key"> /// Key of the requested image. /// </param> /// <param name="listener"> /// Listener which will be notified during the event processing, /// if a named image event occurred. /// </param> /// <param name="clientData"> /// The listener function will be called with the given pointer value as /// parameter. /// </param> /// <returns> /// <c>true</c>, if the listener was registered successfully; /// <c>false</c> otherwise. /// </returns> /// <seealso cref="VLImageWrapper"/> public bool AddNamedImageListener(string key, ImageWrapperCallback listener, IntPtr clientData) { if (this.disposed) { throw new ObjectDisposedException("VLWorker"); } return(vlWorker_AddNamedImageListener( this.handle, key, listener, clientData)); }
private static extern bool vlWorker_RemoveNamedImageListener(IntPtr worker, [MarshalAs(UnmanagedType.LPStr)] string key, [MarshalAs(UnmanagedType.FunctionPtr)] ImageWrapperCallback listener, IntPtr clientData);
private static extern bool vlWorker_AddImageListener(IntPtr worker, [MarshalAs(UnmanagedType.FunctionPtr)] ImageWrapperCallback listener, IntPtr clientData);