[TUHS] Obscure Blit menu data structure
noel.hunt at gmail.com
Fri Jun 23 15:56:25 AEST 2017
I was hoping someone on the list who remembers 'mhit.c' from
the Blit library code could shed some light on some members
of the 'NMitem' structure. I believe that 'mhit' (sometimes
'hmenunit') was written by Andrew Hume.
The structure in question is this:
typedef struct NMitem
struct NMenu *next;
void (*dfn)(), (*bfn)(), (*hfn)();
long data; /* user only */
The three functions are called at different times when a menu
is being traversed, but 'dfn' and 'bfn' are only called before
a submenu is entered, and after a submenu is exited, respectively.
'hfn' is called whenever an item has been selected.
I have never seen 'dfn' and 'bfn' used in any Bell Labs code so
I was wondering what the rationale for their existence was.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the TUHS