Exemplo n.º 1
0
int main(int argc, char **argv)
{
    struct sigaction act;
    act.sa_handler = signal_handler;
    
    sigaction(SIGWINCH, &act, NULL);

    /* TODO: Check that console is UTF-8 */
    if (setlocale(LC_ALL, "") == NULL) {
        printf("Could not set locale, please check your LC_ALL, LC_CTYPE\n");
        return 1;
    }    

    initscr();
    cbreak();
    noecho();
    keypad(stdscr, TRUE);

    main_window_init();

    while(main_window_event()) {
        /* This is main loop, nothing really usefull here */
    }
    

    endwin();

    return 0;
}
Exemplo n.º 2
0
static gboolean on_button_press( GtkWidget* entry, GdkEventButton *evt,
                                                        gpointer user_data )
{
    if ( ( evt_win_click->s || evt_win_click->ob2_data ) && 
            main_window_event( NULL, evt_win_click, "evt_win_click", 0, 0, "pathbar", 0,
                                            evt->button, evt->state, TRUE ) )
        return TRUE;
    return FALSE;
}