[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [MiNT] permanent solution for redraw menu issue
Hi,
On keskiviikko 05 syyskuu 2012, Eero Tamminen wrote:
> The real problem is that there's no flag to tell that a window
> should be fullscreen (no menubar, no borders etc). With that
> information, AES could handle redraws after window closes just
> fine.
Without that, the kludge needed to get menubar drawn looks like this
(XaAES seems to require full menu, just few root OBJECTs wasn't enough):
----------------------------------------
#include <aes.h>
/* kludges for AHCC and its aes.h header */
#ifdef __AHCC__
# define aes_global _GemParBlk.global
# define MENU_INSTALL 1
# define OBJ_INFO long
#endif
/* menubar kludge for MultiTOS redraws */
static OBJECT menu_tree[] = {
/* next, head, tail, type, flags, state, spec, x, y, w, h */
{-1, 1, 4, G_IBOX, NONE, 0, NULL, 0,0, 320,200}, /* 0: root */
{ 4, 2, 2, G_BOX, NONE, 0, NULL, 0,0, 320,200}, /* 1: root/bar */
{ 1, 3, 3, G_IBOX, NONE, 0, NULL, 0,0, 320,200}, /* 2:
root/bar/active */
{ 2,-1,-1, G_TITLE, NONE, 0, (OBJ_INFO)"Desk", 0,0, 320,200}, /*
3: root/bar/active/title */
{ 0, 5, 5, G_IBOX, NONE, 0, NULL, 0,0, 320,200}, /* 4:
root/dropdowns */
{ 4, 6, 6, G_BOX, NONE, 0, NULL, 0,0, 320,200}, /* 5:
root/dropdowns/box */
{ 5,-1,-1, G_STRING,LASTOB,0, (OBJ_INFO)"About", 0,0, 320,200}, /*
6: root/dropdowns/box/text */
};
...
screen.appid = appl_init();
screen.multitos = (aes_global[1] == -1);
...
if (screen.multitos) {
/* reserve screen area (in multitasking AES = a no-op) */
form_dial(FMD_START, screen.w>>1, screen.h>>1, 0, 0, 0, 0,
screen.w, screen.h);
/* create menu to get desktop one redrawn after program
exits */
menu_register(screen.appid, "VDI Tester");
menu_bar(menu_tree, MENU_INSTALL);
}
----------------------------------------
Not particularly pretty, but feel free to copy it if you bump into
same problem...
- Eero