예제 #1
0
파일: status.c 프로젝트: hinderer/brltty
static void
renderCoordinatesAlphabetic (unsigned char *cell, int column, int row) {
  /* the coordinates are presented as an underlined letter as the Alva DOS TSR */
  if (!SCR_COORDINATES_OK(column, row)) {
    *cell = convertCharacterToDots(textTable, WC_C('z'));
  } else {
    const int32_t height = 25;
    const int32_t frequency = row / height;

    if (frequency) {
      const int32_t interval = NSECS_PER_SEC / (frequency * 2);
      TimeValue time;

      getMonotonicTime(&time);
      scheduleUpdateIn("alva status field",
                       (((interval - (time.nanoseconds % interval)) / NSECS_PER_MSEC) + 1));

      if (!((time.nanoseconds / interval) % 2)) {
        *cell = 0;
        return;
      }
    }

    *cell = convertCharacterToDots(textTable, ((row % height) + WC_C('a')))
          | ((column / textCount) << 6);
  }
}
예제 #2
0
파일: status.c 프로젝트: hinderer/brltty
static void
renderStatusField_time (unsigned char *cells) {
  TimeValue value;
  TimeComponents components;

  getCurrentTime(&value);
  scheduleUpdateIn("time status field", millisecondsTillNextMinute(&value));

  expandTimeValue(&value, &components);
  renderNumberUpper(cells, components.hour);
  renderNumberLower(cells, components.minute);
}
예제 #3
0
파일: scr_main.c 프로젝트: brltty/brltty
void
mainScreenUpdated (void) {
  if (isMainScreen()) {
    scheduleUpdateIn("main screen updated", SCREEN_UPDATE_SCHEDULE_DELAY);
  }
}