|
LMMS
|
Topics | |
| Setup | |
| Frame | |
| Window | |
| Graphics | |
| Interaction | |
Macros | |
| #define | PUGL_NUM_VIEW_HINTS ((unsigned)PUGL_REFRESH_RATE + 1u) |
| The number of PuglViewHint values. | |
| #define | PUGL_NUM_SIZE_HINTS ((unsigned)PUGL_MAX_ASPECT + 1u) |
| The number of PuglSizeHint values. | |
Typedefs | |
| typedef struct PuglViewImpl | PuglView |
| A drawable region that receives events. | |
| typedef struct PuglBackendImpl | PuglBackend |
| typedef uintptr_t | PuglNativeView |
| 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. | |
Enumerations | |
| enum | PuglViewHint { PUGL_USE_COMPAT_PROFILE , PUGL_USE_DEBUG_CONTEXT , PUGL_CONTEXT_VERSION_MAJOR , PUGL_CONTEXT_VERSION_MINOR , PUGL_RED_BITS , PUGL_GREEN_BITS , PUGL_BLUE_BITS , PUGL_ALPHA_BITS , PUGL_DEPTH_BITS , PUGL_STENCIL_BITS , PUGL_SAMPLES , PUGL_DOUBLE_BUFFER , PUGL_SWAP_INTERVAL , PUGL_RESIZABLE , PUGL_IGNORE_KEY_REPEAT , PUGL_REFRESH_RATE } |
| A hint for configuring a view. More... | |
| enum | PuglViewHintValue { PUGL_DONT_CARE = -1 , PUGL_FALSE = 0 , PUGL_TRUE = 1 } |
| A special view hint value. More... | |
| enum | PuglSizeHint { PUGL_DEFAULT_SIZE , PUGL_MIN_SIZE , PUGL_MAX_SIZE , PUGL_FIXED_ASPECT , PUGL_MIN_ASPECT , PUGL_MAX_ASPECT } |
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.
| #define PUGL_NUM_SIZE_HINTS ((unsigned)PUGL_MAX_ASPECT + 1u) |
The number of PuglSizeHint values.
| #define PUGL_NUM_VIEW_HINTS ((unsigned)PUGL_REFRESH_RATE + 1u) |
The number of PuglViewHint values.
| 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 PuglStatus(* PuglEventFunc) (PuglView *view, const PuglEvent *event) |
A function called when an event occurs.
| typedef void* PuglHandle |
Handle for a view's opaque user data.
| 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 struct PuglViewImpl PuglView |
A drawable region that receives events.
| enum PuglSizeHint |
A hint for configuring/constraining the size of a view.
The system will attempt to make the view's window adhere to these, but they are suggestions, not hard constraints. Applications should handle any view size gracefully.
| Enumerator | |
|---|---|
| PUGL_DEFAULT_SIZE | Default size. |
| PUGL_MIN_SIZE | Minimum size. |
| PUGL_MAX_SIZE | Maximum size. |
| PUGL_FIXED_ASPECT | Fixed aspect ratio. If set, the view's size should be constrained to this aspect ratio. Mutually exclusive with PUGL_MIN_ASPECT and PUGL_MAX_ASPECT. |
| PUGL_MIN_ASPECT | Minimum aspect ratio. If set, the view's size should be constrained to an aspect ratio no lower than this. Mutually exclusive with PUGL_FIXED_ASPECT. |
| PUGL_MAX_ASPECT | Maximum aspect ratio. If set, the view's size should be constrained to an aspect ratio no higher than this. Mutually exclusive with PUGL_FIXED_ASPECT. |
| enum PuglViewHint |
A hint for configuring a view.
| enum PuglViewHintValue |