[rcore] add process execution functions for posix systems

This commit is contained in:
moe li 2026-04-29 19:28:48 +08:00
commit 24b36efbdc
2 changed files with 166 additions and 0 deletions

View file

@ -961,6 +961,12 @@ typedef enum {
NPATCH_THREE_PATCH_HORIZONTAL // Npatch layout: 3x1 tiles
} NPatchLayout;
// Process info
typedef struct Process {
int pid; // Process unique identifier
int exitCode; // Process exit code
} Process;
// Callbacks to hook some internal functions
// WARNING: These callbacks are intended for advanced users
typedef void (*TraceLogCallback)(int logLevel, const char *text, va_list args); // Logging: Redirect trace log messages
@ -1241,6 +1247,13 @@ RLAPI Vector2 GetTouchPosition(int index); // Get touch posit
RLAPI int GetTouchPointId(int index); // Get touch point identifier for given index
RLAPI int GetTouchPointCount(void); // Get number of touch points
// Process execution functions
RLAPI Process InitProcess(const char *command, char *const args[]); // Initialize a new process, returns a Process struct
RLAPI bool CheckProcess(Process *process); // Check if a process is still running, updates Process struct
RLAPI void PauseProcess(Process *process); // Pause process execution
RLAPI void ResumeProcess(Process *process); // Resume paused process execution
RLAPI void CloseProcess(Process *process); // Close process and free resources
//------------------------------------------------------------------------------------
// Gestures and Touch Handling Functions (Module: rgestures)
//------------------------------------------------------------------------------------