예제 #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))))
}