From ecaf8b83f8227724e9f862a0a8f64e6004a63d56 Mon Sep 17 00:00:00 2001 From: inmarket Date: Wed, 20 Aug 2014 12:18:27 +1000 Subject: Create a generic GWIN event. The frame now sends a GEVENT_GWIN_CLOSE event on closing. Unfortunately some gwin events have had a field renamed in order to generalise the structure. Demo's updated to match. --- demos/modules/gwin/frame/main.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'demos/modules/gwin/frame') diff --git a/demos/modules/gwin/frame/main.c b/demos/modules/gwin/frame/main.c index 3f3d8845..fe956925 100644 --- a/demos/modules/gwin/frame/main.c +++ b/demos/modules/gwin/frame/main.c @@ -138,19 +138,19 @@ int main(void) { switch(pe->type) { case GEVENT_GWIN_SLIDER: - if (((GEventGWinSlider *)pe)->slider == ghSliderR || \ - ghSliderG || \ - ghSliderB ) { + if (((GEventGWinSlider *)pe)->gwin == ghSliderR || \ + ghSliderG || \ + ghSliderB ) { _updateColor(); } break; case GEVENT_GWIN_BUTTON: - if (((GEventGWinButton *)pe)->button == ghButton1) { + if (((GEventGWinButton *)pe)->gwin == ghButton1) { gwinSliderSetPosition(ghSliderR, rand() % 256); - } else if (((GEventGWinButton *)pe)->button == ghButton2) { + } else if (((GEventGWinButton *)pe)->gwin == ghButton2) { gwinSliderSetPosition(ghSliderG, rand() % 256); - } else if (((GEventGWinButton *)pe)->button == ghButton3) { + } else if (((GEventGWinButton *)pe)->gwin == ghButton3) { gwinSliderSetPosition(ghSliderB, rand() % 256); } -- cgit v1.2.3