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

Changeset b9d689b in mainline


Ignore:
Timestamp:
2021-10-13T09:14:19Z (7 months ago)
Author:
Jiri Svoboda <jiri@…>
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)
Message:

Move type definitions to separate directory

Location:
uspace/app/nav
Files:
3 added
4 edited

Legend:

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

    r3e6c51f rb9d689b  
    3838
    3939#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>
    4540#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"
    5442
    5543extern errno_t nav_menu_create(ui_window_t *, nav_menu_t **);
  • uspace/app/nav/nav.h

    r3e6c51f rb9d689b  
    3838
    3939#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"
    5841
    5942extern errno_t navigator_create(const char *, navigator_t **);
  • uspace/app/nav/panel.h

    r3e6c51f rb9d689b  
    3737#define PANEL_H
    3838
    39 #include <adt/list.h>
    4039#include <errno.h>
    41 #include <gfx/color.h>
    4240#include <gfx/coord.h>
    4341#include <io/kbd_event.h>
     
    4543#include <ui/control.h>
    4644#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"
    10146
    10247extern errno_t panel_create(ui_window_t *, panel_t **);
  • uspace/app/nav/test/panel.c

    r3e6c51f rb9d689b  
    3232#include <pcut/pcut.h>
    3333#include <stdio.h>
     34#include <ui/ui.h>
    3435#include <vfs/vfs.h>
    3536#include "../panel.h"
Note: See TracChangeset for help on using the changeset viewer.