forked from cztomczak/cef2go
-
Notifications
You must be signed in to change notification settings - Fork 7
/
cefCallback.go
44 lines (31 loc) · 822 Bytes
/
cefCallback.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
// Copyright (c) 2014 The cef2go authors. All rights reserved.
// License: BSD 3-clause.
// Website: https://github.com/fromkeith/cef2go
package cef2go
/*
#include "cefBase.h"
#include "include/capi/cef_callback_capi.h"
extern void cef_callback_t_cont(struct _cef_callback_t* self);
extern void cef_callback_t_cancel(struct _cef_callback_t* self);
*/
import "C"
import (
"unsafe"
)
type CefCallbackT struct {
CStruct *C.struct__cef_callback_t
}
func (b CefCallbackT) Release() {
C.releaseVoid(unsafe.Pointer(b.CStruct))
}
func (b CefCallbackT) AddRef() {
C.add_refVoid(unsafe.Pointer(b.CStruct))
}
// continue processing
func (c CefCallbackT) Cont() {
C.cef_callback_t_cont(c.CStruct)
}
// cancel processing
func (c CefCallbackT) Cancel() {
C.cef_callback_t_cancel(c.CStruct)
}