mirror of
https://gitee.com/energye/energy.git
synced 2024-11-30 02:37:46 +08:00
CEF 117
This commit is contained in:
parent
b6cda48a9c
commit
fae603dd30
@ -215,6 +215,8 @@ type WindowComponentOnGetParentWindow func(sender lcl.IObject, window *ICefWindo
|
||||
type WindowComponentOnGetInitialBounds func(sender lcl.IObject, window *ICefWindow, aResult *TCefRect)
|
||||
type WindowComponentOnGetInitialShowState func(sender lcl.IObject, window *ICefWindow, aResult *consts.TCefShowState)
|
||||
type WindowComponentOnIsFrameless func(sender lcl.IObject, window *ICefWindow, aResult *bool)
|
||||
type WindowComponentOnWithStandardWindowButtons func(sender lcl.IObject, window *ICefWindow, aResult *bool)
|
||||
type WindowComponentOnGetTitleBarHeight func(sender lcl.IObject, window *ICefWindow, titleBarHeight float32, aResult *bool)
|
||||
type WindowComponentOnCanResize func(sender lcl.IObject, window *ICefWindow, aResult *bool)
|
||||
type WindowComponentOnCanMaximize func(sender lcl.IObject, window *ICefWindow, aResult *bool)
|
||||
type WindowComponentOnCanMinimize func(sender lcl.IObject, window *ICefWindow, aResult *bool)
|
||||
|
@ -1189,6 +1189,8 @@ const (
|
||||
CEFWindowComponent_SetOnGetInitialBounds
|
||||
CEFWindowComponent_SetOnGetInitialShowState
|
||||
CEFWindowComponent_SetOnIsFrameless
|
||||
CEFWindowComponent_SetOnWithStandardWindowButtons
|
||||
CEFWindowComponent_SetOnGetTitlebarHeight
|
||||
CEFWindowComponent_SetOnCanResize
|
||||
CEFWindowComponent_SetOnCanMaximize
|
||||
CEFWindowComponent_SetOnCanMinimize
|
||||
|
@ -1189,6 +1189,8 @@ func init() {
|
||||
dllimports.NewEnergyImport("CEFWindowComponent_SetOnGetInitialBounds", 0),
|
||||
dllimports.NewEnergyImport("CEFWindowComponent_SetOnGetInitialShowState", 0),
|
||||
dllimports.NewEnergyImport("CEFWindowComponent_SetOnIsFrameless", 0),
|
||||
dllimports.NewEnergyImport("CEFWindowComponent_SetOnWithStandardWindowButtons", 0),
|
||||
dllimports.NewEnergyImport("CEFWindowComponent_SetOnGetTitlebarHeight", 0),
|
||||
dllimports.NewEnergyImport("CEFWindowComponent_SetOnCanResize", 0),
|
||||
dllimports.NewEnergyImport("CEFWindowComponent_SetOnCanMaximize", 0),
|
||||
dllimports.NewEnergyImport("CEFWindowComponent_SetOnCanMinimize", 0),
|
||||
|
@ -571,6 +571,14 @@ func (m *TCEFWindowComponent) SetOnIsFrameless(fn WindowComponentOnIsFrameless)
|
||||
imports.Proc(def.CEFWindowComponent_SetOnIsFrameless).Call(m.Instance(), api.MakeEventDataPtr(fn))
|
||||
}
|
||||
|
||||
func (m *TCEFWindowComponent) SetOnWithStandardWindowButtons(fn WindowComponentOnWithStandardWindowButtons) {
|
||||
imports.Proc(def.CEFWindowComponent_SetOnWithStandardWindowButtons).Call(m.Instance(), api.MakeEventDataPtr(fn))
|
||||
}
|
||||
|
||||
func (m *TCEFWindowComponent) SetOnGetTitleBarHeight(fn WindowComponentOnGetTitleBarHeight) {
|
||||
imports.Proc(def.CEFWindowComponent_SetOnGetTitlebarHeight).Call(m.Instance(), api.MakeEventDataPtr(fn))
|
||||
}
|
||||
|
||||
// SetOnCanResize 设置窗口是否允许调整大小回调事件
|
||||
func (m *TCEFWindowComponent) SetOnCanResize(fn WindowComponentOnCanResize) {
|
||||
imports.Proc(def.CEFWindowComponent_SetOnCanResize).Call(m.Instance(), api.MakeEventDataPtr(fn))
|
||||
@ -646,6 +654,15 @@ func init() {
|
||||
sender := getPtr(0)
|
||||
window := getPtr(1)
|
||||
fn.(WindowComponentOnIsFrameless)(lcl.AsObject(sender), &ICefWindow{instance: window}, (*bool)(getPtr(2)))
|
||||
case WindowComponentOnWithStandardWindowButtons:
|
||||
sender := getPtr(0)
|
||||
window := getPtr(1)
|
||||
fn.(WindowComponentOnWithStandardWindowButtons)(lcl.AsObject(sender), &ICefWindow{instance: window}, (*bool)(getPtr(2)))
|
||||
case WindowComponentOnGetTitleBarHeight:
|
||||
sender := getPtr(0)
|
||||
window := getPtr(1)
|
||||
titleBarHeight := *(*float32)(getPtr(2))
|
||||
fn.(WindowComponentOnGetTitleBarHeight)(lcl.AsObject(sender), &ICefWindow{instance: window}, titleBarHeight, (*bool)(getPtr(3)))
|
||||
case WindowComponentOnCanResize:
|
||||
sender := getPtr(0)
|
||||
window := getPtr(1)
|
||||
|
@ -1186,10 +1186,11 @@ type TCefPopupFeatures struct {
|
||||
WidthSet int32
|
||||
Height int32
|
||||
HeightSet int32
|
||||
MenuBarVisible int32
|
||||
StatusBarVisible int32
|
||||
ToolBarVisible int32
|
||||
ScrollbarsVisible int32
|
||||
MenuBarVisible int32 // ~ CEF 109
|
||||
StatusBarVisible int32 // ~ CEF 109
|
||||
ToolBarVisible int32 // ~ CEF 109
|
||||
ScrollbarsVisible int32 // ~ CEF 109
|
||||
IsPopup int32 // CEF 110 ~ Current :True (1) if browser interface elements should be hidden.
|
||||
}
|
||||
|
||||
// /include/internal/cef_types.h (cef_composition_underline_t)
|
||||
|
@ -1683,3 +1683,38 @@ const (
|
||||
LpsHttps // https
|
||||
//LpsTcp // tcp
|
||||
)
|
||||
|
||||
/// <summary>
|
||||
/// Permission types used with OnShowPermissionPrompt. Some types are
|
||||
/// platform-specific or only supported with the Chrome runtime. Should be kept
|
||||
/// in sync with Chromium's permissions::RequestType type.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// <para>TCefPermissionRequestTypes values.</para>
|
||||
/// <para><see href="https://bitbucket.org/chromiumembedded/cef/src/master/include/internal/cef_types.h">CEF source file: /include/internal/cef_types.h (cef_permission_request_types_t)</see></para>
|
||||
/// </remarks>
|
||||
type TCefPermissionRequestTypes = int32
|
||||
|
||||
const (
|
||||
CEF_PERMISSION_TYPE_NONE TCefPermissionRequestTypes = 0
|
||||
CEF_PERMISSION_TYPE_ACCESSIBILITY_EVENTS TCefPermissionRequestTypes = 1 << 0
|
||||
CEF_PERMISSION_TYPE_AR_SESSION TCefPermissionRequestTypes = 1 << 1
|
||||
CEF_PERMISSION_TYPE_CAMERA_PAN_TILT_ZOOM TCefPermissionRequestTypes = 1 << 2
|
||||
CEF_PERMISSION_TYPE_CAMERA_STREAM TCefPermissionRequestTypes = 1 << 3
|
||||
CEF_PERMISSION_TYPE_CLIPBOARD TCefPermissionRequestTypes = 1 << 4
|
||||
CEF_PERMISSION_TYPE_TOP_LEVEL_STORAGE_ACCESS TCefPermissionRequestTypes = 1 << 5
|
||||
CEF_PERMISSION_TYPE_DISK_QUOTA TCefPermissionRequestTypes = 1 << 6
|
||||
CEF_PERMISSION_TYPE_LOCAL_FONTS TCefPermissionRequestTypes = 1 << 7
|
||||
CEF_PERMISSION_TYPE_GEOLOCATION TCefPermissionRequestTypes = 1 << 8
|
||||
CEF_PERMISSION_TYPE_IDLE_DETECTION TCefPermissionRequestTypes = 1 << 9
|
||||
CEF_PERMISSION_TYPE_MIC_STREAM TCefPermissionRequestTypes = 1 << 10
|
||||
CEF_PERMISSION_TYPE_MIDI TCefPermissionRequestTypes = 1 << 11
|
||||
CEF_PERMISSION_TYPE_MIDI_SYSEX TCefPermissionRequestTypes = 1 << 12
|
||||
CEF_PERMISSION_TYPE_MULTIPLE_DOWNLOADS TCefPermissionRequestTypes = 1 << 13
|
||||
CEF_PERMISSION_TYPE_NOTIFICATIONS TCefPermissionRequestTypes = 1 << 14
|
||||
CEF_PERMISSION_TYPE_PROTECTED_MEDIA_IDENTIFIER TCefPermissionRequestTypes = 1 << 15
|
||||
CEF_PERMISSION_TYPE_REGISTER_PROTOCOL_HANDLER TCefPermissionRequestTypes = 1 << 16
|
||||
CEF_PERMISSION_TYPE_STORAGE_ACCESS TCefPermissionRequestTypes = 1 << 17
|
||||
CEF_PERMISSION_TYPE_VR_SESSION TCefPermissionRequestTypes = 1 << 18
|
||||
CEF_PERMISSION_TYPE_WINDOW_MANAGEMENT TCefPermissionRequestTypes = 1 << 19
|
||||
)
|
||||
|
Loading…
Reference in New Issue
Block a user