Changeset accdf882 in mainline for uspace/lib
- Timestamp:
- 2025-02-05T21:26:26Z (8 months ago)
- Branches:
- master
- Children:
- b336bfd8
- Parents:
- 832cbe7
- Location:
- uspace/lib/ui
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/ui/include/types/ui/filelist.h
r832cbe7 raccdf882 1 1 /* 2 * Copyright (c) 202 2Jiri Svoboda2 * Copyright (c) 2025 Jiri Svoboda 3 3 * All rights reserved. 4 4 * … … 37 37 #define _UI_TYPES_FILELIST_H 38 38 39 #include <loc.h> 40 #include <stdbool.h> 41 #include <stdint.h> 42 39 43 struct ui_file_list; 40 44 typedef struct ui_file_list ui_file_list_t; … … 43 47 typedef struct ui_file_list_entry ui_file_list_entry_t; 44 48 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 */ 50 typedef 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; 47 60 48 61 /** File list callbacks */ -
uspace/lib/ui/include/ui/filelist.h
r832cbe7 raccdf882 1 1 /* 2 * Copyright (c) 202 3Jiri Svoboda2 * Copyright (c) 2025 Jiri Svoboda 3 3 * All rights reserved. 4 4 * … … 54 54 extern errno_t ui_file_list_open(ui_file_list_t *, ui_file_list_entry_t *); 55 55 extern ui_file_list_entry_t *ui_file_list_get_cursor(ui_file_list_t *); 56 extern void ui_file_list_entry_get_attr(ui_file_list_entry_t *, 57 ui_file_list_entry_attr_t *); 56 58 57 59 #endif -
uspace/lib/ui/private/filelist.h
r832cbe7 raccdf882 1 1 /* 2 * Copyright (c) 202 3Jiri Svoboda2 * Copyright (c) 2025 Jiri Svoboda 3 3 * All rights reserved. 4 4 * … … 43 43 #include <stdint.h> 44 44 #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 };57 45 58 46 /** File list entry */ -
uspace/lib/ui/src/filelist.c
r832cbe7 raccdf882 1 1 /* 2 * Copyright (c) 202 3Jiri Svoboda2 * Copyright (c) 2025 Jiri Svoboda 3 3 * All rights reserved. 4 4 * … … 535 535 } 536 536 537 /** Get file list entry attributes. 538 * 539 * @param entry File list entry 540 * @return Current cursor 541 */ 542 void 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 537 551 /** Open file list entry. 538 552 *
Note:
See TracChangeset
for help on using the changeset viewer.