Logo Search packages:      
Sourcecode: libcaca version File versions  Download package

void caca_end ( void   ) 

Uninitialise libcaca.

This function frees all resources allocated by caca_init(). After caca_end() has been called, no other libcaca functions may be used unless a new call to caca_init() is done.

Definition at line 370 of file caca.c.

{
    _caca_end_bitmap();
    _caca_end_graphics();

#if defined(USE_SLANG)
    if(_caca_driver == CACA_DRIVER_SLANG)
    {
        SLtt_set_mouse_mode(0, 0);
        SLtt_set_cursor_visibility(1);
        SLang_reset_tty();
        SLsmg_reset_smg();
    }
    else
#endif
#if defined(USE_NCURSES)
    if(_caca_driver == CACA_DRIVER_NCURSES)
    {
        mousemask(oldmask, NULL);
        curs_set(1);
        noraw();
        endwin();
    }
    else
#endif
#if defined(USE_CONIO)
    if(_caca_driver == CACA_DRIVER_CONIO)
    {
        _wscroll = 1;
        textcolor((enum COLORS)WHITE);
        textbackground((enum COLORS)BLACK);
        gotoxy(_caca_width, _caca_height);
        cputs("\r\n");
        _setcursortype(_NORMALCURSOR);
    }
    else
#endif
#if defined(USE_X11)
    if(_caca_driver == CACA_DRIVER_X11)
    {
        /* Nothing to do */
    }
    else
#endif
#if defined(USE_WIN32)
    if(_caca_driver == CACA_DRIVER_WIN32)
    {
        SetConsoleTextAttribute(win32_hout, FOREGROUND_INTENSITY
                                             | FOREGROUND_RED
                                             | FOREGROUND_GREEN
                                             | FOREGROUND_BLUE);
        cci.bVisible = TRUE;
        SetConsoleCursorInfo(win32_hout, &cci);
        CloseHandle(win32_hout);
    }
    else
#endif
    {
        /* Dummy */
    }
}


Generated by  Doxygen 1.6.0   Back to index