diff options
| author | Amlal El Mahrouss <amlal@nekernel.org> | 2025-03-28 19:57:33 +0100 |
|---|---|---|
| committer | Amlal El Mahrouss <amlal@nekernel.org> | 2025-03-28 19:57:33 +0100 |
| commit | ba7b3ed69cd24970a28b72c54982735cd120e663 (patch) | |
| tree | 934b7645435ab1bfd2d8eb99fa861fc09e3dd5b4 /dev/modules/CoreGfx | |
| parent | 2205e801a6e84238dc8cbbb8f9de5a675eae1d81 (diff) | |
kernel: breaking: Change namespace from NeOS to Kernel.
sched: Fix redundancy in NeKernel's user scheduler macros, refactored
the other files using the redundant macros too.
part one of a series of commit for NeKernel.
Signed-off-by: Amlal El Mahrouss <amlal@nekernel.org>
Diffstat (limited to 'dev/modules/CoreGfx')
| -rw-r--r-- | dev/modules/CoreGfx/AccessibilityMgr.h | 2 | ||||
| -rw-r--r-- | dev/modules/CoreGfx/FBMgr.h | 44 | ||||
| -rw-r--r-- | dev/modules/CoreGfx/TextMgr.h | 12 |
3 files changed, 29 insertions, 29 deletions
diff --git a/dev/modules/CoreGfx/AccessibilityMgr.h b/dev/modules/CoreGfx/AccessibilityMgr.h index a7cd24b5..d74059d0 100644 --- a/dev/modules/CoreGfx/AccessibilityMgr.h +++ b/dev/modules/CoreGfx/AccessibilityMgr.h @@ -15,7 +15,7 @@ namespace FB { - using namespace NeOS; + using namespace Kernel; /// @brief common User interface class. class UIAccessibilty final diff --git a/dev/modules/CoreGfx/FBMgr.h b/dev/modules/CoreGfx/FBMgr.h index 5600e4c7..6ac4df02 100644 --- a/dev/modules/CoreGfx/FBMgr.h +++ b/dev/modules/CoreGfx/FBMgr.h @@ -8,7 +8,7 @@ #include <NewKit/Defines.h> -#define fb_init() NeOS::SizeT kCGCursor = 0 +#define fb_init() Kernel::SizeT kCGCursor = 0 #define fb_color(R, G, B) RGB(R, G, B) @@ -19,11 +19,11 @@ #ifdef __NE_AMD64__ /// @brief Performs Alpha drawing on the framebuffer. #define FBDrawBitMapInRegionA(reg_ptr, height, width, base_x, base_y) \ - for (NeOS::SizeT i = base_x; i < (width + base_x); ++i) \ + for (Kernel::SizeT i = base_x; i < (width + base_x); ++i) \ { \ - for (NeOS::SizeT u = base_y; u < (height + base_y); ++u) \ + for (Kernel::SizeT u = base_y; u < (height + base_y); ++u) \ { \ - *(((NeOS::UInt32*)(kHandoverHeader->f_GOP.f_The + \ + *(((Kernel::UInt32*)(kHandoverHeader->f_GOP.f_The + \ 4 * kHandoverHeader->f_GOP.f_PixelPerLine * \ i + \ 4 * u))) |= (reg_ptr)[kCGCursor]; \ @@ -34,11 +34,11 @@ /// @brief Performs drawing on the framebuffer. #define FBDrawBitMapInRegion(reg_ptr, height, width, base_x, base_y) \ - for (NeOS::SizeT i = base_x; i < (width + base_x); ++i) \ + for (Kernel::SizeT i = base_x; i < (width + base_x); ++i) \ { \ - for (NeOS::SizeT u = base_y; u < (height + base_y); ++u) \ + for (Kernel::SizeT u = base_y; u < (height + base_y); ++u) \ { \ - *(((NeOS::UInt32*)(kHandoverHeader->f_GOP.f_The + \ + *(((Kernel::UInt32*)(kHandoverHeader->f_GOP.f_The + \ 4 * kHandoverHeader->f_GOP.f_PixelPerLine * \ i + \ 4 * u))) = (reg_ptr)[kCGCursor]; \ @@ -48,11 +48,11 @@ } #define FBDrawBitMapInRegionToRgn(_Rgn, reg_ptr, height, width, base_x, base_y) \ - for (NeOS::SizeT i = base_x; i < (width + base_x); ++i) \ + for (Kernel::SizeT i = base_x; i < (width + base_x); ++i) \ { \ - for (NeOS::SizeT u = base_y; u < (height + base_y); ++u) \ + for (Kernel::SizeT u = base_y; u < (height + base_y); ++u) \ { \ - *(((NeOS::UInt32*)(_Rgn + \ + *(((Kernel::UInt32*)(_Rgn + \ 4 * kHandoverHeader->f_GOP.f_PixelPerLine * \ i + \ 4 * u))) = (reg_ptr)[kCGCursor]; \ @@ -63,11 +63,11 @@ /// @brief Cleans a resource. #define CGClearRegion(height, width, base_x, base_y) \ - for (NeOS::SizeT i = base_x; i < (width + base_x); ++i) \ + for (Kernel::SizeT i = base_x; i < (width + base_x); ++i) \ { \ - for (NeOS::SizeT u = base_y; u < (height + base_y); ++u) \ + for (Kernel::SizeT u = base_y; u < (height + base_y); ++u) \ { \ - *(((volatile NeOS::UInt32*)(kHandoverHeader->f_GOP.f_The + \ + *(((volatile Kernel::UInt32*)(kHandoverHeader->f_GOP.f_The + \ 4 * kHandoverHeader->f_GOP.f_PixelPerLine * \ i + \ 4 * u))) = fb_get_clear_clr(); \ @@ -76,11 +76,11 @@ /// @brief Draws inside a zone. #define FBDrawInRegion(_Clr, height, width, base_x, base_y) \ - for (NeOS::SizeT x_base = base_x; x_base < (width + base_x); ++x_base) \ + for (Kernel::SizeT x_base = base_x; x_base < (width + base_x); ++x_base) \ { \ - for (NeOS::SizeT y_base = base_y; y_base < (height + base_y); ++y_base) \ + for (Kernel::SizeT y_base = base_y; y_base < (height + base_y); ++y_base) \ { \ - *(((volatile NeOS::UInt32*)(kHandoverHeader->f_GOP.f_The + \ + *(((volatile Kernel::UInt32*)(kHandoverHeader->f_GOP.f_The + \ 4 * kHandoverHeader->f_GOP.f_PixelPerLine * \ x_base + \ 4 * y_base))) = _Clr; \ @@ -89,11 +89,11 @@ /// @brief Draws inside a zone. #define FBDrawInRegionToRgn(_Rgn, _Clr, height, width, base_x, base_y) \ - for (NeOS::SizeT x_base = base_x; x_base < (width + base_x); ++x_base) \ + for (Kernel::SizeT x_base = base_x; x_base < (width + base_x); ++x_base) \ { \ - for (NeOS::SizeT y_base = base_y; y_base < (height + base_y); ++y_base) \ + for (Kernel::SizeT y_base = base_y; y_base < (height + base_y); ++y_base) \ { \ - *(((volatile NeOS::UInt32*)(_Rgn + \ + *(((volatile Kernel::UInt32*)(_Rgn + \ 4 * kHandoverHeader->f_GOP.f_PixelPerLine * \ x_base + \ 4 * y_base))) = _Clr[kCGCursor]; \ @@ -102,11 +102,11 @@ } #define FBDrawInRegionA(_Clr, height, width, base_x, base_y) \ - for (NeOS::SizeT x_base = base_x; x_base < (width + base_x); ++x_base) \ + for (Kernel::SizeT x_base = base_x; x_base < (width + base_x); ++x_base) \ { \ - for (NeOS::SizeT y_base = base_y; y_base < (height + base_y); ++y_base) \ + for (Kernel::SizeT y_base = base_y; y_base < (height + base_y); ++y_base) \ { \ - *(((volatile NeOS::UInt32*)(kHandoverHeader->f_GOP.f_The + \ + *(((volatile Kernel::UInt32*)(kHandoverHeader->f_GOP.f_The + \ 4 * kHandoverHeader->f_GOP.f_PixelPerLine * \ x_base + \ 4 * y_base))) |= _Clr; \ diff --git a/dev/modules/CoreGfx/TextMgr.h b/dev/modules/CoreGfx/TextMgr.h index 843e8274..9c632e2e 100644 --- a/dev/modules/CoreGfx/TextMgr.h +++ b/dev/modules/CoreGfx/TextMgr.h @@ -13,7 +13,7 @@ #define kFontSizeY 8
#define kFontNOFChars 128
-inline const NeOS::UInt8 kFontBitmap[kFontNOFChars][kFontSizeX] = {
+inline const Kernel::UInt8 kFontBitmap[kFontNOFChars][kFontSizeX] = {
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, // U+0000 (nul)
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, // U+0001
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, // U+0002
@@ -145,10 +145,10 @@ inline const NeOS::UInt8 kFontBitmap[kFontNOFChars][kFontSizeX] = { };
-inline NeOS::Void fb_render_string_for_bitmap(const NeOS::UInt8* bitmap, const NeOS::SizeT& x_sz, const NeOS::SizeT& y_sz, NeOS::Int32& x_dst, NeOS::Int32& y_dst, NeOS::Int32& color)
+inline Kernel::Void fb_render_string_for_bitmap(const Kernel::UInt8* bitmap, const Kernel::SizeT& x_sz, const Kernel::SizeT& y_sz, Kernel::Int32& x_dst, Kernel::Int32& y_dst, Kernel::Int32& color)
{
- NeOS::Int32 x, y;
- NeOS::Int32 set;
+ Kernel::Int32 x, y;
+ Kernel::Int32 set;
x = 0;
y = 0;
@@ -168,9 +168,9 @@ inline NeOS::Void fb_render_string_for_bitmap(const NeOS::UInt8* bitmap, const N }
}
-inline NeOS::Void fb_render_string(const NeOS::Char* text, NeOS::Int32 x_dst, NeOS::Int32 y_dst, NeOS::Int32 color)
+inline Kernel::Void fb_render_string(const Kernel::Char* text, Kernel::Int32 x_dst, Kernel::Int32 y_dst, Kernel::Int32 color)
{
- for (NeOS::SizeT i = 0; text[i] != 0; ++i)
+ for (Kernel::SizeT i = 0; text[i] != 0; ++i)
{
fb_render_string_for_bitmap(&kFontBitmap[text[i]][0], kFontSizeX, kFontSizeY, x_dst, y_dst, color);
y_dst += kFontSizeY;
|
