Skip to content

Conversation

@jserv
Copy link
Contributor

@jserv jserv commented Jul 29, 2025

This commit adds twin_custom_widget_t API:

  • twin_custom_widget_create() for widget creation with user data
  • Helper functions for width, height, pixmap access, and paint queuing
  • twin_matrix_transform_x/y() for coordinate transformations
  • Proper dispatch mechanism calling base widget handlers first

It refactors all demo applications to use public API only:

  • Remove twin_private.h dependencies from 'apps'
  • Convert clock, line, spline, animation, image demos
  • Replace internal twin* calls with public equivalents

Close #9

Summary by Bito

This pull request introduces a new public custom widget API, enhancing the creation and management of widgets with user-defined data. It refactors demo applications to eliminate dependencies on private headers, improving modularity and maintainability. Key features include new functions for widget dimensions, repaint requests, and coordinate transformations, along with a robust dispatch mechanism for event handling.

This commit adds twin_custom_widget_t API:
- twin_custom_widget_create() for widget creation with user data
- Helper functions for width, height, pixmap access, and paint queuing
- twin_matrix_transform_x/y() for coordinate transformations
- Proper dispatch mechanism calling base widget handlers first

It refactors all demo applications to use public API only:
- Remove twin_private.h dependencies from 'apps'
- Convert clock, line, spline, animation, image demos
- Replace internal _twin_* calls with public equivalents

Close #9
@jserv jserv force-pushed the apps-no-private-header branch from 5f9b90e to d36a485 Compare July 29, 2025 20:12
@jserv jserv merged commit c9df0a6 into main Jul 29, 2025
6 checks passed
@jserv jserv deleted the apps-no-private-header branch July 29, 2025 21:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Avoid invoking internal functions in the demo programs

2 participants