diff options
author | scuri <scuri> | 2009-06-23 03:18:33 +0000 |
---|---|---|
committer | scuri <scuri> | 2009-06-23 03:18:33 +0000 |
commit | 0610dd4f3064220a2e8fb1d8dc120044eb6c64a8 (patch) | |
tree | a5d0d3b6c79e967cd4e80c7668b906e8b422f902 /test/cdtest/cdtest.c | |
parent | 09be96e0606d05b056f82b5f9254208a2d0e4c88 (diff) |
*** empty log message ***
Diffstat (limited to 'test/cdtest/cdtest.c')
-rw-r--r-- | test/cdtest/cdtest.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/test/cdtest/cdtest.c b/test/cdtest/cdtest.c index bf701b9..9180bf4 100644 --- a/test/cdtest/cdtest.c +++ b/test/cdtest/cdtest.c @@ -393,6 +393,8 @@ static void CDTestClose(void) cdKillCanvas(ctgc.wd_canvas); cdKillCanvas(ctgc.iup_canvas); + memset(&ctgc, 0, sizeof(tCTC)); + IupDestroy(IupGetHandle("dlgLB")); IupDestroy(IupGetHandle("dlgAS")); IupDestroy(IupGetHandle("dlgPixel")); @@ -2378,6 +2380,9 @@ int fMotionCB(Ihandle *self, int x, int y, char *r) ignore(self); ignore(r); + if (!ctgc.iup_canvas) + return IUP_DEFAULT; + cdActivate(ctgc.iup_canvas); cdUpdateYAxis(&y); mouse_pos(x, y); @@ -2626,12 +2631,12 @@ void cdtest_loadled(void); /*-------------------------------------------------------------------------*/ /* Rotina principal. */ /*-------------------------------------------------------------------------*/ -void main(void) +int main(int argc, char** argv) { char *err = NULL; /* inicializa o IUP */ - IupOpen(); + IupOpen(&argc, &argv); /* carrega o LED */ #ifdef USE_LED @@ -2658,5 +2663,7 @@ void main(void) CDTestClose(); IupClose(); + + return 0; } |