@kv  0.0.4
Library for graph problems in C and Python
imageviewer.h
1 
18 #if !defined(AT_GUI_H_INSIDE)
19 #error "Only <at/gui.h> can be included directly."
20 #endif
21 #ifndef AT_IMAGEVIEWER_H
22 #define AT_IMAGEVIEWER_H
23 
24 #include <gtk/gtk.h>
25 #include <stdint.h>
26 #include <at/gui.h>
27 
28 AT_BEGIN_DECLS
29 
30 #define AT_TYPE_IMAGEVIEWER at_imageviewer_get_type()
31 G_DECLARE_DERIVABLE_TYPE(AtImageViewer, at_imageviewer, AT, IMAGEVIEWER, GtkWidget)
33 typedef struct _AtImageViewerClass{
34  GtkWidgetClass parent_class;
35 }AtImageViewerClass;
37 
41 AtImageViewer*
42 at_imageviewer_new();
43 
49 AtArrayU8*
50 at_imageviewer_get_array(AtImageViewer* imgv);
51 
56 void
57 at_imageviewer_zoom_in(AtImageViewer* imgv);
62 void
63 at_imageviewer_zoom_out(AtImageViewer* imgv);
70 void
71 at_imageviewer_zoom_in_at(AtImageViewer *imgv, int16_t cx, int16_t cy);
78 void
79 at_imageviewer_zoom_out_at(AtImageViewer *imgv, int16_t cx, int16_t cy);
80 
85 void
86 at_imageviewer_zoom_fit(AtImageViewer* imgv);
87 
92 void
93 at_imageviewer_zoom_reset(AtImageViewer* imgv);
100 void
101 at_imageviewer_move_to(AtImageViewer* imgv, int16_t offsetx, int16_t offsety);
108 void
109 at_imageviewer_move_to_default(AtImageViewer* imgv, AtAlignment alignmentX, AtAlignment aligmentY);
116 void
117 at_imageviewer_move(AtImageViewer* imgv, int16_t offsetx, int16_t offsety);
122 void
123 at_imageviewer_move_reset(AtImageViewer* imgv);
129 void
130 at_imageviewer_set(AtImageViewer* imgv, AtArrayU8* array);
139 gboolean
140 at_imageviewer_get_pixel(AtImageViewer* imgv, uint8_t *pixel, uint16_t x, uint16_t y);
149 gboolean
150 at_imageviewer_get_array_pos(AtImageViewer* imgv, int16_t *pos,uint16_t x, uint16_t y);
157 void
158 at_imageviewer_set_mouse_callback(AtImageViewer* imgv, AtMouseCallback mouse_callback, void* user_data);
159 AT_END_DECLS
160 
161 #endif