LMMS
Loading...
Searching...
No Matches
internal.c File Reference
#include "internal.h"
#include "types.h"
#include "pugl/pugl.h"
#include <assert.h>
#include <stdbool.h>
#include <stdlib.h>
#include <string.h>

Go to the source code of this file.

Macros

#define FAIL_IF(cond)

Functions

PuglStatus puglSetBlob (PuglBlob *const dest, const void *const data, const size_t len)
 Set blob to data with length len, reallocating if necessary.
void puglSetString (char **dest, const char *string)
 Reallocate and set *dest to string.
uint32_t puglDecodeUTF8 (const uint8_t *buf)
 Return the Unicode code point for buf or the replacement character.
PuglStatus puglDispatchSimpleEvent (PuglView *view, const PuglEventType type)
 Dispatch an event with a simple type to View.
static bool puglMustConfigure (PuglView *view, const PuglConfigureEvent *configure)
PuglStatus puglConfigure (PuglView *view, const PuglEvent *event)
 Process configure event while already in the graphics context.
PuglStatus puglExpose (PuglView *view, const PuglEvent *event)
 Process expose event while already in the graphics context.
PuglStatus puglDispatchEvent (PuglView *view, const PuglEvent *event)
 Dispatch Event to View, entering graphics context if necessary.

Macro Definition Documentation

◆ FAIL_IF

#define FAIL_IF ( cond)
Value:
do { \
if (cond) \
return 0xFFFD; \
} while (0)

Function Documentation

◆ puglConfigure()

PuglStatus puglConfigure ( PuglView * view,
const PuglEvent * event )

Process configure event while already in the graphics context.

◆ puglDecodeUTF8()

uint32_t puglDecodeUTF8 ( const uint8_t * buf)

Return the Unicode code point for buf or the replacement character.

◆ puglDispatchEvent()

PuglStatus puglDispatchEvent ( PuglView * view,
const PuglEvent * event )

Dispatch Event to View, entering graphics context if necessary.

◆ puglDispatchSimpleEvent()

PuglStatus puglDispatchSimpleEvent ( PuglView * view,
const PuglEventType type )

Dispatch an event with a simple type to View.

◆ puglExpose()

PuglStatus puglExpose ( PuglView * view,
const PuglEvent * event )

Process expose event while already in the graphics context.

◆ puglMustConfigure()

bool puglMustConfigure ( PuglView * view,
const PuglConfigureEvent * configure )
inlinestatic

◆ puglSetBlob()

PuglStatus puglSetBlob ( PuglBlob *const dest,
const void *const data,
const size_t len )

Set blob to data with length len, reallocating if necessary.

◆ puglSetString()

void puglSetString ( char ** dest,
const char * string )

Reallocate and set *dest to string.