38 return "Unknown error";
65 free(
world->className);
73 world->handle = handle;
92 return world->className;
149 for (
size_t i = 0;
i <
world->numViews; ++
i) {
150 if (
world->views[
i] == view) {
151 if (
i ==
world->numViews - 1) {
CAdPlugDatabase::CRecord::RecordType type
Definition adplugdb.cpp:93
static void puglSetDefaultHints(PuglHints hints)
Definition common.c:96
register unsigned i
Definition inflate.c:1575
static PuglViewHint int value
Definition pugl.h:1708
static PuglViewHint hint
Definition pugl.h:1707
static const PuglBackend * backend
Definition pugl.h:1732
static const char * name
Definition pugl.h:1582
static uintptr_t parent
Definition pugl.h:1644
@ PUGL_DESTROY
View destroyed, a PuglDestroyEvent.
Definition pugl.h:182
PuglRect puglGetFrame(const PuglView *view)
Definition common.c:233
void * puglGetContext(PuglView *view)
Definition common.c:270
PuglStatus puglSetBackend(PuglView *view, const PuglBackend *backend)
Definition common.c:187
PuglHandle puglGetHandle(PuglView *view)
Get the user data for a view.
Definition common.c:181
void puglSetHandle(PuglView *view, PuglHandle handle)
Definition common.c:175
PuglStatus puglSetEventFunc(PuglView *view, PuglEventFunc eventFunc)
Set the function to call when an event occurs.
Definition common.c:200
PuglWorld * puglGetWorld(PuglView *view)
Return the world that view is a part of.
Definition common.c:169
PuglView * puglNewView(PuglWorld *const world)
Definition common.c:116
PuglStatus puglSetViewHint(PuglView *view, PuglViewHint hint, int value)
Definition common.c:207
int puglGetViewHint(const PuglView *view, PuglViewHint hint)
Definition common.c:227
void puglFreeView(PuglView *view)
Free a view created with puglNewView().
Definition common.c:141
const PuglBackend * puglGetBackend(const PuglView *view)
Return the graphics backend used by a view.
Definition common.c:194
const char * puglStrerror(const PuglStatus status)
Return a string describing a status code.
Definition common.c:18
PuglStatus
Return status code.
Definition pugl.h:627
@ PUGL_SUCCESS
Success.
Definition pugl.h:628
@ PUGL_FAILURE
Non-fatal failure.
Definition pugl.h:629
@ PUGL_REALIZE_FAILED
System view realization failed.
Definition pugl.h:636
@ PUGL_REGISTRATION_FAILED
Class registration failed.
Definition pugl.h:635
@ PUGL_SET_FORMAT_FAILED
Failed to set pixel format.
Definition pugl.h:637
@ PUGL_BAD_BACKEND
Invalid or missing backend.
Definition pugl.h:631
@ PUGL_BAD_PARAMETER
Invalid parameter.
Definition pugl.h:633
@ PUGL_BACKEND_FAILED
Backend initialization failed.
Definition pugl.h:634
@ PUGL_UNKNOWN_ERROR
Unknown system error.
Definition pugl.h:630
@ PUGL_UNSUPPORTED
Unsupported operation.
Definition pugl.h:639
@ PUGL_NO_MEMORY
Failed to allocate memory.
Definition pugl.h:640
@ PUGL_BAD_CONFIGURATION
Invalid view configuration.
Definition pugl.h:632
@ PUGL_CREATE_CONTEXT_FAILED
Failed to create drawing context.
Definition pugl.h:638
void * PuglHandle
Handle for a view's opaque user data.
Definition pugl.h:837
struct PuglViewImpl PuglView
A drawable region that receives events.
Definition pugl.h:810
uintptr_t PuglNativeView
Definition pugl.h:834
PuglStatus(* PuglEventFunc)(PuglView *view, const PuglEvent *event)
A function called when an event occurs.
Definition pugl.h:910
PuglViewHint
A hint for configuring a view.
Definition pugl.h:840
struct PuglBackendImpl PuglBackend
Definition pugl.h:823
@ PUGL_DONT_CARE
Use best available value.
Definition pugl.h:864
@ PUGL_FALSE
Explicitly false.
Definition pugl.h:865
@ PUGL_TRUE
Explicitly true.
Definition pugl.h:866
@ PUGL_ALPHA_BITS
Number of bits for alpha channel.
Definition pugl.h:848
@ PUGL_DOUBLE_BUFFER
True if double buffering should be used.
Definition pugl.h:852
@ PUGL_CONTEXT_VERSION_MINOR
OpenGL context minor version.
Definition pugl.h:844
@ PUGL_USE_DEBUG_CONTEXT
True to use a debug OpenGL context.
Definition pugl.h:842
@ PUGL_BLUE_BITS
Number of bits for blue channel.
Definition pugl.h:847
@ PUGL_RED_BITS
Number of bits for red channel.
Definition pugl.h:845
@ PUGL_IGNORE_KEY_REPEAT
True if key repeat events are ignored.
Definition pugl.h:855
@ PUGL_DEPTH_BITS
Number of bits for depth buffer.
Definition pugl.h:849
@ PUGL_REFRESH_RATE
Refresh rate in Hz.
Definition pugl.h:856
@ PUGL_USE_COMPAT_PROFILE
Use compatible (not core) OpenGL profile.
Definition pugl.h:841
@ PUGL_SAMPLES
Number of samples per pixel (AA).
Definition pugl.h:851
@ PUGL_SWAP_INTERVAL
Number of frames between buffer swaps.
Definition pugl.h:853
@ PUGL_CONTEXT_VERSION_MAJOR
OpenGL context major version.
Definition pugl.h:843
@ PUGL_STENCIL_BITS
Number of bits for stencil buffer.
Definition pugl.h:850
@ PUGL_RESIZABLE
True if view should be resizable.
Definition pugl.h:854
@ PUGL_GREEN_BITS
Number of bits for green channel.
Definition pugl.h:846
@ PUGL_MIN_SIZE
Minimum size.
Definition pugl.h:878
PuglNativeView puglGetParentWindow(const PuglView *const view)
Return the parent window this view is embedded in, or null.
Definition common.c:252
const char * puglGetWindowTitle(const PuglView *const view)
Return the title of the window, or null.
Definition common.c:239
bool puglGetVisible(const PuglView *view)
Return true iff the view is currently visible.
Definition common.c:264
PuglStatus puglSetParentWindow(PuglView *view, PuglNativeView parent)
Definition common.c:245
PuglNativeView puglGetTransientParent(const PuglView *const view)
Definition common.c:258
PuglWorld * puglNewWorld(PuglWorldType type, PuglWorldFlags flags)
Definition common.c:42
PuglStatus puglSetClassName(PuglWorld *const world, const char *const name)
Definition common.c:83
uint32_t PuglWorldFlags
Bitwise OR of PuglWorldFlag values.
Definition pugl.h:692
PuglWorldType
The type of a World.
Definition pugl.h:676
struct PuglWorldImpl PuglWorld
Definition pugl.h:670
PUGL_API double puglGetTime(const PuglWorld *world)
Definition wasm.c:536
void puglSetWorldHandle(PuglWorld *world, PuglWorldHandle handle)
Definition common.c:71
void * PuglWorldHandle
Handle for the world's opaque user data.
Definition pugl.h:673
PuglWorldHandle puglGetWorldHandle(PuglWorld *world)
Get the user data for the world.
Definition common.c:77
const char * puglGetClassName(const PuglWorld *world)
Get the class name of the application, or null.
Definition common.c:90
void puglFreeWorld(PuglWorld *const world)
Free a world allocated with puglNewWorld().
Definition common.c:62
PuglStatus puglDispatchSimpleEvent(PuglView *view, const PuglEventType type)
Dispatch an event with a simple type to view.
Definition internal.c:99
void puglSetString(char **dest, const char *string)
Reallocate and set *dest to string.
Definition internal.c:40
static LilvWorld * world
Definition lilv_test.c:64
void *(* getContext)(PuglView *)
Return the puglGetContext() handle for the application, if any.
Definition types.h:88
PuglInternals * impl
Definition types.h:40
PuglEventFunc eventFunc
Definition types.h:42
PuglRect frame
Definition types.h:46
PuglHandle handle
Definition types.h:41
PuglNativeView parent
Definition types.h:44
const PuglBackend * backend
Definition types.h:39
uintptr_t transientParent
Definition types.h:45
bool visible
Definition types.h:50
char * title
Definition types.h:43
PuglWorld * world
Definition types.h:38
PuglHints hints
Definition types.h:48
PuglViewSize sizeHints[PUGL_NUM_SIZE_HINTS]
Definition types.h:49
PuglSpan width
Definition types.h:26
PuglSpan height
Definition types.h:27
int PuglHints[PUGL_NUM_VIEW_HINTS]
View hints.
Definition types.h:22