src/video/bwindow/SDL_syswm.cc
author Sam Lantinga <slouken@libsdl.org>
Mon, 29 May 2006 04:04:35 +0000
branchSDL-1.3
changeset 1668 4da1ee79c9af
parent 1662 782fd950bd46
permissions -rw-r--r--
more tweaking indent options
slouken@0
     1
/*
slouken@0
     2
    SDL - Simple DirectMedia Layer
slouken@1312
     3
    Copyright (C) 1997-2006 Sam Lantinga
slouken@0
     4
slouken@0
     5
    This library is free software; you can redistribute it and/or
slouken@1312
     6
    modify it under the terms of the GNU Lesser General Public
slouken@0
     7
    License as published by the Free Software Foundation; either
slouken@1312
     8
    version 2.1 of the License, or (at your option) any later version.
slouken@0
     9
slouken@0
    10
    This library is distributed in the hope that it will be useful,
slouken@0
    11
    but WITHOUT ANY WARRANTY; without even the implied warranty of
slouken@0
    12
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
slouken@1312
    13
    Lesser General Public License for more details.
slouken@0
    14
slouken@1312
    15
    You should have received a copy of the GNU Lesser General Public
slouken@1312
    16
    License along with this library; if not, write to the Free Software
slouken@1312
    17
    Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
slouken@0
    18
slouken@0
    19
    Sam Lantinga
slouken@252
    20
    slouken@libsdl.org
slouken@0
    21
*/
slouken@1403
    22
#include "SDL_config.h"
slouken@0
    23
slouken@0
    24
#include "SDL_BWin.h"
slouken@0
    25
slouken@1662
    26
extern "C"
slouken@1662
    27
{
slouken@0
    28
slouken@0
    29
#include "SDL_syswm_c.h"
slouken@906
    30
#include "SDL_error.h"
slouken@0
    31
slouken@1668
    32
    void BE_SetWMCaption(_THIS, const char *title, const char *icon)
slouken@1662
    33
    {
slouken@1668
    34
        SDL_Win->SetTitle(title);
slouken@1662
    35
    }
slouken@0
    36
slouken@1668
    37
    int BE_IconifyWindow(_THIS)
slouken@1662
    38
    {
slouken@1668
    39
        SDL_Win->Minimize(true);
slouken@1662
    40
    }
slouken@906
    41
slouken@1668
    42
    int BE_GetWMInfo(_THIS, SDL_SysWMinfo * info)
slouken@906
    43
    {
slouken@1662
    44
        if (info->version.major <= SDL_MAJOR_VERSION) {
slouken@1662
    45
            return 1;
slouken@1662
    46
        } else {
slouken@1668
    47
            SDL_SetError("Application not compiled with SDL %d.%d\n",
slouken@1668
    48
                         SDL_MAJOR_VERSION, SDL_MINOR_VERSION);
slouken@1662
    49
            return -1;
slouken@1662
    50
        }
slouken@906
    51
    }
slouken@906
    52
slouken@1662
    53
};                              /* Extern C */
slouken@1662
    54
slouken@1662
    55
/* vi: set ts=4 sw=4 expandtab: */