Introduced user-extensable textentry input handling.

The typical approach to user-level widgets are widget which call back into user code on about every event they receive. Especially drawing the widget is handled by the user based on drawing primitives.

Due to space and performance considerations Contiki intentionally doesn't have a platform-neutral drawing-primitive layer. Instead the widgets are drawn directly by the platform specific layer. Unfortunately this means that user-level widgets aren't possible.

Ironically the existence of the textedit user-level widget show that this is true: Due to the lack of drawing-primitive layer it uses CBM-specific drawing paradigms and therefore doesn't work on other platforms.

Given these facts it seems desirable to give user code at least a little programatic control over the behaviour of the existing widgets. Obviously this is a very limited approach because most of the behaviour of a widget is defined by its appearance which is not controlable.

Anyway the keyboard input handling of the textentry widget seems to be a behaviour where user code can do meaningfull work.

The optional input handler gets apointer to the widget as well a the character typed. It signals via boolean return value if it completely handled the character or if the default input handler should be invoked.
2 files changed
tree: 7c34f9a84fa972a16c51b57eb928b174909a931c
  1. contiki/