예제 #1
0
파일: windows.c 프로젝트: dbruenig/toxic
ToxWindow *init_windows(Tox *m)
{
    int n_prompt = add_window(m, new_prompt());

    if (n_prompt == -1 || add_window(m, new_friendlist()) == -1)
        exit_toxic_err("failed in init_windows", FATALERR_WININIT);

    prompt = &windows[n_prompt];
    active_window = prompt;

    return prompt;
}
예제 #2
0
static void init_windows()
{
  w_num = 0;
  int n_prompt = 0;
  int n_friendslist = 1;
  if (add_window(new_prompt(), n_prompt) == -1 
                        || add_window(new_friendlist(), n_friendslist) == -1) {
    fprintf(stderr, "add_window() failed.\n");
    endwin();
    exit(1);
  }
  prompt = &windows[n_prompt];
}
예제 #3
0
static void init_windows() {
  w_num = 0;
  w_active = 0;

  if(add_window(new_prompt()) == -1 || add_window(new_friendlist()) == -1) {
    fprintf(stderr, "add_window() failed.\n");

    endwin();
    exit(1);
  }

  prompt = &windows[0];
}
예제 #4
0
ToxWindow * init_windows()
{
    w_num = 0;
    int n_prompt = 0;
    int n_friendslist = 1;
    if (add_window(m, new_prompt(on_friendadded), n_prompt) == -1
            || add_window(m, new_friendlist(WINDOW_STATUS), n_friendslist) == -1) {
        fprintf(stderr, "add_window() failed.\n");
        endwin();
        exit(1);
    }
    prompt = &windows[n_prompt];
    return prompt;
}
예제 #5
0
파일: windows.c 프로젝트: Jman012/toxic
ToxWindow *init_windows(Tox *m)
{
    int n_prompt = add_window(m, new_prompt());

    if (n_prompt == -1 || add_window(m, new_friendlist()) == -1) {
        endwin();
        fprintf(stderr, "add_window() failed. Aborting...\n");
        exit(EXIT_FAILURE);
    }

    prompt = &windows[n_prompt];
    active_window = prompt;

    return prompt;
}