/[svn]/gigedit/trunk/src/gigedit/compat.h
ViewVC logotype

Contents of /gigedit/trunk/src/gigedit/compat.h

Parent Directory Parent Directory | Revision Log Revision Log


Revision 2170 - (show annotations) (download) (as text)
Sun Mar 6 07:52:43 2011 UTC (13 years, 1 month ago) by persson
File MIME type: text/x-c++hdr
File size: 2055 byte(s)
- added new files missing in previous commit

1 /* -*- c++ -*-
2 * Copyright (C) 2011 Andreas Persson
3 *
4 * This program is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU General Public License as
6 * published by the Free Software Foundation; either version 2, or (at
7 * your option) any later version.
8 *
9 * This program is distributed in the hope that it will be useful, but
10 * WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * General Public License for more details.
13 *
14 * You should have received a copy of the GNU General Public License
15 * along with program; see the file COPYING. If not, write to the Free
16 * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
17 * 02110-1301 USA.
18 */
19
20 #ifndef GIGEDIT_COMPAT_H
21 #define GIGEDIT_COMPAT_H
22
23
24 // 2.10
25
26 #if (GTKMM_MAJOR_VERSION == 2 && GTKMM_MINOR_VERSION < 10) || GTKMM_MAJOR_VERSION < 2
27 #define create_cairo_context() \
28 gobj() ? Cairo::RefPtr<Cairo::Context>( \
29 new Cairo::Context(gdk_cairo_create(get_window()->gobj()))) : \
30 Cairo::RefPtr<Cairo::Context>()
31 #endif
32
33
34 // 2.18
35
36 #if (GTKMM_MAJOR_VERSION == 2 && GTKMM_MINOR_VERSION < 18) || GTKMM_MAJOR_VERSION < 2
37 #define set_can_focus() set_flags(Gtk::CAN_FOCUS)
38 #define set_can_default() set_flags(Gtk::CAN_DEFAULT)
39 #endif
40
41
42 // 2.21.9
43
44 #if (GTKMM_MAJOR_VERSION == 2 && GTKMM_MINOR_VERSION == 21 && GTKMM_MICRO_VERSION < 9) || \
45 (GTKMM_MAJOR_VERSION == 2 && GTKMM_MINOR_VERSION < 21) || GTKMM_MAJOR_VERSION < 2
46 #define ALIGN_START ALIGN_LEFT
47 #endif
48
49
50 // 3.0
51
52 #if (GTKMM_MAJOR_VERSION == 2 && GTKMM_MINOR_VERSION < 90) || GTKMM_MAJOR_VERSION < 2
53 #include <cairomm/context.h>
54 #include <gdkmm/color.h>
55
56 namespace Gdk {
57 typedef Color RGBA;
58
59 namespace Cairo {
60 void set_source_rgba(const ::Cairo::RefPtr< ::Cairo::Context >& context,
61 const Gdk::RGBA& color);
62 }
63 }
64 #endif
65
66 #endif

  ViewVC Help
Powered by ViewVC