summaryrefslogtreecommitdiffhomepage
path: root/Public/Developer/System.Core/Headers
diff options
context:
space:
mode:
Diffstat (limited to 'Public/Developer/System.Core/Headers')
-rw-r--r--Public/Developer/System.Core/Headers/Defines.h (renamed from Public/Developer/System.Core/Headers/Defines.hxx)4
-rw-r--r--Public/Developer/System.Core/Headers/Dialog.h (renamed from Public/Developer/System.Core/Headers/Dialog.hxx)4
-rw-r--r--Public/Developer/System.Core/Headers/File.h (renamed from Public/Developer/System.Core/Headers/FS.hxx)4
-rw-r--r--Public/Developer/System.Core/Headers/Heap.h (renamed from Public/Developer/System.Core/Headers/Heap.hxx)2
-rw-r--r--Public/Developer/System.Core/Headers/Hint.h (renamed from Public/Developer/System.Core/Headers/Hint.hxx)0
-rw-r--r--Public/Developer/System.Core/Headers/Thread.h (renamed from Public/Developer/System.Core/Headers/Thread.hxx)17
-rw-r--r--Public/Developer/System.Core/Headers/TrueType.h (renamed from Public/Developer/System.Core/Headers/TrueType.hxx)7
-rw-r--r--Public/Developer/System.Core/Headers/Window.h (renamed from Public/Developer/System.Core/Headers/Window.hxx)39
8 files changed, 45 insertions, 32 deletions
diff --git a/Public/Developer/System.Core/Headers/Defines.hxx b/Public/Developer/System.Core/Headers/Defines.h
index 64b1295e..612f0462 100644
--- a/Public/Developer/System.Core/Headers/Defines.hxx
+++ b/Public/Developer/System.Core/Headers/Defines.h
@@ -130,8 +130,8 @@ enum RtProcessCall {
kProcessCallsCount = 7,
};
-#include <System.Core/Headers/Hint.hxx>
-#include <System.Core/Headers/Dialog.hxx>
+#include <System.Core/Headers/Hint.h>
+#include <System.Core/Headers/Dialog.h>
enum {
kObjectTypeProcess,
diff --git a/Public/Developer/System.Core/Headers/Dialog.hxx b/Public/Developer/System.Core/Headers/Dialog.h
index 0faaae67..9d4521cf 100644
--- a/Public/Developer/System.Core/Headers/Dialog.hxx
+++ b/Public/Developer/System.Core/Headers/Dialog.h
@@ -6,11 +6,11 @@
#pragma once
-#include <System.Core/Headers/Window.hxx>
+#include <System.Core/Headers/Window.h>
/// @brief Shows an message box with a formatting.
/// @param title the message box title
/// @param format the format
/// @param va_list the va args, that goes along with it.
-/// @return void
+/// @return void this function returns nothing.
CA_EXTERN_C VoidType DlgMsgBox(CharacterTypeUTF8* title, CharacterTypeUTF8* format, ...);
diff --git a/Public/Developer/System.Core/Headers/FS.hxx b/Public/Developer/System.Core/Headers/File.h
index 62ed1255..bd1d8d3f 100644
--- a/Public/Developer/System.Core/Headers/FS.hxx
+++ b/Public/Developer/System.Core/Headers/File.h
@@ -5,3 +5,7 @@
------------------------------------------- */
#pragma once
+
+#include <System.Core/Headers/Defines.h>
+
+/// @brief Filesystem wrapper.
diff --git a/Public/Developer/System.Core/Headers/Heap.hxx b/Public/Developer/System.Core/Headers/Heap.h
index c6252c04..90f15aa5 100644
--- a/Public/Developer/System.Core/Headers/Heap.hxx
+++ b/Public/Developer/System.Core/Headers/Heap.h
@@ -6,7 +6,7 @@
#pragma once
-#include <System.Core/Headers/Defines.hxx>
+#include <System.Core/Headers/Defines.h>
#define kAllocationTypes 2
diff --git a/Public/Developer/System.Core/Headers/Hint.hxx b/Public/Developer/System.Core/Headers/Hint.h
index 86faf455..86faf455 100644
--- a/Public/Developer/System.Core/Headers/Hint.hxx
+++ b/Public/Developer/System.Core/Headers/Hint.h
diff --git a/Public/Developer/System.Core/Headers/Thread.hxx b/Public/Developer/System.Core/Headers/Thread.h
index 6118ea21..7d2bfe3c 100644
--- a/Public/Developer/System.Core/Headers/Thread.hxx
+++ b/Public/Developer/System.Core/Headers/Thread.h
@@ -8,10 +8,10 @@
// Created by Amlal on 3/18/24
//
-#ifndef __THREAD_API__
-#define __THREAD_API__
+#ifndef __THREAD__
+#define __THREAD__
-#include <System.Core/Headers/Defines.hxx>
+#include <System.Core/Headers/Defines.h>
#define kThreadErrorExit -33
@@ -31,8 +31,13 @@ typedef VoidType(*ThreadEntrypointKind)(VoidType);
CA_EXTERN_C ThreadRef TmCreateThread(const CharacterTypeUTF8* threadName, ThreadEntrypointKind threadStart);
/// @brief Dispoes the thread, and exits with code kThreadErrorExit
-/// @param ref
-/// @return
+/// @param ref the thread reference.
+/// @return nothing.
CA_EXTERN_C VoidType TmDisposeThread(ThreadRef ref);
-#endif // __THREAD_API__
+/// @brief Waits for the thread to complete.
+/// @param ref the thread reference.
+/// @return nothing.
+CA_EXTERN_C VoidType TmWaitForCompletion(ThreadRef ref);
+
+#endif // __THREAD__
diff --git a/Public/Developer/System.Core/Headers/TrueType.hxx b/Public/Developer/System.Core/Headers/TrueType.h
index 185bbc78..5ad9d7a7 100644
--- a/Public/Developer/System.Core/Headers/TrueType.hxx
+++ b/Public/Developer/System.Core/Headers/TrueType.h
@@ -6,12 +6,12 @@
#pragma once
-#include <System.Core/Headers/Window.hxx>
+#include <System.Core/Headers/Window.h>
/*************************************************************
*
* File: TrueType.hxx
- * Purpose: TrueType font implementation for System Software.
+ * Purpose: TrueType font implementation for HCore.
* Date: 3/26/24
*
* Copyright Mahrouss Logic, all rights reserved.
@@ -28,4 +28,5 @@ CA_EXTERN_C TTFFontRef FnCreateFont(const char* name);
/// @brief Dispose an allocated font.
/// @param fon
/// @return
-CA_EXTERN_C VoidType FnDisposeFont(TTFFontRef fon); \ No newline at end of file
+CA_EXTERN_C VoidType FnDisposeFont(TTFFontRef fon);
+
diff --git a/Public/Developer/System.Core/Headers/Window.hxx b/Public/Developer/System.Core/Headers/Window.h
index 39d5eb47..121ac502 100644
--- a/Public/Developer/System.Core/Headers/Window.hxx
+++ b/Public/Developer/System.Core/Headers/Window.h
@@ -6,20 +6,20 @@
#pragma once
-#include <System.Core/Headers/Defines.hxx>
+#include <System.Core/Headers/Defines.h>
/*************************************************************
*
* File: Window.hxx
- * Purpose: Window Manager implementation for System Software.
+ * Purpose: Window Manager API for HCore.
* Date: 3/26/24
*
* Copyright Mahrouss Logic, all rights reserved.
*
*************************************************************/
-struct _GraphicsPoint;
-struct _GraphicsPort;
+struct _WmPoint;
+struct _WindowPort;
#ifdef __SINGLE_PRECISION__
typedef float PositionType;
@@ -27,13 +27,15 @@ typedef float PositionType;
typedef double PositionType;
#endif
+typedef QWordType DCRef;
+
/// @brief A point, can represent the size, position of a window.
-typedef struct _GraphicsPoint {
+typedef struct _WmPoint {
PositionType X, Y;
-} GraphicsPoint;
+} WmPoint;
-/// @brief Tracker Graphics port.
-typedef struct _GraphicsPort {
+/// @brief Window port type, can be used to control the window.
+typedef struct _WindowPort {
WordType windowPort;
WordType windowKind;
BooleanType windowVisible;
@@ -42,13 +44,14 @@ typedef struct _GraphicsPort {
BooleanType windowMoving;
BooleanType windowDisableClose;
BooleanType windowDisableMinimize;
- GraphicsPoint windowPosition;
- GraphicsPoint windowSize;
+ WmPoint windowPosition;
+ WmPoint windowSize;
BooleanType windowInvalidate;
DWordType windowClearColor;
WordType menuPort;
WordType parentPort;
-} GraphicsPort;
+ DCRef windowDeviceContext;
+} WindowPort;
typedef UInt32Type ColorRef;
@@ -90,11 +93,11 @@ CA_EXTERN_C ControlRef WmCreateControl(const DWordType id);
/// @return
CA_EXTERN_C VoidType WmReleaseControl(const ControlRef id);
-/// @brief Moves a control inside a GraphicsPort.
+/// @brief Moves a control inside a WindowPort.
/// @param id the control ref.
/// @param where where to move at.
/// @return
-CA_EXTERN_C Int32Type WmSetControlPosition(const ControlRef id, GraphicsPoint where);
+CA_EXTERN_C Int32Type WmSetControlPosition(const ControlRef id, WmPoint where);
/// @brief Enable control.
/// @param id
@@ -112,29 +115,29 @@ CA_EXTERN_C Int32Type WmMakeControlVisible(const ControlRef id, BooleanType visi
/// @param name the window name
/// @param rsrcId the window fork rsrc id.
/// @return the window graphics port.
-CA_EXTERN_C GraphicsPort* WmCreateWindow(const char* name, const DWordType rsrcId);
+CA_EXTERN_C WindowPort* WmCreateWindow(const char* name, const DWordType rsrcId);
/// @brief Creates a new menu
/// @param name the menu's name
/// @param rsrcId the menu fork rsrc id.
/// @return the menu graphics port.
-CA_EXTERN_C GraphicsPort* WmCreateMenu(const char* name, const DWordType rsrcId);
+CA_EXTERN_C WindowPort* WmCreateMenu(const char* name, const DWordType rsrcId);
/// @brief Releases the window.
/// @param port the window port.
/// @return void
-CA_EXTERN_C VoidType WmReleaseWindow(GraphicsPort* port);
+CA_EXTERN_C VoidType WmReleaseWindow(WindowPort* port);
/// @brief Releases the menu
/// @param port the menu port.
/// @return void
-CA_EXTERN_C VoidType WmReleaseMenu(GraphicsPort* port);
+CA_EXTERN_C VoidType WmReleaseMenu(WindowPort* port);
/// @brief Moves a window on the desktop. (menu arent movable, will return kErrIncompatible is menu is provided.)
/// @param id the gfx port.
/// @param where to move.
/// @return error code.
-CA_EXTERN_C Int32Type WmMoveWindow(const GraphicsPort* id, GraphicsPoint where);
+CA_EXTERN_C Int32Type WmMoveWindow(const WindowPort* id, WmPoint where);
enum {
kWmErrIncompatible = 0x74,