Beispiel #1
0
	case MESSAGE:
		if (Std$Function$call(AS, 2, &Result0, Result0.Val, 0, Std$String$T, 0) < FAILURE) {
			printf("Warning: Closure sent message: %s.\n", Std$String$flatten(Result0.Val));
		} else {
			printf("Warning: Closure sent message: <unknown>.\n");
		};
	case FAILURE:
		return;
	case SUSPEND:
	case SUCCESS:
		break;
	};
	if (Result) Gtk$GObject$Value$to_gtk(Result0.Val, Result);
};

Gtk$GObject$Closure_t *_from_ref(Std$Object_t **Function) {
	ref_closure_t *Handle = g_closure_new_simple(sizeof(ref_closure_t), 0);
	Handle->Function = Function;
	g_closure_set_marshal(Handle, __marshal_ref);
	Gtk$GObject$Closure_t *Closure = new(Gtk$GObject$Closure_t);
	Closure->Type = T;
	Closure->Handle = Handle;
	Handle->Closure = Closure;
	return Closure;
};

GLOBAL_FUNCTION(New, 1) {
	Result->Val = _from_val(Args[0].Val);
	return SUCCESS;
};
Beispiel #2
0
	case MESSAGE:
		if (Std$Function$call(AS, 2, &Result0, Result0.Val, 0, Std$String$T, 0) < FAILURE) {
			printf("Warning: Closure sent message: %s.\n", Std$String$flatten(Result0.Val));
		} else {
			printf("Warning: Closure sent message: <unknown>.\n");
		};
	case FAILURE:
		return;
	case SUSPEND:
	case SUCCESS:
		break;
	};
	if (Result) Gtk$GObject$Value$to_gtk(Result0.Val, Result);
};

Gtk$GObject$Closure_t *_from_ref(Std$Object_t **Function) {
	ref_closure_t *Handle = (ref_closure_t *)g_closure_new_simple(sizeof(ref_closure_t), 0);
	Handle->Function = Function;
	g_closure_set_marshal((GClosure *)Handle, (GClosureMarshal)__marshal_ref);
	Gtk$GObject$Closure_t *Closure = new(Gtk$GObject$Closure_t);
	Closure->Type = T;
	Closure->Handle = (GClosure *)Handle;
	Handle->Closure = Closure;
	return Closure;
};

GLOBAL_FUNCTION(New, 1) {
	Result->Val = (Std$Object_t *)_from_val(Args[0].Val);
	return SUCCESS;
};