示例#1
0
func (e *Element) Move(x, y int) {
	if ret := C.HTMLayoutMoveElement(e.handle, C.INT(x), C.INT(y)); ret != HLDOM_OK {
		domPanic(ret, "Failed to move element")
	}
}
示例#2
0
func (e *Element) Resize(x, y, w, h int) {
	if ret := C.HTMLayoutMoveElementEx(e.handle, C.INT(x), C.INT(y), C.INT(w), C.INT(h)); ret != HLDOM_OK {
		domPanic(ret, "Failed to resize element")
	}
}
示例#3
0
文件: types.go 项目: re-pe/sciter
// return nil when r == SCDOM_OK
func wrapDomResult(r C.INT, msg string) error {
	if r == C.INT(SCDOM_OK) {
		return nil
	}
	return newDomError(SCDOM_RESULT(r), msg)
}