src/video/win32/SDL_win32video.h
author Sam Lantinga <slouken@libsdl.org>
Thu, 06 Jul 2006 07:17:11 +0000
branchSDL-1.3
changeset 1724 6c63fc2bd986
parent 1722 5daa04d862f1
child 1725 98a3207ddde8
permissions -rw-r--r--
Proof of concept done - Win32 GDI implementation mostly complete.
slouken@1712
     1
/*
slouken@1712
     2
    SDL - Simple DirectMedia Layer
slouken@1712
     3
    Copyright (C) 1997-2006 Sam Lantinga
slouken@1712
     4
slouken@1712
     5
    This library is free software; you can redistribute it and/or
slouken@1712
     6
    modify it under the terms of the GNU Lesser General Public
slouken@1712
     7
    License as published by the Free Software Foundation; either
slouken@1712
     8
    version 2.1 of the License, or (at your option) any later version.
slouken@1712
     9
slouken@1712
    10
    This library is distributed in the hope that it will be useful,
slouken@1712
    11
    but WITHOUT ANY WARRANTY; without even the implied warranty of
slouken@1712
    12
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
slouken@1712
    13
    Lesser General Public License for more details.
slouken@1712
    14
slouken@1712
    15
    You should have received a copy of the GNU Lesser General Public
slouken@1712
    16
    License along with this library; if not, write to the Free Software
slouken@1712
    17
    Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
slouken@1712
    18
slouken@1712
    19
    Sam Lantinga
slouken@1712
    20
    slouken@libsdl.org
slouken@1712
    21
*/
slouken@1712
    22
#include "SDL_config.h"
slouken@1712
    23
slouken@1712
    24
#ifndef _SDL_win32video_h
slouken@1712
    25
#define _SDL_win32video_h
slouken@1712
    26
slouken@1712
    27
#include "../SDL_sysvideo.h"
slouken@1712
    28
slouken@1712
    29
#define WIN32_LEAN_AND_MEAN
slouken@1718
    30
#define UNICODE
slouken@1724
    31
#define WINVER  0x0410          // 0x0410 needed for AlphaBlend()
slouken@1712
    32
#include <windows.h>
slouken@1712
    33
slouken@1712
    34
#include "SDL_win32events.h"
slouken@1720
    35
#include "SDL_win32keyboard.h"
slouken@1720
    36
#include "SDL_win32mouse.h"
slouken@1712
    37
#include "SDL_win32window.h"
slouken@1712
    38
slouken@1719
    39
#ifdef UNICODE
slouken@1719
    40
#define WIN_StringToUTF8(S) SDL_iconv_string("UTF-8", "UCS-2", (char *)S, (wcslen(S)+1)*sizeof(WCHAR))
slouken@1719
    41
#define WIN_UTF8ToString(S) (WCHAR *)SDL_iconv_string("UCS-2", "UTF-8", (char *)S, SDL_strlen(S)+1)
slouken@1719
    42
#else
slouken@1719
    43
#define WIN_StringToUTF8(S) SDL_iconv_string("UTF-8", "ASCII", (char *)S, (strlen(S)+1))
slouken@1719
    44
#define WIN_UTF8ToString(S) SDL_iconv_string("ASCII", "UTF-8", (char *)S, SDL_strlen(S)+1)
slouken@1719
    45
#endif
slouken@1719
    46
slouken@1712
    47
/* Private display data */
slouken@1712
    48
slouken@1722
    49
typedef struct SDL_VideoData
slouken@1712
    50
{
slouken@1720
    51
    int mouse;
slouken@1720
    52
    int keyboard;
slouken@1720
    53
} SDL_VideoData;
slouken@1712
    54
slouken@1712
    55
#endif /* _SDL_win32video_h */
slouken@1712
    56
slouken@1712
    57
/* vi: set ts=4 sw=4 expandtab: */