Commit 69508efc authored by Jürg Billeter's avatar Jürg Billeter Committed by Jürg Billeter
Browse files

don't use weak for value types make set_cname public add Gtk.Allocation,

2006-11-02  Jürg Billeter  <j@bitron.ch>

	* vala/valainterfacewriter.vala: don't use weak for value types
	* vala/valamethod.vala: make set_cname public
	* vapi/atk.vala, vapi/gdk-2.0.vala, vapi/gtk+-2.0.vala, vapi/pango.vala:
	  add Gtk.Allocation, don't use weak for value types

svn path=/trunk/; revision=161
parent 34e8984b
2006-11-02 Jürg Billeter <j@bitron.ch>
* vala/valainterfacewriter.vala: don't use weak for value types
* vala/valamethod.vala: make set_cname public
* vapi/atk.vala, vapi/gdk-2.0.vala, vapi/gtk+-2.0.vala, vapi/pango.vala:
add Gtk.Allocation, don't use weak for value types
2006-10-31 Jürg Billeter <j@bitron.ch>
* vala/valacodegenerator.vala: don't add NULL to end of variable
......
......@@ -236,7 +236,9 @@ public class Vala.InterfaceWriter : CodeVisitor {
write_indent ();
write_string ("public ");
if (!f.type_reference.takes_ownership) {
if (f.type_reference.data_type != null &&
f.type_reference.data_type.is_reference_type () &&
!f.type_reference.takes_ownership) {
write_string ("weak ");
}
write_string (f.type_reference.data_type.symbol.get_full_name ());
......
......@@ -244,7 +244,12 @@ public class Vala.Method : Member, Invokable {
}
}
private void set_cname (string cname) {
/**
* Sets the name of this method as it is used in C code.
*
* @param cname the name to be used in C code
*/
public void set_cname (string cname) {
this.cname = cname;
}
......
......@@ -757,13 +757,13 @@ namespace Atk {
}
[ReferenceType ()]
public struct KeyEventStruct {
public weak int type;
public weak uint state;
public weak uint keyval;
public weak int length;
public int type;
public uint state;
public uint keyval;
public int length;
public weak string string;
public weak ushort keycode;
public weak uint timestamp;
public ushort keycode;
public uint timestamp;
}
[ReferenceType ()]
public struct PropertyValues {
......@@ -772,26 +772,26 @@ namespace Atk {
public weak GLib.Value new_value;
}
public struct Rectangle {
public weak int x;
public weak int y;
public weak int width;
public weak int height;
public int x;
public int y;
public int width;
public int height;
[NoArrayLength ()]
public static GLib.Type get_type ();
}
[ReferenceType ()]
public struct TextRange {
public weak Atk.TextRectangle bounds;
public weak int start_offset;
public weak int end_offset;
public int start_offset;
public int end_offset;
public weak string content;
}
[ReferenceType ()]
public struct TextRectangle {
public weak int x;
public weak int y;
public weak int width;
public weak int height;
public int x;
public int y;
public int width;
public int height;
}
[ReferenceType ()]
public struct Focus {
......
......@@ -577,8 +577,8 @@ namespace Gdk {
DND,
}
public class Colormap : GLib.Object {
public weak int size;
public weak Gdk.Color colors;
public int size;
public Gdk.Color colors;
[NoArrayLength ()]
public bool alloc_color (Gdk.Color color, bool writeable, bool best_match);
[NoArrayLength ()]
......@@ -714,15 +714,15 @@ namespace Gdk {
public signal void display_opened (Gdk.Display display);
}
public class DragContext : GLib.Object {
public weak Gdk.DragProtocol protocol;
public weak bool is_source;
public Gdk.DragProtocol protocol;
public bool is_source;
public weak Gdk.Window source_window;
public weak Gdk.Window dest_window;
public weak GLib.List targets;
public weak Gdk.DragAction actions;
public weak Gdk.DragAction suggested_action;
public weak Gdk.DragAction action;
public weak uint start_time;
public Gdk.DragAction actions;
public Gdk.DragAction suggested_action;
public Gdk.DragAction action;
public uint start_time;
[NoArrayLength ()]
public static GLib.Type get_type ();
[NoArrayLength ()]
......@@ -859,16 +859,16 @@ namespace Gdk {
public virtual void set_values (Gdk.GCValues values, Gdk.GCValuesMask values_mask);
}
public class Image : GLib.Object {
public weak Gdk.ImageType type;
public Gdk.ImageType type;
public weak Gdk.Visual visual;
public weak Gdk.ByteOrder byte_order;
public weak int width;
public weak int height;
public weak ushort depth;
public weak ushort bpp;
public weak ushort bpl;
public weak ushort bits_per_pixel;
public weak pointer mem;
public Gdk.ByteOrder byte_order;
public int width;
public int height;
public ushort depth;
public ushort bpp;
public ushort bpl;
public ushort bits_per_pixel;
public pointer mem;
public weak Gdk.Colormap colormap;
[NoArrayLength ()]
public Gdk.Colormap get_colormap ();
......@@ -1458,27 +1458,27 @@ namespace Gdk {
}
[ReferenceType ()]
public struct BRESINFO {
public weak int minor_axis;
public weak int d;
public weak int m;
public weak int m1;
public weak int incr1;
public weak int incr2;
public int minor_axis;
public int d;
public int m;
public int m1;
public int incr1;
public int incr2;
}
[ReferenceType ()]
public struct EdgeTable {
public weak int ymax;
public weak int ymin;
public int ymax;
public int ymin;
public weak Gdk.ScanLineList scanlines;
}
[ReferenceType ()]
public struct EdgeTableEntry {
}
public struct Color {
public weak uint pixel;
public weak ushort red;
public weak ushort green;
public weak ushort blue;
public uint pixel;
public ushort red;
public ushort green;
public ushort blue;
[NoArrayLength ()]
[InstanceByReference ()]
public Gdk.Color copy ();
......@@ -1497,7 +1497,7 @@ namespace Gdk {
public static bool parse (string spec, Gdk.Color color);
}
public struct Cursor {
public weak Gdk.CursorType type;
public Gdk.CursorType type;
[NoArrayLength ()]
[InstanceByReference ()]
public Gdk.Display get_display ();
......@@ -1525,270 +1525,270 @@ namespace Gdk {
}
[ReferenceType ()]
public struct DeviceAxis {
public weak Gdk.AxisUse use;
public weak double min;
public weak double max;
public Gdk.AxisUse use;
public double min;
public double max;
}
[ReferenceType ()]
public struct DeviceKey {
public weak uint keyval;
public weak Gdk.ModifierType modifiers;
public uint keyval;
public Gdk.ModifierType modifiers;
}
[ReferenceType ()]
public struct DisplayPointerHooks {
}
[ReferenceType ()]
public struct EventAny {
public weak Gdk.EventType type;
public Gdk.EventType type;
public weak Gdk.Window window;
public weak char send_event;
public char send_event;
}
[ReferenceType ()]
public struct EventButton {
public weak Gdk.EventType type;
public Gdk.EventType type;
public weak Gdk.Window window;
public weak char send_event;
public weak uint time;
public weak double x;
public weak double y;
public weak double axes;
public weak uint state;
public weak uint button;
public char send_event;
public uint time;
public double x;
public double y;
public double axes;
public uint state;
public uint button;
public weak Gdk.Device device;
public weak double x_root;
public weak double y_root;
public double x_root;
public double y_root;
}
[ReferenceType ()]
public struct EventClient {
public weak Gdk.EventType type;
public Gdk.EventType type;
public weak Gdk.Window window;
public weak char send_event;
public weak Gdk.Atom message_type;
public weak ushort data_format;
public weak char b;
public char send_event;
public Gdk.Atom message_type;
public ushort data_format;
public char b;
}
[ReferenceType ()]
public struct EventConfigure {
public weak Gdk.EventType type;
public Gdk.EventType type;
public weak Gdk.Window window;
public weak char send_event;
public weak int x;
public weak int y;
public weak int width;
public weak int height;
public char send_event;
public int x;
public int y;
public int width;
public int height;
}
[ReferenceType ()]
public struct EventCrossing {
public weak Gdk.EventType type;
public Gdk.EventType type;
public weak Gdk.Window window;
public weak char send_event;
public char send_event;
public weak Gdk.Window subwindow;
public weak uint time;
public weak double x;
public weak double y;
public weak double x_root;
public weak double y_root;
public weak Gdk.CrossingMode mode;
public weak Gdk.NotifyType detail;
public weak bool focus;
public weak uint state;
public uint time;
public double x;
public double y;
public double x_root;
public double y_root;
public Gdk.CrossingMode mode;
public Gdk.NotifyType detail;
public bool focus;
public uint state;
}
[ReferenceType ()]
public struct EventDND {
public weak Gdk.EventType type;
public Gdk.EventType type;
public weak Gdk.Window window;
public weak char send_event;
public char send_event;
public weak Gdk.DragContext context;
public weak uint time;
public weak short x_root;
public weak short y_root;
public uint time;
public short x_root;
public short y_root;
}
[ReferenceType ()]
public struct EventExpose {
public weak Gdk.EventType type;
public Gdk.EventType type;
public weak Gdk.Window window;
public weak char send_event;
public weak Gdk.Rectangle area;
public char send_event;
public Gdk.Rectangle area;
public weak Gdk.Region region;
public weak int count;
public int count;
}
[ReferenceType ()]
public struct EventFocus {
public weak Gdk.EventType type;
public Gdk.EventType type;
public weak Gdk.Window window;
public weak char send_event;
public weak short @in;
public char send_event;
public short @in;
}
[ReferenceType ()]
public struct EventGrabBroken {
public weak Gdk.EventType type;
public Gdk.EventType type;
public weak Gdk.Window window;
public weak char send_event;
public weak bool keyboard;
public weak bool implicit;
public char send_event;
public bool keyboard;
public bool implicit;
public weak Gdk.Window grab_window;
}
[ReferenceType ()]
public struct EventKey {
public weak Gdk.EventType type;
public Gdk.EventType type;
public weak Gdk.Window window;
public weak char send_event;
public weak uint time;
public weak uint state;
public weak uint keyval;
public weak int length;
public char send_event;
public uint time;
public uint state;
public uint keyval;
public int length;
public weak string string;
public weak ushort hardware_keycode;
public weak uchar group;
public weak uint is_modifier;
public ushort hardware_keycode;
public uchar group;
public uint is_modifier;
}
[ReferenceType ()]
public struct EventMotion {
public weak Gdk.EventType type;
public Gdk.EventType type;
public weak Gdk.Window window;
public weak char send_event;
public weak uint time;
public weak double x;
public weak double y;
public weak double axes;
public weak uint state;
public weak short is_hint;
public char send_event;
public uint time;
public double x;
public double y;
public double axes;
public uint state;
public short is_hint;
public weak Gdk.Device device;
public weak double x_root;
public weak double y_root;
public double x_root;
public double y_root;
}
[ReferenceType ()]
public struct EventNoExpose {
public weak Gdk.EventType type;
public Gdk.EventType type;
public weak Gdk.Window window;
public weak char send_event;
public char send_event;
}
[ReferenceType ()]
public struct EventOwnerChange {
public weak Gdk.EventType type;
public Gdk.EventType type;
public weak Gdk.Window window;
public weak char send_event;
public weak pointer owner;
public weak Gdk.OwnerChange reason;
public weak Gdk.Atom selection;
public weak uint time;
public weak uint selection_time;
public char send_event;
public pointer owner;
public Gdk.OwnerChange reason;
public Gdk.Atom selection;
public uint time;
public uint selection_time;
}
[ReferenceType ()]
public struct EventProperty {
public weak Gdk.EventType type;
public Gdk.EventType type;
public weak Gdk.Window window;
public weak char send_event;
public weak Gdk.Atom atom;
public weak uint time;
public weak uint state;
public char send_event;
public Gdk.Atom atom;
public uint time;
public uint state;
}
[ReferenceType ()]
public struct EventProximity {
public weak Gdk.EventType type;
public Gdk.EventType type;
public weak Gdk.Window window;
public weak char send_event;
public weak uint time;
public char send_event;
public uint time;
public weak Gdk.Device device;
}
[ReferenceType ()]
public struct EventScroll {
public weak Gdk.EventType type;
public Gdk.EventType type;
public weak Gdk.Window window;
public weak char send_event;
public weak uint time;
public weak double x;
public weak double y;
public weak uint state;
public weak Gdk.ScrollDirection direction;
public char send_event;
public uint time;
public double x;
public double y;
public uint state;
public Gdk.ScrollDirection direction;
public weak Gdk.Device device;
public weak double x_root;
public weak double y_root;
public double x_root;
public double y_root;
}
[ReferenceType ()]
public struct EventSelection {
public weak Gdk.EventType type;
public Gdk.EventType type;
public weak Gdk.Window window;
public weak char send_event;
public weak Gdk.Atom selection;
public weak Gdk.Atom target;
public weak Gdk.Atom property;
public weak uint time;
public weak pointer requestor;
public char send_event;
public Gdk.Atom selection;
public Gdk.Atom target;
public Gdk.Atom property;
public uint time;
public pointer requestor;
}
[ReferenceType ()]
public struct EventSetting {
public weak Gdk.EventType type;
public Gdk.EventType type;
public weak Gdk.Window window;
public weak char send_event;
public weak Gdk.SettingAction action;
public char send_event;
public Gdk.SettingAction action;
public weak string name;
}
[ReferenceType ()]
public struct EventVisibility {
public weak Gdk.EventType type;
public Gdk.EventType type;
public weak Gdk.Window window;
public weak char send_event;
public weak Gdk.VisibilityState state;
public char send_event;
public Gdk.VisibilityState state;
}
[ReferenceType ()]
public struct EventWindowState {
public weak Gdk.EventType type;
public Gdk.EventType type;
public weak Gdk.Window window;
public weak char send_event;
public weak Gdk.WindowState changed_mask;
public weak Gdk.WindowState new_window_state;
public char send_event;
public Gdk.WindowState changed_mask;
public Gdk.WindowState new_window_state;
}
public struct Font {
public weak Gdk.FontType type;
public weak int ascent;
public weak int descent;
public Gdk.FontType type;
public int ascent;
public int descent;
}
[ReferenceType ()]
public struct GCValues {
public weak Gdk.Color foreground;
public weak Gdk.Color background;
public weak Gdk.Font font;
public weak Gdk.Function function;
public weak Gdk.Fill fill;
public Gdk.Color foreground;
public Gdk.Color background;
public Gdk.Font font;
public Gdk.Function function;
public Gdk.Fill fill;
public weak Gdk.Pixmap tile;
public weak Gdk.Pixmap stipple;
public weak Gdk.Pixmap clip_mask;
public weak Gdk.SubwindowMode subwindow_mode;
public weak int ts_x_origin;
public weak int ts_y_origin;
public weak int clip_x_origin;
public weak int clip_y_origin;
public weak int graphics_exposures;
public weak int line_width;
public weak Gdk.LineStyle line_style;
public weak Gdk.CapStyle cap_style;
public weak Gdk.JoinStyle join_style;
public Gdk.SubwindowMode subwindow_mode;
public int ts_x_origin;
public int ts_y_origin;
public int clip_x_origin;
public int clip_y_origin;
public int graphics_exposures;
public int line_width;
public Gdk.LineStyle line_style;
public Gdk.CapStyle cap_style;
public Gdk.JoinStyle join_style;
}
[ReferenceType ()]
public struct Geometry {
public weak int min_width;
public weak int min_height;
public weak int max_width;
public weak int max_height;
public weak int base_width;
public weak int base_height;
public weak int width_inc;
public weak int height_inc;
public weak double min_aspect;
public weak double max_aspect;
public weak Gdk.Gravity win_gravity;
public int min_width;
public int min_height;
public int max_width;
public int max_height;