示例#1
0
文件: mgrgldi.go 项目: sqp/godock
//export onAppletReload
func onAppletReload(cInstance *C.GldiModuleInstance, oldContainer *C.GldiContainer, cKeyfile *C.GKeyFile) C.gboolean {
	mi := gldi.NewModuleInstanceFromNative(unsafe.Pointer(cInstance))
	cont := gldi.NewContainerFromNative(unsafe.Pointer(oldContainer))
	kf := keyfile.NewFromNative(unsafe.Pointer(cKeyfile))
	if apps.reloadApplet(mi, cont, kf) { // if applet matched, which should always be true.
		return notif.ActionIntercept
	}
	return notif.ActionLetPass
}
示例#2
0
文件: mgrgldi.go 项目: sqp/godock
//export onAppletInit
func onAppletInit(cInstance *C.GldiModuleInstance, cKeyfile *C.GKeyFile) {
	mi := gldi.NewModuleInstanceFromNative(unsafe.Pointer(cInstance))
	kf := keyfile.NewFromNative(unsafe.Pointer(cKeyfile))
	apps.startApplet(mi, kf)
}