1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 14:18:12 +00:00

LibGfx: More work on header dependency reduction

This commit is contained in:
Andreas Kling 2020-02-14 23:28:42 +01:00
parent d85b09893d
commit 08cae2773d
10 changed files with 30 additions and 21 deletions

View file

@ -24,9 +24,11 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/ */
#include <LibGfx/StylePainter.h> #include <AK/Assertions.h>
#include <AK/StdLibExtras.h>
#include <LibGUI/Painter.h> #include <LibGUI/Painter.h>
#include <LibGUI/Slider.h> #include <LibGUI/Slider.h>
#include <LibGfx/StylePainter.h>
namespace GUI { namespace GUI {

View file

@ -30,12 +30,13 @@
#include <AK/HashTable.h> #include <AK/HashTable.h>
#include <AK/NonnullOwnPtrVector.h> #include <AK/NonnullOwnPtrVector.h>
#include <AK/NonnullRefPtr.h> #include <AK/NonnullRefPtr.h>
#include <AK/Optional.h>
#include <AK/RefCounted.h> #include <AK/RefCounted.h>
#include <LibCore/Timer.h> #include <LibCore/Timer.h>
#include <LibGfx/Color.h>
#include <LibGfx/Font.h>
#include <LibGUI/TextRange.h> #include <LibGUI/TextRange.h>
#include <LibGUI/UndoStack.h> #include <LibGUI/UndoStack.h>
#include <LibGfx/Color.h>
#include <LibGfx/Font.h>
namespace GUI { namespace GUI {

View file

@ -25,11 +25,15 @@
*/ */
#include <AK/Assertions.h> #include <AK/Assertions.h>
#include <AK/Optional.h>
#include <AK/String.h>
#include <LibGfx/Color.h> #include <LibGfx/Color.h>
#include <LibGfx/SystemTheme.h> #include <LibGfx/SystemTheme.h>
#include <ctype.h> #include <ctype.h>
#include <stdio.h> #include <stdio.h>
namespace Gfx {
Color::Color(NamedColor named) Color::Color(NamedColor named)
{ {
struct { struct {
@ -338,3 +342,9 @@ Optional<Color> Color::from_string(const StringView& string)
return Color(r.value(), g.value(), b.value(), a.value()); return Color(r.value(), g.value(), b.value(), a.value());
} }
}
inline const LogStream& operator<<(const LogStream& stream, Color value)
{
return stream << value.to_string();
}

View file

@ -26,9 +26,8 @@
#pragma once #pragma once
#include <AK/Optional.h> #include <AK/Forward.h>
#include <AK/String.h> #include <AK/StdLibExtras.h>
#include <AK/Types.h>
namespace Gfx { namespace Gfx {
@ -274,10 +273,7 @@ private:
RGBA32 m_value { 0 }; RGBA32 m_value { 0 };
}; };
inline const LogStream& operator<<(const LogStream& stream, Color value) const LogStream& operator<<(const LogStream&, Color);
{
return stream << value.to_string();
}
} }

View file

@ -32,10 +32,13 @@ class Bitmap;
class CharacterBitmap; class CharacterBitmap;
class Color; class Color;
class DisjointRectSet; class DisjointRectSet;
class Emoji;
class FloatPoint; class FloatPoint;
class FloatRect; class FloatRect;
class FloatSize; class FloatSize;
class Font; class Font;
class GlyphBitmap;
class ImageDecoder;
class Painter; class Painter;
class Palette; class Palette;
class Point; class Point;

View file

@ -26,10 +26,10 @@
#pragma once #pragma once
#include <AK/String.h> #include <AK/Forward.h>
#include <AK/Utf8View.h>
#include <AK/Vector.h> #include <AK/Vector.h>
#include <LibGfx/Color.h> #include <LibGfx/Color.h>
#include <LibGfx/Forward.h>
#include <LibGfx/Point.h> #include <LibGfx/Point.h>
#include <LibGfx/Rect.h> #include <LibGfx/Rect.h>
#include <LibGfx/Size.h> #include <LibGfx/Size.h>
@ -38,12 +38,6 @@
namespace Gfx { namespace Gfx {
class CharacterBitmap;
class GlyphBitmap;
class Bitmap;
class Font;
class Emoji;
class Painter { class Painter {
public: public:
explicit Painter(Gfx::Bitmap&); explicit Painter(Gfx::Bitmap&);

View file

@ -28,6 +28,8 @@
#include <AK/Forward.h> #include <AK/Forward.h>
#include <AK/Noncopyable.h> #include <AK/Noncopyable.h>
#include <AK/RefCounted.h>
#include <AK/RefPtr.h>
#include <LibGfx/SystemTheme.h> #include <LibGfx/SystemTheme.h>
namespace GUI { namespace GUI {

View file

@ -59,7 +59,7 @@ public:
static void paint_surface(Painter&, const Rect&, const Palette&, bool paint_vertical_lines = true, bool paint_top_line = true); static void paint_surface(Painter&, const Rect&, const Palette&, bool paint_vertical_lines = true, bool paint_top_line = true);
static void paint_frame(Painter&, const Rect&, const Palette&, FrameShape, FrameShadow, int thickness, bool skip_vertical_lines = false); static void paint_frame(Painter&, const Rect&, const Palette&, FrameShape, FrameShadow, int thickness, bool skip_vertical_lines = false);
static void paint_window_frame(Painter&, const Rect&, const Palette&); static void paint_window_frame(Painter&, const Rect&, const Palette&);
static void paint_progress_bar(Painter&, const Rect&, const Palette&, int min, int max, int value, const StringView& text = {}); static void paint_progress_bar(Painter&, const Rect&, const Palette&, int min, int max, int value, const StringView& text);
static void paint_radio_button(Painter&, const Rect&, const Palette&, bool is_checked, bool is_being_pressed); static void paint_radio_button(Painter&, const Rect&, const Palette&, bool is_checked, bool is_being_pressed);
}; };

View file

@ -24,6 +24,8 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/ */
#include <LibGfx/Bitmap.h>
#include <LibGfx/ImageDecoder.h>
#include <LibHTML/CSS/StyleResolver.h> #include <LibHTML/CSS/StyleResolver.h>
#include <LibHTML/DOM/Document.h> #include <LibHTML/DOM/Document.h>
#include <LibHTML/DOM/HTMLImageElement.h> #include <LibHTML/DOM/HTMLImageElement.h>

View file

@ -27,8 +27,7 @@
#pragma once #pragma once
#include <AK/ByteBuffer.h> #include <AK/ByteBuffer.h>
#include <LibGfx/Bitmap.h> #include <LibGfx/Forward.h>
#include <LibGfx/ImageDecoder.h>
#include <LibHTML/DOM/HTMLElement.h> #include <LibHTML/DOM/HTMLElement.h>
class LayoutDocument; class LayoutDocument;