]> git.sesse.net Git - vlc/blob - bindings/python-ctypes/override.py
New python bindings, using ctypes, automatically generated from include files.
[vlc] / bindings / python-ctypes / override.py
1 class Instance:
2     @staticmethod
3     def new(*p):
4         """Create a new Instance.
5         """
6         e=VLCException()
7         return libvlc_new(len(p), p, e)
8
9 class MediaControl:
10     @staticmethod
11     def new(*p):
12         """Create a new MediaControl
13         """
14         e=MediaControlException()
15         return mediacontrol_new(len(p), p, e)
16
17     @staticmethod
18     def new_from_instance(i):
19         """Create a new MediaControl from an existing Instance.
20         """
21         e=MediaControlException()
22         return mediacontrol_new_from_instance(i, e)
23
24 class MediaList:
25     def __len__(self):
26         e=VLCException()
27         return libvlc_media_list_count(self, e)
28
29     def __getitem__(self, i):
30         e=VLCException()
31         return libvlc_media_list_item_at_index(self, i, e)