SFML community forums

Help => General => Topic started by: Qluxzz on March 19, 2014, 03:24:36 pm

Title: Gtk+3.0 integration to SFML window
Post by: Qluxzz on March 19, 2014, 03:24:36 pm
I have followed a tutorial on how to integrate a SFML window in a GTK window. The code works fine except for one line
App.create(GDK_WINDOW_HWND(win));

I had problems with obtaining the window handle to the gtk window but used this line of code:
GdkWindow *win = gtk_widget_get_window(window);

The error I'm getting now is that the parameter for win is not supported in the renderwindow.

If any one have an updated method for how to integrate Gtk+3.0 to an SFML window or at least knows how to make that line valid that would be great :D
Title: Re: Gtk+3.0 integration to SFML window
Post by: Nexus on March 19, 2014, 03:42:21 pm
I doubt that; simply casting to circumvent compiler type safety checks is never a good idea (you're using a function-style cast, if sf::WindowHandle is a scalar type -- avoid them, along with C-style casts).

You should rather check that you have the correct types.