diff options
| author | Amlal El Mahrouss <amlal.elmahrouss@icloud.com> | 2024-06-21 05:55:02 +0200 |
|---|---|---|
| committer | Amlal El Mahrouss <amlal.elmahrouss@icloud.com> | 2024-06-21 05:56:26 +0200 |
| commit | f3432c10bd694344f7e1f82ed8cd793358f1a400 (patch) | |
| tree | b2ac11c9c1378cb24e046185b6d2eeb1b0e16e98 /Comm | |
| parent | 3a11be8c6f15cb03b483e2693bcd244846c6d61d (diff) | |
IMP: protect other computers which doesnt support EPM layout (AMD64)
IMP: Add LTE builtin and NetworkDevice of type LTE.
UPDATE: Also updated ReadMe.
Signed-off-by: Amlal El Mahrouss <amlal.elmahrouss@icloud.com>
Diffstat (limited to 'Comm')
| -rw-r--r-- | Comm/newstd.hxx | 73 |
1 files changed, 69 insertions, 4 deletions
diff --git a/Comm/newstd.hxx b/Comm/newstd.hxx index 9bf690cd..57ffc756 100644 --- a/Comm/newstd.hxx +++ b/Comm/newstd.hxx @@ -14,16 +14,81 @@ #endif // __KERNEL__
class NUser; /// @brief User application class.
-class NCallback; /// @brief User callback class.
+class NWindow; /// @brief Window class.
+class NWindowAlert;
#define IMPORT_CXX extern "C++"
#define IMPORT_C extern "C"
/**
-@brief a class which helps the user do application I/O.
+@brief Class which exposes the app I/O.
*/
-class NUser
+class NUser final
{
public:
+ /// THOSE REQUIRES PERMISSIONS FROM THE USER. ///
-};
\ No newline at end of file + static void Poweroff();
+ static void Reboot();
+
+ /// THOSE REQUIRES PERMISSIONS FROM THE USER. ///
+
+ static bool IsWokeup();
+ static void Terminate();
+
+ /// THOSE DOESNT REQUIRE PERMISSIONS FROM THE USER. ///
+
+ static bool Exit(int code);
+ static void* New(long long sz);
+ static void Delete(void* ptr);
+
+ /// THOSE MAY REQUIRE PERMISSIONS FROM THE USER. ///
+
+ static int Open(const char* path);
+ static void Close(int fd);
+ static void Execute(const char* command);
+ static void* Read(const char* forkName, int fd);
+ static void* Write(const char* forkName, int fd);
+};
+
+typedef void(*NWindowCallback)(NWindow*);
+
+/**
+@brief Class which exposes the app UI API.
+*/
+class NWindowAlert
+{
+public:
+ virtual NWindowAlert* Alert(const char* message, const char* title) = 0;
+ virtual NWindowAlert* Prompt(const char* message, const char* title) = 0;
+
+ virtual NWindowAlert* Collect(const char* resultBuf, long resultBufSz) = 0;
+
+public:
+ bool fAsyncOperationMode;
+ NWindowCallback fAsyncOnComplete;
+
+};
+
+class NWindow
+{
+public:
+ virtual NWindow* New(const char* pageName) = 0;
+ virtual NWindow* Ref(NWindow* pagee) = 0;
+
+ virtual NWindow* Button(const char* text, NWindowCallback onClick = nullptr,
+ NWindowCallback onDblClick = nullptr) = 0;
+
+ virtual NWindow* Checkbox(const char* text, NWindowCallback onSelect = nullptr,
+ NWindowCallback onUnselect = nullptr) = 0;
+
+ virtual NWindow* Radio(const char* text, NWindowCallback onSelect = nullptr,
+ NWindowCallback onUnselect = nullptr) = 0;
+
+ virtual NWindow* Link(const char* where, const char* textIfAny = "", NWindowCallback onClick = nullptr,
+ NWindowCallback onHover = nullptr) = 0;
+
+public:
+ bool fEnabled;
+
+};
|
