summaryrefslogtreecommitdiffhomepage
path: root/Comm/newstd.hxx
diff options
context:
space:
mode:
Diffstat (limited to 'Comm/newstd.hxx')
-rw-r--r--Comm/newstd.hxx119
1 files changed, 56 insertions, 63 deletions
diff --git a/Comm/newstd.hxx b/Comm/newstd.hxx
index d7665c78..7362f8e9 100644
--- a/Comm/newstd.hxx
+++ b/Comm/newstd.hxx
@@ -14,33 +14,33 @@ Purpose: NewOS standard interface.
#endif // __KERNEL__
#define ML_IMPORT_CXX extern "C++"
-#define ML_IMPORT_C extern "C"
+#define ML_IMPORT_C extern "C"
#define cRestrictR "r"
#define cRestrictRB "rb"
#define cRestrictW "w"
#define cRestrictRW "rw"
-class NUser; /// @brief User application class.
-class NWindow; /// @brief Window class.
+class NUser; /// @brief User application class.
+class NWindow; /// @brief Window class.
class NWindowAlert; /// @brief Window alert object
-class NURL; /// @brief URL object.
+class NURL; /// @brief URL object.
-typedef void(*NWindowCallback)(NWindow*);
+typedef void (*NWindowCallback)(NWindow*);
-typedef int OSType;
+typedef int OSType;
typedef bool Bool;
typedef void UInt0;
typedef __UINT64_TYPE__ UInt64;
typedef __UINT32_TYPE__ UInt32;
typedef __UINT16_TYPE__ UInt16;
-typedef __UINT8_TYPE__ UInt8;
+typedef __UINT8_TYPE__ UInt8;
typedef __INT64_TYPE__ SInt64;
typedef __INT32_TYPE__ SInt32;
typedef __INT16_TYPE__ SInt16;
-typedef __INT8_TYPE__ SInt8;
+typedef __INT8_TYPE__ SInt8;
/**
@brief Standard library class.
@@ -48,30 +48,30 @@ typedef __INT8_TYPE__ SInt8;
class NUser final
{
public:
- // THOSE REQUIRES PERMISSIONS FROM THE USER. ///
+ // THOSE REQUIRES PERMISSIONS FROM THE USER. ///
- static UInt0 Poweroff();
- static UInt0 Reboot();
- static Bool IsWokeup();
+ static UInt0 Poweroff();
+ static UInt0 Reboot();
+ static Bool IsWokeup();
- // THOSE DOESNT REQUIRE PERMISSIONS FROM THE USER. ///
+ // THOSE DOESNT REQUIRE PERMISSIONS FROM THE USER. ///
- static UInt0 Terminate();
- static Bool Exit(OSType code);
- static UInt0* New(long long sz);
- static UInt0 Delete(void* ptr);
+ static UInt0 Terminate();
+ static Bool Exit(OSType code);
+ static UInt0* New(long long sz);
+ static UInt0 Delete(void* ptr);
- // ASK FOR ELEVATION ///
+ // ASK FOR ELEVATION ///
- static Bool RaiseUAC();
+ static Bool RaiseUAC();
- // THOSE MAY REQUIRE PERMISSIONS FROM THE USER. ///
+ // THOSE MAY REQUIRE PERMISSIONS FROM THE USER. ///
- static OSType Open(const char* path);
- static UInt0 Close(OSType fd);
- static NURL* Execute(const NURL* command);
- static UInt0* Read(const char* forkName, OSType fd);
- static UInt0* Write(const char* forkName, OSType fd);
+ static OSType Open(const char* path);
+ static UInt0 Close(OSType fd);
+ static NURL* Execute(const NURL* command);
+ static UInt0* Read(const char* forkName, OSType fd);
+ static UInt0* Write(const char* forkName, OSType fd);
};
/**
@@ -80,61 +80,55 @@ public:
class NWindowAlert
{
public:
- explicit NWindowAlert() = default;
- virtual ~NWindowAlert() = default;
+ explicit NWindowAlert() = default;
+ virtual ~NWindowAlert() = default;
public:
- /// @brief Opens an alert dialog.
- virtual NWindowAlert* Alert(const char* message, const char* title) = 0;
+ /// @brief Opens an alert dialog.
+ virtual NWindowAlert* Alert(const char* message, const char* title) = 0;
- /// @brief Makes a prompt dialog.
- virtual NWindowAlert* Prompt(const char* message, const char* title) = 0;
+ /// @brief Makes a prompt dialog.
+ virtual NWindowAlert* Prompt(const char* message, const char* title) = 0;
- /// @brief Makes a prompt notification dialog.
- virtual NWindowAlert* PromptNotification(const char* message, const char* title) = 0;
+ /// @brief Makes a prompt notification dialog.
+ virtual NWindowAlert* PromptNotification(const char* message, const char* title) = 0;
- /// @brief Makes a notification dialog.
- virtual NWindowAlert* Notification(const char* message, const char* title) = 0;
+ /// @brief Makes a notification dialog.
+ virtual NWindowAlert* Notification(const char* message, const char* title) = 0;
- /// Collect result of prompt/notification.
- virtual NWindowAlert* Collect(const char* resultBuf, long resultBufSz) = 0;
+ /// Collect result of prompt/notification.
+ virtual NWindowAlert* Collect(const char* resultBuf, long resultBufSz) = 0;
public:
- Bool fAsyncOperationMode;
- NWindowCallback fAsyncOnComplete;
-
+ Bool fAsyncOperationMode;
+ NWindowCallback fAsyncOnComplete;
};
/// @brief Window object.
class NWindow
{
public:
- explicit NWindow() = default;
- virtual ~NWindow() = default;
+ explicit NWindow() = default;
+ virtual ~NWindow() = default;
public:
- virtual NWindow* New(const char* pageName) = 0;
+ virtual NWindow* New(const char* pageName) = 0;
- virtual NWindow* Ref(NWindow* pagee) = 0;
+ virtual NWindow* Ref(NWindow* pagee) = 0;
- virtual NWindow* Text(const char* text) = 0;
+ virtual NWindow* Text(const char* text) = 0;
- virtual NWindow* Button(const char* text, NWindowCallback onClick = nullptr,
- NWindowCallback onDblClick = nullptr) = 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* 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* 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;
+ virtual NWindow* Link(const char* where, const char* textIfAny = "", NWindowCallback onClick = nullptr, NWindowCallback onHover = nullptr) = 0;
public:
- Bool fWindowEnabled;
- void* fWindowDataPtr;
-
+ Bool fWindowEnabled;
+ void* fWindowDataPtr;
};
/**
@@ -143,15 +137,14 @@ This class contains an URL
class NURL
{
public:
- explicit NURL() = default;
- virtual ~NURL() = default;
+ explicit NURL() = default;
+ virtual ~NURL() = default;
public:
- virtual NURL* Navigate(const char* url) = 0;
- virtual NURL* Protocol(const char* protocol) = 0;
+ virtual NURL* Navigate(const char* url) = 0;
+ virtual NURL* Protocol(const char* protocol) = 0;
public:
- char* fBufferPtr;
- long fBufferLen;
-
+ char* fBufferPtr;
+ long fBufferLen;
};