|
1 /**************************************************************************** |
|
2 ** |
|
3 ** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). |
|
4 ** All rights reserved. |
|
5 ** Contact: Nokia Corporation (qt-info@nokia.com) |
|
6 ** |
|
7 ** This file is part of the Qt Mobility Components. |
|
8 ** |
|
9 ** $QT_BEGIN_LICENSE:LGPL$ |
|
10 ** No Commercial Usage |
|
11 ** This file contains pre-release code and may not be distributed. |
|
12 ** You may use this file in accordance with the terms and conditions |
|
13 ** contained in the Technology Preview License Agreement accompanying |
|
14 ** this package. |
|
15 ** |
|
16 ** GNU Lesser General Public License Usage |
|
17 ** Alternatively, this file may be used under the terms of the GNU Lesser |
|
18 ** General Public License version 2.1 as published by the Free Software |
|
19 ** Foundation and appearing in the file LICENSE.LGPL included in the |
|
20 ** packaging of this file. Please review the following information to |
|
21 ** ensure the GNU Lesser General Public License version 2.1 requirements |
|
22 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. |
|
23 ** |
|
24 ** In addition, as a special exception, Nokia gives you certain additional |
|
25 ** rights. These rights are described in the Nokia Qt LGPL Exception |
|
26 ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. |
|
27 ** |
|
28 ** If you have questions regarding the use of this file, please contact |
|
29 ** Nokia at qt-info@nokia.com. |
|
30 ** |
|
31 ** |
|
32 ** |
|
33 ** |
|
34 ** |
|
35 ** |
|
36 ** |
|
37 ** |
|
38 ** $QT_END_LICENSE$ |
|
39 ** |
|
40 ****************************************************************************/ |
|
41 |
|
42 #ifndef QWMPVIDEOOVERLAY_H |
|
43 #define QWMPVIDEOOVERLAY_H |
|
44 |
|
45 #include <qvideowindowcontrol.h> |
|
46 |
|
47 #include "qwmpplayerservice.h" |
|
48 |
|
49 #include <wmp.h> |
|
50 |
|
51 QT_USE_NAMESPACE |
|
52 class QWmpVideoOverlay |
|
53 : public QVideoWindowControl |
|
54 , public IOleInPlaceSite |
|
55 , public IOleInPlaceFrame |
|
56 { |
|
57 Q_OBJECT |
|
58 public: |
|
59 QWmpVideoOverlay(IWMPPlayer4 *player, IOleObject *object, QWmpPlayerService *service); |
|
60 ~QWmpVideoOverlay(); |
|
61 |
|
62 WId winId() const; |
|
63 void setWinId(WId id); |
|
64 |
|
65 QRect displayRect() const; |
|
66 void setDisplayRect(const QRect &rect); |
|
67 |
|
68 bool isFullScreen() const; |
|
69 void setFullScreen(bool fullScreen); |
|
70 |
|
71 void repaint(); |
|
72 |
|
73 QSize nativeSize() const; |
|
74 void setNativeSize(const QSize &size); |
|
75 |
|
76 Qt::AspectRatioMode aspectRatioMode() const; |
|
77 void setAspectRatioMode(Qt::AspectRatioMode mode); |
|
78 |
|
79 int brightness() const; |
|
80 void setBrightness(int brightness); |
|
81 |
|
82 int contrast() const; |
|
83 void setContrast(int contrast); |
|
84 |
|
85 int hue() const; |
|
86 void setHue(int hue); |
|
87 |
|
88 int saturation() const; |
|
89 void setSaturation(int saturation); |
|
90 |
|
91 // IUnknown |
|
92 HRESULT STDMETHODCALLTYPE QueryInterface(REFIID riid, void **object); |
|
93 ULONG STDMETHODCALLTYPE AddRef(); |
|
94 ULONG STDMETHODCALLTYPE Release(); |
|
95 |
|
96 // IOleWindow |
|
97 HRESULT STDMETHODCALLTYPE GetWindow(HWND *phwnd); |
|
98 HRESULT STDMETHODCALLTYPE ContextSensitiveHelp(BOOL fEnterMode); |
|
99 |
|
100 // IOleInPlaceSite |
|
101 HRESULT STDMETHODCALLTYPE CanInPlaceActivate(); |
|
102 HRESULT STDMETHODCALLTYPE OnInPlaceActivate(); |
|
103 HRESULT STDMETHODCALLTYPE OnUIActivate(); |
|
104 HRESULT STDMETHODCALLTYPE GetWindowContext( |
|
105 IOleInPlaceFrame **ppFrame, |
|
106 IOleInPlaceUIWindow **ppDoc, |
|
107 LPRECT lprcPosRect, |
|
108 LPRECT lprcClipRect, |
|
109 LPOLEINPLACEFRAMEINFO lpFrameInfo); |
|
110 HRESULT STDMETHODCALLTYPE Scroll(SIZE scrollExtant); |
|
111 HRESULT STDMETHODCALLTYPE OnUIDeactivate(BOOL fUndoable); |
|
112 HRESULT STDMETHODCALLTYPE OnInPlaceDeactivate(); |
|
113 HRESULT STDMETHODCALLTYPE DiscardUndoState(); |
|
114 HRESULT STDMETHODCALLTYPE DeactivateAndUndo(); |
|
115 HRESULT STDMETHODCALLTYPE OnPosRectChange(LPCRECT lprcPosRect); |
|
116 |
|
117 // IOleInPlaceUIWindow |
|
118 HRESULT STDMETHODCALLTYPE GetBorder(LPRECT lprectBorder); |
|
119 HRESULT STDMETHODCALLTYPE RequestBorderSpace(LPCBORDERWIDTHS pborderwidths); |
|
120 HRESULT STDMETHODCALLTYPE SetBorderSpace(LPCBORDERWIDTHS pborderwidths); |
|
121 HRESULT STDMETHODCALLTYPE SetActiveObject( |
|
122 IOleInPlaceActiveObject *pActiveObject, LPCOLESTR pszObjName); |
|
123 |
|
124 // IOleInPlaceFrame |
|
125 HRESULT STDMETHODCALLTYPE InsertMenus(HMENU hmenuShared, LPOLEMENUGROUPWIDTHS lpMenuWidths); |
|
126 HRESULT STDMETHODCALLTYPE SetMenu(HMENU hmenuShared, HOLEMENU holemenu, HWND hwndActiveObject); |
|
127 HRESULT STDMETHODCALLTYPE RemoveMenus(HMENU hmenuShared); |
|
128 HRESULT STDMETHODCALLTYPE SetStatusText(LPCOLESTR pszStatusText); |
|
129 HRESULT STDMETHODCALLTYPE EnableModeless(BOOL fEnable); |
|
130 HRESULT STDMETHODCALLTYPE TranslateAccelerator(LPMSG lpmsg, WORD wID); |
|
131 |
|
132 private: |
|
133 QWmpPlayerService *m_service; |
|
134 IWMPPlayer4 *m_player; |
|
135 IOleObject *m_object; |
|
136 IOleInPlaceObject *m_inPlaceObject; |
|
137 WId m_winId; |
|
138 Qt::AspectRatioMode m_aspectRatioMode; |
|
139 QSize m_sizeHint; |
|
140 QRect m_displayRect; |
|
141 bool m_fullScreen; |
|
142 }; |
|
143 |
|
144 #endif |