Welcome, Guest. Please login or register. Did you miss your activation email?

Author Topic: Gtk+3.0 integration to SFML window  (Read 1275 times)

0 Members and 1 Guest are viewing this topic.

Qluxzz

  • Guest
Gtk+3.0 integration to SFML window
« 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

Nexus

  • SFML Team
  • Hero Member
  • *****
  • Posts: 6287
  • Thor Developer
    • View Profile
    • Bromeon
Re: Gtk+3.0 integration to SFML window
« Reply #1 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.
Zloxx II: action platformer
Thor Library: particle systems, animations, dot products, ...
SFML Game Development:

 

anything