mirror of
https://github.com/siemens-mobile-hacks/sieelf.git
synced 2026-11-25 22:27:29 +00:00
41 lines
1.2 KiB
C
41 lines
1.2 KiB
C
#include "..\inc\swilib.h"
|
|
|
|
|
|
unsigned int CreateMLMenu(const ML_MENU_DESC *menu, const HEADER_DESC *hdr, int start_item, int n_items, void *user_pointer)
|
|
{
|
|
void *ma=malloc_adr();
|
|
void *gui=GetMultiLinesMenuGUI(ma, mfree_adr());
|
|
SetMenuToGUI(gui, menu);
|
|
SetMenuItemCount(gui, n_items);
|
|
MenuSetUserPointer(gui, user_pointer);
|
|
SetCursorToMenuItem(gui, start_item);
|
|
SetHeaderToMenu(gui, hdr, ma);
|
|
return (CreateGUI(gui));
|
|
}
|
|
|
|
unsigned int CreateSLMenu(const MENU_DESC *menu, const HEADER_DESC *hdr, int start_item, int n_items, void *user_pointer)
|
|
{
|
|
|
|
void *ma=malloc_adr();
|
|
void *gui=GetMenuGUI(ma, mfree_adr());
|
|
SetMenuToGUI(gui, menu);
|
|
SetMenuItemCount(gui, n_items);
|
|
MenuSetUserPointer(gui, user_pointer);
|
|
SetCursorToMenuItem(gui, start_item);
|
|
SetHeaderToMenu(gui, hdr, ma);
|
|
return (CreateGUI(gui));
|
|
}
|
|
|
|
unsigned int CreateSLMenu_30or2(const MENU_DESC *menu, const HEADER_DESC *hdr, int start_item, int n_items, void *user_pointer)
|
|
{
|
|
|
|
void *ma=malloc_adr();
|
|
void *gui=GetMenuGUI(ma, mfree_adr());
|
|
SetMenuToGUI(gui, menu);
|
|
SetMenuItemCount(gui, n_items);
|
|
MenuSetUserPointer(gui, user_pointer);
|
|
SetCursorToMenuItem(gui, start_item);
|
|
SetHeaderToMenu(gui, hdr, ma);
|
|
return (CreateGUI_30or2(gui));
|
|
}
|
|
|