Sunday, October 23, 2011

Quick Update - NGtk

To those of you who have read my previous blog post regarding NGtk, here is a quick status update:
  • NGtk works. Tested the XLib and NCurses backends on several linux distributions, and tested the WinApi backend on many versions of windows. I have a calculator app working with keyboard and mouse support.
  • Keyboard focus is crappy, in all backends. Currently, I just tell all the widgets to listen to keyboard events. This is not something that is hard to fix - an hour or two.
  • In backends with custom drawings (XLib, NCurses), the widget state isn't considered when drawing (so the widget looks the same all the time (if it's visible)). Not a bug, but could use some fixing. Base code for fixing that is already there.
  • Clicking on disabled Widgets in the WinApi backend causes the mouse event to pass to the parent container (instead of being sent to /dev/null). Does anyone actually care about this? Can this do any harm? Anyway, the nice guys at Stackoverflow suggested a solution that should be easy to implement (but it's not top priority at the moment).
  • Removing widgets from their container isn't tested well enough. That's not a bug, but I simply can't gaurantee good behaviour
Also, here are some good things:
  • It works!
  • It doesn't crash
  • It doesn't leak memory (take that Gtk+!)
  • Valgrind is generally happy
  • Did I mention that it works? :P
I handed in NGtk to my proffessor, which means I'm now on my own with this project. Expect release 1.0 soon (my submission was titled 0.99). For those who want to take a look at the API usage already, you can take a look at the tester program: main.c (forgive me for the ugly macro in line 204, there is already a way around it in the code on my computer).

It is useable already (you can get the link to the project homepage from the main.c link), but I deeply recommend waiting for me to solve the above technical issues.

By the way, I did 40 km of bicycling in the city last friday (October 14th) in the Sovev Tel-Aviv event. It's the first time I participate, and I really enjoyed. Riding the bicycle on the busiest highways in the country and then along the sea shore together with other hundreds of people, is a great experience. So, if you can participate next year, I highly recommend that you do so ;)

1 comment:

  1. I'm very sorry for the off-topic, but I've got a pretty strange problem with GIMP and no one seems to know why it is happening (lastly I've been asking bout this on polish GIMP forum, but didn't get any replies).

    It works like this - I'm working on a 300ppi image. But whenever I save it as png, jpg or even bmp, the resolution comes down to 299ppi. Every single time.

    Exactly it turns 300,000 ppi into 299,999ppi. I have to work on 301,000ppi to get 300,999ppi in the end.

    It's really frustrating :(

    ReplyDelete