1package cef
2
3import (
4 purecef "github.com/bnema/purego-cef/cef"
5)
6
7type stubMenuModel struct{}
8
9func (stubMenuModel) IsSubMenu() bool { return false }
10func (stubMenuModel) Clear() int32 { panic("unexpected call") }
11func (stubMenuModel) GetCount() int { return 1 }
12func (stubMenuModel) AddSeparator() int32 { panic("unexpected call") }
13func (stubMenuModel) AddItem(_ int32, _ string) int32 { panic("unexpected call") }
14func (stubMenuModel) AddCheckItem(_ int32, _ string) int32 {
15 panic("unexpected call")
16}
17func (stubMenuModel) AddRadioItem(_ int32, _ string, _ int32) int32 {
18 panic("unexpected call")
19}
20func (stubMenuModel) AddSubMenu(_ int32, _ string) purecef.MenuModel {
21 panic("unexpected call")
22}
23func (stubMenuModel) InsertSeparatorAt(_ int) int32 { panic("unexpected call") }
24func (stubMenuModel) InsertItemAt(_ int, _ int32, _ string) int32 {
25 panic("unexpected call")
26}
27func (stubMenuModel) InsertCheckItemAt(_ int, _ int32, _ string) int32 {
28 panic("unexpected call")
29}
30func (stubMenuModel) InsertRadioItemAt(_ int, _ int32, _ string, _ int32) int32 {
31 panic("unexpected call")
32}
33func (stubMenuModel) InsertSubMenuAt(_ int, _ int32, _ string) purecef.MenuModel {
34 panic("unexpected call")
35}
36func (stubMenuModel) Remove(_ int32) int32 { panic("unexpected call") }
37func (stubMenuModel) RemoveAt(_ int) int32 { panic("unexpected call") }
38func (stubMenuModel) GetIndexOf(_ int32) int32 { panic("unexpected call") }
39func (stubMenuModel) GetCommandIDAt(_ int) int32 { return 101 }
40func (stubMenuModel) SetCommandIDAt(_ int, _ int32) int32 { panic("unexpected call") }
41func (stubMenuModel) GetLabel(_ int32) string { panic("unexpected call") }
42func (stubMenuModel) GetLabelAt(_ int) string { return "Copy" }
43func (stubMenuModel) SetLabel(_ int32, _ string) int32 { panic("unexpected call") }
44func (stubMenuModel) SetLabelAt(_ int, _ string) int32 { panic("unexpected call") }
45func (stubMenuModel) GetType(_ int32) purecef.MenuItemType { panic("unexpected call") }
46func (stubMenuModel) GetTypeAt(_ int) purecef.MenuItemType {
47 return purecef.MenuItemTypeMenuitemtypeCommand
48}
49func (stubMenuModel) GetGroupID(_ int32) int32 { panic("unexpected call") }
50func (stubMenuModel) GetGroupIDAt(_ int) int32 { panic("unexpected call") }
51func (stubMenuModel) SetGroupID(_, _ int32) int32 { panic("unexpected call") }
52func (stubMenuModel) SetGroupIDAt(_ int, _ int32) int32 { panic("unexpected call") }
53func (stubMenuModel) GetSubMenu(_ int32) purecef.MenuModel { panic("unexpected call") }
54func (stubMenuModel) GetSubMenuAt(_ int) purecef.MenuModel { panic("unexpected call") }
55func (stubMenuModel) IsVisible(_ int32) bool { panic("unexpected call") }
56func (stubMenuModel) IsVisibleAt(_ int) bool { panic("unexpected call") }
57func (stubMenuModel) SetVisible(_, _ int32) int32 { panic("unexpected call") }
58func (stubMenuModel) SetVisibleAt(_ int, _ int32) int32 { panic("unexpected call") }
59func (stubMenuModel) IsEnabled(_ int32) bool { panic("unexpected call") }
60func (stubMenuModel) IsEnabledAt(_ int) bool { panic("unexpected call") }
61func (stubMenuModel) SetEnabled(_, _ int32) int32 { panic("unexpected call") }
62func (stubMenuModel) SetEnabledAt(_ int, _ int32) int32 { panic("unexpected call") }
63func (stubMenuModel) IsChecked(_ int32) bool { panic("unexpected call") }
64func (stubMenuModel) IsCheckedAt(_ int) bool { panic("unexpected call") }
65func (stubMenuModel) SetChecked(_, _ int32) int32 { panic("unexpected call") }
66func (stubMenuModel) SetCheckedAt(_ int, _ int32) int32 { panic("unexpected call") }
67func (stubMenuModel) HasAccelerator(_ int32) bool { panic("unexpected call") }
68func (stubMenuModel) HasAcceleratorAt(_ int) bool { panic("unexpected call") }
69func (stubMenuModel) SetAccelerator(_, _, _, _, _ int32) int32 {
70 panic("unexpected call")
71}
72func (stubMenuModel) SetAcceleratorAt(_ int, _, _, _, _ int32) int32 {
73 panic("unexpected call")
74}
75func (stubMenuModel) RemoveAccelerator(_ int32) int32 { panic("unexpected call") }
76func (stubMenuModel) RemoveAcceleratorAt(_ int) int32 { panic("unexpected call") }
77func (stubMenuModel) GetAccelerator(_ int32, _, _, _, _ *int32) int32 {
78 panic("unexpected call")
79}
80func (stubMenuModel) GetAcceleratorAt(_ int, _, _, _, _ *int32) int32 {
81 panic("unexpected call")
82}
83func (stubMenuModel) SetColor(_ int32, _ purecef.MenuColorType, _ uintptr) int32 {
84 panic("unexpected call")
85}
86func (stubMenuModel) SetColorAt(_ int32, _ purecef.MenuColorType, _ uintptr) int32 {
87 panic("unexpected call")
88}
89func (stubMenuModel) GetColor(_ int32, _ purecef.MenuColorType, _ uintptr) int32 {
90 panic("unexpected call")
91}
92func (stubMenuModel) GetColorAt(_ int32, _ purecef.MenuColorType, _ uintptr) int32 {
93 panic("unexpected call")
94}
95func (stubMenuModel) SetFontList(_ int32, _ string) int32 { panic("unexpected call") }
96func (stubMenuModel) SetFontListAt(_ int32, _ string) int32 { panic("unexpected call") }
97
98// zoomCompensationStub supplies the OSR page-zoom compensation contract owned by
99// the render bridge, so tests can exercise zoom conversion, reapplication, and
100// diagnostics without a live GTK/CEF view.
101type zoomCompensationStub struct {
102 compensation float64
103}
104
105func (s zoomCompensationStub) PageZoomCompensation() float64 {
106 return s.compensation
107}