2003-07-31 23:52:10 +00:00
|
|
|
/*
|
|
|
|
GSGuiPrivate.h
|
|
|
|
|
|
|
|
Define private functions for use in the GNUstep GUI Library
|
|
|
|
|
|
|
|
Copyright (C) 2001 Free Software Foundation, Inc.
|
|
|
|
|
|
|
|
Author: Nicola Pero <nicola@brainstorm.co.uk>
|
|
|
|
Date: 2001
|
|
|
|
|
|
|
|
This file is part of the GNUstep GUI Library.
|
|
|
|
|
|
|
|
This library is free software; you can redistribute it and/or
|
2007-10-29 21:16:17 +00:00
|
|
|
modify it under the terms of the GNU Lesser General Public
|
2003-07-31 23:52:10 +00:00
|
|
|
License as published by the Free Software Foundation; either
|
2008-06-10 04:01:49 +00:00
|
|
|
version 2 of the License, or (at your option) any later version.
|
2007-10-29 21:16:17 +00:00
|
|
|
|
2003-07-31 23:52:10 +00:00
|
|
|
This library is distributed in the hope that it will be useful,
|
|
|
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
2007-10-29 21:16:17 +00:00
|
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
|
|
Lesser General Public License for more details.
|
2003-07-31 23:52:10 +00:00
|
|
|
|
2007-10-29 21:16:17 +00:00
|
|
|
You should have received a copy of the GNU Lesser General Public
|
2003-07-31 23:52:10 +00:00
|
|
|
License along with this library; see the file COPYING.LIB.
|
2007-10-29 21:16:17 +00:00
|
|
|
If not, see <http://www.gnu.org/licenses/> or write to the
|
|
|
|
Free Software Foundation, 51 Franklin Street, Fifth Floor,
|
|
|
|
Boston, MA 02110-1301, USA.
|
2003-07-31 23:52:10 +00:00
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef _GNUstep_H_GSGuiPrivate
|
|
|
|
#define _GNUstep_H_GSGuiPrivate
|
|
|
|
|
2011-03-04 11:33:22 +00:00
|
|
|
#import <Foundation/NSBundle.h>
|
2010-02-20 10:40:44 +00:00
|
|
|
#include "GNUstepBase/preface.h"
|
2003-07-31 23:52:10 +00:00
|
|
|
|
|
|
|
/*
|
|
|
|
* Return the gnustep-gui bundle used to load gnustep-gui resources.
|
|
|
|
* Should be only used inside the gnustep-gui library. Implemented
|
|
|
|
* in Source/NSApplication.m
|
|
|
|
*/
|
2003-11-26 14:01:54 +00:00
|
|
|
NSBundle *GSGuiBundle (void);
|
2003-07-31 23:52:10 +00:00
|
|
|
|
|
|
|
/*
|
|
|
|
* Localize a message of the gnustep-gui library.
|
|
|
|
*/
|
|
|
|
static inline NSString *GSGuiLocalizedString (NSString *key, NSString *comment)
|
|
|
|
{
|
|
|
|
NSBundle *b = GSGuiBundle ();
|
|
|
|
|
|
|
|
if (b != nil)
|
|
|
|
{
|
|
|
|
return [b localizedStringForKey: key value: @"" table: nil];
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
return key;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Redefine _() to be our own GSGuiLocalizedString(). This is so that
|
|
|
|
* make_strings will recognize it, and for easy typing.
|
|
|
|
*/
|
|
|
|
#ifdef _
|
|
|
|
# undef _
|
|
|
|
#endif
|
|
|
|
#define _(X) GSGuiLocalizedString (X, @"")
|
|
|
|
|
|
|
|
#ifdef NSLocalizedString
|
|
|
|
# undef NSLocalizedString
|
|
|
|
#endif
|
|
|
|
#define NSLocalizedString(key,comment) GSGuiLocalizedString (key, comment)
|
|
|
|
|
|
|
|
#endif /* _GNUstep_H_GSGuiPrivate */
|
|
|
|
|