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


Ignore:
Timestamp:
2021-10-25T00:32:45Z (3 years ago)
Author:
jxsvoboda <5887334+jxsvoboda@…>
Branches:
master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
8c72f533
Parents:
9f7e9bb
git-author:
Jiri Svoboda <jiri@…> (2021-10-12 17:06:35)
git-committer:
jxsvoboda <5887334+jxsvoboda@…> (2021-10-25 00:32:45)
Message:

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

File:
1 edited

Legend:

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

    r9f7e9bb rbe1d74c1  
    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.