mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-22 07:30:19 +00:00
LibGfx: More work on header dependency reduction
This commit is contained in:
parent
d85b09893d
commit
08cae2773d
Notes:
sideshowbarker
2024-07-19 09:20:09 +09:00
Author: https://github.com/awesomekling Commit: https://github.com/SerenityOS/serenity/commit/08cae2773d7
10 changed files with 30 additions and 21 deletions
|
@ -24,9 +24,11 @@
|
|||
* 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/Slider.h>
|
||||
#include <LibGfx/StylePainter.h>
|
||||
|
||||
namespace GUI {
|
||||
|
||||
|
|
|
@ -30,12 +30,13 @@
|
|||
#include <AK/HashTable.h>
|
||||
#include <AK/NonnullOwnPtrVector.h>
|
||||
#include <AK/NonnullRefPtr.h>
|
||||
#include <AK/Optional.h>
|
||||
#include <AK/RefCounted.h>
|
||||
#include <LibCore/Timer.h>
|
||||
#include <LibGfx/Color.h>
|
||||
#include <LibGfx/Font.h>
|
||||
#include <LibGUI/TextRange.h>
|
||||
#include <LibGUI/UndoStack.h>
|
||||
#include <LibGfx/Color.h>
|
||||
#include <LibGfx/Font.h>
|
||||
|
||||
namespace GUI {
|
||||
|
||||
|
|
|
@ -25,11 +25,15 @@
|
|||
*/
|
||||
|
||||
#include <AK/Assertions.h>
|
||||
#include <AK/Optional.h>
|
||||
#include <AK/String.h>
|
||||
#include <LibGfx/Color.h>
|
||||
#include <LibGfx/SystemTheme.h>
|
||||
#include <ctype.h>
|
||||
#include <stdio.h>
|
||||
|
||||
namespace Gfx {
|
||||
|
||||
Color::Color(NamedColor named)
|
||||
{
|
||||
struct {
|
||||
|
@ -338,3 +342,9 @@ Optional<Color> Color::from_string(const StringView& string)
|
|||
|
||||
return Color(r.value(), g.value(), b.value(), a.value());
|
||||
}
|
||||
}
|
||||
|
||||
inline const LogStream& operator<<(const LogStream& stream, Color value)
|
||||
{
|
||||
return stream << value.to_string();
|
||||
}
|
||||
|
|
|
@ -26,9 +26,8 @@
|
|||
|
||||
#pragma once
|
||||
|
||||
#include <AK/Optional.h>
|
||||
#include <AK/String.h>
|
||||
#include <AK/Types.h>
|
||||
#include <AK/Forward.h>
|
||||
#include <AK/StdLibExtras.h>
|
||||
|
||||
namespace Gfx {
|
||||
|
||||
|
@ -274,10 +273,7 @@ private:
|
|||
RGBA32 m_value { 0 };
|
||||
};
|
||||
|
||||
inline const LogStream& operator<<(const LogStream& stream, Color value)
|
||||
{
|
||||
return stream << value.to_string();
|
||||
}
|
||||
const LogStream& operator<<(const LogStream&, Color);
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -32,10 +32,13 @@ class Bitmap;
|
|||
class CharacterBitmap;
|
||||
class Color;
|
||||
class DisjointRectSet;
|
||||
class Emoji;
|
||||
class FloatPoint;
|
||||
class FloatRect;
|
||||
class FloatSize;
|
||||
class Font;
|
||||
class GlyphBitmap;
|
||||
class ImageDecoder;
|
||||
class Painter;
|
||||
class Palette;
|
||||
class Point;
|
||||
|
|
|
@ -26,10 +26,10 @@
|
|||
|
||||
#pragma once
|
||||
|
||||
#include <AK/String.h>
|
||||
#include <AK/Utf8View.h>
|
||||
#include <AK/Forward.h>
|
||||
#include <AK/Vector.h>
|
||||
#include <LibGfx/Color.h>
|
||||
#include <LibGfx/Forward.h>
|
||||
#include <LibGfx/Point.h>
|
||||
#include <LibGfx/Rect.h>
|
||||
#include <LibGfx/Size.h>
|
||||
|
@ -38,12 +38,6 @@
|
|||
|
||||
namespace Gfx {
|
||||
|
||||
class CharacterBitmap;
|
||||
class GlyphBitmap;
|
||||
class Bitmap;
|
||||
class Font;
|
||||
class Emoji;
|
||||
|
||||
class Painter {
|
||||
public:
|
||||
explicit Painter(Gfx::Bitmap&);
|
||||
|
|
|
@ -28,6 +28,8 @@
|
|||
|
||||
#include <AK/Forward.h>
|
||||
#include <AK/Noncopyable.h>
|
||||
#include <AK/RefCounted.h>
|
||||
#include <AK/RefPtr.h>
|
||||
#include <LibGfx/SystemTheme.h>
|
||||
|
||||
namespace GUI {
|
||||
|
|
|
@ -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_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_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);
|
||||
};
|
||||
|
||||
|
|
|
@ -24,6 +24,8 @@
|
|||
* 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/DOM/Document.h>
|
||||
#include <LibHTML/DOM/HTMLImageElement.h>
|
||||
|
|
|
@ -27,8 +27,7 @@
|
|||
#pragma once
|
||||
|
||||
#include <AK/ByteBuffer.h>
|
||||
#include <LibGfx/Bitmap.h>
|
||||
#include <LibGfx/ImageDecoder.h>
|
||||
#include <LibGfx/Forward.h>
|
||||
#include <LibHTML/DOM/HTMLElement.h>
|
||||
|
||||
class LayoutDocument;
|
||||
|
|
Loading…
Reference in a new issue