LMMS
Loading...
Searching...
No Matches
types.h
Go to the documentation of this file.
1// Copyright 2012-2022 David Robillard <d@drobilla.net>
2// SPDX-License-Identifier: ISC
3
4#ifndef PUGL_SRC_TYPES_H
5#define PUGL_SRC_TYPES_H
6
7#include "attributes.h"
8
9#include "pugl/pugl.h"
10
11#include <stdbool.h>
12#include <stddef.h>
13#include <stdint.h>
14
17
20
23
29
31typedef struct {
32 void* data;
33 size_t len;
34} PuglBlob;
35
52
62
64typedef void PuglSurface;
65
90
91#endif // PUGL_SRC_TYPES_H
#define PUGL_WARN_UNUSED_RESULT
Definition attributes.h:18
uint16_t PuglSpan
Definition pugl.h:75
PuglStatus
Return status code.
Definition pugl.h:627
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
#define PUGL_NUM_VIEW_HINTS
The number of PuglViewHint values.
Definition pugl.h:860
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
struct PuglBackendImpl PuglBackend
Definition pugl.h:823
#define PUGL_NUM_SIZE_HINTS
The number of PuglSizeHint values.
Definition pugl.h:907
struct PuglWorldImpl PuglWorld
Definition pugl.h:670
void * PuglWorldHandle
Handle for the world's opaque user data.
Definition pugl.h:673
Graphics backend interface.
Definition types.h:67
PUGL_WARN_UNUSED_RESULT PuglStatus(* configure)(PuglView *)
Get visual information from display and setup view as necessary.
Definition types.h:70
void(* destroy)(PuglView *)
Destroy surface and drawing context.
Definition types.h:77
PUGL_WARN_UNUSED_RESULT PuglStatus(* leave)(PuglView *, const PuglExposeEvent *)
Leave drawing context, after drawing if expose is non-null.
Definition types.h:85
PUGL_WARN_UNUSED_RESULT PuglStatus(* create)(PuglView *)
Create surface and drawing context.
Definition types.h:74
PUGL_WARN_UNUSED_RESULT PuglStatus(* enter)(PuglView *, const PuglExposeEvent *)
Enter drawing context, for drawing if expose is non-null.
Definition types.h:81
Blob of arbitrary data.
Definition types.h:31
void * data
Dynamically allocated data.
Definition types.h:32
size_t len
Length of data in bytes.
Definition types.h:33
Definition pugl.h:280
Definition pugl.h:326
Definition mac.h:32
Definition pugl.h:87
Cross-platform view definition.
Definition types.h:37
PuglInternals * impl
Definition types.h:40
PuglEventFunc eventFunc
Definition types.h:42
PuglConfigureEvent lastConfigure
Definition types.h:47
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
View size (both X and Y coordinates).
Definition types.h:25
PuglSpan width
Definition types.h:26
PuglSpan height
Definition types.h:27
Cross-platform world definition.
Definition types.h:54
PuglView ** views
Definition types.h:60
double startTime
Definition types.h:58
size_t numViews
Definition types.h:59
PuglWorldHandle handle
Definition types.h:56
char * className
Definition types.h:57
PuglWorldInternals * impl
Definition types.h:55
Definition mac.h:27
struct PuglInternalsImpl PuglInternals
Platform-specific view internals.
Definition types.h:19
void PuglSurface
Opaque surface used by graphics backend.
Definition types.h:64
struct PuglWorldInternalsImpl PuglWorldInternals
Platform-specific world internals.
Definition types.h:16
int PuglHints[PUGL_NUM_VIEW_HINTS]
View hints.
Definition types.h:22
#define void
Definition unzip.h:396