2014-10-25 19:43:37 +02:00
|
|
|
#ifndef _BM_COMMON_H_
|
|
|
|
#define _BM_COMMON_H_
|
|
|
|
|
|
|
|
#include <bemenu.h>
|
2020-02-07 22:11:42 +01:00
|
|
|
#include <stddef.h>
|
2014-10-25 19:43:37 +02:00
|
|
|
|
|
|
|
struct client {
|
|
|
|
enum bm_filter_mode filter_mode;
|
2015-01-18 01:07:30 +01:00
|
|
|
enum bm_scrollbar_mode scrollbar;
|
2014-10-25 19:43:37 +02:00
|
|
|
const char *colors[BM_COLOR_LAST];
|
|
|
|
const char *title;
|
2014-10-26 14:42:09 +01:00
|
|
|
const char *prefix;
|
2015-01-17 14:25:50 +01:00
|
|
|
const char *font;
|
2020-11-12 18:20:21 +01:00
|
|
|
const char *initial_filter;
|
2019-05-31 22:32:02 +02:00
|
|
|
uint32_t line_height;
|
2021-08-24 19:06:51 +02:00
|
|
|
uint32_t cursor_height;
|
2022-06-02 18:52:09 +02:00
|
|
|
uint32_t cursor_width;
|
2022-06-01 16:16:45 +02:00
|
|
|
uint32_t hpadding;
|
2015-01-17 23:59:11 +01:00
|
|
|
uint32_t lines;
|
|
|
|
uint32_t selected;
|
|
|
|
uint32_t monitor;
|
2021-10-17 08:22:24 +02:00
|
|
|
uint32_t hmargin_size;
|
2022-06-01 00:45:20 +02:00
|
|
|
uint32_t border_size;
|
2021-12-26 17:38:11 +01:00
|
|
|
float width_factor;
|
2015-01-17 23:59:11 +01:00
|
|
|
bool bottom;
|
2021-08-14 12:07:22 +02:00
|
|
|
bool center;
|
2015-01-17 23:59:11 +01:00
|
|
|
bool grab;
|
|
|
|
bool wrap;
|
2022-09-19 17:04:49 +02:00
|
|
|
bool accept_single;
|
2017-02-14 20:53:15 +01:00
|
|
|
bool ifne;
|
2019-03-25 22:21:17 +01:00
|
|
|
bool no_overlap;
|
2021-08-27 23:15:57 +02:00
|
|
|
bool no_spacing;
|
2022-10-10 18:01:16 +02:00
|
|
|
bool no_cursor;
|
|
|
|
bool no_touch;
|
|
|
|
bool no_keyboard;
|
2020-02-08 12:21:36 +01:00
|
|
|
bool force_fork, fork;
|
2020-02-22 16:35:47 +01:00
|
|
|
bool no_exec;
|
2021-02-05 05:12:48 +01:00
|
|
|
bool password;
|
2022-10-20 03:18:17 +02:00
|
|
|
bool use_vim_bindings;
|
2021-02-05 08:50:58 +01:00
|
|
|
char *monitor_name;
|
2014-10-25 19:43:37 +02:00
|
|
|
};
|
|
|
|
|
2020-02-07 22:11:42 +01:00
|
|
|
char* cstrcopy(const char *str, size_t size);
|
|
|
|
char** tokenize_quoted_to_argv(const char *str, char *argv0, int *out_argc);
|
2014-10-25 19:43:37 +02:00
|
|
|
void parse_args(struct client *client, int *argc, char **argv[]);
|
2020-02-08 12:21:36 +01:00
|
|
|
struct bm_menu* menu_with_options(struct client *client);
|
|
|
|
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));
|
2014-10-25 19:43:37 +02:00
|
|
|
|
|
|
|
#endif /* _BM_COMMON_H_ */
|
|
|
|
|
|
|
|
/* vim: set ts=8 sw=4 tw=0 :*/
|