// Windows Ribbon Application interface
[ComImport]
[InterfaceType(ComInterfaceType.InterfaceIsIUnknown)]
[Guid("F4F0385D-6872-43a8-AD09-4C339CB3F5C5")]
public interface IUIFramework
{
// Connects the framework and the application
[PreserveSig]
HRESULT Initialize(IntPtr frameWnd, IUIApplication application);
// Releases all framework objects
[PreserveSig]
HRESULT Destroy();
// Loads and instantiates the views and commands specified in markup
[PreserveSig]
HRESULT LoadUI(IntPtr instance, [MarshalAs(UnmanagedType.LPWStr)] string resourceName);
// Retrieves a pointer to a view object
[PreserveSig]
HRESULT GetView(UInt32 viewId, Guid riid, [Out(), MarshalAs(UnmanagedType.Interface)] out object /* [out, iid_is(riid), annotation("__deref_out")] void** */ ppv);
// Retrieves the current value of a property
[PreserveSig]
HRESULT GetUICommandProperty(UInt32 commandId, [In] ref PropertyKey key, out PropVariant value);
// Immediately sets the value of a property
[PreserveSig]
HRESULT SetUICommandProperty(UInt32 commandId, [In] ref PropertyKey key, [In] ref PropVariant value);
// Asks the framework to retrieve the new value of a property at the next update cycle
[PreserveSig]
HRESULT InvalidateUICommand(UInt32 commandId, UI_Invalidations flags, [In] ref PropertyKey key);
// Flush all the pending UI command updates
[PreserveSig]
HRESULT FlushPendingInvalidations();
// Asks the framework to switch to the list of modes specified and adjust visibility of controls accordingly
[PreserveSig]
HRESULT SetModes(Int32 iModes);
}
None.