예제 #1
0
파일: console.c 프로젝트: martinpiper/VICE
console_t *console_open(const char *id)
{
    console_t *console;

    enable_text();
    clrscr();
    _set_screen_lines(43);
    _setcursortype(_SOLIDCURSOR);

    old_input_mode = setmode(STDIN_FILENO, O_TEXT);
    old_output_mode = setmode(STDOUT_FILENO, O_TEXT);

    mon_output = fopen("CON", "wt");
    mon_input = fopen("CON", "rt");
    setbuf(mon_output, NULL); /* No buffering.  */

    console = lib_malloc(sizeof(console_t));

    console->console_xres = 80;
    console->console_yres = 25;
    console->console_can_stay_open = 0;
    console->console_cannot_output = 0;

    return console;
}
예제 #2
0
파일: iodjgpp.c 프로젝트: OrangeTide/fed
void term_reinit(int wait)             /* fixup after running other progs */
{
   struct text_info dat;

   gppconio_init();
   gettextinfo(&dat);

   if (dat.screenheight != screen_h) {
      _set_screen_lines(screen_h);
      gettextinfo(&dat);
      screen_h = dat.screenheight;
      screen_w = dat.screenwidth;
      mouse_init();
   }

   set_bright_backgrounds();

   if (wait) {
      clear_keybuf();
      gch();
   }

   __djgpp_set_ctrl_c(0);
   setcbrk(0);
}
예제 #3
0
파일: iodjgpp.c 프로젝트: OrangeTide/fed
void term_init(int screenheight)
{
   struct text_info dat;

   if (saved_lines <= 0) {
      gettextinfo(&dat);
      screen_h = saved_lines = dat.screenheight;
      screen_w = dat.screenwidth;
      norm_attrib = dat.normattr;
   }

   if (screen_h != screenheight) {
      _set_screen_lines(screenheight);
      gettextinfo(&dat);
      screen_h = dat.screenheight;
      screen_w = dat.screenwidth;
   }

   set_bright_backgrounds();

   n_vid();
   textattr(attrib);
   cls();

   mouse_init();

   errno = 0;
}
예제 #4
0
void tui_init(void)
{
    set_gfx_mode(GFX_TEXT, 80, 25, 0, 0);

    /* FIXME: this should be made more flexible, to handle other screen modes
       automatically. */
    _set_screen_lines(25);

    gettextinfo(&text_mode_info);
    /* _setcursortype(_NOCURSOR); */
}
예제 #5
0
파일: iodjgpp.c 프로젝트: OrangeTide/fed
void term_exit()                     /* close down the screen */
{
   textattr(norm_attrib);

   if (saved_lines != screen_h) {
      _set_screen_lines(saved_lines);
      cls();
   }
   else {
      goto2(0,screen_h-1);
      putch('\n');
   }

   _setcursortype(_NORMALCURSOR);
   show_c();
}
예제 #6
0
/*------------------------------------------------------------------------*/
int main()
{
  int ok;

  read_config();
  _set_screen_lines(25);
  _setcursortype(_NOCURSOR);

  Screen("Joystick configuration utility for Atari 800 emulator",BACKGROUND+TITLE);
  ok=mainmenu();

  window(1,1,80,25);
  textattr(0xf);
  clrscr();
  _setcursortype(_NORMALCURSOR);

  if (ok) save_config();

  return 0;
}