Exemplo n.º 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")
	}
}
Exemplo n.º 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")
	}
}
Exemplo n.º 3
0
// 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)
}