summaryrefslogtreecommitdiffhomepage
path: root/Private/KernelKit
diff options
context:
space:
mode:
authorAmlal El Mahrouss <amlal@el-mahrouss-logic.com>2024-03-25 20:17:53 +0100
committerAmlal El Mahrouss <amlal@el-mahrouss-logic.com>2024-03-25 20:17:53 +0100
commit3b3b36dcc6542e203475fe1d50ed89799e3f3fc6 (patch)
tree3d1e4cfba79343e2b5ef8db58c58271009a44937 /Private/KernelKit
parentd968190d1ba48638c1481be0d367ee3cea82ae55 (diff)
Kernel: implement some tickets, improved stuff.
Signed-off-by: Amlal El Mahrouss <amlal@el-mahrouss-logic.com>
Diffstat (limited to 'Private/KernelKit')
-rw-r--r--Private/KernelKit/Framebuffer.hpp22
1 files changed, 20 insertions, 2 deletions
diff --git a/Private/KernelKit/Framebuffer.hpp b/Private/KernelKit/Framebuffer.hpp
index daf95ed0..0dfeacef 100644
--- a/Private/KernelKit/Framebuffer.hpp
+++ b/Private/KernelKit/Framebuffer.hpp
@@ -28,7 +28,8 @@ class FramebufferContext final {
class Framebuffer final {
public:
- explicit Framebuffer(Ref<FramebufferContext *> &addr) : m_FrameBufferAddr(addr) {}
+ explicit Framebuffer(Ref<FramebufferContext *> &addr)
+ : m_FrameBufferAddr(addr) {}
~Framebuffer() {}
Framebuffer &operator=(const Framebuffer &) = delete;
@@ -37,12 +38,29 @@ class Framebuffer final {
volatile UIntPtr *operator[](const UIntPtr &pos);
operator bool();
-
+
const FramebufferColorKind &Color(
const FramebufferColorKind &colour = FramebufferColorKind::INVALID);
Ref<FramebufferContext *> &Leak();
+ /// @brief Draws a rectangle inside the fb.
+ /// @param width
+ /// @param height
+ /// @param x
+ /// @param y
+ /// @param color
+ /// @return
+ Framebuffer &DrawRect(SizeT width, SizeT height, SizeT x, SizeT y,
+ UInt32 color);
+
+ /// @brief Puts a pixel on the screen.
+ /// @param x where in X
+ /// @param y where in Y
+ /// @param color the color of it.
+ /// @return
+ Framebuffer &PutPixel(SizeT x, SizeT y, UInt32 color);
+
private:
Ref<FramebufferContext *> m_FrameBufferAddr;
FramebufferColorKind m_Colour;