Changeset accdf882 in mainline for uspace/lib


Ignore:
Timestamp:
2025-02-05T21:26:26Z (8 months ago)
Author:
Jiri Svoboda <jiri@…>
Branches:
master
Children:
b336bfd8
Parents:
832cbe7
Message:

File / Edit (Ctrl-E) in Navigator to start editor on current file

Location:
uspace/lib/ui
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/ui/include/types/ui/filelist.h

    r832cbe7 raccdf882  
    11/*
    2  * Copyright (c) 2022 Jiri Svoboda
     2 * Copyright (c) 2025 Jiri Svoboda
    33 * All rights reserved.
    44 *
     
    3737#define _UI_TYPES_FILELIST_H
    3838
     39#include <loc.h>
     40#include <stdbool.h>
     41#include <stdint.h>
     42
    3943struct ui_file_list;
    4044typedef struct ui_file_list ui_file_list_t;
     
    4347typedef struct ui_file_list_entry ui_file_list_entry_t;
    4448
    45 struct ui_file_list_entry_attr;
    46 typedef struct ui_file_list_entry_attr ui_file_list_entry_attr_t;
     49/** File list entry attributes */
     50typedef struct ui_file_list_entry_attr {
     51        /** File name */
     52        const char *name;
     53        /** File size */
     54        uint64_t size;
     55        /** @c true iff entry is a directory */
     56        bool isdir;
     57        /** Service number for service special entries */
     58        service_id_t svc;
     59} ui_file_list_entry_attr_t;
    4760
    4861/** File list callbacks */
  • uspace/lib/ui/include/ui/filelist.h

    r832cbe7 raccdf882  
    11/*
    2  * Copyright (c) 2023 Jiri Svoboda
     2 * Copyright (c) 2025 Jiri Svoboda
    33 * All rights reserved.
    44 *
     
    5454extern errno_t ui_file_list_open(ui_file_list_t *, ui_file_list_entry_t *);
    5555extern ui_file_list_entry_t *ui_file_list_get_cursor(ui_file_list_t *);
     56extern void ui_file_list_entry_get_attr(ui_file_list_entry_t *,
     57    ui_file_list_entry_attr_t *);
    5658
    5759#endif
  • uspace/lib/ui/private/filelist.h

    r832cbe7 raccdf882  
    11/*
    2  * Copyright (c) 2023 Jiri Svoboda
     2 * Copyright (c) 2025 Jiri Svoboda
    33 * All rights reserved.
    44 *
     
    4343#include <stdint.h>
    4444#include <types/ui/filelist.h>
    45 
    46 /** File list entry attributes */
    47 struct ui_file_list_entry_attr {
    48         /** File name */
    49         const char *name;
    50         /** File size */
    51         uint64_t size;
    52         /** @c true iff entry is a directory */
    53         bool isdir;
    54         /** Service number for service special entries */
    55         service_id_t svc;
    56 };
    5745
    5846/** File list entry */
  • uspace/lib/ui/src/filelist.c

    r832cbe7 raccdf882  
    11/*
    2  * Copyright (c) 2023 Jiri Svoboda
     2 * Copyright (c) 2025 Jiri Svoboda
    33 * All rights reserved.
    44 *
     
    535535}
    536536
     537/** Get file list entry attributes.
     538 *
     539 * @param entry File list entry
     540 * @return Current cursor
     541 */
     542void ui_file_list_entry_get_attr(ui_file_list_entry_t *entry,
     543    ui_file_list_entry_attr_t *attr)
     544{
     545        attr->name = entry->name;
     546        attr->size = entry->size;
     547        attr->isdir = entry->isdir;
     548        attr->svc = entry->svc;
     549}
     550
    537551/** Open file list entry.
    538552 *
Note: See TracChangeset for help on using the changeset viewer.