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

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

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 3364 by schoenebeck, Tue Nov 14 18:07:25 2017 UTC revision 3472 by persson, Sat Feb 16 19:56:56 2019 UTC
# Line 1  Line 1 
1  /*                                                         -*- c++ -*-  /*                                                         -*- c++ -*-
2   * Copyright (C) 2011-2017 Andreas Persson   * Copyright (C) 2011-2019 Andreas Persson
3   *   *
4   * This program is free software; you can redistribute it and/or   * This program is free software; you can redistribute it and/or
5   * modify it under the terms of the GNU General Public License as   * modify it under the terms of the GNU General Public License as
# Line 40  Line 40 
40    
41  #ifdef CAIROMM_HEADER_FILE  #ifdef CAIROMM_HEADER_FILE
42  # include CAIROMM_HEADER_FILE(cairommconfig.h)  # include CAIROMM_HEADER_FILE(cairommconfig.h)
43  #else  #elif HAVE_CAIROMMCONFIG_H
44  # include <cairommconfig.h>  # include <cairommconfig.h>
45  #endif  #endif
46    
# Line 50  Line 50 
50  # include <gtkmmconfig.h>  # include <gtkmmconfig.h>
51  #endif  #endif
52    
53  #ifndef HAS_PANGOMM_CPP11_ENUMS // pangomm > 2.40 : <- just a "guess"  #ifndef HAS_PANGOMM_CPP11_ENUMS
54  # if PANGOMM_MAJOR_VERSION > 2 || (PANGOMM_MAJOR_VERSION == 2 && PANGOMM_MINOR_VERSION > 40)     // new enums introduced in unstable pangomm 2.41.3, but not in stable 2.42
55    # if PANGOMM_MAJOR_VERSION > 2 || (PANGOMM_MAJOR_VERSION == 2 && ((PANGOMM_MINOR_VERSION == 41 && PANGOMM_MICRO_VERSION >= 3) || PANGOMM_MINOR_VERSION > 42))
56  #  define HAS_PANGOMM_CPP11_ENUMS 1  #  define HAS_PANGOMM_CPP11_ENUMS 1
57  # else  # else
58  #  define HAS_PANGOMM_CPP11_ENUMS 0  #  define HAS_PANGOMM_CPP11_ENUMS 0
# Line 61  Line 62 
62  // Gtk::UIManager had been replaced by Gtk::Builder in GTKMM 3 and removed in GTKMM 4  // Gtk::UIManager had been replaced by Gtk::Builder in GTKMM 3 and removed in GTKMM 4
63  // Gtk::ActionGroup had been replaced by Gio::ActionGroup in GTKMM 3 and removed in GTKMM 4  // Gtk::ActionGroup had been replaced by Gio::ActionGroup in GTKMM 3 and removed in GTKMM 4
64  #if !defined(USE_GTKMM_BUILDER) || !defined(USE_GLIB_ACTION) // gtkmm > 3.22 :  #if !defined(USE_GTKMM_BUILDER) || !defined(USE_GLIB_ACTION) // gtkmm > 3.22 :
65  # if GTKMM_MAJOR_VERSION > 3 || (GTKMM_MAJOR_VERSION == 3 && GTKMM_MINOR_VERSION > 22)  # if GTKMM_MAJOR_VERSION > 3 || (GTKMM_MAJOR_VERSION == 3 && GTKMM_MINOR_VERSION > 24)
66  #  define USE_GTKMM_BUILDER 1  #  define USE_GTKMM_BUILDER 1
67  #  define USE_GLIB_ACTION 1  #  define USE_GLIB_ACTION 1
68  # else  # else
# Line 79  Line 80 
80  #endif  #endif
81    
82  #ifndef HAS_GTKMM_CPP11_ENUMS // gtkmm > 3.22  #ifndef HAS_GTKMM_CPP11_ENUMS // gtkmm > 3.22
83  # if GTKMM_MAJOR_VERSION > 3 || (GTKMM_MAJOR_VERSION == 3 && GTKMM_MINOR_VERSION > 22)  # if GTKMM_MAJOR_VERSION > 3 || (GTKMM_MAJOR_VERSION == 3 && GTKMM_MINOR_VERSION > 24)
84  #  define HAS_GTKMM_CPP11_ENUMS 1  #  define HAS_GTKMM_CPP11_ENUMS 1
85  # else  # else
86  #  define HAS_GTKMM_CPP11_ENUMS 0  #  define HAS_GTKMM_CPP11_ENUMS 0
# Line 88  Line 89 
89    
90  // alignment.h had been removed in GTKMM 4  // alignment.h had been removed in GTKMM 4
91  #ifndef HAS_GTKMM_ALIGNMENT // gtkmm > 3.22 :  #ifndef HAS_GTKMM_ALIGNMENT // gtkmm > 3.22 :
92  # if GTKMM_MAJOR_VERSION > 3 || (GTKMM_MAJOR_VERSION == 3 && GTKMM_MINOR_VERSION > 22)  # if GTKMM_MAJOR_VERSION > 3 || (GTKMM_MAJOR_VERSION == 3 && GTKMM_MINOR_VERSION > 24)
93  #  define HAS_GTKMM_ALIGNMENT 0  #  define HAS_GTKMM_ALIGNMENT 0
94  # else  # else
95  #  define HAS_GTKMM_ALIGNMENT 1  #  define HAS_GTKMM_ALIGNMENT 1
# Line 99  Line 100 
100  // stock.h had been removed in GTKMM 4  // stock.h had been removed in GTKMM 4
101  // Gtk::VBox, Gtk::HBox and Gtk::HButtonBox had been replaced by Gtk::Box in GTKMM 3 and removed in GTKMM 4  // Gtk::VBox, Gtk::HBox and Gtk::HButtonBox had been replaced by Gtk::Box in GTKMM 3 and removed in GTKMM 4
102  #if !defined(USE_GTKMM_GRID) || !defined(HAS_GTKMM_STOCK) || !defined(USE_GTKMM_BOX) || !defined(USE_GTKMM_PANED) // gtkmm > 3.22 :  #if !defined(USE_GTKMM_GRID) || !defined(HAS_GTKMM_STOCK) || !defined(USE_GTKMM_BOX) || !defined(USE_GTKMM_PANED) // gtkmm > 3.22 :
103  # if GTKMM_MAJOR_VERSION > 3 || (GTKMM_MAJOR_VERSION == 3 && GTKMM_MINOR_VERSION > 22)  # if GTKMM_MAJOR_VERSION > 3 || (GTKMM_MAJOR_VERSION == 3 && GTKMM_MINOR_VERSION > 24)
104  #  define USE_GTKMM_GRID 1  #  define USE_GTKMM_GRID 1
105  #  define HAS_GTKMM_STOCK 0  #  define HAS_GTKMM_STOCK 0
106  #  define USE_GTKMM_BOX 1  #  define USE_GTKMM_BOX 1
# Line 156  public: Line 157  public:
157      HScale(const Glib::RefPtr<Gtk::Adjustment>& adjustment) : Gtk::Scale(adjustment, Gtk::Orientation::HORIZONTAL) {}      HScale(const Glib::RefPtr<Gtk::Adjustment>& adjustment) : Gtk::Scale(adjustment, Gtk::Orientation::HORIZONTAL) {}
158  };  };
159  #else  #else
160  # include <gtkmm/hvbox.h>  # if GTKMM_MAJOR_VERSION > 3 || (GTKMM_MAJOR_VERSION == 3 && (GTKMM_MINOR_VERSION > 1 || (GTKMM_MINOR_VERSION == 1 && GTKMM_MICRO_VERSION >= 6))) // GTKMM >= 3.1.6
161    #  include <gtkmm/hvbox.h>
162    #endif
163  typedef Gtk::HBox HBox;  typedef Gtk::HBox HBox;
164  typedef Gtk::VBox VBox;  typedef Gtk::VBox VBox;
165  typedef Gtk::HButtonBox HButtonBox;  typedef Gtk::HButtonBox HButtonBox;
# Line 420  namespace Glib { Line 423  namespace Glib {
423    
424  #endif // glibmm 2.31.2  #endif // glibmm 2.31.2
425    
426    
427    // glibmm 2.47.3
428    
429    #if (GLIBMM_MAJOR_VERSION == 2 && GLIBMM_MINOR_VERSION == 47 && GLIBMM_MICRO_VERSION < 3) || \
430        (GLIBMM_MAJOR_VERSION == 2 && GLIBMM_MINOR_VERSION < 47) || GLIBMM_MAJOR_VERSION < 2
431    
432    #define GLIB_THREADS
433    
434    #endif
435    
436  #endif // GIGEDIT_COMPAT_H  #endif // GIGEDIT_COMPAT_H

Legend:
Removed from v.3364  
changed lines
  Added in v.3472

  ViewVC Help
Powered by ViewVC