[vlc-devel] commit: Move events to a separate file ( Rémi Denis-Courmont )
git version control
git at videolan.org
Mon Feb 23 20:13:39 CET 2009
vlc | branch: master | Rémi Denis-Courmont <rdenis at simphalempin.com> | Mon Feb 23 20:34:04 2009 +0200| [c05739b1259c0f827038880e3f3e4b41f455283e] | committer: Rémi Denis-Courmont
Move events to a separate file
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=c05739b1259c0f827038880e3f3e4b41f455283e
---
bindings/cil/src/Makefile.am | 1 +
bindings/cil/src/event.cs | 120 ++++++++++++++++++++++++++++++++++++++++++
bindings/cil/src/libvlc.cs | 54 -------------------
3 files changed, 121 insertions(+), 54 deletions(-)
diff --git a/bindings/cil/src/Makefile.am b/bindings/cil/src/Makefile.am
index 280d6d3..8392f3a 100644
--- a/bindings/cil/src/Makefile.am
+++ b/bindings/cil/src/Makefile.am
@@ -6,6 +6,7 @@ pkglib_SCRIPTS = VideoLAN.LibVLC.dll
SOURCES_dll = \
ustring.cs \
exception.cs \
+ event.cs \
marshal.cs \
instance.cs \
media.cs \
diff --git a/bindings/cil/src/event.cs b/bindings/cil/src/event.cs
new file mode 100644
index 0000000..e549c11
--- /dev/null
+++ b/bindings/cil/src/event.cs
@@ -0,0 +1,120 @@
+/**
+ * @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
diff --git a/bindings/cil/src/libvlc.cs b/bindings/cil/src/libvlc.cs
index 5e81f84..4cf488e 100644
--- a/bindings/cil/src/libvlc.cs
+++ b/bindings/cil/src/libvlc.cs
@@ -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,
- };
};
More information about the vlc-devel
mailing list