]> git.saurik.com Git - wxWidgets.git/blob - include/wx/gtk/private/gdkconv.h
Connect to events only if using native implementation instead of using event table...
[wxWidgets.git] / include / wx / gtk / private / gdkconv.h
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 // RCS-ID: $Id$
7 // Copyright: (c) 2009 Vadim Zeitlin <vadim@wxwidgets.org>
8 // Licence: wxWindows licence
9 ///////////////////////////////////////////////////////////////////////////////
10
11 #ifndef _GTK_PRIVATE_GDKCONV_H_
12 #define _GTK_PRIVATE_GDKCONV_H_
13
14 namespace wxGTKImpl
15 {
16
17 inline wxRect wxRectFromGDKRect(const GdkRectangle *r)
18 {
19 return wxRect(r->x, r->y, r->width, r->height);
20 }
21
22 inline void wxRectToGDKRect(const wxRect& rect, GdkRectangle& r)
23 {
24 r.x = rect.x;
25 r.y = rect.y;
26 r.width = rect.width;
27 r.height = rect.height;
28 }
29
30 } // namespace wxGTKImpl
31
32 #endif // _GTK_PRIVATE_GDKCONV_H_
33