コード例 #1
0
ファイル: element.go プロジェクト: ericroy/go-htmlayout
// 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
}
コード例 #2
0
ファイル: IDirectInputDevice8.go プロジェクト: gonutz/di8
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}
}