2008-07-17 Jürg Billeter <j@bitron.ch>
+ * vala/valaformalparameter.vala:
+ * vala/valainterfacewriter.vala:
+ * gobject/valaccodeinvocationexpressionbinding.vala:
+
+ Support [CCode (type = "Foo")] for parameters,
+ based on patch by Daniel Svensson, fixes bug 543073
+
+ * vapigen/valagidlparser.vala:
+
+ Add support for ctype metadata attribute for parameters
+
+ * vapi/packages/gtk+-2.0/:
+
+ Fix gtk_menu_shell_append binding
+
+ * vapi/gtk+-2.0.vapi: regenerated
+
+2008-07-17 Jürg Billeter <j@bitron.ch>
+
* vala/valaarraytype.vala:
Fix symbol dependency calculation for arrays, fixes bug 537255
ccall_expr = ccomma;
}
+
+ if (param.ctype != null) {
+ cexpr = new CCodeCastExpression (cexpr, param.ctype);
+ }
}
arg_pos = codegen.get_param_pos (param.cparameter_position, ellipsis);
} else {
*/
public double cdelegate_target_parameter_position { get; set; }
+ /**
+ * Specifies the type of the parameter in the C function.
+ */
+ public string? ctype { get; set; }
+
private DataType _data_type;
/**
}
private void process_ccode_attribute (Attribute a) {
+ if (a.has_argument ("type")) {
+ ctype = a.get_string ("type");
+ }
if (a.has_argument ("array_length_pos")) {
carray_length_parameter_position = a.get_double ("array_length_pos");
}
var ccode_params = new StringBuilder ();
var separator = "";
+ if (param.ctype != null) {
+ ccode_params.append_printf ("%stype = \"%s\"", separator, param.ctype);
+ separator = ", ";
+ }
if (!float_equal (param.carray_length_parameter_position, i + 0.1)) {
ccode_params.append_printf ("%sarray_length_pos = %g", separator, param.carray_length_parameter_position);
separator = ", ";
public uint menu_flag;
public uint ignore_enter;
public void activate_item (Gtk.Widget menu_item, bool force_deactivate);
- public void append (Gtk.MenuItem child);
+ public void append ([CCode (type = "GtkWidget*")] Gtk.MenuItem child);
public void deselect ();
public bool get_take_focus ();
public void prepend (Gtk.Widget child);
GtkMenuShell.children type_arguments="MenuItem" weak="0"
GtkMenuShell::cancel has_emitter="1"
GtkMenuShell::deactivate has_emitter="1"
-gtk_menu_shell_append.child type_name="MenuItem"
+gtk_menu_shell_append.child type_name="MenuItem" ctype="GtkWidget*"
gtk_message_dialog_new ellipsis="1"
gtk_message_dialog_new.parent nullable="1"
gtk_message_dialog_new_with_markup ellipsis="1"
delegate_target_pos = eval (nv[1]).to_double ();
} else if (nv[0] == "type_name") {
((UnresolvedType) param_type).unresolved_symbol = new UnresolvedSymbol (null, eval (nv[1]));
+ } else if (nv[0] == "ctype") {
+ p.ctype = eval (nv[1]);
} else if (nv[0] == "type_arguments") {
var type_args = eval (nv[1]).split (",");
foreach (string type_arg in type_args) {