gdkconv.h 848 B

1234567891011121314151617181920212223242526272829303132
  1. ///////////////////////////////////////////////////////////////////////////////
  2. // Name: wx/gtk/private/gdkconv.h
  3. // Purpose: Helper functions for converting between GDK and wx types
  4. // Author: Vadim Zeitlin
  5. // Created: 2009-11-10
  6. // Copyright: (c) 2009 Vadim Zeitlin <vadim@wxwidgets.org>
  7. // Licence: wxWindows licence
  8. ///////////////////////////////////////////////////////////////////////////////
  9. #ifndef _GTK_PRIVATE_GDKCONV_H_
  10. #define _GTK_PRIVATE_GDKCONV_H_
  11. namespace wxGTKImpl
  12. {
  13. inline wxRect wxRectFromGDKRect(const GdkRectangle *r)
  14. {
  15. return wxRect(r->x, r->y, r->width, r->height);
  16. }
  17. inline void wxRectToGDKRect(const wxRect& rect, GdkRectangle& r)
  18. {
  19. r.x = rect.x;
  20. r.y = rect.y;
  21. r.width = rect.width;
  22. r.height = rect.height;
  23. }
  24. } // namespace wxGTKImpl
  25. #endif // _GTK_PRIVATE_GDKCONV_H_