Error: incompatible types when assigning to type
Hello everyone, Apologies in advance if this issue is incorrect or there's already a related issue opened somewhere, but I couldn't find it. The closes report could be on #131, but I'm not sure if that's related.
I'm using goocanvas as base library to build a design application.
In my CanvasItem
class I'm extending the Goo.CanvasItemSimple
which allows me to use a virtual method called simple_is_item_at()
to implement mouse click selection of child items (like an artboard with multiple child items, or a group).
This is the code I'm currently using: https://github.com/akiraux/Akira/blob/master/src/Lib/Models/CanvasItem.vala#L372
I'd like to implement what goocanvas does in the PolyLine class in order to get a more accurate mouse pointing event, which accounts for the painted area of the item and ignores the empty area of its bounding box.
This is the goocanvas example: https://gitlab.gnome.org/GNOME/goocanvas/-/blob/master/src/goocanvaspolyline.c#L914
When I try to get the GooCanvasSimpleData
field from my class, I get this error:
Error: incompatible types when assigning
to type 'GooCanvasItemSimpleData {aka struct _GooCanvasItemSimpleData}'
from type 'GooCanvasItemSimpleData * {aka struct _GooCanvasItemSimpleData *}'
I don't know if this is a bug with Vala, or goocanvas, or maybe it's a deeper issue with the way I implemented my CanvasItem
class.