[prev in list] [next in list] [prev in thread] [next in thread] 

List:       gtk
Subject:    Re: Broken link in docs - GdkEventMask
From:       Daniel Kasak <d.j.kasak.dk () gmail ! com>
Date:       2017-11-03 1:43:11
Message-ID: CAF73Y=Sr5K1NJ2utDKx2k25-RSeBtY1mTXf8hF6sfrS-vB1aog () mail ! gmail ! com
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]


Thanks Emmanuele :)

On Fri, Nov 3, 2017 at 9:00 AM, Emmanuele Bassi <ebassi@gmail.com> wrote:

> On 2 November 2017 at 21:46, Daniel Kasak <d.j.kasak.dk@gmail.com> 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]
>

[Attachment #5 (text/html)]

<div dir="ltr">Thanks Emmanuele :)</div><div class="gmail_extra"><br><div \
class="gmail_quote">On Fri, Nov 3, 2017 at 9:00 AM, Emmanuele Bassi <span \
dir="ltr">&lt;<a href="mailto:ebassi@gmail.com" \
target="_blank">ebassi@gmail.com</a>&gt;</span> wrote:<br><blockquote \
class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc \
solid;padding-left:1ex"><span class="">On 2 November 2017 at 21:46, Daniel Kasak \
&lt;<a href="mailto:d.j.kasak.dk@gmail.com">d.j.kasak.dk@gmail.com</a>&gt; wrote:<br> \
&gt; Hi all.<br> &gt;<br>
&gt; On the page: <a \
href="https://developer.gnome.org/gtk3/stable/GtkWidget.html#gtk-widget-add-events" \
rel="noreferrer" target="_blank">https://developer.gnome.org/<wbr>gtk3/stable/GtkWidget.html#<wbr>gtk-widget-add-events</a><br>
 &gt;   ... the link for GdkEventMask points to:<br>
&gt; <a href="https://developer.gnome.org/gtk3/gdk4/gdk4-Events.html#GdkEventMask" \
rel="noreferrer" target="_blank">https://developer.gnome.org/<wbr>gtk3/gdk4/gdk4-Events.html#<wbr>GdkEventMask</a><br>
 &gt; ... which doesn&#39;t exist.<br>
<br>
</span>Yes, that&#39;s a known gtk-doc issue with the <a \
href="http://developer.gnome.org" rel="noreferrer" \
target="_blank">developer.gnome.org</a><br> scripts; the actual page is:<br>
<br>
   <a href="https://developer.gnome.org/gdk3/stable/gdk3-Events.html#GdkEventMask" \
rel="noreferrer" target="_blank">https://developer.gnome.org/<wbr>gdk3/stable/gdk3-Events.html#<wbr>GdkEventMask</a><br>
 <br>
You probably want to install DevHelp and have the documentation<br>
locally, instead of using the website.<br>
<span class=""><br>
&gt; Could anyone point me to some docs that would help me understand what<br>
&gt; I pass to gtk_widget_add_events? I have some ( perl ) code that I was<br>
&gt; given in the gtk-perl list to add some events for catching mouse<br>
&gt; events:<br>
&gt;<br>
&gt; $drawing_area-&gt;add_events(<wbr>0x004|0x100|0x200);<br>
<br>
&gt; This works, but:<br>
&gt;   a) I don&#39;t know where these values are coming from and what they are<br>
&gt;   b) I&#39;d like to also catch mouse wheel events now<br>
&gt;<br>
&gt; Any tips?<br>
<br>
</span>This is a gtk-perl-list question, really. The Perl bindings for GLib<br>
typically use strings, not an enumeration, for flags; see:<br>
<br>
   <a href="http://gtk2-perl.sourceforge.net/doc/pod/Glib.html#PERL_VERSUS_C" \
rel="noreferrer" target="_blank">http://gtk2-perl.sourceforge.<wbr>net/doc/pod/Glib.html#PERL_<wbr>VERSUS_C</a><br>
 <br>
the section about flags. So if you want to handle pointer events, you<br>
want to use:<br>
<br>
   [ &quot;button-press-mask&quot;, &quot;button-release-mask&quot; ]<br>
<br>
and if you want to get scrolling events, you want to add &quot;scroll-mask&quot;<br>
and &quot;smooth-scroll-mask&quot;.<br>
<br>
Ciao,<br>
  Emmanuele.<br>
<span class="HOEnZb"><font color="#888888"><br>
--<br>
<a href="https://www.bassi.io" rel="noreferrer" \
target="_blank">https://www.bassi.io</a><br> [@] ebassi [@<a href="http://gmail.com" \
rel="noreferrer" target="_blank">gmail.com</a>]<br> \
</font></span></blockquote></div><br></div>



_______________________________________________
gtk-list mailing list
gtk-list@gnome.org
https://mail.gnome.org/mailman/listinfo/gtk-list


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic