aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorinmarket <andrewh@inmarket.com.au>2013-07-01 17:34:13 +1000
committerinmarket <andrewh@inmarket.com.au>2013-07-01 17:34:13 +1000
commit57d3632e36fe2ab55589207a84c29544b15bd2c3 (patch)
treee68070f37cf88b33fb5d717d9ef839c5e2e8dc88 /src
parenta51ffd5b6891a9fb87ac3a903ae6b415fc32c726 (diff)
downloaduGFX-57d3632e36fe2ab55589207a84c29544b15bd2c3.tar.gz
uGFX-57d3632e36fe2ab55589207a84c29544b15bd2c3.tar.bz2
uGFX-57d3632e36fe2ab55589207a84c29544b15bd2c3.zip
GWIN Init structures are const (read-only to GWIN)
Diffstat (limited to 'src')
-rw-r--r--src/gwin/button.c2
-rw-r--r--src/gwin/checkbox.c2
-rw-r--r--src/gwin/console.c2
-rw-r--r--src/gwin/graph.c2
-rw-r--r--src/gwin/gwidget.c2
-rw-r--r--src/gwin/gwin.c6
-rw-r--r--src/gwin/slider.c2
7 files changed, 9 insertions, 9 deletions
diff --git a/src/gwin/button.c b/src/gwin/button.c
index 4f823aa6..303d1078 100644
--- a/src/gwin/button.c
+++ b/src/gwin/button.c
@@ -151,7 +151,7 @@ static uint16_t ToggleGet(GWidgetObject *gw, uint16_t role) {
return ((GButtonObject *)gw)->toggle;
}
-GHandle gwinCreateButton(GButtonObject *gw, GWidgetInit *pInit) {
+GHandle gwinCreateButton(GButtonObject *gw, const GWidgetInit *pInit) {
if (!(gw = (GButtonObject *)_gwidgetCreate(&gw->w, pInit, &buttonVMT)))
return 0;
diff --git a/src/gwin/checkbox.c b/src/gwin/checkbox.c
index b4628ae0..62f4c55b 100644
--- a/src/gwin/checkbox.c
+++ b/src/gwin/checkbox.c
@@ -113,7 +113,7 @@ static uint16_t ToggleGet(GWidgetObject *gw, uint16_t role) {
return ((GCheckboxObject *)gw)->toggle;
}
-GHandle gwinCreateCheckbox(GCheckboxObject *gb, GWidgetInit *pInit) {
+GHandle gwinCreateCheckbox(GCheckboxObject *gb, const GWidgetInit *pInit) {
if (!(gb = (GCheckboxObject *)_gwidgetCreate(&gb->w, pInit, &checkboxVMT)))
return 0;
diff --git a/src/gwin/console.c b/src/gwin/console.c
index 39e534b4..105cc79d 100644
--- a/src/gwin/console.c
+++ b/src/gwin/console.c
@@ -66,7 +66,7 @@ static const gwinVMT consoleVMT = {
AfterClear, // The after-clear routine
};
-GHandle gwinCreateConsole(GConsoleObject *gc, GWindowInit *pInit) {
+GHandle gwinCreateConsole(GConsoleObject *gc, const GWindowInit *pInit) {
if (!(gc = (GConsoleObject *)_gwindowCreate(&gc->g, pInit, &consoleVMT, 0)))
return 0;
#if GFX_USE_OS_CHIBIOS && GWIN_CONSOLE_USE_BASESTREAM
diff --git a/src/gwin/graph.c b/src/gwin/graph.c
index 81ce1b5f..049f52e0 100644
--- a/src/gwin/graph.c
+++ b/src/gwin/graph.c
@@ -165,7 +165,7 @@ static void lineto(GGraphObject *gg, coord_t x0, coord_t y0, coord_t x1, coord_t
}
}
-GHandle gwinCreateGraph(GGraphObject *gg, GWindowInit *pInit) {
+GHandle gwinCreateGraph(GGraphObject *gg, const GWindowInit *pInit) {
if (!(gg = (GGraphObject *)_gwindowCreate(&gg->g, pInit, &graphVMT, 0)))
return 0;
gg->xorigin = gg->yorigin = 0;
diff --git a/src/gwin/gwidget.c b/src/gwin/gwidget.c
index 2825bf4c..a2b82f1d 100644
--- a/src/gwin/gwidget.c
+++ b/src/gwin/gwidget.c
@@ -165,7 +165,7 @@ void _gwidgetInit(void) {
geventRegisterCallback(&gl, gwidgetEvent, 0);
}
-GHandle _gwidgetCreate(GWidgetObject *pgw, GWidgetInit *pInit, const gwidgetVMT *vmt) {
+GHandle _gwidgetCreate(GWidgetObject *pgw, const GWidgetInit *pInit, const gwidgetVMT *vmt) {
if (!(pgw = (GWidgetObject *)_gwindowCreate(&pgw->g, &pInit->g, &vmt->g, GWIN_FLG_WIDGET|GWIN_FLG_ENABLED)))
return 0;
diff --git a/src/gwin/gwin.c b/src/gwin/gwin.c
index 110d35cc..c1122b3f 100644
--- a/src/gwin/gwin.c
+++ b/src/gwin/gwin.c
@@ -52,7 +52,7 @@ static color_t defaultBgColor = Black;
} else
gwinClear(gh);
}
- static void _gwm_redim(GHandle gh, GWindowInit *pInit) {
+ static void _gwm_redim(GHandle gh, const GWindowInit *pInit) {
gh->x = pInit->x; gh->y = pInit->y;
gh->width = pInit->width; gh->height = pInit->height;
if (gh->x < 0) { gh->width += gh->x; gh->x = 0; }
@@ -85,7 +85,7 @@ void _gwinInit(void) {
// Internal routine for use by GWIN components only
// Initialise a window creating it dynamically if required.
-GHandle _gwindowCreate(GWindowObject *pgw, GWindowInit *pInit, const gwinVMT *vmt, uint16_t flags) {
+GHandle _gwindowCreate(GWindowObject *pgw, const GWindowInit *pInit, const gwinVMT *vmt, uint16_t flags) {
// Allocate the structure if necessary
if (!pgw) {
if (!(pgw = (GWindowObject *)gfxAlloc(vmt->size)))
@@ -149,7 +149,7 @@ void gwinSetDefaultBgColor(color_t bgclr) {
* The GWindow Routines
*-----------------------------------------------*/
-GHandle gwinCreateWindow(GWindowObject *pgw, GWindowInit *pInit) {
+GHandle gwinCreateWindow(GWindowObject *pgw, const GWindowInit *pInit) {
if (!(pgw = _gwindowCreate(pgw, pInit, &basegwinVMT, 0)))
return 0;
gwinSetVisible(pgw, pInit->show);
diff --git a/src/gwin/slider.c b/src/gwin/slider.c
index 08dd6ca7..2dfa3a7c 100644
--- a/src/gwin/slider.c
+++ b/src/gwin/slider.c
@@ -233,7 +233,7 @@ static uint16_t DialGet(GWidgetObject *gw, uint16_t role) {
return ((GSliderObject *)gw)->dial;
}
-GHandle gwinCreateSlider(GSliderObject *gs, GWidgetInit *pInit) {
+GHandle gwinCreateSlider(GSliderObject *gs, const GWidgetInit *pInit) {
if (!(gs = (GSliderObject *)_gwidgetCreate(&gs->w, pInit, &sliderVMT)))
return 0;
gs->t_dn = (uint16_t) -1;