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