| View previous topic :: View next topic |
| Author |
Message |
Grame beginner
Joined: 25 Feb 2008 Posts: 4
|
Posted: 25.02.2008, 14:13 Post subject: Mouse pointer coordinates |
|
|
Hi,
After my graphical output is shown by gkshow,
I would like to click on it and getting the x and y coordinates
of the mouse pointer.
I can't find how to do.
Is it really possible and how ?
Thanks you
Regards |
|
| Back to top |
|
 |
mhier Site Admin
Joined: 07 Jan 2007 Posts: 106 Location: Germany
|
Posted: 26.02.2008, 11:17 Post subject: |
|
|
That is not yet implemented. As I probably need this soon myself, there is a good chance that I implement it soon
Or maybe, if you know C you could give me a hand? _________________ pilib mostly on gentoo linux (32 and 64 bits) |
|
| Back to top |
|
 |
Grame beginner
Joined: 25 Feb 2008 Posts: 4
|
Posted: 26.02.2008, 11:34 Post subject: |
|
|
I'm not a C expert but, of course, if I can help you
I'll do what I can. |
|
| Back to top |
|
 |
mhier Site Admin
Joined: 07 Jan 2007 Posts: 106 Location: Germany
|
Posted: 27.02.2008, 11:06 Post subject: |
|
|
The idea would be to implement a GtkEventBox which then will be the container for the image (or anything else). This is (according to the docs) necessary, as a GtkImage does not have its own window and thus cannot receive any signals.
I am still not sure how to implement the signals in a fortran-like style. I want to avoid callback functions (they might also create problems with certain compiler combinations), so we would either need an (ugly) polling mechanism or some 'magic' variables like the iclos argument of gkwindow (which will be in fact implemented by a hidden C callback function, similar to gkcbset).
What do you think? _________________ pilib mostly on gentoo linux (32 and 64 bits) |
|
| Back to top |
|
 |
Grame beginner
Joined: 25 Feb 2008 Posts: 4
|
Posted: 27.02.2008, 13:39 Post subject: |
|
|
The problem is, if I can program in C relatively complete things
I know nothing about Gtk and writing C/Fortran90 interfaces.
I need time to learn about Gtk and signals.
I'll begin next week when I have time. |
|
| Back to top |
|
 |
mhier Site Admin
Joined: 07 Jan 2007 Posts: 106 Location: Germany
|
Posted: 28.02.2008, 09:46 Post subject: |
|
|
| Grame wrote: | I need time to learn about Gtk and signals.
I'll begin next week when I have time. |
Signals are completely new for me either  _________________ pilib mostly on gentoo linux (32 and 64 bits) |
|
| Back to top |
|
 |
|