Add media key to X11 vouts. Patch by loox.thefuture
[vlc.git] / loader / com.h
bloba6472355d3dd6b6b269ed2b96051cda4d4fa2e9c
1 /*
2 * Modified for use with MPlayer, detailed CVS changelog at
3 * http://www.mplayerhq.hu/cgi-bin/cvsweb.cgi/main/
4 * $Id$
5 */
7 #ifndef AVIFILE_COM_H
8 #define AVIFILE_COM_H
10 #include "config.h"
12 #ifdef HAVE_STDINT_H
13 #include <stdint.h>
14 #else
15 #include <inttypes.h>
16 #endif
18 /**
19 * Internal functions and structures for COM emulation code.
22 #if !defined(WIN32) || defined(__CYGWIN__) || defined(__MINGW32__)
24 #ifdef __cplusplus
25 extern "C" {
26 #endif
28 void* CoTaskMemAlloc(unsigned long cb);
29 void CoTaskMemFree(void* cb);
31 #ifndef GUID_TYPE
32 #define GUID_TYPE
33 typedef struct
35 uint32_t f1;
36 uint16_t f2;
37 uint16_t f3;
38 uint8_t f4[8];
39 } GUID;
40 #endif
42 extern const GUID IID_IUnknown;
43 extern const GUID IID_IClassFactory;
45 typedef long (*GETCLASSOBJECT) (GUID* clsid, const GUID* iid, void** ppv);
46 int RegisterComClass(const GUID* clsid, GETCLASSOBJECT gcs);
47 int UnregisterComClass(const GUID* clsid, GETCLASSOBJECT gcs);
49 #ifndef STDCALL
50 #define STDCALL __attribute__((__stdcall__))
51 #endif
53 struct IUnknown;
54 struct IClassFactory;
55 struct IUnknown_vt
57 long STDCALL (*QueryInterface)(struct IUnknown* _this, const GUID* iid, void** ppv);
58 long STDCALL (*AddRef)(struct IUnknown* _this) ;
59 long STDCALL (*Release)(struct IUnknown* _this) ;
60 } ;
62 typedef struct IUnknown
64 struct IUnknown_vt* vt;
65 } IUnknown;
67 struct IClassFactory_vt
69 long STDCALL (*QueryInterface)(struct IUnknown* _this, const GUID* iid, void** ppv);
70 long STDCALL (*AddRef)(struct IUnknown* _this) ;
71 long STDCALL (*Release)(struct IUnknown* _this) ;
72 long STDCALL (*CreateInstance)(struct IClassFactory* _this, struct IUnknown* pUnkOuter, const GUID* riid, void** ppvObject);
75 struct IClassFactory
77 struct IClassFactory_vt* vt;
80 long CoCreateInstance(GUID* rclsid, struct IUnknown* pUnkOuter,
81 long dwClsContext, const GUID* riid, void** ppv);
83 #ifdef __cplusplus
85 #endif /* __cplusplus */
87 #endif /* WIN32 */
89 #endif /* AVIFILE_COM_H */