Exemplo n.º 1
0
// For delivering programmatic events to this element.
// Returns true if the event was handled, false otherwise
func (e *Element) SendEvent(eventCode uint, source *Element, reason uint32) bool {
	var handled C.BOOL = 0
	if ret := C.HTMLayoutSendEvent(e.handle, C.UINT(eventCode), source.handle, C.UINT_PTR(reason), &handled); ret != HLDOM_OK {
		domPanic(ret, "Failed to send event")
	}
	return handled != 0
}
Exemplo n.º 2
0
func NewPropPointer(obj, how int, data uintptr) propHeader {
	var p C.DIPROPPOINTER
	p.diph.dwSize = C.sizeof_DIPROPPOINTER
	p.diph.dwHeaderSize = C.sizeof_DIPROPHEADER
	p.diph.dwObj = C.DWORD(obj)
	p.diph.dwHow = C.DWORD(how)
	p.uData = C.UINT_PTR(data)
	return &propPointer{p}
}