Esempio n. 1
0
// g_enum_info_get_value
func (ei *EnumInfo) Value(n int) *ValueInfo {
	cptr := (*C.GIBaseInfo)(C.g_enum_info_get_value((*C.GIEnumInfo)(ei.c), C.gint(n)))
	if cptr == nil {
		return nil
	}
	ptr := &BaseInfo{cptr}
	return (*ValueInfo)(unsafe.Pointer(_SetBaseInfoFinalizer(ptr)))
}
Esempio n. 2
0
File: dump.go Progetto: 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)
}
Esempio n. 3
0
File: info.go Progetto: dradtke/gogi
func (info *GiInfo) GetEnumValue(n int) *GiInfo {
	return NewGiInfo((*C.GIBaseInfo)(C.g_enum_info_get_value((*C.GIEnumInfo)(info.ptr), GlibInt(n))))
}