forked from zapek/Ambient
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcontextmenu.h
More file actions
64 lines (55 loc) · 1.53 KB
/
Copy pathcontextmenu.h
File metadata and controls
64 lines (55 loc) · 1.53 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
#ifndef AMBIENT_CONTEXTMENU_H
#define AMBIENT_CONTEXTMENU_H
/*
* $Id: contextmenu.h,v 1.14 2012/08/17 11:03:13 geit Exp $
*/
/*
* Menu types
*/
enum {
CM_ICON = 1,
CM_ICONGROUP,
CM_ICONVIEW,
CM_PANELGROUP,
CM_PANELGROUP_DRAG,
CM_PANELGROUP_SUB,
CM_PANELGROUP_SUBPANEL,
CM_PANELGROUP_DIRPANEL,
CM_PANELBUTTON,
CM_PANELSPACER,
CM_PANELSEPARATOR,
CM_PANELPOPUP,
CM_VIEW,
CM_LIST,
CM_LISTGROUP,
CM_LISTVIEW,
CM_APPICON,
};
struct menuitem_state
{
ULONG checkit;
ULONG checked;
ULONG enabled;
/* XXX: to be completed */
};
#define CM_BUFFERSIZE 96 /* context menu string buffer size */
enum {
MENU_GLOBALACTION_FILE,
MENU_GLOBALACTION_DIRECTORY,
MENU_GLOBALACTION_DEVICE
};
APTR contextmenu_build(ULONG menumode, ULONG allow);
APTR contextmenu_build_simple(ULONG menumode, ULONG allow);
ULONG contextmenu_init(void);
void contextmenu_cleanup(void);
ULONG contextmenu_setuplabels(void);
void contextmenu_item_check(APTR pm, STRPTR name, ULONG action);
void contextmenu_delete_cm(APTR cm);
ULONG contextmenu_addmodes(APTR obj, APTR pm, ULONG index);
ULONG contextmenu_addviews(APTR obj, APTR pm);
ULONG contextmenu_add_mime( APTR cmenu, STRPTR uri, APTR mimetype );
ULONG contextmenu_add_global( APTR cmenu, STRPTR uri, ULONG type );
ULONG contextmenu_add_listview_options(APTR obj, APTR cmenu, ULONG(*callback)(APTR obj, int i, struct menuitem_state *state));
void contextmenu_execute_shortcut(APTR obj, TEXT c, ULONG mask);
void contextmenu_execute(APTR obj, APTR parent, APTR cmobj, ULONG grouped);
#endif /* AMBIENT_CONTEXTMENU_H */