Allow changing the working directory when getting platform arguments
[git-cheetah/kirill.git] / common / cheetahmenu.h
blobc0457e17b9fd6edd6c2f523085e4e7b6da45340f
1 #ifndef CHEETAHMENU_H
2 #define CHEETAHMENU_H
4 void build_cheetah_menu(struct git_data *data, void *platform_data);
6 /*
7 * Prototypes of functions that must be provided by the client
8 */
9 void reset_platform(void *platform);
10 BOOL build_separator(struct git_data *data, const struct menu_item *item,
11 void *platform);
12 BOOL build_item(struct git_data *data, const struct menu_item *item,
13 void *platform);
15 void *start_submenu(struct git_data *, const struct menu_item *item,
16 void *platform);
17 void end_submenu(void *parent, void *submenu);
20 * This lets a platform override the command called by an item
22 typedef enum {
23 MENU_GUI,
24 MENU_INIT,
25 MENU_HISTORY,
26 MENU_BASH,
27 MENU_BLAME,
28 MENU_CITOOL,
29 MENU_ADDALL,
30 MENU_BRANCH,
31 } menu_commands;
33 typedef void (*free_func_t)(void *);
35 const char **menu_get_platform_argv(menu_commands cmd, void *data,
36 free_func_t *free_platform_argv, void **argv_data);
39 * Cheetah-specific flags and functions
41 * Generally, nobody is interested in these flags & functions, but
42 * they may be useful for unit testing.
44 * 2 bits to indicate each choise are required because
45 * menu_item.selection is used as a mask and there are
46 * actually three choices:
47 * - selected;
48 * - not selected;
49 * - irrelevant
51 #define MENU_ITEM_FILE (1 << 0)
52 #define MENU_ITEM_DIR (1 << 1)
53 #define MENU_ITEM_NOREPO (1 << 2)
54 #define MENU_ITEM_REPO (1 << 3)
55 #define MENU_ITEM_TRACK (1 << 4)
56 #define MENU_ITEM_NOTRACK (1 << 5)
58 UINT cheetah_menu_mask(struct git_data *this_);
60 #endif /* CHEETAHMENU_H */