mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-12-03 04:50:29 +00:00
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. :^)
This commit is contained in:
parent
2167f60235
commit
1c0669f010
Notes:
sideshowbarker
2024-07-19 13:11:20 +09:00
Author: https://github.com/awesomekling Commit: https://github.com/SerenityOS/serenity/commit/1c0669f010b
120 changed files with 201 additions and 190 deletions
|
@ -4,7 +4,7 @@
|
|||
#include <AK/CircularQueue.h>
|
||||
#include <AK/RefPtr.h>
|
||||
#include <AK/RefCounted.h>
|
||||
#include <SharedGraphics/Color.h>
|
||||
#include <LibDraw/Color.h>
|
||||
|
||||
class IRCLogBufferModel;
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
#include "IRCLogBufferModel.h"
|
||||
#include "IRCLogBuffer.h"
|
||||
#include <SharedGraphics/Font.h>
|
||||
#include <LibDraw/Font.h>
|
||||
#include <stdio.h>
|
||||
#include <time.h>
|
||||
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
#include <LibGUI/GButton.h>
|
||||
#include <LibGUI/GWidget.h>
|
||||
#include <LibGUI/GWindow.h>
|
||||
#include <SharedGraphics/GraphicsBitmap.h>
|
||||
#include <LibDraw/GraphicsBitmap.h>
|
||||
#include <errno.h>
|
||||
#include <signal.h>
|
||||
#include <stdio.h>
|
||||
|
|
|
@ -3,7 +3,7 @@ DEFINES += -DUSERLAND
|
|||
all: $(APP)
|
||||
|
||||
$(APP): $(OBJS)
|
||||
$(LD) -o $(APP) $(LDFLAGS) $(OBJS) -lgui -lcore -lc
|
||||
$(LD) -o $(APP) $(LDFLAGS) $(OBJS) -lgui -ldraw -laudio -lcore -lc
|
||||
|
||||
.cpp.o:
|
||||
@echo "CXX $<"; $(CXX) $(CXXFLAGS) -o $@ -c $<
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
#include <AK/Queue.h>
|
||||
#include <AK/SinglyLinkedList.h>
|
||||
#include <LibGUI/GPainter.h>
|
||||
#include <SharedGraphics/GraphicsBitmap.h>
|
||||
#include <LibDraw/GraphicsBitmap.h>
|
||||
#include <stdio.h>
|
||||
|
||||
BucketTool::BucketTool()
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
#pragma once
|
||||
|
||||
#include "Tool.h"
|
||||
#include <SharedGraphics/Point.h>
|
||||
#include <LibDraw/Point.h>
|
||||
|
||||
class GMenu;
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
#include "PaintableWidget.h"
|
||||
#include "Tool.h"
|
||||
#include <LibGUI/GPainter.h>
|
||||
#include <SharedGraphics/GraphicsBitmap.h>
|
||||
#include <LibDraw/GraphicsBitmap.h>
|
||||
|
||||
static PaintableWidget* s_the;
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
#pragma once
|
||||
|
||||
#include "Tool.h"
|
||||
#include <SharedGraphics/Point.h>
|
||||
#include <LibDraw/Point.h>
|
||||
|
||||
class GMenu;
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
#include "PickerTool.h"
|
||||
#include <SharedGraphics/GraphicsBitmap.h>
|
||||
#include <LibDraw/GraphicsBitmap.h>
|
||||
|
||||
PickerTool::PickerTool()
|
||||
{
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
#include <LibGUI/GPainter.h>
|
||||
#include <LibGUI/GAction.h>
|
||||
#include <LibGUI/GMenu.h>
|
||||
#include <SharedGraphics/GraphicsBitmap.h>
|
||||
#include <LibDraw/GraphicsBitmap.h>
|
||||
#include <stdio.h>
|
||||
#include <LibM/math.h>
|
||||
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
#include "EraseTool.h"
|
||||
#include <LibGUI/GBoxLayout.h>
|
||||
#include <LibGUI/GButton.h>
|
||||
#include <SharedGraphics/PNGLoader.h>
|
||||
#include <LibDraw/PNGLoader.h>
|
||||
|
||||
class ToolButton final : public GButton {
|
||||
public:
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
#include <LibGUI/GMenuBar.h>
|
||||
#include <LibGUI/GMessageBox.h>
|
||||
#include <LibGUI/GWindow.h>
|
||||
#include <SharedGraphics/PNGLoader.h>
|
||||
#include <LibDraw/PNGLoader.h>
|
||||
|
||||
int main(int argc, char** argv)
|
||||
{
|
||||
|
|
|
@ -6,18 +6,4 @@ OBJS = \
|
|||
|
||||
APP = Piano
|
||||
|
||||
DEFINES += -DUSERLAND
|
||||
|
||||
all: $(APP)
|
||||
|
||||
$(APP): $(OBJS)
|
||||
$(LD) -o $(APP) $(LDFLAGS) $(OBJS) -lgui -lcore -lc -laudio
|
||||
|
||||
.cpp.o:
|
||||
@echo "CXX $<"; $(CXX) $(CXXFLAGS) -o $@ -c $<
|
||||
|
||||
-include $(OBJS:%.o=%.d)
|
||||
|
||||
clean:
|
||||
@echo "CLEAN"; rm -f $(APP) $(OBJS) *.d
|
||||
|
||||
include ../Makefile.common
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
#include "PianoWidget.h"
|
||||
#include <AK/Queue.h>
|
||||
#include <LibGUI/GPainter.h>
|
||||
#include <SharedGraphics/GraphicsBitmap.h>
|
||||
#include <LibDraw/GraphicsBitmap.h>
|
||||
#include <math.h>
|
||||
|
||||
PianoWidget::PianoWidget()
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
#include <LibGUI/GBoxLayout.h>
|
||||
#include <LibGUI/GLabel.h>
|
||||
#include <LibGUI/GPainter.h>
|
||||
#include <SharedGraphics/StylePainter.h>
|
||||
#include <LibDraw/StylePainter.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
#include "QSWidget.h"
|
||||
#include <LibGUI/GPainter.h>
|
||||
#include <SharedGraphics/GraphicsBitmap.h>
|
||||
#include <LibDraw/GraphicsBitmap.h>
|
||||
|
||||
QSWidget::QSWidget(GWidget* parent)
|
||||
: GFrame(parent)
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
#include <LibGUI/GMenu.h>
|
||||
#include <LibGUI/GMenuBar.h>
|
||||
#include <LibGUI/GWindow.h>
|
||||
#include <SharedGraphics/PNGLoader.h>
|
||||
#include <LibDraw/PNGLoader.h>
|
||||
#include <stdio.h>
|
||||
|
||||
int main(int argc, char** argv)
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
#include <AK/AKString.h>
|
||||
#include <AK/HashMap.h>
|
||||
#include <LibGUI/GButton.h>
|
||||
#include <SharedGraphics/Rect.h>
|
||||
#include <LibDraw/Rect.h>
|
||||
|
||||
class Window {
|
||||
public:
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
#include <LibGUI/GClipboard.h>
|
||||
#include <LibGUI/GPainter.h>
|
||||
#include <LibGUI/GWindow.h>
|
||||
#include <SharedGraphics/Font.h>
|
||||
#include <LibDraw/Font.h>
|
||||
#include <errno.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
|
|
|
@ -7,8 +7,8 @@
|
|||
#include <LibCore/CNotifier.h>
|
||||
#include <LibCore/CTimer.h>
|
||||
#include <LibGUI/GFrame.h>
|
||||
#include <SharedGraphics/GraphicsBitmap.h>
|
||||
#include <SharedGraphics/Rect.h>
|
||||
#include <LibDraw/GraphicsBitmap.h>
|
||||
#include <LibDraw/Rect.h>
|
||||
|
||||
class Font;
|
||||
|
||||
|
|
|
@ -21,7 +21,7 @@
|
|||
#include <LibGUI/GPainter.h>
|
||||
#include <LibGUI/GWidget.h>
|
||||
#include <LibGUI/GWindow.h>
|
||||
#include <SharedGraphics/GraphicsBitmap.h>
|
||||
#include <LibDraw/GraphicsBitmap.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <time.h>
|
||||
|
|
|
@ -10,7 +10,7 @@ DEFINES += -DUSERLAND
|
|||
all: $(APP)
|
||||
|
||||
$(APP): $(OBJS)
|
||||
$(LD) -o $(APP) $(LDFLAGS) $(OBJS) -lgui -lcore -lc
|
||||
$(LD) -o $(APP) $(LDFLAGS) $(OBJS) -lgui -ldraw -lcore -lc
|
||||
|
||||
.cpp.o:
|
||||
@echo "CXX $<"; $(CXX) $(CXXFLAGS) -o $@ -c $<
|
||||
|
|
|
@ -10,7 +10,7 @@ DEFINES += -DUSERLAND
|
|||
all: $(APP)
|
||||
|
||||
$(APP): $(OBJS)
|
||||
$(LD) -o $(APP) $(LDFLAGS) $(OBJS) -lgui -lcore -lc
|
||||
$(LD) -o $(APP) $(LDFLAGS) $(OBJS) -lgui -ldraw -lcore -lc
|
||||
|
||||
.cpp.o:
|
||||
@echo "CXX $<"; $(CXX) $(CXXFLAGS) -o $@ -c $<
|
||||
|
|
|
@ -15,7 +15,7 @@ UI_HelloWorld2.h: HelloWorld2.frm
|
|||
../../DevTools/FormCompiler/FormCompiler $< > $@
|
||||
|
||||
$(APP): $(OBJS)
|
||||
$(LD) -o $(APP) $(LDFLAGS) $(OBJS) -lgui -lcore -lc
|
||||
$(LD) -o $(APP) $(LDFLAGS) $(OBJS) -lgui -ldraw -lcore -lc
|
||||
|
||||
.cpp.o:
|
||||
@echo "CXX $<"; $(CXX) $(CXXFLAGS) -o $@ -c $<
|
||||
|
|
|
@ -10,7 +10,7 @@ DEFINES += -DUSERLAND
|
|||
all: $(APP)
|
||||
|
||||
$(APP): $(OBJS)
|
||||
$(LD) -o $(APP) $(LDFLAGS) $(OBJS) -lgui -lcore -lc
|
||||
$(LD) -o $(APP) $(LDFLAGS) $(OBJS) -lgui -ldraw -lcore -lc
|
||||
|
||||
.cpp.o:
|
||||
@echo "CXX $<"; $(CXX) $(CXXFLAGS) -o $@ -c $<
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
#include <LibGUI/GPainter.h>
|
||||
#include <LibGUI/GWidget.h>
|
||||
#include <LibGUI/GWindow.h>
|
||||
#include <SharedGraphics/PNGLoader.h>
|
||||
#include <LibDraw/PNGLoader.h>
|
||||
|
||||
class TestWidget final : public GWidget {
|
||||
public:
|
||||
|
|
|
@ -10,7 +10,7 @@ DEFINES += -DUSERLAND
|
|||
all: $(APP)
|
||||
|
||||
$(APP): $(OBJS)
|
||||
$(LD) -o $(APP) $(LDFLAGS) $(OBJS) -lgui -lcore -lc
|
||||
$(LD) -o $(APP) $(LDFLAGS) $(OBJS) -lgui -ldraw -lcore -lc
|
||||
|
||||
.cpp.o:
|
||||
@echo "CXX $<"; $(CXX) $(CXXFLAGS) -o $@ -c $<
|
||||
|
|
|
@ -16,7 +16,7 @@ DEFINES += -DUSERLAND
|
|||
all: $(APP)
|
||||
|
||||
$(APP): $(OBJS)
|
||||
$(LD) -o $(APP) $(LDFLAGS) $(OBJS) -lgui -lcore -lc
|
||||
$(LD) -o $(APP) $(LDFLAGS) $(OBJS) -lgui -ldraw -lcore -lc
|
||||
|
||||
.cpp.o:
|
||||
@echo "CXX $<"; $(CXX) $(CXXFLAGS) -o $@ -c $<
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
#include <AK/RefCounted.h>
|
||||
#include <AK/NonnullRefPtr.h>
|
||||
#include <AK/Weakable.h>
|
||||
#include <SharedGraphics/Rect.h>
|
||||
#include <LibDraw/Rect.h>
|
||||
|
||||
class GPainter;
|
||||
class GVariant;
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
#include "VBWidgetPropertyModel.h"
|
||||
#include "VBProperty.h"
|
||||
#include "VBWidget.h"
|
||||
#include <SharedGraphics/Font.h>
|
||||
#include <LibDraw/Font.h>
|
||||
|
||||
VBWidgetPropertyModel::VBWidgetPropertyModel(VBWidget& widget)
|
||||
: m_widget(widget)
|
||||
|
|
|
@ -11,7 +11,7 @@ DEFINES += -DUSERLAND
|
|||
all: $(APP)
|
||||
|
||||
$(APP): $(OBJS)
|
||||
$(LD) -o $(APP) $(LDFLAGS) $(OBJS) -lgui -lcore -lc
|
||||
$(LD) -o $(APP) $(LDFLAGS) $(OBJS) -lgui -ldraw -lcore -lc
|
||||
|
||||
.cpp.o:
|
||||
@echo "CXX $<"; $(CXX) $(CXXFLAGS) -o $@ -c $<
|
||||
|
|
|
@ -11,7 +11,7 @@ DEFINES += -DUSERLAND
|
|||
all: $(APP)
|
||||
|
||||
$(APP): $(OBJS)
|
||||
$(LD) -o $(APP) $(LDFLAGS) $(OBJS) -lgui -lcore -lc
|
||||
$(LD) -o $(APP) $(LDFLAGS) $(OBJS) -lgui -ldraw -lcore -lc
|
||||
|
||||
.cpp.o:
|
||||
@echo "CXX $<"; $(CXX) $(CXXFLAGS) -o $@ -c $<
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
#include "SnakeGame.h"
|
||||
#include <LibGUI/GFontDatabase.h>
|
||||
#include <LibGUI/GPainter.h>
|
||||
#include <SharedGraphics/GraphicsBitmap.h>
|
||||
#include <LibDraw/GraphicsBitmap.h>
|
||||
#include <stdlib.h>
|
||||
#include <time.h>
|
||||
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
#include <AK/Types.h>
|
||||
#include <Kernel/Devices/BlockDevice.h>
|
||||
#include <Kernel/VM/PhysicalAddress.h>
|
||||
#include <SharedGraphics/Size.h>
|
||||
#include <LibDraw/Size.h>
|
||||
|
||||
class BXVGADevice final : public BlockDevice {
|
||||
AK_MAKE_ETERNAL
|
||||
|
|
|
@ -18,6 +18,7 @@ build_targets="$build_targets ../DevTools/FormCompiler"
|
|||
build_targets="$build_targets ../Libraries/LibC"
|
||||
build_targets="$build_targets ../Libraries/LibM"
|
||||
build_targets="$build_targets ../Libraries/LibCore"
|
||||
build_targets="$build_targets ../Libraries/LibDraw"
|
||||
build_targets="$build_targets ../Libraries/LibAudio"
|
||||
build_targets="$build_targets ../Servers/SystemServer"
|
||||
build_targets="$build_targets ../Servers/LookupServer"
|
||||
|
@ -64,7 +65,6 @@ for targ in $build_targets; do
|
|||
done
|
||||
|
||||
# has no need to build separately, but install headers.
|
||||
(cd ../SharedGraphics && ./install.sh)
|
||||
(cd ../AK && ./install.sh)
|
||||
|
||||
sudo -E ./build-image-qemu.sh
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
#include <AK/RefPtr.h>
|
||||
#include <AK/RefCounted.h>
|
||||
#include <AK/Vector.h>
|
||||
#include <SharedGraphics/Color.h>
|
||||
#include <LibDraw/Color.h>
|
||||
|
||||
class CConfigFile : public RefCounted<CConfigFile> {
|
||||
public:
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
#include <SharedGraphics/DisjointRectSet.h>
|
||||
#include <LibDraw/DisjointRectSet.h>
|
||||
|
||||
void DisjointRectSet::add(const Rect& new_rect)
|
||||
{
|
|
@ -1,7 +1,7 @@
|
|||
#pragma once
|
||||
|
||||
#include <AK/Vector.h>
|
||||
#include <SharedGraphics/Rect.h>
|
||||
#include <LibDraw/Rect.h>
|
||||
|
||||
class DisjointRectSet {
|
||||
public:
|
|
@ -5,7 +5,7 @@
|
|||
#include <AK/RefPtr.h>
|
||||
#include <AK/RefCounted.h>
|
||||
#include <AK/Types.h>
|
||||
#include <SharedGraphics/Rect.h>
|
||||
#include <LibDraw/Rect.h>
|
||||
|
||||
// FIXME: Make a MutableGlyphBitmap buddy class for FontEditor instead?
|
||||
class GlyphBitmap {
|
|
@ -1,6 +1,6 @@
|
|||
#include <AK/MappedFile.h>
|
||||
#include <SharedGraphics/GraphicsBitmap.h>
|
||||
#include <SharedGraphics/PNGLoader.h>
|
||||
#include <LibDraw/GraphicsBitmap.h>
|
||||
#include <LibDraw/PNGLoader.h>
|
||||
#include <errno.h>
|
||||
#include <fcntl.h>
|
||||
#include <stdio.h>
|
35
Libraries/LibDraw/Makefile
Normal file
35
Libraries/LibDraw/Makefile
Normal file
|
@ -0,0 +1,35 @@
|
|||
include ../../Makefile.common
|
||||
|
||||
OBJS = \
|
||||
CharacterBitmap.o \
|
||||
Color.o \
|
||||
DisjointRectSet.o \
|
||||
Font.o \
|
||||
GraphicsBitmap.o \
|
||||
Painter.o \
|
||||
PNGLoader.o \
|
||||
Rect.o \
|
||||
StylePainter.o
|
||||
|
||||
LIBRARY = libdraw.a
|
||||
DEFINES += -DUSERLAND
|
||||
|
||||
all: $(LIBRARY)
|
||||
|
||||
$(LIBRARY): $(OBJS)
|
||||
@echo "LIB $@"; $(AR) rcs $@ $(OBJS) $(LIBS)
|
||||
|
||||
.cpp.o:
|
||||
@echo "CXX $<"; $(CXX) $(CXXFLAGS) -o $@ -c $<
|
||||
|
||||
-include $(OBJS:%.o=%.d)
|
||||
|
||||
clean:
|
||||
@echo "CLEAN"; rm -f $(LIBRARY) $(OBJS) *.d
|
||||
|
||||
install: $(LIBRARY)
|
||||
mkdir -p ../../Root/usr/include/LibGfx
|
||||
# Copy headers
|
||||
rsync -r -a --include '*/' --include '*.h' --exclude '*' . ../../Root/usr/include/LibGfx
|
||||
# Install the library
|
||||
cp $(LIBRARY) ../../Root/usr/lib
|
|
@ -1,8 +1,8 @@
|
|||
#include <AK/FileSystemPath.h>
|
||||
#include <AK/MappedFile.h>
|
||||
#include <AK/NetworkOrdered.h>
|
||||
#include <SharedGraphics/PNGLoader.h>
|
||||
#include <SharedGraphics/puff.c>
|
||||
#include <LibDraw/PNGLoader.h>
|
||||
#include <LibDraw/puff.c>
|
||||
#include <fcntl.h>
|
||||
#include <serenity.h>
|
||||
#include <stdio.h>
|
|
@ -1,5 +1,5 @@
|
|||
#pragma once
|
||||
|
||||
#include <SharedGraphics/GraphicsBitmap.h>
|
||||
#include <LibDraw/GraphicsBitmap.h>
|
||||
|
||||
RefPtr<GraphicsBitmap> load_png(const StringView& path);
|
|
@ -4,7 +4,7 @@
|
|||
#include <AK/Assertions.h>
|
||||
#include <AK/StdLibExtras.h>
|
||||
#include <AK/StringBuilder.h>
|
||||
#include <SharedGraphics/CharacterBitmap.h>
|
||||
#include <LibDraw/CharacterBitmap.h>
|
||||
#include <math.h>
|
||||
#include <stdio.h>
|
||||
#include <unistd.h>
|
|
@ -5,8 +5,8 @@
|
|||
#include "Rect.h"
|
||||
#include "Size.h"
|
||||
#include <AK/AKString.h>
|
||||
#include <SharedGraphics/TextAlignment.h>
|
||||
#include <SharedGraphics/TextElision.h>
|
||||
#include <LibDraw/TextAlignment.h>
|
||||
#include <LibDraw/TextElision.h>
|
||||
|
||||
class CharacterBitmap;
|
||||
class GlyphBitmap;
|
|
@ -2,9 +2,9 @@
|
|||
|
||||
#include <AK/AKString.h>
|
||||
#include <AK/LogStream.h>
|
||||
#include <SharedGraphics/Point.h>
|
||||
#include <SharedGraphics/Size.h>
|
||||
#include <SharedGraphics/TextAlignment.h>
|
||||
#include <LibDraw/Point.h>
|
||||
#include <LibDraw/Size.h>
|
||||
#include <LibDraw/TextAlignment.h>
|
||||
|
||||
struct WSAPI_Rect;
|
||||
|
|
@ -1,5 +1,5 @@
|
|||
#include <LibGUI/GPainter.h>
|
||||
#include <SharedGraphics/StylePainter.h>
|
||||
#include <LibDraw/Painter.h>
|
||||
#include <LibDraw/StylePainter.h>
|
||||
|
||||
void StylePainter::paint_tab_button(Painter& painter, const Rect& rect, bool active, bool hovered, bool enabled)
|
||||
{
|
4
Libraries/LibDraw/install.sh
Executable file
4
Libraries/LibDraw/install.sh
Executable file
|
@ -0,0 +1,4 @@
|
|||
#!/bin/bash
|
||||
|
||||
mkdir -p ../Root/usr/include/LibGfx/
|
||||
cp *.h ../Root/usr/include/LibGfx/
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
#include <LibCore/CTimer.h>
|
||||
#include <LibGUI/GWidget.h>
|
||||
#include <SharedGraphics/TextAlignment.h>
|
||||
#include <LibDraw/TextAlignment.h>
|
||||
|
||||
class GPainter;
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
|
@ -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 = {
|
||||
" "
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
|
@ -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()
|
||||
{
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
#pragma once
|
||||
|
||||
#include <LibGUI/GWidget.h>
|
||||
#include <SharedGraphics/StylePainter.h>
|
||||
#include <LibDraw/StylePainter.h>
|
||||
|
||||
class GFrame : public GWidget {
|
||||
public:
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
#pragma once
|
||||
|
||||
#include <AK/HashMap.h>
|
||||
#include <SharedGraphics/GraphicsBitmap.h>
|
||||
#include <LibDraw/GraphicsBitmap.h>
|
||||
|
||||
class GIconImpl : public RefCounted<GIconImpl> {
|
||||
public:
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
#pragma once
|
||||
|
||||
#include <LibGUI/GFrame.h>
|
||||
#include <SharedGraphics/TextAlignment.h>
|
||||
#include <LibDraw/TextAlignment.h>
|
||||
|
||||
class GraphicsBitmap;
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
#pragma once
|
||||
|
||||
#include <SharedGraphics/Painter.h>
|
||||
#include <LibDraw/Painter.h>
|
||||
|
||||
class GWidget;
|
||||
class GraphicsBitmap;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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 = {
|
||||
" "
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
#include <AK/AKString.h>
|
||||
#include <LibGUI/GIcon.h>
|
||||
#include <SharedGraphics/GraphicsBitmap.h>
|
||||
#include <LibDraw/GraphicsBitmap.h>
|
||||
|
||||
namespace AK {
|
||||
class JsonValue;
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
#pragma once
|
||||
|
||||
#include <LibHTML/DOM/Document.h>
|
||||
#include <SharedGraphics/Size.h>
|
||||
#include <LibDraw/Size.h>
|
||||
|
||||
class Frame {
|
||||
public:
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
#pragma once
|
||||
|
||||
#include <LibHTML/CSS/LengthBox.h>
|
||||
#include <SharedGraphics/Color.h>
|
||||
#include <SharedGraphics/Size.h>
|
||||
#include <LibDraw/Color.h>
|
||||
#include <LibDraw/Size.h>
|
||||
|
||||
enum FontStyle {
|
||||
Normal,
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
#include <AK/Vector.h>
|
||||
#include <LibHTML/Layout/ComputedStyle.h>
|
||||
#include <LibHTML/TreeNode.h>
|
||||
#include <SharedGraphics/Rect.h>
|
||||
#include <LibDraw/Rect.h>
|
||||
|
||||
class Node;
|
||||
class LayoutBlock;
|
||||
|
|
|
@ -7,8 +7,22 @@ OPTIMIZATION_FLAGS = -Os
|
|||
MAKEFILE_PATH := $(abspath $(lastword $(MAKEFILE_LIST)))
|
||||
SERENITY_BASE_DIR := $(patsubst %/,%,$(dir $(MAKEFILE_PATH)))
|
||||
|
||||
INCLUDE_FLAGS = -I$(SERENITY_BASE_DIR) -I$(SERENITY_BASE_DIR)/Libraries -I. -I$(SERENITY_BASE_DIR)/Libraries/LibC -I$(SERENITY_BASE_DIR)/Servers -I$(SERENITY_BASE_DIR)/Libraries/LibM
|
||||
LDFLAGS = -L$(SERENITY_BASE_DIR)/Libraries/LibC -L$(SERENITY_BASE_DIR)/Libraries/LibCore -L$(SERENITY_BASE_DIR)/Libraries/LibM -L$(SERENITY_BASE_DIR)/Libraries/LibGUI -L$(SERENITY_BASE_DIR)/Libraries/LibAudio
|
||||
INCLUDE_FLAGS = \
|
||||
-I. \
|
||||
-I$(SERENITY_BASE_DIR) \
|
||||
-I$(SERENITY_BASE_DIR)/Libraries \
|
||||
-I$(SERENITY_BASE_DIR)/Libraries/LibC \
|
||||
-I$(SERENITY_BASE_DIR)/Servers \
|
||||
-I$(SERENITY_BASE_DIR)/Libraries/LibM
|
||||
|
||||
LDFLAGS = \
|
||||
-L$(SERENITY_BASE_DIR)/Libraries/LibC \
|
||||
-L$(SERENITY_BASE_DIR)/Libraries/LibCore \
|
||||
-L$(SERENITY_BASE_DIR)/Libraries/LibM \
|
||||
-L$(SERENITY_BASE_DIR)/Libraries/LibDraw \
|
||||
-L$(SERENITY_BASE_DIR)/Libraries/LibGUI \
|
||||
-L$(SERENITY_BASE_DIR)/Libraries/LibAudio
|
||||
|
||||
CLANG_FLAGS = -Wconsumed -m32 -ffreestanding -march=i686
|
||||
#SUGGEST_FLAGS = -Wsuggest-final-types -Wsuggest-final-methods -Wsuggest-override #-Wsuggest-attribute=noreturn
|
||||
CXXFLAGS = -MMD -MP $(WARNING_FLAGS) $(OPTIMIZATION_FLAGS) $(FLAVOR_FLAGS) $(ARCH_FLAGS) $(STANDARD_FLAGS) $(SUGGEST_FLAGS) $(INCLUDE_FLAGS) $(DEFINES)
|
||||
|
|
|
@ -1,17 +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/DisjointRectSet.o \
|
||||
../../SharedGraphics/Color.o \
|
||||
../../SharedGraphics/PNGLoader.o
|
||||
|
||||
WINDOWSERVER_OBJS = \
|
||||
OBJS = \
|
||||
WSEventLoop.o \
|
||||
WSWindow.o \
|
||||
WSWindowManager.o \
|
||||
|
@ -31,14 +20,13 @@ WINDOWSERVER_OBJS = \
|
|||
main.o
|
||||
|
||||
APP = WindowServer
|
||||
OBJS = $(SHAREDGRAPHICS_OBJS) $(WINDOWSERVER_OBJS)
|
||||
|
||||
DEFINES += -DUSERLAND
|
||||
|
||||
all: $(APP)
|
||||
|
||||
$(APP): $(OBJS)
|
||||
$(LD) -o $(APP) $(LDFLAGS) $(OBJS) -lc -lcore
|
||||
$(LD) -o $(APP) $(LDFLAGS) $(OBJS) -lc -lcore -ldraw
|
||||
|
||||
.cpp.o:
|
||||
@echo "CXX $<"; $(CXX) $(CXXFLAGS) -o $@ -c $<
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
#pragma once
|
||||
|
||||
#include <SharedGraphics/Color.h>
|
||||
#include <SharedGraphics/Rect.h>
|
||||
#include <LibDraw/Color.h>
|
||||
#include <LibDraw/Rect.h>
|
||||
|
||||
typedef unsigned WSAPI_Color;
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
#include <SharedGraphics/CharacterBitmap.h>
|
||||
#include <SharedGraphics/Painter.h>
|
||||
#include <SharedGraphics/StylePainter.h>
|
||||
#include <LibDraw/CharacterBitmap.h>
|
||||
#include <LibDraw/Painter.h>
|
||||
#include <LibDraw/StylePainter.h>
|
||||
#include <WindowServer/WSButton.h>
|
||||
#include <WindowServer/WSEvent.h>
|
||||
#include <WindowServer/WSWindowManager.h>
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue