| 1 |
#ifndef _BM_COMMON_H_ |
| 2 |
#define _BM_COMMON_H_ |
| 3 |
|
| 4 |
#include <bemenu.h> |
| 5 |
#include <stddef.h> |
| 6 |
|
| 7 |
struct client { |
| 8 |
enum bm_filter_mode filter_mode; |
| 9 |
enum bm_scrollbar_mode scrollbar; |
| 10 |
const char *colors[BM_COLOR_LAST]; |
| 11 |
const char *title; |
| 12 |
const char *prefix; |
| 13 |
const char *font; |
| 14 |
const char *initial_filter; |
| 15 |
uint32_t line_height; |
| 16 |
uint32_t cursor_height; |
| 17 |
uint32_t cursor_width; |
| 18 |
uint32_t hpadding; |
| 19 |
uint32_t lines; |
| 20 |
enum bm_lines_mode lines_mode; |
| 21 |
uint32_t selected; |
| 22 |
uint32_t monitor; |
| 23 |
uint32_t hmargin_size; |
| 24 |
double border_size; |
| 25 |
double border_radius; |
| 26 |
float width_factor; |
| 27 |
bool bottom; |
| 28 |
bool center; |
| 29 |
bool grab; |
| 30 |
bool wrap; |
| 31 |
bool fixed_height; |
| 32 |
bool counter; |
| 33 |
bool vim_esc_exits; |
| 34 |
bool vim_init_mode_normal; |
| 35 |
bool accept_single; |
| 36 |
bool auto_select; |
| 37 |
bool ifne; |
| 38 |
bool single_instance; |
| 39 |
bool no_overlap; |
| 40 |
bool no_spacing; |
| 41 |
bool no_cursor; |
| 42 |
bool no_touch; |
| 43 |
bool no_keyboard; |
| 44 |
bool force_fork, fork; |
| 45 |
bool no_exec; |
| 46 |
enum bm_password_mode password; |
| 47 |
enum bm_key_binding key_binding; |
| 48 |
char *monitor_name; |
| 49 |
}; |
| 50 |
|
| 51 |
char* cstrcopy(const char *str, size_t size); |
| 52 |
char** tokenize_quoted_to_argv(const char *str, char *argv0, int *out_argc); |
| 53 |
void parse_args(struct client *client, int *argc, char **argv[]); |
| 54 |
struct bm_menu* menu_with_options(struct client *client); |
| 55 |
enum bm_run_result run_menu(const struct client *client, struct bm_menu *menu, void (*item_cb)(const struct client *client, struct bm_item *item)); |
| 56 |
|
| 57 |
#endif /* _BM_COMMON_H_ */ |
| 58 |
|
| 59 |
/* vim: set ts=8 sw=4 tw=0 :*/ |