diff --git a/gobject/valagsignalmodule.vala b/gobject/valagsignalmodule.vala
index c073a24..bc68212 100644
--- a/gobject/valagsignalmodule.vala
+++ b/gobject/valagsignalmodule.vala
@@ -349,10 +349,18 @@ internal class Vala.GSignalModule : GObjectModule {
 
 	public override CCodeFunctionCall get_signal_creation (Signal sig, TypeSymbol type) {	
 		var csignew = new CCodeFunctionCall (new CCodeIdentifier ("g_signal_new"));
+		var base_class = sig.parent_symbol as Class;
 		csignew.add_argument (new CCodeConstant ("\"%s\"".printf (sig.get_cname ())));
 		csignew.add_argument (new CCodeIdentifier (type.get_type_id ()));
-		csignew.add_argument (new CCodeConstant ("G_SIGNAL_RUN_LAST"));
-		csignew.add_argument (new CCodeConstant ("0"));
+		csignew.add_argument (new CCodeConstant (sig.flags));
+		if(sig.vfunc_name != null) {
+			var struct_offset = new CCodeFunctionCall (new CCodeIdentifier ("G_STRUCT_OFFSET"));
+			struct_offset.add_argument (new CCodeIdentifier("%sClass".printf (base_class.get_cname ())));
+			struct_offset.add_argument (new CCodeIdentifier(sig.vfunc_name));
+			csignew.add_argument (struct_offset);
+		} else {
+			csignew.add_argument (new CCodeConstant ("0"));
+		}
 		csignew.add_argument (new CCodeConstant ("NULL"));
 		csignew.add_argument (new CCodeConstant ("NULL"));
 
diff --git a/vala/valasignal.vala b/vala/valasignal.vala
index b4dcc7d..941c770 100644
--- a/vala/valasignal.vala
+++ b/vala/valasignal.vala
@@ -52,6 +52,8 @@ public class Vala.Signal : Member, Lockable {
 	private Method generated_method;
 
 	private string cname;
+	private string _vfunc_name;
+	private string _flags;
 	
 	private bool lock_used = false;
 
@@ -136,6 +138,35 @@ public class Vala.Signal : Member, Lockable {
 	}
 	
 	/**
+	 * The name of the vfunc of the default signal handler 
+	 * as it is used in C code.
+	 * If null, no default handler is set.
+	 */
+	public string? vfunc_name {
+		get {
+			return _vfunc_name;
+		}
+		set {
+			_vfunc_name = value;
+		}
+	}
+
+	/**
+	 * The flags of the signal. Refer to GObject documentation: GSignalFlags.
+	 */
+	public string? flags {
+		get {
+			if(_flags == null) {
+				_flags = "G_SIGNAL_RUN_LAST";
+			}
+			return _flags;
+		}
+		set {
+			_flags = value;
+		}
+	}
+
+	/**
 	 * Returns the string literal of this signal to be used in C code.
 	 *
 	 * @return string literal to be used in C code
@@ -188,6 +219,12 @@ public class Vala.Signal : Member, Lockable {
 			if (a.name == "HasEmitter") {
 				has_emitter = true;
 			}
+			if (a.has_argument ("vfunc_name")) {
+				this.vfunc_name = a.get_string ("vfunc_name");
+			}
+			if (a.has_argument ("flags")) {
+				this.flags = a.get_string ("flags");
+			}
 		}
 	}
 	
