2 * COM Classes for uiribbon
4 * Copyright 2017 Fabian Maurer
6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Lesser General Public
8 * License as published by the Free Software Foundation; either
9 * version 2.1 of the License, or (at your option) any later version.
11 * This library is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * Lesser General Public License for more details.
16 * You should have received a copy of the GNU Lesser General Public
17 * License along with this library; if not, write to the Free Software
18 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
24 #define threading
(model
)
27 typedef enum UI_INVALIDATIONS
{
28 UI_INVALIDATIONS_STATE
= 0x00000001,
29 UI_INVALIDATIONS_VALUE
= 0x00000002,
30 UI_INVALIDATIONS_PROPERTY
= 0x00000004,
31 UI_INVALIDATIONS_ALLPROPERTIES
= 0x00000008,
34 typedef enum UI_EXECUTIONVERB
{
35 UI_EXECUTIONVERB_EXECUTE
,
36 UI_EXECUTIONVERB_PREVIEW
,
37 UI_EXECUTIONVERB_CANCELPREVIEW
,
40 typedef enum UI_VIEWTYPE
{
41 UI_VIEWTYPE_RIBBON
= 1
44 typedef enum UI_VIEWVERB
{
51 typedef enum UI_COMMANDTYPE
{
52 UI_COMMANDTYPE_UNKNOWN
,
54 UI_COMMANDTYPE_ACTION
,
55 UI_COMMANDTYPE_ANCHOR
,
56 UI_COMMANDTYPE_CONTEXT
,
57 UI_COMMANDTYPE_COLLECTION
,
58 UI_COMMANDTYPE_COMMANDCOLLECTION
,
59 UI_COMMANDTYPE_DECIMAL
,
60 UI_COMMANDTYPE_BOOLEAN
,
62 UI_COMMANDTYPE_RECENTITEMS
,
63 UI_COMMANDTYPE_COLORANCHOR
,
64 UI_COMMANDTYPE_COLORCOLLECTION
,
67 typedef [v1_enum] enum UI_OWNERSHIP
{
68 UI_OWNERSHIP_TRANSFER
= 0,
69 UI_OWNERSHIP_COPY
= 1,
72 typedef [v1_enum] enum UI_COLLECTIONCHANGE
{
73 UI_COLLECTIONCHANGE_INSERT
= 0,
74 UI_COLLECTIONCHANGE_REMOVE
= 1,
75 UI_COLLECTIONCHANGE_REPLACE
= 2,
76 UI_COLLECTIONCHANGE_RESET
= 3
77 } UI_COLLECTIONCHANGE
;
81 uuid(c205bb48
-5b1c
-4219-a106
-15bd0a5f24e2
),
83 pointer_default(unique)
85 interface IUISimplePropertySet
: IUnknown
88 [in] REFPROPERTYKEY key
,
89 [out] PROPVARIANT
*value
95 uuid(75ae0a2d
-dc03
-4c9f
-8883-069660d0beb6
),
97 pointer_default(unique)
99 interface IUICommandHandler
: IUnknown
102 [in] UINT32 commandId
,
103 [in] UI_EXECUTIONVERB verb
,
104 [in] const PROPERTYKEY
*key
,
105 [in] const PROPVARIANT
*currentValue
,
106 [in] IUISimplePropertySet
*commandExecutionProperties
108 HRESULT UpdateProperty
(
109 [in] UINT32 commandId
,
110 [in] REFPROPERTYKEY key
,
111 [in] const PROPVARIANT
*currentValue
,
112 [out] PROPVARIANT
*newValue
118 uuid(d428903c
-729a
-491d
-910d
-682a08ff2522
),
120 pointer_default(unique)
122 interface IUIApplication
: IUnknown
124 HRESULT OnViewChanged
(
126 [in] UI_VIEWTYPE typeID
,
128 [in] UI_VIEWVERB verb
,
129 [in] INT32 uReasonCode
131 HRESULT OnCreateUICommand
(
132 [in] UINT32 commandId
,
133 [in] UI_COMMANDTYPE typeID
,
134 [out] IUICommandHandler
**commandHandler
136 HRESULT OnDestroyUICommand
(
137 [in] UINT32 commandId
,
138 [in] UI_COMMANDTYPE typeID
,
139 [in] IUICommandHandler
*commandHandler
145 uuid(f4f0385d
-6872-43a8
-ad09
-4c339cb3f5c5
),
147 pointer_default(unique)
149 interface IUIFramework
: IUnknown
153 [in] IUIApplication
*application
158 [in] HINSTANCE instance
,
159 [in] LPCWSTR resourceName
166 HRESULT GetUICommandProperty
(
167 [in] UINT32 commandId
,
168 [in] REFPROPERTYKEY key
,
169 [out] PROPVARIANT
*value
171 HRESULT SetUICommandProperty
(
172 [in] UINT32 commandId
,
173 [in] REFPROPERTYKEY key
,
174 [in] PROPVARIANT value
176 HRESULT InvalidateUICommand
(
177 [in] UINT32 commandId
,
178 [in] UI_INVALIDATIONS flags
,
179 [in] const PROPERTYKEY
*key
181 HRESULT FlushPendingInvalidations
(
190 uuid(23c8c838
-4de6
-436b
-ab01
-5554bb7c30dd
),
192 pointer_default(unique)
194 interface IUIImage
: IUnknown
197 [out] HBITMAP *bitmap
203 uuid(803982ab
-370a
-4f7e
-a9e7
-8784036a6e26
),
205 pointer_default(unique)
207 interface IUIRibbon
: IUnknown
212 HRESULT LoadSettingsFromStream
(
213 [in] IStream
*pStream
215 HRESULT SaveSettingsToStream
(
216 [in] IStream
*pStream
222 uuid(df4f45bf
-6f9d
-4dd7
-9d68
-d8f9cd18c4db
),
224 pointer_default(unique)
226 interface IUICollection
: IUnknown
233 [out] IUnknown
**item
246 [in] UINT32 indexReplaced
,
247 [in] IUnknown
*itemReplaceWith
254 uuid(eea11f37
-7c46
-437c
-8e55
-b52122b29293
),
256 pointer_default(unique)
258 interface IUIContextualUI
: IUnknown
260 HRESULT ShowAtLocation
(
268 uuid(6502ae91
-a14d
-44b5
-bbd0
-62aacc581d52
),
270 pointer_default(unique)
272 interface IUICollectionChangedEvent
: IUnknown
275 [in] UI_COLLECTIONCHANGE action
,
276 [in] UINT32 oldIndex
,
277 [in] IUnknown
*oldItem
,
278 [in] UINT32 newIndex
,
279 [in] IUnknown
*newItem
285 uuid(18aba7f3
-4c1c
-4ba2
-bf6c
-f5c3326fa816
),
287 pointer_default(unique)
289 interface IUIImageFromBitmap
: IUnknown
293 [in] UI_OWNERSHIP options
,
294 [out] IUIImage
**image
300 helpstring("UIRibbonFramework Object"),
301 threading
(apartment
),
302 uuid(926749fa
-2615-4987-8845-c33e65f2b957
)
304 coclass UIRibbonFramework
{ interface IUIFramework
; }
307 threading
(apartment
),
308 uuid(0f7434b6
-59b6
-4250-999e
-d168d6ae4293
)
310 coclass UIRibbonImageFromBitmapFactory
{ interface IUIImageFromBitmap
; }