Fork us on GitHub Follow us on Facebook Follow us on Twitter

Changeset af2ea83 in mainline for uspace/app/nav/panel.h


Ignore:
Timestamp:
2021-10-12T17:06:45Z (9 months ago)
Author:
Jiri Svoboda <jiri@…>
Children:
3e6c51f
Parents:
166aba54
git-author:
Jiri Svoboda <jiri@…> (2021-10-12 17:06:35)
git-committer:
Jiri Svoboda <jiri@…> (2021-10-12 17:06:45)
Message:

Cursor movement (up, down, to top, to bottom)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/app/nav/panel.h

    r166aba54 raf2ea83  
    4141#include <gfx/color.h>
    4242#include <gfx/coord.h>
     43#include <io/kbd_event.h>
    4344#include <io/pos_event.h>
    4445#include <ui/control.h>
     
    8384        list_t entries;
    8485
     86        /** Number of entries */
     87        size_t entries_cnt;
     88
    8589        /** First entry of current page */
    8690        panel_entry_t *page;
    8791
     92        /** Index of first entry of current page */
     93        size_t page_idx;
     94
    8895        /** Cursor position */
    8996        panel_entry_t *cursor;
     97
     98        /** Index of entry under cursor */
     99        size_t cursor_idx;
    90100} panel_t;
    91101
    92102extern errno_t panel_create(ui_window_t *, panel_t **);
    93103extern void panel_destroy(panel_t *);
     104extern errno_t panel_entry_paint(panel_entry_t *, size_t);
    94105extern errno_t panel_paint(panel_t *);
     106extern ui_evclaim_t panel_kbd_event(panel_t *, kbd_event_t *);
    95107extern ui_evclaim_t panel_pos_event(panel_t *, pos_event_t *);
    96108extern ui_control_t *panel_ctl(panel_t *);
     
    101113extern errno_t panel_read_dir(panel_t *, const char *);
    102114extern panel_entry_t *panel_first(panel_t *);
     115extern panel_entry_t *panel_last(panel_t *);
    103116extern panel_entry_t *panel_next(panel_entry_t *);
     117extern panel_entry_t *panel_prev(panel_entry_t *);
     118extern void panel_cursor_move(panel_t *, panel_entry_t *, size_t);
     119extern void panel_cursor_up(panel_t *);
     120extern void panel_cursor_down(panel_t *);
     121extern void panel_cursor_top(panel_t *);
     122extern void panel_cursor_bottom(panel_t *);
    104123
    105124#endif
Note: See TracChangeset for help on using the changeset viewer.