need help in looping many times...



thanks to a slew of you guys assistance, i have the beginnings of a
gtk written in C.  i'm into my 6th week of this and keep getting
ideas from a few on this this.

vbc.tgz is enclosed; find someplace to save it, untar and make the
'vbc' binary.  the button i have a question about it labeled "Run
Text-To-Speech".  since this program is for people whose speech is
impaired [or lost] and ==can== type, the user click the Run button.
you need gvim and espeak to make things work.  After clicking Run,
gvim will open a GUI editor.  the user who needs help speaking
simply types what he wants to say, then hit [ESC] and :x<enter>.
the computer then speaks whatever he had typewritten.

right now, the user has to click and wait for gvim to spawn before
he can type.  how can i code this so that the editor pops up over
and over *while waiting for the user to type.*  if the user typed
nothing, the program would pause.  

i actually did this is a separate function several days ago, but the
main window always went grey after about three invocations of gvim.
i am assuming the gvim [or kate or kwrite--any editor] must be
called from a callback; i'm just not sure why.   michael torrie and
at least one other suggested that i use the
while(gtk_events_pending) iteration loop.  that may be the magic 
code ... or maybe not!  
if the speech-impaired user lost his voice to laryngeal cancer or
deafness---in other words, cannot speak at all, then maybe he is shy
and having to click-and-speak is no big deal.  but what if you have
your laptop with you and run into old friends.  there could be
hundreds of type-and-speak times.  that could cause shoulder pain in
moving from mouse to keyboard and back.  then the idea of the
automatic  editor popup occurred.

tia, of course, for any insights.  the more i learn about gtk, the
more i see how advanced it is over XAw, the athena toolkit that i
used years ago, :)


gary



-- 
 Gary Kline  kline thought org  http://www.thought.org  Public Service Unix
           Journey Toward the Dawn, E-Book: http://www.thought.org
          The 8.57a release of Jottings: http://jottings.thought.org
             Twenty-five years of service to the Unix community.




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]