// Generated by gmmproc 2.50.0 -- DO NOT MODIFY!
#ifndef _IDEMM_APPLICATION_H
#define _IDEMM_APPLICATION_H


#include <glibmm/ustring.h>
#include <sigc++/sigc++.h>

/* application.hg
 *
 * Copyright (C) 2016 Marcin Kolny <marcin.kolny@gmail.com>
 *
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * This program 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 General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */

#include <idemm/recentprojects.h>

#include <gtkmm/application.h>
#include <giomm/asyncresult.h>
#include <giomm/cancellable.h>
#include <giomm/dbusproxy.h>

#include <ide.h>


#ifndef DOXYGEN_SHOULD_SKIP_THIS
#endif /* DOXYGEN_SHOULD_SKIP_THIS */


#ifndef DOXYGEN_SHOULD_SKIP_THIS
namespace Ide
{ class Application_Class; } // namespace Ide
#endif //DOXYGEN_SHOULD_SKIP_THIS

namespace Ide {

/** @addtogroup idemmEnums idemm Enums and Flags */

/** 
 *
 * @ingroup idemmEnums
 */
enum ApplicationMode
{
  APPLICATION_MODE_PRIMARY,
  APPLICATION_MODE_WORKER,
  APPLICATION_MODE_TOOL,
  APPLICATION_MODE_TESTS
};


class Application : public Gtk::Application
{
protected:
  
#ifndef DOXYGEN_SHOULD_SKIP_THIS

public:
  using CppObjectType = Application;
  using CppClassType = Application_Class;
  using BaseObjectType = IdeApplication;
  using BaseClassType = IdeApplicationClass;

  // noncopyable
  Application(const Application&) = delete;
  Application& operator=(const Application&) = delete;

private:  friend class Application_Class;
  static CppClassType application_class_;

protected:
  explicit Application(const Glib::ConstructParams& construct_params);
  explicit Application(IdeApplication* castitem);

#endif /* DOXYGEN_SHOULD_SKIP_THIS */

public:

  Application(Application&& src) noexcept;
  Application& operator=(Application&& src) noexcept;

  ~Application() noexcept override;

  /** Get the GType for this class, for use with the underlying GObject type system.
   */
  static GType get_type()      G_GNUC_CONST;

#ifndef DOXYGEN_SHOULD_SKIP_THIS


  static GType get_base_type() G_GNUC_CONST;
#endif

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

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

  ///Provides access to the underlying C instance. The caller is responsible for unrefing it. Use when directly setting fields in structs.
  IdeApplication* gobj_copy();

private:

  
  Application();

public:
  
  
  static Glib::RefPtr<Application> create();

  
  Ide::ApplicationMode get_mode() const;
  
  /** Gets the startup time of the application.
   * 
   * @return A DateTime.
   */
  Glib::DateTime get_started_at() const;
  
  void show_projects_window();
  
  Glib::ustring get_keybindings_mode() const;
  
  /** Similar to gtk_application_get_menu_by_id() but takes into account merging
   * the menus provided by, and extended by, plugins.
   * 
   * @param id The id of the menu to lookup.
   * @return A Menu.
   */
  Glib::RefPtr<Gio::Menu> get_menu_by_id(const Glib::ustring& id);
  
  /** This method will retreive an Ide::RecentProjects for the application that
   * represents recent and discover projects on the system. The first time
   * the Ide::RecentProjects is loaded, discovery of projects will occur. There
   * is no need to call ide_recent_projects_discover_async().
   * 
   * If you would like to display a spinner while discovery is in process, simply
   * connect to the Ide::RecentProjects::property_busy(): property notification.
   * 
   * @return An Ide::RecentProjects.
   */
  Glib::RefPtr<Ide::RecentProjects> get_recent_projects();
  
  /** Completes an asynchronous request to get a proxy to a worker process.
   * 
   * @param result A AsyncResult.
   * @return A DBusProxy or <tt>nullptr</tt>.
   */
  Glib::RefPtr<Gio::DBus::Proxy> get_worker_finish(const Glib::RefPtr<Gio::AsyncResult>& result);

  void get_worker_async(const Glib::ustring& plugin_name, const Gio::SlotAsyncReady& slot, const Glib::RefPtr<Gio::Cancellable>& cancellable);
  void get_worker_async(const Glib::ustring& plugin_name, const Gio::SlotAsyncReady& slot);
  

public:

public:
  //C++ methods used to invoke GTK+ virtual functions:

protected:
  //GTK+ Virtual Functions (override these to change behaviour):

  //Default Signal Handlers::


};

}


namespace Glib
{
  /** A Glib::wrap() method for this object.
   *
   * @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.
   *
   * @relates Ide::Application
   */
  Glib::RefPtr<Ide::Application> wrap(IdeApplication* object, bool take_copy = false);
}


#endif /* _IDEMM_APPLICATION_H */

