[gedit] Add gseal-gtk-compat.h file



commit ec64bcf3c238ac28c3513a5e3fe876efadc79a7f
Author: Javier Jardón <jjardon gnome org>
Date:   Thu Apr 29 04:54:22 2010 +0200

    Add gseal-gtk-compat.h file
    
    This completes previous commit
    d17185bb01fd3b89da52151bd2fbd5b8c3edeafb

 gedit/gseal-gtk-compat.h |   52 ++++++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 52 insertions(+), 0 deletions(-)
---
diff --git a/gedit/gseal-gtk-compat.h b/gedit/gseal-gtk-compat.h
new file mode 100644
index 0000000..c30f7df
--- /dev/null
+++ b/gedit/gseal-gtk-compat.h
@@ -0,0 +1,52 @@
+/* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 8 -*- */
+/*
+ *  Copyright © 2009 Thomas H.P. Andersen <phomes gmail com>,
+ *              2009 Javier Jardón <jjardon gnome org>
+ *
+ *  This runtime 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.1, or (at your option)
+ *  any later version.
+ *
+ *  This runtime is distributed in the hope runtime it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *  GNU General Public License for more details.
+ *
+ *  You should have received a copy of the GNU Lesser General Public License
+ *  along with this runtime; if not, write to the Free Software
+ *  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+#ifndef GSEAL_GTK_COMPAT_H
+#define GSEAL_GTK_COMPAT_H
+
+G_BEGIN_DECLS
+
+#if !GTK_CHECK_VERSION (2, 20, 0)
+#define gtk_widget_get_realized(widget)                         GTK_WIDGET_REALIZED(widget)
+#define gtk_widget_get_mapped(widget)                           GTK_WIDGET_MAPPED(widget)
+#endif /* GTK < 2.20.0 */
+
+#if !GTK_CHECK_VERSION (2, 18, 0)
+#define gtk_cell_renderer_get_alignment(cell, xalign, yalign)   g_object_get (cell, "xalign", xalign, "yalign", yalign, NULL);
+#define gtk_cell_renderer_get_padding(cell, xpad, ypad)         g_object_get (cell, "xpad", xpad, "ypad", ypad, NULL);
+#define gtk_cell_renderer_set_padding(cell, xpad, ypad)         g_object_set (cell, "xpad", xpad, "ypad", ypad, NULL);
+#define gtk_widget_get_allocation(widget, alloc)                (*(alloc)=(widget)->allocation)
+#define gtk_widget_set_allocation(widget, alloc)                ((widget)->allocation=*(alloc))
+#define gtk_widget_get_app_paintable(widget)                    (GTK_WIDGET_APP_PAINTABLE (widget))
+#define gtk_widget_set_can_default(widget, can_default)         ((can_default) ? (GTK_WIDGET_SET_FLAGS (w, GTK_CAN_DEFAULT)) : (GTK_WIDGET_UNSET_FLAGS (w, GTK_CAN_DEFAULT)))
+#define gtk_widget_set_can_focus(widget, can_focus)             ((can_focus) ? (GTK_WIDGET_SET_FLAGS (w, GTK_CAN_FOCUS)) : (GTK_WIDGET_UNSET_FLAGS (w, GTK_CAN_FOCUS)))
+#define gtk_widget_set_double_buffered(widget, double_buffered) ((double_buffered) ? (GTK_WIDGET_SET_FLAGS (w, GTK_DOUBLE_BUFFERED)) : (GTK_WIDGET_UNSET_FLAGS (w, GTK_DOUBLE_BUFFERED)))
+#define gtk_widget_is_drawable(widget)                          (GTK_WIDGET_DRAWABLE (widget))
+#define gtk_widget_has_focus(widget)                            (GTK_WIDGET_HAS_FOCUS (widget))
+#define gtk_widget_get_has_window(widget)                       (!GTK_WIDGET_NO_WINDOW (widget))
+#define gtk_widget_get_state(widget)                            ((widget)->state)
+#define gtk_widget_get_visible(widget)                          (GTK_WIDGET_VISIBLE (widget))
+#define gtk_widget_set_window(widget, _window)                  ((widget)->window=_window)
+#endif /* GTK+ < 2.18.0 */
+
+
+G_END_DECLS
+
+#endif /* GSEAL_GTK_COMPAT_H */



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]