Пример #1
0
    /// <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));
    }
Пример #2
0
    /// <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));
    }
Пример #3
0
 private static extern bool vlWorker_RemoveNamedImageListener(IntPtr worker,
                                                              [MarshalAs(UnmanagedType.LPStr)] string key,
                                                              [MarshalAs(UnmanagedType.FunctionPtr)] ImageWrapperCallback listener,
                                                              IntPtr clientData);
Пример #4
0
 private static extern bool vlWorker_AddImageListener(IntPtr worker,
                                                      [MarshalAs(UnmanagedType.FunctionPtr)] ImageWrapperCallback listener,
                                                      IntPtr clientData);