예제 #1
0
파일: xclips.c 프로젝트: RenRenJuan/DACLIPS
/*******************************************************************************
          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;
  }