aboutsummaryrefslogtreecommitdiffhomepage
path: root/gtk
diff options
context:
space:
mode:
Diffstat (limited to 'gtk')
-rwxr-xr-xgtk/PlatGTK.cxx15
-rw-r--r--gtk/deps.mak1
2 files changed, 14 insertions, 2 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);
}
diff --git a/gtk/deps.mak b/gtk/deps.mak
index 09c47dcde..0ae4b48e5 100644
--- a/gtk/deps.mak
+++ b/gtk/deps.mak
@@ -7,7 +7,6 @@ PlatGTK.o: \
../include/Scintilla.h \
../include/Sci_Position.h \
../include/ScintillaWidget.h \
- ../src/IntegerRectangle.h \
../src/XPM.h \
../src/UniConversion.h \
Converter.h