mirror of
https://github.com/davatorium/rofi.git
synced 2024-11-18 13:54:36 -05:00
3c64507f02
* Initial support for using boxes for packing widgets. * Make CapiTalIzation more consistent * Move widgets to subdirectory * Removed nolonger needed resize function. * Small cleanup * When switching mode, reuse view, don't rebuild it. Reduces artifacts. * Needs cleaning up. * Remove separate prompt argument, use display_name * Simplify run-switcher code. * Add notion of parents, and trigger parent update on resize. * Use widget_get_height wrapper, avoid crash * Size separator width based on height. (indent) * TODO add margin to box. * First draft version of listview. * Add scrollbar to listview widget * Add padding option to box * Move access to global config out of widget. (1/2 done) * Remove printf * Make listview not access global config * Add click support, implement on mode buttons. * Re-introduce mouse handling on list-view. * TODO draggin on scrollbar. * Fix multi-select * Fix warnings * Fix include
78 lines
1.8 KiB
C
78 lines
1.8 KiB
C
#ifndef ROFI_VIEW_INTERNAL_H
|
|
#define ROFI_VIEW_INTERNAL_H
|
|
#include "widgets/widget.h"
|
|
#include "widgets/textbox.h"
|
|
#include "widgets/separator.h"
|
|
#include "widgets/listview.h"
|
|
#include "widgets/box.h"
|
|
#include "keyb.h"
|
|
#include "x11-helper.h"
|
|
|
|
/**
|
|
* @ingroup ViewHandle
|
|
*
|
|
* @{
|
|
*/
|
|
// State of the menu.
|
|
|
|
struct RofiViewState
|
|
{
|
|
Mode *sw;
|
|
|
|
// Update/Refilter list.
|
|
int refilter;
|
|
int rchanged;
|
|
|
|
box *main_box;
|
|
// Entries
|
|
box *input_bar;
|
|
separator *input_bar_separator;
|
|
|
|
textbox *prompt;
|
|
textbox *text;
|
|
textbox *case_indicator;
|
|
|
|
listview *list_view;
|
|
// Small overlay.
|
|
textbox *overlay;
|
|
int *distance;
|
|
unsigned int *line_map;
|
|
|
|
unsigned int num_lines;
|
|
|
|
// Selected element.
|
|
unsigned int filtered_lines;
|
|
// Last offset in paginating.
|
|
unsigned int last_offset;
|
|
|
|
KeyBindingAction prev_action;
|
|
xcb_timestamp_t last_button_press;
|
|
|
|
int quit;
|
|
int skip_absorb;
|
|
// Return state
|
|
unsigned int selected_line;
|
|
MenuReturn retv;
|
|
unsigned int border;
|
|
workarea mon;
|
|
|
|
// Sidebar view
|
|
box *sidebar_bar;
|
|
unsigned int num_modi;
|
|
textbox **modi;
|
|
|
|
MenuFlags menu_flags;
|
|
int mouse_seen;
|
|
|
|
int reload;
|
|
// Handlers.
|
|
void ( *x11_event_loop )( struct RofiViewState *state, xcb_generic_event_t *ev, xkb_stuff *xkb );
|
|
void ( *finalize )( struct RofiViewState *state );
|
|
|
|
int width;
|
|
int height;
|
|
int x;
|
|
int y;
|
|
};
|
|
/** @} */
|
|
#endif
|