]> git.sesse.net Git - vlc/blob - bindings/cil/src/event.cs
DBus: ifdef buggy input code out
[vlc] / bindings / cil / src / event.cs
1 /**
2  * @file event.cs
3  * @brief Unmanaged LibVLC events
4  * @ingroup Internals
5  */
6
7 /**********************************************************************
8  *  Copyright (C) 2009 RĂ©mi Denis-Courmont.                           *
9  *  This program is free software; you can redistribute and/or modify *
10  *  it under the terms of the GNU General Public License as published *
11  *  by the Free Software Foundation; version 2 of the license, or (at *
12  *  your option) any later version.                                   *
13  *                                                                    *
14  *  This program is distributed in the hope that it will be useful,   *
15  *  but WITHOUT ANY WARRANTY; without even the implied warranty of    *
16  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.              *
17  *  See the GNU General Public License for more details.              *
18  *                                                                    *
19  *  You should have received a copy of the GNU General Public License *
20  *  along with this program; if not, you can get it from:             *
21  *  http://www.gnu.org/copyleft/gpl.html                              *
22  **********************************************************************/
23
24 using System;
25 using System.Runtime.InteropServices;
26
27 namespace VideoLAN.LibVLC
28 {
29     /**
30      * @ingroup Internals
31      * @{
32      */
33
34     /**
35      * @brief EventType: LibVLC event types
36      */
37     internal enum EventType
38     {
39         MediaMetaChanged,
40         MediaSubItemAdded,
41         MediaDurationChanged,
42         MediaPreparsedChanged,
43         MediaFreed,
44         MediaStateChanged,
45
46         PlayerNothingSpecial,
47         PlayerOpening,
48         PlayerBuffering,
49         PlayerPlaying,
50         PlayerPaused,
51         PlayerStopped,
52         PlayerForward,
53         PlayerBackward,
54         PlayerEndReached,
55         PlayerEncounteredError,
56         PlayerTimeChanged,
57         PlayerPositionChanged,
58         PlayerSeekableChanged,
59         PlayerPausableChanged,
60
61         ListItemAdded,
62         ListWillAddItem,
63         ListItemDeleted,
64         ListWillDeleteItem,
65
66         ListViewItemAdded,
67         ListViewWillAddItem,
68         ListViewItemDeleted,
69         ListViewWillDeleteItem,
70
71         ListPlayerPlayed,
72         ListPlayerNextItemSet,
73         ListPlayerStopped,
74
75         DiscovererStarted,
76         DiscovererEnded,
77
78         PlayerTitleChanged,
79     };
80
81     [StructLayout (LayoutKind.Sequential)]
82     internal class GenericEvent
83     {
84         public EventType type;
85         public IntPtr    obj;
86     };
87     internal delegate void GenericCallback (GenericEvent e, IntPtr d);
88
89     /* Player events */
90     [StructLayout (LayoutKind.Sequential)]
91     internal sealed class PlayerPositionEvent : GenericEvent
92     {
93         float     position;
94     };
95
96     [StructLayout (LayoutKind.Sequential)]
97     internal sealed class PlayerTimeEvent : GenericEvent
98     {
99         long      time;
100     };
101
102     [StructLayout (LayoutKind.Sequential)]
103     internal sealed class PlayerTitleEvent : GenericEvent
104     {
105         int       title;
106     };
107
108     [StructLayout (LayoutKind.Sequential)]
109     internal sealed class PlayerSeekableEvent : GenericEvent
110     {
111         long      seekable;
112     };
113
114     [StructLayout (LayoutKind.Sequential)]
115     internal sealed class PlayerPausableChangedEvent : GenericEvent
116     {
117         long      pausable;
118     };
119     /** @} */
120 };