winex11: Return Wine Vulkan driver functions from vkGetInstanceProcAddr().
[wine.git] / dlls / wmp / wmp_private.h
blobe95b194d77fd7c8c0c8e6f4c3a70305944d59095
1 /*
2 * Copyright 2014 Jacek Caban for CodeWeavers
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Lesser General Public
6 * License as published by the Free Software Foundation; either
7 * version 2.1 of the License, or (at your option) any later version.
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Lesser General Public License for more details.
14 * You should have received a copy of the GNU Lesser General Public
15 * License along with this library; if not, write to the Free Software
16 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
19 #define COBJMACROS
21 #include "windows.h"
22 #include "wine/heap.h"
23 #include "wine/unicode.h"
24 #include "ole2.h"
25 #include "wmp.h"
27 typedef struct {
28 IConnectionPoint IConnectionPoint_iface;
30 IConnectionPointContainer *container;
32 IDispatch **sinks;
33 DWORD sinks_size;
35 IID iid;
36 } ConnectionPoint;
38 typedef struct {
39 IWMPMedia IWMPMedia_iface;
41 LONG ref;
43 WCHAR *url;
44 } WMPMedia;
46 struct WindowsMediaPlayer {
47 IOleObject IOleObject_iface;
48 IProvideClassInfo2 IProvideClassInfo2_iface;
49 IPersistStreamInit IPersistStreamInit_iface;
50 IOleInPlaceObjectWindowless IOleInPlaceObjectWindowless_iface;
51 IConnectionPointContainer IConnectionPointContainer_iface;
52 IOleControl IOleControl_iface;
53 IWMPPlayer4 IWMPPlayer4_iface;
54 IWMPPlayer IWMPPlayer_iface;
55 IWMPSettings IWMPSettings_iface;
56 IWMPControls IWMPControls_iface;
57 IWMPNetwork IWMPNetwork_iface;
59 LONG ref;
61 IOleClientSite *client_site;
62 HWND hwnd;
63 SIZEL extent;
65 /* Settings */
66 VARIANT_BOOL auto_start;
67 VARIANT_BOOL invoke_urls;
68 VARIANT_BOOL enable_error_dialogs;
70 ConnectionPoint *wmpocx;
72 IWMPMedia *wmpmedia;
75 void init_player(WindowsMediaPlayer*) DECLSPEC_HIDDEN;
76 void destroy_player(WindowsMediaPlayer*) DECLSPEC_HIDDEN;
77 IWMPMedia* create_media_from_url(BSTR url);
78 void ConnectionPointContainer_Init(WindowsMediaPlayer *wmp) DECLSPEC_HIDDEN;
79 void ConnectionPointContainer_Destroy(WindowsMediaPlayer *wmp) DECLSPEC_HIDDEN;
81 HRESULT WINAPI WMPFactory_CreateInstance(IClassFactory*,IUnknown*,REFIID,void**) DECLSPEC_HIDDEN;
83 void unregister_wmp_class(void) DECLSPEC_HIDDEN;
85 extern HINSTANCE wmp_instance DECLSPEC_HIDDEN;
87 static inline WCHAR *heap_strdupW(const WCHAR *str)
89 WCHAR *ret;
91 if(str) {
92 size_t size = strlenW(str)+1;
93 ret = heap_alloc(size*sizeof(WCHAR));
94 if(ret)
95 memcpy(ret, str, size*sizeof(WCHAR));
96 }else {
97 ret = NULL;
100 return ret;