Re: [Vala] Inheriting from GLib.Action
- From: Luca Bruno <lethalman88 gmail com>
- To: vala-list gnome org
- Subject: Re: [Vala] Inheriting from GLib.Action
- Date: Wed, 05 Mar 2014 09:40:07 +0100
On 05/03/2014 07:26, Edward Hennessy wrote:
I've edited the gio-2.0.vapi file and got classes implementing the GLib.Action interface working. Here is the
vapi segment that I think is correct:
public interface Action : GLib.Object {
public abstract void activate (GLib.Variant? parameter);
public abstract void change_state (GLib.Variant value);
public abstract GLib.Variant? get_state_hint ();
public static bool name_is_valid (string action_name);
public static bool parse_detailed_name (string detailed_name, out string action_name, out
GLib.Variant target_value) throws GLib.Error;
public static string print_detailed_name (string action_name, GLib.Variant parameter);
public abstract bool enabled { get; }
public abstract string name { get; }
public abstract GLib.VariantType? parameter_type { get; }
public abstract GLib.Variant? state { owned get; }
public abstract GLib.VariantType? state_type { get; }
}
However, I haven't been able to edit the Gio-2.0.metadata in a way to generate the segment above. I'm down to
trial-and-error. Vapigen usually gives me compile warnings or errors. When it is successful, I get
[NoAccessorMethod] which results in a SIGSEGV in the application because the interface function table isn't
populated. Any help getting me to the next step is appreciated.
Thanks for sharing. The girparser has code for detecting such cases and
discard the get_foo for the foo property. It's not something that should
go in the metadata. Girparser should checked too understand the reason
why it doesn't discard get_foo in this case.
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]