Ignore:
Timestamp:
Nov 14, 2006, 7:02:29 PM (13 years ago)
Author:
Sam Hocevar
Message:
  • Added all the glue needed for a Cocoa output driver.
Location:
libcaca/trunk/caca
Files:
1 added
3 edited

Legend:

Unmodified
Added
Removed
  • libcaca/trunk/caca/Makefile.am

    r1208 r1396  
    2828        driver_vga.c \
    2929        driver_win32.c \
    30         $(extra_drivers) \
     30        $(cocoa_source) \
     31        $(extra_source) \
    3132        $(NULL)
    3233libcaca_la_LDFLAGS = -no-undefined -version-info @LT_VERSION@
     
    4546libgl_plugin_la_LIBADD = libcaca.la ../cucul/libcucul.la @GL_LIBS@
    4647else
    47 extra_drivers = driver_x11.c driver_gl.c
     48extra_source = driver_x11.c driver_gl.c
    4849endif
    4950
     51if USE_COCOA
     52cocoa_source = driver_cocoa.m
     53endif
     54
  • libcaca/trunk/caca/caca.c

    r1362 r1396  
    163163#if defined(HAVE_GETENV) && defined(HAVE_STRCASECMP)
    164164    char *var = getenv("CACA_DRIVER");
    165    
     165
    166166    /* If the environment variable was set, use it */
    167167    if(var && *var)
    168168    {
     169#if defined(USE_COCOA)
     170        if(!strcasecmp(var, "cocoa")) return cocoa_install(dp);
     171#endif
    169172#if defined(USE_WIN32)
    170173        if(!strcasecmp(var, "win32")) return win32_install(dp);
     
    195198#endif
    196199
     200#if defined(USE_COCOA)
     201    if(cocoa_install(dp) == 0) return 0;
     202#endif
    197203#if defined(USE_WIN32)
    198204    if(win32_install(dp) == 0) return 0;
  • libcaca/trunk/caca/caca_internals.h

    r1392 r1396  
    3030    CACA_DRIVER_NONE = 0,
    3131    CACA_DRIVER_RAW = 1,
     32#if defined(USE_COCOA)
     33    CACA_DRIVER_COCOA = 2,
     34#endif
    3235#if defined(USE_CONIO)
    33     CACA_DRIVER_CONIO = 2,
     36    CACA_DRIVER_CONIO = 3,
    3437#endif
    3538#if defined(USE_GL)
    36     CACA_DRIVER_GL = 3,
     39    CACA_DRIVER_GL = 4,
    3740#endif
    3841#if defined(USE_NCURSES)
    39     CACA_DRIVER_NCURSES = 4,
     42    CACA_DRIVER_NCURSES = 5,
    4043#endif
    4144#if defined(USE_SLANG)
    42     CACA_DRIVER_SLANG = 5,
     45    CACA_DRIVER_SLANG = 6,
    4346#endif
    4447#if defined(USE_VGA)
    45     CACA_DRIVER_VGA = 6,
     48    CACA_DRIVER_VGA = 7,
    4649#endif
    4750#if defined(USE_WIN32)
    48     CACA_DRIVER_WIN32 = 7,
     51    CACA_DRIVER_WIN32 = 8,
    4952#endif
    5053#if defined(USE_X11)
    51     CACA_DRIVER_X11 = 8,
     54    CACA_DRIVER_X11 = 9,
    5255#endif
    5356};
    5457
    5558/* Available external drivers */
     59#if defined(USE_COCOA)
     60int cocoa_install(caca_display_t *);
     61#endif
    5662#if defined(USE_CONIO)
    5763int conio_install(caca_display_t *);
Note: See TracChangeset for help on using the changeset viewer.