示例#1
0
/*******************************************************************************
          Name:        PrintChangedFocus
          Description: Update the Focus window
          Arguments:   None
          Returns:
*******************************************************************************/
int PrintChangedFocus()
  {
   void *theEnv = GetCurrentEnvironment();
   void *FocusPtr;
   int n;
   char *buffer;

   /* Clear the old contents */
   n = 0;
   XtSetArg(TheArgs[n],XtNstring,"");n++;
   XtSetValues(focus_text,TheArgs,n);
   XawAsciiSourceFreeString(XawTextGetSource(focus_text));

   /* Print the new focus list */

   FocusPtr = EnvGetNextFocus(theEnv,NULL);
   while(FocusPtr != NULL)
    {
      buffer = EnvGetDefmoduleName(theEnv,((struct focus*)FocusPtr)->theModule);
      EnvPrintRouter(theEnv,"xfocus",buffer);
      EnvPrintRouter(theEnv,"xfocus","\n");
      FocusPtr = EnvGetNextFocus(theEnv,FocusPtr);
    }
   return 0;
}
示例#2
0
文件: Status.c 项目: Viriana/SISE
static int CountFocus(
  void *theEnv)
  { 
   int count = 0;
   void *Ptr = NULL;
  
   while ((Ptr = EnvGetNextFocus(theEnv,Ptr)) != NULL)
     { count++; }
   return count;
  }