LibGfx: Replace manual forward declarations with <LibGfx/Forward.h>

This commit is contained in:
Andreas Kling 2020-02-15 00:10:34 +01:00
parent 34c7322d77
commit a368cf7d51
Notes: sideshowbarker 2024-07-19 09:20:04 +09:00
23 changed files with 30 additions and 83 deletions

View file

@ -52,6 +52,7 @@ class Socket;
class SocketAddress;
class TCPServer;
class TCPSocket;
class Timer;
class TimerEvent;
class UdpServer;
class UdpSocket;

View file

@ -29,19 +29,10 @@
#include <AK/Badge.h>
#include <AK/HashMap.h>
#include <AK/OwnPtr.h>
#include <LibGfx/Palette.h>
#include <LibCore/Forward.h>
#include <LibGUI/Shortcut.h>
namespace AK {
class SharedBuffer;
}
namespace Core {
class EventLoop;
}
namespace Gfx {
class Palette;
class Point;
}
#include <LibGfx/Forward.h>
#include <LibGfx/Palette.h>
namespace GUI {
class Action;

View file

@ -28,10 +28,7 @@
#include <LibCore/EventLoop.h>
#include <LibCore/Object.h>
namespace Gfx {
class Bitmap;
}
#include <LibGfx/Forward.h>
namespace GUI {

View file

@ -29,10 +29,7 @@
#include <AK/Function.h>
#include <AK/HashMap.h>
#include <AK/String.h>
namespace Gfx {
class Font;
}
#include <LibGfx/Forward.h>
struct Metadata {
String path;

View file

@ -29,10 +29,6 @@
#include <LibGfx/TextAlignment.h>
#include <LibGUI/Frame.h>
namespace Gfx {
class Bitmap;
}
namespace GUI {
class Label : public Frame {

View file

@ -31,10 +31,7 @@
#include <AK/NonnullRefPtr.h>
#include <LibCore/Object.h>
#include <LibGUI/MenuItem.h>
namespace Gfx {
class Point;
}
#include <LibGfx/Forward.h>
namespace GUI {

View file

@ -31,13 +31,10 @@
#include <AK/HashTable.h>
#include <AK/RefCounted.h>
#include <AK/String.h>
#include <LibGfx/TextAlignment.h>
#include <LibGUI/ModelIndex.h>
#include <LibGUI/Variant.h>
namespace Gfx {
class Font;
}
#include <LibGfx/Forward.h>
#include <LibGfx/TextAlignment.h>
namespace GUI {

View file

@ -42,10 +42,6 @@
extern WidgetClassRegistration registration_##class_name; \
WidgetClassRegistration registration_##class_name(#class_name, [](Widget* parent) { return class_name::construct(parent); });
namespace Gfx {
class Bitmap;
}
namespace GUI {
class Widget;
}

View file

@ -29,12 +29,9 @@
#include <AK/HashMap.h>
#include <AK/NonnullRefPtr.h>
#include <LibGfx/Font.h>
#include <LibGfx/Forward.h>
#include <LibHTML/CSS/StyleValue.h>
namespace Gfx {
class Color;
}
class StyleProperties : public RefCounted<StyleProperties> {
public:
StyleProperties();

View file

@ -32,18 +32,11 @@
#include <AK/String.h>
#include <AK/URL.h>
#include <AK/WeakPtr.h>
#include <LibCore/Forward.h>
#include <LibHTML/CSS/StyleResolver.h>
#include <LibHTML/CSS/StyleSheet.h>
#include <LibHTML/DOM/ParentNode.h>
namespace Core {
class Timer;
}
namespace Gfx {
class Palette;
}
class Frame;
class HTMLBodyElement;
class HTMLHtmlElement;

View file

@ -28,10 +28,7 @@
#include <AK/HashMap.h>
#include <AK/String.h>
namespace Gfx {
class Font;
}
#include <LibGfx/Forward.h>
struct FontSelector {
String family;

View file

@ -30,11 +30,7 @@
#include <AK/NonnullRefPtr.h>
#include <AK/Weakable.h>
#include <LibGfx/Rect.h>
namespace Gfx {
class CharacterBitmap;
class Painter;
}
#include <LibGfx/Forward.h>
namespace WindowServer {

View file

@ -24,6 +24,7 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#include <AK/Badge.h>
#include <AK/SharedBuffer.h>
#include <LibGfx/Bitmap.h>
#include <LibGfx/SystemTheme.h>

View file

@ -30,6 +30,7 @@
#include "Screen.h"
#include "Window.h"
#include "WindowManager.h"
#include <LibCore/Timer.h>
#include <LibGfx/Font.h>
#include <LibGfx/Painter.h>
#include <LibThread/BackgroundAction.h>

View file

@ -29,13 +29,8 @@
#include <AK/OwnPtr.h>
#include <AK/RefPtr.h>
#include <LibCore/Object.h>
#include <LibCore/Timer.h>
#include <LibGfx/Bitmap.h>
#include <LibGfx/DisjointRectSet.h>
namespace Gfx {
class Painter;
}
#include <LibGfx/Forward.h>
namespace WindowServer {

View file

@ -30,15 +30,12 @@
#include <AK/String.h>
#include <AK/WeakPtr.h>
#include <LibCore/Object.h>
#include <LibGfx/Forward.h>
#include <LibGfx/Rect.h>
#include <WindowServer/Cursor.h>
#include <WindowServer/MenuItem.h>
#include <WindowServer/Window.h>
namespace Gfx {
class Font;
}
namespace WindowServer {
class ClientConnection;

View file

@ -28,12 +28,9 @@
#include <AK/Function.h>
#include <AK/String.h>
#include <LibGfx/Forward.h>
#include <LibGfx/Rect.h>
namespace Gfx {
class Bitmap;
}
namespace WindowServer {
class Menu;

View file

@ -25,6 +25,7 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#include <AK/Badge.h>
#include <AK/FileSystemPath.h>
#include <AK/QuickSort.h>
#include <LibCore/DirIterator.h>

View file

@ -31,6 +31,7 @@
#include "Screen.h"
#include "WindowClientEndpoint.h"
#include "WindowManager.h"
#include <AK/Badge.h>
namespace WindowServer {
@ -414,4 +415,9 @@ void Window::set_tiled(WindowTileType tiled)
Core::EventLoop::current().post_event(*this, make<ResizeEvent>(old_rect, m_rect));
}
void Window::detach_client(Badge<ClientConnection>)
{
m_client = nullptr;
}
}

View file

@ -223,7 +223,7 @@ public:
Window* m_next { nullptr };
Window* m_prev { nullptr };
void detach_client(Badge<ClientConnection>) { m_client = nullptr; }
void detach_client(Badge<ClientConnection>);
private:
void handle_mouse_event(const MouseEvent&);

View file

@ -24,6 +24,7 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#include <AK/Badge.h>
#include <LibGfx/CharacterBitmap.h>
#include <LibGfx/Font.h>
#include <LibGfx/Painter.h>

View file

@ -26,13 +26,9 @@
#pragma once
#include <AK/Badge.h>
#include <AK/Forward.h>
#include <AK/NonnullOwnPtrVector.h>
namespace Gfx {
class Painter;
class Rect;
}
#include <LibGfx/Forward.h>
namespace WindowServer {

View file

@ -29,12 +29,9 @@
#include <AK/Vector.h>
#include <AK/WeakPtr.h>
#include <LibCore/Object.h>
#include <LibGfx/Forward.h>
#include <LibGfx/Rect.h>
namespace Gfx {
class Painter;
}
namespace WindowServer {
class KeyEvent;