mirror of
https://github.com/SerenityOS/serenity
synced 2024-09-06 17:06:31 +00:00
Make a SharedGraphics directory for classes shared between Kernel and LibGUI.
This commit is contained in:
parent
b75ee4aacb
commit
7e5b81fe48
|
@ -1,7 +1,7 @@
|
|||
#pragma once
|
||||
|
||||
#include <Widgets/Color.h>
|
||||
#include <Widgets/Rect.h>
|
||||
#include <SharedGraphics/Color.h>
|
||||
#include <SharedGraphics/Rect.h>
|
||||
|
||||
// GUI system call API types.
|
||||
|
||||
|
|
|
@ -46,13 +46,15 @@ VFS_OBJS = \
|
|||
../VirtualFileSystem/FileDescriptor.o \
|
||||
../VirtualFileSystem/SyntheticFileSystem.o
|
||||
|
||||
SHAREDGRAPHICS_OBJS = \
|
||||
../SharedGraphics/Rect.o \
|
||||
../SharedGraphics/Painter.o \
|
||||
../SharedGraphics/Font.o \
|
||||
../SharedGraphics/Color.o \
|
||||
../SharedGraphics/CharacterBitmap.o \
|
||||
../SharedGraphics/GraphicsBitmap.o
|
||||
|
||||
WINDOWSERVER_OBJS = \
|
||||
../Widgets/Rect.o \
|
||||
../Widgets/Painter.o \
|
||||
../Widgets/Font.o \
|
||||
../Widgets/Color.o \
|
||||
../Widgets/CharacterBitmap.o \
|
||||
../Widgets/GraphicsBitmap.o \
|
||||
../WindowServer/WSEventReceiver.o \
|
||||
../WindowServer/WSEventLoop.o \
|
||||
../WindowServer/WSWindow.o \
|
||||
|
@ -66,7 +68,7 @@ AK_OBJS = \
|
|||
../AK/StringBuilder.o \
|
||||
../AK/FileSystemPath.o
|
||||
|
||||
OBJS = $(KERNEL_OBJS) $(VFS_OBJS) $(AK_OBJS) $(WINDOWSERVER_OBJS)
|
||||
OBJS = $(KERNEL_OBJS) $(VFS_OBJS) $(AK_OBJS) $(WINDOWSERVER_OBJS) $(SHAREDGRAPHICS_OBJS)
|
||||
|
||||
NASM = nasm
|
||||
KERNEL = kernel
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
#include "Process.h"
|
||||
#include "MemoryManager.h"
|
||||
#include <LibC/errno_numbers.h>
|
||||
#include <Widgets/Font.h>
|
||||
#include <SharedGraphics/Font.h>
|
||||
#include <WindowServer/WSScreen.h>
|
||||
#include <WindowServer/WSEventLoop.h>
|
||||
#include <WindowServer/WSWindow.h>
|
||||
|
|
|
@ -5,13 +5,13 @@ AK_OBJS = \
|
|||
../AK/FileSystemPath.o \
|
||||
../AK/kmalloc.o
|
||||
|
||||
WIDGETS_OBJS = \
|
||||
../Widgets/Painter.o \
|
||||
../Widgets/Font.o \
|
||||
../Widgets/Rect.o \
|
||||
../Widgets/GraphicsBitmap.o \
|
||||
../Widgets/CharacterBitmap.o \
|
||||
../Widgets/Color.o
|
||||
SHAREDGRAPHICS_OBJS = \
|
||||
../SharedGraphics/Painter.o \
|
||||
../SharedGraphics/Font.o \
|
||||
../SharedGraphics/Rect.o \
|
||||
../SharedGraphics/GraphicsBitmap.o \
|
||||
../SharedGraphics/CharacterBitmap.o \
|
||||
../SharedGraphics/Color.o
|
||||
|
||||
LIBC_OBJS = \
|
||||
stdio.o \
|
||||
|
@ -45,7 +45,7 @@ LIBC_OBJS = \
|
|||
sys/select.o \
|
||||
entry.o
|
||||
|
||||
OBJS = $(AK_OBJS) $(WIDGETS_OBJS) $(LIBC_OBJS)
|
||||
OBJS = $(AK_OBJS) $(WIDGETS_OBJS) $(LIBC_OBJS) $(SHAREDGRAPHICS_OBJS)
|
||||
|
||||
LIBRARY = LibC.a
|
||||
ARCH_FLAGS =
|
||||
|
|
1
SharedGraphics/.gitignore
vendored
Normal file
1
SharedGraphics/.gitignore
vendored
Normal file
|
@ -0,0 +1 @@
|
|||
*.o
|
|
@ -1,10 +1,13 @@
|
|||
#include "Painter.h"
|
||||
#include "Widget.h"
|
||||
#include "Font.h"
|
||||
#include "GraphicsBitmap.h"
|
||||
#include <AK/Assertions.h>
|
||||
#include <AK/StdLibExtras.h>
|
||||
|
||||
#ifdef LIBGUI
|
||||
#include <LibGUI/Widget.h>
|
||||
#endif
|
||||
|
||||
#define DEBUG_WIDGET_UNDERDRAW
|
||||
|
||||
Painter::Painter(GraphicsBitmap& bitmap)
|
||||
|
@ -14,6 +17,7 @@ Painter::Painter(GraphicsBitmap& bitmap)
|
|||
m_clip_rect = { { 0, 0 }, bitmap.size() };
|
||||
}
|
||||
|
||||
#ifdef LIBGUI
|
||||
Painter::Painter(Widget& widget)
|
||||
: m_font(&widget.font())
|
||||
{
|
||||
|
@ -30,6 +34,7 @@ Painter::Painter(Widget& widget)
|
|||
fill_rect(widget.rect(), Color::Red);
|
||||
#endif
|
||||
}
|
||||
#endif
|
||||
|
||||
Painter::~Painter()
|
||||
{
|
|
@ -1,7 +1,7 @@
|
|||
#include "Terminal.h"
|
||||
#include <AK/AKString.h>
|
||||
#include <Widgets/Font.h>
|
||||
#include <Widgets/Painter.h>
|
||||
#include <SharedGraphics/Font.h>
|
||||
#include <SharedGraphics/Painter.h>
|
||||
#include <AK/StdLibExtras.h>
|
||||
#include <unistd.h>
|
||||
#include <stdio.h>
|
||||
|
|
|
@ -3,8 +3,8 @@
|
|||
#include <AK/AKString.h>
|
||||
#include <AK/Types.h>
|
||||
#include <AK/Vector.h>
|
||||
#include <Widgets/GraphicsBitmap.h>
|
||||
#include <Widgets/Rect.h>
|
||||
#include <SharedGraphics/GraphicsBitmap.h>
|
||||
#include <SharedGraphics/Rect.h>
|
||||
|
||||
class Font;
|
||||
|
||||
|
|
|
@ -5,9 +5,9 @@
|
|||
#include <stdlib.h>
|
||||
#include <fcntl.h>
|
||||
#include <assert.h>
|
||||
#include <Widgets/Font.h>
|
||||
#include <Widgets/GraphicsBitmap.h>
|
||||
#include <Widgets/Painter.h>
|
||||
#include <SharedGraphics/Font.h>
|
||||
#include <SharedGraphics/GraphicsBitmap.h>
|
||||
#include <SharedGraphics/Painter.h>
|
||||
#include <sys/ioctl.h>
|
||||
#include <sys/select.h>
|
||||
#include <gui.h>
|
||||
|
|
|
@ -6,8 +6,8 @@
|
|||
#include <fcntl.h>
|
||||
#include <assert.h>
|
||||
#include <Kernel/Syscall.h>
|
||||
#include <Widgets/GraphicsBitmap.h>
|
||||
#include <Widgets/Painter.h>
|
||||
#include <SharedGraphics/GraphicsBitmap.h>
|
||||
#include <SharedGraphics/Painter.h>
|
||||
#include "gui.h"
|
||||
|
||||
static void paint(GraphicsBitmap& bitmap, int width, int height);
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
#pragma once
|
||||
|
||||
#include <Widgets/Point.h>
|
||||
#include <Widgets/Rect.h>
|
||||
#include <SharedGraphics/Point.h>
|
||||
#include <SharedGraphics/Rect.h>
|
||||
#include <AK/AKString.h>
|
||||
#include <AK/Types.h>
|
||||
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
#pragma once
|
||||
|
||||
#include <Widgets/Rect.h>
|
||||
#include <Widgets/Size.h>
|
||||
#include <Widgets/Color.h>
|
||||
#include <SharedGraphics/Rect.h>
|
||||
#include <SharedGraphics/Size.h>
|
||||
#include <SharedGraphics/Color.h>
|
||||
#include <Kernel/Keyboard.h>
|
||||
|
||||
class WSScreen {
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
#pragma once
|
||||
|
||||
#include <Widgets/Rect.h>
|
||||
#include <Widgets/GraphicsBitmap.h>
|
||||
#include <SharedGraphics/Rect.h>
|
||||
#include <SharedGraphics/GraphicsBitmap.h>
|
||||
#include <AK/AKString.h>
|
||||
#include <AK/InlineLinkedList.h>
|
||||
#include "WSEventReceiver.h"
|
||||
|
|
|
@ -5,8 +5,8 @@
|
|||
#include "Process.h"
|
||||
#include "MemoryManager.h"
|
||||
#include <Kernel/ProcFileSystem.h>
|
||||
#include <Widgets/Painter.h>
|
||||
#include <Widgets/CharacterBitmap.h>
|
||||
#include <SharedGraphics/Painter.h>
|
||||
#include <SharedGraphics/CharacterBitmap.h>
|
||||
#include <AK/StdLibExtras.h>
|
||||
|
||||
//#define DEBUG_COUNTERS
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
#pragma once
|
||||
|
||||
#include <Widgets/Rect.h>
|
||||
#include <Widgets/Color.h>
|
||||
#include <Widgets/Painter.h>
|
||||
#include <SharedGraphics/Rect.h>
|
||||
#include <SharedGraphics/Color.h>
|
||||
#include <SharedGraphics/Painter.h>
|
||||
#include <AK/HashTable.h>
|
||||
#include <AK/InlineLinkedList.h>
|
||||
#include <AK/WeakPtr.h>
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
#include "Process.h"
|
||||
#include <Widgets/Font.h>
|
||||
#include <SharedGraphics/Font.h>
|
||||
#include <WindowServer/WSScreen.h>
|
||||
#include <WindowServer/WSWindowManager.h>
|
||||
#include <WindowServer/WSEventLoop.h>
|
||||
|
|
Loading…
Reference in a new issue