Ignore:
Timestamp:
Mar 8, 2006, 11:33:01 AM (14 years ago)
Author:
Sam Hocevar
Message:
  • Finished moving everything driver-specific to the apropriate driver_*.c files. Phew. Now they just need a few comments.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • libcaca/trunk/caca/caca_internals.h

    r548 r550  
    2828typedef unsigned short uint16_t;
    2929typedef unsigned int uint32_t;
    30 #endif
    31 
    32 #if defined(USE_CONIO)
    33 #   include <conio.h>
    34 #endif
    35 #if defined(USE_GL)
    36 #   include <GL/glut.h>
    37 #endif
    38 #if defined(USE_NCURSES)
    39 #   if defined(HAVE_NCURSES_H)
    40 #       include <ncurses.h>
    41 #   else
    42 #       include <curses.h>
    43 #   endif
    44 #endif
    45 #if defined(USE_WIN32)
    46 #   include <windows.h>
    47 #endif
    48 #if defined(USE_X11)
    49 #   include <X11/Xlib.h>
    5030#endif
    5131
     
    10989    cucul_t *qq;
    11090
    111     struct driver
     91    struct drv
    11292    {
    11393        enum caca_driver driver;
     94        struct driver_private *p;
    11495
    11596        int (* init_graphics) (caca_t *);
     
    121102        void (* handle_resize) (caca_t *, unsigned int *, unsigned int *);
    122103        unsigned int (* get_event) (caca_t *);
    123     } driver;
     104    } drv;
    124105
    125106    //unsigned int width, height;
     
    146127#endif
    147128    } events;
    148 
    149     /* FIXME: maybe this should go away */
    150 #if defined(USE_X11) && !defined(_DOXYGEN_SKIP_ME)
    151     struct x11
    152     {
    153         Display *dpy;
    154         Window window;
    155         Pixmap pixmap;
    156         GC gc;
    157         long int event_mask;
    158         int font_width, font_height;
    159         unsigned int new_width, new_height;
    160         int colors[16];
    161         Font font;
    162         XFontStruct *font_struct;
    163         int font_offset;
    164 #if defined(HAVE_X11_XKBLIB_H)
    165         Bool autorepeat;
    166 #endif
    167     } x11;
    168 #endif
    169 #if defined(USE_NCURSES)
    170     struct ncurses
    171     {
    172         int attr[16*16];
    173         mmask_t oldmask;
    174     } ncurses;
    175 #endif
    176 #if defined(USE_CONIO)
    177     struct conio
    178     {
    179         struct text_info ti;
    180         char *screen;
    181     } conio;
    182 #endif
    183 #if defined(USE_WIN32)
    184     struct win32
    185     {
    186         HANDLE hin, hout;
    187         HANDLE front, back;
    188         CHAR_INFO *buffer;
    189         CONSOLE_CURSOR_INFO cci;
    190     } win32;
    191 #endif
    192 #if defined(USE_GL)
    193     struct gl
    194     {
    195         int window;
    196         unsigned int width, height;
    197         float font_width, font_height;
    198         float incx, incy;
    199         int id[94];
    200         unsigned char resized, bit;
    201         unsigned char mouse_changed, mouse_clicked;
    202         unsigned int mouse_x, mouse_y;
    203         unsigned int mouse_button, mouse_state;
    204 
    205         unsigned char key;
    206         int special_key;
    207         int new_width;
    208         int new_height;
    209 
    210         float sw, sh;
    211     } gl;
    212 #endif
    213129};
    214130
Note: See TracChangeset for help on using the changeset viewer.