~ubuntu-branches/ubuntu/raring/libcaca/raring

« back to all changes in this revision

Viewing changes to caca/caca0.c

  • Committer: Bazaar Package Importer
  • Author(s): Sam Hocevar (Debian packages)
  • Date: 2007-11-25 19:08:40 UTC
  • mfrom: (1.1.6 upstream)
  • Revision ID: james.westby@ubuntu.com-20071125190840-3r4k9nkxsyo7m3ck
Tags: 0.99.beta13b-1
* New upstream release.

* debian/control:
  + Do not build-depend on the whole texlive suite, but on more fine-grained
    packages. Thanks to Norbert Preining for the hints (latex -recorder, then
    inspect the .fls file).
* Ship libcaca++, libcucul++ and their development files.

Show diffs side-by-side

added added

removed removed

Lines of Context:
3
3
 *  Copyright (c) 2002-2006 Sam Hocevar <sam@zoy.org>
4
4
 *                All Rights Reserved
5
5
 *
6
 
 *  $Id: caca0.c 1103 2006-12-12 01:53:54Z sam $
 
6
 *  $Id$
7
7
 *
8
8
 *  This library is free software. It comes without any warranty, to
9
9
 *  the extent permitted by applicable law. You can redistribute it
84
84
    if(!ret)
85
85
        return 0x00000000;
86
86
 
87
 
    switch(ev.type)
 
87
    switch(caca_get_event_type(&ev))
88
88
    {
89
89
        case CACA_EVENT_KEY_PRESS:
90
 
            return 0x01000000 | ev.data.key.ch;
 
90
            return 0x01000000 | caca_get_event_key_ch(&ev);
91
91
        case CACA_EVENT_KEY_RELEASE:
92
 
            return 0x02000000 | ev.data.key.ch;
 
92
            return 0x02000000 | caca_get_event_key_ch(&ev);
93
93
        case CACA_EVENT_MOUSE_PRESS:
94
 
            return 0x04000000 | ev.data.mouse.button;
 
94
            return 0x04000000 | caca_get_event_mouse_button(&ev);
95
95
        case CACA_EVENT_MOUSE_RELEASE:
96
 
            return 0x08000000 | ev.data.mouse.button;
 
96
            return 0x08000000 | caca_get_event_mouse_button(&ev);
97
97
        case CACA_EVENT_MOUSE_MOTION:
98
 
            return 0x10000000 | ((ev.data.mouse.x & 0xfff) << 12)
99
 
                              | (ev.data.mouse.y & 0xfff);
 
98
            return 0x10000000 | ((caca_get_event_mouse_x(&ev) & 0xfff) << 12)
 
99
                              | (caca_get_event_mouse_y(&ev) & 0xfff);
100
100
        case CACA_EVENT_RESIZE:
101
101
            return 0x20000000;
102
102
        default:
187
187
        case 0x31: case 0x32: case 0x33: case 0x34: case 0x35:
188
188
            dithering = feature;
189
189
            for(i = 0; i < nbitmaps; i++)
190
 
                cucul_set_dither_mode(bitmaps[i], features[feature]);
 
190
                cucul_set_dither_algorithm(bitmaps[i], features[feature]);
191
191
            break;
192
192
    }
193
193
}
239
239
 
240
240
    cucul_set_dither_color(d, features[background]);
241
241
    cucul_set_dither_antialias(d, features[antialiasing]);
242
 
    cucul_set_dither_mode(d, features[dithering]);
 
242
    cucul_set_dither_algorithm(d, features[dithering]);
243
243
 
244
244
    /* Store bitmap in our list */
245
245
    nbitmaps++;