You can check out my port of Bill Kendrick's Madbomber that I wrote using
GTK. I never quite finished it, and I didn't create any sort of data
structure for the objects. I should have created a priority queue for
storing them.
Thanks for the idea. It looks interesting. SDL2 is
available in my repo.
I found this on Stack Exchange:
SDL and GTK are quite different in the sense that SDL just tries to provide you with a
drawing surface and device inputs. GTK provides you with a user interface toolkit, that
is, it provides you with user interface elements such as scrollbars, push buttons and so
on. GTK is also quite complex compared to SDL. So I'd definitely go with SDL here. C
or C++.. That's a can of worms I'm not going to open
I also found comments that SDL is easier and lower level, which seem contradictory to me,
but which is consistent with the Stack Exchange post. I only want to capture mouse events
a la xdotool, so SDL might be just what I need.
I've found some tutorials that aren't Youtube videos, so I'll check it out.
-Gary
Think the easiest, smoothest path for that might be SDL.
On Sat, Mar 25, 2023 at 11:03 AM Gary <saclug(a)garymcglinn.com> wrote:
I'm thinking about writing a small app that
uses mouse input. I could do
it in Java pretty quickly, but I thought I would broaden my horizons and
used GTK. I did something with Perl and GTK a very long time ago This
time, I was thinking of using C. Maybe I'll explore C++ or Rust, but for
such a small app, I think it is probably overkill. I never learned C++ and
I'm wondering if I should invest in it or just learn Rust, That is
probably for another day anyhow.
My question is about GTK versions. Normally, I would just take the most
recent version of GTK and go from there, but it seems like there are
backwards compatibility issues. My devel system seems to have libraries
for 2 and 3 at least. I just ran into a bunch of version incompatibility
issues with XPRA. Am I going to have more that the usual amount of pain
with GTK and should I pick a version other that 4? I am assuming I can
just install 4 on the deployment system and it will happily live with the
other versions.
-Gary
_______________________________________________
Lug-nuts mailing list -- lug-nuts(a)bigbrie.com
To unsubscribe send an email to lug-nuts-leave(a)bigbrie.com
"There are two ways of constructing a software design. One way is to
make it so simple that there are obviously no deficiencies. And the other
way is to make it so complicated that there are no obvious deficiencies."
Professor C. A. R. Hoare
The 1980 Turing award lecture