src/video/win32/SDL_win32video.h
author Edgar Simo <bobbens@gmail.com>
Sun, 06 Jul 2008 17:06:37 +0000
branchgsoc2008_force_feedback
changeset 2498 ab567bd667bf
parent 2308 514f7c1651fc
child 2724 0e2b65f32298
permissions -rw-r--r--
Fixed various mistakes in the doxygen.
slouken@1895
     1
/*
slouken@1895
     2
    SDL - Simple DirectMedia Layer
slouken@1895
     3
    Copyright (C) 1997-2006 Sam Lantinga
slouken@1895
     4
slouken@1895
     5
    This library is free software; you can redistribute it and/or
slouken@1895
     6
    modify it under the terms of the GNU Lesser General Public
slouken@1895
     7
    License as published by the Free Software Foundation; either
slouken@1895
     8
    version 2.1 of the License, or (at your option) any later version.
slouken@1895
     9
slouken@1895
    10
    This library is distributed in the hope that it will be useful,
slouken@1895
    11
    but WITHOUT ANY WARRANTY; without even the implied warranty of
slouken@1895
    12
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
slouken@1895
    13
    Lesser General Public License for more details.
slouken@1895
    14
slouken@1895
    15
    You should have received a copy of the GNU Lesser General Public
slouken@1895
    16
    License along with this library; if not, write to the Free Software
slouken@1895
    17
    Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
slouken@1895
    18
slouken@1895
    19
    Sam Lantinga
slouken@1895
    20
    slouken@libsdl.org
slouken@1895
    21
*/
slouken@1895
    22
#include "SDL_config.h"
slouken@1895
    23
slouken@1895
    24
#ifndef _SDL_win32video_h
slouken@1895
    25
#define _SDL_win32video_h
slouken@1895
    26
slouken@1895
    27
#include "../SDL_sysvideo.h"
slouken@1895
    28
slouken@1895
    29
#define WIN32_LEAN_AND_MEAN
slouken@1895
    30
#define UNICODE
slouken@1895
    31
#define WINVER  0x500           /* Need 0x410 for AlphaBlend() and 0x500 for EnumDisplayDevices() */
slouken@1895
    32
#include <windows.h>
slouken@1895
    33
slouken@1895
    34
#if SDL_VIDEO_RENDER_D3D
slouken@1901
    35
//#include <d3d9.h>
slouken@1901
    36
#define D3D_DEBUG_INFO
slouken@1901
    37
#include "d3d9.h"
slouken@1895
    38
#endif
slouken@1895
    39
slouken@1895
    40
#include "SDL_win32events.h"
slouken@1895
    41
#include "SDL_win32gamma.h"
slouken@1895
    42
#include "SDL_win32keyboard.h"
slouken@1895
    43
#include "SDL_win32modes.h"
slouken@1895
    44
#include "SDL_win32mouse.h"
slouken@1913
    45
#include "SDL_win32opengl.h"
slouken@1895
    46
#include "SDL_win32window.h"
slouken@1895
    47
slouken@1895
    48
#ifdef UNICODE
slouken@1901
    49
#define WIN_StringToUTF8(S) SDL_iconv_string("UTF-8", "UCS-2", (char *)S, (SDL_wcslen(S)+1)*sizeof(WCHAR))
slouken@1895
    50
#define WIN_UTF8ToString(S) (WCHAR *)SDL_iconv_string("UCS-2", "UTF-8", (char *)S, SDL_strlen(S)+1)
slouken@1895
    51
#else
slouken@1901
    52
#define WIN_StringToUTF8(S) SDL_iconv_string("UTF-8", "ASCII", (char *)S, (SDL_strlen(S)+1))
slouken@1895
    53
#define WIN_UTF8ToString(S) SDL_iconv_string("ASCII", "UTF-8", (char *)S, SDL_strlen(S)+1)
slouken@1895
    54
#endif
slouken@1895
    55
slouken@1895
    56
/* Private display data */
slouken@1895
    57
slouken@1895
    58
typedef struct SDL_VideoData
slouken@1895
    59
{
slouken@1895
    60
#if SDL_VIDEO_RENDER_D3D
slouken@1895
    61
    HANDLE d3dDLL;
slouken@1895
    62
    IDirect3D9 *d3d;
slouken@1895
    63
#endif
slouken@1895
    64
    int mouse;
slouken@1895
    65
    int keyboard;
slouken@2308
    66
    SDL_scancode *key_layout;
slouken@1895
    67
} SDL_VideoData;
slouken@1895
    68
slouken@1895
    69
#endif /* _SDL_win32video_h */
slouken@1895
    70
slouken@1895
    71
/* vi: set ts=4 sw=4 expandtab: */