Re: Unable to capture mouse events of GtkGLArea
- From: Chris Moller <moller mollerware com>
- To: gtk-app-devel-list gnome org
- Subject: Re: Unable to capture mouse events of GtkGLArea
- Date: Mon, 2 Jul 2018 16:58:52 -0400
Some years ago, I used GtkGlArea in C with:
--------------------------------------------
GtkWidget *gl_area = gtk_gl_area_new ();
gtk_widget_add_events (gl_area, GDK_BUTTON_PRESS_MASK);
g_signal_connect (gl_area, "button-press-event",
G_CALLBACK (button_press), molecule);
static gboolean
button_press (GtkWidget *widget,
GdkEvent *event,
gpointer user_data)
{
g_print ("button press\n");
}
-------------------------------------------
I'm not all that familiar with Python, but it looks like your code does
the same thing except possibly that you seem to be setting the event
mask rather than adding to it.
On 02/07/18 16:34, Johannes Bauer wrote:
On 02.07.2018 22:11, Johannes Bauer wrote:
I'm writing a small toy application that uses OpenGL. Actually
converting it from GLUT to GTK/GL. I'm using a glade 3.22.1 generated UI
with Gtk 3.22.30 from Python3.
So that you can see what I'm doing (wrong), here's the full source code
of my stuff:
https://github.com/johndoe31415/pygpufractal
In particular, this is my UI definition:
https://github.com/johndoe31415/pygpufractal/blob/master/gpufractal.glade
And this the very simple UI code:
https://github.com/johndoe31415/pygpufractal/blob/master/gtkfractal.py
Any help is greatly appreciated.
Thank you so much,
Cheers,
Joe
_______________________________________________
gtk-app-devel-list mailing list
gtk-app-devel-list gnome org
https://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]