miniboxtk 0.1.2 (r1988) - pre-alpha release ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ [build] -Fix: confusion on what root means for -I -Fix: always use local src_3rd/ genht for now -Fix: make distclean removes Makefile.conf.in -Add: generate Makefile.conf -Add: buildlib helper for including Makefile.conf -Add: buildlib helper lib for installation -Add: make install/linstall/unintall on the lib side -Add: define INCDIR -Add: central Makefile calls install/linstall/uninstall in lib -Add: install more src_3rd headers in use -Add: use -fPIC when available -Change: compile in genvector objects instead of using the .a [doc] -Add: menu bar example -Add: example program on non-sequential menu build -Add: link reference manual and examples from main page -Add: list examples and explain how a real application is going to be different from examples -Add: hello world example for the installed lib -Add: pane example -Add: examples: tbl -Add: glfw bug: pre-3.3.x versions don't have num lock modifier -Add: document subwindow API design -Add: text editor example -Add: document env vars used by backends -Add: explain the keywords subsystem -Add: explain different widget types (atomic, layout and composite) -Add: license on examples: CC0 to make copying code easier [glfw] -Fix: get keypad cursor keys work -Fix: report subwindow events to subwindow with relative coords -Add: render shift by subwindow content_x0;content_y0 (scrolled win) -Add: implement text pos query -Add: support num lock if glfw has the modifier defined -Add: deliver keypad chars: / * - + and = -Add: set keypad modifier for keypad keypresses independently of num lock state -Tune: font size to match sdl2's [lib] -Fix: f3d: center checkbox and radiobutton -Fix: link error; multiple definitions of genht because of a typo on htpxid -Fix: some backends may emit expose events with NULL window, filter those out -Fix: event propagation: parent window may become NULL at any moment due to widget deletion in callback, don't crash -Fix: event handler: don't crash if win is NULL, when closing windows from event handlers this may happen -Fix: race condition on window close: redraw/resize timers shall be removed so windows already closed won't get redrawn later -Fix: win root lookup shouldn't crash if root is NULL -Fix: keyboard events: look for focus widget in parent window when an event is reported in a subwindow (e.g. canvas) -Fix: keyboard event delivery: if there's no focused widget in a window, deliver keyboard events to the root widget; this is about the same assumption as having a focused widget with a handler not handling the event -Fix: display update event handler should always require ev->win != NULL -Fix: don't crash if widget has no window and "needs redraw" (just skip erdraw) -Fix: debug inlines: #include widget.h for widget_t internals -Fix: publish widget minsize() helper because window handling needs it -Fix: scrolled subwindow: recalculate the layout of root widget size had to be changed -Fix: do not call backend to get scrolled window size (there may not be a real window associated anyway) -Fix: set focus only on top-parent window, not in subwindows -Fix: draw-dirty should propagate up through subwindow parents so that the widget really gets redrawn at the end (top parent needs to be notified) -Fix: don't crash when marking a window dirty if the window is not assigned to a display -Fix: memory leak on widget destroy: hvbox internal cache fields -Fix: memory leak: free subwin root widget on subwindow free -Add: widget->purpose keyword for composite widgets to hint the style code -Add: optional pre-child-unlink hook in widget -Add: mbtk_draw_color() variant that works from pakcked (unsigned long) clor -Add: name backends -Add: macro to decide if a keysym is a modifier -Add: keysym <-> name converter functions -Add: scrolled bit in the window struct; scrolled window root size is not matched to window size (it's typically larger than the window, that's why we need to scroll) -Add: appear/disappear management from widget draw -Add: backend API for text position query (for cursor placement) -Add: widget set_alt_span() inlines -Add: separate call for updating the layout without redraw -Add: focus received and focus lost events, delivered on focus change so widgets can do visual updates for focus indication, if needed -Change: set widget destroying flag before unlink and unassign so that callbacks can see why the widget is being unlinked and unassigned [sdl2] -Fix: text rendering empty string corner case: create and return a zero sized empty texture -Fix: save window geometry after creating a window -Fix: report subwindow mouse events to subwindow with relative coords -Fix: return DEL key -Fix: don't crash when drag&drop ends outside of window -Add: render shift by subwindow content_x0;content_y0 (scrolled win) -Add: implement text pos query using bisect (because of ttf kerning) -Add: apply content offset on subwindow event reporting (respect scroll) -Add: translate keypad keys considering numlock state [test] -Add: render shift by subwindow content_x0;content_y0 (scrolled win) -Add: implement text pos query [tests] -Add: wt_simple: show some arrows -Add: Makefile compiles all tests -Add: test program for wt_scrolled -Add: wt_odd: keyboard binginds on left/right/ins to test textline cursor management -Add: textline widget in wt_odd -Add: wt_simple: text editor widgets -Fix: don't rely on system-installed font, use the one shipped with the lib (for reproducible testing) -Add: scrolled_wb: '1' and '2' to remove child widgets -Add: license banner (LGPL2.1+) [widget] -Add: set widget purpose field in rim and tabbed -Add: menu: stdrow concept of prefix-entry-suffix for checkbox-label-hotkeys -Fix: radiobutton: center fallback drawn graphics within parent box -Fix: checkbox: center fallback drawn graphics within parent box -Add: menu: submenu support -Change: menu: keep only one torn-off instance instead of keeping a list -Add: arrow -Fix: menu: close any open submenu recursively when closing a menu -Fix: menu: when a child is unlinked, also remove it from the submenu vector so things are kept in sync -Add: menu: helper functions to bind the invoked callback -Add: hand_hovradio: generate 'invoked' callbacks on click and enter -Add: hand_hovradio notifies parent widget about succesful invocations (so that menus can be closed) -Add: hand_hovradio relay for deactivate() call -Add: hand_hovradio: ESC or right click will close the menu -Add: hand_radio: deactivate call -Change: popup menu opener needs a parent window -Add: menu: helper to append a separator -Add: menu: on click-away or finished invocation, close all menus upward in the hierarchy -Add: menu_bar: deacticavate menu bar on child invocation callback -Cleanup: menu: simplify the close-all callback: there are multiple events calling the same close-all hook -Add: menu, menu_bar: close on cancel callback coming from hand_hovradio -Add: pane: composite widget of a hbox or vbox -Add: Common framed box draw: a variant that doesn't draw 'activated' -Add: Common: minsize 'inactive' variant so that frame size doesn't change -Add: optional hand_range configuration so that keyboard handling and stepping can be disabled -Add: pane_sep: pane separator (a copy of separator initially) -Add: pane: use pane_sep for separator -Add: box: publish hvbox install utility for internal use (tbl needs it) -Add: tbl: table layout widget -Split: menu bar: separate embed/binding administration in adding new item to make it easier to create calls for addign items differently -Add: menu_bar: functions for inserting a new menu after/before an existing menu -Add: implement "box add widget at" function -Add: menu_bar: append/insert new menu always returns "label" widget because that needs to be used for subsequent inserts to be addressed -Split: menu: separate embed/binding administration in adding a new item to make it easier to implement new functions adding items differently -Add: menu: API for inserting a menu item (row) before/after an existing row -Add: scrolled: scrolled subwindow -Add: scrolled_wb: scrolled window With scrollBars -Add: textline widget (a single line of editable text in a textedit composite widget) -Add: textedit: single or multiple line text editor -Add: mark each widget in comment if it's a layout or composite widget. -Fix: menu_bar: handle child removal -Fix: menu_bar: need to free menus on destroy to avoid memory leak -Fix: menu: need to free submenus while destroying the menu to avoid memleaks -Add: tabbed: handle child unlink - make sure labels and pages are removed together -Cleanup: tabbed: rename mbtk_tabbed_append_page_label to mbtk_tabbed_append_page_with_label for consistency [xlib] -Fix: don't crash on configure event received for a window already being closed -Fix: low level draw: filled-rectangle got truncated in a scrolled box when content-start was non-zero -Add: render shift by subwindow content_x0;content_y0 (scrolled win) -Add: implement text pos query (same bisect as in sdl2) -Add: apply content offset on subwindow event reporting (respect scroll) -Add: use sync X calls if env var MBTK_X11_SYNC is set -Add: on display init: figure num_lock mask and query initial num lock and caps lock state -Add: key translate respects num lock state -Optimize: client side color cache using an unsigned long -> unsigned long hash (from packed r;g;b to pixel); in some tests reduces X server round trips by a factor of 7 miniboxtk 0.1.1 (r1572) - pre-alpha release ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ [doc] -Add: collect all important URLs at the bottom of index.html -Add: examples: explain new window call args -Add: document the range API (widget proproperties) -Add: rim example -Add: examples: hide/show -Add: example on the tabbed widget -Add: menu_bar example -Add: document known bug: sdl2 mouse capture fails, at least with 2.0.9 -Add: known bugs: glfw doesn't support mouse capture at all -Add: explain how widget styling works with the display fallback vs. floating widgets -Cleanup: simplify example code by using mbtk_run_window() for the main loop instead of manual iteration -Add: document stdin limitations on glfw and sdl2 -Fix: canvas examples: use a timer to run the clock updating it once a second -Cleanup: canvas examples: simplify main loop: run win instead of manual iterations -Add: API comments in lib headers -Add: auto-generated API reference -Add: boxing example: center align -Fix: rim demo: add padding to make the frame more visible -Add: native drawing with sdl2 using canvas_native (almost the same clock example as in the the basic canvas example) [glfw] -Add: implement keyboard modifier query -Add: implement the subwindow API; support for nested subwindow -Add: support for backend-native draw callback API -Add: display close terminates the generic fdwatch thread -Change: stdin thread is global, not per display -Fix: memory leak: when closing a real window, free VAO buffers and opengl program -Add: implement win2render_win() [lib] -Fix: do not draw widgets whose parents are hidden -Add: backend API and wrapper for keyboard modifier query -Add: remember last window mouse pointer pos -Cleanup: centralize window entered bit management so that backends don't need to deal with updating it -Add: accessor for getting last known mouse x and y -Change: widget prop get/set API is array based -Add: widget set_prop/get_prop wrappers for scalars and arrays -Add: widget redraw request helper -Add: remember click x;y coords on mouse press as "drag & drop origin", per window -Add: optional storage for handlers for origin data -Add: widget fields for user settable minimum sizes -Add: wrapper for setting widget minimum user size -Add: change handler event API: handlers need to return if they handled (and block) the event -Add: handler up-call is done until a widget is found to handle the given event -Add: automatically installed root handler that will be able to execute keyboard navigation in a window -Add: callback function type with event arg -Cleanup: origin-data is really static handler data and should be per widget, not per window because multiple handlers may process the same event until one reports 'handled' -Cleanup: switch over noarg callback to return mbtk_event_handled_t for clarity -Add: support for importing XPM3; mpm cache can store xpms as well -Add: mpm_get optinally returns pixmap struct -Add: mbtk_mpm_get_first() to return a rendered pxm for its metadata -Add: mbtk_kw_uniq(): allocate an anonymous unique keyword -Fix: widget destroy should free local styleprops (memleak) -Add: clarify window fields for the subwindow case -Add: subwindow backend API -Add: window fields for scrolled subwindows (origin start x;y) -Add: API for subwindow native rendering by the application -Fix: pass on display to backend subwindow creation: xlib will need it (glfw and sdl2 ignore it) -Add: widget imp API: assign/unassign -Add: track widget's render window separately from parent window, which may be a subwin -Add: widget call wrappers for assign/unassign (recursive) -Add: assign widget subtree when window's root widget is set or widget is added in a box -Add: backend API (and wrappers) for subwin assignment -Fix: don't attempt to draw or lay out a window with no root widget -Fix: widget_by_coord(): don't crash if there's no root widget in a window -Add: backend API: subwindow geometry set (and API wrapper) -Fix: don't crash on window resize if there's no root widget -Fix: event handling: canvas special case (subwindow with no widget inside) -Fix: subwindow relative x;y in event handling for those backends that are not doing native subwindows -Add: call mbtk_widget_assing() on embed -Fix: when recalculating widget minimum size after embedding, do it recursively: composite widgets have a subtree of widgets that get assigned at once -Add: API for debugging: inline functions for layout debug -Del: widget pre-insert, post-insert API; use the more generic assing/unassign -Add: widget unembed call that also unassigns -Add: widget unlink call -Change: use hvbox's ->hidden instead of a widget->hide bit locally, for simplicty -Add: implement and publish widget hide -Fix: when setting the root widget, set ->win recursively: the root widget may be a composite (e.g. tabbed) -Fix: don't crash on handler registration if there's no window - just skip registration -Fix: delay widget destroy with destroy-locking while running the handler so that it is safe to destroy a widget from within a callback -Add: comment to explain when MBTK_EV_FOCUS_ENTER and MBTK_EV_FOCUS_LEAVE are generated -Add: internal event for click-away-from-focused-widget -Add: separate "outclick" event for the case a mouse-grab window (menu or combo) detects a click outside of the window -Fix: memory leak: when a windows is closed, free its widget tree from root -Fix: event handling: if a callback destroys the parent of the widget the event delivery is dealing with, stop traversing up -Fix: widget unlink and destroy should recursively remove win->focus from the widgets affected so that no stale focus widget pointers can be left behind -Add: implement delayed widget styleprop set so style properties can be set before the widget is assigned -Cleanup: f3d: don't fetch widget style when style is provided as arg -Add: remember style per widget, making cross-display widget moves safe -Add: watch-for-window-close mechanism -Add: mbtk_run_window() for running a single window waiting for it to exit -Add: elect new topwin if display's topwin is closed -Fix: don't try to destroy NULL widget on window close (if window's root widget is NULL) -Add: common threads: wait thread call -Add: helper call to bind the win_close callback of a window('s root widget) -Fix: safer widget destroy sequence: unlink from window before exiting for delayed destroy, just in case the window is closed before the delayed destroy takes place -Fix: window destroy sequence: first set all child widget's ->win to NULL to avoid destroy-delayed widgets to reference the win that is already free'd by the delayed destroy is executed -Add: centralize "get window's root widget" into a helper function -Add: timer API and implementation -Add: backand API and wrapper for win2render_win() - some backends use the topmost window for rendering (sdl2, glfw), others can render directly in a subwindow (xlib, test) -Add: use win2render_win() when setting window root -Fix: unassign widget being destroyed so it can free up window resources (fixes memory leaks) -Add: centralized subwin free() call for code clarity -Cleanup: don't use 'int' in bitfield spec, not portable -Fix: set root widget: destroy already existing root widget first -Fix: fdwatch: don't rely on select(2) being smart enough to handle usecs larger than 1s -Fix: recalc minsize after assign - a widget in a different window (may also be a different display!) may have a different size in the new window; a typical example is label just created: it's 0x0 pixels before assigned because there is no font info yet -Fix: invalid font id: don't compare or copy unions directly, not portable -Fix: don't use strdup(), use mbtk_strdup() for portability -Add: implement and use mbtk_snprintf() because snprintf() is not C89 - the local version requires an 1k limit on rendered string -Fix: enforce window minimum size on redraw adn inform gemhvbox when the window had to change size for that -Fix: ignore enter/levave events for the NULL window - some backends are noisy -Fix: window minimum size enforcement: enforce only in the direction where current size is actually smaller -Add: make default new widget span/align/spacing/padding configurable -Cleanup: include genht from own install for now -Change: compile genht locally for now [sdl2] -Add: implement keyboard modifier query -Fix: fill in both fields of pixmap ID when binding to avoid dependeing on uninitialized memory later -Add: support for subwidnows using render viewports -Add: support for backend-native draw callback API; pass on renderer as native_ctx -Add: capture mouse for menu/combo windows -Add: display close terminates the generic io thread -Change: stdin read thread is global, not per display -Fix: uninit fdwatch when the fdwatch thread exits to avoid memory leaks [test backend] -Add: test backend that will be used for automated testing -Add: Makefile template -Add: command parser -Add: support for double-quoted strings in the command language -Add: echo, key_press and key_release commands -Add: implement keyboard modifier states with stdin commands -Add: implement win2render_win() [tests] -Add: wt_simple: progress bar hotkeys -Add: wt_simple: place a scrollbar -Add: wt_simple: "event box" demo -Add: wt_simple: picture widget -Add: wt_simple: place a hsep -Add: link with -lm, floor() needs it -Fix: wt_simple: invalid pixmap handling (leftover) -Add: wt_simple: canvas test -Add: test program for odd combinations of widgets and handlers; test hand_hovradio using radio buttons -Add: test code for catching win_close or force-close a window from within a callback -Add: timer test [widget] -Add: common 'embed' code for multi-widget composites -Add: no-background option for boxes -Add: progbar implements range.val API -Add: scrollbar widget (tested horizontal only yet) -Add: range handler -Add: box: wrapper for binding the "event" callback -Add: picture -Add: separators (hsep and vsep) -Add: canvas widget -Add: rim widget -Add: tabbed (multi-page "notebook" with tabs) -Add: menu_bar -Add: hand_hovradio: radio button activated on hover -Add: menu -Fix: label: missing cast for label-to-str -Fix: label: free text backend cookie on unassign - a different window will need a different cookie (also fixes a potential memleak) [xlib] -Add: implement keyboard modifier query -Fix: fill in both fields of pixmap ID when binding to avoid dependeing on uninitialized memory later -Add: implementation of subwindows -Add: implement the native draw API -Add: grab mouse clicks for menu and combo windows -Add: implement win2render_win() -Fix: safer motif hint initialization, some older compilers won't like init depending on function arg