glib/glib/glib.h

116 lines
3.3 KiB
C
Raw Normal View History

/* GLIB - Library of useful routines for C programming
* Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
2014-01-23 12:58:29 +01:00
* License along with this library; if not, see <http://www.gnu.org/licenses/>.
*/
/*
* Modified by the GLib Team and others 1997-2000. See the AUTHORS
* file for a list of people on the GLib Team. See the ChangeLog
* files for a list of changes. These files are distributed with
* GLib at ftp://ftp.gtk.org/pub/gtk/.
*/
#ifndef __G_LIB_H__
#define __G_LIB_H__
#define __GLIB_H_INSIDE__
#include <glib/galloca.h>
#include <glib/garray.h>
#include <glib/gasyncqueue.h>
#include <glib/gatomic.h>
#include <glib/gbacktrace.h>
#include <glib/gbase64.h>
#include <glib/gbitlock.h>
#include <glib/gbookmarkfile.h>
#include <glib/gbytes.h>
#include <glib/gcharset.h>
#include <glib/gchecksum.h>
#include <glib/gconvert.h>
#include <glib/gdataset.h>
#include <glib/gdate.h>
#include <glib/gdatetime.h>
#include <glib/gdir.h>
#include <glib/genviron.h>
#include <glib/gerror.h>
#include <glib/gfileutils.h>
2011-10-17 07:52:10 +02:00
#include <glib/ggettext.h>
#include <glib/ghash.h>
#include <glib/ghmac.h>
#include <glib/ghook.h>
#include <glib/ghostutils.h>
#include <glib/giochannel.h>
#include <glib/gkeyfile.h>
#include <glib/glist.h>
#include <glib/gmacros.h>
#include <glib/gmain.h>
#include <glib/gmappedfile.h>
#include <glib/gmarkup.h>
#include <glib/gmem.h>
#include <glib/gmessages.h>
#include <glib/gnode.h>
#include <glib/goption.h>
#include <glib/gpattern.h>
#include <glib/gpoll.h>
#include <glib/gprimes.h>
#include <glib/gqsort.h>
#include <glib/gquark.h>
#include <glib/gqueue.h>
#include <glib/grand.h>
#include <glib/gregex.h>
#include <glib/gscanner.h>
#include <glib/gsequence.h>
#include <glib/gshell.h>
#include <glib/gslice.h>
#include <glib/gslist.h>
#include <glib/gspawn.h>
#include <glib/gstrfuncs.h>
#include <glib/gstring.h>
2011-10-02 05:38:23 +02:00
#include <glib/gstringchunk.h>
#include <glib/gtestutils.h>
#include <glib/gthread.h>
#include <glib/gthreadpool.h>
#include <glib/gtimer.h>
#include <glib/gtimezone.h>
#include <glib/gtrashstack.h>
#include <glib/gtree.h>
#include <glib/gtypes.h>
#include <glib/gunicode.h>
#include <glib/gurifuncs.h>
#include <glib/gutils.h>
#include <glib/guuid.h>
#include <glib/gvarianttype.h>
2010-02-10 17:13:06 +01:00
#include <glib/gvariant.h>
#include <glib/gversion.h>
Add flexible API version boundaries There are cases when it should be possible to define at compile time what range of functions and types should be used, in order to get, or restrict, the compiler warnings for deprecated or newly added types or functions. For instance, if GLib introduces a deprecation warning on a type in version 2.32, application code can decide to specify the minimum and maximum boundary of the used API to be 2.30; when compiling against a new version of GLib, this would produce the following results: - all deprecations introduced prior to 2.32 would emit compiler warnings when used by the application code; - all deprecations introduced in 2.32 would not emit compiler warnings when used by the application code; - all new symbols introduced in 2.32 would emit a compiler warning. Using this scheme it should be possible to have fairly complex situations, like the following one: assuming that an application is compiled with: GLIB_VERSION_MIN_REQUIRED = GLIB_VERSION_2_30 GLIB_VERSION_MAX_ALLOWED = GLIB_VERSION_2_32 and a GLib header containing: void function_A (void) GLIB_DEPRECATED_IN_2_26; void function_B (void) GLIB_DEPRECATED_IN_2_28; void function_C (void) GLIB_DEPRECATED_IN_2_30; void function_D (void) GLIB_AVAILABLE_IN_2_32; void function_E (void) GLIB_AVAILABLE_IN_2_34; any application code using the above functions will get the following compiler warnings: function_A: deprecated symbol warning function_B: deprecated symbol warning function_C: no warning function_D: no warning function_E: undefined symbol warning This means that it should be possible to gradually port code towards non-deprecated API gradually, on a per-release basis. https://bugzilla.gnome.org/show_bug.cgi?id=670542
2012-02-20 17:20:15 +01:00
#include <glib/gversionmacros.h>
Cygwin support contributed by Stefan Ondrejicka <ondrej@idata.sk>. 2001-02-21 Tor Lillqvist <tml@iki.fi> Cygwin support contributed by Stefan Ondrejicka <ondrej@idata.sk>. Hopefully I got it all in while simultaneously adding support for auto*/libtool for mingw. * Makefile.am: Changes for auto* support on Cygwin and Win32. Do still distribute the hand-written makefiles and *.win32.in files, though. Use GIO, GSPAWN and PLATFORMDEP macros set by configure. Use -no-undefined. Pass -export-symbols glib.def to libtool. * configure.in: Define G_PLATFORM_WIN32 on both pure Win32 (mingw) and Cygwin. Add AC_CYGWIN, AC_EXEEXT and AC_LIBTOOL_WIN32_DLL calls for Cygwin and mingw support. Check for %I64u guint64 format (in MS C library). Set G_MODULE_IMPL on mingw and Cygwin. Use ac_object and ac_exeext. Set GIO, GSPAWN, PLATFORMDEP and G_LIBS_EXTRA. Compile timeloop only on Unix. Define OS_WIN32 automake conditional on Win32. * glib.h: Include gwin32.h also on Cygwin. * gfileutils.c (get_contents_posix): Use O_BINARY (defined as 0 on Unix) for Cygwin's sake. * gtimer.c (GETTIME): Reduce #ifdefs, use a macro GETTIME(). * gconvert.c * gthread.c * gutf8.c * gutils.c: For code needed both on Cygwin and native Win32, test for G_PLATFORM_WIN32. * gmarkup.h: Use G_BEGIN_DECLS and G_END_DECLS. * gtypes.h: Refine GLIB_VAR definition. Also check for DLL_EXPORT in case compiling a static library on Win32 or Cygwin. * gwin32.c: No <direct.h> on Cygwin. No need for ftruncate() or dirent emulation on Cygwin. (get_package_directory_from_module) Convert return value from GetModuleFileName() to POSIX path on Cygwin. * tests/Makefile.am (progs_LDADD): Link with libglib, libgthread and libgmodule as appropriate. Use -no-undefined. * gbacktrace.c: Move #ifdefs around a bit on Win32. * gshell.c (unquote_string_inplace): Make static.
2001-03-09 22:23:33 +01:00
#ifdef G_PLATFORM_WIN32
#include <glib/gwin32.h>
#endif
#ifndef G_DISABLE_DEPRECATED
#include <glib/deprecated/gallocator.h>
#include <glib/deprecated/gcache.h>
#include <glib/deprecated/gcompletion.h>
#include <glib/deprecated/gmain.h>
#include <glib/deprecated/grel.h>
#include <glib/deprecated/gthread.h>
#endif /* G_DISABLE_DEPRECATED */
#include <glib/glib-autocleanups.h>
#undef __GLIB_H_INSIDE__
#endif /* __G_LIB_H__ */