示例#1
0
func FillMainArgs(mainArgs *C.struct__cef_main_args_t, appHandle unsafe.Pointer) {
	var _Argv []*C.char = make([]*C.char, len(os.Args))
	// On Linux appHandle is nil.
	log.Debug("FillMainArgs, argc=%d", len(os.Args))
	for i, arg := range os.Args {
		_Argv[C.int(i)] = C.CString(arg)
	}
	mainArgs.argc = C.int(len(os.Args))
	mainArgs.argv = &_Argv[0]
}
示例#2
0
func FillMainArgs(mainArgs *C.struct__cef_main_args_t,
	appHandle unsafe.Pointer) {
	// On Mac appHandle is nil.
	Logger.Println("FillMainArgs, argc=", len(os.Args))
	for i, arg := range os.Args {
		_Argv[C.int(i)] = C.CString(arg)
	}
	mainArgs.argc = C.int(len(os.Args))
	mainArgs.argv = &_Argv[0]
}
示例#3
0
func FillMainArgs(mainArgs *C.struct__cef_main_args_t,
	appHandle unsafe.Pointer) {
	Logger.Println("FillMainArgs")
	mainArgs.instance = (C.HINSTANCE)(appHandle)
}
示例#4
0
func FillMainArgs(mainArgs *C.struct__cef_main_args_t,
	appHandle unsafe.Pointer) {
	log.Debug("FillMainArgs")
	mainArgs.instance = (C.HINSTANCE)(appHandle)
}