Thanks a lot, it works just fine :-)

private bool on_motion_notify (Gdk.EventMotion evt) {

                    Gdk.Event* real_e = (Gdk.Event*)(&evt);

                    Gtk.drag_begin (this,
                                    target_list,
                                    Gdk.DragAction.COPY
                                    | Gdk.DragAction.MOVE
                                    | Gdk.DragAction.LINK,
                                    1,
                                    (Gdk.Event) evt);
}

I tried all sort of things, like Gdk.Event? event = (Gdk.Event*) evt;
but none worked.

Thanks again. :-)



On 28/03/2012 23:51, Eric Gregory wrote:

On Wed, Mar 28, 2012 at 2:38 PM, Axel FILMORE <[email protected] <mailto:[email protected]>> wrote:

    Hi there,

    I can't get the following code to compile with Vala :

    private bool on_motion_notify (Gdk.EventMotion evt) {
                       Gtk.drag_begin (this,
                                       target_list,
                                       Gdk.DragAction.COPY
                                       | Gdk.DragAction.MOVE
                                       | Gdk.DragAction.LINK,
                                       1,
                                       (Gdk.Event) evt);
    }


Unlike in C, in Vala Gdk.Event is a class and Gdk.EventMotion is a struct.

You might check this thread for a user who had a similar issue:
http://www.mail-archive.com/[email protected]/msg08105.html

 - Eric


--
Axel FILMORE

_______________________________________________
vala-list mailing list
[email protected]
http://mail.gnome.org/mailman/listinfo/vala-list

Reply via email to