edelib  2.0.0
edelib/Ede.h
00001 /*
00002  * $Id: String.h 2594 2009-03-25 14:54:54Z karijes $
00003  *
00004  * EDE specific code
00005  * Copyright (c) 2010-2012 edelib authors
00006  *
00007  * This library is free software; you can redistribute it and/or
00008  * modify it under the terms of the GNU Lesser General Public
00009  * License as published by the Free Software Foundation; either
00010  * version 2 of the License, or (at your option) any later version.
00011  *
00012  * This library is distributed in the hope that it will be useful,
00013  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00014  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
00015  * Lesser General Public License for more details.
00016  *
00017  * You should have received a copy of the GNU Lesser General Public License
00018  * along with this library. If not, see <http://www.gnu.org/licenses/>.
00019  */
00020 
00021 #ifndef __EDELIB_EDE_H__
00022 #define __EDELIB_EDE_H__
00023 
00024 #include "edelib-global.h"
00025 #include "Nls.h"
00026 
00027 EDELIB_NS_BEGIN
00028 
00039 class ApplicationBootstrap {
00040 private:
00041         int flags;
00042 public:
00044         ApplicationBootstrap(const char *name, const char *nls_path);
00046         ~ApplicationBootstrap();
00047 };
00048 
00049 EDELIB_NS_END
00050 
00057 #define EDE_APPLICATION_WITH_NLS_PATH(name, path)   \
00058         extern int FL_NORMAL_SIZE;                      \
00059         FL_NORMAL_SIZE = 12;                            \
00060         EDELIB_NS_PREPEND(ApplicationBootstrap) __ede_application_bootstrap(name, path)
00061 
00068 #define EDE_CONSOLE_APPLICATION_WITH_NLS_PATH(name, path) \
00069         EDELIB_NS_PREPEND(nls_support_init(name, path)
00070 
00086 #ifdef PREFIX
00087 # define EDE_APPLICATION(name)         EDE_APPLICATION_WITH_NLS_PATH(name, PREFIX"/share/locale")
00088 # define EDE_CONSOLE_APPLICATION(name) EDE_CONSOLE_APPLICATION_WITH_NLS_PATH(name, PREFIX"/share/locale")
00089 #else
00090 # define EDE_APPLICATION(name)         EDE_APPLICATION_WITH_NLS_PATH(name, "dummy_path")
00091 # define EDE_CONSOLE_APPLICATION(name) EDE_CONSOLE_APPLICATION_WITH_NLS_PATH(name, "dummy_path")
00092 #endif
00093 
00094 #endif