Upgrades CEF 130.1.16

This commit is contained in:
yanghy 2024-11-28 17:52:21 +08:00
parent 3686a95255
commit 4e08186a29
3 changed files with 26 additions and 2 deletions

View File

@ -24,6 +24,7 @@ type ICefButton struct {
*ICefView *ICefView
} }
// Returns this Button as a LabelButton or NULL if this is not a LabelButton.
func (m *ICefButton) AsLabelButton() *ICefLabelButton { func (m *ICefButton) AsLabelButton() *ICefLabelButton {
if !m.IsValid() { if !m.IsValid() {
return nil return nil
@ -36,6 +37,7 @@ func (m *ICefButton) AsLabelButton() *ICefLabelButton {
return nil return nil
} }
// Sets the current display state of the Button.
func (m *ICefButton) SetState(state consts.TCefButtonState) { func (m *ICefButton) SetState(state consts.TCefButtonState) {
if !m.IsValid() { if !m.IsValid() {
return return
@ -43,6 +45,7 @@ func (m *ICefButton) SetState(state consts.TCefButtonState) {
imports.Proc(def.Button_SetState).Call(m.Instance(), uintptr(state)) imports.Proc(def.Button_SetState).Call(m.Instance(), uintptr(state))
} }
// Returns the current display state of the Button.
func (m *ICefButton) GetState() consts.TCefButtonState { func (m *ICefButton) GetState() consts.TCefButtonState {
if !m.IsValid() { if !m.IsValid() {
return 0 return 0
@ -51,6 +54,7 @@ func (m *ICefButton) GetState() consts.TCefButtonState {
return consts.TCefButtonState(r1) return consts.TCefButtonState(r1)
} }
// Sets the Button will use an ink drop effect for displaying state changes.
func (m *ICefButton) SetInkDropEnabled(enabled bool) { func (m *ICefButton) SetInkDropEnabled(enabled bool) {
if !m.IsValid() { if !m.IsValid() {
return return
@ -58,6 +62,8 @@ func (m *ICefButton) SetInkDropEnabled(enabled bool) {
imports.Proc(def.Button_SetInkDropEnabled).Call(m.Instance(), api.PascalBool(enabled)) imports.Proc(def.Button_SetInkDropEnabled).Call(m.Instance(), api.PascalBool(enabled))
} }
// Sets the tooltip text that will be displayed when the user hovers the
// mouse cursor over the Button.
func (m *ICefButton) SetTooltipText(tooltipText string) { func (m *ICefButton) SetTooltipText(tooltipText string) {
if !m.IsValid() { if !m.IsValid() {
return return
@ -65,6 +71,8 @@ func (m *ICefButton) SetTooltipText(tooltipText string) {
imports.Proc(def.Button_SetTooltipText).Call(m.Instance(), api.PascalStr(tooltipText)) imports.Proc(def.Button_SetTooltipText).Call(m.Instance(), api.PascalStr(tooltipText))
} }
// Sets the accessible name that will be exposed to assistive technology
// (AT).
func (m *ICefButton) SetAccessibleName(name string) { func (m *ICefButton) SetAccessibleName(name string) {
if !m.IsValid() { if !m.IsValid() {
return return

View File

@ -25,8 +25,8 @@ type ICefClient struct {
ct consts.CefCreateType ct consts.CefCreateType
} }
// CefClientRef -> ICefClient // ClientRef -> ICefClient
var CefClientRef cefClient var ClientRef cefClient
type cefClient uintptr type cefClient uintptr

View File

@ -36,6 +36,7 @@ func (*panel) New(delegate *ICefPanelDelegate) *ICefPanel {
return nil return nil
} }
// Returns this Panel as a Window or NULL if this is not a Window.
func (m *ICefPanel) GetAsWindow() *ICefWindow { func (m *ICefPanel) GetAsWindow() *ICefWindow {
if !m.IsValid() { if !m.IsValid() {
return nil return nil
@ -48,6 +49,7 @@ func (m *ICefPanel) GetAsWindow() *ICefWindow {
return nil return nil
} }
// Set this Panel's Layout to FillLayout and return the FillLayout object.
func (m *ICefPanel) SetToFillLayout() *ICefFillLayout { func (m *ICefPanel) SetToFillLayout() *ICefFillLayout {
if !m.IsValid() { if !m.IsValid() {
return nil return nil
@ -62,6 +64,7 @@ func (m *ICefPanel) SetToFillLayout() *ICefFillLayout {
return nil return nil
} }
// Set this Panel's Layout to BoxLayout and return the BoxLayout object.
func (m *ICefPanel) SetToBoxLayout(settings TCefBoxLayoutSettings) *ICefBoxLayout { func (m *ICefPanel) SetToBoxLayout(settings TCefBoxLayoutSettings) *ICefBoxLayout {
if !m.IsValid() { if !m.IsValid() {
return nil return nil
@ -75,6 +78,7 @@ func (m *ICefPanel) SetToBoxLayout(settings TCefBoxLayoutSettings) *ICefBoxLayou
return nil return nil
} }
// Get the Layout.
func (m *ICefPanel) GetLayout() *ICefLayout { func (m *ICefPanel) GetLayout() *ICefLayout {
if !m.IsValid() { if !m.IsValid() {
return nil return nil
@ -87,6 +91,8 @@ func (m *ICefPanel) GetLayout() *ICefLayout {
return nil return nil
} }
// Lay out the child Views (set their bounds based on sizing heuristics
// specific to the current Layout).
func (m *ICefPanel) Layout() { func (m *ICefPanel) Layout() {
if !m.IsValid() { if !m.IsValid() {
return return
@ -94,6 +100,7 @@ func (m *ICefPanel) Layout() {
imports.Proc(def.CEFPanel_Layout).Call(m.Instance()) imports.Proc(def.CEFPanel_Layout).Call(m.Instance())
} }
// Add a child View.
func (m *ICefPanel) AddChildView(view *ICefView) { func (m *ICefPanel) AddChildView(view *ICefView) {
if !m.IsValid() { if !m.IsValid() {
return return
@ -101,6 +108,8 @@ func (m *ICefPanel) AddChildView(view *ICefView) {
imports.Proc(def.CEFPanel_AddChildView).Call(m.Instance(), view.Instance()) imports.Proc(def.CEFPanel_AddChildView).Call(m.Instance(), view.Instance())
} }
// Add a child View at the specified |index|. If |index| matches the result
// of GetChildCount() then the View will be added at the end.
func (m *ICefPanel) AddChildViewAt(view *ICefView, index int32) { func (m *ICefPanel) AddChildViewAt(view *ICefView, index int32) {
if !m.IsValid() { if !m.IsValid() {
return return
@ -108,6 +117,8 @@ func (m *ICefPanel) AddChildViewAt(view *ICefView, index int32) {
imports.Proc(def.CEFPanel_AddChildViewAt).Call(m.Instance(), view.Instance(), uintptr(index)) imports.Proc(def.CEFPanel_AddChildViewAt).Call(m.Instance(), view.Instance(), uintptr(index))
} }
// Move the child View to the specified |index|. A negative value for |index|
// will move the View to the end.
func (m *ICefPanel) ReorderChildView(view *ICefView, index int32) { func (m *ICefPanel) ReorderChildView(view *ICefView, index int32) {
if !m.IsValid() { if !m.IsValid() {
return return
@ -115,6 +126,7 @@ func (m *ICefPanel) ReorderChildView(view *ICefView, index int32) {
imports.Proc(def.CEFPanel_ReorderChildView).Call(m.Instance(), view.Instance(), uintptr(index)) imports.Proc(def.CEFPanel_ReorderChildView).Call(m.Instance(), view.Instance(), uintptr(index))
} }
// Remove a child View. The View can then be added to another Panel.
func (m *ICefPanel) RemoveChildView(view *ICefView) { func (m *ICefPanel) RemoveChildView(view *ICefView) {
if !m.IsValid() { if !m.IsValid() {
return return
@ -122,6 +134,8 @@ func (m *ICefPanel) RemoveChildView(view *ICefView) {
imports.Proc(def.CEFPanel_RemoveChildView).Call(m.Instance(), view.Instance()) imports.Proc(def.CEFPanel_RemoveChildView).Call(m.Instance(), view.Instance())
} }
// Remove all child Views. The removed Views will be deleted if the client
// holds no references to them.
func (m *ICefPanel) RemoveAllChildViews() { func (m *ICefPanel) RemoveAllChildViews() {
if !m.IsValid() { if !m.IsValid() {
return return
@ -129,6 +143,7 @@ func (m *ICefPanel) RemoveAllChildViews() {
imports.Proc(def.CEFPanel_RemoveAllChildViews).Call(m.Instance()) imports.Proc(def.CEFPanel_RemoveAllChildViews).Call(m.Instance())
} }
// Returns the number of child Views.
func (m *ICefPanel) GetChildViewCount() uint32 { func (m *ICefPanel) GetChildViewCount() uint32 {
if !m.IsValid() { if !m.IsValid() {
return 0 return 0
@ -137,6 +152,7 @@ func (m *ICefPanel) GetChildViewCount() uint32 {
return uint32(r1) return uint32(r1)
} }
// Returns the child View at the specified |index|.
func (m *ICefPanel) GetChildViewAt(index int32) *ICefView { func (m *ICefPanel) GetChildViewAt(index int32) *ICefView {
if !m.IsValid() { if !m.IsValid() {
return nil return nil