Commit d6e31866 authored by Jürg Billeter's avatar Jürg Billeter Committed by Jürg Billeter

Replace `pointer' by `void*' in all bindings and remove pointer struct

2008-04-19  Juerg Billeter  <j@bitron.ch>

	Replace `pointer' by `void*' in all bindings and remove pointer
	struct from GLib bindings, fixes bug 510085

svn path=/trunk/; revision=1271
parent 32b6153f
2008-04-19 Jürg Billeter <j@bitron.ch>
Replace `pointer' by `void*' in all bindings and remove pointer
struct from GLib bindings, fixes bug 510085
2008-04-20 Marc-Andre Lureau <marcandre.lureau@gmail.com>
* vapi/glib-2.0.vapi: replace 'pointer' by 'void*'
......
......@@ -2118,7 +2118,8 @@ public class Vala.Parser : CodeVisitor {
var access = parse_access_modifier ();
var flags = parse_member_declaration_modifiers ();
var type = parse_type ();
if (!((UnresolvedType) type).is_weak) {
var ut = type as UnresolvedType;
if (ut != null && !ut.is_weak) {
type.takes_ownership = true;
}
string id = parse_identifier ();
......@@ -2703,7 +2704,8 @@ public class Vala.Parser : CodeVisitor {
case TokenType.WEAK:
case TokenType.IDENTIFIER:
var type = parse_type ();
if (!((UnresolvedType) type).is_weak) {
var ut = type as UnresolvedType;
if (ut != null && !ut.is_weak) {
type.takes_ownership = true;
}
list.add (type);
......
......@@ -2,18 +2,18 @@
[CCode (cprefix = "Atk", lower_case_cprefix = "atk_")]
namespace Atk {
[CCode (cprefix = "ATK_XY_", cheader_filename = "atk/atk.h")]
[CCode (cprefix = "ATK_XY_", has_type_id = "0", cheader_filename = "atk/atk.h")]
public enum CoordType {
SCREEN,
WINDOW,
WINDOW
}
[CCode (cprefix = "ATK_KEY_EVENT_", cheader_filename = "atk/atk.h")]
[CCode (cprefix = "ATK_KEY_EVENT_", has_type_id = "0", cheader_filename = "atk/atk.h")]
public enum KeyEventType {
PRESS,
RELEASE,
LAST_DEFINED,
LAST_DEFINED
}
[CCode (cprefix = "ATK_LAYER_", cheader_filename = "atk/atk.h")]
[CCode (cprefix = "ATK_LAYER_", has_type_id = "0", cheader_filename = "atk/atk.h")]
public enum Layer {
INVALID,
BACKGROUND,
......@@ -22,9 +22,9 @@ namespace Atk {
MDI,
POPUP,
OVERLAY,
WINDOW,
WINDOW
}
[CCode (cprefix = "ATK_RELATION_", cheader_filename = "atk/atk.h")]
[CCode (cprefix = "ATK_RELATION_", has_type_id = "0", cheader_filename = "atk/atk.h")]
public enum RelationType {
NULL,
CONTROLLED_BY,
......@@ -42,9 +42,9 @@ namespace Atk {
PARENT_WINDOW_OF,
DESCRIBED_BY,
DESCRIPTION_FOR,
LAST_DEFINED,
LAST_DEFINED
}
[CCode (cprefix = "ATK_ROLE_", cheader_filename = "atk/atk.h")]
[CCode (cprefix = "ATK_ROLE_", has_type_id = "0", cheader_filename = "atk/atk.h")]
public enum Role {
INVALID,
ACCEL_LABEL,
......@@ -134,9 +134,9 @@ namespace Atk {
FORM,
LINK,
INPUT_METHOD_WINDOW,
LAST_DEFINED,
LAST_DEFINED
}
[CCode (cprefix = "ATK_STATE_", cheader_filename = "atk/atk.h")]
[CCode (cprefix = "ATK_STATE_", has_type_id = "0", cheader_filename = "atk/atk.h")]
public enum StateType {
INVALID,
ACTIVE,
......@@ -177,9 +177,9 @@ namespace Atk {
DEFAULT,
ANIMATED,
VISITED,
LAST_DEFINED,
LAST_DEFINED
}
[CCode (cprefix = "ATK_TEXT_ATTR_", cheader_filename = "atk/atk.h")]
[CCode (cprefix = "ATK_TEXT_ATTR_", has_type_id = "0", cheader_filename = "atk/atk.h")]
public enum TextAttribute {
INVALID,
LEFT_MARGIN,
......@@ -209,9 +209,9 @@ namespace Atk {
STRETCH,
VARIANT,
STYLE,
LAST_DEFINED,
LAST_DEFINED
}
[CCode (cprefix = "ATK_TEXT_BOUNDARY_", cheader_filename = "atk/atk.h")]
[CCode (cprefix = "ATK_TEXT_BOUNDARY_", has_type_id = "0", cheader_filename = "atk/atk.h")]
public enum TextBoundary {
CHAR,
WORD_START,
......@@ -219,19 +219,19 @@ namespace Atk {
SENTENCE_START,
SENTENCE_END,
LINE_START,
LINE_END,
LINE_END
}
[CCode (cprefix = "ATK_TEXT_CLIP_", cheader_filename = "atk/atk.h")]
[CCode (cprefix = "ATK_TEXT_CLIP_", has_type_id = "0", cheader_filename = "atk/atk.h")]
public enum TextClipType {
NONE,
MIN,
MAX,
BOTH,
BOTH
}
[CCode (cprefix = "ATK_HYPERLINK_IS_", cheader_filename = "atk/atk.h")]
[CCode (cprefix = "ATK_HYPERLINK_IS_", has_type_id = "0", cheader_filename = "atk/atk.h")]
[Flags]
public enum HyperlinkStateFlags {
INLINE,
INLINE
}
[CCode (cheader_filename = "atk/atk.h")]
public class Attribute {
......@@ -247,6 +247,7 @@ namespace Atk {
public uint state;
public uint keyval;
public int length;
[CCode (cname = "string")]
public weak string str;
public ushort keycode;
public uint timestamp;
......@@ -339,7 +340,7 @@ namespace Atk {
public virtual weak string get_name ();
public virtual weak Atk.Object get_parent ();
public virtual Atk.Role get_role ();
public virtual void initialize (pointer data);
public virtual void initialize (void* data);
[NoWrapper]
public virtual weak Atk.Object ref_child (int i);
public virtual weak Atk.RelationSet ref_relation_set ();
......@@ -379,10 +380,10 @@ namespace Atk {
public weak Atk.Object accessible_table_summary { get; set; }
[NoAccessorMethod]
public weak double accessible_value { get; set; }
public signal void active_descendant_changed (pointer child);
public signal void children_changed (uint change_index, pointer changed_child);
public signal void active_descendant_changed (void* child);
public signal void children_changed (uint change_index, void* changed_child);
public signal void focus_event (bool focus_in);
public signal void property_change (pointer values);
public signal void property_change (void* values);
public signal void state_change (string name, bool state_set);
public signal void visible_data_changed ();
}
......@@ -446,7 +447,7 @@ namespace Atk {
[NoWrapper]
public virtual uint add_global_event_listener (GLib.SignalEmissionHook listener, string event_type);
[NoWrapper]
public virtual uint add_key_event_listener (Atk.KeySnoopFunc listener, pointer data);
public virtual uint add_key_event_listener (Atk.KeySnoopFunc listener, void* data);
[NoWrapper]
public virtual weak Atk.Object get_root ();
[NoWrapper]
......@@ -492,7 +493,7 @@ namespace Atk {
public weak Atk.AttributeSet get_attributes ();
public weak string get_locale ();
public bool set_attribute_value (string attribute_name, string attribute_value);
public abstract pointer get_document ();
public abstract void* get_document ();
[NoWrapper]
public abstract weak string get_document_attribute_value (string attribute_name);
[NoWrapper]
......@@ -651,7 +652,7 @@ namespace Atk {
[CCode (cheader_filename = "atk/atk.h")]
public delegate bool Function ();
[CCode (cheader_filename = "atk/atk.h")]
public static delegate int KeySnoopFunc (Atk.KeyEventStruct event, pointer func_data);
public static delegate int KeySnoopFunc (Atk.KeyEventStruct event, void* func_data);
[CCode (cheader_filename = "atk/atk.h")]
public static delegate void PropertyChangeHandler (Atk.Object p1, Atk.PropertyValues p2);
[CCode (cheader_filename = "atk/atk.h")]
......@@ -659,7 +660,7 @@ namespace Atk {
[CCode (cheader_filename = "atk/atk.h")]
public static uint add_global_event_listener (GLib.SignalEmissionHook listener, string event_type);
[CCode (cheader_filename = "atk/atk.h")]
public static uint add_key_event_listener (Atk.KeySnoopFunc listener, pointer data);
public static uint add_key_event_listener (Atk.KeySnoopFunc listener, void* data);
[CCode (cheader_filename = "atk/atk.h")]
public static void focus_tracker_init (Atk.EventListenerInit init);
[CCode (cheader_filename = "atk/atk.h")]
......
......@@ -405,7 +405,7 @@ namespace Cairo {
public SurfaceType get_type ();
public Status write_to_png (string filename);
public Status write_to_png_stream (WriteFunc write_func, pointer closure);
public Status write_to_png_stream (WriteFunc write_func, void* closure);
}
public enum Content {
......@@ -452,7 +452,7 @@ namespace Cairo {
[CCode (cname = "cairo_image_surface_create_from_png")]
public ImageSurface.from_png (string filename);
[CCode (cname = "cairo_image_surface_create_from_png_stream")]
public ImageSurface.from_png_stream (ReadFunc read_func, pointer closure);
public ImageSurface.from_png_stream (ReadFunc read_func, void* closure);
}
[CCode (cname = "cairo_surface_t", cheader_filename = "cairo-pdf.h")]
......@@ -460,19 +460,19 @@ namespace Cairo {
[CCode (cname = "cairo_pdf_surface_create")]
public PdfSurface (string filename, double width_in_points, double height_in_points);
[CCode (cname = "cairo_pdf_surface_create_for_stream")]
public PdfSurface.for_stream (WriteFunc write_func, pointer closure, double width_in_points, double height_in_points);
public PdfSurface.for_stream (WriteFunc write_func, void* closure, double width_in_points, double height_in_points);
public void set_size (double width_in_points, double height_in_points);
}
public static delegate Status ReadFunc (pointer closure, uchar[] data);
public static delegate Status WriteFunc (pointer closure, uchar[] data);
public static delegate Status ReadFunc (void* closure, uchar[] data);
public static delegate Status WriteFunc (void* closure, uchar[] data);
[CCode (cname = "cairo_surface_t", cheader_filename = "cairo-ps.h")]
public class PsSurface : Surface {
[CCode (cname = "cairo_ps_surface_create")]
public PsSurface (string filename, double width_in_points, double height_in_points);
[CCode (cname = "cairo_ps_surface_create_for_stream")]
public PsSurface.for_stream (WriteFunc write_func, pointer closure, double width_in_points, double height_in_points);
public PsSurface.for_stream (WriteFunc write_func, void* closure, double width_in_points, double height_in_points);
public void set_size (double width_in_points, double height_in_points);
public void dsc_begin_setup ();
public void dsc_begin_page_setup ();
......@@ -484,7 +484,7 @@ namespace Cairo {
[CCode (cname = "cairo_svg_surface_create")]
public SvgSurface (string filename, double width_in_points, double height_in_points);
[CCode (cname = "cairo_svg_surface_create_for_stream")]
public SvgSurface.for_stream (WriteFunc write_func, pointer closure, double width_in_points, double height_in_points);
public SvgSurface.for_stream (WriteFunc write_func, void* closure, double width_in_points, double height_in_points);
public void restrict_to_version (SvgVersion version);
public static void get_versions (out SvgVersion[] versions);
}
......@@ -498,15 +498,15 @@ namespace Cairo {
[CCode (cname = "cairo_surface_t", cheader_filename = "cairo-xlib.h")]
public class XlibSurface : Surface {
[CCode (cname = "cairo_xlib_surface_create")]
public XlibSurface (pointer dpy, int drawable, pointer visual, int width, int height);
public XlibSurface (void* dpy, int drawable, void* visual, int width, int height);
[CCode (cname = "cairo_xlib_surface_create_for_bitmap")]
public XlibSurface.for_bitmap (pointer dpy, int bitmap, pointer screen, int width, int height);
public XlibSurface.for_bitmap (void* dpy, int bitmap, void* screen, int width, int height);
public void set_size (int width, int height);
public pointer get_display ();
public pointer get_screen ();
public void* get_display ();
public void* get_screen ();
public void set_drawable (int drawable, int width, int height);
public int get_drawable ();
public pointer get_visual ();
public void* get_visual ();
public int get_width ();
public int get_height ();
public int get_depth ();
......
......@@ -2,19 +2,19 @@
[CCode (cprefix = "GConf", lower_case_cprefix = "gconf_")]
namespace GConf {
[CCode (cprefix = "GCONF_CLIENT_HANDLE_", cheader_filename = "gconf/gconf.h")]
[CCode (cprefix = "GCONF_CLIENT_HANDLE_", has_type_id = "0", cheader_filename = "gconf/gconf.h")]
public enum ClientErrorHandlingMode {
NONE,
UNRETURNED,
ALL,
ALL
}
[CCode (cprefix = "GCONF_CLIENT_PRELOAD_", cheader_filename = "gconf/gconf.h")]
[CCode (cprefix = "GCONF_CLIENT_PRELOAD_", has_type_id = "0", cheader_filename = "gconf/gconf.h")]
public enum ClientPreloadType {
NONE,
ONELEVEL,
RECURSIVE,
RECURSIVE
}
[CCode (cprefix = "GCONF_ERROR_", cheader_filename = "gconf/gconf.h")]
[CCode (cprefix = "GCONF_ERROR_", has_type_id = "0", cheader_filename = "gconf/gconf.h")]
public enum Error {
SUCCESS,
FAILED,
......@@ -32,9 +32,9 @@ namespace GConf {
LOCAL_ENGINE,
LOCK_FAILED,
NO_WRITABLE_DATABASE,
IN_SHUTDOWN,
IN_SHUTDOWN
}
[CCode (cprefix = "GCONF_VALUE_", cheader_filename = "gconf/gconf.h")]
[CCode (cprefix = "GCONF_VALUE_", has_type_id = "0", cheader_filename = "gconf/gconf.h")]
public enum ValueType {
INVALID,
STRING,
......@@ -43,12 +43,12 @@ namespace GConf {
BOOL,
SCHEMA,
LIST,
PAIR,
PAIR
}
[CCode (cprefix = "GCONF_UNSET_INCLUDING_SCHEMA_", cheader_filename = "gconf/gconf.h")]
[CCode (cprefix = "GCONF_UNSET_INCLUDING_SCHEMA_", has_type_id = "0", cheader_filename = "gconf/gconf.h")]
[Flags]
public enum UnsetFlags {
NAMES,
NAMES
}
[CCode (ref_function = "gconf_engine_ref", unref_function = "gconf_engine_unref", cheader_filename = "gconf/gconf.h")]
public class Engine {
......@@ -69,10 +69,10 @@ namespace GConf {
public static weak GConf.Engine get_for_addresses (GLib.SList addresses) throws GLib.Error;
public int get_int (string key) throws GLib.Error;
public weak GLib.SList get_list (string key, GConf.ValueType list_type) throws GLib.Error;
public bool get_pair (string key, GConf.ValueType car_type, GConf.ValueType cdr_type, pointer car_retloc, pointer cdr_retloc) throws GLib.Error;
public bool get_pair (string key, GConf.ValueType car_type, GConf.ValueType cdr_type, void* car_retloc, void* cdr_retloc) throws GLib.Error;
public weak GConf.Schema get_schema (string key) throws GLib.Error;
public weak string get_string (string key) throws GLib.Error;
public pointer get_user_data ();
public void* get_user_data ();
public weak GConf.Value get_with_locale (string key, string locale) throws GLib.Error;
public weak GConf.Value get_without_default (string key) throws GLib.Error;
public bool key_is_writable (string key) throws GLib.Error;
......@@ -85,10 +85,10 @@ namespace GConf {
public bool set_float (string key, double val) throws GLib.Error;
public bool set_int (string key, int val) throws GLib.Error;
public bool set_list (string key, GConf.ValueType list_type, GLib.SList list) throws GLib.Error;
public bool set_pair (string key, GConf.ValueType car_type, GConf.ValueType cdr_type, pointer address_of_car, pointer address_of_cdr) throws GLib.Error;
public bool set_pair (string key, GConf.ValueType car_type, GConf.ValueType cdr_type, void* address_of_car, void* address_of_cdr) throws GLib.Error;
public bool set_schema (string key, GConf.Schema val) throws GLib.Error;
public bool set_string (string key, string val) throws GLib.Error;
public void set_user_data (pointer data, GLib.DestroyNotify dnotify);
public void set_user_data (void* data, GLib.DestroyNotify dnotify);
public void suggest_sync () throws GLib.Error;
public bool unset (string key) throws GLib.Error;
}
......@@ -119,10 +119,10 @@ namespace GConf {
}
[CCode (cheader_filename = "gconf/gconf.h")]
public class Listeners {
public uint add (string listen_point, pointer listener_data, GLib.FreeFunc destroy_notify);
public uint add (string listen_point, void* listener_data, GLib.FreeFunc destroy_notify);
public uint count ();
public void @foreach (GConf.ListenersForeach callback);
public bool get_data (uint cnxn_id, pointer listener_data_p, string location_p);
public bool get_data (uint cnxn_id, void* listener_data_p, string location_p);
public Listeners ();
public void notify (string all_above, GConf.ListenersCallback callback);
public void remove (uint cnxn_id);
......@@ -201,7 +201,7 @@ namespace GConf {
public bool check_value (string key, out weak GConf.Value value_retloc);
public void clear ();
public void @foreach (GConf.ChangeSetForeachFunc func);
public pointer get_user_data ();
public void* get_user_data ();
public ChangeSet ();
public void remove (string key);
public void set (string key, GConf.Value value);
......@@ -210,10 +210,10 @@ namespace GConf {
public void set_int (string key, int val);
public void set_list (string key, GConf.ValueType list_type, GLib.SList list);
public void set_nocopy (string key, GConf.Value value);
public void set_pair (string key, GConf.ValueType car_type, GConf.ValueType cdr_type, pointer address_of_car, pointer address_of_cdr);
public void set_pair (string key, GConf.ValueType car_type, GConf.ValueType cdr_type, void* address_of_car, void* address_of_cdr);
public void set_schema (string key, GConf.Schema val);
public void set_string (string key, string val);
public void set_user_data (pointer data, GLib.DestroyNotify dnotify);
public void set_user_data (void* data, GLib.DestroyNotify dnotify);
public uint size ();
public void unset (string key);
}
......@@ -227,7 +227,7 @@ namespace GConf {
public weak GLib.SList notify_list;
public uint notify_handler;
public int pending_notify_count;
public pointer pad1;
public void* pad1;
public int pad2;
public void add_dir (string dir, GConf.ClientPreloadType preload) throws GLib.Error;
public weak GLib.SList all_dirs (string dir) throws GLib.Error;
......@@ -246,7 +246,7 @@ namespace GConf {
public static weak GConf.Client get_for_engine (GConf.Engine engine);
public int get_int (string key) throws GLib.Error;
public weak GLib.SList get_list (string key, GConf.ValueType list_type) throws GLib.Error;
public bool get_pair (string key, GConf.ValueType car_type, GConf.ValueType cdr_type, pointer car_retloc, pointer cdr_retloc) throws GLib.Error;
public bool get_pair (string key, GConf.ValueType car_type, GConf.ValueType cdr_type, void* car_retloc, void* cdr_retloc) throws GLib.Error;
public weak GConf.Schema get_schema (string key) throws GLib.Error;
public weak string get_string (string key) throws GLib.Error;
public weak GConf.Value get_without_default (string key) throws GLib.Error;
......@@ -265,17 +265,17 @@ namespace GConf {
public static void set_global_default_error_handler (GConf.ClientErrorHandlerFunc func);
public bool set_int (string key, int val) throws GLib.Error;
public bool set_list (string key, GConf.ValueType list_type, GLib.SList list) throws GLib.Error;
public bool set_pair (string key, GConf.ValueType car_type, GConf.ValueType cdr_type, pointer address_of_car, pointer address_of_cdr) throws GLib.Error;
public bool set_pair (string key, GConf.ValueType car_type, GConf.ValueType cdr_type, void* address_of_car, void* address_of_cdr) throws GLib.Error;
public bool set_schema (string key, GConf.Schema val) throws GLib.Error;
public bool set_string (string key, string val) throws GLib.Error;
public void suggest_sync () throws GLib.Error;
public bool unset (string key) throws GLib.Error;
[HasEmitter]
public signal void error (pointer error);
public signal void error (void* error);
[HasEmitter]
public signal void unreturned_error (pointer error);
public signal void unreturned_error (void* error);
[HasEmitter]
public signal void value_changed (string key, pointer value);
public signal void value_changed (string key, void* value);
}
[CCode (cheader_filename = "gconf/gconf.h")]
public delegate void ChangeSetForeachFunc (GConf.ChangeSet cs, string key, GConf.Value value);
......@@ -284,11 +284,11 @@ namespace GConf {
[CCode (cheader_filename = "gconf/gconf.h")]
public delegate void ClientNotifyFunc (GConf.Client client, uint cnxn_id, GConf.Entry entry);
[CCode (cheader_filename = "gconf/gconf.h")]
public delegate void ListenersCallback (GConf.Listeners listeners, string all_above_key, uint cnxn_id, pointer listener_data);
public delegate void ListenersCallback (GConf.Listeners listeners, string all_above_key, uint cnxn_id, void* listener_data);
[CCode (cheader_filename = "gconf/gconf.h")]
public delegate void ListenersForeach (string location, uint cnxn_id, pointer listener_data);
public delegate void ListenersForeach (string location, uint cnxn_id, void* listener_data);
[CCode (cheader_filename = "gconf/gconf.h")]
public delegate bool ListenersPredicate (string location, uint cnxn_id, pointer listener_data);
public delegate bool ListenersPredicate (string location, uint cnxn_id, void* listener_data);
[CCode (cheader_filename = "gconf/gconf.h")]
public delegate void NotifyFunc (GConf.Engine conf, uint cnxn_id, GConf.Entry entry);
[CCode (cheader_filename = "gconf/gconf.h")]
......
......@@ -582,7 +582,7 @@ namespace Gdk {
public char send_event;
public Gdk.Atom message_type;
public ushort data_format;
public pointer data;
public void* data;
}
[CCode (cheader_filename = "gdk/gdk.h")]
public class EventConfigure {
......@@ -847,7 +847,7 @@ namespace Gdk {
public Gdk.OverlapType rect_in (Gdk.Rectangle rectangle);
public static weak Gdk.Region rectangle (Gdk.Rectangle rectangle);
public void shrink (int dx, int dy);
public void spans_intersect_foreach (Gdk.Span[] spans, bool sorted, Gdk.SpanFunc function, pointer data);
public void spans_intersect_foreach (Gdk.Span[] spans, bool sorted, Gdk.SpanFunc function, void* data);
public void subtract (Gdk.Region source2);
public void union (Gdk.Region source2);
public void union_with_rect (Gdk.Rectangle rect);
......@@ -942,7 +942,7 @@ namespace Gdk {
public weak Gdk.Screen get_screen ();
public bool get_state (Gdk.ModifierType state);
public uint get_time ();
public static void handler_set (Gdk.EventFunc func, pointer data, GLib.DestroyNotify notify);
public static void handler_set (Gdk.EventFunc func, void* data, GLib.DestroyNotify notify);
public Event (Gdk.EventType type);
public static weak Gdk.Event peek ();
public void put ();
......@@ -957,7 +957,7 @@ namespace Gdk {
public int size;
public Gdk.Color colors;
public weak Gdk.Visual visual;
public pointer windowing_data;
public void* windowing_data;
public bool alloc_color (Gdk.Color color, bool writeable, bool best_match);
public int alloc_colors (Gdk.Color[] colors, int ncolors, bool writeable, bool best_match, bool success);
public void free_colors (Gdk.Color[] colors, int ncolors);
......@@ -1005,7 +1005,7 @@ namespace Gdk {
public int[] button_x;
[NoArrayLength]
public int[] button_y;
public void add_client_message_filter (Gdk.Atom message_type, Gdk.FilterFunc func, pointer data);
public void add_client_message_filter (Gdk.Atom message_type, Gdk.FilterFunc func, void* data);
public void beep ();
public void close ();
public void flush ();
......@@ -1067,7 +1067,7 @@ namespace Gdk {
public Gdk.DragAction suggested_action;
public Gdk.DragAction action;
public uint start_time;
public pointer windowing_data;
public void* windowing_data;
public DragContext ();
}
[CCode (cheader_filename = "gdk/gdk.h")]
......@@ -1163,9 +1163,9 @@ namespace Gdk {
public ushort bpp;
public ushort bpl;
public ushort bits_per_pixel;
public pointer mem;
public void* mem;
public weak Gdk.Colormap colormap;
public pointer windowing_data;
public void* windowing_data;
public weak Gdk.Colormap get_colormap ();
public uint get_pixel (int x, int y);
public Image (Gdk.ImageType type, Gdk.Visual visual, int width, int height);
......@@ -1254,7 +1254,7 @@ namespace Gdk {
public void set_resolution (double dpi);
public static int width ();
public static int width_mm ();
public weak pointer font_options { get; set; }
public weak void* font_options { get; set; }
public weak double resolution { get; set; }
public signal void composited_changed ();
public signal void size_changed ();
......@@ -1286,7 +1286,7 @@ namespace Gdk {
}
[CCode (cheader_filename = "gdk/gdk.h")]
public class Window : Gdk.Drawable {
public void add_filter (Gdk.FilterFunc function, pointer data);
public void add_filter (Gdk.FilterFunc function, void* data);
public static weak Gdk.Window at_pointer (int win_x, int win_y);
public void beep ();
public void begin_move_drag (int button, int root_x, int root_y, uint timestamp);
......@@ -1326,7 +1326,7 @@ namespace Gdk {
public static weak GLib.List get_toplevels ();
public Gdk.WindowTypeHint get_type_hint ();
public weak Gdk.Region get_update_area ();
public void get_user_data (pointer data);
public void get_user_data (void* data);
public Gdk.WindowType get_window_type ();
public void hide ();
public void iconify ();
......@@ -1352,7 +1352,7 @@ namespace Gdk {
public void process_updates (bool update_children);
public void raise ();
public void register_dnd ();
public void remove_filter (Gdk.FilterFunc function, pointer data);
public void remove_filter (Gdk.FilterFunc function, void* data);
public void reparent (Gdk.Window new_parent, int x, int y);
public void resize (int width, int height);
public void scroll (int dx, int dy);
......@@ -1387,7 +1387,7 @@ namespace Gdk {
public void set_transient_for (Gdk.Window parent);
public void set_type_hint (Gdk.WindowTypeHint hint);
public void set_urgency_hint (bool urgent);
public void set_user_data (pointer user_data);
public void set_user_data (void* user_data);
public void shape_combine_mask (Gdk.Bitmap mask, int x, int y);
public void shape_combine_region (Gdk.Region shape_region, int offset_x, int offset_y);
public void show ();
......@@ -1454,7 +1454,7 @@ namespace Gdk {
[CCode (cheader_filename = "gdk/gdk.h")]
public delegate Gdk.FilterReturn FilterFunc (Gdk.XEvent xevent, Gdk.Event event);
[CCode (cheader_filename = "gdk/gdk.h")]
public static delegate void InputFunction (pointer data, int source, Gdk.InputCondition condition);
public static delegate void InputFunction (void* data, int source, Gdk.InputCondition condition);
[CCode (cheader_filename = "gdk/gdk.h")]
public delegate void SpanFunc (Gdk.Span span);
public const Gdk.Atom SELECTION_PRIMARY;
......@@ -1465,7 +1465,7 @@ namespace Gdk {
public const int PARENT_RELATIVE;
public const int PRIORITY_REDRAW;
[CCode (cheader_filename = "gdk/gdk.h")]
public static void add_client_message_filter (Gdk.Atom message_type, Gdk.FilterFunc func, pointer data);
public static void add_client_message_filter (Gdk.Atom message_type, Gdk.FilterFunc func, void* data);
[CCode (cheader_filename = "gdk/gdk.h")]
public static void add_option_entries_libgtk_only (GLib.OptionGroup group);
[CCode (cheader_filename = "gdk/gdk.h")]
......@@ -1721,13 +1721,13 @@ namespace Gdk {
[CCode (cheader_filename = "gdk/gdk.h")]
public static int text_property_to_utf8_list_for_display (Gdk.Display display, Gdk.Atom encoding, int format, uchar[] text, int length, string list);
[CCode (cheader_filename = "gdk/gdk.h")]
public static uint threads_add_idle (GLib.SourceFunc function, pointer data);
public static uint threads_add_idle (GLib.SourceFunc function, void* data);
[CCode (cheader_filename = "gdk/gdk.h")]
public static uint threads_add_idle_full (int priority, GLib.SourceFunc function, pointer data, GLib.DestroyNotify notify);
public static uint threads_add_idle_full (int priority, GLib.SourceFunc function, void* data, GLib.DestroyNotify notify);
[CCode (cheader_filename = "gdk/gdk.h")]
public static uint threads_add_timeout (uint interval, GLib.SourceFunc function, pointer data);
public static uint threads_add_timeout (uint interval, GLib.SourceFunc function, void* data);
[CCode (cheader_filename = "gdk/gdk.h")]
public static uint threads_add_timeout_full (int priority, uint interval, GLib.SourceFunc function, pointer data, GLib.DestroyNotify notify);
public static uint threads_add_timeout_full (int priority, uint interval, GLib.SourceFunc function, void* data, GLib.DestroyNotify notify);
[CCode (cheader_filename = "gdk/gdk.h")]
public static void threads_enter ();
[CCode (cheader_filename = "gdk/gdk.h")]
......
......@@ -2,39 +2,39 @@
[CCode (cprefix = "Gdk", lower_case_cprefix = "gdk_")]
namespace Gdk {
[CCode (cprefix = "GDK_COLORSPACE_", cheader_filename = "gdk-pixbuf/gdk-pixdata.h")]
[CCode (cprefix = "GDK_COLORSPACE_", has_type_id = "0", cheader_filename = "gdk-pixbuf/gdk-pixdata.h")]
public enum Colorspace {
RGB,
RGB
}
[CCode (cprefix = "GDK_INTERP_", cheader_filename = "gdk-pixbuf/gdk-pixdata.h")]
[CCode (cprefix = "GDK_INTERP_", has_type_id = "0", cheader_filename = "gdk-pixbuf/gdk-pixdata.h")]
public enum InterpType {
NEAREST,
TILES,
BILINEAR,
HYPER,
HYPER
}
[CCode (cprefix = "GDK_PIXBUF_ALPHA_", cheader_filename = "gdk-pixbuf/gdk-pixdata.h")]
[CCode (cprefix = "GDK_PIXBUF_ALPHA_", has_type_id = "0", cheader_filename = "gdk-pixbuf/gdk-pixdata.h")]
public enum PixbufAlphaMode {
BILEVEL,
FULL,
FULL
}
[CCode (cprefix = "GDK_PIXBUF_ERROR_", cheader_filename = "gdk-pixbuf/gdk-pixdata.h")]
[CCode (cprefix = "GDK_PIXBUF_ERROR_", has_type_id = "0", cheader_filename = "gdk-pixbuf/gdk-pixdata.h")]
public enum PixbufError {
CORRUPT_IMAGE,
INSUFFICIENT_MEMORY,
BAD_OPTION,
UNKNOWN_TYPE,
UNSUPPORTED_OPERATION,
FAILED,
FAILED
}
[CCode (cprefix = "GDK_PIXBUF_ROTATE_", cheader_filename = "gdk-pixbuf/gdk-pixdata.h")]
[CCode (cprefix = "GDK_PIXBUF_ROTATE_", has_type_id = "0", cheader_filename = "gdk-pixbuf/gdk-pixdata.h")]
public enum PixbufRotation {
NONE,
COUNTERCLOCKWISE,
UPSIDEDOWN,
CLOCKWISE,
CLOCKWISE
}
[CCode (cprefix = "GDK_PIXDATA_DUMP_", cheader_filename = "gdk-pixbuf/gdk-pixdata.h")]
[CCode (cprefix = "GDK_PIXDATA_DUMP_", has_type_id = "0", cheader_filename = "gdk-pixbuf/gdk-pixdata.h")]
public enum PixdataDumpType {
PIXDATA_STREAM,
PIXDATA_STRUCT,
......@@ -43,9 +43,9 @@ namespace Gdk {
CTYPES,
STATIC,
CONST,
RLE_DECODER,
RLE_DECODER
}
[CCode (cprefix = "GDK_PIXDATA_", cheader_filename = "gdk-pixbuf/gdk-pixdata.h")]
[CCode (cprefix = "GDK_PIXDATA_", has_type_id = "0", cheader_filename = "gdk-pixbuf/gdk-pixdata.h")]
public enum PixdataType {
COLOR_TYPE_RGB,
COLOR_TYPE_RGBA,
......@@ -54,7 +54,7 @@ namespace Gdk {
SAMPLE_WIDTH_MASK,
ENCODING_RAW,
ENCODING_RLE,
ENCODING_MASK,
ENCODING_MASK
}
[CCode (cheader_filename = "gdk-pixbuf/gdk-pixdata.h")]
public class PixbufFormat {
......@@ -96,7 +96,7 @@ namespace Gdk {
public int get_rowstride ();
public int get_width ();
public Pixbuf (Gdk.Colorspace colorspace, bool has_alpha, int bits_per_sample, int width, int height);
public Pixbuf.from_data (uchar[] data, Gdk.Colorspace colorspace, bool has_alpha, int bits_per_sample, int width, int height, int rowstride, Gdk.PixbufDestroyNotify destroy_fn, pointer destroy_fn_data);
public Pixbuf.from_data (uchar[] data, Gdk.Colorspace colorspace, bool has_alpha, int bits_per_sample, int width, int height, int rowstride, Gdk.PixbufDestroyNotify destroy_fn, void* destroy_fn_data);
public Pixbuf.from_file (string filename) throws GLib.Error;
public Pixbuf.from_file_at_scale (string filename, int width, int height, bool preserve_aspect_ratio) throws GLib.Error;
public Pixbuf.from_file_at_size (string filename, int width, int height) throws GLib.Error;
......@@ -124,7 +124,7 @@ namespace Gdk {
[NoAccessorMethod]
public weak int n_channels { get; construct; }
[NoAccessorMethod]
public weak pointer pixels { get; construct; }
public weak void* pixels { get; construct; }
[NoAccessorMethod]
public weak int rowstride { get; construct; }
[NoAccessorMethod]
......@@ -181,7 +181,7 @@ namespace Gdk {
[NoArrayLength]
public uchar[] pixel_data;
public bool deserialize ([CCode (array_length_pos = 0.9)] uchar[] stream) throws GLib.Error;
public pointer from_pixbuf (Gdk.Pixbuf pixbuf, bool use_rle);
public void* from_pixbuf (Gdk.Pixbuf pixbuf, bool use_rle);
public weak uchar[] serialize ();
public weak GLib.StringBuilder to_csource (string name, Gdk.PixdataDumpType dump_type);
}
......
......@@ -245,8 +245,8 @@ namespace GLib {
public ulong get_buffer_size ();
public BufferedInputStream (GLib.InputStream base_stream);
public BufferedInputStream.sized (GLib.InputStream base_stream, ulong size);
public ulong peek (pointer buffer, ulong offset, ulong count);
public pointer peek_buffer (ulong count);
public ulong peek (void* buffer, ulong offset, ulong count);
public void* peek_buffer (ulong count);
public int read_byte (GLib.Cancellable cancellable) throws GLib.Error;
public void set_buffer_size (ulong size);
public virtual long fill (long count, GLib.Cancellable cancellable) throws GLib.Error;
......@@ -339,7 +339,7 @@ namespace GLib {
public weak string get_attribute_as_string (string attribute);
public bool get_attribute_boolean (string attribute);
public weak string get_attribute_byte_string (string attribute);
public bool get_attribute_data (string attribute, GLib.FileAttributeType type, pointer value_pp, GLib.FileAttributeStatus status);
public bool get_attribute_data (string attribute, GLib.FileAttributeType type, void* value_pp, GLib.FileAttributeStatus status);
public int get_attribute_int32 (string attribute);
public int64 get_attribute_int64 (string attribute);
public weak GLib.Object get_attribute_object (string attribute);
......@@ -366,7 +366,7 @@ namespace GLib {
public weak string list_attributes (string name_space);
public FileInfo ();
public void remove_attribute (string attribute);
public void set_attribute (string attribute, GLib.FileAttributeType type, pointer value_p);
public void set_attribute (string attribute, GLib.FileAttributeType type, void* value_p);
public void set_attribute_boolean (string attribute, bool attr_value);
public void set_attribute_byte_string (string attribute, string attr_value);
public void set_attribute_int32 (string attribute, int attr_value);
......@@ -465,32 +465,32 @@ namespace GLib {
public bool close (GLib.Cancellable cancellable) throws GLib.Error;
public bool has_pending ();
public bool is_closed ();
public long read (pointer buffer, ulong count, GLib.Cancellable cancellable) throws GLib.Error;
public bool read_all (pointer buffer, ulong count, out ulong bytes_read, GLib.Cancellable cancellable) throws GLib.Error;
public long read (void* buffer, ulong count, GLib.Cancellable cancellable) throws GLib.Error;
public bool read_all (void* buffer, ulong count, out ulong bytes_read, GLib.Cancellable cancellable) throws GLib.Error;
public bool set_pending () throws GLib.Error;
public virtual void close_async (int io_priority, GLib.Cancellable cancellable, GLib.AsyncReadyCallback callback);
public virtual bool close_finish (GLib.AsyncResult _result) throws GLib.Error;
[NoWrapper]
public virtual bool close_fn (GLib.Cancellable cancellable) throws GLib.Error;
public virtual void read_async (pointer buffer, ulong count, int io_priority, GLib.Cancellable cancellable, GLib.AsyncReadyCallback callback);
public virtual void read_async (void* buffer, ulong count, int io_priority, GLib.Cancellable cancellable, GLib.AsyncReadyCallback callback);
public virtual long read_finish (GLib.AsyncResult _result) throws GLib.Error;
[NoWrapper]
public virtual long read_fn (pointer buffer, ulong count, GLib.Cancellable cancellable) throws GLib.Error;
public virtual long read_fn (void* buffer, ulong count, GLib.Cancellable cancellable) throws GLib.Error;
public virtual long skip (ulong count, GLib.Cancellable cancellable) throws GLib.Error;
public virtual void skip_async (ulong count, int io_priority, GLib.Cancellable cancellable, GLib.AsyncReadyCallback callback);
public virtual long skip_finish (GLib.AsyncResult _result) throws GLib.Error;
}
[CCode (cheader_filename = "gio/gio.h")]
public class MemoryInputStream : GLib.InputStream, GLib.Seekable {