Re: [Vala] Interface static method
- From: yannick inizan <inizan yannick gmail com>
- To: Jens Georg <mail jensge org>
- Cc: Vala <vala-list gnome org>
- Subject: Re: [Vala] Interface static method
- Date: Wed, 8 Jul 2015 18:27:44 +0200
yes I try to implement this interface. We can't override 'get_protocols' or
'get_type' ("no suitable method found to override") . Override
"get_protocols (Type type)" in Vala gives "my_class_get_protocols
(GstURIHandler* handler, GType type)" which is different than
"method_get_protocols (GType type)" for "handlerIface->get_protocols"
2015-07-08 8:41 GMT+02:00 Jens Georg <mail jensge org>:
my question is simple : How implement static method c interface ?
Yet I have no idea what you are trying to do. Are you trying to implement
URIHandler interface in Vala?
An exemple with GStreamer URIHandler :
http://cgit.freedesktop.org/gstreamer/gstreamer/tree/gst/gsturi.h
get_protocols member has "2 types" : 1 in interface structure and the
other
as method.
the get_protocols method is a convenience function that "just" calls the
function pointer in the structure. For GObject interfaces, you don't have
to do anything about that.
If you want to implement this interface in vala, you just "override" the
method because it is abstract and Vala does the rest of the magic.
_______________________________________________
vala-list mailing list
vala-list gnome org
https://mail.gnome.org/mailman/listinfo/vala-list
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]