// -*- c++ -*-
// Generated by gtkmmproc -- DO NOT MODIFY!
#ifndef _GTKMM_RECENTFILTER_H
#define _GTKMM_RECENTFILTER_H


#include <glibmm.h>

/* Copyright (C) 2006 The gtkmm Development Team
 *
 * This library is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Library General Public
 * License as published by the Free Software Foundation; either
 * version 2 of the License, or (at your option) any later version.
 *
 * This library is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * Library General Public License for more details.
 *
 * You should have received a copy of the GNU Library General Public
 * License along with this library; if not, write to the Free
 * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
 */

#include <gtkmm/object.h>


#ifndef DOXYGEN_SHOULD_SKIP_THIS
typedef struct _GtkRecentFilter GtkRecentFilter;
typedef struct _GtkRecentFilterClass GtkRecentFilterClass;
#endif /* DOXYGEN_SHOULD_SKIP_THIS */


namespace Gtk
{ class RecentFilter_Class; } // namespace Gtk
namespace Gtk
{

/** @addtogroup gtkmmEnums Enums and Flags */

/**
 * @ingroup gtkmmEnums
 * @par Bitwise operators:
 * <tt>%RecentFilterFlags operator|(RecentFilterFlags, RecentFilterFlags)</tt><br>
 * <tt>%RecentFilterFlags operator&(RecentFilterFlags, RecentFilterFlags)</tt><br>
 * <tt>%RecentFilterFlags operator^(RecentFilterFlags, RecentFilterFlags)</tt><br>
 * <tt>%RecentFilterFlags operator~(RecentFilterFlags)</tt><br>
 * <tt>%RecentFilterFlags& operator|=(RecentFilterFlags&, RecentFilterFlags)</tt><br>
 * <tt>%RecentFilterFlags& operator&=(RecentFilterFlags&, RecentFilterFlags)</tt><br>
 * <tt>%RecentFilterFlags& operator^=(RecentFilterFlags&, RecentFilterFlags)</tt><br>
 */
enum RecentFilterFlags
{
  RECENT_FILTER_URI = 1 << 0,
  RECENT_FILTER_DISPLAY_NAME = 1 << 1,
  RECENT_FILTER_MIME_TYPE = 1 << 2,
  RECENT_FILTER_APPLICATION = 1 << 3,
  RECENT_FILTER_GROUP = 1 << 4,
  RECENT_FILTER_AGE = 1 << 5
};

/** @ingroup gtkmmEnums */
inline RecentFilterFlags operator|(RecentFilterFlags lhs, RecentFilterFlags rhs)
  { return static_cast<RecentFilterFlags>(static_cast<unsigned>(lhs) | static_cast<unsigned>(rhs)); }

/** @ingroup gtkmmEnums */
inline RecentFilterFlags operator&(RecentFilterFlags lhs, RecentFilterFlags rhs)
  { return static_cast<RecentFilterFlags>(static_cast<unsigned>(lhs) & static_cast<unsigned>(rhs)); }

/** @ingroup gtkmmEnums */
inline RecentFilterFlags operator^(RecentFilterFlags lhs, RecentFilterFlags rhs)
  { return static_cast<RecentFilterFlags>(static_cast<unsigned>(lhs) ^ static_cast<unsigned>(rhs)); }

/** @ingroup gtkmmEnums */
inline RecentFilterFlags operator~(RecentFilterFlags flags)
  { return static_cast<RecentFilterFlags>(~static_cast<unsigned>(flags)); }

/** @ingroup gtkmmEnums */
inline RecentFilterFlags& operator|=(RecentFilterFlags& lhs, RecentFilterFlags rhs)
  { return (lhs = static_cast<RecentFilterFlags>(static_cast<unsigned>(lhs) | static_cast<unsigned>(rhs))); }

/** @ingroup gtkmmEnums */
inline RecentFilterFlags& operator&=(RecentFilterFlags& lhs, RecentFilterFlags rhs)
  { return (lhs = static_cast<RecentFilterFlags>(static_cast<unsigned>(lhs) & static_cast<unsigned>(rhs))); }

/** @ingroup gtkmmEnums */
inline RecentFilterFlags& operator^=(RecentFilterFlags& lhs, RecentFilterFlags rhs)
  { return (lhs = static_cast<RecentFilterFlags>(static_cast<unsigned>(lhs) ^ static_cast<unsigned>(rhs))); }

} // namespace Gtk


#ifndef DOXYGEN_SHOULD_SKIP_THIS
namespace Glib
{

template <>
class Value<Gtk::RecentFilterFlags> : public Glib::Value_Flags<Gtk::RecentFilterFlags>
{
public:
  static GType value_type() G_GNUC_CONST;
};

} // namespace Glib
#endif /* DOXYGEN_SHOULD_SKIP_THIS */


namespace Gtk
{


/** TODO: Add documentation when the C docs are online.
 */

class RecentFilter : public Gtk::Object
{
  public:
#ifndef DOXYGEN_SHOULD_SKIP_THIS
  typedef RecentFilter CppObjectType;
  typedef RecentFilter_Class CppClassType;
  typedef GtkRecentFilter BaseObjectType;
  typedef GtkRecentFilterClass BaseClassType;
#endif /* DOXYGEN_SHOULD_SKIP_THIS */

  virtual ~RecentFilter();

#ifndef DOXYGEN_SHOULD_SKIP_THIS

private:
  friend class RecentFilter_Class;
  static CppClassType recentfilter_class_;

  // noncopyable
  RecentFilter(const RecentFilter&);
  RecentFilter& operator=(const RecentFilter&);

protected:
  explicit RecentFilter(const Glib::ConstructParams& construct_params);
  explicit RecentFilter(GtkRecentFilter* castitem);

#endif /* DOXYGEN_SHOULD_SKIP_THIS */

public:
#ifndef DOXYGEN_SHOULD_SKIP_THIS
  static GType get_type()      G_GNUC_CONST;
  static GType get_base_type() G_GNUC_CONST;
#endif

  ///Provides access to the underlying C GtkObject.
  GtkRecentFilter*       gobj()       { return reinterpret_cast<GtkRecentFilter*>(gobject_); }

  ///Provides access to the underlying C GtkObject.
  const GtkRecentFilter* gobj() const { return reinterpret_cast<GtkRecentFilter*>(gobject_); }


public:
  //C++ methods used to invoke GTK+ virtual functions:
#ifdef GLIBMM_VFUNCS_ENABLED
#endif //GLIBMM_VFUNCS_ENABLED

protected:
  //GTK+ Virtual Functions (override these to change behaviour):
#ifdef GLIBMM_VFUNCS_ENABLED
#endif //GLIBMM_VFUNCS_ENABLED

  //Default Signal Handlers::
#ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED
#endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED


private:

public:
  RecentFilter();

  
  void set_name(const Glib::ustring& name);
  
  Glib::ustring get_name() const;

  
  void add_mime_type(const Glib::ustring& mime_type);
  
  void add_pattern(const Glib::ustring& pattern);
  
  void add_pixbuf_formats();
  
  void add_application(const Glib::ustring& application);
  
  void add_group(const Glib::ustring& group);
  
  void add_age(int days);

  class Info
  {
  public:
    Info();

    ///This bitmask tells us which of the other variables contain useful information.
    RecentFilterFlags contains;

    Glib::ustring uri;
    Glib::ustring display_name;
    Glib::ustring mime_type;
    std::list<Glib::ustring> applications;
    std::list<Glib::ustring> groups;
    int age;
  };

  /// For instance, bool on_custom(const Gtk::RecentFilter::Info& filter_info);
  typedef sigc::slot<bool, const Info&> SlotCustom;
  
  void add_custom(RecentFilterFlags needed, const SlotCustom& slot);
  

  RecentFilterFlags get_needed() const;

  // Method is used by class RecentChooser implementors.
  
  //_WRAP_METHOD(bool filter(const GtkRecentFilterInfo* filter_info), gtk_recent_filter_filter)


};

} // namespace Gtk


namespace Glib
{
  /** @relates Gtk::RecentFilter
   * @param object The C instance
   * @param take_copy False if the result should take ownership of the C instance. True if it should take a new copy or ref.
   * @result A C++ instance that wraps this C instance.
   */
  Gtk::RecentFilter* wrap(GtkRecentFilter* object, bool take_copy = false);
} //namespace Glib


#endif /* _GTKMM_RECENTFILTER_H */

