Exemplo n.º 1
0
Arquivo: dump.go Projeto: reusee/ggi
func DumpEnumInfo(info *C.GIEnumInfo) {
	nValues := C.g_enum_info_get_n_values(info)
	p("%d values\n", nValues)
	for i := C.gint(0); i < nValues; i++ {
		valueInfo := C.g_enum_info_get_value(info, i)
		DumpValueInfo(valueInfo)
	}
	nMethods := C.g_enum_info_get_n_methods(info)
	p("%d methods\n", nMethods)
	for i := C.gint(0); i < nMethods; i++ {
		f := C.g_enum_info_get_method(info, i)
		DumpFunctionInfo(f)
	}
	storageType := C.g_enum_info_get_storage_type(info)
	p("%s\n", fromGStr(C.g_type_tag_to_string(storageType)))
	errorDomain := fromGStr(C.g_enum_info_get_error_domain(info))
	p("error domain %s\n", errorDomain)
}
Exemplo n.º 2
0
// g_enum_info_get_method
func (ii *EnumInfo) Method(n int) *FunctionInfo {
	ptr := &BaseInfo{(*C.GIBaseInfo)(C.g_enum_info_get_method((*C.GIEnumInfo)(ii.c), C.gint(n)))}
	return (*FunctionInfo)(unsafe.Pointer(_SetBaseInfoFinalizer(ptr)))
}
Exemplo n.º 3
0
Arquivo: info.go Projeto: dradtke/gogi
func (info *GiInfo) GetEnumMethod(n int) *GiInfo {
	return NewGiInfo((*C.GIBaseInfo)(C.g_enum_info_get_method((*C.GIEnumInfo)(info.ptr), GlibInt(n))))
}