View¶
A drawable region that receives events.
A view can be thought of as a window, but does not necessarily correspond to a top-level window in a desktop environment. For example, a view can be embedded in some other window, or represent an embedded system where there is no concept of multiple windows at all.
-
enum PuglViewHint¶
A hint for configuring a view.
-
enumerator PUGL_USE_COMPAT_PROFILE¶
Use compatible (not core) OpenGL profile.
-
enumerator PUGL_USE_DEBUG_CONTEXT¶
True to use a debug OpenGL context.
-
enumerator PUGL_CONTEXT_VERSION_MAJOR¶
OpenGL context major version.
-
enumerator PUGL_CONTEXT_VERSION_MINOR¶
OpenGL context minor version.
-
enumerator PUGL_RED_BITS¶
Number of bits for red channel.
-
enumerator PUGL_GREEN_BITS¶
Number of bits for green channel.
-
enumerator PUGL_BLUE_BITS¶
Number of bits for blue channel.
-
enumerator PUGL_ALPHA_BITS¶
Number of bits for alpha channel.
-
enumerator PUGL_DEPTH_BITS¶
Number of bits for depth buffer.
-
enumerator PUGL_STENCIL_BITS¶
Number of bits for stencil buffer.
-
enumerator PUGL_SAMPLES¶
Number of samples per pixel (AA)
-
enumerator PUGL_DOUBLE_BUFFER¶
True if double buffering should be used.
-
enumerator PUGL_SWAP_INTERVAL¶
Number of frames between buffer swaps.
-
enumerator PUGL_RESIZABLE¶
True if view should be resizable.
-
enumerator PUGL_IGNORE_KEY_REPEAT¶
True if key repeat events are ignored.
-
enumerator PUGL_REFRESH_RATE¶
Refresh rate in Hz.
-
enumerator PUGL_ACCEPT_DROP¶
True if view accepts dropped data.
-
enumerator PUGL_NUM_VIEW_HINTS¶
-
enumerator PUGL_USE_COMPAT_PROFILE¶
-
enum PuglViewHintValue¶
A special view hint value.
-
enumerator PUGL_DONT_CARE¶
Use best available value.
-
enumerator PUGL_FALSE¶
Explicitly false.
-
enumerator PUGL_TRUE¶
Explicitly true.
-
enumerator PUGL_DONT_CARE¶
-
typedef struct PuglViewImpl PuglView¶
A drawable region that receives events.
-
typedef struct PuglBackendImpl PuglBackend¶
A graphics backend.
The backend dictates how graphics are set up for a view, and how drawing is performed. A backend must be set by calling
puglSetBackend()
before realising a view.If you are using a local copy of Pugl, it is possible to implement a custom backend. See the definition of
PuglBackendImpl
in the source code for details.
-
typedef uintptr_t PuglNativeView¶
A native view handle.
X11: This is a
Window
.MacOS: This is a pointer to an
NSView*
.Windows: This is a
HWND
.
-
typedef void *PuglHandle¶
Handle for a view’s opaque user data.
-
typedef PuglStatus (*PuglEventFunc)(PuglView *view, const PuglEvent *event)¶
A function called when an event occurs.