mirror of
https://gitee.com/energye/energy.git
synced 2024-12-15 01:41:49 +08:00
49 lines
1.4 KiB
Go
49 lines
1.4 KiB
Go
//----------------------------------------
|
|
//
|
|
// Copyright © yanghy. All Rights Reserved.
|
|
//
|
|
// Licensed under GNU General Public License v3.0
|
|
//
|
|
//----------------------------------------
|
|
|
|
//go:build !windows && cgo
|
|
// +build !windows,cgo
|
|
|
|
package cef
|
|
|
|
//// #cgo darwin CFLAGS: -mmacosx-version-min=10.8 -DMACOSX_DEPLOYMENT_TARGET=10.8
|
|
// #cgo darwin CFLAGS: -mmacosx-version-min=10.8
|
|
// #cgo darwin LDFLAGS: -mmacosx-version-min=10.8
|
|
//
|
|
// extern void* doCefIPCCallbackFuncEventProc(void* f, void* args, long argcount);
|
|
// static void* doGetCefIPCCallbackFuncEventAddr() {
|
|
// return &doCefIPCCallbackFuncEventProc;
|
|
// }
|
|
//
|
|
// extern void* doCefWindowBindEventProc(void* f, void* args, long argcount);
|
|
// static void* doGetCefWindowBindEventAddr() {
|
|
// return &doCefWindowBindEventProc;
|
|
// }
|
|
import "C"
|
|
|
|
import (
|
|
"unsafe"
|
|
)
|
|
|
|
//export doCefIPCCallbackFuncEventProc
|
|
func doCefIPCCallbackFuncEventProc(f unsafe.Pointer, args unsafe.Pointer, argcount C.long) unsafe.Pointer {
|
|
cefIPCEventProc(uintptr(f), uintptr(args), int(argcount))
|
|
return nullptr
|
|
}
|
|
|
|
//export doCefWindowBindEventProc
|
|
func doCefWindowBindEventProc(f unsafe.Pointer, args unsafe.Pointer, argcount C.long) unsafe.Pointer {
|
|
cefWindowBindCallbackEventProc(uintptr(f), uintptr(args), int(argcount))
|
|
return nullptr
|
|
}
|
|
|
|
var (
|
|
cefIPCCallbackFuncEvent = uintptr(C.doGetCefIPCCallbackFuncEventAddr())
|
|
cefWindowBindEvent = uintptr(C.doGetCefWindowBindEventAddr())
|
|
)
|