src/video/cocoa/SDL_cocoamouse.m
author Sam Lantinga
Sat, 19 Sep 2009 13:29:40 +0000
changeset 3280 00cace2d9080
parent 2940 b93965a16fe0
child 3517 e7eec78e4b92
permissions -rw-r--r--
Merged a cleaned up version of Jiang's code changes from Google Summer of Code 2009
slouken@1931
     1
/*
slouken@1931
     2
    SDL - Simple DirectMedia Layer
slouken@2859
     3
    Copyright (C) 1997-2009 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@2940
    35
    data->mouse = SDL_AddMouse(&mouse, "Mouse", 0, 0, 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: */