{- |
Copyright  : Will Thompson, Iñaki García Etxebarria and Jonas Platte
License    : LGPL-2.1
Maintainer : Iñaki García Etxebarria (garetxe@gmail.com)

GtkWidget is the base class all widgets in GTK+ derive from. It manages the
widget lifecycle, states and style.

# Height-for-width Geometry Management # {@/geometry/@-management}

GTK+ uses a height-for-width (and width-for-height) geometry management
system. Height-for-width means that a widget can change how much
vertical space it needs, depending on the amount of horizontal space
that it is given (and similar for width-for-height). The most common
example is a label that reflows to fill up the available width, wraps
to fewer lines, and therefore needs less height.

Height-for-width geometry management is implemented in GTK+ by way
of five virtual methods:

* 'GI.Gtk.Structs.WidgetClass.WidgetClass'.@/get_request_mode/@()
* 'GI.Gtk.Structs.WidgetClass.WidgetClass'.@/get_preferred_width/@()
* 'GI.Gtk.Structs.WidgetClass.WidgetClass'.@/get_preferred_height/@()
* 'GI.Gtk.Structs.WidgetClass.WidgetClass'.@/get_preferred_height_for_width/@()
* 'GI.Gtk.Structs.WidgetClass.WidgetClass'.@/get_preferred_width_for_height/@()
* 'GI.Gtk.Structs.WidgetClass.WidgetClass'.@/get_preferred_height_and_baseline_for_width/@()


There are some important things to keep in mind when implementing
height-for-width and when using it in container implementations.

The geometry management system will query a widget hierarchy in
only one orientation at a time. When widgets are initially queried
for their minimum sizes it is generally done in two initial passes
in the 'GI.Gtk.Enums.SizeRequestMode' chosen by the toplevel.

For example, when queried in the normal
'GI.Gtk.Enums.SizeRequestModeHeightForWidth' mode:
First, the default minimum and natural width for each widget
in the interface will be computed using 'GI.Gtk.Objects.Widget.widgetGetPreferredWidth'.
Because the preferred widths for each container depend on the preferred
widths of their children, this information propagates up the hierarchy,
and finally a minimum and natural width is determined for the entire
toplevel. Next, the toplevel will use the minimum width to query for the
minimum height contextual to that width using
'GI.Gtk.Objects.Widget.widgetGetPreferredHeightForWidth', which will also be a highly
recursive operation. The minimum height for the minimum width is normally
used to set the minimum size constraint on the toplevel
(unless 'GI.Gtk.Objects.Window.windowSetGeometryHints' is explicitly used instead).

After the toplevel window has initially requested its size in both
dimensions it can go on to allocate itself a reasonable size (or a size
previously specified with 'GI.Gtk.Objects.Window.windowSetDefaultSize'). During the
recursive allocation process it’s important to note that request cycles
will be recursively executed while container widgets allocate their children.
Each container widget, once allocated a size, will go on to first share the
space in one orientation among its children and then request each child\'s
height for its target allocated width or its width for allocated height,
depending. In this way a 'GI.Gtk.Objects.Widget.Widget' will typically be requested its size
a number of times before actually being allocated a size. The size a
widget is finally allocated can of course differ from the size it has
requested. For this reason, 'GI.Gtk.Objects.Widget.Widget' caches a  small number of results
to avoid re-querying for the same sizes in one allocation cycle.

See
[GtkContainer’s geometry management section][container-geometry-management]
to learn more about how height-for-width allocations are performed
by container widgets.

If a widget does move content around to intelligently use up the
allocated size then it must support the request in both
@/GtkSizeRequestModes/@ even if the widget in question only
trades sizes in a single orientation.

For instance, a 'GI.Gtk.Objects.Label.Label' that does height-for-width word wrapping
will not expect to have 'GI.Gtk.Structs.WidgetClass.WidgetClass'.@/get_preferred_height/@() called
because that call is specific to a width-for-height request. In this
case the label must return the height required for its own minimum
possible width. By following this rule any widget that handles
height-for-width or width-for-height requests will always be allocated
at least enough space to fit its own content.

Here are some examples of how a 'GI.Gtk.Enums.SizeRequestModeHeightForWidth' widget
generally deals with width-for-height requests, for 'GI.Gtk.Structs.WidgetClass.WidgetClass'.@/get_preferred_height/@()
it will do:


=== /C code/
>
>static void
>foo_widget_get_preferred_height (GtkWidget *widget,
>                                 gint *min_height,
>                                 gint *nat_height)
>{
>   if (i_am_in_height_for_width_mode)
>     {
>       gint min_width, nat_width;
>
>       GTK_WIDGET_GET_CLASS (widget)->get_preferred_width (widget,
>                                                           &min_width,
>                                                           &nat_width);
>       GTK_WIDGET_GET_CLASS (widget)->get_preferred_height_for_width
>                                                          (widget,
>                                                           min_width,
>                                                           min_height,
>                                                           nat_height);
>     }
>   else
>     {
>        ... some widgets do both. For instance, if a GtkLabel is
>        rotated to 90 degrees it will return the minimum and
>        natural height for the rotated label here.
>     }
>}


And in 'GI.Gtk.Structs.WidgetClass.WidgetClass'.@/get_preferred_width_for_height/@() it will simply return
the minimum and natural width:

=== /C code/
>
>static void
>foo_widget_get_preferred_width_for_height (GtkWidget *widget,
>                                           gint for_height,
>                                           gint *min_width,
>                                           gint *nat_width)
>{
>   if (i_am_in_height_for_width_mode)
>     {
>       GTK_WIDGET_GET_CLASS (widget)->get_preferred_width (widget,
>                                                           min_width,
>                                                           nat_width);
>     }
>   else
>     {
>        ... again if a widget is sometimes operating in
>        width-for-height mode (like a rotated GtkLabel) it can go
>        ahead and do its real width for height calculation here.
>     }
>}


Often a widget needs to get its own request during size request or
allocation. For example, when computing height it may need to also
compute width. Or when deciding how to use an allocation, the widget
may need to know its natural size. In these cases, the widget should
be careful to call its virtual methods directly, like this:


=== /C code/
>
>GTK_WIDGET_GET_CLASS(widget)->get_preferred_width (widget,
>                                                   &min,
>                                                   &natural);


It will not work to use the wrapper functions, such as
'GI.Gtk.Objects.Widget.widgetGetPreferredWidth' inside your own size request
implementation. These return a request adjusted by 'GI.Gtk.Objects.SizeGroup.SizeGroup'
and by the 'GI.Gtk.Structs.WidgetClass.WidgetClass'.@/adjust_size_request/@() virtual method. If a
widget used the wrappers inside its virtual method implementations,
then the adjustments (such as widget margins) would be applied
twice. GTK+ therefore does not allow this and will warn if you try
to do it.

Of course if you are getting the size request for
another widget, such as a child of a
container, you must use the wrapper APIs.
Otherwise, you would not properly consider widget margins,
'GI.Gtk.Objects.SizeGroup.SizeGroup', and so forth.

Since 3.10 GTK+ also supports baseline vertical alignment of widgets. This
means that widgets are positioned such that the typographical baseline of
widgets in the same row are aligned. This happens if a widget supports baselines,
has a vertical alignment of 'GI.Gtk.Enums.AlignBaseline', and is inside a container
that supports baselines and has a natural “row” that it aligns to the baseline,
or a baseline assigned to it by the grandparent.

Baseline alignment support for a widget is done by the 'GI.Gtk.Structs.WidgetClass.WidgetClass'.@/get_preferred_height_and_baseline_for_width/@()
virtual function. It allows you to report a baseline in combination with the
minimum and natural height. If there is no baseline you can return -1 to indicate
this. The default implementation of this virtual function calls into the
'GI.Gtk.Structs.WidgetClass.WidgetClass'.@/get_preferred_height/@() and 'GI.Gtk.Structs.WidgetClass.WidgetClass'.@/get_preferred_height_for_width/@(),
so if baselines are not supported it doesn’t need to be implemented.

If a widget ends up baseline aligned it will be allocated all the space in the parent
as if it was 'GI.Gtk.Enums.AlignFill', but the selected baseline can be found via 'GI.Gtk.Objects.Widget.widgetGetAllocatedBaseline'.
If this has a value other than -1 you need to align the widget such that the baseline
appears at the position.

= Style Properties

'GI.Gtk.Objects.Widget.Widget' introduces “style
properties” - these are basically object properties that are stored
not on the object, but in the style object associated to the widget. Style
properties are set in [resource files][gtk3-Resource-Files].
This mechanism is used for configuring such things as the location of the
scrollbar arrows through the theme, giving theme authors more control over the
look of applications without the need to write a theme engine in C.

Use 'GI.Gtk.Structs.WidgetClass.widgetClassInstallStyleProperty' to install style properties for
a widget class, 'GI.Gtk.Structs.WidgetClass.widgetClassFindStyleProperty' or
'GI.Gtk.Structs.WidgetClass.widgetClassListStyleProperties' to get information about existing
style properties and 'GI.Gtk.Objects.Widget.widgetStyleGetProperty', @/gtk_widget_style_get()/@ or
@/gtk_widget_style_get_valist()/@ to obtain the value of a style property.

= GtkWidget as GtkBuildable

The GtkWidget implementation of the GtkBuildable interface supports a
custom \<accelerator> element, which has attributes named ”key”, ”modifiers”
and ”signal” and allows to specify accelerators.

An example of a UI definition fragment specifying an accelerator:
>
><object class="GtkButton">
>  <accelerator key="q" modifiers="GDK_CONTROL_MASK" signal="clicked"/>
></object>


In addition to accelerators, GtkWidget also support a custom \<accessible>
element, which supports actions and relations. Properties on the accessible
implementation of an object can be set by accessing the internal child
“accessible” of a 'GI.Gtk.Objects.Widget.Widget'.

An example of a UI definition fragment specifying an accessible:
>
><object class="GtkLabel" id="label1"/>
>  <property name="label">I am a Label for a Button</property>
></object>
><object class="GtkButton" id="button1">
>  <accessibility>
>    <action action_name="click" translatable="yes">Click the button.</action>
>    <relation target="label1" type="labelled-by"/>
>  </accessibility>
>  <child internal-child="accessible">
>    <object class="AtkObject" id="a11y-button1">
>      <property name="accessible-name">Clickable Button</property>
>    </object>
>  </child>
></object>


Finally, GtkWidget allows style information such as style classes to
be associated with widgets, using the custom \<style> element:
>
><object class="GtkButton" id="button1">
>  <style>
>    <class name="my-special-button-class"/>
>    <class name="dark-button"/>
>  </style>
></object>


# Building composite widgets from template XML ## {@/composite/@-templates}

GtkWidget exposes some facilities to automate the procedure
of creating composite widgets using 'GI.Gtk.Objects.Builder.Builder' interface description
language.

To create composite widgets with 'GI.Gtk.Objects.Builder.Builder' XML, one must associate
the interface description with the widget class at class initialization
time using 'GI.Gtk.Structs.WidgetClass.widgetClassSetTemplate'.

The interface description semantics expected in composite template descriptions
is slightly different from regular 'GI.Gtk.Objects.Builder.Builder' XML.

Unlike regular interface descriptions, 'GI.Gtk.Structs.WidgetClass.widgetClassSetTemplate' will
expect a \<template> tag as a direct child of the toplevel \<interface>
tag. The \<template> tag must specify the “class” attribute which must be
the type name of the widget. Optionally, the “parent” attribute may be
specified to specify the direct parent type of the widget type, this is
ignored by the GtkBuilder but required for Glade to introspect what kind
of properties and internal children exist for a given type when the actual
type does not exist.

The XML which is contained inside the \<template> tag behaves as if it were
added to the \<object> tag defining /@widget@/ itself. You may set properties
on /@widget@/ by inserting \<property> tags into the \<template> tag, and also
add \<child> tags to add children and extend /@widget@/ in the normal way you
would with \<object> tags.

Additionally, \<object> tags can also be added before and after the initial
\<template> tag in the normal way, allowing one to define auxiliary objects
which might be referenced by other widgets declared as children of the
\<template> tag.

An example of a GtkBuilder Template Definition:
>
><interface>
>  <template class="FooWidget" parent="GtkBox">
>    <property name="orientation">GTK_ORIENTATION_HORIZONTAL</property>
>    <property name="spacing">4</property>
>    <child>
>      <object class="GtkButton" id="hello_button">
>        <property name="label">Hello World</property>
>        <signal name="clicked" handler="hello_button_clicked" object="FooWidget" swapped="yes"/>
>      </object>
>    </child>
>    <child>
>      <object class="GtkButton" id="goodbye_button">
>        <property name="label">Goodbye World</property>
>      </object>
>    </child>
>  </template>
></interface>


Typically, you\'ll place the template fragment into a file that is
bundled with your project, using 'GI.Gio.Structs.Resource.Resource'. In order to load the
template, you need to call 'GI.Gtk.Structs.WidgetClass.widgetClassSetTemplateFromResource'
from the class initialization of your 'GI.Gtk.Objects.Widget.Widget' type:


=== /C code/
>
>static void
>foo_widget_class_init (FooWidgetClass *klass)
>{
>  // ...
>
>  gtk_widget_class_set_template_from_resource (GTK_WIDGET_CLASS (klass),
>                                               "/com/example/ui/foowidget.ui");
>}


You will also need to call 'GI.Gtk.Objects.Widget.widgetInitTemplate' from the instance
initialization function:


=== /C code/
>
>static void
>foo_widget_init (FooWidget *self)
>{
>  // ...
>  gtk_widget_init_template (GTK_WIDGET (self));
>}


You can access widgets defined in the template using the
'GI.Gtk.Objects.Widget.widgetGetTemplateChild' function, but you will typically declare
a pointer in the instance private data structure of your type using the same
name as the widget in the template definition, and call
@/gtk_widget_class_bind_template_child_private()/@ with that name, e.g.


=== /C code/
>
>typedef struct {
>  GtkWidget *hello_button;
>  GtkWidget *goodbye_button;
>} FooWidgetPrivate;
>
>G_DEFINE_TYPE_WITH_PRIVATE (FooWidget, foo_widget, GTK_TYPE_BOX)
>
>static void
>foo_widget_class_init (FooWidgetClass *klass)
>{
>  // ...
>  gtk_widget_class_set_template_from_resource (GTK_WIDGET_CLASS (klass),
>                                               "/com/example/ui/foowidget.ui");
>  gtk_widget_class_bind_template_child_private (GTK_WIDGET_CLASS (klass),
>                                                FooWidget, hello_button);
>  gtk_widget_class_bind_template_child_private (GTK_WIDGET_CLASS (klass),
>                                                FooWidget, goodbye_button);
>}
>
>static void
>foo_widget_init (FooWidget *widget)
>{
>
>}


You can also use @/gtk_widget_class_bind_template_callback()/@ to connect a signal
callback defined in the template with a function visible in the scope of the
class, e.g.


=== /C code/
>
>// the signal handler has the instance and user data swapped
>// because of the swapped="yes" attribute in the template XML
>static void
>hello_button_clicked (FooWidget *self,
>                      GtkButton *button)
>{
>  g_print ("Hello, world!\n");
>}
>
>static void
>foo_widget_class_init (FooWidgetClass *klass)
>{
>  // ...
>  gtk_widget_class_set_template_from_resource (GTK_WIDGET_CLASS (klass),
>                                               "/com/example/ui/foowidget.ui");
>  gtk_widget_class_bind_template_callback (GTK_WIDGET_CLASS (klass), hello_button_clicked);
>}

-}

#define ENABLE_OVERLOADING (MIN_VERSION_haskell_gi_overloading(1,0,0) \
       && !defined(__HADDOCK_VERSION__))

module GI.Gtk.Objects.Widget
    (

-- * Exported types
    Widget(..)                              ,
    IsWidget                                ,
    toWidget                                ,
    noWidget                                ,


 -- * Methods
-- ** activate #method:activate#

#if ENABLE_OVERLOADING
    WidgetActivateMethodInfo                ,
#endif
    widgetActivate                          ,


-- ** addAccelerator #method:addAccelerator#

#if ENABLE_OVERLOADING
    WidgetAddAcceleratorMethodInfo          ,
#endif
    widgetAddAccelerator                    ,


-- ** addDeviceEvents #method:addDeviceEvents#

#if ENABLE_OVERLOADING
    WidgetAddDeviceEventsMethodInfo         ,
#endif
    widgetAddDeviceEvents                   ,


-- ** addEvents #method:addEvents#

#if ENABLE_OVERLOADING
    WidgetAddEventsMethodInfo               ,
#endif
    widgetAddEvents                         ,


-- ** addMnemonicLabel #method:addMnemonicLabel#

#if ENABLE_OVERLOADING
    WidgetAddMnemonicLabelMethodInfo        ,
#endif
    widgetAddMnemonicLabel                  ,


-- ** addTickCallback #method:addTickCallback#

#if ENABLE_OVERLOADING
    WidgetAddTickCallbackMethodInfo         ,
#endif
    widgetAddTickCallback                   ,


-- ** canActivateAccel #method:canActivateAccel#

#if ENABLE_OVERLOADING
    WidgetCanActivateAccelMethodInfo        ,
#endif
    widgetCanActivateAccel                  ,


-- ** childFocus #method:childFocus#

#if ENABLE_OVERLOADING
    WidgetChildFocusMethodInfo              ,
#endif
    widgetChildFocus                        ,


-- ** childNotify #method:childNotify#

#if ENABLE_OVERLOADING
    WidgetChildNotifyMethodInfo             ,
#endif
    widgetChildNotify                       ,


-- ** classPath #method:classPath#

#if ENABLE_OVERLOADING
    WidgetClassPathMethodInfo               ,
#endif
    widgetClassPath                         ,


-- ** computeExpand #method:computeExpand#

#if ENABLE_OVERLOADING
    WidgetComputeExpandMethodInfo           ,
#endif
    widgetComputeExpand                     ,


-- ** createPangoContext #method:createPangoContext#

#if ENABLE_OVERLOADING
    WidgetCreatePangoContextMethodInfo      ,
#endif
    widgetCreatePangoContext                ,


-- ** createPangoLayout #method:createPangoLayout#

#if ENABLE_OVERLOADING
    WidgetCreatePangoLayoutMethodInfo       ,
#endif
    widgetCreatePangoLayout                 ,


-- ** destroy #method:destroy#

#if ENABLE_OVERLOADING
    WidgetDestroyMethodInfo                 ,
#endif
    widgetDestroy                           ,


-- ** destroyed #method:destroyed#

#if ENABLE_OVERLOADING
    WidgetDestroyedMethodInfo               ,
#endif
    widgetDestroyed                         ,


-- ** deviceIsShadowed #method:deviceIsShadowed#

#if ENABLE_OVERLOADING
    WidgetDeviceIsShadowedMethodInfo        ,
#endif
    widgetDeviceIsShadowed                  ,


-- ** dragBegin #method:dragBegin#

#if ENABLE_OVERLOADING
    WidgetDragBeginMethodInfo               ,
#endif
    widgetDragBegin                         ,


-- ** dragBeginWithCoordinates #method:dragBeginWithCoordinates#

#if ENABLE_OVERLOADING
    WidgetDragBeginWithCoordinatesMethodInfo,
#endif
    widgetDragBeginWithCoordinates          ,


-- ** dragCheckThreshold #method:dragCheckThreshold#

#if ENABLE_OVERLOADING
    WidgetDragCheckThresholdMethodInfo      ,
#endif
    widgetDragCheckThreshold                ,


-- ** dragDestAddImageTargets #method:dragDestAddImageTargets#

#if ENABLE_OVERLOADING
    WidgetDragDestAddImageTargetsMethodInfo ,
#endif
    widgetDragDestAddImageTargets           ,


-- ** dragDestAddTextTargets #method:dragDestAddTextTargets#

#if ENABLE_OVERLOADING
    WidgetDragDestAddTextTargetsMethodInfo  ,
#endif
    widgetDragDestAddTextTargets            ,


-- ** dragDestAddUriTargets #method:dragDestAddUriTargets#

#if ENABLE_OVERLOADING
    WidgetDragDestAddUriTargetsMethodInfo   ,
#endif
    widgetDragDestAddUriTargets             ,


-- ** dragDestFindTarget #method:dragDestFindTarget#

#if ENABLE_OVERLOADING
    WidgetDragDestFindTargetMethodInfo      ,
#endif
    widgetDragDestFindTarget                ,


-- ** dragDestGetTargetList #method:dragDestGetTargetList#

#if ENABLE_OVERLOADING
    WidgetDragDestGetTargetListMethodInfo   ,
#endif
    widgetDragDestGetTargetList             ,


-- ** dragDestGetTrackMotion #method:dragDestGetTrackMotion#

#if ENABLE_OVERLOADING
    WidgetDragDestGetTrackMotionMethodInfo  ,
#endif
    widgetDragDestGetTrackMotion            ,


-- ** dragDestSet #method:dragDestSet#

#if ENABLE_OVERLOADING
    WidgetDragDestSetMethodInfo             ,
#endif
    widgetDragDestSet                       ,


-- ** dragDestSetProxy #method:dragDestSetProxy#

#if ENABLE_OVERLOADING
    WidgetDragDestSetProxyMethodInfo        ,
#endif
    widgetDragDestSetProxy                  ,


-- ** dragDestSetTargetList #method:dragDestSetTargetList#

#if ENABLE_OVERLOADING
    WidgetDragDestSetTargetListMethodInfo   ,
#endif
    widgetDragDestSetTargetList             ,


-- ** dragDestSetTrackMotion #method:dragDestSetTrackMotion#

#if ENABLE_OVERLOADING
    WidgetDragDestSetTrackMotionMethodInfo  ,
#endif
    widgetDragDestSetTrackMotion            ,


-- ** dragDestUnset #method:dragDestUnset#

#if ENABLE_OVERLOADING
    WidgetDragDestUnsetMethodInfo           ,
#endif
    widgetDragDestUnset                     ,


-- ** dragGetData #method:dragGetData#

#if ENABLE_OVERLOADING
    WidgetDragGetDataMethodInfo             ,
#endif
    widgetDragGetData                       ,


-- ** dragHighlight #method:dragHighlight#

#if ENABLE_OVERLOADING
    WidgetDragHighlightMethodInfo           ,
#endif
    widgetDragHighlight                     ,


-- ** dragSourceAddImageTargets #method:dragSourceAddImageTargets#

#if ENABLE_OVERLOADING
    WidgetDragSourceAddImageTargetsMethodInfo,
#endif
    widgetDragSourceAddImageTargets         ,


-- ** dragSourceAddTextTargets #method:dragSourceAddTextTargets#

#if ENABLE_OVERLOADING
    WidgetDragSourceAddTextTargetsMethodInfo,
#endif
    widgetDragSourceAddTextTargets          ,


-- ** dragSourceAddUriTargets #method:dragSourceAddUriTargets#

#if ENABLE_OVERLOADING
    WidgetDragSourceAddUriTargetsMethodInfo ,
#endif
    widgetDragSourceAddUriTargets           ,


-- ** dragSourceGetTargetList #method:dragSourceGetTargetList#

#if ENABLE_OVERLOADING
    WidgetDragSourceGetTargetListMethodInfo ,
#endif
    widgetDragSourceGetTargetList           ,


-- ** dragSourceSet #method:dragSourceSet#

#if ENABLE_OVERLOADING
    WidgetDragSourceSetMethodInfo           ,
#endif
    widgetDragSourceSet                     ,


-- ** dragSourceSetIconGicon #method:dragSourceSetIconGicon#

#if ENABLE_OVERLOADING
    WidgetDragSourceSetIconGiconMethodInfo  ,
#endif
    widgetDragSourceSetIconGicon            ,


-- ** dragSourceSetIconName #method:dragSourceSetIconName#

#if ENABLE_OVERLOADING
    WidgetDragSourceSetIconNameMethodInfo   ,
#endif
    widgetDragSourceSetIconName             ,


-- ** dragSourceSetIconPixbuf #method:dragSourceSetIconPixbuf#

#if ENABLE_OVERLOADING
    WidgetDragSourceSetIconPixbufMethodInfo ,
#endif
    widgetDragSourceSetIconPixbuf           ,


-- ** dragSourceSetIconStock #method:dragSourceSetIconStock#

#if ENABLE_OVERLOADING
    WidgetDragSourceSetIconStockMethodInfo  ,
#endif
    widgetDragSourceSetIconStock            ,


-- ** dragSourceSetTargetList #method:dragSourceSetTargetList#

#if ENABLE_OVERLOADING
    WidgetDragSourceSetTargetListMethodInfo ,
#endif
    widgetDragSourceSetTargetList           ,


-- ** dragSourceUnset #method:dragSourceUnset#

#if ENABLE_OVERLOADING
    WidgetDragSourceUnsetMethodInfo         ,
#endif
    widgetDragSourceUnset                   ,


-- ** dragUnhighlight #method:dragUnhighlight#

#if ENABLE_OVERLOADING
    WidgetDragUnhighlightMethodInfo         ,
#endif
    widgetDragUnhighlight                   ,


-- ** draw #method:draw#

#if ENABLE_OVERLOADING
    WidgetDrawMethodInfo                    ,
#endif
    widgetDraw                              ,


-- ** ensureStyle #method:ensureStyle#

#if ENABLE_OVERLOADING
    WidgetEnsureStyleMethodInfo             ,
#endif
    widgetEnsureStyle                       ,


-- ** errorBell #method:errorBell#

#if ENABLE_OVERLOADING
    WidgetErrorBellMethodInfo               ,
#endif
    widgetErrorBell                         ,


-- ** event #method:event#

#if ENABLE_OVERLOADING
    WidgetEventMethodInfo                   ,
#endif
    widgetEvent                             ,


-- ** freezeChildNotify #method:freezeChildNotify#

#if ENABLE_OVERLOADING
    WidgetFreezeChildNotifyMethodInfo       ,
#endif
    widgetFreezeChildNotify                 ,


-- ** getAccessible #method:getAccessible#

#if ENABLE_OVERLOADING
    WidgetGetAccessibleMethodInfo           ,
#endif
    widgetGetAccessible                     ,


-- ** getActionGroup #method:getActionGroup#

#if ENABLE_OVERLOADING
    WidgetGetActionGroupMethodInfo          ,
#endif
    widgetGetActionGroup                    ,


-- ** getAllocatedBaseline #method:getAllocatedBaseline#

#if ENABLE_OVERLOADING
    WidgetGetAllocatedBaselineMethodInfo    ,
#endif
    widgetGetAllocatedBaseline              ,


-- ** getAllocatedHeight #method:getAllocatedHeight#

#if ENABLE_OVERLOADING
    WidgetGetAllocatedHeightMethodInfo      ,
#endif
    widgetGetAllocatedHeight                ,


-- ** getAllocatedSize #method:getAllocatedSize#

#if ENABLE_OVERLOADING
    WidgetGetAllocatedSizeMethodInfo        ,
#endif
    widgetGetAllocatedSize                  ,


-- ** getAllocatedWidth #method:getAllocatedWidth#

#if ENABLE_OVERLOADING
    WidgetGetAllocatedWidthMethodInfo       ,
#endif
    widgetGetAllocatedWidth                 ,


-- ** getAllocation #method:getAllocation#

#if ENABLE_OVERLOADING
    WidgetGetAllocationMethodInfo           ,
#endif
    widgetGetAllocation                     ,


-- ** getAncestor #method:getAncestor#

#if ENABLE_OVERLOADING
    WidgetGetAncestorMethodInfo             ,
#endif
    widgetGetAncestor                       ,


-- ** getAppPaintable #method:getAppPaintable#

#if ENABLE_OVERLOADING
    WidgetGetAppPaintableMethodInfo         ,
#endif
    widgetGetAppPaintable                   ,


-- ** getCanDefault #method:getCanDefault#

#if ENABLE_OVERLOADING
    WidgetGetCanDefaultMethodInfo           ,
#endif
    widgetGetCanDefault                     ,


-- ** getCanFocus #method:getCanFocus#

#if ENABLE_OVERLOADING
    WidgetGetCanFocusMethodInfo             ,
#endif
    widgetGetCanFocus                       ,


-- ** getChildRequisition #method:getChildRequisition#

#if ENABLE_OVERLOADING
    WidgetGetChildRequisitionMethodInfo     ,
#endif
    widgetGetChildRequisition               ,


-- ** getChildVisible #method:getChildVisible#

#if ENABLE_OVERLOADING
    WidgetGetChildVisibleMethodInfo         ,
#endif
    widgetGetChildVisible                   ,


-- ** getClip #method:getClip#

#if ENABLE_OVERLOADING
    WidgetGetClipMethodInfo                 ,
#endif
    widgetGetClip                           ,


-- ** getClipboard #method:getClipboard#

#if ENABLE_OVERLOADING
    WidgetGetClipboardMethodInfo            ,
#endif
    widgetGetClipboard                      ,


-- ** getCompositeName #method:getCompositeName#

#if ENABLE_OVERLOADING
    WidgetGetCompositeNameMethodInfo        ,
#endif
    widgetGetCompositeName                  ,


-- ** getDefaultDirection #method:getDefaultDirection#

    widgetGetDefaultDirection               ,


-- ** getDefaultStyle #method:getDefaultStyle#

    widgetGetDefaultStyle                   ,


-- ** getDeviceEnabled #method:getDeviceEnabled#

#if ENABLE_OVERLOADING
    WidgetGetDeviceEnabledMethodInfo        ,
#endif
    widgetGetDeviceEnabled                  ,


-- ** getDeviceEvents #method:getDeviceEvents#

#if ENABLE_OVERLOADING
    WidgetGetDeviceEventsMethodInfo         ,
#endif
    widgetGetDeviceEvents                   ,


-- ** getDirection #method:getDirection#

#if ENABLE_OVERLOADING
    WidgetGetDirectionMethodInfo            ,
#endif
    widgetGetDirection                      ,


-- ** getDisplay #method:getDisplay#

#if ENABLE_OVERLOADING
    WidgetGetDisplayMethodInfo              ,
#endif
    widgetGetDisplay                        ,


-- ** getDoubleBuffered #method:getDoubleBuffered#

#if ENABLE_OVERLOADING
    WidgetGetDoubleBufferedMethodInfo       ,
#endif
    widgetGetDoubleBuffered                 ,


-- ** getEvents #method:getEvents#

#if ENABLE_OVERLOADING
    WidgetGetEventsMethodInfo               ,
#endif
    widgetGetEvents                         ,


-- ** getFocusOnClick #method:getFocusOnClick#

#if ENABLE_OVERLOADING
    WidgetGetFocusOnClickMethodInfo         ,
#endif
    widgetGetFocusOnClick                   ,


-- ** getFontMap #method:getFontMap#

#if ENABLE_OVERLOADING
    WidgetGetFontMapMethodInfo              ,
#endif
    widgetGetFontMap                        ,


-- ** getFontOptions #method:getFontOptions#

#if ENABLE_OVERLOADING
    WidgetGetFontOptionsMethodInfo          ,
#endif
    widgetGetFontOptions                    ,


-- ** getFrameClock #method:getFrameClock#

#if ENABLE_OVERLOADING
    WidgetGetFrameClockMethodInfo           ,
#endif
    widgetGetFrameClock                     ,


-- ** getHalign #method:getHalign#

#if ENABLE_OVERLOADING
    WidgetGetHalignMethodInfo               ,
#endif
    widgetGetHalign                         ,


-- ** getHasTooltip #method:getHasTooltip#

#if ENABLE_OVERLOADING
    WidgetGetHasTooltipMethodInfo           ,
#endif
    widgetGetHasTooltip                     ,


-- ** getHasWindow #method:getHasWindow#

#if ENABLE_OVERLOADING
    WidgetGetHasWindowMethodInfo            ,
#endif
    widgetGetHasWindow                      ,


-- ** getHexpand #method:getHexpand#

#if ENABLE_OVERLOADING
    WidgetGetHexpandMethodInfo              ,
#endif
    widgetGetHexpand                        ,


-- ** getHexpandSet #method:getHexpandSet#

#if ENABLE_OVERLOADING
    WidgetGetHexpandSetMethodInfo           ,
#endif
    widgetGetHexpandSet                     ,


-- ** getMapped #method:getMapped#

#if ENABLE_OVERLOADING
    WidgetGetMappedMethodInfo               ,
#endif
    widgetGetMapped                         ,


-- ** getMarginBottom #method:getMarginBottom#

#if ENABLE_OVERLOADING
    WidgetGetMarginBottomMethodInfo         ,
#endif
    widgetGetMarginBottom                   ,


-- ** getMarginEnd #method:getMarginEnd#

#if ENABLE_OVERLOADING
    WidgetGetMarginEndMethodInfo            ,
#endif
    widgetGetMarginEnd                      ,


-- ** getMarginLeft #method:getMarginLeft#

#if ENABLE_OVERLOADING
    WidgetGetMarginLeftMethodInfo           ,
#endif
    widgetGetMarginLeft                     ,


-- ** getMarginRight #method:getMarginRight#

#if ENABLE_OVERLOADING
    WidgetGetMarginRightMethodInfo          ,
#endif
    widgetGetMarginRight                    ,


-- ** getMarginStart #method:getMarginStart#

#if ENABLE_OVERLOADING
    WidgetGetMarginStartMethodInfo          ,
#endif
    widgetGetMarginStart                    ,


-- ** getMarginTop #method:getMarginTop#

#if ENABLE_OVERLOADING
    WidgetGetMarginTopMethodInfo            ,
#endif
    widgetGetMarginTop                      ,


-- ** getModifierMask #method:getModifierMask#

#if ENABLE_OVERLOADING
    WidgetGetModifierMaskMethodInfo         ,
#endif
    widgetGetModifierMask                   ,


-- ** getModifierStyle #method:getModifierStyle#

#if ENABLE_OVERLOADING
    WidgetGetModifierStyleMethodInfo        ,
#endif
    widgetGetModifierStyle                  ,


-- ** getName #method:getName#

#if ENABLE_OVERLOADING
    WidgetGetNameMethodInfo                 ,
#endif
    widgetGetName                           ,


-- ** getNoShowAll #method:getNoShowAll#

#if ENABLE_OVERLOADING
    WidgetGetNoShowAllMethodInfo            ,
#endif
    widgetGetNoShowAll                      ,


-- ** getOpacity #method:getOpacity#

#if ENABLE_OVERLOADING
    WidgetGetOpacityMethodInfo              ,
#endif
    widgetGetOpacity                        ,


-- ** getPangoContext #method:getPangoContext#

#if ENABLE_OVERLOADING
    WidgetGetPangoContextMethodInfo         ,
#endif
    widgetGetPangoContext                   ,


-- ** getParent #method:getParent#

#if ENABLE_OVERLOADING
    WidgetGetParentMethodInfo               ,
#endif
    widgetGetParent                         ,


-- ** getParentWindow #method:getParentWindow#

#if ENABLE_OVERLOADING
    WidgetGetParentWindowMethodInfo         ,
#endif
    widgetGetParentWindow                   ,


-- ** getPath #method:getPath#

#if ENABLE_OVERLOADING
    WidgetGetPathMethodInfo                 ,
#endif
    widgetGetPath                           ,


-- ** getPointer #method:getPointer#

#if ENABLE_OVERLOADING
    WidgetGetPointerMethodInfo              ,
#endif
    widgetGetPointer                        ,


-- ** getPreferredHeight #method:getPreferredHeight#

#if ENABLE_OVERLOADING
    WidgetGetPreferredHeightMethodInfo      ,
#endif
    widgetGetPreferredHeight                ,


-- ** getPreferredHeightAndBaselineForWidth #method:getPreferredHeightAndBaselineForWidth#

#if ENABLE_OVERLOADING
    WidgetGetPreferredHeightAndBaselineForWidthMethodInfo,
#endif
    widgetGetPreferredHeightAndBaselineForWidth,


-- ** getPreferredHeightForWidth #method:getPreferredHeightForWidth#

#if ENABLE_OVERLOADING
    WidgetGetPreferredHeightForWidthMethodInfo,
#endif
    widgetGetPreferredHeightForWidth        ,


-- ** getPreferredSize #method:getPreferredSize#

#if ENABLE_OVERLOADING
    WidgetGetPreferredSizeMethodInfo        ,
#endif
    widgetGetPreferredSize                  ,


-- ** getPreferredWidth #method:getPreferredWidth#

#if ENABLE_OVERLOADING
    WidgetGetPreferredWidthMethodInfo       ,
#endif
    widgetGetPreferredWidth                 ,


-- ** getPreferredWidthForHeight #method:getPreferredWidthForHeight#

#if ENABLE_OVERLOADING
    WidgetGetPreferredWidthForHeightMethodInfo,
#endif
    widgetGetPreferredWidthForHeight        ,


-- ** getRealized #method:getRealized#

#if ENABLE_OVERLOADING
    WidgetGetRealizedMethodInfo             ,
#endif
    widgetGetRealized                       ,


-- ** getReceivesDefault #method:getReceivesDefault#

#if ENABLE_OVERLOADING
    WidgetGetReceivesDefaultMethodInfo      ,
#endif
    widgetGetReceivesDefault                ,


-- ** getRequestMode #method:getRequestMode#

#if ENABLE_OVERLOADING
    WidgetGetRequestModeMethodInfo          ,
#endif
    widgetGetRequestMode                    ,


-- ** getRequisition #method:getRequisition#

#if ENABLE_OVERLOADING
    WidgetGetRequisitionMethodInfo          ,
#endif
    widgetGetRequisition                    ,


-- ** getRootWindow #method:getRootWindow#

#if ENABLE_OVERLOADING
    WidgetGetRootWindowMethodInfo           ,
#endif
    widgetGetRootWindow                     ,


-- ** getScaleFactor #method:getScaleFactor#

#if ENABLE_OVERLOADING
    WidgetGetScaleFactorMethodInfo          ,
#endif
    widgetGetScaleFactor                    ,


-- ** getScreen #method:getScreen#

#if ENABLE_OVERLOADING
    WidgetGetScreenMethodInfo               ,
#endif
    widgetGetScreen                         ,


-- ** getSensitive #method:getSensitive#

#if ENABLE_OVERLOADING
    WidgetGetSensitiveMethodInfo            ,
#endif
    widgetGetSensitive                      ,


-- ** getSettings #method:getSettings#

#if ENABLE_OVERLOADING
    WidgetGetSettingsMethodInfo             ,
#endif
    widgetGetSettings                       ,


-- ** getSizeRequest #method:getSizeRequest#

#if ENABLE_OVERLOADING
    WidgetGetSizeRequestMethodInfo          ,
#endif
    widgetGetSizeRequest                    ,


-- ** getState #method:getState#

#if ENABLE_OVERLOADING
    WidgetGetStateMethodInfo                ,
#endif
    widgetGetState                          ,


-- ** getStateFlags #method:getStateFlags#

#if ENABLE_OVERLOADING
    WidgetGetStateFlagsMethodInfo           ,
#endif
    widgetGetStateFlags                     ,


-- ** getStyle #method:getStyle#

#if ENABLE_OVERLOADING
    WidgetGetStyleMethodInfo                ,
#endif
    widgetGetStyle                          ,


-- ** getStyleContext #method:getStyleContext#

#if ENABLE_OVERLOADING
    WidgetGetStyleContextMethodInfo         ,
#endif
    widgetGetStyleContext                   ,


-- ** getSupportMultidevice #method:getSupportMultidevice#

#if ENABLE_OVERLOADING
    WidgetGetSupportMultideviceMethodInfo   ,
#endif
    widgetGetSupportMultidevice             ,


-- ** getTemplateChild #method:getTemplateChild#

#if ENABLE_OVERLOADING
    WidgetGetTemplateChildMethodInfo        ,
#endif
    widgetGetTemplateChild                  ,


-- ** getTooltipMarkup #method:getTooltipMarkup#

#if ENABLE_OVERLOADING
    WidgetGetTooltipMarkupMethodInfo        ,
#endif
    widgetGetTooltipMarkup                  ,


-- ** getTooltipText #method:getTooltipText#

#if ENABLE_OVERLOADING
    WidgetGetTooltipTextMethodInfo          ,
#endif
    widgetGetTooltipText                    ,


-- ** getTooltipWindow #method:getTooltipWindow#

#if ENABLE_OVERLOADING
    WidgetGetTooltipWindowMethodInfo        ,
#endif
    widgetGetTooltipWindow                  ,


-- ** getToplevel #method:getToplevel#

#if ENABLE_OVERLOADING
    WidgetGetToplevelMethodInfo             ,
#endif
    widgetGetToplevel                       ,


-- ** getValign #method:getValign#

#if ENABLE_OVERLOADING
    WidgetGetValignMethodInfo               ,
#endif
    widgetGetValign                         ,


-- ** getValignWithBaseline #method:getValignWithBaseline#

#if ENABLE_OVERLOADING
    WidgetGetValignWithBaselineMethodInfo   ,
#endif
    widgetGetValignWithBaseline             ,


-- ** getVexpand #method:getVexpand#

#if ENABLE_OVERLOADING
    WidgetGetVexpandMethodInfo              ,
#endif
    widgetGetVexpand                        ,


-- ** getVexpandSet #method:getVexpandSet#

#if ENABLE_OVERLOADING
    WidgetGetVexpandSetMethodInfo           ,
#endif
    widgetGetVexpandSet                     ,


-- ** getVisible #method:getVisible#

#if ENABLE_OVERLOADING
    WidgetGetVisibleMethodInfo              ,
#endif
    widgetGetVisible                        ,


-- ** getVisual #method:getVisual#

#if ENABLE_OVERLOADING
    WidgetGetVisualMethodInfo               ,
#endif
    widgetGetVisual                         ,


-- ** getWindow #method:getWindow#

#if ENABLE_OVERLOADING
    WidgetGetWindowMethodInfo               ,
#endif
    widgetGetWindow                         ,


-- ** grabAdd #method:grabAdd#

#if ENABLE_OVERLOADING
    WidgetGrabAddMethodInfo                 ,
#endif
    widgetGrabAdd                           ,


-- ** grabDefault #method:grabDefault#

#if ENABLE_OVERLOADING
    WidgetGrabDefaultMethodInfo             ,
#endif
    widgetGrabDefault                       ,


-- ** grabFocus #method:grabFocus#

#if ENABLE_OVERLOADING
    WidgetGrabFocusMethodInfo               ,
#endif
    widgetGrabFocus                         ,


-- ** grabRemove #method:grabRemove#

#if ENABLE_OVERLOADING
    WidgetGrabRemoveMethodInfo              ,
#endif
    widgetGrabRemove                        ,


-- ** hasDefault #method:hasDefault#

#if ENABLE_OVERLOADING
    WidgetHasDefaultMethodInfo              ,
#endif
    widgetHasDefault                        ,


-- ** hasFocus #method:hasFocus#

#if ENABLE_OVERLOADING
    WidgetHasFocusMethodInfo                ,
#endif
    widgetHasFocus                          ,


-- ** hasGrab #method:hasGrab#

#if ENABLE_OVERLOADING
    WidgetHasGrabMethodInfo                 ,
#endif
    widgetHasGrab                           ,


-- ** hasRcStyle #method:hasRcStyle#

#if ENABLE_OVERLOADING
    WidgetHasRcStyleMethodInfo              ,
#endif
    widgetHasRcStyle                        ,


-- ** hasScreen #method:hasScreen#

#if ENABLE_OVERLOADING
    WidgetHasScreenMethodInfo               ,
#endif
    widgetHasScreen                         ,


-- ** hasVisibleFocus #method:hasVisibleFocus#

#if ENABLE_OVERLOADING
    WidgetHasVisibleFocusMethodInfo         ,
#endif
    widgetHasVisibleFocus                   ,


-- ** hide #method:hide#

#if ENABLE_OVERLOADING
    WidgetHideMethodInfo                    ,
#endif
    widgetHide                              ,


-- ** hideOnDelete #method:hideOnDelete#

#if ENABLE_OVERLOADING
    WidgetHideOnDeleteMethodInfo            ,
#endif
    widgetHideOnDelete                      ,


-- ** inDestruction #method:inDestruction#

#if ENABLE_OVERLOADING
    WidgetInDestructionMethodInfo           ,
#endif
    widgetInDestruction                     ,


-- ** initTemplate #method:initTemplate#

#if ENABLE_OVERLOADING
    WidgetInitTemplateMethodInfo            ,
#endif
    widgetInitTemplate                      ,


-- ** inputShapeCombineRegion #method:inputShapeCombineRegion#

#if ENABLE_OVERLOADING
    WidgetInputShapeCombineRegionMethodInfo ,
#endif
    widgetInputShapeCombineRegion           ,


-- ** insertActionGroup #method:insertActionGroup#

#if ENABLE_OVERLOADING
    WidgetInsertActionGroupMethodInfo       ,
#endif
    widgetInsertActionGroup                 ,


-- ** intersect #method:intersect#

#if ENABLE_OVERLOADING
    WidgetIntersectMethodInfo               ,
#endif
    widgetIntersect                         ,


-- ** isAncestor #method:isAncestor#

#if ENABLE_OVERLOADING
    WidgetIsAncestorMethodInfo              ,
#endif
    widgetIsAncestor                        ,


-- ** isComposited #method:isComposited#

#if ENABLE_OVERLOADING
    WidgetIsCompositedMethodInfo            ,
#endif
    widgetIsComposited                      ,


-- ** isDrawable #method:isDrawable#

#if ENABLE_OVERLOADING
    WidgetIsDrawableMethodInfo              ,
#endif
    widgetIsDrawable                        ,


-- ** isFocus #method:isFocus#

#if ENABLE_OVERLOADING
    WidgetIsFocusMethodInfo                 ,
#endif
    widgetIsFocus                           ,


-- ** isSensitive #method:isSensitive#

#if ENABLE_OVERLOADING
    WidgetIsSensitiveMethodInfo             ,
#endif
    widgetIsSensitive                       ,


-- ** isToplevel #method:isToplevel#

#if ENABLE_OVERLOADING
    WidgetIsToplevelMethodInfo              ,
#endif
    widgetIsToplevel                        ,


-- ** isVisible #method:isVisible#

#if ENABLE_OVERLOADING
    WidgetIsVisibleMethodInfo               ,
#endif
    widgetIsVisible                         ,


-- ** keynavFailed #method:keynavFailed#

#if ENABLE_OVERLOADING
    WidgetKeynavFailedMethodInfo            ,
#endif
    widgetKeynavFailed                      ,


-- ** listAccelClosures #method:listAccelClosures#

#if ENABLE_OVERLOADING
    WidgetListAccelClosuresMethodInfo       ,
#endif
    widgetListAccelClosures                 ,


-- ** listActionPrefixes #method:listActionPrefixes#

#if ENABLE_OVERLOADING
    WidgetListActionPrefixesMethodInfo      ,
#endif
    widgetListActionPrefixes                ,


-- ** listMnemonicLabels #method:listMnemonicLabels#

#if ENABLE_OVERLOADING
    WidgetListMnemonicLabelsMethodInfo      ,
#endif
    widgetListMnemonicLabels                ,


-- ** map #method:map#

#if ENABLE_OVERLOADING
    WidgetMapMethodInfo                     ,
#endif
    widgetMap                               ,


-- ** mnemonicActivate #method:mnemonicActivate#

#if ENABLE_OVERLOADING
    WidgetMnemonicActivateMethodInfo        ,
#endif
    widgetMnemonicActivate                  ,


-- ** modifyBase #method:modifyBase#

#if ENABLE_OVERLOADING
    WidgetModifyBaseMethodInfo              ,
#endif
    widgetModifyBase                        ,


-- ** modifyBg #method:modifyBg#

#if ENABLE_OVERLOADING
    WidgetModifyBgMethodInfo                ,
#endif
    widgetModifyBg                          ,


-- ** modifyCursor #method:modifyCursor#

#if ENABLE_OVERLOADING
    WidgetModifyCursorMethodInfo            ,
#endif
    widgetModifyCursor                      ,


-- ** modifyFg #method:modifyFg#

#if ENABLE_OVERLOADING
    WidgetModifyFgMethodInfo                ,
#endif
    widgetModifyFg                          ,


-- ** modifyFont #method:modifyFont#

#if ENABLE_OVERLOADING
    WidgetModifyFontMethodInfo              ,
#endif
    widgetModifyFont                        ,


-- ** modifyStyle #method:modifyStyle#

#if ENABLE_OVERLOADING
    WidgetModifyStyleMethodInfo             ,
#endif
    widgetModifyStyle                       ,


-- ** modifyText #method:modifyText#

#if ENABLE_OVERLOADING
    WidgetModifyTextMethodInfo              ,
#endif
    widgetModifyText                        ,


-- ** overrideBackgroundColor #method:overrideBackgroundColor#

#if ENABLE_OVERLOADING
    WidgetOverrideBackgroundColorMethodInfo ,
#endif
    widgetOverrideBackgroundColor           ,


-- ** overrideColor #method:overrideColor#

#if ENABLE_OVERLOADING
    WidgetOverrideColorMethodInfo           ,
#endif
    widgetOverrideColor                     ,


-- ** overrideCursor #method:overrideCursor#

#if ENABLE_OVERLOADING
    WidgetOverrideCursorMethodInfo          ,
#endif
    widgetOverrideCursor                    ,


-- ** overrideFont #method:overrideFont#

#if ENABLE_OVERLOADING
    WidgetOverrideFontMethodInfo            ,
#endif
    widgetOverrideFont                      ,


-- ** overrideSymbolicColor #method:overrideSymbolicColor#

#if ENABLE_OVERLOADING
    WidgetOverrideSymbolicColorMethodInfo   ,
#endif
    widgetOverrideSymbolicColor             ,


-- ** path #method:path#

#if ENABLE_OVERLOADING
    WidgetPathMethodInfo                    ,
#endif
    widgetPath                              ,


-- ** popCompositeChild #method:popCompositeChild#

    widgetPopCompositeChild                 ,


-- ** pushCompositeChild #method:pushCompositeChild#

    widgetPushCompositeChild                ,


-- ** queueAllocate #method:queueAllocate#

#if ENABLE_OVERLOADING
    WidgetQueueAllocateMethodInfo           ,
#endif
    widgetQueueAllocate                     ,


-- ** queueComputeExpand #method:queueComputeExpand#

#if ENABLE_OVERLOADING
    WidgetQueueComputeExpandMethodInfo      ,
#endif
    widgetQueueComputeExpand                ,


-- ** queueDraw #method:queueDraw#

#if ENABLE_OVERLOADING
    WidgetQueueDrawMethodInfo               ,
#endif
    widgetQueueDraw                         ,


-- ** queueDrawArea #method:queueDrawArea#

#if ENABLE_OVERLOADING
    WidgetQueueDrawAreaMethodInfo           ,
#endif
    widgetQueueDrawArea                     ,


-- ** queueDrawRegion #method:queueDrawRegion#

#if ENABLE_OVERLOADING
    WidgetQueueDrawRegionMethodInfo         ,
#endif
    widgetQueueDrawRegion                   ,


-- ** queueResize #method:queueResize#

#if ENABLE_OVERLOADING
    WidgetQueueResizeMethodInfo             ,
#endif
    widgetQueueResize                       ,


-- ** queueResizeNoRedraw #method:queueResizeNoRedraw#

#if ENABLE_OVERLOADING
    WidgetQueueResizeNoRedrawMethodInfo     ,
#endif
    widgetQueueResizeNoRedraw               ,


-- ** realize #method:realize#

#if ENABLE_OVERLOADING
    WidgetRealizeMethodInfo                 ,
#endif
    widgetRealize                           ,


-- ** regionIntersect #method:regionIntersect#

#if ENABLE_OVERLOADING
    WidgetRegionIntersectMethodInfo         ,
#endif
    widgetRegionIntersect                   ,


-- ** registerWindow #method:registerWindow#

#if ENABLE_OVERLOADING
    WidgetRegisterWindowMethodInfo          ,
#endif
    widgetRegisterWindow                    ,


-- ** removeAccelerator #method:removeAccelerator#

#if ENABLE_OVERLOADING
    WidgetRemoveAcceleratorMethodInfo       ,
#endif
    widgetRemoveAccelerator                 ,


-- ** removeMnemonicLabel #method:removeMnemonicLabel#

#if ENABLE_OVERLOADING
    WidgetRemoveMnemonicLabelMethodInfo     ,
#endif
    widgetRemoveMnemonicLabel               ,


-- ** removeTickCallback #method:removeTickCallback#

#if ENABLE_OVERLOADING
    WidgetRemoveTickCallbackMethodInfo      ,
#endif
    widgetRemoveTickCallback                ,


-- ** renderIcon #method:renderIcon#

#if ENABLE_OVERLOADING
    WidgetRenderIconMethodInfo              ,
#endif
    widgetRenderIcon                        ,


-- ** renderIconPixbuf #method:renderIconPixbuf#

#if ENABLE_OVERLOADING
    WidgetRenderIconPixbufMethodInfo        ,
#endif
    widgetRenderIconPixbuf                  ,


-- ** reparent #method:reparent#

#if ENABLE_OVERLOADING
    WidgetReparentMethodInfo                ,
#endif
    widgetReparent                          ,


-- ** resetRcStyles #method:resetRcStyles#

#if ENABLE_OVERLOADING
    WidgetResetRcStylesMethodInfo           ,
#endif
    widgetResetRcStyles                     ,


-- ** resetStyle #method:resetStyle#

#if ENABLE_OVERLOADING
    WidgetResetStyleMethodInfo              ,
#endif
    widgetResetStyle                        ,


-- ** sendExpose #method:sendExpose#

#if ENABLE_OVERLOADING
    WidgetSendExposeMethodInfo              ,
#endif
    widgetSendExpose                        ,


-- ** sendFocusChange #method:sendFocusChange#

#if ENABLE_OVERLOADING
    WidgetSendFocusChangeMethodInfo         ,
#endif
    widgetSendFocusChange                   ,


-- ** setAccelPath #method:setAccelPath#

#if ENABLE_OVERLOADING
    WidgetSetAccelPathMethodInfo            ,
#endif
    widgetSetAccelPath                      ,


-- ** setAllocation #method:setAllocation#

#if ENABLE_OVERLOADING
    WidgetSetAllocationMethodInfo           ,
#endif
    widgetSetAllocation                     ,


-- ** setAppPaintable #method:setAppPaintable#

#if ENABLE_OVERLOADING
    WidgetSetAppPaintableMethodInfo         ,
#endif
    widgetSetAppPaintable                   ,


-- ** setCanDefault #method:setCanDefault#

#if ENABLE_OVERLOADING
    WidgetSetCanDefaultMethodInfo           ,
#endif
    widgetSetCanDefault                     ,


-- ** setCanFocus #method:setCanFocus#

#if ENABLE_OVERLOADING
    WidgetSetCanFocusMethodInfo             ,
#endif
    widgetSetCanFocus                       ,


-- ** setChildVisible #method:setChildVisible#

#if ENABLE_OVERLOADING
    WidgetSetChildVisibleMethodInfo         ,
#endif
    widgetSetChildVisible                   ,


-- ** setClip #method:setClip#

#if ENABLE_OVERLOADING
    WidgetSetClipMethodInfo                 ,
#endif
    widgetSetClip                           ,


-- ** setCompositeName #method:setCompositeName#

#if ENABLE_OVERLOADING
    WidgetSetCompositeNameMethodInfo        ,
#endif
    widgetSetCompositeName                  ,


-- ** setDefaultDirection #method:setDefaultDirection#

    widgetSetDefaultDirection               ,


-- ** setDeviceEnabled #method:setDeviceEnabled#

#if ENABLE_OVERLOADING
    WidgetSetDeviceEnabledMethodInfo        ,
#endif
    widgetSetDeviceEnabled                  ,


-- ** setDeviceEvents #method:setDeviceEvents#

#if ENABLE_OVERLOADING
    WidgetSetDeviceEventsMethodInfo         ,
#endif
    widgetSetDeviceEvents                   ,


-- ** setDirection #method:setDirection#

#if ENABLE_OVERLOADING
    WidgetSetDirectionMethodInfo            ,
#endif
    widgetSetDirection                      ,


-- ** setDoubleBuffered #method:setDoubleBuffered#

#if ENABLE_OVERLOADING
    WidgetSetDoubleBufferedMethodInfo       ,
#endif
    widgetSetDoubleBuffered                 ,


-- ** setEvents #method:setEvents#

#if ENABLE_OVERLOADING
    WidgetSetEventsMethodInfo               ,
#endif
    widgetSetEvents                         ,


-- ** setFocusOnClick #method:setFocusOnClick#

#if ENABLE_OVERLOADING
    WidgetSetFocusOnClickMethodInfo         ,
#endif
    widgetSetFocusOnClick                   ,


-- ** setFontMap #method:setFontMap#

#if ENABLE_OVERLOADING
    WidgetSetFontMapMethodInfo              ,
#endif
    widgetSetFontMap                        ,


-- ** setFontOptions #method:setFontOptions#

#if ENABLE_OVERLOADING
    WidgetSetFontOptionsMethodInfo          ,
#endif
    widgetSetFontOptions                    ,


-- ** setHalign #method:setHalign#

#if ENABLE_OVERLOADING
    WidgetSetHalignMethodInfo               ,
#endif
    widgetSetHalign                         ,


-- ** setHasTooltip #method:setHasTooltip#

#if ENABLE_OVERLOADING
    WidgetSetHasTooltipMethodInfo           ,
#endif
    widgetSetHasTooltip                     ,


-- ** setHasWindow #method:setHasWindow#

#if ENABLE_OVERLOADING
    WidgetSetHasWindowMethodInfo            ,
#endif
    widgetSetHasWindow                      ,


-- ** setHexpand #method:setHexpand#

#if ENABLE_OVERLOADING
    WidgetSetHexpandMethodInfo              ,
#endif
    widgetSetHexpand                        ,


-- ** setHexpandSet #method:setHexpandSet#

#if ENABLE_OVERLOADING
    WidgetSetHexpandSetMethodInfo           ,
#endif
    widgetSetHexpandSet                     ,


-- ** setMapped #method:setMapped#

#if ENABLE_OVERLOADING
    WidgetSetMappedMethodInfo               ,
#endif
    widgetSetMapped                         ,


-- ** setMarginBottom #method:setMarginBottom#

#if ENABLE_OVERLOADING
    WidgetSetMarginBottomMethodInfo         ,
#endif
    widgetSetMarginBottom                   ,


-- ** setMarginEnd #method:setMarginEnd#

#if ENABLE_OVERLOADING
    WidgetSetMarginEndMethodInfo            ,
#endif
    widgetSetMarginEnd                      ,


-- ** setMarginLeft #method:setMarginLeft#

#if ENABLE_OVERLOADING
    WidgetSetMarginLeftMethodInfo           ,
#endif
    widgetSetMarginLeft                     ,


-- ** setMarginRight #method:setMarginRight#

#if ENABLE_OVERLOADING
    WidgetSetMarginRightMethodInfo          ,
#endif
    widgetSetMarginRight                    ,


-- ** setMarginStart #method:setMarginStart#

#if ENABLE_OVERLOADING
    WidgetSetMarginStartMethodInfo          ,
#endif
    widgetSetMarginStart                    ,


-- ** setMarginTop #method:setMarginTop#

#if ENABLE_OVERLOADING
    WidgetSetMarginTopMethodInfo            ,
#endif
    widgetSetMarginTop                      ,


-- ** setName #method:setName#

#if ENABLE_OVERLOADING
    WidgetSetNameMethodInfo                 ,
#endif
    widgetSetName                           ,


-- ** setNoShowAll #method:setNoShowAll#

#if ENABLE_OVERLOADING
    WidgetSetNoShowAllMethodInfo            ,
#endif
    widgetSetNoShowAll                      ,


-- ** setOpacity #method:setOpacity#

#if ENABLE_OVERLOADING
    WidgetSetOpacityMethodInfo              ,
#endif
    widgetSetOpacity                        ,


-- ** setParent #method:setParent#

#if ENABLE_OVERLOADING
    WidgetSetParentMethodInfo               ,
#endif
    widgetSetParent                         ,


-- ** setParentWindow #method:setParentWindow#

#if ENABLE_OVERLOADING
    WidgetSetParentWindowMethodInfo         ,
#endif
    widgetSetParentWindow                   ,


-- ** setRealized #method:setRealized#

#if ENABLE_OVERLOADING
    WidgetSetRealizedMethodInfo             ,
#endif
    widgetSetRealized                       ,


-- ** setReceivesDefault #method:setReceivesDefault#

#if ENABLE_OVERLOADING
    WidgetSetReceivesDefaultMethodInfo      ,
#endif
    widgetSetReceivesDefault                ,


-- ** setRedrawOnAllocate #method:setRedrawOnAllocate#

#if ENABLE_OVERLOADING
    WidgetSetRedrawOnAllocateMethodInfo     ,
#endif
    widgetSetRedrawOnAllocate               ,


-- ** setSensitive #method:setSensitive#

#if ENABLE_OVERLOADING
    WidgetSetSensitiveMethodInfo            ,
#endif
    widgetSetSensitive                      ,


-- ** setSizeRequest #method:setSizeRequest#

#if ENABLE_OVERLOADING
    WidgetSetSizeRequestMethodInfo          ,
#endif
    widgetSetSizeRequest                    ,


-- ** setState #method:setState#

#if ENABLE_OVERLOADING
    WidgetSetStateMethodInfo                ,
#endif
    widgetSetState                          ,


-- ** setStateFlags #method:setStateFlags#

#if ENABLE_OVERLOADING
    WidgetSetStateFlagsMethodInfo           ,
#endif
    widgetSetStateFlags                     ,


-- ** setStyle #method:setStyle#

#if ENABLE_OVERLOADING
    WidgetSetStyleMethodInfo                ,
#endif
    widgetSetStyle                          ,


-- ** setSupportMultidevice #method:setSupportMultidevice#

#if ENABLE_OVERLOADING
    WidgetSetSupportMultideviceMethodInfo   ,
#endif
    widgetSetSupportMultidevice             ,


-- ** setTooltipMarkup #method:setTooltipMarkup#

#if ENABLE_OVERLOADING
    WidgetSetTooltipMarkupMethodInfo        ,
#endif
    widgetSetTooltipMarkup                  ,


-- ** setTooltipText #method:setTooltipText#

#if ENABLE_OVERLOADING
    WidgetSetTooltipTextMethodInfo          ,
#endif
    widgetSetTooltipText                    ,


-- ** setTooltipWindow #method:setTooltipWindow#

#if ENABLE_OVERLOADING
    WidgetSetTooltipWindowMethodInfo        ,
#endif
    widgetSetTooltipWindow                  ,


-- ** setValign #method:setValign#

#if ENABLE_OVERLOADING
    WidgetSetValignMethodInfo               ,
#endif
    widgetSetValign                         ,


-- ** setVexpand #method:setVexpand#

#if ENABLE_OVERLOADING
    WidgetSetVexpandMethodInfo              ,
#endif
    widgetSetVexpand                        ,


-- ** setVexpandSet #method:setVexpandSet#

#if ENABLE_OVERLOADING
    WidgetSetVexpandSetMethodInfo           ,
#endif
    widgetSetVexpandSet                     ,


-- ** setVisible #method:setVisible#

#if ENABLE_OVERLOADING
    WidgetSetVisibleMethodInfo              ,
#endif
    widgetSetVisible                        ,


-- ** setVisual #method:setVisual#

#if ENABLE_OVERLOADING
    WidgetSetVisualMethodInfo               ,
#endif
    widgetSetVisual                         ,


-- ** setWindow #method:setWindow#

#if ENABLE_OVERLOADING
    WidgetSetWindowMethodInfo               ,
#endif
    widgetSetWindow                         ,


-- ** shapeCombineRegion #method:shapeCombineRegion#

#if ENABLE_OVERLOADING
    WidgetShapeCombineRegionMethodInfo      ,
#endif
    widgetShapeCombineRegion                ,


-- ** show #method:show#

#if ENABLE_OVERLOADING
    WidgetShowMethodInfo                    ,
#endif
    widgetShow                              ,


-- ** showAll #method:showAll#

#if ENABLE_OVERLOADING
    WidgetShowAllMethodInfo                 ,
#endif
    widgetShowAll                           ,


-- ** showNow #method:showNow#

#if ENABLE_OVERLOADING
    WidgetShowNowMethodInfo                 ,
#endif
    widgetShowNow                           ,


-- ** sizeAllocate #method:sizeAllocate#

#if ENABLE_OVERLOADING
    WidgetSizeAllocateMethodInfo            ,
#endif
    widgetSizeAllocate                      ,


-- ** sizeAllocateWithBaseline #method:sizeAllocateWithBaseline#

#if ENABLE_OVERLOADING
    WidgetSizeAllocateWithBaselineMethodInfo,
#endif
    widgetSizeAllocateWithBaseline          ,


-- ** sizeRequest #method:sizeRequest#

#if ENABLE_OVERLOADING
    WidgetSizeRequestMethodInfo             ,
#endif
    widgetSizeRequest                       ,


-- ** styleAttach #method:styleAttach#

#if ENABLE_OVERLOADING
    WidgetStyleAttachMethodInfo             ,
#endif
    widgetStyleAttach                       ,


-- ** styleGetProperty #method:styleGetProperty#

#if ENABLE_OVERLOADING
    WidgetStyleGetPropertyMethodInfo        ,
#endif
    widgetStyleGetProperty                  ,


-- ** thawChildNotify #method:thawChildNotify#

#if ENABLE_OVERLOADING
    WidgetThawChildNotifyMethodInfo         ,
#endif
    widgetThawChildNotify                   ,


-- ** translateCoordinates #method:translateCoordinates#

#if ENABLE_OVERLOADING
    WidgetTranslateCoordinatesMethodInfo    ,
#endif
    widgetTranslateCoordinates              ,


-- ** triggerTooltipQuery #method:triggerTooltipQuery#

#if ENABLE_OVERLOADING
    WidgetTriggerTooltipQueryMethodInfo     ,
#endif
    widgetTriggerTooltipQuery               ,


-- ** unmap #method:unmap#

#if ENABLE_OVERLOADING
    WidgetUnmapMethodInfo                   ,
#endif
    widgetUnmap                             ,


-- ** unparent #method:unparent#

#if ENABLE_OVERLOADING
    WidgetUnparentMethodInfo                ,
#endif
    widgetUnparent                          ,


-- ** unrealize #method:unrealize#

#if ENABLE_OVERLOADING
    WidgetUnrealizeMethodInfo               ,
#endif
    widgetUnrealize                         ,


-- ** unregisterWindow #method:unregisterWindow#

#if ENABLE_OVERLOADING
    WidgetUnregisterWindowMethodInfo        ,
#endif
    widgetUnregisterWindow                  ,


-- ** unsetStateFlags #method:unsetStateFlags#

#if ENABLE_OVERLOADING
    WidgetUnsetStateFlagsMethodInfo         ,
#endif
    widgetUnsetStateFlags                   ,




 -- * Properties
-- ** appPaintable #attr:appPaintable#
{- | /No description available in the introspection data./
-}
#if ENABLE_OVERLOADING
    WidgetAppPaintablePropertyInfo          ,
#endif
    constructWidgetAppPaintable             ,
    getWidgetAppPaintable                   ,
    setWidgetAppPaintable                   ,
#if ENABLE_OVERLOADING
    widgetAppPaintable                      ,
#endif


-- ** canDefault #attr:canDefault#
{- | /No description available in the introspection data./
-}
#if ENABLE_OVERLOADING
    WidgetCanDefaultPropertyInfo            ,
#endif
    constructWidgetCanDefault               ,
    getWidgetCanDefault                     ,
    setWidgetCanDefault                     ,
#if ENABLE_OVERLOADING
    widgetCanDefault                        ,
#endif


-- ** canFocus #attr:canFocus#
{- | /No description available in the introspection data./
-}
#if ENABLE_OVERLOADING
    WidgetCanFocusPropertyInfo              ,
#endif
    constructWidgetCanFocus                 ,
    getWidgetCanFocus                       ,
    setWidgetCanFocus                       ,
#if ENABLE_OVERLOADING
    widgetCanFocus                          ,
#endif


-- ** compositeChild #attr:compositeChild#
{- | /No description available in the introspection data./
-}
#if ENABLE_OVERLOADING
    WidgetCompositeChildPropertyInfo        ,
#endif
    getWidgetCompositeChild                 ,
#if ENABLE_OVERLOADING
    widgetCompositeChild                    ,
#endif


-- ** doubleBuffered #attr:doubleBuffered#
{- | Whether the widget is double buffered.

/Since: 2.18/
-}
#if ENABLE_OVERLOADING
    WidgetDoubleBufferedPropertyInfo        ,
#endif
    constructWidgetDoubleBuffered           ,
    getWidgetDoubleBuffered                 ,
    setWidgetDoubleBuffered                 ,
#if ENABLE_OVERLOADING
    widgetDoubleBuffered                    ,
#endif


-- ** events #attr:events#
{- | /No description available in the introspection data./
-}
#if ENABLE_OVERLOADING
    WidgetEventsPropertyInfo                ,
#endif
    constructWidgetEvents                   ,
    getWidgetEvents                         ,
    setWidgetEvents                         ,
#if ENABLE_OVERLOADING
    widgetEvents                            ,
#endif


-- ** expand #attr:expand#
{- | Whether to expand in both directions. Setting this sets both 'GI.Gtk.Objects.Widget.Widget':@/hexpand/@ and 'GI.Gtk.Objects.Widget.Widget':@/vexpand/@

/Since: 3.0/
-}
#if ENABLE_OVERLOADING
    WidgetExpandPropertyInfo                ,
#endif
    constructWidgetExpand                   ,
    getWidgetExpand                         ,
    setWidgetExpand                         ,
#if ENABLE_OVERLOADING
    widgetExpand                            ,
#endif


-- ** focusOnClick #attr:focusOnClick#
{- | Whether the widget should grab focus when it is clicked with the mouse.

This property is only relevant for widgets that can take focus.

Before 3.20, several widgets (GtkButton, GtkFileChooserButton,
GtkComboBox) implemented this property individually.

/Since: 3.20/
-}
#if ENABLE_OVERLOADING
    WidgetFocusOnClickPropertyInfo          ,
#endif
    constructWidgetFocusOnClick             ,
    getWidgetFocusOnClick                   ,
    setWidgetFocusOnClick                   ,
#if ENABLE_OVERLOADING
    widgetFocusOnClick                      ,
#endif


-- ** halign #attr:halign#
{- | How to distribute horizontal space if widget gets extra space, see 'GI.Gtk.Enums.Align'

/Since: 3.0/
-}
#if ENABLE_OVERLOADING
    WidgetHalignPropertyInfo                ,
#endif
    constructWidgetHalign                   ,
    getWidgetHalign                         ,
    setWidgetHalign                         ,
#if ENABLE_OVERLOADING
    widgetHalign                            ,
#endif


-- ** hasDefault #attr:hasDefault#
{- | /No description available in the introspection data./
-}
#if ENABLE_OVERLOADING
    WidgetHasDefaultPropertyInfo            ,
#endif
    constructWidgetHasDefault               ,
    getWidgetHasDefault                     ,
    setWidgetHasDefault                     ,


-- ** hasFocus #attr:hasFocus#
{- | /No description available in the introspection data./
-}
#if ENABLE_OVERLOADING
    WidgetHasFocusPropertyInfo              ,
#endif
    constructWidgetHasFocus                 ,
    getWidgetHasFocus                       ,
    setWidgetHasFocus                       ,


-- ** hasTooltip #attr:hasTooltip#
{- | Enables or disables the emission of 'GI.Gtk.Objects.Widget.Widget'::@/query-tooltip/@ on /@widget@/.
A value of 'True' indicates that /@widget@/ can have a tooltip, in this case
the widget will be queried using 'GI.Gtk.Objects.Widget.Widget'::@/query-tooltip/@ to determine
whether it will provide a tooltip or not.

Note that setting this property to 'True' for the first time will change
the event masks of the GdkWindows of this widget to include leave-notify
and motion-notify events.  This cannot and will not be undone when the
property is set to 'False' again.

/Since: 2.12/
-}
#if ENABLE_OVERLOADING
    WidgetHasTooltipPropertyInfo            ,
#endif
    constructWidgetHasTooltip               ,
    getWidgetHasTooltip                     ,
    setWidgetHasTooltip                     ,
#if ENABLE_OVERLOADING
    widgetHasTooltip                        ,
#endif


-- ** heightRequest #attr:heightRequest#
{- | /No description available in the introspection data./
-}
#if ENABLE_OVERLOADING
    WidgetHeightRequestPropertyInfo         ,
#endif
    constructWidgetHeightRequest            ,
    getWidgetHeightRequest                  ,
    setWidgetHeightRequest                  ,
#if ENABLE_OVERLOADING
    widgetHeightRequest                     ,
#endif


-- ** hexpand #attr:hexpand#
{- | Whether to expand horizontally. See 'GI.Gtk.Objects.Widget.widgetSetHexpand'.

/Since: 3.0/
-}
#if ENABLE_OVERLOADING
    WidgetHexpandPropertyInfo               ,
#endif
    constructWidgetHexpand                  ,
    getWidgetHexpand                        ,
    setWidgetHexpand                        ,
#if ENABLE_OVERLOADING
    widgetHexpand                           ,
#endif


-- ** hexpandSet #attr:hexpandSet#
{- | Whether to use the 'GI.Gtk.Objects.Widget.Widget':@/hexpand/@ property. See 'GI.Gtk.Objects.Widget.widgetGetHexpandSet'.

/Since: 3.0/
-}
#if ENABLE_OVERLOADING
    WidgetHexpandSetPropertyInfo            ,
#endif
    constructWidgetHexpandSet               ,
    getWidgetHexpandSet                     ,
    setWidgetHexpandSet                     ,
#if ENABLE_OVERLOADING
    widgetHexpandSet                        ,
#endif


-- ** isFocus #attr:isFocus#
{- | /No description available in the introspection data./
-}
#if ENABLE_OVERLOADING
    WidgetIsFocusPropertyInfo               ,
#endif
    constructWidgetIsFocus                  ,
    getWidgetIsFocus                        ,
    setWidgetIsFocus                        ,


-- ** margin #attr:margin#
{- | Sets all four sides\' margin at once. If read, returns max
margin on any side.

/Since: 3.0/
-}
#if ENABLE_OVERLOADING
    WidgetMarginPropertyInfo                ,
#endif
    constructWidgetMargin                   ,
    getWidgetMargin                         ,
    setWidgetMargin                         ,
#if ENABLE_OVERLOADING
    widgetMargin                            ,
#endif


-- ** marginBottom #attr:marginBottom#
{- | Margin on bottom side of widget.

This property adds margin outside of the widget\'s normal size
request, the margin will be added in addition to the size from
'GI.Gtk.Objects.Widget.widgetSetSizeRequest' for example.

/Since: 3.0/
-}
#if ENABLE_OVERLOADING
    WidgetMarginBottomPropertyInfo          ,
#endif
    constructWidgetMarginBottom             ,
    getWidgetMarginBottom                   ,
    setWidgetMarginBottom                   ,
#if ENABLE_OVERLOADING
    widgetMarginBottom                      ,
#endif


-- ** marginEnd #attr:marginEnd#
{- | Margin on end of widget, horizontally. This property supports
left-to-right and right-to-left text directions.

This property adds margin outside of the widget\'s normal size
request, the margin will be added in addition to the size from
'GI.Gtk.Objects.Widget.widgetSetSizeRequest' for example.

/Since: 3.12/
-}
#if ENABLE_OVERLOADING
    WidgetMarginEndPropertyInfo             ,
#endif
    constructWidgetMarginEnd                ,
    getWidgetMarginEnd                      ,
    setWidgetMarginEnd                      ,
#if ENABLE_OVERLOADING
    widgetMarginEnd                         ,
#endif


-- ** marginLeft #attr:marginLeft#
{- | Margin on left side of widget.

This property adds margin outside of the widget\'s normal size
request, the margin will be added in addition to the size from
'GI.Gtk.Objects.Widget.widgetSetSizeRequest' for example.

/Since: 3.0/
-}
#if ENABLE_OVERLOADING
    WidgetMarginLeftPropertyInfo            ,
#endif
    constructWidgetMarginLeft               ,
    getWidgetMarginLeft                     ,
    setWidgetMarginLeft                     ,
#if ENABLE_OVERLOADING
    widgetMarginLeft                        ,
#endif


-- ** marginRight #attr:marginRight#
{- | Margin on right side of widget.

This property adds margin outside of the widget\'s normal size
request, the margin will be added in addition to the size from
'GI.Gtk.Objects.Widget.widgetSetSizeRequest' for example.

/Since: 3.0/
-}
#if ENABLE_OVERLOADING
    WidgetMarginRightPropertyInfo           ,
#endif
    constructWidgetMarginRight              ,
    getWidgetMarginRight                    ,
    setWidgetMarginRight                    ,
#if ENABLE_OVERLOADING
    widgetMarginRight                       ,
#endif


-- ** marginStart #attr:marginStart#
{- | Margin on start of widget, horizontally. This property supports
left-to-right and right-to-left text directions.

This property adds margin outside of the widget\'s normal size
request, the margin will be added in addition to the size from
'GI.Gtk.Objects.Widget.widgetSetSizeRequest' for example.

/Since: 3.12/
-}
#if ENABLE_OVERLOADING
    WidgetMarginStartPropertyInfo           ,
#endif
    constructWidgetMarginStart              ,
    getWidgetMarginStart                    ,
    setWidgetMarginStart                    ,
#if ENABLE_OVERLOADING
    widgetMarginStart                       ,
#endif


-- ** marginTop #attr:marginTop#
{- | Margin on top side of widget.

This property adds margin outside of the widget\'s normal size
request, the margin will be added in addition to the size from
'GI.Gtk.Objects.Widget.widgetSetSizeRequest' for example.

/Since: 3.0/
-}
#if ENABLE_OVERLOADING
    WidgetMarginTopPropertyInfo             ,
#endif
    constructWidgetMarginTop                ,
    getWidgetMarginTop                      ,
    setWidgetMarginTop                      ,
#if ENABLE_OVERLOADING
    widgetMarginTop                         ,
#endif


-- ** name #attr:name#
{- | /No description available in the introspection data./
-}
#if ENABLE_OVERLOADING
    WidgetNamePropertyInfo                  ,
#endif
    constructWidgetName                     ,
    getWidgetName                           ,
    setWidgetName                           ,
#if ENABLE_OVERLOADING
    widgetName                              ,
#endif


-- ** noShowAll #attr:noShowAll#
{- | /No description available in the introspection data./
-}
#if ENABLE_OVERLOADING
    WidgetNoShowAllPropertyInfo             ,
#endif
    constructWidgetNoShowAll                ,
    getWidgetNoShowAll                      ,
    setWidgetNoShowAll                      ,
#if ENABLE_OVERLOADING
    widgetNoShowAll                         ,
#endif


-- ** opacity #attr:opacity#
{- | The requested opacity of the widget. See 'GI.Gtk.Objects.Widget.widgetSetOpacity' for
more details about window opacity.

Before 3.8 this was only available in GtkWindow

/Since: 3.8/
-}
#if ENABLE_OVERLOADING
    WidgetOpacityPropertyInfo               ,
#endif
    constructWidgetOpacity                  ,
    getWidgetOpacity                        ,
    setWidgetOpacity                        ,
#if ENABLE_OVERLOADING
    widgetOpacity                           ,
#endif


-- ** parent #attr:parent#
{- | /No description available in the introspection data./
-}
#if ENABLE_OVERLOADING
    WidgetParentPropertyInfo                ,
#endif
    clearWidgetParent                       ,
    constructWidgetParent                   ,
    getWidgetParent                         ,
    setWidgetParent                         ,
#if ENABLE_OVERLOADING
    widgetParent                            ,
#endif


-- ** receivesDefault #attr:receivesDefault#
{- | /No description available in the introspection data./
-}
#if ENABLE_OVERLOADING
    WidgetReceivesDefaultPropertyInfo       ,
#endif
    constructWidgetReceivesDefault          ,
    getWidgetReceivesDefault                ,
    setWidgetReceivesDefault                ,
#if ENABLE_OVERLOADING
    widgetReceivesDefault                   ,
#endif


-- ** scaleFactor #attr:scaleFactor#
{- | The scale factor of the widget. See 'GI.Gtk.Objects.Widget.widgetGetScaleFactor' for
more details about widget scaling.

/Since: 3.10/
-}
#if ENABLE_OVERLOADING
    WidgetScaleFactorPropertyInfo           ,
#endif
    getWidgetScaleFactor                    ,
#if ENABLE_OVERLOADING
    widgetScaleFactor                       ,
#endif


-- ** sensitive #attr:sensitive#
{- | /No description available in the introspection data./
-}
#if ENABLE_OVERLOADING
    WidgetSensitivePropertyInfo             ,
#endif
    constructWidgetSensitive                ,
    getWidgetSensitive                      ,
    setWidgetSensitive                      ,
#if ENABLE_OVERLOADING
    widgetSensitive                         ,
#endif


-- ** style #attr:style#
{- | The style of the widget, which contains information about how it will look (colors, etc).
-}
#if ENABLE_OVERLOADING
    WidgetStylePropertyInfo                 ,
#endif
    clearWidgetStyle                        ,
    constructWidgetStyle                    ,
    getWidgetStyle                          ,
    setWidgetStyle                          ,
#if ENABLE_OVERLOADING
    widgetStyle                             ,
#endif


-- ** tooltipMarkup #attr:tooltipMarkup#
{- | Sets the text of tooltip to be the given string, which is marked up
with the [Pango text markup language][PangoMarkupFormat].
Also see 'GI.Gtk.Objects.Tooltip.tooltipSetMarkup'.

This is a convenience property which will take care of getting the
tooltip shown if the given string is not 'Nothing': 'GI.Gtk.Objects.Widget.Widget':@/has-tooltip/@
will automatically be set to 'True' and there will be taken care of
'GI.Gtk.Objects.Widget.Widget'::@/query-tooltip/@ in the default signal handler.

Note that if both 'GI.Gtk.Objects.Widget.Widget':@/tooltip-text/@ and 'GI.Gtk.Objects.Widget.Widget':@/tooltip-markup/@
are set, the last one wins.

/Since: 2.12/
-}
#if ENABLE_OVERLOADING
    WidgetTooltipMarkupPropertyInfo         ,
#endif
    clearWidgetTooltipMarkup                ,
    constructWidgetTooltipMarkup            ,
    getWidgetTooltipMarkup                  ,
    setWidgetTooltipMarkup                  ,
#if ENABLE_OVERLOADING
    widgetTooltipMarkup                     ,
#endif


-- ** tooltipText #attr:tooltipText#
{- | Sets the text of tooltip to be the given string.

Also see 'GI.Gtk.Objects.Tooltip.tooltipSetText'.

This is a convenience property which will take care of getting the
tooltip shown if the given string is not 'Nothing': 'GI.Gtk.Objects.Widget.Widget':@/has-tooltip/@
will automatically be set to 'True' and there will be taken care of
'GI.Gtk.Objects.Widget.Widget'::@/query-tooltip/@ in the default signal handler.

Note that if both 'GI.Gtk.Objects.Widget.Widget':@/tooltip-text/@ and 'GI.Gtk.Objects.Widget.Widget':@/tooltip-markup/@
are set, the last one wins.

/Since: 2.12/
-}
#if ENABLE_OVERLOADING
    WidgetTooltipTextPropertyInfo           ,
#endif
    clearWidgetTooltipText                  ,
    constructWidgetTooltipText              ,
    getWidgetTooltipText                    ,
    setWidgetTooltipText                    ,
#if ENABLE_OVERLOADING
    widgetTooltipText                       ,
#endif


-- ** valign #attr:valign#
{- | How to distribute vertical space if widget gets extra space, see 'GI.Gtk.Enums.Align'

/Since: 3.0/
-}
#if ENABLE_OVERLOADING
    WidgetValignPropertyInfo                ,
#endif
    constructWidgetValign                   ,
    getWidgetValign                         ,
    setWidgetValign                         ,
#if ENABLE_OVERLOADING
    widgetValign                            ,
#endif


-- ** vexpand #attr:vexpand#
{- | Whether to expand vertically. See 'GI.Gtk.Objects.Widget.widgetSetVexpand'.

/Since: 3.0/
-}
#if ENABLE_OVERLOADING
    WidgetVexpandPropertyInfo               ,
#endif
    constructWidgetVexpand                  ,
    getWidgetVexpand                        ,
    setWidgetVexpand                        ,
#if ENABLE_OVERLOADING
    widgetVexpand                           ,
#endif


-- ** vexpandSet #attr:vexpandSet#
{- | Whether to use the 'GI.Gtk.Objects.Widget.Widget':@/vexpand/@ property. See 'GI.Gtk.Objects.Widget.widgetGetVexpandSet'.

/Since: 3.0/
-}
#if ENABLE_OVERLOADING
    WidgetVexpandSetPropertyInfo            ,
#endif
    constructWidgetVexpandSet               ,
    getWidgetVexpandSet                     ,
    setWidgetVexpandSet                     ,
#if ENABLE_OVERLOADING
    widgetVexpandSet                        ,
#endif


-- ** visible #attr:visible#
{- | /No description available in the introspection data./
-}
#if ENABLE_OVERLOADING
    WidgetVisiblePropertyInfo               ,
#endif
    constructWidgetVisible                  ,
    getWidgetVisible                        ,
    setWidgetVisible                        ,
#if ENABLE_OVERLOADING
    widgetVisible                           ,
#endif


-- ** widthRequest #attr:widthRequest#
{- | /No description available in the introspection data./
-}
#if ENABLE_OVERLOADING
    WidgetWidthRequestPropertyInfo          ,
#endif
    constructWidgetWidthRequest             ,
    getWidgetWidthRequest                   ,
    setWidgetWidthRequest                   ,
#if ENABLE_OVERLOADING
    widgetWidthRequest                      ,
#endif


-- ** window #attr:window#
{- | The widget\'s window if it is realized, 'Nothing' otherwise.

/Since: 2.14/
-}
#if ENABLE_OVERLOADING
    WidgetWindowPropertyInfo                ,
#endif
    getWidgetWindow                         ,
#if ENABLE_OVERLOADING
    widgetWindow                            ,
#endif




 -- * Signals
-- ** accelClosuresChanged #signal:accelClosuresChanged#

    C_WidgetAccelClosuresChangedCallback    ,
    WidgetAccelClosuresChangedCallback      ,
#if ENABLE_OVERLOADING
    WidgetAccelClosuresChangedSignalInfo    ,
#endif
    afterWidgetAccelClosuresChanged         ,
    genClosure_WidgetAccelClosuresChanged   ,
    mk_WidgetAccelClosuresChangedCallback   ,
    noWidgetAccelClosuresChangedCallback    ,
    onWidgetAccelClosuresChanged            ,
    wrap_WidgetAccelClosuresChangedCallback ,


-- ** buttonPressEvent #signal:buttonPressEvent#

    C_WidgetButtonPressEventCallback        ,
    WidgetButtonPressEventCallback          ,
#if ENABLE_OVERLOADING
    WidgetButtonPressEventSignalInfo        ,
#endif
    afterWidgetButtonPressEvent             ,
    genClosure_WidgetButtonPressEvent       ,
    mk_WidgetButtonPressEventCallback       ,
    noWidgetButtonPressEventCallback        ,
    onWidgetButtonPressEvent                ,
    wrap_WidgetButtonPressEventCallback     ,


-- ** buttonReleaseEvent #signal:buttonReleaseEvent#

    C_WidgetButtonReleaseEventCallback      ,
    WidgetButtonReleaseEventCallback        ,
#if ENABLE_OVERLOADING
    WidgetButtonReleaseEventSignalInfo      ,
#endif
    afterWidgetButtonReleaseEvent           ,
    genClosure_WidgetButtonReleaseEvent     ,
    mk_WidgetButtonReleaseEventCallback     ,
    noWidgetButtonReleaseEventCallback      ,
    onWidgetButtonReleaseEvent              ,
    wrap_WidgetButtonReleaseEventCallback   ,


-- ** canActivateAccel #signal:canActivateAccel#

    C_WidgetCanActivateAccelCallback        ,
    WidgetCanActivateAccelCallback          ,
#if ENABLE_OVERLOADING
    WidgetCanActivateAccelSignalInfo        ,
#endif
    afterWidgetCanActivateAccel             ,
    genClosure_WidgetCanActivateAccel       ,
    mk_WidgetCanActivateAccelCallback       ,
    noWidgetCanActivateAccelCallback        ,
    onWidgetCanActivateAccel                ,
    wrap_WidgetCanActivateAccelCallback     ,


-- ** childNotify #signal:childNotify#

    C_WidgetChildNotifyCallback             ,
    WidgetChildNotifyCallback               ,
#if ENABLE_OVERLOADING
    WidgetChildNotifySignalInfo             ,
#endif
    afterWidgetChildNotify                  ,
    genClosure_WidgetChildNotify            ,
    mk_WidgetChildNotifyCallback            ,
    noWidgetChildNotifyCallback             ,
    onWidgetChildNotify                     ,
    wrap_WidgetChildNotifyCallback          ,


-- ** compositedChanged #signal:compositedChanged#

    C_WidgetCompositedChangedCallback       ,
    WidgetCompositedChangedCallback         ,
#if ENABLE_OVERLOADING
    WidgetCompositedChangedSignalInfo       ,
#endif
    afterWidgetCompositedChanged            ,
    genClosure_WidgetCompositedChanged      ,
    mk_WidgetCompositedChangedCallback      ,
    noWidgetCompositedChangedCallback       ,
    onWidgetCompositedChanged               ,
    wrap_WidgetCompositedChangedCallback    ,


-- ** configureEvent #signal:configureEvent#

    C_WidgetConfigureEventCallback          ,
    WidgetConfigureEventCallback            ,
#if ENABLE_OVERLOADING
    WidgetConfigureEventSignalInfo          ,
#endif
    afterWidgetConfigureEvent               ,
    genClosure_WidgetConfigureEvent         ,
    mk_WidgetConfigureEventCallback         ,
    noWidgetConfigureEventCallback          ,
    onWidgetConfigureEvent                  ,
    wrap_WidgetConfigureEventCallback       ,


-- ** damageEvent #signal:damageEvent#

    C_WidgetDamageEventCallback             ,
    WidgetDamageEventCallback               ,
#if ENABLE_OVERLOADING
    WidgetDamageEventSignalInfo             ,
#endif
    afterWidgetDamageEvent                  ,
    genClosure_WidgetDamageEvent            ,
    mk_WidgetDamageEventCallback            ,
    noWidgetDamageEventCallback             ,
    onWidgetDamageEvent                     ,
    wrap_WidgetDamageEventCallback          ,


-- ** deleteEvent #signal:deleteEvent#

    C_WidgetDeleteEventCallback             ,
    WidgetDeleteEventCallback               ,
#if ENABLE_OVERLOADING
    WidgetDeleteEventSignalInfo             ,
#endif
    afterWidgetDeleteEvent                  ,
    genClosure_WidgetDeleteEvent            ,
    mk_WidgetDeleteEventCallback            ,
    noWidgetDeleteEventCallback             ,
    onWidgetDeleteEvent                     ,
    wrap_WidgetDeleteEventCallback          ,


-- ** destroy #signal:destroy#

    C_WidgetDestroyCallback                 ,
    WidgetDestroyCallback                   ,
#if ENABLE_OVERLOADING
    WidgetDestroySignalInfo                 ,
#endif
    afterWidgetDestroy                      ,
    genClosure_WidgetDestroy                ,
    mk_WidgetDestroyCallback                ,
    noWidgetDestroyCallback                 ,
    onWidgetDestroy                         ,
    wrap_WidgetDestroyCallback              ,


-- ** destroyEvent #signal:destroyEvent#

    C_WidgetDestroyEventCallback            ,
    WidgetDestroyEventCallback              ,
#if ENABLE_OVERLOADING
    WidgetDestroyEventSignalInfo            ,
#endif
    afterWidgetDestroyEvent                 ,
    genClosure_WidgetDestroyEvent           ,
    mk_WidgetDestroyEventCallback           ,
    noWidgetDestroyEventCallback            ,
    onWidgetDestroyEvent                    ,
    wrap_WidgetDestroyEventCallback         ,


-- ** directionChanged #signal:directionChanged#

    C_WidgetDirectionChangedCallback        ,
    WidgetDirectionChangedCallback          ,
#if ENABLE_OVERLOADING
    WidgetDirectionChangedSignalInfo        ,
#endif
    afterWidgetDirectionChanged             ,
    genClosure_WidgetDirectionChanged       ,
    mk_WidgetDirectionChangedCallback       ,
    noWidgetDirectionChangedCallback        ,
    onWidgetDirectionChanged                ,
    wrap_WidgetDirectionChangedCallback     ,


-- ** dragBegin #signal:dragBegin#

    C_WidgetDragBeginCallback               ,
    WidgetDragBeginCallback                 ,
#if ENABLE_OVERLOADING
    WidgetDragBeginSignalInfo               ,
#endif
    afterWidgetDragBegin                    ,
    genClosure_WidgetDragBegin              ,
    mk_WidgetDragBeginCallback              ,
    noWidgetDragBeginCallback               ,
    onWidgetDragBegin                       ,
    wrap_WidgetDragBeginCallback            ,


-- ** dragDataDelete #signal:dragDataDelete#

    C_WidgetDragDataDeleteCallback          ,
    WidgetDragDataDeleteCallback            ,
#if ENABLE_OVERLOADING
    WidgetDragDataDeleteSignalInfo          ,
#endif
    afterWidgetDragDataDelete               ,
    genClosure_WidgetDragDataDelete         ,
    mk_WidgetDragDataDeleteCallback         ,
    noWidgetDragDataDeleteCallback          ,
    onWidgetDragDataDelete                  ,
    wrap_WidgetDragDataDeleteCallback       ,


-- ** dragDataGet #signal:dragDataGet#

    C_WidgetDragDataGetCallback             ,
    WidgetDragDataGetCallback               ,
#if ENABLE_OVERLOADING
    WidgetDragDataGetSignalInfo             ,
#endif
    afterWidgetDragDataGet                  ,
    genClosure_WidgetDragDataGet            ,
    mk_WidgetDragDataGetCallback            ,
    noWidgetDragDataGetCallback             ,
    onWidgetDragDataGet                     ,
    wrap_WidgetDragDataGetCallback          ,


-- ** dragDataReceived #signal:dragDataReceived#

    C_WidgetDragDataReceivedCallback        ,
    WidgetDragDataReceivedCallback          ,
#if ENABLE_OVERLOADING
    WidgetDragDataReceivedSignalInfo        ,
#endif
    afterWidgetDragDataReceived             ,
    genClosure_WidgetDragDataReceived       ,
    mk_WidgetDragDataReceivedCallback       ,
    noWidgetDragDataReceivedCallback        ,
    onWidgetDragDataReceived                ,
    wrap_WidgetDragDataReceivedCallback     ,


-- ** dragDrop #signal:dragDrop#

    C_WidgetDragDropCallback                ,
    WidgetDragDropCallback                  ,
#if ENABLE_OVERLOADING
    WidgetDragDropSignalInfo                ,
#endif
    afterWidgetDragDrop                     ,
    genClosure_WidgetDragDrop               ,
    mk_WidgetDragDropCallback               ,
    noWidgetDragDropCallback                ,
    onWidgetDragDrop                        ,
    wrap_WidgetDragDropCallback             ,


-- ** dragEnd #signal:dragEnd#

    C_WidgetDragEndCallback                 ,
    WidgetDragEndCallback                   ,
#if ENABLE_OVERLOADING
    WidgetDragEndSignalInfo                 ,
#endif
    afterWidgetDragEnd                      ,
    genClosure_WidgetDragEnd                ,
    mk_WidgetDragEndCallback                ,
    noWidgetDragEndCallback                 ,
    onWidgetDragEnd                         ,
    wrap_WidgetDragEndCallback              ,


-- ** dragFailed #signal:dragFailed#

    C_WidgetDragFailedCallback              ,
    WidgetDragFailedCallback                ,
#if ENABLE_OVERLOADING
    WidgetDragFailedSignalInfo              ,
#endif
    afterWidgetDragFailed                   ,
    genClosure_WidgetDragFailed             ,
    mk_WidgetDragFailedCallback             ,
    noWidgetDragFailedCallback              ,
    onWidgetDragFailed                      ,
    wrap_WidgetDragFailedCallback           ,


-- ** dragLeave #signal:dragLeave#

    C_WidgetDragLeaveCallback               ,
    WidgetDragLeaveCallback                 ,
#if ENABLE_OVERLOADING
    WidgetDragLeaveSignalInfo               ,
#endif
    afterWidgetDragLeave                    ,
    genClosure_WidgetDragLeave              ,
    mk_WidgetDragLeaveCallback              ,
    noWidgetDragLeaveCallback               ,
    onWidgetDragLeave                       ,
    wrap_WidgetDragLeaveCallback            ,


-- ** dragMotion #signal:dragMotion#

    C_WidgetDragMotionCallback              ,
    WidgetDragMotionCallback                ,
#if ENABLE_OVERLOADING
    WidgetDragMotionSignalInfo              ,
#endif
    afterWidgetDragMotion                   ,
    genClosure_WidgetDragMotion             ,
    mk_WidgetDragMotionCallback             ,
    noWidgetDragMotionCallback              ,
    onWidgetDragMotion                      ,
    wrap_WidgetDragMotionCallback           ,


-- ** draw #signal:draw#

    C_WidgetDrawCallback                    ,
    WidgetDrawCallback                      ,
#if ENABLE_OVERLOADING
    WidgetDrawSignalInfo                    ,
#endif
    afterWidgetDraw                         ,
    genClosure_WidgetDraw                   ,
    mk_WidgetDrawCallback                   ,
    noWidgetDrawCallback                    ,
    onWidgetDraw                            ,
    wrap_WidgetDrawCallback                 ,


-- ** enterNotifyEvent #signal:enterNotifyEvent#

    C_WidgetEnterNotifyEventCallback        ,
    WidgetEnterNotifyEventCallback          ,
#if ENABLE_OVERLOADING
    WidgetEnterNotifyEventSignalInfo        ,
#endif
    afterWidgetEnterNotifyEvent             ,
    genClosure_WidgetEnterNotifyEvent       ,
    mk_WidgetEnterNotifyEventCallback       ,
    noWidgetEnterNotifyEventCallback        ,
    onWidgetEnterNotifyEvent                ,
    wrap_WidgetEnterNotifyEventCallback     ,


-- ** event #signal:event#

    C_WidgetEventCallback                   ,
    WidgetEventCallback                     ,
#if ENABLE_OVERLOADING
    WidgetEventSignalInfo                   ,
#endif
    afterWidgetEvent                        ,
    genClosure_WidgetEvent                  ,
    mk_WidgetEventCallback                  ,
    noWidgetEventCallback                   ,
    onWidgetEvent                           ,
    wrap_WidgetEventCallback                ,


-- ** eventAfter #signal:eventAfter#

    C_WidgetEventAfterCallback              ,
    WidgetEventAfterCallback                ,
#if ENABLE_OVERLOADING
    WidgetEventAfterSignalInfo              ,
#endif
    afterWidgetEventAfter                   ,
    genClosure_WidgetEventAfter             ,
    mk_WidgetEventAfterCallback             ,
    noWidgetEventAfterCallback              ,
    onWidgetEventAfter                      ,
    wrap_WidgetEventAfterCallback           ,


-- ** focus #signal:focus#

    C_WidgetFocusCallback                   ,
    WidgetFocusCallback                     ,
#if ENABLE_OVERLOADING
    WidgetFocusSignalInfo                   ,
#endif
    afterWidgetFocus                        ,
    genClosure_WidgetFocus                  ,
    mk_WidgetFocusCallback                  ,
    noWidgetFocusCallback                   ,
    onWidgetFocus                           ,
    wrap_WidgetFocusCallback                ,


-- ** focusInEvent #signal:focusInEvent#

    C_WidgetFocusInEventCallback            ,
    WidgetFocusInEventCallback              ,
#if ENABLE_OVERLOADING
    WidgetFocusInEventSignalInfo            ,
#endif
    afterWidgetFocusInEvent                 ,
    genClosure_WidgetFocusInEvent           ,
    mk_WidgetFocusInEventCallback           ,
    noWidgetFocusInEventCallback            ,
    onWidgetFocusInEvent                    ,
    wrap_WidgetFocusInEventCallback         ,


-- ** focusOutEvent #signal:focusOutEvent#

    C_WidgetFocusOutEventCallback           ,
    WidgetFocusOutEventCallback             ,
#if ENABLE_OVERLOADING
    WidgetFocusOutEventSignalInfo           ,
#endif
    afterWidgetFocusOutEvent                ,
    genClosure_WidgetFocusOutEvent          ,
    mk_WidgetFocusOutEventCallback          ,
    noWidgetFocusOutEventCallback           ,
    onWidgetFocusOutEvent                   ,
    wrap_WidgetFocusOutEventCallback        ,


-- ** grabBrokenEvent #signal:grabBrokenEvent#

    C_WidgetGrabBrokenEventCallback         ,
    WidgetGrabBrokenEventCallback           ,
#if ENABLE_OVERLOADING
    WidgetGrabBrokenEventSignalInfo         ,
#endif
    afterWidgetGrabBrokenEvent              ,
    genClosure_WidgetGrabBrokenEvent        ,
    mk_WidgetGrabBrokenEventCallback        ,
    noWidgetGrabBrokenEventCallback         ,
    onWidgetGrabBrokenEvent                 ,
    wrap_WidgetGrabBrokenEventCallback      ,


-- ** grabFocus #signal:grabFocus#

    C_WidgetGrabFocusCallback               ,
    WidgetGrabFocusCallback                 ,
#if ENABLE_OVERLOADING
    WidgetGrabFocusSignalInfo               ,
#endif
    afterWidgetGrabFocus                    ,
    genClosure_WidgetGrabFocus              ,
    mk_WidgetGrabFocusCallback              ,
    noWidgetGrabFocusCallback               ,
    onWidgetGrabFocus                       ,
    wrap_WidgetGrabFocusCallback            ,


-- ** grabNotify #signal:grabNotify#

    C_WidgetGrabNotifyCallback              ,
    WidgetGrabNotifyCallback                ,
#if ENABLE_OVERLOADING
    WidgetGrabNotifySignalInfo              ,
#endif
    afterWidgetGrabNotify                   ,
    genClosure_WidgetGrabNotify             ,
    mk_WidgetGrabNotifyCallback             ,
    noWidgetGrabNotifyCallback              ,
    onWidgetGrabNotify                      ,
    wrap_WidgetGrabNotifyCallback           ,


-- ** hide #signal:hide#

    C_WidgetHideCallback                    ,
    WidgetHideCallback                      ,
#if ENABLE_OVERLOADING
    WidgetHideSignalInfo                    ,
#endif
    afterWidgetHide                         ,
    genClosure_WidgetHide                   ,
    mk_WidgetHideCallback                   ,
    noWidgetHideCallback                    ,
    onWidgetHide                            ,
    wrap_WidgetHideCallback                 ,


-- ** hierarchyChanged #signal:hierarchyChanged#

    C_WidgetHierarchyChangedCallback        ,
    WidgetHierarchyChangedCallback          ,
#if ENABLE_OVERLOADING
    WidgetHierarchyChangedSignalInfo        ,
#endif
    afterWidgetHierarchyChanged             ,
    genClosure_WidgetHierarchyChanged       ,
    mk_WidgetHierarchyChangedCallback       ,
    noWidgetHierarchyChangedCallback        ,
    onWidgetHierarchyChanged                ,
    wrap_WidgetHierarchyChangedCallback     ,


-- ** keyPressEvent #signal:keyPressEvent#

    C_WidgetKeyPressEventCallback           ,
    WidgetKeyPressEventCallback             ,
#if ENABLE_OVERLOADING
    WidgetKeyPressEventSignalInfo           ,
#endif
    afterWidgetKeyPressEvent                ,
    genClosure_WidgetKeyPressEvent          ,
    mk_WidgetKeyPressEventCallback          ,
    noWidgetKeyPressEventCallback           ,
    onWidgetKeyPressEvent                   ,
    wrap_WidgetKeyPressEventCallback        ,


-- ** keyReleaseEvent #signal:keyReleaseEvent#

    C_WidgetKeyReleaseEventCallback         ,
    WidgetKeyReleaseEventCallback           ,
#if ENABLE_OVERLOADING
    WidgetKeyReleaseEventSignalInfo         ,
#endif
    afterWidgetKeyReleaseEvent              ,
    genClosure_WidgetKeyReleaseEvent        ,
    mk_WidgetKeyReleaseEventCallback        ,
    noWidgetKeyReleaseEventCallback         ,
    onWidgetKeyReleaseEvent                 ,
    wrap_WidgetKeyReleaseEventCallback      ,


-- ** keynavFailed #signal:keynavFailed#

    C_WidgetKeynavFailedCallback            ,
    WidgetKeynavFailedCallback              ,
#if ENABLE_OVERLOADING
    WidgetKeynavFailedSignalInfo            ,
#endif
    afterWidgetKeynavFailed                 ,
    genClosure_WidgetKeynavFailed           ,
    mk_WidgetKeynavFailedCallback           ,
    noWidgetKeynavFailedCallback            ,
    onWidgetKeynavFailed                    ,
    wrap_WidgetKeynavFailedCallback         ,


-- ** leaveNotifyEvent #signal:leaveNotifyEvent#

    C_WidgetLeaveNotifyEventCallback        ,
    WidgetLeaveNotifyEventCallback          ,
#if ENABLE_OVERLOADING
    WidgetLeaveNotifyEventSignalInfo        ,
#endif
    afterWidgetLeaveNotifyEvent             ,
    genClosure_WidgetLeaveNotifyEvent       ,
    mk_WidgetLeaveNotifyEventCallback       ,
    noWidgetLeaveNotifyEventCallback        ,
    onWidgetLeaveNotifyEvent                ,
    wrap_WidgetLeaveNotifyEventCallback     ,


-- ** map #signal:map#

    C_WidgetMapCallback                     ,
    WidgetMapCallback                       ,
#if ENABLE_OVERLOADING
    WidgetMapSignalInfo                     ,
#endif
    afterWidgetMap                          ,
    genClosure_WidgetMap                    ,
    mk_WidgetMapCallback                    ,
    noWidgetMapCallback                     ,
    onWidgetMap                             ,
    wrap_WidgetMapCallback                  ,


-- ** mapEvent #signal:mapEvent#

    C_WidgetMapEventCallback                ,
    WidgetMapEventCallback                  ,
#if ENABLE_OVERLOADING
    WidgetMapEventSignalInfo                ,
#endif
    afterWidgetMapEvent                     ,
    genClosure_WidgetMapEvent               ,
    mk_WidgetMapEventCallback               ,
    noWidgetMapEventCallback                ,
    onWidgetMapEvent                        ,
    wrap_WidgetMapEventCallback             ,


-- ** mnemonicActivate #signal:mnemonicActivate#

    C_WidgetMnemonicActivateCallback        ,
    WidgetMnemonicActivateCallback          ,
#if ENABLE_OVERLOADING
    WidgetMnemonicActivateSignalInfo        ,
#endif
    afterWidgetMnemonicActivate             ,
    genClosure_WidgetMnemonicActivate       ,
    mk_WidgetMnemonicActivateCallback       ,
    noWidgetMnemonicActivateCallback        ,
    onWidgetMnemonicActivate                ,
    wrap_WidgetMnemonicActivateCallback     ,


-- ** motionNotifyEvent #signal:motionNotifyEvent#

    C_WidgetMotionNotifyEventCallback       ,
    WidgetMotionNotifyEventCallback         ,
#if ENABLE_OVERLOADING
    WidgetMotionNotifyEventSignalInfo       ,
#endif
    afterWidgetMotionNotifyEvent            ,
    genClosure_WidgetMotionNotifyEvent      ,
    mk_WidgetMotionNotifyEventCallback      ,
    noWidgetMotionNotifyEventCallback       ,
    onWidgetMotionNotifyEvent               ,
    wrap_WidgetMotionNotifyEventCallback    ,


-- ** moveFocus #signal:moveFocus#

    C_WidgetMoveFocusCallback               ,
    WidgetMoveFocusCallback                 ,
#if ENABLE_OVERLOADING
    WidgetMoveFocusSignalInfo               ,
#endif
    afterWidgetMoveFocus                    ,
    genClosure_WidgetMoveFocus              ,
    mk_WidgetMoveFocusCallback              ,
    noWidgetMoveFocusCallback               ,
    onWidgetMoveFocus                       ,
    wrap_WidgetMoveFocusCallback            ,


-- ** parentSet #signal:parentSet#

    C_WidgetParentSetCallback               ,
    WidgetParentSetCallback                 ,
#if ENABLE_OVERLOADING
    WidgetParentSetSignalInfo               ,
#endif
    afterWidgetParentSet                    ,
    genClosure_WidgetParentSet              ,
    mk_WidgetParentSetCallback              ,
    noWidgetParentSetCallback               ,
    onWidgetParentSet                       ,
    wrap_WidgetParentSetCallback            ,


-- ** popupMenu #signal:popupMenu#

    C_WidgetPopupMenuCallback               ,
    WidgetPopupMenuCallback                 ,
#if ENABLE_OVERLOADING
    WidgetPopupMenuSignalInfo               ,
#endif
    afterWidgetPopupMenu                    ,
    genClosure_WidgetPopupMenu              ,
    mk_WidgetPopupMenuCallback              ,
    noWidgetPopupMenuCallback               ,
    onWidgetPopupMenu                       ,
    wrap_WidgetPopupMenuCallback            ,


-- ** propertyNotifyEvent #signal:propertyNotifyEvent#

    C_WidgetPropertyNotifyEventCallback     ,
    WidgetPropertyNotifyEventCallback       ,
#if ENABLE_OVERLOADING
    WidgetPropertyNotifyEventSignalInfo     ,
#endif
    afterWidgetPropertyNotifyEvent          ,
    genClosure_WidgetPropertyNotifyEvent    ,
    mk_WidgetPropertyNotifyEventCallback    ,
    noWidgetPropertyNotifyEventCallback     ,
    onWidgetPropertyNotifyEvent             ,
    wrap_WidgetPropertyNotifyEventCallback  ,


-- ** proximityInEvent #signal:proximityInEvent#

    C_WidgetProximityInEventCallback        ,
    WidgetProximityInEventCallback          ,
#if ENABLE_OVERLOADING
    WidgetProximityInEventSignalInfo        ,
#endif
    afterWidgetProximityInEvent             ,
    genClosure_WidgetProximityInEvent       ,
    mk_WidgetProximityInEventCallback       ,
    noWidgetProximityInEventCallback        ,
    onWidgetProximityInEvent                ,
    wrap_WidgetProximityInEventCallback     ,


-- ** proximityOutEvent #signal:proximityOutEvent#

    C_WidgetProximityOutEventCallback       ,
    WidgetProximityOutEventCallback         ,
#if ENABLE_OVERLOADING
    WidgetProximityOutEventSignalInfo       ,
#endif
    afterWidgetProximityOutEvent            ,
    genClosure_WidgetProximityOutEvent      ,
    mk_WidgetProximityOutEventCallback      ,
    noWidgetProximityOutEventCallback       ,
    onWidgetProximityOutEvent               ,
    wrap_WidgetProximityOutEventCallback    ,


-- ** queryTooltip #signal:queryTooltip#

    C_WidgetQueryTooltipCallback            ,
    WidgetQueryTooltipCallback              ,
#if ENABLE_OVERLOADING
    WidgetQueryTooltipSignalInfo            ,
#endif
    afterWidgetQueryTooltip                 ,
    genClosure_WidgetQueryTooltip           ,
    mk_WidgetQueryTooltipCallback           ,
    noWidgetQueryTooltipCallback            ,
    onWidgetQueryTooltip                    ,
    wrap_WidgetQueryTooltipCallback         ,


-- ** realize #signal:realize#

    C_WidgetRealizeCallback                 ,
    WidgetRealizeCallback                   ,
#if ENABLE_OVERLOADING
    WidgetRealizeSignalInfo                 ,
#endif
    afterWidgetRealize                      ,
    genClosure_WidgetRealize                ,
    mk_WidgetRealizeCallback                ,
    noWidgetRealizeCallback                 ,
    onWidgetRealize                         ,
    wrap_WidgetRealizeCallback              ,


-- ** screenChanged #signal:screenChanged#

    C_WidgetScreenChangedCallback           ,
    WidgetScreenChangedCallback             ,
#if ENABLE_OVERLOADING
    WidgetScreenChangedSignalInfo           ,
#endif
    afterWidgetScreenChanged                ,
    genClosure_WidgetScreenChanged          ,
    mk_WidgetScreenChangedCallback          ,
    noWidgetScreenChangedCallback           ,
    onWidgetScreenChanged                   ,
    wrap_WidgetScreenChangedCallback        ,


-- ** scrollEvent #signal:scrollEvent#

    C_WidgetScrollEventCallback             ,
    WidgetScrollEventCallback               ,
#if ENABLE_OVERLOADING
    WidgetScrollEventSignalInfo             ,
#endif
    afterWidgetScrollEvent                  ,
    genClosure_WidgetScrollEvent            ,
    mk_WidgetScrollEventCallback            ,
    noWidgetScrollEventCallback             ,
    onWidgetScrollEvent                     ,
    wrap_WidgetScrollEventCallback          ,


-- ** selectionClearEvent #signal:selectionClearEvent#

    C_WidgetSelectionClearEventCallback     ,
    WidgetSelectionClearEventCallback       ,
#if ENABLE_OVERLOADING
    WidgetSelectionClearEventSignalInfo     ,
#endif
    afterWidgetSelectionClearEvent          ,
    genClosure_WidgetSelectionClearEvent    ,
    mk_WidgetSelectionClearEventCallback    ,
    noWidgetSelectionClearEventCallback     ,
    onWidgetSelectionClearEvent             ,
    wrap_WidgetSelectionClearEventCallback  ,


-- ** selectionGet #signal:selectionGet#

    C_WidgetSelectionGetCallback            ,
    WidgetSelectionGetCallback              ,
#if ENABLE_OVERLOADING
    WidgetSelectionGetSignalInfo            ,
#endif
    afterWidgetSelectionGet                 ,
    genClosure_WidgetSelectionGet           ,
    mk_WidgetSelectionGetCallback           ,
    noWidgetSelectionGetCallback            ,
    onWidgetSelectionGet                    ,
    wrap_WidgetSelectionGetCallback         ,


-- ** selectionNotifyEvent #signal:selectionNotifyEvent#

    C_WidgetSelectionNotifyEventCallback    ,
    WidgetSelectionNotifyEventCallback      ,
#if ENABLE_OVERLOADING
    WidgetSelectionNotifyEventSignalInfo    ,
#endif
    afterWidgetSelectionNotifyEvent         ,
    genClosure_WidgetSelectionNotifyEvent   ,
    mk_WidgetSelectionNotifyEventCallback   ,
    noWidgetSelectionNotifyEventCallback    ,
    onWidgetSelectionNotifyEvent            ,
    wrap_WidgetSelectionNotifyEventCallback ,


-- ** selectionReceived #signal:selectionReceived#

    C_WidgetSelectionReceivedCallback       ,
    WidgetSelectionReceivedCallback         ,
#if ENABLE_OVERLOADING
    WidgetSelectionReceivedSignalInfo       ,
#endif
    afterWidgetSelectionReceived            ,
    genClosure_WidgetSelectionReceived      ,
    mk_WidgetSelectionReceivedCallback      ,
    noWidgetSelectionReceivedCallback       ,
    onWidgetSelectionReceived               ,
    wrap_WidgetSelectionReceivedCallback    ,


-- ** selectionRequestEvent #signal:selectionRequestEvent#

    C_WidgetSelectionRequestEventCallback   ,
    WidgetSelectionRequestEventCallback     ,
#if ENABLE_OVERLOADING
    WidgetSelectionRequestEventSignalInfo   ,
#endif
    afterWidgetSelectionRequestEvent        ,
    genClosure_WidgetSelectionRequestEvent  ,
    mk_WidgetSelectionRequestEventCallback  ,
    noWidgetSelectionRequestEventCallback   ,
    onWidgetSelectionRequestEvent           ,
    wrap_WidgetSelectionRequestEventCallback,


-- ** show #signal:show#

    C_WidgetShowCallback                    ,
    WidgetShowCallback                      ,
#if ENABLE_OVERLOADING
    WidgetShowSignalInfo                    ,
#endif
    afterWidgetShow                         ,
    genClosure_WidgetShow                   ,
    mk_WidgetShowCallback                   ,
    noWidgetShowCallback                    ,
    onWidgetShow                            ,
    wrap_WidgetShowCallback                 ,


-- ** showHelp #signal:showHelp#

    C_WidgetShowHelpCallback                ,
    WidgetShowHelpCallback                  ,
#if ENABLE_OVERLOADING
    WidgetShowHelpSignalInfo                ,
#endif
    afterWidgetShowHelp                     ,
    genClosure_WidgetShowHelp               ,
    mk_WidgetShowHelpCallback               ,
    noWidgetShowHelpCallback                ,
    onWidgetShowHelp                        ,
    wrap_WidgetShowHelpCallback             ,


-- ** sizeAllocate #signal:sizeAllocate#

    C_WidgetSizeAllocateCallback            ,
    WidgetSizeAllocateCallback              ,
#if ENABLE_OVERLOADING
    WidgetSizeAllocateSignalInfo            ,
#endif
    afterWidgetSizeAllocate                 ,
    genClosure_WidgetSizeAllocate           ,
    mk_WidgetSizeAllocateCallback           ,
    noWidgetSizeAllocateCallback            ,
    onWidgetSizeAllocate                    ,
    wrap_WidgetSizeAllocateCallback         ,


-- ** stateChanged #signal:stateChanged#

    C_WidgetStateChangedCallback            ,
    WidgetStateChangedCallback              ,
#if ENABLE_OVERLOADING
    WidgetStateChangedSignalInfo            ,
#endif
    afterWidgetStateChanged                 ,
    genClosure_WidgetStateChanged           ,
    mk_WidgetStateChangedCallback           ,
    noWidgetStateChangedCallback            ,
    onWidgetStateChanged                    ,
    wrap_WidgetStateChangedCallback         ,


-- ** stateFlagsChanged #signal:stateFlagsChanged#

    C_WidgetStateFlagsChangedCallback       ,
    WidgetStateFlagsChangedCallback         ,
#if ENABLE_OVERLOADING
    WidgetStateFlagsChangedSignalInfo       ,
#endif
    afterWidgetStateFlagsChanged            ,
    genClosure_WidgetStateFlagsChanged      ,
    mk_WidgetStateFlagsChangedCallback      ,
    noWidgetStateFlagsChangedCallback       ,
    onWidgetStateFlagsChanged               ,
    wrap_WidgetStateFlagsChangedCallback    ,


-- ** styleSet #signal:styleSet#

    C_WidgetStyleSetCallback                ,
    WidgetStyleSetCallback                  ,
#if ENABLE_OVERLOADING
    WidgetStyleSetSignalInfo                ,
#endif
    afterWidgetStyleSet                     ,
    genClosure_WidgetStyleSet               ,
    mk_WidgetStyleSetCallback               ,
    noWidgetStyleSetCallback                ,
    onWidgetStyleSet                        ,
    wrap_WidgetStyleSetCallback             ,


-- ** styleUpdated #signal:styleUpdated#

    C_WidgetStyleUpdatedCallback            ,
    WidgetStyleUpdatedCallback              ,
#if ENABLE_OVERLOADING
    WidgetStyleUpdatedSignalInfo            ,
#endif
    afterWidgetStyleUpdated                 ,
    genClosure_WidgetStyleUpdated           ,
    mk_WidgetStyleUpdatedCallback           ,
    noWidgetStyleUpdatedCallback            ,
    onWidgetStyleUpdated                    ,
    wrap_WidgetStyleUpdatedCallback         ,


-- ** touchEvent #signal:touchEvent#

    C_WidgetTouchEventCallback              ,
    WidgetTouchEventCallback                ,
#if ENABLE_OVERLOADING
    WidgetTouchEventSignalInfo              ,
#endif
    afterWidgetTouchEvent                   ,
    genClosure_WidgetTouchEvent             ,
    mk_WidgetTouchEventCallback             ,
    noWidgetTouchEventCallback              ,
    onWidgetTouchEvent                      ,
    wrap_WidgetTouchEventCallback           ,


-- ** unmap #signal:unmap#

    C_WidgetUnmapCallback                   ,
    WidgetUnmapCallback                     ,
#if ENABLE_OVERLOADING
    WidgetUnmapSignalInfo                   ,
#endif
    afterWidgetUnmap                        ,
    genClosure_WidgetUnmap                  ,
    mk_WidgetUnmapCallback                  ,
    noWidgetUnmapCallback                   ,
    onWidgetUnmap                           ,
    wrap_WidgetUnmapCallback                ,


-- ** unmapEvent #signal:unmapEvent#

    C_WidgetUnmapEventCallback              ,
    WidgetUnmapEventCallback                ,
#if ENABLE_OVERLOADING
    WidgetUnmapEventSignalInfo              ,
#endif
    afterWidgetUnmapEvent                   ,
    genClosure_WidgetUnmapEvent             ,
    mk_WidgetUnmapEventCallback             ,
    noWidgetUnmapEventCallback              ,
    onWidgetUnmapEvent                      ,
    wrap_WidgetUnmapEventCallback           ,


-- ** unrealize #signal:unrealize#

    C_WidgetUnrealizeCallback               ,
    WidgetUnrealizeCallback                 ,
#if ENABLE_OVERLOADING
    WidgetUnrealizeSignalInfo               ,
#endif
    afterWidgetUnrealize                    ,
    genClosure_WidgetUnrealize              ,
    mk_WidgetUnrealizeCallback              ,
    noWidgetUnrealizeCallback               ,
    onWidgetUnrealize                       ,
    wrap_WidgetUnrealizeCallback            ,


-- ** visibilityNotifyEvent #signal:visibilityNotifyEvent#

    C_WidgetVisibilityNotifyEventCallback   ,
    WidgetVisibilityNotifyEventCallback     ,
#if ENABLE_OVERLOADING
    WidgetVisibilityNotifyEventSignalInfo   ,
#endif
    afterWidgetVisibilityNotifyEvent        ,
    genClosure_WidgetVisibilityNotifyEvent  ,
    mk_WidgetVisibilityNotifyEventCallback  ,
    noWidgetVisibilityNotifyEventCallback   ,
    onWidgetVisibilityNotifyEvent           ,
    wrap_WidgetVisibilityNotifyEventCallback,


-- ** windowStateEvent #signal:windowStateEvent#

    C_WidgetWindowStateEventCallback        ,
    WidgetWindowStateEventCallback          ,
#if ENABLE_OVERLOADING
    WidgetWindowStateEventSignalInfo        ,
#endif
    afterWidgetWindowStateEvent             ,
    genClosure_WidgetWindowStateEvent       ,
    mk_WidgetWindowStateEventCallback       ,
    noWidgetWindowStateEventCallback        ,
    onWidgetWindowStateEvent                ,
    wrap_WidgetWindowStateEventCallback     ,




    ) where

import Data.GI.Base.ShortPrelude
import qualified Data.GI.Base.ShortPrelude as SP
import qualified Data.GI.Base.Overloading as O
import qualified Prelude as P

import qualified Data.GI.Base.Attributes as GI.Attributes
import qualified Data.GI.Base.ManagedPtr as B.ManagedPtr
import qualified Data.GI.Base.GError as B.GError
import qualified Data.GI.Base.GVariant as B.GVariant
import qualified Data.GI.Base.GValue as B.GValue
import qualified Data.GI.Base.GParamSpec as B.GParamSpec
import qualified Data.GI.Base.CallStack as B.CallStack
import qualified Data.Text as T
import qualified Data.ByteString.Char8 as B
import qualified Data.Map as Map
import qualified Foreign.Ptr as FP

import qualified GI.Atk.Interfaces.ImplementorIface as Atk.ImplementorIface
import qualified GI.Atk.Objects.Object as Atk.Object
import qualified GI.Cairo.Structs.Context as Cairo.Context
import qualified GI.Cairo.Structs.FontOptions as Cairo.FontOptions
import qualified GI.Cairo.Structs.Region as Cairo.Region
import qualified GI.GLib.Callbacks as GLib.Callbacks
import qualified GI.GObject.Objects.Object as GObject.Object
import qualified GI.Gdk.Enums as Gdk.Enums
import qualified GI.Gdk.Flags as Gdk.Flags
import qualified GI.Gdk.Objects.Device as Gdk.Device
import qualified GI.Gdk.Objects.Display as Gdk.Display
import qualified GI.Gdk.Objects.DragContext as Gdk.DragContext
import qualified GI.Gdk.Objects.FrameClock as Gdk.FrameClock
import qualified GI.Gdk.Objects.Screen as Gdk.Screen
import qualified GI.Gdk.Objects.Visual as Gdk.Visual
import qualified GI.Gdk.Objects.Window as Gdk.Window
import qualified GI.Gdk.Structs.Atom as Gdk.Atom
import qualified GI.Gdk.Structs.Color as Gdk.Color
import qualified GI.Gdk.Structs.EventAny as Gdk.EventAny
import qualified GI.Gdk.Structs.EventButton as Gdk.EventButton
import qualified GI.Gdk.Structs.EventConfigure as Gdk.EventConfigure
import qualified GI.Gdk.Structs.EventCrossing as Gdk.EventCrossing
import qualified GI.Gdk.Structs.EventExpose as Gdk.EventExpose
import qualified GI.Gdk.Structs.EventFocus as Gdk.EventFocus
import qualified GI.Gdk.Structs.EventGrabBroken as Gdk.EventGrabBroken
import qualified GI.Gdk.Structs.EventKey as Gdk.EventKey
import qualified GI.Gdk.Structs.EventMotion as Gdk.EventMotion
import qualified GI.Gdk.Structs.EventProperty as Gdk.EventProperty
import qualified GI.Gdk.Structs.EventProximity as Gdk.EventProximity
import qualified GI.Gdk.Structs.EventScroll as Gdk.EventScroll
import qualified GI.Gdk.Structs.EventSelection as Gdk.EventSelection
import qualified GI.Gdk.Structs.EventVisibility as Gdk.EventVisibility
import qualified GI.Gdk.Structs.EventWindowState as Gdk.EventWindowState
import qualified GI.Gdk.Structs.RGBA as Gdk.RGBA
import qualified GI.Gdk.Structs.Rectangle as Gdk.Rectangle
import qualified GI.Gdk.Unions.Event as Gdk.Event
import qualified GI.GdkPixbuf.Objects.Pixbuf as GdkPixbuf.Pixbuf
import qualified GI.Gio.Interfaces.ActionGroup as Gio.ActionGroup
import qualified GI.Gio.Interfaces.Icon as Gio.Icon
import qualified GI.Gtk.Callbacks as Gtk.Callbacks
import {-# SOURCE #-} qualified GI.Gtk.Enums as Gtk.Enums
import {-# SOURCE #-} qualified GI.Gtk.Flags as Gtk.Flags
import {-# SOURCE #-} qualified GI.Gtk.Interfaces.Buildable as Gtk.Buildable
import {-# SOURCE #-} qualified GI.Gtk.Objects.AccelGroup as Gtk.AccelGroup
import {-# SOURCE #-} qualified GI.Gtk.Objects.Clipboard as Gtk.Clipboard
import {-# SOURCE #-} qualified GI.Gtk.Objects.Container as Gtk.Container
import {-# SOURCE #-} qualified GI.Gtk.Objects.RcStyle as Gtk.RcStyle
import {-# SOURCE #-} qualified GI.Gtk.Objects.Settings as Gtk.Settings
import {-# SOURCE #-} qualified GI.Gtk.Objects.Style as Gtk.Style
import {-# SOURCE #-} qualified GI.Gtk.Objects.StyleContext as Gtk.StyleContext
import {-# SOURCE #-} qualified GI.Gtk.Objects.Tooltip as Gtk.Tooltip
import {-# SOURCE #-} qualified GI.Gtk.Objects.Window as Gtk.Window
import {-# SOURCE #-} qualified GI.Gtk.Structs.Requisition as Gtk.Requisition
import {-# SOURCE #-} qualified GI.Gtk.Structs.SelectionData as Gtk.SelectionData
import {-# SOURCE #-} qualified GI.Gtk.Structs.TargetEntry as Gtk.TargetEntry
import {-# SOURCE #-} qualified GI.Gtk.Structs.TargetList as Gtk.TargetList
import {-# SOURCE #-} qualified GI.Gtk.Structs.WidgetPath as Gtk.WidgetPath
import qualified GI.Pango.Objects.Context as Pango.Context
import qualified GI.Pango.Objects.FontMap as Pango.FontMap
import qualified GI.Pango.Objects.Layout as Pango.Layout
import qualified GI.Pango.Structs.FontDescription as Pango.FontDescription

-- | Memory-managed wrapper type.
newtype Widget = Widget (ManagedPtr Widget)
foreign import ccall "gtk_widget_get_type"
    c_gtk_widget_get_type :: IO GType

instance GObject Widget where
    gobjectType _ = c_gtk_widget_get_type


-- | Type class for types which can be safely cast to `Widget`, for instance with `toWidget`.
class GObject o => IsWidget o
#if MIN_VERSION_base(4,9,0)
instance {-# OVERLAPPABLE #-} (GObject a, O.UnknownAncestorError Widget a) =>
    IsWidget a
#endif
instance IsWidget Widget
instance GObject.Object.IsObject Widget
instance Atk.ImplementorIface.IsImplementorIface Widget
instance Gtk.Buildable.IsBuildable Widget

-- | Cast to `Widget`, for types for which this is known to be safe. For general casts, use `Data.GI.Base.ManagedPtr.castTo`.
toWidget :: (MonadIO m, IsWidget o) => o -> m Widget
toWidget = liftIO . unsafeCastTo Widget

-- | A convenience alias for `Nothing` :: `Maybe` `Widget`.
noWidget :: Maybe Widget
noWidget = Nothing

#if ENABLE_OVERLOADING
type family ResolveWidgetMethod (t :: Symbol) (o :: *) :: * where
    ResolveWidgetMethod "activate" o = WidgetActivateMethodInfo
    ResolveWidgetMethod "addAccelerator" o = WidgetAddAcceleratorMethodInfo
    ResolveWidgetMethod "addChild" o = Gtk.Buildable.BuildableAddChildMethodInfo
    ResolveWidgetMethod "addDeviceEvents" o = WidgetAddDeviceEventsMethodInfo
    ResolveWidgetMethod "addEvents" o = WidgetAddEventsMethodInfo
    ResolveWidgetMethod "addMnemonicLabel" o = WidgetAddMnemonicLabelMethodInfo
    ResolveWidgetMethod "addTickCallback" o = WidgetAddTickCallbackMethodInfo
    ResolveWidgetMethod "bindProperty" o = GObject.Object.ObjectBindPropertyMethodInfo
    ResolveWidgetMethod "bindPropertyFull" o = GObject.Object.ObjectBindPropertyFullMethodInfo
    ResolveWidgetMethod "canActivateAccel" o = WidgetCanActivateAccelMethodInfo
    ResolveWidgetMethod "childFocus" o = WidgetChildFocusMethodInfo
    ResolveWidgetMethod "childNotify" o = WidgetChildNotifyMethodInfo
    ResolveWidgetMethod "classPath" o = WidgetClassPathMethodInfo
    ResolveWidgetMethod "computeExpand" o = WidgetComputeExpandMethodInfo
    ResolveWidgetMethod "constructChild" o = Gtk.Buildable.BuildableConstructChildMethodInfo
    ResolveWidgetMethod "createPangoContext" o = WidgetCreatePangoContextMethodInfo
    ResolveWidgetMethod "createPangoLayout" o = WidgetCreatePangoLayoutMethodInfo
    ResolveWidgetMethod "customFinished" o = Gtk.Buildable.BuildableCustomFinishedMethodInfo
    ResolveWidgetMethod "customTagEnd" o = Gtk.Buildable.BuildableCustomTagEndMethodInfo
    ResolveWidgetMethod "customTagStart" o = Gtk.Buildable.BuildableCustomTagStartMethodInfo
    ResolveWidgetMethod "destroy" o = WidgetDestroyMethodInfo
    ResolveWidgetMethod "destroyed" o = WidgetDestroyedMethodInfo
    ResolveWidgetMethod "deviceIsShadowed" o = WidgetDeviceIsShadowedMethodInfo
    ResolveWidgetMethod "dragBegin" o = WidgetDragBeginMethodInfo
    ResolveWidgetMethod "dragBeginWithCoordinates" o = WidgetDragBeginWithCoordinatesMethodInfo
    ResolveWidgetMethod "dragCheckThreshold" o = WidgetDragCheckThresholdMethodInfo
    ResolveWidgetMethod "dragDestAddImageTargets" o = WidgetDragDestAddImageTargetsMethodInfo
    ResolveWidgetMethod "dragDestAddTextTargets" o = WidgetDragDestAddTextTargetsMethodInfo
    ResolveWidgetMethod "dragDestAddUriTargets" o = WidgetDragDestAddUriTargetsMethodInfo
    ResolveWidgetMethod "dragDestFindTarget" o = WidgetDragDestFindTargetMethodInfo
    ResolveWidgetMethod "dragDestGetTargetList" o = WidgetDragDestGetTargetListMethodInfo
    ResolveWidgetMethod "dragDestGetTrackMotion" o = WidgetDragDestGetTrackMotionMethodInfo
    ResolveWidgetMethod "dragDestSet" o = WidgetDragDestSetMethodInfo
    ResolveWidgetMethod "dragDestSetProxy" o = WidgetDragDestSetProxyMethodInfo
    ResolveWidgetMethod "dragDestSetTargetList" o = WidgetDragDestSetTargetListMethodInfo
    ResolveWidgetMethod "dragDestSetTrackMotion" o = WidgetDragDestSetTrackMotionMethodInfo
    ResolveWidgetMethod "dragDestUnset" o = WidgetDragDestUnsetMethodInfo
    ResolveWidgetMethod "dragGetData" o = WidgetDragGetDataMethodInfo
    ResolveWidgetMethod "dragHighlight" o = WidgetDragHighlightMethodInfo
    ResolveWidgetMethod "dragSourceAddImageTargets" o = WidgetDragSourceAddImageTargetsMethodInfo
    ResolveWidgetMethod "dragSourceAddTextTargets" o = WidgetDragSourceAddTextTargetsMethodInfo
    ResolveWidgetMethod "dragSourceAddUriTargets" o = WidgetDragSourceAddUriTargetsMethodInfo
    ResolveWidgetMethod "dragSourceGetTargetList" o = WidgetDragSourceGetTargetListMethodInfo
    ResolveWidgetMethod "dragSourceSet" o = WidgetDragSourceSetMethodInfo
    ResolveWidgetMethod "dragSourceSetIconGicon" o = WidgetDragSourceSetIconGiconMethodInfo
    ResolveWidgetMethod "dragSourceSetIconName" o = WidgetDragSourceSetIconNameMethodInfo
    ResolveWidgetMethod "dragSourceSetIconPixbuf" o = WidgetDragSourceSetIconPixbufMethodInfo
    ResolveWidgetMethod "dragSourceSetIconStock" o = WidgetDragSourceSetIconStockMethodInfo
    ResolveWidgetMethod "dragSourceSetTargetList" o = WidgetDragSourceSetTargetListMethodInfo
    ResolveWidgetMethod "dragSourceUnset" o = WidgetDragSourceUnsetMethodInfo
    ResolveWidgetMethod "dragUnhighlight" o = WidgetDragUnhighlightMethodInfo
    ResolveWidgetMethod "draw" o = WidgetDrawMethodInfo
    ResolveWidgetMethod "ensureStyle" o = WidgetEnsureStyleMethodInfo
    ResolveWidgetMethod "errorBell" o = WidgetErrorBellMethodInfo
    ResolveWidgetMethod "event" o = WidgetEventMethodInfo
    ResolveWidgetMethod "forceFloating" o = GObject.Object.ObjectForceFloatingMethodInfo
    ResolveWidgetMethod "freezeChildNotify" o = WidgetFreezeChildNotifyMethodInfo
    ResolveWidgetMethod "freezeNotify" o = GObject.Object.ObjectFreezeNotifyMethodInfo
    ResolveWidgetMethod "getv" o = GObject.Object.ObjectGetvMethodInfo
    ResolveWidgetMethod "grabAdd" o = WidgetGrabAddMethodInfo
    ResolveWidgetMethod "grabDefault" o = WidgetGrabDefaultMethodInfo
    ResolveWidgetMethod "grabFocus" o = WidgetGrabFocusMethodInfo
    ResolveWidgetMethod "grabRemove" o = WidgetGrabRemoveMethodInfo
    ResolveWidgetMethod "hasDefault" o = WidgetHasDefaultMethodInfo
    ResolveWidgetMethod "hasFocus" o = WidgetHasFocusMethodInfo
    ResolveWidgetMethod "hasGrab" o = WidgetHasGrabMethodInfo
    ResolveWidgetMethod "hasRcStyle" o = WidgetHasRcStyleMethodInfo
    ResolveWidgetMethod "hasScreen" o = WidgetHasScreenMethodInfo
    ResolveWidgetMethod "hasVisibleFocus" o = WidgetHasVisibleFocusMethodInfo
    ResolveWidgetMethod "hide" o = WidgetHideMethodInfo
    ResolveWidgetMethod "hideOnDelete" o = WidgetHideOnDeleteMethodInfo
    ResolveWidgetMethod "inDestruction" o = WidgetInDestructionMethodInfo
    ResolveWidgetMethod "initTemplate" o = WidgetInitTemplateMethodInfo
    ResolveWidgetMethod "inputShapeCombineRegion" o = WidgetInputShapeCombineRegionMethodInfo
    ResolveWidgetMethod "insertActionGroup" o = WidgetInsertActionGroupMethodInfo
    ResolveWidgetMethod "intersect" o = WidgetIntersectMethodInfo
    ResolveWidgetMethod "isAncestor" o = WidgetIsAncestorMethodInfo
    ResolveWidgetMethod "isComposited" o = WidgetIsCompositedMethodInfo
    ResolveWidgetMethod "isDrawable" o = WidgetIsDrawableMethodInfo
    ResolveWidgetMethod "isFloating" o = GObject.Object.ObjectIsFloatingMethodInfo
    ResolveWidgetMethod "isFocus" o = WidgetIsFocusMethodInfo
    ResolveWidgetMethod "isSensitive" o = WidgetIsSensitiveMethodInfo
    ResolveWidgetMethod "isToplevel" o = WidgetIsToplevelMethodInfo
    ResolveWidgetMethod "isVisible" o = WidgetIsVisibleMethodInfo
    ResolveWidgetMethod "keynavFailed" o = WidgetKeynavFailedMethodInfo
    ResolveWidgetMethod "listAccelClosures" o = WidgetListAccelClosuresMethodInfo
    ResolveWidgetMethod "listActionPrefixes" o = WidgetListActionPrefixesMethodInfo
    ResolveWidgetMethod "listMnemonicLabels" o = WidgetListMnemonicLabelsMethodInfo
    ResolveWidgetMethod "map" o = WidgetMapMethodInfo
    ResolveWidgetMethod "mnemonicActivate" o = WidgetMnemonicActivateMethodInfo
    ResolveWidgetMethod "modifyBase" o = WidgetModifyBaseMethodInfo
    ResolveWidgetMethod "modifyBg" o = WidgetModifyBgMethodInfo
    ResolveWidgetMethod "modifyCursor" o = WidgetModifyCursorMethodInfo
    ResolveWidgetMethod "modifyFg" o = WidgetModifyFgMethodInfo
    ResolveWidgetMethod "modifyFont" o = WidgetModifyFontMethodInfo
    ResolveWidgetMethod "modifyStyle" o = WidgetModifyStyleMethodInfo
    ResolveWidgetMethod "modifyText" o = WidgetModifyTextMethodInfo
    ResolveWidgetMethod "notify" o = GObject.Object.ObjectNotifyMethodInfo
    ResolveWidgetMethod "notifyByPspec" o = GObject.Object.ObjectNotifyByPspecMethodInfo
    ResolveWidgetMethod "overrideBackgroundColor" o = WidgetOverrideBackgroundColorMethodInfo
    ResolveWidgetMethod "overrideColor" o = WidgetOverrideColorMethodInfo
    ResolveWidgetMethod "overrideCursor" o = WidgetOverrideCursorMethodInfo
    ResolveWidgetMethod "overrideFont" o = WidgetOverrideFontMethodInfo
    ResolveWidgetMethod "overrideSymbolicColor" o = WidgetOverrideSymbolicColorMethodInfo
    ResolveWidgetMethod "parserFinished" o = Gtk.Buildable.BuildableParserFinishedMethodInfo
    ResolveWidgetMethod "path" o = WidgetPathMethodInfo
    ResolveWidgetMethod "queueAllocate" o = WidgetQueueAllocateMethodInfo
    ResolveWidgetMethod "queueComputeExpand" o = WidgetQueueComputeExpandMethodInfo
    ResolveWidgetMethod "queueDraw" o = WidgetQueueDrawMethodInfo
    ResolveWidgetMethod "queueDrawArea" o = WidgetQueueDrawAreaMethodInfo
    ResolveWidgetMethod "queueDrawRegion" o = WidgetQueueDrawRegionMethodInfo
    ResolveWidgetMethod "queueResize" o = WidgetQueueResizeMethodInfo
    ResolveWidgetMethod "queueResizeNoRedraw" o = WidgetQueueResizeNoRedrawMethodInfo
    ResolveWidgetMethod "realize" o = WidgetRealizeMethodInfo
    ResolveWidgetMethod "ref" o = GObject.Object.ObjectRefMethodInfo
    ResolveWidgetMethod "refSink" o = GObject.Object.ObjectRefSinkMethodInfo
    ResolveWidgetMethod "regionIntersect" o = WidgetRegionIntersectMethodInfo
    ResolveWidgetMethod "registerWindow" o = WidgetRegisterWindowMethodInfo
    ResolveWidgetMethod "removeAccelerator" o = WidgetRemoveAcceleratorMethodInfo
    ResolveWidgetMethod "removeMnemonicLabel" o = WidgetRemoveMnemonicLabelMethodInfo
    ResolveWidgetMethod "removeTickCallback" o = WidgetRemoveTickCallbackMethodInfo
    ResolveWidgetMethod "renderIcon" o = WidgetRenderIconMethodInfo
    ResolveWidgetMethod "renderIconPixbuf" o = WidgetRenderIconPixbufMethodInfo
    ResolveWidgetMethod "reparent" o = WidgetReparentMethodInfo
    ResolveWidgetMethod "resetRcStyles" o = WidgetResetRcStylesMethodInfo
    ResolveWidgetMethod "resetStyle" o = WidgetResetStyleMethodInfo
    ResolveWidgetMethod "runDispose" o = GObject.Object.ObjectRunDisposeMethodInfo
    ResolveWidgetMethod "sendExpose" o = WidgetSendExposeMethodInfo
    ResolveWidgetMethod "sendFocusChange" o = WidgetSendFocusChangeMethodInfo
    ResolveWidgetMethod "shapeCombineRegion" o = WidgetShapeCombineRegionMethodInfo
    ResolveWidgetMethod "show" o = WidgetShowMethodInfo
    ResolveWidgetMethod "showAll" o = WidgetShowAllMethodInfo
    ResolveWidgetMethod "showNow" o = WidgetShowNowMethodInfo
    ResolveWidgetMethod "sizeAllocate" o = WidgetSizeAllocateMethodInfo
    ResolveWidgetMethod "sizeAllocateWithBaseline" o = WidgetSizeAllocateWithBaselineMethodInfo
    ResolveWidgetMethod "sizeRequest" o = WidgetSizeRequestMethodInfo
    ResolveWidgetMethod "stealData" o = GObject.Object.ObjectStealDataMethodInfo
    ResolveWidgetMethod "stealQdata" o = GObject.Object.ObjectStealQdataMethodInfo
    ResolveWidgetMethod "styleAttach" o = WidgetStyleAttachMethodInfo
    ResolveWidgetMethod "styleGetProperty" o = WidgetStyleGetPropertyMethodInfo
    ResolveWidgetMethod "thawChildNotify" o = WidgetThawChildNotifyMethodInfo
    ResolveWidgetMethod "thawNotify" o = GObject.Object.ObjectThawNotifyMethodInfo
    ResolveWidgetMethod "translateCoordinates" o = WidgetTranslateCoordinatesMethodInfo
    ResolveWidgetMethod "triggerTooltipQuery" o = WidgetTriggerTooltipQueryMethodInfo
    ResolveWidgetMethod "unmap" o = WidgetUnmapMethodInfo
    ResolveWidgetMethod "unparent" o = WidgetUnparentMethodInfo
    ResolveWidgetMethod "unrealize" o = WidgetUnrealizeMethodInfo
    ResolveWidgetMethod "unref" o = GObject.Object.ObjectUnrefMethodInfo
    ResolveWidgetMethod "unregisterWindow" o = WidgetUnregisterWindowMethodInfo
    ResolveWidgetMethod "unsetStateFlags" o = WidgetUnsetStateFlagsMethodInfo
    ResolveWidgetMethod "watchClosure" o = GObject.Object.ObjectWatchClosureMethodInfo
    ResolveWidgetMethod "getAccessible" o = WidgetGetAccessibleMethodInfo
    ResolveWidgetMethod "getActionGroup" o = WidgetGetActionGroupMethodInfo
    ResolveWidgetMethod "getAllocatedBaseline" o = WidgetGetAllocatedBaselineMethodInfo
    ResolveWidgetMethod "getAllocatedHeight" o = WidgetGetAllocatedHeightMethodInfo
    ResolveWidgetMethod "getAllocatedSize" o = WidgetGetAllocatedSizeMethodInfo
    ResolveWidgetMethod "getAllocatedWidth" o = WidgetGetAllocatedWidthMethodInfo
    ResolveWidgetMethod "getAllocation" o = WidgetGetAllocationMethodInfo
    ResolveWidgetMethod "getAncestor" o = WidgetGetAncestorMethodInfo
    ResolveWidgetMethod "getAppPaintable" o = WidgetGetAppPaintableMethodInfo
    ResolveWidgetMethod "getCanDefault" o = WidgetGetCanDefaultMethodInfo
    ResolveWidgetMethod "getCanFocus" o = WidgetGetCanFocusMethodInfo
    ResolveWidgetMethod "getChildRequisition" o = WidgetGetChildRequisitionMethodInfo
    ResolveWidgetMethod "getChildVisible" o = WidgetGetChildVisibleMethodInfo
    ResolveWidgetMethod "getClip" o = WidgetGetClipMethodInfo
    ResolveWidgetMethod "getClipboard" o = WidgetGetClipboardMethodInfo
    ResolveWidgetMethod "getCompositeName" o = WidgetGetCompositeNameMethodInfo
    ResolveWidgetMethod "getData" o = GObject.Object.ObjectGetDataMethodInfo
    ResolveWidgetMethod "getDeviceEnabled" o = WidgetGetDeviceEnabledMethodInfo
    ResolveWidgetMethod "getDeviceEvents" o = WidgetGetDeviceEventsMethodInfo
    ResolveWidgetMethod "getDirection" o = WidgetGetDirectionMethodInfo
    ResolveWidgetMethod "getDisplay" o = WidgetGetDisplayMethodInfo
    ResolveWidgetMethod "getDoubleBuffered" o = WidgetGetDoubleBufferedMethodInfo
    ResolveWidgetMethod "getEvents" o = WidgetGetEventsMethodInfo
    ResolveWidgetMethod "getFocusOnClick" o = WidgetGetFocusOnClickMethodInfo
    ResolveWidgetMethod "getFontMap" o = WidgetGetFontMapMethodInfo
    ResolveWidgetMethod "getFontOptions" o = WidgetGetFontOptionsMethodInfo
    ResolveWidgetMethod "getFrameClock" o = WidgetGetFrameClockMethodInfo
    ResolveWidgetMethod "getHalign" o = WidgetGetHalignMethodInfo
    ResolveWidgetMethod "getHasTooltip" o = WidgetGetHasTooltipMethodInfo
    ResolveWidgetMethod "getHasWindow" o = WidgetGetHasWindowMethodInfo
    ResolveWidgetMethod "getHexpand" o = WidgetGetHexpandMethodInfo
    ResolveWidgetMethod "getHexpandSet" o = WidgetGetHexpandSetMethodInfo
    ResolveWidgetMethod "getInternalChild" o = Gtk.Buildable.BuildableGetInternalChildMethodInfo
    ResolveWidgetMethod "getMapped" o = WidgetGetMappedMethodInfo
    ResolveWidgetMethod "getMarginBottom" o = WidgetGetMarginBottomMethodInfo
    ResolveWidgetMethod "getMarginEnd" o = WidgetGetMarginEndMethodInfo
    ResolveWidgetMethod "getMarginLeft" o = WidgetGetMarginLeftMethodInfo
    ResolveWidgetMethod "getMarginRight" o = WidgetGetMarginRightMethodInfo
    ResolveWidgetMethod "getMarginStart" o = WidgetGetMarginStartMethodInfo
    ResolveWidgetMethod "getMarginTop" o = WidgetGetMarginTopMethodInfo
    ResolveWidgetMethod "getModifierMask" o = WidgetGetModifierMaskMethodInfo
    ResolveWidgetMethod "getModifierStyle" o = WidgetGetModifierStyleMethodInfo
    ResolveWidgetMethod "getName" o = WidgetGetNameMethodInfo
    ResolveWidgetMethod "getNoShowAll" o = WidgetGetNoShowAllMethodInfo
    ResolveWidgetMethod "getOpacity" o = WidgetGetOpacityMethodInfo
    ResolveWidgetMethod "getPangoContext" o = WidgetGetPangoContextMethodInfo
    ResolveWidgetMethod "getParent" o = WidgetGetParentMethodInfo
    ResolveWidgetMethod "getParentWindow" o = WidgetGetParentWindowMethodInfo
    ResolveWidgetMethod "getPath" o = WidgetGetPathMethodInfo
    ResolveWidgetMethod "getPointer" o = WidgetGetPointerMethodInfo
    ResolveWidgetMethod "getPreferredHeight" o = WidgetGetPreferredHeightMethodInfo
    ResolveWidgetMethod "getPreferredHeightAndBaselineForWidth" o = WidgetGetPreferredHeightAndBaselineForWidthMethodInfo
    ResolveWidgetMethod "getPreferredHeightForWidth" o = WidgetGetPreferredHeightForWidthMethodInfo
    ResolveWidgetMethod "getPreferredSize" o = WidgetGetPreferredSizeMethodInfo
    ResolveWidgetMethod "getPreferredWidth" o = WidgetGetPreferredWidthMethodInfo
    ResolveWidgetMethod "getPreferredWidthForHeight" o = WidgetGetPreferredWidthForHeightMethodInfo
    ResolveWidgetMethod "getProperty" o = GObject.Object.ObjectGetPropertyMethodInfo
    ResolveWidgetMethod "getQdata" o = GObject.Object.ObjectGetQdataMethodInfo
    ResolveWidgetMethod "getRealized" o = WidgetGetRealizedMethodInfo
    ResolveWidgetMethod "getReceivesDefault" o = WidgetGetReceivesDefaultMethodInfo
    ResolveWidgetMethod "getRequestMode" o = WidgetGetRequestModeMethodInfo
    ResolveWidgetMethod "getRequisition" o = WidgetGetRequisitionMethodInfo
    ResolveWidgetMethod "getRootWindow" o = WidgetGetRootWindowMethodInfo
    ResolveWidgetMethod "getScaleFactor" o = WidgetGetScaleFactorMethodInfo
    ResolveWidgetMethod "getScreen" o = WidgetGetScreenMethodInfo
    ResolveWidgetMethod "getSensitive" o = WidgetGetSensitiveMethodInfo
    ResolveWidgetMethod "getSettings" o = WidgetGetSettingsMethodInfo
    ResolveWidgetMethod "getSizeRequest" o = WidgetGetSizeRequestMethodInfo
    ResolveWidgetMethod "getState" o = WidgetGetStateMethodInfo
    ResolveWidgetMethod "getStateFlags" o = WidgetGetStateFlagsMethodInfo
    ResolveWidgetMethod "getStyle" o = WidgetGetStyleMethodInfo
    ResolveWidgetMethod "getStyleContext" o = WidgetGetStyleContextMethodInfo
    ResolveWidgetMethod "getSupportMultidevice" o = WidgetGetSupportMultideviceMethodInfo
    ResolveWidgetMethod "getTemplateChild" o = WidgetGetTemplateChildMethodInfo
    ResolveWidgetMethod "getTooltipMarkup" o = WidgetGetTooltipMarkupMethodInfo
    ResolveWidgetMethod "getTooltipText" o = WidgetGetTooltipTextMethodInfo
    ResolveWidgetMethod "getTooltipWindow" o = WidgetGetTooltipWindowMethodInfo
    ResolveWidgetMethod "getToplevel" o = WidgetGetToplevelMethodInfo
    ResolveWidgetMethod "getValign" o = WidgetGetValignMethodInfo
    ResolveWidgetMethod "getValignWithBaseline" o = WidgetGetValignWithBaselineMethodInfo
    ResolveWidgetMethod "getVexpand" o = WidgetGetVexpandMethodInfo
    ResolveWidgetMethod "getVexpandSet" o = WidgetGetVexpandSetMethodInfo
    ResolveWidgetMethod "getVisible" o = WidgetGetVisibleMethodInfo
    ResolveWidgetMethod "getVisual" o = WidgetGetVisualMethodInfo
    ResolveWidgetMethod "getWindow" o = WidgetGetWindowMethodInfo
    ResolveWidgetMethod "setAccelPath" o = WidgetSetAccelPathMethodInfo
    ResolveWidgetMethod "setAllocation" o = WidgetSetAllocationMethodInfo
    ResolveWidgetMethod "setAppPaintable" o = WidgetSetAppPaintableMethodInfo
    ResolveWidgetMethod "setBuildableProperty" o = Gtk.Buildable.BuildableSetBuildablePropertyMethodInfo
    ResolveWidgetMethod "setCanDefault" o = WidgetSetCanDefaultMethodInfo
    ResolveWidgetMethod "setCanFocus" o = WidgetSetCanFocusMethodInfo
    ResolveWidgetMethod "setChildVisible" o = WidgetSetChildVisibleMethodInfo
    ResolveWidgetMethod "setClip" o = WidgetSetClipMethodInfo
    ResolveWidgetMethod "setCompositeName" o = WidgetSetCompositeNameMethodInfo
    ResolveWidgetMethod "setData" o = GObject.Object.ObjectSetDataMethodInfo
    ResolveWidgetMethod "setDeviceEnabled" o = WidgetSetDeviceEnabledMethodInfo
    ResolveWidgetMethod "setDeviceEvents" o = WidgetSetDeviceEventsMethodInfo
    ResolveWidgetMethod "setDirection" o = WidgetSetDirectionMethodInfo
    ResolveWidgetMethod "setDoubleBuffered" o = WidgetSetDoubleBufferedMethodInfo
    ResolveWidgetMethod "setEvents" o = WidgetSetEventsMethodInfo
    ResolveWidgetMethod "setFocusOnClick" o = WidgetSetFocusOnClickMethodInfo
    ResolveWidgetMethod "setFontMap" o = WidgetSetFontMapMethodInfo
    ResolveWidgetMethod "setFontOptions" o = WidgetSetFontOptionsMethodInfo
    ResolveWidgetMethod "setHalign" o = WidgetSetHalignMethodInfo
    ResolveWidgetMethod "setHasTooltip" o = WidgetSetHasTooltipMethodInfo
    ResolveWidgetMethod "setHasWindow" o = WidgetSetHasWindowMethodInfo
    ResolveWidgetMethod "setHexpand" o = WidgetSetHexpandMethodInfo
    ResolveWidgetMethod "setHexpandSet" o = WidgetSetHexpandSetMethodInfo
    ResolveWidgetMethod "setMapped" o = WidgetSetMappedMethodInfo
    ResolveWidgetMethod "setMarginBottom" o = WidgetSetMarginBottomMethodInfo
    ResolveWidgetMethod "setMarginEnd" o = WidgetSetMarginEndMethodInfo
    ResolveWidgetMethod "setMarginLeft" o = WidgetSetMarginLeftMethodInfo
    ResolveWidgetMethod "setMarginRight" o = WidgetSetMarginRightMethodInfo
    ResolveWidgetMethod "setMarginStart" o = WidgetSetMarginStartMethodInfo
    ResolveWidgetMethod "setMarginTop" o = WidgetSetMarginTopMethodInfo
    ResolveWidgetMethod "setName" o = WidgetSetNameMethodInfo
    ResolveWidgetMethod "setNoShowAll" o = WidgetSetNoShowAllMethodInfo
    ResolveWidgetMethod "setOpacity" o = WidgetSetOpacityMethodInfo
    ResolveWidgetMethod "setParent" o = WidgetSetParentMethodInfo
    ResolveWidgetMethod "setParentWindow" o = WidgetSetParentWindowMethodInfo
    ResolveWidgetMethod "setProperty" o = GObject.Object.ObjectSetPropertyMethodInfo
    ResolveWidgetMethod "setRealized" o = WidgetSetRealizedMethodInfo
    ResolveWidgetMethod "setReceivesDefault" o = WidgetSetReceivesDefaultMethodInfo
    ResolveWidgetMethod "setRedrawOnAllocate" o = WidgetSetRedrawOnAllocateMethodInfo
    ResolveWidgetMethod "setSensitive" o = WidgetSetSensitiveMethodInfo
    ResolveWidgetMethod "setSizeRequest" o = WidgetSetSizeRequestMethodInfo
    ResolveWidgetMethod "setState" o = WidgetSetStateMethodInfo
    ResolveWidgetMethod "setStateFlags" o = WidgetSetStateFlagsMethodInfo
    ResolveWidgetMethod "setStyle" o = WidgetSetStyleMethodInfo
    ResolveWidgetMethod "setSupportMultidevice" o = WidgetSetSupportMultideviceMethodInfo
    ResolveWidgetMethod "setTooltipMarkup" o = WidgetSetTooltipMarkupMethodInfo
    ResolveWidgetMethod "setTooltipText" o = WidgetSetTooltipTextMethodInfo
    ResolveWidgetMethod "setTooltipWindow" o = WidgetSetTooltipWindowMethodInfo
    ResolveWidgetMethod "setValign" o = WidgetSetValignMethodInfo
    ResolveWidgetMethod "setVexpand" o = WidgetSetVexpandMethodInfo
    ResolveWidgetMethod "setVexpandSet" o = WidgetSetVexpandSetMethodInfo
    ResolveWidgetMethod "setVisible" o = WidgetSetVisibleMethodInfo
    ResolveWidgetMethod "setVisual" o = WidgetSetVisualMethodInfo
    ResolveWidgetMethod "setWindow" o = WidgetSetWindowMethodInfo
    ResolveWidgetMethod l o = O.MethodResolutionFailed l o

instance (info ~ ResolveWidgetMethod t Widget, O.MethodInfo info Widget p) => O.IsLabelProxy t (Widget -> p) where
    fromLabelProxy _ = O.overloadedMethod (O.MethodProxy :: O.MethodProxy info)

#if MIN_VERSION_base(4,9,0)
instance (info ~ ResolveWidgetMethod t Widget, O.MethodInfo info Widget p) => O.IsLabel t (Widget -> p) where
#if MIN_VERSION_base(4,10,0)
    fromLabel = O.overloadedMethod (O.MethodProxy :: O.MethodProxy info)
#else
    fromLabel _ = O.overloadedMethod (O.MethodProxy :: O.MethodProxy info)
#endif
#endif

#endif

-- signal Widget::accel-closures-changed
{- |
/No description available in the introspection data./
-}
type WidgetAccelClosuresChangedCallback =
    IO ()

-- | A convenience synonym for @`Nothing` :: `Maybe` `WidgetAccelClosuresChangedCallback`@.
noWidgetAccelClosuresChangedCallback :: Maybe WidgetAccelClosuresChangedCallback
noWidgetAccelClosuresChangedCallback = Nothing

-- | Type for the callback on the (unwrapped) C side.
type C_WidgetAccelClosuresChangedCallback =
    Ptr () ->                               -- object
    Ptr () ->                               -- user_data
    IO ()

-- | Generate a function pointer callable from C code, from a `C_WidgetAccelClosuresChangedCallback`.
foreign import ccall "wrapper"
    mk_WidgetAccelClosuresChangedCallback :: C_WidgetAccelClosuresChangedCallback -> IO (FunPtr C_WidgetAccelClosuresChangedCallback)

-- | Wrap the callback into a `Closure`.
genClosure_WidgetAccelClosuresChanged :: WidgetAccelClosuresChangedCallback -> IO Closure
genClosure_WidgetAccelClosuresChanged cb = do
    let cb' = wrap_WidgetAccelClosuresChangedCallback cb
    mk_WidgetAccelClosuresChangedCallback cb' >>= newCClosure


-- | Wrap a `WidgetAccelClosuresChangedCallback` into a `C_WidgetAccelClosuresChangedCallback`.
wrap_WidgetAccelClosuresChangedCallback ::
    WidgetAccelClosuresChangedCallback ->
    C_WidgetAccelClosuresChangedCallback
wrap_WidgetAccelClosuresChangedCallback _cb _ _ = do
    _cb


{- |
Connect a signal handler for the “@accel-closures-changed@” signal, to be run before the default handler.
When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to

@
'Data.GI.Base.Signals.on' widget #accelClosuresChanged callback
@
-}
onWidgetAccelClosuresChanged :: (IsWidget a, MonadIO m) => a -> WidgetAccelClosuresChangedCallback -> m SignalHandlerId
onWidgetAccelClosuresChanged obj cb = liftIO $ do
    let cb' = wrap_WidgetAccelClosuresChangedCallback cb
    cb'' <- mk_WidgetAccelClosuresChangedCallback cb'
    connectSignalFunPtr obj "accel-closures-changed" cb'' SignalConnectBefore

{- |
Connect a signal handler for the “@accel-closures-changed@” signal, to be run after the default handler.
When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to

@
'Data.GI.Base.Signals.after' widget #accelClosuresChanged callback
@
-}
afterWidgetAccelClosuresChanged :: (IsWidget a, MonadIO m) => a -> WidgetAccelClosuresChangedCallback -> m SignalHandlerId
afterWidgetAccelClosuresChanged obj cb = liftIO $ do
    let cb' = wrap_WidgetAccelClosuresChangedCallback cb
    cb'' <- mk_WidgetAccelClosuresChangedCallback cb'
    connectSignalFunPtr obj "accel-closures-changed" cb'' SignalConnectAfter


-- signal Widget::button-press-event
{- |
The ::button-press-event signal will be emitted when a button
(typically from a mouse) is pressed.

To receive this signal, the 'GI.Gdk.Objects.Window.Window' associated to the
widget needs to enable the @/GDK_BUTTON_PRESS_MASK/@ mask.

This signal will be sent to the grab widget if there is one.
-}
type WidgetButtonPressEventCallback =
    Gdk.EventButton.EventButton
    {- ^ /@event@/: the 'GI.Gdk.Structs.EventButton.EventButton' which triggered
  this signal. -}
    -> IO Bool
    {- ^ __Returns:__ 'True' to stop other handlers from being invoked for the event.
  'False' to propagate the event further. -}

-- | A convenience synonym for @`Nothing` :: `Maybe` `WidgetButtonPressEventCallback`@.
noWidgetButtonPressEventCallback :: Maybe WidgetButtonPressEventCallback
noWidgetButtonPressEventCallback = Nothing

-- | Type for the callback on the (unwrapped) C side.
type C_WidgetButtonPressEventCallback =
    Ptr () ->                               -- object
    Ptr Gdk.EventButton.EventButton ->
    Ptr () ->                               -- user_data
    IO CInt

-- | Generate a function pointer callable from C code, from a `C_WidgetButtonPressEventCallback`.
foreign import ccall "wrapper"
    mk_WidgetButtonPressEventCallback :: C_WidgetButtonPressEventCallback -> IO (FunPtr C_WidgetButtonPressEventCallback)

-- | Wrap the callback into a `Closure`.
genClosure_WidgetButtonPressEvent :: WidgetButtonPressEventCallback -> IO Closure
genClosure_WidgetButtonPressEvent cb = do
    let cb' = wrap_WidgetButtonPressEventCallback cb
    mk_WidgetButtonPressEventCallback cb' >>= newCClosure


-- | Wrap a `WidgetButtonPressEventCallback` into a `C_WidgetButtonPressEventCallback`.
wrap_WidgetButtonPressEventCallback ::
    WidgetButtonPressEventCallback ->
    C_WidgetButtonPressEventCallback
wrap_WidgetButtonPressEventCallback _cb _ event _ = do
    event' <- (newPtr Gdk.EventButton.EventButton) event
    result <- _cb  event'
    let result' = (fromIntegral . fromEnum) result
    return result'


{- |
Connect a signal handler for the “@button-press-event@” signal, to be run before the default handler.
When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to

@
'Data.GI.Base.Signals.on' widget #buttonPressEvent callback
@
-}
onWidgetButtonPressEvent :: (IsWidget a, MonadIO m) => a -> WidgetButtonPressEventCallback -> m SignalHandlerId
onWidgetButtonPressEvent obj cb = liftIO $ do
    let cb' = wrap_WidgetButtonPressEventCallback cb
    cb'' <- mk_WidgetButtonPressEventCallback cb'
    connectSignalFunPtr obj "button-press-event" cb'' SignalConnectBefore

{- |
Connect a signal handler for the “@button-press-event@” signal, to be run after the default handler.
When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to

@
'Data.GI.Base.Signals.after' widget #buttonPressEvent callback
@
-}
afterWidgetButtonPressEvent :: (IsWidget a, MonadIO m) => a -> WidgetButtonPressEventCallback -> m SignalHandlerId
afterWidgetButtonPressEvent obj cb = liftIO $ do
    let cb' = wrap_WidgetButtonPressEventCallback cb
    cb'' <- mk_WidgetButtonPressEventCallback cb'
    connectSignalFunPtr obj "button-press-event" cb'' SignalConnectAfter


-- signal Widget::button-release-event
{- |
The ::button-release-event signal will be emitted when a button
(typically from a mouse) is released.

To receive this signal, the 'GI.Gdk.Objects.Window.Window' associated to the
widget needs to enable the @/GDK_BUTTON_RELEASE_MASK/@ mask.

This signal will be sent to the grab widget if there is one.
-}
type WidgetButtonReleaseEventCallback =
    Gdk.EventButton.EventButton
    {- ^ /@event@/: the 'GI.Gdk.Structs.EventButton.EventButton' which triggered
  this signal. -}
    -> IO Bool
    {- ^ __Returns:__ 'True' to stop other handlers from being invoked for the event.
  'False' to propagate the event further. -}

-- | A convenience synonym for @`Nothing` :: `Maybe` `WidgetButtonReleaseEventCallback`@.
noWidgetButtonReleaseEventCallback :: Maybe WidgetButtonReleaseEventCallback
noWidgetButtonReleaseEventCallback = Nothing

-- | Type for the callback on the (unwrapped) C side.
type C_WidgetButtonReleaseEventCallback =
    Ptr () ->                               -- object
    Ptr Gdk.EventButton.EventButton ->
    Ptr () ->                               -- user_data
    IO CInt

-- | Generate a function pointer callable from C code, from a `C_WidgetButtonReleaseEventCallback`.
foreign import ccall "wrapper"
    mk_WidgetButtonReleaseEventCallback :: C_WidgetButtonReleaseEventCallback -> IO (FunPtr C_WidgetButtonReleaseEventCallback)

-- | Wrap the callback into a `Closure`.
genClosure_WidgetButtonReleaseEvent :: WidgetButtonReleaseEventCallback -> IO Closure
genClosure_WidgetButtonReleaseEvent cb = do
    let cb' = wrap_WidgetButtonReleaseEventCallback cb
    mk_WidgetButtonReleaseEventCallback cb' >>= newCClosure


-- | Wrap a `WidgetButtonReleaseEventCallback` into a `C_WidgetButtonReleaseEventCallback`.
wrap_WidgetButtonReleaseEventCallback ::
    WidgetButtonReleaseEventCallback ->
    C_WidgetButtonReleaseEventCallback
wrap_WidgetButtonReleaseEventCallback _cb _ event _ = do
    event' <- (newPtr Gdk.EventButton.EventButton) event
    result <- _cb  event'
    let result' = (fromIntegral . fromEnum) result
    return result'


{- |
Connect a signal handler for the “@button-release-event@” signal, to be run before the default handler.
When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to

@
'Data.GI.Base.Signals.on' widget #buttonReleaseEvent callback
@
-}
onWidgetButtonReleaseEvent :: (IsWidget a, MonadIO m) => a -> WidgetButtonReleaseEventCallback -> m SignalHandlerId
onWidgetButtonReleaseEvent obj cb = liftIO $ do
    let cb' = wrap_WidgetButtonReleaseEventCallback cb
    cb'' <- mk_WidgetButtonReleaseEventCallback cb'
    connectSignalFunPtr obj "button-release-event" cb'' SignalConnectBefore

{- |
Connect a signal handler for the “@button-release-event@” signal, to be run after the default handler.
When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to

@
'Data.GI.Base.Signals.after' widget #buttonReleaseEvent callback
@
-}
afterWidgetButtonReleaseEvent :: (IsWidget a, MonadIO m) => a -> WidgetButtonReleaseEventCallback -> m SignalHandlerId
afterWidgetButtonReleaseEvent obj cb = liftIO $ do
    let cb' = wrap_WidgetButtonReleaseEventCallback cb
    cb'' <- mk_WidgetButtonReleaseEventCallback cb'
    connectSignalFunPtr obj "button-release-event" cb'' SignalConnectAfter


-- signal Widget::can-activate-accel
{- |
Determines whether an accelerator that activates the signal
identified by /@signalId@/ can currently be activated.
This signal is present to allow applications and derived
widgets to override the default 'GI.Gtk.Objects.Widget.Widget' handling
for determining whether an accelerator can be activated.
-}
type WidgetCanActivateAccelCallback =
    Word32
    {- ^ /@signalId@/: the ID of a signal installed on /@widget@/ -}
    -> IO Bool
    {- ^ __Returns:__ 'True' if the signal can be activated. -}

-- | A convenience synonym for @`Nothing` :: `Maybe` `WidgetCanActivateAccelCallback`@.
noWidgetCanActivateAccelCallback :: Maybe WidgetCanActivateAccelCallback
noWidgetCanActivateAccelCallback = Nothing

-- | Type for the callback on the (unwrapped) C side.
type C_WidgetCanActivateAccelCallback =
    Ptr () ->                               -- object
    Word32 ->
    Ptr () ->                               -- user_data
    IO CInt

-- | Generate a function pointer callable from C code, from a `C_WidgetCanActivateAccelCallback`.
foreign import ccall "wrapper"
    mk_WidgetCanActivateAccelCallback :: C_WidgetCanActivateAccelCallback -> IO (FunPtr C_WidgetCanActivateAccelCallback)

-- | Wrap the callback into a `Closure`.
genClosure_WidgetCanActivateAccel :: WidgetCanActivateAccelCallback -> IO Closure
genClosure_WidgetCanActivateAccel cb = do
    let cb' = wrap_WidgetCanActivateAccelCallback cb
    mk_WidgetCanActivateAccelCallback cb' >>= newCClosure


-- | Wrap a `WidgetCanActivateAccelCallback` into a `C_WidgetCanActivateAccelCallback`.
wrap_WidgetCanActivateAccelCallback ::
    WidgetCanActivateAccelCallback ->
    C_WidgetCanActivateAccelCallback
wrap_WidgetCanActivateAccelCallback _cb _ signalId _ = do
    result <- _cb  signalId
    let result' = (fromIntegral . fromEnum) result
    return result'


{- |
Connect a signal handler for the “@can-activate-accel@” signal, to be run before the default handler.
When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to

@
'Data.GI.Base.Signals.on' widget #canActivateAccel callback
@
-}
onWidgetCanActivateAccel :: (IsWidget a, MonadIO m) => a -> WidgetCanActivateAccelCallback -> m SignalHandlerId
onWidgetCanActivateAccel obj cb = liftIO $ do
    let cb' = wrap_WidgetCanActivateAccelCallback cb
    cb'' <- mk_WidgetCanActivateAccelCallback cb'
    connectSignalFunPtr obj "can-activate-accel" cb'' SignalConnectBefore

{- |
Connect a signal handler for the “@can-activate-accel@” signal, to be run after the default handler.
When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to

@
'Data.GI.Base.Signals.after' widget #canActivateAccel callback
@
-}
afterWidgetCanActivateAccel :: (IsWidget a, MonadIO m) => a -> WidgetCanActivateAccelCallback -> m SignalHandlerId
afterWidgetCanActivateAccel obj cb = liftIO $ do
    let cb' = wrap_WidgetCanActivateAccelCallback cb
    cb'' <- mk_WidgetCanActivateAccelCallback cb'
    connectSignalFunPtr obj "can-activate-accel" cb'' SignalConnectAfter


-- signal Widget::child-notify
{- |
The ::child-notify signal is emitted for each
[child property][child-properties]  that has
changed on an object. The signal\'s detail holds the property name.
-}
type WidgetChildNotifyCallback =
    GParamSpec
    {- ^ /@childProperty@/: the 'GI.GObject.Objects.ParamSpec.ParamSpec' of the changed child property -}
    -> IO ()

-- | A convenience synonym for @`Nothing` :: `Maybe` `WidgetChildNotifyCallback`@.
noWidgetChildNotifyCallback :: Maybe WidgetChildNotifyCallback
noWidgetChildNotifyCallback = Nothing

-- | Type for the callback on the (unwrapped) C side.
type C_WidgetChildNotifyCallback =
    Ptr () ->                               -- object
    Ptr GParamSpec ->
    Ptr () ->                               -- user_data
    IO ()

-- | Generate a function pointer callable from C code, from a `C_WidgetChildNotifyCallback`.
foreign import ccall "wrapper"
    mk_WidgetChildNotifyCallback :: C_WidgetChildNotifyCallback -> IO (FunPtr C_WidgetChildNotifyCallback)

-- | Wrap the callback into a `Closure`.
genClosure_WidgetChildNotify :: WidgetChildNotifyCallback -> IO Closure
genClosure_WidgetChildNotify cb = do
    let cb' = wrap_WidgetChildNotifyCallback cb
    mk_WidgetChildNotifyCallback cb' >>= newCClosure


-- | Wrap a `WidgetChildNotifyCallback` into a `C_WidgetChildNotifyCallback`.
wrap_WidgetChildNotifyCallback ::
    WidgetChildNotifyCallback ->
    C_WidgetChildNotifyCallback
wrap_WidgetChildNotifyCallback _cb _ childProperty _ = do
    childProperty' <- B.GParamSpec.newGParamSpecFromPtr childProperty
    _cb  childProperty'


{- |
Connect a signal handler for the “@child-notify@” signal, to be run before the default handler.
When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to

@
'Data.GI.Base.Signals.on' widget #childNotify callback
@
-}
onWidgetChildNotify :: (IsWidget a, MonadIO m) => a -> WidgetChildNotifyCallback -> m SignalHandlerId
onWidgetChildNotify obj cb = liftIO $ do
    let cb' = wrap_WidgetChildNotifyCallback cb
    cb'' <- mk_WidgetChildNotifyCallback cb'
    connectSignalFunPtr obj "child-notify" cb'' SignalConnectBefore

{- |
Connect a signal handler for the “@child-notify@” signal, to be run after the default handler.
When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to

@
'Data.GI.Base.Signals.after' widget #childNotify callback
@
-}
afterWidgetChildNotify :: (IsWidget a, MonadIO m) => a -> WidgetChildNotifyCallback -> m SignalHandlerId
afterWidgetChildNotify obj cb = liftIO $ do
    let cb' = wrap_WidgetChildNotifyCallback cb
    cb'' <- mk_WidgetChildNotifyCallback cb'
    connectSignalFunPtr obj "child-notify" cb'' SignalConnectAfter


-- signal Widget::composited-changed
{-# DEPRECATED WidgetCompositedChangedCallback ["(Since version 3.22)","Use GdkScreen::composited-changed instead."] #-}
{- |
The ::composited-changed signal is emitted when the composited
status of /@widgets@/ screen changes.
See 'GI.Gdk.Objects.Screen.screenIsComposited'.
-}
type WidgetCompositedChangedCallback =
    IO ()

-- | A convenience synonym for @`Nothing` :: `Maybe` `WidgetCompositedChangedCallback`@.
noWidgetCompositedChangedCallback :: Maybe WidgetCompositedChangedCallback
noWidgetCompositedChangedCallback = Nothing

-- | Type for the callback on the (unwrapped) C side.
type C_WidgetCompositedChangedCallback =
    Ptr () ->                               -- object
    Ptr () ->                               -- user_data
    IO ()

-- | Generate a function pointer callable from C code, from a `C_WidgetCompositedChangedCallback`.
foreign import ccall "wrapper"
    mk_WidgetCompositedChangedCallback :: C_WidgetCompositedChangedCallback -> IO (FunPtr C_WidgetCompositedChangedCallback)

-- | Wrap the callback into a `Closure`.
genClosure_WidgetCompositedChanged :: WidgetCompositedChangedCallback -> IO Closure
genClosure_WidgetCompositedChanged cb = do
    let cb' = wrap_WidgetCompositedChangedCallback cb
    mk_WidgetCompositedChangedCallback cb' >>= newCClosure


-- | Wrap a `WidgetCompositedChangedCallback` into a `C_WidgetCompositedChangedCallback`.
wrap_WidgetCompositedChangedCallback ::
    WidgetCompositedChangedCallback ->
    C_WidgetCompositedChangedCallback
wrap_WidgetCompositedChangedCallback _cb _ _ = do
    _cb


{- |
Connect a signal handler for the “@composited-changed@” signal, to be run before the default handler.
When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to

@
'Data.GI.Base.Signals.on' widget #compositedChanged callback
@
-}
onWidgetCompositedChanged :: (IsWidget a, MonadIO m) => a -> WidgetCompositedChangedCallback -> m SignalHandlerId
onWidgetCompositedChanged obj cb = liftIO $ do
    let cb' = wrap_WidgetCompositedChangedCallback cb
    cb'' <- mk_WidgetCompositedChangedCallback cb'
    connectSignalFunPtr obj "composited-changed" cb'' SignalConnectBefore

{- |
Connect a signal handler for the “@composited-changed@” signal, to be run after the default handler.
When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to

@
'Data.GI.Base.Signals.after' widget #compositedChanged callback
@
-}
afterWidgetCompositedChanged :: (IsWidget a, MonadIO m) => a -> WidgetCompositedChangedCallback -> m SignalHandlerId
afterWidgetCompositedChanged obj cb = liftIO $ do
    let cb' = wrap_WidgetCompositedChangedCallback cb
    cb'' <- mk_WidgetCompositedChangedCallback cb'
    connectSignalFunPtr obj "composited-changed" cb'' SignalConnectAfter


-- signal Widget::configure-event
{- |
The ::configure-event signal will be emitted when the size, position or
stacking of the /@widget@/\'s window has changed.

To receive this signal, the 'GI.Gdk.Objects.Window.Window' associated to the widget needs
to enable the @/GDK_STRUCTURE_MASK/@ mask. GDK will enable this mask
automatically for all new windows.
-}
type WidgetConfigureEventCallback =
    Gdk.EventConfigure.EventConfigure
    {- ^ /@event@/: the 'GI.Gdk.Structs.EventConfigure.EventConfigure' which triggered
  this signal. -}
    -> IO Bool
    {- ^ __Returns:__ 'True' to stop other handlers from being invoked for the event.
  'False' to propagate the event further. -}

-- | A convenience synonym for @`Nothing` :: `Maybe` `WidgetConfigureEventCallback`@.
noWidgetConfigureEventCallback :: Maybe WidgetConfigureEventCallback
noWidgetConfigureEventCallback = Nothing

-- | Type for the callback on the (unwrapped) C side.
type C_WidgetConfigureEventCallback =
    Ptr () ->                               -- object
    Ptr Gdk.EventConfigure.EventConfigure ->
    Ptr () ->                               -- user_data
    IO CInt

-- | Generate a function pointer callable from C code, from a `C_WidgetConfigureEventCallback`.
foreign import ccall "wrapper"
    mk_WidgetConfigureEventCallback :: C_WidgetConfigureEventCallback -> IO (FunPtr C_WidgetConfigureEventCallback)

-- | Wrap the callback into a `Closure`.
genClosure_WidgetConfigureEvent :: WidgetConfigureEventCallback -> IO Closure
genClosure_WidgetConfigureEvent cb = do
    let cb' = wrap_WidgetConfigureEventCallback cb
    mk_WidgetConfigureEventCallback cb' >>= newCClosure


-- | Wrap a `WidgetConfigureEventCallback` into a `C_WidgetConfigureEventCallback`.
wrap_WidgetConfigureEventCallback ::
    WidgetConfigureEventCallback ->
    C_WidgetConfigureEventCallback
wrap_WidgetConfigureEventCallback _cb _ event _ = do
    event' <- (newPtr Gdk.EventConfigure.EventConfigure) event
    result <- _cb  event'
    let result' = (fromIntegral . fromEnum) result
    return result'


{- |
Connect a signal handler for the “@configure-event@” signal, to be run before the default handler.
When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to

@
'Data.GI.Base.Signals.on' widget #configureEvent callback
@
-}
onWidgetConfigureEvent :: (IsWidget a, MonadIO m) => a -> WidgetConfigureEventCallback -> m SignalHandlerId
onWidgetConfigureEvent obj cb = liftIO $ do
    let cb' = wrap_WidgetConfigureEventCallback cb
    cb'' <- mk_WidgetConfigureEventCallback cb'
    connectSignalFunPtr obj "configure-event" cb'' SignalConnectBefore

{- |
Connect a signal handler for the “@configure-event@” signal, to be run after the default handler.
When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to

@
'Data.GI.Base.Signals.after' widget #configureEvent callback
@
-}
afterWidgetConfigureEvent :: (IsWidget a, MonadIO m) => a -> WidgetConfigureEventCallback -> m SignalHandlerId
afterWidgetConfigureEvent obj cb = liftIO $ do
    let cb' = wrap_WidgetConfigureEventCallback cb
    cb'' <- mk_WidgetConfigureEventCallback cb'
    connectSignalFunPtr obj "configure-event" cb'' SignalConnectAfter


-- signal Widget::damage-event
{- |
Emitted when a redirected window belonging to /@widget@/ gets drawn into.
The region\/area members of the event shows what area of the redirected
drawable was drawn into.

/Since: 2.14/
-}
type WidgetDamageEventCallback =
    Gdk.EventExpose.EventExpose
    {- ^ /@event@/: the 'GI.Gdk.Structs.EventExpose.EventExpose' event -}
    -> IO Bool
    {- ^ __Returns:__ 'True' to stop other handlers from being invoked for the event.
  'False' to propagate the event further. -}

-- | A convenience synonym for @`Nothing` :: `Maybe` `WidgetDamageEventCallback`@.
noWidgetDamageEventCallback :: Maybe WidgetDamageEventCallback
noWidgetDamageEventCallback = Nothing

-- | Type for the callback on the (unwrapped) C side.
type C_WidgetDamageEventCallback =
    Ptr () ->                               -- object
    Ptr Gdk.EventExpose.EventExpose ->
    Ptr () ->                               -- user_data
    IO CInt

-- | Generate a function pointer callable from C code, from a `C_WidgetDamageEventCallback`.
foreign import ccall "wrapper"
    mk_WidgetDamageEventCallback :: C_WidgetDamageEventCallback -> IO (FunPtr C_WidgetDamageEventCallback)

-- | Wrap the callback into a `Closure`.
genClosure_WidgetDamageEvent :: WidgetDamageEventCallback -> IO Closure
genClosure_WidgetDamageEvent cb = do
    let cb' = wrap_WidgetDamageEventCallback cb
    mk_WidgetDamageEventCallback cb' >>= newCClosure


-- | Wrap a `WidgetDamageEventCallback` into a `C_WidgetDamageEventCallback`.
wrap_WidgetDamageEventCallback ::
    WidgetDamageEventCallback ->
    C_WidgetDamageEventCallback
wrap_WidgetDamageEventCallback _cb _ event _ = do
    event' <- (newPtr Gdk.EventExpose.EventExpose) event
    result <- _cb  event'
    let result' = (fromIntegral . fromEnum) result
    return result'


{- |
Connect a signal handler for the “@damage-event@” signal, to be run before the default handler.
When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to

@
'Data.GI.Base.Signals.on' widget #damageEvent callback
@
-}
onWidgetDamageEvent :: (IsWidget a, MonadIO m) => a -> WidgetDamageEventCallback -> m SignalHandlerId
onWidgetDamageEvent obj cb = liftIO $ do
    let cb' = wrap_WidgetDamageEventCallback cb
    cb'' <- mk_WidgetDamageEventCallback cb'
    connectSignalFunPtr obj "damage-event" cb'' SignalConnectBefore

{- |
Connect a signal handler for the “@damage-event@” signal, to be run after the default handler.
When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to

@
'Data.GI.Base.Signals.after' widget #damageEvent callback
@
-}
afterWidgetDamageEvent :: (IsWidget a, MonadIO m) => a -> WidgetDamageEventCallback -> m SignalHandlerId
afterWidgetDamageEvent obj cb = liftIO $ do
    let cb' = wrap_WidgetDamageEventCallback cb
    cb'' <- mk_WidgetDamageEventCallback cb'
    connectSignalFunPtr obj "damage-event" cb'' SignalConnectAfter


-- signal Widget::delete-event
{- |
The ::delete-event signal is emitted if a user requests that
a toplevel window is closed. The default handler for this signal
destroys the window. Connecting 'GI.Gtk.Objects.Widget.widgetHideOnDelete' to
this signal will cause the window to be hidden instead, so that
it can later be shown again without reconstructing it.
-}
type WidgetDeleteEventCallback =
    Gdk.Event.Event
    {- ^ /@event@/: the event which triggered this signal -}
    -> IO Bool
    {- ^ __Returns:__ 'True' to stop other handlers from being invoked for the event.
  'False' to propagate the event further. -}

-- | A convenience synonym for @`Nothing` :: `Maybe` `WidgetDeleteEventCallback`@.
noWidgetDeleteEventCallback :: Maybe WidgetDeleteEventCallback
noWidgetDeleteEventCallback = Nothing

-- | Type for the callback on the (unwrapped) C side.
type C_WidgetDeleteEventCallback =
    Ptr () ->                               -- object
    Ptr Gdk.Event.Event ->
    Ptr () ->                               -- user_data
    IO CInt

-- | Generate a function pointer callable from C code, from a `C_WidgetDeleteEventCallback`.
foreign import ccall "wrapper"
    mk_WidgetDeleteEventCallback :: C_WidgetDeleteEventCallback -> IO (FunPtr C_WidgetDeleteEventCallback)

-- | Wrap the callback into a `Closure`.
genClosure_WidgetDeleteEvent :: WidgetDeleteEventCallback -> IO Closure
genClosure_WidgetDeleteEvent cb = do
    let cb' = wrap_WidgetDeleteEventCallback cb
    mk_WidgetDeleteEventCallback cb' >>= newCClosure


-- | Wrap a `WidgetDeleteEventCallback` into a `C_WidgetDeleteEventCallback`.
wrap_WidgetDeleteEventCallback ::
    WidgetDeleteEventCallback ->
    C_WidgetDeleteEventCallback
wrap_WidgetDeleteEventCallback _cb _ event _ = do
    B.ManagedPtr.withTransient Gdk.Event.Event event $ \event' -> do
        result <- _cb  event'
        let result' = (fromIntegral . fromEnum) result
        return result'


{- |
Connect a signal handler for the “@delete-event@” signal, to be run before the default handler.
When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to

@
'Data.GI.Base.Signals.on' widget #deleteEvent callback
@
-}
onWidgetDeleteEvent :: (IsWidget a, MonadIO m) => a -> WidgetDeleteEventCallback -> m SignalHandlerId
onWidgetDeleteEvent obj cb = liftIO $ do
    let cb' = wrap_WidgetDeleteEventCallback cb
    cb'' <- mk_WidgetDeleteEventCallback cb'
    connectSignalFunPtr obj "delete-event" cb'' SignalConnectBefore

{- |
Connect a signal handler for the “@delete-event@” signal, to be run after the default handler.
When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to

@
'Data.GI.Base.Signals.after' widget #deleteEvent callback
@
-}
afterWidgetDeleteEvent :: (IsWidget a, MonadIO m) => a -> WidgetDeleteEventCallback -> m SignalHandlerId
afterWidgetDeleteEvent obj cb = liftIO $ do
    let cb' = wrap_WidgetDeleteEventCallback cb
    cb'' <- mk_WidgetDeleteEventCallback cb'
    connectSignalFunPtr obj "delete-event" cb'' SignalConnectAfter


-- signal Widget::destroy
{- |
Signals that all holders of a reference to the widget should release
the reference that they hold. May result in finalization of the widget
if all references are released.

This signal is not suitable for saving widget state.
-}
type WidgetDestroyCallback =
    IO ()

-- | A convenience synonym for @`Nothing` :: `Maybe` `WidgetDestroyCallback`@.
noWidgetDestroyCallback :: Maybe WidgetDestroyCallback
noWidgetDestroyCallback = Nothing

-- | Type for the callback on the (unwrapped) C side.
type C_WidgetDestroyCallback =
    Ptr () ->                               -- object
    Ptr () ->                               -- user_data
    IO ()

-- | Generate a function pointer callable from C code, from a `C_WidgetDestroyCallback`.
foreign import ccall "wrapper"
    mk_WidgetDestroyCallback :: C_WidgetDestroyCallback -> IO (FunPtr C_WidgetDestroyCallback)

-- | Wrap the callback into a `Closure`.
genClosure_WidgetDestroy :: WidgetDestroyCallback -> IO Closure
genClosure_WidgetDestroy cb = do
    let cb' = wrap_WidgetDestroyCallback cb
    mk_WidgetDestroyCallback cb' >>= newCClosure


-- | Wrap a `WidgetDestroyCallback` into a `C_WidgetDestroyCallback`.
wrap_WidgetDestroyCallback ::
    WidgetDestroyCallback ->
    C_WidgetDestroyCallback
wrap_WidgetDestroyCallback _cb _ _ = do
    _cb


{- |
Connect a signal handler for the “@destroy@” signal, to be run before the default handler.
When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to

@
'Data.GI.Base.Signals.on' widget #destroy callback
@
-}
onWidgetDestroy :: (IsWidget a, MonadIO m) => a -> WidgetDestroyCallback -> m SignalHandlerId
onWidgetDestroy obj cb = liftIO $ do
    let cb' = wrap_WidgetDestroyCallback cb
    cb'' <- mk_WidgetDestroyCallback cb'
    connectSignalFunPtr obj "destroy" cb'' SignalConnectBefore

{- |
Connect a signal handler for the “@destroy@” signal, to be run after the default handler.
When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to

@
'Data.GI.Base.Signals.after' widget #destroy callback
@
-}
afterWidgetDestroy :: (IsWidget a, MonadIO m) => a -> WidgetDestroyCallback -> m SignalHandlerId
afterWidgetDestroy obj cb = liftIO $ do
    let cb' = wrap_WidgetDestroyCallback cb
    cb'' <- mk_WidgetDestroyCallback cb'
    connectSignalFunPtr obj "destroy" cb'' SignalConnectAfter


-- signal Widget::destroy-event
{- |
The ::destroy-event signal is emitted when a 'GI.Gdk.Objects.Window.Window' is destroyed.
You rarely get this signal, because most widgets disconnect themselves
from their window before they destroy it, so no widget owns the
window at destroy time.

To receive this signal, the 'GI.Gdk.Objects.Window.Window' associated to the widget needs
to enable the @/GDK_STRUCTURE_MASK/@ mask. GDK will enable this mask
automatically for all new windows.
-}
type WidgetDestroyEventCallback =
    Gdk.Event.Event
    {- ^ /@event@/: the event which triggered this signal -}
    -> IO Bool
    {- ^ __Returns:__ 'True' to stop other handlers from being invoked for the event.
  'False' to propagate the event further. -}

-- | A convenience synonym for @`Nothing` :: `Maybe` `WidgetDestroyEventCallback`@.
noWidgetDestroyEventCallback :: Maybe WidgetDestroyEventCallback
noWidgetDestroyEventCallback = Nothing

-- | Type for the callback on the (unwrapped) C side.
type C_WidgetDestroyEventCallback =
    Ptr () ->                               -- object
    Ptr Gdk.Event.Event ->
    Ptr () ->                               -- user_data
    IO CInt

-- | Generate a function pointer callable from C code, from a `C_WidgetDestroyEventCallback`.
foreign import ccall "wrapper"
    mk_WidgetDestroyEventCallback :: C_WidgetDestroyEventCallback -> IO (FunPtr C_WidgetDestroyEventCallback)

-- | Wrap the callback into a `Closure`.
genClosure_WidgetDestroyEvent :: WidgetDestroyEventCallback -> IO Closure
genClosure_WidgetDestroyEvent cb = do
    let cb' = wrap_WidgetDestroyEventCallback cb
    mk_WidgetDestroyEventCallback cb' >>= newCClosure


-- | Wrap a `WidgetDestroyEventCallback` into a `C_WidgetDestroyEventCallback`.
wrap_WidgetDestroyEventCallback ::
    WidgetDestroyEventCallback ->
    C_WidgetDestroyEventCallback
wrap_WidgetDestroyEventCallback _cb _ event _ = do
    B.ManagedPtr.withTransient Gdk.Event.Event event $ \event' -> do
        result <- _cb  event'
        let result' = (fromIntegral . fromEnum) result
        return result'


{- |
Connect a signal handler for the “@destroy-event@” signal, to be run before the default handler.
When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to

@
'Data.GI.Base.Signals.on' widget #destroyEvent callback
@
-}
onWidgetDestroyEvent :: (IsWidget a, MonadIO m) => a -> WidgetDestroyEventCallback -> m SignalHandlerId
onWidgetDestroyEvent obj cb = liftIO $ do
    let cb' = wrap_WidgetDestroyEventCallback cb
    cb'' <- mk_WidgetDestroyEventCallback cb'
    connectSignalFunPtr obj "destroy-event" cb'' SignalConnectBefore

{- |
Connect a signal handler for the “@destroy-event@” signal, to be run after the default handler.
When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to

@
'Data.GI.Base.Signals.after' widget #destroyEvent callback
@
-}
afterWidgetDestroyEvent :: (IsWidget a, MonadIO m) => a -> WidgetDestroyEventCallback -> m SignalHandlerId
afterWidgetDestroyEvent obj cb = liftIO $ do
    let cb' = wrap_WidgetDestroyEventCallback cb
    cb'' <- mk_WidgetDestroyEventCallback cb'
    connectSignalFunPtr obj "destroy-event" cb'' SignalConnectAfter


-- signal Widget::direction-changed
{- |
The ::direction-changed signal is emitted when the text direction
of a widget changes.
-}
type WidgetDirectionChangedCallback =
    Gtk.Enums.TextDirection
    {- ^ /@previousDirection@/: the previous text direction of /@widget@/ -}
    -> IO ()

-- | A convenience synonym for @`Nothing` :: `Maybe` `WidgetDirectionChangedCallback`@.
noWidgetDirectionChangedCallback :: Maybe WidgetDirectionChangedCallback
noWidgetDirectionChangedCallback = Nothing

-- | Type for the callback on the (unwrapped) C side.
type C_WidgetDirectionChangedCallback =
    Ptr () ->                               -- object
    CUInt ->
    Ptr () ->                               -- user_data
    IO ()

-- | Generate a function pointer callable from C code, from a `C_WidgetDirectionChangedCallback`.
foreign import ccall "wrapper"
    mk_WidgetDirectionChangedCallback :: C_WidgetDirectionChangedCallback -> IO (FunPtr C_WidgetDirectionChangedCallback)

-- | Wrap the callback into a `Closure`.
genClosure_WidgetDirectionChanged :: WidgetDirectionChangedCallback -> IO Closure
genClosure_WidgetDirectionChanged cb = do
    let cb' = wrap_WidgetDirectionChangedCallback cb
    mk_WidgetDirectionChangedCallback cb' >>= newCClosure


-- | Wrap a `WidgetDirectionChangedCallback` into a `C_WidgetDirectionChangedCallback`.
wrap_WidgetDirectionChangedCallback ::
    WidgetDirectionChangedCallback ->
    C_WidgetDirectionChangedCallback
wrap_WidgetDirectionChangedCallback _cb _ previousDirection _ = do
    let previousDirection' = (toEnum . fromIntegral) previousDirection
    _cb  previousDirection'


{- |
Connect a signal handler for the “@direction-changed@” signal, to be run before the default handler.
When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to

@
'Data.GI.Base.Signals.on' widget #directionChanged callback
@
-}
onWidgetDirectionChanged :: (IsWidget a, MonadIO m) => a -> WidgetDirectionChangedCallback -> m SignalHandlerId
onWidgetDirectionChanged obj cb = liftIO $ do
    let cb' = wrap_WidgetDirectionChangedCallback cb
    cb'' <- mk_WidgetDirectionChangedCallback cb'
    connectSignalFunPtr obj "direction-changed" cb'' SignalConnectBefore

{- |
Connect a signal handler for the “@direction-changed@” signal, to be run after the default handler.
When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to

@
'Data.GI.Base.Signals.after' widget #directionChanged callback
@
-}
afterWidgetDirectionChanged :: (IsWidget a, MonadIO m) => a -> WidgetDirectionChangedCallback -> m SignalHandlerId
afterWidgetDirectionChanged obj cb = liftIO $ do
    let cb' = wrap_WidgetDirectionChangedCallback cb
    cb'' <- mk_WidgetDirectionChangedCallback cb'
    connectSignalFunPtr obj "direction-changed" cb'' SignalConnectAfter


-- signal Widget::drag-begin
{- |
The ::drag-begin signal is emitted on the drag source when a drag is
started. A typical reason to connect to this signal is to set up a
custom drag icon with e.g. 'GI.Gtk.Objects.Widget.widgetDragSourceSetIconPixbuf'.

Note that some widgets set up a drag icon in the default handler of
this signal, so you may have to use @/g_signal_connect_after()/@ to
override what the default handler did.
-}
type WidgetDragBeginCallback =
    Gdk.DragContext.DragContext
    {- ^ /@context@/: the drag context -}
    -> IO ()

-- | A convenience synonym for @`Nothing` :: `Maybe` `WidgetDragBeginCallback`@.
noWidgetDragBeginCallback :: Maybe WidgetDragBeginCallback
noWidgetDragBeginCallback = Nothing

-- | Type for the callback on the (unwrapped) C side.
type C_WidgetDragBeginCallback =
    Ptr () ->                               -- object
    Ptr Gdk.DragContext.DragContext ->
    Ptr () ->                               -- user_data
    IO ()

-- | Generate a function pointer callable from C code, from a `C_WidgetDragBeginCallback`.
foreign import ccall "wrapper"
    mk_WidgetDragBeginCallback :: C_WidgetDragBeginCallback -> IO (FunPtr C_WidgetDragBeginCallback)

-- | Wrap the callback into a `Closure`.
genClosure_WidgetDragBegin :: WidgetDragBeginCallback -> IO Closure
genClosure_WidgetDragBegin cb = do
    let cb' = wrap_WidgetDragBeginCallback cb
    mk_WidgetDragBeginCallback cb' >>= newCClosure


-- | Wrap a `WidgetDragBeginCallback` into a `C_WidgetDragBeginCallback`.
wrap_WidgetDragBeginCallback ::
    WidgetDragBeginCallback ->
    C_WidgetDragBeginCallback
wrap_WidgetDragBeginCallback _cb _ context _ = do
    context' <- (newObject Gdk.DragContext.DragContext) context
    _cb  context'


{- |
Connect a signal handler for the “@drag-begin@” signal, to be run before the default handler.
When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to

@
'Data.GI.Base.Signals.on' widget #dragBegin callback
@
-}
onWidgetDragBegin :: (IsWidget a, MonadIO m) => a -> WidgetDragBeginCallback -> m SignalHandlerId
onWidgetDragBegin obj cb = liftIO $ do
    let cb' = wrap_WidgetDragBeginCallback cb
    cb'' <- mk_WidgetDragBeginCallback cb'
    connectSignalFunPtr obj "drag-begin" cb'' SignalConnectBefore

{- |
Connect a signal handler for the “@drag-begin@” signal, to be run after the default handler.
When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to

@
'Data.GI.Base.Signals.after' widget #dragBegin callback
@
-}
afterWidgetDragBegin :: (IsWidget a, MonadIO m) => a -> WidgetDragBeginCallback -> m SignalHandlerId
afterWidgetDragBegin obj cb = liftIO $ do
    let cb' = wrap_WidgetDragBeginCallback cb
    cb'' <- mk_WidgetDragBeginCallback cb'
    connectSignalFunPtr obj "drag-begin" cb'' SignalConnectAfter


-- signal Widget::drag-data-delete
{- |
The ::drag-data-delete signal is emitted on the drag source when a drag
with the action 'GI.Gdk.Flags.DragActionMove' is successfully completed. The signal
handler is responsible for deleting the data that has been dropped. What
\"delete\" means depends on the context of the drag operation.
-}
type WidgetDragDataDeleteCallback =
    Gdk.DragContext.DragContext
    {- ^ /@context@/: the drag context -}
    -> IO ()

-- | A convenience synonym for @`Nothing` :: `Maybe` `WidgetDragDataDeleteCallback`@.
noWidgetDragDataDeleteCallback :: Maybe WidgetDragDataDeleteCallback
noWidgetDragDataDeleteCallback = Nothing

-- | Type for the callback on the (unwrapped) C side.
type C_WidgetDragDataDeleteCallback =
    Ptr () ->                               -- object
    Ptr Gdk.DragContext.DragContext ->
    Ptr () ->                               -- user_data
    IO ()

-- | Generate a function pointer callable from C code, from a `C_WidgetDragDataDeleteCallback`.
foreign import ccall "wrapper"
    mk_WidgetDragDataDeleteCallback :: C_WidgetDragDataDeleteCallback -> IO (FunPtr C_WidgetDragDataDeleteCallback)

-- | Wrap the callback into a `Closure`.
genClosure_WidgetDragDataDelete :: WidgetDragDataDeleteCallback -> IO Closure
genClosure_WidgetDragDataDelete cb = do
    let cb' = wrap_WidgetDragDataDeleteCallback cb
    mk_WidgetDragDataDeleteCallback cb' >>= newCClosure


-- | Wrap a `WidgetDragDataDeleteCallback` into a `C_WidgetDragDataDeleteCallback`.
wrap_WidgetDragDataDeleteCallback ::
    WidgetDragDataDeleteCallback ->
    C_WidgetDragDataDeleteCallback
wrap_WidgetDragDataDeleteCallback _cb _ context _ = do
    context' <- (newObject Gdk.DragContext.DragContext) context
    _cb  context'


{- |
Connect a signal handler for the “@drag-data-delete@” signal, to be run before the default handler.
When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to

@
'Data.GI.Base.Signals.on' widget #dragDataDelete callback
@
-}
onWidgetDragDataDelete :: (IsWidget a, MonadIO m) => a -> WidgetDragDataDeleteCallback -> m SignalHandlerId
onWidgetDragDataDelete obj cb = liftIO $ do
    let cb' = wrap_WidgetDragDataDeleteCallback cb
    cb'' <- mk_WidgetDragDataDeleteCallback cb'
    connectSignalFunPtr obj "drag-data-delete" cb'' SignalConnectBefore

{- |
Connect a signal handler for the “@drag-data-delete@” signal, to be run after the default handler.
When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to

@
'Data.GI.Base.Signals.after' widget #dragDataDelete callback
@
-}
afterWidgetDragDataDelete :: (IsWidget a, MonadIO m) => a -> WidgetDragDataDeleteCallback -> m SignalHandlerId
afterWidgetDragDataDelete obj cb = liftIO $ do
    let cb' = wrap_WidgetDragDataDeleteCallback cb
    cb'' <- mk_WidgetDragDataDeleteCallback cb'
    connectSignalFunPtr obj "drag-data-delete" cb'' SignalConnectAfter


-- signal Widget::drag-data-get
{- |
The ::drag-data-get signal is emitted on the drag source when the drop
site requests the data which is dragged. It is the responsibility of
the signal handler to fill /@data@/ with the data in the format which
is indicated by /@info@/. See 'GI.Gtk.Structs.SelectionData.selectionDataSet' and
'GI.Gtk.Structs.SelectionData.selectionDataSetText'.
-}
type WidgetDragDataGetCallback =
    Gdk.DragContext.DragContext
    {- ^ /@context@/: the drag context -}
    -> Gtk.SelectionData.SelectionData
    {- ^ /@data@/: the 'GI.Gtk.Structs.SelectionData.SelectionData' to be filled with the dragged data -}
    -> Word32
    {- ^ /@info@/: the info that has been registered with the target in the
       'GI.Gtk.Structs.TargetList.TargetList' -}
    -> Word32
    {- ^ /@time@/: the timestamp at which the data was requested -}
    -> IO ()

-- | A convenience synonym for @`Nothing` :: `Maybe` `WidgetDragDataGetCallback`@.
noWidgetDragDataGetCallback :: Maybe WidgetDragDataGetCallback
noWidgetDragDataGetCallback = Nothing

-- | Type for the callback on the (unwrapped) C side.
type C_WidgetDragDataGetCallback =
    Ptr () ->                               -- object
    Ptr Gdk.DragContext.DragContext ->
    Ptr Gtk.SelectionData.SelectionData ->
    Word32 ->
    Word32 ->
    Ptr () ->                               -- user_data
    IO ()

-- | Generate a function pointer callable from C code, from a `C_WidgetDragDataGetCallback`.
foreign import ccall "wrapper"
    mk_WidgetDragDataGetCallback :: C_WidgetDragDataGetCallback -> IO (FunPtr C_WidgetDragDataGetCallback)

-- | Wrap the callback into a `Closure`.
genClosure_WidgetDragDataGet :: WidgetDragDataGetCallback -> IO Closure
genClosure_WidgetDragDataGet cb = do
    let cb' = wrap_WidgetDragDataGetCallback cb
    mk_WidgetDragDataGetCallback cb' >>= newCClosure


-- | Wrap a `WidgetDragDataGetCallback` into a `C_WidgetDragDataGetCallback`.
wrap_WidgetDragDataGetCallback ::
    WidgetDragDataGetCallback ->
    C_WidgetDragDataGetCallback
wrap_WidgetDragDataGetCallback _cb _ context data_ info time _ = do
    context' <- (newObject Gdk.DragContext.DragContext) context
    B.ManagedPtr.withTransient Gtk.SelectionData.SelectionData data_ $ \data_' -> do
        _cb  context' data_' info time


{- |
Connect a signal handler for the “@drag-data-get@” signal, to be run before the default handler.
When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to

@
'Data.GI.Base.Signals.on' widget #dragDataGet callback
@
-}
onWidgetDragDataGet :: (IsWidget a, MonadIO m) => a -> WidgetDragDataGetCallback -> m SignalHandlerId
onWidgetDragDataGet obj cb = liftIO $ do
    let cb' = wrap_WidgetDragDataGetCallback cb
    cb'' <- mk_WidgetDragDataGetCallback cb'
    connectSignalFunPtr obj "drag-data-get" cb'' SignalConnectBefore

{- |
Connect a signal handler for the “@drag-data-get@” signal, to be run after the default handler.
When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to

@
'Data.GI.Base.Signals.after' widget #dragDataGet callback
@
-}
afterWidgetDragDataGet :: (IsWidget a, MonadIO m) => a -> WidgetDragDataGetCallback -> m SignalHandlerId
afterWidgetDragDataGet obj cb = liftIO $ do
    let cb' = wrap_WidgetDragDataGetCallback cb
    cb'' <- mk_WidgetDragDataGetCallback cb'
    connectSignalFunPtr obj "drag-data-get" cb'' SignalConnectAfter


-- signal Widget::drag-data-received
{- |
The ::drag-data-received signal is emitted on the drop site when the
dragged data has been received. If the data was received in order to
determine whether the drop will be accepted, the handler is expected
to call 'GI.Gdk.Functions.dragStatus' and not finish the drag.
If the data was received in response to a 'GI.Gtk.Objects.Widget.Widget'::@/drag-drop/@ signal
(and this is the last target to be received), the handler for this
signal is expected to process the received data and then call
'GI.Gtk.Functions.dragFinish', setting the /@success@/ parameter depending on
whether the data was processed successfully.

Applications must create some means to determine why the signal was emitted
and therefore whether to call 'GI.Gdk.Functions.dragStatus' or 'GI.Gtk.Functions.dragFinish'.

The handler may inspect the selected action with
'GI.Gdk.Objects.DragContext.dragContextGetSelectedAction' before calling
'GI.Gtk.Functions.dragFinish', e.g. to implement 'GI.Gdk.Flags.DragActionAsk' as
shown in the following example:

=== /C code/
>
>void
>drag_data_received (GtkWidget          *widget,
>                    GdkDragContext     *context,
>                    gint                x,
>                    gint                y,
>                    GtkSelectionData   *data,
>                    guint               info,
>                    guint               time)
>{
>  if ((data->length >= 0) && (data->format == 8))
>    {
>      GdkDragAction action;
>
>      // handle data here
>
>      action = gdk_drag_context_get_selected_action (context);
>      if (action == GDK_ACTION_ASK)
>        {
>          GtkWidget *dialog;
>          gint response;
>
>          dialog = gtk_message_dialog_new (NULL,
>                                           GTK_DIALOG_MODAL |
>                                           GTK_DIALOG_DESTROY_WITH_PARENT,
>                                           GTK_MESSAGE_INFO,
>                                           GTK_BUTTONS_YES_NO,
>                                           "Move the data ?\n");
>          response = gtk_dialog_run (GTK_DIALOG (dialog));
>          gtk_widget_destroy (dialog);
>
>          if (response == GTK_RESPONSE_YES)
>            action = GDK_ACTION_MOVE;
>          else
>            action = GDK_ACTION_COPY;
>         }
>
>      gtk_drag_finish (context, TRUE, action == GDK_ACTION_MOVE, time);
>    }
>  else
>    gtk_drag_finish (context, FALSE, FALSE, time);
> }
-}
type WidgetDragDataReceivedCallback =
    Gdk.DragContext.DragContext
    {- ^ /@context@/: the drag context -}
    -> Int32
    {- ^ /@x@/: where the drop happened -}
    -> Int32
    {- ^ /@y@/: where the drop happened -}
    -> Gtk.SelectionData.SelectionData
    {- ^ /@data@/: the received data -}
    -> Word32
    {- ^ /@info@/: the info that has been registered with the target in the
       'GI.Gtk.Structs.TargetList.TargetList' -}
    -> Word32
    {- ^ /@time@/: the timestamp at which the data was received -}
    -> IO ()

-- | A convenience synonym for @`Nothing` :: `Maybe` `WidgetDragDataReceivedCallback`@.
noWidgetDragDataReceivedCallback :: Maybe WidgetDragDataReceivedCallback
noWidgetDragDataReceivedCallback = Nothing

-- | Type for the callback on the (unwrapped) C side.
type C_WidgetDragDataReceivedCallback =
    Ptr () ->                               -- object
    Ptr Gdk.DragContext.DragContext ->
    Int32 ->
    Int32 ->
    Ptr Gtk.SelectionData.SelectionData ->
    Word32 ->
    Word32 ->
    Ptr () ->                               -- user_data
    IO ()

-- | Generate a function pointer callable from C code, from a `C_WidgetDragDataReceivedCallback`.
foreign import ccall "wrapper"
    mk_WidgetDragDataReceivedCallback :: C_WidgetDragDataReceivedCallback -> IO (FunPtr C_WidgetDragDataReceivedCallback)

-- | Wrap the callback into a `Closure`.
genClosure_WidgetDragDataReceived :: WidgetDragDataReceivedCallback -> IO Closure
genClosure_WidgetDragDataReceived cb = do
    let cb' = wrap_WidgetDragDataReceivedCallback cb
    mk_WidgetDragDataReceivedCallback cb' >>= newCClosure


-- | Wrap a `WidgetDragDataReceivedCallback` into a `C_WidgetDragDataReceivedCallback`.
wrap_WidgetDragDataReceivedCallback ::
    WidgetDragDataReceivedCallback ->
    C_WidgetDragDataReceivedCallback
wrap_WidgetDragDataReceivedCallback _cb _ context x y data_ info time _ = do
    context' <- (newObject Gdk.DragContext.DragContext) context
    B.ManagedPtr.withTransient Gtk.SelectionData.SelectionData data_ $ \data_' -> do
        _cb  context' x y data_' info time


{- |
Connect a signal handler for the “@drag-data-received@” signal, to be run before the default handler.
When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to

@
'Data.GI.Base.Signals.on' widget #dragDataReceived callback
@
-}
onWidgetDragDataReceived :: (IsWidget a, MonadIO m) => a -> WidgetDragDataReceivedCallback -> m SignalHandlerId
onWidgetDragDataReceived obj cb = liftIO $ do
    let cb' = wrap_WidgetDragDataReceivedCallback cb
    cb'' <- mk_WidgetDragDataReceivedCallback cb'
    connectSignalFunPtr obj "drag-data-received" cb'' SignalConnectBefore

{- |
Connect a signal handler for the “@drag-data-received@” signal, to be run after the default handler.
When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to

@
'Data.GI.Base.Signals.after' widget #dragDataReceived callback
@
-}
afterWidgetDragDataReceived :: (IsWidget a, MonadIO m) => a -> WidgetDragDataReceivedCallback -> m SignalHandlerId
afterWidgetDragDataReceived obj cb = liftIO $ do
    let cb' = wrap_WidgetDragDataReceivedCallback cb
    cb'' <- mk_WidgetDragDataReceivedCallback cb'
    connectSignalFunPtr obj "drag-data-received" cb'' SignalConnectAfter


-- signal Widget::drag-drop
{- |
The ::drag-drop signal is emitted on the drop site when the user drops
the data onto the widget. The signal handler must determine whether
the cursor position is in a drop zone or not. If it is not in a drop
zone, it returns 'False' and no further processing is necessary.
Otherwise, the handler returns 'True'. In this case, the handler must
ensure that 'GI.Gtk.Functions.dragFinish' is called to let the source know that
the drop is done. The call to 'GI.Gtk.Functions.dragFinish' can be done either
directly or in a 'GI.Gtk.Objects.Widget.Widget'::@/drag-data-received/@ handler which gets
triggered by calling 'GI.Gtk.Objects.Widget.widgetDragGetData' to receive the data for one
or more of the supported targets.
-}
type WidgetDragDropCallback =
    Gdk.DragContext.DragContext
    {- ^ /@context@/: the drag context -}
    -> Int32
    {- ^ /@x@/: the x coordinate of the current cursor position -}
    -> Int32
    {- ^ /@y@/: the y coordinate of the current cursor position -}
    -> Word32
    {- ^ /@time@/: the timestamp of the motion event -}
    -> IO Bool
    {- ^ __Returns:__ whether the cursor position is in a drop zone -}

-- | A convenience synonym for @`Nothing` :: `Maybe` `WidgetDragDropCallback`@.
noWidgetDragDropCallback :: Maybe WidgetDragDropCallback
noWidgetDragDropCallback = Nothing

-- | Type for the callback on the (unwrapped) C side.
type C_WidgetDragDropCallback =
    Ptr () ->                               -- object
    Ptr Gdk.DragContext.DragContext ->
    Int32 ->
    Int32 ->
    Word32 ->
    Ptr () ->                               -- user_data
    IO CInt

-- | Generate a function pointer callable from C code, from a `C_WidgetDragDropCallback`.
foreign import ccall "wrapper"
    mk_WidgetDragDropCallback :: C_WidgetDragDropCallback -> IO (FunPtr C_WidgetDragDropCallback)

-- | Wrap the callback into a `Closure`.
genClosure_WidgetDragDrop :: WidgetDragDropCallback -> IO Closure
genClosure_WidgetDragDrop cb = do
    let cb' = wrap_WidgetDragDropCallback cb
    mk_WidgetDragDropCallback cb' >>= newCClosure


-- | Wrap a `WidgetDragDropCallback` into a `C_WidgetDragDropCallback`.
wrap_WidgetDragDropCallback ::
    WidgetDragDropCallback ->
    C_WidgetDragDropCallback
wrap_WidgetDragDropCallback _cb _ context x y time _ = do
    context' <- (newObject Gdk.DragContext.DragContext) context
    result <- _cb  context' x y time
    let result' = (fromIntegral . fromEnum) result
    return result'


{- |
Connect a signal handler for the “@drag-drop@” signal, to be run before the default handler.
When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to

@
'Data.GI.Base.Signals.on' widget #dragDrop callback
@
-}
onWidgetDragDrop :: (IsWidget a, MonadIO m) => a -> WidgetDragDropCallback -> m SignalHandlerId
onWidgetDragDrop obj cb = liftIO $ do
    let cb' = wrap_WidgetDragDropCallback cb
    cb'' <- mk_WidgetDragDropCallback cb'
    connectSignalFunPtr obj "drag-drop" cb'' SignalConnectBefore

{- |
Connect a signal handler for the “@drag-drop@” signal, to be run after the default handler.
When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to

@
'Data.GI.Base.Signals.after' widget #dragDrop callback
@
-}
afterWidgetDragDrop :: (IsWidget a, MonadIO m) => a -> WidgetDragDropCallback -> m SignalHandlerId
afterWidgetDragDrop obj cb = liftIO $ do
    let cb' = wrap_WidgetDragDropCallback cb
    cb'' <- mk_WidgetDragDropCallback cb'
    connectSignalFunPtr obj "drag-drop" cb'' SignalConnectAfter


-- signal Widget::drag-end
{- |
The ::drag-end signal is emitted on the drag source when a drag is
finished.  A typical reason to connect to this signal is to undo
things done in 'GI.Gtk.Objects.Widget.Widget'::@/drag-begin/@.
-}
type WidgetDragEndCallback =
    Gdk.DragContext.DragContext
    {- ^ /@context@/: the drag context -}
    -> IO ()

-- | A convenience synonym for @`Nothing` :: `Maybe` `WidgetDragEndCallback`@.
noWidgetDragEndCallback :: Maybe WidgetDragEndCallback
noWidgetDragEndCallback = Nothing

-- | Type for the callback on the (unwrapped) C side.
type C_WidgetDragEndCallback =
    Ptr () ->                               -- object
    Ptr Gdk.DragContext.DragContext ->
    Ptr () ->                               -- user_data
    IO ()

-- | Generate a function pointer callable from C code, from a `C_WidgetDragEndCallback`.
foreign import ccall "wrapper"
    mk_WidgetDragEndCallback :: C_WidgetDragEndCallback -> IO (FunPtr C_WidgetDragEndCallback)

-- | Wrap the callback into a `Closure`.
genClosure_WidgetDragEnd :: WidgetDragEndCallback -> IO Closure
genClosure_WidgetDragEnd cb = do
    let cb' = wrap_WidgetDragEndCallback cb
    mk_WidgetDragEndCallback cb' >>= newCClosure


-- | Wrap a `WidgetDragEndCallback` into a `C_WidgetDragEndCallback`.
wrap_WidgetDragEndCallback ::
    WidgetDragEndCallback ->
    C_WidgetDragEndCallback
wrap_WidgetDragEndCallback _cb _ context _ = do
    context' <- (newObject Gdk.DragContext.DragContext) context
    _cb  context'


{- |
Connect a signal handler for the “@drag-end@” signal, to be run before the default handler.
When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to

@
'Data.GI.Base.Signals.on' widget #dragEnd callback
@
-}
onWidgetDragEnd :: (IsWidget a, MonadIO m) => a -> WidgetDragEndCallback -> m SignalHandlerId
onWidgetDragEnd obj cb = liftIO $ do
    let cb' = wrap_WidgetDragEndCallback cb
    cb'' <- mk_WidgetDragEndCallback cb'
    connectSignalFunPtr obj "drag-end" cb'' SignalConnectBefore

{- |
Connect a signal handler for the “@drag-end@” signal, to be run after the default handler.
When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to

@
'Data.GI.Base.Signals.after' widget #dragEnd callback
@
-}
afterWidgetDragEnd :: (IsWidget a, MonadIO m) => a -> WidgetDragEndCallback -> m SignalHandlerId
afterWidgetDragEnd obj cb = liftIO $ do
    let cb' = wrap_WidgetDragEndCallback cb
    cb'' <- mk_WidgetDragEndCallback cb'
    connectSignalFunPtr obj "drag-end" cb'' SignalConnectAfter


-- signal Widget::drag-failed
{- |
The ::drag-failed signal is emitted on the drag source when a drag has
failed. The signal handler may hook custom code to handle a failed DnD
operation based on the type of error, it returns 'True' is the failure has
been already handled (not showing the default \"drag operation failed\"
animation), otherwise it returns 'False'.

/Since: 2.12/
-}
type WidgetDragFailedCallback =
    Gdk.DragContext.DragContext
    {- ^ /@context@/: the drag context -}
    -> Gtk.Enums.DragResult
    {- ^ /@result@/: the result of the drag operation -}
    -> IO Bool
    {- ^ __Returns:__ 'True' if the failed drag operation has been already handled. -}

-- | A convenience synonym for @`Nothing` :: `Maybe` `WidgetDragFailedCallback`@.
noWidgetDragFailedCallback :: Maybe WidgetDragFailedCallback
noWidgetDragFailedCallback = Nothing

-- | Type for the callback on the (unwrapped) C side.
type C_WidgetDragFailedCallback =
    Ptr () ->                               -- object
    Ptr Gdk.DragContext.DragContext ->
    CUInt ->
    Ptr () ->                               -- user_data
    IO CInt

-- | Generate a function pointer callable from C code, from a `C_WidgetDragFailedCallback`.
foreign import ccall "wrapper"
    mk_WidgetDragFailedCallback :: C_WidgetDragFailedCallback -> IO (FunPtr C_WidgetDragFailedCallback)

-- | Wrap the callback into a `Closure`.
genClosure_WidgetDragFailed :: WidgetDragFailedCallback -> IO Closure
genClosure_WidgetDragFailed cb = do
    let cb' = wrap_WidgetDragFailedCallback cb
    mk_WidgetDragFailedCallback cb' >>= newCClosure


-- | Wrap a `WidgetDragFailedCallback` into a `C_WidgetDragFailedCallback`.
wrap_WidgetDragFailedCallback ::
    WidgetDragFailedCallback ->
    C_WidgetDragFailedCallback
wrap_WidgetDragFailedCallback _cb _ context result_ _ = do
    context' <- (newObject Gdk.DragContext.DragContext) context
    let result_' = (toEnum . fromIntegral) result_
    result <- _cb  context' result_'
    let result' = (fromIntegral . fromEnum) result
    return result'


{- |
Connect a signal handler for the “@drag-failed@” signal, to be run before the default handler.
When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to

@
'Data.GI.Base.Signals.on' widget #dragFailed callback
@
-}
onWidgetDragFailed :: (IsWidget a, MonadIO m) => a -> WidgetDragFailedCallback -> m SignalHandlerId
onWidgetDragFailed obj cb = liftIO $ do
    let cb' = wrap_WidgetDragFailedCallback cb
    cb'' <- mk_WidgetDragFailedCallback cb'
    connectSignalFunPtr obj "drag-failed" cb'' SignalConnectBefore

{- |
Connect a signal handler for the “@drag-failed@” signal, to be run after the default handler.
When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to

@
'Data.GI.Base.Signals.after' widget #dragFailed callback
@
-}
afterWidgetDragFailed :: (IsWidget a, MonadIO m) => a -> WidgetDragFailedCallback -> m SignalHandlerId
afterWidgetDragFailed obj cb = liftIO $ do
    let cb' = wrap_WidgetDragFailedCallback cb
    cb'' <- mk_WidgetDragFailedCallback cb'
    connectSignalFunPtr obj "drag-failed" cb'' SignalConnectAfter


-- signal Widget::drag-leave
{- |
The ::drag-leave signal is emitted on the drop site when the cursor
leaves the widget. A typical reason to connect to this signal is to
undo things done in 'GI.Gtk.Objects.Widget.Widget'::@/drag-motion/@, e.g. undo highlighting
with 'GI.Gtk.Objects.Widget.widgetDragUnhighlight'.


Likewise, the 'GI.Gtk.Objects.Widget.Widget'::@/drag-leave/@ signal is also emitted before the
::drag-drop signal, for instance to allow cleaning up of a preview item
created in the 'GI.Gtk.Objects.Widget.Widget'::@/drag-motion/@ signal handler.
-}
type WidgetDragLeaveCallback =
    Gdk.DragContext.DragContext
    {- ^ /@context@/: the drag context -}
    -> Word32
    {- ^ /@time@/: the timestamp of the motion event -}
    -> IO ()

-- | A convenience synonym for @`Nothing` :: `Maybe` `WidgetDragLeaveCallback`@.
noWidgetDragLeaveCallback :: Maybe WidgetDragLeaveCallback
noWidgetDragLeaveCallback = Nothing

-- | Type for the callback on the (unwrapped) C side.
type C_WidgetDragLeaveCallback =
    Ptr () ->                               -- object
    Ptr Gdk.DragContext.DragContext ->
    Word32 ->
    Ptr () ->                               -- user_data
    IO ()

-- | Generate a function pointer callable from C code, from a `C_WidgetDragLeaveCallback`.
foreign import ccall "wrapper"
    mk_WidgetDragLeaveCallback :: C_WidgetDragLeaveCallback -> IO (FunPtr C_WidgetDragLeaveCallback)

-- | Wrap the callback into a `Closure`.
genClosure_WidgetDragLeave :: WidgetDragLeaveCallback -> IO Closure
genClosure_WidgetDragLeave cb = do
    let cb' = wrap_WidgetDragLeaveCallback cb
    mk_WidgetDragLeaveCallback cb' >>= newCClosure


-- | Wrap a `WidgetDragLeaveCallback` into a `C_WidgetDragLeaveCallback`.
wrap_WidgetDragLeaveCallback ::
    WidgetDragLeaveCallback ->
    C_WidgetDragLeaveCallback
wrap_WidgetDragLeaveCallback _cb _ context time _ = do
    context' <- (newObject Gdk.DragContext.DragContext) context
    _cb  context' time


{- |
Connect a signal handler for the “@drag-leave@” signal, to be run before the default handler.
When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to

@
'Data.GI.Base.Signals.on' widget #dragLeave callback
@
-}
onWidgetDragLeave :: (IsWidget a, MonadIO m) => a -> WidgetDragLeaveCallback -> m SignalHandlerId
onWidgetDragLeave obj cb = liftIO $ do
    let cb' = wrap_WidgetDragLeaveCallback cb
    cb'' <- mk_WidgetDragLeaveCallback cb'
    connectSignalFunPtr obj "drag-leave" cb'' SignalConnectBefore

{- |
Connect a signal handler for the “@drag-leave@” signal, to be run after the default handler.
When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to

@
'Data.GI.Base.Signals.after' widget #dragLeave callback
@
-}
afterWidgetDragLeave :: (IsWidget a, MonadIO m) => a -> WidgetDragLeaveCallback -> m SignalHandlerId
afterWidgetDragLeave obj cb = liftIO $ do
    let cb' = wrap_WidgetDragLeaveCallback cb
    cb'' <- mk_WidgetDragLeaveCallback cb'
    connectSignalFunPtr obj "drag-leave" cb'' SignalConnectAfter


-- signal Widget::drag-motion
{- |
The ::drag-motion signal is emitted on the drop site when the user
moves the cursor over the widget during a drag. The signal handler
must determine whether the cursor position is in a drop zone or not.
If it is not in a drop zone, it returns 'False' and no further processing
is necessary. Otherwise, the handler returns 'True'. In this case, the
handler is responsible for providing the necessary information for
displaying feedback to the user, by calling 'GI.Gdk.Functions.dragStatus'.

If the decision whether the drop will be accepted or rejected can\'t be
made based solely on the cursor position and the type of the data, the
handler may inspect the dragged data by calling 'GI.Gtk.Objects.Widget.widgetDragGetData' and
defer the 'GI.Gdk.Functions.dragStatus' call to the 'GI.Gtk.Objects.Widget.Widget'::@/drag-data-received/@
handler. Note that you must pass @/GTK_DEST_DEFAULT_DROP/@,
@/GTK_DEST_DEFAULT_MOTION/@ or @/GTK_DEST_DEFAULT_ALL/@ to 'GI.Gtk.Objects.Widget.widgetDragDestSet'
when using the drag-motion signal that way.

Also note that there is no drag-enter signal. The drag receiver has to
keep track of whether he has received any drag-motion signals since the
last 'GI.Gtk.Objects.Widget.Widget'::@/drag-leave/@ and if not, treat the drag-motion signal as
an \"enter\" signal. Upon an \"enter\", the handler will typically highlight
the drop site with 'GI.Gtk.Objects.Widget.widgetDragHighlight'.

=== /C code/
>
>static void
>drag_motion (GtkWidget      *widget,
>             GdkDragContext *context,
>             gint            x,
>             gint            y,
>             guint           time)
>{
>  GdkAtom target;
>
>  PrivateData *private_data = GET_PRIVATE_DATA (widget);
>
>  if (!private_data->drag_highlight)
>   {
>     private_data->drag_highlight = 1;
>     gtk_drag_highlight (widget);
>   }
>
>  target = gtk_drag_dest_find_target (widget, context, NULL);
>  if (target == GDK_NONE)
>    gdk_drag_status (context, 0, time);
>  else
>   {
>     private_data->pending_status
>        = gdk_drag_context_get_suggested_action (context);
>     gtk_drag_get_data (widget, context, target, time);
>   }
>
>  return TRUE;
>}
>
>static void
>drag_data_received (GtkWidget        *widget,
>                    GdkDragContext   *context,
>                    gint              x,
>                    gint              y,
>                    GtkSelectionData *selection_data,
>                    guint             info,
>                    guint             time)
>{
>  PrivateData *private_data = GET_PRIVATE_DATA (widget);
>
>  if (private_data->suggested_action)
>   {
>     private_data->suggested_action = 0;
>
>     // We are getting this data due to a request in drag_motion,
>     // rather than due to a request in drag_drop, so we are just
>     // supposed to call gdk_drag_status(), not actually paste in
>     // the data.
>
>     str = gtk_selection_data_get_text (selection_data);
>     if (!data_is_acceptable (str))
>       gdk_drag_status (context, 0, time);
>     else
>       gdk_drag_status (context,
>                        private_data->suggested_action,
>                        time);
>   }
>  else
>   {
>     // accept the drop
>   }
>}
-}
type WidgetDragMotionCallback =
    Gdk.DragContext.DragContext
    {- ^ /@context@/: the drag context -}
    -> Int32
    {- ^ /@x@/: the x coordinate of the current cursor position -}
    -> Int32
    {- ^ /@y@/: the y coordinate of the current cursor position -}
    -> Word32
    {- ^ /@time@/: the timestamp of the motion event -}
    -> IO Bool
    {- ^ __Returns:__ whether the cursor position is in a drop zone -}

-- | A convenience synonym for @`Nothing` :: `Maybe` `WidgetDragMotionCallback`@.
noWidgetDragMotionCallback :: Maybe WidgetDragMotionCallback
noWidgetDragMotionCallback = Nothing

-- | Type for the callback on the (unwrapped) C side.
type C_WidgetDragMotionCallback =
    Ptr () ->                               -- object
    Ptr Gdk.DragContext.DragContext ->
    Int32 ->
    Int32 ->
    Word32 ->
    Ptr () ->                               -- user_data
    IO CInt

-- | Generate a function pointer callable from C code, from a `C_WidgetDragMotionCallback`.
foreign import ccall "wrapper"
    mk_WidgetDragMotionCallback :: C_WidgetDragMotionCallback -> IO (FunPtr C_WidgetDragMotionCallback)

-- | Wrap the callback into a `Closure`.
genClosure_WidgetDragMotion :: WidgetDragMotionCallback -> IO Closure
genClosure_WidgetDragMotion cb = do
    let cb' = wrap_WidgetDragMotionCallback cb
    mk_WidgetDragMotionCallback cb' >>= newCClosure


-- | Wrap a `WidgetDragMotionCallback` into a `C_WidgetDragMotionCallback`.
wrap_WidgetDragMotionCallback ::
    WidgetDragMotionCallback ->
    C_WidgetDragMotionCallback
wrap_WidgetDragMotionCallback _cb _ context x y time _ = do
    context' <- (newObject Gdk.DragContext.DragContext) context
    result <- _cb  context' x y time
    let result' = (fromIntegral . fromEnum) result
    return result'


{- |
Connect a signal handler for the “@drag-motion@” signal, to be run before the default handler.
When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to

@
'Data.GI.Base.Signals.on' widget #dragMotion callback
@
-}
onWidgetDragMotion :: (IsWidget a, MonadIO m) => a -> WidgetDragMotionCallback -> m SignalHandlerId
onWidgetDragMotion obj cb = liftIO $ do
    let cb' = wrap_WidgetDragMotionCallback cb
    cb'' <- mk_WidgetDragMotionCallback cb'
    connectSignalFunPtr obj "drag-motion" cb'' SignalConnectBefore

{- |
Connect a signal handler for the “@drag-motion@” signal, to be run after the default handler.
When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to

@
'Data.GI.Base.Signals.after' widget #dragMotion callback
@
-}
afterWidgetDragMotion :: (IsWidget a, MonadIO m) => a -> WidgetDragMotionCallback -> m SignalHandlerId
afterWidgetDragMotion obj cb = liftIO $ do
    let cb' = wrap_WidgetDragMotionCallback cb
    cb'' <- mk_WidgetDragMotionCallback cb'
    connectSignalFunPtr obj "drag-motion" cb'' SignalConnectAfter


-- signal Widget::draw
{- |
This signal is emitted when a widget is supposed to render itself.
The /@widget@/\'s top left corner must be painted at the origin of
the passed in context and be sized to the values returned by
'GI.Gtk.Objects.Widget.widgetGetAllocatedWidth' and
'GI.Gtk.Objects.Widget.widgetGetAllocatedHeight'.

Signal handlers connected to this signal can modify the cairo
context passed as /@cr@/ in any way they like and don\'t need to
restore it. The signal emission takes care of calling @/cairo_save()/@
before and @/cairo_restore()/@ after invoking the handler.

The signal handler will get a /@cr@/ with a clip region already set to the
widget\'s dirty region, i.e. to the area that needs repainting.  Complicated
widgets that want to avoid redrawing themselves completely can get the full
extents of the clip region with 'GI.Gdk.Functions.cairoGetClipRectangle', or they can
get a finer-grained representation of the dirty region with
@/cairo_copy_clip_rectangle_list()/@.

/Since: 3.0/
-}
type WidgetDrawCallback =
    Cairo.Context.Context
    {- ^ /@cr@/: the cairo context to draw to -}
    -> IO Bool
    {- ^ __Returns:__ 'True' to stop other handlers from being invoked for the event.
'False' to propagate the event further. -}

-- | A convenience synonym for @`Nothing` :: `Maybe` `WidgetDrawCallback`@.
noWidgetDrawCallback :: Maybe WidgetDrawCallback
noWidgetDrawCallback = Nothing

-- | Type for the callback on the (unwrapped) C side.
type C_WidgetDrawCallback =
    Ptr () ->                               -- object
    Ptr Cairo.Context.Context ->
    Ptr () ->                               -- user_data
    IO CInt

-- | Generate a function pointer callable from C code, from a `C_WidgetDrawCallback`.
foreign import ccall "wrapper"
    mk_WidgetDrawCallback :: C_WidgetDrawCallback -> IO (FunPtr C_WidgetDrawCallback)

-- | Wrap the callback into a `Closure`.
genClosure_WidgetDraw :: WidgetDrawCallback -> IO Closure
genClosure_WidgetDraw cb = do
    let cb' = wrap_WidgetDrawCallback cb
    mk_WidgetDrawCallback cb' >>= newCClosure


-- | Wrap a `WidgetDrawCallback` into a `C_WidgetDrawCallback`.
wrap_WidgetDrawCallback ::
    WidgetDrawCallback ->
    C_WidgetDrawCallback
wrap_WidgetDrawCallback _cb _ cr _ = do
    B.ManagedPtr.withTransient Cairo.Context.Context cr $ \cr' -> do
        result <- _cb  cr'
        let result' = (fromIntegral . fromEnum) result
        return result'


{- |
Connect a signal handler for the “@draw@” signal, to be run before the default handler.
When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to

@
'Data.GI.Base.Signals.on' widget #draw callback
@
-}
onWidgetDraw :: (IsWidget a, MonadIO m) => a -> WidgetDrawCallback -> m SignalHandlerId
onWidgetDraw obj cb = liftIO $ do
    let cb' = wrap_WidgetDrawCallback cb
    cb'' <- mk_WidgetDrawCallback cb'
    connectSignalFunPtr obj "draw" cb'' SignalConnectBefore

{- |
Connect a signal handler for the “@draw@” signal, to be run after the default handler.
When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to

@
'Data.GI.Base.Signals.after' widget #draw callback
@
-}
afterWidgetDraw :: (IsWidget a, MonadIO m) => a -> WidgetDrawCallback -> m SignalHandlerId
afterWidgetDraw obj cb = liftIO $ do
    let cb' = wrap_WidgetDrawCallback cb
    cb'' <- mk_WidgetDrawCallback cb'
    connectSignalFunPtr obj "draw" cb'' SignalConnectAfter


-- signal Widget::enter-notify-event
{- |
The ::enter-notify-event will be emitted when the pointer enters
the /@widget@/\'s window.

To receive this signal, the 'GI.Gdk.Objects.Window.Window' associated to the widget needs
to enable the @/GDK_ENTER_NOTIFY_MASK/@ mask.

This signal will be sent to the grab widget if there is one.
-}
type WidgetEnterNotifyEventCallback =
    Gdk.EventCrossing.EventCrossing
    {- ^ /@event@/: the 'GI.Gdk.Structs.EventCrossing.EventCrossing' which triggered
  this signal. -}
    -> IO Bool
    {- ^ __Returns:__ 'True' to stop other handlers from being invoked for the event.
  'False' to propagate the event further. -}

-- | A convenience synonym for @`Nothing` :: `Maybe` `WidgetEnterNotifyEventCallback`@.
noWidgetEnterNotifyEventCallback :: Maybe WidgetEnterNotifyEventCallback
noWidgetEnterNotifyEventCallback = Nothing

-- | Type for the callback on the (unwrapped) C side.
type C_WidgetEnterNotifyEventCallback =
    Ptr () ->                               -- object
    Ptr Gdk.EventCrossing.EventCrossing ->
    Ptr () ->                               -- user_data
    IO CInt

-- | Generate a function pointer callable from C code, from a `C_WidgetEnterNotifyEventCallback`.
foreign import ccall "wrapper"
    mk_WidgetEnterNotifyEventCallback :: C_WidgetEnterNotifyEventCallback -> IO (FunPtr C_WidgetEnterNotifyEventCallback)

-- | Wrap the callback into a `Closure`.
genClosure_WidgetEnterNotifyEvent :: WidgetEnterNotifyEventCallback -> IO Closure
genClosure_WidgetEnterNotifyEvent cb = do
    let cb' = wrap_WidgetEnterNotifyEventCallback cb
    mk_WidgetEnterNotifyEventCallback cb' >>= newCClosure


-- | Wrap a `WidgetEnterNotifyEventCallback` into a `C_WidgetEnterNotifyEventCallback`.
wrap_WidgetEnterNotifyEventCallback ::
    WidgetEnterNotifyEventCallback ->
    C_WidgetEnterNotifyEventCallback
wrap_WidgetEnterNotifyEventCallback _cb _ event _ = do
    event' <- (newPtr Gdk.EventCrossing.EventCrossing) event
    result <- _cb  event'
    let result' = (fromIntegral . fromEnum) result
    return result'


{- |
Connect a signal handler for the “@enter-notify-event@” signal, to be run before the default handler.
When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to

@
'Data.GI.Base.Signals.on' widget #enterNotifyEvent callback
@
-}
onWidgetEnterNotifyEvent :: (IsWidget a, MonadIO m) => a -> WidgetEnterNotifyEventCallback -> m SignalHandlerId
onWidgetEnterNotifyEvent obj cb = liftIO $ do
    let cb' = wrap_WidgetEnterNotifyEventCallback cb
    cb'' <- mk_WidgetEnterNotifyEventCallback cb'
    connectSignalFunPtr obj "enter-notify-event" cb'' SignalConnectBefore

{- |
Connect a signal handler for the “@enter-notify-event@” signal, to be run after the default handler.
When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to

@
'Data.GI.Base.Signals.after' widget #enterNotifyEvent callback
@
-}
afterWidgetEnterNotifyEvent :: (IsWidget a, MonadIO m) => a -> WidgetEnterNotifyEventCallback -> m SignalHandlerId
afterWidgetEnterNotifyEvent obj cb = liftIO $ do
    let cb' = wrap_WidgetEnterNotifyEventCallback cb
    cb'' <- mk_WidgetEnterNotifyEventCallback cb'
    connectSignalFunPtr obj "enter-notify-event" cb'' SignalConnectAfter


-- signal Widget::event
{- |
The GTK+ main loop will emit three signals for each GDK event delivered
to a widget: one generic ::event signal, another, more specific,
signal that matches the type of event delivered (e.g.
'GI.Gtk.Objects.Widget.Widget'::@/key-press-event/@) and finally a generic
'GI.Gtk.Objects.Widget.Widget'::@/event-after/@ signal.
-}
type WidgetEventCallback =
    Gdk.Event.Event
    {- ^ /@event@/: the 'GI.Gdk.Unions.Event.Event' which triggered this signal -}
    -> IO Bool
    {- ^ __Returns:__ 'True' to stop other handlers from being invoked for the event
and to cancel the emission of the second specific ::event signal.
  'False' to propagate the event further and to allow the emission of
  the second signal. The ::event-after signal is emitted regardless of
  the return value. -}

-- | A convenience synonym for @`Nothing` :: `Maybe` `WidgetEventCallback`@.
noWidgetEventCallback :: Maybe WidgetEventCallback
noWidgetEventCallback = Nothing

-- | Type for the callback on the (unwrapped) C side.
type C_WidgetEventCallback =
    Ptr () ->                               -- object
    Ptr Gdk.Event.Event ->
    Ptr () ->                               -- user_data
    IO CInt

-- | Generate a function pointer callable from C code, from a `C_WidgetEventCallback`.
foreign import ccall "wrapper"
    mk_WidgetEventCallback :: C_WidgetEventCallback -> IO (FunPtr C_WidgetEventCallback)

-- | Wrap the callback into a `Closure`.
genClosure_WidgetEvent :: WidgetEventCallback -> IO Closure
genClosure_WidgetEvent cb = do
    let cb' = wrap_WidgetEventCallback cb
    mk_WidgetEventCallback cb' >>= newCClosure


-- | Wrap a `WidgetEventCallback` into a `C_WidgetEventCallback`.
wrap_WidgetEventCallback ::
    WidgetEventCallback ->
    C_WidgetEventCallback
wrap_WidgetEventCallback _cb _ event _ = do
    B.ManagedPtr.withTransient Gdk.Event.Event event $ \event' -> do
        result <- _cb  event'
        let result' = (fromIntegral . fromEnum) result
        return result'


{- |
Connect a signal handler for the “@event@” signal, to be run before the default handler.
When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to

@
'Data.GI.Base.Signals.on' widget #event callback
@
-}
onWidgetEvent :: (IsWidget a, MonadIO m) => a -> WidgetEventCallback -> m SignalHandlerId
onWidgetEvent obj cb = liftIO $ do
    let cb' = wrap_WidgetEventCallback cb
    cb'' <- mk_WidgetEventCallback cb'
    connectSignalFunPtr obj "event" cb'' SignalConnectBefore

{- |
Connect a signal handler for the “@event@” signal, to be run after the default handler.
When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to

@
'Data.GI.Base.Signals.after' widget #event callback
@
-}
afterWidgetEvent :: (IsWidget a, MonadIO m) => a -> WidgetEventCallback -> m SignalHandlerId
afterWidgetEvent obj cb = liftIO $ do
    let cb' = wrap_WidgetEventCallback cb
    cb'' <- mk_WidgetEventCallback cb'
    connectSignalFunPtr obj "event" cb'' SignalConnectAfter


-- signal Widget::event-after
{- |
After the emission of the 'GI.Gtk.Objects.Widget.Widget'::@/event/@ signal and (optionally)
the second more specific signal, ::event-after will be emitted
regardless of the previous two signals handlers return values.
-}
type WidgetEventAfterCallback =
    Gdk.Event.Event
    {- ^ /@event@/: the 'GI.Gdk.Unions.Event.Event' which triggered this signal -}
    -> IO ()

-- | A convenience synonym for @`Nothing` :: `Maybe` `WidgetEventAfterCallback`@.
noWidgetEventAfterCallback :: Maybe WidgetEventAfterCallback
noWidgetEventAfterCallback = Nothing

-- | Type for the callback on the (unwrapped) C side.
type C_WidgetEventAfterCallback =
    Ptr () ->                               -- object
    Ptr Gdk.Event.Event ->
    Ptr () ->                               -- user_data
    IO ()

-- | Generate a function pointer callable from C code, from a `C_WidgetEventAfterCallback`.
foreign import ccall "wrapper"
    mk_WidgetEventAfterCallback :: C_WidgetEventAfterCallback -> IO (FunPtr C_WidgetEventAfterCallback)

-- | Wrap the callback into a `Closure`.
genClosure_WidgetEventAfter :: WidgetEventAfterCallback -> IO Closure
genClosure_WidgetEventAfter cb = do
    let cb' = wrap_WidgetEventAfterCallback cb
    mk_WidgetEventAfterCallback cb' >>= newCClosure


-- | Wrap a `WidgetEventAfterCallback` into a `C_WidgetEventAfterCallback`.
wrap_WidgetEventAfterCallback ::
    WidgetEventAfterCallback ->
    C_WidgetEventAfterCallback
wrap_WidgetEventAfterCallback _cb _ event _ = do
    B.ManagedPtr.withTransient Gdk.Event.Event event $ \event' -> do
        _cb  event'


{- |
Connect a signal handler for the “@event-after@” signal, to be run before the default handler.
When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to

@
'Data.GI.Base.Signals.on' widget #eventAfter callback
@
-}
onWidgetEventAfter :: (IsWidget a, MonadIO m) => a -> WidgetEventAfterCallback -> m SignalHandlerId
onWidgetEventAfter obj cb = liftIO $ do
    let cb' = wrap_WidgetEventAfterCallback cb
    cb'' <- mk_WidgetEventAfterCallback cb'
    connectSignalFunPtr obj "event-after" cb'' SignalConnectBefore

{- |
Connect a signal handler for the “@event-after@” signal, to be run after the default handler.
When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to

@
'Data.GI.Base.Signals.after' widget #eventAfter callback
@
-}
afterWidgetEventAfter :: (IsWidget a, MonadIO m) => a -> WidgetEventAfterCallback -> m SignalHandlerId
afterWidgetEventAfter obj cb = liftIO $ do
    let cb' = wrap_WidgetEventAfterCallback cb
    cb'' <- mk_WidgetEventAfterCallback cb'
    connectSignalFunPtr obj "event-after" cb'' SignalConnectAfter


-- signal Widget::focus
{- |
/No description available in the introspection data./
-}
type WidgetFocusCallback =
    Gtk.Enums.DirectionType
    -> IO Bool
    {- ^ __Returns:__ 'True' to stop other handlers from being invoked for the event. 'False' to propagate the event further. -}

-- | A convenience synonym for @`Nothing` :: `Maybe` `WidgetFocusCallback`@.
noWidgetFocusCallback :: Maybe WidgetFocusCallback
noWidgetFocusCallback = Nothing

-- | Type for the callback on the (unwrapped) C side.
type C_WidgetFocusCallback =
    Ptr () ->                               -- object
    CUInt ->
    Ptr () ->                               -- user_data
    IO CInt

-- | Generate a function pointer callable from C code, from a `C_WidgetFocusCallback`.
foreign import ccall "wrapper"
    mk_WidgetFocusCallback :: C_WidgetFocusCallback -> IO (FunPtr C_WidgetFocusCallback)

-- | Wrap the callback into a `Closure`.
genClosure_WidgetFocus :: WidgetFocusCallback -> IO Closure
genClosure_WidgetFocus cb = do
    let cb' = wrap_WidgetFocusCallback cb
    mk_WidgetFocusCallback cb' >>= newCClosure


-- | Wrap a `WidgetFocusCallback` into a `C_WidgetFocusCallback`.
wrap_WidgetFocusCallback ::
    WidgetFocusCallback ->
    C_WidgetFocusCallback
wrap_WidgetFocusCallback