Exemplo n.º 1
0
Arquivo: dump.go Projeto: 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)
}
Exemplo n.º 2
0
// g_function_info_get_property
func (fi *FunctionInfo) Property() *PropertyInfo {
	cptr := (*C.GIBaseInfo)(C.g_function_info_get_property((*C.GIFunctionInfo)(fi.c)))
	if cptr == nil {
		return nil
	}
	ptr := &BaseInfo{cptr}
	return (*PropertyInfo)(unsafe.Pointer(_SetBaseInfoFinalizer(ptr)))
}
Exemplo n.º 3
0
Arquivo: info.go Projeto: dradtke/gogi
func (info *GiInfo) GetFunctionProperty() *GiInfo {
	return NewGiInfo((*C.GIBaseInfo)(C.g_function_info_get_property((*C.GIFunctionInfo)(info.ptr))))
}