Re: type-punning warnings with optimizations turned on?

2007-07-06 Thread Ernie Wright
[EMAIL PROTECTED] wrote: > On 7/6/07, Ernie Wright <[EMAIL PROTECTED]> wrote: > >> > (now someone will tell me the compiler is correct and casting "int >> > *x[]" to "void **" is indeed wrong :-) >> >> This is question 4.9 in the C FAQ: >> >> http://c-faq.com/ptrs/genericpp.html > > > That'

Re: glib/gobject tutorials

2007-07-06 Thread Stefan Kost
hi, please stop reffering to that tutorial under that address. Its part of GObject API docs since more that a year and has also be updated in there since. Stefan Arx Cruz wrote: > http://le-hacker.org/papers/gobject/ > > Great tutorial! > > On 7/4/07, Lucas Stephanou <[EMAIL PROTECTED]> wrote:

Re: type-punning warnings with optimizations turned on?

2007-07-06 Thread jcupitt
On 7/6/07, Ernie Wright <[EMAIL PROTECTED]> wrote: > > (now someone will tell me the compiler is correct and casting "int > > *x[]" to "void **" is indeed wrong :-) > > This is question 4.9 in the C FAQ: > > http://c-faq.com/ptrs/genericpp.html That's very interesting, thank you. Does that mea

Re: type-punning warnings with optimizations turned on?

2007-07-06 Thread jcupitt
On 7/6/07, Alan M. Evans <[EMAIL PROTECTED]> wrote: > That's interesting. Unfortunately for me, I don't have a lot of casting > options. Really, in this case: I meant that whatever it is that g_static_mutex_*() is doing, it might be doing a cast like this internally. Therefore you may have found a

Re: type-punning warnings with optimizations turned on?

2007-07-06 Thread Ernie Wright
[EMAIL PROTECTED] wrote: > (now someone will tell me the compiler is correct and casting "int > *x[]" to "void **" is indeed wrong :-) This is question 4.9 in the C FAQ: http://c-faq.com/ptrs/genericpp.html - Ernie http://home.comcast.net/~erniew ___

Re: type-punning warnings with optimizations turned on?

2007-07-06 Thread Alan M. Evans
On Fri, 2007-07-06 at 16:47 +0100, [EMAIL PROTECTED] wrote: > I think this is a gcc 4.1 issue. I found I couldn't cast from a Thing > *x[] to a void ** in one step without triggering a warning like this. > If I cast to void* and then to void **, all was well. > > Anyway, insert a mysterious extra

Re: type-punning warnings with optimizations turned on?

2007-07-06 Thread Ralf Stephan
You wrote > I think this is a gcc 4.1 issue. 4.0.x IIRC ralf ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list

Re: type-punning warnings with optimizations turned on?

2007-07-06 Thread Alan M. Evans
On Fri, 2007-07-06 at 08:22 -0700, [EMAIL PROTECTED] wrote: > On Fri, 2007-07-06 at 08:00 -0700, Alan M. Evans wrote: > > On Fri, 2007-07-06 at 09:27 +0200, Jonathan Winterflood wrote: > > > Wouldn't that be > > > typedef struct MyMutex MyMutex; > > > rather? > > > > > > Or for short : > > > typed

RE: Running external program inside a widget

2007-07-06 Thread omar . crea
Excuse me but I'm new to GTK+: at which moment I have to call the system() function to run the external program I need (a web browser, in this case)? Do I have to use two different source files to implement this mechanism (run the app as a GtkPlug, give it the ID of the GtkSocket, ecc.)? If not, wh

Re: type-punning warnings with optimizations turned on?

2007-07-06 Thread jcupitt
On 7/5/07, Alan M. Evans <[EMAIL PROTECTED]> wrote: > But with optimizations on (actually, at or above -O2), I get warnings > about type-punning on the calls to g_static_mutex_lock/unlock: > > g++ -O2 -Wall -c `pkg-config --cflags glib-2.0` test.cpp > test.cpp: In function 'void MyM

Re: type-punning warnings with optimizations turned on?

2007-07-06 Thread wallace . owen
On Fri, 2007-07-06 at 08:00 -0700, Alan M. Evans wrote: > On Fri, 2007-07-06 at 09:27 +0200, Jonathan Winterflood wrote: > > Wouldn't that be > > typedef struct MyMutex MyMutex; > > rather? > > > > Or for short : > > typedex struct _MyMutex { > > GStaticMutex mutex; > > } MyMutex; > > Hi. Tha

Re: type-punning warnings with optimizations turned on?

2007-07-06 Thread Alan M. Evans
[Resending, sorry. Screwed up and sent my last reply from the wrong account.] [EMAIL PROTECTED]&*! mail program! Did it again...]] On Fri, 2007-07-06 at 09:27 +0200, Jonathan Winterflood wrote: > Wouldn't that be > typedef struct MyMutex MyMutex; > rather? > > Or for short : > typedex struct _My

Re: [SPAM] Simple video playing with SDL [<- WITHOUT SDL]

2007-07-06 Thread Jonathan Winterflood
Hi, I don't know how to go about it, but usually video playing is done using 'overlay': the area in the app is painted bright green, or pink (some particular color) and the graphics card overlays the video onto any area that color inside the coordinates specified by your program. I think that woul

RE: Running external program inside a widget

2007-07-06 Thread Kumar Siddharth
Hi, You may use GtkSocket(in Host App) and GtkPlug(in Embedded App) for this. Regards, Siddharth TATA Elxsi -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Behalf Of [EMAIL PROTECTED] Sent: Friday, July 06, 2007 7:24 PM To: GTK+ mailing list Subject: Running externa

Running external program inside a widget

2007-07-06 Thread omar . crea
Hi everybody. Do anyone know how to include an external program to a widget of the main window? I have a main window containing a notebook, and in one of the notebook's tab I want to show an instance of a browser (Opera) inside a GtkDrawingArea(), and not to show the external program in its own new

Re: [SPAM] Simple video playing with SDL [<- WITHOUT SDL]

2007-07-06 Thread Gabriele Greco
Gabriele Greco wrote: Just correcting the title of my previous post, obviously I intended WITHOUT SDL or any external library (except the one I use to decode the stream :) ). > Someone can point me some code that does video playback using *only* GTK? > > If the code is not available also some di

How can I hide scrollbar of a GTK scrolled window even if it _needs_ one?

2007-07-06 Thread Wei
Dear all, -- | 1 2 3 4 5 6 7 8 9 | <--- (C), This is a gtk scrolled window named (C) -- - -- | 1 | | o o o o o o o o o | | 2 | | o o o o o o o o o | | 3 |

Re: type-punning warnings with optimizations turned on?

2007-07-06 Thread Andreas Stricker
Jonathan Winterflood schrieb: > Wouldn't that be > typedef struct MyMutex MyMutex; > rather? > > Or for short : > typedex struct _MyMutex { >GStaticMutex mutex; > } MyMutex; Exactly. I should read my mail again, before sending it Cheers, Andy _

Simple video playing with SDL

2007-07-06 Thread Gabriele Greco
Someone can point me some code that does video playback using *only* GTK? If the code is not available also some directions will be enough: - What kind of widget to use? (GtkDrawingArea, GtkImage...) - How to handle double buffering? (perform a queue_draw after each frame update?) - How to blit e

Re: type-punning warnings with optimizations turned on?

2007-07-06 Thread Jonathan Winterflood
Wouldn't that be typedef struct MyMutex MyMutex; rather? Or for short : typedex struct _MyMutex { GStaticMutex mutex; } MyMutex; Cheers, Jonathan On 7/6/07, Andreas Stricker <[EMAIL PROTECTED]> wrote: > > Alan M. Evans schrieb: > > struct MyMutex { > > GStaticMutex mutex;

Re: type-punning warnings with optimizations turned on?

2007-07-06 Thread Andreas Stricker
Alan M. Evans schrieb: > struct MyMutex { > GStaticMutex mutex; > }; Unless you add a define like "typedef MyMutex MyMutex" you have to add the "struct" keyword. Otherwise this is an incomplete type the compiler grouch about: > MyMutex * MyMutex_new() {