Adding upstream version 0.9.0.
[debian/lxpanel.git] / src / gtk-compat.h
1 /*
2 * Copyright (C) 2014-2016 Andriy Grytsenko <andrej@rep.kiev.ua>
3 *
4 * This file is a part of LXPanel project.
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
10 *
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, write to the Free Software Foundation,
18 * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
19 */
20
21 #ifndef __GTK_COMPAT_H__
22 #define __GTK_COMPAT_H__ 1
23
24 /* compatibility things */
25 #if !GTK_CHECK_VERSION(2, 20, 0)
26 # define gtk_widget_get_realized GTK_WIDGET_REALIZED
27 # define gtk_widget_get_mapped GTK_WIDGET_MAPPED
28 #endif
29
30 #if !GTK_CHECK_VERSION(2, 21, 0)
31 # define GDK_KEY_Tab GDK_Tab
32 # define GDK_KEY_space GDK_space
33 # define GDK_KEY_Return GDK_Return
34 # define GDK_KEY_KP_Enter GDK_KP_Enter
35 # define GDK_KEY_BackSpace GDK_BackSpace
36 #endif
37
38 #if !GTK_CHECK_VERSION(2, 22, 0)
39 # define gtk_button_get_event_window(a) a->event_window
40 # define gdk_visual_get_depth(a) a->depth
41 #endif
42
43 #if !GTK_CHECK_VERSION(2, 24, 0)
44 # define gdk_window_get_screen gdk_drawable_get_screen
45 #endif
46
47 #if GTK_CHECK_VERSION(3, 0, 0)
48 # define GTK_DIALOG_NO_SEPARATOR 0
49 #endif
50
51 #endif