19682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall/* 29682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall SDL - Simple DirectMedia Layer 39682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall Copyright (C) 1997-2012 Sam Lantinga 49682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall Copyright (C) 2001 Hsieh-Fu Tsai 59682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall 69682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall This library is free software; you can redistribute it and/or 79682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall modify it under the terms of the GNU Library General Public 89682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall License as published by the Free Software Foundation; either 99682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall version 2 of the License, or (at your option) any later version. 109682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall 119682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall This library is distributed in the hope that it will be useful, 129682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall but WITHOUT ANY WARRANTY; without even the implied warranty of 139682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 149682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall Library General Public License for more details. 159682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall 169682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall You should have received a copy of the GNU Library General Public 179682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall License along with this library; if not, write to the Free 189682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 199682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall 209682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall Sam Lantinga 219682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall slouken@libsdl.org 229682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall 239682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall Hsieh-Fu Tsai 249682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall clare@setabox.com 259682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall*/ 269682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall#include "SDL_config.h" 279682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall 289682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall#include "SDL_syswm.h" 299682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall#include "../../events/SDL_events_c.h" 309682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall 319682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall#include "SDL_nxwm_c.h" 329682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall 339682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallvoid NX_SetCaption (_THIS, const char * title, const char * icon) 349682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall{ 359682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall Dprintf ("enter NX_SetCaption\n") ; 369682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall 379682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall // Lock the event thread, in multi-threading environments 389682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall SDL_Lock_EventThread () ; 399682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall 409682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall if (SDL_Window) 419682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall GrSetWindowTitle (SDL_Window, title) ; 429682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall 439682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall SDL_Unlock_EventThread () ; 449682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall Dprintf ("leave NX_SetCaption\n") ; 459682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall} 469682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall 479682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallint NX_GetWMInfo (_THIS, SDL_SysWMinfo * info) 489682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall{ 499682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall Dprintf ("enter NX_GetWMInfo\n") ; 509682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall 519682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall if (info -> version.major <= SDL_MAJOR_VERSION) { 529682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall info -> window = SDL_Window ; 539682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall return 1 ; 549682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall } else { 559682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall SDL_SetError("Application not compiled with SDL %d.%d\n", 569682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall SDL_MAJOR_VERSION, SDL_MINOR_VERSION) ; 579682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall return -1 ; 589682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall } 599682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall 609682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall Dprintf ("leave NX_GetWMInfo\n") ; 619682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall} 62