diff options
| author | Neil <nyamatongwe@gmail.com> | 2021-03-22 17:34:34 +1100 |
|---|---|---|
| committer | Neil <nyamatongwe@gmail.com> | 2021-03-22 17:34:34 +1100 |
| commit | 38eb38d945e08b878d8680025e1cc7239a59afe4 (patch) | |
| tree | cb25701bc763919ebc31613ab5cd447328eb0b5b /gtk | |
| parent | 0035079b6cf849dc5e2ae8face51fcfb99853efa (diff) | |
| download | scintilla-mirror-38eb38d945e08b878d8680025e1cc7239a59afe4.tar.gz | |
Remove IntegerRectangle.h as not widely useful
Add IntegerRectangle struct for local use in PlatGTK.cxx.
Diffstat (limited to 'gtk')
| -rwxr-xr-x | gtk/PlatGTK.cxx | 15 | ||||
| -rw-r--r-- | gtk/deps.mak | 1 |
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 |
