Broken link in docs - GdkEventMask

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

Broken link in docs - GdkEventMask

Daniel Kasak-4
Hi all.

On the page: https://developer.gnome.org/gtk3/stable/GtkWidget.html#gtk-widget-add-events
 ... the link for GdkEventMask points to:
https://developer.gnome.org/gtk3/gdk4/gdk4-Events.html#GdkEventMask
... which doesn't exist.

Could anyone point me to some docs that would help me understand what
I pass to gtk_widget_add_events? I have some ( perl ) code that I was
given in the gtk-perl list to add some events for catching mouse
events:

$drawing_area->add_events(0x004|0x100|0x200);

This works, but:
 a) I don't know where these values are coming from and what they are
 b) I'd like to also catch mouse wheel events now

Any tips?

Thanks :)

Dan
_______________________________________________
gtk-list mailing list
[hidden email]
https://mail.gnome.org/mailman/listinfo/gtk-list
Reply | Threaded
Open this post in threaded view
|

Re: Broken link in docs - GdkEventMask

Emmanuele Bassi
On 2 November 2017 at 21:46, Daniel Kasak <[hidden email]> wrote:
> Hi all.
>
> On the page: https://developer.gnome.org/gtk3/stable/GtkWidget.html#gtk-widget-add-events
>  ... the link for GdkEventMask points to:
> https://developer.gnome.org/gtk3/gdk4/gdk4-Events.html#GdkEventMask
> ... which doesn't exist.

Yes, that's a known gtk-doc issue with the developer.gnome.org
scripts; the actual page is:

  https://developer.gnome.org/gdk3/stable/gdk3-Events.html#GdkEventMask

You probably want to install DevHelp and have the documentation
locally, instead of using the website.

> Could anyone point me to some docs that would help me understand what
> I pass to gtk_widget_add_events? I have some ( perl ) code that I was
> given in the gtk-perl list to add some events for catching mouse
> events:
>
> $drawing_area->add_events(0x004|0x100|0x200);

> This works, but:
>  a) I don't know where these values are coming from and what they are
>  b) I'd like to also catch mouse wheel events now
>
> Any tips?

This is a gtk-perl-list question, really. The Perl bindings for GLib
typically use strings, not an enumeration, for flags; see:

  http://gtk2-perl.sourceforge.net/doc/pod/Glib.html#PERL_VERSUS_C

the section about flags. So if you want to handle pointer events, you
want to use:

  [ "button-press-mask", "button-release-mask" ]

and if you want to get scrolling events, you want to add "scroll-mask"
and "smooth-scroll-mask".

Ciao,
 Emmanuele.

--
https://www.bassi.io
[@] ebassi [@gmail.com]
_______________________________________________
gtk-list mailing list
[hidden email]
https://mail.gnome.org/mailman/listinfo/gtk-list
Reply | Threaded
Open this post in threaded view
|

Re: Broken link in docs - GdkEventMask

Daniel Kasak-4
Thanks Emmanuele :)

On Fri, Nov 3, 2017 at 9:00 AM, Emmanuele Bassi <[hidden email]> wrote:
On 2 November 2017 at 21:46, Daniel Kasak <[hidden email]> wrote:
> Hi all.
>
> On the page: https://developer.gnome.org/gtk3/stable/GtkWidget.html#gtk-widget-add-events
>  ... the link for GdkEventMask points to:
> https://developer.gnome.org/gtk3/gdk4/gdk4-Events.html#GdkEventMask
> ... which doesn't exist.

Yes, that's a known gtk-doc issue with the developer.gnome.org
scripts; the actual page is:

  https://developer.gnome.org/gdk3/stable/gdk3-Events.html#GdkEventMask

You probably want to install DevHelp and have the documentation
locally, instead of using the website.

> Could anyone point me to some docs that would help me understand what
> I pass to gtk_widget_add_events? I have some ( perl ) code that I was
> given in the gtk-perl list to add some events for catching mouse
> events:
>
> $drawing_area->add_events(0x004|0x100|0x200);

> This works, but:
>  a) I don't know where these values are coming from and what they are
>  b) I'd like to also catch mouse wheel events now
>
> Any tips?

This is a gtk-perl-list question, really. The Perl bindings for GLib
typically use strings, not an enumeration, for flags; see:

  http://gtk2-perl.sourceforge.net/doc/pod/Glib.html#PERL_VERSUS_C

the section about flags. So if you want to handle pointer events, you
want to use:

  [ "button-press-mask", "button-release-mask" ]

and if you want to get scrolling events, you want to add "scroll-mask"
and "smooth-scroll-mask".

Ciao,
 Emmanuele.

--
https://www.bassi.io
[@] ebassi [@gmail.com]


_______________________________________________
gtk-list mailing list
[hidden email]
https://mail.gnome.org/mailman/listinfo/gtk-list
Reply | Threaded
Open this post in threaded view
|

Re: Broken link in docs - GdkEventMask

Gtk+ - General mailing list


Hi Dan,

A little aside here. I put together a multigraph widget. Works better than my last attempt at drawing many graphs in one drawing area.

https://github.com/cecashon/OrderedSetVelociRaptor/tree/master/Misc/MultiGraph

Yep, a lot of linear equations and loops. Cairo can draw fast so it does well. Better than I thought it would. Haven't captured any kwh with it though. Haven't figured out how to do Perl bindings yet either. Some fun with graphs.

Eric



_______________________________________________
gtk-list mailing list
[hidden email]
https://mail.gnome.org/mailman/listinfo/gtk-list
Reply | Threaded
Open this post in threaded view
|

Re: Broken link in docs - GdkEventMask

Daniel Kasak-4
Hey Eric. Yours is looking nice :) At the moment, I'm just drawing rectangular bars in my graphs:

I'm not on top of the maths required for nice curvy lines at this point, but I should read up on it. There have been more pressing issues to deal with up to this point. Anyway I'll check out your project - thanks for the link :)

Dan

On Sat, Nov 4, 2017 at 12:23 PM, <[hidden email]> wrote:


Hi Dan,

A little aside here. I put together a multigraph widget. Works better than my last attempt at drawing many graphs in one drawing area.

https://github.com/cecashon/OrderedSetVelociRaptor/tree/master/Misc/MultiGraph

Yep, a lot of linear equations and loops. Cairo can draw fast so it does well. Better than I thought it would. Haven't captured any kwh with it though. Haven't figured out how to do Perl bindings yet either. Some fun with graphs.

Eric




_______________________________________________
gtk-list mailing list
[hidden email]
https://mail.gnome.org/mailman/listinfo/gtk-list