feature(c/libuv): Add idle and check
This commit is contained in:
27
c/libuv/check.go
Normal file
27
c/libuv/check.go
Normal file
@@ -0,0 +1,27 @@
|
|||||||
|
package libuv
|
||||||
|
|
||||||
|
import (
|
||||||
|
_ "unsafe"
|
||||||
|
|
||||||
|
"github.com/goplus/llgo/c"
|
||||||
|
)
|
||||||
|
|
||||||
|
/* Handle types. */
|
||||||
|
|
||||||
|
type Check struct {
|
||||||
|
Unused [120]byte
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Function type */
|
||||||
|
|
||||||
|
// llgo:type C
|
||||||
|
type CheckCb func(Check *Check)
|
||||||
|
|
||||||
|
//go:linkname InitCheck C.uv_check_init
|
||||||
|
func InitCheck(loop *Loop, Check *Check) c.Int
|
||||||
|
|
||||||
|
// llgo:link (*Check).Start C.uv_check_start
|
||||||
|
func (Check *Check) Start(CheckCb CheckCb) c.Int { return 0 }
|
||||||
|
|
||||||
|
// llgo:link (*Check).Stop C.uv_check_stop
|
||||||
|
func (Check *Check) Stop() c.Int { return 0 }
|
||||||
27
c/libuv/idle.go
Normal file
27
c/libuv/idle.go
Normal file
@@ -0,0 +1,27 @@
|
|||||||
|
package libuv
|
||||||
|
|
||||||
|
import (
|
||||||
|
_ "unsafe"
|
||||||
|
|
||||||
|
"github.com/goplus/llgo/c"
|
||||||
|
)
|
||||||
|
|
||||||
|
/* Handle types. */
|
||||||
|
|
||||||
|
type Idle struct {
|
||||||
|
Unused [120]byte
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Function type */
|
||||||
|
|
||||||
|
// llgo:type C
|
||||||
|
type IdleCb func(idle *Idle)
|
||||||
|
|
||||||
|
//go:linkname InitIdle C.uv_idle_init
|
||||||
|
func InitIdle(loop *Loop, idle *Idle) c.Int
|
||||||
|
|
||||||
|
// llgo:link (*Idle).Start C.uv_idle_start
|
||||||
|
func (idle *Idle) Start(idleCb IdleCb) c.Int { return 0 }
|
||||||
|
|
||||||
|
// llgo:link (*Idle).Stop C.uv_idle_stop
|
||||||
|
func (idle *Idle) Stop() c.Int { return 0 }
|
||||||
Reference in New Issue
Block a user