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
,
70 uuid(c205bb48
-5b1c
-4219-a106
-15bd0a5f24e2
),
72 pointer_default(unique)
74 interface IUISimplePropertySet
: IUnknown
77 [in] REFPROPERTYKEY key
,
78 [out] PROPVARIANT
*value
84 uuid(75ae0a2d
-dc03
-4c9f
-8883-069660d0beb6
),
86 pointer_default(unique)
88 interface IUICommandHandler
: IUnknown
91 [in] UINT32 commandId
,
92 [in] UI_EXECUTIONVERB verb
,
93 [in] const PROPERTYKEY
*key
,
94 [in] const PROPVARIANT
*currentValue
,
95 [in] IUISimplePropertySet
*commandExecutionProperties
97 HRESULT UpdateProperty
(
98 [in] UINT32 commandId
,
99 [in] REFPROPERTYKEY key
,
100 [in] const PROPVARIANT
*currentValue
,
101 [out] PROPVARIANT
*newValue
107 uuid(d428903c
-729a
-491d
-910d
-682a08ff2522
),
109 pointer_default(unique)
111 interface IUIApplication
: IUnknown
113 HRESULT OnViewChanged
(
115 [in] UI_VIEWTYPE typeID
,
117 [in] UI_VIEWVERB verb
,
118 [in] INT32 uReasonCode
120 HRESULT OnCreateUICommand
(
121 [in] UINT32 commandId
,
122 [in] UI_COMMANDTYPE typeID
,
123 [out] IUICommandHandler
**commandHandler
125 HRESULT OnDestroyUICommand
(
126 [in] UINT32 commandId
,
127 [in] UI_COMMANDTYPE typeID
,
128 [in] IUICommandHandler
*commandHandler
134 uuid(f4f0385d
-6872-43a8
-ad09
-4c339cb3f5c5
),
136 pointer_default(unique)
138 interface IUIFramework
: IUnknown
142 [in] IUIApplication
*application
147 [in] HINSTANCE instance
,
148 [in] LPCWSTR resourceName
155 HRESULT GetUICommandProperty
(
156 [in] UINT32 commandId
,
157 [in] REFPROPERTYKEY key
,
158 [out] PROPVARIANT
*value
160 HRESULT SetUICommandProperty
(
161 [in] UINT32 commandId
,
162 [in] REFPROPERTYKEY key
,
163 [in] PROPVARIANT value
165 HRESULT InvalidateUICommand
(
166 [in] UINT32 commandId
,
167 [in] UI_INVALIDATIONS flags
,
168 [in] const PROPERTYKEY
*key
170 HRESULT FlushPendingInvalidations
(
178 helpstring("UIRibbonFramework Object"),
179 threading
(apartment
),
180 uuid(926749fa
-2615-4987-8845-c33e65f2b957
)
182 coclass UIRibbonFramework
{ interface IUIFramework
; }