Changeset b9d689b in mainline
- Timestamp:
- 2021-10-13T09:14:19Z (3 years ago)
- Children:
- fe5c7a1
- Parents:
- 3e6c51f
- git-author:
- Jiri Svoboda <jiri@…> (2021-10-12 19:14:02)
- git-committer:
- Jiri Svoboda <jiri@…> (2021-10-13 09:14:19)
- Location:
- uspace/app/nav
- Files:
-
- 3 added
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/app/nav/menu.h
r3e6c51f rb9d689b 38 38 39 39 #include <errno.h> 40 #include <ui/control.h>41 #include <ui/menu.h>42 #include <ui/menubar.h>43 #include <ui/menuentry.h>44 #include <ui/ui.h>45 40 #include <ui/window.h> 46 #include "nav.h" 47 48 /** Navigator menu */ 49 typedef struct nav_menu { 50 ui_t *ui; 51 ui_window_t *window; 52 ui_menu_bar_t *menubar; 53 } nav_menu_t; 41 #include "types/menu.h" 54 42 55 43 extern errno_t nav_menu_create(ui_window_t *, nav_menu_t **); -
uspace/app/nav/nav.h
r3e6c51f rb9d689b 38 38 39 39 #include <errno.h> 40 #include <display.h> 41 #include <ui/fixed.h> 42 #include <ui/ui.h> 43 #include <ui/window.h> 44 45 /** Navigator */ 46 typedef struct navigator { 47 /** User interface */ 48 ui_t *ui; 49 /** Window */ 50 ui_window_t *window; 51 /** Fixed layout */ 52 ui_fixed_t *fixed; 53 /** Menu */ 54 struct nav_menu *menu; 55 /** Panels */ 56 struct panel *panel[2]; 57 } navigator_t; 40 #include "types/nav.h" 58 41 59 42 extern errno_t navigator_create(const char *, navigator_t **); -
uspace/app/nav/panel.h
r3e6c51f rb9d689b 37 37 #define PANEL_H 38 38 39 #include <adt/list.h>40 39 #include <errno.h> 41 #include <gfx/color.h>42 40 #include <gfx/coord.h> 43 41 #include <io/kbd_event.h> … … 45 43 #include <ui/control.h> 46 44 #include <ui/window.h> 47 #include <stdint.h> 48 #include "nav.h" 49 #include "panel.h" 50 51 /** Panel entry */ 52 typedef struct { 53 /** Containing panel */ 54 struct panel *panel; 55 /** Link to @c panel->entries */ 56 link_t lentries; 57 /** File name */ 58 char *name; 59 /** File size */ 60 uint64_t size; 61 } panel_entry_t; 62 63 /** Navigator panel 64 * 65 * This is a custom UI control. 66 */ 67 typedef struct panel { 68 /** Base control object */ 69 struct ui_control *control; 70 71 /** Containing window */ 72 ui_window_t *window; 73 74 /** Panel rectangle */ 75 gfx_rect_t rect; 76 77 /** Panel color */ 78 gfx_color_t *color; 79 80 /** Panel cursor color */ 81 gfx_color_t *curs_color; 82 83 /** Panel entries (list of panel_entry_t) */ 84 list_t entries; 85 86 /** Number of entries */ 87 size_t entries_cnt; 88 89 /** First entry of current page */ 90 panel_entry_t *page; 91 92 /** Index of first entry of current page */ 93 size_t page_idx; 94 95 /** Cursor position */ 96 panel_entry_t *cursor; 97 98 /** Index of entry under cursor */ 99 size_t cursor_idx; 100 } panel_t; 45 #include "types/panel.h" 101 46 102 47 extern errno_t panel_create(ui_window_t *, panel_t **); -
uspace/app/nav/test/panel.c
r3e6c51f rb9d689b 32 32 #include <pcut/pcut.h> 33 33 #include <stdio.h> 34 #include <ui/ui.h> 34 35 #include <vfs/vfs.h> 35 36 #include "../panel.h"
Note:
See TracChangeset
for help on using the changeset viewer.