Commit c05739b1 authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

Move events to a separate file

parent d14f8d43
......@@ -6,6 +6,7 @@ pkglib_SCRIPTS = VideoLAN.LibVLC.dll
SOURCES_dll = \
ustring.cs \
exception.cs \
event.cs \
marshal.cs \
instance.cs \
media.cs \
......
/**
* @file event.cs
* @brief Unmanaged LibVLC events
* @ingroup Internals
*/
/**********************************************************************
* Copyright (C) 2009 Rémi Denis-Courmont. *
* This program is free software; you can redistribute and/or modify *
* it under the terms of the GNU General Public License as published *
* by the Free Software Foundation; version 2 of the license, or (at *
* your option) any later version. *
* *
* This program is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. *
* See the GNU General Public License for more details. *
* *
* You should have received a copy of the GNU General Public License *
* along with this program; if not, you can get it from: *
* http://www.gnu.org/copyleft/gpl.html *
**********************************************************************/
using System;
using System.Runtime.InteropServices;
namespace VideoLAN.LibVLC
{
/**
* @ingroup Internals
* @{
*/
/**
* @brief EventType: LibVLC event types
*/
internal enum EventType
{
MediaMetaChanged,
MediaSubItemAdded,
MediaDurationChanged,
MediaPreparsedChanged,
MediaFreed,
MediaStateChanged,
PlayerNothingSpecial,
PlayerOpening,
PlayerBuffering,
PlayerPlaying,
PlayerPaused,
PlayerStopped,
PlayerForward,
PlayerBackward,
PlayerEndReached,
PlayerEncounteredError,
PlayerTimeChanged,
PlayerPositionChanged,
PlayerSeekableChanged,
PlayerPausableChanged,
ListItemAdded,
ListWillAddItem,
ListItemDeleted,
ListWillDeleteItem,
ListViewItemAdded,
ListViewWillAddItem,
ListViewItemDeleted,
ListViewWillDeleteItem,
ListPlayerPlayed,
ListPlayerNextItemSet,
ListPlayerStopped,
DiscovererStarted,
DiscovererEnded,
PlayerTitleChanged,
};
[StructLayout (LayoutKind.Sequential)]
internal class GenericEvent
{
public EventType type;
public IntPtr obj;
};
internal delegate void GenericCallback (GenericEvent e, IntPtr d);
/* Player events */
[StructLayout (LayoutKind.Sequential)]
internal sealed class PlayerPositionEvent : GenericEvent
{
float position;
};
[StructLayout (LayoutKind.Sequential)]
internal sealed class PlayerTimeEvent : GenericEvent
{
long time;
};
[StructLayout (LayoutKind.Sequential)]
internal sealed class PlayerTitleEvent : GenericEvent
{
int title;
};
[StructLayout (LayoutKind.Sequential)]
internal sealed class PlayerSeekableEvent : GenericEvent
{
long seekable;
};
[StructLayout (LayoutKind.Sequential)]
internal sealed class PlayerPausableChangedEvent : GenericEvent
{
long pausable;
};
/** @} */
};
\ No newline at end of file
......@@ -359,58 +359,4 @@ namespace VideoLAN.LibVLC
/* libvlc_event_type_name */
};
/**
* @brief EventCallback: LibVLC event handler
* @ingroup Internals
*/
internal delegate void EventCallback (IntPtr ev, IntPtr data);
/**
* @brief EventType: LibVLC event types
* @ingroup Internals
*/
internal enum EventType
{
MediaMetaChanged,
MediaSubItemAdded,
MediaDurationChanged,
MediaPreparsedChanged,
MediaFreed,
MediaStateChanged,
PlayerNothingSpecial,
PlayerOpening,
PlayerBuffering,
PlayerPlaying,
PlayerPaused,
PlayerStopped,
PlayerForward,
PlayerBackward,
PlayerEndReached,
PlayerEncounteredError,
PlayerTimeChanged,
PlayerPositionChanged,
PlayerSeekableChanged,
PlayerPausableChanged,
ListItemAdded,
ListWillAddItem,
ListItemDeleted,
ListWillDeleteItem,
ListViewItemAdded,
ListViewWillAddItem,
ListViewItemDeleted,
ListViewWillDeleteItem,
ListPlayerPlayed,
ListPlayerNextItemSet,
ListPlayerStopped,
DiscovererStarted,
DiscovererEnded,
PlayerTitleChanged,
};
};
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment