diff options
Diffstat (limited to 'gtk/PlatGTK.cxx')
-rwxr-xr-x | gtk/PlatGTK.cxx | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/gtk/PlatGTK.cxx b/gtk/PlatGTK.cxx index 97f406f4b..580e42414 100755 --- a/gtk/PlatGTK.cxx +++ b/gtk/PlatGTK.cxx @@ -30,7 +30,6 @@ #include "Scintilla.h" #include "ScintillaWidget.h" -#include "IntegerRectangle.h" #include "XPM.h" #include "UniConversion.h" @@ -60,6 +59,20 @@ constexpr float floatFromPangoUnits(int pu) noexcept { return static_cast<float>(pu) / PANGO_SCALE; } +struct IntegerRectangle { + int left; + int top; + int right; + int bottom; + + explicit IntegerRectangle(PRectangle rc) noexcept : + left(static_cast<int>(rc.left)), top(static_cast<int>(rc.top)), + right(static_cast<int>(rc.right)), bottom(static_cast<int>(rc.bottom)) { + } + int Width() const noexcept { return right - left; } + int Height() const noexcept { return bottom - top; } +}; + GdkWindow *WindowFromWidget(GtkWidget *w) noexcept { return gtk_widget_get_window(w); } |