[SDL] GTKmm & SDL

carmelo gallucci cgallucci at inwind.it
Thu Feb 9 11:31:41 PST 2006


Hi.
I'm trying to get sdl working with GTKmm.
I need to show 16 cam streaming on the monitor and i'm using SDL_Thread
to do this. iI have several problems :-).

1) Cannot get Event to be processed. I cannot get Mouse event and i
don't know why. In this case i use one main scree surface on the main
window application.
To avoid this problem i tryed to get event in a GTK::DrawingArea widget.
In this case i can catch gtk event but a cannot get SDL working.
The following code:
{
	char SDL_windowhack[32];
	
sprintf(SDL_windowhack,"SDL_WINDOWID=%ld",GDK_WINDOW_XWINDOW(((Gtk::Widg
et *) m_drawingArea)->gobj()->window));
	putenv(SDL_windowhack);
}		
 give me this error:
The program 'tpdvr' received an X Window System error.
This probably reflects a bug in the program.
The error was 'BadWindow (invalid Window parameter)'.
  (Details: serial 45 error_code 3 request_code 3 minor_code 0)
  (Note to programmers: normally, X errors are reported asynchronously;
   that is, you will receive the error a while after causing it.
   To debug your program, run it with the --sync command line
   option to change this behavior. You can then get a meaningful
   backtrace from your debugger if you break on the gdk_x_error()
function.)

I Cannot fix it. I try also other version of code but no good result.
Anyone know somthing about this problem?
How can i make an application (using gtk) with SDL_Surface, MouseEvent
and widget?

Thanks in advance.

Carmelo Gallucci
____________________________________________
Gallucci Carmelo
Tecno Plus S.a.s

Via Fratelli Bandiera Scala C Palazzo Giordano
87030 Rende (CS)
Tel. 0984/462228 Int. 42
Fax. 0984/847326
Cell. 349/7609477
Skype carmelogallucci
URL: http://www.tecnoplus.biz





More information about the SDL mailing list