//! NOTE: this file is autogenerated, DO NOT MODIFY
//--------------------------------------------------------------------------------
// Section: Constants (3)
//--------------------------------------------------------------------------------
pub const UI_ALL_COMMANDS = @as(u32, 0);
pub const UI_COLLECTION_INVALIDINDEX = @as(u32, 4294967295);
pub const LIBID_UIRibbon = Guid.initString("942f35c2-e83b-45ef-b085-ac295dd63d5b");

//--------------------------------------------------------------------------------
// Section: Types (33)
//--------------------------------------------------------------------------------
const CLSID_UIRibbonFramework_Value = Guid.initString("926749fa-2615-4987-8845-c33e65f2b957");
pub const CLSID_UIRibbonFramework = &CLSID_UIRibbonFramework_Value;

const CLSID_UIRibbonImageFromBitmapFactory_Value = Guid.initString("0f7434b6-59b6-4250-999e-d168d6ae4293");
pub const CLSID_UIRibbonImageFromBitmapFactory = &CLSID_UIRibbonImageFromBitmapFactory_Value;

pub const UI_CONTEXTAVAILABILITY = enum(i32) {
    NOTAVAILABLE = 0,
    AVAILABLE = 1,
    ACTIVE = 2,
};
pub const UI_CONTEXTAVAILABILITY_NOTAVAILABLE = UI_CONTEXTAVAILABILITY.NOTAVAILABLE;
pub const UI_CONTEXTAVAILABILITY_AVAILABLE = UI_CONTEXTAVAILABILITY.AVAILABLE;
pub const UI_CONTEXTAVAILABILITY_ACTIVE = UI_CONTEXTAVAILABILITY.ACTIVE;

pub const UI_FONTPROPERTIES = enum(i32) {
    NOTAVAILABLE = 0,
    NOTSET = 1,
    SET = 2,
};
pub const UI_FONTPROPERTIES_NOTAVAILABLE = UI_FONTPROPERTIES.NOTAVAILABLE;
pub const UI_FONTPROPERTIES_NOTSET = UI_FONTPROPERTIES.NOTSET;
pub const UI_FONTPROPERTIES_SET = UI_FONTPROPERTIES.SET;

pub const UI_FONTVERTICALPOSITION = enum(i32) {
    NOTAVAILABLE = 0,
    NOTSET = 1,
    SUPERSCRIPT = 2,
    SUBSCRIPT = 3,
};
pub const UI_FONTVERTICALPOSITION_NOTAVAILABLE = UI_FONTVERTICALPOSITION.NOTAVAILABLE;
pub const UI_FONTVERTICALPOSITION_NOTSET = UI_FONTVERTICALPOSITION.NOTSET;
pub const UI_FONTVERTICALPOSITION_SUPERSCRIPT = UI_FONTVERTICALPOSITION.SUPERSCRIPT;
pub const UI_FONTVERTICALPOSITION_SUBSCRIPT = UI_FONTVERTICALPOSITION.SUBSCRIPT;

pub const UI_FONTUNDERLINE = enum(i32) {
    NOTAVAILABLE = 0,
    NOTSET = 1,
    SET = 2,
};
pub const UI_FONTUNDERLINE_NOTAVAILABLE = UI_FONTUNDERLINE.NOTAVAILABLE;
pub const UI_FONTUNDERLINE_NOTSET = UI_FONTUNDERLINE.NOTSET;
pub const UI_FONTUNDERLINE_SET = UI_FONTUNDERLINE.SET;

pub const UI_FONTDELTASIZE = enum(i32) {
    GROW = 0,
    SHRINK = 1,
};
pub const UI_FONTDELTASIZE_GROW = UI_FONTDELTASIZE.GROW;
pub const UI_FONTDELTASIZE_SHRINK = UI_FONTDELTASIZE.SHRINK;

pub const UI_CONTROLDOCK = enum(i32) {
    TOP = 1,
    BOTTOM = 3,
};
pub const UI_CONTROLDOCK_TOP = UI_CONTROLDOCK.TOP;
pub const UI_CONTROLDOCK_BOTTOM = UI_CONTROLDOCK.BOTTOM;

pub const UI_SWATCHCOLORTYPE = enum(i32) {
    NOCOLOR = 0,
    AUTOMATIC = 1,
    RGB = 2,
};
pub const UI_SWATCHCOLORTYPE_NOCOLOR = UI_SWATCHCOLORTYPE.NOCOLOR;
pub const UI_SWATCHCOLORTYPE_AUTOMATIC = UI_SWATCHCOLORTYPE.AUTOMATIC;
pub const UI_SWATCHCOLORTYPE_RGB = UI_SWATCHCOLORTYPE.RGB;

pub const UI_SWATCHCOLORMODE = enum(i32) {
    NORMAL = 0,
    MONOCHROME = 1,
};
pub const UI_SWATCHCOLORMODE_NORMAL = UI_SWATCHCOLORMODE.NORMAL;
pub const UI_SWATCHCOLORMODE_MONOCHROME = UI_SWATCHCOLORMODE.MONOCHROME;

pub const UI_EVENTTYPE = enum(i32) {
    ApplicationMenuOpened = 0,
    RibbonMinimized = 1,
    RibbonExpanded = 2,
    ApplicationModeSwitched = 3,
    TabActivated = 4,
    MenuOpened = 5,
    CommandExecuted = 6,
    TooltipShown = 7,
};
pub const UI_EVENTTYPE_ApplicationMenuOpened = UI_EVENTTYPE.ApplicationMenuOpened;
pub const UI_EVENTTYPE_RibbonMinimized = UI_EVENTTYPE.RibbonMinimized;
pub const UI_EVENTTYPE_RibbonExpanded = UI_EVENTTYPE.RibbonExpanded;
pub const UI_EVENTTYPE_ApplicationModeSwitched = UI_EVENTTYPE.ApplicationModeSwitched;
pub const UI_EVENTTYPE_TabActivated = UI_EVENTTYPE.TabActivated;
pub const UI_EVENTTYPE_MenuOpened = UI_EVENTTYPE.MenuOpened;
pub const UI_EVENTTYPE_CommandExecuted = UI_EVENTTYPE.CommandExecuted;
pub const UI_EVENTTYPE_TooltipShown = UI_EVENTTYPE.TooltipShown;

pub const UI_EVENTLOCATION = enum(i32) {
    Ribbon = 0,
    QAT = 1,
    ApplicationMenu = 2,
    ContextPopup = 3,
};
pub const UI_EVENTLOCATION_Ribbon = UI_EVENTLOCATION.Ribbon;
pub const UI_EVENTLOCATION_QAT = UI_EVENTLOCATION.QAT;
pub const UI_EVENTLOCATION_ApplicationMenu = UI_EVENTLOCATION.ApplicationMenu;
pub const UI_EVENTLOCATION_ContextPopup = UI_EVENTLOCATION.ContextPopup;

// TODO: this type is limited to platform 'windows6.1'
const IID_IUISimplePropertySet_Value = Guid.initString("c205bb48-5b1c-4219-a106-15bd0a5f24e2");
pub const IID_IUISimplePropertySet = &IID_IUISimplePropertySet_Value;
pub const IUISimplePropertySet = extern struct {
    pub const VTable = extern struct {
        base: IUnknown.VTable,
        GetValue: switch (@import("builtin").zig_backend) {
            .stage1 => fn (
                self: *const IUISimplePropertySet,
                key: ?*const PROPERTYKEY,
                value: ?*PROPVARIANT,
            ) callconv(@import("std").os.windows.WINAPI) HRESULT,
            else => *const fn (
                self: *const IUISimplePropertySet,
                key: ?*const PROPERTYKEY,
                value: ?*PROPVARIANT,
            ) callconv(@import("std").os.windows.WINAPI) HRESULT,
        },
    };
    vtable: *const VTable,
    pub fn MethodMixin(comptime T: type) type {
        return struct {
            pub usingnamespace IUnknown.MethodMixin(T);
            // NOTE: method is namespaced with interface name to avoid conflicts for now
            pub inline fn IUISimplePropertySet_GetValue(self: *const T, key: ?*const PROPERTYKEY, value: ?*PROPVARIANT) HRESULT {
                return @as(*const IUISimplePropertySet.VTable, @ptrCast(self.vtable)).GetValue(@as(*const IUISimplePropertySet, @ptrCast(self)), key, value);
            }
        };
    }
    pub usingnamespace MethodMixin(@This());
};

// TODO: this type is limited to platform 'windows6.1'
const IID_IUIRibbon_Value = Guid.initString("803982ab-370a-4f7e-a9e7-8784036a6e26");
pub const IID_IUIRibbon = &IID_IUIRibbon_Value;
pub const IUIRibbon = extern struct {
    pub const VTable = extern struct {
        base: IUnknown.VTable,
        GetHeight: switch (@import("builtin").zig_backend) {
            .stage1 => fn (
                self: *const IUIRibbon,
                cy: ?*u32,
            ) callconv(@import("std").os.windows.WINAPI) HRESULT,
            else => *const fn (
                self: *const IUIRibbon,
                cy: ?*u32,
            ) callconv(@import("std").os.windows.WINAPI) HRESULT,
        },
        LoadSettingsFromStream: switch (@import("builtin").zig_backend) {
            .stage1 => fn (
                self: *const IUIRibbon,
                pStream: ?*IStream,
            ) callconv(@import("std").os.windows.WINAPI) HRESULT,
            else => *const fn (
                self: *const IUIRibbon,
                pStream: ?*IStream,
            ) callconv(@import("std").os.windows.WINAPI) HRESULT,
        },
        SaveSettingsToStream: switch (@import("builtin").zig_backend) {
            .stage1 => fn (
                self: *const IUIRibbon,
                pStream: ?*IStream,
            ) callconv(@import("std").os.windows.WINAPI) HRESULT,
            else => *const fn (
                self: *const IUIRibbon,
                pStream: ?*IStream,
            ) callconv(@import("std").os.windows.WINAPI) HRESULT,
        },
    };
    vtable: *const VTable,
    pub fn MethodMixin(comptime T: type) type {
        return struct {
            pub usingnamespace IUnknown.MethodMixin(T);
            // NOTE: method is namespaced with interface name to avoid conflicts for now
            pub inline fn IUIRibbon_GetHeight(self: *const T, cy: ?*u32) HRESULT {
                return @as(*const IUIRibbon.VTable, @ptrCast(self.vtable)).GetHeight(@as(*const IUIRibbon, @ptrCast(self)), cy);
            }
            // NOTE: method is namespaced with interface name to avoid conflicts for now
            pub inline fn IUIRibbon_LoadSettingsFromStream(self: *const T, pStream: ?*IStream) HRESULT {
                return @as(*const IUIRibbon.VTable, @ptrCast(self.vtable)).LoadSettingsFromStream(@as(*const IUIRibbon, @ptrCast(self)), pStream);
            }
            // NOTE: method is namespaced with interface name to avoid conflicts for now
            pub inline fn IUIRibbon_SaveSettingsToStream(self: *const T, pStream: ?*IStream) HRESULT {
                return @as(*const IUIRibbon.VTable, @ptrCast(self.vtable)).SaveSettingsToStream(@as(*const IUIRibbon, @ptrCast(self)), pStream);
            }
        };
    }
    pub usingnamespace MethodMixin(@This());
};

pub const UI_INVALIDATIONS = enum(i32) {
    STATE = 1,
    VALUE = 2,
    PROPERTY = 4,
    ALLPROPERTIES = 8,
};
pub const UI_INVALIDATIONS_STATE = UI_INVALIDATIONS.STATE;
pub const UI_INVALIDATIONS_VALUE = UI_INVALIDATIONS.VALUE;
pub const UI_INVALIDATIONS_PROPERTY = UI_INVALIDATIONS.PROPERTY;
pub const UI_INVALIDATIONS_ALLPROPERTIES = UI_INVALIDATIONS.ALLPROPERTIES;

// TODO: this type is limited to platform 'windows6.1'
const IID_IUIFramework_Value = Guid.initString("f4f0385d-6872-43a8-ad09-4c339cb3f5c5");
pub const IID_IUIFramework = &IID_IUIFramework_Value;
pub const IUIFramework = extern struct {
    pub const VTable = extern struct {
        base: IUnknown.VTable,
        Initialize: switch (@import("builtin").zig_backend) {
            .stage1 => fn (
                self: *const IUIFramework,
                frameWnd: ?HWND,
                application: ?*IUIApplication,
            ) callconv(@import("std").os.windows.WINAPI) HRESULT,
            else => *const fn (
                self: *const IUIFramework,
                frameWnd: ?HWND,
                application: ?*IUIApplication,
            ) callconv(@import("std").os.windows.WINAPI) HRESULT,
        },
        Destroy: switch (@import("builtin").zig_backend) {
            .stage1 => fn (
                self: *const IUIFramework,
            ) callconv(@import("std").os.windows.WINAPI) HRESULT,
            else => *const fn (
                self: *const IUIFramework,
            ) callconv(@import("std").os.windows.WINAPI) HRESULT,
        },
        LoadUI: switch (@import("builtin").zig_backend) {
            .stage1 => fn (
                self: *const IUIFramework,
                instance: ?HINSTANCE,
                resourceName: ?[*:0]const u16,
            ) callconv(@import("std").os.windows.WINAPI) HRESULT,
            else => *const fn (
                self: *const IUIFramework,
                instance: ?HINSTANCE,
                resourceName: ?[*:0]const u16,
            ) callconv(@import("std").os.windows.WINAPI) HRESULT,
        },
        GetView: switch (@import("builtin").zig_backend) {
            .stage1 => fn (
                self: *const IUIFramework,
                viewId: u32,
                riid: ?*const Guid,
                ppv: ?*?*anyopaque,
            ) callconv(@import("std").os.windows.WINAPI) HRESULT,
            else => *const fn (
                self: *const IUIFramework,
                viewId: u32,
                riid: ?*const Guid,
                ppv: ?*?*anyopaque,
            ) callconv(@import("std").os.windows.WINAPI) HRESULT,
        },
        GetUICommandProperty: switch (@import("builtin").zig_backend) {
            .stage1 => fn (
                self: *const IUIFramework,
                commandId: u32,
                key: ?*const PROPERTYKEY,
                value: ?*PROPVARIANT,
            ) callconv(@import("std").os.windows.WINAPI) HRESULT,
            else => *const fn (
                self: *const IUIFramework,
                commandId: u32,
                key: ?*const PROPERTYKEY,
                value: ?*PROPVARIANT,
            ) callconv(@import("std").os.windows.WINAPI) HRESULT,
        },
        SetUICommandProperty: switch (@import("builtin").zig_backend) {
            .stage1 => fn (
                self: *const IUIFramework,
                commandId: u32,
                key: ?*const PROPERTYKEY,
                value: ?*const PROPVARIANT,
            ) callconv(@import("std").os.windows.WINAPI) HRESULT,
            else => *const fn (
                self: *const IUIFramework,
                commandId: u32,
                key: ?*const PROPERTYKEY,
                value: ?*const PROPVARIANT,
            ) callconv(@import("std").os.windows.WINAPI) HRESULT,
        },
        InvalidateUICommand: switch (@import("builtin").zig_backend) {
            .stage1 => fn (
                self: *const IUIFramework,
                commandId: u32,
                flags: UI_INVALIDATIONS,
                key: ?*const PROPERTYKEY,
            ) callconv(@import("std").os.windows.WINAPI) HRESULT,
            else => *const fn (
                self: *const IUIFramework,
                commandId: u32,
                flags: UI_INVALIDATIONS,
                key: ?*const PROPERTYKEY,
            ) callconv(@import("std").os.windows.WINAPI) HRESULT,
        },
        FlushPendingInvalidations: switch (@import("builtin").zig_backend) {
            .stage1 => fn (
                self: *const IUIFramework,
            ) callconv(@import("std").os.windows.WINAPI) HRESULT,
            else => *const fn (
                self: *const IUIFramework,
            ) callconv(@import("std").os.windows.WINAPI) HRESULT,
        },
        SetModes: switch (@import("builtin").zig_backend) {
            .stage1 => fn (
                self: *const IUIFramework,
                iModes: i32,
            ) callconv(@import("std").os.windows.WINAPI) HRESULT,
            else => *const fn (
                self: *const IUIFramework,
                iModes: i32,
            ) callconv(@import("std").os.windows.WINAPI) HRESULT,
        },
    };
    vtable: *const VTable,
    pub fn MethodMixin(comptime T: type) type {
        return struct {
            pub usingnamespace IUnknown.MethodMixin(T);
            // NOTE: method is namespaced with interface name to avoid conflicts for now
            pub inline fn IUIFramework_Initialize(self: *const T, frameWnd: ?HWND, application: ?*IUIApplication) HRESULT {
                return @as(*const IUIFramework.VTable, @ptrCast(self.vtable)).Initialize(@as(*const IUIFramework, @ptrCast(self)), frameWnd, application);
            }
            // NOTE: method is namespaced with interface name to avoid conflicts for now
            pub inline fn IUIFramework_Destroy(self: *const T) HRESULT {
                return @as(*const IUIFramework.VTable, @ptrCast(self.vtable)).Destroy(@as(*const IUIFramework, @ptrCast(self)));
            }
            // NOTE: method is namespaced with interface name to avoid conflicts for now
            pub inline fn IUIFramework_LoadUI(self: *const T, instance: ?HINSTANCE, resourceName: ?[*:0]const u16) HRESULT {
                return @as(*const IUIFramework.VTable, @ptrCast(self.vtable)).LoadUI(@as(*const IUIFramework, @ptrCast(self)), instance, resourceName);
            }
            // NOTE: method is namespaced with interface name to avoid conflicts for now
            pub inline fn IUIFramework_GetView(self: *const T, viewId: u32, riid: ?*const Guid, ppv: ?*?*anyopaque) HRESULT {
                return @as(*const IUIFramework.VTable, @ptrCast(self.vtable)).GetView(@as(*const IUIFramework, @ptrCast(self)), viewId, riid, ppv);
            }
            // NOTE: method is namespaced with interface name to avoid conflicts for now
            pub inline fn IUIFramework_GetUICommandProperty(self: *const T, commandId: u32, key: ?*const PROPERTYKEY, value: ?*PROPVARIANT) HRESULT {
                return @as(*const IUIFramework.VTable, @ptrCast(self.vtable)).GetUICommandProperty(@as(*const IUIFramework, @ptrCast(self)), commandId, key, value);
            }
            // NOTE: method is namespaced with interface name to avoid conflicts for now
            pub inline fn IUIFramework_SetUICommandProperty(self: *const T, commandId: u32, key: ?*const PROPERTYKEY, value: ?*const PROPVARIANT) HRESULT {
                return @as(*const IUIFramework.VTable, @ptrCast(self.vtable)).SetUICommandProperty(@as(*const IUIFramework, @ptrCast(self)), commandId, key, value);
            }
            // NOTE: method is namespaced with interface name to avoid conflicts for now
            pub inline fn IUIFramework_InvalidateUICommand(self: *const T, commandId: u32, flags: UI_INVALIDATIONS, key: ?*const PROPERTYKEY) HRESULT {
                return @as(*const IUIFramework.VTable, @ptrCast(self.vtable)).InvalidateUICommand(@as(*const IUIFramework, @ptrCast(self)), commandId, flags, key);
            }
            // NOTE: method is namespaced with interface name to avoid conflicts for now
            pub inline fn IUIFramework_FlushPendingInvalidations(self: *const T) HRESULT {
                return @as(*const IUIFramework.VTable, @ptrCast(self.vtable)).FlushPendingInvalidations(@as(*const IUIFramework, @ptrCast(self)));
            }
            // NOTE: method is namespaced with interface name to avoid conflicts for now
            pub inline fn IUIFramework_SetModes(self: *const T, iModes: i32) HRESULT {
                return @as(*const IUIFramework.VTable, @ptrCast(self.vtable)).SetModes(@as(*const IUIFramework, @ptrCast(self)), iModes);
            }
        };
    }
    pub usingnamespace MethodMixin(@This());
};

pub const UI_EVENTPARAMS_COMMAND = extern struct {
    CommandID: u32,
    CommandName: ?[*:0]const u16,
    ParentCommandID: u32,
    ParentCommandName: ?[*:0]const u16,
    SelectionIndex: u32,
    Location: UI_EVENTLOCATION,
};

pub const UI_EVENTPARAMS = extern struct {
    EventType: UI_EVENTTYPE,
    Anonymous: extern union {
        Modes: i32,
        Params: UI_EVENTPARAMS_COMMAND,
    },
};

// TODO: this type is limited to platform 'windows8.0'
const IID_IUIEventLogger_Value = Guid.initString("ec3e1034-dbf4-41a1-95d5-03e0f1026e05");
pub const IID_IUIEventLogger = &IID_IUIEventLogger_Value;
pub const IUIEventLogger = extern struct {
    pub const VTable = extern struct {
        base: IUnknown.VTable,
        OnUIEvent: switch (@import("builtin").zig_backend) {
            .stage1 => fn (
                self: *const IUIEventLogger,
                pEventParams: ?*UI_EVENTPARAMS,
            ) callconv(@import("std").os.windows.WINAPI) void,
            else => *const fn (
                self: *const IUIEventLogger,
                pEventParams: ?*UI_EVENTPARAMS,
            ) callconv(@import("std").os.windows.WINAPI) void,
        },
    };
    vtable: *const VTable,
    pub fn MethodMixin(comptime T: type) type {
        return struct {
            pub usingnamespace IUnknown.MethodMixin(T);
            // NOTE: method is namespaced with interface name to avoid conflicts for now
            pub inline fn IUIEventLogger_OnUIEvent(self: *const T, pEventParams: ?*UI_EVENTPARAMS) void {
                return @as(*const IUIEventLogger.VTable, @ptrCast(self.vtable)).OnUIEvent(@as(*const IUIEventLogger, @ptrCast(self)), pEventParams);
            }
        };
    }
    pub usingnamespace MethodMixin(@This());
};

// TODO: this type is limited to platform 'windows8.0'
const IID_IUIEventingManager_Value = Guid.initString("3be6ea7f-9a9b-4198-9368-9b0f923bd534");
pub const IID_IUIEventingManager = &IID_IUIEventingManager_Value;
pub const IUIEventingManager = extern struct {
    pub const VTable = extern struct {
        base: IUnknown.VTable,
        SetEventLogger: switch (@import("builtin").zig_backend) {
            .stage1 => fn (
                self: *const IUIEventingManager,
                eventLogger: ?*IUIEventLogger,
            ) callconv(@import("std").os.windows.WINAPI) HRESULT,
            else => *const fn (
                self: *const IUIEventingManager,
                eventLogger: ?*IUIEventLogger,
            ) callconv(@import("std").os.windows.WINAPI) HRESULT,
        },
    };
    vtable: *const VTable,
    pub fn MethodMixin(comptime T: type) type {
        return struct {
            pub usingnamespace IUnknown.MethodMixin(T);
            // NOTE: method is namespaced with interface name to avoid conflicts for now
            pub inline fn IUIEventingManager_SetEventLogger(self: *const T, eventLogger: ?*IUIEventLogger) HRESULT {
                return @as(*const IUIEventingManager.VTable, @ptrCast(self.vtable)).SetEventLogger(@as(*const IUIEventingManager, @ptrCast(self)), eventLogger);
            }
        };
    }
    pub usingnamespace MethodMixin(@This());
};

// TODO: this type is limited to platform 'windows6.1'
const IID_IUIContextualUI_Value = Guid.initString("eea11f37-7c46-437c-8e55-b52122b29293");
pub const IID_IUIContextualUI = &IID_IUIContextualUI_Value;
pub const IUIContextualUI = extern struct {
    pub const VTable = extern struct {
        base: IUnknown.VTable,
        ShowAtLocation: switch (@import("builtin").zig_backend) {
            .stage1 => fn (
                self: *const IUIContextualUI,
                x: i32,
                y: i32,
            ) callconv(@import("std").os.windows.WINAPI) HRESULT,
            else => *const fn (
                self: *const IUIContextualUI,
                x: i32,
                y: i32,
            ) callconv(@import("std").os.windows.WINAPI) HRESULT,
        },
    };
    vtable: *const VTable,
    pub fn MethodMixin(comptime T: type) type {
        return struct {
            pub usingnamespace IUnknown.MethodMixin(T);
            // NOTE: method is namespaced with interface name to avoid conflicts for now
            pub inline fn IUIContextualUI_ShowAtLocation(self: *const T, x: i32, y: i32) HRESULT {
                return @as(*const IUIContextualUI.VTable, @ptrCast(self.vtable)).ShowAtLocation(@as(*const IUIContextualUI, @ptrCast(self)), x, y);
            }
        };
    }
    pub usingnamespace MethodMixin(@This());
};

// TODO: this type is limited to platform 'windows6.1'
const IID_IUICollection_Value = Guid.initString("df4f45bf-6f9d-4dd7-9d68-d8f9cd18c4db");
pub const IID_IUICollection = &IID_IUICollection_Value;
pub const IUICollection = extern struct {
    pub const VTable = extern struct {
        base: IUnknown.VTable,
        GetCount: switch (@import("builtin").zig_backend) {
            .stage1 => fn (
                self: *const IUICollection,
                count: ?*u32,
            ) callconv(@import("std").os.windows.WINAPI) HRESULT,
            else => *const fn (
                self: *const IUICollection,
                count: ?*u32,
            ) callconv(@import("std").os.windows.WINAPI) HRESULT,
        },
        GetItem: switch (@import("builtin").zig_backend) {
            .stage1 => fn (
                self: *const IUICollection,
                index: u32,
                item: ?*?*IUnknown,
            ) callconv(@import("std").os.windows.WINAPI) HRESULT,
            else => *const fn (
                self: *const IUICollection,
                index: u32,
                item: ?*?*IUnknown,
            ) callconv(@import("std").os.windows.WINAPI) HRESULT,
        },
        Add: switch (@import("builtin").zig_backend) {
            .stage1 => fn (
                self: *const IUICollection,
                item: ?*IUnknown,
            ) callconv(@import("std").os.windows.WINAPI) HRESULT,
            else => *const fn (
                self: *const IUICollection,
                item: ?*IUnknown,
            ) callconv(@import("std").os.windows.WINAPI) HRESULT,
        },
        Insert: switch (@import("builtin").zig_backend) {
            .stage1 => fn (
                self: *const IUICollection,
                index: u32,
                item: ?*IUnknown,
            ) callconv(@import("std").os.windows.WINAPI) HRESULT,
            else => *const fn (
                self: *const IUICollection,
                index: u32,
                item: ?*IUnknown,
            ) callconv(@import("std").os.windows.WINAPI) HRESULT,
        },
        RemoveAt: switch (@import("builtin").zig_backend) {
            .stage1 => fn (
                self: *const IUICollection,
                index: u32,
            ) callconv(@import("std").os.windows.WINAPI) HRESULT,
            else => *const fn (
                self: *const IUICollection,
                index: u32,
            ) callconv(@import("std").os.windows.WINAPI) HRESULT,
        },
        Replace: switch (@import("builtin").zig_backend) {
            .stage1 => fn (
                self: *const IUICollection,
                indexReplaced: u32,
                itemReplaceWith: ?*IUnknown,
            ) callconv(@import("std").os.windows.WINAPI) HRESULT,
            else => *const fn (
                self: *const IUICollection,
                indexReplaced: u32,
                itemReplaceWith: ?*IUnknown,
            ) callconv(@import("std").os.windows.WINAPI) HRESULT,
        },
        Clear: switch (@import("builtin").zig_backend) {
            .stage1 => fn (
                self: *const IUICollection,
            ) callconv(@import("std").os.windows.WINAPI) HRESULT,
            else => *const fn (
                self: *const IUICollection,
            ) callconv(@import("std").os.windows.WINAPI) HRESULT,
        },
    };
    vtable: *const VTable,
    pub fn MethodMixin(comptime T: type) type {
        return struct {
            pub usingnamespace IUnknown.MethodMixin(T);
            // NOTE: method is namespaced with interface name to avoid conflicts for now
            pub inline fn IUICollection_GetCount(self: *const T, count: ?*u32) HRESULT {
                return @as(*const IUICollection.VTable, @ptrCast(self.vtable)).GetCount(@as(*const IUICollection, @ptrCast(self)), count);
            }
            // NOTE: method is namespaced with interface name to avoid conflicts for now
            pub inline fn IUICollection_GetItem(self: *const T, index: u32, item: ?*?*IUnknown) HRESULT {
                return @as(*const IUICollection.VTable, @ptrCast(self.vtable)).GetItem(@as(*const IUICollection, @ptrCast(self)), index, item);
            }
            // NOTE: method is namespaced with interface name to avoid conflicts for now
            pub inline fn IUICollection_Add(self: *const T, item: ?*IUnknown) HRESULT {
                return @as(*const IUICollection.VTable, @ptrCast(self.vtable)).Add(@as(*const IUICollection, @ptrCast(self)), item);
            }
            // NOTE: method is namespaced with interface name to avoid conflicts for now
            pub inline fn IUICollection_Insert(self: *const T, index: u32, item: ?*IUnknown) HRESULT {
                return @as(*const IUICollection.VTable, @ptrCast(self.vtable)).Insert(@as(*const IUICollection, @ptrCast(self)), index, item);
            }
            // NOTE: method is namespaced with interface name to avoid conflicts for now
            pub inline fn IUICollection_RemoveAt(self: *const T, index: u32) HRESULT {
                return @as(*const IUICollection.VTable, @ptrCast(self.vtable)).RemoveAt(@as(*const IUICollection, @ptrCast(self)), index);
            }
            // NOTE: method is namespaced with interface name to avoid conflicts for now
            pub inline fn IUICollection_Replace(self: *const T, indexReplaced: u32, itemReplaceWith: ?*IUnknown) HRESULT {
                return @as(*const IUICollection.VTable, @ptrCast(self.vtable)).Replace(@as(*const IUICollection, @ptrCast(self)), indexReplaced, itemReplaceWith);
            }
            // NOTE: method is namespaced with interface name to avoid conflicts for now
            pub inline fn IUICollection_Clear(self: *const T) HRESULT {
                return @as(*const IUICollection.VTable, @ptrCast(self.vtable)).Clear(@as(*const IUICollection, @ptrCast(self)));
            }
        };
    }
    pub usingnamespace MethodMixin(@This());
};

pub const UI_COLLECTIONCHANGE = enum(i32) {
    INSERT = 0,
    REMOVE = 1,
    REPLACE = 2,
    RESET = 3,
};
pub const UI_COLLECTIONCHANGE_INSERT = UI_COLLECTIONCHANGE.INSERT;
pub const UI_COLLECTIONCHANGE_REMOVE = UI_COLLECTIONCHANGE.REMOVE;
pub const UI_COLLECTIONCHANGE_REPLACE = UI_COLLECTIONCHANGE.REPLACE;
pub const UI_COLLECTIONCHANGE_RESET = UI_COLLECTIONCHANGE.RESET;

// TODO: this type is limited to platform 'windows6.1'
const IID_IUICollectionChangedEvent_Value = Guid.initString("6502ae91-a14d-44b5-bbd0-62aacc581d52");
pub const IID_IUICollectionChangedEvent = &IID_IUICollectionChangedEvent_Value;
pub const IUICollectionChangedEvent = extern struct {
    pub const VTable = extern struct {
        base: IUnknown.VTable,
        OnChanged: switch (@import("builtin").zig_backend) {
            .stage1 => fn (
                self: *const IUICollectionChangedEvent,
                action: UI_COLLECTIONCHANGE,
                oldIndex: u32,
                oldItem: ?*IUnknown,
                newIndex: u32,
                newItem: ?*IUnknown,
            ) callconv(@import("std").os.windows.WINAPI) HRESULT,
            else => *const fn (
                self: *const IUICollectionChangedEvent,
                action: UI_COLLECTIONCHANGE,
                oldIndex: u32,
                oldItem: ?*IUnknown,
                newIndex: u32,
                newItem: ?*IUnknown,
            ) callconv(@import("std").os.windows.WINAPI) HRESULT,
        },
    };
    vtable: *const VTable,
    pub fn MethodMixin(comptime T: type) type {
        return struct {
            pub usingnamespace IUnknown.MethodMixin(T);
            // NOTE: method is namespaced with interface name to avoid conflicts for now
            pub inline fn IUICollectionChangedEvent_OnChanged(self: *const T, action: UI_COLLECTIONCHANGE, oldIndex: u32, oldItem: ?*IUnknown, newIndex: u32, newItem: ?*IUnknown) HRESULT {
                return @as(*const IUICollectionChangedEvent.VTable, @ptrCast(self.vtable)).OnChanged(@as(*const IUICollectionChangedEvent, @ptrCast(self)), action, oldIndex, oldItem, newIndex, newItem);
            }
        };
    }
    pub usingnamespace MethodMixin(@This());
};

pub const UI_EXECUTIONVERB = enum(i32) {
    EXECUTE = 0,
    PREVIEW = 1,
    CANCELPREVIEW = 2,
};
pub const UI_EXECUTIONVERB_EXECUTE = UI_EXECUTIONVERB.EXECUTE;
pub const UI_EXECUTIONVERB_PREVIEW = UI_EXECUTIONVERB.PREVIEW;
pub const UI_EXECUTIONVERB_CANCELPREVIEW = UI_EXECUTIONVERB.CANCELPREVIEW;

// TODO: this type is limited to platform 'windows6.1'
const IID_IUICommandHandler_Value = Guid.initString("75ae0a2d-dc03-4c9f-8883-069660d0beb6");
pub const IID_IUICommandHandler = &IID_IUICommandHandler_Value;
pub const IUICommandHandler = extern struct {
    pub const VTable = extern struct {
        base: IUnknown.VTable,
        Execute: switch (@import("builtin").zig_backend) {
            .stage1 => fn (
                self: *const IUICommandHandler,
                commandId: u32,
                verb: UI_EXECUTIONVERB,
                key: ?*const PROPERTYKEY,
                currentValue: ?*const PROPVARIANT,
                commandExecutionProperties: ?*IUISimplePropertySet,
            ) callconv(@import("std").os.windows.WINAPI) HRESULT,
            else => *const fn (
                self: *const IUICommandHandler,
                commandId: u32,
                verb: UI_EXECUTIONVERB,
                key: ?*const PROPERTYKEY,
                currentValue: ?*const PROPVARIANT,
                commandExecutionProperties: ?*IUISimplePropertySet,
            ) callconv(@import("std").os.windows.WINAPI) HRESULT,
        },
        UpdateProperty: switch (@import("builtin").zig_backend) {
            .stage1 => fn (
                self: *const IUICommandHandler,
                commandId: u32,
                key: ?*const PROPERTYKEY,
                currentValue: ?*const PROPVARIANT,
                newValue: ?*PROPVARIANT,
            ) callconv(@import("std").os.windows.WINAPI) HRESULT,
            else => *const fn (
                self: *const IUICommandHandler,
                commandId: u32,
                key: ?*const PROPERTYKEY,
                currentValue: ?*const PROPVARIANT,
                newValue: ?*PROPVARIANT,
            ) callconv(@import("std").os.windows.WINAPI) HRESULT,
        },
    };
    vtable: *const VTable,
    pub fn MethodMixin(comptime T: type) type {
        return struct {
            pub usingnamespace IUnknown.MethodMixin(T);
            // NOTE: method is namespaced with interface name to avoid conflicts for now
            pub inline fn IUICommandHandler_Execute(self: *const T, commandId: u32, verb: UI_EXECUTIONVERB, key: ?*const PROPERTYKEY, currentValue: ?*const PROPVARIANT, commandExecutionProperties: ?*IUISimplePropertySet) HRESULT {
                return @as(*const IUICommandHandler.VTable, @ptrCast(self.vtable)).Execute(@as(*const IUICommandHandler, @ptrCast(self)), commandId, verb, key, currentValue, commandExecutionProperties);
            }
            // NOTE: method is namespaced with interface name to avoid conflicts for now
            pub inline fn IUICommandHandler_UpdateProperty(self: *const T, commandId: u32, key: ?*const PROPERTYKEY, currentValue: ?*const PROPVARIANT, newValue: ?*PROPVARIANT) HRESULT {
                return @as(*const IUICommandHandler.VTable, @ptrCast(self.vtable)).UpdateProperty(@as(*const IUICommandHandler, @ptrCast(self)), commandId, key, currentValue, newValue);
            }
        };
    }
    pub usingnamespace MethodMixin(@This());
};

pub const UI_COMMANDTYPE = enum(i32) {
    UNKNOWN = 0,
    GROUP = 1,
    ACTION = 2,
    ANCHOR = 3,
    CONTEXT = 4,
    COLLECTION = 5,
    COMMANDCOLLECTION = 6,
    DECIMAL = 7,
    BOOLEAN = 8,
    FONT = 9,
    RECENTITEMS = 10,
    COLORANCHOR = 11,
    COLORCOLLECTION = 12,
};
pub const UI_COMMANDTYPE_UNKNOWN = UI_COMMANDTYPE.UNKNOWN;
pub const UI_COMMANDTYPE_GROUP = UI_COMMANDTYPE.GROUP;
pub const UI_COMMANDTYPE_ACTION = UI_COMMANDTYPE.ACTION;
pub const UI_COMMANDTYPE_ANCHOR = UI_COMMANDTYPE.ANCHOR;
pub const UI_COMMANDTYPE_CONTEXT = UI_COMMANDTYPE.CONTEXT;
pub const UI_COMMANDTYPE_COLLECTION = UI_COMMANDTYPE.COLLECTION;
pub const UI_COMMANDTYPE_COMMANDCOLLECTION = UI_COMMANDTYPE.COMMANDCOLLECTION;
pub const UI_COMMANDTYPE_DECIMAL = UI_COMMANDTYPE.DECIMAL;
pub const UI_COMMANDTYPE_BOOLEAN = UI_COMMANDTYPE.BOOLEAN;
pub const UI_COMMANDTYPE_FONT = UI_COMMANDTYPE.FONT;
pub const UI_COMMANDTYPE_RECENTITEMS = UI_COMMANDTYPE.RECENTITEMS;
pub const UI_COMMANDTYPE_COLORANCHOR = UI_COMMANDTYPE.COLORANCHOR;
pub const UI_COMMANDTYPE_COLORCOLLECTION = UI_COMMANDTYPE.COLORCOLLECTION;

pub const UI_VIEWTYPE = enum(i32) {
    N = 1,
};
pub const UI_VIEWTYPE_RIBBON = UI_VIEWTYPE.N;

pub const UI_VIEWVERB = enum(i32) {
    CREATE = 0,
    DESTROY = 1,
    SIZE = 2,
    ERROR = 3,
};
pub const UI_VIEWVERB_CREATE = UI_VIEWVERB.CREATE;
pub const UI_VIEWVERB_DESTROY = UI_VIEWVERB.DESTROY;
pub const UI_VIEWVERB_SIZE = UI_VIEWVERB.SIZE;
pub const UI_VIEWVERB_ERROR = UI_VIEWVERB.ERROR;

// TODO: this type is limited to platform 'windows6.1'
const IID_IUIApplication_Value = Guid.initString("d428903c-729a-491d-910d-682a08ff2522");
pub const IID_IUIApplication = &IID_IUIApplication_Value;
pub const IUIApplication = extern struct {
    pub const VTable = extern struct {
        base: IUnknown.VTable,
        OnViewChanged: switch (@import("builtin").zig_backend) {
            .stage1 => fn (
                self: *const IUIApplication,
                viewId: u32,
                typeID: UI_VIEWTYPE,
                view: ?*IUnknown,
                verb: UI_VIEWVERB,
                uReasonCode: i32,
            ) callconv(@import("std").os.windows.WINAPI) HRESULT,
            else => *const fn (
                self: *const IUIApplication,
                viewId: u32,
                typeID: UI_VIEWTYPE,
                view: ?*IUnknown,
                verb: UI_VIEWVERB,
                uReasonCode: i32,
            ) callconv(@import("std").os.windows.WINAPI) HRESULT,
        },
        OnCreateUICommand: switch (@import("builtin").zig_backend) {
            .stage1 => fn (
                self: *const IUIApplication,
                commandId: u32,
                typeID: UI_COMMANDTYPE,
                commandHandler: ?*?*IUICommandHandler,
            ) callconv(@import("std").os.windows.WINAPI) HRESULT,
            else => *const fn (
                self: *const IUIApplication,
                commandId: u32,
                typeID: UI_COMMANDTYPE,
                commandHandler: ?*?*IUICommandHandler,
            ) callconv(@import("std").os.windows.WINAPI) HRESULT,
        },
        OnDestroyUICommand: switch (@import("builtin").zig_backend) {
            .stage1 => fn (
                self: *const IUIApplication,
                commandId: u32,
                typeID: UI_COMMANDTYPE,
                commandHandler: ?*IUICommandHandler,
            ) callconv(@import("std").os.windows.WINAPI) HRESULT,
            else => *const fn (
                self: *const IUIApplication,
                commandId: u32,
                typeID: UI_COMMANDTYPE,
                commandHandler: ?*IUICommandHandler,
            ) callconv(@import("std").os.windows.WINAPI) HRESULT,
        },
    };
    vtable: *const VTable,
    pub fn MethodMixin(comptime T: type) type {
        return struct {
            pub usingnamespace IUnknown.MethodMixin(T);
            // NOTE: method is namespaced with interface name to avoid conflicts for now
            pub inline fn IUIApplication_OnViewChanged(self: *const T, viewId: u32, typeID: UI_VIEWTYPE, view: ?*IUnknown, verb: UI_VIEWVERB, uReasonCode: i32) HRESULT {
                return @as(*const IUIApplication.VTable, @ptrCast(self.vtable)).OnViewChanged(@as(*const IUIApplication, @ptrCast(self)), viewId, typeID, view, verb, uReasonCode);
            }
            // NOTE: method is namespaced with interface name to avoid conflicts for now
            pub inline fn IUIApplication_OnCreateUICommand(self: *const T, commandId: u32, typeID: UI_COMMANDTYPE, commandHandler: ?*?*IUICommandHandler) HRESULT {
                return @as(*const IUIApplication.VTable, @ptrCast(self.vtable)).OnCreateUICommand(@as(*const IUIApplication, @ptrCast(self)), commandId, typeID, commandHandler);
            }
            // NOTE: method is namespaced with interface name to avoid conflicts for now
            pub inline fn IUIApplication_OnDestroyUICommand(self: *const T, commandId: u32, typeID: UI_COMMANDTYPE, commandHandler: ?*IUICommandHandler) HRESULT {
                return @as(*const IUIApplication.VTable, @ptrCast(self.vtable)).OnDestroyUICommand(@as(*const IUIApplication, @ptrCast(self)), commandId, typeID, commandHandler);
            }
        };
    }
    pub usingnamespace MethodMixin(@This());
};

// TODO: this type is limited to platform 'windows6.1'
const IID_IUIImage_Value = Guid.initString("23c8c838-4de6-436b-ab01-5554bb7c30dd");
pub const IID_IUIImage = &IID_IUIImage_Value;
pub const IUIImage = extern struct {
    pub const VTable = extern struct {
        base: IUnknown.VTable,
        GetBitmap: switch (@import("builtin").zig_backend) {
            .stage1 => fn (
                self: *const IUIImage,
                bitmap: ?*?HBITMAP,
            ) callconv(@import("std").os.windows.WINAPI) HRESULT,
            else => *const fn (
                self: *const IUIImage,
                bitmap: ?*?HBITMAP,
            ) callconv(@import("std").os.windows.WINAPI) HRESULT,
        },
    };
    vtable: *const VTable,
    pub fn MethodMixin(comptime T: type) type {
        return struct {
            pub usingnamespace IUnknown.MethodMixin(T);
            // NOTE: method is namespaced with interface name to avoid conflicts for now
            pub inline fn IUIImage_GetBitmap(self: *const T, bitmap: ?*?HBITMAP) HRESULT {
                return @as(*const IUIImage.VTable, @ptrCast(self.vtable)).GetBitmap(@as(*const IUIImage, @ptrCast(self)), bitmap);
            }
        };
    }
    pub usingnamespace MethodMixin(@This());
};

pub const UI_OWNERSHIP = enum(i32) {
    TRANSFER = 0,
    COPY = 1,
};
pub const UI_OWNERSHIP_TRANSFER = UI_OWNERSHIP.TRANSFER;
pub const UI_OWNERSHIP_COPY = UI_OWNERSHIP.COPY;

// TODO: this type is limited to platform 'windows6.1'
const IID_IUIImageFromBitmap_Value = Guid.initString("18aba7f3-4c1c-4ba2-bf6c-f5c3326fa816");
pub const IID_IUIImageFromBitmap = &IID_IUIImageFromBitmap_Value;
pub const IUIImageFromBitmap = extern struct {
    pub const VTable = extern struct {
        base: IUnknown.VTable,
        CreateImage: switch (@import("builtin").zig_backend) {
            .stage1 => fn (
                self: *const IUIImageFromBitmap,
                bitmap: ?HBITMAP,
                options: UI_OWNERSHIP,
                image: ?*?*IUIImage,
            ) callconv(@import("std").os.windows.WINAPI) HRESULT,
            else => *const fn (
                self: *const IUIImageFromBitmap,
                bitmap: ?HBITMAP,
                options: UI_OWNERSHIP,
                image: ?*?*IUIImage,
            ) callconv(@import("std").os.windows.WINAPI) HRESULT,
        },
    };
    vtable: *const VTable,
    pub fn MethodMixin(comptime T: type) type {
        return struct {
            pub usingnamespace IUnknown.MethodMixin(T);
            // NOTE: method is namespaced with interface name to avoid conflicts for now
            pub inline fn IUIImageFromBitmap_CreateImage(self: *const T, bitmap: ?HBITMAP, options: UI_OWNERSHIP, image: ?*?*IUIImage) HRESULT {
                return @as(*const IUIImageFromBitmap.VTable, @ptrCast(self.vtable)).CreateImage(@as(*const IUIImageFromBitmap, @ptrCast(self)), bitmap, options, image);
            }
        };
    }
    pub usingnamespace MethodMixin(@This());
};

//--------------------------------------------------------------------------------
// Section: Functions (0)
//--------------------------------------------------------------------------------

//--------------------------------------------------------------------------------
// Section: Unicode Aliases (0)
//--------------------------------------------------------------------------------
const thismodule = @This();
pub usingnamespace switch (@import("../zig.zig").unicode_mode) {
    .ansi => struct {},
    .wide => struct {},
    .unspecified => if (@import("builtin").is_test) struct {} else struct {},
};
//--------------------------------------------------------------------------------
// Section: Imports (10)
//--------------------------------------------------------------------------------
const Guid = @import("../zig.zig").Guid;
const HBITMAP = @import("../graphics/gdi.zig").HBITMAP;
const HINSTANCE = @import("../foundation.zig").HINSTANCE;
const HRESULT = @import("../foundation.zig").HRESULT;
const HWND = @import("../foundation.zig").HWND;
const IStream = @import("../system/com.zig").IStream;
const IUnknown = @import("../system/com.zig").IUnknown;
const PROPERTYKEY = @import("../ui/shell/properties_system.zig").PROPERTYKEY;
const PROPVARIANT = @import("../system/com/structured_storage.zig").PROPVARIANT;
const PWSTR = @import("../foundation.zig").PWSTR;

test {
    @setEvalBranchQuota(comptime @import("std").meta.declarations(@This()).len * 3);

    // reference all the pub declarations
    if (!@import("builtin").is_test) return;
    inline for (comptime @import("std").meta.declarations(@This())) |decl| {
        if (decl.is_pub) {
            _ = @field(@This(), decl.name);
        }
    }
}
