U: GIFPlay component Add start,stop API

This commit is contained in:
杨红岩 2024-04-17 18:41:32 +08:00
parent c87b365f02
commit caf0807796
3 changed files with 27 additions and 7 deletions

View File

@ -64,6 +64,14 @@ func (m *TGIFPlay) Animate(value bool) {
imports.Proc(def.GIFPlay_Animate).Call(m.Instance(), api.PascalBool(value))
}
func (m *TGIFPlay) Start() {
m.Animate(true)
}
func (m *TGIFPlay) Stop() {
m.Animate(false)
}
func (m *TGIFPlay) NextFrame() {
imports.Proc(def.GIFPlay_NextFrame).Call(m.Instance())
}
@ -149,27 +157,27 @@ func (m *TGIFPlay) SetVisible(value bool) {
imports.Proc(def.GIFPlay_SetVisible).Call(m.Instance(), api.PascalBool(value))
}
func (m *TGIFPlay) SetOnClick(fn TNotifyEvent) {
func (m *TGIFPlay) SetOnClick(fn lcl.TNotifyEvent) {
imports.Proc(def.GIFPlay_SetOnClick).Call(m.Instance(), api.MakeEventDataPtr(fn))
}
func (m *TGIFPlay) SetOnFrameChanged(fn TNotifyEvent) {
func (m *TGIFPlay) SetOnFrameChanged(fn lcl.TNotifyEvent) {
imports.Proc(def.GIFPlay_SetOnFrameChanged).Call(m.Instance(), api.MakeEventDataPtr(fn))
}
func (m *TGIFPlay) SetOnDblClick(fn TNotifyEvent) {
func (m *TGIFPlay) SetOnDblClick(fn lcl.TNotifyEvent) {
imports.Proc(def.GIFPlay_SetOnDblClick).Call(m.Instance(), api.MakeEventDataPtr(fn))
}
func (m *TGIFPlay) SetOnMouseDown(fn TNotifyEvent) {
func (m *TGIFPlay) SetOnMouseDown(fn lcl.TNotifyEvent) {
imports.Proc(def.GIFPlay_SetOnMouseDown).Call(m.Instance(), api.MakeEventDataPtr(fn))
}
func (m *TGIFPlay) SetOnMouseEnter(fn TNotifyEvent) {
func (m *TGIFPlay) SetOnMouseEnter(fn lcl.TNotifyEvent) {
imports.Proc(def.GIFPlay_SetOnMouseEnter).Call(m.Instance(), api.MakeEventDataPtr(fn))
}
func (m *TGIFPlay) SetOnMouseLeave(fn TNotifyEvent) {
func (m *TGIFPlay) SetOnMouseLeave(fn lcl.TNotifyEvent) {
imports.Proc(def.GIFPlay_SetOnMouseLeave).Call(m.Instance(), api.MakeEventDataPtr(fn))
}
@ -177,10 +185,18 @@ func (m *TGIFPlay) SetOnMouseMove(fn lcl.TMouseMoveEvent) {
imports.Proc(def.GIFPlay_SetOnMouseMove).Call(m.Instance(), api.MakeEventDataPtr(fn))
}
func (m *TGIFPlay) SetOnMouseUp(fn TMouseEvent) {
func (m *TGIFPlay) SetOnMouseUp(fn lcl.TMouseEvent) {
imports.Proc(def.GIFPlay_SetOnMouseUp).Call(m.Instance(), api.MakeEventDataPtr(fn))
}
func (m *TGIFPlay) SetOnStart(fn lcl.TNotifyEvent) {
imports.Proc(def.GIFPlay_SetOnStart).Call(m.Instance(), api.MakeEventDataPtr(fn))
}
func (m *TGIFPlay) SetOnStop(fn lcl.TNotifyEvent) {
imports.Proc(def.GIFPlay_SetOnStop).Call(m.Instance(), api.MakeEventDataPtr(fn))
}
// Instance
//
// 返回对象实例指针。

View File

@ -2766,6 +2766,8 @@ func init() {
dllimports.NewEnergyImport("GIFPlay_SetOnMouseLeave", 0),
dllimports.NewEnergyImport("GIFPlay_SetOnMouseMove", 0),
dllimports.NewEnergyImport("GIFPlay_SetOnMouseUp", 0),
dllimports.NewEnergyImport("GIFPlay_SetOnStart", 0),
dllimports.NewEnergyImport("GIFPlay_SetOnStop", 0),
} //end
imports.LibEnergy().SetImportTable(energyImportDefs)
}

View File

@ -2766,4 +2766,6 @@ const (
GIFPlay_SetOnMouseLeave
GIFPlay_SetOnMouseMove
GIFPlay_SetOnMouseUp
GIFPlay_SetOnStart
GIFPlay_SetOnStop
) //end