From 77740bb4e451500957e7f27348d25456903dc60a Mon Sep 17 00:00:00 2001 From: Amlal El Mahrouss Date: Sun, 22 Mar 2026 16:39:18 +0100 Subject: [FEAT] libX11: Working on the X11ConnMgr to manage clients connection for a X11 server. Signed-off-by: Amlal El Mahrouss --- compile_flags.txt | 3 ++- doc/requirements/__ne_arch.md | 2 +- frameworks/libX11.fwrk/headers/Config.h | 11 +++++++++++ frameworks/libX11.fwrk/headers/Foundation.h | 11 ----------- frameworks/libX11.fwrk/src/X11ConnMgr.cpp | 21 +++++++++++++++++++++ frameworks/libX11.fwrk/src/X11Connection.cpp | 7 ------- 6 files changed, 35 insertions(+), 20 deletions(-) create mode 100644 frameworks/libX11.fwrk/headers/Config.h delete mode 100644 frameworks/libX11.fwrk/headers/Foundation.h create mode 100644 frameworks/libX11.fwrk/src/X11ConnMgr.cpp delete mode 100644 frameworks/libX11.fwrk/src/X11Connection.cpp diff --git a/compile_flags.txt b/compile_flags.txt index 7e05658..21f1772 100644 --- a/compile_flags.txt +++ b/compile_flags.txt @@ -11,4 +11,5 @@ -Isrc/nectar/src -I/opt/homebrew/Cellar/boost/1.90.0/include -Iinclude/ --D__NEOSKRNL__ \ No newline at end of file +-D__NEOSKRNL__ +-D__nekernel_halkit_include_processor="" \ No newline at end of file diff --git a/doc/requirements/__ne_arch.md b/doc/requirements/__ne_arch.md index 2b5817c..1fb45e2 100644 --- a/doc/requirements/__ne_arch.md +++ b/doc/requirements/__ne_arch.md @@ -2,7 +2,7 @@ ## Abstract: -`__ne_arch` takes care of reporting NeSystem's running ISA+Computer_Architecture. In other words a platform. +The `__ne_arch` macro takes care of reporting NeSystem's running ISA+Computer_Architecture. In other words a platform. You use this for platform specific code. Recommended for C/C++ programs, JVM and VM based languages should not rely on this macro. diff --git a/frameworks/libX11.fwrk/headers/Config.h b/frameworks/libX11.fwrk/headers/Config.h new file mode 100644 index 0000000..7056070 --- /dev/null +++ b/frameworks/libX11.fwrk/headers/Config.h @@ -0,0 +1,11 @@ +// SPDX-License-Identifier: Apache-2.0 +// Copyright 2026, Amlal El Mahrouss (amlal@nekernel.org) +// Licensed under the Apache License, Version 2.0 (see LICENSE file) +// Official repository: https://github.com/ne-foss-org/ne_system + +#ifndef X11_FOUNDATION_H +#define X11_FOUNDATION_H + +#include + +#endif diff --git a/frameworks/libX11.fwrk/headers/Foundation.h b/frameworks/libX11.fwrk/headers/Foundation.h deleted file mode 100644 index ab06dcd..0000000 --- a/frameworks/libX11.fwrk/headers/Foundation.h +++ /dev/null @@ -1,11 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 -// Copyright 2026, Amlal El Mahrouss (amlal@nekernel.org) -// Licensed under the Apache License, Version 2.0 (see LICENSE file) -// Official repository: https://github.com/ne-foss-org/ne_system - -#ifndef X11_FOUNDATION_H -#define X11_FOUNDATION_H - -#include - -#endif diff --git a/frameworks/libX11.fwrk/src/X11ConnMgr.cpp b/frameworks/libX11.fwrk/src/X11ConnMgr.cpp new file mode 100644 index 0000000..4d3d61a --- /dev/null +++ b/frameworks/libX11.fwrk/src/X11ConnMgr.cpp @@ -0,0 +1,21 @@ +// SPDX-License-Identifier: Apache-2.0 +// Copyright 2026, Amlal El Mahrouss (amlal@nekernel.org) +// Licensed under the Apache License, Version 2.0 (see LICENSE file) +// Official repository: https://github.com/ne-foss-org/ne_system + +#include +#include +#include + +#define X11_ARRAY_CHECK(PTR) PTR != nullptr +#define X11_ARRAY_INDEX(ARR, PTR, LEN) ARR[((SInt64)PTR) % LEN] + +struct X11Connection final { + SInt32 fSocket; + SInt32 fType; + SInt32 fFlags; + SInt32 fPad; +}; + +typedef X11Connection* X11ConnectionPtr; +typedef X11ConnectionPtr* X11ConnectionArray; diff --git a/frameworks/libX11.fwrk/src/X11Connection.cpp b/frameworks/libX11.fwrk/src/X11Connection.cpp deleted file mode 100644 index ad4f054..0000000 --- a/frameworks/libX11.fwrk/src/X11Connection.cpp +++ /dev/null @@ -1,7 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 -// Copyright 2026, Amlal El Mahrouss (amlal@nekernel.org) -// Licensed under the Apache License, Version 2.0 (see LICENSE file) -// Official repository: https://github.com/ne-foss-org/ne_system - -#include - -- cgit v1.2.3