From 7f2987db18e515aec099a281fb4499fad8ffd4e0 Mon Sep 17 00:00:00 2001 From: 3gg <3gg@shellblade.net> Date: Sun, 8 Mar 2026 10:02:09 -0700 Subject: More concise headers --- include/ui.h | 50 ++++++++++---------------------------------------- 1 file changed, 10 insertions(+), 40 deletions(-) (limited to 'include') diff --git a/include/ui.h b/include/ui.h index 8570552..d8df105 100644 --- a/include/ui.h +++ b/include/ui.h @@ -139,12 +139,7 @@ typedef struct uiWidgetEvent { // ----------------------------------------------------------------------------- // Library. -/// Initialize the UI library. -/// This should be called once during application startup. bool uiInit(void); - -/// Shutdown the UI library. -/// This should be called once during application shutdown. void uiShutdown(void); // ----------------------------------------------------------------------------- @@ -164,65 +159,40 @@ uiTable* uiGetTablePtr(uiPtr ptr); // Widget. uiWidgetType uiWidgetGetType(const uiWidget*); - -void uiWidgetSetParent(uiPtr child, uiPtr parent); +void uiWidgetSetParent(uiPtr child, uiPtr parent); // ----------------------------------------------------------------------------- // Button. -/// Create a button. uiButton* uiMakeButton(const char* text); // ----------------------------------------------------------------------------- // Frame. -/// Create a frame. uiFrame* uiMakeFrame(void); - -/// Destroy the frame. -void uiDestroyFrame(uiFrame**); - -/// Resize the frame. -void uiResizeFrame(uiFrame*, int width, int height); - -/// Get the frame's dimensions. -uiSize uiGetFrameSize(const uiFrame*); +void uiDestroyFrame(uiFrame**); +void uiResizeFrame(uiFrame*, int width, int height); +uiSize uiGetFrameSize(const uiFrame*); // ----------------------------------------------------------------------------- // Label. -/// Create a label. -uiLabel* uiMakeLabel(const char* text); - -/// Return the label's text. +uiLabel* uiMakeLabel(const char* text); const char* uiLabelGetText(const uiLabel*); // ----------------------------------------------------------------------------- // Table. -/// Create a table. -uiTable* uiMakeTable(int rows, int cols, const char** header); - -/// Clear the table. -/// This clears the contents, but not the header. -void uiTableClear(uiTable*); - -/// Add a row. -void uiTableAddRow(uiTable*, const char** row); - -/// Set the table's cell. -void uiTableSet(uiTable*, int row, int col, uiPtr widget); - -/// Get the table's cell. +uiTable* uiMakeTable(int rows, int cols, const char** header); +void uiTableClear(uiTable*); +void uiTableAddRow(uiTable*, const char** row); +void uiTableSet(uiTable*, int row, int col, uiPtr widget); const uiWidget* uiTableGet(const uiTable*, int row, int col); - -/// Get the table's cell. -uiWidget* uiTableGetMut(uiTable*, int row, int col); +uiWidget* uiTableGetMut(uiTable*, int row, int col); // ----------------------------------------------------------------------------- // Rendering. -/// Render the frame. void uiRender(const uiFrame*, uiSurface*); // ----------------------------------------------------------------------------- -- cgit v1.2.3