예제 #1
0
파일: dump.go 프로젝트: reusee/ggi
func DumpInterfaceInfo(info *C.GIInterfaceInfo) {
	nBase := C.g_interface_info_get_n_prerequisites(info)
	p("%d prerequisites\n", nBase)
	for i := C.gint(0); i < nBase; i++ {
		base := (*C.GIInterfaceInfo)(unsafe.Pointer(C.g_interface_info_get_prerequisite(info, i)))
		DumpInterfaceInfo(base)
	}
	nProperties := C.g_interface_info_get_n_properties(info)
	p("%d properties\n", nProperties)
	for i := C.gint(0); i < nProperties; i++ {
		property := C.g_interface_info_get_property(info, i)
		DumpPropertyInfo(property)
	}
	nMethods := C.g_interface_info_get_n_methods(info)
	p("%d methods\n", nMethods)
	for i := C.gint(0); i < nMethods; i++ {
		method := C.g_interface_info_get_method(info, i)
		DumpFunctionInfo(method)
	}
	nSignals := C.g_interface_info_get_n_signals(info)
	p("%d signals\n", nSignals)
	for i := C.gint(0); i < nSignals; i++ {
		signal := C.g_interface_info_get_signal(info, i)
		DumpSignalInfo(signal)
	}
	nVFuncs := C.g_interface_info_get_n_vfuncs(info)
	p("%d vfuncs\n", nVFuncs)
	for i := C.gint(0); i < nVFuncs; i++ {
		vfunc := C.g_interface_info_get_vfunc(info, i)
		DumpVFuncInfo(vfunc)
	}
	nConstants := C.g_interface_info_get_n_constants(info)
	p("%d constants\n", nConstants)
	for i := C.gint(0); i < nConstants; i++ {
		constant := C.g_interface_info_get_constant(info, i)
		DumpConstantInfo(constant)
	}
	structInfo := C.g_interface_info_get_iface_struct(info)
	if structInfo != nil {
		DumpStructInfo(structInfo)
	}
}
예제 #2
0
파일: gi.go 프로젝트: bytbox/gogobject
// g_interface_info_get_method
func (ii *InterfaceInfo) Method(n int) *FunctionInfo {
	ptr := &BaseInfo{(*C.GIBaseInfo)(C.g_interface_info_get_method((*C.GIInterfaceInfo)(ii.c), C.gint(n)))}
	return (*FunctionInfo)(unsafe.Pointer(_SetBaseInfoFinalizer(ptr)))
}