<html><head><style>pre,code,address {
  margin: 0px;
}
h1,h2,h3,h4,h5,h6 {
  margin-top: 0.2em;
  margin-bottom: 0.2em;
}
ol,ul {
  margin-top: 0em;
  margin-bottom: 0em;
}
blockquote {
  margin-top: 0em;
  margin-bottom: 0em;
}
</style></head><body><div>Hi Michalis,</div><div><br></div><div>On Sat, 2026-03-21 at 14:36 +0000, Michalis Kamburelis wrote:</div><blockquote type="cite" style="margin:0 0 0 .8ex; border-left:2px #729fcf solid;padding-left:1ex"><div>5. I needed to change the gtk_widget_set_events call. See <a href="https://github.com/castle-engine/castle-engine/commit/e88fdb07fed6bfc4290280070e227e35211f3db6" title="Click to open https://github.com/castle-engine/castle-engine/commit/e88fdb07fed6bfc4290280070e227e35211f3db6">https://github.com/castle-engine/castle-engine/commit/e88fdb07fed6bfc4290280070e227e35211f3db6</a> . For some reason, in latest version I took from Lazarus GTK3 bindings, this expects a Pascal set, while in fp-units-gtk3 this expects a simple integer. Of course binary it doesn't matter, it's the same thing for C. I don't know why there's a difference in how Pascal bindings define it (was the same version of git2pas used to generate them? which version used newer git2pas version?) and what is "more reliable in the future" -- I can adjust as needed to <a href="https://gitlab.com/gtk4pas/gtk3bindings" title="Click to open https://gitlab.com/gtk4pas/gtk3bindings">https://gitlab.com/gtk4pas/gtk3bindings</a> changes, no problem :)<br></div></blockquote><div>This looks a problem on GTK sources, not in <i>gir2pas</i>. Below is a snippet from <i><b>/usr/include/gtk-3.0/gtk/gtkwidget.h</b></i> lines 968 to 981 .</div><div><br></div><div>GDK_AVAILABLE_IN_ALL</div><pre>void           gtk_widget_set_events          (GtkWidget           *widget,</pre><pre>                                     <b>gint</b>                      events);</pre><pre>GDK_AVAILABLE_IN_ALL</pre><pre>void       gtk_widget_add_events          (GtkWidget           *widget,</pre><pre>                                           <b>gint</b>                      events);</pre><pre>GDK_AVAILABLE_IN_ALL</pre><pre>void     gtk_widget_set_device_events   (GtkWidget           *widget,</pre><pre>                                           GdkDevice           *device,</pre><pre>                                       <b>GdkEventMask</b>              events);</pre><pre>GDK_AVAILABLE_IN_ALL</pre><pre>void       gtk_widget_add_device_events   (GtkWidget           *widget,</pre><pre>                                           GdkDevice           *device,</pre><pre>                                     <b>GdkEventMask</b>         events);</pre><pre><br></pre><div>As you can see, the functions <i>gtk_widget_set_events</i> and <i>gtk_widget_add_events</i> use <i><b>gint</b></i> while the functions <i>gtk_widget_set_device_events</i> and <i>gtk_widget_add_device_events</i> use <i><b>GdkEventMask</b></i>.</div><div><br></div><div>As <i>gir2pas</i> does not have any information about the underlying type of events, it can not use Pascal set type for <i>events</i> in the two upper functions, but can do that for the two others.</div><div><br></div><div>This can only be solved by requesting a change on GTK sources.</div><div><span><pre>-- <br></pre><pre>Cheers,
Mazen Neifer
Debian Developer
</pre></span></div></body></html>