예제 #1
0
파일: brltty.c 프로젝트: MarkMielke/brltty
static void
setSessionEntry (void) {
  describeScreen(&scr);
  if (scr.number == -1) scr.number = userVirtualTerminal(0);

  {
    typedef enum {SAME, DIFFERENT, FIRST} State;
    State state = (!ses)? FIRST:
                  (scr.number == ses->number)? SAME:
                  DIFFERENT;

    if (state != SAME) {
      ses = getSessionEntry(scr.number);

      if (state == FIRST) {
        pushCommandEnvironment("main", preprocessCommand, postprocessCommand);
        pushCommandHandler("unhandled", KTB_CTX_DEFAULT, handleUnhandledCommand, NULL);

#ifdef ENABLE_SPEECH_SUPPORT
        pushCommandHandler("speech", KTB_CTX_DEFAULT, handleSpeechCommand, NULL);
#endif /*  ENABLE_SPEECH_SUPPORT */

        pushCommandHandler("navigation", KTB_CTX_DEFAULT, handleNavigationCommand, NULL);
        pushCommandHandler("screen", KTB_CTX_DEFAULT, handleScreenCommand, NULL);
      }
    }
  }
}
예제 #2
0
파일: scr_help.c 프로젝트: BaJIeK/brltty
static int
currentVirtualTerminal_HelpScreen (void) {
  return userVirtualTerminal(1);
}