Advertisement
MrPoxipol

C++ SFML & GTK+

Jul 25th, 2013
339
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.52 KB | None | 0 0
  1.  // Creating SFML View.
  2.  
  3.     GdkEventMask mask;
  4.     mask = GDK_ALL_EVENTS_MASK;
  5.  
  6.     gtk_widget_set_events(area, mask);
  7.     gtk_widget_set_can_focus(area, true);
  8.     gtk_widget_set_size_request(area, VIEW_S, VIEW_S);
  9.     gtk_widget_realize(area);
  10.     gtk_widget_set_double_buffered(area, false);
  11.     gdk_window_resize(area->window, VIEW_S, VIEW_S);
  12.  
  13.  
  14.     #ifdef _WIN32
  15.     Win.create(sf::WindowHandle(GDK_WINDOW_HWND(area->window)));
  16.     #else
  17.     Win.create(sf::WindowHandle(GDK_WINDOW_XID(area->window)));
  18.     #endif
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement