Wed, 27 Nov 2024 16:42:19 +0100
add encryption and lock indicator, resolves #501
33
cdeb0dc47ef5
replace hard coded icon names with macros
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
1 | /* |
cdeb0dc47ef5
replace hard coded icon names with macros
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
2 | * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. |
cdeb0dc47ef5
replace hard coded icon names with macros
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
3 | * |
cdeb0dc47ef5
replace hard coded icon names with macros
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
4 | * Copyright 2024 Olaf Wintermann. All rights reserved. |
cdeb0dc47ef5
replace hard coded icon names with macros
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
5 | * |
cdeb0dc47ef5
replace hard coded icon names with macros
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
6 | * Redistribution and use in source and binary forms, with or without |
cdeb0dc47ef5
replace hard coded icon names with macros
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
7 | * modification, are permitted provided that the following conditions are met: |
cdeb0dc47ef5
replace hard coded icon names with macros
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
8 | * |
cdeb0dc47ef5
replace hard coded icon names with macros
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
9 | * 1. Redistributions of source code must retain the above copyright |
cdeb0dc47ef5
replace hard coded icon names with macros
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
10 | * notice, this list of conditions and the following disclaimer. |
cdeb0dc47ef5
replace hard coded icon names with macros
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
11 | * |
cdeb0dc47ef5
replace hard coded icon names with macros
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
12 | * 2. Redistributions in binary form must reproduce the above copyright |
cdeb0dc47ef5
replace hard coded icon names with macros
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
13 | * notice, this list of conditions and the following disclaimer in the |
cdeb0dc47ef5
replace hard coded icon names with macros
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
14 | * documentation and/or other materials provided with the distribution. |
cdeb0dc47ef5
replace hard coded icon names with macros
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
15 | * |
cdeb0dc47ef5
replace hard coded icon names with macros
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
16 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" |
cdeb0dc47ef5
replace hard coded icon names with macros
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
17 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE |
cdeb0dc47ef5
replace hard coded icon names with macros
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
18 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE |
cdeb0dc47ef5
replace hard coded icon names with macros
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
19 | * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE |
cdeb0dc47ef5
replace hard coded icon names with macros
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
20 | * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR |
cdeb0dc47ef5
replace hard coded icon names with macros
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
21 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF |
cdeb0dc47ef5
replace hard coded icon names with macros
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
22 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS |
cdeb0dc47ef5
replace hard coded icon names with macros
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
23 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN |
cdeb0dc47ef5
replace hard coded icon names with macros
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
24 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) |
cdeb0dc47ef5
replace hard coded icon names with macros
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
25 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE |
cdeb0dc47ef5
replace hard coded icon names with macros
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
26 | * POSSIBILITY OF SUCH DAMAGE. |
cdeb0dc47ef5
replace hard coded icon names with macros
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
27 | */ |
cdeb0dc47ef5
replace hard coded icon names with macros
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
28 | |
cdeb0dc47ef5
replace hard coded icon names with macros
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
29 | #ifndef UI_ICONS_H |
cdeb0dc47ef5
replace hard coded icon names with macros
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
30 | #define UI_ICONS_H |
cdeb0dc47ef5
replace hard coded icon names with macros
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
31 | |
cdeb0dc47ef5
replace hard coded icon names with macros
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
32 | #include "toolkit.h" |
cdeb0dc47ef5
replace hard coded icon names with macros
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
33 | |
cdeb0dc47ef5
replace hard coded icon names with macros
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
34 | #ifdef __cplusplus |
cdeb0dc47ef5
replace hard coded icon names with macros
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
35 | extern "C" { |
cdeb0dc47ef5
replace hard coded icon names with macros
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
36 | #endif |
cdeb0dc47ef5
replace hard coded icon names with macros
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
37 | |
44
473954dc6b74
update toolkit: gtk4 improvements
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
43
diff
changeset
|
38 | #ifdef UI_GTK |
33
cdeb0dc47ef5
replace hard coded icon names with macros
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
39 | |
43
ef01d2c90128
some minor toolbar adjustments, toolkit icons update
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
33
diff
changeset
|
40 | #define UI_ICON_HOME "go-home" |
ef01d2c90128
some minor toolbar adjustments, toolkit icons update
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
33
diff
changeset
|
41 | #define UI_ICON_NEW_WINDOW "list-add" |
ef01d2c90128
some minor toolbar adjustments, toolkit icons update
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
33
diff
changeset
|
42 | #define UI_ICON_REFRESH "view-refresh" |
33
cdeb0dc47ef5
replace hard coded icon names with macros
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
43 | #define UI_ICON_NEW_FOLDER "folder-new" |
43
ef01d2c90128
some minor toolbar adjustments, toolkit icons update
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
33
diff
changeset
|
44 | #define UI_ICON_ADD "document-new" |
ef01d2c90128
some minor toolbar adjustments, toolkit icons update
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
33
diff
changeset
|
45 | #define UI_ICON_UPLOAD "document-open" |
ef01d2c90128
some minor toolbar adjustments, toolkit icons update
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
33
diff
changeset
|
46 | #define UI_ICON_SAVE_LOCAL "document-save-as" |
ef01d2c90128
some minor toolbar adjustments, toolkit icons update
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
33
diff
changeset
|
47 | #define UI_ICON_DELETE "edit-delete" |
33
cdeb0dc47ef5
replace hard coded icon names with macros
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
48 | #define UI_ICON_DOCK_LEFT "" |
cdeb0dc47ef5
replace hard coded icon names with macros
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
49 | #define UI_ICON_DOCK_RIGHT "" |
cdeb0dc47ef5
replace hard coded icon names with macros
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
50 | #define UI_ICON_GO_BACK "go-previous" |
cdeb0dc47ef5
replace hard coded icon names with macros
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
51 | #define UI_ICON_GO_FORWARD "go-next" |
cdeb0dc47ef5
replace hard coded icon names with macros
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
52 | |
44
473954dc6b74
update toolkit: gtk4 improvements
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
43
diff
changeset
|
53 | #endif /* UI_GTK */ |
33
cdeb0dc47ef5
replace hard coded icon names with macros
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
54 | |
cdeb0dc47ef5
replace hard coded icon names with macros
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
55 | |
cdeb0dc47ef5
replace hard coded icon names with macros
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
56 | |
cdeb0dc47ef5
replace hard coded icon names with macros
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
57 | #ifdef UI_WINUI |
cdeb0dc47ef5
replace hard coded icon names with macros
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
58 | |
cdeb0dc47ef5
replace hard coded icon names with macros
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
59 | #define UI_ICON_HOME "Home" |
cdeb0dc47ef5
replace hard coded icon names with macros
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
60 | #define UI_ICON_NEW_WINDOW "NewWindow" |
cdeb0dc47ef5
replace hard coded icon names with macros
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
61 | #define UI_ICON_REFRESH "Refresh" |
cdeb0dc47ef5
replace hard coded icon names with macros
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
62 | #define UI_ICON_NEW_FOLDER "NewFolder" |
cdeb0dc47ef5
replace hard coded icon names with macros
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
63 | #define UI_ICON_ADD "Add" |
cdeb0dc47ef5
replace hard coded icon names with macros
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
64 | #define UI_ICON_UPLOAD "Upload" |
cdeb0dc47ef5
replace hard coded icon names with macros
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
65 | #define UI_ICON_SAVE_LOCAL "SaveLocal" |
cdeb0dc47ef5
replace hard coded icon names with macros
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
66 | #define UI_ICON_DELETE "Delete" |
cdeb0dc47ef5
replace hard coded icon names with macros
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
67 | #define UI_ICON_DOCK_LEFT "DockLeft" |
cdeb0dc47ef5
replace hard coded icon names with macros
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
68 | #define UI_ICON_DOCK_RIGHT "DockRight" |
cdeb0dc47ef5
replace hard coded icon names with macros
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
69 | #define UI_ICON_GO_BACK "Back" |
cdeb0dc47ef5
replace hard coded icon names with macros
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
70 | #define UI_ICON_GO_FORWARD "Forward" |
cdeb0dc47ef5
replace hard coded icon names with macros
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
71 | |
cdeb0dc47ef5
replace hard coded icon names with macros
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
72 | #endif /* UI_WINUI */ |
51
e324291ca9f8
add resource preview window
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
44
diff
changeset
|
73 | |
e324291ca9f8
add resource preview window
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
44
diff
changeset
|
74 | |
e324291ca9f8
add resource preview window
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
44
diff
changeset
|
75 | UIEXPORT UiIcon* ui_icon(const char* name, size_t size); |
e324291ca9f8
add resource preview window
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
44
diff
changeset
|
76 | UIEXPORT UiIcon* ui_icon_unscaled(const char *name, int size); |
e324291ca9f8
add resource preview window
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
44
diff
changeset
|
77 | UIEXPORT UiIcon* ui_imageicon(const char* file); |
e324291ca9f8
add resource preview window
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
44
diff
changeset
|
78 | UIEXPORT void ui_icon_free(UiIcon* icon); |
e324291ca9f8
add resource preview window
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
44
diff
changeset
|
79 | |
e324291ca9f8
add resource preview window
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
44
diff
changeset
|
80 | UIEXPORT UiIcon* ui_foldericon(size_t size); |
e324291ca9f8
add resource preview window
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
44
diff
changeset
|
81 | UIEXPORT UiIcon* ui_fileicon(size_t size); |
33
cdeb0dc47ef5
replace hard coded icon names with macros
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
82 | |
cdeb0dc47ef5
replace hard coded icon names with macros
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
83 | |
cdeb0dc47ef5
replace hard coded icon names with macros
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
84 | #ifdef __cplusplus |
cdeb0dc47ef5
replace hard coded icon names with macros
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
85 | } |
cdeb0dc47ef5
replace hard coded icon names with macros
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
86 | #endif |
cdeb0dc47ef5
replace hard coded icon names with macros
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
87 | |
cdeb0dc47ef5
replace hard coded icon names with macros
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
88 | #endif /* UI_ICONS_H */ |
cdeb0dc47ef5
replace hard coded icon names with macros
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
89 |