/* Copyright (C) 2020 The gtkmm Development Team
 *
 * This library is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Lesser General Public
 * License as published by the Free Software Foundation; either
 * version 2.1 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
 * Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public
 * License along with this library. If not, see <http://www.gnu.org/licenses/>.
 */

#include <gtkmm/widget.h>
_DEFS(gtkmm,gtk)
_PINCLUDE(gtkmm/private/widget_p.h)

namespace Gtk
{

/** A titlebar area widget.
 *
 * %Gtk::WindowHandle is a titlebar area widget. When added into a window, it can
 * be dragged to move the window, and handles right click, double click and
 * middle click as expected of a titlebar.
 *
 * @see Gtk::Window, Gtk::HeaderBar
 *
 * @ingroup Containers
 * @newin{3,98}
 */
class GTKMM_API WindowHandle : public Widget
{
  _CLASS_GTKOBJECT(WindowHandle, GtkWindowHandle, GTK_WINDOW_HANDLE, Gtk::Widget, GtkWidget, , , GTKMM_API)
  _DO_NOT_DERIVE_GTYPE dnl// GtkWindowHandle is a final type
  _ABI_AS_WITH_DERIVED_GTYPE dnl// Remove when we can break ABI
  _STRUCT_NOT_HIDDEN

public:
  /** Create a new %WindowHandle widget.
   */
  _CTOR_DEFAULT

  _WRAP_METHOD(void set_child(Widget& child), gtk_window_handle_set_child)
  void unset_child();
  _WRAP_METHOD(Widget* get_child(), gtk_window_handle_get_child)
  _WRAP_METHOD(const Widget* get_child() const, gtk_window_handle_get_child, constversion)

  _WRAP_PROPERTY("child", Widget*)

  // Gtk::WindowHandle has no signals nor vfuncs.
};

} // namespace Gtk
