2
* Copyright © 2009 Thomas H.P. Andersen <phomes@gmail.com>
4
* This runtime is free software; you can redistribute it and/or modify
5
* it under the terms of the GNU Lesser General Public License as published by
6
* the Free Software Foundation; either version 2.1, or (at your option)
9
* This runtime is distributed in the hope runtime it will be useful,
10
* but WITHOUT ANY WARRANTY; without even the implied warranty of
11
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12
* GNU General Public License for more details.
14
* You should have received a copy of the GNU Lesser General Public License
15
* along with this runtime; if not, write to the Free Software
16
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
19
#ifndef GAMES_GTK_COMPAT_H
20
#define GAMES_GTK_COMPAT_H
23
#if !GTK_CHECK_VERSION (2, 21, 1)
24
#define gdk_visual_get_depth(widget) ((widget)->depth)
25
#endif /* GTK < 2.21.1 */
27
#if !GTK_CHECK_VERSION (2, 20, 0)
28
#define gtk_widget_get_realized(widget) (GTK_WIDGET_REALIZED(widget))
29
#define gtk_widget_set_realized(w,realized) ((realized) ? (GTK_WIDGET_SET_FLAGS (w, GTK_REALIZED)) : (GTK_WIDGET_UNSET_FLAGS (w, GTK_REALIZED)))
30
#define gtk_widget_get_mapped(widget) (GTK_WIDGET_MAPPED(widget))
31
#endif /* GTK < 2.20.0 */
33
#if !GTK_CHECK_VERSION (2, 18, 0)
34
#define gtk_widget_set_allocation(widget, alloc) ((widget)->allocation=*(alloc))
35
#define gtk_widget_get_allocation(widget, alloc) (*(alloc)=(widget)->allocation)
36
#define gtk_widget_set_window(widget, window_arg) ((widget)->window=window_arg)
37
#define gtk_widget_has_focus(widget) (GTK_WIDGET_HAS_FOCUS (widget))
38
#define gtk_widget_get_state(widget) ((widget)->state)
39
#define gtk_widget_get_visible(widget) (GTK_WIDGET_VISIBLE (widget))
40
#define gtk_widget_is_drawable(widget) (GTK_WIDGET_DRAWABLE (widget))
41
#define gtk_widget_set_can_focus(w,can_focus) ((can_focus) ? (GTK_WIDGET_SET_FLAGS (w, GTK_CAN_FOCUS)) : (GTK_WIDGET_UNSET_FLAGS (w, GTK_CAN_FOCUS)))
42
#endif /* GTK < 2.18.0 */
44
#if !GTK_CHECK_VERSION (2, 14, 0)
45
#define gtk_dialog_get_content_area(dialog) ((dialog)->vbox)
46
#define gtk_widget_get_window(widget) ((widget)->window)
47
#endif /* GTK < 2.14.0 */
51
#endif /* !GAMES_GTK_COMPAT_H */