func DumpArgInfo(info *C.GIArgInfo) { dataIndex := C.g_arg_info_get_closure(info) p("data index %d\n", dataIndex) destroyNotifyIndex := C.g_arg_info_get_destroy(info) p("destroy notify index %d\n", destroyNotifyIndex) direction := C.g_arg_info_get_direction(info) switch direction { case C.GI_DIRECTION_IN: p("in arg\n") case C.GI_DIRECTION_OUT: p("out arg\n") case C.GI_DIRECTION_INOUT: p("in out arg\n") } transfer := C.g_arg_info_get_ownership_transfer(info) p("transfer %s\n", TransferGetName(transfer)) scope := C.g_arg_info_get_scope(info) p("scope %v\n", scope) t := C.g_arg_info_get_type(info) DumpTypeInfo(t) mayBeNull := C.g_arg_info_may_be_null(info) p("may be null %v\n", mayBeNull) caller_allocates := C.g_arg_info_is_caller_allocates(info) p("caller allocates %v\n", caller_allocates) optional := C.g_arg_info_is_optional(info) p("optional %v\n", optional) isReturnValue := C.g_arg_info_is_return_value(info) p("is return value %v\n", isReturnValue) onlyUsefulInC := C.g_arg_info_is_skip(info) p("is only useful in C %v\n", onlyUsefulInC) }
// g_arg_info_get_scope func (ai *ArgInfo) Scope() ScopeType { return ScopeType(C.g_arg_info_get_scope((*C.GIArgInfo)(ai.c))) }
func (info *GiInfo) GetScope() ScopeType { return (ScopeType)(C.g_arg_info_get_scope((*C.GIArgInfo)(info.ptr))) }