ui/gtk/image.h

changeset 51
e324291ca9f8
parent 44
473954dc6b74
equal deleted inserted replaced
50:9c25e2616bfa 51:e324291ca9f8
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 #if GTK_MAJOR_VERSION >= 4 42 int ui_imageviewer_set(UiGeneric *g, void *value, const char *type);
45 GtkIconPaintable *info;
46 #else
47 GtkIconInfo *info;
48 #endif
49 GdkPixbuf *pixbuf;
50 };
51 43
52 struct UiImage { 44 #ifdef __cplusplus
53 GdkPixbuf *pixbuf;
54 };
55
56 void ui_image_init(void);
57
58 GdkPixbuf* ui_get_image(const char *name);
59
60 GdkPixbuf* ui_icon_pixbuf(UiIcon *icon);
61
62 #ifdef __cplusplus
63 } 45 }
64 #endif 46 #endif
65 47
66 #endif /* IMAGE_H */ 48 #endif /* IMAGE_H */
67 49

mercurial