[Vala] Getters and setters in vapi files
- From: "Alejandro T. Colombini" <atcolombini gmail com>
- To: vala-list gnome org
- Subject: [Vala] Getters and setters in vapi files
- Date: Mon, 22 Jul 2013 15:50:12 +0200
Hi,
I've written a C library and used vapigen to create the vapis for it. In
the generated files there are some properties defined like:
public int index { get; set; }
And the accessor methods (which I use from C and only return the value of
the property) duplicating this 'get' and 'set' functionality:
public int get_index ();
public void set_index (int index);
What I want to do is to tell Vala to call my methods when the Vala code
gets or sets the properties using the notation:
i = object.index;
object.index = 42;
instead of translating it to a g_object_set call.
Is there any way to do this?
Regards,
Alex
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]