Changeset 61784ed in mainline for uspace/app/nav/panel.h


Ignore:
Timestamp:
2021-10-25T00:32:45Z (2 years ago)
Author:
jxsvoboda <5887334+jxsvoboda@…>
Branches:
master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
0e80e40
Parents:
b36ebb42
git-author:
Jiri Svoboda <jiri@…> (2021-10-05 17:07:26)
git-committer:
jxsvoboda <5887334+jxsvoboda@…> (2021-10-25 00:32:45)
Message:

Creating and enumerating panel entries

File:
1 edited

Legend:

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

    rb36ebb42 r61784ed  
    3737#define PANEL_H
    3838
     39#include <adt/list.h>
    3940#include <errno.h>
    4041#include <gfx/color.h>
     
    4344#include <ui/control.h>
    4445#include <ui/window.h>
     46#include <stdint.h>
    4547#include "nav.h"
    4648#include "panel.h"
     
    6264        /** Panel color */
    6365        gfx_color_t *color;
     66
     67        /** Panel entries (list of panel_entry_t) */
     68        list_t entries;
    6469} panel_t;
     70
     71/** Panel entry */
     72typedef 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;
    6582
    6683extern errno_t panel_create(ui_window_t *, panel_t **);
     
    7087extern ui_control_t *panel_ctl(panel_t *);
    7188extern void panel_set_rect(panel_t *, gfx_rect_t *);
     89extern errno_t panel_entry_append(panel_t *, const char *, uint64_t);
     90extern void panel_entry_delete(panel_entry_t *);
     91extern panel_entry_t *panel_first(panel_t *);
     92extern panel_entry_t *panel_next(panel_entry_t *);
    7293
    7394#endif
Note: See TracChangeset for help on using the changeset viewer.