示例#1
0
文件: dump.go 项目: reusee/ggi
func DumpFunctionInfo(info *C.GIFunctionInfo) {
	DumpCallableInfo(asCallableInfo(info))
	flags := C.g_function_info_get_flags(info)
	if flags&C.GI_FUNCTION_IS_METHOD > 0 {
		p("is method\n")
	}
	if flags&C.GI_FUNCTION_IS_CONSTRUCTOR > 0 {
		p("is constructor\n")
	}
	if flags&C.GI_FUNCTION_IS_GETTER > 0 {
		p("is getter\n")
		property := C.g_function_info_get_property(info)
		DumpPropertyInfo(property)
	}
	if flags&C.GI_FUNCTION_IS_SETTER > 0 {
		p("is setter\n")
		property := C.g_function_info_get_property(info)
		DumpPropertyInfo(property)
	}
	if flags&C.GI_FUNCTION_WRAPS_VFUNC > 0 {
		p("wraps vfunc\n")
		_ = C.g_function_info_get_vfunc(info)
	}
	if flags&C.GI_FUNCTION_THROWS > 0 {
		p("throws error\n")
	}
	symbol := fromGStr(C.g_function_info_get_symbol(info))
	p("symbol %s\n", symbol)
}
示例#2
0
文件: gi.go 项目: bytbox/gogobject
// g_function_info_get_vfunc
func (fi *FunctionInfo) VFunc() *VFuncInfo {
	cptr := (*C.GIBaseInfo)(C.g_function_info_get_vfunc((*C.GIFunctionInfo)(fi.c)))
	if cptr == nil {
		return nil
	}
	ptr := &BaseInfo{cptr}
	return (*VFuncInfo)(unsafe.Pointer(_SetBaseInfoFinalizer(ptr)))
}
示例#3
0
文件: info.go 项目: dradtke/gogi
func (info *GiInfo) GetFunctionVFunc() *GiInfo {
	return NewGiInfo((*C.GIBaseInfo)(C.g_function_info_get_vfunc((*C.GIFunctionInfo)(info.ptr))))
}