libchamplain-gtk on Windows




Hello all,

I have an application [1] that I've written and am trying to port to
Windows so that my city's transit agency can use it. My application is
written in python with gtk+3 and libchamplain python bindings. Since
there are no official builds of libchamplain for windows, I have tried
two different approaches:

1. PyGObject (PyGI)
http://opensourcepack.blogspot.com/p/pygobject-pygi-aio.html

This is a fantastic project that has native builds of everything that I
needed. However, I am having issues with libchamplain that are keeping
it from running. Most importantly, events don't seem to be handled
correctly. Using the default Clutter backend, no events are ever sent.
This means that zooming and panning don't work, and mouse clicks are
never captured. Also, this doesn't seem to resize correctly.

After playing around with this for a while, I tried changing the clutter
backend to the gdk backend by doing:

Clutter.set_windowing_backend(Clutter.WINDOWING_GDK)

This improved the situation for events. I can now correctly get mouse
clicks, pan, and zoom. But resizing still doesn't work.  When I say
resizing doesn't work, I mean that if the window changes size, the map
doesn't resize with it. It seems to resize horizontally, but not
vertically. But to make things worse, if the window is resized, even
though the map doesn't resize, when the user clicks on the map, the
coordinates are now incorrect!

But changing to the GDK backend had additional drawbacks. This seemed to
change the font rendering and completely broke it under Windows. I now
get a bunch of errors stating:

Pango-WARNING **: failed to choose a font, expect ugly output. 
engine-type='PangoRenderWin32', script='latin'

and all the fonts show up as empty or symbols.

2. I then took a second approach and tried using cygwin. 

I had even more trouble with cygwin. It too had the issues with events,
but it also constantly and randomly segfaulted. Changing the windowing
backend also help with the mouse events, but it still had the same
resize issues. But it crashed so often under cygwin, that it wasn't
useful.

I don't know if these are issues in libchamplain, or if it is a deeper
issue in clutter. I'm suspecting it might be clutter since changing the
backend made some things work, but I wanted to check here first.

Any help would be much appreciated! Thanks in advance.
-m


[1] http://line72.net/index.php/software/subte/




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]