summaryrefslogtreecommitdiff
path: root/Libraries/LibGUI
diff options
context:
space:
mode:
authorAndreas Kling <awesomekling@gmail.com>2019-07-18 10:15:00 +0200
committerAndreas Kling <awesomekling@gmail.com>2019-07-18 10:18:16 +0200
commit1c0669f010b6859721b5a4594b1e38d4098e43f4 (patch)
tree4acdff111c4f491b62b1eb293117cd3605520bd2 /Libraries/LibGUI
parent2167f6023509078fe4ab1961c684a239bd18e588 (diff)
downloadserenity-1c0669f010b6859721b5a4594b1e38d4098e43f4.zip
LibDraw: Introduce (formerly known as SharedGraphics.)
Instead of LibGUI and WindowServer building their own copies of the drawing and graphics code, let's it in a separate LibDraw library. This avoids building the code twice, and will encourage better separation of concerns. :^)
Diffstat (limited to 'Libraries/LibGUI')
-rw-r--r--Libraries/LibGUI/GAbstractButton.h2
-rw-r--r--Libraries/LibGUI/GAction.h2
-rw-r--r--Libraries/LibGUI/GButton.cpp2
-rw-r--r--Libraries/LibGUI/GButton.h6
-rw-r--r--Libraries/LibGUI/GCheckBox.cpp4
-rw-r--r--Libraries/LibGUI/GDesktop.h2
-rw-r--r--Libraries/LibGUI/GDirectoryModel.cpp2
-rw-r--r--Libraries/LibGUI/GEvent.h4
-rw-r--r--Libraries/LibGUI/GFilePicker.cpp2
-rw-r--r--Libraries/LibGUI/GFontDatabase.cpp2
-rw-r--r--Libraries/LibGUI/GFrame.cpp2
-rw-r--r--Libraries/LibGUI/GFrame.h2
-rw-r--r--Libraries/LibGUI/GGroupBox.cpp2
-rw-r--r--Libraries/LibGUI/GIcon.h2
-rw-r--r--Libraries/LibGUI/GLabel.cpp2
-rw-r--r--Libraries/LibGUI/GLabel.h2
-rw-r--r--Libraries/LibGUI/GModel.h2
-rw-r--r--Libraries/LibGUI/GPainter.h2
-rw-r--r--Libraries/LibGUI/GRadioButton.cpp2
-rw-r--r--Libraries/LibGUI/GResizeCorner.cpp2
-rw-r--r--Libraries/LibGUI/GScrollBar.cpp6
-rwxr-xr-xLibraries/LibGUI/GSlider.cpp2
-rw-r--r--Libraries/LibGUI/GStatusBar.cpp2
-rw-r--r--Libraries/LibGUI/GTabWidget.cpp2
-rw-r--r--Libraries/LibGUI/GTextEditor.h2
-rw-r--r--Libraries/LibGUI/GVariant.h2
-rw-r--r--Libraries/LibGUI/GWidget.cpp2
-rw-r--r--Libraries/LibGUI/GWidget.h6
-rw-r--r--Libraries/LibGUI/GWindow.cpp2
-rw-r--r--Libraries/LibGUI/GWindow.h4
-rw-r--r--Libraries/LibGUI/Makefile14
31 files changed, 40 insertions, 52 deletions
diff --git a/Libraries/LibGUI/GAbstractButton.h b/Libraries/LibGUI/GAbstractButton.h
index 386bfc4960..6e5f77e19a 100644
--- a/Libraries/LibGUI/GAbstractButton.h
+++ b/Libraries/LibGUI/GAbstractButton.h
@@ -2,7 +2,7 @@
#include <LibCore/CTimer.h>
#include <LibGUI/GWidget.h>
-#include <SharedGraphics/TextAlignment.h>
+#include <LibDraw/TextAlignment.h>
class GPainter;
diff --git a/Libraries/LibGUI/GAction.h b/Libraries/LibGUI/GAction.h
index 867c41e213..eedb597d61 100644
--- a/Libraries/LibGUI/GAction.h
+++ b/Libraries/LibGUI/GAction.h
@@ -9,7 +9,7 @@
#include <AK/WeakPtr.h>
#include <AK/Weakable.h>
#include <LibGUI/GShortcut.h>
-#include <SharedGraphics/GraphicsBitmap.h>
+#include <LibDraw/GraphicsBitmap.h>
class GActionGroup;
class GButton;
diff --git a/Libraries/LibGUI/GButton.cpp b/Libraries/LibGUI/GButton.cpp
index 3274d4992f..d94fe81e74 100644
--- a/Libraries/LibGUI/GButton.cpp
+++ b/Libraries/LibGUI/GButton.cpp
@@ -4,7 +4,7 @@
#include <LibGUI/GActionGroup.h>
#include <LibGUI/GButton.h>
#include <LibGUI/GPainter.h>
-#include <SharedGraphics/StylePainter.h>
+#include <LibDraw/StylePainter.h>
GButton::GButton(GWidget* parent)
: GAbstractButton(parent)
diff --git a/Libraries/LibGUI/GButton.h b/Libraries/LibGUI/GButton.h
index acd7d7298c..c5724c0f01 100644
--- a/Libraries/LibGUI/GButton.h
+++ b/Libraries/LibGUI/GButton.h
@@ -3,9 +3,9 @@
#include <AK/AKString.h>
#include <AK/Function.h>
#include <LibGUI/GAbstractButton.h>
-#include <SharedGraphics/GraphicsBitmap.h>
-#include <SharedGraphics/StylePainter.h>
-#include <SharedGraphics/TextAlignment.h>
+#include <LibDraw/GraphicsBitmap.h>
+#include <LibDraw/StylePainter.h>
+#include <LibDraw/TextAlignment.h>
class GAction;
diff --git a/Libraries/LibGUI/GCheckBox.cpp b/Libraries/LibGUI/GCheckBox.cpp
index 2bd5067bc9..bca4cd8a97 100644
--- a/Libraries/LibGUI/GCheckBox.cpp
+++ b/Libraries/LibGUI/GCheckBox.cpp
@@ -1,8 +1,8 @@
#include <Kernel/KeyCode.h>
#include <LibGUI/GCheckBox.h>
#include <LibGUI/GPainter.h>
-#include <SharedGraphics/CharacterBitmap.h>
-#include <SharedGraphics/StylePainter.h>
+#include <LibDraw/CharacterBitmap.h>
+#include <LibDraw/StylePainter.h>
static const char* s_checked_bitmap_data = {
" "
diff --git a/Libraries/LibGUI/GDesktop.h b/Libraries/LibGUI/GDesktop.h
index a76142fe0f..01b03debac 100644
--- a/Libraries/LibGUI/GDesktop.h
+++ b/Libraries/LibGUI/GDesktop.h
@@ -3,7 +3,7 @@
#include <AK/AKString.h>
#include <AK/Badge.h>
#include <AK/Function.h>
-#include <SharedGraphics/Rect.h>
+#include <LibDraw/Rect.h>
class GWindowServerConnection;
diff --git a/Libraries/LibGUI/GDirectoryModel.cpp b/Libraries/LibGUI/GDirectoryModel.cpp
index c8ad8f40d0..b682f9bf7e 100644
--- a/Libraries/LibGUI/GDirectoryModel.cpp
+++ b/Libraries/LibGUI/GDirectoryModel.cpp
@@ -4,7 +4,7 @@
#include <LibCore/CDirIterator.h>
#include <LibCore/CLock.h>
#include <LibGUI/GPainter.h>
-#include <SharedGraphics/GraphicsBitmap.h>
+#include <LibDraw/GraphicsBitmap.h>
#include <dirent.h>
#include <grp.h>
#include <pwd.h>
diff --git a/Libraries/LibGUI/GEvent.h b/Libraries/LibGUI/GEvent.h
index 9d98188836..980fb54296 100644
--- a/Libraries/LibGUI/GEvent.h
+++ b/Libraries/LibGUI/GEvent.h
@@ -3,8 +3,8 @@
#include <Kernel/KeyCode.h>
#include <LibCore/CEvent.h>
#include <LibGUI/GWindowType.h>
-#include <SharedGraphics/Point.h>
-#include <SharedGraphics/Rect.h>
+#include <LibDraw/Point.h>
+#include <LibDraw/Rect.h>
class CObject;
diff --git a/Libraries/LibGUI/GFilePicker.cpp b/Libraries/LibGUI/GFilePicker.cpp
index 9fe7c4db1a..fb4b3c819c 100644
--- a/Libraries/LibGUI/GFilePicker.cpp
+++ b/Libraries/LibGUI/GFilePicker.cpp
@@ -11,7 +11,7 @@
#include <LibGUI/GSortingProxyModel.h>
#include <LibGUI/GTextBox.h>
#include <LibGUI/GToolBar.h>
-#include <SharedGraphics/PNGLoader.h>
+#include <LibDraw/PNGLoader.h>
Optional<String> GFilePicker::get_open_filepath()
{
diff --git a/Libraries/LibGUI/GFontDatabase.cpp b/Libraries/LibGUI/GFontDatabase.cpp
index 6bd3887707..a8fee8844c 100644
--- a/Libraries/LibGUI/GFontDatabase.cpp
+++ b/Libraries/LibGUI/GFontDatabase.cpp
@@ -1,6 +1,6 @@
#include <LibCore/CDirIterator.h>
#include <LibGUI/GFontDatabase.h>
-#include <SharedGraphics/Font.h>
+#include <LibDraw/Font.h>
#include <dirent.h>
#include <stdio.h>
#include <stdlib.h>
diff --git a/Libraries/LibGUI/GFrame.cpp b/Libraries/LibGUI/GFrame.cpp
index 418fe40492..8854bb5e03 100644
--- a/Libraries/LibGUI/GFrame.cpp
+++ b/Libraries/LibGUI/GFrame.cpp
@@ -1,6 +1,6 @@
#include <LibGUI/GFrame.h>
#include <LibGUI/GPainter.h>
-#include <SharedGraphics/StylePainter.h>
+#include <LibDraw/StylePainter.h>
GFrame::GFrame(GWidget* parent)
: GWidget(parent)
diff --git a/Libraries/LibGUI/GFrame.h b/Libraries/LibGUI/GFrame.h
index b6757e4d8d..84b07413f6 100644
--- a/Libraries/LibGUI/GFrame.h
+++ b/Libraries/LibGUI/GFrame.h
@@ -1,7 +1,7 @@
#pragma once
#include <LibGUI/GWidget.h>
-#include <SharedGraphics/StylePainter.h>
+#include <LibDraw/StylePainter.h>
class GFrame : public GWidget {
public:
diff --git a/Libraries/LibGUI/GGroupBox.cpp b/Libraries/LibGUI/GGroupBox.cpp
index 5242c33240..3ce063f248 100644
--- a/Libraries/LibGUI/GGroupBox.cpp
+++ b/Libraries/LibGUI/GGroupBox.cpp
@@ -1,6 +1,6 @@
#include <LibGUI/GGroupBox.h>
#include <LibGUI/GPainter.h>
-#include <SharedGraphics/StylePainter.h>
+#include <LibDraw/StylePainter.h>
GGroupBox::GGroupBox(GWidget* parent)
: GGroupBox({}, parent)
diff --git a/Libraries/LibGUI/GIcon.h b/Libraries/LibGUI/GIcon.h
index 2aecd7f2ed..d849929a50 100644
--- a/Libraries/LibGUI/GIcon.h
+++ b/Libraries/LibGUI/GIcon.h
@@ -1,7 +1,7 @@
#pragma once
#include <AK/HashMap.h>
-#include <SharedGraphics/GraphicsBitmap.h>
+#include <LibDraw/GraphicsBitmap.h>
class GIconImpl : public RefCounted<GIconImpl> {
public:
diff --git a/Libraries/LibGUI/GLabel.cpp b/Libraries/LibGUI/GLabel.cpp
index 5a6fdc6580..bba9e4897e 100644
--- a/Libraries/LibGUI/GLabel.cpp
+++ b/Libraries/LibGUI/GLabel.cpp
@@ -1,6 +1,6 @@
#include "GLabel.h"
#include <LibGUI/GPainter.h>
-#include <SharedGraphics/GraphicsBitmap.h>
+#include <LibDraw/GraphicsBitmap.h>
GLabel::GLabel(GWidget* parent)
: GFrame(parent)
diff --git a/Libraries/LibGUI/GLabel.h b/Libraries/LibGUI/GLabel.h
index e3ad6a568e..4ee427d2bd 100644
--- a/Libraries/LibGUI/GLabel.h
+++ b/Libraries/LibGUI/GLabel.h
@@ -1,7 +1,7 @@
#pragma once
#include <LibGUI/GFrame.h>
-#include <SharedGraphics/TextAlignment.h>
+#include <LibDraw/TextAlignment.h>
class GraphicsBitmap;
diff --git a/Libraries/LibGUI/GModel.h b/Libraries/LibGUI/GModel.h
index dbb94524da..fb634930e6 100644
--- a/Libraries/LibGUI/GModel.h
+++ b/Libraries/LibGUI/GModel.h
@@ -7,7 +7,7 @@
#include <AK/RefCounted.h>
#include <LibGUI/GModelIndex.h>
#include <LibGUI/GVariant.h>
-#include <SharedGraphics/TextAlignment.h>
+#include <LibDraw/TextAlignment.h>
class Font;
class GAbstractView;
diff --git a/Libraries/LibGUI/GPainter.h b/Libraries/LibGUI/GPainter.h
index 1ad436e343..93e4b46882 100644
--- a/Libraries/LibGUI/GPainter.h
+++ b/Libraries/LibGUI/GPainter.h
@@ -1,6 +1,6 @@
#pragma once
-#include <SharedGraphics/Painter.h>
+#include <LibDraw/Painter.h>
class GWidget;
class GraphicsBitmap;
diff --git a/Libraries/LibGUI/GRadioButton.cpp b/Libraries/LibGUI/GRadioButton.cpp
index 377b3000ae..9c488f6ffa 100644
--- a/Libraries/LibGUI/GRadioButton.cpp
+++ b/Libraries/LibGUI/GRadioButton.cpp
@@ -1,6 +1,6 @@
#include <LibGUI/GPainter.h>
#include <LibGUI/GRadioButton.h>
-#include <SharedGraphics/GraphicsBitmap.h>
+#include <LibDraw/GraphicsBitmap.h>
static RefPtr<GraphicsBitmap> s_unfilled_circle_bitmap;
static RefPtr<GraphicsBitmap> s_filled_circle_bitmap;
diff --git a/Libraries/LibGUI/GResizeCorner.cpp b/Libraries/LibGUI/GResizeCorner.cpp
index 1dfba8b786..5aa050ec45 100644
--- a/Libraries/LibGUI/GResizeCorner.cpp
+++ b/Libraries/LibGUI/GResizeCorner.cpp
@@ -1,7 +1,7 @@
#include <LibGUI/GPainter.h>
#include <LibGUI/GResizeCorner.h>
#include <LibGUI/GWindow.h>
-#include <SharedGraphics/GraphicsBitmap.h>
+#include <LibDraw/GraphicsBitmap.h>
#include <WindowServer/WSAPITypes.h>
GResizeCorner::GResizeCorner(GWidget* parent)
diff --git a/Libraries/LibGUI/GScrollBar.cpp b/Libraries/LibGUI/GScrollBar.cpp
index f1ce391309..037b5aca40 100644
--- a/Libraries/LibGUI/GScrollBar.cpp
+++ b/Libraries/LibGUI/GScrollBar.cpp
@@ -1,8 +1,8 @@
#include <LibGUI/GPainter.h>
#include <LibGUI/GScrollBar.h>
-#include <SharedGraphics/CharacterBitmap.h>
-#include <SharedGraphics/GraphicsBitmap.h>
-#include <SharedGraphics/StylePainter.h>
+#include <LibDraw/CharacterBitmap.h>
+#include <LibDraw/GraphicsBitmap.h>
+#include <LibDraw/StylePainter.h>
static const char* s_up_arrow_bitmap_data = {
" "
diff --git a/Libraries/LibGUI/GSlider.cpp b/Libraries/LibGUI/GSlider.cpp
index ff166e90ef..3a821e9d41 100755
--- a/Libraries/LibGUI/GSlider.cpp
+++ b/Libraries/LibGUI/GSlider.cpp
@@ -1,6 +1,6 @@
#include <LibGUI/GPainter.h>
#include <LibGUI/GSlider.h>
-#include <SharedGraphics/StylePainter.h>
+#include <LibDraw/StylePainter.h>
GSlider::GSlider(GWidget* parent)
: GWidget(parent)
diff --git a/Libraries/LibGUI/GStatusBar.cpp b/Libraries/LibGUI/GStatusBar.cpp
index e219035e32..12ff8da2f7 100644
--- a/Libraries/LibGUI/GStatusBar.cpp
+++ b/Libraries/LibGUI/GStatusBar.cpp
@@ -3,7 +3,7 @@
#include <LibGUI/GPainter.h>
#include <LibGUI/GResizeCorner.h>
#include <LibGUI/GStatusBar.h>
-#include <SharedGraphics/StylePainter.h>
+#include <LibDraw/StylePainter.h>
GStatusBar::GStatusBar(GWidget* parent)
: GWidget(parent)
diff --git a/Libraries/LibGUI/GTabWidget.cpp b/Libraries/LibGUI/GTabWidget.cpp
index 73b1552d1f..374390fd3f 100644
--- a/Libraries/LibGUI/GTabWidget.cpp
+++ b/Libraries/LibGUI/GTabWidget.cpp
@@ -1,7 +1,7 @@
#include <LibGUI/GBoxLayout.h>
#include <LibGUI/GPainter.h>
#include <LibGUI/GTabWidget.h>
-#include <SharedGraphics/StylePainter.h>
+#include <LibDraw/StylePainter.h>
GTabWidget::GTabWidget(GWidget* parent)
: GWidget(parent)
diff --git a/Libraries/LibGUI/GTextEditor.h b/Libraries/LibGUI/GTextEditor.h
index 1bfbfa5b70..751b6a5428 100644
--- a/Libraries/LibGUI/GTextEditor.h
+++ b/Libraries/LibGUI/GTextEditor.h
@@ -3,7 +3,7 @@
#include <AK/Function.h>
#include <AK/HashMap.h>
#include <LibGUI/GScrollableWidget.h>
-#include <SharedGraphics/TextAlignment.h>
+#include <LibDraw/TextAlignment.h>
class GAction;
class GMenu;
diff --git a/Libraries/LibGUI/GVariant.h b/Libraries/LibGUI/GVariant.h
index c7dc60d2de..7725412f20 100644
--- a/Libraries/LibGUI/GVariant.h
+++ b/Libraries/LibGUI/GVariant.h
@@ -2,7 +2,7 @@
#include <AK/AKString.h>
#include <LibGUI/GIcon.h>
-#include <SharedGraphics/GraphicsBitmap.h>
+#include <LibDraw/GraphicsBitmap.h>
namespace AK {
class JsonValue;
diff --git a/Libraries/LibGUI/GWidget.cpp b/Libraries/LibGUI/GWidget.cpp
index 41e5b5854c..eb963b0314 100644
--- a/Libraries/LibGUI/GWidget.cpp
+++ b/Libraries/LibGUI/GWidget.cpp
@@ -8,7 +8,7 @@
#include <LibGUI/GLayout.h>
#include <LibGUI/GMenu.h>
#include <LibGUI/GPainter.h>
-#include <SharedGraphics/GraphicsBitmap.h>
+#include <LibDraw/GraphicsBitmap.h>
#include <unistd.h>
GWidget::GWidget(GWidget* parent)
diff --git a/Libraries/LibGUI/GWidget.h b/Libraries/LibGUI/GWidget.h
index da0ae762ea..410bbe3653 100644
--- a/Libraries/LibGUI/GWidget.h
+++ b/Libraries/LibGUI/GWidget.h
@@ -7,9 +7,9 @@
#include <LibCore/CObject.h>
#include <LibGUI/GEvent.h>
#include <LibGUI/GShortcut.h>
-#include <SharedGraphics/Color.h>
-#include <SharedGraphics/Font.h>
-#include <SharedGraphics/Rect.h>
+#include <LibDraw/Color.h>
+#include <LibDraw/Font.h>
+#include <LibDraw/Rect.h>
class GraphicsBitmap;
class GAction;
diff --git a/Libraries/LibGUI/GWindow.cpp b/Libraries/LibGUI/GWindow.cpp
index 74c582cb52..1e20137269 100644
--- a/Libraries/LibGUI/GWindow.cpp
+++ b/Libraries/LibGUI/GWindow.cpp
@@ -8,7 +8,7 @@
#include <LibC/stdlib.h>
#include <LibC/unistd.h>
#include <LibGUI/GPainter.h>
-#include <SharedGraphics/GraphicsBitmap.h>
+#include <LibDraw/GraphicsBitmap.h>
//#define UPDATE_COALESCING_DEBUG
diff --git a/Libraries/LibGUI/GWindow.h b/Libraries/LibGUI/GWindow.h
index 392f078ce6..5101a2430c 100644
--- a/Libraries/LibGUI/GWindow.h
+++ b/Libraries/LibGUI/GWindow.h
@@ -5,8 +5,8 @@
#include <AK/WeakPtr.h>
#include <LibCore/CObject.h>
#include <LibGUI/GWindowType.h>
-#include <SharedGraphics/GraphicsBitmap.h>
-#include <SharedGraphics/Rect.h>
+#include <LibDraw/GraphicsBitmap.h>
+#include <LibDraw/Rect.h>
class GWidget;
class GWMEvent;
diff --git a/Libraries/LibGUI/Makefile b/Libraries/LibGUI/Makefile
index 7589e77b91..1b2c461115 100644
--- a/Libraries/LibGUI/Makefile
+++ b/Libraries/LibGUI/Makefile
@@ -1,16 +1,6 @@
include ../../Makefile.common
-SHAREDGRAPHICS_OBJS = \
- ../../SharedGraphics/Painter.o \
- ../../SharedGraphics/StylePainter.o \
- ../../SharedGraphics/Font.o \
- ../../SharedGraphics/Rect.o \
- ../../SharedGraphics/GraphicsBitmap.o \
- ../../SharedGraphics/CharacterBitmap.o \
- ../../SharedGraphics/Color.o \
- ../../SharedGraphics/PNGLoader.o
-
-LIBGUI_OBJS = \
+OBJS = \
GPainter.o \
GButton.o \
GCheckBox.o \
@@ -64,8 +54,6 @@ LIBGUI_OBJS = \
GComboBox.o \
GWindow.o
-OBJS = $(SHAREDGRAPHICS_OBJS) $(LIBGUI_OBJS)
-
LIBRARY = libgui.a
DEFINES += -DUSERLAND