Esempio n. 1
0
//export go_GetResponseHeaders
func go_GetResponseHeaders(
	self *C.struct__cef_resource_handler_t,
	response *C.struct__cef_response_t,
	response_length *C.int64) {

	if handler, ok := handlerMap[unsafe.Pointer(self)]; ok {
		*response_length = C.int64(handler.resourceHandler.GetResponseHeaders(
			CefResponseT{response},
		))
		return
	}

	*response_length = 0
}
Esempio n. 2
0
func NewRNG(seed int64) RNG {
	rv := C.cvRNG(C.int64(seed))
	return RNG(rv)
}
Esempio n. 3
0
func (r *VMem) allocAlign(l uint64, a int) (unsafe.Pointer, error) {
	p := C.allocMemAlign(r.head, C.int64(l), C.int(a))
	return r.mem.getBuf(uint64(p), l)
}
Esempio n. 4
0
func (r *VMem) allocGMemAlign(l uint64, a int) *GMem {
	gm := &GMem{key: r.key}
	gm.off = uint64(C.allocMemAlign(r.head, C.int64(l), C.int(a)))
	gm.length = l
	return gm
}
Esempio n. 5
0
func (b CefBrowserT) GetFrameByIdent(identifier int64) CefFrameT {
	return CefFrameT{C.cef_browser_t_get_frame_byident(b.CStruct, C.int64(identifier))}
}