Files
vanilla/gui/ui/ui_util.h
T
itsmattkc c809ff73e7 implement support for display brightness
commit 54e685ba9fef2b5fc1505ddc932e4fa3fe87ed68
Author: itsmattkc <34096995+itsmattkc@users.noreply.github.com>
Date:   Wed Aug 26 17:46:15 2026 -0700

    improvements

commit b442a51a71
Author: itsmattkc <34096995+itsmattkc@users.noreply.github.com>
Date:   Wed Aug 26 14:49:31 2026 -0700

    docker: add new build deps for android

commit 1e6370391e
Merge: b21181c 0681459
Author: itsmattkc <34096995+itsmattkc@users.noreply.github.com>
Date:   Wed Aug 26 14:37:15 2026 -0700

    Merge branch 'master' into brightness

commit b21181c675
Author: itsmattkc <34096995+itsmattkc@users.noreply.github.com>
Date:   Sun Aug 23 16:58:09 2026 -0700

    update display brightness - initial implementation
2026-08-26 17:50:12 -07:00

27 lines
778 B
C

#ifndef VANILLA_PI_UI_UTIL_H
#define VANILLA_PI_UI_UTIL_H
#include <stddef.h>
#include <stdint.h>
#include <string.h>
void vui_strncpy(char *dst, const char *src, size_t max_dst_size);
size_t vui_utf8_cp_len(const char *s);
char *vui_utf8_advance(char *s);
#define CLAMP(x, low, high) (((x) < (low)) ? (low) : ((x) > (high)) ? (high) : (x))
static inline int intmin(int a, int b) { return a < b ? a : b; }
static inline int intmax(int a, int b) { return a > b ? a : b; }
static inline int64_t int64min(int64_t a, int64_t b) { return a < b ? a : b; }
static inline int64_t int64max(int64_t a, int64_t b) { return a > b ? a : b; }
static inline int32_t pack_float(float f)
{
int32_t x;
memcpy(&x, &f, sizeof(int32_t));
return x;
}
#endif // VANILLA_PI_UI_UTIL_H