{-# LANGUAGE TypeApplications #-}


-- | Copyright  : Will Thompson, Iñaki García Etxebarria and Jonas Platte
-- License    : LGPL-2.1
-- Maintainer : Iñaki García Etxebarria
-- 
-- 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 two virtual methods:
-- 
-- * t'GI.Gtk.Structs.WidgetClass.WidgetClass'.@/get_request_mode/@()
-- * t'GI.Gtk.Structs.WidgetClass.WidgetClass'.@/measure/@()
-- 
-- 
-- There are some important things to keep in mind when implementing
-- height-for-width and when using it in widget implementations.
-- 
-- If you implement a direct t'GI.Gtk.Objects.Widget.Widget' subclass that supports
-- height-for-width or width-for-height geometry management for
-- itself or its child widgets, the t'GI.Gtk.Structs.WidgetClass.WidgetClass'.@/get_request_mode/@()
-- virtual function must be implemented as well and return the widget\'s
-- preferred request mode. The default implementation of this virtual function
-- returns 'GI.Gtk.Enums.SizeRequestModeConstantSize', which means that the widget will only ever
-- get -1 passed as the for_size value to its t'GI.Gtk.Structs.WidgetClass.WidgetClass'.@/measure/@() implementation.
-- 
-- 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 t'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.widgetMeasure' with an orientation
-- of 'GI.Gtk.Enums.OrientationHorizontal' and a for_size of -1.
-- Because the preferred widths for each widget 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.widgetMeasure' with an
-- orientation of 'GI.Gtk.Enums.OrientationVertical' and a for_size of the just computed
-- width. This 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 @/gtk_window_set_geometry_hints()/@ 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 widgets allocate their children.
-- Each 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 t'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, t'GI.Gtk.Objects.Widget.Widget' caches a  small number of results
-- to avoid re-querying for the same sizes in one allocation cycle.
-- 
-- 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 t'GI.Gtk.Objects.Label.Label' that does height-for-width word wrapping
-- will not expect to have t'GI.Gtk.Structs.WidgetClass.WidgetClass'.@/measure/@() with an orientation of
-- 'GI.Gtk.Enums.OrientationVertical' 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:
-- 
-- 
-- === /C code/
-- >
-- >static void
-- >foo_widget_measure (GtkWidget      *widget,
-- >                    GtkOrientation  orientation,
-- >                    int             for_size,
-- >                    int            *minimum_size,
-- >                    int            *natural_size,
-- >                    int            *minimum_baseline,
-- >                    int            *natural_baseline)
-- >{
-- >  if (orientation == GTK_ORIENTATION_HORIZONTAL)
-- >    {
-- >      // Calculate minimum and natural width
-- >    }
-- >  else // VERTICAL
-- >    {
-- >       if (i_am_in_height_for_width_mode)
-- >         {
-- >           int min_width, dummy;
-- >
-- >           // First, get the minimum width of our widget
-- >           GTK_WIDGET_GET_CLASS (widget)->measure (widget, GTK_ORIENTATION_HORIZONTAL, -1,
-- >                                                   &min_width, &dummy, &dummy, &dummy);
-- >
-- >           // Now use the minimum width to retrieve the minimum and natural height to display
-- >           // that width.
-- >           GTK_WIDGET_GET_CLASS (widget)->measure (widget, GTK_ORIENTATION_VERTICAL, min_width,
-- >                                                   minimum_size, natural_size, &dummy, &dummy);
-- >         }
-- >       else
-- >         {
-- >           // ... some widgets do both.
-- >         }
-- >   }
-- >}
-- 
-- 
-- 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 in the code
-- example above.
-- 
-- It will not work to use the wrapper function 'GI.Gtk.Objects.Widget.widgetMeasure'
-- inside your own t'GI.Gtk.Structs.WidgetClass.WidgetClass'.@/size/@-@/allocate()/@ implementation.
-- These return a request adjusted by t'GI.Gtk.Objects.SizeGroup.SizeGroup', the widget\'s align and expand flags
-- as well as its CSS style.
-- 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 widget, you must use 'GI.Gtk.Objects.Widget.widgetMeasure'.
-- Otherwise, you would not properly consider widget margins,
-- t'GI.Gtk.Objects.SizeGroup.SizeGroup', and so forth.
-- 
-- 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 widget
-- 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 also done by the t'GI.Gtk.Structs.WidgetClass.WidgetClass'.@/measure/@()
-- virtual function. It allows you to report a both a minimum and natural
-- 
-- 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.
-- 
-- = 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 t'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>
-- 
-- 
-- If the parent widget uses a t'GI.Gtk.Objects.LayoutManager.LayoutManager', t'GI.Gtk.Objects.Widget.Widget' supports a
-- custom \<layout> element, used to define layout properties:
-- 
-- >
-- ><object class="MyGrid" id="grid1">
-- >  <child>
-- >    <object class="GtkLabel" id="label1">
-- >      <property name="label">Description</property>
-- >      <layout>
-- >        <property name="left-attach">0</property>
-- >        <property name="top-attach">0</property>
-- >        <property name="row-span">1</property>
-- >        <property name="col-span">1</property>
-- >      </layout>
-- >    </object>
-- >  </child>
-- >  <child>
-- >    <object class="GtkEntry" id="description_entry">
-- >      <layout>
-- >        <property name="left-attach">1</property>
-- >        <property name="top-attach">0</property>
-- >        <property name="row-span">1</property>
-- >        <property name="col-span">1</property>
-- >      </layout>
-- >    </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 t'GI.Gtk.Objects.Builder.Builder' interface description
-- language.
-- 
-- To create composite widgets with t'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 t'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 t'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 t'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);
-- >}
-- 

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

module GI.Gtk.Objects.Widget
    ( 

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


 -- * Methods
-- ** Overloaded methods #method:Overloaded methods#

#if defined(ENABLE_OVERLOADING)
    ResolveWidgetMethod                     ,
#endif


-- ** activate #method:activate#

#if defined(ENABLE_OVERLOADING)
    WidgetActivateMethodInfo                ,
#endif
    widgetActivate                          ,


-- ** activateAction #method:activateAction#

#if defined(ENABLE_OVERLOADING)
    WidgetActivateActionMethodInfo          ,
#endif
    widgetActivateAction                    ,


-- ** activateDefault #method:activateDefault#

#if defined(ENABLE_OVERLOADING)
    WidgetActivateDefaultMethodInfo         ,
#endif
    widgetActivateDefault                   ,


-- ** addAccelerator #method:addAccelerator#

#if defined(ENABLE_OVERLOADING)
    WidgetAddAcceleratorMethodInfo          ,
#endif
    widgetAddAccelerator                    ,


-- ** addController #method:addController#

#if defined(ENABLE_OVERLOADING)
    WidgetAddControllerMethodInfo           ,
#endif
    widgetAddController                     ,


-- ** addMnemonicLabel #method:addMnemonicLabel#

#if defined(ENABLE_OVERLOADING)
    WidgetAddMnemonicLabelMethodInfo        ,
#endif
    widgetAddMnemonicLabel                  ,


-- ** addTickCallback #method:addTickCallback#

#if defined(ENABLE_OVERLOADING)
    WidgetAddTickCallbackMethodInfo         ,
#endif
    widgetAddTickCallback                   ,


-- ** allocate #method:allocate#

#if defined(ENABLE_OVERLOADING)
    WidgetAllocateMethodInfo                ,
#endif
    widgetAllocate                          ,


-- ** canActivateAccel #method:canActivateAccel#

#if defined(ENABLE_OVERLOADING)
    WidgetCanActivateAccelMethodInfo        ,
#endif
    widgetCanActivateAccel                  ,


-- ** childFocus #method:childFocus#

#if defined(ENABLE_OVERLOADING)
    WidgetChildFocusMethodInfo              ,
#endif
    widgetChildFocus                        ,


-- ** computeBounds #method:computeBounds#

#if defined(ENABLE_OVERLOADING)
    WidgetComputeBoundsMethodInfo           ,
#endif
    widgetComputeBounds                     ,


-- ** computeExpand #method:computeExpand#

#if defined(ENABLE_OVERLOADING)
    WidgetComputeExpandMethodInfo           ,
#endif
    widgetComputeExpand                     ,


-- ** computePoint #method:computePoint#

#if defined(ENABLE_OVERLOADING)
    WidgetComputePointMethodInfo            ,
#endif
    widgetComputePoint                      ,


-- ** computeTransform #method:computeTransform#

#if defined(ENABLE_OVERLOADING)
    WidgetComputeTransformMethodInfo        ,
#endif
    widgetComputeTransform                  ,


-- ** contains #method:contains#

#if defined(ENABLE_OVERLOADING)
    WidgetContainsMethodInfo                ,
#endif
    widgetContains                          ,


-- ** createPangoContext #method:createPangoContext#

#if defined(ENABLE_OVERLOADING)
    WidgetCreatePangoContextMethodInfo      ,
#endif
    widgetCreatePangoContext                ,


-- ** createPangoLayout #method:createPangoLayout#

#if defined(ENABLE_OVERLOADING)
    WidgetCreatePangoLayoutMethodInfo       ,
#endif
    widgetCreatePangoLayout                 ,


-- ** destroy #method:destroy#

#if defined(ENABLE_OVERLOADING)
    WidgetDestroyMethodInfo                 ,
#endif
    widgetDestroy                           ,


-- ** destroyed #method:destroyed#

#if defined(ENABLE_OVERLOADING)
    WidgetDestroyedMethodInfo               ,
#endif
    widgetDestroyed                         ,


-- ** deviceIsShadowed #method:deviceIsShadowed#

#if defined(ENABLE_OVERLOADING)
    WidgetDeviceIsShadowedMethodInfo        ,
#endif
    widgetDeviceIsShadowed                  ,


-- ** dragBegin #method:dragBegin#

#if defined(ENABLE_OVERLOADING)
    WidgetDragBeginMethodInfo               ,
#endif
    widgetDragBegin                         ,


-- ** dragCheckThreshold #method:dragCheckThreshold#

#if defined(ENABLE_OVERLOADING)
    WidgetDragCheckThresholdMethodInfo      ,
#endif
    widgetDragCheckThreshold                ,


-- ** dragDestAddImageTargets #method:dragDestAddImageTargets#

#if defined(ENABLE_OVERLOADING)
    WidgetDragDestAddImageTargetsMethodInfo ,
#endif
    widgetDragDestAddImageTargets           ,


-- ** dragDestAddTextTargets #method:dragDestAddTextTargets#

#if defined(ENABLE_OVERLOADING)
    WidgetDragDestAddTextTargetsMethodInfo  ,
#endif
    widgetDragDestAddTextTargets            ,


-- ** dragDestAddUriTargets #method:dragDestAddUriTargets#

#if defined(ENABLE_OVERLOADING)
    WidgetDragDestAddUriTargetsMethodInfo   ,
#endif
    widgetDragDestAddUriTargets             ,


-- ** dragDestFindTarget #method:dragDestFindTarget#

#if defined(ENABLE_OVERLOADING)
    WidgetDragDestFindTargetMethodInfo      ,
#endif
    widgetDragDestFindTarget                ,


-- ** dragDestGetTargetList #method:dragDestGetTargetList#

#if defined(ENABLE_OVERLOADING)
    WidgetDragDestGetTargetListMethodInfo   ,
#endif
    widgetDragDestGetTargetList             ,


-- ** dragDestGetTrackMotion #method:dragDestGetTrackMotion#

#if defined(ENABLE_OVERLOADING)
    WidgetDragDestGetTrackMotionMethodInfo  ,
#endif
    widgetDragDestGetTrackMotion            ,


-- ** dragDestSet #method:dragDestSet#

#if defined(ENABLE_OVERLOADING)
    WidgetDragDestSetMethodInfo             ,
#endif
    widgetDragDestSet                       ,


-- ** dragDestSetTargetList #method:dragDestSetTargetList#

#if defined(ENABLE_OVERLOADING)
    WidgetDragDestSetTargetListMethodInfo   ,
#endif
    widgetDragDestSetTargetList             ,


-- ** dragDestSetTrackMotion #method:dragDestSetTrackMotion#

#if defined(ENABLE_OVERLOADING)
    WidgetDragDestSetTrackMotionMethodInfo  ,
#endif
    widgetDragDestSetTrackMotion            ,


-- ** dragDestUnset #method:dragDestUnset#

#if defined(ENABLE_OVERLOADING)
    WidgetDragDestUnsetMethodInfo           ,
#endif
    widgetDragDestUnset                     ,


-- ** dragGetData #method:dragGetData#

#if defined(ENABLE_OVERLOADING)
    WidgetDragGetDataMethodInfo             ,
#endif
    widgetDragGetData                       ,


-- ** dragHighlight #method:dragHighlight#

#if defined(ENABLE_OVERLOADING)
    WidgetDragHighlightMethodInfo           ,
#endif
    widgetDragHighlight                     ,


-- ** dragSourceAddImageTargets #method:dragSourceAddImageTargets#

#if defined(ENABLE_OVERLOADING)
    WidgetDragSourceAddImageTargetsMethodInfo,
#endif
    widgetDragSourceAddImageTargets         ,


-- ** dragSourceAddTextTargets #method:dragSourceAddTextTargets#

#if defined(ENABLE_OVERLOADING)
    WidgetDragSourceAddTextTargetsMethodInfo,
#endif
    widgetDragSourceAddTextTargets          ,


-- ** dragSourceAddUriTargets #method:dragSourceAddUriTargets#

#if defined(ENABLE_OVERLOADING)
    WidgetDragSourceAddUriTargetsMethodInfo ,
#endif
    widgetDragSourceAddUriTargets           ,


-- ** dragSourceGetTargetList #method:dragSourceGetTargetList#

#if defined(ENABLE_OVERLOADING)
    WidgetDragSourceGetTargetListMethodInfo ,
#endif
    widgetDragSourceGetTargetList           ,


-- ** dragSourceSet #method:dragSourceSet#

#if defined(ENABLE_OVERLOADING)
    WidgetDragSourceSetMethodInfo           ,
#endif
    widgetDragSourceSet                     ,


-- ** dragSourceSetIconGicon #method:dragSourceSetIconGicon#

#if defined(ENABLE_OVERLOADING)
    WidgetDragSourceSetIconGiconMethodInfo  ,
#endif
    widgetDragSourceSetIconGicon            ,


-- ** dragSourceSetIconName #method:dragSourceSetIconName#

#if defined(ENABLE_OVERLOADING)
    WidgetDragSourceSetIconNameMethodInfo   ,
#endif
    widgetDragSourceSetIconName             ,


-- ** dragSourceSetIconPaintable #method:dragSourceSetIconPaintable#

#if defined(ENABLE_OVERLOADING)
    WidgetDragSourceSetIconPaintableMethodInfo,
#endif
    widgetDragSourceSetIconPaintable        ,


-- ** dragSourceSetTargetList #method:dragSourceSetTargetList#

#if defined(ENABLE_OVERLOADING)
    WidgetDragSourceSetTargetListMethodInfo ,
#endif
    widgetDragSourceSetTargetList           ,


-- ** dragSourceUnset #method:dragSourceUnset#

#if defined(ENABLE_OVERLOADING)
    WidgetDragSourceUnsetMethodInfo         ,
#endif
    widgetDragSourceUnset                   ,


-- ** dragUnhighlight #method:dragUnhighlight#

#if defined(ENABLE_OVERLOADING)
    WidgetDragUnhighlightMethodInfo         ,
#endif
    widgetDragUnhighlight                   ,


-- ** errorBell #method:errorBell#

#if defined(ENABLE_OVERLOADING)
    WidgetErrorBellMethodInfo               ,
#endif
    widgetErrorBell                         ,


-- ** event #method:event#

#if defined(ENABLE_OVERLOADING)
    WidgetEventMethodInfo                   ,
#endif
    widgetEvent                             ,


-- ** getAccessible #method:getAccessible#

#if defined(ENABLE_OVERLOADING)
    WidgetGetAccessibleMethodInfo           ,
#endif
    widgetGetAccessible                     ,


-- ** getActionGroup #method:getActionGroup#

#if defined(ENABLE_OVERLOADING)
    WidgetGetActionGroupMethodInfo          ,
#endif
    widgetGetActionGroup                    ,


-- ** getAllocatedBaseline #method:getAllocatedBaseline#

#if defined(ENABLE_OVERLOADING)
    WidgetGetAllocatedBaselineMethodInfo    ,
#endif
    widgetGetAllocatedBaseline              ,


-- ** getAllocatedHeight #method:getAllocatedHeight#

#if defined(ENABLE_OVERLOADING)
    WidgetGetAllocatedHeightMethodInfo      ,
#endif
    widgetGetAllocatedHeight                ,


-- ** getAllocatedWidth #method:getAllocatedWidth#

#if defined(ENABLE_OVERLOADING)
    WidgetGetAllocatedWidthMethodInfo       ,
#endif
    widgetGetAllocatedWidth                 ,


-- ** getAllocation #method:getAllocation#

#if defined(ENABLE_OVERLOADING)
    WidgetGetAllocationMethodInfo           ,
#endif
    widgetGetAllocation                     ,


-- ** getAncestor #method:getAncestor#

#if defined(ENABLE_OVERLOADING)
    WidgetGetAncestorMethodInfo             ,
#endif
    widgetGetAncestor                       ,


-- ** getCanFocus #method:getCanFocus#

#if defined(ENABLE_OVERLOADING)
    WidgetGetCanFocusMethodInfo             ,
#endif
    widgetGetCanFocus                       ,


-- ** getCanTarget #method:getCanTarget#

#if defined(ENABLE_OVERLOADING)
    WidgetGetCanTargetMethodInfo            ,
#endif
    widgetGetCanTarget                      ,


-- ** getChildVisible #method:getChildVisible#

#if defined(ENABLE_OVERLOADING)
    WidgetGetChildVisibleMethodInfo         ,
#endif
    widgetGetChildVisible                   ,


-- ** getClipboard #method:getClipboard#

#if defined(ENABLE_OVERLOADING)
    WidgetGetClipboardMethodInfo            ,
#endif
    widgetGetClipboard                      ,


-- ** getCursor #method:getCursor#

#if defined(ENABLE_OVERLOADING)
    WidgetGetCursorMethodInfo               ,
#endif
    widgetGetCursor                         ,


-- ** getDefaultDirection #method:getDefaultDirection#

    widgetGetDefaultDirection               ,


-- ** getDirection #method:getDirection#

#if defined(ENABLE_OVERLOADING)
    WidgetGetDirectionMethodInfo            ,
#endif
    widgetGetDirection                      ,


-- ** getDisplay #method:getDisplay#

#if defined(ENABLE_OVERLOADING)
    WidgetGetDisplayMethodInfo              ,
#endif
    widgetGetDisplay                        ,


-- ** getFirstChild #method:getFirstChild#

#if defined(ENABLE_OVERLOADING)
    WidgetGetFirstChildMethodInfo           ,
#endif
    widgetGetFirstChild                     ,


-- ** getFocusChild #method:getFocusChild#

#if defined(ENABLE_OVERLOADING)
    WidgetGetFocusChildMethodInfo           ,
#endif
    widgetGetFocusChild                     ,


-- ** getFocusOnClick #method:getFocusOnClick#

#if defined(ENABLE_OVERLOADING)
    WidgetGetFocusOnClickMethodInfo         ,
#endif
    widgetGetFocusOnClick                   ,


-- ** getFontMap #method:getFontMap#

#if defined(ENABLE_OVERLOADING)
    WidgetGetFontMapMethodInfo              ,
#endif
    widgetGetFontMap                        ,


-- ** getFontOptions #method:getFontOptions#

#if defined(ENABLE_OVERLOADING)
    WidgetGetFontOptionsMethodInfo          ,
#endif
    widgetGetFontOptions                    ,


-- ** getFrameClock #method:getFrameClock#

#if defined(ENABLE_OVERLOADING)
    WidgetGetFrameClockMethodInfo           ,
#endif
    widgetGetFrameClock                     ,


-- ** getHalign #method:getHalign#

#if defined(ENABLE_OVERLOADING)
    WidgetGetHalignMethodInfo               ,
#endif
    widgetGetHalign                         ,


-- ** getHasSurface #method:getHasSurface#

#if defined(ENABLE_OVERLOADING)
    WidgetGetHasSurfaceMethodInfo           ,
#endif
    widgetGetHasSurface                     ,


-- ** getHasTooltip #method:getHasTooltip#

#if defined(ENABLE_OVERLOADING)
    WidgetGetHasTooltipMethodInfo           ,
#endif
    widgetGetHasTooltip                     ,


-- ** getHeight #method:getHeight#

#if defined(ENABLE_OVERLOADING)
    WidgetGetHeightMethodInfo               ,
#endif
    widgetGetHeight                         ,


-- ** getHexpand #method:getHexpand#

#if defined(ENABLE_OVERLOADING)
    WidgetGetHexpandMethodInfo              ,
#endif
    widgetGetHexpand                        ,


-- ** getHexpandSet #method:getHexpandSet#

#if defined(ENABLE_OVERLOADING)
    WidgetGetHexpandSetMethodInfo           ,
#endif
    widgetGetHexpandSet                     ,


-- ** getLastChild #method:getLastChild#

#if defined(ENABLE_OVERLOADING)
    WidgetGetLastChildMethodInfo            ,
#endif
    widgetGetLastChild                      ,


-- ** getLayoutManager #method:getLayoutManager#

#if defined(ENABLE_OVERLOADING)
    WidgetGetLayoutManagerMethodInfo        ,
#endif
    widgetGetLayoutManager                  ,


-- ** getMapped #method:getMapped#

#if defined(ENABLE_OVERLOADING)
    WidgetGetMappedMethodInfo               ,
#endif
    widgetGetMapped                         ,


-- ** getMarginBottom #method:getMarginBottom#

#if defined(ENABLE_OVERLOADING)
    WidgetGetMarginBottomMethodInfo         ,
#endif
    widgetGetMarginBottom                   ,


-- ** getMarginEnd #method:getMarginEnd#

#if defined(ENABLE_OVERLOADING)
    WidgetGetMarginEndMethodInfo            ,
#endif
    widgetGetMarginEnd                      ,


-- ** getMarginStart #method:getMarginStart#

#if defined(ENABLE_OVERLOADING)
    WidgetGetMarginStartMethodInfo          ,
#endif
    widgetGetMarginStart                    ,


-- ** getMarginTop #method:getMarginTop#

#if defined(ENABLE_OVERLOADING)
    WidgetGetMarginTopMethodInfo            ,
#endif
    widgetGetMarginTop                      ,


-- ** getModifierMask #method:getModifierMask#

#if defined(ENABLE_OVERLOADING)
    WidgetGetModifierMaskMethodInfo         ,
#endif
    widgetGetModifierMask                   ,


-- ** getName #method:getName#

#if defined(ENABLE_OVERLOADING)
    WidgetGetNameMethodInfo                 ,
#endif
    widgetGetName                           ,


-- ** getNextSibling #method:getNextSibling#

#if defined(ENABLE_OVERLOADING)
    WidgetGetNextSiblingMethodInfo          ,
#endif
    widgetGetNextSibling                    ,


-- ** getOpacity #method:getOpacity#

#if defined(ENABLE_OVERLOADING)
    WidgetGetOpacityMethodInfo              ,
#endif
    widgetGetOpacity                        ,


-- ** getOverflow #method:getOverflow#

#if defined(ENABLE_OVERLOADING)
    WidgetGetOverflowMethodInfo             ,
#endif
    widgetGetOverflow                       ,


-- ** getPangoContext #method:getPangoContext#

#if defined(ENABLE_OVERLOADING)
    WidgetGetPangoContextMethodInfo         ,
#endif
    widgetGetPangoContext                   ,


-- ** getParent #method:getParent#

#if defined(ENABLE_OVERLOADING)
    WidgetGetParentMethodInfo               ,
#endif
    widgetGetParent                         ,


-- ** getPath #method:getPath#

#if defined(ENABLE_OVERLOADING)
    WidgetGetPathMethodInfo                 ,
#endif
    widgetGetPath                           ,


-- ** getPreferredSize #method:getPreferredSize#

#if defined(ENABLE_OVERLOADING)
    WidgetGetPreferredSizeMethodInfo        ,
#endif
    widgetGetPreferredSize                  ,


-- ** getPrevSibling #method:getPrevSibling#

#if defined(ENABLE_OVERLOADING)
    WidgetGetPrevSiblingMethodInfo          ,
#endif
    widgetGetPrevSibling                    ,


-- ** getPrimaryClipboard #method:getPrimaryClipboard#

#if defined(ENABLE_OVERLOADING)
    WidgetGetPrimaryClipboardMethodInfo     ,
#endif
    widgetGetPrimaryClipboard               ,


-- ** getRealized #method:getRealized#

#if defined(ENABLE_OVERLOADING)
    WidgetGetRealizedMethodInfo             ,
#endif
    widgetGetRealized                       ,


-- ** getReceivesDefault #method:getReceivesDefault#

#if defined(ENABLE_OVERLOADING)
    WidgetGetReceivesDefaultMethodInfo      ,
#endif
    widgetGetReceivesDefault                ,


-- ** getRequestMode #method:getRequestMode#

#if defined(ENABLE_OVERLOADING)
    WidgetGetRequestModeMethodInfo          ,
#endif
    widgetGetRequestMode                    ,


-- ** getRoot #method:getRoot#

#if defined(ENABLE_OVERLOADING)
    WidgetGetRootMethodInfo                 ,
#endif
    widgetGetRoot                           ,


-- ** getScaleFactor #method:getScaleFactor#

#if defined(ENABLE_OVERLOADING)
    WidgetGetScaleFactorMethodInfo          ,
#endif
    widgetGetScaleFactor                    ,


-- ** getSensitive #method:getSensitive#

#if defined(ENABLE_OVERLOADING)
    WidgetGetSensitiveMethodInfo            ,
#endif
    widgetGetSensitive                      ,


-- ** getSettings #method:getSettings#

#if defined(ENABLE_OVERLOADING)
    WidgetGetSettingsMethodInfo             ,
#endif
    widgetGetSettings                       ,


-- ** getSizeRequest #method:getSizeRequest#

#if defined(ENABLE_OVERLOADING)
    WidgetGetSizeRequestMethodInfo          ,
#endif
    widgetGetSizeRequest                    ,


-- ** getStateFlags #method:getStateFlags#

#if defined(ENABLE_OVERLOADING)
    WidgetGetStateFlagsMethodInfo           ,
#endif
    widgetGetStateFlags                     ,


-- ** getStyleContext #method:getStyleContext#

#if defined(ENABLE_OVERLOADING)
    WidgetGetStyleContextMethodInfo         ,
#endif
    widgetGetStyleContext                   ,


-- ** getSupportMultidevice #method:getSupportMultidevice#

#if defined(ENABLE_OVERLOADING)
    WidgetGetSupportMultideviceMethodInfo   ,
#endif
    widgetGetSupportMultidevice             ,


-- ** getSurface #method:getSurface#

#if defined(ENABLE_OVERLOADING)
    WidgetGetSurfaceMethodInfo              ,
#endif
    widgetGetSurface                        ,


-- ** getTemplateChild #method:getTemplateChild#

#if defined(ENABLE_OVERLOADING)
    WidgetGetTemplateChildMethodInfo        ,
#endif
    widgetGetTemplateChild                  ,


-- ** getTooltipMarkup #method:getTooltipMarkup#

#if defined(ENABLE_OVERLOADING)
    WidgetGetTooltipMarkupMethodInfo        ,
#endif
    widgetGetTooltipMarkup                  ,


-- ** getTooltipText #method:getTooltipText#

#if defined(ENABLE_OVERLOADING)
    WidgetGetTooltipTextMethodInfo          ,
#endif
    widgetGetTooltipText                    ,


-- ** getTooltipWindow #method:getTooltipWindow#

#if defined(ENABLE_OVERLOADING)
    WidgetGetTooltipWindowMethodInfo        ,
#endif
    widgetGetTooltipWindow                  ,


-- ** getToplevel #method:getToplevel#

#if defined(ENABLE_OVERLOADING)
    WidgetGetToplevelMethodInfo             ,
#endif
    widgetGetToplevel                       ,


-- ** getValign #method:getValign#

#if defined(ENABLE_OVERLOADING)
    WidgetGetValignMethodInfo               ,
#endif
    widgetGetValign                         ,


-- ** getVexpand #method:getVexpand#

#if defined(ENABLE_OVERLOADING)
    WidgetGetVexpandMethodInfo              ,
#endif
    widgetGetVexpand                        ,


-- ** getVexpandSet #method:getVexpandSet#

#if defined(ENABLE_OVERLOADING)
    WidgetGetVexpandSetMethodInfo           ,
#endif
    widgetGetVexpandSet                     ,


-- ** getVisible #method:getVisible#

#if defined(ENABLE_OVERLOADING)
    WidgetGetVisibleMethodInfo              ,
#endif
    widgetGetVisible                        ,


-- ** getWidth #method:getWidth#

#if defined(ENABLE_OVERLOADING)
    WidgetGetWidthMethodInfo                ,
#endif
    widgetGetWidth                          ,


-- ** grabAdd #method:grabAdd#

#if defined(ENABLE_OVERLOADING)
    WidgetGrabAddMethodInfo                 ,
#endif
    widgetGrabAdd                           ,


-- ** grabFocus #method:grabFocus#

#if defined(ENABLE_OVERLOADING)
    WidgetGrabFocusMethodInfo               ,
#endif
    widgetGrabFocus                         ,


-- ** grabRemove #method:grabRemove#

#if defined(ENABLE_OVERLOADING)
    WidgetGrabRemoveMethodInfo              ,
#endif
    widgetGrabRemove                        ,


-- ** hasDefault #method:hasDefault#

#if defined(ENABLE_OVERLOADING)
    WidgetHasDefaultMethodInfo              ,
#endif
    widgetHasDefault                        ,


-- ** hasFocus #method:hasFocus#

#if defined(ENABLE_OVERLOADING)
    WidgetHasFocusMethodInfo                ,
#endif
    widgetHasFocus                          ,


-- ** hasGrab #method:hasGrab#

#if defined(ENABLE_OVERLOADING)
    WidgetHasGrabMethodInfo                 ,
#endif
    widgetHasGrab                           ,


-- ** hasVisibleFocus #method:hasVisibleFocus#

#if defined(ENABLE_OVERLOADING)
    WidgetHasVisibleFocusMethodInfo         ,
#endif
    widgetHasVisibleFocus                   ,


-- ** hide #method:hide#

#if defined(ENABLE_OVERLOADING)
    WidgetHideMethodInfo                    ,
#endif
    widgetHide                              ,


-- ** inDestruction #method:inDestruction#

#if defined(ENABLE_OVERLOADING)
    WidgetInDestructionMethodInfo           ,
#endif
    widgetInDestruction                     ,


-- ** initTemplate #method:initTemplate#

#if defined(ENABLE_OVERLOADING)
    WidgetInitTemplateMethodInfo            ,
#endif
    widgetInitTemplate                      ,


-- ** inputShapeCombineRegion #method:inputShapeCombineRegion#

#if defined(ENABLE_OVERLOADING)
    WidgetInputShapeCombineRegionMethodInfo ,
#endif
    widgetInputShapeCombineRegion           ,


-- ** insertActionGroup #method:insertActionGroup#

#if defined(ENABLE_OVERLOADING)
    WidgetInsertActionGroupMethodInfo       ,
#endif
    widgetInsertActionGroup                 ,


-- ** insertAfter #method:insertAfter#

#if defined(ENABLE_OVERLOADING)
    WidgetInsertAfterMethodInfo             ,
#endif
    widgetInsertAfter                       ,


-- ** insertBefore #method:insertBefore#

#if defined(ENABLE_OVERLOADING)
    WidgetInsertBeforeMethodInfo            ,
#endif
    widgetInsertBefore                      ,


-- ** isAncestor #method:isAncestor#

#if defined(ENABLE_OVERLOADING)
    WidgetIsAncestorMethodInfo              ,
#endif
    widgetIsAncestor                        ,


-- ** isDrawable #method:isDrawable#

#if defined(ENABLE_OVERLOADING)
    WidgetIsDrawableMethodInfo              ,
#endif
    widgetIsDrawable                        ,


-- ** isFocus #method:isFocus#

#if defined(ENABLE_OVERLOADING)
    WidgetIsFocusMethodInfo                 ,
#endif
    widgetIsFocus                           ,


-- ** isSensitive #method:isSensitive#

#if defined(ENABLE_OVERLOADING)
    WidgetIsSensitiveMethodInfo             ,
#endif
    widgetIsSensitive                       ,


-- ** isToplevel #method:isToplevel#

#if defined(ENABLE_OVERLOADING)
    WidgetIsToplevelMethodInfo              ,
#endif
    widgetIsToplevel                        ,


-- ** isVisible #method:isVisible#

#if defined(ENABLE_OVERLOADING)
    WidgetIsVisibleMethodInfo               ,
#endif
    widgetIsVisible                         ,


-- ** keynavFailed #method:keynavFailed#

#if defined(ENABLE_OVERLOADING)
    WidgetKeynavFailedMethodInfo            ,
#endif
    widgetKeynavFailed                      ,


-- ** listAccelClosures #method:listAccelClosures#

#if defined(ENABLE_OVERLOADING)
    WidgetListAccelClosuresMethodInfo       ,
#endif
    widgetListAccelClosures                 ,


-- ** listActionPrefixes #method:listActionPrefixes#

#if defined(ENABLE_OVERLOADING)
    WidgetListActionPrefixesMethodInfo      ,
#endif
    widgetListActionPrefixes                ,


-- ** listMnemonicLabels #method:listMnemonicLabels#

#if defined(ENABLE_OVERLOADING)
    WidgetListMnemonicLabelsMethodInfo      ,
#endif
    widgetListMnemonicLabels                ,


-- ** map #method:map#

#if defined(ENABLE_OVERLOADING)
    WidgetMapMethodInfo                     ,
#endif
    widgetMap                               ,


-- ** measure #method:measure#

#if defined(ENABLE_OVERLOADING)
    WidgetMeasureMethodInfo                 ,
#endif
    widgetMeasure                           ,


-- ** mnemonicActivate #method:mnemonicActivate#

#if defined(ENABLE_OVERLOADING)
    WidgetMnemonicActivateMethodInfo        ,
#endif
    widgetMnemonicActivate                  ,


-- ** observeChildren #method:observeChildren#

#if defined(ENABLE_OVERLOADING)
    WidgetObserveChildrenMethodInfo         ,
#endif
    widgetObserveChildren                   ,


-- ** observeControllers #method:observeControllers#

#if defined(ENABLE_OVERLOADING)
    WidgetObserveControllersMethodInfo      ,
#endif
    widgetObserveControllers                ,


-- ** pick #method:pick#

#if defined(ENABLE_OVERLOADING)
    WidgetPickMethodInfo                    ,
#endif
    widgetPick                              ,


-- ** queueAllocate #method:queueAllocate#

#if defined(ENABLE_OVERLOADING)
    WidgetQueueAllocateMethodInfo           ,
#endif
    widgetQueueAllocate                     ,


-- ** queueComputeExpand #method:queueComputeExpand#

#if defined(ENABLE_OVERLOADING)
    WidgetQueueComputeExpandMethodInfo      ,
#endif
    widgetQueueComputeExpand                ,


-- ** queueDraw #method:queueDraw#

#if defined(ENABLE_OVERLOADING)
    WidgetQueueDrawMethodInfo               ,
#endif
    widgetQueueDraw                         ,


-- ** queueResize #method:queueResize#

#if defined(ENABLE_OVERLOADING)
    WidgetQueueResizeMethodInfo             ,
#endif
    widgetQueueResize                       ,


-- ** queueResizeNoRedraw #method:queueResizeNoRedraw#

#if defined(ENABLE_OVERLOADING)
    WidgetQueueResizeNoRedrawMethodInfo     ,
#endif
    widgetQueueResizeNoRedraw               ,


-- ** realize #method:realize#

#if defined(ENABLE_OVERLOADING)
    WidgetRealizeMethodInfo                 ,
#endif
    widgetRealize                           ,


-- ** registerSurface #method:registerSurface#

#if defined(ENABLE_OVERLOADING)
    WidgetRegisterSurfaceMethodInfo         ,
#endif
    widgetRegisterSurface                   ,


-- ** removeAccelerator #method:removeAccelerator#

#if defined(ENABLE_OVERLOADING)
    WidgetRemoveAcceleratorMethodInfo       ,
#endif
    widgetRemoveAccelerator                 ,


-- ** removeController #method:removeController#

#if defined(ENABLE_OVERLOADING)
    WidgetRemoveControllerMethodInfo        ,
#endif
    widgetRemoveController                  ,


-- ** removeMnemonicLabel #method:removeMnemonicLabel#

#if defined(ENABLE_OVERLOADING)
    WidgetRemoveMnemonicLabelMethodInfo     ,
#endif
    widgetRemoveMnemonicLabel               ,


-- ** removeTickCallback #method:removeTickCallback#

#if defined(ENABLE_OVERLOADING)
    WidgetRemoveTickCallbackMethodInfo      ,
#endif
    widgetRemoveTickCallback                ,


-- ** resetStyle #method:resetStyle#

#if defined(ENABLE_OVERLOADING)
    WidgetResetStyleMethodInfo              ,
#endif
    widgetResetStyle                        ,


-- ** setAccelPath #method:setAccelPath#

#if defined(ENABLE_OVERLOADING)
    WidgetSetAccelPathMethodInfo            ,
#endif
    widgetSetAccelPath                      ,


-- ** setCanFocus #method:setCanFocus#

#if defined(ENABLE_OVERLOADING)
    WidgetSetCanFocusMethodInfo             ,
#endif
    widgetSetCanFocus                       ,


-- ** setCanTarget #method:setCanTarget#

#if defined(ENABLE_OVERLOADING)
    WidgetSetCanTargetMethodInfo            ,
#endif
    widgetSetCanTarget                      ,


-- ** setChildVisible #method:setChildVisible#

#if defined(ENABLE_OVERLOADING)
    WidgetSetChildVisibleMethodInfo         ,
#endif
    widgetSetChildVisible                   ,


-- ** setCursor #method:setCursor#

#if defined(ENABLE_OVERLOADING)
    WidgetSetCursorMethodInfo               ,
#endif
    widgetSetCursor                         ,


-- ** setCursorFromName #method:setCursorFromName#

#if defined(ENABLE_OVERLOADING)
    WidgetSetCursorFromNameMethodInfo       ,
#endif
    widgetSetCursorFromName                 ,


-- ** setDefaultDirection #method:setDefaultDirection#

    widgetSetDefaultDirection               ,


-- ** setDirection #method:setDirection#

#if defined(ENABLE_OVERLOADING)
    WidgetSetDirectionMethodInfo            ,
#endif
    widgetSetDirection                      ,


-- ** setFocusChild #method:setFocusChild#

#if defined(ENABLE_OVERLOADING)
    WidgetSetFocusChildMethodInfo           ,
#endif
    widgetSetFocusChild                     ,


-- ** setFocusOnClick #method:setFocusOnClick#

#if defined(ENABLE_OVERLOADING)
    WidgetSetFocusOnClickMethodInfo         ,
#endif
    widgetSetFocusOnClick                   ,


-- ** setFontMap #method:setFontMap#

#if defined(ENABLE_OVERLOADING)
    WidgetSetFontMapMethodInfo              ,
#endif
    widgetSetFontMap                        ,


-- ** setFontOptions #method:setFontOptions#

#if defined(ENABLE_OVERLOADING)
    WidgetSetFontOptionsMethodInfo          ,
#endif
    widgetSetFontOptions                    ,


-- ** setHalign #method:setHalign#

#if defined(ENABLE_OVERLOADING)
    WidgetSetHalignMethodInfo               ,
#endif
    widgetSetHalign                         ,


-- ** setHasSurface #method:setHasSurface#

#if defined(ENABLE_OVERLOADING)
    WidgetSetHasSurfaceMethodInfo           ,
#endif
    widgetSetHasSurface                     ,


-- ** setHasTooltip #method:setHasTooltip#

#if defined(ENABLE_OVERLOADING)
    WidgetSetHasTooltipMethodInfo           ,
#endif
    widgetSetHasTooltip                     ,


-- ** setHexpand #method:setHexpand#

#if defined(ENABLE_OVERLOADING)
    WidgetSetHexpandMethodInfo              ,
#endif
    widgetSetHexpand                        ,


-- ** setHexpandSet #method:setHexpandSet#

#if defined(ENABLE_OVERLOADING)
    WidgetSetHexpandSetMethodInfo           ,
#endif
    widgetSetHexpandSet                     ,


-- ** setLayoutManager #method:setLayoutManager#

#if defined(ENABLE_OVERLOADING)
    WidgetSetLayoutManagerMethodInfo        ,
#endif
    widgetSetLayoutManager                  ,


-- ** setMarginBottom #method:setMarginBottom#

#if defined(ENABLE_OVERLOADING)
    WidgetSetMarginBottomMethodInfo         ,
#endif
    widgetSetMarginBottom                   ,


-- ** setMarginEnd #method:setMarginEnd#

#if defined(ENABLE_OVERLOADING)
    WidgetSetMarginEndMethodInfo            ,
#endif
    widgetSetMarginEnd                      ,


-- ** setMarginStart #method:setMarginStart#

#if defined(ENABLE_OVERLOADING)
    WidgetSetMarginStartMethodInfo          ,
#endif
    widgetSetMarginStart                    ,


-- ** setMarginTop #method:setMarginTop#

#if defined(ENABLE_OVERLOADING)
    WidgetSetMarginTopMethodInfo            ,
#endif
    widgetSetMarginTop                      ,


-- ** setName #method:setName#

#if defined(ENABLE_OVERLOADING)
    WidgetSetNameMethodInfo                 ,
#endif
    widgetSetName                           ,


-- ** setOpacity #method:setOpacity#

#if defined(ENABLE_OVERLOADING)
    WidgetSetOpacityMethodInfo              ,
#endif
    widgetSetOpacity                        ,


-- ** setOverflow #method:setOverflow#

#if defined(ENABLE_OVERLOADING)
    WidgetSetOverflowMethodInfo             ,
#endif
    widgetSetOverflow                       ,


-- ** setParent #method:setParent#

#if defined(ENABLE_OVERLOADING)
    WidgetSetParentMethodInfo               ,
#endif
    widgetSetParent                         ,


-- ** setReceivesDefault #method:setReceivesDefault#

#if defined(ENABLE_OVERLOADING)
    WidgetSetReceivesDefaultMethodInfo      ,
#endif
    widgetSetReceivesDefault                ,


-- ** setSensitive #method:setSensitive#

#if defined(ENABLE_OVERLOADING)
    WidgetSetSensitiveMethodInfo            ,
#endif
    widgetSetSensitive                      ,


-- ** setSizeRequest #method:setSizeRequest#

#if defined(ENABLE_OVERLOADING)
    WidgetSetSizeRequestMethodInfo          ,
#endif
    widgetSetSizeRequest                    ,


-- ** setStateFlags #method:setStateFlags#

#if defined(ENABLE_OVERLOADING)
    WidgetSetStateFlagsMethodInfo           ,
#endif
    widgetSetStateFlags                     ,


-- ** setSupportMultidevice #method:setSupportMultidevice#

#if defined(ENABLE_OVERLOADING)
    WidgetSetSupportMultideviceMethodInfo   ,
#endif
    widgetSetSupportMultidevice             ,


-- ** setSurface #method:setSurface#

#if defined(ENABLE_OVERLOADING)
    WidgetSetSurfaceMethodInfo              ,
#endif
    widgetSetSurface                        ,


-- ** setTooltipMarkup #method:setTooltipMarkup#

#if defined(ENABLE_OVERLOADING)
    WidgetSetTooltipMarkupMethodInfo        ,
#endif
    widgetSetTooltipMarkup                  ,


-- ** setTooltipText #method:setTooltipText#

#if defined(ENABLE_OVERLOADING)
    WidgetSetTooltipTextMethodInfo          ,
#endif
    widgetSetTooltipText                    ,


-- ** setTooltipWindow #method:setTooltipWindow#

#if defined(ENABLE_OVERLOADING)
    WidgetSetTooltipWindowMethodInfo        ,
#endif
    widgetSetTooltipWindow                  ,


-- ** setValign #method:setValign#

#if defined(ENABLE_OVERLOADING)
    WidgetSetValignMethodInfo               ,
#endif
    widgetSetValign                         ,


-- ** setVexpand #method:setVexpand#

#if defined(ENABLE_OVERLOADING)
    WidgetSetVexpandMethodInfo              ,
#endif
    widgetSetVexpand                        ,


-- ** setVexpandSet #method:setVexpandSet#

#if defined(ENABLE_OVERLOADING)
    WidgetSetVexpandSetMethodInfo           ,
#endif
    widgetSetVexpandSet                     ,


-- ** setVisible #method:setVisible#

#if defined(ENABLE_OVERLOADING)
    WidgetSetVisibleMethodInfo              ,
#endif
    widgetSetVisible                        ,


-- ** show #method:show#

#if defined(ENABLE_OVERLOADING)
    WidgetShowMethodInfo                    ,
#endif
    widgetShow                              ,


-- ** sizeAllocate #method:sizeAllocate#

#if defined(ENABLE_OVERLOADING)
    WidgetSizeAllocateMethodInfo            ,
#endif
    widgetSizeAllocate                      ,


-- ** snapshotChild #method:snapshotChild#

#if defined(ENABLE_OVERLOADING)
    WidgetSnapshotChildMethodInfo           ,
#endif
    widgetSnapshotChild                     ,


-- ** translateCoordinates #method:translateCoordinates#

#if defined(ENABLE_OVERLOADING)
    WidgetTranslateCoordinatesMethodInfo    ,
#endif
    widgetTranslateCoordinates              ,


-- ** triggerTooltipQuery #method:triggerTooltipQuery#

#if defined(ENABLE_OVERLOADING)
    WidgetTriggerTooltipQueryMethodInfo     ,
#endif
    widgetTriggerTooltipQuery               ,


-- ** unmap #method:unmap#

#if defined(ENABLE_OVERLOADING)
    WidgetUnmapMethodInfo                   ,
#endif
    widgetUnmap                             ,


-- ** unparent #method:unparent#

#if defined(ENABLE_OVERLOADING)
    WidgetUnparentMethodInfo                ,
#endif
    widgetUnparent                          ,


-- ** unrealize #method:unrealize#

#if defined(ENABLE_OVERLOADING)
    WidgetUnrealizeMethodInfo               ,
#endif
    widgetUnrealize                         ,


-- ** unregisterSurface #method:unregisterSurface#

#if defined(ENABLE_OVERLOADING)
    WidgetUnregisterSurfaceMethodInfo       ,
#endif
    widgetUnregisterSurface                 ,


-- ** unsetStateFlags #method:unsetStateFlags#

#if defined(ENABLE_OVERLOADING)
    WidgetUnsetStateFlagsMethodInfo         ,
#endif
    widgetUnsetStateFlags                   ,




 -- * Properties
-- ** canFocus #attr:canFocus#
-- | /No description available in the introspection data./

#if defined(ENABLE_OVERLOADING)
    WidgetCanFocusPropertyInfo              ,
#endif
    constructWidgetCanFocus                 ,
    getWidgetCanFocus                       ,
    setWidgetCanFocus                       ,
#if defined(ENABLE_OVERLOADING)
    widgetCanFocus                          ,
#endif


-- ** canTarget #attr:canTarget#
-- | /No description available in the introspection data./

#if defined(ENABLE_OVERLOADING)
    WidgetCanTargetPropertyInfo             ,
#endif
    constructWidgetCanTarget                ,
    getWidgetCanTarget                      ,
    setWidgetCanTarget                      ,
#if defined(ENABLE_OVERLOADING)
    widgetCanTarget                         ,
#endif


-- ** cssName #attr:cssName#
-- | The name of this widget in the CSS tree.

#if defined(ENABLE_OVERLOADING)
    WidgetCssNamePropertyInfo               ,
#endif
    constructWidgetCssName                  ,
    getWidgetCssName                        ,
#if defined(ENABLE_OVERLOADING)
    widgetCssName                           ,
#endif


-- ** cursor #attr:cursor#
-- | The cursor used by /@widget@/. See 'GI.Gtk.Objects.Widget.widgetSetCursor' for details.

#if defined(ENABLE_OVERLOADING)
    WidgetCursorPropertyInfo                ,
#endif
    clearWidgetCursor                       ,
    constructWidgetCursor                   ,
    getWidgetCursor                         ,
    setWidgetCursor                         ,
#if defined(ENABLE_OVERLOADING)
    widgetCursor                            ,
#endif


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

#if defined(ENABLE_OVERLOADING)
    WidgetExpandPropertyInfo                ,
#endif
    constructWidgetExpand                   ,
    getWidgetExpand                         ,
    setWidgetExpand                         ,
#if defined(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.

#if defined(ENABLE_OVERLOADING)
    WidgetFocusOnClickPropertyInfo          ,
#endif
    constructWidgetFocusOnClick             ,
    getWidgetFocusOnClick                   ,
    setWidgetFocusOnClick                   ,
#if defined(ENABLE_OVERLOADING)
    widgetFocusOnClick                      ,
#endif


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

#if defined(ENABLE_OVERLOADING)
    WidgetHalignPropertyInfo                ,
#endif
    constructWidgetHalign                   ,
    getWidgetHalign                         ,
    setWidgetHalign                         ,
#if defined(ENABLE_OVERLOADING)
    widgetHalign                            ,
#endif


-- ** hasDefault #attr:hasDefault#
-- | /No description available in the introspection data./

#if defined(ENABLE_OVERLOADING)
    WidgetHasDefaultPropertyInfo            ,
#endif
    getWidgetHasDefault                     ,


-- ** hasFocus #attr:hasFocus#
-- | /No description available in the introspection data./

#if defined(ENABLE_OVERLOADING)
    WidgetHasFocusPropertyInfo              ,
#endif
    constructWidgetHasFocus                 ,
    getWidgetHasFocus                       ,
    setWidgetHasFocus                       ,


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

#if defined(ENABLE_OVERLOADING)
    WidgetHasTooltipPropertyInfo            ,
#endif
    constructWidgetHasTooltip               ,
    getWidgetHasTooltip                     ,
    setWidgetHasTooltip                     ,
#if defined(ENABLE_OVERLOADING)
    widgetHasTooltip                        ,
#endif


-- ** heightRequest #attr:heightRequest#
-- | /No description available in the introspection data./

#if defined(ENABLE_OVERLOADING)
    WidgetHeightRequestPropertyInfo         ,
#endif
    constructWidgetHeightRequest            ,
    getWidgetHeightRequest                  ,
    setWidgetHeightRequest                  ,
#if defined(ENABLE_OVERLOADING)
    widgetHeightRequest                     ,
#endif


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

#if defined(ENABLE_OVERLOADING)
    WidgetHexpandPropertyInfo               ,
#endif
    constructWidgetHexpand                  ,
    getWidgetHexpand                        ,
    setWidgetHexpand                        ,
#if defined(ENABLE_OVERLOADING)
    widgetHexpand                           ,
#endif


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

#if defined(ENABLE_OVERLOADING)
    WidgetHexpandSetPropertyInfo            ,
#endif
    constructWidgetHexpandSet               ,
    getWidgetHexpandSet                     ,
    setWidgetHexpandSet                     ,
#if defined(ENABLE_OVERLOADING)
    widgetHexpandSet                        ,
#endif


-- ** isFocus #attr:isFocus#
-- | /No description available in the introspection data./

#if defined(ENABLE_OVERLOADING)
    WidgetIsFocusPropertyInfo               ,
#endif
    constructWidgetIsFocus                  ,
    getWidgetIsFocus                        ,
    setWidgetIsFocus                        ,


-- ** layoutManager #attr:layoutManager#
-- | The t'GI.Gtk.Objects.LayoutManager.LayoutManager' instance to use to compute the preferred size
-- of the widget, and allocate its children.

#if defined(ENABLE_OVERLOADING)
    WidgetLayoutManagerPropertyInfo         ,
#endif
    clearWidgetLayoutManager                ,
    constructWidgetLayoutManager            ,
    getWidgetLayoutManager                  ,
    setWidgetLayoutManager                  ,
#if defined(ENABLE_OVERLOADING)
    widgetLayoutManager                     ,
#endif


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

#if defined(ENABLE_OVERLOADING)
    WidgetMarginPropertyInfo                ,
#endif
    constructWidgetMargin                   ,
    getWidgetMargin                         ,
    setWidgetMargin                         ,
#if defined(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.

#if defined(ENABLE_OVERLOADING)
    WidgetMarginBottomPropertyInfo          ,
#endif
    constructWidgetMarginBottom             ,
    getWidgetMarginBottom                   ,
    setWidgetMarginBottom                   ,
#if defined(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.

#if defined(ENABLE_OVERLOADING)
    WidgetMarginEndPropertyInfo             ,
#endif
    constructWidgetMarginEnd                ,
    getWidgetMarginEnd                      ,
    setWidgetMarginEnd                      ,
#if defined(ENABLE_OVERLOADING)
    widgetMarginEnd                         ,
#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.

#if defined(ENABLE_OVERLOADING)
    WidgetMarginStartPropertyInfo           ,
#endif
    constructWidgetMarginStart              ,
    getWidgetMarginStart                    ,
    setWidgetMarginStart                    ,
#if defined(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.

#if defined(ENABLE_OVERLOADING)
    WidgetMarginTopPropertyInfo             ,
#endif
    constructWidgetMarginTop                ,
    getWidgetMarginTop                      ,
    setWidgetMarginTop                      ,
#if defined(ENABLE_OVERLOADING)
    widgetMarginTop                         ,
#endif


-- ** name #attr:name#
-- | /No description available in the introspection data./

#if defined(ENABLE_OVERLOADING)
    WidgetNamePropertyInfo                  ,
#endif
    constructWidgetName                     ,
    getWidgetName                           ,
    setWidgetName                           ,
#if defined(ENABLE_OVERLOADING)
    widgetName                              ,
#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

#if defined(ENABLE_OVERLOADING)
    WidgetOpacityPropertyInfo               ,
#endif
    constructWidgetOpacity                  ,
    getWidgetOpacity                        ,
    setWidgetOpacity                        ,
#if defined(ENABLE_OVERLOADING)
    widgetOpacity                           ,
#endif


-- ** overflow #attr:overflow#
-- | How content outside the widget\'s content area is treated.

#if defined(ENABLE_OVERLOADING)
    WidgetOverflowPropertyInfo              ,
#endif
    constructWidgetOverflow                 ,
    getWidgetOverflow                       ,
    setWidgetOverflow                       ,
#if defined(ENABLE_OVERLOADING)
    widgetOverflow                          ,
#endif


-- ** parent #attr:parent#
-- | /No description available in the introspection data./

#if defined(ENABLE_OVERLOADING)
    WidgetParentPropertyInfo                ,
#endif
    getWidgetParent                         ,
#if defined(ENABLE_OVERLOADING)
    widgetParent                            ,
#endif


-- ** receivesDefault #attr:receivesDefault#
-- | /No description available in the introspection data./

#if defined(ENABLE_OVERLOADING)
    WidgetReceivesDefaultPropertyInfo       ,
#endif
    constructWidgetReceivesDefault          ,
    getWidgetReceivesDefault                ,
    setWidgetReceivesDefault                ,
#if defined(ENABLE_OVERLOADING)
    widgetReceivesDefault                   ,
#endif


-- ** root #attr:root#
-- | The t'GI.Gtk.Interfaces.Root.Root' widget of the widget tree containing this widget or 'P.Nothing' if
-- the widget is not contained in a root widget.

#if defined(ENABLE_OVERLOADING)
    WidgetRootPropertyInfo                  ,
#endif
    getWidgetRoot                           ,
#if defined(ENABLE_OVERLOADING)
    widgetRoot                              ,
#endif


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

#if defined(ENABLE_OVERLOADING)
    WidgetScaleFactorPropertyInfo           ,
#endif
    getWidgetScaleFactor                    ,
#if defined(ENABLE_OVERLOADING)
    widgetScaleFactor                       ,
#endif


-- ** sensitive #attr:sensitive#
-- | /No description available in the introspection data./

#if defined(ENABLE_OVERLOADING)
    WidgetSensitivePropertyInfo             ,
#endif
    constructWidgetSensitive                ,
    getWidgetSensitive                      ,
    setWidgetSensitive                      ,
#if defined(ENABLE_OVERLOADING)
    widgetSensitive                         ,
#endif


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

#if defined(ENABLE_OVERLOADING)
    WidgetSurfacePropertyInfo               ,
#endif
    getWidgetSurface                        ,
#if defined(ENABLE_OVERLOADING)
    widgetSurface                           ,
#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 'P.Nothing': t'GI.Gtk.Objects.Widget.Widget':@/has-tooltip/@
-- will automatically be set to 'P.True' and there will be taken care of
-- [queryTooltip]("GI.Gtk.Objects.Widget#signal:queryTooltip") in the default signal handler.
-- 
-- Note that if both t'GI.Gtk.Objects.Widget.Widget':@/tooltip-text/@ and t'GI.Gtk.Objects.Widget.Widget':@/tooltip-markup/@
-- are set, the last one wins.

#if defined(ENABLE_OVERLOADING)
    WidgetTooltipMarkupPropertyInfo         ,
#endif
    clearWidgetTooltipMarkup                ,
    constructWidgetTooltipMarkup            ,
    getWidgetTooltipMarkup                  ,
    setWidgetTooltipMarkup                  ,
#if defined(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 'P.Nothing': t'GI.Gtk.Objects.Widget.Widget':@/has-tooltip/@
-- will automatically be set to 'P.True' and there will be taken care of
-- [queryTooltip]("GI.Gtk.Objects.Widget#signal:queryTooltip") in the default signal handler.
-- 
-- Note that if both t'GI.Gtk.Objects.Widget.Widget':@/tooltip-text/@ and t'GI.Gtk.Objects.Widget.Widget':@/tooltip-markup/@
-- are set, the last one wins.

#if defined(ENABLE_OVERLOADING)
    WidgetTooltipTextPropertyInfo           ,
#endif
    clearWidgetTooltipText                  ,
    constructWidgetTooltipText              ,
    getWidgetTooltipText                    ,
    setWidgetTooltipText                    ,
#if defined(ENABLE_OVERLOADING)
    widgetTooltipText                       ,
#endif


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

#if defined(ENABLE_OVERLOADING)
    WidgetValignPropertyInfo                ,
#endif
    constructWidgetValign                   ,
    getWidgetValign                         ,
    setWidgetValign                         ,
#if defined(ENABLE_OVERLOADING)
    widgetValign                            ,
#endif


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

#if defined(ENABLE_OVERLOADING)
    WidgetVexpandPropertyInfo               ,
#endif
    constructWidgetVexpand                  ,
    getWidgetVexpand                        ,
    setWidgetVexpand                        ,
#if defined(ENABLE_OVERLOADING)
    widgetVexpand                           ,
#endif


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

#if defined(ENABLE_OVERLOADING)
    WidgetVexpandSetPropertyInfo            ,
#endif
    constructWidgetVexpandSet               ,
    getWidgetVexpandSet                     ,
    setWidgetVexpandSet                     ,
#if defined(ENABLE_OVERLOADING)
    widgetVexpandSet                        ,
#endif


-- ** visible #attr:visible#
-- | /No description available in the introspection data./

#if defined(ENABLE_OVERLOADING)
    WidgetVisiblePropertyInfo               ,
#endif
    constructWidgetVisible                  ,
    getWidgetVisible                        ,
    setWidgetVisible                        ,
#if defined(ENABLE_OVERLOADING)
    widgetVisible                           ,
#endif


-- ** widthRequest #attr:widthRequest#
-- | /No description available in the introspection data./

#if defined(ENABLE_OVERLOADING)
    WidgetWidthRequestPropertyInfo          ,
#endif
    constructWidgetWidthRequest             ,
    getWidgetWidthRequest                   ,
    setWidgetWidthRequest                   ,
#if defined(ENABLE_OVERLOADING)
    widgetWidthRequest                      ,
#endif




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

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


-- ** canActivateAccel #signal:canActivateAccel#

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


-- ** destroy #signal:destroy#

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


-- ** directionChanged #signal:directionChanged#

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


-- ** dragBegin #signal:dragBegin#

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


-- ** dragDataDelete #signal:dragDataDelete#

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


-- ** dragDataGet #signal:dragDataGet#

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


-- ** dragDataReceived #signal:dragDataReceived#

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


-- ** dragDrop #signal:dragDrop#

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


-- ** dragEnd #signal:dragEnd#

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


-- ** dragFailed #signal:dragFailed#

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


-- ** dragLeave #signal:dragLeave#

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


-- ** dragMotion #signal:dragMotion#

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


-- ** grabNotify #signal:grabNotify#

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


-- ** hide #signal:hide#

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


-- ** keynavFailed #signal:keynavFailed#

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


-- ** map #signal:map#

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


-- ** mnemonicActivate #signal:mnemonicActivate#

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


-- ** moveFocus #signal:moveFocus#

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


-- ** popupMenu #signal:popupMenu#

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


-- ** queryTooltip #signal:queryTooltip#

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


-- ** realize #signal:realize#

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


-- ** show #signal:show#

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


-- ** sizeAllocate #signal:sizeAllocate#

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


-- ** stateFlagsChanged #signal:stateFlagsChanged#

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


-- ** styleUpdated #signal:styleUpdated#

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


-- ** unmap #signal:unmap#

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


-- ** unrealize #signal:unrealize#

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




    ) 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.GClosure as B.GClosure
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.GI.Base.Properties as B.Properties
import qualified Data.GI.Base.Signals as B.Signals
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 GHC.OverloadedLabels as OL

import qualified GI.Atk.Interfaces.ImplementorIface as Atk.ImplementorIface
import qualified GI.Atk.Objects.Object as Atk.Object
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.Interfaces.Paintable as Gdk.Paintable
import qualified GI.Gdk.Objects.Clipboard as Gdk.Clipboard
import qualified GI.Gdk.Objects.Cursor as Gdk.Cursor
import qualified GI.Gdk.Objects.Device as Gdk.Device
import qualified GI.Gdk.Objects.Display as Gdk.Display
import qualified GI.Gdk.Objects.Drag as Gdk.Drag
import qualified GI.Gdk.Objects.Drop as Gdk.Drop
import qualified GI.Gdk.Objects.Event as Gdk.Event
import qualified GI.Gdk.Objects.FrameClock as Gdk.FrameClock
import qualified GI.Gdk.Objects.Surface as Gdk.Surface
import qualified GI.Gdk.Structs.ContentFormats as Gdk.ContentFormats
import qualified GI.Gdk.Structs.Rectangle as Gdk.Rectangle
import qualified GI.Gio.Interfaces.ActionGroup as Gio.ActionGroup
import qualified GI.Gio.Interfaces.Icon as Gio.Icon
import qualified GI.Gio.Interfaces.ListModel as Gio.ListModel
import qualified GI.Graphene.Structs.Matrix as Graphene.Matrix
import qualified GI.Graphene.Structs.Point as Graphene.Point
import qualified GI.Graphene.Structs.Rect as Graphene.Rect
import qualified GI.Gsk.Structs.Transform as Gsk.Transform
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.Interfaces.Root as Gtk.Root
import {-# SOURCE #-} qualified GI.Gtk.Objects.AccelGroup as Gtk.AccelGroup
import {-# SOURCE #-} qualified GI.Gtk.Objects.EventController as Gtk.EventController
import {-# SOURCE #-} qualified GI.Gtk.Objects.LayoutManager as Gtk.LayoutManager
import {-# SOURCE #-} qualified GI.Gtk.Objects.Settings as Gtk.Settings
import {-# SOURCE #-} qualified GI.Gtk.Objects.Snapshot as Gtk.Snapshot
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.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

-- | Memory-managed wrapper type.
newtype Widget = Widget (ManagedPtr Widget)
    deriving (Widget -> Widget -> Bool
(Widget -> Widget -> Bool)
-> (Widget -> Widget -> Bool) -> Eq Widget
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: Widget -> Widget -> Bool
$c/= :: Widget -> Widget -> Bool
== :: Widget -> Widget -> Bool
$c== :: Widget -> Widget -> Bool
Eq)
foreign import ccall "gtk_widget_get_type"
    c_gtk_widget_get_type :: IO GType

instance GObject Widget where
    gobjectType :: IO GType
gobjectType = IO GType
c_gtk_widget_get_type
    

-- | Convert 'Widget' to and from 'Data.GI.Base.GValue.GValue' with 'Data.GI.Base.GValue.toGValue' and 'Data.GI.Base.GValue.fromGValue'.
instance B.GValue.IsGValue Widget where
    toGValue :: Widget -> IO GValue
toGValue o :: Widget
o = do
        GType
gtype <- IO GType
c_gtk_widget_get_type
        Widget -> (Ptr Widget -> IO GValue) -> IO GValue
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
B.ManagedPtr.withManagedPtr Widget
o (GType -> (GValue -> Ptr Widget -> IO ()) -> Ptr Widget -> IO GValue
forall a. GType -> (GValue -> a -> IO ()) -> a -> IO GValue
B.GValue.buildGValue GType
gtype GValue -> Ptr Widget -> IO ()
forall a. GObject a => GValue -> Ptr a -> IO ()
B.GValue.set_object)
        
    fromGValue :: GValue -> IO Widget
fromGValue gv :: GValue
gv = do
        Ptr Widget
ptr <- GValue -> IO (Ptr Widget)
forall b. GObject b => GValue -> IO (Ptr b)
B.GValue.get_object GValue
gv :: IO (Ptr Widget)
        (ManagedPtr Widget -> Widget) -> Ptr Widget -> IO Widget
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
B.ManagedPtr.newObject ManagedPtr Widget -> Widget
Widget Ptr Widget
ptr
        
    

-- | Type class for types which can be safely cast to `Widget`, for instance with `toWidget`.
class (GObject o, O.IsDescendantOf Widget o) => IsWidget o
instance (GObject o, O.IsDescendantOf Widget o) => IsWidget o

instance O.HasParentTypes Widget
type instance O.ParentTypes Widget = '[GObject.Object.Object, Atk.ImplementorIface.ImplementorIface, Gtk.Buildable.Buildable]

-- | 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 :: o -> m Widget
toWidget = IO Widget -> m Widget
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Widget -> m Widget) -> (o -> IO Widget) -> o -> m Widget
forall b c a. (b -> c) -> (a -> b) -> a -> c
. (ManagedPtr Widget -> Widget) -> o -> IO Widget
forall o o'.
(HasCallStack, GObject o, GObject o') =>
(ManagedPtr o' -> o') -> o -> IO o'
unsafeCastTo ManagedPtr Widget -> Widget
Widget

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

#if defined(ENABLE_OVERLOADING)
type family ResolveWidgetMethod (t :: Symbol) (o :: *) :: * where
    ResolveWidgetMethod "activate" o = WidgetActivateMethodInfo
    ResolveWidgetMethod "activateAction" o = WidgetActivateActionMethodInfo
    ResolveWidgetMethod "activateDefault" o = WidgetActivateDefaultMethodInfo
    ResolveWidgetMethod "addAccelerator" o = WidgetAddAcceleratorMethodInfo
    ResolveWidgetMethod "addChild" o = Gtk.Buildable.BuildableAddChildMethodInfo
    ResolveWidgetMethod "addController" o = WidgetAddControllerMethodInfo
    ResolveWidgetMethod "addMnemonicLabel" o = WidgetAddMnemonicLabelMethodInfo
    ResolveWidgetMethod "addTickCallback" o = WidgetAddTickCallbackMethodInfo
    ResolveWidgetMethod "allocate" o = WidgetAllocateMethodInfo
    ResolveWidgetMethod "bindProperty" o = GObject.Object.ObjectBindPropertyMethodInfo
    ResolveWidgetMethod "bindPropertyFull" o = GObject.Object.ObjectBindPropertyFullMethodInfo
    ResolveWidgetMethod "canActivateAccel" o = WidgetCanActivateAccelMethodInfo
    ResolveWidgetMethod "childFocus" o = WidgetChildFocusMethodInfo
    ResolveWidgetMethod "computeBounds" o = WidgetComputeBoundsMethodInfo
    ResolveWidgetMethod "computeExpand" o = WidgetComputeExpandMethodInfo
    ResolveWidgetMethod "computePoint" o = WidgetComputePointMethodInfo
    ResolveWidgetMethod "computeTransform" o = WidgetComputeTransformMethodInfo
    ResolveWidgetMethod "constructChild" o = Gtk.Buildable.BuildableConstructChildMethodInfo
    ResolveWidgetMethod "contains" o = WidgetContainsMethodInfo
    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 "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 "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 "dragSourceSetIconPaintable" o = WidgetDragSourceSetIconPaintableMethodInfo
    ResolveWidgetMethod "dragSourceSetTargetList" o = WidgetDragSourceSetTargetListMethodInfo
    ResolveWidgetMethod "dragSourceUnset" o = WidgetDragSourceUnsetMethodInfo
    ResolveWidgetMethod "dragUnhighlight" o = WidgetDragUnhighlightMethodInfo
    ResolveWidgetMethod "errorBell" o = WidgetErrorBellMethodInfo
    ResolveWidgetMethod "event" o = WidgetEventMethodInfo
    ResolveWidgetMethod "forceFloating" o = GObject.Object.ObjectForceFloatingMethodInfo
    ResolveWidgetMethod "freezeNotify" o = GObject.Object.ObjectFreezeNotifyMethodInfo
    ResolveWidgetMethod "getv" o = GObject.Object.ObjectGetvMethodInfo
    ResolveWidgetMethod "grabAdd" o = WidgetGrabAddMethodInfo
    ResolveWidgetMethod "grabFocus" o = WidgetGrabFocusMethodInfo
    ResolveWidgetMethod "grabRemove" o = WidgetGrabRemoveMethodInfo
    ResolveWidgetMethod "hasDefault" o = WidgetHasDefaultMethodInfo
    ResolveWidgetMethod "hasFocus" o = WidgetHasFocusMethodInfo
    ResolveWidgetMethod "hasGrab" o = WidgetHasGrabMethodInfo
    ResolveWidgetMethod "hasVisibleFocus" o = WidgetHasVisibleFocusMethodInfo
    ResolveWidgetMethod "hide" o = WidgetHideMethodInfo
    ResolveWidgetMethod "inDestruction" o = WidgetInDestructionMethodInfo
    ResolveWidgetMethod "initTemplate" o = WidgetInitTemplateMethodInfo
    ResolveWidgetMethod "inputShapeCombineRegion" o = WidgetInputShapeCombineRegionMethodInfo
    ResolveWidgetMethod "insertActionGroup" o = WidgetInsertActionGroupMethodInfo
    ResolveWidgetMethod "insertAfter" o = WidgetInsertAfterMethodInfo
    ResolveWidgetMethod "insertBefore" o = WidgetInsertBeforeMethodInfo
    ResolveWidgetMethod "isAncestor" o = WidgetIsAncestorMethodInfo
    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 "measure" o = WidgetMeasureMethodInfo
    ResolveWidgetMethod "mnemonicActivate" o = WidgetMnemonicActivateMethodInfo
    ResolveWidgetMethod "notify" o = GObject.Object.ObjectNotifyMethodInfo
    ResolveWidgetMethod "notifyByPspec" o = GObject.Object.ObjectNotifyByPspecMethodInfo
    ResolveWidgetMethod "observeChildren" o = WidgetObserveChildrenMethodInfo
    ResolveWidgetMethod "observeControllers" o = WidgetObserveControllersMethodInfo
    ResolveWidgetMethod "parserFinished" o = Gtk.Buildable.BuildableParserFinishedMethodInfo
    ResolveWidgetMethod "pick" o = WidgetPickMethodInfo
    ResolveWidgetMethod "queueAllocate" o = WidgetQueueAllocateMethodInfo
    ResolveWidgetMethod "queueComputeExpand" o = WidgetQueueComputeExpandMethodInfo
    ResolveWidgetMethod "queueDraw" o = WidgetQueueDrawMethodInfo
    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 "registerSurface" o = WidgetRegisterSurfaceMethodInfo
    ResolveWidgetMethod "removeAccelerator" o = WidgetRemoveAcceleratorMethodInfo
    ResolveWidgetMethod "removeController" o = WidgetRemoveControllerMethodInfo
    ResolveWidgetMethod "removeMnemonicLabel" o = WidgetRemoveMnemonicLabelMethodInfo
    ResolveWidgetMethod "removeTickCallback" o = WidgetRemoveTickCallbackMethodInfo
    ResolveWidgetMethod "resetStyle" o = WidgetResetStyleMethodInfo
    ResolveWidgetMethod "runDispose" o = GObject.Object.ObjectRunDisposeMethodInfo
    ResolveWidgetMethod "show" o = WidgetShowMethodInfo
    ResolveWidgetMethod "sizeAllocate" o = WidgetSizeAllocateMethodInfo
    ResolveWidgetMethod "snapshotChild" o = WidgetSnapshotChildMethodInfo
    ResolveWidgetMethod "stealData" o = GObject.Object.ObjectStealDataMethodInfo
    ResolveWidgetMethod "stealQdata" o = GObject.Object.ObjectStealQdataMethodInfo
    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 "unregisterSurface" o = WidgetUnregisterSurfaceMethodInfo
    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 "getAllocatedWidth" o = WidgetGetAllocatedWidthMethodInfo
    ResolveWidgetMethod "getAllocation" o = WidgetGetAllocationMethodInfo
    ResolveWidgetMethod "getAncestor" o = WidgetGetAncestorMethodInfo
    ResolveWidgetMethod "getCanFocus" o = WidgetGetCanFocusMethodInfo
    ResolveWidgetMethod "getCanTarget" o = WidgetGetCanTargetMethodInfo
    ResolveWidgetMethod "getChildVisible" o = WidgetGetChildVisibleMethodInfo
    ResolveWidgetMethod "getClipboard" o = WidgetGetClipboardMethodInfo
    ResolveWidgetMethod "getCursor" o = WidgetGetCursorMethodInfo
    ResolveWidgetMethod "getData" o = GObject.Object.ObjectGetDataMethodInfo
    ResolveWidgetMethod "getDirection" o = WidgetGetDirectionMethodInfo
    ResolveWidgetMethod "getDisplay" o = WidgetGetDisplayMethodInfo
    ResolveWidgetMethod "getFirstChild" o = WidgetGetFirstChildMethodInfo
    ResolveWidgetMethod "getFocusChild" o = WidgetGetFocusChildMethodInfo
    ResolveWidgetMethod "getFocusOnClick" o = WidgetGetFocusOnClickMethodInfo
    ResolveWidgetMethod "getFontMap" o = WidgetGetFontMapMethodInfo
    ResolveWidgetMethod "getFontOptions" o = WidgetGetFontOptionsMethodInfo
    ResolveWidgetMethod "getFrameClock" o = WidgetGetFrameClockMethodInfo
    ResolveWidgetMethod "getHalign" o = WidgetGetHalignMethodInfo
    ResolveWidgetMethod "getHasSurface" o = WidgetGetHasSurfaceMethodInfo
    ResolveWidgetMethod "getHasTooltip" o = WidgetGetHasTooltipMethodInfo
    ResolveWidgetMethod "getHeight" o = WidgetGetHeightMethodInfo
    ResolveWidgetMethod "getHexpand" o = WidgetGetHexpandMethodInfo
    ResolveWidgetMethod "getHexpandSet" o = WidgetGetHexpandSetMethodInfo
    ResolveWidgetMethod "getInternalChild" o = Gtk.Buildable.BuildableGetInternalChildMethodInfo
    ResolveWidgetMethod "getLastChild" o = WidgetGetLastChildMethodInfo
    ResolveWidgetMethod "getLayoutManager" o = WidgetGetLayoutManagerMethodInfo
    ResolveWidgetMethod "getMapped" o = WidgetGetMappedMethodInfo
    ResolveWidgetMethod "getMarginBottom" o = WidgetGetMarginBottomMethodInfo
    ResolveWidgetMethod "getMarginEnd" o = WidgetGetMarginEndMethodInfo
    ResolveWidgetMethod "getMarginStart" o = WidgetGetMarginStartMethodInfo
    ResolveWidgetMethod "getMarginTop" o = WidgetGetMarginTopMethodInfo
    ResolveWidgetMethod "getModifierMask" o = WidgetGetModifierMaskMethodInfo
    ResolveWidgetMethod "getName" o = WidgetGetNameMethodInfo
    ResolveWidgetMethod "getNextSibling" o = WidgetGetNextSiblingMethodInfo
    ResolveWidgetMethod "getOpacity" o = WidgetGetOpacityMethodInfo
    ResolveWidgetMethod "getOverflow" o = WidgetGetOverflowMethodInfo
    ResolveWidgetMethod "getPangoContext" o = WidgetGetPangoContextMethodInfo
    ResolveWidgetMethod "getParent" o = WidgetGetParentMethodInfo
    ResolveWidgetMethod "getPath" o = WidgetGetPathMethodInfo
    ResolveWidgetMethod "getPreferredSize" o = WidgetGetPreferredSizeMethodInfo
    ResolveWidgetMethod "getPrevSibling" o = WidgetGetPrevSiblingMethodInfo
    ResolveWidgetMethod "getPrimaryClipboard" o = WidgetGetPrimaryClipboardMethodInfo
    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 "getRoot" o = WidgetGetRootMethodInfo
    ResolveWidgetMethod "getScaleFactor" o = WidgetGetScaleFactorMethodInfo
    ResolveWidgetMethod "getSensitive" o = WidgetGetSensitiveMethodInfo
    ResolveWidgetMethod "getSettings" o = WidgetGetSettingsMethodInfo
    ResolveWidgetMethod "getSizeRequest" o = WidgetGetSizeRequestMethodInfo
    ResolveWidgetMethod "getStateFlags" o = WidgetGetStateFlagsMethodInfo
    ResolveWidgetMethod "getStyleContext" o = WidgetGetStyleContextMethodInfo
    ResolveWidgetMethod "getSupportMultidevice" o = WidgetGetSupportMultideviceMethodInfo
    ResolveWidgetMethod "getSurface" o = WidgetGetSurfaceMethodInfo
    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 "getVexpand" o = WidgetGetVexpandMethodInfo
    ResolveWidgetMethod "getVexpandSet" o = WidgetGetVexpandSetMethodInfo
    ResolveWidgetMethod "getVisible" o = WidgetGetVisibleMethodInfo
    ResolveWidgetMethod "getWidth" o = WidgetGetWidthMethodInfo
    ResolveWidgetMethod "setAccelPath" o = WidgetSetAccelPathMethodInfo
    ResolveWidgetMethod "setBuildableProperty" o = Gtk.Buildable.BuildableSetBuildablePropertyMethodInfo
    ResolveWidgetMethod "setCanFocus" o = WidgetSetCanFocusMethodInfo
    ResolveWidgetMethod "setCanTarget" o = WidgetSetCanTargetMethodInfo
    ResolveWidgetMethod "setChildVisible" o = WidgetSetChildVisibleMethodInfo
    ResolveWidgetMethod "setCursor" o = WidgetSetCursorMethodInfo
    ResolveWidgetMethod "setCursorFromName" o = WidgetSetCursorFromNameMethodInfo
    ResolveWidgetMethod "setData" o = GObject.Object.ObjectSetDataMethodInfo
    ResolveWidgetMethod "setDataFull" o = GObject.Object.ObjectSetDataFullMethodInfo
    ResolveWidgetMethod "setDirection" o = WidgetSetDirectionMethodInfo
    ResolveWidgetMethod "setFocusChild" o = WidgetSetFocusChildMethodInfo
    ResolveWidgetMethod "setFocusOnClick" o = WidgetSetFocusOnClickMethodInfo
    ResolveWidgetMethod "setFontMap" o = WidgetSetFontMapMethodInfo
    ResolveWidgetMethod "setFontOptions" o = WidgetSetFontOptionsMethodInfo
    ResolveWidgetMethod "setHalign" o = WidgetSetHalignMethodInfo
    ResolveWidgetMethod "setHasSurface" o = WidgetSetHasSurfaceMethodInfo
    ResolveWidgetMethod "setHasTooltip" o = WidgetSetHasTooltipMethodInfo
    ResolveWidgetMethod "setHexpand" o = WidgetSetHexpandMethodInfo
    ResolveWidgetMethod "setHexpandSet" o = WidgetSetHexpandSetMethodInfo
    ResolveWidgetMethod "setLayoutManager" o = WidgetSetLayoutManagerMethodInfo
    ResolveWidgetMethod "setMarginBottom" o = WidgetSetMarginBottomMethodInfo
    ResolveWidgetMethod "setMarginEnd" o = WidgetSetMarginEndMethodInfo
    ResolveWidgetMethod "setMarginStart" o = WidgetSetMarginStartMethodInfo
    ResolveWidgetMethod "setMarginTop" o = WidgetSetMarginTopMethodInfo
    ResolveWidgetMethod "setName" o = WidgetSetNameMethodInfo
    ResolveWidgetMethod "setOpacity" o = WidgetSetOpacityMethodInfo
    ResolveWidgetMethod "setOverflow" o = WidgetSetOverflowMethodInfo
    ResolveWidgetMethod "setParent" o = WidgetSetParentMethodInfo
    ResolveWidgetMethod "setProperty" o = GObject.Object.ObjectSetPropertyMethodInfo
    ResolveWidgetMethod "setReceivesDefault" o = WidgetSetReceivesDefaultMethodInfo
    ResolveWidgetMethod "setSensitive" o = WidgetSetSensitiveMethodInfo
    ResolveWidgetMethod "setSizeRequest" o = WidgetSetSizeRequestMethodInfo
    ResolveWidgetMethod "setStateFlags" o = WidgetSetStateFlagsMethodInfo
    ResolveWidgetMethod "setSupportMultidevice" o = WidgetSetSupportMultideviceMethodInfo
    ResolveWidgetMethod "setSurface" o = WidgetSetSurfaceMethodInfo
    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 l o = O.MethodResolutionFailed l o

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

#endif

-- signal Widget::accel-closures-changed
-- | The [accelClosuresChanged](#signal:accelClosuresChanged) signal gets emitted when accelerators for this
-- widget get added, removed or changed.
type WidgetAccelClosuresChangedCallback =
    IO ()

-- | A convenience synonym for @`Nothing` :: `Maybe` `WidgetAccelClosuresChangedCallback`@.
noWidgetAccelClosuresChangedCallback :: Maybe WidgetAccelClosuresChangedCallback
noWidgetAccelClosuresChangedCallback :: Maybe (IO ())
noWidgetAccelClosuresChangedCallback = Maybe (IO ())
forall a. Maybe a
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 `GClosure`.
genClosure_WidgetAccelClosuresChanged :: MonadIO m => WidgetAccelClosuresChangedCallback -> m (GClosure C_WidgetAccelClosuresChangedCallback)
genClosure_WidgetAccelClosuresChanged :: IO () -> m (GClosure C_WidgetAccelClosuresChangedCallback)
genClosure_WidgetAccelClosuresChanged cb :: IO ()
cb = IO (GClosure C_WidgetAccelClosuresChangedCallback)
-> m (GClosure C_WidgetAccelClosuresChangedCallback)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (GClosure C_WidgetAccelClosuresChangedCallback)
 -> m (GClosure C_WidgetAccelClosuresChangedCallback))
-> IO (GClosure C_WidgetAccelClosuresChangedCallback)
-> m (GClosure C_WidgetAccelClosuresChangedCallback)
forall a b. (a -> b) -> a -> b
$ do
    let cb' :: C_WidgetAccelClosuresChangedCallback
cb' = IO () -> C_WidgetAccelClosuresChangedCallback
wrap_WidgetAccelClosuresChangedCallback IO ()
cb
    C_WidgetAccelClosuresChangedCallback
-> IO (FunPtr C_WidgetAccelClosuresChangedCallback)
mk_WidgetAccelClosuresChangedCallback C_WidgetAccelClosuresChangedCallback
cb' IO (FunPtr C_WidgetAccelClosuresChangedCallback)
-> (FunPtr C_WidgetAccelClosuresChangedCallback
    -> IO (GClosure C_WidgetAccelClosuresChangedCallback))
-> IO (GClosure C_WidgetAccelClosuresChangedCallback)
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= FunPtr C_WidgetAccelClosuresChangedCallback
-> IO (GClosure C_WidgetAccelClosuresChangedCallback)
forall (m :: * -> *) a. MonadIO m => FunPtr a -> m (GClosure a)
B.GClosure.newGClosure


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


-- | Connect a signal handler for the [accelClosuresChanged](#signal:accelClosuresChanged) 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 :: a -> IO () -> m SignalHandlerId
onWidgetAccelClosuresChanged obj :: a
obj cb :: IO ()
cb = IO SignalHandlerId -> m SignalHandlerId
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO SignalHandlerId -> m SignalHandlerId)
-> IO SignalHandlerId -> m SignalHandlerId
forall a b. (a -> b) -> a -> b
$ do
    let cb' :: C_WidgetAccelClosuresChangedCallback
cb' = IO () -> C_WidgetAccelClosuresChangedCallback
wrap_WidgetAccelClosuresChangedCallback IO ()
cb
    FunPtr C_WidgetAccelClosuresChangedCallback
cb'' <- C_WidgetAccelClosuresChangedCallback
-> IO (FunPtr C_WidgetAccelClosuresChangedCallback)
mk_WidgetAccelClosuresChangedCallback C_WidgetAccelClosuresChangedCallback
cb'
    a
-> Text
-> FunPtr C_WidgetAccelClosuresChangedCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj "accel-closures-changed" FunPtr C_WidgetAccelClosuresChangedCallback
cb'' SignalConnectMode
SignalConnectBefore Maybe Text
forall a. Maybe a
Nothing

-- | Connect a signal handler for the [accelClosuresChanged](#signal:accelClosuresChanged) 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 :: a -> IO () -> m SignalHandlerId
afterWidgetAccelClosuresChanged obj :: a
obj cb :: IO ()
cb = IO SignalHandlerId -> m SignalHandlerId
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO SignalHandlerId -> m SignalHandlerId)
-> IO SignalHandlerId -> m SignalHandlerId
forall a b. (a -> b) -> a -> b
$ do
    let cb' :: C_WidgetAccelClosuresChangedCallback
cb' = IO () -> C_WidgetAccelClosuresChangedCallback
wrap_WidgetAccelClosuresChangedCallback IO ()
cb
    FunPtr C_WidgetAccelClosuresChangedCallback
cb'' <- C_WidgetAccelClosuresChangedCallback
-> IO (FunPtr C_WidgetAccelClosuresChangedCallback)
mk_WidgetAccelClosuresChangedCallback C_WidgetAccelClosuresChangedCallback
cb'
    a
-> Text
-> FunPtr C_WidgetAccelClosuresChangedCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj "accel-closures-changed" FunPtr C_WidgetAccelClosuresChangedCallback
cb'' SignalConnectMode
SignalConnectAfter Maybe Text
forall a. Maybe a
Nothing


#if defined(ENABLE_OVERLOADING)
data WidgetAccelClosuresChangedSignalInfo
instance SignalInfo WidgetAccelClosuresChangedSignalInfo where
    type HaskellCallbackType WidgetAccelClosuresChangedSignalInfo = WidgetAccelClosuresChangedCallback
    connectSignal obj cb connectMode detail = do
        let cb' = wrap_WidgetAccelClosuresChangedCallback cb
        cb'' <- mk_WidgetAccelClosuresChangedCallback cb'
        connectSignalFunPtr obj "accel-closures-changed" cb'' connectMode detail

#endif

-- 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 t'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:__ 'P.True' if the signal can be activated.

-- | A convenience synonym for @`Nothing` :: `Maybe` `WidgetCanActivateAccelCallback`@.
noWidgetCanActivateAccelCallback :: Maybe WidgetCanActivateAccelCallback
noWidgetCanActivateAccelCallback :: Maybe WidgetCanActivateAccelCallback
noWidgetCanActivateAccelCallback = Maybe WidgetCanActivateAccelCallback
forall a. Maybe a
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 `GClosure`.
genClosure_WidgetCanActivateAccel :: MonadIO m => WidgetCanActivateAccelCallback -> m (GClosure C_WidgetCanActivateAccelCallback)
genClosure_WidgetCanActivateAccel :: WidgetCanActivateAccelCallback
-> m (GClosure C_WidgetCanActivateAccelCallback)
genClosure_WidgetCanActivateAccel cb :: WidgetCanActivateAccelCallback
cb = IO (GClosure C_WidgetCanActivateAccelCallback)
-> m (GClosure C_WidgetCanActivateAccelCallback)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (GClosure C_WidgetCanActivateAccelCallback)
 -> m (GClosure C_WidgetCanActivateAccelCallback))
-> IO (GClosure C_WidgetCanActivateAccelCallback)
-> m (GClosure C_WidgetCanActivateAccelCallback)
forall a b. (a -> b) -> a -> b
$ do
    let cb' :: C_WidgetCanActivateAccelCallback
cb' = WidgetCanActivateAccelCallback -> C_WidgetCanActivateAccelCallback
wrap_WidgetCanActivateAccelCallback WidgetCanActivateAccelCallback
cb
    C_WidgetCanActivateAccelCallback
-> IO (FunPtr C_WidgetCanActivateAccelCallback)
mk_WidgetCanActivateAccelCallback C_WidgetCanActivateAccelCallback
cb' IO (FunPtr C_WidgetCanActivateAccelCallback)
-> (FunPtr C_WidgetCanActivateAccelCallback
    -> IO (GClosure C_WidgetCanActivateAccelCallback))
-> IO (GClosure C_WidgetCanActivateAccelCallback)
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= FunPtr C_WidgetCanActivateAccelCallback
-> IO (GClosure C_WidgetCanActivateAccelCallback)
forall (m :: * -> *) a. MonadIO m => FunPtr a -> m (GClosure a)
B.GClosure.newGClosure


-- | Wrap a `WidgetCanActivateAccelCallback` into a `C_WidgetCanActivateAccelCallback`.
wrap_WidgetCanActivateAccelCallback ::
    WidgetCanActivateAccelCallback ->
    C_WidgetCanActivateAccelCallback
wrap_WidgetCanActivateAccelCallback :: WidgetCanActivateAccelCallback -> C_WidgetCanActivateAccelCallback
wrap_WidgetCanActivateAccelCallback _cb :: WidgetCanActivateAccelCallback
_cb _ signalId :: Word32
signalId _ = do
    Bool
result <- WidgetCanActivateAccelCallback
_cb  Word32
signalId
    let result' :: CInt
result' = (Int -> CInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CInt) -> (Bool -> Int) -> Bool -> CInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Bool -> Int
forall a. Enum a => a -> Int
fromEnum) Bool
result
    CInt -> IO CInt
forall (m :: * -> *) a. Monad m => a -> m a
return CInt
result'


-- | Connect a signal handler for the [canActivateAccel](#signal:canActivateAccel) 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 :: a -> WidgetCanActivateAccelCallback -> m SignalHandlerId
onWidgetCanActivateAccel obj :: a
obj cb :: WidgetCanActivateAccelCallback
cb = IO SignalHandlerId -> m SignalHandlerId
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO SignalHandlerId -> m SignalHandlerId)
-> IO SignalHandlerId -> m SignalHandlerId
forall a b. (a -> b) -> a -> b
$ do
    let cb' :: C_WidgetCanActivateAccelCallback
cb' = WidgetCanActivateAccelCallback -> C_WidgetCanActivateAccelCallback
wrap_WidgetCanActivateAccelCallback WidgetCanActivateAccelCallback
cb
    FunPtr C_WidgetCanActivateAccelCallback
cb'' <- C_WidgetCanActivateAccelCallback
-> IO (FunPtr C_WidgetCanActivateAccelCallback)
mk_WidgetCanActivateAccelCallback C_WidgetCanActivateAccelCallback
cb'
    a
-> Text
-> FunPtr C_WidgetCanActivateAccelCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj "can-activate-accel" FunPtr C_WidgetCanActivateAccelCallback
cb'' SignalConnectMode
SignalConnectBefore Maybe Text
forall a. Maybe a
Nothing

-- | Connect a signal handler for the [canActivateAccel](#signal:canActivateAccel) 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 :: a -> WidgetCanActivateAccelCallback -> m SignalHandlerId
afterWidgetCanActivateAccel obj :: a
obj cb :: WidgetCanActivateAccelCallback
cb = IO SignalHandlerId -> m SignalHandlerId
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO SignalHandlerId -> m SignalHandlerId)
-> IO SignalHandlerId -> m SignalHandlerId
forall a b. (a -> b) -> a -> b
$ do
    let cb' :: C_WidgetCanActivateAccelCallback
cb' = WidgetCanActivateAccelCallback -> C_WidgetCanActivateAccelCallback
wrap_WidgetCanActivateAccelCallback WidgetCanActivateAccelCallback
cb
    FunPtr C_WidgetCanActivateAccelCallback
cb'' <- C_WidgetCanActivateAccelCallback
-> IO (FunPtr C_WidgetCanActivateAccelCallback)
mk_WidgetCanActivateAccelCallback C_WidgetCanActivateAccelCallback
cb'
    a
-> Text
-> FunPtr C_WidgetCanActivateAccelCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj "can-activate-accel" FunPtr C_WidgetCanActivateAccelCallback
cb'' SignalConnectMode
SignalConnectAfter Maybe Text
forall a. Maybe a
Nothing


#if defined(ENABLE_OVERLOADING)
data WidgetCanActivateAccelSignalInfo
instance SignalInfo WidgetCanActivateAccelSignalInfo where
    type HaskellCallbackType WidgetCanActivateAccelSignalInfo = WidgetCanActivateAccelCallback
    connectSignal obj cb connectMode detail = do
        let cb' = wrap_WidgetCanActivateAccelCallback cb
        cb'' <- mk_WidgetCanActivateAccelCallback cb'
        connectSignalFunPtr obj "can-activate-accel" cb'' connectMode detail

#endif

-- 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 :: Maybe (IO ())
noWidgetDestroyCallback = Maybe (IO ())
forall a. Maybe a
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 `GClosure`.
genClosure_WidgetDestroy :: MonadIO m => WidgetDestroyCallback -> m (GClosure C_WidgetDestroyCallback)
genClosure_WidgetDestroy :: IO () -> m (GClosure C_WidgetAccelClosuresChangedCallback)
genClosure_WidgetDestroy cb :: IO ()
cb = IO (GClosure C_WidgetAccelClosuresChangedCallback)
-> m (GClosure C_WidgetAccelClosuresChangedCallback)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (GClosure C_WidgetAccelClosuresChangedCallback)
 -> m (GClosure C_WidgetAccelClosuresChangedCallback))
-> IO (GClosure C_WidgetAccelClosuresChangedCallback)
-> m (GClosure C_WidgetAccelClosuresChangedCallback)
forall a b. (a -> b) -> a -> b
$ do
    let cb' :: C_WidgetAccelClosuresChangedCallback
cb' = IO () -> C_WidgetAccelClosuresChangedCallback
wrap_WidgetDestroyCallback IO ()
cb
    C_WidgetAccelClosuresChangedCallback
-> IO (FunPtr C_WidgetAccelClosuresChangedCallback)
mk_WidgetDestroyCallback C_WidgetAccelClosuresChangedCallback
cb' IO (FunPtr C_WidgetAccelClosuresChangedCallback)
-> (FunPtr C_WidgetAccelClosuresChangedCallback
    -> IO (GClosure C_WidgetAccelClosuresChangedCallback))
-> IO (GClosure C_WidgetAccelClosuresChangedCallback)
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= FunPtr C_WidgetAccelClosuresChangedCallback
-> IO (GClosure C_WidgetAccelClosuresChangedCallback)
forall (m :: * -> *) a. MonadIO m => FunPtr a -> m (GClosure a)
B.GClosure.newGClosure


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


-- | Connect a signal handler for the [destroy](#signal: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 :: a -> IO () -> m SignalHandlerId
onWidgetDestroy obj :: a
obj cb :: IO ()
cb = IO SignalHandlerId -> m SignalHandlerId
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO SignalHandlerId -> m SignalHandlerId)
-> IO SignalHandlerId -> m SignalHandlerId
forall a b. (a -> b) -> a -> b
$ do
    let cb' :: C_WidgetAccelClosuresChangedCallback
cb' = IO () -> C_WidgetAccelClosuresChangedCallback
wrap_WidgetDestroyCallback IO ()
cb
    FunPtr C_WidgetAccelClosuresChangedCallback
cb'' <- C_WidgetAccelClosuresChangedCallback
-> IO (FunPtr C_WidgetAccelClosuresChangedCallback)
mk_WidgetDestroyCallback C_WidgetAccelClosuresChangedCallback
cb'
    a
-> Text
-> FunPtr C_WidgetAccelClosuresChangedCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj "destroy" FunPtr C_WidgetAccelClosuresChangedCallback
cb'' SignalConnectMode
SignalConnectBefore Maybe Text
forall a. Maybe a
Nothing

-- | Connect a signal handler for the [destroy](#signal: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 :: a -> IO () -> m SignalHandlerId
afterWidgetDestroy obj :: a
obj cb :: IO ()
cb = IO SignalHandlerId -> m SignalHandlerId
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO SignalHandlerId -> m SignalHandlerId)
-> IO SignalHandlerId -> m SignalHandlerId
forall a b. (a -> b) -> a -> b
$ do
    let cb' :: C_WidgetAccelClosuresChangedCallback
cb' = IO () -> C_WidgetAccelClosuresChangedCallback
wrap_WidgetDestroyCallback IO ()
cb
    FunPtr C_WidgetAccelClosuresChangedCallback
cb'' <- C_WidgetAccelClosuresChangedCallback
-> IO (FunPtr C_WidgetAccelClosuresChangedCallback)
mk_WidgetDestroyCallback C_WidgetAccelClosuresChangedCallback
cb'
    a
-> Text
-> FunPtr C_WidgetAccelClosuresChangedCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj "destroy" FunPtr C_WidgetAccelClosuresChangedCallback
cb'' SignalConnectMode
SignalConnectAfter Maybe Text
forall a. Maybe a
Nothing


#if defined(ENABLE_OVERLOADING)
data WidgetDestroySignalInfo
instance SignalInfo WidgetDestroySignalInfo where
    type HaskellCallbackType WidgetDestroySignalInfo = WidgetDestroyCallback
    connectSignal obj cb connectMode detail = do
        let cb' = wrap_WidgetDestroyCallback cb
        cb'' <- mk_WidgetDestroyCallback cb'
        connectSignalFunPtr obj "destroy" cb'' connectMode detail

#endif

-- signal Widget::direction-changed
-- | The [directionChanged](#signal:directionChanged) 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 :: Maybe WidgetDirectionChangedCallback
noWidgetDirectionChangedCallback = Maybe WidgetDirectionChangedCallback
forall a. Maybe a
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 `GClosure`.
genClosure_WidgetDirectionChanged :: MonadIO m => WidgetDirectionChangedCallback -> m (GClosure C_WidgetDirectionChangedCallback)
genClosure_WidgetDirectionChanged :: WidgetDirectionChangedCallback
-> m (GClosure C_WidgetDirectionChangedCallback)
genClosure_WidgetDirectionChanged cb :: WidgetDirectionChangedCallback
cb = IO (GClosure C_WidgetDirectionChangedCallback)
-> m (GClosure C_WidgetDirectionChangedCallback)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (GClosure C_WidgetDirectionChangedCallback)
 -> m (GClosure C_WidgetDirectionChangedCallback))
-> IO (GClosure C_WidgetDirectionChangedCallback)
-> m (GClosure C_WidgetDirectionChangedCallback)
forall a b. (a -> b) -> a -> b
$ do
    let cb' :: C_WidgetDirectionChangedCallback
cb' = WidgetDirectionChangedCallback -> C_WidgetDirectionChangedCallback
wrap_WidgetDirectionChangedCallback WidgetDirectionChangedCallback
cb
    C_WidgetDirectionChangedCallback
-> IO (FunPtr C_WidgetDirectionChangedCallback)
mk_WidgetDirectionChangedCallback C_WidgetDirectionChangedCallback
cb' IO (FunPtr C_WidgetDirectionChangedCallback)
-> (FunPtr C_WidgetDirectionChangedCallback
    -> IO (GClosure C_WidgetDirectionChangedCallback))
-> IO (GClosure C_WidgetDirectionChangedCallback)
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= FunPtr C_WidgetDirectionChangedCallback
-> IO (GClosure C_WidgetDirectionChangedCallback)
forall (m :: * -> *) a. MonadIO m => FunPtr a -> m (GClosure a)
B.GClosure.newGClosure


-- | Wrap a `WidgetDirectionChangedCallback` into a `C_WidgetDirectionChangedCallback`.
wrap_WidgetDirectionChangedCallback ::
    WidgetDirectionChangedCallback ->
    C_WidgetDirectionChangedCallback
wrap_WidgetDirectionChangedCallback :: WidgetDirectionChangedCallback -> C_WidgetDirectionChangedCallback
wrap_WidgetDirectionChangedCallback _cb :: WidgetDirectionChangedCallback
_cb _ previousDirection :: CUInt
previousDirection _ = do
    let previousDirection' :: TextDirection
previousDirection' = (Int -> TextDirection
forall a. Enum a => Int -> a
toEnum (Int -> TextDirection) -> (CUInt -> Int) -> CUInt -> TextDirection
forall b c a. (b -> c) -> (a -> b) -> a -> c
. CUInt -> Int
forall a b. (Integral a, Num b) => a -> b
fromIntegral) CUInt
previousDirection
    WidgetDirectionChangedCallback
_cb  TextDirection
previousDirection'


-- | Connect a signal handler for the [directionChanged](#signal:directionChanged) 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 :: a -> WidgetDirectionChangedCallback -> m SignalHandlerId
onWidgetDirectionChanged obj :: a
obj cb :: WidgetDirectionChangedCallback
cb = IO SignalHandlerId -> m SignalHandlerId
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO SignalHandlerId -> m SignalHandlerId)
-> IO SignalHandlerId -> m SignalHandlerId
forall a b. (a -> b) -> a -> b
$ do
    let cb' :: C_WidgetDirectionChangedCallback
cb' = WidgetDirectionChangedCallback -> C_WidgetDirectionChangedCallback
wrap_WidgetDirectionChangedCallback WidgetDirectionChangedCallback
cb
    FunPtr C_WidgetDirectionChangedCallback
cb'' <- C_WidgetDirectionChangedCallback
-> IO (FunPtr C_WidgetDirectionChangedCallback)
mk_WidgetDirectionChangedCallback C_WidgetDirectionChangedCallback
cb'
    a
-> Text
-> FunPtr C_WidgetDirectionChangedCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj "direction-changed" FunPtr C_WidgetDirectionChangedCallback
cb'' SignalConnectMode
SignalConnectBefore Maybe Text
forall a. Maybe a
Nothing

-- | Connect a signal handler for the [directionChanged](#signal:directionChanged) 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 :: a -> WidgetDirectionChangedCallback -> m SignalHandlerId
afterWidgetDirectionChanged obj :: a
obj cb :: WidgetDirectionChangedCallback
cb = IO SignalHandlerId -> m SignalHandlerId
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO SignalHandlerId -> m SignalHandlerId)
-> IO SignalHandlerId -> m SignalHandlerId
forall a b. (a -> b) -> a -> b
$ do
    let cb' :: C_WidgetDirectionChangedCallback
cb' = WidgetDirectionChangedCallback -> C_WidgetDirectionChangedCallback
wrap_WidgetDirectionChangedCallback WidgetDirectionChangedCallback
cb
    FunPtr C_WidgetDirectionChangedCallback
cb'' <- C_WidgetDirectionChangedCallback
-> IO (FunPtr C_WidgetDirectionChangedCallback)
mk_WidgetDirectionChangedCallback C_WidgetDirectionChangedCallback
cb'
    a
-> Text
-> FunPtr C_WidgetDirectionChangedCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj "direction-changed" FunPtr C_WidgetDirectionChangedCallback
cb'' SignalConnectMode
SignalConnectAfter Maybe Text
forall a. Maybe a
Nothing


#if defined(ENABLE_OVERLOADING)
data WidgetDirectionChangedSignalInfo
instance SignalInfo WidgetDirectionChangedSignalInfo where
    type HaskellCallbackType WidgetDirectionChangedSignalInfo = WidgetDirectionChangedCallback
    connectSignal obj cb connectMode detail = do
        let cb' = wrap_WidgetDirectionChangedCallback cb
        cb'' <- mk_WidgetDirectionChangedCallback cb'
        connectSignalFunPtr obj "direction-changed" cb'' connectMode detail

#endif

-- signal Widget::drag-begin
-- | The [dragBegin](#signal:dragBegin) 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.widgetDragSourceSetIconPaintable'.
-- 
-- 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.Drag.Drag
    -- ^ /@context@/: the drag context
    -> IO ()

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

-- | Type for the callback on the (unwrapped) C side.
type C_WidgetDragBeginCallback =
    Ptr () ->                               -- object
    Ptr Gdk.Drag.Drag ->
    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 `GClosure`.
genClosure_WidgetDragBegin :: MonadIO m => WidgetDragBeginCallback -> m (GClosure C_WidgetDragBeginCallback)
genClosure_WidgetDragBegin :: WidgetDragBeginCallback -> m (GClosure C_WidgetDragBeginCallback)
genClosure_WidgetDragBegin cb :: WidgetDragBeginCallback
cb = IO (GClosure C_WidgetDragBeginCallback)
-> m (GClosure C_WidgetDragBeginCallback)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (GClosure C_WidgetDragBeginCallback)
 -> m (GClosure C_WidgetDragBeginCallback))
-> IO (GClosure C_WidgetDragBeginCallback)
-> m (GClosure C_WidgetDragBeginCallback)
forall a b. (a -> b) -> a -> b
$ do
    let cb' :: C_WidgetDragBeginCallback
cb' = WidgetDragBeginCallback -> C_WidgetDragBeginCallback
wrap_WidgetDragBeginCallback WidgetDragBeginCallback
cb
    C_WidgetDragBeginCallback -> IO (FunPtr C_WidgetDragBeginCallback)
mk_WidgetDragBeginCallback C_WidgetDragBeginCallback
cb' IO (FunPtr C_WidgetDragBeginCallback)
-> (FunPtr C_WidgetDragBeginCallback
    -> IO (GClosure C_WidgetDragBeginCallback))
-> IO (GClosure C_WidgetDragBeginCallback)
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= FunPtr C_WidgetDragBeginCallback
-> IO (GClosure C_WidgetDragBeginCallback)
forall (m :: * -> *) a. MonadIO m => FunPtr a -> m (GClosure a)
B.GClosure.newGClosure


-- | Wrap a `WidgetDragBeginCallback` into a `C_WidgetDragBeginCallback`.
wrap_WidgetDragBeginCallback ::
    WidgetDragBeginCallback ->
    C_WidgetDragBeginCallback
wrap_WidgetDragBeginCallback :: WidgetDragBeginCallback -> C_WidgetDragBeginCallback
wrap_WidgetDragBeginCallback _cb :: WidgetDragBeginCallback
_cb _ context :: Ptr Drag
context _ = do
    Drag
context' <- ((ManagedPtr Drag -> Drag) -> Ptr Drag -> IO Drag
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr Drag -> Drag
Gdk.Drag.Drag) Ptr Drag
context
    WidgetDragBeginCallback
_cb  Drag
context'


-- | Connect a signal handler for the [dragBegin](#signal:dragBegin) 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 :: a -> WidgetDragBeginCallback -> m SignalHandlerId
onWidgetDragBegin obj :: a
obj cb :: WidgetDragBeginCallback
cb = IO SignalHandlerId -> m SignalHandlerId
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO SignalHandlerId -> m SignalHandlerId)
-> IO SignalHandlerId -> m SignalHandlerId
forall a b. (a -> b) -> a -> b
$ do
    let cb' :: C_WidgetDragBeginCallback
cb' = WidgetDragBeginCallback -> C_WidgetDragBeginCallback
wrap_WidgetDragBeginCallback WidgetDragBeginCallback
cb
    FunPtr C_WidgetDragBeginCallback
cb'' <- C_WidgetDragBeginCallback -> IO (FunPtr C_WidgetDragBeginCallback)
mk_WidgetDragBeginCallback C_WidgetDragBeginCallback
cb'
    a
-> Text
-> FunPtr C_WidgetDragBeginCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj "drag-begin" FunPtr C_WidgetDragBeginCallback
cb'' SignalConnectMode
SignalConnectBefore Maybe Text
forall a. Maybe a
Nothing

-- | Connect a signal handler for the [dragBegin](#signal:dragBegin) 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 :: a -> WidgetDragBeginCallback -> m SignalHandlerId
afterWidgetDragBegin obj :: a
obj cb :: WidgetDragBeginCallback
cb = IO SignalHandlerId -> m SignalHandlerId
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO SignalHandlerId -> m SignalHandlerId)
-> IO SignalHandlerId -> m SignalHandlerId
forall a b. (a -> b) -> a -> b
$ do
    let cb' :: C_WidgetDragBeginCallback
cb' = WidgetDragBeginCallback -> C_WidgetDragBeginCallback
wrap_WidgetDragBeginCallback WidgetDragBeginCallback
cb
    FunPtr C_WidgetDragBeginCallback
cb'' <- C_WidgetDragBeginCallback -> IO (FunPtr C_WidgetDragBeginCallback)
mk_WidgetDragBeginCallback C_WidgetDragBeginCallback
cb'
    a
-> Text
-> FunPtr C_WidgetDragBeginCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj "drag-begin" FunPtr C_WidgetDragBeginCallback
cb'' SignalConnectMode
SignalConnectAfter Maybe Text
forall a. Maybe a
Nothing


#if defined(ENABLE_OVERLOADING)
data WidgetDragBeginSignalInfo
instance SignalInfo WidgetDragBeginSignalInfo where
    type HaskellCallbackType WidgetDragBeginSignalInfo = WidgetDragBeginCallback
    connectSignal obj cb connectMode detail = do
        let cb' = wrap_WidgetDragBeginCallback cb
        cb'' <- mk_WidgetDragBeginCallback cb'
        connectSignalFunPtr obj "drag-begin" cb'' connectMode detail

#endif

-- signal Widget::drag-data-delete
-- | The [dragDataDelete](#signal:dragDataDelete) 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.Drag.Drag
    -- ^ /@context@/: the drag context
    -> IO ()

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

-- | Type for the callback on the (unwrapped) C side.
type C_WidgetDragDataDeleteCallback =
    Ptr () ->                               -- object
    Ptr Gdk.Drag.Drag ->
    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 `GClosure`.
genClosure_WidgetDragDataDelete :: MonadIO m => WidgetDragDataDeleteCallback -> m (GClosure C_WidgetDragDataDeleteCallback)
genClosure_WidgetDragDataDelete :: WidgetDragBeginCallback -> m (GClosure C_WidgetDragBeginCallback)
genClosure_WidgetDragDataDelete cb :: WidgetDragBeginCallback
cb = IO (GClosure C_WidgetDragBeginCallback)
-> m (GClosure C_WidgetDragBeginCallback)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (GClosure C_WidgetDragBeginCallback)
 -> m (GClosure C_WidgetDragBeginCallback))
-> IO (GClosure C_WidgetDragBeginCallback)
-> m (GClosure C_WidgetDragBeginCallback)
forall a b. (a -> b) -> a -> b
$ do
    let cb' :: C_WidgetDragBeginCallback
cb' = WidgetDragBeginCallback -> C_WidgetDragBeginCallback
wrap_WidgetDragDataDeleteCallback WidgetDragBeginCallback
cb
    C_WidgetDragBeginCallback -> IO (FunPtr C_WidgetDragBeginCallback)
mk_WidgetDragDataDeleteCallback C_WidgetDragBeginCallback
cb' IO (FunPtr C_WidgetDragBeginCallback)
-> (FunPtr C_WidgetDragBeginCallback
    -> IO (GClosure C_WidgetDragBeginCallback))
-> IO (GClosure C_WidgetDragBeginCallback)
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= FunPtr C_WidgetDragBeginCallback
-> IO (GClosure C_WidgetDragBeginCallback)
forall (m :: * -> *) a. MonadIO m => FunPtr a -> m (GClosure a)
B.GClosure.newGClosure


-- | Wrap a `WidgetDragDataDeleteCallback` into a `C_WidgetDragDataDeleteCallback`.
wrap_WidgetDragDataDeleteCallback ::
    WidgetDragDataDeleteCallback ->
    C_WidgetDragDataDeleteCallback
wrap_WidgetDragDataDeleteCallback :: WidgetDragBeginCallback -> C_WidgetDragBeginCallback
wrap_WidgetDragDataDeleteCallback _cb :: WidgetDragBeginCallback
_cb _ context :: Ptr Drag
context _ = do
    Drag
context' <- ((ManagedPtr Drag -> Drag) -> Ptr Drag -> IO Drag
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr Drag -> Drag
Gdk.Drag.Drag) Ptr Drag
context
    WidgetDragBeginCallback
_cb  Drag
context'


-- | Connect a signal handler for the [dragDataDelete](#signal:dragDataDelete) 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 :: a -> WidgetDragBeginCallback -> m SignalHandlerId
onWidgetDragDataDelete obj :: a
obj cb :: WidgetDragBeginCallback
cb = IO SignalHandlerId -> m SignalHandlerId
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO SignalHandlerId -> m SignalHandlerId)
-> IO SignalHandlerId -> m SignalHandlerId
forall a b. (a -> b) -> a -> b
$ do
    let cb' :: C_WidgetDragBeginCallback
cb' = WidgetDragBeginCallback -> C_WidgetDragBeginCallback
wrap_WidgetDragDataDeleteCallback WidgetDragBeginCallback
cb
    FunPtr C_WidgetDragBeginCallback
cb'' <- C_WidgetDragBeginCallback -> IO (FunPtr C_WidgetDragBeginCallback)
mk_WidgetDragDataDeleteCallback C_WidgetDragBeginCallback
cb'
    a
-> Text
-> FunPtr C_WidgetDragBeginCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj "drag-data-delete" FunPtr C_WidgetDragBeginCallback
cb'' SignalConnectMode
SignalConnectBefore Maybe Text
forall a. Maybe a
Nothing

-- | Connect a signal handler for the [dragDataDelete](#signal:dragDataDelete) 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 :: a -> WidgetDragBeginCallback -> m SignalHandlerId
afterWidgetDragDataDelete obj :: a
obj cb :: WidgetDragBeginCallback
cb = IO SignalHandlerId -> m SignalHandlerId
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO SignalHandlerId -> m SignalHandlerId)
-> IO SignalHandlerId -> m SignalHandlerId
forall a b. (a -> b) -> a -> b
$ do
    let cb' :: C_WidgetDragBeginCallback
cb' = WidgetDragBeginCallback -> C_WidgetDragBeginCallback
wrap_WidgetDragDataDeleteCallback WidgetDragBeginCallback
cb
    FunPtr C_WidgetDragBeginCallback
cb'' <- C_WidgetDragBeginCallback -> IO (FunPtr C_WidgetDragBeginCallback)
mk_WidgetDragDataDeleteCallback C_WidgetDragBeginCallback
cb'
    a
-> Text
-> FunPtr C_WidgetDragBeginCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj "drag-data-delete" FunPtr C_WidgetDragBeginCallback
cb'' SignalConnectMode
SignalConnectAfter Maybe Text
forall a. Maybe a
Nothing


#if defined(ENABLE_OVERLOADING)
data WidgetDragDataDeleteSignalInfo
instance SignalInfo WidgetDragDataDeleteSignalInfo where
    type HaskellCallbackType WidgetDragDataDeleteSignalInfo = WidgetDragDataDeleteCallback
    connectSignal obj cb connectMode detail = do
        let cb' = wrap_WidgetDragDataDeleteCallback cb
        cb'' <- mk_WidgetDragDataDeleteCallback cb'
        connectSignalFunPtr obj "drag-data-delete" cb'' connectMode detail

#endif

-- signal Widget::drag-data-get
-- | The [dragDataGet](#signal:dragDataGet) 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.Drag.Drag
    -- ^ /@context@/: the drag context
    -> Gtk.SelectionData.SelectionData
    -- ^ /@data@/: the t'GI.Gtk.Structs.SelectionData.SelectionData' to be filled with the dragged data
    -> IO ()

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

-- | Type for the callback on the (unwrapped) C side.
type C_WidgetDragDataGetCallback =
    Ptr () ->                               -- object
    Ptr Gdk.Drag.Drag ->
    Ptr Gtk.SelectionData.SelectionData ->
    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 `GClosure`.
genClosure_WidgetDragDataGet :: MonadIO m => WidgetDragDataGetCallback -> m (GClosure C_WidgetDragDataGetCallback)
genClosure_WidgetDragDataGet :: WidgetDragDataGetCallback
-> m (GClosure C_WidgetDragDataGetCallback)
genClosure_WidgetDragDataGet cb :: WidgetDragDataGetCallback
cb = IO (GClosure C_WidgetDragDataGetCallback)
-> m (GClosure C_WidgetDragDataGetCallback)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (GClosure C_WidgetDragDataGetCallback)
 -> m (GClosure C_WidgetDragDataGetCallback))
-> IO (GClosure C_WidgetDragDataGetCallback)
-> m (GClosure C_WidgetDragDataGetCallback)
forall a b. (a -> b) -> a -> b
$ do
    let cb' :: C_WidgetDragDataGetCallback
cb' = WidgetDragDataGetCallback -> C_WidgetDragDataGetCallback
wrap_WidgetDragDataGetCallback WidgetDragDataGetCallback
cb
    C_WidgetDragDataGetCallback
-> IO (FunPtr C_WidgetDragDataGetCallback)
mk_WidgetDragDataGetCallback C_WidgetDragDataGetCallback
cb' IO (FunPtr C_WidgetDragDataGetCallback)
-> (FunPtr C_WidgetDragDataGetCallback
    -> IO (GClosure C_WidgetDragDataGetCallback))
-> IO (GClosure C_WidgetDragDataGetCallback)
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= FunPtr C_WidgetDragDataGetCallback
-> IO (GClosure C_WidgetDragDataGetCallback)
forall (m :: * -> *) a. MonadIO m => FunPtr a -> m (GClosure a)
B.GClosure.newGClosure


-- | Wrap a `WidgetDragDataGetCallback` into a `C_WidgetDragDataGetCallback`.
wrap_WidgetDragDataGetCallback ::
    WidgetDragDataGetCallback ->
    C_WidgetDragDataGetCallback
wrap_WidgetDragDataGetCallback :: WidgetDragDataGetCallback -> C_WidgetDragDataGetCallback
wrap_WidgetDragDataGetCallback _cb :: WidgetDragDataGetCallback
_cb _ context :: Ptr Drag
context data_ :: Ptr SelectionData
data_ _ = do
    Drag
context' <- ((ManagedPtr Drag -> Drag) -> Ptr Drag -> IO Drag
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr Drag -> Drag
Gdk.Drag.Drag) Ptr Drag
context
    (ManagedPtr SelectionData -> SelectionData)
-> Ptr SelectionData -> (SelectionData -> IO ()) -> IO ()
forall a b.
(HasCallStack, ManagedPtrNewtype a) =>
(ManagedPtr a -> a) -> Ptr a -> (a -> IO b) -> IO b
B.ManagedPtr.withTransient ManagedPtr SelectionData -> SelectionData
Gtk.SelectionData.SelectionData Ptr SelectionData
data_ ((SelectionData -> IO ()) -> IO ())
-> (SelectionData -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \data_' :: SelectionData
data_' -> do
        WidgetDragDataGetCallback
_cb  Drag
context' SelectionData
data_'


-- | Connect a signal handler for the [dragDataGet](#signal:dragDataGet) 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 :: a -> WidgetDragDataGetCallback -> m SignalHandlerId
onWidgetDragDataGet obj :: a
obj cb :: WidgetDragDataGetCallback
cb = IO SignalHandlerId -> m SignalHandlerId
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO SignalHandlerId -> m SignalHandlerId)
-> IO SignalHandlerId -> m SignalHandlerId
forall a b. (a -> b) -> a -> b
$ do
    let cb' :: C_WidgetDragDataGetCallback
cb' = WidgetDragDataGetCallback -> C_WidgetDragDataGetCallback
wrap_WidgetDragDataGetCallback WidgetDragDataGetCallback
cb
    FunPtr C_WidgetDragDataGetCallback
cb'' <- C_WidgetDragDataGetCallback
-> IO (FunPtr C_WidgetDragDataGetCallback)
mk_WidgetDragDataGetCallback C_WidgetDragDataGetCallback
cb'
    a
-> Text
-> FunPtr C_WidgetDragDataGetCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj "drag-data-get" FunPtr C_WidgetDragDataGetCallback
cb'' SignalConnectMode
SignalConnectBefore Maybe Text
forall a. Maybe a
Nothing

-- | Connect a signal handler for the [dragDataGet](#signal:dragDataGet) 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 :: a -> WidgetDragDataGetCallback -> m SignalHandlerId
afterWidgetDragDataGet obj :: a
obj cb :: WidgetDragDataGetCallback
cb = IO SignalHandlerId -> m SignalHandlerId
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO SignalHandlerId -> m SignalHandlerId)
-> IO SignalHandlerId -> m SignalHandlerId
forall a b. (a -> b) -> a -> b
$ do
    let cb' :: C_WidgetDragDataGetCallback
cb' = WidgetDragDataGetCallback -> C_WidgetDragDataGetCallback
wrap_WidgetDragDataGetCallback WidgetDragDataGetCallback
cb
    FunPtr C_WidgetDragDataGetCallback
cb'' <- C_WidgetDragDataGetCallback
-> IO (FunPtr C_WidgetDragDataGetCallback)
mk_WidgetDragDataGetCallback C_WidgetDragDataGetCallback
cb'
    a
-> Text
-> FunPtr C_WidgetDragDataGetCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj "drag-data-get" FunPtr C_WidgetDragDataGetCallback
cb'' SignalConnectMode
SignalConnectAfter Maybe Text
forall a. Maybe a
Nothing


#if defined(ENABLE_OVERLOADING)
data WidgetDragDataGetSignalInfo
instance SignalInfo WidgetDragDataGetSignalInfo where
    type HaskellCallbackType WidgetDragDataGetSignalInfo = WidgetDragDataGetCallback
    connectSignal obj cb connectMode detail = do
        let cb' = wrap_WidgetDragDataGetCallback cb
        cb'' <- mk_WidgetDragDataGetCallback cb'
        connectSignalFunPtr obj "drag-data-get" cb'' connectMode detail

#endif

-- signal Widget::drag-data-received
-- | The [dragDataReceived](#signal:dragDataReceived) 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 @/gdk_drag_status()/@ and not finish the drag.
-- If the data was received in response to a [dragDrop]("GI.Gtk.Objects.Widget#signal:dragDrop") 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
-- @/gdk_drag_finish()/@, 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 @/gdk_drag_status()/@ or @/gdk_drag_finish()/@.
-- 
-- The handler may inspect the selected action with
-- @/gdk_drag_context_get_selected_action()/@ before calling
-- @/gdk_drag_finish()/@, e.g. to implement 'GI.Gdk.Flags.DragActionAsk' as
-- shown in the following example:
-- 
-- === /C code/
-- >
-- >void
-- >drag_data_received (GtkWidget          *widget,
-- >                    GdkDrop            *drop,
-- >                    GtkSelectionData   *data)
-- >{
-- >  if ((data->length >= 0) && (data->format == 8))
-- >    {
-- >      GdkDragAction action;
-- >
-- >      // handle data here
-- >
-- >      action = gdk_drop_get_actions (drop);
-- >      if (!gdk_drag_action_is_unique (action))
-- >        {
-- >          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;
-- >         }
-- >
-- >      gdk_drop_finish (context, action);
-- >    }
-- >  else
-- >    gdk_drop_finish (context, 0);
-- > }
type WidgetDragDataReceivedCallback =
    Gdk.Drop.Drop
    -- ^ /@drop@/: the t'GI.Gdk.Objects.Drop.Drop'
    -> Gtk.SelectionData.SelectionData
    -- ^ /@x@/: where the drop happened
    -> IO ()

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

-- | Type for the callback on the (unwrapped) C side.
type C_WidgetDragDataReceivedCallback =
    Ptr () ->                               -- object
    Ptr Gdk.Drop.Drop ->
    Ptr Gtk.SelectionData.SelectionData ->
    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 `GClosure`.
genClosure_WidgetDragDataReceived :: MonadIO m => WidgetDragDataReceivedCallback -> m (GClosure C_WidgetDragDataReceivedCallback)
genClosure_WidgetDragDataReceived :: WidgetDragDataReceivedCallback
-> m (GClosure C_WidgetDragDataReceivedCallback)
genClosure_WidgetDragDataReceived cb :: WidgetDragDataReceivedCallback
cb = IO (GClosure C_WidgetDragDataReceivedCallback)
-> m (GClosure C_WidgetDragDataReceivedCallback)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (GClosure C_WidgetDragDataReceivedCallback)
 -> m (GClosure C_WidgetDragDataReceivedCallback))
-> IO (GClosure C_WidgetDragDataReceivedCallback)
-> m (GClosure C_WidgetDragDataReceivedCallback)
forall a b. (a -> b) -> a -> b
$ do
    let cb' :: C_WidgetDragDataReceivedCallback
cb' = WidgetDragDataReceivedCallback -> C_WidgetDragDataReceivedCallback
wrap_WidgetDragDataReceivedCallback WidgetDragDataReceivedCallback
cb
    C_WidgetDragDataReceivedCallback
-> IO (FunPtr C_WidgetDragDataReceivedCallback)
mk_WidgetDragDataReceivedCallback C_WidgetDragDataReceivedCallback
cb' IO (FunPtr C_WidgetDragDataReceivedCallback)
-> (FunPtr C_WidgetDragDataReceivedCallback
    -> IO (GClosure C_WidgetDragDataReceivedCallback))
-> IO (GClosure C_WidgetDragDataReceivedCallback)
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= FunPtr C_WidgetDragDataReceivedCallback
-> IO (GClosure C_WidgetDragDataReceivedCallback)
forall (m :: * -> *) a. MonadIO m => FunPtr a -> m (GClosure a)
B.GClosure.newGClosure


-- | Wrap a `WidgetDragDataReceivedCallback` into a `C_WidgetDragDataReceivedCallback`.
wrap_WidgetDragDataReceivedCallback ::
    WidgetDragDataReceivedCallback ->
    C_WidgetDragDataReceivedCallback
wrap_WidgetDragDataReceivedCallback :: WidgetDragDataReceivedCallback -> C_WidgetDragDataReceivedCallback
wrap_WidgetDragDataReceivedCallback _cb :: WidgetDragDataReceivedCallback
_cb _ drop :: Ptr Drop
drop x :: Ptr SelectionData
x _ = do
    Drop
drop' <- ((ManagedPtr Drop -> Drop) -> Ptr Drop -> IO Drop
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr Drop -> Drop
Gdk.Drop.Drop) Ptr Drop
drop
    (ManagedPtr SelectionData -> SelectionData)
-> Ptr SelectionData -> (SelectionData -> IO ()) -> IO ()
forall a b.
(HasCallStack, ManagedPtrNewtype a) =>
(ManagedPtr a -> a) -> Ptr a -> (a -> IO b) -> IO b
B.ManagedPtr.withTransient ManagedPtr SelectionData -> SelectionData
Gtk.SelectionData.SelectionData Ptr SelectionData
x ((SelectionData -> IO ()) -> IO ())
-> (SelectionData -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \x' :: SelectionData
x' -> do
        WidgetDragDataReceivedCallback
_cb  Drop
drop' SelectionData
x'


-- | Connect a signal handler for the [dragDataReceived](#signal:dragDataReceived) 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 :: a -> WidgetDragDataReceivedCallback -> m SignalHandlerId
onWidgetDragDataReceived obj :: a
obj cb :: WidgetDragDataReceivedCallback
cb = IO SignalHandlerId -> m SignalHandlerId
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO SignalHandlerId -> m SignalHandlerId)
-> IO SignalHandlerId -> m SignalHandlerId
forall a b. (a -> b) -> a -> b
$ do
    let cb' :: C_WidgetDragDataReceivedCallback
cb' = WidgetDragDataReceivedCallback -> C_WidgetDragDataReceivedCallback
wrap_WidgetDragDataReceivedCallback WidgetDragDataReceivedCallback
cb
    FunPtr C_WidgetDragDataReceivedCallback
cb'' <- C_WidgetDragDataReceivedCallback
-> IO (FunPtr C_WidgetDragDataReceivedCallback)
mk_WidgetDragDataReceivedCallback C_WidgetDragDataReceivedCallback
cb'
    a
-> Text
-> FunPtr C_WidgetDragDataReceivedCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj "drag-data-received" FunPtr C_WidgetDragDataReceivedCallback
cb'' SignalConnectMode
SignalConnectBefore Maybe Text
forall a. Maybe a
Nothing

-- | Connect a signal handler for the [dragDataReceived](#signal:dragDataReceived) 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 :: a -> WidgetDragDataReceivedCallback -> m SignalHandlerId
afterWidgetDragDataReceived obj :: a
obj cb :: WidgetDragDataReceivedCallback
cb = IO SignalHandlerId -> m SignalHandlerId
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO SignalHandlerId -> m SignalHandlerId)
-> IO SignalHandlerId -> m SignalHandlerId
forall a b. (a -> b) -> a -> b
$ do
    let cb' :: C_WidgetDragDataReceivedCallback
cb' = WidgetDragDataReceivedCallback -> C_WidgetDragDataReceivedCallback
wrap_WidgetDragDataReceivedCallback WidgetDragDataReceivedCallback
cb
    FunPtr C_WidgetDragDataReceivedCallback
cb'' <- C_WidgetDragDataReceivedCallback
-> IO (FunPtr C_WidgetDragDataReceivedCallback)
mk_WidgetDragDataReceivedCallback C_WidgetDragDataReceivedCallback
cb'
    a
-> Text
-> FunPtr C_WidgetDragDataReceivedCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj "drag-data-received" FunPtr C_WidgetDragDataReceivedCallback
cb'' SignalConnectMode
SignalConnectAfter Maybe Text
forall a. Maybe a
Nothing


#if defined(ENABLE_OVERLOADING)
data WidgetDragDataReceivedSignalInfo
instance SignalInfo WidgetDragDataReceivedSignalInfo where
    type HaskellCallbackType WidgetDragDataReceivedSignalInfo = WidgetDragDataReceivedCallback
    connectSignal obj cb connectMode detail = do
        let cb' = wrap_WidgetDragDataReceivedCallback cb
        cb'' <- mk_WidgetDragDataReceivedCallback cb'
        connectSignalFunPtr obj "drag-data-received" cb'' connectMode detail

#endif

-- signal Widget::drag-drop
-- | The [dragDrop](#signal:dragDrop) 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 'P.False' and no further processing is necessary.
-- Otherwise, the handler returns 'P.True'. In this case, the handler must
-- ensure that @/gdk_drag_finish()/@ is called to let the source know that
-- the drop is done. The call to @/gdk_drag_finish()/@ can be done either
-- directly or in a [dragDataReceived]("GI.Gtk.Objects.Widget#signal:dragDataReceived") 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.Drop.Drop
    -- ^ /@drop@/: the t'GI.Gdk.Objects.Drop.Drop'
    -> Int32
    -- ^ /@x@/: the x coordinate of the current cursor position
    -> Int32
    -- ^ /@y@/: the y coordinate of the current cursor position
    -> IO Bool
    -- ^ __Returns:__ whether the cursor position is in a drop zone

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

-- | Type for the callback on the (unwrapped) C side.
type C_WidgetDragDropCallback =
    Ptr () ->                               -- object
    Ptr Gdk.Drop.Drop ->
    Int32 ->
    Int32 ->
    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 `GClosure`.
genClosure_WidgetDragDrop :: MonadIO m => WidgetDragDropCallback -> m (GClosure C_WidgetDragDropCallback)
genClosure_WidgetDragDrop :: WidgetDragDropCallback -> m (GClosure C_WidgetDragDropCallback)
genClosure_WidgetDragDrop cb :: WidgetDragDropCallback
cb = IO (GClosure C_WidgetDragDropCallback)
-> m (GClosure C_WidgetDragDropCallback)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (GClosure C_WidgetDragDropCallback)
 -> m (GClosure C_WidgetDragDropCallback))
-> IO (GClosure C_WidgetDragDropCallback)
-> m (GClosure C_WidgetDragDropCallback)
forall a b. (a -> b) -> a -> b
$ do
    let cb' :: C_WidgetDragDropCallback
cb' = WidgetDragDropCallback -> C_WidgetDragDropCallback
wrap_WidgetDragDropCallback WidgetDragDropCallback
cb
    C_WidgetDragDropCallback -> IO (FunPtr C_WidgetDragDropCallback)
mk_WidgetDragDropCallback C_WidgetDragDropCallback
cb' IO (FunPtr C_WidgetDragDropCallback)
-> (FunPtr C_WidgetDragDropCallback
    -> IO (GClosure C_WidgetDragDropCallback))
-> IO (GClosure C_WidgetDragDropCallback)
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= FunPtr C_WidgetDragDropCallback
-> IO (GClosure C_WidgetDragDropCallback)
forall (m :: * -> *) a. MonadIO m => FunPtr a -> m (GClosure a)
B.GClosure.newGClosure


-- | Wrap a `WidgetDragDropCallback` into a `C_WidgetDragDropCallback`.
wrap_WidgetDragDropCallback ::
    WidgetDragDropCallback ->
    C_WidgetDragDropCallback
wrap_WidgetDragDropCallback :: WidgetDragDropCallback -> C_WidgetDragDropCallback
wrap_WidgetDragDropCallback _cb :: WidgetDragDropCallback
_cb _ drop :: Ptr Drop
drop x :: Int32
x y :: Int32
y _ = do
    Drop
drop' <- ((ManagedPtr Drop -> Drop) -> Ptr Drop -> IO Drop
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr Drop -> Drop
Gdk.Drop.Drop) Ptr Drop
drop
    Bool
result <- WidgetDragDropCallback
_cb  Drop
drop' Int32
x Int32
y
    let result' :: CInt
result' = (Int -> CInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CInt) -> (Bool -> Int) -> Bool -> CInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Bool -> Int
forall a. Enum a => a -> Int
fromEnum) Bool
result
    CInt -> IO CInt
forall (m :: * -> *) a. Monad m => a -> m a
return CInt
result'


-- | Connect a signal handler for the [dragDrop](#signal:dragDrop) 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 :: a -> WidgetDragDropCallback -> m SignalHandlerId
onWidgetDragDrop obj :: a
obj cb :: WidgetDragDropCallback
cb = IO SignalHandlerId -> m SignalHandlerId
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO SignalHandlerId -> m SignalHandlerId)
-> IO SignalHandlerId -> m SignalHandlerId
forall a b. (a -> b) -> a -> b
$ do
    let cb' :: C_WidgetDragDropCallback
cb' = WidgetDragDropCallback -> C_WidgetDragDropCallback
wrap_WidgetDragDropCallback WidgetDragDropCallback
cb
    FunPtr C_WidgetDragDropCallback
cb'' <- C_WidgetDragDropCallback -> IO (FunPtr C_WidgetDragDropCallback)
mk_WidgetDragDropCallback C_WidgetDragDropCallback
cb'
    a
-> Text
-> FunPtr C_WidgetDragDropCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj "drag-drop" FunPtr C_WidgetDragDropCallback
cb'' SignalConnectMode
SignalConnectBefore Maybe Text
forall a. Maybe a
Nothing

-- | Connect a signal handler for the [dragDrop](#signal:dragDrop) 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 :: a -> WidgetDragDropCallback -> m SignalHandlerId
afterWidgetDragDrop obj :: a
obj cb :: WidgetDragDropCallback
cb = IO SignalHandlerId -> m SignalHandlerId
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO SignalHandlerId -> m SignalHandlerId)
-> IO SignalHandlerId -> m SignalHandlerId
forall a b. (a -> b) -> a -> b
$ do
    let cb' :: C_WidgetDragDropCallback
cb' = WidgetDragDropCallback -> C_WidgetDragDropCallback
wrap_WidgetDragDropCallback WidgetDragDropCallback
cb
    FunPtr C_WidgetDragDropCallback
cb'' <- C_WidgetDragDropCallback -> IO (FunPtr C_WidgetDragDropCallback)
mk_WidgetDragDropCallback C_WidgetDragDropCallback
cb'
    a
-> Text
-> FunPtr C_WidgetDragDropCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj "drag-drop" FunPtr C_WidgetDragDropCallback
cb'' SignalConnectMode
SignalConnectAfter Maybe Text
forall a. Maybe a
Nothing


#if defined(ENABLE_OVERLOADING)
data WidgetDragDropSignalInfo
instance SignalInfo WidgetDragDropSignalInfo where
    type HaskellCallbackType WidgetDragDropSignalInfo = WidgetDragDropCallback
    connectSignal obj cb connectMode detail = do
        let cb' = wrap_WidgetDragDropCallback cb
        cb'' <- mk_WidgetDragDropCallback cb'
        connectSignalFunPtr obj "drag-drop" cb'' connectMode detail

#endif

-- signal Widget::drag-end
-- | The [dragEnd](#signal:dragEnd) 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 [dragBegin]("GI.Gtk.Objects.Widget#signal:dragBegin").
type WidgetDragEndCallback =
    Gdk.Drag.Drag
    -- ^ /@context@/: the drag context
    -> IO ()

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

-- | Type for the callback on the (unwrapped) C side.
type C_WidgetDragEndCallback =
    Ptr () ->                               -- object
    Ptr Gdk.Drag.Drag ->
    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 `GClosure`.
genClosure_WidgetDragEnd :: MonadIO m => WidgetDragEndCallback -> m (GClosure C_WidgetDragEndCallback)
genClosure_WidgetDragEnd :: WidgetDragBeginCallback -> m (GClosure C_WidgetDragBeginCallback)
genClosure_WidgetDragEnd cb :: WidgetDragBeginCallback
cb = IO (GClosure C_WidgetDragBeginCallback)
-> m (GClosure C_WidgetDragBeginCallback)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (GClosure C_WidgetDragBeginCallback)
 -> m (GClosure C_WidgetDragBeginCallback))
-> IO (GClosure C_WidgetDragBeginCallback)
-> m (GClosure C_WidgetDragBeginCallback)
forall a b. (a -> b) -> a -> b
$ do
    let cb' :: C_WidgetDragBeginCallback
cb' = WidgetDragBeginCallback -> C_WidgetDragBeginCallback
wrap_WidgetDragEndCallback WidgetDragBeginCallback
cb
    C_WidgetDragBeginCallback -> IO (FunPtr C_WidgetDragBeginCallback)
mk_WidgetDragEndCallback C_WidgetDragBeginCallback
cb' IO (FunPtr C_WidgetDragBeginCallback)
-> (FunPtr C_WidgetDragBeginCallback
    -> IO (GClosure C_WidgetDragBeginCallback))
-> IO (GClosure C_WidgetDragBeginCallback)
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= FunPtr C_WidgetDragBeginCallback
-> IO (GClosure C_WidgetDragBeginCallback)
forall (m :: * -> *) a. MonadIO m => FunPtr a -> m (GClosure a)
B.GClosure.newGClosure


-- | Wrap a `WidgetDragEndCallback` into a `C_WidgetDragEndCallback`.
wrap_WidgetDragEndCallback ::
    WidgetDragEndCallback ->
    C_WidgetDragEndCallback
wrap_WidgetDragEndCallback :: WidgetDragBeginCallback -> C_WidgetDragBeginCallback
wrap_WidgetDragEndCallback _cb :: WidgetDragBeginCallback
_cb _ context :: Ptr Drag
context _ = do
    Drag
context' <- ((ManagedPtr Drag -> Drag) -> Ptr Drag -> IO Drag
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr Drag -> Drag
Gdk.Drag.Drag) Ptr Drag
context
    WidgetDragBeginCallback
_cb  Drag
context'


-- | Connect a signal handler for the [dragEnd](#signal:dragEnd) 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 :: a -> WidgetDragBeginCallback -> m SignalHandlerId
onWidgetDragEnd obj :: a
obj cb :: WidgetDragBeginCallback
cb = IO SignalHandlerId -> m SignalHandlerId
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO SignalHandlerId -> m SignalHandlerId)
-> IO SignalHandlerId -> m SignalHandlerId
forall a b. (a -> b) -> a -> b
$ do
    let cb' :: C_WidgetDragBeginCallback
cb' = WidgetDragBeginCallback -> C_WidgetDragBeginCallback
wrap_WidgetDragEndCallback WidgetDragBeginCallback
cb
    FunPtr C_WidgetDragBeginCallback
cb'' <- C_WidgetDragBeginCallback -> IO (FunPtr C_WidgetDragBeginCallback)
mk_WidgetDragEndCallback C_WidgetDragBeginCallback
cb'
    a
-> Text
-> FunPtr C_WidgetDragBeginCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj "drag-end" FunPtr C_WidgetDragBeginCallback
cb'' SignalConnectMode
SignalConnectBefore Maybe Text
forall a. Maybe a
Nothing

-- | Connect a signal handler for the [dragEnd](#signal:dragEnd) 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 :: a -> WidgetDragBeginCallback -> m SignalHandlerId
afterWidgetDragEnd obj :: a
obj cb :: WidgetDragBeginCallback
cb = IO SignalHandlerId -> m SignalHandlerId
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO SignalHandlerId -> m SignalHandlerId)
-> IO SignalHandlerId -> m SignalHandlerId
forall a b. (a -> b) -> a -> b
$ do
    let cb' :: C_WidgetDragBeginCallback
cb' = WidgetDragBeginCallback -> C_WidgetDragBeginCallback
wrap_WidgetDragEndCallback WidgetDragBeginCallback
cb
    FunPtr C_WidgetDragBeginCallback
cb'' <- C_WidgetDragBeginCallback -> IO (FunPtr C_WidgetDragBeginCallback)
mk_WidgetDragEndCallback C_WidgetDragBeginCallback
cb'
    a
-> Text
-> FunPtr C_WidgetDragBeginCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj "drag-end" FunPtr C_WidgetDragBeginCallback
cb'' SignalConnectMode
SignalConnectAfter Maybe Text
forall a. Maybe a
Nothing


#if defined(ENABLE_OVERLOADING)
data WidgetDragEndSignalInfo
instance SignalInfo WidgetDragEndSignalInfo where
    type HaskellCallbackType WidgetDragEndSignalInfo = WidgetDragEndCallback
    connectSignal obj cb connectMode detail = do
        let cb' = wrap_WidgetDragEndCallback cb
        cb'' <- mk_WidgetDragEndCallback cb'
        connectSignalFunPtr obj "drag-end" cb'' connectMode detail

#endif

-- signal Widget::drag-failed
-- | The [dragFailed](#signal:dragFailed) 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 'P.True' is the failure has
-- been already handled (not showing the default \"drag operation failed\"
-- animation), otherwise it returns 'P.False'.
type WidgetDragFailedCallback =
    Gdk.Drag.Drag
    -- ^ /@context@/: the drag context
    -> Gtk.Enums.DragResult
    -- ^ /@result@/: the result of the drag operation
    -> IO Bool
    -- ^ __Returns:__ 'P.True' if the failed drag operation has been already handled.

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

-- | Type for the callback on the (unwrapped) C side.
type C_WidgetDragFailedCallback =
    Ptr () ->                               -- object
    Ptr Gdk.Drag.Drag ->
    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 `GClosure`.
genClosure_WidgetDragFailed :: MonadIO m => WidgetDragFailedCallback -> m (GClosure C_WidgetDragFailedCallback)
genClosure_WidgetDragFailed :: WidgetDragFailedCallback -> m (GClosure C_WidgetDragFailedCallback)
genClosure_WidgetDragFailed cb :: WidgetDragFailedCallback
cb = IO (GClosure C_WidgetDragFailedCallback)
-> m (GClosure C_WidgetDragFailedCallback)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (GClosure C_WidgetDragFailedCallback)
 -> m (GClosure C_WidgetDragFailedCallback))
-> IO (GClosure C_WidgetDragFailedCallback)
-> m (GClosure C_WidgetDragFailedCallback)
forall a b. (a -> b) -> a -> b
$ do
    let cb' :: C_WidgetDragFailedCallback
cb' = WidgetDragFailedCallback -> C_WidgetDragFailedCallback
wrap_WidgetDragFailedCallback WidgetDragFailedCallback
cb
    C_WidgetDragFailedCallback
-> IO (FunPtr C_WidgetDragFailedCallback)
mk_WidgetDragFailedCallback C_WidgetDragFailedCallback
cb' IO (FunPtr C_WidgetDragFailedCallback)
-> (FunPtr C_WidgetDragFailedCallback
    -> IO (GClosure C_WidgetDragFailedCallback))
-> IO (GClosure C_WidgetDragFailedCallback)
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= FunPtr C_WidgetDragFailedCallback
-> IO (GClosure C_WidgetDragFailedCallback)
forall (m :: * -> *) a. MonadIO m => FunPtr a -> m (GClosure a)
B.GClosure.newGClosure


-- | Wrap a `WidgetDragFailedCallback` into a `C_WidgetDragFailedCallback`.
wrap_WidgetDragFailedCallback ::
    WidgetDragFailedCallback ->
    C_WidgetDragFailedCallback
wrap_WidgetDragFailedCallback :: WidgetDragFailedCallback -> C_WidgetDragFailedCallback
wrap_WidgetDragFailedCallback _cb :: WidgetDragFailedCallback
_cb _ context :: Ptr Drag
context result_ :: CUInt
result_ _ = do
    Drag
context' <- ((ManagedPtr Drag -> Drag) -> Ptr Drag -> IO Drag
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr Drag -> Drag
Gdk.Drag.Drag) Ptr Drag
context
    let result_' :: DragResult
result_' = (Int -> DragResult
forall a. Enum a => Int -> a
toEnum (Int -> DragResult) -> (CUInt -> Int) -> CUInt -> DragResult
forall b c a. (b -> c) -> (a -> b) -> a -> c
. CUInt -> Int
forall a b. (Integral a, Num b) => a -> b
fromIntegral) CUInt
result_
    Bool
result <- WidgetDragFailedCallback
_cb  Drag
context' DragResult
result_'
    let result' :: CInt
result' = (Int -> CInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CInt) -> (Bool -> Int) -> Bool -> CInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Bool -> Int
forall a. Enum a => a -> Int
fromEnum) Bool
result
    CInt -> IO CInt
forall (m :: * -> *) a. Monad m => a -> m a
return CInt
result'


-- | Connect a signal handler for the [dragFailed](#signal:dragFailed) 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 :: a -> WidgetDragFailedCallback -> m SignalHandlerId
onWidgetDragFailed obj :: a
obj cb :: WidgetDragFailedCallback
cb = IO SignalHandlerId -> m SignalHandlerId
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO SignalHandlerId -> m SignalHandlerId)
-> IO SignalHandlerId -> m SignalHandlerId
forall a b. (a -> b) -> a -> b
$ do
    let cb' :: C_WidgetDragFailedCallback
cb' = WidgetDragFailedCallback -> C_WidgetDragFailedCallback
wrap_WidgetDragFailedCallback WidgetDragFailedCallback
cb
    FunPtr C_WidgetDragFailedCallback
cb'' <- C_WidgetDragFailedCallback
-> IO (FunPtr C_WidgetDragFailedCallback)
mk_WidgetDragFailedCallback C_WidgetDragFailedCallback
cb'
    a
-> Text
-> FunPtr C_WidgetDragFailedCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj "drag-failed" FunPtr C_WidgetDragFailedCallback
cb'' SignalConnectMode
SignalConnectBefore Maybe Text
forall a. Maybe a
Nothing

-- | Connect a signal handler for the [dragFailed](#signal:dragFailed) 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 :: a -> WidgetDragFailedCallback -> m SignalHandlerId
afterWidgetDragFailed obj :: a
obj cb :: WidgetDragFailedCallback
cb = IO SignalHandlerId -> m SignalHandlerId
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO SignalHandlerId -> m SignalHandlerId)
-> IO SignalHandlerId -> m SignalHandlerId
forall a b. (a -> b) -> a -> b
$ do
    let cb' :: C_WidgetDragFailedCallback
cb' = WidgetDragFailedCallback -> C_WidgetDragFailedCallback
wrap_WidgetDragFailedCallback WidgetDragFailedCallback
cb
    FunPtr C_WidgetDragFailedCallback
cb'' <- C_WidgetDragFailedCallback
-> IO (FunPtr C_WidgetDragFailedCallback)
mk_WidgetDragFailedCallback C_WidgetDragFailedCallback
cb'
    a
-> Text
-> FunPtr C_WidgetDragFailedCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj "drag-failed" FunPtr C_WidgetDragFailedCallback
cb'' SignalConnectMode
SignalConnectAfter Maybe Text
forall a. Maybe a
Nothing


#if defined(ENABLE_OVERLOADING)
data WidgetDragFailedSignalInfo
instance SignalInfo WidgetDragFailedSignalInfo where
    type HaskellCallbackType WidgetDragFailedSignalInfo = WidgetDragFailedCallback
    connectSignal obj cb connectMode detail = do
        let cb' = wrap_WidgetDragFailedCallback cb
        cb'' <- mk_WidgetDragFailedCallback cb'
        connectSignalFunPtr obj "drag-failed" cb'' connectMode detail

#endif

-- signal Widget::drag-leave
-- | The [dragLeave](#signal:dragLeave) 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 [dragMotion]("GI.Gtk.Objects.Widget#signal:dragMotion"), e.g. undo highlighting
-- with 'GI.Gtk.Objects.Widget.widgetDragUnhighlight'.
-- 
-- 
-- Likewise, the [dragLeave]("GI.Gtk.Objects.Widget#signal:dragLeave") signal is also emitted before the
-- [dragDrop](#signal:dragDrop) signal, for instance to allow cleaning up of a preview item
-- created in the [dragMotion]("GI.Gtk.Objects.Widget#signal:dragMotion") signal handler.
type WidgetDragLeaveCallback =
    Gdk.Drop.Drop
    -- ^ /@context@/: the drag context
    -> IO ()

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

-- | Type for the callback on the (unwrapped) C side.
type C_WidgetDragLeaveCallback =
    Ptr () ->                               -- object
    Ptr Gdk.Drop.Drop ->
    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 `GClosure`.
genClosure_WidgetDragLeave :: MonadIO m => WidgetDragLeaveCallback -> m (GClosure C_WidgetDragLeaveCallback)
genClosure_WidgetDragLeave :: WidgetDragLeaveCallback -> m (GClosure C_WidgetDragLeaveCallback)
genClosure_WidgetDragLeave cb :: WidgetDragLeaveCallback
cb = IO (GClosure C_WidgetDragLeaveCallback)
-> m (GClosure C_WidgetDragLeaveCallback)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (GClosure C_WidgetDragLeaveCallback)
 -> m (GClosure C_WidgetDragLeaveCallback))
-> IO (GClosure C_WidgetDragLeaveCallback)
-> m (GClosure C_WidgetDragLeaveCallback)
forall a b. (a -> b) -> a -> b
$ do
    let cb' :: C_WidgetDragLeaveCallback
cb' = WidgetDragLeaveCallback -> C_WidgetDragLeaveCallback
wrap_WidgetDragLeaveCallback WidgetDragLeaveCallback
cb
    C_WidgetDragLeaveCallback -> IO (FunPtr C_WidgetDragLeaveCallback)
mk_WidgetDragLeaveCallback C_WidgetDragLeaveCallback
cb' IO (FunPtr C_WidgetDragLeaveCallback)
-> (FunPtr C_WidgetDragLeaveCallback
    -> IO (GClosure C_WidgetDragLeaveCallback))
-> IO (GClosure C_WidgetDragLeaveCallback)
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= FunPtr C_WidgetDragLeaveCallback
-> IO (GClosure C_WidgetDragLeaveCallback)
forall (m :: * -> *) a. MonadIO m => FunPtr a -> m (GClosure a)
B.GClosure.newGClosure


-- | Wrap a `WidgetDragLeaveCallback` into a `C_WidgetDragLeaveCallback`.
wrap_WidgetDragLeaveCallback ::
    WidgetDragLeaveCallback ->
    C_WidgetDragLeaveCallback
wrap_WidgetDragLeaveCallback :: WidgetDragLeaveCallback -> C_WidgetDragLeaveCallback
wrap_WidgetDragLeaveCallback _cb :: WidgetDragLeaveCallback
_cb _ context :: Ptr Drop
context _ = do
    Drop
context' <- ((ManagedPtr Drop -> Drop) -> Ptr Drop -> IO Drop
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr Drop -> Drop
Gdk.Drop.Drop) Ptr Drop
context
    WidgetDragLeaveCallback
_cb  Drop
context'


-- | Connect a signal handler for the [dragLeave](#signal:dragLeave) 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 :: a -> WidgetDragLeaveCallback -> m SignalHandlerId
onWidgetDragLeave obj :: a
obj cb :: WidgetDragLeaveCallback
cb = IO SignalHandlerId -> m SignalHandlerId
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO SignalHandlerId -> m SignalHandlerId)
-> IO SignalHandlerId -> m SignalHandlerId
forall a b. (a -> b) -> a -> b
$ do
    let cb' :: C_WidgetDragLeaveCallback
cb' = WidgetDragLeaveCallback -> C_WidgetDragLeaveCallback
wrap_WidgetDragLeaveCallback WidgetDragLeaveCallback
cb
    FunPtr C_WidgetDragLeaveCallback
cb'' <- C_WidgetDragLeaveCallback -> IO (FunPtr C_WidgetDragLeaveCallback)
mk_WidgetDragLeaveCallback C_WidgetDragLeaveCallback
cb'
    a
-> Text
-> FunPtr C_WidgetDragLeaveCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj "drag-leave" FunPtr C_WidgetDragLeaveCallback
cb'' SignalConnectMode
SignalConnectBefore Maybe Text
forall a. Maybe a
Nothing

-- | Connect a signal handler for the [dragLeave](#signal:dragLeave) 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 :: a -> WidgetDragLeaveCallback -> m SignalHandlerId
afterWidgetDragLeave obj :: a
obj cb :: WidgetDragLeaveCallback
cb = IO SignalHandlerId -> m SignalHandlerId
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO SignalHandlerId -> m SignalHandlerId)
-> IO SignalHandlerId -> m SignalHandlerId
forall a b. (a -> b) -> a -> b
$ do
    let cb' :: C_WidgetDragLeaveCallback
cb' = WidgetDragLeaveCallback -> C_WidgetDragLeaveCallback
wrap_WidgetDragLeaveCallback WidgetDragLeaveCallback
cb
    FunPtr C_WidgetDragLeaveCallback
cb'' <- C_WidgetDragLeaveCallback -> IO (FunPtr C_WidgetDragLeaveCallback)
mk_WidgetDragLeaveCallback C_WidgetDragLeaveCallback
cb'
    a
-> Text
-> FunPtr C_WidgetDragLeaveCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj "drag-leave" FunPtr C_WidgetDragLeaveCallback
cb'' SignalConnectMode
SignalConnectAfter Maybe Text
forall a. Maybe a
Nothing


#if defined(ENABLE_OVERLOADING)
data WidgetDragLeaveSignalInfo
instance SignalInfo WidgetDragLeaveSignalInfo where
    type HaskellCallbackType WidgetDragLeaveSignalInfo = WidgetDragLeaveCallback
    connectSignal obj cb connectMode detail = do
        let cb' = wrap_WidgetDragLeaveCallback cb
        cb'' <- mk_WidgetDragLeaveCallback cb'
        connectSignalFunPtr obj "drag-leave" cb'' connectMode detail

#endif

-- signal Widget::drag-motion
-- | The [dragMotion](#signal:dragMotion) 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 'P.False' and no further processing
-- is necessary. Otherwise, the handler returns 'P.True'. In this case, the
-- handler is responsible for providing the necessary information for
-- displaying feedback to the user, by calling @/gdk_drag_status()/@.
-- 
-- 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 @/gdk_drag_status()/@ call to the [dragDataReceived]("GI.Gtk.Objects.Widget#signal:dragDataReceived")
-- 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 [dragLeave]("GI.Gtk.Objects.Widget#signal:dragLeave") 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,
-- >             GdkDrop   *drop,
-- >             gint       x,
-- >             gint       y,
-- >{
-- >  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, drop, NULL);
-- >  if (target == NULL)
-- >    gdk_drop_status (drop, 0);
-- >  else
-- >   {
-- >     private_data->pending_status
-- >        = gdk_drop_get_actions (drop);
-- >     gtk_drag_get_data (widget, drop, target);
-- >   }
-- >
-- >  return TRUE;
-- >}
-- >
-- >static void
-- >drag_data_received (GtkWidget        *widget,
-- >                    GdkDrop          *drop,
-- >                    GtkSelectionData *selection_data)
-- >{
-- >  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_drop_status (drop, 0);
-- >     else
-- >       gdk_drag_status (drop, GDK_ACTION_ALL);
-- >   }
-- >  else
-- >   {
-- >     // accept the drop
-- >   }
-- >}
type WidgetDragMotionCallback =
    Gdk.Drop.Drop
    -- ^ /@drop@/: the t'GI.Gdk.Objects.Drop.Drop'
    -> Int32
    -- ^ /@x@/: the x coordinate of the current cursor position
    -> Int32
    -- ^ /@y@/: the y coordinate of the current cursor position
    -> IO Bool
    -- ^ __Returns:__ whether the cursor position is in a drop zone

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

-- | Type for the callback on the (unwrapped) C side.
type C_WidgetDragMotionCallback =
    Ptr () ->                               -- object
    Ptr Gdk.Drop.Drop ->
    Int32 ->
    Int32 ->
    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 `GClosure`.
genClosure_WidgetDragMotion :: MonadIO m => WidgetDragMotionCallback -> m (GClosure C_WidgetDragMotionCallback)
genClosure_WidgetDragMotion :: WidgetDragDropCallback -> m (GClosure C_WidgetDragDropCallback)
genClosure_WidgetDragMotion cb :: WidgetDragDropCallback
cb = IO (GClosure C_WidgetDragDropCallback)
-> m (GClosure C_WidgetDragDropCallback)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (GClosure C_WidgetDragDropCallback)
 -> m (GClosure C_WidgetDragDropCallback))
-> IO (GClosure C_WidgetDragDropCallback)
-> m (GClosure C_WidgetDragDropCallback)
forall a b. (a -> b) -> a -> b
$ do
    let cb' :: C_WidgetDragDropCallback
cb' = WidgetDragDropCallback -> C_WidgetDragDropCallback
wrap_WidgetDragMotionCallback WidgetDragDropCallback
cb
    C_WidgetDragDropCallback -> IO (FunPtr C_WidgetDragDropCallback)
mk_WidgetDragMotionCallback C_WidgetDragDropCallback
cb' IO (FunPtr C_WidgetDragDropCallback)
-> (FunPtr C_WidgetDragDropCallback
    -> IO (GClosure C_WidgetDragDropCallback))
-> IO (GClosure C_WidgetDragDropCallback)
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= FunPtr C_WidgetDragDropCallback
-> IO (GClosure C_WidgetDragDropCallback)
forall (m :: * -> *) a. MonadIO m => FunPtr a -> m (GClosure a)
B.GClosure.newGClosure


-- | Wrap a `WidgetDragMotionCallback` into a `C_WidgetDragMotionCallback`.
wrap_WidgetDragMotionCallback ::
    WidgetDragMotionCallback ->
    C_WidgetDragMotionCallback
wrap_WidgetDragMotionCallback :: WidgetDragDropCallback -> C_WidgetDragDropCallback
wrap_WidgetDragMotionCallback _cb :: WidgetDragDropCallback
_cb _ drop :: Ptr Drop
drop x :: Int32
x y :: Int32
y _ = do
    Drop
drop' <- ((ManagedPtr Drop -> Drop) -> Ptr Drop -> IO Drop
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr Drop -> Drop
Gdk.Drop.Drop) Ptr Drop
drop
    Bool
result <- WidgetDragDropCallback
_cb  Drop
drop' Int32
x Int32
y
    let result' :: CInt
result' = (Int -> CInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CInt) -> (Bool -> Int) -> Bool -> CInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Bool -> Int
forall a. Enum a => a -> Int
fromEnum) Bool
result
    CInt -> IO CInt
forall (m :: * -> *) a. Monad m => a -> m a
return CInt
result'


-- | Connect a signal handler for the [dragMotion](#signal:dragMotion) 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 :: a -> WidgetDragDropCallback -> m SignalHandlerId
onWidgetDragMotion obj :: a
obj cb :: WidgetDragDropCallback
cb = IO SignalHandlerId -> m SignalHandlerId
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO SignalHandlerId -> m SignalHandlerId)
-> IO SignalHandlerId -> m SignalHandlerId
forall a b. (a -> b) -> a -> b
$ do
    let cb' :: C_WidgetDragDropCallback
cb' = WidgetDragDropCallback -> C_WidgetDragDropCallback
wrap_WidgetDragMotionCallback WidgetDragDropCallback
cb
    FunPtr C_WidgetDragDropCallback
cb'' <- C_WidgetDragDropCallback -> IO (FunPtr C_WidgetDragDropCallback)
mk_WidgetDragMotionCallback C_WidgetDragDropCallback
cb'
    a
-> Text
-> FunPtr C_WidgetDragDropCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj "drag-motion" FunPtr C_WidgetDragDropCallback
cb'' SignalConnectMode
SignalConnectBefore Maybe Text
forall a. Maybe a
Nothing

-- | Connect a signal handler for the [dragMotion](#signal:dragMotion) 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 :: a -> WidgetDragDropCallback -> m SignalHandlerId
afterWidgetDragMotion obj :: a
obj cb :: WidgetDragDropCallback
cb = IO SignalHandlerId -> m SignalHandlerId
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO SignalHandlerId -> m SignalHandlerId)
-> IO SignalHandlerId -> m SignalHandlerId
forall a b. (a -> b) -> a -> b
$ do
    let cb' :: C_WidgetDragDropCallback
cb' = WidgetDragDropCallback -> C_WidgetDragDropCallback
wrap_WidgetDragMotionCallback WidgetDragDropCallback
cb
    FunPtr C_WidgetDragDropCallback
cb'' <- C_WidgetDragDropCallback -> IO (FunPtr C_WidgetDragDropCallback)
mk_WidgetDragMotionCallback C_WidgetDragDropCallback
cb'
    a
-> Text
-> FunPtr C_WidgetDragDropCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj "drag-motion" FunPtr C_WidgetDragDropCallback
cb'' SignalConnectMode
SignalConnectAfter Maybe Text
forall a. Maybe a
Nothing


#if defined(ENABLE_OVERLOADING)
data WidgetDragMotionSignalInfo
instance SignalInfo WidgetDragMotionSignalInfo where
    type HaskellCallbackType WidgetDragMotionSignalInfo = WidgetDragMotionCallback
    connectSignal obj cb connectMode detail = do
        let cb' = wrap_WidgetDragMotionCallback cb
        cb'' <- mk_WidgetDragMotionCallback cb'
        connectSignalFunPtr obj "drag-motion" cb'' connectMode detail

#endif

-- signal Widget::grab-notify
-- | The [grabNotify](#signal:grabNotify) signal is emitted when a widget becomes
-- shadowed by a GTK+ grab (not a pointer or keyboard grab) on
-- another widget, or when it becomes unshadowed due to a grab
-- being removed.
-- 
-- A widget is shadowed by a 'GI.Gtk.Objects.Widget.widgetGrabAdd' when the topmost
-- grab widget in the grab stack of its window group is not
-- its ancestor.
type WidgetGrabNotifyCallback =
    Bool
    -- ^ /@wasGrabbed@/: 'P.False' if the widget becomes shadowed, 'P.True'
    --               if it becomes unshadowed
    -> IO ()

-- | A convenience synonym for @`Nothing` :: `Maybe` `WidgetGrabNotifyCallback`@.
noWidgetGrabNotifyCallback :: Maybe WidgetGrabNotifyCallback
noWidgetGrabNotifyCallback :: Maybe WidgetGrabNotifyCallback
noWidgetGrabNotifyCallback = Maybe WidgetGrabNotifyCallback
forall a. Maybe a
Nothing

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

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

-- | Wrap the callback into a `GClosure`.
genClosure_WidgetGrabNotify :: MonadIO m => WidgetGrabNotifyCallback -> m (GClosure C_WidgetGrabNotifyCallback)
genClosure_WidgetGrabNotify :: WidgetGrabNotifyCallback -> m (GClosure C_WidgetGrabNotifyCallback)
genClosure_WidgetGrabNotify cb :: WidgetGrabNotifyCallback
cb = IO (GClosure C_WidgetGrabNotifyCallback)
-> m (GClosure C_WidgetGrabNotifyCallback)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (GClosure C_WidgetGrabNotifyCallback)
 -> m (GClosure C_WidgetGrabNotifyCallback))
-> IO (GClosure C_WidgetGrabNotifyCallback)
-> m (GClosure C_WidgetGrabNotifyCallback)
forall a b. (a -> b) -> a -> b
$ do
    let cb' :: C_WidgetGrabNotifyCallback
cb' = WidgetGrabNotifyCallback -> C_WidgetGrabNotifyCallback
wrap_WidgetGrabNotifyCallback WidgetGrabNotifyCallback
cb
    C_WidgetGrabNotifyCallback
-> IO (FunPtr C_WidgetGrabNotifyCallback)
mk_WidgetGrabNotifyCallback C_WidgetGrabNotifyCallback
cb' IO (FunPtr C_WidgetGrabNotifyCallback)
-> (FunPtr C_WidgetGrabNotifyCallback
    -> IO (GClosure C_WidgetGrabNotifyCallback))
-> IO (GClosure C_WidgetGrabNotifyCallback)
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= FunPtr C_WidgetGrabNotifyCallback
-> IO (GClosure C_WidgetGrabNotifyCallback)
forall (m :: * -> *) a. MonadIO m => FunPtr a -> m (GClosure a)
B.GClosure.newGClosure


-- | Wrap a `WidgetGrabNotifyCallback` into a `C_WidgetGrabNotifyCallback`.
wrap_WidgetGrabNotifyCallback ::
    WidgetGrabNotifyCallback ->
    C_WidgetGrabNotifyCallback
wrap_WidgetGrabNotifyCallback :: WidgetGrabNotifyCallback -> C_WidgetGrabNotifyCallback
wrap_WidgetGrabNotifyCallback _cb :: WidgetGrabNotifyCallback
_cb _ wasGrabbed :: CInt
wasGrabbed _ = do
    let wasGrabbed' :: Bool
wasGrabbed' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= 0) CInt
wasGrabbed
    WidgetGrabNotifyCallback
_cb  Bool
wasGrabbed'


-- | Connect a signal handler for the [grabNotify](#signal:grabNotify) 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 #grabNotify callback
-- @
-- 
-- 
onWidgetGrabNotify :: (IsWidget a, MonadIO m) => a -> WidgetGrabNotifyCallback -> m SignalHandlerId
onWidgetGrabNotify :: a -> WidgetGrabNotifyCallback -> m SignalHandlerId
onWidgetGrabNotify obj :: a
obj cb :: WidgetGrabNotifyCallback
cb = IO SignalHandlerId -> m SignalHandlerId
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO SignalHandlerId -> m SignalHandlerId)
-> IO SignalHandlerId -> m SignalHandlerId
forall a b. (a -> b) -> a -> b
$ do
    let cb' :: C_WidgetGrabNotifyCallback
cb' = WidgetGrabNotifyCallback -> C_WidgetGrabNotifyCallback
wrap_WidgetGrabNotifyCallback WidgetGrabNotifyCallback
cb
    FunPtr C_WidgetGrabNotifyCallback
cb'' <- C_WidgetGrabNotifyCallback
-> IO (FunPtr C_WidgetGrabNotifyCallback)
mk_WidgetGrabNotifyCallback C_WidgetGrabNotifyCallback
cb'
    a
-> Text
-> FunPtr C_WidgetGrabNotifyCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj "grab-notify" FunPtr C_WidgetGrabNotifyCallback
cb'' SignalConnectMode
SignalConnectBefore Maybe Text
forall a. Maybe a
Nothing

-- | Connect a signal handler for the [grabNotify](#signal:grabNotify) 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 #grabNotify callback
-- @
-- 
-- 
afterWidgetGrabNotify :: (IsWidget a, MonadIO m) => a -> WidgetGrabNotifyCallback -> m SignalHandlerId
afterWidgetGrabNotify :: a -> WidgetGrabNotifyCallback -> m SignalHandlerId
afterWidgetGrabNotify obj :: a
obj cb :: WidgetGrabNotifyCallback
cb = IO SignalHandlerId -> m SignalHandlerId
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO SignalHandlerId -> m SignalHandlerId)
-> IO SignalHandlerId -> m SignalHandlerId
forall a b. (a -> b) -> a -> b
$ do
    let cb' :: C_WidgetGrabNotifyCallback
cb' = WidgetGrabNotifyCallback -> C_WidgetGrabNotifyCallback
wrap_WidgetGrabNotifyCallback WidgetGrabNotifyCallback
cb
    FunPtr C_WidgetGrabNotifyCallback
cb'' <- C_WidgetGrabNotifyCallback
-> IO (FunPtr C_WidgetGrabNotifyCallback)
mk_WidgetGrabNotifyCallback C_WidgetGrabNotifyCallback
cb'
    a
-> Text
-> FunPtr C_WidgetGrabNotifyCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj "grab-notify" FunPtr C_WidgetGrabNotifyCallback
cb'' SignalConnectMode
SignalConnectAfter Maybe Text
forall a. Maybe a
Nothing


#if defined(ENABLE_OVERLOADING)
data WidgetGrabNotifySignalInfo
instance SignalInfo WidgetGrabNotifySignalInfo where
    type HaskellCallbackType WidgetGrabNotifySignalInfo = WidgetGrabNotifyCallback
    connectSignal obj cb connectMode detail = do
        let cb' = wrap_WidgetGrabNotifyCallback cb
        cb'' <- mk_WidgetGrabNotifyCallback cb'
        connectSignalFunPtr obj "grab-notify" cb'' connectMode detail

#endif

-- signal Widget::hide
-- | The [hide](#signal:hide) signal is emitted when /@widget@/ is hidden, for example with
-- 'GI.Gtk.Objects.Widget.widgetHide'.
type WidgetHideCallback =
    IO ()

-- | A convenience synonym for @`Nothing` :: `Maybe` `WidgetHideCallback`@.
noWidgetHideCallback :: Maybe WidgetHideCallback
noWidgetHideCallback :: Maybe (IO ())
noWidgetHideCallback = Maybe (IO ())
forall a. Maybe a
Nothing

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

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

-- | Wrap the callback into a `GClosure`.
genClosure_WidgetHide :: MonadIO m => WidgetHideCallback -> m (GClosure C_WidgetHideCallback)
genClosure_WidgetHide :: IO () -> m (GClosure C_WidgetAccelClosuresChangedCallback)
genClosure_WidgetHide cb :: IO ()
cb = IO (GClosure C_WidgetAccelClosuresChangedCallback)
-> m (GClosure C_WidgetAccelClosuresChangedCallback)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (GClosure C_WidgetAccelClosuresChangedCallback)
 -> m (GClosure C_WidgetAccelClosuresChangedCallback))
-> IO (GClosure C_WidgetAccelClosuresChangedCallback)
-> m (GClosure C_WidgetAccelClosuresChangedCallback)
forall a b. (a -> b) -> a -> b
$ do
    let cb' :: C_WidgetAccelClosuresChangedCallback
cb' = IO () -> C_WidgetAccelClosuresChangedCallback
wrap_WidgetHideCallback IO ()
cb
    C_WidgetAccelClosuresChangedCallback
-> IO (FunPtr C_WidgetAccelClosuresChangedCallback)
mk_WidgetHideCallback C_WidgetAccelClosuresChangedCallback
cb' IO (FunPtr C_WidgetAccelClosuresChangedCallback)
-> (FunPtr C_WidgetAccelClosuresChangedCallback
    -> IO (GClosure C_WidgetAccelClosuresChangedCallback))
-> IO (GClosure C_WidgetAccelClosuresChangedCallback)
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= FunPtr C_WidgetAccelClosuresChangedCallback
-> IO (GClosure C_WidgetAccelClosuresChangedCallback)
forall (m :: * -> *) a. MonadIO m => FunPtr a -> m (GClosure a)
B.GClosure.newGClosure


-- | Wrap a `WidgetHideCallback` into a `C_WidgetHideCallback`.
wrap_WidgetHideCallback ::
    WidgetHideCallback ->
    C_WidgetHideCallback
wrap_WidgetHideCallback :: IO () -> C_WidgetAccelClosuresChangedCallback
wrap_WidgetHideCallback _cb :: IO ()
_cb _ _ = do
    IO ()
_cb 


-- | Connect a signal handler for the [hide](#signal:hide) 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 #hide callback
-- @
-- 
-- 
onWidgetHide :: (IsWidget a, MonadIO m) => a -> WidgetHideCallback -> m SignalHandlerId
onWidgetHide :: a -> IO () -> m SignalHandlerId
onWidgetHide obj :: a
obj cb :: IO ()
cb = IO SignalHandlerId -> m SignalHandlerId
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO SignalHandlerId -> m SignalHandlerId)
-> IO SignalHandlerId -> m SignalHandlerId
forall a b. (a -> b) -> a -> b
$ do
    let cb' :: C_WidgetAccelClosuresChangedCallback
cb' = IO () -> C_WidgetAccelClosuresChangedCallback
wrap_WidgetHideCallback IO ()
cb
    FunPtr C_WidgetAccelClosuresChangedCallback
cb'' <- C_WidgetAccelClosuresChangedCallback
-> IO (FunPtr C_WidgetAccelClosuresChangedCallback)
mk_WidgetHideCallback C_WidgetAccelClosuresChangedCallback
cb'
    a
-> Text
-> FunPtr C_WidgetAccelClosuresChangedCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj "hide" FunPtr C_WidgetAccelClosuresChangedCallback
cb'' SignalConnectMode
SignalConnectBefore Maybe Text
forall a. Maybe a
Nothing

-- | Connect a signal handler for the [hide](#signal:hide) 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 #hide callback
-- @
-- 
-- 
afterWidgetHide :: (IsWidget a, MonadIO m) => a -> WidgetHideCallback -> m SignalHandlerId
afterWidgetHide :: a -> IO () -> m SignalHandlerId
afterWidgetHide obj :: a
obj cb :: IO ()
cb = IO SignalHandlerId -> m SignalHandlerId
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO SignalHandlerId -> m SignalHandlerId)
-> IO SignalHandlerId -> m SignalHandlerId
forall a b. (a -> b) -> a -> b
$ do
    let cb' :: C_WidgetAccelClosuresChangedCallback
cb' = IO () -> C_WidgetAccelClosuresChangedCallback
wrap_WidgetHideCallback IO ()
cb
    FunPtr C_WidgetAccelClosuresChangedCallback
cb'' <- C_WidgetAccelClosuresChangedCallback
-> IO (FunPtr C_WidgetAccelClosuresChangedCallback)
mk_WidgetHideCallback C_WidgetAccelClosuresChangedCallback
cb'
    a
-> Text
-> FunPtr C_WidgetAccelClosuresChangedCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj "hide" FunPtr C_WidgetAccelClosuresChangedCallback
cb'' SignalConnectMode
SignalConnectAfter Maybe Text
forall a. Maybe a
Nothing


#if defined(ENABLE_OVERLOADING)
data WidgetHideSignalInfo
instance SignalInfo WidgetHideSignalInfo where
    type HaskellCallbackType WidgetHideSignalInfo = WidgetHideCallback
    connectSignal obj cb connectMode detail = do
        let cb' = wrap_WidgetHideCallback cb
        cb'' <- mk_WidgetHideCallback cb'
        connectSignalFunPtr obj "hide" cb'' connectMode detail

#endif

-- signal Widget::keynav-failed
-- | Gets emitted if keyboard navigation fails.
-- See 'GI.Gtk.Objects.Widget.widgetKeynavFailed' for details.
type WidgetKeynavFailedCallback =
    Gtk.Enums.DirectionType
    -- ^ /@direction@/: the direction of movement
    -> IO Bool
    -- ^ __Returns:__ 'P.True' if stopping keyboard navigation is fine, 'P.False'
    --          if the emitting widget should try to handle the keyboard
    --          navigation attempt in its parent widget(s).

-- | A convenience synonym for @`Nothing` :: `Maybe` `WidgetKeynavFailedCallback`@.
noWidgetKeynavFailedCallback :: Maybe WidgetKeynavFailedCallback
noWidgetKeynavFailedCallback :: Maybe WidgetKeynavFailedCallback
noWidgetKeynavFailedCallback = Maybe WidgetKeynavFailedCallback
forall a. Maybe a
Nothing

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

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

-- | Wrap the callback into a `GClosure`.
genClosure_WidgetKeynavFailed :: MonadIO m => WidgetKeynavFailedCallback -> m (GClosure C_WidgetKeynavFailedCallback)
genClosure_WidgetKeynavFailed :: WidgetKeynavFailedCallback
-> m (GClosure C_WidgetKeynavFailedCallback)
genClosure_WidgetKeynavFailed cb :: WidgetKeynavFailedCallback
cb = IO (GClosure C_WidgetKeynavFailedCallback)
-> m (GClosure C_WidgetKeynavFailedCallback)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (GClosure C_WidgetKeynavFailedCallback)
 -> m (GClosure C_WidgetKeynavFailedCallback))
-> IO (GClosure C_WidgetKeynavFailedCallback)
-> m (GClosure C_WidgetKeynavFailedCallback)
forall a b. (a -> b) -> a -> b
$ do
    let cb' :: C_WidgetKeynavFailedCallback
cb' = WidgetKeynavFailedCallback -> C_WidgetKeynavFailedCallback
wrap_WidgetKeynavFailedCallback WidgetKeynavFailedCallback
cb
    C_WidgetKeynavFailedCallback
-> IO (FunPtr C_WidgetKeynavFailedCallback)
mk_WidgetKeynavFailedCallback C_WidgetKeynavFailedCallback
cb' IO (FunPtr C_WidgetKeynavFailedCallback)
-> (FunPtr C_WidgetKeynavFailedCallback
    -> IO (GClosure C_WidgetKeynavFailedCallback))
-> IO (GClosure C_WidgetKeynavFailedCallback)
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= FunPtr C_WidgetKeynavFailedCallback
-> IO (GClosure C_WidgetKeynavFailedCallback)
forall (m :: * -> *) a. MonadIO m => FunPtr a -> m (GClosure a)
B.GClosure.newGClosure


-- | Wrap a `WidgetKeynavFailedCallback` into a `C_WidgetKeynavFailedCallback`.
wrap_WidgetKeynavFailedCallback ::
    WidgetKeynavFailedCallback ->
    C_WidgetKeynavFailedCallback
wrap_WidgetKeynavFailedCallback :: WidgetKeynavFailedCallback -> C_WidgetKeynavFailedCallback
wrap_WidgetKeynavFailedCallback _cb :: WidgetKeynavFailedCallback
_cb _ direction :: CUInt
direction _ = do
    let direction' :: DirectionType
direction' = (Int -> DirectionType
forall a. Enum a => Int -> a
toEnum (Int -> DirectionType) -> (CUInt -> Int) -> CUInt -> DirectionType
forall b c a. (b -> c) -> (a -> b) -> a -> c
. CUInt -> Int
forall a b. (Integral a, Num b) => a -> b
fromIntegral) CUInt
direction
    Bool
result <- WidgetKeynavFailedCallback
_cb  DirectionType
direction'
    let result' :: CInt
result' = (Int -> CInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CInt) -> (Bool -> Int) -> Bool -> CInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Bool -> Int
forall a. Enum a => a -> Int
fromEnum) Bool
result
    CInt -> IO CInt
forall (m :: * -> *) a. Monad m => a -> m a
return CInt
result'


-- | Connect a signal handler for the [keynavFailed](#signal:keynavFailed) 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 #keynavFailed callback
-- @
-- 
-- 
onWidgetKeynavFailed :: (IsWidget a, MonadIO m) => a -> WidgetKeynavFailedCallback -> m SignalHandlerId
onWidgetKeynavFailed :: a -> WidgetKeynavFailedCallback -> m SignalHandlerId
onWidgetKeynavFailed obj :: a
obj cb :: WidgetKeynavFailedCallback
cb = IO SignalHandlerId -> m SignalHandlerId
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO SignalHandlerId -> m SignalHandlerId)
-> IO SignalHandlerId -> m SignalHandlerId
forall a b. (a -> b) -> a -> b
$ do
    let cb' :: C_WidgetKeynavFailedCallback
cb' = WidgetKeynavFailedCallback -> C_WidgetKeynavFailedCallback
wrap_WidgetKeynavFailedCallback WidgetKeynavFailedCallback
cb
    FunPtr C_WidgetKeynavFailedCallback
cb'' <- C_WidgetKeynavFailedCallback
-> IO (FunPtr C_WidgetKeynavFailedCallback)
mk_WidgetKeynavFailedCallback C_WidgetKeynavFailedCallback
cb'
    a
-> Text
-> FunPtr C_WidgetKeynavFailedCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj "keynav-failed" FunPtr C_WidgetKeynavFailedCallback
cb'' SignalConnectMode
SignalConnectBefore Maybe Text
forall a. Maybe a
Nothing

-- | Connect a signal handler for the [keynavFailed](#signal:keynavFailed) 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 #keynavFailed callback
-- @
-- 
-- 
afterWidgetKeynavFailed :: (IsWidget a, MonadIO m) => a -> WidgetKeynavFailedCallback -> m SignalHandlerId
afterWidgetKeynavFailed :: a -> WidgetKeynavFailedCallback -> m SignalHandlerId
afterWidgetKeynavFailed obj :: a
obj cb :: WidgetKeynavFailedCallback
cb = IO SignalHandlerId -> m SignalHandlerId
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO SignalHandlerId -> m SignalHandlerId)
-> IO SignalHandlerId -> m SignalHandlerId
forall a b. (a -> b) -> a -> b
$ do
    let cb' :: C_WidgetKeynavFailedCallback
cb' = WidgetKeynavFailedCallback -> C_WidgetKeynavFailedCallback
wrap_WidgetKeynavFailedCallback WidgetKeynavFailedCallback
cb
    FunPtr C_WidgetKeynavFailedCallback
cb'' <- C_WidgetKeynavFailedCallback
-> IO (FunPtr C_WidgetKeynavFailedCallback)
mk_WidgetKeynavFailedCallback C_WidgetKeynavFailedCallback
cb'
    a
-> Text
-> FunPtr C_WidgetKeynavFailedCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj "keynav-failed" FunPtr C_WidgetKeynavFailedCallback
cb'' SignalConnectMode
SignalConnectAfter Maybe Text
forall a. Maybe a
Nothing


#if defined(ENABLE_OVERLOADING)
data WidgetKeynavFailedSignalInfo
instance SignalInfo WidgetKeynavFailedSignalInfo where
    type HaskellCallbackType WidgetKeynavFailedSignalInfo = WidgetKeynavFailedCallback
    connectSignal obj cb connectMode detail = do
        let cb' = wrap_WidgetKeynavFailedCallback cb
        cb'' <- mk_WidgetKeynavFailedCallback cb'
        connectSignalFunPtr obj "keynav-failed" cb'' connectMode detail

#endif

-- signal Widget::map
-- | The [map](#signal:map) signal is emitted when /@widget@/ is going to be mapped, that is
-- when the widget is visible (which is controlled with
-- 'GI.Gtk.Objects.Widget.widgetSetVisible') and all its parents up to the toplevel widget
-- are also visible.
-- 
-- The [map](#signal:map) signal can be used to determine whether a widget will be drawn,
-- for instance it can resume an animation that was stopped during the
-- emission of [unmap]("GI.Gtk.Objects.Widget#signal:unmap").
type WidgetMapCallback =
    IO ()

-- | A convenience synonym for @`Nothing` :: `Maybe` `WidgetMapCallback`@.
noWidgetMapCallback :: Maybe WidgetMapCallback
noWidgetMapCallback :: Maybe (IO ())
noWidgetMapCallback = Maybe (IO ())
forall a. Maybe a
Nothing

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

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

-- | Wrap the callback into a `GClosure`.
genClosure_WidgetMap :: MonadIO m => WidgetMapCallback -> m (GClosure C_WidgetMapCallback)
genClosure_WidgetMap :: IO () -> m (GClosure C_WidgetAccelClosuresChangedCallback)
genClosure_WidgetMap cb :: IO ()
cb = IO (GClosure C_WidgetAccelClosuresChangedCallback)
-> m (GClosure C_WidgetAccelClosuresChangedCallback)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (GClosure C_WidgetAccelClosuresChangedCallback)
 -> m (GClosure C_WidgetAccelClosuresChangedCallback))
-> IO (GClosure C_WidgetAccelClosuresChangedCallback)
-> m (GClosure C_WidgetAccelClosuresChangedCallback)
forall a b. (a -> b) -> a -> b
$ do
    let cb' :: C_WidgetAccelClosuresChangedCallback
cb' = IO () -> C_WidgetAccelClosuresChangedCallback
wrap_WidgetMapCallback IO ()
cb
    C_WidgetAccelClosuresChangedCallback
-> IO (FunPtr C_WidgetAccelClosuresChangedCallback)
mk_WidgetMapCallback C_WidgetAccelClosuresChangedCallback
cb' IO (FunPtr C_WidgetAccelClosuresChangedCallback)
-> (FunPtr C_WidgetAccelClosuresChangedCallback
    -> IO (GClosure C_WidgetAccelClosuresChangedCallback))
-> IO (GClosure C_WidgetAccelClosuresChangedCallback)
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= FunPtr C_WidgetAccelClosuresChangedCallback
-> IO (GClosure C_WidgetAccelClosuresChangedCallback)
forall (m :: * -> *) a. MonadIO m => FunPtr a -> m (GClosure a)
B.GClosure.newGClosure


-- | Wrap a `WidgetMapCallback` into a `C_WidgetMapCallback`.
wrap_WidgetMapCallback ::
    WidgetMapCallback ->
    C_WidgetMapCallback
wrap_WidgetMapCallback :: IO () -> C_WidgetAccelClosuresChangedCallback
wrap_WidgetMapCallback _cb :: IO ()
_cb _ _ = do
    IO ()
_cb 


-- | Connect a signal handler for the [map](#signal:map) 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 #map callback
-- @
-- 
-- 
onWidgetMap :: (IsWidget a, MonadIO m) => a -> WidgetMapCallback -> m SignalHandlerId
onWidgetMap :: a -> IO () -> m SignalHandlerId
onWidgetMap obj :: a
obj cb :: IO ()
cb = IO SignalHandlerId -> m SignalHandlerId
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO SignalHandlerId -> m SignalHandlerId)
-> IO SignalHandlerId -> m SignalHandlerId
forall a b. (a -> b) -> a -> b
$ do
    let cb' :: C_WidgetAccelClosuresChangedCallback
cb' = IO () -> C_WidgetAccelClosuresChangedCallback
wrap_WidgetMapCallback IO ()
cb
    FunPtr C_WidgetAccelClosuresChangedCallback
cb'' <- C_WidgetAccelClosuresChangedCallback
-> IO (FunPtr C_WidgetAccelClosuresChangedCallback)
mk_WidgetMapCallback C_WidgetAccelClosuresChangedCallback
cb'
    a
-> Text
-> FunPtr C_WidgetAccelClosuresChangedCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj "map" FunPtr C_WidgetAccelClosuresChangedCallback
cb'' SignalConnectMode
SignalConnectBefore Maybe Text
forall a. Maybe a
Nothing

-- | Connect a signal handler for the [map](#signal:map) 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 #map callback
-- @
-- 
-- 
afterWidgetMap :: (IsWidget a, MonadIO m) => a -> WidgetMapCallback -> m SignalHandlerId
afterWidgetMap :: a -> IO () -> m SignalHandlerId
afterWidgetMap obj :: a
obj cb :: IO ()
cb = IO SignalHandlerId -> m SignalHandlerId
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO SignalHandlerId -> m SignalHandlerId)
-> IO SignalHandlerId -> m SignalHandlerId
forall a b. (a -> b) -> a -> b
$ do
    let cb' :: C_WidgetAccelClosuresChangedCallback
cb' = IO () -> C_WidgetAccelClosuresChangedCallback
wrap_WidgetMapCallback IO ()
cb
    FunPtr C_WidgetAccelClosuresChangedCallback
cb'' <- C_WidgetAccelClosuresChangedCallback
-> IO (FunPtr C_WidgetAccelClosuresChangedCallback)
mk_WidgetMapCallback C_WidgetAccelClosuresChangedCallback
cb'
    a
-> Text
-> FunPtr C_WidgetAccelClosuresChangedCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj "map" FunPtr C_WidgetAccelClosuresChangedCallback
cb'' SignalConnectMode
SignalConnectAfter Maybe Text
forall a. Maybe a
Nothing


#if defined(ENABLE_OVERLOADING)
data WidgetMapSignalInfo
instance SignalInfo WidgetMapSignalInfo where
    type HaskellCallbackType WidgetMapSignalInfo = WidgetMapCallback
    connectSignal obj cb connectMode detail = do
        let cb' = wrap_WidgetMapCallback cb
        cb'' <- mk_WidgetMapCallback cb'
        connectSignalFunPtr obj "map" cb'' connectMode detail

#endif

-- signal Widget::mnemonic-activate
-- | The default handler for this signal activates /@widget@/ if /@groupCycling@/
-- is 'P.False', or just makes /@widget@/ grab focus if /@groupCycling@/ is 'P.True'.
type WidgetMnemonicActivateCallback =
    Bool
    -- ^ /@groupCycling@/: 'P.True' if there are other widgets with the same mnemonic
    -> IO Bool
    -- ^ __Returns:__ 'P.True' to stop other handlers from being invoked for the event.
    -- 'P.False' to propagate the event further.

-- | A convenience synonym for @`Nothing` :: `Maybe` `WidgetMnemonicActivateCallback`@.
noWidgetMnemonicActivateCallback :: Maybe WidgetMnemonicActivateCallback
noWidgetMnemonicActivateCallback :: Maybe WidgetMnemonicActivateCallback
noWidgetMnemonicActivateCallback = Maybe WidgetMnemonicActivateCallback
forall a. Maybe a
Nothing

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

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

-- | Wrap the callback into a `GClosure`.
genClosure_WidgetMnemonicActivate :: MonadIO m => WidgetMnemonicActivateCallback -> m (GClosure C_WidgetMnemonicActivateCallback)
genClosure_WidgetMnemonicActivate :: WidgetMnemonicActivateCallback
-> m (GClosure C_WidgetMnemonicActivateCallback)
genClosure_WidgetMnemonicActivate cb :: WidgetMnemonicActivateCallback
cb = IO (GClosure C_WidgetMnemonicActivateCallback)
-> m (GClosure C_WidgetMnemonicActivateCallback)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (GClosure C_WidgetMnemonicActivateCallback)
 -> m (GClosure C_WidgetMnemonicActivateCallback))
-> IO (GClosure C_WidgetMnemonicActivateCallback)
-> m (GClosure C_WidgetMnemonicActivateCallback)
forall a b. (a -> b) -> a -> b
$ do
    let cb' :: C_WidgetMnemonicActivateCallback
cb' = WidgetMnemonicActivateCallback -> C_WidgetMnemonicActivateCallback
wrap_WidgetMnemonicActivateCallback WidgetMnemonicActivateCallback
cb
    C_WidgetMnemonicActivateCallback
-> IO (FunPtr C_WidgetMnemonicActivateCallback)
mk_WidgetMnemonicActivateCallback C_WidgetMnemonicActivateCallback
cb' IO (FunPtr C_WidgetMnemonicActivateCallback)
-> (FunPtr C_WidgetMnemonicActivateCallback
    -> IO (GClosure C_WidgetMnemonicActivateCallback))
-> IO (GClosure C_WidgetMnemonicActivateCallback)
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= FunPtr C_WidgetMnemonicActivateCallback
-> IO (GClosure C_WidgetMnemonicActivateCallback)
forall (m :: * -> *) a. MonadIO m => FunPtr a -> m (GClosure a)
B.GClosure.newGClosure


-- | Wrap a `WidgetMnemonicActivateCallback` into a `C_WidgetMnemonicActivateCallback`.
wrap_WidgetMnemonicActivateCallback ::
    WidgetMnemonicActivateCallback ->
    C_WidgetMnemonicActivateCallback
wrap_WidgetMnemonicActivateCallback :: WidgetMnemonicActivateCallback -> C_WidgetMnemonicActivateCallback
wrap_WidgetMnemonicActivateCallback _cb :: WidgetMnemonicActivateCallback
_cb _ groupCycling :: CInt
groupCycling _ = do
    let groupCycling' :: Bool
groupCycling' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= 0) CInt
groupCycling
    Bool
result <- WidgetMnemonicActivateCallback
_cb  Bool
groupCycling'
    let result' :: CInt
result' = (Int -> CInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CInt) -> (Bool -> Int) -> Bool -> CInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Bool -> Int
forall a. Enum a => a -> Int
fromEnum) Bool
result
    CInt -> IO CInt
forall (m :: * -> *) a. Monad m => a -> m a
return CInt
result'


-- | Connect a signal handler for the [mnemonicActivate](#signal:mnemonicActivate) 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 #mnemonicActivate callback
-- @
-- 
-- 
onWidgetMnemonicActivate :: (IsWidget a, MonadIO m) => a -> WidgetMnemonicActivateCallback -> m SignalHandlerId
onWidgetMnemonicActivate :: a -> WidgetMnemonicActivateCallback -> m SignalHandlerId
onWidgetMnemonicActivate obj :: a
obj cb :: WidgetMnemonicActivateCallback
cb = IO SignalHandlerId -> m SignalHandlerId
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO SignalHandlerId -> m SignalHandlerId)
-> IO SignalHandlerId -> m SignalHandlerId
forall a b. (a -> b) -> a -> b
$ do
    let cb' :: C_WidgetMnemonicActivateCallback
cb' = WidgetMnemonicActivateCallback -> C_WidgetMnemonicActivateCallback
wrap_WidgetMnemonicActivateCallback WidgetMnemonicActivateCallback
cb
    FunPtr C_WidgetMnemonicActivateCallback
cb'' <- C_WidgetMnemonicActivateCallback
-> IO (FunPtr C_WidgetMnemonicActivateCallback)
mk_WidgetMnemonicActivateCallback C_WidgetMnemonicActivateCallback
cb'
    a
-> Text
-> FunPtr C_WidgetMnemonicActivateCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj "mnemonic-activate" FunPtr C_WidgetMnemonicActivateCallback
cb'' SignalConnectMode
SignalConnectBefore Maybe Text
forall a. Maybe a
Nothing

-- | Connect a signal handler for the [mnemonicActivate](#signal:mnemonicActivate) 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 #mnemonicActivate callback
-- @
-- 
-- 
afterWidgetMnemonicActivate :: (IsWidget a, MonadIO m) => a -> WidgetMnemonicActivateCallback -> m SignalHandlerId
afterWidgetMnemonicActivate :: a -> WidgetMnemonicActivateCallback -> m SignalHandlerId
afterWidgetMnemonicActivate obj :: a
obj cb :: WidgetMnemonicActivateCallback
cb = IO SignalHandlerId -> m SignalHandlerId
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO SignalHandlerId -> m SignalHandlerId)
-> IO SignalHandlerId -> m SignalHandlerId
forall a b. (a -> b) -> a -> b
$ do
    let cb' :: C_WidgetMnemonicActivateCallback
cb' = WidgetMnemonicActivateCallback -> C_WidgetMnemonicActivateCallback
wrap_WidgetMnemonicActivateCallback WidgetMnemonicActivateCallback
cb
    FunPtr C_WidgetMnemonicActivateCallback
cb'' <- C_WidgetMnemonicActivateCallback
-> IO (FunPtr C_WidgetMnemonicActivateCallback)
mk_WidgetMnemonicActivateCallback C_WidgetMnemonicActivateCallback
cb'
    a
-> Text
-> FunPtr C_WidgetMnemonicActivateCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj "mnemonic-activate" FunPtr C_WidgetMnemonicActivateCallback
cb'' SignalConnectMode
SignalConnectAfter Maybe Text
forall a. Maybe a
Nothing


#if defined(ENABLE_OVERLOADING)
data WidgetMnemonicActivateSignalInfo
instance SignalInfo WidgetMnemonicActivateSignalInfo where
    type HaskellCallbackType WidgetMnemonicActivateSignalInfo = WidgetMnemonicActivateCallback
    connectSignal obj cb connectMode detail = do
        let cb' = wrap_WidgetMnemonicActivateCallback cb
        cb'' <- mk_WidgetMnemonicActivateCallback cb'
        connectSignalFunPtr obj "mnemonic-activate" cb'' connectMode detail

#endif

-- signal Widget::move-focus
-- | /No description available in the introspection data./
type WidgetMoveFocusCallback =
    Gtk.Enums.DirectionType
    -> IO ()

-- | A convenience synonym for @`Nothing` :: `Maybe` `WidgetMoveFocusCallback`@.
noWidgetMoveFocusCallback :: Maybe WidgetMoveFocusCallback
noWidgetMoveFocusCallback :: Maybe WidgetMoveFocusCallback
noWidgetMoveFocusCallback = Maybe WidgetMoveFocusCallback
forall a. Maybe a
Nothing

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

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

-- | Wrap the callback into a `GClosure`.
genClosure_WidgetMoveFocus :: MonadIO m => WidgetMoveFocusCallback -> m (GClosure C_WidgetMoveFocusCallback)
genClosure_WidgetMoveFocus :: WidgetMoveFocusCallback
-> m (GClosure C_WidgetDirectionChangedCallback)
genClosure_WidgetMoveFocus cb :: WidgetMoveFocusCallback
cb = IO (GClosure C_WidgetDirectionChangedCallback)
-> m (GClosure C_WidgetDirectionChangedCallback)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (GClosure C_WidgetDirectionChangedCallback)
 -> m (GClosure C_WidgetDirectionChangedCallback))
-> IO (GClosure C_WidgetDirectionChangedCallback)
-> m (GClosure C_WidgetDirectionChangedCallback)
forall a b. (a -> b) -> a -> b
$ do
    let cb' :: C_WidgetDirectionChangedCallback
cb' = WidgetMoveFocusCallback -> C_WidgetDirectionChangedCallback
wrap_WidgetMoveFocusCallback WidgetMoveFocusCallback
cb
    C_WidgetDirectionChangedCallback
-> IO (FunPtr C_WidgetDirectionChangedCallback)
mk_WidgetMoveFocusCallback C_WidgetDirectionChangedCallback
cb' IO (FunPtr C_WidgetDirectionChangedCallback)
-> (FunPtr C_WidgetDirectionChangedCallback
    -> IO (GClosure C_WidgetDirectionChangedCallback))
-> IO (GClosure C_WidgetDirectionChangedCallback)
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= FunPtr C_WidgetDirectionChangedCallback
-> IO (GClosure C_WidgetDirectionChangedCallback)
forall (m :: * -> *) a. MonadIO m => FunPtr a -> m (GClosure a)
B.GClosure.newGClosure


-- | Wrap a `WidgetMoveFocusCallback` into a `C_WidgetMoveFocusCallback`.
wrap_WidgetMoveFocusCallback ::
    WidgetMoveFocusCallback ->
    C_WidgetMoveFocusCallback
wrap_WidgetMoveFocusCallback :: WidgetMoveFocusCallback -> C_WidgetDirectionChangedCallback
wrap_WidgetMoveFocusCallback _cb :: WidgetMoveFocusCallback
_cb _ direction :: CUInt
direction _ = do
    let direction' :: DirectionType
direction' = (Int -> DirectionType
forall a. Enum a => Int -> a
toEnum (Int -> DirectionType) -> (CUInt -> Int) -> CUInt -> DirectionType
forall b c a. (b -> c) -> (a -> b) -> a -> c
. CUInt -> Int
forall a b. (Integral a, Num b) => a -> b
fromIntegral) CUInt
direction
    WidgetMoveFocusCallback
_cb  DirectionType
direction'


-- | Connect a signal handler for the [moveFocus](#signal:moveFocus) 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 #moveFocus callback
-- @
-- 
-- 
onWidgetMoveFocus :: (IsWidget a, MonadIO m) => a -> WidgetMoveFocusCallback -> m SignalHandlerId
onWidgetMoveFocus :: a -> WidgetMoveFocusCallback -> m SignalHandlerId
onWidgetMoveFocus obj :: a
obj cb :: WidgetMoveFocusCallback
cb = IO SignalHandlerId -> m SignalHandlerId
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO SignalHandlerId -> m SignalHandlerId)
-> IO SignalHandlerId -> m SignalHandlerId
forall a b. (a -> b) -> a -> b
$ do
    let cb' :: C_WidgetDirectionChangedCallback
cb' = WidgetMoveFocusCallback -> C_WidgetDirectionChangedCallback
wrap_WidgetMoveFocusCallback WidgetMoveFocusCallback
cb
    FunPtr C_WidgetDirectionChangedCallback
cb'' <- C_WidgetDirectionChangedCallback
-> IO (FunPtr C_WidgetDirectionChangedCallback)
mk_WidgetMoveFocusCallback C_WidgetDirectionChangedCallback
cb'
    a
-> Text
-> FunPtr C_WidgetDirectionChangedCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj "move-focus" FunPtr C_WidgetDirectionChangedCallback
cb'' SignalConnectMode
SignalConnectBefore Maybe Text
forall a. Maybe a
Nothing

-- | Connect a signal handler for the [moveFocus](#signal:moveFocus) 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 #moveFocus callback
-- @
-- 
-- 
afterWidgetMoveFocus :: (IsWidget a, MonadIO m) => a -> WidgetMoveFocusCallback -> m SignalHandlerId
afterWidgetMoveFocus :: a -> WidgetMoveFocusCallback -> m SignalHandlerId
afterWidgetMoveFocus obj :: a
obj cb :: WidgetMoveFocusCallback
cb = IO SignalHandlerId -> m SignalHandlerId
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO SignalHandlerId -> m SignalHandlerId)
-> IO SignalHandlerId -> m SignalHandlerId
forall a b. (a -> b) -> a -> b
$ do
    let cb' :: C_WidgetDirectionChangedCallback
cb' = WidgetMoveFocusCallback -> C_WidgetDirectionChangedCallback
wrap_WidgetMoveFocusCallback WidgetMoveFocusCallback
cb
    FunPtr C_WidgetDirectionChangedCallback
cb'' <- C_WidgetDirectionChangedCallback
-> IO (FunPtr C_WidgetDirectionChangedCallback)
mk_WidgetMoveFocusCallback C_WidgetDirectionChangedCallback
cb'
    a
-> Text
-> FunPtr C_WidgetDirectionChangedCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj "move-focus" FunPtr C_WidgetDirectionChangedCallback
cb'' SignalConnectMode
SignalConnectAfter Maybe Text
forall a. Maybe a
Nothing


#if defined(ENABLE_OVERLOADING)
data WidgetMoveFocusSignalInfo
instance SignalInfo WidgetMoveFocusSignalInfo where
    type HaskellCallbackType WidgetMoveFocusSignalInfo = WidgetMoveFocusCallback
    connectSignal obj cb connectMode detail = do
        let cb' = wrap_WidgetMoveFocusCallback cb
        cb'' <- mk_WidgetMoveFocusCallback cb'
        connectSignalFunPtr obj "move-focus" cb'' connectMode detail

#endif

-- signal Widget::popup-menu
-- | This signal gets emitted whenever a widget should pop up a context
-- menu. This usually happens through the standard key binding mechanism;
-- by pressing a certain key while a widget is focused, the user can cause
-- the widget to pop up a menu.  For example, the t'GI.Gtk.Objects.Entry.Entry' widget creates
-- a menu with clipboard commands. See the
-- [Popup Menu Migration Checklist][checklist-popup-menu]
-- for an example of how to use this signal.
type WidgetPopupMenuCallback =
    IO Bool
    -- ^ __Returns:__ 'P.True' if a menu was activated

-- | A convenience synonym for @`Nothing` :: `Maybe` `WidgetPopupMenuCallback`@.
noWidgetPopupMenuCallback :: Maybe WidgetPopupMenuCallback
noWidgetPopupMenuCallback :: Maybe WidgetPopupMenuCallback
noWidgetPopupMenuCallback = Maybe WidgetPopupMenuCallback
forall a. Maybe a
Nothing

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

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

-- | Wrap the callback into a `GClosure`.
genClosure_WidgetPopupMenu :: MonadIO m => WidgetPopupMenuCallback -> m (GClosure C_WidgetPopupMenuCallback)
genClosure_WidgetPopupMenu :: WidgetPopupMenuCallback -> m (GClosure C_WidgetPopupMenuCallback)
genClosure_WidgetPopupMenu cb :: WidgetPopupMenuCallback
cb = IO (GClosure C_WidgetPopupMenuCallback)
-> m (GClosure C_WidgetPopupMenuCallback)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (GClosure C_WidgetPopupMenuCallback)
 -> m (GClosure C_WidgetPopupMenuCallback))
-> IO (GClosure C_WidgetPopupMenuCallback)
-> m (GClosure C_WidgetPopupMenuCallback)
forall a b. (a -> b) -> a -> b
$ do
    let cb' :: C_WidgetPopupMenuCallback
cb' = WidgetPopupMenuCallback -> C_WidgetPopupMenuCallback
wrap_WidgetPopupMenuCallback WidgetPopupMenuCallback
cb
    C_WidgetPopupMenuCallback -> IO (FunPtr C_WidgetPopupMenuCallback)
mk_WidgetPopupMenuCallback C_WidgetPopupMenuCallback
cb' IO (FunPtr C_WidgetPopupMenuCallback)
-> (FunPtr C_WidgetPopupMenuCallback
    -> IO (GClosure C_WidgetPopupMenuCallback))
-> IO (GClosure C_WidgetPopupMenuCallback)
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= FunPtr C_WidgetPopupMenuCallback
-> IO (GClosure C_WidgetPopupMenuCallback)
forall (m :: * -> *) a. MonadIO m => FunPtr a -> m (GClosure a)
B.GClosure.newGClosure


-- | Wrap a `WidgetPopupMenuCallback` into a `C_WidgetPopupMenuCallback`.
wrap_WidgetPopupMenuCallback ::
    WidgetPopupMenuCallback ->
    C_WidgetPopupMenuCallback
wrap_WidgetPopupMenuCallback :: WidgetPopupMenuCallback -> C_WidgetPopupMenuCallback
wrap_WidgetPopupMenuCallback _cb :: WidgetPopupMenuCallback
_cb _ _ = do
    Bool
result <- WidgetPopupMenuCallback
_cb 
    let result' :: CInt
result' = (Int -> CInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CInt) -> (Bool -> Int) -> Bool -> CInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Bool -> Int
forall a. Enum a => a -> Int
fromEnum) Bool
result
    CInt -> IO CInt
forall (m :: * -> *) a. Monad m => a -> m a
return CInt
result'


-- | Connect a signal handler for the [popupMenu](#signal:popupMenu) 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 #popupMenu callback
-- @
-- 
-- 
onWidgetPopupMenu :: (IsWidget a, MonadIO m) => a -> WidgetPopupMenuCallback -> m SignalHandlerId
onWidgetPopupMenu :: a -> WidgetPopupMenuCallback -> m SignalHandlerId
onWidgetPopupMenu obj :: a
obj cb :: WidgetPopupMenuCallback
cb = IO SignalHandlerId -> m SignalHandlerId
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO SignalHandlerId -> m SignalHandlerId)
-> IO SignalHandlerId -> m SignalHandlerId
forall a b. (a -> b) -> a -> b
$ do
    let cb' :: C_WidgetPopupMenuCallback
cb' = WidgetPopupMenuCallback -> C_WidgetPopupMenuCallback
wrap_WidgetPopupMenuCallback WidgetPopupMenuCallback
cb
    FunPtr C_WidgetPopupMenuCallback
cb'' <- C_WidgetPopupMenuCallback -> IO (FunPtr C_WidgetPopupMenuCallback)
mk_WidgetPopupMenuCallback C_WidgetPopupMenuCallback
cb'
    a
-> Text
-> FunPtr C_WidgetPopupMenuCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj "popup-menu" FunPtr C_WidgetPopupMenuCallback
cb'' SignalConnectMode
SignalConnectBefore Maybe Text
forall a. Maybe a
Nothing

-- | Connect a signal handler for the [popupMenu](#signal:popupMenu) 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 #popupMenu callback
-- @
-- 
-- 
afterWidgetPopupMenu :: (IsWidget a, MonadIO m) => a -> WidgetPopupMenuCallback -> m SignalHandlerId
afterWidgetPopupMenu :: a -> WidgetPopupMenuCallback -> m SignalHandlerId
afterWidgetPopupMenu obj :: a
obj cb :: WidgetPopupMenuCallback
cb = IO SignalHandlerId -> m SignalHandlerId
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO SignalHandlerId -> m SignalHandlerId)
-> IO SignalHandlerId -> m SignalHandlerId
forall a b. (a -> b) -> a -> b
$ do
    let cb' :: C_WidgetPopupMenuCallback
cb' = WidgetPopupMenuCallback -> C_WidgetPopupMenuCallback
wrap_WidgetPopupMenuCallback WidgetPopupMenuCallback
cb
    FunPtr C_WidgetPopupMenuCallback
cb'' <- C_WidgetPopupMenuCallback -> IO (FunPtr C_WidgetPopupMenuCallback)
mk_WidgetPopupMenuCallback C_WidgetPopupMenuCallback
cb'
    a
-> Text
-> FunPtr C_WidgetPopupMenuCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj "popup-menu" FunPtr C_WidgetPopupMenuCallback
cb'' SignalConnectMode
SignalConnectAfter Maybe Text
forall a. Maybe a
Nothing


#if defined(ENABLE_OVERLOADING)
data WidgetPopupMenuSignalInfo
instance SignalInfo WidgetPopupMenuSignalInfo where
    type HaskellCallbackType WidgetPopupMenuSignalInfo = WidgetPopupMenuCallback
    connectSignal obj cb connectMode detail = do
        let cb' = wrap_WidgetPopupMenuCallback cb
        cb'' <- mk_WidgetPopupMenuCallback cb'
        connectSignalFunPtr obj "popup-menu" cb'' connectMode detail

#endif

-- signal Widget::query-tooltip
-- | Emitted when t'GI.Gtk.Objects.Widget.Widget':@/has-tooltip/@ is 'P.True' and the hover timeout
-- has expired with the cursor hovering \"above\" /@widget@/; or emitted when /@widget@/ got
-- focus in keyboard mode.
-- 
-- Using the given coordinates, the signal handler should determine
-- whether a tooltip should be shown for /@widget@/. If this is the case
-- 'P.True' should be returned, 'P.False' otherwise.  Note that if
-- /@keyboardMode@/ is 'P.True', the values of /@x@/ and /@y@/ are undefined and
-- should not be used.
-- 
-- The signal handler is free to manipulate /@tooltip@/ with the therefore
-- destined function calls.
type WidgetQueryTooltipCallback =
    Int32
    -- ^ /@x@/: the x coordinate of the cursor position where the request has
    --     been emitted, relative to /@widget@/\'s left side
    -> Int32
    -- ^ /@y@/: the y coordinate of the cursor position where the request has
    --     been emitted, relative to /@widget@/\'s top
    -> Bool
    -- ^ /@keyboardMode@/: 'P.True' if the tooltip was triggered using the keyboard
    -> Gtk.Tooltip.Tooltip
    -- ^ /@tooltip@/: a t'GI.Gtk.Objects.Tooltip.Tooltip'
    -> IO Bool
    -- ^ __Returns:__ 'P.True' if /@tooltip@/ should be shown right now, 'P.False' otherwise.

-- | A convenience synonym for @`Nothing` :: `Maybe` `WidgetQueryTooltipCallback`@.
noWidgetQueryTooltipCallback :: Maybe WidgetQueryTooltipCallback
noWidgetQueryTooltipCallback :: Maybe WidgetQueryTooltipCallback
noWidgetQueryTooltipCallback = Maybe WidgetQueryTooltipCallback
forall a. Maybe a
Nothing

-- | Type for the callback on the (unwrapped) C side.
type C_WidgetQueryTooltipCallback =
    Ptr () ->                               -- object
    Int32 ->
    Int32 ->
    CInt ->
    Ptr Gtk.Tooltip.Tooltip ->
    Ptr () ->                               -- user_data
    IO CInt

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

-- | Wrap the callback into a `GClosure`.
genClosure_WidgetQueryTooltip :: MonadIO m => WidgetQueryTooltipCallback -> m (GClosure C_WidgetQueryTooltipCallback)
genClosure_WidgetQueryTooltip :: WidgetQueryTooltipCallback
-> m (GClosure C_WidgetQueryTooltipCallback)
genClosure_WidgetQueryTooltip cb :: WidgetQueryTooltipCallback
cb = IO (GClosure C_WidgetQueryTooltipCallback)
-> m (GClosure C_WidgetQueryTooltipCallback)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (GClosure C_WidgetQueryTooltipCallback)
 -> m (GClosure C_WidgetQueryTooltipCallback))
-> IO (GClosure C_WidgetQueryTooltipCallback)
-> m (GClosure C_WidgetQueryTooltipCallback)
forall a b. (a -> b) -> a -> b
$ do
    let cb' :: C_WidgetQueryTooltipCallback
cb' = WidgetQueryTooltipCallback -> C_WidgetQueryTooltipCallback
wrap_WidgetQueryTooltipCallback WidgetQueryTooltipCallback
cb
    C_WidgetQueryTooltipCallback
-> IO (FunPtr C_WidgetQueryTooltipCallback)
mk_WidgetQueryTooltipCallback C_WidgetQueryTooltipCallback
cb' IO (FunPtr C_WidgetQueryTooltipCallback)
-> (FunPtr C_WidgetQueryTooltipCallback
    -> IO (GClosure C_WidgetQueryTooltipCallback))
-> IO (GClosure C_WidgetQueryTooltipCallback)
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= FunPtr C_WidgetQueryTooltipCallback
-> IO (GClosure C_WidgetQueryTooltipCallback)
forall (m :: * -> *) a. MonadIO m => FunPtr a -> m (GClosure a)
B.GClosure.newGClosure


-- | Wrap a `WidgetQueryTooltipCallback` into a `C_WidgetQueryTooltipCallback`.
wrap_WidgetQueryTooltipCallback ::
    WidgetQueryTooltipCallback ->
    C_WidgetQueryTooltipCallback
wrap_WidgetQueryTooltipCallback :: WidgetQueryTooltipCallback -> C_WidgetQueryTooltipCallback
wrap_WidgetQueryTooltipCallback _cb :: WidgetQueryTooltipCallback
_cb _ x :: Int32
x y :: Int32
y keyboardMode :: CInt
keyboardMode tooltip :: Ptr Tooltip
tooltip _ = do
    let keyboardMode' :: Bool
keyboardMode' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= 0) CInt
keyboardMode
    Tooltip
tooltip' <- ((ManagedPtr Tooltip -> Tooltip) -> Ptr Tooltip -> IO Tooltip
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr Tooltip -> Tooltip
Gtk.Tooltip.Tooltip) Ptr Tooltip
tooltip
    Bool
result <- WidgetQueryTooltipCallback
_cb  Int32
x Int32
y Bool
keyboardMode' Tooltip
tooltip'
    let result' :: CInt
result' = (Int -> CInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CInt) -> (Bool -> Int) -> Bool -> CInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Bool -> Int
forall a. Enum a => a -> Int
fromEnum) Bool
result
    CInt -> IO CInt
forall (m :: * -> *) a. Monad m => a -> m a
return CInt
result'


-- | Connect a signal handler for the [queryTooltip](#signal:queryTooltip) 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 #queryTooltip callback
-- @
-- 
-- 
onWidgetQueryTooltip :: (IsWidget a, MonadIO m) => a -> WidgetQueryTooltipCallback -> m SignalHandlerId
onWidgetQueryTooltip :: a -> WidgetQueryTooltipCallback -> m SignalHandlerId
onWidgetQueryTooltip obj :: a
obj cb :: WidgetQueryTooltipCallback
cb = IO SignalHandlerId -> m SignalHandlerId
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO SignalHandlerId -> m SignalHandlerId)
-> IO SignalHandlerId -> m SignalHandlerId
forall a b. (a -> b) -> a -> b
$ do
    let cb' :: C_WidgetQueryTooltipCallback
cb' = WidgetQueryTooltipCallback -> C_WidgetQueryTooltipCallback
wrap_WidgetQueryTooltipCallback WidgetQueryTooltipCallback
cb
    FunPtr C_WidgetQueryTooltipCallback
cb'' <- C_WidgetQueryTooltipCallback
-> IO (FunPtr C_WidgetQueryTooltipCallback)
mk_WidgetQueryTooltipCallback C_WidgetQueryTooltipCallback
cb'
    a
-> Text
-> FunPtr C_WidgetQueryTooltipCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj "query-tooltip" FunPtr C_WidgetQueryTooltipCallback
cb'' SignalConnectMode
SignalConnectBefore Maybe Text
forall a. Maybe a
Nothing

-- | Connect a signal handler for the [queryTooltip](#signal:queryTooltip) 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 #queryTooltip callback
-- @
-- 
-- 
afterWidgetQueryTooltip :: (IsWidget a, MonadIO m) => a -> WidgetQueryTooltipCallback -> m SignalHandlerId
afterWidgetQueryTooltip :: a -> WidgetQueryTooltipCallback -> m SignalHandlerId
afterWidgetQueryTooltip obj :: a
obj cb :: WidgetQueryTooltipCallback
cb = IO SignalHandlerId -> m SignalHandlerId
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO SignalHandlerId -> m SignalHandlerId)
-> IO SignalHandlerId -> m SignalHandlerId
forall a b. (a -> b) -> a -> b
$ do
    let cb' :: C_WidgetQueryTooltipCallback
cb' = WidgetQueryTooltipCallback -> C_WidgetQueryTooltipCallback
wrap_WidgetQueryTooltipCallback WidgetQueryTooltipCallback
cb
    FunPtr C_WidgetQueryTooltipCallback
cb'' <- C_WidgetQueryTooltipCallback
-> IO (FunPtr C_WidgetQueryTooltipCallback)
mk_WidgetQueryTooltipCallback C_WidgetQueryTooltipCallback
cb'
    a
-> Text
-> FunPtr C_WidgetQueryTooltipCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj "query-tooltip" FunPtr C_WidgetQueryTooltipCallback
cb'' SignalConnectMode
SignalConnectAfter Maybe Text
forall a. Maybe a
Nothing


#if defined(ENABLE_OVERLOADING)
data WidgetQueryTooltipSignalInfo
instance SignalInfo WidgetQueryTooltipSignalInfo where
    type HaskellCallbackType WidgetQueryTooltipSignalInfo = WidgetQueryTooltipCallback
    connectSignal obj cb connectMode detail = do
        let cb' = wrap_WidgetQueryTooltipCallback cb
        cb'' <- mk_WidgetQueryTooltipCallback cb'
        connectSignalFunPtr obj "query-tooltip" cb'' connectMode detail

#endif

-- signal Widget::realize
-- | The [realize](#signal:realize) signal is emitted when /@widget@/ is associated with a
-- t'GI.Gdk.Objects.Surface.Surface', which means that 'GI.Gtk.Objects.Widget.widgetRealize' has been called or the
-- widget has been mapped (that is, it is going to be drawn).
type WidgetRealizeCallback =
    IO ()

-- | A convenience synonym for @`Nothing` :: `Maybe` `WidgetRealizeCallback`@.
noWidgetRealizeCallback :: Maybe WidgetRealizeCallback
noWidgetRealizeCallback :: Maybe (IO ())
noWidgetRealizeCallback = Maybe (IO ())
forall a. Maybe a
Nothing

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

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

-- | Wrap the callback into a `GClosure`.
genClosure_WidgetRealize :: MonadIO m => WidgetRealizeCallback -> m (GClosure C_WidgetRealizeCallback)
genClosure_WidgetRealize :: IO () -> m (GClosure C_WidgetAccelClosuresChangedCallback)
genClosure_WidgetRealize cb :: IO ()
cb = IO (GClosure C_WidgetAccelClosuresChangedCallback)
-> m (GClosure C_WidgetAccelClosuresChangedCallback)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (GClosure C_WidgetAccelClosuresChangedCallback)
 -> m (GClosure C_WidgetAccelClosuresChangedCallback))
-> IO (GClosure C_WidgetAccelClosuresChangedCallback)
-> m (GClosure C_WidgetAccelClosuresChangedCallback)
forall a b. (a -> b) -> a -> b
$ do
    let cb' :: C_WidgetAccelClosuresChangedCallback
cb' = IO () -> C_WidgetAccelClosuresChangedCallback
wrap_WidgetRealizeCallback IO ()
cb
    C_WidgetAccelClosuresChangedCallback
-> IO (FunPtr C_WidgetAccelClosuresChangedCallback)
mk_WidgetRealizeCallback C_WidgetAccelClosuresChangedCallback
cb' IO (FunPtr C_WidgetAccelClosuresChangedCallback)
-> (FunPtr C_WidgetAccelClosuresChangedCallback
    -> IO (GClosure C_WidgetAccelClosuresChangedCallback))
-> IO (GClosure C_WidgetAccelClosuresChangedCallback)
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= FunPtr C_WidgetAccelClosuresChangedCallback
-> IO (GClosure C_WidgetAccelClosuresChangedCallback)
forall (m :: * -> *) a. MonadIO m => FunPtr a -> m (GClosure a)
B.GClosure.newGClosure


-- | Wrap a `WidgetRealizeCallback` into a `C_WidgetRealizeCallback`.
wrap_WidgetRealizeCallback ::
    WidgetRealizeCallback ->
    C_WidgetRealizeCallback
wrap_WidgetRealizeCallback :: IO () -> C_WidgetAccelClosuresChangedCallback
wrap_WidgetRealizeCallback _cb :: IO ()
_cb _ _ = do
    IO ()
_cb 


-- | Connect a signal handler for the [realize](#signal:realize) 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 #realize callback
-- @
-- 
-- 
onWidgetRealize :: (IsWidget a, MonadIO m) => a -> WidgetRealizeCallback -> m SignalHandlerId
onWidgetRealize :: a -> IO () -> m SignalHandlerId
onWidgetRealize obj :: a
obj cb :: IO ()
cb = IO SignalHandlerId -> m SignalHandlerId
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO SignalHandlerId -> m SignalHandlerId)
-> IO SignalHandlerId -> m SignalHandlerId
forall a b. (a -> b) -> a -> b
$ do
    let cb' :: C_WidgetAccelClosuresChangedCallback
cb' = IO () -> C_WidgetAccelClosuresChangedCallback
wrap_WidgetRealizeCallback IO ()
cb
    FunPtr C_WidgetAccelClosuresChangedCallback
cb'' <- C_WidgetAccelClosuresChangedCallback
-> IO (FunPtr C_WidgetAccelClosuresChangedCallback)
mk_WidgetRealizeCallback C_WidgetAccelClosuresChangedCallback
cb'
    a
-> Text
-> FunPtr C_WidgetAccelClosuresChangedCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj "realize" FunPtr C_WidgetAccelClosuresChangedCallback
cb'' SignalConnectMode
SignalConnectBefore Maybe Text
forall a. Maybe a
Nothing

-- | Connect a signal handler for the [realize](#signal:realize) 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 #realize callback
-- @
-- 
-- 
afterWidgetRealize :: (IsWidget a, MonadIO m) => a -> WidgetRealizeCallback -> m SignalHandlerId
afterWidgetRealize :: a -> IO () -> m SignalHandlerId
afterWidgetRealize obj :: a
obj cb :: IO ()
cb = IO SignalHandlerId -> m SignalHandlerId
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO SignalHandlerId -> m SignalHandlerId)
-> IO SignalHandlerId -> m SignalHandlerId
forall a b. (a -> b) -> a -> b
$ do
    let cb' :: C_WidgetAccelClosuresChangedCallback
cb' = IO () -> C_WidgetAccelClosuresChangedCallback
wrap_WidgetRealizeCallback IO ()
cb
    FunPtr C_WidgetAccelClosuresChangedCallback
cb'' <- C_WidgetAccelClosuresChangedCallback
-> IO (FunPtr C_WidgetAccelClosuresChangedCallback)
mk_WidgetRealizeCallback C_WidgetAccelClosuresChangedCallback
cb'
    a
-> Text
-> FunPtr C_WidgetAccelClosuresChangedCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj "realize" FunPtr C_WidgetAccelClosuresChangedCallback
cb'' SignalConnectMode
SignalConnectAfter Maybe Text
forall a. Maybe a
Nothing


#if defined(ENABLE_OVERLOADING)
data WidgetRealizeSignalInfo
instance SignalInfo WidgetRealizeSignalInfo where
    type HaskellCallbackType WidgetRealizeSignalInfo = WidgetRealizeCallback
    connectSignal obj cb connectMode detail = do
        let cb' = wrap_WidgetRealizeCallback cb
        cb'' <- mk_WidgetRealizeCallback cb'
        connectSignalFunPtr obj "realize" cb'' connectMode detail

#endif

-- signal Widget::show
-- | The [show](#signal:show) signal is emitted when /@widget@/ is shown, for example with
-- 'GI.Gtk.Objects.Widget.widgetShow'.
type WidgetShowCallback =
    IO ()

-- | A convenience synonym for @`Nothing` :: `Maybe` `WidgetShowCallback`@.
noWidgetShowCallback :: Maybe WidgetShowCallback
noWidgetShowCallback :: Maybe (IO ())
noWidgetShowCallback = Maybe (IO ())
forall a. Maybe a
Nothing

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

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

-- | Wrap the callback into a `GClosure`.
genClosure_WidgetShow :: MonadIO m => WidgetShowCallback -> m (GClosure C_WidgetShowCallback)
genClosure_WidgetShow :: IO () -> m (GClosure C_WidgetAccelClosuresChangedCallback)
genClosure_WidgetShow cb :: IO ()
cb = IO (GClosure C_WidgetAccelClosuresChangedCallback)
-> m (GClosure C_WidgetAccelClosuresChangedCallback)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (GClosure C_WidgetAccelClosuresChangedCallback)
 -> m (GClosure C_WidgetAccelClosuresChangedCallback))
-> IO (GClosure C_WidgetAccelClosuresChangedCallback)
-> m (GClosure C_WidgetAccelClosuresChangedCallback)
forall a b. (a -> b) -> a -> b
$ do
    let cb' :: C_WidgetAccelClosuresChangedCallback
cb' = IO () -> C_WidgetAccelClosuresChangedCallback
wrap_WidgetShowCallback IO ()
cb
    C_WidgetAccelClosuresChangedCallback
-> IO (FunPtr C_WidgetAccelClosuresChangedCallback)
mk_WidgetShowCallback C_WidgetAccelClosuresChangedCallback
cb' IO (FunPtr C_WidgetAccelClosuresChangedCallback)
-> (FunPtr C_WidgetAccelClosuresChangedCallback
    -> IO (GClosure C_WidgetAccelClosuresChangedCallback))
-> IO (GClosure C_WidgetAccelClosuresChangedCallback)
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= FunPtr C_WidgetAccelClosuresChangedCallback
-> IO (GClosure C_WidgetAccelClosuresChangedCallback)
forall (m :: * -> *) a. MonadIO m => FunPtr a -> m (GClosure a)
B.GClosure.newGClosure


-- | Wrap a `WidgetShowCallback` into a `C_WidgetShowCallback`.
wrap_WidgetShowCallback ::
    WidgetShowCallback ->
    C_WidgetShowCallback
wrap_WidgetShowCallback :: IO () -> C_WidgetAccelClosuresChangedCallback
wrap_WidgetShowCallback _cb :: IO ()
_cb _ _ = do
    IO ()
_cb 


-- | Connect a signal handler for the [show](#signal:show) 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 #show callback
-- @
-- 
-- 
onWidgetShow :: (IsWidget a, MonadIO m) => a -> WidgetShowCallback -> m SignalHandlerId
onWidgetShow :: a -> IO () -> m SignalHandlerId
onWidgetShow obj :: a
obj cb :: IO ()
cb = IO SignalHandlerId -> m SignalHandlerId
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO SignalHandlerId -> m SignalHandlerId)
-> IO SignalHandlerId -> m SignalHandlerId
forall a b. (a -> b) -> a -> b
$ do
    let cb' :: C_WidgetAccelClosuresChangedCallback
cb' = IO () -> C_WidgetAccelClosuresChangedCallback
wrap_WidgetShowCallback IO ()
cb
    FunPtr C_WidgetAccelClosuresChangedCallback
cb'' <- C_WidgetAccelClosuresChangedCallback
-> IO (FunPtr C_WidgetAccelClosuresChangedCallback)
mk_WidgetShowCallback C_WidgetAccelClosuresChangedCallback
cb'
    a
-> Text
-> FunPtr C_WidgetAccelClosuresChangedCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj "show" FunPtr C_WidgetAccelClosuresChangedCallback
cb'' SignalConnectMode
SignalConnectBefore Maybe Text
forall a. Maybe a
Nothing

-- | Connect a signal handler for the [show](#signal:show) 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 #show callback
-- @
-- 
-- 
afterWidgetShow :: (IsWidget a, MonadIO m) => a -> WidgetShowCallback -> m SignalHandlerId
afterWidgetShow :: a -> IO () -> m SignalHandlerId
afterWidgetShow obj :: a
obj cb :: IO ()
cb = IO SignalHandlerId -> m SignalHandlerId
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO SignalHandlerId -> m SignalHandlerId)
-> IO SignalHandlerId -> m SignalHandlerId
forall a b. (a -> b) -> a -> b
$ do
    let cb' :: C_WidgetAccelClosuresChangedCallback
cb' = IO () -> C_WidgetAccelClosuresChangedCallback
wrap_WidgetShowCallback IO ()
cb
    FunPtr C_WidgetAccelClosuresChangedCallback
cb'' <- C_WidgetAccelClosuresChangedCallback
-> IO (FunPtr C_WidgetAccelClosuresChangedCallback)
mk_WidgetShowCallback C_WidgetAccelClosuresChangedCallback
cb'
    a
-> Text
-> FunPtr C_WidgetAccelClosuresChangedCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj "show" FunPtr C_WidgetAccelClosuresChangedCallback
cb'' SignalConnectMode
SignalConnectAfter Maybe Text
forall a. Maybe a
Nothing


#if defined(ENABLE_OVERLOADING)
data WidgetShowSignalInfo
instance SignalInfo WidgetShowSignalInfo where
    type HaskellCallbackType WidgetShowSignalInfo = WidgetShowCallback
    connectSignal obj cb connectMode detail = do
        let cb' = wrap_WidgetShowCallback cb
        cb'' <- mk_WidgetShowCallback cb'
        connectSignalFunPtr obj "show" cb'' connectMode detail

#endif

-- signal Widget::size-allocate
-- | /No description available in the introspection data./
type WidgetSizeAllocateCallback =
    Int32
    -- ^ /@width@/: the content width of the widget
    -> Int32
    -- ^ /@height@/: the content height of the widget
    -> Int32
    -- ^ /@baseline@/: the baseline
    -> IO ()

-- | A convenience synonym for @`Nothing` :: `Maybe` `WidgetSizeAllocateCallback`@.
noWidgetSizeAllocateCallback :: Maybe WidgetSizeAllocateCallback
noWidgetSizeAllocateCallback :: Maybe WidgetSizeAllocateCallback
noWidgetSizeAllocateCallback = Maybe WidgetSizeAllocateCallback
forall a. Maybe a
Nothing

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

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

-- | Wrap the callback into a `GClosure`.
genClosure_WidgetSizeAllocate :: MonadIO m => WidgetSizeAllocateCallback -> m (GClosure C_WidgetSizeAllocateCallback)
genClosure_WidgetSizeAllocate :: WidgetSizeAllocateCallback
-> m (GClosure C_WidgetSizeAllocateCallback)
genClosure_WidgetSizeAllocate cb :: WidgetSizeAllocateCallback
cb = IO (GClosure C_WidgetSizeAllocateCallback)
-> m (GClosure C_WidgetSizeAllocateCallback)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (GClosure C_WidgetSizeAllocateCallback)
 -> m (GClosure C_WidgetSizeAllocateCallback))
-> IO (GClosure C_WidgetSizeAllocateCallback)
-> m (GClosure C_WidgetSizeAllocateCallback)
forall a b. (a -> b) -> a -> b
$ do
    let cb' :: C_WidgetSizeAllocateCallback
cb' = WidgetSizeAllocateCallback -> C_WidgetSizeAllocateCallback
wrap_WidgetSizeAllocateCallback WidgetSizeAllocateCallback
cb
    C_WidgetSizeAllocateCallback
-> IO (FunPtr C_WidgetSizeAllocateCallback)
mk_WidgetSizeAllocateCallback C_WidgetSizeAllocateCallback
cb' IO (FunPtr C_WidgetSizeAllocateCallback)
-> (FunPtr C_WidgetSizeAllocateCallback
    -> IO (GClosure C_WidgetSizeAllocateCallback))
-> IO (GClosure C_WidgetSizeAllocateCallback)
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= FunPtr C_WidgetSizeAllocateCallback
-> IO (GClosure C_WidgetSizeAllocateCallback)
forall (m :: * -> *) a. MonadIO m => FunPtr a -> m (GClosure a)
B.GClosure.newGClosure


-- | Wrap a `WidgetSizeAllocateCallback` into a `C_WidgetSizeAllocateCallback`.
wrap_WidgetSizeAllocateCallback ::
    WidgetSizeAllocateCallback ->
    C_WidgetSizeAllocateCallback
wrap_WidgetSizeAllocateCallback :: WidgetSizeAllocateCallback -> C_WidgetSizeAllocateCallback
wrap_WidgetSizeAllocateCallback _cb :: WidgetSizeAllocateCallback
_cb _ width :: Int32
width height :: Int32
height baseline :: Int32
baseline _ = do
    WidgetSizeAllocateCallback
_cb  Int32
width Int32
height Int32
baseline


-- | Connect a signal handler for the [sizeAllocate](#signal:sizeAllocate) 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 #sizeAllocate callback
-- @
-- 
-- 
onWidgetSizeAllocate :: (IsWidget a, MonadIO m) => a -> WidgetSizeAllocateCallback -> m SignalHandlerId
onWidgetSizeAllocate :: a -> WidgetSizeAllocateCallback -> m SignalHandlerId
onWidgetSizeAllocate obj :: a
obj cb :: WidgetSizeAllocateCallback
cb = IO SignalHandlerId -> m SignalHandlerId
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO SignalHandlerId -> m SignalHandlerId)
-> IO SignalHandlerId -> m SignalHandlerId
forall a b. (a -> b) -> a -> b
$ do
    let cb' :: C_WidgetSizeAllocateCallback
cb' = WidgetSizeAllocateCallback -> C_WidgetSizeAllocateCallback
wrap_WidgetSizeAllocateCallback WidgetSizeAllocateCallback
cb
    FunPtr C_WidgetSizeAllocateCallback
cb'' <- C_WidgetSizeAllocateCallback
-> IO (FunPtr C_WidgetSizeAllocateCallback)
mk_WidgetSizeAllocateCallback C_WidgetSizeAllocateCallback
cb'
    a
-> Text
-> FunPtr C_WidgetSizeAllocateCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj "size-allocate" FunPtr C_WidgetSizeAllocateCallback
cb'' SignalConnectMode
SignalConnectBefore Maybe Text
forall a. Maybe a
Nothing

-- | Connect a signal handler for the [sizeAllocate](#signal:sizeAllocate) 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 #sizeAllocate callback
-- @
-- 
-- 
afterWidgetSizeAllocate :: (IsWidget a, MonadIO m) => a -> WidgetSizeAllocateCallback -> m SignalHandlerId
afterWidgetSizeAllocate :: a -> WidgetSizeAllocateCallback -> m SignalHandlerId
afterWidgetSizeAllocate obj :: a
obj cb :: WidgetSizeAllocateCallback
cb = IO SignalHandlerId -> m SignalHandlerId
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO SignalHandlerId -> m SignalHandlerId)
-> IO SignalHandlerId -> m SignalHandlerId
forall a b. (a -> b) -> a -> b
$ do
    let cb' :: C_WidgetSizeAllocateCallback
cb' = WidgetSizeAllocateCallback -> C_WidgetSizeAllocateCallback
wrap_WidgetSizeAllocateCallback WidgetSizeAllocateCallback
cb
    FunPtr C_WidgetSizeAllocateCallback
cb'' <- C_WidgetSizeAllocateCallback
-> IO (FunPtr C_WidgetSizeAllocateCallback)
mk_WidgetSizeAllocateCallback C_WidgetSizeAllocateCallback
cb'
    a
-> Text
-> FunPtr C_WidgetSizeAllocateCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj "size-allocate" FunPtr C_WidgetSizeAllocateCallback
cb'' SignalConnectMode
SignalConnectAfter Maybe Text
forall a. Maybe a
Nothing


#if defined(ENABLE_OVERLOADING)
data WidgetSizeAllocateSignalInfo
instance SignalInfo WidgetSizeAllocateSignalInfo where
    type HaskellCallbackType WidgetSizeAllocateSignalInfo = WidgetSizeAllocateCallback
    connectSignal obj cb connectMode detail = do
        let cb' = wrap_WidgetSizeAllocateCallback cb
        cb'' <- mk_WidgetSizeAllocateCallback cb'
        connectSignalFunPtr obj "size-allocate" cb'' connectMode detail

#endif

-- signal Widget::state-flags-changed
-- | The [stateFlagsChanged](#signal:stateFlagsChanged) signal is emitted when the widget state
-- changes, see 'GI.Gtk.Objects.Widget.widgetGetStateFlags'.
type WidgetStateFlagsChangedCallback =
    [Gtk.Flags.StateFlags]
    -- ^ /@flags@/: The previous state flags.
    -> IO ()

-- | A convenience synonym for @`Nothing` :: `Maybe` `WidgetStateFlagsChangedCallback`@.
noWidgetStateFlagsChangedCallback :: Maybe WidgetStateFlagsChangedCallback
noWidgetStateFlagsChangedCallback :: Maybe WidgetStateFlagsChangedCallback
noWidgetStateFlagsChangedCallback = Maybe WidgetStateFlagsChangedCallback
forall a. Maybe a
Nothing

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

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

-- | Wrap the callback into a `GClosure`.
genClosure_WidgetStateFlagsChanged :: MonadIO m => WidgetStateFlagsChangedCallback -> m (GClosure C_WidgetStateFlagsChangedCallback)
genClosure_WidgetStateFlagsChanged :: WidgetStateFlagsChangedCallback
-> m (GClosure C_WidgetDirectionChangedCallback)
genClosure_WidgetStateFlagsChanged cb :: WidgetStateFlagsChangedCallback
cb = IO (GClosure C_WidgetDirectionChangedCallback)
-> m (GClosure C_WidgetDirectionChangedCallback)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (GClosure C_WidgetDirectionChangedCallback)
 -> m (GClosure C_WidgetDirectionChangedCallback))
-> IO (GClosure C_WidgetDirectionChangedCallback)
-> m (GClosure C_WidgetDirectionChangedCallback)
forall a b. (a -> b) -> a -> b
$ do
    let cb' :: C_WidgetDirectionChangedCallback
cb' = WidgetStateFlagsChangedCallback -> C_WidgetDirectionChangedCallback
wrap_WidgetStateFlagsChangedCallback WidgetStateFlagsChangedCallback
cb
    C_WidgetDirectionChangedCallback
-> IO (FunPtr C_WidgetDirectionChangedCallback)
mk_WidgetStateFlagsChangedCallback C_WidgetDirectionChangedCallback
cb' IO (FunPtr C_WidgetDirectionChangedCallback)
-> (FunPtr C_WidgetDirectionChangedCallback
    -> IO (GClosure C_WidgetDirectionChangedCallback))
-> IO (GClosure C_WidgetDirectionChangedCallback)
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= FunPtr C_WidgetDirectionChangedCallback
-> IO (GClosure C_WidgetDirectionChangedCallback)
forall (m :: * -> *) a. MonadIO m => FunPtr a -> m (GClosure a)
B.GClosure.newGClosure


-- | Wrap a `WidgetStateFlagsChangedCallback` into a `C_WidgetStateFlagsChangedCallback`.
wrap_WidgetStateFlagsChangedCallback ::
    WidgetStateFlagsChangedCallback ->
    C_WidgetStateFlagsChangedCallback
wrap_WidgetStateFlagsChangedCallback :: WidgetStateFlagsChangedCallback -> C_WidgetDirectionChangedCallback
wrap_WidgetStateFlagsChangedCallback _cb :: WidgetStateFlagsChangedCallback
_cb _ flags :: CUInt
flags _ = do
    let flags' :: [StateFlags]
flags' = CUInt -> [StateFlags]
forall a b. (Storable a, Integral a, Bits a, IsGFlag b) => a -> [b]
wordToGFlags CUInt
flags
    WidgetStateFlagsChangedCallback
_cb  [StateFlags]
flags'


-- | Connect a signal handler for the [stateFlagsChanged](#signal:stateFlagsChanged) 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 #stateFlagsChanged callback
-- @
-- 
-- 
onWidgetStateFlagsChanged :: (IsWidget a, MonadIO m) => a -> WidgetStateFlagsChangedCallback -> m SignalHandlerId
onWidgetStateFlagsChanged :: a -> WidgetStateFlagsChangedCallback -> m SignalHandlerId
onWidgetStateFlagsChanged obj :: a
obj cb :: WidgetStateFlagsChangedCallback
cb = IO SignalHandlerId -> m SignalHandlerId
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO SignalHandlerId -> m SignalHandlerId)
-> IO SignalHandlerId -> m SignalHandlerId
forall a b. (a -> b) -> a -> b
$ do
    let cb' :: C_WidgetDirectionChangedCallback
cb' = WidgetStateFlagsChangedCallback -> C_WidgetDirectionChangedCallback
wrap_WidgetStateFlagsChangedCallback WidgetStateFlagsChangedCallback
cb
    FunPtr C_WidgetDirectionChangedCallback
cb'' <- C_WidgetDirectionChangedCallback
-> IO (FunPtr C_WidgetDirectionChangedCallback)
mk_WidgetStateFlagsChangedCallback C_WidgetDirectionChangedCallback
cb'
    a
-> Text
-> FunPtr C_WidgetDirectionChangedCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj "state-flags-changed" FunPtr C_WidgetDirectionChangedCallback
cb'' SignalConnectMode
SignalConnectBefore Maybe Text
forall a. Maybe a
Nothing

-- | Connect a signal handler for the [stateFlagsChanged](#signal:stateFlagsChanged) 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 #stateFlagsChanged callback
-- @
-- 
-- 
afterWidgetStateFlagsChanged :: (IsWidget a, MonadIO m) => a -> WidgetStateFlagsChangedCallback -> m SignalHandlerId
afterWidgetStateFlagsChanged :: a -> WidgetStateFlagsChangedCallback -> m SignalHandlerId
afterWidgetStateFlagsChanged obj :: a
obj cb :: WidgetStateFlagsChangedCallback
cb = IO SignalHandlerId -> m SignalHandlerId
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO SignalHandlerId -> m SignalHandlerId)
-> IO SignalHandlerId -> m SignalHandlerId
forall a b. (a -> b) -> a -> b
$ do
    let cb' :: C_WidgetDirectionChangedCallback
cb' = WidgetStateFlagsChangedCallback -> C_WidgetDirectionChangedCallback
wrap_WidgetStateFlagsChangedCallback WidgetStateFlagsChangedCallback
cb
    FunPtr C_WidgetDirectionChangedCallback
cb'' <- C_WidgetDirectionChangedCallback
-> IO (FunPtr C_WidgetDirectionChangedCallback)
mk_WidgetStateFlagsChangedCallback C_WidgetDirectionChangedCallback
cb'
    a
-> Text
-> FunPtr C_WidgetDirectionChangedCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj "state-flags-changed" FunPtr C_WidgetDirectionChangedCallback
cb'' SignalConnectMode
SignalConnectAfter Maybe Text
forall a. Maybe a
Nothing


#if defined(ENABLE_OVERLOADING)
data WidgetStateFlagsChangedSignalInfo
instance SignalInfo WidgetStateFlagsChangedSignalInfo where
    type HaskellCallbackType WidgetStateFlagsChangedSignalInfo = WidgetStateFlagsChangedCallback
    connectSignal obj cb connectMode detail = do
        let cb' = wrap_WidgetStateFlagsChangedCallback cb
        cb'' <- mk_WidgetStateFlagsChangedCallback cb'
        connectSignalFunPtr obj "state-flags-changed" cb'' connectMode detail

#endif

-- signal Widget::style-updated
-- | The [styleUpdated](#signal:styleUpdated) signal is a convenience signal that is emitted when the
-- [changed]("GI.Gtk.Objects.StyleContext#signal:changed") signal is emitted on the /@widget@/\'s associated
-- t'GI.Gtk.Objects.StyleContext.StyleContext' as returned by 'GI.Gtk.Objects.Widget.widgetGetStyleContext'.
type WidgetStyleUpdatedCallback =
    IO ()

-- | A convenience synonym for @`Nothing` :: `Maybe` `WidgetStyleUpdatedCallback`@.
noWidgetStyleUpdatedCallback :: Maybe WidgetStyleUpdatedCallback
noWidgetStyleUpdatedCallback :: Maybe (IO ())
noWidgetStyleUpdatedCallback = Maybe (IO ())
forall a. Maybe a
Nothing

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

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

-- | Wrap the callback into a `GClosure`.
genClosure_WidgetStyleUpdated :: MonadIO m => WidgetStyleUpdatedCallback -> m (GClosure C_WidgetStyleUpdatedCallback)
genClosure_WidgetStyleUpdated :: IO () -> m (GClosure C_WidgetAccelClosuresChangedCallback)
genClosure_WidgetStyleUpdated cb :: IO ()
cb = IO (GClosure C_WidgetAccelClosuresChangedCallback)
-> m (GClosure C_WidgetAccelClosuresChangedCallback)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (GClosure C_WidgetAccelClosuresChangedCallback)
 -> m (GClosure C_WidgetAccelClosuresChangedCallback))
-> IO (GClosure C_WidgetAccelClosuresChangedCallback)
-> m (GClosure C_WidgetAccelClosuresChangedCallback)
forall a b. (a -> b) -> a -> b
$ do
    let cb' :: C_WidgetAccelClosuresChangedCallback
cb' = IO () -> C_WidgetAccelClosuresChangedCallback
wrap_WidgetStyleUpdatedCallback IO ()
cb
    C_WidgetAccelClosuresChangedCallback
-> IO (FunPtr C_WidgetAccelClosuresChangedCallback)
mk_WidgetStyleUpdatedCallback C_WidgetAccelClosuresChangedCallback
cb' IO (FunPtr C_WidgetAccelClosuresChangedCallback)
-> (FunPtr C_WidgetAccelClosuresChangedCallback
    -> IO (GClosure C_WidgetAccelClosuresChangedCallback))
-> IO (GClosure C_WidgetAccelClosuresChangedCallback)
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= FunPtr C_WidgetAccelClosuresChangedCallback
-> IO (GClosure C_WidgetAccelClosuresChangedCallback)
forall (m :: * -> *) a. MonadIO m => FunPtr a -> m (GClosure a)
B.GClosure.newGClosure


-- | Wrap a `WidgetStyleUpdatedCallback` into a `C_WidgetStyleUpdatedCallback`.
wrap_WidgetStyleUpdatedCallback ::
    WidgetStyleUpdatedCallback ->
    C_WidgetStyleUpdatedCallback
wrap_WidgetStyleUpdatedCallback :: IO () -> C_WidgetAccelClosuresChangedCallback
wrap_WidgetStyleUpdatedCallback _cb :: IO ()
_cb _ _ = do
    IO ()
_cb 


-- | Connect a signal handler for the [styleUpdated](#signal:styleUpdated) 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 #styleUpdated callback
-- @
-- 
-- 
onWidgetStyleUpdated :: (IsWidget a, MonadIO m) => a -> WidgetStyleUpdatedCallback -> m SignalHandlerId
onWidgetStyleUpdated :: a -> IO () -> m SignalHandlerId
onWidgetStyleUpdated obj :: a
obj cb :: IO ()
cb = IO SignalHandlerId -> m SignalHandlerId
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO SignalHandlerId -> m SignalHandlerId)
-> IO SignalHandlerId -> m SignalHandlerId
forall a b. (a -> b) -> a -> b
$ do
    let cb' :: C_WidgetAccelClosuresChangedCallback
cb' = IO () -> C_WidgetAccelClosuresChangedCallback
wrap_WidgetStyleUpdatedCallback IO ()
cb
    FunPtr C_WidgetAccelClosuresChangedCallback
cb'' <- C_WidgetAccelClosuresChangedCallback
-> IO (FunPtr C_WidgetAccelClosuresChangedCallback)
mk_WidgetStyleUpdatedCallback C_WidgetAccelClosuresChangedCallback
cb'
    a
-> Text
-> FunPtr C_WidgetAccelClosuresChangedCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj "style-updated" FunPtr C_WidgetAccelClosuresChangedCallback
cb'' SignalConnectMode
SignalConnectBefore Maybe Text
forall a. Maybe a
Nothing

-- | Connect a signal handler for the [styleUpdated](#signal:styleUpdated) 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 #styleUpdated callback
-- @
-- 
-- 
afterWidgetStyleUpdated :: (IsWidget a, MonadIO m) => a -> WidgetStyleUpdatedCallback -> m SignalHandlerId
afterWidgetStyleUpdated :: a -> IO () -> m SignalHandlerId
afterWidgetStyleUpdated obj :: a
obj cb :: IO ()
cb = IO SignalHandlerId -> m SignalHandlerId
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO SignalHandlerId -> m SignalHandlerId)
-> IO SignalHandlerId -> m SignalHandlerId
forall a b. (a -> b) -> a -> b
$ do
    let cb' :: C_WidgetAccelClosuresChangedCallback
cb' = IO () -> C_WidgetAccelClosuresChangedCallback
wrap_WidgetStyleUpdatedCallback IO ()
cb
    FunPtr C_WidgetAccelClosuresChangedCallback
cb'' <- C_WidgetAccelClosuresChangedCallback
-> IO (FunPtr C_WidgetAccelClosuresChangedCallback)
mk_WidgetStyleUpdatedCallback C_WidgetAccelClosuresChangedCallback
cb'
    a
-> Text
-> FunPtr C_WidgetAccelClosuresChangedCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj "style-updated" FunPtr C_WidgetAccelClosuresChangedCallback
cb'' SignalConnectMode
SignalConnectAfter Maybe Text
forall a. Maybe a
Nothing


#if defined(ENABLE_OVERLOADING)
data WidgetStyleUpdatedSignalInfo
instance SignalInfo WidgetStyleUpdatedSignalInfo where
    type HaskellCallbackType WidgetStyleUpdatedSignalInfo = WidgetStyleUpdatedCallback
    connectSignal obj cb connectMode detail = do
        let cb' = wrap_WidgetStyleUpdatedCallback cb
        cb'' <- mk_WidgetStyleUpdatedCallback cb'
        connectSignalFunPtr obj "style-updated" cb'' connectMode detail

#endif

-- signal Widget::unmap
-- | The [unmap](#signal:unmap) signal is emitted when /@widget@/ is going to be unmapped, which
-- means that either it or any of its parents up to the toplevel widget have
-- been set as hidden.
-- 
-- As [unmap](#signal:unmap) indicates that a widget will not be shown any longer, it can be
-- used to, for example, stop an animation on the widget.
type WidgetUnmapCallback =
    IO ()

-- | A convenience synonym for @`Nothing` :: `Maybe` `WidgetUnmapCallback`@.
noWidgetUnmapCallback :: Maybe WidgetUnmapCallback
noWidgetUnmapCallback :: Maybe (IO ())
noWidgetUnmapCallback = Maybe (IO ())
forall a. Maybe a
Nothing

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

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

-- | Wrap the callback into a `GClosure`.
genClosure_WidgetUnmap :: MonadIO m => WidgetUnmapCallback -> m (GClosure C_WidgetUnmapCallback)
genClosure_WidgetUnmap :: IO () -> m (GClosure C_WidgetAccelClosuresChangedCallback)
genClosure_WidgetUnmap cb :: IO ()
cb = IO (GClosure C_WidgetAccelClosuresChangedCallback)
-> m (GClosure C_WidgetAccelClosuresChangedCallback)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (GClosure C_WidgetAccelClosuresChangedCallback)
 -> m (GClosure C_WidgetAccelClosuresChangedCallback))
-> IO (GClosure C_WidgetAccelClosuresChangedCallback)
-> m (GClosure C_WidgetAccelClosuresChangedCallback)
forall a b. (a -> b) -> a -> b
$ do
    let cb' :: C_WidgetAccelClosuresChangedCallback
cb' = IO () -> C_WidgetAccelClosuresChangedCallback
wrap_WidgetUnmapCallback IO ()
cb
    C_WidgetAccelClosuresChangedCallback
-> IO (FunPtr C_WidgetAccelClosuresChangedCallback)
mk_WidgetUnmapCallback C_WidgetAccelClosuresChangedCallback
cb' IO (FunPtr C_WidgetAccelClosuresChangedCallback)
-> (FunPtr C_WidgetAccelClosuresChangedCallback
    -> IO (GClosure C_WidgetAccelClosuresChangedCallback))
-> IO (GClosure C_WidgetAccelClosuresChangedCallback)
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= FunPtr C_WidgetAccelClosuresChangedCallback
-> IO (GClosure C_WidgetAccelClosuresChangedCallback)
forall (m :: * -> *) a. MonadIO m => FunPtr a -> m (GClosure a)
B.GClosure.newGClosure


-- | Wrap a `WidgetUnmapCallback` into a `C_WidgetUnmapCallback`.
wrap_WidgetUnmapCallback ::
    WidgetUnmapCallback ->
    C_WidgetUnmapCallback
wrap_WidgetUnmapCallback :: IO () -> C_WidgetAccelClosuresChangedCallback
wrap_WidgetUnmapCallback _cb :: IO ()
_cb _ _ = do
    IO ()
_cb 


-- | Connect a signal handler for the [unmap](#signal:unmap) 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 #unmap callback
-- @
-- 
-- 
onWidgetUnmap :: (IsWidget a, MonadIO m) => a -> WidgetUnmapCallback -> m SignalHandlerId
onWidgetUnmap :: a -> IO () -> m SignalHandlerId
onWidgetUnmap obj :: a
obj cb :: IO ()
cb = IO SignalHandlerId -> m SignalHandlerId
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO SignalHandlerId -> m SignalHandlerId)
-> IO SignalHandlerId -> m SignalHandlerId
forall a b. (a -> b) -> a -> b
$ do
    let cb' :: C_WidgetAccelClosuresChangedCallback
cb' = IO () -> C_WidgetAccelClosuresChangedCallback
wrap_WidgetUnmapCallback IO ()
cb
    FunPtr C_WidgetAccelClosuresChangedCallback
cb'' <- C_WidgetAccelClosuresChangedCallback
-> IO (FunPtr C_WidgetAccelClosuresChangedCallback)
mk_WidgetUnmapCallback C_WidgetAccelClosuresChangedCallback
cb'
    a
-> Text
-> FunPtr C_WidgetAccelClosuresChangedCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj "unmap" FunPtr C_WidgetAccelClosuresChangedCallback
cb'' SignalConnectMode
SignalConnectBefore Maybe Text
forall a. Maybe a
Nothing

-- | Connect a signal handler for the [unmap](#signal:unmap) 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 #unmap callback
-- @
-- 
-- 
afterWidgetUnmap :: (IsWidget a, MonadIO m) => a -> WidgetUnmapCallback -> m SignalHandlerId
afterWidgetUnmap :: a -> IO () -> m SignalHandlerId
afterWidgetUnmap obj :: a
obj cb :: IO ()
cb = IO SignalHandlerId -> m SignalHandlerId
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO SignalHandlerId -> m SignalHandlerId)
-> IO SignalHandlerId -> m SignalHandlerId
forall a b. (a -> b) -> a -> b
$ do
    let cb' :: C_WidgetAccelClosuresChangedCallback
cb' = IO () -> C_WidgetAccelClosuresChangedCallback
wrap_WidgetUnmapCallback IO ()
cb
    FunPtr C_WidgetAccelClosuresChangedCallback
cb'' <- C_WidgetAccelClosuresChangedCallback
-> IO (FunPtr C_WidgetAccelClosuresChangedCallback)
mk_WidgetUnmapCallback C_WidgetAccelClosuresChangedCallback
cb'
    a
-> Text
-> FunPtr C_WidgetAccelClosuresChangedCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj "unmap" FunPtr C_WidgetAccelClosuresChangedCallback
cb'' SignalConnectMode
SignalConnectAfter Maybe Text
forall a. Maybe a
Nothing


#if defined(ENABLE_OVERLOADING)
data WidgetUnmapSignalInfo
instance SignalInfo WidgetUnmapSignalInfo where
    type HaskellCallbackType WidgetUnmapSignalInfo = WidgetUnmapCallback
    connectSignal obj cb connectMode detail = do
        let cb' = wrap_WidgetUnmapCallback cb
        cb'' <- mk_WidgetUnmapCallback cb'
        connectSignalFunPtr obj "unmap" cb'' connectMode detail

#endif

-- signal Widget::unrealize
-- | The [unrealize](#signal:unrealize) signal is emitted when the t'GI.Gdk.Objects.Surface.Surface' associated with
-- /@widget@/ is destroyed, which means that 'GI.Gtk.Objects.Widget.widgetUnrealize' has been
-- called or the widget has been unmapped (that is, it is going to be
-- hidden).
type WidgetUnrealizeCallback =
    IO ()

-- | A convenience synonym for @`Nothing` :: `Maybe` `WidgetUnrealizeCallback`@.
noWidgetUnrealizeCallback :: Maybe WidgetUnrealizeCallback
noWidgetUnrealizeCallback :: Maybe (IO ())
noWidgetUnrealizeCallback = Maybe (IO ())
forall a. Maybe a
Nothing

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

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

-- | Wrap the callback into a `GClosure`.
genClosure_WidgetUnrealize :: MonadIO m => WidgetUnrealizeCallback -> m (GClosure C_WidgetUnrealizeCallback)
genClosure_WidgetUnrealize :: IO () -> m (GClosure C_WidgetAccelClosuresChangedCallback)
genClosure_WidgetUnrealize cb :: IO ()
cb = IO (GClosure C_WidgetAccelClosuresChangedCallback)
-> m (GClosure C_WidgetAccelClosuresChangedCallback)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (GClosure C_WidgetAccelClosuresChangedCallback)
 -> m (GClosure C_WidgetAccelClosuresChangedCallback))
-> IO (GClosure C_WidgetAccelClosuresChangedCallback)
-> m (GClosure C_WidgetAccelClosuresChangedCallback)
forall a b. (a -> b) -> a -> b
$ do
    let cb' :: C_WidgetAccelClosuresChangedCallback
cb' = IO () -> C_WidgetAccelClosuresChangedCallback
wrap_WidgetUnrealizeCallback IO ()
cb
    C_WidgetAccelClosuresChangedCallback
-> IO (FunPtr C_WidgetAccelClosuresChangedCallback)
mk_WidgetUnrealizeCallback C_WidgetAccelClosuresChangedCallback
cb' IO (FunPtr C_WidgetAccelClosuresChangedCallback)
-> (FunPtr C_WidgetAccelClosuresChangedCallback
    -> IO (GClosure C_WidgetAccelClosuresChangedCallback))
-> IO (GClosure C_WidgetAccelClosuresChangedCallback)
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= FunPtr C_WidgetAccelClosuresChangedCallback
-> IO (GClosure C_WidgetAccelClosuresChangedCallback)
forall (m :: * -> *) a. MonadIO m => FunPtr a -> m (GClosure a)
B.GClosure.newGClosure


-- | Wrap a `WidgetUnrealizeCallback` into a `C_WidgetUnrealizeCallback`.
wrap_WidgetUnrealizeCallback ::
    WidgetUnrealizeCallback ->
    C_WidgetUnrealizeCallback
wrap_WidgetUnrealizeCallback :: IO () -> C_WidgetAccelClosuresChangedCallback
wrap_WidgetUnrealizeCallback _cb :: IO ()
_cb _ _ = do
    IO ()
_cb 


-- | Connect a signal handler for the [unrealize](#signal:unrealize) 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 #unrealize callback
-- @
-- 
-- 
onWidgetUnrealize :: (IsWidget a, MonadIO m) => a -> WidgetUnrealizeCallback -> m SignalHandlerId
onWidgetUnrealize :: a -> IO () -> m SignalHandlerId
onWidgetUnrealize obj :: a
obj cb :: IO ()
cb = IO SignalHandlerId -> m SignalHandlerId
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO SignalHandlerId -> m SignalHandlerId)
-> IO SignalHandlerId -> m SignalHandlerId
forall a b. (a -> b) -> a -> b
$ do
    let cb' :: C_WidgetAccelClosuresChangedCallback
cb' = IO () -> C_WidgetAccelClosuresChangedCallback
wrap_WidgetUnrealizeCallback IO ()
cb
    FunPtr C_WidgetAccelClosuresChangedCallback
cb'' <- C_WidgetAccelClosuresChangedCallback
-> IO (FunPtr C_WidgetAccelClosuresChangedCallback)
mk_WidgetUnrealizeCallback C_WidgetAccelClosuresChangedCallback
cb'
    a
-> Text
-> FunPtr C_WidgetAccelClosuresChangedCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj "unrealize" FunPtr C_WidgetAccelClosuresChangedCallback
cb'' SignalConnectMode
SignalConnectBefore Maybe Text
forall a. Maybe a
Nothing

-- | Connect a signal handler for the [unrealize](#signal:unrealize) 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 #unrealize callback
-- @
-- 
-- 
afterWidgetUnrealize :: (IsWidget a, MonadIO m) => a -> WidgetUnrealizeCallback -> m SignalHandlerId
afterWidgetUnrealize :: a -> IO () -> m SignalHandlerId
afterWidgetUnrealize obj :: a
obj cb :: IO ()
cb = IO SignalHandlerId -> m SignalHandlerId
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO SignalHandlerId -> m SignalHandlerId)
-> IO SignalHandlerId -> m SignalHandlerId
forall a b. (a -> b) -> a -> b
$ do
    let cb' :: C_WidgetAccelClosuresChangedCallback
cb' = IO () -> C_WidgetAccelClosuresChangedCallback
wrap_WidgetUnrealizeCallback IO ()
cb
    FunPtr C_WidgetAccelClosuresChangedCallback
cb'' <- C_WidgetAccelClosuresChangedCallback
-> IO (FunPtr C_WidgetAccelClosuresChangedCallback)
mk_WidgetUnrealizeCallback C_WidgetAccelClosuresChangedCallback
cb'
    a
-> Text
-> FunPtr C_WidgetAccelClosuresChangedCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj "unrealize" FunPtr C_WidgetAccelClosuresChangedCallback
cb'' SignalConnectMode
SignalConnectAfter Maybe Text
forall a. Maybe a
Nothing


#if defined(ENABLE_OVERLOADING)
data WidgetUnrealizeSignalInfo
instance SignalInfo WidgetUnrealizeSignalInfo where
    type HaskellCallbackType WidgetUnrealizeSignalInfo = WidgetUnrealizeCallback
    connectSignal obj cb connectMode detail = do
        let cb' = wrap_WidgetUnrealizeCallback cb
        cb'' <- mk_WidgetUnrealizeCallback cb'
        connectSignalFunPtr obj "unrealize" cb'' connectMode detail

#endif

-- VVV Prop "can-focus"
   -- Type: TBasicType TBoolean
   -- Flags: [PropertyReadable,PropertyWritable]
   -- Nullable: (Just False,Just False)

-- | Get the value of the “@can-focus@” property.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Attributes.get' widget #canFocus
-- @
getWidgetCanFocus :: (MonadIO m, IsWidget o) => o -> m Bool
getWidgetCanFocus :: o -> m Bool
getWidgetCanFocus obj :: o
obj = WidgetPopupMenuCallback -> m Bool
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (WidgetPopupMenuCallback -> m Bool)
-> WidgetPopupMenuCallback -> m Bool
forall a b. (a -> b) -> a -> b
$ o -> String -> WidgetPopupMenuCallback
forall a. GObject a => a -> String -> WidgetPopupMenuCallback
B.Properties.getObjectPropertyBool o
obj "can-focus"

-- | Set the value of the “@can-focus@” property.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Attributes.set' widget [ #canFocus 'Data.GI.Base.Attributes.:=' value ]
-- @
setWidgetCanFocus :: (MonadIO m, IsWidget o) => o -> Bool -> m ()
setWidgetCanFocus :: o -> Bool -> m ()
setWidgetCanFocus obj :: o
obj val :: Bool
val = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ o -> String -> WidgetGrabNotifyCallback
forall a. GObject a => a -> String -> WidgetGrabNotifyCallback
B.Properties.setObjectPropertyBool o
obj "can-focus" Bool
val

-- | Construct a `GValueConstruct` with valid value for the “@can-focus@” property. This is rarely needed directly, but it is used by `Data.GI.Base.Constructible.new`.
constructWidgetCanFocus :: (IsWidget o) => Bool -> IO (GValueConstruct o)
constructWidgetCanFocus :: Bool -> IO (GValueConstruct o)
constructWidgetCanFocus val :: Bool
val = String -> Bool -> IO (GValueConstruct o)
forall o. String -> Bool -> IO (GValueConstruct o)
B.Properties.constructObjectPropertyBool "can-focus" Bool
val

#if defined(ENABLE_OVERLOADING)
data WidgetCanFocusPropertyInfo
instance AttrInfo WidgetCanFocusPropertyInfo where
    type AttrAllowedOps WidgetCanFocusPropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet]
    type AttrBaseTypeConstraint WidgetCanFocusPropertyInfo = IsWidget
    type AttrSetTypeConstraint WidgetCanFocusPropertyInfo = (~) Bool
    type AttrTransferTypeConstraint WidgetCanFocusPropertyInfo = (~) Bool
    type AttrTransferType WidgetCanFocusPropertyInfo = Bool
    type AttrGetType WidgetCanFocusPropertyInfo = Bool
    type AttrLabel WidgetCanFocusPropertyInfo = "can-focus"
    type AttrOrigin WidgetCanFocusPropertyInfo = Widget
    attrGet = getWidgetCanFocus
    attrSet = setWidgetCanFocus
    attrTransfer _ v = do
        return v
    attrConstruct = constructWidgetCanFocus
    attrClear = undefined
#endif

-- VVV Prop "can-target"
   -- Type: TBasicType TBoolean
   -- Flags: [PropertyReadable,PropertyWritable]
   -- Nullable: (Just False,Just False)

-- | Get the value of the “@can-target@” property.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Attributes.get' widget #canTarget
-- @
getWidgetCanTarget :: (MonadIO m, IsWidget o) => o -> m Bool
getWidgetCanTarget :: o -> m Bool
getWidgetCanTarget obj :: o
obj = WidgetPopupMenuCallback -> m Bool
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (WidgetPopupMenuCallback -> m Bool)
-> WidgetPopupMenuCallback -> m Bool
forall a b. (a -> b) -> a -> b
$ o -> String -> WidgetPopupMenuCallback
forall a. GObject a => a -> String -> WidgetPopupMenuCallback
B.Properties.getObjectPropertyBool o
obj "can-target"

-- | Set the value of the “@can-target@” property.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Attributes.set' widget [ #canTarget 'Data.GI.Base.Attributes.:=' value ]
-- @
setWidgetCanTarget :: (MonadIO m, IsWidget o) => o -> Bool -> m ()
setWidgetCanTarget :: o -> Bool -> m ()
setWidgetCanTarget obj :: o
obj val :: Bool
val = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ o -> String -> WidgetGrabNotifyCallback
forall a. GObject a => a -> String -> WidgetGrabNotifyCallback
B.Properties.setObjectPropertyBool o
obj "can-target" Bool
val

-- | Construct a `GValueConstruct` with valid value for the “@can-target@” property. This is rarely needed directly, but it is used by `Data.GI.Base.Constructible.new`.
constructWidgetCanTarget :: (IsWidget o) => Bool -> IO (GValueConstruct o)
constructWidgetCanTarget :: Bool -> IO (GValueConstruct o)
constructWidgetCanTarget val :: Bool
val = String -> Bool -> IO (GValueConstruct o)
forall o. String -> Bool -> IO (GValueConstruct o)
B.Properties.constructObjectPropertyBool "can-target" Bool
val

#if defined(ENABLE_OVERLOADING)
data WidgetCanTargetPropertyInfo
instance AttrInfo WidgetCanTargetPropertyInfo where
    type AttrAllowedOps WidgetCanTargetPropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet]
    type AttrBaseTypeConstraint WidgetCanTargetPropertyInfo = IsWidget
    type AttrSetTypeConstraint WidgetCanTargetPropertyInfo = (~) Bool
    type AttrTransferTypeConstraint WidgetCanTargetPropertyInfo = (~) Bool
    type AttrTransferType WidgetCanTargetPropertyInfo = Bool
    type AttrGetType WidgetCanTargetPropertyInfo = Bool
    type AttrLabel WidgetCanTargetPropertyInfo = "can-target"
    type AttrOrigin WidgetCanTargetPropertyInfo = Widget
    attrGet = getWidgetCanTarget
    attrSet = setWidgetCanTarget
    attrTransfer _ v = do
        return v
    attrConstruct = constructWidgetCanTarget
    attrClear = undefined
#endif

-- VVV Prop "css-name"
   -- Type: TBasicType TUTF8
   -- Flags: [PropertyReadable,PropertyWritable,PropertyConstructOnly]
   -- Nullable: (Nothing,Nothing)

-- | Get the value of the “@css-name@” property.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Attributes.get' widget #cssName
-- @
getWidgetCssName :: (MonadIO m, IsWidget o) => o -> m (Maybe T.Text)
getWidgetCssName :: o -> m (Maybe Text)
getWidgetCssName obj :: o
obj = IO (Maybe Text) -> m (Maybe Text)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Maybe Text) -> m (Maybe Text))
-> IO (Maybe Text) -> m (Maybe Text)
forall a b. (a -> b) -> a -> b
$ o -> String -> IO (Maybe Text)
forall a. GObject a => a -> String -> IO (Maybe Text)
B.Properties.getObjectPropertyString o
obj "css-name"

-- | Construct a `GValueConstruct` with valid value for the “@css-name@” property. This is rarely needed directly, but it is used by `Data.GI.Base.Constructible.new`.
constructWidgetCssName :: (IsWidget o) => T.Text -> IO (GValueConstruct o)
constructWidgetCssName :: Text -> IO (GValueConstruct o)
constructWidgetCssName val :: Text
val = String -> Maybe Text -> IO (GValueConstruct o)
forall o. String -> Maybe Text -> IO (GValueConstruct o)
B.Properties.constructObjectPropertyString "css-name" (Text -> Maybe Text
forall a. a -> Maybe a
Just Text
val)

#if defined(ENABLE_OVERLOADING)
data WidgetCssNamePropertyInfo
instance AttrInfo WidgetCssNamePropertyInfo where
    type AttrAllowedOps WidgetCssNamePropertyInfo = '[ 'AttrConstruct, 'AttrGet, 'AttrClear]
    type AttrBaseTypeConstraint WidgetCssNamePropertyInfo = IsWidget
    type AttrSetTypeConstraint WidgetCssNamePropertyInfo = (~) T.Text
    type AttrTransferTypeConstraint WidgetCssNamePropertyInfo = (~) T.Text
    type AttrTransferType WidgetCssNamePropertyInfo = T.Text
    type AttrGetType WidgetCssNamePropertyInfo = (Maybe T.Text)
    type AttrLabel WidgetCssNamePropertyInfo = "css-name"
    type AttrOrigin WidgetCssNamePropertyInfo = Widget
    attrGet = getWidgetCssName
    attrSet = undefined
    attrTransfer _ v = do
        return v
    attrConstruct = constructWidgetCssName
    attrClear = undefined
#endif

-- VVV Prop "cursor"
   -- Type: TInterface (Name {namespace = "Gdk", name = "Cursor"})
   -- Flags: [PropertyReadable,PropertyWritable]
   -- Nullable: (Just True,Just True)

-- | Get the value of the “@cursor@” property.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Attributes.get' widget #cursor
-- @
getWidgetCursor :: (MonadIO m, IsWidget o) => o -> m (Maybe Gdk.Cursor.Cursor)
getWidgetCursor :: o -> m (Maybe Cursor)
getWidgetCursor obj :: o
obj = IO (Maybe Cursor) -> m (Maybe Cursor)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Maybe Cursor) -> m (Maybe Cursor))
-> IO (Maybe Cursor) -> m (Maybe Cursor)
forall a b. (a -> b) -> a -> b
$ o -> String -> (ManagedPtr Cursor -> Cursor) -> IO (Maybe Cursor)
forall a b.
(GObject a, GObject b) =>
a -> String -> (ManagedPtr b -> b) -> IO (Maybe b)
B.Properties.getObjectPropertyObject o
obj "cursor" ManagedPtr Cursor -> Cursor
Gdk.Cursor.Cursor

-- | Set the value of the “@cursor@” property.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Attributes.set' widget [ #cursor 'Data.GI.Base.Attributes.:=' value ]
-- @
setWidgetCursor :: (MonadIO m, IsWidget o, Gdk.Cursor.IsCursor a) => o -> a -> m ()
setWidgetCursor :: o -> a -> m ()
setWidgetCursor obj :: o
obj val :: a
val = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ o -> String -> Maybe a -> IO ()
forall a b.
(GObject a, GObject b) =>
a -> String -> Maybe b -> IO ()
B.Properties.setObjectPropertyObject o
obj "cursor" (a -> Maybe a
forall a. a -> Maybe a
Just a
val)

-- | Construct a `GValueConstruct` with valid value for the “@cursor@” property. This is rarely needed directly, but it is used by `Data.GI.Base.Constructible.new`.
constructWidgetCursor :: (IsWidget o, Gdk.Cursor.IsCursor a) => a -> IO (GValueConstruct o)
constructWidgetCursor :: a -> IO (GValueConstruct o)
constructWidgetCursor val :: a
val = String -> Maybe a -> IO (GValueConstruct o)
forall a o.
GObject a =>
String -> Maybe a -> IO (GValueConstruct o)
B.Properties.constructObjectPropertyObject "cursor" (a -> Maybe a
forall a. a -> Maybe a
Just a
val)

-- | Set the value of the “@cursor@” property to `Nothing`.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Attributes.clear' #cursor
-- @
clearWidgetCursor :: (MonadIO m, IsWidget o) => o -> m ()
clearWidgetCursor :: o -> m ()
clearWidgetCursor obj :: o
obj = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ o -> String -> Maybe Cursor -> IO ()
forall a b.
(GObject a, GObject b) =>
a -> String -> Maybe b -> IO ()
B.Properties.setObjectPropertyObject o
obj "cursor" (Maybe Cursor
forall a. Maybe a
Nothing :: Maybe Gdk.Cursor.Cursor)

#if defined(ENABLE_OVERLOADING)
data WidgetCursorPropertyInfo
instance AttrInfo WidgetCursorPropertyInfo where
    type AttrAllowedOps WidgetCursorPropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet, 'AttrClear]
    type AttrBaseTypeConstraint WidgetCursorPropertyInfo = IsWidget
    type AttrSetTypeConstraint WidgetCursorPropertyInfo = Gdk.Cursor.IsCursor
    type AttrTransferTypeConstraint WidgetCursorPropertyInfo = Gdk.Cursor.IsCursor
    type AttrTransferType WidgetCursorPropertyInfo = Gdk.Cursor.Cursor
    type AttrGetType WidgetCursorPropertyInfo = (Maybe Gdk.Cursor.Cursor)
    type AttrLabel WidgetCursorPropertyInfo = "cursor"
    type AttrOrigin WidgetCursorPropertyInfo = Widget
    attrGet = getWidgetCursor
    attrSet = setWidgetCursor
    attrTransfer _ v = do
        unsafeCastTo Gdk.Cursor.Cursor v
    attrConstruct = constructWidgetCursor
    attrClear = clearWidgetCursor
#endif

-- VVV Prop "expand"
   -- Type: TBasicType TBoolean
   -- Flags: [PropertyReadable,PropertyWritable]
   -- Nullable: (Nothing,Nothing)

-- | Get the value of the “@expand@” property.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Attributes.get' widget #expand
-- @
getWidgetExpand :: (MonadIO m, IsWidget o) => o -> m Bool
getWidgetExpand :: o -> m Bool
getWidgetExpand obj :: o
obj = WidgetPopupMenuCallback -> m Bool
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (WidgetPopupMenuCallback -> m Bool)
-> WidgetPopupMenuCallback -> m Bool
forall a b. (a -> b) -> a -> b
$ o -> String -> WidgetPopupMenuCallback
forall a. GObject a => a -> String -> WidgetPopupMenuCallback
B.Properties.getObjectPropertyBool o
obj "expand"

-- | Set the value of the “@expand@” property.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Attributes.set' widget [ #expand 'Data.GI.Base.Attributes.:=' value ]
-- @
setWidgetExpand :: (MonadIO m, IsWidget o) => o -> Bool -> m ()
setWidgetExpand :: o -> Bool -> m ()
setWidgetExpand obj :: o
obj val :: Bool
val = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ o -> String -> WidgetGrabNotifyCallback
forall a. GObject a => a -> String -> WidgetGrabNotifyCallback
B.Properties.setObjectPropertyBool o
obj "expand" Bool
val

-- | Construct a `GValueConstruct` with valid value for the “@expand@” property. This is rarely needed directly, but it is used by `Data.GI.Base.Constructible.new`.
constructWidgetExpand :: (IsWidget o) => Bool -> IO (GValueConstruct o)
constructWidgetExpand :: Bool -> IO (GValueConstruct o)
constructWidgetExpand val :: Bool
val = String -> Bool -> IO (GValueConstruct o)
forall o. String -> Bool -> IO (GValueConstruct o)
B.Properties.constructObjectPropertyBool "expand" Bool
val

#if defined(ENABLE_OVERLOADING)
data WidgetExpandPropertyInfo
instance AttrInfo WidgetExpandPropertyInfo where
    type AttrAllowedOps WidgetExpandPropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet]
    type AttrBaseTypeConstraint WidgetExpandPropertyInfo = IsWidget
    type AttrSetTypeConstraint WidgetExpandPropertyInfo = (~) Bool
    type AttrTransferTypeConstraint WidgetExpandPropertyInfo = (~) Bool
    type AttrTransferType WidgetExpandPropertyInfo = Bool
    type AttrGetType WidgetExpandPropertyInfo = Bool
    type AttrLabel WidgetExpandPropertyInfo = "expand"
    type AttrOrigin WidgetExpandPropertyInfo = Widget
    attrGet = getWidgetExpand
    attrSet = setWidgetExpand
    attrTransfer _ v = do
        return v
    attrConstruct = constructWidgetExpand
    attrClear = undefined
#endif

-- VVV Prop "focus-on-click"
   -- Type: TBasicType TBoolean
   -- Flags: [PropertyReadable,PropertyWritable]
   -- Nullable: (Just False,Just False)

-- | Get the value of the “@focus-on-click@” property.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Attributes.get' widget #focusOnClick
-- @
getWidgetFocusOnClick :: (MonadIO m, IsWidget o) => o -> m Bool
getWidgetFocusOnClick :: o -> m Bool
getWidgetFocusOnClick obj :: o
obj = WidgetPopupMenuCallback -> m Bool
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (WidgetPopupMenuCallback -> m Bool)
-> WidgetPopupMenuCallback -> m Bool
forall a b. (a -> b) -> a -> b
$ o -> String -> WidgetPopupMenuCallback
forall a. GObject a => a -> String -> WidgetPopupMenuCallback
B.Properties.getObjectPropertyBool o
obj "focus-on-click"

-- | Set the value of the “@focus-on-click@” property.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Attributes.set' widget [ #focusOnClick 'Data.GI.Base.Attributes.:=' value ]
-- @
setWidgetFocusOnClick :: (MonadIO m, IsWidget o) => o -> Bool -> m ()
setWidgetFocusOnClick :: o -> Bool -> m ()
setWidgetFocusOnClick obj :: o
obj val :: Bool
val = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ o -> String -> WidgetGrabNotifyCallback
forall a. GObject a => a -> String -> WidgetGrabNotifyCallback
B.Properties.setObjectPropertyBool o
obj "focus-on-click" Bool
val

-- | Construct a `GValueConstruct` with valid value for the “@focus-on-click@” property. This is rarely needed directly, but it is used by `Data.GI.Base.Constructible.new`.
constructWidgetFocusOnClick :: (IsWidget o) => Bool -> IO (GValueConstruct o)
constructWidgetFocusOnClick :: Bool -> IO (GValueConstruct o)
constructWidgetFocusOnClick val :: Bool
val = String -> Bool -> IO (GValueConstruct o)
forall o. String -> Bool -> IO (GValueConstruct o)
B.Properties.constructObjectPropertyBool "focus-on-click" Bool
val

#if defined(ENABLE_OVERLOADING)
data WidgetFocusOnClickPropertyInfo
instance AttrInfo WidgetFocusOnClickPropertyInfo where
    type AttrAllowedOps WidgetFocusOnClickPropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet]
    type AttrBaseTypeConstraint WidgetFocusOnClickPropertyInfo = IsWidget
    type AttrSetTypeConstraint WidgetFocusOnClickPropertyInfo = (~) Bool
    type AttrTransferTypeConstraint WidgetFocusOnClickPropertyInfo = (~) Bool
    type AttrTransferType WidgetFocusOnClickPropertyInfo = Bool
    type AttrGetType WidgetFocusOnClickPropertyInfo = Bool
    type AttrLabel WidgetFocusOnClickPropertyInfo = "focus-on-click"
    type AttrOrigin WidgetFocusOnClickPropertyInfo = Widget
    attrGet = getWidgetFocusOnClick
    attrSet = setWidgetFocusOnClick
    attrTransfer _ v = do
        return v
    attrConstruct = constructWidgetFocusOnClick
    attrClear = undefined
#endif

-- VVV Prop "halign"
   -- Type: TInterface (Name {namespace = "Gtk", name = "Align"})
   -- Flags: [PropertyReadable,PropertyWritable]
   -- Nullable: (Just False,Just False)

-- | Get the value of the “@halign@” property.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Attributes.get' widget #halign
-- @
getWidgetHalign :: (MonadIO m, IsWidget o) => o -> m Gtk.Enums.Align
getWidgetHalign :: o -> m Align
getWidgetHalign obj :: o
obj = IO Align -> m Align
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Align -> m Align) -> IO Align -> m Align
forall a b. (a -> b) -> a -> b
$ o -> String -> IO Align
forall a b. (GObject a, Enum b, BoxedEnum b) => a -> String -> IO b
B.Properties.getObjectPropertyEnum o
obj "halign"

-- | Set the value of the “@halign@” property.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Attributes.set' widget [ #halign 'Data.GI.Base.Attributes.:=' value ]
-- @
setWidgetHalign :: (MonadIO m, IsWidget o) => o -> Gtk.Enums.Align -> m ()
setWidgetHalign :: o -> Align -> m ()
setWidgetHalign obj :: o
obj val :: Align
val = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ o -> String -> Align -> IO ()
forall a b.
(GObject a, Enum b, BoxedEnum b) =>
a -> String -> b -> IO ()
B.Properties.setObjectPropertyEnum o
obj "halign" Align
val

-- | Construct a `GValueConstruct` with valid value for the “@halign@” property. This is rarely needed directly, but it is used by `Data.GI.Base.Constructible.new`.
constructWidgetHalign :: (IsWidget o) => Gtk.Enums.Align -> IO (GValueConstruct o)
constructWidgetHalign :: Align -> IO (GValueConstruct o)
constructWidgetHalign val :: Align
val = String -> Align -> IO (GValueConstruct o)
forall a o.
(Enum a, BoxedEnum a) =>
String -> a -> IO (GValueConstruct o)
B.Properties.constructObjectPropertyEnum "halign" Align
val

#if defined(ENABLE_OVERLOADING)
data WidgetHalignPropertyInfo
instance AttrInfo WidgetHalignPropertyInfo where
    type AttrAllowedOps WidgetHalignPropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet]
    type AttrBaseTypeConstraint WidgetHalignPropertyInfo = IsWidget
    type AttrSetTypeConstraint WidgetHalignPropertyInfo = (~) Gtk.Enums.Align
    type AttrTransferTypeConstraint WidgetHalignPropertyInfo = (~) Gtk.Enums.Align
    type AttrTransferType WidgetHalignPropertyInfo = Gtk.Enums.Align
    type AttrGetType WidgetHalignPropertyInfo = Gtk.Enums.Align
    type AttrLabel WidgetHalignPropertyInfo = "halign"
    type AttrOrigin WidgetHalignPropertyInfo = Widget
    attrGet = getWidgetHalign
    attrSet = setWidgetHalign
    attrTransfer _ v = do
        return v
    attrConstruct = constructWidgetHalign
    attrClear = undefined
#endif

-- VVV Prop "has-default"
   -- Type: TBasicType TBoolean
   -- Flags: [PropertyReadable]
   -- Nullable: (Nothing,Nothing)

-- | Get the value of the “@has-default@” property.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Attributes.get' widget #hasDefault
-- @
getWidgetHasDefault :: (MonadIO m, IsWidget o) => o -> m Bool
getWidgetHasDefault :: o -> m Bool
getWidgetHasDefault obj :: o
obj = WidgetPopupMenuCallback -> m Bool
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (WidgetPopupMenuCallback -> m Bool)
-> WidgetPopupMenuCallback -> m Bool
forall a b. (a -> b) -> a -> b
$ o -> String -> WidgetPopupMenuCallback
forall a. GObject a => a -> String -> WidgetPopupMenuCallback
B.Properties.getObjectPropertyBool o
obj "has-default"

#if defined(ENABLE_OVERLOADING)
data WidgetHasDefaultPropertyInfo
instance AttrInfo WidgetHasDefaultPropertyInfo where
    type AttrAllowedOps WidgetHasDefaultPropertyInfo = '[ 'AttrGet]
    type AttrBaseTypeConstraint WidgetHasDefaultPropertyInfo = IsWidget
    type AttrSetTypeConstraint WidgetHasDefaultPropertyInfo = (~) ()
    type AttrTransferTypeConstraint WidgetHasDefaultPropertyInfo = (~) ()
    type AttrTransferType WidgetHasDefaultPropertyInfo = ()
    type AttrGetType WidgetHasDefaultPropertyInfo = Bool
    type AttrLabel WidgetHasDefaultPropertyInfo = "has-default"
    type AttrOrigin WidgetHasDefaultPropertyInfo = Widget
    attrGet = getWidgetHasDefault
    attrSet = undefined
    attrTransfer _ = undefined
    attrConstruct = undefined
    attrClear = undefined
#endif

-- VVV Prop "has-focus"
   -- Type: TBasicType TBoolean
   -- Flags: [PropertyReadable,PropertyWritable]
   -- Nullable: (Nothing,Nothing)

-- | Get the value of the “@has-focus@” property.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Attributes.get' widget #hasFocus
-- @
getWidgetHasFocus :: (MonadIO m, IsWidget o) => o -> m Bool
getWidgetHasFocus :: o -> m Bool
getWidgetHasFocus obj :: o
obj = WidgetPopupMenuCallback -> m Bool
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (WidgetPopupMenuCallback -> m Bool)
-> WidgetPopupMenuCallback -> m Bool
forall a b. (a -> b) -> a -> b
$ o -> String -> WidgetPopupMenuCallback
forall a. GObject a => a -> String -> WidgetPopupMenuCallback
B.Properties.getObjectPropertyBool o
obj "has-focus"

-- | Set the value of the “@has-focus@” property.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Attributes.set' widget [ #hasFocus 'Data.GI.Base.Attributes.:=' value ]
-- @
setWidgetHasFocus :: (MonadIO m, IsWidget o) => o -> Bool -> m ()
setWidgetHasFocus :: o -> Bool -> m ()
setWidgetHasFocus obj :: o
obj val :: Bool
val = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ o -> String -> WidgetGrabNotifyCallback
forall a. GObject a => a -> String -> WidgetGrabNotifyCallback
B.Properties.setObjectPropertyBool o
obj "has-focus" Bool
val

-- | Construct a `GValueConstruct` with valid value for the “@has-focus@” property. This is rarely needed directly, but it is used by `Data.GI.Base.Constructible.new`.
constructWidgetHasFocus :: (IsWidget o) => Bool -> IO (GValueConstruct o)
constructWidgetHasFocus :: Bool -> IO (GValueConstruct o)
constructWidgetHasFocus val :: Bool
val = String -> Bool -> IO (GValueConstruct o)
forall o. String -> Bool -> IO (GValueConstruct o)
B.Properties.constructObjectPropertyBool "has-focus" Bool
val

#if defined(ENABLE_OVERLOADING)
data WidgetHasFocusPropertyInfo
instance AttrInfo WidgetHasFocusPropertyInfo where
    type AttrAllowedOps WidgetHasFocusPropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet]
    type AttrBaseTypeConstraint WidgetHasFocusPropertyInfo = IsWidget
    type AttrSetTypeConstraint WidgetHasFocusPropertyInfo = (~) Bool
    type AttrTransferTypeConstraint WidgetHasFocusPropertyInfo = (~) Bool
    type AttrTransferType WidgetHasFocusPropertyInfo = Bool
    type AttrGetType WidgetHasFocusPropertyInfo = Bool
    type AttrLabel WidgetHasFocusPropertyInfo = "has-focus"
    type AttrOrigin WidgetHasFocusPropertyInfo = Widget
    attrGet = getWidgetHasFocus
    attrSet = setWidgetHasFocus
    attrTransfer _ v = do
        return v
    attrConstruct = constructWidgetHasFocus
    attrClear = undefined
#endif

-- VVV Prop "has-tooltip"
   -- Type: TBasicType TBoolean
   -- Flags: [PropertyReadable,PropertyWritable]
   -- Nullable: (Just False,Just False)

-- | Get the value of the “@has-tooltip@” property.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Attributes.get' widget #hasTooltip
-- @
getWidgetHasTooltip :: (MonadIO m, IsWidget o) => o -> m Bool
getWidgetHasTooltip :: o -> m Bool
getWidgetHasTooltip obj :: o
obj = WidgetPopupMenuCallback -> m Bool
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (WidgetPopupMenuCallback -> m Bool)
-> WidgetPopupMenuCallback -> m Bool
forall a b. (a -> b) -> a -> b
$ o -> String -> WidgetPopupMenuCallback
forall a. GObject a => a -> String -> WidgetPopupMenuCallback
B.Properties.getObjectPropertyBool o
obj "has-tooltip"

-- | Set the value of the “@has-tooltip@” property.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Attributes.set' widget [ #hasTooltip 'Data.GI.Base.Attributes.:=' value ]
-- @
setWidgetHasTooltip :: (MonadIO m, IsWidget o) => o -> Bool -> m ()
setWidgetHasTooltip :: o -> Bool -> m ()
setWidgetHasTooltip obj :: o
obj val :: Bool
val = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ o -> String -> WidgetGrabNotifyCallback
forall a. GObject a => a -> String -> WidgetGrabNotifyCallback
B.Properties.setObjectPropertyBool o
obj "has-tooltip" Bool
val

-- | Construct a `GValueConstruct` with valid value for the “@has-tooltip@” property. This is rarely needed directly, but it is used by `Data.GI.Base.Constructible.new`.
constructWidgetHasTooltip :: (IsWidget o) => Bool -> IO (GValueConstruct o)
constructWidgetHasTooltip :: Bool -> IO (GValueConstruct o)
constructWidgetHasTooltip val :: Bool
val = String -> Bool -> IO (GValueConstruct o)
forall o. String -> Bool -> IO (GValueConstruct o)
B.Properties.constructObjectPropertyBool "has-tooltip" Bool
val

#if defined(ENABLE_OVERLOADING)
data WidgetHasTooltipPropertyInfo
instance AttrInfo WidgetHasTooltipPropertyInfo where
    type AttrAllowedOps WidgetHasTooltipPropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet]
    type AttrBaseTypeConstraint WidgetHasTooltipPropertyInfo = IsWidget
    type AttrSetTypeConstraint WidgetHasTooltipPropertyInfo = (~) Bool
    type AttrTransferTypeConstraint WidgetHasTooltipPropertyInfo = (~) Bool
    type AttrTransferType WidgetHasTooltipPropertyInfo = Bool
    type AttrGetType WidgetHasTooltipPropertyInfo = Bool
    type AttrLabel WidgetHasTooltipPropertyInfo = "has-tooltip"
    type AttrOrigin WidgetHasTooltipPropertyInfo = Widget
    attrGet = getWidgetHasTooltip
    attrSet = setWidgetHasTooltip
    attrTransfer _ v = do
        return v
    attrConstruct = constructWidgetHasTooltip
    attrClear = undefined
#endif

-- VVV Prop "height-request"
   -- Type: TBasicType TInt
   -- Flags: [PropertyReadable,PropertyWritable]
   -- Nullable: (Nothing,Nothing)

-- | Get the value of the “@height-request@” property.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Attributes.get' widget #heightRequest
-- @
getWidgetHeightRequest :: (MonadIO m, IsWidget o) => o -> m Int32
getWidgetHeightRequest :: o -> m Int32
getWidgetHeightRequest obj :: o
obj = IO Int32 -> m Int32
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Int32 -> m Int32) -> IO Int32 -> m Int32
forall a b. (a -> b) -> a -> b
$ o -> String -> IO Int32
forall a. GObject a => a -> String -> IO Int32
B.Properties.getObjectPropertyInt32 o
obj "height-request"

-- | Set the value of the “@height-request@” property.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Attributes.set' widget [ #heightRequest 'Data.GI.Base.Attributes.:=' value ]
-- @
setWidgetHeightRequest :: (MonadIO m, IsWidget o) => o -> Int32 -> m ()
setWidgetHeightRequest :: o -> Int32 -> m ()
setWidgetHeightRequest obj :: o
obj val :: Int32
val = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ o -> String -> Int32 -> IO ()
forall a. GObject a => a -> String -> Int32 -> IO ()
B.Properties.setObjectPropertyInt32 o
obj "height-request" Int32
val

-- | Construct a `GValueConstruct` with valid value for the “@height-request@” property. This is rarely needed directly, but it is used by `Data.GI.Base.Constructible.new`.
constructWidgetHeightRequest :: (IsWidget o) => Int32 -> IO (GValueConstruct o)
constructWidgetHeightRequest :: Int32 -> IO (GValueConstruct o)
constructWidgetHeightRequest val :: Int32
val = String -> Int32 -> IO (GValueConstruct o)
forall o. String -> Int32 -> IO (GValueConstruct o)
B.Properties.constructObjectPropertyInt32 "height-request" Int32
val

#if defined(ENABLE_OVERLOADING)
data WidgetHeightRequestPropertyInfo
instance AttrInfo WidgetHeightRequestPropertyInfo where
    type AttrAllowedOps WidgetHeightRequestPropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet]
    type AttrBaseTypeConstraint WidgetHeightRequestPropertyInfo = IsWidget
    type AttrSetTypeConstraint WidgetHeightRequestPropertyInfo = (~) Int32
    type AttrTransferTypeConstraint WidgetHeightRequestPropertyInfo = (~) Int32
    type AttrTransferType WidgetHeightRequestPropertyInfo = Int32
    type AttrGetType WidgetHeightRequestPropertyInfo = Int32
    type AttrLabel WidgetHeightRequestPropertyInfo = "height-request"
    type AttrOrigin WidgetHeightRequestPropertyInfo = Widget
    attrGet = getWidgetHeightRequest
    attrSet = setWidgetHeightRequest
    attrTransfer _ v = do
        return v
    attrConstruct = constructWidgetHeightRequest
    attrClear = undefined
#endif

-- VVV Prop "hexpand"
   -- Type: TBasicType TBoolean
   -- Flags: [PropertyReadable,PropertyWritable]
   -- Nullable: (Just False,Just False)

-- | Get the value of the “@hexpand@” property.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Attributes.get' widget #hexpand
-- @
getWidgetHexpand :: (MonadIO m, IsWidget o) => o -> m Bool
getWidgetHexpand :: o -> m Bool
getWidgetHexpand obj :: o
obj = WidgetPopupMenuCallback -> m Bool
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (WidgetPopupMenuCallback -> m Bool)
-> WidgetPopupMenuCallback -> m Bool
forall a b. (a -> b) -> a -> b
$ o -> String -> WidgetPopupMenuCallback
forall a. GObject a => a -> String -> WidgetPopupMenuCallback
B.Properties.getObjectPropertyBool o
obj "hexpand"

-- | Set the value of the “@hexpand@” property.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Attributes.set' widget [ #hexpand 'Data.GI.Base.Attributes.:=' value ]
-- @
setWidgetHexpand :: (MonadIO m, IsWidget o) => o -> Bool -> m ()
setWidgetHexpand :: o -> Bool -> m ()
setWidgetHexpand obj :: o
obj val :: Bool
val = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ o -> String -> WidgetGrabNotifyCallback
forall a. GObject a => a -> String -> WidgetGrabNotifyCallback
B.Properties.setObjectPropertyBool o
obj "hexpand" Bool
val

-- | Construct a `GValueConstruct` with valid value for the “@hexpand@” property. This is rarely needed directly, but it is used by `Data.GI.Base.Constructible.new`.
constructWidgetHexpand :: (IsWidget o) => Bool -> IO (GValueConstruct o)
constructWidgetHexpand :: Bool -> IO (GValueConstruct o)
constructWidgetHexpand val :: Bool
val = String -> Bool -> IO (GValueConstruct o)
forall o. String -> Bool -> IO (GValueConstruct o)
B.Properties.constructObjectPropertyBool "hexpand" Bool
val

#if defined(ENABLE_OVERLOADING)
data WidgetHexpandPropertyInfo
instance AttrInfo WidgetHexpandPropertyInfo where
    type AttrAllowedOps WidgetHexpandPropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet]
    type AttrBaseTypeConstraint WidgetHexpandPropertyInfo = IsWidget
    type AttrSetTypeConstraint WidgetHexpandPropertyInfo = (~) Bool
    type AttrTransferTypeConstraint WidgetHexpandPropertyInfo = (~) Bool
    type AttrTransferType WidgetHexpandPropertyInfo = Bool
    type AttrGetType WidgetHexpandPropertyInfo = Bool
    type AttrLabel WidgetHexpandPropertyInfo = "hexpand"
    type AttrOrigin WidgetHexpandPropertyInfo = Widget
    attrGet = getWidgetHexpand
    attrSet = setWidgetHexpand
    attrTransfer _ v = do
        return v
    attrConstruct = constructWidgetHexpand
    attrClear = undefined
#endif

-- VVV Prop "hexpand-set"
   -- Type: TBasicType TBoolean
   -- Flags: [PropertyReadable,PropertyWritable]
   -- Nullable: (Just False,Just False)

-- | Get the value of the “@hexpand-set@” property.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Attributes.get' widget #hexpandSet
-- @
getWidgetHexpandSet :: (MonadIO m, IsWidget o) => o -> m Bool
getWidgetHexpandSet :: o -> m Bool
getWidgetHexpandSet obj :: o
obj = WidgetPopupMenuCallback -> m Bool
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (WidgetPopupMenuCallback -> m Bool)
-> WidgetPopupMenuCallback -> m Bool
forall a b. (a -> b) -> a -> b
$ o -> String -> WidgetPopupMenuCallback
forall a. GObject a => a -> String -> WidgetPopupMenuCallback
B.Properties.getObjectPropertyBool o
obj "hexpand-set"

-- | Set the value of the “@hexpand-set@” property.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Attributes.set' widget [ #hexpandSet 'Data.GI.Base.Attributes.:=' value ]
-- @
setWidgetHexpandSet :: (MonadIO m, IsWidget o) => o -> Bool -> m ()
setWidgetHexpandSet :: o -> Bool -> m ()
setWidgetHexpandSet obj :: o
obj val :: Bool
val = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ o -> String -> WidgetGrabNotifyCallback
forall a. GObject a => a -> String -> WidgetGrabNotifyCallback
B.Properties.setObjectPropertyBool o
obj "hexpand-set" Bool
val

-- | Construct a `GValueConstruct` with valid value for the “@hexpand-set@” property. This is rarely needed directly, but it is used by `Data.GI.Base.Constructible.new`.
constructWidgetHexpandSet :: (IsWidget o) => Bool -> IO (GValueConstruct o)
constructWidgetHexpandSet :: Bool -> IO (GValueConstruct o)
constructWidgetHexpandSet val :: Bool
val = String -> Bool -> IO (GValueConstruct o)
forall o. String -> Bool -> IO (GValueConstruct o)
B.Properties.constructObjectPropertyBool "hexpand-set" Bool
val

#if defined(ENABLE_OVERLOADING)
data WidgetHexpandSetPropertyInfo
instance AttrInfo WidgetHexpandSetPropertyInfo where
    type AttrAllowedOps WidgetHexpandSetPropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet]
    type AttrBaseTypeConstraint WidgetHexpandSetPropertyInfo = IsWidget
    type AttrSetTypeConstraint WidgetHexpandSetPropertyInfo = (~) Bool
    type AttrTransferTypeConstraint WidgetHexpandSetPropertyInfo = (~) Bool
    type AttrTransferType WidgetHexpandSetPropertyInfo = Bool
    type AttrGetType WidgetHexpandSetPropertyInfo = Bool
    type AttrLabel WidgetHexpandSetPropertyInfo = "hexpand-set"
    type AttrOrigin WidgetHexpandSetPropertyInfo = Widget
    attrGet = getWidgetHexpandSet
    attrSet = setWidgetHexpandSet
    attrTransfer _ v = do
        return v
    attrConstruct = constructWidgetHexpandSet
    attrClear = undefined
#endif

-- VVV Prop "is-focus"
   -- Type: TBasicType TBoolean
   -- Flags: [PropertyReadable,PropertyWritable]
   -- Nullable: (Nothing,Nothing)

-- | Get the value of the “@is-focus@” property.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Attributes.get' widget #isFocus
-- @
getWidgetIsFocus :: (MonadIO m, IsWidget o) => o -> m Bool
getWidgetIsFocus :: o -> m Bool
getWidgetIsFocus obj :: o
obj = WidgetPopupMenuCallback -> m Bool
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (WidgetPopupMenuCallback -> m Bool)
-> WidgetPopupMenuCallback -> m Bool
forall a b. (a -> b) -> a -> b
$ o -> String -> WidgetPopupMenuCallback
forall a. GObject a => a -> String -> WidgetPopupMenuCallback
B.Properties.getObjectPropertyBool o
obj "is-focus"

-- | Set the value of the “@is-focus@” property.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Attributes.set' widget [ #isFocus 'Data.GI.Base.Attributes.:=' value ]
-- @
setWidgetIsFocus :: (MonadIO m, IsWidget o) => o -> Bool -> m ()
setWidgetIsFocus :: o -> Bool -> m ()
setWidgetIsFocus obj :: o
obj val :: Bool
val = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ o -> String -> WidgetGrabNotifyCallback
forall a. GObject a => a -> String -> WidgetGrabNotifyCallback
B.Properties.setObjectPropertyBool o
obj "is-focus" Bool
val

-- | Construct a `GValueConstruct` with valid value for the “@is-focus@” property. This is rarely needed directly, but it is used by `Data.GI.Base.Constructible.new`.
constructWidgetIsFocus :: (IsWidget o) => Bool -> IO (GValueConstruct o)
constructWidgetIsFocus :: Bool -> IO (GValueConstruct o)
constructWidgetIsFocus val :: Bool
val = String -> Bool -> IO (GValueConstruct o)
forall o. String -> Bool -> IO (GValueConstruct o)
B.Properties.constructObjectPropertyBool "is-focus" Bool
val

#if defined(ENABLE_OVERLOADING)
data WidgetIsFocusPropertyInfo
instance AttrInfo WidgetIsFocusPropertyInfo where
    type AttrAllowedOps WidgetIsFocusPropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet]
    type AttrBaseTypeConstraint WidgetIsFocusPropertyInfo = IsWidget
    type AttrSetTypeConstraint WidgetIsFocusPropertyInfo = (~) Bool
    type AttrTransferTypeConstraint WidgetIsFocusPropertyInfo = (~) Bool
    type AttrTransferType WidgetIsFocusPropertyInfo = Bool
    type AttrGetType WidgetIsFocusPropertyInfo = Bool
    type AttrLabel WidgetIsFocusPropertyInfo = "is-focus"
    type AttrOrigin WidgetIsFocusPropertyInfo = Widget
    attrGet = getWidgetIsFocus
    attrSet = setWidgetIsFocus
    attrTransfer _ v = do
        return v
    attrConstruct = constructWidgetIsFocus
    attrClear = undefined
#endif

-- VVV Prop "layout-manager"
   -- Type: TInterface (Name {namespace = "Gtk", name = "LayoutManager"})
   -- Flags: [PropertyReadable,PropertyWritable]
   -- Nullable: (Just True,Nothing)

-- | Get the value of the “@layout-manager@” property.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Attributes.get' widget #layoutManager
-- @
getWidgetLayoutManager :: (MonadIO m, IsWidget o) => o -> m (Maybe Gtk.LayoutManager.LayoutManager)
getWidgetLayoutManager :: o -> m (Maybe LayoutManager)
getWidgetLayoutManager obj :: o
obj = IO (Maybe LayoutManager) -> m (Maybe LayoutManager)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Maybe LayoutManager) -> m (Maybe LayoutManager))
-> IO (Maybe LayoutManager) -> m (Maybe LayoutManager)
forall a b. (a -> b) -> a -> b
$ o
-> String
-> (ManagedPtr LayoutManager -> LayoutManager)
-> IO (Maybe LayoutManager)
forall a b.
(GObject a, GObject b) =>
a -> String -> (ManagedPtr b -> b) -> IO (Maybe b)
B.Properties.getObjectPropertyObject o
obj "layout-manager" ManagedPtr LayoutManager -> LayoutManager
Gtk.LayoutManager.LayoutManager

-- | Set the value of the “@layout-manager@” property.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Attributes.set' widget [ #layoutManager 'Data.GI.Base.Attributes.:=' value ]
-- @
setWidgetLayoutManager :: (MonadIO m, IsWidget o, Gtk.LayoutManager.IsLayoutManager a) => o -> a -> m ()
setWidgetLayoutManager :: o -> a -> m ()
setWidgetLayoutManager obj :: o
obj val :: a
val = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ o -> String -> Maybe a -> IO ()
forall a b.
(GObject a, GObject b) =>
a -> String -> Maybe b -> IO ()
B.Properties.setObjectPropertyObject o
obj "layout-manager" (a -> Maybe a
forall a. a -> Maybe a
Just a
val)

-- | Construct a `GValueConstruct` with valid value for the “@layout-manager@” property. This is rarely needed directly, but it is used by `Data.GI.Base.Constructible.new`.
constructWidgetLayoutManager :: (IsWidget o, Gtk.LayoutManager.IsLayoutManager a) => a -> IO (GValueConstruct o)
constructWidgetLayoutManager :: a -> IO (GValueConstruct o)
constructWidgetLayoutManager val :: a
val = String -> Maybe a -> IO (GValueConstruct o)
forall a o.
GObject a =>
String -> Maybe a -> IO (GValueConstruct o)
B.Properties.constructObjectPropertyObject "layout-manager" (a -> Maybe a
forall a. a -> Maybe a
Just a
val)

-- | Set the value of the “@layout-manager@” property to `Nothing`.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Attributes.clear' #layoutManager
-- @
clearWidgetLayoutManager :: (MonadIO m, IsWidget o) => o -> m ()
clearWidgetLayoutManager :: o -> m ()
clearWidgetLayoutManager obj :: o
obj = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ o -> String -> Maybe LayoutManager -> IO ()
forall a b.
(GObject a, GObject b) =>
a -> String -> Maybe b -> IO ()
B.Properties.setObjectPropertyObject o
obj "layout-manager" (Maybe LayoutManager
forall a. Maybe a
Nothing :: Maybe Gtk.LayoutManager.LayoutManager)

#if defined(ENABLE_OVERLOADING)
data WidgetLayoutManagerPropertyInfo
instance AttrInfo WidgetLayoutManagerPropertyInfo where
    type AttrAllowedOps WidgetLayoutManagerPropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet, 'AttrClear]
    type AttrBaseTypeConstraint WidgetLayoutManagerPropertyInfo = IsWidget
    type AttrSetTypeConstraint WidgetLayoutManagerPropertyInfo = Gtk.LayoutManager.IsLayoutManager
    type AttrTransferTypeConstraint WidgetLayoutManagerPropertyInfo = Gtk.LayoutManager.IsLayoutManager
    type AttrTransferType WidgetLayoutManagerPropertyInfo = Gtk.LayoutManager.LayoutManager
    type AttrGetType WidgetLayoutManagerPropertyInfo = (Maybe Gtk.LayoutManager.LayoutManager)
    type AttrLabel WidgetLayoutManagerPropertyInfo = "layout-manager"
    type AttrOrigin WidgetLayoutManagerPropertyInfo = Widget
    attrGet = getWidgetLayoutManager
    attrSet = setWidgetLayoutManager
    attrTransfer _ v = do
        unsafeCastTo Gtk.LayoutManager.LayoutManager v
    attrConstruct = constructWidgetLayoutManager
    attrClear = clearWidgetLayoutManager
#endif

-- VVV Prop "margin"
   -- Type: TBasicType TInt
   -- Flags: [PropertyReadable,PropertyWritable]
   -- Nullable: (Nothing,Nothing)

-- | Get the value of the “@margin@” property.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Attributes.get' widget #margin
-- @
getWidgetMargin :: (MonadIO m, IsWidget o) => o -> m Int32
getWidgetMargin :: o -> m Int32
getWidgetMargin obj :: o
obj = IO Int32 -> m Int32
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Int32 -> m Int32) -> IO Int32 -> m Int32
forall a b. (a -> b) -> a -> b
$ o -> String -> IO Int32
forall a. GObject a => a -> String -> IO Int32
B.Properties.getObjectPropertyInt32 o
obj "margin"

-- | Set the value of the “@margin@” property.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Attributes.set' widget [ #margin 'Data.GI.Base.Attributes.:=' value ]
-- @
setWidgetMargin :: (MonadIO m, IsWidget o) => o -> Int32 -> m ()
setWidgetMargin :: o -> Int32 -> m ()
setWidgetMargin obj :: o
obj val :: Int32
val = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ o -> String -> Int32 -> IO ()
forall a. GObject a => a -> String -> Int32 -> IO ()
B.Properties.setObjectPropertyInt32 o
obj "margin" Int32
val

-- | Construct a `GValueConstruct` with valid value for the “@margin@” property. This is rarely needed directly, but it is used by `Data.GI.Base.Constructible.new`.
constructWidgetMargin :: (IsWidget o) => Int32 -> IO (GValueConstruct o)
constructWidgetMargin :: Int32 -> IO (GValueConstruct o)
constructWidgetMargin val :: Int32
val = String -> Int32 -> IO (GValueConstruct o)
forall o. String -> Int32 -> IO (GValueConstruct o)
B.Properties.constructObjectPropertyInt32 "margin" Int32
val

#if defined(ENABLE_OVERLOADING)
data WidgetMarginPropertyInfo
instance AttrInfo WidgetMarginPropertyInfo where
    type AttrAllowedOps WidgetMarginPropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet]
    type AttrBaseTypeConstraint WidgetMarginPropertyInfo = IsWidget
    type AttrSetTypeConstraint WidgetMarginPropertyInfo = (~) Int32
    type AttrTransferTypeConstraint WidgetMarginPropertyInfo = (~) Int32
    type AttrTransferType WidgetMarginPropertyInfo = Int32
    type AttrGetType WidgetMarginPropertyInfo = Int32
    type AttrLabel WidgetMarginPropertyInfo = "margin"
    type AttrOrigin WidgetMarginPropertyInfo = Widget
    attrGet = getWidgetMargin
    attrSet = setWidgetMargin
    attrTransfer _ v = do
        return v
    attrConstruct = constructWidgetMargin
    attrClear = undefined
#endif

-- VVV Prop "margin-bottom"
   -- Type: TBasicType TInt
   -- Flags: [PropertyReadable,PropertyWritable]
   -- Nullable: (Just False,Just False)

-- | Get the value of the “@margin-bottom@” property.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Attributes.get' widget #marginBottom
-- @
getWidgetMarginBottom :: (MonadIO m, IsWidget o) => o -> m Int32
getWidgetMarginBottom :: o -> m Int32
getWidgetMarginBottom obj :: o
obj = IO Int32 -> m Int32
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Int32 -> m Int32) -> IO Int32 -> m Int32
forall a b. (a -> b) -> a -> b
$ o -> String -> IO Int32
forall a. GObject a => a -> String -> IO Int32
B.Properties.getObjectPropertyInt32 o
obj "margin-bottom"

-- | Set the value of the “@margin-bottom@” property.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Attributes.set' widget [ #marginBottom 'Data.GI.Base.Attributes.:=' value ]
-- @
setWidgetMarginBottom :: (MonadIO m, IsWidget o) => o -> Int32 -> m ()
setWidgetMarginBottom :: o -> Int32 -> m ()
setWidgetMarginBottom obj :: o
obj val :: Int32
val = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ o -> String -> Int32 -> IO ()
forall a. GObject a => a -> String -> Int32 -> IO ()
B.Properties.setObjectPropertyInt32 o
obj "margin-bottom" Int32
val

-- | Construct a `GValueConstruct` with valid value for the “@margin-bottom@” property. This is rarely needed directly, but it is used by `Data.GI.Base.Constructible.new`.
constructWidgetMarginBottom :: (IsWidget o) => Int32 -> IO (GValueConstruct o)
constructWidgetMarginBottom :: Int32 -> IO (GValueConstruct o)
constructWidgetMarginBottom val :: Int32
val = String -> Int32 -> IO (GValueConstruct o)
forall o. String -> Int32 -> IO (GValueConstruct o)
B.Properties.constructObjectPropertyInt32 "margin-bottom" Int32
val

#if defined(ENABLE_OVERLOADING)
data WidgetMarginBottomPropertyInfo
instance AttrInfo WidgetMarginBottomPropertyInfo where
    type AttrAllowedOps WidgetMarginBottomPropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet]
    type AttrBaseTypeConstraint WidgetMarginBottomPropertyInfo = IsWidget
    type AttrSetTypeConstraint WidgetMarginBottomPropertyInfo = (~) Int32
    type AttrTransferTypeConstraint WidgetMarginBottomPropertyInfo = (~) Int32
    type AttrTransferType WidgetMarginBottomPropertyInfo = Int32
    type AttrGetType WidgetMarginBottomPropertyInfo = Int32
    type AttrLabel WidgetMarginBottomPropertyInfo = "margin-bottom"
    type AttrOrigin WidgetMarginBottomPropertyInfo = Widget
    attrGet = getWidgetMarginBottom
    attrSet = setWidgetMarginBottom
    attrTransfer _ v = do
        return v
    attrConstruct = constructWidgetMarginBottom
    attrClear = undefined
#endif

-- VVV Prop "margin-end"
   -- Type: TBasicType TInt
   -- Flags: [PropertyReadable,PropertyWritable]
   -- Nullable: (Just False,Just False)

-- | Get the value of the “@margin-end@” property.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Attributes.get' widget #marginEnd
-- @
getWidgetMarginEnd :: (MonadIO m, IsWidget o) => o -> m Int32
getWidgetMarginEnd :: o -> m Int32
getWidgetMarginEnd obj :: o
obj = IO Int32 -> m Int32
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Int32 -> m Int32) -> IO Int32 -> m Int32
forall a b. (a -> b) -> a -> b
$ o -> String -> IO Int32
forall a. GObject a => a -> String -> IO Int32
B.Properties.getObjectPropertyInt32 o
obj "margin-end"

-- | Set the value of the “@margin-end@” property.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Attributes.set' widget [ #marginEnd 'Data.GI.Base.Attributes.:=' value ]
-- @
setWidgetMarginEnd :: (MonadIO m, IsWidget o) => o -> Int32 -> m ()
setWidgetMarginEnd :: o -> Int32 -> m ()
setWidgetMarginEnd obj :: o
obj val :: Int32
val = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ o -> String -> Int32 -> IO ()
forall a. GObject a => a -> String -> Int32 -> IO ()
B.Properties.setObjectPropertyInt32 o
obj "margin-end" Int32
val

-- | Construct a `GValueConstruct` with valid value for the “@margin-end@” property. This is rarely needed directly, but it is used by `Data.GI.Base.Constructible.new`.
constructWidgetMarginEnd :: (IsWidget o) => Int32 -> IO (GValueConstruct o)
constructWidgetMarginEnd :: Int32 -> IO (GValueConstruct o)
constructWidgetMarginEnd val :: Int32
val = String -> Int32 -> IO (GValueConstruct o)
forall o. String -> Int32 -> IO (GValueConstruct o)
B.Properties.constructObjectPropertyInt32 "margin-end" Int32
val

#if defined(ENABLE_OVERLOADING)
data WidgetMarginEndPropertyInfo
instance AttrInfo WidgetMarginEndPropertyInfo where
    type AttrAllowedOps WidgetMarginEndPropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet]
    type AttrBaseTypeConstraint WidgetMarginEndPropertyInfo = IsWidget
    type AttrSetTypeConstraint WidgetMarginEndPropertyInfo = (~) Int32
    type AttrTransferTypeConstraint WidgetMarginEndPropertyInfo = (~) Int32
    type AttrTransferType WidgetMarginEndPropertyInfo = Int32
    type AttrGetType WidgetMarginEndPropertyInfo = Int32
    type AttrLabel WidgetMarginEndPropertyInfo = "margin-end"
    type AttrOrigin WidgetMarginEndPropertyInfo = Widget
    attrGet = getWidgetMarginEnd
    attrSet = setWidgetMarginEnd
    attrTransfer _ v = do
        return v
    attrConstruct = constructWidgetMarginEnd
    attrClear = undefined
#endif

-- VVV Prop "margin-start"
   -- Type: TBasicType TInt
   -- Flags: [PropertyReadable,PropertyWritable]
   -- Nullable: (Just False,Just False)

-- | Get the value of the “@margin-start@” property.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Attributes.get' widget #marginStart
-- @
getWidgetMarginStart :: (MonadIO m, IsWidget o) => o -> m Int32
getWidgetMarginStart :: o -> m Int32
getWidgetMarginStart obj :: o
obj = IO Int32 -> m Int32
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Int32 -> m Int32) -> IO Int32 -> m Int32
forall a b. (a -> b) -> a -> b
$ o -> String -> IO Int32
forall a. GObject a => a -> String -> IO Int32
B.Properties.getObjectPropertyInt32 o
obj "margin-start"

-- | Set the value of the “@margin-start@” property.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Attributes.set' widget [ #marginStart 'Data.GI.Base.Attributes.:=' value ]
-- @
setWidgetMarginStart :: (MonadIO m, IsWidget o) => o -> Int32 -> m ()
setWidgetMarginStart :: o -> Int32 -> m ()
setWidgetMarginStart obj :: o
obj val :: Int32
val = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ o -> String -> Int32 -> IO ()
forall a. GObject a => a -> String -> Int32 -> IO ()
B.Properties.setObjectPropertyInt32 o
obj "margin-start" Int32
val

-- | Construct a `GValueConstruct` with valid value for the “@margin-start@” property. This is rarely needed directly, but it is used by `Data.GI.Base.Constructible.new`.
constructWidgetMarginStart :: (IsWidget o) => Int32 -> IO (GValueConstruct o)
constructWidgetMarginStart :: Int32 -> IO (GValueConstruct o)
constructWidgetMarginStart val :: Int32
val = String -> Int32 -> IO (GValueConstruct o)
forall o. String -> Int32 -> IO (GValueConstruct o)
B.Properties.constructObjectPropertyInt32 "margin-start" Int32
val

#if defined(ENABLE_OVERLOADING)
data WidgetMarginStartPropertyInfo
instance AttrInfo WidgetMarginStartPropertyInfo where
    type AttrAllowedOps WidgetMarginStartPropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet]
    type AttrBaseTypeConstraint WidgetMarginStartPropertyInfo = IsWidget
    type AttrSetTypeConstraint WidgetMarginStartPropertyInfo = (~) Int32
    type AttrTransferTypeConstraint WidgetMarginStartPropertyInfo = (~) Int32
    type AttrTransferType WidgetMarginStartPropertyInfo = Int32
    type AttrGetType WidgetMarginStartPropertyInfo = Int32
    type AttrLabel WidgetMarginStartPropertyInfo = "margin-start"
    type AttrOrigin WidgetMarginStartPropertyInfo = Widget
    attrGet = getWidgetMarginStart
    attrSet = setWidgetMarginStart
    attrTransfer _ v = do
        return v
    attrConstruct = constructWidgetMarginStart
    attrClear = undefined
#endif

-- VVV Prop "margin-top"
   -- Type: TBasicType TInt
   -- Flags: [PropertyReadable,PropertyWritable]
   -- Nullable: (Just False,Just False)

-- | Get the value of the “@margin-top@” property.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Attributes.get' widget #marginTop
-- @
getWidgetMarginTop :: (MonadIO m, IsWidget o) => o -> m Int32
getWidgetMarginTop :: o -> m Int32
getWidgetMarginTop obj :: o
obj = IO Int32 -> m Int32
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Int32 -> m Int32) -> IO Int32 -> m Int32
forall a b. (a -> b) -> a -> b
$ o -> String -> IO Int32
forall a. GObject a => a -> String -> IO Int32
B.Properties.getObjectPropertyInt32 o
obj "margin-top"

-- | Set the value of the “@margin-top@” property.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Attributes.set' widget [ #marginTop 'Data.GI.Base.Attributes.:=' value ]
-- @
setWidgetMarginTop :: (MonadIO m, IsWidget o) => o -> Int32 -> m ()
setWidgetMarginTop :: o -> Int32 -> m ()
setWidgetMarginTop obj :: o
obj val :: Int32
val = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ o -> String -> Int32 -> IO ()
forall a. GObject a => a -> String -> Int32 -> IO ()
B.Properties.setObjectPropertyInt32 o
obj "margin-top" Int32
val

-- | Construct a `GValueConstruct` with valid value for the “@margin-top@” property. This is rarely needed directly, but it is used by `Data.GI.Base.Constructible.new`.
constructWidgetMarginTop :: (IsWidget o) => Int32 -> IO (GValueConstruct o)
constructWidgetMarginTop :: Int32 -> IO (GValueConstruct o)
constructWidgetMarginTop val :: Int32
val = String -> Int32 -> IO (GValueConstruct o)
forall o. String -> Int32 -> IO (GValueConstruct o)
B.Properties.constructObjectPropertyInt32 "margin-top" Int32
val

#if defined(ENABLE_OVERLOADING)
data WidgetMarginTopPropertyInfo
instance AttrInfo WidgetMarginTopPropertyInfo where
    type AttrAllowedOps WidgetMarginTopPropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet]
    type AttrBaseTypeConstraint WidgetMarginTopPropertyInfo = IsWidget
    type AttrSetTypeConstraint WidgetMarginTopPropertyInfo = (~) Int32
    type AttrTransferTypeConstraint WidgetMarginTopPropertyInfo = (~) Int32
    type AttrTransferType WidgetMarginTopPropertyInfo = Int32
    type AttrGetType WidgetMarginTopPropertyInfo = Int32
    type AttrLabel WidgetMarginTopPropertyInfo = "margin-top"
    type AttrOrigin WidgetMarginTopPropertyInfo = Widget
    attrGet = getWidgetMarginTop
    attrSet = setWidgetMarginTop
    attrTransfer _ v = do
        return v
    attrConstruct = constructWidgetMarginTop
    attrClear = undefined
#endif

-- VVV Prop "name"
   -- Type: TBasicType TUTF8
   -- Flags: [PropertyReadable,PropertyWritable]
   -- Nullable: (Just False,Just False)

-- | Get the value of the “@name@” property.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Attributes.get' widget #name
-- @
getWidgetName :: (MonadIO m, IsWidget o) => o -> m T.Text
getWidgetName :: o -> m Text
getWidgetName obj :: o
obj = IO Text -> m Text
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Text -> m Text) -> IO Text -> m Text
forall a b. (a -> b) -> a -> b
$ Text -> IO (Maybe Text) -> IO Text
forall a. HasCallStack => Text -> IO (Maybe a) -> IO a
checkUnexpectedNothing "getWidgetName" (IO (Maybe Text) -> IO Text) -> IO (Maybe Text) -> IO Text
forall a b. (a -> b) -> a -> b
$ o -> String -> IO (Maybe Text)
forall a. GObject a => a -> String -> IO (Maybe Text)
B.Properties.getObjectPropertyString o
obj "name"

-- | Set the value of the “@name@” property.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Attributes.set' widget [ #name 'Data.GI.Base.Attributes.:=' value ]
-- @
setWidgetName :: (MonadIO m, IsWidget o) => o -> T.Text -> m ()
setWidgetName :: o -> Text -> m ()
setWidgetName obj :: o
obj val :: Text
val = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ o -> String -> Maybe Text -> IO ()
forall a. GObject a => a -> String -> Maybe Text -> IO ()
B.Properties.setObjectPropertyString o
obj "name" (Text -> Maybe Text
forall a. a -> Maybe a
Just Text
val)

-- | Construct a `GValueConstruct` with valid value for the “@name@” property. This is rarely needed directly, but it is used by `Data.GI.Base.Constructible.new`.
constructWidgetName :: (IsWidget o) => T.Text -> IO (GValueConstruct o)
constructWidgetName :: Text -> IO (GValueConstruct o)
constructWidgetName val :: Text
val = String -> Maybe Text -> IO (GValueConstruct o)
forall o. String -> Maybe Text -> IO (GValueConstruct o)
B.Properties.constructObjectPropertyString "name" (Text -> Maybe Text
forall a. a -> Maybe a
Just Text
val)

#if defined(ENABLE_OVERLOADING)
data WidgetNamePropertyInfo
instance AttrInfo WidgetNamePropertyInfo where
    type AttrAllowedOps WidgetNamePropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet]
    type AttrBaseTypeConstraint WidgetNamePropertyInfo = IsWidget
    type AttrSetTypeConstraint WidgetNamePropertyInfo = (~) T.Text
    type AttrTransferTypeConstraint WidgetNamePropertyInfo = (~) T.Text
    type AttrTransferType WidgetNamePropertyInfo = T.Text
    type AttrGetType WidgetNamePropertyInfo = T.Text
    type AttrLabel WidgetNamePropertyInfo = "name"
    type AttrOrigin WidgetNamePropertyInfo = Widget
    attrGet = getWidgetName
    attrSet = setWidgetName
    attrTransfer _ v = do
        return v
    attrConstruct = constructWidgetName
    attrClear = undefined
#endif

-- VVV Prop "opacity"
   -- Type: TBasicType TDouble
   -- Flags: [PropertyReadable,PropertyWritable]
   -- Nullable: (Just False,Just False)

-- | Get the value of the “@opacity@” property.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Attributes.get' widget #opacity
-- @
getWidgetOpacity :: (MonadIO m, IsWidget o) => o -> m Double
getWidgetOpacity :: o -> m Double
getWidgetOpacity obj :: o
obj = IO Double -> m Double
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Double -> m Double) -> IO Double -> m Double
forall a b. (a -> b) -> a -> b
$ o -> String -> IO Double
forall a. GObject a => a -> String -> IO Double
B.Properties.getObjectPropertyDouble o
obj "opacity"

-- | Set the value of the “@opacity@” property.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Attributes.set' widget [ #opacity 'Data.GI.Base.Attributes.:=' value ]
-- @
setWidgetOpacity :: (MonadIO m, IsWidget o) => o -> Double -> m ()
setWidgetOpacity :: o -> Double -> m ()
setWidgetOpacity obj :: o
obj val :: Double
val = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ o -> String -> Double -> IO ()
forall a. GObject a => a -> String -> Double -> IO ()
B.Properties.setObjectPropertyDouble o
obj "opacity" Double
val

-- | Construct a `GValueConstruct` with valid value for the “@opacity@” property. This is rarely needed directly, but it is used by `Data.GI.Base.Constructible.new`.
constructWidgetOpacity :: (IsWidget o) => Double -> IO (GValueConstruct o)
constructWidgetOpacity :: Double -> IO (GValueConstruct o)
constructWidgetOpacity val :: Double
val = String -> Double -> IO (GValueConstruct o)
forall o. String -> Double -> IO (GValueConstruct o)
B.Properties.constructObjectPropertyDouble "opacity" Double
val

#if defined(ENABLE_OVERLOADING)
data WidgetOpacityPropertyInfo
instance AttrInfo WidgetOpacityPropertyInfo where
    type AttrAllowedOps WidgetOpacityPropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet]
    type AttrBaseTypeConstraint WidgetOpacityPropertyInfo = IsWidget
    type AttrSetTypeConstraint WidgetOpacityPropertyInfo = (~) Double
    type AttrTransferTypeConstraint WidgetOpacityPropertyInfo = (~) Double
    type AttrTransferType WidgetOpacityPropertyInfo = Double
    type AttrGetType WidgetOpacityPropertyInfo = Double
    type AttrLabel WidgetOpacityPropertyInfo = "opacity"
    type AttrOrigin WidgetOpacityPropertyInfo = Widget
    attrGet = getWidgetOpacity
    attrSet = setWidgetOpacity
    attrTransfer _ v = do
        return v
    attrConstruct = constructWidgetOpacity
    attrClear = undefined
#endif

-- VVV Prop "overflow"
   -- Type: TInterface (Name {namespace = "Gtk", name = "Overflow"})
   -- Flags: [PropertyReadable,PropertyWritable]
   -- Nullable: (Just False,Just False)

-- | Get the value of the “@overflow@” property.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Attributes.get' widget #overflow
-- @
getWidgetOverflow :: (MonadIO m, IsWidget o) => o -> m Gtk.Enums.Overflow
getWidgetOverflow :: o -> m Overflow
getWidgetOverflow obj :: o
obj = IO Overflow -> m Overflow
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Overflow -> m Overflow) -> IO Overflow -> m Overflow
forall a b. (a -> b) -> a -> b
$ o -> String -> IO Overflow
forall a b. (GObject a, Enum b, BoxedEnum b) => a -> String -> IO b
B.Properties.getObjectPropertyEnum o
obj "overflow"

-- | Set the value of the “@overflow@” property.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Attributes.set' widget [ #overflow 'Data.GI.Base.Attributes.:=' value ]
-- @
setWidgetOverflow :: (MonadIO m, IsWidget o) => o -> Gtk.Enums.Overflow -> m ()
setWidgetOverflow :: o -> Overflow -> m ()
setWidgetOverflow obj :: o
obj val :: Overflow
val = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ o -> String -> Overflow -> IO ()
forall a b.
(GObject a, Enum b, BoxedEnum b) =>
a -> String -> b -> IO ()
B.Properties.setObjectPropertyEnum o
obj "overflow" Overflow
val

-- | Construct a `GValueConstruct` with valid value for the “@overflow@” property. This is rarely needed directly, but it is used by `Data.GI.Base.Constructible.new`.
constructWidgetOverflow :: (IsWidget o) => Gtk.Enums.Overflow -> IO (GValueConstruct o)
constructWidgetOverflow :: Overflow -> IO (GValueConstruct o)
constructWidgetOverflow val :: Overflow
val = String -> Overflow -> IO (GValueConstruct o)
forall a o.
(Enum a, BoxedEnum a) =>
String -> a -> IO (GValueConstruct o)
B.Properties.constructObjectPropertyEnum "overflow" Overflow
val

#if defined(ENABLE_OVERLOADING)
data WidgetOverflowPropertyInfo
instance AttrInfo WidgetOverflowPropertyInfo where
    type AttrAllowedOps WidgetOverflowPropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet]
    type AttrBaseTypeConstraint WidgetOverflowPropertyInfo = IsWidget
    type AttrSetTypeConstraint WidgetOverflowPropertyInfo = (~) Gtk.Enums.Overflow
    type AttrTransferTypeConstraint WidgetOverflowPropertyInfo = (~) Gtk.Enums.Overflow
    type AttrTransferType WidgetOverflowPropertyInfo = Gtk.Enums.Overflow
    type AttrGetType WidgetOverflowPropertyInfo = Gtk.Enums.Overflow
    type AttrLabel WidgetOverflowPropertyInfo = "overflow"
    type AttrOrigin WidgetOverflowPropertyInfo = Widget
    attrGet = getWidgetOverflow
    attrSet = setWidgetOverflow
    attrTransfer _ v = do
        return v
    attrConstruct = constructWidgetOverflow
    attrClear = undefined
#endif

-- VVV Prop "parent"
   -- Type: TInterface (Name {namespace = "Gtk", name = "Widget"})
   -- Flags: [PropertyReadable]
   -- Nullable: (Just True,Just False)

-- | Get the value of the “@parent@” property.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Attributes.get' widget #parent
-- @
getWidgetParent :: (MonadIO m, IsWidget o) => o -> m (Maybe Widget)
getWidgetParent :: o -> m (Maybe Widget)
getWidgetParent obj :: o
obj = IO (Maybe Widget) -> m (Maybe Widget)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Maybe Widget) -> m (Maybe Widget))
-> IO (Maybe Widget) -> m (Maybe Widget)
forall a b. (a -> b) -> a -> b
$ o -> String -> (ManagedPtr Widget -> Widget) -> IO (Maybe Widget)
forall a b.
(GObject a, GObject b) =>
a -> String -> (ManagedPtr b -> b) -> IO (Maybe b)
B.Properties.getObjectPropertyObject o
obj "parent" ManagedPtr Widget -> Widget
Widget

#if defined(ENABLE_OVERLOADING)
data WidgetParentPropertyInfo
instance AttrInfo WidgetParentPropertyInfo where
    type AttrAllowedOps WidgetParentPropertyInfo = '[ 'AttrGet]
    type AttrBaseTypeConstraint WidgetParentPropertyInfo = IsWidget
    type AttrSetTypeConstraint WidgetParentPropertyInfo = (~) ()
    type AttrTransferTypeConstraint WidgetParentPropertyInfo = (~) ()
    type AttrTransferType WidgetParentPropertyInfo = ()
    type AttrGetType WidgetParentPropertyInfo = (Maybe Widget)
    type AttrLabel WidgetParentPropertyInfo = "parent"
    type AttrOrigin WidgetParentPropertyInfo = Widget
    attrGet = getWidgetParent
    attrSet = undefined
    attrTransfer _ = undefined
    attrConstruct = undefined
    attrClear = undefined
#endif

-- VVV Prop "receives-default"
   -- Type: TBasicType TBoolean
   -- Flags: [PropertyReadable,PropertyWritable]
   -- Nullable: (Just False,Just False)

-- | Get the value of the “@receives-default@” property.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Attributes.get' widget #receivesDefault
-- @
getWidgetReceivesDefault :: (MonadIO m, IsWidget o) => o -> m Bool
getWidgetReceivesDefault :: o -> m Bool
getWidgetReceivesDefault obj :: o
obj = WidgetPopupMenuCallback -> m Bool
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (WidgetPopupMenuCallback -> m Bool)
-> WidgetPopupMenuCallback -> m Bool
forall a b. (a -> b) -> a -> b
$ o -> String -> WidgetPopupMenuCallback
forall a. GObject a => a -> String -> WidgetPopupMenuCallback
B.Properties.getObjectPropertyBool o
obj "receives-default"

-- | Set the value of the “@receives-default@” property.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Attributes.set' widget [ #receivesDefault 'Data.GI.Base.Attributes.:=' value ]
-- @
setWidgetReceivesDefault :: (MonadIO m, IsWidget o) => o -> Bool -> m ()
setWidgetReceivesDefault :: o -> Bool -> m ()
setWidgetReceivesDefault obj :: o
obj val :: Bool
val = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ o -> String -> WidgetGrabNotifyCallback
forall a. GObject a => a -> String -> WidgetGrabNotifyCallback
B.Properties.setObjectPropertyBool o
obj "receives-default" Bool
val

-- | Construct a `GValueConstruct` with valid value for the “@receives-default@” property. This is rarely needed directly, but it is used by `Data.GI.Base.Constructible.new`.
constructWidgetReceivesDefault :: (IsWidget o) => Bool -> IO (GValueConstruct o)
constructWidgetReceivesDefault :: Bool -> IO (GValueConstruct o)
constructWidgetReceivesDefault val :: Bool
val = String -> Bool -> IO (GValueConstruct o)
forall o. String -> Bool -> IO (GValueConstruct o)
B.Properties.constructObjectPropertyBool "receives-default" Bool
val

#if defined(ENABLE_OVERLOADING)
data WidgetReceivesDefaultPropertyInfo
instance AttrInfo WidgetReceivesDefaultPropertyInfo where
    type AttrAllowedOps WidgetReceivesDefaultPropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet]
    type AttrBaseTypeConstraint WidgetReceivesDefaultPropertyInfo = IsWidget
    type AttrSetTypeConstraint WidgetReceivesDefaultPropertyInfo = (~) Bool
    type AttrTransferTypeConstraint WidgetReceivesDefaultPropertyInfo = (~) Bool
    type AttrTransferType WidgetReceivesDefaultPropertyInfo = Bool
    type AttrGetType WidgetReceivesDefaultPropertyInfo = Bool
    type AttrLabel WidgetReceivesDefaultPropertyInfo = "receives-default"
    type AttrOrigin WidgetReceivesDefaultPropertyInfo = Widget
    attrGet = getWidgetReceivesDefault
    attrSet = setWidgetReceivesDefault
    attrTransfer _ v = do
        return v
    attrConstruct = constructWidgetReceivesDefault
    attrClear = undefined
#endif

-- VVV Prop "root"
   -- Type: TInterface (Name {namespace = "Gtk", name = "Root"})
   -- Flags: [PropertyReadable]
   -- Nullable: (Just True,Nothing)

-- | Get the value of the “@root@” property.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Attributes.get' widget #root
-- @
getWidgetRoot :: (MonadIO m, IsWidget o) => o -> m (Maybe Gtk.Root.Root)
getWidgetRoot :: o -> m (Maybe Root)
getWidgetRoot obj :: o
obj = IO (Maybe Root) -> m (Maybe Root)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Maybe Root) -> m (Maybe Root))
-> IO (Maybe Root) -> m (Maybe Root)
forall a b. (a -> b) -> a -> b
$ o -> String -> (ManagedPtr Root -> Root) -> IO (Maybe Root)
forall a b.
(GObject a, GObject b) =>
a -> String -> (ManagedPtr b -> b) -> IO (Maybe b)
B.Properties.getObjectPropertyObject o
obj "root" ManagedPtr Root -> Root
Gtk.Root.Root

#if defined(ENABLE_OVERLOADING)
data WidgetRootPropertyInfo
instance AttrInfo WidgetRootPropertyInfo where
    type AttrAllowedOps WidgetRootPropertyInfo = '[ 'AttrGet, 'AttrClear]
    type AttrBaseTypeConstraint WidgetRootPropertyInfo = IsWidget
    type AttrSetTypeConstraint WidgetRootPropertyInfo = (~) ()
    type AttrTransferTypeConstraint WidgetRootPropertyInfo = (~) ()
    type AttrTransferType WidgetRootPropertyInfo = ()
    type AttrGetType WidgetRootPropertyInfo = (Maybe Gtk.Root.Root)
    type AttrLabel WidgetRootPropertyInfo = "root"
    type AttrOrigin WidgetRootPropertyInfo = Widget
    attrGet = getWidgetRoot
    attrSet = undefined
    attrTransfer _ = undefined
    attrConstruct = undefined
    attrClear = undefined
#endif

-- VVV Prop "scale-factor"
   -- Type: TBasicType TInt
   -- Flags: [PropertyReadable]
   -- Nullable: (Just False,Nothing)

-- | Get the value of the “@scale-factor@” property.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Attributes.get' widget #scaleFactor
-- @
getWidgetScaleFactor :: (MonadIO m, IsWidget o) => o -> m Int32
getWidgetScaleFactor :: o -> m Int32
getWidgetScaleFactor obj :: o
obj = IO Int32 -> m Int32
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Int32 -> m Int32) -> IO Int32 -> m Int32
forall a b. (a -> b) -> a -> b
$ o -> String -> IO Int32
forall a. GObject a => a -> String -> IO Int32
B.Properties.getObjectPropertyInt32 o
obj "scale-factor"

#if defined(ENABLE_OVERLOADING)
data WidgetScaleFactorPropertyInfo
instance AttrInfo WidgetScaleFactorPropertyInfo where
    type AttrAllowedOps WidgetScaleFactorPropertyInfo = '[ 'AttrGet]
    type AttrBaseTypeConstraint WidgetScaleFactorPropertyInfo = IsWidget
    type AttrSetTypeConstraint WidgetScaleFactorPropertyInfo = (~) ()
    type AttrTransferTypeConstraint WidgetScaleFactorPropertyInfo = (~) ()
    type AttrTransferType WidgetScaleFactorPropertyInfo = ()
    type AttrGetType WidgetScaleFactorPropertyInfo = Int32
    type AttrLabel WidgetScaleFactorPropertyInfo = "scale-factor"
    type AttrOrigin WidgetScaleFactorPropertyInfo = Widget
    attrGet = getWidgetScaleFactor
    attrSet = undefined
    attrTransfer _ = undefined
    attrConstruct = undefined
    attrClear = undefined
#endif

-- VVV Prop "sensitive"
   -- Type: TBasicType TBoolean
   -- Flags: [PropertyReadable,PropertyWritable]
   -- Nullable: (Just False,Just False)

-- | Get the value of the “@sensitive@” property.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Attributes.get' widget #sensitive
-- @
getWidgetSensitive :: (MonadIO m, IsWidget o) => o -> m Bool
getWidgetSensitive :: o -> m Bool
getWidgetSensitive obj :: o
obj = WidgetPopupMenuCallback -> m Bool
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (WidgetPopupMenuCallback -> m Bool)
-> WidgetPopupMenuCallback -> m Bool
forall a b. (a -> b) -> a -> b
$ o -> String -> WidgetPopupMenuCallback
forall a. GObject a => a -> String -> WidgetPopupMenuCallback
B.Properties.getObjectPropertyBool o
obj "sensitive"

-- | Set the value of the “@sensitive@” property.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Attributes.set' widget [ #sensitive 'Data.GI.Base.Attributes.:=' value ]
-- @
setWidgetSensitive :: (MonadIO m, IsWidget o) => o -> Bool -> m ()
setWidgetSensitive :: o -> Bool -> m ()
setWidgetSensitive obj :: o
obj val :: Bool
val = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ o -> String -> WidgetGrabNotifyCallback
forall a. GObject a => a -> String -> WidgetGrabNotifyCallback
B.Properties.setObjectPropertyBool o
obj "sensitive" Bool
val

-- | Construct a `GValueConstruct` with valid value for the “@sensitive@” property. This is rarely needed directly, but it is used by `Data.GI.Base.Constructible.new`.
constructWidgetSensitive :: (IsWidget o) => Bool -> IO (GValueConstruct o)
constructWidgetSensitive :: Bool -> IO (GValueConstruct o)
constructWidgetSensitive val :: Bool
val = String -> Bool -> IO (GValueConstruct o)
forall o. String -> Bool -> IO (GValueConstruct o)
B.Properties.constructObjectPropertyBool "sensitive" Bool
val

#if defined(ENABLE_OVERLOADING)
data WidgetSensitivePropertyInfo
instance AttrInfo WidgetSensitivePropertyInfo where
    type AttrAllowedOps WidgetSensitivePropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet]
    type AttrBaseTypeConstraint WidgetSensitivePropertyInfo = IsWidget
    type AttrSetTypeConstraint WidgetSensitivePropertyInfo = (~) Bool
    type AttrTransferTypeConstraint WidgetSensitivePropertyInfo = (~) Bool
    type AttrTransferType WidgetSensitivePropertyInfo = Bool
    type AttrGetType WidgetSensitivePropertyInfo = Bool
    type AttrLabel WidgetSensitivePropertyInfo = "sensitive"
    type AttrOrigin WidgetSensitivePropertyInfo = Widget
    attrGet = getWidgetSensitive
    attrSet = setWidgetSensitive
    attrTransfer _ v = do
        return v
    attrConstruct = constructWidgetSensitive
    attrClear = undefined
#endif

-- VVV Prop "surface"
   -- Type: TInterface (Name {namespace = "Gdk", name = "Surface"})
   -- Flags: [PropertyReadable]
   -- Nullable: (Just True,Nothing)

-- | Get the value of the “@surface@” property.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Attributes.get' widget #surface
-- @
getWidgetSurface :: (MonadIO m, IsWidget o) => o -> m (Maybe Gdk.Surface.Surface)
getWidgetSurface :: o -> m (Maybe Surface)
getWidgetSurface obj :: o
obj = IO (Maybe Surface) -> m (Maybe Surface)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Maybe Surface) -> m (Maybe Surface))
-> IO (Maybe Surface) -> m (Maybe Surface)
forall a b. (a -> b) -> a -> b
$ o
-> String -> (ManagedPtr Surface -> Surface) -> IO (Maybe Surface)
forall a b.
(GObject a, GObject b) =>
a -> String -> (ManagedPtr b -> b) -> IO (Maybe b)
B.Properties.getObjectPropertyObject o
obj "surface" ManagedPtr Surface -> Surface
Gdk.Surface.Surface

#if defined(ENABLE_OVERLOADING)
data WidgetSurfacePropertyInfo
instance AttrInfo WidgetSurfacePropertyInfo where
    type AttrAllowedOps WidgetSurfacePropertyInfo = '[ 'AttrGet, 'AttrClear]
    type AttrBaseTypeConstraint WidgetSurfacePropertyInfo = IsWidget
    type AttrSetTypeConstraint WidgetSurfacePropertyInfo = (~) ()
    type AttrTransferTypeConstraint WidgetSurfacePropertyInfo = (~) ()
    type AttrTransferType WidgetSurfacePropertyInfo = ()
    type AttrGetType WidgetSurfacePropertyInfo = (Maybe Gdk.Surface.Surface)
    type AttrLabel WidgetSurfacePropertyInfo = "surface"
    type AttrOrigin WidgetSurfacePropertyInfo = Widget
    attrGet = getWidgetSurface
    attrSet = undefined
    attrTransfer _ = undefined
    attrConstruct = undefined
    attrClear = undefined
#endif

-- VVV Prop "tooltip-markup"
   -- Type: TBasicType TUTF8
   -- Flags: [PropertyReadable,PropertyWritable]
   -- Nullable: (Nothing,Just True)

-- | Get the value of the “@tooltip-markup@” property.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Attributes.get' widget #tooltipMarkup
-- @
getWidgetTooltipMarkup :: (MonadIO m, IsWidget o) => o -> m (Maybe T.Text)
getWidgetTooltipMarkup :: o -> m (Maybe Text)
getWidgetTooltipMarkup obj :: o
obj = IO (Maybe Text) -> m (Maybe Text)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Maybe Text) -> m (Maybe Text))
-> IO (Maybe Text) -> m (Maybe Text)
forall a b. (a -> b) -> a -> b
$ o -> String -> IO (Maybe Text)
forall a. GObject a => a -> String -> IO (Maybe Text)
B.Properties.getObjectPropertyString o
obj "tooltip-markup"

-- | Set the value of the “@tooltip-markup@” property.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Attributes.set' widget [ #tooltipMarkup 'Data.GI.Base.Attributes.:=' value ]
-- @
setWidgetTooltipMarkup :: (MonadIO m, IsWidget o) => o -> T.Text -> m ()
setWidgetTooltipMarkup :: o -> Text -> m ()
setWidgetTooltipMarkup obj :: o
obj val :: Text
val = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ o -> String -> Maybe Text -> IO ()
forall a. GObject a => a -> String -> Maybe Text -> IO ()
B.Properties.setObjectPropertyString o
obj "tooltip-markup" (Text -> Maybe Text
forall a. a -> Maybe a
Just Text
val)

-- | Construct a `GValueConstruct` with valid value for the “@tooltip-markup@” property. This is rarely needed directly, but it is used by `Data.GI.Base.Constructible.new`.
constructWidgetTooltipMarkup :: (IsWidget o) => T.Text -> IO (GValueConstruct o)
constructWidgetTooltipMarkup :: Text -> IO (GValueConstruct o)
constructWidgetTooltipMarkup val :: Text
val = String -> Maybe Text -> IO (GValueConstruct o)
forall o. String -> Maybe Text -> IO (GValueConstruct o)
B.Properties.constructObjectPropertyString "tooltip-markup" (Text -> Maybe Text
forall a. a -> Maybe a
Just Text
val)

-- | Set the value of the “@tooltip-markup@” property to `Nothing`.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Attributes.clear' #tooltipMarkup
-- @
clearWidgetTooltipMarkup :: (MonadIO m, IsWidget o) => o -> m ()
clearWidgetTooltipMarkup :: o -> m ()
clearWidgetTooltipMarkup obj :: o
obj = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ o -> String -> Maybe Text -> IO ()
forall a. GObject a => a -> String -> Maybe Text -> IO ()
B.Properties.setObjectPropertyString o
obj "tooltip-markup" (Maybe Text
forall a. Maybe a
Nothing :: Maybe T.Text)

#if defined(ENABLE_OVERLOADING)
data WidgetTooltipMarkupPropertyInfo
instance AttrInfo WidgetTooltipMarkupPropertyInfo where
    type AttrAllowedOps WidgetTooltipMarkupPropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet, 'AttrClear]
    type AttrBaseTypeConstraint WidgetTooltipMarkupPropertyInfo = IsWidget
    type AttrSetTypeConstraint WidgetTooltipMarkupPropertyInfo = (~) T.Text
    type AttrTransferTypeConstraint WidgetTooltipMarkupPropertyInfo = (~) T.Text
    type AttrTransferType WidgetTooltipMarkupPropertyInfo = T.Text
    type AttrGetType WidgetTooltipMarkupPropertyInfo = (Maybe T.Text)
    type AttrLabel WidgetTooltipMarkupPropertyInfo = "tooltip-markup"
    type AttrOrigin WidgetTooltipMarkupPropertyInfo = Widget
    attrGet = getWidgetTooltipMarkup
    attrSet = setWidgetTooltipMarkup
    attrTransfer _ v = do
        return v
    attrConstruct = constructWidgetTooltipMarkup
    attrClear = clearWidgetTooltipMarkup
#endif

-- VVV Prop "tooltip-text"
   -- Type: TBasicType TUTF8
   -- Flags: [PropertyReadable,PropertyWritable]
   -- Nullable: (Nothing,Just True)

-- | Get the value of the “@tooltip-text@” property.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Attributes.get' widget #tooltipText
-- @
getWidgetTooltipText :: (MonadIO m, IsWidget o) => o -> m (Maybe T.Text)
getWidgetTooltipText :: o -> m (Maybe Text)
getWidgetTooltipText obj :: o
obj = IO (Maybe Text) -> m (Maybe Text)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Maybe Text) -> m (Maybe Text))
-> IO (Maybe Text) -> m (Maybe Text)
forall a b. (a -> b) -> a -> b
$ o -> String -> IO (Maybe Text)
forall a. GObject a => a -> String -> IO (Maybe Text)
B.Properties.getObjectPropertyString o
obj "tooltip-text"

-- | Set the value of the “@tooltip-text@” property.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Attributes.set' widget [ #tooltipText 'Data.GI.Base.Attributes.:=' value ]
-- @
setWidgetTooltipText :: (MonadIO m, IsWidget o) => o -> T.Text -> m ()
setWidgetTooltipText :: o -> Text -> m ()
setWidgetTooltipText obj :: o
obj val :: Text
val = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ o -> String -> Maybe Text -> IO ()
forall a. GObject a => a -> String -> Maybe Text -> IO ()
B.Properties.setObjectPropertyString o
obj "tooltip-text" (Text -> Maybe Text
forall a. a -> Maybe a
Just Text
val)

-- | Construct a `GValueConstruct` with valid value for the “@tooltip-text@” property. This is rarely needed directly, but it is used by `Data.GI.Base.Constructible.new`.
constructWidgetTooltipText :: (IsWidget o) => T.Text -> IO (GValueConstruct o)
constructWidgetTooltipText :: Text -> IO (GValueConstruct o)
constructWidgetTooltipText val :: Text
val = String -> Maybe Text -> IO (GValueConstruct o)
forall o. String -> Maybe Text -> IO (GValueConstruct o)
B.Properties.constructObjectPropertyString "tooltip-text" (Text -> Maybe Text
forall a. a -> Maybe a
Just Text
val)

-- | Set the value of the “@tooltip-text@” property to `Nothing`.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Attributes.clear' #tooltipText
-- @
clearWidgetTooltipText :: (MonadIO m, IsWidget o) => o -> m ()
clearWidgetTooltipText :: o -> m ()
clearWidgetTooltipText obj :: o
obj = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ o -> String -> Maybe Text -> IO ()
forall a. GObject a => a -> String -> Maybe Text -> IO ()
B.Properties.setObjectPropertyString o
obj "tooltip-text" (Maybe Text
forall a. Maybe a
Nothing :: Maybe T.Text)

#if defined(ENABLE_OVERLOADING)
data WidgetTooltipTextPropertyInfo
instance AttrInfo WidgetTooltipTextPropertyInfo where
    type AttrAllowedOps WidgetTooltipTextPropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet, 'AttrClear]
    type AttrBaseTypeConstraint WidgetTooltipTextPropertyInfo = IsWidget
    type AttrSetTypeConstraint WidgetTooltipTextPropertyInfo = (~) T.Text
    type AttrTransferTypeConstraint WidgetTooltipTextPropertyInfo = (~) T.Text
    type AttrTransferType WidgetTooltipTextPropertyInfo = T.Text
    type AttrGetType WidgetTooltipTextPropertyInfo = (Maybe T.Text)
    type AttrLabel WidgetTooltipTextPropertyInfo = "tooltip-text"
    type AttrOrigin WidgetTooltipTextPropertyInfo = Widget
    attrGet = getWidgetTooltipText
    attrSet = setWidgetTooltipText
    attrTransfer _ v = do
        return v
    attrConstruct = constructWidgetTooltipText
    attrClear = clearWidgetTooltipText
#endif

-- VVV Prop "valign"
   -- Type: TInterface (Name {namespace = "Gtk", name = "Align"})
   -- Flags: [PropertyReadable,PropertyWritable]
   -- Nullable: (Just False,Just False)

-- | Get the value of the “@valign@” property.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Attributes.get' widget #valign
-- @
getWidgetValign :: (MonadIO m, IsWidget o) => o -> m Gtk.Enums.Align
getWidgetValign :: o -> m Align
getWidgetValign obj :: o
obj = IO Align -> m Align
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Align -> m Align) -> IO Align -> m Align
forall a b. (a -> b) -> a -> b
$ o -> String -> IO Align
forall a b. (GObject a, Enum b, BoxedEnum b) => a -> String -> IO b
B.Properties.getObjectPropertyEnum o
obj "valign"

-- | Set the value of the “@valign@” property.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Attributes.set' widget [ #valign 'Data.GI.Base.Attributes.:=' value ]
-- @
setWidgetValign :: (MonadIO m, IsWidget o) => o -> Gtk.Enums.Align -> m ()
setWidgetValign :: o -> Align -> m ()
setWidgetValign obj :: o
obj val :: Align
val = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ o -> String -> Align -> IO ()
forall a b.
(GObject a, Enum b, BoxedEnum b) =>
a -> String -> b -> IO ()
B.Properties.setObjectPropertyEnum o
obj "valign" Align
val

-- | Construct a `GValueConstruct` with valid value for the “@valign@” property. This is rarely needed directly, but it is used by `Data.GI.Base.Constructible.new`.
constructWidgetValign :: (IsWidget o) => Gtk.Enums.Align -> IO (GValueConstruct o)
constructWidgetValign :: Align -> IO (GValueConstruct o)
constructWidgetValign val :: Align
val = String -> Align -> IO (GValueConstruct o)
forall a o.
(Enum a, BoxedEnum a) =>
String -> a -> IO (GValueConstruct o)
B.Properties.constructObjectPropertyEnum "valign" Align
val

#if defined(ENABLE_OVERLOADING)
data WidgetValignPropertyInfo
instance AttrInfo WidgetValignPropertyInfo where
    type AttrAllowedOps WidgetValignPropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet]
    type AttrBaseTypeConstraint WidgetValignPropertyInfo = IsWidget
    type AttrSetTypeConstraint WidgetValignPropertyInfo = (~) Gtk.Enums.Align
    type AttrTransferTypeConstraint WidgetValignPropertyInfo = (~) Gtk.Enums.Align
    type AttrTransferType WidgetValignPropertyInfo = Gtk.Enums.Align
    type AttrGetType WidgetValignPropertyInfo = Gtk.Enums.Align
    type AttrLabel WidgetValignPropertyInfo = "valign"
    type AttrOrigin WidgetValignPropertyInfo = Widget
    attrGet = getWidgetValign
    attrSet = setWidgetValign
    attrTransfer _ v = do
        return v
    attrConstruct = constructWidgetValign
    attrClear = undefined
#endif

-- VVV Prop "vexpand"
   -- Type: TBasicType TBoolean
   -- Flags: [PropertyReadable,PropertyWritable]
   -- Nullable: (Just False,Just False)

-- | Get the value of the “@vexpand@” property.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Attributes.get' widget #vexpand
-- @
getWidgetVexpand :: (MonadIO m, IsWidget o) => o -> m Bool
getWidgetVexpand :: o -> m Bool
getWidgetVexpand obj :: o
obj = WidgetPopupMenuCallback -> m Bool
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (WidgetPopupMenuCallback -> m Bool)
-> WidgetPopupMenuCallback -> m Bool
forall a b. (a -> b) -> a -> b
$ o -> String -> WidgetPopupMenuCallback
forall a. GObject a => a -> String -> WidgetPopupMenuCallback
B.Properties.getObjectPropertyBool o
obj "vexpand"

-- | Set the value of the “@vexpand@” property.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Attributes.set' widget [ #vexpand 'Data.GI.Base.Attributes.:=' value ]
-- @
setWidgetVexpand :: (MonadIO m, IsWidget o) => o -> Bool -> m ()
setWidgetVexpand :: o -> Bool -> m ()
setWidgetVexpand obj :: o
obj val :: Bool
val = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ o -> String -> WidgetGrabNotifyCallback
forall a. GObject a => a -> String -> WidgetGrabNotifyCallback
B.Properties.setObjectPropertyBool o
obj "vexpand" Bool
val

-- | Construct a `GValueConstruct` with valid value for the “@vexpand@” property. This is rarely needed directly, but it is used by `Data.GI.Base.Constructible.new`.
constructWidgetVexpand :: (IsWidget o) => Bool -> IO (GValueConstruct o)
constructWidgetVexpand :: Bool -> IO (GValueConstruct o)
constructWidgetVexpand val :: Bool
val = String -> Bool -> IO (GValueConstruct o)
forall o. String -> Bool -> IO (GValueConstruct o)
B.Properties.constructObjectPropertyBool "vexpand" Bool
val

#if defined(ENABLE_OVERLOADING)
data WidgetVexpandPropertyInfo
instance AttrInfo WidgetVexpandPropertyInfo where
    type AttrAllowedOps WidgetVexpandPropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet]
    type AttrBaseTypeConstraint WidgetVexpandPropertyInfo = IsWidget
    type AttrSetTypeConstraint WidgetVexpandPropertyInfo = (~) Bool
    type AttrTransferTypeConstraint WidgetVexpandPropertyInfo = (~) Bool
    type AttrTransferType WidgetVexpandPropertyInfo = Bool
    type AttrGetType WidgetVexpandPropertyInfo = Bool
    type AttrLabel WidgetVexpandPropertyInfo = "vexpand"
    type AttrOrigin WidgetVexpandPropertyInfo = Widget
    attrGet = getWidgetVexpand
    attrSet = setWidgetVexpand
    attrTransfer _ v = do
        return v
    attrConstruct = constructWidgetVexpand
    attrClear = undefined
#endif

-- VVV Prop "vexpand-set"
   -- Type: TBasicType TBoolean
   -- Flags: [PropertyReadable,PropertyWritable]
   -- Nullable: (Just False,Just False)

-- | Get the value of the “@vexpand-set@” property.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Attributes.get' widget #vexpandSet
-- @
getWidgetVexpandSet :: (MonadIO m, IsWidget o) => o -> m Bool
getWidgetVexpandSet :: o -> m Bool
getWidgetVexpandSet obj :: o
obj = WidgetPopupMenuCallback -> m Bool
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (WidgetPopupMenuCallback -> m Bool)
-> WidgetPopupMenuCallback -> m Bool
forall a b. (a -> b) -> a -> b
$ o -> String -> WidgetPopupMenuCallback
forall a. GObject a => a -> String -> WidgetPopupMenuCallback
B.Properties.getObjectPropertyBool o
obj "vexpand-set"

-- | Set the value of the “@vexpand-set@” property.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Attributes.set' widget [ #vexpandSet 'Data.GI.Base.Attributes.:=' value ]
-- @
setWidgetVexpandSet :: (MonadIO m, IsWidget o) => o -> Bool -> m ()
setWidgetVexpandSet :: o -> Bool -> m ()
setWidgetVexpandSet obj :: o
obj val :: Bool
val = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ o -> String -> WidgetGrabNotifyCallback
forall a. GObject a => a -> String -> WidgetGrabNotifyCallback
B.Properties.setObjectPropertyBool o
obj "vexpand-set" Bool
val

-- | Construct a `GValueConstruct` with valid value for the “@vexpand-set@” property. This is rarely needed directly, but it is used by `Data.GI.Base.Constructible.new`.
constructWidgetVexpandSet :: (IsWidget o) => Bool -> IO (GValueConstruct o)
constructWidgetVexpandSet :: Bool -> IO (GValueConstruct o)
constructWidgetVexpandSet val :: Bool
val = String -> Bool -> IO (GValueConstruct o)
forall o. String -> Bool -> IO (GValueConstruct o)
B.Properties.constructObjectPropertyBool "vexpand-set" Bool
val

#if defined(ENABLE_OVERLOADING)
data WidgetVexpandSetPropertyInfo
instance AttrInfo WidgetVexpandSetPropertyInfo where
    type AttrAllowedOps WidgetVexpandSetPropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet]
    type AttrBaseTypeConstraint WidgetVexpandSetPropertyInfo = IsWidget
    type AttrSetTypeConstraint WidgetVexpandSetPropertyInfo = (~) Bool
    type AttrTransferTypeConstraint WidgetVexpandSetPropertyInfo = (~) Bool
    type AttrTransferType WidgetVexpandSetPropertyInfo = Bool
    type AttrGetType WidgetVexpandSetPropertyInfo = Bool
    type AttrLabel WidgetVexpandSetPropertyInfo = "vexpand-set"
    type AttrOrigin WidgetVexpandSetPropertyInfo = Widget
    attrGet = getWidgetVexpandSet
    attrSet = setWidgetVexpandSet
    attrTransfer _ v = do
        return v
    attrConstruct = constructWidgetVexpandSet
    attrClear = undefined
#endif

-- VVV Prop "visible"
   -- Type: TBasicType TBoolean
   -- Flags: [PropertyReadable,PropertyWritable]
   -- Nullable: (Just False,Just False)

-- | Get the value of the “@visible@” property.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Attributes.get' widget #visible
-- @
getWidgetVisible :: (MonadIO m, IsWidget o) => o -> m Bool
getWidgetVisible :: o -> m Bool
getWidgetVisible obj :: o
obj = WidgetPopupMenuCallback -> m Bool
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (WidgetPopupMenuCallback -> m Bool)
-> WidgetPopupMenuCallback -> m Bool
forall a b. (a -> b) -> a -> b
$ o -> String -> WidgetPopupMenuCallback
forall a. GObject a => a -> String -> WidgetPopupMenuCallback
B.Properties.getObjectPropertyBool o
obj "visible"

-- | Set the value of the “@visible@” property.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Attributes.set' widget [ #visible 'Data.GI.Base.Attributes.:=' value ]
-- @
setWidgetVisible :: (MonadIO m, IsWidget o) => o -> Bool -> m ()
setWidgetVisible :: o -> Bool -> m ()
setWidgetVisible obj :: o
obj val :: Bool
val = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ o -> String -> WidgetGrabNotifyCallback
forall a. GObject a => a -> String -> WidgetGrabNotifyCallback
B.Properties.setObjectPropertyBool o
obj "visible" Bool
val

-- | Construct a `GValueConstruct` with valid value for the “@visible@” property. This is rarely needed directly, but it is used by `Data.GI.Base.Constructible.new`.
constructWidgetVisible :: (IsWidget o) => Bool -> IO (GValueConstruct o)
constructWidgetVisible :: Bool -> IO (GValueConstruct o)
constructWidgetVisible val :: Bool
val = String -> Bool -> IO (GValueConstruct o)
forall o. String -> Bool -> IO (GValueConstruct o)
B.Properties.constructObjectPropertyBool "visible" Bool
val

#if defined(ENABLE_OVERLOADING)
data WidgetVisiblePropertyInfo
instance AttrInfo WidgetVisiblePropertyInfo where
    type AttrAllowedOps WidgetVisiblePropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet]
    type AttrBaseTypeConstraint WidgetVisiblePropertyInfo = IsWidget
    type AttrSetTypeConstraint WidgetVisiblePropertyInfo = (~) Bool
    type AttrTransferTypeConstraint WidgetVisiblePropertyInfo = (~) Bool
    type AttrTransferType WidgetVisiblePropertyInfo = Bool
    type AttrGetType WidgetVisiblePropertyInfo = Bool
    type AttrLabel WidgetVisiblePropertyInfo = "visible"
    type AttrOrigin WidgetVisiblePropertyInfo = Widget
    attrGet = getWidgetVisible
    attrSet = setWidgetVisible
    attrTransfer _ v = do
        return v
    attrConstruct = constructWidgetVisible
    attrClear = undefined
#endif

-- VVV Prop "width-request"
   -- Type: TBasicType TInt
   -- Flags: [PropertyReadable,PropertyWritable]
   -- Nullable: (Nothing,Nothing)

-- | Get the value of the “@width-request@” property.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Attributes.get' widget #widthRequest
-- @
getWidgetWidthRequest :: (MonadIO m, IsWidget o) => o -> m Int32
getWidgetWidthRequest :: o -> m Int32
getWidgetWidthRequest obj :: o
obj = IO Int32 -> m Int32
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Int32 -> m Int32) -> IO Int32 -> m Int32
forall a b. (a -> b) -> a -> b
$ o -> String -> IO Int32
forall a. GObject a => a -> String -> IO Int32
B.Properties.getObjectPropertyInt32 o
obj "width-request"

-- | Set the value of the “@width-request@” property.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Attributes.set' widget [ #widthRequest 'Data.GI.Base.Attributes.:=' value ]
-- @
setWidgetWidthRequest :: (MonadIO m, IsWidget o) => o -> Int32 -> m ()
setWidgetWidthRequest :: o -> Int32 -> m ()
setWidgetWidthRequest obj :: o
obj val :: Int32
val = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ o -> String -> Int32 -> IO ()
forall a. GObject a => a -> String -> Int32 -> IO ()
B.Properties.setObjectPropertyInt32 o
obj "width-request" Int32
val

-- | Construct a `GValueConstruct` with valid value for the “@width-request@” property. This is rarely needed directly, but it is used by `Data.GI.Base.Constructible.new`.
constructWidgetWidthRequest :: (IsWidget o) => Int32 -> IO (GValueConstruct o)
constructWidgetWidthRequest :: Int32 -> IO (GValueConstruct o)
constructWidgetWidthRequest val :: Int32
val = String -> Int32 -> IO (GValueConstruct o)
forall o. String -> Int32 -> IO (GValueConstruct o)
B.Properties.constructObjectPropertyInt32 "width-request" Int32
val

#if defined(ENABLE_OVERLOADING)
data WidgetWidthRequestPropertyInfo
instance AttrInfo WidgetWidthRequestPropertyInfo where
    type AttrAllowedOps WidgetWidthRequestPropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet]
    type AttrBaseTypeConstraint WidgetWidthRequestPropertyInfo = IsWidget
    type AttrSetTypeConstraint WidgetWidthRequestPropertyInfo = (~) Int32
    type AttrTransferTypeConstraint WidgetWidthRequestPropertyInfo = (~) Int32
    type AttrTransferType WidgetWidthRequestPropertyInfo = Int32
    type AttrGetType WidgetWidthRequestPropertyInfo = Int32
    type AttrLabel WidgetWidthRequestPropertyInfo = "width-request"
    type AttrOrigin WidgetWidthRequestPropertyInfo = Widget
    attrGet = getWidgetWidthRequest
    attrSet = setWidgetWidthRequest
    attrTransfer _ v = do
        return v
    attrConstruct = constructWidgetWidthRequest
    attrClear = undefined
#endif

#if defined(ENABLE_OVERLOADING)
instance O.HasAttributeList Widget
type instance O.AttributeList Widget = WidgetAttributeList
type WidgetAttributeList = ('[ '("canFocus", WidgetCanFocusPropertyInfo), '("canTarget", WidgetCanTargetPropertyInfo), '("cssName", WidgetCssNamePropertyInfo), '("cursor", WidgetCursorPropertyInfo), '("expand", WidgetExpandPropertyInfo), '("focusOnClick", WidgetFocusOnClickPropertyInfo), '("halign", WidgetHalignPropertyInfo), '("hasDefault", WidgetHasDefaultPropertyInfo), '("hasFocus", WidgetHasFocusPropertyInfo), '("hasTooltip", WidgetHasTooltipPropertyInfo), '("heightRequest", WidgetHeightRequestPropertyInfo), '("hexpand", WidgetHexpandPropertyInfo), '("hexpandSet", WidgetHexpandSetPropertyInfo), '("isFocus", WidgetIsFocusPropertyInfo), '("layoutManager", WidgetLayoutManagerPropertyInfo), '("margin", WidgetMarginPropertyInfo), '("marginBottom", WidgetMarginBottomPropertyInfo), '("marginEnd", WidgetMarginEndPropertyInfo), '("marginStart", WidgetMarginStartPropertyInfo), '("marginTop", WidgetMarginTopPropertyInfo), '("name", WidgetNamePropertyInfo), '("opacity", WidgetOpacityPropertyInfo), '("overflow", WidgetOverflowPropertyInfo), '("parent", WidgetParentPropertyInfo), '("receivesDefault", WidgetReceivesDefaultPropertyInfo), '("root", WidgetRootPropertyInfo), '("scaleFactor", WidgetScaleFactorPropertyInfo), '("sensitive", WidgetSensitivePropertyInfo), '("surface", WidgetSurfacePropertyInfo), '("tooltipMarkup", WidgetTooltipMarkupPropertyInfo), '("tooltipText", WidgetTooltipTextPropertyInfo), '("valign", WidgetValignPropertyInfo), '("vexpand", WidgetVexpandPropertyInfo), '("vexpandSet", WidgetVexpandSetPropertyInfo), '("visible", WidgetVisiblePropertyInfo), '("widthRequest", WidgetWidthRequestPropertyInfo)] :: [(Symbol, *)])
#endif

#if defined(ENABLE_OVERLOADING)
widgetCanFocus :: AttrLabelProxy "canFocus"
widgetCanFocus = AttrLabelProxy

widgetCanTarget :: AttrLabelProxy "canTarget"
widgetCanTarget = AttrLabelProxy

widgetCssName :: AttrLabelProxy "cssName"
widgetCssName = AttrLabelProxy

widgetCursor :: AttrLabelProxy "cursor"
widgetCursor = AttrLabelProxy

widgetExpand :: AttrLabelProxy "expand"
widgetExpand = AttrLabelProxy

widgetFocusOnClick :: AttrLabelProxy "focusOnClick"
widgetFocusOnClick = AttrLabelProxy

widgetHalign :: AttrLabelProxy "halign"
widgetHalign = AttrLabelProxy

widgetHasTooltip :: AttrLabelProxy "hasTooltip"
widgetHasTooltip = AttrLabelProxy

widgetHeightRequest :: AttrLabelProxy "heightRequest"
widgetHeightRequest = AttrLabelProxy

widgetHexpand :: AttrLabelProxy "hexpand"
widgetHexpand = AttrLabelProxy

widgetHexpandSet :: AttrLabelProxy "hexpandSet"
widgetHexpandSet = AttrLabelProxy

widgetLayoutManager :: AttrLabelProxy "layoutManager"
widgetLayoutManager = AttrLabelProxy

widgetMargin :: AttrLabelProxy "margin"
widgetMargin = AttrLabelProxy

widgetMarginBottom :: AttrLabelProxy "marginBottom"
widgetMarginBottom = AttrLabelProxy

widgetMarginEnd :: AttrLabelProxy "marginEnd"
widgetMarginEnd = AttrLabelProxy

widgetMarginStart :: AttrLabelProxy "marginStart"
widgetMarginStart = AttrLabelProxy

widgetMarginTop :: AttrLabelProxy "marginTop"
widgetMarginTop = AttrLabelProxy

widgetName :: AttrLabelProxy "name"
widgetName = AttrLabelProxy

widgetOpacity :: AttrLabelProxy "opacity"
widgetOpacity = AttrLabelProxy

widgetOverflow :: AttrLabelProxy "overflow"
widgetOverflow = AttrLabelProxy

widgetParent :: AttrLabelProxy "parent"
widgetParent = AttrLabelProxy

widgetReceivesDefault :: AttrLabelProxy "receivesDefault"
widgetReceivesDefault = AttrLabelProxy

widgetRoot :: AttrLabelProxy "root"
widgetRoot = AttrLabelProxy

widgetScaleFactor :: AttrLabelProxy "scaleFactor"
widgetScaleFactor = AttrLabelProxy

widgetSensitive :: AttrLabelProxy "sensitive"
widgetSensitive = AttrLabelProxy

widgetSurface :: AttrLabelProxy "surface"
widgetSurface = AttrLabelProxy

widgetTooltipMarkup :: AttrLabelProxy "tooltipMarkup"
widgetTooltipMarkup = AttrLabelProxy

widgetTooltipText :: AttrLabelProxy "tooltipText"
widgetTooltipText = AttrLabelProxy

widgetValign :: AttrLabelProxy "valign"
widgetValign = AttrLabelProxy

widgetVexpand :: AttrLabelProxy "vexpand"
widgetVexpand = AttrLabelProxy

widgetVexpandSet :: AttrLabelProxy "vexpandSet"
widgetVexpandSet = AttrLabelProxy

widgetVisible :: AttrLabelProxy "visible"
widgetVisible = AttrLabelProxy

widgetWidthRequest :: AttrLabelProxy "widthRequest"
widgetWidthRequest = AttrLabelProxy

#endif

#if defined(ENABLE_OVERLOADING)
type instance O.SignalList Widget = WidgetSignalList
type WidgetSignalList = ('[ '("accelClosuresChanged", WidgetAccelClosuresChangedSignalInfo), '("canActivateAccel", WidgetCanActivateAccelSignalInfo), '("destroy", WidgetDestroySignalInfo), '("directionChanged", WidgetDirectionChangedSignalInfo), '("dragBegin", WidgetDragBeginSignalInfo), '("dragDataDelete", WidgetDragDataDeleteSignalInfo), '("dragDataGet", WidgetDragDataGetSignalInfo), '("dragDataReceived", WidgetDragDataReceivedSignalInfo), '("dragDrop", WidgetDragDropSignalInfo), '("dragEnd", WidgetDragEndSignalInfo), '("dragFailed", WidgetDragFailedSignalInfo), '("dragLeave", WidgetDragLeaveSignalInfo), '("dragMotion", WidgetDragMotionSignalInfo), '("grabNotify", WidgetGrabNotifySignalInfo), '("hide", WidgetHideSignalInfo), '("keynavFailed", WidgetKeynavFailedSignalInfo), '("map", WidgetMapSignalInfo), '("mnemonicActivate", WidgetMnemonicActivateSignalInfo), '("moveFocus", WidgetMoveFocusSignalInfo), '("notify", GObject.Object.ObjectNotifySignalInfo), '("popupMenu", WidgetPopupMenuSignalInfo), '("queryTooltip", WidgetQueryTooltipSignalInfo), '("realize", WidgetRealizeSignalInfo), '("show", WidgetShowSignalInfo), '("sizeAllocate", WidgetSizeAllocateSignalInfo), '("stateFlagsChanged", WidgetStateFlagsChangedSignalInfo), '("styleUpdated", WidgetStyleUpdatedSignalInfo), '("unmap", WidgetUnmapSignalInfo), '("unrealize", WidgetUnrealizeSignalInfo)] :: [(Symbol, *)])

#endif

-- method Widget::activate
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "widget"
--           , argType = TInterface Name { namespace = "Gtk" , name = "Widget" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #GtkWidget that\8217s activatable"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TBasicType TBoolean)
-- throws : False
-- Skip return : False

foreign import ccall "gtk_widget_activate" gtk_widget_activate :: 
    Ptr Widget ->                           -- widget : TInterface (Name {namespace = "Gtk", name = "Widget"})
    IO CInt

-- | For widgets that can be “activated” (buttons, menu items, etc.)
-- this function activates them. Activation is what happens when you
-- press Enter on a widget during key navigation. If /@widget@/ isn\'t
-- activatable, the function returns 'P.False'.
widgetActivate ::
    (B.CallStack.HasCallStack, MonadIO m, IsWidget a) =>
    a
    -- ^ /@widget@/: a t'GI.Gtk.Objects.Widget.Widget' that’s activatable
    -> m Bool
    -- ^ __Returns:__ 'P.True' if the widget was activatable
widgetActivate :: a -> m Bool
widgetActivate widget :: a
widget = WidgetPopupMenuCallback -> m Bool
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (WidgetPopupMenuCallback -> m Bool)
-> WidgetPopupMenuCallback -> m Bool
forall a b. (a -> b) -> a -> b
$ do
    Ptr Widget
widget' <- a -> IO (Ptr Widget)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
widget
    CInt
result <- Ptr Widget -> IO CInt
gtk_widget_activate Ptr Widget
widget'
    let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= 0) CInt
result
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
widget
    WidgetMnemonicActivateCallback
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'

#if defined(ENABLE_OVERLOADING)
data WidgetActivateMethodInfo
instance (signature ~ (m Bool), MonadIO m, IsWidget a) => O.MethodInfo WidgetActivateMethodInfo a signature where
    overloadedMethod = widgetActivate

#endif

-- method Widget::activate_action
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "widget"
--           , argType = TInterface Name { namespace = "Gtk" , name = "Widget" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #GtkWidget" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "name"
--           , argType = TBasicType TUTF8
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a prefixed action name"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "parameter"
--           , argType = TVariant
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "parameters that required by the action"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "gtk_widget_activate_action" gtk_widget_activate_action :: 
    Ptr Widget ->                           -- widget : TInterface (Name {namespace = "Gtk", name = "Widget"})
    CString ->                              -- name : TBasicType TUTF8
    Ptr GVariant ->                         -- parameter : TVariant
    IO ()

-- | Looks up the action in the action groups associated
-- with /@widget@/ and its ancestors, and activates it.
-- 
-- The action name is expected to be prefixed with the
-- prefix that was used when adding the action group
-- with 'GI.Gtk.Objects.Widget.widgetInsertActionGroup'.
-- 
-- The /@parameter@/ must match the actions expected parameter
-- type, as returned by 'GI.Gio.Interfaces.Action.actionGetParameterType'.
widgetActivateAction ::
    (B.CallStack.HasCallStack, MonadIO m, IsWidget a) =>
    a
    -- ^ /@widget@/: a t'GI.Gtk.Objects.Widget.Widget'
    -> T.Text
    -- ^ /@name@/: a prefixed action name
    -> GVariant
    -- ^ /@parameter@/: parameters that required by the action
    -> m ()
widgetActivateAction :: a -> Text -> GVariant -> m ()
widgetActivateAction widget :: a
widget name :: Text
name parameter :: GVariant
parameter = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    Ptr Widget
widget' <- a -> IO (Ptr Widget)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
widget
    CString
name' <- Text -> IO CString
textToCString Text
name
    Ptr GVariant
parameter' <- GVariant -> IO (Ptr GVariant)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr GVariant
parameter
    Ptr Widget -> CString -> Ptr GVariant -> IO ()
gtk_widget_activate_action Ptr Widget
widget' CString
name' Ptr GVariant
parameter'
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
widget
    GVariant -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr GVariant
parameter
    CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
name'
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()

#if defined(ENABLE_OVERLOADING)
data WidgetActivateActionMethodInfo
instance (signature ~ (T.Text -> GVariant -> m ()), MonadIO m, IsWidget a) => O.MethodInfo WidgetActivateActionMethodInfo a signature where
    overloadedMethod = widgetActivateAction

#endif

-- method Widget::activate_default
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "widget"
--           , argType = TInterface Name { namespace = "Gtk" , name = "Widget" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #GtkWidget" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "gtk_widget_activate_default" gtk_widget_activate_default :: 
    Ptr Widget ->                           -- widget : TInterface (Name {namespace = "Gtk", name = "Widget"})
    IO ()

-- | Activate the default.activate action from /@widget@/.
widgetActivateDefault ::
    (B.CallStack.HasCallStack, MonadIO m, IsWidget a) =>
    a
    -- ^ /@widget@/: a t'GI.Gtk.Objects.Widget.Widget'
    -> m ()
widgetActivateDefault :: a -> m ()
widgetActivateDefault widget :: a
widget = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    Ptr Widget
widget' <- a -> IO (Ptr Widget)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
widget
    Ptr Widget -> IO ()
gtk_widget_activate_default Ptr Widget
widget'
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
widget
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()

#if defined(ENABLE_OVERLOADING)
data WidgetActivateDefaultMethodInfo
instance (signature ~ (m ()), MonadIO m, IsWidget a) => O.MethodInfo WidgetActivateDefaultMethodInfo a signature where
    overloadedMethod = widgetActivateDefault

#endif

-- method Widget::add_accelerator
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "widget"
--           , argType = TInterface Name { namespace = "Gtk" , name = "Widget" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "widget to install an accelerator on"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "accel_signal"
--           , argType = TBasicType TUTF8
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText =
--                     Just "widget signal to emit on accelerator activation"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "accel_group"
--           , argType =
--               TInterface Name { namespace = "Gtk" , name = "AccelGroup" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText =
--                     Just "accel group for this widget, added to its toplevel"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "accel_key"
--           , argType = TBasicType TUInt
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "GDK keyval of the accelerator"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "accel_mods"
--           , argType =
--               TInterface Name { namespace = "Gdk" , name = "ModifierType" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "modifier key combination of the accelerator"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "accel_flags"
--           , argType =
--               TInterface Name { namespace = "Gtk" , name = "AccelFlags" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "flag accelerators, e.g. %GTK_ACCEL_VISIBLE"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "gtk_widget_add_accelerator" gtk_widget_add_accelerator :: 
    Ptr Widget ->                           -- widget : TInterface (Name {namespace = "Gtk", name = "Widget"})
    CString ->                              -- accel_signal : TBasicType TUTF8
    Ptr Gtk.AccelGroup.AccelGroup ->        -- accel_group : TInterface (Name {namespace = "Gtk", name = "AccelGroup"})
    Word32 ->                               -- accel_key : TBasicType TUInt
    CUInt ->                                -- accel_mods : TInterface (Name {namespace = "Gdk", name = "ModifierType"})
    CUInt ->                                -- accel_flags : TInterface (Name {namespace = "Gtk", name = "AccelFlags"})
    IO ()

-- | Installs an accelerator for this /@widget@/ in /@accelGroup@/ that causes
-- /@accelSignal@/ to be emitted if the accelerator is activated.
-- The /@accelGroup@/ needs to be added to the widget’s toplevel via
-- 'GI.Gtk.Objects.Window.windowAddAccelGroup', and the signal must be of type 'GI.GObject.Flags.SignalFlagsAction'.
-- Accelerators added through this function are not user changeable during
-- runtime. If you want to support accelerators that can be changed by the
-- user, use 'GI.Gtk.Objects.AccelMap.accelMapAddEntry' and 'GI.Gtk.Objects.Widget.widgetSetAccelPath' or
-- 'GI.Gtk.Objects.MenuItem.menuItemSetAccelPath' instead.
widgetAddAccelerator ::
    (B.CallStack.HasCallStack, MonadIO m, IsWidget a, Gtk.AccelGroup.IsAccelGroup b) =>
    a
    -- ^ /@widget@/: widget to install an accelerator on
    -> T.Text
    -- ^ /@accelSignal@/: widget signal to emit on accelerator activation
    -> b
    -- ^ /@accelGroup@/: accel group for this widget, added to its toplevel
    -> Word32
    -- ^ /@accelKey@/: GDK keyval of the accelerator
    -> [Gdk.Flags.ModifierType]
    -- ^ /@accelMods@/: modifier key combination of the accelerator
    -> [Gtk.Flags.AccelFlags]
    -- ^ /@accelFlags@/: flag accelerators, e.g. 'GI.Gtk.Flags.AccelFlagsVisible'
    -> m ()
widgetAddAccelerator :: a -> Text -> b -> Word32 -> [ModifierType] -> [AccelFlags] -> m ()
widgetAddAccelerator widget :: a
widget accelSignal :: Text
accelSignal accelGroup :: b
accelGroup accelKey :: Word32
accelKey accelMods :: [ModifierType]
accelMods accelFlags :: [AccelFlags]
accelFlags = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    Ptr Widget
widget' <- a -> IO (Ptr Widget)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
widget
    CString
accelSignal' <- Text -> IO CString
textToCString Text
accelSignal
    Ptr AccelGroup
accelGroup' <- b -> IO (Ptr AccelGroup)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
accelGroup
    let accelMods' :: CUInt
accelMods' = [ModifierType] -> CUInt
forall b a. (Num b, IsGFlag a) => [a] -> b
gflagsToWord [ModifierType]
accelMods
    let accelFlags' :: CUInt
accelFlags' = [AccelFlags] -> CUInt
forall b a. (Num b, IsGFlag a) => [a] -> b
gflagsToWord [AccelFlags]
accelFlags
    Ptr Widget
-> CString -> Ptr AccelGroup -> Word32 -> CUInt -> CUInt -> IO ()
gtk_widget_add_accelerator Ptr Widget
widget' CString
accelSignal' Ptr AccelGroup
accelGroup' Word32
accelKey CUInt
accelMods' CUInt
accelFlags'
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
widget
    b -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr b
accelGroup
    CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
accelSignal'
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()

#if defined(ENABLE_OVERLOADING)
data WidgetAddAcceleratorMethodInfo
instance (signature ~ (T.Text -> b -> Word32 -> [Gdk.Flags.ModifierType] -> [Gtk.Flags.AccelFlags] -> m ()), MonadIO m, IsWidget a, Gtk.AccelGroup.IsAccelGroup b) => O.MethodInfo WidgetAddAcceleratorMethodInfo a signature where
    overloadedMethod = widgetAddAccelerator

#endif

-- method Widget::add_controller
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "widget"
--           , argType = TInterface Name { namespace = "Gtk" , name = "Widget" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #GtkWidget" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "controller"
--           , argType =
--               TInterface Name { namespace = "Gtk" , name = "EventController" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText =
--                     Just
--                       "a #GtkEventController that hasn't been\n    added to a widget yet"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferEverything
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "gtk_widget_add_controller" gtk_widget_add_controller :: 
    Ptr Widget ->                           -- widget : TInterface (Name {namespace = "Gtk", name = "Widget"})
    Ptr Gtk.EventController.EventController -> -- controller : TInterface (Name {namespace = "Gtk", name = "EventController"})
    IO ()

-- | Adds /@controller@/ to /@widget@/ so that it will receive events. You will
-- usually want to call this function right after creating any kind of
-- t'GI.Gtk.Objects.EventController.EventController'.
widgetAddController ::
    (B.CallStack.HasCallStack, MonadIO m, IsWidget a, Gtk.EventController.IsEventController b) =>
    a
    -- ^ /@widget@/: a t'GI.Gtk.Objects.Widget.Widget'
    -> b
    -- ^ /@controller@/: a t'GI.Gtk.Objects.EventController.EventController' that hasn\'t been
    --     added to a widget yet
    -> m ()
widgetAddController :: a -> b -> m ()
widgetAddController widget :: a
widget controller :: b
controller = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    Ptr Widget
widget' <- a -> IO (Ptr Widget)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
widget
    Ptr EventController
controller' <- b -> IO (Ptr EventController)
forall a b. (HasCallStack, GObject a) => a -> IO (Ptr b)
B.ManagedPtr.disownObject b
controller
    Ptr Widget -> Ptr EventController -> IO ()
gtk_widget_add_controller Ptr Widget
widget' Ptr EventController
controller'
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
widget
    b -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr b
controller
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()

#if defined(ENABLE_OVERLOADING)
data WidgetAddControllerMethodInfo
instance (signature ~ (b -> m ()), MonadIO m, IsWidget a, Gtk.EventController.IsEventController b) => O.MethodInfo WidgetAddControllerMethodInfo a signature where
    overloadedMethod = widgetAddController

#endif

-- method Widget::add_mnemonic_label
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "widget"
--           , argType = TInterface Name { namespace = "Gtk" , name = "Widget" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #GtkWidget" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "label"
--           , argType = TInterface Name { namespace = "Gtk" , name = "Widget" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText =
--                     Just "a #GtkWidget that acts as a mnemonic label for @widget"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "gtk_widget_add_mnemonic_label" gtk_widget_add_mnemonic_label :: 
    Ptr Widget ->                           -- widget : TInterface (Name {namespace = "Gtk", name = "Widget"})
    Ptr Widget ->                           -- label : TInterface (Name {namespace = "Gtk", name = "Widget"})
    IO ()

-- | Adds a widget to the list of mnemonic labels for
-- this widget. (See 'GI.Gtk.Objects.Widget.widgetListMnemonicLabels'). Note the
-- list of mnemonic labels for the widget is cleared when the
-- widget is destroyed, so the caller must make sure to update
-- its internal state at this point as well, by using a connection
-- to the [destroy]("GI.Gtk.Objects.Widget#signal:destroy") signal or a weak notifier.
widgetAddMnemonicLabel ::
    (B.CallStack.HasCallStack, MonadIO m, IsWidget a, IsWidget b) =>
    a
    -- ^ /@widget@/: a t'GI.Gtk.Objects.Widget.Widget'
    -> b
    -- ^ /@label@/: a t'GI.Gtk.Objects.Widget.Widget' that acts as a mnemonic label for /@widget@/
    -> m ()
widgetAddMnemonicLabel :: a -> b -> m ()
widgetAddMnemonicLabel widget :: a
widget label :: b
label = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    Ptr Widget
widget' <- a -> IO (Ptr Widget)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
widget
    Ptr Widget
label' <- b -> IO (Ptr Widget)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
label
    Ptr Widget -> Ptr Widget -> IO ()
gtk_widget_add_mnemonic_label Ptr Widget
widget' Ptr Widget
label'
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
widget
    b -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr b
label
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()

#if defined(ENABLE_OVERLOADING)
data WidgetAddMnemonicLabelMethodInfo
instance (signature ~ (b -> m ()), MonadIO m, IsWidget a, IsWidget b) => O.MethodInfo WidgetAddMnemonicLabelMethodInfo a signature where
    overloadedMethod = widgetAddMnemonicLabel

#endif

-- method Widget::add_tick_callback
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "widget"
--           , argType = TInterface Name { namespace = "Gtk" , name = "Widget" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #GtkWidget" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "callback"
--           , argType =
--               TInterface Name { namespace = "Gtk" , name = "TickCallback" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "function to call for updating animations"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeNotified
--           , argClosure = 2
--           , argDestroy = 3
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "user_data"
--           , argType = TBasicType TPtr
--           , direction = DirectionIn
--           , mayBeNull = True
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "data to pass to @callback"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "notify"
--           , argType =
--               TInterface Name { namespace = "GLib" , name = "DestroyNotify" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText =
--                     Just
--                       "function to call to free @user_data when the callback is removed."
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeAsync
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TBasicType TUInt)
-- throws : False
-- Skip return : False

foreign import ccall "gtk_widget_add_tick_callback" gtk_widget_add_tick_callback :: 
    Ptr Widget ->                           -- widget : TInterface (Name {namespace = "Gtk", name = "Widget"})
    FunPtr Gtk.Callbacks.C_TickCallback ->  -- callback : TInterface (Name {namespace = "Gtk", name = "TickCallback"})
    Ptr () ->                               -- user_data : TBasicType TPtr
    FunPtr GLib.Callbacks.C_DestroyNotify -> -- notify : TInterface (Name {namespace = "GLib", name = "DestroyNotify"})
    IO Word32

-- | Queues an animation frame update and adds a callback to be called
-- before each frame. Until the tick callback is removed, it will be
-- called frequently (usually at the frame rate of the output device
-- or as quickly as the application can be repainted, whichever is
-- slower). For this reason, is most suitable for handling graphics
-- that change every frame or every few frames. The tick callback does
-- not automatically imply a relayout or repaint. If you want a
-- repaint or relayout, and aren’t changing widget properties that
-- would trigger that (for example, changing the text of a t'GI.Gtk.Objects.Label.Label'),
-- then you will have to call 'GI.Gtk.Objects.Widget.widgetQueueResize' or
-- 'GI.Gtk.Objects.Widget.widgetQueueDraw' yourself.
-- 
-- 'GI.Gdk.Objects.FrameClock.frameClockGetFrameTime' should generally be used for timing
-- continuous animations and
-- 'GI.Gdk.Structs.FrameTimings.frameTimingsGetPredictedPresentationTime' if you are
-- trying to display isolated frames at particular times.
-- 
-- This is a more convenient alternative to connecting directly to the
-- [update]("GI.Gdk.Objects.FrameClock#signal:update") signal of t'GI.Gdk.Objects.FrameClock.FrameClock', since you don\'t
-- have to worry about when a t'GI.Gdk.Objects.FrameClock.FrameClock' is assigned to a widget.
widgetAddTickCallback ::
    (B.CallStack.HasCallStack, MonadIO m, IsWidget a) =>
    a
    -- ^ /@widget@/: a t'GI.Gtk.Objects.Widget.Widget'
    -> Gtk.Callbacks.TickCallback
    -- ^ /@callback@/: function to call for updating animations
    -> m Word32
    -- ^ __Returns:__ an id for the connection of this callback. Remove the callback
    --     by passing the id returned from this function to
    --     'GI.Gtk.Objects.Widget.widgetRemoveTickCallback'
widgetAddTickCallback :: a -> TickCallback -> m Word32
widgetAddTickCallback widget :: a
widget callback :: TickCallback
callback = IO Word32 -> m Word32
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Word32 -> m Word32) -> IO Word32 -> m Word32
forall a b. (a -> b) -> a -> b
$ do
    Ptr Widget
widget' <- a -> IO (Ptr Widget)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
widget
    FunPtr C_TickCallback
callback' <- C_TickCallback -> IO (FunPtr C_TickCallback)
Gtk.Callbacks.mk_TickCallback (Maybe (Ptr (FunPtr C_TickCallback))
-> TickCallback_WithClosures -> C_TickCallback
Gtk.Callbacks.wrap_TickCallback Maybe (Ptr (FunPtr C_TickCallback))
forall a. Maybe a
Nothing (TickCallback -> TickCallback_WithClosures
Gtk.Callbacks.drop_closures_TickCallback TickCallback
callback))
    let userData :: Ptr ()
userData = FunPtr C_TickCallback -> Ptr ()
forall a b. FunPtr a -> Ptr b
castFunPtrToPtr FunPtr C_TickCallback
callback'
    let notify :: FunPtr (Ptr a -> IO ())
notify = FunPtr (Ptr a -> IO ())
forall a. FunPtr (Ptr a -> IO ())
safeFreeFunPtrPtr
    Word32
result <- Ptr Widget
-> FunPtr C_TickCallback
-> Ptr ()
-> FunPtr C_DestroyNotify
-> IO Word32
gtk_widget_add_tick_callback Ptr Widget
widget' FunPtr C_TickCallback
callback' Ptr ()
userData FunPtr C_DestroyNotify
forall a. FunPtr (Ptr a -> IO ())
notify
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
widget
    Word32 -> IO Word32
forall (m :: * -> *) a. Monad m => a -> m a
return Word32
result

#if defined(ENABLE_OVERLOADING)
data WidgetAddTickCallbackMethodInfo
instance (signature ~ (Gtk.Callbacks.TickCallback -> m Word32), MonadIO m, IsWidget a) => O.MethodInfo WidgetAddTickCallbackMethodInfo a signature where
    overloadedMethod = widgetAddTickCallback

#endif

-- method Widget::allocate
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "widget"
--           , argType = TInterface Name { namespace = "Gtk" , name = "Widget" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "A #GtkWidget" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "width"
--           , argType = TBasicType TInt
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "New width of @widget"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "height"
--           , argType = TBasicType TInt
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "New height of @widget"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "baseline"
--           , argType = TBasicType TInt
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "New baseline of @widget, or -1"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "transform"
--           , argType =
--               TInterface Name { namespace = "Gsk" , name = "Transform" }
--           , direction = DirectionIn
--           , mayBeNull = True
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "Transformation to be applied to @widget"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "gtk_widget_allocate" gtk_widget_allocate :: 
    Ptr Widget ->                           -- widget : TInterface (Name {namespace = "Gtk", name = "Widget"})
    Int32 ->                                -- width : TBasicType TInt
    Int32 ->                                -- height : TBasicType TInt
    Int32 ->                                -- baseline : TBasicType TInt
    Ptr Gsk.Transform.Transform ->          -- transform : TInterface (Name {namespace = "Gsk", name = "Transform"})
    IO ()

-- | This function is only used by t'GI.Gtk.Objects.Widget.Widget' subclasses, to assign a size,
-- position and (optionally) baseline to their child widgets.
-- 
-- In this function, the allocation and baseline may be adjusted. The given
-- allocation will be forced to be bigger than the widget\'s minimum size,
-- as well as at least 0×0 in size.
-- 
-- For a version that does not take a transform, see 'GI.Gtk.Objects.Widget.widgetSizeAllocate'
widgetAllocate ::
    (B.CallStack.HasCallStack, MonadIO m, IsWidget a) =>
    a
    -- ^ /@widget@/: A t'GI.Gtk.Objects.Widget.Widget'
    -> Int32
    -- ^ /@width@/: New width of /@widget@/
    -> Int32
    -- ^ /@height@/: New height of /@widget@/
    -> Int32
    -- ^ /@baseline@/: New baseline of /@widget@/, or -1
    -> Maybe (Gsk.Transform.Transform)
    -- ^ /@transform@/: Transformation to be applied to /@widget@/
    -> m ()
widgetAllocate :: a -> Int32 -> Int32 -> Int32 -> Maybe Transform -> m ()
widgetAllocate widget :: a
widget width :: Int32
width height :: Int32
height baseline :: Int32
baseline transform :: Maybe Transform
transform = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    Ptr Widget
widget' <- a -> IO (Ptr Widget)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
widget
    Ptr Transform
maybeTransform <- case Maybe Transform
transform of
        Nothing -> Ptr Transform -> IO (Ptr Transform)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr Transform
forall a. Ptr a
nullPtr
        Just jTransform :: Transform
jTransform -> do
            Ptr Transform
jTransform' <- Transform -> IO (Ptr Transform)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr Transform
jTransform
            Ptr Transform -> IO (Ptr Transform)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr Transform
jTransform'
    Ptr Widget -> Int32 -> Int32 -> Int32 -> Ptr Transform -> IO ()
gtk_widget_allocate Ptr Widget
widget' Int32
width Int32
height Int32
baseline Ptr Transform
maybeTransform
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
widget
    Maybe Transform -> (Transform -> IO ()) -> IO ()
forall (m :: * -> *) a. Monad m => Maybe a -> (a -> m ()) -> m ()
whenJust Maybe Transform
transform Transform -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()

#if defined(ENABLE_OVERLOADING)
data WidgetAllocateMethodInfo
instance (signature ~ (Int32 -> Int32 -> Int32 -> Maybe (Gsk.Transform.Transform) -> m ()), MonadIO m, IsWidget a) => O.MethodInfo WidgetAllocateMethodInfo a signature where
    overloadedMethod = widgetAllocate

#endif

-- method Widget::can_activate_accel
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "widget"
--           , argType = TInterface Name { namespace = "Gtk" , name = "Widget" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #GtkWidget" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "signal_id"
--           , argType = TBasicType TUInt
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "the ID of a signal installed on @widget"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TBasicType TBoolean)
-- throws : False
-- Skip return : False

foreign import ccall "gtk_widget_can_activate_accel" gtk_widget_can_activate_accel :: 
    Ptr Widget ->                           -- widget : TInterface (Name {namespace = "Gtk", name = "Widget"})
    Word32 ->                               -- signal_id : TBasicType TUInt
    IO CInt

-- | Determines whether an accelerator that activates the signal
-- identified by /@signalId@/ can currently be activated.
-- This is done by emitting the [canActivateAccel]("GI.Gtk.Objects.Widget#signal:canActivateAccel")
-- signal on /@widget@/; if the signal isn’t overridden by a
-- handler or in a derived widget, then the default check is
-- that the widget must be sensitive, and the widget and all
-- its ancestors mapped.
widgetCanActivateAccel ::
    (B.CallStack.HasCallStack, MonadIO m, IsWidget a) =>
    a
    -- ^ /@widget@/: a t'GI.Gtk.Objects.Widget.Widget'
    -> Word32
    -- ^ /@signalId@/: the ID of a signal installed on /@widget@/
    -> m Bool
    -- ^ __Returns:__ 'P.True' if the accelerator can be activated.
widgetCanActivateAccel :: a -> Word32 -> m Bool
widgetCanActivateAccel widget :: a
widget signalId :: Word32
signalId = WidgetPopupMenuCallback -> m Bool
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (WidgetPopupMenuCallback -> m Bool)
-> WidgetPopupMenuCallback -> m Bool
forall a b. (a -> b) -> a -> b
$ do
    Ptr Widget
widget' <- a -> IO (Ptr Widget)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
widget
    CInt
result <- Ptr Widget -> Word32 -> IO CInt
gtk_widget_can_activate_accel Ptr Widget
widget' Word32
signalId
    let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= 0) CInt
result
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
widget
    WidgetMnemonicActivateCallback
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'

#if defined(ENABLE_OVERLOADING)
data WidgetCanActivateAccelMethodInfo
instance (signature ~ (Word32 -> m Bool), MonadIO m, IsWidget a) => O.MethodInfo WidgetCanActivateAccelMethodInfo a signature where
    overloadedMethod = widgetCanActivateAccel

#endif

-- method Widget::child_focus
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "widget"
--           , argType = TInterface Name { namespace = "Gtk" , name = "Widget" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #GtkWidget" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "direction"
--           , argType =
--               TInterface Name { namespace = "Gtk" , name = "DirectionType" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "direction of focus movement"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TBasicType TBoolean)
-- throws : False
-- Skip return : False

foreign import ccall "gtk_widget_child_focus" gtk_widget_child_focus :: 
    Ptr Widget ->                           -- widget : TInterface (Name {namespace = "Gtk", name = "Widget"})
    CUInt ->                                -- direction : TInterface (Name {namespace = "Gtk", name = "DirectionType"})
    IO CInt

-- | This function is used by custom widget implementations; if you\'re
-- writing an app, you’d use 'GI.Gtk.Objects.Widget.widgetGrabFocus' to move the focus
-- to a particular widget.
-- 
-- 'GI.Gtk.Objects.Widget.widgetChildFocus' is called by containers as the user moves
-- around the window using keyboard shortcuts. /@direction@/ indicates
-- what kind of motion is taking place (up, down, left, right, tab
-- forward, tab backward). 'GI.Gtk.Objects.Widget.widgetChildFocus' emits the
-- t'GI.Gtk.Objects.Widget.Widget'::@/focus/@ signal; widgets override the default handler
-- for this signal in order to implement appropriate focus behavior.
-- 
-- The default [focus](#signal:focus) handler for a widget should return 'P.True' if
-- moving in /@direction@/ left the focus on a focusable location inside
-- that widget, and 'P.False' if moving in /@direction@/ moved the focus
-- outside the widget. If returning 'P.True', widgets normally
-- call 'GI.Gtk.Objects.Widget.widgetGrabFocus' to place the focus accordingly;
-- if returning 'P.False', they don’t modify the current focus location.
widgetChildFocus ::
    (B.CallStack.HasCallStack, MonadIO m, IsWidget a) =>
    a
    -- ^ /@widget@/: a t'GI.Gtk.Objects.Widget.Widget'
    -> Gtk.Enums.DirectionType
    -- ^ /@direction@/: direction of focus movement
    -> m Bool
    -- ^ __Returns:__ 'P.True' if focus ended up inside /@widget@/
widgetChildFocus :: a -> DirectionType -> m Bool
widgetChildFocus widget :: a
widget direction :: DirectionType
direction = WidgetPopupMenuCallback -> m Bool
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (WidgetPopupMenuCallback -> m Bool)
-> WidgetPopupMenuCallback -> m Bool
forall a b. (a -> b) -> a -> b
$ do
    Ptr Widget
widget' <- a -> IO (Ptr Widget)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
widget
    let direction' :: CUInt
direction' = (Int -> CUInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CUInt) -> (DirectionType -> Int) -> DirectionType -> CUInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. DirectionType -> Int
forall a. Enum a => a -> Int
fromEnum) DirectionType
direction
    CInt
result <- Ptr Widget -> CUInt -> IO CInt
gtk_widget_child_focus Ptr Widget
widget' CUInt
direction'
    let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= 0) CInt
result
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
widget
    WidgetMnemonicActivateCallback
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'

#if defined(ENABLE_OVERLOADING)
data WidgetChildFocusMethodInfo
instance (signature ~ (Gtk.Enums.DirectionType -> m Bool), MonadIO m, IsWidget a) => O.MethodInfo WidgetChildFocusMethodInfo a signature where
    overloadedMethod = widgetChildFocus

#endif

-- method Widget::compute_bounds
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "widget"
--           , argType = TInterface Name { namespace = "Gtk" , name = "Widget" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "the #GtkWidget to query"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "target"
--           , argType = TInterface Name { namespace = "Gtk" , name = "Widget" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "the #GtkWidget" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "out_bounds"
--           , argType =
--               TInterface Name { namespace = "Graphene" , name = "Rect" }
--           , direction = DirectionOut
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "the rectangle taking the bounds"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = True
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TBasicType TBoolean)
-- throws : False
-- Skip return : False

foreign import ccall "gtk_widget_compute_bounds" gtk_widget_compute_bounds :: 
    Ptr Widget ->                           -- widget : TInterface (Name {namespace = "Gtk", name = "Widget"})
    Ptr Widget ->                           -- target : TInterface (Name {namespace = "Gtk", name = "Widget"})
    Ptr Graphene.Rect.Rect ->               -- out_bounds : TInterface (Name {namespace = "Graphene", name = "Rect"})
    IO CInt

-- | Computes the bounds for /@widget@/ in the coordinate space of /@target@/.
-- FIXME: Explain what \"bounds\" are.
-- 
-- If the operation is successful, 'P.True' is returned. If /@widget@/ has no
-- bounds or the bounds cannot be expressed in /@target@/\'s coordinate space
-- (for example if both widgets are in different windows), 'P.False' is
-- returned and /@bounds@/ is set to the zero rectangle.
-- 
-- It is valid for /@widget@/ and /@target@/ to be the same widget.
widgetComputeBounds ::
    (B.CallStack.HasCallStack, MonadIO m, IsWidget a, IsWidget b) =>
    a
    -- ^ /@widget@/: the t'GI.Gtk.Objects.Widget.Widget' to query
    -> b
    -- ^ /@target@/: the t'GI.Gtk.Objects.Widget.Widget'
    -> m ((Bool, Graphene.Rect.Rect))
    -- ^ __Returns:__ 'P.True' if the bounds could be computed
widgetComputeBounds :: a -> b -> m (Bool, Rect)
widgetComputeBounds widget :: a
widget target :: b
target = IO (Bool, Rect) -> m (Bool, Rect)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Bool, Rect) -> m (Bool, Rect))
-> IO (Bool, Rect) -> m (Bool, Rect)
forall a b. (a -> b) -> a -> b
$ do
    Ptr Widget
widget' <- a -> IO (Ptr Widget)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
widget
    Ptr Widget
target' <- b -> IO (Ptr Widget)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
target
    Ptr Rect
outBounds <- Int -> IO (Ptr Rect)
forall a. BoxedObject a => Int -> IO (Ptr a)
callocBoxedBytes 16 :: IO (Ptr Graphene.Rect.Rect)
    CInt
result <- Ptr Widget -> Ptr Widget -> Ptr Rect -> IO CInt
gtk_widget_compute_bounds Ptr Widget
widget' Ptr Widget
target' Ptr Rect
outBounds
    let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= 0) CInt
result
    Rect
outBounds' <- ((ManagedPtr Rect -> Rect) -> Ptr Rect -> IO Rect
forall a.
(HasCallStack, BoxedObject a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
wrapBoxed ManagedPtr Rect -> Rect
Graphene.Rect.Rect) Ptr Rect
outBounds
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
widget
    b -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr b
target
    (Bool, Rect) -> IO (Bool, Rect)
forall (m :: * -> *) a. Monad m => a -> m a
return (Bool
result', Rect
outBounds')

#if defined(ENABLE_OVERLOADING)
data WidgetComputeBoundsMethodInfo
instance (signature ~ (b -> m ((Bool, Graphene.Rect.Rect))), MonadIO m, IsWidget a, IsWidget b) => O.MethodInfo WidgetComputeBoundsMethodInfo a signature where
    overloadedMethod = widgetComputeBounds

#endif

-- method Widget::compute_expand
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "widget"
--           , argType = TInterface Name { namespace = "Gtk" , name = "Widget" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "the widget" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "orientation"
--           , argType =
--               TInterface Name { namespace = "Gtk" , name = "Orientation" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "expand direction" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TBasicType TBoolean)
-- throws : False
-- Skip return : False

foreign import ccall "gtk_widget_compute_expand" gtk_widget_compute_expand :: 
    Ptr Widget ->                           -- widget : TInterface (Name {namespace = "Gtk", name = "Widget"})
    CUInt ->                                -- orientation : TInterface (Name {namespace = "Gtk", name = "Orientation"})
    IO CInt

-- | Computes whether a container should give this widget extra space
-- when possible. Containers should check this, rather than
-- looking at 'GI.Gtk.Objects.Widget.widgetGetHexpand' or 'GI.Gtk.Objects.Widget.widgetGetVexpand'.
-- 
-- This function already checks whether the widget is visible, so
-- visibility does not need to be checked separately. Non-visible
-- widgets are not expanded.
-- 
-- The computed expand value uses either the expand setting explicitly
-- set on the widget itself, or, if none has been explicitly set,
-- the widget may expand if some of its children do.
widgetComputeExpand ::
    (B.CallStack.HasCallStack, MonadIO m, IsWidget a) =>
    a
    -- ^ /@widget@/: the widget
    -> Gtk.Enums.Orientation
    -- ^ /@orientation@/: expand direction
    -> m Bool
    -- ^ __Returns:__ whether widget tree rooted here should be expanded
widgetComputeExpand :: a -> Orientation -> m Bool
widgetComputeExpand widget :: a
widget orientation :: Orientation
orientation = WidgetPopupMenuCallback -> m Bool
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (WidgetPopupMenuCallback -> m Bool)
-> WidgetPopupMenuCallback -> m Bool
forall a b. (a -> b) -> a -> b
$ do
    Ptr Widget
widget' <- a -> IO (Ptr Widget)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
widget
    let orientation' :: CUInt
orientation' = (Int -> CUInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CUInt) -> (Orientation -> Int) -> Orientation -> CUInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Orientation -> Int
forall a. Enum a => a -> Int
fromEnum) Orientation
orientation
    CInt
result <- Ptr Widget -> CUInt -> IO CInt
gtk_widget_compute_expand Ptr Widget
widget' CUInt
orientation'
    let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= 0) CInt
result
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
widget
    WidgetMnemonicActivateCallback
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'

#if defined(ENABLE_OVERLOADING)
data WidgetComputeExpandMethodInfo
instance (signature ~ (Gtk.Enums.Orientation -> m Bool), MonadIO m, IsWidget a) => O.MethodInfo WidgetComputeExpandMethodInfo a signature where
    overloadedMethod = widgetComputeExpand

#endif

-- method Widget::compute_point
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "widget"
--           , argType = TInterface Name { namespace = "Gtk" , name = "Widget" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "the #GtkWidget to query"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "target"
--           , argType = TInterface Name { namespace = "Gtk" , name = "Widget" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "the #GtkWidget to transform into"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "point"
--           , argType =
--               TInterface Name { namespace = "Graphene" , name = "Point" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a point in @widget's coordinate system"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "out_point"
--           , argType =
--               TInterface Name { namespace = "Graphene" , name = "Point" }
--           , direction = DirectionOut
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText =
--                     Just
--                       "Set to the corresponding coordinates in\n    @target's coordinate system"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = True
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TBasicType TBoolean)
-- throws : False
-- Skip return : False

foreign import ccall "gtk_widget_compute_point" gtk_widget_compute_point :: 
    Ptr Widget ->                           -- widget : TInterface (Name {namespace = "Gtk", name = "Widget"})
    Ptr Widget ->                           -- target : TInterface (Name {namespace = "Gtk", name = "Widget"})
    Ptr Graphene.Point.Point ->             -- point : TInterface (Name {namespace = "Graphene", name = "Point"})
    Ptr Graphene.Point.Point ->             -- out_point : TInterface (Name {namespace = "Graphene", name = "Point"})
    IO CInt

-- | Translates the given /@point@/ in /@widget@/\'s coordinates to coordinates
-- relative to /@target@/’s coodinate system. In order to perform this
-- operation, both widgets must share a common ancestor.
widgetComputePoint ::
    (B.CallStack.HasCallStack, MonadIO m, IsWidget a, IsWidget b) =>
    a
    -- ^ /@widget@/: the t'GI.Gtk.Objects.Widget.Widget' to query
    -> b
    -- ^ /@target@/: the t'GI.Gtk.Objects.Widget.Widget' to transform into
    -> Graphene.Point.Point
    -- ^ /@point@/: a point in /@widget@/\'s coordinate system
    -> m ((Bool, Graphene.Point.Point))
    -- ^ __Returns:__ 'P.True' if the point could be determined, 'P.False' on failure.
    --   In this case, 0 is stored in /@outPoint@/.
widgetComputePoint :: a -> b -> Point -> m (Bool, Point)
widgetComputePoint widget :: a
widget target :: b
target point :: Point
point = IO (Bool, Point) -> m (Bool, Point)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Bool, Point) -> m (Bool, Point))
-> IO (Bool, Point) -> m (Bool, Point)
forall a b. (a -> b) -> a -> b
$ do
    Ptr Widget
widget' <- a -> IO (Ptr Widget)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
widget
    Ptr Widget
target' <- b -> IO (Ptr Widget)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
target
    Ptr Point
point' <- Point -> IO (Ptr Point)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr Point
point
    Ptr Point
outPoint <- Int -> IO (Ptr Point)
forall a. BoxedObject a => Int -> IO (Ptr a)
callocBoxedBytes 8 :: IO (Ptr Graphene.Point.Point)
    CInt
result <- Ptr Widget -> Ptr Widget -> Ptr Point -> Ptr Point -> IO CInt
gtk_widget_compute_point Ptr Widget
widget' Ptr Widget
target' Ptr Point
point' Ptr Point
outPoint
    let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= 0) CInt
result
    Point
outPoint' <- ((ManagedPtr Point -> Point) -> Ptr Point -> IO Point
forall a.
(HasCallStack, BoxedObject a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
wrapBoxed ManagedPtr Point -> Point
Graphene.Point.Point) Ptr Point
outPoint
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
widget
    b -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr b
target
    Point -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr Point
point
    (Bool, Point) -> IO (Bool, Point)
forall (m :: * -> *) a. Monad m => a -> m a
return (Bool
result', Point
outPoint')

#if defined(ENABLE_OVERLOADING)
data WidgetComputePointMethodInfo
instance (signature ~ (b -> Graphene.Point.Point -> m ((Bool, Graphene.Point.Point))), MonadIO m, IsWidget a, IsWidget b) => O.MethodInfo WidgetComputePointMethodInfo a signature where
    overloadedMethod = widgetComputePoint

#endif

-- method Widget::compute_transform
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "widget"
--           , argType = TInterface Name { namespace = "Gtk" , name = "Widget" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #GtkWidget" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "target"
--           , argType = TInterface Name { namespace = "Gtk" , name = "Widget" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText =
--                     Just "the target widget that the matrix will transform to"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "out_transform"
--           , argType =
--               TInterface Name { namespace = "Graphene" , name = "Matrix" }
--           , direction = DirectionOut
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "location to\n  store the final transformation"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = True
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TBasicType TBoolean)
-- throws : False
-- Skip return : False

foreign import ccall "gtk_widget_compute_transform" gtk_widget_compute_transform :: 
    Ptr Widget ->                           -- widget : TInterface (Name {namespace = "Gtk", name = "Widget"})
    Ptr Widget ->                           -- target : TInterface (Name {namespace = "Gtk", name = "Widget"})
    Ptr Graphene.Matrix.Matrix ->           -- out_transform : TInterface (Name {namespace = "Graphene", name = "Matrix"})
    IO CInt

-- | Computes a matrix suitable to describe a transformation from
-- /@widget@/\'s coordinate system into /@target@/\'s coordinate system.
widgetComputeTransform ::
    (B.CallStack.HasCallStack, MonadIO m, IsWidget a, IsWidget b) =>
    a
    -- ^ /@widget@/: a t'GI.Gtk.Objects.Widget.Widget'
    -> b
    -- ^ /@target@/: the target widget that the matrix will transform to
    -> m ((Bool, Graphene.Matrix.Matrix))
    -- ^ __Returns:__ 'P.True' if the transform could be computed, 'P.False' otherwise.
    --   The transform can not be computed in certain cases, for example when
    --   /@widget@/ and /@target@/ do not share a common ancestor. In that
    --   case /@outTransform@/ gets set to the identity matrix.
widgetComputeTransform :: a -> b -> m (Bool, Matrix)
widgetComputeTransform widget :: a
widget target :: b
target = IO (Bool, Matrix) -> m (Bool, Matrix)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Bool, Matrix) -> m (Bool, Matrix))
-> IO (Bool, Matrix) -> m (Bool, Matrix)
forall a b. (a -> b) -> a -> b
$ do
    Ptr Widget
widget' <- a -> IO (Ptr Widget)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
widget
    Ptr Widget
target' <- b -> IO (Ptr Widget)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
target
    Ptr Matrix
outTransform <- Int -> IO (Ptr Matrix)
forall a. BoxedObject a => Int -> IO (Ptr a)
callocBoxedBytes 64 :: IO (Ptr Graphene.Matrix.Matrix)
    CInt
result <- Ptr Widget -> Ptr Widget -> Ptr Matrix -> IO CInt
gtk_widget_compute_transform Ptr Widget
widget' Ptr Widget
target' Ptr Matrix
outTransform
    let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= 0) CInt
result
    Matrix
outTransform' <- ((ManagedPtr Matrix -> Matrix) -> Ptr Matrix -> IO Matrix
forall a.
(HasCallStack, BoxedObject a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
wrapBoxed ManagedPtr Matrix -> Matrix
Graphene.Matrix.Matrix) Ptr Matrix
outTransform
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
widget
    b -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr b
target
    (Bool, Matrix) -> IO (Bool, Matrix)
forall (m :: * -> *) a. Monad m => a -> m a
return (Bool
result', Matrix
outTransform')

#if defined(ENABLE_OVERLOADING)
data WidgetComputeTransformMethodInfo
instance (signature ~ (b -> m ((Bool, Graphene.Matrix.Matrix))), MonadIO m, IsWidget a, IsWidget b) => O.MethodInfo WidgetComputeTransformMethodInfo a signature where
    overloadedMethod = widgetComputeTransform

#endif

-- method Widget::contains
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "widget"
--           , argType = TInterface Name { namespace = "Gtk" , name = "Widget" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "the widget to query"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "x"
--           , argType = TBasicType TDouble
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText =
--                     Just "X coordinate to test, relative to @widget's origin"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "y"
--           , argType = TBasicType TDouble
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText =
--                     Just "Y coordinate to test, relative to @widget's origin"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TBasicType TBoolean)
-- throws : False
-- Skip return : False

foreign import ccall "gtk_widget_contains" gtk_widget_contains :: 
    Ptr Widget ->                           -- widget : TInterface (Name {namespace = "Gtk", name = "Widget"})
    CDouble ->                              -- x : TBasicType TDouble
    CDouble ->                              -- y : TBasicType TDouble
    IO CInt

-- | Tests if the point at (/@x@/, /@y@/) is contained in /@widget@/.
-- 
-- The coordinates for (/@x@/, /@y@/) must be in widget coordinates, so
-- (0, 0) is assumed to be the top left of /@widget@/\'s content area.
widgetContains ::
    (B.CallStack.HasCallStack, MonadIO m, IsWidget a) =>
    a
    -- ^ /@widget@/: the widget to query
    -> Double
    -- ^ /@x@/: X coordinate to test, relative to /@widget@/\'s origin
    -> Double
    -- ^ /@y@/: Y coordinate to test, relative to /@widget@/\'s origin
    -> m Bool
    -- ^ __Returns:__ 'P.True' if /@widget@/ contains (/@x@/, /@y@/).
widgetContains :: a -> Double -> Double -> m Bool
widgetContains widget :: a
widget x :: Double
x y :: Double
y = WidgetPopupMenuCallback -> m Bool
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (WidgetPopupMenuCallback -> m Bool)
-> WidgetPopupMenuCallback -> m Bool
forall a b. (a -> b) -> a -> b
$ do
    Ptr Widget
widget' <- a -> IO (Ptr Widget)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
widget
    let x' :: CDouble
x' = Double -> CDouble
forall a b. (Real a, Fractional b) => a -> b
realToFrac Double
x
    let y' :: CDouble
y' = Double -> CDouble
forall a b. (Real a, Fractional b) => a -> b
realToFrac Double
y
    CInt
result <- Ptr Widget -> CDouble -> CDouble -> IO CInt
gtk_widget_contains Ptr Widget
widget' CDouble
x' CDouble
y'
    let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= 0) CInt
result
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
widget
    WidgetMnemonicActivateCallback
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'

#if defined(ENABLE_OVERLOADING)
data WidgetContainsMethodInfo
instance (signature ~ (Double -> Double -> m Bool), MonadIO m, IsWidget a) => O.MethodInfo WidgetContainsMethodInfo a signature where
    overloadedMethod = widgetContains

#endif

-- method Widget::create_pango_context
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "widget"
--           , argType = TInterface Name { namespace = "Gtk" , name = "Widget" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #GtkWidget" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TInterface Name { namespace = "Pango" , name = "Context" })
-- throws : False
-- Skip return : False

foreign import ccall "gtk_widget_create_pango_context" gtk_widget_create_pango_context :: 
    Ptr Widget ->                           -- widget : TInterface (Name {namespace = "Gtk", name = "Widget"})
    IO (Ptr Pango.Context.Context)

-- | Creates a new t'GI.Pango.Objects.Context.Context' with the appropriate font map,
-- font options, font description, and base direction for drawing
-- text for this widget. See also 'GI.Gtk.Objects.Widget.widgetGetPangoContext'.
widgetCreatePangoContext ::
    (B.CallStack.HasCallStack, MonadIO m, IsWidget a) =>
    a
    -- ^ /@widget@/: a t'GI.Gtk.Objects.Widget.Widget'
    -> m Pango.Context.Context
    -- ^ __Returns:__ the new t'GI.Pango.Objects.Context.Context'
widgetCreatePangoContext :: a -> m Context
widgetCreatePangoContext widget :: a
widget = IO Context -> m Context
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Context -> m Context) -> IO Context -> m Context
forall a b. (a -> b) -> a -> b
$ do
    Ptr Widget
widget' <- a -> IO (Ptr Widget)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
widget
    Ptr Context
result <- Ptr Widget -> IO (Ptr Context)
gtk_widget_create_pango_context Ptr Widget
widget'
    Text -> Ptr Context -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL "widgetCreatePangoContext" Ptr Context
result
    Context
result' <- ((ManagedPtr Context -> Context) -> Ptr Context -> IO Context
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
wrapObject ManagedPtr Context -> Context
Pango.Context.Context) Ptr Context
result
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
widget
    Context -> IO Context
forall (m :: * -> *) a. Monad m => a -> m a
return Context
result'

#if defined(ENABLE_OVERLOADING)
data WidgetCreatePangoContextMethodInfo
instance (signature ~ (m Pango.Context.Context), MonadIO m, IsWidget a) => O.MethodInfo WidgetCreatePangoContextMethodInfo a signature where
    overloadedMethod = widgetCreatePangoContext

#endif

-- method Widget::create_pango_layout
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "widget"
--           , argType = TInterface Name { namespace = "Gtk" , name = "Widget" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #GtkWidget" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "text"
--           , argType = TBasicType TUTF8
--           , direction = DirectionIn
--           , mayBeNull = True
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "text to set on the layout (can be %NULL)"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TInterface Name { namespace = "Pango" , name = "Layout" })
-- throws : False
-- Skip return : False

foreign import ccall "gtk_widget_create_pango_layout" gtk_widget_create_pango_layout :: 
    Ptr Widget ->                           -- widget : TInterface (Name {namespace = "Gtk", name = "Widget"})
    CString ->                              -- text : TBasicType TUTF8
    IO (Ptr Pango.Layout.Layout)

-- | Creates a new t'GI.Pango.Objects.Layout.Layout' with the appropriate font map,
-- font description, and base direction for drawing text for
-- this widget.
-- 
-- If you keep a t'GI.Pango.Objects.Layout.Layout' created in this way around, you need
-- to re-create it when the widget t'GI.Pango.Objects.Context.Context' is replaced.
-- This can be tracked by using the t'GI.Gtk.Objects.Widget.Widget'::@/display-changed/@ signal
-- on the widget.
widgetCreatePangoLayout ::
    (B.CallStack.HasCallStack, MonadIO m, IsWidget a) =>
    a
    -- ^ /@widget@/: a t'GI.Gtk.Objects.Widget.Widget'
    -> Maybe (T.Text)
    -- ^ /@text@/: text to set on the layout (can be 'P.Nothing')
    -> m Pango.Layout.Layout
    -- ^ __Returns:__ the new t'GI.Pango.Objects.Layout.Layout'
widgetCreatePangoLayout :: a -> Maybe Text -> m Layout
widgetCreatePangoLayout widget :: a
widget text :: Maybe Text
text = IO Layout -> m Layout
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Layout -> m Layout) -> IO Layout -> m Layout
forall a b. (a -> b) -> a -> b
$ do
    Ptr Widget
widget' <- a -> IO (Ptr Widget)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
widget
    CString
maybeText <- case Maybe Text
text of
        Nothing -> CString -> IO CString
forall (m :: * -> *) a. Monad m => a -> m a
return CString
forall a. Ptr a
nullPtr
        Just jText :: Text
jText -> do
            CString
jText' <- Text -> IO CString
textToCString Text
jText
            CString -> IO CString
forall (m :: * -> *) a. Monad m => a -> m a
return CString
jText'
    Ptr Layout
result <- Ptr Widget -> CString -> IO (Ptr Layout)
gtk_widget_create_pango_layout Ptr Widget
widget' CString
maybeText
    Text -> Ptr Layout -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL "widgetCreatePangoLayout" Ptr Layout
result
    Layout
result' <- ((ManagedPtr Layout -> Layout) -> Ptr Layout -> IO Layout
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
wrapObject ManagedPtr Layout -> Layout
Pango.Layout.Layout) Ptr Layout
result
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
widget
    CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
maybeText
    Layout -> IO Layout
forall (m :: * -> *) a. Monad m => a -> m a
return Layout
result'

#if defined(ENABLE_OVERLOADING)
data WidgetCreatePangoLayoutMethodInfo
instance (signature ~ (Maybe (T.Text) -> m Pango.Layout.Layout), MonadIO m, IsWidget a) => O.MethodInfo WidgetCreatePangoLayoutMethodInfo a signature where
    overloadedMethod = widgetCreatePangoLayout

#endif

-- method Widget::destroy
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "widget"
--           , argType = TInterface Name { namespace = "Gtk" , name = "Widget" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #GtkWidget" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "gtk_widget_destroy" gtk_widget_destroy :: 
    Ptr Widget ->                           -- widget : TInterface (Name {namespace = "Gtk", name = "Widget"})
    IO ()

-- | Destroys a widget.
-- 
-- When a widget is destroyed all references it holds on other objects
-- will be released:
-- 
--  - if the widget is inside a container, it will be removed from its
--  parent
--  - if the widget is a container, all its children will be destroyed,
--  recursively
--  - if the widget is a top level, it will be removed from the list
--  of top level widgets that GTK+ maintains internally
-- 
-- It\'s expected that all references held on the widget will also
-- be released; you should connect to the [destroy]("GI.Gtk.Objects.Widget#signal:destroy") signal
-- if you hold a reference to /@widget@/ and you wish to remove it when
-- this function is called. It is not necessary to do so if you are
-- implementing a t'GI.Gtk.Objects.Container.Container', as you\'ll be able to use the
-- t'GI.Gtk.Structs.ContainerClass.ContainerClass'.@/remove/@() virtual function for that.
-- 
-- It\'s important to notice that 'GI.Gtk.Objects.Widget.widgetDestroy' will only cause
-- the /@widget@/ to be finalized if no additional references, acquired
-- using 'GI.GObject.Objects.Object.objectRef', are held on it. In case additional references
-- are in place, the /@widget@/ will be in an \"inert\" state after calling
-- this function; /@widget@/ will still point to valid memory, allowing you
-- to release the references you hold, but you may not query the widget\'s
-- own state.
-- 
-- You should typically call this function on top level widgets, and
-- rarely on child widgets.
-- 
-- See also: 'GI.Gtk.Objects.Container.containerRemove'
widgetDestroy ::
    (B.CallStack.HasCallStack, MonadIO m, IsWidget a) =>
    a
    -- ^ /@widget@/: a t'GI.Gtk.Objects.Widget.Widget'
    -> m ()
widgetDestroy :: a -> m ()
widgetDestroy widget :: a
widget = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    Ptr Widget
widget' <- a -> IO (Ptr Widget)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
widget
    Ptr Widget -> IO ()
gtk_widget_destroy Ptr Widget
widget'
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
widget
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()

#if defined(ENABLE_OVERLOADING)
data WidgetDestroyMethodInfo
instance (signature ~ (m ()), MonadIO m, IsWidget a) => O.MethodInfo WidgetDestroyMethodInfo a signature where
    overloadedMethod = widgetDestroy

#endif

-- method Widget::destroyed
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "widget"
--           , argType = TInterface Name { namespace = "Gtk" , name = "Widget" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #GtkWidget" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "widget_pointer"
--           , argType = TInterface Name { namespace = "Gtk" , name = "Widget" }
--           , direction = DirectionInout
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "address of a variable that contains @widget"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "gtk_widget_destroyed" gtk_widget_destroyed :: 
    Ptr Widget ->                           -- widget : TInterface (Name {namespace = "Gtk", name = "Widget"})
    Ptr (Ptr Widget) ->                     -- widget_pointer : TInterface (Name {namespace = "Gtk", name = "Widget"})
    IO ()

-- | This function sets */@widgetPointer@/ to 'P.Nothing' if /@widgetPointer@/ !=
-- 'P.Nothing'.  It’s intended to be used as a callback connected to the
-- “destroy” signal of a widget. You connect 'GI.Gtk.Objects.Widget.widgetDestroyed'
-- as a signal handler, and pass the address of your widget variable
-- as user data. Then when the widget is destroyed, the variable will
-- be set to 'P.Nothing'. Useful for example to avoid multiple copies
-- of the same dialog.
widgetDestroyed ::
    (B.CallStack.HasCallStack, MonadIO m, IsWidget a, IsWidget b) =>
    a
    -- ^ /@widget@/: a t'GI.Gtk.Objects.Widget.Widget'
    -> b
    -- ^ /@widgetPointer@/: address of a variable that contains /@widget@/
    -> m (Widget)
widgetDestroyed :: a -> b -> m Widget
widgetDestroyed widget :: a
widget widgetPointer :: b
widgetPointer = IO Widget -> m Widget
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Widget -> m Widget) -> IO Widget -> m Widget
forall a b. (a -> b) -> a -> b
$ do
    Ptr Widget
widget' <- a -> IO (Ptr Widget)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
widget
    Ptr Widget
widgetPointer' <- b -> IO (Ptr Widget)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
widgetPointer
    Ptr (Ptr Widget)
widgetPointer'' <- IO (Ptr (Ptr Widget))
forall a. Storable a => IO (Ptr a)
allocMem :: IO (Ptr (Ptr Widget))
    Ptr (Ptr Widget) -> Ptr Widget -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke Ptr (Ptr Widget)
widgetPointer'' Ptr Widget
widgetPointer'
    Ptr Widget -> Ptr (Ptr Widget) -> IO ()
gtk_widget_destroyed Ptr Widget
widget' Ptr (Ptr Widget)
widgetPointer''
    Ptr Widget
widgetPointer''' <- Ptr (Ptr Widget) -> IO (Ptr Widget)
forall a. Storable a => Ptr a -> IO a
peek Ptr (Ptr Widget)
widgetPointer''
    Widget
widgetPointer'''' <- ((ManagedPtr Widget -> Widget) -> Ptr Widget -> IO Widget
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr Widget -> Widget
Widget) Ptr Widget
widgetPointer'''
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
widget
    b -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr b
widgetPointer
    Ptr (Ptr Widget) -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr (Ptr Widget)
widgetPointer''
    Widget -> IO Widget
forall (m :: * -> *) a. Monad m => a -> m a
return Widget
widgetPointer''''

#if defined(ENABLE_OVERLOADING)
data WidgetDestroyedMethodInfo
instance (signature ~ (b -> m (Widget)), MonadIO m, IsWidget a, IsWidget b) => O.MethodInfo WidgetDestroyedMethodInfo a signature where
    overloadedMethod = widgetDestroyed

#endif

-- method Widget::device_is_shadowed
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "widget"
--           , argType = TInterface Name { namespace = "Gtk" , name = "Widget" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #GtkWidget" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "device"
--           , argType = TInterface Name { namespace = "Gdk" , name = "Device" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #GdkDevice" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TBasicType TBoolean)
-- throws : False
-- Skip return : False

foreign import ccall "gtk_widget_device_is_shadowed" gtk_widget_device_is_shadowed :: 
    Ptr Widget ->                           -- widget : TInterface (Name {namespace = "Gtk", name = "Widget"})
    Ptr Gdk.Device.Device ->                -- device : TInterface (Name {namespace = "Gdk", name = "Device"})
    IO CInt

-- | Returns 'P.True' if /@device@/ has been shadowed by a GTK+
-- device grab on another widget, so it would stop sending
-- events to /@widget@/. This may be used in the
-- [grabNotify]("GI.Gtk.Objects.Widget#signal:grabNotify") signal to check for specific
-- devices. See 'GI.Gtk.Functions.deviceGrabAdd'.
widgetDeviceIsShadowed ::
    (B.CallStack.HasCallStack, MonadIO m, IsWidget a, Gdk.Device.IsDevice b) =>
    a
    -- ^ /@widget@/: a t'GI.Gtk.Objects.Widget.Widget'
    -> b
    -- ^ /@device@/: a t'GI.Gdk.Objects.Device.Device'
    -> m Bool
    -- ^ __Returns:__ 'P.True' if there is an ongoing grab on /@device@/
    --          by another t'GI.Gtk.Objects.Widget.Widget' than /@widget@/.
widgetDeviceIsShadowed :: a -> b -> m Bool
widgetDeviceIsShadowed widget :: a
widget device :: b
device = WidgetPopupMenuCallback -> m Bool
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (WidgetPopupMenuCallback -> m Bool)
-> WidgetPopupMenuCallback -> m Bool
forall a b. (a -> b) -> a -> b
$ do
    Ptr Widget
widget' <- a -> IO (Ptr Widget)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
widget
    Ptr Device
device' <- b -> IO (Ptr Device)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
device
    CInt
result <- Ptr Widget -> Ptr Device -> IO CInt
gtk_widget_device_is_shadowed Ptr Widget
widget' Ptr Device
device'
    let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= 0) CInt
result
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
widget
    b -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr b
device
    WidgetMnemonicActivateCallback
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'

#if defined(ENABLE_OVERLOADING)
data WidgetDeviceIsShadowedMethodInfo
instance (signature ~ (b -> m Bool), MonadIO m, IsWidget a, Gdk.Device.IsDevice b) => O.MethodInfo WidgetDeviceIsShadowedMethodInfo a signature where
    overloadedMethod = widgetDeviceIsShadowed

#endif

-- method Widget::drag_begin
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "widget"
--           , argType = TInterface Name { namespace = "Gtk" , name = "Widget" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "the source widget" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "device"
--           , argType = TInterface Name { namespace = "Gdk" , name = "Device" }
--           , direction = DirectionIn
--           , mayBeNull = True
--           , argDoc =
--               Documentation
--                 { rawDocText =
--                     Just
--                       "the device that starts the drag or %NULL to use the default pointer"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "targets"
--           , argType =
--               TInterface Name { namespace = "Gdk" , name = "ContentFormats" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText =
--                     Just
--                       "The targets (data formats) in which the source can provide the data"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "actions"
--           , argType =
--               TInterface Name { namespace = "Gdk" , name = "DragAction" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText =
--                     Just "A bitmask of the allowed drag actions for this drag"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "x"
--           , argType = TBasicType TInt
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText =
--                     Just
--                       "The initial x coordinate to start dragging from, in the coordinate space of @widget."
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "y"
--           , argType = TBasicType TInt
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText =
--                     Just
--                       "The initial y coordinate to start dragging from, in the coordinate space of @widget."
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TInterface Name { namespace = "Gdk" , name = "Drag" })
-- throws : False
-- Skip return : False

foreign import ccall "gtk_drag_begin" gtk_drag_begin :: 
    Ptr Widget ->                           -- widget : TInterface (Name {namespace = "Gtk", name = "Widget"})
    Ptr Gdk.Device.Device ->                -- device : TInterface (Name {namespace = "Gdk", name = "Device"})
    Ptr Gdk.ContentFormats.ContentFormats -> -- targets : TInterface (Name {namespace = "Gdk", name = "ContentFormats"})
    CUInt ->                                -- actions : TInterface (Name {namespace = "Gdk", name = "DragAction"})
    Int32 ->                                -- x : TBasicType TInt
    Int32 ->                                -- y : TBasicType TInt
    IO (Ptr Gdk.Drag.Drag)

-- | Initiates a drag on the source side. The function only needs to be used
-- when the application is starting drags itself, and is not needed when
-- 'GI.Gtk.Objects.Widget.widgetDragSourceSet' is used.
widgetDragBegin ::
    (B.CallStack.HasCallStack, MonadIO m, IsWidget a, Gdk.Device.IsDevice b) =>
    a
    -- ^ /@widget@/: the source widget
    -> Maybe (b)
    -- ^ /@device@/: the device that starts the drag or 'P.Nothing' to use the default pointer
    -> Gdk.ContentFormats.ContentFormats
    -- ^ /@targets@/: The targets (data formats) in which the source can provide the data
    -> [Gdk.Flags.DragAction]
    -- ^ /@actions@/: A bitmask of the allowed drag actions for this drag
    -> Int32
    -- ^ /@x@/: The initial x coordinate to start dragging from, in the coordinate space of /@widget@/.
    -> Int32
    -- ^ /@y@/: The initial y coordinate to start dragging from, in the coordinate space of /@widget@/.
    -> m Gdk.Drag.Drag
    -- ^ __Returns:__ the context for this drag
widgetDragBegin :: a
-> Maybe b
-> ContentFormats
-> [DragAction]
-> Int32
-> Int32
-> m Drag
widgetDragBegin widget :: a
widget device :: Maybe b
device targets :: ContentFormats
targets actions :: [DragAction]
actions x :: Int32
x y :: Int32
y = IO Drag -> m Drag
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Drag -> m Drag) -> IO Drag -> m Drag
forall a b. (a -> b) -> a -> b
$ do
    Ptr Widget
widget' <- a -> IO (Ptr Widget)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
widget
    Ptr Device
maybeDevice <- case Maybe b
device of
        Nothing -> Ptr Device -> IO (Ptr Device)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr Device
forall a. Ptr a
nullPtr
        Just jDevice :: b
jDevice -> do
            Ptr Device
jDevice' <- b -> IO (Ptr Device)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
jDevice
            Ptr Device -> IO (Ptr Device)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr Device
jDevice'
    Ptr ContentFormats
targets' <- ContentFormats -> IO (Ptr ContentFormats)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr ContentFormats
targets
    let actions' :: CUInt
actions' = [DragAction] -> CUInt
forall b a. (Num b, IsGFlag a) => [a] -> b
gflagsToWord [DragAction]
actions
    Ptr Drag
result <- Ptr Widget
-> Ptr Device
-> Ptr ContentFormats
-> CUInt
-> Int32
-> Int32
-> IO (Ptr Drag)
gtk_drag_begin Ptr Widget
widget' Ptr Device
maybeDevice Ptr ContentFormats
targets' CUInt
actions' Int32
x Int32
y
    Text -> Ptr Drag -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL "widgetDragBegin" Ptr Drag
result
    Drag
result' <- ((ManagedPtr Drag -> Drag) -> Ptr Drag -> IO Drag
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr Drag -> Drag
Gdk.Drag.Drag) Ptr Drag
result
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
widget
    Maybe b -> (b -> IO ()) -> IO ()
forall (m :: * -> *) a. Monad m => Maybe a -> (a -> m ()) -> m ()
whenJust Maybe b
device b -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr
    ContentFormats -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr ContentFormats
targets
    Drag -> IO Drag
forall (m :: * -> *) a. Monad m => a -> m a
return Drag
result'

#if defined(ENABLE_OVERLOADING)
data WidgetDragBeginMethodInfo
instance (signature ~ (Maybe (b) -> Gdk.ContentFormats.ContentFormats -> [Gdk.Flags.DragAction] -> Int32 -> Int32 -> m Gdk.Drag.Drag), MonadIO m, IsWidget a, Gdk.Device.IsDevice b) => O.MethodInfo WidgetDragBeginMethodInfo a signature where
    overloadedMethod = widgetDragBegin

#endif

-- method Widget::drag_check_threshold
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "widget"
--           , argType = TInterface Name { namespace = "Gtk" , name = "Widget" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #GtkWidget" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "start_x"
--           , argType = TBasicType TInt
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "X coordinate of start of drag"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "start_y"
--           , argType = TBasicType TInt
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "Y coordinate of start of drag"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "current_x"
--           , argType = TBasicType TInt
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "current X coordinate"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "current_y"
--           , argType = TBasicType TInt
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "current Y coordinate"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TBasicType TBoolean)
-- throws : False
-- Skip return : False

foreign import ccall "gtk_drag_check_threshold" gtk_drag_check_threshold :: 
    Ptr Widget ->                           -- widget : TInterface (Name {namespace = "Gtk", name = "Widget"})
    Int32 ->                                -- start_x : TBasicType TInt
    Int32 ->                                -- start_y : TBasicType TInt
    Int32 ->                                -- current_x : TBasicType TInt
    Int32 ->                                -- current_y : TBasicType TInt
    IO CInt

-- | Checks to see if a mouse drag starting at (/@startX@/, /@startY@/) and ending
-- at (/@currentX@/, /@currentY@/) has passed the GTK+ drag threshold, and thus
-- should trigger the beginning of a drag-and-drop operation.
widgetDragCheckThreshold ::
    (B.CallStack.HasCallStack, MonadIO m, IsWidget a) =>
    a
    -- ^ /@widget@/: a t'GI.Gtk.Objects.Widget.Widget'
    -> Int32
    -- ^ /@startX@/: X coordinate of start of drag
    -> Int32
    -- ^ /@startY@/: Y coordinate of start of drag
    -> Int32
    -- ^ /@currentX@/: current X coordinate
    -> Int32
    -- ^ /@currentY@/: current Y coordinate
    -> m Bool
    -- ^ __Returns:__ 'P.True' if the drag threshold has been passed.
widgetDragCheckThreshold :: a -> Int32 -> Int32 -> Int32 -> Int32 -> m Bool
widgetDragCheckThreshold widget :: a
widget startX :: Int32
startX startY :: Int32
startY currentX :: Int32
currentX currentY :: Int32
currentY = WidgetPopupMenuCallback -> m Bool
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (WidgetPopupMenuCallback -> m Bool)
-> WidgetPopupMenuCallback -> m Bool
forall a b. (a -> b) -> a -> b
$ do
    Ptr Widget
widget' <- a -> IO (Ptr Widget)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
widget
    CInt
result <- Ptr Widget -> Int32 -> Int32 -> Int32 -> Int32 -> IO CInt
gtk_drag_check_threshold Ptr Widget
widget' Int32
startX Int32
startY Int32
currentX Int32
currentY
    let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= 0) CInt
result
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
widget
    WidgetMnemonicActivateCallback
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'

#if defined(ENABLE_OVERLOADING)
data WidgetDragCheckThresholdMethodInfo
instance (signature ~ (Int32 -> Int32 -> Int32 -> Int32 -> m Bool), MonadIO m, IsWidget a) => O.MethodInfo WidgetDragCheckThresholdMethodInfo a signature where
    overloadedMethod = widgetDragCheckThreshold

#endif

-- method Widget::drag_dest_add_image_targets
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "widget"
--           , argType = TInterface Name { namespace = "Gtk" , name = "Widget" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #GtkWidget that\8217s a drag destination"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "gtk_drag_dest_add_image_targets" gtk_drag_dest_add_image_targets :: 
    Ptr Widget ->                           -- widget : TInterface (Name {namespace = "Gtk", name = "Widget"})
    IO ()

-- | Add the image targets supported by t'GI.Gtk.Structs.SelectionData.SelectionData' to
-- the target list of the drag destination. The targets
-- are added with /@info@/ = 0. If you need another value,
-- use @/gtk_target_list_add_image_targets()/@ and
-- 'GI.Gtk.Objects.Widget.widgetDragDestSetTargetList'.
widgetDragDestAddImageTargets ::
    (B.CallStack.HasCallStack, MonadIO m, IsWidget a) =>
    a
    -- ^ /@widget@/: a t'GI.Gtk.Objects.Widget.Widget' that’s a drag destination
    -> m ()
widgetDragDestAddImageTargets :: a -> m ()
widgetDragDestAddImageTargets widget :: a
widget = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    Ptr Widget
widget' <- a -> IO (Ptr Widget)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
widget
    Ptr Widget -> IO ()
gtk_drag_dest_add_image_targets Ptr Widget
widget'
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
widget
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()

#if defined(ENABLE_OVERLOADING)
data WidgetDragDestAddImageTargetsMethodInfo
instance (signature ~ (m ()), MonadIO m, IsWidget a) => O.MethodInfo WidgetDragDestAddImageTargetsMethodInfo a signature where
    overloadedMethod = widgetDragDestAddImageTargets

#endif

-- method Widget::drag_dest_add_text_targets
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "widget"
--           , argType = TInterface Name { namespace = "Gtk" , name = "Widget" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #GtkWidget that\8217s a drag destination"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "gtk_drag_dest_add_text_targets" gtk_drag_dest_add_text_targets :: 
    Ptr Widget ->                           -- widget : TInterface (Name {namespace = "Gtk", name = "Widget"})
    IO ()

-- | Add the text targets supported by t'GI.Gtk.Structs.SelectionData.SelectionData' to
-- the target list of the drag destination. The targets
-- are added with /@info@/ = 0. If you need another value,
-- use @/gtk_target_list_add_text_targets()/@ and
-- 'GI.Gtk.Objects.Widget.widgetDragDestSetTargetList'.
widgetDragDestAddTextTargets ::
    (B.CallStack.HasCallStack, MonadIO m, IsWidget a) =>
    a
    -- ^ /@widget@/: a t'GI.Gtk.Objects.Widget.Widget' that’s a drag destination
    -> m ()
widgetDragDestAddTextTargets :: a -> m ()
widgetDragDestAddTextTargets widget :: a
widget = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    Ptr Widget
widget' <- a -> IO (Ptr Widget)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
widget
    Ptr Widget -> IO ()
gtk_drag_dest_add_text_targets Ptr Widget
widget'
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
widget
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()

#if defined(ENABLE_OVERLOADING)
data WidgetDragDestAddTextTargetsMethodInfo
instance (signature ~ (m ()), MonadIO m, IsWidget a) => O.MethodInfo WidgetDragDestAddTextTargetsMethodInfo a signature where
    overloadedMethod = widgetDragDestAddTextTargets

#endif

-- method Widget::drag_dest_add_uri_targets
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "widget"
--           , argType = TInterface Name { namespace = "Gtk" , name = "Widget" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #GtkWidget that\8217s a drag destination"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "gtk_drag_dest_add_uri_targets" gtk_drag_dest_add_uri_targets :: 
    Ptr Widget ->                           -- widget : TInterface (Name {namespace = "Gtk", name = "Widget"})
    IO ()

-- | Add the URI targets supported by t'GI.Gtk.Structs.SelectionData.SelectionData' to
-- the target list of the drag destination. The targets
-- are added with /@info@/ = 0. If you need another value,
-- use @/gtk_target_list_add_uri_targets()/@ and
-- 'GI.Gtk.Objects.Widget.widgetDragDestSetTargetList'.
widgetDragDestAddUriTargets ::
    (B.CallStack.HasCallStack, MonadIO m, IsWidget a) =>
    a
    -- ^ /@widget@/: a t'GI.Gtk.Objects.Widget.Widget' that’s a drag destination
    -> m ()
widgetDragDestAddUriTargets :: a -> m ()
widgetDragDestAddUriTargets widget :: a
widget = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    Ptr Widget
widget' <- a -> IO (Ptr Widget)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
widget
    Ptr Widget -> IO ()
gtk_drag_dest_add_uri_targets Ptr Widget
widget'
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
widget
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()

#if defined(ENABLE_OVERLOADING)
data WidgetDragDestAddUriTargetsMethodInfo
instance (signature ~ (m ()), MonadIO m, IsWidget a) => O.MethodInfo WidgetDragDestAddUriTargetsMethodInfo a signature where
    overloadedMethod = widgetDragDestAddUriTargets

#endif

-- method Widget::drag_dest_find_target
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "widget"
--           , argType = TInterface Name { namespace = "Gtk" , name = "Widget" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "drag destination widget"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "drop"
--           , argType = TInterface Name { namespace = "Gdk" , name = "Drop" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "#GdkDrop" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "target_list"
--           , argType =
--               TInterface Name { namespace = "Gdk" , name = "ContentFormats" }
--           , direction = DirectionIn
--           , mayBeNull = True
--           , argDoc =
--               Documentation
--                 { rawDocText =
--                     Just
--                       "list of droppable targets, or %NULL to use\n   gtk_drag_dest_get_target_list (@widget)."
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TBasicType TUTF8)
-- throws : False
-- Skip return : False

foreign import ccall "gtk_drag_dest_find_target" gtk_drag_dest_find_target :: 
    Ptr Widget ->                           -- widget : TInterface (Name {namespace = "Gtk", name = "Widget"})
    Ptr Gdk.Drop.Drop ->                    -- drop : TInterface (Name {namespace = "Gdk", name = "Drop"})
    Ptr Gdk.ContentFormats.ContentFormats -> -- target_list : TInterface (Name {namespace = "Gdk", name = "ContentFormats"})
    IO CString

-- | Looks for a match between the supported targets of /@drop@/ and the
-- /@destTargetList@/, returning the first matching target, otherwise
-- returning 'P.Nothing'. /@destTargetList@/ should usually be the return
-- value from 'GI.Gtk.Objects.Widget.widgetDragDestGetTargetList', but some widgets may
-- have different valid targets for different parts of the widget; in
-- that case, they will have to implement a drag_motion handler that
-- passes the correct target list to this function.
widgetDragDestFindTarget ::
    (B.CallStack.HasCallStack, MonadIO m, IsWidget a, Gdk.Drop.IsDrop b) =>
    a
    -- ^ /@widget@/: drag destination widget
    -> b
    -- ^ /@drop@/: t'GI.Gdk.Objects.Drop.Drop'
    -> Maybe (Gdk.ContentFormats.ContentFormats)
    -- ^ /@targetList@/: list of droppable targets, or 'P.Nothing' to use
    --    gtk_drag_dest_get_target_list (/@widget@/).
    -> m (Maybe T.Text)
    -- ^ __Returns:__ first target that the source offers
    --     and the dest can accept, or 'P.Nothing'
widgetDragDestFindTarget :: a -> b -> Maybe ContentFormats -> m (Maybe Text)
widgetDragDestFindTarget widget :: a
widget drop :: b
drop targetList :: Maybe ContentFormats
targetList = IO (Maybe Text) -> m (Maybe Text)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Maybe Text) -> m (Maybe Text))
-> IO (Maybe Text) -> m (Maybe Text)
forall a b. (a -> b) -> a -> b
$ do
    Ptr Widget
widget' <- a -> IO (Ptr Widget)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
widget
    Ptr Drop
drop' <- b -> IO (Ptr Drop)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
drop
    Ptr ContentFormats
maybeTargetList <- case Maybe ContentFormats
targetList of
        Nothing -> Ptr ContentFormats -> IO (Ptr ContentFormats)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr ContentFormats
forall a. Ptr a
nullPtr
        Just jTargetList :: ContentFormats
jTargetList -> do
            Ptr ContentFormats
jTargetList' <- ContentFormats -> IO (Ptr ContentFormats)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr ContentFormats
jTargetList
            Ptr ContentFormats -> IO (Ptr ContentFormats)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr ContentFormats
jTargetList'
    CString
result <- Ptr Widget -> Ptr Drop -> Ptr ContentFormats -> IO CString
gtk_drag_dest_find_target Ptr Widget
widget' Ptr Drop
drop' Ptr ContentFormats
maybeTargetList
    Maybe Text
maybeResult <- CString -> (CString -> IO Text) -> IO (Maybe Text)
forall a b. Ptr a -> (Ptr a -> IO b) -> IO (Maybe b)
convertIfNonNull CString
result ((CString -> IO Text) -> IO (Maybe Text))
-> (CString -> IO Text) -> IO (Maybe Text)
forall a b. (a -> b) -> a -> b
$ \result' :: CString
result' -> do
        Text
result'' <- HasCallStack => CString -> IO Text
CString -> IO Text
cstringToText CString
result'
        Text -> IO Text
forall (m :: * -> *) a. Monad m => a -> m a
return Text
result''
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
widget
    b -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr b
drop
    Maybe ContentFormats -> (ContentFormats -> IO ()) -> IO ()
forall (m :: * -> *) a. Monad m => Maybe a -> (a -> m ()) -> m ()
whenJust Maybe ContentFormats
targetList ContentFormats -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr
    Maybe Text -> IO (Maybe Text)
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe Text
maybeResult

#if defined(ENABLE_OVERLOADING)
data WidgetDragDestFindTargetMethodInfo
instance (signature ~ (b -> Maybe (Gdk.ContentFormats.ContentFormats) -> m (Maybe T.Text)), MonadIO m, IsWidget a, Gdk.Drop.IsDrop b) => O.MethodInfo WidgetDragDestFindTargetMethodInfo a signature where
    overloadedMethod = widgetDragDestFindTarget

#endif

-- method Widget::drag_dest_get_target_list
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "widget"
--           , argType = TInterface Name { namespace = "Gtk" , name = "Widget" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #GtkWidget" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just
--               (TInterface Name { namespace = "Gdk" , name = "ContentFormats" })
-- throws : False
-- Skip return : False

foreign import ccall "gtk_drag_dest_get_target_list" gtk_drag_dest_get_target_list :: 
    Ptr Widget ->                           -- widget : TInterface (Name {namespace = "Gtk", name = "Widget"})
    IO (Ptr Gdk.ContentFormats.ContentFormats)

-- | Returns the list of targets this widget can accept from
-- drag-and-drop.
widgetDragDestGetTargetList ::
    (B.CallStack.HasCallStack, MonadIO m, IsWidget a) =>
    a
    -- ^ /@widget@/: a t'GI.Gtk.Objects.Widget.Widget'
    -> m (Maybe Gdk.ContentFormats.ContentFormats)
    -- ^ __Returns:__ the t'GI.Gdk.Structs.ContentFormats.ContentFormats', or 'P.Nothing' if none
widgetDragDestGetTargetList :: a -> m (Maybe ContentFormats)
widgetDragDestGetTargetList widget :: a
widget = IO (Maybe ContentFormats) -> m (Maybe ContentFormats)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Maybe ContentFormats) -> m (Maybe ContentFormats))
-> IO (Maybe ContentFormats) -> m (Maybe ContentFormats)
forall a b. (a -> b) -> a -> b
$ do
    Ptr Widget
widget' <- a -> IO (Ptr Widget)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
widget
    Ptr ContentFormats
result <- Ptr Widget -> IO (Ptr ContentFormats)
gtk_drag_dest_get_target_list Ptr Widget
widget'
    Maybe ContentFormats
maybeResult <- Ptr ContentFormats
-> (Ptr ContentFormats -> IO ContentFormats)
-> IO (Maybe ContentFormats)
forall a b. Ptr a -> (Ptr a -> IO b) -> IO (Maybe b)
convertIfNonNull Ptr ContentFormats
result ((Ptr ContentFormats -> IO ContentFormats)
 -> IO (Maybe ContentFormats))
-> (Ptr ContentFormats -> IO ContentFormats)
-> IO (Maybe ContentFormats)
forall a b. (a -> b) -> a -> b
$ \result' :: Ptr ContentFormats
result' -> do
        ContentFormats
result'' <- ((ManagedPtr ContentFormats -> ContentFormats)
-> Ptr ContentFormats -> IO ContentFormats
forall a.
(HasCallStack, BoxedObject a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
newBoxed ManagedPtr ContentFormats -> ContentFormats
Gdk.ContentFormats.ContentFormats) Ptr ContentFormats
result'
        ContentFormats -> IO ContentFormats
forall (m :: * -> *) a. Monad m => a -> m a
return ContentFormats
result''
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
widget
    Maybe ContentFormats -> IO (Maybe ContentFormats)
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe ContentFormats
maybeResult

#if defined(ENABLE_OVERLOADING)
data WidgetDragDestGetTargetListMethodInfo
instance (signature ~ (m (Maybe Gdk.ContentFormats.ContentFormats)), MonadIO m, IsWidget a) => O.MethodInfo WidgetDragDestGetTargetListMethodInfo a signature where
    overloadedMethod = widgetDragDestGetTargetList

#endif

-- method Widget::drag_dest_get_track_motion
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "widget"
--           , argType = TInterface Name { namespace = "Gtk" , name = "Widget" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #GtkWidget that\8217s a drag destination"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TBasicType TBoolean)
-- throws : False
-- Skip return : False

foreign import ccall "gtk_drag_dest_get_track_motion" gtk_drag_dest_get_track_motion :: 
    Ptr Widget ->                           -- widget : TInterface (Name {namespace = "Gtk", name = "Widget"})
    IO CInt

-- | Returns whether the widget has been configured to always
-- emit [dragMotion]("GI.Gtk.Objects.Widget#signal:dragMotion") signals.
widgetDragDestGetTrackMotion ::
    (B.CallStack.HasCallStack, MonadIO m, IsWidget a) =>
    a
    -- ^ /@widget@/: a t'GI.Gtk.Objects.Widget.Widget' that’s a drag destination
    -> m Bool
    -- ^ __Returns:__ 'P.True' if the widget always emits
    --   [dragMotion]("GI.Gtk.Objects.Widget#signal:dragMotion") events
widgetDragDestGetTrackMotion :: a -> m Bool
widgetDragDestGetTrackMotion widget :: a
widget = WidgetPopupMenuCallback -> m Bool
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (WidgetPopupMenuCallback -> m Bool)
-> WidgetPopupMenuCallback -> m Bool
forall a b. (a -> b) -> a -> b
$ do
    Ptr Widget
widget' <- a -> IO (Ptr Widget)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
widget
    CInt
result <- Ptr Widget -> IO CInt
gtk_drag_dest_get_track_motion Ptr Widget
widget'
    let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= 0) CInt
result
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
widget
    WidgetMnemonicActivateCallback
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'

#if defined(ENABLE_OVERLOADING)
data WidgetDragDestGetTrackMotionMethodInfo
instance (signature ~ (m Bool), MonadIO m, IsWidget a) => O.MethodInfo WidgetDragDestGetTrackMotionMethodInfo a signature where
    overloadedMethod = widgetDragDestGetTrackMotion

#endif

-- method Widget::drag_dest_set
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "widget"
--           , argType = TInterface Name { namespace = "Gtk" , name = "Widget" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #GtkWidget" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "flags"
--           , argType =
--               TInterface Name { namespace = "Gtk" , name = "DestDefaults" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "which types of default drag behavior to use"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "targets"
--           , argType =
--               TInterface Name { namespace = "Gdk" , name = "ContentFormats" }
--           , direction = DirectionIn
--           , mayBeNull = True
--           , argDoc =
--               Documentation
--                 { rawDocText =
--                     Just
--                       "the drop types that this @widget will\n    accept, or %NULL. Later you can access the list with\n    gtk_drag_dest_get_target_list() and gtk_drag_dest_find_target()."
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "actions"
--           , argType =
--               TInterface Name { namespace = "Gdk" , name = "DragAction" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText =
--                     Just "a bitmask of possible actions for a drop onto this @widget."
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "gtk_drag_dest_set" gtk_drag_dest_set :: 
    Ptr Widget ->                           -- widget : TInterface (Name {namespace = "Gtk", name = "Widget"})
    CUInt ->                                -- flags : TInterface (Name {namespace = "Gtk", name = "DestDefaults"})
    Ptr Gdk.ContentFormats.ContentFormats -> -- targets : TInterface (Name {namespace = "Gdk", name = "ContentFormats"})
    CUInt ->                                -- actions : TInterface (Name {namespace = "Gdk", name = "DragAction"})
    IO ()

-- | Sets a widget as a potential drop destination, and adds default behaviors.
-- 
-- The default behaviors listed in /@flags@/ have an effect similar
-- to installing default handlers for the widget’s drag-and-drop signals
-- ([dragMotion]("GI.Gtk.Objects.Widget#signal:dragMotion"), [dragDrop]("GI.Gtk.Objects.Widget#signal:dragDrop"), ...). They all exist
-- for convenience. When passing @/GTK_DEST_DEFAULT_ALL/@ for instance it is
-- sufficient to connect to the widget’s [dragDataReceived]("GI.Gtk.Objects.Widget#signal:dragDataReceived")
-- signal to get primitive, but consistent drag-and-drop support.
-- 
-- Things become more complicated when you try to preview the dragged data,
-- as described in the documentation for [dragMotion]("GI.Gtk.Objects.Widget#signal:dragMotion"). The default
-- behaviors described by /@flags@/ make some assumptions, that can conflict
-- with your own signal handlers. For instance @/GTK_DEST_DEFAULT_DROP/@ causes
-- invokations of @/gdk_drag_status()/@ in the context of [dragMotion]("GI.Gtk.Objects.Widget#signal:dragMotion"),
-- and invokations of @/gdk_drag_finish()/@ in [dragDataReceived]("GI.Gtk.Objects.Widget#signal:dragDataReceived").
-- Especially the later is dramatic, when your own [dragMotion]("GI.Gtk.Objects.Widget#signal:dragMotion")
-- handler calls 'GI.Gtk.Objects.Widget.widgetDragGetData' to inspect the dragged data.
-- 
-- There’s no way to set a default action here, you can use the
-- [dragMotion]("GI.Gtk.Objects.Widget#signal:dragMotion") callback for that. Here’s an example which selects
-- the action to use depending on whether the control key is pressed or not:
-- 
-- === /C code/
-- >
-- >static void
-- >drag_motion (GtkWidget *widget,
-- >             GdkDrag *drag,
-- >             gint x,
-- >             gint y,
-- >             guint time)
-- >{
-- >  GdkModifierType mask;
-- >
-- >  gdk_surface_get_pointer (gtk_widget_get_surface (widget),
-- >                          NULL, NULL, &mask);
-- >  if (mask & GDK_CONTROL_MASK)
-- >    gdk_drag_status (context, GDK_ACTION_COPY, time);
-- >  else
-- >    gdk_drag_status (context, GDK_ACTION_MOVE, time);
-- >}
widgetDragDestSet ::
    (B.CallStack.HasCallStack, MonadIO m, IsWidget a) =>
    a
    -- ^ /@widget@/: a t'GI.Gtk.Objects.Widget.Widget'
    -> [Gtk.Flags.DestDefaults]
    -- ^ /@flags@/: which types of default drag behavior to use
    -> Maybe (Gdk.ContentFormats.ContentFormats)
    -- ^ /@targets@/: the drop types that this /@widget@/ will
    --     accept, or 'P.Nothing'. Later you can access the list with
    --     'GI.Gtk.Objects.Widget.widgetDragDestGetTargetList' and 'GI.Gtk.Objects.Widget.widgetDragDestFindTarget'.
    -> [Gdk.Flags.DragAction]
    -- ^ /@actions@/: a bitmask of possible actions for a drop onto this /@widget@/.
    -> m ()
widgetDragDestSet :: a -> [DestDefaults] -> Maybe ContentFormats -> [DragAction] -> m ()
widgetDragDestSet widget :: a
widget flags :: [DestDefaults]
flags targets :: Maybe ContentFormats
targets actions :: [DragAction]
actions = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    Ptr Widget
widget' <- a -> IO (Ptr Widget)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
widget
    let flags' :: CUInt
flags' = [DestDefaults] -> CUInt
forall b a. (Num b, IsGFlag a) => [a] -> b
gflagsToWord [DestDefaults]
flags
    Ptr ContentFormats
maybeTargets <- case Maybe ContentFormats
targets of
        Nothing -> Ptr ContentFormats -> IO (Ptr ContentFormats)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr ContentFormats
forall a. Ptr a
nullPtr
        Just jTargets :: ContentFormats
jTargets -> do
            Ptr ContentFormats
jTargets' <- ContentFormats -> IO (Ptr ContentFormats)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr ContentFormats
jTargets
            Ptr ContentFormats -> IO (Ptr ContentFormats)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr ContentFormats
jTargets'
    let actions' :: CUInt
actions' = [DragAction] -> CUInt
forall b a. (Num b, IsGFlag a) => [a] -> b
gflagsToWord [DragAction]
actions
    Ptr Widget -> CUInt -> Ptr ContentFormats -> CUInt -> IO ()
gtk_drag_dest_set Ptr Widget
widget' CUInt
flags' Ptr ContentFormats
maybeTargets CUInt
actions'
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
widget
    Maybe ContentFormats -> (ContentFormats -> IO ()) -> IO ()
forall (m :: * -> *) a. Monad m => Maybe a -> (a -> m ()) -> m ()
whenJust Maybe ContentFormats
targets ContentFormats -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()

#if defined(ENABLE_OVERLOADING)
data WidgetDragDestSetMethodInfo
instance (signature ~ ([Gtk.Flags.DestDefaults] -> Maybe (Gdk.ContentFormats.ContentFormats) -> [Gdk.Flags.DragAction] -> m ()), MonadIO m, IsWidget a) => O.MethodInfo WidgetDragDestSetMethodInfo a signature where
    overloadedMethod = widgetDragDestSet

#endif

-- method Widget::drag_dest_set_target_list
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "widget"
--           , argType = TInterface Name { namespace = "Gtk" , name = "Widget" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #GtkWidget that\8217s a drag destination"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "target_list"
--           , argType =
--               TInterface Name { namespace = "Gdk" , name = "ContentFormats" }
--           , direction = DirectionIn
--           , mayBeNull = True
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "list of droppable targets, or %NULL for none"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "gtk_drag_dest_set_target_list" gtk_drag_dest_set_target_list :: 
    Ptr Widget ->                           -- widget : TInterface (Name {namespace = "Gtk", name = "Widget"})
    Ptr Gdk.ContentFormats.ContentFormats -> -- target_list : TInterface (Name {namespace = "Gdk", name = "ContentFormats"})
    IO ()

-- | Sets the target types that this widget can accept from drag-and-drop.
-- The widget must first be made into a drag destination with
-- 'GI.Gtk.Objects.Widget.widgetDragDestSet'.
widgetDragDestSetTargetList ::
    (B.CallStack.HasCallStack, MonadIO m, IsWidget a) =>
    a
    -- ^ /@widget@/: a t'GI.Gtk.Objects.Widget.Widget' that’s a drag destination
    -> Maybe (Gdk.ContentFormats.ContentFormats)
    -- ^ /@targetList@/: list of droppable targets, or 'P.Nothing' for none
    -> m ()
widgetDragDestSetTargetList :: a -> Maybe ContentFormats -> m ()
widgetDragDestSetTargetList widget :: a
widget targetList :: Maybe ContentFormats
targetList = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    Ptr Widget
widget' <- a -> IO (Ptr Widget)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
widget
    Ptr ContentFormats
maybeTargetList <- case Maybe ContentFormats
targetList of
        Nothing -> Ptr ContentFormats -> IO (Ptr ContentFormats)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr ContentFormats
forall a. Ptr a
nullPtr
        Just jTargetList :: ContentFormats
jTargetList -> do
            Ptr ContentFormats
jTargetList' <- ContentFormats -> IO (Ptr ContentFormats)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr ContentFormats
jTargetList
            Ptr ContentFormats -> IO (Ptr ContentFormats)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr ContentFormats
jTargetList'
    Ptr Widget -> Ptr ContentFormats -> IO ()
gtk_drag_dest_set_target_list Ptr Widget
widget' Ptr ContentFormats
maybeTargetList
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
widget
    Maybe ContentFormats -> (ContentFormats -> IO ()) -> IO ()
forall (m :: * -> *) a. Monad m => Maybe a -> (a -> m ()) -> m ()
whenJust Maybe ContentFormats
targetList ContentFormats -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()

#if defined(ENABLE_OVERLOADING)
data WidgetDragDestSetTargetListMethodInfo
instance (signature ~ (Maybe (Gdk.ContentFormats.ContentFormats) -> m ()), MonadIO m, IsWidget a) => O.MethodInfo WidgetDragDestSetTargetListMethodInfo a signature where
    overloadedMethod = widgetDragDestSetTargetList

#endif

-- method Widget::drag_dest_set_track_motion
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "widget"
--           , argType = TInterface Name { namespace = "Gtk" , name = "Widget" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #GtkWidget that\8217s a drag destination"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "track_motion"
--           , argType = TBasicType TBoolean
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "whether to accept all targets"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "gtk_drag_dest_set_track_motion" gtk_drag_dest_set_track_motion :: 
    Ptr Widget ->                           -- widget : TInterface (Name {namespace = "Gtk", name = "Widget"})
    CInt ->                                 -- track_motion : TBasicType TBoolean
    IO ()

-- | Tells the widget to emit [dragMotion]("GI.Gtk.Objects.Widget#signal:dragMotion") and
-- [dragLeave]("GI.Gtk.Objects.Widget#signal:dragLeave") events regardless of the targets and the
-- 'GI.Gtk.Flags.DestDefaultsMotion' flag.
-- 
-- This may be used when a widget wants to do generic
-- actions regardless of the targets that the source offers.
widgetDragDestSetTrackMotion ::
    (B.CallStack.HasCallStack, MonadIO m, IsWidget a) =>
    a
    -- ^ /@widget@/: a t'GI.Gtk.Objects.Widget.Widget' that’s a drag destination
    -> Bool
    -- ^ /@trackMotion@/: whether to accept all targets
    -> m ()
widgetDragDestSetTrackMotion :: a -> Bool -> m ()
widgetDragDestSetTrackMotion widget :: a
widget trackMotion :: Bool
trackMotion = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    Ptr Widget
widget' <- a -> IO (Ptr Widget)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
widget
    let trackMotion' :: CInt
trackMotion' = (Int -> CInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CInt) -> (Bool -> Int) -> Bool -> CInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Bool -> Int
forall a. Enum a => a -> Int
fromEnum) Bool
trackMotion
    Ptr Widget -> CInt -> IO ()
gtk_drag_dest_set_track_motion Ptr Widget
widget' CInt
trackMotion'
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
widget
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()

#if defined(ENABLE_OVERLOADING)
data WidgetDragDestSetTrackMotionMethodInfo
instance (signature ~ (Bool -> m ()), MonadIO m, IsWidget a) => O.MethodInfo WidgetDragDestSetTrackMotionMethodInfo a signature where
    overloadedMethod = widgetDragDestSetTrackMotion

#endif

-- method Widget::drag_dest_unset
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "widget"
--           , argType = TInterface Name { namespace = "Gtk" , name = "Widget" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #GtkWidget" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "gtk_drag_dest_unset" gtk_drag_dest_unset :: 
    Ptr Widget ->                           -- widget : TInterface (Name {namespace = "Gtk", name = "Widget"})
    IO ()

-- | Clears information about a drop destination set with
-- 'GI.Gtk.Objects.Widget.widgetDragDestSet'. The widget will no longer receive
-- notification of drags.
widgetDragDestUnset ::
    (B.CallStack.HasCallStack, MonadIO m, IsWidget a) =>
    a
    -- ^ /@widget@/: a t'GI.Gtk.Objects.Widget.Widget'
    -> m ()
widgetDragDestUnset :: a -> m ()
widgetDragDestUnset widget :: a
widget = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    Ptr Widget
widget' <- a -> IO (Ptr Widget)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
widget
    Ptr Widget -> IO ()
gtk_drag_dest_unset Ptr Widget
widget'
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
widget
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()

#if defined(ENABLE_OVERLOADING)
data WidgetDragDestUnsetMethodInfo
instance (signature ~ (m ()), MonadIO m, IsWidget a) => O.MethodInfo WidgetDragDestUnsetMethodInfo a signature where
    overloadedMethod = widgetDragDestUnset

#endif

-- method Widget::drag_get_data
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "widget"
--           , argType = TInterface Name { namespace = "Gtk" , name = "Widget" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText =
--                     Just
--                       "the widget that will receive the\n  #GtkWidget::drag-data-received signal"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "drop"
--           , argType = TInterface Name { namespace = "Gdk" , name = "Drop" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "the #GdkDrop" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "target"
--           , argType = TBasicType TUTF8
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "the target (form of the data) to retrieve"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "gtk_drag_get_data" gtk_drag_get_data :: 
    Ptr Widget ->                           -- widget : TInterface (Name {namespace = "Gtk", name = "Widget"})
    Ptr Gdk.Drop.Drop ->                    -- drop : TInterface (Name {namespace = "Gdk", name = "Drop"})
    CString ->                              -- target : TBasicType TUTF8
    IO ()

-- | Gets the data associated with a drag. When the data
-- is received or the retrieval fails, GTK+ will emit a
-- [dragDataReceived]("GI.Gtk.Objects.Widget#signal:dragDataReceived") signal. Failure of the retrieval
-- is indicated by the length field of the /@selectionData@/
-- signal parameter being negative. However, when 'GI.Gtk.Objects.Widget.widgetDragGetData'
-- is called implicitely because the 'GI.Gtk.Flags.DestDefaultsDrop' was set,
-- then the widget will not receive notification of failed
-- drops.
widgetDragGetData ::
    (B.CallStack.HasCallStack, MonadIO m, IsWidget a, Gdk.Drop.IsDrop b) =>
    a
    -- ^ /@widget@/: the widget that will receive the
    --   [dragDataReceived]("GI.Gtk.Objects.Widget#signal:dragDataReceived") signal
    -> b
    -- ^ /@drop@/: the t'GI.Gdk.Objects.Drop.Drop'
    -> T.Text
    -- ^ /@target@/: the target (form of the data) to retrieve
    -> m ()
widgetDragGetData :: a -> b -> Text -> m ()
widgetDragGetData widget :: a
widget drop :: b
drop target :: Text
target = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    Ptr Widget
widget' <- a -> IO (Ptr Widget)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
widget
    Ptr Drop
drop' <- b -> IO (Ptr Drop)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
drop
    CString
target' <- Text -> IO CString
textToCString Text
target
    Ptr Widget -> Ptr Drop -> CString -> IO ()
gtk_drag_get_data Ptr Widget
widget' Ptr Drop
drop' CString
target'
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
widget
    b -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr b
drop
    CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
target'
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()

#if defined(ENABLE_OVERLOADING)
data WidgetDragGetDataMethodInfo
instance (signature ~ (b -> T.Text -> m ()), MonadIO m, IsWidget a, Gdk.Drop.IsDrop b) => O.MethodInfo WidgetDragGetDataMethodInfo a signature where
    overloadedMethod = widgetDragGetData

#endif

-- method Widget::drag_highlight
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "widget"
--           , argType = TInterface Name { namespace = "Gtk" , name = "Widget" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a widget to highlight"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "gtk_drag_highlight" gtk_drag_highlight :: 
    Ptr Widget ->                           -- widget : TInterface (Name {namespace = "Gtk", name = "Widget"})
    IO ()

-- | Highlights a widget as a currently hovered drop target.
-- To end the highlight, call 'GI.Gtk.Objects.Widget.widgetDragUnhighlight'.
-- GTK+ calls this automatically if 'GI.Gtk.Flags.DestDefaultsHighlight' is set.
widgetDragHighlight ::
    (B.CallStack.HasCallStack, MonadIO m, IsWidget a) =>
    a
    -- ^ /@widget@/: a widget to highlight
    -> m ()
widgetDragHighlight :: a -> m ()
widgetDragHighlight widget :: a
widget = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    Ptr Widget
widget' <- a -> IO (Ptr Widget)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
widget
    Ptr Widget -> IO ()
gtk_drag_highlight Ptr Widget
widget'
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
widget
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()

#if defined(ENABLE_OVERLOADING)
data WidgetDragHighlightMethodInfo
instance (signature ~ (m ()), MonadIO m, IsWidget a) => O.MethodInfo WidgetDragHighlightMethodInfo a signature where
    overloadedMethod = widgetDragHighlight

#endif

-- method Widget::drag_source_add_image_targets
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "widget"
--           , argType = TInterface Name { namespace = "Gtk" , name = "Widget" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #GtkWidget that\8217s is a drag source"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "gtk_drag_source_add_image_targets" gtk_drag_source_add_image_targets :: 
    Ptr Widget ->                           -- widget : TInterface (Name {namespace = "Gtk", name = "Widget"})
    IO ()

-- | Add the writable image targets supported by t'GI.Gtk.Structs.SelectionData.SelectionData' to
-- the target list of the drag source. The targets
-- are added with /@info@/ = 0. If you need another value,
-- use @/gtk_target_list_add_image_targets()/@ and
-- 'GI.Gtk.Objects.Widget.widgetDragSourceSetTargetList'.
widgetDragSourceAddImageTargets ::
    (B.CallStack.HasCallStack, MonadIO m, IsWidget a) =>
    a
    -- ^ /@widget@/: a t'GI.Gtk.Objects.Widget.Widget' that’s is a drag source
    -> m ()
widgetDragSourceAddImageTargets :: a -> m ()
widgetDragSourceAddImageTargets widget :: a
widget = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    Ptr Widget
widget' <- a -> IO (Ptr Widget)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
widget
    Ptr Widget -> IO ()
gtk_drag_source_add_image_targets Ptr Widget
widget'
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
widget
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()

#if defined(ENABLE_OVERLOADING)
data WidgetDragSourceAddImageTargetsMethodInfo
instance (signature ~ (m ()), MonadIO m, IsWidget a) => O.MethodInfo WidgetDragSourceAddImageTargetsMethodInfo a signature where
    overloadedMethod = widgetDragSourceAddImageTargets

#endif

-- method Widget::drag_source_add_text_targets
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "widget"
--           , argType = TInterface Name { namespace = "Gtk" , name = "Widget" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #GtkWidget that\8217s is a drag source"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "gtk_drag_source_add_text_targets" gtk_drag_source_add_text_targets :: 
    Ptr Widget ->                           -- widget : TInterface (Name {namespace = "Gtk", name = "Widget"})
    IO ()

-- | Add the text targets supported by t'GI.Gtk.Structs.SelectionData.SelectionData' to
-- the target list of the drag source.  The targets
-- are added with /@info@/ = 0. If you need another value,
-- use 'GI.Gtk.Functions.contentFormatsAddTextTargets' and
-- 'GI.Gtk.Objects.Widget.widgetDragSourceSetTargetList'.
widgetDragSourceAddTextTargets ::
    (B.CallStack.HasCallStack, MonadIO m, IsWidget a) =>
    a
    -- ^ /@widget@/: a t'GI.Gtk.Objects.Widget.Widget' that’s is a drag source
    -> m ()
widgetDragSourceAddTextTargets :: a -> m ()
widgetDragSourceAddTextTargets widget :: a
widget = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    Ptr Widget
widget' <- a -> IO (Ptr Widget)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
widget
    Ptr Widget -> IO ()
gtk_drag_source_add_text_targets Ptr Widget
widget'
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
widget
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()

#if defined(ENABLE_OVERLOADING)
data WidgetDragSourceAddTextTargetsMethodInfo
instance (signature ~ (m ()), MonadIO m, IsWidget a) => O.MethodInfo WidgetDragSourceAddTextTargetsMethodInfo a signature where
    overloadedMethod = widgetDragSourceAddTextTargets

#endif

-- method Widget::drag_source_add_uri_targets
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "widget"
--           , argType = TInterface Name { namespace = "Gtk" , name = "Widget" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #GtkWidget that\8217s is a drag source"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "gtk_drag_source_add_uri_targets" gtk_drag_source_add_uri_targets :: 
    Ptr Widget ->                           -- widget : TInterface (Name {namespace = "Gtk", name = "Widget"})
    IO ()

-- | Add the URI targets supported by t'GI.Gtk.Structs.SelectionData.SelectionData' to
-- the target list of the drag source.  The targets
-- are added with /@info@/ = 0. If you need another value,
-- use 'GI.Gtk.Functions.contentFormatsAddUriTargets' and
-- 'GI.Gtk.Objects.Widget.widgetDragSourceSetTargetList'.
widgetDragSourceAddUriTargets ::
    (B.CallStack.HasCallStack, MonadIO m, IsWidget a) =>
    a
    -- ^ /@widget@/: a t'GI.Gtk.Objects.Widget.Widget' that’s is a drag source
    -> m ()
widgetDragSourceAddUriTargets :: a -> m ()
widgetDragSourceAddUriTargets widget :: a
widget = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    Ptr Widget
widget' <- a -> IO (Ptr Widget)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
widget
    Ptr Widget -> IO ()
gtk_drag_source_add_uri_targets Ptr Widget
widget'
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
widget
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()

#if defined(ENABLE_OVERLOADING)
data WidgetDragSourceAddUriTargetsMethodInfo
instance (signature ~ (m ()), MonadIO m, IsWidget a) => O.MethodInfo WidgetDragSourceAddUriTargetsMethodInfo a signature where
    overloadedMethod = widgetDragSourceAddUriTargets

#endif

-- method Widget::drag_source_get_target_list
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "widget"
--           , argType = TInterface Name { namespace = "Gtk" , name = "Widget" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #GtkWidget" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just
--               (TInterface Name { namespace = "Gdk" , name = "ContentFormats" })
-- throws : False
-- Skip return : False

foreign import ccall "gtk_drag_source_get_target_list" gtk_drag_source_get_target_list :: 
    Ptr Widget ->                           -- widget : TInterface (Name {namespace = "Gtk", name = "Widget"})
    IO (Ptr Gdk.ContentFormats.ContentFormats)

-- | Gets the list of targets this widget can provide for
-- drag-and-drop.
widgetDragSourceGetTargetList ::
    (B.CallStack.HasCallStack, MonadIO m, IsWidget a) =>
    a
    -- ^ /@widget@/: a t'GI.Gtk.Objects.Widget.Widget'
    -> m (Maybe Gdk.ContentFormats.ContentFormats)
    -- ^ __Returns:__ the t'GI.Gdk.Structs.ContentFormats.ContentFormats', or 'P.Nothing' if none
widgetDragSourceGetTargetList :: a -> m (Maybe ContentFormats)
widgetDragSourceGetTargetList widget :: a
widget = IO (Maybe ContentFormats) -> m (Maybe ContentFormats)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Maybe ContentFormats) -> m (Maybe ContentFormats))
-> IO (Maybe ContentFormats) -> m (Maybe ContentFormats)
forall a b. (a -> b) -> a -> b
$ do
    Ptr Widget
widget' <- a -> IO (Ptr Widget)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
widget
    Ptr ContentFormats
result <- Ptr Widget -> IO (Ptr ContentFormats)
gtk_drag_source_get_target_list Ptr Widget
widget'
    Maybe ContentFormats
maybeResult <- Ptr ContentFormats
-> (Ptr ContentFormats -> IO ContentFormats)
-> IO (Maybe ContentFormats)
forall a b. Ptr a -> (Ptr a -> IO b) -> IO (Maybe b)
convertIfNonNull Ptr ContentFormats
result ((Ptr ContentFormats -> IO ContentFormats)
 -> IO (Maybe ContentFormats))
-> (Ptr ContentFormats -> IO ContentFormats)
-> IO (Maybe ContentFormats)
forall a b. (a -> b) -> a -> b
$ \result' :: Ptr ContentFormats
result' -> do
        ContentFormats
result'' <- ((ManagedPtr ContentFormats -> ContentFormats)
-> Ptr ContentFormats -> IO ContentFormats
forall a.
(HasCallStack, BoxedObject a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
newBoxed ManagedPtr ContentFormats -> ContentFormats
Gdk.ContentFormats.ContentFormats) Ptr ContentFormats
result'
        ContentFormats -> IO ContentFormats
forall (m :: * -> *) a. Monad m => a -> m a
return ContentFormats
result''
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
widget
    Maybe ContentFormats -> IO (Maybe ContentFormats)
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe ContentFormats
maybeResult

#if defined(ENABLE_OVERLOADING)
data WidgetDragSourceGetTargetListMethodInfo
instance (signature ~ (m (Maybe Gdk.ContentFormats.ContentFormats)), MonadIO m, IsWidget a) => O.MethodInfo WidgetDragSourceGetTargetListMethodInfo a signature where
    overloadedMethod = widgetDragSourceGetTargetList

#endif

-- method Widget::drag_source_set
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "widget"
--           , argType = TInterface Name { namespace = "Gtk" , name = "Widget" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #GtkWidget" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "start_button_mask"
--           , argType =
--               TInterface Name { namespace = "Gdk" , name = "ModifierType" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText =
--                     Just "the bitmask of buttons that can start the drag"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "targets"
--           , argType =
--               TInterface Name { namespace = "Gdk" , name = "ContentFormats" }
--           , direction = DirectionIn
--           , mayBeNull = True
--           , argDoc =
--               Documentation
--                 { rawDocText =
--                     Just "the targets that the drag will support,\n    may be %NULL"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "actions"
--           , argType =
--               TInterface Name { namespace = "Gdk" , name = "DragAction" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText =
--                     Just "the bitmask of possible actions for a drag from this widget"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "gtk_drag_source_set" gtk_drag_source_set :: 
    Ptr Widget ->                           -- widget : TInterface (Name {namespace = "Gtk", name = "Widget"})
    CUInt ->                                -- start_button_mask : TInterface (Name {namespace = "Gdk", name = "ModifierType"})
    Ptr Gdk.ContentFormats.ContentFormats -> -- targets : TInterface (Name {namespace = "Gdk", name = "ContentFormats"})
    CUInt ->                                -- actions : TInterface (Name {namespace = "Gdk", name = "DragAction"})
    IO ()

-- | Sets up a widget so that GTK+ will start a drag operation when the user
-- clicks and drags on the widget. The widget must have a window.
widgetDragSourceSet ::
    (B.CallStack.HasCallStack, MonadIO m, IsWidget a) =>
    a
    -- ^ /@widget@/: a t'GI.Gtk.Objects.Widget.Widget'
    -> [Gdk.Flags.ModifierType]
    -- ^ /@startButtonMask@/: the bitmask of buttons that can start the drag
    -> Maybe (Gdk.ContentFormats.ContentFormats)
    -- ^ /@targets@/: the targets that the drag will support,
    --     may be 'P.Nothing'
    -> [Gdk.Flags.DragAction]
    -- ^ /@actions@/: the bitmask of possible actions for a drag from this widget
    -> m ()
widgetDragSourceSet :: a -> [ModifierType] -> Maybe ContentFormats -> [DragAction] -> m ()
widgetDragSourceSet widget :: a
widget startButtonMask :: [ModifierType]
startButtonMask targets :: Maybe ContentFormats
targets actions :: [DragAction]
actions = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    Ptr Widget
widget' <- a -> IO (Ptr Widget)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
widget
    let startButtonMask' :: CUInt
startButtonMask' = [ModifierType] -> CUInt
forall b a. (Num b, IsGFlag a) => [a] -> b
gflagsToWord [ModifierType]
startButtonMask
    Ptr ContentFormats
maybeTargets <- case Maybe ContentFormats
targets of
        Nothing -> Ptr ContentFormats -> IO (Ptr ContentFormats)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr ContentFormats
forall a. Ptr a
nullPtr
        Just jTargets :: ContentFormats
jTargets -> do
            Ptr ContentFormats
jTargets' <- ContentFormats -> IO (Ptr ContentFormats)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr ContentFormats
jTargets
            Ptr ContentFormats -> IO (Ptr ContentFormats)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr ContentFormats
jTargets'
    let actions' :: CUInt
actions' = [DragAction] -> CUInt
forall b a. (Num b, IsGFlag a) => [a] -> b
gflagsToWord [DragAction]
actions
    Ptr Widget -> CUInt -> Ptr ContentFormats -> CUInt -> IO ()
gtk_drag_source_set Ptr Widget
widget' CUInt
startButtonMask' Ptr ContentFormats
maybeTargets CUInt
actions'
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
widget
    Maybe ContentFormats -> (ContentFormats -> IO ()) -> IO ()
forall (m :: * -> *) a. Monad m => Maybe a -> (a -> m ()) -> m ()
whenJust Maybe ContentFormats
targets ContentFormats -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()

#if defined(ENABLE_OVERLOADING)
data WidgetDragSourceSetMethodInfo
instance (signature ~ ([Gdk.Flags.ModifierType] -> Maybe (Gdk.ContentFormats.ContentFormats) -> [Gdk.Flags.DragAction] -> m ()), MonadIO m, IsWidget a) => O.MethodInfo WidgetDragSourceSetMethodInfo a signature where
    overloadedMethod = widgetDragSourceSet

#endif

-- method Widget::drag_source_set_icon_gicon
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "widget"
--           , argType = TInterface Name { namespace = "Gtk" , name = "Widget" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #GtkWidget" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "icon"
--           , argType = TInterface Name { namespace = "Gio" , name = "Icon" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "A #GIcon" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "gtk_drag_source_set_icon_gicon" gtk_drag_source_set_icon_gicon :: 
    Ptr Widget ->                           -- widget : TInterface (Name {namespace = "Gtk", name = "Widget"})
    Ptr Gio.Icon.Icon ->                    -- icon : TInterface (Name {namespace = "Gio", name = "Icon"})
    IO ()

-- | Sets the icon that will be used for drags from a particular source
-- to /@icon@/. See the docs for t'GI.Gtk.Objects.IconTheme.IconTheme' for more details.
widgetDragSourceSetIconGicon ::
    (B.CallStack.HasCallStack, MonadIO m, IsWidget a, Gio.Icon.IsIcon b) =>
    a
    -- ^ /@widget@/: a t'GI.Gtk.Objects.Widget.Widget'
    -> b
    -- ^ /@icon@/: A t'GI.Gio.Interfaces.Icon.Icon'
    -> m ()
widgetDragSourceSetIconGicon :: a -> b -> m ()
widgetDragSourceSetIconGicon widget :: a
widget icon :: b
icon = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    Ptr Widget
widget' <- a -> IO (Ptr Widget)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
widget
    Ptr Icon
icon' <- b -> IO (Ptr Icon)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
icon
    Ptr Widget -> Ptr Icon -> IO ()
gtk_drag_source_set_icon_gicon Ptr Widget
widget' Ptr Icon
icon'
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
widget
    b -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr b
icon
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()

#if defined(ENABLE_OVERLOADING)
data WidgetDragSourceSetIconGiconMethodInfo
instance (signature ~ (b -> m ()), MonadIO m, IsWidget a, Gio.Icon.IsIcon b) => O.MethodInfo WidgetDragSourceSetIconGiconMethodInfo a signature where
    overloadedMethod = widgetDragSourceSetIconGicon

#endif

-- method Widget::drag_source_set_icon_name
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "widget"
--           , argType = TInterface Name { namespace = "Gtk" , name = "Widget" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #GtkWidget" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "icon_name"
--           , argType = TBasicType TUTF8
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "name of icon to use"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "gtk_drag_source_set_icon_name" gtk_drag_source_set_icon_name :: 
    Ptr Widget ->                           -- widget : TInterface (Name {namespace = "Gtk", name = "Widget"})
    CString ->                              -- icon_name : TBasicType TUTF8
    IO ()

-- | Sets the icon that will be used for drags from a particular source
-- to a themed icon. See the docs for t'GI.Gtk.Objects.IconTheme.IconTheme' for more details.
widgetDragSourceSetIconName ::
    (B.CallStack.HasCallStack, MonadIO m, IsWidget a) =>
    a
    -- ^ /@widget@/: a t'GI.Gtk.Objects.Widget.Widget'
    -> T.Text
    -- ^ /@iconName@/: name of icon to use
    -> m ()
widgetDragSourceSetIconName :: a -> Text -> m ()
widgetDragSourceSetIconName widget :: a
widget iconName :: Text
iconName = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    Ptr Widget
widget' <- a -> IO (Ptr Widget)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
widget
    CString
iconName' <- Text -> IO CString
textToCString Text
iconName
    Ptr Widget -> CString -> IO ()
gtk_drag_source_set_icon_name Ptr Widget
widget' CString
iconName'
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
widget
    CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
iconName'
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()

#if defined(ENABLE_OVERLOADING)
data WidgetDragSourceSetIconNameMethodInfo
instance (signature ~ (T.Text -> m ()), MonadIO m, IsWidget a) => O.MethodInfo WidgetDragSourceSetIconNameMethodInfo a signature where
    overloadedMethod = widgetDragSourceSetIconName

#endif

-- method Widget::drag_source_set_icon_paintable
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "widget"
--           , argType = TInterface Name { namespace = "Gtk" , name = "Widget" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #GtkWidget" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "paintable"
--           , argType =
--               TInterface Name { namespace = "Gdk" , name = "Paintable" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "A #GdkPaintable" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "gtk_drag_source_set_icon_paintable" gtk_drag_source_set_icon_paintable :: 
    Ptr Widget ->                           -- widget : TInterface (Name {namespace = "Gtk", name = "Widget"})
    Ptr Gdk.Paintable.Paintable ->          -- paintable : TInterface (Name {namespace = "Gdk", name = "Paintable"})
    IO ()

-- | Sets the icon that will be used for drags from a particular source
-- to /@paintable@/.
widgetDragSourceSetIconPaintable ::
    (B.CallStack.HasCallStack, MonadIO m, IsWidget a, Gdk.Paintable.IsPaintable b) =>
    a
    -- ^ /@widget@/: a t'GI.Gtk.Objects.Widget.Widget'
    -> b
    -- ^ /@paintable@/: A t'GI.Gdk.Interfaces.Paintable.Paintable'
    -> m ()
widgetDragSourceSetIconPaintable :: a -> b -> m ()
widgetDragSourceSetIconPaintable widget :: a
widget paintable :: b
paintable = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    Ptr Widget
widget' <- a -> IO (Ptr Widget)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
widget
    Ptr Paintable
paintable' <- b -> IO (Ptr Paintable)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
paintable
    Ptr Widget -> Ptr Paintable -> IO ()
gtk_drag_source_set_icon_paintable Ptr Widget
widget' Ptr Paintable
paintable'
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
widget
    b -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr b
paintable
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()

#if defined(ENABLE_OVERLOADING)
data WidgetDragSourceSetIconPaintableMethodInfo
instance (signature ~ (b -> m ()), MonadIO m, IsWidget a, Gdk.Paintable.IsPaintable b) => O.MethodInfo WidgetDragSourceSetIconPaintableMethodInfo a signature where
    overloadedMethod = widgetDragSourceSetIconPaintable

#endif

-- method Widget::drag_source_set_target_list
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "widget"
--           , argType = TInterface Name { namespace = "Gtk" , name = "Widget" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #GtkWidget that\8217s a drag source"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "target_list"
--           , argType =
--               TInterface Name { namespace = "Gdk" , name = "ContentFormats" }
--           , direction = DirectionIn
--           , mayBeNull = True
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "list of draggable targets, or %NULL for none"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "gtk_drag_source_set_target_list" gtk_drag_source_set_target_list :: 
    Ptr Widget ->                           -- widget : TInterface (Name {namespace = "Gtk", name = "Widget"})
    Ptr Gdk.ContentFormats.ContentFormats -> -- target_list : TInterface (Name {namespace = "Gdk", name = "ContentFormats"})
    IO ()

-- | Changes the target types that this widget offers for drag-and-drop.
-- The widget must first be made into a drag source with
-- 'GI.Gtk.Objects.Widget.widgetDragSourceSet'.
widgetDragSourceSetTargetList ::
    (B.CallStack.HasCallStack, MonadIO m, IsWidget a) =>
    a
    -- ^ /@widget@/: a t'GI.Gtk.Objects.Widget.Widget' that’s a drag source
    -> Maybe (Gdk.ContentFormats.ContentFormats)
    -- ^ /@targetList@/: list of draggable targets, or 'P.Nothing' for none
    -> m ()
widgetDragSourceSetTargetList :: a -> Maybe ContentFormats -> m ()
widgetDragSourceSetTargetList widget :: a
widget targetList :: Maybe ContentFormats
targetList = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    Ptr Widget
widget' <- a -> IO (Ptr Widget)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
widget
    Ptr ContentFormats
maybeTargetList <- case Maybe ContentFormats
targetList of
        Nothing -> Ptr ContentFormats -> IO (Ptr ContentFormats)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr ContentFormats
forall a. Ptr a
nullPtr
        Just jTargetList :: ContentFormats
jTargetList -> do
            Ptr ContentFormats
jTargetList' <- ContentFormats -> IO (Ptr ContentFormats)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr ContentFormats
jTargetList
            Ptr ContentFormats -> IO (Ptr ContentFormats)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr ContentFormats
jTargetList'
    Ptr Widget -> Ptr ContentFormats -> IO ()
gtk_drag_source_set_target_list Ptr Widget
widget' Ptr ContentFormats
maybeTargetList
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
widget
    Maybe ContentFormats -> (ContentFormats -> IO ()) -> IO ()
forall (m :: * -> *) a. Monad m => Maybe a -> (a -> m ()) -> m ()
whenJust Maybe ContentFormats
targetList ContentFormats -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()

#if defined(ENABLE_OVERLOADING)
data WidgetDragSourceSetTargetListMethodInfo
instance (signature ~ (Maybe (Gdk.ContentFormats.ContentFormats) -> m ()), MonadIO m, IsWidget a) => O.MethodInfo WidgetDragSourceSetTargetListMethodInfo a signature where
    overloadedMethod = widgetDragSourceSetTargetList

#endif

-- method Widget::drag_source_unset
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "widget"
--           , argType = TInterface Name { namespace = "Gtk" , name = "Widget" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #GtkWidget" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "gtk_drag_source_unset" gtk_drag_source_unset :: 
    Ptr Widget ->                           -- widget : TInterface (Name {namespace = "Gtk", name = "Widget"})
    IO ()

-- | Undoes the effects of 'GI.Gtk.Objects.Widget.widgetDragSourceSet'.
widgetDragSourceUnset ::
    (B.CallStack.HasCallStack, MonadIO m, IsWidget a) =>
    a
    -- ^ /@widget@/: a t'GI.Gtk.Objects.Widget.Widget'
    -> m ()
widgetDragSourceUnset :: a -> m ()
widgetDragSourceUnset widget :: a
widget = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    Ptr Widget
widget' <- a -> IO (Ptr Widget)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
widget
    Ptr Widget -> IO ()
gtk_drag_source_unset Ptr Widget
widget'
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
widget
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()

#if defined(ENABLE_OVERLOADING)
data WidgetDragSourceUnsetMethodInfo
instance (signature ~ (m ()), MonadIO m, IsWidget a) => O.MethodInfo WidgetDragSourceUnsetMethodInfo a signature where
    overloadedMethod = widgetDragSourceUnset

#endif

-- method Widget::drag_unhighlight
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "widget"
--           , argType = TInterface Name { namespace = "Gtk" , name = "Widget" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a widget to remove the highlight from"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "gtk_drag_unhighlight" gtk_drag_unhighlight :: 
    Ptr Widget ->                           -- widget : TInterface (Name {namespace = "Gtk", name = "Widget"})
    IO ()

-- | Removes a highlight set by 'GI.Gtk.Objects.Widget.widgetDragHighlight' from
-- a widget.
widgetDragUnhighlight ::
    (B.CallStack.HasCallStack, MonadIO m, IsWidget a) =>
    a
    -- ^ /@widget@/: a widget to remove the highlight from
    -> m ()
widgetDragUnhighlight :: a -> m ()
widgetDragUnhighlight widget :: a
widget = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    Ptr Widget
widget' <- a -> IO (Ptr Widget)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
widget
    Ptr Widget -> IO ()
gtk_drag_unhighlight Ptr Widget
widget'
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
widget
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()

#if defined(ENABLE_OVERLOADING)
data WidgetDragUnhighlightMethodInfo
instance (signature ~ (m ()), MonadIO m, IsWidget a) => O.MethodInfo WidgetDragUnhighlightMethodInfo a signature where
    overloadedMethod = widgetDragUnhighlight

#endif

-- method Widget::error_bell
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "widget"
--           , argType = TInterface Name { namespace = "Gtk" , name = "Widget" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #GtkWidget" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "gtk_widget_error_bell" gtk_widget_error_bell :: 
    Ptr Widget ->                           -- widget : TInterface (Name {namespace = "Gtk", name = "Widget"})
    IO ()

-- | Notifies the user about an input-related error on this widget.
-- If the t'GI.Gtk.Objects.Settings.Settings':@/gtk-error-bell/@ setting is 'P.True', it calls
-- 'GI.Gdk.Objects.Surface.surfaceBeep', otherwise it does nothing.
-- 
-- Note that the effect of 'GI.Gdk.Objects.Surface.surfaceBeep' can be configured in many
-- ways, depending on the windowing backend and the desktop environment
-- or window manager that is used.
widgetErrorBell ::
    (B.CallStack.HasCallStack, MonadIO m, IsWidget a) =>
    a
    -- ^ /@widget@/: a t'GI.Gtk.Objects.Widget.Widget'
    -> m ()
widgetErrorBell :: a -> m ()
widgetErrorBell widget :: a
widget = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    Ptr Widget
widget' <- a -> IO (Ptr Widget)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
widget
    Ptr Widget -> IO ()
gtk_widget_error_bell Ptr Widget
widget'
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
widget
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()

#if defined(ENABLE_OVERLOADING)
data WidgetErrorBellMethodInfo
instance (signature ~ (m ()), MonadIO m, IsWidget a) => O.MethodInfo WidgetErrorBellMethodInfo a signature where
    overloadedMethod = widgetErrorBell

#endif

-- method Widget::event
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "widget"
--           , argType = TInterface Name { namespace = "Gtk" , name = "Widget" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #GtkWidget" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "event"
--           , argType = TInterface Name { namespace = "Gdk" , name = "Event" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #GdkEvent" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TBasicType TBoolean)
-- throws : False
-- Skip return : False

foreign import ccall "gtk_widget_event" gtk_widget_event :: 
    Ptr Widget ->                           -- widget : TInterface (Name {namespace = "Gtk", name = "Widget"})
    Ptr Gdk.Event.Event ->                  -- event : TInterface (Name {namespace = "Gdk", name = "Event"})
    IO CInt

-- | Rarely-used function. This function is used to emit
-- the event signals on a widget (those signals should never
-- be emitted without using this function to do so).
-- If you want to synthesize an event though, don’t use this function;
-- instead, use 'GI.Gtk.Functions.mainDoEvent' so the event will behave as if
-- it were in the event queue.
widgetEvent ::
    (B.CallStack.HasCallStack, MonadIO m, IsWidget a, Gdk.Event.IsEvent b) =>
    a
    -- ^ /@widget@/: a t'GI.Gtk.Objects.Widget.Widget'
    -> b
    -- ^ /@event@/: a @/GdkEvent/@
    -> m Bool
    -- ^ __Returns:__ return from the event signal emission ('P.True' if
    --               the event was handled)
widgetEvent :: a -> b -> m Bool
widgetEvent widget :: a
widget event :: b
event = WidgetPopupMenuCallback -> m Bool
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (WidgetPopupMenuCallback -> m Bool)
-> WidgetPopupMenuCallback -> m Bool
forall a b. (a -> b) -> a -> b
$ do
    Ptr Widget
widget' <- a -> IO (Ptr Widget)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
widget
    Ptr Event
event' <- b -> IO (Ptr Event)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
event
    CInt
result <- Ptr Widget -> Ptr Event -> IO CInt
gtk_widget_event Ptr Widget
widget' Ptr Event
event'
    let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= 0) CInt
result
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
widget
    b -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr b
event
    WidgetMnemonicActivateCallback
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'

#if defined(ENABLE_OVERLOADING)
data WidgetEventMethodInfo
instance (signature ~ (b -> m Bool), MonadIO m, IsWidget a, Gdk.Event.IsEvent b) => O.MethodInfo WidgetEventMethodInfo a signature where
    overloadedMethod = widgetEvent

#endif

-- method Widget::get_accessible
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "widget"
--           , argType = TInterface Name { namespace = "Gtk" , name = "Widget" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #GtkWidget" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TInterface Name { namespace = "Atk" , name = "Object" })
-- throws : False
-- Skip return : False

foreign import ccall "gtk_widget_get_accessible" gtk_widget_get_accessible :: 
    Ptr Widget ->                           -- widget : TInterface (Name {namespace = "Gtk", name = "Widget"})
    IO (Ptr Atk.Object.Object)

-- | Returns the accessible object that describes the widget to an
-- assistive technology.
-- 
-- If accessibility support is not available, this t'GI.Atk.Objects.Object.Object'
-- instance may be a no-op. Likewise, if no class-specific t'GI.Atk.Objects.Object.Object'
-- implementation is available for the widget instance in question,
-- it will inherit an t'GI.Atk.Objects.Object.Object' implementation from the first ancestor
-- class for which such an implementation is defined.
-- 
-- The documentation of the
-- <http://developer.gnome.org/atk/stable/ ATK>
-- library contains more information about accessible objects and their uses.
widgetGetAccessible ::
    (B.CallStack.HasCallStack, MonadIO m, IsWidget a) =>
    a
    -- ^ /@widget@/: a t'GI.Gtk.Objects.Widget.Widget'
    -> m Atk.Object.Object
    -- ^ __Returns:__ the t'GI.Atk.Objects.Object.Object' associated with /@widget@/
widgetGetAccessible :: a -> m Object
widgetGetAccessible widget :: a
widget = IO Object -> m Object
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Object -> m Object) -> IO Object -> m Object
forall a b. (a -> b) -> a -> b
$ do
    Ptr Widget
widget' <- a -> IO (Ptr Widget)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
widget
    Ptr Object
result <- Ptr Widget -> IO (Ptr Object)
gtk_widget_get_accessible Ptr Widget
widget'
    Text -> Ptr Object -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL "widgetGetAccessible" Ptr Object
result
    Object
result' <- ((ManagedPtr Object -> Object) -> Ptr Object -> IO Object
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr Object -> Object
Atk.Object.Object) Ptr Object
result
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
widget
    Object -> IO Object
forall (m :: * -> *) a. Monad m => a -> m a
return Object
result'

#if defined(ENABLE_OVERLOADING)
data WidgetGetAccessibleMethodInfo
instance (signature ~ (m Atk.Object.Object), MonadIO m, IsWidget a) => O.MethodInfo WidgetGetAccessibleMethodInfo a signature where
    overloadedMethod = widgetGetAccessible

#endif

-- method Widget::get_action_group
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "widget"
--           , argType = TInterface Name { namespace = "Gtk" , name = "Widget" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "A #GtkWidget" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "prefix"
--           , argType = TBasicType TUTF8
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "The \8220prefix\8221 of the action group."
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TInterface Name { namespace = "Gio" , name = "ActionGroup" })
-- throws : False
-- Skip return : False

foreign import ccall "gtk_widget_get_action_group" gtk_widget_get_action_group :: 
    Ptr Widget ->                           -- widget : TInterface (Name {namespace = "Gtk", name = "Widget"})
    CString ->                              -- prefix : TBasicType TUTF8
    IO (Ptr Gio.ActionGroup.ActionGroup)

-- | Retrieves the t'GI.Gio.Interfaces.ActionGroup.ActionGroup' that was registered using /@prefix@/. The resulting
-- t'GI.Gio.Interfaces.ActionGroup.ActionGroup' may have been registered to /@widget@/ or any t'GI.Gtk.Objects.Widget.Widget' in its
-- ancestry.
-- 
-- If no action group was found matching /@prefix@/, then 'P.Nothing' is returned.
widgetGetActionGroup ::
    (B.CallStack.HasCallStack, MonadIO m, IsWidget a) =>
    a
    -- ^ /@widget@/: A t'GI.Gtk.Objects.Widget.Widget'
    -> T.Text
    -- ^ /@prefix@/: The “prefix” of the action group.
    -> m (Maybe Gio.ActionGroup.ActionGroup)
    -- ^ __Returns:__ A t'GI.Gio.Interfaces.ActionGroup.ActionGroup' or 'P.Nothing'.
widgetGetActionGroup :: a -> Text -> m (Maybe ActionGroup)
widgetGetActionGroup widget :: a
widget prefix :: Text
prefix = IO (Maybe ActionGroup) -> m (Maybe ActionGroup)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Maybe ActionGroup) -> m (Maybe ActionGroup))
-> IO (Maybe ActionGroup) -> m (Maybe ActionGroup)
forall a b. (a -> b) -> a -> b
$ do
    Ptr Widget
widget' <- a -> IO (Ptr Widget)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
widget
    CString
prefix' <- Text -> IO CString
textToCString Text
prefix
    Ptr ActionGroup
result <- Ptr Widget -> CString -> IO (Ptr ActionGroup)
gtk_widget_get_action_group Ptr Widget
widget' CString
prefix'
    Maybe ActionGroup
maybeResult <- Ptr ActionGroup
-> (Ptr ActionGroup -> IO ActionGroup) -> IO (Maybe ActionGroup)
forall a b. Ptr a -> (Ptr a -> IO b) -> IO (Maybe b)
convertIfNonNull Ptr ActionGroup
result ((Ptr ActionGroup -> IO ActionGroup) -> IO (Maybe ActionGroup))
-> (Ptr ActionGroup -> IO ActionGroup) -> IO (Maybe ActionGroup)
forall a b. (a -> b) -> a -> b
$ \result' :: Ptr ActionGroup
result' -> do
        ActionGroup
result'' <- ((ManagedPtr ActionGroup -> ActionGroup)
-> Ptr ActionGroup -> IO ActionGroup
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr ActionGroup -> ActionGroup
Gio.ActionGroup.ActionGroup) Ptr ActionGroup
result'
        ActionGroup -> IO ActionGroup
forall (m :: * -> *) a. Monad m => a -> m a
return ActionGroup
result''
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
widget
    CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
prefix'
    Maybe ActionGroup -> IO (Maybe ActionGroup)
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe ActionGroup
maybeResult

#if defined(ENABLE_OVERLOADING)
data WidgetGetActionGroupMethodInfo
instance (signature ~ (T.Text -> m (Maybe Gio.ActionGroup.ActionGroup)), MonadIO m, IsWidget a) => O.MethodInfo WidgetGetActionGroupMethodInfo a signature where
    overloadedMethod = widgetGetActionGroup

#endif

-- method Widget::get_allocated_baseline
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "widget"
--           , argType = TInterface Name { namespace = "Gtk" , name = "Widget" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "the widget to query"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TBasicType TInt)
-- throws : False
-- Skip return : False

foreign import ccall "gtk_widget_get_allocated_baseline" gtk_widget_get_allocated_baseline :: 
    Ptr Widget ->                           -- widget : TInterface (Name {namespace = "Gtk", name = "Widget"})
    IO Int32

-- | Returns the baseline that has currently been allocated to /@widget@/.
-- This function is intended to be used when implementing handlers
-- for the t'GI.Gtk.Objects.Widget.Widget'::@/snapshot/@ function, and when allocating child
-- widgets in t'GI.Gtk.Objects.Widget.Widget'::@/size_allocate/@.
widgetGetAllocatedBaseline ::
    (B.CallStack.HasCallStack, MonadIO m, IsWidget a) =>
    a
    -- ^ /@widget@/: the widget to query
    -> m Int32
    -- ^ __Returns:__ the baseline of the /@widget@/, or -1 if none
widgetGetAllocatedBaseline :: a -> m Int32
widgetGetAllocatedBaseline widget :: a
widget = IO Int32 -> m Int32
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Int32 -> m Int32) -> IO Int32 -> m Int32
forall a b. (a -> b) -> a -> b
$ do
    Ptr Widget
widget' <- a -> IO (Ptr Widget)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
widget
    Int32
result <- Ptr Widget -> IO Int32
gtk_widget_get_allocated_baseline Ptr Widget
widget'
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
widget
    Int32 -> IO Int32
forall (m :: * -> *) a. Monad m => a -> m a
return Int32
result

#if defined(ENABLE_OVERLOADING)
data WidgetGetAllocatedBaselineMethodInfo
instance (signature ~ (m Int32), MonadIO m, IsWidget a) => O.MethodInfo WidgetGetAllocatedBaselineMethodInfo a signature where
    overloadedMethod = widgetGetAllocatedBaseline

#endif

-- method Widget::get_allocated_height
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "widget"
--           , argType = TInterface Name { namespace = "Gtk" , name = "Widget" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "the widget to query"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TBasicType TInt)
-- throws : False
-- Skip return : False

foreign import ccall "gtk_widget_get_allocated_height" gtk_widget_get_allocated_height :: 
    Ptr Widget ->                           -- widget : TInterface (Name {namespace = "Gtk", name = "Widget"})
    IO Int32

-- | Returns the height that has currently been allocated to /@widget@/.
widgetGetAllocatedHeight ::
    (B.CallStack.HasCallStack, MonadIO m, IsWidget a) =>
    a
    -- ^ /@widget@/: the widget to query
    -> m Int32
    -- ^ __Returns:__ the height of the /@widget@/
widgetGetAllocatedHeight :: a -> m Int32
widgetGetAllocatedHeight widget :: a
widget = IO Int32 -> m Int32
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Int32 -> m Int32) -> IO Int32 -> m Int32
forall a b. (a -> b) -> a -> b
$ do
    Ptr Widget
widget' <- a -> IO (Ptr Widget)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
widget
    Int32
result <- Ptr Widget -> IO Int32
gtk_widget_get_allocated_height Ptr Widget
widget'
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
widget
    Int32 -> IO Int32
forall (m :: * -> *) a. Monad m => a -> m a
return Int32
result

#if defined(ENABLE_OVERLOADING)
data WidgetGetAllocatedHeightMethodInfo
instance (signature ~ (m Int32), MonadIO m, IsWidget a) => O.MethodInfo WidgetGetAllocatedHeightMethodInfo a signature where
    overloadedMethod = widgetGetAllocatedHeight

#endif

-- method Widget::get_allocated_width
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "widget"
--           , argType = TInterface Name { namespace = "Gtk" , name = "Widget" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "the widget to query"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TBasicType TInt)
-- throws : False
-- Skip return : False

foreign import ccall "gtk_widget_get_allocated_width" gtk_widget_get_allocated_width :: 
    Ptr Widget ->                           -- widget : TInterface (Name {namespace = "Gtk", name = "Widget"})
    IO Int32

-- | Returns the width that has currently been allocated to /@widget@/.
widgetGetAllocatedWidth ::
    (B.CallStack.HasCallStack, MonadIO m, IsWidget a) =>
    a
    -- ^ /@widget@/: the widget to query
    -> m Int32
    -- ^ __Returns:__ the width of the /@widget@/
widgetGetAllocatedWidth :: a -> m Int32
widgetGetAllocatedWidth widget :: a
widget = IO Int32 -> m Int32
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Int32 -> m Int32) -> IO Int32 -> m Int32
forall a b. (a -> b) -> a -> b
$ do
    Ptr Widget
widget' <- a -> IO (Ptr Widget)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
widget
    Int32
result <- Ptr Widget -> IO Int32
gtk_widget_get_allocated_width Ptr Widget
widget'
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
widget
    Int32 -> IO Int32
forall (m :: * -> *) a. Monad m => a -> m a
return Int32
result

#if defined(ENABLE_OVERLOADING)
data WidgetGetAllocatedWidthMethodInfo
instance (signature ~ (m Int32), MonadIO m, IsWidget a) => O.MethodInfo WidgetGetAllocatedWidthMethodInfo a signature where
    overloadedMethod = widgetGetAllocatedWidth

#endif

-- method Widget::get_allocation
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "widget"
--           , argType = TInterface Name { namespace = "Gtk" , name = "Widget" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #GtkWidget" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "allocation"
--           , argType =
--               TInterface Name { namespace = "Gdk" , name = "Rectangle" }
--           , direction = DirectionOut
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a pointer to a #GtkAllocation to copy to"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = True
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "gtk_widget_get_allocation" gtk_widget_get_allocation :: 
    Ptr Widget ->                           -- widget : TInterface (Name {namespace = "Gtk", name = "Widget"})
    Ptr Gdk.Rectangle.Rectangle ->          -- allocation : TInterface (Name {namespace = "Gdk", name = "Rectangle"})
    IO ()

-- | Retrieves the widget’s allocation.
-- 
-- Note, when implementing a t'GI.Gtk.Objects.Container.Container': a widget’s allocation will
-- be its “adjusted” allocation, that is, the widget’s parent
-- container typically calls 'GI.Gtk.Objects.Widget.widgetSizeAllocate' with an
-- allocation, and that allocation is then adjusted (to handle margin
-- and alignment for example) before assignment to the widget.
-- 'GI.Gtk.Objects.Widget.widgetGetAllocation' returns the adjusted allocation that
-- was actually assigned to the widget. The adjusted allocation is
-- guaranteed to be completely contained within the
-- 'GI.Gtk.Objects.Widget.widgetSizeAllocate' allocation, however. So a t'GI.Gtk.Objects.Container.Container'
-- is guaranteed that its children stay inside the assigned bounds,
-- but not that they have exactly the bounds the container assigned.
widgetGetAllocation ::
    (B.CallStack.HasCallStack, MonadIO m, IsWidget a) =>
    a
    -- ^ /@widget@/: a t'GI.Gtk.Objects.Widget.Widget'
    -> m (Gdk.Rectangle.Rectangle)
widgetGetAllocation :: a -> m Rectangle
widgetGetAllocation widget :: a
widget = IO Rectangle -> m Rectangle
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Rectangle -> m Rectangle) -> IO Rectangle -> m Rectangle
forall a b. (a -> b) -> a -> b
$ do
    Ptr Widget
widget' <- a -> IO (Ptr Widget)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
widget
    Ptr Rectangle
allocation <- Int -> IO (Ptr Rectangle)
forall a. BoxedObject a => Int -> IO (Ptr a)
callocBoxedBytes 16 :: IO (Ptr Gdk.Rectangle.Rectangle)
    Ptr Widget -> Ptr Rectangle -> IO ()
gtk_widget_get_allocation Ptr Widget
widget' Ptr Rectangle
allocation
    Rectangle
allocation' <- ((ManagedPtr Rectangle -> Rectangle)
-> Ptr Rectangle -> IO Rectangle
forall a.
(HasCallStack, BoxedObject a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
wrapBoxed ManagedPtr Rectangle -> Rectangle
Gdk.Rectangle.Rectangle) Ptr Rectangle
allocation
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
widget
    Rectangle -> IO Rectangle
forall (m :: * -> *) a. Monad m => a -> m a
return Rectangle
allocation'

#if defined(ENABLE_OVERLOADING)
data WidgetGetAllocationMethodInfo
instance (signature ~ (m (Gdk.Rectangle.Rectangle)), MonadIO m, IsWidget a) => O.MethodInfo WidgetGetAllocationMethodInfo a signature where
    overloadedMethod = widgetGetAllocation

#endif

-- method Widget::get_ancestor
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "widget"
--           , argType = TInterface Name { namespace = "Gtk" , name = "Widget" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #GtkWidget" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "widget_type"
--           , argType = TBasicType TGType
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "ancestor type" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TInterface Name { namespace = "Gtk" , name = "Widget" })
-- throws : False
-- Skip return : False

foreign import ccall "gtk_widget_get_ancestor" gtk_widget_get_ancestor :: 
    Ptr Widget ->                           -- widget : TInterface (Name {namespace = "Gtk", name = "Widget"})
    CGType ->                               -- widget_type : TBasicType TGType
    IO (Ptr Widget)

-- | Gets the first ancestor of /@widget@/ with type /@widgetType@/. For example,
-- @gtk_widget_get_ancestor (widget, GTK_TYPE_BOX)@ gets
-- the first t'GI.Gtk.Objects.Box.Box' that’s an ancestor of /@widget@/. No reference will be
-- added to the returned widget; it should not be unreferenced. See note
-- about checking for a toplevel t'GI.Gtk.Objects.Window.Window' in the docs for
-- 'GI.Gtk.Objects.Widget.widgetGetToplevel'.
-- 
-- Note that unlike 'GI.Gtk.Objects.Widget.widgetIsAncestor', 'GI.Gtk.Objects.Widget.widgetGetAncestor'
-- considers /@widget@/ to be an ancestor of itself.
widgetGetAncestor ::
    (B.CallStack.HasCallStack, MonadIO m, IsWidget a) =>
    a
    -- ^ /@widget@/: a t'GI.Gtk.Objects.Widget.Widget'
    -> GType
    -- ^ /@widgetType@/: ancestor type
    -> m (Maybe Widget)
    -- ^ __Returns:__ the ancestor widget, or 'P.Nothing' if not found
widgetGetAncestor :: a -> GType -> m (Maybe Widget)
widgetGetAncestor widget :: a
widget widgetType :: GType
widgetType = IO (Maybe Widget) -> m (Maybe Widget)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Maybe Widget) -> m (Maybe Widget))
-> IO (Maybe Widget) -> m (Maybe Widget)
forall a b. (a -> b) -> a -> b
$ do
    Ptr Widget
widget' <- a -> IO (Ptr Widget)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
widget
    let widgetType' :: CGType
widgetType' = GType -> CGType
gtypeToCGType GType
widgetType
    Ptr Widget
result <- Ptr Widget -> CGType -> IO (Ptr Widget)
gtk_widget_get_ancestor Ptr Widget
widget' CGType
widgetType'
    Maybe Widget
maybeResult <- Ptr Widget -> (Ptr Widget -> IO Widget) -> IO (Maybe Widget)
forall a b. Ptr a -> (Ptr a -> IO b) -> IO (Maybe b)
convertIfNonNull Ptr Widget
result ((Ptr Widget -> IO Widget) -> IO (Maybe Widget))
-> (Ptr Widget -> IO Widget) -> IO (Maybe Widget)
forall a b. (a -> b) -> a -> b
$ \result' :: Ptr Widget
result' -> do
        Widget
result'' <- ((ManagedPtr Widget -> Widget) -> Ptr Widget -> IO Widget
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr Widget -> Widget
Widget) Ptr Widget
result'
        Widget -> IO Widget
forall (m :: * -> *) a. Monad m => a -> m a
return Widget
result''
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
widget
    Maybe Widget -> IO (Maybe Widget)
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe Widget
maybeResult

#if defined(ENABLE_OVERLOADING)
data WidgetGetAncestorMethodInfo
instance (signature ~ (GType -> m (Maybe Widget)), MonadIO m, IsWidget a) => O.MethodInfo WidgetGetAncestorMethodInfo a signature where
    overloadedMethod = widgetGetAncestor

#endif

-- method Widget::get_can_focus
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "widget"
--           , argType = TInterface Name { namespace = "Gtk" , name = "Widget" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #GtkWidget" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TBasicType TBoolean)
-- throws : False
-- Skip return : False

foreign import ccall "gtk_widget_get_can_focus" gtk_widget_get_can_focus :: 
    Ptr Widget ->                           -- widget : TInterface (Name {namespace = "Gtk", name = "Widget"})
    IO CInt

-- | Determines whether /@widget@/ can own the input focus. See
-- 'GI.Gtk.Objects.Widget.widgetSetCanFocus'.
widgetGetCanFocus ::
    (B.CallStack.HasCallStack, MonadIO m, IsWidget a) =>
    a
    -- ^ /@widget@/: a t'GI.Gtk.Objects.Widget.Widget'
    -> m Bool
    -- ^ __Returns:__ 'P.True' if /@widget@/ can own the input focus, 'P.False' otherwise
widgetGetCanFocus :: a -> m Bool
widgetGetCanFocus widget :: a
widget = WidgetPopupMenuCallback -> m Bool
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (WidgetPopupMenuCallback -> m Bool)
-> WidgetPopupMenuCallback -> m Bool
forall a b. (a -> b) -> a -> b
$ do
    Ptr Widget
widget' <- a -> IO (Ptr Widget)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
widget
    CInt
result <- Ptr Widget -> IO CInt
gtk_widget_get_can_focus Ptr Widget
widget'
    let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= 0) CInt
result
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
widget
    WidgetMnemonicActivateCallback
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'

#if defined(ENABLE_OVERLOADING)
data WidgetGetCanFocusMethodInfo
instance (signature ~ (m Bool), MonadIO m, IsWidget a) => O.MethodInfo WidgetGetCanFocusMethodInfo a signature where
    overloadedMethod = widgetGetCanFocus

#endif

-- method Widget::get_can_target
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "widget"
--           , argType = TInterface Name { namespace = "Gtk" , name = "Widget" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #GtkWidget" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TBasicType TBoolean)
-- throws : False
-- Skip return : False

foreign import ccall "gtk_widget_get_can_target" gtk_widget_get_can_target :: 
    Ptr Widget ->                           -- widget : TInterface (Name {namespace = "Gtk", name = "Widget"})
    IO CInt

-- | Queries whether /@widget@/ can be the target of pointer events.
widgetGetCanTarget ::
    (B.CallStack.HasCallStack, MonadIO m, IsWidget a) =>
    a
    -- ^ /@widget@/: a t'GI.Gtk.Objects.Widget.Widget'
    -> m Bool
    -- ^ __Returns:__ 'P.True' if /@widget@/ can receive pointer events
widgetGetCanTarget :: a -> m Bool
widgetGetCanTarget widget :: a
widget = WidgetPopupMenuCallback -> m Bool
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (WidgetPopupMenuCallback -> m Bool)
-> WidgetPopupMenuCallback -> m Bool
forall a b. (a -> b) -> a -> b
$ do
    Ptr Widget
widget' <- a -> IO (Ptr Widget)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
widget
    CInt
result <- Ptr Widget -> IO CInt
gtk_widget_get_can_target Ptr Widget
widget'
    let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= 0) CInt
result
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
widget
    WidgetMnemonicActivateCallback
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'

#if defined(ENABLE_OVERLOADING)
data WidgetGetCanTargetMethodInfo
instance (signature ~ (m Bool), MonadIO m, IsWidget a) => O.MethodInfo WidgetGetCanTargetMethodInfo a signature where
    overloadedMethod = widgetGetCanTarget

#endif

-- method Widget::get_child_visible
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "widget"
--           , argType = TInterface Name { namespace = "Gtk" , name = "Widget" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #GtkWidget" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TBasicType TBoolean)
-- throws : False
-- Skip return : False

foreign import ccall "gtk_widget_get_child_visible" gtk_widget_get_child_visible :: 
    Ptr Widget ->                           -- widget : TInterface (Name {namespace = "Gtk", name = "Widget"})
    IO CInt

-- | Gets the value set with 'GI.Gtk.Objects.Widget.widgetSetChildVisible'.
-- If you feel a need to use this function, your code probably
-- needs reorganization.
-- 
-- This function is only useful for container implementations and
-- never should be called by an application.
widgetGetChildVisible ::
    (B.CallStack.HasCallStack, MonadIO m, IsWidget a) =>
    a
    -- ^ /@widget@/: a t'GI.Gtk.Objects.Widget.Widget'
    -> m Bool
    -- ^ __Returns:__ 'P.True' if the widget is mapped with the parent.
widgetGetChildVisible :: a -> m Bool
widgetGetChildVisible widget :: a
widget = WidgetPopupMenuCallback -> m Bool
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (WidgetPopupMenuCallback -> m Bool)
-> WidgetPopupMenuCallback -> m Bool
forall a b. (a -> b) -> a -> b
$ do
    Ptr Widget
widget' <- a -> IO (Ptr Widget)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
widget
    CInt
result <- Ptr Widget -> IO CInt
gtk_widget_get_child_visible Ptr Widget
widget'
    let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= 0) CInt
result
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
widget
    WidgetMnemonicActivateCallback
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'

#if defined(ENABLE_OVERLOADING)
data WidgetGetChildVisibleMethodInfo
instance (signature ~ (m Bool), MonadIO m, IsWidget a) => O.MethodInfo WidgetGetChildVisibleMethodInfo a signature where
    overloadedMethod = widgetGetChildVisible

#endif

-- method Widget::get_clipboard
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "widget"
--           , argType = TInterface Name { namespace = "Gtk" , name = "Widget" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #GtkWidget" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TInterface Name { namespace = "Gdk" , name = "Clipboard" })
-- throws : False
-- Skip return : False

foreign import ccall "gtk_widget_get_clipboard" gtk_widget_get_clipboard :: 
    Ptr Widget ->                           -- widget : TInterface (Name {namespace = "Gtk", name = "Widget"})
    IO (Ptr Gdk.Clipboard.Clipboard)

-- | This is a utility function to get the clipboard object for the
-- t'GI.Gdk.Objects.Display.Display' that /@widget@/ is using.
-- 
-- Note that this function always works, even when /@widget@/ is not
-- realized yet.
widgetGetClipboard ::
    (B.CallStack.HasCallStack, MonadIO m, IsWidget a) =>
    a
    -- ^ /@widget@/: a t'GI.Gtk.Objects.Widget.Widget'
    -> m Gdk.Clipboard.Clipboard
    -- ^ __Returns:__ the appropriate clipboard object.
widgetGetClipboard :: a -> m Clipboard
widgetGetClipboard widget :: a
widget = IO Clipboard -> m Clipboard
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Clipboard -> m Clipboard) -> IO Clipboard -> m Clipboard
forall a b. (a -> b) -> a -> b
$ do
    Ptr Widget
widget' <- a -> IO (Ptr Widget)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
widget
    Ptr Clipboard
result <- Ptr Widget -> IO (Ptr Clipboard)
gtk_widget_get_clipboard Ptr Widget
widget'
    Text -> Ptr Clipboard -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL "widgetGetClipboard" Ptr Clipboard
result
    Clipboard
result' <- ((ManagedPtr Clipboard -> Clipboard)
-> Ptr Clipboard -> IO Clipboard
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr Clipboard -> Clipboard
Gdk.Clipboard.Clipboard) Ptr Clipboard
result
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
widget
    Clipboard -> IO Clipboard
forall (m :: * -> *) a. Monad m => a -> m a
return Clipboard
result'

#if defined(ENABLE_OVERLOADING)
data WidgetGetClipboardMethodInfo
instance (signature ~ (m Gdk.Clipboard.Clipboard), MonadIO m, IsWidget a) => O.MethodInfo WidgetGetClipboardMethodInfo a signature where
    overloadedMethod = widgetGetClipboard

#endif

-- method Widget::get_cursor
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "widget"
--           , argType = TInterface Name { namespace = "Gtk" , name = "Widget" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #GtkWidget" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TInterface Name { namespace = "Gdk" , name = "Cursor" })
-- throws : False
-- Skip return : False

foreign import ccall "gtk_widget_get_cursor" gtk_widget_get_cursor :: 
    Ptr Widget ->                           -- widget : TInterface (Name {namespace = "Gtk", name = "Widget"})
    IO (Ptr Gdk.Cursor.Cursor)

-- | Queries the cursor set via 'GI.Gtk.Objects.Widget.widgetSetCursor'. See that function for
-- details.
widgetGetCursor ::
    (B.CallStack.HasCallStack, MonadIO m, IsWidget a) =>
    a
    -- ^ /@widget@/: a t'GI.Gtk.Objects.Widget.Widget'
    -> m (Maybe Gdk.Cursor.Cursor)
    -- ^ __Returns:__ the cursor currently in use or 'P.Nothing'
    --     to use the default.
widgetGetCursor :: a -> m (Maybe Cursor)
widgetGetCursor widget :: a
widget = IO (Maybe Cursor) -> m (Maybe Cursor)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Maybe Cursor) -> m (Maybe Cursor))
-> IO (Maybe Cursor) -> m (Maybe Cursor)
forall a b. (a -> b) -> a -> b
$ do
    Ptr Widget
widget' <- a -> IO (Ptr Widget)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
widget
    Ptr Cursor
result <- Ptr Widget -> IO (Ptr Cursor)
gtk_widget_get_cursor Ptr Widget
widget'
    Maybe Cursor
maybeResult <- Ptr Cursor -> (Ptr Cursor -> IO Cursor) -> IO (Maybe Cursor)
forall a b. Ptr a -> (Ptr a -> IO b) -> IO (Maybe b)
convertIfNonNull Ptr Cursor
result ((Ptr Cursor -> IO Cursor) -> IO (Maybe Cursor))
-> (Ptr Cursor -> IO Cursor) -> IO (Maybe Cursor)
forall a b. (a -> b) -> a -> b
$ \result' :: Ptr Cursor
result' -> do
        Cursor
result'' <- ((ManagedPtr Cursor -> Cursor) -> Ptr Cursor -> IO Cursor
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr Cursor -> Cursor
Gdk.Cursor.Cursor) Ptr Cursor
result'
        Cursor -> IO Cursor
forall (m :: * -> *) a. Monad m => a -> m a
return Cursor
result''
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
widget
    Maybe Cursor -> IO (Maybe Cursor)
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe Cursor
maybeResult

#if defined(ENABLE_OVERLOADING)
data WidgetGetCursorMethodInfo
instance (signature ~ (m (Maybe Gdk.Cursor.Cursor)), MonadIO m, IsWidget a) => O.MethodInfo WidgetGetCursorMethodInfo a signature where
    overloadedMethod = widgetGetCursor

#endif

-- method Widget::get_direction
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "widget"
--           , argType = TInterface Name { namespace = "Gtk" , name = "Widget" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #GtkWidget" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just
--               (TInterface Name { namespace = "Gtk" , name = "TextDirection" })
-- throws : False
-- Skip return : False

foreign import ccall "gtk_widget_get_direction" gtk_widget_get_direction :: 
    Ptr Widget ->                           -- widget : TInterface (Name {namespace = "Gtk", name = "Widget"})
    IO CUInt

-- | Gets the reading direction for a particular widget. See
-- 'GI.Gtk.Objects.Widget.widgetSetDirection'.
widgetGetDirection ::
    (B.CallStack.HasCallStack, MonadIO m, IsWidget a) =>
    a
    -- ^ /@widget@/: a t'GI.Gtk.Objects.Widget.Widget'
    -> m Gtk.Enums.TextDirection
    -- ^ __Returns:__ the reading direction for the widget.
widgetGetDirection :: a -> m TextDirection
widgetGetDirection widget :: a
widget = IO TextDirection -> m TextDirection
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO TextDirection -> m TextDirection)
-> IO TextDirection -> m TextDirection
forall a b. (a -> b) -> a -> b
$ do
    Ptr Widget
widget' <- a -> IO (Ptr Widget)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
widget
    CUInt
result <- Ptr Widget -> IO CUInt
gtk_widget_get_direction Ptr Widget
widget'
    let result' :: TextDirection
result' = (Int -> TextDirection
forall a. Enum a => Int -> a
toEnum (Int -> TextDirection) -> (CUInt -> Int) -> CUInt -> TextDirection
forall b c a. (b -> c) -> (a -> b) -> a -> c
. CUInt -> Int
forall a b. (Integral a, Num b) => a -> b
fromIntegral) CUInt
result
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
widget
    TextDirection -> IO TextDirection
forall (m :: * -> *) a. Monad m => a -> m a
return TextDirection
result'

#if defined(ENABLE_OVERLOADING)
data WidgetGetDirectionMethodInfo
instance (signature ~ (m Gtk.Enums.TextDirection), MonadIO m, IsWidget a) => O.MethodInfo WidgetGetDirectionMethodInfo a signature where
    overloadedMethod = widgetGetDirection

#endif

-- method Widget::get_display
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "widget"
--           , argType = TInterface Name { namespace = "Gtk" , name = "Widget" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #GtkWidget" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TInterface Name { namespace = "Gdk" , name = "Display" })
-- throws : False
-- Skip return : False

foreign import ccall "gtk_widget_get_display" gtk_widget_get_display :: 
    Ptr Widget ->                           -- widget : TInterface (Name {namespace = "Gtk", name = "Widget"})
    IO (Ptr Gdk.Display.Display)

-- | Get the t'GI.Gdk.Objects.Display.Display' for the toplevel window associated with
-- this widget. This function can only be called after the widget
-- has been added to a widget hierarchy with a t'GI.Gtk.Objects.Window.Window' at the top.
-- 
-- In general, you should only create display specific
-- resources when a widget has been realized, and you should
-- free those resources when the widget is unrealized.
widgetGetDisplay ::
    (B.CallStack.HasCallStack, MonadIO m, IsWidget a) =>
    a
    -- ^ /@widget@/: a t'GI.Gtk.Objects.Widget.Widget'
    -> m Gdk.Display.Display
    -- ^ __Returns:__ the t'GI.Gdk.Objects.Display.Display' for the toplevel for this widget.
widgetGetDisplay :: a -> m Display
widgetGetDisplay widget :: a
widget = IO Display -> m Display
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Display -> m Display) -> IO Display -> m Display
forall a b. (a -> b) -> a -> b
$ do
    Ptr Widget
widget' <- a -> IO (Ptr Widget)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
widget
    Ptr Display
result <- Ptr Widget -> IO (Ptr Display)
gtk_widget_get_display Ptr Widget
widget'
    Text -> Ptr Display -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL "widgetGetDisplay" Ptr Display
result
    Display
result' <- ((ManagedPtr Display -> Display) -> Ptr Display -> IO Display
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr Display -> Display
Gdk.Display.Display) Ptr Display
result
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
widget
    Display -> IO Display
forall (m :: * -> *) a. Monad m => a -> m a
return Display
result'

#if defined(ENABLE_OVERLOADING)
data WidgetGetDisplayMethodInfo
instance (signature ~ (m Gdk.Display.Display), MonadIO m, IsWidget a) => O.MethodInfo WidgetGetDisplayMethodInfo a signature where
    overloadedMethod = widgetGetDisplay

#endif

-- method Widget::get_first_child
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "widget"
--           , argType = TInterface Name { namespace = "Gtk" , name = "Widget" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #GtkWidget" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TInterface Name { namespace = "Gtk" , name = "Widget" })
-- throws : False
-- Skip return : False

foreign import ccall "gtk_widget_get_first_child" gtk_widget_get_first_child :: 
    Ptr Widget ->                           -- widget : TInterface (Name {namespace = "Gtk", name = "Widget"})
    IO (Ptr Widget)

-- | /No description available in the introspection data./
widgetGetFirstChild ::
    (B.CallStack.HasCallStack, MonadIO m, IsWidget a) =>
    a
    -- ^ /@widget@/: a t'GI.Gtk.Objects.Widget.Widget'
    -> m (Maybe Widget)
    -- ^ __Returns:__ The widget\'s first child
widgetGetFirstChild :: a -> m (Maybe Widget)
widgetGetFirstChild widget :: a
widget = IO (Maybe Widget) -> m (Maybe Widget)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Maybe Widget) -> m (Maybe Widget))
-> IO (Maybe Widget) -> m (Maybe Widget)
forall a b. (a -> b) -> a -> b
$ do
    Ptr Widget
widget' <- a -> IO (Ptr Widget)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
widget
    Ptr Widget
result <- Ptr Widget -> IO (Ptr Widget)
gtk_widget_get_first_child Ptr Widget
widget'
    Maybe Widget
maybeResult <- Ptr Widget -> (Ptr Widget -> IO Widget) -> IO (Maybe Widget)
forall a b. Ptr a -> (Ptr a -> IO b) -> IO (Maybe b)
convertIfNonNull Ptr Widget
result ((Ptr Widget -> IO Widget) -> IO (Maybe Widget))
-> (Ptr Widget -> IO Widget) -> IO (Maybe Widget)
forall a b. (a -> b) -> a -> b
$ \result' :: Ptr Widget
result' -> do
        Widget
result'' <- ((ManagedPtr Widget -> Widget) -> Ptr Widget -> IO Widget
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr Widget -> Widget
Widget) Ptr Widget
result'
        Widget -> IO Widget
forall (m :: * -> *) a. Monad m => a -> m a
return Widget
result''
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
widget
    Maybe Widget -> IO (Maybe Widget)
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe Widget
maybeResult

#if defined(ENABLE_OVERLOADING)
data WidgetGetFirstChildMethodInfo
instance (signature ~ (m (Maybe Widget)), MonadIO m, IsWidget a) => O.MethodInfo WidgetGetFirstChildMethodInfo a signature where
    overloadedMethod = widgetGetFirstChild

#endif

-- method Widget::get_focus_child
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "widget"
--           , argType = TInterface Name { namespace = "Gtk" , name = "Widget" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #GtkWidget" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TInterface Name { namespace = "Gtk" , name = "Widget" })
-- throws : False
-- Skip return : False

foreign import ccall "gtk_widget_get_focus_child" gtk_widget_get_focus_child :: 
    Ptr Widget ->                           -- widget : TInterface (Name {namespace = "Gtk", name = "Widget"})
    IO (Ptr Widget)

-- | Returns the current focus child of /@widget@/.
widgetGetFocusChild ::
    (B.CallStack.HasCallStack, MonadIO m, IsWidget a) =>
    a
    -- ^ /@widget@/: a t'GI.Gtk.Objects.Widget.Widget'
    -> m (Maybe Widget)
    -- ^ __Returns:__ The current focus child of /@widget@/,
    --   or 'P.Nothing' in case the focus child is unset.
widgetGetFocusChild :: a -> m (Maybe Widget)
widgetGetFocusChild widget :: a
widget = IO (Maybe Widget) -> m (Maybe Widget)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Maybe Widget) -> m (Maybe Widget))
-> IO (Maybe Widget) -> m (Maybe Widget)
forall a b. (a -> b) -> a -> b
$ do
    Ptr Widget
widget' <- a -> IO (Ptr Widget)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
widget
    Ptr Widget
result <- Ptr Widget -> IO (Ptr Widget)
gtk_widget_get_focus_child Ptr Widget
widget'
    Maybe Widget
maybeResult <- Ptr Widget -> (Ptr Widget -> IO Widget) -> IO (Maybe Widget)
forall a b. Ptr a -> (Ptr a -> IO b) -> IO (Maybe b)
convertIfNonNull Ptr Widget
result ((Ptr Widget -> IO Widget) -> IO (Maybe Widget))
-> (Ptr Widget -> IO Widget) -> IO (Maybe Widget)
forall a b. (a -> b) -> a -> b
$ \result' :: Ptr Widget
result' -> do
        Widget
result'' <- ((ManagedPtr Widget -> Widget) -> Ptr Widget -> IO Widget
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr Widget -> Widget
Widget) Ptr Widget
result'
        Widget -> IO Widget
forall (m :: * -> *) a. Monad m => a -> m a
return Widget
result''
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
widget
    Maybe Widget -> IO (Maybe Widget)
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe Widget
maybeResult

#if defined(ENABLE_OVERLOADING)
data WidgetGetFocusChildMethodInfo
instance (signature ~ (m (Maybe Widget)), MonadIO m, IsWidget a) => O.MethodInfo WidgetGetFocusChildMethodInfo a signature where
    overloadedMethod = widgetGetFocusChild

#endif

-- method Widget::get_focus_on_click
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "widget"
--           , argType = TInterface Name { namespace = "Gtk" , name = "Widget" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #GtkWidget" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TBasicType TBoolean)
-- throws : False
-- Skip return : False

foreign import ccall "gtk_widget_get_focus_on_click" gtk_widget_get_focus_on_click :: 
    Ptr Widget ->                           -- widget : TInterface (Name {namespace = "Gtk", name = "Widget"})
    IO CInt

-- | Returns whether the widget should grab focus when it is clicked with the mouse.
-- See 'GI.Gtk.Objects.Widget.widgetSetFocusOnClick'.
widgetGetFocusOnClick ::
    (B.CallStack.HasCallStack, MonadIO m, IsWidget a) =>
    a
    -- ^ /@widget@/: a t'GI.Gtk.Objects.Widget.Widget'
    -> m Bool
    -- ^ __Returns:__ 'P.True' if the widget should grab focus when it is clicked with
    --               the mouse.
widgetGetFocusOnClick :: a -> m Bool
widgetGetFocusOnClick widget :: a
widget = WidgetPopupMenuCallback -> m Bool
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (WidgetPopupMenuCallback -> m Bool)
-> WidgetPopupMenuCallback -> m Bool
forall a b. (a -> b) -> a -> b
$ do
    Ptr Widget
widget' <- a -> IO (Ptr Widget)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
widget
    CInt
result <- Ptr Widget -> IO CInt
gtk_widget_get_focus_on_click Ptr Widget
widget'
    let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= 0) CInt
result
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
widget
    WidgetMnemonicActivateCallback
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'

#if defined(ENABLE_OVERLOADING)
data WidgetGetFocusOnClickMethodInfo
instance (signature ~ (m Bool), MonadIO m, IsWidget a) => O.MethodInfo WidgetGetFocusOnClickMethodInfo a signature where
    overloadedMethod = widgetGetFocusOnClick

#endif

-- method Widget::get_font_map
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "widget"
--           , argType = TInterface Name { namespace = "Gtk" , name = "Widget" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #GtkWidget" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TInterface Name { namespace = "Pango" , name = "FontMap" })
-- throws : False
-- Skip return : False

foreign import ccall "gtk_widget_get_font_map" gtk_widget_get_font_map :: 
    Ptr Widget ->                           -- widget : TInterface (Name {namespace = "Gtk", name = "Widget"})
    IO (Ptr Pango.FontMap.FontMap)

-- | Gets the font map that has been set with 'GI.Gtk.Objects.Widget.widgetSetFontMap'.
widgetGetFontMap ::
    (B.CallStack.HasCallStack, MonadIO m, IsWidget a) =>
    a
    -- ^ /@widget@/: a t'GI.Gtk.Objects.Widget.Widget'
    -> m (Maybe Pango.FontMap.FontMap)
    -- ^ __Returns:__ A t'GI.Pango.Objects.FontMap.FontMap', or 'P.Nothing'
widgetGetFontMap :: a -> m (Maybe FontMap)
widgetGetFontMap widget :: a
widget = IO (Maybe FontMap) -> m (Maybe FontMap)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Maybe FontMap) -> m (Maybe FontMap))
-> IO (Maybe FontMap) -> m (Maybe FontMap)
forall a b. (a -> b) -> a -> b
$ do
    Ptr Widget
widget' <- a -> IO (Ptr Widget)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
widget
    Ptr FontMap
result <- Ptr Widget -> IO (Ptr FontMap)
gtk_widget_get_font_map Ptr Widget
widget'
    Maybe FontMap
maybeResult <- Ptr FontMap -> (Ptr FontMap -> IO FontMap) -> IO (Maybe FontMap)
forall a b. Ptr a -> (Ptr a -> IO b) -> IO (Maybe b)
convertIfNonNull Ptr FontMap
result ((Ptr FontMap -> IO FontMap) -> IO (Maybe FontMap))
-> (Ptr FontMap -> IO FontMap) -> IO (Maybe FontMap)
forall a b. (a -> b) -> a -> b
$ \result' :: Ptr FontMap
result' -> do
        FontMap
result'' <- ((ManagedPtr FontMap -> FontMap) -> Ptr FontMap -> IO FontMap
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr FontMap -> FontMap
Pango.FontMap.FontMap) Ptr FontMap
result'
        FontMap -> IO FontMap
forall (m :: * -> *) a. Monad m => a -> m a
return FontMap
result''
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
widget
    Maybe FontMap -> IO (Maybe FontMap)
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe FontMap
maybeResult

#if defined(ENABLE_OVERLOADING)
data WidgetGetFontMapMethodInfo
instance (signature ~ (m (Maybe Pango.FontMap.FontMap)), MonadIO m, IsWidget a) => O.MethodInfo WidgetGetFontMapMethodInfo a signature where
    overloadedMethod = widgetGetFontMap

#endif

-- method Widget::get_font_options
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "widget"
--           , argType = TInterface Name { namespace = "Gtk" , name = "Widget" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #GtkWidget" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just
--               (TInterface Name { namespace = "cairo" , name = "FontOptions" })
-- throws : False
-- Skip return : False

foreign import ccall "gtk_widget_get_font_options" gtk_widget_get_font_options :: 
    Ptr Widget ->                           -- widget : TInterface (Name {namespace = "Gtk", name = "Widget"})
    IO (Ptr Cairo.FontOptions.FontOptions)

-- | Returns the t'GI.Cairo.Structs.FontOptions.FontOptions' used for Pango rendering. When not set,
-- the defaults font options for the t'GI.Gdk.Objects.Display.Display' will be used.
widgetGetFontOptions ::
    (B.CallStack.HasCallStack, MonadIO m, IsWidget a) =>
    a
    -- ^ /@widget@/: a t'GI.Gtk.Objects.Widget.Widget'
    -> m (Maybe Cairo.FontOptions.FontOptions)
    -- ^ __Returns:__ the t'GI.Cairo.Structs.FontOptions.FontOptions' or 'P.Nothing' if not set
widgetGetFontOptions :: a -> m (Maybe FontOptions)
widgetGetFontOptions widget :: a
widget = IO (Maybe FontOptions) -> m (Maybe FontOptions)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Maybe FontOptions) -> m (Maybe FontOptions))
-> IO (Maybe FontOptions) -> m (Maybe FontOptions)
forall a b. (a -> b) -> a -> b
$ do
    Ptr Widget
widget' <- a -> IO (Ptr Widget)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
widget
    Ptr FontOptions
result <- Ptr Widget -> IO (Ptr FontOptions)
gtk_widget_get_font_options Ptr Widget
widget'
    Maybe FontOptions
maybeResult <- Ptr FontOptions
-> (Ptr FontOptions -> IO FontOptions) -> IO (Maybe FontOptions)
forall a b. Ptr a -> (Ptr a -> IO b) -> IO (Maybe b)
convertIfNonNull Ptr FontOptions
result ((Ptr FontOptions -> IO FontOptions) -> IO (Maybe FontOptions))
-> (Ptr FontOptions -> IO FontOptions) -> IO (Maybe FontOptions)
forall a b. (a -> b) -> a -> b
$ \result' :: Ptr FontOptions
result' -> do
        FontOptions
result'' <- ((ManagedPtr FontOptions -> FontOptions)
-> Ptr FontOptions -> IO FontOptions
forall a.
(HasCallStack, BoxedObject a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
newBoxed ManagedPtr FontOptions -> FontOptions
Cairo.FontOptions.FontOptions) Ptr FontOptions
result'
        FontOptions -> IO FontOptions
forall (m :: * -> *) a. Monad m => a -> m a
return FontOptions
result''
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
widget
    Maybe FontOptions -> IO (Maybe FontOptions)
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe FontOptions
maybeResult

#if defined(ENABLE_OVERLOADING)
data WidgetGetFontOptionsMethodInfo
instance (signature ~ (m (Maybe Cairo.FontOptions.FontOptions)), MonadIO m, IsWidget a) => O.MethodInfo WidgetGetFontOptionsMethodInfo a signature where
    overloadedMethod = widgetGetFontOptions

#endif

-- method Widget::get_frame_clock
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "widget"
--           , argType = TInterface Name { namespace = "Gtk" , name = "Widget" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #GtkWidget" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TInterface Name { namespace = "Gdk" , name = "FrameClock" })
-- throws : False
-- Skip return : False

foreign import ccall "gtk_widget_get_frame_clock" gtk_widget_get_frame_clock :: 
    Ptr Widget ->                           -- widget : TInterface (Name {namespace = "Gtk", name = "Widget"})
    IO (Ptr Gdk.FrameClock.FrameClock)

-- | Obtains the frame clock for a widget. The frame clock is a global
-- “ticker” that can be used to drive animations and repaints.  The
-- most common reason to get the frame clock is to call
-- 'GI.Gdk.Objects.FrameClock.frameClockGetFrameTime', in order to get a time to use for
-- animating. For example you might record the start of the animation
-- with an initial value from 'GI.Gdk.Objects.FrameClock.frameClockGetFrameTime', and
-- then update the animation by calling
-- 'GI.Gdk.Objects.FrameClock.frameClockGetFrameTime' again during each repaint.
-- 
-- 'GI.Gdk.Objects.FrameClock.frameClockRequestPhase' will result in a new frame on the
-- clock, but won’t necessarily repaint any widgets. To repaint a
-- widget, you have to use 'GI.Gtk.Objects.Widget.widgetQueueDraw' which invalidates
-- the widget (thus scheduling it to receive a draw on the next
-- frame). 'GI.Gtk.Objects.Widget.widgetQueueDraw' will also end up requesting a frame
-- on the appropriate frame clock.
-- 
-- A widget’s frame clock will not change while the widget is
-- mapped. Reparenting a widget (which implies a temporary unmap) can
-- change the widget’s frame clock.
-- 
-- Unrealized widgets do not have a frame clock.
widgetGetFrameClock ::
    (B.CallStack.HasCallStack, MonadIO m, IsWidget a) =>
    a
    -- ^ /@widget@/: a t'GI.Gtk.Objects.Widget.Widget'
    -> m (Maybe Gdk.FrameClock.FrameClock)
    -- ^ __Returns:__ a t'GI.Gdk.Objects.FrameClock.FrameClock',
    -- or 'P.Nothing' if widget is unrealized
widgetGetFrameClock :: a -> m (Maybe FrameClock)
widgetGetFrameClock widget :: a
widget = IO (Maybe FrameClock) -> m (Maybe FrameClock)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Maybe FrameClock) -> m (Maybe FrameClock))
-> IO (Maybe FrameClock) -> m (Maybe FrameClock)
forall a b. (a -> b) -> a -> b
$ do
    Ptr Widget
widget' <- a -> IO (Ptr Widget)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
widget
    Ptr FrameClock
result <- Ptr Widget -> IO (Ptr FrameClock)
gtk_widget_get_frame_clock Ptr Widget
widget'
    Maybe FrameClock
maybeResult <- Ptr FrameClock
-> (Ptr FrameClock -> IO FrameClock) -> IO (Maybe FrameClock)
forall a b. Ptr a -> (Ptr a -> IO b) -> IO (Maybe b)
convertIfNonNull Ptr FrameClock
result ((Ptr FrameClock -> IO FrameClock) -> IO (Maybe FrameClock))
-> (Ptr FrameClock -> IO FrameClock) -> IO (Maybe FrameClock)
forall a b. (a -> b) -> a -> b
$ \result' :: Ptr FrameClock
result' -> do
        FrameClock
result'' <- ((ManagedPtr FrameClock -> FrameClock)
-> Ptr FrameClock -> IO FrameClock
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr FrameClock -> FrameClock
Gdk.FrameClock.FrameClock) Ptr FrameClock
result'
        FrameClock -> IO FrameClock
forall (m :: * -> *) a. Monad m => a -> m a
return FrameClock
result''
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
widget
    Maybe FrameClock -> IO (Maybe FrameClock)
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe FrameClock
maybeResult

#if defined(ENABLE_OVERLOADING)
data WidgetGetFrameClockMethodInfo
instance (signature ~ (m (Maybe Gdk.FrameClock.FrameClock)), MonadIO m, IsWidget a) => O.MethodInfo WidgetGetFrameClockMethodInfo a signature where
    overloadedMethod = widgetGetFrameClock

#endif

-- method Widget::get_halign
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "widget"
--           , argType = TInterface Name { namespace = "Gtk" , name = "Widget" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #GtkWidget" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TInterface Name { namespace = "Gtk" , name = "Align" })
-- throws : False
-- Skip return : False

foreign import ccall "gtk_widget_get_halign" gtk_widget_get_halign :: 
    Ptr Widget ->                           -- widget : TInterface (Name {namespace = "Gtk", name = "Widget"})
    IO CUInt

-- | Gets the value of the t'GI.Gtk.Objects.Widget.Widget':@/halign/@ property.
-- 
-- For backwards compatibility reasons this method will never return
-- 'GI.Gtk.Enums.AlignBaseline', but instead it will convert it to
-- 'GI.Gtk.Enums.AlignFill'. Baselines are not supported for horizontal
-- alignment.
widgetGetHalign ::
    (B.CallStack.HasCallStack, MonadIO m, IsWidget a) =>
    a
    -- ^ /@widget@/: a t'GI.Gtk.Objects.Widget.Widget'
    -> m Gtk.Enums.Align
    -- ^ __Returns:__ the horizontal alignment of /@widget@/
widgetGetHalign :: a -> m Align
widgetGetHalign widget :: a
widget = IO Align -> m Align
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Align -> m Align) -> IO Align -> m Align
forall a b. (a -> b) -> a -> b
$ do
    Ptr Widget
widget' <- a -> IO (Ptr Widget)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
widget
    CUInt
result <- Ptr Widget -> IO CUInt
gtk_widget_get_halign Ptr Widget
widget'
    let result' :: Align
result' = (Int -> Align
forall a. Enum a => Int -> a
toEnum (Int -> Align) -> (CUInt -> Int) -> CUInt -> Align
forall b c a. (b -> c) -> (a -> b) -> a -> c
. CUInt -> Int
forall a b. (Integral a, Num b) => a -> b
fromIntegral) CUInt
result
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
widget
    Align -> IO Align
forall (m :: * -> *) a. Monad m => a -> m a
return Align
result'

#if defined(ENABLE_OVERLOADING)
data WidgetGetHalignMethodInfo
instance (signature ~ (m Gtk.Enums.Align), MonadIO m, IsWidget a) => O.MethodInfo WidgetGetHalignMethodInfo a signature where
    overloadedMethod = widgetGetHalign

#endif

-- method Widget::get_has_surface
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "widget"
--           , argType = TInterface Name { namespace = "Gtk" , name = "Widget" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #GtkWidget" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TBasicType TBoolean)
-- throws : False
-- Skip return : False

foreign import ccall "gtk_widget_get_has_surface" gtk_widget_get_has_surface :: 
    Ptr Widget ->                           -- widget : TInterface (Name {namespace = "Gtk", name = "Widget"})
    IO CInt

-- | Determines whether /@widget@/ has a t'GI.Gdk.Objects.Surface.Surface' of its own. See
-- 'GI.Gtk.Objects.Widget.widgetSetHasSurface'.
widgetGetHasSurface ::
    (B.CallStack.HasCallStack, MonadIO m, IsWidget a) =>
    a
    -- ^ /@widget@/: a t'GI.Gtk.Objects.Widget.Widget'
    -> m Bool
    -- ^ __Returns:__ 'P.True' if /@widget@/ has a surface, 'P.False' otherwise
widgetGetHasSurface :: a -> m Bool
widgetGetHasSurface widget :: a
widget = WidgetPopupMenuCallback -> m Bool
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (WidgetPopupMenuCallback -> m Bool)
-> WidgetPopupMenuCallback -> m Bool
forall a b. (a -> b) -> a -> b
$ do
    Ptr Widget
widget' <- a -> IO (Ptr Widget)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
widget
    CInt
result <- Ptr Widget -> IO CInt
gtk_widget_get_has_surface Ptr Widget
widget'
    let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= 0) CInt
result
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
widget
    WidgetMnemonicActivateCallback
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'

#if defined(ENABLE_OVERLOADING)
data WidgetGetHasSurfaceMethodInfo
instance (signature ~ (m Bool), MonadIO m, IsWidget a) => O.MethodInfo WidgetGetHasSurfaceMethodInfo a signature where
    overloadedMethod = widgetGetHasSurface

#endif

-- method Widget::get_has_tooltip
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "widget"
--           , argType = TInterface Name { namespace = "Gtk" , name = "Widget" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #GtkWidget" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TBasicType TBoolean)
-- throws : False
-- Skip return : False

foreign import ccall "gtk_widget_get_has_tooltip" gtk_widget_get_has_tooltip :: 
    Ptr Widget ->                           -- widget : TInterface (Name {namespace = "Gtk", name = "Widget"})
    IO CInt

-- | Returns the current value of the has-tooltip property.  See
-- t'GI.Gtk.Objects.Widget.Widget':@/has-tooltip/@ for more information.
widgetGetHasTooltip ::
    (B.CallStack.HasCallStack, MonadIO m, IsWidget a) =>
    a
    -- ^ /@widget@/: a t'GI.Gtk.Objects.Widget.Widget'
    -> m Bool
    -- ^ __Returns:__ current value of has-tooltip on /@widget@/.
widgetGetHasTooltip :: a -> m Bool
widgetGetHasTooltip widget :: a
widget = WidgetPopupMenuCallback -> m Bool
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (WidgetPopupMenuCallback -> m Bool)
-> WidgetPopupMenuCallback -> m Bool
forall a b. (a -> b) -> a -> b
$ do
    Ptr Widget
widget' <- a -> IO (Ptr Widget)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
widget
    CInt
result <- Ptr Widget -> IO CInt
gtk_widget_get_has_tooltip Ptr Widget
widget'
    let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= 0) CInt
result
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
widget
    WidgetMnemonicActivateCallback
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'

#if defined(ENABLE_OVERLOADING)
data WidgetGetHasTooltipMethodInfo
instance (signature ~ (m Bool), MonadIO m, IsWidget a) => O.MethodInfo WidgetGetHasTooltipMethodInfo a signature where
    overloadedMethod = widgetGetHasTooltip

#endif

-- method Widget::get_height
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "widget"
--           , argType = TInterface Name { namespace = "Gtk" , name = "Widget" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #GtkWidget" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TBasicType TInt)
-- throws : False
-- Skip return : False

foreign import ccall "gtk_widget_get_height" gtk_widget_get_height :: 
    Ptr Widget ->                           -- widget : TInterface (Name {namespace = "Gtk", name = "Widget"})
    IO Int32

-- | Returns the content height of the widget, as passed to its size-allocate implementation.
-- This is the size you should be using in GtkWidgetClass.@/snapshot()/@. For pointer
-- events, see 'GI.Gtk.Objects.Widget.widgetContains'.
widgetGetHeight ::
    (B.CallStack.HasCallStack, MonadIO m, IsWidget a) =>
    a
    -- ^ /@widget@/: a t'GI.Gtk.Objects.Widget.Widget'
    -> m Int32
    -- ^ __Returns:__ The height of /@widget@/
widgetGetHeight :: a -> m Int32
widgetGetHeight widget :: a
widget = IO Int32 -> m Int32
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Int32 -> m Int32) -> IO Int32 -> m Int32
forall a b. (a -> b) -> a -> b
$ do
    Ptr Widget
widget' <- a -> IO (Ptr Widget)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
widget
    Int32
result <- Ptr Widget -> IO Int32
gtk_widget_get_height Ptr Widget
widget'
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
widget
    Int32 -> IO Int32
forall (m :: * -> *) a. Monad m => a -> m a
return Int32
result

#if defined(ENABLE_OVERLOADING)
data WidgetGetHeightMethodInfo
instance (signature ~ (m Int32), MonadIO m, IsWidget a) => O.MethodInfo WidgetGetHeightMethodInfo a signature where
    overloadedMethod = widgetGetHeight

#endif

-- method Widget::get_hexpand
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "widget"
--           , argType = TInterface Name { namespace = "Gtk" , name = "Widget" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "the widget" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TBasicType TBoolean)
-- throws : False
-- Skip return : False

foreign import ccall "gtk_widget_get_hexpand" gtk_widget_get_hexpand :: 
    Ptr Widget ->                           -- widget : TInterface (Name {namespace = "Gtk", name = "Widget"})
    IO CInt

-- | Gets whether the widget would like any available extra horizontal
-- space. When a user resizes a t'GI.Gtk.Objects.Window.Window', widgets with expand=TRUE
-- generally receive the extra space. For example, a list or
-- scrollable area or document in your window would often be set to
-- expand.
-- 
-- Containers should use 'GI.Gtk.Objects.Widget.widgetComputeExpand' rather than
-- this function, to see whether a widget, or any of its children,
-- has the expand flag set. If any child of a widget wants to
-- expand, the parent may ask to expand also.
-- 
-- This function only looks at the widget’s own hexpand flag, rather
-- than computing whether the entire widget tree rooted at this widget
-- wants to expand.
widgetGetHexpand ::
    (B.CallStack.HasCallStack, MonadIO m, IsWidget a) =>
    a
    -- ^ /@widget@/: the widget
    -> m Bool
    -- ^ __Returns:__ whether hexpand flag is set
widgetGetHexpand :: a -> m Bool
widgetGetHexpand widget :: a
widget = WidgetPopupMenuCallback -> m Bool
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (WidgetPopupMenuCallback -> m Bool)
-> WidgetPopupMenuCallback -> m Bool
forall a b. (a -> b) -> a -> b
$ do
    Ptr Widget
widget' <- a -> IO (Ptr Widget)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
widget
    CInt
result <- Ptr Widget -> IO CInt
gtk_widget_get_hexpand Ptr Widget
widget'
    let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= 0) CInt
result
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
widget
    WidgetMnemonicActivateCallback
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'

#if defined(ENABLE_OVERLOADING)
data WidgetGetHexpandMethodInfo
instance (signature ~ (m Bool), MonadIO m, IsWidget a) => O.MethodInfo WidgetGetHexpandMethodInfo a signature where
    overloadedMethod = widgetGetHexpand

#endif

-- method Widget::get_hexpand_set
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "widget"
--           , argType = TInterface Name { namespace = "Gtk" , name = "Widget" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "the widget" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TBasicType TBoolean)
-- throws : False
-- Skip return : False

foreign import ccall "gtk_widget_get_hexpand_set" gtk_widget_get_hexpand_set :: 
    Ptr Widget ->                           -- widget : TInterface (Name {namespace = "Gtk", name = "Widget"})
    IO CInt

-- | Gets whether 'GI.Gtk.Objects.Widget.widgetSetHexpand' has been used to
-- explicitly set the expand flag on this widget.
-- 
-- If hexpand is set, then it overrides any computed
-- expand value based on child widgets. If hexpand is not
-- set, then the expand value depends on whether any
-- children of the widget would like to expand.
-- 
-- There are few reasons to use this function, but it’s here
-- for completeness and consistency.
widgetGetHexpandSet ::
    (B.CallStack.HasCallStack, MonadIO m, IsWidget a) =>
    a
    -- ^ /@widget@/: the widget
    -> m Bool
    -- ^ __Returns:__ whether hexpand has been explicitly set
widgetGetHexpandSet :: a -> m Bool
widgetGetHexpandSet widget :: a
widget = WidgetPopupMenuCallback -> m Bool
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (WidgetPopupMenuCallback -> m Bool)
-> WidgetPopupMenuCallback -> m Bool
forall a b. (a -> b) -> a -> b
$ do
    Ptr Widget
widget' <- a -> IO (Ptr Widget)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
widget
    CInt
result <- Ptr Widget -> IO CInt
gtk_widget_get_hexpand_set Ptr Widget
widget'
    let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= 0) CInt
result
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
widget
    WidgetMnemonicActivateCallback
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'

#if defined(ENABLE_OVERLOADING)
data WidgetGetHexpandSetMethodInfo
instance (signature ~ (m Bool), MonadIO m, IsWidget a) => O.MethodInfo WidgetGetHexpandSetMethodInfo a signature where
    overloadedMethod = widgetGetHexpandSet

#endif

-- method Widget::get_last_child
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "widget"
--           , argType = TInterface Name { namespace = "Gtk" , name = "Widget" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #GtkWidget" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TInterface Name { namespace = "Gtk" , name = "Widget" })
-- throws : False
-- Skip return : False

foreign import ccall "gtk_widget_get_last_child" gtk_widget_get_last_child :: 
    Ptr Widget ->                           -- widget : TInterface (Name {namespace = "Gtk", name = "Widget"})
    IO (Ptr Widget)

-- | /No description available in the introspection data./
widgetGetLastChild ::
    (B.CallStack.HasCallStack, MonadIO m, IsWidget a) =>
    a
    -- ^ /@widget@/: a t'GI.Gtk.Objects.Widget.Widget'
    -> m (Maybe Widget)
    -- ^ __Returns:__ The widget\'s last child
widgetGetLastChild :: a -> m (Maybe Widget)
widgetGetLastChild widget :: a
widget = IO (Maybe Widget) -> m (Maybe Widget)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Maybe Widget) -> m (Maybe Widget))
-> IO (Maybe Widget) -> m (Maybe Widget)
forall a b. (a -> b) -> a -> b
$ do
    Ptr Widget
widget' <- a -> IO (Ptr Widget)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
widget
    Ptr Widget
result <- Ptr Widget -> IO (Ptr Widget)
gtk_widget_get_last_child Ptr Widget
widget'
    Maybe Widget
maybeResult <- Ptr Widget -> (Ptr Widget -> IO Widget) -> IO (Maybe Widget)
forall a b. Ptr a -> (Ptr a -> IO b) -> IO (Maybe b)
convertIfNonNull Ptr Widget
result ((Ptr Widget -> IO Widget) -> IO (Maybe Widget))
-> (Ptr Widget -> IO Widget) -> IO (Maybe Widget)
forall a b. (a -> b) -> a -> b
$ \result' :: Ptr Widget
result' -> do
        Widget
result'' <- ((ManagedPtr Widget -> Widget) -> Ptr Widget -> IO Widget
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr Widget -> Widget
Widget) Ptr Widget
result'
        Widget -> IO Widget
forall (m :: * -> *) a. Monad m => a -> m a
return Widget
result''
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
widget
    Maybe Widget -> IO (Maybe Widget)
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe Widget
maybeResult

#if defined(ENABLE_OVERLOADING)
data WidgetGetLastChildMethodInfo
instance (signature ~ (m (Maybe Widget)), MonadIO m, IsWidget a) => O.MethodInfo WidgetGetLastChildMethodInfo a signature where
    overloadedMethod = widgetGetLastChild

#endif

-- method Widget::get_layout_manager
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "widget"
--           , argType = TInterface Name { namespace = "Gtk" , name = "Widget" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #GtkWidget" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just
--               (TInterface Name { namespace = "Gtk" , name = "LayoutManager" })
-- throws : False
-- Skip return : False

foreign import ccall "gtk_widget_get_layout_manager" gtk_widget_get_layout_manager :: 
    Ptr Widget ->                           -- widget : TInterface (Name {namespace = "Gtk", name = "Widget"})
    IO (Ptr Gtk.LayoutManager.LayoutManager)

-- | Retrieves the layout manager set using 'GI.Gtk.Objects.Widget.widgetSetLayoutManager'.
widgetGetLayoutManager ::
    (B.CallStack.HasCallStack, MonadIO m, IsWidget a) =>
    a
    -- ^ /@widget@/: a t'GI.Gtk.Objects.Widget.Widget'
    -> m (Maybe Gtk.LayoutManager.LayoutManager)
    -- ^ __Returns:__ a t'GI.Gtk.Objects.LayoutManager.LayoutManager'
widgetGetLayoutManager :: a -> m (Maybe LayoutManager)
widgetGetLayoutManager widget :: a
widget = IO (Maybe LayoutManager) -> m (Maybe LayoutManager)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Maybe LayoutManager) -> m (Maybe LayoutManager))
-> IO (Maybe LayoutManager) -> m (Maybe LayoutManager)
forall a b. (a -> b) -> a -> b
$ do
    Ptr Widget
widget' <- a -> IO (Ptr Widget)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
widget
    Ptr LayoutManager
result <- Ptr Widget -> IO (Ptr LayoutManager)
gtk_widget_get_layout_manager Ptr Widget
widget'
    Maybe LayoutManager
maybeResult <- Ptr LayoutManager
-> (Ptr LayoutManager -> IO LayoutManager)
-> IO (Maybe LayoutManager)
forall a b. Ptr a -> (Ptr a -> IO b) -> IO (Maybe b)
convertIfNonNull Ptr LayoutManager
result ((Ptr LayoutManager -> IO LayoutManager)
 -> IO (Maybe LayoutManager))
-> (Ptr LayoutManager -> IO LayoutManager)
-> IO (Maybe LayoutManager)
forall a b. (a -> b) -> a -> b
$ \result' :: Ptr LayoutManager
result' -> do
        LayoutManager
result'' <- ((ManagedPtr LayoutManager -> LayoutManager)
-> Ptr LayoutManager -> IO LayoutManager
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr LayoutManager -> LayoutManager
Gtk.LayoutManager.LayoutManager) Ptr LayoutManager
result'
        LayoutManager -> IO LayoutManager
forall (m :: * -> *) a. Monad m => a -> m a
return LayoutManager
result''
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
widget
    Maybe LayoutManager -> IO (Maybe LayoutManager)
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe LayoutManager
maybeResult

#if defined(ENABLE_OVERLOADING)
data WidgetGetLayoutManagerMethodInfo
instance (signature ~ (m (Maybe Gtk.LayoutManager.LayoutManager)), MonadIO m, IsWidget a) => O.MethodInfo WidgetGetLayoutManagerMethodInfo a signature where
    overloadedMethod = widgetGetLayoutManager

#endif

-- method Widget::get_mapped
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "widget"
--           , argType = TInterface Name { namespace = "Gtk" , name = "Widget" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #GtkWidget" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TBasicType TBoolean)
-- throws : False
-- Skip return : False

foreign import ccall "gtk_widget_get_mapped" gtk_widget_get_mapped :: 
    Ptr Widget ->                           -- widget : TInterface (Name {namespace = "Gtk", name = "Widget"})
    IO CInt

-- | Whether the widget is mapped.
widgetGetMapped ::
    (B.CallStack.HasCallStack, MonadIO m, IsWidget a) =>
    a
    -- ^ /@widget@/: a t'GI.Gtk.Objects.Widget.Widget'
    -> m Bool
    -- ^ __Returns:__ 'P.True' if the widget is mapped, 'P.False' otherwise.
widgetGetMapped :: a -> m Bool
widgetGetMapped widget :: a
widget = WidgetPopupMenuCallback -> m Bool
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (WidgetPopupMenuCallback -> m Bool)
-> WidgetPopupMenuCallback -> m Bool
forall a b. (a -> b) -> a -> b
$ do
    Ptr Widget
widget' <- a -> IO (Ptr Widget)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
widget
    CInt
result <- Ptr Widget -> IO CInt
gtk_widget_get_mapped Ptr Widget
widget'
    let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= 0) CInt
result
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
widget
    WidgetMnemonicActivateCallback
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'

#if defined(ENABLE_OVERLOADING)
data WidgetGetMappedMethodInfo
instance (signature ~ (m Bool), MonadIO m, IsWidget a) => O.MethodInfo WidgetGetMappedMethodInfo a signature where
    overloadedMethod = widgetGetMapped

#endif

-- method Widget::get_margin_bottom
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "widget"
--           , argType = TInterface Name { namespace = "Gtk" , name = "Widget" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #GtkWidget" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TBasicType TInt)
-- throws : False
-- Skip return : False

foreign import ccall "gtk_widget_get_margin_bottom" gtk_widget_get_margin_bottom :: 
    Ptr Widget ->                           -- widget : TInterface (Name {namespace = "Gtk", name = "Widget"})
    IO Int32

-- | Gets the value of the t'GI.Gtk.Objects.Widget.Widget':@/margin-bottom/@ property.
widgetGetMarginBottom ::
    (B.CallStack.HasCallStack, MonadIO m, IsWidget a) =>
    a
    -- ^ /@widget@/: a t'GI.Gtk.Objects.Widget.Widget'
    -> m Int32
    -- ^ __Returns:__ The bottom margin of /@widget@/
widgetGetMarginBottom :: a -> m Int32
widgetGetMarginBottom widget :: a
widget = IO Int32 -> m Int32
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Int32 -> m Int32) -> IO Int32 -> m Int32
forall a b. (a -> b) -> a -> b
$ do
    Ptr Widget
widget' <- a -> IO (Ptr Widget)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
widget
    Int32
result <- Ptr Widget -> IO Int32
gtk_widget_get_margin_bottom Ptr Widget
widget'
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
widget
    Int32 -> IO Int32
forall (m :: * -> *) a. Monad m => a -> m a
return Int32
result

#if defined(ENABLE_OVERLOADING)
data WidgetGetMarginBottomMethodInfo
instance (signature ~ (m Int32), MonadIO m, IsWidget a) => O.MethodInfo WidgetGetMarginBottomMethodInfo a signature where
    overloadedMethod = widgetGetMarginBottom

#endif

-- method Widget::get_margin_end
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "widget"
--           , argType = TInterface Name { namespace = "Gtk" , name = "Widget" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #GtkWidget" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TBasicType TInt)
-- throws : False
-- Skip return : False

foreign import ccall "gtk_widget_get_margin_end" gtk_widget_get_margin_end :: 
    Ptr Widget ->                           -- widget : TInterface (Name {namespace = "Gtk", name = "Widget"})
    IO Int32

-- | Gets the value of the t'GI.Gtk.Objects.Widget.Widget':@/margin-end/@ property.
widgetGetMarginEnd ::
    (B.CallStack.HasCallStack, MonadIO m, IsWidget a) =>
    a
    -- ^ /@widget@/: a t'GI.Gtk.Objects.Widget.Widget'
    -> m Int32
    -- ^ __Returns:__ The end margin of /@widget@/
widgetGetMarginEnd :: a -> m Int32
widgetGetMarginEnd widget :: a
widget = IO Int32 -> m Int32
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Int32 -> m Int32) -> IO Int32 -> m Int32
forall a b. (a -> b) -> a -> b
$ do
    Ptr Widget
widget' <- a -> IO (Ptr Widget)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
widget
    Int32
result <- Ptr Widget -> IO Int32
gtk_widget_get_margin_end Ptr Widget
widget'
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
widget
    Int32 -> IO Int32
forall (m :: * -> *) a. Monad m => a -> m a
return Int32
result

#if defined(ENABLE_OVERLOADING)
data WidgetGetMarginEndMethodInfo
instance (signature ~ (m Int32), MonadIO m, IsWidget a) => O.MethodInfo WidgetGetMarginEndMethodInfo a signature where
    overloadedMethod = widgetGetMarginEnd

#endif

-- method Widget::get_margin_start
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "widget"
--           , argType = TInterface Name { namespace = "Gtk" , name = "Widget" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #GtkWidget" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TBasicType TInt)
-- throws : False
-- Skip return : False

foreign import ccall "gtk_widget_get_margin_start" gtk_widget_get_margin_start :: 
    Ptr Widget ->                           -- widget : TInterface (Name {namespace = "Gtk", name = "Widget"})
    IO Int32

-- | Gets the value of the t'GI.Gtk.Objects.Widget.Widget':@/margin-start/@ property.
widgetGetMarginStart ::
    (B.CallStack.HasCallStack, MonadIO m, IsWidget a) =>
    a
    -- ^ /@widget@/: a t'GI.Gtk.Objects.Widget.Widget'
    -> m Int32
    -- ^ __Returns:__ The start margin of /@widget@/
widgetGetMarginStart :: a -> m Int32
widgetGetMarginStart widget :: a
widget = IO Int32 -> m Int32
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Int32 -> m Int32) -> IO Int32 -> m Int32
forall a b. (a -> b) -> a -> b
$ do
    Ptr Widget
widget' <- a -> IO (Ptr Widget)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
widget
    Int32
result <- Ptr Widget -> IO Int32
gtk_widget_get_margin_start Ptr Widget
widget'
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
widget
    Int32 -> IO Int32
forall (m :: * -> *) a. Monad m => a -> m a
return Int32
result

#if defined(ENABLE_OVERLOADING)
data WidgetGetMarginStartMethodInfo
instance (signature ~ (m Int32), MonadIO m, IsWidget a) => O.MethodInfo WidgetGetMarginStartMethodInfo a signature where
    overloadedMethod = widgetGetMarginStart

#endif

-- method Widget::get_margin_top
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "widget"
--           , argType = TInterface Name { namespace = "Gtk" , name = "Widget" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #GtkWidget" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TBasicType TInt)
-- throws : False
-- Skip return : False

foreign import ccall "gtk_widget_get_margin_top" gtk_widget_get_margin_top :: 
    Ptr Widget ->                           -- widget : TInterface (Name {namespace = "Gtk", name = "Widget"})
    IO Int32

-- | Gets the value of the t'GI.Gtk.Objects.Widget.Widget':@/margin-top/@ property.
widgetGetMarginTop ::
    (B.CallStack.HasCallStack, MonadIO m, IsWidget a) =>
    a
    -- ^ /@widget@/: a t'GI.Gtk.Objects.Widget.Widget'
    -> m Int32
    -- ^ __Returns:__ The top margin of /@widget@/
widgetGetMarginTop :: a -> m Int32
widgetGetMarginTop widget :: a
widget = IO Int32 -> m Int32
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Int32 -> m Int32) -> IO Int32 -> m Int32
forall a b. (a -> b) -> a -> b
$ do
    Ptr Widget
widget' <- a -> IO (Ptr Widget)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
widget
    Int32
result <- Ptr Widget -> IO Int32
gtk_widget_get_margin_top Ptr Widget
widget'
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
widget
    Int32 -> IO Int32
forall (m :: * -> *) a. Monad m => a -> m a
return Int32
result

#if defined(ENABLE_OVERLOADING)
data WidgetGetMarginTopMethodInfo
instance (signature ~ (m Int32), MonadIO m, IsWidget a) => O.MethodInfo WidgetGetMarginTopMethodInfo a signature where
    overloadedMethod = widgetGetMarginTop

#endif

-- method Widget::get_modifier_mask
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "widget"
--           , argType = TInterface Name { namespace = "Gtk" , name = "Widget" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #GtkWidget" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "intent"
--           , argType =
--               TInterface Name { namespace = "Gdk" , name = "ModifierIntent" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "the use case for the modifier mask"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just
--               (TInterface Name { namespace = "Gdk" , name = "ModifierType" })
-- throws : False
-- Skip return : False

foreign import ccall "gtk_widget_get_modifier_mask" gtk_widget_get_modifier_mask :: 
    Ptr Widget ->                           -- widget : TInterface (Name {namespace = "Gtk", name = "Widget"})
    CUInt ->                                -- intent : TInterface (Name {namespace = "Gdk", name = "ModifierIntent"})
    IO CUInt

-- | Returns the modifier mask the /@widget@/’s windowing system backend
-- uses for a particular purpose.
-- 
-- See 'GI.Gdk.Objects.Keymap.keymapGetModifierMask'.
widgetGetModifierMask ::
    (B.CallStack.HasCallStack, MonadIO m, IsWidget a) =>
    a
    -- ^ /@widget@/: a t'GI.Gtk.Objects.Widget.Widget'
    -> Gdk.Enums.ModifierIntent
    -- ^ /@intent@/: the use case for the modifier mask
    -> m [Gdk.Flags.ModifierType]
    -- ^ __Returns:__ the modifier mask used for /@intent@/.
widgetGetModifierMask :: a -> ModifierIntent -> m [ModifierType]
widgetGetModifierMask widget :: a
widget intent :: ModifierIntent
intent = IO [ModifierType] -> m [ModifierType]
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO [ModifierType] -> m [ModifierType])
-> IO [ModifierType] -> m [ModifierType]
forall a b. (a -> b) -> a -> b
$ do
    Ptr Widget
widget' <- a -> IO (Ptr Widget)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
widget
    let intent' :: CUInt
intent' = (Int -> CUInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CUInt)
-> (ModifierIntent -> Int) -> ModifierIntent -> CUInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. ModifierIntent -> Int
forall a. Enum a => a -> Int
fromEnum) ModifierIntent
intent
    CUInt
result <- Ptr Widget -> CUInt -> IO CUInt
gtk_widget_get_modifier_mask Ptr Widget
widget' CUInt
intent'
    let result' :: [ModifierType]
result' = CUInt -> [ModifierType]
forall a b. (Storable a, Integral a, Bits a, IsGFlag b) => a -> [b]
wordToGFlags CUInt
result
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
widget
    [ModifierType] -> IO [ModifierType]
forall (m :: * -> *) a. Monad m => a -> m a
return [ModifierType]
result'

#if defined(ENABLE_OVERLOADING)
data WidgetGetModifierMaskMethodInfo
instance (signature ~ (Gdk.Enums.ModifierIntent -> m [Gdk.Flags.ModifierType]), MonadIO m, IsWidget a) => O.MethodInfo WidgetGetModifierMaskMethodInfo a signature where
    overloadedMethod = widgetGetModifierMask

#endif

-- method Widget::get_name
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "widget"
--           , argType = TInterface Name { namespace = "Gtk" , name = "Widget" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #GtkWidget" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TBasicType TUTF8)
-- throws : False
-- Skip return : False

foreign import ccall "gtk_widget_get_name" gtk_widget_get_name :: 
    Ptr Widget ->                           -- widget : TInterface (Name {namespace = "Gtk", name = "Widget"})
    IO CString

-- | Retrieves the name of a widget. See 'GI.Gtk.Objects.Widget.widgetSetName' for the
-- significance of widget names.
widgetGetName ::
    (B.CallStack.HasCallStack, MonadIO m, IsWidget a) =>
    a
    -- ^ /@widget@/: a t'GI.Gtk.Objects.Widget.Widget'
    -> m T.Text
    -- ^ __Returns:__ name of the widget. This string is owned by GTK+ and
    -- should not be modified or freed
widgetGetName :: a -> m Text
widgetGetName widget :: a
widget = IO Text -> m Text
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Text -> m Text) -> IO Text -> m Text
forall a b. (a -> b) -> a -> b
$ do
    Ptr Widget
widget' <- a -> IO (Ptr Widget)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
widget
    CString
result <- Ptr Widget -> IO CString
gtk_widget_get_name Ptr Widget
widget'
    Text -> CString -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL "widgetGetName" CString
result
    Text
result' <- HasCallStack => CString -> IO Text
CString -> IO Text
cstringToText CString
result
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
widget
    Text -> IO Text
forall (m :: * -> *) a. Monad m => a -> m a
return Text
result'

#if defined(ENABLE_OVERLOADING)
data WidgetGetNameMethodInfo
instance (signature ~ (m T.Text), MonadIO m, IsWidget a) => O.MethodInfo WidgetGetNameMethodInfo a signature where
    overloadedMethod = widgetGetName

#endif

-- method Widget::get_next_sibling
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "widget"
--           , argType = TInterface Name { namespace = "Gtk" , name = "Widget" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #GtkWidget" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TInterface Name { namespace = "Gtk" , name = "Widget" })
-- throws : False
-- Skip return : False

foreign import ccall "gtk_widget_get_next_sibling" gtk_widget_get_next_sibling :: 
    Ptr Widget ->                           -- widget : TInterface (Name {namespace = "Gtk", name = "Widget"})
    IO (Ptr Widget)

-- | /No description available in the introspection data./
widgetGetNextSibling ::
    (B.CallStack.HasCallStack, MonadIO m, IsWidget a) =>
    a
    -- ^ /@widget@/: a t'GI.Gtk.Objects.Widget.Widget'
    -> m (Maybe Widget)
    -- ^ __Returns:__ The widget\'s next sibling
widgetGetNextSibling :: a -> m (Maybe Widget)
widgetGetNextSibling widget :: a
widget = IO (Maybe Widget) -> m (Maybe Widget)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Maybe Widget) -> m (Maybe Widget))
-> IO (Maybe Widget) -> m (Maybe Widget)
forall a b. (a -> b) -> a -> b
$ do
    Ptr Widget
widget' <- a -> IO (Ptr Widget)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
widget
    Ptr Widget
result <- Ptr Widget -> IO (Ptr Widget)
gtk_widget_get_next_sibling Ptr Widget
widget'
    Maybe Widget
maybeResult <- Ptr Widget -> (Ptr Widget -> IO Widget) -> IO (Maybe Widget)
forall a b. Ptr a -> (Ptr a -> IO b) -> IO (Maybe b)
convertIfNonNull Ptr Widget
result ((Ptr Widget -> IO Widget) -> IO (Maybe Widget))
-> (Ptr Widget -> IO Widget) -> IO (Maybe Widget)
forall a b. (a -> b) -> a -> b
$ \result' :: Ptr Widget
result' -> do
        Widget
result'' <- ((ManagedPtr Widget -> Widget) -> Ptr Widget -> IO Widget
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr Widget -> Widget
Widget) Ptr Widget
result'
        Widget -> IO Widget
forall (m :: * -> *) a. Monad m => a -> m a
return Widget
result''
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
widget
    Maybe Widget -> IO (Maybe Widget)
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe Widget
maybeResult

#if defined(ENABLE_OVERLOADING)
data WidgetGetNextSiblingMethodInfo
instance (signature ~ (m (Maybe Widget)), MonadIO m, IsWidget a) => O.MethodInfo WidgetGetNextSiblingMethodInfo a signature where
    overloadedMethod = widgetGetNextSibling

#endif

-- method Widget::get_opacity
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "widget"
--           , argType = TInterface Name { namespace = "Gtk" , name = "Widget" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #GtkWidget" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TBasicType TDouble)
-- throws : False
-- Skip return : False

foreign import ccall "gtk_widget_get_opacity" gtk_widget_get_opacity :: 
    Ptr Widget ->                           -- widget : TInterface (Name {namespace = "Gtk", name = "Widget"})
    IO CDouble

-- | Fetches the requested opacity for this widget.
-- See 'GI.Gtk.Objects.Widget.widgetSetOpacity'.
widgetGetOpacity ::
    (B.CallStack.HasCallStack, MonadIO m, IsWidget a) =>
    a
    -- ^ /@widget@/: a t'GI.Gtk.Objects.Widget.Widget'
    -> m Double
    -- ^ __Returns:__ the requested opacity for this widget.
widgetGetOpacity :: a -> m Double
widgetGetOpacity widget :: a
widget = IO Double -> m Double
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Double -> m Double) -> IO Double -> m Double
forall a b. (a -> b) -> a -> b
$ do
    Ptr Widget
widget' <- a -> IO (Ptr Widget)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
widget
    CDouble
result <- Ptr Widget -> IO CDouble
gtk_widget_get_opacity Ptr Widget
widget'
    let result' :: Double
result' = CDouble -> Double
forall a b. (Real a, Fractional b) => a -> b
realToFrac CDouble
result
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
widget
    Double -> IO Double
forall (m :: * -> *) a. Monad m => a -> m a
return Double
result'

#if defined(ENABLE_OVERLOADING)
data WidgetGetOpacityMethodInfo
instance (signature ~ (m Double), MonadIO m, IsWidget a) => O.MethodInfo WidgetGetOpacityMethodInfo a signature where
    overloadedMethod = widgetGetOpacity

#endif

-- method Widget::get_overflow
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "widget"
--           , argType = TInterface Name { namespace = "Gtk" , name = "Widget" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #GtkWidget" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TInterface Name { namespace = "Gtk" , name = "Overflow" })
-- throws : False
-- Skip return : False

foreign import ccall "gtk_widget_get_overflow" gtk_widget_get_overflow :: 
    Ptr Widget ->                           -- widget : TInterface (Name {namespace = "Gtk", name = "Widget"})
    IO CUInt

-- | Returns the value set via 'GI.Gtk.Objects.Widget.widgetSetOverflow'.
widgetGetOverflow ::
    (B.CallStack.HasCallStack, MonadIO m, IsWidget a) =>
    a
    -- ^ /@widget@/: a t'GI.Gtk.Objects.Widget.Widget'
    -> m Gtk.Enums.Overflow
    -- ^ __Returns:__ The widget\'s overflow.
widgetGetOverflow :: a -> m Overflow
widgetGetOverflow widget :: a
widget = IO Overflow -> m Overflow
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Overflow -> m Overflow) -> IO Overflow -> m Overflow
forall a b. (a -> b) -> a -> b
$ do
    Ptr Widget
widget' <- a -> IO (Ptr Widget)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
widget
    CUInt
result <- Ptr Widget -> IO CUInt
gtk_widget_get_overflow Ptr Widget
widget'
    let result' :: Overflow
result' = (Int -> Overflow
forall a. Enum a => Int -> a
toEnum (Int -> Overflow) -> (CUInt -> Int) -> CUInt -> Overflow
forall b c a. (b -> c) -> (a -> b) -> a -> c
. CUInt -> Int
forall a b. (Integral a, Num b) => a -> b
fromIntegral) CUInt
result
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
widget
    Overflow -> IO Overflow
forall (m :: * -> *) a. Monad m => a -> m a
return Overflow
result'

#if defined(ENABLE_OVERLOADING)
data WidgetGetOverflowMethodInfo
instance (signature ~ (m Gtk.Enums.Overflow), MonadIO m, IsWidget a) => O.MethodInfo WidgetGetOverflowMethodInfo a signature where
    overloadedMethod = widgetGetOverflow

#endif

-- method Widget::get_pango_context
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "widget"
--           , argType = TInterface Name { namespace = "Gtk" , name = "Widget" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #GtkWidget" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TInterface Name { namespace = "Pango" , name = "Context" })
-- throws : False
-- Skip return : False

foreign import ccall "gtk_widget_get_pango_context" gtk_widget_get_pango_context :: 
    Ptr Widget ->                           -- widget : TInterface (Name {namespace = "Gtk", name = "Widget"})
    IO (Ptr Pango.Context.Context)

-- | Gets a t'GI.Pango.Objects.Context.Context' with the appropriate font map, font description,
-- and base direction for this widget. Unlike the context returned
-- by 'GI.Gtk.Objects.Widget.widgetCreatePangoContext', this context is owned by
-- the widget (it can be used until the screen for the widget changes
-- or the widget is removed from its toplevel), and will be updated to
-- match any changes to the widget’s attributes. This can be tracked
-- by using the t'GI.Gtk.Objects.Widget.Widget'::@/display-changed/@ signal on the widget.
widgetGetPangoContext ::
    (B.CallStack.HasCallStack, MonadIO m, IsWidget a) =>
    a
    -- ^ /@widget@/: a t'GI.Gtk.Objects.Widget.Widget'
    -> m Pango.Context.Context
    -- ^ __Returns:__ the t'GI.Pango.Objects.Context.Context' for the widget.
widgetGetPangoContext :: a -> m Context
widgetGetPangoContext widget :: a
widget = IO Context -> m Context
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Context -> m Context) -> IO Context -> m Context
forall a b. (a -> b) -> a -> b
$ do
    Ptr Widget
widget' <- a -> IO (Ptr Widget)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
widget
    Ptr Context
result <- Ptr Widget -> IO (Ptr Context)
gtk_widget_get_pango_context Ptr Widget
widget'
    Text -> Ptr Context -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL "widgetGetPangoContext" Ptr Context
result
    Context
result' <- ((ManagedPtr Context -> Context) -> Ptr Context -> IO Context
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr Context -> Context
Pango.Context.Context) Ptr Context
result
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
widget
    Context -> IO Context
forall (m :: * -> *) a. Monad m => a -> m a
return Context
result'

#if defined(ENABLE_OVERLOADING)
data WidgetGetPangoContextMethodInfo
instance (signature ~ (m Pango.Context.Context), MonadIO m, IsWidget a) => O.MethodInfo WidgetGetPangoContextMethodInfo a signature where
    overloadedMethod = widgetGetPangoContext

#endif

-- method Widget::get_parent
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "widget"
--           , argType = TInterface Name { namespace = "Gtk" , name = "Widget" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #GtkWidget" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TInterface Name { namespace = "Gtk" , name = "Widget" })
-- throws : False
-- Skip return : False

foreign import ccall "gtk_widget_get_parent" gtk_widget_get_parent :: 
    Ptr Widget ->                           -- widget : TInterface (Name {namespace = "Gtk", name = "Widget"})
    IO (Ptr Widget)

-- | Returns the parent widget of /@widget@/.
widgetGetParent ::
    (B.CallStack.HasCallStack, MonadIO m, IsWidget a) =>
    a
    -- ^ /@widget@/: a t'GI.Gtk.Objects.Widget.Widget'
    -> m (Maybe Widget)
    -- ^ __Returns:__ the parent widget of /@widget@/, or 'P.Nothing'
widgetGetParent :: a -> m (Maybe Widget)
widgetGetParent widget :: a
widget = IO (Maybe Widget) -> m (Maybe Widget)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Maybe Widget) -> m (Maybe Widget))
-> IO (Maybe Widget) -> m (Maybe Widget)
forall a b. (a -> b) -> a -> b
$ do
    Ptr Widget
widget' <- a -> IO (Ptr Widget)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
widget
    Ptr Widget
result <- Ptr Widget -> IO (Ptr Widget)
gtk_widget_get_parent Ptr Widget
widget'
    Maybe Widget
maybeResult <- Ptr Widget -> (Ptr Widget -> IO Widget) -> IO (Maybe Widget)
forall a b. Ptr a -> (Ptr a -> IO b) -> IO (Maybe b)
convertIfNonNull Ptr Widget
result ((Ptr Widget -> IO Widget) -> IO (Maybe Widget))
-> (Ptr Widget -> IO Widget) -> IO (Maybe Widget)
forall a b. (a -> b) -> a -> b
$ \result' :: Ptr Widget
result' -> do
        Widget
result'' <- ((ManagedPtr Widget -> Widget) -> Ptr Widget -> IO Widget
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr Widget -> Widget
Widget) Ptr Widget
result'
        Widget -> IO Widget
forall (m :: * -> *) a. Monad m => a -> m a
return Widget
result''
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
widget
    Maybe Widget -> IO (Maybe Widget)
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe Widget
maybeResult

#if defined(ENABLE_OVERLOADING)
data WidgetGetParentMethodInfo
instance (signature ~ (m (Maybe Widget)), MonadIO m, IsWidget a) => O.MethodInfo WidgetGetParentMethodInfo a signature where
    overloadedMethod = widgetGetParent

#endif

-- method Widget::get_path
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "widget"
--           , argType = TInterface Name { namespace = "Gtk" , name = "Widget" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #GtkWidget" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TInterface Name { namespace = "Gtk" , name = "WidgetPath" })
-- throws : False
-- Skip return : False

foreign import ccall "gtk_widget_get_path" gtk_widget_get_path :: 
    Ptr Widget ->                           -- widget : TInterface (Name {namespace = "Gtk", name = "Widget"})
    IO (Ptr Gtk.WidgetPath.WidgetPath)

-- | Returns the t'GI.Gtk.Structs.WidgetPath.WidgetPath' representing /@widget@/, if the widget
-- is not connected to a toplevel widget, a partial path will be
-- created.
widgetGetPath ::
    (B.CallStack.HasCallStack, MonadIO m, IsWidget a) =>
    a
    -- ^ /@widget@/: a t'GI.Gtk.Objects.Widget.Widget'
    -> m Gtk.WidgetPath.WidgetPath
    -- ^ __Returns:__ The t'GI.Gtk.Structs.WidgetPath.WidgetPath' representing /@widget@/
widgetGetPath :: a -> m WidgetPath
widgetGetPath widget :: a
widget = IO WidgetPath -> m WidgetPath
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO WidgetPath -> m WidgetPath) -> IO WidgetPath -> m WidgetPath
forall a b. (a -> b) -> a -> b
$ do
    Ptr Widget
widget' <- a -> IO (Ptr Widget)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
widget
    Ptr WidgetPath
result <- Ptr Widget -> IO (Ptr WidgetPath)
gtk_widget_get_path Ptr Widget
widget'
    Text -> Ptr WidgetPath -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL "widgetGetPath" Ptr WidgetPath
result
    WidgetPath
result' <- ((ManagedPtr WidgetPath -> WidgetPath)
-> Ptr WidgetPath -> IO WidgetPath
forall a.
(HasCallStack, BoxedObject a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
newBoxed ManagedPtr WidgetPath -> WidgetPath
Gtk.WidgetPath.WidgetPath) Ptr WidgetPath
result
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
widget
    WidgetPath -> IO WidgetPath
forall (m :: * -> *) a. Monad m => a -> m a
return WidgetPath
result'

#if defined(ENABLE_OVERLOADING)
data WidgetGetPathMethodInfo
instance (signature ~ (m Gtk.WidgetPath.WidgetPath), MonadIO m, IsWidget a) => O.MethodInfo WidgetGetPathMethodInfo a signature where
    overloadedMethod = widgetGetPath

#endif

-- method Widget::get_preferred_size
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "widget"
--           , argType = TInterface Name { namespace = "Gtk" , name = "Widget" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #GtkWidget instance"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "minimum_size"
--           , argType =
--               TInterface Name { namespace = "Gtk" , name = "Requisition" }
--           , direction = DirectionOut
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText =
--                     Just "location for storing the minimum size, or %NULL"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = True
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "natural_size"
--           , argType =
--               TInterface Name { namespace = "Gtk" , name = "Requisition" }
--           , direction = DirectionOut
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText =
--                     Just "location for storing the natural size, or %NULL"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = True
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "gtk_widget_get_preferred_size" gtk_widget_get_preferred_size :: 
    Ptr Widget ->                           -- widget : TInterface (Name {namespace = "Gtk", name = "Widget"})
    Ptr Gtk.Requisition.Requisition ->      -- minimum_size : TInterface (Name {namespace = "Gtk", name = "Requisition"})
    Ptr Gtk.Requisition.Requisition ->      -- natural_size : TInterface (Name {namespace = "Gtk", name = "Requisition"})
    IO ()

-- | Retrieves the minimum and natural size of a widget, taking
-- into account the widget’s preference for height-for-width management.
-- 
-- This is used to retrieve a suitable size by container widgets which do
-- not impose any restrictions on the child placement. It can be used
-- to deduce toplevel window and menu sizes as well as child widgets in
-- free-form containers such as GtkLayout.
-- 
-- Handle with care. Note that the natural height of a height-for-width
-- widget will generally be a smaller size than the minimum height, since the required
-- height for the natural width is generally smaller than the required height for
-- the minimum width.
-- 
-- Use 'GI.Gtk.Objects.Widget.widgetMeasure' if you want to support
-- baseline alignment.
widgetGetPreferredSize ::
    (B.CallStack.HasCallStack, MonadIO m, IsWidget a) =>
    a
    -- ^ /@widget@/: a t'GI.Gtk.Objects.Widget.Widget' instance
    -> m ((Gtk.Requisition.Requisition, Gtk.Requisition.Requisition))
widgetGetPreferredSize :: a -> m (Requisition, Requisition)
widgetGetPreferredSize widget :: a
widget = IO (Requisition, Requisition) -> m (Requisition, Requisition)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Requisition, Requisition) -> m (Requisition, Requisition))
-> IO (Requisition, Requisition) -> m (Requisition, Requisition)
forall a b. (a -> b) -> a -> b
$ do
    Ptr Widget
widget' <- a -> IO (Ptr Widget)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
widget
    Ptr Requisition
minimumSize <- Int -> IO (Ptr Requisition)
forall a. BoxedObject a => Int -> IO (Ptr a)
callocBoxedBytes 8 :: IO (Ptr Gtk.Requisition.Requisition)
    Ptr Requisition
naturalSize <- Int -> IO (Ptr Requisition)
forall a. BoxedObject a => Int -> IO (Ptr a)
callocBoxedBytes 8 :: IO (Ptr Gtk.Requisition.Requisition)
    Ptr Widget -> Ptr Requisition -> Ptr Requisition -> IO ()
gtk_widget_get_preferred_size Ptr Widget
widget' Ptr Requisition
minimumSize Ptr Requisition
naturalSize
    Requisition
minimumSize' <- ((ManagedPtr Requisition -> Requisition)
-> Ptr Requisition -> IO Requisition
forall a.
(HasCallStack, BoxedObject a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
wrapBoxed ManagedPtr Requisition -> Requisition
Gtk.Requisition.Requisition) Ptr Requisition
minimumSize
    Requisition
naturalSize' <- ((ManagedPtr Requisition -> Requisition)
-> Ptr Requisition -> IO Requisition
forall a.
(HasCallStack, BoxedObject a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
wrapBoxed ManagedPtr Requisition -> Requisition
Gtk.Requisition.Requisition) Ptr Requisition
naturalSize
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
widget
    (Requisition, Requisition) -> IO (Requisition, Requisition)
forall (m :: * -> *) a. Monad m => a -> m a
return (Requisition
minimumSize', Requisition
naturalSize')

#if defined(ENABLE_OVERLOADING)
data WidgetGetPreferredSizeMethodInfo
instance (signature ~ (m ((Gtk.Requisition.Requisition, Gtk.Requisition.Requisition))), MonadIO m, IsWidget a) => O.MethodInfo WidgetGetPreferredSizeMethodInfo a signature where
    overloadedMethod = widgetGetPreferredSize

#endif

-- method Widget::get_prev_sibling
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "widget"
--           , argType = TInterface Name { namespace = "Gtk" , name = "Widget" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #GtkWidget" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TInterface Name { namespace = "Gtk" , name = "Widget" })
-- throws : False
-- Skip return : False

foreign import ccall "gtk_widget_get_prev_sibling" gtk_widget_get_prev_sibling :: 
    Ptr Widget ->                           -- widget : TInterface (Name {namespace = "Gtk", name = "Widget"})
    IO (Ptr Widget)

-- | /No description available in the introspection data./
widgetGetPrevSibling ::
    (B.CallStack.HasCallStack, MonadIO m, IsWidget a) =>
    a
    -- ^ /@widget@/: a t'GI.Gtk.Objects.Widget.Widget'
    -> m (Maybe Widget)
    -- ^ __Returns:__ The widget\'s previous sibling
widgetGetPrevSibling :: a -> m (Maybe Widget)
widgetGetPrevSibling widget :: a
widget = IO (Maybe Widget) -> m (Maybe Widget)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Maybe Widget) -> m (Maybe Widget))
-> IO (Maybe Widget) -> m (Maybe Widget)
forall a b. (a -> b) -> a -> b
$ do
    Ptr Widget
widget' <- a -> IO (Ptr Widget)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
widget
    Ptr Widget
result <- Ptr Widget -> IO (Ptr Widget)
gtk_widget_get_prev_sibling Ptr Widget
widget'
    Maybe Widget
maybeResult <- Ptr Widget -> (Ptr Widget -> IO Widget) -> IO (Maybe Widget)
forall a b. Ptr a -> (Ptr a -> IO b) -> IO (Maybe b)
convertIfNonNull Ptr Widget
result ((Ptr Widget -> IO Widget) -> IO (Maybe Widget))
-> (Ptr Widget -> IO Widget) -> IO (Maybe Widget)
forall a b. (a -> b) -> a -> b
$ \result' :: Ptr Widget
result' -> do
        Widget
result'' <- ((ManagedPtr Widget -> Widget) -> Ptr Widget -> IO Widget
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr Widget -> Widget
Widget) Ptr Widget
result'
        Widget -> IO Widget
forall (m :: * -> *) a. Monad m => a -> m a
return Widget
result''
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
widget
    Maybe Widget -> IO (Maybe Widget)
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe Widget
maybeResult

#if defined(ENABLE_OVERLOADING)
data WidgetGetPrevSiblingMethodInfo
instance (signature ~ (m (Maybe Widget)), MonadIO m, IsWidget a) => O.MethodInfo WidgetGetPrevSiblingMethodInfo a signature where
    overloadedMethod = widgetGetPrevSibling

#endif

-- method Widget::get_primary_clipboard
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "widget"
--           , argType = TInterface Name { namespace = "Gtk" , name = "Widget" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #GtkWidget" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TInterface Name { namespace = "Gdk" , name = "Clipboard" })
-- throws : False
-- Skip return : False

foreign import ccall "gtk_widget_get_primary_clipboard" gtk_widget_get_primary_clipboard :: 
    Ptr Widget ->                           -- widget : TInterface (Name {namespace = "Gtk", name = "Widget"})
    IO (Ptr Gdk.Clipboard.Clipboard)

-- | This is a utility function to get the primary clipboard object
-- for the t'GI.Gdk.Objects.Display.Display' that /@widget@/ is using.
-- 
-- Note that this function always works, even when /@widget@/ is not
-- realized yet.
widgetGetPrimaryClipboard ::
    (B.CallStack.HasCallStack, MonadIO m, IsWidget a) =>
    a
    -- ^ /@widget@/: a t'GI.Gtk.Objects.Widget.Widget'
    -> m Gdk.Clipboard.Clipboard
    -- ^ __Returns:__ the appropriate clipboard object.
widgetGetPrimaryClipboard :: a -> m Clipboard
widgetGetPrimaryClipboard widget :: a
widget = IO Clipboard -> m Clipboard
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Clipboard -> m Clipboard) -> IO Clipboard -> m Clipboard
forall a b. (a -> b) -> a -> b
$ do
    Ptr Widget
widget' <- a -> IO (Ptr Widget)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
widget
    Ptr Clipboard
result <- Ptr Widget -> IO (Ptr Clipboard)
gtk_widget_get_primary_clipboard Ptr Widget
widget'
    Text -> Ptr Clipboard -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL "widgetGetPrimaryClipboard" Ptr Clipboard
result
    Clipboard
result' <- ((ManagedPtr Clipboard -> Clipboard)
-> Ptr Clipboard -> IO Clipboard
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr Clipboard -> Clipboard
Gdk.Clipboard.Clipboard) Ptr Clipboard
result
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
widget
    Clipboard -> IO Clipboard
forall (m :: * -> *) a. Monad m => a -> m a
return Clipboard
result'

#if defined(ENABLE_OVERLOADING)
data WidgetGetPrimaryClipboardMethodInfo
instance (signature ~ (m Gdk.Clipboard.Clipboard), MonadIO m, IsWidget a) => O.MethodInfo WidgetGetPrimaryClipboardMethodInfo a signature where
    overloadedMethod = widgetGetPrimaryClipboard

#endif

-- method Widget::get_realized
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "widget"
--           , argType = TInterface Name { namespace = "Gtk" , name = "Widget" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #GtkWidget" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TBasicType TBoolean)
-- throws : False
-- Skip return : False

foreign import ccall "gtk_widget_get_realized" gtk_widget_get_realized :: 
    Ptr Widget ->                           -- widget : TInterface (Name {namespace = "Gtk", name = "Widget"})
    IO CInt

-- | Determines whether /@widget@/ is realized.
widgetGetRealized ::
    (B.CallStack.HasCallStack, MonadIO m, IsWidget a) =>
    a
    -- ^ /@widget@/: a t'GI.Gtk.Objects.Widget.Widget'
    -> m Bool
    -- ^ __Returns:__ 'P.True' if /@widget@/ is realized, 'P.False' otherwise
widgetGetRealized :: a -> m Bool
widgetGetRealized widget :: a
widget = WidgetPopupMenuCallback -> m Bool
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (WidgetPopupMenuCallback -> m Bool)
-> WidgetPopupMenuCallback -> m Bool
forall a b. (a -> b) -> a -> b
$ do
    Ptr Widget
widget' <- a -> IO (Ptr Widget)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
widget
    CInt
result <- Ptr Widget -> IO CInt
gtk_widget_get_realized Ptr Widget
widget'
    let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= 0) CInt
result
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
widget
    WidgetMnemonicActivateCallback
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'

#if defined(ENABLE_OVERLOADING)
data WidgetGetRealizedMethodInfo
instance (signature ~ (m Bool), MonadIO m, IsWidget a) => O.MethodInfo WidgetGetRealizedMethodInfo a signature where
    overloadedMethod = widgetGetRealized

#endif

-- method Widget::get_receives_default
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "widget"
--           , argType = TInterface Name { namespace = "Gtk" , name = "Widget" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #GtkWidget" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TBasicType TBoolean)
-- throws : False
-- Skip return : False

foreign import ccall "gtk_widget_get_receives_default" gtk_widget_get_receives_default :: 
    Ptr Widget ->                           -- widget : TInterface (Name {namespace = "Gtk", name = "Widget"})
    IO CInt

-- | Determines whether /@widget@/ is always treated as the default widget
-- within its toplevel when it has the focus, even if another widget
-- is the default.
-- 
-- See 'GI.Gtk.Objects.Widget.widgetSetReceivesDefault'.
widgetGetReceivesDefault ::
    (B.CallStack.HasCallStack, MonadIO m, IsWidget a) =>
    a
    -- ^ /@widget@/: a t'GI.Gtk.Objects.Widget.Widget'
    -> m Bool
    -- ^ __Returns:__ 'P.True' if /@widget@/ acts as the default widget when focused,
    --               'P.False' otherwise
widgetGetReceivesDefault :: a -> m Bool
widgetGetReceivesDefault widget :: a
widget = WidgetPopupMenuCallback -> m Bool
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (WidgetPopupMenuCallback -> m Bool)
-> WidgetPopupMenuCallback -> m Bool
forall a b. (a -> b) -> a -> b
$ do
    Ptr Widget
widget' <- a -> IO (Ptr Widget)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
widget
    CInt
result <- Ptr Widget -> IO CInt
gtk_widget_get_receives_default Ptr Widget
widget'
    let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= 0) CInt
result
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
widget
    WidgetMnemonicActivateCallback
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'

#if defined(ENABLE_OVERLOADING)
data WidgetGetReceivesDefaultMethodInfo
instance (signature ~ (m Bool), MonadIO m, IsWidget a) => O.MethodInfo WidgetGetReceivesDefaultMethodInfo a signature where
    overloadedMethod = widgetGetReceivesDefault

#endif

-- method Widget::get_request_mode
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "widget"
--           , argType = TInterface Name { namespace = "Gtk" , name = "Widget" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #GtkWidget instance"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just
--               (TInterface Name { namespace = "Gtk" , name = "SizeRequestMode" })
-- throws : False
-- Skip return : False

foreign import ccall "gtk_widget_get_request_mode" gtk_widget_get_request_mode :: 
    Ptr Widget ->                           -- widget : TInterface (Name {namespace = "Gtk", name = "Widget"})
    IO CUInt

-- | Gets whether the widget prefers a height-for-width layout
-- or a width-for-height layout.
-- 
-- t'GI.Gtk.Objects.Bin.Bin' widgets generally propagate the preference of
-- their child, container widgets need to request something either in
-- context of their children or in context of their allocation
-- capabilities.
widgetGetRequestMode ::
    (B.CallStack.HasCallStack, MonadIO m, IsWidget a) =>
    a
    -- ^ /@widget@/: a t'GI.Gtk.Objects.Widget.Widget' instance
    -> m Gtk.Enums.SizeRequestMode
    -- ^ __Returns:__ The t'GI.Gtk.Enums.SizeRequestMode' preferred by /@widget@/.
widgetGetRequestMode :: a -> m SizeRequestMode
widgetGetRequestMode widget :: a
widget = IO SizeRequestMode -> m SizeRequestMode
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO SizeRequestMode -> m SizeRequestMode)
-> IO SizeRequestMode -> m SizeRequestMode
forall a b. (a -> b) -> a -> b
$ do
    Ptr Widget
widget' <- a -> IO (Ptr Widget)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
widget
    CUInt
result <- Ptr Widget -> IO CUInt
gtk_widget_get_request_mode Ptr Widget
widget'
    let result' :: SizeRequestMode
result' = (Int -> SizeRequestMode
forall a. Enum a => Int -> a
toEnum (Int -> SizeRequestMode)
-> (CUInt -> Int) -> CUInt -> SizeRequestMode
forall b c a. (b -> c) -> (a -> b) -> a -> c
. CUInt -> Int
forall a b. (Integral a, Num b) => a -> b
fromIntegral) CUInt
result
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
widget
    SizeRequestMode -> IO SizeRequestMode
forall (m :: * -> *) a. Monad m => a -> m a
return SizeRequestMode
result'

#if defined(ENABLE_OVERLOADING)
data WidgetGetRequestModeMethodInfo
instance (signature ~ (m Gtk.Enums.SizeRequestMode), MonadIO m, IsWidget a) => O.MethodInfo WidgetGetRequestModeMethodInfo a signature where
    overloadedMethod = widgetGetRequestMode

#endif

-- method Widget::get_root
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "widget"
--           , argType = TInterface Name { namespace = "Gtk" , name = "Widget" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #GtkWidget" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TInterface Name { namespace = "Gtk" , name = "Root" })
-- throws : False
-- Skip return : False

foreign import ccall "gtk_widget_get_root" gtk_widget_get_root :: 
    Ptr Widget ->                           -- widget : TInterface (Name {namespace = "Gtk", name = "Widget"})
    IO (Ptr Gtk.Root.Root)

-- | Returns the t'GI.Gtk.Interfaces.Root.Root' widget of /@widget@/ or 'P.Nothing' if the widget is not contained
-- inside a widget tree with a root widget.
-- 
-- t'GI.Gtk.Interfaces.Root.Root' widgets will return themselves here.
widgetGetRoot ::
    (B.CallStack.HasCallStack, MonadIO m, IsWidget a) =>
    a
    -- ^ /@widget@/: a t'GI.Gtk.Objects.Widget.Widget'
    -> m (Maybe Gtk.Root.Root)
    -- ^ __Returns:__ the root widget of /@widget@/, or 'P.Nothing'
widgetGetRoot :: a -> m (Maybe Root)
widgetGetRoot widget :: a
widget = IO (Maybe Root) -> m (Maybe Root)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Maybe Root) -> m (Maybe Root))
-> IO (Maybe Root) -> m (Maybe Root)
forall a b. (a -> b) -> a -> b
$ do
    Ptr Widget
widget' <- a -> IO (Ptr Widget)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
widget
    Ptr Root
result <- Ptr Widget -> IO (Ptr Root)
gtk_widget_get_root Ptr Widget
widget'
    Maybe Root
maybeResult <- Ptr Root -> (Ptr Root -> IO Root) -> IO (Maybe Root)
forall a b. Ptr a -> (Ptr a -> IO b) -> IO (Maybe b)
convertIfNonNull Ptr Root
result ((Ptr Root -> IO Root) -> IO (Maybe Root))
-> (Ptr Root -> IO Root) -> IO (Maybe Root)
forall a b. (a -> b) -> a -> b
$ \result' :: Ptr Root
result' -> do
        Root
result'' <- ((ManagedPtr Root -> Root) -> Ptr Root -> IO Root
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr Root -> Root
Gtk.Root.Root) Ptr Root
result'
        Root -> IO Root
forall (m :: * -> *) a. Monad m => a -> m a
return Root
result''
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
widget
    Maybe Root -> IO (Maybe Root)
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe Root
maybeResult

#if defined(ENABLE_OVERLOADING)
data WidgetGetRootMethodInfo
instance (signature ~ (m (Maybe Gtk.Root.Root)), MonadIO m, IsWidget a) => O.MethodInfo WidgetGetRootMethodInfo a signature where
    overloadedMethod = widgetGetRoot

#endif

-- method Widget::get_scale_factor
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "widget"
--           , argType = TInterface Name { namespace = "Gtk" , name = "Widget" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #GtkWidget" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TBasicType TInt)
-- throws : False
-- Skip return : False

foreign import ccall "gtk_widget_get_scale_factor" gtk_widget_get_scale_factor :: 
    Ptr Widget ->                           -- widget : TInterface (Name {namespace = "Gtk", name = "Widget"})
    IO Int32

-- | Retrieves the internal scale factor that maps from window coordinates
-- to the actual device pixels. On traditional systems this is 1, on
-- high density outputs, it can be a higher value (typically 2).
-- 
-- See 'GI.Gdk.Objects.Surface.surfaceGetScaleFactor'.
widgetGetScaleFactor ::
    (B.CallStack.HasCallStack, MonadIO m, IsWidget a) =>
    a
    -- ^ /@widget@/: a t'GI.Gtk.Objects.Widget.Widget'
    -> m Int32
    -- ^ __Returns:__ the scale factor for /@widget@/
widgetGetScaleFactor :: a -> m Int32
widgetGetScaleFactor widget :: a
widget = IO Int32 -> m Int32
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Int32 -> m Int32) -> IO Int32 -> m Int32
forall a b. (a -> b) -> a -> b
$ do
    Ptr Widget
widget' <- a -> IO (Ptr Widget)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
widget
    Int32
result <- Ptr Widget -> IO Int32
gtk_widget_get_scale_factor Ptr Widget
widget'
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
widget
    Int32 -> IO Int32
forall (m :: * -> *) a. Monad m => a -> m a
return Int32
result

#if defined(ENABLE_OVERLOADING)
data WidgetGetScaleFactorMethodInfo
instance (signature ~ (m Int32), MonadIO m, IsWidget a) => O.MethodInfo WidgetGetScaleFactorMethodInfo a signature where
    overloadedMethod = widgetGetScaleFactor

#endif

-- method Widget::get_sensitive
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "widget"
--           , argType = TInterface Name { namespace = "Gtk" , name = "Widget" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #GtkWidget" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TBasicType TBoolean)
-- throws : False
-- Skip return : False

foreign import ccall "gtk_widget_get_sensitive" gtk_widget_get_sensitive :: 
    Ptr Widget ->                           -- widget : TInterface (Name {namespace = "Gtk", name = "Widget"})
    IO CInt

-- | Returns the widget’s sensitivity (in the sense of returning
-- the value that has been set using 'GI.Gtk.Objects.Widget.widgetSetSensitive').
-- 
-- The effective sensitivity of a widget is however determined by both its
-- own and its parent widget’s sensitivity. See 'GI.Gtk.Objects.Widget.widgetIsSensitive'.
widgetGetSensitive ::
    (B.CallStack.HasCallStack, MonadIO m, IsWidget a) =>
    a
    -- ^ /@widget@/: a t'GI.Gtk.Objects.Widget.Widget'
    -> m Bool
    -- ^ __Returns:__ 'P.True' if the widget is sensitive
widgetGetSensitive :: a -> m Bool
widgetGetSensitive widget :: a
widget = WidgetPopupMenuCallback -> m Bool
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (WidgetPopupMenuCallback -> m Bool)
-> WidgetPopupMenuCallback -> m Bool
forall a b. (a -> b) -> a -> b
$ do
    Ptr Widget
widget' <- a -> IO (Ptr Widget)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
widget
    CInt
result <- Ptr Widget -> IO CInt
gtk_widget_get_sensitive Ptr Widget
widget'
    let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= 0) CInt
result
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
widget
    WidgetMnemonicActivateCallback
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'

#if defined(ENABLE_OVERLOADING)
data WidgetGetSensitiveMethodInfo
instance (signature ~ (m Bool), MonadIO m, IsWidget a) => O.MethodInfo WidgetGetSensitiveMethodInfo a signature where
    overloadedMethod = widgetGetSensitive

#endif

-- method Widget::get_settings
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "widget"
--           , argType = TInterface Name { namespace = "Gtk" , name = "Widget" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #GtkWidget" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TInterface Name { namespace = "Gtk" , name = "Settings" })
-- throws : False
-- Skip return : False

foreign import ccall "gtk_widget_get_settings" gtk_widget_get_settings :: 
    Ptr Widget ->                           -- widget : TInterface (Name {namespace = "Gtk", name = "Widget"})
    IO (Ptr Gtk.Settings.Settings)

-- | Gets the settings object holding the settings used for this widget.
-- 
-- Note that this function can only be called when the t'GI.Gtk.Objects.Widget.Widget'
-- is attached to a toplevel, since the settings object is specific
-- to a particular t'GI.Gdk.Objects.Display.Display'.
widgetGetSettings ::
    (B.CallStack.HasCallStack, MonadIO m, IsWidget a) =>
    a
    -- ^ /@widget@/: a t'GI.Gtk.Objects.Widget.Widget'
    -> m Gtk.Settings.Settings
    -- ^ __Returns:__ the relevant t'GI.Gtk.Objects.Settings.Settings' object
widgetGetSettings :: a -> m Settings
widgetGetSettings widget :: a
widget = IO Settings -> m Settings
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Settings -> m Settings) -> IO Settings -> m Settings
forall a b. (a -> b) -> a -> b
$ do
    Ptr Widget
widget' <- a -> IO (Ptr Widget)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
widget
    Ptr Settings
result <- Ptr Widget -> IO (Ptr Settings)
gtk_widget_get_settings Ptr Widget
widget'
    Text -> Ptr Settings -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL "widgetGetSettings" Ptr Settings
result
    Settings
result' <- ((ManagedPtr Settings -> Settings) -> Ptr Settings -> IO Settings
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr Settings -> Settings
Gtk.Settings.Settings) Ptr Settings
result
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
widget
    Settings -> IO Settings
forall (m :: * -> *) a. Monad m => a -> m a
return Settings
result'

#if defined(ENABLE_OVERLOADING)
data WidgetGetSettingsMethodInfo
instance (signature ~ (m Gtk.Settings.Settings), MonadIO m, IsWidget a) => O.MethodInfo WidgetGetSettingsMethodInfo a signature where
    overloadedMethod = widgetGetSettings

#endif

-- method Widget::get_size_request
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "widget"
--           , argType = TInterface Name { namespace = "Gtk" , name = "Widget" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #GtkWidget" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "width"
--           , argType = TBasicType TInt
--           , direction = DirectionOut
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "return location for width, or %NULL"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferEverything
--           }
--       , Arg
--           { argCName = "height"
--           , argType = TBasicType TInt
--           , direction = DirectionOut
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "return location for height, or %NULL"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferEverything
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "gtk_widget_get_size_request" gtk_widget_get_size_request :: 
    Ptr Widget ->                           -- widget : TInterface (Name {namespace = "Gtk", name = "Widget"})
    Ptr Int32 ->                            -- width : TBasicType TInt
    Ptr Int32 ->                            -- height : TBasicType TInt
    IO ()

-- | Gets the size request that was explicitly set for the widget using
-- 'GI.Gtk.Objects.Widget.widgetSetSizeRequest'. A value of -1 stored in /@width@/ or
-- /@height@/ indicates that that dimension has not been set explicitly
-- and the natural requisition of the widget will be used instead. See
-- 'GI.Gtk.Objects.Widget.widgetSetSizeRequest'. To get the size a widget will
-- actually request, call 'GI.Gtk.Objects.Widget.widgetMeasure' instead of
-- this function.
widgetGetSizeRequest ::
    (B.CallStack.HasCallStack, MonadIO m, IsWidget a) =>
    a
    -- ^ /@widget@/: a t'GI.Gtk.Objects.Widget.Widget'
    -> m ((Int32, Int32))
widgetGetSizeRequest :: a -> m (Int32, Int32)
widgetGetSizeRequest widget :: a
widget = IO (Int32, Int32) -> m (Int32, Int32)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Int32, Int32) -> m (Int32, Int32))
-> IO (Int32, Int32) -> m (Int32, Int32)
forall a b. (a -> b) -> a -> b
$ do
    Ptr Widget
widget' <- a -> IO (Ptr Widget)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
widget
    Ptr Int32
width <- IO (Ptr Int32)
forall a. Storable a => IO (Ptr a)
allocMem :: IO (Ptr Int32)
    Ptr Int32
height <- IO (Ptr Int32)
forall a. Storable a => IO (Ptr a)
allocMem :: IO (Ptr Int32)
    Ptr Widget -> Ptr Int32 -> Ptr Int32 -> IO ()
gtk_widget_get_size_request Ptr Widget
widget' Ptr Int32
width Ptr Int32
height
    Int32
width' <- Ptr Int32 -> IO Int32
forall a. Storable a => Ptr a -> IO a
peek Ptr Int32
width
    Int32
height' <- Ptr Int32 -> IO Int32
forall a. Storable a => Ptr a -> IO a
peek Ptr Int32
height
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
widget
    Ptr Int32 -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr Int32
width
    Ptr Int32 -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr Int32
height
    (Int32, Int32) -> IO (Int32, Int32)
forall (m :: * -> *) a. Monad m => a -> m a
return (Int32
width', Int32
height')

#if defined(ENABLE_OVERLOADING)
data WidgetGetSizeRequestMethodInfo
instance (signature ~ (m ((Int32, Int32))), MonadIO m, IsWidget a) => O.MethodInfo WidgetGetSizeRequestMethodInfo a signature where
    overloadedMethod = widgetGetSizeRequest

#endif

-- method Widget::get_state_flags
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "widget"
--           , argType = TInterface Name { namespace = "Gtk" , name = "Widget" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #GtkWidget" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TInterface Name { namespace = "Gtk" , name = "StateFlags" })
-- throws : False
-- Skip return : False

foreign import ccall "gtk_widget_get_state_flags" gtk_widget_get_state_flags :: 
    Ptr Widget ->                           -- widget : TInterface (Name {namespace = "Gtk", name = "Widget"})
    IO CUInt

-- | Returns the widget state as a flag set. It is worth mentioning
-- that the effective 'GI.Gtk.Flags.StateFlagsInsensitive' state will be
-- returned, that is, also based on parent insensitivity, even if
-- /@widget@/ itself is sensitive.
-- 
-- Also note that if you are looking for a way to obtain the
-- t'GI.Gtk.Flags.StateFlags' to pass to a t'GI.Gtk.Objects.StyleContext.StyleContext' method, you
-- should look at 'GI.Gtk.Objects.StyleContext.styleContextGetState'.
widgetGetStateFlags ::
    (B.CallStack.HasCallStack, MonadIO m, IsWidget a) =>
    a
    -- ^ /@widget@/: a t'GI.Gtk.Objects.Widget.Widget'
    -> m [Gtk.Flags.StateFlags]
    -- ^ __Returns:__ The state flags for widget
widgetGetStateFlags :: a -> m [StateFlags]
widgetGetStateFlags widget :: a
widget = IO [StateFlags] -> m [StateFlags]
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO [StateFlags] -> m [StateFlags])
-> IO [StateFlags] -> m [StateFlags]
forall a b. (a -> b) -> a -> b
$ do
    Ptr Widget
widget' <- a -> IO (Ptr Widget)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
widget
    CUInt
result <- Ptr Widget -> IO CUInt
gtk_widget_get_state_flags Ptr Widget
widget'
    let result' :: [StateFlags]
result' = CUInt -> [StateFlags]
forall a b. (Storable a, Integral a, Bits a, IsGFlag b) => a -> [b]
wordToGFlags CUInt
result
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
widget
    [StateFlags] -> IO [StateFlags]
forall (m :: * -> *) a. Monad m => a -> m a
return [StateFlags]
result'

#if defined(ENABLE_OVERLOADING)
data WidgetGetStateFlagsMethodInfo
instance (signature ~ (m [Gtk.Flags.StateFlags]), MonadIO m, IsWidget a) => O.MethodInfo WidgetGetStateFlagsMethodInfo a signature where
    overloadedMethod = widgetGetStateFlags

#endif

-- method Widget::get_style_context
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "widget"
--           , argType = TInterface Name { namespace = "Gtk" , name = "Widget" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #GtkWidget" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just
--               (TInterface Name { namespace = "Gtk" , name = "StyleContext" })
-- throws : False
-- Skip return : False

foreign import ccall "gtk_widget_get_style_context" gtk_widget_get_style_context :: 
    Ptr Widget ->                           -- widget : TInterface (Name {namespace = "Gtk", name = "Widget"})
    IO (Ptr Gtk.StyleContext.StyleContext)

-- | Returns the style context associated to /@widget@/. The returned object is
-- guaranteed to be the same for the lifetime of /@widget@/.
widgetGetStyleContext ::
    (B.CallStack.HasCallStack, MonadIO m, IsWidget a) =>
    a
    -- ^ /@widget@/: a t'GI.Gtk.Objects.Widget.Widget'
    -> m Gtk.StyleContext.StyleContext
    -- ^ __Returns:__ a t'GI.Gtk.Objects.StyleContext.StyleContext'. This memory is owned by /@widget@/ and
    --          must not be freed.
widgetGetStyleContext :: a -> m StyleContext
widgetGetStyleContext widget :: a
widget = IO StyleContext -> m StyleContext
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO StyleContext -> m StyleContext)
-> IO StyleContext -> m StyleContext
forall a b. (a -> b) -> a -> b
$ do
    Ptr Widget
widget' <- a -> IO (Ptr Widget)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
widget
    Ptr StyleContext
result <- Ptr Widget -> IO (Ptr StyleContext)
gtk_widget_get_style_context Ptr Widget
widget'
    Text -> Ptr StyleContext -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL "widgetGetStyleContext" Ptr StyleContext
result
    StyleContext
result' <- ((ManagedPtr StyleContext -> StyleContext)
-> Ptr StyleContext -> IO StyleContext
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr StyleContext -> StyleContext
Gtk.StyleContext.StyleContext) Ptr StyleContext
result
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
widget
    StyleContext -> IO StyleContext
forall (m :: * -> *) a. Monad m => a -> m a
return StyleContext
result'

#if defined(ENABLE_OVERLOADING)
data WidgetGetStyleContextMethodInfo
instance (signature ~ (m Gtk.StyleContext.StyleContext), MonadIO m, IsWidget a) => O.MethodInfo WidgetGetStyleContextMethodInfo a signature where
    overloadedMethod = widgetGetStyleContext

#endif

-- method Widget::get_support_multidevice
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "widget"
--           , argType = TInterface Name { namespace = "Gtk" , name = "Widget" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #GtkWidget" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TBasicType TBoolean)
-- throws : False
-- Skip return : False

foreign import ccall "gtk_widget_get_support_multidevice" gtk_widget_get_support_multidevice :: 
    Ptr Widget ->                           -- widget : TInterface (Name {namespace = "Gtk", name = "Widget"})
    IO CInt

-- | Returns 'P.True' if /@widget@/ is multiple pointer aware. See
-- 'GI.Gtk.Objects.Widget.widgetSetSupportMultidevice' for more information.
widgetGetSupportMultidevice ::
    (B.CallStack.HasCallStack, MonadIO m, IsWidget a) =>
    a
    -- ^ /@widget@/: a t'GI.Gtk.Objects.Widget.Widget'
    -> m Bool
    -- ^ __Returns:__ 'P.True' if /@widget@/ is multidevice aware.
widgetGetSupportMultidevice :: a -> m Bool
widgetGetSupportMultidevice widget :: a
widget = WidgetPopupMenuCallback -> m Bool
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (WidgetPopupMenuCallback -> m Bool)
-> WidgetPopupMenuCallback -> m Bool
forall a b. (a -> b) -> a -> b
$ do
    Ptr Widget
widget' <- a -> IO (Ptr Widget)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
widget
    CInt
result <- Ptr Widget -> IO CInt
gtk_widget_get_support_multidevice Ptr Widget
widget'
    let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= 0) CInt
result
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
widget
    WidgetMnemonicActivateCallback
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'

#if defined(ENABLE_OVERLOADING)
data WidgetGetSupportMultideviceMethodInfo
instance (signature ~ (m Bool), MonadIO m, IsWidget a) => O.MethodInfo WidgetGetSupportMultideviceMethodInfo a signature where
    overloadedMethod = widgetGetSupportMultidevice

#endif

-- method Widget::get_surface
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "widget"
--           , argType = TInterface Name { namespace = "Gtk" , name = "Widget" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #GtkWidget" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TInterface Name { namespace = "Gdk" , name = "Surface" })
-- throws : False
-- Skip return : False

foreign import ccall "gtk_widget_get_surface" gtk_widget_get_surface :: 
    Ptr Widget ->                           -- widget : TInterface (Name {namespace = "Gtk", name = "Widget"})
    IO (Ptr Gdk.Surface.Surface)

-- | Returns the widget’s surface if it is realized, 'P.Nothing' otherwise
widgetGetSurface ::
    (B.CallStack.HasCallStack, MonadIO m, IsWidget a) =>
    a
    -- ^ /@widget@/: a t'GI.Gtk.Objects.Widget.Widget'
    -> m (Maybe Gdk.Surface.Surface)
    -- ^ __Returns:__ /@widget@/’s surface.
widgetGetSurface :: a -> m (Maybe Surface)
widgetGetSurface widget :: a
widget = IO (Maybe Surface) -> m (Maybe Surface)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Maybe Surface) -> m (Maybe Surface))
-> IO (Maybe Surface) -> m (Maybe Surface)
forall a b. (a -> b) -> a -> b
$ do
    Ptr Widget
widget' <- a -> IO (Ptr Widget)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
widget
    Ptr Surface
result <- Ptr Widget -> IO (Ptr Surface)
gtk_widget_get_surface Ptr Widget
widget'
    Maybe Surface
maybeResult <- Ptr Surface -> (Ptr Surface -> IO Surface) -> IO (Maybe Surface)
forall a b. Ptr a -> (Ptr a -> IO b) -> IO (Maybe b)
convertIfNonNull Ptr Surface
result ((Ptr Surface -> IO Surface) -> IO (Maybe Surface))
-> (Ptr Surface -> IO Surface) -> IO (Maybe Surface)
forall a b. (a -> b) -> a -> b
$ \result' :: Ptr Surface
result' -> do
        Surface
result'' <- ((ManagedPtr Surface -> Surface) -> Ptr Surface -> IO Surface
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr Surface -> Surface
Gdk.Surface.Surface) Ptr Surface
result'
        Surface -> IO Surface
forall (m :: * -> *) a. Monad m => a -> m a
return Surface
result''
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
widget
    Maybe Surface -> IO (Maybe Surface)
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe Surface
maybeResult

#if defined(ENABLE_OVERLOADING)
data WidgetGetSurfaceMethodInfo
instance (signature ~ (m (Maybe Gdk.Surface.Surface)), MonadIO m, IsWidget a) => O.MethodInfo WidgetGetSurfaceMethodInfo a signature where
    overloadedMethod = widgetGetSurface

#endif

-- method Widget::get_template_child
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "widget"
--           , argType = TInterface Name { namespace = "Gtk" , name = "Widget" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "A #GtkWidget" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "widget_type"
--           , argType = TBasicType TGType
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "The #GType to get a template child for"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "name"
--           , argType = TBasicType TUTF8
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText =
--                     Just "The \8220id\8221 of the child defined in the template XML"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TInterface Name { namespace = "GObject" , name = "Object" })
-- throws : False
-- Skip return : False

foreign import ccall "gtk_widget_get_template_child" gtk_widget_get_template_child :: 
    Ptr Widget ->                           -- widget : TInterface (Name {namespace = "Gtk", name = "Widget"})
    CGType ->                               -- widget_type : TBasicType TGType
    CString ->                              -- name : TBasicType TUTF8
    IO (Ptr GObject.Object.Object)

-- | Fetch an object build from the template XML for /@widgetType@/ in this /@widget@/ instance.
-- 
-- This will only report children which were previously declared with
-- 'GI.Gtk.Structs.WidgetClass.widgetClassBindTemplateChildFull' or one of its
-- variants.
-- 
-- This function is only meant to be called for code which is private to the /@widgetType@/ which
-- declared the child and is meant for language bindings which cannot easily make use
-- of the GObject structure offsets.
widgetGetTemplateChild ::
    (B.CallStack.HasCallStack, MonadIO m, IsWidget a) =>
    a
    -- ^ /@widget@/: A t'GI.Gtk.Objects.Widget.Widget'
    -> GType
    -- ^ /@widgetType@/: The t'GType' to get a template child for
    -> T.Text
    -- ^ /@name@/: The “id” of the child defined in the template XML
    -> m GObject.Object.Object
    -- ^ __Returns:__ The object built in the template XML with the id /@name@/
widgetGetTemplateChild :: a -> GType -> Text -> m Object
widgetGetTemplateChild widget :: a
widget widgetType :: GType
widgetType name :: Text
name = IO Object -> m Object
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Object -> m Object) -> IO Object -> m Object
forall a b. (a -> b) -> a -> b
$ do
    Ptr Widget
widget' <- a -> IO (Ptr Widget)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
widget
    let widgetType' :: CGType
widgetType' = GType -> CGType
gtypeToCGType GType
widgetType
    CString
name' <- Text -> IO CString
textToCString Text
name
    Ptr Object
result <- Ptr Widget -> CGType -> CString -> IO (Ptr Object)
gtk_widget_get_template_child Ptr Widget
widget' CGType
widgetType' CString
name'
    Text -> Ptr Object -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL "widgetGetTemplateChild" Ptr Object
result
    Object
result' <- ((ManagedPtr Object -> Object) -> Ptr Object -> IO Object
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr Object -> Object
GObject.Object.Object) Ptr Object
result
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
widget
    CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
name'
    Object -> IO Object
forall (m :: * -> *) a. Monad m => a -> m a
return Object
result'

#if defined(ENABLE_OVERLOADING)
data WidgetGetTemplateChildMethodInfo
instance (signature ~ (GType -> T.Text -> m GObject.Object.Object), MonadIO m, IsWidget a) => O.MethodInfo WidgetGetTemplateChildMethodInfo a signature where
    overloadedMethod = widgetGetTemplateChild

#endif

-- method Widget::get_tooltip_markup
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "widget"
--           , argType = TInterface Name { namespace = "Gtk" , name = "Widget" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #GtkWidget" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TBasicType TUTF8)
-- throws : False
-- Skip return : False

foreign import ccall "gtk_widget_get_tooltip_markup" gtk_widget_get_tooltip_markup :: 
    Ptr Widget ->                           -- widget : TInterface (Name {namespace = "Gtk", name = "Widget"})
    IO CString

-- | Gets the contents of the tooltip for /@widget@/.
widgetGetTooltipMarkup ::
    (B.CallStack.HasCallStack, MonadIO m, IsWidget a) =>
    a
    -- ^ /@widget@/: a t'GI.Gtk.Objects.Widget.Widget'
    -> m (Maybe T.Text)
    -- ^ __Returns:__ the tooltip text, or 'P.Nothing'. You should free the
    --   returned string with 'GI.GLib.Functions.free' when done.
widgetGetTooltipMarkup :: a -> m (Maybe Text)
widgetGetTooltipMarkup widget :: a
widget = IO (Maybe Text) -> m (Maybe Text)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Maybe Text) -> m (Maybe Text))
-> IO (Maybe Text) -> m (Maybe Text)
forall a b. (a -> b) -> a -> b
$ do
    Ptr Widget
widget' <- a -> IO (Ptr Widget)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
widget
    CString
result <- Ptr Widget -> IO CString
gtk_widget_get_tooltip_markup Ptr Widget
widget'
    Maybe Text
maybeResult <- CString -> (CString -> IO Text) -> IO (Maybe Text)
forall a b. Ptr a -> (Ptr a -> IO b) -> IO (Maybe b)
convertIfNonNull CString
result ((CString -> IO Text) -> IO (Maybe Text))
-> (CString -> IO Text) -> IO (Maybe Text)
forall a b. (a -> b) -> a -> b
$ \result' :: CString
result' -> do
        Text
result'' <- HasCallStack => CString -> IO Text
CString -> IO Text
cstringToText CString
result'
        CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
result'
        Text -> IO Text
forall (m :: * -> *) a. Monad m => a -> m a
return Text
result''
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
widget
    Maybe Text -> IO (Maybe Text)
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe Text
maybeResult

#if defined(ENABLE_OVERLOADING)
data WidgetGetTooltipMarkupMethodInfo
instance (signature ~ (m (Maybe T.Text)), MonadIO m, IsWidget a) => O.MethodInfo WidgetGetTooltipMarkupMethodInfo a signature where
    overloadedMethod = widgetGetTooltipMarkup

#endif

-- method Widget::get_tooltip_text
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "widget"
--           , argType = TInterface Name { namespace = "Gtk" , name = "Widget" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #GtkWidget" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TBasicType TUTF8)
-- throws : False
-- Skip return : False

foreign import ccall "gtk_widget_get_tooltip_text" gtk_widget_get_tooltip_text :: 
    Ptr Widget ->                           -- widget : TInterface (Name {namespace = "Gtk", name = "Widget"})
    IO CString

-- | Gets the contents of the tooltip for /@widget@/.
widgetGetTooltipText ::
    (B.CallStack.HasCallStack, MonadIO m, IsWidget a) =>
    a
    -- ^ /@widget@/: a t'GI.Gtk.Objects.Widget.Widget'
    -> m (Maybe T.Text)
    -- ^ __Returns:__ the tooltip text, or 'P.Nothing'. You should free the
    --   returned string with 'GI.GLib.Functions.free' when done.
widgetGetTooltipText :: a -> m (Maybe Text)
widgetGetTooltipText widget :: a
widget = IO (Maybe Text) -> m (Maybe Text)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Maybe Text) -> m (Maybe Text))
-> IO (Maybe Text) -> m (Maybe Text)
forall a b. (a -> b) -> a -> b
$ do
    Ptr Widget
widget' <- a -> IO (Ptr Widget)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
widget
    CString
result <- Ptr Widget -> IO CString
gtk_widget_get_tooltip_text Ptr Widget
widget'
    Maybe Text
maybeResult <- CString -> (CString -> IO Text) -> IO (Maybe Text)
forall a b. Ptr a -> (Ptr a -> IO b) -> IO (Maybe b)
convertIfNonNull CString
result ((CString -> IO Text) -> IO (Maybe Text))
-> (CString -> IO Text) -> IO (Maybe Text)
forall a b. (a -> b) -> a -> b
$ \result' :: CString
result' -> do
        Text
result'' <- HasCallStack => CString -> IO Text
CString -> IO Text
cstringToText CString
result'
        CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
result'
        Text -> IO Text
forall (m :: * -> *) a. Monad m => a -> m a
return Text
result''
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
widget
    Maybe Text -> IO (Maybe Text)
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe Text
maybeResult

#if defined(ENABLE_OVERLOADING)
data WidgetGetTooltipTextMethodInfo
instance (signature ~ (m (Maybe T.Text)), MonadIO m, IsWidget a) => O.MethodInfo WidgetGetTooltipTextMethodInfo a signature where
    overloadedMethod = widgetGetTooltipText

#endif

-- method Widget::get_tooltip_window
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "widget"
--           , argType = TInterface Name { namespace = "Gtk" , name = "Widget" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #GtkWidget" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TInterface Name { namespace = "Gtk" , name = "Window" })
-- throws : False
-- Skip return : False

foreign import ccall "gtk_widget_get_tooltip_window" gtk_widget_get_tooltip_window :: 
    Ptr Widget ->                           -- widget : TInterface (Name {namespace = "Gtk", name = "Widget"})
    IO (Ptr Gtk.Window.Window)

-- | Returns the t'GI.Gtk.Objects.Window.Window' of the current tooltip. This can be the
-- GtkWindow created by default, or the custom tooltip window set
-- using 'GI.Gtk.Objects.Widget.widgetSetTooltipWindow'.
widgetGetTooltipWindow ::
    (B.CallStack.HasCallStack, MonadIO m, IsWidget a) =>
    a
    -- ^ /@widget@/: a t'GI.Gtk.Objects.Widget.Widget'
    -> m Gtk.Window.Window
    -- ^ __Returns:__ The t'GI.Gtk.Objects.Window.Window' of the current tooltip.
widgetGetTooltipWindow :: a -> m Window
widgetGetTooltipWindow widget :: a
widget = IO Window -> m Window
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Window -> m Window) -> IO Window -> m Window
forall a b. (a -> b) -> a -> b
$ do
    Ptr Widget
widget' <- a -> IO (Ptr Widget)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
widget
    Ptr Window
result <- Ptr Widget -> IO (Ptr Window)
gtk_widget_get_tooltip_window Ptr Widget
widget'
    Text -> Ptr Window -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL "widgetGetTooltipWindow" Ptr Window
result
    Window
result' <- ((ManagedPtr Window -> Window) -> Ptr Window -> IO Window
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr Window -> Window
Gtk.Window.Window) Ptr Window
result
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
widget
    Window -> IO Window
forall (m :: * -> *) a. Monad m => a -> m a
return Window
result'

#if defined(ENABLE_OVERLOADING)
data WidgetGetTooltipWindowMethodInfo
instance (signature ~ (m Gtk.Window.Window), MonadIO m, IsWidget a) => O.MethodInfo WidgetGetTooltipWindowMethodInfo a signature where
    overloadedMethod = widgetGetTooltipWindow

#endif

-- method Widget::get_toplevel
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "widget"
--           , argType = TInterface Name { namespace = "Gtk" , name = "Widget" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #GtkWidget" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TInterface Name { namespace = "Gtk" , name = "Widget" })
-- throws : False
-- Skip return : False

foreign import ccall "gtk_widget_get_toplevel" gtk_widget_get_toplevel :: 
    Ptr Widget ->                           -- widget : TInterface (Name {namespace = "Gtk", name = "Widget"})
    IO (Ptr Widget)

-- | This function returns the topmost widget in the container hierarchy
-- /@widget@/ is a part of. If /@widget@/ has no parent widgets, it will be
-- returned as the topmost widget. No reference will be added to the
-- returned widget; it should not be unreferenced.
-- 
-- Note the difference in behavior vs. 'GI.Gtk.Objects.Widget.widgetGetAncestor';
-- @gtk_widget_get_ancestor (widget, GTK_TYPE_WINDOW)@
-- would return
-- 'P.Nothing' if /@widget@/ wasn’t inside a toplevel window, and if the
-- window was inside a t'GI.Gtk.Objects.Window.Window'-derived widget which was in turn
-- inside the toplevel t'GI.Gtk.Objects.Window.Window'.
-- 
-- To reliably find the toplevel t'GI.Gtk.Objects.Window.Window', use
-- 'GI.Gtk.Objects.Widget.widgetGetToplevel' and call @/GTK_IS_WINDOW()/@
-- on the result. For instance, to get the title of a widget\'s toplevel
-- window, one might use:
-- 
-- === /C code/
-- >
-- >static const char *
-- >get_widget_toplevel_title (GtkWidget *widget)
-- >{
-- >  GtkWidget *toplevel = gtk_widget_get_toplevel (widget);
-- >  if (GTK_IS_WINDOW (toplevel))
-- >    {
-- >      return gtk_window_get_title (GTK_WINDOW (toplevel));
-- >    }
-- >
-- >  return NULL;
-- >}
widgetGetToplevel ::
    (B.CallStack.HasCallStack, MonadIO m, IsWidget a) =>
    a
    -- ^ /@widget@/: a t'GI.Gtk.Objects.Widget.Widget'
    -> m Widget
    -- ^ __Returns:__ the topmost ancestor of /@widget@/, or /@widget@/ itself
    --    if there’s no ancestor.
widgetGetToplevel :: a -> m Widget
widgetGetToplevel widget :: a
widget = IO Widget -> m Widget
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Widget -> m Widget) -> IO Widget -> m Widget
forall a b. (a -> b) -> a -> b
$ do
    Ptr Widget
widget' <- a -> IO (Ptr Widget)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
widget
    Ptr Widget
result <- Ptr Widget -> IO (Ptr Widget)
gtk_widget_get_toplevel Ptr Widget
widget'
    Text -> Ptr Widget -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL "widgetGetToplevel" Ptr Widget
result
    Widget
result' <- ((ManagedPtr Widget -> Widget) -> Ptr Widget -> IO Widget
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr Widget -> Widget
Widget) Ptr Widget
result
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
widget
    Widget -> IO Widget
forall (m :: * -> *) a. Monad m => a -> m a
return Widget
result'

#if defined(ENABLE_OVERLOADING)
data WidgetGetToplevelMethodInfo
instance (signature ~ (m Widget), MonadIO m, IsWidget a) => O.MethodInfo WidgetGetToplevelMethodInfo a signature where
    overloadedMethod = widgetGetToplevel

#endif

-- method Widget::get_valign
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "widget"
--           , argType = TInterface Name { namespace = "Gtk" , name = "Widget" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #GtkWidget" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TInterface Name { namespace = "Gtk" , name = "Align" })
-- throws : False
-- Skip return : False

foreign import ccall "gtk_widget_get_valign" gtk_widget_get_valign :: 
    Ptr Widget ->                           -- widget : TInterface (Name {namespace = "Gtk", name = "Widget"})
    IO CUInt

-- | Gets the value of the t'GI.Gtk.Objects.Widget.Widget':@/valign/@ property.
widgetGetValign ::
    (B.CallStack.HasCallStack, MonadIO m, IsWidget a) =>
    a
    -- ^ /@widget@/: a t'GI.Gtk.Objects.Widget.Widget'
    -> m Gtk.Enums.Align
    -- ^ __Returns:__ the vertical alignment of /@widget@/
widgetGetValign :: a -> m Align
widgetGetValign widget :: a
widget = IO Align -> m Align
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Align -> m Align) -> IO Align -> m Align
forall a b. (a -> b) -> a -> b
$ do
    Ptr Widget
widget' <- a -> IO (Ptr Widget)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
widget
    CUInt
result <- Ptr Widget -> IO CUInt
gtk_widget_get_valign Ptr Widget
widget'
    let result' :: Align
result' = (Int -> Align
forall a. Enum a => Int -> a
toEnum (Int -> Align) -> (CUInt -> Int) -> CUInt -> Align
forall b c a. (b -> c) -> (a -> b) -> a -> c
. CUInt -> Int
forall a b. (Integral a, Num b) => a -> b
fromIntegral) CUInt
result
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
widget
    Align -> IO Align
forall (m :: * -> *) a. Monad m => a -> m a
return Align
result'

#if defined(ENABLE_OVERLOADING)
data WidgetGetValignMethodInfo
instance (signature ~ (m Gtk.Enums.Align), MonadIO m, IsWidget a) => O.MethodInfo WidgetGetValignMethodInfo a signature where
    overloadedMethod = widgetGetValign

#endif

-- method Widget::get_vexpand
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "widget"
--           , argType = TInterface Name { namespace = "Gtk" , name = "Widget" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "the widget" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TBasicType TBoolean)
-- throws : False
-- Skip return : False

foreign import ccall "gtk_widget_get_vexpand" gtk_widget_get_vexpand :: 
    Ptr Widget ->                           -- widget : TInterface (Name {namespace = "Gtk", name = "Widget"})
    IO CInt

-- | Gets whether the widget would like any available extra vertical
-- space.
-- 
-- See 'GI.Gtk.Objects.Widget.widgetGetHexpand' for more detail.
widgetGetVexpand ::
    (B.CallStack.HasCallStack, MonadIO m, IsWidget a) =>
    a
    -- ^ /@widget@/: the widget
    -> m Bool
    -- ^ __Returns:__ whether vexpand flag is set
widgetGetVexpand :: a -> m Bool
widgetGetVexpand widget :: a
widget = WidgetPopupMenuCallback -> m Bool
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (WidgetPopupMenuCallback -> m Bool)
-> WidgetPopupMenuCallback -> m Bool
forall a b. (a -> b) -> a -> b
$ do
    Ptr Widget
widget' <- a -> IO (Ptr Widget)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
widget
    CInt
result <- Ptr Widget -> IO CInt
gtk_widget_get_vexpand Ptr Widget
widget'
    let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= 0) CInt
result
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
widget
    WidgetMnemonicActivateCallback
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'

#if defined(ENABLE_OVERLOADING)
data WidgetGetVexpandMethodInfo
instance (signature ~ (m Bool), MonadIO m, IsWidget a) => O.MethodInfo WidgetGetVexpandMethodInfo a signature where
    overloadedMethod = widgetGetVexpand

#endif

-- method Widget::get_vexpand_set
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "widget"
--           , argType = TInterface Name { namespace = "Gtk" , name = "Widget" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "the widget" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TBasicType TBoolean)
-- throws : False
-- Skip return : False

foreign import ccall "gtk_widget_get_vexpand_set" gtk_widget_get_vexpand_set :: 
    Ptr Widget ->                           -- widget : TInterface (Name {namespace = "Gtk", name = "Widget"})
    IO CInt

-- | Gets whether 'GI.Gtk.Objects.Widget.widgetSetVexpand' has been used to
-- explicitly set the expand flag on this widget.
-- 
-- See 'GI.Gtk.Objects.Widget.widgetGetHexpandSet' for more detail.
widgetGetVexpandSet ::
    (B.CallStack.HasCallStack, MonadIO m, IsWidget a) =>
    a
    -- ^ /@widget@/: the widget
    -> m Bool
    -- ^ __Returns:__ whether vexpand has been explicitly set
widgetGetVexpandSet :: a -> m Bool
widgetGetVexpandSet widget :: a
widget = WidgetPopupMenuCallback -> m Bool
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (WidgetPopupMenuCallback -> m Bool)
-> WidgetPopupMenuCallback -> m Bool
forall a b. (a -> b) -> a -> b
$ do
    Ptr Widget
widget' <- a -> IO (Ptr Widget)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
widget
    CInt
result <- Ptr Widget -> IO CInt
gtk_widget_get_vexpand_set Ptr Widget
widget'
    let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= 0) CInt
result
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
widget
    WidgetMnemonicActivateCallback
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'

#if defined(ENABLE_OVERLOADING)
data WidgetGetVexpandSetMethodInfo
instance (signature ~ (m Bool), MonadIO m, IsWidget a) => O.MethodInfo WidgetGetVexpandSetMethodInfo a signature where
    overloadedMethod = widgetGetVexpandSet

#endif

-- method Widget::get_visible
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "widget"
--           , argType = TInterface Name { namespace = "Gtk" , name = "Widget" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #GtkWidget" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TBasicType TBoolean)
-- throws : False
-- Skip return : False

foreign import ccall "gtk_widget_get_visible" gtk_widget_get_visible :: 
    Ptr Widget ->                           -- widget : TInterface (Name {namespace = "Gtk", name = "Widget"})
    IO CInt

-- | Determines whether the widget is visible. If you want to
-- take into account whether the widget’s parent is also marked as
-- visible, use 'GI.Gtk.Objects.Widget.widgetIsVisible' instead.
-- 
-- This function does not check if the widget is obscured in any way.
-- 
-- See 'GI.Gtk.Objects.Widget.widgetSetVisible'.
widgetGetVisible ::
    (B.CallStack.HasCallStack, MonadIO m, IsWidget a) =>
    a
    -- ^ /@widget@/: a t'GI.Gtk.Objects.Widget.Widget'
    -> m Bool
    -- ^ __Returns:__ 'P.True' if the widget is visible
widgetGetVisible :: a -> m Bool
widgetGetVisible widget :: a
widget = WidgetPopupMenuCallback -> m Bool
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (WidgetPopupMenuCallback -> m Bool)
-> WidgetPopupMenuCallback -> m Bool
forall a b. (a -> b) -> a -> b
$ do
    Ptr Widget
widget' <- a -> IO (Ptr Widget)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
widget
    CInt
result <- Ptr Widget -> IO CInt
gtk_widget_get_visible Ptr Widget
widget'
    let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= 0) CInt
result
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
widget
    WidgetMnemonicActivateCallback
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'

#if defined(ENABLE_OVERLOADING)
data WidgetGetVisibleMethodInfo
instance (signature ~ (m Bool), MonadIO m, IsWidget a) => O.MethodInfo WidgetGetVisibleMethodInfo a signature where
    overloadedMethod = widgetGetVisible

#endif

-- method Widget::get_width
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "widget"
--           , argType = TInterface Name { namespace = "Gtk" , name = "Widget" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #GtkWidget" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TBasicType TInt)
-- throws : False
-- Skip return : False

foreign import ccall "gtk_widget_get_width" gtk_widget_get_width :: 
    Ptr Widget ->                           -- widget : TInterface (Name {namespace = "Gtk", name = "Widget"})
    IO Int32

-- | Returns the content width of the widget, as passed to its size-allocate implementation.
-- This is the size you should be using in GtkWidgetClass.@/snapshot()/@. For pointer
-- events, see 'GI.Gtk.Objects.Widget.widgetContains'.
widgetGetWidth ::
    (B.CallStack.HasCallStack, MonadIO m, IsWidget a) =>
    a
    -- ^ /@widget@/: a t'GI.Gtk.Objects.Widget.Widget'
    -> m Int32
    -- ^ __Returns:__ The width of /@widget@/
widgetGetWidth :: a -> m Int32
widgetGetWidth widget :: a
widget = IO Int32 -> m Int32
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Int32 -> m Int32) -> IO Int32 -> m Int32
forall a b. (a -> b) -> a -> b
$ do
    Ptr Widget
widget' <- a -> IO (Ptr Widget)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
widget
    Int32
result <- Ptr Widget -> IO Int32
gtk_widget_get_width Ptr Widget
widget'
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
widget
    Int32 -> IO Int32
forall (m :: * -> *) a. Monad m => a -> m a
return Int32
result

#if defined(ENABLE_OVERLOADING)
data WidgetGetWidthMethodInfo
instance (signature ~ (m Int32), MonadIO m, IsWidget a) => O.MethodInfo WidgetGetWidthMethodInfo a signature where
    overloadedMethod = widgetGetWidth

#endif

-- method Widget::grab_add
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "widget"
--           , argType = TInterface Name { namespace = "Gtk" , name = "Widget" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText =
--                     Just "The widget that grabs keyboard and pointer events"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "gtk_grab_add" gtk_grab_add :: 
    Ptr Widget ->                           -- widget : TInterface (Name {namespace = "Gtk", name = "Widget"})
    IO ()

-- | Makes /@widget@/ the current grabbed widget.
-- 
-- This means that interaction with other widgets in the same
-- application is blocked and mouse as well as keyboard events
-- are delivered to this widget.
-- 
-- If /@widget@/ is not sensitive, it is not set as the current
-- grabbed widget and this function does nothing.
widgetGrabAdd ::
    (B.CallStack.HasCallStack, MonadIO m, IsWidget a) =>
    a
    -- ^ /@widget@/: The widget that grabs keyboard and pointer events
    -> m ()
widgetGrabAdd :: a -> m ()
widgetGrabAdd widget :: a
widget = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    Ptr Widget
widget' <- a -> IO (Ptr Widget)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
widget
    Ptr Widget -> IO ()
gtk_grab_add Ptr Widget
widget'
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
widget
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()

#if defined(ENABLE_OVERLOADING)
data WidgetGrabAddMethodInfo
instance (signature ~ (m ()), MonadIO m, IsWidget a) => O.MethodInfo WidgetGrabAddMethodInfo a signature where
    overloadedMethod = widgetGrabAdd

#endif

-- method Widget::grab_focus
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "widget"
--           , argType = TInterface Name { namespace = "Gtk" , name = "Widget" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #GtkWidget" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "gtk_widget_grab_focus" gtk_widget_grab_focus :: 
    Ptr Widget ->                           -- widget : TInterface (Name {namespace = "Gtk", name = "Widget"})
    IO ()

-- | Causes /@widget@/ (or one of its descendents) to have the keyboard focus
-- for the t'GI.Gtk.Objects.Window.Window' it\'s inside.
-- 
-- /@widget@/ must be focusable, or have a [grab_focus](#signal:grab_focus) implementation that
-- transfers the focus to a descendant of /@widget@/ that is focusable.
widgetGrabFocus ::
    (B.CallStack.HasCallStack, MonadIO m, IsWidget a) =>
    a
    -- ^ /@widget@/: a t'GI.Gtk.Objects.Widget.Widget'
    -> m ()
widgetGrabFocus :: a -> m ()
widgetGrabFocus widget :: a
widget = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    Ptr Widget
widget' <- a -> IO (Ptr Widget)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
widget
    Ptr Widget -> IO ()
gtk_widget_grab_focus Ptr Widget
widget'
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
widget
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()

#if defined(ENABLE_OVERLOADING)
data WidgetGrabFocusMethodInfo
instance (signature ~ (m ()), MonadIO m, IsWidget a) => O.MethodInfo WidgetGrabFocusMethodInfo a signature where
    overloadedMethod = widgetGrabFocus

#endif

-- method Widget::grab_remove
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "widget"
--           , argType = TInterface Name { namespace = "Gtk" , name = "Widget" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "The widget which gives up the grab"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "gtk_grab_remove" gtk_grab_remove :: 
    Ptr Widget ->                           -- widget : TInterface (Name {namespace = "Gtk", name = "Widget"})
    IO ()

-- | Removes the grab from the given widget.
-- 
-- You have to pair calls to 'GI.Gtk.Objects.Widget.widgetGrabAdd' and 'GI.Gtk.Objects.Widget.widgetGrabRemove'.
-- 
-- If /@widget@/ does not have the grab, this function does nothing.
widgetGrabRemove ::
    (B.CallStack.HasCallStack, MonadIO m, IsWidget a) =>
    a
    -- ^ /@widget@/: The widget which gives up the grab
    -> m ()
widgetGrabRemove :: a -> m ()
widgetGrabRemove widget :: a
widget = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    Ptr Widget
widget' <- a -> IO (Ptr Widget)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
widget
    Ptr Widget -> IO ()
gtk_grab_remove Ptr Widget
widget'
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
widget
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()

#if defined(ENABLE_OVERLOADING)
data WidgetGrabRemoveMethodInfo
instance (signature ~ (m ()), MonadIO m, IsWidget a) => O.MethodInfo WidgetGrabRemoveMethodInfo a signature where
    overloadedMethod = widgetGrabRemove

#endif

-- method Widget::has_default
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "widget"
--           , argType = TInterface Name { namespace = "Gtk" , name = "Widget" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #GtkWidget" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TBasicType TBoolean)
-- throws : False
-- Skip return : False

foreign import ccall "gtk_widget_has_default" gtk_widget_has_default :: 
    Ptr Widget ->                           -- widget : TInterface (Name {namespace = "Gtk", name = "Widget"})
    IO CInt

-- | Determines whether /@widget@/ is the current default widget within its
-- toplevel.
widgetHasDefault ::
    (B.CallStack.HasCallStack, MonadIO m, IsWidget a) =>
    a
    -- ^ /@widget@/: a t'GI.Gtk.Objects.Widget.Widget'
    -> m Bool
    -- ^ __Returns:__ 'P.True' if /@widget@/ is the current default widget within
    --     its toplevel, 'P.False' otherwise
widgetHasDefault :: a -> m Bool
widgetHasDefault widget :: a
widget = WidgetPopupMenuCallback -> m Bool
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (WidgetPopupMenuCallback -> m Bool)
-> WidgetPopupMenuCallback -> m Bool
forall a b. (a -> b) -> a -> b
$ do
    Ptr Widget
widget' <- a -> IO (Ptr Widget)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
widget
    CInt
result <- Ptr Widget -> IO CInt
gtk_widget_has_default Ptr Widget
widget'
    let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= 0) CInt
result
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
widget
    WidgetMnemonicActivateCallback
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'

#if defined(ENABLE_OVERLOADING)
data WidgetHasDefaultMethodInfo
instance (signature ~ (m Bool), MonadIO m, IsWidget a) => O.MethodInfo WidgetHasDefaultMethodInfo a signature where
    overloadedMethod = widgetHasDefault

#endif

-- method Widget::has_focus
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "widget"
--           , argType = TInterface Name { namespace = "Gtk" , name = "Widget" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #GtkWidget" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TBasicType TBoolean)
-- throws : False
-- Skip return : False

foreign import ccall "gtk_widget_has_focus" gtk_widget_has_focus :: 
    Ptr Widget ->                           -- widget : TInterface (Name {namespace = "Gtk", name = "Widget"})
    IO CInt

-- | Determines if the widget has the global input focus. See
-- 'GI.Gtk.Objects.Widget.widgetIsFocus' for the difference between having the global
-- input focus, and only having the focus within a toplevel.
widgetHasFocus ::
    (B.CallStack.HasCallStack, MonadIO m, IsWidget a) =>
    a
    -- ^ /@widget@/: a t'GI.Gtk.Objects.Widget.Widget'
    -> m Bool
    -- ^ __Returns:__ 'P.True' if the widget has the global input focus.
widgetHasFocus :: a -> m Bool
widgetHasFocus widget :: a
widget = WidgetPopupMenuCallback -> m Bool
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (WidgetPopupMenuCallback -> m Bool)
-> WidgetPopupMenuCallback -> m Bool
forall a b. (a -> b) -> a -> b
$ do
    Ptr Widget
widget' <- a -> IO (Ptr Widget)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
widget
    CInt
result <- Ptr Widget -> IO CInt
gtk_widget_has_focus Ptr Widget
widget'
    let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= 0) CInt
result
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
widget
    WidgetMnemonicActivateCallback
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'

#if defined(ENABLE_OVERLOADING)
data WidgetHasFocusMethodInfo
instance (signature ~ (m Bool), MonadIO m, IsWidget a) => O.MethodInfo WidgetHasFocusMethodInfo a signature where
    overloadedMethod = widgetHasFocus

#endif

-- method Widget::has_grab
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "widget"
--           , argType = TInterface Name { namespace = "Gtk" , name = "Widget" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #GtkWidget" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TBasicType TBoolean)
-- throws : False
-- Skip return : False

foreign import ccall "gtk_widget_has_grab" gtk_widget_has_grab :: 
    Ptr Widget ->                           -- widget : TInterface (Name {namespace = "Gtk", name = "Widget"})
    IO CInt

-- | Determines whether the widget is currently grabbing events, so it
-- is the only widget receiving input events (keyboard and mouse).
-- 
-- See also 'GI.Gtk.Objects.Widget.widgetGrabAdd'.
widgetHasGrab ::
    (B.CallStack.HasCallStack, MonadIO m, IsWidget a) =>
    a
    -- ^ /@widget@/: a t'GI.Gtk.Objects.Widget.Widget'
    -> m Bool
    -- ^ __Returns:__ 'P.True' if the widget is in the grab_widgets stack
widgetHasGrab :: a -> m Bool
widgetHasGrab widget :: a
widget = WidgetPopupMenuCallback -> m Bool
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (WidgetPopupMenuCallback -> m Bool)
-> WidgetPopupMenuCallback -> m Bool
forall a b. (a -> b) -> a -> b
$ do
    Ptr Widget
widget' <- a -> IO (Ptr Widget)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
widget
    CInt
result <- Ptr Widget -> IO CInt
gtk_widget_has_grab Ptr Widget
widget'
    let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= 0) CInt
result
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
widget
    WidgetMnemonicActivateCallback
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'

#if defined(ENABLE_OVERLOADING)
data WidgetHasGrabMethodInfo
instance (signature ~ (m Bool), MonadIO m, IsWidget a) => O.MethodInfo WidgetHasGrabMethodInfo a signature where
    overloadedMethod = widgetHasGrab

#endif

-- method Widget::has_visible_focus
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "widget"
--           , argType = TInterface Name { namespace = "Gtk" , name = "Widget" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #GtkWidget" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TBasicType TBoolean)
-- throws : False
-- Skip return : False

foreign import ccall "gtk_widget_has_visible_focus" gtk_widget_has_visible_focus :: 
    Ptr Widget ->                           -- widget : TInterface (Name {namespace = "Gtk", name = "Widget"})
    IO CInt

-- | Determines if the widget should show a visible indication that
-- it has the global input focus. This is a convenience function for
-- use in [draw](#signal:draw) handlers that takes into account whether focus
-- indication should currently be shown in the toplevel window of
-- /@widget@/. See 'GI.Gtk.Objects.Window.windowGetFocusVisible' for more information
-- about focus indication.
-- 
-- To find out if the widget has the global input focus, use
-- 'GI.Gtk.Objects.Widget.widgetHasFocus'.
widgetHasVisibleFocus ::
    (B.CallStack.HasCallStack, MonadIO m, IsWidget a) =>
    a
    -- ^ /@widget@/: a t'GI.Gtk.Objects.Widget.Widget'
    -> m Bool
    -- ^ __Returns:__ 'P.True' if the widget should display a “focus rectangle”
widgetHasVisibleFocus :: a -> m Bool
widgetHasVisibleFocus widget :: a
widget = WidgetPopupMenuCallback -> m Bool
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (WidgetPopupMenuCallback -> m Bool)
-> WidgetPopupMenuCallback -> m Bool
forall a b. (a -> b) -> a -> b
$ do
    Ptr Widget
widget' <- a -> IO (Ptr Widget)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
widget
    CInt
result <- Ptr Widget -> IO CInt
gtk_widget_has_visible_focus Ptr Widget
widget'
    let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= 0) CInt
result
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
widget
    WidgetMnemonicActivateCallback
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'

#if defined(ENABLE_OVERLOADING)
data WidgetHasVisibleFocusMethodInfo
instance (signature ~ (m Bool), MonadIO m, IsWidget a) => O.MethodInfo WidgetHasVisibleFocusMethodInfo a signature where
    overloadedMethod = widgetHasVisibleFocus

#endif

-- method Widget::hide
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "widget"
--           , argType = TInterface Name { namespace = "Gtk" , name = "Widget" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #GtkWidget" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "gtk_widget_hide" gtk_widget_hide :: 
    Ptr Widget ->                           -- widget : TInterface (Name {namespace = "Gtk", name = "Widget"})
    IO ()

-- | Reverses the effects of 'GI.Gtk.Objects.Widget.widgetShow', causing the widget to be
-- hidden (invisible to the user).
widgetHide ::
    (B.CallStack.HasCallStack, MonadIO m, IsWidget a) =>
    a
    -- ^ /@widget@/: a t'GI.Gtk.Objects.Widget.Widget'
    -> m ()
widgetHide :: a -> m ()
widgetHide widget :: a
widget = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    Ptr Widget
widget' <- a -> IO (Ptr Widget)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
widget
    Ptr Widget -> IO ()
gtk_widget_hide Ptr Widget
widget'
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
widget
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()

#if defined(ENABLE_OVERLOADING)
data WidgetHideMethodInfo
instance (signature ~ (m ()), MonadIO m, IsWidget a) => O.MethodInfo WidgetHideMethodInfo a signature where
    overloadedMethod = widgetHide

#endif

-- method Widget::in_destruction
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "widget"
--           , argType = TInterface Name { namespace = "Gtk" , name = "Widget" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #GtkWidget" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TBasicType TBoolean)
-- throws : False
-- Skip return : False

foreign import ccall "gtk_widget_in_destruction" gtk_widget_in_destruction :: 
    Ptr Widget ->                           -- widget : TInterface (Name {namespace = "Gtk", name = "Widget"})
    IO CInt

-- | Returns whether the widget is currently being destroyed.
-- This information can sometimes be used to avoid doing
-- unnecessary work.
widgetInDestruction ::
    (B.CallStack.HasCallStack, MonadIO m, IsWidget a) =>
    a
    -- ^ /@widget@/: a t'GI.Gtk.Objects.Widget.Widget'
    -> m Bool
    -- ^ __Returns:__ 'P.True' if /@widget@/ is being destroyed
widgetInDestruction :: a -> m Bool
widgetInDestruction widget :: a
widget = WidgetPopupMenuCallback -> m Bool
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (WidgetPopupMenuCallback -> m Bool)
-> WidgetPopupMenuCallback -> m Bool
forall a b. (a -> b) -> a -> b
$ do
    Ptr Widget
widget' <- a -> IO (Ptr Widget)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
widget
    CInt
result <- Ptr Widget -> IO CInt
gtk_widget_in_destruction Ptr Widget
widget'
    let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= 0) CInt
result
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
widget
    WidgetMnemonicActivateCallback
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'

#if defined(ENABLE_OVERLOADING)
data WidgetInDestructionMethodInfo
instance (signature ~ (m Bool), MonadIO m, IsWidget a) => O.MethodInfo WidgetInDestructionMethodInfo a signature where
    overloadedMethod = widgetInDestruction

#endif

-- method Widget::init_template
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "widget"
--           , argType = TInterface Name { namespace = "Gtk" , name = "Widget" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #GtkWidget" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "gtk_widget_init_template" gtk_widget_init_template :: 
    Ptr Widget ->                           -- widget : TInterface (Name {namespace = "Gtk", name = "Widget"})
    IO ()

-- | Creates and initializes child widgets defined in templates. This
-- function must be called in the instance initializer for any
-- class which assigned itself a template using 'GI.Gtk.Structs.WidgetClass.widgetClassSetTemplate'
-- 
-- It is important to call this function in the instance initializer
-- of a t'GI.Gtk.Objects.Widget.Widget' subclass and not in t'GI.GObject.Objects.Object.Object'.@/constructed/@() or
-- t'GI.GObject.Objects.Object.Object'.@/constructor/@() for two reasons.
-- 
-- One reason is that generally derived widgets will assume that parent
-- class composite widgets have been created in their instance
-- initializers.
-- 
-- Another reason is that when calling @/g_object_new()/@ on a widget with
-- composite templates, it’s important to build the composite widgets
-- before the construct properties are set. Properties passed to @/g_object_new()/@
-- should take precedence over properties set in the private template XML.
widgetInitTemplate ::
    (B.CallStack.HasCallStack, MonadIO m, IsWidget a) =>
    a
    -- ^ /@widget@/: a t'GI.Gtk.Objects.Widget.Widget'
    -> m ()
widgetInitTemplate :: a -> m ()
widgetInitTemplate widget :: a
widget = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    Ptr Widget
widget' <- a -> IO (Ptr Widget)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
widget
    Ptr Widget -> IO ()
gtk_widget_init_template Ptr Widget
widget'
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
widget
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()

#if defined(ENABLE_OVERLOADING)
data WidgetInitTemplateMethodInfo
instance (signature ~ (m ()), MonadIO m, IsWidget a) => O.MethodInfo WidgetInitTemplateMethodInfo a signature where
    overloadedMethod = widgetInitTemplate

#endif

-- method Widget::input_shape_combine_region
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "widget"
--           , argType = TInterface Name { namespace = "Gtk" , name = "Widget" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #GtkWidget" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "region"
--           , argType =
--               TInterface Name { namespace = "cairo" , name = "Region" }
--           , direction = DirectionIn
--           , mayBeNull = True
--           , argDoc =
--               Documentation
--                 { rawDocText =
--                     Just "shape to be added, or %NULL to remove an existing shape"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "gtk_widget_input_shape_combine_region" gtk_widget_input_shape_combine_region :: 
    Ptr Widget ->                           -- widget : TInterface (Name {namespace = "Gtk", name = "Widget"})
    Ptr Cairo.Region.Region ->              -- region : TInterface (Name {namespace = "cairo", name = "Region"})
    IO ()

-- | Sets an input shape for this widget’s GDK surface. This allows for
-- windows which react to mouse click in a nonrectangular region, see
-- 'GI.Gdk.Objects.Surface.surfaceInputShapeCombineRegion' for more information.
widgetInputShapeCombineRegion ::
    (B.CallStack.HasCallStack, MonadIO m, IsWidget a) =>
    a
    -- ^ /@widget@/: a t'GI.Gtk.Objects.Widget.Widget'
    -> Maybe (Cairo.Region.Region)
    -- ^ /@region@/: shape to be added, or 'P.Nothing' to remove an existing shape
    -> m ()
widgetInputShapeCombineRegion :: a -> Maybe Region -> m ()
widgetInputShapeCombineRegion widget :: a
widget region :: Maybe Region
region = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    Ptr Widget
widget' <- a -> IO (Ptr Widget)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
widget
    Ptr Region
maybeRegion <- case Maybe Region
region of
        Nothing -> Ptr Region -> IO (Ptr Region)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr Region
forall a. Ptr a
nullPtr
        Just jRegion :: Region
jRegion -> do
            Ptr Region
jRegion' <- Region -> IO (Ptr Region)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr Region
jRegion
            Ptr Region -> IO (Ptr Region)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr Region
jRegion'
    Ptr Widget -> Ptr Region -> IO ()
gtk_widget_input_shape_combine_region Ptr Widget
widget' Ptr Region
maybeRegion
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
widget
    Maybe Region -> (Region -> IO ()) -> IO ()
forall (m :: * -> *) a. Monad m => Maybe a -> (a -> m ()) -> m ()
whenJust Maybe Region
region Region -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()

#if defined(ENABLE_OVERLOADING)
data WidgetInputShapeCombineRegionMethodInfo
instance (signature ~ (Maybe (Cairo.Region.Region) -> m ()), MonadIO m, IsWidget a) => O.MethodInfo WidgetInputShapeCombineRegionMethodInfo a signature where
    overloadedMethod = widgetInputShapeCombineRegion

#endif

-- method Widget::insert_action_group
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "widget"
--           , argType = TInterface Name { namespace = "Gtk" , name = "Widget" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #GtkWidget" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "name"
--           , argType = TBasicType TUTF8
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "the prefix for actions in @group"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "group"
--           , argType =
--               TInterface Name { namespace = "Gio" , name = "ActionGroup" }
--           , direction = DirectionIn
--           , mayBeNull = True
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #GActionGroup, or %NULL"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "gtk_widget_insert_action_group" gtk_widget_insert_action_group :: 
    Ptr Widget ->                           -- widget : TInterface (Name {namespace = "Gtk", name = "Widget"})
    CString ->                              -- name : TBasicType TUTF8
    Ptr Gio.ActionGroup.ActionGroup ->      -- group : TInterface (Name {namespace = "Gio", name = "ActionGroup"})
    IO ()

-- | Inserts /@group@/ into /@widget@/. Children of /@widget@/ that implement
-- t'GI.Gtk.Interfaces.Actionable.Actionable' can then be associated with actions in /@group@/ by
-- setting their “action-name” to
-- /@prefix@/.@action-name@.
-- 
-- If /@group@/ is 'P.Nothing', a previously inserted group for /@name@/ is removed
-- from /@widget@/.
widgetInsertActionGroup ::
    (B.CallStack.HasCallStack, MonadIO m, IsWidget a, Gio.ActionGroup.IsActionGroup b) =>
    a
    -- ^ /@widget@/: a t'GI.Gtk.Objects.Widget.Widget'
    -> T.Text
    -- ^ /@name@/: the prefix for actions in /@group@/
    -> Maybe (b)
    -- ^ /@group@/: a t'GI.Gio.Interfaces.ActionGroup.ActionGroup', or 'P.Nothing'
    -> m ()
widgetInsertActionGroup :: a -> Text -> Maybe b -> m ()
widgetInsertActionGroup widget :: a
widget name :: Text
name group :: Maybe b
group = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    Ptr Widget
widget' <- a -> IO (Ptr Widget)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
widget
    CString
name' <- Text -> IO CString
textToCString Text
name
    Ptr ActionGroup
maybeGroup <- case Maybe b
group of
        Nothing -> Ptr ActionGroup -> IO (Ptr ActionGroup)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr ActionGroup
forall a. Ptr a
nullPtr
        Just jGroup :: b
jGroup -> do
            Ptr ActionGroup
jGroup' <- b -> IO (Ptr ActionGroup)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
jGroup
            Ptr ActionGroup -> IO (Ptr ActionGroup)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr ActionGroup
jGroup'
    Ptr Widget -> CString -> Ptr ActionGroup -> IO ()
gtk_widget_insert_action_group Ptr Widget
widget' CString
name' Ptr ActionGroup
maybeGroup
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
widget
    Maybe b -> (b -> IO ()) -> IO ()
forall (m :: * -> *) a. Monad m => Maybe a -> (a -> m ()) -> m ()
whenJust Maybe b
group b -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr
    CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
name'
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()

#if defined(ENABLE_OVERLOADING)
data WidgetInsertActionGroupMethodInfo
instance (signature ~ (T.Text -> Maybe (b) -> m ()), MonadIO m, IsWidget a, Gio.ActionGroup.IsActionGroup b) => O.MethodInfo WidgetInsertActionGroupMethodInfo a signature where
    overloadedMethod = widgetInsertActionGroup

#endif

-- method Widget::insert_after
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "widget"
--           , argType = TInterface Name { namespace = "Gtk" , name = "Widget" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #GtkWidget" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "parent"
--           , argType = TInterface Name { namespace = "Gtk" , name = "Widget" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "the parent #GtkWidget to insert @widget into"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "previous_sibling"
--           , argType = TInterface Name { namespace = "Gtk" , name = "Widget" }
--           , direction = DirectionIn
--           , mayBeNull = True
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "the new previous sibling of @widget or %NULL"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "gtk_widget_insert_after" gtk_widget_insert_after :: 
    Ptr Widget ->                           -- widget : TInterface (Name {namespace = "Gtk", name = "Widget"})
    Ptr Widget ->                           -- parent : TInterface (Name {namespace = "Gtk", name = "Widget"})
    Ptr Widget ->                           -- previous_sibling : TInterface (Name {namespace = "Gtk", name = "Widget"})
    IO ()

-- | Inserts /@widget@/ into the child widget list of /@parent@/.
-- It will be placed after /@previousSibling@/, or at the beginning if /@previousSibling@/ is 'P.Nothing'.
-- 
-- After calling this function, gtk_widget_get_prev_sibling(widget) will return /@previousSibling@/.
-- 
-- If /@parent@/ is already set as the parent widget of /@widget@/, this function can also be used
-- to reorder /@widget@/ in the child widget list of /@parent@/.
widgetInsertAfter ::
    (B.CallStack.HasCallStack, MonadIO m, IsWidget a, IsWidget b, IsWidget c) =>
    a
    -- ^ /@widget@/: a t'GI.Gtk.Objects.Widget.Widget'
    -> b
    -- ^ /@parent@/: the parent t'GI.Gtk.Objects.Widget.Widget' to insert /@widget@/ into
    -> Maybe (c)
    -- ^ /@previousSibling@/: the new previous sibling of /@widget@/ or 'P.Nothing'
    -> m ()
widgetInsertAfter :: a -> b -> Maybe c -> m ()
widgetInsertAfter widget :: a
widget parent :: b
parent previousSibling :: Maybe c
previousSibling = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    Ptr Widget
widget' <- a -> IO (Ptr Widget)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
widget
    Ptr Widget
parent' <- b -> IO (Ptr Widget)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
parent
    Ptr Widget
maybePreviousSibling <- case Maybe c
previousSibling of
        Nothing -> Ptr Widget -> IO (Ptr Widget)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr Widget
forall a. Ptr a
nullPtr
        Just jPreviousSibling :: c
jPreviousSibling -> do
            Ptr Widget
jPreviousSibling' <- c -> IO (Ptr Widget)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr c
jPreviousSibling
            Ptr Widget -> IO (Ptr Widget)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr Widget
jPreviousSibling'
    Ptr Widget -> Ptr Widget -> Ptr Widget -> IO ()
gtk_widget_insert_after Ptr Widget
widget' Ptr Widget
parent' Ptr Widget
maybePreviousSibling
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
widget
    b -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr b
parent
    Maybe c -> (c -> IO ()) -> IO ()
forall (m :: * -> *) a. Monad m => Maybe a -> (a -> m ()) -> m ()
whenJust Maybe c
previousSibling c -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()

#if defined(ENABLE_OVERLOADING)
data WidgetInsertAfterMethodInfo
instance (signature ~ (b -> Maybe (c) -> m ()), MonadIO m, IsWidget a, IsWidget b, IsWidget c) => O.MethodInfo WidgetInsertAfterMethodInfo a signature where
    overloadedMethod = widgetInsertAfter

#endif

-- method Widget::insert_before
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "widget"
--           , argType = TInterface Name { namespace = "Gtk" , name = "Widget" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #GtkWidget" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "parent"
--           , argType = TInterface Name { namespace = "Gtk" , name = "Widget" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "the parent #GtkWidget to insert @widget into"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "next_sibling"
--           , argType = TInterface Name { namespace = "Gtk" , name = "Widget" }
--           , direction = DirectionIn
--           , mayBeNull = True
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "the new next sibling of @widget or %NULL"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "gtk_widget_insert_before" gtk_widget_insert_before :: 
    Ptr Widget ->                           -- widget : TInterface (Name {namespace = "Gtk", name = "Widget"})
    Ptr Widget ->                           -- parent : TInterface (Name {namespace = "Gtk", name = "Widget"})
    Ptr Widget ->                           -- next_sibling : TInterface (Name {namespace = "Gtk", name = "Widget"})
    IO ()

-- | Inserts /@widget@/ into the child widget list of /@parent@/.
-- It will be placed before /@nextSibling@/, or at the end if /@nextSibling@/ is 'P.Nothing'.
-- 
-- After calling this function, gtk_widget_get_next_sibling(widget) will return /@nextSibling@/.
-- 
-- If /@parent@/ is already set as the parent widget of /@widget@/, this function can also be used
-- to reorder /@widget@/ in the child widget list of /@parent@/.
widgetInsertBefore ::
    (B.CallStack.HasCallStack, MonadIO m, IsWidget a, IsWidget b, IsWidget c) =>
    a
    -- ^ /@widget@/: a t'GI.Gtk.Objects.Widget.Widget'
    -> b
    -- ^ /@parent@/: the parent t'GI.Gtk.Objects.Widget.Widget' to insert /@widget@/ into
    -> Maybe (c)
    -- ^ /@nextSibling@/: the new next sibling of /@widget@/ or 'P.Nothing'
    -> m ()
widgetInsertBefore :: a -> b -> Maybe c -> m ()
widgetInsertBefore widget :: a
widget parent :: b
parent nextSibling :: Maybe c
nextSibling = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    Ptr Widget
widget' <- a -> IO (Ptr Widget)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
widget
    Ptr Widget
parent' <- b -> IO (Ptr Widget)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
parent
    Ptr Widget
maybeNextSibling <- case Maybe c
nextSibling of
        Nothing -> Ptr Widget -> IO (Ptr Widget)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr Widget
forall a. Ptr a
nullPtr
        Just jNextSibling :: c
jNextSibling -> do
            Ptr Widget
jNextSibling' <- c -> IO (Ptr Widget)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr c
jNextSibling
            Ptr Widget -> IO (Ptr Widget)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr Widget
jNextSibling'
    Ptr Widget -> Ptr Widget -> Ptr Widget -> IO ()
gtk_widget_insert_before Ptr Widget
widget' Ptr Widget
parent' Ptr Widget
maybeNextSibling
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
widget
    b -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr b
parent
    Maybe c -> (c -> IO ()) -> IO ()
forall (m :: * -> *) a. Monad m => Maybe a -> (a -> m ()) -> m ()
whenJust Maybe c
nextSibling c -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()

#if defined(ENABLE_OVERLOADING)
data WidgetInsertBeforeMethodInfo
instance (signature ~ (b -> Maybe (c) -> m ()), MonadIO m, IsWidget a, IsWidget b, IsWidget c) => O.MethodInfo WidgetInsertBeforeMethodInfo a signature where
    overloadedMethod = widgetInsertBefore

#endif

-- method Widget::is_ancestor
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "widget"
--           , argType = TInterface Name { namespace = "Gtk" , name = "Widget" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #GtkWidget" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "ancestor"
--           , argType = TInterface Name { namespace = "Gtk" , name = "Widget" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "another #GtkWidget" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TBasicType TBoolean)
-- throws : False
-- Skip return : False

foreign import ccall "gtk_widget_is_ancestor" gtk_widget_is_ancestor :: 
    Ptr Widget ->                           -- widget : TInterface (Name {namespace = "Gtk", name = "Widget"})
    Ptr Widget ->                           -- ancestor : TInterface (Name {namespace = "Gtk", name = "Widget"})
    IO CInt

-- | Determines whether /@widget@/ is somewhere inside /@ancestor@/, possibly with
-- intermediate containers.
widgetIsAncestor ::
    (B.CallStack.HasCallStack, MonadIO m, IsWidget a, IsWidget b) =>
    a
    -- ^ /@widget@/: a t'GI.Gtk.Objects.Widget.Widget'
    -> b
    -- ^ /@ancestor@/: another t'GI.Gtk.Objects.Widget.Widget'
    -> m Bool
    -- ^ __Returns:__ 'P.True' if /@ancestor@/ contains /@widget@/ as a child,
    --    grandchild, great grandchild, etc.
widgetIsAncestor :: a -> b -> m Bool
widgetIsAncestor widget :: a
widget ancestor :: b
ancestor = WidgetPopupMenuCallback -> m Bool
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (WidgetPopupMenuCallback -> m Bool)
-> WidgetPopupMenuCallback -> m Bool
forall a b. (a -> b) -> a -> b
$ do
    Ptr Widget
widget' <- a -> IO (Ptr Widget)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
widget
    Ptr Widget
ancestor' <- b -> IO (Ptr Widget)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
ancestor
    CInt
result <- Ptr Widget -> Ptr Widget -> IO CInt
gtk_widget_is_ancestor Ptr Widget
widget' Ptr Widget
ancestor'
    let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= 0) CInt
result
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
widget
    b -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr b
ancestor
    WidgetMnemonicActivateCallback
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'

#if defined(ENABLE_OVERLOADING)
data WidgetIsAncestorMethodInfo
instance (signature ~ (b -> m Bool), MonadIO m, IsWidget a, IsWidget b) => O.MethodInfo WidgetIsAncestorMethodInfo a signature where
    overloadedMethod = widgetIsAncestor

#endif

-- method Widget::is_drawable
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "widget"
--           , argType = TInterface Name { namespace = "Gtk" , name = "Widget" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #GtkWidget" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TBasicType TBoolean)
-- throws : False
-- Skip return : False

foreign import ccall "gtk_widget_is_drawable" gtk_widget_is_drawable :: 
    Ptr Widget ->                           -- widget : TInterface (Name {namespace = "Gtk", name = "Widget"})
    IO CInt

-- | Determines whether /@widget@/ can be drawn to. A widget can be drawn
-- if it is mapped and visible.
widgetIsDrawable ::
    (B.CallStack.HasCallStack, MonadIO m, IsWidget a) =>
    a
    -- ^ /@widget@/: a t'GI.Gtk.Objects.Widget.Widget'
    -> m Bool
    -- ^ __Returns:__ 'P.True' if /@widget@/ is drawable, 'P.False' otherwise
widgetIsDrawable :: a -> m Bool
widgetIsDrawable widget :: a
widget = WidgetPopupMenuCallback -> m Bool
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (WidgetPopupMenuCallback -> m Bool)
-> WidgetPopupMenuCallback -> m Bool
forall a b. (a -> b) -> a -> b
$ do
    Ptr Widget
widget' <- a -> IO (Ptr Widget)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
widget
    CInt
result <- Ptr Widget -> IO CInt
gtk_widget_is_drawable Ptr Widget
widget'
    let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= 0) CInt
result
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
widget
    WidgetMnemonicActivateCallback
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'

#if defined(ENABLE_OVERLOADING)
data WidgetIsDrawableMethodInfo
instance (signature ~ (m Bool), MonadIO m, IsWidget a) => O.MethodInfo WidgetIsDrawableMethodInfo a signature where
    overloadedMethod = widgetIsDrawable

#endif

-- method Widget::is_focus
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "widget"
--           , argType = TInterface Name { namespace = "Gtk" , name = "Widget" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #GtkWidget" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TBasicType TBoolean)
-- throws : False
-- Skip return : False

foreign import ccall "gtk_widget_is_focus" gtk_widget_is_focus :: 
    Ptr Widget ->                           -- widget : TInterface (Name {namespace = "Gtk", name = "Widget"})
    IO CInt

-- | Determines if the widget is the focus widget within its
-- toplevel. (This does not mean that the t'GI.Gtk.Objects.Widget.Widget':@/has-focus/@ property is
-- necessarily set; t'GI.Gtk.Objects.Widget.Widget':@/has-focus/@ will only be set if the
-- toplevel widget additionally has the global input focus.)
widgetIsFocus ::
    (B.CallStack.HasCallStack, MonadIO m, IsWidget a) =>
    a
    -- ^ /@widget@/: a t'GI.Gtk.Objects.Widget.Widget'
    -> m Bool
    -- ^ __Returns:__ 'P.True' if the widget is the focus widget.
widgetIsFocus :: a -> m Bool
widgetIsFocus widget :: a
widget = WidgetPopupMenuCallback -> m Bool
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (WidgetPopupMenuCallback -> m Bool)
-> WidgetPopupMenuCallback -> m Bool
forall a b. (a -> b) -> a -> b
$ do
    Ptr Widget
widget' <- a -> IO (Ptr Widget)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
widget
    CInt
result <- Ptr Widget -> IO CInt
gtk_widget_is_focus Ptr Widget
widget'
    let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= 0) CInt
result
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
widget
    WidgetMnemonicActivateCallback
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'

#if defined(ENABLE_OVERLOADING)
data WidgetIsFocusMethodInfo
instance (signature ~ (m Bool), MonadIO m, IsWidget a) => O.MethodInfo WidgetIsFocusMethodInfo a signature where
    overloadedMethod = widgetIsFocus

#endif

-- method Widget::is_sensitive
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "widget"
--           , argType = TInterface Name { namespace = "Gtk" , name = "Widget" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #GtkWidget" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TBasicType TBoolean)
-- throws : False
-- Skip return : False

foreign import ccall "gtk_widget_is_sensitive" gtk_widget_is_sensitive :: 
    Ptr Widget ->                           -- widget : TInterface (Name {namespace = "Gtk", name = "Widget"})
    IO CInt

-- | Returns the widget’s effective sensitivity, which means
-- it is sensitive itself and also its parent widget is sensitive
widgetIsSensitive ::
    (B.CallStack.HasCallStack, MonadIO m, IsWidget a) =>
    a
    -- ^ /@widget@/: a t'GI.Gtk.Objects.Widget.Widget'
    -> m Bool
    -- ^ __Returns:__ 'P.True' if the widget is effectively sensitive
widgetIsSensitive :: a -> m Bool
widgetIsSensitive widget :: a
widget = WidgetPopupMenuCallback -> m Bool
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (WidgetPopupMenuCallback -> m Bool)
-> WidgetPopupMenuCallback -> m Bool
forall a b. (a -> b) -> a -> b
$ do
    Ptr Widget
widget' <- a -> IO (Ptr Widget)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
widget
    CInt
result <- Ptr Widget -> IO CInt
gtk_widget_is_sensitive Ptr Widget
widget'
    let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= 0) CInt
result
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
widget
    WidgetMnemonicActivateCallback
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'

#if defined(ENABLE_OVERLOADING)
data WidgetIsSensitiveMethodInfo
instance (signature ~ (m Bool), MonadIO m, IsWidget a) => O.MethodInfo WidgetIsSensitiveMethodInfo a signature where
    overloadedMethod = widgetIsSensitive

#endif

-- method Widget::is_toplevel
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "widget"
--           , argType = TInterface Name { namespace = "Gtk" , name = "Widget" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #GtkWidget" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TBasicType TBoolean)
-- throws : False
-- Skip return : False

foreign import ccall "gtk_widget_is_toplevel" gtk_widget_is_toplevel :: 
    Ptr Widget ->                           -- widget : TInterface (Name {namespace = "Gtk", name = "Widget"})
    IO CInt

-- | Determines whether /@widget@/ is a toplevel widget.
-- 
-- Currently only @/GtkWindows/@ are toplevel widgets.
-- Toplevel widgets have no parent widget and implement
-- the t'GI.Gtk.Interfaces.Root.Root' interface.
widgetIsToplevel ::
    (B.CallStack.HasCallStack, MonadIO m, IsWidget a) =>
    a
    -- ^ /@widget@/: a t'GI.Gtk.Objects.Widget.Widget'
    -> m Bool
    -- ^ __Returns:__ 'P.True' if /@widget@/ is a toplevel, 'P.False' otherwise
widgetIsToplevel :: a -> m Bool
widgetIsToplevel widget :: a
widget = WidgetPopupMenuCallback -> m Bool
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (WidgetPopupMenuCallback -> m Bool)
-> WidgetPopupMenuCallback -> m Bool
forall a b. (a -> b) -> a -> b
$ do
    Ptr Widget
widget' <- a -> IO (Ptr Widget)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
widget
    CInt
result <- Ptr Widget -> IO CInt
gtk_widget_is_toplevel Ptr Widget
widget'
    let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= 0) CInt
result
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
widget
    WidgetMnemonicActivateCallback
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'

#if defined(ENABLE_OVERLOADING)
data WidgetIsToplevelMethodInfo
instance (signature ~ (m Bool), MonadIO m, IsWidget a) => O.MethodInfo WidgetIsToplevelMethodInfo a signature where
    overloadedMethod = widgetIsToplevel

#endif

-- method Widget::is_visible
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "widget"
--           , argType = TInterface Name { namespace = "Gtk" , name = "Widget" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #GtkWidget" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TBasicType TBoolean)
-- throws : False
-- Skip return : False

foreign import ccall "gtk_widget_is_visible" gtk_widget_is_visible :: 
    Ptr Widget ->                           -- widget : TInterface (Name {namespace = "Gtk", name = "Widget"})
    IO CInt

-- | Determines whether the widget and all its parents are marked as
-- visible.
-- 
-- This function does not check if the widget is obscured in any way.
-- 
-- See also 'GI.Gtk.Objects.Widget.widgetGetVisible' and 'GI.Gtk.Objects.Widget.widgetSetVisible'
widgetIsVisible ::
    (B.CallStack.HasCallStack, MonadIO m, IsWidget a) =>
    a
    -- ^ /@widget@/: a t'GI.Gtk.Objects.Widget.Widget'
    -> m Bool
    -- ^ __Returns:__ 'P.True' if the widget and all its parents are visible
widgetIsVisible :: a -> m Bool
widgetIsVisible widget :: a
widget = WidgetPopupMenuCallback -> m Bool
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (WidgetPopupMenuCallback -> m Bool)
-> WidgetPopupMenuCallback -> m Bool
forall a b. (a -> b) -> a -> b
$ do
    Ptr Widget
widget' <- a -> IO (Ptr Widget)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
widget
    CInt
result <- Ptr Widget -> IO CInt
gtk_widget_is_visible Ptr Widget
widget'
    let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= 0) CInt
result
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
widget
    WidgetMnemonicActivateCallback
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'

#if defined(ENABLE_OVERLOADING)
data WidgetIsVisibleMethodInfo
instance (signature ~ (m Bool), MonadIO m, IsWidget a) => O.MethodInfo WidgetIsVisibleMethodInfo a signature where
    overloadedMethod = widgetIsVisible

#endif

-- method Widget::keynav_failed
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "widget"
--           , argType = TInterface Name { namespace = "Gtk" , name = "Widget" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #GtkWidget" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "direction"
--           , argType =
--               TInterface Name { namespace = "Gtk" , name = "DirectionType" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "direction of focus movement"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TBasicType TBoolean)
-- throws : False
-- Skip return : False

foreign import ccall "gtk_widget_keynav_failed" gtk_widget_keynav_failed :: 
    Ptr Widget ->                           -- widget : TInterface (Name {namespace = "Gtk", name = "Widget"})
    CUInt ->                                -- direction : TInterface (Name {namespace = "Gtk", name = "DirectionType"})
    IO CInt

-- | This function should be called whenever keyboard navigation within
-- a single widget hits a boundary. The function emits the
-- [keynavFailed]("GI.Gtk.Objects.Widget#signal:keynavFailed") signal on the widget and its return
-- value should be interpreted in a way similar to the return value of
-- 'GI.Gtk.Objects.Widget.widgetChildFocus':
-- 
-- When 'P.True' is returned, stay in the widget, the failed keyboard
-- navigation is OK and\/or there is nowhere we can\/should move the
-- focus to.
-- 
-- When 'P.False' is returned, the caller should continue with keyboard
-- navigation outside the widget, e.g. by calling
-- 'GI.Gtk.Objects.Widget.widgetChildFocus' on the widget’s toplevel.
-- 
-- The default [keynavFailed](#signal:keynavFailed) handler returns 'P.False' for
-- 'GI.Gtk.Enums.DirectionTypeTabForward' and 'GI.Gtk.Enums.DirectionTypeTabBackward'. For the other
-- values of t'GI.Gtk.Enums.DirectionType' it returns 'P.True'.
-- 
-- Whenever the default handler returns 'P.True', it also calls
-- 'GI.Gtk.Objects.Widget.widgetErrorBell' to notify the user of the failed keyboard
-- navigation.
-- 
-- A use case for providing an own implementation of [keynavFailed](#signal:keynavFailed)
-- (either by connecting to it or by overriding it) would be a row of
-- t'GI.Gtk.Objects.Entry.Entry' widgets where the user should be able to navigate the
-- entire row with the cursor keys, as e.g. known from user interfaces
-- that require entering license keys.
widgetKeynavFailed ::
    (B.CallStack.HasCallStack, MonadIO m, IsWidget a) =>
    a
    -- ^ /@widget@/: a t'GI.Gtk.Objects.Widget.Widget'
    -> Gtk.Enums.DirectionType
    -- ^ /@direction@/: direction of focus movement
    -> m Bool
    -- ^ __Returns:__ 'P.True' if stopping keyboard navigation is fine, 'P.False'
    --               if the emitting widget should try to handle the keyboard
    --               navigation attempt in its parent container(s).
widgetKeynavFailed :: a -> DirectionType -> m Bool
widgetKeynavFailed widget :: a
widget direction :: DirectionType
direction = WidgetPopupMenuCallback -> m Bool
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (WidgetPopupMenuCallback -> m Bool)
-> WidgetPopupMenuCallback -> m Bool
forall a b. (a -> b) -> a -> b
$ do
    Ptr Widget
widget' <- a -> IO (Ptr Widget)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
widget
    let direction' :: CUInt
direction' = (Int -> CUInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CUInt) -> (DirectionType -> Int) -> DirectionType -> CUInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. DirectionType -> Int
forall a. Enum a => a -> Int
fromEnum) DirectionType
direction
    CInt
result <- Ptr Widget -> CUInt -> IO CInt
gtk_widget_keynav_failed Ptr Widget
widget' CUInt
direction'
    let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= 0) CInt
result
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
widget
    WidgetMnemonicActivateCallback
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'

#if defined(ENABLE_OVERLOADING)
data WidgetKeynavFailedMethodInfo
instance (signature ~ (Gtk.Enums.DirectionType -> m Bool), MonadIO m, IsWidget a) => O.MethodInfo WidgetKeynavFailedMethodInfo a signature where
    overloadedMethod = widgetKeynavFailed

#endif

-- method Widget::list_accel_closures
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "widget"
--           , argType = TInterface Name { namespace = "Gtk" , name = "Widget" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "widget to list accelerator closures for"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TGList (TGClosure Nothing))
-- throws : False
-- Skip return : False

foreign import ccall "gtk_widget_list_accel_closures" gtk_widget_list_accel_closures :: 
    Ptr Widget ->                           -- widget : TInterface (Name {namespace = "Gtk", name = "Widget"})
    IO (Ptr (GList (Ptr (GClosure ()))))

-- | Lists the closures used by /@widget@/ for accelerator group connections
-- with 'GI.Gtk.Objects.AccelGroup.accelGroupConnectByPath' or 'GI.Gtk.Objects.AccelGroup.accelGroupConnect'.
-- The closures can be used to monitor accelerator changes on /@widget@/,
-- by connecting to the /@gtkAccelGroup@/[accelChanged](#signal:accelChanged) signal of the
-- t'GI.Gtk.Objects.AccelGroup.AccelGroup' of a closure which can be found out with
-- 'GI.Gtk.Objects.AccelGroup.accelGroupFromAccelClosure'.
widgetListAccelClosures ::
    (B.CallStack.HasCallStack, MonadIO m, IsWidget a) =>
    a
    -- ^ /@widget@/: widget to list accelerator closures for
    -> m ([GClosure b])
    -- ^ __Returns:__ 
    --     a newly allocated t'GI.GLib.Structs.List.List' of closures
widgetListAccelClosures :: a -> m [GClosure b]
widgetListAccelClosures widget :: a
widget = IO [GClosure b] -> m [GClosure b]
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO [GClosure b] -> m [GClosure b])
-> IO [GClosure b] -> m [GClosure b]
forall a b. (a -> b) -> a -> b
$ do
    Ptr Widget
widget' <- a -> IO (Ptr Widget)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
widget
    Ptr (GList (Ptr (GClosure ())))
result <- Ptr Widget -> IO (Ptr (GList (Ptr (GClosure ()))))
gtk_widget_list_accel_closures Ptr Widget
widget'
    [Ptr (GClosure ())]
result' <- Ptr (GList (Ptr (GClosure ()))) -> IO [Ptr (GClosure ())]
forall a. Ptr (GList (Ptr a)) -> IO [Ptr a]
unpackGList Ptr (GList (Ptr (GClosure ())))
result
    [GClosure b]
result'' <- (Ptr (GClosure ()) -> IO (GClosure b))
-> [Ptr (GClosure ())] -> IO [GClosure b]
forall (t :: * -> *) (m :: * -> *) a b.
(Traversable t, Monad m) =>
(a -> m b) -> t a -> m (t b)
mapM (Ptr (GClosure b) -> IO (GClosure b)
forall a. Ptr (GClosure a) -> IO (GClosure a)
B.GClosure.newGClosureFromPtr (Ptr (GClosure b) -> IO (GClosure b))
-> (Ptr (GClosure ()) -> Ptr (GClosure b))
-> Ptr (GClosure ())
-> IO (GClosure b)
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Ptr (GClosure ()) -> Ptr (GClosure b)
forall a b. Ptr a -> Ptr b
FP.castPtr) [Ptr (GClosure ())]
result'
    Ptr (GList (Ptr (GClosure ()))) -> IO ()
forall a. Ptr (GList a) -> IO ()
g_list_free Ptr (GList (Ptr (GClosure ())))
result
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
widget
    [GClosure b] -> IO [GClosure b]
forall (m :: * -> *) a. Monad m => a -> m a
return [GClosure b]
result''

#if defined(ENABLE_OVERLOADING)
data WidgetListAccelClosuresMethodInfo
instance (signature ~ (m ([GClosure b])), MonadIO m, IsWidget a) => O.MethodInfo WidgetListAccelClosuresMethodInfo a signature where
    overloadedMethod = widgetListAccelClosures

#endif

-- method Widget::list_action_prefixes
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "widget"
--           , argType = TInterface Name { namespace = "Gtk" , name = "Widget" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "A #GtkWidget" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TCArray True (-1) (-1) (TBasicType TUTF8))
-- throws : False
-- Skip return : False

foreign import ccall "gtk_widget_list_action_prefixes" gtk_widget_list_action_prefixes :: 
    Ptr Widget ->                           -- widget : TInterface (Name {namespace = "Gtk", name = "Widget"})
    IO (Ptr CString)

-- | Retrieves a 'P.Nothing'-terminated array of strings containing the prefixes of
-- t'GI.Gio.Interfaces.ActionGroup.ActionGroup'\'s available to /@widget@/.
widgetListActionPrefixes ::
    (B.CallStack.HasCallStack, MonadIO m, IsWidget a) =>
    a
    -- ^ /@widget@/: A t'GI.Gtk.Objects.Widget.Widget'
    -> m [T.Text]
    -- ^ __Returns:__ a 'P.Nothing'-terminated array of strings.
widgetListActionPrefixes :: a -> m [Text]
widgetListActionPrefixes widget :: a
widget = IO [Text] -> m [Text]
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO [Text] -> m [Text]) -> IO [Text] -> m [Text]
forall a b. (a -> b) -> a -> b
$ do
    Ptr Widget
widget' <- a -> IO (Ptr Widget)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
widget
    Ptr CString
result <- Ptr Widget -> IO (Ptr CString)
gtk_widget_list_action_prefixes Ptr Widget
widget'
    Text -> Ptr CString -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL "widgetListActionPrefixes" Ptr CString
result
    [Text]
result' <- HasCallStack => Ptr CString -> IO [Text]
Ptr CString -> IO [Text]
unpackZeroTerminatedUTF8CArray Ptr CString
result
    Ptr CString -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr CString
result
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
widget
    [Text] -> IO [Text]
forall (m :: * -> *) a. Monad m => a -> m a
return [Text]
result'

#if defined(ENABLE_OVERLOADING)
data WidgetListActionPrefixesMethodInfo
instance (signature ~ (m [T.Text]), MonadIO m, IsWidget a) => O.MethodInfo WidgetListActionPrefixesMethodInfo a signature where
    overloadedMethod = widgetListActionPrefixes

#endif

-- method Widget::list_mnemonic_labels
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "widget"
--           , argType = TInterface Name { namespace = "Gtk" , name = "Widget" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #GtkWidget" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just
--               (TGList (TInterface Name { namespace = "Gtk" , name = "Widget" }))
-- throws : False
-- Skip return : False

foreign import ccall "gtk_widget_list_mnemonic_labels" gtk_widget_list_mnemonic_labels :: 
    Ptr Widget ->                           -- widget : TInterface (Name {namespace = "Gtk", name = "Widget"})
    IO (Ptr (GList (Ptr Widget)))

-- | Returns a newly allocated list of the widgets, normally labels, for
-- which this widget is the target of a mnemonic (see for example,
-- 'GI.Gtk.Objects.Label.labelSetMnemonicWidget').
-- 
-- The widgets in the list are not individually referenced. If you
-- want to iterate through the list and perform actions involving
-- callbacks that might destroy the widgets, you
-- must call @g_list_foreach (result,
-- (GFunc)g_object_ref, NULL)@ first, and then unref all the
-- widgets afterwards.
widgetListMnemonicLabels ::
    (B.CallStack.HasCallStack, MonadIO m, IsWidget a) =>
    a
    -- ^ /@widget@/: a t'GI.Gtk.Objects.Widget.Widget'
    -> m [Widget]
    -- ^ __Returns:__ the list of
    --  mnemonic labels; free this list
    --  with @/g_list_free()/@ when you are done with it.
widgetListMnemonicLabels :: a -> m [Widget]
widgetListMnemonicLabels widget :: a
widget = IO [Widget] -> m [Widget]
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO [Widget] -> m [Widget]) -> IO [Widget] -> m [Widget]
forall a b. (a -> b) -> a -> b
$ do
    Ptr Widget
widget' <- a -> IO (Ptr Widget)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
widget
    Ptr (GList (Ptr Widget))
result <- Ptr Widget -> IO (Ptr (GList (Ptr Widget)))
gtk_widget_list_mnemonic_labels Ptr Widget
widget'
    [Ptr Widget]
result' <- Ptr (GList (Ptr Widget)) -> IO [Ptr Widget]
forall a. Ptr (GList (Ptr a)) -> IO [Ptr a]
unpackGList Ptr (GList (Ptr Widget))
result
    [Widget]
result'' <- (Ptr Widget -> IO Widget) -> [Ptr Widget] -> IO [Widget]
forall (t :: * -> *) (m :: * -> *) a b.
(Traversable t, Monad m) =>
(a -> m b) -> t a -> m (t b)
mapM ((ManagedPtr Widget -> Widget) -> Ptr Widget -> IO Widget
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr Widget -> Widget
Widget) [Ptr Widget]
result'
    Ptr (GList (Ptr Widget)) -> IO ()
forall a. Ptr (GList a) -> IO ()
g_list_free Ptr (GList (Ptr Widget))
result
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
widget
    [Widget] -> IO [Widget]
forall (m :: * -> *) a. Monad m => a -> m a
return [Widget]
result''

#if defined(ENABLE_OVERLOADING)
data WidgetListMnemonicLabelsMethodInfo
instance (signature ~ (m [Widget]), MonadIO m, IsWidget a) => O.MethodInfo WidgetListMnemonicLabelsMethodInfo a signature where
    overloadedMethod = widgetListMnemonicLabels

#endif

-- method Widget::map
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "widget"
--           , argType = TInterface Name { namespace = "Gtk" , name = "Widget" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #GtkWidget" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "gtk_widget_map" gtk_widget_map :: 
    Ptr Widget ->                           -- widget : TInterface (Name {namespace = "Gtk", name = "Widget"})
    IO ()

-- | This function is only for use in widget implementations. Causes
-- a widget to be mapped if it isn’t already.
widgetMap ::
    (B.CallStack.HasCallStack, MonadIO m, IsWidget a) =>
    a
    -- ^ /@widget@/: a t'GI.Gtk.Objects.Widget.Widget'
    -> m ()
widgetMap :: a -> m ()
widgetMap widget :: a
widget = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    Ptr Widget
widget' <- a -> IO (Ptr Widget)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
widget
    Ptr Widget -> IO ()
gtk_widget_map Ptr Widget
widget'
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
widget
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()

#if defined(ENABLE_OVERLOADING)
data WidgetMapMethodInfo
instance (signature ~ (m ()), MonadIO m, IsWidget a) => O.MethodInfo WidgetMapMethodInfo a signature where
    overloadedMethod = widgetMap

#endif

-- method Widget::measure
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "widget"
--           , argType = TInterface Name { namespace = "Gtk" , name = "Widget" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "A #GtkWidget instance"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "orientation"
--           , argType =
--               TInterface Name { namespace = "Gtk" , name = "Orientation" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "the orientation to measure"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "for_size"
--           , argType = TBasicType TInt
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText =
--                     Just
--                       "Size for the opposite of @orientation, i.e.\n  if @orientation is %GTK_ORIENTATION_HORIZONTAL, this is\n  the height the widget should be measured with. The %GTK_ORIENTATION_VERTICAL\n  case is analogous. This way, both height-for-width and width-for-height\n  requests can be implemented. If no size is known, -1 can be passed."
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "minimum"
--           , argType = TBasicType TInt
--           , direction = DirectionOut
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "location to store the minimum size, or %NULL"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferEverything
--           }
--       , Arg
--           { argCName = "natural"
--           , argType = TBasicType TInt
--           , direction = DirectionOut
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "location to store the natural size, or %NULL"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferEverything
--           }
--       , Arg
--           { argCName = "minimum_baseline"
--           , argType = TBasicType TInt
--           , direction = DirectionOut
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText =
--                     Just
--                       "location to store the baseline\n  position for the minimum size, or %NULL"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferEverything
--           }
--       , Arg
--           { argCName = "natural_baseline"
--           , argType = TBasicType TInt
--           , direction = DirectionOut
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText =
--                     Just
--                       "location to store the baseline\n  position for the natural size, or %NULL"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferEverything
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "gtk_widget_measure" gtk_widget_measure :: 
    Ptr Widget ->                           -- widget : TInterface (Name {namespace = "Gtk", name = "Widget"})
    CUInt ->                                -- orientation : TInterface (Name {namespace = "Gtk", name = "Orientation"})
    Int32 ->                                -- for_size : TBasicType TInt
    Ptr Int32 ->                            -- minimum : TBasicType TInt
    Ptr Int32 ->                            -- natural : TBasicType TInt
    Ptr Int32 ->                            -- minimum_baseline : TBasicType TInt
    Ptr Int32 ->                            -- natural_baseline : TBasicType TInt
    IO ()

-- | Measures /@widget@/ in the orientation /@orientation@/ and for the given /@forSize@/.
-- As an example, if /@orientation@/ is 'GI.Gtk.Enums.OrientationHorizontal' and /@forSize@/ is 300,
-- this functions will compute the minimum and natural width of /@widget@/ if
-- it is allocated at a height of 300 pixels.
-- 
-- See [GtkWidget’s geometry management section][geometry-management] for
-- a more details on implementing t'GI.Gtk.Structs.WidgetClass.WidgetClass'.@/measure/@().
widgetMeasure ::
    (B.CallStack.HasCallStack, MonadIO m, IsWidget a) =>
    a
    -- ^ /@widget@/: A t'GI.Gtk.Objects.Widget.Widget' instance
    -> Gtk.Enums.Orientation
    -- ^ /@orientation@/: the orientation to measure
    -> Int32
    -- ^ /@forSize@/: Size for the opposite of /@orientation@/, i.e.
    --   if /@orientation@/ is 'GI.Gtk.Enums.OrientationHorizontal', this is
    --   the height the widget should be measured with. The 'GI.Gtk.Enums.OrientationVertical'
    --   case is analogous. This way, both height-for-width and width-for-height
    --   requests can be implemented. If no size is known, -1 can be passed.
    -> m ((Int32, Int32, Int32, Int32))
widgetMeasure :: a -> Orientation -> Int32 -> m (Int32, Int32, Int32, Int32)
widgetMeasure widget :: a
widget orientation :: Orientation
orientation forSize :: Int32
forSize = IO (Int32, Int32, Int32, Int32) -> m (Int32, Int32, Int32, Int32)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Int32, Int32, Int32, Int32) -> m (Int32, Int32, Int32, Int32))
-> IO (Int32, Int32, Int32, Int32)
-> m (Int32, Int32, Int32, Int32)
forall a b. (a -> b) -> a -> b
$ do
    Ptr Widget
widget' <- a -> IO (Ptr Widget)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
widget
    let orientation' :: CUInt
orientation' = (Int -> CUInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CUInt) -> (Orientation -> Int) -> Orientation -> CUInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Orientation -> Int
forall a. Enum a => a -> Int
fromEnum) Orientation
orientation
    Ptr Int32
minimum <- IO (Ptr Int32)
forall a. Storable a => IO (Ptr a)
allocMem :: IO (Ptr Int32)
    Ptr Int32
natural <- IO (Ptr Int32)
forall a. Storable a => IO (Ptr a)
allocMem :: IO (Ptr Int32)
    Ptr Int32
minimumBaseline <- IO (Ptr Int32)
forall a. Storable a => IO (Ptr a)
allocMem :: IO (Ptr Int32)
    Ptr Int32
naturalBaseline <- IO (Ptr Int32)
forall a. Storable a => IO (Ptr a)
allocMem :: IO (Ptr Int32)
    Ptr Widget
-> CUInt
-> Int32
-> Ptr Int32
-> Ptr Int32
-> Ptr Int32
-> Ptr Int32
-> IO ()
gtk_widget_measure Ptr Widget
widget' CUInt
orientation' Int32
forSize Ptr Int32
minimum Ptr Int32
natural Ptr Int32
minimumBaseline Ptr Int32
naturalBaseline
    Int32
minimum' <- Ptr Int32 -> IO Int32
forall a. Storable a => Ptr a -> IO a
peek Ptr Int32
minimum
    Int32
natural' <- Ptr Int32 -> IO Int32
forall a. Storable a => Ptr a -> IO a
peek Ptr Int32
natural
    Int32
minimumBaseline' <- Ptr Int32 -> IO Int32
forall a. Storable a => Ptr a -> IO a
peek Ptr Int32
minimumBaseline
    Int32
naturalBaseline' <- Ptr Int32 -> IO Int32
forall a. Storable a => Ptr a -> IO a
peek Ptr Int32
naturalBaseline
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
widget
    Ptr Int32 -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr Int32
minimum
    Ptr Int32 -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr Int32
natural
    Ptr Int32 -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr Int32
minimumBaseline
    Ptr Int32 -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr Int32
naturalBaseline
    (Int32, Int32, Int32, Int32) -> IO (Int32, Int32, Int32, Int32)
forall (m :: * -> *) a. Monad m => a -> m a
return (Int32
minimum', Int32
natural', Int32
minimumBaseline', Int32
naturalBaseline')

#if defined(ENABLE_OVERLOADING)
data WidgetMeasureMethodInfo
instance (signature ~ (Gtk.Enums.Orientation -> Int32 -> m ((Int32, Int32, Int32, Int32))), MonadIO m, IsWidget a) => O.MethodInfo WidgetMeasureMethodInfo a signature where
    overloadedMethod = widgetMeasure

#endif

-- method Widget::mnemonic_activate
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "widget"
--           , argType = TInterface Name { namespace = "Gtk" , name = "Widget" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #GtkWidget" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "group_cycling"
--           , argType = TBasicType TBoolean
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText =
--                     Just "%TRUE if there are other widgets with the same mnemonic"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TBasicType TBoolean)
-- throws : False
-- Skip return : False

foreign import ccall "gtk_widget_mnemonic_activate" gtk_widget_mnemonic_activate :: 
    Ptr Widget ->                           -- widget : TInterface (Name {namespace = "Gtk", name = "Widget"})
    CInt ->                                 -- group_cycling : TBasicType TBoolean
    IO CInt

-- | Emits the [mnemonicActivate]("GI.Gtk.Objects.Widget#signal:mnemonicActivate") signal.
widgetMnemonicActivate ::
    (B.CallStack.HasCallStack, MonadIO m, IsWidget a) =>
    a
    -- ^ /@widget@/: a t'GI.Gtk.Objects.Widget.Widget'
    -> Bool
    -- ^ /@groupCycling@/: 'P.True' if there are other widgets with the same mnemonic
    -> m Bool
    -- ^ __Returns:__ 'P.True' if the signal has been handled
widgetMnemonicActivate :: a -> Bool -> m Bool
widgetMnemonicActivate widget :: a
widget groupCycling :: Bool
groupCycling = WidgetPopupMenuCallback -> m Bool
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (WidgetPopupMenuCallback -> m Bool)
-> WidgetPopupMenuCallback -> m Bool
forall a b. (a -> b) -> a -> b
$ do
    Ptr Widget
widget' <- a -> IO (Ptr Widget)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
widget
    let groupCycling' :: CInt
groupCycling' = (Int -> CInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CInt) -> (Bool -> Int) -> Bool -> CInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Bool -> Int
forall a. Enum a => a -> Int
fromEnum) Bool
groupCycling
    CInt
result <- Ptr Widget -> CInt -> IO CInt
gtk_widget_mnemonic_activate Ptr Widget
widget' CInt
groupCycling'
    let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= 0) CInt
result
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
widget
    WidgetMnemonicActivateCallback
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'

#if defined(ENABLE_OVERLOADING)
data WidgetMnemonicActivateMethodInfo
instance (signature ~ (Bool -> m Bool), MonadIO m, IsWidget a) => O.MethodInfo WidgetMnemonicActivateMethodInfo a signature where
    overloadedMethod = widgetMnemonicActivate

#endif

-- method Widget::observe_children
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "widget"
--           , argType = TInterface Name { namespace = "Gtk" , name = "Widget" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #GtkWidget" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TInterface Name { namespace = "Gio" , name = "ListModel" })
-- throws : False
-- Skip return : False

foreign import ccall "gtk_widget_observe_children" gtk_widget_observe_children :: 
    Ptr Widget ->                           -- widget : TInterface (Name {namespace = "Gtk", name = "Widget"})
    IO (Ptr Gio.ListModel.ListModel)

-- | Returns a t'GI.Gio.Interfaces.ListModel.ListModel' to track the children of /@widget@/.
-- 
-- Calling this function will enable extra internal bookkeeping to track
-- children and emit signals on the returned listmodel. It may slow down
-- operations a lot.
-- 
-- Applications should try hard to avoid calling this function because of
-- the slowdowns.
widgetObserveChildren ::
    (B.CallStack.HasCallStack, MonadIO m, IsWidget a) =>
    a
    -- ^ /@widget@/: a t'GI.Gtk.Objects.Widget.Widget'
    -> m Gio.ListModel.ListModel
    -- ^ __Returns:__ a t'GI.Gio.Interfaces.ListModel.ListModel' tracking /@widget@/\'s children
widgetObserveChildren :: a -> m ListModel
widgetObserveChildren widget :: a
widget = IO ListModel -> m ListModel
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO ListModel -> m ListModel) -> IO ListModel -> m ListModel
forall a b. (a -> b) -> a -> b
$ do
    Ptr Widget
widget' <- a -> IO (Ptr Widget)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
widget
    Ptr ListModel
result <- Ptr Widget -> IO (Ptr ListModel)
gtk_widget_observe_children Ptr Widget
widget'
    Text -> Ptr ListModel -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL "widgetObserveChildren" Ptr ListModel
result
    ListModel
result' <- ((ManagedPtr ListModel -> ListModel)
-> Ptr ListModel -> IO ListModel
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
wrapObject ManagedPtr ListModel -> ListModel
Gio.ListModel.ListModel) Ptr ListModel
result
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
widget
    ListModel -> IO ListModel
forall (m :: * -> *) a. Monad m => a -> m a
return ListModel
result'

#if defined(ENABLE_OVERLOADING)
data WidgetObserveChildrenMethodInfo
instance (signature ~ (m Gio.ListModel.ListModel), MonadIO m, IsWidget a) => O.MethodInfo WidgetObserveChildrenMethodInfo a signature where
    overloadedMethod = widgetObserveChildren

#endif

-- method Widget::observe_controllers
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "widget"
--           , argType = TInterface Name { namespace = "Gtk" , name = "Widget" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #GtkWidget" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TInterface Name { namespace = "Gio" , name = "ListModel" })
-- throws : False
-- Skip return : False

foreign import ccall "gtk_widget_observe_controllers" gtk_widget_observe_controllers :: 
    Ptr Widget ->                           -- widget : TInterface (Name {namespace = "Gtk", name = "Widget"})
    IO (Ptr Gio.ListModel.ListModel)

-- | Returns a t'GI.Gio.Interfaces.ListModel.ListModel' to track the @/GtkEventControllers/@ of /@widget@/.
-- 
-- Calling this function will enable extra internal bookkeeping to track
-- controllers and emit signals on the returned listmodel. It may slow down
-- operations a lot.
-- 
-- Applications should try hard to avoid calling this function because of
-- the slowdowns.
widgetObserveControllers ::
    (B.CallStack.HasCallStack, MonadIO m, IsWidget a) =>
    a
    -- ^ /@widget@/: a t'GI.Gtk.Objects.Widget.Widget'
    -> m Gio.ListModel.ListModel
    -- ^ __Returns:__ a t'GI.Gio.Interfaces.ListModel.ListModel' tracking /@widget@/\'s controllers
widgetObserveControllers :: a -> m ListModel
widgetObserveControllers widget :: a
widget = IO ListModel -> m ListModel
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO ListModel -> m ListModel) -> IO ListModel -> m ListModel
forall a b. (a -> b) -> a -> b
$ do
    Ptr Widget
widget' <- a -> IO (Ptr Widget)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
widget
    Ptr ListModel
result <- Ptr Widget -> IO (Ptr ListModel)
gtk_widget_observe_controllers Ptr Widget
widget'
    Text -> Ptr ListModel -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL "widgetObserveControllers" Ptr ListModel
result
    ListModel
result' <- ((ManagedPtr ListModel -> ListModel)
-> Ptr ListModel -> IO ListModel
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
wrapObject ManagedPtr ListModel -> ListModel
Gio.ListModel.ListModel) Ptr ListModel
result
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
widget
    ListModel -> IO ListModel
forall (m :: * -> *) a. Monad m => a -> m a
return ListModel
result'

#if defined(ENABLE_OVERLOADING)
data WidgetObserveControllersMethodInfo
instance (signature ~ (m Gio.ListModel.ListModel), MonadIO m, IsWidget a) => O.MethodInfo WidgetObserveControllersMethodInfo a signature where
    overloadedMethod = widgetObserveControllers

#endif

-- method Widget::pick
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "widget"
--           , argType = TInterface Name { namespace = "Gtk" , name = "Widget" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "the widget to query"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "x"
--           , argType = TBasicType TDouble
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText =
--                     Just "X coordinate to test, relative to @widget's origin"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "y"
--           , argType = TBasicType TDouble
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText =
--                     Just "Y coordinate to test, relative to @widget's origin"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "flags"
--           , argType =
--               TInterface Name { namespace = "Gtk" , name = "PickFlags" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "Flags to influence what is picked"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TInterface Name { namespace = "Gtk" , name = "Widget" })
-- throws : False
-- Skip return : False

foreign import ccall "gtk_widget_pick" gtk_widget_pick :: 
    Ptr Widget ->                           -- widget : TInterface (Name {namespace = "Gtk", name = "Widget"})
    CDouble ->                              -- x : TBasicType TDouble
    CDouble ->                              -- y : TBasicType TDouble
    CUInt ->                                -- flags : TInterface (Name {namespace = "Gtk", name = "PickFlags"})
    IO (Ptr Widget)

-- | Finds the descendant of /@widget@/ (including /@widget@/ itself) closest
-- to the screen at the point (/@x@/, /@y@/). The point must be given in
-- widget coordinates, so (0, 0) is assumed to be the top left of
-- /@widget@/\'s content area.
-- 
-- Usually widgets will return 'P.Nothing' if the given coordinate is not
-- contained in /@widget@/ checked via 'GI.Gtk.Objects.Widget.widgetContains'. Otherwise
-- they will recursively try to find a child that does not return 'P.Nothing'.
-- Widgets are however free to customize their picking algorithm.
-- 
-- This function is used on the toplevel to determine the widget below
-- the mouse cursor for purposes of hover hilighting and delivering events.
widgetPick ::
    (B.CallStack.HasCallStack, MonadIO m, IsWidget a) =>
    a
    -- ^ /@widget@/: the widget to query
    -> Double
    -- ^ /@x@/: X coordinate to test, relative to /@widget@/\'s origin
    -> Double
    -- ^ /@y@/: Y coordinate to test, relative to /@widget@/\'s origin
    -> [Gtk.Flags.PickFlags]
    -- ^ /@flags@/: Flags to influence what is picked
    -> m (Maybe Widget)
    -- ^ __Returns:__ The widget descendant at the given
    --     coordinate or 'P.Nothing' if none.
widgetPick :: a -> Double -> Double -> [PickFlags] -> m (Maybe Widget)
widgetPick widget :: a
widget x :: Double
x y :: Double
y flags :: [PickFlags]
flags = IO (Maybe Widget) -> m (Maybe Widget)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Maybe Widget) -> m (Maybe Widget))
-> IO (Maybe Widget) -> m (Maybe Widget)
forall a b. (a -> b) -> a -> b
$ do
    Ptr Widget
widget' <- a -> IO (Ptr Widget)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
widget
    let x' :: CDouble
x' = Double -> CDouble
forall a b. (Real a, Fractional b) => a -> b
realToFrac Double
x
    let y' :: CDouble
y' = Double -> CDouble
forall a b. (Real a, Fractional b) => a -> b
realToFrac Double
y
    let flags' :: CUInt
flags' = [PickFlags] -> CUInt
forall b a. (Num b, IsGFlag a) => [a] -> b
gflagsToWord [PickFlags]
flags
    Ptr Widget
result <- Ptr Widget -> CDouble -> CDouble -> CUInt -> IO (Ptr Widget)
gtk_widget_pick Ptr Widget
widget' CDouble
x' CDouble
y' CUInt
flags'
    Maybe Widget
maybeResult <- Ptr Widget -> (Ptr Widget -> IO Widget) -> IO (Maybe Widget)
forall a b. Ptr a -> (Ptr a -> IO b) -> IO (Maybe b)
convertIfNonNull Ptr Widget
result ((Ptr Widget -> IO Widget) -> IO (Maybe Widget))
-> (Ptr Widget -> IO Widget) -> IO (Maybe Widget)
forall a b. (a -> b) -> a -> b
$ \result' :: Ptr Widget
result' -> do
        Widget
result'' <- ((ManagedPtr Widget -> Widget) -> Ptr Widget -> IO Widget
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr Widget -> Widget
Widget) Ptr Widget
result'
        Widget -> IO Widget
forall (m :: * -> *) a. Monad m => a -> m a
return Widget
result''
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
widget
    Maybe Widget -> IO (Maybe Widget)
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe Widget
maybeResult

#if defined(ENABLE_OVERLOADING)
data WidgetPickMethodInfo
instance (signature ~ (Double -> Double -> [Gtk.Flags.PickFlags] -> m (Maybe Widget)), MonadIO m, IsWidget a) => O.MethodInfo WidgetPickMethodInfo a signature where
    overloadedMethod = widgetPick

#endif

-- method Widget::queue_allocate
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "widget"
--           , argType = TInterface Name { namespace = "Gtk" , name = "Widget" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #GtkWidget" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "gtk_widget_queue_allocate" gtk_widget_queue_allocate :: 
    Ptr Widget ->                           -- widget : TInterface (Name {namespace = "Gtk", name = "Widget"})
    IO ()

-- | This function is only for use in widget implementations.
-- 
-- Flags the widget for a rerun of the GtkWidgetClass[size_allocate](#signal:size_allocate)
-- function. Use this function instead of 'GI.Gtk.Objects.Widget.widgetQueueResize'
-- when the /@widget@/\'s size request didn\'t change but it wants to
-- reposition its contents.
-- 
-- An example user of this function is 'GI.Gtk.Objects.Widget.widgetSetHalign'.
widgetQueueAllocate ::
    (B.CallStack.HasCallStack, MonadIO m, IsWidget a) =>
    a
    -- ^ /@widget@/: a t'GI.Gtk.Objects.Widget.Widget'
    -> m ()
widgetQueueAllocate :: a -> m ()
widgetQueueAllocate widget :: a
widget = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    Ptr Widget
widget' <- a -> IO (Ptr Widget)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
widget
    Ptr Widget -> IO ()
gtk_widget_queue_allocate Ptr Widget
widget'
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
widget
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()

#if defined(ENABLE_OVERLOADING)
data WidgetQueueAllocateMethodInfo
instance (signature ~ (m ()), MonadIO m, IsWidget a) => O.MethodInfo WidgetQueueAllocateMethodInfo a signature where
    overloadedMethod = widgetQueueAllocate

#endif

-- method Widget::queue_compute_expand
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "widget"
--           , argType = TInterface Name { namespace = "Gtk" , name = "Widget" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #GtkWidget" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "gtk_widget_queue_compute_expand" gtk_widget_queue_compute_expand :: 
    Ptr Widget ->                           -- widget : TInterface (Name {namespace = "Gtk", name = "Widget"})
    IO ()

-- | Mark /@widget@/ as needing to recompute its expand flags. Call
-- this function when setting legacy expand child properties
-- on the child of a container.
-- 
-- See 'GI.Gtk.Objects.Widget.widgetComputeExpand'.
widgetQueueComputeExpand ::
    (B.CallStack.HasCallStack, MonadIO m, IsWidget a) =>
    a
    -- ^ /@widget@/: a t'GI.Gtk.Objects.Widget.Widget'
    -> m ()
widgetQueueComputeExpand :: a -> m ()
widgetQueueComputeExpand widget :: a
widget = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    Ptr Widget
widget' <- a -> IO (Ptr Widget)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
widget
    Ptr Widget -> IO ()
gtk_widget_queue_compute_expand Ptr Widget
widget'
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
widget
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()

#if defined(ENABLE_OVERLOADING)
data WidgetQueueComputeExpandMethodInfo
instance (signature ~ (m ()), MonadIO m, IsWidget a) => O.MethodInfo WidgetQueueComputeExpandMethodInfo a signature where
    overloadedMethod = widgetQueueComputeExpand

#endif

-- method Widget::queue_draw
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "widget"
--           , argType = TInterface Name { namespace = "Gtk" , name = "Widget" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #GtkWidget" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "gtk_widget_queue_draw" gtk_widget_queue_draw :: 
    Ptr Widget ->                           -- widget : TInterface (Name {namespace = "Gtk", name = "Widget"})
    IO ()

-- | Schedules this widget to be redrawn in paint phase of the
-- current or the next frame. This means /@widget@/\'s GtkWidgetClass.@/snapshot()/@
-- implementation will be called.
widgetQueueDraw ::
    (B.CallStack.HasCallStack, MonadIO m, IsWidget a) =>
    a
    -- ^ /@widget@/: a t'GI.Gtk.Objects.Widget.Widget'
    -> m ()
widgetQueueDraw :: a -> m ()
widgetQueueDraw widget :: a
widget = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    Ptr Widget
widget' <- a -> IO (Ptr Widget)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
widget
    Ptr Widget -> IO ()
gtk_widget_queue_draw Ptr Widget
widget'
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
widget
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()

#if defined(ENABLE_OVERLOADING)
data WidgetQueueDrawMethodInfo
instance (signature ~ (m ()), MonadIO m, IsWidget a) => O.MethodInfo WidgetQueueDrawMethodInfo a signature where
    overloadedMethod = widgetQueueDraw

#endif

-- method Widget::queue_resize
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "widget"
--           , argType = TInterface Name { namespace = "Gtk" , name = "Widget" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #GtkWidget" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "gtk_widget_queue_resize" gtk_widget_queue_resize :: 
    Ptr Widget ->                           -- widget : TInterface (Name {namespace = "Gtk", name = "Widget"})
    IO ()

-- | This function is only for use in widget implementations.
-- Flags a widget to have its size renegotiated; should
-- be called when a widget for some reason has a new size request.
-- For example, when you change the text in a t'GI.Gtk.Objects.Label.Label', t'GI.Gtk.Objects.Label.Label'
-- queues a resize to ensure there’s enough space for the new text.
-- 
-- Note that you cannot call 'GI.Gtk.Objects.Widget.widgetQueueResize' on a widget
-- from inside its implementation of the GtkWidgetClass[size_allocate](#signal:size_allocate)
-- virtual method. Calls to 'GI.Gtk.Objects.Widget.widgetQueueResize' from inside
-- GtkWidgetClass[size_allocate](#signal:size_allocate) will be silently ignored.
widgetQueueResize ::
    (B.CallStack.HasCallStack, MonadIO m, IsWidget a) =>
    a
    -- ^ /@widget@/: a t'GI.Gtk.Objects.Widget.Widget'
    -> m ()
widgetQueueResize :: a -> m ()
widgetQueueResize widget :: a
widget = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    Ptr Widget
widget' <- a -> IO (Ptr Widget)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
widget
    Ptr Widget -> IO ()
gtk_widget_queue_resize Ptr Widget
widget'
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
widget
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()

#if defined(ENABLE_OVERLOADING)
data WidgetQueueResizeMethodInfo
instance (signature ~ (m ()), MonadIO m, IsWidget a) => O.MethodInfo WidgetQueueResizeMethodInfo a signature where
    overloadedMethod = widgetQueueResize

#endif

-- method Widget::queue_resize_no_redraw
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "widget"
--           , argType = TInterface Name { namespace = "Gtk" , name = "Widget" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #GtkWidget" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "gtk_widget_queue_resize_no_redraw" gtk_widget_queue_resize_no_redraw :: 
    Ptr Widget ->                           -- widget : TInterface (Name {namespace = "Gtk", name = "Widget"})
    IO ()

-- | This function works like 'GI.Gtk.Objects.Widget.widgetQueueResize',
-- except that the widget is not invalidated.
widgetQueueResizeNoRedraw ::
    (B.CallStack.HasCallStack, MonadIO m, IsWidget a) =>
    a
    -- ^ /@widget@/: a t'GI.Gtk.Objects.Widget.Widget'
    -> m ()
widgetQueueResizeNoRedraw :: a -> m ()
widgetQueueResizeNoRedraw widget :: a
widget = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    Ptr Widget
widget' <- a -> IO (Ptr Widget)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
widget
    Ptr Widget -> IO ()
gtk_widget_queue_resize_no_redraw Ptr Widget
widget'
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
widget
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()

#if defined(ENABLE_OVERLOADING)
data WidgetQueueResizeNoRedrawMethodInfo
instance (signature ~ (m ()), MonadIO m, IsWidget a) => O.MethodInfo WidgetQueueResizeNoRedrawMethodInfo a signature where
    overloadedMethod = widgetQueueResizeNoRedraw

#endif

-- method Widget::realize
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "widget"
--           , argType = TInterface Name { namespace = "Gtk" , name = "Widget" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #GtkWidget" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "gtk_widget_realize" gtk_widget_realize :: 
    Ptr Widget ->                           -- widget : TInterface (Name {namespace = "Gtk", name = "Widget"})
    IO ()

-- | Creates the GDK (windowing system) resources associated with a
-- widget.  For example, /@widget@/->surface will be created when a widget
-- is realized.  Normally realization happens implicitly; if you show
-- a widget and all its parent containers, then the widget will be
-- realized and mapped automatically.
-- 
-- Realizing a widget requires all
-- the widget’s parent widgets to be realized; calling
-- 'GI.Gtk.Objects.Widget.widgetRealize' realizes the widget’s parents in addition to
-- /@widget@/ itself. If a widget is not yet inside a toplevel window
-- when you realize it, bad things will happen.
-- 
-- This function is primarily used in widget implementations, and
-- isn’t very useful otherwise. Many times when you think you might
-- need it, a better approach is to connect to a signal that will be
-- called after the widget is realized automatically, such as
-- [realize]("GI.Gtk.Objects.Widget#signal:realize").
widgetRealize ::
    (B.CallStack.HasCallStack, MonadIO m, IsWidget a) =>
    a
    -- ^ /@widget@/: a t'GI.Gtk.Objects.Widget.Widget'
    -> m ()
widgetRealize :: a -> m ()
widgetRealize widget :: a
widget = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    Ptr Widget
widget' <- a -> IO (Ptr Widget)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
widget
    Ptr Widget -> IO ()
gtk_widget_realize Ptr Widget
widget'
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
widget
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()

#if defined(ENABLE_OVERLOADING)
data WidgetRealizeMethodInfo
instance (signature ~ (m ()), MonadIO m, IsWidget a) => O.MethodInfo WidgetRealizeMethodInfo a signature where
    overloadedMethod = widgetRealize

#endif

-- method Widget::register_surface
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "widget"
--           , argType = TInterface Name { namespace = "Gtk" , name = "Widget" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #GtkWidget" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "surface"
--           , argType =
--               TInterface Name { namespace = "Gdk" , name = "Surface" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #GdkSurface" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "gtk_widget_register_surface" gtk_widget_register_surface :: 
    Ptr Widget ->                           -- widget : TInterface (Name {namespace = "Gtk", name = "Widget"})
    Ptr Gdk.Surface.Surface ->              -- surface : TInterface (Name {namespace = "Gdk", name = "Surface"})
    IO ()

-- | Registers a t'GI.Gdk.Objects.Surface.Surface' with the widget and sets it up so that
-- the widget receives events for it. Call 'GI.Gtk.Objects.Widget.widgetUnregisterSurface'
-- when destroying the surface.
-- 
-- Before 3.8 you needed to call @/gdk_surface_set_user_data()/@ directly to set
-- this up. This is now deprecated and you should use 'GI.Gtk.Objects.Widget.widgetRegisterSurface'
-- instead. Old code will keep working as is, although some new features like
-- transparency might not work perfectly.
widgetRegisterSurface ::
    (B.CallStack.HasCallStack, MonadIO m, IsWidget a, Gdk.Surface.IsSurface b) =>
    a
    -- ^ /@widget@/: a t'GI.Gtk.Objects.Widget.Widget'
    -> b
    -- ^ /@surface@/: a t'GI.Gdk.Objects.Surface.Surface'
    -> m ()
widgetRegisterSurface :: a -> b -> m ()
widgetRegisterSurface widget :: a
widget surface :: b
surface = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    Ptr Widget
widget' <- a -> IO (Ptr Widget)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
widget
    Ptr Surface
surface' <- b -> IO (Ptr Surface)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
surface
    Ptr Widget -> Ptr Surface -> IO ()
gtk_widget_register_surface Ptr Widget
widget' Ptr Surface
surface'
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
widget
    b -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr b
surface
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()

#if defined(ENABLE_OVERLOADING)
data WidgetRegisterSurfaceMethodInfo
instance (signature ~ (b -> m ()), MonadIO m, IsWidget a, Gdk.Surface.IsSurface b) => O.MethodInfo WidgetRegisterSurfaceMethodInfo a signature where
    overloadedMethod = widgetRegisterSurface

#endif

-- method Widget::remove_accelerator
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "widget"
--           , argType = TInterface Name { namespace = "Gtk" , name = "Widget" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "widget to install an accelerator on"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "accel_group"
--           , argType =
--               TInterface Name { namespace = "Gtk" , name = "AccelGroup" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "accel group for this widget"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "accel_key"
--           , argType = TBasicType TUInt
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "GDK keyval of the accelerator"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "accel_mods"
--           , argType =
--               TInterface Name { namespace = "Gdk" , name = "ModifierType" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "modifier key combination of the accelerator"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TBasicType TBoolean)
-- throws : False
-- Skip return : False

foreign import ccall "gtk_widget_remove_accelerator" gtk_widget_remove_accelerator :: 
    Ptr Widget ->                           -- widget : TInterface (Name {namespace = "Gtk", name = "Widget"})
    Ptr Gtk.AccelGroup.AccelGroup ->        -- accel_group : TInterface (Name {namespace = "Gtk", name = "AccelGroup"})
    Word32 ->                               -- accel_key : TBasicType TUInt
    CUInt ->                                -- accel_mods : TInterface (Name {namespace = "Gdk", name = "ModifierType"})
    IO CInt

-- | Removes an accelerator from /@widget@/, previously installed with
-- 'GI.Gtk.Objects.Widget.widgetAddAccelerator'.
widgetRemoveAccelerator ::
    (B.CallStack.HasCallStack, MonadIO m, IsWidget a, Gtk.AccelGroup.IsAccelGroup b) =>
    a
    -- ^ /@widget@/: widget to install an accelerator on
    -> b
    -- ^ /@accelGroup@/: accel group for this widget
    -> Word32
    -- ^ /@accelKey@/: GDK keyval of the accelerator
    -> [Gdk.Flags.ModifierType]
    -- ^ /@accelMods@/: modifier key combination of the accelerator
    -> m Bool
    -- ^ __Returns:__ whether an accelerator was installed and could be removed
widgetRemoveAccelerator :: a -> b -> Word32 -> [ModifierType] -> m Bool
widgetRemoveAccelerator widget :: a
widget accelGroup :: b
accelGroup accelKey :: Word32
accelKey accelMods :: [ModifierType]
accelMods = WidgetPopupMenuCallback -> m Bool
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (WidgetPopupMenuCallback -> m Bool)
-> WidgetPopupMenuCallback -> m Bool
forall a b. (a -> b) -> a -> b
$ do
    Ptr Widget
widget' <- a -> IO (Ptr Widget)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
widget
    Ptr AccelGroup
accelGroup' <- b -> IO (Ptr AccelGroup)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
accelGroup
    let accelMods' :: CUInt
accelMods' = [ModifierType] -> CUInt
forall b a. (Num b, IsGFlag a) => [a] -> b
gflagsToWord [ModifierType]
accelMods
    CInt
result <- Ptr Widget -> Ptr AccelGroup -> Word32 -> CUInt -> IO CInt
gtk_widget_remove_accelerator Ptr Widget
widget' Ptr AccelGroup
accelGroup' Word32
accelKey CUInt
accelMods'
    let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= 0) CInt
result
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
widget
    b -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr b
accelGroup
    WidgetMnemonicActivateCallback
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'

#if defined(ENABLE_OVERLOADING)
data WidgetRemoveAcceleratorMethodInfo
instance (signature ~ (b -> Word32 -> [Gdk.Flags.ModifierType] -> m Bool), MonadIO m, IsWidget a, Gtk.AccelGroup.IsAccelGroup b) => O.MethodInfo WidgetRemoveAcceleratorMethodInfo a signature where
    overloadedMethod = widgetRemoveAccelerator

#endif

-- method Widget::remove_controller
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "widget"
--           , argType = TInterface Name { namespace = "Gtk" , name = "Widget" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #GtkWidget" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "controller"
--           , argType =
--               TInterface Name { namespace = "Gtk" , name = "EventController" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #GtkEventController"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "gtk_widget_remove_controller" gtk_widget_remove_controller :: 
    Ptr Widget ->                           -- widget : TInterface (Name {namespace = "Gtk", name = "Widget"})
    Ptr Gtk.EventController.EventController -> -- controller : TInterface (Name {namespace = "Gtk", name = "EventController"})
    IO ()

-- | Removes /@controller@/ from /@widget@/, so that it doesn\'t process
-- events anymore. It should not be used again.
-- 
-- Widgets will remove all event controllers automatically when they
-- are destroyed, there is normally no need to call this function.
widgetRemoveController ::
    (B.CallStack.HasCallStack, MonadIO m, IsWidget a, Gtk.EventController.IsEventController b) =>
    a
    -- ^ /@widget@/: a t'GI.Gtk.Objects.Widget.Widget'
    -> b
    -- ^ /@controller@/: a t'GI.Gtk.Objects.EventController.EventController'
    -> m ()
widgetRemoveController :: a -> b -> m ()
widgetRemoveController widget :: a
widget controller :: b
controller = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    Ptr Widget
widget' <- a -> IO (Ptr Widget)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
widget
    Ptr EventController
controller' <- b -> IO (Ptr EventController)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
controller
    Ptr Widget -> Ptr EventController -> IO ()
gtk_widget_remove_controller Ptr Widget
widget' Ptr EventController
controller'
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
widget
    b -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr b
controller
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()

#if defined(ENABLE_OVERLOADING)
data WidgetRemoveControllerMethodInfo
instance (signature ~ (b -> m ()), MonadIO m, IsWidget a, Gtk.EventController.IsEventController b) => O.MethodInfo WidgetRemoveControllerMethodInfo a signature where
    overloadedMethod = widgetRemoveController

#endif

-- method Widget::remove_mnemonic_label
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "widget"
--           , argType = TInterface Name { namespace = "Gtk" , name = "Widget" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #GtkWidget" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "label"
--           , argType = TInterface Name { namespace = "Gtk" , name = "Widget" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText =
--                     Just
--                       "a #GtkWidget that was previously set as a mnemonic label for\n        @widget with gtk_widget_add_mnemonic_label()."
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "gtk_widget_remove_mnemonic_label" gtk_widget_remove_mnemonic_label :: 
    Ptr Widget ->                           -- widget : TInterface (Name {namespace = "Gtk", name = "Widget"})
    Ptr Widget ->                           -- label : TInterface (Name {namespace = "Gtk", name = "Widget"})
    IO ()

-- | Removes a widget from the list of mnemonic labels for
-- this widget. (See 'GI.Gtk.Objects.Widget.widgetListMnemonicLabels'). The widget
-- must have previously been added to the list with
-- 'GI.Gtk.Objects.Widget.widgetAddMnemonicLabel'.
widgetRemoveMnemonicLabel ::
    (B.CallStack.HasCallStack, MonadIO m, IsWidget a, IsWidget b) =>
    a
    -- ^ /@widget@/: a t'GI.Gtk.Objects.Widget.Widget'
    -> b
    -- ^ /@label@/: a t'GI.Gtk.Objects.Widget.Widget' that was previously set as a mnemonic label for
    --         /@widget@/ with 'GI.Gtk.Objects.Widget.widgetAddMnemonicLabel'.
    -> m ()
widgetRemoveMnemonicLabel :: a -> b -> m ()
widgetRemoveMnemonicLabel widget :: a
widget label :: b
label = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    Ptr Widget
widget' <- a -> IO (Ptr Widget)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
widget
    Ptr Widget
label' <- b -> IO (Ptr Widget)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
label
    Ptr Widget -> Ptr Widget -> IO ()
gtk_widget_remove_mnemonic_label Ptr Widget
widget' Ptr Widget
label'
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
widget
    b -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr b
label
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()

#if defined(ENABLE_OVERLOADING)
data WidgetRemoveMnemonicLabelMethodInfo
instance (signature ~ (b -> m ()), MonadIO m, IsWidget a, IsWidget b) => O.MethodInfo WidgetRemoveMnemonicLabelMethodInfo a signature where
    overloadedMethod = widgetRemoveMnemonicLabel

#endif

-- method Widget::remove_tick_callback
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "widget"
--           , argType = TInterface Name { namespace = "Gtk" , name = "Widget" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #GtkWidget" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "id"
--           , argType = TBasicType TUInt
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText =
--                     Just "an id returned by gtk_widget_add_tick_callback()"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "gtk_widget_remove_tick_callback" gtk_widget_remove_tick_callback :: 
    Ptr Widget ->                           -- widget : TInterface (Name {namespace = "Gtk", name = "Widget"})
    Word32 ->                               -- id : TBasicType TUInt
    IO ()

-- | Removes a tick callback previously registered with
-- 'GI.Gtk.Objects.Widget.widgetAddTickCallback'.
widgetRemoveTickCallback ::
    (B.CallStack.HasCallStack, MonadIO m, IsWidget a) =>
    a
    -- ^ /@widget@/: a t'GI.Gtk.Objects.Widget.Widget'
    -> Word32
    -- ^ /@id@/: an id returned by 'GI.Gtk.Objects.Widget.widgetAddTickCallback'
    -> m ()
widgetRemoveTickCallback :: a -> Word32 -> m ()
widgetRemoveTickCallback widget :: a
widget id :: Word32
id = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    Ptr Widget
widget' <- a -> IO (Ptr Widget)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
widget
    Ptr Widget -> Word32 -> IO ()
gtk_widget_remove_tick_callback Ptr Widget
widget' Word32
id
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
widget
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()

#if defined(ENABLE_OVERLOADING)
data WidgetRemoveTickCallbackMethodInfo
instance (signature ~ (Word32 -> m ()), MonadIO m, IsWidget a) => O.MethodInfo WidgetRemoveTickCallbackMethodInfo a signature where
    overloadedMethod = widgetRemoveTickCallback

#endif

-- method Widget::reset_style
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "widget"
--           , argType = TInterface Name { namespace = "Gtk" , name = "Widget" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #GtkWidget" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "gtk_widget_reset_style" gtk_widget_reset_style :: 
    Ptr Widget ->                           -- widget : TInterface (Name {namespace = "Gtk", name = "Widget"})
    IO ()

-- | Updates the style context of /@widget@/ and all descendants
-- by updating its widget path. @/GtkContainers/@ may want
-- to use this on a child when reordering it in a way that a different
-- style might apply to it. See also 'GI.Gtk.Objects.Container.containerGetPathForChild'.
widgetResetStyle ::
    (B.CallStack.HasCallStack, MonadIO m, IsWidget a) =>
    a
    -- ^ /@widget@/: a t'GI.Gtk.Objects.Widget.Widget'
    -> m ()
widgetResetStyle :: a -> m ()
widgetResetStyle widget :: a
widget = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    Ptr Widget
widget' <- a -> IO (Ptr Widget)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
widget
    Ptr Widget -> IO ()
gtk_widget_reset_style Ptr Widget
widget'
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
widget
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()

#if defined(ENABLE_OVERLOADING)
data WidgetResetStyleMethodInfo
instance (signature ~ (m ()), MonadIO m, IsWidget a) => O.MethodInfo WidgetResetStyleMethodInfo a signature where
    overloadedMethod = widgetResetStyle

#endif

-- method Widget::set_accel_path
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "widget"
--           , argType = TInterface Name { namespace = "Gtk" , name = "Widget" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #GtkWidget" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "accel_path"
--           , argType = TBasicType TUTF8
--           , direction = DirectionIn
--           , mayBeNull = True
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "path used to look up the accelerator"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "accel_group"
--           , argType =
--               TInterface Name { namespace = "Gtk" , name = "AccelGroup" }
--           , direction = DirectionIn
--           , mayBeNull = True
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #GtkAccelGroup." , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "gtk_widget_set_accel_path" gtk_widget_set_accel_path :: 
    Ptr Widget ->                           -- widget : TInterface (Name {namespace = "Gtk", name = "Widget"})
    CString ->                              -- accel_path : TBasicType TUTF8
    Ptr Gtk.AccelGroup.AccelGroup ->        -- accel_group : TInterface (Name {namespace = "Gtk", name = "AccelGroup"})
    IO ()

-- | Given an accelerator group, /@accelGroup@/, and an accelerator path,
-- /@accelPath@/, sets up an accelerator in /@accelGroup@/ so whenever the
-- key binding that is defined for /@accelPath@/ is pressed, /@widget@/
-- will be activated.  This removes any accelerators (for any
-- accelerator group) installed by previous calls to
-- 'GI.Gtk.Objects.Widget.widgetSetAccelPath'. Associating accelerators with
-- paths allows them to be modified by the user and the modifications
-- to be saved for future use. (See 'GI.Gtk.Objects.AccelMap.accelMapSave'.)
-- 
-- This function is a low level function that would most likely
-- be used by a menu creation system.
-- 
-- If you only want to
-- set up accelerators on menu items 'GI.Gtk.Objects.MenuItem.menuItemSetAccelPath'
-- provides a somewhat more convenient interface.
-- 
-- Note that /@accelPath@/ string will be stored in a @/GQuark/@. Therefore, if you
-- pass a static string, you can save some memory by interning it first with
-- 'GI.GLib.Functions.internStaticString'.
widgetSetAccelPath ::
    (B.CallStack.HasCallStack, MonadIO m, IsWidget a, Gtk.AccelGroup.IsAccelGroup b) =>
    a
    -- ^ /@widget@/: a t'GI.Gtk.Objects.Widget.Widget'
    -> Maybe (T.Text)
    -- ^ /@accelPath@/: path used to look up the accelerator
    -> Maybe (b)
    -- ^ /@accelGroup@/: a t'GI.Gtk.Objects.AccelGroup.AccelGroup'.
    -> m ()
widgetSetAccelPath :: a -> Maybe Text -> Maybe b -> m ()
widgetSetAccelPath widget :: a
widget accelPath :: Maybe Text
accelPath accelGroup :: Maybe b
accelGroup = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    Ptr Widget
widget' <- a -> IO (Ptr Widget)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
widget
    CString
maybeAccelPath <- case Maybe Text
accelPath of
        Nothing -> CString -> IO CString
forall (m :: * -> *) a. Monad m => a -> m a
return CString
forall a. Ptr a
nullPtr
        Just jAccelPath :: Text
jAccelPath -> do
            CString
jAccelPath' <- Text -> IO CString
textToCString Text
jAccelPath
            CString -> IO CString
forall (m :: * -> *) a. Monad m => a -> m a
return CString
jAccelPath'
    Ptr AccelGroup
maybeAccelGroup <- case Maybe b
accelGroup of
        Nothing -> Ptr AccelGroup -> IO (Ptr AccelGroup)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr AccelGroup
forall a. Ptr a
nullPtr
        Just jAccelGroup :: b
jAccelGroup -> do
            Ptr AccelGroup
jAccelGroup' <- b -> IO (Ptr AccelGroup)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
jAccelGroup
            Ptr AccelGroup -> IO (Ptr AccelGroup)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr AccelGroup
jAccelGroup'
    Ptr Widget -> CString -> Ptr AccelGroup -> IO ()
gtk_widget_set_accel_path Ptr Widget
widget' CString
maybeAccelPath Ptr AccelGroup
maybeAccelGroup
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
widget
    Maybe b -> (b -> IO ()) -> IO ()
forall (m :: * -> *) a. Monad m => Maybe a -> (a -> m ()) -> m ()
whenJust Maybe b
accelGroup b -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr
    CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
maybeAccelPath
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()

#if defined(ENABLE_OVERLOADING)
data WidgetSetAccelPathMethodInfo
instance (signature ~ (Maybe (T.Text) -> Maybe (b) -> m ()), MonadIO m, IsWidget a, Gtk.AccelGroup.IsAccelGroup b) => O.MethodInfo WidgetSetAccelPathMethodInfo a signature where
    overloadedMethod = widgetSetAccelPath

#endif

-- method Widget::set_can_focus
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "widget"
--           , argType = TInterface Name { namespace = "Gtk" , name = "Widget" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #GtkWidget" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "can_focus"
--           , argType = TBasicType TBoolean
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText =
--                     Just "whether or not @widget can own the input focus."
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "gtk_widget_set_can_focus" gtk_widget_set_can_focus :: 
    Ptr Widget ->                           -- widget : TInterface (Name {namespace = "Gtk", name = "Widget"})
    CInt ->                                 -- can_focus : TBasicType TBoolean
    IO ()

-- | Specifies whether /@widget@/ can own the input focus.
-- 
-- Note that having /@canFocus@/ be 'P.True' is only one of the
-- necessary conditions for being focusable. A widget must
-- also be sensitive and not have a ancestor that is marked
-- as not child-focusable in order to receive input focus.
-- 
-- See 'GI.Gtk.Objects.Widget.widgetGrabFocus' for actually setting the input
-- focus on a widget.
widgetSetCanFocus ::
    (B.CallStack.HasCallStack, MonadIO m, IsWidget a) =>
    a
    -- ^ /@widget@/: a t'GI.Gtk.Objects.Widget.Widget'
    -> Bool
    -- ^ /@canFocus@/: whether or not /@widget@/ can own the input focus.
    -> m ()
widgetSetCanFocus :: a -> Bool -> m ()
widgetSetCanFocus widget :: a
widget canFocus :: Bool
canFocus = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    Ptr Widget
widget' <- a -> IO (Ptr Widget)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
widget
    let canFocus' :: CInt
canFocus' = (Int -> CInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CInt) -> (Bool -> Int) -> Bool -> CInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Bool -> Int
forall a. Enum a => a -> Int
fromEnum) Bool
canFocus
    Ptr Widget -> CInt -> IO ()
gtk_widget_set_can_focus Ptr Widget
widget' CInt
canFocus'
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
widget
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()

#if defined(ENABLE_OVERLOADING)
data WidgetSetCanFocusMethodInfo
instance (signature ~ (Bool -> m ()), MonadIO m, IsWidget a) => O.MethodInfo WidgetSetCanFocusMethodInfo a signature where
    overloadedMethod = widgetSetCanFocus

#endif

-- method Widget::set_can_target
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "widget"
--           , argType = TInterface Name { namespace = "Gtk" , name = "Widget" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #GtkWidget" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "can_target"
--           , argType = TBasicType TBoolean
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText =
--                     Just "whether this widget should be able to receive pointer events"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "gtk_widget_set_can_target" gtk_widget_set_can_target :: 
    Ptr Widget ->                           -- widget : TInterface (Name {namespace = "Gtk", name = "Widget"})
    CInt ->                                 -- can_target : TBasicType TBoolean
    IO ()

-- | Sets whether /@widget@/ can be the target of pointer events.
widgetSetCanTarget ::
    (B.CallStack.HasCallStack, MonadIO m, IsWidget a) =>
    a
    -- ^ /@widget@/: a t'GI.Gtk.Objects.Widget.Widget'
    -> Bool
    -- ^ /@canTarget@/: whether this widget should be able to receive pointer events
    -> m ()
widgetSetCanTarget :: a -> Bool -> m ()
widgetSetCanTarget widget :: a
widget canTarget :: Bool
canTarget = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    Ptr Widget
widget' <- a -> IO (Ptr Widget)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
widget
    let canTarget' :: CInt
canTarget' = (Int -> CInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CInt) -> (Bool -> Int) -> Bool -> CInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Bool -> Int
forall a. Enum a => a -> Int
fromEnum) Bool
canTarget
    Ptr Widget -> CInt -> IO ()
gtk_widget_set_can_target Ptr Widget
widget' CInt
canTarget'
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
widget
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()

#if defined(ENABLE_OVERLOADING)
data WidgetSetCanTargetMethodInfo
instance (signature ~ (Bool -> m ()), MonadIO m, IsWidget a) => O.MethodInfo WidgetSetCanTargetMethodInfo a signature where
    overloadedMethod = widgetSetCanTarget

#endif

-- method Widget::set_child_visible
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "widget"
--           , argType = TInterface Name { namespace = "Gtk" , name = "Widget" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #GtkWidget" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "child_visible"
--           , argType = TBasicType TBoolean
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText =
--                     Just "if %TRUE, @widget should be mapped along with its parent."
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "gtk_widget_set_child_visible" gtk_widget_set_child_visible :: 
    Ptr Widget ->                           -- widget : TInterface (Name {namespace = "Gtk", name = "Widget"})
    CInt ->                                 -- child_visible : TBasicType TBoolean
    IO ()

-- | Sets whether /@widget@/ should be mapped along with its when its parent
-- is mapped and /@widget@/ has been shown with 'GI.Gtk.Objects.Widget.widgetShow'.
-- 
-- The child visibility can be set for widget before it is added to
-- a container with 'GI.Gtk.Objects.Widget.widgetSetParent', to avoid mapping
-- children unnecessary before immediately unmapping them. However
-- it will be reset to its default state of 'P.True' when the widget
-- is removed from a container.
-- 
-- Note that changing the child visibility of a widget does not
-- queue a resize on the widget. Most of the time, the size of
-- a widget is computed from all visible children, whether or
-- not they are mapped. If this is not the case, the container
-- can queue a resize itself.
-- 
-- This function is only useful for container implementations and
-- never should be called by an application.
widgetSetChildVisible ::
    (B.CallStack.HasCallStack, MonadIO m, IsWidget a) =>
    a
    -- ^ /@widget@/: a t'GI.Gtk.Objects.Widget.Widget'
    -> Bool
    -- ^ /@childVisible@/: if 'P.True', /@widget@/ should be mapped along with its parent.
    -> m ()
widgetSetChildVisible :: a -> Bool -> m ()
widgetSetChildVisible widget :: a
widget childVisible :: Bool
childVisible = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    Ptr Widget
widget' <- a -> IO (Ptr Widget)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
widget
    let childVisible' :: CInt
childVisible' = (Int -> CInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CInt) -> (Bool -> Int) -> Bool -> CInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Bool -> Int
forall a. Enum a => a -> Int
fromEnum) Bool
childVisible
    Ptr Widget -> CInt -> IO ()
gtk_widget_set_child_visible Ptr Widget
widget' CInt
childVisible'
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
widget
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()

#if defined(ENABLE_OVERLOADING)
data WidgetSetChildVisibleMethodInfo
instance (signature ~ (Bool -> m ()), MonadIO m, IsWidget a) => O.MethodInfo WidgetSetChildVisibleMethodInfo a signature where
    overloadedMethod = widgetSetChildVisible

#endif

-- method Widget::set_cursor
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "widget"
--           , argType = TInterface Name { namespace = "Gtk" , name = "Widget" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #GtkWidget" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "cursor"
--           , argType = TInterface Name { namespace = "Gdk" , name = "Cursor" }
--           , direction = DirectionIn
--           , mayBeNull = True
--           , argDoc =
--               Documentation
--                 { rawDocText =
--                     Just "the new cursor or %NULL to use the default\n    cursor"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "gtk_widget_set_cursor" gtk_widget_set_cursor :: 
    Ptr Widget ->                           -- widget : TInterface (Name {namespace = "Gtk", name = "Widget"})
    Ptr Gdk.Cursor.Cursor ->                -- cursor : TInterface (Name {namespace = "Gdk", name = "Cursor"})
    IO ()

-- | Sets the cursor to be shown when pointer devices point towards /@widget@/.
-- 
-- If the /@cursor@/ is NULL, /@widget@/ will use the cursor inherited from the
-- parent widget.
widgetSetCursor ::
    (B.CallStack.HasCallStack, MonadIO m, IsWidget a, Gdk.Cursor.IsCursor b) =>
    a
    -- ^ /@widget@/: a t'GI.Gtk.Objects.Widget.Widget'
    -> Maybe (b)
    -- ^ /@cursor@/: the new cursor or 'P.Nothing' to use the default
    --     cursor
    -> m ()
widgetSetCursor :: a -> Maybe b -> m ()
widgetSetCursor widget :: a
widget cursor :: Maybe b
cursor = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    Ptr Widget
widget' <- a -> IO (Ptr Widget)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
widget
    Ptr Cursor
maybeCursor <- case Maybe b
cursor of
        Nothing -> Ptr Cursor -> IO (Ptr Cursor)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr Cursor
forall a. Ptr a
nullPtr
        Just jCursor :: b
jCursor -> do
            Ptr Cursor
jCursor' <- b -> IO (Ptr Cursor)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
jCursor
            Ptr Cursor -> IO (Ptr Cursor)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr Cursor
jCursor'
    Ptr Widget -> Ptr Cursor -> IO ()
gtk_widget_set_cursor Ptr Widget
widget' Ptr Cursor
maybeCursor
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
widget
    Maybe b -> (b -> IO ()) -> IO ()
forall (m :: * -> *) a. Monad m => Maybe a -> (a -> m ()) -> m ()
whenJust Maybe b
cursor b -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()

#if defined(ENABLE_OVERLOADING)
data WidgetSetCursorMethodInfo
instance (signature ~ (Maybe (b) -> m ()), MonadIO m, IsWidget a, Gdk.Cursor.IsCursor b) => O.MethodInfo WidgetSetCursorMethodInfo a signature where
    overloadedMethod = widgetSetCursor

#endif

-- method Widget::set_cursor_from_name
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "widget"
--           , argType = TInterface Name { namespace = "Gtk" , name = "Widget" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #GtkWidget" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "name"
--           , argType = TBasicType TUTF8
--           , direction = DirectionIn
--           , mayBeNull = True
--           , argDoc =
--               Documentation
--                 { rawDocText =
--                     Just
--                       "The name of the cursor or %NULL to use the default\n    cursor"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "gtk_widget_set_cursor_from_name" gtk_widget_set_cursor_from_name :: 
    Ptr Widget ->                           -- widget : TInterface (Name {namespace = "Gtk", name = "Widget"})
    CString ->                              -- name : TBasicType TUTF8
    IO ()

-- | Sets a named cursor to be shown when pointer devices point towards /@widget@/.
-- 
-- This is a utility function that creates a cursor via
-- 'GI.Gdk.Objects.Cursor.cursorNewFromName' and then sets it on /@widget@/ with
-- 'GI.Gtk.Objects.Widget.widgetSetCursor'. See those 2 functions for details.
-- 
-- On top of that, this function allows /@name@/ to be 'P.Nothing', which will
-- do the same as calling 'GI.Gtk.Objects.Widget.widgetSetCursor' with a 'P.Nothing' cursor.
widgetSetCursorFromName ::
    (B.CallStack.HasCallStack, MonadIO m, IsWidget a) =>
    a
    -- ^ /@widget@/: a t'GI.Gtk.Objects.Widget.Widget'
    -> Maybe (T.Text)
    -- ^ /@name@/: The name of the cursor or 'P.Nothing' to use the default
    --     cursor
    -> m ()
widgetSetCursorFromName :: a -> Maybe Text -> m ()
widgetSetCursorFromName widget :: a
widget name :: Maybe Text
name = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    Ptr Widget
widget' <- a -> IO (Ptr Widget)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
widget
    CString
maybeName <- case Maybe Text
name of
        Nothing -> CString -> IO CString
forall (m :: * -> *) a. Monad m => a -> m a
return CString
forall a. Ptr a
nullPtr
        Just jName :: Text
jName -> do
            CString
jName' <- Text -> IO CString
textToCString Text
jName
            CString -> IO CString
forall (m :: * -> *) a. Monad m => a -> m a
return CString
jName'
    Ptr Widget -> CString -> IO ()
gtk_widget_set_cursor_from_name Ptr Widget
widget' CString
maybeName
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
widget
    CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
maybeName
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()

#if defined(ENABLE_OVERLOADING)
data WidgetSetCursorFromNameMethodInfo
instance (signature ~ (Maybe (T.Text) -> m ()), MonadIO m, IsWidget a) => O.MethodInfo WidgetSetCursorFromNameMethodInfo a signature where
    overloadedMethod = widgetSetCursorFromName

#endif

-- method Widget::set_direction
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "widget"
--           , argType = TInterface Name { namespace = "Gtk" , name = "Widget" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #GtkWidget" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "dir"
--           , argType =
--               TInterface Name { namespace = "Gtk" , name = "TextDirection" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "the new direction" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "gtk_widget_set_direction" gtk_widget_set_direction :: 
    Ptr Widget ->                           -- widget : TInterface (Name {namespace = "Gtk", name = "Widget"})
    CUInt ->                                -- dir : TInterface (Name {namespace = "Gtk", name = "TextDirection"})
    IO ()

-- | Sets the reading direction on a particular widget. This direction
-- controls the primary direction for widgets containing text,
-- and also the direction in which the children of a container are
-- packed. The ability to set the direction is present in order
-- so that correct localization into languages with right-to-left
-- reading directions can be done. Generally, applications will
-- let the default reading direction present, except for containers
-- where the containers are arranged in an order that is explicitly
-- visual rather than logical (such as buttons for text justification).
-- 
-- If the direction is set to 'GI.Gtk.Enums.TextDirectionNone', then the value
-- set by 'GI.Gtk.Objects.Widget.widgetSetDefaultDirection' will be used.
widgetSetDirection ::
    (B.CallStack.HasCallStack, MonadIO m, IsWidget a) =>
    a
    -- ^ /@widget@/: a t'GI.Gtk.Objects.Widget.Widget'
    -> Gtk.Enums.TextDirection
    -- ^ /@dir@/: the new direction
    -> m ()
widgetSetDirection :: a -> TextDirection -> m ()
widgetSetDirection widget :: a
widget dir :: TextDirection
dir = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    Ptr Widget
widget' <- a -> IO (Ptr Widget)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
widget
    let dir' :: CUInt
dir' = (Int -> CUInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CUInt) -> (TextDirection -> Int) -> TextDirection -> CUInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. TextDirection -> Int
forall a. Enum a => a -> Int
fromEnum) TextDirection
dir
    Ptr Widget -> CUInt -> IO ()
gtk_widget_set_direction Ptr Widget
widget' CUInt
dir'
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
widget
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()

#if defined(ENABLE_OVERLOADING)
data WidgetSetDirectionMethodInfo
instance (signature ~ (Gtk.Enums.TextDirection -> m ()), MonadIO m, IsWidget a) => O.MethodInfo WidgetSetDirectionMethodInfo a signature where
    overloadedMethod = widgetSetDirection

#endif

-- method Widget::set_focus_child
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "widget"
--           , argType = TInterface Name { namespace = "Gtk" , name = "Widget" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #GtkWidget" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "child"
--           , argType = TInterface Name { namespace = "Gtk" , name = "Widget" }
--           , direction = DirectionIn
--           , mayBeNull = True
--           , argDoc =
--               Documentation
--                 { rawDocText =
--                     Just
--                       "a direct child widget of @widget or %NULL\n  to unset the focus child of @widget"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "gtk_widget_set_focus_child" gtk_widget_set_focus_child :: 
    Ptr Widget ->                           -- widget : TInterface (Name {namespace = "Gtk", name = "Widget"})
    Ptr Widget ->                           -- child : TInterface (Name {namespace = "Gtk", name = "Widget"})
    IO ()

-- | Set /@child@/ as the current focus child of /@widget@/. The previous
-- focus child will be unset.
-- 
-- This function is only suitable for widget implementations.
-- If you want a certain widget to get the input focus, call
-- 'GI.Gtk.Objects.Widget.widgetGrabFocus' on it.
widgetSetFocusChild ::
    (B.CallStack.HasCallStack, MonadIO m, IsWidget a, IsWidget b) =>
    a
    -- ^ /@widget@/: a t'GI.Gtk.Objects.Widget.Widget'
    -> Maybe (b)
    -- ^ /@child@/: a direct child widget of /@widget@/ or 'P.Nothing'
    --   to unset the focus child of /@widget@/
    -> m ()
widgetSetFocusChild :: a -> Maybe b -> m ()
widgetSetFocusChild widget :: a
widget child :: Maybe b
child = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    Ptr Widget
widget' <- a -> IO (Ptr Widget)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
widget
    Ptr Widget
maybeChild <- case Maybe b
child of
        Nothing -> Ptr Widget -> IO (Ptr Widget)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr Widget
forall a. Ptr a
nullPtr
        Just jChild :: b
jChild -> do
            Ptr Widget
jChild' <- b -> IO (Ptr Widget)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
jChild
            Ptr Widget -> IO (Ptr Widget)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr Widget
jChild'
    Ptr Widget -> Ptr Widget -> IO ()
gtk_widget_set_focus_child Ptr Widget
widget' Ptr Widget
maybeChild
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
widget
    Maybe b -> (b -> IO ()) -> IO ()
forall (m :: * -> *) a. Monad m => Maybe a -> (a -> m ()) -> m ()
whenJust Maybe b
child b -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()

#if defined(ENABLE_OVERLOADING)
data WidgetSetFocusChildMethodInfo
instance (signature ~ (Maybe (b) -> m ()), MonadIO m, IsWidget a, IsWidget b) => O.MethodInfo WidgetSetFocusChildMethodInfo a signature where
    overloadedMethod = widgetSetFocusChild

#endif

-- method Widget::set_focus_on_click
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "widget"
--           , argType = TInterface Name { namespace = "Gtk" , name = "Widget" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #GtkWidget" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "focus_on_click"
--           , argType = TBasicType TBoolean
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText =
--                     Just
--                       "whether the widget should grab focus when clicked with the mouse"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "gtk_widget_set_focus_on_click" gtk_widget_set_focus_on_click :: 
    Ptr Widget ->                           -- widget : TInterface (Name {namespace = "Gtk", name = "Widget"})
    CInt ->                                 -- focus_on_click : TBasicType TBoolean
    IO ()

-- | Sets whether the widget should grab focus when it is clicked with the mouse.
-- Making mouse clicks not grab focus is useful in places like toolbars where
-- you don’t want the keyboard focus removed from the main area of the
-- application.
widgetSetFocusOnClick ::
    (B.CallStack.HasCallStack, MonadIO m, IsWidget a) =>
    a
    -- ^ /@widget@/: a t'GI.Gtk.Objects.Widget.Widget'
    -> Bool
    -- ^ /@focusOnClick@/: whether the widget should grab focus when clicked with the mouse
    -> m ()
widgetSetFocusOnClick :: a -> Bool -> m ()
widgetSetFocusOnClick widget :: a
widget focusOnClick :: Bool
focusOnClick = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    Ptr Widget
widget' <- a -> IO (Ptr Widget)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
widget
    let focusOnClick' :: CInt
focusOnClick' = (Int -> CInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CInt) -> (Bool -> Int) -> Bool -> CInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Bool -> Int
forall a. Enum a => a -> Int
fromEnum) Bool
focusOnClick
    Ptr Widget -> CInt -> IO ()
gtk_widget_set_focus_on_click Ptr Widget
widget' CInt
focusOnClick'
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
widget
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()

#if defined(ENABLE_OVERLOADING)
data WidgetSetFocusOnClickMethodInfo
instance (signature ~ (Bool -> m ()), MonadIO m, IsWidget a) => O.MethodInfo WidgetSetFocusOnClickMethodInfo a signature where
    overloadedMethod = widgetSetFocusOnClick

#endif

-- method Widget::set_font_map
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "widget"
--           , argType = TInterface Name { namespace = "Gtk" , name = "Widget" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #GtkWidget" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "font_map"
--           , argType =
--               TInterface Name { namespace = "Pango" , name = "FontMap" }
--           , direction = DirectionIn
--           , mayBeNull = True
--           , argDoc =
--               Documentation
--                 { rawDocText =
--                     Just
--                       "a #PangoFontMap, or %NULL to unset any previously\n    set font map"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "gtk_widget_set_font_map" gtk_widget_set_font_map :: 
    Ptr Widget ->                           -- widget : TInterface (Name {namespace = "Gtk", name = "Widget"})
    Ptr Pango.FontMap.FontMap ->            -- font_map : TInterface (Name {namespace = "Pango", name = "FontMap"})
    IO ()

-- | Sets the font map to use for Pango rendering. When not set, the widget
-- will inherit the font map from its parent.
widgetSetFontMap ::
    (B.CallStack.HasCallStack, MonadIO m, IsWidget a, Pango.FontMap.IsFontMap b) =>
    a
    -- ^ /@widget@/: a t'GI.Gtk.Objects.Widget.Widget'
    -> Maybe (b)
    -- ^ /@fontMap@/: a t'GI.Pango.Objects.FontMap.FontMap', or 'P.Nothing' to unset any previously
    --     set font map
    -> m ()
widgetSetFontMap :: a -> Maybe b -> m ()
widgetSetFontMap widget :: a
widget fontMap :: Maybe b
fontMap = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    Ptr Widget
widget' <- a -> IO (Ptr Widget)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
widget
    Ptr FontMap
maybeFontMap <- case Maybe b
fontMap of
        Nothing -> Ptr FontMap -> IO (Ptr FontMap)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr FontMap
forall a. Ptr a
nullPtr
        Just jFontMap :: b
jFontMap -> do
            Ptr FontMap
jFontMap' <- b -> IO (Ptr FontMap)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
jFontMap
            Ptr FontMap -> IO (Ptr FontMap)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr FontMap
jFontMap'
    Ptr Widget -> Ptr FontMap -> IO ()
gtk_widget_set_font_map Ptr Widget
widget' Ptr FontMap
maybeFontMap
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
widget
    Maybe b -> (b -> IO ()) -> IO ()
forall (m :: * -> *) a. Monad m => Maybe a -> (a -> m ()) -> m ()
whenJust Maybe b
fontMap b -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()

#if defined(ENABLE_OVERLOADING)
data WidgetSetFontMapMethodInfo
instance (signature ~ (Maybe (b) -> m ()), MonadIO m, IsWidget a, Pango.FontMap.IsFontMap b) => O.MethodInfo WidgetSetFontMapMethodInfo a signature where
    overloadedMethod = widgetSetFontMap

#endif

-- method Widget::set_font_options
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "widget"
--           , argType = TInterface Name { namespace = "Gtk" , name = "Widget" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #GtkWidget" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "options"
--           , argType =
--               TInterface Name { namespace = "cairo" , name = "FontOptions" }
--           , direction = DirectionIn
--           , mayBeNull = True
--           , argDoc =
--               Documentation
--                 { rawDocText =
--                     Just
--                       "a #cairo_font_options_t, or %NULL to unset any\n  previously set default font options."
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "gtk_widget_set_font_options" gtk_widget_set_font_options :: 
    Ptr Widget ->                           -- widget : TInterface (Name {namespace = "Gtk", name = "Widget"})
    Ptr Cairo.FontOptions.FontOptions ->    -- options : TInterface (Name {namespace = "cairo", name = "FontOptions"})
    IO ()

-- | Sets the t'GI.Cairo.Structs.FontOptions.FontOptions' used for Pango rendering in this widget.
-- When not set, the default font options for the t'GI.Gdk.Objects.Display.Display' will be used.
widgetSetFontOptions ::
    (B.CallStack.HasCallStack, MonadIO m, IsWidget a) =>
    a
    -- ^ /@widget@/: a t'GI.Gtk.Objects.Widget.Widget'
    -> Maybe (Cairo.FontOptions.FontOptions)
    -- ^ /@options@/: a t'GI.Cairo.Structs.FontOptions.FontOptions', or 'P.Nothing' to unset any
    --   previously set default font options.
    -> m ()
widgetSetFontOptions :: a -> Maybe FontOptions -> m ()
widgetSetFontOptions widget :: a
widget options :: Maybe FontOptions
options = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    Ptr Widget
widget' <- a -> IO (Ptr Widget)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
widget
    Ptr FontOptions
maybeOptions <- case Maybe FontOptions
options of
        Nothing -> Ptr FontOptions -> IO (Ptr FontOptions)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr FontOptions
forall a. Ptr a
nullPtr
        Just jOptions :: FontOptions
jOptions -> do
            Ptr FontOptions
jOptions' <- FontOptions -> IO (Ptr FontOptions)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr FontOptions
jOptions
            Ptr FontOptions -> IO (Ptr FontOptions)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr FontOptions
jOptions'
    Ptr Widget -> Ptr FontOptions -> IO ()
gtk_widget_set_font_options Ptr Widget
widget' Ptr FontOptions
maybeOptions
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
widget
    Maybe FontOptions -> (FontOptions -> IO ()) -> IO ()
forall (m :: * -> *) a. Monad m => Maybe a -> (a -> m ()) -> m ()
whenJust Maybe FontOptions
options FontOptions -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()

#if defined(ENABLE_OVERLOADING)
data WidgetSetFontOptionsMethodInfo
instance (signature ~ (Maybe (Cairo.FontOptions.FontOptions) -> m ()), MonadIO m, IsWidget a) => O.MethodInfo WidgetSetFontOptionsMethodInfo a signature where
    overloadedMethod = widgetSetFontOptions

#endif

-- method Widget::set_halign
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "widget"
--           , argType = TInterface Name { namespace = "Gtk" , name = "Widget" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #GtkWidget" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "align"
--           , argType = TInterface Name { namespace = "Gtk" , name = "Align" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "the horizontal alignment"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "gtk_widget_set_halign" gtk_widget_set_halign :: 
    Ptr Widget ->                           -- widget : TInterface (Name {namespace = "Gtk", name = "Widget"})
    CUInt ->                                -- align : TInterface (Name {namespace = "Gtk", name = "Align"})
    IO ()

-- | Sets the horizontal alignment of /@widget@/.
-- See the t'GI.Gtk.Objects.Widget.Widget':@/halign/@ property.
widgetSetHalign ::
    (B.CallStack.HasCallStack, MonadIO m, IsWidget a) =>
    a
    -- ^ /@widget@/: a t'GI.Gtk.Objects.Widget.Widget'
    -> Gtk.Enums.Align
    -- ^ /@align@/: the horizontal alignment
    -> m ()
widgetSetHalign :: a -> Align -> m ()
widgetSetHalign widget :: a
widget align :: Align
align = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    Ptr Widget
widget' <- a -> IO (Ptr Widget)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
widget
    let align' :: CUInt
align' = (Int -> CUInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CUInt) -> (Align -> Int) -> Align -> CUInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Align -> Int
forall a. Enum a => a -> Int
fromEnum) Align
align
    Ptr Widget -> CUInt -> IO ()
gtk_widget_set_halign Ptr Widget
widget' CUInt
align'
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
widget
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()

#if defined(ENABLE_OVERLOADING)
data WidgetSetHalignMethodInfo
instance (signature ~ (Gtk.Enums.Align -> m ()), MonadIO m, IsWidget a) => O.MethodInfo WidgetSetHalignMethodInfo a signature where
    overloadedMethod = widgetSetHalign

#endif

-- method Widget::set_has_surface
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "widget"
--           , argType = TInterface Name { namespace = "Gtk" , name = "Widget" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #GtkWidget" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "has_surface"
--           , argType = TBasicType TBoolean
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "whether or not @widget has a surface."
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "gtk_widget_set_has_surface" gtk_widget_set_has_surface :: 
    Ptr Widget ->                           -- widget : TInterface (Name {namespace = "Gtk", name = "Widget"})
    CInt ->                                 -- has_surface : TBasicType TBoolean
    IO ()

-- | Specifies whether /@widget@/ has a t'GI.Gdk.Objects.Surface.Surface' of its own. Note that
-- all realized widgets have a non-'P.Nothing' “window” pointer
-- ('GI.Gtk.Objects.Widget.widgetGetSurface' never returns a 'P.Nothing' surface when a widget
-- is realized), but for many of them it’s actually the t'GI.Gdk.Objects.Surface.Surface' of
-- one of its parent widgets. Widgets that do not create a @/window/@ for
-- themselves in [realize]("GI.Gtk.Objects.Widget#signal:realize") must announce this by
-- calling this function with /@hasSurface@/ = 'P.False'.
-- 
-- This function should only be called by widget implementations,
-- and they should call it in their @/init()/@ function.
widgetSetHasSurface ::
    (B.CallStack.HasCallStack, MonadIO m, IsWidget a) =>
    a
    -- ^ /@widget@/: a t'GI.Gtk.Objects.Widget.Widget'
    -> Bool
    -- ^ /@hasSurface@/: whether or not /@widget@/ has a surface.
    -> m ()
widgetSetHasSurface :: a -> Bool -> m ()
widgetSetHasSurface widget :: a
widget hasSurface :: Bool
hasSurface = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    Ptr Widget
widget' <- a -> IO (Ptr Widget)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
widget
    let hasSurface' :: CInt
hasSurface' = (Int -> CInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CInt) -> (Bool -> Int) -> Bool -> CInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Bool -> Int
forall a. Enum a => a -> Int
fromEnum) Bool
hasSurface
    Ptr Widget -> CInt -> IO ()
gtk_widget_set_has_surface Ptr Widget
widget' CInt
hasSurface'
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
widget
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()

#if defined(ENABLE_OVERLOADING)
data WidgetSetHasSurfaceMethodInfo
instance (signature ~ (Bool -> m ()), MonadIO m, IsWidget a) => O.MethodInfo WidgetSetHasSurfaceMethodInfo a signature where
    overloadedMethod = widgetSetHasSurface

#endif

-- method Widget::set_has_tooltip
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "widget"
--           , argType = TInterface Name { namespace = "Gtk" , name = "Widget" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #GtkWidget" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "has_tooltip"
--           , argType = TBasicType TBoolean
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "whether or not @widget has a tooltip."
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "gtk_widget_set_has_tooltip" gtk_widget_set_has_tooltip :: 
    Ptr Widget ->                           -- widget : TInterface (Name {namespace = "Gtk", name = "Widget"})
    CInt ->                                 -- has_tooltip : TBasicType TBoolean
    IO ()

-- | Sets the has-tooltip property on /@widget@/ to /@hasTooltip@/.  See
-- t'GI.Gtk.Objects.Widget.Widget':@/has-tooltip/@ for more information.
widgetSetHasTooltip ::
    (B.CallStack.HasCallStack, MonadIO m, IsWidget a) =>
    a
    -- ^ /@widget@/: a t'GI.Gtk.Objects.Widget.Widget'
    -> Bool
    -- ^ /@hasTooltip@/: whether or not /@widget@/ has a tooltip.
    -> m ()
widgetSetHasTooltip :: a -> Bool -> m ()
widgetSetHasTooltip widget :: a
widget hasTooltip :: Bool
hasTooltip = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    Ptr Widget
widget' <- a -> IO (Ptr Widget)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
widget
    let hasTooltip' :: CInt
hasTooltip' = (Int -> CInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CInt) -> (Bool -> Int) -> Bool -> CInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Bool -> Int
forall a. Enum a => a -> Int
fromEnum) Bool
hasTooltip
    Ptr Widget -> CInt -> IO ()
gtk_widget_set_has_tooltip Ptr Widget
widget' CInt
hasTooltip'
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
widget
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()

#if defined(ENABLE_OVERLOADING)
data WidgetSetHasTooltipMethodInfo
instance (signature ~ (Bool -> m ()), MonadIO m, IsWidget a) => O.MethodInfo WidgetSetHasTooltipMethodInfo a signature where
    overloadedMethod = widgetSetHasTooltip

#endif

-- method Widget::set_hexpand
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "widget"
--           , argType = TInterface Name { namespace = "Gtk" , name = "Widget" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "the widget" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "expand"
--           , argType = TBasicType TBoolean
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "whether to expand" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "gtk_widget_set_hexpand" gtk_widget_set_hexpand :: 
    Ptr Widget ->                           -- widget : TInterface (Name {namespace = "Gtk", name = "Widget"})
    CInt ->                                 -- expand : TBasicType TBoolean
    IO ()

-- | Sets whether the widget would like any available extra horizontal
-- space. When a user resizes a t'GI.Gtk.Objects.Window.Window', widgets with expand=TRUE
-- generally receive the extra space. For example, a list or
-- scrollable area or document in your window would often be set to
-- expand.
-- 
-- Call this function to set the expand flag if you would like your
-- widget to become larger horizontally when the window has extra
-- room.
-- 
-- By default, widgets automatically expand if any of their children
-- want to expand. (To see if a widget will automatically expand given
-- its current children and state, call 'GI.Gtk.Objects.Widget.widgetComputeExpand'. A
-- container can decide how the expandability of children affects the
-- expansion of the container by overriding the compute_expand virtual
-- method on t'GI.Gtk.Objects.Widget.Widget'.).
-- 
-- Setting hexpand explicitly with this function will override the
-- automatic expand behavior.
-- 
-- This function forces the widget to expand or not to expand,
-- regardless of children.  The override occurs because
-- 'GI.Gtk.Objects.Widget.widgetSetHexpand' sets the hexpand-set property (see
-- 'GI.Gtk.Objects.Widget.widgetSetHexpandSet') which causes the widget’s hexpand
-- value to be used, rather than looking at children and widget state.
widgetSetHexpand ::
    (B.CallStack.HasCallStack, MonadIO m, IsWidget a) =>
    a
    -- ^ /@widget@/: the widget
    -> Bool
    -- ^ /@expand@/: whether to expand
    -> m ()
widgetSetHexpand :: a -> Bool -> m ()
widgetSetHexpand widget :: a
widget expand :: Bool
expand = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    Ptr Widget
widget' <- a -> IO (Ptr Widget)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
widget
    let expand' :: CInt
expand' = (Int -> CInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CInt) -> (Bool -> Int) -> Bool -> CInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Bool -> Int
forall a. Enum a => a -> Int
fromEnum) Bool
expand
    Ptr Widget -> CInt -> IO ()
gtk_widget_set_hexpand Ptr Widget
widget' CInt
expand'
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
widget
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()

#if defined(ENABLE_OVERLOADING)
data WidgetSetHexpandMethodInfo
instance (signature ~ (Bool -> m ()), MonadIO m, IsWidget a) => O.MethodInfo WidgetSetHexpandMethodInfo a signature where
    overloadedMethod = widgetSetHexpand

#endif

-- method Widget::set_hexpand_set
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "widget"
--           , argType = TInterface Name { namespace = "Gtk" , name = "Widget" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "the widget" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "set"
--           , argType = TBasicType TBoolean
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "value for hexpand-set property"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "gtk_widget_set_hexpand_set" gtk_widget_set_hexpand_set :: 
    Ptr Widget ->                           -- widget : TInterface (Name {namespace = "Gtk", name = "Widget"})
    CInt ->                                 -- set : TBasicType TBoolean
    IO ()

-- | Sets whether the hexpand flag (see 'GI.Gtk.Objects.Widget.widgetGetHexpand') will
-- be used.
-- 
-- The hexpand-set property will be set automatically when you call
-- 'GI.Gtk.Objects.Widget.widgetSetHexpand' to set hexpand, so the most likely
-- reason to use this function would be to unset an explicit expand
-- flag.
-- 
-- If hexpand is set, then it overrides any computed
-- expand value based on child widgets. If hexpand is not
-- set, then the expand value depends on whether any
-- children of the widget would like to expand.
-- 
-- There are few reasons to use this function, but it’s here
-- for completeness and consistency.
widgetSetHexpandSet ::
    (B.CallStack.HasCallStack, MonadIO m, IsWidget a) =>
    a
    -- ^ /@widget@/: the widget
    -> Bool
    -- ^ /@set@/: value for hexpand-set property
    -> m ()
widgetSetHexpandSet :: a -> Bool -> m ()
widgetSetHexpandSet widget :: a
widget set :: Bool
set = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    Ptr Widget
widget' <- a -> IO (Ptr Widget)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
widget
    let set' :: CInt
set' = (Int -> CInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CInt) -> (Bool -> Int) -> Bool -> CInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Bool -> Int
forall a. Enum a => a -> Int
fromEnum) Bool
set
    Ptr Widget -> CInt -> IO ()
gtk_widget_set_hexpand_set Ptr Widget
widget' CInt
set'
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
widget
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()

#if defined(ENABLE_OVERLOADING)
data WidgetSetHexpandSetMethodInfo
instance (signature ~ (Bool -> m ()), MonadIO m, IsWidget a) => O.MethodInfo WidgetSetHexpandSetMethodInfo a signature where
    overloadedMethod = widgetSetHexpandSet

#endif

-- method Widget::set_layout_manager
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "widget"
--           , argType = TInterface Name { namespace = "Gtk" , name = "Widget" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #GtkWidget" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "layout_manager"
--           , argType =
--               TInterface Name { namespace = "Gtk" , name = "LayoutManager" }
--           , direction = DirectionIn
--           , mayBeNull = True
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #GtkLayoutManager"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferEverything
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "gtk_widget_set_layout_manager" gtk_widget_set_layout_manager :: 
    Ptr Widget ->                           -- widget : TInterface (Name {namespace = "Gtk", name = "Widget"})
    Ptr Gtk.LayoutManager.LayoutManager ->  -- layout_manager : TInterface (Name {namespace = "Gtk", name = "LayoutManager"})
    IO ()

-- | Sets the layout manager delegate instance that provides an implementation
-- for measuring and allocating the children of /@widget@/.
widgetSetLayoutManager ::
    (B.CallStack.HasCallStack, MonadIO m, IsWidget a, Gtk.LayoutManager.IsLayoutManager b) =>
    a
    -- ^ /@widget@/: a t'GI.Gtk.Objects.Widget.Widget'
    -> Maybe (b)
    -- ^ /@layoutManager@/: a t'GI.Gtk.Objects.LayoutManager.LayoutManager'
    -> m ()
widgetSetLayoutManager :: a -> Maybe b -> m ()
widgetSetLayoutManager widget :: a
widget layoutManager :: Maybe b
layoutManager = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    Ptr Widget
widget' <- a -> IO (Ptr Widget)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
widget
    Ptr LayoutManager
maybeLayoutManager <- case Maybe b
layoutManager of
        Nothing -> Ptr LayoutManager -> IO (Ptr LayoutManager)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr LayoutManager
forall a. Ptr a
nullPtr
        Just jLayoutManager :: b
jLayoutManager -> do
            Ptr LayoutManager
jLayoutManager' <- b -> IO (Ptr LayoutManager)
forall a b. (HasCallStack, GObject a) => a -> IO (Ptr b)
B.ManagedPtr.disownObject b
jLayoutManager
            Ptr LayoutManager -> IO (Ptr LayoutManager)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr LayoutManager
jLayoutManager'
    Ptr Widget -> Ptr LayoutManager -> IO ()
gtk_widget_set_layout_manager Ptr Widget
widget' Ptr LayoutManager
maybeLayoutManager
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
widget
    Maybe b -> (b -> IO ()) -> IO ()
forall (m :: * -> *) a. Monad m => Maybe a -> (a -> m ()) -> m ()
whenJust Maybe b
layoutManager b -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()

#if defined(ENABLE_OVERLOADING)
data WidgetSetLayoutManagerMethodInfo
instance (signature ~ (Maybe (b) -> m ()), MonadIO m, IsWidget a, Gtk.LayoutManager.IsLayoutManager b) => O.MethodInfo WidgetSetLayoutManagerMethodInfo a signature where
    overloadedMethod = widgetSetLayoutManager

#endif

-- method Widget::set_margin_bottom
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "widget"
--           , argType = TInterface Name { namespace = "Gtk" , name = "Widget" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #GtkWidget" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "margin"
--           , argType = TBasicType TInt
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "the bottom margin" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "gtk_widget_set_margin_bottom" gtk_widget_set_margin_bottom :: 
    Ptr Widget ->                           -- widget : TInterface (Name {namespace = "Gtk", name = "Widget"})
    Int32 ->                                -- margin : TBasicType TInt
    IO ()

-- | Sets the bottom margin of /@widget@/.
-- See the t'GI.Gtk.Objects.Widget.Widget':@/margin-bottom/@ property.
widgetSetMarginBottom ::
    (B.CallStack.HasCallStack, MonadIO m, IsWidget a) =>
    a
    -- ^ /@widget@/: a t'GI.Gtk.Objects.Widget.Widget'
    -> Int32
    -- ^ /@margin@/: the bottom margin
    -> m ()
widgetSetMarginBottom :: a -> Int32 -> m ()
widgetSetMarginBottom widget :: a
widget margin :: Int32
margin = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    Ptr Widget
widget' <- a -> IO (Ptr Widget)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
widget
    Ptr Widget -> Int32 -> IO ()
gtk_widget_set_margin_bottom Ptr Widget
widget' Int32
margin
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
widget
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()

#if defined(ENABLE_OVERLOADING)
data WidgetSetMarginBottomMethodInfo
instance (signature ~ (Int32 -> m ()), MonadIO m, IsWidget a) => O.MethodInfo WidgetSetMarginBottomMethodInfo a signature where
    overloadedMethod = widgetSetMarginBottom

#endif

-- method Widget::set_margin_end
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "widget"
--           , argType = TInterface Name { namespace = "Gtk" , name = "Widget" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #GtkWidget" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "margin"
--           , argType = TBasicType TInt
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "the end margin" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "gtk_widget_set_margin_end" gtk_widget_set_margin_end :: 
    Ptr Widget ->                           -- widget : TInterface (Name {namespace = "Gtk", name = "Widget"})
    Int32 ->                                -- margin : TBasicType TInt
    IO ()

-- | Sets the end margin of /@widget@/.
-- See the t'GI.Gtk.Objects.Widget.Widget':@/margin-end/@ property.
widgetSetMarginEnd ::
    (B.CallStack.HasCallStack, MonadIO m, IsWidget a) =>
    a
    -- ^ /@widget@/: a t'GI.Gtk.Objects.Widget.Widget'
    -> Int32
    -- ^ /@margin@/: the end margin
    -> m ()
widgetSetMarginEnd :: a -> Int32 -> m ()
widgetSetMarginEnd widget :: a
widget margin :: Int32
margin = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    Ptr Widget
widget' <- a -> IO (Ptr Widget)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
widget
    Ptr Widget -> Int32 -> IO ()
gtk_widget_set_margin_end Ptr Widget
widget' Int32
margin
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
widget
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()

#if defined(ENABLE_OVERLOADING)
data WidgetSetMarginEndMethodInfo
instance (signature ~ (Int32 -> m ()), MonadIO m, IsWidget a) => O.MethodInfo WidgetSetMarginEndMethodInfo a signature where
    overloadedMethod = widgetSetMarginEnd

#endif

-- method Widget::set_margin_start
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "widget"
--           , argType = TInterface Name { namespace = "Gtk" , name = "Widget" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #GtkWidget" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "margin"
--           , argType = TBasicType TInt
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "the start margin" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "gtk_widget_set_margin_start" gtk_widget_set_margin_start :: 
    Ptr Widget ->                           -- widget : TInterface (Name {namespace = "Gtk", name = "Widget"})
    Int32 ->                                -- margin : TBasicType TInt
    IO ()

-- | Sets the start margin of /@widget@/.
-- See the t'GI.Gtk.Objects.Widget.Widget':@/margin-start/@ property.
widgetSetMarginStart ::
    (B.CallStack.HasCallStack, MonadIO m, IsWidget a) =>
    a
    -- ^ /@widget@/: a t'GI.Gtk.Objects.Widget.Widget'
    -> Int32
    -- ^ /@margin@/: the start margin
    -> m ()
widgetSetMarginStart :: a -> Int32 -> m ()
widgetSetMarginStart widget :: a
widget margin :: Int32
margin = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    Ptr Widget
widget' <- a -> IO (Ptr Widget)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
widget
    Ptr Widget -> Int32 -> IO ()
gtk_widget_set_margin_start Ptr Widget
widget' Int32
margin
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
widget
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()

#if defined(ENABLE_OVERLOADING)
data WidgetSetMarginStartMethodInfo
instance (signature ~ (Int32 -> m ()), MonadIO m, IsWidget a) => O.MethodInfo WidgetSetMarginStartMethodInfo a signature where
    overloadedMethod = widgetSetMarginStart

#endif

-- method Widget::set_margin_top
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "widget"
--           , argType = TInterface Name { namespace = "Gtk" , name = "Widget" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #GtkWidget" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "margin"
--           , argType = TBasicType TInt
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "the top margin" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "gtk_widget_set_margin_top" gtk_widget_set_margin_top :: 
    Ptr Widget ->                           -- widget : TInterface (Name {namespace = "Gtk", name = "Widget"})
    Int32 ->                                -- margin : TBasicType TInt
    IO ()

-- | Sets the top margin of /@widget@/.
-- See the t'GI.Gtk.Objects.Widget.Widget':@/margin-top/@ property.
widgetSetMarginTop ::
    (B.CallStack.HasCallStack, MonadIO m, IsWidget a) =>
    a
    -- ^ /@widget@/: a t'GI.Gtk.Objects.Widget.Widget'
    -> Int32
    -- ^ /@margin@/: the top margin
    -> m ()
widgetSetMarginTop :: a -> Int32 -> m ()
widgetSetMarginTop widget :: a
widget margin :: Int32
margin = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    Ptr Widget
widget' <- a -> IO (Ptr Widget)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
widget
    Ptr Widget -> Int32 -> IO ()
gtk_widget_set_margin_top Ptr Widget
widget' Int32
margin
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
widget
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()

#if defined(ENABLE_OVERLOADING)
data WidgetSetMarginTopMethodInfo
instance (signature ~ (Int32 -> m ()), MonadIO m, IsWidget a) => O.MethodInfo WidgetSetMarginTopMethodInfo a signature where
    overloadedMethod = widgetSetMarginTop

#endif

-- method Widget::set_name
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "widget"
--           , argType = TInterface Name { namespace = "Gtk" , name = "Widget" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #GtkWidget" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "name"
--           , argType = TBasicType TUTF8
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "name for the widget"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "gtk_widget_set_name" gtk_widget_set_name :: 
    Ptr Widget ->                           -- widget : TInterface (Name {namespace = "Gtk", name = "Widget"})
    CString ->                              -- name : TBasicType TUTF8
    IO ()

-- | Widgets can be named, which allows you to refer to them from a
-- CSS file. You can apply a style to widgets with a particular name
-- in the CSS file. See the documentation for the CSS syntax (on the
-- same page as the docs for t'GI.Gtk.Objects.StyleContext.StyleContext').
-- 
-- Note that the CSS syntax has certain special characters to delimit
-- and represent elements in a selector (period, #, >, *...), so using
-- these will make your widget impossible to match by name. Any combination
-- of alphanumeric symbols, dashes and underscores will suffice.
widgetSetName ::
    (B.CallStack.HasCallStack, MonadIO m, IsWidget a) =>
    a
    -- ^ /@widget@/: a t'GI.Gtk.Objects.Widget.Widget'
    -> T.Text
    -- ^ /@name@/: name for the widget
    -> m ()
widgetSetName :: a -> Text -> m ()
widgetSetName widget :: a
widget name :: Text
name = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    Ptr Widget
widget' <- a -> IO (Ptr Widget)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
widget
    CString
name' <- Text -> IO CString
textToCString Text
name
    Ptr Widget -> CString -> IO ()
gtk_widget_set_name Ptr Widget
widget' CString
name'
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
widget
    CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
name'
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()

#if defined(ENABLE_OVERLOADING)
data WidgetSetNameMethodInfo
instance (signature ~ (T.Text -> m ()), MonadIO m, IsWidget a) => O.MethodInfo WidgetSetNameMethodInfo a signature where
    overloadedMethod = widgetSetName

#endif

-- method Widget::set_opacity
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "widget"
--           , argType = TInterface Name { namespace = "Gtk" , name = "Widget" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #GtkWidget" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "opacity"
--           , argType = TBasicType TDouble
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "desired opacity, between 0 and 1"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "gtk_widget_set_opacity" gtk_widget_set_opacity :: 
    Ptr Widget ->                           -- widget : TInterface (Name {namespace = "Gtk", name = "Widget"})
    CDouble ->                              -- opacity : TBasicType TDouble
    IO ()

-- | Request the /@widget@/ to be rendered partially transparent,
-- with opacity 0 being fully transparent and 1 fully opaque. (Opacity values
-- are clamped to the [0,1] range.).
-- This works on both toplevel widget, and child widgets, although there
-- are some limitations:
-- 
-- For toplevel widgets this depends on the capabilities of the windowing
-- system. On X11 this has any effect only on X displays with a compositing manager
-- running. See 'GI.Gdk.Objects.Display.displayIsComposited'. On Windows it should work
-- always, although setting a window’s opacity after the window has been
-- shown causes it to flicker once on Windows.
-- 
-- For child widgets it doesn’t work if any affected widget has a native window.
widgetSetOpacity ::
    (B.CallStack.HasCallStack, MonadIO m, IsWidget a) =>
    a
    -- ^ /@widget@/: a t'GI.Gtk.Objects.Widget.Widget'
    -> Double
    -- ^ /@opacity@/: desired opacity, between 0 and 1
    -> m ()
widgetSetOpacity :: a -> Double -> m ()
widgetSetOpacity widget :: a
widget opacity :: Double
opacity = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    Ptr Widget
widget' <- a -> IO (Ptr Widget)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
widget
    let opacity' :: CDouble
opacity' = Double -> CDouble
forall a b. (Real a, Fractional b) => a -> b
realToFrac Double
opacity
    Ptr Widget -> CDouble -> IO ()
gtk_widget_set_opacity Ptr Widget
widget' CDouble
opacity'
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
widget
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()

#if defined(ENABLE_OVERLOADING)
data WidgetSetOpacityMethodInfo
instance (signature ~ (Double -> m ()), MonadIO m, IsWidget a) => O.MethodInfo WidgetSetOpacityMethodInfo a signature where
    overloadedMethod = widgetSetOpacity

#endif

-- method Widget::set_overflow
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "widget"
--           , argType = TInterface Name { namespace = "Gtk" , name = "Widget" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #GtkWidget" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "overflow"
--           , argType =
--               TInterface Name { namespace = "Gtk" , name = "Overflow" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "desired overflow" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "gtk_widget_set_overflow" gtk_widget_set_overflow :: 
    Ptr Widget ->                           -- widget : TInterface (Name {namespace = "Gtk", name = "Widget"})
    CUInt ->                                -- overflow : TInterface (Name {namespace = "Gtk", name = "Overflow"})
    IO ()

-- | Sets how /@widget@/ treats content that is drawn outside the widget\'s content area.
-- See the definition of t'GI.Gtk.Enums.Overflow' for details.
-- 
-- This setting is provided for widget implementations and should not be used by
-- application code.
-- 
-- The default value is 'GI.Gtk.Enums.OverflowVisible'.
widgetSetOverflow ::
    (B.CallStack.HasCallStack, MonadIO m, IsWidget a) =>
    a
    -- ^ /@widget@/: a t'GI.Gtk.Objects.Widget.Widget'
    -> Gtk.Enums.Overflow
    -- ^ /@overflow@/: desired overflow
    -> m ()
widgetSetOverflow :: a -> Overflow -> m ()
widgetSetOverflow widget :: a
widget overflow :: Overflow
overflow = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    Ptr Widget
widget' <- a -> IO (Ptr Widget)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
widget
    let overflow' :: CUInt
overflow' = (Int -> CUInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CUInt) -> (Overflow -> Int) -> Overflow -> CUInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Overflow -> Int
forall a. Enum a => a -> Int
fromEnum) Overflow
overflow
    Ptr Widget -> CUInt -> IO ()
gtk_widget_set_overflow Ptr Widget
widget' CUInt
overflow'
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
widget
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()

#if defined(ENABLE_OVERLOADING)
data WidgetSetOverflowMethodInfo
instance (signature ~ (Gtk.Enums.Overflow -> m ()), MonadIO m, IsWidget a) => O.MethodInfo WidgetSetOverflowMethodInfo a signature where
    overloadedMethod = widgetSetOverflow

#endif

-- method Widget::set_parent
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "widget"
--           , argType = TInterface Name { namespace = "Gtk" , name = "Widget" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #GtkWidget" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "parent"
--           , argType = TInterface Name { namespace = "Gtk" , name = "Widget" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "parent widget" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "gtk_widget_set_parent" gtk_widget_set_parent :: 
    Ptr Widget ->                           -- widget : TInterface (Name {namespace = "Gtk", name = "Widget"})
    Ptr Widget ->                           -- parent : TInterface (Name {namespace = "Gtk", name = "Widget"})
    IO ()

-- | This function is useful only when implementing subclasses of
-- t'GI.Gtk.Objects.Widget.Widget'.
-- Sets /@parent@/ as the parent widget of /@widget@/, and takes care of
-- some details such as updating the state and style of the child
-- to reflect its new location and resizing the parent. The opposite
-- function is 'GI.Gtk.Objects.Widget.widgetUnparent'.
widgetSetParent ::
    (B.CallStack.HasCallStack, MonadIO m, IsWidget a, IsWidget b) =>
    a
    -- ^ /@widget@/: a t'GI.Gtk.Objects.Widget.Widget'
    -> b
    -- ^ /@parent@/: parent widget
    -> m ()
widgetSetParent :: a -> b -> m ()
widgetSetParent widget :: a
widget parent :: b
parent = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    Ptr Widget
widget' <- a -> IO (Ptr Widget)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
widget
    Ptr Widget
parent' <- b -> IO (Ptr Widget)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
parent
    Ptr Widget -> Ptr Widget -> IO ()
gtk_widget_set_parent Ptr Widget
widget' Ptr Widget
parent'
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
widget
    b -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr b
parent
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()

#if defined(ENABLE_OVERLOADING)
data WidgetSetParentMethodInfo
instance (signature ~ (b -> m ()), MonadIO m, IsWidget a, IsWidget b) => O.MethodInfo WidgetSetParentMethodInfo a signature where
    overloadedMethod = widgetSetParent

#endif

-- method Widget::set_receives_default
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "widget"
--           , argType = TInterface Name { namespace = "Gtk" , name = "Widget" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #GtkWidget" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "receives_default"
--           , argType = TBasicType TBoolean
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText =
--                     Just "whether or not @widget can be a default widget."
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "gtk_widget_set_receives_default" gtk_widget_set_receives_default :: 
    Ptr Widget ->                           -- widget : TInterface (Name {namespace = "Gtk", name = "Widget"})
    CInt ->                                 -- receives_default : TBasicType TBoolean
    IO ()

-- | Specifies whether /@widget@/ will be treated as the default
-- widget within its toplevel when it has the focus, even if
-- another widget is the default.
widgetSetReceivesDefault ::
    (B.CallStack.HasCallStack, MonadIO m, IsWidget a) =>
    a
    -- ^ /@widget@/: a t'GI.Gtk.Objects.Widget.Widget'
    -> Bool
    -- ^ /@receivesDefault@/: whether or not /@widget@/ can be a default widget.
    -> m ()
widgetSetReceivesDefault :: a -> Bool -> m ()
widgetSetReceivesDefault widget :: a
widget receivesDefault :: Bool
receivesDefault = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    Ptr Widget
widget' <- a -> IO (Ptr Widget)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
widget
    let receivesDefault' :: CInt
receivesDefault' = (Int -> CInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CInt) -> (Bool -> Int) -> Bool -> CInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Bool -> Int
forall a. Enum a => a -> Int
fromEnum) Bool
receivesDefault
    Ptr Widget -> CInt -> IO ()
gtk_widget_set_receives_default Ptr Widget
widget' CInt
receivesDefault'
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
widget
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()

#if defined(ENABLE_OVERLOADING)
data WidgetSetReceivesDefaultMethodInfo
instance (signature ~ (Bool -> m ()), MonadIO m, IsWidget a) => O.MethodInfo WidgetSetReceivesDefaultMethodInfo a signature where
    overloadedMethod = widgetSetReceivesDefault

#endif

-- method Widget::set_sensitive
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "widget"
--           , argType = TInterface Name { namespace = "Gtk" , name = "Widget" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #GtkWidget" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "sensitive"
--           , argType = TBasicType TBoolean
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "%TRUE to make the widget sensitive"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "gtk_widget_set_sensitive" gtk_widget_set_sensitive :: 
    Ptr Widget ->                           -- widget : TInterface (Name {namespace = "Gtk", name = "Widget"})
    CInt ->                                 -- sensitive : TBasicType TBoolean
    IO ()

-- | Sets the sensitivity of a widget. A widget is sensitive if the user
-- can interact with it. Insensitive widgets are “grayed out” and the
-- user can’t interact with them. Insensitive widgets are known as
-- “inactive”, “disabled”, or “ghosted” in some other toolkits.
widgetSetSensitive ::
    (B.CallStack.HasCallStack, MonadIO m, IsWidget a) =>
    a
    -- ^ /@widget@/: a t'GI.Gtk.Objects.Widget.Widget'
    -> Bool
    -- ^ /@sensitive@/: 'P.True' to make the widget sensitive
    -> m ()
widgetSetSensitive :: a -> Bool -> m ()
widgetSetSensitive widget :: a
widget sensitive :: Bool
sensitive = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    Ptr Widget
widget' <- a -> IO (Ptr Widget)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
widget
    let sensitive' :: CInt
sensitive' = (Int -> CInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CInt) -> (Bool -> Int) -> Bool -> CInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Bool -> Int
forall a. Enum a => a -> Int
fromEnum) Bool
sensitive
    Ptr Widget -> CInt -> IO ()
gtk_widget_set_sensitive Ptr Widget
widget' CInt
sensitive'
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
widget
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()

#if defined(ENABLE_OVERLOADING)
data WidgetSetSensitiveMethodInfo
instance (signature ~ (Bool -> m ()), MonadIO m, IsWidget a) => O.MethodInfo WidgetSetSensitiveMethodInfo a signature where
    overloadedMethod = widgetSetSensitive

#endif

-- method Widget::set_size_request
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "widget"
--           , argType = TInterface Name { namespace = "Gtk" , name = "Widget" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #GtkWidget" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "width"
--           , argType = TBasicType TInt
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "width @widget should request, or -1 to unset"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "height"
--           , argType = TBasicType TInt
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "height @widget should request, or -1 to unset"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "gtk_widget_set_size_request" gtk_widget_set_size_request :: 
    Ptr Widget ->                           -- widget : TInterface (Name {namespace = "Gtk", name = "Widget"})
    Int32 ->                                -- width : TBasicType TInt
    Int32 ->                                -- height : TBasicType TInt
    IO ()

-- | Sets the minimum size of a widget; that is, the widget’s size
-- request will be at least /@width@/ by /@height@/. You can use this
-- function to force a widget to be larger than it normally would be.
-- 
-- In most cases, 'GI.Gtk.Objects.Window.windowSetDefaultSize' is a better choice for
-- toplevel windows than this function; setting the default size will
-- still allow users to shrink the window. Setting the size request
-- will force them to leave the window at least as large as the size
-- request. When dealing with window sizes,
-- @/gtk_window_set_geometry_hints()/@ can be a useful function as well.
-- 
-- Note the inherent danger of setting any fixed size - themes,
-- translations into other languages, different fonts, and user action
-- can all change the appropriate size for a given widget. So, it\'s
-- basically impossible to hardcode a size that will always be
-- correct.
-- 
-- The size request of a widget is the smallest size a widget can
-- accept while still functioning well and drawing itself correctly.
-- However in some strange cases a widget may be allocated less than
-- its requested size, and in many cases a widget may be allocated more
-- space than it requested.
-- 
-- If the size request in a given direction is -1 (unset), then
-- the “natural” size request of the widget will be used instead.
-- 
-- The size request set here does not include any margin from the
-- t'GI.Gtk.Objects.Widget.Widget' properties margin-left, margin-right, margin-top, and
-- margin-bottom, but it does include pretty much all other padding
-- or border properties set by any subclass of t'GI.Gtk.Objects.Widget.Widget'.
widgetSetSizeRequest ::
    (B.CallStack.HasCallStack, MonadIO m, IsWidget a) =>
    a
    -- ^ /@widget@/: a t'GI.Gtk.Objects.Widget.Widget'
    -> Int32
    -- ^ /@width@/: width /@widget@/ should request, or -1 to unset
    -> Int32
    -- ^ /@height@/: height /@widget@/ should request, or -1 to unset
    -> m ()
widgetSetSizeRequest :: a -> Int32 -> Int32 -> m ()
widgetSetSizeRequest widget :: a
widget width :: Int32
width height :: Int32
height = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    Ptr Widget
widget' <- a -> IO (Ptr Widget)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
widget
    Ptr Widget -> Int32 -> Int32 -> IO ()
gtk_widget_set_size_request Ptr Widget
widget' Int32
width Int32
height
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
widget
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()

#if defined(ENABLE_OVERLOADING)
data WidgetSetSizeRequestMethodInfo
instance (signature ~ (Int32 -> Int32 -> m ()), MonadIO m, IsWidget a) => O.MethodInfo WidgetSetSizeRequestMethodInfo a signature where
    overloadedMethod = widgetSetSizeRequest

#endif

-- method Widget::set_state_flags
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "widget"
--           , argType = TInterface Name { namespace = "Gtk" , name = "Widget" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #GtkWidget" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "flags"
--           , argType =
--               TInterface Name { namespace = "Gtk" , name = "StateFlags" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "State flags to turn on"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "clear"
--           , argType = TBasicType TBoolean
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText =
--                     Just "Whether to clear state before turning on @flags"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "gtk_widget_set_state_flags" gtk_widget_set_state_flags :: 
    Ptr Widget ->                           -- widget : TInterface (Name {namespace = "Gtk", name = "Widget"})
    CUInt ->                                -- flags : TInterface (Name {namespace = "Gtk", name = "StateFlags"})
    CInt ->                                 -- clear : TBasicType TBoolean
    IO ()

-- | This function is for use in widget implementations. Turns on flag
-- values in the current widget state (insensitive, prelighted, etc.).
-- 
-- This function accepts the values 'GI.Gtk.Flags.StateFlagsDirLtr' and
-- 'GI.Gtk.Flags.StateFlagsDirRtl' but ignores them. If you want to set the widget\'s
-- direction, use 'GI.Gtk.Objects.Widget.widgetSetDirection'.
-- 
-- It is worth mentioning that any other state than 'GI.Gtk.Flags.StateFlagsInsensitive',
-- will be propagated down to all non-internal children if /@widget@/ is a
-- t'GI.Gtk.Objects.Container.Container', while 'GI.Gtk.Flags.StateFlagsInsensitive' itself will be propagated
-- down to all t'GI.Gtk.Objects.Container.Container' children by different means than turning on the
-- state flag down the hierarchy, both 'GI.Gtk.Objects.Widget.widgetGetStateFlags' and
-- 'GI.Gtk.Objects.Widget.widgetIsSensitive' will make use of these.
widgetSetStateFlags ::
    (B.CallStack.HasCallStack, MonadIO m, IsWidget a) =>
    a
    -- ^ /@widget@/: a t'GI.Gtk.Objects.Widget.Widget'
    -> [Gtk.Flags.StateFlags]
    -- ^ /@flags@/: State flags to turn on
    -> Bool
    -- ^ /@clear@/: Whether to clear state before turning on /@flags@/
    -> m ()
widgetSetStateFlags :: a -> [StateFlags] -> Bool -> m ()
widgetSetStateFlags widget :: a
widget flags :: [StateFlags]
flags clear :: Bool
clear = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    Ptr Widget
widget' <- a -> IO (Ptr Widget)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
widget
    let flags' :: CUInt
flags' = [StateFlags] -> CUInt
forall b a. (Num b, IsGFlag a) => [a] -> b
gflagsToWord [StateFlags]
flags
    let clear' :: CInt
clear' = (Int -> CInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CInt) -> (Bool -> Int) -> Bool -> CInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Bool -> Int
forall a. Enum a => a -> Int
fromEnum) Bool
clear
    Ptr Widget -> CUInt -> CInt -> IO ()
gtk_widget_set_state_flags Ptr Widget
widget' CUInt
flags' CInt
clear'
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
widget
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()

#if defined(ENABLE_OVERLOADING)
data WidgetSetStateFlagsMethodInfo
instance (signature ~ ([Gtk.Flags.StateFlags] -> Bool -> m ()), MonadIO m, IsWidget a) => O.MethodInfo WidgetSetStateFlagsMethodInfo a signature where
    overloadedMethod = widgetSetStateFlags

#endif

-- method Widget::set_support_multidevice
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "widget"
--           , argType = TInterface Name { namespace = "Gtk" , name = "Widget" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #GtkWidget" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "support_multidevice"
--           , argType = TBasicType TBoolean
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "%TRUE to support input from multiple devices."
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "gtk_widget_set_support_multidevice" gtk_widget_set_support_multidevice :: 
    Ptr Widget ->                           -- widget : TInterface (Name {namespace = "Gtk", name = "Widget"})
    CInt ->                                 -- support_multidevice : TBasicType TBoolean
    IO ()

-- | Enables or disables multiple pointer awareness. If this setting is 'P.True',
-- /@widget@/ will start receiving multiple, per device enter\/leave events. Note
-- that if custom @/GdkSurfaces/@ are created in [realize]("GI.Gtk.Objects.Widget#signal:realize"),
-- 'GI.Gdk.Objects.Surface.surfaceSetSupportMultidevice' will have to be called manually on them.
widgetSetSupportMultidevice ::
    (B.CallStack.HasCallStack, MonadIO m, IsWidget a) =>
    a
    -- ^ /@widget@/: a t'GI.Gtk.Objects.Widget.Widget'
    -> Bool
    -- ^ /@supportMultidevice@/: 'P.True' to support input from multiple devices.
    -> m ()
widgetSetSupportMultidevice :: a -> Bool -> m ()
widgetSetSupportMultidevice widget :: a
widget supportMultidevice :: Bool
supportMultidevice = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    Ptr Widget
widget' <- a -> IO (Ptr Widget)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
widget
    let supportMultidevice' :: CInt
supportMultidevice' = (Int -> CInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CInt) -> (Bool -> Int) -> Bool -> CInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Bool -> Int
forall a. Enum a => a -> Int
fromEnum) Bool
supportMultidevice
    Ptr Widget -> CInt -> IO ()
gtk_widget_set_support_multidevice Ptr Widget
widget' CInt
supportMultidevice'
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
widget
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()

#if defined(ENABLE_OVERLOADING)
data WidgetSetSupportMultideviceMethodInfo
instance (signature ~ (Bool -> m ()), MonadIO m, IsWidget a) => O.MethodInfo WidgetSetSupportMultideviceMethodInfo a signature where
    overloadedMethod = widgetSetSupportMultidevice

#endif

-- method Widget::set_surface
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "widget"
--           , argType = TInterface Name { namespace = "Gtk" , name = "Widget" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #GtkWidget" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "surface"
--           , argType =
--               TInterface Name { namespace = "Gdk" , name = "Surface" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #GdkSurface" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferEverything
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "gtk_widget_set_surface" gtk_widget_set_surface :: 
    Ptr Widget ->                           -- widget : TInterface (Name {namespace = "Gtk", name = "Widget"})
    Ptr Gdk.Surface.Surface ->              -- surface : TInterface (Name {namespace = "Gdk", name = "Surface"})
    IO ()

-- | Sets a widget’s surface. This function should only be used in a
-- widget’s [realize]("GI.Gtk.Objects.Widget#signal:realize") implementation. The @/surface/@ passed is
-- usually either new surface created with @/gdk_surface_new()/@, or the
-- surface of its parent widget as returned by
-- @/gtk_widget_get_parent_surface()/@.
-- 
-- Widgets must indicate whether they will create their own t'GI.Gdk.Objects.Surface.Surface'
-- by calling 'GI.Gtk.Objects.Widget.widgetSetHasSurface'. This is usually done in the
-- widget’s @/init()/@ function.
-- 
-- Note that this function does not add any reference to /@surface@/.
widgetSetSurface ::
    (B.CallStack.HasCallStack, MonadIO m, IsWidget a, Gdk.Surface.IsSurface b) =>
    a
    -- ^ /@widget@/: a t'GI.Gtk.Objects.Widget.Widget'
    -> b
    -- ^ /@surface@/: a t'GI.Gdk.Objects.Surface.Surface'
    -> m ()
widgetSetSurface :: a -> b -> m ()
widgetSetSurface widget :: a
widget surface :: b
surface = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    Ptr Widget
widget' <- a -> IO (Ptr Widget)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
widget
    Ptr Surface
surface' <- b -> IO (Ptr Surface)
forall a b. (HasCallStack, GObject a) => a -> IO (Ptr b)
B.ManagedPtr.disownObject b
surface
    Ptr Widget -> Ptr Surface -> IO ()
gtk_widget_set_surface Ptr Widget
widget' Ptr Surface
surface'
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
widget
    b -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr b
surface
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()

#if defined(ENABLE_OVERLOADING)
data WidgetSetSurfaceMethodInfo
instance (signature ~ (b -> m ()), MonadIO m, IsWidget a, Gdk.Surface.IsSurface b) => O.MethodInfo WidgetSetSurfaceMethodInfo a signature where
    overloadedMethod = widgetSetSurface

#endif

-- method Widget::set_tooltip_markup
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "widget"
--           , argType = TInterface Name { namespace = "Gtk" , name = "Widget" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #GtkWidget" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "markup"
--           , argType = TBasicType TUTF8
--           , direction = DirectionIn
--           , mayBeNull = True
--           , argDoc =
--               Documentation
--                 { rawDocText =
--                     Just "the contents of the tooltip for @widget, or %NULL"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "gtk_widget_set_tooltip_markup" gtk_widget_set_tooltip_markup :: 
    Ptr Widget ->                           -- widget : TInterface (Name {namespace = "Gtk", name = "Widget"})
    CString ->                              -- markup : TBasicType TUTF8
    IO ()

-- | Sets /@markup@/ as the contents of the tooltip, which is marked up with
--  the [Pango text markup language][PangoMarkupFormat].
-- 
-- This function will take care of setting t'GI.Gtk.Objects.Widget.Widget':@/has-tooltip/@ to 'P.True'
-- and of the default handler for the [queryTooltip]("GI.Gtk.Objects.Widget#signal:queryTooltip") signal.
-- 
-- See also the t'GI.Gtk.Objects.Widget.Widget':@/tooltip-markup/@ property and
-- 'GI.Gtk.Objects.Tooltip.tooltipSetMarkup'.
widgetSetTooltipMarkup ::
    (B.CallStack.HasCallStack, MonadIO m, IsWidget a) =>
    a
    -- ^ /@widget@/: a t'GI.Gtk.Objects.Widget.Widget'
    -> Maybe (T.Text)
    -- ^ /@markup@/: the contents of the tooltip for /@widget@/, or 'P.Nothing'
    -> m ()
widgetSetTooltipMarkup :: a -> Maybe Text -> m ()
widgetSetTooltipMarkup widget :: a
widget markup :: Maybe Text
markup = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    Ptr Widget
widget' <- a -> IO (Ptr Widget)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
widget
    CString
maybeMarkup <- case Maybe Text
markup of
        Nothing -> CString -> IO CString
forall (m :: * -> *) a. Monad m => a -> m a
return CString
forall a. Ptr a
nullPtr
        Just jMarkup :: Text
jMarkup -> do
            CString
jMarkup' <- Text -> IO CString
textToCString Text
jMarkup
            CString -> IO CString
forall (m :: * -> *) a. Monad m => a -> m a
return CString
jMarkup'
    Ptr Widget -> CString -> IO ()
gtk_widget_set_tooltip_markup Ptr Widget
widget' CString
maybeMarkup
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
widget
    CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
maybeMarkup
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()

#if defined(ENABLE_OVERLOADING)
data WidgetSetTooltipMarkupMethodInfo
instance (signature ~ (Maybe (T.Text) -> m ()), MonadIO m, IsWidget a) => O.MethodInfo WidgetSetTooltipMarkupMethodInfo a signature where
    overloadedMethod = widgetSetTooltipMarkup

#endif

-- method Widget::set_tooltip_text
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "widget"
--           , argType = TInterface Name { namespace = "Gtk" , name = "Widget" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #GtkWidget" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "text"
--           , argType = TBasicType TUTF8
--           , direction = DirectionIn
--           , mayBeNull = True
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "the contents of the tooltip for @widget"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "gtk_widget_set_tooltip_text" gtk_widget_set_tooltip_text :: 
    Ptr Widget ->                           -- widget : TInterface (Name {namespace = "Gtk", name = "Widget"})
    CString ->                              -- text : TBasicType TUTF8
    IO ()

-- | Sets /@text@/ as the contents of the tooltip. This function will take
-- care of setting t'GI.Gtk.Objects.Widget.Widget':@/has-tooltip/@ to 'P.True' and of the default
-- handler for the [queryTooltip]("GI.Gtk.Objects.Widget#signal:queryTooltip") signal.
-- 
-- See also the t'GI.Gtk.Objects.Widget.Widget':@/tooltip-text/@ property and 'GI.Gtk.Objects.Tooltip.tooltipSetText'.
widgetSetTooltipText ::
    (B.CallStack.HasCallStack, MonadIO m, IsWidget a) =>
    a
    -- ^ /@widget@/: a t'GI.Gtk.Objects.Widget.Widget'
    -> Maybe (T.Text)
    -- ^ /@text@/: the contents of the tooltip for /@widget@/
    -> m ()
widgetSetTooltipText :: a -> Maybe Text -> m ()
widgetSetTooltipText widget :: a
widget text :: Maybe Text
text = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    Ptr Widget
widget' <- a -> IO (Ptr Widget)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
widget
    CString
maybeText <- case Maybe Text
text of
        Nothing -> CString -> IO CString
forall (m :: * -> *) a. Monad m => a -> m a
return CString
forall a. Ptr a
nullPtr
        Just jText :: Text
jText -> do
            CString
jText' <- Text -> IO CString
textToCString Text
jText
            CString -> IO CString
forall (m :: * -> *) a. Monad m => a -> m a
return CString
jText'
    Ptr Widget -> CString -> IO ()
gtk_widget_set_tooltip_text Ptr Widget
widget' CString
maybeText
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
widget
    CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
maybeText
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()

#if defined(ENABLE_OVERLOADING)
data WidgetSetTooltipTextMethodInfo
instance (signature ~ (Maybe (T.Text) -> m ()), MonadIO m, IsWidget a) => O.MethodInfo WidgetSetTooltipTextMethodInfo a signature where
    overloadedMethod = widgetSetTooltipText

#endif

-- method Widget::set_tooltip_window
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "widget"
--           , argType = TInterface Name { namespace = "Gtk" , name = "Widget" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #GtkWidget" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "custom_window"
--           , argType = TInterface Name { namespace = "Gtk" , name = "Window" }
--           , direction = DirectionIn
--           , mayBeNull = True
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #GtkWindow, or %NULL"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "gtk_widget_set_tooltip_window" gtk_widget_set_tooltip_window :: 
    Ptr Widget ->                           -- widget : TInterface (Name {namespace = "Gtk", name = "Widget"})
    Ptr Gtk.Window.Window ->                -- custom_window : TInterface (Name {namespace = "Gtk", name = "Window"})
    IO ()

-- | Replaces the default window used for displaying
-- tooltips with /@customWindow@/. GTK+ will take care of showing and
-- hiding /@customWindow@/ at the right moment, to behave likewise as
-- the default tooltip window. If /@customWindow@/ is 'P.Nothing', the default
-- tooltip window will be used.
widgetSetTooltipWindow ::
    (B.CallStack.HasCallStack, MonadIO m, IsWidget a, Gtk.Window.IsWindow b) =>
    a
    -- ^ /@widget@/: a t'GI.Gtk.Objects.Widget.Widget'
    -> Maybe (b)
    -- ^ /@customWindow@/: a t'GI.Gtk.Objects.Window.Window', or 'P.Nothing'
    -> m ()
widgetSetTooltipWindow :: a -> Maybe b -> m ()
widgetSetTooltipWindow widget :: a
widget customWindow :: Maybe b
customWindow = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    Ptr Widget
widget' <- a -> IO (Ptr Widget)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
widget
    Ptr Window
maybeCustomWindow <- case Maybe b
customWindow of
        Nothing -> Ptr Window -> IO (Ptr Window)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr Window
forall a. Ptr a
nullPtr
        Just jCustomWindow :: b
jCustomWindow -> do
            Ptr Window
jCustomWindow' <- b -> IO (Ptr Window)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
jCustomWindow
            Ptr Window -> IO (Ptr Window)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr Window
jCustomWindow'
    Ptr Widget -> Ptr Window -> IO ()
gtk_widget_set_tooltip_window Ptr Widget
widget' Ptr Window
maybeCustomWindow
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
widget
    Maybe b -> (b -> IO ()) -> IO ()
forall (m :: * -> *) a. Monad m => Maybe a -> (a -> m ()) -> m ()
whenJust Maybe b
customWindow b -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()

#if defined(ENABLE_OVERLOADING)
data WidgetSetTooltipWindowMethodInfo
instance (signature ~ (Maybe (b) -> m ()), MonadIO m, IsWidget a, Gtk.Window.IsWindow b) => O.MethodInfo WidgetSetTooltipWindowMethodInfo a signature where
    overloadedMethod = widgetSetTooltipWindow

#endif

-- method Widget::set_valign
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "widget"
--           , argType = TInterface Name { namespace = "Gtk" , name = "Widget" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #GtkWidget" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "align"
--           , argType = TInterface Name { namespace = "Gtk" , name = "Align" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "the vertical alignment"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "gtk_widget_set_valign" gtk_widget_set_valign :: 
    Ptr Widget ->                           -- widget : TInterface (Name {namespace = "Gtk", name = "Widget"})
    CUInt ->                                -- align : TInterface (Name {namespace = "Gtk", name = "Align"})
    IO ()

-- | Sets the vertical alignment of /@widget@/.
-- See the t'GI.Gtk.Objects.Widget.Widget':@/valign/@ property.
widgetSetValign ::
    (B.CallStack.HasCallStack, MonadIO m, IsWidget a) =>
    a
    -- ^ /@widget@/: a t'GI.Gtk.Objects.Widget.Widget'
    -> Gtk.Enums.Align
    -- ^ /@align@/: the vertical alignment
    -> m ()
widgetSetValign :: a -> Align -> m ()
widgetSetValign widget :: a
widget align :: Align
align = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    Ptr Widget
widget' <- a -> IO (Ptr Widget)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
widget
    let align' :: CUInt
align' = (Int -> CUInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CUInt) -> (Align -> Int) -> Align -> CUInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Align -> Int
forall a. Enum a => a -> Int
fromEnum) Align
align
    Ptr Widget -> CUInt -> IO ()
gtk_widget_set_valign Ptr Widget
widget' CUInt
align'
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
widget
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()

#if defined(ENABLE_OVERLOADING)
data WidgetSetValignMethodInfo
instance (signature ~ (Gtk.Enums.Align -> m ()), MonadIO m, IsWidget a) => O.MethodInfo WidgetSetValignMethodInfo a signature where
    overloadedMethod = widgetSetValign

#endif

-- method Widget::set_vexpand
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "widget"
--           , argType = TInterface Name { namespace = "Gtk" , name = "Widget" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "the widget" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "expand"
--           , argType = TBasicType TBoolean
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "whether to expand" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "gtk_widget_set_vexpand" gtk_widget_set_vexpand :: 
    Ptr Widget ->                           -- widget : TInterface (Name {namespace = "Gtk", name = "Widget"})
    CInt ->                                 -- expand : TBasicType TBoolean
    IO ()

-- | Sets whether the widget would like any available extra vertical
-- space.
-- 
-- See 'GI.Gtk.Objects.Widget.widgetSetHexpand' for more detail.
widgetSetVexpand ::
    (B.CallStack.HasCallStack, MonadIO m, IsWidget a) =>
    a
    -- ^ /@widget@/: the widget
    -> Bool
    -- ^ /@expand@/: whether to expand
    -> m ()
widgetSetVexpand :: a -> Bool -> m ()
widgetSetVexpand widget :: a
widget expand :: Bool
expand = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    Ptr Widget
widget' <- a -> IO (Ptr Widget)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
widget
    let expand' :: CInt
expand' = (Int -> CInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CInt) -> (Bool -> Int) -> Bool -> CInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Bool -> Int
forall a. Enum a => a -> Int
fromEnum) Bool
expand
    Ptr Widget -> CInt -> IO ()
gtk_widget_set_vexpand Ptr Widget
widget' CInt
expand'
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
widget
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()

#if defined(ENABLE_OVERLOADING)
data WidgetSetVexpandMethodInfo
instance (signature ~ (Bool -> m ()), MonadIO m, IsWidget a) => O.MethodInfo WidgetSetVexpandMethodInfo a signature where
    overloadedMethod = widgetSetVexpand

#endif

-- method Widget::set_vexpand_set
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "widget"
--           , argType = TInterface Name { namespace = "Gtk" , name = "Widget" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "the widget" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "set"
--           , argType = TBasicType TBoolean
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "value for vexpand-set property"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "gtk_widget_set_vexpand_set" gtk_widget_set_vexpand_set :: 
    Ptr Widget ->                           -- widget : TInterface (Name {namespace = "Gtk", name = "Widget"})
    CInt ->                                 -- set : TBasicType TBoolean
    IO ()

-- | Sets whether the vexpand flag (see 'GI.Gtk.Objects.Widget.widgetGetVexpand') will
-- be used.
-- 
-- See 'GI.Gtk.Objects.Widget.widgetSetHexpandSet' for more detail.
widgetSetVexpandSet ::
    (B.CallStack.HasCallStack, MonadIO m, IsWidget a) =>
    a
    -- ^ /@widget@/: the widget
    -> Bool
    -- ^ /@set@/: value for vexpand-set property
    -> m ()
widgetSetVexpandSet :: a -> Bool -> m ()
widgetSetVexpandSet widget :: a
widget set :: Bool
set = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    Ptr Widget
widget' <- a -> IO (Ptr Widget)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
widget
    let set' :: CInt
set' = (Int -> CInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CInt) -> (Bool -> Int) -> Bool -> CInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Bool -> Int
forall a. Enum a => a -> Int
fromEnum) Bool
set
    Ptr Widget -> CInt -> IO ()
gtk_widget_set_vexpand_set Ptr Widget
widget' CInt
set'
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
widget
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()

#if defined(ENABLE_OVERLOADING)
data WidgetSetVexpandSetMethodInfo
instance (signature ~ (Bool -> m ()), MonadIO m, IsWidget a) => O.MethodInfo WidgetSetVexpandSetMethodInfo a signature where
    overloadedMethod = widgetSetVexpandSet

#endif

-- method Widget::set_visible
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "widget"
--           , argType = TInterface Name { namespace = "Gtk" , name = "Widget" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #GtkWidget" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "visible"
--           , argType = TBasicType TBoolean
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "whether the widget should be shown or not"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "gtk_widget_set_visible" gtk_widget_set_visible :: 
    Ptr Widget ->                           -- widget : TInterface (Name {namespace = "Gtk", name = "Widget"})
    CInt ->                                 -- visible : TBasicType TBoolean
    IO ()

-- | Sets the visibility state of /@widget@/. Note that setting this to
-- 'P.True' doesn’t mean the widget is actually viewable, see
-- 'GI.Gtk.Objects.Widget.widgetGetVisible'.
-- 
-- This function simply calls 'GI.Gtk.Objects.Widget.widgetShow' or 'GI.Gtk.Objects.Widget.widgetHide'
-- but is nicer to use when the visibility of the widget depends on
-- some condition.
widgetSetVisible ::
    (B.CallStack.HasCallStack, MonadIO m, IsWidget a) =>
    a
    -- ^ /@widget@/: a t'GI.Gtk.Objects.Widget.Widget'
    -> Bool
    -- ^ /@visible@/: whether the widget should be shown or not
    -> m ()
widgetSetVisible :: a -> Bool -> m ()
widgetSetVisible widget :: a
widget visible :: Bool
visible = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    Ptr Widget
widget' <- a -> IO (Ptr Widget)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
widget
    let visible' :: CInt
visible' = (Int -> CInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CInt) -> (Bool -> Int) -> Bool -> CInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Bool -> Int
forall a. Enum a => a -> Int
fromEnum) Bool
visible
    Ptr Widget -> CInt -> IO ()
gtk_widget_set_visible Ptr Widget
widget' CInt
visible'
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
widget
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()

#if defined(ENABLE_OVERLOADING)
data WidgetSetVisibleMethodInfo
instance (signature ~ (Bool -> m ()), MonadIO m, IsWidget a) => O.MethodInfo WidgetSetVisibleMethodInfo a signature where
    overloadedMethod = widgetSetVisible

#endif

-- method Widget::show
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "widget"
--           , argType = TInterface Name { namespace = "Gtk" , name = "Widget" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #GtkWidget" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "gtk_widget_show" gtk_widget_show :: 
    Ptr Widget ->                           -- widget : TInterface (Name {namespace = "Gtk", name = "Widget"})
    IO ()

-- | Flags a widget to be displayed. Any widget that isn’t shown will
-- not appear on the screen.
-- 
-- Remember that you have to show the containers containing a widget,
-- in addition to the widget itself, before it will appear onscreen.
-- 
-- When a toplevel container is shown, it is immediately realized and
-- mapped; other shown widgets are realized and mapped when their
-- toplevel container is realized and mapped.
widgetShow ::
    (B.CallStack.HasCallStack, MonadIO m, IsWidget a) =>
    a
    -- ^ /@widget@/: a t'GI.Gtk.Objects.Widget.Widget'
    -> m ()
widgetShow :: a -> m ()
widgetShow widget :: a
widget = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    Ptr Widget
widget' <- a -> IO (Ptr Widget)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
widget
    Ptr Widget -> IO ()
gtk_widget_show Ptr Widget
widget'
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
widget
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()

#if defined(ENABLE_OVERLOADING)
data WidgetShowMethodInfo
instance (signature ~ (m ()), MonadIO m, IsWidget a) => O.MethodInfo WidgetShowMethodInfo a signature where
    overloadedMethod = widgetShow

#endif

-- method Widget::size_allocate
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "widget"
--           , argType = TInterface Name { namespace = "Gtk" , name = "Widget" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #GtkWidget" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "allocation"
--           , argType =
--               TInterface Name { namespace = "Gdk" , name = "Rectangle" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "position and size to be allocated to @widget"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "baseline"
--           , argType = TBasicType TInt
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "The baseline of the child, or -1"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "gtk_widget_size_allocate" gtk_widget_size_allocate :: 
    Ptr Widget ->                           -- widget : TInterface (Name {namespace = "Gtk", name = "Widget"})
    Ptr Gdk.Rectangle.Rectangle ->          -- allocation : TInterface (Name {namespace = "Gdk", name = "Rectangle"})
    Int32 ->                                -- baseline : TBasicType TInt
    IO ()

-- | This is a simple form of 'GI.Gtk.Objects.Widget.widgetAllocate' that takes the new position
-- of /@widget@/ as part of /@allocation@/.
widgetSizeAllocate ::
    (B.CallStack.HasCallStack, MonadIO m, IsWidget a) =>
    a
    -- ^ /@widget@/: a t'GI.Gtk.Objects.Widget.Widget'
    -> Gdk.Rectangle.Rectangle
    -- ^ /@allocation@/: position and size to be allocated to /@widget@/
    -> Int32
    -- ^ /@baseline@/: The baseline of the child, or -1
    -> m ()
widgetSizeAllocate :: a -> Rectangle -> Int32 -> m ()
widgetSizeAllocate widget :: a
widget allocation :: Rectangle
allocation baseline :: Int32
baseline = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    Ptr Widget
widget' <- a -> IO (Ptr Widget)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
widget
    Ptr Rectangle
allocation' <- Rectangle -> IO (Ptr Rectangle)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr Rectangle
allocation
    Ptr Widget -> Ptr Rectangle -> Int32 -> IO ()
gtk_widget_size_allocate Ptr Widget
widget' Ptr Rectangle
allocation' Int32
baseline
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
widget
    Rectangle -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr Rectangle
allocation
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()

#if defined(ENABLE_OVERLOADING)
data WidgetSizeAllocateMethodInfo
instance (signature ~ (Gdk.Rectangle.Rectangle -> Int32 -> m ()), MonadIO m, IsWidget a) => O.MethodInfo WidgetSizeAllocateMethodInfo a signature where
    overloadedMethod = widgetSizeAllocate

#endif

-- method Widget::snapshot_child
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "widget"
--           , argType = TInterface Name { namespace = "Gtk" , name = "Widget" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #GtkWidget" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "child"
--           , argType = TInterface Name { namespace = "Gtk" , name = "Widget" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a child of @widget" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "snapshot"
--           , argType =
--               TInterface Name { namespace = "Gtk" , name = "Snapshot" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText =
--                     Just
--                       "#GtkSnapshot as passed to the widget. In particular, no\n  calls to gtk_snapshot_translate() or other transform calls should\n  have been made."
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "gtk_widget_snapshot_child" gtk_widget_snapshot_child :: 
    Ptr Widget ->                           -- widget : TInterface (Name {namespace = "Gtk", name = "Widget"})
    Ptr Widget ->                           -- child : TInterface (Name {namespace = "Gtk", name = "Widget"})
    Ptr Gtk.Snapshot.Snapshot ->            -- snapshot : TInterface (Name {namespace = "Gtk", name = "Snapshot"})
    IO ()

-- | When a widget receives a call to the snapshot function, it must send
-- synthetic t'GI.Gtk.Objects.Widget.Widget'::@/snapshot/@ calls to all children. This function
-- provides a convenient way of doing this. A widget, when it receives
-- a call to its t'GI.Gtk.Objects.Widget.Widget'::@/snapshot/@ function, calls
-- 'GI.Gtk.Objects.Widget.widgetSnapshotChild' once for each child, passing in
-- the /@snapshot@/ the widget received.
-- 
-- 'GI.Gtk.Objects.Widget.widgetSnapshotChild' takes care of translating the origin of
-- /@snapshot@/, and deciding whether the child needs to be snapshot.
widgetSnapshotChild ::
    (B.CallStack.HasCallStack, MonadIO m, IsWidget a, IsWidget b, Gtk.Snapshot.IsSnapshot c) =>
    a
    -- ^ /@widget@/: a t'GI.Gtk.Objects.Widget.Widget'
    -> b
    -- ^ /@child@/: a child of /@widget@/
    -> c
    -- ^ /@snapshot@/: @/GtkSnapshot/@ as passed to the widget. In particular, no
    --   calls to 'GI.Gtk.Objects.Snapshot.snapshotTranslate' or other transform calls should
    --   have been made.
    -> m ()
widgetSnapshotChild :: a -> b -> c -> m ()
widgetSnapshotChild widget :: a
widget child :: b
child snapshot :: c
snapshot = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    Ptr Widget
widget' <- a -> IO (Ptr Widget)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
widget
    Ptr Widget
child' <- b -> IO (Ptr Widget)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
child
    Ptr Snapshot
snapshot' <- c -> IO (Ptr Snapshot)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr c
snapshot
    Ptr Widget -> Ptr Widget -> Ptr Snapshot -> IO ()
gtk_widget_snapshot_child Ptr Widget
widget' Ptr Widget
child' Ptr Snapshot
snapshot'
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
widget
    b -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr b
child
    c -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr c
snapshot
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()

#if defined(ENABLE_OVERLOADING)
data WidgetSnapshotChildMethodInfo
instance (signature ~ (b -> c -> m ()), MonadIO m, IsWidget a, IsWidget b, Gtk.Snapshot.IsSnapshot c) => O.MethodInfo WidgetSnapshotChildMethodInfo a signature where
    overloadedMethod = widgetSnapshotChild

#endif

-- method Widget::translate_coordinates
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "src_widget"
--           , argType = TInterface Name { namespace = "Gtk" , name = "Widget" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #GtkWidget" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "dest_widget"
--           , argType = TInterface Name { namespace = "Gtk" , name = "Widget" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #GtkWidget" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "src_x"
--           , argType = TBasicType TInt
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "X position relative to @src_widget"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "src_y"
--           , argType = TBasicType TInt
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "Y position relative to @src_widget"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "dest_x"
--           , argType = TBasicType TInt
--           , direction = DirectionOut
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText =
--                     Just "location to store X position relative to @dest_widget"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferEverything
--           }
--       , Arg
--           { argCName = "dest_y"
--           , argType = TBasicType TInt
--           , direction = DirectionOut
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText =
--                     Just "location to store Y position relative to @dest_widget"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferEverything
--           }
--       ]
-- Lengths: []
-- returnType: Just (TBasicType TBoolean)
-- throws : False
-- Skip return : False

foreign import ccall "gtk_widget_translate_coordinates" gtk_widget_translate_coordinates :: 
    Ptr Widget ->                           -- src_widget : TInterface (Name {namespace = "Gtk", name = "Widget"})
    Ptr Widget ->                           -- dest_widget : TInterface (Name {namespace = "Gtk", name = "Widget"})
    Int32 ->                                -- src_x : TBasicType TInt
    Int32 ->                                -- src_y : TBasicType TInt
    Ptr Int32 ->                            -- dest_x : TBasicType TInt
    Ptr Int32 ->                            -- dest_y : TBasicType TInt
    IO CInt

-- | Translate coordinates relative to /@srcWidget@/’s allocation to coordinates
-- relative to /@destWidget@/’s allocations. In order to perform this
-- operation, both widget must share a common toplevel.
widgetTranslateCoordinates ::
    (B.CallStack.HasCallStack, MonadIO m, IsWidget a, IsWidget b) =>
    a
    -- ^ /@srcWidget@/: a t'GI.Gtk.Objects.Widget.Widget'
    -> b
    -- ^ /@destWidget@/: a t'GI.Gtk.Objects.Widget.Widget'
    -> Int32
    -- ^ /@srcX@/: X position relative to /@srcWidget@/
    -> Int32
    -- ^ /@srcY@/: Y position relative to /@srcWidget@/
    -> m ((Bool, Int32, Int32))
    -- ^ __Returns:__ 'P.False' if /@srcWidget@/ and /@destWidget@/ have no common
    --   ancestor. In this case, 0 is stored in
    --   */@destX@/ and */@destY@/. Otherwise 'P.True'.
widgetTranslateCoordinates :: a -> b -> Int32 -> Int32 -> m (Bool, Int32, Int32)
widgetTranslateCoordinates srcWidget :: a
srcWidget destWidget :: b
destWidget srcX :: Int32
srcX srcY :: Int32
srcY = IO (Bool, Int32, Int32) -> m (Bool, Int32, Int32)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Bool, Int32, Int32) -> m (Bool, Int32, Int32))
-> IO (Bool, Int32, Int32) -> m (Bool, Int32, Int32)
forall a b. (a -> b) -> a -> b
$ do
    Ptr Widget
srcWidget' <- a -> IO (Ptr Widget)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
srcWidget
    Ptr Widget
destWidget' <- b -> IO (Ptr Widget)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
destWidget
    Ptr Int32
destX <- IO (Ptr Int32)
forall a. Storable a => IO (Ptr a)
allocMem :: IO (Ptr Int32)
    Ptr Int32
destY <- IO (Ptr Int32)
forall a. Storable a => IO (Ptr a)
allocMem :: IO (Ptr Int32)
    CInt
result <- Ptr Widget
-> Ptr Widget
-> Int32
-> Int32
-> Ptr Int32
-> Ptr Int32
-> IO CInt
gtk_widget_translate_coordinates Ptr Widget
srcWidget' Ptr Widget
destWidget' Int32
srcX Int32
srcY Ptr Int32
destX Ptr Int32
destY
    let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= 0) CInt
result
    Int32
destX' <- Ptr Int32 -> IO Int32
forall a. Storable a => Ptr a -> IO a
peek Ptr Int32
destX
    Int32
destY' <- Ptr Int32 -> IO Int32
forall a. Storable a => Ptr a -> IO a
peek Ptr Int32
destY
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
srcWidget
    b -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr b
destWidget
    Ptr Int32 -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr Int32
destX
    Ptr Int32 -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr Int32
destY
    (Bool, Int32, Int32) -> IO (Bool, Int32, Int32)
forall (m :: * -> *) a. Monad m => a -> m a
return (Bool
result', Int32
destX', Int32
destY')

#if defined(ENABLE_OVERLOADING)
data WidgetTranslateCoordinatesMethodInfo
instance (signature ~ (b -> Int32 -> Int32 -> m ((Bool, Int32, Int32))), MonadIO m, IsWidget a, IsWidget b) => O.MethodInfo WidgetTranslateCoordinatesMethodInfo a signature where
    overloadedMethod = widgetTranslateCoordinates

#endif

-- method Widget::trigger_tooltip_query
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "widget"
--           , argType = TInterface Name { namespace = "Gtk" , name = "Widget" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #GtkWidget" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "gtk_widget_trigger_tooltip_query" gtk_widget_trigger_tooltip_query :: 
    Ptr Widget ->                           -- widget : TInterface (Name {namespace = "Gtk", name = "Widget"})
    IO ()

-- | Triggers a tooltip query on the display where the toplevel of /@widget@/
-- is located. See @/gtk_tooltip_trigger_tooltip_query()/@ for more
-- information.
widgetTriggerTooltipQuery ::
    (B.CallStack.HasCallStack, MonadIO m, IsWidget a) =>
    a
    -- ^ /@widget@/: a t'GI.Gtk.Objects.Widget.Widget'
    -> m ()
widgetTriggerTooltipQuery :: a -> m ()
widgetTriggerTooltipQuery widget :: a
widget = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    Ptr Widget
widget' <- a -> IO (Ptr Widget)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
widget
    Ptr Widget -> IO ()
gtk_widget_trigger_tooltip_query Ptr Widget
widget'
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
widget
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()

#if defined(ENABLE_OVERLOADING)
data WidgetTriggerTooltipQueryMethodInfo
instance (signature ~ (m ()), MonadIO m, IsWidget a) => O.MethodInfo WidgetTriggerTooltipQueryMethodInfo a signature where
    overloadedMethod = widgetTriggerTooltipQuery

#endif

-- method Widget::unmap
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "widget"
--           , argType = TInterface Name { namespace = "Gtk" , name = "Widget" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #GtkWidget" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "gtk_widget_unmap" gtk_widget_unmap :: 
    Ptr Widget ->                           -- widget : TInterface (Name {namespace = "Gtk", name = "Widget"})
    IO ()

-- | This function is only for use in widget implementations. Causes
-- a widget to be unmapped if it’s currently mapped.
widgetUnmap ::
    (B.CallStack.HasCallStack, MonadIO m, IsWidget a) =>
    a
    -- ^ /@widget@/: a t'GI.Gtk.Objects.Widget.Widget'
    -> m ()
widgetUnmap :: a -> m ()
widgetUnmap widget :: a
widget = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    Ptr Widget
widget' <- a -> IO (Ptr Widget)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
widget
    Ptr Widget -> IO ()
gtk_widget_unmap Ptr Widget
widget'
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
widget
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()

#if defined(ENABLE_OVERLOADING)
data WidgetUnmapMethodInfo
instance (signature ~ (m ()), MonadIO m, IsWidget a) => O.MethodInfo WidgetUnmapMethodInfo a signature where
    overloadedMethod = widgetUnmap

#endif

-- method Widget::unparent
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "widget"
--           , argType = TInterface Name { namespace = "Gtk" , name = "Widget" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #GtkWidget" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "gtk_widget_unparent" gtk_widget_unparent :: 
    Ptr Widget ->                           -- widget : TInterface (Name {namespace = "Gtk", name = "Widget"})
    IO ()

-- | This function is only for use in widget implementations.
-- Should be called by parent widgets to dissociate /@widget@/
-- from the parent.
widgetUnparent ::
    (B.CallStack.HasCallStack, MonadIO m, IsWidget a) =>
    a
    -- ^ /@widget@/: a t'GI.Gtk.Objects.Widget.Widget'
    -> m ()
widgetUnparent :: a -> m ()
widgetUnparent widget :: a
widget = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    Ptr Widget
widget' <- a -> IO (Ptr Widget)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
widget
    Ptr Widget -> IO ()
gtk_widget_unparent Ptr Widget
widget'
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
widget
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()

#if defined(ENABLE_OVERLOADING)
data WidgetUnparentMethodInfo
instance (signature ~ (m ()), MonadIO m, IsWidget a) => O.MethodInfo WidgetUnparentMethodInfo a signature where
    overloadedMethod = widgetUnparent

#endif

-- method Widget::unrealize
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "widget"
--           , argType = TInterface Name { namespace = "Gtk" , name = "Widget" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #GtkWidget" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "gtk_widget_unrealize" gtk_widget_unrealize :: 
    Ptr Widget ->                           -- widget : TInterface (Name {namespace = "Gtk", name = "Widget"})
    IO ()

-- | This function is only useful in widget implementations.
-- Causes a widget to be unrealized (frees all GDK resources
-- associated with the widget, such as /@widget@/->surface).
widgetUnrealize ::
    (B.CallStack.HasCallStack, MonadIO m, IsWidget a) =>
    a
    -- ^ /@widget@/: a t'GI.Gtk.Objects.Widget.Widget'
    -> m ()
widgetUnrealize :: a -> m ()
widgetUnrealize widget :: a
widget = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    Ptr Widget
widget' <- a -> IO (Ptr Widget)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
widget
    Ptr Widget -> IO ()
gtk_widget_unrealize Ptr Widget
widget'
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
widget
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()

#if defined(ENABLE_OVERLOADING)
data WidgetUnrealizeMethodInfo
instance (signature ~ (m ()), MonadIO m, IsWidget a) => O.MethodInfo WidgetUnrealizeMethodInfo a signature where
    overloadedMethod = widgetUnrealize

#endif

-- method Widget::unregister_surface
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "widget"
--           , argType = TInterface Name { namespace = "Gtk" , name = "Widget" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #GtkWidget" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "surface"
--           , argType =
--               TInterface Name { namespace = "Gdk" , name = "Surface" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #GdkSurface" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "gtk_widget_unregister_surface" gtk_widget_unregister_surface :: 
    Ptr Widget ->                           -- widget : TInterface (Name {namespace = "Gtk", name = "Widget"})
    Ptr Gdk.Surface.Surface ->              -- surface : TInterface (Name {namespace = "Gdk", name = "Surface"})
    IO ()

-- | Unregisters a t'GI.Gdk.Objects.Surface.Surface' from the widget that was previously set up with
-- 'GI.Gtk.Objects.Widget.widgetRegisterSurface'. You need to call this when the surface is
-- no longer used by the widget, such as when you destroy it.
widgetUnregisterSurface ::
    (B.CallStack.HasCallStack, MonadIO m, IsWidget a, Gdk.Surface.IsSurface b) =>
    a
    -- ^ /@widget@/: a t'GI.Gtk.Objects.Widget.Widget'
    -> b
    -- ^ /@surface@/: a t'GI.Gdk.Objects.Surface.Surface'
    -> m ()
widgetUnregisterSurface :: a -> b -> m ()
widgetUnregisterSurface widget :: a
widget surface :: b
surface = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    Ptr Widget
widget' <- a -> IO (Ptr Widget)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
widget
    Ptr Surface
surface' <- b -> IO (Ptr Surface)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
surface
    Ptr Widget -> Ptr Surface -> IO ()
gtk_widget_unregister_surface Ptr Widget
widget' Ptr Surface
surface'
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
widget
    b -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr b
surface
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()

#if defined(ENABLE_OVERLOADING)
data WidgetUnregisterSurfaceMethodInfo
instance (signature ~ (b -> m ()), MonadIO m, IsWidget a, Gdk.Surface.IsSurface b) => O.MethodInfo WidgetUnregisterSurfaceMethodInfo a signature where
    overloadedMethod = widgetUnregisterSurface

#endif

-- method Widget::unset_state_flags
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "widget"
--           , argType = TInterface Name { namespace = "Gtk" , name = "Widget" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #GtkWidget" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "flags"
--           , argType =
--               TInterface Name { namespace = "Gtk" , name = "StateFlags" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "State flags to turn off"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "gtk_widget_unset_state_flags" gtk_widget_unset_state_flags :: 
    Ptr Widget ->                           -- widget : TInterface (Name {namespace = "Gtk", name = "Widget"})
    CUInt ->                                -- flags : TInterface (Name {namespace = "Gtk", name = "StateFlags"})
    IO ()

-- | This function is for use in widget implementations. Turns off flag
-- values for the current widget state (insensitive, prelighted, etc.).
-- See 'GI.Gtk.Objects.Widget.widgetSetStateFlags'.
widgetUnsetStateFlags ::
    (B.CallStack.HasCallStack, MonadIO m, IsWidget a) =>
    a
    -- ^ /@widget@/: a t'GI.Gtk.Objects.Widget.Widget'
    -> [Gtk.Flags.StateFlags]
    -- ^ /@flags@/: State flags to turn off
    -> m ()
widgetUnsetStateFlags :: a -> [StateFlags] -> m ()
widgetUnsetStateFlags widget :: a
widget flags :: [StateFlags]
flags = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    Ptr Widget
widget' <- a -> IO (Ptr Widget)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
widget
    let flags' :: CUInt
flags' = [StateFlags] -> CUInt
forall b a. (Num b, IsGFlag a) => [a] -> b
gflagsToWord [StateFlags]
flags
    Ptr Widget -> CUInt -> IO ()
gtk_widget_unset_state_flags Ptr Widget
widget' CUInt
flags'
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
widget
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()

#if defined(ENABLE_OVERLOADING)
data WidgetUnsetStateFlagsMethodInfo
instance (signature ~ ([Gtk.Flags.StateFlags] -> m ()), MonadIO m, IsWidget a) => O.MethodInfo WidgetUnsetStateFlagsMethodInfo a signature where
    overloadedMethod = widgetUnsetStateFlags

#endif

-- method Widget::get_default_direction
-- method type : MemberFunction
-- Args: []
-- Lengths: []
-- returnType: Just
--               (TInterface Name { namespace = "Gtk" , name = "TextDirection" })
-- throws : False
-- Skip return : False

foreign import ccall "gtk_widget_get_default_direction" gtk_widget_get_default_direction :: 
    IO CUInt

-- | Obtains the current default reading direction. See
-- 'GI.Gtk.Objects.Widget.widgetSetDefaultDirection'.
widgetGetDefaultDirection ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    m Gtk.Enums.TextDirection
    -- ^ __Returns:__ the current default direction.
widgetGetDefaultDirection :: m TextDirection
widgetGetDefaultDirection  = IO TextDirection -> m TextDirection
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO TextDirection -> m TextDirection)
-> IO TextDirection -> m TextDirection
forall a b. (a -> b) -> a -> b
$ do
    CUInt
result <- IO CUInt
gtk_widget_get_default_direction
    let result' :: TextDirection
result' = (Int -> TextDirection
forall a. Enum a => Int -> a
toEnum (Int -> TextDirection) -> (CUInt -> Int) -> CUInt -> TextDirection
forall b c a. (b -> c) -> (a -> b) -> a -> c
. CUInt -> Int
forall a b. (Integral a, Num b) => a -> b
fromIntegral) CUInt
result
    TextDirection -> IO TextDirection
forall (m :: * -> *) a. Monad m => a -> m a
return TextDirection
result'

#if defined(ENABLE_OVERLOADING)
#endif

-- method Widget::set_default_direction
-- method type : MemberFunction
-- Args: [ Arg
--           { argCName = "dir"
--           , argType =
--               TInterface Name { namespace = "Gtk" , name = "TextDirection" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText =
--                     Just
--                       "the new default direction. This cannot be\n       %GTK_TEXT_DIR_NONE."
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "gtk_widget_set_default_direction" gtk_widget_set_default_direction :: 
    CUInt ->                                -- dir : TInterface (Name {namespace = "Gtk", name = "TextDirection"})
    IO ()

-- | Sets the default reading direction for widgets where the
-- direction has not been explicitly set by 'GI.Gtk.Objects.Widget.widgetSetDirection'.
widgetSetDefaultDirection ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    Gtk.Enums.TextDirection
    -- ^ /@dir@/: the new default direction. This cannot be
    --        'GI.Gtk.Enums.TextDirectionNone'.
    -> m ()
widgetSetDefaultDirection :: TextDirection -> m ()
widgetSetDefaultDirection dir :: TextDirection
dir = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    let dir' :: CUInt
dir' = (Int -> CUInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CUInt) -> (TextDirection -> Int) -> TextDirection -> CUInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. TextDirection -> Int
forall a. Enum a => a -> Int
fromEnum) TextDirection
dir
    CUInt -> IO ()
gtk_widget_set_default_direction CUInt
dir'
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()

#if defined(ENABLE_OVERLOADING)
#endif