grub2: bring back build of aros-side grub2 tools
[AROS.git] / workbench / libs / popupmenu / pmfind.h
blob5358f20bd268a762796947fc4d1b7a49d5113fbf
1 //
2 // pmfind.h
3 //
4 // PopupMenu Library - Menu item searching
5 //
6 // Copyright (C)2000 Henrik Isaksson <henrik@boing.nu>
7 // All Rights Reserved.
8 //
10 #ifndef PM_FIND_H
11 #define PM_FIND_H
13 struct PM_Window;
14 struct PopupMenu;
16 // Find a selectable item in a menu, no submenu recursion, but group recursion.
17 struct PopupMenu *PM_FindNextSelectable(struct PM_Window *a, struct PopupMenu *pm, BOOL *found);
18 struct PopupMenu *PM_FindFirstSelectable(struct PopupMenu *pm);
19 struct PopupMenu *PM_FindPrevSelectable(struct PM_Window *a, struct PopupMenu *pm, BOOL *found);
20 struct PopupMenu *PM_FindLastSelectable(struct PopupMenu *pm);
22 // Find item 'ID' in menu 'base'. Recursive.
23 struct PopupMenu *PM_FindID(struct PopupMenu *base, ULONG ID);
25 // Find last item in a menu. Recursive.
26 struct PopupMenu *PM_FindLast(struct PopupMenu *base);
28 // Find item with command key 'key' in menu 'base'. Recursive.
29 struct PopupMenu *PM_FindItemCommKey(struct PopupMenu *base, UBYTE key);
31 // Find item before item 'ID' in menu 'base'. Recursive.
32 struct PopupMenu *PM_FindBeforeID(struct PopupMenu *base, ULONG ID);
34 // Find item before item 'item' :) in menu 'base'. Recursive.
35 struct PopupMenu *PM_FindBefore(struct PopupMenu *base, struct PopupMenu *item);
37 // Find item 'ID' and return its checkmark state. Returns -5L if not found.
38 BOOL __saveds ASM PM_ItemChecked(register __a1 struct PopupMenu *pm GNUCREG(a1),
39 register __d1 ULONG ID GNUCREG(d1));
41 // Alter the states of a list of items. (Execute an IDList program)
42 void __saveds ASM PM_AlterState(register __a1 struct PopupMenu *base GNUCREG(a1),
43 register __a2 struct PM_IDLst *ids GNUCREG(a2),
44 register __d1 UWORD action GNUCREG(d1));
46 // Exported PM_FindID
47 struct PopupMenu * __saveds ASM PM_FindItem(register __a1 struct PopupMenu *menu GNUCREG(a1),
48 register __d1 ULONG ID GNUCREG(d1));
50 struct PopupMenu *PM_FindSortedInsertPoint(struct PopupMenu *pm, struct PopupMenu *fm);
52 #endif /* PM_FIND_H */