src/video/cocoa/SDL_cocoamouse.m
author Sam Lantinga <slouken@libsdl.org>
Sun, 23 Jul 2006 09:11:10 +0000
changeset 1931 103c6fec2a60
child 2710 44e49d3fa6cf
permissions -rw-r--r--
The Mac OS X Cocoa video driver is under construction...
Note that SDLmain is no longer necessary on Mac OS X. :)
slouken@1931
     1
/*
slouken@1931
     2
    SDL - Simple DirectMedia Layer
slouken@1931
     3
    Copyright (C) 1997-2006 Sam Lantinga
slouken@1931
     4
slouken@1931
     5
    This library is free software; you can redistribute it and/or
slouken@1931
     6
    modify it under the terms of the GNU Lesser General Public
slouken@1931
     7
    License as published by the Free Software Foundation; either
slouken@1931
     8
    version 2.1 of the License, or (at your option) any later version.
slouken@1931
     9
slouken@1931
    10
    This library is distributed in the hope that it will be useful,
slouken@1931
    11
    but WITHOUT ANY WARRANTY; without even the implied warranty of
slouken@1931
    12
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
slouken@1931
    13
    Lesser General Public License for more details.
slouken@1931
    14
slouken@1931
    15
    You should have received a copy of the GNU Lesser General Public
slouken@1931
    16
    License along with this library; if not, write to the Free Software
slouken@1931
    17
    Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
slouken@1931
    18
slouken@1931
    19
    Sam Lantinga
slouken@1931
    20
    slouken@libsdl.org
slouken@1931
    21
*/
slouken@1931
    22
#include "SDL_config.h"
slouken@1931
    23
slouken@1931
    24
#include "SDL_cocoavideo.h"
slouken@1931
    25
slouken@1931
    26
#include "../../events/SDL_mouse_c.h"
slouken@1931
    27
slouken@1931
    28
void
slouken@1931
    29
Cocoa_InitMouse(_THIS)
slouken@1931
    30
{
slouken@1931
    31
    SDL_VideoData *data = (SDL_VideoData *) _this->driverdata;
slouken@1931
    32
    SDL_Mouse mouse;
slouken@1931
    33
slouken@1931
    34
    SDL_zero(mouse);
slouken@1931
    35
    data->mouse = SDL_AddMouse(&mouse, -1);
slouken@1931
    36
}
slouken@1931
    37
slouken@1931
    38
void
slouken@1931
    39
Cocoa_QuitMouse(_THIS)
slouken@1931
    40
{
slouken@1931
    41
    SDL_VideoData *data = (SDL_VideoData *) _this->driverdata;
slouken@1931
    42
slouken@1931
    43
    SDL_DelMouse(data->mouse);
slouken@1931
    44
}
slouken@1931
    45
slouken@1931
    46
/* vi: set ts=4 sw=4 expandtab: */