Skip to content

Releases: gavinhsmith/titrmlib

v0.4.2

Choose a tag to compare

@github-actions github-actions released this 24 Sep 21:55
b0b55ef

titrmlib v0.4.2

Format strings for titles, list items and labels without linking the C library's printf.

New

  • term_snprintf and term_vsnprintf: format into your own buffer with titrmlib's formatter, e.g. term_snprintf(title, sizeof title, "Password: %s", ssid). They follow C's snprintf rules: at most size - 1 characters plus a terminator, and they return the full length. Using snprintf itself would link CEdev's printf again, about 8 KB.

No API changes. titrm.h now includes <stdarg.h>.

Using titrmlib

  1. Unzip titrmlib-v0.4.2.zip into your CEdev project's lib/ folder, giving lib/titrmlib/.

  2. Add its sources to your project's makefile:

    CFLAGS = -Wall -Wextra -Oz -Ilib/titrmlib/src
    EXTRA_C_SOURCES = $(wildcard lib/titrmlib/src/*.c)
  3. #include "titrm.h" and build with make.

Keep the library inside your project directory: on Windows, CEdev can't build sources reached through ... The calculator needs the CE C libraries.

API reference: https://gavinhsmith.github.io/titrmlib/

v0.4.1

Choose a tag to compare

@github-actions github-actions released this 24 Sep 18:47

titrmlib v0.4.1

Less RAM and smaller programs, with no API changes.

Improved

  • About 7.6 KB less RAM: screens are composed a row at a time instead of in a second copy of the screen (−6.2 KB), input buffers are allocated per input instead of in every panel (−1.2 KB), and scene and overlay panels store less.
  • Smaller panel pool if you want it: build with e.g. -DTERM_MAX_PANELS=12 to save about 80 bytes per panel you don't need. The default is still 32.
  • Smaller demo: it avoids snprintf, so the C library's printf (~8 KB) isn't linked. Use term_text_appendf and term_panel_printf in your own programs for the same saving.
  • Screens are drawn exactly as before.

Using titrmlib

  1. Unzip titrmlib-v0.4.1.zip into your CEdev project's lib/ folder, giving lib/titrmlib/.

  2. Add its sources to your project's makefile:

    CFLAGS = -Wall -Wextra -Oz -Ilib/titrmlib/src
    EXTRA_C_SOURCES = $(wildcard lib/titrmlib/src/*.c)
  3. #include "titrm.h" and build with make.

Keep the library inside your project directory: on Windows, CEdev can't build sources reached through ... The calculator needs the CE C libraries.

API reference: https://gavinhsmith.github.io/titrmlib/

v0.4.0

Choose a tag to compare

@github-actions github-actions released this 24 Sep 18:05
72eb000

titrmlib v0.4.0

Text formatting: styles, inline styles and tabs, plus smaller programs.

New

  • Text styles: TERM_ATTR_BOLD, TERM_ATTR_ITALIC, TERM_ATTR_UNDERLINE and TERM_ATTR_STRIKE, combinable with each other and with reverse video, anywhere an attribute works, including focus highlights. Underline and strikethrough join across cells.
  • Inline styles: style part of a string with TERM_S_BOLD, TERM_S_NORMAL and friends: "press " TERM_S_BOLD "enter" TERM_S_NORMAL " to connect". Works in printed text, text widgets, logs, list items and labels.
  • Tabs: '\t' moves to the next stop, every 4 columns.
  • Smaller programs: term_panel_printf and term_text_appendf use titrmlib's own formatter instead of the toolchain's printf, saving about 6 KB when your program doesn't use printf itself. It supports %d %u %x %X %c %s %%, l and widths; output is no longer cut off at 106 characters.

Breaking changes

  • '\t' (0x09) and ESC (0x1B) are control codes, so their CP437 glyphs (○ and ←) can't be printed.
  • printf floats, precision and %p are no longer supported; they print as written.

Using titrmlib

  1. Unzip titrmlib-v0.4.0.zip into your CEdev project's lib/ folder, giving lib/titrmlib/.

  2. Add its sources to your project's makefile:

    CFLAGS = -Wall -Wextra -Oz -Ilib/titrmlib/src
    EXTRA_C_SOURCES = $(wildcard lib/titrmlib/src/*.c)
  3. #include "titrm.h" and build with make.

Keep the library inside your project directory: on Windows, CEdev can't build sources reached through ... The calculator needs the CE C libraries.

API reference: https://gavinhsmith.github.io/titrmlib/

v0.3.0

Choose a tag to compare

@github-actions github-actions released this 24 Sep 18:05
cf4a272

titrmlib v0.3.0

The full 256-character set: codes outside printable ASCII now follow code page 437, the IBM PC character set.

New

  • Every code has a glyph: box drawing (single and double lines), blocks and shades, accented letters, Greek and math symbols.
  • Joined lines: box drawing and blocks (0xB3–0xDF) join across cells.
  • Signal icons stay at 0x13–0x16, so TERM_CH_SIG0 + level still works.

Breaking changes

  • TERM_CH_CHECK, TERM_CH_CROSSMARK, TERM_CH_DOT and TERM_CH_DOT_EMPTY are removed; the checkbox shows [x]. Other TERM_CH_* names keep their meaning at their CP437 codes.

Using titrmlib

  1. Unzip titrmlib-v0.3.0.zip into your CEdev project's lib/ folder, giving lib/titrmlib/.

  2. Add its sources to your project's makefile:

    CFLAGS = -Wall -Wextra -Oz -Ilib/titrmlib/src
    EXTRA_C_SOURCES = $(wildcard lib/titrmlib/src/*.c)
  3. #include "titrm.h" and build with make.

Keep the library inside your project directory: on Windows, CEdev can't build sources reached through ... The calculator needs the CE C libraries.

API reference: https://gavinhsmith.github.io/titrmlib/

v0.2.0

Choose a tag to compare

@github-actions github-actions released this 23 Sep 06:51

titrmlib v0.2.0

A rework of rendering and input, plus scenes, overlays, new widgets and color.

New

  • Faster screen updates: each panel keeps what was printed into it, and only cells that changed are redrawn. A typical update takes under 50 ms.
  • No lost key presses: keys are queued, and the keypad is read even while a slow frame is drawing.
  • Scenes: several full-screen layouts, one shown at a time, each with its own event handler (term_scene_new, term_scene_switch).
  • Overlays: dialogs drawn on top of a scene, which give focus back when they close (term_overlay_open, term_overlay_open_centered).
  • Widgets: new button and checkbox widgets. The text widget now scrolls and can follow new output, so it also works as a log.
  • Custom widgets: give any panel your own key handling (term_panel_set_keys) and send your own events (term_panel_send). Panels also get alignment, a focus style and an [enter]-to-submit option.
  • Color: foreground and background colors per panel (term_panel_set_colors, TERM_COLOR_*). Panels split from a colored panel start with its colors.
  • Events: new TERM_EV_CHANGE, TERM_EV_FOCUS_LOST, TERM_EV_SCENE_ENTER and TERM_EV_SCENE_LEAVE.

Breaking changes

  • Focus is now controlled by the app. term_focus_next is removed, and [vars] arrives as TERM_KEY_VARS; call term_focus yourself.
  • The log widget is removed; use a text widget with term_text_append and term_text_autoscroll.
  • term_panel_set_draw is removed. Output stays until you change it, so print when your state changes.
  • The event handler now returns bool: true if it handled the event.
  • The keypad is read with keypadc, so the CE C libraries must be on the calculator.

Using titrmlib

  1. Unzip titrmlib-v0.2.0.zip into your CEdev project's lib/ folder, giving lib/titrmlib/.

  2. Add its sources to your project's makefile:

    CFLAGS = -Wall -Wextra -Oz -Ilib/titrmlib/src
    EXTRA_C_SOURCES = $(wildcard lib/titrmlib/src/*.c)
  3. #include "titrm.h" and build with make.

Keep the library inside your project directory: on Windows, CEdev can't build sources reached through ... The calculator needs the CE C libraries.

API reference: https://gavinhsmith.github.io/titrmlib/

v0.1.0

Choose a tag to compare

@github-actions github-actions released this 23 Sep 02:54

Initial release of titrmlib! Create TUI-styled UI's on your TI-84 Plus CE.

Using titrmlib

  1. Unzip titrmlib-v0.1.0.zip into your CEdev project's lib/ folder, giving lib/titrmlib/.

  2. Add its sources to your project's makefile:

    CFLAGS = -Wall -Wextra -Oz -Ilib/titrmlib/src
    EXTRA_C_SOURCES = $(wildcard lib/titrmlib/src/*.c)
  3. #include "titrm.h" and build with make.

Keep the library inside your project directory: on Windows, CEdev can't build sources reached through ... The calculator needs the CE C libraries.

API reference: https://gavinhsmith.github.io/titrmlib/