GTK - Win32

2006-11-22 Thread natarajan
Hi, Is there a way to get the Win32 Window Handle (HANDLE HWND) of GTK window/widget in the windows port of GTK? Many Thanks for your replies, Kind Regards, Natarajan ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org http://mail.gnome

Re: GTK - Win32

2006-11-22 Thread Tor Lillqvist
natarajan writes: > Is there a way to get the Win32 Window Handle (HANDLE HWND) of GTK > window/widget in the windows port of GTK? Yes. #include GtkWidget *widget; HWND hwnd = gdk_win32_drawable_get_handle (widget->window); --tml ___ gtk-app-dev

Trimming GTK+ win32 runtime

2008-07-09 Thread Gabriele Greco
I'm trying to trim down GTK runtime to the minimum possible. I've read a Tor mail in this list of a month ago about this topic and applied its suggestions. My starting point was the bundle. - all the documentation, all the headers, all the link libraries, all the translations... - all immodules

g_type_query in gtk-win32

2009-02-05 Thread John Emmas
I'm trying to port a program which previously used gtk-x11 so that it will work with gtk-win32. For the past day or two I've had a very strange problem with the program crashing unexpectedly. Finally I tracked it down to a problem with the function call g_type_query() Here'

drag'n'drop with gtk-win32

2010-04-30 Thread John Emmas
I was going to post this on the gtk-win32 list but I remembered that it only deals with certain specific issues, such as packaging and distribution problems, so I hope someone here will be able to help. I'm in the process of converting an app that was originally written for Linux and use

gtk+ win32 executable size

2006-06-19 Thread Egon Kocjan
Hi, I'm investigating possible future GUI toolkits. I'm interested in size of the smallest possible static build of a gtk+ app on win32. I intend to write simple applications for now, several thousand lines of code, some networking code, 20-30 icons, 5-10 dialogs, 3-5 tree widgets, or so. How

Re: g_type_query in gtk-win32

2009-02-05 Thread Tor Lillqvist
> Here's a very simple program that illustrates the problem:- When I add the missing semicolon, compile, and run the program, I get a lot of error messages, the first (and most relevant) being: (johne53-1.exe:2264): GLib-GObject-CRITICAL **: gtype.c:2458: initialization assertion failed, use g_ty

Re: g_type_query in gtk-win32

2009-02-05 Thread John Emmas
Oops, sorry Tor - I guess I should have copied and pasted instead of typing this out manually. In fact I had carried out the initialisation but slightly differently. This is how the real code looked (copied and pasted, this time) #include int main (int argc, char *argv[]) { gtk_init (&argc,

Re: g_type_query in gtk-win32

2009-02-05 Thread John Emmas
I think I might have figured this out (it's just a theory at the moment though). Here's the page that I used for installing gtk-win32:- http://www.gtk.org/download-windows.html I installed most of the libraries shown except for a few that I don't have installed anyway, like lib

Re: g_type_query in gtk-win32

2009-02-05 Thread Tor Lillqvist
> I am, because I get a runtime error if I don;t use > that flag - even though I'm not linking to any Microsoft libraries. Is that > normal? The run-time error is intentional, to make sure that you did use the switch. Whether you link to Microsoft libraries or not is not relevant here. What's rel

Re: g_type_query in gtk-win32

2009-02-05 Thread John Emmas
Thanks again, Tor. I seem to be making progress but after installing libgnomecanvas I've hit another brick wall. When I try to run that same program, Windows tells me that it cannot proceed because "intl.dll" isn't installed (note: "intl.dll" - not "libintl.dll"). Sorry to be a pest but I'm not

Re: g_type_query in gtk-win32

2009-02-05 Thread Tor Lillqvist
> When I try to run that same program, Windows tells me > that it cannot proceed because "intl.dll" isn't installed (note: > "intl.dll" - not "libintl.dll"). intl.dll is in the gettext package on the download page. > Is it expecting libintl, The intl.dll is what would otherwise have been called

Re: g_type_query in gtk-win32

2009-02-05 Thread John Emmas
I build it as intl.dll to keep backward compatibility with older versions of gettext where the official way to build for Windows was with MSVC, and that process produced a DLL called intl.dll. On the subject of libtool, I've noticed that none of the gtk-win32 libraries and dependencies that

Re: g_type_query in gtk-win32

2009-02-05 Thread Tor Lillqvist
> On the subject of libtool, I've noticed that none of the gtk-win32 libraries > and dependencies that I've loaded (so far) have included the ".la" files > that I'm used to seeing with package installations from other sources. As far as I know, distributing .la f

Re: g_type_query in gtk-win32

2009-02-05 Thread John Emmas
- Original Message - From: "Tor Lillqvist" As far as I know, distributing .la files is not a good idea. You don't see any .la files being distributed in devel packages on Linux either. That's odd. my Linux tree is full of them (64studio). Well over 500 and many are quite recent (

GTK win32 - g_main_context_iteration during WM_WINDOWPOSCHANGED

2009-05-15 Thread jonathan david
Hello all, I set a timer that calls gtk_window_move on a popup window(*1). while the popup window is moving I move the main application window. This leads to immediate processing of WM_WINDOWPOSCHANGED message, which in turn calls g_main_context_iteration during that iteration, additional call to t

Re: drag'n'drop with gtk-win32

2010-04-30 Thread Tor Lillqvist
> Under Linux, the app supports dragging and dropping of certain audio files > (for example, WAV files).  So, using Nautilus, the user can select a WAV file > and drop it into one of several containers within the app.  The WAV file is > then effectively imported for use in the app. That kind of

Re: drag'n'drop with gtk-win32

2010-04-30 Thread John Emmas
On 30 Apr 2010, at 13:09, Tor Lillqvist wrote: >> Before I spend too much time tracking down the problem, > > Do you actually have a problem? Have you tested dragging-and-dropping > files from Explorer? > Thanks Tor - yes I have tested it and it doesn't work but I haven't looked far enough in

Re: drag'n'drop with gtk-win32

2010-04-30 Thread Tor Lillqvist
> Can you clarify that for me, Tor?  How is Windows Explorer different from any > other external application? Well, Explorer is obviously a part of Windows, it is not a 3rd-party application. So it has better access to the internal plumbings of Windows than normal apps. But more importantly, the

gtk win32 and env variables

2005-11-05 Thread Dan McMahill
Hi, Not sure if this is the right list or not for this question. I have a gtk+ app developed for NetBSD/Linux/Solaris. I just ported it to windows with almost no pain thanks to gtk for win32. I even made an installer with NSIS. The problem I have though is that my program has 2 directories

gtk win32 and env variables

2005-11-05 Thread Tor Lillqvist
Dan McMahill writes: > On windows, it is easy for the user to pick a different place to > install so I need to set those variables. > So my question is how do gtk apps ported to windows typically deal with > something like that? Typically they assume that all the application's data files are

Re: gtk+ win32 executable size

2006-06-19 Thread Patrik Fimml
> I'm investigating possible future GUI toolkits. I'm interested in size > of the smallest possible static build of a gtk+ app on win32. I intend > to write simple applications for now, several thousand lines of code, > some networking code, 20-30 icons, 5-10 dialogs, 3-5 tree widgets, or > so.

Re: gtk+ win32 executable size

2006-06-19 Thread Tor Lillqvist
Egon Kocjan writes: > How big will be the final executable on win32? My guess is that people who use GTK+ seldom tend to stare at executable sizes. Please also note that the size of GTK+ itself and its dependencies is substantial. Before you ask, no, you can't link to GTK+ statically. Yes, feel f

which gtk-win32 version to use?

2010-09-27 Thread Manu
Hi everybody, I'm building an app for linux and windows. I use gtk-win32 with mingw for the windows version. The linux version is very stable but the windows version sometimes randomly crashes. My question is: which gtk-win32 version is best to use? On the gtk website, it's sai

Re: gtk win32 and env variables

2005-11-05 Thread Goran Rakić
Put this first: #ifdef WIN32 # include # include #endif And latter in your code... #ifdef WIN32 // Fallback value: data in working dir char dbpath[MAX_PATH]="data"; HKEY hkResult; DWORD DataType; DWORD DataCount = MAX_PATH; // Open registry key if (RegOpen

Re: gtk win32 and env variables

2005-11-05 Thread David Necas (Yeti)
On Sat, Nov 05, 2005 at 03:40:40PM +0100, Goran Rakić wrote: > > Put this first: > > ... (some win32 registry code) ... Or have a look at g_win32_get_package_installation_directory(). Calling it with NULL arguments is usually sufficient. *Not* storing the directory in registry has the advantage

Re: gtk win32 and env variables

2005-11-05 Thread Goran Rakić
On 05.11.2005., at 16.09, David Necas (Yeti) wrote: g_win32_get_package_installation_directory I did not know for this function. It is nice to have it around. Goran Rakic ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org http://mai

Re: gtk win32 and env variables

2005-11-05 Thread John Cupitt
On 11/5/05, David Necas (Yeti) <[EMAIL PROTECTED]> wrote: > On Sat, Nov 05, 2005 at 03:40:40PM +0100, Goran Rakić wrote: > > > > Put this first: > > > > ... (some win32 registry code) ... > > Or have a look at g_win32_get_package_installation_directory(). Very neat. Another solution for applicatio

Re: gtk win32 and env variables

2005-11-05 Thread Eduardo M KALINOWSKI
David Necas (Yeti) wrote: > >Or have a look at g_win32_get_package_installation_directory(). >Calling it with NULL arguments is usually sufficient. *Not* >storing the directory in registry has the advantage the app >can be moved around freely without breaking it (of course, >if it's not prevented

Re: gtk win32 and env variables

2005-11-05 Thread Tor Lillqvist
> Another solution for applications is to look at argv[0]. On > Windows this is always (I think) the full path to the .exe. Looking at argv[0] is really not recommended on Windows. If memory serves me right, if the path to the application has spaces in it, it might even be that depending on the ph

Re: gtk win32 and env variables

2005-11-06 Thread John Cupitt
On 11/6/05, Tor Lillqvist <[EMAIL PROTECTED]> wrote: > > Another solution for applications is to look at argv[0]. On > > Windows this is always (I think) the full path to the .exe. > > Looking at argv[0] is really not recommended on Windows. If memory > serves me right, if the path to the applicati

Re: gtk win32 and env variables

2005-11-06 Thread Dan McMahill
Tor Lillqvist wrote: Dan McMahill writes: > On windows, it is easy for the user to pick a different place to > install so I need to set those variables. > So my question is how do gtk apps ported to windows typically deal with > something like that? Typically they assume that all the appl

Weird error on GTK+Win32(Run-Time)

2006-09-21 Thread Thaorius
Hi everyone! Well, I'm new to the list, so I begin my post with a question. First of anything, I'm using win32 with dev-cpp(MinGW). I tryed to compile the first example of gtk tutorial, it compiled fine, but, on runtime i get this error: http://img245.imageshack.us/img245/8224/gtkgo8.jpg When I a

GTK win32 port: jpeg and TIFF dlls

2007-11-11 Thread Allin Cottrell
I recently tried updating from the 2.10 to the 2.12 version of the GTK runtime for the stand-alone Windows package of my GTK app. I see that there's now a hard-wired dependency on the jpeg and TIFF dlls. That is, the app won't start without these libraries (but it ran OK under the 2.10 GTK run

Getting started with gdk-pixbuf (gtk-win32)

2009-02-03 Thread John Emmas
from_file("/usr/local/share/icons/left_arrow.png", &error); return 0; } Here's a very similar program that DOESN'T work if I build with gtk-win32:- int main (int argc, char *argv[]) { gtk_init (&argc, &argv); GError* error = 0; GdkPixbuf *const pix

Re: which gtk-win32 version to use?

2010-09-27 Thread Allin Cottrell
On Tue, 28 Sep 2010, Manu wrote: > I'm building an app for linux and windows. I use gtk-win32 with > mingw for the windows version. The linux version is very stable > but the windows version sometimes randomly crashes. My question > is: which gtk-win32 version is best to use? O

Re: which gtk-win32 version to use?

2010-09-28 Thread Manu
te: On Tue, 28 Sep 2010, Manu wrote: I'm building an app for linux and windows. I use gtk-win32 with mingw for the windows version. The linux version is very stable but the windows version sometimes randomly crashes. My question is: which gtk-win32 version is best to use? On the gtk website

Re: which gtk-win32 version to use?

2010-09-28 Thread Tor Lillqvist
> "this app has requested the runtime to terminate it in an unusual way". That is just the message you get when abort() is called. Not really any more or less informative than the single-word message "Aborted" that Unix shells typically print... To find out what is happening you need to use a deb

Re: which gtk-win32 version to use?

2010-09-28 Thread Manu
Thanks. I have just installed gdb for mingw. Manu TM On 9/28/2010 1:41 PM, Tor Lillqvist wrote: "this app has requested the runtime to terminate it in an unusual way". That is just the message you get when abort() is called. Not really any more or less informative than the single-word messag

Re: which gtk-win32 version to use?

2010-09-30 Thread Gabriele Greco
On Tue, Sep 28, 2010 at 2:50 PM, Manu wrote: > > > Thanks. I have just installed gdb for mingw. > > Another thing that helps to catch problems that you cannot reproduce easily is Dr.Mingw, you can find it in the mingw-utils package. It's a crash handler to be installed on the windows machine. If

Re: which gtk-win32 version to use?

2010-10-20 Thread Emmanuel Thomas-Maurin
Thanks everybody for the answers. So far, I've only found that one call to pango_layout_get_pixel_size() in my app was followed by a segfault although the layout is valid, so this remains quite confusing (at least for me.) Now I have one more question: In the linux version, I use g_timeout_add

Re: Weird error on GTK+Win32(Run-Time)

2006-09-22 Thread Tor Lillqvist
Thaorius writes: > The error message tell me that I should use -mms-bitfield switch in gcc > options, so, I did, but there are no changes at all. It's -mms-bitfields (note the final 's'). But if that was just a typo and you did spell it correctly, maybe you didn't use it in the right place? Are

Re: GTK win32 port: jpeg and TIFF dlls

2007-11-11 Thread Allin Cottrell
Apologies for replying to myself, but after posting the following... > I see that there's now a hard-wired dependency on the jpeg and > TIFF dlls. That is, the app won't start without these libraries > (but it ran OK under the 2.10 GTK runtime)... I found a related message, http://mail.gnome

Re: GTK win32 port: jpeg and TIFF dlls

2007-11-12 Thread Ivan Baldo
El 11/11/07 23:22, Allin Cottrell escribió: > "In 2.12.0 I built in the loaders into the gdk-pixbuf library. > There are no separate loader dlls. This has the benefit that there > are less files in the gtk+ distribution, and there is one less > thing that might go wrong, as the built-in loader

Re: Getting started with gdk-pixbuf (gtk-win32)

2009-02-03 Thread Tor Lillqvist
> After a bit of digging I found a file called 'gdk-pixbuf.loaders' which > contains the paths to the various loaders - but it's the standard file that > came with the gtk-win32-dev package (which I simply unzipped) and of course, > those paths aren't relevant to

Re: Getting started with gdk-pixbuf (gtk-win32)

2009-02-03 Thread John Emmas
- Original Message - From: "Tor Lillqvist" Subject: Re: Getting started with gdk-pixbuf (gtk-win32) So, as was mentioned on the mingw-users list, it is likely that you have just moved the DLLs and/or config files around from their initial (relative) locations. (I keep e

Strange display problem with gtk-win32 and VC++

2010-11-06 Thread John Emmas
For the past few years I've been migrating my Windows apps to GTK+ which I now tend to use in preference to Microsoft's MFC. However, I've always been conscious of the fact that the official gnome binaries are (apparently) built using the 'C' runtime that equates to VC6. VC6 has been obsolete

Re: Strange display problem with gtk-win32 and VC++

2010-11-06 Thread Guy Rouillier
On 11/6/2010 1:03 PM, John Emmas wrote: If I build the app and link it to the official gnome binaries, it works perfectly well. However, if I rebuild those binaries (using the various Visual Studio projects supplied with gtk / glib etc) the app doesn't work. The window and title display correc

Re: Strange display problem with gtk-win32 and VC++

2010-11-07 Thread Tor Lillqvist
>no one ever wants to volunteer to help. Actually, that is not true. For instance, the ms-windows theme engine is now effectively maintained once again and compiles and maybe even works in gtk+ master. And for bulding the GTK+ stack for Windows (32- and 64-bit), I very much plan to stop doing it m

Re: Strange display problem with gtk-win32 and VC++

2010-11-07 Thread John Emmas
On 7 Nov 2010, at 00:15, Guy Rouillier wrote: > > Since the number of squares equals the number of characters in the label you > are trying to display, the problem appears to be one of font rendering. > Thanks Guy. I think I've been easing towards that conclusion myself but it's good that so

Re: Strange display problem with gtk-win32 and VC++

2010-11-07 Thread Vincent Torri
On Sun, 7 Nov 2010, Tor Lillqvist wrote: no one ever wants to volunteer to help. Actually, that is not true. For instance, the ms-windows theme engine is now effectively maintained once again and compiles and maybe even works in gtk+ master. And for bulding the GTK+ stack for Windows (32- an

Re: Strange display problem with gtk-win32 and VC++

2010-11-07 Thread Tor Lillqvist
> What about joining forces and make one unique official repository for > packages on Windows ? You mean, like there is one unique official Linux distribution? --tml ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org http://mail.gnome.org/

Re: Strange display problem with gtk-win32 and VC++

2010-11-07 Thread Vincent Torri
On Sun, 7 Nov 2010, Tor Lillqvist wrote: What about joining forces and make one unique official repository for packages on Windows ? You mean, like there is one unique official Linux distribution? nice comment Vincent Torri ___ gtk-app-devel

Re: Strange display problem with gtk-win32 and VC++

2010-11-07 Thread John Emmas
On 7 Nov 2010, at 07:31, Tor Lillqvist wrote: > > if you are trying to use those with a current GLib or GTK+, > please check bugzilla for ones that actually work > I found this info on bugzilla:- https://bugzilla.gnome.org/browse.cgi?product=gtk%2B but it wasn't very obvious which releases a

Re: Strange display problem with gtk-win32 and VC++

2010-11-07 Thread John Emmas
On 7 Nov 2010, at 11:39, John Emmas wrote: > > My guess at the moment is that there's no font being loaded > for the label widget. Does that seem like a possible explanation? > Oops, how silly of me! Just noticed some text in the console window saying "Pango-WARNING **: failed to choose a

Re: Strange display problem with gtk-win32 and VC++

2010-11-07 Thread Jaroslav Šmíd
So try to set your desired font - edit or create (GTKDIR)\etc\gtk-2.0\gtkrc and add line like gtk-font-name = "Segoe UI" On Sun, Nov 7, 2010 at 2:19 PM, John Emmas wrote: > > On 7 Nov 2010, at 11:39, John Emmas wrote: > >> >>  My guess at the moment is that there's no font being loaded >>  for th

Re: Strange display problem with gtk-win32 and VC++

2010-11-08 Thread John Emmas
On 7 Nov 2010, at 18:14, Jaroslav Šmíd wrote: > So try to set your desired font - edit or create > (GTKDIR)\etc\gtk-2.0\gtkrc and add line like > gtk-font-name = "Segoe UI" > Thanks for the tip. In fact it turned out to be due to the fact that an entry in my pango.modules file had spaces in its

gdk/gtk+ win32 thread question, please help to explain

2011-11-22 Thread KC
Hi, According to http://developer.gnome.org/gdk/stable/gdk-Threads.html ... Unfortunately the above holds with the X11 backend only. With the Win32 backend, GDK calls should not be attempted from multiple threads at all. ... The "Unfortunately ..." statement does not mention GTK+, only GDK. Does

Re: gdk/gtk+ win32 thread question, please help to explain

2011-11-22 Thread KC
On Wed, Nov 23, 2011 at 11:06 AM, KC wrote: > Hi, > > According to http://developer.gnome.org/gdk/stable/gdk-Threads.html > > ... > Unfortunately the above holds with the X11 backend only. With the Win32 > backend, > GDK calls should not be attempted from multiple threads at all. > ... > > The "U

Re: gdk/gtk+ win32 thread question, please help to explain

2011-11-22 Thread Michael Cronenworth
On 11/22/2011 10:13 PM, KC wrote: So the "Unfortunately ..." statement only apply to GDK on WIN32 ? It's safe to call GTK+ APIs (if protected by gdk_threads_enter/leave) from multi-threads even on WIN32 backend ? Is this correct ? No. GTK2 (I can't say about GTK3, but I bet it is the same) most

Re: gdk/gtk+ win32 thread question, please help to explain

2011-11-22 Thread KC
On Wed, Nov 23, 2011 at 12:43 PM, Michael Cronenworth wrote: > On 11/22/2011 10:13 PM, KC wrote: >> >> So the "Unfortunately ..." statement only apply to GDK on WIN32 ? >> It's safe to call GTK+ APIs (if protected by gdk_threads_enter/leave) >> from multi-threads even on WIN32 backend ? Is this co

Re: gdk/gtk+ win32 thread question, please help to explain

2011-11-23 Thread Emmanuel Thomas-Maurin
On 11/23/2011 07:28 AM, KC wrote: > On Wed, Nov 23, 2011 at 12:43 PM, Michael Cronenworth wrote: >> On 11/22/2011 10:13 PM, KC wrote: >>> >>> So the "Unfortunately ..." statement only apply to GDK on WIN32 ? >>> It's safe to call GTK+ APIs (if protected by gdk_threads_enter/leave) >>> from multi-t

Re: gdk/gtk+ win32 thread question, please help to explain

2011-11-23 Thread KC
On Wed, Nov 23, 2011 at 4:16 PM, Emmanuel Thomas-Maurin wrote: > On 11/23/2011 07:28 AM, KC wrote: >> On Wed, Nov 23, 2011 at 12:43 PM, Michael Cronenworth >> wrote: >>> On 11/22/2011 10:13 PM, KC wrote: So the "Unfortunately ..." statement only apply to GDK on WIN32 ? It's safe t

Re: gdk/gtk+ win32 thread question, please help to explain

2011-11-23 Thread Emmanuel Thomas-Maurin
>> -> Windows portability for gnome software >> (http://www.iki.fi/tml/fosdem-2006.pdf) > > I don't know this useful presentation before, Thanks. I have spent weeks trying to debug a gtk-win32 application with threads until I finally discovered this one and modified

gtk-win32 crash when trying to move a GTK top level window

2012-07-29 Thread John Emmas
I'm working on a gtk-win32 app which currently uses GTK+ 2.20. I've discovered a crashing bug and wanted to check if it's still in the latest version. I've tried this on Windows 7 and Windows XP and it's very easy to reproduce if someone would like to try it 1)

Re: gtk-win32 crash when trying to move a GTK top level window

2012-07-29 Thread Tadej Borovšak
Hi. > 1) Launch any gtk-win32 app > 2) Right-click the application's title bar and select 'Move' > 3) Without clicking your mouse yet, move the mouse, then left-click it, > anywhere outside of the app > 4) Right-click the title bar again and your app will cras

Re: gtk-win32 crash when trying to move a GTK top level window

2012-07-29 Thread John Emmas
On 29 Jul 2012, at 15:22, Tadej Borovšak wrote: > > looks like things have been fixed somewhere between 2.20 and 2.24.10? > Thanks Tadej, you were right. I just downloaded gdkevents-win32.c from 2.24.10 and took a quick look. The fix is exactly the same strategy that I was going to implement