From 646af656d4094d44ad0fed615429cb8585db5724 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Sun, 8 Mar 2020 17:47:10 +0100 Subject: Add a user data handle to the world --- pugl/detail/implementation.c | 12 ++++++++++++ pugl/detail/types.h | 1 + 2 files changed, 13 insertions(+) (limited to 'pugl/detail') diff --git a/pugl/detail/implementation.c b/pugl/detail/implementation.c index 83f63ae..d3b47df 100644 --- a/pugl/detail/implementation.c +++ b/pugl/detail/implementation.c @@ -112,6 +112,18 @@ puglFreeWorld(PuglWorld* const world) free(world); } +void +puglSetWorldHandle(PuglWorld* world, PuglWorldHandle handle) +{ + world->handle = handle; +} + +PuglWorldHandle +puglGetWorldHandle(PuglWorld* world) +{ + return world->handle; +} + PuglStatus puglSetClassName(PuglWorld* const world, const char* const name) { diff --git a/pugl/detail/types.h b/pugl/detail/types.h index 656c34d..d229848 100644 --- a/pugl/detail/types.h +++ b/pugl/detail/types.h @@ -76,6 +76,7 @@ struct PuglViewImpl { /** Cross-platform world definition. */ struct PuglWorldImpl { PuglWorldInternals* impl; + PuglWorldHandle handle; char* className; double startTime; size_t numViews; -- cgit v1.2.1