From 28631e2b202e661084039464f45228b9ce323a8f Mon Sep 17 00:00:00 2001 From: David Robillard Date: Sat, 7 Jan 2023 19:27:00 -0500 Subject: Replace visible flag with a more descriptive view "stage" --- src/types.h | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'src/types.h') diff --git a/src/types.h b/src/types.h index dc2e29f..28d8548 100644 --- a/src/types.h +++ b/src/types.h @@ -33,6 +33,14 @@ typedef struct { size_t len; ///< Length of data in bytes } PuglBlob; +/// Stage of a view along its lifespan +typedef enum { + PUGL_VIEW_STAGE_ALLOCATED, + PUGL_VIEW_STAGE_CREATED, + PUGL_VIEW_STAGE_CONFIGURED, + PUGL_VIEW_STAGE_MAPPED, +} PuglViewStage; + /// Cross-platform view definition struct PuglViewImpl { PuglWorld* world; @@ -47,7 +55,7 @@ struct PuglViewImpl { PuglConfigureEvent lastConfigure; PuglHints hints; PuglViewSize sizeHints[PUGL_NUM_SIZE_HINTS]; - bool visible; + PuglViewStage stage; }; /// Cross-platform world definition -- cgit v1.2.1