🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.windows.x
Article #36644

--- fundamental Xlib problem ---

#36644
From: Umesh N Gadasalli
Date: Sat, 10 Feb 1990 03:32
44 lines
1667 bytes
Hi netters,

  I am just starting out on X-lib and I have a basic fundamental
  problem. Any help will be much appreciated.

  I have an Event Gathering Loop which handles the events KeyPress
  as well as ButtonPress. I have an application where the user presses
  a particular key ( say 'B' ) which starts off execution of a loop. I need  
  this loop to be executed continuosly untill the user hits another 
  particular key ( say 'S' ).

  The present code is something like this:

    while (1)
    {
      XNextEvent( display, &event );
      switch( event )
      {
       case Expose: -----
		    break;

       case ButtonPress:---
			break;

        case KeyPress:
		      i = XLookupString(............);

		      do                    /*  see       */
		      {                     /* comments   */
		       EXECUTE();           /*  below     */
		      }                     /*
		      until ( key == 'B' ); /*
      }
    }


     comments:

     when i hit a 'B' the program starts executing something.
     i want this to be continued until i hit 'S'
     How do I sense that 'S' was pressed when I am within
     the loop ?

     umesh@csd4.csd.uwm.edu
Technical Details
Message-ID: <2312@uwm.edu>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!wuarchive!zaphod.mps.ohio-state.edu!uwm.edu!csd4.csd.uwm.edu!umesh

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!wuarchive!zaphod.mps.ohio-state.edu!uwm.edu!csd4.csd.uwm.edu!umesh
From: umesh@csd4.csd.uwm.edu (Umesh N Gadasalli)
Newsgroups: comp.windows.x
Subject: --- fundamental Xlib problem ---
Message-ID: <2312@uwm.edu>
Date: 10 Feb 90 03:32:57 GMT
Sender: news@uwm.edu
Reply-To: umesh@csd4.csd.uwm.edu (Umesh N Gadasalli)
Distribution: usa
Organization: University of Wisconsin-Milwaukee
Lines: 44