Commit graph

127 commits

Author SHA1 Message Date
bunnie
9512defd2d add base64 dep for showing bip39 seeds 2025-04-29 03:00:44 +08:00
bunnie
9b5510985f initial take at bip39 entry 2025-04-29 03:00:30 +08:00
bunnie
da7efec6a6 add clone operation for gfx 2025-04-28 19:02:27 +08:00
bunnie
e55630fd57 allow for centering of list items
and make OSK entries centered

this makes the list a little nicer to navigate
2025-04-28 19:01:59 +08:00
bunnie
8be197a2b5 initial slider implementation 2025-04-28 19:01:31 +08:00
bunnie
3b0543a5f0 add supporting changes for textentry 2025-04-28 18:19:36 +08:00
bunnie
e690da3f77 add textentry implementation
includes a simple on-screen keyboard element
2025-04-28 18:18:57 +08:00
bunnie
87b4b18210 cleanup an api change in gfx visibility 2025-04-28 15:18:54 +08:00
bunnie
500df9714e an initial take at a checkbox implementation 2025-04-28 15:18:38 +08:00
bunnie
0d3563412e add more APIs to scrolling list widget
these facilitate checkbox implementation
2025-04-28 15:18:10 +08:00
bunnie
c90c449d32 make pane height adjustable
this allows for top/bottom text on modals...
2025-04-28 03:18:07 +08:00
bunnie
1ac5a55d25 cleanup height calculations 2025-04-28 03:17:50 +08:00
bunnie
a40279ef1e remove errant clear 2025-04-28 03:17:27 +08:00
bunnie
10044579aa initial take at radiobuttons 2025-04-28 02:27:41 +08:00
bunnie
39b0fb9e12 remove lifetime from builder pattern
this causes integration issues with the enum_dispatch macro
2025-04-28 02:27:16 +08:00
bunnie
c657d4db54 fix typo 2025-04-28 02:03:23 +08:00
bunnie
ac19def8df add scrollbars 2025-04-28 02:01:24 +08:00
bunnie
e56acbd243 first take at a 2-d scrolling widget 2025-04-28 01:18:25 +08:00
bunnie
1484453100 add scroll widget stub 2025-04-21 00:38:25 +08:00
bunnie
f394ccab42
Merge branch 'main' into cram-dev 2025-03-05 20:56:36 +08:00
bunnie
c49c41699b cleanup warning 2025-03-05 20:54:03 +08:00
bunnie
57a4f24a02 restrict ObjectList to std targets only 2025-03-04 19:11:23 +08:00
bunnie
63a9a2b0a0 implement notification models for small screens 2025-03-04 19:06:41 +08:00
bunnie
1e9e02435b add missing model boilerplate
a lot of routines were left blank in the initial port to get
through the core graphics primitives porting. This commit
fills in those missing bits in a fashion that optimizes the
modals for drawing on small displays.
2025-03-04 19:05:41 +08:00
bunnie
3c5975715d kind of hack to make font rendering work on oled displays
so, there is a fundamental abstraction mismatch in the blitstr
library. In Precursor, I created a rule that you can't draw text
on black backgrounds without some special permissions in highly
trusted contexts.

For baosec, this restriction is removed because the whole OS
can run inside a single chip (i.e. we have eliminated most
easy RAM modification attacks, requires probing/glitching; but
as a trade-off, we don't have as much RAM so we can't afford the
extra abstractions).

The compromise is for OLED-type platforms where inverse drawing
is very common to save power, all text ops are assumed to be XOR
operations (so you're always flipping pixels instead of drawing
at a defined color).
2025-03-04 19:02:45 +08:00
bunnie
15f41a5f5b object list API elements 2025-03-04 19:01:47 +08:00
bunnie
5d4d009e64 add object list draw routine
this can accelerate drawing of complicated objects, such as
QR codes, that are composed of many rectangles.

there are some warts...in theory, this should be able to seralize
arbitrary-sized lists, but there must be some bug somewhere
that is preventing it from happening. For now, the list length
is clipped to the capacity of a page of memory.
2025-03-04 19:00:33 +08:00
bunnie
8602af4d18 add modals adapter code
initial take just lifted directly from the gam version;
layout details needs adapting for small screen still
2025-03-04 02:07:17 +08:00
bunnie
c67cb7666c fixup feature dependencies 2025-03-04 01:26:03 +08:00
bunnie
da5c215477 fix type defaults for trait
part of the i16->isize transition
2025-03-03 02:12:57 +08:00
bunnie
433d632926 add a clear, modals & text bounds api calls
the text bounds api call is needed in v2 because there is no gam
to mediate this call

clear allows for a fast clear operation that may have hardware
dependent consequences

acquire/release of modals mode is added to the graphics server
as well to implement a feature previously handled by the gam
2025-03-03 02:11:23 +08:00
bunnie
b1ce74faa0 add handler for unspecified clipping areas in v2 targets 2025-03-03 02:10:50 +08:00
bunnie
2957cce789 add some v2 graphics api adapters and opcodes 2025-03-03 02:10:24 +08:00
bunnie
02bc28be4a
Merge branch 'main' into cram-dev 2025-02-28 17:44:58 +08:00
bunnie
b6ed2c7398 fix cursor overlay in sh1107 display mode 2025-02-28 17:30:17 +08:00
bunnie
317bc6a9fd related to previous commit 2025-02-28 16:33:14 +08:00
bunnie
48009c710a regenerate logo according to new framebuffer layout 2025-02-27 21:35:10 +08:00
bunnie
f3fccf9135 fix unnecessary mutability in trait 2025-02-27 03:12:41 +08:00
bunnie
6e26db411a
Merge branch 'main' into cram-dev 2025-02-26 14:57:55 +08:00
bunnie
f5473868b1 fix return calls to use scalar5 instead of scalar2 2025-02-26 14:37:20 +08:00
bunnie
4096b35fef refactor shared implementation to use reply and receive next api 2025-02-26 14:36:50 +08:00
bunnie
a9c9d8d67b commit generated logo 2025-02-24 00:57:03 +08:00
bunnie
d281332b16 fixup conversion to simplify the image blit operation 2025-02-24 00:56:33 +08:00
bunnie
55cbe7a962 add module ref to handlers 2025-02-23 18:06:45 +08:00
bunnie
d50d228984 move baseline graphics handlers to a shared library 2025-02-23 18:06:25 +08:00
bunnie
0d5a4e8e91
Merge branch 'main' into cram-dev 2025-02-23 12:15:37 +08:00
bunnie
9f890d3dbd add camera irq opcode to main graphics handler opcode list 2025-02-23 12:04:17 +08:00
bunnie
35fe7ed73f add bitmaps for logos 2025-02-23 11:56:57 +08:00
bunnie
7e57af5841 add documentation target for library
this helps cargo doc to run
2025-02-22 01:07:12 +08:00
bunnie
56123fea8d fix doc warnings 2025-02-22 01:07:01 +08:00
bunnie
b8b1bfed03 fix doc warnings 2025-02-22 01:06:46 +08:00
bunnie
cc8a0a57a7 fixup apis to use traits 2025-02-21 23:42:01 +08:00
bunnie
8acb9e7521 add platform implementations of the frame buffer trait 2025-02-21 23:41:44 +08:00
bunnie
b352ecb667 remove platform-specific operation and replace with a trait 2025-02-21 23:41:19 +08:00
bunnie
d9d48262ac expand FrameBuffer trait to interop with precursor details 2025-02-21 23:09:45 +08:00
bunnie
19f3221417 final changes to make ux-api platform-independent 2025-02-21 17:44:54 +08:00
bunnie
30c5876ad4 add missing apis/derives to minigfx to make it precursor-compatible 2025-02-21 17:43:50 +08:00
bunnie
07563c44db add precursor as a platform to ux-api 2025-02-21 17:43:23 +08:00
bunnie
5e258916da migrate graphics library API to a platform-neutral service crate
this kicks off an enormous set of refactoring changes...
2025-02-21 17:42:39 +08:00
bunnie
558c61ada7
Merge branch 'main' into cram-dev 2025-02-20 15:10:47 +08:00
bunnie
2235f7a3f1 clean up ux-api to be no-std clean
ux-api can't do rkyv derives and rely on std items in a
no-std environment. This is necessary because some of the
base layer APIs (frame buffers, points, etc.) are relied
upon in a no-std loader environment to render diagnostics
to the screen. Thus ux-api needs to have a baseline of
primitives available without a std flag.
2025-02-20 13:32:52 +08:00
bunnie
4872bbcee1 remove useless name argument in this version of the api 2025-02-18 23:20:48 +08:00
bunnie
88be6b66ba
Merge branch 'main' into cram-dev 2025-02-17 18:35:38 +08:00
bunnie
73114f8d8d clean up ux-api integration with blitstr2
a bunch of imports were in here that should be in blitstr2
let's test this out and see how well these abstractions hold up
as we configure the rest of the OS around it.
2025-02-17 18:27:55 +08:00
bunnie
e1bc6eac56 remove copy of blitstr2 from ux-api; move blitstr2 to lib location 2025-02-13 17:41:07 +08:00
bunnie
ae856ecc82 start to add in skeletons of trait implementations for ux elements 2025-02-13 17:28:56 +08:00
bunnie
0bfb864873 add boasec to font feature selection; prepare for moving blitstr crate 2025-02-13 17:26:54 +08:00
bunnie
c2c1c8bc91 update top level libs and cargo for all the ported-in files 2025-02-11 16:24:51 +08:00
bunnie
f7193ae29c port in more helper routines 2025-02-11 16:24:30 +08:00
bunnie
3890008af1 make platform directory for graphics
trying to keep it as platform neutral as possible but it seems
we need to be able to know the size of the framebuffer at least
2025-02-11 16:23:45 +08:00
bunnie
5ed3f41bea add blitstr to the minigfx lib 2025-02-11 16:23:26 +08:00
bunnie
2a4d91d9be expand primitives in minigfx library 2025-02-11 16:23:06 +08:00
bunnie
79fae48bd8 add widget scaffolds 2025-02-11 16:22:50 +08:00
buncram
9cdb967741 add widgets to ux-api 2025-02-11 08:33:42 +08:00
buncram
69baf0f6e8 some initial notions of what widgets might look like 2025-02-11 08:33:09 +08:00
bunnie
437a5a2520 modify fast dma test for clocking option 2025-02-08 05:20:25 +08:00
bunnie
19de313067 add ux-api
ux-api is meant to be a platform-independent set of APIs for
elements involving UX interchange in xous. In particular, it
sets up the path for portability of the gfx/minigfx crates and modals.
2025-02-02 07:00:24 +08:00