Re: g_io_add_watch() callback called constantly

2007-12-07 Thread Gnaural
Thanks for the reply, this helps because I got the (mis)impression from the docs that g_io_channel_new_file() was the best cross platform approach... but I didn't really realize it really was just a plain "fopen()" file! I guess I thought is was a "magic" file :-) But it was a fun investigation --

g_io_add_watch() callback called constantly

2007-12-07 Thread Gnaural
I'm using GIOChannel for two apps to communicate with each other, mostly because glib/GTK code cross-compiles so easily to Win32. With that goal, I use g_io_channel_new_file() (since it looks like the most platform independent) with a g_io_add_watch() callback. Then I just sit in gtk_main(), and

Re: Strange interaction between GtkDialog and a GThread

2007-11-27 Thread Gnaural
Thanks for the reply. Interesting. Replacing sleep() with select() did return an error with errno == EINTR. If I understand you correctly, this is a clue that gtk_file_chooser_dialog_new is calling alarm() somewhere. That may indeed factor in to what I am trying to solve. But fact is, getting a th

Strange interaction between GtkDialog and a GThread

2007-11-26 Thread Gnaural
Maybe I'm just doing something stupid here. But I'd like to know what, at least! Below is an example of a mysterious (well, mysterious to me) problem I've encountered, involving some sort of interaction between a gtk_file_chooser_dialog_new and I thought was a completely separate thread. I'm hopi

re: pixbuf color count

2007-10-02 Thread Gnaural
Counting unique colors in a GtkPixbuf should be pretty easy once you know how to access the pixels as an array. The put_pixel() example here gives you everthing you need to know for that: http://developer.gimp.org/api/2.0/gdk-pixbuf/gdk-pixbuf-gdk-pixbuf.html Seems like finding unique colors would

Problems using GtkWindow configure_event to resize a GdkPixbuf

2007-10-01 Thread Gnaural
I have a GtkImage in a GtkWindow that I am animating by toggling a GtkImage between two GdkPixbufs, via gtk_image_set_from_pixbuf(). As a "double-buffering" approach allowing me to quickly alter the pixels, it seems to work fine (let me know if there is a better approach). The only problem I have i

Re: In gtk+ application,how to parse xml file

2006-06-23 Thread Gnaural
Here is a link to an example illustrating how to implement GMarkupParser (the simple XML parser most of the other replies referred to): http://www.koders.com/c/fid583B8029A0A2E99A959C4ACF977606E6EA7B0669.aspx ___ gtk-app-devel-list mailing list gtk-a

Re: Cross-platform apps

2006-04-26 Thread Gnaural
Hi, For an understanding of making Windows apps directly from Linux ("cross-compiling"), I found this to be extremely useful: http://www.ecn.wfu.edu/~cottrell/cross-gtk/ Also, I happen to be using portAudio in a windows/linux opensource GTK+ sound program too, here: https://sourceforge.net/projec

Re: Differences between kinds of events

2006-04-11 Thread Gnaural
Thanks for the reply. Using gtk_widget_add_events() was a good tip in general, and the order in which I call things too. But unfortunately, they didn't help solve the question I still see. I'll paste a very short program illustrating what I mean below, in which I set-up a button-press and a key-p

Differences between kinds of events

2006-04-11 Thread Gnaural
I am trying to get a handle on some basic aspects of event handling. In particular, I can't quite figure-out why a drawing area (created with gtk_drawing_area_new ()) can handle mouse-clicks set up with a g_signal_connect call for "button_release_event", but not keyboard input setup with the same g

RE: Gtk and C++

2006-02-11 Thread Gnaural
Hi Jorge, In context: > What I must check from your > message is if I can > compile my "objects" in C++ > and the Glade code in C with MSVC. Actually, what I suggested was even simpler: just compile the entire project in C++. The point being that most C code happily compiles as-is under C++, an

Re: Gtk and C++

2006-02-11 Thread Gnaural
nux. With just a few changes to my project's makefiles, setting them up to make Win32 exes is as easy as typing: ./configure --host=i586-mingw32msvc --target=i586-mingw32msvc --build=`./config.guess` If you want to see how I did it, check-out the latest tarball for this project: https://sourcef

Re: Can I get the raw array to image data?

2006-01-17 Thread Gnaural
> 1) write generic C functions that are not windows > specific (requiring only a pointer to the first > element and image dimensions to process data) Thanks for the replies -- they provided a great start. Ultimately, it looks like the closest thing in the GDK API to what I was looking for (a way

Can I get the raw array to image data?

2005-12-31 Thread Gnaural
I'm posting here because a lot of the Windows apps I'd like to port to GTK depend on graphical steps that I simply don't know how to do in GTK, and I know that many of you have a great deal of Win32 experience and probably know what I am getting at better than I can even find the words to describe.

Re: GTK+ for Windows: issues with apps locating the dll's

2005-12-14 Thread Gnaural
Eduardo M KALINOWSKI <[EMAIL PROTECTED]> wrote: <...> >Another option is Application Paths - they are registry keys for you >application that set a path were it can find DLL's. It's better than >setting the global PATH environment variable. If your program uses a >installer, you'd set this registry

GTK+ for Windows: issues with apps locating the dll's

2005-12-14 Thread Gnaural
First of all, big thanks to Tor Lillqvist and everyone else involved in the GTK+ for Windows port. Because of the GTK+, Glib, the MinGW cross-compiler, and WINE, I never have to leave Linux (or even own a Windows box) to make some Windows users happy! I love that -- in fact, it is the main featu