ui/ui/image.h

changeset 108
77254bd6dccb
parent 103
6606616eca9f
child 112
c3f2f16fa4b8
equal deleted inserted replaced
107:b34bd1557c6c 108:77254bd6dccb
43 #define UIIMAGE void* 43 #define UIIMAGE void*
44 #endif 44 #endif
45 45
46 46
47 typedef struct UiImageViewerArgs { 47 typedef struct UiImageViewerArgs {
48 UiTri fill; 48 UiBool fill;
49 UiBool hexpand; 49 UiBool hexpand;
50 UiBool vexpand; 50 UiBool vexpand;
51 UiBool hfill; 51 UiBool hfill;
52 UiBool vfill; 52 UiBool vfill;
53 UiBool override_defaults; 53 UiBool override_defaults;
73 void *onbuttonpressdata; 73 void *onbuttonpressdata;
74 ui_callback onbuttonrelease; 74 ui_callback onbuttonrelease;
75 void *onbuttonreleasedata; 75 void *onbuttonreleasedata;
76 } UiImageViewerArgs; 76 } UiImageViewerArgs;
77 77
78 #define ui_imageviewer(obj, ...) ui_imageviewer_create(obj, (UiImageViewerArgs){ __VA_ARGS__ } ) 78 #define ui_imageviewer(obj, ...) ui_imageviewer_create(obj, &(UiImageViewerArgs){ __VA_ARGS__ } )
79 79
80 UIEXPORT UIWIDGET ui_imageviewer_create(UiObject *obj, UiImageViewerArgs args); 80 UIEXPORT UIWIDGET ui_imageviewer_create(UiObject *obj, UiImageViewerArgs *args);
81 81
82 UIEXPORT UIWIDGET ui_imageviewer_reset(UIWIDGET w); 82 UIEXPORT UIWIDGET ui_imageviewer_reset(UIWIDGET w);
83 UIEXPORT UIWIDGET ui_imageviewer_set_autoscale(UIWIDGET w, UiBool set); 83 UIEXPORT UIWIDGET ui_imageviewer_set_autoscale(UIWIDGET w, UiBool set);
84 UIEXPORT UIWIDGET ui_imageviewer_set_adjustwidgetsize(UIWIDGET w, UiBool set); 84 UIEXPORT UIWIDGET ui_imageviewer_set_adjustwidgetsize(UIWIDGET w, UiBool set);
85 UIEXPORT UIWIDGET ui_imageviewer_set_useradjustable(UIWIDGET w, UiBool set); 85 UIEXPORT UIWIDGET ui_imageviewer_set_useradjustable(UIWIDGET w, UiBool set);
86 86
87 UIEXPORT int ui_image_load_file(UiGeneric *obj, const char *path); 87 UIEXPORT int ui_image_load_file(UiGeneric *obj, const char *path);
88 UIEXPORT int ui_image_load_data(UiGeneric *obj, const void *imgdata, size_t size);
88 89
89 UIEXPORT void ui_image_ref(UIIMAGE img); 90 UIEXPORT void ui_image_ref(UIIMAGE img);
90 UIEXPORT void ui_image_unref(UIIMAGE img); 91 UIEXPORT void ui_image_unref(UIIMAGE img);
91 92
92 #ifdef __cplusplus 93 #ifdef __cplusplus

mercurial