diff options
| author | Amlal El Mahrouss <amlal@nekernel.org> | 2025-04-18 18:24:44 +0200 |
|---|---|---|
| committer | Amlal El Mahrouss <amlal@nekernel.org> | 2025-04-18 18:27:15 +0200 |
| commit | b69c498953dc47900e6ccdd0f501727480836f23 (patch) | |
| tree | 58411ba65eed2933d97657e16e85fab17f12ea01 /dev/kernel/GfxKit | |
| parent | c5b4c98fadd89fd114520e201e34a58a78025344 (diff) | |
kernel, IMP: GfxKit: GraphicsKit.
kernel, IMP: StorageKit: Remove usage of cleanup method on AHCI, DMA,
and PIO.
Signed-off-by: Amlal El Mahrouss <amlal@nekernel.org>
Diffstat (limited to 'dev/kernel/GfxKit')
| -rw-r--r-- | dev/kernel/GfxKit/Gfx.h | 51 |
1 files changed, 51 insertions, 0 deletions
diff --git a/dev/kernel/GfxKit/Gfx.h b/dev/kernel/GfxKit/Gfx.h new file mode 100644 index 00000000..ce5751dc --- /dev/null +++ b/dev/kernel/GfxKit/Gfx.h @@ -0,0 +1,51 @@ +/* ------------------------------------------- + + Copyright (C) 2025, Amlal El Mahrouss, all rights reserved. + +------------------------------------------- */ + +#pragma once + +#include <modules/CoreGfx/CoreGfx.h> +#include <modules/CoreGfx/TextGfx.h> + +namespace Kernel +{ + class FBDeviceInterface; + struct FBDevicePacket; + + /// @brief Framebuffer device interface packet. + /// @details This structure is used to send and receive data from the framebuffer device. + /// @note The structure is packed to ensure that the data is aligned correctly for the device. + struct PACKED FBDevicePacket final + { + UInt32 fX; + UInt32 fY; + UInt32 fWidth; + UInt32 fHeight; + UInt32 fColor; + UInt32 fFlags; + }; + + /// @brief Framebuffer device interface. + /// @details This class is used to send and receive data from the framebuffer device. + /// @note The class is derived from the IDeviceObject class. + class FBDeviceInterface NE_DEVICE<FBDevicePacket*> + { + public: + explicit FBDeviceInterface(void (*out)(IDeviceObject* self, FBDevicePacket* out), + void (*in)(IDeviceObject* self, FBDevicePacket* in)); + + virtual ~FBDeviceInterface() override; + + public: + FBDeviceInterface& operator=(const FBDeviceInterface&) = default; + FBDeviceInterface(const FBDeviceInterface&) = default; + + const Char* Name() const override; + + public: + FBDeviceInterface& operator<<(FBDevicePacket* Data) override; + FBDeviceInterface& operator>>(FBDevicePacket* Data) override; + }; +} // namespace Kernel |
