From b4f88685827201d0d8bad0d77c99f3b71c12dc98 Mon Sep 17 00:00:00 2001 From: Artur Skawina Date: Tue, 31 Jan 2012 13:12:28 +0100 Subject: [PATCH] Misc fixes, the new modules are now valid D code. --- gtk2/cally.d | 4 +-- gtk2/clutter.d | 52 +++++++++++++++++--------------------- gtk2/clutterx11.d | 4 +-- gtk2/cogl.d | 25 +++++++++++++++--- gtk2/coglpango.d | 4 +-- gtk2/{freetype22.d => freetype2.d} | 8 +++--- gtk2/gl.d | 12 ++++----- gtk2/glib2.d | 2 ++ gtk2/gobject2.d | 4 ++- gtk2/pangocairo.d | 9 ++++--- gtk2/pangoft2.d | 6 ++--- 11 files changed, 75 insertions(+), 55 deletions(-) rename gtk2/{freetype22.d => freetype2.d} (82%) diff --git a/gtk2/cally.d b/gtk2/cally.d index ed10d4a..f4b0e55 100644 --- a/gtk2/cally.d +++ b/gtk2/cally.d @@ -30,8 +30,8 @@ public import gtk2.cairo; alias gtk2.cairo cairo; public import gtk2.fontconfig2; alias gtk2.fontconfig2 fontconfig2; -public import gtk2.freetype22; -alias gtk2.freetype22 freetype22; +public import gtk2.freetype2; +alias gtk2.freetype2 freetype2; // package: "cally-1.0"; // C header: "cally/cally.h"; diff --git a/gtk2/clutter.d b/gtk2/clutter.d index 4bfa501..19d748a 100644 --- a/gtk2/clutter.d +++ b/gtk2/clutter.d @@ -28,8 +28,8 @@ public import gtk2.cairo; alias gtk2.cairo cairo; public import gtk2.fontconfig2; alias gtk2.fontconfig2 fontconfig2; -public import gtk2.freetype22; -alias gtk2.freetype22 freetype22; +public import gtk2.freetype2; +alias gtk2.freetype2 freetype2; // package: "clutter-1.0"; // C header: "clutter/clutter.h"; @@ -2596,8 +2596,8 @@ struct ActorBox { // : the final #ClutterActorBox // : the interpolation progress // : return location for the interpolation - void interpolate(ActorBox* final, double progress, /*out*/ ActorBox* result) { - clutter_actor_box_interpolate(&this, final, progress, result); + void interpolate(ActorBox* final_, double progress, /*out*/ ActorBox* result) { + clutter_actor_box_interpolate(&this, final_, progress, result); } // Changes the origin of @box, maintaining the size of the #ClutterActorBox. @@ -3140,8 +3140,8 @@ struct Animation /* : GObject.Object */ /* Version 1.0 */ { // RETURNS: The animation itself. // : the property to control // : The final value of the property - Animation* bind(char* property_name, GObject2.Value* final) { - return clutter_animation_bind(&this, property_name, final); + Animation* bind(char* property_name, GObject2.Value* final_) { + return clutter_animation_bind(&this, property_name, final_); } // Binds @interval to the @property_name of the #GObject @@ -3290,8 +3290,8 @@ struct Animation /* : GObject.Object */ /* Version 1.0 */ { // RETURNS: The animation itself. // : name of the property // : The final value of the property - Animation* update(char* property_name, GObject2.Value* final) { - return clutter_animation_update(&this, property_name, final); + Animation* update(char* property_name, GObject2.Value* final_) { + return clutter_animation_update(&this, property_name, final_); } // Changes the @interval for @property_name. The #ClutterAnimation @@ -5893,8 +5893,8 @@ struct Color { // : the final #ClutterColor // : the interpolation progress // : return location for the interpolation - void interpolate(Color* final, double progress, /*out*/ Color* result) { - clutter_color_interpolate(&this, final, progress, result); + void interpolate(Color* final_, double progress, /*out*/ Color* result) { + clutter_color_interpolate(&this, final_, progress, result); } // Lightens @color by a fixed amount, and saves the changed color @@ -8392,8 +8392,8 @@ struct Interval /* : GObject.InitiallyUnowned */ /* Version 1.0 */ { // : the type of the values in the interval // : a #GValue holding the initial value of the interval // : a #GValue holding the final value of the interval - static Interval* new_with_values(Type gtype, GObject2.Value* initial, GObject2.Value* final) { - return clutter_interval_new_with_values(gtype, initial, final); + static Interval* new_with_values(Type gtype, GObject2.Value* initial, GObject2.Value* final_) { + return clutter_interval_new_with_values(gtype, initial, final_); } // Unintrospectable function: register_progress_func() / clutter_interval_register_progress_func() @@ -14058,12 +14058,7 @@ struct SnapConstraint /* : Constraint */ /* Version 1.6 */ { return clutter_snap_constraint_new(source, from_edge, to_edge, offset); } - // Retrieves the edges used by the @constraint - // : return location for the actor's edge, or %NULL - // : return location for the source's edge, or %NULL - void get_edges(/*out*/ SnapEdge* from_edge, /*out*/ SnapEdge* to_edge) { - clutter_snap_constraint_get_edges(&this, from_edge, to_edge); - } + // method "get_edges" removed: Link failures - missing in library. // Retrieves the offset set using clutter_snap_constraint_set_offset() // RETURNS: the offset, in pixels @@ -14152,7 +14147,7 @@ struct Stage /* : Group */ /* Version 0.1 */ { // #ClutterStage. You should never destroy or unref the returned // actor. // RETURNS: the main - static ClutterActor* get_default() { + static Clutter.Actor* get_default() { return clutter_stage_get_default(); } @@ -17746,7 +17741,7 @@ enum int ccaron = 488; enum int ccedilla = 231; enum int ccircumflex = 742; enum int cedilla = 184; -enum int cent = 162; +enum int cent_ = 162; // Run-time version check, to check the version the Clutter library // that an application is currently linked against @@ -18061,7 +18056,7 @@ static uint frame_source_add_full(int priority, uint fps, GLib2.SourceFunc func, return clutter_frame_source_add_full(priority, fps, func, data, notify); } -enum int function = 2294; +enum int function_ = 2294; enum int g = 103; enum int gabovedot = 757; enum int gbreve = 699; @@ -19173,7 +19168,7 @@ static void ungrab_pointer_for_device(int id_) { clutter_ungrab_pointer_for_device(id_); } -enum int union = 2269; +enum int union_ = 2269; enum int uogonek = 1017; enum int uparrow = 2300; enum int upcaret = 2985; @@ -19513,7 +19508,7 @@ void clutter_actor_box_get_size(ActorBox* this_, /*out*/ float* width=null, /*ou float clutter_actor_box_get_width(ActorBox* this_); float clutter_actor_box_get_x(ActorBox* this_); float clutter_actor_box_get_y(ActorBox* this_); -void clutter_actor_box_interpolate(ActorBox* this_, ActorBox* final, double progress, /*out*/ ActorBox* result); +void clutter_actor_box_interpolate(ActorBox* this_, ActorBox* final_, double progress, /*out*/ ActorBox* result); void clutter_actor_box_set_origin(ActorBox* this_, float x, float y); void clutter_actor_box_set_size(ActorBox* this_, float width, float height); void clutter_actor_box_union(ActorBox* this_, ActorBox* b, /*out*/ ActorBox* result); @@ -19547,7 +19542,7 @@ void clutter_animatable_get_initial_state(Animatable* this_, char* property_name int clutter_animatable_interpolate_value(Animatable* this_, char* property_name, Interval* interval, double progress, /*out*/ GObject2.Value* value); void clutter_animatable_set_final_state(Animatable* this_, char* property_name, GObject2.Value* value); Animation* /*new*/ clutter_animation_new(); -Animation* clutter_animation_bind(Animation* this_, char* property_name, GObject2.Value* final); +Animation* clutter_animation_bind(Animation* this_, char* property_name, GObject2.Value* final_); Animation* clutter_animation_bind_interval(Animation* this_, char* property_name, Interval* interval); void clutter_animation_completed(Animation* this_); Alpha* clutter_animation_get_alpha(Animation* this_); @@ -19565,7 +19560,7 @@ void clutter_animation_set_mode(Animation* this_, c_ulong mode); void clutter_animation_set_object(Animation* this_, GObject2.Object* object); void clutter_animation_set_timeline(Animation* this_, Timeline* timeline); void clutter_animation_unbind_property(Animation* this_, char* property_name); -Animation* clutter_animation_update(Animation* this_, char* property_name, GObject2.Value* final); +Animation* clutter_animation_update(Animation* this_, char* property_name, GObject2.Value* final_); void clutter_animation_update_interval(Animation* this_, char* property_name, Interval* interval); Animator* /*new*/ clutter_animator_new(); int clutter_animator_compute_value(Animator* this_, GObject2.Object* object, char* property_name, double progress, GObject2.Value* value); @@ -19732,7 +19727,7 @@ void clutter_color_free(Color* this_); void clutter_color_from_hls(Color* this_, float hue, float luminance, float saturation); void clutter_color_from_pixel(Color* this_, uint pixel); int clutter_color_from_string(Color* this_, char* str); -void clutter_color_interpolate(Color* this_, Color* final, double progress, /*out*/ Color* result); +void clutter_color_interpolate(Color* this_, Color* final_, double progress, /*out*/ Color* result); void clutter_color_lighten(Color* this_, /*out*/ Color* result); void clutter_color_shade(Color* this_, double factor, /*out*/ Color* result); void clutter_color_subtract(Color* this_, Color* b, /*out*/ Color* result); @@ -19875,7 +19870,7 @@ void clutter_input_device_set_enabled(InputDevice* this_, int enabled); void clutter_input_device_set_key(InputDevice* this_, uint index_, uint keyval, ModifierType modifiers); void clutter_input_device_update_from_event(InputDevice* this_, Event* event, int update_stage); Interval* clutter_interval_new(Type gtype, ...); -Interval* clutter_interval_new_with_values(Type gtype, GObject2.Value* initial, GObject2.Value* final); +Interval* clutter_interval_new_with_values(Type gtype, GObject2.Value* initial, GObject2.Value* final_); void clutter_interval_register_progress_func(Type value_type, ProgressFunc func); Interval* /*new*/ clutter_interval_clone(Interval* this_); GObject2.Value* clutter_interval_compute(Interval* this_, double factor); @@ -20085,14 +20080,13 @@ int clutter_shader_effect_set_shader_source(ShaderEffect* this_, char* source); void clutter_shader_effect_set_uniform(ShaderEffect* this_, char* name, Type gtype, size_t n_values, ...); void clutter_shader_effect_set_uniform_value(ShaderEffect* this_, char* name, GObject2.Value* value); SnapConstraint* clutter_snap_constraint_new(Actor* source, SnapEdge from_edge, SnapEdge to_edge, float offset); -void clutter_snap_constraint_get_edges(SnapConstraint* this_, /*out*/ SnapEdge* from_edge, /*out*/ SnapEdge* to_edge); float clutter_snap_constraint_get_offset(SnapConstraint* this_); Actor* clutter_snap_constraint_get_source(SnapConstraint* this_); void clutter_snap_constraint_set_edges(SnapConstraint* this_, SnapEdge from_edge, SnapEdge to_edge); void clutter_snap_constraint_set_offset(SnapConstraint* this_, float offset); void clutter_snap_constraint_set_source(SnapConstraint* this_, Actor* source=null); Stage* clutter_stage_new(); -ClutterActor* clutter_stage_get_default(); +Clutter.Actor* clutter_stage_get_default(); void clutter_stage_ensure_current(Stage* this_); void clutter_stage_ensure_redraw(Stage* this_); void clutter_stage_ensure_viewport(Stage* this_); diff --git a/gtk2/clutterx11.d b/gtk2/clutterx11.d index c267dc2..345fa7d 100644 --- a/gtk2/clutterx11.d +++ b/gtk2/clutterx11.d @@ -30,8 +30,8 @@ public import gtk2.cairo; alias gtk2.cairo cairo; public import gtk2.fontconfig2; alias gtk2.fontconfig2 fontconfig2; -public import gtk2.freetype22; -alias gtk2.freetype22 freetype22; +public import gtk2.freetype2; +alias gtk2.freetype2 freetype2; public import gtk2.xlib2; alias gtk2.xlib2 xlib2; diff --git a/gtk2/cogl.d b/gtk2/cogl.d index e41f69d..d2617b9 100644 --- a/gtk2/cogl.d +++ b/gtk2/cogl.d @@ -17,6 +17,23 @@ alias gtk2.gobject2 GObject2; // module Cogl; +// --- mixin/Cogl__MODULE_HEAD.d ---> + +// Private typedefs that let this module compile. +// Better than removing the mostly unintrospectable functions. + +private alias void CoglContext; +private alias void CoglRenderer; + +// Really X11, but this will do for now. + +private alias void Display; +private alias void XVisualInfo; +private alias void XEvent; + + +// <--- mixin/Cogl__MODULE_HEAD.d --- + // Integer representation of an angle such that 1024 corresponds to // full circle (i.e., 2 * pi). @@ -4866,7 +4883,7 @@ static PixelFormat texture_get_format(Handle handle) { // : a #CoglHandle for a texture. // : pointer to return location for the textures GL handle, or %NULL. // : pointer to return location for the GL target type, or %NULL. -static int texture_get_gl_texture(Handle handle, /*out*/ GL.uint* out_gl_handle=null, /*out*/ GL.enum* out_gl_target=null) { +static int texture_get_gl_texture(Handle handle, /*out*/ GL.uint_* out_gl_handle=null, /*out*/ GL.enum_* out_gl_target=null) { return cogl_texture_get_gl_texture(handle, out_gl_handle, out_gl_target); } @@ -4979,7 +4996,7 @@ static Handle texture_new_from_file(char* filename, TextureFlags flags, PixelFor // : horizontal waste on the right hand edge of the texture. // : vertical waste on the bottom edge of the texture. // : format of the foreign texture. -static Handle texture_new_from_foreign(GL.uint gl_handle, GL.enum gl_target, GL.uint width, GL.uint height, GL.uint x_pot_waste, GL.uint y_pot_waste, PixelFormat format) { +static Handle texture_new_from_foreign(GL.uint_ gl_handle, GL.enum_ gl_target, GL.uint_ width, GL.uint_ height, GL.uint_ x_pot_waste, GL.uint_ y_pot_waste, PixelFormat format) { return cogl_texture_new_from_foreign(gl_handle, gl_target, width, height, x_pot_waste, y_pot_waste, format); } @@ -5708,7 +5725,7 @@ Handle cogl_texture_3d_new_with_size_EXP(uint width, uint height, uint depth, Te GLib2.Quark cogl_texture_error_quark(); int cogl_texture_get_data(Handle handle, PixelFormat format, uint rowstride, ubyte* data); PixelFormat cogl_texture_get_format(Handle handle); -int cogl_texture_get_gl_texture(Handle handle, /*out*/ GL.uint* out_gl_handle=null, /*out*/ GL.enum* out_gl_target=null); +int cogl_texture_get_gl_texture(Handle handle, /*out*/ GL.uint_* out_gl_handle=null, /*out*/ GL.enum_* out_gl_target=null); uint cogl_texture_get_height(Handle handle); int cogl_texture_get_max_waste(Handle handle); uint cogl_texture_get_rowstride(Handle handle); @@ -5717,7 +5734,7 @@ int cogl_texture_is_sliced(Handle handle); Handle cogl_texture_new_from_bitmap(Handle bmp_handle, TextureFlags flags, PixelFormat internal_format); Handle cogl_texture_new_from_data(uint width, uint height, TextureFlags flags, PixelFormat format, PixelFormat internal_format, uint rowstride, ubyte* data); Handle cogl_texture_new_from_file(char* filename, TextureFlags flags, PixelFormat internal_format, GLib2.Error** error); -Handle cogl_texture_new_from_foreign(GL.uint gl_handle, GL.enum gl_target, GL.uint width, GL.uint height, GL.uint x_pot_waste, GL.uint y_pot_waste, PixelFormat format); +Handle cogl_texture_new_from_foreign(GL.uint_ gl_handle, GL.enum_ gl_target, GL.uint_ width, GL.uint_ height, GL.uint_ x_pot_waste, GL.uint_ y_pot_waste, PixelFormat format); Handle cogl_texture_new_from_sub_texture(Handle full_texture, int sub_x, int sub_y, int sub_width, int sub_height); Handle cogl_texture_new_with_size(uint width, uint height, TextureFlags flags, PixelFormat internal_format); Handle cogl_texture_ref(Handle handle); diff --git a/gtk2/coglpango.d b/gtk2/coglpango.d index a7b25f7..cbe3af2 100644 --- a/gtk2/coglpango.d +++ b/gtk2/coglpango.d @@ -20,8 +20,8 @@ public import gtk2.cairo; alias gtk2.cairo cairo; public import gtk2.fontconfig2; alias gtk2.fontconfig2 fontconfig2; -public import gtk2.freetype22; -alias gtk2.freetype22 freetype22; +public import gtk2.freetype2; +alias gtk2.freetype2 freetype2; // package: "cogl-pango-1.0"; // C header: "cogl-pango/cogl-pango.h"; diff --git a/gtk2/freetype22.d b/gtk2/freetype2.d similarity index 82% rename from gtk2/freetype22.d rename to gtk2/freetype2.d index d635d09..d8b5183 100644 --- a/gtk2/freetype22.d +++ b/gtk2/freetype2.d @@ -1,12 +1,12 @@ // *** DO NOT EDIT *** // Automatically generated from "/usr/share/gir-1.0/freetype2-2.0.gir" -module freetype22; +module freetype2; // c:symbol-prefixes: ["FT"] // c:identifier-prefixes: ["FT"] -// module freetype22; +// module freetype2; struct Bitmap { } @@ -17,7 +17,9 @@ struct Face { struct Library { } -// alias "Int32" removed: - + +// alias "Int32" removed: - + static void library_version() { FT_Library_Version(); } diff --git a/gtk2/gl.d b/gtk2/gl.d index ee9d344..be05e1d 100644 --- a/gtk2/gl.d +++ b/gtk2/gl.d @@ -17,19 +17,19 @@ struct charARB { struct clampf { } -struct boolean { +struct boolean_ { } -struct enum { +struct enum_ { } -struct float { +struct float_ { } struct handleARB { } -struct int { +struct int_ { } struct intptr { @@ -41,10 +41,10 @@ struct sizei { struct sizeiptr { } -struct uint { +struct uint_ { } -struct void { +struct void_ { } static void InitNames() { diff --git a/gtk2/glib2.d b/gtk2/glib2.d index de9f3bc..2129628 100644 --- a/gtk2/glib2.d +++ b/gtk2/glib2.d @@ -16290,6 +16290,8 @@ static char* dpgettext2(char* domain, char* context, char* msgid) { } +// function "dummy_decl" removed: Causes link failures - missing in library. + // Gets a #GFileError constant based on the passed-in @errno. // For example, if you pass in %EEXIST this function returns diff --git a/gtk2/gobject2.d b/gtk2/gobject2.d index 7bc6faf..aff453c 100644 --- a/gtk2/gobject2.d +++ b/gtk2/gobject2.d @@ -20,7 +20,9 @@ alias gtk2.glib2 GLib2; // mechanism takes over responsibility of actual function invocation for the // signal system. alias ClosureMarshal SignalCMarshaller; -// alias "Type" removed: Defined in glib + +// alias "Type" removed: Defined in glib + // A callback function used by the type system to finalize those portions // of a derived types class structure that were setup from the corresponding diff --git a/gtk2/pangocairo.d b/gtk2/pangocairo.d index f4779e4..93593fa 100644 --- a/gtk2/pangocairo.d +++ b/gtk2/pangocairo.d @@ -14,8 +14,8 @@ public import gtk2.cairo; alias gtk2.cairo cairo; public import gtk2.fontconfig2; alias gtk2.fontconfig2 fontconfig2; -public import gtk2.freetype22; -alias gtk2.freetype22 freetype22; +public import gtk2.freetype2; +alias gtk2.freetype2 freetype2; // package: "cairo"; @@ -27,7 +27,10 @@ alias gtk2.freetype22 freetype22; // module PangoCairo; struct FcFontMap /* : Pango.FontMap */ { - PangoFcFontMap parent_instance; + alias parent_instance this; + alias parent_instance super_; + alias parent_instance fontmap; + Pango.FontMap parent_instance; double dpi; freetype2.Library library; } diff --git a/gtk2/pangoft2.d b/gtk2/pangoft2.d index 14426d6..aaf6876 100644 --- a/gtk2/pangoft2.d +++ b/gtk2/pangoft2.d @@ -12,8 +12,8 @@ public import gtk2.cairo; alias gtk2.cairo cairo; public import gtk2.fontconfig2; alias gtk2.fontconfig2 fontconfig2; -public import gtk2.freetype22; -alias gtk2.freetype22 freetype22; +public import gtk2.freetype2; +alias gtk2.freetype2 freetype2; // package: "freetype2"; @@ -50,7 +50,7 @@ struct FontMap /* : Pango.FontMap */ { } } -extern (C) alias void function (fontconfig.Pattern* pattern, void* data) SubstituteFunc; +extern (C) alias void function (fontconfig2.Pattern* pattern, void* data) SubstituteFunc; // Unintrospectable function: font_get_coverage() / pango_ft2_font_get_coverage() -- 2.11.4.GIT