{-# LANGUAGE ImplicitParams, RankNTypes, TypeApplications #-}


-- | Copyright  : Will Thompson and Iñaki García Etxebarria
-- 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 five virtual methods:
-- 
-- * t'GI.Gtk.Structs.WidgetClass.WidgetClass'.@/get_request_mode/@()
-- * t'GI.Gtk.Structs.WidgetClass.WidgetClass'.@/get_preferred_width/@()
-- * t'GI.Gtk.Structs.WidgetClass.WidgetClass'.@/get_preferred_height/@()
-- * t'GI.Gtk.Structs.WidgetClass.WidgetClass'.@/get_preferred_height_for_width/@()
-- * t'GI.Gtk.Structs.WidgetClass.WidgetClass'.@/get_preferred_width_for_height/@()
-- * t'GI.Gtk.Structs.WidgetClass.WidgetClass'.@/get_preferred_height_and_baseline_for_width/@()
-- 
-- 
-- There are some important things to keep in mind when implementing
-- height-for-width and when using it in container implementations.
-- 
-- The geometry management system will query a widget hierarchy in
-- only one orientation at a time. When widgets are initially queried
-- for their minimum sizes it is generally done in two initial passes
-- in the 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.widgetGetPreferredWidth'.
-- Because the preferred widths for each container depend on the preferred
-- widths of their children, this information propagates up the hierarchy,
-- and finally a minimum and natural width is determined for the entire
-- toplevel. Next, the toplevel will use the minimum width to query for the
-- minimum height contextual to that width using
-- 'GI.Gtk.Objects.Widget.widgetGetPreferredHeightForWidth', which will also be a highly
-- recursive operation. The minimum height for the minimum width is normally
-- used to set the minimum size constraint on the toplevel
-- (unless 'GI.Gtk.Objects.Window.windowSetGeometryHints' is explicitly used instead).
-- 
-- After the toplevel window has initially requested its size in both
-- dimensions it can go on to allocate itself a reasonable size (or a size
-- previously specified with 'GI.Gtk.Objects.Window.windowSetDefaultSize'). During the
-- recursive allocation process it’s important to note that request cycles
-- will be recursively executed while container widgets allocate their children.
-- Each container widget, once allocated a size, will go on to first share the
-- space in one orientation among its children and then request each child\'s
-- height for its target allocated width or its width for allocated height,
-- depending. In this way a 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.
-- 
-- See
-- [GtkContainer’s geometry management section][container-geometry-management]
-- to learn more about how height-for-width allocations are performed
-- by container widgets.
-- 
-- If a widget does move content around to intelligently use up the
-- allocated size then it must support the request in both
-- @/GtkSizeRequestModes/@ even if the widget in question only
-- trades sizes in a single orientation.
-- 
-- For instance, a t'GI.Gtk.Objects.Label.Label' that does height-for-width word wrapping
-- will not expect to have t'GI.Gtk.Structs.WidgetClass.WidgetClass'.@/get_preferred_height/@() called
-- because that call is specific to a width-for-height request. In this
-- case the label must return the height required for its own minimum
-- possible width. By following this rule any widget that handles
-- height-for-width or width-for-height requests will always be allocated
-- at least enough space to fit its own content.
-- 
-- Here are some examples of how a 'GI.Gtk.Enums.SizeRequestModeHeightForWidth' widget
-- generally deals with width-for-height requests, for t'GI.Gtk.Structs.WidgetClass.WidgetClass'.@/get_preferred_height/@()
-- it will do:
-- 
-- 
-- === /C code/
-- >
-- >static void
-- >foo_widget_get_preferred_height (GtkWidget *widget,
-- >                                 gint *min_height,
-- >                                 gint *nat_height)
-- >{
-- >   if (i_am_in_height_for_width_mode)
-- >     {
-- >       gint min_width, nat_width;
-- >
-- >       GTK_WIDGET_GET_CLASS (widget)->get_preferred_width (widget,
-- >                                                           &min_width,
-- >                                                           &nat_width);
-- >       GTK_WIDGET_GET_CLASS (widget)->get_preferred_height_for_width
-- >                                                          (widget,
-- >                                                           min_width,
-- >                                                           min_height,
-- >                                                           nat_height);
-- >     }
-- >   else
-- >     {
-- >        ... some widgets do both. For instance, if a GtkLabel is
-- >        rotated to 90 degrees it will return the minimum and
-- >        natural height for the rotated label here.
-- >     }
-- >}
-- 
-- 
-- And in t'GI.Gtk.Structs.WidgetClass.WidgetClass'.@/get_preferred_width_for_height/@() it will simply return
-- the minimum and natural width:
-- 
-- === /C code/
-- >
-- >static void
-- >foo_widget_get_preferred_width_for_height (GtkWidget *widget,
-- >                                           gint for_height,
-- >                                           gint *min_width,
-- >                                           gint *nat_width)
-- >{
-- >   if (i_am_in_height_for_width_mode)
-- >     {
-- >       GTK_WIDGET_GET_CLASS (widget)->get_preferred_width (widget,
-- >                                                           min_width,
-- >                                                           nat_width);
-- >     }
-- >   else
-- >     {
-- >        ... again if a widget is sometimes operating in
-- >        width-for-height mode (like a rotated GtkLabel) it can go
-- >        ahead and do its real width for height calculation here.
-- >     }
-- >}
-- 
-- 
-- Often a widget needs to get its own request during size request or
-- allocation. For example, when computing height it may need to also
-- compute width. Or when deciding how to use an allocation, the widget
-- may need to know its natural size. In these cases, the widget should
-- be careful to call its virtual methods directly, like this:
-- 
-- 
-- === /C code/
-- >
-- >GTK_WIDGET_GET_CLASS(widget)->get_preferred_width (widget,
-- >                                                   &min,
-- >                                                   &natural);
-- 
-- 
-- It will not work to use the wrapper functions, such as
-- 'GI.Gtk.Objects.Widget.widgetGetPreferredWidth' inside your own size request
-- implementation. These return a request adjusted by t'GI.Gtk.Objects.SizeGroup.SizeGroup'
-- and by the t'GI.Gtk.Structs.WidgetClass.WidgetClass'.@/adjust_size_request/@() virtual method. If a
-- widget used the wrappers inside its virtual method implementations,
-- then the adjustments (such as widget margins) would be applied
-- twice. GTK+ therefore does not allow this and will warn if you try
-- to do it.
-- 
-- Of course if you are getting the size request for
-- another widget, such as a child of a
-- container, you must use the wrapper APIs.
-- Otherwise, you would not properly consider widget margins,
-- t'GI.Gtk.Objects.SizeGroup.SizeGroup', and so forth.
-- 
-- Since 3.10 GTK+ also supports baseline vertical alignment of widgets. This
-- means that widgets are positioned such that the typographical baseline of
-- widgets in the same row are aligned. This happens if a widget supports baselines,
-- has a vertical alignment of 'GI.Gtk.Enums.AlignBaseline', and is inside a container
-- that supports baselines and has a natural “row” that it aligns to the baseline,
-- or a baseline assigned to it by the grandparent.
-- 
-- Baseline alignment support for a widget is done by the t'GI.Gtk.Structs.WidgetClass.WidgetClass'.@/get_preferred_height_and_baseline_for_width/@()
-- virtual function. It allows you to report a baseline in combination with the
-- minimum and natural height. If there is no baseline you can return -1 to indicate
-- this. The default implementation of this virtual function calls into the
-- t'GI.Gtk.Structs.WidgetClass.WidgetClass'.@/get_preferred_height/@() and t'GI.Gtk.Structs.WidgetClass.WidgetClass'.@/get_preferred_height_for_width/@(),
-- so if baselines are not supported it doesn’t need to be implemented.
-- 
-- If a widget ends up baseline aligned it will be allocated all the space in the parent
-- as if it was 'GI.Gtk.Enums.AlignFill', but the selected baseline can be found via 'GI.Gtk.Objects.Widget.widgetGetAllocatedBaseline'.
-- If this has a value other than -1 you need to align the widget such that the baseline
-- appears at the position.
-- 
-- = Style Properties
-- 
-- t'GI.Gtk.Objects.Widget.Widget' introduces “style
-- properties” - these are basically object properties that are stored
-- not on the object, but in the style object associated to the widget. Style
-- properties are set in [resource files][gtk3-Resource-Files].
-- This mechanism is used for configuring such things as the location of the
-- scrollbar arrows through the theme, giving theme authors more control over the
-- look of applications without the need to write a theme engine in C.
-- 
-- Use 'GI.Gtk.Structs.WidgetClass.widgetClassInstallStyleProperty' to install style properties for
-- a widget class, 'GI.Gtk.Structs.WidgetClass.widgetClassFindStyleProperty' or
-- 'GI.Gtk.Structs.WidgetClass.widgetClassListStyleProperties' to get information about existing
-- style properties and 'GI.Gtk.Objects.Widget.widgetStyleGetProperty', @/gtk_widget_style_get()/@ or
-- @/gtk_widget_style_get_valist()/@ to obtain the value of a style property.
-- 
-- = GtkWidget as GtkBuildable
-- 
-- The GtkWidget implementation of the GtkBuildable interface supports a
-- custom \<accelerator> element, which has attributes named ”key”, ”modifiers”
-- and ”signal” and allows to specify accelerators.
-- 
-- An example of a UI definition fragment specifying an accelerator:
-- >
-- ><object class="GtkButton">
-- >  <accelerator key="q" modifiers="GDK_CONTROL_MASK" signal="clicked"/>
-- ></object>
-- 
-- 
-- In addition to accelerators, GtkWidget also support a custom \<accessible>
-- element, which supports actions and relations. Properties on the accessible
-- implementation of an object can be set by accessing the internal child
-- “accessible” of a 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>
-- 
-- 
-- 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                                ,


 -- * Methods
-- | 
-- 
--  === __Click to display all available methods, including inherited ones__
-- ==== Methods
-- [activate]("GI.Gtk.Objects.Widget#g:method:activate"), [addAccelerator]("GI.Gtk.Objects.Widget#g:method:addAccelerator"), [addChild]("GI.Gtk.Interfaces.Buildable#g:method:addChild"), [addDeviceEvents]("GI.Gtk.Objects.Widget#g:method:addDeviceEvents"), [addEvents]("GI.Gtk.Objects.Widget#g:method:addEvents"), [addMnemonicLabel]("GI.Gtk.Objects.Widget#g:method:addMnemonicLabel"), [addTickCallback]("GI.Gtk.Objects.Widget#g:method:addTickCallback"), [bindProperty]("GI.GObject.Objects.Object#g:method:bindProperty"), [bindPropertyFull]("GI.GObject.Objects.Object#g:method:bindPropertyFull"), [canActivateAccel]("GI.Gtk.Objects.Widget#g:method:canActivateAccel"), [childFocus]("GI.Gtk.Objects.Widget#g:method:childFocus"), [childNotify]("GI.Gtk.Objects.Widget#g:method:childNotify"), [classPath]("GI.Gtk.Objects.Widget#g:method:classPath"), [computeExpand]("GI.Gtk.Objects.Widget#g:method:computeExpand"), [constructChild]("GI.Gtk.Interfaces.Buildable#g:method:constructChild"), [createPangoContext]("GI.Gtk.Objects.Widget#g:method:createPangoContext"), [createPangoLayout]("GI.Gtk.Objects.Widget#g:method:createPangoLayout"), [customFinished]("GI.Gtk.Interfaces.Buildable#g:method:customFinished"), [customTagEnd]("GI.Gtk.Interfaces.Buildable#g:method:customTagEnd"), [customTagStart]("GI.Gtk.Interfaces.Buildable#g:method:customTagStart"), [destroy]("GI.Gtk.Objects.Widget#g:method:destroy"), [destroyed]("GI.Gtk.Objects.Widget#g:method:destroyed"), [deviceIsShadowed]("GI.Gtk.Objects.Widget#g:method:deviceIsShadowed"), [dragBegin]("GI.Gtk.Objects.Widget#g:method:dragBegin"), [dragBeginWithCoordinates]("GI.Gtk.Objects.Widget#g:method:dragBeginWithCoordinates"), [dragCheckThreshold]("GI.Gtk.Objects.Widget#g:method:dragCheckThreshold"), [dragDestAddImageTargets]("GI.Gtk.Objects.Widget#g:method:dragDestAddImageTargets"), [dragDestAddTextTargets]("GI.Gtk.Objects.Widget#g:method:dragDestAddTextTargets"), [dragDestAddUriTargets]("GI.Gtk.Objects.Widget#g:method:dragDestAddUriTargets"), [dragDestFindTarget]("GI.Gtk.Objects.Widget#g:method:dragDestFindTarget"), [dragDestGetTargetList]("GI.Gtk.Objects.Widget#g:method:dragDestGetTargetList"), [dragDestGetTrackMotion]("GI.Gtk.Objects.Widget#g:method:dragDestGetTrackMotion"), [dragDestSet]("GI.Gtk.Objects.Widget#g:method:dragDestSet"), [dragDestSetProxy]("GI.Gtk.Objects.Widget#g:method:dragDestSetProxy"), [dragDestSetTargetList]("GI.Gtk.Objects.Widget#g:method:dragDestSetTargetList"), [dragDestSetTrackMotion]("GI.Gtk.Objects.Widget#g:method:dragDestSetTrackMotion"), [dragDestUnset]("GI.Gtk.Objects.Widget#g:method:dragDestUnset"), [dragGetData]("GI.Gtk.Objects.Widget#g:method:dragGetData"), [dragHighlight]("GI.Gtk.Objects.Widget#g:method:dragHighlight"), [dragSourceAddImageTargets]("GI.Gtk.Objects.Widget#g:method:dragSourceAddImageTargets"), [dragSourceAddTextTargets]("GI.Gtk.Objects.Widget#g:method:dragSourceAddTextTargets"), [dragSourceAddUriTargets]("GI.Gtk.Objects.Widget#g:method:dragSourceAddUriTargets"), [dragSourceGetTargetList]("GI.Gtk.Objects.Widget#g:method:dragSourceGetTargetList"), [dragSourceSet]("GI.Gtk.Objects.Widget#g:method:dragSourceSet"), [dragSourceSetIconGicon]("GI.Gtk.Objects.Widget#g:method:dragSourceSetIconGicon"), [dragSourceSetIconName]("GI.Gtk.Objects.Widget#g:method:dragSourceSetIconName"), [dragSourceSetIconPixbuf]("GI.Gtk.Objects.Widget#g:method:dragSourceSetIconPixbuf"), [dragSourceSetIconStock]("GI.Gtk.Objects.Widget#g:method:dragSourceSetIconStock"), [dragSourceSetTargetList]("GI.Gtk.Objects.Widget#g:method:dragSourceSetTargetList"), [dragSourceUnset]("GI.Gtk.Objects.Widget#g:method:dragSourceUnset"), [dragUnhighlight]("GI.Gtk.Objects.Widget#g:method:dragUnhighlight"), [draw]("GI.Gtk.Objects.Widget#g:method:draw"), [ensureStyle]("GI.Gtk.Objects.Widget#g:method:ensureStyle"), [errorBell]("GI.Gtk.Objects.Widget#g:method:errorBell"), [event]("GI.Gtk.Objects.Widget#g:method:event"), [forceFloating]("GI.GObject.Objects.Object#g:method:forceFloating"), [freezeChildNotify]("GI.Gtk.Objects.Widget#g:method:freezeChildNotify"), [freezeNotify]("GI.GObject.Objects.Object#g:method:freezeNotify"), [getv]("GI.GObject.Objects.Object#g:method:getv"), [grabAdd]("GI.Gtk.Objects.Widget#g:method:grabAdd"), [grabDefault]("GI.Gtk.Objects.Widget#g:method:grabDefault"), [grabFocus]("GI.Gtk.Objects.Widget#g:method:grabFocus"), [grabRemove]("GI.Gtk.Objects.Widget#g:method:grabRemove"), [hasDefault]("GI.Gtk.Objects.Widget#g:method:hasDefault"), [hasFocus]("GI.Gtk.Objects.Widget#g:method:hasFocus"), [hasGrab]("GI.Gtk.Objects.Widget#g:method:hasGrab"), [hasRcStyle]("GI.Gtk.Objects.Widget#g:method:hasRcStyle"), [hasScreen]("GI.Gtk.Objects.Widget#g:method:hasScreen"), [hasVisibleFocus]("GI.Gtk.Objects.Widget#g:method:hasVisibleFocus"), [hide]("GI.Gtk.Objects.Widget#g:method:hide"), [hideOnDelete]("GI.Gtk.Objects.Widget#g:method:hideOnDelete"), [inDestruction]("GI.Gtk.Objects.Widget#g:method:inDestruction"), [initTemplate]("GI.Gtk.Objects.Widget#g:method:initTemplate"), [inputShapeCombineRegion]("GI.Gtk.Objects.Widget#g:method:inputShapeCombineRegion"), [insertActionGroup]("GI.Gtk.Objects.Widget#g:method:insertActionGroup"), [intersect]("GI.Gtk.Objects.Widget#g:method:intersect"), [isAncestor]("GI.Gtk.Objects.Widget#g:method:isAncestor"), [isComposited]("GI.Gtk.Objects.Widget#g:method:isComposited"), [isDrawable]("GI.Gtk.Objects.Widget#g:method:isDrawable"), [isFloating]("GI.GObject.Objects.Object#g:method:isFloating"), [isFocus]("GI.Gtk.Objects.Widget#g:method:isFocus"), [isSensitive]("GI.Gtk.Objects.Widget#g:method:isSensitive"), [isToplevel]("GI.Gtk.Objects.Widget#g:method:isToplevel"), [isVisible]("GI.Gtk.Objects.Widget#g:method:isVisible"), [keynavFailed]("GI.Gtk.Objects.Widget#g:method:keynavFailed"), [listAccelClosures]("GI.Gtk.Objects.Widget#g:method:listAccelClosures"), [listActionPrefixes]("GI.Gtk.Objects.Widget#g:method:listActionPrefixes"), [listMnemonicLabels]("GI.Gtk.Objects.Widget#g:method:listMnemonicLabels"), [map]("GI.Gtk.Objects.Widget#g:method:map"), [mnemonicActivate]("GI.Gtk.Objects.Widget#g:method:mnemonicActivate"), [modifyBase]("GI.Gtk.Objects.Widget#g:method:modifyBase"), [modifyBg]("GI.Gtk.Objects.Widget#g:method:modifyBg"), [modifyCursor]("GI.Gtk.Objects.Widget#g:method:modifyCursor"), [modifyFg]("GI.Gtk.Objects.Widget#g:method:modifyFg"), [modifyFont]("GI.Gtk.Objects.Widget#g:method:modifyFont"), [modifyStyle]("GI.Gtk.Objects.Widget#g:method:modifyStyle"), [modifyText]("GI.Gtk.Objects.Widget#g:method:modifyText"), [notify]("GI.GObject.Objects.Object#g:method:notify"), [notifyByPspec]("GI.GObject.Objects.Object#g:method:notifyByPspec"), [overrideBackgroundColor]("GI.Gtk.Objects.Widget#g:method:overrideBackgroundColor"), [overrideColor]("GI.Gtk.Objects.Widget#g:method:overrideColor"), [overrideCursor]("GI.Gtk.Objects.Widget#g:method:overrideCursor"), [overrideFont]("GI.Gtk.Objects.Widget#g:method:overrideFont"), [overrideSymbolicColor]("GI.Gtk.Objects.Widget#g:method:overrideSymbolicColor"), [parserFinished]("GI.Gtk.Interfaces.Buildable#g:method:parserFinished"), [path]("GI.Gtk.Objects.Widget#g:method:path"), [queueAllocate]("GI.Gtk.Objects.Widget#g:method:queueAllocate"), [queueComputeExpand]("GI.Gtk.Objects.Widget#g:method:queueComputeExpand"), [queueDraw]("GI.Gtk.Objects.Widget#g:method:queueDraw"), [queueDrawArea]("GI.Gtk.Objects.Widget#g:method:queueDrawArea"), [queueDrawRegion]("GI.Gtk.Objects.Widget#g:method:queueDrawRegion"), [queueResize]("GI.Gtk.Objects.Widget#g:method:queueResize"), [queueResizeNoRedraw]("GI.Gtk.Objects.Widget#g:method:queueResizeNoRedraw"), [realize]("GI.Gtk.Objects.Widget#g:method:realize"), [ref]("GI.GObject.Objects.Object#g:method:ref"), [refSink]("GI.GObject.Objects.Object#g:method:refSink"), [regionIntersect]("GI.Gtk.Objects.Widget#g:method:regionIntersect"), [registerWindow]("GI.Gtk.Objects.Widget#g:method:registerWindow"), [removeAccelerator]("GI.Gtk.Objects.Widget#g:method:removeAccelerator"), [removeMnemonicLabel]("GI.Gtk.Objects.Widget#g:method:removeMnemonicLabel"), [removeTickCallback]("GI.Gtk.Objects.Widget#g:method:removeTickCallback"), [renderIcon]("GI.Gtk.Objects.Widget#g:method:renderIcon"), [renderIconPixbuf]("GI.Gtk.Objects.Widget#g:method:renderIconPixbuf"), [reparent]("GI.Gtk.Objects.Widget#g:method:reparent"), [resetRcStyles]("GI.Gtk.Objects.Widget#g:method:resetRcStyles"), [resetStyle]("GI.Gtk.Objects.Widget#g:method:resetStyle"), [runDispose]("GI.GObject.Objects.Object#g:method:runDispose"), [sendExpose]("GI.Gtk.Objects.Widget#g:method:sendExpose"), [sendFocusChange]("GI.Gtk.Objects.Widget#g:method:sendFocusChange"), [shapeCombineRegion]("GI.Gtk.Objects.Widget#g:method:shapeCombineRegion"), [show]("GI.Gtk.Objects.Widget#g:method:show"), [showAll]("GI.Gtk.Objects.Widget#g:method:showAll"), [showNow]("GI.Gtk.Objects.Widget#g:method:showNow"), [sizeAllocate]("GI.Gtk.Objects.Widget#g:method:sizeAllocate"), [sizeAllocateWithBaseline]("GI.Gtk.Objects.Widget#g:method:sizeAllocateWithBaseline"), [sizeRequest]("GI.Gtk.Objects.Widget#g:method:sizeRequest"), [stealData]("GI.GObject.Objects.Object#g:method:stealData"), [stealQdata]("GI.GObject.Objects.Object#g:method:stealQdata"), [styleAttach]("GI.Gtk.Objects.Widget#g:method:styleAttach"), [styleGetProperty]("GI.Gtk.Objects.Widget#g:method:styleGetProperty"), [thawChildNotify]("GI.Gtk.Objects.Widget#g:method:thawChildNotify"), [thawNotify]("GI.GObject.Objects.Object#g:method:thawNotify"), [translateCoordinates]("GI.Gtk.Objects.Widget#g:method:translateCoordinates"), [triggerTooltipQuery]("GI.Gtk.Objects.Widget#g:method:triggerTooltipQuery"), [unmap]("GI.Gtk.Objects.Widget#g:method:unmap"), [unparent]("GI.Gtk.Objects.Widget#g:method:unparent"), [unrealize]("GI.Gtk.Objects.Widget#g:method:unrealize"), [unref]("GI.GObject.Objects.Object#g:method:unref"), [unregisterWindow]("GI.Gtk.Objects.Widget#g:method:unregisterWindow"), [unsetStateFlags]("GI.Gtk.Objects.Widget#g:method:unsetStateFlags"), [watchClosure]("GI.GObject.Objects.Object#g:method:watchClosure").
-- 
-- ==== Getters
-- [getAccessible]("GI.Gtk.Objects.Widget#g:method:getAccessible"), [getActionGroup]("GI.Gtk.Objects.Widget#g:method:getActionGroup"), [getAllocatedBaseline]("GI.Gtk.Objects.Widget#g:method:getAllocatedBaseline"), [getAllocatedHeight]("GI.Gtk.Objects.Widget#g:method:getAllocatedHeight"), [getAllocatedSize]("GI.Gtk.Objects.Widget#g:method:getAllocatedSize"), [getAllocatedWidth]("GI.Gtk.Objects.Widget#g:method:getAllocatedWidth"), [getAllocation]("GI.Gtk.Objects.Widget#g:method:getAllocation"), [getAncestor]("GI.Gtk.Objects.Widget#g:method:getAncestor"), [getAppPaintable]("GI.Gtk.Objects.Widget#g:method:getAppPaintable"), [getCanDefault]("GI.Gtk.Objects.Widget#g:method:getCanDefault"), [getCanFocus]("GI.Gtk.Objects.Widget#g:method:getCanFocus"), [getChildRequisition]("GI.Gtk.Objects.Widget#g:method:getChildRequisition"), [getChildVisible]("GI.Gtk.Objects.Widget#g:method:getChildVisible"), [getClip]("GI.Gtk.Objects.Widget#g:method:getClip"), [getClipboard]("GI.Gtk.Objects.Widget#g:method:getClipboard"), [getCompositeName]("GI.Gtk.Objects.Widget#g:method:getCompositeName"), [getData]("GI.GObject.Objects.Object#g:method:getData"), [getDeviceEnabled]("GI.Gtk.Objects.Widget#g:method:getDeviceEnabled"), [getDeviceEvents]("GI.Gtk.Objects.Widget#g:method:getDeviceEvents"), [getDirection]("GI.Gtk.Objects.Widget#g:method:getDirection"), [getDisplay]("GI.Gtk.Objects.Widget#g:method:getDisplay"), [getDoubleBuffered]("GI.Gtk.Objects.Widget#g:method:getDoubleBuffered"), [getEvents]("GI.Gtk.Objects.Widget#g:method:getEvents"), [getFocusOnClick]("GI.Gtk.Objects.Widget#g:method:getFocusOnClick"), [getFontMap]("GI.Gtk.Objects.Widget#g:method:getFontMap"), [getFontOptions]("GI.Gtk.Objects.Widget#g:method:getFontOptions"), [getFrameClock]("GI.Gtk.Objects.Widget#g:method:getFrameClock"), [getHalign]("GI.Gtk.Objects.Widget#g:method:getHalign"), [getHasTooltip]("GI.Gtk.Objects.Widget#g:method:getHasTooltip"), [getHasWindow]("GI.Gtk.Objects.Widget#g:method:getHasWindow"), [getHexpand]("GI.Gtk.Objects.Widget#g:method:getHexpand"), [getHexpandSet]("GI.Gtk.Objects.Widget#g:method:getHexpandSet"), [getInternalChild]("GI.Gtk.Interfaces.Buildable#g:method:getInternalChild"), [getMapped]("GI.Gtk.Objects.Widget#g:method:getMapped"), [getMarginBottom]("GI.Gtk.Objects.Widget#g:method:getMarginBottom"), [getMarginEnd]("GI.Gtk.Objects.Widget#g:method:getMarginEnd"), [getMarginLeft]("GI.Gtk.Objects.Widget#g:method:getMarginLeft"), [getMarginRight]("GI.Gtk.Objects.Widget#g:method:getMarginRight"), [getMarginStart]("GI.Gtk.Objects.Widget#g:method:getMarginStart"), [getMarginTop]("GI.Gtk.Objects.Widget#g:method:getMarginTop"), [getModifierMask]("GI.Gtk.Objects.Widget#g:method:getModifierMask"), [getModifierStyle]("GI.Gtk.Objects.Widget#g:method:getModifierStyle"), [getName]("GI.Gtk.Objects.Widget#g:method:getName"), [getNoShowAll]("GI.Gtk.Objects.Widget#g:method:getNoShowAll"), [getOpacity]("GI.Gtk.Objects.Widget#g:method:getOpacity"), [getPangoContext]("GI.Gtk.Objects.Widget#g:method:getPangoContext"), [getParent]("GI.Gtk.Objects.Widget#g:method:getParent"), [getParentWindow]("GI.Gtk.Objects.Widget#g:method:getParentWindow"), [getPath]("GI.Gtk.Objects.Widget#g:method:getPath"), [getPointer]("GI.Gtk.Objects.Widget#g:method:getPointer"), [getPreferredHeight]("GI.Gtk.Objects.Widget#g:method:getPreferredHeight"), [getPreferredHeightAndBaselineForWidth]("GI.Gtk.Objects.Widget#g:method:getPreferredHeightAndBaselineForWidth"), [getPreferredHeightForWidth]("GI.Gtk.Objects.Widget#g:method:getPreferredHeightForWidth"), [getPreferredSize]("GI.Gtk.Objects.Widget#g:method:getPreferredSize"), [getPreferredWidth]("GI.Gtk.Objects.Widget#g:method:getPreferredWidth"), [getPreferredWidthForHeight]("GI.Gtk.Objects.Widget#g:method:getPreferredWidthForHeight"), [getProperty]("GI.GObject.Objects.Object#g:method:getProperty"), [getQdata]("GI.GObject.Objects.Object#g:method:getQdata"), [getRealized]("GI.Gtk.Objects.Widget#g:method:getRealized"), [getReceivesDefault]("GI.Gtk.Objects.Widget#g:method:getReceivesDefault"), [getRequestMode]("GI.Gtk.Objects.Widget#g:method:getRequestMode"), [getRequisition]("GI.Gtk.Objects.Widget#g:method:getRequisition"), [getRootWindow]("GI.Gtk.Objects.Widget#g:method:getRootWindow"), [getScaleFactor]("GI.Gtk.Objects.Widget#g:method:getScaleFactor"), [getScreen]("GI.Gtk.Objects.Widget#g:method:getScreen"), [getSensitive]("GI.Gtk.Objects.Widget#g:method:getSensitive"), [getSettings]("GI.Gtk.Objects.Widget#g:method:getSettings"), [getSizeRequest]("GI.Gtk.Objects.Widget#g:method:getSizeRequest"), [getState]("GI.Gtk.Objects.Widget#g:method:getState"), [getStateFlags]("GI.Gtk.Objects.Widget#g:method:getStateFlags"), [getStyle]("GI.Gtk.Objects.Widget#g:method:getStyle"), [getStyleContext]("GI.Gtk.Objects.Widget#g:method:getStyleContext"), [getSupportMultidevice]("GI.Gtk.Objects.Widget#g:method:getSupportMultidevice"), [getTemplateChild]("GI.Gtk.Objects.Widget#g:method:getTemplateChild"), [getTooltipMarkup]("GI.Gtk.Objects.Widget#g:method:getTooltipMarkup"), [getTooltipText]("GI.Gtk.Objects.Widget#g:method:getTooltipText"), [getTooltipWindow]("GI.Gtk.Objects.Widget#g:method:getTooltipWindow"), [getToplevel]("GI.Gtk.Objects.Widget#g:method:getToplevel"), [getValign]("GI.Gtk.Objects.Widget#g:method:getValign"), [getValignWithBaseline]("GI.Gtk.Objects.Widget#g:method:getValignWithBaseline"), [getVexpand]("GI.Gtk.Objects.Widget#g:method:getVexpand"), [getVexpandSet]("GI.Gtk.Objects.Widget#g:method:getVexpandSet"), [getVisible]("GI.Gtk.Objects.Widget#g:method:getVisible"), [getVisual]("GI.Gtk.Objects.Widget#g:method:getVisual"), [getWindow]("GI.Gtk.Objects.Widget#g:method:getWindow").
-- 
-- ==== Setters
-- [setAccelPath]("GI.Gtk.Objects.Widget#g:method:setAccelPath"), [setAllocation]("GI.Gtk.Objects.Widget#g:method:setAllocation"), [setAppPaintable]("GI.Gtk.Objects.Widget#g:method:setAppPaintable"), [setBuildableProperty]("GI.Gtk.Interfaces.Buildable#g:method:setBuildableProperty"), [setCanDefault]("GI.Gtk.Objects.Widget#g:method:setCanDefault"), [setCanFocus]("GI.Gtk.Objects.Widget#g:method:setCanFocus"), [setChildVisible]("GI.Gtk.Objects.Widget#g:method:setChildVisible"), [setClip]("GI.Gtk.Objects.Widget#g:method:setClip"), [setCompositeName]("GI.Gtk.Objects.Widget#g:method:setCompositeName"), [setData]("GI.GObject.Objects.Object#g:method:setData"), [setDataFull]("GI.GObject.Objects.Object#g:method:setDataFull"), [setDeviceEnabled]("GI.Gtk.Objects.Widget#g:method:setDeviceEnabled"), [setDeviceEvents]("GI.Gtk.Objects.Widget#g:method:setDeviceEvents"), [setDirection]("GI.Gtk.Objects.Widget#g:method:setDirection"), [setDoubleBuffered]("GI.Gtk.Objects.Widget#g:method:setDoubleBuffered"), [setEvents]("GI.Gtk.Objects.Widget#g:method:setEvents"), [setFocusOnClick]("GI.Gtk.Objects.Widget#g:method:setFocusOnClick"), [setFontMap]("GI.Gtk.Objects.Widget#g:method:setFontMap"), [setFontOptions]("GI.Gtk.Objects.Widget#g:method:setFontOptions"), [setHalign]("GI.Gtk.Objects.Widget#g:method:setHalign"), [setHasTooltip]("GI.Gtk.Objects.Widget#g:method:setHasTooltip"), [setHasWindow]("GI.Gtk.Objects.Widget#g:method:setHasWindow"), [setHexpand]("GI.Gtk.Objects.Widget#g:method:setHexpand"), [setHexpandSet]("GI.Gtk.Objects.Widget#g:method:setHexpandSet"), [setMapped]("GI.Gtk.Objects.Widget#g:method:setMapped"), [setMarginBottom]("GI.Gtk.Objects.Widget#g:method:setMarginBottom"), [setMarginEnd]("GI.Gtk.Objects.Widget#g:method:setMarginEnd"), [setMarginLeft]("GI.Gtk.Objects.Widget#g:method:setMarginLeft"), [setMarginRight]("GI.Gtk.Objects.Widget#g:method:setMarginRight"), [setMarginStart]("GI.Gtk.Objects.Widget#g:method:setMarginStart"), [setMarginTop]("GI.Gtk.Objects.Widget#g:method:setMarginTop"), [setName]("GI.Gtk.Objects.Widget#g:method:setName"), [setNoShowAll]("GI.Gtk.Objects.Widget#g:method:setNoShowAll"), [setOpacity]("GI.Gtk.Objects.Widget#g:method:setOpacity"), [setParent]("GI.Gtk.Objects.Widget#g:method:setParent"), [setParentWindow]("GI.Gtk.Objects.Widget#g:method:setParentWindow"), [setProperty]("GI.GObject.Objects.Object#g:method:setProperty"), [setRealized]("GI.Gtk.Objects.Widget#g:method:setRealized"), [setReceivesDefault]("GI.Gtk.Objects.Widget#g:method:setReceivesDefault"), [setRedrawOnAllocate]("GI.Gtk.Objects.Widget#g:method:setRedrawOnAllocate"), [setSensitive]("GI.Gtk.Objects.Widget#g:method:setSensitive"), [setSizeRequest]("GI.Gtk.Objects.Widget#g:method:setSizeRequest"), [setState]("GI.Gtk.Objects.Widget#g:method:setState"), [setStateFlags]("GI.Gtk.Objects.Widget#g:method:setStateFlags"), [setStyle]("GI.Gtk.Objects.Widget#g:method:setStyle"), [setSupportMultidevice]("GI.Gtk.Objects.Widget#g:method:setSupportMultidevice"), [setTooltipMarkup]("GI.Gtk.Objects.Widget#g:method:setTooltipMarkup"), [setTooltipText]("GI.Gtk.Objects.Widget#g:method:setTooltipText"), [setTooltipWindow]("GI.Gtk.Objects.Widget#g:method:setTooltipWindow"), [setValign]("GI.Gtk.Objects.Widget#g:method:setValign"), [setVexpand]("GI.Gtk.Objects.Widget#g:method:setVexpand"), [setVexpandSet]("GI.Gtk.Objects.Widget#g:method:setVexpandSet"), [setVisible]("GI.Gtk.Objects.Widget#g:method:setVisible"), [setVisual]("GI.Gtk.Objects.Widget#g:method:setVisual"), [setWindow]("GI.Gtk.Objects.Widget#g:method:setWindow").

#if defined(ENABLE_OVERLOADING)
    ResolveWidgetMethod                     ,
#endif

-- ** activate #method:activate#

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


-- ** addAccelerator #method:addAccelerator#

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


-- ** addDeviceEvents #method:addDeviceEvents#

#if defined(ENABLE_OVERLOADING)
    WidgetAddDeviceEventsMethodInfo         ,
#endif
    widgetAddDeviceEvents                   ,


-- ** addEvents #method:addEvents#

#if defined(ENABLE_OVERLOADING)
    WidgetAddEventsMethodInfo               ,
#endif
    widgetAddEvents                         ,


-- ** addMnemonicLabel #method:addMnemonicLabel#

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


-- ** addTickCallback #method:addTickCallback#

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


-- ** canActivateAccel #method:canActivateAccel#

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


-- ** childFocus #method:childFocus#

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


-- ** childNotify #method:childNotify#

#if defined(ENABLE_OVERLOADING)
    WidgetChildNotifyMethodInfo             ,
#endif
    widgetChildNotify                       ,


-- ** classPath #method:classPath#

#if defined(ENABLE_OVERLOADING)
    WidgetClassPathMethodInfo               ,
#endif
    widgetClassPath                         ,


-- ** computeExpand #method:computeExpand#

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


-- ** 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                         ,


-- ** dragBeginWithCoordinates #method:dragBeginWithCoordinates#

#if defined(ENABLE_OVERLOADING)
    WidgetDragBeginWithCoordinatesMethodInfo,
#endif
    widgetDragBeginWithCoordinates          ,


-- ** 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                       ,


-- ** dragDestSetProxy #method:dragDestSetProxy#

#if defined(ENABLE_OVERLOADING)
    WidgetDragDestSetProxyMethodInfo        ,
#endif
    widgetDragDestSetProxy                  ,


-- ** 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             ,


-- ** dragSourceSetIconPixbuf #method:dragSourceSetIconPixbuf#

#if defined(ENABLE_OVERLOADING)
    WidgetDragSourceSetIconPixbufMethodInfo ,
#endif
    widgetDragSourceSetIconPixbuf           ,


-- ** dragSourceSetIconStock #method:dragSourceSetIconStock#

#if defined(ENABLE_OVERLOADING)
    WidgetDragSourceSetIconStockMethodInfo  ,
#endif
    widgetDragSourceSetIconStock            ,


-- ** 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                   ,


-- ** draw #method:draw#

#if defined(ENABLE_OVERLOADING)
    WidgetDrawMethodInfo                    ,
#endif
    widgetDraw                              ,


-- ** ensureStyle #method:ensureStyle#

#if defined(ENABLE_OVERLOADING)
    WidgetEnsureStyleMethodInfo             ,
#endif
    widgetEnsureStyle                       ,


-- ** errorBell #method:errorBell#

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


-- ** event #method:event#

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


-- ** freezeChildNotify #method:freezeChildNotify#

#if defined(ENABLE_OVERLOADING)
    WidgetFreezeChildNotifyMethodInfo       ,
#endif
    widgetFreezeChildNotify                 ,


-- ** 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                ,


-- ** getAllocatedSize #method:getAllocatedSize#

#if defined(ENABLE_OVERLOADING)
    WidgetGetAllocatedSizeMethodInfo        ,
#endif
    widgetGetAllocatedSize                  ,


-- ** 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                       ,


-- ** getAppPaintable #method:getAppPaintable#

#if defined(ENABLE_OVERLOADING)
    WidgetGetAppPaintableMethodInfo         ,
#endif
    widgetGetAppPaintable                   ,


-- ** getCanDefault #method:getCanDefault#

#if defined(ENABLE_OVERLOADING)
    WidgetGetCanDefaultMethodInfo           ,
#endif
    widgetGetCanDefault                     ,


-- ** getCanFocus #method:getCanFocus#

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


-- ** getChildRequisition #method:getChildRequisition#

#if defined(ENABLE_OVERLOADING)
    WidgetGetChildRequisitionMethodInfo     ,
#endif
    widgetGetChildRequisition               ,


-- ** getChildVisible #method:getChildVisible#

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


-- ** getClip #method:getClip#

#if defined(ENABLE_OVERLOADING)
    WidgetGetClipMethodInfo                 ,
#endif
    widgetGetClip                           ,


-- ** getClipboard #method:getClipboard#

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


-- ** getCompositeName #method:getCompositeName#

#if defined(ENABLE_OVERLOADING)
    WidgetGetCompositeNameMethodInfo        ,
#endif
    widgetGetCompositeName                  ,


-- ** getDefaultDirection #method:getDefaultDirection#

    widgetGetDefaultDirection               ,


-- ** getDefaultStyle #method:getDefaultStyle#

    widgetGetDefaultStyle                   ,


-- ** getDeviceEnabled #method:getDeviceEnabled#

#if defined(ENABLE_OVERLOADING)
    WidgetGetDeviceEnabledMethodInfo        ,
#endif
    widgetGetDeviceEnabled                  ,


-- ** getDeviceEvents #method:getDeviceEvents#

#if defined(ENABLE_OVERLOADING)
    WidgetGetDeviceEventsMethodInfo         ,
#endif
    widgetGetDeviceEvents                   ,


-- ** getDirection #method:getDirection#

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


-- ** getDisplay #method:getDisplay#

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


-- ** getDoubleBuffered #method:getDoubleBuffered#

#if defined(ENABLE_OVERLOADING)
    WidgetGetDoubleBufferedMethodInfo       ,
#endif
    widgetGetDoubleBuffered                 ,


-- ** getEvents #method:getEvents#

#if defined(ENABLE_OVERLOADING)
    WidgetGetEventsMethodInfo               ,
#endif
    widgetGetEvents                         ,


-- ** 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                         ,


-- ** getHasTooltip #method:getHasTooltip#

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


-- ** getHasWindow #method:getHasWindow#

#if defined(ENABLE_OVERLOADING)
    WidgetGetHasWindowMethodInfo            ,
#endif
    widgetGetHasWindow                      ,


-- ** getHexpand #method:getHexpand#

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


-- ** getHexpandSet #method:getHexpandSet#

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


-- ** 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                      ,


-- ** getMarginLeft #method:getMarginLeft#

#if defined(ENABLE_OVERLOADING)
    WidgetGetMarginLeftMethodInfo           ,
#endif
    widgetGetMarginLeft                     ,


-- ** getMarginRight #method:getMarginRight#

#if defined(ENABLE_OVERLOADING)
    WidgetGetMarginRightMethodInfo          ,
#endif
    widgetGetMarginRight                    ,


-- ** 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                   ,


-- ** getModifierStyle #method:getModifierStyle#

#if defined(ENABLE_OVERLOADING)
    WidgetGetModifierStyleMethodInfo        ,
#endif
    widgetGetModifierStyle                  ,


-- ** getName #method:getName#

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


-- ** getNoShowAll #method:getNoShowAll#

#if defined(ENABLE_OVERLOADING)
    WidgetGetNoShowAllMethodInfo            ,
#endif
    widgetGetNoShowAll                      ,


-- ** getOpacity #method:getOpacity#

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


-- ** getPangoContext #method:getPangoContext#

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


-- ** getParent #method:getParent#

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


-- ** getParentWindow #method:getParentWindow#

#if defined(ENABLE_OVERLOADING)
    WidgetGetParentWindowMethodInfo         ,
#endif
    widgetGetParentWindow                   ,


-- ** getPath #method:getPath#

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


-- ** getPointer #method:getPointer#

#if defined(ENABLE_OVERLOADING)
    WidgetGetPointerMethodInfo              ,
#endif
    widgetGetPointer                        ,


-- ** getPreferredHeight #method:getPreferredHeight#

#if defined(ENABLE_OVERLOADING)
    WidgetGetPreferredHeightMethodInfo      ,
#endif
    widgetGetPreferredHeight                ,


-- ** getPreferredHeightAndBaselineForWidth #method:getPreferredHeightAndBaselineForWidth#

#if defined(ENABLE_OVERLOADING)
    WidgetGetPreferredHeightAndBaselineForWidthMethodInfo,
#endif
    widgetGetPreferredHeightAndBaselineForWidth,


-- ** getPreferredHeightForWidth #method:getPreferredHeightForWidth#

#if defined(ENABLE_OVERLOADING)
    WidgetGetPreferredHeightForWidthMethodInfo,
#endif
    widgetGetPreferredHeightForWidth        ,


-- ** getPreferredSize #method:getPreferredSize#

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


-- ** getPreferredWidth #method:getPreferredWidth#

#if defined(ENABLE_OVERLOADING)
    WidgetGetPreferredWidthMethodInfo       ,
#endif
    widgetGetPreferredWidth                 ,


-- ** getPreferredWidthForHeight #method:getPreferredWidthForHeight#

#if defined(ENABLE_OVERLOADING)
    WidgetGetPreferredWidthForHeightMethodInfo,
#endif
    widgetGetPreferredWidthForHeight        ,


-- ** 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                    ,


-- ** getRequisition #method:getRequisition#

#if defined(ENABLE_OVERLOADING)
    WidgetGetRequisitionMethodInfo          ,
#endif
    widgetGetRequisition                    ,


-- ** getRootWindow #method:getRootWindow#

#if defined(ENABLE_OVERLOADING)
    WidgetGetRootWindowMethodInfo           ,
#endif
    widgetGetRootWindow                     ,


-- ** getScaleFactor #method:getScaleFactor#

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


-- ** getScreen #method:getScreen#

#if defined(ENABLE_OVERLOADING)
    WidgetGetScreenMethodInfo               ,
#endif
    widgetGetScreen                         ,


-- ** 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                    ,


-- ** getState #method:getState#

#if defined(ENABLE_OVERLOADING)
    WidgetGetStateMethodInfo                ,
#endif
    widgetGetState                          ,


-- ** getStateFlags #method:getStateFlags#

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


-- ** getStyle #method:getStyle#

#if defined(ENABLE_OVERLOADING)
    WidgetGetStyleMethodInfo                ,
#endif
    widgetGetStyle                          ,


-- ** getStyleContext #method:getStyleContext#

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


-- ** getSupportMultidevice #method:getSupportMultidevice#

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


-- ** 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                         ,


-- ** getValignWithBaseline #method:getValignWithBaseline#

#if defined(ENABLE_OVERLOADING)
    WidgetGetValignWithBaselineMethodInfo   ,
#endif
    widgetGetValignWithBaseline             ,


-- ** 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                        ,


-- ** getVisual #method:getVisual#

#if defined(ENABLE_OVERLOADING)
    WidgetGetVisualMethodInfo               ,
#endif
    widgetGetVisual                         ,


-- ** getWindow #method:getWindow#

#if defined(ENABLE_OVERLOADING)
    WidgetGetWindowMethodInfo               ,
#endif
    widgetGetWindow                         ,


-- ** grabAdd #method:grabAdd#

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


-- ** grabDefault #method:grabDefault#

#if defined(ENABLE_OVERLOADING)
    WidgetGrabDefaultMethodInfo             ,
#endif
    widgetGrabDefault                       ,


-- ** 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                           ,


-- ** hasRcStyle #method:hasRcStyle#

#if defined(ENABLE_OVERLOADING)
    WidgetHasRcStyleMethodInfo              ,
#endif
    widgetHasRcStyle                        ,


-- ** hasScreen #method:hasScreen#

#if defined(ENABLE_OVERLOADING)
    WidgetHasScreenMethodInfo               ,
#endif
    widgetHasScreen                         ,


-- ** hasVisibleFocus #method:hasVisibleFocus#

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


-- ** hide #method:hide#

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


-- ** hideOnDelete #method:hideOnDelete#

#if defined(ENABLE_OVERLOADING)
    WidgetHideOnDeleteMethodInfo            ,
#endif
    widgetHideOnDelete                      ,


-- ** 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                 ,


-- ** intersect #method:intersect#

#if defined(ENABLE_OVERLOADING)
    WidgetIntersectMethodInfo               ,
#endif
    widgetIntersect                         ,


-- ** isAncestor #method:isAncestor#

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


-- ** isComposited #method:isComposited#

#if defined(ENABLE_OVERLOADING)
    WidgetIsCompositedMethodInfo            ,
#endif
    widgetIsComposited                      ,


-- ** 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                               ,


-- ** mnemonicActivate #method:mnemonicActivate#

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


-- ** modifyBase #method:modifyBase#

#if defined(ENABLE_OVERLOADING)
    WidgetModifyBaseMethodInfo              ,
#endif
    widgetModifyBase                        ,


-- ** modifyBg #method:modifyBg#

#if defined(ENABLE_OVERLOADING)
    WidgetModifyBgMethodInfo                ,
#endif
    widgetModifyBg                          ,


-- ** modifyCursor #method:modifyCursor#

#if defined(ENABLE_OVERLOADING)
    WidgetModifyCursorMethodInfo            ,
#endif
    widgetModifyCursor                      ,


-- ** modifyFg #method:modifyFg#

#if defined(ENABLE_OVERLOADING)
    WidgetModifyFgMethodInfo                ,
#endif
    widgetModifyFg                          ,


-- ** modifyFont #method:modifyFont#

#if defined(ENABLE_OVERLOADING)
    WidgetModifyFontMethodInfo              ,
#endif
    widgetModifyFont                        ,


-- ** modifyStyle #method:modifyStyle#

#if defined(ENABLE_OVERLOADING)
    WidgetModifyStyleMethodInfo             ,
#endif
    widgetModifyStyle                       ,


-- ** modifyText #method:modifyText#

#if defined(ENABLE_OVERLOADING)
    WidgetModifyTextMethodInfo              ,
#endif
    widgetModifyText                        ,


-- ** overrideBackgroundColor #method:overrideBackgroundColor#

#if defined(ENABLE_OVERLOADING)
    WidgetOverrideBackgroundColorMethodInfo ,
#endif
    widgetOverrideBackgroundColor           ,


-- ** overrideColor #method:overrideColor#

#if defined(ENABLE_OVERLOADING)
    WidgetOverrideColorMethodInfo           ,
#endif
    widgetOverrideColor                     ,


-- ** overrideCursor #method:overrideCursor#

#if defined(ENABLE_OVERLOADING)
    WidgetOverrideCursorMethodInfo          ,
#endif
    widgetOverrideCursor                    ,


-- ** overrideFont #method:overrideFont#

#if defined(ENABLE_OVERLOADING)
    WidgetOverrideFontMethodInfo            ,
#endif
    widgetOverrideFont                      ,


-- ** overrideSymbolicColor #method:overrideSymbolicColor#

#if defined(ENABLE_OVERLOADING)
    WidgetOverrideSymbolicColorMethodInfo   ,
#endif
    widgetOverrideSymbolicColor             ,


-- ** path #method:path#

#if defined(ENABLE_OVERLOADING)
    WidgetPathMethodInfo                    ,
#endif
    widgetPath                              ,


-- ** popCompositeChild #method:popCompositeChild#

    widgetPopCompositeChild                 ,


-- ** pushCompositeChild #method:pushCompositeChild#

    widgetPushCompositeChild                ,


-- ** 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                         ,


-- ** queueDrawArea #method:queueDrawArea#

#if defined(ENABLE_OVERLOADING)
    WidgetQueueDrawAreaMethodInfo           ,
#endif
    widgetQueueDrawArea                     ,


-- ** queueDrawRegion #method:queueDrawRegion#

#if defined(ENABLE_OVERLOADING)
    WidgetQueueDrawRegionMethodInfo         ,
#endif
    widgetQueueDrawRegion                   ,


-- ** 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                           ,


-- ** regionIntersect #method:regionIntersect#

#if defined(ENABLE_OVERLOADING)
    WidgetRegionIntersectMethodInfo         ,
#endif
    widgetRegionIntersect                   ,


-- ** registerWindow #method:registerWindow#

#if defined(ENABLE_OVERLOADING)
    WidgetRegisterWindowMethodInfo          ,
#endif
    widgetRegisterWindow                    ,


-- ** removeAccelerator #method:removeAccelerator#

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


-- ** removeMnemonicLabel #method:removeMnemonicLabel#

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


-- ** removeTickCallback #method:removeTickCallback#

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


-- ** renderIcon #method:renderIcon#

#if defined(ENABLE_OVERLOADING)
    WidgetRenderIconMethodInfo              ,
#endif
    widgetRenderIcon                        ,


-- ** renderIconPixbuf #method:renderIconPixbuf#

#if defined(ENABLE_OVERLOADING)
    WidgetRenderIconPixbufMethodInfo        ,
#endif
    widgetRenderIconPixbuf                  ,


-- ** reparent #method:reparent#

#if defined(ENABLE_OVERLOADING)
    WidgetReparentMethodInfo                ,
#endif
    widgetReparent                          ,


-- ** resetRcStyles #method:resetRcStyles#

#if defined(ENABLE_OVERLOADING)
    WidgetResetRcStylesMethodInfo           ,
#endif
    widgetResetRcStyles                     ,


-- ** resetStyle #method:resetStyle#

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


-- ** sendExpose #method:sendExpose#

#if defined(ENABLE_OVERLOADING)
    WidgetSendExposeMethodInfo              ,
#endif
    widgetSendExpose                        ,


-- ** sendFocusChange #method:sendFocusChange#

#if defined(ENABLE_OVERLOADING)
    WidgetSendFocusChangeMethodInfo         ,
#endif
    widgetSendFocusChange                   ,


-- ** setAccelPath #method:setAccelPath#

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


-- ** setAllocation #method:setAllocation#

#if defined(ENABLE_OVERLOADING)
    WidgetSetAllocationMethodInfo           ,
#endif
    widgetSetAllocation                     ,


-- ** setAppPaintable #method:setAppPaintable#

#if defined(ENABLE_OVERLOADING)
    WidgetSetAppPaintableMethodInfo         ,
#endif
    widgetSetAppPaintable                   ,


-- ** setCanDefault #method:setCanDefault#

#if defined(ENABLE_OVERLOADING)
    WidgetSetCanDefaultMethodInfo           ,
#endif
    widgetSetCanDefault                     ,


-- ** setCanFocus #method:setCanFocus#

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


-- ** setChildVisible #method:setChildVisible#

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


-- ** setClip #method:setClip#

#if defined(ENABLE_OVERLOADING)
    WidgetSetClipMethodInfo                 ,
#endif
    widgetSetClip                           ,


-- ** setCompositeName #method:setCompositeName#

#if defined(ENABLE_OVERLOADING)
    WidgetSetCompositeNameMethodInfo        ,
#endif
    widgetSetCompositeName                  ,


-- ** setDefaultDirection #method:setDefaultDirection#

    widgetSetDefaultDirection               ,


-- ** setDeviceEnabled #method:setDeviceEnabled#

#if defined(ENABLE_OVERLOADING)
    WidgetSetDeviceEnabledMethodInfo        ,
#endif
    widgetSetDeviceEnabled                  ,


-- ** setDeviceEvents #method:setDeviceEvents#

#if defined(ENABLE_OVERLOADING)
    WidgetSetDeviceEventsMethodInfo         ,
#endif
    widgetSetDeviceEvents                   ,


-- ** setDirection #method:setDirection#

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


-- ** setDoubleBuffered #method:setDoubleBuffered#

#if defined(ENABLE_OVERLOADING)
    WidgetSetDoubleBufferedMethodInfo       ,
#endif
    widgetSetDoubleBuffered                 ,


-- ** setEvents #method:setEvents#

#if defined(ENABLE_OVERLOADING)
    WidgetSetEventsMethodInfo               ,
#endif
    widgetSetEvents                         ,


-- ** 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                         ,


-- ** setHasTooltip #method:setHasTooltip#

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


-- ** setHasWindow #method:setHasWindow#

#if defined(ENABLE_OVERLOADING)
    WidgetSetHasWindowMethodInfo            ,
#endif
    widgetSetHasWindow                      ,


-- ** setHexpand #method:setHexpand#

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


-- ** setHexpandSet #method:setHexpandSet#

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


-- ** setMapped #method:setMapped#

#if defined(ENABLE_OVERLOADING)
    WidgetSetMappedMethodInfo               ,
#endif
    widgetSetMapped                         ,


-- ** setMarginBottom #method:setMarginBottom#

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


-- ** setMarginEnd #method:setMarginEnd#

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


-- ** setMarginLeft #method:setMarginLeft#

#if defined(ENABLE_OVERLOADING)
    WidgetSetMarginLeftMethodInfo           ,
#endif
    widgetSetMarginLeft                     ,


-- ** setMarginRight #method:setMarginRight#

#if defined(ENABLE_OVERLOADING)
    WidgetSetMarginRightMethodInfo          ,
#endif
    widgetSetMarginRight                    ,


-- ** 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                           ,


-- ** setNoShowAll #method:setNoShowAll#

#if defined(ENABLE_OVERLOADING)
    WidgetSetNoShowAllMethodInfo            ,
#endif
    widgetSetNoShowAll                      ,


-- ** setOpacity #method:setOpacity#

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


-- ** setParent #method:setParent#

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


-- ** setParentWindow #method:setParentWindow#

#if defined(ENABLE_OVERLOADING)
    WidgetSetParentWindowMethodInfo         ,
#endif
    widgetSetParentWindow                   ,


-- ** setRealized #method:setRealized#

#if defined(ENABLE_OVERLOADING)
    WidgetSetRealizedMethodInfo             ,
#endif
    widgetSetRealized                       ,


-- ** setReceivesDefault #method:setReceivesDefault#

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


-- ** setRedrawOnAllocate #method:setRedrawOnAllocate#

#if defined(ENABLE_OVERLOADING)
    WidgetSetRedrawOnAllocateMethodInfo     ,
#endif
    widgetSetRedrawOnAllocate               ,


-- ** setSensitive #method:setSensitive#

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


-- ** setSizeRequest #method:setSizeRequest#

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


-- ** setState #method:setState#

#if defined(ENABLE_OVERLOADING)
    WidgetSetStateMethodInfo                ,
#endif
    widgetSetState                          ,


-- ** setStateFlags #method:setStateFlags#

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


-- ** setStyle #method:setStyle#

#if defined(ENABLE_OVERLOADING)
    WidgetSetStyleMethodInfo                ,
#endif
    widgetSetStyle                          ,


-- ** setSupportMultidevice #method:setSupportMultidevice#

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


-- ** 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                        ,


-- ** setVisual #method:setVisual#

#if defined(ENABLE_OVERLOADING)
    WidgetSetVisualMethodInfo               ,
#endif
    widgetSetVisual                         ,


-- ** setWindow #method:setWindow#

#if defined(ENABLE_OVERLOADING)
    WidgetSetWindowMethodInfo               ,
#endif
    widgetSetWindow                         ,


-- ** shapeCombineRegion #method:shapeCombineRegion#

#if defined(ENABLE_OVERLOADING)
    WidgetShapeCombineRegionMethodInfo      ,
#endif
    widgetShapeCombineRegion                ,


-- ** show #method:show#

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


-- ** showAll #method:showAll#

#if defined(ENABLE_OVERLOADING)
    WidgetShowAllMethodInfo                 ,
#endif
    widgetShowAll                           ,


-- ** showNow #method:showNow#

#if defined(ENABLE_OVERLOADING)
    WidgetShowNowMethodInfo                 ,
#endif
    widgetShowNow                           ,


-- ** sizeAllocate #method:sizeAllocate#

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


-- ** sizeAllocateWithBaseline #method:sizeAllocateWithBaseline#

#if defined(ENABLE_OVERLOADING)
    WidgetSizeAllocateWithBaselineMethodInfo,
#endif
    widgetSizeAllocateWithBaseline          ,


-- ** sizeRequest #method:sizeRequest#

#if defined(ENABLE_OVERLOADING)
    WidgetSizeRequestMethodInfo             ,
#endif
    widgetSizeRequest                       ,


-- ** styleAttach #method:styleAttach#

#if defined(ENABLE_OVERLOADING)
    WidgetStyleAttachMethodInfo             ,
#endif
    widgetStyleAttach                       ,


-- ** styleGetProperty #method:styleGetProperty#

#if defined(ENABLE_OVERLOADING)
    WidgetStyleGetPropertyMethodInfo        ,
#endif
    widgetStyleGetProperty                  ,


-- ** thawChildNotify #method:thawChildNotify#

#if defined(ENABLE_OVERLOADING)
    WidgetThawChildNotifyMethodInfo         ,
#endif
    widgetThawChildNotify                   ,


-- ** 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                         ,


-- ** unregisterWindow #method:unregisterWindow#

#if defined(ENABLE_OVERLOADING)
    WidgetUnregisterWindowMethodInfo        ,
#endif
    widgetUnregisterWindow                  ,


-- ** unsetStateFlags #method:unsetStateFlags#

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




 -- * Properties


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

#if defined(ENABLE_OVERLOADING)
    WidgetAppPaintablePropertyInfo          ,
#endif
    constructWidgetAppPaintable             ,
    getWidgetAppPaintable                   ,
    setWidgetAppPaintable                   ,
#if defined(ENABLE_OVERLOADING)
    widgetAppPaintable                      ,
#endif


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

#if defined(ENABLE_OVERLOADING)
    WidgetCanDefaultPropertyInfo            ,
#endif
    constructWidgetCanDefault               ,
    getWidgetCanDefault                     ,
    setWidgetCanDefault                     ,
#if defined(ENABLE_OVERLOADING)
    widgetCanDefault                        ,
#endif


-- ** 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


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

#if defined(ENABLE_OVERLOADING)
    WidgetCompositeChildPropertyInfo        ,
#endif
    getWidgetCompositeChild                 ,
#if defined(ENABLE_OVERLOADING)
    widgetCompositeChild                    ,
#endif


-- ** doubleBuffered #attr:doubleBuffered#
-- | Whether the widget is double buffered.
-- 
-- /Since: 2.18/

#if defined(ENABLE_OVERLOADING)
    WidgetDoubleBufferedPropertyInfo        ,
#endif
    constructWidgetDoubleBuffered           ,
    getWidgetDoubleBuffered                 ,
    setWidgetDoubleBuffered                 ,
#if defined(ENABLE_OVERLOADING)
    widgetDoubleBuffered                    ,
#endif


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

#if defined(ENABLE_OVERLOADING)
    WidgetEventsPropertyInfo                ,
#endif
    constructWidgetEvents                   ,
    getWidgetEvents                         ,
    setWidgetEvents                         ,
#if defined(ENABLE_OVERLOADING)
    widgetEvents                            ,
#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/@
-- 
-- /Since: 3.0/

#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.
-- 
-- /Since: 3.20/

#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'
-- 
-- /Since: 3.0/

#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
    constructWidgetHasDefault               ,
    getWidgetHasDefault                     ,
    setWidgetHasDefault                     ,


-- ** 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#g: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#g:signal:queryTooltip") to determine
-- whether it will provide a tooltip or not.
-- 
-- Note that setting this property to 'P.True' for the first time will change
-- the event masks of the GdkWindows of this widget to include leave-notify
-- and motion-notify events.  This cannot and will not be undone when the
-- property is set to 'P.False' again.
-- 
-- /Since: 2.12/

#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'.
-- 
-- /Since: 3.0/

#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'.
-- 
-- /Since: 3.0/

#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                        ,


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

#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.
-- 
-- /Since: 3.0/

#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.
-- 
-- /Since: 3.12/

#if defined(ENABLE_OVERLOADING)
    WidgetMarginEndPropertyInfo             ,
#endif
    constructWidgetMarginEnd                ,
    getWidgetMarginEnd                      ,
    setWidgetMarginEnd                      ,
#if defined(ENABLE_OVERLOADING)
    widgetMarginEnd                         ,
#endif


-- ** marginLeft #attr:marginLeft#
-- | Margin on left side of widget.
-- 
-- This property adds margin outside of the widget\'s normal size
-- request, the margin will be added in addition to the size from
-- 'GI.Gtk.Objects.Widget.widgetSetSizeRequest' for example.
-- 
-- /Since: 3.0/

#if defined(ENABLE_OVERLOADING)
    WidgetMarginLeftPropertyInfo            ,
#endif
    constructWidgetMarginLeft               ,
    getWidgetMarginLeft                     ,
    setWidgetMarginLeft                     ,
#if defined(ENABLE_OVERLOADING)
    widgetMarginLeft                        ,
#endif


-- ** marginRight #attr:marginRight#
-- | Margin on right side of widget.
-- 
-- This property adds margin outside of the widget\'s normal size
-- request, the margin will be added in addition to the size from
-- 'GI.Gtk.Objects.Widget.widgetSetSizeRequest' for example.
-- 
-- /Since: 3.0/

#if defined(ENABLE_OVERLOADING)
    WidgetMarginRightPropertyInfo           ,
#endif
    constructWidgetMarginRight              ,
    getWidgetMarginRight                    ,
    setWidgetMarginRight                    ,
#if defined(ENABLE_OVERLOADING)
    widgetMarginRight                       ,
#endif


-- ** marginStart #attr:marginStart#
-- | Margin on start of widget, horizontally. This property supports
-- left-to-right and right-to-left text directions.
-- 
-- This property adds margin outside of the widget\'s normal size
-- request, the margin will be added in addition to the size from
-- 'GI.Gtk.Objects.Widget.widgetSetSizeRequest' for example.
-- 
-- /Since: 3.12/

#if 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.
-- 
-- /Since: 3.0/

#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


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

#if defined(ENABLE_OVERLOADING)
    WidgetNoShowAllPropertyInfo             ,
#endif
    constructWidgetNoShowAll                ,
    getWidgetNoShowAll                      ,
    setWidgetNoShowAll                      ,
#if defined(ENABLE_OVERLOADING)
    widgetNoShowAll                         ,
#endif


-- ** opacity #attr:opacity#
-- | The requested opacity of the widget. See 'GI.Gtk.Objects.Widget.widgetSetOpacity' for
-- more details about window opacity.
-- 
-- Before 3.8 this was only available in GtkWindow
-- 
-- /Since: 3.8/

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


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

#if defined(ENABLE_OVERLOADING)
    WidgetParentPropertyInfo                ,
#endif
    clearWidgetParent                       ,
    constructWidgetParent                   ,
    getWidgetParent                         ,
    setWidgetParent                         ,
#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


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

#if 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


-- ** style #attr:style#
-- | The style of the widget, which contains information about how it will look (colors, etc).

#if defined(ENABLE_OVERLOADING)
    WidgetStylePropertyInfo                 ,
#endif
    clearWidgetStyle                        ,
    constructWidgetStyle                    ,
    getWidgetStyle                          ,
    setWidgetStyle                          ,
#if defined(ENABLE_OVERLOADING)
    widgetStyle                             ,
#endif


-- ** tooltipMarkup #attr:tooltipMarkup#
-- | Sets the text of tooltip to be the given string, which is marked up
-- with the [Pango text markup language][PangoMarkupFormat].
-- Also see 'GI.Gtk.Objects.Tooltip.tooltipSetMarkup'.
-- 
-- This is a convenience property which will take care of getting the
-- tooltip shown if the given string is not '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#g: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.
-- 
-- /Since: 2.12/

#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#g: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.
-- 
-- /Since: 2.12/

#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'
-- 
-- /Since: 3.0/

#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'.
-- 
-- /Since: 3.0/

#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'.
-- 
-- /Since: 3.0/

#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


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

#if defined(ENABLE_OVERLOADING)
    WidgetWindowPropertyInfo                ,
#endif
    getWidgetWindow                         ,
#if defined(ENABLE_OVERLOADING)
    widgetWindow                            ,
#endif




 -- * Signals


-- ** accelClosuresChanged #signal:accelClosuresChanged#

    WidgetAccelClosuresChangedCallback      ,
#if defined(ENABLE_OVERLOADING)
    WidgetAccelClosuresChangedSignalInfo    ,
#endif
    afterWidgetAccelClosuresChanged         ,
    onWidgetAccelClosuresChanged            ,


-- ** buttonPressEvent #signal:buttonPressEvent#

    WidgetButtonPressEventCallback          ,
#if defined(ENABLE_OVERLOADING)
    WidgetButtonPressEventSignalInfo        ,
#endif
    afterWidgetButtonPressEvent             ,
    onWidgetButtonPressEvent                ,


-- ** buttonReleaseEvent #signal:buttonReleaseEvent#

    WidgetButtonReleaseEventCallback        ,
#if defined(ENABLE_OVERLOADING)
    WidgetButtonReleaseEventSignalInfo      ,
#endif
    afterWidgetButtonReleaseEvent           ,
    onWidgetButtonReleaseEvent              ,


-- ** canActivateAccel #signal:canActivateAccel#

    WidgetCanActivateAccelCallback          ,
#if defined(ENABLE_OVERLOADING)
    WidgetCanActivateAccelSignalInfo        ,
#endif
    afterWidgetCanActivateAccel             ,
    onWidgetCanActivateAccel                ,


-- ** childNotify #signal:childNotify#

    WidgetChildNotifyCallback               ,
#if defined(ENABLE_OVERLOADING)
    WidgetChildNotifySignalInfo             ,
#endif
    afterWidgetChildNotify                  ,
    onWidgetChildNotify                     ,


-- ** compositedChanged #signal:compositedChanged#

    WidgetCompositedChangedCallback         ,
#if defined(ENABLE_OVERLOADING)
    WidgetCompositedChangedSignalInfo       ,
#endif
    afterWidgetCompositedChanged            ,
    onWidgetCompositedChanged               ,


-- ** configureEvent #signal:configureEvent#

    WidgetConfigureEventCallback            ,
#if defined(ENABLE_OVERLOADING)
    WidgetConfigureEventSignalInfo          ,
#endif
    afterWidgetConfigureEvent               ,
    onWidgetConfigureEvent                  ,


-- ** damageEvent #signal:damageEvent#

    WidgetDamageEventCallback               ,
#if defined(ENABLE_OVERLOADING)
    WidgetDamageEventSignalInfo             ,
#endif
    afterWidgetDamageEvent                  ,
    onWidgetDamageEvent                     ,


-- ** deleteEvent #signal:deleteEvent#

    WidgetDeleteEventCallback               ,
#if defined(ENABLE_OVERLOADING)
    WidgetDeleteEventSignalInfo             ,
#endif
    afterWidgetDeleteEvent                  ,
    onWidgetDeleteEvent                     ,


-- ** destroy #signal:destroy#

    WidgetDestroyCallback                   ,
#if defined(ENABLE_OVERLOADING)
    WidgetDestroySignalInfo                 ,
#endif
    afterWidgetDestroy                      ,
    onWidgetDestroy                         ,


-- ** destroyEvent #signal:destroyEvent#

    WidgetDestroyEventCallback              ,
#if defined(ENABLE_OVERLOADING)
    WidgetDestroyEventSignalInfo            ,
#endif
    afterWidgetDestroyEvent                 ,
    onWidgetDestroyEvent                    ,


-- ** directionChanged #signal:directionChanged#

    WidgetDirectionChangedCallback          ,
#if defined(ENABLE_OVERLOADING)
    WidgetDirectionChangedSignalInfo        ,
#endif
    afterWidgetDirectionChanged             ,
    onWidgetDirectionChanged                ,


-- ** dragBegin #signal:dragBegin#

    WidgetDragBeginCallback                 ,
#if defined(ENABLE_OVERLOADING)
    WidgetDragBeginSignalInfo               ,
#endif
    afterWidgetDragBegin                    ,
    onWidgetDragBegin                       ,


-- ** dragDataDelete #signal:dragDataDelete#

    WidgetDragDataDeleteCallback            ,
#if defined(ENABLE_OVERLOADING)
    WidgetDragDataDeleteSignalInfo          ,
#endif
    afterWidgetDragDataDelete               ,
    onWidgetDragDataDelete                  ,


-- ** dragDataGet #signal:dragDataGet#

    WidgetDragDataGetCallback               ,
#if defined(ENABLE_OVERLOADING)
    WidgetDragDataGetSignalInfo             ,
#endif
    afterWidgetDragDataGet                  ,
    onWidgetDragDataGet                     ,


-- ** dragDataReceived #signal:dragDataReceived#

    WidgetDragDataReceivedCallback          ,
#if defined(ENABLE_OVERLOADING)
    WidgetDragDataReceivedSignalInfo        ,
#endif
    afterWidgetDragDataReceived             ,
    onWidgetDragDataReceived                ,


-- ** dragDrop #signal:dragDrop#

    WidgetDragDropCallback                  ,
#if defined(ENABLE_OVERLOADING)
    WidgetDragDropSignalInfo                ,
#endif
    afterWidgetDragDrop                     ,
    onWidgetDragDrop                        ,


-- ** dragEnd #signal:dragEnd#

    WidgetDragEndCallback                   ,
#if defined(ENABLE_OVERLOADING)
    WidgetDragEndSignalInfo                 ,
#endif
    afterWidgetDragEnd                      ,
    onWidgetDragEnd                         ,


-- ** dragFailed #signal:dragFailed#

    WidgetDragFailedCallback                ,
#if defined(ENABLE_OVERLOADING)
    WidgetDragFailedSignalInfo              ,
#endif
    afterWidgetDragFailed                   ,
    onWidgetDragFailed                      ,


-- ** dragLeave #signal:dragLeave#

    WidgetDragLeaveCallback                 ,
#if defined(ENABLE_OVERLOADING)
    WidgetDragLeaveSignalInfo               ,
#endif
    afterWidgetDragLeave                    ,
    onWidgetDragLeave                       ,


-- ** dragMotion #signal:dragMotion#

    WidgetDragMotionCallback                ,
#if defined(ENABLE_OVERLOADING)
    WidgetDragMotionSignalInfo              ,
#endif
    afterWidgetDragMotion                   ,
    onWidgetDragMotion                      ,


-- ** draw #signal:draw#

    WidgetDrawCallback                      ,
#if defined(ENABLE_OVERLOADING)
    WidgetDrawSignalInfo                    ,
#endif
    afterWidgetDraw                         ,
    onWidgetDraw                            ,


-- ** enterNotifyEvent #signal:enterNotifyEvent#

    WidgetEnterNotifyEventCallback          ,
#if defined(ENABLE_OVERLOADING)
    WidgetEnterNotifyEventSignalInfo        ,
#endif
    afterWidgetEnterNotifyEvent             ,
    onWidgetEnterNotifyEvent                ,


-- ** event #signal:event#

    WidgetEventCallback                     ,
#if defined(ENABLE_OVERLOADING)
    WidgetEventSignalInfo                   ,
#endif
    afterWidgetEvent                        ,
    onWidgetEvent                           ,


-- ** eventAfter #signal:eventAfter#

    WidgetEventAfterCallback                ,
#if defined(ENABLE_OVERLOADING)
    WidgetEventAfterSignalInfo              ,
#endif
    afterWidgetEventAfter                   ,
    onWidgetEventAfter                      ,


-- ** focus #signal:focus#

    WidgetFocusCallback                     ,
#if defined(ENABLE_OVERLOADING)
    WidgetFocusSignalInfo                   ,
#endif
    afterWidgetFocus                        ,
    onWidgetFocus                           ,


-- ** focusInEvent #signal:focusInEvent#

    WidgetFocusInEventCallback              ,
#if defined(ENABLE_OVERLOADING)
    WidgetFocusInEventSignalInfo            ,
#endif
    afterWidgetFocusInEvent                 ,
    onWidgetFocusInEvent                    ,


-- ** focusOutEvent #signal:focusOutEvent#

    WidgetFocusOutEventCallback             ,
#if defined(ENABLE_OVERLOADING)
    WidgetFocusOutEventSignalInfo           ,
#endif
    afterWidgetFocusOutEvent                ,
    onWidgetFocusOutEvent                   ,


-- ** grabBrokenEvent #signal:grabBrokenEvent#

    WidgetGrabBrokenEventCallback           ,
#if defined(ENABLE_OVERLOADING)
    WidgetGrabBrokenEventSignalInfo         ,
#endif
    afterWidgetGrabBrokenEvent              ,
    onWidgetGrabBrokenEvent                 ,


-- ** grabFocus #signal:grabFocus#

    WidgetGrabFocusCallback                 ,
#if defined(ENABLE_OVERLOADING)
    WidgetGrabFocusSignalInfo               ,
#endif
    afterWidgetGrabFocus                    ,
    onWidgetGrabFocus                       ,


-- ** grabNotify #signal:grabNotify#

    WidgetGrabNotifyCallback                ,
#if defined(ENABLE_OVERLOADING)
    WidgetGrabNotifySignalInfo              ,
#endif
    afterWidgetGrabNotify                   ,
    onWidgetGrabNotify                      ,


-- ** hide #signal:hide#

    WidgetHideCallback                      ,
#if defined(ENABLE_OVERLOADING)
    WidgetHideSignalInfo                    ,
#endif
    afterWidgetHide                         ,
    onWidgetHide                            ,


-- ** hierarchyChanged #signal:hierarchyChanged#

    WidgetHierarchyChangedCallback          ,
#if defined(ENABLE_OVERLOADING)
    WidgetHierarchyChangedSignalInfo        ,
#endif
    afterWidgetHierarchyChanged             ,
    onWidgetHierarchyChanged                ,


-- ** keyPressEvent #signal:keyPressEvent#

    WidgetKeyPressEventCallback             ,
#if defined(ENABLE_OVERLOADING)
    WidgetKeyPressEventSignalInfo           ,
#endif
    afterWidgetKeyPressEvent                ,
    onWidgetKeyPressEvent                   ,


-- ** keyReleaseEvent #signal:keyReleaseEvent#

    WidgetKeyReleaseEventCallback           ,
#if defined(ENABLE_OVERLOADING)
    WidgetKeyReleaseEventSignalInfo         ,
#endif
    afterWidgetKeyReleaseEvent              ,
    onWidgetKeyReleaseEvent                 ,


-- ** keynavFailed #signal:keynavFailed#

    WidgetKeynavFailedCallback              ,
#if defined(ENABLE_OVERLOADING)
    WidgetKeynavFailedSignalInfo            ,
#endif
    afterWidgetKeynavFailed                 ,
    onWidgetKeynavFailed                    ,


-- ** leaveNotifyEvent #signal:leaveNotifyEvent#

    WidgetLeaveNotifyEventCallback          ,
#if defined(ENABLE_OVERLOADING)
    WidgetLeaveNotifyEventSignalInfo        ,
#endif
    afterWidgetLeaveNotifyEvent             ,
    onWidgetLeaveNotifyEvent                ,


-- ** map #signal:map#

    WidgetMapCallback                       ,
#if defined(ENABLE_OVERLOADING)
    WidgetMapSignalInfo                     ,
#endif
    afterWidgetMap                          ,
    onWidgetMap                             ,


-- ** mapEvent #signal:mapEvent#

    WidgetMapEventCallback                  ,
#if defined(ENABLE_OVERLOADING)
    WidgetMapEventSignalInfo                ,
#endif
    afterWidgetMapEvent                     ,
    onWidgetMapEvent                        ,


-- ** mnemonicActivate #signal:mnemonicActivate#

    WidgetMnemonicActivateCallback          ,
#if defined(ENABLE_OVERLOADING)
    WidgetMnemonicActivateSignalInfo        ,
#endif
    afterWidgetMnemonicActivate             ,
    onWidgetMnemonicActivate                ,


-- ** motionNotifyEvent #signal:motionNotifyEvent#

    WidgetMotionNotifyEventCallback         ,
#if defined(ENABLE_OVERLOADING)
    WidgetMotionNotifyEventSignalInfo       ,
#endif
    afterWidgetMotionNotifyEvent            ,
    onWidgetMotionNotifyEvent               ,


-- ** moveFocus #signal:moveFocus#

    WidgetMoveFocusCallback                 ,
#if defined(ENABLE_OVERLOADING)
    WidgetMoveFocusSignalInfo               ,
#endif
    afterWidgetMoveFocus                    ,
    onWidgetMoveFocus                       ,


-- ** parentSet #signal:parentSet#

    WidgetParentSetCallback                 ,
#if defined(ENABLE_OVERLOADING)
    WidgetParentSetSignalInfo               ,
#endif
    afterWidgetParentSet                    ,
    onWidgetParentSet                       ,


-- ** popupMenu #signal:popupMenu#

    WidgetPopupMenuCallback                 ,
#if defined(ENABLE_OVERLOADING)
    WidgetPopupMenuSignalInfo               ,
#endif
    afterWidgetPopupMenu                    ,
    onWidgetPopupMenu                       ,


-- ** propertyNotifyEvent #signal:propertyNotifyEvent#

    WidgetPropertyNotifyEventCallback       ,
#if defined(ENABLE_OVERLOADING)
    WidgetPropertyNotifyEventSignalInfo     ,
#endif
    afterWidgetPropertyNotifyEvent          ,
    onWidgetPropertyNotifyEvent             ,


-- ** proximityInEvent #signal:proximityInEvent#

    WidgetProximityInEventCallback          ,
#if defined(ENABLE_OVERLOADING)
    WidgetProximityInEventSignalInfo        ,
#endif
    afterWidgetProximityInEvent             ,
    onWidgetProximityInEvent                ,


-- ** proximityOutEvent #signal:proximityOutEvent#

    WidgetProximityOutEventCallback         ,
#if defined(ENABLE_OVERLOADING)
    WidgetProximityOutEventSignalInfo       ,
#endif
    afterWidgetProximityOutEvent            ,
    onWidgetProximityOutEvent               ,


-- ** queryTooltip #signal:queryTooltip#

    WidgetQueryTooltipCallback              ,
#if defined(ENABLE_OVERLOADING)
    WidgetQueryTooltipSignalInfo            ,
#endif
    afterWidgetQueryTooltip                 ,
    onWidgetQueryTooltip                    ,


-- ** realize #signal:realize#

    WidgetRealizeCallback                   ,
#if defined(ENABLE_OVERLOADING)
    WidgetRealizeSignalInfo                 ,
#endif
    afterWidgetRealize                      ,
    onWidgetRealize                         ,


-- ** screenChanged #signal:screenChanged#

    WidgetScreenChangedCallback             ,
#if defined(ENABLE_OVERLOADING)
    WidgetScreenChangedSignalInfo           ,
#endif
    afterWidgetScreenChanged                ,
    onWidgetScreenChanged                   ,


-- ** scrollEvent #signal:scrollEvent#

    WidgetScrollEventCallback               ,
#if defined(ENABLE_OVERLOADING)
    WidgetScrollEventSignalInfo             ,
#endif
    afterWidgetScrollEvent                  ,
    onWidgetScrollEvent                     ,


-- ** selectionClearEvent #signal:selectionClearEvent#

    WidgetSelectionClearEventCallback       ,
#if defined(ENABLE_OVERLOADING)
    WidgetSelectionClearEventSignalInfo     ,
#endif
    afterWidgetSelectionClearEvent          ,
    onWidgetSelectionClearEvent             ,


-- ** selectionGet #signal:selectionGet#

    WidgetSelectionGetCallback              ,
#if defined(ENABLE_OVERLOADING)
    WidgetSelectionGetSignalInfo            ,
#endif
    afterWidgetSelectionGet                 ,
    onWidgetSelectionGet                    ,


-- ** selectionNotifyEvent #signal:selectionNotifyEvent#

    WidgetSelectionNotifyEventCallback      ,
#if defined(ENABLE_OVERLOADING)
    WidgetSelectionNotifyEventSignalInfo    ,
#endif
    afterWidgetSelectionNotifyEvent         ,
    onWidgetSelectionNotifyEvent            ,


-- ** selectionReceived #signal:selectionReceived#

    WidgetSelectionReceivedCallback         ,
#if defined(ENABLE_OVERLOADING)
    WidgetSelectionReceivedSignalInfo       ,
#endif
    afterWidgetSelectionReceived            ,
    onWidgetSelectionReceived               ,


-- ** selectionRequestEvent #signal:selectionRequestEvent#

    WidgetSelectionRequestEventCallback     ,
#if defined(ENABLE_OVERLOADING)
    WidgetSelectionRequestEventSignalInfo   ,
#endif
    afterWidgetSelectionRequestEvent        ,
    onWidgetSelectionRequestEvent           ,


-- ** show #signal:show#

    WidgetShowCallback                      ,
#if defined(ENABLE_OVERLOADING)
    WidgetShowSignalInfo                    ,
#endif
    afterWidgetShow                         ,
    onWidgetShow                            ,


-- ** showHelp #signal:showHelp#

    WidgetShowHelpCallback                  ,
#if defined(ENABLE_OVERLOADING)
    WidgetShowHelpSignalInfo                ,
#endif
    afterWidgetShowHelp                     ,
    onWidgetShowHelp                        ,


-- ** sizeAllocate #signal:sizeAllocate#

    WidgetSizeAllocateCallback              ,
#if defined(ENABLE_OVERLOADING)
    WidgetSizeAllocateSignalInfo            ,
#endif
    afterWidgetSizeAllocate                 ,
    onWidgetSizeAllocate                    ,


-- ** stateChanged #signal:stateChanged#

    WidgetStateChangedCallback              ,
#if defined(ENABLE_OVERLOADING)
    WidgetStateChangedSignalInfo            ,
#endif
    afterWidgetStateChanged                 ,
    onWidgetStateChanged                    ,


-- ** stateFlagsChanged #signal:stateFlagsChanged#

    WidgetStateFlagsChangedCallback         ,
#if defined(ENABLE_OVERLOADING)
    WidgetStateFlagsChangedSignalInfo       ,
#endif
    afterWidgetStateFlagsChanged            ,
    onWidgetStateFlagsChanged               ,


-- ** styleSet #signal:styleSet#

    WidgetStyleSetCallback                  ,
#if defined(ENABLE_OVERLOADING)
    WidgetStyleSetSignalInfo                ,
#endif
    afterWidgetStyleSet                     ,
    onWidgetStyleSet                        ,


-- ** styleUpdated #signal:styleUpdated#

    WidgetStyleUpdatedCallback              ,
#if defined(ENABLE_OVERLOADING)
    WidgetStyleUpdatedSignalInfo            ,
#endif
    afterWidgetStyleUpdated                 ,
    onWidgetStyleUpdated                    ,


-- ** touchEvent #signal:touchEvent#

    WidgetTouchEventCallback                ,
#if defined(ENABLE_OVERLOADING)
    WidgetTouchEventSignalInfo              ,
#endif
    afterWidgetTouchEvent                   ,
    onWidgetTouchEvent                      ,


-- ** unmap #signal:unmap#

    WidgetUnmapCallback                     ,
#if defined(ENABLE_OVERLOADING)
    WidgetUnmapSignalInfo                   ,
#endif
    afterWidgetUnmap                        ,
    onWidgetUnmap                           ,


-- ** unmapEvent #signal:unmapEvent#

    WidgetUnmapEventCallback                ,
#if defined(ENABLE_OVERLOADING)
    WidgetUnmapEventSignalInfo              ,
#endif
    afterWidgetUnmapEvent                   ,
    onWidgetUnmapEvent                      ,


-- ** unrealize #signal:unrealize#

    WidgetUnrealizeCallback                 ,
#if defined(ENABLE_OVERLOADING)
    WidgetUnrealizeSignalInfo               ,
#endif
    afterWidgetUnrealize                    ,
    onWidgetUnrealize                       ,


-- ** visibilityNotifyEvent #signal:visibilityNotifyEvent#

    WidgetVisibilityNotifyEventCallback     ,
#if defined(ENABLE_OVERLOADING)
    WidgetVisibilityNotifyEventSignalInfo   ,
#endif
    afterWidgetVisibilityNotifyEvent        ,
    onWidgetVisibilityNotifyEvent           ,


-- ** windowStateEvent #signal:windowStateEvent#

    WidgetWindowStateEventCallback          ,
#if defined(ENABLE_OVERLOADING)
    WidgetWindowStateEventSignalInfo        ,
#endif
    afterWidgetWindowStateEvent             ,
    onWidgetWindowStateEvent                ,




    ) 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.BasicTypes as B.Types
import qualified Data.GI.Base.ManagedPtr as B.ManagedPtr
import qualified Data.GI.Base.GArray as B.GArray
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 Control.Monad.IO.Class as MIO
import qualified Data.Coerce as Coerce
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 GHC.Records as R

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

-- | Memory-managed wrapper type.
newtype Widget = Widget (SP.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)

instance SP.ManagedPtrNewtype Widget where
    toManagedPtr :: Widget -> ManagedPtr Widget
toManagedPtr (Widget ManagedPtr Widget
p) = ManagedPtr Widget
p

foreign import ccall "gtk_widget_get_type"
    c_gtk_widget_get_type :: IO B.Types.GType

instance B.Types.TypedObject Widget where
    glibType :: IO GType
glibType = IO GType
c_gtk_widget_get_type

instance B.Types.GObject Widget

-- | Type class for types which can be safely cast to `Widget`, for instance with `toWidget`.
class (SP.GObject o, O.IsDescendantOf Widget o) => IsWidget o
instance (SP.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 :: (MIO.MonadIO m, IsWidget o) => o -> m Widget
toWidget :: forall (m :: * -> *) o. (MonadIO m, IsWidget o) => o -> m Widget
toWidget = IO Widget -> m Widget
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.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, ManagedPtrNewtype o, TypedObject o,
 ManagedPtrNewtype o', TypedObject o') =>
(ManagedPtr o' -> o') -> o -> IO o'
B.ManagedPtr.unsafeCastTo ManagedPtr Widget -> Widget
Widget

-- | Convert 'Widget' to and from 'Data.GI.Base.GValue.GValue'. See 'Data.GI.Base.GValue.toGValue' and 'Data.GI.Base.GValue.fromGValue'.
instance B.GValue.IsGValue (Maybe Widget) where
    gvalueGType_ :: IO GType
gvalueGType_ = IO GType
c_gtk_widget_get_type
    gvalueSet_ :: Ptr GValue -> Maybe Widget -> IO ()
gvalueSet_ Ptr GValue
gv Maybe Widget
P.Nothing = Ptr GValue -> Ptr Widget -> IO ()
forall a. GObject a => Ptr GValue -> Ptr a -> IO ()
B.GValue.set_object Ptr GValue
gv (Ptr Widget
forall a. Ptr a
FP.nullPtr :: FP.Ptr Widget)
    gvalueSet_ Ptr GValue
gv (P.Just Widget
obj) = Widget -> (Ptr Widget -> IO ()) -> IO ()
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
B.ManagedPtr.withManagedPtr Widget
obj (Ptr GValue -> Ptr Widget -> IO ()
forall a. GObject a => Ptr GValue -> Ptr a -> IO ()
B.GValue.set_object Ptr GValue
gv)
    gvalueGet_ :: Ptr GValue -> IO (Maybe Widget)
gvalueGet_ Ptr GValue
gv = do
        Ptr Widget
ptr <- Ptr GValue -> IO (Ptr Widget)
forall a. GObject a => Ptr GValue -> IO (Ptr a)
B.GValue.get_object Ptr GValue
gv :: IO (FP.Ptr Widget)
        if Ptr Widget
ptr Ptr Widget -> Ptr Widget -> Bool
forall a. Eq a => a -> a -> Bool
/= Ptr Widget
forall a. Ptr a
FP.nullPtr
        then Widget -> Maybe Widget
forall a. a -> Maybe a
P.Just (Widget -> Maybe Widget) -> IO Widget -> IO (Maybe Widget)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (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
        else Maybe Widget -> IO (Maybe Widget)
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe Widget
forall a. Maybe a
P.Nothing
        
    

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

instance (info ~ ResolveWidgetMethod t Widget, O.OverloadedMethod 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

#if MIN_VERSION_base(4,13,0)
instance (info ~ ResolveWidgetMethod t Widget, O.OverloadedMethod info Widget p, R.HasField t Widget p) => R.HasField t Widget p where
    getField = O.overloadedMethod @info

#endif

instance (info ~ ResolveWidgetMethod t Widget, O.OverloadedMethodInfo info Widget) => OL.IsLabel t (O.MethodProxy info Widget) where
#if MIN_VERSION_base(4,10,0)
    fromLabel = O.MethodProxy
#else
    fromLabel _ = O.MethodProxy
#endif

#endif

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

type C_WidgetAccelClosuresChangedCallback =
    Ptr Widget ->                           -- 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_WidgetAccelClosuresChangedCallback :: 
    GObject a => (a -> WidgetAccelClosuresChangedCallback) ->
    C_WidgetAccelClosuresChangedCallback
wrap_WidgetAccelClosuresChangedCallback :: forall a.
GObject a =>
(a -> IO ()) -> C_WidgetAccelClosuresChangedCallback
wrap_WidgetAccelClosuresChangedCallback a -> IO ()
gi'cb Ptr Widget
gi'selfPtr Ptr ()
_ = do
    Ptr Widget -> (Widget -> IO ()) -> IO ()
forall a b.
(HasCallStack, ManagedPtrNewtype a) =>
Ptr a -> (a -> IO b) -> IO b
B.ManagedPtr.withTransient Ptr Widget
gi'selfPtr ((Widget -> IO ()) -> IO ()) -> (Widget -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Widget
gi'self -> a -> IO ()
gi'cb (Widget -> a
Coerce.coerce Widget
gi'self) 


-- | 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 -> ((?self :: a) => WidgetAccelClosuresChangedCallback) -> m SignalHandlerId
onWidgetAccelClosuresChanged :: forall a (m :: * -> *).
(IsWidget a, MonadIO m) =>
a -> ((?self::a) => IO ()) -> m SignalHandlerId
onWidgetAccelClosuresChanged a
obj (?self::a) => 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 wrapped :: a -> IO ()
wrapped a
self = let ?self = a
?self::a
self in IO ()
(?self::a) => IO ()
cb
    let wrapped' :: C_WidgetAccelClosuresChangedCallback
wrapped' = (a -> IO ()) -> C_WidgetAccelClosuresChangedCallback
forall a.
GObject a =>
(a -> IO ()) -> C_WidgetAccelClosuresChangedCallback
wrap_WidgetAccelClosuresChangedCallback a -> IO ()
wrapped
    FunPtr C_WidgetAccelClosuresChangedCallback
wrapped'' <- C_WidgetAccelClosuresChangedCallback
-> IO (FunPtr C_WidgetAccelClosuresChangedCallback)
mk_WidgetAccelClosuresChangedCallback C_WidgetAccelClosuresChangedCallback
wrapped'
    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 Text
"accel-closures-changed" FunPtr C_WidgetAccelClosuresChangedCallback
wrapped'' 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
-- @
-- 
-- 
-- 
-- By default the object invoking the signal is not passed to the callback.
-- If you need to access it, you can use the implit @?self@ parameter.
-- Note that this requires activating the @ImplicitParams@ GHC extension.
-- 
afterWidgetAccelClosuresChanged :: (IsWidget a, MonadIO m) => a -> ((?self :: a) => WidgetAccelClosuresChangedCallback) -> m SignalHandlerId
afterWidgetAccelClosuresChanged :: forall a (m :: * -> *).
(IsWidget a, MonadIO m) =>
a -> ((?self::a) => IO ()) -> m SignalHandlerId
afterWidgetAccelClosuresChanged a
obj (?self::a) => 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 wrapped :: a -> IO ()
wrapped a
self = let ?self = a
?self::a
self in IO ()
(?self::a) => IO ()
cb
    let wrapped' :: C_WidgetAccelClosuresChangedCallback
wrapped' = (a -> IO ()) -> C_WidgetAccelClosuresChangedCallback
forall a.
GObject a =>
(a -> IO ()) -> C_WidgetAccelClosuresChangedCallback
wrap_WidgetAccelClosuresChangedCallback a -> IO ()
wrapped
    FunPtr C_WidgetAccelClosuresChangedCallback
wrapped'' <- C_WidgetAccelClosuresChangedCallback
-> IO (FunPtr C_WidgetAccelClosuresChangedCallback)
mk_WidgetAccelClosuresChangedCallback C_WidgetAccelClosuresChangedCallback
wrapped'
    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 Text
"accel-closures-changed" FunPtr C_WidgetAccelClosuresChangedCallback
wrapped'' 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
    dbgSignalInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Gtk.Objects.Widget::accel-closures-changed"
        , O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-3.0.38/docs/GI-Gtk-Objects-Widget.html#g:signal:accelClosuresChanged"})

#endif

-- signal Widget::button-press-event
-- | The [buttonPressEvent](#g:signal:buttonPressEvent) signal will be emitted when a button
-- (typically from a mouse) is pressed.
-- 
-- To receive this signal, the t'GI.Gdk.Objects.Window.Window' associated to the
-- widget needs to enable the @/GDK_BUTTON_PRESS_MASK/@ mask.
-- 
-- This signal will be sent to the grab widget if there is one.
type WidgetButtonPressEventCallback =
    Gdk.EventButton.EventButton
    -- ^ /@event@/: the t'GI.Gdk.Structs.EventButton.EventButton' which triggered
    --   this signal.
    -> IO Bool
    -- ^ __Returns:__ 'P.True' to stop other handlers from being invoked for the event.
    --   'P.False' to propagate the event further.

type C_WidgetButtonPressEventCallback =
    Ptr Widget ->                           -- object
    Ptr Gdk.EventButton.EventButton ->
    Ptr () ->                               -- user_data
    IO CInt

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

wrap_WidgetButtonPressEventCallback :: 
    GObject a => (a -> WidgetButtonPressEventCallback) ->
    C_WidgetButtonPressEventCallback
wrap_WidgetButtonPressEventCallback :: forall a.
GObject a =>
(a -> WidgetButtonPressEventCallback)
-> C_WidgetButtonPressEventCallback
wrap_WidgetButtonPressEventCallback a -> WidgetButtonPressEventCallback
gi'cb Ptr Widget
gi'selfPtr Ptr EventButton
event Ptr ()
_ = do
    EventButton
event' <- ((ManagedPtr EventButton -> EventButton)
-> Ptr EventButton -> IO EventButton
forall a.
(HasCallStack, BoxedPtr a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
newPtr ManagedPtr EventButton -> EventButton
Gdk.EventButton.EventButton) Ptr EventButton
event
    Bool
result <- Ptr Widget -> (Widget -> IO Bool) -> IO Bool
forall a b.
(HasCallStack, ManagedPtrNewtype a) =>
Ptr a -> (a -> IO b) -> IO b
B.ManagedPtr.withTransient Ptr Widget
gi'selfPtr ((Widget -> IO Bool) -> IO Bool) -> (Widget -> IO Bool) -> IO Bool
forall a b. (a -> b) -> a -> b
$ \Widget
gi'self -> a -> WidgetButtonPressEventCallback
gi'cb (Widget -> a
Coerce.coerce Widget
gi'self)  EventButton
event'
    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 [buttonPressEvent](#signal:buttonPressEvent) signal, to be run before the default handler.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Signals.on' widget #buttonPressEvent callback
-- @
-- 
-- 
onWidgetButtonPressEvent :: (IsWidget a, MonadIO m) => a -> ((?self :: a) => WidgetButtonPressEventCallback) -> m SignalHandlerId
onWidgetButtonPressEvent :: forall a (m :: * -> *).
(IsWidget a, MonadIO m) =>
a
-> ((?self::a) => WidgetButtonPressEventCallback)
-> m SignalHandlerId
onWidgetButtonPressEvent a
obj (?self::a) => WidgetButtonPressEventCallback
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 wrapped :: a -> WidgetButtonPressEventCallback
wrapped a
self = let ?self = a
?self::a
self in (?self::a) => WidgetButtonPressEventCallback
WidgetButtonPressEventCallback
cb
    let wrapped' :: C_WidgetButtonPressEventCallback
wrapped' = (a -> WidgetButtonPressEventCallback)
-> C_WidgetButtonPressEventCallback
forall a.
GObject a =>
(a -> WidgetButtonPressEventCallback)
-> C_WidgetButtonPressEventCallback
wrap_WidgetButtonPressEventCallback a -> WidgetButtonPressEventCallback
wrapped
    FunPtr C_WidgetButtonPressEventCallback
wrapped'' <- C_WidgetButtonPressEventCallback
-> IO (FunPtr C_WidgetButtonPressEventCallback)
mk_WidgetButtonPressEventCallback C_WidgetButtonPressEventCallback
wrapped'
    a
-> Text
-> FunPtr C_WidgetButtonPressEventCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj Text
"button-press-event" FunPtr C_WidgetButtonPressEventCallback
wrapped'' SignalConnectMode
SignalConnectBefore Maybe Text
forall a. Maybe a
Nothing

-- | Connect a signal handler for the [buttonPressEvent](#signal:buttonPressEvent) signal, to be run after the default handler.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Signals.after' widget #buttonPressEvent callback
-- @
-- 
-- 
-- 
-- By default the object invoking the signal is not passed to the callback.
-- If you need to access it, you can use the implit @?self@ parameter.
-- Note that this requires activating the @ImplicitParams@ GHC extension.
-- 
afterWidgetButtonPressEvent :: (IsWidget a, MonadIO m) => a -> ((?self :: a) => WidgetButtonPressEventCallback) -> m SignalHandlerId
afterWidgetButtonPressEvent :: forall a (m :: * -> *).
(IsWidget a, MonadIO m) =>
a
-> ((?self::a) => WidgetButtonPressEventCallback)
-> m SignalHandlerId
afterWidgetButtonPressEvent a
obj (?self::a) => WidgetButtonPressEventCallback
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 wrapped :: a -> WidgetButtonPressEventCallback
wrapped a
self = let ?self = a
?self::a
self in (?self::a) => WidgetButtonPressEventCallback
WidgetButtonPressEventCallback
cb
    let wrapped' :: C_WidgetButtonPressEventCallback
wrapped' = (a -> WidgetButtonPressEventCallback)
-> C_WidgetButtonPressEventCallback
forall a.
GObject a =>
(a -> WidgetButtonPressEventCallback)
-> C_WidgetButtonPressEventCallback
wrap_WidgetButtonPressEventCallback a -> WidgetButtonPressEventCallback
wrapped
    FunPtr C_WidgetButtonPressEventCallback
wrapped'' <- C_WidgetButtonPressEventCallback
-> IO (FunPtr C_WidgetButtonPressEventCallback)
mk_WidgetButtonPressEventCallback C_WidgetButtonPressEventCallback
wrapped'
    a
-> Text
-> FunPtr C_WidgetButtonPressEventCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj Text
"button-press-event" FunPtr C_WidgetButtonPressEventCallback
wrapped'' SignalConnectMode
SignalConnectAfter Maybe Text
forall a. Maybe a
Nothing


#if defined(ENABLE_OVERLOADING)
data WidgetButtonPressEventSignalInfo
instance SignalInfo WidgetButtonPressEventSignalInfo where
    type HaskellCallbackType WidgetButtonPressEventSignalInfo = WidgetButtonPressEventCallback
    connectSignal obj cb connectMode detail = do
        let cb' = wrap_WidgetButtonPressEventCallback cb
        cb'' <- mk_WidgetButtonPressEventCallback cb'
        connectSignalFunPtr obj "button-press-event" cb'' connectMode detail
    dbgSignalInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Gtk.Objects.Widget::button-press-event"
        , O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-3.0.38/docs/GI-Gtk-Objects-Widget.html#g:signal:buttonPressEvent"})

#endif

-- signal Widget::button-release-event
-- | The [buttonReleaseEvent](#g:signal:buttonReleaseEvent) signal will be emitted when a button
-- (typically from a mouse) is released.
-- 
-- To receive this signal, the t'GI.Gdk.Objects.Window.Window' associated to the
-- widget needs to enable the @/GDK_BUTTON_RELEASE_MASK/@ mask.
-- 
-- This signal will be sent to the grab widget if there is one.
type WidgetButtonReleaseEventCallback =
    Gdk.EventButton.EventButton
    -- ^ /@event@/: the t'GI.Gdk.Structs.EventButton.EventButton' which triggered
    --   this signal.
    -> IO Bool
    -- ^ __Returns:__ 'P.True' to stop other handlers from being invoked for the event.
    --   'P.False' to propagate the event further.

type C_WidgetButtonReleaseEventCallback =
    Ptr Widget ->                           -- object
    Ptr Gdk.EventButton.EventButton ->
    Ptr () ->                               -- user_data
    IO CInt

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

wrap_WidgetButtonReleaseEventCallback :: 
    GObject a => (a -> WidgetButtonReleaseEventCallback) ->
    C_WidgetButtonReleaseEventCallback
wrap_WidgetButtonReleaseEventCallback :: forall a.
GObject a =>
(a -> WidgetButtonPressEventCallback)
-> C_WidgetButtonPressEventCallback
wrap_WidgetButtonReleaseEventCallback a -> WidgetButtonPressEventCallback
gi'cb Ptr Widget
gi'selfPtr Ptr EventButton
event Ptr ()
_ = do
    EventButton
event' <- ((ManagedPtr EventButton -> EventButton)
-> Ptr EventButton -> IO EventButton
forall a.
(HasCallStack, BoxedPtr a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
newPtr ManagedPtr EventButton -> EventButton
Gdk.EventButton.EventButton) Ptr EventButton
event
    Bool
result <- Ptr Widget -> (Widget -> IO Bool) -> IO Bool
forall a b.
(HasCallStack, ManagedPtrNewtype a) =>
Ptr a -> (a -> IO b) -> IO b
B.ManagedPtr.withTransient Ptr Widget
gi'selfPtr ((Widget -> IO Bool) -> IO Bool) -> (Widget -> IO Bool) -> IO Bool
forall a b. (a -> b) -> a -> b
$ \Widget
gi'self -> a -> WidgetButtonPressEventCallback
gi'cb (Widget -> a
Coerce.coerce Widget
gi'self)  EventButton
event'
    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 [buttonReleaseEvent](#signal:buttonReleaseEvent) signal, to be run before the default handler.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Signals.on' widget #buttonReleaseEvent callback
-- @
-- 
-- 
onWidgetButtonReleaseEvent :: (IsWidget a, MonadIO m) => a -> ((?self :: a) => WidgetButtonReleaseEventCallback) -> m SignalHandlerId
onWidgetButtonReleaseEvent :: forall a (m :: * -> *).
(IsWidget a, MonadIO m) =>
a
-> ((?self::a) => WidgetButtonPressEventCallback)
-> m SignalHandlerId
onWidgetButtonReleaseEvent a
obj (?self::a) => WidgetButtonPressEventCallback
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 wrapped :: a -> WidgetButtonPressEventCallback
wrapped a
self = let ?self = a
?self::a
self in (?self::a) => WidgetButtonPressEventCallback
WidgetButtonPressEventCallback
cb
    let wrapped' :: C_WidgetButtonPressEventCallback
wrapped' = (a -> WidgetButtonPressEventCallback)
-> C_WidgetButtonPressEventCallback
forall a.
GObject a =>
(a -> WidgetButtonPressEventCallback)
-> C_WidgetButtonPressEventCallback
wrap_WidgetButtonReleaseEventCallback a -> WidgetButtonPressEventCallback
wrapped
    FunPtr C_WidgetButtonPressEventCallback
wrapped'' <- C_WidgetButtonPressEventCallback
-> IO (FunPtr C_WidgetButtonPressEventCallback)
mk_WidgetButtonReleaseEventCallback C_WidgetButtonPressEventCallback
wrapped'
    a
-> Text
-> FunPtr C_WidgetButtonPressEventCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj Text
"button-release-event" FunPtr C_WidgetButtonPressEventCallback
wrapped'' SignalConnectMode
SignalConnectBefore Maybe Text
forall a. Maybe a
Nothing

-- | Connect a signal handler for the [buttonReleaseEvent](#signal:buttonReleaseEvent) signal, to be run after the default handler.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Signals.after' widget #buttonReleaseEvent callback
-- @
-- 
-- 
-- 
-- By default the object invoking the signal is not passed to the callback.
-- If you need to access it, you can use the implit @?self@ parameter.
-- Note that this requires activating the @ImplicitParams@ GHC extension.
-- 
afterWidgetButtonReleaseEvent :: (IsWidget a, MonadIO m) => a -> ((?self :: a) => WidgetButtonReleaseEventCallback) -> m SignalHandlerId
afterWidgetButtonReleaseEvent :: forall a (m :: * -> *).
(IsWidget a, MonadIO m) =>
a
-> ((?self::a) => WidgetButtonPressEventCallback)
-> m SignalHandlerId
afterWidgetButtonReleaseEvent a
obj (?self::a) => WidgetButtonPressEventCallback
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 wrapped :: a -> WidgetButtonPressEventCallback
wrapped a
self = let ?self = a
?self::a
self in (?self::a) => WidgetButtonPressEventCallback
WidgetButtonPressEventCallback
cb
    let wrapped' :: C_WidgetButtonPressEventCallback
wrapped' = (a -> WidgetButtonPressEventCallback)
-> C_WidgetButtonPressEventCallback
forall a.
GObject a =>
(a -> WidgetButtonPressEventCallback)
-> C_WidgetButtonPressEventCallback
wrap_WidgetButtonReleaseEventCallback a -> WidgetButtonPressEventCallback
wrapped
    FunPtr C_WidgetButtonPressEventCallback
wrapped'' <- C_WidgetButtonPressEventCallback
-> IO (FunPtr C_WidgetButtonPressEventCallback)
mk_WidgetButtonReleaseEventCallback C_WidgetButtonPressEventCallback
wrapped'
    a
-> Text
-> FunPtr C_WidgetButtonPressEventCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj Text
"button-release-event" FunPtr C_WidgetButtonPressEventCallback
wrapped'' SignalConnectMode
SignalConnectAfter Maybe Text
forall a. Maybe a
Nothing


#if defined(ENABLE_OVERLOADING)
data WidgetButtonReleaseEventSignalInfo
instance SignalInfo WidgetButtonReleaseEventSignalInfo where
    type HaskellCallbackType WidgetButtonReleaseEventSignalInfo = WidgetButtonReleaseEventCallback
    connectSignal obj cb connectMode detail = do
        let cb' = wrap_WidgetButtonReleaseEventCallback cb
        cb'' <- mk_WidgetButtonReleaseEventCallback cb'
        connectSignalFunPtr obj "button-release-event" cb'' connectMode detail
    dbgSignalInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Gtk.Objects.Widget::button-release-event"
        , O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-3.0.38/docs/GI-Gtk-Objects-Widget.html#g:signal:buttonReleaseEvent"})

#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.

type C_WidgetCanActivateAccelCallback =
    Ptr Widget ->                           -- 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_WidgetCanActivateAccelCallback :: 
    GObject a => (a -> WidgetCanActivateAccelCallback) ->
    C_WidgetCanActivateAccelCallback
wrap_WidgetCanActivateAccelCallback :: forall a.
GObject a =>
(a -> WidgetCanActivateAccelCallback)
-> C_WidgetCanActivateAccelCallback
wrap_WidgetCanActivateAccelCallback a -> WidgetCanActivateAccelCallback
gi'cb Ptr Widget
gi'selfPtr Word32
signalId Ptr ()
_ = do
    Bool
result <- Ptr Widget -> (Widget -> IO Bool) -> IO Bool
forall a b.
(HasCallStack, ManagedPtrNewtype a) =>
Ptr a -> (a -> IO b) -> IO b
B.ManagedPtr.withTransient Ptr Widget
gi'selfPtr ((Widget -> IO Bool) -> IO Bool) -> (Widget -> IO Bool) -> IO Bool
forall a b. (a -> b) -> a -> b
$ \Widget
gi'self -> a -> WidgetCanActivateAccelCallback
gi'cb (Widget -> a
Coerce.coerce Widget
gi'self)  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 -> ((?self :: a) => WidgetCanActivateAccelCallback) -> m SignalHandlerId
onWidgetCanActivateAccel :: forall a (m :: * -> *).
(IsWidget a, MonadIO m) =>
a
-> ((?self::a) => WidgetCanActivateAccelCallback)
-> m SignalHandlerId
onWidgetCanActivateAccel a
obj (?self::a) => 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 wrapped :: a -> WidgetCanActivateAccelCallback
wrapped a
self = let ?self = a
?self::a
self in (?self::a) => WidgetCanActivateAccelCallback
WidgetCanActivateAccelCallback
cb
    let wrapped' :: C_WidgetCanActivateAccelCallback
wrapped' = (a -> WidgetCanActivateAccelCallback)
-> C_WidgetCanActivateAccelCallback
forall a.
GObject a =>
(a -> WidgetCanActivateAccelCallback)
-> C_WidgetCanActivateAccelCallback
wrap_WidgetCanActivateAccelCallback a -> WidgetCanActivateAccelCallback
wrapped
    FunPtr C_WidgetCanActivateAccelCallback
wrapped'' <- C_WidgetCanActivateAccelCallback
-> IO (FunPtr C_WidgetCanActivateAccelCallback)
mk_WidgetCanActivateAccelCallback C_WidgetCanActivateAccelCallback
wrapped'
    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 Text
"can-activate-accel" FunPtr C_WidgetCanActivateAccelCallback
wrapped'' 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
-- @
-- 
-- 
-- 
-- By default the object invoking the signal is not passed to the callback.
-- If you need to access it, you can use the implit @?self@ parameter.
-- Note that this requires activating the @ImplicitParams@ GHC extension.
-- 
afterWidgetCanActivateAccel :: (IsWidget a, MonadIO m) => a -> ((?self :: a) => WidgetCanActivateAccelCallback) -> m SignalHandlerId
afterWidgetCanActivateAccel :: forall a (m :: * -> *).
(IsWidget a, MonadIO m) =>
a
-> ((?self::a) => WidgetCanActivateAccelCallback)
-> m SignalHandlerId
afterWidgetCanActivateAccel a
obj (?self::a) => 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 wrapped :: a -> WidgetCanActivateAccelCallback
wrapped a
self = let ?self = a
?self::a
self in (?self::a) => WidgetCanActivateAccelCallback
WidgetCanActivateAccelCallback
cb
    let wrapped' :: C_WidgetCanActivateAccelCallback
wrapped' = (a -> WidgetCanActivateAccelCallback)
-> C_WidgetCanActivateAccelCallback
forall a.
GObject a =>
(a -> WidgetCanActivateAccelCallback)
-> C_WidgetCanActivateAccelCallback
wrap_WidgetCanActivateAccelCallback a -> WidgetCanActivateAccelCallback
wrapped
    FunPtr C_WidgetCanActivateAccelCallback
wrapped'' <- C_WidgetCanActivateAccelCallback
-> IO (FunPtr C_WidgetCanActivateAccelCallback)
mk_WidgetCanActivateAccelCallback C_WidgetCanActivateAccelCallback
wrapped'
    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 Text
"can-activate-accel" FunPtr C_WidgetCanActivateAccelCallback
wrapped'' 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
    dbgSignalInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Gtk.Objects.Widget::can-activate-accel"
        , O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-3.0.38/docs/GI-Gtk-Objects-Widget.html#g:signal:canActivateAccel"})

#endif

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

type C_WidgetChildNotifyCallback =
    Ptr Widget ->                           -- object
    Ptr GParamSpec ->
    Ptr () ->                               -- user_data
    IO ()

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

wrap_WidgetChildNotifyCallback :: 
    GObject a => (a -> WidgetChildNotifyCallback) ->
    C_WidgetChildNotifyCallback
wrap_WidgetChildNotifyCallback :: forall a.
GObject a =>
(a -> WidgetChildNotifyCallback) -> C_WidgetChildNotifyCallback
wrap_WidgetChildNotifyCallback a -> WidgetChildNotifyCallback
gi'cb Ptr Widget
gi'selfPtr Ptr GParamSpec
childProperty Ptr ()
_ = do
    GParamSpec
childProperty' <- Ptr GParamSpec -> IO GParamSpec
B.GParamSpec.newGParamSpecFromPtr Ptr GParamSpec
childProperty
    Ptr Widget -> (Widget -> IO ()) -> IO ()
forall a b.
(HasCallStack, ManagedPtrNewtype a) =>
Ptr a -> (a -> IO b) -> IO b
B.ManagedPtr.withTransient Ptr Widget
gi'selfPtr ((Widget -> IO ()) -> IO ()) -> (Widget -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Widget
gi'self -> a -> WidgetChildNotifyCallback
gi'cb (Widget -> a
Coerce.coerce Widget
gi'self)  GParamSpec
childProperty'


-- | Connect a signal handler for the [childNotify](#signal:childNotify) signal, to be run before the default handler.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Signals.on' widget #childNotify callback
-- @
-- 
-- This signal admits a optional parameter @detail@.
-- If it's not @Nothing@, we will connect to “@child-notify::detail@” instead.
-- 
onWidgetChildNotify :: (IsWidget a, MonadIO m) => a -> P.Maybe T.Text -> ((?self :: a) => WidgetChildNotifyCallback) -> m SignalHandlerId
onWidgetChildNotify :: forall a (m :: * -> *).
(IsWidget a, MonadIO m) =>
a
-> Maybe Text
-> ((?self::a) => WidgetChildNotifyCallback)
-> m SignalHandlerId
onWidgetChildNotify a
obj Maybe Text
detail (?self::a) => WidgetChildNotifyCallback
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 wrapped :: a -> WidgetChildNotifyCallback
wrapped a
self = let ?self = a
?self::a
self in (?self::a) => WidgetChildNotifyCallback
WidgetChildNotifyCallback
cb
    let wrapped' :: C_WidgetChildNotifyCallback
wrapped' = (a -> WidgetChildNotifyCallback) -> C_WidgetChildNotifyCallback
forall a.
GObject a =>
(a -> WidgetChildNotifyCallback) -> C_WidgetChildNotifyCallback
wrap_WidgetChildNotifyCallback a -> WidgetChildNotifyCallback
wrapped
    FunPtr C_WidgetChildNotifyCallback
wrapped'' <- C_WidgetChildNotifyCallback
-> IO (FunPtr C_WidgetChildNotifyCallback)
mk_WidgetChildNotifyCallback C_WidgetChildNotifyCallback
wrapped'
    a
-> Text
-> FunPtr C_WidgetChildNotifyCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj Text
"child-notify" FunPtr C_WidgetChildNotifyCallback
wrapped'' SignalConnectMode
SignalConnectBefore Maybe Text
detail

-- | Connect a signal handler for the [childNotify](#signal:childNotify) signal, to be run after the default handler.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Signals.after' widget #childNotify callback
-- @
-- 
-- This signal admits a optional parameter @detail@.
-- If it's not @Nothing@, we will connect to “@child-notify::detail@” instead.
-- 
-- 
-- By default the object invoking the signal is not passed to the callback.
-- If you need to access it, you can use the implit @?self@ parameter.
-- Note that this requires activating the @ImplicitParams@ GHC extension.
-- 
afterWidgetChildNotify :: (IsWidget a, MonadIO m) => a -> P.Maybe T.Text -> ((?self :: a) => WidgetChildNotifyCallback) -> m SignalHandlerId
afterWidgetChildNotify :: forall a (m :: * -> *).
(IsWidget a, MonadIO m) =>
a
-> Maybe Text
-> ((?self::a) => WidgetChildNotifyCallback)
-> m SignalHandlerId
afterWidgetChildNotify a
obj Maybe Text
detail (?self::a) => WidgetChildNotifyCallback
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 wrapped :: a -> WidgetChildNotifyCallback
wrapped a
self = let ?self = a
?self::a
self in (?self::a) => WidgetChildNotifyCallback
WidgetChildNotifyCallback
cb
    let wrapped' :: C_WidgetChildNotifyCallback
wrapped' = (a -> WidgetChildNotifyCallback) -> C_WidgetChildNotifyCallback
forall a.
GObject a =>
(a -> WidgetChildNotifyCallback) -> C_WidgetChildNotifyCallback
wrap_WidgetChildNotifyCallback a -> WidgetChildNotifyCallback
wrapped
    FunPtr C_WidgetChildNotifyCallback
wrapped'' <- C_WidgetChildNotifyCallback
-> IO (FunPtr C_WidgetChildNotifyCallback)
mk_WidgetChildNotifyCallback C_WidgetChildNotifyCallback
wrapped'
    a
-> Text
-> FunPtr C_WidgetChildNotifyCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj Text
"child-notify" FunPtr C_WidgetChildNotifyCallback
wrapped'' SignalConnectMode
SignalConnectAfter Maybe Text
detail


#if defined(ENABLE_OVERLOADING)
data WidgetChildNotifySignalInfo
instance SignalInfo WidgetChildNotifySignalInfo where
    type HaskellCallbackType WidgetChildNotifySignalInfo = WidgetChildNotifyCallback
    connectSignal obj cb connectMode detail = do
        let cb' = wrap_WidgetChildNotifyCallback cb
        cb'' <- mk_WidgetChildNotifyCallback cb'
        connectSignalFunPtr obj "child-notify" cb'' connectMode detail
    dbgSignalInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Gtk.Objects.Widget::child-notify"
        , O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-3.0.38/docs/GI-Gtk-Objects-Widget.html#g:signal:childNotify"})

#endif

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

type C_WidgetCompositedChangedCallback =
    Ptr Widget ->                           -- object
    Ptr () ->                               -- user_data
    IO ()

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

wrap_WidgetCompositedChangedCallback :: 
    GObject a => (a -> WidgetCompositedChangedCallback) ->
    C_WidgetCompositedChangedCallback
wrap_WidgetCompositedChangedCallback :: forall a.
GObject a =>
(a -> IO ()) -> C_WidgetAccelClosuresChangedCallback
wrap_WidgetCompositedChangedCallback a -> IO ()
gi'cb Ptr Widget
gi'selfPtr Ptr ()
_ = do
    Ptr Widget -> (Widget -> IO ()) -> IO ()
forall a b.
(HasCallStack, ManagedPtrNewtype a) =>
Ptr a -> (a -> IO b) -> IO b
B.ManagedPtr.withTransient Ptr Widget
gi'selfPtr ((Widget -> IO ()) -> IO ()) -> (Widget -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Widget
gi'self -> a -> IO ()
gi'cb (Widget -> a
Coerce.coerce Widget
gi'self) 


-- | Connect a signal handler for the [compositedChanged](#signal:compositedChanged) signal, to be run before the default handler.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Signals.on' widget #compositedChanged callback
-- @
-- 
-- 
onWidgetCompositedChanged :: (IsWidget a, MonadIO m) => a -> ((?self :: a) => WidgetCompositedChangedCallback) -> m SignalHandlerId
onWidgetCompositedChanged :: forall a (m :: * -> *).
(IsWidget a, MonadIO m) =>
a -> ((?self::a) => IO ()) -> m SignalHandlerId
onWidgetCompositedChanged a
obj (?self::a) => 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 wrapped :: a -> IO ()
wrapped a
self = let ?self = a
?self::a
self in IO ()
(?self::a) => IO ()
cb
    let wrapped' :: C_WidgetAccelClosuresChangedCallback
wrapped' = (a -> IO ()) -> C_WidgetAccelClosuresChangedCallback
forall a.
GObject a =>
(a -> IO ()) -> C_WidgetAccelClosuresChangedCallback
wrap_WidgetCompositedChangedCallback a -> IO ()
wrapped
    FunPtr C_WidgetAccelClosuresChangedCallback
wrapped'' <- C_WidgetAccelClosuresChangedCallback
-> IO (FunPtr C_WidgetAccelClosuresChangedCallback)
mk_WidgetCompositedChangedCallback C_WidgetAccelClosuresChangedCallback
wrapped'
    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 Text
"composited-changed" FunPtr C_WidgetAccelClosuresChangedCallback
wrapped'' SignalConnectMode
SignalConnectBefore Maybe Text
forall a. Maybe a
Nothing

-- | Connect a signal handler for the [compositedChanged](#signal:compositedChanged) signal, to be run after the default handler.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Signals.after' widget #compositedChanged callback
-- @
-- 
-- 
-- 
-- By default the object invoking the signal is not passed to the callback.
-- If you need to access it, you can use the implit @?self@ parameter.
-- Note that this requires activating the @ImplicitParams@ GHC extension.
-- 
afterWidgetCompositedChanged :: (IsWidget a, MonadIO m) => a -> ((?self :: a) => WidgetCompositedChangedCallback) -> m SignalHandlerId
afterWidgetCompositedChanged :: forall a (m :: * -> *).
(IsWidget a, MonadIO m) =>
a -> ((?self::a) => IO ()) -> m SignalHandlerId
afterWidgetCompositedChanged a
obj (?self::a) => 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 wrapped :: a -> IO ()
wrapped a
self = let ?self = a
?self::a
self in IO ()
(?self::a) => IO ()
cb
    let wrapped' :: C_WidgetAccelClosuresChangedCallback
wrapped' = (a -> IO ()) -> C_WidgetAccelClosuresChangedCallback
forall a.
GObject a =>
(a -> IO ()) -> C_WidgetAccelClosuresChangedCallback
wrap_WidgetCompositedChangedCallback a -> IO ()
wrapped
    FunPtr C_WidgetAccelClosuresChangedCallback
wrapped'' <- C_WidgetAccelClosuresChangedCallback
-> IO (FunPtr C_WidgetAccelClosuresChangedCallback)
mk_WidgetCompositedChangedCallback C_WidgetAccelClosuresChangedCallback
wrapped'
    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 Text
"composited-changed" FunPtr C_WidgetAccelClosuresChangedCallback
wrapped'' SignalConnectMode
SignalConnectAfter Maybe Text
forall a. Maybe a
Nothing


#if defined(ENABLE_OVERLOADING)
data WidgetCompositedChangedSignalInfo
instance SignalInfo WidgetCompositedChangedSignalInfo where
    type HaskellCallbackType WidgetCompositedChangedSignalInfo = WidgetCompositedChangedCallback
    connectSignal obj cb connectMode detail = do
        let cb' = wrap_WidgetCompositedChangedCallback cb
        cb'' <- mk_WidgetCompositedChangedCallback cb'
        connectSignalFunPtr obj "composited-changed" cb'' connectMode detail
    dbgSignalInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Gtk.Objects.Widget::composited-changed"
        , O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-3.0.38/docs/GI-Gtk-Objects-Widget.html#g:signal:compositedChanged"})

#endif

-- signal Widget::configure-event
-- | The [configureEvent](#g:signal:configureEvent) signal will be emitted when the size, position or
-- stacking of the /@widget@/\'s window has changed.
-- 
-- To receive this signal, the t'GI.Gdk.Objects.Window.Window' associated to the widget needs
-- to enable the @/GDK_STRUCTURE_MASK/@ mask. GDK will enable this mask
-- automatically for all new windows.
type WidgetConfigureEventCallback =
    Gdk.EventConfigure.EventConfigure
    -- ^ /@event@/: the t'GI.Gdk.Structs.EventConfigure.EventConfigure' which triggered
    --   this signal.
    -> IO Bool
    -- ^ __Returns:__ 'P.True' to stop other handlers from being invoked for the event.
    --   'P.False' to propagate the event further.

type C_WidgetConfigureEventCallback =
    Ptr Widget ->                           -- object
    Ptr Gdk.EventConfigure.EventConfigure ->
    Ptr () ->                               -- user_data
    IO CInt

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

wrap_WidgetConfigureEventCallback :: 
    GObject a => (a -> WidgetConfigureEventCallback) ->
    C_WidgetConfigureEventCallback
wrap_WidgetConfigureEventCallback :: forall a.
GObject a =>
(a -> WidgetConfigureEventCallback)
-> C_WidgetConfigureEventCallback
wrap_WidgetConfigureEventCallback a -> WidgetConfigureEventCallback
gi'cb Ptr Widget
gi'selfPtr Ptr EventConfigure
event Ptr ()
_ = do
    EventConfigure
event' <- ((ManagedPtr EventConfigure -> EventConfigure)
-> Ptr EventConfigure -> IO EventConfigure
forall a.
(HasCallStack, BoxedPtr a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
newPtr ManagedPtr EventConfigure -> EventConfigure
Gdk.EventConfigure.EventConfigure) Ptr EventConfigure
event
    Bool
result <- Ptr Widget -> (Widget -> IO Bool) -> IO Bool
forall a b.
(HasCallStack, ManagedPtrNewtype a) =>
Ptr a -> (a -> IO b) -> IO b
B.ManagedPtr.withTransient Ptr Widget
gi'selfPtr ((Widget -> IO Bool) -> IO Bool) -> (Widget -> IO Bool) -> IO Bool
forall a b. (a -> b) -> a -> b
$ \Widget
gi'self -> a -> WidgetConfigureEventCallback
gi'cb (Widget -> a
Coerce.coerce Widget
gi'self)  EventConfigure
event'
    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 [configureEvent](#signal:configureEvent) signal, to be run before the default handler.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Signals.on' widget #configureEvent callback
-- @
-- 
-- 
onWidgetConfigureEvent :: (IsWidget a, MonadIO m) => a -> ((?self :: a) => WidgetConfigureEventCallback) -> m SignalHandlerId
onWidgetConfigureEvent :: forall a (m :: * -> *).
(IsWidget a, MonadIO m) =>
a
-> ((?self::a) => WidgetConfigureEventCallback)
-> m SignalHandlerId
onWidgetConfigureEvent a
obj (?self::a) => WidgetConfigureEventCallback
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 wrapped :: a -> WidgetConfigureEventCallback
wrapped a
self = let ?self = a
?self::a
self in (?self::a) => WidgetConfigureEventCallback
WidgetConfigureEventCallback
cb
    let wrapped' :: C_WidgetConfigureEventCallback
wrapped' = (a -> WidgetConfigureEventCallback)
-> C_WidgetConfigureEventCallback
forall a.
GObject a =>
(a -> WidgetConfigureEventCallback)
-> C_WidgetConfigureEventCallback
wrap_WidgetConfigureEventCallback a -> WidgetConfigureEventCallback
wrapped
    FunPtr C_WidgetConfigureEventCallback
wrapped'' <- C_WidgetConfigureEventCallback
-> IO (FunPtr C_WidgetConfigureEventCallback)
mk_WidgetConfigureEventCallback C_WidgetConfigureEventCallback
wrapped'
    a
-> Text
-> FunPtr C_WidgetConfigureEventCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj Text
"configure-event" FunPtr C_WidgetConfigureEventCallback
wrapped'' SignalConnectMode
SignalConnectBefore Maybe Text
forall a. Maybe a
Nothing

-- | Connect a signal handler for the [configureEvent](#signal:configureEvent) signal, to be run after the default handler.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Signals.after' widget #configureEvent callback
-- @
-- 
-- 
-- 
-- By default the object invoking the signal is not passed to the callback.
-- If you need to access it, you can use the implit @?self@ parameter.
-- Note that this requires activating the @ImplicitParams@ GHC extension.
-- 
afterWidgetConfigureEvent :: (IsWidget a, MonadIO m) => a -> ((?self :: a) => WidgetConfigureEventCallback) -> m SignalHandlerId
afterWidgetConfigureEvent :: forall a (m :: * -> *).
(IsWidget a, MonadIO m) =>
a
-> ((?self::a) => WidgetConfigureEventCallback)
-> m SignalHandlerId
afterWidgetConfigureEvent a
obj (?self::a) => WidgetConfigureEventCallback
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 wrapped :: a -> WidgetConfigureEventCallback
wrapped a
self = let ?self = a
?self::a
self in (?self::a) => WidgetConfigureEventCallback
WidgetConfigureEventCallback
cb
    let wrapped' :: C_WidgetConfigureEventCallback
wrapped' = (a -> WidgetConfigureEventCallback)
-> C_WidgetConfigureEventCallback
forall a.
GObject a =>
(a -> WidgetConfigureEventCallback)
-> C_WidgetConfigureEventCallback
wrap_WidgetConfigureEventCallback a -> WidgetConfigureEventCallback
wrapped
    FunPtr C_WidgetConfigureEventCallback
wrapped'' <- C_WidgetConfigureEventCallback
-> IO (FunPtr C_WidgetConfigureEventCallback)
mk_WidgetConfigureEventCallback C_WidgetConfigureEventCallback
wrapped'
    a
-> Text
-> FunPtr C_WidgetConfigureEventCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj Text
"configure-event" FunPtr C_WidgetConfigureEventCallback
wrapped'' SignalConnectMode
SignalConnectAfter Maybe Text
forall a. Maybe a
Nothing


#if defined(ENABLE_OVERLOADING)
data WidgetConfigureEventSignalInfo
instance SignalInfo WidgetConfigureEventSignalInfo where
    type HaskellCallbackType WidgetConfigureEventSignalInfo = WidgetConfigureEventCallback
    connectSignal obj cb connectMode detail = do
        let cb' = wrap_WidgetConfigureEventCallback cb
        cb'' <- mk_WidgetConfigureEventCallback cb'
        connectSignalFunPtr obj "configure-event" cb'' connectMode detail
    dbgSignalInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Gtk.Objects.Widget::configure-event"
        , O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-3.0.38/docs/GI-Gtk-Objects-Widget.html#g:signal:configureEvent"})

#endif

-- signal Widget::damage-event
-- | Emitted when a redirected window belonging to /@widget@/ gets drawn into.
-- The region\/area members of the event shows what area of the redirected
-- drawable was drawn into.
-- 
-- /Since: 2.14/
type WidgetDamageEventCallback =
    Gdk.EventExpose.EventExpose
    -- ^ /@event@/: the t'GI.Gdk.Structs.EventExpose.EventExpose' event
    -> IO Bool
    -- ^ __Returns:__ 'P.True' to stop other handlers from being invoked for the event.
    --   'P.False' to propagate the event further.

type C_WidgetDamageEventCallback =
    Ptr Widget ->                           -- object
    Ptr Gdk.EventExpose.EventExpose ->
    Ptr () ->                               -- user_data
    IO CInt

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

wrap_WidgetDamageEventCallback :: 
    GObject a => (a -> WidgetDamageEventCallback) ->
    C_WidgetDamageEventCallback
wrap_WidgetDamageEventCallback :: forall a.
GObject a =>
(a -> WidgetDamageEventCallback) -> C_WidgetDamageEventCallback
wrap_WidgetDamageEventCallback a -> WidgetDamageEventCallback
gi'cb Ptr Widget
gi'selfPtr Ptr EventExpose
event Ptr ()
_ = do
    EventExpose
event' <- ((ManagedPtr EventExpose -> EventExpose)
-> Ptr EventExpose -> IO EventExpose
forall a.
(HasCallStack, BoxedPtr a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
newPtr ManagedPtr EventExpose -> EventExpose
Gdk.EventExpose.EventExpose) Ptr EventExpose
event
    Bool
result <- Ptr Widget -> (Widget -> IO Bool) -> IO Bool
forall a b.
(HasCallStack, ManagedPtrNewtype a) =>
Ptr a -> (a -> IO b) -> IO b
B.ManagedPtr.withTransient Ptr Widget
gi'selfPtr ((Widget -> IO Bool) -> IO Bool) -> (Widget -> IO Bool) -> IO Bool
forall a b. (a -> b) -> a -> b
$ \Widget
gi'self -> a -> WidgetDamageEventCallback
gi'cb (Widget -> a
Coerce.coerce Widget
gi'self)  EventExpose
event'
    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 [damageEvent](#signal:damageEvent) signal, to be run before the default handler.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Signals.on' widget #damageEvent callback
-- @
-- 
-- 
onWidgetDamageEvent :: (IsWidget a, MonadIO m) => a -> ((?self :: a) => WidgetDamageEventCallback) -> m SignalHandlerId
onWidgetDamageEvent :: forall a (m :: * -> *).
(IsWidget a, MonadIO m) =>
a -> ((?self::a) => WidgetDamageEventCallback) -> m SignalHandlerId
onWidgetDamageEvent a
obj (?self::a) => WidgetDamageEventCallback
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 wrapped :: a -> WidgetDamageEventCallback
wrapped a
self = let ?self = a
?self::a
self in (?self::a) => WidgetDamageEventCallback
WidgetDamageEventCallback
cb
    let wrapped' :: C_WidgetDamageEventCallback
wrapped' = (a -> WidgetDamageEventCallback) -> C_WidgetDamageEventCallback
forall a.
GObject a =>
(a -> WidgetDamageEventCallback) -> C_WidgetDamageEventCallback
wrap_WidgetDamageEventCallback a -> WidgetDamageEventCallback
wrapped
    FunPtr C_WidgetDamageEventCallback
wrapped'' <- C_WidgetDamageEventCallback
-> IO (FunPtr C_WidgetDamageEventCallback)
mk_WidgetDamageEventCallback C_WidgetDamageEventCallback
wrapped'
    a
-> Text
-> FunPtr C_WidgetDamageEventCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj Text
"damage-event" FunPtr C_WidgetDamageEventCallback
wrapped'' SignalConnectMode
SignalConnectBefore Maybe Text
forall a. Maybe a
Nothing

-- | Connect a signal handler for the [damageEvent](#signal:damageEvent) signal, to be run after the default handler.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Signals.after' widget #damageEvent callback
-- @
-- 
-- 
-- 
-- By default the object invoking the signal is not passed to the callback.
-- If you need to access it, you can use the implit @?self@ parameter.
-- Note that this requires activating the @ImplicitParams@ GHC extension.
-- 
afterWidgetDamageEvent :: (IsWidget a, MonadIO m) => a -> ((?self :: a) => WidgetDamageEventCallback) -> m SignalHandlerId
afterWidgetDamageEvent :: forall a (m :: * -> *).
(IsWidget a, MonadIO m) =>
a -> ((?self::a) => WidgetDamageEventCallback) -> m SignalHandlerId
afterWidgetDamageEvent a
obj (?self::a) => WidgetDamageEventCallback
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 wrapped :: a -> WidgetDamageEventCallback
wrapped a
self = let ?self = a
?self::a
self in (?self::a) => WidgetDamageEventCallback
WidgetDamageEventCallback
cb
    let wrapped' :: C_WidgetDamageEventCallback
wrapped' = (a -> WidgetDamageEventCallback) -> C_WidgetDamageEventCallback
forall a.
GObject a =>
(a -> WidgetDamageEventCallback) -> C_WidgetDamageEventCallback
wrap_WidgetDamageEventCallback a -> WidgetDamageEventCallback
wrapped
    FunPtr C_WidgetDamageEventCallback
wrapped'' <- C_WidgetDamageEventCallback
-> IO (FunPtr C_WidgetDamageEventCallback)
mk_WidgetDamageEventCallback C_WidgetDamageEventCallback
wrapped'
    a
-> Text
-> FunPtr C_WidgetDamageEventCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj Text
"damage-event" FunPtr C_WidgetDamageEventCallback
wrapped'' SignalConnectMode
SignalConnectAfter Maybe Text
forall a. Maybe a
Nothing


#if defined(ENABLE_OVERLOADING)
data WidgetDamageEventSignalInfo
instance SignalInfo WidgetDamageEventSignalInfo where
    type HaskellCallbackType WidgetDamageEventSignalInfo = WidgetDamageEventCallback
    connectSignal obj cb connectMode detail = do
        let cb' = wrap_WidgetDamageEventCallback cb
        cb'' <- mk_WidgetDamageEventCallback cb'
        connectSignalFunPtr obj "damage-event" cb'' connectMode detail
    dbgSignalInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Gtk.Objects.Widget::damage-event"
        , O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-3.0.38/docs/GI-Gtk-Objects-Widget.html#g:signal:damageEvent"})

#endif

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

type C_WidgetDeleteEventCallback =
    Ptr Widget ->                           -- object
    Ptr Gdk.Event.Event ->
    Ptr () ->                               -- user_data
    IO CInt

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

wrap_WidgetDeleteEventCallback :: 
    GObject a => (a -> WidgetDeleteEventCallback) ->
    C_WidgetDeleteEventCallback
wrap_WidgetDeleteEventCallback :: forall a.
GObject a =>
(a -> WidgetDeleteEventCallback) -> C_WidgetDeleteEventCallback
wrap_WidgetDeleteEventCallback a -> WidgetDeleteEventCallback
gi'cb Ptr Widget
gi'selfPtr Ptr Event
event Ptr ()
_ = do
    Ptr Event -> (Event -> IO CInt) -> IO CInt
forall a b.
(HasCallStack, ManagedPtrNewtype a) =>
Ptr a -> (a -> IO b) -> IO b
B.ManagedPtr.withTransient  Ptr Event
event ((Event -> IO CInt) -> IO CInt) -> (Event -> IO CInt) -> IO CInt
forall a b. (a -> b) -> a -> b
$ \Event
event' -> do
        Bool
result <- Ptr Widget -> (Widget -> IO Bool) -> IO Bool
forall a b.
(HasCallStack, ManagedPtrNewtype a) =>
Ptr a -> (a -> IO b) -> IO b
B.ManagedPtr.withTransient Ptr Widget
gi'selfPtr ((Widget -> IO Bool) -> IO Bool) -> (Widget -> IO Bool) -> IO Bool
forall a b. (a -> b) -> a -> b
$ \Widget
gi'self -> a -> WidgetDeleteEventCallback
gi'cb (Widget -> a
Coerce.coerce Widget
gi'self)  Event
event'
        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 [deleteEvent](#signal:deleteEvent) signal, to be run before the default handler.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Signals.on' widget #deleteEvent callback
-- @
-- 
-- 
onWidgetDeleteEvent :: (IsWidget a, MonadIO m) => a -> ((?self :: a) => WidgetDeleteEventCallback) -> m SignalHandlerId
onWidgetDeleteEvent :: forall a (m :: * -> *).
(IsWidget a, MonadIO m) =>
a -> ((?self::a) => WidgetDeleteEventCallback) -> m SignalHandlerId
onWidgetDeleteEvent a
obj (?self::a) => WidgetDeleteEventCallback
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 wrapped :: a -> WidgetDeleteEventCallback
wrapped a
self = let ?self = a
?self::a
self in (?self::a) => WidgetDeleteEventCallback
WidgetDeleteEventCallback
cb
    let wrapped' :: C_WidgetDeleteEventCallback
wrapped' = (a -> WidgetDeleteEventCallback) -> C_WidgetDeleteEventCallback
forall a.
GObject a =>
(a -> WidgetDeleteEventCallback) -> C_WidgetDeleteEventCallback
wrap_WidgetDeleteEventCallback a -> WidgetDeleteEventCallback
wrapped
    FunPtr C_WidgetDeleteEventCallback
wrapped'' <- C_WidgetDeleteEventCallback
-> IO (FunPtr C_WidgetDeleteEventCallback)
mk_WidgetDeleteEventCallback C_WidgetDeleteEventCallback
wrapped'
    a
-> Text
-> FunPtr C_WidgetDeleteEventCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj Text
"delete-event" FunPtr C_WidgetDeleteEventCallback
wrapped'' SignalConnectMode
SignalConnectBefore Maybe Text
forall a. Maybe a
Nothing

-- | Connect a signal handler for the [deleteEvent](#signal:deleteEvent) signal, to be run after the default handler.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Signals.after' widget #deleteEvent callback
-- @
-- 
-- 
-- 
-- By default the object invoking the signal is not passed to the callback.
-- If you need to access it, you can use the implit @?self@ parameter.
-- Note that this requires activating the @ImplicitParams@ GHC extension.
-- 
afterWidgetDeleteEvent :: (IsWidget a, MonadIO m) => a -> ((?self :: a) => WidgetDeleteEventCallback) -> m SignalHandlerId
afterWidgetDeleteEvent :: forall a (m :: * -> *).
(IsWidget a, MonadIO m) =>
a -> ((?self::a) => WidgetDeleteEventCallback) -> m SignalHandlerId
afterWidgetDeleteEvent a
obj (?self::a) => WidgetDeleteEventCallback
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 wrapped :: a -> WidgetDeleteEventCallback
wrapped a
self = let ?self = a
?self::a
self in (?self::a) => WidgetDeleteEventCallback
WidgetDeleteEventCallback
cb
    let wrapped' :: C_WidgetDeleteEventCallback
wrapped' = (a -> WidgetDeleteEventCallback) -> C_WidgetDeleteEventCallback
forall a.
GObject a =>
(a -> WidgetDeleteEventCallback) -> C_WidgetDeleteEventCallback
wrap_WidgetDeleteEventCallback a -> WidgetDeleteEventCallback
wrapped
    FunPtr C_WidgetDeleteEventCallback
wrapped'' <- C_WidgetDeleteEventCallback
-> IO (FunPtr C_WidgetDeleteEventCallback)
mk_WidgetDeleteEventCallback C_WidgetDeleteEventCallback
wrapped'
    a
-> Text
-> FunPtr C_WidgetDeleteEventCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj Text
"delete-event" FunPtr C_WidgetDeleteEventCallback
wrapped'' SignalConnectMode
SignalConnectAfter Maybe Text
forall a. Maybe a
Nothing


#if defined(ENABLE_OVERLOADING)
data WidgetDeleteEventSignalInfo
instance SignalInfo WidgetDeleteEventSignalInfo where
    type HaskellCallbackType WidgetDeleteEventSignalInfo = WidgetDeleteEventCallback
    connectSignal obj cb connectMode detail = do
        let cb' = wrap_WidgetDeleteEventCallback cb
        cb'' <- mk_WidgetDeleteEventCallback cb'
        connectSignalFunPtr obj "delete-event" cb'' connectMode detail
    dbgSignalInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Gtk.Objects.Widget::delete-event"
        , O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-3.0.38/docs/GI-Gtk-Objects-Widget.html#g:signal:deleteEvent"})

#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 ()

type C_WidgetDestroyCallback =
    Ptr Widget ->                           -- 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_WidgetDestroyCallback :: 
    GObject a => (a -> WidgetDestroyCallback) ->
    C_WidgetDestroyCallback
wrap_WidgetDestroyCallback :: forall a.
GObject a =>
(a -> IO ()) -> C_WidgetAccelClosuresChangedCallback
wrap_WidgetDestroyCallback a -> IO ()
gi'cb Ptr Widget
gi'selfPtr Ptr ()
_ = do
    Ptr Widget -> (Widget -> IO ()) -> IO ()
forall a b.
(HasCallStack, ManagedPtrNewtype a) =>
Ptr a -> (a -> IO b) -> IO b
B.ManagedPtr.withTransient Ptr Widget
gi'selfPtr ((Widget -> IO ()) -> IO ()) -> (Widget -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Widget
gi'self -> a -> IO ()
gi'cb (Widget -> a
Coerce.coerce Widget
gi'self) 


-- | 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 -> ((?self :: a) => WidgetDestroyCallback) -> m SignalHandlerId
onWidgetDestroy :: forall a (m :: * -> *).
(IsWidget a, MonadIO m) =>
a -> ((?self::a) => IO ()) -> m SignalHandlerId
onWidgetDestroy a
obj (?self::a) => 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 wrapped :: a -> IO ()
wrapped a
self = let ?self = a
?self::a
self in IO ()
(?self::a) => IO ()
cb
    let wrapped' :: C_WidgetAccelClosuresChangedCallback
wrapped' = (a -> IO ()) -> C_WidgetAccelClosuresChangedCallback
forall a.
GObject a =>
(a -> IO ()) -> C_WidgetAccelClosuresChangedCallback
wrap_WidgetDestroyCallback a -> IO ()
wrapped
    FunPtr C_WidgetAccelClosuresChangedCallback
wrapped'' <- C_WidgetAccelClosuresChangedCallback
-> IO (FunPtr C_WidgetAccelClosuresChangedCallback)
mk_WidgetDestroyCallback C_WidgetAccelClosuresChangedCallback
wrapped'
    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 Text
"destroy" FunPtr C_WidgetAccelClosuresChangedCallback
wrapped'' 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
-- @
-- 
-- 
-- 
-- By default the object invoking the signal is not passed to the callback.
-- If you need to access it, you can use the implit @?self@ parameter.
-- Note that this requires activating the @ImplicitParams@ GHC extension.
-- 
afterWidgetDestroy :: (IsWidget a, MonadIO m) => a -> ((?self :: a) => WidgetDestroyCallback) -> m SignalHandlerId
afterWidgetDestroy :: forall a (m :: * -> *).
(IsWidget a, MonadIO m) =>
a -> ((?self::a) => IO ()) -> m SignalHandlerId
afterWidgetDestroy a
obj (?self::a) => 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 wrapped :: a -> IO ()
wrapped a
self = let ?self = a
?self::a
self in IO ()
(?self::a) => IO ()
cb
    let wrapped' :: C_WidgetAccelClosuresChangedCallback
wrapped' = (a -> IO ()) -> C_WidgetAccelClosuresChangedCallback
forall a.
GObject a =>
(a -> IO ()) -> C_WidgetAccelClosuresChangedCallback
wrap_WidgetDestroyCallback a -> IO ()
wrapped
    FunPtr C_WidgetAccelClosuresChangedCallback
wrapped'' <- C_WidgetAccelClosuresChangedCallback
-> IO (FunPtr C_WidgetAccelClosuresChangedCallback)
mk_WidgetDestroyCallback C_WidgetAccelClosuresChangedCallback
wrapped'
    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 Text
"destroy" FunPtr C_WidgetAccelClosuresChangedCallback
wrapped'' 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
    dbgSignalInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Gtk.Objects.Widget::destroy"
        , O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-3.0.38/docs/GI-Gtk-Objects-Widget.html#g:signal:destroy"})

#endif

-- signal Widget::destroy-event
-- | The [destroyEvent](#g:signal:destroyEvent) signal is emitted when a t'GI.Gdk.Objects.Window.Window' is destroyed.
-- You rarely get this signal, because most widgets disconnect themselves
-- from their window before they destroy it, so no widget owns the
-- window at destroy time.
-- 
-- To receive this signal, the t'GI.Gdk.Objects.Window.Window' associated to the widget needs
-- to enable the @/GDK_STRUCTURE_MASK/@ mask. GDK will enable this mask
-- automatically for all new windows.
type WidgetDestroyEventCallback =
    Gdk.Event.Event
    -- ^ /@event@/: the event which triggered this signal
    -> IO Bool
    -- ^ __Returns:__ 'P.True' to stop other handlers from being invoked for the event.
    --   'P.False' to propagate the event further.

type C_WidgetDestroyEventCallback =
    Ptr Widget ->                           -- object
    Ptr Gdk.Event.Event ->
    Ptr () ->                               -- user_data
    IO CInt

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

wrap_WidgetDestroyEventCallback :: 
    GObject a => (a -> WidgetDestroyEventCallback) ->
    C_WidgetDestroyEventCallback
wrap_WidgetDestroyEventCallback :: forall a.
GObject a =>
(a -> WidgetDeleteEventCallback) -> C_WidgetDeleteEventCallback
wrap_WidgetDestroyEventCallback a -> WidgetDeleteEventCallback
gi'cb Ptr Widget
gi'selfPtr Ptr Event
event Ptr ()
_ = do
    Ptr Event -> (Event -> IO CInt) -> IO CInt
forall a b.
(HasCallStack, ManagedPtrNewtype a) =>
Ptr a -> (a -> IO b) -> IO b
B.ManagedPtr.withTransient  Ptr Event
event ((Event -> IO CInt) -> IO CInt) -> (Event -> IO CInt) -> IO CInt
forall a b. (a -> b) -> a -> b
$ \Event
event' -> do
        Bool
result <- Ptr Widget -> (Widget -> IO Bool) -> IO Bool
forall a b.
(HasCallStack, ManagedPtrNewtype a) =>
Ptr a -> (a -> IO b) -> IO b
B.ManagedPtr.withTransient Ptr Widget
gi'selfPtr ((Widget -> IO Bool) -> IO Bool) -> (Widget -> IO Bool) -> IO Bool
forall a b. (a -> b) -> a -> b
$ \Widget
gi'self -> a -> WidgetDeleteEventCallback
gi'cb (Widget -> a
Coerce.coerce Widget
gi'self)  Event
event'
        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 [destroyEvent](#signal:destroyEvent) signal, to be run before the default handler.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Signals.on' widget #destroyEvent callback
-- @
-- 
-- 
onWidgetDestroyEvent :: (IsWidget a, MonadIO m) => a -> ((?self :: a) => WidgetDestroyEventCallback) -> m SignalHandlerId
onWidgetDestroyEvent :: forall a (m :: * -> *).
(IsWidget a, MonadIO m) =>
a -> ((?self::a) => WidgetDeleteEventCallback) -> m SignalHandlerId
onWidgetDestroyEvent a
obj (?self::a) => WidgetDeleteEventCallback
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 wrapped :: a -> WidgetDeleteEventCallback
wrapped a
self = let ?self = a
?self::a
self in (?self::a) => WidgetDeleteEventCallback
WidgetDeleteEventCallback
cb
    let wrapped' :: C_WidgetDeleteEventCallback
wrapped' = (a -> WidgetDeleteEventCallback) -> C_WidgetDeleteEventCallback
forall a.
GObject a =>
(a -> WidgetDeleteEventCallback) -> C_WidgetDeleteEventCallback
wrap_WidgetDestroyEventCallback a -> WidgetDeleteEventCallback
wrapped
    FunPtr C_WidgetDeleteEventCallback
wrapped'' <- C_WidgetDeleteEventCallback
-> IO (FunPtr C_WidgetDeleteEventCallback)
mk_WidgetDestroyEventCallback C_WidgetDeleteEventCallback
wrapped'
    a
-> Text
-> FunPtr C_WidgetDeleteEventCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj Text
"destroy-event" FunPtr C_WidgetDeleteEventCallback
wrapped'' SignalConnectMode
SignalConnectBefore Maybe Text
forall a. Maybe a
Nothing

-- | Connect a signal handler for the [destroyEvent](#signal:destroyEvent) signal, to be run after the default handler.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Signals.after' widget #destroyEvent callback
-- @
-- 
-- 
-- 
-- By default the object invoking the signal is not passed to the callback.
-- If you need to access it, you can use the implit @?self@ parameter.
-- Note that this requires activating the @ImplicitParams@ GHC extension.
-- 
afterWidgetDestroyEvent :: (IsWidget a, MonadIO m) => a -> ((?self :: a) => WidgetDestroyEventCallback) -> m SignalHandlerId
afterWidgetDestroyEvent :: forall a (m :: * -> *).
(IsWidget a, MonadIO m) =>
a -> ((?self::a) => WidgetDeleteEventCallback) -> m SignalHandlerId
afterWidgetDestroyEvent a
obj (?self::a) => WidgetDeleteEventCallback
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 wrapped :: a -> WidgetDeleteEventCallback
wrapped a
self = let ?self = a
?self::a
self in (?self::a) => WidgetDeleteEventCallback
WidgetDeleteEventCallback
cb
    let wrapped' :: C_WidgetDeleteEventCallback
wrapped' = (a -> WidgetDeleteEventCallback) -> C_WidgetDeleteEventCallback
forall a.
GObject a =>
(a -> WidgetDeleteEventCallback) -> C_WidgetDeleteEventCallback
wrap_WidgetDestroyEventCallback a -> WidgetDeleteEventCallback
wrapped
    FunPtr C_WidgetDeleteEventCallback
wrapped'' <- C_WidgetDeleteEventCallback
-> IO (FunPtr C_WidgetDeleteEventCallback)
mk_WidgetDestroyEventCallback C_WidgetDeleteEventCallback
wrapped'
    a
-> Text
-> FunPtr C_WidgetDeleteEventCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj Text
"destroy-event" FunPtr C_WidgetDeleteEventCallback
wrapped'' SignalConnectMode
SignalConnectAfter Maybe Text
forall a. Maybe a
Nothing


#if defined(ENABLE_OVERLOADING)
data WidgetDestroyEventSignalInfo
instance SignalInfo WidgetDestroyEventSignalInfo where
    type HaskellCallbackType WidgetDestroyEventSignalInfo = WidgetDestroyEventCallback
    connectSignal obj cb connectMode detail = do
        let cb' = wrap_WidgetDestroyEventCallback cb
        cb'' <- mk_WidgetDestroyEventCallback cb'
        connectSignalFunPtr obj "destroy-event" cb'' connectMode detail
    dbgSignalInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Gtk.Objects.Widget::destroy-event"
        , O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-3.0.38/docs/GI-Gtk-Objects-Widget.html#g:signal:destroyEvent"})

#endif

-- signal Widget::direction-changed
-- | The [directionChanged](#g: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 ()

type C_WidgetDirectionChangedCallback =
    Ptr Widget ->                           -- 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_WidgetDirectionChangedCallback :: 
    GObject a => (a -> WidgetDirectionChangedCallback) ->
    C_WidgetDirectionChangedCallback
wrap_WidgetDirectionChangedCallback :: forall a.
GObject a =>
(a -> WidgetDirectionChangedCallback)
-> C_WidgetDirectionChangedCallback
wrap_WidgetDirectionChangedCallback a -> WidgetDirectionChangedCallback
gi'cb Ptr Widget
gi'selfPtr CUInt
previousDirection Ptr ()
_ = 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
    Ptr Widget -> (Widget -> IO ()) -> IO ()
forall a b.
(HasCallStack, ManagedPtrNewtype a) =>
Ptr a -> (a -> IO b) -> IO b
B.ManagedPtr.withTransient Ptr Widget
gi'selfPtr ((Widget -> IO ()) -> IO ()) -> (Widget -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Widget
gi'self -> a -> WidgetDirectionChangedCallback
gi'cb (Widget -> a
Coerce.coerce Widget
gi'self)  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 -> ((?self :: a) => WidgetDirectionChangedCallback) -> m SignalHandlerId
onWidgetDirectionChanged :: forall a (m :: * -> *).
(IsWidget a, MonadIO m) =>
a
-> ((?self::a) => WidgetDirectionChangedCallback)
-> m SignalHandlerId
onWidgetDirectionChanged a
obj (?self::a) => 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 wrapped :: a -> WidgetDirectionChangedCallback
wrapped a
self = let ?self = a
?self::a
self in (?self::a) => WidgetDirectionChangedCallback
WidgetDirectionChangedCallback
cb
    let wrapped' :: C_WidgetDirectionChangedCallback
wrapped' = (a -> WidgetDirectionChangedCallback)
-> C_WidgetDirectionChangedCallback
forall a.
GObject a =>
(a -> WidgetDirectionChangedCallback)
-> C_WidgetDirectionChangedCallback
wrap_WidgetDirectionChangedCallback a -> WidgetDirectionChangedCallback
wrapped
    FunPtr C_WidgetDirectionChangedCallback
wrapped'' <- C_WidgetDirectionChangedCallback
-> IO (FunPtr C_WidgetDirectionChangedCallback)
mk_WidgetDirectionChangedCallback C_WidgetDirectionChangedCallback
wrapped'
    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 Text
"direction-changed" FunPtr C_WidgetDirectionChangedCallback
wrapped'' 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
-- @
-- 
-- 
-- 
-- By default the object invoking the signal is not passed to the callback.
-- If you need to access it, you can use the implit @?self@ parameter.
-- Note that this requires activating the @ImplicitParams@ GHC extension.
-- 
afterWidgetDirectionChanged :: (IsWidget a, MonadIO m) => a -> ((?self :: a) => WidgetDirectionChangedCallback) -> m SignalHandlerId
afterWidgetDirectionChanged :: forall a (m :: * -> *).
(IsWidget a, MonadIO m) =>
a
-> ((?self::a) => WidgetDirectionChangedCallback)
-> m SignalHandlerId
afterWidgetDirectionChanged a
obj (?self::a) => 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 wrapped :: a -> WidgetDirectionChangedCallback
wrapped a
self = let ?self = a
?self::a
self in (?self::a) => WidgetDirectionChangedCallback
WidgetDirectionChangedCallback
cb
    let wrapped' :: C_WidgetDirectionChangedCallback
wrapped' = (a -> WidgetDirectionChangedCallback)
-> C_WidgetDirectionChangedCallback
forall a.
GObject a =>
(a -> WidgetDirectionChangedCallback)
-> C_WidgetDirectionChangedCallback
wrap_WidgetDirectionChangedCallback a -> WidgetDirectionChangedCallback
wrapped
    FunPtr C_WidgetDirectionChangedCallback
wrapped'' <- C_WidgetDirectionChangedCallback
-> IO (FunPtr C_WidgetDirectionChangedCallback)
mk_WidgetDirectionChangedCallback C_WidgetDirectionChangedCallback
wrapped'
    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 Text
"direction-changed" FunPtr C_WidgetDirectionChangedCallback
wrapped'' 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
    dbgSignalInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Gtk.Objects.Widget::direction-changed"
        , O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-3.0.38/docs/GI-Gtk-Objects-Widget.html#g:signal:directionChanged"})

#endif

-- signal Widget::drag-begin
-- | The [dragBegin](#g: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.widgetDragSourceSetIconPixbuf'.
-- 
-- Note that some widgets set up a drag icon in the default handler of
-- this signal, so you may have to use @/g_signal_connect_after()/@ to
-- override what the default handler did.
type WidgetDragBeginCallback =
    Gdk.DragContext.DragContext
    -- ^ /@context@/: the drag context
    -> IO ()

type C_WidgetDragBeginCallback =
    Ptr Widget ->                           -- object
    Ptr Gdk.DragContext.DragContext ->
    Ptr () ->                               -- user_data
    IO ()

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

wrap_WidgetDragBeginCallback :: 
    GObject a => (a -> WidgetDragBeginCallback) ->
    C_WidgetDragBeginCallback
wrap_WidgetDragBeginCallback :: forall a.
GObject a =>
(a -> WidgetDragBeginCallback) -> C_WidgetDragBeginCallback
wrap_WidgetDragBeginCallback a -> WidgetDragBeginCallback
gi'cb Ptr Widget
gi'selfPtr Ptr DragContext
context Ptr ()
_ = do
    DragContext
context' <- ((ManagedPtr DragContext -> DragContext)
-> Ptr DragContext -> IO DragContext
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr DragContext -> DragContext
Gdk.DragContext.DragContext) Ptr DragContext
context
    Ptr Widget -> (Widget -> IO ()) -> IO ()
forall a b.
(HasCallStack, ManagedPtrNewtype a) =>
Ptr a -> (a -> IO b) -> IO b
B.ManagedPtr.withTransient Ptr Widget
gi'selfPtr ((Widget -> IO ()) -> IO ()) -> (Widget -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Widget
gi'self -> a -> WidgetDragBeginCallback
gi'cb (Widget -> a
Coerce.coerce Widget
gi'self)  DragContext
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 -> ((?self :: a) => WidgetDragBeginCallback) -> m SignalHandlerId
onWidgetDragBegin :: forall a (m :: * -> *).
(IsWidget a, MonadIO m) =>
a -> ((?self::a) => WidgetDragBeginCallback) -> m SignalHandlerId
onWidgetDragBegin a
obj (?self::a) => 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 wrapped :: a -> WidgetDragBeginCallback
wrapped a
self = let ?self = a
?self::a
self in (?self::a) => WidgetDragBeginCallback
WidgetDragBeginCallback
cb
    let wrapped' :: C_WidgetDragBeginCallback
wrapped' = (a -> WidgetDragBeginCallback) -> C_WidgetDragBeginCallback
forall a.
GObject a =>
(a -> WidgetDragBeginCallback) -> C_WidgetDragBeginCallback
wrap_WidgetDragBeginCallback a -> WidgetDragBeginCallback
wrapped
    FunPtr C_WidgetDragBeginCallback
wrapped'' <- C_WidgetDragBeginCallback -> IO (FunPtr C_WidgetDragBeginCallback)
mk_WidgetDragBeginCallback C_WidgetDragBeginCallback
wrapped'
    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 Text
"drag-begin" FunPtr C_WidgetDragBeginCallback
wrapped'' 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
-- @
-- 
-- 
-- 
-- By default the object invoking the signal is not passed to the callback.
-- If you need to access it, you can use the implit @?self@ parameter.
-- Note that this requires activating the @ImplicitParams@ GHC extension.
-- 
afterWidgetDragBegin :: (IsWidget a, MonadIO m) => a -> ((?self :: a) => WidgetDragBeginCallback) -> m SignalHandlerId
afterWidgetDragBegin :: forall a (m :: * -> *).
(IsWidget a, MonadIO m) =>
a -> ((?self::a) => WidgetDragBeginCallback) -> m SignalHandlerId
afterWidgetDragBegin a
obj (?self::a) => 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 wrapped :: a -> WidgetDragBeginCallback
wrapped a
self = let ?self = a
?self::a
self in (?self::a) => WidgetDragBeginCallback
WidgetDragBeginCallback
cb
    let wrapped' :: C_WidgetDragBeginCallback
wrapped' = (a -> WidgetDragBeginCallback) -> C_WidgetDragBeginCallback
forall a.
GObject a =>
(a -> WidgetDragBeginCallback) -> C_WidgetDragBeginCallback
wrap_WidgetDragBeginCallback a -> WidgetDragBeginCallback
wrapped
    FunPtr C_WidgetDragBeginCallback
wrapped'' <- C_WidgetDragBeginCallback -> IO (FunPtr C_WidgetDragBeginCallback)
mk_WidgetDragBeginCallback C_WidgetDragBeginCallback
wrapped'
    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 Text
"drag-begin" FunPtr C_WidgetDragBeginCallback
wrapped'' 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
    dbgSignalInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Gtk.Objects.Widget::drag-begin"
        , O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-3.0.38/docs/GI-Gtk-Objects-Widget.html#g:signal:dragBegin"})

#endif

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

type C_WidgetDragDataDeleteCallback =
    Ptr Widget ->                           -- object
    Ptr Gdk.DragContext.DragContext ->
    Ptr () ->                               -- user_data
    IO ()

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

wrap_WidgetDragDataDeleteCallback :: 
    GObject a => (a -> WidgetDragDataDeleteCallback) ->
    C_WidgetDragDataDeleteCallback
wrap_WidgetDragDataDeleteCallback :: forall a.
GObject a =>
(a -> WidgetDragBeginCallback) -> C_WidgetDragBeginCallback
wrap_WidgetDragDataDeleteCallback a -> WidgetDragBeginCallback
gi'cb Ptr Widget
gi'selfPtr Ptr DragContext
context Ptr ()
_ = do
    DragContext
context' <- ((ManagedPtr DragContext -> DragContext)
-> Ptr DragContext -> IO DragContext
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr DragContext -> DragContext
Gdk.DragContext.DragContext) Ptr DragContext
context
    Ptr Widget -> (Widget -> IO ()) -> IO ()
forall a b.
(HasCallStack, ManagedPtrNewtype a) =>
Ptr a -> (a -> IO b) -> IO b
B.ManagedPtr.withTransient Ptr Widget
gi'selfPtr ((Widget -> IO ()) -> IO ()) -> (Widget -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Widget
gi'self -> a -> WidgetDragBeginCallback
gi'cb (Widget -> a
Coerce.coerce Widget
gi'self)  DragContext
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 -> ((?self :: a) => WidgetDragDataDeleteCallback) -> m SignalHandlerId
onWidgetDragDataDelete :: forall a (m :: * -> *).
(IsWidget a, MonadIO m) =>
a -> ((?self::a) => WidgetDragBeginCallback) -> m SignalHandlerId
onWidgetDragDataDelete a
obj (?self::a) => 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 wrapped :: a -> WidgetDragBeginCallback
wrapped a
self = let ?self = a
?self::a
self in (?self::a) => WidgetDragBeginCallback
WidgetDragBeginCallback
cb
    let wrapped' :: C_WidgetDragBeginCallback
wrapped' = (a -> WidgetDragBeginCallback) -> C_WidgetDragBeginCallback
forall a.
GObject a =>
(a -> WidgetDragBeginCallback) -> C_WidgetDragBeginCallback
wrap_WidgetDragDataDeleteCallback a -> WidgetDragBeginCallback
wrapped
    FunPtr C_WidgetDragBeginCallback
wrapped'' <- C_WidgetDragBeginCallback -> IO (FunPtr C_WidgetDragBeginCallback)
mk_WidgetDragDataDeleteCallback C_WidgetDragBeginCallback
wrapped'
    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 Text
"drag-data-delete" FunPtr C_WidgetDragBeginCallback
wrapped'' 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
-- @
-- 
-- 
-- 
-- By default the object invoking the signal is not passed to the callback.
-- If you need to access it, you can use the implit @?self@ parameter.
-- Note that this requires activating the @ImplicitParams@ GHC extension.
-- 
afterWidgetDragDataDelete :: (IsWidget a, MonadIO m) => a -> ((?self :: a) => WidgetDragDataDeleteCallback) -> m SignalHandlerId
afterWidgetDragDataDelete :: forall a (m :: * -> *).
(IsWidget a, MonadIO m) =>
a -> ((?self::a) => WidgetDragBeginCallback) -> m SignalHandlerId
afterWidgetDragDataDelete a
obj (?self::a) => 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 wrapped :: a -> WidgetDragBeginCallback
wrapped a
self = let ?self = a
?self::a
self in (?self::a) => WidgetDragBeginCallback
WidgetDragBeginCallback
cb
    let wrapped' :: C_WidgetDragBeginCallback
wrapped' = (a -> WidgetDragBeginCallback) -> C_WidgetDragBeginCallback
forall a.
GObject a =>
(a -> WidgetDragBeginCallback) -> C_WidgetDragBeginCallback
wrap_WidgetDragDataDeleteCallback a -> WidgetDragBeginCallback
wrapped
    FunPtr C_WidgetDragBeginCallback
wrapped'' <- C_WidgetDragBeginCallback -> IO (FunPtr C_WidgetDragBeginCallback)
mk_WidgetDragDataDeleteCallback C_WidgetDragBeginCallback
wrapped'
    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 Text
"drag-data-delete" FunPtr C_WidgetDragBeginCallback
wrapped'' 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
    dbgSignalInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Gtk.Objects.Widget::drag-data-delete"
        , O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-3.0.38/docs/GI-Gtk-Objects-Widget.html#g:signal:dragDataDelete"})

#endif

-- signal Widget::drag-data-get
-- | The [dragDataGet](#g: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.DragContext.DragContext
    -- ^ /@context@/: the drag context
    -> Gtk.SelectionData.SelectionData
    -- ^ /@data@/: the t'GI.Gtk.Structs.SelectionData.SelectionData' to be filled with the dragged data
    -> Word32
    -- ^ /@info@/: the info that has been registered with the target in the
    --        t'GI.Gtk.Structs.TargetList.TargetList'
    -> Word32
    -- ^ /@time@/: the timestamp at which the data was requested
    -> IO ()

type C_WidgetDragDataGetCallback =
    Ptr Widget ->                           -- object
    Ptr Gdk.DragContext.DragContext ->
    Ptr Gtk.SelectionData.SelectionData ->
    Word32 ->
    Word32 ->
    Ptr () ->                               -- user_data
    IO ()

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

wrap_WidgetDragDataGetCallback :: 
    GObject a => (a -> WidgetDragDataGetCallback) ->
    C_WidgetDragDataGetCallback
wrap_WidgetDragDataGetCallback :: forall a.
GObject a =>
(a -> WidgetDragDataGetCallback) -> C_WidgetDragDataGetCallback
wrap_WidgetDragDataGetCallback a -> WidgetDragDataGetCallback
gi'cb Ptr Widget
gi'selfPtr Ptr DragContext
context Ptr SelectionData
data_ Word32
info Word32
time Ptr ()
_ = do
    DragContext
context' <- ((ManagedPtr DragContext -> DragContext)
-> Ptr DragContext -> IO DragContext
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr DragContext -> DragContext
Gdk.DragContext.DragContext) Ptr DragContext
context
    Ptr SelectionData -> (SelectionData -> IO ()) -> IO ()
forall a b.
(HasCallStack, ManagedPtrNewtype a) =>
Ptr a -> (a -> IO b) -> IO b
B.ManagedPtr.withTransient  Ptr SelectionData
data_ ((SelectionData -> IO ()) -> IO ())
-> (SelectionData -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \SelectionData
data_' -> do
        Ptr Widget -> (Widget -> IO ()) -> IO ()
forall a b.
(HasCallStack, ManagedPtrNewtype a) =>
Ptr a -> (a -> IO b) -> IO b
B.ManagedPtr.withTransient Ptr Widget
gi'selfPtr ((Widget -> IO ()) -> IO ()) -> (Widget -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Widget
gi'self -> a -> WidgetDragDataGetCallback
gi'cb (Widget -> a
Coerce.coerce Widget
gi'self)  DragContext
context' SelectionData
data_' Word32
info Word32
time


-- | 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 -> ((?self :: a) => WidgetDragDataGetCallback) -> m SignalHandlerId
onWidgetDragDataGet :: forall a (m :: * -> *).
(IsWidget a, MonadIO m) =>
a -> ((?self::a) => WidgetDragDataGetCallback) -> m SignalHandlerId
onWidgetDragDataGet a
obj (?self::a) => 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 wrapped :: a -> WidgetDragDataGetCallback
wrapped a
self = let ?self = a
?self::a
self in (?self::a) => WidgetDragDataGetCallback
WidgetDragDataGetCallback
cb
    let wrapped' :: C_WidgetDragDataGetCallback
wrapped' = (a -> WidgetDragDataGetCallback) -> C_WidgetDragDataGetCallback
forall a.
GObject a =>
(a -> WidgetDragDataGetCallback) -> C_WidgetDragDataGetCallback
wrap_WidgetDragDataGetCallback a -> WidgetDragDataGetCallback
wrapped
    FunPtr C_WidgetDragDataGetCallback
wrapped'' <- C_WidgetDragDataGetCallback
-> IO (FunPtr C_WidgetDragDataGetCallback)
mk_WidgetDragDataGetCallback C_WidgetDragDataGetCallback
wrapped'
    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 Text
"drag-data-get" FunPtr C_WidgetDragDataGetCallback
wrapped'' 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
-- @
-- 
-- 
-- 
-- By default the object invoking the signal is not passed to the callback.
-- If you need to access it, you can use the implit @?self@ parameter.
-- Note that this requires activating the @ImplicitParams@ GHC extension.
-- 
afterWidgetDragDataGet :: (IsWidget a, MonadIO m) => a -> ((?self :: a) => WidgetDragDataGetCallback) -> m SignalHandlerId
afterWidgetDragDataGet :: forall a (m :: * -> *).
(IsWidget a, MonadIO m) =>
a -> ((?self::a) => WidgetDragDataGetCallback) -> m SignalHandlerId
afterWidgetDragDataGet a
obj (?self::a) => 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 wrapped :: a -> WidgetDragDataGetCallback
wrapped a
self = let ?self = a
?self::a
self in (?self::a) => WidgetDragDataGetCallback
WidgetDragDataGetCallback
cb
    let wrapped' :: C_WidgetDragDataGetCallback
wrapped' = (a -> WidgetDragDataGetCallback) -> C_WidgetDragDataGetCallback
forall a.
GObject a =>
(a -> WidgetDragDataGetCallback) -> C_WidgetDragDataGetCallback
wrap_WidgetDragDataGetCallback a -> WidgetDragDataGetCallback
wrapped
    FunPtr C_WidgetDragDataGetCallback
wrapped'' <- C_WidgetDragDataGetCallback
-> IO (FunPtr C_WidgetDragDataGetCallback)
mk_WidgetDragDataGetCallback C_WidgetDragDataGetCallback
wrapped'
    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 Text
"drag-data-get" FunPtr C_WidgetDragDataGetCallback
wrapped'' 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
    dbgSignalInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Gtk.Objects.Widget::drag-data-get"
        , O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-3.0.38/docs/GI-Gtk-Objects-Widget.html#g:signal:dragDataGet"})

#endif

-- signal Widget::drag-data-received
-- | The [dragDataReceived](#g: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 'GI.Gdk.Functions.dragStatus' and not finish the drag.
-- If the data was received in response to a [dragDrop]("GI.Gtk.Objects.Widget#g: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
-- 'GI.Gtk.Functions.dragFinish', setting the /@success@/ parameter depending on
-- whether the data was processed successfully.
-- 
-- Applications must create some means to determine why the signal was emitted
-- and therefore whether to call 'GI.Gdk.Functions.dragStatus' or 'GI.Gtk.Functions.dragFinish'.
-- 
-- The handler may inspect the selected action with
-- 'GI.Gdk.Objects.DragContext.dragContextGetSelectedAction' before calling
-- 'GI.Gtk.Functions.dragFinish', e.g. to implement 'GI.Gdk.Flags.DragActionAsk' as
-- shown in the following example:
-- 
-- === /C code/
-- >
-- >void
-- >drag_data_received (GtkWidget          *widget,
-- >                    GdkDragContext     *context,
-- >                    gint                x,
-- >                    gint                y,
-- >                    GtkSelectionData   *data,
-- >                    guint               info,
-- >                    guint               time)
-- >{
-- >  if ((data->length >= 0) && (data->format == 8))
-- >    {
-- >      GdkDragAction action;
-- >
-- >      // handle data here
-- >
-- >      action = gdk_drag_context_get_selected_action (context);
-- >      if (action == GDK_ACTION_ASK)
-- >        {
-- >          GtkWidget *dialog;
-- >          gint response;
-- >
-- >          dialog = gtk_message_dialog_new (NULL,
-- >                                           GTK_DIALOG_MODAL |
-- >                                           GTK_DIALOG_DESTROY_WITH_PARENT,
-- >                                           GTK_MESSAGE_INFO,
-- >                                           GTK_BUTTONS_YES_NO,
-- >                                           "Move the data ?\n");
-- >          response = gtk_dialog_run (GTK_DIALOG (dialog));
-- >          gtk_widget_destroy (dialog);
-- >
-- >          if (response == GTK_RESPONSE_YES)
-- >            action = GDK_ACTION_MOVE;
-- >          else
-- >            action = GDK_ACTION_COPY;
-- >         }
-- >
-- >      gtk_drag_finish (context, TRUE, action == GDK_ACTION_MOVE, time);
-- >    }
-- >  else
-- >    gtk_drag_finish (context, FALSE, FALSE, time);
-- > }
type WidgetDragDataReceivedCallback =
    Gdk.DragContext.DragContext
    -- ^ /@context@/: the drag context
    -> Int32
    -- ^ /@x@/: where the drop happened
    -> Int32
    -- ^ /@y@/: where the drop happened
    -> Gtk.SelectionData.SelectionData
    -- ^ /@data@/: the received data
    -> Word32
    -- ^ /@info@/: the info that has been registered with the target in the
    --        t'GI.Gtk.Structs.TargetList.TargetList'
    -> Word32
    -- ^ /@time@/: the timestamp at which the data was received
    -> IO ()

type C_WidgetDragDataReceivedCallback =
    Ptr Widget ->                           -- object
    Ptr Gdk.DragContext.DragContext ->
    Int32 ->
    Int32 ->
    Ptr Gtk.SelectionData.SelectionData ->
    Word32 ->
    Word32 ->
    Ptr () ->                               -- user_data
    IO ()

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

wrap_WidgetDragDataReceivedCallback :: 
    GObject a => (a -> WidgetDragDataReceivedCallback) ->
    C_WidgetDragDataReceivedCallback
wrap_WidgetDragDataReceivedCallback :: forall a.
GObject a =>
(a -> WidgetDragDataReceivedCallback)
-> C_WidgetDragDataReceivedCallback
wrap_WidgetDragDataReceivedCallback a -> WidgetDragDataReceivedCallback
gi'cb Ptr Widget
gi'selfPtr Ptr DragContext
context Int32
x Int32
y Ptr SelectionData
data_ Word32
info Word32
time Ptr ()
_ = do
    DragContext
context' <- ((ManagedPtr DragContext -> DragContext)
-> Ptr DragContext -> IO DragContext
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr DragContext -> DragContext
Gdk.DragContext.DragContext) Ptr DragContext
context
    Ptr SelectionData -> (SelectionData -> IO ()) -> IO ()
forall a b.
(HasCallStack, ManagedPtrNewtype a) =>
Ptr a -> (a -> IO b) -> IO b
B.ManagedPtr.withTransient  Ptr SelectionData
data_ ((SelectionData -> IO ()) -> IO ())
-> (SelectionData -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \SelectionData
data_' -> do
        Ptr Widget -> (Widget -> IO ()) -> IO ()
forall a b.
(HasCallStack, ManagedPtrNewtype a) =>
Ptr a -> (a -> IO b) -> IO b
B.ManagedPtr.withTransient Ptr Widget
gi'selfPtr ((Widget -> IO ()) -> IO ()) -> (Widget -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Widget
gi'self -> a -> WidgetDragDataReceivedCallback
gi'cb (Widget -> a
Coerce.coerce Widget
gi'self)  DragContext
context' Int32
x Int32
y SelectionData
data_' Word32
info Word32
time


-- | 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 -> ((?self :: a) => WidgetDragDataReceivedCallback) -> m SignalHandlerId
onWidgetDragDataReceived :: forall a (m :: * -> *).
(IsWidget a, MonadIO m) =>
a
-> ((?self::a) => WidgetDragDataReceivedCallback)
-> m SignalHandlerId
onWidgetDragDataReceived a
obj (?self::a) => 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 wrapped :: a -> WidgetDragDataReceivedCallback
wrapped a
self = let ?self = a
?self::a
self in (?self::a) => WidgetDragDataReceivedCallback
WidgetDragDataReceivedCallback
cb
    let wrapped' :: C_WidgetDragDataReceivedCallback
wrapped' = (a -> WidgetDragDataReceivedCallback)
-> C_WidgetDragDataReceivedCallback
forall a.
GObject a =>
(a -> WidgetDragDataReceivedCallback)
-> C_WidgetDragDataReceivedCallback
wrap_WidgetDragDataReceivedCallback a -> WidgetDragDataReceivedCallback
wrapped
    FunPtr C_WidgetDragDataReceivedCallback
wrapped'' <- C_WidgetDragDataReceivedCallback
-> IO (FunPtr C_WidgetDragDataReceivedCallback)
mk_WidgetDragDataReceivedCallback C_WidgetDragDataReceivedCallback
wrapped'
    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 Text
"drag-data-received" FunPtr C_WidgetDragDataReceivedCallback
wrapped'' 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
-- @
-- 
-- 
-- 
-- By default the object invoking the signal is not passed to the callback.
-- If you need to access it, you can use the implit @?self@ parameter.
-- Note that this requires activating the @ImplicitParams@ GHC extension.
-- 
afterWidgetDragDataReceived :: (IsWidget a, MonadIO m) => a -> ((?self :: a) => WidgetDragDataReceivedCallback) -> m SignalHandlerId
afterWidgetDragDataReceived :: forall a (m :: * -> *).
(IsWidget a, MonadIO m) =>
a
-> ((?self::a) => WidgetDragDataReceivedCallback)
-> m SignalHandlerId
afterWidgetDragDataReceived a
obj (?self::a) => 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 wrapped :: a -> WidgetDragDataReceivedCallback
wrapped a
self = let ?self = a
?self::a
self in (?self::a) => WidgetDragDataReceivedCallback
WidgetDragDataReceivedCallback
cb
    let wrapped' :: C_WidgetDragDataReceivedCallback
wrapped' = (a -> WidgetDragDataReceivedCallback)
-> C_WidgetDragDataReceivedCallback
forall a.
GObject a =>
(a -> WidgetDragDataReceivedCallback)
-> C_WidgetDragDataReceivedCallback
wrap_WidgetDragDataReceivedCallback a -> WidgetDragDataReceivedCallback
wrapped
    FunPtr C_WidgetDragDataReceivedCallback
wrapped'' <- C_WidgetDragDataReceivedCallback
-> IO (FunPtr C_WidgetDragDataReceivedCallback)
mk_WidgetDragDataReceivedCallback C_WidgetDragDataReceivedCallback
wrapped'
    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 Text
"drag-data-received" FunPtr C_WidgetDragDataReceivedCallback
wrapped'' 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
    dbgSignalInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Gtk.Objects.Widget::drag-data-received"
        , O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-3.0.38/docs/GI-Gtk-Objects-Widget.html#g:signal:dragDataReceived"})

#endif

-- signal Widget::drag-drop
-- | The [dragDrop](#g: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 'GI.Gtk.Functions.dragFinish' is called to let the source know that
-- the drop is done. The call to 'GI.Gtk.Functions.dragFinish' can be done either
-- directly or in a [dragDataReceived]("GI.Gtk.Objects.Widget#g: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.DragContext.DragContext
    -- ^ /@context@/: the drag context
    -> Int32
    -- ^ /@x@/: the x coordinate of the current cursor position
    -> Int32
    -- ^ /@y@/: the y coordinate of the current cursor position
    -> Word32
    -- ^ /@time@/: the timestamp of the motion event
    -> IO Bool
    -- ^ __Returns:__ whether the cursor position is in a drop zone

type C_WidgetDragDropCallback =
    Ptr Widget ->                           -- object
    Ptr Gdk.DragContext.DragContext ->
    Int32 ->
    Int32 ->
    Word32 ->
    Ptr () ->                               -- user_data
    IO CInt

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

wrap_WidgetDragDropCallback :: 
    GObject a => (a -> WidgetDragDropCallback) ->
    C_WidgetDragDropCallback
wrap_WidgetDragDropCallback :: forall a.
GObject a =>
(a -> WidgetDragDropCallback) -> C_WidgetDragDropCallback
wrap_WidgetDragDropCallback a -> WidgetDragDropCallback
gi'cb Ptr Widget
gi'selfPtr Ptr DragContext
context Int32
x Int32
y Word32
time Ptr ()
_ = do
    DragContext
context' <- ((ManagedPtr DragContext -> DragContext)
-> Ptr DragContext -> IO DragContext
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr DragContext -> DragContext
Gdk.DragContext.DragContext) Ptr DragContext
context
    Bool
result <- Ptr Widget -> (Widget -> IO Bool) -> IO Bool
forall a b.
(HasCallStack, ManagedPtrNewtype a) =>
Ptr a -> (a -> IO b) -> IO b
B.ManagedPtr.withTransient Ptr Widget
gi'selfPtr ((Widget -> IO Bool) -> IO Bool) -> (Widget -> IO Bool) -> IO Bool
forall a b. (a -> b) -> a -> b
$ \Widget
gi'self -> a -> WidgetDragDropCallback
gi'cb (Widget -> a
Coerce.coerce Widget
gi'self)  DragContext
context' Int32
x Int32
y Word32
time
    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 -> ((?self :: a) => WidgetDragDropCallback) -> m SignalHandlerId
onWidgetDragDrop :: forall a (m :: * -> *).
(IsWidget a, MonadIO m) =>
a -> ((?self::a) => WidgetDragDropCallback) -> m SignalHandlerId
onWidgetDragDrop a
obj (?self::a) => 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 wrapped :: a -> WidgetDragDropCallback
wrapped a
self = let ?self = a
?self::a
self in (?self::a) => WidgetDragDropCallback
WidgetDragDropCallback
cb
    let wrapped' :: C_WidgetDragDropCallback
wrapped' = (a -> WidgetDragDropCallback) -> C_WidgetDragDropCallback
forall a.
GObject a =>
(a -> WidgetDragDropCallback) -> C_WidgetDragDropCallback
wrap_WidgetDragDropCallback a -> WidgetDragDropCallback
wrapped
    FunPtr C_WidgetDragDropCallback
wrapped'' <- C_WidgetDragDropCallback -> IO (FunPtr C_WidgetDragDropCallback)
mk_WidgetDragDropCallback C_WidgetDragDropCallback
wrapped'
    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 Text
"drag-drop" FunPtr C_WidgetDragDropCallback
wrapped'' 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
-- @
-- 
-- 
-- 
-- By default the object invoking the signal is not passed to the callback.
-- If you need to access it, you can use the implit @?self@ parameter.
-- Note that this requires activating the @ImplicitParams@ GHC extension.
-- 
afterWidgetDragDrop :: (IsWidget a, MonadIO m) => a -> ((?self :: a) => WidgetDragDropCallback) -> m SignalHandlerId
afterWidgetDragDrop :: forall a (m :: * -> *).
(IsWidget a, MonadIO m) =>
a -> ((?self::a) => WidgetDragDropCallback) -> m SignalHandlerId
afterWidgetDragDrop a
obj (?self::a) => 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 wrapped :: a -> WidgetDragDropCallback
wrapped a
self = let ?self = a
?self::a
self in (?self::a) => WidgetDragDropCallback
WidgetDragDropCallback
cb
    let wrapped' :: C_WidgetDragDropCallback
wrapped' = (a -> WidgetDragDropCallback) -> C_WidgetDragDropCallback
forall a.
GObject a =>
(a -> WidgetDragDropCallback) -> C_WidgetDragDropCallback
wrap_WidgetDragDropCallback a -> WidgetDragDropCallback
wrapped
    FunPtr C_WidgetDragDropCallback
wrapped'' <- C_WidgetDragDropCallback -> IO (FunPtr C_WidgetDragDropCallback)
mk_WidgetDragDropCallback C_WidgetDragDropCallback
wrapped'
    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 Text
"drag-drop" FunPtr C_WidgetDragDropCallback
wrapped'' 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
    dbgSignalInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Gtk.Objects.Widget::drag-drop"
        , O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-3.0.38/docs/GI-Gtk-Objects-Widget.html#g:signal:dragDrop"})

#endif

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

type C_WidgetDragEndCallback =
    Ptr Widget ->                           -- object
    Ptr Gdk.DragContext.DragContext ->
    Ptr () ->                               -- user_data
    IO ()

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

wrap_WidgetDragEndCallback :: 
    GObject a => (a -> WidgetDragEndCallback) ->
    C_WidgetDragEndCallback
wrap_WidgetDragEndCallback :: forall a.
GObject a =>
(a -> WidgetDragBeginCallback) -> C_WidgetDragBeginCallback
wrap_WidgetDragEndCallback a -> WidgetDragBeginCallback
gi'cb Ptr Widget
gi'selfPtr Ptr DragContext
context Ptr ()
_ = do
    DragContext
context' <- ((ManagedPtr DragContext -> DragContext)
-> Ptr DragContext -> IO DragContext
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr DragContext -> DragContext
Gdk.DragContext.DragContext) Ptr DragContext
context
    Ptr Widget -> (Widget -> IO ()) -> IO ()
forall a b.
(HasCallStack, ManagedPtrNewtype a) =>
Ptr a -> (a -> IO b) -> IO b
B.ManagedPtr.withTransient Ptr Widget
gi'selfPtr ((Widget -> IO ()) -> IO ()) -> (Widget -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Widget
gi'self -> a -> WidgetDragBeginCallback
gi'cb (Widget -> a
Coerce.coerce Widget
gi'self)  DragContext
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 -> ((?self :: a) => WidgetDragEndCallback) -> m SignalHandlerId
onWidgetDragEnd :: forall a (m :: * -> *).
(IsWidget a, MonadIO m) =>
a -> ((?self::a) => WidgetDragBeginCallback) -> m SignalHandlerId
onWidgetDragEnd a
obj (?self::a) => 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 wrapped :: a -> WidgetDragBeginCallback
wrapped a
self = let ?self = a
?self::a
self in (?self::a) => WidgetDragBeginCallback
WidgetDragBeginCallback
cb
    let wrapped' :: C_WidgetDragBeginCallback
wrapped' = (a -> WidgetDragBeginCallback) -> C_WidgetDragBeginCallback
forall a.
GObject a =>
(a -> WidgetDragBeginCallback) -> C_WidgetDragBeginCallback
wrap_WidgetDragEndCallback a -> WidgetDragBeginCallback
wrapped
    FunPtr C_WidgetDragBeginCallback
wrapped'' <- C_WidgetDragBeginCallback -> IO (FunPtr C_WidgetDragBeginCallback)
mk_WidgetDragEndCallback C_WidgetDragBeginCallback
wrapped'
    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 Text
"drag-end" FunPtr C_WidgetDragBeginCallback
wrapped'' 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
-- @
-- 
-- 
-- 
-- By default the object invoking the signal is not passed to the callback.
-- If you need to access it, you can use the implit @?self@ parameter.
-- Note that this requires activating the @ImplicitParams@ GHC extension.
-- 
afterWidgetDragEnd :: (IsWidget a, MonadIO m) => a -> ((?self :: a) => WidgetDragEndCallback) -> m SignalHandlerId
afterWidgetDragEnd :: forall a (m :: * -> *).
(IsWidget a, MonadIO m) =>
a -> ((?self::a) => WidgetDragBeginCallback) -> m SignalHandlerId
afterWidgetDragEnd a
obj (?self::a) => 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 wrapped :: a -> WidgetDragBeginCallback
wrapped a
self = let ?self = a
?self::a
self in (?self::a) => WidgetDragBeginCallback
WidgetDragBeginCallback
cb
    let wrapped' :: C_WidgetDragBeginCallback
wrapped' = (a -> WidgetDragBeginCallback) -> C_WidgetDragBeginCallback
forall a.
GObject a =>
(a -> WidgetDragBeginCallback) -> C_WidgetDragBeginCallback
wrap_WidgetDragEndCallback a -> WidgetDragBeginCallback
wrapped
    FunPtr C_WidgetDragBeginCallback
wrapped'' <- C_WidgetDragBeginCallback -> IO (FunPtr C_WidgetDragBeginCallback)
mk_WidgetDragEndCallback C_WidgetDragBeginCallback
wrapped'
    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 Text
"drag-end" FunPtr C_WidgetDragBeginCallback
wrapped'' 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
    dbgSignalInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Gtk.Objects.Widget::drag-end"
        , O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-3.0.38/docs/GI-Gtk-Objects-Widget.html#g:signal:dragEnd"})

#endif

-- signal Widget::drag-failed
-- | The [dragFailed](#g: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'.
-- 
-- /Since: 2.12/
type WidgetDragFailedCallback =
    Gdk.DragContext.DragContext
    -- ^ /@context@/: the drag context
    -> Gtk.Enums.DragResult
    -- ^ /@result@/: the result of the drag operation
    -> IO Bool
    -- ^ __Returns:__ 'P.True' if the failed drag operation has been already handled.

type C_WidgetDragFailedCallback =
    Ptr Widget ->                           -- object
    Ptr Gdk.DragContext.DragContext ->
    CUInt ->
    Ptr () ->                               -- user_data
    IO CInt

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

wrap_WidgetDragFailedCallback :: 
    GObject a => (a -> WidgetDragFailedCallback) ->
    C_WidgetDragFailedCallback
wrap_WidgetDragFailedCallback :: forall a.
GObject a =>
(a -> WidgetDragFailedCallback) -> C_WidgetDragFailedCallback
wrap_WidgetDragFailedCallback a -> WidgetDragFailedCallback
gi'cb Ptr Widget
gi'selfPtr Ptr DragContext
context CUInt
result_ Ptr ()
_ = do
    DragContext
context' <- ((ManagedPtr DragContext -> DragContext)
-> Ptr DragContext -> IO DragContext
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr DragContext -> DragContext
Gdk.DragContext.DragContext) Ptr DragContext
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 <- Ptr Widget -> (Widget -> IO Bool) -> IO Bool
forall a b.
(HasCallStack, ManagedPtrNewtype a) =>
Ptr a -> (a -> IO b) -> IO b
B.ManagedPtr.withTransient Ptr Widget
gi'selfPtr ((Widget -> IO Bool) -> IO Bool) -> (Widget -> IO Bool) -> IO Bool
forall a b. (a -> b) -> a -> b
$ \Widget
gi'self -> a -> WidgetDragFailedCallback
gi'cb (Widget -> a
Coerce.coerce Widget
gi'self)  DragContext
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 -> ((?self :: a) => WidgetDragFailedCallback) -> m SignalHandlerId
onWidgetDragFailed :: forall a (m :: * -> *).
(IsWidget a, MonadIO m) =>
a -> ((?self::a) => WidgetDragFailedCallback) -> m SignalHandlerId
onWidgetDragFailed a
obj (?self::a) => 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 wrapped :: a -> WidgetDragFailedCallback
wrapped a
self = let ?self = a
?self::a
self in (?self::a) => WidgetDragFailedCallback
WidgetDragFailedCallback
cb
    let wrapped' :: C_WidgetDragFailedCallback
wrapped' = (a -> WidgetDragFailedCallback) -> C_WidgetDragFailedCallback
forall a.
GObject a =>
(a -> WidgetDragFailedCallback) -> C_WidgetDragFailedCallback
wrap_WidgetDragFailedCallback a -> WidgetDragFailedCallback
wrapped
    FunPtr C_WidgetDragFailedCallback
wrapped'' <- C_WidgetDragFailedCallback
-> IO (FunPtr C_WidgetDragFailedCallback)
mk_WidgetDragFailedCallback C_WidgetDragFailedCallback
wrapped'
    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 Text
"drag-failed" FunPtr C_WidgetDragFailedCallback
wrapped'' 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
-- @
-- 
-- 
-- 
-- By default the object invoking the signal is not passed to the callback.
-- If you need to access it, you can use the implit @?self@ parameter.
-- Note that this requires activating the @ImplicitParams@ GHC extension.
-- 
afterWidgetDragFailed :: (IsWidget a, MonadIO m) => a -> ((?self :: a) => WidgetDragFailedCallback) -> m SignalHandlerId
afterWidgetDragFailed :: forall a (m :: * -> *).
(IsWidget a, MonadIO m) =>
a -> ((?self::a) => WidgetDragFailedCallback) -> m SignalHandlerId
afterWidgetDragFailed a
obj (?self::a) => 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 wrapped :: a -> WidgetDragFailedCallback
wrapped a
self = let ?self = a
?self::a
self in (?self::a) => WidgetDragFailedCallback
WidgetDragFailedCallback
cb
    let wrapped' :: C_WidgetDragFailedCallback
wrapped' = (a -> WidgetDragFailedCallback) -> C_WidgetDragFailedCallback
forall a.
GObject a =>
(a -> WidgetDragFailedCallback) -> C_WidgetDragFailedCallback
wrap_WidgetDragFailedCallback a -> WidgetDragFailedCallback
wrapped
    FunPtr C_WidgetDragFailedCallback
wrapped'' <- C_WidgetDragFailedCallback
-> IO (FunPtr C_WidgetDragFailedCallback)
mk_WidgetDragFailedCallback C_WidgetDragFailedCallback
wrapped'
    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 Text
"drag-failed" FunPtr C_WidgetDragFailedCallback
wrapped'' 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
    dbgSignalInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Gtk.Objects.Widget::drag-failed"
        , O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-3.0.38/docs/GI-Gtk-Objects-Widget.html#g:signal:dragFailed"})

#endif

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

type C_WidgetDragLeaveCallback =
    Ptr Widget ->                           -- object
    Ptr Gdk.DragContext.DragContext ->
    Word32 ->
    Ptr () ->                               -- user_data
    IO ()

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

wrap_WidgetDragLeaveCallback :: 
    GObject a => (a -> WidgetDragLeaveCallback) ->
    C_WidgetDragLeaveCallback
wrap_WidgetDragLeaveCallback :: forall a.
GObject a =>
(a -> WidgetDragLeaveCallback) -> C_WidgetDragLeaveCallback
wrap_WidgetDragLeaveCallback a -> WidgetDragLeaveCallback
gi'cb Ptr Widget
gi'selfPtr Ptr DragContext
context Word32
time Ptr ()
_ = do
    DragContext
context' <- ((ManagedPtr DragContext -> DragContext)
-> Ptr DragContext -> IO DragContext
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr DragContext -> DragContext
Gdk.DragContext.DragContext) Ptr DragContext
context
    Ptr Widget -> (Widget -> IO ()) -> IO ()
forall a b.
(HasCallStack, ManagedPtrNewtype a) =>
Ptr a -> (a -> IO b) -> IO b
B.ManagedPtr.withTransient Ptr Widget
gi'selfPtr ((Widget -> IO ()) -> IO ()) -> (Widget -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Widget
gi'self -> a -> WidgetDragLeaveCallback
gi'cb (Widget -> a
Coerce.coerce Widget
gi'self)  DragContext
context' Word32
time


-- | 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 -> ((?self :: a) => WidgetDragLeaveCallback) -> m SignalHandlerId
onWidgetDragLeave :: forall a (m :: * -> *).
(IsWidget a, MonadIO m) =>
a -> ((?self::a) => WidgetDragLeaveCallback) -> m SignalHandlerId
onWidgetDragLeave a
obj (?self::a) => 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 wrapped :: a -> WidgetDragLeaveCallback
wrapped a
self = let ?self = a
?self::a
self in (?self::a) => WidgetDragLeaveCallback
WidgetDragLeaveCallback
cb
    let wrapped' :: C_WidgetDragLeaveCallback
wrapped' = (a -> WidgetDragLeaveCallback) -> C_WidgetDragLeaveCallback
forall a.
GObject a =>
(a -> WidgetDragLeaveCallback) -> C_WidgetDragLeaveCallback
wrap_WidgetDragLeaveCallback a -> WidgetDragLeaveCallback
wrapped
    FunPtr C_WidgetDragLeaveCallback
wrapped'' <- C_WidgetDragLeaveCallback -> IO (FunPtr C_WidgetDragLeaveCallback)
mk_WidgetDragLeaveCallback C_WidgetDragLeaveCallback
wrapped'
    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 Text
"drag-leave" FunPtr C_WidgetDragLeaveCallback
wrapped'' 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
-- @
-- 
-- 
-- 
-- By default the object invoking the signal is not passed to the callback.
-- If you need to access it, you can use the implit @?self@ parameter.
-- Note that this requires activating the @ImplicitParams@ GHC extension.
-- 
afterWidgetDragLeave :: (IsWidget a, MonadIO m) => a -> ((?self :: a) => WidgetDragLeaveCallback) -> m SignalHandlerId
afterWidgetDragLeave :: forall a (m :: * -> *).
(IsWidget a, MonadIO m) =>
a -> ((?self::a) => WidgetDragLeaveCallback) -> m SignalHandlerId
afterWidgetDragLeave a
obj (?self::a) => 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 wrapped :: a -> WidgetDragLeaveCallback
wrapped a
self = let ?self = a
?self::a
self in (?self::a) => WidgetDragLeaveCallback
WidgetDragLeaveCallback
cb
    let wrapped' :: C_WidgetDragLeaveCallback
wrapped' = (a -> WidgetDragLeaveCallback) -> C_WidgetDragLeaveCallback
forall a.
GObject a =>
(a -> WidgetDragLeaveCallback) -> C_WidgetDragLeaveCallback
wrap_WidgetDragLeaveCallback a -> WidgetDragLeaveCallback
wrapped
    FunPtr C_WidgetDragLeaveCallback
wrapped'' <- C_WidgetDragLeaveCallback -> IO (FunPtr C_WidgetDragLeaveCallback)
mk_WidgetDragLeaveCallback C_WidgetDragLeaveCallback
wrapped'
    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 Text
"drag-leave" FunPtr C_WidgetDragLeaveCallback
wrapped'' 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
    dbgSignalInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Gtk.Objects.Widget::drag-leave"
        , O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-3.0.38/docs/GI-Gtk-Objects-Widget.html#g:signal:dragLeave"})

#endif

-- signal Widget::drag-motion
-- | The [dragMotion](#g: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 'GI.Gdk.Functions.dragStatus'.
-- 
-- If the decision whether the drop will be accepted or rejected can\'t be
-- made based solely on the cursor position and the type of the data, the
-- handler may inspect the dragged data by calling 'GI.Gtk.Objects.Widget.widgetDragGetData' and
-- defer the 'GI.Gdk.Functions.dragStatus' call to the [dragDataReceived]("GI.Gtk.Objects.Widget#g: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#g: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,
-- >             GdkDragContext *context,
-- >             gint            x,
-- >             gint            y,
-- >             guint           time)
-- >{
-- >  GdkAtom target;
-- >
-- >  PrivateData *private_data = GET_PRIVATE_DATA (widget);
-- >
-- >  if (!private_data->drag_highlight)
-- >   {
-- >     private_data->drag_highlight = 1;
-- >     gtk_drag_highlight (widget);
-- >   }
-- >
-- >  target = gtk_drag_dest_find_target (widget, context, NULL);
-- >  if (target == GDK_NONE)
-- >    gdk_drag_status (context, 0, time);
-- >  else
-- >   {
-- >     private_data->pending_status
-- >        = gdk_drag_context_get_suggested_action (context);
-- >     gtk_drag_get_data (widget, context, target, time);
-- >   }
-- >
-- >  return TRUE;
-- >}
-- >
-- >static void
-- >drag_data_received (GtkWidget        *widget,
-- >                    GdkDragContext   *context,
-- >                    gint              x,
-- >                    gint              y,
-- >                    GtkSelectionData *selection_data,
-- >                    guint             info,
-- >                    guint             time)
-- >{
-- >  PrivateData *private_data = GET_PRIVATE_DATA (widget);
-- >
-- >  if (private_data->suggested_action)
-- >   {
-- >     private_data->suggested_action = 0;
-- >
-- >     // We are getting this data due to a request in drag_motion,
-- >     // rather than due to a request in drag_drop, so we are just
-- >     // supposed to call gdk_drag_status(), not actually paste in
-- >     // the data.
-- >
-- >     str = gtk_selection_data_get_text (selection_data);
-- >     if (!data_is_acceptable (str))
-- >       gdk_drag_status (context, 0, time);
-- >     else
-- >       gdk_drag_status (context,
-- >                        private_data->suggested_action,
-- >                        time);
-- >   }
-- >  else
-- >   {
-- >     // accept the drop
-- >   }
-- >}
type WidgetDragMotionCallback =
    Gdk.DragContext.DragContext
    -- ^ /@context@/: the drag context
    -> Int32
    -- ^ /@x@/: the x coordinate of the current cursor position
    -> Int32
    -- ^ /@y@/: the y coordinate of the current cursor position
    -> Word32
    -- ^ /@time@/: the timestamp of the motion event
    -> IO Bool
    -- ^ __Returns:__ whether the cursor position is in a drop zone

type C_WidgetDragMotionCallback =
    Ptr Widget ->                           -- object
    Ptr Gdk.DragContext.DragContext ->
    Int32 ->
    Int32 ->
    Word32 ->
    Ptr () ->                               -- user_data
    IO CInt

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

wrap_WidgetDragMotionCallback :: 
    GObject a => (a -> WidgetDragMotionCallback) ->
    C_WidgetDragMotionCallback
wrap_WidgetDragMotionCallback :: forall a.
GObject a =>
(a -> WidgetDragDropCallback) -> C_WidgetDragDropCallback
wrap_WidgetDragMotionCallback a -> WidgetDragDropCallback
gi'cb Ptr Widget
gi'selfPtr Ptr DragContext
context Int32
x Int32
y Word32
time Ptr ()
_ = do
    DragContext
context' <- ((ManagedPtr DragContext -> DragContext)
-> Ptr DragContext -> IO DragContext
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr DragContext -> DragContext
Gdk.DragContext.DragContext) Ptr DragContext
context
    Bool
result <- Ptr Widget -> (Widget -> IO Bool) -> IO Bool
forall a b.
(HasCallStack, ManagedPtrNewtype a) =>
Ptr a -> (a -> IO b) -> IO b
B.ManagedPtr.withTransient Ptr Widget
gi'selfPtr ((Widget -> IO Bool) -> IO Bool) -> (Widget -> IO Bool) -> IO Bool
forall a b. (a -> b) -> a -> b
$ \Widget
gi'self -> a -> WidgetDragDropCallback
gi'cb (Widget -> a
Coerce.coerce Widget
gi'self)  DragContext
context' Int32
x Int32
y Word32
time
    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 -> ((?self :: a) => WidgetDragMotionCallback) -> m SignalHandlerId
onWidgetDragMotion :: forall a (m :: * -> *).
(IsWidget a, MonadIO m) =>
a -> ((?self::a) => WidgetDragDropCallback) -> m SignalHandlerId
onWidgetDragMotion a
obj (?self::a) => 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 wrapped :: a -> WidgetDragDropCallback
wrapped a
self = let ?self = a
?self::a
self in (?self::a) => WidgetDragDropCallback
WidgetDragDropCallback
cb
    let wrapped' :: C_WidgetDragDropCallback
wrapped' = (a -> WidgetDragDropCallback) -> C_WidgetDragDropCallback
forall a.
GObject a =>
(a -> WidgetDragDropCallback) -> C_WidgetDragDropCallback
wrap_WidgetDragMotionCallback a -> WidgetDragDropCallback
wrapped
    FunPtr C_WidgetDragDropCallback
wrapped'' <- C_WidgetDragDropCallback -> IO (FunPtr C_WidgetDragDropCallback)
mk_WidgetDragMotionCallback C_WidgetDragDropCallback
wrapped'
    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 Text
"drag-motion" FunPtr C_WidgetDragDropCallback
wrapped'' 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
-- @
-- 
-- 
-- 
-- By default the object invoking the signal is not passed to the callback.
-- If you need to access it, you can use the implit @?self@ parameter.
-- Note that this requires activating the @ImplicitParams@ GHC extension.
-- 
afterWidgetDragMotion :: (IsWidget a, MonadIO m) => a -> ((?self :: a) => WidgetDragMotionCallback) -> m SignalHandlerId
afterWidgetDragMotion :: forall a (m :: * -> *).
(IsWidget a, MonadIO m) =>
a -> ((?self::a) => WidgetDragDropCallback) -> m SignalHandlerId
afterWidgetDragMotion a
obj (?self::a) => 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 wrapped :: a -> WidgetDragDropCallback
wrapped a
self = let ?self = a
?self::a
self in (?self::a) => WidgetDragDropCallback
WidgetDragDropCallback
cb
    let wrapped' :: C_WidgetDragDropCallback
wrapped' = (a -> WidgetDragDropCallback) -> C_WidgetDragDropCallback
forall a.
GObject a =>
(a -> WidgetDragDropCallback) -> C_WidgetDragDropCallback
wrap_WidgetDragMotionCallback a -> WidgetDragDropCallback
wrapped
    FunPtr C_WidgetDragDropCallback
wrapped'' <- C_WidgetDragDropCallback -> IO (FunPtr C_WidgetDragDropCallback)
mk_WidgetDragMotionCallback C_WidgetDragDropCallback
wrapped'
    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 Text
"drag-motion" FunPtr C_WidgetDragDropCallback
wrapped'' 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
    dbgSignalInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Gtk.Objects.Widget::drag-motion"
        , O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-3.0.38/docs/GI-Gtk-Objects-Widget.html#g:signal:dragMotion"})

#endif

-- signal Widget::draw
-- | This signal is emitted when a widget is supposed to render itself.
-- The /@widget@/\'s top left corner must be painted at the origin of
-- the passed in context and be sized to the values returned by
-- 'GI.Gtk.Objects.Widget.widgetGetAllocatedWidth' and
-- 'GI.Gtk.Objects.Widget.widgetGetAllocatedHeight'.
-- 
-- Signal handlers connected to this signal can modify the cairo
-- context passed as /@cr@/ in any way they like and don\'t need to
-- restore it. The signal emission takes care of calling @/cairo_save()/@
-- before and @/cairo_restore()/@ after invoking the handler.
-- 
-- The signal handler will get a /@cr@/ with a clip region already set to the
-- widget\'s dirty region, i.e. to the area that needs repainting.  Complicated
-- widgets that want to avoid redrawing themselves completely can get the full
-- extents of the clip region with 'GI.Gdk.Functions.cairoGetClipRectangle', or they can
-- get a finer-grained representation of the dirty region with
-- @/cairo_copy_clip_rectangle_list()/@.
-- 
-- /Since: 3.0/
type WidgetDrawCallback =
    Cairo.Context.Context
    -- ^ /@cr@/: the cairo context to draw to
    -> IO Bool
    -- ^ __Returns:__ 'P.True' to stop other handlers from being invoked for the event.
    -- 'P.False' to propagate the event further.

type C_WidgetDrawCallback =
    Ptr Widget ->                           -- object
    Ptr Cairo.Context.Context ->
    Ptr () ->                               -- user_data
    IO CInt

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

wrap_WidgetDrawCallback :: 
    GObject a => (a -> WidgetDrawCallback) ->
    C_WidgetDrawCallback
wrap_WidgetDrawCallback :: forall a.
GObject a =>
(a -> WidgetDrawCallback) -> C_WidgetDrawCallback
wrap_WidgetDrawCallback a -> WidgetDrawCallback
gi'cb Ptr Widget
gi'selfPtr Ptr Context
cr Ptr ()
_ = do
    Ptr Context -> (Context -> IO CInt) -> IO CInt
forall a b.
(HasCallStack, ManagedPtrNewtype a) =>
Ptr a -> (a -> IO b) -> IO b
B.ManagedPtr.withTransient  Ptr Context
cr ((Context -> IO CInt) -> IO CInt)
-> (Context -> IO CInt) -> IO CInt
forall a b. (a -> b) -> a -> b
$ \Context
cr' -> do
        Bool
result <- Ptr Widget -> (Widget -> IO Bool) -> IO Bool
forall a b.
(HasCallStack, ManagedPtrNewtype a) =>
Ptr a -> (a -> IO b) -> IO b
B.ManagedPtr.withTransient Ptr Widget
gi'selfPtr ((Widget -> IO Bool) -> IO Bool) -> (Widget -> IO Bool) -> IO Bool
forall a b. (a -> b) -> a -> b
$ \Widget
gi'self -> a -> WidgetDrawCallback
gi'cb (Widget -> a
Coerce.coerce Widget
gi'self)  Context
cr'
        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 [draw](#signal:draw) signal, to be run before the default handler.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Signals.on' widget #draw callback
-- @
-- 
-- 
onWidgetDraw :: (IsWidget a, MonadIO m) => a -> ((?self :: a) => WidgetDrawCallback) -> m SignalHandlerId
onWidgetDraw :: forall a (m :: * -> *).
(IsWidget a, MonadIO m) =>
a -> ((?self::a) => WidgetDrawCallback) -> m SignalHandlerId
onWidgetDraw a
obj (?self::a) => WidgetDrawCallback
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 wrapped :: a -> WidgetDrawCallback
wrapped a
self = let ?self = a
?self::a
self in (?self::a) => WidgetDrawCallback
WidgetDrawCallback
cb
    let wrapped' :: C_WidgetDrawCallback
wrapped' = (a -> WidgetDrawCallback) -> C_WidgetDrawCallback
forall a.
GObject a =>
(a -> WidgetDrawCallback) -> C_WidgetDrawCallback
wrap_WidgetDrawCallback a -> WidgetDrawCallback
wrapped
    FunPtr C_WidgetDrawCallback
wrapped'' <- C_WidgetDrawCallback -> IO (FunPtr C_WidgetDrawCallback)
mk_WidgetDrawCallback C_WidgetDrawCallback
wrapped'
    a
-> Text
-> FunPtr C_WidgetDrawCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj Text
"draw" FunPtr C_WidgetDrawCallback
wrapped'' SignalConnectMode
SignalConnectBefore Maybe Text
forall a. Maybe a
Nothing

-- | Connect a signal handler for the [draw](#signal:draw) signal, to be run after the default handler.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Signals.after' widget #draw callback
-- @
-- 
-- 
-- 
-- By default the object invoking the signal is not passed to the callback.
-- If you need to access it, you can use the implit @?self@ parameter.
-- Note that this requires activating the @ImplicitParams@ GHC extension.
-- 
afterWidgetDraw :: (IsWidget a, MonadIO m) => a -> ((?self :: a) => WidgetDrawCallback) -> m SignalHandlerId
afterWidgetDraw :: forall a (m :: * -> *).
(IsWidget a, MonadIO m) =>
a -> ((?self::a) => WidgetDrawCallback) -> m SignalHandlerId
afterWidgetDraw a
obj (?self::a) => WidgetDrawCallback
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 wrapped :: a -> WidgetDrawCallback
wrapped a
self = let ?self = a
?self::a
self in (?self::a) => WidgetDrawCallback
WidgetDrawCallback
cb
    let wrapped' :: C_WidgetDrawCallback
wrapped' = (a -> WidgetDrawCallback) -> C_WidgetDrawCallback
forall a.
GObject a =>
(a -> WidgetDrawCallback) -> C_WidgetDrawCallback
wrap_WidgetDrawCallback a -> WidgetDrawCallback
wrapped
    FunPtr C_WidgetDrawCallback
wrapped'' <- C_WidgetDrawCallback -> IO (FunPtr C_WidgetDrawCallback)
mk_WidgetDrawCallback C_WidgetDrawCallback
wrapped'
    a
-> Text
-> FunPtr C_WidgetDrawCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj Text
"draw" FunPtr C_WidgetDrawCallback
wrapped'' SignalConnectMode
SignalConnectAfter Maybe Text
forall a. Maybe a
Nothing


#if defined(ENABLE_OVERLOADING)
data WidgetDrawSignalInfo
instance SignalInfo WidgetDrawSignalInfo where
    type HaskellCallbackType WidgetDrawSignalInfo = WidgetDrawCallback
    connectSignal obj cb connectMode detail = do
        let cb' = wrap_WidgetDrawCallback cb
        cb'' <- mk_WidgetDrawCallback cb'
        connectSignalFunPtr obj "draw" cb'' connectMode detail
    dbgSignalInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Gtk.Objects.Widget::draw"
        , O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-3.0.38/docs/GI-Gtk-Objects-Widget.html#g:signal:draw"})

#endif

-- signal Widget::enter-notify-event
-- | The [enterNotifyEvent](#g:signal:enterNotifyEvent) will be emitted when the pointer enters
-- the /@widget@/\'s window.
-- 
-- To receive this signal, the t'GI.Gdk.Objects.Window.Window' associated to the widget needs
-- to enable the @/GDK_ENTER_NOTIFY_MASK/@ mask.
-- 
-- This signal will be sent to the grab widget if there is one.
type WidgetEnterNotifyEventCallback =
    Gdk.EventCrossing.EventCrossing
    -- ^ /@event@/: the t'GI.Gdk.Structs.EventCrossing.EventCrossing' which triggered
    --   this signal.
    -> IO Bool
    -- ^ __Returns:__ 'P.True' to stop other handlers from being invoked for the event.
    --   'P.False' to propagate the event further.

type C_WidgetEnterNotifyEventCallback =
    Ptr Widget ->                           -- object
    Ptr Gdk.EventCrossing.EventCrossing ->
    Ptr () ->                               -- user_data
    IO CInt

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

wrap_WidgetEnterNotifyEventCallback :: 
    GObject a => (a -> WidgetEnterNotifyEventCallback) ->
    C_WidgetEnterNotifyEventCallback
wrap_WidgetEnterNotifyEventCallback :: forall a.
GObject a =>
(a -> WidgetEnterNotifyEventCallback)
-> C_WidgetEnterNotifyEventCallback
wrap_WidgetEnterNotifyEventCallback a -> WidgetEnterNotifyEventCallback
gi'cb Ptr Widget
gi'selfPtr Ptr EventCrossing
event Ptr ()
_ = do
    EventCrossing
event' <- ((ManagedPtr EventCrossing -> EventCrossing)
-> Ptr EventCrossing -> IO EventCrossing
forall a.
(HasCallStack, BoxedPtr a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
newPtr ManagedPtr EventCrossing -> EventCrossing
Gdk.EventCrossing.EventCrossing) Ptr EventCrossing
event
    Bool
result <- Ptr Widget -> (Widget -> IO Bool) -> IO Bool
forall a b.
(HasCallStack, ManagedPtrNewtype a) =>
Ptr a -> (a -> IO b) -> IO b
B.ManagedPtr.withTransient Ptr Widget
gi'selfPtr ((Widget -> IO Bool) -> IO Bool) -> (Widget -> IO Bool) -> IO Bool
forall a b. (a -> b) -> a -> b
$ \Widget
gi'self -> a -> WidgetEnterNotifyEventCallback
gi'cb (Widget -> a
Coerce.coerce Widget
gi'self)  EventCrossing
event'
    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 [enterNotifyEvent](#signal:enterNotifyEvent) signal, to be run before the default handler.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Signals.on' widget #enterNotifyEvent callback
-- @
-- 
-- 
onWidgetEnterNotifyEvent :: (IsWidget a, MonadIO m) => a -> ((?self :: a) => WidgetEnterNotifyEventCallback) -> m SignalHandlerId
onWidgetEnterNotifyEvent :: forall a (m :: * -> *).
(IsWidget a, MonadIO m) =>
a
-> ((?self::a) => WidgetEnterNotifyEventCallback)
-> m SignalHandlerId
onWidgetEnterNotifyEvent a
obj (?self::a) => WidgetEnterNotifyEventCallback
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 wrapped :: a -> WidgetEnterNotifyEventCallback
wrapped a
self = let ?self = a
?self::a
self in (?self::a) => WidgetEnterNotifyEventCallback
WidgetEnterNotifyEventCallback
cb
    let wrapped' :: C_WidgetEnterNotifyEventCallback
wrapped' = (a -> WidgetEnterNotifyEventCallback)
-> C_WidgetEnterNotifyEventCallback
forall a.
GObject a =>
(a -> WidgetEnterNotifyEventCallback)
-> C_WidgetEnterNotifyEventCallback
wrap_WidgetEnterNotifyEventCallback a -> WidgetEnterNotifyEventCallback
wrapped
    FunPtr C_WidgetEnterNotifyEventCallback
wrapped'' <- C_WidgetEnterNotifyEventCallback
-> IO (FunPtr C_WidgetEnterNotifyEventCallback)
mk_WidgetEnterNotifyEventCallback C_WidgetEnterNotifyEventCallback
wrapped'
    a
-> Text
-> FunPtr C_WidgetEnterNotifyEventCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj Text
"enter-notify-event" FunPtr C_WidgetEnterNotifyEventCallback
wrapped'' SignalConnectMode
SignalConnectBefore Maybe Text
forall a. Maybe a
Nothing

-- | Connect a signal handler for the [enterNotifyEvent](#signal:enterNotifyEvent) signal, to be run after the default handler.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Signals.after' widget #enterNotifyEvent callback
-- @
-- 
-- 
-- 
-- By default the object invoking the signal is not passed to the callback.
-- If you need to access it, you can use the implit @?self@ parameter.
-- Note that this requires activating the @ImplicitParams@ GHC extension.
-- 
afterWidgetEnterNotifyEvent :: (IsWidget a, MonadIO m) => a -> ((?self :: a) => WidgetEnterNotifyEventCallback) -> m SignalHandlerId
afterWidgetEnterNotifyEvent :: forall a (m :: * -> *).
(IsWidget a, MonadIO m) =>
a
-> ((?self::a) => WidgetEnterNotifyEventCallback)
-> m SignalHandlerId
afterWidgetEnterNotifyEvent a
obj (?self::a) => WidgetEnterNotifyEventCallback
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 wrapped :: a -> WidgetEnterNotifyEventCallback
wrapped a
self = let ?self = a
?self::a
self in (?self::a) => WidgetEnterNotifyEventCallback
WidgetEnterNotifyEventCallback
cb
    let wrapped' :: C_WidgetEnterNotifyEventCallback
wrapped' = (a -> WidgetEnterNotifyEventCallback)
-> C_WidgetEnterNotifyEventCallback
forall a.
GObject a =>
(a -> WidgetEnterNotifyEventCallback)
-> C_WidgetEnterNotifyEventCallback
wrap_WidgetEnterNotifyEventCallback a -> WidgetEnterNotifyEventCallback
wrapped
    FunPtr C_WidgetEnterNotifyEventCallback
wrapped'' <- C_WidgetEnterNotifyEventCallback
-> IO (FunPtr C_WidgetEnterNotifyEventCallback)
mk_WidgetEnterNotifyEventCallback C_WidgetEnterNotifyEventCallback
wrapped'
    a
-> Text
-> FunPtr C_WidgetEnterNotifyEventCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj Text
"enter-notify-event" FunPtr C_WidgetEnterNotifyEventCallback
wrapped'' SignalConnectMode
SignalConnectAfter Maybe Text
forall a. Maybe a
Nothing


#if defined(ENABLE_OVERLOADING)
data WidgetEnterNotifyEventSignalInfo
instance SignalInfo WidgetEnterNotifyEventSignalInfo where
    type HaskellCallbackType WidgetEnterNotifyEventSignalInfo = WidgetEnterNotifyEventCallback
    connectSignal obj cb connectMode detail = do
        let cb' = wrap_WidgetEnterNotifyEventCallback cb
        cb'' <- mk_WidgetEnterNotifyEventCallback cb'
        connectSignalFunPtr obj "enter-notify-event" cb'' connectMode detail
    dbgSignalInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Gtk.Objects.Widget::enter-notify-event"
        , O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-3.0.38/docs/GI-Gtk-Objects-Widget.html#g:signal:enterNotifyEvent"})

#endif

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

type C_WidgetEventCallback =
    Ptr Widget ->                           -- object
    Ptr Gdk.Event.Event ->
    Ptr () ->                               -- user_data
    IO CInt

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

wrap_WidgetEventCallback :: 
    GObject a => (a -> WidgetEventCallback) ->
    C_WidgetEventCallback
wrap_WidgetEventCallback :: forall a.
GObject a =>
(a -> WidgetDeleteEventCallback) -> C_WidgetDeleteEventCallback
wrap_WidgetEventCallback a -> WidgetDeleteEventCallback
gi'cb Ptr Widget
gi'selfPtr Ptr Event
event Ptr ()
_ = do
    Ptr Event -> (Event -> IO CInt) -> IO CInt
forall a b.
(HasCallStack, ManagedPtrNewtype a) =>
Ptr a -> (a -> IO b) -> IO b
B.ManagedPtr.withTransient  Ptr Event
event ((Event -> IO CInt) -> IO CInt) -> (Event -> IO CInt) -> IO CInt
forall a b. (a -> b) -> a -> b
$ \Event
event' -> do
        Bool
result <- Ptr Widget -> (Widget -> IO Bool) -> IO Bool
forall a b.
(HasCallStack, ManagedPtrNewtype a) =>
Ptr a -> (a -> IO b) -> IO b
B.ManagedPtr.withTransient Ptr Widget
gi'selfPtr ((Widget -> IO Bool) -> IO Bool) -> (Widget -> IO Bool) -> IO Bool
forall a b. (a -> b) -> a -> b
$ \Widget
gi'self -> a -> WidgetDeleteEventCallback
gi'cb (Widget -> a
Coerce.coerce Widget
gi'self)  Event
event'
        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 [event](#signal:event) signal, to be run before the default handler.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Signals.on' widget #event callback
-- @
-- 
-- 
onWidgetEvent :: (IsWidget a, MonadIO m) => a -> ((?self :: a) => WidgetEventCallback) -> m SignalHandlerId
onWidgetEvent :: forall a (m :: * -> *).
(IsWidget a, MonadIO m) =>
a -> ((?self::a) => WidgetDeleteEventCallback) -> m SignalHandlerId
onWidgetEvent a
obj (?self::a) => WidgetDeleteEventCallback
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 wrapped :: a -> WidgetDeleteEventCallback
wrapped a
self = let ?self = a
?self::a
self in (?self::a) => WidgetDeleteEventCallback
WidgetDeleteEventCallback
cb
    let wrapped' :: C_WidgetDeleteEventCallback
wrapped' = (a -> WidgetDeleteEventCallback) -> C_WidgetDeleteEventCallback
forall a.
GObject a =>
(a -> WidgetDeleteEventCallback) -> C_WidgetDeleteEventCallback
wrap_WidgetEventCallback a -> WidgetDeleteEventCallback
wrapped
    FunPtr C_WidgetDeleteEventCallback
wrapped'' <- C_WidgetDeleteEventCallback
-> IO (FunPtr C_WidgetDeleteEventCallback)
mk_WidgetEventCallback C_WidgetDeleteEventCallback
wrapped'
    a
-> Text
-> FunPtr C_WidgetDeleteEventCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj Text
"event" FunPtr C_WidgetDeleteEventCallback
wrapped'' SignalConnectMode
SignalConnectBefore Maybe Text
forall a. Maybe a
Nothing

-- | Connect a signal handler for the [event](#signal:event) signal, to be run after the default handler.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Signals.after' widget #event callback
-- @
-- 
-- 
-- 
-- By default the object invoking the signal is not passed to the callback.
-- If you need to access it, you can use the implit @?self@ parameter.
-- Note that this requires activating the @ImplicitParams@ GHC extension.
-- 
afterWidgetEvent :: (IsWidget a, MonadIO m) => a -> ((?self :: a) => WidgetEventCallback) -> m SignalHandlerId
afterWidgetEvent :: forall a (m :: * -> *).
(IsWidget a, MonadIO m) =>
a -> ((?self::a) => WidgetDeleteEventCallback) -> m SignalHandlerId
afterWidgetEvent a
obj (?self::a) => WidgetDeleteEventCallback
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 wrapped :: a -> WidgetDeleteEventCallback
wrapped a
self = let ?self = a
?self::a
self in (?self::a) => WidgetDeleteEventCallback
WidgetDeleteEventCallback
cb
    let wrapped' :: C_WidgetDeleteEventCallback
wrapped' = (a -> WidgetDeleteEventCallback) -> C_WidgetDeleteEventCallback
forall a.
GObject a =>
(a -> WidgetDeleteEventCallback) -> C_WidgetDeleteEventCallback
wrap_WidgetEventCallback a -> WidgetDeleteEventCallback
wrapped
    FunPtr C_WidgetDeleteEventCallback
wrapped'' <- C_WidgetDeleteEventCallback
-> IO (FunPtr C_WidgetDeleteEventCallback)
mk_WidgetEventCallback C_WidgetDeleteEventCallback
wrapped'
    a
-> Text
-> FunPtr C_WidgetDeleteEventCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj Text
"event" FunPtr C_WidgetDeleteEventCallback
wrapped'' SignalConnectMode
SignalConnectAfter Maybe Text
forall a. Maybe a
Nothing


#if defined(ENABLE_OVERLOADING)
data WidgetEventSignalInfo
instance SignalInfo WidgetEventSignalInfo where
    type HaskellCallbackType WidgetEventSignalInfo = WidgetEventCallback
    connectSignal obj cb connectMode detail = do
        let cb' = wrap_WidgetEventCallback cb
        cb'' <- mk_WidgetEventCallback cb'
        connectSignalFunPtr obj "event" cb'' connectMode detail
    dbgSignalInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Gtk.Objects.Widget::event"
        , O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-3.0.38/docs/GI-Gtk-Objects-Widget.html#g:signal:event"})

#endif

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

type C_WidgetEventAfterCallback =
    Ptr Widget ->                           -- object
    Ptr Gdk.Event.Event ->
    Ptr () ->                               -- user_data
    IO ()

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

wrap_WidgetEventAfterCallback :: 
    GObject a => (a -> WidgetEventAfterCallback) ->
    C_WidgetEventAfterCallback
wrap_WidgetEventAfterCallback :: forall a.
GObject a =>
(a -> WidgetEventAfterCallback) -> C_WidgetEventAfterCallback
wrap_WidgetEventAfterCallback a -> WidgetEventAfterCallback
gi'cb Ptr Widget
gi'selfPtr Ptr Event
event Ptr ()
_ = do
    Ptr Event -> WidgetEventAfterCallback -> IO ()
forall a b.
(HasCallStack, ManagedPtrNewtype a) =>
Ptr a -> (a -> IO b) -> IO b
B.ManagedPtr.withTransient  Ptr Event
event (WidgetEventAfterCallback -> IO ())
-> WidgetEventAfterCallback -> IO ()
forall a b. (a -> b) -> a -> b
$ \Event
event' -> do
        Ptr Widget -> (Widget -> IO ()) -> IO ()
forall a b.
(HasCallStack, ManagedPtrNewtype a) =>
Ptr a -> (a -> IO b) -> IO b
B.ManagedPtr.withTransient Ptr Widget
gi'selfPtr ((Widget -> IO ()) -> IO ()) -> (Widget -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Widget
gi'self -> a -> WidgetEventAfterCallback
gi'cb (Widget -> a
Coerce.coerce Widget
gi'self)  Event
event'


-- | Connect a signal handler for the [eventAfter](#signal:eventAfter) signal, to be run before the default handler.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Signals.on' widget #eventAfter callback
-- @
-- 
-- 
onWidgetEventAfter :: (IsWidget a, MonadIO m) => a -> ((?self :: a) => WidgetEventAfterCallback) -> m SignalHandlerId
onWidgetEventAfter :: forall a (m :: * -> *).
(IsWidget a, MonadIO m) =>
a -> ((?self::a) => WidgetEventAfterCallback) -> m SignalHandlerId
onWidgetEventAfter a
obj (?self::a) => WidgetEventAfterCallback
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 wrapped :: a -> WidgetEventAfterCallback
wrapped a
self = let ?self = a
?self::a
self in (?self::a) => WidgetEventAfterCallback
WidgetEventAfterCallback
cb
    let wrapped' :: C_WidgetEventAfterCallback
wrapped' = (a -> WidgetEventAfterCallback) -> C_WidgetEventAfterCallback
forall a.
GObject a =>
(a -> WidgetEventAfterCallback) -> C_WidgetEventAfterCallback
wrap_WidgetEventAfterCallback a -> WidgetEventAfterCallback
wrapped
    FunPtr C_WidgetEventAfterCallback
wrapped'' <- C_WidgetEventAfterCallback
-> IO (FunPtr C_WidgetEventAfterCallback)
mk_WidgetEventAfterCallback C_WidgetEventAfterCallback
wrapped'
    a
-> Text
-> FunPtr C_WidgetEventAfterCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj Text
"event-after" FunPtr C_WidgetEventAfterCallback
wrapped'' SignalConnectMode
SignalConnectBefore Maybe Text
forall a. Maybe a
Nothing

-- | Connect a signal handler for the [eventAfter](#signal:eventAfter) signal, to be run after the default handler.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Signals.after' widget #eventAfter callback
-- @
-- 
-- 
-- 
-- By default the object invoking the signal is not passed to the callback.
-- If you need to access it, you can use the implit @?self@ parameter.
-- Note that this requires activating the @ImplicitParams@ GHC extension.
-- 
afterWidgetEventAfter :: (IsWidget a, MonadIO m) => a -> ((?self :: a) => WidgetEventAfterCallback) -> m SignalHandlerId
afterWidgetEventAfter :: forall a (m :: * -> *).
(IsWidget a, MonadIO m) =>
a -> ((?self::a) => WidgetEventAfterCallback) -> m SignalHandlerId
afterWidgetEventAfter a
obj (?self::a) => WidgetEventAfterCallback
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 wrapped :: a -> WidgetEventAfterCallback
wrapped a
self = let ?self = a
?self::a
self in (?self::a) => WidgetEventAfterCallback
WidgetEventAfterCallback
cb
    let wrapped' :: C_WidgetEventAfterCallback
wrapped' = (a -> WidgetEventAfterCallback) -> C_WidgetEventAfterCallback
forall a.
GObject a =>
(a -> WidgetEventAfterCallback) -> C_WidgetEventAfterCallback
wrap_WidgetEventAfterCallback a -> WidgetEventAfterCallback
wrapped
    FunPtr C_WidgetEventAfterCallback
wrapped'' <- C_WidgetEventAfterCallback
-> IO (FunPtr C_WidgetEventAfterCallback)
mk_WidgetEventAfterCallback C_WidgetEventAfterCallback
wrapped'
    a
-> Text
-> FunPtr C_WidgetEventAfterCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj Text
"event-after" FunPtr C_WidgetEventAfterCallback
wrapped'' SignalConnectMode
SignalConnectAfter Maybe Text
forall a. Maybe a
Nothing


#if defined(ENABLE_OVERLOADING)
data WidgetEventAfterSignalInfo
instance SignalInfo WidgetEventAfterSignalInfo where
    type HaskellCallbackType WidgetEventAfterSignalInfo = WidgetEventAfterCallback
    connectSignal obj cb connectMode detail = do
        let cb' = wrap_WidgetEventAfterCallback cb
        cb'' <- mk_WidgetEventAfterCallback cb'
        connectSignalFunPtr obj "event-after" cb'' connectMode detail
    dbgSignalInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Gtk.Objects.Widget::event-after"
        , O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-3.0.38/docs/GI-Gtk-Objects-Widget.html#g:signal:eventAfter"})

#endif

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

type C_WidgetFocusCallback =
    Ptr Widget ->                           -- object
    CUInt ->
    Ptr () ->                               -- user_data
    IO CInt

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

wrap_WidgetFocusCallback :: 
    GObject a => (a -> WidgetFocusCallback) ->
    C_WidgetFocusCallback
wrap_WidgetFocusCallback :: forall a.
GObject a =>
(a -> WidgetFocusCallback) -> C_WidgetFocusCallback
wrap_WidgetFocusCallback a -> WidgetFocusCallback
gi'cb Ptr Widget
gi'selfPtr CUInt
direction Ptr ()
_ = 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 <- Ptr Widget -> (Widget -> IO Bool) -> IO Bool
forall a b.
(HasCallStack, ManagedPtrNewtype a) =>
Ptr a -> (a -> IO b) -> IO b
B.ManagedPtr.withTransient Ptr Widget
gi'selfPtr ((Widget -> IO Bool) -> IO Bool) -> (Widget -> IO Bool) -> IO Bool
forall a b. (a -> b) -> a -> b
$ \Widget
gi'self -> a -> WidgetFocusCallback
gi'cb (Widget -> a
Coerce.coerce Widget
gi'self)  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 [focus](#signal:focus) 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 #focus callback
-- @
-- 
-- 
onWidgetFocus :: (IsWidget a, MonadIO m) => a -> ((?self :: a) => WidgetFocusCallback) -> m SignalHandlerId
onWidgetFocus :: forall a (m :: * -> *).
(IsWidget a, MonadIO m) =>
a -> ((?self::a) => WidgetFocusCallback) -> m SignalHandlerId
onWidgetFocus a
obj (?self::a) => WidgetFocusCallback
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 wrapped :: a -> WidgetFocusCallback
wrapped a
self = let ?self = a
?self::a
self in (?self::a) => WidgetFocusCallback
WidgetFocusCallback
cb
    let wrapped' :: C_WidgetFocusCallback
wrapped' = (a -> WidgetFocusCallback) -> C_WidgetFocusCallback
forall a.
GObject a =>
(a -> WidgetFocusCallback) -> C_WidgetFocusCallback
wrap_WidgetFocusCallback a -> WidgetFocusCallback
wrapped
    FunPtr C_WidgetFocusCallback
wrapped'' <- C_WidgetFocusCallback -> IO (FunPtr C_WidgetFocusCallback)
mk_WidgetFocusCallback C_WidgetFocusCallback
wrapped'
    a
-> Text
-> FunPtr C_WidgetFocusCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj Text
"focus" FunPtr C_WidgetFocusCallback
wrapped'' SignalConnectMode
SignalConnectBefore Maybe Text
forall a. Maybe a
Nothing

-- | Connect a signal handler for the [focus](#signal:focus) 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 #focus callback
-- @
-- 
-- 
-- 
-- By default the object invoking the signal is not passed to the callback.
-- If you need to access it, you can use the implit @?self@ parameter.
-- Note that this requires activating the @ImplicitParams@ GHC extension.
-- 
afterWidgetFocus :: (IsWidget a, MonadIO m) => a -> ((?self :: a) => WidgetFocusCallback) -> m SignalHandlerId
afterWidgetFocus :: forall a (m :: * -> *).
(IsWidget a, MonadIO m) =>
a -> ((?self::a) => WidgetFocusCallback) -> m SignalHandlerId
afterWidgetFocus a
obj (?self::a) => WidgetFocusCallback
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 wrapped :: a -> WidgetFocusCallback
wrapped a
self = let ?self = a
?self::a
self in (?self::a) => WidgetFocusCallback
WidgetFocusCallback
cb
    let wrapped' :: C_WidgetFocusCallback
wrapped' = (a -> WidgetFocusCallback) -> C_WidgetFocusCallback
forall a.
GObject a =>
(a -> WidgetFocusCallback) -> C_WidgetFocusCallback
wrap_WidgetFocusCallback a -> WidgetFocusCallback
wrapped
    FunPtr C_WidgetFocusCallback
wrapped'' <- C_WidgetFocusCallback -> IO (FunPtr C_WidgetFocusCallback)
mk_WidgetFocusCallback C_WidgetFocusCallback
wrapped'
    a
-> Text
-> FunPtr C_WidgetFocusCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj Text
"focus" FunPtr C_WidgetFocusCallback
wrapped'' SignalConnectMode
SignalConnectAfter Maybe Text
forall a. Maybe a
Nothing


#if defined(ENABLE_OVERLOADING)
data WidgetFocusSignalInfo
instance SignalInfo WidgetFocusSignalInfo where
    type HaskellCallbackType WidgetFocusSignalInfo = WidgetFocusCallback
    connectSignal obj cb connectMode detail = do
        let cb' = wrap_WidgetFocusCallback cb
        cb'' <- mk_WidgetFocusCallback cb'
        connectSignalFunPtr obj "focus" cb'' connectMode detail
    dbgSignalInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Gtk.Objects.Widget::focus"
        , O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-3.0.38/docs/GI-Gtk-Objects-Widget.html#g:signal:focus"})

#endif

-- signal Widget::focus-in-event
-- | The [focusInEvent](#g:signal:focusInEvent) signal will be emitted when the keyboard focus
-- enters the /@widget@/\'s window.
-- 
-- To receive this signal, the t'GI.Gdk.Objects.Window.Window' associated to the widget needs
-- to enable the @/GDK_FOCUS_CHANGE_MASK/@ mask.
type WidgetFocusInEventCallback =
    Gdk.EventFocus.EventFocus
    -- ^ /@event@/: the t'GI.Gdk.Structs.EventFocus.EventFocus' which triggered
    --   this signal.
    -> IO Bool
    -- ^ __Returns:__ 'P.True' to stop other handlers from being invoked for the event.
    --   'P.False' to propagate the event further.

type C_WidgetFocusInEventCallback =
    Ptr Widget ->                           -- object
    Ptr Gdk.EventFocus.EventFocus ->
    Ptr () ->                               -- user_data
    IO CInt

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

wrap_WidgetFocusInEventCallback :: 
    GObject a => (a -> WidgetFocusInEventCallback) ->
    C_WidgetFocusInEventCallback
wrap_WidgetFocusInEventCallback :: forall a.
GObject a =>
(a -> WidgetFocusInEventCallback) -> C_WidgetFocusInEventCallback
wrap_WidgetFocusInEventCallback a -> WidgetFocusInEventCallback
gi'cb Ptr Widget
gi'selfPtr Ptr EventFocus
event Ptr ()
_ = do
    EventFocus
event' <- ((ManagedPtr EventFocus -> EventFocus)
-> Ptr EventFocus -> IO EventFocus
forall a.
(HasCallStack, BoxedPtr a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
newPtr ManagedPtr EventFocus -> EventFocus
Gdk.EventFocus.EventFocus) Ptr EventFocus
event
    Bool
result <- Ptr Widget -> (Widget -> IO Bool) -> IO Bool
forall a b.
(HasCallStack, ManagedPtrNewtype a) =>
Ptr a -> (a -> IO b) -> IO b
B.ManagedPtr.withTransient Ptr Widget
gi'selfPtr ((Widget -> IO Bool) -> IO Bool) -> (Widget -> IO Bool) -> IO Bool
forall a b. (a -> b) -> a -> b
$ \Widget
gi'self -> a -> WidgetFocusInEventCallback
gi'cb (Widget -> a
Coerce.coerce Widget
gi'self)  EventFocus
event'
    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 [focusInEvent](#signal:focusInEvent) 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 #focusInEvent callback
-- @
-- 
-- 
onWidgetFocusInEvent :: (IsWidget a, MonadIO m) => a -> ((?self :: a) => WidgetFocusInEventCallback) -> m SignalHandlerId
onWidgetFocusInEvent :: forall a (m :: * -> *).
(IsWidget a, MonadIO m) =>
a
-> ((?self::a) => WidgetFocusInEventCallback) -> m SignalHandlerId
onWidgetFocusInEvent a
obj (?self::a) => WidgetFocusInEventCallback
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 wrapped :: a -> WidgetFocusInEventCallback
wrapped a
self = let ?self = a
?self::a
self in (?self::a) => WidgetFocusInEventCallback
WidgetFocusInEventCallback
cb
    let wrapped' :: C_WidgetFocusInEventCallback
wrapped' = (a -> WidgetFocusInEventCallback) -> C_WidgetFocusInEventCallback
forall a.
GObject a =>
(a -> WidgetFocusInEventCallback) -> C_WidgetFocusInEventCallback
wrap_WidgetFocusInEventCallback a -> WidgetFocusInEventCallback
wrapped
    FunPtr C_WidgetFocusInEventCallback
wrapped'' <- C_WidgetFocusInEventCallback
-> IO (FunPtr C_WidgetFocusInEventCallback)
mk_WidgetFocusInEventCallback C_WidgetFocusInEventCallback
wrapped'
    a
-> Text
-> FunPtr C_WidgetFocusInEventCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj Text
"focus-in-event" FunPtr C_WidgetFocusInEventCallback
wrapped'' SignalConnectMode
SignalConnectBefore Maybe Text
forall a. Maybe a
Nothing

-- | Connect a signal handler for the [focusInEvent](#signal:focusInEvent) 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 #focusInEvent callback
-- @
-- 
-- 
-- 
-- By default the object invoking the signal is not passed to the callback.
-- If you need to access it, you can use the implit @?self@ parameter.
-- Note that this requires activating the @ImplicitParams@ GHC extension.
-- 
afterWidgetFocusInEvent :: (IsWidget a, MonadIO m) => a -> ((?self :: a) => WidgetFocusInEventCallback) -> m SignalHandlerId
afterWidgetFocusInEvent :: forall a (m :: * -> *).
(IsWidget a, MonadIO m) =>
a
-> ((?self::a) => WidgetFocusInEventCallback) -> m SignalHandlerId
afterWidgetFocusInEvent a
obj (?self::a) => WidgetFocusInEventCallback
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 wrapped :: a -> WidgetFocusInEventCallback
wrapped a
self = let ?self = a
?self::a
self in (?self::a) => WidgetFocusInEventCallback
WidgetFocusInEventCallback
cb
    let wrapped' :: C_WidgetFocusInEventCallback
wrapped' = (a -> WidgetFocusInEventCallback) -> C_WidgetFocusInEventCallback
forall a.
GObject a =>
(a -> WidgetFocusInEventCallback) -> C_WidgetFocusInEventCallback
wrap_WidgetFocusInEventCallback a -> WidgetFocusInEventCallback
wrapped
    FunPtr C_WidgetFocusInEventCallback
wrapped'' <- C_WidgetFocusInEventCallback
-> IO (FunPtr C_WidgetFocusInEventCallback)
mk_WidgetFocusInEventCallback C_WidgetFocusInEventCallback
wrapped'
    a
-> Text
-> FunPtr C_WidgetFocusInEventCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj Text
"focus-in-event" FunPtr C_WidgetFocusInEventCallback
wrapped'' SignalConnectMode
SignalConnectAfter Maybe Text
forall a. Maybe a
Nothing


#if defined(ENABLE_OVERLOADING)
data WidgetFocusInEventSignalInfo
instance SignalInfo WidgetFocusInEventSignalInfo where
    type HaskellCallbackType WidgetFocusInEventSignalInfo = WidgetFocusInEventCallback
    connectSignal obj cb connectMode detail = do
        let cb' = wrap_WidgetFocusInEventCallback cb
        cb'' <- mk_WidgetFocusInEventCallback cb'
        connectSignalFunPtr obj "focus-in-event" cb'' connectMode detail
    dbgSignalInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Gtk.Objects.Widget::focus-in-event"
        , O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-3.0.38/docs/GI-Gtk-Objects-Widget.html#g:signal:focusInEvent"})

#endif

-- signal Widget::focus-out-event
-- | The [focusOutEvent](#g:signal:focusOutEvent) signal will be emitted when the keyboard focus
-- leaves the /@widget@/\'s window.
-- 
-- To receive this signal, the t'GI.Gdk.Objects.Window.Window' associated to the widget needs
-- to enable the @/GDK_FOCUS_CHANGE_MASK/@ mask.
type WidgetFocusOutEventCallback =
    Gdk.EventFocus.EventFocus
    -- ^ /@event@/: the t'GI.Gdk.Structs.EventFocus.EventFocus' which triggered this
    --   signal.
    -> IO Bool
    -- ^ __Returns:__ 'P.True' to stop other handlers from being invoked for the event.
    --   'P.False' to propagate the event further.

type C_WidgetFocusOutEventCallback =
    Ptr Widget ->                           -- object
    Ptr Gdk.EventFocus.EventFocus ->
    Ptr () ->                               -- user_data
    IO CInt

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

wrap_WidgetFocusOutEventCallback :: 
    GObject a => (a -> WidgetFocusOutEventCallback) ->
    C_WidgetFocusOutEventCallback
wrap_WidgetFocusOutEventCallback :: forall a.
GObject a =>
(a -> WidgetFocusInEventCallback) -> C_WidgetFocusInEventCallback
wrap_WidgetFocusOutEventCallback a -> WidgetFocusInEventCallback
gi'cb Ptr Widget
gi'selfPtr Ptr EventFocus
event Ptr ()
_ = do
    EventFocus
event' <- ((ManagedPtr EventFocus -> EventFocus)
-> Ptr EventFocus -> IO EventFocus
forall a.
(HasCallStack, BoxedPtr a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
newPtr ManagedPtr EventFocus -> EventFocus
Gdk.EventFocus.EventFocus) Ptr EventFocus
event
    Bool
result <- Ptr Widget -> (Widget -> IO Bool) -> IO Bool
forall a b.
(HasCallStack, ManagedPtrNewtype a) =>
Ptr a -> (a -> IO b) -> IO b
B.ManagedPtr.withTransient Ptr Widget
gi'selfPtr ((Widget -> IO Bool) -> IO Bool) -> (Widget -> IO Bool) -> IO Bool
forall a b. (a -> b) -> a -> b
$ \Widget
gi'self -> a -> WidgetFocusInEventCallback
gi'cb (Widget -> a
Coerce.coerce Widget
gi'self)  EventFocus
event'
    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 [focusOutEvent](#signal:focusOutEvent) 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 #focusOutEvent callback
-- @
-- 
-- 
onWidgetFocusOutEvent :: (IsWidget a, MonadIO m) => a -> ((?self :: a) => WidgetFocusOutEventCallback) -> m SignalHandlerId
onWidgetFocusOutEvent :: forall a (m :: * -> *).
(IsWidget a, MonadIO m) =>
a
-> ((?self::a) => WidgetFocusInEventCallback) -> m SignalHandlerId
onWidgetFocusOutEvent a
obj (?self::a) => WidgetFocusInEventCallback
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 wrapped :: a -> WidgetFocusInEventCallback
wrapped a
self = let ?self = a
?self::a
self in (?self::a) => WidgetFocusInEventCallback
WidgetFocusInEventCallback
cb
    let wrapped' :: C_WidgetFocusInEventCallback
wrapped' = (a -> WidgetFocusInEventCallback) -> C_WidgetFocusInEventCallback
forall a.
GObject a =>
(a -> WidgetFocusInEventCallback) -> C_WidgetFocusInEventCallback
wrap_WidgetFocusOutEventCallback a -> WidgetFocusInEventCallback
wrapped
    FunPtr C_WidgetFocusInEventCallback
wrapped'' <- C_WidgetFocusInEventCallback
-> IO (FunPtr C_WidgetFocusInEventCallback)
mk_WidgetFocusOutEventCallback C_WidgetFocusInEventCallback
wrapped'
    a
-> Text
-> FunPtr C_WidgetFocusInEventCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj Text
"focus-out-event" FunPtr C_WidgetFocusInEventCallback
wrapped'' SignalConnectMode
SignalConnectBefore Maybe Text
forall a. Maybe a
Nothing

-- | Connect a signal handler for the [focusOutEvent](#signal:focusOutEvent) 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 #focusOutEvent callback
-- @
-- 
-- 
-- 
-- By default the object invoking the signal is not passed to the callback.
-- If you need to access it, you can use the implit @?self@ parameter.
-- Note that this requires activating the @ImplicitParams@ GHC extension.
-- 
afterWidgetFocusOutEvent :: (IsWidget a, MonadIO m) => a -> ((?self :: a) => WidgetFocusOutEventCallback) -> m SignalHandlerId
afterWidgetFocusOutEvent :: forall a (m :: * -> *).
(IsWidget a, MonadIO m) =>
a
-> ((?self::a) => WidgetFocusInEventCallback) -> m SignalHandlerId
afterWidgetFocusOutEvent a
obj (?self::a) => WidgetFocusInEventCallback
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 wrapped :: a -> WidgetFocusInEventCallback
wrapped a
self = let ?self = a
?self::a
self in (?self::a) => WidgetFocusInEventCallback
WidgetFocusInEventCallback
cb
    let wrapped' :: C_WidgetFocusInEventCallback
wrapped' = (a -> WidgetFocusInEventCallback) -> C_WidgetFocusInEventCallback
forall a.
GObject a =>
(a -> WidgetFocusInEventCallback) -> C_WidgetFocusInEventCallback
wrap_WidgetFocusOutEventCallback a -> WidgetFocusInEventCallback
wrapped
    FunPtr C_WidgetFocusInEventCallback
wrapped'' <- C_WidgetFocusInEventCallback
-> IO (FunPtr C_WidgetFocusInEventCallback)
mk_WidgetFocusOutEventCallback C_WidgetFocusInEventCallback
wrapped'
    a
-> Text
-> FunPtr C_WidgetFocusInEventCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj Text
"focus-out-event" FunPtr C_WidgetFocusInEventCallback
wrapped'' SignalConnectMode
SignalConnectAfter Maybe Text
forall a. Maybe a
Nothing


#if defined(ENABLE_OVERLOADING)
data WidgetFocusOutEventSignalInfo
instance SignalInfo WidgetFocusOutEventSignalInfo where
    type HaskellCallbackType WidgetFocusOutEventSignalInfo = WidgetFocusOutEventCallback
    connectSignal obj cb connectMode detail = do
        let cb' = wrap_WidgetFocusOutEventCallback cb
        cb'' <- mk_WidgetFocusOutEventCallback cb'
        connectSignalFunPtr obj "focus-out-event" cb'' connectMode detail
    dbgSignalInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Gtk.Objects.Widget::focus-out-event"
        , O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-3.0.38/docs/GI-Gtk-Objects-Widget.html#g:signal:focusOutEvent"})

#endif

-- signal Widget::grab-broken-event
-- | Emitted when a pointer or keyboard grab on a window belonging
-- to /@widget@/ gets broken.
-- 
-- On X11, this happens when the grab window becomes unviewable
-- (i.e. it or one of its ancestors is unmapped), or if the same
-- application grabs the pointer or keyboard again.
-- 
-- /Since: 2.8/
type WidgetGrabBrokenEventCallback =
    Gdk.EventGrabBroken.EventGrabBroken
    -- ^ /@event@/: the t'GI.Gdk.Structs.EventGrabBroken.EventGrabBroken' event
    -> IO Bool
    -- ^ __Returns:__ 'P.True' to stop other handlers from being invoked for
    --   the event. 'P.False' to propagate the event further.

type C_WidgetGrabBrokenEventCallback =
    Ptr Widget ->                           -- object
    Ptr Gdk.EventGrabBroken.EventGrabBroken ->
    Ptr () ->                               -- user_data
    IO CInt

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

wrap_WidgetGrabBrokenEventCallback :: 
    GObject a => (a -> WidgetGrabBrokenEventCallback) ->
    C_WidgetGrabBrokenEventCallback
wrap_WidgetGrabBrokenEventCallback :: forall a.
GObject a =>
(a -> WidgetGrabBrokenEventCallback)
-> C_WidgetGrabBrokenEventCallback
wrap_WidgetGrabBrokenEventCallback a -> WidgetGrabBrokenEventCallback
gi'cb Ptr Widget
gi'selfPtr Ptr EventGrabBroken
event Ptr ()
_ = do
    EventGrabBroken
event' <- ((ManagedPtr EventGrabBroken -> EventGrabBroken)
-> Ptr EventGrabBroken -> IO EventGrabBroken
forall a.
(HasCallStack, BoxedPtr a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
newPtr ManagedPtr EventGrabBroken -> EventGrabBroken
Gdk.EventGrabBroken.EventGrabBroken) Ptr EventGrabBroken
event
    Bool
result <- Ptr Widget -> (Widget -> IO Bool) -> IO Bool
forall a b.
(HasCallStack, ManagedPtrNewtype a) =>
Ptr a -> (a -> IO b) -> IO b
B.ManagedPtr.withTransient Ptr Widget
gi'selfPtr ((Widget -> IO Bool) -> IO Bool) -> (Widget -> IO Bool) -> IO Bool
forall a b. (a -> b) -> a -> b
$ \Widget
gi'self -> a -> WidgetGrabBrokenEventCallback
gi'cb (Widget -> a
Coerce.coerce Widget
gi'self)  EventGrabBroken
event'
    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 [grabBrokenEvent](#signal:grabBrokenEvent) 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 #grabBrokenEvent callback
-- @
-- 
-- 
onWidgetGrabBrokenEvent :: (IsWidget a, MonadIO m) => a -> ((?self :: a) => WidgetGrabBrokenEventCallback) -> m SignalHandlerId
onWidgetGrabBrokenEvent :: forall a (m :: * -> *).
(IsWidget a, MonadIO m) =>
a
-> ((?self::a) => WidgetGrabBrokenEventCallback)
-> m SignalHandlerId
onWidgetGrabBrokenEvent a
obj (?self::a) => WidgetGrabBrokenEventCallback
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 wrapped :: a -> WidgetGrabBrokenEventCallback
wrapped a
self = let ?self = a
?self::a
self in (?self::a) => WidgetGrabBrokenEventCallback
WidgetGrabBrokenEventCallback
cb
    let wrapped' :: C_WidgetGrabBrokenEventCallback
wrapped' = (a -> WidgetGrabBrokenEventCallback)
-> C_WidgetGrabBrokenEventCallback
forall a.
GObject a =>
(a -> WidgetGrabBrokenEventCallback)
-> C_WidgetGrabBrokenEventCallback
wrap_WidgetGrabBrokenEventCallback a -> WidgetGrabBrokenEventCallback
wrapped
    FunPtr C_WidgetGrabBrokenEventCallback
wrapped'' <- C_WidgetGrabBrokenEventCallback
-> IO (FunPtr C_WidgetGrabBrokenEventCallback)
mk_WidgetGrabBrokenEventCallback C_WidgetGrabBrokenEventCallback
wrapped'
    a
-> Text
-> FunPtr C_WidgetGrabBrokenEventCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj Text
"grab-broken-event" FunPtr C_WidgetGrabBrokenEventCallback
wrapped'' SignalConnectMode
SignalConnectBefore Maybe Text
forall a. Maybe a
Nothing

-- | Connect a signal handler for the [grabBrokenEvent](#signal:grabBrokenEvent) 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 #grabBrokenEvent callback
-- @
-- 
-- 
-- 
-- By default the object invoking the signal is not passed to the callback.
-- If you need to access it, you can use the implit @?self@ parameter.
-- Note that this requires activating the @ImplicitParams@ GHC extension.
-- 
afterWidgetGrabBrokenEvent :: (IsWidget a, MonadIO m) => a -> ((?self :: a) => WidgetGrabBrokenEventCallback) -> m SignalHandlerId
afterWidgetGrabBrokenEvent :: forall a (m :: * -> *).
(IsWidget a, MonadIO m) =>
a
-> ((?self::a) => WidgetGrabBrokenEventCallback)
-> m SignalHandlerId
afterWidgetGrabBrokenEvent a
obj (?self::a) => WidgetGrabBrokenEventCallback
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 wrapped :: a -> WidgetGrabBrokenEventCallback
wrapped a
self = let ?self = a
?self::a
self in (?self::a) => WidgetGrabBrokenEventCallback
WidgetGrabBrokenEventCallback
cb
    let wrapped' :: C_WidgetGrabBrokenEventCallback
wrapped' = (a -> WidgetGrabBrokenEventCallback)
-> C_WidgetGrabBrokenEventCallback
forall a.
GObject a =>
(a -> WidgetGrabBrokenEventCallback)
-> C_WidgetGrabBrokenEventCallback
wrap_WidgetGrabBrokenEventCallback a -> WidgetGrabBrokenEventCallback
wrapped
    FunPtr C_WidgetGrabBrokenEventCallback
wrapped'' <- C_WidgetGrabBrokenEventCallback
-> IO (FunPtr C_WidgetGrabBrokenEventCallback)
mk_WidgetGrabBrokenEventCallback C_WidgetGrabBrokenEventCallback
wrapped'
    a
-> Text
-> FunPtr C_WidgetGrabBrokenEventCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj Text
"grab-broken-event" FunPtr C_WidgetGrabBrokenEventCallback
wrapped'' SignalConnectMode
SignalConnectAfter Maybe Text
forall a. Maybe a
Nothing


#if defined(ENABLE_OVERLOADING)
data WidgetGrabBrokenEventSignalInfo
instance SignalInfo WidgetGrabBrokenEventSignalInfo where
    type HaskellCallbackType WidgetGrabBrokenEventSignalInfo = WidgetGrabBrokenEventCallback
    connectSignal obj cb connectMode detail = do
        let cb' = wrap_WidgetGrabBrokenEventCallback cb
        cb'' <- mk_WidgetGrabBrokenEventCallback cb'
        connectSignalFunPtr obj "grab-broken-event" cb'' connectMode detail
    dbgSignalInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Gtk.Objects.Widget::grab-broken-event"
        , O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-3.0.38/docs/GI-Gtk-Objects-Widget.html#g:signal:grabBrokenEvent"})

#endif

-- signal Widget::grab-focus
-- | /No description available in the introspection data./
type WidgetGrabFocusCallback =
    IO ()

type C_WidgetGrabFocusCallback =
    Ptr Widget ->                           -- object
    Ptr () ->                               -- user_data
    IO ()

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

wrap_WidgetGrabFocusCallback :: 
    GObject a => (a -> WidgetGrabFocusCallback) ->
    C_WidgetGrabFocusCallback
wrap_WidgetGrabFocusCallback :: forall a.
GObject a =>
(a -> IO ()) -> C_WidgetAccelClosuresChangedCallback
wrap_WidgetGrabFocusCallback a -> IO ()
gi'cb Ptr Widget
gi'selfPtr Ptr ()
_ = do
    Ptr Widget -> (Widget -> IO ()) -> IO ()
forall a b.
(HasCallStack, ManagedPtrNewtype a) =>
Ptr a -> (a -> IO b) -> IO b
B.ManagedPtr.withTransient Ptr Widget
gi'selfPtr ((Widget -> IO ()) -> IO ()) -> (Widget -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Widget
gi'self -> a -> IO ()
gi'cb (Widget -> a
Coerce.coerce Widget
gi'self) 


-- | Connect a signal handler for the [grabFocus](#signal:grabFocus) 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 #grabFocus callback
-- @
-- 
-- 
onWidgetGrabFocus :: (IsWidget a, MonadIO m) => a -> ((?self :: a) => WidgetGrabFocusCallback) -> m SignalHandlerId
onWidgetGrabFocus :: forall a (m :: * -> *).
(IsWidget a, MonadIO m) =>
a -> ((?self::a) => IO ()) -> m SignalHandlerId
onWidgetGrabFocus a
obj (?self::a) => 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 wrapped :: a -> IO ()
wrapped a
self = let ?self = a
?self::a
self in IO ()
(?self::a) => IO ()
cb
    let wrapped' :: C_WidgetAccelClosuresChangedCallback
wrapped' = (a -> IO ()) -> C_WidgetAccelClosuresChangedCallback
forall a.
GObject a =>
(a -> IO ()) -> C_WidgetAccelClosuresChangedCallback
wrap_WidgetGrabFocusCallback a -> IO ()
wrapped
    FunPtr C_WidgetAccelClosuresChangedCallback
wrapped'' <- C_WidgetAccelClosuresChangedCallback
-> IO (FunPtr C_WidgetAccelClosuresChangedCallback)
mk_WidgetGrabFocusCallback C_WidgetAccelClosuresChangedCallback
wrapped'
    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 Text
"grab-focus" FunPtr C_WidgetAccelClosuresChangedCallback
wrapped'' SignalConnectMode
SignalConnectBefore Maybe Text
forall a. Maybe a
Nothing

-- | Connect a signal handler for the [grabFocus](#signal:grabFocus) 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 #grabFocus callback
-- @
-- 
-- 
-- 
-- By default the object invoking the signal is not passed to the callback.
-- If you need to access it, you can use the implit @?self@ parameter.
-- Note that this requires activating the @ImplicitParams@ GHC extension.
-- 
afterWidgetGrabFocus :: (IsWidget a, MonadIO m) => a -> ((?self :: a) => WidgetGrabFocusCallback) -> m SignalHandlerId
afterWidgetGrabFocus :: forall a (m :: * -> *).
(IsWidget a, MonadIO m) =>
a -> ((?self::a) => IO ()) -> m SignalHandlerId
afterWidgetGrabFocus a
obj (?self::a) => 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 wrapped :: a -> IO ()
wrapped a
self = let ?self = a
?self::a
self in IO ()
(?self::a) => IO ()
cb
    let wrapped' :: C_WidgetAccelClosuresChangedCallback
wrapped' = (a -> IO ()) -> C_WidgetAccelClosuresChangedCallback
forall a.
GObject a =>
(a -> IO ()) -> C_WidgetAccelClosuresChangedCallback
wrap_WidgetGrabFocusCallback a -> IO ()
wrapped
    FunPtr C_WidgetAccelClosuresChangedCallback
wrapped'' <- C_WidgetAccelClosuresChangedCallback
-> IO (FunPtr C_WidgetAccelClosuresChangedCallback)
mk_WidgetGrabFocusCallback C_WidgetAccelClosuresChangedCallback
wrapped'
    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 Text
"grab-focus" FunPtr C_WidgetAccelClosuresChangedCallback
wrapped'' SignalConnectMode
SignalConnectAfter Maybe Text
forall a. Maybe a
Nothing


#if defined(ENABLE_OVERLOADING)
data WidgetGrabFocusSignalInfo
instance SignalInfo WidgetGrabFocusSignalInfo where
    type HaskellCallbackType WidgetGrabFocusSignalInfo = WidgetGrabFocusCallback
    connectSignal obj cb connectMode detail = do
        let cb' = wrap_WidgetGrabFocusCallback cb
        cb'' <- mk_WidgetGrabFocusCallback cb'
        connectSignalFunPtr obj "grab-focus" cb'' connectMode detail
    dbgSignalInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Gtk.Objects.Widget::grab-focus"
        , O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-3.0.38/docs/GI-Gtk-Objects-Widget.html#g:signal:grabFocus"})

#endif

-- signal Widget::grab-notify
-- | The [grabNotify](#g: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 ()

type C_WidgetGrabNotifyCallback =
    Ptr Widget ->                           -- 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_WidgetGrabNotifyCallback :: 
    GObject a => (a -> WidgetGrabNotifyCallback) ->
    C_WidgetGrabNotifyCallback
wrap_WidgetGrabNotifyCallback :: forall a.
GObject a =>
(a -> WidgetGrabNotifyCallback) -> C_WidgetGrabNotifyCallback
wrap_WidgetGrabNotifyCallback a -> WidgetGrabNotifyCallback
gi'cb Ptr Widget
gi'selfPtr CInt
wasGrabbed Ptr ()
_ = do
    let wasGrabbed' :: Bool
wasGrabbed' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= CInt
0) CInt
wasGrabbed
    Ptr Widget -> (Widget -> IO ()) -> IO ()
forall a b.
(HasCallStack, ManagedPtrNewtype a) =>
Ptr a -> (a -> IO b) -> IO b
B.ManagedPtr.withTransient Ptr Widget
gi'selfPtr ((Widget -> IO ()) -> IO ()) -> (Widget -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Widget
gi'self -> a -> WidgetGrabNotifyCallback
gi'cb (Widget -> a
Coerce.coerce Widget
gi'self)  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 -> ((?self :: a) => WidgetGrabNotifyCallback) -> m SignalHandlerId
onWidgetGrabNotify :: forall a (m :: * -> *).
(IsWidget a, MonadIO m) =>
a -> ((?self::a) => WidgetGrabNotifyCallback) -> m SignalHandlerId
onWidgetGrabNotify a
obj (?self::a) => 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 wrapped :: a -> WidgetGrabNotifyCallback
wrapped a
self = let ?self = a
?self::a
self in (?self::a) => WidgetGrabNotifyCallback
WidgetGrabNotifyCallback
cb
    let wrapped' :: C_WidgetGrabNotifyCallback
wrapped' = (a -> WidgetGrabNotifyCallback) -> C_WidgetGrabNotifyCallback
forall a.
GObject a =>
(a -> WidgetGrabNotifyCallback) -> C_WidgetGrabNotifyCallback
wrap_WidgetGrabNotifyCallback a -> WidgetGrabNotifyCallback
wrapped
    FunPtr C_WidgetGrabNotifyCallback
wrapped'' <- C_WidgetGrabNotifyCallback
-> IO (FunPtr C_WidgetGrabNotifyCallback)
mk_WidgetGrabNotifyCallback C_WidgetGrabNotifyCallback
wrapped'
    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 Text
"grab-notify" FunPtr C_WidgetGrabNotifyCallback
wrapped'' 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
-- @
-- 
-- 
-- 
-- By default the object invoking the signal is not passed to the callback.
-- If you need to access it, you can use the implit @?self@ parameter.
-- Note that this requires activating the @ImplicitParams@ GHC extension.
-- 
afterWidgetGrabNotify :: (IsWidget a, MonadIO m) => a -> ((?self :: a) => WidgetGrabNotifyCallback) -> m SignalHandlerId
afterWidgetGrabNotify :: forall a (m :: * -> *).
(IsWidget a, MonadIO m) =>
a -> ((?self::a) => WidgetGrabNotifyCallback) -> m SignalHandlerId
afterWidgetGrabNotify a
obj (?self::a) => 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 wrapped :: a -> WidgetGrabNotifyCallback
wrapped a
self = let ?self = a
?self::a
self in (?self::a) => WidgetGrabNotifyCallback
WidgetGrabNotifyCallback
cb
    let wrapped' :: C_WidgetGrabNotifyCallback
wrapped' = (a -> WidgetGrabNotifyCallback) -> C_WidgetGrabNotifyCallback
forall a.
GObject a =>
(a -> WidgetGrabNotifyCallback) -> C_WidgetGrabNotifyCallback
wrap_WidgetGrabNotifyCallback a -> WidgetGrabNotifyCallback
wrapped
    FunPtr C_WidgetGrabNotifyCallback
wrapped'' <- C_WidgetGrabNotifyCallback
-> IO (FunPtr C_WidgetGrabNotifyCallback)
mk_WidgetGrabNotifyCallback C_WidgetGrabNotifyCallback
wrapped'
    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 Text
"grab-notify" FunPtr C_WidgetGrabNotifyCallback
wrapped'' 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
    dbgSignalInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Gtk.Objects.Widget::grab-notify"
        , O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-3.0.38/docs/GI-Gtk-Objects-Widget.html#g:signal:grabNotify"})

#endif

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

type C_WidgetHideCallback =
    Ptr Widget ->                           -- 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_WidgetHideCallback :: 
    GObject a => (a -> WidgetHideCallback) ->
    C_WidgetHideCallback
wrap_WidgetHideCallback :: forall a.
GObject a =>
(a -> IO ()) -> C_WidgetAccelClosuresChangedCallback
wrap_WidgetHideCallback a -> IO ()
gi'cb Ptr Widget
gi'selfPtr Ptr ()
_ = do
    Ptr Widget -> (Widget -> IO ()) -> IO ()
forall a b.
(HasCallStack, ManagedPtrNewtype a) =>
Ptr a -> (a -> IO b) -> IO b
B.ManagedPtr.withTransient Ptr Widget
gi'selfPtr ((Widget -> IO ()) -> IO ()) -> (Widget -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Widget
gi'self -> a -> IO ()
gi'cb (Widget -> a
Coerce.coerce Widget
gi'self) 


-- | 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 -> ((?self :: a) => WidgetHideCallback) -> m SignalHandlerId
onWidgetHide :: forall a (m :: * -> *).
(IsWidget a, MonadIO m) =>
a -> ((?self::a) => IO ()) -> m SignalHandlerId
onWidgetHide a
obj (?self::a) => 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 wrapped :: a -> IO ()
wrapped a
self = let ?self = a
?self::a
self in IO ()
(?self::a) => IO ()
cb
    let wrapped' :: C_WidgetAccelClosuresChangedCallback
wrapped' = (a -> IO ()) -> C_WidgetAccelClosuresChangedCallback
forall a.
GObject a =>
(a -> IO ()) -> C_WidgetAccelClosuresChangedCallback
wrap_WidgetHideCallback a -> IO ()
wrapped
    FunPtr C_WidgetAccelClosuresChangedCallback
wrapped'' <- C_WidgetAccelClosuresChangedCallback
-> IO (FunPtr C_WidgetAccelClosuresChangedCallback)
mk_WidgetHideCallback C_WidgetAccelClosuresChangedCallback
wrapped'
    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 Text
"hide" FunPtr C_WidgetAccelClosuresChangedCallback
wrapped'' 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
-- @
-- 
-- 
-- 
-- By default the object invoking the signal is not passed to the callback.
-- If you need to access it, you can use the implit @?self@ parameter.
-- Note that this requires activating the @ImplicitParams@ GHC extension.
-- 
afterWidgetHide :: (IsWidget a, MonadIO m) => a -> ((?self :: a) => WidgetHideCallback) -> m SignalHandlerId
afterWidgetHide :: forall a (m :: * -> *).
(IsWidget a, MonadIO m) =>
a -> ((?self::a) => IO ()) -> m SignalHandlerId
afterWidgetHide a
obj (?self::a) => 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 wrapped :: a -> IO ()
wrapped a
self = let ?self = a
?self::a
self in IO ()
(?self::a) => IO ()
cb
    let wrapped' :: C_WidgetAccelClosuresChangedCallback
wrapped' = (a -> IO ()) -> C_WidgetAccelClosuresChangedCallback
forall a.
GObject a =>
(a -> IO ()) -> C_WidgetAccelClosuresChangedCallback
wrap_WidgetHideCallback a -> IO ()
wrapped
    FunPtr C_WidgetAccelClosuresChangedCallback
wrapped'' <- C_WidgetAccelClosuresChangedCallback
-> IO (FunPtr C_WidgetAccelClosuresChangedCallback)
mk_WidgetHideCallback C_WidgetAccelClosuresChangedCallback
wrapped'
    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 Text
"hide" FunPtr C_WidgetAccelClosuresChangedCallback
wrapped'' 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
    dbgSignalInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Gtk.Objects.Widget::hide"
        , O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-3.0.38/docs/GI-Gtk-Objects-Widget.html#g:signal:hide"})

#endif

-- signal Widget::hierarchy-changed
-- | The [hierarchyChanged](#g:signal:hierarchyChanged) signal is emitted when the
-- anchored state of a widget changes. A widget is
-- “anchored” when its toplevel
-- ancestor is a t'GI.Gtk.Objects.Window.Window'. This signal is emitted when
-- a widget changes from un-anchored to anchored or vice-versa.
type WidgetHierarchyChangedCallback =
    Maybe Widget
    -- ^ /@previousToplevel@/: the previous toplevel ancestor, or 'P.Nothing'
    --   if the widget was previously unanchored
    -> IO ()

type C_WidgetHierarchyChangedCallback =
    Ptr Widget ->                           -- object
    Ptr Widget ->
    Ptr () ->                               -- user_data
    IO ()

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

wrap_WidgetHierarchyChangedCallback :: 
    GObject a => (a -> WidgetHierarchyChangedCallback) ->
    C_WidgetHierarchyChangedCallback
wrap_WidgetHierarchyChangedCallback :: forall a.
GObject a =>
(a -> Maybe Widget -> IO ()) -> C_WidgetHierarchyChangedCallback
wrap_WidgetHierarchyChangedCallback a -> Maybe Widget -> IO ()
gi'cb Ptr Widget
gi'selfPtr Ptr Widget
previousToplevel Ptr ()
_ = do
    Maybe Widget
maybePreviousToplevel <-
        if Ptr Widget
previousToplevel Ptr Widget -> Ptr Widget -> Bool
forall a. Eq a => a -> a -> Bool
== Ptr Widget
forall a. Ptr a
nullPtr
        then Maybe Widget -> IO (Maybe Widget)
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe Widget
forall a. Maybe a
Nothing
        else do
            Widget
previousToplevel' <- ((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
previousToplevel
            Maybe Widget -> IO (Maybe Widget)
forall (m :: * -> *) a. Monad m => a -> m a
return (Maybe Widget -> IO (Maybe Widget))
-> Maybe Widget -> IO (Maybe Widget)
forall a b. (a -> b) -> a -> b
$ Widget -> Maybe Widget
forall a. a -> Maybe a
Just Widget
previousToplevel'
    Ptr Widget -> (Widget -> IO ()) -> IO ()
forall a b.
(HasCallStack, ManagedPtrNewtype a) =>
Ptr a -> (a -> IO b) -> IO b
B.ManagedPtr.withTransient Ptr Widget
gi'selfPtr ((Widget -> IO ()) -> IO ()) -> (Widget -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Widget
gi'self -> a -> Maybe Widget -> IO ()
gi'cb (Widget -> a
Coerce.coerce Widget
gi'self)  Maybe Widget
maybePreviousToplevel


-- | Connect a signal handler for the [hierarchyChanged](#signal:hierarchyChanged) 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 #hierarchyChanged callback
-- @
-- 
-- 
onWidgetHierarchyChanged :: (IsWidget a, MonadIO m) => a -> ((?self :: a) => WidgetHierarchyChangedCallback) -> m SignalHandlerId
onWidgetHierarchyChanged :: forall a (m :: * -> *).
(IsWidget a, MonadIO m) =>
a -> ((?self::a) => Maybe Widget -> IO ()) -> m SignalHandlerId
onWidgetHierarchyChanged a
obj (?self::a) => Maybe Widget -> 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 wrapped :: a -> Maybe Widget -> IO ()
wrapped a
self = let ?self = a
?self::a
self in (?self::a) => Maybe Widget -> IO ()
Maybe Widget -> IO ()
cb
    let wrapped' :: C_WidgetHierarchyChangedCallback
wrapped' = (a -> Maybe Widget -> IO ()) -> C_WidgetHierarchyChangedCallback
forall a.
GObject a =>
(a -> Maybe Widget -> IO ()) -> C_WidgetHierarchyChangedCallback
wrap_WidgetHierarchyChangedCallback a -> Maybe Widget -> IO ()
wrapped
    FunPtr C_WidgetHierarchyChangedCallback
wrapped'' <- C_WidgetHierarchyChangedCallback
-> IO (FunPtr C_WidgetHierarchyChangedCallback)
mk_WidgetHierarchyChangedCallback C_WidgetHierarchyChangedCallback
wrapped'
    a
-> Text
-> FunPtr C_WidgetHierarchyChangedCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj Text
"hierarchy-changed" FunPtr C_WidgetHierarchyChangedCallback
wrapped'' SignalConnectMode
SignalConnectBefore Maybe Text
forall a. Maybe a
Nothing

-- | Connect a signal handler for the [hierarchyChanged](#signal:hierarchyChanged) 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 #hierarchyChanged callback
-- @
-- 
-- 
-- 
-- By default the object invoking the signal is not passed to the callback.
-- If you need to access it, you can use the implit @?self@ parameter.
-- Note that this requires activating the @ImplicitParams@ GHC extension.
-- 
afterWidgetHierarchyChanged :: (IsWidget a, MonadIO m) => a -> ((?self :: a) => WidgetHierarchyChangedCallback) -> m SignalHandlerId
afterWidgetHierarchyChanged :: forall a (m :: * -> *).
(IsWidget a, MonadIO m) =>
a -> ((?self::a) => Maybe Widget -> IO ()) -> m SignalHandlerId
afterWidgetHierarchyChanged a
obj (?self::a) => Maybe Widget -> 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 wrapped :: a -> Maybe Widget -> IO ()
wrapped a
self = let ?self = a
?self::a
self in (?self::a) => Maybe Widget -> IO ()
Maybe Widget -> IO ()
cb
    let wrapped' :: C_WidgetHierarchyChangedCallback
wrapped' = (a -> Maybe Widget -> IO ()) -> C_WidgetHierarchyChangedCallback
forall a.
GObject a =>
(a -> Maybe Widget -> IO ()) -> C_WidgetHierarchyChangedCallback
wrap_WidgetHierarchyChangedCallback a -> Maybe Widget -> IO ()
wrapped
    FunPtr C_WidgetHierarchyChangedCallback
wrapped'' <- C_WidgetHierarchyChangedCallback
-> IO (FunPtr C_WidgetHierarchyChangedCallback)
mk_WidgetHierarchyChangedCallback C_WidgetHierarchyChangedCallback
wrapped'
    a
-> Text
-> FunPtr C_WidgetHierarchyChangedCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj Text
"hierarchy-changed" FunPtr C_WidgetHierarchyChangedCallback
wrapped'' SignalConnectMode
SignalConnectAfter Maybe Text
forall a. Maybe a
Nothing


#if defined(ENABLE_OVERLOADING)
data WidgetHierarchyChangedSignalInfo
instance SignalInfo WidgetHierarchyChangedSignalInfo where
    type HaskellCallbackType WidgetHierarchyChangedSignalInfo = WidgetHierarchyChangedCallback
    connectSignal obj cb connectMode detail = do
        let cb' = wrap_WidgetHierarchyChangedCallback cb
        cb'' <- mk_WidgetHierarchyChangedCallback cb'
        connectSignalFunPtr obj "hierarchy-changed" cb'' connectMode detail
    dbgSignalInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Gtk.Objects.Widget::hierarchy-changed"
        , O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-3.0.38/docs/GI-Gtk-Objects-Widget.html#g:signal:hierarchyChanged"})

#endif

-- signal Widget::key-press-event
-- | The [keyPressEvent](#g:signal:keyPressEvent) signal is emitted when a key is pressed. The signal
-- emission will reoccur at the key-repeat rate when the key is kept pressed.
-- 
-- To receive this signal, the t'GI.Gdk.Objects.Window.Window' associated to the widget needs
-- to enable the @/GDK_KEY_PRESS_MASK/@ mask.
-- 
-- This signal will be sent to the grab widget if there is one.
type WidgetKeyPressEventCallback =
    Gdk.EventKey.EventKey
    -- ^ /@event@/: the t'GI.Gdk.Structs.EventKey.EventKey' which triggered this signal.
    -> IO Bool
    -- ^ __Returns:__ 'P.True' to stop other handlers from being invoked for the event.
    --   'P.False' to propagate the event further.

type C_WidgetKeyPressEventCallback =
    Ptr Widget ->                           -- object
    Ptr Gdk.EventKey.EventKey ->
    Ptr () ->                               -- user_data
    IO CInt

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

wrap_WidgetKeyPressEventCallback :: 
    GObject a => (a -> WidgetKeyPressEventCallback) ->
    C_WidgetKeyPressEventCallback
wrap_WidgetKeyPressEventCallback :: forall a.
GObject a =>
(a -> WidgetKeyPressEventCallback) -> C_WidgetKeyPressEventCallback
wrap_WidgetKeyPressEventCallback a -> WidgetKeyPressEventCallback
gi'cb Ptr Widget
gi'selfPtr Ptr EventKey
event Ptr ()
_ = do
    EventKey
event' <- ((ManagedPtr EventKey -> EventKey) -> Ptr EventKey -> IO EventKey
forall a.
(HasCallStack, BoxedPtr a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
newPtr ManagedPtr EventKey -> EventKey
Gdk.EventKey.EventKey) Ptr EventKey
event
    Bool
result <- Ptr Widget -> (Widget -> IO Bool) -> IO Bool
forall a b.
(HasCallStack, ManagedPtrNewtype a) =>
Ptr a -> (a -> IO b) -> IO b
B.ManagedPtr.withTransient Ptr Widget
gi'selfPtr ((Widget -> IO Bool) -> IO Bool) -> (Widget -> IO Bool) -> IO Bool
forall a b. (a -> b) -> a -> b
$ \Widget
gi'self -> a -> WidgetKeyPressEventCallback
gi'cb (Widget -> a
Coerce.coerce Widget
gi'self)  EventKey
event'
    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 [keyPressEvent](#signal:keyPressEvent) 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 #keyPressEvent callback
-- @
-- 
-- 
onWidgetKeyPressEvent :: (IsWidget a, MonadIO m) => a -> ((?self :: a) => WidgetKeyPressEventCallback) -> m SignalHandlerId
onWidgetKeyPressEvent :: forall a (m :: * -> *).
(IsWidget a, MonadIO m) =>
a
-> ((?self::a) => WidgetKeyPressEventCallback) -> m SignalHandlerId
onWidgetKeyPressEvent a
obj (?self::a) => WidgetKeyPressEventCallback
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 wrapped :: a -> WidgetKeyPressEventCallback
wrapped a
self = let ?self = a
?self::a
self in (?self::a) => WidgetKeyPressEventCallback
WidgetKeyPressEventCallback
cb
    let wrapped' :: C_WidgetKeyPressEventCallback
wrapped' = (a -> WidgetKeyPressEventCallback) -> C_WidgetKeyPressEventCallback
forall a.
GObject a =>
(a -> WidgetKeyPressEventCallback) -> C_WidgetKeyPressEventCallback
wrap_WidgetKeyPressEventCallback a -> WidgetKeyPressEventCallback
wrapped
    FunPtr C_WidgetKeyPressEventCallback
wrapped'' <- C_WidgetKeyPressEventCallback
-> IO (FunPtr C_WidgetKeyPressEventCallback)
mk_WidgetKeyPressEventCallback C_WidgetKeyPressEventCallback
wrapped'
    a
-> Text
-> FunPtr C_WidgetKeyPressEventCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj Text
"key-press-event" FunPtr C_WidgetKeyPressEventCallback
wrapped'' SignalConnectMode
SignalConnectBefore Maybe Text
forall a. Maybe a
Nothing

-- | Connect a signal handler for the [keyPressEvent](#signal:keyPressEvent) 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 #keyPressEvent callback
-- @
-- 
-- 
-- 
-- By default the object invoking the signal is not passed to the callback.
-- If you need to access it, you can use the implit @?self@ parameter.
-- Note that this requires activating the @ImplicitParams@ GHC extension.
-- 
afterWidgetKeyPressEvent :: (IsWidget a, MonadIO m) => a -> ((?self :: a) => WidgetKeyPressEventCallback) -> m SignalHandlerId
afterWidgetKeyPressEvent :: forall a (m :: * -> *).
(IsWidget a, MonadIO m) =>
a
-> ((?self::a) => WidgetKeyPressEventCallback) -> m SignalHandlerId
afterWidgetKeyPressEvent a
obj (?self::a) => WidgetKeyPressEventCallback
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 wrapped :: a -> WidgetKeyPressEventCallback
wrapped a
self = let ?self = a
?self::a
self in (?self::a) => WidgetKeyPressEventCallback
WidgetKeyPressEventCallback
cb
    let wrapped' :: C_WidgetKeyPressEventCallback
wrapped' = (a -> WidgetKeyPressEventCallback) -> C_WidgetKeyPressEventCallback
forall a.
GObject a =>
(a -> WidgetKeyPressEventCallback) -> C_WidgetKeyPressEventCallback
wrap_WidgetKeyPressEventCallback a -> WidgetKeyPressEventCallback
wrapped
    FunPtr C_WidgetKeyPressEventCallback
wrapped'' <- C_WidgetKeyPressEventCallback
-> IO (FunPtr C_WidgetKeyPressEventCallback)
mk_WidgetKeyPressEventCallback C_WidgetKeyPressEventCallback
wrapped'
    a
-> Text
-> FunPtr C_WidgetKeyPressEventCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj Text
"key-press-event" FunPtr C_WidgetKeyPressEventCallback
wrapped'' SignalConnectMode
SignalConnectAfter Maybe Text
forall a. Maybe a
Nothing


#if defined(ENABLE_OVERLOADING)
data WidgetKeyPressEventSignalInfo
instance SignalInfo WidgetKeyPressEventSignalInfo where
    type HaskellCallbackType WidgetKeyPressEventSignalInfo = WidgetKeyPressEventCallback
    connectSignal obj cb connectMode detail = do
        let cb' = wrap_WidgetKeyPressEventCallback cb
        cb'' <- mk_WidgetKeyPressEventCallback cb'
        connectSignalFunPtr obj "key-press-event" cb'' connectMode detail
    dbgSignalInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Gtk.Objects.Widget::key-press-event"
        , O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-3.0.38/docs/GI-Gtk-Objects-Widget.html#g:signal:keyPressEvent"})

#endif

-- signal Widget::key-release-event
-- | The [keyReleaseEvent](#g:signal:keyReleaseEvent) signal is emitted when a key is released.
-- 
-- To receive this signal, the t'GI.Gdk.Objects.Window.Window' associated to the widget needs
-- to enable the @/GDK_KEY_RELEASE_MASK/@ mask.
-- 
-- This signal will be sent to the grab widget if there is one.
type WidgetKeyReleaseEventCallback =
    Gdk.EventKey.EventKey
    -- ^ /@event@/: the t'GI.Gdk.Structs.EventKey.EventKey' which triggered this signal.
    -> IO Bool
    -- ^ __Returns:__ 'P.True' to stop other handlers from being invoked for the event.
    --   'P.False' to propagate the event further.

type C_WidgetKeyReleaseEventCallback =
    Ptr Widget ->                           -- object
    Ptr Gdk.EventKey.EventKey ->
    Ptr () ->                               -- user_data
    IO CInt

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

wrap_WidgetKeyReleaseEventCallback :: 
    GObject a => (a -> WidgetKeyReleaseEventCallback) ->
    C_WidgetKeyReleaseEventCallback
wrap_WidgetKeyReleaseEventCallback :: forall a.
GObject a =>
(a -> WidgetKeyPressEventCallback) -> C_WidgetKeyPressEventCallback
wrap_WidgetKeyReleaseEventCallback a -> WidgetKeyPressEventCallback
gi'cb Ptr Widget
gi'selfPtr Ptr EventKey
event Ptr ()
_ = do
    EventKey
event' <- ((ManagedPtr EventKey -> EventKey) -> Ptr EventKey -> IO EventKey
forall a.
(HasCallStack, BoxedPtr a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
newPtr ManagedPtr EventKey -> EventKey
Gdk.EventKey.EventKey) Ptr EventKey
event
    Bool
result <- Ptr Widget -> (Widget -> IO Bool) -> IO Bool
forall a b.
(HasCallStack, ManagedPtrNewtype a) =>
Ptr a -> (a -> IO b) -> IO b
B.ManagedPtr.withTransient Ptr Widget
gi'selfPtr ((Widget -> IO Bool) -> IO Bool) -> (Widget -> IO Bool) -> IO Bool
forall a b. (a -> b) -> a -> b
$ \Widget
gi'self -> a -> WidgetKeyPressEventCallback
gi'cb (Widget -> a
Coerce.coerce Widget
gi'self)  EventKey
event'
    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 [keyReleaseEvent](#signal:keyReleaseEvent) 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 #keyReleaseEvent callback
-- @
-- 
-- 
onWidgetKeyReleaseEvent :: (IsWidget a, MonadIO m) => a -> ((?self :: a) => WidgetKeyReleaseEventCallback) -> m SignalHandlerId
onWidgetKeyReleaseEvent :: forall a (m :: * -> *).
(IsWidget a, MonadIO m) =>
a
-> ((?self::a) => WidgetKeyPressEventCallback) -> m SignalHandlerId
onWidgetKeyReleaseEvent a
obj (?self::a) => WidgetKeyPressEventCallback
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 wrapped :: a -> WidgetKeyPressEventCallback
wrapped a
self = let ?self = a
?self::a
self in (?self::a) => WidgetKeyPressEventCallback
WidgetKeyPressEventCallback
cb
    let wrapped' :: C_WidgetKeyPressEventCallback
wrapped' = (a -> WidgetKeyPressEventCallback) -> C_WidgetKeyPressEventCallback
forall a.
GObject a =>
(a -> WidgetKeyPressEventCallback) -> C_WidgetKeyPressEventCallback
wrap_WidgetKeyReleaseEventCallback a -> WidgetKeyPressEventCallback
wrapped
    FunPtr C_WidgetKeyPressEventCallback
wrapped'' <- C_WidgetKeyPressEventCallback
-> IO (FunPtr C_WidgetKeyPressEventCallback)
mk_WidgetKeyReleaseEventCallback C_WidgetKeyPressEventCallback
wrapped'
    a
-> Text
-> FunPtr C_WidgetKeyPressEventCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj Text
"key-release-event" FunPtr C_WidgetKeyPressEventCallback
wrapped'' SignalConnectMode
SignalConnectBefore Maybe Text
forall a. Maybe a
Nothing

-- | Connect a signal handler for the [keyReleaseEvent](#signal:keyReleaseEvent) 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 #keyReleaseEvent callback
-- @
-- 
-- 
-- 
-- By default the object invoking the signal is not passed to the callback.
-- If you need to access it, you can use the implit @?self@ parameter.
-- Note that this requires activating the @ImplicitParams@ GHC extension.
-- 
afterWidgetKeyReleaseEvent :: (IsWidget a, MonadIO m) => a -> ((?self :: a) => WidgetKeyReleaseEventCallback) -> m SignalHandlerId
afterWidgetKeyReleaseEvent :: forall a (m :: * -> *).
(IsWidget a, MonadIO m) =>
a
-> ((?self::a) => WidgetKeyPressEventCallback) -> m SignalHandlerId
afterWidgetKeyReleaseEvent a
obj (?self::a) => WidgetKeyPressEventCallback
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 wrapped :: a -> WidgetKeyPressEventCallback
wrapped a
self = let ?self = a
?self::a
self in (?self::a) => WidgetKeyPressEventCallback
WidgetKeyPressEventCallback
cb
    let wrapped' :: C_WidgetKeyPressEventCallback
wrapped' = (a -> WidgetKeyPressEventCallback) -> C_WidgetKeyPressEventCallback
forall a.
GObject a =>
(a -> WidgetKeyPressEventCallback) -> C_WidgetKeyPressEventCallback
wrap_WidgetKeyReleaseEventCallback a -> WidgetKeyPressEventCallback
wrapped
    FunPtr C_WidgetKeyPressEventCallback
wrapped'' <- C_WidgetKeyPressEventCallback
-> IO (FunPtr C_WidgetKeyPressEventCallback)
mk_WidgetKeyReleaseEventCallback C_WidgetKeyPressEventCallback
wrapped'
    a
-> Text
-> FunPtr C_WidgetKeyPressEventCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj Text
"key-release-event" FunPtr C_WidgetKeyPressEventCallback
wrapped'' SignalConnectMode
SignalConnectAfter Maybe Text
forall a. Maybe a
Nothing


#if defined(ENABLE_OVERLOADING)
data WidgetKeyReleaseEventSignalInfo
instance SignalInfo WidgetKeyReleaseEventSignalInfo where
    type HaskellCallbackType WidgetKeyReleaseEventSignalInfo = WidgetKeyReleaseEventCallback
    connectSignal obj cb connectMode detail = do
        let cb' = wrap_WidgetKeyReleaseEventCallback cb
        cb'' <- mk_WidgetKeyReleaseEventCallback cb'
        connectSignalFunPtr obj "key-release-event" cb'' connectMode detail
    dbgSignalInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Gtk.Objects.Widget::key-release-event"
        , O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-3.0.38/docs/GI-Gtk-Objects-Widget.html#g:signal:keyReleaseEvent"})

#endif

-- signal Widget::keynav-failed
-- | Gets emitted if keyboard navigation fails.
-- See 'GI.Gtk.Objects.Widget.widgetKeynavFailed' for details.
-- 
-- /Since: 2.12/
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 container(s).

type C_WidgetKeynavFailedCallback =
    Ptr Widget ->                           -- 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_WidgetKeynavFailedCallback :: 
    GObject a => (a -> WidgetKeynavFailedCallback) ->
    C_WidgetKeynavFailedCallback
wrap_WidgetKeynavFailedCallback :: forall a.
GObject a =>
(a -> WidgetFocusCallback) -> C_WidgetFocusCallback
wrap_WidgetKeynavFailedCallback a -> WidgetFocusCallback
gi'cb Ptr Widget
gi'selfPtr CUInt
direction Ptr ()
_ = 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 <- Ptr Widget -> (Widget -> IO Bool) -> IO Bool
forall a b.
(HasCallStack, ManagedPtrNewtype a) =>
Ptr a -> (a -> IO b) -> IO b
B.ManagedPtr.withTransient Ptr Widget
gi'selfPtr ((Widget -> IO Bool) -> IO Bool) -> (Widget -> IO Bool) -> IO Bool
forall a b. (a -> b) -> a -> b
$ \Widget
gi'self -> a -> WidgetFocusCallback
gi'cb (Widget -> a
Coerce.coerce Widget
gi'self)  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 -> ((?self :: a) => WidgetKeynavFailedCallback) -> m SignalHandlerId
onWidgetKeynavFailed :: forall a (m :: * -> *).
(IsWidget a, MonadIO m) =>
a -> ((?self::a) => WidgetFocusCallback) -> m SignalHandlerId
onWidgetKeynavFailed a
obj (?self::a) => WidgetFocusCallback
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 wrapped :: a -> WidgetFocusCallback
wrapped a
self = let ?self = a
?self::a
self in (?self::a) => WidgetFocusCallback
WidgetFocusCallback
cb
    let wrapped' :: C_WidgetFocusCallback
wrapped' = (a -> WidgetFocusCallback) -> C_WidgetFocusCallback
forall a.
GObject a =>
(a -> WidgetFocusCallback) -> C_WidgetFocusCallback
wrap_WidgetKeynavFailedCallback a -> WidgetFocusCallback
wrapped
    FunPtr C_WidgetFocusCallback
wrapped'' <- C_WidgetFocusCallback -> IO (FunPtr C_WidgetFocusCallback)
mk_WidgetKeynavFailedCallback C_WidgetFocusCallback
wrapped'
    a
-> Text
-> FunPtr C_WidgetFocusCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj Text
"keynav-failed" FunPtr C_WidgetFocusCallback
wrapped'' 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
-- @
-- 
-- 
-- 
-- By default the object invoking the signal is not passed to the callback.
-- If you need to access it, you can use the implit @?self@ parameter.
-- Note that this requires activating the @ImplicitParams@ GHC extension.
-- 
afterWidgetKeynavFailed :: (IsWidget a, MonadIO m) => a -> ((?self :: a) => WidgetKeynavFailedCallback) -> m SignalHandlerId
afterWidgetKeynavFailed :: forall a (m :: * -> *).
(IsWidget a, MonadIO m) =>
a -> ((?self::a) => WidgetFocusCallback) -> m SignalHandlerId
afterWidgetKeynavFailed a
obj (?self::a) => WidgetFocusCallback
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 wrapped :: a -> WidgetFocusCallback
wrapped a
self = let ?self = a
?self::a
self in (?self::a) => WidgetFocusCallback
WidgetFocusCallback
cb
    let wrapped' :: C_WidgetFocusCallback
wrapped' = (a -> WidgetFocusCallback) -> C_WidgetFocusCallback
forall a.
GObject a =>
(a -> WidgetFocusCallback) -> C_WidgetFocusCallback
wrap_WidgetKeynavFailedCallback a -> WidgetFocusCallback
wrapped
    FunPtr C_WidgetFocusCallback
wrapped'' <- C_WidgetFocusCallback -> IO (FunPtr C_WidgetFocusCallback)
mk_WidgetKeynavFailedCallback C_WidgetFocusCallback
wrapped'
    a
-> Text
-> FunPtr C_WidgetFocusCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj Text
"keynav-failed" FunPtr C_WidgetFocusCallback
wrapped'' 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
    dbgSignalInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Gtk.Objects.Widget::keynav-failed"
        , O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-3.0.38/docs/GI-Gtk-Objects-Widget.html#g:signal:keynavFailed"})

#endif

-- signal Widget::leave-notify-event
-- | The [leaveNotifyEvent](#g:signal:leaveNotifyEvent) will be emitted when the pointer leaves
-- the /@widget@/\'s window.
-- 
-- To receive this signal, the t'GI.Gdk.Objects.Window.Window' associated to the widget needs
-- to enable the @/GDK_LEAVE_NOTIFY_MASK/@ mask.
-- 
-- This signal will be sent to the grab widget if there is one.
type WidgetLeaveNotifyEventCallback =
    Gdk.EventCrossing.EventCrossing
    -- ^ /@event@/: the t'GI.Gdk.Structs.EventCrossing.EventCrossing' which triggered
    --   this signal.
    -> IO Bool
    -- ^ __Returns:__ 'P.True' to stop other handlers from being invoked for the event.
    --   'P.False' to propagate the event further.

type C_WidgetLeaveNotifyEventCallback =
    Ptr Widget ->                           -- object
    Ptr Gdk.EventCrossing.EventCrossing ->
    Ptr () ->                               -- user_data
    IO CInt

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

wrap_WidgetLeaveNotifyEventCallback :: 
    GObject a => (a -> WidgetLeaveNotifyEventCallback) ->
    C_WidgetLeaveNotifyEventCallback
wrap_WidgetLeaveNotifyEventCallback :: forall a.
GObject a =>
(a -> WidgetEnterNotifyEventCallback)
-> C_WidgetEnterNotifyEventCallback
wrap_WidgetLeaveNotifyEventCallback a -> WidgetEnterNotifyEventCallback
gi'cb Ptr Widget
gi'selfPtr Ptr EventCrossing
event Ptr ()
_ = do
    EventCrossing
event' <- ((ManagedPtr EventCrossing -> EventCrossing)
-> Ptr EventCrossing -> IO EventCrossing
forall a.
(HasCallStack, BoxedPtr a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
newPtr ManagedPtr EventCrossing -> EventCrossing
Gdk.EventCrossing.EventCrossing) Ptr EventCrossing
event
    Bool
result <- Ptr Widget -> (Widget -> IO Bool) -> IO Bool
forall a b.
(HasCallStack, ManagedPtrNewtype a) =>
Ptr a -> (a -> IO b) -> IO b
B.ManagedPtr.withTransient Ptr Widget
gi'selfPtr ((Widget -> IO Bool) -> IO Bool) -> (Widget -> IO Bool) -> IO Bool
forall a b. (a -> b) -> a -> b
$ \Widget
gi'self -> a -> WidgetEnterNotifyEventCallback
gi'cb (Widget -> a
Coerce.coerce Widget
gi'self)  EventCrossing
event'
    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 [leaveNotifyEvent](#signal:leaveNotifyEvent) 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 #leaveNotifyEvent callback
-- @
-- 
-- 
onWidgetLeaveNotifyEvent :: (IsWidget a, MonadIO m) => a -> ((?self :: a) => WidgetLeaveNotifyEventCallback) -> m SignalHandlerId
onWidgetLeaveNotifyEvent :: forall a (m :: * -> *).
(IsWidget a, MonadIO m) =>
a
-> ((?self::a) => WidgetEnterNotifyEventCallback)
-> m SignalHandlerId
onWidgetLeaveNotifyEvent a
obj (?self::a) => WidgetEnterNotifyEventCallback
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 wrapped :: a -> WidgetEnterNotifyEventCallback
wrapped a
self = let ?self = a
?self::a
self in (?self::a) => WidgetEnterNotifyEventCallback
WidgetEnterNotifyEventCallback
cb
    let wrapped' :: C_WidgetEnterNotifyEventCallback
wrapped' = (a -> WidgetEnterNotifyEventCallback)
-> C_WidgetEnterNotifyEventCallback
forall a.
GObject a =>
(a -> WidgetEnterNotifyEventCallback)
-> C_WidgetEnterNotifyEventCallback
wrap_WidgetLeaveNotifyEventCallback a -> WidgetEnterNotifyEventCallback
wrapped
    FunPtr C_WidgetEnterNotifyEventCallback
wrapped'' <- C_WidgetEnterNotifyEventCallback
-> IO (FunPtr C_WidgetEnterNotifyEventCallback)
mk_WidgetLeaveNotifyEventCallback C_WidgetEnterNotifyEventCallback
wrapped'
    a
-> Text
-> FunPtr C_WidgetEnterNotifyEventCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj Text
"leave-notify-event" FunPtr C_WidgetEnterNotifyEventCallback
wrapped'' SignalConnectMode
SignalConnectBefore Maybe Text
forall a. Maybe a
Nothing

-- | Connect a signal handler for the [leaveNotifyEvent](#signal:leaveNotifyEvent) 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 #leaveNotifyEvent callback
-- @
-- 
-- 
-- 
-- By default the object invoking the signal is not passed to the callback.
-- If you need to access it, you can use the implit @?self@ parameter.
-- Note that this requires activating the @ImplicitParams@ GHC extension.
-- 
afterWidgetLeaveNotifyEvent :: (IsWidget a, MonadIO m) => a -> ((?self :: a) => WidgetLeaveNotifyEventCallback) -> m SignalHandlerId
afterWidgetLeaveNotifyEvent :: forall a (m :: * -> *).
(IsWidget a, MonadIO m) =>
a
-> ((?self::a) => WidgetEnterNotifyEventCallback)
-> m SignalHandlerId
afterWidgetLeaveNotifyEvent a
obj (?self::a) => WidgetEnterNotifyEventCallback
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 wrapped :: a -> WidgetEnterNotifyEventCallback
wrapped a
self = let ?self = a
?self::a
self in (?self::a) => WidgetEnterNotifyEventCallback
WidgetEnterNotifyEventCallback
cb
    let wrapped' :: C_WidgetEnterNotifyEventCallback
wrapped' = (a -> WidgetEnterNotifyEventCallback)
-> C_WidgetEnterNotifyEventCallback
forall a.
GObject a =>
(a -> WidgetEnterNotifyEventCallback)
-> C_WidgetEnterNotifyEventCallback
wrap_WidgetLeaveNotifyEventCallback a -> WidgetEnterNotifyEventCallback
wrapped
    FunPtr C_WidgetEnterNotifyEventCallback
wrapped'' <- C_WidgetEnterNotifyEventCallback
-> IO (FunPtr C_WidgetEnterNotifyEventCallback)
mk_WidgetLeaveNotifyEventCallback C_WidgetEnterNotifyEventCallback
wrapped'
    a
-> Text
-> FunPtr C_WidgetEnterNotifyEventCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj Text
"leave-notify-event" FunPtr C_WidgetEnterNotifyEventCallback
wrapped'' SignalConnectMode
SignalConnectAfter Maybe Text
forall a. Maybe a
Nothing


#if defined(ENABLE_OVERLOADING)
data WidgetLeaveNotifyEventSignalInfo
instance SignalInfo WidgetLeaveNotifyEventSignalInfo where
    type HaskellCallbackType WidgetLeaveNotifyEventSignalInfo = WidgetLeaveNotifyEventCallback
    connectSignal obj cb connectMode detail = do
        let cb' = wrap_WidgetLeaveNotifyEventCallback cb
        cb'' <- mk_WidgetLeaveNotifyEventCallback cb'
        connectSignalFunPtr obj "leave-notify-event" cb'' connectMode detail
    dbgSignalInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Gtk.Objects.Widget::leave-notify-event"
        , O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-3.0.38/docs/GI-Gtk-Objects-Widget.html#g:signal:leaveNotifyEvent"})

#endif

-- signal Widget::map
-- | The [map](#g: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. Once the map has occurred, [mapEvent]("GI.Gtk.Objects.Widget#g:signal:mapEvent") will
-- be emitted.
-- 
-- The [map](#g: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#g:signal:unmap").
type WidgetMapCallback =
    IO ()

type C_WidgetMapCallback =
    Ptr Widget ->                           -- 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_WidgetMapCallback :: 
    GObject a => (a -> WidgetMapCallback) ->
    C_WidgetMapCallback
wrap_WidgetMapCallback :: forall a.
GObject a =>
(a -> IO ()) -> C_WidgetAccelClosuresChangedCallback
wrap_WidgetMapCallback a -> IO ()
gi'cb Ptr Widget
gi'selfPtr Ptr ()
_ = do
    Ptr Widget -> (Widget -> IO ()) -> IO ()
forall a b.
(HasCallStack, ManagedPtrNewtype a) =>
Ptr a -> (a -> IO b) -> IO b
B.ManagedPtr.withTransient Ptr Widget
gi'selfPtr ((Widget -> IO ()) -> IO ()) -> (Widget -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Widget
gi'self -> a -> IO ()
gi'cb (Widget -> a
Coerce.coerce Widget
gi'self) 


-- | 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 -> ((?self :: a) => WidgetMapCallback) -> m SignalHandlerId
onWidgetMap :: forall a (m :: * -> *).
(IsWidget a, MonadIO m) =>
a -> ((?self::a) => IO ()) -> m SignalHandlerId
onWidgetMap a
obj (?self::a) => 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 wrapped :: a -> IO ()
wrapped a
self = let ?self = a
?self::a
self in IO ()
(?self::a) => IO ()
cb
    let wrapped' :: C_WidgetAccelClosuresChangedCallback
wrapped' = (a -> IO ()) -> C_WidgetAccelClosuresChangedCallback
forall a.
GObject a =>
(a -> IO ()) -> C_WidgetAccelClosuresChangedCallback
wrap_WidgetMapCallback a -> IO ()
wrapped
    FunPtr C_WidgetAccelClosuresChangedCallback
wrapped'' <- C_WidgetAccelClosuresChangedCallback
-> IO (FunPtr C_WidgetAccelClosuresChangedCallback)
mk_WidgetMapCallback C_WidgetAccelClosuresChangedCallback
wrapped'
    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 Text
"map" FunPtr C_WidgetAccelClosuresChangedCallback
wrapped'' 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
-- @
-- 
-- 
-- 
-- By default the object invoking the signal is not passed to the callback.
-- If you need to access it, you can use the implit @?self@ parameter.
-- Note that this requires activating the @ImplicitParams@ GHC extension.
-- 
afterWidgetMap :: (IsWidget a, MonadIO m) => a -> ((?self :: a) => WidgetMapCallback) -> m SignalHandlerId
afterWidgetMap :: forall a (m :: * -> *).
(IsWidget a, MonadIO m) =>
a -> ((?self::a) => IO ()) -> m SignalHandlerId
afterWidgetMap a
obj (?self::a) => 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 wrapped :: a -> IO ()
wrapped a
self = let ?self = a
?self::a
self in IO ()
(?self::a) => IO ()
cb
    let wrapped' :: C_WidgetAccelClosuresChangedCallback
wrapped' = (a -> IO ()) -> C_WidgetAccelClosuresChangedCallback
forall a.
GObject a =>
(a -> IO ()) -> C_WidgetAccelClosuresChangedCallback
wrap_WidgetMapCallback a -> IO ()
wrapped
    FunPtr C_WidgetAccelClosuresChangedCallback
wrapped'' <- C_WidgetAccelClosuresChangedCallback
-> IO (FunPtr C_WidgetAccelClosuresChangedCallback)
mk_WidgetMapCallback C_WidgetAccelClosuresChangedCallback
wrapped'
    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 Text
"map" FunPtr C_WidgetAccelClosuresChangedCallback
wrapped'' 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
    dbgSignalInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Gtk.Objects.Widget::map"
        , O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-3.0.38/docs/GI-Gtk-Objects-Widget.html#g:signal:map"})

#endif

-- signal Widget::map-event
-- | The [mapEvent](#g:signal:mapEvent) signal will be emitted when the /@widget@/\'s window is
-- mapped. A window is mapped when it becomes visible on the screen.
-- 
-- To receive this signal, the t'GI.Gdk.Objects.Window.Window' associated to the widget needs
-- to enable the @/GDK_STRUCTURE_MASK/@ mask. GDK will enable this mask
-- automatically for all new windows.
type WidgetMapEventCallback =
    Gdk.EventAny.EventAny
    -- ^ /@event@/: the t'GI.Gdk.Structs.EventAny.EventAny' which triggered this signal.
    -> IO Bool
    -- ^ __Returns:__ 'P.True' to stop other handlers from being invoked for the event.
    --   'P.False' to propagate the event further.

type C_WidgetMapEventCallback =
    Ptr Widget ->                           -- object
    Ptr Gdk.EventAny.EventAny ->
    Ptr () ->                               -- user_data
    IO CInt

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

wrap_WidgetMapEventCallback :: 
    GObject a => (a -> WidgetMapEventCallback) ->
    C_WidgetMapEventCallback
wrap_WidgetMapEventCallback :: forall a.
GObject a =>
(a -> WidgetMapEventCallback) -> C_WidgetMapEventCallback
wrap_WidgetMapEventCallback a -> WidgetMapEventCallback
gi'cb Ptr Widget
gi'selfPtr Ptr EventAny
event Ptr ()
_ = do
    EventAny
event' <- ((ManagedPtr EventAny -> EventAny) -> Ptr EventAny -> IO EventAny
forall a.
(HasCallStack, BoxedPtr a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
newPtr ManagedPtr EventAny -> EventAny
Gdk.EventAny.EventAny) Ptr EventAny
event
    Bool
result <- Ptr Widget -> (Widget -> IO Bool) -> IO Bool
forall a b.
(HasCallStack, ManagedPtrNewtype a) =>
Ptr a -> (a -> IO b) -> IO b
B.ManagedPtr.withTransient Ptr Widget
gi'selfPtr ((Widget -> IO Bool) -> IO Bool) -> (Widget -> IO Bool) -> IO Bool
forall a b. (a -> b) -> a -> b
$ \Widget
gi'self -> a -> WidgetMapEventCallback
gi'cb (Widget -> a
Coerce.coerce Widget
gi'self)  EventAny
event'
    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 [mapEvent](#signal:mapEvent) 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 #mapEvent callback
-- @
-- 
-- 
onWidgetMapEvent :: (IsWidget a, MonadIO m) => a -> ((?self :: a) => WidgetMapEventCallback) -> m SignalHandlerId
onWidgetMapEvent :: forall a (m :: * -> *).
(IsWidget a, MonadIO m) =>
a -> ((?self::a) => WidgetMapEventCallback) -> m SignalHandlerId
onWidgetMapEvent a
obj (?self::a) => WidgetMapEventCallback
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 wrapped :: a -> WidgetMapEventCallback
wrapped a
self = let ?self = a
?self::a
self in (?self::a) => WidgetMapEventCallback
WidgetMapEventCallback
cb
    let wrapped' :: C_WidgetMapEventCallback
wrapped' = (a -> WidgetMapEventCallback) -> C_WidgetMapEventCallback
forall a.
GObject a =>
(a -> WidgetMapEventCallback) -> C_WidgetMapEventCallback
wrap_WidgetMapEventCallback a -> WidgetMapEventCallback
wrapped
    FunPtr C_WidgetMapEventCallback
wrapped'' <- C_WidgetMapEventCallback -> IO (FunPtr C_WidgetMapEventCallback)
mk_WidgetMapEventCallback C_WidgetMapEventCallback
wrapped'
    a
-> Text
-> FunPtr C_WidgetMapEventCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj Text
"map-event" FunPtr C_WidgetMapEventCallback
wrapped'' SignalConnectMode
SignalConnectBefore Maybe Text
forall a. Maybe a
Nothing

-- | Connect a signal handler for the [mapEvent](#signal:mapEvent) 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 #mapEvent callback
-- @
-- 
-- 
-- 
-- By default the object invoking the signal is not passed to the callback.
-- If you need to access it, you can use the implit @?self@ parameter.
-- Note that this requires activating the @ImplicitParams@ GHC extension.
-- 
afterWidgetMapEvent :: (IsWidget a, MonadIO m) => a -> ((?self :: a) => WidgetMapEventCallback) -> m SignalHandlerId
afterWidgetMapEvent :: forall a (m :: * -> *).
(IsWidget a, MonadIO m) =>
a -> ((?self::a) => WidgetMapEventCallback) -> m SignalHandlerId
afterWidgetMapEvent a
obj (?self::a) => WidgetMapEventCallback
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 wrapped :: a -> WidgetMapEventCallback
wrapped a
self = let ?self = a
?self::a
self in (?self::a) => WidgetMapEventCallback
WidgetMapEventCallback
cb
    let wrapped' :: C_WidgetMapEventCallback
wrapped' = (a -> WidgetMapEventCallback) -> C_WidgetMapEventCallback
forall a.
GObject a =>
(a -> WidgetMapEventCallback) -> C_WidgetMapEventCallback
wrap_WidgetMapEventCallback a -> WidgetMapEventCallback
wrapped
    FunPtr C_WidgetMapEventCallback
wrapped'' <- C_WidgetMapEventCallback -> IO (FunPtr C_WidgetMapEventCallback)
mk_WidgetMapEventCallback C_WidgetMapEventCallback
wrapped'
    a
-> Text
-> FunPtr C_WidgetMapEventCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj Text
"map-event" FunPtr C_WidgetMapEventCallback
wrapped'' SignalConnectMode
SignalConnectAfter Maybe Text
forall a. Maybe a
Nothing


#if defined(ENABLE_OVERLOADING)
data WidgetMapEventSignalInfo
instance SignalInfo WidgetMapEventSignalInfo where
    type HaskellCallbackType WidgetMapEventSignalInfo = WidgetMapEventCallback
    connectSignal obj cb connectMode detail = do
        let cb' = wrap_WidgetMapEventCallback cb
        cb'' <- mk_WidgetMapEventCallback cb'
        connectSignalFunPtr obj "map-event" cb'' connectMode detail
    dbgSignalInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Gtk.Objects.Widget::map-event"
        , O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-3.0.38/docs/GI-Gtk-Objects-Widget.html#g:signal:mapEvent"})

#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.

type C_WidgetMnemonicActivateCallback =
    Ptr Widget ->                           -- 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_WidgetMnemonicActivateCallback :: 
    GObject a => (a -> WidgetMnemonicActivateCallback) ->
    C_WidgetMnemonicActivateCallback
wrap_WidgetMnemonicActivateCallback :: forall a.
GObject a =>
(a -> WidgetMnemonicActivateCallback)
-> C_WidgetMnemonicActivateCallback
wrap_WidgetMnemonicActivateCallback a -> WidgetMnemonicActivateCallback
gi'cb Ptr Widget
gi'selfPtr CInt
groupCycling Ptr ()
_ = do
    let groupCycling' :: Bool
groupCycling' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= CInt
0) CInt
groupCycling
    Bool
result <- Ptr Widget -> (Widget -> IO Bool) -> IO Bool
forall a b.
(HasCallStack, ManagedPtrNewtype a) =>
Ptr a -> (a -> IO b) -> IO b
B.ManagedPtr.withTransient Ptr Widget
gi'selfPtr ((Widget -> IO Bool) -> IO Bool) -> (Widget -> IO Bool) -> IO Bool
forall a b. (a -> b) -> a -> b
$ \Widget
gi'self -> a -> WidgetMnemonicActivateCallback
gi'cb (Widget -> a
Coerce.coerce Widget
gi'self)  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 -> ((?self :: a) => WidgetMnemonicActivateCallback) -> m SignalHandlerId
onWidgetMnemonicActivate :: forall a (m :: * -> *).
(IsWidget a, MonadIO m) =>
a
-> ((?self::a) => WidgetMnemonicActivateCallback)
-> m SignalHandlerId
onWidgetMnemonicActivate a
obj (?self::a) => 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 wrapped :: a -> WidgetMnemonicActivateCallback
wrapped a
self = let ?self = a
?self::a
self in (?self::a) => WidgetMnemonicActivateCallback
WidgetMnemonicActivateCallback
cb
    let wrapped' :: C_WidgetMnemonicActivateCallback
wrapped' = (a -> WidgetMnemonicActivateCallback)
-> C_WidgetMnemonicActivateCallback
forall a.
GObject a =>
(a -> WidgetMnemonicActivateCallback)
-> C_WidgetMnemonicActivateCallback
wrap_WidgetMnemonicActivateCallback a -> WidgetMnemonicActivateCallback
wrapped
    FunPtr C_WidgetMnemonicActivateCallback
wrapped'' <- C_WidgetMnemonicActivateCallback
-> IO (FunPtr C_WidgetMnemonicActivateCallback)
mk_WidgetMnemonicActivateCallback C_WidgetMnemonicActivateCallback
wrapped'
    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 Text
"mnemonic-activate" FunPtr C_WidgetMnemonicActivateCallback
wrapped'' 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
-- @
-- 
-- 
-- 
-- By default the object invoking the signal is not passed to the callback.
-- If you need to access it, you can use the implit @?self@ parameter.
-- Note that this requires activating the @ImplicitParams@ GHC extension.
-- 
afterWidgetMnemonicActivate :: (IsWidget a, MonadIO m) => a -> ((?self :: a) => WidgetMnemonicActivateCallback) -> m SignalHandlerId
afterWidgetMnemonicActivate :: forall a (m :: * -> *).
(IsWidget a, MonadIO m) =>
a
-> ((?self::a) => WidgetMnemonicActivateCallback)
-> m SignalHandlerId
afterWidgetMnemonicActivate a
obj (?self::a) => 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 wrapped :: a -> WidgetMnemonicActivateCallback
wrapped a
self = let ?self = a
?self::a
self in (?self::a) => WidgetMnemonicActivateCallback
WidgetMnemonicActivateCallback
cb
    let wrapped' :: C_WidgetMnemonicActivateCallback
wrapped' = (a -> WidgetMnemonicActivateCallback)
-> C_WidgetMnemonicActivateCallback
forall a.
GObject a =>
(a -> WidgetMnemonicActivateCallback)
-> C_WidgetMnemonicActivateCallback
wrap_WidgetMnemonicActivateCallback a -> WidgetMnemonicActivateCallback
wrapped
    FunPtr C_WidgetMnemonicActivateCallback
wrapped'' <- C_WidgetMnemonicActivateCallback
-> IO (FunPtr C_WidgetMnemonicActivateCallback)
mk_WidgetMnemonicActivateCallback C_WidgetMnemonicActivateCallback
wrapped'
    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 Text
"mnemonic-activate" FunPtr C_WidgetMnemonicActivateCallback
wrapped'' 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
    dbgSignalInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Gtk.Objects.Widget::mnemonic-activate"
        , O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-3.0.38/docs/GI-Gtk-Objects-Widget.html#g:signal:mnemonicActivate"})

#endif

-- signal Widget::motion-notify-event
-- | The [motionNotifyEvent](#g:signal:motionNotifyEvent) signal is emitted when the pointer moves
-- over the widget\'s t'GI.Gdk.Objects.Window.Window'.
-- 
-- To receive this signal, the t'GI.Gdk.Objects.Window.Window' associated to the widget
-- needs to enable the @/GDK_POINTER_MOTION_MASK/@ mask.
-- 
-- This signal will be sent to the grab widget if there is one.
type WidgetMotionNotifyEventCallback =
    Gdk.EventMotion.EventMotion
    -- ^ /@event@/: the t'GI.Gdk.Structs.EventMotion.EventMotion' which triggered
    --   this signal.
    -> IO Bool
    -- ^ __Returns:__ 'P.True' to stop other handlers from being invoked for the event.
    --   'P.False' to propagate the event further.

type C_WidgetMotionNotifyEventCallback =
    Ptr Widget ->                           -- object
    Ptr Gdk.EventMotion.EventMotion ->
    Ptr () ->                               -- user_data
    IO CInt

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

wrap_WidgetMotionNotifyEventCallback :: 
    GObject a => (a -> WidgetMotionNotifyEventCallback) ->
    C_WidgetMotionNotifyEventCallback
wrap_WidgetMotionNotifyEventCallback :: forall a.
GObject a =>
(a -> WidgetMotionNotifyEventCallback)
-> C_WidgetMotionNotifyEventCallback
wrap_WidgetMotionNotifyEventCallback a -> WidgetMotionNotifyEventCallback
gi'cb Ptr Widget
gi'selfPtr Ptr EventMotion
event Ptr ()
_ = do
    EventMotion
event' <- ((ManagedPtr EventMotion -> EventMotion)
-> Ptr EventMotion -> IO EventMotion
forall a.
(HasCallStack, BoxedPtr a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
newPtr ManagedPtr EventMotion -> EventMotion
Gdk.EventMotion.EventMotion) Ptr EventMotion
event
    Bool
result <- Ptr Widget -> (Widget -> IO Bool) -> IO Bool
forall a b.
(HasCallStack, ManagedPtrNewtype a) =>
Ptr a -> (a -> IO b) -> IO b
B.ManagedPtr.withTransient Ptr Widget
gi'selfPtr ((Widget -> IO Bool) -> IO Bool) -> (Widget -> IO Bool) -> IO Bool
forall a b. (a -> b) -> a -> b
$ \Widget
gi'self -> a -> WidgetMotionNotifyEventCallback
gi'cb (Widget -> a
Coerce.coerce Widget
gi'self)  EventMotion
event'
    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 [motionNotifyEvent](#signal:motionNotifyEvent) 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 #motionNotifyEvent callback
-- @
-- 
-- 
onWidgetMotionNotifyEvent :: (IsWidget a, MonadIO m) => a -> ((?self :: a) => WidgetMotionNotifyEventCallback) -> m SignalHandlerId
onWidgetMotionNotifyEvent :: forall a (m :: * -> *).
(IsWidget a, MonadIO m) =>
a
-> ((?self::a) => WidgetMotionNotifyEventCallback)
-> m SignalHandlerId
onWidgetMotionNotifyEvent a
obj (?self::a) => WidgetMotionNotifyEventCallback
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 wrapped :: a -> WidgetMotionNotifyEventCallback
wrapped a
self = let ?self = a
?self::a
self in (?self::a) => WidgetMotionNotifyEventCallback
WidgetMotionNotifyEventCallback
cb
    let wrapped' :: C_WidgetMotionNotifyEventCallback
wrapped' = (a -> WidgetMotionNotifyEventCallback)
-> C_WidgetMotionNotifyEventCallback
forall a.
GObject a =>
(a -> WidgetMotionNotifyEventCallback)
-> C_WidgetMotionNotifyEventCallback
wrap_WidgetMotionNotifyEventCallback a -> WidgetMotionNotifyEventCallback
wrapped
    FunPtr C_WidgetMotionNotifyEventCallback
wrapped'' <- C_WidgetMotionNotifyEventCallback
-> IO (FunPtr C_WidgetMotionNotifyEventCallback)
mk_WidgetMotionNotifyEventCallback C_WidgetMotionNotifyEventCallback
wrapped'
    a
-> Text
-> FunPtr C_WidgetMotionNotifyEventCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj Text
"motion-notify-event" FunPtr C_WidgetMotionNotifyEventCallback
wrapped'' SignalConnectMode
SignalConnectBefore Maybe Text
forall a. Maybe a
Nothing

-- | Connect a signal handler for the [motionNotifyEvent](#signal:motionNotifyEvent) 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 #motionNotifyEvent callback
-- @
-- 
-- 
-- 
-- By default the object invoking the signal is not passed to the callback.
-- If you need to access it, you can use the implit @?self@ parameter.
-- Note that this requires activating the @ImplicitParams@ GHC extension.
-- 
afterWidgetMotionNotifyEvent :: (IsWidget a, MonadIO m) => a -> ((?self :: a) => WidgetMotionNotifyEventCallback) -> m SignalHandlerId
afterWidgetMotionNotifyEvent :: forall a (m :: * -> *).
(IsWidget a, MonadIO m) =>
a
-> ((?self::a) => WidgetMotionNotifyEventCallback)
-> m SignalHandlerId
afterWidgetMotionNotifyEvent a
obj (?self::a) => WidgetMotionNotifyEventCallback
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 wrapped :: a -> WidgetMotionNotifyEventCallback
wrapped a
self = let ?self = a
?self::a
self in (?self::a) => WidgetMotionNotifyEventCallback
WidgetMotionNotifyEventCallback
cb
    let wrapped' :: C_WidgetMotionNotifyEventCallback
wrapped' = (a -> WidgetMotionNotifyEventCallback)
-> C_WidgetMotionNotifyEventCallback
forall a.
GObject a =>
(a -> WidgetMotionNotifyEventCallback)
-> C_WidgetMotionNotifyEventCallback
wrap_WidgetMotionNotifyEventCallback a -> WidgetMotionNotifyEventCallback
wrapped
    FunPtr C_WidgetMotionNotifyEventCallback
wrapped'' <- C_WidgetMotionNotifyEventCallback
-> IO (FunPtr C_WidgetMotionNotifyEventCallback)
mk_WidgetMotionNotifyEventCallback C_WidgetMotionNotifyEventCallback
wrapped'
    a
-> Text
-> FunPtr C_WidgetMotionNotifyEventCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj Text
"motion-notify-event" FunPtr C_WidgetMotionNotifyEventCallback
wrapped'' SignalConnectMode
SignalConnectAfter Maybe Text
forall a. Maybe a
Nothing


#if defined(ENABLE_OVERLOADING)
data WidgetMotionNotifyEventSignalInfo
instance SignalInfo WidgetMotionNotifyEventSignalInfo where
    type HaskellCallbackType WidgetMotionNotifyEventSignalInfo = WidgetMotionNotifyEventCallback
    connectSignal obj cb connectMode detail = do
        let cb' = wrap_WidgetMotionNotifyEventCallback cb
        cb'' <- mk_WidgetMotionNotifyEventCallback cb'
        connectSignalFunPtr obj "motion-notify-event" cb'' connectMode detail
    dbgSignalInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Gtk.Objects.Widget::motion-notify-event"
        , O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-3.0.38/docs/GI-Gtk-Objects-Widget.html#g:signal:motionNotifyEvent"})

#endif

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

type C_WidgetMoveFocusCallback =
    Ptr Widget ->                           -- 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_WidgetMoveFocusCallback :: 
    GObject a => (a -> WidgetMoveFocusCallback) ->
    C_WidgetMoveFocusCallback
wrap_WidgetMoveFocusCallback :: forall a.
GObject a =>
(a -> WidgetMoveFocusCallback) -> C_WidgetDirectionChangedCallback
wrap_WidgetMoveFocusCallback a -> WidgetMoveFocusCallback
gi'cb Ptr Widget
gi'selfPtr CUInt
direction Ptr ()
_ = 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
    Ptr Widget -> (Widget -> IO ()) -> IO ()
forall a b.
(HasCallStack, ManagedPtrNewtype a) =>
Ptr a -> (a -> IO b) -> IO b
B.ManagedPtr.withTransient Ptr Widget
gi'selfPtr ((Widget -> IO ()) -> IO ()) -> (Widget -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Widget
gi'self -> a -> WidgetMoveFocusCallback
gi'cb (Widget -> a
Coerce.coerce Widget
gi'self)  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 -> ((?self :: a) => WidgetMoveFocusCallback) -> m SignalHandlerId
onWidgetMoveFocus :: forall a (m :: * -> *).
(IsWidget a, MonadIO m) =>
a -> ((?self::a) => WidgetMoveFocusCallback) -> m SignalHandlerId
onWidgetMoveFocus a
obj (?self::a) => 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 wrapped :: a -> WidgetMoveFocusCallback
wrapped a
self = let ?self = a
?self::a
self in (?self::a) => WidgetMoveFocusCallback
WidgetMoveFocusCallback
cb
    let wrapped' :: C_WidgetDirectionChangedCallback
wrapped' = (a -> WidgetMoveFocusCallback) -> C_WidgetDirectionChangedCallback
forall a.
GObject a =>
(a -> WidgetMoveFocusCallback) -> C_WidgetDirectionChangedCallback
wrap_WidgetMoveFocusCallback a -> WidgetMoveFocusCallback
wrapped
    FunPtr C_WidgetDirectionChangedCallback
wrapped'' <- C_WidgetDirectionChangedCallback
-> IO (FunPtr C_WidgetDirectionChangedCallback)
mk_WidgetMoveFocusCallback C_WidgetDirectionChangedCallback
wrapped'
    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 Text
"move-focus" FunPtr C_WidgetDirectionChangedCallback
wrapped'' 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
-- @
-- 
-- 
-- 
-- By default the object invoking the signal is not passed to the callback.
-- If you need to access it, you can use the implit @?self@ parameter.
-- Note that this requires activating the @ImplicitParams@ GHC extension.
-- 
afterWidgetMoveFocus :: (IsWidget a, MonadIO m) => a -> ((?self :: a) => WidgetMoveFocusCallback) -> m SignalHandlerId
afterWidgetMoveFocus :: forall a (m :: * -> *).
(IsWidget a, MonadIO m) =>
a -> ((?self::a) => WidgetMoveFocusCallback) -> m SignalHandlerId
afterWidgetMoveFocus a
obj (?self::a) => 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 wrapped :: a -> WidgetMoveFocusCallback
wrapped a
self = let ?self = a
?self::a
self in (?self::a) => WidgetMoveFocusCallback
WidgetMoveFocusCallback
cb
    let wrapped' :: C_WidgetDirectionChangedCallback
wrapped' = (a -> WidgetMoveFocusCallback) -> C_WidgetDirectionChangedCallback
forall a.
GObject a =>
(a -> WidgetMoveFocusCallback) -> C_WidgetDirectionChangedCallback
wrap_WidgetMoveFocusCallback a -> WidgetMoveFocusCallback
wrapped
    FunPtr C_WidgetDirectionChangedCallback
wrapped'' <- C_WidgetDirectionChangedCallback
-> IO (FunPtr C_WidgetDirectionChangedCallback)
mk_WidgetMoveFocusCallback C_WidgetDirectionChangedCallback
wrapped'
    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 Text
"move-focus" FunPtr C_WidgetDirectionChangedCallback
wrapped'' 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
    dbgSignalInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Gtk.Objects.Widget::move-focus"
        , O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-3.0.38/docs/GI-Gtk-Objects-Widget.html#g:signal:moveFocus"})

#endif

-- signal Widget::parent-set
-- | The [parentSet](#g:signal:parentSet) signal is emitted when a new parent
-- has been set on a widget.
type WidgetParentSetCallback =
    Maybe Widget
    -- ^ /@oldParent@/: the previous parent, or 'P.Nothing' if the widget
    --   just got its initial parent.
    -> IO ()

type C_WidgetParentSetCallback =
    Ptr Widget ->                           -- object
    Ptr Widget ->
    Ptr () ->                               -- user_data
    IO ()

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

wrap_WidgetParentSetCallback :: 
    GObject a => (a -> WidgetParentSetCallback) ->
    C_WidgetParentSetCallback
wrap_WidgetParentSetCallback :: forall a.
GObject a =>
(a -> Maybe Widget -> IO ()) -> C_WidgetHierarchyChangedCallback
wrap_WidgetParentSetCallback a -> Maybe Widget -> IO ()
gi'cb Ptr Widget
gi'selfPtr Ptr Widget
oldParent Ptr ()
_ = do
    Maybe Widget
maybeOldParent <-
        if Ptr Widget
oldParent Ptr Widget -> Ptr Widget -> Bool
forall a. Eq a => a -> a -> Bool
== Ptr Widget
forall a. Ptr a
nullPtr
        then Maybe Widget -> IO (Maybe Widget)
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe Widget
forall a. Maybe a
Nothing
        else do
            Widget
oldParent' <- ((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
oldParent
            Maybe Widget -> IO (Maybe Widget)
forall (m :: * -> *) a. Monad m => a -> m a
return (Maybe Widget -> IO (Maybe Widget))
-> Maybe Widget -> IO (Maybe Widget)
forall a b. (a -> b) -> a -> b
$ Widget -> Maybe Widget
forall a. a -> Maybe a
Just Widget
oldParent'
    Ptr Widget -> (Widget -> IO ()) -> IO ()
forall a b.
(HasCallStack, ManagedPtrNewtype a) =>
Ptr a -> (a -> IO b) -> IO b
B.ManagedPtr.withTransient Ptr Widget
gi'selfPtr ((Widget -> IO ()) -> IO ()) -> (Widget -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Widget
gi'self -> a -> Maybe Widget -> IO ()
gi'cb (Widget -> a
Coerce.coerce Widget
gi'self)  Maybe Widget
maybeOldParent


-- | Connect a signal handler for the [parentSet](#signal:parentSet) 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 #parentSet callback
-- @
-- 
-- 
onWidgetParentSet :: (IsWidget a, MonadIO m) => a -> ((?self :: a) => WidgetParentSetCallback) -> m SignalHandlerId
onWidgetParentSet :: forall a (m :: * -> *).
(IsWidget a, MonadIO m) =>
a -> ((?self::a) => Maybe Widget -> IO ()) -> m SignalHandlerId
onWidgetParentSet a
obj (?self::a) => Maybe Widget -> 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 wrapped :: a -> Maybe Widget -> IO ()
wrapped a
self = let ?self = a
?self::a
self in (?self::a) => Maybe Widget -> IO ()
Maybe Widget -> IO ()
cb
    let wrapped' :: C_WidgetHierarchyChangedCallback
wrapped' = (a -> Maybe Widget -> IO ()) -> C_WidgetHierarchyChangedCallback
forall a.
GObject a =>
(a -> Maybe Widget -> IO ()) -> C_WidgetHierarchyChangedCallback
wrap_WidgetParentSetCallback a -> Maybe Widget -> IO ()
wrapped
    FunPtr C_WidgetHierarchyChangedCallback
wrapped'' <- C_WidgetHierarchyChangedCallback
-> IO (FunPtr C_WidgetHierarchyChangedCallback)
mk_WidgetParentSetCallback C_WidgetHierarchyChangedCallback
wrapped'
    a
-> Text
-> FunPtr C_WidgetHierarchyChangedCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj Text
"parent-set" FunPtr C_WidgetHierarchyChangedCallback
wrapped'' SignalConnectMode
SignalConnectBefore Maybe Text
forall a. Maybe a
Nothing

-- | Connect a signal handler for the [parentSet](#signal:parentSet) 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 #parentSet callback
-- @
-- 
-- 
-- 
-- By default the object invoking the signal is not passed to the callback.
-- If you need to access it, you can use the implit @?self@ parameter.
-- Note that this requires activating the @ImplicitParams@ GHC extension.
-- 
afterWidgetParentSet :: (IsWidget a, MonadIO m) => a -> ((?self :: a) => WidgetParentSetCallback) -> m SignalHandlerId
afterWidgetParentSet :: forall a (m :: * -> *).
(IsWidget a, MonadIO m) =>
a -> ((?self::a) => Maybe Widget -> IO ()) -> m SignalHandlerId
afterWidgetParentSet a
obj (?self::a) => Maybe Widget -> 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 wrapped :: a -> Maybe Widget -> IO ()
wrapped a
self = let ?self = a
?self::a
self in (?self::a) => Maybe Widget -> IO ()
Maybe Widget -> IO ()
cb
    let wrapped' :: C_WidgetHierarchyChangedCallback
wrapped' = (a -> Maybe Widget -> IO ()) -> C_WidgetHierarchyChangedCallback
forall a.
GObject a =>
(a -> Maybe Widget -> IO ()) -> C_WidgetHierarchyChangedCallback
wrap_WidgetParentSetCallback a -> Maybe Widget -> IO ()
wrapped
    FunPtr C_WidgetHierarchyChangedCallback
wrapped'' <- C_WidgetHierarchyChangedCallback
-> IO (FunPtr C_WidgetHierarchyChangedCallback)
mk_WidgetParentSetCallback C_WidgetHierarchyChangedCallback
wrapped'
    a
-> Text
-> FunPtr C_WidgetHierarchyChangedCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj Text
"parent-set" FunPtr C_WidgetHierarchyChangedCallback
wrapped'' SignalConnectMode
SignalConnectAfter Maybe Text
forall a. Maybe a
Nothing


#if defined(ENABLE_OVERLOADING)
data WidgetParentSetSignalInfo
instance SignalInfo WidgetParentSetSignalInfo where
    type HaskellCallbackType WidgetParentSetSignalInfo = WidgetParentSetCallback
    connectSignal obj cb connectMode detail = do
        let cb' = wrap_WidgetParentSetCallback cb
        cb'' <- mk_WidgetParentSetCallback cb'
        connectSignalFunPtr obj "parent-set" cb'' connectMode detail
    dbgSignalInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Gtk.Objects.Widget::parent-set"
        , O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-3.0.38/docs/GI-Gtk-Objects-Widget.html#g:signal:parentSet"})

#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

type C_WidgetPopupMenuCallback =
    Ptr Widget ->                           -- 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_WidgetPopupMenuCallback :: 
    GObject a => (a -> WidgetPopupMenuCallback) ->
    C_WidgetPopupMenuCallback
wrap_WidgetPopupMenuCallback :: forall a. GObject a => (a -> IO Bool) -> C_WidgetPopupMenuCallback
wrap_WidgetPopupMenuCallback a -> IO Bool
gi'cb Ptr Widget
gi'selfPtr Ptr ()
_ = do
    Bool
result <- Ptr Widget -> (Widget -> IO Bool) -> IO Bool
forall a b.
(HasCallStack, ManagedPtrNewtype a) =>
Ptr a -> (a -> IO b) -> IO b
B.ManagedPtr.withTransient Ptr Widget
gi'selfPtr ((Widget -> IO Bool) -> IO Bool) -> (Widget -> IO Bool) -> IO Bool
forall a b. (a -> b) -> a -> b
$ \Widget
gi'self -> a -> IO Bool
gi'cb (Widget -> a
Coerce.coerce Widget
gi'self) 
    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 -> ((?self :: a) => WidgetPopupMenuCallback) -> m SignalHandlerId
onWidgetPopupMenu :: forall a (m :: * -> *).
(IsWidget a, MonadIO m) =>
a -> ((?self::a) => IO Bool) -> m SignalHandlerId
onWidgetPopupMenu a
obj (?self::a) => IO Bool
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 wrapped :: a -> IO Bool
wrapped a
self = let ?self = a
?self::a
self in IO Bool
(?self::a) => IO Bool
cb
    let wrapped' :: C_WidgetPopupMenuCallback
wrapped' = (a -> IO Bool) -> C_WidgetPopupMenuCallback
forall a. GObject a => (a -> IO Bool) -> C_WidgetPopupMenuCallback
wrap_WidgetPopupMenuCallback a -> IO Bool
wrapped
    FunPtr C_WidgetPopupMenuCallback
wrapped'' <- C_WidgetPopupMenuCallback -> IO (FunPtr C_WidgetPopupMenuCallback)
mk_WidgetPopupMenuCallback C_WidgetPopupMenuCallback
wrapped'
    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 Text
"popup-menu" FunPtr C_WidgetPopupMenuCallback
wrapped'' 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
-- @
-- 
-- 
-- 
-- By default the object invoking the signal is not passed to the callback.
-- If you need to access it, you can use the implit @?self@ parameter.
-- Note that this requires activating the @ImplicitParams@ GHC extension.
-- 
afterWidgetPopupMenu :: (IsWidget a, MonadIO m) => a -> ((?self :: a) => WidgetPopupMenuCallback) -> m SignalHandlerId
afterWidgetPopupMenu :: forall a (m :: * -> *).
(IsWidget a, MonadIO m) =>
a -> ((?self::a) => IO Bool) -> m SignalHandlerId
afterWidgetPopupMenu a
obj (?self::a) => IO Bool
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 wrapped :: a -> IO Bool
wrapped a
self = let ?self = a
?self::a
self in IO Bool
(?self::a) => IO Bool
cb
    let wrapped' :: C_WidgetPopupMenuCallback
wrapped' = (a -> IO Bool) -> C_WidgetPopupMenuCallback
forall a. GObject a => (a -> IO Bool) -> C_WidgetPopupMenuCallback
wrap_WidgetPopupMenuCallback a -> IO Bool
wrapped
    FunPtr C_WidgetPopupMenuCallback
wrapped'' <- C_WidgetPopupMenuCallback -> IO (FunPtr C_WidgetPopupMenuCallback)
mk_WidgetPopupMenuCallback C_WidgetPopupMenuCallback
wrapped'
    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 Text
"popup-menu" FunPtr C_WidgetPopupMenuCallback
wrapped'' 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
    dbgSignalInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Gtk.Objects.Widget::popup-menu"
        , O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-3.0.38/docs/GI-Gtk-Objects-Widget.html#g:signal:popupMenu"})

#endif

-- signal Widget::property-notify-event
-- | The [propertyNotifyEvent](#g:signal:propertyNotifyEvent) signal will be emitted when a property on
-- the /@widget@/\'s window has been changed or deleted.
-- 
-- To receive this signal, the t'GI.Gdk.Objects.Window.Window' associated to the widget needs
-- to enable the @/GDK_PROPERTY_CHANGE_MASK/@ mask.
type WidgetPropertyNotifyEventCallback =
    Gdk.EventProperty.EventProperty
    -- ^ /@event@/: the t'GI.Gdk.Structs.EventProperty.EventProperty' which triggered
    --   this signal.
    -> IO Bool
    -- ^ __Returns:__ 'P.True' to stop other handlers from being invoked for the event.
    --   'P.False' to propagate the event further.

type C_WidgetPropertyNotifyEventCallback =
    Ptr Widget ->                           -- object
    Ptr Gdk.EventProperty.EventProperty ->
    Ptr () ->                               -- user_data
    IO CInt

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

wrap_WidgetPropertyNotifyEventCallback :: 
    GObject a => (a -> WidgetPropertyNotifyEventCallback) ->
    C_WidgetPropertyNotifyEventCallback
wrap_WidgetPropertyNotifyEventCallback :: forall a.
GObject a =>
(a -> WidgetPropertyNotifyEventCallback)
-> C_WidgetPropertyNotifyEventCallback
wrap_WidgetPropertyNotifyEventCallback a -> WidgetPropertyNotifyEventCallback
gi'cb Ptr Widget
gi'selfPtr Ptr EventProperty
event Ptr ()
_ = do
    EventProperty
event' <- ((ManagedPtr EventProperty -> EventProperty)
-> Ptr EventProperty -> IO EventProperty
forall a.
(HasCallStack, BoxedPtr a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
newPtr ManagedPtr EventProperty -> EventProperty
Gdk.EventProperty.EventProperty) Ptr EventProperty
event
    Bool
result <- Ptr Widget -> (Widget -> IO Bool) -> IO Bool
forall a b.
(HasCallStack, ManagedPtrNewtype a) =>
Ptr a -> (a -> IO b) -> IO b
B.ManagedPtr.withTransient Ptr Widget
gi'selfPtr ((Widget -> IO Bool) -> IO Bool) -> (Widget -> IO Bool) -> IO Bool
forall a b. (a -> b) -> a -> b
$ \Widget
gi'self -> a -> WidgetPropertyNotifyEventCallback
gi'cb (Widget -> a
Coerce.coerce Widget
gi'self)  EventProperty
event'
    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 [propertyNotifyEvent](#signal:propertyNotifyEvent) 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 #propertyNotifyEvent callback
-- @
-- 
-- 
onWidgetPropertyNotifyEvent :: (IsWidget a, MonadIO m) => a -> ((?self :: a) => WidgetPropertyNotifyEventCallback) -> m SignalHandlerId
onWidgetPropertyNotifyEvent :: forall a (m :: * -> *).
(IsWidget a, MonadIO m) =>
a
-> ((?self::a) => WidgetPropertyNotifyEventCallback)
-> m SignalHandlerId
onWidgetPropertyNotifyEvent a
obj (?self::a) => WidgetPropertyNotifyEventCallback
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 wrapped :: a -> WidgetPropertyNotifyEventCallback
wrapped a
self = let ?self = a
?self::a
self in (?self::a) => WidgetPropertyNotifyEventCallback
WidgetPropertyNotifyEventCallback
cb
    let wrapped' :: C_WidgetPropertyNotifyEventCallback
wrapped' = (a -> WidgetPropertyNotifyEventCallback)
-> C_WidgetPropertyNotifyEventCallback
forall a.
GObject a =>
(a -> WidgetPropertyNotifyEventCallback)
-> C_WidgetPropertyNotifyEventCallback
wrap_WidgetPropertyNotifyEventCallback a -> WidgetPropertyNotifyEventCallback
wrapped
    FunPtr C_WidgetPropertyNotifyEventCallback
wrapped'' <- C_WidgetPropertyNotifyEventCallback
-> IO (FunPtr C_WidgetPropertyNotifyEventCallback)
mk_WidgetPropertyNotifyEventCallback C_WidgetPropertyNotifyEventCallback
wrapped'
    a
-> Text
-> FunPtr C_WidgetPropertyNotifyEventCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj Text
"property-notify-event" FunPtr C_WidgetPropertyNotifyEventCallback
wrapped'' SignalConnectMode
SignalConnectBefore Maybe Text
forall a. Maybe a
Nothing

-- | Connect a signal handler for the [propertyNotifyEvent](#signal:propertyNotifyEvent) 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 #propertyNotifyEvent callback
-- @
-- 
-- 
-- 
-- By default the object invoking the signal is not passed to the callback.
-- If you need to access it, you can use the implit @?self@ parameter.
-- Note that this requires activating the @ImplicitParams@ GHC extension.
-- 
afterWidgetPropertyNotifyEvent :: (IsWidget a, MonadIO m) => a -> ((?self :: a) => WidgetPropertyNotifyEventCallback) -> m SignalHandlerId
afterWidgetPropertyNotifyEvent :: forall a (m :: * -> *).
(IsWidget a, MonadIO m) =>
a
-> ((?self::a) => WidgetPropertyNotifyEventCallback)
-> m SignalHandlerId
afterWidgetPropertyNotifyEvent a
obj (?self::a) => WidgetPropertyNotifyEventCallback
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 wrapped :: a -> WidgetPropertyNotifyEventCallback
wrapped a
self = let ?self = a
?self::a
self in (?self::a) => WidgetPropertyNotifyEventCallback
WidgetPropertyNotifyEventCallback
cb
    let wrapped' :: C_WidgetPropertyNotifyEventCallback
wrapped' = (a -> WidgetPropertyNotifyEventCallback)
-> C_WidgetPropertyNotifyEventCallback
forall a.
GObject a =>
(a -> WidgetPropertyNotifyEventCallback)
-> C_WidgetPropertyNotifyEventCallback
wrap_WidgetPropertyNotifyEventCallback a -> WidgetPropertyNotifyEventCallback
wrapped
    FunPtr C_WidgetPropertyNotifyEventCallback
wrapped'' <- C_WidgetPropertyNotifyEventCallback
-> IO (FunPtr C_WidgetPropertyNotifyEventCallback)
mk_WidgetPropertyNotifyEventCallback C_WidgetPropertyNotifyEventCallback
wrapped'
    a
-> Text
-> FunPtr C_WidgetPropertyNotifyEventCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj Text
"property-notify-event" FunPtr C_WidgetPropertyNotifyEventCallback
wrapped'' SignalConnectMode
SignalConnectAfter Maybe Text
forall a. Maybe a
Nothing


#if defined(ENABLE_OVERLOADING)
data WidgetPropertyNotifyEventSignalInfo
instance SignalInfo WidgetPropertyNotifyEventSignalInfo where
    type HaskellCallbackType WidgetPropertyNotifyEventSignalInfo = WidgetPropertyNotifyEventCallback
    connectSignal obj cb connectMode detail = do
        let cb' = wrap_WidgetPropertyNotifyEventCallback cb
        cb'' <- mk_WidgetPropertyNotifyEventCallback cb'
        connectSignalFunPtr obj "property-notify-event" cb'' connectMode detail
    dbgSignalInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Gtk.Objects.Widget::property-notify-event"
        , O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-3.0.38/docs/GI-Gtk-Objects-Widget.html#g:signal:propertyNotifyEvent"})

#endif

-- signal Widget::proximity-in-event
-- | To receive this signal the t'GI.Gdk.Objects.Window.Window' associated to the widget needs
-- to enable the @/GDK_PROXIMITY_IN_MASK/@ mask.
-- 
-- This signal will be sent to the grab widget if there is one.
type WidgetProximityInEventCallback =
    Gdk.EventProximity.EventProximity
    -- ^ /@event@/: the t'GI.Gdk.Structs.EventProximity.EventProximity' which triggered
    --   this signal.
    -> IO Bool
    -- ^ __Returns:__ 'P.True' to stop other handlers from being invoked for the event.
    --   'P.False' to propagate the event further.

type C_WidgetProximityInEventCallback =
    Ptr Widget ->                           -- object
    Ptr Gdk.EventProximity.EventProximity ->
    Ptr () ->                               -- user_data
    IO CInt

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

wrap_WidgetProximityInEventCallback :: 
    GObject a => (a -> WidgetProximityInEventCallback) ->
    C_WidgetProximityInEventCallback
wrap_WidgetProximityInEventCallback :: forall a.
GObject a =>
(a -> WidgetProximityInEventCallback)
-> C_WidgetProximityInEventCallback
wrap_WidgetProximityInEventCallback a -> WidgetProximityInEventCallback
gi'cb Ptr Widget
gi'selfPtr Ptr EventProximity
event Ptr ()
_ = do
    EventProximity
event' <- ((ManagedPtr EventProximity -> EventProximity)
-> Ptr EventProximity -> IO EventProximity
forall a.
(HasCallStack, BoxedPtr a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
newPtr ManagedPtr EventProximity -> EventProximity
Gdk.EventProximity.EventProximity) Ptr EventProximity
event
    Bool
result <- Ptr Widget -> (Widget -> IO Bool) -> IO Bool
forall a b.
(HasCallStack, ManagedPtrNewtype a) =>
Ptr a -> (a -> IO b) -> IO b
B.ManagedPtr.withTransient Ptr Widget
gi'selfPtr ((Widget -> IO Bool) -> IO Bool) -> (Widget -> IO Bool) -> IO Bool
forall a b. (a -> b) -> a -> b
$ \Widget
gi'self -> a -> WidgetProximityInEventCallback
gi'cb (Widget -> a
Coerce.coerce Widget
gi'self)  EventProximity
event'
    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 [proximityInEvent](#signal:proximityInEvent) 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 #proximityInEvent callback
-- @
-- 
-- 
onWidgetProximityInEvent :: (IsWidget a, MonadIO m) => a -> ((?self :: a) => WidgetProximityInEventCallback) -> m SignalHandlerId
onWidgetProximityInEvent :: forall a (m :: * -> *).
(IsWidget a, MonadIO m) =>
a
-> ((?self::a) => WidgetProximityInEventCallback)
-> m SignalHandlerId
onWidgetProximityInEvent a
obj (?self::a) => WidgetProximityInEventCallback
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 wrapped :: a -> WidgetProximityInEventCallback
wrapped a
self = let ?self = a
?self::a
self in (?self::a) => WidgetProximityInEventCallback
WidgetProximityInEventCallback
cb
    let wrapped' :: C_WidgetProximityInEventCallback
wrapped' = (a -> WidgetProximityInEventCallback)
-> C_WidgetProximityInEventCallback
forall a.
GObject a =>
(a -> WidgetProximityInEventCallback)
-> C_WidgetProximityInEventCallback
wrap_WidgetProximityInEventCallback a -> WidgetProximityInEventCallback
wrapped
    FunPtr C_WidgetProximityInEventCallback
wrapped'' <- C_WidgetProximityInEventCallback
-> IO (FunPtr C_WidgetProximityInEventCallback)
mk_WidgetProximityInEventCallback C_WidgetProximityInEventCallback
wrapped'
    a
-> Text
-> FunPtr C_WidgetProximityInEventCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj Text
"proximity-in-event" FunPtr C_WidgetProximityInEventCallback
wrapped'' SignalConnectMode
SignalConnectBefore Maybe Text
forall a. Maybe a
Nothing

-- | Connect a signal handler for the [proximityInEvent](#signal:proximityInEvent) 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 #proximityInEvent callback
-- @
-- 
-- 
-- 
-- By default the object invoking the signal is not passed to the callback.
-- If you need to access it, you can use the implit @?self@ parameter.
-- Note that this requires activating the @ImplicitParams@ GHC extension.
-- 
afterWidgetProximityInEvent :: (IsWidget a, MonadIO m) => a -> ((?self :: a) => WidgetProximityInEventCallback) -> m SignalHandlerId
afterWidgetProximityInEvent :: forall a (m :: * -> *).
(IsWidget a, MonadIO m) =>
a
-> ((?self::a) => WidgetProximityInEventCallback)
-> m SignalHandlerId
afterWidgetProximityInEvent a
obj (?self::a) => WidgetProximityInEventCallback
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 wrapped :: a -> WidgetProximityInEventCallback
wrapped a
self = let ?self = a
?self::a
self in (?self::a) => WidgetProximityInEventCallback
WidgetProximityInEventCallback
cb
    let wrapped' :: C_WidgetProximityInEventCallback
wrapped' = (a -> WidgetProximityInEventCallback)
-> C_WidgetProximityInEventCallback
forall a.
GObject a =>
(a -> WidgetProximityInEventCallback)
-> C_WidgetProximityInEventCallback
wrap_WidgetProximityInEventCallback a -> WidgetProximityInEventCallback
wrapped
    FunPtr C_WidgetProximityInEventCallback
wrapped'' <- C_WidgetProximityInEventCallback
-> IO (FunPtr C_WidgetProximityInEventCallback)
mk_WidgetProximityInEventCallback C_WidgetProximityInEventCallback
wrapped'
    a
-> Text
-> FunPtr C_WidgetProximityInEventCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj Text
"proximity-in-event" FunPtr C_WidgetProximityInEventCallback
wrapped'' SignalConnectMode
SignalConnectAfter Maybe Text
forall a. Maybe a
Nothing


#if defined(ENABLE_OVERLOADING)
data WidgetProximityInEventSignalInfo
instance SignalInfo WidgetProximityInEventSignalInfo where
    type HaskellCallbackType WidgetProximityInEventSignalInfo = WidgetProximityInEventCallback
    connectSignal obj cb connectMode detail = do
        let cb' = wrap_WidgetProximityInEventCallback cb
        cb'' <- mk_WidgetProximityInEventCallback cb'
        connectSignalFunPtr obj "proximity-in-event" cb'' connectMode detail
    dbgSignalInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Gtk.Objects.Widget::proximity-in-event"
        , O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-3.0.38/docs/GI-Gtk-Objects-Widget.html#g:signal:proximityInEvent"})

#endif

-- signal Widget::proximity-out-event
-- | To receive this signal the t'GI.Gdk.Objects.Window.Window' associated to the widget needs
-- to enable the @/GDK_PROXIMITY_OUT_MASK/@ mask.
-- 
-- This signal will be sent to the grab widget if there is one.
type WidgetProximityOutEventCallback =
    Gdk.EventProximity.EventProximity
    -- ^ /@event@/: the t'GI.Gdk.Structs.EventProximity.EventProximity' which triggered
    --   this signal.
    -> IO Bool
    -- ^ __Returns:__ 'P.True' to stop other handlers from being invoked for the event.
    --   'P.False' to propagate the event further.

type C_WidgetProximityOutEventCallback =
    Ptr Widget ->                           -- object
    Ptr Gdk.EventProximity.EventProximity ->
    Ptr () ->                               -- user_data
    IO CInt

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

wrap_WidgetProximityOutEventCallback :: 
    GObject a => (a -> WidgetProximityOutEventCallback) ->
    C_WidgetProximityOutEventCallback
wrap_WidgetProximityOutEventCallback :: forall a.
GObject a =>
(a -> WidgetProximityInEventCallback)
-> C_WidgetProximityInEventCallback
wrap_WidgetProximityOutEventCallback a -> WidgetProximityInEventCallback
gi'cb Ptr Widget
gi'selfPtr Ptr EventProximity
event Ptr ()
_ = do
    EventProximity
event' <- ((ManagedPtr EventProximity -> EventProximity)
-> Ptr EventProximity -> IO EventProximity
forall a.
(HasCallStack, BoxedPtr a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
newPtr ManagedPtr EventProximity -> EventProximity
Gdk.EventProximity.EventProximity) Ptr EventProximity
event
    Bool
result <- Ptr Widget -> (Widget -> IO Bool) -> IO Bool
forall a b.
(HasCallStack, ManagedPtrNewtype a) =>
Ptr a -> (a -> IO b) -> IO b
B.ManagedPtr.withTransient Ptr Widget
gi'selfPtr ((Widget -> IO Bool) -> IO Bool) -> (Widget -> IO Bool) -> IO Bool
forall a b. (a -> b) -> a -> b
$ \Widget
gi'self -> a -> WidgetProximityInEventCallback
gi'cb (Widget -> a
Coerce.coerce Widget
gi'self)  EventProximity
event'
    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 [proximityOutEvent](#signal:proximityOutEvent) 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 #proximityOutEvent callback
-- @
-- 
-- 
onWidgetProximityOutEvent :: (IsWidget a, MonadIO m) => a -> ((?self :: a) => WidgetProximityOutEventCallback) -> m SignalHandlerId
onWidgetProximityOutEvent :: forall a (m :: * -> *).
(IsWidget a, MonadIO m) =>
a
-> ((?self::a) => WidgetProximityInEventCallback)
-> m SignalHandlerId
onWidgetProximityOutEvent a
obj (?self::a) => WidgetProximityInEventCallback
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 wrapped :: a -> WidgetProximityInEventCallback
wrapped a
self = let ?self = a
?self::a
self in (?self::a) => WidgetProximityInEventCallback
WidgetProximityInEventCallback
cb
    let wrapped' :: C_WidgetProximityInEventCallback
wrapped' = (a -> WidgetProximityInEventCallback)
-> C_WidgetProximityInEventCallback
forall a.
GObject a =>
(a -> WidgetProximityInEventCallback)
-> C_WidgetProximityInEventCallback
wrap_WidgetProximityOutEventCallback a -> WidgetProximityInEventCallback
wrapped
    FunPtr C_WidgetProximityInEventCallback
wrapped'' <- C_WidgetProximityInEventCallback
-> IO (FunPtr C_WidgetProximityInEventCallback)
mk_WidgetProximityOutEventCallback C_WidgetProximityInEventCallback
wrapped'
    a
-> Text
-> FunPtr C_WidgetProximityInEventCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj Text
"proximity-out-event" FunPtr C_WidgetProximityInEventCallback
wrapped'' SignalConnectMode
SignalConnectBefore Maybe Text
forall a. Maybe a
Nothing

-- | Connect a signal handler for the [proximityOutEvent](#signal:proximityOutEvent) 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 #proximityOutEvent callback
-- @
-- 
-- 
-- 
-- By default the object invoking the signal is not passed to the callback.
-- If you need to access it, you can use the implit @?self@ parameter.
-- Note that this requires activating the @ImplicitParams@ GHC extension.
-- 
afterWidgetProximityOutEvent :: (IsWidget a, MonadIO m) => a -> ((?self :: a) => WidgetProximityOutEventCallback) -> m SignalHandlerId
afterWidgetProximityOutEvent :: forall a (m :: * -> *).
(IsWidget a, MonadIO m) =>
a
-> ((?self::a) => WidgetProximityInEventCallback)
-> m SignalHandlerId
afterWidgetProximityOutEvent a
obj (?self::a) => WidgetProximityInEventCallback
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 wrapped :: a -> WidgetProximityInEventCallback
wrapped a
self = let ?self = a
?self::a
self in (?self::a) => WidgetProximityInEventCallback
WidgetProximityInEventCallback
cb
    let wrapped' :: C_WidgetProximityInEventCallback
wrapped' = (a -> WidgetProximityInEventCallback)
-> C_WidgetProximityInEventCallback
forall a.
GObject a =>
(a -> WidgetProximityInEventCallback)
-> C_WidgetProximityInEventCallback
wrap_WidgetProximityOutEventCallback a -> WidgetProximityInEventCallback
wrapped
    FunPtr C_WidgetProximityInEventCallback
wrapped'' <- C_WidgetProximityInEventCallback
-> IO (FunPtr C_WidgetProximityInEventCallback)
mk_WidgetProximityOutEventCallback C_WidgetProximityInEventCallback
wrapped'
    a
-> Text
-> FunPtr C_WidgetProximityInEventCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj Text
"proximity-out-event" FunPtr C_WidgetProximityInEventCallback
wrapped'' SignalConnectMode
SignalConnectAfter Maybe Text
forall a. Maybe a
Nothing


#if defined(ENABLE_OVERLOADING)
data WidgetProximityOutEventSignalInfo
instance SignalInfo WidgetProximityOutEventSignalInfo where
    type HaskellCallbackType WidgetProximityOutEventSignalInfo = WidgetProximityOutEventCallback
    connectSignal obj cb connectMode detail = do
        let cb' = wrap_WidgetProximityOutEventCallback cb
        cb'' <- mk_WidgetProximityOutEventCallback cb'
        connectSignalFunPtr obj "proximity-out-event" cb'' connectMode detail
    dbgSignalInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Gtk.Objects.Widget::proximity-out-event"
        , O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-3.0.38/docs/GI-Gtk-Objects-Widget.html#g:signal:proximityOutEvent"})

#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.
-- 
-- /Since: 2.12/
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.

type C_WidgetQueryTooltipCallback =
    Ptr Widget ->                           -- 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_WidgetQueryTooltipCallback :: 
    GObject a => (a -> WidgetQueryTooltipCallback) ->
    C_WidgetQueryTooltipCallback
wrap_WidgetQueryTooltipCallback :: forall a.
GObject a =>
(a -> WidgetQueryTooltipCallback) -> C_WidgetQueryTooltipCallback
wrap_WidgetQueryTooltipCallback a -> WidgetQueryTooltipCallback
gi'cb Ptr Widget
gi'selfPtr Int32
x Int32
y CInt
keyboardMode Ptr Tooltip
tooltip Ptr ()
_ = do
    let keyboardMode' :: Bool
keyboardMode' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= CInt
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 <- Ptr Widget -> (Widget -> IO Bool) -> IO Bool
forall a b.
(HasCallStack, ManagedPtrNewtype a) =>
Ptr a -> (a -> IO b) -> IO b
B.ManagedPtr.withTransient Ptr Widget
gi'selfPtr ((Widget -> IO Bool) -> IO Bool) -> (Widget -> IO Bool) -> IO Bool
forall a b. (a -> b) -> a -> b
$ \Widget
gi'self -> a -> WidgetQueryTooltipCallback
gi'cb (Widget -> a
Coerce.coerce Widget
gi'self)  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 -> ((?self :: a) => WidgetQueryTooltipCallback) -> m SignalHandlerId
onWidgetQueryTooltip :: forall a (m :: * -> *).
(IsWidget a, MonadIO m) =>
a
-> ((?self::a) => WidgetQueryTooltipCallback) -> m SignalHandlerId
onWidgetQueryTooltip a
obj (?self::a) => 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 wrapped :: a -> WidgetQueryTooltipCallback
wrapped a
self = let ?self = a
?self::a
self in (?self::a) => WidgetQueryTooltipCallback
WidgetQueryTooltipCallback
cb
    let wrapped' :: C_WidgetQueryTooltipCallback
wrapped' = (a -> WidgetQueryTooltipCallback) -> C_WidgetQueryTooltipCallback
forall a.
GObject a =>
(a -> WidgetQueryTooltipCallback) -> C_WidgetQueryTooltipCallback
wrap_WidgetQueryTooltipCallback a -> WidgetQueryTooltipCallback
wrapped
    FunPtr C_WidgetQueryTooltipCallback
wrapped'' <- C_WidgetQueryTooltipCallback
-> IO (FunPtr C_WidgetQueryTooltipCallback)
mk_WidgetQueryTooltipCallback C_WidgetQueryTooltipCallback
wrapped'
    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 Text
"query-tooltip" FunPtr C_WidgetQueryTooltipCallback
wrapped'' 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
-- @
-- 
-- 
-- 
-- By default the object invoking the signal is not passed to the callback.
-- If you need to access it, you can use the implit @?self@ parameter.
-- Note that this requires activating the @ImplicitParams@ GHC extension.
-- 
afterWidgetQueryTooltip :: (IsWidget a, MonadIO m) => a -> ((?self :: a) => WidgetQueryTooltipCallback) -> m SignalHandlerId
afterWidgetQueryTooltip :: forall a (m :: * -> *).
(IsWidget a, MonadIO m) =>
a
-> ((?self::a) => WidgetQueryTooltipCallback) -> m SignalHandlerId
afterWidgetQueryTooltip a
obj (?self::a) => 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 wrapped :: a -> WidgetQueryTooltipCallback
wrapped a
self = let ?self = a
?self::a
self in (?self::a) => WidgetQueryTooltipCallback
WidgetQueryTooltipCallback
cb
    let wrapped' :: C_WidgetQueryTooltipCallback
wrapped' = (a -> WidgetQueryTooltipCallback) -> C_WidgetQueryTooltipCallback
forall a.
GObject a =>
(a -> WidgetQueryTooltipCallback) -> C_WidgetQueryTooltipCallback
wrap_WidgetQueryTooltipCallback a -> WidgetQueryTooltipCallback
wrapped
    FunPtr C_WidgetQueryTooltipCallback
wrapped'' <- C_WidgetQueryTooltipCallback
-> IO (FunPtr C_WidgetQueryTooltipCallback)
mk_WidgetQueryTooltipCallback C_WidgetQueryTooltipCallback
wrapped'
    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 Text
"query-tooltip" FunPtr C_WidgetQueryTooltipCallback
wrapped'' 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
    dbgSignalInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Gtk.Objects.Widget::query-tooltip"
        , O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-3.0.38/docs/GI-Gtk-Objects-Widget.html#g:signal:queryTooltip"})

#endif

-- signal Widget::realize
-- | The [realize](#g:signal:realize) signal is emitted when /@widget@/ is associated with a
-- t'GI.Gdk.Objects.Window.Window', 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 ()

type C_WidgetRealizeCallback =
    Ptr Widget ->                           -- 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_WidgetRealizeCallback :: 
    GObject a => (a -> WidgetRealizeCallback) ->
    C_WidgetRealizeCallback
wrap_WidgetRealizeCallback :: forall a.
GObject a =>
(a -> IO ()) -> C_WidgetAccelClosuresChangedCallback
wrap_WidgetRealizeCallback a -> IO ()
gi'cb Ptr Widget
gi'selfPtr Ptr ()
_ = do
    Ptr Widget -> (Widget -> IO ()) -> IO ()
forall a b.
(HasCallStack, ManagedPtrNewtype a) =>
Ptr a -> (a -> IO b) -> IO b
B.ManagedPtr.withTransient Ptr Widget
gi'selfPtr ((Widget -> IO ()) -> IO ()) -> (Widget -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Widget
gi'self -> a -> IO ()
gi'cb (Widget -> a
Coerce.coerce Widget
gi'self) 


-- | 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 -> ((?self :: a) => WidgetRealizeCallback) -> m SignalHandlerId
onWidgetRealize :: forall a (m :: * -> *).
(IsWidget a, MonadIO m) =>
a -> ((?self::a) => IO ()) -> m SignalHandlerId
onWidgetRealize a
obj (?self::a) => 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 wrapped :: a -> IO ()
wrapped a
self = let ?self = a
?self::a
self in IO ()
(?self::a) => IO ()
cb
    let wrapped' :: C_WidgetAccelClosuresChangedCallback
wrapped' = (a -> IO ()) -> C_WidgetAccelClosuresChangedCallback
forall a.
GObject a =>
(a -> IO ()) -> C_WidgetAccelClosuresChangedCallback
wrap_WidgetRealizeCallback a -> IO ()
wrapped
    FunPtr C_WidgetAccelClosuresChangedCallback
wrapped'' <- C_WidgetAccelClosuresChangedCallback
-> IO (FunPtr C_WidgetAccelClosuresChangedCallback)
mk_WidgetRealizeCallback C_WidgetAccelClosuresChangedCallback
wrapped'
    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 Text
"realize" FunPtr C_WidgetAccelClosuresChangedCallback
wrapped'' 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
-- @
-- 
-- 
-- 
-- By default the object invoking the signal is not passed to the callback.
-- If you need to access it, you can use the implit @?self@ parameter.
-- Note that this requires activating the @ImplicitParams@ GHC extension.
-- 
afterWidgetRealize :: (IsWidget a, MonadIO m) => a -> ((?self :: a) => WidgetRealizeCallback) -> m SignalHandlerId
afterWidgetRealize :: forall a (m :: * -> *).
(IsWidget a, MonadIO m) =>
a -> ((?self::a) => IO ()) -> m SignalHandlerId
afterWidgetRealize a
obj (?self::a) => 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 wrapped :: a -> IO ()
wrapped a
self = let ?self = a
?self::a
self in IO ()
(?self::a) => IO ()
cb
    let wrapped' :: C_WidgetAccelClosuresChangedCallback
wrapped' = (a -> IO ()) -> C_WidgetAccelClosuresChangedCallback
forall a.
GObject a =>
(a -> IO ()) -> C_WidgetAccelClosuresChangedCallback
wrap_WidgetRealizeCallback a -> IO ()
wrapped
    FunPtr C_WidgetAccelClosuresChangedCallback
wrapped'' <- C_WidgetAccelClosuresChangedCallback
-> IO (FunPtr C_WidgetAccelClosuresChangedCallback)
mk_WidgetRealizeCallback C_WidgetAccelClosuresChangedCallback
wrapped'
    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 Text
"realize" FunPtr C_WidgetAccelClosuresChangedCallback
wrapped'' 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
    dbgSignalInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Gtk.Objects.Widget::realize"
        , O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-3.0.38/docs/GI-Gtk-Objects-Widget.html#g:signal:realize"})

#endif

-- signal Widget::screen-changed
-- | The [screenChanged](#g:signal:screenChanged) signal gets emitted when the
-- screen of a widget has changed.
type WidgetScreenChangedCallback =
    Maybe Gdk.Screen.Screen
    -- ^ /@previousScreen@/: the previous screen, or 'P.Nothing' if the
    --   widget was not associated with a screen before
    -> IO ()

type C_WidgetScreenChangedCallback =
    Ptr Widget ->                           -- object
    Ptr Gdk.Screen.Screen ->
    Ptr () ->                               -- user_data
    IO ()

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

wrap_WidgetScreenChangedCallback :: 
    GObject a => (a -> WidgetScreenChangedCallback) ->
    C_WidgetScreenChangedCallback
wrap_WidgetScreenChangedCallback :: forall a.
GObject a =>
(a -> WidgetScreenChangedCallback) -> C_WidgetScreenChangedCallback
wrap_WidgetScreenChangedCallback a -> WidgetScreenChangedCallback
gi'cb Ptr Widget
gi'selfPtr Ptr Screen
previousScreen Ptr ()
_ = do
    Maybe Screen
maybePreviousScreen <-
        if Ptr Screen
previousScreen Ptr Screen -> Ptr Screen -> Bool
forall a. Eq a => a -> a -> Bool
== Ptr Screen
forall a. Ptr a
nullPtr
        then Maybe Screen -> IO (Maybe Screen)
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe Screen
forall a. Maybe a
Nothing
        else do
            Screen
previousScreen' <- ((ManagedPtr Screen -> Screen) -> Ptr Screen -> IO Screen
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr Screen -> Screen
Gdk.Screen.Screen) Ptr Screen
previousScreen
            Maybe Screen -> IO (Maybe Screen)
forall (m :: * -> *) a. Monad m => a -> m a
return (Maybe Screen -> IO (Maybe Screen))
-> Maybe Screen -> IO (Maybe Screen)
forall a b. (a -> b) -> a -> b
$ Screen -> Maybe Screen
forall a. a -> Maybe a
Just Screen
previousScreen'
    Ptr Widget -> (Widget -> IO ()) -> IO ()
forall a b.
(HasCallStack, ManagedPtrNewtype a) =>
Ptr a -> (a -> IO b) -> IO b
B.ManagedPtr.withTransient Ptr Widget
gi'selfPtr ((Widget -> IO ()) -> IO ()) -> (Widget -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Widget
gi'self -> a -> WidgetScreenChangedCallback
gi'cb (Widget -> a
Coerce.coerce Widget
gi'self)  Maybe Screen
maybePreviousScreen


-- | Connect a signal handler for the [screenChanged](#signal:screenChanged) 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 #screenChanged callback
-- @
-- 
-- 
onWidgetScreenChanged :: (IsWidget a, MonadIO m) => a -> ((?self :: a) => WidgetScreenChangedCallback) -> m SignalHandlerId
onWidgetScreenChanged :: forall a (m :: * -> *).
(IsWidget a, MonadIO m) =>
a
-> ((?self::a) => WidgetScreenChangedCallback) -> m SignalHandlerId
onWidgetScreenChanged a
obj (?self::a) => WidgetScreenChangedCallback
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 wrapped :: a -> WidgetScreenChangedCallback
wrapped a
self = let ?self = a
?self::a
self in (?self::a) => WidgetScreenChangedCallback
WidgetScreenChangedCallback
cb
    let wrapped' :: C_WidgetScreenChangedCallback
wrapped' = (a -> WidgetScreenChangedCallback) -> C_WidgetScreenChangedCallback
forall a.
GObject a =>
(a -> WidgetScreenChangedCallback) -> C_WidgetScreenChangedCallback
wrap_WidgetScreenChangedCallback a -> WidgetScreenChangedCallback
wrapped
    FunPtr C_WidgetScreenChangedCallback
wrapped'' <- C_WidgetScreenChangedCallback
-> IO (FunPtr C_WidgetScreenChangedCallback)
mk_WidgetScreenChangedCallback C_WidgetScreenChangedCallback
wrapped'
    a
-> Text
-> FunPtr C_WidgetScreenChangedCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj Text
"screen-changed" FunPtr C_WidgetScreenChangedCallback
wrapped'' SignalConnectMode
SignalConnectBefore Maybe Text
forall a. Maybe a
Nothing

-- | Connect a signal handler for the [screenChanged](#signal:screenChanged) 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 #screenChanged callback
-- @
-- 
-- 
-- 
-- By default the object invoking the signal is not passed to the callback.
-- If you need to access it, you can use the implit @?self@ parameter.
-- Note that this requires activating the @ImplicitParams@ GHC extension.
-- 
afterWidgetScreenChanged :: (IsWidget a, MonadIO m) => a -> ((?self :: a) => WidgetScreenChangedCallback) -> m SignalHandlerId
afterWidgetScreenChanged :: forall a (m :: * -> *).
(IsWidget a, MonadIO m) =>
a
-> ((?self::a) => WidgetScreenChangedCallback) -> m SignalHandlerId
afterWidgetScreenChanged a
obj (?self::a) => WidgetScreenChangedCallback
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 wrapped :: a -> WidgetScreenChangedCallback
wrapped a
self = let ?self = a
?self::a
self in (?self::a) => WidgetScreenChangedCallback
WidgetScreenChangedCallback
cb
    let wrapped' :: C_WidgetScreenChangedCallback
wrapped' = (a -> WidgetScreenChangedCallback) -> C_WidgetScreenChangedCallback
forall a.
GObject a =>
(a -> WidgetScreenChangedCallback) -> C_WidgetScreenChangedCallback
wrap_WidgetScreenChangedCallback a -> WidgetScreenChangedCallback
wrapped
    FunPtr C_WidgetScreenChangedCallback
wrapped'' <- C_WidgetScreenChangedCallback
-> IO (FunPtr C_WidgetScreenChangedCallback)
mk_WidgetScreenChangedCallback C_WidgetScreenChangedCallback
wrapped'
    a
-> Text
-> FunPtr C_WidgetScreenChangedCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj Text
"screen-changed" FunPtr C_WidgetScreenChangedCallback
wrapped'' SignalConnectMode
SignalConnectAfter Maybe Text
forall a. Maybe a
Nothing


#if defined(ENABLE_OVERLOADING)
data WidgetScreenChangedSignalInfo
instance SignalInfo WidgetScreenChangedSignalInfo where
    type HaskellCallbackType WidgetScreenChangedSignalInfo = WidgetScreenChangedCallback
    connectSignal obj cb connectMode detail = do
        let cb' = wrap_WidgetScreenChangedCallback cb
        cb'' <- mk_WidgetScreenChangedCallback cb'
        connectSignalFunPtr obj "screen-changed" cb'' connectMode detail
    dbgSignalInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Gtk.Objects.Widget::screen-changed"
        , O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-3.0.38/docs/GI-Gtk-Objects-Widget.html#g:signal:screenChanged"})

#endif

-- signal Widget::scroll-event
-- | The [scrollEvent](#g:signal:scrollEvent) signal is emitted when a button in the 4 to 7
-- range is pressed. Wheel mice are usually configured to generate
-- button press events for buttons 4 and 5 when the wheel is turned.
-- 
-- To receive this signal, the t'GI.Gdk.Objects.Window.Window' associated to the widget needs
-- to enable the @/GDK_SCROLL_MASK/@ mask.
-- 
-- This signal will be sent to the grab widget if there is one.
type WidgetScrollEventCallback =
    Gdk.EventScroll.EventScroll
    -- ^ /@event@/: the t'GI.Gdk.Structs.EventScroll.EventScroll' which triggered
    --   this signal.
    -> IO Bool
    -- ^ __Returns:__ 'P.True' to stop other handlers from being invoked for the event.
    --   'P.False' to propagate the event further.

type C_WidgetScrollEventCallback =
    Ptr Widget ->                           -- object
    Ptr Gdk.EventScroll.EventScroll ->
    Ptr () ->                               -- user_data
    IO CInt

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

wrap_WidgetScrollEventCallback :: 
    GObject a => (a -> WidgetScrollEventCallback) ->
    C_WidgetScrollEventCallback
wrap_WidgetScrollEventCallback :: forall a.
GObject a =>
(a -> WidgetScrollEventCallback) -> C_WidgetScrollEventCallback
wrap_WidgetScrollEventCallback a -> WidgetScrollEventCallback
gi'cb Ptr Widget
gi'selfPtr Ptr EventScroll
event Ptr ()
_ = do
    EventScroll
event' <- ((ManagedPtr EventScroll -> EventScroll)
-> Ptr EventScroll -> IO EventScroll
forall a.
(HasCallStack, BoxedPtr a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
newPtr ManagedPtr EventScroll -> EventScroll
Gdk.EventScroll.EventScroll) Ptr EventScroll
event
    Bool
result <- Ptr Widget -> (Widget -> IO Bool) -> IO Bool
forall a b.
(HasCallStack, ManagedPtrNewtype a) =>
Ptr a -> (a -> IO b) -> IO b
B.ManagedPtr.withTransient Ptr Widget
gi'selfPtr ((Widget -> IO Bool) -> IO Bool) -> (Widget -> IO Bool) -> IO Bool
forall a b. (a -> b) -> a -> b
$ \Widget
gi'self -> a -> WidgetScrollEventCallback
gi'cb (Widget -> a
Coerce.coerce Widget
gi'self)  EventScroll
event'
    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 [scrollEvent](#signal:scrollEvent) 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 #scrollEvent callback
-- @
-- 
-- 
onWidgetScrollEvent :: (IsWidget a, MonadIO m) => a -> ((?self :: a) => WidgetScrollEventCallback) -> m SignalHandlerId
onWidgetScrollEvent :: forall a (m :: * -> *).
(IsWidget a, MonadIO m) =>
a -> ((?self::a) => WidgetScrollEventCallback) -> m SignalHandlerId
onWidgetScrollEvent a
obj (?self::a) => WidgetScrollEventCallback
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 wrapped :: a -> WidgetScrollEventCallback
wrapped a
self = let ?self = a
?self::a
self in (?self::a) => WidgetScrollEventCallback
WidgetScrollEventCallback
cb
    let wrapped' :: C_WidgetScrollEventCallback
wrapped' = (a -> WidgetScrollEventCallback) -> C_WidgetScrollEventCallback
forall a.
GObject a =>
(a -> WidgetScrollEventCallback) -> C_WidgetScrollEventCallback
wrap_WidgetScrollEventCallback a -> WidgetScrollEventCallback
wrapped
    FunPtr C_WidgetScrollEventCallback
wrapped'' <- C_WidgetScrollEventCallback
-> IO (FunPtr C_WidgetScrollEventCallback)
mk_WidgetScrollEventCallback C_WidgetScrollEventCallback
wrapped'
    a
-> Text
-> FunPtr C_WidgetScrollEventCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj Text
"scroll-event" FunPtr C_WidgetScrollEventCallback
wrapped'' SignalConnectMode
SignalConnectBefore Maybe Text
forall a. Maybe a
Nothing

-- | Connect a signal handler for the [scrollEvent](#signal:scrollEvent) 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 #scrollEvent callback
-- @
-- 
-- 
-- 
-- By default the object invoking the signal is not passed to the callback.
-- If you need to access it, you can use the implit @?self@ parameter.
-- Note that this requires activating the @ImplicitParams@ GHC extension.
-- 
afterWidgetScrollEvent :: (IsWidget a, MonadIO m) => a -> ((?self :: a) => WidgetScrollEventCallback) -> m SignalHandlerId
afterWidgetScrollEvent :: forall a (m :: * -> *).
(IsWidget a, MonadIO m) =>
a -> ((?self::a) => WidgetScrollEventCallback) -> m SignalHandlerId
afterWidgetScrollEvent a
obj (?self::a) => WidgetScrollEventCallback
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 wrapped :: a -> WidgetScrollEventCallback
wrapped a
self = let ?self = a
?self::a
self in (?self::a) => WidgetScrollEventCallback
WidgetScrollEventCallback
cb
    let wrapped' :: C_WidgetScrollEventCallback
wrapped' = (a -> WidgetScrollEventCallback) -> C_WidgetScrollEventCallback
forall a.
GObject a =>
(a -> WidgetScrollEventCallback) -> C_WidgetScrollEventCallback
wrap_WidgetScrollEventCallback a -> WidgetScrollEventCallback
wrapped
    FunPtr C_WidgetScrollEventCallback
wrapped'' <- C_WidgetScrollEventCallback
-> IO (FunPtr C_WidgetScrollEventCallback)
mk_WidgetScrollEventCallback C_WidgetScrollEventCallback
wrapped'
    a
-> Text
-> FunPtr C_WidgetScrollEventCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj Text
"scroll-event" FunPtr C_WidgetScrollEventCallback
wrapped'' SignalConnectMode
SignalConnectAfter Maybe Text
forall a. Maybe a
Nothing


#if defined(ENABLE_OVERLOADING)
data WidgetScrollEventSignalInfo
instance SignalInfo WidgetScrollEventSignalInfo where
    type HaskellCallbackType WidgetScrollEventSignalInfo = WidgetScrollEventCallback
    connectSignal obj cb connectMode detail = do
        let cb' = wrap_WidgetScrollEventCallback cb
        cb'' <- mk_WidgetScrollEventCallback cb'
        connectSignalFunPtr obj "scroll-event" cb'' connectMode detail
    dbgSignalInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Gtk.Objects.Widget::scroll-event"
        , O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-3.0.38/docs/GI-Gtk-Objects-Widget.html#g:signal:scrollEvent"})

#endif

-- signal Widget::selection-clear-event
-- | The [selectionClearEvent](#g:signal:selectionClearEvent) signal will be emitted when the
-- the /@widget@/\'s window has lost ownership of a selection.
type WidgetSelectionClearEventCallback =
    Gdk.EventSelection.EventSelection
    -- ^ /@event@/: the t'GI.Gdk.Structs.EventSelection.EventSelection' which triggered
    --   this signal.
    -> IO Bool
    -- ^ __Returns:__ 'P.True' to stop other handlers from being invoked for the event.
    --   'P.False' to propagate the event further.

type C_WidgetSelectionClearEventCallback =
    Ptr Widget ->                           -- object
    Ptr Gdk.EventSelection.EventSelection ->
    Ptr () ->                               -- user_data
    IO CInt

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

wrap_WidgetSelectionClearEventCallback :: 
    GObject a => (a -> WidgetSelectionClearEventCallback) ->
    C_WidgetSelectionClearEventCallback
wrap_WidgetSelectionClearEventCallback :: forall a.
GObject a =>
(a -> WidgetSelectionClearEventCallback)
-> C_WidgetSelectionClearEventCallback
wrap_WidgetSelectionClearEventCallback a -> WidgetSelectionClearEventCallback
gi'cb Ptr Widget
gi'selfPtr Ptr EventSelection
event Ptr ()
_ = do
    EventSelection
event' <- ((ManagedPtr EventSelection -> EventSelection)
-> Ptr EventSelection -> IO EventSelection
forall a.
(HasCallStack, BoxedPtr a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
newPtr ManagedPtr EventSelection -> EventSelection
Gdk.EventSelection.EventSelection) Ptr EventSelection
event
    Bool
result <- Ptr Widget -> (Widget -> IO Bool) -> IO Bool
forall a b.
(HasCallStack, ManagedPtrNewtype a) =>
Ptr a -> (a -> IO b) -> IO b
B.ManagedPtr.withTransient Ptr Widget
gi'selfPtr ((Widget -> IO Bool) -> IO Bool) -> (Widget -> IO Bool) -> IO Bool
forall a b. (a -> b) -> a -> b
$ \Widget
gi'self -> a -> WidgetSelectionClearEventCallback
gi'cb (Widget -> a
Coerce.coerce Widget
gi'self)  EventSelection
event'
    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 [selectionClearEvent](#signal:selectionClearEvent) 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 #selectionClearEvent callback
-- @
-- 
-- 
onWidgetSelectionClearEvent :: (IsWidget a, MonadIO m) => a -> ((?self :: a) => WidgetSelectionClearEventCallback) -> m SignalHandlerId
onWidgetSelectionClearEvent :: forall a (m :: * -> *).
(IsWidget a, MonadIO m) =>
a
-> ((?self::a) => WidgetSelectionClearEventCallback)
-> m SignalHandlerId
onWidgetSelectionClearEvent a
obj (?self::a) => WidgetSelectionClearEventCallback
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 wrapped :: a -> WidgetSelectionClearEventCallback
wrapped a
self = let ?self = a
?self::a
self in (?self::a) => WidgetSelectionClearEventCallback
WidgetSelectionClearEventCallback
cb
    let wrapped' :: C_WidgetSelectionClearEventCallback
wrapped' = (a -> WidgetSelectionClearEventCallback)
-> C_WidgetSelectionClearEventCallback
forall a.
GObject a =>
(a -> WidgetSelectionClearEventCallback)
-> C_WidgetSelectionClearEventCallback
wrap_WidgetSelectionClearEventCallback a -> WidgetSelectionClearEventCallback
wrapped
    FunPtr C_WidgetSelectionClearEventCallback
wrapped'' <- C_WidgetSelectionClearEventCallback
-> IO (FunPtr C_WidgetSelectionClearEventCallback)
mk_WidgetSelectionClearEventCallback C_WidgetSelectionClearEventCallback
wrapped'
    a
-> Text
-> FunPtr C_WidgetSelectionClearEventCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj Text
"selection-clear-event" FunPtr C_WidgetSelectionClearEventCallback
wrapped'' SignalConnectMode
SignalConnectBefore Maybe Text
forall a. Maybe a
Nothing

-- | Connect a signal handler for the [selectionClearEvent](#signal:selectionClearEvent) 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 #selectionClearEvent callback
-- @
-- 
-- 
-- 
-- By default the object invoking the signal is not passed to the callback.
-- If you need to access it, you can use the implit @?self@ parameter.
-- Note that this requires activating the @ImplicitParams@ GHC extension.
-- 
afterWidgetSelectionClearEvent :: (IsWidget a, MonadIO m) => a -> ((?self :: a) => WidgetSelectionClearEventCallback) -> m SignalHandlerId
afterWidgetSelectionClearEvent :: forall a (m :: * -> *).
(IsWidget a, MonadIO m) =>
a
-> ((?self::a) => WidgetSelectionClearEventCallback)
-> m SignalHandlerId
afterWidgetSelectionClearEvent a
obj (?self::a) => WidgetSelectionClearEventCallback
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 wrapped :: a -> WidgetSelectionClearEventCallback
wrapped a
self = let ?self = a
?self::a
self in (?self::a) => WidgetSelectionClearEventCallback
WidgetSelectionClearEventCallback
cb
    let wrapped' :: C_WidgetSelectionClearEventCallback
wrapped' = (a -> WidgetSelectionClearEventCallback)
-> C_WidgetSelectionClearEventCallback
forall a.
GObject a =>
(a -> WidgetSelectionClearEventCallback)
-> C_WidgetSelectionClearEventCallback
wrap_WidgetSelectionClearEventCallback a -> WidgetSelectionClearEventCallback
wrapped
    FunPtr C_WidgetSelectionClearEventCallback
wrapped'' <- C_WidgetSelectionClearEventCallback
-> IO (FunPtr C_WidgetSelectionClearEventCallback)
mk_WidgetSelectionClearEventCallback C_WidgetSelectionClearEventCallback
wrapped'
    a
-> Text
-> FunPtr C_WidgetSelectionClearEventCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj Text
"selection-clear-event" FunPtr C_WidgetSelectionClearEventCallback
wrapped'' SignalConnectMode
SignalConnectAfter Maybe Text
forall a. Maybe a
Nothing


#if defined(ENABLE_OVERLOADING)
data WidgetSelectionClearEventSignalInfo
instance SignalInfo WidgetSelectionClearEventSignalInfo where
    type HaskellCallbackType WidgetSelectionClearEventSignalInfo = WidgetSelectionClearEventCallback
    connectSignal obj cb connectMode detail = do
        let cb' = wrap_WidgetSelectionClearEventCallback cb
        cb'' <- mk_WidgetSelectionClearEventCallback cb'
        connectSignalFunPtr obj "selection-clear-event" cb'' connectMode detail
    dbgSignalInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Gtk.Objects.Widget::selection-clear-event"
        , O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-3.0.38/docs/GI-Gtk-Objects-Widget.html#g:signal:selectionClearEvent"})

#endif

-- signal Widget::selection-get
-- | /No description available in the introspection data./
type WidgetSelectionGetCallback =
    Gtk.SelectionData.SelectionData
    -> Word32
    -> Word32
    -> IO ()

type C_WidgetSelectionGetCallback =
    Ptr Widget ->                           -- object
    Ptr Gtk.SelectionData.SelectionData ->
    Word32 ->
    Word32 ->
    Ptr () ->                               -- user_data
    IO ()

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

wrap_WidgetSelectionGetCallback :: 
    GObject a => (a -> WidgetSelectionGetCallback) ->
    C_WidgetSelectionGetCallback
wrap_WidgetSelectionGetCallback :: forall a.
GObject a =>
(a -> WidgetSelectionGetCallback) -> C_WidgetSelectionGetCallback
wrap_WidgetSelectionGetCallback a -> WidgetSelectionGetCallback
gi'cb Ptr Widget
gi'selfPtr Ptr SelectionData
data_ Word32
info Word32
time Ptr ()
_ = do
    Ptr SelectionData -> (SelectionData -> IO ()) -> IO ()
forall a b.
(HasCallStack, ManagedPtrNewtype a) =>
Ptr a -> (a -> IO b) -> IO b
B.ManagedPtr.withTransient  Ptr SelectionData
data_ ((SelectionData -> IO ()) -> IO ())
-> (SelectionData -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \SelectionData
data_' -> do
        Ptr Widget -> (Widget -> IO ()) -> IO ()
forall a b.
(HasCallStack, ManagedPtrNewtype a) =>
Ptr a -> (a -> IO b) -> IO b
B.ManagedPtr.withTransient Ptr Widget
gi'selfPtr ((Widget -> IO ()) -> IO ()) -> (Widget -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Widget
gi'self -> a -> WidgetSelectionGetCallback
gi'cb (Widget -> a
Coerce.coerce Widget
gi'self)  SelectionData
data_' Word32
info Word32
time


-- | Connect a signal handler for the [selectionGet](#signal:selectionGet) 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 #selectionGet callback
-- @
-- 
-- 
onWidgetSelectionGet :: (IsWidget a, MonadIO m) => a -> ((?self :: a) => WidgetSelectionGetCallback) -> m SignalHandlerId
onWidgetSelectionGet :: forall a (m :: * -> *).
(IsWidget a, MonadIO m) =>
a
-> ((?self::a) => WidgetSelectionGetCallback) -> m SignalHandlerId
onWidgetSelectionGet a
obj (?self::a) => WidgetSelectionGetCallback
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 wrapped :: a -> WidgetSelectionGetCallback
wrapped a
self = let ?self = a
?self::a
self in (?self::a) => WidgetSelectionGetCallback
WidgetSelectionGetCallback
cb
    let wrapped' :: C_WidgetSelectionGetCallback
wrapped' = (a -> WidgetSelectionGetCallback) -> C_WidgetSelectionGetCallback
forall a.
GObject a =>
(a -> WidgetSelectionGetCallback) -> C_WidgetSelectionGetCallback
wrap_WidgetSelectionGetCallback a -> WidgetSelectionGetCallback
wrapped
    FunPtr C_WidgetSelectionGetCallback
wrapped'' <- C_WidgetSelectionGetCallback
-> IO (FunPtr C_WidgetSelectionGetCallback)
mk_WidgetSelectionGetCallback C_WidgetSelectionGetCallback
wrapped'
    a
-> Text
-> FunPtr C_WidgetSelectionGetCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj Text
"selection-get" FunPtr C_WidgetSelectionGetCallback
wrapped'' SignalConnectMode
SignalConnectBefore Maybe Text
forall a. Maybe a
Nothing

-- | Connect a signal handler for the [selectionGet](#signal:selectionGet) 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 #selectionGet callback
-- @
-- 
-- 
-- 
-- By default the object invoking the signal is not passed to the callback.
-- If you need to access it, you can use the implit @?self@ parameter.
-- Note that this requires activating the @ImplicitParams@ GHC extension.
-- 
afterWidgetSelectionGet :: (IsWidget a, MonadIO m) => a -> ((?self :: a) => WidgetSelectionGetCallback) -> m SignalHandlerId
afterWidgetSelectionGet :: forall a (m :: * -> *).
(IsWidget a, MonadIO m) =>
a
-> ((?self::a) => WidgetSelectionGetCallback) -> m SignalHandlerId
afterWidgetSelectionGet a
obj (?self::a) => WidgetSelectionGetCallback
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 wrapped :: a -> WidgetSelectionGetCallback
wrapped a
self = let ?self = a
?self::a
self in (?self::a) => WidgetSelectionGetCallback
WidgetSelectionGetCallback
cb
    let wrapped' :: C_WidgetSelectionGetCallback
wrapped' = (a -> WidgetSelectionGetCallback) -> C_WidgetSelectionGetCallback
forall a.
GObject a =>
(a -> WidgetSelectionGetCallback) -> C_WidgetSelectionGetCallback
wrap_WidgetSelectionGetCallback a -> WidgetSelectionGetCallback
wrapped
    FunPtr C_WidgetSelectionGetCallback
wrapped'' <- C_WidgetSelectionGetCallback
-> IO (FunPtr C_WidgetSelectionGetCallback)
mk_WidgetSelectionGetCallback C_WidgetSelectionGetCallback
wrapped'
    a
-> Text
-> FunPtr C_WidgetSelectionGetCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj Text
"selection-get" FunPtr C_WidgetSelectionGetCallback
wrapped'' SignalConnectMode
SignalConnectAfter Maybe Text
forall a. Maybe a
Nothing


#if defined(ENABLE_OVERLOADING)
data WidgetSelectionGetSignalInfo
instance SignalInfo WidgetSelectionGetSignalInfo where
    type HaskellCallbackType WidgetSelectionGetSignalInfo = WidgetSelectionGetCallback
    connectSignal obj cb connectMode detail = do
        let cb' = wrap_WidgetSelectionGetCallback cb
        cb'' <- mk_WidgetSelectionGetCallback cb'
        connectSignalFunPtr obj "selection-get" cb'' connectMode detail
    dbgSignalInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Gtk.Objects.Widget::selection-get"
        , O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-3.0.38/docs/GI-Gtk-Objects-Widget.html#g:signal:selectionGet"})

#endif

-- signal Widget::selection-notify-event
-- | /No description available in the introspection data./
type WidgetSelectionNotifyEventCallback =
    Gdk.EventSelection.EventSelection
    -> IO Bool
    -- ^ __Returns:__ 'P.True' to stop other handlers from being invoked for the event. 'P.False' to propagate the event further.

type C_WidgetSelectionNotifyEventCallback =
    Ptr Widget ->                           -- object
    Ptr Gdk.EventSelection.EventSelection ->
    Ptr () ->                               -- user_data
    IO CInt

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

wrap_WidgetSelectionNotifyEventCallback :: 
    GObject a => (a -> WidgetSelectionNotifyEventCallback) ->
    C_WidgetSelectionNotifyEventCallback
wrap_WidgetSelectionNotifyEventCallback :: forall a.
GObject a =>
(a -> WidgetSelectionClearEventCallback)
-> C_WidgetSelectionClearEventCallback
wrap_WidgetSelectionNotifyEventCallback a -> WidgetSelectionClearEventCallback
gi'cb Ptr Widget
gi'selfPtr Ptr EventSelection
event Ptr ()
_ = do
    EventSelection
event' <- ((ManagedPtr EventSelection -> EventSelection)
-> Ptr EventSelection -> IO EventSelection
forall a.
(HasCallStack, BoxedPtr a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
newPtr ManagedPtr EventSelection -> EventSelection
Gdk.EventSelection.EventSelection) Ptr EventSelection
event
    Bool
result <- Ptr Widget -> (Widget -> IO Bool) -> IO Bool
forall a b.
(HasCallStack, ManagedPtrNewtype a) =>
Ptr a -> (a -> IO b) -> IO b
B.ManagedPtr.withTransient Ptr Widget
gi'selfPtr ((Widget -> IO Bool) -> IO Bool) -> (Widget -> IO Bool) -> IO Bool
forall a b. (a -> b) -> a -> b
$ \Widget
gi'self -> a -> WidgetSelectionClearEventCallback
gi'cb (Widget -> a
Coerce.coerce Widget
gi'self)  EventSelection
event'
    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 [selectionNotifyEvent](#signal:selectionNotifyEvent) 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 #selectionNotifyEvent callback
-- @
-- 
-- 
onWidgetSelectionNotifyEvent :: (IsWidget a, MonadIO m) => a -> ((?self :: a) => WidgetSelectionNotifyEventCallback) -> m SignalHandlerId
onWidgetSelectionNotifyEvent :: forall a (m :: * -> *).
(IsWidget a, MonadIO m) =>
a
-> ((?self::a) => WidgetSelectionClearEventCallback)
-> m SignalHandlerId
onWidgetSelectionNotifyEvent a
obj (?self::a) => WidgetSelectionClearEventCallback
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 wrapped :: a -> WidgetSelectionClearEventCallback
wrapped a
self = let ?self = a
?self::a
self in (?self::a) => WidgetSelectionClearEventCallback
WidgetSelectionClearEventCallback
cb
    let wrapped' :: C_WidgetSelectionClearEventCallback
wrapped' = (a -> WidgetSelectionClearEventCallback)
-> C_WidgetSelectionClearEventCallback
forall a.
GObject a =>
(a -> WidgetSelectionClearEventCallback)
-> C_WidgetSelectionClearEventCallback
wrap_WidgetSelectionNotifyEventCallback a -> WidgetSelectionClearEventCallback
wrapped
    FunPtr C_WidgetSelectionClearEventCallback
wrapped'' <- C_WidgetSelectionClearEventCallback
-> IO (FunPtr C_WidgetSelectionClearEventCallback)
mk_WidgetSelectionNotifyEventCallback C_WidgetSelectionClearEventCallback
wrapped'
    a
-> Text
-> FunPtr C_WidgetSelectionClearEventCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj Text
"selection-notify-event" FunPtr C_WidgetSelectionClearEventCallback
wrapped'' SignalConnectMode
SignalConnectBefore Maybe Text
forall a. Maybe a
Nothing

-- | Connect a signal handler for the [selectionNotifyEvent](#signal:selectionNotifyEvent) 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 #selectionNotifyEvent callback
-- @
-- 
-- 
-- 
-- By default the object invoking the signal is not passed to the callback.
-- If you need to access it, you can use the implit @?self@ parameter.
-- Note that this requires activating the @ImplicitParams@ GHC extension.
-- 
afterWidgetSelectionNotifyEvent :: (IsWidget a, MonadIO m) => a -> ((?self :: a) => WidgetSelectionNotifyEventCallback) -> m SignalHandlerId
afterWidgetSelectionNotifyEvent :: forall a (m :: * -> *).
(IsWidget a, MonadIO m) =>
a
-> ((?self::a) => WidgetSelectionClearEventCallback)
-> m SignalHandlerId
afterWidgetSelectionNotifyEvent a
obj (?self::a) => WidgetSelectionClearEventCallback
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 wrapped :: a -> WidgetSelectionClearEventCallback
wrapped a
self = let ?self = a
?self::a
self in (?self::a) => WidgetSelectionClearEventCallback
WidgetSelectionClearEventCallback
cb
    let wrapped' :: C_WidgetSelectionClearEventCallback
wrapped' = (a -> WidgetSelectionClearEventCallback)
-> C_WidgetSelectionClearEventCallback
forall a.
GObject a =>
(a -> WidgetSelectionClearEventCallback)
-> C_WidgetSelectionClearEventCallback
wrap_WidgetSelectionNotifyEventCallback a -> WidgetSelectionClearEventCallback
wrapped
    FunPtr C_WidgetSelectionClearEventCallback
wrapped'' <- C_WidgetSelectionClearEventCallback
-> IO (FunPtr C_WidgetSelectionClearEventCallback)
mk_WidgetSelectionNotifyEventCallback C_WidgetSelectionClearEventCallback
wrapped'
    a
-> Text
-> FunPtr C_WidgetSelectionClearEventCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj Text
"selection-notify-event" FunPtr C_WidgetSelectionClearEventCallback
wrapped'' SignalConnectMode
SignalConnectAfter Maybe Text
forall a. Maybe a
Nothing


#if defined(ENABLE_OVERLOADING)
data WidgetSelectionNotifyEventSignalInfo
instance SignalInfo WidgetSelectionNotifyEventSignalInfo where
    type HaskellCallbackType WidgetSelectionNotifyEventSignalInfo = WidgetSelectionNotifyEventCallback
    connectSignal obj cb connectMode detail = do
        let cb' = wrap_WidgetSelectionNotifyEventCallback cb
        cb'' <- mk_WidgetSelectionNotifyEventCallback cb'
        connectSignalFunPtr obj "selection-notify-event" cb'' connectMode detail
    dbgSignalInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Gtk.Objects.Widget::selection-notify-event"
        , O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-3.0.38/docs/GI-Gtk-Objects-Widget.html#g:signal:selectionNotifyEvent"})

#endif

-- signal Widget::selection-received
-- | /No description available in the introspection data./
type WidgetSelectionReceivedCallback =
    Gtk.SelectionData.SelectionData
    -> Word32
    -> IO ()

type C_WidgetSelectionReceivedCallback =
    Ptr Widget ->                           -- object
    Ptr Gtk.SelectionData.SelectionData ->
    Word32 ->
    Ptr () ->                               -- user_data
    IO ()

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

wrap_WidgetSelectionReceivedCallback :: 
    GObject a => (a -> WidgetSelectionReceivedCallback) ->
    C_WidgetSelectionReceivedCallback
wrap_WidgetSelectionReceivedCallback :: forall a.
GObject a =>
(a -> WidgetSelectionReceivedCallback)
-> C_WidgetSelectionReceivedCallback
wrap_WidgetSelectionReceivedCallback a -> WidgetSelectionReceivedCallback
gi'cb Ptr Widget
gi'selfPtr Ptr SelectionData
data_ Word32
time Ptr ()
_ = do
    Ptr SelectionData -> (SelectionData -> IO ()) -> IO ()
forall a b.
(HasCallStack, ManagedPtrNewtype a) =>
Ptr a -> (a -> IO b) -> IO b
B.ManagedPtr.withTransient  Ptr SelectionData
data_ ((SelectionData -> IO ()) -> IO ())
-> (SelectionData -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \SelectionData
data_' -> do
        Ptr Widget -> (Widget -> IO ()) -> IO ()
forall a b.
(HasCallStack, ManagedPtrNewtype a) =>
Ptr a -> (a -> IO b) -> IO b
B.ManagedPtr.withTransient Ptr Widget
gi'selfPtr ((Widget -> IO ()) -> IO ()) -> (Widget -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Widget
gi'self -> a -> WidgetSelectionReceivedCallback
gi'cb (Widget -> a
Coerce.coerce Widget
gi'self)  SelectionData
data_' Word32
time


-- | Connect a signal handler for the [selectionReceived](#signal:selectionReceived) 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 #selectionReceived callback
-- @
-- 
-- 
onWidgetSelectionReceived :: (IsWidget a, MonadIO m) => a -> ((?self :: a) => WidgetSelectionReceivedCallback) -> m SignalHandlerId
onWidgetSelectionReceived :: forall a (m :: * -> *).
(IsWidget a, MonadIO m) =>
a
-> ((?self::a) => WidgetSelectionReceivedCallback)
-> m SignalHandlerId
onWidgetSelectionReceived a
obj (?self::a) => WidgetSelectionReceivedCallback
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 wrapped :: a -> WidgetSelectionReceivedCallback
wrapped a
self = let ?self = a
?self::a
self in (?self::a) => WidgetSelectionReceivedCallback
WidgetSelectionReceivedCallback
cb
    let wrapped' :: C_WidgetSelectionReceivedCallback
wrapped' = (a -> WidgetSelectionReceivedCallback)
-> C_WidgetSelectionReceivedCallback
forall a.
GObject a =>
(a -> WidgetSelectionReceivedCallback)
-> C_WidgetSelectionReceivedCallback
wrap_WidgetSelectionReceivedCallback a -> WidgetSelectionReceivedCallback
wrapped
    FunPtr C_WidgetSelectionReceivedCallback
wrapped'' <- C_WidgetSelectionReceivedCallback
-> IO (FunPtr C_WidgetSelectionReceivedCallback)
mk_WidgetSelectionReceivedCallback C_WidgetSelectionReceivedCallback
wrapped'
    a
-> Text
-> FunPtr C_WidgetSelectionReceivedCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj Text
"selection-received" FunPtr C_WidgetSelectionReceivedCallback
wrapped'' SignalConnectMode
SignalConnectBefore Maybe Text
forall a. Maybe a
Nothing

-- | Connect a signal handler for the [selectionReceived](#signal:selectionReceived) 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 #selectionReceived callback
-- @
-- 
-- 
-- 
-- By default the object invoking the signal is not passed to the callback.
-- If you need to access it, you can use the implit @?self@ parameter.
-- Note that this requires activating the @ImplicitParams@ GHC extension.
-- 
afterWidgetSelectionReceived :: (IsWidget a, MonadIO m) => a -> ((?self :: a) => WidgetSelectionReceivedCallback) -> m SignalHandlerId
afterWidgetSelectionReceived :: forall a (m :: * -> *).
(IsWidget a, MonadIO m) =>
a
-> ((?self::a) => WidgetSelectionReceivedCallback)
-> m SignalHandlerId
afterWidgetSelectionReceived a
obj (?self::a) => WidgetSelectionReceivedCallback
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 wrapped :: a -> WidgetSelectionReceivedCallback
wrapped a
self = let ?self = a
?self::a
self in (?self::a) => WidgetSelectionReceivedCallback
WidgetSelectionReceivedCallback
cb
    let wrapped' :: C_WidgetSelectionReceivedCallback
wrapped' = (a -> WidgetSelectionReceivedCallback)
-> C_WidgetSelectionReceivedCallback
forall a.
GObject a =>
(a -> WidgetSelectionReceivedCallback)
-> C_WidgetSelectionReceivedCallback
wrap_WidgetSelectionReceivedCallback a -> WidgetSelectionReceivedCallback
wrapped
    FunPtr C_WidgetSelectionReceivedCallback
wrapped'' <- C_WidgetSelectionReceivedCallback
-> IO (FunPtr C_WidgetSelectionReceivedCallback)
mk_WidgetSelectionReceivedCallback C_WidgetSelectionReceivedCallback
wrapped'
    a
-> Text
-> FunPtr C_WidgetSelectionReceivedCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj Text
"selection-received" FunPtr C_WidgetSelectionReceivedCallback
wrapped'' SignalConnectMode
SignalConnectAfter Maybe Text
forall a. Maybe a
Nothing


#if defined(ENABLE_OVERLOADING)
data WidgetSelectionReceivedSignalInfo
instance SignalInfo WidgetSelectionReceivedSignalInfo where
    type HaskellCallbackType WidgetSelectionReceivedSignalInfo = WidgetSelectionReceivedCallback
    connectSignal obj cb connectMode detail = do
        let cb' = wrap_WidgetSelectionReceivedCallback cb
        cb'' <- mk_WidgetSelectionReceivedCallback cb'
        connectSignalFunPtr obj "selection-received" cb'' connectMode detail
    dbgSignalInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Gtk.Objects.Widget::selection-received"
        , O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-3.0.38/docs/GI-Gtk-Objects-Widget.html#g:signal:selectionReceived"})

#endif

-- signal Widget::selection-request-event
-- | The [selectionRequestEvent](#g:signal:selectionRequestEvent) signal will be emitted when
-- another client requests ownership of the selection owned by
-- the /@widget@/\'s window.
type WidgetSelectionRequestEventCallback =
    Gdk.EventSelection.EventSelection
    -- ^ /@event@/: the t'GI.Gdk.Structs.EventSelection.EventSelection' which triggered
    --   this signal.
    -> IO Bool
    -- ^ __Returns:__ 'P.True' to stop other handlers from being invoked for the event.
    --   'P.False' to propagate the event further.

type C_WidgetSelectionRequestEventCallback =
    Ptr Widget ->                           -- object
    Ptr Gdk.EventSelection.EventSelection ->
    Ptr () ->                               -- user_data
    IO CInt

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

wrap_WidgetSelectionRequestEventCallback :: 
    GObject a => (a -> WidgetSelectionRequestEventCallback) ->
    C_WidgetSelectionRequestEventCallback
wrap_WidgetSelectionRequestEventCallback :: forall a.
GObject a =>
(a -> WidgetSelectionClearEventCallback)
-> C_WidgetSelectionClearEventCallback
wrap_WidgetSelectionRequestEventCallback a -> WidgetSelectionClearEventCallback
gi'cb Ptr Widget
gi'selfPtr Ptr EventSelection
event Ptr ()
_ = do
    EventSelection
event' <- ((ManagedPtr EventSelection -> EventSelection)
-> Ptr EventSelection -> IO EventSelection
forall a.
(HasCallStack, BoxedPtr a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
newPtr ManagedPtr EventSelection -> EventSelection
Gdk.EventSelection.EventSelection) Ptr EventSelection
event
    Bool
result <- Ptr Widget -> (Widget -> IO Bool) -> IO Bool
forall a b.
(HasCallStack, ManagedPtrNewtype a) =>
Ptr a -> (a -> IO b) -> IO b
B.ManagedPtr.withTransient Ptr Widget
gi'selfPtr ((Widget -> IO Bool) -> IO Bool) -> (Widget -> IO Bool) -> IO Bool
forall a b. (a -> b) -> a -> b
$ \Widget
gi'self -> a -> WidgetSelectionClearEventCallback
gi'cb (Widget -> a
Coerce.coerce Widget
gi'self)  EventSelection
event'
    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 [selectionRequestEvent](#signal:selectionRequestEvent) 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 #selectionRequestEvent callback
-- @
-- 
-- 
onWidgetSelectionRequestEvent :: (IsWidget a, MonadIO m) => a -> ((?self :: a) => WidgetSelectionRequestEventCallback) -> m SignalHandlerId
onWidgetSelectionRequestEvent :: forall a (m :: * -> *).
(IsWidget a, MonadIO m) =>
a
-> ((?self::a) => WidgetSelectionClearEventCallback)
-> m SignalHandlerId
onWidgetSelectionRequestEvent a
obj (?self::a) => WidgetSelectionClearEventCallback
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 wrapped :: a -> WidgetSelectionClearEventCallback
wrapped a
self = let ?self = a
?self::a
self in (?self::a) => WidgetSelectionClearEventCallback
WidgetSelectionClearEventCallback
cb
    let wrapped' :: C_WidgetSelectionClearEventCallback
wrapped' = (a -> WidgetSelectionClearEventCallback)
-> C_WidgetSelectionClearEventCallback
forall a.
GObject a =>
(a -> WidgetSelectionClearEventCallback)
-> C_WidgetSelectionClearEventCallback
wrap_WidgetSelectionRequestEventCallback a -> WidgetSelectionClearEventCallback
wrapped
    FunPtr C_WidgetSelectionClearEventCallback
wrapped'' <- C_WidgetSelectionClearEventCallback
-> IO (FunPtr C_WidgetSelectionClearEventCallback)
mk_WidgetSelectionRequestEventCallback C_WidgetSelectionClearEventCallback
wrapped'
    a
-> Text
-> FunPtr C_WidgetSelectionClearEventCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj Text
"selection-request-event" FunPtr C_WidgetSelectionClearEventCallback
wrapped'' SignalConnectMode
SignalConnectBefore Maybe Text
forall a. Maybe a
Nothing

-- | Connect a signal handler for the [selectionRequestEvent](#signal:selectionRequestEvent) 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 #selectionRequestEvent callback
-- @
-- 
-- 
-- 
-- By default the object invoking the signal is not passed to the callback.
-- If you need to access it, you can use the implit @?self@ parameter.
-- Note that this requires activating the @ImplicitParams@ GHC extension.
-- 
afterWidgetSelectionRequestEvent :: (IsWidget a, MonadIO m) => a -> ((?self :: a) => WidgetSelectionRequestEventCallback) -> m SignalHandlerId
afterWidgetSelectionRequestEvent :: forall a (m :: * -> *).
(IsWidget a, MonadIO m) =>
a
-> ((?self::a) => WidgetSelectionClearEventCallback)
-> m SignalHandlerId
afterWidgetSelectionRequestEvent a
obj (?self::a) => WidgetSelectionClearEventCallback
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 wrapped :: a -> WidgetSelectionClearEventCallback
wrapped a
self = let ?self = a
?self::a
self in (?self::a) => WidgetSelectionClearEventCallback
WidgetSelectionClearEventCallback
cb
    let wrapped' :: C_WidgetSelectionClearEventCallback
wrapped' = (a -> WidgetSelectionClearEventCallback)
-> C_WidgetSelectionClearEventCallback
forall a.
GObject a =>
(a -> WidgetSelectionClearEventCallback)
-> C_WidgetSelectionClearEventCallback
wrap_WidgetSelectionRequestEventCallback a -> WidgetSelectionClearEventCallback
wrapped
    FunPtr C_WidgetSelectionClearEventCallback
wrapped'' <- C_WidgetSelectionClearEventCallback
-> IO (FunPtr C_WidgetSelectionClearEventCallback)
mk_WidgetSelectionRequestEventCallback C_WidgetSelectionClearEventCallback
wrapped'
    a
-> Text
-> FunPtr C_WidgetSelectionClearEventCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj Text
"selection-request-event" FunPtr C_WidgetSelectionClearEventCallback
wrapped'' SignalConnectMode
SignalConnectAfter Maybe Text
forall a. Maybe a
Nothing


#if defined(ENABLE_OVERLOADING)
data WidgetSelectionRequestEventSignalInfo
instance SignalInfo WidgetSelectionRequestEventSignalInfo where
    type HaskellCallbackType WidgetSelectionRequestEventSignalInfo = WidgetSelectionRequestEventCallback
    connectSignal obj cb connectMode detail = do
        let cb' = wrap_WidgetSelectionRequestEventCallback cb
        cb'' <- mk_WidgetSelectionRequestEventCallback cb'
        connectSignalFunPtr obj "selection-request-event" cb'' connectMode detail
    dbgSignalInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Gtk.Objects.Widget::selection-request-event"
        , O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-3.0.38/docs/GI-Gtk-Objects-Widget.html#g:signal:selectionRequestEvent"})

#endif

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

type C_WidgetShowCallback =
    Ptr Widget ->                           -- 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_WidgetShowCallback :: 
    GObject a => (a -> WidgetShowCallback) ->
    C_WidgetShowCallback
wrap_WidgetShowCallback :: forall a.
GObject a =>
(a -> IO ()) -> C_WidgetAccelClosuresChangedCallback
wrap_WidgetShowCallback a -> IO ()
gi'cb Ptr Widget
gi'selfPtr Ptr ()
_ = do
    Ptr Widget -> (Widget -> IO ()) -> IO ()
forall a b.
(HasCallStack, ManagedPtrNewtype a) =>
Ptr a -> (a -> IO b) -> IO b
B.ManagedPtr.withTransient Ptr Widget
gi'selfPtr ((Widget -> IO ()) -> IO ()) -> (Widget -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Widget
gi'self -> a -> IO ()
gi'cb (Widget -> a
Coerce.coerce Widget
gi'self) 


-- | 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 -> ((?self :: a) => WidgetShowCallback) -> m SignalHandlerId
onWidgetShow :: forall a (m :: * -> *).
(IsWidget a, MonadIO m) =>
a -> ((?self::a) => IO ()) -> m SignalHandlerId
onWidgetShow a
obj (?self::a) => 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 wrapped :: a -> IO ()
wrapped a
self = let ?self = a
?self::a
self in IO ()
(?self::a) => IO ()
cb
    let wrapped' :: C_WidgetAccelClosuresChangedCallback
wrapped' = (a -> IO ()) -> C_WidgetAccelClosuresChangedCallback
forall a.
GObject a =>
(a -> IO ()) -> C_WidgetAccelClosuresChangedCallback
wrap_WidgetShowCallback a -> IO ()
wrapped
    FunPtr C_WidgetAccelClosuresChangedCallback
wrapped'' <- C_WidgetAccelClosuresChangedCallback
-> IO (FunPtr C_WidgetAccelClosuresChangedCallback)
mk_WidgetShowCallback C_WidgetAccelClosuresChangedCallback
wrapped'
    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 Text
"show" FunPtr C_WidgetAccelClosuresChangedCallback
wrapped'' 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
-- @
-- 
-- 
-- 
-- By default the object invoking the signal is not passed to the callback.
-- If you need to access it, you can use the implit @?self@ parameter.
-- Note that this requires activating the @ImplicitParams@ GHC extension.
-- 
afterWidgetShow :: (IsWidget a, MonadIO m) => a -> ((?self :: a) => WidgetShowCallback) -> m SignalHandlerId
afterWidgetShow :: forall a (m :: * -> *).
(IsWidget a, MonadIO m) =>
a -> ((?self::a) => IO ()) -> m SignalHandlerId
afterWidgetShow a
obj (?self::a) => 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 wrapped :: a -> IO ()
wrapped a
self = let ?self = a
?self::a
self in IO ()
(?self::a) => IO ()
cb
    let wrapped' :: C_WidgetAccelClosuresChangedCallback
wrapped' = (a -> IO ()) -> C_WidgetAccelClosuresChangedCallback
forall a.
GObject a =>
(a -> IO ()) -> C_WidgetAccelClosuresChangedCallback
wrap_WidgetShowCallback a -> IO ()
wrapped
    FunPtr C_WidgetAccelClosuresChangedCallback
wrapped'' <- C_WidgetAccelClosuresChangedCallback
-> IO (FunPtr C_WidgetAccelClosuresChangedCallback)
mk_WidgetShowCallback C_WidgetAccelClosuresChangedCallback
wrapped'
    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 Text
"show" FunPtr C_WidgetAccelClosuresChangedCallback
wrapped'' 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
    dbgSignalInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Gtk.Objects.Widget::show"
        , O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-3.0.38/docs/GI-Gtk-Objects-Widget.html#g:signal:show"})

#endif

-- signal Widget::show-help
-- | /No description available in the introspection data./
type WidgetShowHelpCallback =
    Gtk.Enums.WidgetHelpType
    -> IO Bool
    -- ^ __Returns:__ 'P.True' to stop other handlers from being invoked for the event.
    -- 'P.False' to propagate the event further.

type C_WidgetShowHelpCallback =
    Ptr Widget ->                           -- object
    CUInt ->
    Ptr () ->                               -- user_data
    IO CInt

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

wrap_WidgetShowHelpCallback :: 
    GObject a => (a -> WidgetShowHelpCallback) ->
    C_WidgetShowHelpCallback
wrap_WidgetShowHelpCallback :: forall a.
GObject a =>
(a -> WidgetShowHelpCallback) -> C_WidgetFocusCallback
wrap_WidgetShowHelpCallback a -> WidgetShowHelpCallback
gi'cb Ptr Widget
gi'selfPtr CUInt
helpType Ptr ()
_ = do
    let helpType' :: WidgetHelpType
helpType' = (Int -> WidgetHelpType
forall a. Enum a => Int -> a
toEnum (Int -> WidgetHelpType)
-> (CUInt -> Int) -> CUInt -> WidgetHelpType
forall b c a. (b -> c) -> (a -> b) -> a -> c
. CUInt -> Int
forall a b. (Integral a, Num b) => a -> b
fromIntegral) CUInt
helpType
    Bool
result <- Ptr Widget -> (Widget -> IO Bool) -> IO Bool
forall a b.
(HasCallStack, ManagedPtrNewtype a) =>
Ptr a -> (a -> IO b) -> IO b
B.ManagedPtr.withTransient Ptr Widget
gi'selfPtr ((Widget -> IO Bool) -> IO Bool) -> (Widget -> IO Bool) -> IO Bool
forall a b. (a -> b) -> a -> b
$ \Widget
gi'self -> a -> WidgetShowHelpCallback
gi'cb (Widget -> a
Coerce.coerce Widget
gi'self)  WidgetHelpType
helpType'
    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 [showHelp](#signal:showHelp) 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 #showHelp callback
-- @
-- 
-- 
onWidgetShowHelp :: (IsWidget a, MonadIO m) => a -> ((?self :: a) => WidgetShowHelpCallback) -> m SignalHandlerId
onWidgetShowHelp :: forall a (m :: * -> *).
(IsWidget a, MonadIO m) =>
a -> ((?self::a) => WidgetShowHelpCallback) -> m SignalHandlerId
onWidgetShowHelp a
obj (?self::a) => WidgetShowHelpCallback
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 wrapped :: a -> WidgetShowHelpCallback
wrapped a
self = let ?self = a
?self::a
self in (?self::a) => WidgetShowHelpCallback
WidgetShowHelpCallback
cb
    let wrapped' :: C_WidgetFocusCallback
wrapped' = (a -> WidgetShowHelpCallback) -> C_WidgetFocusCallback
forall a.
GObject a =>
(a -> WidgetShowHelpCallback) -> C_WidgetFocusCallback
wrap_WidgetShowHelpCallback a -> WidgetShowHelpCallback
wrapped
    FunPtr C_WidgetFocusCallback
wrapped'' <- C_WidgetFocusCallback -> IO (FunPtr C_WidgetFocusCallback)
mk_WidgetShowHelpCallback C_WidgetFocusCallback
wrapped'
    a
-> Text
-> FunPtr C_WidgetFocusCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj Text
"show-help" FunPtr C_WidgetFocusCallback
wrapped'' SignalConnectMode
SignalConnectBefore Maybe Text
forall a. Maybe a
Nothing

-- | Connect a signal handler for the [showHelp](#signal:showHelp) 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 #showHelp callback
-- @
-- 
-- 
-- 
-- By default the object invoking the signal is not passed to the callback.
-- If you need to access it, you can use the implit @?self@ parameter.
-- Note that this requires activating the @ImplicitParams@ GHC extension.
-- 
afterWidgetShowHelp :: (IsWidget a, MonadIO m) => a -> ((?self :: a) => WidgetShowHelpCallback) -> m SignalHandlerId
afterWidgetShowHelp :: forall a (m :: * -> *).
(IsWidget a, MonadIO m) =>
a -> ((?self::a) => WidgetShowHelpCallback) -> m SignalHandlerId
afterWidgetShowHelp a
obj (?self::a) => WidgetShowHelpCallback
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 wrapped :: a -> WidgetShowHelpCallback
wrapped a
self = let ?self = a
?self::a
self in (?self::a) => WidgetShowHelpCallback
WidgetShowHelpCallback
cb
    let wrapped' :: C_WidgetFocusCallback
wrapped' = (a -> WidgetShowHelpCallback) -> C_WidgetFocusCallback
forall a.
GObject a =>
(a -> WidgetShowHelpCallback) -> C_WidgetFocusCallback
wrap_WidgetShowHelpCallback a -> WidgetShowHelpCallback
wrapped
    FunPtr C_WidgetFocusCallback
wrapped'' <- C_WidgetFocusCallback -> IO (FunPtr C_WidgetFocusCallback)
mk_WidgetShowHelpCallback C_WidgetFocusCallback
wrapped'
    a
-> Text
-> FunPtr C_WidgetFocusCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj Text
"show-help" FunPtr C_WidgetFocusCallback
wrapped'' SignalConnectMode
SignalConnectAfter Maybe Text
forall a. Maybe a
Nothing


#if defined(ENABLE_OVERLOADING)
data WidgetShowHelpSignalInfo
instance SignalInfo WidgetShowHelpSignalInfo where
    type HaskellCallbackType WidgetShowHelpSignalInfo = WidgetShowHelpCallback
    connectSignal obj cb connectMode detail = do
        let cb' = wrap_WidgetShowHelpCallback cb
        cb'' <- mk_WidgetShowHelpCallback cb'
        connectSignalFunPtr obj "show-help" cb'' connectMode detail
    dbgSignalInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Gtk.Objects.Widget::show-help"
        , O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-3.0.38/docs/GI-Gtk-Objects-Widget.html#g:signal:showHelp"})

#endif

-- signal Widget::size-allocate
-- | /No description available in the introspection data./
type WidgetSizeAllocateCallback =
    Gdk.Rectangle.Rectangle
    -- ^ /@allocation@/: the region which has been
    --   allocated to the widget.
    -> IO ()

type C_WidgetSizeAllocateCallback =
    Ptr Widget ->                           -- object
    Ptr Gdk.Rectangle.Rectangle ->
    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_WidgetSizeAllocateCallback :: 
    GObject a => (a -> WidgetSizeAllocateCallback) ->
    C_WidgetSizeAllocateCallback
wrap_WidgetSizeAllocateCallback :: forall a.
GObject a =>
(a -> WidgetSizeAllocateCallback) -> C_WidgetSizeAllocateCallback
wrap_WidgetSizeAllocateCallback a -> WidgetSizeAllocateCallback
gi'cb Ptr Widget
gi'selfPtr Ptr Rectangle
allocation Ptr ()
_ = do
    Ptr Rectangle -> WidgetSizeAllocateCallback -> IO ()
forall a b.
(HasCallStack, ManagedPtrNewtype a) =>
Ptr a -> (a -> IO b) -> IO b
B.ManagedPtr.withTransient  Ptr Rectangle
allocation (WidgetSizeAllocateCallback -> IO ())
-> WidgetSizeAllocateCallback -> IO ()
forall a b. (a -> b) -> a -> b
$ \Rectangle
allocation' -> do
        Ptr Widget -> (Widget -> IO ()) -> IO ()
forall a b.
(HasCallStack, ManagedPtrNewtype a) =>
Ptr a -> (a -> IO b) -> IO b
B.ManagedPtr.withTransient Ptr Widget
gi'selfPtr ((Widget -> IO ()) -> IO ()) -> (Widget -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Widget
gi'self -> a -> WidgetSizeAllocateCallback
gi'cb (Widget -> a
Coerce.coerce Widget
gi'self)  Rectangle
allocation'


-- | 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 -> ((?self :: a) => WidgetSizeAllocateCallback) -> m SignalHandlerId
onWidgetSizeAllocate :: forall a (m :: * -> *).
(IsWidget a, MonadIO m) =>
a
-> ((?self::a) => WidgetSizeAllocateCallback) -> m SignalHandlerId
onWidgetSizeAllocate a
obj (?self::a) => 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 wrapped :: a -> WidgetSizeAllocateCallback
wrapped a
self = let ?self = a
?self::a
self in (?self::a) => WidgetSizeAllocateCallback
WidgetSizeAllocateCallback
cb
    let wrapped' :: C_WidgetSizeAllocateCallback
wrapped' = (a -> WidgetSizeAllocateCallback) -> C_WidgetSizeAllocateCallback
forall a.
GObject a =>
(a -> WidgetSizeAllocateCallback) -> C_WidgetSizeAllocateCallback
wrap_WidgetSizeAllocateCallback a -> WidgetSizeAllocateCallback
wrapped
    FunPtr C_WidgetSizeAllocateCallback
wrapped'' <- C_WidgetSizeAllocateCallback
-> IO (FunPtr C_WidgetSizeAllocateCallback)
mk_WidgetSizeAllocateCallback C_WidgetSizeAllocateCallback
wrapped'
    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 Text
"size-allocate" FunPtr C_WidgetSizeAllocateCallback
wrapped'' 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
-- @
-- 
-- 
-- 
-- By default the object invoking the signal is not passed to the callback.
-- If you need to access it, you can use the implit @?self@ parameter.
-- Note that this requires activating the @ImplicitParams@ GHC extension.
-- 
afterWidgetSizeAllocate :: (IsWidget a, MonadIO m) => a -> ((?self :: a) => WidgetSizeAllocateCallback) -> m SignalHandlerId
afterWidgetSizeAllocate :: forall a (m :: * -> *).
(IsWidget a, MonadIO m) =>
a
-> ((?self::a) => WidgetSizeAllocateCallback) -> m SignalHandlerId
afterWidgetSizeAllocate a
obj (?self::a) => 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 wrapped :: a -> WidgetSizeAllocateCallback
wrapped a
self = let ?self = a
?self::a
self in (?self::a) => WidgetSizeAllocateCallback
WidgetSizeAllocateCallback
cb
    let wrapped' :: C_WidgetSizeAllocateCallback
wrapped' = (a -> WidgetSizeAllocateCallback) -> C_WidgetSizeAllocateCallback
forall a.
GObject a =>
(a -> WidgetSizeAllocateCallback) -> C_WidgetSizeAllocateCallback
wrap_WidgetSizeAllocateCallback a -> WidgetSizeAllocateCallback
wrapped
    FunPtr C_WidgetSizeAllocateCallback
wrapped'' <- C_WidgetSizeAllocateCallback
-> IO (FunPtr C_WidgetSizeAllocateCallback)
mk_WidgetSizeAllocateCallback C_WidgetSizeAllocateCallback
wrapped'
    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 Text
"size-allocate" FunPtr C_WidgetSizeAllocateCallback
wrapped'' 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
    dbgSignalInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Gtk.Objects.Widget::size-allocate"
        , O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-3.0.38/docs/GI-Gtk-Objects-Widget.html#g:signal:sizeAllocate"})

#endif

-- signal Widget::state-changed
{-# DEPRECATED WidgetStateChangedCallback ["(Since version 3.0)","Use [stateFlagsChanged](\"GI.Gtk.Objects.Widget#g:signal:stateFlagsChanged\") instead."] #-}
-- | The [stateChanged](#g:signal:stateChanged) signal is emitted when the widget state changes.
-- See 'GI.Gtk.Objects.Widget.widgetGetState'.
type WidgetStateChangedCallback =
    Gtk.Enums.StateType
    -- ^ /@state@/: the previous state
    -> IO ()

type C_WidgetStateChangedCallback =
    Ptr Widget ->                           -- object
    CUInt ->
    Ptr () ->                               -- user_data
    IO ()

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

wrap_WidgetStateChangedCallback :: 
    GObject a => (a -> WidgetStateChangedCallback) ->
    C_WidgetStateChangedCallback
wrap_WidgetStateChangedCallback :: forall a.
GObject a =>
(a -> WidgetStateChangedCallback)
-> C_WidgetDirectionChangedCallback
wrap_WidgetStateChangedCallback a -> WidgetStateChangedCallback
gi'cb Ptr Widget
gi'selfPtr CUInt
state Ptr ()
_ = do
    let state' :: StateType
state' = (Int -> StateType
forall a. Enum a => Int -> a
toEnum (Int -> StateType) -> (CUInt -> Int) -> CUInt -> StateType
forall b c a. (b -> c) -> (a -> b) -> a -> c
. CUInt -> Int
forall a b. (Integral a, Num b) => a -> b
fromIntegral) CUInt
state
    Ptr Widget -> (Widget -> IO ()) -> IO ()
forall a b.
(HasCallStack, ManagedPtrNewtype a) =>
Ptr a -> (a -> IO b) -> IO b
B.ManagedPtr.withTransient Ptr Widget
gi'selfPtr ((Widget -> IO ()) -> IO ()) -> (Widget -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Widget
gi'self -> a -> WidgetStateChangedCallback
gi'cb (Widget -> a
Coerce.coerce Widget
gi'self)  StateType
state'


-- | Connect a signal handler for the [stateChanged](#signal:stateChanged) 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 #stateChanged callback
-- @
-- 
-- 
onWidgetStateChanged :: (IsWidget a, MonadIO m) => a -> ((?self :: a) => WidgetStateChangedCallback) -> m SignalHandlerId
onWidgetStateChanged :: forall a (m :: * -> *).
(IsWidget a, MonadIO m) =>
a
-> ((?self::a) => WidgetStateChangedCallback) -> m SignalHandlerId
onWidgetStateChanged a
obj (?self::a) => WidgetStateChangedCallback
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 wrapped :: a -> WidgetStateChangedCallback
wrapped a
self = let ?self = a
?self::a
self in (?self::a) => WidgetStateChangedCallback
WidgetStateChangedCallback
cb
    let wrapped' :: C_WidgetDirectionChangedCallback
wrapped' = (a -> WidgetStateChangedCallback)
-> C_WidgetDirectionChangedCallback
forall a.
GObject a =>
(a -> WidgetStateChangedCallback)
-> C_WidgetDirectionChangedCallback
wrap_WidgetStateChangedCallback a -> WidgetStateChangedCallback
wrapped
    FunPtr C_WidgetDirectionChangedCallback
wrapped'' <- C_WidgetDirectionChangedCallback
-> IO (FunPtr C_WidgetDirectionChangedCallback)
mk_WidgetStateChangedCallback C_WidgetDirectionChangedCallback
wrapped'
    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 Text
"state-changed" FunPtr C_WidgetDirectionChangedCallback
wrapped'' SignalConnectMode
SignalConnectBefore Maybe Text
forall a. Maybe a
Nothing

-- | Connect a signal handler for the [stateChanged](#signal:stateChanged) 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 #stateChanged callback
-- @
-- 
-- 
-- 
-- By default the object invoking the signal is not passed to the callback.
-- If you need to access it, you can use the implit @?self@ parameter.
-- Note that this requires activating the @ImplicitParams@ GHC extension.
-- 
afterWidgetStateChanged :: (IsWidget a, MonadIO m) => a -> ((?self :: a) => WidgetStateChangedCallback) -> m SignalHandlerId
afterWidgetStateChanged :: forall a (m :: * -> *).
(IsWidget a, MonadIO m) =>
a
-> ((?self::a) => WidgetStateChangedCallback) -> m SignalHandlerId
afterWidgetStateChanged a
obj (?self::a) => WidgetStateChangedCallback
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 wrapped :: a -> WidgetStateChangedCallback
wrapped a
self = let ?self = a
?self::a
self in (?self::a) => WidgetStateChangedCallback
WidgetStateChangedCallback
cb
    let wrapped' :: C_WidgetDirectionChangedCallback
wrapped' = (a -> WidgetStateChangedCallback)
-> C_WidgetDirectionChangedCallback
forall a.
GObject a =>
(a -> WidgetStateChangedCallback)
-> C_WidgetDirectionChangedCallback
wrap_WidgetStateChangedCallback a -> WidgetStateChangedCallback
wrapped
    FunPtr C_WidgetDirectionChangedCallback
wrapped'' <- C_WidgetDirectionChangedCallback
-> IO (FunPtr C_WidgetDirectionChangedCallback)
mk_WidgetStateChangedCallback C_WidgetDirectionChangedCallback
wrapped'
    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 Text
"state-changed" FunPtr C_WidgetDirectionChangedCallback
wrapped'' SignalConnectMode
SignalConnectAfter Maybe Text
forall a. Maybe a
Nothing


#if defined(ENABLE_OVERLOADING)
data WidgetStateChangedSignalInfo
instance SignalInfo WidgetStateChangedSignalInfo where
    type HaskellCallbackType WidgetStateChangedSignalInfo = WidgetStateChangedCallback
    connectSignal obj cb connectMode detail = do
        let cb' = wrap_WidgetStateChangedCallback cb
        cb'' <- mk_WidgetStateChangedCallback cb'
        connectSignalFunPtr obj "state-changed" cb'' connectMode detail
    dbgSignalInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Gtk.Objects.Widget::state-changed"
        , O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-3.0.38/docs/GI-Gtk-Objects-Widget.html#g:signal:stateChanged"})

#endif

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

type C_WidgetStateFlagsChangedCallback =
    Ptr Widget ->                           -- 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_WidgetStateFlagsChangedCallback :: 
    GObject a => (a -> WidgetStateFlagsChangedCallback) ->
    C_WidgetStateFlagsChangedCallback
wrap_WidgetStateFlagsChangedCallback :: forall a.
GObject a =>
(a -> WidgetStateFlagsChangedCallback)
-> C_WidgetDirectionChangedCallback
wrap_WidgetStateFlagsChangedCallback a -> WidgetStateFlagsChangedCallback
gi'cb Ptr Widget
gi'selfPtr CUInt
flags Ptr ()
_ = do
    let flags' :: [StateFlags]
flags' = CUInt -> [StateFlags]
forall a b. (Storable a, Integral a, Bits a, IsGFlag b) => a -> [b]
wordToGFlags CUInt
flags
    Ptr Widget -> (Widget -> IO ()) -> IO ()
forall a b.
(HasCallStack, ManagedPtrNewtype a) =>
Ptr a -> (a -> IO b) -> IO b
B.ManagedPtr.withTransient Ptr Widget
gi'selfPtr ((Widget -> IO ()) -> IO ()) -> (Widget -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Widget
gi'self -> a -> WidgetStateFlagsChangedCallback
gi'cb (Widget -> a
Coerce.coerce Widget
gi'self)  [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 -> ((?self :: a) => WidgetStateFlagsChangedCallback) -> m SignalHandlerId
onWidgetStateFlagsChanged :: forall a (m :: * -> *).
(IsWidget a, MonadIO m) =>
a
-> ((?self::a) => WidgetStateFlagsChangedCallback)
-> m SignalHandlerId
onWidgetStateFlagsChanged a
obj (?self::a) => 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 wrapped :: a -> WidgetStateFlagsChangedCallback
wrapped a
self = let ?self = a
?self::a
self in (?self::a) => WidgetStateFlagsChangedCallback
WidgetStateFlagsChangedCallback
cb
    let wrapped' :: C_WidgetDirectionChangedCallback
wrapped' = (a -> WidgetStateFlagsChangedCallback)
-> C_WidgetDirectionChangedCallback
forall a.
GObject a =>
(a -> WidgetStateFlagsChangedCallback)
-> C_WidgetDirectionChangedCallback
wrap_WidgetStateFlagsChangedCallback a -> WidgetStateFlagsChangedCallback
wrapped
    FunPtr C_WidgetDirectionChangedCallback
wrapped'' <- C_WidgetDirectionChangedCallback
-> IO (FunPtr C_WidgetDirectionChangedCallback)
mk_WidgetStateFlagsChangedCallback C_WidgetDirectionChangedCallback
wrapped'
    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 Text
"state-flags-changed" FunPtr C_WidgetDirectionChangedCallback
wrapped'' 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
-- @
-- 
-- 
-- 
-- By default the object invoking the signal is not passed to the callback.
-- If you need to access it, you can use the implit @?self@ parameter.
-- Note that this requires activating the @ImplicitParams@ GHC extension.
-- 
afterWidgetStateFlagsChanged :: (IsWidget a, MonadIO m) => a -> ((?self :: a) => WidgetStateFlagsChangedCallback) -> m SignalHandlerId
afterWidgetStateFlagsChanged :: forall a (m :: * -> *).
(IsWidget a, MonadIO m) =>
a
-> ((?self::a) => WidgetStateFlagsChangedCallback)
-> m SignalHandlerId
afterWidgetStateFlagsChanged a
obj (?self::a) => 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 wrapped :: a -> WidgetStateFlagsChangedCallback
wrapped a
self = let ?self = a
?self::a
self in (?self::a) => WidgetStateFlagsChangedCallback
WidgetStateFlagsChangedCallback
cb
    let wrapped' :: C_WidgetDirectionChangedCallback
wrapped' = (a -> WidgetStateFlagsChangedCallback)
-> C_WidgetDirectionChangedCallback
forall a.
GObject a =>
(a -> WidgetStateFlagsChangedCallback)
-> C_WidgetDirectionChangedCallback
wrap_WidgetStateFlagsChangedCallback a -> WidgetStateFlagsChangedCallback
wrapped
    FunPtr C_WidgetDirectionChangedCallback
wrapped'' <- C_WidgetDirectionChangedCallback
-> IO (FunPtr C_WidgetDirectionChangedCallback)
mk_WidgetStateFlagsChangedCallback C_WidgetDirectionChangedCallback
wrapped'
    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 Text
"state-flags-changed" FunPtr C_WidgetDirectionChangedCallback
wrapped'' 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
    dbgSignalInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Gtk.Objects.Widget::state-flags-changed"
        , O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-3.0.38/docs/GI-Gtk-Objects-Widget.html#g:signal:stateFlagsChanged"})

#endif

-- signal Widget::style-set
{-# DEPRECATED WidgetStyleSetCallback ["(Since version 3.0)","Use the [styleUpdated](\"GI.Gtk.Objects.Widget#g:signal:styleUpdated\") signal"] #-}
-- | The [styleSet](#g:signal:styleSet) signal is emitted when a new style has been set
-- on a widget. Note that style-modifying functions like
-- 'GI.Gtk.Objects.Widget.widgetModifyBase' also cause this signal to be emitted.
-- 
-- Note that this signal is emitted for changes to the deprecated
-- t'GI.Gtk.Objects.Style.Style'. To track changes to the t'GI.Gtk.Objects.StyleContext.StyleContext' associated
-- with a widget, use the [styleUpdated]("GI.Gtk.Objects.Widget#g:signal:styleUpdated") signal.
type WidgetStyleSetCallback =
    Maybe Gtk.Style.Style
    -- ^ /@previousStyle@/: the previous style, or 'P.Nothing' if the widget
    --   just got its initial style
    -> IO ()

type C_WidgetStyleSetCallback =
    Ptr Widget ->                           -- object
    Ptr Gtk.Style.Style ->
    Ptr () ->                               -- user_data
    IO ()

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

wrap_WidgetStyleSetCallback :: 
    GObject a => (a -> WidgetStyleSetCallback) ->
    C_WidgetStyleSetCallback
wrap_WidgetStyleSetCallback :: forall a.
GObject a =>
(a -> WidgetStyleSetCallback) -> C_WidgetStyleSetCallback
wrap_WidgetStyleSetCallback a -> WidgetStyleSetCallback
gi'cb Ptr Widget
gi'selfPtr Ptr Style
previousStyle Ptr ()
_ = do
    Maybe Style
maybePreviousStyle <-
        if Ptr Style
previousStyle Ptr Style -> Ptr Style -> Bool
forall a. Eq a => a -> a -> Bool
== Ptr Style
forall a. Ptr a
nullPtr
        then Maybe Style -> IO (Maybe Style)
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe Style
forall a. Maybe a
Nothing
        else do
            Style
previousStyle' <- ((ManagedPtr Style -> Style) -> Ptr Style -> IO Style
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr Style -> Style
Gtk.Style.Style) Ptr Style
previousStyle
            Maybe Style -> IO (Maybe Style)
forall (m :: * -> *) a. Monad m => a -> m a
return (Maybe Style -> IO (Maybe Style))
-> Maybe Style -> IO (Maybe Style)
forall a b. (a -> b) -> a -> b
$ Style -> Maybe Style
forall a. a -> Maybe a
Just Style
previousStyle'
    Ptr Widget -> (Widget -> IO ()) -> IO ()
forall a b.
(HasCallStack, ManagedPtrNewtype a) =>
Ptr a -> (a -> IO b) -> IO b
B.ManagedPtr.withTransient Ptr Widget
gi'selfPtr ((Widget -> IO ()) -> IO ()) -> (Widget -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Widget
gi'self -> a -> WidgetStyleSetCallback
gi'cb (Widget -> a
Coerce.coerce Widget
gi'self)  Maybe Style
maybePreviousStyle


-- | Connect a signal handler for the [styleSet](#signal:styleSet) 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 #styleSet callback
-- @
-- 
-- 
onWidgetStyleSet :: (IsWidget a, MonadIO m) => a -> ((?self :: a) => WidgetStyleSetCallback) -> m SignalHandlerId
onWidgetStyleSet :: forall a (m :: * -> *).
(IsWidget a, MonadIO m) =>
a -> ((?self::a) => WidgetStyleSetCallback) -> m SignalHandlerId
onWidgetStyleSet a
obj (?self::a) => WidgetStyleSetCallback
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 wrapped :: a -> WidgetStyleSetCallback
wrapped a
self = let ?self = a
?self::a
self in (?self::a) => WidgetStyleSetCallback
WidgetStyleSetCallback
cb
    let wrapped' :: C_WidgetStyleSetCallback
wrapped' = (a -> WidgetStyleSetCallback) -> C_WidgetStyleSetCallback
forall a.
GObject a =>
(a -> WidgetStyleSetCallback) -> C_WidgetStyleSetCallback
wrap_WidgetStyleSetCallback a -> WidgetStyleSetCallback
wrapped
    FunPtr C_WidgetStyleSetCallback
wrapped'' <- C_WidgetStyleSetCallback -> IO (FunPtr C_WidgetStyleSetCallback)
mk_WidgetStyleSetCallback C_WidgetStyleSetCallback
wrapped'
    a
-> Text
-> FunPtr C_WidgetStyleSetCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj Text
"style-set" FunPtr C_WidgetStyleSetCallback
wrapped'' SignalConnectMode
SignalConnectBefore Maybe Text
forall a. Maybe a
Nothing

-- | Connect a signal handler for the [styleSet](#signal:styleSet) 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 #styleSet callback
-- @
-- 
-- 
-- 
-- By default the object invoking the signal is not passed to the callback.
-- If you need to access it, you can use the implit @?self@ parameter.
-- Note that this requires activating the @ImplicitParams@ GHC extension.
-- 
afterWidgetStyleSet :: (IsWidget a, MonadIO m) => a -> ((?self :: a) => WidgetStyleSetCallback) -> m SignalHandlerId
afterWidgetStyleSet :: forall a (m :: * -> *).
(IsWidget a, MonadIO m) =>
a -> ((?self::a) => WidgetStyleSetCallback) -> m SignalHandlerId
afterWidgetStyleSet a
obj (?self::a) => WidgetStyleSetCallback
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 wrapped :: a -> WidgetStyleSetCallback
wrapped a
self = let ?self = a
?self::a
self in (?self::a) => WidgetStyleSetCallback
WidgetStyleSetCallback
cb
    let wrapped' :: C_WidgetStyleSetCallback
wrapped' = (a -> WidgetStyleSetCallback) -> C_WidgetStyleSetCallback
forall a.
GObject a =>
(a -> WidgetStyleSetCallback) -> C_WidgetStyleSetCallback
wrap_WidgetStyleSetCallback a -> WidgetStyleSetCallback
wrapped
    FunPtr C_WidgetStyleSetCallback
wrapped'' <- C_WidgetStyleSetCallback -> IO (FunPtr C_WidgetStyleSetCallback)
mk_WidgetStyleSetCallback C_WidgetStyleSetCallback
wrapped'
    a
-> Text
-> FunPtr C_WidgetStyleSetCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj Text
"style-set" FunPtr C_WidgetStyleSetCallback
wrapped'' SignalConnectMode
SignalConnectAfter Maybe Text
forall a. Maybe a
Nothing


#if defined(ENABLE_OVERLOADING)
data WidgetStyleSetSignalInfo
instance SignalInfo WidgetStyleSetSignalInfo where
    type HaskellCallbackType WidgetStyleSetSignalInfo = WidgetStyleSetCallback
    connectSignal obj cb connectMode detail = do
        let cb' = wrap_WidgetStyleSetCallback cb
        cb'' <- mk_WidgetStyleSetCallback cb'
        connectSignalFunPtr obj "style-set" cb'' connectMode detail
    dbgSignalInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Gtk.Objects.Widget::style-set"
        , O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-3.0.38/docs/GI-Gtk-Objects-Widget.html#g:signal:styleSet"})

#endif

-- signal Widget::style-updated
-- | The [styleUpdated](#g:signal:styleUpdated) signal is a convenience signal that is emitted when the
-- [changed]("GI.Gtk.Objects.StyleContext#g:signal:changed") signal is emitted on the /@widget@/\'s associated
-- t'GI.Gtk.Objects.StyleContext.StyleContext' as returned by 'GI.Gtk.Objects.Widget.widgetGetStyleContext'.
-- 
-- Note that style-modifying functions like 'GI.Gtk.Objects.Widget.widgetOverrideColor' also
-- cause this signal to be emitted.
-- 
-- /Since: 3.0/
type WidgetStyleUpdatedCallback =
    IO ()

type C_WidgetStyleUpdatedCallback =
    Ptr Widget ->                           -- 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_WidgetStyleUpdatedCallback :: 
    GObject a => (a -> WidgetStyleUpdatedCallback) ->
    C_WidgetStyleUpdatedCallback
wrap_WidgetStyleUpdatedCallback :: forall a.
GObject a =>
(a -> IO ()) -> C_WidgetAccelClosuresChangedCallback
wrap_WidgetStyleUpdatedCallback a -> IO ()
gi'cb Ptr Widget
gi'selfPtr Ptr ()
_ = do
    Ptr Widget -> (Widget -> IO ()) -> IO ()
forall a b.
(HasCallStack, ManagedPtrNewtype a) =>
Ptr a -> (a -> IO b) -> IO b
B.ManagedPtr.withTransient Ptr Widget
gi'selfPtr ((Widget -> IO ()) -> IO ()) -> (Widget -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Widget
gi'self -> a -> IO ()
gi'cb (Widget -> a
Coerce.coerce Widget
gi'self) 


-- | 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 -> ((?self :: a) => WidgetStyleUpdatedCallback) -> m SignalHandlerId
onWidgetStyleUpdated :: forall a (m :: * -> *).
(IsWidget a, MonadIO m) =>
a -> ((?self::a) => IO ()) -> m SignalHandlerId
onWidgetStyleUpdated a
obj (?self::a) => 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 wrapped :: a -> IO ()
wrapped a
self = let ?self = a
?self::a
self in IO ()
(?self::a) => IO ()
cb
    let wrapped' :: C_WidgetAccelClosuresChangedCallback
wrapped' = (a -> IO ()) -> C_WidgetAccelClosuresChangedCallback
forall a.
GObject a =>
(a -> IO ()) -> C_WidgetAccelClosuresChangedCallback
wrap_WidgetStyleUpdatedCallback a -> IO ()
wrapped
    FunPtr C_WidgetAccelClosuresChangedCallback
wrapped'' <- C_WidgetAccelClosuresChangedCallback
-> IO (FunPtr C_WidgetAccelClosuresChangedCallback)
mk_WidgetStyleUpdatedCallback C_WidgetAccelClosuresChangedCallback
wrapped'
    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 Text
"style-updated" FunPtr C_WidgetAccelClosuresChangedCallback
wrapped'' 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
-- @
-- 
-- 
-- 
-- By default the object invoking the signal is not passed to the callback.
-- If you need to access it, you can use the implit @?self@ parameter.
-- Note that this requires activating the @ImplicitParams@ GHC extension.
-- 
afterWidgetStyleUpdated :: (IsWidget a, MonadIO m) => a -> ((?self :: a) => WidgetStyleUpdatedCallback) -> m SignalHandlerId
afterWidgetStyleUpdated :: forall a (m :: * -> *).
(IsWidget a, MonadIO m) =>
a -> ((?self::a) => IO ()) -> m SignalHandlerId
afterWidgetStyleUpdated a
obj (?self::a) => 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 wrapped :: a -> IO ()
wrapped a
self = let ?self = a
?self::a
self in IO ()
(?self::a) => IO ()
cb
    let wrapped' :: C_WidgetAccelClosuresChangedCallback
wrapped' = (a -> IO ()) -> C_WidgetAccelClosuresChangedCallback
forall a.
GObject a =>
(a -> IO ()) -> C_WidgetAccelClosuresChangedCallback
wrap_WidgetStyleUpdatedCallback a -> IO ()
wrapped
    FunPtr C_WidgetAccelClosuresChangedCallback
wrapped'' <- C_WidgetAccelClosuresChangedCallback
-> IO (FunPtr C_WidgetAccelClosuresChangedCallback)
mk_WidgetStyleUpdatedCallback C_WidgetAccelClosuresChangedCallback
wrapped'
    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 Text
"style-updated" FunPtr C_WidgetAccelClosuresChangedCallback
wrapped'' 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
    dbgSignalInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Gtk.Objects.Widget::style-updated"
        , O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-3.0.38/docs/GI-Gtk-Objects-Widget.html#g:signal:styleUpdated"})

#endif

-- signal Widget::touch-event
-- | /No description available in the introspection data./
type WidgetTouchEventCallback =
    Gdk.Event.Event
    -> IO Bool

type C_WidgetTouchEventCallback =
    Ptr Widget ->                           -- object
    Ptr Gdk.Event.Event ->
    Ptr () ->                               -- user_data
    IO CInt

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

wrap_WidgetTouchEventCallback :: 
    GObject a => (a -> WidgetTouchEventCallback) ->
    C_WidgetTouchEventCallback
wrap_WidgetTouchEventCallback :: forall a.
GObject a =>
(a -> WidgetDeleteEventCallback) -> C_WidgetDeleteEventCallback
wrap_WidgetTouchEventCallback a -> WidgetDeleteEventCallback
gi'cb Ptr Widget
gi'selfPtr Ptr Event
object Ptr ()
_ = do
    Ptr Event -> (Event -> IO CInt) -> IO CInt
forall a b.
(HasCallStack, ManagedPtrNewtype a) =>
Ptr a -> (a -> IO b) -> IO b
B.ManagedPtr.withTransient  Ptr Event
object ((Event -> IO CInt) -> IO CInt) -> (Event -> IO CInt) -> IO CInt
forall a b. (a -> b) -> a -> b
$ \Event
object' -> do
        Bool
result <- Ptr Widget -> (Widget -> IO Bool) -> IO Bool
forall a b.
(HasCallStack, ManagedPtrNewtype a) =>
Ptr a -> (a -> IO b) -> IO b
B.ManagedPtr.withTransient Ptr Widget
gi'selfPtr ((Widget -> IO Bool) -> IO Bool) -> (Widget -> IO Bool) -> IO Bool
forall a b. (a -> b) -> a -> b
$ \Widget
gi'self -> a -> WidgetDeleteEventCallback
gi'cb (Widget -> a
Coerce.coerce Widget
gi'self)  Event
object'
        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 [touchEvent](#signal:touchEvent) 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 #touchEvent callback
-- @
-- 
-- 
onWidgetTouchEvent :: (IsWidget a, MonadIO m) => a -> ((?self :: a) => WidgetTouchEventCallback) -> m SignalHandlerId
onWidgetTouchEvent :: forall a (m :: * -> *).
(IsWidget a, MonadIO m) =>
a -> ((?self::a) => WidgetDeleteEventCallback) -> m SignalHandlerId
onWidgetTouchEvent a
obj (?self::a) => WidgetDeleteEventCallback
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 wrapped :: a -> WidgetDeleteEventCallback
wrapped a
self = let ?self = a
?self::a
self in (?self::a) => WidgetDeleteEventCallback
WidgetDeleteEventCallback
cb
    let wrapped' :: C_WidgetDeleteEventCallback
wrapped' = (a -> WidgetDeleteEventCallback) -> C_WidgetDeleteEventCallback
forall a.
GObject a =>
(a -> WidgetDeleteEventCallback) -> C_WidgetDeleteEventCallback
wrap_WidgetTouchEventCallback a -> WidgetDeleteEventCallback
wrapped
    FunPtr C_WidgetDeleteEventCallback
wrapped'' <- C_WidgetDeleteEventCallback
-> IO (FunPtr C_WidgetDeleteEventCallback)
mk_WidgetTouchEventCallback C_WidgetDeleteEventCallback
wrapped'
    a
-> Text
-> FunPtr C_WidgetDeleteEventCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj Text
"touch-event" FunPtr C_WidgetDeleteEventCallback
wrapped'' SignalConnectMode
SignalConnectBefore Maybe Text
forall a. Maybe a
Nothing

-- | Connect a signal handler for the [touchEvent](#signal:touchEvent) 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 #touchEvent callback
-- @
-- 
-- 
-- 
-- By default the object invoking the signal is not passed to the callback.
-- If you need to access it, you can use the implit @?self@ parameter.
-- Note that this requires activating the @ImplicitParams@ GHC extension.
-- 
afterWidgetTouchEvent :: (IsWidget a, MonadIO m) => a -> ((?self :: a) => WidgetTouchEventCallback) -> m SignalHandlerId
afterWidgetTouchEvent :: forall a (m :: * -> *).
(IsWidget a, MonadIO m) =>
a -> ((?self::a) => WidgetDeleteEventCallback) -> m SignalHandlerId
afterWidgetTouchEvent a
obj (?self::a) => WidgetDeleteEventCallback
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 wrapped :: a -> WidgetDeleteEventCallback
wrapped a
self = let ?self = a
?self::a
self in (?self::a) => WidgetDeleteEventCallback
WidgetDeleteEventCallback
cb
    let wrapped' :: C_WidgetDeleteEventCallback
wrapped' = (a -> WidgetDeleteEventCallback) -> C_WidgetDeleteEventCallback
forall a.
GObject a =>
(a -> WidgetDeleteEventCallback) -> C_WidgetDeleteEventCallback
wrap_WidgetTouchEventCallback a -> WidgetDeleteEventCallback
wrapped
    FunPtr C_WidgetDeleteEventCallback
wrapped'' <- C_WidgetDeleteEventCallback
-> IO (FunPtr C_WidgetDeleteEventCallback)
mk_WidgetTouchEventCallback C_WidgetDeleteEventCallback
wrapped'
    a
-> Text
-> FunPtr C_WidgetDeleteEventCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj Text
"touch-event" FunPtr C_WidgetDeleteEventCallback
wrapped'' SignalConnectMode
SignalConnectAfter Maybe Text
forall a. Maybe a
Nothing


#if defined(ENABLE_OVERLOADING)
data WidgetTouchEventSignalInfo
instance SignalInfo WidgetTouchEventSignalInfo where
    type HaskellCallbackType WidgetTouchEventSignalInfo = WidgetTouchEventCallback
    connectSignal obj cb connectMode detail = do
        let cb' = wrap_WidgetTouchEventCallback cb
        cb'' <- mk_WidgetTouchEventCallback cb'
        connectSignalFunPtr obj "touch-event" cb'' connectMode detail
    dbgSignalInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Gtk.Objects.Widget::touch-event"
        , O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-3.0.38/docs/GI-Gtk-Objects-Widget.html#g:signal:touchEvent"})

#endif

-- signal Widget::unmap
-- | The [unmap](#g: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](#g: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 ()

type C_WidgetUnmapCallback =
    Ptr Widget ->                           -- 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_WidgetUnmapCallback :: 
    GObject a => (a -> WidgetUnmapCallback) ->
    C_WidgetUnmapCallback
wrap_WidgetUnmapCallback :: forall a.
GObject a =>
(a -> IO ()) -> C_WidgetAccelClosuresChangedCallback
wrap_WidgetUnmapCallback a -> IO ()
gi'cb Ptr Widget
gi'selfPtr Ptr ()
_ = do
    Ptr Widget -> (Widget -> IO ()) -> IO ()
forall a b.
(HasCallStack, ManagedPtrNewtype a) =>
Ptr a -> (a -> IO b) -> IO b
B.ManagedPtr.withTransient Ptr Widget
gi'selfPtr ((Widget -> IO ()) -> IO ()) -> (Widget -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Widget
gi'self -> a -> IO ()
gi'cb (Widget -> a
Coerce.coerce Widget
gi'self) 


-- | 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 -> ((?self :: a) => WidgetUnmapCallback) -> m SignalHandlerId
onWidgetUnmap :: forall a (m :: * -> *).
(IsWidget a, MonadIO m) =>
a -> ((?self::a) => IO ()) -> m SignalHandlerId
onWidgetUnmap a
obj (?self::a) => 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 wrapped :: a -> IO ()
wrapped a
self = let ?self = a
?self::a
self in IO ()
(?self::a) => IO ()
cb
    let wrapped' :: C_WidgetAccelClosuresChangedCallback
wrapped' = (a -> IO ()) -> C_WidgetAccelClosuresChangedCallback
forall a.
GObject a =>
(a -> IO ()) -> C_WidgetAccelClosuresChangedCallback
wrap_WidgetUnmapCallback a -> IO ()
wrapped
    FunPtr C_WidgetAccelClosuresChangedCallback
wrapped'' <- C_WidgetAccelClosuresChangedCallback
-> IO (FunPtr C_WidgetAccelClosuresChangedCallback)
mk_WidgetUnmapCallback C_WidgetAccelClosuresChangedCallback
wrapped'
    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 Text
"unmap" FunPtr C_WidgetAccelClosuresChangedCallback
wrapped'' 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
-- @
-- 
-- 
-- 
-- By default the object invoking the signal is not passed to the callback.
-- If you need to access it, you can use the implit @?self@ parameter.
-- Note that this requires activating the @ImplicitParams@ GHC extension.
-- 
afterWidgetUnmap :: (IsWidget a, MonadIO m) => a -> ((?self :: a) => WidgetUnmapCallback) -> m SignalHandlerId
afterWidgetUnmap :: forall a (m :: * -> *).
(IsWidget a, MonadIO m) =>
a -> ((?self::a) => IO ()) -> m SignalHandlerId
afterWidgetUnmap a
obj (?self::a) => 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 wrapped :: a -> IO ()
wrapped a
self = let ?self = a
?self::a
self in IO ()
(?self::a) => IO ()
cb
    let wrapped' :: C_WidgetAccelClosuresChangedCallback
wrapped' = (a -> IO ()) -> C_WidgetAccelClosuresChangedCallback
forall a.
GObject a =>
(a -> IO ()) -> C_WidgetAccelClosuresChangedCallback
wrap_WidgetUnmapCallback a -> IO ()
wrapped
    FunPtr C_WidgetAccelClosuresChangedCallback
wrapped'' <- C_WidgetAccelClosuresChangedCallback
-> IO (FunPtr C_WidgetAccelClosuresChangedCallback)
mk_WidgetUnmapCallback C_WidgetAccelClosuresChangedCallback
wrapped'
    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 Text
"unmap" FunPtr C_WidgetAccelClosuresChangedCallback
wrapped'' 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
    dbgSignalInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Gtk.Objects.Widget::unmap"
        , O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-3.0.38/docs/GI-Gtk-Objects-Widget.html#g:signal:unmap"})

#endif

-- signal Widget::unmap-event
-- | The [unmapEvent](#g:signal:unmapEvent) signal will be emitted when the /@widget@/\'s window is
-- unmapped. A window is unmapped when it becomes invisible on the screen.
-- 
-- To receive this signal, the t'GI.Gdk.Objects.Window.Window' associated to the widget needs
-- to enable the @/GDK_STRUCTURE_MASK/@ mask. GDK will enable this mask
-- automatically for all new windows.
type WidgetUnmapEventCallback =
    Gdk.EventAny.EventAny
    -- ^ /@event@/: the t'GI.Gdk.Structs.EventAny.EventAny' which triggered this signal
    -> IO Bool
    -- ^ __Returns:__ 'P.True' to stop other handlers from being invoked for the event.
    --   'P.False' to propagate the event further.

type C_WidgetUnmapEventCallback =
    Ptr Widget ->                           -- object
    Ptr Gdk.EventAny.EventAny ->
    Ptr () ->                               -- user_data
    IO CInt

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

wrap_WidgetUnmapEventCallback :: 
    GObject a => (a -> WidgetUnmapEventCallback) ->
    C_WidgetUnmapEventCallback
wrap_WidgetUnmapEventCallback :: forall a.
GObject a =>
(a -> WidgetMapEventCallback) -> C_WidgetMapEventCallback
wrap_WidgetUnmapEventCallback a -> WidgetMapEventCallback
gi'cb Ptr Widget
gi'selfPtr Ptr EventAny
event Ptr ()
_ = do
    EventAny
event' <- ((ManagedPtr EventAny -> EventAny) -> Ptr EventAny -> IO EventAny
forall a.
(HasCallStack, BoxedPtr a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
newPtr ManagedPtr EventAny -> EventAny
Gdk.EventAny.EventAny) Ptr EventAny
event
    Bool
result <- Ptr Widget -> (Widget -> IO Bool) -> IO Bool
forall a b.
(HasCallStack, ManagedPtrNewtype a) =>
Ptr a -> (a -> IO b) -> IO b
B.ManagedPtr.withTransient Ptr Widget
gi'selfPtr ((Widget -> IO Bool) -> IO Bool) -> (Widget -> IO Bool) -> IO Bool
forall a b. (a -> b) -> a -> b
$ \Widget
gi'self -> a -> WidgetMapEventCallback
gi'cb (Widget -> a
Coerce.coerce Widget
gi'self)  EventAny
event'
    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 [unmapEvent](#signal:unmapEvent) 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 #unmapEvent callback
-- @
-- 
-- 
onWidgetUnmapEvent :: (IsWidget a, MonadIO m) => a -> ((?self :: a) => WidgetUnmapEventCallback) -> m SignalHandlerId
onWidgetUnmapEvent :: forall a (m :: * -> *).
(IsWidget a, MonadIO m) =>
a -> ((?self::a) => WidgetMapEventCallback) -> m SignalHandlerId
onWidgetUnmapEvent a
obj (?self::a) => WidgetMapEventCallback
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 wrapped :: a -> WidgetMapEventCallback
wrapped a
self = let ?self = a
?self::a
self in (?self::a) => WidgetMapEventCallback
WidgetMapEventCallback
cb
    let wrapped' :: C_WidgetMapEventCallback
wrapped' = (a -> WidgetMapEventCallback) -> C_WidgetMapEventCallback
forall a.
GObject a =>
(a -> WidgetMapEventCallback) -> C_WidgetMapEventCallback
wrap_WidgetUnmapEventCallback a -> WidgetMapEventCallback
wrapped
    FunPtr C_WidgetMapEventCallback
wrapped'' <- C_WidgetMapEventCallback -> IO (FunPtr C_WidgetMapEventCallback)
mk_WidgetUnmapEventCallback C_WidgetMapEventCallback
wrapped'
    a
-> Text
-> FunPtr C_WidgetMapEventCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj Text
"unmap-event" FunPtr C_WidgetMapEventCallback
wrapped'' SignalConnectMode
SignalConnectBefore Maybe Text
forall a. Maybe a
Nothing

-- | Connect a signal handler for the [unmapEvent](#signal:unmapEvent) 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 #unmapEvent callback
-- @
-- 
-- 
-- 
-- By default the object invoking the signal is not passed to the callback.
-- If you need to access it, you can use the implit @?self@ parameter.
-- Note that this requires activating the @ImplicitParams@ GHC extension.
-- 
afterWidgetUnmapEvent :: (IsWidget a, MonadIO m) => a -> ((?self :: a) => WidgetUnmapEventCallback) -> m SignalHandlerId
afterWidgetUnmapEvent :: forall a (m :: * -> *).
(IsWidget a, MonadIO m) =>
a -> ((?self::a) => WidgetMapEventCallback) -> m SignalHandlerId
afterWidgetUnmapEvent a
obj (?self::a) => WidgetMapEventCallback
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 wrapped :: a -> WidgetMapEventCallback
wrapped a
self = let ?self = a
?self::a
self in (?self::a) => WidgetMapEventCallback
WidgetMapEventCallback
cb
    let wrapped' :: C_WidgetMapEventCallback
wrapped' = (a -> WidgetMapEventCallback) -> C_WidgetMapEventCallback
forall a.
GObject a =>
(a -> WidgetMapEventCallback) -> C_WidgetMapEventCallback
wrap_WidgetUnmapEventCallback a -> WidgetMapEventCallback
wrapped
    FunPtr C_WidgetMapEventCallback
wrapped'' <- C_WidgetMapEventCallback -> IO (FunPtr C_WidgetMapEventCallback)
mk_WidgetUnmapEventCallback C_WidgetMapEventCallback
wrapped'
    a
-> Text
-> FunPtr C_WidgetMapEventCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj Text
"unmap-event" FunPtr C_WidgetMapEventCallback
wrapped'' SignalConnectMode
SignalConnectAfter Maybe Text
forall a. Maybe a
Nothing


#if defined(ENABLE_OVERLOADING)
data WidgetUnmapEventSignalInfo
instance SignalInfo WidgetUnmapEventSignalInfo where
    type HaskellCallbackType WidgetUnmapEventSignalInfo = WidgetUnmapEventCallback
    connectSignal obj cb connectMode detail = do
        let cb' = wrap_WidgetUnmapEventCallback cb
        cb'' <- mk_WidgetUnmapEventCallback cb'
        connectSignalFunPtr obj "unmap-event" cb'' connectMode detail
    dbgSignalInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Gtk.Objects.Widget::unmap-event"
        , O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-3.0.38/docs/GI-Gtk-Objects-Widget.html#g:signal:unmapEvent"})

#endif

-- signal Widget::unrealize
-- | The [unrealize](#g:signal:unrealize) signal is emitted when the t'GI.Gdk.Objects.Window.Window' 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 ()

type C_WidgetUnrealizeCallback =
    Ptr Widget ->                           -- 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_WidgetUnrealizeCallback :: 
    GObject a => (a -> WidgetUnrealizeCallback) ->
    C_WidgetUnrealizeCallback
wrap_WidgetUnrealizeCallback :: forall a.
GObject a =>
(a -> IO ()) -> C_WidgetAccelClosuresChangedCallback
wrap_WidgetUnrealizeCallback a -> IO ()
gi'cb Ptr Widget
gi'selfPtr Ptr ()
_ = do
    Ptr Widget -> (Widget -> IO ()) -> IO ()
forall a b.
(HasCallStack, ManagedPtrNewtype a) =>
Ptr a -> (a -> IO b) -> IO b
B.ManagedPtr.withTransient Ptr Widget
gi'selfPtr ((Widget -> IO ()) -> IO ()) -> (Widget -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Widget
gi'self -> a -> IO ()
gi'cb (Widget -> a
Coerce.coerce Widget
gi'self) 


-- | 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 -> ((?self :: a) => WidgetUnrealizeCallback) -> m SignalHandlerId
onWidgetUnrealize :: forall a (m :: * -> *).
(IsWidget a, MonadIO m) =>
a -> ((?self::a) => IO ()) -> m SignalHandlerId
onWidgetUnrealize a
obj (?self::a) => 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 wrapped :: a -> IO ()
wrapped a
self = let ?self = a
?self::a
self in IO ()
(?self::a) => IO ()
cb
    let wrapped' :: C_WidgetAccelClosuresChangedCallback
wrapped' = (a -> IO ()) -> C_WidgetAccelClosuresChangedCallback
forall a.
GObject a =>
(a -> IO ()) -> C_WidgetAccelClosuresChangedCallback
wrap_WidgetUnrealizeCallback a -> IO ()
wrapped
    FunPtr C_WidgetAccelClosuresChangedCallback
wrapped'' <- C_WidgetAccelClosuresChangedCallback
-> IO (FunPtr C_WidgetAccelClosuresChangedCallback)
mk_WidgetUnrealizeCallback C_WidgetAccelClosuresChangedCallback
wrapped'
    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 Text
"unrealize" FunPtr C_WidgetAccelClosuresChangedCallback
wrapped'' 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
-- @
-- 
-- 
-- 
-- By default the object invoking the signal is not passed to the callback.
-- If you need to access it, you can use the implit @?self@ parameter.
-- Note that this requires activating the @ImplicitParams@ GHC extension.
-- 
afterWidgetUnrealize :: (IsWidget a, MonadIO m) => a -> ((?self :: a) => WidgetUnrealizeCallback) -> m SignalHandlerId
afterWidgetUnrealize :: forall a (m :: * -> *).
(IsWidget a, MonadIO m) =>
a -> ((?self::a) => IO ()) -> m SignalHandlerId
afterWidgetUnrealize a
obj (?self::a) => 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 wrapped :: a -> IO ()
wrapped a
self = let ?self = a
?self::a
self in IO ()
(?self::a) => IO ()
cb
    let wrapped' :: C_WidgetAccelClosuresChangedCallback
wrapped' = (a -> IO ()) -> C_WidgetAccelClosuresChangedCallback
forall a.
GObject a =>
(a -> IO ()) -> C_WidgetAccelClosuresChangedCallback
wrap_WidgetUnrealizeCallback a -> IO ()
wrapped
    FunPtr C_WidgetAccelClosuresChangedCallback
wrapped'' <- C_WidgetAccelClosuresChangedCallback
-> IO (FunPtr C_WidgetAccelClosuresChangedCallback)
mk_WidgetUnrealizeCallback C_WidgetAccelClosuresChangedCallback
wrapped'
    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 Text
"unrealize" FunPtr C_WidgetAccelClosuresChangedCallback
wrapped'' 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
    dbgSignalInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Gtk.Objects.Widget::unrealize"
        , O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-3.0.38/docs/GI-Gtk-Objects-Widget.html#g:signal:unrealize"})

#endif

-- signal Widget::visibility-notify-event
{-# DEPRECATED WidgetVisibilityNotifyEventCallback ["(Since version 3.12)","Modern composited windowing systems with pervasive","    transparency make it impossible to track the visibility of a window","    reliably, so this signal can not be guaranteed to provide useful","    information."] #-}
-- | The [visibilityNotifyEvent](#g:signal:visibilityNotifyEvent) will be emitted when the /@widget@/\'s
-- window is obscured or unobscured.
-- 
-- To receive this signal the t'GI.Gdk.Objects.Window.Window' associated to the widget needs
-- to enable the @/GDK_VISIBILITY_NOTIFY_MASK/@ mask.
type WidgetVisibilityNotifyEventCallback =
    Gdk.EventVisibility.EventVisibility
    -- ^ /@event@/: the t'GI.Gdk.Structs.EventVisibility.EventVisibility' which
    --   triggered this signal.
    -> IO Bool
    -- ^ __Returns:__ 'P.True' to stop other handlers from being invoked for the event.
    --   'P.False' to propagate the event further.

type C_WidgetVisibilityNotifyEventCallback =
    Ptr Widget ->                           -- object
    Ptr Gdk.EventVisibility.EventVisibility ->
    Ptr () ->                               -- user_data
    IO CInt

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

wrap_WidgetVisibilityNotifyEventCallback :: 
    GObject a => (a -> WidgetVisibilityNotifyEventCallback) ->
    C_WidgetVisibilityNotifyEventCallback
wrap_WidgetVisibilityNotifyEventCallback :: forall a.
GObject a =>
(a -> WidgetVisibilityNotifyEventCallback)
-> C_WidgetVisibilityNotifyEventCallback
wrap_WidgetVisibilityNotifyEventCallback a -> WidgetVisibilityNotifyEventCallback
gi'cb Ptr Widget
gi'selfPtr Ptr EventVisibility
event Ptr ()
_ = do
    EventVisibility
event' <- ((ManagedPtr EventVisibility -> EventVisibility)
-> Ptr EventVisibility -> IO EventVisibility
forall a.
(HasCallStack, BoxedPtr a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
newPtr ManagedPtr EventVisibility -> EventVisibility
Gdk.EventVisibility.EventVisibility) Ptr EventVisibility
event
    Bool
result <- Ptr Widget -> (Widget -> IO Bool) -> IO Bool
forall a b.
(HasCallStack, ManagedPtrNewtype a) =>
Ptr a -> (a -> IO b) -> IO b
B.ManagedPtr.withTransient Ptr Widget
gi'selfPtr ((Widget -> IO Bool) -> IO Bool) -> (Widget -> IO Bool) -> IO Bool
forall a b. (a -> b) -> a -> b
$ \Widget
gi'self -> a -> WidgetVisibilityNotifyEventCallback
gi'cb (Widget -> a
Coerce.coerce Widget
gi'self)  EventVisibility
event'
    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 [visibilityNotifyEvent](#signal:visibilityNotifyEvent) 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 #visibilityNotifyEvent callback
-- @
-- 
-- 
onWidgetVisibilityNotifyEvent :: (IsWidget a, MonadIO m) => a -> ((?self :: a) => WidgetVisibilityNotifyEventCallback) -> m SignalHandlerId
onWidgetVisibilityNotifyEvent :: forall a (m :: * -> *).
(IsWidget a, MonadIO m) =>
a
-> ((?self::a) => WidgetVisibilityNotifyEventCallback)
-> m SignalHandlerId
onWidgetVisibilityNotifyEvent a
obj (?self::a) => WidgetVisibilityNotifyEventCallback
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 wrapped :: a -> WidgetVisibilityNotifyEventCallback
wrapped a
self = let ?self = a
?self::a
self in (?self::a) => WidgetVisibilityNotifyEventCallback
WidgetVisibilityNotifyEventCallback
cb
    let wrapped' :: C_WidgetVisibilityNotifyEventCallback
wrapped' = (a -> WidgetVisibilityNotifyEventCallback)
-> C_WidgetVisibilityNotifyEventCallback
forall a.
GObject a =>
(a -> WidgetVisibilityNotifyEventCallback)
-> C_WidgetVisibilityNotifyEventCallback
wrap_WidgetVisibilityNotifyEventCallback a -> WidgetVisibilityNotifyEventCallback
wrapped
    FunPtr C_WidgetVisibilityNotifyEventCallback
wrapped'' <- C_WidgetVisibilityNotifyEventCallback
-> IO (FunPtr C_WidgetVisibilityNotifyEventCallback)
mk_WidgetVisibilityNotifyEventCallback C_WidgetVisibilityNotifyEventCallback
wrapped'
    a
-> Text
-> FunPtr C_WidgetVisibilityNotifyEventCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj Text
"visibility-notify-event" FunPtr C_WidgetVisibilityNotifyEventCallback
wrapped'' SignalConnectMode
SignalConnectBefore Maybe Text
forall a. Maybe a
Nothing

-- | Connect a signal handler for the [visibilityNotifyEvent](#signal:visibilityNotifyEvent) 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 #visibilityNotifyEvent callback
-- @
-- 
-- 
-- 
-- By default the object invoking the signal is not passed to the callback.
-- If you need to access it, you can use the implit @?self@ parameter.
-- Note that this requires activating the @ImplicitParams@ GHC extension.
-- 
afterWidgetVisibilityNotifyEvent :: (IsWidget a, MonadIO m) => a -> ((?self :: a) => WidgetVisibilityNotifyEventCallback) -> m SignalHandlerId
afterWidgetVisibilityNotifyEvent :: forall a (m :: * -> *).
(IsWidget a, MonadIO m) =>
a
-> ((?self::a) => WidgetVisibilityNotifyEventCallback)
-> m SignalHandlerId
afterWidgetVisibilityNotifyEvent a
obj (?self::a) => WidgetVisibilityNotifyEventCallback
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 wrapped :: a -> WidgetVisibilityNotifyEventCallback
wrapped a
self = let ?self = a
?self::a
self in (?self::a) => WidgetVisibilityNotifyEventCallback
WidgetVisibilityNotifyEventCallback
cb
    let wrapped' :: C_WidgetVisibilityNotifyEventCallback
wrapped' = (a -> WidgetVisibilityNotifyEventCallback)
-> C_WidgetVisibilityNotifyEventCallback
forall a.
GObject a =>
(a -> WidgetVisibilityNotifyEventCallback)
-> C_WidgetVisibilityNotifyEventCallback
wrap_WidgetVisibilityNotifyEventCallback a -> WidgetVisibilityNotifyEventCallback
wrapped
    FunPtr C_WidgetVisibilityNotifyEventCallback
wrapped'' <- C_WidgetVisibilityNotifyEventCallback
-> IO (FunPtr C_WidgetVisibilityNotifyEventCallback)
mk_WidgetVisibilityNotifyEventCallback C_WidgetVisibilityNotifyEventCallback
wrapped'
    a
-> Text
-> FunPtr C_WidgetVisibilityNotifyEventCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj Text
"visibility-notify-event" FunPtr C_WidgetVisibilityNotifyEventCallback
wrapped'' SignalConnectMode
SignalConnectAfter Maybe Text
forall a. Maybe a
Nothing


#if defined(ENABLE_OVERLOADING)
data WidgetVisibilityNotifyEventSignalInfo
instance SignalInfo WidgetVisibilityNotifyEventSignalInfo where
    type HaskellCallbackType WidgetVisibilityNotifyEventSignalInfo = WidgetVisibilityNotifyEventCallback
    connectSignal obj cb connectMode detail = do
        let cb' = wrap_WidgetVisibilityNotifyEventCallback cb
        cb'' <- mk_WidgetVisibilityNotifyEventCallback cb'
        connectSignalFunPtr obj "visibility-notify-event" cb'' connectMode detail
    dbgSignalInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Gtk.Objects.Widget::visibility-notify-event"
        , O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-3.0.38/docs/GI-Gtk-Objects-Widget.html#g:signal:visibilityNotifyEvent"})

#endif

-- signal Widget::window-state-event
-- | The [windowStateEvent](#g:signal:windowStateEvent) will be emitted when the state of the
-- toplevel window associated to the /@widget@/ changes.
-- 
-- To receive this signal the t'GI.Gdk.Objects.Window.Window' associated to the widget
-- needs to enable the @/GDK_STRUCTURE_MASK/@ mask. GDK will enable
-- this mask automatically for all new windows.
type WidgetWindowStateEventCallback =
    Gdk.EventWindowState.EventWindowState
    -- ^ /@event@/: the t'GI.Gdk.Structs.EventWindowState.EventWindowState' which
    --   triggered this signal.
    -> IO Bool
    -- ^ __Returns:__ 'P.True' to stop other handlers from being invoked for the
    --   event. 'P.False' to propagate the event further.

type C_WidgetWindowStateEventCallback =
    Ptr Widget ->                           -- object
    Ptr Gdk.EventWindowState.EventWindowState ->
    Ptr () ->                               -- user_data
    IO CInt

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

wrap_WidgetWindowStateEventCallback :: 
    GObject a => (a -> WidgetWindowStateEventCallback) ->
    C_WidgetWindowStateEventCallback
wrap_WidgetWindowStateEventCallback :: forall a.
GObject a =>
(a -> WidgetWindowStateEventCallback)
-> C_WidgetWindowStateEventCallback
wrap_WidgetWindowStateEventCallback a -> WidgetWindowStateEventCallback
gi'cb Ptr Widget
gi'selfPtr Ptr EventWindowState
event Ptr ()
_ = do
    EventWindowState
event' <- ((ManagedPtr EventWindowState -> EventWindowState)
-> Ptr EventWindowState -> IO EventWindowState
forall a.
(HasCallStack, BoxedPtr a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
newPtr ManagedPtr EventWindowState -> EventWindowState
Gdk.EventWindowState.EventWindowState) Ptr EventWindowState
event
    Bool
result <- Ptr Widget -> (Widget -> IO Bool) -> IO Bool
forall a b.
(HasCallStack, ManagedPtrNewtype a) =>
Ptr a -> (a -> IO b) -> IO b
B.ManagedPtr.withTransient Ptr Widget
gi'selfPtr ((Widget -> IO Bool) -> IO Bool) -> (Widget -> IO Bool) -> IO Bool
forall a b. (a -> b) -> a -> b
$ \Widget
gi'self -> a -> WidgetWindowStateEventCallback
gi'cb (Widget -> a
Coerce.coerce Widget
gi'self)  EventWindowState
event'
    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 [windowStateEvent](#signal:windowStateEvent) 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 #windowStateEvent callback
-- @
-- 
-- 
onWidgetWindowStateEvent :: (IsWidget a, MonadIO m) => a -> ((?self :: a) => WidgetWindowStateEventCallback) -> m SignalHandlerId
onWidgetWindowStateEvent :: forall a (m :: * -> *).
(IsWidget a, MonadIO m) =>
a
-> ((?self::a) => WidgetWindowStateEventCallback)
-> m SignalHandlerId
onWidgetWindowStateEvent a
obj (?self::a) => WidgetWindowStateEventCallback
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 wrapped :: a -> WidgetWindowStateEventCallback
wrapped a
self = let ?self = a
?self::a
self in (?self::a) => WidgetWindowStateEventCallback
WidgetWindowStateEventCallback
cb
    let wrapped' :: C_WidgetWindowStateEventCallback
wrapped' = (a -> WidgetWindowStateEventCallback)
-> C_WidgetWindowStateEventCallback
forall a.
GObject a =>
(a -> WidgetWindowStateEventCallback)
-> C_WidgetWindowStateEventCallback
wrap_WidgetWindowStateEventCallback a -> WidgetWindowStateEventCallback
wrapped
    FunPtr C_WidgetWindowStateEventCallback
wrapped'' <- C_WidgetWindowStateEventCallback
-> IO (FunPtr C_WidgetWindowStateEventCallback)
mk_WidgetWindowStateEventCallback C_WidgetWindowStateEventCallback
wrapped'
    a
-> Text
-> FunPtr C_WidgetWindowStateEventCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj Text
"window-state-event" FunPtr C_WidgetWindowStateEventCallback
wrapped'' SignalConnectMode
SignalConnectBefore Maybe Text
forall a. Maybe a
Nothing

-- | Connect a signal handler for the [windowStateEvent](#signal:windowStateEvent) 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 #windowStateEvent callback
-- @
-- 
-- 
-- 
-- By default the object invoking the signal is not passed to the callback.
-- If you need to access it, you can use the implit @?self@ parameter.
-- Note that this requires activating the @ImplicitParams@ GHC extension.
-- 
afterWidgetWindowStateEvent :: (IsWidget a, MonadIO m) => a -> ((?self :: a) => WidgetWindowStateEventCallback) -> m SignalHandlerId
afterWidgetWindowStateEvent :: forall a (m :: * -> *).
(IsWidget a, MonadIO m) =>
a
-> ((?self::a) => WidgetWindowStateEventCallback)
-> m SignalHandlerId
afterWidgetWindowStateEvent a
obj (?self::a) => WidgetWindowStateEventCallback
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 wrapped :: a -> WidgetWindowStateEventCallback
wrapped a
self = let ?self = a
?self::a
self in (?self::a) => WidgetWindowStateEventCallback
WidgetWindowStateEventCallback
cb
    let wrapped' :: C_WidgetWindowStateEventCallback
wrapped' = (a -> WidgetWindowStateEventCallback)
-> C_WidgetWindowStateEventCallback
forall a.
GObject a =>
(a -> WidgetWindowStateEventCallback)
-> C_WidgetWindowStateEventCallback
wrap_WidgetWindowStateEventCallback a -> WidgetWindowStateEventCallback
wrapped
    FunPtr C_WidgetWindowStateEventCallback
wrapped'' <- C_WidgetWindowStateEventCallback
-> IO (FunPtr C_WidgetWindowStateEventCallback)
mk_WidgetWindowStateEventCallback C_WidgetWindowStateEventCallback
wrapped'
    a
-> Text
-> FunPtr C_WidgetWindowStateEventCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj Text
"window-state-event" FunPtr C_WidgetWindowStateEventCallback
wrapped'' SignalConnectMode
SignalConnectAfter Maybe Text
forall a. Maybe a
Nothing


#if defined(ENABLE_OVERLOADING)
data WidgetWindowStateEventSignalInfo
instance SignalInfo WidgetWindowStateEventSignalInfo where
    type HaskellCallbackType WidgetWindowStateEventSignalInfo = WidgetWindowStateEventCallback
    connectSignal obj cb connectMode detail = do
        let cb' = wrap_WidgetWindowStateEventCallback cb
        cb'' <- mk_WidgetWindowStateEventCallback cb'
        connectSignalFunPtr obj "window-state-event" cb'' connectMode detail
    dbgSignalInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Gtk.Objects.Widget::window-state-event"
        , O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-3.0.38/docs/GI-Gtk-Objects-Widget.html#g:signal:windowStateEvent"})

#endif

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

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

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

-- | Construct a `GValueConstruct` with valid value for the “@app-paintable@” property. This is rarely needed directly, but it is used by `Data.GI.Base.Constructible.new`.
constructWidgetAppPaintable :: (IsWidget o, MIO.MonadIO m) => Bool -> m (GValueConstruct o)
constructWidgetAppPaintable :: forall o (m :: * -> *).
(IsWidget o, MonadIO m) =>
Bool -> m (GValueConstruct o)
constructWidgetAppPaintable Bool
val = IO (GValueConstruct o) -> m (GValueConstruct o)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO (GValueConstruct o) -> m (GValueConstruct o))
-> IO (GValueConstruct o) -> m (GValueConstruct o)
forall a b. (a -> b) -> a -> b
$ do
    IO (GValueConstruct o) -> IO (GValueConstruct o)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO (GValueConstruct o) -> IO (GValueConstruct o))
-> IO (GValueConstruct o) -> IO (GValueConstruct o)
forall a b. (a -> b) -> a -> b
$ String -> Bool -> IO (GValueConstruct o)
forall o. String -> Bool -> IO (GValueConstruct o)
B.Properties.constructObjectPropertyBool String
"app-paintable" Bool
val

#if defined(ENABLE_OVERLOADING)
data WidgetAppPaintablePropertyInfo
instance AttrInfo WidgetAppPaintablePropertyInfo where
    type AttrAllowedOps WidgetAppPaintablePropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet]
    type AttrBaseTypeConstraint WidgetAppPaintablePropertyInfo = IsWidget
    type AttrSetTypeConstraint WidgetAppPaintablePropertyInfo = (~) Bool
    type AttrTransferTypeConstraint WidgetAppPaintablePropertyInfo = (~) Bool
    type AttrTransferType WidgetAppPaintablePropertyInfo = Bool
    type AttrGetType WidgetAppPaintablePropertyInfo = Bool
    type AttrLabel WidgetAppPaintablePropertyInfo = "app-paintable"
    type AttrOrigin WidgetAppPaintablePropertyInfo = Widget
    attrGet = getWidgetAppPaintable
    attrSet = setWidgetAppPaintable
    attrTransfer _ v = do
        return v
    attrConstruct = constructWidgetAppPaintable
    attrClear = undefined
    dbgAttrInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Gtk.Objects.Widget.appPaintable"
        , O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-3.0.38/docs/GI-Gtk-Objects-Widget.html#g:attr:appPaintable"
        })
#endif

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

-- | Get the value of the “@can-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 #canDefault
-- @
getWidgetCanDefault :: (MonadIO m, IsWidget o) => o -> m Bool
getWidgetCanDefault :: forall (m :: * -> *) o. (MonadIO m, IsWidget o) => o -> m Bool
getWidgetCanDefault o
obj = IO Bool -> m Bool
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO Bool -> m Bool) -> IO Bool -> m Bool
forall a b. (a -> b) -> a -> b
$ o -> String -> IO Bool
forall a. GObject a => a -> String -> IO Bool
B.Properties.getObjectPropertyBool o
obj String
"can-default"

-- | Set the value of the “@can-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 [ #canDefault 'Data.GI.Base.Attributes.:=' value ]
-- @
setWidgetCanDefault :: (MonadIO m, IsWidget o) => o -> Bool -> m ()
setWidgetCanDefault :: forall (m :: * -> *) o.
(MonadIO m, IsWidget o) =>
o -> Bool -> m ()
setWidgetCanDefault o
obj Bool
val = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    o -> String -> WidgetGrabNotifyCallback
forall a. GObject a => a -> String -> WidgetGrabNotifyCallback
B.Properties.setObjectPropertyBool o
obj String
"can-default" Bool
val

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

#if defined(ENABLE_OVERLOADING)
data WidgetCanDefaultPropertyInfo
instance AttrInfo WidgetCanDefaultPropertyInfo where
    type AttrAllowedOps WidgetCanDefaultPropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet]
    type AttrBaseTypeConstraint WidgetCanDefaultPropertyInfo = IsWidget
    type AttrSetTypeConstraint WidgetCanDefaultPropertyInfo = (~) Bool
    type AttrTransferTypeConstraint WidgetCanDefaultPropertyInfo = (~) Bool
    type AttrTransferType WidgetCanDefaultPropertyInfo = Bool
    type AttrGetType WidgetCanDefaultPropertyInfo = Bool
    type AttrLabel WidgetCanDefaultPropertyInfo = "can-default"
    type AttrOrigin WidgetCanDefaultPropertyInfo = Widget
    attrGet = getWidgetCanDefault
    attrSet = setWidgetCanDefault
    attrTransfer _ v = do
        return v
    attrConstruct = constructWidgetCanDefault
    attrClear = undefined
    dbgAttrInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Gtk.Objects.Widget.canDefault"
        , O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-3.0.38/docs/GI-Gtk-Objects-Widget.html#g:attr:canDefault"
        })
#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 :: forall (m :: * -> *) o. (MonadIO m, IsWidget o) => o -> m Bool
getWidgetCanFocus o
obj = IO Bool -> m Bool
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO Bool -> m Bool) -> IO Bool -> m Bool
forall a b. (a -> b) -> a -> b
$ o -> String -> IO Bool
forall a. GObject a => a -> String -> IO Bool
B.Properties.getObjectPropertyBool o
obj String
"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 :: forall (m :: * -> *) o.
(MonadIO m, IsWidget o) =>
o -> Bool -> m ()
setWidgetCanFocus o
obj Bool
val = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    o -> String -> WidgetGrabNotifyCallback
forall a. GObject a => a -> String -> WidgetGrabNotifyCallback
B.Properties.setObjectPropertyBool o
obj String
"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, MIO.MonadIO m) => Bool -> m (GValueConstruct o)
constructWidgetCanFocus :: forall o (m :: * -> *).
(IsWidget o, MonadIO m) =>
Bool -> m (GValueConstruct o)
constructWidgetCanFocus Bool
val = IO (GValueConstruct o) -> m (GValueConstruct o)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO (GValueConstruct o) -> m (GValueConstruct o))
-> IO (GValueConstruct o) -> m (GValueConstruct o)
forall a b. (a -> b) -> a -> b
$ do
    IO (GValueConstruct o) -> IO (GValueConstruct o)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO (GValueConstruct o) -> IO (GValueConstruct o))
-> IO (GValueConstruct o) -> IO (GValueConstruct o)
forall a b. (a -> b) -> a -> b
$ String -> Bool -> IO (GValueConstruct o)
forall o. String -> Bool -> IO (GValueConstruct o)
B.Properties.constructObjectPropertyBool String
"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
    dbgAttrInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Gtk.Objects.Widget.canFocus"
        , O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-3.0.38/docs/GI-Gtk-Objects-Widget.html#g:attr:canFocus"
        })
#endif

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

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

#if defined(ENABLE_OVERLOADING)
data WidgetCompositeChildPropertyInfo
instance AttrInfo WidgetCompositeChildPropertyInfo where
    type AttrAllowedOps WidgetCompositeChildPropertyInfo = '[ 'AttrGet]
    type AttrBaseTypeConstraint WidgetCompositeChildPropertyInfo = IsWidget
    type AttrSetTypeConstraint WidgetCompositeChildPropertyInfo = (~) ()
    type AttrTransferTypeConstraint WidgetCompositeChildPropertyInfo = (~) ()
    type AttrTransferType WidgetCompositeChildPropertyInfo = ()
    type AttrGetType WidgetCompositeChildPropertyInfo = Bool
    type AttrLabel WidgetCompositeChildPropertyInfo = "composite-child"
    type AttrOrigin WidgetCompositeChildPropertyInfo = Widget
    attrGet = getWidgetCompositeChild
    attrSet = undefined
    attrTransfer _ = undefined
    attrConstruct = undefined
    attrClear = undefined
    dbgAttrInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Gtk.Objects.Widget.compositeChild"
        , O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-3.0.38/docs/GI-Gtk-Objects-Widget.html#g:attr:compositeChild"
        })
#endif

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

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

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

-- | Construct a `GValueConstruct` with valid value for the “@double-buffered@” property. This is rarely needed directly, but it is used by `Data.GI.Base.Constructible.new`.
constructWidgetDoubleBuffered :: (IsWidget o, MIO.MonadIO m) => Bool -> m (GValueConstruct o)
constructWidgetDoubleBuffered :: forall o (m :: * -> *).
(IsWidget o, MonadIO m) =>
Bool -> m (GValueConstruct o)
constructWidgetDoubleBuffered Bool
val = IO (GValueConstruct o) -> m (GValueConstruct o)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO (GValueConstruct o) -> m (GValueConstruct o))
-> IO (GValueConstruct o) -> m (GValueConstruct o)
forall a b. (a -> b) -> a -> b
$ do
    IO (GValueConstruct o) -> IO (GValueConstruct o)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO (GValueConstruct o) -> IO (GValueConstruct o))
-> IO (GValueConstruct o) -> IO (GValueConstruct o)
forall a b. (a -> b) -> a -> b
$ String -> Bool -> IO (GValueConstruct o)
forall o. String -> Bool -> IO (GValueConstruct o)
B.Properties.constructObjectPropertyBool String
"double-buffered" Bool
val

#if defined(ENABLE_OVERLOADING)
data WidgetDoubleBufferedPropertyInfo
instance AttrInfo WidgetDoubleBufferedPropertyInfo where
    type AttrAllowedOps WidgetDoubleBufferedPropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet]
    type AttrBaseTypeConstraint WidgetDoubleBufferedPropertyInfo = IsWidget
    type AttrSetTypeConstraint WidgetDoubleBufferedPropertyInfo = (~) Bool
    type AttrTransferTypeConstraint WidgetDoubleBufferedPropertyInfo = (~) Bool
    type AttrTransferType WidgetDoubleBufferedPropertyInfo = Bool
    type AttrGetType WidgetDoubleBufferedPropertyInfo = Bool
    type AttrLabel WidgetDoubleBufferedPropertyInfo = "double-buffered"
    type AttrOrigin WidgetDoubleBufferedPropertyInfo = Widget
    attrGet = getWidgetDoubleBuffered
    attrSet = setWidgetDoubleBuffered
    attrTransfer _ v = do
        return v
    attrConstruct = constructWidgetDoubleBuffered
    attrClear = undefined
    dbgAttrInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Gtk.Objects.Widget.doubleBuffered"
        , O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-3.0.38/docs/GI-Gtk-Objects-Widget.html#g:attr:doubleBuffered"
        })
#endif

-- VVV Prop "events"
   -- Type: TInterface (Name {namespace = "Gdk", name = "EventMask"})
   -- Flags: [PropertyReadable,PropertyWritable]
   -- Nullable: (Nothing,Just False)

-- | Get the value of the “@events@” property.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Attributes.get' widget #events
-- @
getWidgetEvents :: (MonadIO m, IsWidget o) => o -> m [Gdk.Flags.EventMask]
getWidgetEvents :: forall (m :: * -> *) o.
(MonadIO m, IsWidget o) =>
o -> m [EventMask]
getWidgetEvents o
obj = IO [EventMask] -> m [EventMask]
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO [EventMask] -> m [EventMask])
-> IO [EventMask] -> m [EventMask]
forall a b. (a -> b) -> a -> b
$ o -> String -> IO [EventMask]
forall a b.
(GObject a, IsGFlag b, BoxedFlags b) =>
a -> String -> IO [b]
B.Properties.getObjectPropertyFlags o
obj String
"events"

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

-- | Construct a `GValueConstruct` with valid value for the “@events@” property. This is rarely needed directly, but it is used by `Data.GI.Base.Constructible.new`.
constructWidgetEvents :: (IsWidget o, MIO.MonadIO m) => [Gdk.Flags.EventMask] -> m (GValueConstruct o)
constructWidgetEvents :: forall o (m :: * -> *).
(IsWidget o, MonadIO m) =>
[EventMask] -> m (GValueConstruct o)
constructWidgetEvents [EventMask]
val = IO (GValueConstruct o) -> m (GValueConstruct o)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO (GValueConstruct o) -> m (GValueConstruct o))
-> IO (GValueConstruct o) -> m (GValueConstruct o)
forall a b. (a -> b) -> a -> b
$ do
    IO (GValueConstruct o) -> IO (GValueConstruct o)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO (GValueConstruct o) -> IO (GValueConstruct o))
-> IO (GValueConstruct o) -> IO (GValueConstruct o)
forall a b. (a -> b) -> a -> b
$ String -> [EventMask] -> IO (GValueConstruct o)
forall a o.
(IsGFlag a, BoxedFlags a) =>
String -> [a] -> IO (GValueConstruct o)
B.Properties.constructObjectPropertyFlags String
"events" [EventMask]
val

#if defined(ENABLE_OVERLOADING)
data WidgetEventsPropertyInfo
instance AttrInfo WidgetEventsPropertyInfo where
    type AttrAllowedOps WidgetEventsPropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet]
    type AttrBaseTypeConstraint WidgetEventsPropertyInfo = IsWidget
    type AttrSetTypeConstraint WidgetEventsPropertyInfo = (~) [Gdk.Flags.EventMask]
    type AttrTransferTypeConstraint WidgetEventsPropertyInfo = (~) [Gdk.Flags.EventMask]
    type AttrTransferType WidgetEventsPropertyInfo = [Gdk.Flags.EventMask]
    type AttrGetType WidgetEventsPropertyInfo = [Gdk.Flags.EventMask]
    type AttrLabel WidgetEventsPropertyInfo = "events"
    type AttrOrigin WidgetEventsPropertyInfo = Widget
    attrGet = getWidgetEvents
    attrSet = setWidgetEvents
    attrTransfer _ v = do
        return v
    attrConstruct = constructWidgetEvents
    attrClear = undefined
    dbgAttrInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Gtk.Objects.Widget.events"
        , O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-3.0.38/docs/GI-Gtk-Objects-Widget.html#g:attr:events"
        })
#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 :: forall (m :: * -> *) o. (MonadIO m, IsWidget o) => o -> m Bool
getWidgetExpand o
obj = IO Bool -> m Bool
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO Bool -> m Bool) -> IO Bool -> m Bool
forall a b. (a -> b) -> a -> b
$ o -> String -> IO Bool
forall a. GObject a => a -> String -> IO Bool
B.Properties.getObjectPropertyBool o
obj String
"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 :: forall (m :: * -> *) o.
(MonadIO m, IsWidget o) =>
o -> Bool -> m ()
setWidgetExpand o
obj Bool
val = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    o -> String -> WidgetGrabNotifyCallback
forall a. GObject a => a -> String -> WidgetGrabNotifyCallback
B.Properties.setObjectPropertyBool o
obj String
"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, MIO.MonadIO m) => Bool -> m (GValueConstruct o)
constructWidgetExpand :: forall o (m :: * -> *).
(IsWidget o, MonadIO m) =>
Bool -> m (GValueConstruct o)
constructWidgetExpand Bool
val = IO (GValueConstruct o) -> m (GValueConstruct o)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO (GValueConstruct o) -> m (GValueConstruct o))
-> IO (GValueConstruct o) -> m (GValueConstruct o)
forall a b. (a -> b) -> a -> b
$ do
    IO (GValueConstruct o) -> IO (GValueConstruct o)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO (GValueConstruct o) -> IO (GValueConstruct o))
-> IO (GValueConstruct o) -> IO (GValueConstruct o)
forall a b. (a -> b) -> a -> b
$ String -> Bool -> IO (GValueConstruct o)
forall o. String -> Bool -> IO (GValueConstruct o)
B.Properties.constructObjectPropertyBool String
"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
    dbgAttrInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Gtk.Objects.Widget.expand"
        , O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-3.0.38/docs/GI-Gtk-Objects-Widget.html#g:attr:expand"
        })
#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 :: forall (m :: * -> *) o. (MonadIO m, IsWidget o) => o -> m Bool
getWidgetFocusOnClick o
obj = IO Bool -> m Bool
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO Bool -> m Bool) -> IO Bool -> m Bool
forall a b. (a -> b) -> a -> b
$ o -> String -> IO Bool
forall a. GObject a => a -> String -> IO Bool
B.Properties.getObjectPropertyBool o
obj String
"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 :: forall (m :: * -> *) o.
(MonadIO m, IsWidget o) =>
o -> Bool -> m ()
setWidgetFocusOnClick o
obj Bool
val = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    o -> String -> WidgetGrabNotifyCallback
forall a. GObject a => a -> String -> WidgetGrabNotifyCallback
B.Properties.setObjectPropertyBool o
obj String
"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, MIO.MonadIO m) => Bool -> m (GValueConstruct o)
constructWidgetFocusOnClick :: forall o (m :: * -> *).
(IsWidget o, MonadIO m) =>
Bool -> m (GValueConstruct o)
constructWidgetFocusOnClick Bool
val = IO (GValueConstruct o) -> m (GValueConstruct o)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO (GValueConstruct o) -> m (GValueConstruct o))
-> IO (GValueConstruct o) -> m (GValueConstruct o)
forall a b. (a -> b) -> a -> b
$ do
    IO (GValueConstruct o) -> IO (GValueConstruct o)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO (GValueConstruct o) -> IO (GValueConstruct o))
-> IO (GValueConstruct o) -> IO (GValueConstruct o)
forall a b. (a -> b) -> a -> b
$ String -> Bool -> IO (GValueConstruct o)
forall o. String -> Bool -> IO (GValueConstruct o)
B.Properties.constructObjectPropertyBool String
"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
    dbgAttrInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Gtk.Objects.Widget.focusOnClick"
        , O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-3.0.38/docs/GI-Gtk-Objects-Widget.html#g:attr:focusOnClick"
        })
#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 :: forall (m :: * -> *) o. (MonadIO m, IsWidget o) => o -> m Align
getWidgetHalign o
obj = IO Align -> m Align
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.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 String
"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 :: forall (m :: * -> *) o.
(MonadIO m, IsWidget o) =>
o -> Align -> m ()
setWidgetHalign o
obj Align
val = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    o -> String -> Align -> IO ()
forall a b.
(GObject a, Enum b, BoxedEnum b) =>
a -> String -> b -> IO ()
B.Properties.setObjectPropertyEnum o
obj String
"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, MIO.MonadIO m) => Gtk.Enums.Align -> m (GValueConstruct o)
constructWidgetHalign :: forall o (m :: * -> *).
(IsWidget o, MonadIO m) =>
Align -> m (GValueConstruct o)
constructWidgetHalign Align
val = IO (GValueConstruct o) -> m (GValueConstruct o)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO (GValueConstruct o) -> m (GValueConstruct o))
-> IO (GValueConstruct o) -> m (GValueConstruct o)
forall a b. (a -> b) -> a -> b
$ do
    IO (GValueConstruct o) -> IO (GValueConstruct o)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO (GValueConstruct o) -> IO (GValueConstruct o))
-> IO (GValueConstruct o) -> IO (GValueConstruct o)
forall a b. (a -> b) -> a -> b
$ String -> Align -> IO (GValueConstruct o)
forall a o.
(Enum a, BoxedEnum a) =>
String -> a -> IO (GValueConstruct o)
B.Properties.constructObjectPropertyEnum String
"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
    dbgAttrInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Gtk.Objects.Widget.halign"
        , O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-3.0.38/docs/GI-Gtk-Objects-Widget.html#g:attr:halign"
        })
#endif

-- VVV Prop "has-default"
   -- Type: TBasicType TBoolean
   -- Flags: [PropertyReadable,PropertyWritable]
   -- 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 :: forall (m :: * -> *) o. (MonadIO m, IsWidget o) => o -> m Bool
getWidgetHasDefault o
obj = IO Bool -> m Bool
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO Bool -> m Bool) -> IO Bool -> m Bool
forall a b. (a -> b) -> a -> b
$ o -> String -> IO Bool
forall a. GObject a => a -> String -> IO Bool
B.Properties.getObjectPropertyBool o
obj String
"has-default"

-- | Set 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.set' widget [ #hasDefault 'Data.GI.Base.Attributes.:=' value ]
-- @
setWidgetHasDefault :: (MonadIO m, IsWidget o) => o -> Bool -> m ()
setWidgetHasDefault :: forall (m :: * -> *) o.
(MonadIO m, IsWidget o) =>
o -> Bool -> m ()
setWidgetHasDefault o
obj Bool
val = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    o -> String -> WidgetGrabNotifyCallback
forall a. GObject a => a -> String -> WidgetGrabNotifyCallback
B.Properties.setObjectPropertyBool o
obj String
"has-default" Bool
val

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

#if defined(ENABLE_OVERLOADING)
data WidgetHasDefaultPropertyInfo
instance AttrInfo WidgetHasDefaultPropertyInfo where
    type AttrAllowedOps WidgetHasDefaultPropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet]
    type AttrBaseTypeConstraint WidgetHasDefaultPropertyInfo = IsWidget
    type AttrSetTypeConstraint WidgetHasDefaultPropertyInfo = (~) Bool
    type AttrTransferTypeConstraint WidgetHasDefaultPropertyInfo = (~) Bool
    type AttrTransferType WidgetHasDefaultPropertyInfo = Bool
    type AttrGetType WidgetHasDefaultPropertyInfo = Bool
    type AttrLabel WidgetHasDefaultPropertyInfo = "has-default"
    type AttrOrigin WidgetHasDefaultPropertyInfo = Widget
    attrGet = getWidgetHasDefault
    attrSet = setWidgetHasDefault
    attrTransfer _ v = do
        return v
    attrConstruct = constructWidgetHasDefault
    attrClear = undefined
    dbgAttrInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Gtk.Objects.Widget.hasDefault"
        , O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-3.0.38/docs/GI-Gtk-Objects-Widget.html#g:attr:hasDefault"
        })
#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 :: forall (m :: * -> *) o. (MonadIO m, IsWidget o) => o -> m Bool
getWidgetHasFocus o
obj = IO Bool -> m Bool
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO Bool -> m Bool) -> IO Bool -> m Bool
forall a b. (a -> b) -> a -> b
$ o -> String -> IO Bool
forall a. GObject a => a -> String -> IO Bool
B.Properties.getObjectPropertyBool o
obj String
"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 :: forall (m :: * -> *) o.
(MonadIO m, IsWidget o) =>
o -> Bool -> m ()
setWidgetHasFocus o
obj Bool
val = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    o -> String -> WidgetGrabNotifyCallback
forall a. GObject a => a -> String -> WidgetGrabNotifyCallback
B.Properties.setObjectPropertyBool o
obj String
"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, MIO.MonadIO m) => Bool -> m (GValueConstruct o)
constructWidgetHasFocus :: forall o (m :: * -> *).
(IsWidget o, MonadIO m) =>
Bool -> m (GValueConstruct o)
constructWidgetHasFocus Bool
val = IO (GValueConstruct o) -> m (GValueConstruct o)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO (GValueConstruct o) -> m (GValueConstruct o))
-> IO (GValueConstruct o) -> m (GValueConstruct o)
forall a b. (a -> b) -> a -> b
$ do
    IO (GValueConstruct o) -> IO (GValueConstruct o)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO (GValueConstruct o) -> IO (GValueConstruct o))
-> IO (GValueConstruct o) -> IO (GValueConstruct o)
forall a b. (a -> b) -> a -> b
$ String -> Bool -> IO (GValueConstruct o)
forall o. String -> Bool -> IO (GValueConstruct o)
B.Properties.constructObjectPropertyBool String
"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
    dbgAttrInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Gtk.Objects.Widget.hasFocus"
        , O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-3.0.38/docs/GI-Gtk-Objects-Widget.html#g:attr:hasFocus"
        })
#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 :: forall (m :: * -> *) o. (MonadIO m, IsWidget o) => o -> m Bool
getWidgetHasTooltip o
obj = IO Bool -> m Bool
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO Bool -> m Bool) -> IO Bool -> m Bool
forall a b. (a -> b) -> a -> b
$ o -> String -> IO Bool
forall a. GObject a => a -> String -> IO Bool
B.Properties.getObjectPropertyBool o
obj String
"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 :: forall (m :: * -> *) o.
(MonadIO m, IsWidget o) =>
o -> Bool -> m ()
setWidgetHasTooltip o
obj Bool
val = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    o -> String -> WidgetGrabNotifyCallback
forall a. GObject a => a -> String -> WidgetGrabNotifyCallback
B.Properties.setObjectPropertyBool o
obj String
"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, MIO.MonadIO m) => Bool -> m (GValueConstruct o)
constructWidgetHasTooltip :: forall o (m :: * -> *).
(IsWidget o, MonadIO m) =>
Bool -> m (GValueConstruct o)
constructWidgetHasTooltip Bool
val = IO (GValueConstruct o) -> m (GValueConstruct o)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO (GValueConstruct o) -> m (GValueConstruct o))
-> IO (GValueConstruct o) -> m (GValueConstruct o)
forall a b. (a -> b) -> a -> b
$ do
    IO (GValueConstruct o) -> IO (GValueConstruct o)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO (GValueConstruct o) -> IO (GValueConstruct o))
-> IO (GValueConstruct o) -> IO (GValueConstruct o)
forall a b. (a -> b) -> a -> b
$ String -> Bool -> IO (GValueConstruct o)
forall o. String -> Bool -> IO (GValueConstruct o)
B.Properties.constructObjectPropertyBool String
"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
    dbgAttrInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Gtk.Objects.Widget.hasTooltip"
        , O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-3.0.38/docs/GI-Gtk-Objects-Widget.html#g:attr:hasTooltip"
        })
#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 :: forall (m :: * -> *) o. (MonadIO m, IsWidget o) => o -> m Int32
getWidgetHeightRequest o
obj = IO Int32 -> m Int32
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.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 String
"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 :: forall (m :: * -> *) o.
(MonadIO m, IsWidget o) =>
o -> Int32 -> m ()
setWidgetHeightRequest o
obj Int32
val = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    o -> String -> Int32 -> IO ()
forall a. GObject a => a -> String -> Int32 -> IO ()
B.Properties.setObjectPropertyInt32 o
obj String
"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, MIO.MonadIO m) => Int32 -> m (GValueConstruct o)
constructWidgetHeightRequest :: forall o (m :: * -> *).
(IsWidget o, MonadIO m) =>
Int32 -> m (GValueConstruct o)
constructWidgetHeightRequest Int32
val = IO (GValueConstruct o) -> m (GValueConstruct o)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO (GValueConstruct o) -> m (GValueConstruct o))
-> IO (GValueConstruct o) -> m (GValueConstruct o)
forall a b. (a -> b) -> a -> b
$ do
    IO (GValueConstruct o) -> IO (GValueConstruct o)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO (GValueConstruct o) -> IO (GValueConstruct o))
-> IO (GValueConstruct o) -> IO (GValueConstruct o)
forall a b. (a -> b) -> a -> b
$ String -> Int32 -> IO (GValueConstruct o)
forall o. String -> Int32 -> IO (GValueConstruct o)
B.Properties.constructObjectPropertyInt32 String
"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
    dbgAttrInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Gtk.Objects.Widget.heightRequest"
        , O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-3.0.38/docs/GI-Gtk-Objects-Widget.html#g:attr:heightRequest"
        })
#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 :: forall (m :: * -> *) o. (MonadIO m, IsWidget o) => o -> m Bool
getWidgetHexpand o
obj = IO Bool -> m Bool
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO Bool -> m Bool) -> IO Bool -> m Bool
forall a b. (a -> b) -> a -> b
$ o -> String -> IO Bool
forall a. GObject a => a -> String -> IO Bool
B.Properties.getObjectPropertyBool o
obj String
"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 :: forall (m :: * -> *) o.
(MonadIO m, IsWidget o) =>
o -> Bool -> m ()
setWidgetHexpand o
obj Bool
val = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    o -> String -> WidgetGrabNotifyCallback
forall a. GObject a => a -> String -> WidgetGrabNotifyCallback
B.Properties.setObjectPropertyBool o
obj String
"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, MIO.MonadIO m) => Bool -> m (GValueConstruct o)
constructWidgetHexpand :: forall o (m :: * -> *).
(IsWidget o, MonadIO m) =>
Bool -> m (GValueConstruct o)
constructWidgetHexpand Bool
val = IO (GValueConstruct o) -> m (GValueConstruct o)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO (GValueConstruct o) -> m (GValueConstruct o))
-> IO (GValueConstruct o) -> m (GValueConstruct o)
forall a b. (a -> b) -> a -> b
$ do
    IO (GValueConstruct o) -> IO (GValueConstruct o)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO (GValueConstruct o) -> IO (GValueConstruct o))
-> IO (GValueConstruct o) -> IO (GValueConstruct o)
forall a b. (a -> b) -> a -> b
$ String -> Bool -> IO (GValueConstruct o)
forall o. String -> Bool -> IO (GValueConstruct o)
B.Properties.constructObjectPropertyBool String
"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
    dbgAttrInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Gtk.Objects.Widget.hexpand"
        , O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-3.0.38/docs/GI-Gtk-Objects-Widget.html#g:attr:hexpand"
        })
#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 :: forall (m :: * -> *) o. (MonadIO m, IsWidget o) => o -> m Bool
getWidgetHexpandSet o
obj = IO Bool -> m Bool
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO Bool -> m Bool) -> IO Bool -> m Bool
forall a b. (a -> b) -> a -> b
$ o -> String -> IO Bool
forall a. GObject a => a -> String -> IO Bool
B.Properties.getObjectPropertyBool o
obj String
"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 :: forall (m :: * -> *) o.
(MonadIO m, IsWidget o) =>
o -> Bool -> m ()
setWidgetHexpandSet o
obj Bool
val = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    o -> String -> WidgetGrabNotifyCallback
forall a. GObject a => a -> String -> WidgetGrabNotifyCallback
B.Properties.setObjectPropertyBool o
obj String
"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, MIO.MonadIO m) => Bool -> m (GValueConstruct o)
constructWidgetHexpandSet :: forall o (m :: * -> *).
(IsWidget o, MonadIO m) =>
Bool -> m (GValueConstruct o)
constructWidgetHexpandSet Bool
val = IO (GValueConstruct o) -> m (GValueConstruct o)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO (GValueConstruct o) -> m (GValueConstruct o))
-> IO (GValueConstruct o) -> m (GValueConstruct o)
forall a b. (a -> b) -> a -> b
$ do
    IO (GValueConstruct o) -> IO (GValueConstruct o)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO (GValueConstruct o) -> IO (GValueConstruct o))
-> IO (GValueConstruct o) -> IO (GValueConstruct o)
forall a b. (a -> b) -> a -> b
$ String -> Bool -> IO (GValueConstruct o)
forall o. String -> Bool -> IO (GValueConstruct o)
B.Properties.constructObjectPropertyBool String
"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
    dbgAttrInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Gtk.Objects.Widget.hexpandSet"
        , O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-3.0.38/docs/GI-Gtk-Objects-Widget.html#g:attr:hexpandSet"
        })
#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 :: forall (m :: * -> *) o. (MonadIO m, IsWidget o) => o -> m Bool
getWidgetIsFocus o
obj = IO Bool -> m Bool
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO Bool -> m Bool) -> IO Bool -> m Bool
forall a b. (a -> b) -> a -> b
$ o -> String -> IO Bool
forall a. GObject a => a -> String -> IO Bool
B.Properties.getObjectPropertyBool o
obj String
"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 :: forall (m :: * -> *) o.
(MonadIO m, IsWidget o) =>
o -> Bool -> m ()
setWidgetIsFocus o
obj Bool
val = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    o -> String -> WidgetGrabNotifyCallback
forall a. GObject a => a -> String -> WidgetGrabNotifyCallback
B.Properties.setObjectPropertyBool o
obj String
"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, MIO.MonadIO m) => Bool -> m (GValueConstruct o)
constructWidgetIsFocus :: forall o (m :: * -> *).
(IsWidget o, MonadIO m) =>
Bool -> m (GValueConstruct o)
constructWidgetIsFocus Bool
val = IO (GValueConstruct o) -> m (GValueConstruct o)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO (GValueConstruct o) -> m (GValueConstruct o))
-> IO (GValueConstruct o) -> m (GValueConstruct o)
forall a b. (a -> b) -> a -> b
$ do
    IO (GValueConstruct o) -> IO (GValueConstruct o)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO (GValueConstruct o) -> IO (GValueConstruct o))
-> IO (GValueConstruct o) -> IO (GValueConstruct o)
forall a b. (a -> b) -> a -> b
$ String -> Bool -> IO (GValueConstruct o)
forall o. String -> Bool -> IO (GValueConstruct o)
B.Properties.constructObjectPropertyBool String
"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
    dbgAttrInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Gtk.Objects.Widget.isFocus"
        , O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-3.0.38/docs/GI-Gtk-Objects-Widget.html#g:attr:isFocus"
        })
#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 :: forall (m :: * -> *) o. (MonadIO m, IsWidget o) => o -> m Int32
getWidgetMargin o
obj = IO Int32 -> m Int32
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.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 String
"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 :: forall (m :: * -> *) o.
(MonadIO m, IsWidget o) =>
o -> Int32 -> m ()
setWidgetMargin o
obj Int32
val = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    o -> String -> Int32 -> IO ()
forall a. GObject a => a -> String -> Int32 -> IO ()
B.Properties.setObjectPropertyInt32 o
obj String
"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, MIO.MonadIO m) => Int32 -> m (GValueConstruct o)
constructWidgetMargin :: forall o (m :: * -> *).
(IsWidget o, MonadIO m) =>
Int32 -> m (GValueConstruct o)
constructWidgetMargin Int32
val = IO (GValueConstruct o) -> m (GValueConstruct o)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO (GValueConstruct o) -> m (GValueConstruct o))
-> IO (GValueConstruct o) -> m (GValueConstruct o)
forall a b. (a -> b) -> a -> b
$ do
    IO (GValueConstruct o) -> IO (GValueConstruct o)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO (GValueConstruct o) -> IO (GValueConstruct o))
-> IO (GValueConstruct o) -> IO (GValueConstruct o)
forall a b. (a -> b) -> a -> b
$ String -> Int32 -> IO (GValueConstruct o)
forall o. String -> Int32 -> IO (GValueConstruct o)
B.Properties.constructObjectPropertyInt32 String
"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
    dbgAttrInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Gtk.Objects.Widget.margin"
        , O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-3.0.38/docs/GI-Gtk-Objects-Widget.html#g:attr:margin"
        })
#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 :: forall (m :: * -> *) o. (MonadIO m, IsWidget o) => o -> m Int32
getWidgetMarginBottom o
obj = IO Int32 -> m Int32
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.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 String
"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 :: forall (m :: * -> *) o.
(MonadIO m, IsWidget o) =>
o -> Int32 -> m ()
setWidgetMarginBottom o
obj Int32
val = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    o -> String -> Int32 -> IO ()
forall a. GObject a => a -> String -> Int32 -> IO ()
B.Properties.setObjectPropertyInt32 o
obj String
"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, MIO.MonadIO m) => Int32 -> m (GValueConstruct o)
constructWidgetMarginBottom :: forall o (m :: * -> *).
(IsWidget o, MonadIO m) =>
Int32 -> m (GValueConstruct o)
constructWidgetMarginBottom Int32
val = IO (GValueConstruct o) -> m (GValueConstruct o)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO (GValueConstruct o) -> m (GValueConstruct o))
-> IO (GValueConstruct o) -> m (GValueConstruct o)
forall a b. (a -> b) -> a -> b
$ do
    IO (GValueConstruct o) -> IO (GValueConstruct o)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO (GValueConstruct o) -> IO (GValueConstruct o))
-> IO (GValueConstruct o) -> IO (GValueConstruct o)
forall a b. (a -> b) -> a -> b
$ String -> Int32 -> IO (GValueConstruct o)
forall o. String -> Int32 -> IO (GValueConstruct o)
B.Properties.constructObjectPropertyInt32 String
"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
    dbgAttrInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Gtk.Objects.Widget.marginBottom"
        , O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-3.0.38/docs/GI-Gtk-Objects-Widget.html#g:attr:marginBottom"
        })
#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 :: forall (m :: * -> *) o. (MonadIO m, IsWidget o) => o -> m Int32
getWidgetMarginEnd o
obj = IO Int32 -> m Int32
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.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 String
"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 :: forall (m :: * -> *) o.
(MonadIO m, IsWidget o) =>
o -> Int32 -> m ()
setWidgetMarginEnd o
obj Int32
val = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    o -> String -> Int32 -> IO ()
forall a. GObject a => a -> String -> Int32 -> IO ()
B.Properties.setObjectPropertyInt32 o
obj String
"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, MIO.MonadIO m) => Int32 -> m (GValueConstruct o)
constructWidgetMarginEnd :: forall o (m :: * -> *).
(IsWidget o, MonadIO m) =>
Int32 -> m (GValueConstruct o)
constructWidgetMarginEnd Int32
val = IO (GValueConstruct o) -> m (GValueConstruct o)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO (GValueConstruct o) -> m (GValueConstruct o))
-> IO (GValueConstruct o) -> m (GValueConstruct o)
forall a b. (a -> b) -> a -> b
$ do
    IO (GValueConstruct o) -> IO (GValueConstruct o)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO (GValueConstruct o) -> IO (GValueConstruct o))
-> IO (GValueConstruct o) -> IO (GValueConstruct o)
forall a b. (a -> b) -> a -> b
$ String -> Int32 -> IO (GValueConstruct o)
forall o. String -> Int32 -> IO (GValueConstruct o)
B.Properties.constructObjectPropertyInt32 String
"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
    dbgAttrInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Gtk.Objects.Widget.marginEnd"
        , O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-3.0.38/docs/GI-Gtk-Objects-Widget.html#g:attr:marginEnd"
        })
#endif

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

-- | Get the value of the “@margin-left@” property.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Attributes.get' widget #marginLeft
-- @
getWidgetMarginLeft :: (MonadIO m, IsWidget o) => o -> m Int32
getWidgetMarginLeft :: forall (m :: * -> *) o. (MonadIO m, IsWidget o) => o -> m Int32
getWidgetMarginLeft o
obj = IO Int32 -> m Int32
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.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 String
"margin-left"

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

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

#if defined(ENABLE_OVERLOADING)
data WidgetMarginLeftPropertyInfo
instance AttrInfo WidgetMarginLeftPropertyInfo where
    type AttrAllowedOps WidgetMarginLeftPropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet]
    type AttrBaseTypeConstraint WidgetMarginLeftPropertyInfo = IsWidget
    type AttrSetTypeConstraint WidgetMarginLeftPropertyInfo = (~) Int32
    type AttrTransferTypeConstraint WidgetMarginLeftPropertyInfo = (~) Int32
    type AttrTransferType WidgetMarginLeftPropertyInfo = Int32
    type AttrGetType WidgetMarginLeftPropertyInfo = Int32
    type AttrLabel WidgetMarginLeftPropertyInfo = "margin-left"
    type AttrOrigin WidgetMarginLeftPropertyInfo = Widget
    attrGet = getWidgetMarginLeft
    attrSet = setWidgetMarginLeft
    attrTransfer _ v = do
        return v
    attrConstruct = constructWidgetMarginLeft
    attrClear = undefined
    dbgAttrInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Gtk.Objects.Widget.marginLeft"
        , O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-3.0.38/docs/GI-Gtk-Objects-Widget.html#g:attr:marginLeft"
        })
#endif

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

-- | Get the value of the “@margin-right@” property.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Attributes.get' widget #marginRight
-- @
getWidgetMarginRight :: (MonadIO m, IsWidget o) => o -> m Int32
getWidgetMarginRight :: forall (m :: * -> *) o. (MonadIO m, IsWidget o) => o -> m Int32
getWidgetMarginRight o
obj = IO Int32 -> m Int32
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.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 String
"margin-right"

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

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

#if defined(ENABLE_OVERLOADING)
data WidgetMarginRightPropertyInfo
instance AttrInfo WidgetMarginRightPropertyInfo where
    type AttrAllowedOps WidgetMarginRightPropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet]
    type AttrBaseTypeConstraint WidgetMarginRightPropertyInfo = IsWidget
    type AttrSetTypeConstraint WidgetMarginRightPropertyInfo = (~) Int32
    type AttrTransferTypeConstraint WidgetMarginRightPropertyInfo = (~) Int32
    type AttrTransferType WidgetMarginRightPropertyInfo = Int32
    type AttrGetType WidgetMarginRightPropertyInfo = Int32
    type AttrLabel WidgetMarginRightPropertyInfo = "margin-right"
    type AttrOrigin WidgetMarginRightPropertyInfo = Widget
    attrGet = getWidgetMarginRight
    attrSet = setWidgetMarginRight
    attrTransfer _ v = do
        return v
    attrConstruct = constructWidgetMarginRight
    attrClear = undefined
    dbgAttrInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Gtk.Objects.Widget.marginRight"
        , O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-3.0.38/docs/GI-Gtk-Objects-Widget.html#g:attr:marginRight"
        })
#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 :: forall (m :: * -> *) o. (MonadIO m, IsWidget o) => o -> m Int32
getWidgetMarginStart o
obj = IO Int32 -> m Int32
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.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 String
"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 :: forall (m :: * -> *) o.
(MonadIO m, IsWidget o) =>
o -> Int32 -> m ()
setWidgetMarginStart o
obj Int32
val = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    o -> String -> Int32 -> IO ()
forall a. GObject a => a -> String -> Int32 -> IO ()
B.Properties.setObjectPropertyInt32 o
obj String
"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, MIO.MonadIO m) => Int32 -> m (GValueConstruct o)
constructWidgetMarginStart :: forall o (m :: * -> *).
(IsWidget o, MonadIO m) =>
Int32 -> m (GValueConstruct o)
constructWidgetMarginStart Int32
val = IO (GValueConstruct o) -> m (GValueConstruct o)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO (GValueConstruct o) -> m (GValueConstruct o))
-> IO (GValueConstruct o) -> m (GValueConstruct o)
forall a b. (a -> b) -> a -> b
$ do
    IO (GValueConstruct o) -> IO (GValueConstruct o)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO (GValueConstruct o) -> IO (GValueConstruct o))
-> IO (GValueConstruct o) -> IO (GValueConstruct o)
forall a b. (a -> b) -> a -> b
$ String -> Int32 -> IO (GValueConstruct o)
forall o. String -> Int32 -> IO (GValueConstruct o)
B.Properties.constructObjectPropertyInt32 String
"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
    dbgAttrInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Gtk.Objects.Widget.marginStart"
        , O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-3.0.38/docs/GI-Gtk-Objects-Widget.html#g:attr:marginStart"
        })
#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 :: forall (m :: * -> *) o. (MonadIO m, IsWidget o) => o -> m Int32
getWidgetMarginTop o
obj = IO Int32 -> m Int32
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.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 String
"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 :: forall (m :: * -> *) o.
(MonadIO m, IsWidget o) =>
o -> Int32 -> m ()
setWidgetMarginTop o
obj Int32
val = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    o -> String -> Int32 -> IO ()
forall a. GObject a => a -> String -> Int32 -> IO ()
B.Properties.setObjectPropertyInt32 o
obj String
"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, MIO.MonadIO m) => Int32 -> m (GValueConstruct o)
constructWidgetMarginTop :: forall o (m :: * -> *).
(IsWidget o, MonadIO m) =>
Int32 -> m (GValueConstruct o)
constructWidgetMarginTop Int32
val = IO (GValueConstruct o) -> m (GValueConstruct o)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO (GValueConstruct o) -> m (GValueConstruct o))
-> IO (GValueConstruct o) -> m (GValueConstruct o)
forall a b. (a -> b) -> a -> b
$ do
    IO (GValueConstruct o) -> IO (GValueConstruct o)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO (GValueConstruct o) -> IO (GValueConstruct o))
-> IO (GValueConstruct o) -> IO (GValueConstruct o)
forall a b. (a -> b) -> a -> b
$ String -> Int32 -> IO (GValueConstruct o)
forall o. String -> Int32 -> IO (GValueConstruct o)
B.Properties.constructObjectPropertyInt32 String
"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
    dbgAttrInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Gtk.Objects.Widget.marginTop"
        , O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-3.0.38/docs/GI-Gtk-Objects-Widget.html#g:attr:marginTop"
        })
#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 :: forall (m :: * -> *) o. (MonadIO m, IsWidget o) => o -> m Text
getWidgetName o
obj = IO Text -> m Text
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.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 Text
"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 String
"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 :: forall (m :: * -> *) o.
(MonadIO m, IsWidget o) =>
o -> Text -> m ()
setWidgetName o
obj Text
val = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    o -> String -> Maybe Text -> IO ()
forall a. GObject a => a -> String -> Maybe Text -> IO ()
B.Properties.setObjectPropertyString o
obj String
"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, MIO.MonadIO m) => T.Text -> m (GValueConstruct o)
constructWidgetName :: forall o (m :: * -> *).
(IsWidget o, MonadIO m) =>
Text -> m (GValueConstruct o)
constructWidgetName Text
val = IO (GValueConstruct o) -> m (GValueConstruct o)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO (GValueConstruct o) -> m (GValueConstruct o))
-> IO (GValueConstruct o) -> m (GValueConstruct o)
forall a b. (a -> b) -> a -> b
$ do
    IO (GValueConstruct o) -> IO (GValueConstruct o)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO (GValueConstruct o) -> IO (GValueConstruct o))
-> IO (GValueConstruct o) -> IO (GValueConstruct o)
forall a b. (a -> b) -> a -> b
$ String -> Maybe Text -> IO (GValueConstruct o)
forall o. String -> Maybe Text -> IO (GValueConstruct o)
B.Properties.constructObjectPropertyString String
"name" (Text -> Maybe Text
forall a. a -> Maybe a
P.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
    dbgAttrInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Gtk.Objects.Widget.name"
        , O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-3.0.38/docs/GI-Gtk-Objects-Widget.html#g:attr:name"
        })
#endif

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

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

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

-- | Construct a `GValueConstruct` with valid value for the “@no-show-all@” property. This is rarely needed directly, but it is used by `Data.GI.Base.Constructible.new`.
constructWidgetNoShowAll :: (IsWidget o, MIO.MonadIO m) => Bool -> m (GValueConstruct o)
constructWidgetNoShowAll :: forall o (m :: * -> *).
(IsWidget o, MonadIO m) =>
Bool -> m (GValueConstruct o)
constructWidgetNoShowAll Bool
val = IO (GValueConstruct o) -> m (GValueConstruct o)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO (GValueConstruct o) -> m (GValueConstruct o))
-> IO (GValueConstruct o) -> m (GValueConstruct o)
forall a b. (a -> b) -> a -> b
$ do
    IO (GValueConstruct o) -> IO (GValueConstruct o)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO (GValueConstruct o) -> IO (GValueConstruct o))
-> IO (GValueConstruct o) -> IO (GValueConstruct o)
forall a b. (a -> b) -> a -> b
$ String -> Bool -> IO (GValueConstruct o)
forall o. String -> Bool -> IO (GValueConstruct o)
B.Properties.constructObjectPropertyBool String
"no-show-all" Bool
val

#if defined(ENABLE_OVERLOADING)
data WidgetNoShowAllPropertyInfo
instance AttrInfo WidgetNoShowAllPropertyInfo where
    type AttrAllowedOps WidgetNoShowAllPropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet]
    type AttrBaseTypeConstraint WidgetNoShowAllPropertyInfo = IsWidget
    type AttrSetTypeConstraint WidgetNoShowAllPropertyInfo = (~) Bool
    type AttrTransferTypeConstraint WidgetNoShowAllPropertyInfo = (~) Bool
    type AttrTransferType WidgetNoShowAllPropertyInfo = Bool
    type AttrGetType WidgetNoShowAllPropertyInfo = Bool
    type AttrLabel WidgetNoShowAllPropertyInfo = "no-show-all"
    type AttrOrigin WidgetNoShowAllPropertyInfo = Widget
    attrGet = getWidgetNoShowAll
    attrSet = setWidgetNoShowAll
    attrTransfer _ v = do
        return v
    attrConstruct = constructWidgetNoShowAll
    attrClear = undefined
    dbgAttrInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Gtk.Objects.Widget.noShowAll"
        , O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-3.0.38/docs/GI-Gtk-Objects-Widget.html#g:attr:noShowAll"
        })
#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 :: forall (m :: * -> *) o. (MonadIO m, IsWidget o) => o -> m Double
getWidgetOpacity o
obj = IO Double -> m Double
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.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 String
"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 :: forall (m :: * -> *) o.
(MonadIO m, IsWidget o) =>
o -> Double -> m ()
setWidgetOpacity o
obj Double
val = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    o -> String -> Double -> IO ()
forall a. GObject a => a -> String -> Double -> IO ()
B.Properties.setObjectPropertyDouble o
obj String
"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, MIO.MonadIO m) => Double -> m (GValueConstruct o)
constructWidgetOpacity :: forall o (m :: * -> *).
(IsWidget o, MonadIO m) =>
Double -> m (GValueConstruct o)
constructWidgetOpacity Double
val = IO (GValueConstruct o) -> m (GValueConstruct o)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO (GValueConstruct o) -> m (GValueConstruct o))
-> IO (GValueConstruct o) -> m (GValueConstruct o)
forall a b. (a -> b) -> a -> b
$ do
    IO (GValueConstruct o) -> IO (GValueConstruct o)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO (GValueConstruct o) -> IO (GValueConstruct o))
-> IO (GValueConstruct o) -> IO (GValueConstruct o)
forall a b. (a -> b) -> a -> b
$ String -> Double -> IO (GValueConstruct o)
forall o. String -> Double -> IO (GValueConstruct o)
B.Properties.constructObjectPropertyDouble String
"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
    dbgAttrInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Gtk.Objects.Widget.opacity"
        , O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-3.0.38/docs/GI-Gtk-Objects-Widget.html#g:attr:opacity"
        })
#endif

-- VVV Prop "parent"
   -- Type: TInterface (Name {namespace = "Gtk", name = "Container"})
   -- Flags: [PropertyReadable,PropertyWritable]
   -- Nullable: (Nothing,Nothing)

-- | 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 Gtk.Container.Container)
getWidgetParent :: forall (m :: * -> *) o.
(MonadIO m, IsWidget o) =>
o -> m (Maybe Container)
getWidgetParent o
obj = IO (Maybe Container) -> m (Maybe Container)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO (Maybe Container) -> m (Maybe Container))
-> IO (Maybe Container) -> m (Maybe Container)
forall a b. (a -> b) -> a -> b
$ o
-> String
-> (ManagedPtr Container -> Container)
-> IO (Maybe Container)
forall a b.
(GObject a, GObject b) =>
a -> String -> (ManagedPtr b -> b) -> IO (Maybe b)
B.Properties.getObjectPropertyObject o
obj String
"parent" ManagedPtr Container -> Container
Gtk.Container.Container

-- | Set 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.set' widget [ #parent 'Data.GI.Base.Attributes.:=' value ]
-- @
setWidgetParent :: (MonadIO m, IsWidget o, Gtk.Container.IsContainer a) => o -> a -> m ()
setWidgetParent :: forall (m :: * -> *) o a.
(MonadIO m, IsWidget o, IsContainer a) =>
o -> a -> m ()
setWidgetParent o
obj a
val = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    o -> String -> Maybe a -> IO ()
forall a b.
(GObject a, GObject b) =>
a -> String -> Maybe b -> IO ()
B.Properties.setObjectPropertyObject o
obj String
"parent" (a -> Maybe a
forall a. a -> Maybe a
Just a
val)

-- | Construct a `GValueConstruct` with valid value for the “@parent@” property. This is rarely needed directly, but it is used by `Data.GI.Base.Constructible.new`.
constructWidgetParent :: (IsWidget o, MIO.MonadIO m, Gtk.Container.IsContainer a) => a -> m (GValueConstruct o)
constructWidgetParent :: forall o (m :: * -> *) a.
(IsWidget o, MonadIO m, IsContainer a) =>
a -> m (GValueConstruct o)
constructWidgetParent a
val = IO (GValueConstruct o) -> m (GValueConstruct o)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO (GValueConstruct o) -> m (GValueConstruct o))
-> IO (GValueConstruct o) -> m (GValueConstruct o)
forall a b. (a -> b) -> a -> b
$ do
    IO (GValueConstruct o) -> IO (GValueConstruct o)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO (GValueConstruct o) -> IO (GValueConstruct o))
-> IO (GValueConstruct o) -> IO (GValueConstruct o)
forall a b. (a -> b) -> a -> b
$ String -> Maybe a -> IO (GValueConstruct o)
forall a o.
GObject a =>
String -> Maybe a -> IO (GValueConstruct o)
B.Properties.constructObjectPropertyObject String
"parent" (a -> Maybe a
forall a. a -> Maybe a
P.Just a
val)

-- | Set the value of the “@parent@” 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' #parent
-- @
clearWidgetParent :: (MonadIO m, IsWidget o) => o -> m ()
clearWidgetParent :: forall (m :: * -> *) o. (MonadIO m, IsWidget o) => o -> m ()
clearWidgetParent 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 Container -> IO ()
forall a b.
(GObject a, GObject b) =>
a -> String -> Maybe b -> IO ()
B.Properties.setObjectPropertyObject o
obj String
"parent" (Maybe Container
forall a. Maybe a
Nothing :: Maybe Gtk.Container.Container)

#if defined(ENABLE_OVERLOADING)
data WidgetParentPropertyInfo
instance AttrInfo WidgetParentPropertyInfo where
    type AttrAllowedOps WidgetParentPropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet, 'AttrClear]
    type AttrBaseTypeConstraint WidgetParentPropertyInfo = IsWidget
    type AttrSetTypeConstraint WidgetParentPropertyInfo = Gtk.Container.IsContainer
    type AttrTransferTypeConstraint WidgetParentPropertyInfo = Gtk.Container.IsContainer
    type AttrTransferType WidgetParentPropertyInfo = Gtk.Container.Container
    type AttrGetType WidgetParentPropertyInfo = (Maybe Gtk.Container.Container)
    type AttrLabel WidgetParentPropertyInfo = "parent"
    type AttrOrigin WidgetParentPropertyInfo = Widget
    attrGet = getWidgetParent
    attrSet = setWidgetParent
    attrTransfer _ v = do
        unsafeCastTo Gtk.Container.Container v
    attrConstruct = constructWidgetParent
    attrClear = clearWidgetParent
    dbgAttrInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Gtk.Objects.Widget.parent"
        , O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-3.0.38/docs/GI-Gtk-Objects-Widget.html#g:attr:parent"
        })
#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 :: forall (m :: * -> *) o. (MonadIO m, IsWidget o) => o -> m Bool
getWidgetReceivesDefault o
obj = IO Bool -> m Bool
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO Bool -> m Bool) -> IO Bool -> m Bool
forall a b. (a -> b) -> a -> b
$ o -> String -> IO Bool
forall a. GObject a => a -> String -> IO Bool
B.Properties.getObjectPropertyBool o
obj String
"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 :: forall (m :: * -> *) o.
(MonadIO m, IsWidget o) =>
o -> Bool -> m ()
setWidgetReceivesDefault o
obj Bool
val = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    o -> String -> WidgetGrabNotifyCallback
forall a. GObject a => a -> String -> WidgetGrabNotifyCallback
B.Properties.setObjectPropertyBool o
obj String
"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, MIO.MonadIO m) => Bool -> m (GValueConstruct o)
constructWidgetReceivesDefault :: forall o (m :: * -> *).
(IsWidget o, MonadIO m) =>
Bool -> m (GValueConstruct o)
constructWidgetReceivesDefault Bool
val = IO (GValueConstruct o) -> m (GValueConstruct o)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO (GValueConstruct o) -> m (GValueConstruct o))
-> IO (GValueConstruct o) -> m (GValueConstruct o)
forall a b. (a -> b) -> a -> b
$ do
    IO (GValueConstruct o) -> IO (GValueConstruct o)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO (GValueConstruct o) -> IO (GValueConstruct o))
-> IO (GValueConstruct o) -> IO (GValueConstruct o)
forall a b. (a -> b) -> a -> b
$ String -> Bool -> IO (GValueConstruct o)
forall o. String -> Bool -> IO (GValueConstruct o)
B.Properties.constructObjectPropertyBool String
"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
    dbgAttrInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Gtk.Objects.Widget.receivesDefault"
        , O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-3.0.38/docs/GI-Gtk-Objects-Widget.html#g:attr:receivesDefault"
        })
#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 :: forall (m :: * -> *) o. (MonadIO m, IsWidget o) => o -> m Int32
getWidgetScaleFactor o
obj = IO Int32 -> m Int32
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.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 String
"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
    dbgAttrInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Gtk.Objects.Widget.scaleFactor"
        , O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-3.0.38/docs/GI-Gtk-Objects-Widget.html#g:attr:scaleFactor"
        })
#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 :: forall (m :: * -> *) o. (MonadIO m, IsWidget o) => o -> m Bool
getWidgetSensitive o
obj = IO Bool -> m Bool
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO Bool -> m Bool) -> IO Bool -> m Bool
forall a b. (a -> b) -> a -> b
$ o -> String -> IO Bool
forall a. GObject a => a -> String -> IO Bool
B.Properties.getObjectPropertyBool o
obj String
"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 :: forall (m :: * -> *) o.
(MonadIO m, IsWidget o) =>
o -> Bool -> m ()
setWidgetSensitive o
obj Bool
val = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    o -> String -> WidgetGrabNotifyCallback
forall a. GObject a => a -> String -> WidgetGrabNotifyCallback
B.Properties.setObjectPropertyBool o
obj String
"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, MIO.MonadIO m) => Bool -> m (GValueConstruct o)
constructWidgetSensitive :: forall o (m :: * -> *).
(IsWidget o, MonadIO m) =>
Bool -> m (GValueConstruct o)
constructWidgetSensitive Bool
val = IO (GValueConstruct o) -> m (GValueConstruct o)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO (GValueConstruct o) -> m (GValueConstruct o))
-> IO (GValueConstruct o) -> m (GValueConstruct o)
forall a b. (a -> b) -> a -> b
$ do
    IO (GValueConstruct o) -> IO (GValueConstruct o)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO (GValueConstruct o) -> IO (GValueConstruct o))
-> IO (GValueConstruct o) -> IO (GValueConstruct o)
forall a b. (a -> b) -> a -> b
$ String -> Bool -> IO (GValueConstruct o)
forall o. String -> Bool -> IO (GValueConstruct o)
B.Properties.constructObjectPropertyBool String
"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
    dbgAttrInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Gtk.Objects.Widget.sensitive"
        , O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-3.0.38/docs/GI-Gtk-Objects-Widget.html#g:attr:sensitive"
        })
#endif

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

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

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

-- | Construct a `GValueConstruct` with valid value for the “@style@” property. This is rarely needed directly, but it is used by `Data.GI.Base.Constructible.new`.
constructWidgetStyle :: (IsWidget o, MIO.MonadIO m, Gtk.Style.IsStyle a) => a -> m (GValueConstruct o)
constructWidgetStyle :: forall o (m :: * -> *) a.
(IsWidget o, MonadIO m, IsStyle a) =>
a -> m (GValueConstruct o)
constructWidgetStyle a
val = IO (GValueConstruct o) -> m (GValueConstruct o)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO (GValueConstruct o) -> m (GValueConstruct o))
-> IO (GValueConstruct o) -> m (GValueConstruct o)
forall a b. (a -> b) -> a -> b
$ do
    IO (GValueConstruct o) -> IO (GValueConstruct o)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO (GValueConstruct o) -> IO (GValueConstruct o))
-> IO (GValueConstruct o) -> IO (GValueConstruct o)
forall a b. (a -> b) -> a -> b
$ String -> Maybe a -> IO (GValueConstruct o)
forall a o.
GObject a =>
String -> Maybe a -> IO (GValueConstruct o)
B.Properties.constructObjectPropertyObject String
"style" (a -> Maybe a
forall a. a -> Maybe a
P.Just a
val)

-- | Set the value of the “@style@” 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' #style
-- @
clearWidgetStyle :: (MonadIO m, IsWidget o) => o -> m ()
clearWidgetStyle :: forall (m :: * -> *) o. (MonadIO m, IsWidget o) => o -> m ()
clearWidgetStyle 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 -> WidgetStyleSetCallback
forall a b.
(GObject a, GObject b) =>
a -> String -> Maybe b -> IO ()
B.Properties.setObjectPropertyObject o
obj String
"style" (Maybe Style
forall a. Maybe a
Nothing :: Maybe Gtk.Style.Style)

#if defined(ENABLE_OVERLOADING)
data WidgetStylePropertyInfo
instance AttrInfo WidgetStylePropertyInfo where
    type AttrAllowedOps WidgetStylePropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet, 'AttrClear]
    type AttrBaseTypeConstraint WidgetStylePropertyInfo = IsWidget
    type AttrSetTypeConstraint WidgetStylePropertyInfo = Gtk.Style.IsStyle
    type AttrTransferTypeConstraint WidgetStylePropertyInfo = Gtk.Style.IsStyle
    type AttrTransferType WidgetStylePropertyInfo = Gtk.Style.Style
    type AttrGetType WidgetStylePropertyInfo = Gtk.Style.Style
    type AttrLabel WidgetStylePropertyInfo = "style"
    type AttrOrigin WidgetStylePropertyInfo = Widget
    attrGet = getWidgetStyle
    attrSet = setWidgetStyle
    attrTransfer _ v = do
        unsafeCastTo Gtk.Style.Style v
    attrConstruct = constructWidgetStyle
    attrClear = clearWidgetStyle
    dbgAttrInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Gtk.Objects.Widget.style"
        , O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-3.0.38/docs/GI-Gtk-Objects-Widget.html#g:attr:style"
        })
#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 :: forall (m :: * -> *) o.
(MonadIO m, IsWidget o) =>
o -> m (Maybe Text)
getWidgetTooltipMarkup o
obj = IO (Maybe Text) -> m (Maybe Text)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.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 String
"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 :: forall (m :: * -> *) o.
(MonadIO m, IsWidget o) =>
o -> Text -> m ()
setWidgetTooltipMarkup o
obj Text
val = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    o -> String -> Maybe Text -> IO ()
forall a. GObject a => a -> String -> Maybe Text -> IO ()
B.Properties.setObjectPropertyString o
obj String
"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, MIO.MonadIO m) => T.Text -> m (GValueConstruct o)
constructWidgetTooltipMarkup :: forall o (m :: * -> *).
(IsWidget o, MonadIO m) =>
Text -> m (GValueConstruct o)
constructWidgetTooltipMarkup Text
val = IO (GValueConstruct o) -> m (GValueConstruct o)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO (GValueConstruct o) -> m (GValueConstruct o))
-> IO (GValueConstruct o) -> m (GValueConstruct o)
forall a b. (a -> b) -> a -> b
$ do
    IO (GValueConstruct o) -> IO (GValueConstruct o)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO (GValueConstruct o) -> IO (GValueConstruct o))
-> IO (GValueConstruct o) -> IO (GValueConstruct o)
forall a b. (a -> b) -> a -> b
$ String -> Maybe Text -> IO (GValueConstruct o)
forall o. String -> Maybe Text -> IO (GValueConstruct o)
B.Properties.constructObjectPropertyString String
"tooltip-markup" (Text -> Maybe Text
forall a. a -> Maybe a
P.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 :: forall (m :: * -> *) o. (MonadIO m, IsWidget o) => o -> m ()
clearWidgetTooltipMarkup 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 String
"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
    dbgAttrInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Gtk.Objects.Widget.tooltipMarkup"
        , O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-3.0.38/docs/GI-Gtk-Objects-Widget.html#g:attr:tooltipMarkup"
        })
#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 :: forall (m :: * -> *) o.
(MonadIO m, IsWidget o) =>
o -> m (Maybe Text)
getWidgetTooltipText o
obj = IO (Maybe Text) -> m (Maybe Text)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.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 String
"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 :: forall (m :: * -> *) o.
(MonadIO m, IsWidget o) =>
o -> Text -> m ()
setWidgetTooltipText o
obj Text
val = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    o -> String -> Maybe Text -> IO ()
forall a. GObject a => a -> String -> Maybe Text -> IO ()
B.Properties.setObjectPropertyString o
obj String
"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, MIO.MonadIO m) => T.Text -> m (GValueConstruct o)
constructWidgetTooltipText :: forall o (m :: * -> *).
(IsWidget o, MonadIO m) =>
Text -> m (GValueConstruct o)
constructWidgetTooltipText Text
val = IO (GValueConstruct o) -> m (GValueConstruct o)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO (GValueConstruct o) -> m (GValueConstruct o))
-> IO (GValueConstruct o) -> m (GValueConstruct o)
forall a b. (a -> b) -> a -> b
$ do
    IO (GValueConstruct o) -> IO (GValueConstruct o)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO (GValueConstruct o) -> IO (GValueConstruct o))
-> IO (GValueConstruct o) -> IO (GValueConstruct o)
forall a b. (a -> b) -> a -> b
$ String -> Maybe Text -> IO (GValueConstruct o)
forall o. String -> Maybe Text -> IO (GValueConstruct o)
B.Properties.constructObjectPropertyString String
"tooltip-text" (Text -> Maybe Text
forall a. a -> Maybe a
P.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 :: forall (m :: * -> *) o. (MonadIO m, IsWidget o) => o -> m ()
clearWidgetTooltipText 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 String
"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
    dbgAttrInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Gtk.Objects.Widget.tooltipText"
        , O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-3.0.38/docs/GI-Gtk-Objects-Widget.html#g:attr:tooltipText"
        })
#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 :: forall (m :: * -> *) o. (MonadIO m, IsWidget o) => o -> m Align
getWidgetValign o
obj = IO Align -> m Align
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.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 String
"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 :: forall (m :: * -> *) o.
(MonadIO m, IsWidget o) =>
o -> Align -> m ()
setWidgetValign o
obj Align
val = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    o -> String -> Align -> IO ()
forall a b.
(GObject a, Enum b, BoxedEnum b) =>
a -> String -> b -> IO ()
B.Properties.setObjectPropertyEnum o
obj String
"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, MIO.MonadIO m) => Gtk.Enums.Align -> m (GValueConstruct o)
constructWidgetValign :: forall o (m :: * -> *).
(IsWidget o, MonadIO m) =>
Align -> m (GValueConstruct o)
constructWidgetValign Align
val = IO (GValueConstruct o) -> m (GValueConstruct o)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO (GValueConstruct o) -> m (GValueConstruct o))
-> IO (GValueConstruct o) -> m (GValueConstruct o)
forall a b. (a -> b) -> a -> b
$ do
    IO (GValueConstruct o) -> IO (GValueConstruct o)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO (GValueConstruct o) -> IO (GValueConstruct o))
-> IO (GValueConstruct o) -> IO (GValueConstruct o)
forall a b. (a -> b) -> a -> b
$ String -> Align -> IO (GValueConstruct o)
forall a o.
(Enum a, BoxedEnum a) =>
String -> a -> IO (GValueConstruct o)
B.Properties.constructObjectPropertyEnum String
"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
    dbgAttrInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Gtk.Objects.Widget.valign"
        , O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-3.0.38/docs/GI-Gtk-Objects-Widget.html#g:attr:valign"
        })
#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 :: forall (m :: * -> *) o. (MonadIO m, IsWidget o) => o -> m Bool
getWidgetVexpand o
obj = IO Bool -> m Bool
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO Bool -> m Bool) -> IO Bool -> m Bool
forall a b. (a -> b) -> a -> b
$ o -> String -> IO Bool
forall a. GObject a => a -> String -> IO Bool
B.Properties.getObjectPropertyBool o
obj String
"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 :: forall (m :: * -> *) o.
(MonadIO m, IsWidget o) =>
o -> Bool -> m ()
setWidgetVexpand o
obj Bool
val = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    o -> String -> WidgetGrabNotifyCallback
forall a. GObject a => a -> String -> WidgetGrabNotifyCallback
B.Properties.setObjectPropertyBool o
obj String
"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, MIO.MonadIO m) => Bool -> m (GValueConstruct o)
constructWidgetVexpand :: forall o (m :: * -> *).
(IsWidget o, MonadIO m) =>
Bool -> m (GValueConstruct o)
constructWidgetVexpand Bool
val = IO (GValueConstruct o) -> m (GValueConstruct o)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO (GValueConstruct o) -> m (GValueConstruct o))
-> IO (GValueConstruct o) -> m (GValueConstruct o)
forall a b. (a -> b) -> a -> b
$ do
    IO (GValueConstruct o) -> IO (GValueConstruct o)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO (GValueConstruct o) -> IO (GValueConstruct o))
-> IO (GValueConstruct o) -> IO (GValueConstruct o)
forall a b. (a -> b) -> a -> b
$ String -> Bool -> IO (GValueConstruct o)
forall o. String -> Bool -> IO (GValueConstruct o)
B.Properties.constructObjectPropertyBool String
"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
    dbgAttrInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Gtk.Objects.Widget.vexpand"
        , O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-3.0.38/docs/GI-Gtk-Objects-Widget.html#g:attr:vexpand"
        })
#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 :: forall (m :: * -> *) o. (MonadIO m, IsWidget o) => o -> m Bool
getWidgetVexpandSet o
obj = IO Bool -> m Bool
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO Bool -> m Bool) -> IO Bool -> m Bool
forall a b. (a -> b) -> a -> b
$ o -> String -> IO Bool
forall a. GObject a => a -> String -> IO Bool
B.Properties.getObjectPropertyBool o
obj String
"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 :: forall (m :: * -> *) o.
(MonadIO m, IsWidget o) =>
o -> Bool -> m ()
setWidgetVexpandSet o
obj Bool
val = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    o -> String -> WidgetGrabNotifyCallback
forall a. GObject a => a -> String -> WidgetGrabNotifyCallback
B.Properties.setObjectPropertyBool o
obj String
"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, MIO.MonadIO m) => Bool -> m (GValueConstruct o)
constructWidgetVexpandSet :: forall o (m :: * -> *).
(IsWidget o, MonadIO m) =>
Bool -> m (GValueConstruct o)
constructWidgetVexpandSet Bool
val = IO (GValueConstruct o) -> m (GValueConstruct o)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO (GValueConstruct o) -> m (GValueConstruct o))
-> IO (GValueConstruct o) -> m (GValueConstruct o)
forall a b. (a -> b) -> a -> b
$ do
    IO (GValueConstruct o) -> IO (GValueConstruct o)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO (GValueConstruct o) -> IO (GValueConstruct o))
-> IO (GValueConstruct o) -> IO (GValueConstruct o)
forall a b. (a -> b) -> a -> b
$ String -> Bool -> IO (GValueConstruct o)
forall o. String -> Bool -> IO (GValueConstruct o)
B.Properties.constructObjectPropertyBool String
"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
    dbgAttrInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Gtk.Objects.Widget.vexpandSet"
        , O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-3.0.38/docs/GI-Gtk-Objects-Widget.html#g:attr:vexpandSet"
        })
#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 :: forall (m :: * -> *) o. (MonadIO m, IsWidget o) => o -> m Bool
getWidgetVisible o
obj = IO Bool -> m Bool
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO Bool -> m Bool) -> IO Bool -> m Bool
forall a b. (a -> b) -> a -> b
$ o -> String -> IO Bool
forall a. GObject a => a -> String -> IO Bool
B.Properties.getObjectPropertyBool o
obj String
"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 :: forall (m :: * -> *) o.
(MonadIO m, IsWidget o) =>
o -> Bool -> m ()
setWidgetVisible o
obj Bool
val = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    o -> String -> WidgetGrabNotifyCallback
forall a. GObject a => a -> String -> WidgetGrabNotifyCallback
B.Properties.setObjectPropertyBool o
obj String
"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, MIO.MonadIO m) => Bool -> m (GValueConstruct o)
constructWidgetVisible :: forall o (m :: * -> *).
(IsWidget o, MonadIO m) =>
Bool -> m (GValueConstruct o)
constructWidgetVisible Bool
val = IO (GValueConstruct o) -> m (GValueConstruct o)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO (GValueConstruct o) -> m (GValueConstruct o))
-> IO (GValueConstruct o) -> m (GValueConstruct o)
forall a b. (a -> b) -> a -> b
$ do
    IO (GValueConstruct o) -> IO (GValueConstruct o)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO (GValueConstruct o) -> IO (GValueConstruct o))
-> IO (GValueConstruct o) -> IO (GValueConstruct o)
forall a b. (a -> b) -> a -> b
$ String -> Bool -> IO (GValueConstruct o)
forall o. String -> Bool -> IO (GValueConstruct o)
B.Properties.constructObjectPropertyBool String
"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
    dbgAttrInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Gtk.Objects.Widget.visible"
        , O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-3.0.38/docs/GI-Gtk-Objects-Widget.html#g:attr:visible"
        })
#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 :: forall (m :: * -> *) o. (MonadIO m, IsWidget o) => o -> m Int32
getWidgetWidthRequest o
obj = IO Int32 -> m Int32
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.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 String
"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 :: forall (m :: * -> *) o.
(MonadIO m, IsWidget o) =>
o -> Int32 -> m ()
setWidgetWidthRequest o
obj Int32
val = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    o -> String -> Int32 -> IO ()
forall a. GObject a => a -> String -> Int32 -> IO ()
B.Properties.setObjectPropertyInt32 o
obj String
"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, MIO.MonadIO m) => Int32 -> m (GValueConstruct o)
constructWidgetWidthRequest :: forall o (m :: * -> *).
(IsWidget o, MonadIO m) =>
Int32 -> m (GValueConstruct o)
constructWidgetWidthRequest Int32
val = IO (GValueConstruct o) -> m (GValueConstruct o)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO (GValueConstruct o) -> m (GValueConstruct o))
-> IO (GValueConstruct o) -> m (GValueConstruct o)
forall a b. (a -> b) -> a -> b
$ do
    IO (GValueConstruct o) -> IO (GValueConstruct o)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO (GValueConstruct o) -> IO (GValueConstruct o))
-> IO (GValueConstruct o) -> IO (GValueConstruct o)
forall a b. (a -> b) -> a -> b
$ String -> Int32 -> IO (GValueConstruct o)
forall o. String -> Int32 -> IO (GValueConstruct o)
B.Properties.constructObjectPropertyInt32 String
"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
    dbgAttrInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Gtk.Objects.Widget.widthRequest"
        , O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-3.0.38/docs/GI-Gtk-Objects-Widget.html#g:attr:widthRequest"
        })
#endif

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

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

#if defined(ENABLE_OVERLOADING)
data WidgetWindowPropertyInfo
instance AttrInfo WidgetWindowPropertyInfo where
    type AttrAllowedOps WidgetWindowPropertyInfo = '[ 'AttrGet, 'AttrClear]
    type AttrBaseTypeConstraint WidgetWindowPropertyInfo = IsWidget
    type AttrSetTypeConstraint WidgetWindowPropertyInfo = (~) ()
    type AttrTransferTypeConstraint WidgetWindowPropertyInfo = (~) ()
    type AttrTransferType WidgetWindowPropertyInfo = ()
    type AttrGetType WidgetWindowPropertyInfo = (Maybe Gdk.Window.Window)
    type AttrLabel WidgetWindowPropertyInfo = "window"
    type AttrOrigin WidgetWindowPropertyInfo = Widget
    attrGet = getWidgetWindow
    attrSet = undefined
    attrTransfer _ = undefined
    attrConstruct = undefined
    attrClear = undefined
    dbgAttrInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Gtk.Objects.Widget.window"
        , O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-3.0.38/docs/GI-Gtk-Objects-Widget.html#g:attr:window"
        })
#endif

#if defined(ENABLE_OVERLOADING)
instance O.HasAttributeList Widget
type instance O.AttributeList Widget = WidgetAttributeList
type WidgetAttributeList = ('[ '("appPaintable", WidgetAppPaintablePropertyInfo), '("canDefault", WidgetCanDefaultPropertyInfo), '("canFocus", WidgetCanFocusPropertyInfo), '("compositeChild", WidgetCompositeChildPropertyInfo), '("doubleBuffered", WidgetDoubleBufferedPropertyInfo), '("events", WidgetEventsPropertyInfo), '("expand", WidgetExpandPropertyInfo), '("focusOnClick", WidgetFocusOnClickPropertyInfo), '("halign", WidgetHalignPropertyInfo), '("hasDefault", WidgetHasDefaultPropertyInfo), '("hasFocus", WidgetHasFocusPropertyInfo), '("hasTooltip", WidgetHasTooltipPropertyInfo), '("heightRequest", WidgetHeightRequestPropertyInfo), '("hexpand", WidgetHexpandPropertyInfo), '("hexpandSet", WidgetHexpandSetPropertyInfo), '("isFocus", WidgetIsFocusPropertyInfo), '("margin", WidgetMarginPropertyInfo), '("marginBottom", WidgetMarginBottomPropertyInfo), '("marginEnd", WidgetMarginEndPropertyInfo), '("marginLeft", WidgetMarginLeftPropertyInfo), '("marginRight", WidgetMarginRightPropertyInfo), '("marginStart", WidgetMarginStartPropertyInfo), '("marginTop", WidgetMarginTopPropertyInfo), '("name", WidgetNamePropertyInfo), '("noShowAll", WidgetNoShowAllPropertyInfo), '("opacity", WidgetOpacityPropertyInfo), '("parent", WidgetParentPropertyInfo), '("receivesDefault", WidgetReceivesDefaultPropertyInfo), '("scaleFactor", WidgetScaleFactorPropertyInfo), '("sensitive", WidgetSensitivePropertyInfo), '("style", WidgetStylePropertyInfo), '("tooltipMarkup", WidgetTooltipMarkupPropertyInfo), '("tooltipText", WidgetTooltipTextPropertyInfo), '("valign", WidgetValignPropertyInfo), '("vexpand", WidgetVexpandPropertyInfo), '("vexpandSet", WidgetVexpandSetPropertyInfo), '("visible", WidgetVisiblePropertyInfo), '("widthRequest", WidgetWidthRequestPropertyInfo), '("window", WidgetWindowPropertyInfo)] :: [(Symbol, *)])
#endif

#if defined(ENABLE_OVERLOADING)
widgetAppPaintable :: AttrLabelProxy "appPaintable"
widgetAppPaintable = AttrLabelProxy

widgetCanDefault :: AttrLabelProxy "canDefault"
widgetCanDefault = AttrLabelProxy

widgetCanFocus :: AttrLabelProxy "canFocus"
widgetCanFocus = AttrLabelProxy

widgetCompositeChild :: AttrLabelProxy "compositeChild"
widgetCompositeChild = AttrLabelProxy

widgetDoubleBuffered :: AttrLabelProxy "doubleBuffered"
widgetDoubleBuffered = AttrLabelProxy

widgetEvents :: AttrLabelProxy "events"
widgetEvents = 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

widgetMargin :: AttrLabelProxy "margin"
widgetMargin = AttrLabelProxy

widgetMarginBottom :: AttrLabelProxy "marginBottom"
widgetMarginBottom = AttrLabelProxy

widgetMarginEnd :: AttrLabelProxy "marginEnd"
widgetMarginEnd = AttrLabelProxy

widgetMarginLeft :: AttrLabelProxy "marginLeft"
widgetMarginLeft = AttrLabelProxy

widgetMarginRight :: AttrLabelProxy "marginRight"
widgetMarginRight = AttrLabelProxy

widgetMarginStart :: AttrLabelProxy "marginStart"
widgetMarginStart = AttrLabelProxy

widgetMarginTop :: AttrLabelProxy "marginTop"
widgetMarginTop = AttrLabelProxy

widgetName :: AttrLabelProxy "name"
widgetName = AttrLabelProxy

widgetNoShowAll :: AttrLabelProxy "noShowAll"
widgetNoShowAll = AttrLabelProxy

widgetOpacity :: AttrLabelProxy "opacity"
widgetOpacity = AttrLabelProxy

widgetParent :: AttrLabelProxy "parent"
widgetParent = AttrLabelProxy

widgetReceivesDefault :: AttrLabelProxy "receivesDefault"
widgetReceivesDefault = AttrLabelProxy

widgetScaleFactor :: AttrLabelProxy "scaleFactor"
widgetScaleFactor = AttrLabelProxy

widgetSensitive :: AttrLabelProxy "sensitive"
widgetSensitive = AttrLabelProxy

widgetStyle :: AttrLabelProxy "style"
widgetStyle = 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

widgetWindow :: AttrLabelProxy "window"
widgetWindow = AttrLabelProxy

#endif

#if defined(ENABLE_OVERLOADING)
type instance O.SignalList Widget = WidgetSignalList
type WidgetSignalList = ('[ '("accelClosuresChanged", WidgetAccelClosuresChangedSignalInfo), '("buttonPressEvent", WidgetButtonPressEventSignalInfo), '("buttonReleaseEvent", WidgetButtonReleaseEventSignalInfo), '("canActivateAccel", WidgetCanActivateAccelSignalInfo), '("childNotify", WidgetChildNotifySignalInfo), '("compositedChanged", WidgetCompositedChangedSignalInfo), '("configureEvent", WidgetConfigureEventSignalInfo), '("damageEvent", WidgetDamageEventSignalInfo), '("deleteEvent", WidgetDeleteEventSignalInfo), '("destroy", WidgetDestroySignalInfo), '("destroyEvent", WidgetDestroyEventSignalInfo), '("directionChanged", WidgetDirectionChangedSignalInfo), '("dragBegin", WidgetDragBeginSignalInfo), '("dragDataDelete", WidgetDragDataDeleteSignalInfo), '("dragDataGet", WidgetDragDataGetSignalInfo), '("dragDataReceived", WidgetDragDataReceivedSignalInfo), '("dragDrop", WidgetDragDropSignalInfo), '("dragEnd", WidgetDragEndSignalInfo), '("dragFailed", WidgetDragFailedSignalInfo), '("dragLeave", WidgetDragLeaveSignalInfo), '("dragMotion", WidgetDragMotionSignalInfo), '("draw", WidgetDrawSignalInfo), '("enterNotifyEvent", WidgetEnterNotifyEventSignalInfo), '("event", WidgetEventSignalInfo), '("eventAfter", WidgetEventAfterSignalInfo), '("focus", WidgetFocusSignalInfo), '("focusInEvent", WidgetFocusInEventSignalInfo), '("focusOutEvent", WidgetFocusOutEventSignalInfo), '("grabBrokenEvent", WidgetGrabBrokenEventSignalInfo), '("grabFocus", WidgetGrabFocusSignalInfo), '("grabNotify", WidgetGrabNotifySignalInfo), '("hide", WidgetHideSignalInfo), '("hierarchyChanged", WidgetHierarchyChangedSignalInfo), '("keyPressEvent", WidgetKeyPressEventSignalInfo), '("keyReleaseEvent", WidgetKeyReleaseEventSignalInfo), '("keynavFailed", WidgetKeynavFailedSignalInfo), '("leaveNotifyEvent", WidgetLeaveNotifyEventSignalInfo), '("map", WidgetMapSignalInfo), '("mapEvent", WidgetMapEventSignalInfo), '("mnemonicActivate", WidgetMnemonicActivateSignalInfo), '("motionNotifyEvent", WidgetMotionNotifyEventSignalInfo), '("moveFocus", WidgetMoveFocusSignalInfo), '("notify", GObject.Object.ObjectNotifySignalInfo), '("parentSet", WidgetParentSetSignalInfo), '("popupMenu", WidgetPopupMenuSignalInfo), '("propertyNotifyEvent", WidgetPropertyNotifyEventSignalInfo), '("proximityInEvent", WidgetProximityInEventSignalInfo), '("proximityOutEvent", WidgetProximityOutEventSignalInfo), '("queryTooltip", WidgetQueryTooltipSignalInfo), '("realize", WidgetRealizeSignalInfo), '("screenChanged", WidgetScreenChangedSignalInfo), '("scrollEvent", WidgetScrollEventSignalInfo), '("selectionClearEvent", WidgetSelectionClearEventSignalInfo), '("selectionGet", WidgetSelectionGetSignalInfo), '("selectionNotifyEvent", WidgetSelectionNotifyEventSignalInfo), '("selectionReceived", WidgetSelectionReceivedSignalInfo), '("selectionRequestEvent", WidgetSelectionRequestEventSignalInfo), '("show", WidgetShowSignalInfo), '("showHelp", WidgetShowHelpSignalInfo), '("sizeAllocate", WidgetSizeAllocateSignalInfo), '("stateChanged", WidgetStateChangedSignalInfo), '("stateFlagsChanged", WidgetStateFlagsChangedSignalInfo), '("styleSet", WidgetStyleSetSignalInfo), '("styleUpdated", WidgetStyleUpdatedSignalInfo), '("touchEvent", WidgetTouchEventSignalInfo), '("unmap", WidgetUnmapSignalInfo), '("unmapEvent", WidgetUnmapEventSignalInfo), '("unrealize", WidgetUnrealizeSignalInfo), '("visibilityNotifyEvent", WidgetVisibilityNotifyEventSignalInfo), '("windowStateEvent", WidgetWindowStateEventSignalInfo)] :: [(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 :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsWidget a) =>
a -> m Bool
widgetActivate a
widget = IO Bool -> m Bool
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Bool -> m Bool) -> IO Bool -> 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
/= CInt
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.OverloadedMethod WidgetActivateMethodInfo a signature where
    overloadedMethod = widgetActivate

instance O.OverloadedMethodInfo WidgetActivateMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Gtk.Objects.Widget.widgetActivate",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-3.0.38/docs/GI-Gtk-Objects-Widget.html#v:widgetActivate"
        })


#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 :: forall (m :: * -> *) a b.
(HasCallStack, MonadIO m, IsWidget a, IsAccelGroup b) =>
a -> Text -> b -> Word32 -> [ModifierType] -> [AccelFlags] -> m ()
widgetAddAccelerator a
widget Text
accelSignal b
accelGroup Word32
accelKey [ModifierType]
accelMods [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.OverloadedMethod WidgetAddAcceleratorMethodInfo a signature where
    overloadedMethod = widgetAddAccelerator

instance O.OverloadedMethodInfo WidgetAddAcceleratorMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Gtk.Objects.Widget.widgetAddAccelerator",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-3.0.38/docs/GI-Gtk-Objects-Widget.html#v:widgetAddAccelerator"
        })


#endif

-- method Widget::add_device_events
-- 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
--           }
--       , Arg
--           { argCName = "events"
--           , argType =
--               TInterface Name { namespace = "Gdk" , name = "EventMask" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "an event mask, see #GdkEventMask"
--                 , 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_device_events" gtk_widget_add_device_events :: 
    Ptr Widget ->                           -- widget : TInterface (Name {namespace = "Gtk", name = "Widget"})
    Ptr Gdk.Device.Device ->                -- device : TInterface (Name {namespace = "Gdk", name = "Device"})
    CUInt ->                                -- events : TInterface (Name {namespace = "Gdk", name = "EventMask"})
    IO ()

-- | Adds the device events in the bitfield /@events@/ to the event mask for
-- /@widget@/. See 'GI.Gtk.Objects.Widget.widgetSetDeviceEvents' for details.
-- 
-- /Since: 3.0/
widgetAddDeviceEvents ::
    (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'
    -> [Gdk.Flags.EventMask]
    -- ^ /@events@/: an event mask, see t'GI.Gdk.Flags.EventMask'
    -> m ()
widgetAddDeviceEvents :: forall (m :: * -> *) a b.
(HasCallStack, MonadIO m, IsWidget a, IsDevice b) =>
a -> b -> [EventMask] -> m ()
widgetAddDeviceEvents a
widget b
device [EventMask]
events = 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 Device
device' <- b -> IO (Ptr Device)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
device
    let events' :: CUInt
events' = [EventMask] -> CUInt
forall b a. (Num b, IsGFlag a) => [a] -> b
gflagsToWord [EventMask]
events
    Ptr Widget -> Ptr Device -> CUInt -> IO ()
gtk_widget_add_device_events Ptr Widget
widget' Ptr Device
device' CUInt
events'
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
widget
    b -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr b
device
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()

#if defined(ENABLE_OVERLOADING)
data WidgetAddDeviceEventsMethodInfo
instance (signature ~ (b -> [Gdk.Flags.EventMask] -> m ()), MonadIO m, IsWidget a, Gdk.Device.IsDevice b) => O.OverloadedMethod WidgetAddDeviceEventsMethodInfo a signature where
    overloadedMethod = widgetAddDeviceEvents

instance O.OverloadedMethodInfo WidgetAddDeviceEventsMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Gtk.Objects.Widget.widgetAddDeviceEvents",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-3.0.38/docs/GI-Gtk-Objects-Widget.html#v:widgetAddDeviceEvents"
        })


#endif

-- method Widget::add_events
-- 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 = "events"
--           , argType =
--               TInterface Name { namespace = "Gdk" , name = "EventMask" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "an event mask, see #GdkEventMask"
--                 , 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_events" gtk_widget_add_events :: 
    Ptr Widget ->                           -- widget : TInterface (Name {namespace = "Gtk", name = "Widget"})
    CUInt ->                                -- events : TInterface (Name {namespace = "Gdk", name = "EventMask"})
    IO ()

-- | Adds the events in the bitfield /@events@/ to the event mask for
-- /@widget@/. See 'GI.Gtk.Objects.Widget.widgetSetEvents' and the
-- [input handling overview][event-masks] for details.
widgetAddEvents ::
    (B.CallStack.HasCallStack, MonadIO m, IsWidget a) =>
    a
    -- ^ /@widget@/: a t'GI.Gtk.Objects.Widget.Widget'
    -> [Gdk.Flags.EventMask]
    -- ^ /@events@/: an event mask, see t'GI.Gdk.Flags.EventMask'
    -> m ()
widgetAddEvents :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsWidget a) =>
a -> [EventMask] -> m ()
widgetAddEvents a
widget [EventMask]
events = 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 events' :: CUInt
events' = [EventMask] -> CUInt
forall b a. (Num b, IsGFlag a) => [a] -> b
gflagsToWord [EventMask]
events
    Ptr Widget -> CUInt -> IO ()
gtk_widget_add_events Ptr Widget
widget' CUInt
events'
    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 WidgetAddEventsMethodInfo
instance (signature ~ ([Gdk.Flags.EventMask] -> m ()), MonadIO m, IsWidget a) => O.OverloadedMethod WidgetAddEventsMethodInfo a signature where
    overloadedMethod = widgetAddEvents

instance O.OverloadedMethodInfo WidgetAddEventsMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Gtk.Objects.Widget.widgetAddEvents",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-3.0.38/docs/GI-Gtk-Objects-Widget.html#v:widgetAddEvents"
        })


#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#g:signal:destroy") signal or a weak notifier.
-- 
-- /Since: 2.4/
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 :: forall (m :: * -> *) a b.
(HasCallStack, MonadIO m, IsWidget a, IsWidget b) =>
a -> b -> m ()
widgetAddMnemonicLabel a
widget 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.OverloadedMethod WidgetAddMnemonicLabelMethodInfo a signature where
    overloadedMethod = widgetAddMnemonicLabel

instance O.OverloadedMethodInfo WidgetAddMnemonicLabelMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Gtk.Objects.Widget.widgetAddMnemonicLabel",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-3.0.38/docs/GI-Gtk-Objects-Widget.html#v: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.widgetQueueDrawArea' 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#g: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.
-- 
-- /Since: 3.8/
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 it to 'GI.Gtk.Objects.Widget.widgetRemoveTickCallback'
widgetAddTickCallback :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsWidget a) =>
a -> TickCallback -> m Word32
widgetAddTickCallback a
widget 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 ())
SP.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.OverloadedMethod WidgetAddTickCallbackMethodInfo a signature where
    overloadedMethod = widgetAddTickCallback

instance O.OverloadedMethodInfo WidgetAddTickCallbackMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Gtk.Objects.Widget.widgetAddTickCallback",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-3.0.38/docs/GI-Gtk-Objects-Widget.html#v:widgetAddTickCallback"
        })


#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#g: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.
-- 
-- /Since: 2.4/
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 :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsWidget a) =>
a -> Word32 -> m Bool
widgetCanActivateAccel a
widget Word32
signalId = IO Bool -> m Bool
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Bool -> m Bool) -> IO Bool -> 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
/= CInt
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.OverloadedMethod WidgetCanActivateAccelMethodInfo a signature where
    overloadedMethod = widgetCanActivateAccel

instance O.OverloadedMethodInfo WidgetCanActivateAccelMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Gtk.Objects.Widget.widgetCanActivateAccel",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-3.0.38/docs/GI-Gtk-Objects-Widget.html#v: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, and 'GI.Gtk.Objects.Container.containerSetFocusChain' to
-- change the focus tab order. So you may want to investigate those
-- functions instead.
-- 
-- '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
-- [focus]("GI.Gtk.Objects.Widget#g:signal:focus") signal; widgets override the default handler
-- for this signal in order to implement appropriate focus behavior.
-- 
-- The default [focus](#g: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 :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsWidget a) =>
a -> DirectionType -> m Bool
widgetChildFocus a
widget DirectionType
direction = IO Bool -> m Bool
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Bool -> m Bool) -> IO Bool -> 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
/= CInt
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.OverloadedMethod WidgetChildFocusMethodInfo a signature where
    overloadedMethod = widgetChildFocus

instance O.OverloadedMethodInfo WidgetChildFocusMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Gtk.Objects.Widget.widgetChildFocus",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-3.0.38/docs/GI-Gtk-Objects-Widget.html#v:widgetChildFocus"
        })


#endif

-- method Widget::child_notify
-- 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_property"
--           , argType = TBasicType TUTF8
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText =
--                     Just
--                       "the name of a child property installed on the\n                 class of @widget\8217s 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_child_notify" gtk_widget_child_notify :: 
    Ptr Widget ->                           -- widget : TInterface (Name {namespace = "Gtk", name = "Widget"})
    CString ->                              -- child_property : TBasicType TUTF8
    IO ()

-- | Emits a [childNotify]("GI.Gtk.Objects.Widget#g:signal:childNotify") signal for the
-- [child property][child-properties] /@childProperty@/
-- on /@widget@/.
-- 
-- This is the analogue of 'GI.GObject.Objects.Object.objectNotify' for child properties.
-- 
-- Also see 'GI.Gtk.Objects.Container.containerChildNotify'.
widgetChildNotify ::
    (B.CallStack.HasCallStack, MonadIO m, IsWidget a) =>
    a
    -- ^ /@widget@/: a t'GI.Gtk.Objects.Widget.Widget'
    -> T.Text
    -- ^ /@childProperty@/: the name of a child property installed on the
    --                  class of /@widget@/’s parent
    -> m ()
widgetChildNotify :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsWidget a) =>
a -> Text -> m ()
widgetChildNotify a
widget Text
childProperty = 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
childProperty' <- Text -> IO CString
textToCString Text
childProperty
    Ptr Widget -> CString -> IO ()
gtk_widget_child_notify Ptr Widget
widget' CString
childProperty'
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
widget
    CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
childProperty'
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()

#if defined(ENABLE_OVERLOADING)
data WidgetChildNotifyMethodInfo
instance (signature ~ (T.Text -> m ()), MonadIO m, IsWidget a) => O.OverloadedMethod WidgetChildNotifyMethodInfo a signature where
    overloadedMethod = widgetChildNotify

instance O.OverloadedMethodInfo WidgetChildNotifyMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Gtk.Objects.Widget.widgetChildNotify",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-3.0.38/docs/GI-Gtk-Objects-Widget.html#v:widgetChildNotify"
        })


#endif

-- method Widget::class_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 = "path_length"
--           , argType = TBasicType TUInt
--           , direction = DirectionOut
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText =
--                     Just
--                       "location to store the length of the\n    class path, or %NULL"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferEverything
--           }
--       , Arg
--           { argCName = "path"
--           , argType = TBasicType TUTF8
--           , direction = DirectionOut
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText =
--                     Just
--                       "location to store the class path as an\n    allocated string, or %NULL"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferEverything
--           }
--       , Arg
--           { argCName = "path_reversed"
--           , argType = TBasicType TUTF8
--           , direction = DirectionOut
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText =
--                     Just
--                       "location to store the reverse\n    class path as an allocated string, 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_class_path" gtk_widget_class_path :: 
    Ptr Widget ->                           -- widget : TInterface (Name {namespace = "Gtk", name = "Widget"})
    Ptr Word32 ->                           -- path_length : TBasicType TUInt
    Ptr CString ->                          -- path : TBasicType TUTF8
    Ptr CString ->                          -- path_reversed : TBasicType TUTF8
    IO ()

{-# DEPRECATED widgetClassPath ["(Since version 3.0)","Use 'GI.Gtk.Objects.Widget.widgetGetPath' instead"] #-}
-- | Same as 'GI.Gtk.Objects.Widget.widgetPath', but always uses the name of a widget’s type,
-- never uses a custom name set with 'GI.Gtk.Objects.Widget.widgetSetName'.
widgetClassPath ::
    (B.CallStack.HasCallStack, MonadIO m, IsWidget a) =>
    a
    -- ^ /@widget@/: a t'GI.Gtk.Objects.Widget.Widget'
    -> m ((Word32, T.Text, T.Text))
widgetClassPath :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsWidget a) =>
a -> m (Word32, Text, Text)
widgetClassPath a
widget = IO (Word32, Text, Text) -> m (Word32, Text, Text)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Word32, Text, Text) -> m (Word32, Text, Text))
-> IO (Word32, Text, Text) -> m (Word32, Text, 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 Word32
pathLength <- IO (Ptr Word32)
forall a. Storable a => IO (Ptr a)
allocMem :: IO (Ptr Word32)
    Ptr CString
path <- IO (Ptr CString)
forall a. Storable a => IO (Ptr a)
callocMem :: IO (Ptr CString)
    Ptr CString
pathReversed <- IO (Ptr CString)
forall a. Storable a => IO (Ptr a)
callocMem :: IO (Ptr CString)
    Ptr Widget -> Ptr Word32 -> Ptr CString -> Ptr CString -> IO ()
gtk_widget_class_path Ptr Widget
widget' Ptr Word32
pathLength Ptr CString
path Ptr CString
pathReversed
    Word32
pathLength' <- Ptr Word32 -> IO Word32
forall a. Storable a => Ptr a -> IO a
peek Ptr Word32
pathLength
    CString
path' <- Ptr CString -> IO CString
forall a. Storable a => Ptr a -> IO a
peek Ptr CString
path
    Text
path'' <- HasCallStack => CString -> IO Text
CString -> IO Text
cstringToText CString
path'
    CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
path'
    CString
pathReversed' <- Ptr CString -> IO CString
forall a. Storable a => Ptr a -> IO a
peek Ptr CString
pathReversed
    Text
pathReversed'' <- HasCallStack => CString -> IO Text
CString -> IO Text
cstringToText CString
pathReversed'
    CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
pathReversed'
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
widget
    Ptr Word32 -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr Word32
pathLength
    Ptr CString -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr CString
path
    Ptr CString -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr CString
pathReversed
    (Word32, Text, Text) -> IO (Word32, Text, Text)
forall (m :: * -> *) a. Monad m => a -> m a
return (Word32
pathLength', Text
path'', Text
pathReversed'')

#if defined(ENABLE_OVERLOADING)
data WidgetClassPathMethodInfo
instance (signature ~ (m ((Word32, T.Text, T.Text))), MonadIO m, IsWidget a) => O.OverloadedMethod WidgetClassPathMethodInfo a signature where
    overloadedMethod = widgetClassPath

instance O.OverloadedMethodInfo WidgetClassPathMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Gtk.Objects.Widget.widgetClassPath",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-3.0.38/docs/GI-Gtk-Objects-Widget.html#v:widgetClassPath"
        })


#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 :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsWidget a) =>
a -> Orientation -> m Bool
widgetComputeExpand a
widget Orientation
orientation = IO Bool -> m Bool
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Bool -> m Bool) -> IO Bool -> 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
/= CInt
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.OverloadedMethod WidgetComputeExpandMethodInfo a signature where
    overloadedMethod = widgetComputeExpand

instance O.OverloadedMethodInfo WidgetComputeExpandMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Gtk.Objects.Widget.widgetComputeExpand",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-3.0.38/docs/GI-Gtk-Objects-Widget.html#v:widgetComputeExpand"
        })


#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 :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsWidget a) =>
a -> m Context
widgetCreatePangoContext 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 Text
"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.OverloadedMethod WidgetCreatePangoContextMethodInfo a signature where
    overloadedMethod = widgetCreatePangoContext

instance O.OverloadedMethodInfo WidgetCreatePangoContextMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Gtk.Objects.Widget.widgetCreatePangoContext",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-3.0.38/docs/GI-Gtk-Objects-Widget.html#v: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 [screenChanged]("GI.Gtk.Objects.Widget#g:signal:screenChanged") 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 :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsWidget a) =>
a -> Maybe Text -> m Layout
widgetCreatePangoLayout a
widget 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
        Maybe Text
Nothing -> CString -> IO CString
forall (m :: * -> *) a. Monad m => a -> m a
return CString
forall a. Ptr a
nullPtr
        Just 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 Text
"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.OverloadedMethod WidgetCreatePangoLayoutMethodInfo a signature where
    overloadedMethod = widgetCreatePangoLayout

instance O.OverloadedMethodInfo WidgetCreatePangoLayoutMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Gtk.Objects.Widget.widgetCreatePangoLayout",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-3.0.38/docs/GI-Gtk-Objects-Widget.html#v: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#g: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 :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsWidget a) =>
a -> m ()
widgetDestroy 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.OverloadedMethod WidgetDestroyMethodInfo a signature where
    overloadedMethod = widgetDestroy

instance O.OverloadedMethodInfo WidgetDestroyMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Gtk.Objects.Widget.widgetDestroy",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-3.0.38/docs/GI-Gtk-Objects-Widget.html#v: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 :: forall (m :: * -> *) a b.
(HasCallStack, MonadIO m, IsWidget a, IsWidget b) =>
a -> b -> m Widget
widgetDestroyed a
widget 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.OverloadedMethod WidgetDestroyedMethodInfo a signature where
    overloadedMethod = widgetDestroyed

instance O.OverloadedMethodInfo WidgetDestroyedMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Gtk.Objects.Widget.widgetDestroyed",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-3.0.38/docs/GI-Gtk-Objects-Widget.html#v: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#g:signal:grabNotify") signal to check for specific
-- devices. See 'GI.Gtk.Functions.deviceGrabAdd'.
-- 
-- /Since: 3.0/
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 :: forall (m :: * -> *) a b.
(HasCallStack, MonadIO m, IsWidget a, IsDevice b) =>
a -> b -> m Bool
widgetDeviceIsShadowed a
widget b
device = IO Bool -> m Bool
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Bool -> m Bool) -> IO Bool -> 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
/= CInt
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.OverloadedMethod WidgetDeviceIsShadowedMethodInfo a signature where
    overloadedMethod = widgetDeviceIsShadowed

instance O.OverloadedMethodInfo WidgetDeviceIsShadowedMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Gtk.Objects.Widget.widgetDeviceIsShadowed",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-3.0.38/docs/GI-Gtk-Objects-Widget.html#v: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 = "targets"
--           , argType =
--               TInterface Name { namespace = "Gtk" , name = "TargetList" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText =
--                     Just
--                       "The targets (data formats) in which the\n   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 = "button"
--           , argType = TBasicType TInt
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "The button the user clicked to start the drag"
--                 , 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 = True
--           , argDoc =
--               Documentation
--                 { rawDocText =
--                     Just
--                       "The event that triggered the start of the drag,\n   or %NULL if none can be obtained."
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TInterface Name { namespace = "Gdk" , name = "DragContext" })
-- throws : False
-- Skip return : False

foreign import ccall "gtk_drag_begin" gtk_drag_begin :: 
    Ptr Widget ->                           -- widget : TInterface (Name {namespace = "Gtk", name = "Widget"})
    Ptr Gtk.TargetList.TargetList ->        -- targets : TInterface (Name {namespace = "Gtk", name = "TargetList"})
    CUInt ->                                -- actions : TInterface (Name {namespace = "Gdk", name = "DragAction"})
    Int32 ->                                -- button : TBasicType TInt
    Ptr Gdk.Event.Event ->                  -- event : TInterface (Name {namespace = "Gdk", name = "Event"})
    IO (Ptr Gdk.DragContext.DragContext)

{-# DEPRECATED widgetDragBegin ["(Since version 3.10)","Use 'GI.Gtk.Objects.Widget.widgetDragBeginWithCoordinates' instead"] #-}
-- | This function is equivalent to 'GI.Gtk.Objects.Widget.widgetDragBeginWithCoordinates',
-- passing -1, -1 as coordinates.
widgetDragBegin ::
    (B.CallStack.HasCallStack, MonadIO m, IsWidget a) =>
    a
    -- ^ /@widget@/: the source widget
    -> Gtk.TargetList.TargetList
    -- ^ /@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
    -- ^ /@button@/: The button the user clicked to start the drag
    -> Maybe (Gdk.Event.Event)
    -- ^ /@event@/: The event that triggered the start of the drag,
    --    or 'P.Nothing' if none can be obtained.
    -> m Gdk.DragContext.DragContext
    -- ^ __Returns:__ the context for this drag
widgetDragBegin :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsWidget a) =>
a
-> TargetList
-> [DragAction]
-> Int32
-> Maybe Event
-> m DragContext
widgetDragBegin a
widget TargetList
targets [DragAction]
actions Int32
button Maybe Event
event = IO DragContext -> m DragContext
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO DragContext -> m DragContext)
-> IO DragContext -> m DragContext
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 TargetList
targets' <- TargetList -> IO (Ptr TargetList)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr TargetList
targets
    let actions' :: CUInt
actions' = [DragAction] -> CUInt
forall b a. (Num b, IsGFlag a) => [a] -> b
gflagsToWord [DragAction]
actions
    Ptr Event
maybeEvent <- case Maybe Event
event of
        Maybe Event
Nothing -> Ptr Event -> IO (Ptr Event)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr Event
forall a. Ptr a
nullPtr
        Just Event
jEvent -> do
            Ptr Event
jEvent' <- Event -> IO (Ptr Event)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr Event
jEvent
            Ptr Event -> IO (Ptr Event)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr Event
jEvent'
    Ptr DragContext
result <- Ptr Widget
-> Ptr TargetList
-> CUInt
-> Int32
-> Ptr Event
-> IO (Ptr DragContext)
gtk_drag_begin Ptr Widget
widget' Ptr TargetList
targets' CUInt
actions' Int32
button Ptr Event
maybeEvent
    Text -> Ptr DragContext -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"widgetDragBegin" Ptr DragContext
result
    DragContext
result' <- ((ManagedPtr DragContext -> DragContext)
-> Ptr DragContext -> IO DragContext
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr DragContext -> DragContext
Gdk.DragContext.DragContext) Ptr DragContext
result
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
widget
    TargetList -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr TargetList
targets
    Maybe Event -> WidgetEventAfterCallback -> IO ()
forall (m :: * -> *) a. Monad m => Maybe a -> (a -> m ()) -> m ()
whenJust Maybe Event
event WidgetEventAfterCallback
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr
    DragContext -> IO DragContext
forall (m :: * -> *) a. Monad m => a -> m a
return DragContext
result'

#if defined(ENABLE_OVERLOADING)
data WidgetDragBeginMethodInfo
instance (signature ~ (Gtk.TargetList.TargetList -> [Gdk.Flags.DragAction] -> Int32 -> Maybe (Gdk.Event.Event) -> m Gdk.DragContext.DragContext), MonadIO m, IsWidget a) => O.OverloadedMethod WidgetDragBeginMethodInfo a signature where
    overloadedMethod = widgetDragBegin

instance O.OverloadedMethodInfo WidgetDragBeginMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Gtk.Objects.Widget.widgetDragBegin",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-3.0.38/docs/GI-Gtk-Objects-Widget.html#v:widgetDragBegin"
        })


#endif

-- method Widget::drag_begin_with_coordinates
-- 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 = "targets"
--           , argType =
--               TInterface Name { namespace = "Gtk" , name = "TargetList" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText =
--                     Just
--                       "The targets (data formats) in which the\n   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 = "button"
--           , argType = TBasicType TInt
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "The button the user clicked to start the drag"
--                 , 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 = True
--           , argDoc =
--               Documentation
--                 { rawDocText =
--                     Just
--                       "The event that triggered the start of the drag,\n   or %NULL if none can be obtained."
--                 , 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\n   of @widget. If -1 is passed, the coordinates are retrieved from @event or\n   the current pointer position"
--                 , 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\n   of @widget. If -1 is passed, the coordinates are retrieved from @event or\n   the current pointer position"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TInterface Name { namespace = "Gdk" , name = "DragContext" })
-- throws : False
-- Skip return : False

foreign import ccall "gtk_drag_begin_with_coordinates" gtk_drag_begin_with_coordinates :: 
    Ptr Widget ->                           -- widget : TInterface (Name {namespace = "Gtk", name = "Widget"})
    Ptr Gtk.TargetList.TargetList ->        -- targets : TInterface (Name {namespace = "Gtk", name = "TargetList"})
    CUInt ->                                -- actions : TInterface (Name {namespace = "Gdk", name = "DragAction"})
    Int32 ->                                -- button : TBasicType TInt
    Ptr Gdk.Event.Event ->                  -- event : TInterface (Name {namespace = "Gdk", name = "Event"})
    Int32 ->                                -- x : TBasicType TInt
    Int32 ->                                -- y : TBasicType TInt
    IO (Ptr Gdk.DragContext.DragContext)

-- | 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.
-- 
-- The /@event@/ is used to retrieve the timestamp that will be used internally to
-- grab the pointer.  If /@event@/ is 'P.Nothing', then 'GI.Gdk.Constants.CURRENT_TIME' will be used.
-- However, you should try to pass a real event in all cases, since that can be
-- used to get information about the drag.
-- 
-- Generally there are three cases when you want to start a drag by hand by
-- calling this function:
-- 
-- 1. During a [buttonPressEvent]("GI.Gtk.Objects.Widget#g:signal:buttonPressEvent") handler, if you want to start a drag
-- immediately when the user presses the mouse button.  Pass the /@event@/
-- that you have in your [buttonPressEvent]("GI.Gtk.Objects.Widget#g:signal:buttonPressEvent") handler.
-- 
-- 2. During a [motionNotifyEvent]("GI.Gtk.Objects.Widget#g:signal:motionNotifyEvent") handler, if you want to start a drag
-- when the mouse moves past a certain threshold distance after a button-press.
-- Pass the /@event@/ that you have in your [motionNotifyEvent]("GI.Gtk.Objects.Widget#g:signal:motionNotifyEvent") handler.
-- 
-- 3. During a timeout handler, if you want to start a drag after the mouse
-- button is held down for some time.  Try to save the last event that you got
-- from the mouse, using 'GI.Gdk.Unions.Event.eventCopy', and pass it to this function
-- (remember to free the event with 'GI.Gdk.Unions.Event.eventFree' when you are done).
-- If you really cannot pass a real event, pass 'P.Nothing' instead.
-- 
-- /Since: 3.10/
widgetDragBeginWithCoordinates ::
    (B.CallStack.HasCallStack, MonadIO m, IsWidget a) =>
    a
    -- ^ /@widget@/: the source widget
    -> Gtk.TargetList.TargetList
    -- ^ /@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
    -- ^ /@button@/: The button the user clicked to start the drag
    -> Maybe (Gdk.Event.Event)
    -- ^ /@event@/: The event that triggered the start of the drag,
    --    or 'P.Nothing' if none can be obtained.
    -> Int32
    -- ^ /@x@/: The initial x coordinate to start dragging from, in the coordinate space
    --    of /@widget@/. If -1 is passed, the coordinates are retrieved from /@event@/ or
    --    the current pointer position
    -> Int32
    -- ^ /@y@/: The initial y coordinate to start dragging from, in the coordinate space
    --    of /@widget@/. If -1 is passed, the coordinates are retrieved from /@event@/ or
    --    the current pointer position
    -> m Gdk.DragContext.DragContext
    -- ^ __Returns:__ the context for this drag
widgetDragBeginWithCoordinates :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsWidget a) =>
a
-> TargetList
-> [DragAction]
-> Int32
-> Maybe Event
-> Int32
-> Int32
-> m DragContext
widgetDragBeginWithCoordinates a
widget TargetList
targets [DragAction]
actions Int32
button Maybe Event
event Int32
x Int32
y = IO DragContext -> m DragContext
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO DragContext -> m DragContext)
-> IO DragContext -> m DragContext
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 TargetList
targets' <- TargetList -> IO (Ptr TargetList)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr TargetList
targets
    let actions' :: CUInt
actions' = [DragAction] -> CUInt
forall b a. (Num b, IsGFlag a) => [a] -> b
gflagsToWord [DragAction]
actions
    Ptr Event
maybeEvent <- case Maybe Event
event of
        Maybe Event
Nothing -> Ptr Event -> IO (Ptr Event)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr Event
forall a. Ptr a
nullPtr
        Just Event
jEvent -> do
            Ptr Event
jEvent' <- Event -> IO (Ptr Event)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr Event
jEvent
            Ptr Event -> IO (Ptr Event)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr Event
jEvent'
    Ptr DragContext
result <- Ptr Widget
-> Ptr TargetList
-> CUInt
-> Int32
-> Ptr Event
-> Int32
-> Int32
-> IO (Ptr DragContext)
gtk_drag_begin_with_coordinates Ptr Widget
widget' Ptr TargetList
targets' CUInt
actions' Int32
button Ptr Event
maybeEvent Int32
x Int32
y
    Text -> Ptr DragContext -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"widgetDragBeginWithCoordinates" Ptr DragContext
result
    DragContext
result' <- ((ManagedPtr DragContext -> DragContext)
-> Ptr DragContext -> IO DragContext
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr DragContext -> DragContext
Gdk.DragContext.DragContext) Ptr DragContext
result
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
widget
    TargetList -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr TargetList
targets
    Maybe Event -> WidgetEventAfterCallback -> IO ()
forall (m :: * -> *) a. Monad m => Maybe a -> (a -> m ()) -> m ()
whenJust Maybe Event
event WidgetEventAfterCallback
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr
    DragContext -> IO DragContext
forall (m :: * -> *) a. Monad m => a -> m a
return DragContext
result'

#if defined(ENABLE_OVERLOADING)
data WidgetDragBeginWithCoordinatesMethodInfo
instance (signature ~ (Gtk.TargetList.TargetList -> [Gdk.Flags.DragAction] -> Int32 -> Maybe (Gdk.Event.Event) -> Int32 -> Int32 -> m Gdk.DragContext.DragContext), MonadIO m, IsWidget a) => O.OverloadedMethod WidgetDragBeginWithCoordinatesMethodInfo a signature where
    overloadedMethod = widgetDragBeginWithCoordinates

instance O.OverloadedMethodInfo WidgetDragBeginWithCoordinatesMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Gtk.Objects.Widget.widgetDragBeginWithCoordinates",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-3.0.38/docs/GI-Gtk-Objects-Widget.html#v:widgetDragBeginWithCoordinates"
        })


#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 :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsWidget a) =>
a -> Int32 -> Int32 -> Int32 -> Int32 -> m Bool
widgetDragCheckThreshold a
widget Int32
startX Int32
startY Int32
currentX Int32
currentY = IO Bool -> m Bool
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Bool -> m Bool) -> IO Bool -> 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
/= CInt
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.OverloadedMethod WidgetDragCheckThresholdMethodInfo a signature where
    overloadedMethod = widgetDragCheckThreshold

instance O.OverloadedMethodInfo WidgetDragCheckThresholdMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Gtk.Objects.Widget.widgetDragCheckThreshold",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-3.0.38/docs/GI-Gtk-Objects-Widget.html#v: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 'GI.Gtk.Structs.TargetList.targetListAddImageTargets' and
-- 'GI.Gtk.Objects.Widget.widgetDragDestSetTargetList'.
-- 
-- /Since: 2.6/
widgetDragDestAddImageTargets ::
    (B.CallStack.HasCallStack, MonadIO m, IsWidget a) =>
    a
    -- ^ /@widget@/: a t'GI.Gtk.Objects.Widget.Widget' that’s a drag destination
    -> m ()
widgetDragDestAddImageTargets :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsWidget a) =>
a -> m ()
widgetDragDestAddImageTargets 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.OverloadedMethod WidgetDragDestAddImageTargetsMethodInfo a signature where
    overloadedMethod = widgetDragDestAddImageTargets

instance O.OverloadedMethodInfo WidgetDragDestAddImageTargetsMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Gtk.Objects.Widget.widgetDragDestAddImageTargets",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-3.0.38/docs/GI-Gtk-Objects-Widget.html#v: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 'GI.Gtk.Structs.TargetList.targetListAddTextTargets' and
-- 'GI.Gtk.Objects.Widget.widgetDragDestSetTargetList'.
-- 
-- /Since: 2.6/
widgetDragDestAddTextTargets ::
    (B.CallStack.HasCallStack, MonadIO m, IsWidget a) =>
    a
    -- ^ /@widget@/: a t'GI.Gtk.Objects.Widget.Widget' that’s a drag destination
    -> m ()
widgetDragDestAddTextTargets :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsWidget a) =>
a -> m ()
widgetDragDestAddTextTargets 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.OverloadedMethod WidgetDragDestAddTextTargetsMethodInfo a signature where
    overloadedMethod = widgetDragDestAddTextTargets

instance O.OverloadedMethodInfo WidgetDragDestAddTextTargetsMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Gtk.Objects.Widget.widgetDragDestAddTextTargets",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-3.0.38/docs/GI-Gtk-Objects-Widget.html#v: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 'GI.Gtk.Structs.TargetList.targetListAddUriTargets' and
-- 'GI.Gtk.Objects.Widget.widgetDragDestSetTargetList'.
-- 
-- /Since: 2.6/
widgetDragDestAddUriTargets ::
    (B.CallStack.HasCallStack, MonadIO m, IsWidget a) =>
    a
    -- ^ /@widget@/: a t'GI.Gtk.Objects.Widget.Widget' that’s a drag destination
    -> m ()
widgetDragDestAddUriTargets :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsWidget a) =>
a -> m ()
widgetDragDestAddUriTargets 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.OverloadedMethod WidgetDragDestAddUriTargetsMethodInfo a signature where
    overloadedMethod = widgetDragDestAddUriTargets

instance O.OverloadedMethodInfo WidgetDragDestAddUriTargetsMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Gtk.Objects.Widget.widgetDragDestAddUriTargets",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-3.0.38/docs/GI-Gtk-Objects-Widget.html#v: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 = "context"
--           , argType =
--               TInterface Name { namespace = "Gdk" , name = "DragContext" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "drag context" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "target_list"
--           , argType =
--               TInterface Name { namespace = "Gtk" , name = "TargetList" }
--           , 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 (TInterface Name { namespace = "Gdk" , name = "Atom" })
-- 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.DragContext.DragContext ->      -- context : TInterface (Name {namespace = "Gdk", name = "DragContext"})
    Ptr Gtk.TargetList.TargetList ->        -- target_list : TInterface (Name {namespace = "Gtk", name = "TargetList"})
    IO (Ptr Gdk.Atom.Atom)

-- | Looks for a match between the supported targets of /@context@/ and the
-- /@destTargetList@/, returning the first matching target, otherwise
-- returning @/GDK_NONE/@. /@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.DragContext.IsDragContext b) =>
    a
    -- ^ /@widget@/: drag destination widget
    -> b
    -- ^ /@context@/: drag context
    -> Maybe (Gtk.TargetList.TargetList)
    -- ^ /@targetList@/: list of droppable targets, or 'P.Nothing' to use
    --    gtk_drag_dest_get_target_list (/@widget@/).
    -> m (Maybe Gdk.Atom.Atom)
    -- ^ __Returns:__ first target that the source offers
    --     and the dest can accept, or @/GDK_NONE/@
widgetDragDestFindTarget :: forall (m :: * -> *) a b.
(HasCallStack, MonadIO m, IsWidget a, IsDragContext b) =>
a -> b -> Maybe TargetList -> m (Maybe Atom)
widgetDragDestFindTarget a
widget b
context Maybe TargetList
targetList = IO (Maybe Atom) -> m (Maybe Atom)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Maybe Atom) -> m (Maybe Atom))
-> IO (Maybe Atom) -> m (Maybe Atom)
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 DragContext
context' <- b -> IO (Ptr DragContext)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
context
    Ptr TargetList
maybeTargetList <- case Maybe TargetList
targetList of
        Maybe TargetList
Nothing -> Ptr TargetList -> IO (Ptr TargetList)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr TargetList
forall a. Ptr a
nullPtr
        Just TargetList
jTargetList -> do
            Ptr TargetList
jTargetList' <- TargetList -> IO (Ptr TargetList)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr TargetList
jTargetList
            Ptr TargetList -> IO (Ptr TargetList)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr TargetList
jTargetList'
    Ptr Atom
result <- Ptr Widget -> Ptr DragContext -> Ptr TargetList -> IO (Ptr Atom)
gtk_drag_dest_find_target Ptr Widget
widget' Ptr DragContext
context' Ptr TargetList
maybeTargetList
    Maybe Atom
maybeResult <- Ptr Atom -> (Ptr Atom -> IO Atom) -> IO (Maybe Atom)
forall a b. Ptr a -> (Ptr a -> IO b) -> IO (Maybe b)
convertIfNonNull Ptr Atom
result ((Ptr Atom -> IO Atom) -> IO (Maybe Atom))
-> (Ptr Atom -> IO Atom) -> IO (Maybe Atom)
forall a b. (a -> b) -> a -> b
$ \Ptr Atom
result' -> do
        Atom
result'' <- ((ManagedPtr Atom -> Atom) -> Ptr Atom -> IO Atom
forall a.
(HasCallStack, BoxedPtr a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
newPtr ManagedPtr Atom -> Atom
Gdk.Atom.Atom) Ptr Atom
result'
        Atom -> IO Atom
forall (m :: * -> *) a. Monad m => a -> m a
return Atom
result''
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
widget
    b -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr b
context
    Maybe TargetList -> (TargetList -> IO ()) -> IO ()
forall (m :: * -> *) a. Monad m => Maybe a -> (a -> m ()) -> m ()
whenJust Maybe TargetList
targetList TargetList -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr
    Maybe Atom -> IO (Maybe Atom)
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe Atom
maybeResult

#if defined(ENABLE_OVERLOADING)
data WidgetDragDestFindTargetMethodInfo
instance (signature ~ (b -> Maybe (Gtk.TargetList.TargetList) -> m (Maybe Gdk.Atom.Atom)), MonadIO m, IsWidget a, Gdk.DragContext.IsDragContext b) => O.OverloadedMethod WidgetDragDestFindTargetMethodInfo a signature where
    overloadedMethod = widgetDragDestFindTarget

instance O.OverloadedMethodInfo WidgetDragDestFindTargetMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Gtk.Objects.Widget.widgetDragDestFindTarget",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-3.0.38/docs/GI-Gtk-Objects-Widget.html#v: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 = "Gtk" , name = "TargetList" })
-- 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 Gtk.TargetList.TargetList)

-- | 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 Gtk.TargetList.TargetList)
    -- ^ __Returns:__ the t'GI.Gtk.Structs.TargetList.TargetList', or 'P.Nothing' if none
widgetDragDestGetTargetList :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsWidget a) =>
a -> m (Maybe TargetList)
widgetDragDestGetTargetList a
widget = IO (Maybe TargetList) -> m (Maybe TargetList)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Maybe TargetList) -> m (Maybe TargetList))
-> IO (Maybe TargetList) -> m (Maybe TargetList)
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 TargetList
result <- Ptr Widget -> IO (Ptr TargetList)
gtk_drag_dest_get_target_list Ptr Widget
widget'
    Maybe TargetList
maybeResult <- Ptr TargetList
-> (Ptr TargetList -> IO TargetList) -> IO (Maybe TargetList)
forall a b. Ptr a -> (Ptr a -> IO b) -> IO (Maybe b)
convertIfNonNull Ptr TargetList
result ((Ptr TargetList -> IO TargetList) -> IO (Maybe TargetList))
-> (Ptr TargetList -> IO TargetList) -> IO (Maybe TargetList)
forall a b. (a -> b) -> a -> b
$ \Ptr TargetList
result' -> do
        TargetList
result'' <- ((ManagedPtr TargetList -> TargetList)
-> Ptr TargetList -> IO TargetList
forall a.
(HasCallStack, GBoxed a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
newBoxed ManagedPtr TargetList -> TargetList
Gtk.TargetList.TargetList) Ptr TargetList
result'
        TargetList -> IO TargetList
forall (m :: * -> *) a. Monad m => a -> m a
return TargetList
result''
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
widget
    Maybe TargetList -> IO (Maybe TargetList)
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe TargetList
maybeResult

#if defined(ENABLE_OVERLOADING)
data WidgetDragDestGetTargetListMethodInfo
instance (signature ~ (m (Maybe Gtk.TargetList.TargetList)), MonadIO m, IsWidget a) => O.OverloadedMethod WidgetDragDestGetTargetListMethodInfo a signature where
    overloadedMethod = widgetDragDestGetTargetList

instance O.OverloadedMethodInfo WidgetDragDestGetTargetListMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Gtk.Objects.Widget.widgetDragDestGetTargetList",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-3.0.38/docs/GI-Gtk-Objects-Widget.html#v: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#g:signal:dragMotion") signals.
-- 
-- /Since: 2.10/
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#g:signal:dragMotion") events
widgetDragDestGetTrackMotion :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsWidget a) =>
a -> m Bool
widgetDragDestGetTrackMotion a
widget = IO Bool -> m Bool
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Bool -> m Bool) -> IO Bool -> 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
/= CInt
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.OverloadedMethod WidgetDragDestGetTrackMotionMethodInfo a signature where
    overloadedMethod = widgetDragDestGetTrackMotion

instance O.OverloadedMethodInfo WidgetDragDestGetTrackMotionMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Gtk.Objects.Widget.widgetDragDestGetTrackMotion",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-3.0.38/docs/GI-Gtk-Objects-Widget.html#v: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 =
--               TCArray
--                 False
--                 (-1)
--                 3
--                 (TInterface Name { namespace = "Gtk" , name = "TargetEntry" })
--           , direction = DirectionIn
--           , mayBeNull = True
--           , argDoc =
--               Documentation
--                 { rawDocText =
--                     Just
--                       "a pointer to an array of\n    #GtkTargetEntrys indicating 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 = "n_targets"
--           , argType = TBasicType TInt
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "the number of entries in @targets"
--                 , 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: [ Arg
--              { argCName = "n_targets"
--              , argType = TBasicType TInt
--              , direction = DirectionIn
--              , mayBeNull = False
--              , argDoc =
--                  Documentation
--                    { rawDocText = Just "the number of entries in @targets"
--                    , sinceVersion = Nothing
--                    }
--              , argScope = ScopeTypeInvalid
--              , argClosure = -1
--              , argDestroy = -1
--              , argCallerAllocates = False
--              , transfer = TransferNothing
--              }
--          ]
-- 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 Gtk.TargetEntry.TargetEntry ->      -- targets : TCArray False (-1) 3 (TInterface (Name {namespace = "Gtk", name = "TargetEntry"}))
    Int32 ->                                -- n_targets : TBasicType TInt
    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#g:signal:dragMotion"), [dragDrop]("GI.Gtk.Objects.Widget#g: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#g: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#g: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 'GI.Gdk.Functions.dragStatus' in the context of [dragMotion]("GI.Gtk.Objects.Widget#g:signal:dragMotion"),
-- and invokations of 'GI.Gtk.Functions.dragFinish' in [dragDataReceived]("GI.Gtk.Objects.Widget#g:signal:dragDataReceived").
-- Especially the later is dramatic, when your own [dragMotion]("GI.Gtk.Objects.Widget#g: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#g: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,
-- >             GdkDragContext *context,
-- >             gint x,
-- >             gint y,
-- >             guint time)
-- >{
-- >  GdkModifierType mask;
-- >
-- >  gdk_window_get_pointer (gtk_widget_get_window (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 ([Gtk.TargetEntry.TargetEntry])
    -- ^ /@targets@/: a pointer to an array of
    --     @/GtkTargetEntrys/@ indicating 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 :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsWidget a) =>
a -> [DestDefaults] -> Maybe [TargetEntry] -> [DragAction] -> m ()
widgetDragDestSet a
widget [DestDefaults]
flags Maybe [TargetEntry]
targets [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
    let nTargets :: Int32
nTargets = case Maybe [TargetEntry]
targets of
            Maybe [TargetEntry]
Nothing -> Int32
0
            Just [TargetEntry]
jTargets -> Int -> Int32
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> Int32) -> Int -> Int32
forall a b. (a -> b) -> a -> b
$ [TargetEntry] -> Int
forall (t :: * -> *) a. Foldable t => t a -> Int
P.length [TargetEntry]
jTargets
    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 TargetEntry
maybeTargets <- case Maybe [TargetEntry]
targets of
        Maybe [TargetEntry]
Nothing -> Ptr TargetEntry -> IO (Ptr TargetEntry)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr TargetEntry
forall a. Ptr a
nullPtr
        Just [TargetEntry]
jTargets -> do
            [Ptr TargetEntry]
jTargets' <- (TargetEntry -> IO (Ptr TargetEntry))
-> [TargetEntry] -> IO [Ptr TargetEntry]
forall (t :: * -> *) (m :: * -> *) a b.
(Traversable t, Monad m) =>
(a -> m b) -> t a -> m (t b)
mapM TargetEntry -> IO (Ptr TargetEntry)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr [TargetEntry]
jTargets
            Ptr TargetEntry
jTargets'' <- Int -> [Ptr TargetEntry] -> IO (Ptr TargetEntry)
forall a. Int -> [Ptr a] -> IO (Ptr a)
packBlockArray Int
16 [Ptr TargetEntry]
jTargets'
            Ptr TargetEntry -> IO (Ptr TargetEntry)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr TargetEntry
jTargets''
    let actions' :: CUInt
actions' = [DragAction] -> CUInt
forall b a. (Num b, IsGFlag a) => [a] -> b
gflagsToWord [DragAction]
actions
    Ptr Widget -> CUInt -> Ptr TargetEntry -> Int32 -> CUInt -> IO ()
gtk_drag_dest_set Ptr Widget
widget' CUInt
flags' Ptr TargetEntry
maybeTargets Int32
nTargets CUInt
actions'
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
widget
    Maybe [TargetEntry] -> ([TargetEntry] -> IO ()) -> IO ()
forall (m :: * -> *) a. Monad m => Maybe a -> (a -> m ()) -> m ()
whenJust Maybe [TargetEntry]
targets ((TargetEntry -> IO ()) -> [TargetEntry] -> IO ()
forall (t :: * -> *) (m :: * -> *) a b.
(Foldable t, Monad m) =>
(a -> m b) -> t a -> m ()
mapM_ TargetEntry -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr)
    Ptr TargetEntry -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr TargetEntry
maybeTargets
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()

#if defined(ENABLE_OVERLOADING)
data WidgetDragDestSetMethodInfo
instance (signature ~ ([Gtk.Flags.DestDefaults] -> Maybe ([Gtk.TargetEntry.TargetEntry]) -> [Gdk.Flags.DragAction] -> m ()), MonadIO m, IsWidget a) => O.OverloadedMethod WidgetDragDestSetMethodInfo a signature where
    overloadedMethod = widgetDragDestSet

instance O.OverloadedMethodInfo WidgetDragDestSetMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Gtk.Objects.Widget.widgetDragDestSet",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-3.0.38/docs/GI-Gtk-Objects-Widget.html#v:widgetDragDestSet"
        })


#endif

-- method Widget::drag_dest_set_proxy
-- 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 = "proxy_window"
--           , argType = TInterface Name { namespace = "Gdk" , name = "Window" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "the window to which to forward drag events"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "protocol"
--           , argType =
--               TInterface Name { namespace = "Gdk" , name = "DragProtocol" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText =
--                     Just
--                       "the drag protocol which the @proxy_window accepts\n  (You can use gdk_drag_get_protocol() to determine this)"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "use_coordinates"
--           , argType = TBasicType TBoolean
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText =
--                     Just
--                       "If %TRUE, send the same coordinates to the\n  destination, because it is an embedded\n  subwindow."
--                 , 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_proxy" gtk_drag_dest_set_proxy :: 
    Ptr Widget ->                           -- widget : TInterface (Name {namespace = "Gtk", name = "Widget"})
    Ptr Gdk.Window.Window ->                -- proxy_window : TInterface (Name {namespace = "Gdk", name = "Window"})
    CUInt ->                                -- protocol : TInterface (Name {namespace = "Gdk", name = "DragProtocol"})
    CInt ->                                 -- use_coordinates : TBasicType TBoolean
    IO ()

{-# DEPRECATED widgetDragDestSetProxy ["(Since version 3.22)"] #-}
-- | Sets this widget as a proxy for drops to another window.
widgetDragDestSetProxy ::
    (B.CallStack.HasCallStack, MonadIO m, IsWidget a, Gdk.Window.IsWindow b) =>
    a
    -- ^ /@widget@/: a t'GI.Gtk.Objects.Widget.Widget'
    -> b
    -- ^ /@proxyWindow@/: the window to which to forward drag events
    -> Gdk.Enums.DragProtocol
    -- ^ /@protocol@/: the drag protocol which the /@proxyWindow@/ accepts
    --   (You can use @/gdk_drag_get_protocol()/@ to determine this)
    -> Bool
    -- ^ /@useCoordinates@/: If 'P.True', send the same coordinates to the
    --   destination, because it is an embedded
    --   subwindow.
    -> m ()
widgetDragDestSetProxy :: forall (m :: * -> *) a b.
(HasCallStack, MonadIO m, IsWidget a, IsWindow b) =>
a -> b -> DragProtocol -> Bool -> m ()
widgetDragDestSetProxy a
widget b
proxyWindow DragProtocol
protocol Bool
useCoordinates = 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
proxyWindow' <- b -> IO (Ptr Window)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
proxyWindow
    let protocol' :: CUInt
protocol' = (Int -> CUInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CUInt) -> (DragProtocol -> Int) -> DragProtocol -> CUInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. DragProtocol -> Int
forall a. Enum a => a -> Int
fromEnum) DragProtocol
protocol
    let useCoordinates' :: CInt
useCoordinates' = (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
useCoordinates
    Ptr Widget -> Ptr Window -> CUInt -> CInt -> IO ()
gtk_drag_dest_set_proxy Ptr Widget
widget' Ptr Window
proxyWindow' CUInt
protocol' CInt
useCoordinates'
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
widget
    b -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr b
proxyWindow
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()

#if defined(ENABLE_OVERLOADING)
data WidgetDragDestSetProxyMethodInfo
instance (signature ~ (b -> Gdk.Enums.DragProtocol -> Bool -> m ()), MonadIO m, IsWidget a, Gdk.Window.IsWindow b) => O.OverloadedMethod WidgetDragDestSetProxyMethodInfo a signature where
    overloadedMethod = widgetDragDestSetProxy

instance O.OverloadedMethodInfo WidgetDragDestSetProxyMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Gtk.Objects.Widget.widgetDragDestSetProxy",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-3.0.38/docs/GI-Gtk-Objects-Widget.html#v:widgetDragDestSetProxy"
        })


#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 = "Gtk" , name = "TargetList" }
--           , 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 Gtk.TargetList.TargetList ->        -- target_list : TInterface (Name {namespace = "Gtk", name = "TargetList"})
    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 (Gtk.TargetList.TargetList)
    -- ^ /@targetList@/: list of droppable targets, or 'P.Nothing' for none
    -> m ()
widgetDragDestSetTargetList :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsWidget a) =>
a -> Maybe TargetList -> m ()
widgetDragDestSetTargetList a
widget Maybe TargetList
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 TargetList
maybeTargetList <- case Maybe TargetList
targetList of
        Maybe TargetList
Nothing -> Ptr TargetList -> IO (Ptr TargetList)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr TargetList
forall a. Ptr a
nullPtr
        Just TargetList
jTargetList -> do
            Ptr TargetList
jTargetList' <- TargetList -> IO (Ptr TargetList)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr TargetList
jTargetList
            Ptr TargetList -> IO (Ptr TargetList)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr TargetList
jTargetList'
    Ptr Widget -> Ptr TargetList -> IO ()
gtk_drag_dest_set_target_list Ptr Widget
widget' Ptr TargetList
maybeTargetList
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
widget
    Maybe TargetList -> (TargetList -> IO ()) -> IO ()
forall (m :: * -> *) a. Monad m => Maybe a -> (a -> m ()) -> m ()
whenJust Maybe TargetList
targetList TargetList -> 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 (Gtk.TargetList.TargetList) -> m ()), MonadIO m, IsWidget a) => O.OverloadedMethod WidgetDragDestSetTargetListMethodInfo a signature where
    overloadedMethod = widgetDragDestSetTargetList

instance O.OverloadedMethodInfo WidgetDragDestSetTargetListMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Gtk.Objects.Widget.widgetDragDestSetTargetList",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-3.0.38/docs/GI-Gtk-Objects-Widget.html#v: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#g:signal:dragMotion") and
-- [dragLeave]("GI.Gtk.Objects.Widget#g: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.
-- 
-- /Since: 2.10/
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 :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsWidget a) =>
a -> Bool -> m ()
widgetDragDestSetTrackMotion a
widget 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.OverloadedMethod WidgetDragDestSetTrackMotionMethodInfo a signature where
    overloadedMethod = widgetDragDestSetTrackMotion

instance O.OverloadedMethodInfo WidgetDragDestSetTrackMotionMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Gtk.Objects.Widget.widgetDragDestSetTrackMotion",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-3.0.38/docs/GI-Gtk-Objects-Widget.html#v: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 :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsWidget a) =>
a -> m ()
widgetDragDestUnset 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.OverloadedMethod WidgetDragDestUnsetMethodInfo a signature where
    overloadedMethod = widgetDragDestUnset

instance O.OverloadedMethodInfo WidgetDragDestUnsetMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Gtk.Objects.Widget.widgetDragDestUnset",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-3.0.38/docs/GI-Gtk-Objects-Widget.html#v: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 = "context"
--           , argType =
--               TInterface Name { namespace = "Gdk" , name = "DragContext" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "the drag context" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "target"
--           , argType = TInterface Name { namespace = "Gdk" , name = "Atom" }
--           , 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
--           }
--       , Arg
--           { argCName = "time_"
--           , argType = TBasicType TUInt32
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText =
--                     Just
--                       "a timestamp for retrieving the data. This will\n  generally be the time received in a #GtkWidget::drag-motion\n  or #GtkWidget::drag-drop signal"
--                 , 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.DragContext.DragContext ->      -- context : TInterface (Name {namespace = "Gdk", name = "DragContext"})
    Ptr Gdk.Atom.Atom ->                    -- target : TInterface (Name {namespace = "Gdk", name = "Atom"})
    Word32 ->                               -- time_ : TBasicType TUInt32
    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#g: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.DragContext.IsDragContext b) =>
    a
    -- ^ /@widget@/: the widget that will receive the
    --   [dragDataReceived]("GI.Gtk.Objects.Widget#g:signal:dragDataReceived") signal
    -> b
    -- ^ /@context@/: the drag context
    -> Gdk.Atom.Atom
    -- ^ /@target@/: the target (form of the data) to retrieve
    -> Word32
    -- ^ /@time_@/: a timestamp for retrieving the data. This will
    --   generally be the time received in a [dragMotion]("GI.Gtk.Objects.Widget#g:signal:dragMotion")
    --   or [dragDrop]("GI.Gtk.Objects.Widget#g:signal:dragDrop") signal
    -> m ()
widgetDragGetData :: forall (m :: * -> *) a b.
(HasCallStack, MonadIO m, IsWidget a, IsDragContext b) =>
a -> b -> Atom -> Word32 -> m ()
widgetDragGetData a
widget b
context Atom
target Word32
time_ = 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 DragContext
context' <- b -> IO (Ptr DragContext)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
context
    Ptr Atom
target' <- Atom -> IO (Ptr Atom)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr Atom
target
    Ptr Widget -> Ptr DragContext -> Ptr Atom -> Word32 -> IO ()
gtk_drag_get_data Ptr Widget
widget' Ptr DragContext
context' Ptr Atom
target' Word32
time_
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
widget
    b -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr b
context
    Atom -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr Atom
target
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()

#if defined(ENABLE_OVERLOADING)
data WidgetDragGetDataMethodInfo
instance (signature ~ (b -> Gdk.Atom.Atom -> Word32 -> m ()), MonadIO m, IsWidget a, Gdk.DragContext.IsDragContext b) => O.OverloadedMethod WidgetDragGetDataMethodInfo a signature where
    overloadedMethod = widgetDragGetData

instance O.OverloadedMethodInfo WidgetDragGetDataMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Gtk.Objects.Widget.widgetDragGetData",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-3.0.38/docs/GI-Gtk-Objects-Widget.html#v: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 :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsWidget a) =>
a -> m ()
widgetDragHighlight 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.OverloadedMethod WidgetDragHighlightMethodInfo a signature where
    overloadedMethod = widgetDragHighlight

instance O.OverloadedMethodInfo WidgetDragHighlightMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Gtk.Objects.Widget.widgetDragHighlight",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-3.0.38/docs/GI-Gtk-Objects-Widget.html#v: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 'GI.Gtk.Structs.TargetList.targetListAddImageTargets' and
-- 'GI.Gtk.Objects.Widget.widgetDragSourceSetTargetList'.
-- 
-- /Since: 2.6/
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 :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsWidget a) =>
a -> m ()
widgetDragSourceAddImageTargets 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.OverloadedMethod WidgetDragSourceAddImageTargetsMethodInfo a signature where
    overloadedMethod = widgetDragSourceAddImageTargets

instance O.OverloadedMethodInfo WidgetDragSourceAddImageTargetsMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Gtk.Objects.Widget.widgetDragSourceAddImageTargets",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-3.0.38/docs/GI-Gtk-Objects-Widget.html#v: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.Structs.TargetList.targetListAddTextTargets' and
-- 'GI.Gtk.Objects.Widget.widgetDragSourceSetTargetList'.
-- 
-- /Since: 2.6/
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 :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsWidget a) =>
a -> m ()
widgetDragSourceAddTextTargets 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.OverloadedMethod WidgetDragSourceAddTextTargetsMethodInfo a signature where
    overloadedMethod = widgetDragSourceAddTextTargets

instance O.OverloadedMethodInfo WidgetDragSourceAddTextTargetsMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Gtk.Objects.Widget.widgetDragSourceAddTextTargets",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-3.0.38/docs/GI-Gtk-Objects-Widget.html#v: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.Structs.TargetList.targetListAddUriTargets' and
-- 'GI.Gtk.Objects.Widget.widgetDragSourceSetTargetList'.
-- 
-- /Since: 2.6/
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 :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsWidget a) =>
a -> m ()
widgetDragSourceAddUriTargets 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.OverloadedMethod WidgetDragSourceAddUriTargetsMethodInfo a signature where
    overloadedMethod = widgetDragSourceAddUriTargets

instance O.OverloadedMethodInfo WidgetDragSourceAddUriTargetsMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Gtk.Objects.Widget.widgetDragSourceAddUriTargets",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-3.0.38/docs/GI-Gtk-Objects-Widget.html#v: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 = "Gtk" , name = "TargetList" })
-- 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 Gtk.TargetList.TargetList)

-- | Gets the list of targets this widget can provide for
-- drag-and-drop.
-- 
-- /Since: 2.4/
widgetDragSourceGetTargetList ::
    (B.CallStack.HasCallStack, MonadIO m, IsWidget a) =>
    a
    -- ^ /@widget@/: a t'GI.Gtk.Objects.Widget.Widget'
    -> m (Maybe Gtk.TargetList.TargetList)
    -- ^ __Returns:__ the t'GI.Gtk.Structs.TargetList.TargetList', or 'P.Nothing' if none
widgetDragSourceGetTargetList :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsWidget a) =>
a -> m (Maybe TargetList)
widgetDragSourceGetTargetList a
widget = IO (Maybe TargetList) -> m (Maybe TargetList)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Maybe TargetList) -> m (Maybe TargetList))
-> IO (Maybe TargetList) -> m (Maybe TargetList)
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 TargetList
result <- Ptr Widget -> IO (Ptr TargetList)
gtk_drag_source_get_target_list Ptr Widget
widget'
    Maybe TargetList
maybeResult <- Ptr TargetList
-> (Ptr TargetList -> IO TargetList) -> IO (Maybe TargetList)
forall a b. Ptr a -> (Ptr a -> IO b) -> IO (Maybe b)
convertIfNonNull Ptr TargetList
result ((Ptr TargetList -> IO TargetList) -> IO (Maybe TargetList))
-> (Ptr TargetList -> IO TargetList) -> IO (Maybe TargetList)
forall a b. (a -> b) -> a -> b
$ \Ptr TargetList
result' -> do
        TargetList
result'' <- ((ManagedPtr TargetList -> TargetList)
-> Ptr TargetList -> IO TargetList
forall a.
(HasCallStack, GBoxed a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
newBoxed ManagedPtr TargetList -> TargetList
Gtk.TargetList.TargetList) Ptr TargetList
result'
        TargetList -> IO TargetList
forall (m :: * -> *) a. Monad m => a -> m a
return TargetList
result''
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
widget
    Maybe TargetList -> IO (Maybe TargetList)
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe TargetList
maybeResult

#if defined(ENABLE_OVERLOADING)
data WidgetDragSourceGetTargetListMethodInfo
instance (signature ~ (m (Maybe Gtk.TargetList.TargetList)), MonadIO m, IsWidget a) => O.OverloadedMethod WidgetDragSourceGetTargetListMethodInfo a signature where
    overloadedMethod = widgetDragSourceGetTargetList

instance O.OverloadedMethodInfo WidgetDragSourceGetTargetListMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Gtk.Objects.Widget.widgetDragSourceGetTargetList",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-3.0.38/docs/GI-Gtk-Objects-Widget.html#v: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 =
--               TCArray
--                 False
--                 (-1)
--                 3
--                 (TInterface Name { namespace = "Gtk" , name = "TargetEntry" })
--           , direction = DirectionIn
--           , mayBeNull = True
--           , argDoc =
--               Documentation
--                 { rawDocText =
--                     Just
--                       "the table of targets\n    that the drag will support, may be %NULL"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "n_targets"
--           , argType = TBasicType TInt
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "the number of items in @targets"
--                 , 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: [ Arg
--              { argCName = "n_targets"
--              , argType = TBasicType TInt
--              , direction = DirectionIn
--              , mayBeNull = False
--              , argDoc =
--                  Documentation
--                    { rawDocText = Just "the number of items in @targets"
--                    , sinceVersion = Nothing
--                    }
--              , argScope = ScopeTypeInvalid
--              , argClosure = -1
--              , argDestroy = -1
--              , argCallerAllocates = False
--              , transfer = TransferNothing
--              }
--          ]
-- 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 Gtk.TargetEntry.TargetEntry ->      -- targets : TCArray False (-1) 3 (TInterface (Name {namespace = "Gtk", name = "TargetEntry"}))
    Int32 ->                                -- n_targets : TBasicType TInt
    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 ([Gtk.TargetEntry.TargetEntry])
    -- ^ /@targets@/: the table of 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 :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsWidget a) =>
a -> [ModifierType] -> Maybe [TargetEntry] -> [DragAction] -> m ()
widgetDragSourceSet a
widget [ModifierType]
startButtonMask Maybe [TargetEntry]
targets [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
    let nTargets :: Int32
nTargets = case Maybe [TargetEntry]
targets of
            Maybe [TargetEntry]
Nothing -> Int32
0
            Just [TargetEntry]
jTargets -> Int -> Int32
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> Int32) -> Int -> Int32
forall a b. (a -> b) -> a -> b
$ [TargetEntry] -> Int
forall (t :: * -> *) a. Foldable t => t a -> Int
P.length [TargetEntry]
jTargets
    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 TargetEntry
maybeTargets <- case Maybe [TargetEntry]
targets of
        Maybe [TargetEntry]
Nothing -> Ptr TargetEntry -> IO (Ptr TargetEntry)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr TargetEntry
forall a. Ptr a
nullPtr
        Just [TargetEntry]
jTargets -> do
            [Ptr TargetEntry]
jTargets' <- (TargetEntry -> IO (Ptr TargetEntry))
-> [TargetEntry] -> IO [Ptr TargetEntry]
forall (t :: * -> *) (m :: * -> *) a b.
(Traversable t, Monad m) =>
(a -> m b) -> t a -> m (t b)
mapM TargetEntry -> IO (Ptr TargetEntry)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr [TargetEntry]
jTargets
            Ptr TargetEntry
jTargets'' <- Int -> [Ptr TargetEntry] -> IO (Ptr TargetEntry)
forall a. Int -> [Ptr a] -> IO (Ptr a)
packBlockArray Int
16 [Ptr TargetEntry]
jTargets'
            Ptr TargetEntry -> IO (Ptr TargetEntry)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr TargetEntry
jTargets''
    let actions' :: CUInt
actions' = [DragAction] -> CUInt
forall b a. (Num b, IsGFlag a) => [a] -> b
gflagsToWord [DragAction]
actions
    Ptr Widget -> CUInt -> Ptr TargetEntry -> Int32 -> CUInt -> IO ()
gtk_drag_source_set Ptr Widget
widget' CUInt
startButtonMask' Ptr TargetEntry
maybeTargets Int32
nTargets CUInt
actions'
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
widget
    Maybe [TargetEntry] -> ([TargetEntry] -> IO ()) -> IO ()
forall (m :: * -> *) a. Monad m => Maybe a -> (a -> m ()) -> m ()
whenJust Maybe [TargetEntry]
targets ((TargetEntry -> IO ()) -> [TargetEntry] -> IO ()
forall (t :: * -> *) (m :: * -> *) a b.
(Foldable t, Monad m) =>
(a -> m b) -> t a -> m ()
mapM_ TargetEntry -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr)
    Ptr TargetEntry -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr TargetEntry
maybeTargets
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()

#if defined(ENABLE_OVERLOADING)
data WidgetDragSourceSetMethodInfo
instance (signature ~ ([Gdk.Flags.ModifierType] -> Maybe ([Gtk.TargetEntry.TargetEntry]) -> [Gdk.Flags.DragAction] -> m ()), MonadIO m, IsWidget a) => O.OverloadedMethod WidgetDragSourceSetMethodInfo a signature where
    overloadedMethod = widgetDragSourceSet

instance O.OverloadedMethodInfo WidgetDragSourceSetMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Gtk.Objects.Widget.widgetDragSourceSet",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-3.0.38/docs/GI-Gtk-Objects-Widget.html#v: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.
-- 
-- /Since: 3.2/
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 :: forall (m :: * -> *) a b.
(HasCallStack, MonadIO m, IsWidget a, IsIcon b) =>
a -> b -> m ()
widgetDragSourceSetIconGicon a
widget 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.OverloadedMethod WidgetDragSourceSetIconGiconMethodInfo a signature where
    overloadedMethod = widgetDragSourceSetIconGicon

instance O.OverloadedMethodInfo WidgetDragSourceSetIconGiconMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Gtk.Objects.Widget.widgetDragSourceSetIconGicon",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-3.0.38/docs/GI-Gtk-Objects-Widget.html#v: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.
-- 
-- /Since: 2.8/
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 :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsWidget a) =>
a -> Text -> m ()
widgetDragSourceSetIconName a
widget 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.OverloadedMethod WidgetDragSourceSetIconNameMethodInfo a signature where
    overloadedMethod = widgetDragSourceSetIconName

instance O.OverloadedMethodInfo WidgetDragSourceSetIconNameMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Gtk.Objects.Widget.widgetDragSourceSetIconName",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-3.0.38/docs/GI-Gtk-Objects-Widget.html#v:widgetDragSourceSetIconName"
        })


#endif

-- method Widget::drag_source_set_icon_pixbuf
-- 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 = "pixbuf"
--           , argType =
--               TInterface Name { namespace = "GdkPixbuf" , name = "Pixbuf" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "the #GdkPixbuf for the drag icon"
--                 , 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_pixbuf" gtk_drag_source_set_icon_pixbuf :: 
    Ptr Widget ->                           -- widget : TInterface (Name {namespace = "Gtk", name = "Widget"})
    Ptr GdkPixbuf.Pixbuf.Pixbuf ->          -- pixbuf : TInterface (Name {namespace = "GdkPixbuf", name = "Pixbuf"})
    IO ()

-- | Sets the icon that will be used for drags from a particular widget
-- from a t'GI.GdkPixbuf.Objects.Pixbuf.Pixbuf'. GTK+ retains a reference for /@pixbuf@/ and will
-- release it when it is no longer needed.
widgetDragSourceSetIconPixbuf ::
    (B.CallStack.HasCallStack, MonadIO m, IsWidget a, GdkPixbuf.Pixbuf.IsPixbuf b) =>
    a
    -- ^ /@widget@/: a t'GI.Gtk.Objects.Widget.Widget'
    -> b
    -- ^ /@pixbuf@/: the t'GI.GdkPixbuf.Objects.Pixbuf.Pixbuf' for the drag icon
    -> m ()
widgetDragSourceSetIconPixbuf :: forall (m :: * -> *) a b.
(HasCallStack, MonadIO m, IsWidget a, IsPixbuf b) =>
a -> b -> m ()
widgetDragSourceSetIconPixbuf a
widget b
pixbuf = 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 Pixbuf
pixbuf' <- b -> IO (Ptr Pixbuf)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
pixbuf
    Ptr Widget -> Ptr Pixbuf -> IO ()
gtk_drag_source_set_icon_pixbuf Ptr Widget
widget' Ptr Pixbuf
pixbuf'
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
widget
    b -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr b
pixbuf
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()

#if defined(ENABLE_OVERLOADING)
data WidgetDragSourceSetIconPixbufMethodInfo
instance (signature ~ (b -> m ()), MonadIO m, IsWidget a, GdkPixbuf.Pixbuf.IsPixbuf b) => O.OverloadedMethod WidgetDragSourceSetIconPixbufMethodInfo a signature where
    overloadedMethod = widgetDragSourceSetIconPixbuf

instance O.OverloadedMethodInfo WidgetDragSourceSetIconPixbufMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Gtk.Objects.Widget.widgetDragSourceSetIconPixbuf",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-3.0.38/docs/GI-Gtk-Objects-Widget.html#v:widgetDragSourceSetIconPixbuf"
        })


#endif

-- method Widget::drag_source_set_icon_stock
-- 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 = "stock_id"
--           , argType = TBasicType TUTF8
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "the ID of the stock 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_stock" gtk_drag_source_set_icon_stock :: 
    Ptr Widget ->                           -- widget : TInterface (Name {namespace = "Gtk", name = "Widget"})
    CString ->                              -- stock_id : TBasicType TUTF8
    IO ()

{-# DEPRECATED widgetDragSourceSetIconStock ["(Since version 3.10)","Use 'GI.Gtk.Objects.Widget.widgetDragSourceSetIconName' instead."] #-}
-- | Sets the icon that will be used for drags from a particular source
-- to a stock icon.
widgetDragSourceSetIconStock ::
    (B.CallStack.HasCallStack, MonadIO m, IsWidget a) =>
    a
    -- ^ /@widget@/: a t'GI.Gtk.Objects.Widget.Widget'
    -> T.Text
    -- ^ /@stockId@/: the ID of the stock icon to use
    -> m ()
widgetDragSourceSetIconStock :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsWidget a) =>
a -> Text -> m ()
widgetDragSourceSetIconStock a
widget Text
stockId = 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
stockId' <- Text -> IO CString
textToCString Text
stockId
    Ptr Widget -> CString -> IO ()
gtk_drag_source_set_icon_stock Ptr Widget
widget' CString
stockId'
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
widget
    CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
stockId'
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()

#if defined(ENABLE_OVERLOADING)
data WidgetDragSourceSetIconStockMethodInfo
instance (signature ~ (T.Text -> m ()), MonadIO m, IsWidget a) => O.OverloadedMethod WidgetDragSourceSetIconStockMethodInfo a signature where
    overloadedMethod = widgetDragSourceSetIconStock

instance O.OverloadedMethodInfo WidgetDragSourceSetIconStockMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Gtk.Objects.Widget.widgetDragSourceSetIconStock",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-3.0.38/docs/GI-Gtk-Objects-Widget.html#v:widgetDragSourceSetIconStock"
        })


#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 = "Gtk" , name = "TargetList" }
--           , 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 Gtk.TargetList.TargetList ->        -- target_list : TInterface (Name {namespace = "Gtk", name = "TargetList"})
    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'.
-- 
-- /Since: 2.4/
widgetDragSourceSetTargetList ::
    (B.CallStack.HasCallStack, MonadIO m, IsWidget a) =>
    a
    -- ^ /@widget@/: a t'GI.Gtk.Objects.Widget.Widget' that’s a drag source
    -> Maybe (Gtk.TargetList.TargetList)
    -- ^ /@targetList@/: list of draggable targets, or 'P.Nothing' for none
    -> m ()
widgetDragSourceSetTargetList :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsWidget a) =>
a -> Maybe TargetList -> m ()
widgetDragSourceSetTargetList a
widget Maybe TargetList
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 TargetList
maybeTargetList <- case Maybe TargetList
targetList of
        Maybe TargetList
Nothing -> Ptr TargetList -> IO (Ptr TargetList)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr TargetList
forall a. Ptr a
nullPtr
        Just TargetList
jTargetList -> do
            Ptr TargetList
jTargetList' <- TargetList -> IO (Ptr TargetList)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr TargetList
jTargetList
            Ptr TargetList -> IO (Ptr TargetList)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr TargetList
jTargetList'
    Ptr Widget -> Ptr TargetList -> IO ()
gtk_drag_source_set_target_list Ptr Widget
widget' Ptr TargetList
maybeTargetList
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
widget
    Maybe TargetList -> (TargetList -> IO ()) -> IO ()
forall (m :: * -> *) a. Monad m => Maybe a -> (a -> m ()) -> m ()
whenJust Maybe TargetList
targetList TargetList -> 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 (Gtk.TargetList.TargetList) -> m ()), MonadIO m, IsWidget a) => O.OverloadedMethod WidgetDragSourceSetTargetListMethodInfo a signature where
    overloadedMethod = widgetDragSourceSetTargetList

instance O.OverloadedMethodInfo WidgetDragSourceSetTargetListMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Gtk.Objects.Widget.widgetDragSourceSetTargetList",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-3.0.38/docs/GI-Gtk-Objects-Widget.html#v: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 :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsWidget a) =>
a -> m ()
widgetDragSourceUnset 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.OverloadedMethod WidgetDragSourceUnsetMethodInfo a signature where
    overloadedMethod = widgetDragSourceUnset

instance O.OverloadedMethodInfo WidgetDragSourceUnsetMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Gtk.Objects.Widget.widgetDragSourceUnset",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-3.0.38/docs/GI-Gtk-Objects-Widget.html#v: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 :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsWidget a) =>
a -> m ()
widgetDragUnhighlight 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.OverloadedMethod WidgetDragUnhighlightMethodInfo a signature where
    overloadedMethod = widgetDragUnhighlight

instance O.OverloadedMethodInfo WidgetDragUnhighlightMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Gtk.Objects.Widget.widgetDragUnhighlight",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-3.0.38/docs/GI-Gtk-Objects-Widget.html#v:widgetDragUnhighlight"
        })


#endif

-- method Widget::draw
-- 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 draw. It must be drawable (see\n  gtk_widget_is_drawable()) and a size must have been allocated."
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "cr"
--           , argType =
--               TInterface Name { namespace = "cairo" , name = "Context" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a cairo context to draw to"
--                 , 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_draw" gtk_widget_draw :: 
    Ptr Widget ->                           -- widget : TInterface (Name {namespace = "Gtk", name = "Widget"})
    Ptr Cairo.Context.Context ->            -- cr : TInterface (Name {namespace = "cairo", name = "Context"})
    IO ()

-- | Draws /@widget@/ to /@cr@/. The top left corner of the widget will be
-- drawn to the currently set origin point of /@cr@/.
-- 
-- You should pass a cairo context as /@cr@/ argument that is in an
-- original state. Otherwise the resulting drawing is undefined. For
-- example changing the operator using @/cairo_set_operator()/@ or the
-- line width using @/cairo_set_line_width()/@ might have unwanted side
-- effects.
-- You may however change the context’s transform matrix - like with
-- @/cairo_scale()/@, @/cairo_translate()/@ or @/cairo_set_matrix()/@ and clip
-- region with @/cairo_clip()/@ prior to calling this function. Also, it
-- is fine to modify the context with @/cairo_save()/@ and
-- @/cairo_push_group()/@ prior to calling this function.
-- 
-- Note that special-purpose widgets may contain special code for
-- rendering to the screen and might appear differently on screen
-- and when rendered using 'GI.Gtk.Objects.Widget.widgetDraw'.
-- 
-- /Since: 3.0/
widgetDraw ::
    (B.CallStack.HasCallStack, MonadIO m, IsWidget a) =>
    a
    -- ^ /@widget@/: the widget to draw. It must be drawable (see
    --   'GI.Gtk.Objects.Widget.widgetIsDrawable') and a size must have been allocated.
    -> Cairo.Context.Context
    -- ^ /@cr@/: a cairo context to draw to
    -> m ()
widgetDraw :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsWidget a) =>
a -> Context -> m ()
widgetDraw a
widget Context
cr = 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 Context
cr' <- Context -> IO (Ptr Context)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr Context
cr
    Ptr Widget -> Ptr Context -> IO ()
gtk_widget_draw Ptr Widget
widget' Ptr Context
cr'
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
widget
    Context -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr Context
cr
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()

#if defined(ENABLE_OVERLOADING)
data WidgetDrawMethodInfo
instance (signature ~ (Cairo.Context.Context -> m ()), MonadIO m, IsWidget a) => O.OverloadedMethod WidgetDrawMethodInfo a signature where
    overloadedMethod = widgetDraw

instance O.OverloadedMethodInfo WidgetDrawMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Gtk.Objects.Widget.widgetDraw",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-3.0.38/docs/GI-Gtk-Objects-Widget.html#v:widgetDraw"
        })


#endif

-- method Widget::ensure_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_ensure_style" gtk_widget_ensure_style :: 
    Ptr Widget ->                           -- widget : TInterface (Name {namespace = "Gtk", name = "Widget"})
    IO ()

{-# DEPRECATED widgetEnsureStyle ["(Since version 3.0)","Use t'GI.Gtk.Objects.StyleContext.StyleContext' instead"] #-}
-- | Ensures that /@widget@/ has a style (/@widget@/->style).
-- 
-- Not a very useful function; most of the time, if you
-- want the style, the widget is realized, and realized
-- widgets are guaranteed to have a style already.
widgetEnsureStyle ::
    (B.CallStack.HasCallStack, MonadIO m, IsWidget a) =>
    a
    -- ^ /@widget@/: a t'GI.Gtk.Objects.Widget.Widget'
    -> m ()
widgetEnsureStyle :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsWidget a) =>
a -> m ()
widgetEnsureStyle 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_ensure_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 WidgetEnsureStyleMethodInfo
instance (signature ~ (m ()), MonadIO m, IsWidget a) => O.OverloadedMethod WidgetEnsureStyleMethodInfo a signature where
    overloadedMethod = widgetEnsureStyle

instance O.OverloadedMethodInfo WidgetEnsureStyleMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Gtk.Objects.Widget.widgetEnsureStyle",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-3.0.38/docs/GI-Gtk-Objects-Widget.html#v:widgetEnsureStyle"
        })


#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.Window.windowBeep', otherwise it does nothing.
-- 
-- Note that the effect of 'GI.Gdk.Objects.Window.windowBeep' can be configured in many
-- ways, depending on the windowing backend and the desktop environment
-- or window manager that is used.
-- 
-- /Since: 2.12/
widgetErrorBell ::
    (B.CallStack.HasCallStack, MonadIO m, IsWidget a) =>
    a
    -- ^ /@widget@/: a t'GI.Gtk.Objects.Widget.Widget'
    -> m ()
widgetErrorBell :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsWidget a) =>
a -> m ()
widgetErrorBell 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.OverloadedMethod WidgetErrorBellMethodInfo a signature where
    overloadedMethod = widgetErrorBell

instance O.OverloadedMethodInfo WidgetErrorBellMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Gtk.Objects.Widget.widgetErrorBell",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-3.0.38/docs/GI-Gtk-Objects-Widget.html#v: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. Don’t synthesize expose events; instead,
-- use 'GI.Gdk.Objects.Window.windowInvalidateRect' to invalidate a region of the
-- window.
widgetEvent ::
    (B.CallStack.HasCallStack, MonadIO m, IsWidget a) =>
    a
    -- ^ /@widget@/: a t'GI.Gtk.Objects.Widget.Widget'
    -> Gdk.Event.Event
    -- ^ /@event@/: a t'GI.Gdk.Unions.Event.Event'
    -> m Bool
    -- ^ __Returns:__ return from the event signal emission ('P.True' if
    --               the event was handled)
widgetEvent :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsWidget a) =>
a -> Event -> m Bool
widgetEvent a
widget Event
event = IO Bool -> m Bool
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Bool -> m Bool) -> IO Bool -> 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' <- Event -> IO (Ptr Event)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr Event
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
/= CInt
0) CInt
result
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
widget
    WidgetEventAfterCallback
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr Event
event
    WidgetMnemonicActivateCallback
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'

#if defined(ENABLE_OVERLOADING)
data WidgetEventMethodInfo
instance (signature ~ (Gdk.Event.Event -> m Bool), MonadIO m, IsWidget a) => O.OverloadedMethod WidgetEventMethodInfo a signature where
    overloadedMethod = widgetEvent

instance O.OverloadedMethodInfo WidgetEventMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Gtk.Objects.Widget.widgetEvent",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-3.0.38/docs/GI-Gtk-Objects-Widget.html#v:widgetEvent"
        })


#endif

-- method Widget::freeze_child_notify
-- 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_freeze_child_notify" gtk_widget_freeze_child_notify :: 
    Ptr Widget ->                           -- widget : TInterface (Name {namespace = "Gtk", name = "Widget"})
    IO ()

-- | Stops emission of [childNotify]("GI.Gtk.Objects.Widget#g:signal:childNotify") signals on /@widget@/. The
-- signals are queued until 'GI.Gtk.Objects.Widget.widgetThawChildNotify' is called
-- on /@widget@/.
-- 
-- This is the analogue of 'GI.GObject.Objects.Object.objectFreezeNotify' for child properties.
widgetFreezeChildNotify ::
    (B.CallStack.HasCallStack, MonadIO m, IsWidget a) =>
    a
    -- ^ /@widget@/: a t'GI.Gtk.Objects.Widget.Widget'
    -> m ()
widgetFreezeChildNotify :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsWidget a) =>
a -> m ()
widgetFreezeChildNotify 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_freeze_child_notify 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 WidgetFreezeChildNotifyMethodInfo
instance (signature ~ (m ()), MonadIO m, IsWidget a) => O.OverloadedMethod WidgetFreezeChildNotifyMethodInfo a signature where
    overloadedMethod = widgetFreezeChildNotify

instance O.OverloadedMethodInfo WidgetFreezeChildNotifyMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Gtk.Objects.Widget.widgetFreezeChildNotify",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-3.0.38/docs/GI-Gtk-Objects-Widget.html#v:widgetFreezeChildNotify"
        })


#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 :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsWidget a) =>
a -> m Object
widgetGetAccessible 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 Text
"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.OverloadedMethod WidgetGetAccessibleMethodInfo a signature where
    overloadedMethod = widgetGetAccessible

instance O.OverloadedMethodInfo WidgetGetAccessibleMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Gtk.Objects.Widget.widgetGetAccessible",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-3.0.38/docs/GI-Gtk-Objects-Widget.html#v: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.
-- 
-- /Since: 3.16/
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 :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsWidget a) =>
a -> Text -> m (Maybe ActionGroup)
widgetGetActionGroup a
widget 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
$ \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.OverloadedMethod WidgetGetActionGroupMethodInfo a signature where
    overloadedMethod = widgetGetActionGroup

instance O.OverloadedMethodInfo WidgetGetActionGroupMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Gtk.Objects.Widget.widgetGetActionGroup",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-3.0.38/docs/GI-Gtk-Objects-Widget.html#v: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 [draw]("GI.Gtk.Objects.Widget#g:signal:draw") function, and when allocating child
-- widgets in t'GI.Gtk.Objects.Widget.Widget'::@/size_allocate/@.
-- 
-- /Since: 3.10/
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 :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsWidget a) =>
a -> m Int32
widgetGetAllocatedBaseline 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.OverloadedMethod WidgetGetAllocatedBaselineMethodInfo a signature where
    overloadedMethod = widgetGetAllocatedBaseline

instance O.OverloadedMethodInfo WidgetGetAllocatedBaselineMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Gtk.Objects.Widget.widgetGetAllocatedBaseline",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-3.0.38/docs/GI-Gtk-Objects-Widget.html#v: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@/.
-- This function is intended to be used when implementing handlers
-- for the [draw]("GI.Gtk.Objects.Widget#g:signal:draw") function.
widgetGetAllocatedHeight ::
    (B.CallStack.HasCallStack, MonadIO m, IsWidget a) =>
    a
    -- ^ /@widget@/: the widget to query
    -> m Int32
    -- ^ __Returns:__ the height of the /@widget@/
widgetGetAllocatedHeight :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsWidget a) =>
a -> m Int32
widgetGetAllocatedHeight 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.OverloadedMethod WidgetGetAllocatedHeightMethodInfo a signature where
    overloadedMethod = widgetGetAllocatedHeight

instance O.OverloadedMethodInfo WidgetGetAllocatedHeightMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Gtk.Objects.Widget.widgetGetAllocatedHeight",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-3.0.38/docs/GI-Gtk-Objects-Widget.html#v:widgetGetAllocatedHeight"
        })


#endif

-- method Widget::get_allocated_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" , 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
--           }
--       , Arg
--           { argCName = "baseline"
--           , argType = TBasicType TInt
--           , direction = DirectionOut
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a pointer to an integer to copy to"
--                 , 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_allocated_size" gtk_widget_get_allocated_size :: 
    Ptr Widget ->                           -- widget : TInterface (Name {namespace = "Gtk", name = "Widget"})
    Ptr Gdk.Rectangle.Rectangle ->          -- allocation : TInterface (Name {namespace = "Gdk", name = "Rectangle"})
    Ptr Int32 ->                            -- baseline : TBasicType TInt
    IO ()

-- | Retrieves the widget’s allocated size.
-- 
-- This function returns the last values passed to
-- 'GI.Gtk.Objects.Widget.widgetSizeAllocateWithBaseline'. The value differs from
-- the size returned in 'GI.Gtk.Objects.Widget.widgetGetAllocation' in that functions
-- like 'GI.Gtk.Objects.Widget.widgetSetHalign' can adjust the allocation, but not
-- the value returned by this function.
-- 
-- If a widget is not visible, its allocated size is 0.
-- 
-- /Since: 3.20/
widgetGetAllocatedSize ::
    (B.CallStack.HasCallStack, MonadIO m, IsWidget a) =>
    a
    -- ^ /@widget@/: a t'GI.Gtk.Objects.Widget.Widget'
    -> m ((Gdk.Rectangle.Rectangle, Int32))
widgetGetAllocatedSize :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsWidget a) =>
a -> m (Rectangle, Int32)
widgetGetAllocatedSize a
widget = IO (Rectangle, Int32) -> m (Rectangle, Int32)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Rectangle, Int32) -> m (Rectangle, Int32))
-> IO (Rectangle, Int32) -> m (Rectangle, 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 Rectangle
allocation <- Int -> IO (Ptr Rectangle)
forall a. GBoxed a => Int -> IO (Ptr a)
SP.callocBoxedBytes Int
16 :: IO (Ptr Gdk.Rectangle.Rectangle)
    Ptr Int32
baseline <- IO (Ptr Int32)
forall a. Storable a => IO (Ptr a)
allocMem :: IO (Ptr Int32)
    Ptr Widget -> Ptr Rectangle -> Ptr Int32 -> IO ()
gtk_widget_get_allocated_size Ptr Widget
widget' Ptr Rectangle
allocation Ptr Int32
baseline
    Rectangle
allocation' <- ((ManagedPtr Rectangle -> Rectangle)
-> Ptr Rectangle -> IO Rectangle
forall a.
(HasCallStack, GBoxed a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
wrapBoxed ManagedPtr Rectangle -> Rectangle
Gdk.Rectangle.Rectangle) Ptr Rectangle
allocation
    Int32
baseline' <- Ptr Int32 -> IO Int32
forall a. Storable a => Ptr a -> IO a
peek Ptr Int32
baseline
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
widget
    Ptr Int32 -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr Int32
baseline
    (Rectangle, Int32) -> IO (Rectangle, Int32)
forall (m :: * -> *) a. Monad m => a -> m a
return (Rectangle
allocation', Int32
baseline')

#if defined(ENABLE_OVERLOADING)
data WidgetGetAllocatedSizeMethodInfo
instance (signature ~ (m ((Gdk.Rectangle.Rectangle, Int32))), MonadIO m, IsWidget a) => O.OverloadedMethod WidgetGetAllocatedSizeMethodInfo a signature where
    overloadedMethod = widgetGetAllocatedSize

instance O.OverloadedMethodInfo WidgetGetAllocatedSizeMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Gtk.Objects.Widget.widgetGetAllocatedSize",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-3.0.38/docs/GI-Gtk-Objects-Widget.html#v:widgetGetAllocatedSize"
        })


#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@/.
-- This function is intended to be used when implementing handlers
-- for the [draw]("GI.Gtk.Objects.Widget#g:signal:draw") function.
widgetGetAllocatedWidth ::
    (B.CallStack.HasCallStack, MonadIO m, IsWidget a) =>
    a
    -- ^ /@widget@/: the widget to query
    -> m Int32
    -- ^ __Returns:__ the width of the /@widget@/
widgetGetAllocatedWidth :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsWidget a) =>
a -> m Int32
widgetGetAllocatedWidth 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.OverloadedMethod WidgetGetAllocatedWidthMethodInfo a signature where
    overloadedMethod = widgetGetAllocatedWidth

instance O.OverloadedMethodInfo WidgetGetAllocatedWidthMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Gtk.Objects.Widget.widgetGetAllocatedWidth",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-3.0.38/docs/GI-Gtk-Objects-Widget.html#v: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.
-- There is no way to get the original allocation assigned by
-- 'GI.Gtk.Objects.Widget.widgetSizeAllocate', since it isn’t stored; if a container
-- implementation needs that information it will have to track it itself.
-- 
-- /Since: 2.18/
widgetGetAllocation ::
    (B.CallStack.HasCallStack, MonadIO m, IsWidget a) =>
    a
    -- ^ /@widget@/: a t'GI.Gtk.Objects.Widget.Widget'
    -> m (Gdk.Rectangle.Rectangle)
widgetGetAllocation :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsWidget a) =>
a -> m Rectangle
widgetGetAllocation 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. GBoxed a => Int -> IO (Ptr a)
SP.callocBoxedBytes Int
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, GBoxed 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.OverloadedMethod WidgetGetAllocationMethodInfo a signature where
    overloadedMethod = widgetGetAllocation

instance O.OverloadedMethodInfo WidgetGetAllocationMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Gtk.Objects.Widget.widgetGetAllocation",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-3.0.38/docs/GI-Gtk-Objects-Widget.html#v: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 :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsWidget a) =>
a -> GType -> m (Maybe Widget)
widgetGetAncestor a
widget 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
$ \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.OverloadedMethod WidgetGetAncestorMethodInfo a signature where
    overloadedMethod = widgetGetAncestor

instance O.OverloadedMethodInfo WidgetGetAncestorMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Gtk.Objects.Widget.widgetGetAncestor",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-3.0.38/docs/GI-Gtk-Objects-Widget.html#v:widgetGetAncestor"
        })


#endif

-- method Widget::get_app_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
--           }
--       ]
-- Lengths: []
-- returnType: Just (TBasicType TBoolean)
-- throws : False
-- Skip return : False

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

-- | Determines whether the application intends to draw on the widget in
-- an [draw]("GI.Gtk.Objects.Widget#g:signal:draw") handler.
-- 
-- See 'GI.Gtk.Objects.Widget.widgetSetAppPaintable'
-- 
-- /Since: 2.18/
widgetGetAppPaintable ::
    (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 app paintable
widgetGetAppPaintable :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsWidget a) =>
a -> m Bool
widgetGetAppPaintable a
widget = IO Bool -> m Bool
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Bool -> m Bool) -> IO Bool -> 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_app_paintable Ptr Widget
widget'
    let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= CInt
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 WidgetGetAppPaintableMethodInfo
instance (signature ~ (m Bool), MonadIO m, IsWidget a) => O.OverloadedMethod WidgetGetAppPaintableMethodInfo a signature where
    overloadedMethod = widgetGetAppPaintable

instance O.OverloadedMethodInfo WidgetGetAppPaintableMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Gtk.Objects.Widget.widgetGetAppPaintable",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-3.0.38/docs/GI-Gtk-Objects-Widget.html#v:widgetGetAppPaintable"
        })


#endif

-- method Widget::get_can_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_can_default" gtk_widget_get_can_default :: 
    Ptr Widget ->                           -- widget : TInterface (Name {namespace = "Gtk", name = "Widget"})
    IO CInt

-- | Determines whether /@widget@/ can be a default widget. See
-- 'GI.Gtk.Objects.Widget.widgetSetCanDefault'.
-- 
-- /Since: 2.18/
widgetGetCanDefault ::
    (B.CallStack.HasCallStack, MonadIO m, IsWidget a) =>
    a
    -- ^ /@widget@/: a t'GI.Gtk.Objects.Widget.Widget'
    -> m Bool
    -- ^ __Returns:__ 'P.True' if /@widget@/ can be a default widget, 'P.False' otherwise
widgetGetCanDefault :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsWidget a) =>
a -> m Bool
widgetGetCanDefault a
widget = IO Bool -> m Bool
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Bool -> m Bool) -> IO Bool -> 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_default Ptr Widget
widget'
    let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= CInt
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 WidgetGetCanDefaultMethodInfo
instance (signature ~ (m Bool), MonadIO m, IsWidget a) => O.OverloadedMethod WidgetGetCanDefaultMethodInfo a signature where
    overloadedMethod = widgetGetCanDefault

instance O.OverloadedMethodInfo WidgetGetCanDefaultMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Gtk.Objects.Widget.widgetGetCanDefault",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-3.0.38/docs/GI-Gtk-Objects-Widget.html#v:widgetGetCanDefault"
        })


#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'.
-- 
-- /Since: 2.18/
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 :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsWidget a) =>
a -> m Bool
widgetGetCanFocus a
widget = IO Bool -> m Bool
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Bool -> m Bool) -> IO Bool -> 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
/= CInt
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.OverloadedMethod WidgetGetCanFocusMethodInfo a signature where
    overloadedMethod = widgetGetCanFocus

instance O.OverloadedMethodInfo WidgetGetCanFocusMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Gtk.Objects.Widget.widgetGetCanFocus",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-3.0.38/docs/GI-Gtk-Objects-Widget.html#v:widgetGetCanFocus"
        })


#endif

-- method Widget::get_child_requisition
-- 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 = "requisition"
--           , argType =
--               TInterface Name { namespace = "Gtk" , name = "Requisition" }
--           , direction = DirectionOut
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #GtkRequisition to be filled in"
--                 , 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_child_requisition" gtk_widget_get_child_requisition :: 
    Ptr Widget ->                           -- widget : TInterface (Name {namespace = "Gtk", name = "Widget"})
    Ptr Gtk.Requisition.Requisition ->      -- requisition : TInterface (Name {namespace = "Gtk", name = "Requisition"})
    IO ()

{-# DEPRECATED widgetGetChildRequisition ["(Since version 3.0)","Use 'GI.Gtk.Objects.Widget.widgetGetPreferredSize' instead."] #-}
-- | This function is only for use in widget implementations. Obtains
-- /@widget@/->requisition, unless someone has forced a particular
-- geometry on the widget (e.g. with 'GI.Gtk.Objects.Widget.widgetSetSizeRequest'),
-- in which case it returns that geometry instead of the widget\'s
-- requisition.
-- 
-- This function differs from 'GI.Gtk.Objects.Widget.widgetSizeRequest' in that
-- it retrieves the last size request value from /@widget@/->requisition,
-- while 'GI.Gtk.Objects.Widget.widgetSizeRequest' actually calls the \"size_request\" method
-- on /@widget@/ to compute the size request and fill in /@widget@/->requisition,
-- and only then returns /@widget@/->requisition.
-- 
-- Because this function does not call the “size_request” method, it
-- can only be used when you know that /@widget@/->requisition is
-- up-to-date, that is, 'GI.Gtk.Objects.Widget.widgetSizeRequest' has been called
-- since the last time a resize was queued. In general, only container
-- implementations have this information; applications should use
-- 'GI.Gtk.Objects.Widget.widgetSizeRequest'.
widgetGetChildRequisition ::
    (B.CallStack.HasCallStack, MonadIO m, IsWidget a) =>
    a
    -- ^ /@widget@/: a t'GI.Gtk.Objects.Widget.Widget'
    -> m (Gtk.Requisition.Requisition)
widgetGetChildRequisition :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsWidget a) =>
a -> m Requisition
widgetGetChildRequisition a
widget = IO Requisition -> m Requisition
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Requisition -> m Requisition)
-> IO Requisition -> m 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
requisition <- Int -> IO (Ptr Requisition)
forall a. GBoxed a => Int -> IO (Ptr a)
SP.callocBoxedBytes Int
8 :: IO (Ptr Gtk.Requisition.Requisition)
    Ptr Widget -> Ptr Requisition -> IO ()
gtk_widget_get_child_requisition Ptr Widget
widget' Ptr Requisition
requisition
    Requisition
requisition' <- ((ManagedPtr Requisition -> Requisition)
-> Ptr Requisition -> IO Requisition
forall a.
(HasCallStack, GBoxed a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
wrapBoxed ManagedPtr Requisition -> Requisition
Gtk.Requisition.Requisition) Ptr Requisition
requisition
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
widget
    Requisition -> IO Requisition
forall (m :: * -> *) a. Monad m => a -> m a
return Requisition
requisition'

#if defined(ENABLE_OVERLOADING)
data WidgetGetChildRequisitionMethodInfo
instance (signature ~ (m (Gtk.Requisition.Requisition)), MonadIO m, IsWidget a) => O.OverloadedMethod WidgetGetChildRequisitionMethodInfo a signature where
    overloadedMethod = widgetGetChildRequisition

instance O.OverloadedMethodInfo WidgetGetChildRequisitionMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Gtk.Objects.Widget.widgetGetChildRequisition",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-3.0.38/docs/GI-Gtk-Objects-Widget.html#v:widgetGetChildRequisition"
        })


#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 :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsWidget a) =>
a -> m Bool
widgetGetChildVisible a
widget = IO Bool -> m Bool
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Bool -> m Bool) -> IO Bool -> 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
/= CInt
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.OverloadedMethod WidgetGetChildVisibleMethodInfo a signature where
    overloadedMethod = widgetGetChildVisible

instance O.OverloadedMethodInfo WidgetGetChildVisibleMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Gtk.Objects.Widget.widgetGetChildVisible",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-3.0.38/docs/GI-Gtk-Objects-Widget.html#v:widgetGetChildVisible"
        })


#endif

-- method Widget::get_clip
-- 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 = "clip"
--           , 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_clip" gtk_widget_get_clip :: 
    Ptr Widget ->                           -- widget : TInterface (Name {namespace = "Gtk", name = "Widget"})
    Ptr Gdk.Rectangle.Rectangle ->          -- clip : TInterface (Name {namespace = "Gdk", name = "Rectangle"})
    IO ()

-- | Retrieves the widget’s clip area.
-- 
-- The clip area is the area in which all of /@widget@/\'s drawing will
-- happen. Other toolkits call it the bounding box.
-- 
-- Historically, in GTK+ the clip area has been equal to the allocation
-- retrieved via 'GI.Gtk.Objects.Widget.widgetGetAllocation'.
-- 
-- /Since: 3.14/
widgetGetClip ::
    (B.CallStack.HasCallStack, MonadIO m, IsWidget a) =>
    a
    -- ^ /@widget@/: a t'GI.Gtk.Objects.Widget.Widget'
    -> m (Gdk.Rectangle.Rectangle)
widgetGetClip :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsWidget a) =>
a -> m Rectangle
widgetGetClip 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
clip <- Int -> IO (Ptr Rectangle)
forall a. GBoxed a => Int -> IO (Ptr a)
SP.callocBoxedBytes Int
16 :: IO (Ptr Gdk.Rectangle.Rectangle)
    Ptr Widget -> Ptr Rectangle -> IO ()
gtk_widget_get_clip Ptr Widget
widget' Ptr Rectangle
clip
    Rectangle
clip' <- ((ManagedPtr Rectangle -> Rectangle)
-> Ptr Rectangle -> IO Rectangle
forall a.
(HasCallStack, GBoxed a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
wrapBoxed ManagedPtr Rectangle -> Rectangle
Gdk.Rectangle.Rectangle) Ptr Rectangle
clip
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
widget
    Rectangle -> IO Rectangle
forall (m :: * -> *) a. Monad m => a -> m a
return Rectangle
clip'

#if defined(ENABLE_OVERLOADING)
data WidgetGetClipMethodInfo
instance (signature ~ (m (Gdk.Rectangle.Rectangle)), MonadIO m, IsWidget a) => O.OverloadedMethod WidgetGetClipMethodInfo a signature where
    overloadedMethod = widgetGetClip

instance O.OverloadedMethodInfo WidgetGetClipMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Gtk.Objects.Widget.widgetGetClip",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-3.0.38/docs/GI-Gtk-Objects-Widget.html#v:widgetGetClip"
        })


#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
--           }
--       , Arg
--           { argCName = "selection"
--           , argType = TInterface Name { namespace = "Gdk" , name = "Atom" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText =
--                     Just
--                       "a #GdkAtom which identifies the clipboard\n            to use. %GDK_SELECTION_CLIPBOARD gives the\n            default clipboard. Another common value\n            is %GDK_SELECTION_PRIMARY, which gives\n            the primary X selection."
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TInterface Name { namespace = "Gtk" , 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"})
    Ptr Gdk.Atom.Atom ->                    -- selection : TInterface (Name {namespace = "Gdk", name = "Atom"})
    IO (Ptr Gtk.Clipboard.Clipboard)

-- | Returns the clipboard object for the given selection to
-- be used with /@widget@/. /@widget@/ must have a t'GI.Gdk.Objects.Display.Display'
-- associated with it, so must be attached to a toplevel
-- window.
-- 
-- /Since: 2.2/
widgetGetClipboard ::
    (B.CallStack.HasCallStack, MonadIO m, IsWidget a) =>
    a
    -- ^ /@widget@/: a t'GI.Gtk.Objects.Widget.Widget'
    -> Gdk.Atom.Atom
    -- ^ /@selection@/: a t'GI.Gdk.Structs.Atom.Atom' which identifies the clipboard
    --             to use. @/GDK_SELECTION_CLIPBOARD/@ gives the
    --             default clipboard. Another common value
    --             is @/GDK_SELECTION_PRIMARY/@, which gives
    --             the primary X selection.
    -> m Gtk.Clipboard.Clipboard
    -- ^ __Returns:__ the appropriate clipboard object. If no
    --             clipboard already exists, a new one will
    --             be created. Once a clipboard object has
    --             been created, it is persistent for all time.
widgetGetClipboard :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsWidget a) =>
a -> Atom -> m Clipboard
widgetGetClipboard a
widget Atom
selection = 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 Atom
selection' <- Atom -> IO (Ptr Atom)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr Atom
selection
    Ptr Clipboard
result <- Ptr Widget -> Ptr Atom -> IO (Ptr Clipboard)
gtk_widget_get_clipboard Ptr Widget
widget' Ptr Atom
selection'
    Text -> Ptr Clipboard -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"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
Gtk.Clipboard.Clipboard) Ptr Clipboard
result
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
widget
    Atom -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr Atom
selection
    Clipboard -> IO Clipboard
forall (m :: * -> *) a. Monad m => a -> m a
return Clipboard
result'

#if defined(ENABLE_OVERLOADING)
data WidgetGetClipboardMethodInfo
instance (signature ~ (Gdk.Atom.Atom -> m Gtk.Clipboard.Clipboard), MonadIO m, IsWidget a) => O.OverloadedMethod WidgetGetClipboardMethodInfo a signature where
    overloadedMethod = widgetGetClipboard

instance O.OverloadedMethodInfo WidgetGetClipboardMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Gtk.Objects.Widget.widgetGetClipboard",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-3.0.38/docs/GI-Gtk-Objects-Widget.html#v:widgetGetClipboard"
        })


#endif

-- method Widget::get_composite_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_composite_name" gtk_widget_get_composite_name :: 
    Ptr Widget ->                           -- widget : TInterface (Name {namespace = "Gtk", name = "Widget"})
    IO CString

{-# DEPRECATED widgetGetCompositeName ["(Since version 3.10)","Use 'GI.Gtk.Structs.WidgetClass.widgetClassSetTemplate', or don\8217t use this API at all."] #-}
-- | Obtains the composite name of a widget.
widgetGetCompositeName ::
    (B.CallStack.HasCallStack, MonadIO m, IsWidget a) =>
    a
    -- ^ /@widget@/: a t'GI.Gtk.Objects.Widget.Widget'
    -> m T.Text
    -- ^ __Returns:__ the composite name of /@widget@/, or 'P.Nothing' if /@widget@/ is not
    --   a composite child. The string should be freed when it is no
    --   longer needed.
widgetGetCompositeName :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsWidget a) =>
a -> m Text
widgetGetCompositeName 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_composite_name Ptr Widget
widget'
    Text -> CString -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"widgetGetCompositeName" CString
result
    Text
result' <- HasCallStack => CString -> IO Text
CString -> IO Text
cstringToText CString
result
    CString -> IO ()
forall a. Ptr a -> IO ()
freeMem 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 WidgetGetCompositeNameMethodInfo
instance (signature ~ (m T.Text), MonadIO m, IsWidget a) => O.OverloadedMethod WidgetGetCompositeNameMethodInfo a signature where
    overloadedMethod = widgetGetCompositeName

instance O.OverloadedMethodInfo WidgetGetCompositeNameMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Gtk.Objects.Widget.widgetGetCompositeName",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-3.0.38/docs/GI-Gtk-Objects-Widget.html#v:widgetGetCompositeName"
        })


#endif

-- method Widget::get_device_enabled
-- 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_get_device_enabled" gtk_widget_get_device_enabled :: 
    Ptr Widget ->                           -- widget : TInterface (Name {namespace = "Gtk", name = "Widget"})
    Ptr Gdk.Device.Device ->                -- device : TInterface (Name {namespace = "Gdk", name = "Device"})
    IO CInt

-- | Returns whether /@device@/ can interact with /@widget@/ and its
-- children. See 'GI.Gtk.Objects.Widget.widgetSetDeviceEnabled'.
-- 
-- /Since: 3.0/
widgetGetDeviceEnabled ::
    (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' is /@device@/ is enabled for /@widget@/
widgetGetDeviceEnabled :: forall (m :: * -> *) a b.
(HasCallStack, MonadIO m, IsWidget a, IsDevice b) =>
a -> b -> m Bool
widgetGetDeviceEnabled a
widget b
device = IO Bool -> m Bool
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Bool -> m Bool) -> IO Bool -> 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_get_device_enabled Ptr Widget
widget' Ptr Device
device'
    let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= CInt
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 WidgetGetDeviceEnabledMethodInfo
instance (signature ~ (b -> m Bool), MonadIO m, IsWidget a, Gdk.Device.IsDevice b) => O.OverloadedMethod WidgetGetDeviceEnabledMethodInfo a signature where
    overloadedMethod = widgetGetDeviceEnabled

instance O.OverloadedMethodInfo WidgetGetDeviceEnabledMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Gtk.Objects.Widget.widgetGetDeviceEnabled",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-3.0.38/docs/GI-Gtk-Objects-Widget.html#v:widgetGetDeviceEnabled"
        })


#endif

-- method Widget::get_device_events
-- 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 (TInterface Name { namespace = "Gdk" , name = "EventMask" })
-- throws : False
-- Skip return : False

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

-- | Returns the events mask for the widget corresponding to an specific device. These
-- are the events that the widget will receive when /@device@/ operates on it.
-- 
-- /Since: 3.0/
widgetGetDeviceEvents ::
    (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 [Gdk.Flags.EventMask]
    -- ^ __Returns:__ device event mask for /@widget@/
widgetGetDeviceEvents :: forall (m :: * -> *) a b.
(HasCallStack, MonadIO m, IsWidget a, IsDevice b) =>
a -> b -> m [EventMask]
widgetGetDeviceEvents a
widget b
device = IO [EventMask] -> m [EventMask]
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO [EventMask] -> m [EventMask])
-> IO [EventMask] -> m [EventMask]
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
    CUInt
result <- Ptr Widget -> Ptr Device -> IO CUInt
gtk_widget_get_device_events Ptr Widget
widget' Ptr Device
device'
    let result' :: [EventMask]
result' = CUInt -> [EventMask]
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
    b -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr b
device
    [EventMask] -> IO [EventMask]
forall (m :: * -> *) a. Monad m => a -> m a
return [EventMask]
result'

#if defined(ENABLE_OVERLOADING)
data WidgetGetDeviceEventsMethodInfo
instance (signature ~ (b -> m [Gdk.Flags.EventMask]), MonadIO m, IsWidget a, Gdk.Device.IsDevice b) => O.OverloadedMethod WidgetGetDeviceEventsMethodInfo a signature where
    overloadedMethod = widgetGetDeviceEvents

instance O.OverloadedMethodInfo WidgetGetDeviceEventsMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Gtk.Objects.Widget.widgetGetDeviceEvents",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-3.0.38/docs/GI-Gtk-Objects-Widget.html#v:widgetGetDeviceEvents"
        })


#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 :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsWidget a) =>
a -> m TextDirection
widgetGetDirection 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.OverloadedMethod WidgetGetDirectionMethodInfo a signature where
    overloadedMethod = widgetGetDirection

instance O.OverloadedMethodInfo WidgetGetDirectionMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Gtk.Objects.Widget.widgetGetDirection",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-3.0.38/docs/GI-Gtk-Objects-Widget.html#v: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.
-- 
-- /Since: 2.2/
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 :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsWidget a) =>
a -> m Display
widgetGetDisplay 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 Text
"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.OverloadedMethod WidgetGetDisplayMethodInfo a signature where
    overloadedMethod = widgetGetDisplay

instance O.OverloadedMethodInfo WidgetGetDisplayMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Gtk.Objects.Widget.widgetGetDisplay",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-3.0.38/docs/GI-Gtk-Objects-Widget.html#v:widgetGetDisplay"
        })


#endif

-- method Widget::get_double_buffered
-- 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_double_buffered" gtk_widget_get_double_buffered :: 
    Ptr Widget ->                           -- widget : TInterface (Name {namespace = "Gtk", name = "Widget"})
    IO CInt

-- | Determines whether the widget is double buffered.
-- 
-- See 'GI.Gtk.Objects.Widget.widgetSetDoubleBuffered'
-- 
-- /Since: 2.18/
widgetGetDoubleBuffered ::
    (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 double buffered
widgetGetDoubleBuffered :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsWidget a) =>
a -> m Bool
widgetGetDoubleBuffered a
widget = IO Bool -> m Bool
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Bool -> m Bool) -> IO Bool -> 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_double_buffered Ptr Widget
widget'
    let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= CInt
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 WidgetGetDoubleBufferedMethodInfo
instance (signature ~ (m Bool), MonadIO m, IsWidget a) => O.OverloadedMethod WidgetGetDoubleBufferedMethodInfo a signature where
    overloadedMethod = widgetGetDoubleBuffered

instance O.OverloadedMethodInfo WidgetGetDoubleBufferedMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Gtk.Objects.Widget.widgetGetDoubleBuffered",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-3.0.38/docs/GI-Gtk-Objects-Widget.html#v:widgetGetDoubleBuffered"
        })


#endif

-- method Widget::get_events
-- 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_events" gtk_widget_get_events :: 
    Ptr Widget ->                           -- widget : TInterface (Name {namespace = "Gtk", name = "Widget"})
    IO Int32

-- | Returns the event mask (see t'GI.Gdk.Flags.EventMask') for the widget. These are the
-- events that the widget will receive.
-- 
-- Note: Internally, the widget event mask will be the logical OR of the event
-- mask set through 'GI.Gtk.Objects.Widget.widgetSetEvents' or 'GI.Gtk.Objects.Widget.widgetAddEvents', and the
-- event mask necessary to cater for every t'GI.Gtk.Objects.EventController.EventController' created for the
-- widget.
widgetGetEvents ::
    (B.CallStack.HasCallStack, MonadIO m, IsWidget a) =>
    a
    -- ^ /@widget@/: a t'GI.Gtk.Objects.Widget.Widget'
    -> m Int32
    -- ^ __Returns:__ event mask for /@widget@/
widgetGetEvents :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsWidget a) =>
a -> m Int32
widgetGetEvents 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_events 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 WidgetGetEventsMethodInfo
instance (signature ~ (m Int32), MonadIO m, IsWidget a) => O.OverloadedMethod WidgetGetEventsMethodInfo a signature where
    overloadedMethod = widgetGetEvents

instance O.OverloadedMethodInfo WidgetGetEventsMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Gtk.Objects.Widget.widgetGetEvents",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-3.0.38/docs/GI-Gtk-Objects-Widget.html#v:widgetGetEvents"
        })


#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'.
-- 
-- /Since: 3.20/
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 :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsWidget a) =>
a -> m Bool
widgetGetFocusOnClick a
widget = IO Bool -> m Bool
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Bool -> m Bool) -> IO Bool -> 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
/= CInt
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.OverloadedMethod WidgetGetFocusOnClickMethodInfo a signature where
    overloadedMethod = widgetGetFocusOnClick

instance O.OverloadedMethodInfo WidgetGetFocusOnClickMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Gtk.Objects.Widget.widgetGetFocusOnClick",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-3.0.38/docs/GI-Gtk-Objects-Widget.html#v: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'.
-- 
-- /Since: 3.18/
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 :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsWidget a) =>
a -> m (Maybe FontMap)
widgetGetFontMap 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
$ \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.OverloadedMethod WidgetGetFontMapMethodInfo a signature where
    overloadedMethod = widgetGetFontMap

instance O.OverloadedMethodInfo WidgetGetFontMapMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Gtk.Objects.Widget.widgetGetFontMap",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-3.0.38/docs/GI-Gtk-Objects-Widget.html#v: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.Screen.Screen' will be used.
-- 
-- /Since: 3.18/
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 :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsWidget a) =>
a -> m (Maybe FontOptions)
widgetGetFontOptions 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
$ \Ptr FontOptions
result' -> do
        FontOptions
result'' <- ((ManagedPtr FontOptions -> FontOptions)
-> Ptr FontOptions -> IO FontOptions
forall a.
(HasCallStack, GBoxed 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.OverloadedMethod WidgetGetFontOptionsMethodInfo a signature where
    overloadedMethod = widgetGetFontOptions

instance O.OverloadedMethodInfo WidgetGetFontOptionsMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Gtk.Objects.Widget.widgetGetFontOptions",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-3.0.38/docs/GI-Gtk-Objects-Widget.html#v: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.
-- 
-- /Since: 3.8/
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 :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsWidget a) =>
a -> m (Maybe FrameClock)
widgetGetFrameClock 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
$ \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.OverloadedMethod WidgetGetFrameClockMethodInfo a signature where
    overloadedMethod = widgetGetFrameClock

instance O.OverloadedMethodInfo WidgetGetFrameClockMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Gtk.Objects.Widget.widgetGetFrameClock",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-3.0.38/docs/GI-Gtk-Objects-Widget.html#v: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 :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsWidget a) =>
a -> m Align
widgetGetHalign 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.OverloadedMethod WidgetGetHalignMethodInfo a signature where
    overloadedMethod = widgetGetHalign

instance O.OverloadedMethodInfo WidgetGetHalignMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Gtk.Objects.Widget.widgetGetHalign",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-3.0.38/docs/GI-Gtk-Objects-Widget.html#v:widgetGetHalign"
        })


#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.
-- 
-- /Since: 2.12/
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 :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsWidget a) =>
a -> m Bool
widgetGetHasTooltip a
widget = IO Bool -> m Bool
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Bool -> m Bool) -> IO Bool -> 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
/= CInt
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.OverloadedMethod WidgetGetHasTooltipMethodInfo a signature where
    overloadedMethod = widgetGetHasTooltip

instance O.OverloadedMethodInfo WidgetGetHasTooltipMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Gtk.Objects.Widget.widgetGetHasTooltip",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-3.0.38/docs/GI-Gtk-Objects-Widget.html#v:widgetGetHasTooltip"
        })


#endif

-- method Widget::get_has_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 (TBasicType TBoolean)
-- throws : False
-- Skip return : False

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

-- | Determines whether /@widget@/ has a t'GI.Gdk.Objects.Window.Window' of its own. See
-- 'GI.Gtk.Objects.Widget.widgetSetHasWindow'.
-- 
-- /Since: 2.18/
widgetGetHasWindow ::
    (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 window, 'P.False' otherwise
widgetGetHasWindow :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsWidget a) =>
a -> m Bool
widgetGetHasWindow a
widget = IO Bool -> m Bool
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Bool -> m Bool) -> IO Bool -> 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_window Ptr Widget
widget'
    let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= CInt
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 WidgetGetHasWindowMethodInfo
instance (signature ~ (m Bool), MonadIO m, IsWidget a) => O.OverloadedMethod WidgetGetHasWindowMethodInfo a signature where
    overloadedMethod = widgetGetHasWindow

instance O.OverloadedMethodInfo WidgetGetHasWindowMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Gtk.Objects.Widget.widgetGetHasWindow",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-3.0.38/docs/GI-Gtk-Objects-Widget.html#v:widgetGetHasWindow"
        })


#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 :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsWidget a) =>
a -> m Bool
widgetGetHexpand a
widget = IO Bool -> m Bool
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Bool -> m Bool) -> IO Bool -> 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
/= CInt
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.OverloadedMethod WidgetGetHexpandMethodInfo a signature where
    overloadedMethod = widgetGetHexpand

instance O.OverloadedMethodInfo WidgetGetHexpandMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Gtk.Objects.Widget.widgetGetHexpand",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-3.0.38/docs/GI-Gtk-Objects-Widget.html#v: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 :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsWidget a) =>
a -> m Bool
widgetGetHexpandSet a
widget = IO Bool -> m Bool
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Bool -> m Bool) -> IO Bool -> 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
/= CInt
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.OverloadedMethod WidgetGetHexpandSetMethodInfo a signature where
    overloadedMethod = widgetGetHexpandSet

instance O.OverloadedMethodInfo WidgetGetHexpandSetMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Gtk.Objects.Widget.widgetGetHexpandSet",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-3.0.38/docs/GI-Gtk-Objects-Widget.html#v:widgetGetHexpandSet"
        })


#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.
-- 
-- /Since: 2.20/
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 :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsWidget a) =>
a -> m Bool
widgetGetMapped a
widget = IO Bool -> m Bool
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Bool -> m Bool) -> IO Bool -> 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
/= CInt
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.OverloadedMethod WidgetGetMappedMethodInfo a signature where
    overloadedMethod = widgetGetMapped

instance O.OverloadedMethodInfo WidgetGetMappedMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Gtk.Objects.Widget.widgetGetMapped",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-3.0.38/docs/GI-Gtk-Objects-Widget.html#v: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.
-- 
-- /Since: 3.0/
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 :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsWidget a) =>
a -> m Int32
widgetGetMarginBottom 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.OverloadedMethod WidgetGetMarginBottomMethodInfo a signature where
    overloadedMethod = widgetGetMarginBottom

instance O.OverloadedMethodInfo WidgetGetMarginBottomMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Gtk.Objects.Widget.widgetGetMarginBottom",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-3.0.38/docs/GI-Gtk-Objects-Widget.html#v: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.
-- 
-- /Since: 3.12/
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 :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsWidget a) =>
a -> m Int32
widgetGetMarginEnd 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.OverloadedMethod WidgetGetMarginEndMethodInfo a signature where
    overloadedMethod = widgetGetMarginEnd

instance O.OverloadedMethodInfo WidgetGetMarginEndMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Gtk.Objects.Widget.widgetGetMarginEnd",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-3.0.38/docs/GI-Gtk-Objects-Widget.html#v:widgetGetMarginEnd"
        })


#endif

-- method Widget::get_margin_left
-- 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_left" gtk_widget_get_margin_left :: 
    Ptr Widget ->                           -- widget : TInterface (Name {namespace = "Gtk", name = "Widget"})
    IO Int32

{-# DEPRECATED widgetGetMarginLeft ["(Since version 3.12)","Use 'GI.Gtk.Objects.Widget.widgetGetMarginStart' instead."] #-}
-- | Gets the value of the t'GI.Gtk.Objects.Widget.Widget':@/margin-left/@ property.
-- 
-- /Since: 3.0/
widgetGetMarginLeft ::
    (B.CallStack.HasCallStack, MonadIO m, IsWidget a) =>
    a
    -- ^ /@widget@/: a t'GI.Gtk.Objects.Widget.Widget'
    -> m Int32
    -- ^ __Returns:__ The left margin of /@widget@/
widgetGetMarginLeft :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsWidget a) =>
a -> m Int32
widgetGetMarginLeft 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_left 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 WidgetGetMarginLeftMethodInfo
instance (signature ~ (m Int32), MonadIO m, IsWidget a) => O.OverloadedMethod WidgetGetMarginLeftMethodInfo a signature where
    overloadedMethod = widgetGetMarginLeft

instance O.OverloadedMethodInfo WidgetGetMarginLeftMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Gtk.Objects.Widget.widgetGetMarginLeft",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-3.0.38/docs/GI-Gtk-Objects-Widget.html#v:widgetGetMarginLeft"
        })


#endif

-- method Widget::get_margin_right
-- 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_right" gtk_widget_get_margin_right :: 
    Ptr Widget ->                           -- widget : TInterface (Name {namespace = "Gtk", name = "Widget"})
    IO Int32

{-# DEPRECATED widgetGetMarginRight ["(Since version 3.12)","Use 'GI.Gtk.Objects.Widget.widgetGetMarginEnd' instead."] #-}
-- | Gets the value of the t'GI.Gtk.Objects.Widget.Widget':@/margin-right/@ property.
-- 
-- /Since: 3.0/
widgetGetMarginRight ::
    (B.CallStack.HasCallStack, MonadIO m, IsWidget a) =>
    a
    -- ^ /@widget@/: a t'GI.Gtk.Objects.Widget.Widget'
    -> m Int32
    -- ^ __Returns:__ The right margin of /@widget@/
widgetGetMarginRight :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsWidget a) =>
a -> m Int32
widgetGetMarginRight 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_right 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 WidgetGetMarginRightMethodInfo
instance (signature ~ (m Int32), MonadIO m, IsWidget a) => O.OverloadedMethod WidgetGetMarginRightMethodInfo a signature where
    overloadedMethod = widgetGetMarginRight

instance O.OverloadedMethodInfo WidgetGetMarginRightMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Gtk.Objects.Widget.widgetGetMarginRight",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-3.0.38/docs/GI-Gtk-Objects-Widget.html#v:widgetGetMarginRight"
        })


#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.
-- 
-- /Since: 3.12/
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 :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsWidget a) =>
a -> m Int32
widgetGetMarginStart 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.OverloadedMethod WidgetGetMarginStartMethodInfo a signature where
    overloadedMethod = widgetGetMarginStart

instance O.OverloadedMethodInfo WidgetGetMarginStartMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Gtk.Objects.Widget.widgetGetMarginStart",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-3.0.38/docs/GI-Gtk-Objects-Widget.html#v: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.
-- 
-- /Since: 3.0/
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 :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsWidget a) =>
a -> m Int32
widgetGetMarginTop 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.OverloadedMethod WidgetGetMarginTopMethodInfo a signature where
    overloadedMethod = widgetGetMarginTop

instance O.OverloadedMethodInfo WidgetGetMarginTopMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Gtk.Objects.Widget.widgetGetMarginTop",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-3.0.38/docs/GI-Gtk-Objects-Widget.html#v: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'.
-- 
-- /Since: 3.4/
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 :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsWidget a) =>
a -> ModifierIntent -> m [ModifierType]
widgetGetModifierMask a
widget 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.OverloadedMethod WidgetGetModifierMaskMethodInfo a signature where
    overloadedMethod = widgetGetModifierMask

instance O.OverloadedMethodInfo WidgetGetModifierMaskMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Gtk.Objects.Widget.widgetGetModifierMask",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-3.0.38/docs/GI-Gtk-Objects-Widget.html#v:widgetGetModifierMask"
        })


#endif

-- method Widget::get_modifier_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: Just (TInterface Name { namespace = "Gtk" , name = "RcStyle" })
-- throws : False
-- Skip return : False

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

{-# DEPRECATED widgetGetModifierStyle ["(Since version 3.0)","Use t'GI.Gtk.Objects.StyleContext.StyleContext' with a custom t'GI.Gtk.Interfaces.StyleProvider.StyleProvider' instead"] #-}
-- | Returns the current modifier style for the widget. (As set by
-- 'GI.Gtk.Objects.Widget.widgetModifyStyle'.) If no style has previously set, a new
-- t'GI.Gtk.Objects.RcStyle.RcStyle' will be created with all values unset, and set as the
-- modifier style for the widget. If you make changes to this rc
-- style, you must call 'GI.Gtk.Objects.Widget.widgetModifyStyle', passing in the
-- returned rc style, to make sure that your changes take effect.
-- 
-- Caution: passing the style back to 'GI.Gtk.Objects.Widget.widgetModifyStyle' will
-- normally end up destroying it, because 'GI.Gtk.Objects.Widget.widgetModifyStyle' copies
-- the passed-in style and sets the copy as the new modifier style,
-- thus dropping any reference to the old modifier style. Add a reference
-- to the modifier style if you want to keep it alive.
widgetGetModifierStyle ::
    (B.CallStack.HasCallStack, MonadIO m, IsWidget a) =>
    a
    -- ^ /@widget@/: a t'GI.Gtk.Objects.Widget.Widget'
    -> m Gtk.RcStyle.RcStyle
    -- ^ __Returns:__ the modifier style for the widget.
    --     This rc style is owned by the widget. If you want to keep a
    --     pointer to value this around, you must add a refcount using
    --     'GI.GObject.Objects.Object.objectRef'.
widgetGetModifierStyle :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsWidget a) =>
a -> m RcStyle
widgetGetModifierStyle a
widget = IO RcStyle -> m RcStyle
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO RcStyle -> m RcStyle) -> IO RcStyle -> m RcStyle
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 RcStyle
result <- Ptr Widget -> IO (Ptr RcStyle)
gtk_widget_get_modifier_style Ptr Widget
widget'
    Text -> Ptr RcStyle -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"widgetGetModifierStyle" Ptr RcStyle
result
    RcStyle
result' <- ((ManagedPtr RcStyle -> RcStyle) -> Ptr RcStyle -> IO RcStyle
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr RcStyle -> RcStyle
Gtk.RcStyle.RcStyle) Ptr RcStyle
result
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
widget
    RcStyle -> IO RcStyle
forall (m :: * -> *) a. Monad m => a -> m a
return RcStyle
result'

#if defined(ENABLE_OVERLOADING)
data WidgetGetModifierStyleMethodInfo
instance (signature ~ (m Gtk.RcStyle.RcStyle), MonadIO m, IsWidget a) => O.OverloadedMethod WidgetGetModifierStyleMethodInfo a signature where
    overloadedMethod = widgetGetModifierStyle

instance O.OverloadedMethodInfo WidgetGetModifierStyleMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Gtk.Objects.Widget.widgetGetModifierStyle",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-3.0.38/docs/GI-Gtk-Objects-Widget.html#v:widgetGetModifierStyle"
        })


#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 :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsWidget a) =>
a -> m Text
widgetGetName 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 Text
"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.OverloadedMethod WidgetGetNameMethodInfo a signature where
    overloadedMethod = widgetGetName

instance O.OverloadedMethodInfo WidgetGetNameMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Gtk.Objects.Widget.widgetGetName",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-3.0.38/docs/GI-Gtk-Objects-Widget.html#v:widgetGetName"
        })


#endif

-- method Widget::get_no_show_all
-- 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_no_show_all" gtk_widget_get_no_show_all :: 
    Ptr Widget ->                           -- widget : TInterface (Name {namespace = "Gtk", name = "Widget"})
    IO CInt

-- | Returns the current value of the t'GI.Gtk.Objects.Widget.Widget':@/no-show-all/@ property,
-- which determines whether calls to 'GI.Gtk.Objects.Widget.widgetShowAll'
-- will affect this widget.
-- 
-- /Since: 2.4/
widgetGetNoShowAll ::
    (B.CallStack.HasCallStack, MonadIO m, IsWidget a) =>
    a
    -- ^ /@widget@/: a t'GI.Gtk.Objects.Widget.Widget'
    -> m Bool
    -- ^ __Returns:__ the current value of the “no-show-all” property.
widgetGetNoShowAll :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsWidget a) =>
a -> m Bool
widgetGetNoShowAll a
widget = IO Bool -> m Bool
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Bool -> m Bool) -> IO Bool -> 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_no_show_all Ptr Widget
widget'
    let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= CInt
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 WidgetGetNoShowAllMethodInfo
instance (signature ~ (m Bool), MonadIO m, IsWidget a) => O.OverloadedMethod WidgetGetNoShowAllMethodInfo a signature where
    overloadedMethod = widgetGetNoShowAll

instance O.OverloadedMethodInfo WidgetGetNoShowAllMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Gtk.Objects.Widget.widgetGetNoShowAll",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-3.0.38/docs/GI-Gtk-Objects-Widget.html#v:widgetGetNoShowAll"
        })


#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'.
-- 
-- /Since: 3.8/
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 :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsWidget a) =>
a -> m Double
widgetGetOpacity 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.OverloadedMethod WidgetGetOpacityMethodInfo a signature where
    overloadedMethod = widgetGetOpacity

instance O.OverloadedMethodInfo WidgetGetOpacityMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Gtk.Objects.Widget.widgetGetOpacity",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-3.0.38/docs/GI-Gtk-Objects-Widget.html#v:widgetGetOpacity"
        })


#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 [screenChanged]("GI.Gtk.Objects.Widget#g:signal:screenChanged") 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 :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsWidget a) =>
a -> m Context
widgetGetPangoContext 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 Text
"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.OverloadedMethod WidgetGetPangoContextMethodInfo a signature where
    overloadedMethod = widgetGetPangoContext

instance O.OverloadedMethodInfo WidgetGetPangoContextMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Gtk.Objects.Widget.widgetGetPangoContext",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-3.0.38/docs/GI-Gtk-Objects-Widget.html#v: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 container 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 container of /@widget@/, or 'P.Nothing'
widgetGetParent :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsWidget a) =>
a -> m (Maybe Widget)
widgetGetParent 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
$ \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.OverloadedMethod WidgetGetParentMethodInfo a signature where
    overloadedMethod = widgetGetParent

instance O.OverloadedMethodInfo WidgetGetParentMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Gtk.Objects.Widget.widgetGetParent",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-3.0.38/docs/GI-Gtk-Objects-Widget.html#v:widgetGetParent"
        })


#endif

-- method Widget::get_parent_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 = "Gdk" , name = "Window" })
-- throws : False
-- Skip return : False

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

-- | Gets /@widget@/’s parent window, or 'P.Nothing' if it does not have one.
widgetGetParentWindow ::
    (B.CallStack.HasCallStack, MonadIO m, IsWidget a) =>
    a
    -- ^ /@widget@/: a t'GI.Gtk.Objects.Widget.Widget'.
    -> m (Maybe Gdk.Window.Window)
    -- ^ __Returns:__ the parent window of /@widget@/, or 'P.Nothing'
    -- if it does not have a parent window.
widgetGetParentWindow :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsWidget a) =>
a -> m (Maybe Window)
widgetGetParentWindow a
widget = IO (Maybe Window) -> m (Maybe Window)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Maybe Window) -> m (Maybe Window))
-> IO (Maybe Window) -> m (Maybe 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_parent_window Ptr Widget
widget'
    Maybe Window
maybeResult <- Ptr Window -> (Ptr Window -> IO Window) -> IO (Maybe Window)
forall a b. Ptr a -> (Ptr a -> IO b) -> IO (Maybe b)
convertIfNonNull Ptr Window
result ((Ptr Window -> IO Window) -> IO (Maybe Window))
-> (Ptr Window -> IO Window) -> IO (Maybe Window)
forall a b. (a -> b) -> a -> b
$ \Ptr Window
result' -> do
        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
Gdk.Window.Window) Ptr Window
result'
        Window -> IO Window
forall (m :: * -> *) a. Monad m => a -> m a
return Window
result''
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
widget
    Maybe Window -> IO (Maybe Window)
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe Window
maybeResult

#if defined(ENABLE_OVERLOADING)
data WidgetGetParentWindowMethodInfo
instance (signature ~ (m (Maybe Gdk.Window.Window)), MonadIO m, IsWidget a) => O.OverloadedMethod WidgetGetParentWindowMethodInfo a signature where
    overloadedMethod = widgetGetParentWindow

instance O.OverloadedMethodInfo WidgetGetParentWindowMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Gtk.Objects.Widget.widgetGetParentWindow",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-3.0.38/docs/GI-Gtk-Objects-Widget.html#v:widgetGetParentWindow"
        })


#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 :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsWidget a) =>
a -> m WidgetPath
widgetGetPath 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 Text
"widgetGetPath" Ptr WidgetPath
result
    WidgetPath
result' <- ((ManagedPtr WidgetPath -> WidgetPath)
-> Ptr WidgetPath -> IO WidgetPath
forall a.
(HasCallStack, GBoxed 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.OverloadedMethod WidgetGetPathMethodInfo a signature where
    overloadedMethod = widgetGetPath

instance O.OverloadedMethodInfo WidgetGetPathMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Gtk.Objects.Widget.widgetGetPath",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-3.0.38/docs/GI-Gtk-Objects-Widget.html#v:widgetGetPath"
        })


#endif

-- method Widget::get_pointer
-- 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 = "x"
--           , argType = TBasicType TInt
--           , direction = DirectionOut
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText =
--                     Just "return location for the X coordinate, or %NULL"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferEverything
--           }
--       , Arg
--           { argCName = "y"
--           , argType = TBasicType TInt
--           , direction = DirectionOut
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText =
--                     Just "return location for the Y coordinate, 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_pointer" gtk_widget_get_pointer :: 
    Ptr Widget ->                           -- widget : TInterface (Name {namespace = "Gtk", name = "Widget"})
    Ptr Int32 ->                            -- x : TBasicType TInt
    Ptr Int32 ->                            -- y : TBasicType TInt
    IO ()

{-# DEPRECATED widgetGetPointer ["(Since version 3.4)","Use 'GI.Gdk.Objects.Window.windowGetDevicePosition' instead."] #-}
-- | Obtains the location of the mouse pointer in widget coordinates.
-- Widget coordinates are a bit odd; for historical reasons, they are
-- defined as /@widget@/->window coordinates for widgets that return 'P.True' for
-- 'GI.Gtk.Objects.Widget.widgetGetHasWindow'; and are relative to /@widget@/->allocation.x,
-- /@widget@/->allocation.y otherwise.
widgetGetPointer ::
    (B.CallStack.HasCallStack, MonadIO m, IsWidget a) =>
    a
    -- ^ /@widget@/: a t'GI.Gtk.Objects.Widget.Widget'
    -> m ((Int32, Int32))
widgetGetPointer :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsWidget a) =>
a -> m (Int32, Int32)
widgetGetPointer 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
x <- IO (Ptr Int32)
forall a. Storable a => IO (Ptr a)
allocMem :: IO (Ptr Int32)
    Ptr Int32
y <- IO (Ptr Int32)
forall a. Storable a => IO (Ptr a)
allocMem :: IO (Ptr Int32)
    Ptr Widget -> Ptr Int32 -> Ptr Int32 -> IO ()
gtk_widget_get_pointer Ptr Widget
widget' Ptr Int32
x Ptr Int32
y
    Int32
x' <- Ptr Int32 -> IO Int32
forall a. Storable a => Ptr a -> IO a
peek Ptr Int32
x
    Int32
y' <- Ptr Int32 -> IO Int32
forall a. Storable a => Ptr a -> IO a
peek Ptr Int32
y
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
widget
    Ptr Int32 -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr Int32
x
    Ptr Int32 -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr Int32
y
    (Int32, Int32) -> IO (Int32, Int32)
forall (m :: * -> *) a. Monad m => a -> m a
return (Int32
x', Int32
y')

#if defined(ENABLE_OVERLOADING)
data WidgetGetPointerMethodInfo
instance (signature ~ (m ((Int32, Int32))), MonadIO m, IsWidget a) => O.OverloadedMethod WidgetGetPointerMethodInfo a signature where
    overloadedMethod = widgetGetPointer

instance O.OverloadedMethodInfo WidgetGetPointerMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Gtk.Objects.Widget.widgetGetPointer",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-3.0.38/docs/GI-Gtk-Objects-Widget.html#v:widgetGetPointer"
        })


#endif

-- method Widget::get_preferred_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 instance"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "minimum_height"
--           , argType = TBasicType TInt
--           , direction = DirectionOut
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText =
--                     Just "location to store the minimum height, or %NULL"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferEverything
--           }
--       , Arg
--           { argCName = "natural_height"
--           , argType = TBasicType TInt
--           , direction = DirectionOut
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText =
--                     Just "location to store the natural 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_preferred_height" gtk_widget_get_preferred_height :: 
    Ptr Widget ->                           -- widget : TInterface (Name {namespace = "Gtk", name = "Widget"})
    Ptr Int32 ->                            -- minimum_height : TBasicType TInt
    Ptr Int32 ->                            -- natural_height : TBasicType TInt
    IO ()

-- | Retrieves a widget’s initial minimum and natural height.
-- 
-- This call is specific to width-for-height requests.
-- 
-- The returned request will be modified by the
-- GtkWidgetClass[adjust_size_request](#g:signal:adjust_size_request) virtual method and by any
-- @/GtkSizeGroups/@ that have been applied. That is, the returned request
-- is the one that should be used for layout, not necessarily the one
-- returned by the widget itself.
-- 
-- /Since: 3.0/
widgetGetPreferredHeight ::
    (B.CallStack.HasCallStack, MonadIO m, IsWidget a) =>
    a
    -- ^ /@widget@/: a t'GI.Gtk.Objects.Widget.Widget' instance
    -> m ((Int32, Int32))
widgetGetPreferredHeight :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsWidget a) =>
a -> m (Int32, Int32)
widgetGetPreferredHeight 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
minimumHeight <- IO (Ptr Int32)
forall a. Storable a => IO (Ptr a)
allocMem :: IO (Ptr Int32)
    Ptr Int32
naturalHeight <- IO (Ptr Int32)
forall a. Storable a => IO (Ptr a)
allocMem :: IO (Ptr Int32)
    Ptr Widget -> Ptr Int32 -> Ptr Int32 -> IO ()
gtk_widget_get_preferred_height Ptr Widget
widget' Ptr Int32
minimumHeight Ptr Int32
naturalHeight
    Int32
minimumHeight' <- Ptr Int32 -> IO Int32
forall a. Storable a => Ptr a -> IO a
peek Ptr Int32
minimumHeight
    Int32
naturalHeight' <- Ptr Int32 -> IO Int32
forall a. Storable a => Ptr a -> IO a
peek Ptr Int32
naturalHeight
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
widget
    Ptr Int32 -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr Int32
minimumHeight
    Ptr Int32 -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr Int32
naturalHeight
    (Int32, Int32) -> IO (Int32, Int32)
forall (m :: * -> *) a. Monad m => a -> m a
return (Int32
minimumHeight', Int32
naturalHeight')

#if defined(ENABLE_OVERLOADING)
data WidgetGetPreferredHeightMethodInfo
instance (signature ~ (m ((Int32, Int32))), MonadIO m, IsWidget a) => O.OverloadedMethod WidgetGetPreferredHeightMethodInfo a signature where
    overloadedMethod = widgetGetPreferredHeight

instance O.OverloadedMethodInfo WidgetGetPreferredHeightMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Gtk.Objects.Widget.widgetGetPreferredHeight",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-3.0.38/docs/GI-Gtk-Objects-Widget.html#v:widgetGetPreferredHeight"
        })


#endif

-- method Widget::get_preferred_height_and_baseline_for_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 instance"
--                 , 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 "the width which is available for allocation, or -1 if none"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "minimum_height"
--           , argType = TBasicType TInt
--           , direction = DirectionOut
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText =
--                     Just "location for storing the minimum height, or %NULL"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferEverything
--           }
--       , Arg
--           { argCName = "natural_height"
--           , argType = TBasicType TInt
--           , direction = DirectionOut
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText =
--                     Just "location for storing the natural height, 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 for storing the baseline for the minimum height, 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 for storing the baseline for the natural 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_preferred_height_and_baseline_for_width" gtk_widget_get_preferred_height_and_baseline_for_width :: 
    Ptr Widget ->                           -- widget : TInterface (Name {namespace = "Gtk", name = "Widget"})
    Int32 ->                                -- width : TBasicType TInt
    Ptr Int32 ->                            -- minimum_height : TBasicType TInt
    Ptr Int32 ->                            -- natural_height : TBasicType TInt
    Ptr Int32 ->                            -- minimum_baseline : TBasicType TInt
    Ptr Int32 ->                            -- natural_baseline : TBasicType TInt
    IO ()

-- | Retrieves a widget’s minimum and natural height and the corresponding baselines if it would be given
-- the specified /@width@/, or the default height if /@width@/ is -1. The baselines may be -1 which means
-- that no baseline is requested for this widget.
-- 
-- The returned request will be modified by the
-- GtkWidgetClass[adjust_size_request](#g:signal:adjust_size_request) and GtkWidgetClass[adjust_baseline_request](#g:signal:adjust_baseline_request) virtual methods
-- and by any @/GtkSizeGroups/@ that have been applied. That is, the returned request
-- is the one that should be used for layout, not necessarily the one
-- returned by the widget itself.
-- 
-- /Since: 3.10/
widgetGetPreferredHeightAndBaselineForWidth ::
    (B.CallStack.HasCallStack, MonadIO m, IsWidget a) =>
    a
    -- ^ /@widget@/: a t'GI.Gtk.Objects.Widget.Widget' instance
    -> Int32
    -- ^ /@width@/: the width which is available for allocation, or -1 if none
    -> m ((Int32, Int32, Int32, Int32))
widgetGetPreferredHeightAndBaselineForWidth :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsWidget a) =>
a -> Int32 -> m (Int32, Int32, Int32, Int32)
widgetGetPreferredHeightAndBaselineForWidth a
widget Int32
width = 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
    Ptr Int32
minimumHeight <- IO (Ptr Int32)
forall a. Storable a => IO (Ptr a)
allocMem :: IO (Ptr Int32)
    Ptr Int32
naturalHeight <- 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
-> Int32
-> Ptr Int32
-> Ptr Int32
-> Ptr Int32
-> Ptr Int32
-> IO ()
gtk_widget_get_preferred_height_and_baseline_for_width Ptr Widget
widget' Int32
width Ptr Int32
minimumHeight Ptr Int32
naturalHeight Ptr Int32
minimumBaseline Ptr Int32
naturalBaseline
    Int32
minimumHeight' <- Ptr Int32 -> IO Int32
forall a. Storable a => Ptr a -> IO a
peek Ptr Int32
minimumHeight
    Int32
naturalHeight' <- Ptr Int32 -> IO Int32
forall a. Storable a => Ptr a -> IO a
peek Ptr Int32
naturalHeight
    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
minimumHeight
    Ptr Int32 -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr Int32
naturalHeight
    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
minimumHeight', Int32
naturalHeight', Int32
minimumBaseline', Int32
naturalBaseline')

#if defined(ENABLE_OVERLOADING)
data WidgetGetPreferredHeightAndBaselineForWidthMethodInfo
instance (signature ~ (Int32 -> m ((Int32, Int32, Int32, Int32))), MonadIO m, IsWidget a) => O.OverloadedMethod WidgetGetPreferredHeightAndBaselineForWidthMethodInfo a signature where
    overloadedMethod = widgetGetPreferredHeightAndBaselineForWidth

instance O.OverloadedMethodInfo WidgetGetPreferredHeightAndBaselineForWidthMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Gtk.Objects.Widget.widgetGetPreferredHeightAndBaselineForWidth",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-3.0.38/docs/GI-Gtk-Objects-Widget.html#v:widgetGetPreferredHeightAndBaselineForWidth"
        })


#endif

-- method Widget::get_preferred_height_for_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 instance"
--                 , 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 "the width which is available for allocation"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "minimum_height"
--           , argType = TBasicType TInt
--           , direction = DirectionOut
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText =
--                     Just "location for storing the minimum height, or %NULL"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferEverything
--           }
--       , Arg
--           { argCName = "natural_height"
--           , argType = TBasicType TInt
--           , direction = DirectionOut
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText =
--                     Just "location for storing the natural 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_preferred_height_for_width" gtk_widget_get_preferred_height_for_width :: 
    Ptr Widget ->                           -- widget : TInterface (Name {namespace = "Gtk", name = "Widget"})
    Int32 ->                                -- width : TBasicType TInt
    Ptr Int32 ->                            -- minimum_height : TBasicType TInt
    Ptr Int32 ->                            -- natural_height : TBasicType TInt
    IO ()

-- | Retrieves a widget’s minimum and natural height if it would be given
-- the specified /@width@/.
-- 
-- The returned request will be modified by the
-- GtkWidgetClass[adjust_size_request](#g:signal:adjust_size_request) virtual method and by any
-- @/GtkSizeGroups/@ that have been applied. That is, the returned request
-- is the one that should be used for layout, not necessarily the one
-- returned by the widget itself.
-- 
-- /Since: 3.0/
widgetGetPreferredHeightForWidth ::
    (B.CallStack.HasCallStack, MonadIO m, IsWidget a) =>
    a
    -- ^ /@widget@/: a t'GI.Gtk.Objects.Widget.Widget' instance
    -> Int32
    -- ^ /@width@/: the width which is available for allocation
    -> m ((Int32, Int32))
widgetGetPreferredHeightForWidth :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsWidget a) =>
a -> Int32 -> m (Int32, Int32)
widgetGetPreferredHeightForWidth a
widget Int32
width = 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
minimumHeight <- IO (Ptr Int32)
forall a. Storable a => IO (Ptr a)
allocMem :: IO (Ptr Int32)
    Ptr Int32
naturalHeight <- IO (Ptr Int32)
forall a. Storable a => IO (Ptr a)
allocMem :: IO (Ptr Int32)
    Ptr Widget -> Int32 -> Ptr Int32 -> Ptr Int32 -> IO ()
gtk_widget_get_preferred_height_for_width Ptr Widget
widget' Int32
width Ptr Int32
minimumHeight Ptr Int32
naturalHeight
    Int32
minimumHeight' <- Ptr Int32 -> IO Int32
forall a. Storable a => Ptr a -> IO a
peek Ptr Int32
minimumHeight
    Int32
naturalHeight' <- Ptr Int32 -> IO Int32
forall a. Storable a => Ptr a -> IO a
peek Ptr Int32
naturalHeight
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
widget
    Ptr Int32 -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr Int32
minimumHeight
    Ptr Int32 -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr Int32
naturalHeight
    (Int32, Int32) -> IO (Int32, Int32)
forall (m :: * -> *) a. Monad m => a -> m a
return (Int32
minimumHeight', Int32
naturalHeight')

#if defined(ENABLE_OVERLOADING)
data WidgetGetPreferredHeightForWidthMethodInfo
instance (signature ~ (Int32 -> m ((Int32, Int32))), MonadIO m, IsWidget a) => O.OverloadedMethod WidgetGetPreferredHeightForWidthMethodInfo a signature where
    overloadedMethod = widgetGetPreferredHeightForWidth

instance O.OverloadedMethodInfo WidgetGetPreferredHeightForWidthMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Gtk.Objects.Widget.widgetGetPreferredHeightForWidth",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-3.0.38/docs/GI-Gtk-Objects-Widget.html#v:widgetGetPreferredHeightForWidth"
        })


#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.widgetGetPreferredHeightAndBaselineForWidth' if you want to support
-- baseline alignment.
-- 
-- /Since: 3.0/
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 :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsWidget a) =>
a -> m (Requisition, Requisition)
widgetGetPreferredSize 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. GBoxed a => Int -> IO (Ptr a)
SP.callocBoxedBytes Int
8 :: IO (Ptr Gtk.Requisition.Requisition)
    Ptr Requisition
naturalSize <- Int -> IO (Ptr Requisition)
forall a. GBoxed a => Int -> IO (Ptr a)
SP.callocBoxedBytes Int
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, GBoxed 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, GBoxed 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.OverloadedMethod WidgetGetPreferredSizeMethodInfo a signature where
    overloadedMethod = widgetGetPreferredSize

instance O.OverloadedMethodInfo WidgetGetPreferredSizeMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Gtk.Objects.Widget.widgetGetPreferredSize",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-3.0.38/docs/GI-Gtk-Objects-Widget.html#v:widgetGetPreferredSize"
        })


#endif

-- method Widget::get_preferred_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 instance"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "minimum_width"
--           , argType = TBasicType TInt
--           , direction = DirectionOut
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "location to store the minimum width, or %NULL"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferEverything
--           }
--       , Arg
--           { argCName = "natural_width"
--           , argType = TBasicType TInt
--           , direction = DirectionOut
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "location to store the natural width, 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_preferred_width" gtk_widget_get_preferred_width :: 
    Ptr Widget ->                           -- widget : TInterface (Name {namespace = "Gtk", name = "Widget"})
    Ptr Int32 ->                            -- minimum_width : TBasicType TInt
    Ptr Int32 ->                            -- natural_width : TBasicType TInt
    IO ()

-- | Retrieves a widget’s initial minimum and natural width.
-- 
-- This call is specific to height-for-width requests.
-- 
-- The returned request will be modified by the
-- GtkWidgetClass[adjust_size_request](#g:signal:adjust_size_request) virtual method and by any
-- @/GtkSizeGroups/@ that have been applied. That is, the returned request
-- is the one that should be used for layout, not necessarily the one
-- returned by the widget itself.
-- 
-- /Since: 3.0/
widgetGetPreferredWidth ::
    (B.CallStack.HasCallStack, MonadIO m, IsWidget a) =>
    a
    -- ^ /@widget@/: a t'GI.Gtk.Objects.Widget.Widget' instance
    -> m ((Int32, Int32))
widgetGetPreferredWidth :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsWidget a) =>
a -> m (Int32, Int32)
widgetGetPreferredWidth 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
minimumWidth <- IO (Ptr Int32)
forall a. Storable a => IO (Ptr a)
allocMem :: IO (Ptr Int32)
    Ptr Int32
naturalWidth <- IO (Ptr Int32)
forall a. Storable a => IO (Ptr a)
allocMem :: IO (Ptr Int32)
    Ptr Widget -> Ptr Int32 -> Ptr Int32 -> IO ()
gtk_widget_get_preferred_width Ptr Widget
widget' Ptr Int32
minimumWidth Ptr Int32
naturalWidth
    Int32
minimumWidth' <- Ptr Int32 -> IO Int32
forall a. Storable a => Ptr a -> IO a
peek Ptr Int32
minimumWidth
    Int32
naturalWidth' <- Ptr Int32 -> IO Int32
forall a. Storable a => Ptr a -> IO a
peek Ptr Int32
naturalWidth
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
widget
    Ptr Int32 -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr Int32
minimumWidth
    Ptr Int32 -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr Int32
naturalWidth
    (Int32, Int32) -> IO (Int32, Int32)
forall (m :: * -> *) a. Monad m => a -> m a
return (Int32
minimumWidth', Int32
naturalWidth')

#if defined(ENABLE_OVERLOADING)
data WidgetGetPreferredWidthMethodInfo
instance (signature ~ (m ((Int32, Int32))), MonadIO m, IsWidget a) => O.OverloadedMethod WidgetGetPreferredWidthMethodInfo a signature where
    overloadedMethod = widgetGetPreferredWidth

instance O.OverloadedMethodInfo WidgetGetPreferredWidthMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Gtk.Objects.Widget.widgetGetPreferredWidth",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-3.0.38/docs/GI-Gtk-Objects-Widget.html#v:widgetGetPreferredWidth"
        })


#endif

-- method Widget::get_preferred_width_for_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 instance"
--                 , 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 "the height which is available for allocation"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "minimum_width"
--           , argType = TBasicType TInt
--           , direction = DirectionOut
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText =
--                     Just "location for storing the minimum width, or %NULL"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferEverything
--           }
--       , Arg
--           { argCName = "natural_width"
--           , argType = TBasicType TInt
--           , direction = DirectionOut
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText =
--                     Just "location for storing the natural width, 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_preferred_width_for_height" gtk_widget_get_preferred_width_for_height :: 
    Ptr Widget ->                           -- widget : TInterface (Name {namespace = "Gtk", name = "Widget"})
    Int32 ->                                -- height : TBasicType TInt
    Ptr Int32 ->                            -- minimum_width : TBasicType TInt
    Ptr Int32 ->                            -- natural_width : TBasicType TInt
    IO ()

-- | Retrieves a widget’s minimum and natural width if it would be given
-- the specified /@height@/.
-- 
-- The returned request will be modified by the
-- GtkWidgetClass[adjust_size_request](#g:signal:adjust_size_request) virtual method and by any
-- @/GtkSizeGroups/@ that have been applied. That is, the returned request
-- is the one that should be used for layout, not necessarily the one
-- returned by the widget itself.
-- 
-- /Since: 3.0/
widgetGetPreferredWidthForHeight ::
    (B.CallStack.HasCallStack, MonadIO m, IsWidget a) =>
    a
    -- ^ /@widget@/: a t'GI.Gtk.Objects.Widget.Widget' instance
    -> Int32
    -- ^ /@height@/: the height which is available for allocation
    -> m ((Int32, Int32))
widgetGetPreferredWidthForHeight :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsWidget a) =>
a -> Int32 -> m (Int32, Int32)
widgetGetPreferredWidthForHeight a
widget Int32
height = 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
minimumWidth <- IO (Ptr Int32)
forall a. Storable a => IO (Ptr a)
allocMem :: IO (Ptr Int32)
    Ptr Int32
naturalWidth <- IO (Ptr Int32)
forall a. Storable a => IO (Ptr a)
allocMem :: IO (Ptr Int32)
    Ptr Widget -> Int32 -> Ptr Int32 -> Ptr Int32 -> IO ()
gtk_widget_get_preferred_width_for_height Ptr Widget
widget' Int32
height Ptr Int32
minimumWidth Ptr Int32
naturalWidth
    Int32
minimumWidth' <- Ptr Int32 -> IO Int32
forall a. Storable a => Ptr a -> IO a
peek Ptr Int32
minimumWidth
    Int32
naturalWidth' <- Ptr Int32 -> IO Int32
forall a. Storable a => Ptr a -> IO a
peek Ptr Int32
naturalWidth
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
widget
    Ptr Int32 -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr Int32
minimumWidth
    Ptr Int32 -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr Int32
naturalWidth
    (Int32, Int32) -> IO (Int32, Int32)
forall (m :: * -> *) a. Monad m => a -> m a
return (Int32
minimumWidth', Int32
naturalWidth')

#if defined(ENABLE_OVERLOADING)
data WidgetGetPreferredWidthForHeightMethodInfo
instance (signature ~ (Int32 -> m ((Int32, Int32))), MonadIO m, IsWidget a) => O.OverloadedMethod WidgetGetPreferredWidthForHeightMethodInfo a signature where
    overloadedMethod = widgetGetPreferredWidthForHeight

instance O.OverloadedMethodInfo WidgetGetPreferredWidthForHeightMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Gtk.Objects.Widget.widgetGetPreferredWidthForHeight",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-3.0.38/docs/GI-Gtk-Objects-Widget.html#v:widgetGetPreferredWidthForHeight"
        })


#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.
-- 
-- /Since: 2.20/
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 :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsWidget a) =>
a -> m Bool
widgetGetRealized a
widget = IO Bool -> m Bool
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Bool -> m Bool) -> IO Bool -> 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
/= CInt
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.OverloadedMethod WidgetGetRealizedMethodInfo a signature where
    overloadedMethod = widgetGetRealized

instance O.OverloadedMethodInfo WidgetGetRealizedMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Gtk.Objects.Widget.widgetGetRealized",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-3.0.38/docs/GI-Gtk-Objects-Widget.html#v: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'.
-- 
-- /Since: 2.18/
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 :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsWidget a) =>
a -> m Bool
widgetGetReceivesDefault a
widget = IO Bool -> m Bool
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Bool -> m Bool) -> IO Bool -> 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
/= CInt
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.OverloadedMethod WidgetGetReceivesDefaultMethodInfo a signature where
    overloadedMethod = widgetGetReceivesDefault

instance O.OverloadedMethodInfo WidgetGetReceivesDefaultMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Gtk.Objects.Widget.widgetGetReceivesDefault",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-3.0.38/docs/GI-Gtk-Objects-Widget.html#v: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.
-- 
-- /Since: 3.0/
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 :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsWidget a) =>
a -> m SizeRequestMode
widgetGetRequestMode 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.OverloadedMethod WidgetGetRequestModeMethodInfo a signature where
    overloadedMethod = widgetGetRequestMode

instance O.OverloadedMethodInfo WidgetGetRequestModeMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Gtk.Objects.Widget.widgetGetRequestMode",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-3.0.38/docs/GI-Gtk-Objects-Widget.html#v:widgetGetRequestMode"
        })


#endif

-- method Widget::get_requisition
-- 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 = "requisition"
--           , argType =
--               TInterface Name { namespace = "Gtk" , name = "Requisition" }
--           , direction = DirectionOut
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a pointer to a #GtkRequisition 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_requisition" gtk_widget_get_requisition :: 
    Ptr Widget ->                           -- widget : TInterface (Name {namespace = "Gtk", name = "Widget"})
    Ptr Gtk.Requisition.Requisition ->      -- requisition : TInterface (Name {namespace = "Gtk", name = "Requisition"})
    IO ()

{-# DEPRECATED widgetGetRequisition ["(Since version 3.0)","The t'GI.Gtk.Structs.Requisition.Requisition' cache on the widget was","removed, If you need to cache sizes across requests and allocations,","add an explicit cache to the widget in question instead."] #-}
-- | Retrieves the widget’s requisition.
-- 
-- This function should only be used by widget implementations in
-- order to figure whether the widget’s requisition has actually
-- changed after some internal state change (so that they can call
-- 'GI.Gtk.Objects.Widget.widgetQueueResize' instead of 'GI.Gtk.Objects.Widget.widgetQueueDraw').
-- 
-- Normally, 'GI.Gtk.Objects.Widget.widgetSizeRequest' should be used.
-- 
-- /Since: 2.20/
widgetGetRequisition ::
    (B.CallStack.HasCallStack, MonadIO m, IsWidget a) =>
    a
    -- ^ /@widget@/: a t'GI.Gtk.Objects.Widget.Widget'
    -> m (Gtk.Requisition.Requisition)
widgetGetRequisition :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsWidget a) =>
a -> m Requisition
widgetGetRequisition a
widget = IO Requisition -> m Requisition
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Requisition -> m Requisition)
-> IO Requisition -> m 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
requisition <- Int -> IO (Ptr Requisition)
forall a. GBoxed a => Int -> IO (Ptr a)
SP.callocBoxedBytes Int
8 :: IO (Ptr Gtk.Requisition.Requisition)
    Ptr Widget -> Ptr Requisition -> IO ()
gtk_widget_get_requisition Ptr Widget
widget' Ptr Requisition
requisition
    Requisition
requisition' <- ((ManagedPtr Requisition -> Requisition)
-> Ptr Requisition -> IO Requisition
forall a.
(HasCallStack, GBoxed a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
wrapBoxed ManagedPtr Requisition -> Requisition
Gtk.Requisition.Requisition) Ptr Requisition
requisition
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
widget
    Requisition -> IO Requisition
forall (m :: * -> *) a. Monad m => a -> m a
return Requisition
requisition'

#if defined(ENABLE_OVERLOADING)
data WidgetGetRequisitionMethodInfo
instance (signature ~ (m (Gtk.Requisition.Requisition)), MonadIO m, IsWidget a) => O.OverloadedMethod WidgetGetRequisitionMethodInfo a signature where
    overloadedMethod = widgetGetRequisition

instance O.OverloadedMethodInfo WidgetGetRequisitionMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Gtk.Objects.Widget.widgetGetRequisition",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-3.0.38/docs/GI-Gtk-Objects-Widget.html#v:widgetGetRequisition"
        })


#endif

-- method Widget::get_root_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 = "Gdk" , name = "Window" })
-- throws : False
-- Skip return : False

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

{-# DEPRECATED widgetGetRootWindow ["(Since version 3.12)","Use 'GI.Gdk.Objects.Screen.screenGetRootWindow' instead"] #-}
-- | Get the root window where this widget is located. This function can
-- only be called after the widget has been added to a widget
-- hierarchy with t'GI.Gtk.Objects.Window.Window' at the top.
-- 
-- The root window is useful for such purposes as creating a popup
-- t'GI.Gdk.Objects.Window.Window' associated with the window. 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.
-- 
-- /Since: 2.2/
widgetGetRootWindow ::
    (B.CallStack.HasCallStack, MonadIO m, IsWidget a) =>
    a
    -- ^ /@widget@/: a t'GI.Gtk.Objects.Widget.Widget'
    -> m Gdk.Window.Window
    -- ^ __Returns:__ the t'GI.Gdk.Objects.Window.Window' root window for the toplevel for this widget.
widgetGetRootWindow :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsWidget a) =>
a -> m Window
widgetGetRootWindow 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_root_window Ptr Widget
widget'
    Text -> Ptr Window -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"widgetGetRootWindow" 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
Gdk.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 WidgetGetRootWindowMethodInfo
instance (signature ~ (m Gdk.Window.Window), MonadIO m, IsWidget a) => O.OverloadedMethod WidgetGetRootWindowMethodInfo a signature where
    overloadedMethod = widgetGetRootWindow

instance O.OverloadedMethodInfo WidgetGetRootWindowMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Gtk.Objects.Widget.widgetGetRootWindow",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-3.0.38/docs/GI-Gtk-Objects-Widget.html#v:widgetGetRootWindow"
        })


#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.Window.windowGetScaleFactor'.
-- 
-- /Since: 3.10/
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 :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsWidget a) =>
a -> m Int32
widgetGetScaleFactor 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.OverloadedMethod WidgetGetScaleFactorMethodInfo a signature where
    overloadedMethod = widgetGetScaleFactor

instance O.OverloadedMethodInfo WidgetGetScaleFactorMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Gtk.Objects.Widget.widgetGetScaleFactor",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-3.0.38/docs/GI-Gtk-Objects-Widget.html#v:widgetGetScaleFactor"
        })


#endif

-- method Widget::get_screen
-- 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 = "Screen" })
-- throws : False
-- Skip return : False

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

-- | Get the t'GI.Gdk.Objects.Screen.Screen' from 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 screen specific
-- resources when a widget has been realized, and you should
-- free those resources when the widget is unrealized.
-- 
-- /Since: 2.2/
widgetGetScreen ::
    (B.CallStack.HasCallStack, MonadIO m, IsWidget a) =>
    a
    -- ^ /@widget@/: a t'GI.Gtk.Objects.Widget.Widget'
    -> m Gdk.Screen.Screen
    -- ^ __Returns:__ the t'GI.Gdk.Objects.Screen.Screen' for the toplevel for this widget.
widgetGetScreen :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsWidget a) =>
a -> m Screen
widgetGetScreen a
widget = IO Screen -> m Screen
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Screen -> m Screen) -> IO Screen -> m Screen
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 Screen
result <- Ptr Widget -> IO (Ptr Screen)
gtk_widget_get_screen Ptr Widget
widget'
    Text -> Ptr Screen -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"widgetGetScreen" Ptr Screen
result
    Screen
result' <- ((ManagedPtr Screen -> Screen) -> Ptr Screen -> IO Screen
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr Screen -> Screen
Gdk.Screen.Screen) Ptr Screen
result
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
widget
    Screen -> IO Screen
forall (m :: * -> *) a. Monad m => a -> m a
return Screen
result'

#if defined(ENABLE_OVERLOADING)
data WidgetGetScreenMethodInfo
instance (signature ~ (m Gdk.Screen.Screen), MonadIO m, IsWidget a) => O.OverloadedMethod WidgetGetScreenMethodInfo a signature where
    overloadedMethod = widgetGetScreen

instance O.OverloadedMethodInfo WidgetGetScreenMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Gtk.Objects.Widget.widgetGetScreen",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-3.0.38/docs/GI-Gtk-Objects-Widget.html#v:widgetGetScreen"
        })


#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'.
-- 
-- /Since: 2.18/
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 :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsWidget a) =>
a -> m Bool
widgetGetSensitive a
widget = IO Bool -> m Bool
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Bool -> m Bool) -> IO Bool -> 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
/= CInt
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.OverloadedMethod WidgetGetSensitiveMethodInfo a signature where
    overloadedMethod = widgetGetSensitive

instance O.OverloadedMethodInfo WidgetGetSensitiveMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Gtk.Objects.Widget.widgetGetSensitive",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-3.0.38/docs/GI-Gtk-Objects-Widget.html#v: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.Screen.Screen'.
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 :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsWidget a) =>
a -> m Settings
widgetGetSettings 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 Text
"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.OverloadedMethod WidgetGetSettingsMethodInfo a signature where
    overloadedMethod = widgetGetSettings

instance O.OverloadedMethodInfo WidgetGetSettingsMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Gtk.Objects.Widget.widgetGetSettings",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-3.0.38/docs/GI-Gtk-Objects-Widget.html#v: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.widgetGetPreferredSize' 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 :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsWidget a) =>
a -> m (Int32, Int32)
widgetGetSizeRequest 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.OverloadedMethod WidgetGetSizeRequestMethodInfo a signature where
    overloadedMethod = widgetGetSizeRequest

instance O.OverloadedMethodInfo WidgetGetSizeRequestMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Gtk.Objects.Widget.widgetGetSizeRequest",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-3.0.38/docs/GI-Gtk-Objects-Widget.html#v:widgetGetSizeRequest"
        })


#endif

-- method Widget::get_state
-- 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 = "StateType" })
-- throws : False
-- Skip return : False

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

{-# DEPRECATED widgetGetState ["(Since version 3.0)","Use 'GI.Gtk.Objects.Widget.widgetGetStateFlags' instead."] #-}
-- | Returns the widget’s state. See 'GI.Gtk.Objects.Widget.widgetSetState'.
-- 
-- /Since: 2.18/
widgetGetState ::
    (B.CallStack.HasCallStack, MonadIO m, IsWidget a) =>
    a
    -- ^ /@widget@/: a t'GI.Gtk.Objects.Widget.Widget'
    -> m Gtk.Enums.StateType
    -- ^ __Returns:__ the state of /@widget@/.
widgetGetState :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsWidget a) =>
a -> m StateType
widgetGetState a
widget = IO StateType -> m StateType
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO StateType -> m StateType) -> IO StateType -> m StateType
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 Ptr Widget
widget'
    let result' :: StateType
result' = (Int -> StateType
forall a. Enum a => Int -> a
toEnum (Int -> StateType) -> (CUInt -> Int) -> CUInt -> StateType
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
    StateType -> IO StateType
forall (m :: * -> *) a. Monad m => a -> m a
return StateType
result'

#if defined(ENABLE_OVERLOADING)
data WidgetGetStateMethodInfo
instance (signature ~ (m Gtk.Enums.StateType), MonadIO m, IsWidget a) => O.OverloadedMethod WidgetGetStateMethodInfo a signature where
    overloadedMethod = widgetGetState

instance O.OverloadedMethodInfo WidgetGetStateMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Gtk.Objects.Widget.widgetGetState",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-3.0.38/docs/GI-Gtk-Objects-Widget.html#v:widgetGetState"
        })


#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'.
-- 
-- /Since: 3.0/
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 :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsWidget a) =>
a -> m [StateFlags]
widgetGetStateFlags 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.OverloadedMethod WidgetGetStateFlagsMethodInfo a signature where
    overloadedMethod = widgetGetStateFlags

instance O.OverloadedMethodInfo WidgetGetStateFlagsMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Gtk.Objects.Widget.widgetGetStateFlags",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-3.0.38/docs/GI-Gtk-Objects-Widget.html#v:widgetGetStateFlags"
        })


#endif

-- method Widget::get_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: Just (TInterface Name { namespace = "Gtk" , name = "Style" })
-- throws : False
-- Skip return : False

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

{-# DEPRECATED widgetGetStyle ["(Since version 3.0)","Use t'GI.Gtk.Objects.StyleContext.StyleContext' instead"] #-}
-- | Simply an accessor function that returns /@widget@/->style.
widgetGetStyle ::
    (B.CallStack.HasCallStack, MonadIO m, IsWidget a) =>
    a
    -- ^ /@widget@/: a t'GI.Gtk.Objects.Widget.Widget'
    -> m Gtk.Style.Style
    -- ^ __Returns:__ the widget’s t'GI.Gtk.Objects.Style.Style'
widgetGetStyle :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsWidget a) =>
a -> m Style
widgetGetStyle a
widget = IO Style -> m Style
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Style -> m Style) -> IO Style -> m Style
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 Style
result <- Ptr Widget -> IO (Ptr Style)
gtk_widget_get_style Ptr Widget
widget'
    Text -> Ptr Style -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"widgetGetStyle" Ptr Style
result
    Style
result' <- ((ManagedPtr Style -> Style) -> Ptr Style -> IO Style
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr Style -> Style
Gtk.Style.Style) Ptr Style
result
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
widget
    Style -> IO Style
forall (m :: * -> *) a. Monad m => a -> m a
return Style
result'

#if defined(ENABLE_OVERLOADING)
data WidgetGetStyleMethodInfo
instance (signature ~ (m Gtk.Style.Style), MonadIO m, IsWidget a) => O.OverloadedMethod WidgetGetStyleMethodInfo a signature where
    overloadedMethod = widgetGetStyle

instance O.OverloadedMethodInfo WidgetGetStyleMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Gtk.Objects.Widget.widgetGetStyle",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-3.0.38/docs/GI-Gtk-Objects-Widget.html#v:widgetGetStyle"
        })


#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 :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsWidget a) =>
a -> m StyleContext
widgetGetStyleContext 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 Text
"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.OverloadedMethod WidgetGetStyleContextMethodInfo a signature where
    overloadedMethod = widgetGetStyleContext

instance O.OverloadedMethodInfo WidgetGetStyleContextMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Gtk.Objects.Widget.widgetGetStyleContext",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-3.0.38/docs/GI-Gtk-Objects-Widget.html#v: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 :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsWidget a) =>
a -> m Bool
widgetGetSupportMultidevice a
widget = IO Bool -> m Bool
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Bool -> m Bool) -> IO Bool -> 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
/= CInt
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.OverloadedMethod WidgetGetSupportMultideviceMethodInfo a signature where
    overloadedMethod = widgetGetSupportMultidevice

instance O.OverloadedMethodInfo WidgetGetSupportMultideviceMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Gtk.Objects.Widget.widgetGetSupportMultidevice",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-3.0.38/docs/GI-Gtk-Objects-Widget.html#v:widgetGetSupportMultidevice"
        })


#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 :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsWidget a) =>
a -> GType -> Text -> m Object
widgetGetTemplateChild a
widget GType
widgetType 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 Text
"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.OverloadedMethod WidgetGetTemplateChildMethodInfo a signature where
    overloadedMethod = widgetGetTemplateChild

instance O.OverloadedMethodInfo WidgetGetTemplateChildMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Gtk.Objects.Widget.widgetGetTemplateChild",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-3.0.38/docs/GI-Gtk-Objects-Widget.html#v: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@/.
-- 
-- /Since: 2.12/
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 :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsWidget a) =>
a -> m (Maybe Text)
widgetGetTooltipMarkup 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
$ \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.OverloadedMethod WidgetGetTooltipMarkupMethodInfo a signature where
    overloadedMethod = widgetGetTooltipMarkup

instance O.OverloadedMethodInfo WidgetGetTooltipMarkupMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Gtk.Objects.Widget.widgetGetTooltipMarkup",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-3.0.38/docs/GI-Gtk-Objects-Widget.html#v: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@/.
-- 
-- /Since: 2.12/
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 :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsWidget a) =>
a -> m (Maybe Text)
widgetGetTooltipText 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
$ \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.OverloadedMethod WidgetGetTooltipTextMethodInfo a signature where
    overloadedMethod = widgetGetTooltipText

instance O.OverloadedMethodInfo WidgetGetTooltipTextMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Gtk.Objects.Widget.widgetGetTooltipText",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-3.0.38/docs/GI-Gtk-Objects-Widget.html#v: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'.
-- 
-- /Since: 2.12/
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 :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsWidget a) =>
a -> m Window
widgetGetTooltipWindow 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 Text
"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.OverloadedMethod WidgetGetTooltipWindowMethodInfo a signature where
    overloadedMethod = widgetGetTooltipWindow

instance O.OverloadedMethodInfo WidgetGetTooltipWindowMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Gtk.Objects.Widget.widgetGetTooltipWindow",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-3.0.38/docs/GI-Gtk-Objects-Widget.html#v: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'. While the second case may
-- seem unlikely, it actually happens when a t'GI.Gtk.Objects.Plug.Plug' is embedded
-- inside a t'GI.Gtk.Objects.Socket.Socket' within the same application.
-- 
-- 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 :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsWidget a) =>
a -> m Widget
widgetGetToplevel 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 Text
"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.OverloadedMethod WidgetGetToplevelMethodInfo a signature where
    overloadedMethod = widgetGetToplevel

instance O.OverloadedMethodInfo WidgetGetToplevelMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Gtk.Objects.Widget.widgetGetToplevel",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-3.0.38/docs/GI-Gtk-Objects-Widget.html#v: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.
-- 
-- For backwards compatibility reasons this method will never return
-- 'GI.Gtk.Enums.AlignBaseline', but instead it will convert it to
-- 'GI.Gtk.Enums.AlignFill'. If your widget want to support baseline aligned
-- children it must use 'GI.Gtk.Objects.Widget.widgetGetValignWithBaseline', or
-- @g_object_get (widget, \"valign\", &value, NULL)@, which will
-- also report the true value.
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@/, ignoring baseline alignment
widgetGetValign :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsWidget a) =>
a -> m Align
widgetGetValign 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.OverloadedMethod WidgetGetValignMethodInfo a signature where
    overloadedMethod = widgetGetValign

instance O.OverloadedMethodInfo WidgetGetValignMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Gtk.Objects.Widget.widgetGetValign",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-3.0.38/docs/GI-Gtk-Objects-Widget.html#v:widgetGetValign"
        })


#endif

-- method Widget::get_valign_with_baseline
-- 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_with_baseline" gtk_widget_get_valign_with_baseline :: 
    Ptr Widget ->                           -- widget : TInterface (Name {namespace = "Gtk", name = "Widget"})
    IO CUInt

-- | Gets the value of the t'GI.Gtk.Objects.Widget.Widget':@/valign/@ property, including
-- 'GI.Gtk.Enums.AlignBaseline'.
-- 
-- /Since: 3.10/
widgetGetValignWithBaseline ::
    (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@/
widgetGetValignWithBaseline :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsWidget a) =>
a -> m Align
widgetGetValignWithBaseline 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_with_baseline 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 WidgetGetValignWithBaselineMethodInfo
instance (signature ~ (m Gtk.Enums.Align), MonadIO m, IsWidget a) => O.OverloadedMethod WidgetGetValignWithBaselineMethodInfo a signature where
    overloadedMethod = widgetGetValignWithBaseline

instance O.OverloadedMethodInfo WidgetGetValignWithBaselineMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Gtk.Objects.Widget.widgetGetValignWithBaseline",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-3.0.38/docs/GI-Gtk-Objects-Widget.html#v:widgetGetValignWithBaseline"
        })


#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 :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsWidget a) =>
a -> m Bool
widgetGetVexpand a
widget = IO Bool -> m Bool
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Bool -> m Bool) -> IO Bool -> 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
/= CInt
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.OverloadedMethod WidgetGetVexpandMethodInfo a signature where
    overloadedMethod = widgetGetVexpand

instance O.OverloadedMethodInfo WidgetGetVexpandMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Gtk.Objects.Widget.widgetGetVexpand",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-3.0.38/docs/GI-Gtk-Objects-Widget.html#v: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 :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsWidget a) =>
a -> m Bool
widgetGetVexpandSet a
widget = IO Bool -> m Bool
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Bool -> m Bool) -> IO Bool -> 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
/= CInt
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.OverloadedMethod WidgetGetVexpandSetMethodInfo a signature where
    overloadedMethod = widgetGetVexpandSet

instance O.OverloadedMethodInfo WidgetGetVexpandSetMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Gtk.Objects.Widget.widgetGetVexpandSet",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-3.0.38/docs/GI-Gtk-Objects-Widget.html#v: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'.
-- 
-- /Since: 2.18/
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 :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsWidget a) =>
a -> m Bool
widgetGetVisible a
widget = IO Bool -> m Bool
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Bool -> m Bool) -> IO Bool -> 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
/= CInt
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.OverloadedMethod WidgetGetVisibleMethodInfo a signature where
    overloadedMethod = widgetGetVisible

instance O.OverloadedMethodInfo WidgetGetVisibleMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Gtk.Objects.Widget.widgetGetVisible",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-3.0.38/docs/GI-Gtk-Objects-Widget.html#v:widgetGetVisible"
        })


#endif

-- method Widget::get_visual
-- 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 = "Visual" })
-- throws : False
-- Skip return : False

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

-- | Gets the visual that will be used to render /@widget@/.
widgetGetVisual ::
    (B.CallStack.HasCallStack, MonadIO m, IsWidget a) =>
    a
    -- ^ /@widget@/: a t'GI.Gtk.Objects.Widget.Widget'
    -> m Gdk.Visual.Visual
    -- ^ __Returns:__ the visual for /@widget@/
widgetGetVisual :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsWidget a) =>
a -> m Visual
widgetGetVisual a
widget = IO Visual -> m Visual
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Visual -> m Visual) -> IO Visual -> m Visual
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 Visual
result <- Ptr Widget -> IO (Ptr Visual)
gtk_widget_get_visual Ptr Widget
widget'
    Text -> Ptr Visual -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"widgetGetVisual" Ptr Visual
result
    Visual
result' <- ((ManagedPtr Visual -> Visual) -> Ptr Visual -> IO Visual
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr Visual -> Visual
Gdk.Visual.Visual) Ptr Visual
result
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
widget
    Visual -> IO Visual
forall (m :: * -> *) a. Monad m => a -> m a
return Visual
result'

#if defined(ENABLE_OVERLOADING)
data WidgetGetVisualMethodInfo
instance (signature ~ (m Gdk.Visual.Visual), MonadIO m, IsWidget a) => O.OverloadedMethod WidgetGetVisualMethodInfo a signature where
    overloadedMethod = widgetGetVisual

instance O.OverloadedMethodInfo WidgetGetVisualMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Gtk.Objects.Widget.widgetGetVisual",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-3.0.38/docs/GI-Gtk-Objects-Widget.html#v:widgetGetVisual"
        })


#endif

-- method Widget::get_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 = "Gdk" , name = "Window" })
-- throws : False
-- Skip return : False

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

-- | Returns the widget’s window if it is realized, 'P.Nothing' otherwise
-- 
-- /Since: 2.14/
widgetGetWindow ::
    (B.CallStack.HasCallStack, MonadIO m, IsWidget a) =>
    a
    -- ^ /@widget@/: a t'GI.Gtk.Objects.Widget.Widget'
    -> m (Maybe Gdk.Window.Window)
    -- ^ __Returns:__ /@widget@/’s window.
widgetGetWindow :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsWidget a) =>
a -> m (Maybe Window)
widgetGetWindow a
widget = IO (Maybe Window) -> m (Maybe Window)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Maybe Window) -> m (Maybe Window))
-> IO (Maybe Window) -> m (Maybe 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_window Ptr Widget
widget'
    Maybe Window
maybeResult <- Ptr Window -> (Ptr Window -> IO Window) -> IO (Maybe Window)
forall a b. Ptr a -> (Ptr a -> IO b) -> IO (Maybe b)
convertIfNonNull Ptr Window
result ((Ptr Window -> IO Window) -> IO (Maybe Window))
-> (Ptr Window -> IO Window) -> IO (Maybe Window)
forall a b. (a -> b) -> a -> b
$ \Ptr Window
result' -> do
        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
Gdk.Window.Window) Ptr Window
result'
        Window -> IO Window
forall (m :: * -> *) a. Monad m => a -> m a
return Window
result''
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
widget
    Maybe Window -> IO (Maybe Window)
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe Window
maybeResult

#if defined(ENABLE_OVERLOADING)
data WidgetGetWindowMethodInfo
instance (signature ~ (m (Maybe Gdk.Window.Window)), MonadIO m, IsWidget a) => O.OverloadedMethod WidgetGetWindowMethodInfo a signature where
    overloadedMethod = widgetGetWindow

instance O.OverloadedMethodInfo WidgetGetWindowMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Gtk.Objects.Widget.widgetGetWindow",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-3.0.38/docs/GI-Gtk-Objects-Widget.html#v:widgetGetWindow"
        })


#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 :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsWidget a) =>
a -> m ()
widgetGrabAdd 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.OverloadedMethod WidgetGrabAddMethodInfo a signature where
    overloadedMethod = widgetGrabAdd

instance O.OverloadedMethodInfo WidgetGrabAddMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Gtk.Objects.Widget.widgetGrabAdd",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-3.0.38/docs/GI-Gtk-Objects-Widget.html#v:widgetGrabAdd"
        })


#endif

-- method Widget::grab_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_grab_default" gtk_widget_grab_default :: 
    Ptr Widget ->                           -- widget : TInterface (Name {namespace = "Gtk", name = "Widget"})
    IO ()

-- | Causes /@widget@/ to become the default widget. /@widget@/ must be able to be
-- a default widget; typically you would ensure this yourself
-- by calling 'GI.Gtk.Objects.Widget.widgetSetCanDefault' with a 'P.True' value.
-- The default widget is activated when
-- the user presses Enter in a window. Default widgets must be
-- activatable, that is, 'GI.Gtk.Objects.Widget.widgetActivate' should affect them. Note
-- that t'GI.Gtk.Objects.Entry.Entry' widgets require the “activates-default” property
-- set to 'P.True' before they activate the default widget when Enter
-- is pressed and the t'GI.Gtk.Objects.Entry.Entry' is focused.
widgetGrabDefault ::
    (B.CallStack.HasCallStack, MonadIO m, IsWidget a) =>
    a
    -- ^ /@widget@/: a t'GI.Gtk.Objects.Widget.Widget'
    -> m ()
widgetGrabDefault :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsWidget a) =>
a -> m ()
widgetGrabDefault 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_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 WidgetGrabDefaultMethodInfo
instance (signature ~ (m ()), MonadIO m, IsWidget a) => O.OverloadedMethod WidgetGrabDefaultMethodInfo a signature where
    overloadedMethod = widgetGrabDefault

instance O.OverloadedMethodInfo WidgetGrabDefaultMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Gtk.Objects.Widget.widgetGrabDefault",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-3.0.38/docs/GI-Gtk-Objects-Widget.html#v:widgetGrabDefault"
        })


#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@/ to have the keyboard focus for the t'GI.Gtk.Objects.Window.Window' it\'s
-- inside. /@widget@/ must be a focusable widget, such as a t'GI.Gtk.Objects.Entry.Entry';
-- something like t'GI.Gtk.Objects.Frame.Frame' won’t work.
-- 
-- More precisely, it must have the @/GTK_CAN_FOCUS/@ flag set. Use
-- 'GI.Gtk.Objects.Widget.widgetSetCanFocus' to modify that flag.
-- 
-- The widget also needs to be realized and mapped. This is indicated by the
-- related signals. Grabbing the focus immediately after creating the widget
-- will likely fail and cause critical warnings.
widgetGrabFocus ::
    (B.CallStack.HasCallStack, MonadIO m, IsWidget a) =>
    a
    -- ^ /@widget@/: a t'GI.Gtk.Objects.Widget.Widget'
    -> m ()
widgetGrabFocus :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsWidget a) =>
a -> m ()
widgetGrabFocus 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.OverloadedMethod WidgetGrabFocusMethodInfo a signature where
    overloadedMethod = widgetGrabFocus

instance O.OverloadedMethodInfo WidgetGrabFocusMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Gtk.Objects.Widget.widgetGrabFocus",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-3.0.38/docs/GI-Gtk-Objects-Widget.html#v: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 :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsWidget a) =>
a -> m ()
widgetGrabRemove 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.OverloadedMethod WidgetGrabRemoveMethodInfo a signature where
    overloadedMethod = widgetGrabRemove

instance O.OverloadedMethodInfo WidgetGrabRemoveMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Gtk.Objects.Widget.widgetGrabRemove",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-3.0.38/docs/GI-Gtk-Objects-Widget.html#v: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. See 'GI.Gtk.Objects.Widget.widgetSetCanDefault'.
-- 
-- /Since: 2.18/
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 :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsWidget a) =>
a -> m Bool
widgetHasDefault a
widget = IO Bool -> m Bool
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Bool -> m Bool) -> IO Bool -> 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
/= CInt
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.OverloadedMethod WidgetHasDefaultMethodInfo a signature where
    overloadedMethod = widgetHasDefault

instance O.OverloadedMethodInfo WidgetHasDefaultMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Gtk.Objects.Widget.widgetHasDefault",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-3.0.38/docs/GI-Gtk-Objects-Widget.html#v: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.
-- 
-- /Since: 2.18/
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 :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsWidget a) =>
a -> m Bool
widgetHasFocus a
widget = IO Bool -> m Bool
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Bool -> m Bool) -> IO Bool -> 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
/= CInt
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.OverloadedMethod WidgetHasFocusMethodInfo a signature where
    overloadedMethod = widgetHasFocus

instance O.OverloadedMethodInfo WidgetHasFocusMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Gtk.Objects.Widget.widgetHasFocus",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-3.0.38/docs/GI-Gtk-Objects-Widget.html#v: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'.
-- 
-- /Since: 2.18/
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 :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsWidget a) =>
a -> m Bool
widgetHasGrab a
widget = IO Bool -> m Bool
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Bool -> m Bool) -> IO Bool -> 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
/= CInt
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.OverloadedMethod WidgetHasGrabMethodInfo a signature where
    overloadedMethod = widgetHasGrab

instance O.OverloadedMethodInfo WidgetHasGrabMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Gtk.Objects.Widget.widgetHasGrab",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-3.0.38/docs/GI-Gtk-Objects-Widget.html#v:widgetHasGrab"
        })


#endif

-- method Widget::has_rc_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: Just (TBasicType TBoolean)
-- throws : False
-- Skip return : False

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

{-# DEPRECATED widgetHasRcStyle ["(Since version 3.0)","Use t'GI.Gtk.Objects.StyleContext.StyleContext' instead"] #-}
-- | Determines if the widget style has been looked up through the rc mechanism.
-- 
-- /Since: 2.20/
widgetHasRcStyle ::
    (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 been looked up through the rc
    --   mechanism, 'P.False' otherwise.
widgetHasRcStyle :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsWidget a) =>
a -> m Bool
widgetHasRcStyle a
widget = IO Bool -> m Bool
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Bool -> m Bool) -> IO Bool -> 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_rc_style Ptr Widget
widget'
    let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= CInt
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 WidgetHasRcStyleMethodInfo
instance (signature ~ (m Bool), MonadIO m, IsWidget a) => O.OverloadedMethod WidgetHasRcStyleMethodInfo a signature where
    overloadedMethod = widgetHasRcStyle

instance O.OverloadedMethodInfo WidgetHasRcStyleMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Gtk.Objects.Widget.widgetHasRcStyle",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-3.0.38/docs/GI-Gtk-Objects-Widget.html#v:widgetHasRcStyle"
        })


#endif

-- method Widget::has_screen
-- 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_screen" gtk_widget_has_screen :: 
    Ptr Widget ->                           -- widget : TInterface (Name {namespace = "Gtk", name = "Widget"})
    IO CInt

-- | Checks whether there is a t'GI.Gdk.Objects.Screen.Screen' is associated with
-- this widget. All toplevel widgets have an associated
-- screen, and all widgets added into a hierarchy with a toplevel
-- window at the top.
-- 
-- /Since: 2.2/
widgetHasScreen ::
    (B.CallStack.HasCallStack, MonadIO m, IsWidget a) =>
    a
    -- ^ /@widget@/: a t'GI.Gtk.Objects.Widget.Widget'
    -> m Bool
    -- ^ __Returns:__ 'P.True' if there is a t'GI.Gdk.Objects.Screen.Screen' associated
    --   with the widget.
widgetHasScreen :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsWidget a) =>
a -> m Bool
widgetHasScreen a
widget = IO Bool -> m Bool
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Bool -> m Bool) -> IO Bool -> 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_screen Ptr Widget
widget'
    let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= CInt
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 WidgetHasScreenMethodInfo
instance (signature ~ (m Bool), MonadIO m, IsWidget a) => O.OverloadedMethod WidgetHasScreenMethodInfo a signature where
    overloadedMethod = widgetHasScreen

instance O.OverloadedMethodInfo WidgetHasScreenMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Gtk.Objects.Widget.widgetHasScreen",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-3.0.38/docs/GI-Gtk-Objects-Widget.html#v:widgetHasScreen"
        })


#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](#g: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'.
-- 
-- /Since: 3.2/
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 :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsWidget a) =>
a -> m Bool
widgetHasVisibleFocus a
widget = IO Bool -> m Bool
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Bool -> m Bool) -> IO Bool -> 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
/= CInt
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.OverloadedMethod WidgetHasVisibleFocusMethodInfo a signature where
    overloadedMethod = widgetHasVisibleFocus

instance O.OverloadedMethodInfo WidgetHasVisibleFocusMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Gtk.Objects.Widget.widgetHasVisibleFocus",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-3.0.38/docs/GI-Gtk-Objects-Widget.html#v: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 :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsWidget a) =>
a -> m ()
widgetHide 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.OverloadedMethod WidgetHideMethodInfo a signature where
    overloadedMethod = widgetHide

instance O.OverloadedMethodInfo WidgetHideMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Gtk.Objects.Widget.widgetHide",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-3.0.38/docs/GI-Gtk-Objects-Widget.html#v:widgetHide"
        })


#endif

-- method Widget::hide_on_delete
-- 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_hide_on_delete" gtk_widget_hide_on_delete :: 
    Ptr Widget ->                           -- widget : TInterface (Name {namespace = "Gtk", name = "Widget"})
    IO CInt

-- | Utility function; intended to be connected to the [deleteEvent]("GI.Gtk.Objects.Widget#g:signal:deleteEvent")
-- signal on a t'GI.Gtk.Objects.Window.Window'. The function calls 'GI.Gtk.Objects.Widget.widgetHide' on its
-- argument, then returns 'P.True'. If connected to [deleteEvent](#g:signal:deleteEvent), the
-- result is that clicking the close button for a window (on the
-- window frame, top right corner usually) will hide but not destroy
-- the window. By default, GTK+ destroys windows when [deleteEvent](#g:signal:deleteEvent)
-- is received.
widgetHideOnDelete ::
    (B.CallStack.HasCallStack, MonadIO m, IsWidget a) =>
    a
    -- ^ /@widget@/: a t'GI.Gtk.Objects.Widget.Widget'
    -> m Bool
    -- ^ __Returns:__ 'P.True'
widgetHideOnDelete :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsWidget a) =>
a -> m Bool
widgetHideOnDelete a
widget = IO Bool -> m Bool
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Bool -> m Bool) -> IO Bool -> 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_hide_on_delete Ptr Widget
widget'
    let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= CInt
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 WidgetHideOnDeleteMethodInfo
instance (signature ~ (m Bool), MonadIO m, IsWidget a) => O.OverloadedMethod WidgetHideOnDeleteMethodInfo a signature where
    overloadedMethod = widgetHideOnDelete

instance O.OverloadedMethodInfo WidgetHideOnDeleteMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Gtk.Objects.Widget.widgetHideOnDelete",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-3.0.38/docs/GI-Gtk-Objects-Widget.html#v:widgetHideOnDelete"
        })


#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 :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsWidget a) =>
a -> m Bool
widgetInDestruction a
widget = IO Bool -> m Bool
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Bool -> m Bool) -> IO Bool -> 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
/= CInt
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.OverloadedMethod WidgetInDestructionMethodInfo a signature where
    overloadedMethod = widgetInDestruction

instance O.OverloadedMethodInfo WidgetInDestructionMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Gtk.Objects.Widget.widgetInDestruction",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-3.0.38/docs/GI-Gtk-Objects-Widget.html#v: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.
-- 
-- /Since: 3.10/
widgetInitTemplate ::
    (B.CallStack.HasCallStack, MonadIO m, IsWidget a) =>
    a
    -- ^ /@widget@/: a t'GI.Gtk.Objects.Widget.Widget'
    -> m ()
widgetInitTemplate :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsWidget a) =>
a -> m ()
widgetInitTemplate 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.OverloadedMethod WidgetInitTemplateMethodInfo a signature where
    overloadedMethod = widgetInitTemplate

instance O.OverloadedMethodInfo WidgetInitTemplateMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Gtk.Objects.Widget.widgetInitTemplate",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-3.0.38/docs/GI-Gtk-Objects-Widget.html#v: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 window. This allows for
-- windows which react to mouse click in a nonrectangular region, see
-- 'GI.Gdk.Objects.Window.windowInputShapeCombineRegion' for more information.
-- 
-- /Since: 3.0/
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 :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsWidget a) =>
a -> Maybe Region -> m ()
widgetInputShapeCombineRegion a
widget 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
        Maybe Region
Nothing -> Ptr Region -> IO (Ptr Region)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr Region
forall a. Ptr a
nullPtr
        Just 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.OverloadedMethod WidgetInputShapeCombineRegionMethodInfo a signature where
    overloadedMethod = widgetInputShapeCombineRegion

instance O.OverloadedMethodInfo WidgetInputShapeCombineRegionMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Gtk.Objects.Widget.widgetInputShapeCombineRegion",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-3.0.38/docs/GI-Gtk-Objects-Widget.html#v: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@/.
-- 
-- /Since: 3.6/
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 :: forall (m :: * -> *) a b.
(HasCallStack, MonadIO m, IsWidget a, IsActionGroup b) =>
a -> Text -> Maybe b -> m ()
widgetInsertActionGroup a
widget Text
name 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
        Maybe b
Nothing -> Ptr ActionGroup -> IO (Ptr ActionGroup)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr ActionGroup
forall a. Ptr a
nullPtr
        Just 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.OverloadedMethod WidgetInsertActionGroupMethodInfo a signature where
    overloadedMethod = widgetInsertActionGroup

instance O.OverloadedMethodInfo WidgetInsertActionGroupMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Gtk.Objects.Widget.widgetInsertActionGroup",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-3.0.38/docs/GI-Gtk-Objects-Widget.html#v:widgetInsertActionGroup"
        })


#endif

-- method Widget::intersect
-- 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 = "area"
--           , argType =
--               TInterface Name { namespace = "Gdk" , name = "Rectangle" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a rectangle" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "intersection"
--           , argType =
--               TInterface Name { namespace = "Gdk" , name = "Rectangle" }
--           , direction = DirectionOut
--           , mayBeNull = True
--           , argDoc =
--               Documentation
--                 { rawDocText =
--                     Just "rectangle to store\n  intersection of @widget and @area"
--                 , 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_intersect" gtk_widget_intersect :: 
    Ptr Widget ->                           -- widget : TInterface (Name {namespace = "Gtk", name = "Widget"})
    Ptr Gdk.Rectangle.Rectangle ->          -- area : TInterface (Name {namespace = "Gdk", name = "Rectangle"})
    Ptr Gdk.Rectangle.Rectangle ->          -- intersection : TInterface (Name {namespace = "Gdk", name = "Rectangle"})
    IO CInt

-- | Computes the intersection of a /@widget@/’s area and /@area@/, storing
-- the intersection in /@intersection@/, and returns 'P.True' if there was
-- an intersection.  /@intersection@/ may be 'P.Nothing' if you’re only
-- interested in whether there was an intersection.
widgetIntersect ::
    (B.CallStack.HasCallStack, MonadIO m, IsWidget a) =>
    a
    -- ^ /@widget@/: a t'GI.Gtk.Objects.Widget.Widget'
    -> Gdk.Rectangle.Rectangle
    -- ^ /@area@/: a rectangle
    -> m ((Bool, Maybe Gdk.Rectangle.Rectangle))
    -- ^ __Returns:__ 'P.True' if there was an intersection
widgetIntersect :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsWidget a) =>
a -> Rectangle -> m (Bool, Maybe Rectangle)
widgetIntersect a
widget Rectangle
area = IO (Bool, Maybe Rectangle) -> m (Bool, Maybe Rectangle)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Bool, Maybe Rectangle) -> m (Bool, Maybe Rectangle))
-> IO (Bool, Maybe Rectangle) -> m (Bool, Maybe 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
area' <- Rectangle -> IO (Ptr Rectangle)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr Rectangle
area
    Ptr Rectangle
intersection <- Int -> IO (Ptr Rectangle)
forall a. GBoxed a => Int -> IO (Ptr a)
SP.callocBoxedBytes Int
16 :: IO (Ptr Gdk.Rectangle.Rectangle)
    CInt
result <- Ptr Widget -> Ptr Rectangle -> Ptr Rectangle -> IO CInt
gtk_widget_intersect Ptr Widget
widget' Ptr Rectangle
area' Ptr Rectangle
intersection
    let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= CInt
0) CInt
result
    Maybe Rectangle
maybeIntersection <- Ptr Rectangle
-> (Ptr Rectangle -> IO Rectangle) -> IO (Maybe Rectangle)
forall a b. Ptr a -> (Ptr a -> IO b) -> IO (Maybe b)
convertIfNonNull Ptr Rectangle
intersection ((Ptr Rectangle -> IO Rectangle) -> IO (Maybe Rectangle))
-> (Ptr Rectangle -> IO Rectangle) -> IO (Maybe Rectangle)
forall a b. (a -> b) -> a -> b
$ \Ptr Rectangle
intersection' -> do
        Rectangle
intersection'' <- ((ManagedPtr Rectangle -> Rectangle)
-> Ptr Rectangle -> IO Rectangle
forall a.
(HasCallStack, GBoxed a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
wrapBoxed ManagedPtr Rectangle -> Rectangle
Gdk.Rectangle.Rectangle) Ptr Rectangle
intersection'
        Rectangle -> IO Rectangle
forall (m :: * -> *) a. Monad m => a -> m a
return Rectangle
intersection''
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
widget
    WidgetSizeAllocateCallback
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr Rectangle
area
    (Bool, Maybe Rectangle) -> IO (Bool, Maybe Rectangle)
forall (m :: * -> *) a. Monad m => a -> m a
return (Bool
result', Maybe Rectangle
maybeIntersection)

#if defined(ENABLE_OVERLOADING)
data WidgetIntersectMethodInfo
instance (signature ~ (Gdk.Rectangle.Rectangle -> m ((Bool, Maybe Gdk.Rectangle.Rectangle))), MonadIO m, IsWidget a) => O.OverloadedMethod WidgetIntersectMethodInfo a signature where
    overloadedMethod = widgetIntersect

instance O.OverloadedMethodInfo WidgetIntersectMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Gtk.Objects.Widget.widgetIntersect",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-3.0.38/docs/GI-Gtk-Objects-Widget.html#v:widgetIntersect"
        })


#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 :: forall (m :: * -> *) a b.
(HasCallStack, MonadIO m, IsWidget a, IsWidget b) =>
a -> b -> m Bool
widgetIsAncestor a
widget b
ancestor = IO Bool -> m Bool
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Bool -> m Bool) -> IO Bool -> 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
/= CInt
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.OverloadedMethod WidgetIsAncestorMethodInfo a signature where
    overloadedMethod = widgetIsAncestor

instance O.OverloadedMethodInfo WidgetIsAncestorMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Gtk.Objects.Widget.widgetIsAncestor",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-3.0.38/docs/GI-Gtk-Objects-Widget.html#v:widgetIsAncestor"
        })


#endif

-- method Widget::is_composited
-- 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_composited" gtk_widget_is_composited :: 
    Ptr Widget ->                           -- widget : TInterface (Name {namespace = "Gtk", name = "Widget"})
    IO CInt

{-# DEPRECATED widgetIsComposited ["(Since version 3.22)","Use 'GI.Gdk.Objects.Screen.screenIsComposited' instead."] #-}
-- | Whether /@widget@/ can rely on having its alpha channel
-- drawn correctly. On X11 this function returns whether a
-- compositing manager is running for /@widget@/’s screen.
-- 
-- Please note that the semantics of this call will change
-- in the future if used on a widget that has a composited
-- window in its hierarchy (as set by 'GI.Gdk.Objects.Window.windowSetComposited').
-- 
-- /Since: 2.10/
widgetIsComposited ::
    (B.CallStack.HasCallStack, MonadIO m, IsWidget a) =>
    a
    -- ^ /@widget@/: a t'GI.Gtk.Objects.Widget.Widget'
    -> m Bool
    -- ^ __Returns:__ 'P.True' if the widget can rely on its alpha
    -- channel being drawn correctly.
widgetIsComposited :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsWidget a) =>
a -> m Bool
widgetIsComposited a
widget = IO Bool -> m Bool
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Bool -> m Bool) -> IO Bool -> 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_composited Ptr Widget
widget'
    let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= CInt
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 WidgetIsCompositedMethodInfo
instance (signature ~ (m Bool), MonadIO m, IsWidget a) => O.OverloadedMethod WidgetIsCompositedMethodInfo a signature where
    overloadedMethod = widgetIsComposited

instance O.OverloadedMethodInfo WidgetIsCompositedMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Gtk.Objects.Widget.widgetIsComposited",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-3.0.38/docs/GI-Gtk-Objects-Widget.html#v:widgetIsComposited"
        })


#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
-- to if it is mapped and visible.
-- 
-- /Since: 2.18/
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 :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsWidget a) =>
a -> m Bool
widgetIsDrawable a
widget = IO Bool -> m Bool
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Bool -> m Bool) -> IO Bool -> 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
/= CInt
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.OverloadedMethod WidgetIsDrawableMethodInfo a signature where
    overloadedMethod = widgetIsDrawable

instance O.OverloadedMethodInfo WidgetIsDrawableMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Gtk.Objects.Widget.widgetIsDrawable",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-3.0.38/docs/GI-Gtk-Objects-Widget.html#v: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 :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsWidget a) =>
a -> m Bool
widgetIsFocus a
widget = IO Bool -> m Bool
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Bool -> m Bool) -> IO Bool -> 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
/= CInt
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.OverloadedMethod WidgetIsFocusMethodInfo a signature where
    overloadedMethod = widgetIsFocus

instance O.OverloadedMethodInfo WidgetIsFocusMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Gtk.Objects.Widget.widgetIsFocus",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-3.0.38/docs/GI-Gtk-Objects-Widget.html#v: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
-- 
-- /Since: 2.18/
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 :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsWidget a) =>
a -> m Bool
widgetIsSensitive a
widget = IO Bool -> m Bool
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Bool -> m Bool) -> IO Bool -> 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
/= CInt
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.OverloadedMethod WidgetIsSensitiveMethodInfo a signature where
    overloadedMethod = widgetIsSensitive

instance O.OverloadedMethodInfo WidgetIsSensitiveMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Gtk.Objects.Widget.widgetIsSensitive",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-3.0.38/docs/GI-Gtk-Objects-Widget.html#v: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 t'GI.Gtk.Objects.Window.Window' and t'GI.Gtk.Objects.Invisible.Invisible' (and out-of-process
-- @/GtkPlugs/@) are toplevel widgets. Toplevel widgets have no parent
-- widget.
-- 
-- /Since: 2.18/
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 :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsWidget a) =>
a -> m Bool
widgetIsToplevel a
widget = IO Bool -> m Bool
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Bool -> m Bool) -> IO Bool -> 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
/= CInt
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.OverloadedMethod WidgetIsToplevelMethodInfo a signature where
    overloadedMethod = widgetIsToplevel

instance O.OverloadedMethodInfo WidgetIsToplevelMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Gtk.Objects.Widget.widgetIsToplevel",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-3.0.38/docs/GI-Gtk-Objects-Widget.html#v: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'
-- 
-- /Since: 3.8/
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 :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsWidget a) =>
a -> m Bool
widgetIsVisible a
widget = IO Bool -> m Bool
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Bool -> m Bool) -> IO Bool -> 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
/= CInt
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.OverloadedMethod WidgetIsVisibleMethodInfo a signature where
    overloadedMethod = widgetIsVisible

instance O.OverloadedMethodInfo WidgetIsVisibleMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Gtk.Objects.Widget.widgetIsVisible",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-3.0.38/docs/GI-Gtk-Objects-Widget.html#v: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#g: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](#g: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](#g: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.
-- 
-- /Since: 2.12/
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 :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsWidget a) =>
a -> DirectionType -> m Bool
widgetKeynavFailed a
widget DirectionType
direction = IO Bool -> m Bool
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Bool -> m Bool) -> IO Bool -> 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
/= CInt
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.OverloadedMethod WidgetKeynavFailedMethodInfo a signature where
    overloadedMethod = widgetKeynavFailed

instance O.OverloadedMethodInfo WidgetKeynavFailedMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Gtk.Objects.Widget.widgetKeynavFailed",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-3.0.38/docs/GI-Gtk-Objects-Widget.html#v: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](#g: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 :: forall (m :: * -> *) a b.
(HasCallStack, MonadIO m, IsWidget a) =>
a -> m [GClosure b]
widgetListAccelClosures 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.OverloadedMethod WidgetListAccelClosuresMethodInfo a signature where
    overloadedMethod = widgetListAccelClosures

instance O.OverloadedMethodInfo WidgetListAccelClosuresMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Gtk.Objects.Widget.widgetListAccelClosures",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-3.0.38/docs/GI-Gtk-Objects-Widget.html#v: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@/.
-- 
-- /Since: 3.16/
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 :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsWidget a) =>
a -> m [Text]
widgetListActionPrefixes 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 Text
"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.OverloadedMethod WidgetListActionPrefixesMethodInfo a signature where
    overloadedMethod = widgetListActionPrefixes

instance O.OverloadedMethodInfo WidgetListActionPrefixesMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Gtk.Objects.Widget.widgetListActionPrefixes",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-3.0.38/docs/GI-Gtk-Objects-Widget.html#v: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.
-- 
-- /Since: 2.4/
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 :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsWidget a) =>
a -> m [Widget]
widgetListMnemonicLabels 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.OverloadedMethod WidgetListMnemonicLabelsMethodInfo a signature where
    overloadedMethod = widgetListMnemonicLabels

instance O.OverloadedMethodInfo WidgetListMnemonicLabelsMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Gtk.Objects.Widget.widgetListMnemonicLabels",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-3.0.38/docs/GI-Gtk-Objects-Widget.html#v: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 :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsWidget a) =>
a -> m ()
widgetMap 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.OverloadedMethod WidgetMapMethodInfo a signature where
    overloadedMethod = widgetMap

instance O.OverloadedMethodInfo WidgetMapMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Gtk.Objects.Widget.widgetMap",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-3.0.38/docs/GI-Gtk-Objects-Widget.html#v:widgetMap"
        })


#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#g: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 :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsWidget a) =>
a -> Bool -> m Bool
widgetMnemonicActivate a
widget Bool
groupCycling = IO Bool -> m Bool
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Bool -> m Bool) -> IO Bool -> 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
/= CInt
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.OverloadedMethod WidgetMnemonicActivateMethodInfo a signature where
    overloadedMethod = widgetMnemonicActivate

instance O.OverloadedMethodInfo WidgetMnemonicActivateMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Gtk.Objects.Widget.widgetMnemonicActivate",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-3.0.38/docs/GI-Gtk-Objects-Widget.html#v:widgetMnemonicActivate"
        })


#endif

-- method Widget::modify_base
-- 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 = "state"
--           , argType =
--               TInterface Name { namespace = "Gtk" , name = "StateType" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "the state for which to set the base color"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "color"
--           , argType = TInterface Name { namespace = "Gdk" , name = "Color" }
--           , direction = DirectionIn
--           , mayBeNull = True
--           , argDoc =
--               Documentation
--                 { rawDocText =
--                     Just
--                       "the color to assign (does not need to\n    be allocated), or %NULL to undo the effect of previous\n    calls to of gtk_widget_modify_base()."
--                 , 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_modify_base" gtk_widget_modify_base :: 
    Ptr Widget ->                           -- widget : TInterface (Name {namespace = "Gtk", name = "Widget"})
    CUInt ->                                -- state : TInterface (Name {namespace = "Gtk", name = "StateType"})
    Ptr Gdk.Color.Color ->                  -- color : TInterface (Name {namespace = "Gdk", name = "Color"})
    IO ()

{-# DEPRECATED widgetModifyBase ["(Since version 3.0)","Use 'GI.Gtk.Objects.Widget.widgetOverrideBackgroundColor' instead"] #-}
-- | Sets the base color for a widget in a particular state.
-- All other style values are left untouched. The base color
-- is the background color used along with the text color
-- (see 'GI.Gtk.Objects.Widget.widgetModifyText') for widgets such as t'GI.Gtk.Objects.Entry.Entry'
-- and t'GI.Gtk.Objects.TextView.TextView'. See also 'GI.Gtk.Objects.Widget.widgetModifyStyle'.
-- 
-- > Note that “no window” widgets (which have the @/GTK_NO_WINDOW/@
-- > flag set) draw on their parent container’s window and thus may
-- > not draw any background themselves. This is the case for e.g.
-- > t'GI.Gtk.Objects.Label.Label'.
-- >
-- > To modify the background of such widgets, you have to set the
-- > base color on their parent; if you want to set the background
-- > of a rectangular area around a label, try placing the label in
-- > a t'GI.Gtk.Objects.EventBox.EventBox' widget and setting the base color on that.
widgetModifyBase ::
    (B.CallStack.HasCallStack, MonadIO m, IsWidget a) =>
    a
    -- ^ /@widget@/: a t'GI.Gtk.Objects.Widget.Widget'
    -> Gtk.Enums.StateType
    -- ^ /@state@/: the state for which to set the base color
    -> Maybe (Gdk.Color.Color)
    -- ^ /@color@/: the color to assign (does not need to
    --     be allocated), or 'P.Nothing' to undo the effect of previous
    --     calls to of 'GI.Gtk.Objects.Widget.widgetModifyBase'.
    -> m ()
widgetModifyBase :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsWidget a) =>
a -> StateType -> Maybe Color -> m ()
widgetModifyBase a
widget StateType
state Maybe Color
color = 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 state' :: CUInt
state' = (Int -> CUInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CUInt) -> (StateType -> Int) -> StateType -> CUInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. StateType -> Int
forall a. Enum a => a -> Int
fromEnum) StateType
state
    Ptr Color
maybeColor <- case Maybe Color
color of
        Maybe Color
Nothing -> Ptr Color -> IO (Ptr Color)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr Color
forall a. Ptr a
nullPtr
        Just Color
jColor -> do
            Ptr Color
jColor' <- Color -> IO (Ptr Color)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr Color
jColor
            Ptr Color -> IO (Ptr Color)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr Color
jColor'
    Ptr Widget -> CUInt -> Ptr Color -> IO ()
gtk_widget_modify_base Ptr Widget
widget' CUInt
state' Ptr Color
maybeColor
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
widget
    Maybe Color -> (Color -> IO ()) -> IO ()
forall (m :: * -> *) a. Monad m => Maybe a -> (a -> m ()) -> m ()
whenJust Maybe Color
color Color -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()

#if defined(ENABLE_OVERLOADING)
data WidgetModifyBaseMethodInfo
instance (signature ~ (Gtk.Enums.StateType -> Maybe (Gdk.Color.Color) -> m ()), MonadIO m, IsWidget a) => O.OverloadedMethod WidgetModifyBaseMethodInfo a signature where
    overloadedMethod = widgetModifyBase

instance O.OverloadedMethodInfo WidgetModifyBaseMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Gtk.Objects.Widget.widgetModifyBase",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-3.0.38/docs/GI-Gtk-Objects-Widget.html#v:widgetModifyBase"
        })


#endif

-- method Widget::modify_bg
-- 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 = "state"
--           , argType =
--               TInterface Name { namespace = "Gtk" , name = "StateType" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText =
--                     Just "the state for which to set the background color"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "color"
--           , argType = TInterface Name { namespace = "Gdk" , name = "Color" }
--           , direction = DirectionIn
--           , mayBeNull = True
--           , argDoc =
--               Documentation
--                 { rawDocText =
--                     Just
--                       "the color to assign (does not need\n    to be allocated), or %NULL to undo the effect of previous\n    calls to of gtk_widget_modify_bg()."
--                 , 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_modify_bg" gtk_widget_modify_bg :: 
    Ptr Widget ->                           -- widget : TInterface (Name {namespace = "Gtk", name = "Widget"})
    CUInt ->                                -- state : TInterface (Name {namespace = "Gtk", name = "StateType"})
    Ptr Gdk.Color.Color ->                  -- color : TInterface (Name {namespace = "Gdk", name = "Color"})
    IO ()

{-# DEPRECATED widgetModifyBg ["(Since version 3.0)","Use 'GI.Gtk.Objects.Widget.widgetOverrideBackgroundColor' instead"] #-}
-- | Sets the background color for a widget in a particular state.
-- 
-- All other style values are left untouched.
-- See also 'GI.Gtk.Objects.Widget.widgetModifyStyle'.
-- 
-- > Note that “no window” widgets (which have the @/GTK_NO_WINDOW/@
-- > flag set) draw on their parent container’s window and thus may
-- > not draw any background themselves. This is the case for e.g.
-- > t'GI.Gtk.Objects.Label.Label'.
-- >
-- > To modify the background of such widgets, you have to set the
-- > background color on their parent; if you want to set the background
-- > of a rectangular area around a label, try placing the label in
-- > a t'GI.Gtk.Objects.EventBox.EventBox' widget and setting the background color on that.
widgetModifyBg ::
    (B.CallStack.HasCallStack, MonadIO m, IsWidget a) =>
    a
    -- ^ /@widget@/: a t'GI.Gtk.Objects.Widget.Widget'
    -> Gtk.Enums.StateType
    -- ^ /@state@/: the state for which to set the background color
    -> Maybe (Gdk.Color.Color)
    -- ^ /@color@/: the color to assign (does not need
    --     to be allocated), or 'P.Nothing' to undo the effect of previous
    --     calls to of 'GI.Gtk.Objects.Widget.widgetModifyBg'.
    -> m ()
widgetModifyBg :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsWidget a) =>
a -> StateType -> Maybe Color -> m ()
widgetModifyBg a
widget StateType
state Maybe Color
color = 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 state' :: CUInt
state' = (Int -> CUInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CUInt) -> (StateType -> Int) -> StateType -> CUInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. StateType -> Int
forall a. Enum a => a -> Int
fromEnum) StateType
state
    Ptr Color
maybeColor <- case Maybe Color
color of
        Maybe Color
Nothing -> Ptr Color -> IO (Ptr Color)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr Color
forall a. Ptr a
nullPtr
        Just Color
jColor -> do
            Ptr Color
jColor' <- Color -> IO (Ptr Color)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr Color
jColor
            Ptr Color -> IO (Ptr Color)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr Color
jColor'
    Ptr Widget -> CUInt -> Ptr Color -> IO ()
gtk_widget_modify_bg Ptr Widget
widget' CUInt
state' Ptr Color
maybeColor
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
widget
    Maybe Color -> (Color -> IO ()) -> IO ()
forall (m :: * -> *) a. Monad m => Maybe a -> (a -> m ()) -> m ()
whenJust Maybe Color
color Color -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()

#if defined(ENABLE_OVERLOADING)
data WidgetModifyBgMethodInfo
instance (signature ~ (Gtk.Enums.StateType -> Maybe (Gdk.Color.Color) -> m ()), MonadIO m, IsWidget a) => O.OverloadedMethod WidgetModifyBgMethodInfo a signature where
    overloadedMethod = widgetModifyBg

instance O.OverloadedMethodInfo WidgetModifyBgMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Gtk.Objects.Widget.widgetModifyBg",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-3.0.38/docs/GI-Gtk-Objects-Widget.html#v:widgetModifyBg"
        })


#endif

-- method Widget::modify_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 = "primary"
--           , argType = TInterface Name { namespace = "Gdk" , name = "Color" }
--           , direction = DirectionIn
--           , mayBeNull = True
--           , argDoc =
--               Documentation
--                 { rawDocText =
--                     Just
--                       "the color to use for primary cursor (does not\n    need to be allocated), or %NULL to undo the effect of previous\n    calls to of gtk_widget_modify_cursor()."
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "secondary"
--           , argType = TInterface Name { namespace = "Gdk" , name = "Color" }
--           , direction = DirectionIn
--           , mayBeNull = True
--           , argDoc =
--               Documentation
--                 { rawDocText =
--                     Just
--                       "the color to use for secondary cursor (does\n    not need to be allocated), or %NULL to undo the effect of\n    previous calls to of gtk_widget_modify_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_modify_cursor" gtk_widget_modify_cursor :: 
    Ptr Widget ->                           -- widget : TInterface (Name {namespace = "Gtk", name = "Widget"})
    Ptr Gdk.Color.Color ->                  -- primary : TInterface (Name {namespace = "Gdk", name = "Color"})
    Ptr Gdk.Color.Color ->                  -- secondary : TInterface (Name {namespace = "Gdk", name = "Color"})
    IO ()

{-# DEPRECATED widgetModifyCursor ["(Since version 3.0)","Use 'GI.Gtk.Objects.Widget.widgetOverrideCursor' instead."] #-}
-- | Sets the cursor color to use in a widget, overriding the t'GI.Gtk.Objects.Widget.Widget'
-- cursor-color and secondary-cursor-color
-- style properties.
-- 
-- All other style values are left untouched.
-- See also 'GI.Gtk.Objects.Widget.widgetModifyStyle'.
-- 
-- /Since: 2.12/
widgetModifyCursor ::
    (B.CallStack.HasCallStack, MonadIO m, IsWidget a) =>
    a
    -- ^ /@widget@/: a t'GI.Gtk.Objects.Widget.Widget'
    -> Maybe (Gdk.Color.Color)
    -- ^ /@primary@/: the color to use for primary cursor (does not
    --     need to be allocated), or 'P.Nothing' to undo the effect of previous
    --     calls to of 'GI.Gtk.Objects.Widget.widgetModifyCursor'.
    -> Maybe (Gdk.Color.Color)
    -- ^ /@secondary@/: the color to use for secondary cursor (does
    --     not need to be allocated), or 'P.Nothing' to undo the effect of
    --     previous calls to of 'GI.Gtk.Objects.Widget.widgetModifyCursor'.
    -> m ()
widgetModifyCursor :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsWidget a) =>
a -> Maybe Color -> Maybe Color -> m ()
widgetModifyCursor a
widget Maybe Color
primary Maybe Color
secondary = 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 Color
maybePrimary <- case Maybe Color
primary of
        Maybe Color
Nothing -> Ptr Color -> IO (Ptr Color)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr Color
forall a. Ptr a
nullPtr
        Just Color
jPrimary -> do
            Ptr Color
jPrimary' <- Color -> IO (Ptr Color)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr Color
jPrimary
            Ptr Color -> IO (Ptr Color)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr Color
jPrimary'
    Ptr Color
maybeSecondary <- case Maybe Color
secondary of
        Maybe Color
Nothing -> Ptr Color -> IO (Ptr Color)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr Color
forall a. Ptr a
nullPtr
        Just Color
jSecondary -> do
            Ptr Color
jSecondary' <- Color -> IO (Ptr Color)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr Color
jSecondary
            Ptr Color -> IO (Ptr Color)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr Color
jSecondary'
    Ptr Widget -> Ptr Color -> Ptr Color -> IO ()
gtk_widget_modify_cursor Ptr Widget
widget' Ptr Color
maybePrimary Ptr Color
maybeSecondary
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
widget
    Maybe Color -> (Color -> IO ()) -> IO ()
forall (m :: * -> *) a. Monad m => Maybe a -> (a -> m ()) -> m ()
whenJust Maybe Color
primary Color -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr
    Maybe Color -> (Color -> IO ()) -> IO ()
forall (m :: * -> *) a. Monad m => Maybe a -> (a -> m ()) -> m ()
whenJust Maybe Color
secondary Color -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()

#if defined(ENABLE_OVERLOADING)
data WidgetModifyCursorMethodInfo
instance (signature ~ (Maybe (Gdk.Color.Color) -> Maybe (Gdk.Color.Color) -> m ()), MonadIO m, IsWidget a) => O.OverloadedMethod WidgetModifyCursorMethodInfo a signature where
    overloadedMethod = widgetModifyCursor

instance O.OverloadedMethodInfo WidgetModifyCursorMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Gtk.Objects.Widget.widgetModifyCursor",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-3.0.38/docs/GI-Gtk-Objects-Widget.html#v:widgetModifyCursor"
        })


#endif

-- method Widget::modify_fg
-- 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 = "state"
--           , argType =
--               TInterface Name { namespace = "Gtk" , name = "StateType" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText =
--                     Just "the state for which to set the foreground color"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "color"
--           , argType = TInterface Name { namespace = "Gdk" , name = "Color" }
--           , direction = DirectionIn
--           , mayBeNull = True
--           , argDoc =
--               Documentation
--                 { rawDocText =
--                     Just
--                       "the color to assign (does not need to be allocated),\n    or %NULL to undo the effect of previous calls to\n    of gtk_widget_modify_fg()."
--                 , 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_modify_fg" gtk_widget_modify_fg :: 
    Ptr Widget ->                           -- widget : TInterface (Name {namespace = "Gtk", name = "Widget"})
    CUInt ->                                -- state : TInterface (Name {namespace = "Gtk", name = "StateType"})
    Ptr Gdk.Color.Color ->                  -- color : TInterface (Name {namespace = "Gdk", name = "Color"})
    IO ()

{-# DEPRECATED widgetModifyFg ["(Since version 3.0)","Use 'GI.Gtk.Objects.Widget.widgetOverrideColor' instead"] #-}
-- | Sets the foreground color for a widget in a particular state.
-- 
-- All other style values are left untouched.
-- See also 'GI.Gtk.Objects.Widget.widgetModifyStyle'.
widgetModifyFg ::
    (B.CallStack.HasCallStack, MonadIO m, IsWidget a) =>
    a
    -- ^ /@widget@/: a t'GI.Gtk.Objects.Widget.Widget'
    -> Gtk.Enums.StateType
    -- ^ /@state@/: the state for which to set the foreground color
    -> Maybe (Gdk.Color.Color)
    -- ^ /@color@/: the color to assign (does not need to be allocated),
    --     or 'P.Nothing' to undo the effect of previous calls to
    --     of 'GI.Gtk.Objects.Widget.widgetModifyFg'.
    -> m ()
widgetModifyFg :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsWidget a) =>
a -> StateType -> Maybe Color -> m ()
widgetModifyFg a
widget StateType
state Maybe Color
color = 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 state' :: CUInt
state' = (Int -> CUInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CUInt) -> (StateType -> Int) -> StateType -> CUInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. StateType -> Int
forall a. Enum a => a -> Int
fromEnum) StateType
state
    Ptr Color
maybeColor <- case Maybe Color
color of
        Maybe Color
Nothing -> Ptr Color -> IO (Ptr Color)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr Color
forall a. Ptr a
nullPtr
        Just Color
jColor -> do
            Ptr Color
jColor' <- Color -> IO (Ptr Color)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr Color
jColor
            Ptr Color -> IO (Ptr Color)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr Color
jColor'
    Ptr Widget -> CUInt -> Ptr Color -> IO ()
gtk_widget_modify_fg Ptr Widget
widget' CUInt
state' Ptr Color
maybeColor
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
widget
    Maybe Color -> (Color -> IO ()) -> IO ()
forall (m :: * -> *) a. Monad m => Maybe a -> (a -> m ()) -> m ()
whenJust Maybe Color
color Color -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()

#if defined(ENABLE_OVERLOADING)
data WidgetModifyFgMethodInfo
instance (signature ~ (Gtk.Enums.StateType -> Maybe (Gdk.Color.Color) -> m ()), MonadIO m, IsWidget a) => O.OverloadedMethod WidgetModifyFgMethodInfo a signature where
    overloadedMethod = widgetModifyFg

instance O.OverloadedMethodInfo WidgetModifyFgMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Gtk.Objects.Widget.widgetModifyFg",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-3.0.38/docs/GI-Gtk-Objects-Widget.html#v:widgetModifyFg"
        })


#endif

-- method Widget::modify_font
-- 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_desc"
--           , argType =
--               TInterface Name { namespace = "Pango" , name = "FontDescription" }
--           , direction = DirectionIn
--           , mayBeNull = True
--           , argDoc =
--               Documentation
--                 { rawDocText =
--                     Just
--                       "the font description to use, or %NULL\n    to undo the effect of previous calls to gtk_widget_modify_font()"
--                 , 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_modify_font" gtk_widget_modify_font :: 
    Ptr Widget ->                           -- widget : TInterface (Name {namespace = "Gtk", name = "Widget"})
    Ptr Pango.FontDescription.FontDescription -> -- font_desc : TInterface (Name {namespace = "Pango", name = "FontDescription"})
    IO ()

{-# DEPRECATED widgetModifyFont ["(Since version 3.0)","Use 'GI.Gtk.Objects.Widget.widgetOverrideFont' instead"] #-}
-- | Sets the font to use for a widget.
-- 
-- All other style values are left untouched.
-- See also 'GI.Gtk.Objects.Widget.widgetModifyStyle'.
widgetModifyFont ::
    (B.CallStack.HasCallStack, MonadIO m, IsWidget a) =>
    a
    -- ^ /@widget@/: a t'GI.Gtk.Objects.Widget.Widget'
    -> Maybe (Pango.FontDescription.FontDescription)
    -- ^ /@fontDesc@/: the font description to use, or 'P.Nothing'
    --     to undo the effect of previous calls to 'GI.Gtk.Objects.Widget.widgetModifyFont'
    -> m ()
widgetModifyFont :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsWidget a) =>
a -> Maybe FontDescription -> m ()
widgetModifyFont a
widget Maybe FontDescription
fontDesc = 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 FontDescription
maybeFontDesc <- case Maybe FontDescription
fontDesc of
        Maybe FontDescription
Nothing -> Ptr FontDescription -> IO (Ptr FontDescription)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr FontDescription
forall a. Ptr a
nullPtr
        Just FontDescription
jFontDesc -> do
            Ptr FontDescription
jFontDesc' <- FontDescription -> IO (Ptr FontDescription)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr FontDescription
jFontDesc
            Ptr FontDescription -> IO (Ptr FontDescription)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr FontDescription
jFontDesc'
    Ptr Widget -> Ptr FontDescription -> IO ()
gtk_widget_modify_font Ptr Widget
widget' Ptr FontDescription
maybeFontDesc
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
widget
    Maybe FontDescription -> (FontDescription -> IO ()) -> IO ()
forall (m :: * -> *) a. Monad m => Maybe a -> (a -> m ()) -> m ()
whenJust Maybe FontDescription
fontDesc FontDescription -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()

#if defined(ENABLE_OVERLOADING)
data WidgetModifyFontMethodInfo
instance (signature ~ (Maybe (Pango.FontDescription.FontDescription) -> m ()), MonadIO m, IsWidget a) => O.OverloadedMethod WidgetModifyFontMethodInfo a signature where
    overloadedMethod = widgetModifyFont

instance O.OverloadedMethodInfo WidgetModifyFontMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Gtk.Objects.Widget.widgetModifyFont",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-3.0.38/docs/GI-Gtk-Objects-Widget.html#v:widgetModifyFont"
        })


#endif

-- method Widget::modify_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
--           }
--       , Arg
--           { argCName = "style"
--           , argType =
--               TInterface Name { namespace = "Gtk" , name = "RcStyle" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText =
--                     Just "the #GtkRcStyle-struct holding the style modifications"
--                 , 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_modify_style" gtk_widget_modify_style :: 
    Ptr Widget ->                           -- widget : TInterface (Name {namespace = "Gtk", name = "Widget"})
    Ptr Gtk.RcStyle.RcStyle ->              -- style : TInterface (Name {namespace = "Gtk", name = "RcStyle"})
    IO ()

{-# DEPRECATED widgetModifyStyle ["(Since version 3.0)","Use t'GI.Gtk.Objects.StyleContext.StyleContext' with a custom t'GI.Gtk.Interfaces.StyleProvider.StyleProvider' instead"] #-}
-- | Modifies style values on the widget.
-- 
-- Modifications made using this technique take precedence over
-- style values set via an RC file, however, they will be overridden
-- if a style is explicitly set on the widget using 'GI.Gtk.Objects.Widget.widgetSetStyle'.
-- The t'GI.Gtk.Objects.RcStyle.RcStyle'-struct is designed so each field can either be
-- set or unset, so it is possible, using this function, to modify some
-- style values and leave the others unchanged.
-- 
-- Note that modifications made with this function are not cumulative
-- with previous calls to 'GI.Gtk.Objects.Widget.widgetModifyStyle' or with such
-- functions as 'GI.Gtk.Objects.Widget.widgetModifyFg'. If you wish to retain
-- previous values, you must first call 'GI.Gtk.Objects.Widget.widgetGetModifierStyle',
-- make your modifications to the returned style, then call
-- 'GI.Gtk.Objects.Widget.widgetModifyStyle' with that style. On the other hand,
-- if you first call 'GI.Gtk.Objects.Widget.widgetModifyStyle', subsequent calls
-- to such functions 'GI.Gtk.Objects.Widget.widgetModifyFg' will have a cumulative
-- effect with the initial modifications.
widgetModifyStyle ::
    (B.CallStack.HasCallStack, MonadIO m, IsWidget a, Gtk.RcStyle.IsRcStyle b) =>
    a
    -- ^ /@widget@/: a t'GI.Gtk.Objects.Widget.Widget'
    -> b
    -- ^ /@style@/: the t'GI.Gtk.Objects.RcStyle.RcStyle'-struct holding the style modifications
    -> m ()
widgetModifyStyle :: forall (m :: * -> *) a b.
(HasCallStack, MonadIO m, IsWidget a, IsRcStyle b) =>
a -> b -> m ()
widgetModifyStyle a
widget b
style = 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 RcStyle
style' <- b -> IO (Ptr RcStyle)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
style
    Ptr Widget -> Ptr RcStyle -> IO ()
gtk_widget_modify_style Ptr Widget
widget' Ptr RcStyle
style'
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
widget
    b -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr b
style
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()

#if defined(ENABLE_OVERLOADING)
data WidgetModifyStyleMethodInfo
instance (signature ~ (b -> m ()), MonadIO m, IsWidget a, Gtk.RcStyle.IsRcStyle b) => O.OverloadedMethod WidgetModifyStyleMethodInfo a signature where
    overloadedMethod = widgetModifyStyle

instance O.OverloadedMethodInfo WidgetModifyStyleMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Gtk.Objects.Widget.widgetModifyStyle",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-3.0.38/docs/GI-Gtk-Objects-Widget.html#v:widgetModifyStyle"
        })


#endif

-- method Widget::modify_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 = "state"
--           , argType =
--               TInterface Name { namespace = "Gtk" , name = "StateType" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "the state for which to set the text color"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "color"
--           , argType = TInterface Name { namespace = "Gdk" , name = "Color" }
--           , direction = DirectionIn
--           , mayBeNull = True
--           , argDoc =
--               Documentation
--                 { rawDocText =
--                     Just
--                       "the color to assign (does not need to\n    be allocated), or %NULL to undo the effect of previous\n    calls to of gtk_widget_modify_text()."
--                 , 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_modify_text" gtk_widget_modify_text :: 
    Ptr Widget ->                           -- widget : TInterface (Name {namespace = "Gtk", name = "Widget"})
    CUInt ->                                -- state : TInterface (Name {namespace = "Gtk", name = "StateType"})
    Ptr Gdk.Color.Color ->                  -- color : TInterface (Name {namespace = "Gdk", name = "Color"})
    IO ()

{-# DEPRECATED widgetModifyText ["(Since version 3.0)","Use 'GI.Gtk.Objects.Widget.widgetOverrideColor' instead"] #-}
-- | Sets the text color for a widget in a particular state.
-- 
-- All other style values are left untouched.
-- The text color is the foreground color used along with the
-- base color (see 'GI.Gtk.Objects.Widget.widgetModifyBase') for widgets such
-- as t'GI.Gtk.Objects.Entry.Entry' and t'GI.Gtk.Objects.TextView.TextView'.
-- See also 'GI.Gtk.Objects.Widget.widgetModifyStyle'.
widgetModifyText ::
    (B.CallStack.HasCallStack, MonadIO m, IsWidget a) =>
    a
    -- ^ /@widget@/: a t'GI.Gtk.Objects.Widget.Widget'
    -> Gtk.Enums.StateType
    -- ^ /@state@/: the state for which to set the text color
    -> Maybe (Gdk.Color.Color)
    -- ^ /@color@/: the color to assign (does not need to
    --     be allocated), or 'P.Nothing' to undo the effect of previous
    --     calls to of 'GI.Gtk.Objects.Widget.widgetModifyText'.
    -> m ()
widgetModifyText :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsWidget a) =>
a -> StateType -> Maybe Color -> m ()
widgetModifyText a
widget StateType
state Maybe Color
color = 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 state' :: CUInt
state' = (Int -> CUInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CUInt) -> (StateType -> Int) -> StateType -> CUInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. StateType -> Int
forall a. Enum a => a -> Int
fromEnum) StateType
state
    Ptr Color
maybeColor <- case Maybe Color
color of
        Maybe Color
Nothing -> Ptr Color -> IO (Ptr Color)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr Color
forall a. Ptr a
nullPtr
        Just Color
jColor -> do
            Ptr Color
jColor' <- Color -> IO (Ptr Color)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr Color
jColor
            Ptr Color -> IO (Ptr Color)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr Color
jColor'
    Ptr Widget -> CUInt -> Ptr Color -> IO ()
gtk_widget_modify_text Ptr Widget
widget' CUInt
state' Ptr Color
maybeColor
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
widget
    Maybe Color -> (Color -> IO ()) -> IO ()
forall (m :: * -> *) a. Monad m => Maybe a -> (a -> m ()) -> m ()
whenJust Maybe Color
color Color -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()

#if defined(ENABLE_OVERLOADING)
data WidgetModifyTextMethodInfo
instance (signature ~ (Gtk.Enums.StateType -> Maybe (Gdk.Color.Color) -> m ()), MonadIO m, IsWidget a) => O.OverloadedMethod WidgetModifyTextMethodInfo a signature where
    overloadedMethod = widgetModifyText

instance O.OverloadedMethodInfo WidgetModifyTextMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Gtk.Objects.Widget.widgetModifyText",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-3.0.38/docs/GI-Gtk-Objects-Widget.html#v:widgetModifyText"
        })


#endif

-- method Widget::override_background_color
-- 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 = "state"
--           , argType =
--               TInterface Name { namespace = "Gtk" , name = "StateFlags" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText =
--                     Just "the state for which to set the background color"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "color"
--           , argType = TInterface Name { namespace = "Gdk" , name = "RGBA" }
--           , direction = DirectionIn
--           , mayBeNull = True
--           , argDoc =
--               Documentation
--                 { rawDocText =
--                     Just
--                       "the color to assign, or %NULL to undo the effect\n    of previous calls to gtk_widget_override_background_color()"
--                 , 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_override_background_color" gtk_widget_override_background_color :: 
    Ptr Widget ->                           -- widget : TInterface (Name {namespace = "Gtk", name = "Widget"})
    CUInt ->                                -- state : TInterface (Name {namespace = "Gtk", name = "StateFlags"})
    Ptr Gdk.RGBA.RGBA ->                    -- color : TInterface (Name {namespace = "Gdk", name = "RGBA"})
    IO ()

{-# DEPRECATED widgetOverrideBackgroundColor ["(Since version 3.16)","This function is not useful in the context of CSS-based","  rendering. If you wish to change the way a widget renders its background","  you should use a custom CSS style, through an application-specific","  t'GI.Gtk.Interfaces.StyleProvider.StyleProvider' and a CSS style class. You can also override the default","  drawing of a widget through the [draw](\"GI.Gtk.Objects.Widget#g:signal:draw\") signal, and use Cairo to","  draw a specific color, regardless of the CSS style."] #-}
-- | Sets the background color to use for a widget.
-- 
-- All other style values are left untouched.
-- See 'GI.Gtk.Objects.Widget.widgetOverrideColor'.
-- 
-- /Since: 3.0/
widgetOverrideBackgroundColor ::
    (B.CallStack.HasCallStack, MonadIO m, IsWidget a) =>
    a
    -- ^ /@widget@/: a t'GI.Gtk.Objects.Widget.Widget'
    -> [Gtk.Flags.StateFlags]
    -- ^ /@state@/: the state for which to set the background color
    -> Maybe (Gdk.RGBA.RGBA)
    -- ^ /@color@/: the color to assign, or 'P.Nothing' to undo the effect
    --     of previous calls to 'GI.Gtk.Objects.Widget.widgetOverrideBackgroundColor'
    -> m ()
widgetOverrideBackgroundColor :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsWidget a) =>
a -> [StateFlags] -> Maybe RGBA -> m ()
widgetOverrideBackgroundColor a
widget [StateFlags]
state Maybe RGBA
color = 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 state' :: CUInt
state' = [StateFlags] -> CUInt
forall b a. (Num b, IsGFlag a) => [a] -> b
gflagsToWord [StateFlags]
state
    Ptr RGBA
maybeColor <- case Maybe RGBA
color of
        Maybe RGBA
Nothing -> Ptr RGBA -> IO (Ptr RGBA)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr RGBA
forall a. Ptr a
nullPtr
        Just RGBA
jColor -> do
            Ptr RGBA
jColor' <- RGBA -> IO (Ptr RGBA)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr RGBA
jColor
            Ptr RGBA -> IO (Ptr RGBA)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr RGBA
jColor'
    Ptr Widget -> CUInt -> Ptr RGBA -> IO ()
gtk_widget_override_background_color Ptr Widget
widget' CUInt
state' Ptr RGBA
maybeColor
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
widget
    Maybe RGBA -> (RGBA -> IO ()) -> IO ()
forall (m :: * -> *) a. Monad m => Maybe a -> (a -> m ()) -> m ()
whenJust Maybe RGBA
color RGBA -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()

#if defined(ENABLE_OVERLOADING)
data WidgetOverrideBackgroundColorMethodInfo
instance (signature ~ ([Gtk.Flags.StateFlags] -> Maybe (Gdk.RGBA.RGBA) -> m ()), MonadIO m, IsWidget a) => O.OverloadedMethod WidgetOverrideBackgroundColorMethodInfo a signature where
    overloadedMethod = widgetOverrideBackgroundColor

instance O.OverloadedMethodInfo WidgetOverrideBackgroundColorMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Gtk.Objects.Widget.widgetOverrideBackgroundColor",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-3.0.38/docs/GI-Gtk-Objects-Widget.html#v:widgetOverrideBackgroundColor"
        })


#endif

-- method Widget::override_color
-- 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 = "state"
--           , argType =
--               TInterface Name { namespace = "Gtk" , name = "StateFlags" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "the state for which to set the color"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "color"
--           , argType = TInterface Name { namespace = "Gdk" , name = "RGBA" }
--           , direction = DirectionIn
--           , mayBeNull = True
--           , argDoc =
--               Documentation
--                 { rawDocText =
--                     Just
--                       "the color to assign, or %NULL to undo the effect\n    of previous calls to gtk_widget_override_color()"
--                 , 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_override_color" gtk_widget_override_color :: 
    Ptr Widget ->                           -- widget : TInterface (Name {namespace = "Gtk", name = "Widget"})
    CUInt ->                                -- state : TInterface (Name {namespace = "Gtk", name = "StateFlags"})
    Ptr Gdk.RGBA.RGBA ->                    -- color : TInterface (Name {namespace = "Gdk", name = "RGBA"})
    IO ()

{-# DEPRECATED widgetOverrideColor ["(Since version 3.16)","Use a custom style provider and style classes instead"] #-}
-- | Sets the color to use for a widget.
-- 
-- All other style values are left untouched.
-- 
-- This function does not act recursively. Setting the color of a
-- container does not affect its children. Note that some widgets that
-- you may not think of as containers, for instance @/GtkButtons/@,
-- are actually containers.
-- 
-- This API is mostly meant as a quick way for applications to
-- change a widget appearance. If you are developing a widgets
-- library and intend this change to be themeable, it is better
-- done by setting meaningful CSS classes in your
-- widget\/container implementation through 'GI.Gtk.Objects.StyleContext.styleContextAddClass'.
-- 
-- This way, your widget library can install a t'GI.Gtk.Objects.CssProvider.CssProvider'
-- with the 'GI.Gtk.Constants.STYLE_PROVIDER_PRIORITY_FALLBACK' priority in order
-- to provide a default styling for those widgets that need so, and
-- this theming may fully overridden by the user’s theme.
-- 
-- Note that for complex widgets this may bring in undesired
-- results (such as uniform background color everywhere), in
-- these cases it is better to fully style such widgets through a
-- t'GI.Gtk.Objects.CssProvider.CssProvider' with the 'GI.Gtk.Constants.STYLE_PROVIDER_PRIORITY_APPLICATION'
-- priority.
-- 
-- /Since: 3.0/
widgetOverrideColor ::
    (B.CallStack.HasCallStack, MonadIO m, IsWidget a) =>
    a
    -- ^ /@widget@/: a t'GI.Gtk.Objects.Widget.Widget'
    -> [Gtk.Flags.StateFlags]
    -- ^ /@state@/: the state for which to set the color
    -> Maybe (Gdk.RGBA.RGBA)
    -- ^ /@color@/: the color to assign, or 'P.Nothing' to undo the effect
    --     of previous calls to 'GI.Gtk.Objects.Widget.widgetOverrideColor'
    -> m ()
widgetOverrideColor :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsWidget a) =>
a -> [StateFlags] -> Maybe RGBA -> m ()
widgetOverrideColor a
widget [StateFlags]
state Maybe RGBA
color = 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 state' :: CUInt
state' = [StateFlags] -> CUInt
forall b a. (Num b, IsGFlag a) => [a] -> b
gflagsToWord [StateFlags]
state
    Ptr RGBA
maybeColor <- case Maybe RGBA
color of
        Maybe RGBA
Nothing -> Ptr RGBA -> IO (Ptr RGBA)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr RGBA
forall a. Ptr a
nullPtr
        Just RGBA
jColor -> do
            Ptr RGBA
jColor' <- RGBA -> IO (Ptr RGBA)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr RGBA
jColor
            Ptr RGBA -> IO (Ptr RGBA)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr RGBA
jColor'
    Ptr Widget -> CUInt -> Ptr RGBA -> IO ()
gtk_widget_override_color Ptr Widget
widget' CUInt
state' Ptr RGBA
maybeColor
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
widget
    Maybe RGBA -> (RGBA -> IO ()) -> IO ()
forall (m :: * -> *) a. Monad m => Maybe a -> (a -> m ()) -> m ()
whenJust Maybe RGBA
color RGBA -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()

#if defined(ENABLE_OVERLOADING)
data WidgetOverrideColorMethodInfo
instance (signature ~ ([Gtk.Flags.StateFlags] -> Maybe (Gdk.RGBA.RGBA) -> m ()), MonadIO m, IsWidget a) => O.OverloadedMethod WidgetOverrideColorMethodInfo a signature where
    overloadedMethod = widgetOverrideColor

instance O.OverloadedMethodInfo WidgetOverrideColorMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Gtk.Objects.Widget.widgetOverrideColor",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-3.0.38/docs/GI-Gtk-Objects-Widget.html#v:widgetOverrideColor"
        })


#endif

-- method Widget::override_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 = "RGBA" }
--           , direction = DirectionIn
--           , mayBeNull = True
--           , argDoc =
--               Documentation
--                 { rawDocText =
--                     Just
--                       "the color to use for primary cursor (does not need to be\n    allocated), or %NULL to undo the effect of previous calls to\n    of gtk_widget_override_cursor()."
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "secondary_cursor"
--           , argType = TInterface Name { namespace = "Gdk" , name = "RGBA" }
--           , direction = DirectionIn
--           , mayBeNull = True
--           , argDoc =
--               Documentation
--                 { rawDocText =
--                     Just
--                       "the color to use for secondary cursor (does not\n    need to be allocated), or %NULL to undo the effect of previous\n    calls to of gtk_widget_override_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_override_cursor" gtk_widget_override_cursor :: 
    Ptr Widget ->                           -- widget : TInterface (Name {namespace = "Gtk", name = "Widget"})
    Ptr Gdk.RGBA.RGBA ->                    -- cursor : TInterface (Name {namespace = "Gdk", name = "RGBA"})
    Ptr Gdk.RGBA.RGBA ->                    -- secondary_cursor : TInterface (Name {namespace = "Gdk", name = "RGBA"})
    IO ()

{-# DEPRECATED widgetOverrideCursor ["(Since version 3.16)","This function is not useful in the context of CSS-based","  rendering. If you wish to change the color used to render the primary","  and secondary cursors you should use a custom CSS style, through an","  application-specific t'GI.Gtk.Interfaces.StyleProvider.StyleProvider' and a CSS style class."] #-}
-- | Sets the cursor color to use in a widget, overriding the
-- cursor-color and secondary-cursor-color
-- style properties. All other style values are left untouched.
-- See also 'GI.Gtk.Objects.Widget.widgetModifyStyle'.
-- 
-- Note that the underlying properties have the t'GI.Gdk.Structs.Color.Color' type,
-- so the alpha value in /@primary@/ and /@secondary@/ will be ignored.
-- 
-- /Since: 3.0/
widgetOverrideCursor ::
    (B.CallStack.HasCallStack, MonadIO m, IsWidget a) =>
    a
    -- ^ /@widget@/: a t'GI.Gtk.Objects.Widget.Widget'
    -> Maybe (Gdk.RGBA.RGBA)
    -- ^ /@cursor@/: the color to use for primary cursor (does not need to be
    --     allocated), or 'P.Nothing' to undo the effect of previous calls to
    --     of 'GI.Gtk.Objects.Widget.widgetOverrideCursor'.
    -> Maybe (Gdk.RGBA.RGBA)
    -- ^ /@secondaryCursor@/: the color to use for secondary cursor (does not
    --     need to be allocated), or 'P.Nothing' to undo the effect of previous
    --     calls to of 'GI.Gtk.Objects.Widget.widgetOverrideCursor'.
    -> m ()
widgetOverrideCursor :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsWidget a) =>
a -> Maybe RGBA -> Maybe RGBA -> m ()
widgetOverrideCursor a
widget Maybe RGBA
cursor Maybe RGBA
secondaryCursor = 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 RGBA
maybeCursor <- case Maybe RGBA
cursor of
        Maybe RGBA
Nothing -> Ptr RGBA -> IO (Ptr RGBA)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr RGBA
forall a. Ptr a
nullPtr
        Just RGBA
jCursor -> do
            Ptr RGBA
jCursor' <- RGBA -> IO (Ptr RGBA)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr RGBA
jCursor
            Ptr RGBA -> IO (Ptr RGBA)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr RGBA
jCursor'
    Ptr RGBA
maybeSecondaryCursor <- case Maybe RGBA
secondaryCursor of
        Maybe RGBA
Nothing -> Ptr RGBA -> IO (Ptr RGBA)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr RGBA
forall a. Ptr a
nullPtr
        Just RGBA
jSecondaryCursor -> do
            Ptr RGBA
jSecondaryCursor' <- RGBA -> IO (Ptr RGBA)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr RGBA
jSecondaryCursor
            Ptr RGBA -> IO (Ptr RGBA)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr RGBA
jSecondaryCursor'
    Ptr Widget -> Ptr RGBA -> Ptr RGBA -> IO ()
gtk_widget_override_cursor Ptr Widget
widget' Ptr RGBA
maybeCursor Ptr RGBA
maybeSecondaryCursor
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
widget
    Maybe RGBA -> (RGBA -> IO ()) -> IO ()
forall (m :: * -> *) a. Monad m => Maybe a -> (a -> m ()) -> m ()
whenJust Maybe RGBA
cursor RGBA -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr
    Maybe RGBA -> (RGBA -> IO ()) -> IO ()
forall (m :: * -> *) a. Monad m => Maybe a -> (a -> m ()) -> m ()
whenJust Maybe RGBA
secondaryCursor RGBA -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()

#if defined(ENABLE_OVERLOADING)
data WidgetOverrideCursorMethodInfo
instance (signature ~ (Maybe (Gdk.RGBA.RGBA) -> Maybe (Gdk.RGBA.RGBA) -> m ()), MonadIO m, IsWidget a) => O.OverloadedMethod WidgetOverrideCursorMethodInfo a signature where
    overloadedMethod = widgetOverrideCursor

instance O.OverloadedMethodInfo WidgetOverrideCursorMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Gtk.Objects.Widget.widgetOverrideCursor",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-3.0.38/docs/GI-Gtk-Objects-Widget.html#v:widgetOverrideCursor"
        })


#endif

-- method Widget::override_font
-- 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_desc"
--           , argType =
--               TInterface Name { namespace = "Pango" , name = "FontDescription" }
--           , direction = DirectionIn
--           , mayBeNull = True
--           , argDoc =
--               Documentation
--                 { rawDocText =
--                     Just
--                       "the font description to use, or %NULL to undo\n    the effect of previous calls to gtk_widget_override_font()"
--                 , 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_override_font" gtk_widget_override_font :: 
    Ptr Widget ->                           -- widget : TInterface (Name {namespace = "Gtk", name = "Widget"})
    Ptr Pango.FontDescription.FontDescription -> -- font_desc : TInterface (Name {namespace = "Pango", name = "FontDescription"})
    IO ()

{-# DEPRECATED widgetOverrideFont ["(Since version 3.16)","This function is not useful in the context of CSS-based","  rendering. If you wish to change the font a widget uses to render its text","  you should use a custom CSS style, through an application-specific","  t'GI.Gtk.Interfaces.StyleProvider.StyleProvider' and a CSS style class."] #-}
-- | Sets the font to use for a widget. All other style values are
-- left untouched. See 'GI.Gtk.Objects.Widget.widgetOverrideColor'.
-- 
-- /Since: 3.0/
widgetOverrideFont ::
    (B.CallStack.HasCallStack, MonadIO m, IsWidget a) =>
    a
    -- ^ /@widget@/: a t'GI.Gtk.Objects.Widget.Widget'
    -> Maybe (Pango.FontDescription.FontDescription)
    -- ^ /@fontDesc@/: the font description to use, or 'P.Nothing' to undo
    --     the effect of previous calls to 'GI.Gtk.Objects.Widget.widgetOverrideFont'
    -> m ()
widgetOverrideFont :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsWidget a) =>
a -> Maybe FontDescription -> m ()
widgetOverrideFont a
widget Maybe FontDescription
fontDesc = 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 FontDescription
maybeFontDesc <- case Maybe FontDescription
fontDesc of
        Maybe FontDescription
Nothing -> Ptr FontDescription -> IO (Ptr FontDescription)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr FontDescription
forall a. Ptr a
nullPtr
        Just FontDescription
jFontDesc -> do
            Ptr FontDescription
jFontDesc' <- FontDescription -> IO (Ptr FontDescription)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr FontDescription
jFontDesc
            Ptr FontDescription -> IO (Ptr FontDescription)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr FontDescription
jFontDesc'
    Ptr Widget -> Ptr FontDescription -> IO ()
gtk_widget_override_font Ptr Widget
widget' Ptr FontDescription
maybeFontDesc
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
widget
    Maybe FontDescription -> (FontDescription -> IO ()) -> IO ()
forall (m :: * -> *) a. Monad m => Maybe a -> (a -> m ()) -> m ()
whenJust Maybe FontDescription
fontDesc FontDescription -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()

#if defined(ENABLE_OVERLOADING)
data WidgetOverrideFontMethodInfo
instance (signature ~ (Maybe (Pango.FontDescription.FontDescription) -> m ()), MonadIO m, IsWidget a) => O.OverloadedMethod WidgetOverrideFontMethodInfo a signature where
    overloadedMethod = widgetOverrideFont

instance O.OverloadedMethodInfo WidgetOverrideFontMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Gtk.Objects.Widget.widgetOverrideFont",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-3.0.38/docs/GI-Gtk-Objects-Widget.html#v:widgetOverrideFont"
        })


#endif

-- method Widget::override_symbolic_color
-- 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 name of the symbolic color to modify"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "color"
--           , argType = TInterface Name { namespace = "Gdk" , name = "RGBA" }
--           , direction = DirectionIn
--           , mayBeNull = True
--           , argDoc =
--               Documentation
--                 { rawDocText =
--                     Just
--                       "the color to assign (does not need\n    to be allocated), or %NULL to undo the effect of previous\n    calls to gtk_widget_override_symbolic_color()"
--                 , 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_override_symbolic_color" gtk_widget_override_symbolic_color :: 
    Ptr Widget ->                           -- widget : TInterface (Name {namespace = "Gtk", name = "Widget"})
    CString ->                              -- name : TBasicType TUTF8
    Ptr Gdk.RGBA.RGBA ->                    -- color : TInterface (Name {namespace = "Gdk", name = "RGBA"})
    IO ()

{-# DEPRECATED widgetOverrideSymbolicColor ["(Since version 3.16)","This function is not useful in the context of CSS-based","  rendering. If you wish to change the color used to render symbolic icons","  you should use a custom CSS style, through an application-specific","  t'GI.Gtk.Interfaces.StyleProvider.StyleProvider' and a CSS style class."] #-}
-- | Sets a symbolic color for a widget.
-- 
-- All other style values are left untouched.
-- See 'GI.Gtk.Objects.Widget.widgetOverrideColor' for overriding the foreground
-- or background color.
-- 
-- /Since: 3.0/
widgetOverrideSymbolicColor ::
    (B.CallStack.HasCallStack, MonadIO m, IsWidget a) =>
    a
    -- ^ /@widget@/: a t'GI.Gtk.Objects.Widget.Widget'
    -> T.Text
    -- ^ /@name@/: the name of the symbolic color to modify
    -> Maybe (Gdk.RGBA.RGBA)
    -- ^ /@color@/: the color to assign (does not need
    --     to be allocated), or 'P.Nothing' to undo the effect of previous
    --     calls to 'GI.Gtk.Objects.Widget.widgetOverrideSymbolicColor'
    -> m ()
widgetOverrideSymbolicColor :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsWidget a) =>
a -> Text -> Maybe RGBA -> m ()
widgetOverrideSymbolicColor a
widget Text
name Maybe RGBA
color = 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 RGBA
maybeColor <- case Maybe RGBA
color of
        Maybe RGBA
Nothing -> Ptr RGBA -> IO (Ptr RGBA)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr RGBA
forall a. Ptr a
nullPtr
        Just RGBA
jColor -> do
            Ptr RGBA
jColor' <- RGBA -> IO (Ptr RGBA)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr RGBA
jColor
            Ptr RGBA -> IO (Ptr RGBA)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr RGBA
jColor'
    Ptr Widget -> CString -> Ptr RGBA -> IO ()
gtk_widget_override_symbolic_color Ptr Widget
widget' CString
name' Ptr RGBA
maybeColor
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
widget
    Maybe RGBA -> (RGBA -> IO ()) -> IO ()
forall (m :: * -> *) a. Monad m => Maybe a -> (a -> m ()) -> m ()
whenJust Maybe RGBA
color RGBA -> 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 WidgetOverrideSymbolicColorMethodInfo
instance (signature ~ (T.Text -> Maybe (Gdk.RGBA.RGBA) -> m ()), MonadIO m, IsWidget a) => O.OverloadedMethod WidgetOverrideSymbolicColorMethodInfo a signature where
    overloadedMethod = widgetOverrideSymbolicColor

instance O.OverloadedMethodInfo WidgetOverrideSymbolicColorMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Gtk.Objects.Widget.widgetOverrideSymbolicColor",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-3.0.38/docs/GI-Gtk-Objects-Widget.html#v:widgetOverrideSymbolicColor"
        })


#endif

-- method Widget::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 = "path_length"
--           , argType = TBasicType TUInt
--           , direction = DirectionOut
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText =
--                     Just "location to store length of the path,\n    or %NULL"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferEverything
--           }
--       , Arg
--           { argCName = "path"
--           , argType = TBasicType TUTF8
--           , direction = DirectionOut
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText =
--                     Just "location to store allocated path string,\n    or %NULL"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferEverything
--           }
--       , Arg
--           { argCName = "path_reversed"
--           , argType = TBasicType TUTF8
--           , direction = DirectionOut
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText =
--                     Just
--                       "location to store allocated reverse\n    path string, 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_path" gtk_widget_path :: 
    Ptr Widget ->                           -- widget : TInterface (Name {namespace = "Gtk", name = "Widget"})
    Ptr Word32 ->                           -- path_length : TBasicType TUInt
    Ptr CString ->                          -- path : TBasicType TUTF8
    Ptr CString ->                          -- path_reversed : TBasicType TUTF8
    IO ()

{-# DEPRECATED widgetPath ["(Since version 3.0)","Use 'GI.Gtk.Objects.Widget.widgetGetPath' instead"] #-}
-- | Obtains the full path to /@widget@/. The path is simply the name of a
-- widget and all its parents in the container hierarchy, separated by
-- periods. The name of a widget comes from
-- 'GI.Gtk.Objects.Widget.widgetGetName'. Paths are used to apply styles to a widget
-- in gtkrc configuration files. Widget names are the type of the
-- widget by default (e.g. “GtkButton”) or can be set to an
-- application-specific value with 'GI.Gtk.Objects.Widget.widgetSetName'. By setting
-- the name of a widget, you allow users or theme authors to apply
-- styles to that specific widget in their gtkrc
-- file. /@pathReversedP@/ fills in the path in reverse order,
-- i.e. starting with /@widget@/’s name instead of starting with the name
-- of /@widget@/’s outermost ancestor.
widgetPath ::
    (B.CallStack.HasCallStack, MonadIO m, IsWidget a) =>
    a
    -- ^ /@widget@/: a t'GI.Gtk.Objects.Widget.Widget'
    -> m ((Word32, T.Text, T.Text))
widgetPath :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsWidget a) =>
a -> m (Word32, Text, Text)
widgetPath a
widget = IO (Word32, Text, Text) -> m (Word32, Text, Text)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Word32, Text, Text) -> m (Word32, Text, Text))
-> IO (Word32, Text, Text) -> m (Word32, Text, 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 Word32
pathLength <- IO (Ptr Word32)
forall a. Storable a => IO (Ptr a)
allocMem :: IO (Ptr Word32)
    Ptr CString
path <- IO (Ptr CString)
forall a. Storable a => IO (Ptr a)
callocMem :: IO (Ptr CString)
    Ptr CString
pathReversed <- IO (Ptr CString)
forall a. Storable a => IO (Ptr a)
callocMem :: IO (Ptr CString)
    Ptr Widget -> Ptr Word32 -> Ptr CString -> Ptr CString -> IO ()
gtk_widget_path Ptr Widget
widget' Ptr Word32
pathLength Ptr CString
path Ptr CString
pathReversed
    Word32
pathLength' <- Ptr Word32 -> IO Word32
forall a. Storable a => Ptr a -> IO a
peek Ptr Word32
pathLength
    CString
path' <- Ptr CString -> IO CString
forall a. Storable a => Ptr a -> IO a
peek Ptr CString
path
    Text
path'' <- HasCallStack => CString -> IO Text
CString -> IO Text
cstringToText CString
path'
    CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
path'
    CString
pathReversed' <- Ptr CString -> IO CString
forall a. Storable a => Ptr a -> IO a
peek Ptr CString
pathReversed
    Text
pathReversed'' <- HasCallStack => CString -> IO Text
CString -> IO Text
cstringToText CString
pathReversed'
    CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
pathReversed'
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
widget
    Ptr Word32 -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr Word32
pathLength
    Ptr CString -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr CString
path
    Ptr CString -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr CString
pathReversed
    (Word32, Text, Text) -> IO (Word32, Text, Text)
forall (m :: * -> *) a. Monad m => a -> m a
return (Word32
pathLength', Text
path'', Text
pathReversed'')

#if defined(ENABLE_OVERLOADING)
data WidgetPathMethodInfo
instance (signature ~ (m ((Word32, T.Text, T.Text))), MonadIO m, IsWidget a) => O.OverloadedMethod WidgetPathMethodInfo a signature where
    overloadedMethod = widgetPath

instance O.OverloadedMethodInfo WidgetPathMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Gtk.Objects.Widget.widgetPath",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-3.0.38/docs/GI-Gtk-Objects-Widget.html#v:widgetPath"
        })


#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](#g: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'.
-- 
-- /Since: 3.20/
widgetQueueAllocate ::
    (B.CallStack.HasCallStack, MonadIO m, IsWidget a) =>
    a
    -- ^ /@widget@/: a t'GI.Gtk.Objects.Widget.Widget'
    -> m ()
widgetQueueAllocate :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsWidget a) =>
a -> m ()
widgetQueueAllocate 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.OverloadedMethod WidgetQueueAllocateMethodInfo a signature where
    overloadedMethod = widgetQueueAllocate

instance O.OverloadedMethodInfo WidgetQueueAllocateMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Gtk.Objects.Widget.widgetQueueAllocate",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-3.0.38/docs/GI-Gtk-Objects-Widget.html#v: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 :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsWidget a) =>
a -> m ()
widgetQueueComputeExpand 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.OverloadedMethod WidgetQueueComputeExpandMethodInfo a signature where
    overloadedMethod = widgetQueueComputeExpand

instance O.OverloadedMethodInfo WidgetQueueComputeExpandMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Gtk.Objects.Widget.widgetQueueComputeExpand",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-3.0.38/docs/GI-Gtk-Objects-Widget.html#v: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 ()

-- | Equivalent to calling 'GI.Gtk.Objects.Widget.widgetQueueDrawArea' for the
-- entire area of a widget.
widgetQueueDraw ::
    (B.CallStack.HasCallStack, MonadIO m, IsWidget a) =>
    a
    -- ^ /@widget@/: a t'GI.Gtk.Objects.Widget.Widget'
    -> m ()
widgetQueueDraw :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsWidget a) =>
a -> m ()
widgetQueueDraw 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.OverloadedMethod WidgetQueueDrawMethodInfo a signature where
    overloadedMethod = widgetQueueDraw

instance O.OverloadedMethodInfo WidgetQueueDrawMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Gtk.Objects.Widget.widgetQueueDraw",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-3.0.38/docs/GI-Gtk-Objects-Widget.html#v:widgetQueueDraw"
        })


#endif

-- method Widget::queue_draw_area
-- 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 = "x"
--           , argType = TBasicType TInt
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText =
--                     Just "x coordinate of upper-left corner of rectangle to redraw"
--                 , 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 "y coordinate of upper-left corner of rectangle to redraw"
--                 , 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 of region to draw"
--                 , 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 of region to draw"
--                 , 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_area" gtk_widget_queue_draw_area :: 
    Ptr Widget ->                           -- widget : TInterface (Name {namespace = "Gtk", name = "Widget"})
    Int32 ->                                -- x : TBasicType TInt
    Int32 ->                                -- y : TBasicType TInt
    Int32 ->                                -- width : TBasicType TInt
    Int32 ->                                -- height : TBasicType TInt
    IO ()

-- | Convenience function that calls 'GI.Gtk.Objects.Widget.widgetQueueDrawRegion' on
-- the region created from the given coordinates.
-- 
-- The region here is specified in widget coordinates.
-- Widget coordinates are a bit odd; for historical reasons, they are
-- defined as /@widget@/->window coordinates for widgets that return 'P.True' for
-- 'GI.Gtk.Objects.Widget.widgetGetHasWindow', and are relative to /@widget@/->allocation.x,
-- /@widget@/->allocation.y otherwise.
-- 
-- /@width@/ or /@height@/ may be 0, in this case this function does
-- nothing. Negative values for /@width@/ and /@height@/ are not allowed.
widgetQueueDrawArea ::
    (B.CallStack.HasCallStack, MonadIO m, IsWidget a) =>
    a
    -- ^ /@widget@/: a t'GI.Gtk.Objects.Widget.Widget'
    -> Int32
    -- ^ /@x@/: x coordinate of upper-left corner of rectangle to redraw
    -> Int32
    -- ^ /@y@/: y coordinate of upper-left corner of rectangle to redraw
    -> Int32
    -- ^ /@width@/: width of region to draw
    -> Int32
    -- ^ /@height@/: height of region to draw
    -> m ()
widgetQueueDrawArea :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsWidget a) =>
a -> Int32 -> Int32 -> Int32 -> Int32 -> m ()
widgetQueueDrawArea a
widget Int32
x Int32
y Int32
width 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 -> Int32 -> Int32 -> IO ()
gtk_widget_queue_draw_area Ptr Widget
widget' Int32
x Int32
y 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 WidgetQueueDrawAreaMethodInfo
instance (signature ~ (Int32 -> Int32 -> Int32 -> Int32 -> m ()), MonadIO m, IsWidget a) => O.OverloadedMethod WidgetQueueDrawAreaMethodInfo a signature where
    overloadedMethod = widgetQueueDrawArea

instance O.OverloadedMethodInfo WidgetQueueDrawAreaMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Gtk.Objects.Widget.widgetQueueDrawArea",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-3.0.38/docs/GI-Gtk-Objects-Widget.html#v:widgetQueueDrawArea"
        })


#endif

-- method Widget::queue_draw_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 = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "region to draw" , 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_region" gtk_widget_queue_draw_region :: 
    Ptr Widget ->                           -- widget : TInterface (Name {namespace = "Gtk", name = "Widget"})
    Ptr Cairo.Region.Region ->              -- region : TInterface (Name {namespace = "cairo", name = "Region"})
    IO ()

-- | Invalidates the area of /@widget@/ defined by /@region@/ by calling
-- 'GI.Gdk.Objects.Window.windowInvalidateRegion' on the widget’s window and all its
-- child windows. Once the main loop becomes idle (after the current
-- batch of events has been processed, roughly), the window will
-- receive expose events for the union of all regions that have been
-- invalidated.
-- 
-- Normally you would only use this function in widget
-- implementations. You might also use it to schedule a redraw of a
-- t'GI.Gtk.Objects.DrawingArea.DrawingArea' or some portion thereof.
-- 
-- /Since: 3.0/
widgetQueueDrawRegion ::
    (B.CallStack.HasCallStack, MonadIO m, IsWidget a) =>
    a
    -- ^ /@widget@/: a t'GI.Gtk.Objects.Widget.Widget'
    -> Cairo.Region.Region
    -- ^ /@region@/: region to draw
    -> m ()
widgetQueueDrawRegion :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsWidget a) =>
a -> Region -> m ()
widgetQueueDrawRegion a
widget 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
region' <- Region -> IO (Ptr Region)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr Region
region
    Ptr Widget -> Ptr Region -> IO ()
gtk_widget_queue_draw_region Ptr Widget
widget' Ptr Region
region'
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
widget
    Region -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr Region
region
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()

#if defined(ENABLE_OVERLOADING)
data WidgetQueueDrawRegionMethodInfo
instance (signature ~ (Cairo.Region.Region -> m ()), MonadIO m, IsWidget a) => O.OverloadedMethod WidgetQueueDrawRegionMethodInfo a signature where
    overloadedMethod = widgetQueueDrawRegion

instance O.OverloadedMethodInfo WidgetQueueDrawRegionMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Gtk.Objects.Widget.widgetQueueDrawRegion",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-3.0.38/docs/GI-Gtk-Objects-Widget.html#v:widgetQueueDrawRegion"
        })


#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](#g:signal:size_allocate)
-- virtual method. Calls to 'GI.Gtk.Objects.Widget.widgetQueueResize' from inside
-- GtkWidgetClass[size_allocate](#g: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 :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsWidget a) =>
a -> m ()
widgetQueueResize 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.OverloadedMethod WidgetQueueResizeMethodInfo a signature where
    overloadedMethod = widgetQueueResize

instance O.OverloadedMethodInfo WidgetQueueResizeMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Gtk.Objects.Widget.widgetQueueResize",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-3.0.38/docs/GI-Gtk-Objects-Widget.html#v: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.
-- 
-- /Since: 2.4/
widgetQueueResizeNoRedraw ::
    (B.CallStack.HasCallStack, MonadIO m, IsWidget a) =>
    a
    -- ^ /@widget@/: a t'GI.Gtk.Objects.Widget.Widget'
    -> m ()
widgetQueueResizeNoRedraw :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsWidget a) =>
a -> m ()
widgetQueueResizeNoRedraw 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.OverloadedMethod WidgetQueueResizeNoRedrawMethodInfo a signature where
    overloadedMethod = widgetQueueResizeNoRedraw

instance O.OverloadedMethodInfo WidgetQueueResizeNoRedrawMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Gtk.Objects.Widget.widgetQueueResizeNoRedraw",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-3.0.38/docs/GI-Gtk-Objects-Widget.html#v: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@/->window 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
-- [draw]("GI.Gtk.Objects.Widget#g:signal:draw"). Or simply g_signal_connect () to the
-- [realize]("GI.Gtk.Objects.Widget#g:signal:realize") signal.
widgetRealize ::
    (B.CallStack.HasCallStack, MonadIO m, IsWidget a) =>
    a
    -- ^ /@widget@/: a t'GI.Gtk.Objects.Widget.Widget'
    -> m ()
widgetRealize :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsWidget a) =>
a -> m ()
widgetRealize 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.OverloadedMethod WidgetRealizeMethodInfo a signature where
    overloadedMethod = widgetRealize

instance O.OverloadedMethodInfo WidgetRealizeMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Gtk.Objects.Widget.widgetRealize",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-3.0.38/docs/GI-Gtk-Objects-Widget.html#v:widgetRealize"
        })


#endif

-- method Widget::region_intersect
-- 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 = False
--           , argDoc =
--               Documentation
--                 { rawDocText =
--                     Just
--                       "a #cairo_region_t, in the same coordinate system as\n         @widget->allocation. That is, relative to @widget->window\n         for widgets which return %FALSE from gtk_widget_get_has_window();\n         relative to the parent window of @widget->window otherwise."
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TInterface Name { namespace = "cairo" , name = "Region" })
-- throws : False
-- Skip return : False

foreign import ccall "gtk_widget_region_intersect" gtk_widget_region_intersect :: 
    Ptr Widget ->                           -- widget : TInterface (Name {namespace = "Gtk", name = "Widget"})
    Ptr Cairo.Region.Region ->              -- region : TInterface (Name {namespace = "cairo", name = "Region"})
    IO (Ptr Cairo.Region.Region)

{-# DEPRECATED widgetRegionIntersect ["(Since version 3.14)","Use 'GI.Gtk.Objects.Widget.widgetGetAllocation' and","    @/cairo_region_intersect_rectangle()/@ to get the same behavior."] #-}
-- | Computes the intersection of a /@widget@/’s area and /@region@/, returning
-- the intersection. The result may be empty, use @/cairo_region_is_empty()/@ to
-- check.
widgetRegionIntersect ::
    (B.CallStack.HasCallStack, MonadIO m, IsWidget a) =>
    a
    -- ^ /@widget@/: a t'GI.Gtk.Objects.Widget.Widget'
    -> Cairo.Region.Region
    -- ^ /@region@/: a t'GI.Cairo.Structs.Region.Region', in the same coordinate system as
    --          /@widget@/->allocation. That is, relative to /@widget@/->window
    --          for widgets which return 'P.False' from 'GI.Gtk.Objects.Widget.widgetGetHasWindow';
    --          relative to the parent window of /@widget@/->window otherwise.
    -> m Cairo.Region.Region
    -- ^ __Returns:__ A newly allocated region holding the intersection of /@widget@/
    --     and /@region@/.
widgetRegionIntersect :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsWidget a) =>
a -> Region -> m Region
widgetRegionIntersect a
widget Region
region = IO Region -> m Region
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Region -> m Region) -> IO Region -> m Region
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
region' <- Region -> IO (Ptr Region)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr Region
region
    Ptr Region
result <- Ptr Widget -> Ptr Region -> IO (Ptr Region)
gtk_widget_region_intersect Ptr Widget
widget' Ptr Region
region'
    Text -> Ptr Region -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"widgetRegionIntersect" Ptr Region
result
    Region
result' <- ((ManagedPtr Region -> Region) -> Ptr Region -> IO Region
forall a.
(HasCallStack, GBoxed a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
wrapBoxed ManagedPtr Region -> Region
Cairo.Region.Region) Ptr Region
result
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
widget
    Region -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr Region
region
    Region -> IO Region
forall (m :: * -> *) a. Monad m => a -> m a
return Region
result'

#if defined(ENABLE_OVERLOADING)
data WidgetRegionIntersectMethodInfo
instance (signature ~ (Cairo.Region.Region -> m Cairo.Region.Region), MonadIO m, IsWidget a) => O.OverloadedMethod WidgetRegionIntersectMethodInfo a signature where
    overloadedMethod = widgetRegionIntersect

instance O.OverloadedMethodInfo WidgetRegionIntersectMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Gtk.Objects.Widget.widgetRegionIntersect",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-3.0.38/docs/GI-Gtk-Objects-Widget.html#v:widgetRegionIntersect"
        })


#endif

-- method Widget::register_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 = "window"
--           , argType = TInterface Name { namespace = "Gdk" , name = "Window" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #GdkWindow" , 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_window" gtk_widget_register_window :: 
    Ptr Widget ->                           -- widget : TInterface (Name {namespace = "Gtk", name = "Widget"})
    Ptr Gdk.Window.Window ->                -- window : TInterface (Name {namespace = "Gdk", name = "Window"})
    IO ()

-- | Registers a t'GI.Gdk.Objects.Window.Window' with the widget and sets it up so that
-- the widget receives events for it. Call 'GI.Gtk.Objects.Widget.widgetUnregisterWindow'
-- when destroying the window.
-- 
-- Before 3.8 you needed to call 'GI.Gdk.Objects.Window.windowSetUserData' directly to set
-- this up. This is now deprecated and you should use 'GI.Gtk.Objects.Widget.widgetRegisterWindow'
-- instead. Old code will keep working as is, although some new features like
-- transparency might not work perfectly.
-- 
-- /Since: 3.8/
widgetRegisterWindow ::
    (B.CallStack.HasCallStack, MonadIO m, IsWidget a, Gdk.Window.IsWindow b) =>
    a
    -- ^ /@widget@/: a t'GI.Gtk.Objects.Widget.Widget'
    -> b
    -- ^ /@window@/: a t'GI.Gdk.Objects.Window.Window'
    -> m ()
widgetRegisterWindow :: forall (m :: * -> *) a b.
(HasCallStack, MonadIO m, IsWidget a, IsWindow b) =>
a -> b -> m ()
widgetRegisterWindow a
widget b
window = 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
window' <- b -> IO (Ptr Window)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
window
    Ptr Widget -> Ptr Window -> IO ()
gtk_widget_register_window Ptr Widget
widget' Ptr Window
window'
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
widget
    b -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr b
window
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()

#if defined(ENABLE_OVERLOADING)
data WidgetRegisterWindowMethodInfo
instance (signature ~ (b -> m ()), MonadIO m, IsWidget a, Gdk.Window.IsWindow b) => O.OverloadedMethod WidgetRegisterWindowMethodInfo a signature where
    overloadedMethod = widgetRegisterWindow

instance O.OverloadedMethodInfo WidgetRegisterWindowMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Gtk.Objects.Widget.widgetRegisterWindow",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-3.0.38/docs/GI-Gtk-Objects-Widget.html#v:widgetRegisterWindow"
        })


#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 :: forall (m :: * -> *) a b.
(HasCallStack, MonadIO m, IsWidget a, IsAccelGroup b) =>
a -> b -> Word32 -> [ModifierType] -> m Bool
widgetRemoveAccelerator a
widget b
accelGroup Word32
accelKey [ModifierType]
accelMods = IO Bool -> m Bool
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Bool -> m Bool) -> IO Bool -> 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
/= CInt
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.OverloadedMethod WidgetRemoveAcceleratorMethodInfo a signature where
    overloadedMethod = widgetRemoveAccelerator

instance O.OverloadedMethodInfo WidgetRemoveAcceleratorMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Gtk.Objects.Widget.widgetRemoveAccelerator",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-3.0.38/docs/GI-Gtk-Objects-Widget.html#v:widgetRemoveAccelerator"
        })


#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'.
-- 
-- /Since: 2.4/
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 :: forall (m :: * -> *) a b.
(HasCallStack, MonadIO m, IsWidget a, IsWidget b) =>
a -> b -> m ()
widgetRemoveMnemonicLabel a
widget 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.OverloadedMethod WidgetRemoveMnemonicLabelMethodInfo a signature where
    overloadedMethod = widgetRemoveMnemonicLabel

instance O.OverloadedMethodInfo WidgetRemoveMnemonicLabelMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Gtk.Objects.Widget.widgetRemoveMnemonicLabel",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-3.0.38/docs/GI-Gtk-Objects-Widget.html#v: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'.
-- 
-- /Since: 3.8/
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 :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsWidget a) =>
a -> Word32 -> m ()
widgetRemoveTickCallback a
widget 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.OverloadedMethod WidgetRemoveTickCallbackMethodInfo a signature where
    overloadedMethod = widgetRemoveTickCallback

instance O.OverloadedMethodInfo WidgetRemoveTickCallbackMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Gtk.Objects.Widget.widgetRemoveTickCallback",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-3.0.38/docs/GI-Gtk-Objects-Widget.html#v:widgetRemoveTickCallback"
        })


#endif

-- method Widget::render_icon
-- 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 = "stock_id"
--           , argType = TBasicType TUTF8
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a stock ID" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "size"
--           , argType = TBasicType TInt
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText =
--                     Just
--                       "a stock size (#GtkIconSize). A size of `(GtkIconSize)-1`\n    means render at the size of the source and don\8217t scale (if there are\n    multiple source sizes, GTK+ picks one of the available sizes)."
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "detail"
--           , argType = TBasicType TUTF8
--           , direction = DirectionIn
--           , mayBeNull = True
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "render detail to pass to theme engine"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just
--               (TInterface Name { namespace = "GdkPixbuf" , name = "Pixbuf" })
-- throws : False
-- Skip return : False

foreign import ccall "gtk_widget_render_icon" gtk_widget_render_icon :: 
    Ptr Widget ->                           -- widget : TInterface (Name {namespace = "Gtk", name = "Widget"})
    CString ->                              -- stock_id : TBasicType TUTF8
    Int32 ->                                -- size : TBasicType TInt
    CString ->                              -- detail : TBasicType TUTF8
    IO (Ptr GdkPixbuf.Pixbuf.Pixbuf)

{-# DEPRECATED widgetRenderIcon ["(Since version 3.0)","Use 'GI.Gtk.Objects.Widget.widgetRenderIconPixbuf' instead."] #-}
-- | A convenience function that uses the theme settings for /@widget@/
-- to look up /@stockId@/ and render it to a pixbuf. /@stockId@/ should
-- be a stock icon ID such as 'GI.Gtk.Constants.STOCK_OPEN' or 'GI.Gtk.Constants.STOCK_OK'. /@size@/
-- should be a size such as @/GTK_ICON_SIZE_MENU/@. /@detail@/ should be a
-- string that identifies the widget or code doing the rendering, so
-- that theme engines can special-case rendering for that widget or
-- code.
-- 
-- The pixels in the returned t'GI.GdkPixbuf.Objects.Pixbuf.Pixbuf' are shared with the rest of
-- the application and should not be modified. The pixbuf should be
-- freed after use with 'GI.GObject.Objects.Object.objectUnref'.
widgetRenderIcon ::
    (B.CallStack.HasCallStack, MonadIO m, IsWidget a) =>
    a
    -- ^ /@widget@/: a t'GI.Gtk.Objects.Widget.Widget'
    -> T.Text
    -- ^ /@stockId@/: a stock ID
    -> Int32
    -- ^ /@size@/: a stock size (t'GI.Gtk.Enums.IconSize'). A size of @(GtkIconSize)-1@
    --     means render at the size of the source and don’t scale (if there are
    --     multiple source sizes, GTK+ picks one of the available sizes).
    -> Maybe (T.Text)
    -- ^ /@detail@/: render detail to pass to theme engine
    -> m (Maybe GdkPixbuf.Pixbuf.Pixbuf)
    -- ^ __Returns:__ a new pixbuf, or 'P.Nothing' if the
    --     stock ID wasn’t known
widgetRenderIcon :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsWidget a) =>
a -> Text -> Int32 -> Maybe Text -> m (Maybe Pixbuf)
widgetRenderIcon a
widget Text
stockId Int32
size Maybe Text
detail = IO (Maybe Pixbuf) -> m (Maybe Pixbuf)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Maybe Pixbuf) -> m (Maybe Pixbuf))
-> IO (Maybe Pixbuf) -> m (Maybe Pixbuf)
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
stockId' <- Text -> IO CString
textToCString Text
stockId
    CString
maybeDetail <- case Maybe Text
detail of
        Maybe Text
Nothing -> CString -> IO CString
forall (m :: * -> *) a. Monad m => a -> m a
return CString
forall a. Ptr a
nullPtr
        Just Text
jDetail -> do
            CString
jDetail' <- Text -> IO CString
textToCString Text
jDetail
            CString -> IO CString
forall (m :: * -> *) a. Monad m => a -> m a
return CString
jDetail'
    Ptr Pixbuf
result <- Ptr Widget -> CString -> Int32 -> CString -> IO (Ptr Pixbuf)
gtk_widget_render_icon Ptr Widget
widget' CString
stockId' Int32
size CString
maybeDetail
    Maybe Pixbuf
maybeResult <- Ptr Pixbuf -> (Ptr Pixbuf -> IO Pixbuf) -> IO (Maybe Pixbuf)
forall a b. Ptr a -> (Ptr a -> IO b) -> IO (Maybe b)
convertIfNonNull Ptr Pixbuf
result ((Ptr Pixbuf -> IO Pixbuf) -> IO (Maybe Pixbuf))
-> (Ptr Pixbuf -> IO Pixbuf) -> IO (Maybe Pixbuf)
forall a b. (a -> b) -> a -> b
$ \Ptr Pixbuf
result' -> do
        Pixbuf
result'' <- ((ManagedPtr Pixbuf -> Pixbuf) -> Ptr Pixbuf -> IO Pixbuf
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
wrapObject ManagedPtr Pixbuf -> Pixbuf
GdkPixbuf.Pixbuf.Pixbuf) Ptr Pixbuf
result'
        Pixbuf -> IO Pixbuf
forall (m :: * -> *) a. Monad m => a -> m a
return Pixbuf
result''
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
widget
    CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
stockId'
    CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
maybeDetail
    Maybe Pixbuf -> IO (Maybe Pixbuf)
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe Pixbuf
maybeResult

#if defined(ENABLE_OVERLOADING)
data WidgetRenderIconMethodInfo
instance (signature ~ (T.Text -> Int32 -> Maybe (T.Text) -> m (Maybe GdkPixbuf.Pixbuf.Pixbuf)), MonadIO m, IsWidget a) => O.OverloadedMethod WidgetRenderIconMethodInfo a signature where
    overloadedMethod = widgetRenderIcon

instance O.OverloadedMethodInfo WidgetRenderIconMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Gtk.Objects.Widget.widgetRenderIcon",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-3.0.38/docs/GI-Gtk-Objects-Widget.html#v:widgetRenderIcon"
        })


#endif

-- method Widget::render_icon_pixbuf
-- 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 = "stock_id"
--           , argType = TBasicType TUTF8
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a stock ID" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "size"
--           , argType = TBasicType TInt
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText =
--                     Just
--                       "a stock size (#GtkIconSize). A size of `(GtkIconSize)-1`\n    means render at the size of the source and don\8217t scale (if there are\n    multiple source sizes, GTK+ picks one of the available sizes)."
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just
--               (TInterface Name { namespace = "GdkPixbuf" , name = "Pixbuf" })
-- throws : False
-- Skip return : False

foreign import ccall "gtk_widget_render_icon_pixbuf" gtk_widget_render_icon_pixbuf :: 
    Ptr Widget ->                           -- widget : TInterface (Name {namespace = "Gtk", name = "Widget"})
    CString ->                              -- stock_id : TBasicType TUTF8
    Int32 ->                                -- size : TBasicType TInt
    IO (Ptr GdkPixbuf.Pixbuf.Pixbuf)

{-# DEPRECATED widgetRenderIconPixbuf ["(Since version 3.10)","Use 'GI.Gtk.Objects.IconTheme.iconThemeLoadIcon' instead."] #-}
-- | A convenience function that uses the theme engine and style
-- settings for /@widget@/ to look up /@stockId@/ and render it to
-- a pixbuf. /@stockId@/ should be a stock icon ID such as
-- 'GI.Gtk.Constants.STOCK_OPEN' or 'GI.Gtk.Constants.STOCK_OK'. /@size@/ should be a size
-- such as @/GTK_ICON_SIZE_MENU/@.
-- 
-- The pixels in the returned t'GI.GdkPixbuf.Objects.Pixbuf.Pixbuf' are shared with the rest of
-- the application and should not be modified. The pixbuf should be freed
-- after use with 'GI.GObject.Objects.Object.objectUnref'.
-- 
-- /Since: 3.0/
widgetRenderIconPixbuf ::
    (B.CallStack.HasCallStack, MonadIO m, IsWidget a) =>
    a
    -- ^ /@widget@/: a t'GI.Gtk.Objects.Widget.Widget'
    -> T.Text
    -- ^ /@stockId@/: a stock ID
    -> Int32
    -- ^ /@size@/: a stock size (t'GI.Gtk.Enums.IconSize'). A size of @(GtkIconSize)-1@
    --     means render at the size of the source and don’t scale (if there are
    --     multiple source sizes, GTK+ picks one of the available sizes).
    -> m (Maybe GdkPixbuf.Pixbuf.Pixbuf)
    -- ^ __Returns:__ a new pixbuf, or 'P.Nothing' if the
    --     stock ID wasn’t known
widgetRenderIconPixbuf :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsWidget a) =>
a -> Text -> Int32 -> m (Maybe Pixbuf)
widgetRenderIconPixbuf a
widget Text
stockId Int32
size = IO (Maybe Pixbuf) -> m (Maybe Pixbuf)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Maybe Pixbuf) -> m (Maybe Pixbuf))
-> IO (Maybe Pixbuf) -> m (Maybe Pixbuf)
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
stockId' <- Text -> IO CString
textToCString Text
stockId
    Ptr Pixbuf
result <- Ptr Widget -> CString -> Int32 -> IO (Ptr Pixbuf)
gtk_widget_render_icon_pixbuf Ptr Widget
widget' CString
stockId' Int32
size
    Maybe Pixbuf
maybeResult <- Ptr Pixbuf -> (Ptr Pixbuf -> IO Pixbuf) -> IO (Maybe Pixbuf)
forall a b. Ptr a -> (Ptr a -> IO b) -> IO (Maybe b)
convertIfNonNull Ptr Pixbuf
result ((Ptr Pixbuf -> IO Pixbuf) -> IO (Maybe Pixbuf))
-> (Ptr Pixbuf -> IO Pixbuf) -> IO (Maybe Pixbuf)
forall a b. (a -> b) -> a -> b
$ \Ptr Pixbuf
result' -> do
        Pixbuf
result'' <- ((ManagedPtr Pixbuf -> Pixbuf) -> Ptr Pixbuf -> IO Pixbuf
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
wrapObject ManagedPtr Pixbuf -> Pixbuf
GdkPixbuf.Pixbuf.Pixbuf) Ptr Pixbuf
result'
        Pixbuf -> IO Pixbuf
forall (m :: * -> *) a. Monad m => a -> m a
return Pixbuf
result''
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
widget
    CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
stockId'
    Maybe Pixbuf -> IO (Maybe Pixbuf)
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe Pixbuf
maybeResult

#if defined(ENABLE_OVERLOADING)
data WidgetRenderIconPixbufMethodInfo
instance (signature ~ (T.Text -> Int32 -> m (Maybe GdkPixbuf.Pixbuf.Pixbuf)), MonadIO m, IsWidget a) => O.OverloadedMethod WidgetRenderIconPixbufMethodInfo a signature where
    overloadedMethod = widgetRenderIconPixbuf

instance O.OverloadedMethodInfo WidgetRenderIconPixbufMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Gtk.Objects.Widget.widgetRenderIconPixbuf",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-3.0.38/docs/GI-Gtk-Objects-Widget.html#v:widgetRenderIconPixbuf"
        })


#endif

-- method Widget::reparent
-- 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 = "new_parent"
--           , argType = TInterface Name { namespace = "Gtk" , name = "Widget" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #GtkContainer to move the widget into"
--                 , 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_reparent" gtk_widget_reparent :: 
    Ptr Widget ->                           -- widget : TInterface (Name {namespace = "Gtk", name = "Widget"})
    Ptr Widget ->                           -- new_parent : TInterface (Name {namespace = "Gtk", name = "Widget"})
    IO ()

{-# DEPRECATED widgetReparent ["(Since version 3.14)","Use 'GI.Gtk.Objects.Container.containerRemove' and 'GI.Gtk.Objects.Container.containerAdd'."] #-}
-- | Moves a widget from one t'GI.Gtk.Objects.Container.Container' to another, handling reference
-- count issues to avoid destroying the widget.
widgetReparent ::
    (B.CallStack.HasCallStack, MonadIO m, IsWidget a, IsWidget b) =>
    a
    -- ^ /@widget@/: a t'GI.Gtk.Objects.Widget.Widget'
    -> b
    -- ^ /@newParent@/: a t'GI.Gtk.Objects.Container.Container' to move the widget into
    -> m ()
widgetReparent :: forall (m :: * -> *) a b.
(HasCallStack, MonadIO m, IsWidget a, IsWidget b) =>
a -> b -> m ()
widgetReparent a
widget b
newParent = 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
newParent' <- b -> IO (Ptr Widget)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
newParent
    Ptr Widget -> Ptr Widget -> IO ()
gtk_widget_reparent Ptr Widget
widget' Ptr Widget
newParent'
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
widget
    b -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr b
newParent
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()

#if defined(ENABLE_OVERLOADING)
data WidgetReparentMethodInfo
instance (signature ~ (b -> m ()), MonadIO m, IsWidget a, IsWidget b) => O.OverloadedMethod WidgetReparentMethodInfo a signature where
    overloadedMethod = widgetReparent

instance O.OverloadedMethodInfo WidgetReparentMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Gtk.Objects.Widget.widgetReparent",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-3.0.38/docs/GI-Gtk-Objects-Widget.html#v:widgetReparent"
        })


#endif

-- method Widget::reset_rc_styles
-- 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_rc_styles" gtk_widget_reset_rc_styles :: 
    Ptr Widget ->                           -- widget : TInterface (Name {namespace = "Gtk", name = "Widget"})
    IO ()

{-# DEPRECATED widgetResetRcStyles ["(Since version 3.0)","Use t'GI.Gtk.Objects.StyleContext.StyleContext' instead, and 'GI.Gtk.Objects.Widget.widgetResetStyle'"] #-}
-- | Reset the styles of /@widget@/ and all descendents, so when
-- they are looked up again, they get the correct values
-- for the currently loaded RC file settings.
-- 
-- This function is not useful for applications.
widgetResetRcStyles ::
    (B.CallStack.HasCallStack, MonadIO m, IsWidget a) =>
    a
    -- ^ /@widget@/: a t'GI.Gtk.Objects.Widget.Widget'.
    -> m ()
widgetResetRcStyles :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsWidget a) =>
a -> m ()
widgetResetRcStyles 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_rc_styles 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 WidgetResetRcStylesMethodInfo
instance (signature ~ (m ()), MonadIO m, IsWidget a) => O.OverloadedMethod WidgetResetRcStylesMethodInfo a signature where
    overloadedMethod = widgetResetRcStyles

instance O.OverloadedMethodInfo WidgetResetRcStylesMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Gtk.Objects.Widget.widgetResetRcStyles",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-3.0.38/docs/GI-Gtk-Objects-Widget.html#v:widgetResetRcStyles"
        })


#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'.
-- 
-- /Since: 3.0/
widgetResetStyle ::
    (B.CallStack.HasCallStack, MonadIO m, IsWidget a) =>
    a
    -- ^ /@widget@/: a t'GI.Gtk.Objects.Widget.Widget'
    -> m ()
widgetResetStyle :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsWidget a) =>
a -> m ()
widgetResetStyle 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.OverloadedMethod WidgetResetStyleMethodInfo a signature where
    overloadedMethod = widgetResetStyle

instance O.OverloadedMethodInfo WidgetResetStyleMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Gtk.Objects.Widget.widgetResetStyle",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-3.0.38/docs/GI-Gtk-Objects-Widget.html#v:widgetResetStyle"
        })


#endif

-- method Widget::send_expose
-- 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 expose #GdkEvent" , 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_send_expose" gtk_widget_send_expose :: 
    Ptr Widget ->                           -- widget : TInterface (Name {namespace = "Gtk", name = "Widget"})
    Ptr Gdk.Event.Event ->                  -- event : TInterface (Name {namespace = "Gdk", name = "Event"})
    IO Int32

{-# DEPRECATED widgetSendExpose ["(Since version 3.22)","Application and widget code should not handle","  expose events directly; invalidation should use the t'GI.Gtk.Objects.Widget.Widget'","  API, and drawing should only happen inside [draw](\"GI.Gtk.Objects.Widget#g:signal:draw\")","  implementations"] #-}
-- | Very rarely-used function. This function is used to emit
-- an expose event on a widget. This function is not normally used
-- directly. The only time it is used is when propagating an expose
-- event to a windowless child widget ('GI.Gtk.Objects.Widget.widgetGetHasWindow' is 'P.False'),
-- and that is normally done using 'GI.Gtk.Objects.Container.containerPropagateDraw'.
-- 
-- If you want to force an area of a window to be redrawn,
-- use 'GI.Gdk.Objects.Window.windowInvalidateRect' or 'GI.Gdk.Objects.Window.windowInvalidateRegion'.
-- To cause the redraw to be done immediately, follow that call
-- with a call to 'GI.Gdk.Objects.Window.windowProcessUpdates'.
widgetSendExpose ::
    (B.CallStack.HasCallStack, MonadIO m, IsWidget a) =>
    a
    -- ^ /@widget@/: a t'GI.Gtk.Objects.Widget.Widget'
    -> Gdk.Event.Event
    -- ^ /@event@/: a expose t'GI.Gdk.Unions.Event.Event'
    -> m Int32
    -- ^ __Returns:__ return from the event signal emission ('P.True' if
    --   the event was handled)
widgetSendExpose :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsWidget a) =>
a -> Event -> m Int32
widgetSendExpose a
widget Event
event = 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
    Ptr Event
event' <- Event -> IO (Ptr Event)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr Event
event
    Int32
result <- Ptr Widget -> Ptr Event -> IO Int32
gtk_widget_send_expose Ptr Widget
widget' Ptr Event
event'
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
widget
    WidgetEventAfterCallback
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr Event
event
    Int32 -> IO Int32
forall (m :: * -> *) a. Monad m => a -> m a
return Int32
result

#if defined(ENABLE_OVERLOADING)
data WidgetSendExposeMethodInfo
instance (signature ~ (Gdk.Event.Event -> m Int32), MonadIO m, IsWidget a) => O.OverloadedMethod WidgetSendExposeMethodInfo a signature where
    overloadedMethod = widgetSendExpose

instance O.OverloadedMethodInfo WidgetSendExposeMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Gtk.Objects.Widget.widgetSendExpose",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-3.0.38/docs/GI-Gtk-Objects-Widget.html#v:widgetSendExpose"
        })


#endif

-- method Widget::send_focus_change
-- 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 of type GDK_FOCUS_CHANGE"
--                 , 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_send_focus_change" gtk_widget_send_focus_change :: 
    Ptr Widget ->                           -- widget : TInterface (Name {namespace = "Gtk", name = "Widget"})
    Ptr Gdk.Event.Event ->                  -- event : TInterface (Name {namespace = "Gdk", name = "Event"})
    IO CInt

-- | Sends the focus change /@event@/ to /@widget@/
-- 
-- This function is not meant to be used by applications. The only time it
-- should be used is when it is necessary for a t'GI.Gtk.Objects.Widget.Widget' to assign focus
-- to a widget that is semantically owned by the first widget even though
-- it’s not a direct child - for instance, a search entry in a floating
-- window similar to the quick search in t'GI.Gtk.Objects.TreeView.TreeView'.
-- 
-- An example of its usage is:
-- 
-- 
-- === /C code/
-- >
-- >  GdkEvent *fevent = gdk_event_new (GDK_FOCUS_CHANGE);
-- >
-- >  fevent->focus_change.type = GDK_FOCUS_CHANGE;
-- >  fevent->focus_change.in = TRUE;
-- >  fevent->focus_change.window = _gtk_widget_get_window (widget);
-- >  if (fevent->focus_change.window != NULL)
-- >    g_object_ref (fevent->focus_change.window);
-- >
-- >  gtk_widget_send_focus_change (widget, fevent);
-- >
-- >  gdk_event_free (event);
-- 
-- 
-- /Since: 2.20/
widgetSendFocusChange ::
    (B.CallStack.HasCallStack, MonadIO m, IsWidget a) =>
    a
    -- ^ /@widget@/: a t'GI.Gtk.Objects.Widget.Widget'
    -> Gdk.Event.Event
    -- ^ /@event@/: a t'GI.Gdk.Unions.Event.Event' of type GDK_FOCUS_CHANGE
    -> m Bool
    -- ^ __Returns:__ the return value from the event signal emission: 'P.True'
    --   if the event was handled, and 'P.False' otherwise
widgetSendFocusChange :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsWidget a) =>
a -> Event -> m Bool
widgetSendFocusChange a
widget Event
event = IO Bool -> m Bool
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Bool -> m Bool) -> IO Bool -> 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' <- Event -> IO (Ptr Event)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr Event
event
    CInt
result <- Ptr Widget -> Ptr Event -> IO CInt
gtk_widget_send_focus_change Ptr Widget
widget' Ptr Event
event'
    let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= CInt
0) CInt
result
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
widget
    WidgetEventAfterCallback
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr Event
event
    WidgetMnemonicActivateCallback
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'

#if defined(ENABLE_OVERLOADING)
data WidgetSendFocusChangeMethodInfo
instance (signature ~ (Gdk.Event.Event -> m Bool), MonadIO m, IsWidget a) => O.OverloadedMethod WidgetSendFocusChangeMethodInfo a signature where
    overloadedMethod = widgetSendFocusChange

instance O.OverloadedMethodInfo WidgetSendFocusChangeMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Gtk.Objects.Widget.widgetSendFocusChange",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-3.0.38/docs/GI-Gtk-Objects-Widget.html#v:widgetSendFocusChange"
        })


#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 like t'GI.Gtk.Objects.UIManager.UIManager'. If you
-- use t'GI.Gtk.Objects.UIManager.UIManager', setting up accelerator paths will be done
-- automatically.
-- 
-- Even when you you aren’t using t'GI.Gtk.Objects.UIManager.UIManager', 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 :: forall (m :: * -> *) a b.
(HasCallStack, MonadIO m, IsWidget a, IsAccelGroup b) =>
a -> Maybe Text -> Maybe b -> m ()
widgetSetAccelPath a
widget Maybe Text
accelPath 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
        Maybe Text
Nothing -> CString -> IO CString
forall (m :: * -> *) a. Monad m => a -> m a
return CString
forall a. Ptr a
nullPtr
        Just 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
        Maybe b
Nothing -> Ptr AccelGroup -> IO (Ptr AccelGroup)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr AccelGroup
forall a. Ptr a
nullPtr
        Just 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.OverloadedMethod WidgetSetAccelPathMethodInfo a signature where
    overloadedMethod = widgetSetAccelPath

instance O.OverloadedMethodInfo WidgetSetAccelPathMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Gtk.Objects.Widget.widgetSetAccelPath",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-3.0.38/docs/GI-Gtk-Objects-Widget.html#v:widgetSetAccelPath"
        })


#endif

-- method Widget::set_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 = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a pointer to a #GtkAllocation to copy 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_widget_set_allocation" gtk_widget_set_allocation :: 
    Ptr Widget ->                           -- widget : TInterface (Name {namespace = "Gtk", name = "Widget"})
    Ptr Gdk.Rectangle.Rectangle ->          -- allocation : TInterface (Name {namespace = "Gdk", name = "Rectangle"})
    IO ()

-- | Sets the widget’s allocation.  This should not be used
-- directly, but from within a widget’s size_allocate method.
-- 
-- The allocation set should be the “adjusted” or actual
-- allocation. If you’re implementing a t'GI.Gtk.Objects.Container.Container', you want to use
-- 'GI.Gtk.Objects.Widget.widgetSizeAllocate' instead of 'GI.Gtk.Objects.Widget.widgetSetAllocation'.
-- The GtkWidgetClass[adjust_size_allocation](#g:signal:adjust_size_allocation) virtual method adjusts the
-- allocation inside 'GI.Gtk.Objects.Widget.widgetSizeAllocate' to create an adjusted
-- allocation.
-- 
-- /Since: 2.18/
widgetSetAllocation ::
    (B.CallStack.HasCallStack, MonadIO m, IsWidget a) =>
    a
    -- ^ /@widget@/: a t'GI.Gtk.Objects.Widget.Widget'
    -> Gdk.Rectangle.Rectangle
    -- ^ /@allocation@/: a pointer to a @/GtkAllocation/@ to copy from
    -> m ()
widgetSetAllocation :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsWidget a) =>
a -> Rectangle -> m ()
widgetSetAllocation a
widget Rectangle
allocation = 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 -> IO ()
gtk_widget_set_allocation Ptr Widget
widget' Ptr Rectangle
allocation'
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
widget
    WidgetSizeAllocateCallback
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr Rectangle
allocation
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()

#if defined(ENABLE_OVERLOADING)
data WidgetSetAllocationMethodInfo
instance (signature ~ (Gdk.Rectangle.Rectangle -> m ()), MonadIO m, IsWidget a) => O.OverloadedMethod WidgetSetAllocationMethodInfo a signature where
    overloadedMethod = widgetSetAllocation

instance O.OverloadedMethodInfo WidgetSetAllocationMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Gtk.Objects.Widget.widgetSetAllocation",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-3.0.38/docs/GI-Gtk-Objects-Widget.html#v:widgetSetAllocation"
        })


#endif

-- method Widget::set_app_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 = "app_paintable"
--           , argType = TBasicType TBoolean
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText =
--                     Just "%TRUE if the application will paint on 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_app_paintable" gtk_widget_set_app_paintable :: 
    Ptr Widget ->                           -- widget : TInterface (Name {namespace = "Gtk", name = "Widget"})
    CInt ->                                 -- app_paintable : TBasicType TBoolean
    IO ()

-- | Sets whether the application intends to draw on the widget in
-- an [draw]("GI.Gtk.Objects.Widget#g:signal:draw") handler.
-- 
-- This is a hint to the widget and does not affect the behavior of
-- the GTK+ core; many widgets ignore this flag entirely. For widgets
-- that do pay attention to the flag, such as t'GI.Gtk.Objects.EventBox.EventBox' and t'GI.Gtk.Objects.Window.Window',
-- the effect is to suppress default themed drawing of the widget\'s
-- background. (Children of the widget will still be drawn.) The application
-- is then entirely responsible for drawing the widget background.
-- 
-- Note that the background is still drawn when the widget is mapped.
widgetSetAppPaintable ::
    (B.CallStack.HasCallStack, MonadIO m, IsWidget a) =>
    a
    -- ^ /@widget@/: a t'GI.Gtk.Objects.Widget.Widget'
    -> Bool
    -- ^ /@appPaintable@/: 'P.True' if the application will paint on the widget
    -> m ()
widgetSetAppPaintable :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsWidget a) =>
a -> Bool -> m ()
widgetSetAppPaintable a
widget Bool
appPaintable = 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 appPaintable' :: CInt
appPaintable' = (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
appPaintable
    Ptr Widget -> CInt -> IO ()
gtk_widget_set_app_paintable Ptr Widget
widget' CInt
appPaintable'
    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 WidgetSetAppPaintableMethodInfo
instance (signature ~ (Bool -> m ()), MonadIO m, IsWidget a) => O.OverloadedMethod WidgetSetAppPaintableMethodInfo a signature where
    overloadedMethod = widgetSetAppPaintable

instance O.OverloadedMethodInfo WidgetSetAppPaintableMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Gtk.Objects.Widget.widgetSetAppPaintable",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-3.0.38/docs/GI-Gtk-Objects-Widget.html#v:widgetSetAppPaintable"
        })


#endif

-- method Widget::set_can_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 = "can_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_can_default" gtk_widget_set_can_default :: 
    Ptr Widget ->                           -- widget : TInterface (Name {namespace = "Gtk", name = "Widget"})
    CInt ->                                 -- can_default : TBasicType TBoolean
    IO ()

-- | Specifies whether /@widget@/ can be a default widget. See
-- 'GI.Gtk.Objects.Widget.widgetGrabDefault' for details about the meaning of
-- “default”.
-- 
-- /Since: 2.18/
widgetSetCanDefault ::
    (B.CallStack.HasCallStack, MonadIO m, IsWidget a) =>
    a
    -- ^ /@widget@/: a t'GI.Gtk.Objects.Widget.Widget'
    -> Bool
    -- ^ /@canDefault@/: whether or not /@widget@/ can be a default widget.
    -> m ()
widgetSetCanDefault :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsWidget a) =>
a -> Bool -> m ()
widgetSetCanDefault a
widget Bool
canDefault = 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 canDefault' :: CInt
canDefault' = (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
canDefault
    Ptr Widget -> CInt -> IO ()
gtk_widget_set_can_default Ptr Widget
widget' CInt
canDefault'
    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 WidgetSetCanDefaultMethodInfo
instance (signature ~ (Bool -> m ()), MonadIO m, IsWidget a) => O.OverloadedMethod WidgetSetCanDefaultMethodInfo a signature where
    overloadedMethod = widgetSetCanDefault

instance O.OverloadedMethodInfo WidgetSetCanDefaultMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Gtk.Objects.Widget.widgetSetCanDefault",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-3.0.38/docs/GI-Gtk-Objects-Widget.html#v:widgetSetCanDefault"
        })


#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. See
-- 'GI.Gtk.Objects.Widget.widgetGrabFocus' for actually setting the input focus on a
-- widget.
-- 
-- /Since: 2.18/
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 :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsWidget a) =>
a -> Bool -> m ()
widgetSetCanFocus a
widget 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.OverloadedMethod WidgetSetCanFocusMethodInfo a signature where
    overloadedMethod = widgetSetCanFocus

instance O.OverloadedMethodInfo WidgetSetCanFocusMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Gtk.Objects.Widget.widgetSetCanFocus",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-3.0.38/docs/GI-Gtk-Objects-Widget.html#v:widgetSetCanFocus"
        })


#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 = "is_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 ->                                 -- is_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
    -- ^ /@isVisible@/: if 'P.True', /@widget@/ should be mapped along with its parent.
    -> m ()
widgetSetChildVisible :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsWidget a) =>
a -> Bool -> m ()
widgetSetChildVisible a
widget Bool
isVisible = 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 isVisible' :: CInt
isVisible' = (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
isVisible
    Ptr Widget -> CInt -> IO ()
gtk_widget_set_child_visible Ptr Widget
widget' CInt
isVisible'
    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.OverloadedMethod WidgetSetChildVisibleMethodInfo a signature where
    overloadedMethod = widgetSetChildVisible

instance O.OverloadedMethodInfo WidgetSetChildVisibleMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Gtk.Objects.Widget.widgetSetChildVisible",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-3.0.38/docs/GI-Gtk-Objects-Widget.html#v:widgetSetChildVisible"
        })


#endif

-- method Widget::set_clip
-- 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 = "clip"
--           , argType =
--               TInterface Name { namespace = "Gdk" , name = "Rectangle" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a pointer to a #GtkAllocation to copy 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_widget_set_clip" gtk_widget_set_clip :: 
    Ptr Widget ->                           -- widget : TInterface (Name {namespace = "Gtk", name = "Widget"})
    Ptr Gdk.Rectangle.Rectangle ->          -- clip : TInterface (Name {namespace = "Gdk", name = "Rectangle"})
    IO ()

-- | Sets the widget’s clip.  This must not be used directly,
-- but from within a widget’s size_allocate method.
-- It must be called after 'GI.Gtk.Objects.Widget.widgetSetAllocation' (or after chaining up
-- to the parent class), because that function resets the clip.
-- 
-- The clip set should be the area that /@widget@/ draws on. If /@widget@/ is a
-- t'GI.Gtk.Objects.Container.Container', the area must contain all children\'s clips.
-- 
-- If this function is not called by /@widget@/ during a [sizeAllocate](#g:signal:sizeAllocate) handler,
-- the clip will be set to /@widget@/\'s allocation.
-- 
-- /Since: 3.14/
widgetSetClip ::
    (B.CallStack.HasCallStack, MonadIO m, IsWidget a) =>
    a
    -- ^ /@widget@/: a t'GI.Gtk.Objects.Widget.Widget'
    -> Gdk.Rectangle.Rectangle
    -- ^ /@clip@/: a pointer to a @/GtkAllocation/@ to copy from
    -> m ()
widgetSetClip :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsWidget a) =>
a -> Rectangle -> m ()
widgetSetClip a
widget Rectangle
clip = 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
clip' <- Rectangle -> IO (Ptr Rectangle)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr Rectangle
clip
    Ptr Widget -> Ptr Rectangle -> IO ()
gtk_widget_set_clip Ptr Widget
widget' Ptr Rectangle
clip'
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
widget
    WidgetSizeAllocateCallback
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr Rectangle
clip
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()

#if defined(ENABLE_OVERLOADING)
data WidgetSetClipMethodInfo
instance (signature ~ (Gdk.Rectangle.Rectangle -> m ()), MonadIO m, IsWidget a) => O.OverloadedMethod WidgetSetClipMethodInfo a signature where
    overloadedMethod = widgetSetClip

instance O.OverloadedMethodInfo WidgetSetClipMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Gtk.Objects.Widget.widgetSetClip",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-3.0.38/docs/GI-Gtk-Objects-Widget.html#v:widgetSetClip"
        })


#endif

-- method Widget::set_composite_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 "the name to set" , 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_composite_name" gtk_widget_set_composite_name :: 
    Ptr Widget ->                           -- widget : TInterface (Name {namespace = "Gtk", name = "Widget"})
    CString ->                              -- name : TBasicType TUTF8
    IO ()

{-# DEPRECATED widgetSetCompositeName ["(Since version 3.10)","Use 'GI.Gtk.Structs.WidgetClass.widgetClassSetTemplate', or don\8217t use this API at all."] #-}
-- | Sets a widgets composite name. The widget must be
-- a composite child of its parent; see 'GI.Gtk.Objects.Widget.widgetPushCompositeChild'.
widgetSetCompositeName ::
    (B.CallStack.HasCallStack, MonadIO m, IsWidget a) =>
    a
    -- ^ /@widget@/: a t'GI.Gtk.Objects.Widget.Widget'.
    -> T.Text
    -- ^ /@name@/: the name to set
    -> m ()
widgetSetCompositeName :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsWidget a) =>
a -> Text -> m ()
widgetSetCompositeName a
widget 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_composite_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 WidgetSetCompositeNameMethodInfo
instance (signature ~ (T.Text -> m ()), MonadIO m, IsWidget a) => O.OverloadedMethod WidgetSetCompositeNameMethodInfo a signature where
    overloadedMethod = widgetSetCompositeName

instance O.OverloadedMethodInfo WidgetSetCompositeNameMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Gtk.Objects.Widget.widgetSetCompositeName",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-3.0.38/docs/GI-Gtk-Objects-Widget.html#v:widgetSetCompositeName"
        })


#endif

-- method Widget::set_device_enabled
-- 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
--           }
--       , Arg
--           { argCName = "enabled"
--           , argType = TBasicType TBoolean
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "whether to enable the device"
--                 , 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_device_enabled" gtk_widget_set_device_enabled :: 
    Ptr Widget ->                           -- widget : TInterface (Name {namespace = "Gtk", name = "Widget"})
    Ptr Gdk.Device.Device ->                -- device : TInterface (Name {namespace = "Gdk", name = "Device"})
    CInt ->                                 -- enabled : TBasicType TBoolean
    IO ()

-- | Enables or disables a t'GI.Gdk.Objects.Device.Device' to interact with /@widget@/
-- and all its children.
-- 
-- It does so by descending through the t'GI.Gdk.Objects.Window.Window' hierarchy
-- and enabling the same mask that is has for core events
-- (i.e. the one that 'GI.Gdk.Objects.Window.windowGetEvents' returns).
-- 
-- /Since: 3.0/
widgetSetDeviceEnabled ::
    (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'
    -> Bool
    -- ^ /@enabled@/: whether to enable the device
    -> m ()
widgetSetDeviceEnabled :: forall (m :: * -> *) a b.
(HasCallStack, MonadIO m, IsWidget a, IsDevice b) =>
a -> b -> Bool -> m ()
widgetSetDeviceEnabled a
widget b
device Bool
enabled = 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 Device
device' <- b -> IO (Ptr Device)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
device
    let enabled' :: CInt
enabled' = (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
enabled
    Ptr Widget -> Ptr Device -> CInt -> IO ()
gtk_widget_set_device_enabled Ptr Widget
widget' Ptr Device
device' CInt
enabled'
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
widget
    b -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr b
device
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()

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

instance O.OverloadedMethodInfo WidgetSetDeviceEnabledMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Gtk.Objects.Widget.widgetSetDeviceEnabled",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-3.0.38/docs/GI-Gtk-Objects-Widget.html#v:widgetSetDeviceEnabled"
        })


#endif

-- method Widget::set_device_events
-- 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
--           }
--       , Arg
--           { argCName = "events"
--           , argType =
--               TInterface Name { namespace = "Gdk" , name = "EventMask" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "event mask" , 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_device_events" gtk_widget_set_device_events :: 
    Ptr Widget ->                           -- widget : TInterface (Name {namespace = "Gtk", name = "Widget"})
    Ptr Gdk.Device.Device ->                -- device : TInterface (Name {namespace = "Gdk", name = "Device"})
    CUInt ->                                -- events : TInterface (Name {namespace = "Gdk", name = "EventMask"})
    IO ()

-- | Sets the device event mask (see t'GI.Gdk.Flags.EventMask') for a widget. The event
-- mask determines which events a widget will receive from /@device@/. Keep
-- in mind that different widgets have different default event masks, and by
-- changing the event mask you may disrupt a widget’s functionality,
-- so be careful. This function must be called while a widget is
-- unrealized. Consider 'GI.Gtk.Objects.Widget.widgetAddDeviceEvents' for widgets that are
-- already realized, or if you want to preserve the existing event
-- mask. This function can’t be used with windowless widgets (which return
-- 'P.False' from 'GI.Gtk.Objects.Widget.widgetGetHasWindow');
-- to get events on those widgets, place them inside a t'GI.Gtk.Objects.EventBox.EventBox'
-- and receive events on the event box.
-- 
-- /Since: 3.0/
widgetSetDeviceEvents ::
    (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'
    -> [Gdk.Flags.EventMask]
    -- ^ /@events@/: event mask
    -> m ()
widgetSetDeviceEvents :: forall (m :: * -> *) a b.
(HasCallStack, MonadIO m, IsWidget a, IsDevice b) =>
a -> b -> [EventMask] -> m ()
widgetSetDeviceEvents a
widget b
device [EventMask]
events = 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 Device
device' <- b -> IO (Ptr Device)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
device
    let events' :: CUInt
events' = [EventMask] -> CUInt
forall b a. (Num b, IsGFlag a) => [a] -> b
gflagsToWord [EventMask]
events
    Ptr Widget -> Ptr Device -> CUInt -> IO ()
gtk_widget_set_device_events Ptr Widget
widget' Ptr Device
device' CUInt
events'
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
widget
    b -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr b
device
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()

#if defined(ENABLE_OVERLOADING)
data WidgetSetDeviceEventsMethodInfo
instance (signature ~ (b -> [Gdk.Flags.EventMask] -> m ()), MonadIO m, IsWidget a, Gdk.Device.IsDevice b) => O.OverloadedMethod WidgetSetDeviceEventsMethodInfo a signature where
    overloadedMethod = widgetSetDeviceEvents

instance O.OverloadedMethodInfo WidgetSetDeviceEventsMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Gtk.Objects.Widget.widgetSetDeviceEvents",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-3.0.38/docs/GI-Gtk-Objects-Widget.html#v:widgetSetDeviceEvents"
        })


#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 :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsWidget a) =>
a -> TextDirection -> m ()
widgetSetDirection a
widget 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.OverloadedMethod WidgetSetDirectionMethodInfo a signature where
    overloadedMethod = widgetSetDirection

instance O.OverloadedMethodInfo WidgetSetDirectionMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Gtk.Objects.Widget.widgetSetDirection",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-3.0.38/docs/GI-Gtk-Objects-Widget.html#v:widgetSetDirection"
        })


#endif

-- method Widget::set_double_buffered
-- 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 = "double_buffered"
--           , argType = TBasicType TBoolean
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "%TRUE to double-buffer a 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_double_buffered" gtk_widget_set_double_buffered :: 
    Ptr Widget ->                           -- widget : TInterface (Name {namespace = "Gtk", name = "Widget"})
    CInt ->                                 -- double_buffered : TBasicType TBoolean
    IO ()

{-# DEPRECATED widgetSetDoubleBuffered ["(Since version 3.14)","This function does not work under non-X11 backends or with","non-native windows.","It should not be used in newly written code."] #-}
-- | Widgets are double buffered by default; you can use this function
-- to turn off the buffering. “Double buffered” simply means that
-- 'GI.Gdk.Objects.Window.windowBeginDrawFrame' and 'GI.Gdk.Objects.Window.windowEndDrawFrame' are called
-- automatically around expose events sent to the
-- widget. 'GI.Gdk.Objects.Window.windowBeginDrawFrame' diverts all drawing to a widget\'s
-- window to an offscreen buffer, and 'GI.Gdk.Objects.Window.windowEndDrawFrame' draws the
-- buffer to the screen. The result is that users see the window
-- update in one smooth step, and don’t see individual graphics
-- primitives being rendered.
-- 
-- In very simple terms, double buffered widgets don’t flicker,
-- so you would only use this function to turn off double buffering
-- if you had special needs and really knew what you were doing.
-- 
-- Note: if you turn off double-buffering, you have to handle
-- expose events, since even the clearing to the background color or
-- pixmap will not happen automatically (as it is done in
-- 'GI.Gdk.Objects.Window.windowBeginDrawFrame').
-- 
-- In 3.10 GTK and GDK have been restructured for translucent drawing. Since
-- then expose events for double-buffered widgets are culled into a single
-- event to the toplevel GDK window. If you now unset double buffering, you
-- will cause a separate rendering pass for every widget. This will likely
-- cause rendering problems - in particular related to stacking - and usually
-- increases rendering times significantly.
widgetSetDoubleBuffered ::
    (B.CallStack.HasCallStack, MonadIO m, IsWidget a) =>
    a
    -- ^ /@widget@/: a t'GI.Gtk.Objects.Widget.Widget'
    -> Bool
    -- ^ /@doubleBuffered@/: 'P.True' to double-buffer a widget
    -> m ()
widgetSetDoubleBuffered :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsWidget a) =>
a -> Bool -> m ()
widgetSetDoubleBuffered a
widget Bool
doubleBuffered = 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 doubleBuffered' :: CInt
doubleBuffered' = (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
doubleBuffered
    Ptr Widget -> CInt -> IO ()
gtk_widget_set_double_buffered Ptr Widget
widget' CInt
doubleBuffered'
    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 WidgetSetDoubleBufferedMethodInfo
instance (signature ~ (Bool -> m ()), MonadIO m, IsWidget a) => O.OverloadedMethod WidgetSetDoubleBufferedMethodInfo a signature where
    overloadedMethod = widgetSetDoubleBuffered

instance O.OverloadedMethodInfo WidgetSetDoubleBufferedMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Gtk.Objects.Widget.widgetSetDoubleBuffered",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-3.0.38/docs/GI-Gtk-Objects-Widget.html#v:widgetSetDoubleBuffered"
        })


#endif

-- method Widget::set_events
-- 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 = "events"
--           , argType =
--               TInterface Name { namespace = "Gdk" , name = "EventMask" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "event mask" , 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_events" gtk_widget_set_events :: 
    Ptr Widget ->                           -- widget : TInterface (Name {namespace = "Gtk", name = "Widget"})
    CUInt ->                                -- events : TInterface (Name {namespace = "Gdk", name = "EventMask"})
    IO ()

-- | Sets the event mask (see t'GI.Gdk.Flags.EventMask') for a widget. The event
-- mask determines which events a widget will receive. Keep in mind
-- that different widgets have different default event masks, and by
-- changing the event mask you may disrupt a widget’s functionality,
-- so be careful. This function must be called while a widget is
-- unrealized. Consider 'GI.Gtk.Objects.Widget.widgetAddEvents' for widgets that are
-- already realized, or if you want to preserve the existing event
-- mask. This function can’t be used with widgets that have no window.
-- (See 'GI.Gtk.Objects.Widget.widgetGetHasWindow').  To get events on those widgets,
-- place them inside a t'GI.Gtk.Objects.EventBox.EventBox' and receive events on the event
-- box.
widgetSetEvents ::
    (B.CallStack.HasCallStack, MonadIO m, IsWidget a) =>
    a
    -- ^ /@widget@/: a t'GI.Gtk.Objects.Widget.Widget'
    -> [Gdk.Flags.EventMask]
    -- ^ /@events@/: event mask
    -> m ()
widgetSetEvents :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsWidget a) =>
a -> [EventMask] -> m ()
widgetSetEvents a
widget [EventMask]
events = 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 events' :: CUInt
events' = [EventMask] -> CUInt
forall b a. (Num b, IsGFlag a) => [a] -> b
gflagsToWord [EventMask]
events
    Ptr Widget -> CUInt -> IO ()
gtk_widget_set_events Ptr Widget
widget' CUInt
events'
    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 WidgetSetEventsMethodInfo
instance (signature ~ ([Gdk.Flags.EventMask] -> m ()), MonadIO m, IsWidget a) => O.OverloadedMethod WidgetSetEventsMethodInfo a signature where
    overloadedMethod = widgetSetEvents

instance O.OverloadedMethodInfo WidgetSetEventsMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Gtk.Objects.Widget.widgetSetEvents",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-3.0.38/docs/GI-Gtk-Objects-Widget.html#v:widgetSetEvents"
        })


#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.
-- 
-- /Since: 3.20/
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 :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsWidget a) =>
a -> Bool -> m ()
widgetSetFocusOnClick a
widget 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.OverloadedMethod WidgetSetFocusOnClickMethodInfo a signature where
    overloadedMethod = widgetSetFocusOnClick

instance O.OverloadedMethodInfo WidgetSetFocusOnClickMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Gtk.Objects.Widget.widgetSetFocusOnClick",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-3.0.38/docs/GI-Gtk-Objects-Widget.html#v: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.
-- 
-- /Since: 3.18/
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 :: forall (m :: * -> *) a b.
(HasCallStack, MonadIO m, IsWidget a, IsFontMap b) =>
a -> Maybe b -> m ()
widgetSetFontMap a
widget 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
        Maybe b
Nothing -> Ptr FontMap -> IO (Ptr FontMap)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr FontMap
forall a. Ptr a
nullPtr
        Just 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.OverloadedMethod WidgetSetFontMapMethodInfo a signature where
    overloadedMethod = widgetSetFontMap

instance O.OverloadedMethodInfo WidgetSetFontMapMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Gtk.Objects.Widget.widgetSetFontMap",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-3.0.38/docs/GI-Gtk-Objects-Widget.html#v: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.Screen.Screen' will be used.
-- 
-- /Since: 3.18/
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 :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsWidget a) =>
a -> Maybe FontOptions -> m ()
widgetSetFontOptions a
widget 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
        Maybe FontOptions
Nothing -> Ptr FontOptions -> IO (Ptr FontOptions)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr FontOptions
forall a. Ptr a
nullPtr
        Just 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.OverloadedMethod WidgetSetFontOptionsMethodInfo a signature where
    overloadedMethod = widgetSetFontOptions

instance O.OverloadedMethodInfo WidgetSetFontOptionsMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Gtk.Objects.Widget.widgetSetFontOptions",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-3.0.38/docs/GI-Gtk-Objects-Widget.html#v: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 :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsWidget a) =>
a -> Align -> m ()
widgetSetHalign a
widget 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.OverloadedMethod WidgetSetHalignMethodInfo a signature where
    overloadedMethod = widgetSetHalign

instance O.OverloadedMethodInfo WidgetSetHalignMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Gtk.Objects.Widget.widgetSetHalign",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-3.0.38/docs/GI-Gtk-Objects-Widget.html#v:widgetSetHalign"
        })


#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.
-- 
-- /Since: 2.12/
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 :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsWidget a) =>
a -> Bool -> m ()
widgetSetHasTooltip a
widget 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.OverloadedMethod WidgetSetHasTooltipMethodInfo a signature where
    overloadedMethod = widgetSetHasTooltip

instance O.OverloadedMethodInfo WidgetSetHasTooltipMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Gtk.Objects.Widget.widgetSetHasTooltip",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-3.0.38/docs/GI-Gtk-Objects-Widget.html#v:widgetSetHasTooltip"
        })


#endif

-- method Widget::set_has_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 = "has_window"
--           , argType = TBasicType TBoolean
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "whether or not @widget has a window."
--                 , 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_window" gtk_widget_set_has_window :: 
    Ptr Widget ->                           -- widget : TInterface (Name {namespace = "Gtk", name = "Widget"})
    CInt ->                                 -- has_window : TBasicType TBoolean
    IO ()

-- | Specifies whether /@widget@/ has a t'GI.Gdk.Objects.Window.Window' of its own. Note that
-- all realized widgets have a non-'P.Nothing' “window” pointer
-- ('GI.Gtk.Objects.Widget.widgetGetWindow' never returns a 'P.Nothing' window when a widget
-- is realized), but for many of them it’s actually the t'GI.Gdk.Objects.Window.Window' of
-- one of its parent widgets. Widgets that do not create a @/window/@ for
-- themselves in [realize]("GI.Gtk.Objects.Widget#g:signal:realize") must announce this by
-- calling this function with /@hasWindow@/ = 'P.False'.
-- 
-- This function should only be called by widget implementations,
-- and they should call it in their @/init()/@ function.
-- 
-- /Since: 2.18/
widgetSetHasWindow ::
    (B.CallStack.HasCallStack, MonadIO m, IsWidget a) =>
    a
    -- ^ /@widget@/: a t'GI.Gtk.Objects.Widget.Widget'
    -> Bool
    -- ^ /@hasWindow@/: whether or not /@widget@/ has a window.
    -> m ()
widgetSetHasWindow :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsWidget a) =>
a -> Bool -> m ()
widgetSetHasWindow a
widget Bool
hasWindow = 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 hasWindow' :: CInt
hasWindow' = (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
hasWindow
    Ptr Widget -> CInt -> IO ()
gtk_widget_set_has_window Ptr Widget
widget' CInt
hasWindow'
    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 WidgetSetHasWindowMethodInfo
instance (signature ~ (Bool -> m ()), MonadIO m, IsWidget a) => O.OverloadedMethod WidgetSetHasWindowMethodInfo a signature where
    overloadedMethod = widgetSetHasWindow

instance O.OverloadedMethodInfo WidgetSetHasWindowMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Gtk.Objects.Widget.widgetSetHasWindow",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-3.0.38/docs/GI-Gtk-Objects-Widget.html#v:widgetSetHasWindow"
        })


#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 :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsWidget a) =>
a -> Bool -> m ()
widgetSetHexpand a
widget 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.OverloadedMethod WidgetSetHexpandMethodInfo a signature where
    overloadedMethod = widgetSetHexpand

instance O.OverloadedMethodInfo WidgetSetHexpandMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Gtk.Objects.Widget.widgetSetHexpand",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-3.0.38/docs/GI-Gtk-Objects-Widget.html#v: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 :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsWidget a) =>
a -> Bool -> m ()
widgetSetHexpandSet a
widget 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.OverloadedMethod WidgetSetHexpandSetMethodInfo a signature where
    overloadedMethod = widgetSetHexpandSet

instance O.OverloadedMethodInfo WidgetSetHexpandSetMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Gtk.Objects.Widget.widgetSetHexpandSet",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-3.0.38/docs/GI-Gtk-Objects-Widget.html#v:widgetSetHexpandSet"
        })


#endif

-- method Widget::set_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
--           }
--       , Arg
--           { argCName = "mapped"
--           , argType = TBasicType TBoolean
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "%TRUE to mark the widget as mapped"
--                 , 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_mapped" gtk_widget_set_mapped :: 
    Ptr Widget ->                           -- widget : TInterface (Name {namespace = "Gtk", name = "Widget"})
    CInt ->                                 -- mapped : TBasicType TBoolean
    IO ()

-- | Marks the widget as being mapped.
-- 
-- This function should only ever be called in a derived widget\'s
-- “map” or “unmap” implementation.
-- 
-- /Since: 2.20/
widgetSetMapped ::
    (B.CallStack.HasCallStack, MonadIO m, IsWidget a) =>
    a
    -- ^ /@widget@/: a t'GI.Gtk.Objects.Widget.Widget'
    -> Bool
    -- ^ /@mapped@/: 'P.True' to mark the widget as mapped
    -> m ()
widgetSetMapped :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsWidget a) =>
a -> Bool -> m ()
widgetSetMapped a
widget Bool
mapped = 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 mapped' :: CInt
mapped' = (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
mapped
    Ptr Widget -> CInt -> IO ()
gtk_widget_set_mapped Ptr Widget
widget' CInt
mapped'
    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 WidgetSetMappedMethodInfo
instance (signature ~ (Bool -> m ()), MonadIO m, IsWidget a) => O.OverloadedMethod WidgetSetMappedMethodInfo a signature where
    overloadedMethod = widgetSetMapped

instance O.OverloadedMethodInfo WidgetSetMappedMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Gtk.Objects.Widget.widgetSetMapped",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-3.0.38/docs/GI-Gtk-Objects-Widget.html#v:widgetSetMapped"
        })


#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.
-- 
-- /Since: 3.0/
widgetSetMarginBottom ::
    (B.CallStack.HasCallStack, MonadIO m, IsWidget a) =>
    a
    -- ^ /@widget@/: a t'GI.Gtk.Objects.Widget.Widget'
    -> Int32
    -- ^ /@margin@/: the bottom margin
    -> m ()
widgetSetMarginBottom :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsWidget a) =>
a -> Int32 -> m ()
widgetSetMarginBottom a
widget 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.OverloadedMethod WidgetSetMarginBottomMethodInfo a signature where
    overloadedMethod = widgetSetMarginBottom

instance O.OverloadedMethodInfo WidgetSetMarginBottomMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Gtk.Objects.Widget.widgetSetMarginBottom",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-3.0.38/docs/GI-Gtk-Objects-Widget.html#v: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.
-- 
-- /Since: 3.12/
widgetSetMarginEnd ::
    (B.CallStack.HasCallStack, MonadIO m, IsWidget a) =>
    a
    -- ^ /@widget@/: a t'GI.Gtk.Objects.Widget.Widget'
    -> Int32
    -- ^ /@margin@/: the end margin
    -> m ()
widgetSetMarginEnd :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsWidget a) =>
a -> Int32 -> m ()
widgetSetMarginEnd a
widget 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.OverloadedMethod WidgetSetMarginEndMethodInfo a signature where
    overloadedMethod = widgetSetMarginEnd

instance O.OverloadedMethodInfo WidgetSetMarginEndMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Gtk.Objects.Widget.widgetSetMarginEnd",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-3.0.38/docs/GI-Gtk-Objects-Widget.html#v:widgetSetMarginEnd"
        })


#endif

-- method Widget::set_margin_left
-- 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 left 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_left" gtk_widget_set_margin_left :: 
    Ptr Widget ->                           -- widget : TInterface (Name {namespace = "Gtk", name = "Widget"})
    Int32 ->                                -- margin : TBasicType TInt
    IO ()

{-# DEPRECATED widgetSetMarginLeft ["(Since version 3.12)","Use 'GI.Gtk.Objects.Widget.widgetSetMarginStart' instead."] #-}
-- | Sets the left margin of /@widget@/.
-- See the t'GI.Gtk.Objects.Widget.Widget':@/margin-left/@ property.
-- 
-- /Since: 3.0/
widgetSetMarginLeft ::
    (B.CallStack.HasCallStack, MonadIO m, IsWidget a) =>
    a
    -- ^ /@widget@/: a t'GI.Gtk.Objects.Widget.Widget'
    -> Int32
    -- ^ /@margin@/: the left margin
    -> m ()
widgetSetMarginLeft :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsWidget a) =>
a -> Int32 -> m ()
widgetSetMarginLeft a
widget 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_left 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 WidgetSetMarginLeftMethodInfo
instance (signature ~ (Int32 -> m ()), MonadIO m, IsWidget a) => O.OverloadedMethod WidgetSetMarginLeftMethodInfo a signature where
    overloadedMethod = widgetSetMarginLeft

instance O.OverloadedMethodInfo WidgetSetMarginLeftMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Gtk.Objects.Widget.widgetSetMarginLeft",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-3.0.38/docs/GI-Gtk-Objects-Widget.html#v:widgetSetMarginLeft"
        })


#endif

-- method Widget::set_margin_right
-- 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 right 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_right" gtk_widget_set_margin_right :: 
    Ptr Widget ->                           -- widget : TInterface (Name {namespace = "Gtk", name = "Widget"})
    Int32 ->                                -- margin : TBasicType TInt
    IO ()

{-# DEPRECATED widgetSetMarginRight ["(Since version 3.12)","Use 'GI.Gtk.Objects.Widget.widgetSetMarginEnd' instead."] #-}
-- | Sets the right margin of /@widget@/.
-- See the t'GI.Gtk.Objects.Widget.Widget':@/margin-right/@ property.
-- 
-- /Since: 3.0/
widgetSetMarginRight ::
    (B.CallStack.HasCallStack, MonadIO m, IsWidget a) =>
    a
    -- ^ /@widget@/: a t'GI.Gtk.Objects.Widget.Widget'
    -> Int32
    -- ^ /@margin@/: the right margin
    -> m ()
widgetSetMarginRight :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsWidget a) =>
a -> Int32 -> m ()
widgetSetMarginRight a
widget 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_right 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 WidgetSetMarginRightMethodInfo
instance (signature ~ (Int32 -> m ()), MonadIO m, IsWidget a) => O.OverloadedMethod WidgetSetMarginRightMethodInfo a signature where
    overloadedMethod = widgetSetMarginRight

instance O.OverloadedMethodInfo WidgetSetMarginRightMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Gtk.Objects.Widget.widgetSetMarginRight",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-3.0.38/docs/GI-Gtk-Objects-Widget.html#v:widgetSetMarginRight"
        })


#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.
-- 
-- /Since: 3.12/
widgetSetMarginStart ::
    (B.CallStack.HasCallStack, MonadIO m, IsWidget a) =>
    a
    -- ^ /@widget@/: a t'GI.Gtk.Objects.Widget.Widget'
    -> Int32
    -- ^ /@margin@/: the start margin
    -> m ()
widgetSetMarginStart :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsWidget a) =>
a -> Int32 -> m ()
widgetSetMarginStart a
widget 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.OverloadedMethod WidgetSetMarginStartMethodInfo a signature where
    overloadedMethod = widgetSetMarginStart

instance O.OverloadedMethodInfo WidgetSetMarginStartMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Gtk.Objects.Widget.widgetSetMarginStart",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-3.0.38/docs/GI-Gtk-Objects-Widget.html#v: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.
-- 
-- /Since: 3.0/
widgetSetMarginTop ::
    (B.CallStack.HasCallStack, MonadIO m, IsWidget a) =>
    a
    -- ^ /@widget@/: a t'GI.Gtk.Objects.Widget.Widget'
    -> Int32
    -- ^ /@margin@/: the top margin
    -> m ()
widgetSetMarginTop :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsWidget a) =>
a -> Int32 -> m ()
widgetSetMarginTop a
widget 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.OverloadedMethod WidgetSetMarginTopMethodInfo a signature where
    overloadedMethod = widgetSetMarginTop

instance O.OverloadedMethodInfo WidgetSetMarginTopMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Gtk.Objects.Widget.widgetSetMarginTop",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-3.0.38/docs/GI-Gtk-Objects-Widget.html#v: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 :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsWidget a) =>
a -> Text -> m ()
widgetSetName a
widget 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.OverloadedMethod WidgetSetNameMethodInfo a signature where
    overloadedMethod = widgetSetName

instance O.OverloadedMethodInfo WidgetSetNameMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Gtk.Objects.Widget.widgetSetName",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-3.0.38/docs/GI-Gtk-Objects-Widget.html#v:widgetSetName"
        })


#endif

-- method Widget::set_no_show_all
-- 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 = "no_show_all"
--           , argType = TBasicType TBoolean
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText =
--                     Just "the new value for the \8220no-show-all\8221 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_no_show_all" gtk_widget_set_no_show_all :: 
    Ptr Widget ->                           -- widget : TInterface (Name {namespace = "Gtk", name = "Widget"})
    CInt ->                                 -- no_show_all : TBasicType TBoolean
    IO ()

-- | Sets the t'GI.Gtk.Objects.Widget.Widget':@/no-show-all/@ property, which determines whether
-- calls to 'GI.Gtk.Objects.Widget.widgetShowAll' will affect this widget.
-- 
-- This is mostly for use in constructing widget hierarchies with externally
-- controlled visibility, see t'GI.Gtk.Objects.UIManager.UIManager'.
-- 
-- /Since: 2.4/
widgetSetNoShowAll ::
    (B.CallStack.HasCallStack, MonadIO m, IsWidget a) =>
    a
    -- ^ /@widget@/: a t'GI.Gtk.Objects.Widget.Widget'
    -> Bool
    -- ^ /@noShowAll@/: the new value for the “no-show-all” property
    -> m ()
widgetSetNoShowAll :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsWidget a) =>
a -> Bool -> m ()
widgetSetNoShowAll a
widget Bool
noShowAll = 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 noShowAll' :: CInt
noShowAll' = (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
noShowAll
    Ptr Widget -> CInt -> IO ()
gtk_widget_set_no_show_all Ptr Widget
widget' CInt
noShowAll'
    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 WidgetSetNoShowAllMethodInfo
instance (signature ~ (Bool -> m ()), MonadIO m, IsWidget a) => O.OverloadedMethod WidgetSetNoShowAllMethodInfo a signature where
    overloadedMethod = widgetSetNoShowAll

instance O.OverloadedMethodInfo WidgetSetNoShowAllMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Gtk.Objects.Widget.widgetSetNoShowAll",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-3.0.38/docs/GI-Gtk-Objects-Widget.html#v:widgetSetNoShowAll"
        })


#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 screens with a compositing manager
-- running. See 'GI.Gtk.Objects.Widget.widgetIsComposited'. 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, or
-- disables double buffering.
-- 
-- /Since: 3.8/
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 :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsWidget a) =>
a -> Double -> m ()
widgetSetOpacity a
widget 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.OverloadedMethod WidgetSetOpacityMethodInfo a signature where
    overloadedMethod = widgetSetOpacity

instance O.OverloadedMethodInfo WidgetSetOpacityMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Gtk.Objects.Widget.widgetSetOpacity",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-3.0.38/docs/GI-Gtk-Objects-Widget.html#v:widgetSetOpacity"
        })


#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 container" , 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.Container.Container'.
-- Sets the container as the parent of /@widget@/, and takes care of
-- some details such as updating the state and style of the child
-- to reflect its new location. 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 container
    -> m ()
widgetSetParent :: forall (m :: * -> *) a b.
(HasCallStack, MonadIO m, IsWidget a, IsWidget b) =>
a -> b -> m ()
widgetSetParent a
widget 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.OverloadedMethod WidgetSetParentMethodInfo a signature where
    overloadedMethod = widgetSetParent

instance O.OverloadedMethodInfo WidgetSetParentMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Gtk.Objects.Widget.widgetSetParent",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-3.0.38/docs/GI-Gtk-Objects-Widget.html#v:widgetSetParent"
        })


#endif

-- method Widget::set_parent_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 = "parent_window"
--           , argType = TInterface Name { namespace = "Gdk" , name = "Window" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "the new parent window."
--                 , 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_window" gtk_widget_set_parent_window :: 
    Ptr Widget ->                           -- widget : TInterface (Name {namespace = "Gtk", name = "Widget"})
    Ptr Gdk.Window.Window ->                -- parent_window : TInterface (Name {namespace = "Gdk", name = "Window"})
    IO ()

-- | Sets a non default parent window for /@widget@/.
-- 
-- For t'GI.Gtk.Objects.Window.Window' classes, setting a /@parentWindow@/ effects whether
-- the window is a toplevel window or can be embedded into other
-- widgets.
-- 
-- For t'GI.Gtk.Objects.Window.Window' classes, this needs to be called before the
-- window is realized.
widgetSetParentWindow ::
    (B.CallStack.HasCallStack, MonadIO m, IsWidget a, Gdk.Window.IsWindow b) =>
    a
    -- ^ /@widget@/: a t'GI.Gtk.Objects.Widget.Widget'.
    -> b
    -- ^ /@parentWindow@/: the new parent window.
    -> m ()
widgetSetParentWindow :: forall (m :: * -> *) a b.
(HasCallStack, MonadIO m, IsWidget a, IsWindow b) =>
a -> b -> m ()
widgetSetParentWindow a
widget b
parentWindow = 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
parentWindow' <- b -> IO (Ptr Window)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
parentWindow
    Ptr Widget -> Ptr Window -> IO ()
gtk_widget_set_parent_window Ptr Widget
widget' Ptr Window
parentWindow'
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
widget
    b -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr b
parentWindow
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()

#if defined(ENABLE_OVERLOADING)
data WidgetSetParentWindowMethodInfo
instance (signature ~ (b -> m ()), MonadIO m, IsWidget a, Gdk.Window.IsWindow b) => O.OverloadedMethod WidgetSetParentWindowMethodInfo a signature where
    overloadedMethod = widgetSetParentWindow

instance O.OverloadedMethodInfo WidgetSetParentWindowMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Gtk.Objects.Widget.widgetSetParentWindow",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-3.0.38/docs/GI-Gtk-Objects-Widget.html#v:widgetSetParentWindow"
        })


#endif

-- method Widget::set_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
--           }
--       , Arg
--           { argCName = "realized"
--           , argType = TBasicType TBoolean
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "%TRUE to mark the widget as realized"
--                 , 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_realized" gtk_widget_set_realized :: 
    Ptr Widget ->                           -- widget : TInterface (Name {namespace = "Gtk", name = "Widget"})
    CInt ->                                 -- realized : TBasicType TBoolean
    IO ()

-- | Marks the widget as being realized. This function must only be
-- called after all @/GdkWindows/@ for the /@widget@/ have been created
-- and registered.
-- 
-- This function should only ever be called in a derived widget\'s
-- “realize” or “unrealize” implementation.
-- 
-- /Since: 2.20/
widgetSetRealized ::
    (B.CallStack.HasCallStack, MonadIO m, IsWidget a) =>
    a
    -- ^ /@widget@/: a t'GI.Gtk.Objects.Widget.Widget'
    -> Bool
    -- ^ /@realized@/: 'P.True' to mark the widget as realized
    -> m ()
widgetSetRealized :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsWidget a) =>
a -> Bool -> m ()
widgetSetRealized a
widget Bool
realized = 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 realized' :: CInt
realized' = (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
realized
    Ptr Widget -> CInt -> IO ()
gtk_widget_set_realized Ptr Widget
widget' CInt
realized'
    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 WidgetSetRealizedMethodInfo
instance (signature ~ (Bool -> m ()), MonadIO m, IsWidget a) => O.OverloadedMethod WidgetSetRealizedMethodInfo a signature where
    overloadedMethod = widgetSetRealized

instance O.OverloadedMethodInfo WidgetSetRealizedMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Gtk.Objects.Widget.widgetSetRealized",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-3.0.38/docs/GI-Gtk-Objects-Widget.html#v:widgetSetRealized"
        })


#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.
-- 
-- See 'GI.Gtk.Objects.Widget.widgetGrabDefault' for details about the meaning of
-- “default”.
-- 
-- /Since: 2.18/
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 :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsWidget a) =>
a -> Bool -> m ()
widgetSetReceivesDefault a
widget 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.OverloadedMethod WidgetSetReceivesDefaultMethodInfo a signature where
    overloadedMethod = widgetSetReceivesDefault

instance O.OverloadedMethodInfo WidgetSetReceivesDefaultMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Gtk.Objects.Widget.widgetSetReceivesDefault",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-3.0.38/docs/GI-Gtk-Objects-Widget.html#v:widgetSetReceivesDefault"
        })


#endif

-- method Widget::set_redraw_on_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 = "redraw_on_allocate"
--           , argType = TBasicType TBoolean
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText =
--                     Just
--                       "if %TRUE, the entire widget will be redrawn\n  when it is allocated to a new size. Otherwise, only the\n  new portion of the widget will be redrawn."
--                 , 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_redraw_on_allocate" gtk_widget_set_redraw_on_allocate :: 
    Ptr Widget ->                           -- widget : TInterface (Name {namespace = "Gtk", name = "Widget"})
    CInt ->                                 -- redraw_on_allocate : TBasicType TBoolean
    IO ()

-- | Sets whether the entire widget is queued for drawing when its size
-- allocation changes. By default, this setting is 'P.True' and
-- the entire widget is redrawn on every size change. If your widget
-- leaves the upper left unchanged when made bigger, turning this
-- setting off will improve performance.
-- 
-- Note that for widgets where 'GI.Gtk.Objects.Widget.widgetGetHasWindow' is 'P.False'
-- setting this flag to 'P.False' turns off all allocation on resizing:
-- the widget will not even redraw if its position changes; this is to
-- allow containers that don’t draw anything to avoid excess
-- invalidations. If you set this flag on a widget with no window that
-- does draw on /@widget@/->window, you are
-- responsible for invalidating both the old and new allocation of the
-- widget when the widget is moved and responsible for invalidating
-- regions newly when the widget increases size.
widgetSetRedrawOnAllocate ::
    (B.CallStack.HasCallStack, MonadIO m, IsWidget a) =>
    a
    -- ^ /@widget@/: a t'GI.Gtk.Objects.Widget.Widget'
    -> Bool
    -- ^ /@redrawOnAllocate@/: if 'P.True', the entire widget will be redrawn
    --   when it is allocated to a new size. Otherwise, only the
    --   new portion of the widget will be redrawn.
    -> m ()
widgetSetRedrawOnAllocate :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsWidget a) =>
a -> Bool -> m ()
widgetSetRedrawOnAllocate a
widget Bool
redrawOnAllocate = 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 redrawOnAllocate' :: CInt
redrawOnAllocate' = (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
redrawOnAllocate
    Ptr Widget -> CInt -> IO ()
gtk_widget_set_redraw_on_allocate Ptr Widget
widget' CInt
redrawOnAllocate'
    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 WidgetSetRedrawOnAllocateMethodInfo
instance (signature ~ (Bool -> m ()), MonadIO m, IsWidget a) => O.OverloadedMethod WidgetSetRedrawOnAllocateMethodInfo a signature where
    overloadedMethod = widgetSetRedrawOnAllocate

instance O.OverloadedMethodInfo WidgetSetRedrawOnAllocateMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Gtk.Objects.Widget.widgetSetRedrawOnAllocate",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-3.0.38/docs/GI-Gtk-Objects-Widget.html#v:widgetSetRedrawOnAllocate"
        })


#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 :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsWidget a) =>
a -> Bool -> m ()
widgetSetSensitive a
widget 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.OverloadedMethod WidgetSetSensitiveMethodInfo a signature where
    overloadedMethod = widgetSetSensitive

instance O.OverloadedMethodInfo WidgetSetSensitiveMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Gtk.Objects.Widget.widgetSetSensitive",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-3.0.38/docs/GI-Gtk-Objects-Widget.html#v: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,
-- 'GI.Gtk.Objects.Window.windowSetGeometryHints' 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 :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsWidget a) =>
a -> Int32 -> Int32 -> m ()
widgetSetSizeRequest a
widget Int32
width 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.OverloadedMethod WidgetSetSizeRequestMethodInfo a signature where
    overloadedMethod = widgetSetSizeRequest

instance O.OverloadedMethodInfo WidgetSetSizeRequestMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Gtk.Objects.Widget.widgetSetSizeRequest",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-3.0.38/docs/GI-Gtk-Objects-Widget.html#v:widgetSetSizeRequest"
        })


#endif

-- method Widget::set_state
-- 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 = "state"
--           , argType =
--               TInterface Name { namespace = "Gtk" , name = "StateType" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "new state 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_state" gtk_widget_set_state :: 
    Ptr Widget ->                           -- widget : TInterface (Name {namespace = "Gtk", name = "Widget"})
    CUInt ->                                -- state : TInterface (Name {namespace = "Gtk", name = "StateType"})
    IO ()

{-# DEPRECATED widgetSetState ["(Since version 3.0)","Use 'GI.Gtk.Objects.Widget.widgetSetStateFlags' instead."] #-}
-- | This function is for use in widget implementations. Sets the state
-- of a widget (insensitive, prelighted, etc.) Usually you should set
-- the state using wrapper functions such as 'GI.Gtk.Objects.Widget.widgetSetSensitive'.
widgetSetState ::
    (B.CallStack.HasCallStack, MonadIO m, IsWidget a) =>
    a
    -- ^ /@widget@/: a t'GI.Gtk.Objects.Widget.Widget'
    -> Gtk.Enums.StateType
    -- ^ /@state@/: new state for /@widget@/
    -> m ()
widgetSetState :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsWidget a) =>
a -> StateType -> m ()
widgetSetState a
widget StateType
state = 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 state' :: CUInt
state' = (Int -> CUInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CUInt) -> (StateType -> Int) -> StateType -> CUInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. StateType -> Int
forall a. Enum a => a -> Int
fromEnum) StateType
state
    Ptr Widget -> CUInt -> IO ()
gtk_widget_set_state Ptr Widget
widget' CUInt
state'
    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 WidgetSetStateMethodInfo
instance (signature ~ (Gtk.Enums.StateType -> m ()), MonadIO m, IsWidget a) => O.OverloadedMethod WidgetSetStateMethodInfo a signature where
    overloadedMethod = widgetSetState

instance O.OverloadedMethodInfo WidgetSetStateMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Gtk.Objects.Widget.widgetSetState",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-3.0.38/docs/GI-Gtk-Objects-Widget.html#v:widgetSetState"
        })


#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.
-- 
-- /Since: 3.0/
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 :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsWidget a) =>
a -> [StateFlags] -> Bool -> m ()
widgetSetStateFlags a
widget [StateFlags]
flags 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.OverloadedMethod WidgetSetStateFlagsMethodInfo a signature where
    overloadedMethod = widgetSetStateFlags

instance O.OverloadedMethodInfo WidgetSetStateFlagsMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Gtk.Objects.Widget.widgetSetStateFlags",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-3.0.38/docs/GI-Gtk-Objects-Widget.html#v:widgetSetStateFlags"
        })


#endif

-- method Widget::set_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
--           }
--       , Arg
--           { argCName = "style"
--           , argType = TInterface Name { namespace = "Gtk" , name = "Style" }
--           , direction = DirectionIn
--           , mayBeNull = True
--           , argDoc =
--               Documentation
--                 { rawDocText =
--                     Just
--                       "a #GtkStyle, or %NULL to remove the effect\n    of a previous call to gtk_widget_set_style() and go back to\n    the default style"
--                 , 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_style" gtk_widget_set_style :: 
    Ptr Widget ->                           -- widget : TInterface (Name {namespace = "Gtk", name = "Widget"})
    Ptr Gtk.Style.Style ->                  -- style : TInterface (Name {namespace = "Gtk", name = "Style"})
    IO ()

{-# DEPRECATED widgetSetStyle ["(Since version 3.0)","Use t'GI.Gtk.Objects.StyleContext.StyleContext' instead"] #-}
-- | Used to set the t'GI.Gtk.Objects.Style.Style' for a widget (/@widget@/->style). Since
-- GTK 3, this function does nothing, the passed in style is ignored.
widgetSetStyle ::
    (B.CallStack.HasCallStack, MonadIO m, IsWidget a, Gtk.Style.IsStyle b) =>
    a
    -- ^ /@widget@/: a t'GI.Gtk.Objects.Widget.Widget'
    -> Maybe (b)
    -- ^ /@style@/: a t'GI.Gtk.Objects.Style.Style', or 'P.Nothing' to remove the effect
    --     of a previous call to 'GI.Gtk.Objects.Widget.widgetSetStyle' and go back to
    --     the default style
    -> m ()
widgetSetStyle :: forall (m :: * -> *) a b.
(HasCallStack, MonadIO m, IsWidget a, IsStyle b) =>
a -> Maybe b -> m ()
widgetSetStyle a
widget Maybe b
style = 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 Style
maybeStyle <- case Maybe b
style of
        Maybe b
Nothing -> Ptr Style -> IO (Ptr Style)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr Style
forall a. Ptr a
nullPtr
        Just b
jStyle -> do
            Ptr Style
jStyle' <- b -> IO (Ptr Style)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
jStyle
            Ptr Style -> IO (Ptr Style)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr Style
jStyle'
    Ptr Widget -> Ptr Style -> IO ()
gtk_widget_set_style Ptr Widget
widget' Ptr Style
maybeStyle
    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
style b -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()

#if defined(ENABLE_OVERLOADING)
data WidgetSetStyleMethodInfo
instance (signature ~ (Maybe (b) -> m ()), MonadIO m, IsWidget a, Gtk.Style.IsStyle b) => O.OverloadedMethod WidgetSetStyleMethodInfo a signature where
    overloadedMethod = widgetSetStyle

instance O.OverloadedMethodInfo WidgetSetStyleMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Gtk.Objects.Widget.widgetSetStyle",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-3.0.38/docs/GI-Gtk-Objects-Widget.html#v:widgetSetStyle"
        })


#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 @/GdkWindows/@ are created in [realize]("GI.Gtk.Objects.Widget#g:signal:realize"),
-- 'GI.Gdk.Objects.Window.windowSetSupportMultidevice' will have to be called manually on them.
-- 
-- /Since: 3.0/
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 :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsWidget a) =>
a -> Bool -> m ()
widgetSetSupportMultidevice a
widget 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.OverloadedMethod WidgetSetSupportMultideviceMethodInfo a signature where
    overloadedMethod = widgetSetSupportMultidevice

instance O.OverloadedMethodInfo WidgetSetSupportMultideviceMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Gtk.Objects.Widget.widgetSetSupportMultidevice",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-3.0.38/docs/GI-Gtk-Objects-Widget.html#v:widgetSetSupportMultidevice"
        })


#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#g:signal:queryTooltip") signal.
-- 
-- See also the t'GI.Gtk.Objects.Widget.Widget':@/tooltip-markup/@ property and
-- 'GI.Gtk.Objects.Tooltip.tooltipSetMarkup'.
-- 
-- /Since: 2.12/
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 :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsWidget a) =>
a -> Maybe Text -> m ()
widgetSetTooltipMarkup a
widget 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
        Maybe Text
Nothing -> CString -> IO CString
forall (m :: * -> *) a. Monad m => a -> m a
return CString
forall a. Ptr a
nullPtr
        Just 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.OverloadedMethod WidgetSetTooltipMarkupMethodInfo a signature where
    overloadedMethod = widgetSetTooltipMarkup

instance O.OverloadedMethodInfo WidgetSetTooltipMarkupMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Gtk.Objects.Widget.widgetSetTooltipMarkup",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-3.0.38/docs/GI-Gtk-Objects-Widget.html#v: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#g:signal:queryTooltip") signal.
-- 
-- See also the t'GI.Gtk.Objects.Widget.Widget':@/tooltip-text/@ property and 'GI.Gtk.Objects.Tooltip.tooltipSetText'.
-- 
-- /Since: 2.12/
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 :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsWidget a) =>
a -> Maybe Text -> m ()
widgetSetTooltipText a
widget 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
        Maybe Text
Nothing -> CString -> IO CString
forall (m :: * -> *) a. Monad m => a -> m a
return CString
forall a. Ptr a
nullPtr
        Just 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.OverloadedMethod WidgetSetTooltipTextMethodInfo a signature where
    overloadedMethod = widgetSetTooltipText

instance O.OverloadedMethodInfo WidgetSetTooltipTextMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Gtk.Objects.Widget.widgetSetTooltipText",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-3.0.38/docs/GI-Gtk-Objects-Widget.html#v: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.
-- 
-- /Since: 2.12/
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 :: forall (m :: * -> *) a b.
(HasCallStack, MonadIO m, IsWidget a, IsWindow b) =>
a -> Maybe b -> m ()
widgetSetTooltipWindow a
widget 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
        Maybe b
Nothing -> Ptr Window -> IO (Ptr Window)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr Window
forall a. Ptr a
nullPtr
        Just 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.OverloadedMethod WidgetSetTooltipWindowMethodInfo a signature where
    overloadedMethod = widgetSetTooltipWindow

instance O.OverloadedMethodInfo WidgetSetTooltipWindowMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Gtk.Objects.Widget.widgetSetTooltipWindow",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-3.0.38/docs/GI-Gtk-Objects-Widget.html#v: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 :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsWidget a) =>
a -> Align -> m ()
widgetSetValign a
widget 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.OverloadedMethod WidgetSetValignMethodInfo a signature where
    overloadedMethod = widgetSetValign

instance O.OverloadedMethodInfo WidgetSetValignMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Gtk.Objects.Widget.widgetSetValign",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-3.0.38/docs/GI-Gtk-Objects-Widget.html#v: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 :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsWidget a) =>
a -> Bool -> m ()
widgetSetVexpand a
widget 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.OverloadedMethod WidgetSetVexpandMethodInfo a signature where
    overloadedMethod = widgetSetVexpand

instance O.OverloadedMethodInfo WidgetSetVexpandMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Gtk.Objects.Widget.widgetSetVexpand",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-3.0.38/docs/GI-Gtk-Objects-Widget.html#v: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 :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsWidget a) =>
a -> Bool -> m ()
widgetSetVexpandSet a
widget 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.OverloadedMethod WidgetSetVexpandSetMethodInfo a signature where
    overloadedMethod = widgetSetVexpandSet

instance O.OverloadedMethodInfo WidgetSetVexpandSetMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Gtk.Objects.Widget.widgetSetVexpandSet",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-3.0.38/docs/GI-Gtk-Objects-Widget.html#v: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.
-- 
-- /Since: 2.18/
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 :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsWidget a) =>
a -> Bool -> m ()
widgetSetVisible a
widget 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.OverloadedMethod WidgetSetVisibleMethodInfo a signature where
    overloadedMethod = widgetSetVisible

instance O.OverloadedMethodInfo WidgetSetVisibleMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Gtk.Objects.Widget.widgetSetVisible",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-3.0.38/docs/GI-Gtk-Objects-Widget.html#v:widgetSetVisible"
        })


#endif

-- method Widget::set_visual
-- 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 = "visual"
--           , argType = TInterface Name { namespace = "Gdk" , name = "Visual" }
--           , direction = DirectionIn
--           , mayBeNull = True
--           , argDoc =
--               Documentation
--                 { rawDocText =
--                     Just "visual to be used or %NULL to unset a previous one"
--                 , 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_visual" gtk_widget_set_visual :: 
    Ptr Widget ->                           -- widget : TInterface (Name {namespace = "Gtk", name = "Widget"})
    Ptr Gdk.Visual.Visual ->                -- visual : TInterface (Name {namespace = "Gdk", name = "Visual"})
    IO ()

-- | Sets the visual that should be used for by widget and its children for
-- creating @/GdkWindows/@. The visual must be on the same t'GI.Gdk.Objects.Screen.Screen' as
-- returned by 'GI.Gtk.Objects.Widget.widgetGetScreen', so handling the
-- [screenChanged]("GI.Gtk.Objects.Widget#g:signal:screenChanged") signal is necessary.
-- 
-- Setting a new /@visual@/ will not cause /@widget@/ to recreate its windows,
-- so you should call this function before /@widget@/ is realized.
widgetSetVisual ::
    (B.CallStack.HasCallStack, MonadIO m, IsWidget a, Gdk.Visual.IsVisual b) =>
    a
    -- ^ /@widget@/: a t'GI.Gtk.Objects.Widget.Widget'
    -> Maybe (b)
    -- ^ /@visual@/: visual to be used or 'P.Nothing' to unset a previous one
    -> m ()
widgetSetVisual :: forall (m :: * -> *) a b.
(HasCallStack, MonadIO m, IsWidget a, IsVisual b) =>
a -> Maybe b -> m ()
widgetSetVisual a
widget Maybe b
visual = 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 Visual
maybeVisual <- case Maybe b
visual of
        Maybe b
Nothing -> Ptr Visual -> IO (Ptr Visual)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr Visual
forall a. Ptr a
nullPtr
        Just b
jVisual -> do
            Ptr Visual
jVisual' <- b -> IO (Ptr Visual)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
jVisual
            Ptr Visual -> IO (Ptr Visual)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr Visual
jVisual'
    Ptr Widget -> Ptr Visual -> IO ()
gtk_widget_set_visual Ptr Widget
widget' Ptr Visual
maybeVisual
    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
visual b -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()

#if defined(ENABLE_OVERLOADING)
data WidgetSetVisualMethodInfo
instance (signature ~ (Maybe (b) -> m ()), MonadIO m, IsWidget a, Gdk.Visual.IsVisual b) => O.OverloadedMethod WidgetSetVisualMethodInfo a signature where
    overloadedMethod = widgetSetVisual

instance O.OverloadedMethodInfo WidgetSetVisualMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Gtk.Objects.Widget.widgetSetVisual",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-3.0.38/docs/GI-Gtk-Objects-Widget.html#v:widgetSetVisual"
        })


#endif

-- method Widget::set_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 = "window"
--           , argType = TInterface Name { namespace = "Gdk" , name = "Window" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #GdkWindow" , 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_window" gtk_widget_set_window :: 
    Ptr Widget ->                           -- widget : TInterface (Name {namespace = "Gtk", name = "Widget"})
    Ptr Gdk.Window.Window ->                -- window : TInterface (Name {namespace = "Gdk", name = "Window"})
    IO ()

-- | Sets a widget’s window. This function should only be used in a
-- widget’s [realize]("GI.Gtk.Objects.Widget#g:signal:realize") implementation. The @/window/@ passed is
-- usually either new window created with 'GI.Gdk.Objects.Window.windowNew', or the
-- window of its parent widget as returned by
-- 'GI.Gtk.Objects.Widget.widgetGetParentWindow'.
-- 
-- Widgets must indicate whether they will create their own t'GI.Gdk.Objects.Window.Window'
-- by calling 'GI.Gtk.Objects.Widget.widgetSetHasWindow'. This is usually done in the
-- widget’s @/init()/@ function.
-- 
-- Note that this function does not add any reference to /@window@/.
-- 
-- /Since: 2.18/
widgetSetWindow ::
    (B.CallStack.HasCallStack, MonadIO m, IsWidget a, Gdk.Window.IsWindow b) =>
    a
    -- ^ /@widget@/: a t'GI.Gtk.Objects.Widget.Widget'
    -> b
    -- ^ /@window@/: a t'GI.Gdk.Objects.Window.Window'
    -> m ()
widgetSetWindow :: forall (m :: * -> *) a b.
(HasCallStack, MonadIO m, IsWidget a, IsWindow b) =>
a -> b -> m ()
widgetSetWindow a
widget b
window = 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
window' <- b -> IO (Ptr Window)
forall a b. (HasCallStack, GObject a) => a -> IO (Ptr b)
B.ManagedPtr.disownObject b
window
    Ptr Widget -> Ptr Window -> IO ()
gtk_widget_set_window Ptr Widget
widget' Ptr Window
window'
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
widget
    b -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr b
window
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()

#if defined(ENABLE_OVERLOADING)
data WidgetSetWindowMethodInfo
instance (signature ~ (b -> m ()), MonadIO m, IsWidget a, Gdk.Window.IsWindow b) => O.OverloadedMethod WidgetSetWindowMethodInfo a signature where
    overloadedMethod = widgetSetWindow

instance O.OverloadedMethodInfo WidgetSetWindowMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Gtk.Objects.Widget.widgetSetWindow",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-3.0.38/docs/GI-Gtk-Objects-Widget.html#v:widgetSetWindow"
        })


#endif

-- method Widget::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_shape_combine_region" gtk_widget_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 a shape for this widget’s GDK window. This allows for
-- transparent windows etc., see 'GI.Gdk.Objects.Window.windowShapeCombineRegion'
-- for more information.
-- 
-- /Since: 3.0/
widgetShapeCombineRegion ::
    (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 ()
widgetShapeCombineRegion :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsWidget a) =>
a -> Maybe Region -> m ()
widgetShapeCombineRegion a
widget 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
        Maybe Region
Nothing -> Ptr Region -> IO (Ptr Region)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr Region
forall a. Ptr a
nullPtr
        Just 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_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 WidgetShapeCombineRegionMethodInfo
instance (signature ~ (Maybe (Cairo.Region.Region) -> m ()), MonadIO m, IsWidget a) => O.OverloadedMethod WidgetShapeCombineRegionMethodInfo a signature where
    overloadedMethod = widgetShapeCombineRegion

instance O.OverloadedMethodInfo WidgetShapeCombineRegionMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Gtk.Objects.Widget.widgetShapeCombineRegion",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-3.0.38/docs/GI-Gtk-Objects-Widget.html#v:widgetShapeCombineRegion"
        })


#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. If you want to show all the widgets in a
-- container, it’s easier to call 'GI.Gtk.Objects.Widget.widgetShowAll' on the
-- container, instead of individually showing the widgets.
-- 
-- 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 :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsWidget a) =>
a -> m ()
widgetShow 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.OverloadedMethod WidgetShowMethodInfo a signature where
    overloadedMethod = widgetShow

instance O.OverloadedMethodInfo WidgetShowMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Gtk.Objects.Widget.widgetShow",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-3.0.38/docs/GI-Gtk-Objects-Widget.html#v:widgetShow"
        })


#endif

-- method Widget::show_all
-- 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_all" gtk_widget_show_all :: 
    Ptr Widget ->                           -- widget : TInterface (Name {namespace = "Gtk", name = "Widget"})
    IO ()

-- | Recursively shows a widget, and any child widgets (if the widget is
-- a container).
widgetShowAll ::
    (B.CallStack.HasCallStack, MonadIO m, IsWidget a) =>
    a
    -- ^ /@widget@/: a t'GI.Gtk.Objects.Widget.Widget'
    -> m ()
widgetShowAll :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsWidget a) =>
a -> m ()
widgetShowAll 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_all 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 WidgetShowAllMethodInfo
instance (signature ~ (m ()), MonadIO m, IsWidget a) => O.OverloadedMethod WidgetShowAllMethodInfo a signature where
    overloadedMethod = widgetShowAll

instance O.OverloadedMethodInfo WidgetShowAllMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Gtk.Objects.Widget.widgetShowAll",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-3.0.38/docs/GI-Gtk-Objects-Widget.html#v:widgetShowAll"
        })


#endif

-- method Widget::show_now
-- 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_now" gtk_widget_show_now :: 
    Ptr Widget ->                           -- widget : TInterface (Name {namespace = "Gtk", name = "Widget"})
    IO ()

-- | Shows a widget. If the widget is an unmapped toplevel widget
-- (i.e. a t'GI.Gtk.Objects.Window.Window' that has not yet been shown), enter the main
-- loop and wait for the window to actually be mapped. Be careful;
-- because the main loop is running, anything can happen during
-- this function.
widgetShowNow ::
    (B.CallStack.HasCallStack, MonadIO m, IsWidget a) =>
    a
    -- ^ /@widget@/: a t'GI.Gtk.Objects.Widget.Widget'
    -> m ()
widgetShowNow :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsWidget a) =>
a -> m ()
widgetShowNow 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_now 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 WidgetShowNowMethodInfo
instance (signature ~ (m ()), MonadIO m, IsWidget a) => O.OverloadedMethod WidgetShowNowMethodInfo a signature where
    overloadedMethod = widgetShowNow

instance O.OverloadedMethodInfo WidgetShowNowMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Gtk.Objects.Widget.widgetShowNow",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-3.0.38/docs/GI-Gtk-Objects-Widget.html#v:widgetShowNow"
        })


#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
--           }
--       ]
-- 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"})
    IO ()

-- | This function is only used by t'GI.Gtk.Objects.Container.Container' subclasses, to assign a size
-- and position to their child widgets.
-- 
-- In this function, the allocation may be adjusted. It will be forced
-- to a 1x1 minimum size, and the adjust_size_allocation virtual
-- method on the child will be used to adjust the allocation. Standard
-- adjustments include removing the widget’s margins, and applying the
-- widget’s t'GI.Gtk.Objects.Widget.Widget':@/halign/@ and t'GI.Gtk.Objects.Widget.Widget':@/valign/@ properties.
-- 
-- For baseline support in containers you need to use 'GI.Gtk.Objects.Widget.widgetSizeAllocateWithBaseline'
-- instead.
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@/
    -> m ()
widgetSizeAllocate :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsWidget a) =>
a -> Rectangle -> m ()
widgetSizeAllocate a
widget Rectangle
allocation = 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 -> IO ()
gtk_widget_size_allocate Ptr Widget
widget' Ptr Rectangle
allocation'
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
widget
    WidgetSizeAllocateCallback
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 -> m ()), MonadIO m, IsWidget a) => O.OverloadedMethod WidgetSizeAllocateMethodInfo a signature where
    overloadedMethod = widgetSizeAllocate

instance O.OverloadedMethodInfo WidgetSizeAllocateMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Gtk.Objects.Widget.widgetSizeAllocate",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-3.0.38/docs/GI-Gtk-Objects-Widget.html#v:widgetSizeAllocate"
        })


#endif

-- method Widget::size_allocate_with_baseline
-- 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_with_baseline" gtk_widget_size_allocate_with_baseline :: 
    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 function is only used by t'GI.Gtk.Objects.Container.Container' subclasses, to assign a size,
-- position and (optionally) baseline to their child widgets.
-- 
-- In this function, the allocation and baseline may be adjusted. It
-- will be forced to a 1x1 minimum size, and the
-- adjust_size_allocation virtual and adjust_baseline_allocation
-- methods on the child will be used to adjust the allocation and
-- baseline. Standard adjustments include removing the widget\'s
-- margins, and applying the widget’s t'GI.Gtk.Objects.Widget.Widget':@/halign/@ and
-- t'GI.Gtk.Objects.Widget.Widget':@/valign/@ properties.
-- 
-- If the child widget does not have a valign of 'GI.Gtk.Enums.AlignBaseline' the
-- baseline argument is ignored and -1 is used instead.
-- 
-- /Since: 3.10/
widgetSizeAllocateWithBaseline ::
    (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 ()
widgetSizeAllocateWithBaseline :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsWidget a) =>
a -> Rectangle -> Int32 -> m ()
widgetSizeAllocateWithBaseline a
widget Rectangle
allocation 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_with_baseline Ptr Widget
widget' Ptr Rectangle
allocation' Int32
baseline
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
widget
    WidgetSizeAllocateCallback
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr Rectangle
allocation
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()

#if defined(ENABLE_OVERLOADING)
data WidgetSizeAllocateWithBaselineMethodInfo
instance (signature ~ (Gdk.Rectangle.Rectangle -> Int32 -> m ()), MonadIO m, IsWidget a) => O.OverloadedMethod WidgetSizeAllocateWithBaselineMethodInfo a signature where
    overloadedMethod = widgetSizeAllocateWithBaseline

instance O.OverloadedMethodInfo WidgetSizeAllocateWithBaselineMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Gtk.Objects.Widget.widgetSizeAllocateWithBaseline",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-3.0.38/docs/GI-Gtk-Objects-Widget.html#v:widgetSizeAllocateWithBaseline"
        })


#endif

-- method Widget::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 = "requisition"
--           , argType =
--               TInterface Name { namespace = "Gtk" , name = "Requisition" }
--           , direction = DirectionOut
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #GtkRequisition to be filled in"
--                 , 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_size_request" gtk_widget_size_request :: 
    Ptr Widget ->                           -- widget : TInterface (Name {namespace = "Gtk", name = "Widget"})
    Ptr Gtk.Requisition.Requisition ->      -- requisition : TInterface (Name {namespace = "Gtk", name = "Requisition"})
    IO ()

{-# DEPRECATED widgetSizeRequest ["(Since version 3.0)","Use 'GI.Gtk.Objects.Widget.widgetGetPreferredSize' instead."] #-}
-- | This function is typically used when implementing a t'GI.Gtk.Objects.Container.Container'
-- subclass.  Obtains the preferred size of a widget. The container
-- uses this information to arrange its child widgets and decide what
-- size allocations to give them with 'GI.Gtk.Objects.Widget.widgetSizeAllocate'.
-- 
-- You can also call this function from an application, with some
-- caveats. Most notably, getting a size request requires the widget
-- to be associated with a screen, because font information may be
-- needed. Multihead-aware applications should keep this in mind.
-- 
-- Also remember that the size request is not necessarily the size
-- a widget will actually be allocated.
widgetSizeRequest ::
    (B.CallStack.HasCallStack, MonadIO m, IsWidget a) =>
    a
    -- ^ /@widget@/: a t'GI.Gtk.Objects.Widget.Widget'
    -> m (Gtk.Requisition.Requisition)
widgetSizeRequest :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsWidget a) =>
a -> m Requisition
widgetSizeRequest a
widget = IO Requisition -> m Requisition
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Requisition -> m Requisition)
-> IO Requisition -> m 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
requisition <- Int -> IO (Ptr Requisition)
forall a. GBoxed a => Int -> IO (Ptr a)
SP.callocBoxedBytes Int
8 :: IO (Ptr Gtk.Requisition.Requisition)
    Ptr Widget -> Ptr Requisition -> IO ()
gtk_widget_size_request Ptr Widget
widget' Ptr Requisition
requisition
    Requisition
requisition' <- ((ManagedPtr Requisition -> Requisition)
-> Ptr Requisition -> IO Requisition
forall a.
(HasCallStack, GBoxed a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
wrapBoxed ManagedPtr Requisition -> Requisition
Gtk.Requisition.Requisition) Ptr Requisition
requisition
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
widget
    Requisition -> IO Requisition
forall (m :: * -> *) a. Monad m => a -> m a
return Requisition
requisition'

#if defined(ENABLE_OVERLOADING)
data WidgetSizeRequestMethodInfo
instance (signature ~ (m (Gtk.Requisition.Requisition)), MonadIO m, IsWidget a) => O.OverloadedMethod WidgetSizeRequestMethodInfo a signature where
    overloadedMethod = widgetSizeRequest

instance O.OverloadedMethodInfo WidgetSizeRequestMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Gtk.Objects.Widget.widgetSizeRequest",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-3.0.38/docs/GI-Gtk-Objects-Widget.html#v:widgetSizeRequest"
        })


#endif

-- method Widget::style_attach
-- 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_style_attach" gtk_widget_style_attach :: 
    Ptr Widget ->                           -- widget : TInterface (Name {namespace = "Gtk", name = "Widget"})
    IO ()

{-# DEPRECATED widgetStyleAttach ["(Since version 3.0)","This step is unnecessary with t'GI.Gtk.Objects.StyleContext.StyleContext'."] #-}
-- | This function attaches the widget’s t'GI.Gtk.Objects.Style.Style' to the widget\'s
-- t'GI.Gdk.Objects.Window.Window'. It is a replacement for
-- 
-- >
-- >widget->style = gtk_style_attach (widget->style, widget->window);
-- 
-- 
-- and should only ever be called in a derived widget’s “realize”
-- implementation which does not chain up to its parent class\'
-- “realize” implementation, because one of the parent classes
-- (finally t'GI.Gtk.Objects.Widget.Widget') would attach the style itself.
-- 
-- /Since: 2.20/
widgetStyleAttach ::
    (B.CallStack.HasCallStack, MonadIO m, IsWidget a) =>
    a
    -- ^ /@widget@/: a t'GI.Gtk.Objects.Widget.Widget'
    -> m ()
widgetStyleAttach :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsWidget a) =>
a -> m ()
widgetStyleAttach 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_style_attach 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 WidgetStyleAttachMethodInfo
instance (signature ~ (m ()), MonadIO m, IsWidget a) => O.OverloadedMethod WidgetStyleAttachMethodInfo a signature where
    overloadedMethod = widgetStyleAttach

instance O.OverloadedMethodInfo WidgetStyleAttachMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Gtk.Objects.Widget.widgetStyleAttach",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-3.0.38/docs/GI-Gtk-Objects-Widget.html#v:widgetStyleAttach"
        })


#endif

-- method Widget::style_get_property
-- 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 = "property_name"
--           , argType = TBasicType TUTF8
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "the name of a style property"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "value"
--           , argType = TGValue
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "location to return the property value"
--                 , 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_style_get_property" gtk_widget_style_get_property :: 
    Ptr Widget ->                           -- widget : TInterface (Name {namespace = "Gtk", name = "Widget"})
    CString ->                              -- property_name : TBasicType TUTF8
    Ptr GValue ->                           -- value : TGValue
    IO ()

-- | Gets the value of a style property of /@widget@/.
widgetStyleGetProperty ::
    (B.CallStack.HasCallStack, MonadIO m, IsWidget a) =>
    a
    -- ^ /@widget@/: a t'GI.Gtk.Objects.Widget.Widget'
    -> T.Text
    -- ^ /@propertyName@/: the name of a style property
    -> GValue
    -- ^ /@value@/: location to return the property value
    -> m ()
widgetStyleGetProperty :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsWidget a) =>
a -> Text -> GValue -> m ()
widgetStyleGetProperty a
widget Text
propertyName GValue
value = 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
propertyName' <- Text -> IO CString
textToCString Text
propertyName
    Ptr GValue
value' <- GValue -> IO (Ptr GValue)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr GValue
value
    Ptr Widget -> CString -> Ptr GValue -> IO ()
gtk_widget_style_get_property Ptr Widget
widget' CString
propertyName' Ptr GValue
value'
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
widget
    GValue -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr GValue
value
    CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
propertyName'
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()

#if defined(ENABLE_OVERLOADING)
data WidgetStyleGetPropertyMethodInfo
instance (signature ~ (T.Text -> GValue -> m ()), MonadIO m, IsWidget a) => O.OverloadedMethod WidgetStyleGetPropertyMethodInfo a signature where
    overloadedMethod = widgetStyleGetProperty

instance O.OverloadedMethodInfo WidgetStyleGetPropertyMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Gtk.Objects.Widget.widgetStyleGetProperty",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-3.0.38/docs/GI-Gtk-Objects-Widget.html#v:widgetStyleGetProperty"
        })


#endif

-- method Widget::thaw_child_notify
-- 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_thaw_child_notify" gtk_widget_thaw_child_notify :: 
    Ptr Widget ->                           -- widget : TInterface (Name {namespace = "Gtk", name = "Widget"})
    IO ()

-- | Reverts the effect of a previous call to 'GI.Gtk.Objects.Widget.widgetFreezeChildNotify'.
-- This causes all queued [childNotify]("GI.Gtk.Objects.Widget#g:signal:childNotify") signals on /@widget@/ to be
-- emitted.
widgetThawChildNotify ::
    (B.CallStack.HasCallStack, MonadIO m, IsWidget a) =>
    a
    -- ^ /@widget@/: a t'GI.Gtk.Objects.Widget.Widget'
    -> m ()
widgetThawChildNotify :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsWidget a) =>
a -> m ()
widgetThawChildNotify 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_thaw_child_notify 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 WidgetThawChildNotifyMethodInfo
instance (signature ~ (m ()), MonadIO m, IsWidget a) => O.OverloadedMethod WidgetThawChildNotifyMethodInfo a signature where
    overloadedMethod = widgetThawChildNotify

instance O.OverloadedMethodInfo WidgetThawChildNotifyMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Gtk.Objects.Widget.widgetThawChildNotify",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-3.0.38/docs/GI-Gtk-Objects-Widget.html#v:widgetThawChildNotify"
        })


#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 widgets must be realized, and 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 either widget was not realized, or there
    --   was no common ancestor. In this case, nothing is stored in
    --   */@destX@/ and */@destY@/. Otherwise 'P.True'.
widgetTranslateCoordinates :: forall (m :: * -> *) a b.
(HasCallStack, MonadIO m, IsWidget a, IsWidget b) =>
a -> b -> Int32 -> Int32 -> m (Bool, Int32, Int32)
widgetTranslateCoordinates a
srcWidget b
destWidget Int32
srcX 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
/= CInt
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.OverloadedMethod WidgetTranslateCoordinatesMethodInfo a signature where
    overloadedMethod = widgetTranslateCoordinates

instance O.OverloadedMethodInfo WidgetTranslateCoordinatesMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Gtk.Objects.Widget.widgetTranslateCoordinates",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-3.0.38/docs/GI-Gtk-Objects-Widget.html#v: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 'GI.Gtk.Objects.Tooltip.tooltipTriggerTooltipQuery' for more
-- information.
-- 
-- /Since: 2.12/
widgetTriggerTooltipQuery ::
    (B.CallStack.HasCallStack, MonadIO m, IsWidget a) =>
    a
    -- ^ /@widget@/: a t'GI.Gtk.Objects.Widget.Widget'
    -> m ()
widgetTriggerTooltipQuery :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsWidget a) =>
a -> m ()
widgetTriggerTooltipQuery 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.OverloadedMethod WidgetTriggerTooltipQueryMethodInfo a signature where
    overloadedMethod = widgetTriggerTooltipQuery

instance O.OverloadedMethodInfo WidgetTriggerTooltipQueryMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Gtk.Objects.Widget.widgetTriggerTooltipQuery",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-3.0.38/docs/GI-Gtk-Objects-Widget.html#v: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 :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsWidget a) =>
a -> m ()
widgetUnmap 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.OverloadedMethod WidgetUnmapMethodInfo a signature where
    overloadedMethod = widgetUnmap

instance O.OverloadedMethodInfo WidgetUnmapMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Gtk.Objects.Widget.widgetUnmap",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-3.0.38/docs/GI-Gtk-Objects-Widget.html#v: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 implementations of the remove method
-- on t'GI.Gtk.Objects.Container.Container', to dissociate a child from the container.
widgetUnparent ::
    (B.CallStack.HasCallStack, MonadIO m, IsWidget a) =>
    a
    -- ^ /@widget@/: a t'GI.Gtk.Objects.Widget.Widget'
    -> m ()
widgetUnparent :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsWidget a) =>
a -> m ()
widgetUnparent 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.OverloadedMethod WidgetUnparentMethodInfo a signature where
    overloadedMethod = widgetUnparent

instance O.OverloadedMethodInfo WidgetUnparentMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Gtk.Objects.Widget.widgetUnparent",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-3.0.38/docs/GI-Gtk-Objects-Widget.html#v: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@/->window).
widgetUnrealize ::
    (B.CallStack.HasCallStack, MonadIO m, IsWidget a) =>
    a
    -- ^ /@widget@/: a t'GI.Gtk.Objects.Widget.Widget'
    -> m ()
widgetUnrealize :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsWidget a) =>
a -> m ()
widgetUnrealize 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.OverloadedMethod WidgetUnrealizeMethodInfo a signature where
    overloadedMethod = widgetUnrealize

instance O.OverloadedMethodInfo WidgetUnrealizeMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Gtk.Objects.Widget.widgetUnrealize",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-3.0.38/docs/GI-Gtk-Objects-Widget.html#v:widgetUnrealize"
        })


#endif

-- method Widget::unregister_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 = "window"
--           , argType = TInterface Name { namespace = "Gdk" , name = "Window" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #GdkWindow" , 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_window" gtk_widget_unregister_window :: 
    Ptr Widget ->                           -- widget : TInterface (Name {namespace = "Gtk", name = "Widget"})
    Ptr Gdk.Window.Window ->                -- window : TInterface (Name {namespace = "Gdk", name = "Window"})
    IO ()

-- | Unregisters a t'GI.Gdk.Objects.Window.Window' from the widget that was previously set up with
-- 'GI.Gtk.Objects.Widget.widgetRegisterWindow'. You need to call this when the window is
-- no longer used by the widget, such as when you destroy it.
-- 
-- /Since: 3.8/
widgetUnregisterWindow ::
    (B.CallStack.HasCallStack, MonadIO m, IsWidget a, Gdk.Window.IsWindow b) =>
    a
    -- ^ /@widget@/: a t'GI.Gtk.Objects.Widget.Widget'
    -> b
    -- ^ /@window@/: a t'GI.Gdk.Objects.Window.Window'
    -> m ()
widgetUnregisterWindow :: forall (m :: * -> *) a b.
(HasCallStack, MonadIO m, IsWidget a, IsWindow b) =>
a -> b -> m ()
widgetUnregisterWindow a
widget b
window = 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
window' <- b -> IO (Ptr Window)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
window
    Ptr Widget -> Ptr Window -> IO ()
gtk_widget_unregister_window Ptr Widget
widget' Ptr Window
window'
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
widget
    b -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr b
window
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()

#if defined(ENABLE_OVERLOADING)
data WidgetUnregisterWindowMethodInfo
instance (signature ~ (b -> m ()), MonadIO m, IsWidget a, Gdk.Window.IsWindow b) => O.OverloadedMethod WidgetUnregisterWindowMethodInfo a signature where
    overloadedMethod = widgetUnregisterWindow

instance O.OverloadedMethodInfo WidgetUnregisterWindowMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Gtk.Objects.Widget.widgetUnregisterWindow",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-3.0.38/docs/GI-Gtk-Objects-Widget.html#v:widgetUnregisterWindow"
        })


#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'.
-- 
-- /Since: 3.0/
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 :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsWidget a) =>
a -> [StateFlags] -> m ()
widgetUnsetStateFlags a
widget [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.OverloadedMethod WidgetUnsetStateFlagsMethodInfo a signature where
    overloadedMethod = widgetUnsetStateFlags

instance O.OverloadedMethodInfo WidgetUnsetStateFlagsMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Gtk.Objects.Widget.widgetUnsetStateFlags",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-3.0.38/docs/GI-Gtk-Objects-Widget.html#v: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 :: forall (m :: * -> *). (HasCallStack, MonadIO m) => 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::get_default_style
-- method type : MemberFunction
-- Args: []
-- Lengths: []
-- returnType: Just (TInterface Name { namespace = "Gtk" , name = "Style" })
-- throws : False
-- Skip return : False

foreign import ccall "gtk_widget_get_default_style" gtk_widget_get_default_style :: 
    IO (Ptr Gtk.Style.Style)

{-# DEPRECATED widgetGetDefaultStyle ["(Since version 3.0)","Use t'GI.Gtk.Objects.StyleContext.StyleContext' instead, and","    'GI.Gtk.Objects.CssProvider.cssProviderGetDefault' to obtain a t'GI.Gtk.Interfaces.StyleProvider.StyleProvider'","    with the default widget style information."] #-}
-- | Returns the default style used by all widgets initially.
widgetGetDefaultStyle ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    m Gtk.Style.Style
    -- ^ __Returns:__ the default style. This t'GI.Gtk.Objects.Style.Style'
    --     object is owned by GTK+ and should not be modified or freed.
widgetGetDefaultStyle :: forall (m :: * -> *). (HasCallStack, MonadIO m) => m Style
widgetGetDefaultStyle  = IO Style -> m Style
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Style -> m Style) -> IO Style -> m Style
forall a b. (a -> b) -> a -> b
$ do
    Ptr Style
result <- IO (Ptr Style)
gtk_widget_get_default_style
    Text -> Ptr Style -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"widgetGetDefaultStyle" Ptr Style
result
    Style
result' <- ((ManagedPtr Style -> Style) -> Ptr Style -> IO Style
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr Style -> Style
Gtk.Style.Style) Ptr Style
result
    Style -> IO Style
forall (m :: * -> *) a. Monad m => a -> m a
return Style
result'

#if defined(ENABLE_OVERLOADING)
#endif

-- method Widget::pop_composite_child
-- method type : MemberFunction
-- Args: []
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "gtk_widget_pop_composite_child" gtk_widget_pop_composite_child :: 
    IO ()

{-# DEPRECATED widgetPopCompositeChild ["(Since version 3.10)","Use 'GI.Gtk.Structs.WidgetClass.widgetClassSetTemplate', or don\8217t use this API at all."] #-}
-- | Cancels the effect of a previous call to 'GI.Gtk.Objects.Widget.widgetPushCompositeChild'.
widgetPopCompositeChild ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    m ()
widgetPopCompositeChild :: forall (m :: * -> *). (HasCallStack, MonadIO m) => m ()
widgetPopCompositeChild  = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    IO ()
gtk_widget_pop_composite_child
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()

#if defined(ENABLE_OVERLOADING)
#endif

-- method Widget::push_composite_child
-- method type : MemberFunction
-- Args: []
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "gtk_widget_push_composite_child" gtk_widget_push_composite_child :: 
    IO ()

{-# DEPRECATED widgetPushCompositeChild ["(Since version 3.10)","This API never really worked well and was mostly unused, now","we have a more complete mechanism for composite children, see 'GI.Gtk.Structs.WidgetClass.widgetClassSetTemplate'."] #-}
-- | Makes all newly-created widgets as composite children until
-- the corresponding 'GI.Gtk.Objects.Widget.widgetPopCompositeChild' call.
-- 
-- A composite child is a child that’s an implementation detail of the
-- container it’s inside and should not be visible to people using the
-- container. Composite children aren’t treated differently by GTK+ (but
-- see 'GI.Gtk.Objects.Container.containerForeach' vs. 'GI.Gtk.Objects.Container.containerForall'), but e.g. GUI
-- builders might want to treat them in a different way.
widgetPushCompositeChild ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    m ()
widgetPushCompositeChild :: forall (m :: * -> *). (HasCallStack, MonadIO m) => m ()
widgetPushCompositeChild  = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    IO ()
gtk_widget_push_composite_child
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()

#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 :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
TextDirection -> m ()
widgetSetDefaultDirection 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