summaryrefslogtreecommitdiffhomepage
path: root/dev/Usr
diff options
context:
space:
mode:
authorAmlal El Mahrouss <amlal.elmahrouss@icloud.com>2025-03-23 19:13:48 +0100
committerAmlal El Mahrouss <amlal.elmahrouss@icloud.com>2025-03-23 19:15:17 +0100
commita13e1c0911c0627184bc38f18c7fdda64447b3ad (patch)
tree073a62c09bf216e85a3f310376640fa1805147f9 /dev/Usr
parent149fa096eb306d03686b3b67e813cf1a78e08cd0 (diff)
meta(kernel): Reworked repository's filesystem structure.
Removing useless parts of the project too. Signed-off-by: Amlal El Mahrouss <amlal.elmahrouss@icloud.com>
Diffstat (limited to 'dev/Usr')
-rw-r--r--dev/Usr/.keepme0
-rw-r--r--dev/Usr/LibCF/Array.h71
-rw-r--r--dev/Usr/LibCF/Atom.h47
-rw-r--r--dev/Usr/LibCF/Foundation.cc48
-rw-r--r--dev/Usr/LibCF/Foundation.h78
-rw-r--r--dev/Usr/LibCF/Object.h26
-rw-r--r--dev/Usr/LibCF/Property.h53
-rw-r--r--dev/Usr/LibCF/Ref.h110
-rw-r--r--dev/Usr/LibCF/String.h20
-rw-r--r--dev/Usr/LibFont/.keep0
-rw-r--r--dev/Usr/LibFont/Font.h55
-rw-r--r--dev/Usr/LibGUI/.keep0
-rw-r--r--dev/Usr/LibLocale/.keep0
-rw-r--r--dev/Usr/LibWM/WindowConnection.h31
14 files changed, 0 insertions, 539 deletions
diff --git a/dev/Usr/.keepme b/dev/Usr/.keepme
deleted file mode 100644
index e69de29b..00000000
--- a/dev/Usr/.keepme
+++ /dev/null
diff --git a/dev/Usr/LibCF/Array.h b/dev/Usr/LibCF/Array.h
deleted file mode 100644
index c466b0fb..00000000
--- a/dev/Usr/LibCF/Array.h
+++ /dev/null
@@ -1,71 +0,0 @@
-/* -------------------------------------------
-
- Copyright (C) 2024-2025, Amlal EL Mahrouss, all rights reserved.
-
-------------------------------------------- */
-
-#pragma once
-
-#include <LibSCI/SCI.h>
-
-namespace LibCF
-{
- template <typename T, SizeT N>
- class CFArray final
- {
- public:
- explicit CFArray() = default;
- ~CFArray() = default;
-
- CFArray& operator=(const CFArray&) = default;
- CFArray(const CFArray&) = default;
-
- T& operator[](const SizeT& at)
- {
- MUST_PASS(at < this->Count());
- return fArray[at];
- }
-
- Bool Empty()
- {
- return this->Count() > 0;
- }
-
- const SizeT Capacity()
- {
- return N;
- }
-
- const SizeT Count()
- {
- auto cnt = 0UL;
-
- for (auto i = 0; i < N; ++i)
- {
- if (fArray[i])
- ++cnt;
- }
-
- return cnt;
- }
-
- const T* CData()
- {
- return fArray;
- }
-
- operator bool()
- {
- return !Empty();
- }
-
- private:
- T fArray[N] = {nullptr};
- };
-
- template <typename ValueType>
- auto make_array(ValueType val)
- {
- return CFArray<ValueType, ARRAY_SIZE(val)>{val};
- }
-} // namespace LibCF
diff --git a/dev/Usr/LibCF/Atom.h b/dev/Usr/LibCF/Atom.h
deleted file mode 100644
index 26b4f0cd..00000000
--- a/dev/Usr/LibCF/Atom.h
+++ /dev/null
@@ -1,47 +0,0 @@
-/* -------------------------------------------
-
- Copyright (C) 2024-2025, Amlal EL Mahrouss, all rights reserved.
-
-------------------------------------------- */
-#pragma once
-
-#include <LibCF/Foundation.h>
-
-namespace LibCF
-{
- template <typename T>
- class CFAtom final
- {
- public:
- explicit CFAtom() = default;
- ~CFAtom() = default;
-
- public:
- CFAtom& operator=(const CFAtom&) = delete;
- CFAtom(const CFAtom&) = delete;
-
- public:
- T operator[](SizeT bit)
- {
- return (fArrayOfAtoms & (1 << bit));
- }
-
- void operator|(SizeT bit)
- {
- fArrayOfAtoms |= (1 << bit);
- }
-
- friend Boolean operator==(CFAtom<T>& atomic, const T& idx)
- {
- return atomic[idx] == idx;
- }
-
- friend Boolean operator!=(CFAtom<T>& atomic, const T& idx)
- {
- return atomic[idx] == idx;
- }
-
- private:
- T fArrayOfAtoms;
- };
-} // namespace LibCF
diff --git a/dev/Usr/LibCF/Foundation.cc b/dev/Usr/LibCF/Foundation.cc
deleted file mode 100644
index cb11287f..00000000
--- a/dev/Usr/LibCF/Foundation.cc
+++ /dev/null
@@ -1,48 +0,0 @@
-/* -------------------------------------------
-
- Copyright (C) 2024 Amlal El Mahrouss, all rights reserved
-
-------------------------------------------- */
-
-#include <LibCF/Foundation.h>
-
-LibCF::CFRect::operator bool()
-{
- return width > 0 && height > 0;
-}
-
-/***********************************************************************************/
-/// @brief returns true if size matches.
-/***********************************************************************************/
-BOOL LibCF::CFRect::SizeMatches(LibCF::CFRect& rect) noexcept
-{
- return rect.height == height && rect.width == width;
-}
-
-/***********************************************************************************/
-/// @brief returns true if position matches.
-/***********************************************************************************/
-BOOL LibCF::CFRect::PositionMatches(LibCF::CFRect& rect) noexcept
-{
- return rect.y == y && rect.x == x;
-}
-
-/***********************************************************************************/
-/// @brief Check if point is within the current MLPoint.
-/// @param point the current point to check.
-/// @retval true if point is within this point.
-/// @retval the validations have failed, false otherwise true.
-/***********************************************************************************/
-BOOL LibCF::CFPoint::IsWithin(LibCF::CFPoint& withinOf)
-{
- return x_1 >= withinOf.x_1 && x_2 <= (withinOf.x_2) &&
- y_1 >= withinOf.y_1 && y_2 <= (withinOf.y_2);
-}
-
-/***********************************************************************************/
-/// @brief if Point object is correctly set up.
-/***********************************************************************************/
-LibCF::CFPoint::operator bool()
-{
- return x_1 > x_2 && y_1 > y_2;
-} \ No newline at end of file
diff --git a/dev/Usr/LibCF/Foundation.h b/dev/Usr/LibCF/Foundation.h
deleted file mode 100644
index c0f8fe6c..00000000
--- a/dev/Usr/LibCF/Foundation.h
+++ /dev/null
@@ -1,78 +0,0 @@
-
-/* -------------------------------------------
-
- Copyright (C) 2024-2025, Amlal EL Mahrouss, all rights reserved.
-
- FILE: Foundation.h
- PURPOSE: Foundation header of the CF framework.
-
-------------------------------------------- */
-
-#pragma once
-
-#include <LibSCI/SCI.h>
-
-namespace LibCF
-{
- class CFString;
- class CFGUID;
- class CFProperty;
- class CFObject;
- template <typename T>
- class CFRef;
- class CFFont;
- struct CFPoint;
- struct CFRect;
- struct CFColor;
-
-#ifndef __LP64__
- typedef SInt32 CFInteger;
- typedef float CFReal;
-#else
- typedef SInt64 CFInteger;
- typedef double CFReal;
-#endif
-
- typedef SInt32 CFInteger32;
- typedef SInt64 CFInteger64;
-
- typedef char CFChar8;
- typedef char16_t CFChar16;
-
- struct CFPoint
- {
- CFInteger64 x_1{0UL};
- CFInteger64 y_1{0UL};
-
- CFInteger64 x_2{0UL};
- CFInteger64 y_2{0UL};
- CFReal ang{0UL};
-
- operator bool();
-
- /// @brief Check if point is within the current CFPoint.
- /// @param point the current point to check.
- /// @retval true if point is within this point.
- /// @retval validations failed.
- bool IsWithin(CFPoint& point);
- };
-
- struct CFColor final
- {
- CFInteger64 r, g, b, a{0};
- };
-
- struct CFRect final
- {
- CFInteger64 x{0UL};
- CFInteger64 y{0UL};
-
- CFInteger64 width{0UL};
- CFInteger64 height{0UL};
-
- operator bool();
-
- BOOL SizeMatches(CFRect& rect) noexcept;
- BOOL PositionMatches(CFRect& rect) noexcept;
- };
-} // namespace LibCF \ No newline at end of file
diff --git a/dev/Usr/LibCF/Object.h b/dev/Usr/LibCF/Object.h
deleted file mode 100644
index 1f8d185e..00000000
--- a/dev/Usr/LibCF/Object.h
+++ /dev/null
@@ -1,26 +0,0 @@
-
-/* -------------------------------------------
-
- Copyright (C) 2025, Amlal EL Mahrouss, all rights reserved.
-
-------------------------------------------- */
-
-#pragma once
-
-#include <LibCF/Foundation.h>
-
-#define CF_OBJECT : public LibCF::CFObject
-
-namespace LibCF
-{
- class CFObject;
-
- class CFObject
- {
- public:
- explicit CFObject() = default;
- virtual ~CFObject() = default;
-
- SCI_COPY_DEFAULT(CFObject);
- };
-} // namespace LibCF \ No newline at end of file
diff --git a/dev/Usr/LibCF/Property.h b/dev/Usr/LibCF/Property.h
deleted file mode 100644
index 51a60be7..00000000
--- a/dev/Usr/LibCF/Property.h
+++ /dev/null
@@ -1,53 +0,0 @@
-/* -------------------------------------------
-
- Copyright (C) 2024-2025, Amlal EL Mahrouss, all rights reserved.
-
-------------------------------------------- */
-
-#ifndef _PROPS_H
-#define _PROPS_H
-
-#include <LibSCI/SCI.h>
-#include <LibCF/Ref.h>
-
-#define kMaxPropLen (256U)
-
-namespace LibCF
-{
- class CFString;
- class CFProperty;
- class CFGUID;
-
- template <typename Cls, SizeT N>
- class CFArray;
-
- /// @brief handle to anything (number, ptr, string...)
- using CFPropertyId = UIntPtr;
-
- /// @brief User property class.
- /// @example /prop/foo or /prop/bar
- class CFProperty final CF_OBJECT
- {
- public:
- CFProperty();
- virtual ~CFProperty();
-
- public:
- CFProperty& operator=(const CFProperty&) = default;
- CFProperty(const CFProperty&) = default;
-
- Bool StringEquals(CFString& name);
- CFPropertyId& GetValue();
- CFString& GetKey();
-
- private:
- CFString* fName{nullptr};
- CFPropertyId fValue{0UL};
- Ref<CFGUID> fGUID{};
- };
-
- template <SizeT N>
- using CFPropertyArray = CFArray<CFProperty, N>;
-} // namespace LibCF
-
-#endif // !CFKIT_PROPS_H
diff --git a/dev/Usr/LibCF/Ref.h b/dev/Usr/LibCF/Ref.h
deleted file mode 100644
index d170ffe8..00000000
--- a/dev/Usr/LibCF/Ref.h
+++ /dev/null
@@ -1,110 +0,0 @@
-
-/* -------------------------------------------
-
- Copyright (C) 2024-2025, Amlal EL Mahrouss, all rights reserved.
-
-------------------------------------------- */
-
-#ifndef _REF_H_
-#define _REF_H_
-
-#include <LibSCI/SCI.h>
-#include <LibCF/Object.h>
-
-namespace LibCF
-{
- template <typename T>
- class CFRef;
-
- template <typename T>
- class CFRef final CF_OBJECT
- {
- public:
- CFRef() = default;
-
- ~CFRef()
- {
- if (MmGetHeapFlags(fClass) != -1)
- delete fClass;
- }
-
- public:
- CFRef(T* cls)
- : fClass(cls)
- {
- }
-
- CFRef(T cls)
- : fClass(&cls)
- {
- }
-
- CFRef& operator=(T ref)
- {
- if (!fClass)
- return *this;
-
- fClass = &ref;
- return *this;
- }
-
- public:
- T operator->() const
- {
- MUST_PASS(*fClass);
- return *fClass;
- }
-
- T& Leak() noexcept
- {
- return *fClass;
- }
-
- T& TryLeak() const noexcept
- {
- MUST_PASS(*fClass);
- return *fClass;
- }
-
- T operator*()
- {
- return *fClass;
- }
-
- operator bool() noexcept
- {
- return fClass;
- }
-
- private:
- T* fClass{nullptr};
- };
-
- template <typename T>
- class CFNonNullRef final
- {
- public:
- CFNonNullRef() = delete;
- CFNonNullRef(nullPtr) = delete;
-
- CFNonNullRef(T* ref)
- : fRef(ref)
- {
- MUST_PASS(ref);
- }
-
- CFRef<T>& operator->()
- {
- MUST_PASS(fRef);
- return fRef;
- }
-
- CFNonNullRef& operator=(const CFNonNullRef<T>& ref) = delete;
- CFNonNullRef(const CFNonNullRef<T>& ref) = default;
-
- private:
- CFRef<T> fRef{nullptr};
- };
-} // namespace LibCF
-
-#endif // ifndef _NEWKIT_REF_H_
diff --git a/dev/Usr/LibCF/String.h b/dev/Usr/LibCF/String.h
deleted file mode 100644
index 9b83fec6..00000000
--- a/dev/Usr/LibCF/String.h
+++ /dev/null
@@ -1,20 +0,0 @@
-
-/* -------------------------------------------
-
- Copyright (C) 2025, Amlal EL Mahrouss, all rights reserved.
-
-------------------------------------------- */
-
-#pragma once
-
-#include <LibCF/Object.h>
-
-namespace LibCF
-{
- class CFString;
-
- class CFString final CF_OBJECT
- {
- public:
- };
-} // namespace LibCF \ No newline at end of file
diff --git a/dev/Usr/LibFont/.keep b/dev/Usr/LibFont/.keep
deleted file mode 100644
index e69de29b..00000000
--- a/dev/Usr/LibFont/.keep
+++ /dev/null
diff --git a/dev/Usr/LibFont/Font.h b/dev/Usr/LibFont/Font.h
deleted file mode 100644
index 73b3a285..00000000
--- a/dev/Usr/LibFont/Font.h
+++ /dev/null
@@ -1,55 +0,0 @@
-/**
- *
- * Copyright (c) 2024 Amlal El Mahrouss
- *
- */
-
-#pragma once
-
-#include <LibCF/Foundation.h>
-
-#define kCFFontExt ".ttf"
-
-/// @file Font.h
-/// @brief Font parsing using a NeOS True Font.
-
-namespace LibCF
-{
- class CFFont;
-
- class CFFont
- {
- public:
- explicit CFFont() = default;
- virtual ~CFFont() = default;
-
- protected:
- CFRect m_size{};
- CFRect* m_glyphs{nullptr};
- CFInteger32 m_glyphs_cnt{0};
- BOOL m_bold{NO};
- BOOL m_italic{NO};
-
- CFFont(const CFFont& fnt) = delete;
- CFFont& operator=(const CFFont& fnt) = delete;
-
- virtual BOOL render_(CFPoint pos, CFChar16 character, CFColor color) = 0;
-
- virtual void dispose_()
- {
- m_bold = NO;
- m_italic = NO;
-
- m_size.height = 0;
- m_size.width = 0;
-
- m_glyphs_cnt = 0;
-
- delete[] m_glyphs;
- m_glyphs = nullptr;
-
- m_size.x = 0;
- m_size.y = 0;
- }
- };
-} // namespace LibCF \ No newline at end of file
diff --git a/dev/Usr/LibGUI/.keep b/dev/Usr/LibGUI/.keep
deleted file mode 100644
index e69de29b..00000000
--- a/dev/Usr/LibGUI/.keep
+++ /dev/null
diff --git a/dev/Usr/LibLocale/.keep b/dev/Usr/LibLocale/.keep
deleted file mode 100644
index e69de29b..00000000
--- a/dev/Usr/LibLocale/.keep
+++ /dev/null
diff --git a/dev/Usr/LibWM/WindowConnection.h b/dev/Usr/LibWM/WindowConnection.h
deleted file mode 100644
index 22938130..00000000
--- a/dev/Usr/LibWM/WindowConnection.h
+++ /dev/null
@@ -1,31 +0,0 @@
-
-/* -------------------------------------------
-
- Copyright (C) 2025, Amlal EL Mahrouss, all rights reserved.
-
-------------------------------------------- */
-
-#pragma once
-
-#include <LibCF/Object.h>
-#include <LibCF/Array.h>
-
-namespace LibCF
-{
- class CFWindowConnection_;
-
- class CFWindowConnection_ CF_OBJECT
- {
- public:
- explicit CFWindowConnection_() = default;
- virtual ~CFWindowConnection_() = default;
-
- SCI_COPY_DEFAULT(CFWindowConnection_);
-
- constexpr static SInt16 kMaxPeers = 16;
-
- Char mConnName[256] = {0};
- SInt32 mConnPeersCnt{0};
- CFArray<VoidPtr, kMaxPeers> mConnPeers;
- };
-} // namespace LibCF \ No newline at end of file