Changeset 8e5f39d in mainline for uspace/app/nav/panel.h


Ignore:
Timestamp:
2021-10-07T17:17:36Z (3 years ago)
Author:
Jiri Svoboda <jiri@…>
Children:
166aba54
Parents:
3b67e95
Message:

Read and display directory contents

File:
1 edited

Legend:

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

    r3b67e95 r8e5f39d  
    4848#include "panel.h"
    4949
     50/** Panel entry */
     51typedef struct {
     52        /** Containing panel */
     53        struct panel *panel;
     54        /** Link to @c panel->entries */
     55        link_t lentries;
     56        /** File name */
     57        char *name;
     58        /** File size */
     59        uint64_t size;
     60} panel_entry_t;
     61
    5062/** Navigator panel
    5163 *
     
    6577        gfx_color_t *color;
    6678
     79        /** Panel cursor color */
     80        gfx_color_t *curs_color;
     81
    6782        /** Panel entries (list of panel_entry_t) */
    6883        list_t entries;
     84
     85        /** First entry of current page */
     86        panel_entry_t *page;
     87
     88        /** Cursor position */
     89        panel_entry_t *cursor;
    6990} panel_t;
    70 
    71 /** Panel entry */
    72 typedef struct {
    73         /** Containing panel */
    74         panel_t *panel;
    75         /** Link to @c panel->entries */
    76         link_t lentries;
    77         /** File name */
    78         char *name;
    79         /** File size */
    80         uint64_t size;
    81 } panel_entry_t;
    8291
    8392extern errno_t panel_create(ui_window_t *, panel_t **);
     
    8998extern errno_t panel_entry_append(panel_t *, const char *, uint64_t);
    9099extern void panel_entry_delete(panel_entry_t *);
     100extern void panel_clear_entries(panel_t *);
     101extern errno_t panel_read_dir(panel_t *, const char *);
    91102extern panel_entry_t *panel_first(panel_t *);
    92103extern panel_entry_t *panel_next(panel_entry_t *);
Note: See TracChangeset for help on using the changeset viewer.