blob: 35a0471da0646b4cfa88d7947b4c0c4f06e570c1 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
|
/*
* This file is subject to the terms of the GFX License. If a copy of
* the license was not distributed with this file, you can obtain one at:
*
* http://chibios-gfx.com/license.html
*/
/**
* @file src/gwin/image.c
* @brief GWIN sub-system image code.
*/
#include "gfx.h"
#if GFX_USE_GWIN && GWIN_NEED_IMAGE
#include "gwin/class_gwin.h"
static void _destroy(GWindowObject *gh) {
(void)gh;
return;
}
static void _redraw(GWindowObject *gh) {
(void)gh;
return;
}
static void _afterClear(GWindowObject *gh) {
((GImageWidget *)gh)->cx = 0;
((GImageWidget *)gh)->cy = 0;
return;
}
static const gwinVMT imageVMT = {
"Image", // The class name
sizeof(GImageWidget), // The object size
_destroy, // The destroy routine
_redraw, // The redraw routine
_afterClear, // The after-clear routine
};
GHandle gwinImageCreate(GImageWidget *widget, GWindowInit *pInit) {
if (!(widget = (GImageWidget *)_gwindowCreate(&widget->g, pInit, &imageVMT, 0)))
return 0;
widget->cx = 0;
widget->cy = 0;
gwinSetVisible((GHandle)widget, pInit->show);
return (GHandle)widget;
}
void gwinImageDisplay(GImageWidget *widget, gdispImage *image) {
}
#endif // GFX_USE_GWIN && GWIN_NEED_IMAGE
/** @} */
|