Exemplo 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
}
Exemplo n.º 2
0
func NewRNG(seed int64) RNG {
	rv := C.cvRNG(C.int64(seed))
	return RNG(rv)
}
Exemplo 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)
}
Exemplo 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
}
Exemplo n.º 5
0
func (b CefBrowserT) GetFrameByIdent(identifier int64) CefFrameT {
	return CefFrameT{C.cef_browser_t_get_frame_byident(b.CStruct, C.int64(identifier))}
}