53 Commits

Author SHA1 Message Date
Johannes Marbach
69a6b6ee8b Merge branch 'buffyboard_widgets' into 'master'
buffyboard: disable unused LVGL widgets

Closes #12

See merge request postmarketOS/buffybox!50
2025-05-06 19:52:51 +00:00
Johannes Marbach
5a372adfca Merge branch 'fix_kdgkbmode' into 'master'
unl0kr: store keyboard mode in a long instead of an int

See merge request postmarketOS/buffybox!52
2025-05-06 19:50:34 +00:00
Johannes Marbach
0c409dab02 Merge branch 'check_return' into 'master'
unl0kr-agent: check exit code of a child process

See merge request postmarketOS/buffybox!53
2025-05-06 19:49:13 +00:00
Vladimir Stoiakin
d8214b522a unl0kr-agent: check exit code of a child process
If the call to execv() is failed (/usr/bin/unl0kr is absent, for example), the child process will exit with EXIT_FAILURE.
But since the agent does not check the exit code, it will not notice the problem and will return an empty password to systemd.
When the password is used to unlock a PKCS#11 or FIDO2 token, we can waste a limited number of tries or lock the token entirely.
The patch adds a check to avoid this sutuation.
2025-05-06 15:03:58 +03:00
Vladimir Stoiakin
4e13c31224 unl0kr: store keyboard mode in a long instead of an int 2025-05-06 13:38:14 +03:00
Vladimir Stoiakin
3e08ee4716 buffyboard: disable unused LVGL widgets 2025-05-05 12:20:36 +03:00
Johannes Marbach
1103aa224f Merge branch 'warnings' into 'master'
misc: fix warnings

See merge request postmarketOS/buffybox!47
2025-04-23 19:33:34 +00:00
Johannes Marbach
f4b7fcdcd2 Add changelog for !49 2025-04-23 21:17:00 +02:00
Johannes Marbach
309ff80709 Merge branch 'use_libc' into 'master'
misc: use standard C library instead of builtin functions

See merge request postmarketOS/buffybox!49
2025-04-23 19:14:54 +00:00
Vladimir Stoiakin
b711b97632 misc: use standard C library instead of builtin functions 2025-04-22 16:28:47 +03:00
Vladimir Stoiakin
5c782575f2 misc: fix warnings 2025-04-17 14:08:19 +03:00
Johannes Marbach
2b6192fcf0 Merge branch 'readme' into 'master'
misc: update README

See merge request postmarketOS/buffybox!48
2025-04-17 07:49:53 +00:00
Vladimir Stoiakin
fa985ec163 misc: update README 2025-04-16 13:19:01 +03:00
Johannes Marbach
dce41a6f07 Prepare for 3.3.0 2025-04-15 18:23:59 +02:00
Johannes Marbach
1514569d2b Add changelog for !46 2025-04-15 18:20:06 +02:00
Johannes Marbach
4dd73af67b Merge branch 'lvgl-9' into 'master'
Update LVGL to 9.2.2

See merge request postmarketOS/buffybox!46
2025-04-15 16:17:53 +00:00
Vladimir Stoiakin
8b1ca6e4cf Update LVGL to 9.2.2 2025-04-15 16:17:52 +00:00
Johannes Marbach
a711b61e11 Merge branch 'ignore_empty' into 'master'
unl0kr-agent: ignore keys without a value in requests

See merge request postmarketOS/buffybox!45
2025-04-09 13:09:03 +00:00
Vladimir Stoiakin
0989ee5800 unl0kr-agent: ignore keys without a value in requests 2025-04-08 11:11:20 +03:00
Johannes Marbach
169a1ac5b7 Merge branch 'message' into 'master'
unl0kr: add a CLI option to show a custom message

Closes #33

See merge request postmarketOS/buffybox!39
2025-04-04 10:37:12 +00:00
Vladimir Stoiakin
cf20c4a2fd unl0kr: update screenshots 2025-04-02 18:02:06 +03:00
Vladimir Stoiakin
84d47d2824 unl0kr: add a CLI option to show a custom message
Fixes: #33
2025-04-02 17:40:46 +03:00
Johannes Marbach
18b576f259 Merge branch 'main_loop' into 'master'
unl0kr: optimize the main loop

See merge request postmarketOS/buffybox!38
2025-03-25 18:39:00 +00:00
Johannes Marbach
3613ba4e9d Merge branch 'master' into 'main_loop'
# Conflicts:
#   CHANGELOG.md
2025-03-25 18:37:49 +00:00
Johannes Marbach
d5838377cb Add proper attribution for !41 2025-03-25 19:34:17 +01:00
Johannes Marbach
4bff5f7386 Merge branch 'endian' into 'master'
build: do not hardcode endianess of a system

See merge request postmarketOS/buffybox!41
2025-03-25 18:32:04 +00:00
Vladimir Stoiakin
2627baeea3 build: do not hardcode endianess of a system 2025-03-25 10:50:02 +03:00
Johannes Marbach
b8a5c194f1 Merge branch 'pr-man-tab' into 'master'
man: use tabs instead of spaces (fixes build)

See merge request postmarketOS/buffybox!42
2025-03-24 18:59:50 +00:00
Johannes Marbach
bebd2c5455 Merge branch 'johannes/unbreak-ci' into 'master'
Stop CI on first error

See merge request postmarketOS/buffybox!44
2025-03-24 18:58:14 +00:00
Johannes Marbach
5b54f494a6 Revert "Test fix manpage"
This reverts commit e44dd2412c.
2025-03-24 19:57:14 +01:00
Johannes Marbach
e44dd2412c Test fix manpage 2025-03-24 19:55:50 +01:00
Johannes Marbach
a64ef9bad4 Return exit code from run_script 2025-03-24 19:53:08 +01:00
Johannes Marbach
80d388ebff Collect exit codes 2025-03-24 19:48:32 +01:00
Johannes Marbach
70509e5b02 Stop CI on first error 2025-03-24 19:42:26 +01:00
Johannes Marbach
4546b3227a Merge branch 'lvgl_url' into 'master'
update the URL of LVGL repository

See merge request postmarketOS/buffybox!43
2025-03-24 18:33:36 +00:00
Vladimir Stoiakin
aa28de93b9 update the URL of LVGL repository 2025-03-24 12:30:44 +03:00
1f0c30e88d man: use tabs instead of spaces (fixes build)
otherwise sc-doc errors:
> FAILED: man/unl0kr.1
> meson --internal exe --capture man/unl0kr.1 --feed ../man/unl0kr.1.scd -- scdoc
> --- stderr ---
> Error at 48:1: Tabs are required for indentation
2025-03-22 20:47:16 +00:00
Vladimir Stoiakin
a89df3a04e unl0kr: optimize the main loop 2025-03-20 20:02:01 +03:00
Johannes Marbach
56a9867e90 Merge branch 'newline' into 'master'
unl0kr: add the CLI option to avoid suffixing a password with a newline character

Closes #44

See merge request postmarketOS/buffybox!40
2025-03-16 18:32:49 +00:00
Vladimir Stoiakin
9bb6b3acdf unl0kr: add the CLI option to avoid suffixing a password with a newline character
Appending the newline character '\n' is the right thing to do when you print a password to a tty or a text file.
But different tools process it differently. For example, cryptsetup strips the newline character, but systemd-cryptsetup with a password agent does not.
This commit allows to control the newline character with an option.
2025-03-13 18:25:26 +03:00
Johannes Marbach
3196e47d51 Merge branch 'feature-unl0kr-swrot' into 'master'
Add software rotation to unl0kr

See merge request postmarketOS/buffybox!32
2025-03-12 20:11:38 +00:00
xs5871
a410763f02 Add software rotation to unl0kr
Co-authored-by: craftyguy
2025-03-12 20:11:38 +00:00
Johannes Marbach
6bf7a8406f Merge branch 'debug_strings' into 'master'
unl0kr-agent: add more debug output

See merge request postmarketOS/buffybox!37
2025-02-27 20:04:03 +00:00
Vladimir Stoiakin
a573643403 unl0kr-agent: add more debug output 2025-02-24 11:57:13 +03:00
Johannes Marbach
32f4837e83 Merge branch 'fix_redefinition' into 'master'
build: add '-DLV_USE_LINUX_DRM=1' for unl0kr only

See merge request postmarketOS/buffybox!36
2024-12-09 20:22:37 +00:00
Vladimir Stoiakin
ee55a1aa8e build: add '-DLV_USE_LINUX_DRM=1' for unl0kr only 2024-12-09 18:44:48 +03:00
Johannes Marbach
07e324c175 Merge branch 'drm_fix' into 'master'
unl0kr: select an available DRM device instead of a hard-coded one

Closes #38

See merge request postmarketOS/buffybox!35
2024-11-10 20:12:12 +00:00
Sorcus
c57913819c unl0kr: select an available DRM device instead of a hard-coded one 2024-11-10 20:07:47 +00:00
Johannes Marbach
72a4220fea Merge branch 'agent' into 'master'
unl0kr: add a systemd password agent

See merge request postmarketOS/buffybox!33
2024-11-06 20:46:42 +00:00
Vladimir Stoiakin
ee8e31ad4b unl0kr: add a systemd password agent 2024-11-05 11:33:53 +03:00
Johannes Marbach
25aa94b565 Merge branch 'pr-systemd-service' into 'master'
add buffyboard systemd service

See merge request postmarketOS/buffybox!34
2024-11-02 10:10:16 +00:00
Colin
edf612adee add buffyboard systemd service 2024-11-02 10:10:15 +00:00
Johannes Marbach
634af596d9 Remove tags 2024-10-11 20:09:08 +02:00
106 changed files with 3127 additions and 2551 deletions

View File

@@ -1,8 +1,7 @@
build-and-test-with-drm:
image: alpine:3.19
tags:
- saas-linux-small-amd64
script:
- set -e # Stop on first error
- apk -q add git bash build-base meson linux-headers inih-dev libinput-dev libxkbcommon-dev libdrm-dev scdoc
- git submodule init
- git submodule update
@@ -10,9 +9,8 @@ build-and-test-with-drm:
build-and-test-without-drm:
image: alpine:3.19
tags:
- saas-linux-small-amd64
script:
- set -e # Stop on first error
- apk -q add git bash build-base meson linux-headers inih-dev libinput-dev libxkbcommon-dev scdoc
- git submodule init
- git submodule update
@@ -20,9 +18,8 @@ build-and-test-without-drm:
build-iskey:
image: alpine:3.19
tags:
- saas-linux-small-amd64
script:
- set -e # Stop on first error
- apk -q add git bash build-base meson linux-headers libevdev-dev
- cd iskey
- meson setup _build

2
.gitmodules vendored
View File

@@ -1,3 +1,3 @@
[submodule "lvgl"]
path = lvgl
url = https://github.com/littlevgl/lvgl.git
url = https://github.com/lvgl/lvgl.git

View File

@@ -10,6 +10,11 @@ If a change only affects particular applications, they are listed in parentheses
## Unreleased
- misc: Use standard C library instead of builtin functions (!49, thanks @vstoiakin)
## 3.3.0 (2025-04-15)
- feat: Add a systemd password agent (!33, thanks @vstoiakin)
- feat: Load config from /usr/share aswell (!26 & !28, thanks @fossdd & @pabloyoyoista)
- feat(buffyboard): Add man pages (!23, thanks @Jarrah)
- misc: Unify build system (!23 & !29, thanks @Jarrah & @vladimir.stoyakin)
@@ -17,6 +22,13 @@ If a change only affects particular applications, they are listed in parentheses
- fix: Prevent logging internal LVGL errors to stdout
- misc: Make scdoc a native dependency to enable cross-compilation (!30, thanks @uninsane)
- fix: Use usleep to release CPU when possible (!31, thanks @uninsane)
- feat(buffyboard): Add a buffyboard.service systemd service (!34, @uninsane)
- fix(unl0kr): Select an available DRM device instead of a hard-coded one (!35, thanks @Sorcus)
- feat(unl0kr): Enable software rotation (!32, thanks @xs5871 & @craftyguy)
- misc: do not hardcode endianess of a system (!41, thanks @vstoiakin)
- misc(unl0kr): Optimize the main loop (!38, thanks @vstoiakin)
- feat(unl0kr): Add the option to show a custom message to a user (!39, thanks @vstoiakin)
- misc: Update LVGL to 9.2.2 (!46, thanks @vstoiakin)
## 3.2.0 (2024-06-03)

View File

@@ -27,7 +27,7 @@ You can join our development chat at [#buffybox:matrix.org].
Some dependencies are included as git submodules in this repository. You can clone the repository and initialise the submodules with
```
$ git clone https://gitlab.com/postmarketOS/buffybox.git
$ git clone https://gitlab.postmarketos.org/postmarketOS/buffybox.git
$ cd buffybox
$ git submodule init
$ git submodule update
@@ -45,7 +45,14 @@ $ sudo ./_build/unl0kr/unl0kr # For Unl0kr
$ sudo ./_build/buffyboard/buffyboard # For Buffyboard
```
With meson <0\.55 use `ninja` instead of `meson compile`\.
On distributions based on systemd, `unl0kr` can be used as a [password agent](https://systemd.io/PASSWORD_AGENTS/), to give systemd the ability to ask passwords on touchscreen-only devices:
```
# systemctl stop systemd-ask-password-console.path
# systemctl stop systemd-ask-password-wall.path
# systemctl start unl0kr-agent.path
# systemd-ask-password --no-tty # Unl0kr is started
```
## Making a release

View File

@@ -10,12 +10,12 @@ echo "Uploading archive to GitLab..."
response=$(curl --request POST \
--header "PRIVATE-TOKEN: $1" \
--form "file=@${archive}" \
"https://gitlab.com/api/v4/projects/52322952/uploads")
"https://gitlab.postmarketos.org/api/v4/projects/172/uploads")
path=$(echo "${response}" | jq -r .full_path)
echo "${response}"
echo
echo "https://gitlab.com${path}"
echo "https://gitlab.postmarketos.org${path}"
rm -f "${archive}"

View File

@@ -13,7 +13,7 @@ Buffyboard uses [LVGL] for input processing and rendering. Key events are forwar
# Status
We are en route to v1 which aims at providing a useable, visually pleasant application including [fbkeyboard]'s most essential features. For details about the current status, see the [v1 milestone]. You may also browse the full list of [open issues] to get an idea of what's planned beyond v1.
We are en route to v1 which aims at providing a useable, visually pleasant application including [fbkeyboard]'s most essential features. You may browse the full list of [open issues] to get an idea of what's planned.
Here are a few highlights of what already works:
@@ -121,10 +121,9 @@ Buffyboard was inspired by [fbkeyboard].
[lv_port_linux_frame_buffer]: https://github.com/lvgl/lv_port_linux_frame_buffer
[lv_sim_emscripten]: https://github.com/lvgl/lv_sim_emscripten/blob/master/mouse_cursor_icon.c
[lvgl]: https://github.com/lvgl/lvgl
[open issues]: https://gitlab.com/cherrypicker/buffyboard/-/issues
[open issues]: https://gitlab.postmarketos.org/postmarketOS/buffybox/-/issues
[screenshots]: ./screenshots
[squeek2lvgl]: https://gitlab.com/cherrypicker/squeek2lvgl]
[squeek2lvgl]: ../squeek2lvgl
[squeekboard layouts]: https://gitlab.gnome.org/World/Phosh/squeekboard/-/blob/master/data/keyboards
[squeekboard's US terminal layout]: https://gitlab.gnome.org/World/Phosh/squeekboard/-/blob/master/data/keyboards/terminal/us.yaml
[squeekboard]: https://gitlab.gnome.org/World/Phosh/squeekboard/-/tree/master
[v1 milestone]: https://gitlab.com/cherrypicker/buffyboard/-/milestones/1

View File

@@ -0,0 +1,38 @@
[Unit]
Documentation=https://gitlab.postmarketos.org/postmarketOS/buffybox
[Service]
ExecStart=@bindir@/buffyboard
Restart=on-failure
# Allow access to input devices, framebuffer, tty
DevicePolicy=closed
DeviceAllow=/dev/uinput rw
DeviceAllow=char-fb rw
DeviceAllow=char-input rw
DeviceAllow=char-tty rw
# udev requires some limited networking
RestrictAddressFamilies=AF_NETLINK
# Hardening
CapabilityBoundingSet=
NoNewPrivileges=true
RestrictSUIDSGID=true
PrivateMounts=true
PrivateTmp=true
PrivateUsers=true
ProtectClock=true
ProtectControlGroups=true
ProtectHome=true
ProtectHostname=true
ProtectKernelLogs=true
ProtectKernelModules=true
ProtectKernelTunables=true
ProtectSystem=strict
RemoveIPC=true
LockPersonality=true
MemoryDenyWriteExecute=true
SystemCallArchitectures=native
SystemCallFilter=@system-service
SystemCallFilter=~@privileged
SystemCallFilter=~@resources

110
buffyboard/lv_conf.defaults Normal file
View File

@@ -0,0 +1,110 @@
# SPDX-License-Identifier: GPL-3.0-or-later
# Manual post-processing steps for the generated lv_conf.h
# 1. Remove LV_BIG_ENDIAN_SYSTEM (handled by meson.build)
# 2. Add `#define LV_FONT_CUSTOM_DECLARE LV_FONT_DECLARE(bbx_font_32)` (a bug in generate_lv_conf.py)
LV_COLOR_DEPTH 32
LV_USE_STDLIB_MALLOC LV_STDLIB_CLIB
LV_USE_STDLIB_STRING LV_STDLIB_CLIB
LV_USE_STDLIB_SPRINTF LV_STDLIB_CLIB
LV_USE_DRAW_SW 1
LV_DRAW_SW_COMPLEX 1
LV_DRAW_SW_SUPPORT_RGB565 0
LV_DRAW_SW_SUPPORT_RGB565A8 0
LV_DRAW_SW_SUPPORT_RGB888 1
LV_DRAW_SW_SUPPORT_XRGB8888 1
LV_DRAW_SW_SUPPORT_ARGB8888 1
LV_DRAW_SW_SUPPORT_L8 0
LV_DRAW_SW_SUPPORT_AL88 0
LV_DRAW_SW_SUPPORT_A8 0
LV_DRAW_SW_SUPPORT_I1 0
LV_USE_LOG 1
LV_LOG_LEVEL LV_LOG_LEVEL_WARN
LV_USE_PRIVATE_API 1
LV_FONT_MONTSERRAT_8 0
LV_FONT_MONTSERRAT_10 0
LV_FONT_MONTSERRAT_12 0
LV_FONT_MONTSERRAT_14 0
LV_FONT_MONTSERRAT_16 0
LV_FONT_MONTSERRAT_18 0
LV_FONT_MONTSERRAT_20 0
LV_FONT_MONTSERRAT_22 0
LV_FONT_MONTSERRAT_24 0
LV_FONT_MONTSERRAT_26 0
LV_FONT_MONTSERRAT_28 0
LV_FONT_MONTSERRAT_30 0
LV_FONT_MONTSERRAT_32 0
LV_FONT_MONTSERRAT_34 0
LV_FONT_MONTSERRAT_36 0
LV_FONT_MONTSERRAT_38 0
LV_FONT_MONTSERRAT_40 0
LV_FONT_MONTSERRAT_42 0
LV_FONT_MONTSERRAT_44 0
LV_FONT_MONTSERRAT_46 0
LV_FONT_MONTSERRAT_48 0
LV_FONT_MONTSERRAT_28_COMPRESSED 0
LV_FONT_DEJAVU_16_PERSIAN_HEBREW 0
LV_FONT_SIMSUN_14_CJK 0
LV_FONT_SIMSUN_16_CJK 0
LV_FONT_UNSCII_8 0
LV_FONT_UNSCII_16 0
#LV_FONT_CUSTOM_DECLARE LV_FONT_DECLARE(bbx_font_32)
LV_FONT_DEFAULT &bbx_font_32
LV_WIDGETS_HAS_DEFAULT_VALUE 0
LV_USE_ANIMIMG 0
LV_USE_ARC 0
LV_USE_BAR 0
LV_USE_BUTTON 0
LV_USE_BUTTONMATRIX 1
LV_USE_CALENDAR 0
LV_USE_CANVAS 0
LV_USE_CHART 0
LV_USE_CHECKBOX 0
LV_USE_DROPDOWN 0
LV_USE_IMAGE 1
LV_USE_IMAGEBUTTON 0
LV_USE_KEYBOARD 1
LV_USE_LABEL 1
LV_LABEL_TEXT_SELECTION 0
LV_LABEL_LONG_TXT_HINT 0
LV_USE_LED 0
LV_USE_LINE 0
LV_USE_LIST 0
LV_USE_LOTTIE 0
LV_USE_MENU 0
LV_USE_MSGBOX 0
LV_USE_ROLLER 0
LV_USE_SCALE 0
LV_USE_SLIDER 0
LV_USE_SPAN 0
LV_USE_SPINBOX 0
LV_USE_SPINNER 0
LV_USE_SWITCH 0
LV_USE_TEXTAREA 1
LV_USE_TABLE 0
LV_USE_TABVIEW 0
LV_USE_TILEVIEW 0
LV_USE_WIN 0
LV_USE_THEME_DEFAULT 0
LV_USE_THEME_SIMPLE 0
LV_USE_THEME_MONO 0
LV_USE_FLEX 0
LV_USE_GRID 0
LV_USE_LINUX_FBDEV 1
LV_LINUX_FBDEV_BSD 0
LV_LINUX_FBDEV_RENDER_MODE LV_DISPLAY_RENDER_MODE_PARTIAL
LV_USE_LIBINPUT 1
LV_LIBINPUT_BSD 0
LV_LIBINPUT_XKB 0
LV_BUILD_EXAMPLES 0

File diff suppressed because it is too large Load Diff

View File

@@ -51,7 +51,7 @@ static lv_obj_t *keyboard = NULL;
* @param height display height
* @return denominator
*/
static int keyboard_height_denominator(lv_coord_t width, lv_coord_t height);
static int keyboard_height_denominator(int32_t width, int32_t height);
/**
* Handle termination signals sent to the process.
@@ -93,11 +93,12 @@ static void pop_checked_modifier_keys(void);
* Static functions
*/
static int keyboard_height_denominator(lv_coord_t width, lv_coord_t height) {
static int keyboard_height_denominator(int32_t width, int32_t height) {
return (height > width) ? 3 : 2;
}
static void sigaction_handler(int signum) {
LV_UNUSED(signum);
if (resize_terminals) {
bb_terminal_reset_all();
}
@@ -105,6 +106,7 @@ static void sigaction_handler(int signum) {
}
static void terminal_resize_timer_cb(lv_timer_t *timer) {
LV_UNUSED(timer);
if (resize_terminals) {
bb_terminal_shrink_current();
}
@@ -227,7 +229,7 @@ int main(int argc, char *argv[]) {
/* Override display properties with command line options if necessary */
lv_display_set_offset(disp, cli_opts.x_offset, cli_opts.y_offset);
if (cli_opts.hor_res > 0 || cli_opts.ver_res > 0) {
lv_display_set_physical_resolution(disp, lv_disp_get_hor_res(disp), lv_disp_get_ver_res(disp));
lv_display_set_physical_resolution(disp, lv_display_get_horizontal_resolution(disp), lv_display_get_vertical_resolution(disp));
lv_display_set_resolution(disp, cli_opts.hor_res, cli_opts.ver_res);
}
if (cli_opts.dpi > 0) {
@@ -242,14 +244,14 @@ int main(int argc, char *argv[]) {
switch (cli_opts.rotation) {
case LV_DISPLAY_ROTATION_0:
case LV_DISPLAY_ROTATION_180: {
lv_coord_t denom = keyboard_height_denominator(hor_res_phys, ver_res_phys);
int32_t denom = keyboard_height_denominator(hor_res_phys, ver_res_phys);
lv_display_set_resolution(disp, hor_res_phys, ver_res_phys / denom);
lv_display_set_offset(disp, 0, (cli_opts.rotation == LV_DISPLAY_ROTATION_0) ? (denom - 1) * ver_res_phys / denom : 0);
break;
}
case LV_DISPLAY_ROTATION_90:
case LV_DISPLAY_ROTATION_270: {
lv_coord_t denom = keyboard_height_denominator(ver_res_phys, hor_res_phys);
int32_t denom = keyboard_height_denominator(ver_res_phys, hor_res_phys);
lv_display_set_resolution(disp, hor_res_phys / denom, ver_res_phys);
lv_display_set_offset(disp, 0, (cli_opts.rotation == LV_DISPLAY_ROTATION_90) ? (denom - 1) * hor_res_phys / denom : 0);
break;
@@ -261,9 +263,10 @@ int main(int argc, char *argv[]) {
/* Initialise theme */
bbx_theme_apply(bbx_themes_themes[conf_opts.theme.default_id]);
lv_theme_apply(lv_screen_active());
/* Add keyboard */
keyboard = lv_keyboard_create(lv_scr_act());
keyboard = lv_keyboard_create(lv_screen_active());
uint32_t num_keyboard_events = lv_obj_get_event_count(keyboard);
for(uint32_t i = 0; i < num_keyboard_events; ++i) {
if(lv_event_dsc_get_cb(lv_obj_get_event_dsc(keyboard, i)) == lv_keyboard_def_event_cb) {
@@ -290,30 +293,3 @@ int main(int argc, char *argv[]) {
return 0;
}
/**
* Tick generation
*/
/**
* Generate tick for LVGL.
*
* @return tick in ms
*/
uint32_t bb_get_tick(void) {
static uint64_t start_ms = 0;
if (start_ms == 0) {
struct timeval tv_start;
gettimeofday(&tv_start, NULL);
start_ms = (tv_start.tv_sec * 1000000 + tv_start.tv_usec) / 1000;
}
struct timeval tv_now;
gettimeofday(&tv_now, NULL);
uint64_t now_ms;
now_ms = (tv_now.tv_sec * 1000000 + tv_now.tv_usec) / 1000;
uint32_t time_ms = now_ms - start_ms;
return time_ms;
}

View File

@@ -24,3 +24,20 @@ executable('buffyboard',
install_data('buffyboard.conf', install_dir: get_option('sysconfdir'))
systemd = dependency('systemd', required: get_option('systemd-buffyboard-service'))
if systemd.found()
system_unit_dir = systemd.get_variable(
pkgconfig: 'systemd_system_unit_dir',
pkgconfig_define: ['prefix', get_option('prefix')],
)
configure_file(
input : 'buffyboard.service.in',
output : 'buffyboard.service',
install : true,
install_dir : system_unit_dir,
configuration : {
'bindir' : get_option('prefix') / get_option('bindir'),
},
)
endif

2
lvgl

Submodule lvgl updated: ceadda8a46...7f07a129e8

View File

@@ -21,6 +21,8 @@ password is printed to STDOUT. All other output happens on STDERR.
## Optional
*-m, --message*
A message that will be displayed to a user.
*-C, --config-override*
Path to a config override file. Can be supplied multiple times. Config
files are merged in the following order:
@@ -32,13 +34,23 @@ password is printed to STDOUT. All other output happens on STDERR.
*-g, --geometry=NxM[@X,Y]*
Force a display size of N horizontal times M vertical pixels, offset
horizontally by X pixels and vertically by Y pixels.
*-d --dpi=N*
*-d --dpi=N*
Override the display's DPI value.
*-h, --help*
*-r, --rotate=[0-3]*
Rotate the UI to the given orientation. The
values match the ones provided by the kernel in
/sys/class/graphics/fbcon/rotate.
* 0 - normal orientation (0 degree)
* 1 - clockwise orientation (90 degrees)
* 2 - upside down orientation (180 degrees)
* 3 - counterclockwise orientation (270 degrees)
*-h, --help*
Print this message and exit.
*-v, --verbose*
*-n*
Do not append a newline character to a password.
*-v, --verbose*
Enable more detailed logging output on STDERR.
*-V, --version*
*-V, --version*
Print the unl0kr version and exit.
# EXAMPLES

View File

@@ -1,14 +1,19 @@
project('buffybox', 'c',
version: '3.2.0',
default_options: 'warning_level=3',
version: '3.3.0',
default_options: ['warning_level=3', 'b_ndebug=if-release'],
meson_version: '>= 0.59.0'
)
add_project_arguments('-DPROJECT_VERSION="@0@"'.format(meson.project_version()), language: 'c')
add_project_arguments(
'-DPROJECT_VERSION="@0@"'.format(meson.project_version()),
'-DLV_BIG_ENDIAN_SYSTEM=' + (host_machine.endian() == 'big'? '1' : '0'),
language: 'c'
)
depinih = dependency('inih')
deplibinput = dependency('libinput')
deplibudev = dependency('libudev')
depxkbcommon = dependency('xkbcommon') # For unl0kr only
if get_option('man')
depscdoc = dependency('scdoc', native: true)

View File

@@ -1,2 +1,4 @@
option('with-drm', type: 'feature', value: 'auto', description: 'Enable DRM backend')
option('man', type: 'boolean', value: true, description: 'Install manual pages')
option('systemd-buffyboard-service', type: 'feature', value: 'auto', description: 'Install systemd service file for buffyboard')
option('systemd-password-agent', type: 'feature', value: 'auto', description: 'Build a systemd password agent for touchscreens')

View File

@@ -15,19 +15,14 @@ if ! grep "## $1" CHANGELOG.md > /dev/null; then
exit 1
fi
if ! grep -E "^\s*version:\s*'$1'" buffyboard/meson.build > /dev/null; then
if ! grep -E "^\s*version:\s*'$1'" meson.build > /dev/null; then
echo "Error: Version $1 differs from version in buffyboard/meson.build"
exit 1
fi
if ! grep -E "^\s*version:\s*'$1'" unl0kr/meson.build > /dev/null; then
echo "Error: Version $1 differs from version in unl0kr/meson.build"
exit 1
fi
git tag "$1"
git push --tags
./archive.sh "$2"
echo "Now create a release for https://gitlab.com/postmarketOS/buffybox/-/tags/$1 and attach the uploaded archive"
echo "Now create a release for https://gitlab.postmarketos.org/postmarketOS/buffybox-/tags/$1 and attach the uploaded archive"

View File

@@ -1,15 +1,10 @@
#ifdef __has_include
#if __has_include("lvgl.h")
#ifndef LV_LVGL_H_INCLUDE_SIMPLE
#define LV_LVGL_H_INCLUDE_SIMPLE
#endif
#endif
#endif
#if defined(LV_LVGL_H_INCLUDE_SIMPLE)
#include "lvgl.h"
#include "lvgl.h"
#elif defined(LV_BUILD_TEST)
#include "../lvgl.h"
#else
#include "lvgl/lvgl.h"
#include "lvgl/lvgl.h"
#endif
@@ -17,99 +12,43 @@
#define LV_ATTRIBUTE_MEM_ALIGN
#endif
#ifndef LV_ATTRIBUTE_IMG_BBX_CURSOR_IMG_DSC
#define LV_ATTRIBUTE_IMG_BBX_CURSOR_IMG_DSC
#ifndef LV_ATTRIBUTE_CURSOR
#define LV_ATTRIBUTE_CURSOR
#endif
const LV_ATTRIBUTE_MEM_ALIGN LV_ATTRIBUTE_LARGE_CONST LV_ATTRIBUTE_IMG_BBX_CURSOR_IMG_DSC uint8_t bbx_cursor_img_dsc_map[] = {
#if LV_COLOR_DEPTH == 1 || LV_COLOR_DEPTH == 8
/*Pixel format: Alpha 8 bit, Red: 3 bit, Green: 3 bit, Blue: 2 bit*/
0xff, 0xf7, 0xff, 0x51, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0xff, 0xff, 0xff, 0xf7, 0xdb, 0x56, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0xff, 0xff, 0x49, 0xff, 0xff, 0xf8, 0xdb, 0x57, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0xff, 0xff, 0x24, 0xff, 0x6d, 0xff, 0xff, 0xf8, 0xdb, 0x58, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0xff, 0xff, 0x25, 0xff, 0x25, 0xff, 0x6d, 0xff, 0xff, 0xf8, 0xdb, 0x58, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0xff, 0xff, 0x25, 0xff, 0x25, 0xff, 0x25, 0xff, 0x6d, 0xff, 0xff, 0xf8, 0xdb, 0x58, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0xff, 0xff, 0x25, 0xff, 0x25, 0xff, 0x25, 0xff, 0x25, 0xff, 0x6d, 0xff, 0xff, 0xf8, 0xdb, 0x58, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0xff, 0xff, 0x25, 0xff, 0x25, 0xff, 0x25, 0xff, 0x25, 0xff, 0x25, 0xff, 0x6d, 0xff, 0xff, 0xf8, 0xdb, 0x58, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0xff, 0xff, 0x25, 0xff, 0x25, 0xff, 0x25, 0xff, 0x25, 0xff, 0x25, 0xff, 0x25, 0xff, 0x6d, 0xff, 0xff, 0xf8, 0xdb, 0x57, 0x00, 0x00, 0x00, 0x00,
0xff, 0xff, 0x49, 0xff, 0x49, 0xff, 0x49, 0xff, 0x49, 0xff, 0x49, 0xff, 0x49, 0xff, 0x49, 0xff, 0x6e, 0xff, 0xff, 0xf8, 0xdb, 0x57, 0x00, 0x00,
0xff, 0xff, 0x49, 0xff, 0x49, 0xff, 0x49, 0xff, 0x49, 0xff, 0x49, 0xff, 0x49, 0xff, 0x49, 0xff, 0x49, 0xff, 0x6e, 0xff, 0xff, 0xf8, 0xff, 0x53,
0xff, 0xff, 0x49, 0xff, 0x49, 0xff, 0x49, 0xff, 0x49, 0xff, 0x49, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf7,
0xff, 0xff, 0x49, 0xff, 0x49, 0xff, 0xdb, 0xff, 0x92, 0xff, 0x49, 0xff, 0xb6, 0xff, 0xdb, 0xcc, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0xff, 0xff, 0x49, 0xff, 0xdb, 0xff, 0xff, 0xef, 0xff, 0xff, 0x49, 0xff, 0x49, 0xff, 0xff, 0xfa, 0x6d, 0x3b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0xff, 0xff, 0xdb, 0xff, 0xff, 0xe1, 0x00, 0x00, 0xff, 0xeb, 0x6e, 0xff, 0x49, 0xff, 0xdb, 0xff, 0xff, 0x8d, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0xff, 0xff, 0xff, 0xda, 0x00, 0x00, 0x00, 0x00, 0xdb, 0x9d, 0xdb, 0xff, 0x49, 0xff, 0x6e, 0xff, 0xff, 0xe6, 0x00, 0x05, 0x00, 0x00, 0x00, 0x00,
0xff, 0xca, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xfa, 0x6d, 0xff, 0x49, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xdb, 0xb2, 0xff, 0xff, 0xdb, 0xff, 0xff, 0xdc, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
#endif
#if LV_COLOR_DEPTH == 16 && LV_COLOR_16_SWAP == 0
/*Pixel format: Alpha 8 bit, Red: 5 bit, Green: 6 bit, Blue: 5 bit*/
0xff, 0xff, 0xf7, 0xdb, 0xde, 0x51, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0xff, 0xff, 0xff, 0xbe, 0xf7, 0xf7, 0x59, 0xce, 0x56, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0xff, 0xff, 0xff, 0x8a, 0x52, 0xff, 0x9e, 0xf7, 0xf8, 0x59, 0xce, 0x57, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0xff, 0xff, 0xff, 0x04, 0x21, 0xff, 0x8a, 0x52, 0xff, 0x9e, 0xf7, 0xf8, 0x39, 0xce, 0x58, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0xff, 0xff, 0xff, 0x04, 0x21, 0xff, 0x04, 0x21, 0xff, 0xaa, 0x52, 0xff, 0x9e, 0xf7, 0xf8, 0x39, 0xce, 0x58, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0xff, 0xff, 0xff, 0x25, 0x29, 0xff, 0x25, 0x29, 0xff, 0x25, 0x29, 0xff, 0xcb, 0x5a, 0xff, 0x9e, 0xf7, 0xf8, 0x39, 0xce, 0x58, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0xff, 0xff, 0xff, 0x45, 0x29, 0xff, 0x45, 0x29, 0xff, 0x45, 0x29, 0xff, 0x45, 0x29, 0xff, 0xcb, 0x5a, 0xff, 0x9e, 0xf7, 0xf8, 0x39, 0xce, 0x58, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0xff, 0xff, 0xff, 0x66, 0x31, 0xff, 0x66, 0x31, 0xff, 0x66, 0x31, 0xff, 0x66, 0x31, 0xff, 0x66, 0x31, 0xff, 0xec, 0x62, 0xff, 0x9e, 0xf7, 0xf8, 0x39, 0xce, 0x58, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0xff, 0xff, 0xff, 0x86, 0x31, 0xff, 0x86, 0x31, 0xff, 0x86, 0x31, 0xff, 0x86, 0x31, 0xff, 0x86, 0x31, 0xff, 0x86, 0x31, 0xff, 0x0c, 0x63, 0xff, 0x9e, 0xf7, 0xf8, 0x59, 0xce, 0x57, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0xff, 0xff, 0xff, 0xa6, 0x31, 0xff, 0xa6, 0x31, 0xff, 0xa6, 0x31, 0xff, 0xa6, 0x31, 0xff, 0xa6, 0x31, 0xff, 0xa6, 0x31, 0xff, 0xa6, 0x31, 0xff, 0x0c, 0x63, 0xff, 0xbe, 0xf7, 0xf8, 0x59, 0xce, 0x57, 0x00, 0x00, 0x00,
0xff, 0xff, 0xff, 0xc7, 0x39, 0xff, 0xc7, 0x39, 0xff, 0xc7, 0x39, 0xff, 0xc7, 0x39, 0xff, 0xc7, 0x39, 0xff, 0xc7, 0x39, 0xff, 0xc7, 0x39, 0xff, 0xc7, 0x39, 0xff, 0x2d, 0x6b, 0xff, 0xbe, 0xf7, 0xf8, 0x9a, 0xd6, 0x53,
0xff, 0xff, 0xff, 0xe7, 0x39, 0xff, 0xe7, 0x39, 0xff, 0xe8, 0x41, 0xff, 0x08, 0x42, 0xff, 0xe7, 0x39, 0xff, 0x1c, 0xe7, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf7,
0xff, 0xff, 0xff, 0xe8, 0x41, 0xff, 0x08, 0x42, 0xff, 0xd7, 0xbd, 0xff, 0x71, 0x8c, 0xff, 0xe8, 0x41, 0xff, 0xb2, 0x94, 0xff, 0x7a, 0xd6, 0xcc, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0xff, 0xff, 0xff, 0x28, 0x42, 0xff, 0xd7, 0xbd, 0xff, 0x3d, 0xef, 0xef, 0xfc, 0xe6, 0xff, 0x08, 0x42, 0xff, 0x6a, 0x52, 0xff, 0xbf, 0xff, 0xfa, 0x0c, 0x63, 0x3b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0xff, 0xff, 0xff, 0xf7, 0xbd, 0xff, 0xfb, 0xde, 0xe1, 0x00, 0x00, 0x00, 0x7d, 0xef, 0xeb, 0x8e, 0x73, 0xff, 0x29, 0x4a, 0xff, 0xd7, 0xbd, 0xff, 0xfb, 0xde, 0x8d, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0xff, 0xff, 0xff, 0xfb, 0xde, 0xda, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xd7, 0xbd, 0x9d, 0xf8, 0xc5, 0xff, 0x49, 0x4a, 0xff, 0x6d, 0x6b, 0xff, 0xdf, 0xff, 0xe6, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x7e, 0xf7, 0xca, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xbf, 0xff, 0xfa, 0xeb, 0x5a, 0xff, 0x69, 0x4a, 0xff, 0x9e, 0xf7, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x39, 0xce, 0xb2, 0xdb, 0xde, 0xff, 0x79, 0xce, 0xff, 0x7d, 0xef, 0xdc, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
#endif
#if LV_COLOR_DEPTH == 16 && LV_COLOR_16_SWAP != 0
/*Pixel format: Alpha 8 bit, Red: 5 bit, Green: 6 bit, Blue: 5 bit BUT the 2 color bytes are swapped*/
0xff, 0xff, 0xf7, 0xde, 0xdb, 0x51, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0xff, 0xff, 0xff, 0xf7, 0xbe, 0xf7, 0xce, 0x59, 0x56, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0xff, 0xff, 0xff, 0x52, 0x8a, 0xff, 0xf7, 0x9e, 0xf8, 0xce, 0x59, 0x57, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0xff, 0xff, 0xff, 0x21, 0x04, 0xff, 0x52, 0x8a, 0xff, 0xf7, 0x9e, 0xf8, 0xce, 0x39, 0x58, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0xff, 0xff, 0xff, 0x21, 0x04, 0xff, 0x21, 0x04, 0xff, 0x52, 0xaa, 0xff, 0xf7, 0x9e, 0xf8, 0xce, 0x39, 0x58, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0xff, 0xff, 0xff, 0x29, 0x25, 0xff, 0x29, 0x25, 0xff, 0x29, 0x25, 0xff, 0x5a, 0xcb, 0xff, 0xf7, 0x9e, 0xf8, 0xce, 0x39, 0x58, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0xff, 0xff, 0xff, 0x29, 0x45, 0xff, 0x29, 0x45, 0xff, 0x29, 0x45, 0xff, 0x29, 0x45, 0xff, 0x5a, 0xcb, 0xff, 0xf7, 0x9e, 0xf8, 0xce, 0x39, 0x58, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0xff, 0xff, 0xff, 0x31, 0x66, 0xff, 0x31, 0x66, 0xff, 0x31, 0x66, 0xff, 0x31, 0x66, 0xff, 0x31, 0x66, 0xff, 0x62, 0xec, 0xff, 0xf7, 0x9e, 0xf8, 0xce, 0x39, 0x58, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0xff, 0xff, 0xff, 0x31, 0x86, 0xff, 0x31, 0x86, 0xff, 0x31, 0x86, 0xff, 0x31, 0x86, 0xff, 0x31, 0x86, 0xff, 0x31, 0x86, 0xff, 0x63, 0x0c, 0xff, 0xf7, 0x9e, 0xf8, 0xce, 0x59, 0x57, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0xff, 0xff, 0xff, 0x31, 0xa6, 0xff, 0x31, 0xa6, 0xff, 0x31, 0xa6, 0xff, 0x31, 0xa6, 0xff, 0x31, 0xa6, 0xff, 0x31, 0xa6, 0xff, 0x31, 0xa6, 0xff, 0x63, 0x0c, 0xff, 0xf7, 0xbe, 0xf8, 0xce, 0x59, 0x57, 0x00, 0x00, 0x00,
0xff, 0xff, 0xff, 0x39, 0xc7, 0xff, 0x39, 0xc7, 0xff, 0x39, 0xc7, 0xff, 0x39, 0xc7, 0xff, 0x39, 0xc7, 0xff, 0x39, 0xc7, 0xff, 0x39, 0xc7, 0xff, 0x39, 0xc7, 0xff, 0x6b, 0x2d, 0xff, 0xf7, 0xbe, 0xf8, 0xd6, 0x9a, 0x53,
0xff, 0xff, 0xff, 0x39, 0xe7, 0xff, 0x39, 0xe7, 0xff, 0x41, 0xe8, 0xff, 0x42, 0x08, 0xff, 0x39, 0xe7, 0xff, 0xe7, 0x1c, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf7,
0xff, 0xff, 0xff, 0x41, 0xe8, 0xff, 0x42, 0x08, 0xff, 0xbd, 0xd7, 0xff, 0x8c, 0x71, 0xff, 0x41, 0xe8, 0xff, 0x94, 0xb2, 0xff, 0xd6, 0x7a, 0xcc, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0xff, 0xff, 0xff, 0x42, 0x28, 0xff, 0xbd, 0xd7, 0xff, 0xef, 0x3d, 0xef, 0xe6, 0xfc, 0xff, 0x42, 0x08, 0xff, 0x52, 0x6a, 0xff, 0xff, 0xbf, 0xfa, 0x63, 0x0c, 0x3b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0xff, 0xff, 0xff, 0xbd, 0xf7, 0xff, 0xde, 0xfb, 0xe1, 0x00, 0x00, 0x00, 0xef, 0x7d, 0xeb, 0x73, 0x8e, 0xff, 0x4a, 0x29, 0xff, 0xbd, 0xd7, 0xff, 0xde, 0xfb, 0x8d, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0xff, 0xff, 0xff, 0xde, 0xfb, 0xda, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xbd, 0xd7, 0x9d, 0xc5, 0xf8, 0xff, 0x4a, 0x49, 0xff, 0x6b, 0x6d, 0xff, 0xff, 0xdf, 0xe6, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0xf7, 0x7e, 0xca, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xbf, 0xfa, 0x5a, 0xeb, 0xff, 0x4a, 0x69, 0xff, 0xf7, 0x9e, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xce, 0x39, 0xb2, 0xde, 0xdb, 0xff, 0xce, 0x79, 0xff, 0xef, 0x7d, 0xdc, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
#endif
#if LV_COLOR_DEPTH == 32
0xfd, 0xfd, 0xfd, 0xf7, 0xd6, 0xd6, 0xd6, 0x51, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0xff, 0xff, 0xff, 0xff, 0xf2, 0xf2, 0xf2, 0xf7, 0xc9, 0xc9, 0xc9, 0x56, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0xff, 0xff, 0xff, 0xff, 0x4e, 0x4e, 0x4e, 0xff, 0xf0, 0xf0, 0xf0, 0xf8, 0xc7, 0xc7, 0xc7, 0x57, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0xff, 0xff, 0xff, 0xff, 0x1e, 0x1e, 0x1e, 0xff, 0x51, 0x51, 0x51, 0xff, 0xf1, 0xf1, 0xf1, 0xf8, 0xc5, 0xc5, 0xc5, 0x58, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0xff, 0xff, 0xff, 0xff, 0x21, 0x21, 0x21, 0xff, 0x21, 0x21, 0x21, 0xff, 0x53, 0x53, 0x53, 0xff, 0xf1, 0xf1, 0xf1, 0xf8, 0xc5, 0xc5, 0xc5, 0x58, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0xff, 0xff, 0xff, 0xff, 0x25, 0x25, 0x25, 0xff, 0x25, 0x25, 0x25, 0xff, 0x25, 0x25, 0x25, 0xff, 0x57, 0x57, 0x57, 0xff, 0xf1, 0xf1, 0xf1, 0xf8, 0xc5, 0xc5, 0xc5, 0x58, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0xff, 0xff, 0xff, 0xff, 0x28, 0x28, 0x28, 0xff, 0x28, 0x28, 0x28, 0xff, 0x28, 0x28, 0x28, 0xff, 0x28, 0x28, 0x28, 0xff, 0x59, 0x59, 0x59, 0xff, 0xf1, 0xf1, 0xf1, 0xf8, 0xc5, 0xc5, 0xc5, 0x58, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0xff, 0xff, 0xff, 0xff, 0x2c, 0x2c, 0x2c, 0xff, 0x2c, 0x2c, 0x2c, 0xff, 0x2c, 0x2c, 0x2c, 0xff, 0x2c, 0x2c, 0x2c, 0xff, 0x2c, 0x2c, 0x2c, 0xff, 0x5c, 0x5c, 0x5c, 0xff, 0xf1, 0xf1, 0xf1, 0xf8, 0xc5, 0xc5, 0xc5, 0x58, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0xff, 0xff, 0xff, 0xff, 0x2f, 0x2f, 0x2f, 0xff, 0x2f, 0x2f, 0x2f, 0xff, 0x2f, 0x2f, 0x2f, 0xff, 0x2f, 0x2f, 0x2f, 0xff, 0x2f, 0x2f, 0x2f, 0xff, 0x2f, 0x2f, 0x2f, 0xff, 0x5e, 0x5e, 0x5e, 0xff, 0xf1, 0xf1, 0xf1, 0xf8, 0xc7, 0xc7, 0xc7, 0x57, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0xff, 0xff, 0xff, 0xff, 0x33, 0x33, 0x33, 0xff, 0x33, 0x33, 0x33, 0xff, 0x33, 0x33, 0x33, 0xff, 0x33, 0x33, 0x33, 0xff, 0x33, 0x33, 0x33, 0xff, 0x33, 0x33, 0x33, 0xff, 0x33, 0x33, 0x33, 0xff, 0x61, 0x61, 0x61, 0xff, 0xf2, 0xf2, 0xf2, 0xf8, 0xc7, 0xc7, 0xc7, 0x57, 0x00, 0x00, 0x00, 0x00,
0xff, 0xff, 0xff, 0xff, 0x36, 0x36, 0x36, 0xff, 0x36, 0x36, 0x36, 0xff, 0x36, 0x36, 0x36, 0xff, 0x36, 0x36, 0x36, 0xff, 0x36, 0x36, 0x36, 0xff, 0x36, 0x36, 0x36, 0xff, 0x36, 0x36, 0x36, 0xff, 0x36, 0x36, 0x36, 0xff, 0x64, 0x64, 0x64, 0xff, 0xf2, 0xf2, 0xf2, 0xf8, 0xd0, 0xd0, 0xd0, 0x53,
0xff, 0xff, 0xff, 0xff, 0x3a, 0x3a, 0x3a, 0xff, 0x3a, 0x3a, 0x3a, 0xff, 0x3c, 0x3c, 0x3c, 0xff, 0x3f, 0x3f, 0x3f, 0xff, 0x3b, 0x3b, 0x3b, 0xff, 0xe1, 0xe1, 0xe1, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfd, 0xfd, 0xfd, 0xf7,
0xff, 0xff, 0xff, 0xff, 0x3d, 0x3d, 0x3d, 0xff, 0x3f, 0x3f, 0x3f, 0xff, 0xb7, 0xb7, 0xb7, 0xff, 0x8b, 0x8b, 0x8b, 0xff, 0x3d, 0x3d, 0x3d, 0xff, 0x92, 0x92, 0x92, 0xff, 0xcd, 0xcd, 0xcd, 0xcc, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0xff, 0xff, 0xff, 0xff, 0x42, 0x42, 0x42, 0xff, 0xb8, 0xb8, 0xb8, 0xff, 0xe5, 0xe5, 0xe5, 0xef, 0xdc, 0xdc, 0xdc, 0xff, 0x41, 0x41, 0x41, 0xff, 0x4d, 0x4d, 0x4d, 0xff, 0xf4, 0xf4, 0xf4, 0xfa, 0x5f, 0x5f, 0x5f, 0x3b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0xff, 0xff, 0xff, 0xff, 0xba, 0xba, 0xba, 0xff, 0xda, 0xda, 0xda, 0xe1, 0x00, 0x00, 0x00, 0x00, 0xea, 0xea, 0xea, 0xeb, 0x6f, 0x6f, 0x6f, 0xff, 0x44, 0x44, 0x44, 0xff, 0xb6, 0xb6, 0xb6, 0xff, 0xda, 0xda, 0xda, 0x8d, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0xff, 0xff, 0xff, 0xff, 0xda, 0xda, 0xda, 0xda, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xb7, 0xb7, 0xb7, 0x9d, 0xbd, 0xbd, 0xbd, 0xff, 0x48, 0x48, 0x48, 0xff, 0x6a, 0x6a, 0x6a, 0xff, 0xf7, 0xf7, 0xf7, 0xe6, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0xec, 0xec, 0xec, 0xca, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf4, 0xf4, 0xf4, 0xfa, 0x5b, 0x5b, 0x5b, 0xff, 0x4b, 0x4b, 0x4b, 0xff, 0xf1, 0xf1, 0xf1, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc4, 0xc4, 0xc4, 0xb2, 0xd9, 0xd9, 0xd9, 0xff, 0xcb, 0xcb, 0xcb, 0xff, 0xea, 0xea, 0xea, 0xdc, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
#endif
static const
LV_ATTRIBUTE_MEM_ALIGN LV_ATTRIBUTE_LARGE_CONST LV_ATTRIBUTE_CURSOR
uint8_t cursor_map[] = {
0xfe,0xfe,0xfe,0xf7,0xd6,0xd6,0xd6,0x51,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0xff,0xff,0xff,0xff,0xf3,0xf3,0xf3,0xf7,0xca,0xca,0xca,0x56,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0xff,0xff,0xff,0xff,0x4e,0x4e,0x4e,0xff,0xf1,0xf1,0xf1,0xf8,0xc7,0xc7,0xc7,0x57,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0xff,0xff,0xff,0xff,0x1e,0x1e,0x1e,0xff,0x51,0x51,0x51,0xff,0xf2,0xf2,0xf2,0xf8,0xc5,0xc5,0xc5,0x58,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0xff,0xff,0xff,0xff,0x21,0x21,0x21,0xff,0x21,0x21,0x21,0xff,0x53,0x53,0x53,0xff,0xf2,0xf2,0xf2,0xf8,0xc5,0xc5,0xc5,0x58,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0xff,0xff,0xff,0xff,0x25,0x25,0x25,0xff,0x25,0x25,0x25,0xff,0x25,0x25,0x25,0xff,0x57,0x57,0x57,0xff,0xf2,0xf2,0xf2,0xf8,0xc5,0xc5,0xc5,0x58,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0xff,0xff,0xff,0xff,0x28,0x28,0x28,0xff,0x28,0x28,0x28,0xff,0x28,0x28,0x28,0xff,0x28,0x28,0x28,0xff,0x59,0x59,0x59,0xff,0xf2,0xf2,0xf2,0xf8,0xc5,0xc5,0xc5,0x58,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0xff,0xff,0xff,0xff,0x2c,0x2c,0x2c,0xff,0x2c,0x2c,0x2c,0xff,0x2c,0x2c,0x2c,0xff,0x2c,0x2c,0x2c,0xff,0x2c,0x2c,0x2c,0xff,0x5c,0x5c,0x5c,0xff,0xf2,0xf2,0xf2,0xf8,0xc5,0xc5,0xc5,0x58,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0xff,0xff,0xff,0xff,0x2f,0x2f,0x2f,0xff,0x2f,0x2f,0x2f,0xff,0x2f,0x2f,0x2f,0xff,0x2f,0x2f,0x2f,0xff,0x2f,0x2f,0x2f,0xff,0x2f,0x2f,0x2f,0xff,0x5e,0x5e,0x5e,0xff,0xf2,0xf2,0xf2,0xf8,0xc7,0xc7,0xc7,0x57,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0xff,0xff,0xff,0xff,0x33,0x33,0x33,0xff,0x33,0x33,0x33,0xff,0x33,0x33,0x33,0xff,0x33,0x33,0x33,0xff,0x33,0x33,0x33,0xff,0x33,0x33,0x33,0xff,0x33,0x33,0x33,0xff,0x61,0x61,0x61,0xff,0xf3,0xf3,0xf3,0xf8,0xc7,0xc7,0xc7,0x57,0x00,0x00,0x00,0x00,
0xff,0xff,0xff,0xff,0x36,0x36,0x36,0xff,0x36,0x36,0x36,0xff,0x36,0x36,0x36,0xff,0x36,0x36,0x36,0xff,0x36,0x36,0x36,0xff,0x36,0x36,0x36,0xff,0x36,0x36,0x36,0xff,0x36,0x36,0x36,0xff,0x64,0x64,0x64,0xff,0xf3,0xf3,0xf3,0xf8,0xd1,0xd1,0xd1,0x53,
0xff,0xff,0xff,0xff,0x3a,0x3a,0x3a,0xff,0x3a,0x3a,0x3a,0xff,0x3c,0x3c,0x3c,0xff,0x3f,0x3f,0x3f,0xff,0x3b,0x3b,0x3b,0xff,0xe1,0xe1,0xe1,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xfe,0xfe,0xfe,0xf7,
0xff,0xff,0xff,0xff,0x3d,0x3d,0x3d,0xff,0x3f,0x3f,0x3f,0xff,0xb7,0xb7,0xb7,0xff,0x8b,0x8b,0x8b,0xff,0x3d,0x3d,0x3d,0xff,0x92,0x92,0x92,0xff,0xcd,0xcd,0xcd,0xcc,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0xff,0xff,0xff,0xff,0x42,0x42,0x42,0xff,0xb8,0xb8,0xb8,0xff,0xe5,0xe5,0xe5,0xef,0xdc,0xdc,0xdc,0xff,0x41,0x41,0x41,0xff,0x4d,0x4d,0x4d,0xff,0xf5,0xf5,0xf5,0xfa,0x5f,0x5f,0x5f,0x3b,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0xff,0xff,0xff,0xff,0xba,0xba,0xba,0xff,0xdb,0xdb,0xdb,0xe1,0x00,0x00,0x00,0x00,0xea,0xea,0xea,0xeb,0x6f,0x6f,0x6f,0xff,0x44,0x44,0x44,0xff,0xb6,0xb6,0xb6,0xff,0xdb,0xdb,0xdb,0x8d,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0xff,0xff,0xff,0xff,0xdb,0xdb,0xdb,0xda,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xb8,0xb8,0xb8,0x9d,0xbd,0xbd,0xbd,0xff,0x48,0x48,0x48,0xff,0x6a,0x6a,0x6a,0xff,0xf7,0xf7,0xf7,0xe6,0x00,0x00,0x00,0x05,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0xec,0xec,0xec,0xca,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xf5,0xf5,0xf5,0xfa,0x5b,0x5b,0x5b,0xff,0x4b,0x4b,0x4b,0xff,0xf1,0xf1,0xf1,0xff,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc4,0xc4,0xc4,0xb2,0xd9,0xd9,0xd9,0xff,0xcb,0xcb,0xcb,0xff,0xea,0xea,0xea,0xdc,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
};
const lv_img_dsc_t bbx_cursor_img_dsc = {
.header.cf = LV_COLOR_FORMAT_NATIVE_WITH_ALPHA,
const lv_image_dsc_t cursor = {
.header.magic = LV_IMAGE_HEADER_MAGIC,
.header.cf = LV_COLOR_FORMAT_ARGB8888,
.header.flags = 0,
.header.w = 12,
.header.h = 18,
.data = bbx_cursor_img_dsc_map,
.header.stride = 48,
.data_size = sizeof(cursor_map),
.data = cursor_map,
};

View File

@@ -10,6 +10,6 @@
#include "lvgl/lvgl.h"
/* Image description of the mouse cursor */
extern const lv_img_dsc_t bbx_cursor_img_dsc;
extern const lv_image_dsc_t cursor;
#endif /* BBX_CURSOR_H */

File diff suppressed because it is too large Load Diff

View File

@@ -1,7 +0,0 @@
{
"dependencies": {
"@swc/core": "^1.3.40",
"lv_img_conv": "^0.4.0"
}
}

View File

@@ -3,20 +3,15 @@
# Copyright 2023 Johannes Marbach
# SPDX-License-Identifier: GPL-3.0-or-later
# Dependencies:
# python-pypng
# python-lz4
npm i
root=$(git rev-parse --show-toplevel)
./node_modules/lv_img_conv/lv_img_conv.js -f \
-i bbx_cursor_img_dsc \
-c CF_TRUE_COLOR_ALPHA \
-o cursor.c \
cursor.png
# We need to manually replace the old constants because the image converter hasn't
# yet been updated to https://github.com/lvgl/lvgl/issues/4011
sed 's/LV_IMG_CF_TRUE_COLOR_ALPHA/LV_COLOR_FORMAT_NATIVE_WITH_ALPHA/g' cursor.c \
| sed '/.*LV_IMG_PX_SIZE_ALPHA_BYTE.*/d' \
| sed '/.*header.always_zero.*/d' \
| sed '/.*header.reserved.*/d'\
> cursor.c.tmp
mv cursor.c.tmp cursor.c
"$root/lvgl/scripts/LVGLImage.py" \
--ofmt C \
--cf "ARGB8888" \
--output "$root/shared/cursor" \
--verbose \
"$root/shared/cursor/cursor.png"

View File

@@ -9,8 +9,6 @@
#include "cursor/cursor.h"
#include "log.h"
#include "lvgl/src/indev/lv_indev_private.h"
#include <libinput.h>
#include <libudev.h>
#include <limits.h>
@@ -353,8 +351,8 @@ static void set_mouse_cursor(struct input_device *device) {
/* Initialise cursor image if needed */
if (!cursor_obj) {
cursor_obj = lv_img_create(lv_scr_act());
lv_img_set_src(cursor_obj, &bbx_cursor_img_dsc);
cursor_obj = lv_image_create(lv_screen_active());
lv_image_set_src(cursor_obj, &cursor);
}
/* Apply the cursor image */

View File

@@ -9,9 +9,6 @@
#include "log.h"
#include "../squeek2lvgl/sq2lv.h"
#include "lvgl/lvgl.h"
/**
* Static variables
*/
@@ -25,22 +22,26 @@ static struct {
lv_style_t header;
lv_style_t keyboard;
lv_style_t key;
#if LV_USE_BUTTON
lv_style_t button;
lv_style_t button_pressed;
#endif
lv_style_t textarea;
lv_style_t textarea_placeholder;
lv_style_t textarea_cursor;
#if LV_USE_DROPDOWN
lv_style_t dropdown;
lv_style_t dropdown_pressed;
lv_style_t dropdown_list;
lv_style_t dropdown_list_selected;
#endif
lv_style_t label;
#if LV_USE_MSGBOX
lv_style_t msgbox;
lv_style_t msgbox_label;
lv_style_t msgbox_background;
lv_style_t bar;
lv_style_t bar_indicator;
} styles;
#endif
} styles;
static bool are_styles_initialised = false;
@@ -115,6 +116,7 @@ static void init_styles(const bbx_theme *theme) {
lv_style_set_border_width(&(styles.key), lv_dpx(theme->keyboard.keys.border_width));
lv_style_set_radius(&(styles.key), lv_dpx(theme->keyboard.keys.corner_radius));
#if LV_USE_BUTTON
reset_style(&(styles.button));
lv_style_set_text_color(&(styles.button), lv_color_hex(theme->button.normal.fg_color));
lv_style_set_bg_opa(&(styles.button), LV_OPA_COVER);
@@ -129,6 +131,7 @@ static void init_styles(const bbx_theme *theme) {
lv_style_set_text_color(&(styles.button_pressed), lv_color_hex(theme->button.pressed.fg_color));
lv_style_set_bg_color(&(styles.button_pressed), lv_color_hex(theme->button.pressed.bg_color));
lv_style_set_border_color(&(styles.button_pressed), lv_color_hex(theme->button.pressed.border_color));
#endif
reset_style(&(styles.textarea));
lv_style_set_text_color(&(styles.textarea), lv_color_hex(theme->textarea.fg_color));
@@ -147,8 +150,9 @@ static void init_styles(const bbx_theme *theme) {
lv_style_set_border_side(&(styles.textarea_cursor), LV_BORDER_SIDE_LEFT);
lv_style_set_border_width(&(styles.textarea_cursor), lv_dpx(theme->textarea.cursor.width));
lv_style_set_border_color(&(styles.textarea_cursor), lv_color_hex(theme->textarea.cursor.color));
lv_style_set_anim_time(&(styles.textarea_cursor), theme->textarea.cursor.period);
lv_style_set_anim_duration(&(styles.textarea_cursor), theme->textarea.cursor.period);
#if LV_USE_DROPDOWN
reset_style(&(styles.dropdown));
lv_style_set_text_color(&(styles.dropdown), lv_color_hex(theme->dropdown.button.normal.fg_color));
lv_style_set_bg_opa(&(styles.dropdown), LV_OPA_COVER);
@@ -178,10 +182,12 @@ static void init_styles(const bbx_theme *theme) {
lv_style_set_text_color(&(styles.dropdown_list_selected), lv_color_hex(theme->dropdown.list.selection_fg_color));
lv_style_set_bg_opa(&(styles.dropdown_list_selected), LV_OPA_COVER);
lv_style_set_bg_color(&(styles.dropdown_list_selected), lv_color_hex(theme->dropdown.list.selection_bg_color));
#endif
reset_style(&(styles.label));
lv_style_set_text_color(&(styles.label), lv_color_hex(theme->label.fg_color));
#if LV_USE_MSGBOX
reset_style(&(styles.msgbox));
lv_style_set_text_color(&(styles.msgbox), lv_color_hex(theme->msgbox.fg_color));
lv_style_set_bg_opa(&(styles.msgbox), LV_OPA_COVER);
@@ -199,16 +205,7 @@ static void init_styles(const bbx_theme *theme) {
reset_style(&(styles.msgbox_background));
lv_style_set_bg_color(&(styles.msgbox_background), lv_color_hex(theme->msgbox.dimming.color));
lv_style_set_bg_opa(&(styles.msgbox_background), theme->msgbox.dimming.opacity);
reset_style(&(styles.bar));
lv_style_set_border_side(&(styles.bar), LV_BORDER_SIDE_FULL);
lv_style_set_border_width(&(styles.bar), lv_dpx(theme->bar.border_width));
lv_style_set_border_color(&(styles.bar), lv_color_hex(theme->bar.border_color));
lv_style_set_radius(&(styles.bar), lv_dpx(theme->bar.corner_radius));
reset_style(&(styles.bar_indicator));
lv_style_set_bg_opa(&(styles.bar_indicator), LV_OPA_COVER);
lv_style_set_bg_color(&(styles.bar_indicator), lv_color_hex(theme->bar.indicator.bg_color));
#endif
are_styles_initialised = true;
}
@@ -242,6 +239,7 @@ static void apply_theme_cb(lv_theme_t *theme, lv_obj_t *obj) {
return;
}
#if LV_USE_BUTTON
if (lv_obj_check_type(obj, &lv_button_class)) {
lv_obj_add_style(obj, &(styles.button), 0);
lv_obj_add_style(obj, &(styles.button_pressed), LV_STATE_PRESSED);
@@ -251,6 +249,7 @@ static void apply_theme_cb(lv_theme_t *theme, lv_obj_t *obj) {
if (lv_obj_check_type(obj, &lv_label_class) && lv_obj_check_type(lv_obj_get_parent(obj), &lv_button_class)) {
return; /* Inherit styling from button */
}
#endif
if (lv_obj_check_type(obj, &lv_textarea_class)) {
lv_obj_add_style(obj, &(styles.textarea), 0);
@@ -263,6 +262,7 @@ static void apply_theme_cb(lv_theme_t *theme, lv_obj_t *obj) {
return; /* Inherit styling from textarea */
}
#if LV_USE_DROPDOWN
if (lv_obj_check_type(obj, &lv_dropdown_class)) {
lv_obj_add_style(obj, &(styles.dropdown), 0);
lv_obj_add_style(obj, &(styles.dropdown_pressed), LV_STATE_PRESSED);
@@ -279,7 +279,9 @@ static void apply_theme_cb(lv_theme_t *theme, lv_obj_t *obj) {
if (lv_obj_check_type(obj, &lv_label_class) && lv_obj_check_type(lv_obj_get_parent(obj), &lv_dropdownlist_class)) {
return; /* Inherit styling from dropdown list */
}
#endif
#if LV_USE_MSGBOX
if (lv_obj_check_type(obj, &lv_msgbox_class)) {
lv_obj_add_style(obj, &(styles.msgbox), 0);
return;
@@ -304,17 +306,12 @@ static void apply_theme_cb(lv_theme_t *theme, lv_obj_t *obj) {
lv_obj_add_style(obj, &(styles.msgbox_background), 0);
return;
}
#endif
if (lv_obj_check_type(obj, &lv_label_class) || lv_obj_check_type(obj, &lv_spangroup_class)) {
if (lv_obj_check_type(obj, &lv_label_class)) {
lv_obj_add_style(obj, &(styles.label), 0);
return;
}
if (lv_obj_check_type(obj, &lv_bar_class)) {
lv_obj_add_style(obj, &(styles.bar), 0);
lv_obj_add_style(obj, &(styles.bar_indicator), LV_PART_INDICATOR);
return;
}
}
static void keyboard_draw_task_added_cb(lv_event_t *event) {
@@ -339,7 +336,7 @@ static void keyboard_draw_task_added_cb(lv_event_t *event) {
key = &(current_theme.keyboard.keys.key_char);
}
bool pressed = lv_btnmatrix_get_selected_btn(obj) == dsc->id1 && lv_obj_has_state(obj, LV_STATE_PRESSED);
bool pressed = lv_buttonmatrix_get_selected_button(obj) == dsc->id1 && lv_obj_has_state(obj, LV_STATE_PRESSED);
lv_draw_label_dsc_t *label_dsc = lv_draw_task_get_label_dsc(draw_task);
if (label_dsc) {
@@ -382,7 +379,6 @@ void bbx_theme_apply(const bbx_theme *theme) {
current_theme = *theme;
init_styles(theme);
lv_obj_report_style_change(NULL);
lv_disp_set_theme(NULL, &lv_theme);
lv_theme_apply(lv_scr_act());
lv_obj_report_style_change(NULL); /* Update existing objects */
lv_display_set_theme(NULL, &lv_theme); /* Set a theme for future objects */
}

View File

@@ -26,10 +26,10 @@ typedef struct {
/* Header theme */
typedef struct {
uint32_t bg_color;
lv_coord_t border_width;
int32_t border_width;
uint32_t border_color;
lv_coord_t pad;
lv_coord_t gap;
int32_t pad;
int32_t gap;
} bbx_theme_header;
/* Key theme for one specific key type and state */
@@ -47,8 +47,8 @@ typedef struct {
/* Key theme */
typedef struct {
lv_coord_t border_width;
lv_coord_t corner_radius;
int32_t border_width;
int32_t corner_radius;
bbx_theme_key key_char;
bbx_theme_key key_non_char;
bbx_theme_key key_mod_act;
@@ -58,10 +58,10 @@ typedef struct {
/* Keyboard theme */
typedef struct {
uint32_t bg_color;
lv_coord_t border_width;
int32_t border_width;
uint32_t border_color;
lv_coord_t pad;
lv_coord_t gap;
int32_t pad;
int32_t gap;
bbx_theme_keys keys;
} bbx_theme_keyboard;
@@ -74,16 +74,16 @@ typedef struct {
/* Button theme */
typedef struct {
lv_coord_t border_width;
lv_coord_t corner_radius;
lv_coord_t pad;
int32_t border_width;
int32_t corner_radius;
int32_t pad;
bbx_theme_button_state normal;
bbx_theme_button_state pressed;
} bbx_theme_button;
/* Text area cursor theme */
typedef struct {
lv_coord_t width;
int32_t width;
uint32_t color;
int period;
} bbx_theme_textarea_cursor;
@@ -92,10 +92,10 @@ typedef struct {
typedef struct {
uint32_t fg_color;
uint32_t bg_color;
lv_coord_t border_width;
int32_t border_width;
uint32_t border_color;
lv_coord_t corner_radius;
lv_coord_t pad;
int32_t corner_radius;
int32_t pad;
uint32_t placeholder_color;
bbx_theme_textarea_cursor cursor;
} bbx_theme_textarea;
@@ -106,10 +106,10 @@ typedef struct {
uint32_t bg_color;
uint32_t selection_fg_color;
uint32_t selection_bg_color;
lv_coord_t border_width;
int32_t border_width;
uint32_t border_color;
lv_coord_t corner_radius;
lv_coord_t pad;
int32_t corner_radius;
int32_t pad;
} bbx_theme_dropdown_list;
/* Dropdown theme */
@@ -133,11 +133,11 @@ typedef struct {
typedef struct {
uint32_t fg_color;
uint32_t bg_color;
lv_coord_t border_width;
int32_t border_width;
uint32_t border_color;
lv_coord_t corner_radius;
lv_coord_t pad;
lv_coord_t gap;
int32_t corner_radius;
int32_t pad;
int32_t gap;
bbx_theme_msgbox_dimming dimming;
} bbx_theme_msgbox;
@@ -148,9 +148,9 @@ typedef struct {
/* Progress bar theme */
typedef struct {
lv_coord_t border_width;
int32_t border_width;
uint32_t border_color;
lv_coord_t corner_radius;
int32_t corner_radius;
bbx_theme_bar_indicator indicator;
} bbx_theme_bar;

View File

@@ -1085,7 +1085,7 @@ static const bbx_theme nord_dark = {
}
},
.label = {
.fg_color = 0x070c0d
.fg_color = NORD5
},
.msgbox = {
.fg_color = NORD6,

View File

@@ -4,7 +4,7 @@ squeek2lvgl is a Python script and an accompanying C library that make it possib
To access [squeekboard]'s layout files, squeek2lvgl shallowly clones the [squeekboard] git repository into a temporary directory and purges it before exiting.
**squeek2lvgl has been donated to the postmarketOS project. Development continues in https://gitlab.com/postmarketOS/buffybox.**
**squeek2lvgl has been donated to the postmarketOS project. Development continues in https://gitlab.postmarketos.org/postmarketOS/buffybox.**
## Usage

View File

@@ -216,7 +216,7 @@ int *sq2lv_get_modifier_indexes(lv_obj_t *keyboard, int *num_modifiers) {
}
#if SQ2LV_SCANCODES_ENABLED
const int * const sq2lv_get_scancodes(lv_obj_t *keyboard, uint16_t btn_id, int *num_scancodes) {
const int *sq2lv_get_scancodes(lv_obj_t *keyboard, uint16_t btn_id, int *num_scancodes) {
if (current_layout_id < 0 || current_layout_id >= sq2lv_num_layouts) {
*num_scancodes = 0;
return NULL;

View File

@@ -75,7 +75,7 @@ int *sq2lv_get_modifier_indexes(lv_obj_t *keyboard, int *num_modifiers);
* @param num_scancodes pointer to an integer into which the number of scancodes will be written
* @return pointer into an array of scancodes at the appropriate index
*/
const int * const sq2lv_get_scancodes(lv_obj_t *keyboard, uint16_t btn_id, int *num_scancodes);
const int *sq2lv_get_scancodes(lv_obj_t *keyboard, uint16_t btn_id, int *num_scancodes);
#endif /* SQ2LV_SCANCODES_ENABLED */
#endif /* SQ2LV_H */

View File

@@ -58,8 +58,10 @@ function ok() {
function run_script() {
info "Executing $1"
"$1"
rc=0
"$1" || rc=1
echo
return $rc
}
function read_version_from_meson() {

View File

@@ -4,8 +4,12 @@ root=$(dirname "${BASH_SOURCE[0]}")
source "$root/helpers.sh"
run_script "$root/build-with-drm.sh"
run_script "$root/test-version-matches-meson-and-changelog.sh"
run_script "$root/test-uses-fb-backend-by-default.sh"
run_script "$root/test-uses-fb-backend-if-selected-via-config.sh"
run_script "$root/test-uses-drm-backend-if-selected-via-config-and-available.sh"
rc=0
run_script "$root/build-with-drm.sh" || rc=1
run_script "$root/test-version-matches-meson-and-changelog.sh" || rc=1
run_script "$root/test-uses-fb-backend-by-default.sh" || rc=1
run_script "$root/test-uses-fb-backend-if-selected-via-config.sh" || rc=1
run_script "$root/test-uses-drm-backend-if-selected-via-config-and-available.sh" || rc=1
exit $rc

View File

@@ -4,8 +4,12 @@ root=$(dirname "${BASH_SOURCE[0]}")
source "$root/helpers.sh"
run_script "$root/build-without-drm.sh"
run_script "$root/test-version-matches-meson-and-changelog.sh"
run_script "$root/test-uses-fb-backend-by-default.sh"
run_script "$root/test-uses-fb-backend-if-selected-via-config.sh"
run_script "$root/test-uses-fb-backend-if-drm-selected-via-config-but-unavailable.sh"
rc=0
run_script "$root/build-without-drm.sh" || rc=1
run_script "$root/test-version-matches-meson-and-changelog.sh" || rc=1
run_script "$root/test-uses-fb-backend-by-default.sh" || rc=1
run_script "$root/test-uses-fb-backend-if-selected-via-config.sh" || rc=1
run_script "$root/test-uses-fb-backend-if-drm-selected-via-config-but-unavailable.sh" || rc=1
exit $rc

View File

@@ -49,6 +49,7 @@ Unl0kr values the CRYPTTAB_TRIED variable. Upon completion, the entered
password is printed to STDOUT. All other output happens on STDERR.
Mandatory arguments to long options are mandatory for short options too.
-m, --message A message that will be displayed to a user
-C, --config-override Path to a config override file. Can be supplied
multiple times. Config files are merged in the
following order:
@@ -61,7 +62,15 @@ Mandatory arguments to long options are mandatory for short options too.
vertical pixels, offset horizontally by X
pixels and vertically by Y pixels
-d --dpi=N Override the display's DPI value
-r, --rotate=[0-3] Rotate the UI to the given orientation. The
values match the ones provided by the kernel in
/sys/class/graphics/fbcon/rotate.
* 0 - normal orientation (0 degree)
* 1 - clockwise orientation (90 degrees)
* 2 - upside down orientation (180 degrees)
* 3 - counterclockwise orientation (270 degrees)
-h, --help Print this message and exit
-n Do not append a newline character to a password
-v, --verbose Enable more detailed logging output on STDERR
-V, --version Print the unl0kr version and exit
```
@@ -150,9 +159,9 @@ The [lv_port_linux_frame_buffer] project served as a starting point for the code
[lvgl]: https://github.com/lvgl/lvgl
[online font converter]: https://lvgl.io/tools/fontconverter
[osk-sdl]: https://gitlab.com/postmarketOS/osk-sdl
[package-arch]: https://aur.archlinux.org/packages/unl0kr
[package-arch]: https://aur.archlinux.org/packages/buffybox
[package-debian]: https://tracker.debian.org/pkg/unl0kr
[package-pmos]: https://gitlab.com/postmarketOS/pmaports/-/tree/master/main/unl0kr
[package-pmos]: https://gitlab.postmarketos.org/postmarketOS/pmaports/-/tree/master/main/unl0kr
[scdoc]: https://git.sr.ht/~sircmpwn/scdoc
[screenshots]: ./screenshots
[squeek2lvgl]: ../squeek2lvgl

View File

@@ -13,6 +13,7 @@
#include <getopt.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
/**
@@ -39,11 +40,14 @@ static void print_usage();
static void init_opts(ul_cli_opts *opts) {
opts->num_config_files = 0;
opts->config_files = NULL;
opts->message = NULL;
opts->hor_res = -1;
opts->ver_res = -1;
opts->x_offset = 0;
opts->y_offset = 0;
opts->dpi = 0;
opts->rotation = LV_DISPLAY_ROTATION_0;
opts->newline = true;
opts->verbose = false;
}
@@ -56,6 +60,7 @@ static void print_usage() {
"password is printed to STDOUT. All other output happens on STDERR.\n"
"\n"
"Mandatory arguments to long options are mandatory for short options too.\n"
" -m, --message A message that will be displayed to a user\n"
" -C, --config-override Path to a config override file. Can be supplied\n"
" multiple times. Config files are merged in the\n"
" following order:\n"
@@ -68,7 +73,15 @@ static void print_usage() {
" vertical pixels, offset horizontally by X\n"
" pixels and vertically by Y pixels\n"
" -d --dpi=N Override the display's DPI value\n"
" -r, --rotate=[0-3] Rotate the UI to the given orientation. The\n"
" values match the ones provided by the kernel in\n"
" /sys/class/graphics/fbcon/rotate.\n"
" * 0 - normal orientation (0 degree)\n"
" * 1 - clockwise orientation (90 degrees)\n"
" * 2 - upside down orientation (180 degrees)\n"
" * 3 - counterclockwise orientation (270 degrees)\n"
" -h, --help Print this message and exit\n"
" -n Do not append a newline character to a password\n"
" -v, --verbose Enable more detailed logging output on STDERR\n"
" -V, --version Print the unl0kr version and exit\n");
/*-------------------------------- 78 CHARS --------------------------------*/
@@ -83,9 +96,11 @@ void ul_cli_parse_opts(int argc, char *argv[], ul_cli_opts *opts) {
init_opts(opts);
struct option long_opts[] = {
{ "message", required_argument, NULL, 'm' },
{ "config-override", required_argument, NULL, 'C' },
{ "geometry", required_argument, NULL, 'g' },
{ "dpi", required_argument, NULL, 'd' },
{ "rotate", required_argument, NULL, 'r' },
{ "help", no_argument, NULL, 'h' },
{ "verbose", no_argument, NULL, 'v' },
{ "version", no_argument, NULL, 'V' },
@@ -94,8 +109,11 @@ void ul_cli_parse_opts(int argc, char *argv[], ul_cli_opts *opts) {
int opt, index = 0;
while ((opt = getopt_long(argc, argv, "C:g:d:hvV", long_opts, &index)) != -1) {
while ((opt = getopt_long(argc, argv, "m:C:g:d:r:hnvV", long_opts, &index)) != -1) {
switch (opt) {
case 'm':
opts->message = strdup(optarg);
break;
case 'C':
opts->config_files = realloc(opts->config_files, (opts->num_config_files + 1) * sizeof(char *));
if (!opts->config_files) {
@@ -119,9 +137,34 @@ void ul_cli_parse_opts(int argc, char *argv[], ul_cli_opts *opts) {
exit(EXIT_FAILURE);
}
break;
case 'r': {
int orientation;
if (sscanf(optarg, "%i", &orientation) != 1 || orientation < 0 || orientation > 3) {
fprintf(stderr, "Invalid orientation argument \"%s\"\n", optarg);
exit(EXIT_FAILURE);
}
switch (orientation) {
case 0:
opts->rotation = LV_DISPLAY_ROTATION_0;
break;
case 1:
opts->rotation = LV_DISPLAY_ROTATION_270;
break;
case 2:
opts->rotation = LV_DISPLAY_ROTATION_180;
break;
case 3:
opts->rotation = LV_DISPLAY_ROTATION_90;
break;
}
break;
}
case 'h':
print_usage();
exit(EXIT_SUCCESS);
case 'n':
opts->newline = false;
break;
case 'v':
opts->verbose = true;
break;

View File

@@ -8,6 +8,7 @@
#define UL_COMMAND_LINE_H
#include <stdbool.h>
#include "lvgl/lvgl.h"
/**
* Options parsed from command line arguments
@@ -17,6 +18,8 @@ typedef struct {
int num_config_files;
/* Paths of config file */
const char **config_files;
/* Message for a user */
const char *message;
/* Horizontal display resolution */
int hor_res;
/* Vertical display resolution */
@@ -27,6 +30,10 @@ typedef struct {
int y_offset;
/* DPI */
int dpi;
/* Display rotation */
lv_display_rotation_t rotation;
/* If true, append a newline character to a password */
bool newline;
/* Verbose mode. If true, provide more detailed logging output on STDERR. */
bool verbose;
} ul_cli_opts;

114
unl0kr/lv_conf.defaults Normal file
View File

@@ -0,0 +1,114 @@
# SPDX-License-Identifier: GPL-3.0-or-later
# Manual post-processing steps for the generated lv_conf.h
# 1. Comment LV_USE_LINUX_DRM (handled by meson.build)
# 2. Remove LV_BIG_ENDIAN_SYSTEM (handled by meson.build)
# 3. Add `#define LV_FONT_CUSTOM_DECLARE LV_FONT_DECLARE(bbx_font_32)` (a bug in generate_lv_conf.py)
LV_COLOR_DEPTH 32
LV_USE_STDLIB_MALLOC LV_STDLIB_CLIB
LV_USE_STDLIB_STRING LV_STDLIB_CLIB
LV_USE_STDLIB_SPRINTF LV_STDLIB_CLIB
LV_USE_DRAW_SW 1
LV_DRAW_SW_COMPLEX 1
LV_DRAW_SW_SUPPORT_RGB565 0
LV_DRAW_SW_SUPPORT_RGB565A8 0
LV_DRAW_SW_SUPPORT_RGB888 1
LV_DRAW_SW_SUPPORT_XRGB8888 1
LV_DRAW_SW_SUPPORT_ARGB8888 1
LV_DRAW_SW_SUPPORT_L8 0
LV_DRAW_SW_SUPPORT_AL88 0
LV_DRAW_SW_SUPPORT_A8 0
LV_DRAW_SW_SUPPORT_I1 0
LV_USE_LOG 1
LV_LOG_LEVEL LV_LOG_LEVEL_WARN
LV_USE_PRIVATE_API 1
LV_FONT_MONTSERRAT_8 0
LV_FONT_MONTSERRAT_10 0
LV_FONT_MONTSERRAT_12 0
LV_FONT_MONTSERRAT_14 0
LV_FONT_MONTSERRAT_16 0
LV_FONT_MONTSERRAT_18 0
LV_FONT_MONTSERRAT_20 0
LV_FONT_MONTSERRAT_22 0
LV_FONT_MONTSERRAT_24 0
LV_FONT_MONTSERRAT_26 0
LV_FONT_MONTSERRAT_28 0
LV_FONT_MONTSERRAT_30 0
LV_FONT_MONTSERRAT_32 0
LV_FONT_MONTSERRAT_34 0
LV_FONT_MONTSERRAT_36 0
LV_FONT_MONTSERRAT_38 0
LV_FONT_MONTSERRAT_40 0
LV_FONT_MONTSERRAT_42 0
LV_FONT_MONTSERRAT_44 0
LV_FONT_MONTSERRAT_46 0
LV_FONT_MONTSERRAT_48 0
LV_FONT_MONTSERRAT_28_COMPRESSED 0
LV_FONT_DEJAVU_16_PERSIAN_HEBREW 0
LV_FONT_SIMSUN_14_CJK 0
LV_FONT_SIMSUN_16_CJK 0
LV_FONT_UNSCII_8 0
LV_FONT_UNSCII_16 0
#LV_FONT_CUSTOM_DECLARE LV_FONT_DECLARE(bbx_font_32)
LV_FONT_DEFAULT &bbx_font_32
LV_WIDGETS_HAS_DEFAULT_VALUE 0
LV_USE_ANIMIMG 0
LV_USE_ARC 0
LV_USE_BAR 0
LV_USE_BUTTON 1
LV_USE_BUTTONMATRIX 1
LV_USE_CALENDAR 0
LV_USE_CANVAS 0
LV_USE_CHART 0
LV_USE_CHECKBOX 0
LV_USE_DROPDOWN 1
LV_USE_IMAGE 1
LV_USE_IMAGEBUTTON 0
LV_USE_KEYBOARD 1
LV_USE_LABEL 1
LV_LABEL_TEXT_SELECTION 0
LV_LABEL_LONG_TXT_HINT 0
LV_USE_LED 0
LV_USE_LINE 0
LV_USE_LIST 0
LV_USE_LOTTIE 0
LV_USE_MENU 0
LV_USE_MSGBOX 1
LV_USE_ROLLER 0
LV_USE_SCALE 0
LV_USE_SLIDER 0
LV_USE_SPAN 0
LV_USE_SPINBOX 0
LV_USE_SPINNER 0
LV_USE_SWITCH 0
LV_USE_TEXTAREA 1
LV_TEXTAREA_DEF_PWD_SHOW_TIME 0 /*ms*/
LV_USE_TABLE 0
LV_USE_TABVIEW 0
LV_USE_TILEVIEW 0
LV_USE_WIN 0
LV_USE_THEME_DEFAULT 0
LV_USE_THEME_SIMPLE 0
LV_USE_THEME_MONO 0
LV_USE_FLEX 1
LV_USE_GRID 0
LV_USE_LINUX_FBDEV 1
LV_LINUX_FBDEV_BSD 0
LV_LINUX_FBDEV_RENDER_MODE LV_DISPLAY_RENDER_MODE_PARTIAL
LV_USE_LINUX_DRM 0
LV_USE_LIBINPUT 1
LV_LIBINPUT_BSD 0
LV_LIBINPUT_XKB 1
LV_BUILD_EXAMPLES 0

File diff suppressed because it is too large Load Diff

View File

@@ -18,7 +18,6 @@
#include "lvgl/lvgl.h"
#include <pthread.h>
#include <signal.h>
#include <stdio.h>
#include <stdlib.h>
@@ -26,6 +25,7 @@
#include <unistd.h>
#include <sys/reboot.h>
#include <sys/stat.h>
#include <sys/time.h>
@@ -40,20 +40,18 @@ bool is_alternate_theme = false;
bool is_password_obscured = true;
bool is_keyboard_hidden = false;
lv_obj_t *container = NULL;
lv_obj_t *keyboard = NULL;
int32_t content_height_with_kb;
int32_t content_height_without_kb;
int32_t content_pad_bottom_with_kb;
int32_t content_pad_bottom_without_kb;
/**
* Static prototypes
*/
/**
* Function to invoke in the tick generation thread.
*
* @param args unused
*/
static void *tick_thread (void *args);
/**
* Handle LV_EVENT_CLICKED events from the theme toggle button.
*
@@ -119,12 +117,13 @@ static void toggle_keyboard_hidden(void);
static void set_keyboard_hidden(bool is_hidden);
/**
* Callback for the keyboard's vertical slide in / out animation.
* Callback for the pad animation.
*
* @param obj keyboard widget
* @param value y position
* @param obj container widget
* @param value the current value of the pad
*/
static void keyboard_anim_y_cb(void *obj, int32_t value);
static void pad_anim_cb(void *obj, int32_t value);
/**
* Handle LV_EVENT_VALUE_CHANGED events from the keyboard layout dropdown.
@@ -199,16 +198,6 @@ static void sigaction_handler(int signum);
* Static functions
*/
static void *tick_thread (void *args) {
LV_UNUSED(args);
while (1) {
usleep(5 * 1000); /* Sleep for 5 millisecond */
lv_tick_inc(5); /* Tell LVGL that 5 milliseconds have elapsed */
}
return NULL;
}
static void toggle_theme_btn_clicked_cb(lv_event_t *event) {
LV_UNUSED(event);
toggle_theme();
@@ -254,22 +243,43 @@ static void toggle_keyboard_hidden(void) {
static void set_keyboard_hidden(bool is_hidden) {
if (!conf_opts.general.animations) {
lv_obj_set_y(keyboard, is_hidden ? lv_obj_get_height(keyboard) : 0);
lv_obj_set_height(container, is_hidden? content_height_without_kb : content_height_with_kb);
lv_obj_set_style_pad_bottom(container,
is_hidden? content_pad_bottom_without_kb : content_pad_bottom_with_kb, LV_PART_MAIN);
return;
}
lv_anim_t keyboard_anim;
lv_anim_init(&keyboard_anim);
lv_anim_set_var(&keyboard_anim, keyboard);
lv_anim_set_values(&keyboard_anim, is_hidden ? 0 : lv_obj_get_height(keyboard), is_hidden ? lv_obj_get_height(keyboard) : 0);
lv_anim_set_var(&keyboard_anim, container);
lv_anim_set_exec_cb(&keyboard_anim, (lv_anim_exec_xcb_t) lv_obj_set_height);
lv_anim_set_path_cb(&keyboard_anim, lv_anim_path_ease_out);
lv_anim_set_time(&keyboard_anim, 500);
lv_anim_set_exec_cb(&keyboard_anim, keyboard_anim_y_cb);
lv_anim_set_values(&keyboard_anim,
is_hidden? content_height_with_kb : content_height_without_kb,
is_hidden? content_height_without_kb : content_height_with_kb);
lv_anim_start(&keyboard_anim);
if (content_pad_bottom_with_kb != content_pad_bottom_without_kb) {
lv_anim_t pad_anim;
lv_anim_init(&pad_anim);
lv_anim_set_var(&pad_anim, container);
lv_anim_set_exec_cb(&pad_anim, pad_anim_cb);
lv_anim_set_path_cb(&pad_anim, lv_anim_path_ease_out);
lv_anim_set_time(&pad_anim, 500);
lv_anim_set_values(&pad_anim,
is_hidden? content_pad_bottom_with_kb : content_pad_bottom_without_kb,
is_hidden? content_pad_bottom_without_kb : content_pad_bottom_with_kb);
lv_anim_start(&pad_anim);
}
}
static void keyboard_anim_y_cb(void *obj, int32_t value) {
lv_obj_set_y(obj, value);
static void pad_anim_cb(void *obj, int32_t value) {
lv_obj_set_style_pad_bottom(obj, value, LV_PART_MAIN);
}
static void layout_dropdown_value_changed_cb(lv_event_t *event) {
@@ -313,8 +323,8 @@ static void shutdown_mbox_declined_cb(lv_event_t *event) {
static void keyboard_value_changed_cb(lv_event_t *event) {
lv_obj_t *kb = lv_event_get_target(event);
uint16_t btn_id = lv_btnmatrix_get_selected_btn(kb);
if (btn_id == LV_BTNMATRIX_BTN_NONE) {
uint16_t btn_id = lv_buttonmatrix_get_selected_button(kb);
if (btn_id == LV_BUTTONMATRIX_BUTTON_NONE) {
return;
}
@@ -336,11 +346,11 @@ static void textarea_ready_cb(lv_event_t *event) {
static void print_password_and_exit(lv_obj_t *textarea) {
/* Print the password to STDOUT */
printf("%s\n", lv_textarea_get_text(textarea));
printf(cli_opts.newline? "%s\n" : "%s", lv_textarea_get_text(textarea));
/* Clear the screen so that when the password field was unobscured, it cannot
* leak via stale display buffers after we've exited */
lv_obj_t *rect = lv_obj_create(lv_scr_act());
lv_obj_t *rect = lv_obj_create(lv_screen_active());
lv_obj_set_size(rect, LV_PCT(100), LV_PCT(100));
lv_obj_set_pos(rect, 0, 0);
lv_obj_set_style_bg_opa(rect, LV_OPA_COVER, LV_PART_MAIN);
@@ -379,6 +389,13 @@ int main(int argc, char *argv[]) {
/* Announce ourselves */
bbx_log(BBX_LOG_LEVEL_VERBOSE, "unl0kr %s", PROJECT_VERSION);
/* Check that we have access to the clock */
struct timespec ts;
if (clock_gettime(CLOCK_MONOTONIC, &ts) == -1) {
bbx_log(BBX_LOG_LEVEL_ERROR, "Unable to read the clock");
exit(EXIT_FAILURE);
}
/* Parse config files */
ul_config_init_opts(&conf_opts);
ul_config_parse_file("/usr/share/unl0kr/unl0kr.conf", &conf_opts);
@@ -399,10 +416,6 @@ int main(int argc, char *argv[]) {
lv_init();
lv_log_register_print_cb(bbx_log_print_cb);
/* Start the tick thread */
pthread_t ticker;
pthread_create(&ticker, NULL, tick_thread, NULL);
/* Initialise display */
lv_display_t *disp = NULL;
switch (conf_opts.general.backend) {
@@ -420,7 +433,23 @@ int main(int argc, char *argv[]) {
case UL_BACKENDS_BACKEND_DRM:
bbx_log(BBX_LOG_LEVEL_VERBOSE, "Using DRM backend");
disp = lv_linux_drm_create();
lv_linux_drm_set_file(disp, "/dev/dri/card0", -1);
char *format_string = "/dev/dri/card%d";
char drm_path[16] = {0};
struct stat buffer;
for (size_t i = 0; i < 9; i++) {
sprintf(drm_path, format_string, i);
if (stat(drm_path, &buffer) != 0) {
continue;
}
lv_linux_drm_set_file(disp, drm_path, -1);
break;
}
break;
#endif /* LV_USE_LINUX_DRM */
default:
@@ -431,16 +460,15 @@ int main(int argc, char *argv[]) {
/* Override display properties with command line options if necessary */
lv_display_set_offset(disp, cli_opts.x_offset, cli_opts.y_offset);
if (cli_opts.hor_res > 0 || cli_opts.ver_res > 0) {
lv_display_set_physical_resolution(disp, lv_disp_get_hor_res(disp), lv_disp_get_ver_res(disp));
lv_display_set_physical_resolution(disp, lv_display_get_horizontal_resolution(disp), lv_display_get_vertical_resolution(disp));
lv_display_set_resolution(disp, cli_opts.hor_res, cli_opts.ver_res);
}
if (cli_opts.dpi > 0) {
lv_display_set_dpi(disp, cli_opts.dpi);
}
/* Store final display resolution for convenient later access */
const uint32_t hor_res = lv_disp_get_hor_res(disp);
const uint32_t ver_res = lv_disp_get_ver_res(disp);
/* Set up display rotation */
lv_display_set_rotation(disp, cli_opts.rotation);
/* Prepare for routing physical keyboard input into the textarea */
lv_group_t *keyboard_input_group = lv_group_create();
@@ -457,40 +485,33 @@ int main(int argc, char *argv[]) {
/* Initialise theme */
set_theme(is_alternate_theme);
/* Prevent scrolling when keyboard is off-screen */
lv_obj_clear_flag(lv_scr_act(), LV_OBJ_FLAG_SCROLLABLE);
/* Figure out a few numbers for sizing and positioning */
const int base_keyboard_height = ver_res > hor_res ? ver_res / 3 : ver_res / 2; /* Height for 4 rows */
const int keyboard_height = base_keyboard_height * 1.25; /* Add space for an extra top row */
const int padding = keyboard_height / 10;
const int textarea_container_max_width = LV_MIN(hor_res, ver_res);
const int32_t hor_res = lv_display_get_horizontal_resolution(disp);
const int32_t ver_res = lv_display_get_vertical_resolution(disp);
const int32_t keyboard_height = ver_res > hor_res ? ver_res / 2.5 : ver_res / 1.8; /* Height for 5 rows */
/* Main flexbox */
lv_obj_t *container = lv_obj_create(lv_scr_act());
lv_obj_set_flex_flow(container, LV_FLEX_FLOW_COLUMN);
lv_obj_set_flex_align(container, LV_FLEX_ALIGN_CENTER, LV_FLEX_ALIGN_CENTER, LV_FLEX_ALIGN_CENTER);
lv_obj_set_size(container, LV_PCT(100), ver_res - keyboard_height);
lv_obj_set_pos(container, 0, 0);
lv_obj_clear_flag(container, LV_OBJ_FLAG_SCROLLABLE);
/* Prevent scrolling when keyboard is off-screen */
lv_obj_t *screen = lv_screen_active();
lv_theme_apply(screen);
lv_obj_set_flex_flow(screen, LV_FLEX_FLOW_COLUMN);
lv_obj_remove_flag(screen, LV_OBJ_FLAG_SCROLLABLE);
/* Header flexbox */
lv_obj_t *header = lv_obj_create(container);
lv_obj_t *header = lv_obj_create(screen);
lv_obj_add_flag(header, BBX_WIDGET_HEADER);
lv_theme_apply(header); /* Force re-apply theme after setting flag so that the widget can be identified */
lv_obj_set_flex_flow(header, LV_FLEX_FLOW_ROW);
lv_obj_set_flex_align(header, LV_FLEX_ALIGN_CENTER, LV_FLEX_ALIGN_CENTER, LV_FLEX_ALIGN_CENTER);
lv_obj_set_size(header, LV_PCT(100), LV_SIZE_CONTENT);
/* Theme switcher button */
lv_obj_t *toggle_theme_btn = lv_btn_create(header);
lv_obj_t *toggle_theme_btn = lv_button_create(header);
lv_obj_add_event_cb(toggle_theme_btn, toggle_theme_btn_clicked_cb, LV_EVENT_CLICKED, NULL);
lv_obj_t *toggle_theme_btn_label = lv_label_create(toggle_theme_btn);
lv_label_set_text(toggle_theme_btn_label, UL_SYMBOL_ADJUST);
lv_obj_center(toggle_theme_btn_label);
/* Show / hide keyboard button */
lv_obj_t *toggle_kb_btn = lv_btn_create(header);
lv_obj_t *toggle_kb_btn = lv_button_create(header);
lv_obj_add_event_cb(toggle_kb_btn, toggle_kb_btn_clicked_cb, LV_EVENT_CLICKED, NULL);
lv_obj_t *toggle_kb_btn_label = lv_label_create(toggle_kb_btn);
lv_label_set_text(toggle_kb_btn_label, LV_SYMBOL_KEYBOARD);
@@ -508,25 +529,58 @@ int main(int argc, char *argv[]) {
lv_obj_set_flex_grow(spacer, 1);
/* Shutdown button */
lv_obj_t *shutdown_btn = lv_btn_create(header);
lv_obj_t *shutdown_btn = lv_button_create(header);
lv_obj_add_event_cb(shutdown_btn, shutdown_btn_clicked_cb, LV_EVENT_CLICKED, NULL);
lv_obj_t *shutdown_btn_label = lv_label_create(shutdown_btn);
lv_label_set_text(shutdown_btn_label, LV_SYMBOL_POWER);
lv_obj_center(shutdown_btn_label);
/* Flexible spacer */
lv_obj_t *flexible_spacer = lv_obj_create(container);
lv_obj_set_size(flexible_spacer, LV_PCT(100), 0);
lv_obj_set_flex_grow(flexible_spacer, 1);
lv_obj_update_layout(layout_dropdown);
const int32_t dropwdown_height = lv_obj_get_height(layout_dropdown);
lv_obj_set_size(toggle_theme_btn, dropwdown_height, dropwdown_height);
lv_obj_set_size(toggle_kb_btn, dropwdown_height, dropwdown_height);
lv_obj_set_size(shutdown_btn, dropwdown_height, dropwdown_height);
lv_obj_update_layout(header);
content_height_without_kb = ver_res - lv_obj_get_height(header);
content_height_with_kb = content_height_without_kb - keyboard_height;
/* Container for a message and an input field */
container = lv_obj_create(screen);
lv_obj_set_flex_flow(container, LV_FLEX_FLOW_COLUMN);
lv_obj_set_flex_align(container, LV_FLEX_ALIGN_END, LV_FLEX_ALIGN_START, LV_FLEX_ALIGN_START);
lv_obj_set_size(container, LV_PCT(100), is_keyboard_hidden? content_height_without_kb : content_height_with_kb);
lv_obj_set_style_pad_top(container, 10, LV_PART_MAIN);
lv_obj_set_style_pad_left(container, 20, LV_PART_MAIN);
lv_obj_set_style_pad_right(container, 20, LV_PART_MAIN);
int32_t content_pad_row = 10;
/* Message for a user */
lv_obj_t *message_label = NULL;
if (cli_opts.message) {
lv_obj_set_style_pad_row(container, content_pad_row, LV_PART_MAIN);
/* lv_label does not support wrapping and scrolling simultaneously,
so we place it in a scrollable container */
lv_obj_t *message_container = lv_obj_create(container);
lv_obj_set_width(message_container, LV_PCT(100));
lv_obj_set_flex_flow(message_container, LV_FLEX_FLOW_COLUMN);
lv_obj_set_flex_grow(message_container, 1);
lv_obj_t *message_spacer = lv_obj_create(message_container);
lv_obj_set_width(message_spacer, 0);
lv_obj_set_flex_grow(message_spacer, 1);
message_label = lv_label_create(message_container);
lv_obj_set_size(message_label, LV_PCT(100), LV_SIZE_CONTENT);
lv_label_set_text(message_label, cli_opts.message);
}
/* Textarea flexbox */
lv_obj_t *textarea_container = lv_obj_create(container);
lv_obj_set_size(textarea_container, LV_PCT(100), LV_SIZE_CONTENT);
lv_obj_set_style_max_width(textarea_container, textarea_container_max_width, LV_PART_MAIN);
lv_obj_set_flex_flow(textarea_container, LV_FLEX_FLOW_ROW);
lv_obj_set_flex_align(textarea_container, LV_FLEX_ALIGN_CENTER, LV_FLEX_ALIGN_CENTER, LV_FLEX_ALIGN_CENTER);
lv_obj_set_style_pad_left(textarea_container, padding, LV_PART_MAIN);
lv_obj_set_style_pad_right(textarea_container, padding, LV_PART_MAIN);
/* Textarea */
lv_obj_t *textarea = lv_textarea_create(textarea_container);
@@ -541,27 +595,34 @@ int main(int argc, char *argv[]) {
/* Route physical keyboard input into textarea */
lv_group_add_obj(keyboard_input_group, textarea);
lv_obj_update_layout(textarea);
const int32_t textarea_height = lv_obj_get_height(textarea);
/* Reveal / obscure password button */
lv_obj_t *toggle_pw_btn = lv_btn_create(textarea_container);
const int textarea_height = lv_obj_get_height(textarea);
lv_obj_t *toggle_pw_btn = lv_button_create(textarea_container);
lv_obj_set_size(toggle_pw_btn, textarea_height, textarea_height);
lv_obj_t *toggle_pw_btn_label = lv_label_create(toggle_pw_btn);
lv_obj_center(toggle_pw_btn_label);
lv_label_set_text(toggle_pw_btn_label, LV_SYMBOL_EYE_OPEN);
lv_obj_add_event_cb(toggle_pw_btn, toggle_pw_btn_clicked_cb, LV_EVENT_CLICKED, NULL);
/* Set header button size to match dropdown (for some reason the height is only available here) */
const int dropwdown_height = lv_obj_get_height(layout_dropdown);
lv_obj_set_size(toggle_theme_btn, dropwdown_height, dropwdown_height);
lv_obj_set_size(toggle_kb_btn, dropwdown_height, dropwdown_height);
lv_obj_set_size(shutdown_btn, dropwdown_height, dropwdown_height);
/* The bottom pad is used to center content when the keyboard is hidden */
content_pad_bottom_with_kb = 20;
/* Fixed spacer */
lv_obj_t *fixed_spacer = lv_obj_create(container);
lv_obj_set_size(fixed_spacer, LV_PCT(100), padding);
int32_t content_native_height = textarea_height;
if (cli_opts.message) {
lv_obj_update_layout(message_label);
content_native_height += content_pad_row + lv_obj_get_height(message_label);
}
content_pad_bottom_without_kb = (content_height_without_kb - content_native_height) / 2;
if (content_pad_bottom_without_kb < content_pad_bottom_with_kb)
content_pad_bottom_without_kb = content_pad_bottom_with_kb;
lv_obj_set_style_pad_bottom(container, is_keyboard_hidden? content_pad_bottom_without_kb : content_pad_bottom_with_kb, LV_PART_MAIN);
/* Keyboard (after textarea / label so that key popovers are not drawn over) */
keyboard = lv_keyboard_create(lv_scr_act());
keyboard = lv_keyboard_create(screen);
lv_keyboard_set_mode(keyboard, LV_KEYBOARD_MODE_TEXT_LOWER);
lv_keyboard_set_textarea(keyboard, textarea);
uint32_t num_keyboard_events = lv_obj_get_event_count(keyboard);
@@ -573,8 +634,7 @@ int main(int argc, char *argv[]) {
}
lv_obj_add_event_cb(keyboard, keyboard_value_changed_cb, LV_EVENT_VALUE_CHANGED, NULL);
lv_obj_add_event_cb(keyboard, keyboard_ready_cb, LV_EVENT_READY, NULL);
lv_obj_set_pos(keyboard, 0, is_keyboard_hidden ? keyboard_height : 0);
lv_obj_set_size(keyboard, hor_res, keyboard_height);
lv_obj_set_size(keyboard, LV_PCT(100), keyboard_height);
bbx_theme_prepare_keyboard(keyboard);
/* Apply textarea options */
@@ -590,12 +650,19 @@ int main(int argc, char *argv[]) {
/* Periodically run timer / task handler */
uint32_t timeout = conf_opts.general.timeout * 1000; /* ms */
while(1) {
if (!timeout || lv_disp_get_inactive_time(NULL) < timeout) {
uint32_t time_till_next = lv_timer_handler();
usleep(time_till_next * 1000);
} else if (timeout) {
shutdown();
uint32_t time_till_next = lv_timer_handler();
if (timeout != 0) {
uint32_t time_idle = lv_display_get_inactive_time(NULL);
if (time_idle >= timeout)
shutdown();
uint32_t time_till_shutdown = timeout - time_idle;
if (time_till_shutdown < time_till_next)
time_till_next = time_till_shutdown;
}
usleep(time_till_next * 1000);
}
return 0;

View File

@@ -1,8 +1,6 @@
# Copyright 2021 Clayton Craft
# SPDX-License-Identifier: GPL-3.0-or-later
depxkbcommon = dependency('xkbcommon')
unl0kr_sources = files(
'backends.c',
'command_line.c',
@@ -17,18 +15,45 @@ unl0kr_dependencies = [
depxkbcommon
]
unl0kr_args = []
deplibdrm = dependency('libdrm', required: get_option('with-drm'))
if deplibdrm.found()
unl0kr_dependencies += deplibdrm
add_project_arguments('-DLV_USE_LINUX_DRM=1', language: 'c')
unl0kr_args += '-DLV_USE_LINUX_DRM=1'
else
unl0kr_args += '-DLV_USE_LINUX_DRM=0'
endif
executable('unl0kr',
include_directories: common_include_dirs,
sources: unl0kr_sources + shared_sources + squeek2lvgl_sources + lvgl_sources,
dependencies: unl0kr_dependencies,
c_args: unl0kr_args,
install: true
)
install_data('unl0kr.conf', install_dir: get_option('sysconfdir'))
depsystemd = dependency('systemd', required: get_option('systemd-password-agent'))
if depsystemd.found()
executable('unl0kr-agent',
sources: files('unl0kr-agent.c'),
dependencies: depinih,
c_args: '-DUNL0KR_BINARY="@0@"'.format(get_option('prefix') / get_option('bindir') / 'unl0kr'),
install: true,
install_dir: get_option('libexecdir')
)
system_unit_dir = depsystemd.get_variable(pkgconfig: 'systemd_system_unit_dir')
install_data('unl0kr-agent.path', install_dir: system_unit_dir)
configure_file(
configuration: {'LIBEXECDIR': get_option('prefix') / get_option('libexecdir')},
input: 'unl0kr-agent.service.in',
output: 'unl0kr-agent.service',
install: true,
install_dir: system_unit_dir
)
endif

View File

@@ -80,7 +80,7 @@ while read -r theme; do
readme="$readme"$'\n'"## $theme"$'\n\n'
for res in ${resolutions[@]}; do
$executable -g $res -C $config &
$executable -m "Please enter a password to unlock the root volume" -g $res -C $config &
pid=$!
sleep 3 # Wait for UI to render

Binary file not shown.

Before

Width:  |  Height:  |  Size: 16 KiB

After

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 17 KiB

After

Width:  |  Height:  |  Size: 19 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 16 KiB

After

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 23 KiB

After

Width:  |  Height:  |  Size: 25 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 11 KiB

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 13 KiB

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 14 KiB

After

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 12 KiB

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 13 KiB

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 16 KiB

After

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 16 KiB

After

Width:  |  Height:  |  Size: 19 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 16 KiB

After

Width:  |  Height:  |  Size: 19 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 22 KiB

After

Width:  |  Height:  |  Size: 24 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 11 KiB

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 13 KiB

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 15 KiB

After

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 12 KiB

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 13 KiB

After

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 15 KiB

After

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 16 KiB

After

Width:  |  Height:  |  Size: 19 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 16 KiB

After

Width:  |  Height:  |  Size: 19 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 22 KiB

After

Width:  |  Height:  |  Size: 24 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 11 KiB

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 12 KiB

After

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 14 KiB

After

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 12 KiB

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 13 KiB

After

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 15 KiB

After

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 16 KiB

After

Width:  |  Height:  |  Size: 19 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 16 KiB

After

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 22 KiB

After

Width:  |  Height:  |  Size: 24 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 11 KiB

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 12 KiB

After

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 14 KiB

After

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 12 KiB

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 13 KiB

After

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 15 KiB

After

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 16 KiB

After

Width:  |  Height:  |  Size: 19 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 16 KiB

After

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 22 KiB

After

Width:  |  Height:  |  Size: 24 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 11 KiB

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 12 KiB

After

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 14 KiB

After

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 12 KiB

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 13 KiB

After

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 15 KiB

After

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 16 KiB

After

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 16 KiB

After

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 21 KiB

After

Width:  |  Height:  |  Size: 23 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 11 KiB

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 12 KiB

After

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 13 KiB

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 12 KiB

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 13 KiB

After

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 15 KiB

After

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 16 KiB

After

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 16 KiB

After

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 21 KiB

After

Width:  |  Height:  |  Size: 23 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 11 KiB

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 12 KiB

After

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 13 KiB

After

Width:  |  Height:  |  Size: 16 KiB

Some files were not shown because too many files have changed in this diff Show More