1 /* |
1 /* |
2 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. |
2 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. |
3 * |
3 * |
4 * Copyright 2017 Olaf Wintermann. All rights reserved. |
4 * Copyright 2024 Olaf Wintermann. All rights reserved. |
5 * |
5 * |
6 * Redistribution and use in source and binary forms, with or without |
6 * Redistribution and use in source and binary forms, with or without |
7 * modification, are permitted provided that the following conditions are met: |
7 * modification, are permitted provided that the following conditions are met: |
8 * |
8 * |
9 * 1. Redistributions of source code must retain the above copyright |
9 * 1. Redistributions of source code must retain the above copyright |
25 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE |
25 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE |
26 * POSSIBILITY OF SUCH DAMAGE. |
26 * POSSIBILITY OF SUCH DAMAGE. |
27 */ |
27 */ |
28 |
28 |
29 #ifndef IMAGE_H |
29 #ifndef IMAGE_H |
30 #define IMAGE_H |
30 #define IMAGE_H |
31 |
31 |
32 #include "../ui/image.h" |
32 #include "../ui/image.h" |
|
33 #include "toolkit.h" |
33 |
34 |
34 #ifdef __cplusplus |
35 #ifdef __cplusplus |
35 extern "C" { |
36 extern "C" { |
36 #endif |
37 #endif |
37 |
38 |
38 #if GTK_MAJOR_VERSION >= 3 && GTK_MINOR_VERSION >= 10 |
|
39 #define UI_SUPPORTS_SCALE |
|
40 #endif |
|
41 |
39 |
42 |
40 void* ui_imageviewer_get(UiGeneric *g); |
43 struct UiIcon { |
41 const char* ui_imageviewer_get_type(UiGeneric *g); |
44 GtkIconInfo *info; |
42 int ui_imageviewer_set(UiGeneric *g, void *value, const char *type); |
45 }; |
|
46 |
43 |
47 struct UiImage { |
44 #ifdef __cplusplus |
48 GdkPixbuf *pixbuf; |
|
49 }; |
|
50 |
|
51 void ui_image_init(void); |
|
52 |
|
53 GdkPixbuf* ui_get_image(const char *name); |
|
54 |
|
55 |
|
56 #ifdef __cplusplus |
|
57 } |
45 } |
58 #endif |
46 #endif |
59 |
47 |
60 #endif /* IMAGE_H */ |
48 #endif /* IMAGE_H */ |
61 |
49 |