slang-users mailing list

[2005 Date Index] [2005 Thread Index] [Other years]
[Thread Prev] [Thread Next]      [Date Prev] [Date Next]

Re: [slang-users] Error on RC5 .. Incompatable Pointer types ...


Ben Duncan <ben@xxxxxxxxxxxxxxxxxx> wrote:
>Here is the C code snippet that runs the SLAG Menu. Note where
>the "SCREEN" size changed is setting. How do I go about "immediately"
>re-painting the screen after a re-size has been done, since I am waiting
>for input ?

I do not quite understand the question.

>int RunMenu ( void )
>{
[...]
>   while ( menuitem != MENUEND )
>     {
>
>       if (Screen_Size_Changed)        /* screen size has changed */
>         {
>           SLtt_get_screen_size ();
>           SLsmg_reinit_smg ();
>           Screen_Size_Changed = 0 ;

  The repaint should occur here.

>         }
>       DisplayMenu (  );               /* Displays the menu on the screen */
>
>       menuitem = NOITEM;
>       SLang_flush_input ( ) ;
>       menuitem = EntryMenu (  );      /* Get keyboard navigation */

   Are you reading input from the user in the EntryMenu call?  As I
recall, you are using SLang's getkey functions.  If so, you may be
able to establish a interrupt handler such as the following.  But
without seeing the details of EntryMenu, it is hard to give more
specific advice.

   static int getkey_interrup_hook (void)
   {
      if (Screen_Size_Changed)
        {
           SLtt_get_screen_size ();
           SLsmg_reinit_smg ();
           Screen_Size_Changed = 0 ;
	   repaint_screen ();
        }
      return 0;
   }

        .
	.
	.
   int main (int argc, char **argv)
   {
        .
      /* perform initializations */
        .
      SLang_getkey_intr_hook = getkey_interrup_hook;
      
      main_loop ();
        .
	.
   }

--John

_______________________________________________
To unsubscribe, visit http://jedsoft.org/slang/mailinglists.html


[2005 date index] [2005 thread index]
[Thread Prev] [Thread Next]      [Date Prev] [Date Next]