medit/moo/mooutils/moocompat.h

107 lines
2.7 KiB
C
Raw Normal View History

2005-06-22 18:20:32 +00:00
/*
2007-06-24 12:56:20 -05:00
* moocompat.h
2005-06-22 18:20:32 +00:00
*
2007-06-24 12:56:20 -05:00
* Copyright (C) 2004-2007 by Yevgen Muntyan <muntyan@math.tamu.edu>
2005-06-22 18:20:32 +00:00
*
2007-06-24 12:56:20 -05:00
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
2007-09-23 11:47:28 -05:00
* License version 2.1 as published by the Free Software Foundation.
2005-06-22 18:20:32 +00:00
*
* See COPYING file that comes with this distribution.
*/
#ifndef MOOUTILS_COMPAT_H
#define MOOUTILS_COMPAT_H
#include <gtk/gtk.h>
#ifndef __WIN32__ /* TODO */
#include <sys/types.h>
#endif /* __WIN32__ */
G_BEGIN_DECLS
#if !GLIB_CHECK_VERSION(2,8,0)
#define g_mkdir_with_parents _moo_g_mkdir_with_parents
2008-01-19 04:16:52 -06:00
#define g_listenv _moo_g_listenv
#define g_utf8_collate_key_for_filename _moo_g_utf8_collate_key_for_filename
#define g_file_set_contents _moo_g_file_set_contents
int g_mkdir_with_parents (const char *pathname,
int mode);
char **g_listenv (void);
char *g_utf8_collate_key_for_filename (const char *str,
gssize len);
gboolean g_file_set_contents (const char *filename,
const char *contents,
gssize length,
GError **error);
#if __GNUC__ >= 4
#define G_GNUC_NULL_TERMINATED __attribute__((__sentinel__))
#else
#define G_GNUC_NULL_TERMINATED
#endif
#endif /* !GLIB_CHECK_VERSION(2,8,0) */
2005-06-22 18:20:32 +00:00
#if !GLIB_CHECK_VERSION(2,10,0)
2008-01-05 02:08:03 -06:00
G_END_DECLS
#include "mooutils/mooutils-misc.h"
G_BEGIN_DECLS
2008-01-05 02:08:03 -06:00
#define g_intern_string _moo_intern_string
#endif /* !GLIB_CHECK_VERSION(2,10,0) */
#if !GTK_CHECK_VERSION(2,10,0)
#ifndef GTK_STOCK_SELECT_ALL
#define GTK_STOCK_SELECT_ALL "gtk-select-all"
#endif
2007-06-16 06:26:44 -05:00
typedef enum {
GTK_UNIT_PIXEL,
GTK_UNIT_POINTS,
GTK_UNIT_INCH,
GTK_UNIT_MM
} GtkUnit;
#define GTK_TYPE_UNIT (gtk_unit_get_type ())
GType gtk_unit_get_type (void) G_GNUC_CONST;
#define gdk_atom_intern_static_string _moo_gdk_atom_intern_static_string
GdkAtom gdk_atom_intern_static_string (const char *atom_name);
#endif /* !GTK_CHECK_VERSION(2,10,0) */
2007-09-28 18:08:12 -05:00
#if !GTK_CHECK_VERSION(2,12,0)
#ifndef GTK_STOCK_DISCARD
#define GTK_STOCK_DISCARD "gtk-discard"
#endif
#endif /* !GTK_CHECK_VERSION(2,10,0) */
#if !GLIB_CHECK_VERSION(2,14,0)
G_END_DECLS
#include <stdarg.h>
G_BEGIN_DECLS
#define g_string_append_vprintf _moo_g_string_append_vprintf
void g_string_append_vprintf (GString *string,
const char *format,
va_list args);
#endif /* !GLIB_CHECK_VERSION(2,14,0) */
2005-06-22 18:20:32 +00:00
G_END_DECLS
#endif /* MOOUTILS_COMPAT_H */