src/video/nanox/SDL_nxwm.c
author Ryan C. Gordon <icculus@icculus.org>
Fri, 06 Jan 2006 13:20:10 +0000
changeset 1234 73676c1f56ee
parent 769 b8d311d90021
child 1338 604d73db6802
permissions -rw-r--r--
For sanity's sake, removed the '&' when passing copy_row array to asm.
slouken@30
     1
/*
slouken@30
     2
    SDL - Simple DirectMedia Layer
slouken@769
     3
    Copyright (C) 1997-2004 Sam Lantinga
slouken@30
     4
    Copyright (C) 2001  Hsieh-Fu Tsai
slouken@30
     5
slouken@30
     6
    This library is free software; you can redistribute it and/or
slouken@30
     7
    modify it under the terms of the GNU Library General Public
slouken@30
     8
    License as published by the Free Software Foundation; either
slouken@30
     9
    version 2 of the License, or (at your option) any later version.
slouken@30
    10
slouken@30
    11
    This library is distributed in the hope that it will be useful,
slouken@30
    12
    but WITHOUT ANY WARRANTY; without even the implied warranty of
slouken@30
    13
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
slouken@30
    14
    Library General Public License for more details.
slouken@30
    15
slouken@30
    16
    You should have received a copy of the GNU Library General Public
slouken@30
    17
    License along with this library; if not, write to the Free
slouken@30
    18
    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
slouken@30
    19
slouken@30
    20
    Sam Lantinga
slouken@252
    21
    slouken@libsdl.org
slouken@30
    22
    
slouken@30
    23
    Hsieh-Fu Tsai
slouken@30
    24
    clare@setabox.com
slouken@30
    25
*/
slouken@30
    26
slouken@30
    27
#include <stdlib.h>
slouken@30
    28
slouken@30
    29
#include "SDL_syswm.h"
slouken@30
    30
#include "SDL_error.h"
slouken@30
    31
#include "SDL_events_c.h"
slouken@30
    32
slouken@30
    33
#include "SDL_nxwm_c.h"
slouken@30
    34
slouken@30
    35
void NX_SetCaption (_THIS, const char * title, const char * icon)
slouken@30
    36
{
slouken@30
    37
    Dprintf ("enter NX_SetCaption\n") ;
slouken@30
    38
slouken@30
    39
    // Lock the event thread, in multi-threading environments
slouken@30
    40
    SDL_Lock_EventThread () ;
slouken@30
    41
    
slouken@30
    42
    if (SDL_Window) 
slouken@30
    43
        GrSetWindowTitle (SDL_Window, title) ;
slouken@30
    44
    
slouken@30
    45
    SDL_Unlock_EventThread () ;
slouken@30
    46
    Dprintf ("leave NX_SetCaption\n") ;
slouken@30
    47
}
slouken@30
    48
slouken@30
    49
int NX_GetWMInfo (_THIS, SDL_SysWMinfo * info)
slouken@30
    50
{
slouken@30
    51
    Dprintf ("enter NX_GetWMInfo\n") ;
slouken@30
    52
slouken@30
    53
    if (info -> version.major <= SDL_MAJOR_VERSION) {
slouken@30
    54
        info -> window = SDL_Window ;
slouken@30
    55
        return 1 ;
slouken@30
    56
    } else {
slouken@30
    57
        SDL_SetError("Application not compiled with SDL %d.%d\n",
slouken@30
    58
            SDL_MAJOR_VERSION, SDL_MINOR_VERSION) ;
slouken@30
    59
        return -1 ;
slouken@30
    60
    }
slouken@30
    61
slouken@30
    62
    Dprintf ("leave NX_GetWMInfo\n") ;
slouken@30
    63
}