summaryrefslogtreecommitdiffhomepage
path: root/frameworks/libX11.fwrk/src
diff options
context:
space:
mode:
authorAmlal El Mahrouss <amlal@nekernel.org>2026-03-23 01:11:36 +0100
committerAmlal El Mahrouss <amlal@nekernel.org>2026-03-23 01:11:36 +0100
commit6a8d1d5fb1a685d9eba93d100af673053ab68860 (patch)
tree9208011acc6f7453e52e2e9eb59970b0f9a10641 /frameworks/libX11.fwrk/src
parent5c15e4939723513bab37bfca01ad879b6e353808 (diff)
[FEAT] Improved installation flow and X11 library.
Signed-off-by: Amlal El Mahrouss <amlal@nekernel.org>
Diffstat (limited to 'frameworks/libX11.fwrk/src')
-rw-r--r--frameworks/libX11.fwrk/src/.gitkeep0
-rw-r--r--frameworks/libX11.fwrk/src/X11ConnMgr.cpp34
2 files changed, 12 insertions, 22 deletions
diff --git a/frameworks/libX11.fwrk/src/.gitkeep b/frameworks/libX11.fwrk/src/.gitkeep
deleted file mode 100644
index e69de29..0000000
--- a/frameworks/libX11.fwrk/src/.gitkeep
+++ /dev/null
diff --git a/frameworks/libX11.fwrk/src/X11ConnMgr.cpp b/frameworks/libX11.fwrk/src/X11ConnMgr.cpp
index 7477a19..61752f1 100644
--- a/frameworks/libX11.fwrk/src/X11ConnMgr.cpp
+++ b/frameworks/libX11.fwrk/src/X11ConnMgr.cpp
@@ -3,36 +3,26 @@
// Licensed under the Apache License, Version 2.0 (see LICENSE file)
// Official repository: https://github.com/ne-foss-org/ne_system
-#include <libSystem/SystemKit/System.h>
#include <libX11.fwrk/headers/Config.h>
-#define X11_ARRAY_CHECK(PTR) PTR != nullptr
-#define X11_ARRAY_INDEX(ARR, PTR, LEN) ARR[((SInt64) PTR) % LEN]
-
namespace X11 {
-struct X11Connection final {
- SInt32 fSocket;
- SInt32 fType;
- SInt32 fFlags;
- SInt32 fPad;
-};
+namespace Detail {
-typedef X11Connection* X11ConnectionPtr;
-typedef X11ConnectionPtr* X11ConnectionArray;
+ static X11ConnectionPtr X11MakeConnection() {
+ auto ptr = new X11Connection{};
+ if (!ptr) return nullptr;
-static X11ConnectionPtr X11MakeConnection() {
- auto ptr = new X11Connection{};
- if (!ptr) return nullptr;
+ return ptr;
+ }
- return ptr;
-}
+ static Void X11DeleteConnection(X11ConnectionPtr ptr) {
+ if (!ptr) return;
-static Void X11DeleteConnection(X11ConnectionPtr ptr) {
- if (!ptr) return;
+ delete ptr;
+ ptr = nullptr;
+ }
- delete ptr;
- ptr = nullptr;
-}
+} // namespace Detail
} // namespace X11 \ No newline at end of file