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


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

/* object.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 <glibmm/object.h>
#include <giomm/asyncresult.h>

#include <ide.h>


#ifndef DOXYGEN_SHOULD_SKIP_THIS
using IdeObject = struct _IdeObject;
using IdeObjectClass = struct _IdeObjectClass;
#endif /* DOXYGEN_SHOULD_SKIP_THIS */


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

namespace Ide {


class Object : public Glib::Object
{
protected:
  
#ifndef DOXYGEN_SHOULD_SKIP_THIS

public:
  using CppObjectType = Object;
  using CppClassType = Object_Class;
  using BaseObjectType = IdeObject;
  using BaseClassType = IdeObjectClass;

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

private:  friend class Object_Class;
  static CppClassType object_class_;

protected:
  explicit Object(const Glib::ConstructParams& construct_params);
  explicit Object(IdeObject* castitem);

#endif /* DOXYGEN_SHOULD_SKIP_THIS */

public:

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

  ~Object() 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.
  IdeObject*       gobj()       { return reinterpret_cast<IdeObject*>(gobject_); }

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

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

private:


public:
  static Glib::RefPtr<Ide::Object> create_finish(const Glib::RefPtr<Gio::AsyncResult>& result);

  
  /** This function will acquire a reference to the IdeContext that the object
   * is a part of. This is useful if you are going to be doing a long running
   * task (such as something in a thread) and want to ensure the context cannot
   * be unloaded during your operation.
   * 
   * You should call ide_object_release() an equivalent number of times to
   * ensure the context may be freed afterwards.
   * 
   * You should check the return value of this function to ensure that the
   * context is not already in shutdown.
   * 
   * @return <tt>true</tt> if a hold was successfully created.
   */
  bool hold();
  
  /** Releases a successful hold on the context previously created with ide_object_hold().
   */
  void release();
  
  void notify_in_main(GParamSpec * pspec);

  
  /**
   * @par Slot Prototype:
   * <tt>void on_my_%destroy()</tt>
   *
   */

  Glib::SignalProxy< void > signal_destroy();


public:

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

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

  //Default Signal Handlers::
  /// This is a default handler for the signal signal_destroy().
  virtual void on_destroy();


};

}


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::Object
   */
  Glib::RefPtr<Ide::Object> wrap(IdeObject* object, bool take_copy = false);
}


#endif /* _IDEMM_OBJECT_H */

