diff options
| author | Amlal El Mahrouss <amlal@nekernel.org> | 2025-04-19 08:40:12 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-04-19 08:40:12 +0200 |
| commit | f87797692777540eede1d4739199b444bd15340a (patch) | |
| tree | 646ae3f61ebcd3f83c888912c5f72efc0a8c25b0 /dev/kernel/GfxKit | |
| parent | ee1edba85ea13627871e1ed005931bd502b86ab8 (diff) | |
| parent | 1740a0dff822d7666b8c1f056b6c411ef6b0f9fd (diff) | |
NeKernel: 0.0.10.0.1-release
# NeKernel: 0.0.1
## Features (not all included):
- New extended File System.
- Kernel and Bootloader (NeKernel and BootZ)
- Process Scheduler.
- NeKernel's Preferred Executable Format.
- SysChk.
- Explicit Partition Map scheme.
#### NOTE: The GPT scheme is in WiP! Please run NeKernel on QEMU!
Diffstat (limited to 'dev/kernel/GfxKit')
| -rw-r--r-- | dev/kernel/GfxKit/FB.h | 51 |
1 files changed, 51 insertions, 0 deletions
diff --git a/dev/kernel/GfxKit/FB.h b/dev/kernel/GfxKit/FB.h new file mode 100644 index 00000000..ce5751dc --- /dev/null +++ b/dev/kernel/GfxKit/FB.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 |
