[prev in list] [next in list] [prev in thread] [next in thread]
List: ncurses-bug
Subject: Re: exit activateCDKSelection from a callback
From: Thomas Dickey <dickey () his ! com>
Date: 2009-04-03 16:42:19
Message-ID: 20090403124122.W4805 () mail101 ! his ! com
[Download RAW message or body]
On Fri, 3 Apr 2009, TheLonelyStar wrote:
>
> Bump.
> Anybody an Idea of how to make this work?
> Thanks!
> Nathan
I took a first look at it, thought that it _should_ be doable by
manipulating the exit state, ran short of time and think I might be
able to look deeper on the weekend.
>
>
> TheLonelyStar wrote:
> >
> >
> >
> > Thomas Dickey-2 wrote:
> > >
> > > Perhaps you can send a short demo program - then we can discuss...
> > >
> >
> > Here it is:
> >
> > bool Quit=false;
> >
> > static int OnChar(EObjectType cdktype,void *object,void
> > *clientData,chtype key)
> > {
> > Quit=true;
> > }
> >
> > static char* choices[]={
> > " ",
> > "*"
> > };
> >
> > int main()
> > {
> > CDKSCREEN* cdkscreen=initCDKScreen(initscr());
> > CDKSELECTION* sel1 =
> > newCDKSelection(cdkscreen,20,2,RIGHT,-4,-21,"</U>Sel1<!U>",0,0,choices,2,A_REVERSE,true,false);
> > CDKSELECTION* sel2 =
> > newCDKSelection(cdkscreen,1,2,RIGHT,-4,19,"</U>Sel2<!U>",0,0,choices,2,A_REVERSE,true,false);
> >
> > bindCDKObject(vSELECTION, sel1, 'q', OnChar, 0);
> > bindCDKObject(vSELECTION, sel2, 'q', OnChar, 0);
> >
> > drawCDKSelection(sel2,true);
> > while(!Quit)
> > {
> > while(activateCDKSelection(sel1,0)!=1);
> > if(Quit)
> > break;
> > while(activateCDKSelection(sel2,0)!=1);
> > }
> >
> >
> > destroyCDKSelection(sel2);
> > destroyCDKSelection(sel1);
> > destroyCDKScreen(cdkscreen);
> > endCDK();
> >
> > return 0;
> > }
> >
> >
>
> --
> View this message in context: \
> http://www.nabble.com/exit-activateCDKSelection-from-a-callback-tp22769731p22872132.html
> Sent from the Gnu - Ncurses mailing list archive at Nabble.com.
>
>
>
> _______________________________________________
> Bug-ncurses mailing list
> Bug-ncurses@gnu.org
> http://lists.gnu.org/mailman/listinfo/bug-ncurses
>
--
Thomas E. Dickey
http://invisible-island.net
ftp://invisible-island.net
_______________________________________________
Bug-ncurses mailing list
Bug-ncurses@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-ncurses
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic