bemenu
1.0.0
Dynamic menu library and client program inspired by dmenu
|
#include <stdbool.h>
#include <stdint.h>
Go to the source code of this file.
Enumerations | |
enum | bm_priorty { BM_PRIO_TERMINAL, BM_PRIO_GUI } |
enum | bm_filter_mode { BM_FILTER_MODE_DMENU, BM_FILTER_MODE_DMENU_CASE_INSENSITIVE, BM_FILTER_MODE_LAST } |
enum | bm_scrollbar_mode { BM_SCROLLBAR_NONE, BM_SCROLLBAR_ALWAYS, BM_SCROLLBAR_AUTOHIDE, BM_SCROLLBAR_LAST } |
enum | bm_run_result { BM_RUN_RESULT_RUNNING, BM_RUN_RESULT_SELECTED, BM_RUN_RESULT_CANCEL } |
enum | bm_key { BM_KEY_NONE, BM_KEY_UP, BM_KEY_DOWN, BM_KEY_LEFT, BM_KEY_RIGHT, BM_KEY_HOME, BM_KEY_END, BM_KEY_PAGE_UP, BM_KEY_PAGE_DOWN, BM_KEY_SHIFT_PAGE_UP, BM_KEY_SHIFT_PAGE_DOWN, BM_KEY_BACKSPACE, BM_KEY_DELETE, BM_KEY_LINE_DELETE_LEFT, BM_KEY_LINE_DELETE_RIGHT, BM_KEY_WORD_DELETE, BM_KEY_TAB, BM_KEY_SHIFT_TAB, BM_KEY_ESCAPE, BM_KEY_RETURN, BM_KEY_SHIFT_RETURN, BM_KEY_CONTROL_RETURN, BM_KEY_UNICODE, BM_KEY_LAST } |
enum | bm_color { BM_COLOR_TITLE_BG, BM_COLOR_TITLE_FG, BM_COLOR_FILTER_BG, BM_COLOR_FILTER_FG, BM_COLOR_ITEM_BG, BM_COLOR_ITEM_FG, BM_COLOR_HIGHLIGHTED_BG, BM_COLOR_HIGHLIGHTED_FG, BM_COLOR_SELECTED_BG, BM_COLOR_SELECTED_FG, BM_COLOR_SCROLLBAR_BG, BM_COLOR_SCROLLBAR_FG, BM_COLOR_LAST } |
Functions | |
const char * | bm_renderer_get_name (const struct bm_renderer *renderer) |
enum bm_priorty | bm_renderer_get_priorty (const struct bm_renderer *renderer) |
Library Initialization | |
bool | bm_init (void) |
const struct bm_renderer ** | bm_get_renderers (uint32_t *out_nmemb) |
Library Version | |
const char * | bm_version (void) |
Menu Memory | |
struct bm_menu * | bm_menu_new (const char *renderer) |
void | bm_menu_free (struct bm_menu *menu) |
void | bm_menu_free_items (struct bm_menu *menu) |
Menu Properties | |
void | bm_menu_set_userdata (struct bm_menu *menu, void *userdata) |
void * | bm_menu_get_userdata (struct bm_menu *menu) |
void | bm_menu_set_prefix (struct bm_menu *menu, const char *prefix) |
const char * | bm_menu_get_prefix (struct bm_menu *menu) |
void | bm_menu_set_filter (struct bm_menu *menu, const char *filter) |
const char * | bm_menu_get_filter (struct bm_menu *menu) |
void | bm_menu_set_filter_mode (struct bm_menu *menu, enum bm_filter_mode mode) |
enum bm_filter_mode | bm_menu_get_filter_mode (const struct bm_menu *menu) |
void | bm_menu_set_lines (struct bm_menu *menu, uint32_t lines) |
uint32_t | bm_menu_get_lines (struct bm_menu *menu) |
void | bm_menu_set_wrap (struct bm_menu *menu, bool wrap) |
bool | bm_menu_get_wrap (const struct bm_menu *menu) |
bool | bm_menu_set_title (struct bm_menu *menu, const char *title) |
const char * | bm_menu_get_title (const struct bm_menu *menu) |
bool | bm_menu_set_font (struct bm_menu *menu, const char *font) |
const char * | bm_menu_get_font (const struct bm_menu *menu) |
bool | bm_menu_set_color (struct bm_menu *menu, enum bm_color color, const char *hex) |
const char * | bm_menu_get_color (const struct bm_menu *menu, enum bm_color color) |
void | bm_menu_set_scrollbar (struct bm_menu *menu, enum bm_scrollbar_mode mode) |
enum bm_scrollbar_mode | bm_menu_get_scrollbar (struct bm_menu *menu) |
void | bm_menu_set_bottom (struct bm_menu *menu, bool bottom) |
bool | bm_menu_get_bottom (struct bm_menu *menu) |
void | bm_menu_set_monitor (struct bm_menu *menu, uint32_t monitor) |
uint32_t | bm_menu_get_monitor (struct bm_menu *menu) |
void | bm_menu_grab_keyboard (struct bm_menu *menu, bool grab) |
bool | bm_menu_is_keyboard_grabbed (struct bm_menu *menu) |
Menu Items | |
bool | bm_menu_add_item_at (struct bm_menu *menu, struct bm_item *item, uint32_t index) |
bool | bm_menu_add_item (struct bm_menu *menu, struct bm_item *item) |
bool | bm_menu_remove_item_at (struct bm_menu *menu, uint32_t index) |
bool | bm_menu_remove_item (struct bm_menu *menu, struct bm_item *item) |
bool | bm_menu_set_highlighted_index (struct bm_menu *menu, uint32_t index) |
bool | bm_menu_set_highlighted_item (struct bm_menu *menu, struct bm_item *item) |
struct bm_item * | bm_menu_get_highlighted_item (const struct bm_menu *menu) |
bool | bm_menu_set_selected_items (struct bm_menu *menu, struct bm_item **items, uint32_t nmemb) |
struct bm_item ** | bm_menu_get_selected_items (const struct bm_menu *menu, uint32_t *out_nmemb) |
bool | bm_menu_set_items (struct bm_menu *menu, const struct bm_item **items, uint32_t nmemb) |
struct bm_item ** | bm_menu_get_items (const struct bm_menu *menu, uint32_t *out_nmemb) |
struct bm_item ** | bm_menu_get_filtered_items (const struct bm_menu *menu, uint32_t *out_nmemb) |
Menu Logic | |
void | bm_menu_render (const struct bm_menu *menu) |
void | bm_menu_filter (struct bm_menu *menu) |
enum bm_key | bm_menu_poll_key (struct bm_menu *menu, uint32_t *out_unicode) |
enum bm_run_result | bm_menu_run_with_key (struct bm_menu *menu, enum bm_key key, uint32_t unicode) |
Item Memory | |
struct bm_item * | bm_item_new (const char *text) |
void | bm_item_free (struct bm_item *item) |
Item Properties | |
void | bm_item_set_userdata (struct bm_item *item, void *userdata) |
void * | bm_item_get_userdata (struct bm_item *item) |
bool | bm_item_set_text (struct bm_item *item, const char *text) |
const char * | bm_item_get_text (const struct bm_item *item) |
Public API header.