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


-- | Copyright  : Will Thompson and Iñaki García Etxebarria
-- License    : LGPL-2.1
-- Maintainer : Iñaki García Etxebarria
-- 
-- The base class for all widgets.
-- 
-- It manages the widget lifecycle, layout, states and style.
-- 
-- === Height-for-width Geometry Management
-- 
-- GTK uses a height-for-width (and width-for-height) geometry management
-- system. Height-for-width means that a widget can change how much
-- vertical space it needs, depending on the amount of horizontal space
-- that it is given (and similar for width-for-height). The most common
-- example is a label that reflows to fill up the available width, wraps
-- to fewer lines, and therefore needs less height.
-- 
-- Height-for-width geometry management is implemented in GTK by way
-- of two virtual methods:
-- 
-- * t'GI.Gtk.Objects.Widget.Widget'.@/get_request_mode/@()
-- * t'GI.Gtk.Objects.Widget.Widget'.@/measure/@()
-- 
-- 
-- There are some important things to keep in mind when implementing
-- height-for-width and when using it in widget implementations.
-- 
-- If you implement a direct @GtkWidget@ subclass that supports
-- height-for-width or width-for-height geometry management for itself
-- or its child widgets, the t'GI.Gtk.Objects.Widget.Widget'.@/get_request_mode/@() virtual
-- function must be implemented as well and return the widget\'s preferred
-- request mode. The default implementation of this virtual function
-- returns 'GI.Gtk.Enums.SizeRequestModeConstantSize', which means that the widget will
-- only ever get -1 passed as the for_size value to its
-- t'GI.Gtk.Objects.Widget.Widget'.@/measure/@() implementation.
-- 
-- The geometry management system will query a widget hierarchy in
-- only one orientation at a time. When widgets are initially queried
-- for their minimum sizes it is generally done in two initial passes
-- in the t'GI.Gtk.Enums.SizeRequestMode' chosen by the toplevel.
-- 
-- For example, when queried in the normal 'GI.Gtk.Enums.SizeRequestModeHeightForWidth' mode:
-- 
-- First, the default minimum and natural width for each widget
-- in the interface will be computed using 'GI.Gtk.Objects.Widget.widgetMeasure' with an
-- orientation of 'GI.Gtk.Enums.OrientationHorizontal' and a for_size of -1.
-- Because the preferred widths for each widget depend on the preferred
-- widths of their children, this information propagates up the hierarchy,
-- and finally a minimum and natural width is determined for the entire
-- toplevel. Next, the toplevel will use the minimum width to query for the
-- minimum height contextual to that width using 'GI.Gtk.Objects.Widget.widgetMeasure' with an
-- orientation of 'GI.Gtk.Enums.OrientationVertical' and a for_size of the just computed
-- width. This will also be a highly recursive operation. The minimum height
-- for the minimum width is normally used to set the minimum size constraint
-- on the toplevel.
-- 
-- After the toplevel window has initially requested its size in both
-- dimensions it can go on to allocate itself a reasonable size (or a size
-- previously specified with 'GI.Gtk.Objects.Window.windowSetDefaultSize'). During the
-- recursive allocation process it’s important to note that request cycles
-- will be recursively executed while widgets allocate their children.
-- Each widget, once allocated a size, will go on to first share the
-- space in one orientation among its children and then request each child\'s
-- height for its target allocated width or its width for allocated height,
-- depending. In this way a 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, @GtkWidget@ caches a  small number of results
-- to avoid re-querying for the same sizes in one allocation cycle.
-- 
-- If a widget does move content around to intelligently use up the
-- allocated size then it must support the request in both
-- @GtkSizeRequestMode@s 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.Objects.Widget.Widget'.@/measure/@() with an orientation of
-- 'GI.Gtk.Enums.OrientationVertical' called because that call is specific to a
-- width-for-height request. In this case the label must return the height
-- required for its own minimum possible width. By following this rule any
-- widget that handles height-for-width or width-for-height requests will
-- always be allocated at least enough space to fit its own content.
-- 
-- Here are some examples of how a 'GI.Gtk.Enums.SizeRequestModeHeightForWidth' widget
-- generally deals with width-for-height requests:
-- 
-- 
-- === /c code/
-- >static void
-- >foo_widget_measure (GtkWidget      *widget,
-- >                    GtkOrientation  orientation,
-- >                    int             for_size,
-- >                    int            *minimum_size,
-- >                    int            *natural_size,
-- >                    int            *minimum_baseline,
-- >                    int            *natural_baseline)
-- >{
-- >  if (orientation == GTK_ORIENTATION_HORIZONTAL)
-- >    {
-- >      // Calculate minimum and natural width
-- >    }
-- >  else // VERTICAL
-- >    {
-- >      if (i_am_in_height_for_width_mode)
-- >        {
-- >          int min_width, dummy;
-- >
-- >          // First, get the minimum width of our widget
-- >          GTK_WIDGET_GET_CLASS (widget)->measure (widget, GTK_ORIENTATION_HORIZONTAL, -1,
-- >                                                  &min_width, &dummy, &dummy, &dummy);
-- >
-- >          // Now use the minimum width to retrieve the minimum and natural height to display
-- >          // that width.
-- >          GTK_WIDGET_GET_CLASS (widget)->measure (widget, GTK_ORIENTATION_VERTICAL, min_width,
-- >                                                  minimum_size, natural_size, &dummy, &dummy);
-- >        }
-- >      else
-- >        {
-- >          // ... some widgets do both.
-- >        }
-- >    }
-- >}
-- 
-- 
-- Often a widget needs to get its own request during size request or
-- allocation. For example, when computing height it may need to also
-- compute width. Or when deciding how to use an allocation, the widget
-- may need to know its natural size. In these cases, the widget should
-- be careful to call its virtual methods directly, like in the code
-- example above.
-- 
-- It will not work to use the wrapper function 'GI.Gtk.Objects.Widget.widgetMeasure'
-- inside your own t'GI.Gtk.Objects.Widget.Widget'.@/size_allocate/@() implementation.
-- These return a request adjusted by t'GI.Gtk.Objects.SizeGroup.SizeGroup', the widget\'s
-- align and expand flags, as well as its CSS style.
-- 
-- If a widget used the wrappers inside its virtual method implementations,
-- then the adjustments (such as widget margins) would be applied
-- twice. GTK therefore does not allow this and will warn if you try
-- to do it.
-- 
-- Of course if you are getting the size request for another widget, such
-- as a child widget, you must use 'GI.Gtk.Objects.Widget.widgetMeasure'; otherwise, you
-- would not properly consider widget margins, t'GI.Gtk.Objects.SizeGroup.SizeGroup', and
-- so forth.
-- 
-- GTK also supports baseline vertical alignment of widgets. This
-- means that widgets are positioned such that the typographical baseline of
-- widgets in the same row are aligned. This happens if a widget supports
-- baselines, has a vertical alignment using baselines, and is inside
-- a widget that supports baselines and has a natural “row” that it aligns to
-- the baseline, or a baseline assigned to it by the grandparent.
-- 
-- Baseline alignment support for a widget is also done by the
-- t'GI.Gtk.Objects.Widget.Widget'.@/measure/@() virtual function. It allows you to report
-- both a minimum and natural size.
-- 
-- 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.widgetGetBaseline'. If the baseline has a
-- value other than -1 you need to align the widget such that the baseline
-- appears at the position.
-- 
-- === GtkWidget as GtkBuildable
-- 
-- The @GtkWidget@ implementation of the @GtkBuildable@ interface
-- supports various custom elements to specify additional aspects of widgets
-- that are not directly expressed as properties.
-- 
-- If the widget uses a t'GI.Gtk.Objects.LayoutManager.LayoutManager', @GtkWidget@ supports
-- a custom @\<layout>@ element, used to define layout properties:
-- 
-- 
-- === /xml code/
-- ><object class="GtkGrid" id="my_grid">
-- >  <child>
-- >    <object class="GtkLabel" id="label1">
-- >      <property name="label">Description</property>
-- >      <layout>
-- >        <property name="column">0</property>
-- >        <property name="row">0</property>
-- >        <property name="row-span">1</property>
-- >        <property name="column-span">1</property>
-- >      </layout>
-- >    </object>
-- >  </child>
-- >  <child>
-- >    <object class="GtkEntry" id="description_entry">
-- >      <layout>
-- >        <property name="column">1</property>
-- >        <property name="row">0</property>
-- >        <property name="row-span">1</property>
-- >        <property name="column-span">1</property>
-- >      </layout>
-- >    </object>
-- >  </child>
-- ></object>
-- 
-- 
-- @GtkWidget@ allows style information such as style classes to
-- be associated with widgets, using the custom @\<style>@ element:
-- 
-- 
-- === /xml code/
-- ><object class="GtkButton" id="button1">
-- >  <style>
-- >    <class name="my-special-button-class"/>
-- >    <class name="dark-button"/>
-- >  </style>
-- ></object>
-- 
-- 
-- @GtkWidget@ allows defining accessibility information, such as properties,
-- relations, and states, using the custom @\<accessibility>@ element:
-- 
-- 
-- === /xml code/
-- ><object class="GtkButton" id="button1">
-- >  <accessibility>
-- >    <property name="label">Download</property>
-- >    <relation name="labelled-by">label1</relation>
-- >  </accessibility>
-- ></object>
-- 
-- 
-- === Building composite widgets from template XML
-- 
-- @GtkWidget @exposes some facilities to automate the procedure
-- of creating composite widgets using \"templates\".
-- 
-- To create composite widgets with @GtkBuilder@ 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 @GtkBuilder@ but can be used by UI design tools 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 the widget itself. You may set properties
-- on a widget by inserting @\<property>@ tags into the @\<template>@ tag, and also
-- add @\<child>@ tags to add children and extend a 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.
-- 
-- Since, unlike the @\<object>@ tag, the @\<template>@ tag does not contain an
-- “id” attribute, if you need to refer to the instance of the object itself that
-- the template will create, simply refer to the template class name in an
-- applicable element content.
-- 
-- Here is an example of a template definition, which includes an example of
-- this in the @\<signal>@ tag:
-- 
-- 
-- === /xml code/
-- ><interface>
-- >  <template class="FooWidget" parent="GtkBox">
-- >    <property name="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 @GResource@. In order to load the
-- template, you need to call 'GI.Gtk.Structs.WidgetClass.widgetClassSetTemplateFromResource'
-- from the class initialization of your @GtkWidget@ 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));
-- >
-- >  // Initialize the rest of the widget...
-- >}
-- 
-- 
-- as well as calling 'GI.Gtk.Objects.Widget.widgetDisposeTemplate' from the dispose
-- function:
-- 
-- 
-- === /c code/
-- >static void
-- >foo_widget_dispose (GObject *gobject)
-- >{
-- >  FooWidget *self = FOO_WIDGET (gobject);
-- >
-- >  // Dispose objects for which you have a reference...
-- >
-- >  // Clear the template children for this widget type
-- >  gtk_widget_dispose_template (GTK_WIDGET (self), FOO_TYPE_WIDGET);
-- >
-- >  G_OBJECT_CLASS (foo_widget_parent_class)->dispose (gobject);
-- >}
-- 
-- 
-- 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
-- 'GI.Gtk.Structs.WidgetClass.widgetClassBindTemplateChildFull' (or one of its wrapper macros
-- @/Gtk.widget_class_bind_template_child/@ and @/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_dispose (GObject *gobject)
-- >{
-- >  gtk_widget_dispose_template (GTK_WIDGET (gobject), FOO_TYPE_WIDGET);
-- >
-- >  G_OBJECT_CLASS (foo_widget_parent_class)->dispose (gobject);
-- >}
-- >
-- >static void
-- >foo_widget_class_init (FooWidgetClass *klass)
-- >{
-- >  // ...
-- >  G_OBJECT_CLASS (klass)->dispose = foo_widget_dispose;
-- >
-- >  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)
-- >{
-- >  gtk_widget_init_template (GTK_WIDGET (widget));
-- >}
-- 
-- 
-- You can also use 'GI.Gtk.Structs.WidgetClass.widgetClassBindTemplateCallbackFull' (or
-- is wrapper macro @/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 !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
-- [actionSetEnabled]("GI.Gtk.Objects.Widget#g:method:actionSetEnabled"), [activate]("GI.Gtk.Objects.Widget#g:method:activate"), [activateAction]("GI.Gtk.Objects.Widget#g:method:activateAction"), [activateDefault]("GI.Gtk.Objects.Widget#g:method:activateDefault"), [addController]("GI.Gtk.Objects.Widget#g:method:addController"), [addCssClass]("GI.Gtk.Objects.Widget#g:method:addCssClass"), [addMnemonicLabel]("GI.Gtk.Objects.Widget#g:method:addMnemonicLabel"), [addTickCallback]("GI.Gtk.Objects.Widget#g:method:addTickCallback"), [allocate]("GI.Gtk.Objects.Widget#g:method:allocate"), [announce]("GI.Gtk.Interfaces.Accessible#g:method:announce"), [bindProperty]("GI.GObject.Objects.Object#g:method:bindProperty"), [bindPropertyFull]("GI.GObject.Objects.Object#g:method:bindPropertyFull"), [childFocus]("GI.Gtk.Objects.Widget#g:method:childFocus"), [computeBounds]("GI.Gtk.Objects.Widget#g:method:computeBounds"), [computeExpand]("GI.Gtk.Objects.Widget#g:method:computeExpand"), [computePoint]("GI.Gtk.Objects.Widget#g:method:computePoint"), [computeTransform]("GI.Gtk.Objects.Widget#g:method:computeTransform"), [contains]("GI.Gtk.Objects.Widget#g:method:contains"), [createPangoContext]("GI.Gtk.Objects.Widget#g:method:createPangoContext"), [createPangoLayout]("GI.Gtk.Objects.Widget#g:method:createPangoLayout"), [disposeTemplate]("GI.Gtk.Objects.Widget#g:method:disposeTemplate"), [dragCheckThreshold]("GI.Gtk.Objects.Widget#g:method:dragCheckThreshold"), [errorBell]("GI.Gtk.Objects.Widget#g:method:errorBell"), [forceFloating]("GI.GObject.Objects.Object#g:method:forceFloating"), [freezeNotify]("GI.GObject.Objects.Object#g:method:freezeNotify"), [getv]("GI.GObject.Objects.Object#g:method:getv"), [grabFocus]("GI.Gtk.Objects.Widget#g:method:grabFocus"), [hasCssClass]("GI.Gtk.Objects.Widget#g:method:hasCssClass"), [hasDefault]("GI.Gtk.Objects.Widget#g:method:hasDefault"), [hasFocus]("GI.Gtk.Objects.Widget#g:method:hasFocus"), [hasVisibleFocus]("GI.Gtk.Objects.Widget#g:method:hasVisibleFocus"), [hide]("GI.Gtk.Objects.Widget#g:method:hide"), [inDestruction]("GI.Gtk.Objects.Widget#g:method:inDestruction"), [initTemplate]("GI.Gtk.Objects.Widget#g:method:initTemplate"), [insertActionGroup]("GI.Gtk.Objects.Widget#g:method:insertActionGroup"), [insertAfter]("GI.Gtk.Objects.Widget#g:method:insertAfter"), [insertBefore]("GI.Gtk.Objects.Widget#g:method:insertBefore"), [isAncestor]("GI.Gtk.Objects.Widget#g:method:isAncestor"), [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"), [isVisible]("GI.Gtk.Objects.Widget#g:method:isVisible"), [keynavFailed]("GI.Gtk.Objects.Widget#g:method:keynavFailed"), [listMnemonicLabels]("GI.Gtk.Objects.Widget#g:method:listMnemonicLabels"), [map]("GI.Gtk.Objects.Widget#g:method:map"), [measure]("GI.Gtk.Objects.Widget#g:method:measure"), [mnemonicActivate]("GI.Gtk.Objects.Widget#g:method:mnemonicActivate"), [notify]("GI.GObject.Objects.Object#g:method:notify"), [notifyByPspec]("GI.GObject.Objects.Object#g:method:notifyByPspec"), [observeChildren]("GI.Gtk.Objects.Widget#g:method:observeChildren"), [observeControllers]("GI.Gtk.Objects.Widget#g:method:observeControllers"), [pick]("GI.Gtk.Objects.Widget#g:method:pick"), [queueAllocate]("GI.Gtk.Objects.Widget#g:method:queueAllocate"), [queueDraw]("GI.Gtk.Objects.Widget#g:method:queueDraw"), [queueResize]("GI.Gtk.Objects.Widget#g:method:queueResize"), [realize]("GI.Gtk.Objects.Widget#g:method:realize"), [ref]("GI.GObject.Objects.Object#g:method:ref"), [refSink]("GI.GObject.Objects.Object#g:method:refSink"), [removeController]("GI.Gtk.Objects.Widget#g:method:removeController"), [removeCssClass]("GI.Gtk.Objects.Widget#g:method:removeCssClass"), [removeMnemonicLabel]("GI.Gtk.Objects.Widget#g:method:removeMnemonicLabel"), [removeTickCallback]("GI.Gtk.Objects.Widget#g:method:removeTickCallback"), [resetProperty]("GI.Gtk.Interfaces.Accessible#g:method:resetProperty"), [resetRelation]("GI.Gtk.Interfaces.Accessible#g:method:resetRelation"), [resetState]("GI.Gtk.Interfaces.Accessible#g:method:resetState"), [runDispose]("GI.GObject.Objects.Object#g:method:runDispose"), [shouldLayout]("GI.Gtk.Objects.Widget#g:method:shouldLayout"), [show]("GI.Gtk.Objects.Widget#g:method:show"), [sizeAllocate]("GI.Gtk.Objects.Widget#g:method:sizeAllocate"), [snapshotChild]("GI.Gtk.Objects.Widget#g:method:snapshotChild"), [stealData]("GI.GObject.Objects.Object#g:method:stealData"), [stealQdata]("GI.GObject.Objects.Object#g:method:stealQdata"), [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"), [unsetStateFlags]("GI.Gtk.Objects.Widget#g:method:unsetStateFlags"), [updateNextAccessibleSibling]("GI.Gtk.Interfaces.Accessible#g:method:updateNextAccessibleSibling"), [updatePlatformState]("GI.Gtk.Interfaces.Accessible#g:method:updatePlatformState"), [updateProperty]("GI.Gtk.Interfaces.Accessible#g:method:updateProperty"), [updateRelation]("GI.Gtk.Interfaces.Accessible#g:method:updateRelation"), [updateState]("GI.Gtk.Interfaces.Accessible#g:method:updateState"), [watchClosure]("GI.GObject.Objects.Object#g:method:watchClosure").
-- 
-- ==== Getters
-- [getAccessibleId]("GI.Gtk.Interfaces.Accessible#g:method:getAccessibleId"), [getAccessibleParent]("GI.Gtk.Interfaces.Accessible#g:method:getAccessibleParent"), [getAccessibleRole]("GI.Gtk.Interfaces.Accessible#g:method:getAccessibleRole"), [getAllocatedBaseline]("GI.Gtk.Objects.Widget#g:method:getAllocatedBaseline"), [getAllocatedHeight]("GI.Gtk.Objects.Widget#g:method:getAllocatedHeight"), [getAllocatedWidth]("GI.Gtk.Objects.Widget#g:method:getAllocatedWidth"), [getAllocation]("GI.Gtk.Objects.Widget#g:method:getAllocation"), [getAncestor]("GI.Gtk.Objects.Widget#g:method:getAncestor"), [getAtContext]("GI.Gtk.Interfaces.Accessible#g:method:getAtContext"), [getBaseline]("GI.Gtk.Objects.Widget#g:method:getBaseline"), [getBounds]("GI.Gtk.Interfaces.Accessible#g:method:getBounds"), [getBuildableId]("GI.Gtk.Interfaces.Buildable#g:method:getBuildableId"), [getCanFocus]("GI.Gtk.Objects.Widget#g:method:getCanFocus"), [getCanTarget]("GI.Gtk.Objects.Widget#g:method:getCanTarget"), [getChildVisible]("GI.Gtk.Objects.Widget#g:method:getChildVisible"), [getClipboard]("GI.Gtk.Objects.Widget#g:method:getClipboard"), [getColor]("GI.Gtk.Objects.Widget#g:method:getColor"), [getCssClasses]("GI.Gtk.Objects.Widget#g:method:getCssClasses"), [getCssName]("GI.Gtk.Objects.Widget#g:method:getCssName"), [getCursor]("GI.Gtk.Objects.Widget#g:method:getCursor"), [getData]("GI.GObject.Objects.Object#g:method:getData"), [getDirection]("GI.Gtk.Objects.Widget#g:method:getDirection"), [getDisplay]("GI.Gtk.Objects.Widget#g:method:getDisplay"), [getFirstAccessibleChild]("GI.Gtk.Interfaces.Accessible#g:method:getFirstAccessibleChild"), [getFirstChild]("GI.Gtk.Objects.Widget#g:method:getFirstChild"), [getFocusChild]("GI.Gtk.Objects.Widget#g:method:getFocusChild"), [getFocusOnClick]("GI.Gtk.Objects.Widget#g:method:getFocusOnClick"), [getFocusable]("GI.Gtk.Objects.Widget#g:method:getFocusable"), [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"), [getHeight]("GI.Gtk.Objects.Widget#g:method:getHeight"), [getHexpand]("GI.Gtk.Objects.Widget#g:method:getHexpand"), [getHexpandSet]("GI.Gtk.Objects.Widget#g:method:getHexpandSet"), [getLastChild]("GI.Gtk.Objects.Widget#g:method:getLastChild"), [getLayoutManager]("GI.Gtk.Objects.Widget#g:method:getLayoutManager"), [getLimitEvents]("GI.Gtk.Objects.Widget#g:method:getLimitEvents"), [getMapped]("GI.Gtk.Objects.Widget#g:method:getMapped"), [getMarginBottom]("GI.Gtk.Objects.Widget#g:method:getMarginBottom"), [getMarginEnd]("GI.Gtk.Objects.Widget#g:method:getMarginEnd"), [getMarginStart]("GI.Gtk.Objects.Widget#g:method:getMarginStart"), [getMarginTop]("GI.Gtk.Objects.Widget#g:method:getMarginTop"), [getName]("GI.Gtk.Objects.Widget#g:method:getName"), [getNative]("GI.Gtk.Objects.Widget#g:method:getNative"), [getNextAccessibleSibling]("GI.Gtk.Interfaces.Accessible#g:method:getNextAccessibleSibling"), [getNextSibling]("GI.Gtk.Objects.Widget#g:method:getNextSibling"), [getOpacity]("GI.Gtk.Objects.Widget#g:method:getOpacity"), [getOverflow]("GI.Gtk.Objects.Widget#g:method:getOverflow"), [getPangoContext]("GI.Gtk.Objects.Widget#g:method:getPangoContext"), [getParent]("GI.Gtk.Objects.Widget#g:method:getParent"), [getPlatformState]("GI.Gtk.Interfaces.Accessible#g:method:getPlatformState"), [getPreferredSize]("GI.Gtk.Objects.Widget#g:method:getPreferredSize"), [getPrevSibling]("GI.Gtk.Objects.Widget#g:method:getPrevSibling"), [getPrimaryClipboard]("GI.Gtk.Objects.Widget#g:method:getPrimaryClipboard"), [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"), [getRoot]("GI.Gtk.Objects.Widget#g:method:getRoot"), [getScaleFactor]("GI.Gtk.Objects.Widget#g:method:getScaleFactor"), [getSensitive]("GI.Gtk.Objects.Widget#g:method:getSensitive"), [getSettings]("GI.Gtk.Objects.Widget#g:method:getSettings"), [getSize]("GI.Gtk.Objects.Widget#g:method:getSize"), [getSizeRequest]("GI.Gtk.Objects.Widget#g:method:getSizeRequest"), [getStateFlags]("GI.Gtk.Objects.Widget#g:method:getStateFlags"), [getStyleContext]("GI.Gtk.Objects.Widget#g:method:getStyleContext"), [getTemplateChild]("GI.Gtk.Objects.Widget#g:method:getTemplateChild"), [getTooltipMarkup]("GI.Gtk.Objects.Widget#g:method:getTooltipMarkup"), [getTooltipText]("GI.Gtk.Objects.Widget#g:method:getTooltipText"), [getValign]("GI.Gtk.Objects.Widget#g:method:getValign"), [getVexpand]("GI.Gtk.Objects.Widget#g:method:getVexpand"), [getVexpandSet]("GI.Gtk.Objects.Widget#g:method:getVexpandSet"), [getVisible]("GI.Gtk.Objects.Widget#g:method:getVisible"), [getWidth]("GI.Gtk.Objects.Widget#g:method:getWidth").
-- 
-- ==== Setters
-- [setAccessibleParent]("GI.Gtk.Interfaces.Accessible#g:method:setAccessibleParent"), [setCanFocus]("GI.Gtk.Objects.Widget#g:method:setCanFocus"), [setCanTarget]("GI.Gtk.Objects.Widget#g:method:setCanTarget"), [setChildVisible]("GI.Gtk.Objects.Widget#g:method:setChildVisible"), [setCssClasses]("GI.Gtk.Objects.Widget#g:method:setCssClasses"), [setCursor]("GI.Gtk.Objects.Widget#g:method:setCursor"), [setCursorFromName]("GI.Gtk.Objects.Widget#g:method:setCursorFromName"), [setData]("GI.GObject.Objects.Object#g:method:setData"), [setDataFull]("GI.GObject.Objects.Object#g:method:setDataFull"), [setDirection]("GI.Gtk.Objects.Widget#g:method:setDirection"), [setFocusChild]("GI.Gtk.Objects.Widget#g:method:setFocusChild"), [setFocusOnClick]("GI.Gtk.Objects.Widget#g:method:setFocusOnClick"), [setFocusable]("GI.Gtk.Objects.Widget#g:method:setFocusable"), [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"), [setHexpand]("GI.Gtk.Objects.Widget#g:method:setHexpand"), [setHexpandSet]("GI.Gtk.Objects.Widget#g:method:setHexpandSet"), [setLayoutManager]("GI.Gtk.Objects.Widget#g:method:setLayoutManager"), [setLimitEvents]("GI.Gtk.Objects.Widget#g:method:setLimitEvents"), [setMarginBottom]("GI.Gtk.Objects.Widget#g:method:setMarginBottom"), [setMarginEnd]("GI.Gtk.Objects.Widget#g:method:setMarginEnd"), [setMarginStart]("GI.Gtk.Objects.Widget#g:method:setMarginStart"), [setMarginTop]("GI.Gtk.Objects.Widget#g:method:setMarginTop"), [setName]("GI.Gtk.Objects.Widget#g:method:setName"), [setOpacity]("GI.Gtk.Objects.Widget#g:method:setOpacity"), [setOverflow]("GI.Gtk.Objects.Widget#g:method:setOverflow"), [setParent]("GI.Gtk.Objects.Widget#g:method:setParent"), [setProperty]("GI.GObject.Objects.Object#g:method:setProperty"), [setReceivesDefault]("GI.Gtk.Objects.Widget#g:method:setReceivesDefault"), [setSensitive]("GI.Gtk.Objects.Widget#g:method:setSensitive"), [setSizeRequest]("GI.Gtk.Objects.Widget#g:method:setSizeRequest"), [setStateFlags]("GI.Gtk.Objects.Widget#g:method:setStateFlags"), [setTooltipMarkup]("GI.Gtk.Objects.Widget#g:method:setTooltipMarkup"), [setTooltipText]("GI.Gtk.Objects.Widget#g:method:setTooltipText"), [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").

#if defined(ENABLE_OVERLOADING)
    ResolveWidgetMethod                     ,
#endif

-- ** actionSetEnabled #method:actionSetEnabled#

#if defined(ENABLE_OVERLOADING)
    WidgetActionSetEnabledMethodInfo        ,
#endif
    widgetActionSetEnabled                  ,


-- ** activate #method:activate#

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


-- ** activateAction #method:activateAction#

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


-- ** activateDefault #method:activateDefault#

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


-- ** addController #method:addController#

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


-- ** addCssClass #method:addCssClass#

#if defined(ENABLE_OVERLOADING)
    WidgetAddCssClassMethodInfo             ,
#endif
    widgetAddCssClass                       ,


-- ** addMnemonicLabel #method:addMnemonicLabel#

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


-- ** addTickCallback #method:addTickCallback#

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


-- ** allocate #method:allocate#

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


-- ** childFocus #method:childFocus#

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


-- ** computeBounds #method:computeBounds#

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


-- ** computeExpand #method:computeExpand#

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


-- ** computePoint #method:computePoint#

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


-- ** computeTransform #method:computeTransform#

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


-- ** contains #method:contains#

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


-- ** createPangoContext #method:createPangoContext#

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


-- ** createPangoLayout #method:createPangoLayout#

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


-- ** disposeTemplate #method:disposeTemplate#

#if defined(ENABLE_OVERLOADING)
    WidgetDisposeTemplateMethodInfo         ,
#endif
    widgetDisposeTemplate                   ,


-- ** dragCheckThreshold #method:dragCheckThreshold#

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


-- ** errorBell #method:errorBell#

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


-- ** getAllocatedBaseline #method:getAllocatedBaseline#

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


-- ** getAllocatedHeight #method:getAllocatedHeight#

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


-- ** getAllocatedWidth #method:getAllocatedWidth#

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


-- ** getAllocation #method:getAllocation#

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


-- ** getAncestor #method:getAncestor#

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


-- ** getBaseline #method:getBaseline#

#if defined(ENABLE_OVERLOADING)
    WidgetGetBaselineMethodInfo             ,
#endif
    widgetGetBaseline                       ,


-- ** getCanFocus #method:getCanFocus#

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


-- ** getCanTarget #method:getCanTarget#

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


-- ** getChildVisible #method:getChildVisible#

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


-- ** getClipboard #method:getClipboard#

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


-- ** getColor #method:getColor#

#if defined(ENABLE_OVERLOADING)
    WidgetGetColorMethodInfo                ,
#endif
    widgetGetColor                          ,


-- ** getCssClasses #method:getCssClasses#

#if defined(ENABLE_OVERLOADING)
    WidgetGetCssClassesMethodInfo           ,
#endif
    widgetGetCssClasses                     ,


-- ** getCssName #method:getCssName#

#if defined(ENABLE_OVERLOADING)
    WidgetGetCssNameMethodInfo              ,
#endif
    widgetGetCssName                        ,


-- ** getCursor #method:getCursor#

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


-- ** getDefaultDirection #method:getDefaultDirection#

    widgetGetDefaultDirection               ,


-- ** getDirection #method:getDirection#

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


-- ** getDisplay #method:getDisplay#

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


-- ** getFirstChild #method:getFirstChild#

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


-- ** getFocusChild #method:getFocusChild#

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


-- ** getFocusOnClick #method:getFocusOnClick#

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


-- ** getFocusable #method:getFocusable#

#if defined(ENABLE_OVERLOADING)
    WidgetGetFocusableMethodInfo            ,
#endif
    widgetGetFocusable                      ,


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


-- ** getHeight #method:getHeight#

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


-- ** getHexpand #method:getHexpand#

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


-- ** getHexpandSet #method:getHexpandSet#

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


-- ** getLastChild #method:getLastChild#

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


-- ** getLayoutManager #method:getLayoutManager#

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


-- ** getLimitEvents #method:getLimitEvents#

#if defined(ENABLE_OVERLOADING)
    WidgetGetLimitEventsMethodInfo          ,
#endif
    widgetGetLimitEvents                    ,


-- ** getMapped #method:getMapped#

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


-- ** getMarginBottom #method:getMarginBottom#

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


-- ** getMarginEnd #method:getMarginEnd#

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


-- ** getMarginStart #method:getMarginStart#

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


-- ** getMarginTop #method:getMarginTop#

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


-- ** getName #method:getName#

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


-- ** getNative #method:getNative#

#if defined(ENABLE_OVERLOADING)
    WidgetGetNativeMethodInfo               ,
#endif
    widgetGetNative                         ,


-- ** getNextSibling #method:getNextSibling#

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


-- ** getOpacity #method:getOpacity#

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


-- ** getOverflow #method:getOverflow#

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


-- ** getPangoContext #method:getPangoContext#

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


-- ** getParent #method:getParent#

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


-- ** getPreferredSize #method:getPreferredSize#

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


-- ** getPrevSibling #method:getPrevSibling#

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


-- ** getPrimaryClipboard #method:getPrimaryClipboard#

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


-- ** getRealized #method:getRealized#

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


-- ** getReceivesDefault #method:getReceivesDefault#

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


-- ** getRequestMode #method:getRequestMode#

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


-- ** getRoot #method:getRoot#

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


-- ** getScaleFactor #method:getScaleFactor#

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


-- ** getSensitive #method:getSensitive#

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


-- ** getSettings #method:getSettings#

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


-- ** getSize #method:getSize#

#if defined(ENABLE_OVERLOADING)
    WidgetGetSizeMethodInfo                 ,
#endif
    widgetGetSize                           ,


-- ** getSizeRequest #method:getSizeRequest#

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


-- ** getStateFlags #method:getStateFlags#

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


-- ** getStyleContext #method:getStyleContext#

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


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


-- ** getValign #method:getValign#

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


-- ** getVexpand #method:getVexpand#

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


-- ** getVexpandSet #method:getVexpandSet#

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


-- ** getVisible #method:getVisible#

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


-- ** getWidth #method:getWidth#

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


-- ** grabFocus #method:grabFocus#

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


-- ** hasCssClass #method:hasCssClass#

#if defined(ENABLE_OVERLOADING)
    WidgetHasCssClassMethodInfo             ,
#endif
    widgetHasCssClass                       ,


-- ** hasDefault #method:hasDefault#

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


-- ** hasFocus #method:hasFocus#

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


-- ** hasVisibleFocus #method:hasVisibleFocus#

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


-- ** hide #method:hide#

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


-- ** inDestruction #method:inDestruction#

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


-- ** initTemplate #method:initTemplate#

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


-- ** insertActionGroup #method:insertActionGroup#

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


-- ** insertAfter #method:insertAfter#

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


-- ** insertBefore #method:insertBefore#

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


-- ** isAncestor #method:isAncestor#

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


-- ** isDrawable #method:isDrawable#

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


-- ** isFocus #method:isFocus#

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


-- ** isSensitive #method:isSensitive#

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


-- ** isVisible #method:isVisible#

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


-- ** keynavFailed #method:keynavFailed#

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


-- ** listMnemonicLabels #method:listMnemonicLabels#

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


-- ** map #method:map#

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


-- ** measure #method:measure#

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


-- ** mnemonicActivate #method:mnemonicActivate#

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


-- ** observeChildren #method:observeChildren#

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


-- ** observeControllers #method:observeControllers#

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


-- ** pick #method:pick#

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


-- ** queueAllocate #method:queueAllocate#

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


-- ** queueDraw #method:queueDraw#

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


-- ** queueResize #method:queueResize#

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


-- ** realize #method:realize#

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


-- ** removeController #method:removeController#

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


-- ** removeCssClass #method:removeCssClass#

#if defined(ENABLE_OVERLOADING)
    WidgetRemoveCssClassMethodInfo          ,
#endif
    widgetRemoveCssClass                    ,


-- ** removeMnemonicLabel #method:removeMnemonicLabel#

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


-- ** removeTickCallback #method:removeTickCallback#

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


-- ** setCanFocus #method:setCanFocus#

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


-- ** setCanTarget #method:setCanTarget#

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


-- ** setChildVisible #method:setChildVisible#

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


-- ** setCssClasses #method:setCssClasses#

#if defined(ENABLE_OVERLOADING)
    WidgetSetCssClassesMethodInfo           ,
#endif
    widgetSetCssClasses                     ,


-- ** setCursor #method:setCursor#

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


-- ** setCursorFromName #method:setCursorFromName#

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


-- ** setDefaultDirection #method:setDefaultDirection#

    widgetSetDefaultDirection               ,


-- ** setDirection #method:setDirection#

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


-- ** setFocusChild #method:setFocusChild#

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


-- ** setFocusOnClick #method:setFocusOnClick#

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


-- ** setFocusable #method:setFocusable#

#if defined(ENABLE_OVERLOADING)
    WidgetSetFocusableMethodInfo            ,
#endif
    widgetSetFocusable                      ,


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


-- ** setHexpand #method:setHexpand#

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


-- ** setHexpandSet #method:setHexpandSet#

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


-- ** setLayoutManager #method:setLayoutManager#

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


-- ** setLimitEvents #method:setLimitEvents#

#if defined(ENABLE_OVERLOADING)
    WidgetSetLimitEventsMethodInfo          ,
#endif
    widgetSetLimitEvents                    ,


-- ** setMarginBottom #method:setMarginBottom#

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


-- ** setMarginEnd #method:setMarginEnd#

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


-- ** setMarginStart #method:setMarginStart#

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


-- ** setMarginTop #method:setMarginTop#

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


-- ** setName #method:setName#

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


-- ** setOpacity #method:setOpacity#

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


-- ** setOverflow #method:setOverflow#

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


-- ** setParent #method:setParent#

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


-- ** setReceivesDefault #method:setReceivesDefault#

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


-- ** setSensitive #method:setSensitive#

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


-- ** setSizeRequest #method:setSizeRequest#

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


-- ** setStateFlags #method:setStateFlags#

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


-- ** setTooltipMarkup #method:setTooltipMarkup#

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


-- ** setTooltipText #method:setTooltipText#

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


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


-- ** shouldLayout #method:shouldLayout#

#if defined(ENABLE_OVERLOADING)
    WidgetShouldLayoutMethodInfo            ,
#endif
    widgetShouldLayout                      ,


-- ** show #method:show#

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


-- ** sizeAllocate #method:sizeAllocate#

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


-- ** snapshotChild #method:snapshotChild#

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


-- ** translateCoordinates #method:translateCoordinates#

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


-- ** triggerTooltipQuery #method:triggerTooltipQuery#

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


-- ** unmap #method:unmap#

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


-- ** unparent #method:unparent#

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


-- ** unrealize #method:unrealize#

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


-- ** unsetStateFlags #method:unsetStateFlags#

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




 -- * Properties


-- ** canFocus #attr:canFocus#
-- | Whether the widget or any of its descendents can accept
-- the input focus.
-- 
-- This property is meant to be set by widget implementations,
-- typically in their instance init function.

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


-- ** canTarget #attr:canTarget#
-- | Whether the widget can receive pointer events.

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


-- ** cssClasses #attr:cssClasses#
-- | A list of css classes applied to this widget.

#if defined(ENABLE_OVERLOADING)
    WidgetCssClassesPropertyInfo            ,
#endif
    constructWidgetCssClasses               ,
    getWidgetCssClasses                     ,
    setWidgetCssClasses                     ,
#if defined(ENABLE_OVERLOADING)
    widgetCssClasses                        ,
#endif


-- ** cssName #attr:cssName#
-- | The name of this widget in the CSS tree.
-- 
-- This property is meant to be set by widget implementations,
-- typically in their instance init function.

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


-- ** cursor #attr:cursor#
-- | The cursor used by /@widget@/.

#if defined(ENABLE_OVERLOADING)
    WidgetCursorPropertyInfo                ,
#endif
    clearWidgetCursor                       ,
    constructWidgetCursor                   ,
    getWidgetCursor                         ,
    setWidgetCursor                         ,
#if defined(ENABLE_OVERLOADING)
    widgetCursor                            ,
#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.

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


-- ** focusable #attr:focusable#
-- | Whether this widget itself will accept the input focus.

#if defined(ENABLE_OVERLOADING)
    WidgetFocusablePropertyInfo             ,
#endif
    constructWidgetFocusable                ,
    getWidgetFocusable                      ,
    setWidgetFocusable                      ,
#if defined(ENABLE_OVERLOADING)
    widgetFocusable                         ,
#endif


-- ** halign #attr:halign#
-- | How to distribute horizontal space if widget gets extra space.

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


-- ** hasDefault #attr:hasDefault#
-- | Whether the widget is the default widget.

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


-- ** hasFocus #attr:hasFocus#
-- | Whether the widget has the input focus.

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


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

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


-- ** heightRequest #attr:heightRequest#
-- | Overrides for height request of the widget.
-- 
-- If this is -1, the natural request will be used.

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


-- ** hexpand #attr:hexpand#
-- | Whether to expand horizontally.

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


-- ** hexpandSet #attr:hexpandSet#
-- | Whether to use the @hexpand@ property.

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


-- ** layoutManager #attr:layoutManager#
-- | The t'GI.Gtk.Objects.LayoutManager.LayoutManager' instance to use to compute
-- the preferred size of the widget, and allocate its children.
-- 
-- This property is meant to be set by widget implementations,
-- typically in their instance init function.

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


-- ** limitEvents #attr:limitEvents#
-- | Makes this widget act like a modal dialog, with respect to
-- event delivery.
-- 
-- Global event controllers will not handle events with targets
-- inside the widget, unless they are set up to ignore propagation
-- limits. See 'GI.Gtk.Objects.EventController.eventControllerSetPropagationLimit'.
-- 
-- /Since: 4.18/

#if defined(ENABLE_OVERLOADING)
    WidgetLimitEventsPropertyInfo           ,
#endif
    constructWidgetLimitEvents              ,
    getWidgetLimitEvents                    ,
    setWidgetLimitEvents                    ,
#if defined(ENABLE_OVERLOADING)
    widgetLimitEvents                       ,
#endif


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

#if defined(ENABLE_OVERLOADING)
    WidgetMarginBottomPropertyInfo          ,
#endif
    constructWidgetMarginBottom             ,
    getWidgetMarginBottom                   ,
    setWidgetMarginBottom                   ,
#if defined(ENABLE_OVERLOADING)
    widgetMarginBottom                      ,
#endif


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

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


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

#if defined(ENABLE_OVERLOADING)
    WidgetMarginStartPropertyInfo           ,
#endif
    constructWidgetMarginStart              ,
    getWidgetMarginStart                    ,
    setWidgetMarginStart                    ,
#if defined(ENABLE_OVERLOADING)
    widgetMarginStart                       ,
#endif


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

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


-- ** name #attr:name#
-- | The name of the widget.

#if defined(ENABLE_OVERLOADING)
    WidgetNamePropertyInfo                  ,
#endif
    constructWidgetName                     ,
    getWidgetName                           ,
    setWidgetName                           ,
#if defined(ENABLE_OVERLOADING)
    widgetName                              ,
#endif


-- ** opacity #attr:opacity#
-- | The requested opacity of the widget.

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


-- ** overflow #attr:overflow#
-- | How content outside the widget\'s content area is treated.
-- 
-- This property is meant to be set by widget implementations,
-- typically in their instance init function.

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


-- ** parent #attr:parent#
-- | The parent widget of this widget.

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


-- ** receivesDefault #attr:receivesDefault#
-- | Whether the widget will receive the default action when it is focused.

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


-- ** root #attr:root#
-- | The @GtkRoot@ widget of the widget tree containing this widget.
-- 
-- This will be @NULL@ if the widget is not contained in a root widget.

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


-- ** scaleFactor #attr:scaleFactor#
-- | The scale factor of the widget.

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


-- ** sensitive #attr:sensitive#
-- | Whether the widget responds to input.

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


-- ** tooltipMarkup #attr:tooltipMarkup#
-- | Sets the text of tooltip to be the given string, which is marked up
-- with Pango markup.
-- 
-- 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 @NULL@:
-- [Widget:hasTooltip]("GI.Gtk.Objects.Widget#g:attr:hasTooltip") will automatically be set to true
-- and there will be taken care of [Widget::queryTooltip]("GI.Gtk.Objects.Widget#g:signal:queryTooltip") in
-- the default signal handler.
-- 
-- Note that if both [Widget:tooltipText]("GI.Gtk.Objects.Widget#g:attr:tooltipText") and
-- [Widget:tooltipMarkup]("GI.Gtk.Objects.Widget#g:attr:tooltipMarkup") are set, the last one wins.

#if defined(ENABLE_OVERLOADING)
    WidgetTooltipMarkupPropertyInfo         ,
#endif
    clearWidgetTooltipMarkup                ,
    constructWidgetTooltipMarkup            ,
    getWidgetTooltipMarkup                  ,
    setWidgetTooltipMarkup                  ,
#if defined(ENABLE_OVERLOADING)
    widgetTooltipMarkup                     ,
#endif


-- ** tooltipText #attr:tooltipText#
-- | Sets the text of tooltip to be the given string.
-- 
-- Also see 'GI.Gtk.Objects.Tooltip.tooltipSetText'.
-- 
-- This is a convenience property which will take care of getting the
-- tooltip shown if the given string is not @NULL@:
-- [Widget:hasTooltip]("GI.Gtk.Objects.Widget#g:attr:hasTooltip") will automatically be set to true
-- and there will be taken care of [Widget::queryTooltip]("GI.Gtk.Objects.Widget#g:signal:queryTooltip") in
-- the default signal handler.
-- 
-- Note that if both [Widget:tooltipText]("GI.Gtk.Objects.Widget#g:attr:tooltipText") and
-- [Widget:tooltipMarkup]("GI.Gtk.Objects.Widget#g:attr:tooltipMarkup") are set, the last one wins.

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


-- ** valign #attr:valign#
-- | How to distribute vertical space if widget gets extra space.

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


-- ** vexpand #attr:vexpand#
-- | Whether to expand vertically.

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


-- ** vexpandSet #attr:vexpandSet#
-- | Whether to use the @vexpand@ property.

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


-- ** visible #attr:visible#
-- | Whether the widget is visible.

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


-- ** widthRequest #attr:widthRequest#
-- | Overrides for width request of the widget.
-- 
-- If this is -1, the natural request will be used.

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




 -- * Signals


-- ** destroy #signal:destroy#

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


-- ** directionChanged #signal:directionChanged#

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


-- ** hide #signal:hide#

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


-- ** keynavFailed #signal:keynavFailed#

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


-- ** map #signal:map#

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


-- ** mnemonicActivate #signal:mnemonicActivate#

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


-- ** moveFocus #signal:moveFocus#

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


-- ** queryTooltip #signal:queryTooltip#

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


-- ** realize #signal:realize#

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


-- ** show #signal:show#

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


-- ** stateFlagsChanged #signal:stateFlagsChanged#

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


-- ** unmap #signal:unmap#

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


-- ** unrealize #signal:unrealize#

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




    ) 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.GHashTable as B.GHT
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.Kind as DK
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 Data.Word as DW
import qualified Data.Int as DI
import qualified System.Posix.Types as SPT
import qualified Foreign.C.Types as FCT

-- Workaround for https://gitlab.haskell.org/ghc/ghc/-/issues/23392
#if MIN_VERSION_base(4,18,0)
import qualified GI.Cairo.Structs.Context as Cairo.Context
import qualified GI.Cairo.Structs.FontOptions as Cairo.FontOptions
import qualified GI.GLib.Callbacks as GLib.Callbacks
import qualified GI.GLib.Structs.Bytes as GLib.Bytes
import qualified GI.GObject.Objects.Object as GObject.Object
import qualified GI.Gdk.Flags as Gdk.Flags
import qualified GI.Gdk.Interfaces.Paintable as Gdk.Paintable
import qualified GI.Gdk.Objects.Clipboard as Gdk.Clipboard
import qualified GI.Gdk.Objects.Cursor as Gdk.Cursor
import qualified GI.Gdk.Objects.Device as Gdk.Device
import qualified GI.Gdk.Objects.Display as Gdk.Display
import qualified GI.Gdk.Objects.Event as Gdk.Event
import qualified GI.Gdk.Objects.FrameClock as Gdk.FrameClock
import qualified GI.Gdk.Objects.Snapshot as Gdk.Snapshot
import qualified GI.Gdk.Objects.Surface as Gdk.Surface
import qualified GI.Gdk.Objects.Texture as Gdk.Texture
import qualified GI.Gdk.Structs.RGBA as Gdk.RGBA
import qualified GI.Gdk.Structs.Rectangle as Gdk.Rectangle
import qualified GI.Gio.Interfaces.ActionGroup as Gio.ActionGroup
import qualified GI.Gio.Interfaces.Icon as Gio.Icon
import qualified GI.Gio.Interfaces.ListModel as Gio.ListModel
import qualified GI.Graphene.Structs.Matrix as Graphene.Matrix
import qualified GI.Graphene.Structs.Point as Graphene.Point
import qualified GI.Graphene.Structs.Point3D as Graphene.Point3D
import qualified GI.Graphene.Structs.Rect as Graphene.Rect
import qualified GI.Graphene.Structs.Size as Graphene.Size
import qualified GI.Graphene.Structs.Vec3 as Graphene.Vec3
import qualified GI.Graphene.Structs.Vec4 as Graphene.Vec4
import qualified GI.Gsk.Enums as Gsk.Enums
import qualified GI.Gsk.Flags as Gsk.Flags
import qualified GI.Gsk.Objects.GLShader as Gsk.GLShader
import qualified GI.Gsk.Objects.RenderNode as Gsk.RenderNode
import qualified GI.Gsk.Objects.Renderer as Gsk.Renderer
import qualified GI.Gsk.Structs.ColorStop as Gsk.ColorStop
import qualified GI.Gsk.Structs.ComponentTransfer as Gsk.ComponentTransfer
import qualified GI.Gsk.Structs.Path as Gsk.Path
import qualified GI.Gsk.Structs.RoundedRect as Gsk.RoundedRect
import qualified GI.Gsk.Structs.Shadow as Gsk.Shadow
import qualified GI.Gsk.Structs.Stroke as Gsk.Stroke
import qualified GI.Gsk.Structs.Transform as Gsk.Transform
import qualified GI.Gtk.Callbacks as Gtk.Callbacks
import {-# SOURCE #-} qualified GI.Gtk.Enums as Gtk.Enums
import {-# SOURCE #-} qualified GI.Gtk.Flags as Gtk.Flags
import {-# SOURCE #-} qualified GI.Gtk.Interfaces.Accessible as Gtk.Accessible
import {-# SOURCE #-} qualified GI.Gtk.Interfaces.Buildable as Gtk.Buildable
import {-# SOURCE #-} qualified GI.Gtk.Interfaces.ConstraintTarget as Gtk.ConstraintTarget
import {-# SOURCE #-} qualified GI.Gtk.Interfaces.Native as Gtk.Native
import {-# SOURCE #-} qualified GI.Gtk.Interfaces.Root as Gtk.Root
import {-# SOURCE #-} qualified GI.Gtk.Interfaces.StyleProvider as Gtk.StyleProvider
import {-# SOURCE #-} qualified GI.Gtk.Objects.ATContext as Gtk.ATContext
import {-# SOURCE #-} qualified GI.Gtk.Objects.EventController as Gtk.EventController
import {-# SOURCE #-} qualified GI.Gtk.Objects.LayoutChild as Gtk.LayoutChild
import {-# SOURCE #-} qualified GI.Gtk.Objects.LayoutManager as Gtk.LayoutManager
import {-# SOURCE #-} qualified GI.Gtk.Objects.Settings as Gtk.Settings
import {-# SOURCE #-} qualified GI.Gtk.Objects.Snapshot as Gtk.Snapshot
import {-# SOURCE #-} qualified GI.Gtk.Objects.StyleContext as Gtk.StyleContext
import {-# SOURCE #-} qualified GI.Gtk.Objects.Tooltip as Gtk.Tooltip
import {-# SOURCE #-} qualified GI.Gtk.Structs.Border as Gtk.Border
import {-# SOURCE #-} qualified GI.Gtk.Structs.Requisition as Gtk.Requisition
import qualified GI.Pango.Enums as Pango.Enums
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

#else
import qualified GI.Cairo.Structs.FontOptions as Cairo.FontOptions
import qualified GI.GLib.Callbacks as GLib.Callbacks
import qualified GI.GObject.Objects.Object as GObject.Object
import qualified GI.Gdk.Objects.Clipboard as Gdk.Clipboard
import qualified GI.Gdk.Objects.Cursor as Gdk.Cursor
import qualified GI.Gdk.Objects.Display as Gdk.Display
import qualified GI.Gdk.Objects.FrameClock as Gdk.FrameClock
import qualified GI.Gdk.Structs.RGBA as Gdk.RGBA
import qualified GI.Gdk.Structs.Rectangle as Gdk.Rectangle
import qualified GI.Gio.Interfaces.ActionGroup as Gio.ActionGroup
import qualified GI.Gio.Interfaces.ListModel as Gio.ListModel
import qualified GI.Graphene.Structs.Matrix as Graphene.Matrix
import qualified GI.Graphene.Structs.Point as Graphene.Point
import qualified GI.Graphene.Structs.Rect as Graphene.Rect
import qualified GI.Gsk.Structs.Transform as Gsk.Transform
import qualified GI.Gtk.Callbacks as Gtk.Callbacks
import {-# SOURCE #-} qualified GI.Gtk.Enums as Gtk.Enums
import {-# SOURCE #-} qualified GI.Gtk.Flags as Gtk.Flags
import {-# SOURCE #-} qualified GI.Gtk.Interfaces.Accessible as Gtk.Accessible
import {-# SOURCE #-} qualified GI.Gtk.Interfaces.Buildable as Gtk.Buildable
import {-# SOURCE #-} qualified GI.Gtk.Interfaces.ConstraintTarget as Gtk.ConstraintTarget
import {-# SOURCE #-} qualified GI.Gtk.Interfaces.Native as Gtk.Native
import {-# SOURCE #-} qualified GI.Gtk.Interfaces.Root as Gtk.Root
import {-# SOURCE #-} qualified GI.Gtk.Objects.EventController as Gtk.EventController
import {-# SOURCE #-} qualified GI.Gtk.Objects.LayoutManager as Gtk.LayoutManager
import {-# SOURCE #-} qualified GI.Gtk.Objects.Settings as Gtk.Settings
import {-# SOURCE #-} qualified GI.Gtk.Objects.Snapshot as Gtk.Snapshot
import {-# SOURCE #-} qualified GI.Gtk.Objects.StyleContext as Gtk.StyleContext
import {-# SOURCE #-} qualified GI.Gtk.Objects.Tooltip as Gtk.Tooltip
import {-# SOURCE #-} qualified GI.Gtk.Structs.Requisition as Gtk.Requisition
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

#endif

-- | 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
$c== :: Widget -> Widget -> Bool
== :: Widget -> Widget -> Bool
$c/= :: Widget -> Widget -> Bool
/= :: 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 t'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, Gtk.Accessible.Accessible, Gtk.Buildable.Buildable, Gtk.ConstraintTarget.ConstraintTarget]

-- | Cast to t'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 a. IO a -> m a
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 t'Widget' to and from t'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 <- 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 /= FP.nullPtr
        then P.Just <$> B.ManagedPtr.newObject Widget ptr
        else return P.Nothing
        
    

#if defined(ENABLE_OVERLOADING)
type family ResolveWidgetMethod (t :: Symbol) (o :: DK.Type) :: DK.Type where
    ResolveWidgetMethod "actionSetEnabled" o = WidgetActionSetEnabledMethodInfo
    ResolveWidgetMethod "activate" o = WidgetActivateMethodInfo
    ResolveWidgetMethod "activateAction" o = WidgetActivateActionMethodInfo
    ResolveWidgetMethod "activateDefault" o = WidgetActivateDefaultMethodInfo
    ResolveWidgetMethod "addController" o = WidgetAddControllerMethodInfo
    ResolveWidgetMethod "addCssClass" o = WidgetAddCssClassMethodInfo
    ResolveWidgetMethod "addMnemonicLabel" o = WidgetAddMnemonicLabelMethodInfo
    ResolveWidgetMethod "addTickCallback" o = WidgetAddTickCallbackMethodInfo
    ResolveWidgetMethod "allocate" o = WidgetAllocateMethodInfo
    ResolveWidgetMethod "announce" o = Gtk.Accessible.AccessibleAnnounceMethodInfo
    ResolveWidgetMethod "bindProperty" o = GObject.Object.ObjectBindPropertyMethodInfo
    ResolveWidgetMethod "bindPropertyFull" o = GObject.Object.ObjectBindPropertyFullMethodInfo
    ResolveWidgetMethod "childFocus" o = WidgetChildFocusMethodInfo
    ResolveWidgetMethod "computeBounds" o = WidgetComputeBoundsMethodInfo
    ResolveWidgetMethod "computeExpand" o = WidgetComputeExpandMethodInfo
    ResolveWidgetMethod "computePoint" o = WidgetComputePointMethodInfo
    ResolveWidgetMethod "computeTransform" o = WidgetComputeTransformMethodInfo
    ResolveWidgetMethod "contains" o = WidgetContainsMethodInfo
    ResolveWidgetMethod "createPangoContext" o = WidgetCreatePangoContextMethodInfo
    ResolveWidgetMethod "createPangoLayout" o = WidgetCreatePangoLayoutMethodInfo
    ResolveWidgetMethod "disposeTemplate" o = WidgetDisposeTemplateMethodInfo
    ResolveWidgetMethod "dragCheckThreshold" o = WidgetDragCheckThresholdMethodInfo
    ResolveWidgetMethod "errorBell" o = WidgetErrorBellMethodInfo
    ResolveWidgetMethod "forceFloating" o = GObject.Object.ObjectForceFloatingMethodInfo
    ResolveWidgetMethod "freezeNotify" o = GObject.Object.ObjectFreezeNotifyMethodInfo
    ResolveWidgetMethod "getv" o = GObject.Object.ObjectGetvMethodInfo
    ResolveWidgetMethod "grabFocus" o = WidgetGrabFocusMethodInfo
    ResolveWidgetMethod "hasCssClass" o = WidgetHasCssClassMethodInfo
    ResolveWidgetMethod "hasDefault" o = WidgetHasDefaultMethodInfo
    ResolveWidgetMethod "hasFocus" o = WidgetHasFocusMethodInfo
    ResolveWidgetMethod "hasVisibleFocus" o = WidgetHasVisibleFocusMethodInfo
    ResolveWidgetMethod "hide" o = WidgetHideMethodInfo
    ResolveWidgetMethod "inDestruction" o = WidgetInDestructionMethodInfo
    ResolveWidgetMethod "initTemplate" o = WidgetInitTemplateMethodInfo
    ResolveWidgetMethod "insertActionGroup" o = WidgetInsertActionGroupMethodInfo
    ResolveWidgetMethod "insertAfter" o = WidgetInsertAfterMethodInfo
    ResolveWidgetMethod "insertBefore" o = WidgetInsertBeforeMethodInfo
    ResolveWidgetMethod "isAncestor" o = WidgetIsAncestorMethodInfo
    ResolveWidgetMethod "isDrawable" o = WidgetIsDrawableMethodInfo
    ResolveWidgetMethod "isFloating" o = GObject.Object.ObjectIsFloatingMethodInfo
    ResolveWidgetMethod "isFocus" o = WidgetIsFocusMethodInfo
    ResolveWidgetMethod "isSensitive" o = WidgetIsSensitiveMethodInfo
    ResolveWidgetMethod "isVisible" o = WidgetIsVisibleMethodInfo
    ResolveWidgetMethod "keynavFailed" o = WidgetKeynavFailedMethodInfo
    ResolveWidgetMethod "listMnemonicLabels" o = WidgetListMnemonicLabelsMethodInfo
    ResolveWidgetMethod "map" o = WidgetMapMethodInfo
    ResolveWidgetMethod "measure" o = WidgetMeasureMethodInfo
    ResolveWidgetMethod "mnemonicActivate" o = WidgetMnemonicActivateMethodInfo
    ResolveWidgetMethod "notify" o = GObject.Object.ObjectNotifyMethodInfo
    ResolveWidgetMethod "notifyByPspec" o = GObject.Object.ObjectNotifyByPspecMethodInfo
    ResolveWidgetMethod "observeChildren" o = WidgetObserveChildrenMethodInfo
    ResolveWidgetMethod "observeControllers" o = WidgetObserveControllersMethodInfo
    ResolveWidgetMethod "pick" o = WidgetPickMethodInfo
    ResolveWidgetMethod "queueAllocate" o = WidgetQueueAllocateMethodInfo
    ResolveWidgetMethod "queueDraw" o = WidgetQueueDrawMethodInfo
    ResolveWidgetMethod "queueResize" o = WidgetQueueResizeMethodInfo
    ResolveWidgetMethod "realize" o = WidgetRealizeMethodInfo
    ResolveWidgetMethod "ref" o = GObject.Object.ObjectRefMethodInfo
    ResolveWidgetMethod "refSink" o = GObject.Object.ObjectRefSinkMethodInfo
    ResolveWidgetMethod "removeController" o = WidgetRemoveControllerMethodInfo
    ResolveWidgetMethod "removeCssClass" o = WidgetRemoveCssClassMethodInfo
    ResolveWidgetMethod "removeMnemonicLabel" o = WidgetRemoveMnemonicLabelMethodInfo
    ResolveWidgetMethod "removeTickCallback" o = WidgetRemoveTickCallbackMethodInfo
    ResolveWidgetMethod "resetProperty" o = Gtk.Accessible.AccessibleResetPropertyMethodInfo
    ResolveWidgetMethod "resetRelation" o = Gtk.Accessible.AccessibleResetRelationMethodInfo
    ResolveWidgetMethod "resetState" o = Gtk.Accessible.AccessibleResetStateMethodInfo
    ResolveWidgetMethod "runDispose" o = GObject.Object.ObjectRunDisposeMethodInfo
    ResolveWidgetMethod "shouldLayout" o = WidgetShouldLayoutMethodInfo
    ResolveWidgetMethod "show" o = WidgetShowMethodInfo
    ResolveWidgetMethod "sizeAllocate" o = WidgetSizeAllocateMethodInfo
    ResolveWidgetMethod "snapshotChild" o = WidgetSnapshotChildMethodInfo
    ResolveWidgetMethod "stealData" o = GObject.Object.ObjectStealDataMethodInfo
    ResolveWidgetMethod "stealQdata" o = GObject.Object.ObjectStealQdataMethodInfo
    ResolveWidgetMethod "thawNotify" o = GObject.Object.ObjectThawNotifyMethodInfo
    ResolveWidgetMethod "translateCoordinates" o = WidgetTranslateCoordinatesMethodInfo
    ResolveWidgetMethod "triggerTooltipQuery" o = WidgetTriggerTooltipQueryMethodInfo
    ResolveWidgetMethod "unmap" o = WidgetUnmapMethodInfo
    ResolveWidgetMethod "unparent" o = WidgetUnparentMethodInfo
    ResolveWidgetMethod "unrealize" o = WidgetUnrealizeMethodInfo
    ResolveWidgetMethod "unref" o = GObject.Object.ObjectUnrefMethodInfo
    ResolveWidgetMethod "unsetStateFlags" o = WidgetUnsetStateFlagsMethodInfo
    ResolveWidgetMethod "updateNextAccessibleSibling" o = Gtk.Accessible.AccessibleUpdateNextAccessibleSiblingMethodInfo
    ResolveWidgetMethod "updatePlatformState" o = Gtk.Accessible.AccessibleUpdatePlatformStateMethodInfo
    ResolveWidgetMethod "updateProperty" o = Gtk.Accessible.AccessibleUpdatePropertyMethodInfo
    ResolveWidgetMethod "updateRelation" o = Gtk.Accessible.AccessibleUpdateRelationMethodInfo
    ResolveWidgetMethod "updateState" o = Gtk.Accessible.AccessibleUpdateStateMethodInfo
    ResolveWidgetMethod "watchClosure" o = GObject.Object.ObjectWatchClosureMethodInfo
    ResolveWidgetMethod "getAccessibleId" o = Gtk.Accessible.AccessibleGetAccessibleIdMethodInfo
    ResolveWidgetMethod "getAccessibleParent" o = Gtk.Accessible.AccessibleGetAccessibleParentMethodInfo
    ResolveWidgetMethod "getAccessibleRole" o = Gtk.Accessible.AccessibleGetAccessibleRoleMethodInfo
    ResolveWidgetMethod "getAllocatedBaseline" o = WidgetGetAllocatedBaselineMethodInfo
    ResolveWidgetMethod "getAllocatedHeight" o = WidgetGetAllocatedHeightMethodInfo
    ResolveWidgetMethod "getAllocatedWidth" o = WidgetGetAllocatedWidthMethodInfo
    ResolveWidgetMethod "getAllocation" o = WidgetGetAllocationMethodInfo
    ResolveWidgetMethod "getAncestor" o = WidgetGetAncestorMethodInfo
    ResolveWidgetMethod "getAtContext" o = Gtk.Accessible.AccessibleGetAtContextMethodInfo
    ResolveWidgetMethod "getBaseline" o = WidgetGetBaselineMethodInfo
    ResolveWidgetMethod "getBounds" o = Gtk.Accessible.AccessibleGetBoundsMethodInfo
    ResolveWidgetMethod "getBuildableId" o = Gtk.Buildable.BuildableGetBuildableIdMethodInfo
    ResolveWidgetMethod "getCanFocus" o = WidgetGetCanFocusMethodInfo
    ResolveWidgetMethod "getCanTarget" o = WidgetGetCanTargetMethodInfo
    ResolveWidgetMethod "getChildVisible" o = WidgetGetChildVisibleMethodInfo
    ResolveWidgetMethod "getClipboard" o = WidgetGetClipboardMethodInfo
    ResolveWidgetMethod "getColor" o = WidgetGetColorMethodInfo
    ResolveWidgetMethod "getCssClasses" o = WidgetGetCssClassesMethodInfo
    ResolveWidgetMethod "getCssName" o = WidgetGetCssNameMethodInfo
    ResolveWidgetMethod "getCursor" o = WidgetGetCursorMethodInfo
    ResolveWidgetMethod "getData" o = GObject.Object.ObjectGetDataMethodInfo
    ResolveWidgetMethod "getDirection" o = WidgetGetDirectionMethodInfo
    ResolveWidgetMethod "getDisplay" o = WidgetGetDisplayMethodInfo
    ResolveWidgetMethod "getFirstAccessibleChild" o = Gtk.Accessible.AccessibleGetFirstAccessibleChildMethodInfo
    ResolveWidgetMethod "getFirstChild" o = WidgetGetFirstChildMethodInfo
    ResolveWidgetMethod "getFocusChild" o = WidgetGetFocusChildMethodInfo
    ResolveWidgetMethod "getFocusOnClick" o = WidgetGetFocusOnClickMethodInfo
    ResolveWidgetMethod "getFocusable" o = WidgetGetFocusableMethodInfo
    ResolveWidgetMethod "getFontMap" o = WidgetGetFontMapMethodInfo
    ResolveWidgetMethod "getFontOptions" o = WidgetGetFontOptionsMethodInfo
    ResolveWidgetMethod "getFrameClock" o = WidgetGetFrameClockMethodInfo
    ResolveWidgetMethod "getHalign" o = WidgetGetHalignMethodInfo
    ResolveWidgetMethod "getHasTooltip" o = WidgetGetHasTooltipMethodInfo
    ResolveWidgetMethod "getHeight" o = WidgetGetHeightMethodInfo
    ResolveWidgetMethod "getHexpand" o = WidgetGetHexpandMethodInfo
    ResolveWidgetMethod "getHexpandSet" o = WidgetGetHexpandSetMethodInfo
    ResolveWidgetMethod "getLastChild" o = WidgetGetLastChildMethodInfo
    ResolveWidgetMethod "getLayoutManager" o = WidgetGetLayoutManagerMethodInfo
    ResolveWidgetMethod "getLimitEvents" o = WidgetGetLimitEventsMethodInfo
    ResolveWidgetMethod "getMapped" o = WidgetGetMappedMethodInfo
    ResolveWidgetMethod "getMarginBottom" o = WidgetGetMarginBottomMethodInfo
    ResolveWidgetMethod "getMarginEnd" o = WidgetGetMarginEndMethodInfo
    ResolveWidgetMethod "getMarginStart" o = WidgetGetMarginStartMethodInfo
    ResolveWidgetMethod "getMarginTop" o = WidgetGetMarginTopMethodInfo
    ResolveWidgetMethod "getName" o = WidgetGetNameMethodInfo
    ResolveWidgetMethod "getNative" o = WidgetGetNativeMethodInfo
    ResolveWidgetMethod "getNextAccessibleSibling" o = Gtk.Accessible.AccessibleGetNextAccessibleSiblingMethodInfo
    ResolveWidgetMethod "getNextSibling" o = WidgetGetNextSiblingMethodInfo
    ResolveWidgetMethod "getOpacity" o = WidgetGetOpacityMethodInfo
    ResolveWidgetMethod "getOverflow" o = WidgetGetOverflowMethodInfo
    ResolveWidgetMethod "getPangoContext" o = WidgetGetPangoContextMethodInfo
    ResolveWidgetMethod "getParent" o = WidgetGetParentMethodInfo
    ResolveWidgetMethod "getPlatformState" o = Gtk.Accessible.AccessibleGetPlatformStateMethodInfo
    ResolveWidgetMethod "getPreferredSize" o = WidgetGetPreferredSizeMethodInfo
    ResolveWidgetMethod "getPrevSibling" o = WidgetGetPrevSiblingMethodInfo
    ResolveWidgetMethod "getPrimaryClipboard" o = WidgetGetPrimaryClipboardMethodInfo
    ResolveWidgetMethod "getProperty" o = GObject.Object.ObjectGetPropertyMethodInfo
    ResolveWidgetMethod "getQdata" o = GObject.Object.ObjectGetQdataMethodInfo
    ResolveWidgetMethod "getRealized" o = WidgetGetRealizedMethodInfo
    ResolveWidgetMethod "getReceivesDefault" o = WidgetGetReceivesDefaultMethodInfo
    ResolveWidgetMethod "getRequestMode" o = WidgetGetRequestModeMethodInfo
    ResolveWidgetMethod "getRoot" o = WidgetGetRootMethodInfo
    ResolveWidgetMethod "getScaleFactor" o = WidgetGetScaleFactorMethodInfo
    ResolveWidgetMethod "getSensitive" o = WidgetGetSensitiveMethodInfo
    ResolveWidgetMethod "getSettings" o = WidgetGetSettingsMethodInfo
    ResolveWidgetMethod "getSize" o = WidgetGetSizeMethodInfo
    ResolveWidgetMethod "getSizeRequest" o = WidgetGetSizeRequestMethodInfo
    ResolveWidgetMethod "getStateFlags" o = WidgetGetStateFlagsMethodInfo
    ResolveWidgetMethod "getStyleContext" o = WidgetGetStyleContextMethodInfo
    ResolveWidgetMethod "getTemplateChild" o = WidgetGetTemplateChildMethodInfo
    ResolveWidgetMethod "getTooltipMarkup" o = WidgetGetTooltipMarkupMethodInfo
    ResolveWidgetMethod "getTooltipText" o = WidgetGetTooltipTextMethodInfo
    ResolveWidgetMethod "getValign" o = WidgetGetValignMethodInfo
    ResolveWidgetMethod "getVexpand" o = WidgetGetVexpandMethodInfo
    ResolveWidgetMethod "getVexpandSet" o = WidgetGetVexpandSetMethodInfo
    ResolveWidgetMethod "getVisible" o = WidgetGetVisibleMethodInfo
    ResolveWidgetMethod "getWidth" o = WidgetGetWidthMethodInfo
    ResolveWidgetMethod "setAccessibleParent" o = Gtk.Accessible.AccessibleSetAccessibleParentMethodInfo
    ResolveWidgetMethod "setCanFocus" o = WidgetSetCanFocusMethodInfo
    ResolveWidgetMethod "setCanTarget" o = WidgetSetCanTargetMethodInfo
    ResolveWidgetMethod "setChildVisible" o = WidgetSetChildVisibleMethodInfo
    ResolveWidgetMethod "setCssClasses" o = WidgetSetCssClassesMethodInfo
    ResolveWidgetMethod "setCursor" o = WidgetSetCursorMethodInfo
    ResolveWidgetMethod "setCursorFromName" o = WidgetSetCursorFromNameMethodInfo
    ResolveWidgetMethod "setData" o = GObject.Object.ObjectSetDataMethodInfo
    ResolveWidgetMethod "setDataFull" o = GObject.Object.ObjectSetDataFullMethodInfo
    ResolveWidgetMethod "setDirection" o = WidgetSetDirectionMethodInfo
    ResolveWidgetMethod "setFocusChild" o = WidgetSetFocusChildMethodInfo
    ResolveWidgetMethod "setFocusOnClick" o = WidgetSetFocusOnClickMethodInfo
    ResolveWidgetMethod "setFocusable" o = WidgetSetFocusableMethodInfo
    ResolveWidgetMethod "setFontMap" o = WidgetSetFontMapMethodInfo
    ResolveWidgetMethod "setFontOptions" o = WidgetSetFontOptionsMethodInfo
    ResolveWidgetMethod "setHalign" o = WidgetSetHalignMethodInfo
    ResolveWidgetMethod "setHasTooltip" o = WidgetSetHasTooltipMethodInfo
    ResolveWidgetMethod "setHexpand" o = WidgetSetHexpandMethodInfo
    ResolveWidgetMethod "setHexpandSet" o = WidgetSetHexpandSetMethodInfo
    ResolveWidgetMethod "setLayoutManager" o = WidgetSetLayoutManagerMethodInfo
    ResolveWidgetMethod "setLimitEvents" o = WidgetSetLimitEventsMethodInfo
    ResolveWidgetMethod "setMarginBottom" o = WidgetSetMarginBottomMethodInfo
    ResolveWidgetMethod "setMarginEnd" o = WidgetSetMarginEndMethodInfo
    ResolveWidgetMethod "setMarginStart" o = WidgetSetMarginStartMethodInfo
    ResolveWidgetMethod "setMarginTop" o = WidgetSetMarginTopMethodInfo
    ResolveWidgetMethod "setName" o = WidgetSetNameMethodInfo
    ResolveWidgetMethod "setOpacity" o = WidgetSetOpacityMethodInfo
    ResolveWidgetMethod "setOverflow" o = WidgetSetOverflowMethodInfo
    ResolveWidgetMethod "setParent" o = WidgetSetParentMethodInfo
    ResolveWidgetMethod "setProperty" o = GObject.Object.ObjectSetPropertyMethodInfo
    ResolveWidgetMethod "setReceivesDefault" o = WidgetSetReceivesDefaultMethodInfo
    ResolveWidgetMethod "setSensitive" o = WidgetSetSensitiveMethodInfo
    ResolveWidgetMethod "setSizeRequest" o = WidgetSetSizeRequestMethodInfo
    ResolveWidgetMethod "setStateFlags" o = WidgetSetStateFlagsMethodInfo
    ResolveWidgetMethod "setTooltipMarkup" o = WidgetSetTooltipMarkupMethodInfo
    ResolveWidgetMethod "setTooltipText" o = WidgetSetTooltipTextMethodInfo
    ResolveWidgetMethod "setValign" o = WidgetSetValignMethodInfo
    ResolveWidgetMethod "setVexpand" o = WidgetSetVexpandMethodInfo
    ResolveWidgetMethod "setVexpandSet" o = WidgetSetVexpandSetMethodInfo
    ResolveWidgetMethod "setVisible" o = WidgetSetVisibleMethodInfo
    ResolveWidgetMethod l o = O.MethodResolutionFailed l o

instance (info ~ ResolveWidgetMethod t Widget, O.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::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_WidgetDestroyCallback
wrap_WidgetDestroyCallback a -> IO ()
gi'cb Ptr Widget
gi'selfPtr Ptr ()
_ = do
    Ptr Widget -> (Widget -> IO ()) -> IO ()
forall o b.
(HasCallStack, GObject o) =>
Ptr o -> (o -> IO b) -> IO b
B.ManagedPtr.withNewObject 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
forall a b. Coercible a b => a -> b
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 a. IO a -> m a
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_WidgetDestroyCallback
wrapped' = (a -> IO ()) -> C_WidgetDestroyCallback
forall a. GObject a => (a -> IO ()) -> C_WidgetDestroyCallback
wrap_WidgetDestroyCallback a -> IO ()
wrapped
    wrapped'' <- C_WidgetDestroyCallback -> IO (FunPtr C_WidgetDestroyCallback)
mk_WidgetDestroyCallback C_WidgetDestroyCallback
wrapped'
    connectSignalFunPtr obj "destroy" wrapped'' SignalConnectBefore 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 a. IO a -> m a
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_WidgetDestroyCallback
wrapped' = (a -> IO ()) -> C_WidgetDestroyCallback
forall a. GObject a => (a -> IO ()) -> C_WidgetDestroyCallback
wrap_WidgetDestroyCallback a -> IO ()
wrapped
    wrapped'' <- C_WidgetDestroyCallback -> IO (FunPtr C_WidgetDestroyCallback)
mk_WidgetDestroyCallback C_WidgetDestroyCallback
wrapped'
    connectSignalFunPtr obj "destroy" wrapped'' SignalConnectAfter 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-gtk4-4.0.12/docs/GI-Gtk-Objects-Widget.html#g:signal:destroy"})

#endif

-- signal Widget::direction-changed
-- | Emitted when the text direction of a widget changes.
type WidgetDirectionChangedCallback =
    Gtk.Enums.TextDirection
    -- ^ /@previousDirection@/: the previous text direction
    -> 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 o b.
(HasCallStack, GObject o) =>
Ptr o -> (o -> IO b) -> IO b
B.ManagedPtr.withNewObject 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
forall a b. Coercible a b => a -> b
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 a. IO a -> m a
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
    wrapped'' <- C_WidgetDirectionChangedCallback
-> IO (FunPtr C_WidgetDirectionChangedCallback)
mk_WidgetDirectionChangedCallback C_WidgetDirectionChangedCallback
wrapped'
    connectSignalFunPtr obj "direction-changed" wrapped'' SignalConnectBefore 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 a. IO a -> m a
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
    wrapped'' <- C_WidgetDirectionChangedCallback
-> IO (FunPtr C_WidgetDirectionChangedCallback)
mk_WidgetDirectionChangedCallback C_WidgetDirectionChangedCallback
wrapped'
    connectSignalFunPtr obj "direction-changed" wrapped'' SignalConnectAfter 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-gtk4-4.0.12/docs/GI-Gtk-Objects-Widget.html#g:signal:directionChanged"})

#endif

-- signal Widget::hide
-- | Emitted when /@widget@/ is hidden.
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_WidgetDestroyCallback
wrap_WidgetHideCallback a -> IO ()
gi'cb Ptr Widget
gi'selfPtr Ptr ()
_ = do
    Ptr Widget -> (Widget -> IO ()) -> IO ()
forall o b.
(HasCallStack, GObject o) =>
Ptr o -> (o -> IO b) -> IO b
B.ManagedPtr.withNewObject 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
forall a b. Coercible a b => a -> b
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 a. IO a -> m a
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_WidgetDestroyCallback
wrapped' = (a -> IO ()) -> C_WidgetDestroyCallback
forall a. GObject a => (a -> IO ()) -> C_WidgetDestroyCallback
wrap_WidgetHideCallback a -> IO ()
wrapped
    wrapped'' <- C_WidgetDestroyCallback -> IO (FunPtr C_WidgetDestroyCallback)
mk_WidgetHideCallback C_WidgetDestroyCallback
wrapped'
    connectSignalFunPtr obj "hide" wrapped'' SignalConnectBefore 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 a. IO a -> m a
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_WidgetDestroyCallback
wrapped' = (a -> IO ()) -> C_WidgetDestroyCallback
forall a. GObject a => (a -> IO ()) -> C_WidgetDestroyCallback
wrap_WidgetHideCallback a -> IO ()
wrapped
    wrapped'' <- C_WidgetDestroyCallback -> IO (FunPtr C_WidgetDestroyCallback)
mk_WidgetHideCallback C_WidgetDestroyCallback
wrapped'
    connectSignalFunPtr obj "hide" wrapped'' SignalConnectAfter 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-gtk4-4.0.12/docs/GI-Gtk-Objects-Widget.html#g:signal:hide"})

#endif

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

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 -> WidgetKeynavFailedCallback) -> C_WidgetKeynavFailedCallback
wrap_WidgetKeynavFailedCallback a -> WidgetKeynavFailedCallback
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
    result <- Ptr Widget -> (Widget -> IO Bool) -> IO Bool
forall o b.
(HasCallStack, GObject o) =>
Ptr o -> (o -> IO b) -> IO b
B.ManagedPtr.withNewObject 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 -> WidgetKeynavFailedCallback
gi'cb (Widget -> a
forall a b. Coercible a b => a -> b
Coerce.coerce Widget
gi'self)  DirectionType
direction'
    let result' = (Int -> CInt
forall a b. (Integral a, Num b) => a -> b
P.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
P.fromEnum) Bool
result
    return 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) => WidgetKeynavFailedCallback) -> m SignalHandlerId
onWidgetKeynavFailed a
obj (?self::a) => WidgetKeynavFailedCallback
cb = IO SignalHandlerId -> m SignalHandlerId
forall a. IO a -> m a
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 -> WidgetKeynavFailedCallback
wrapped a
self = let ?self = a
?self::a
self in (?self::a) => WidgetKeynavFailedCallback
WidgetKeynavFailedCallback
cb
    let wrapped' :: C_WidgetKeynavFailedCallback
wrapped' = (a -> WidgetKeynavFailedCallback) -> C_WidgetKeynavFailedCallback
forall a.
GObject a =>
(a -> WidgetKeynavFailedCallback) -> C_WidgetKeynavFailedCallback
wrap_WidgetKeynavFailedCallback a -> WidgetKeynavFailedCallback
wrapped
    wrapped'' <- C_WidgetKeynavFailedCallback
-> IO (FunPtr C_WidgetKeynavFailedCallback)
mk_WidgetKeynavFailedCallback C_WidgetKeynavFailedCallback
wrapped'
    connectSignalFunPtr obj "keynav-failed" wrapped'' SignalConnectBefore 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) => WidgetKeynavFailedCallback) -> m SignalHandlerId
afterWidgetKeynavFailed a
obj (?self::a) => WidgetKeynavFailedCallback
cb = IO SignalHandlerId -> m SignalHandlerId
forall a. IO a -> m a
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 -> WidgetKeynavFailedCallback
wrapped a
self = let ?self = a
?self::a
self in (?self::a) => WidgetKeynavFailedCallback
WidgetKeynavFailedCallback
cb
    let wrapped' :: C_WidgetKeynavFailedCallback
wrapped' = (a -> WidgetKeynavFailedCallback) -> C_WidgetKeynavFailedCallback
forall a.
GObject a =>
(a -> WidgetKeynavFailedCallback) -> C_WidgetKeynavFailedCallback
wrap_WidgetKeynavFailedCallback a -> WidgetKeynavFailedCallback
wrapped
    wrapped'' <- C_WidgetKeynavFailedCallback
-> IO (FunPtr C_WidgetKeynavFailedCallback)
mk_WidgetKeynavFailedCallback C_WidgetKeynavFailedCallback
wrapped'
    connectSignalFunPtr obj "keynav-failed" wrapped'' SignalConnectAfter 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-gtk4-4.0.12/docs/GI-Gtk-Objects-Widget.html#g:signal:keynavFailed"})

#endif

-- signal Widget::map
-- | Emitted when /@widget@/ is going to be mapped.
-- 
-- A widget is mapped when the widget is visible (which is controlled with
-- [Widget:visible]("GI.Gtk.Objects.Widget#g:attr:visible")) and all its parents up to the toplevel widget
-- are also visible.
-- 
-- The @::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 [Widget::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_WidgetDestroyCallback
wrap_WidgetMapCallback a -> IO ()
gi'cb Ptr Widget
gi'selfPtr Ptr ()
_ = do
    Ptr Widget -> (Widget -> IO ()) -> IO ()
forall o b.
(HasCallStack, GObject o) =>
Ptr o -> (o -> IO b) -> IO b
B.ManagedPtr.withNewObject 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
forall a b. Coercible a b => a -> b
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 a. IO a -> m a
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_WidgetDestroyCallback
wrapped' = (a -> IO ()) -> C_WidgetDestroyCallback
forall a. GObject a => (a -> IO ()) -> C_WidgetDestroyCallback
wrap_WidgetMapCallback a -> IO ()
wrapped
    wrapped'' <- C_WidgetDestroyCallback -> IO (FunPtr C_WidgetDestroyCallback)
mk_WidgetMapCallback C_WidgetDestroyCallback
wrapped'
    connectSignalFunPtr obj "map" wrapped'' SignalConnectBefore 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 a. IO a -> m a
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_WidgetDestroyCallback
wrapped' = (a -> IO ()) -> C_WidgetDestroyCallback
forall a. GObject a => (a -> IO ()) -> C_WidgetDestroyCallback
wrap_WidgetMapCallback a -> IO ()
wrapped
    wrapped'' <- C_WidgetDestroyCallback -> IO (FunPtr C_WidgetDestroyCallback)
mk_WidgetMapCallback C_WidgetDestroyCallback
wrapped'
    connectSignalFunPtr obj "map" wrapped'' SignalConnectAfter 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-gtk4-4.0.12/docs/GI-Gtk-Objects-Widget.html#g:signal:map"})

#endif

-- signal Widget::mnemonic-activate
-- | Emitted when a widget is activated via a mnemonic.
-- 
-- The default handler for this signal activates /@widget@/ if /@groupCycling@/
-- is false, or just makes /@widget@/ grab focus if /@groupCycling@/ is true.
type WidgetMnemonicActivateCallback =
    Bool
    -- ^ /@groupCycling@/: true if there are other widgets with the same mnemonic
    -> IO Bool
    -- ^ __Returns:__ true to stop other handlers from being invoked for the event,
    --   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
    result <- Ptr Widget -> (Widget -> IO Bool) -> IO Bool
forall o b.
(HasCallStack, GObject o) =>
Ptr o -> (o -> IO b) -> IO b
B.ManagedPtr.withNewObject 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
forall a b. Coercible a b => a -> b
Coerce.coerce Widget
gi'self)  Bool
groupCycling'
    let result' = (Int -> CInt
forall a b. (Integral a, Num b) => a -> b
P.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
P.fromEnum) Bool
result
    return 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 a. IO a -> m a
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
    wrapped'' <- C_WidgetMnemonicActivateCallback
-> IO (FunPtr C_WidgetMnemonicActivateCallback)
mk_WidgetMnemonicActivateCallback C_WidgetMnemonicActivateCallback
wrapped'
    connectSignalFunPtr obj "mnemonic-activate" wrapped'' SignalConnectBefore 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 a. IO a -> m a
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
    wrapped'' <- C_WidgetMnemonicActivateCallback
-> IO (FunPtr C_WidgetMnemonicActivateCallback)
mk_WidgetMnemonicActivateCallback C_WidgetMnemonicActivateCallback
wrapped'
    connectSignalFunPtr obj "mnemonic-activate" wrapped'' SignalConnectAfter 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-gtk4-4.0.12/docs/GI-Gtk-Objects-Widget.html#g:signal:mnemonicActivate"})

#endif

-- signal Widget::move-focus
-- | Emitted when the focus is moved.
-- 
-- The @::move-focus@ signal is a <https://docs.gtk.org/gtk4/class.SignalAction.html keybinding signal>.
-- 
-- The default bindings for this signal are \<kbd>Tab\<\/kbd> to move forward,
-- and \<kbd>Shift\<\/kbd>+\<kbd>Tab\<\/kbd> to move backward.
type WidgetMoveFocusCallback =
    Gtk.Enums.DirectionType
    -- ^ /@direction@/: the direction of the focus move
    -> 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 o b.
(HasCallStack, GObject o) =>
Ptr o -> (o -> IO b) -> IO b
B.ManagedPtr.withNewObject 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
forall a b. Coercible a b => a -> b
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 a. IO a -> m a
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
    wrapped'' <- C_WidgetDirectionChangedCallback
-> IO (FunPtr C_WidgetDirectionChangedCallback)
mk_WidgetMoveFocusCallback C_WidgetDirectionChangedCallback
wrapped'
    connectSignalFunPtr obj "move-focus" wrapped'' SignalConnectBefore 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 a. IO a -> m a
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
    wrapped'' <- C_WidgetDirectionChangedCallback
-> IO (FunPtr C_WidgetDirectionChangedCallback)
mk_WidgetMoveFocusCallback C_WidgetDirectionChangedCallback
wrapped'
    connectSignalFunPtr obj "move-focus" wrapped'' SignalConnectAfter 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-gtk4-4.0.12/docs/GI-Gtk-Objects-Widget.html#g:signal:moveFocus"})

#endif

-- signal Widget::query-tooltip
-- | Emitted when the widget’s tooltip is about to be shown.
-- 
-- This happens when the [Widget:hasTooltip]("GI.Gtk.Objects.Widget#g:attr:hasTooltip") property
-- is 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
-- true should be returned, false otherwise. Note that if /@keyboardMode@/
-- is true, the values of /@x@/ and /@y@/ are undefined and should not be used.
-- 
-- The signal handler is free to manipulate /@tooltip@/ with the therefore
-- destined function calls.
type WidgetQueryTooltipCallback =
    Int32
    -- ^ /@x@/: the x coordinate of the cursor position in widget coordinates
    -> Int32
    -- ^ /@y@/: the y coordinate of the cursor position in widget coordinates
    -> Bool
    -- ^ /@keyboardMode@/: true if the tooltip was triggered using the keyboard
    -> Gtk.Tooltip.Tooltip
    -- ^ /@tooltip@/: a @GtkTooltip@
    -> IO Bool
    -- ^ __Returns:__ true if /@tooltip@/ should be shown right now, 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' <- ((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
    result <- B.ManagedPtr.withNewObject gi'selfPtr $ \Widget
gi'self -> a -> WidgetQueryTooltipCallback
gi'cb (Widget -> a
forall a b. Coercible a b => a -> b
Coerce.coerce Widget
gi'self)  Int32
x Int32
y Bool
keyboardMode' Tooltip
tooltip'
    let result' = (Int -> CInt
forall a b. (Integral a, Num b) => a -> b
P.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
P.fromEnum) Bool
result
    return 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 a. IO a -> m a
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
    wrapped'' <- C_WidgetQueryTooltipCallback
-> IO (FunPtr C_WidgetQueryTooltipCallback)
mk_WidgetQueryTooltipCallback C_WidgetQueryTooltipCallback
wrapped'
    connectSignalFunPtr obj "query-tooltip" wrapped'' SignalConnectBefore 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 a. IO a -> m a
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
    wrapped'' <- C_WidgetQueryTooltipCallback
-> IO (FunPtr C_WidgetQueryTooltipCallback)
mk_WidgetQueryTooltipCallback C_WidgetQueryTooltipCallback
wrapped'
    connectSignalFunPtr obj "query-tooltip" wrapped'' SignalConnectAfter 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-gtk4-4.0.12/docs/GI-Gtk-Objects-Widget.html#g:signal:queryTooltip"})

#endif

-- signal Widget::realize
-- | Emitted when /@widget@/ is associated with a @GdkSurface@.
-- 
-- This 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_WidgetDestroyCallback
wrap_WidgetRealizeCallback a -> IO ()
gi'cb Ptr Widget
gi'selfPtr Ptr ()
_ = do
    Ptr Widget -> (Widget -> IO ()) -> IO ()
forall o b.
(HasCallStack, GObject o) =>
Ptr o -> (o -> IO b) -> IO b
B.ManagedPtr.withNewObject 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
forall a b. Coercible a b => a -> b
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 a. IO a -> m a
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_WidgetDestroyCallback
wrapped' = (a -> IO ()) -> C_WidgetDestroyCallback
forall a. GObject a => (a -> IO ()) -> C_WidgetDestroyCallback
wrap_WidgetRealizeCallback a -> IO ()
wrapped
    wrapped'' <- C_WidgetDestroyCallback -> IO (FunPtr C_WidgetDestroyCallback)
mk_WidgetRealizeCallback C_WidgetDestroyCallback
wrapped'
    connectSignalFunPtr obj "realize" wrapped'' SignalConnectBefore 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 a. IO a -> m a
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_WidgetDestroyCallback
wrapped' = (a -> IO ()) -> C_WidgetDestroyCallback
forall a. GObject a => (a -> IO ()) -> C_WidgetDestroyCallback
wrap_WidgetRealizeCallback a -> IO ()
wrapped
    wrapped'' <- C_WidgetDestroyCallback -> IO (FunPtr C_WidgetDestroyCallback)
mk_WidgetRealizeCallback C_WidgetDestroyCallback
wrapped'
    connectSignalFunPtr obj "realize" wrapped'' SignalConnectAfter 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-gtk4-4.0.12/docs/GI-Gtk-Objects-Widget.html#g:signal:realize"})

#endif

-- signal Widget::show
-- | Emitted when /@widget@/ is shown.
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_WidgetDestroyCallback
wrap_WidgetShowCallback a -> IO ()
gi'cb Ptr Widget
gi'selfPtr Ptr ()
_ = do
    Ptr Widget -> (Widget -> IO ()) -> IO ()
forall o b.
(HasCallStack, GObject o) =>
Ptr o -> (o -> IO b) -> IO b
B.ManagedPtr.withNewObject 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
forall a b. Coercible a b => a -> b
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 a. IO a -> m a
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_WidgetDestroyCallback
wrapped' = (a -> IO ()) -> C_WidgetDestroyCallback
forall a. GObject a => (a -> IO ()) -> C_WidgetDestroyCallback
wrap_WidgetShowCallback a -> IO ()
wrapped
    wrapped'' <- C_WidgetDestroyCallback -> IO (FunPtr C_WidgetDestroyCallback)
mk_WidgetShowCallback C_WidgetDestroyCallback
wrapped'
    connectSignalFunPtr obj "show" wrapped'' SignalConnectBefore 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 a. IO a -> m a
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_WidgetDestroyCallback
wrapped' = (a -> IO ()) -> C_WidgetDestroyCallback
forall a. GObject a => (a -> IO ()) -> C_WidgetDestroyCallback
wrap_WidgetShowCallback a -> IO ()
wrapped
    wrapped'' <- C_WidgetDestroyCallback -> IO (FunPtr C_WidgetDestroyCallback)
mk_WidgetShowCallback C_WidgetDestroyCallback
wrapped'
    connectSignalFunPtr obj "show" wrapped'' SignalConnectAfter 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-gtk4-4.0.12/docs/GI-Gtk-Objects-Widget.html#g:signal:show"})

#endif

-- signal Widget::state-flags-changed
-- | Emitted when the widget state changes.
-- 
-- See 'GI.Gtk.Objects.Widget.widgetGetStateFlags'.
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 o b.
(HasCallStack, GObject o) =>
Ptr o -> (o -> IO b) -> IO b
B.ManagedPtr.withNewObject 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
forall a b. Coercible a b => a -> b
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 a. IO a -> m a
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
    wrapped'' <- C_WidgetDirectionChangedCallback
-> IO (FunPtr C_WidgetDirectionChangedCallback)
mk_WidgetStateFlagsChangedCallback C_WidgetDirectionChangedCallback
wrapped'
    connectSignalFunPtr obj "state-flags-changed" wrapped'' SignalConnectBefore 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 a. IO a -> m a
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
    wrapped'' <- C_WidgetDirectionChangedCallback
-> IO (FunPtr C_WidgetDirectionChangedCallback)
mk_WidgetStateFlagsChangedCallback C_WidgetDirectionChangedCallback
wrapped'
    connectSignalFunPtr obj "state-flags-changed" wrapped'' SignalConnectAfter 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-gtk4-4.0.12/docs/GI-Gtk-Objects-Widget.html#g:signal:stateFlagsChanged"})

#endif

-- signal Widget::unmap
-- | Emitted when /@widget@/ is going to be unmapped.
-- 
-- A widget is unmapped when either it or any of its parents up to the
-- toplevel widget have been set as hidden.
-- 
-- As @::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_WidgetDestroyCallback
wrap_WidgetUnmapCallback a -> IO ()
gi'cb Ptr Widget
gi'selfPtr Ptr ()
_ = do
    Ptr Widget -> (Widget -> IO ()) -> IO ()
forall o b.
(HasCallStack, GObject o) =>
Ptr o -> (o -> IO b) -> IO b
B.ManagedPtr.withNewObject 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
forall a b. Coercible a b => a -> b
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 a. IO a -> m a
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_WidgetDestroyCallback
wrapped' = (a -> IO ()) -> C_WidgetDestroyCallback
forall a. GObject a => (a -> IO ()) -> C_WidgetDestroyCallback
wrap_WidgetUnmapCallback a -> IO ()
wrapped
    wrapped'' <- C_WidgetDestroyCallback -> IO (FunPtr C_WidgetDestroyCallback)
mk_WidgetUnmapCallback C_WidgetDestroyCallback
wrapped'
    connectSignalFunPtr obj "unmap" wrapped'' SignalConnectBefore 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 a. IO a -> m a
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_WidgetDestroyCallback
wrapped' = (a -> IO ()) -> C_WidgetDestroyCallback
forall a. GObject a => (a -> IO ()) -> C_WidgetDestroyCallback
wrap_WidgetUnmapCallback a -> IO ()
wrapped
    wrapped'' <- C_WidgetDestroyCallback -> IO (FunPtr C_WidgetDestroyCallback)
mk_WidgetUnmapCallback C_WidgetDestroyCallback
wrapped'
    connectSignalFunPtr obj "unmap" wrapped'' SignalConnectAfter 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-gtk4-4.0.12/docs/GI-Gtk-Objects-Widget.html#g:signal:unmap"})

#endif

-- signal Widget::unrealize
-- | Emitted when the @GdkSurface@ associated with /@widget@/ is destroyed.
-- 
-- This 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_WidgetDestroyCallback
wrap_WidgetUnrealizeCallback a -> IO ()
gi'cb Ptr Widget
gi'selfPtr Ptr ()
_ = do
    Ptr Widget -> (Widget -> IO ()) -> IO ()
forall o b.
(HasCallStack, GObject o) =>
Ptr o -> (o -> IO b) -> IO b
B.ManagedPtr.withNewObject 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
forall a b. Coercible a b => a -> b
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 a. IO a -> m a
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_WidgetDestroyCallback
wrapped' = (a -> IO ()) -> C_WidgetDestroyCallback
forall a. GObject a => (a -> IO ()) -> C_WidgetDestroyCallback
wrap_WidgetUnrealizeCallback a -> IO ()
wrapped
    wrapped'' <- C_WidgetDestroyCallback -> IO (FunPtr C_WidgetDestroyCallback)
mk_WidgetUnrealizeCallback C_WidgetDestroyCallback
wrapped'
    connectSignalFunPtr obj "unrealize" wrapped'' SignalConnectBefore 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 a. IO a -> m a
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_WidgetDestroyCallback
wrapped' = (a -> IO ()) -> C_WidgetDestroyCallback
forall a. GObject a => (a -> IO ()) -> C_WidgetDestroyCallback
wrap_WidgetUnrealizeCallback a -> IO ()
wrapped
    wrapped'' <- C_WidgetDestroyCallback -> IO (FunPtr C_WidgetDestroyCallback)
mk_WidgetUnrealizeCallback C_WidgetDestroyCallback
wrapped'
    connectSignalFunPtr obj "unrealize" wrapped'' SignalConnectAfter 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-gtk4-4.0.12/docs/GI-Gtk-Objects-Widget.html#g:signal:unrealize"})

#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 a. IO a -> m a
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 a. IO a -> m a
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 -> Bool -> IO ()
forall a. GObject a => a -> String -> Bool -> IO ()
B.Properties.setObjectPropertyBool o
obj String
"can-focus" Bool
val

-- | Construct a t'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 a. IO a -> m a
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 a. IO a -> IO a
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, 'AttrPut]
    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
    attrPut = 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-gtk4-4.0.12/docs/GI-Gtk-Objects-Widget.html#g:attr:canFocus"
        })
#endif

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

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

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

-- | Construct a t'GValueConstruct' with valid value for the “@can-target@” property. This is rarely needed directly, but it is used by `Data.GI.Base.Constructible.new`.
constructWidgetCanTarget :: (IsWidget o, MIO.MonadIO m) => Bool -> m (GValueConstruct o)
constructWidgetCanTarget :: forall o (m :: * -> *).
(IsWidget o, MonadIO m) =>
Bool -> m (GValueConstruct o)
constructWidgetCanTarget Bool
val = IO (GValueConstruct o) -> m (GValueConstruct o)
forall a. IO a -> m a
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 a. IO a -> IO a
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-target" Bool
val

#if defined(ENABLE_OVERLOADING)
data WidgetCanTargetPropertyInfo
instance AttrInfo WidgetCanTargetPropertyInfo where
    type AttrAllowedOps WidgetCanTargetPropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet, 'AttrPut]
    type AttrBaseTypeConstraint WidgetCanTargetPropertyInfo = IsWidget
    type AttrSetTypeConstraint WidgetCanTargetPropertyInfo = (~) Bool
    type AttrTransferTypeConstraint WidgetCanTargetPropertyInfo = (~) Bool
    type AttrTransferType WidgetCanTargetPropertyInfo = Bool
    type AttrGetType WidgetCanTargetPropertyInfo = Bool
    type AttrLabel WidgetCanTargetPropertyInfo = "can-target"
    type AttrOrigin WidgetCanTargetPropertyInfo = Widget
    attrGet = getWidgetCanTarget
    attrSet = setWidgetCanTarget
    attrPut = setWidgetCanTarget
    attrTransfer _ v = do
        return v
    attrConstruct = constructWidgetCanTarget
    attrClear = undefined
    dbgAttrInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Gtk.Objects.Widget.canTarget"
        , O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk4-4.0.12/docs/GI-Gtk-Objects-Widget.html#g:attr:canTarget"
        })
#endif

-- VVV Prop "css-classes"
   -- Type: TCArray True (-1) (-1) (TBasicType TUTF8)
   -- Flags: [PropertyReadable,PropertyWritable]
   -- Nullable: (Nothing,Just False)

-- | Get the value of the “@css-classes@” property.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Attributes.get' widget #cssClasses
-- @
getWidgetCssClasses :: (MonadIO m, IsWidget o) => o -> m (Maybe [T.Text])
getWidgetCssClasses :: forall (m :: * -> *) o.
(MonadIO m, IsWidget o) =>
o -> m (Maybe [Text])
getWidgetCssClasses o
obj = IO (Maybe [Text]) -> m (Maybe [Text])
forall a. IO a -> m a
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.getObjectPropertyStringArray o
obj String
"css-classes"

-- | Set the value of the “@css-classes@” property.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Attributes.set' widget [ #cssClasses 'Data.GI.Base.Attributes.:=' value ]
-- @
setWidgetCssClasses :: (MonadIO m, IsWidget o) => o -> [T.Text] -> m ()
setWidgetCssClasses :: forall (m :: * -> *) o.
(MonadIO m, IsWidget o) =>
o -> [Text] -> m ()
setWidgetCssClasses o
obj [Text]
val = IO () -> m ()
forall a. IO a -> m a
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.setObjectPropertyStringArray o
obj String
"css-classes" ([Text] -> Maybe [Text]
forall a. a -> Maybe a
Just [Text]
val)

-- | Construct a t'GValueConstruct' with valid value for the “@css-classes@” property. This is rarely needed directly, but it is used by `Data.GI.Base.Constructible.new`.
constructWidgetCssClasses :: (IsWidget o, MIO.MonadIO m) => [T.Text] -> m (GValueConstruct o)
constructWidgetCssClasses :: forall o (m :: * -> *).
(IsWidget o, MonadIO m) =>
[Text] -> m (GValueConstruct o)
constructWidgetCssClasses [Text]
val = IO (GValueConstruct o) -> m (GValueConstruct o)
forall a. IO a -> m a
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 a. IO a -> IO a
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.constructObjectPropertyStringArray String
"css-classes" ([Text] -> Maybe [Text]
forall a. a -> Maybe a
P.Just [Text]
val)

#if defined(ENABLE_OVERLOADING)
data WidgetCssClassesPropertyInfo
instance AttrInfo WidgetCssClassesPropertyInfo where
    type AttrAllowedOps WidgetCssClassesPropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet]
    type AttrBaseTypeConstraint WidgetCssClassesPropertyInfo = IsWidget
    type AttrSetTypeConstraint WidgetCssClassesPropertyInfo = (~) [T.Text]
    type AttrTransferTypeConstraint WidgetCssClassesPropertyInfo = (~) [T.Text]
    type AttrTransferType WidgetCssClassesPropertyInfo = [T.Text]
    type AttrGetType WidgetCssClassesPropertyInfo = (Maybe [T.Text])
    type AttrLabel WidgetCssClassesPropertyInfo = "css-classes"
    type AttrOrigin WidgetCssClassesPropertyInfo = Widget
    attrGet = getWidgetCssClasses
    attrSet = setWidgetCssClasses
    attrPut = undefined
    attrTransfer _ v = do
        return v
    attrConstruct = constructWidgetCssClasses
    attrClear = undefined
    dbgAttrInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Gtk.Objects.Widget.cssClasses"
        , O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk4-4.0.12/docs/GI-Gtk-Objects-Widget.html#g:attr:cssClasses"
        })
#endif

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

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

-- | Construct a t'GValueConstruct' with valid value for the “@css-name@” property. This is rarely needed directly, but it is used by `Data.GI.Base.Constructible.new`.
constructWidgetCssName :: (IsWidget o, MIO.MonadIO m) => T.Text -> m (GValueConstruct o)
constructWidgetCssName :: forall o (m :: * -> *).
(IsWidget o, MonadIO m) =>
Text -> m (GValueConstruct o)
constructWidgetCssName Text
val = IO (GValueConstruct o) -> m (GValueConstruct o)
forall a. IO a -> m a
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 a. IO a -> IO a
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
"css-name" (Text -> Maybe Text
forall a. a -> Maybe a
P.Just Text
val)

#if defined(ENABLE_OVERLOADING)
data WidgetCssNamePropertyInfo
instance AttrInfo WidgetCssNamePropertyInfo where
    type AttrAllowedOps WidgetCssNamePropertyInfo = '[ 'AttrConstruct, 'AttrGet, 'AttrClear]
    type AttrBaseTypeConstraint WidgetCssNamePropertyInfo = IsWidget
    type AttrSetTypeConstraint WidgetCssNamePropertyInfo = (~) T.Text
    type AttrTransferTypeConstraint WidgetCssNamePropertyInfo = (~) T.Text
    type AttrTransferType WidgetCssNamePropertyInfo = T.Text
    type AttrGetType WidgetCssNamePropertyInfo = T.Text
    type AttrLabel WidgetCssNamePropertyInfo = "css-name"
    type AttrOrigin WidgetCssNamePropertyInfo = Widget
    attrGet = getWidgetCssName
    attrSet = undefined
    attrPut = undefined
    attrTransfer _ v = do
        return v
    attrConstruct = constructWidgetCssName
    attrClear = undefined
    dbgAttrInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Gtk.Objects.Widget.cssName"
        , O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk4-4.0.12/docs/GI-Gtk-Objects-Widget.html#g:attr:cssName"
        })
#endif

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

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

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

-- | Construct a t'GValueConstruct' with valid value for the “@cursor@” property. This is rarely needed directly, but it is used by `Data.GI.Base.Constructible.new`.
constructWidgetCursor :: (IsWidget o, MIO.MonadIO m, Gdk.Cursor.IsCursor a) => a -> m (GValueConstruct o)
constructWidgetCursor :: forall o (m :: * -> *) a.
(IsWidget o, MonadIO m, IsCursor a) =>
a -> m (GValueConstruct o)
constructWidgetCursor a
val = IO (GValueConstruct o) -> m (GValueConstruct o)
forall a. IO a -> m a
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 a. IO a -> IO a
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
"cursor" (a -> Maybe a
forall a. a -> Maybe a
P.Just a
val)

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

#if defined(ENABLE_OVERLOADING)
data WidgetCursorPropertyInfo
instance AttrInfo WidgetCursorPropertyInfo where
    type AttrAllowedOps WidgetCursorPropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet, 'AttrClear]
    type AttrBaseTypeConstraint WidgetCursorPropertyInfo = IsWidget
    type AttrSetTypeConstraint WidgetCursorPropertyInfo = Gdk.Cursor.IsCursor
    type AttrTransferTypeConstraint WidgetCursorPropertyInfo = Gdk.Cursor.IsCursor
    type AttrTransferType WidgetCursorPropertyInfo = Gdk.Cursor.Cursor
    type AttrGetType WidgetCursorPropertyInfo = (Maybe Gdk.Cursor.Cursor)
    type AttrLabel WidgetCursorPropertyInfo = "cursor"
    type AttrOrigin WidgetCursorPropertyInfo = Widget
    attrGet = getWidgetCursor
    attrSet = setWidgetCursor
    attrPut = undefined
    attrTransfer _ v = do
        unsafeCastTo Gdk.Cursor.Cursor v
    attrConstruct = constructWidgetCursor
    attrClear = clearWidgetCursor
    dbgAttrInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Gtk.Objects.Widget.cursor"
        , O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk4-4.0.12/docs/GI-Gtk-Objects-Widget.html#g:attr:cursor"
        })
#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 a. IO a -> m a
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 a. IO a -> m a
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 -> Bool -> IO ()
forall a. GObject a => a -> String -> Bool -> IO ()
B.Properties.setObjectPropertyBool o
obj String
"focus-on-click" Bool
val

-- | Construct a t'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 a. IO a -> m a
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 a. IO a -> IO a
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, 'AttrPut]
    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
    attrPut = 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-gtk4-4.0.12/docs/GI-Gtk-Objects-Widget.html#g:attr:focusOnClick"
        })
#endif

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

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

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

-- | Construct a t'GValueConstruct' with valid value for the “@focusable@” property. This is rarely needed directly, but it is used by `Data.GI.Base.Constructible.new`.
constructWidgetFocusable :: (IsWidget o, MIO.MonadIO m) => Bool -> m (GValueConstruct o)
constructWidgetFocusable :: forall o (m :: * -> *).
(IsWidget o, MonadIO m) =>
Bool -> m (GValueConstruct o)
constructWidgetFocusable Bool
val = IO (GValueConstruct o) -> m (GValueConstruct o)
forall a. IO a -> m a
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 a. IO a -> IO a
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
"focusable" Bool
val

#if defined(ENABLE_OVERLOADING)
data WidgetFocusablePropertyInfo
instance AttrInfo WidgetFocusablePropertyInfo where
    type AttrAllowedOps WidgetFocusablePropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet, 'AttrPut]
    type AttrBaseTypeConstraint WidgetFocusablePropertyInfo = IsWidget
    type AttrSetTypeConstraint WidgetFocusablePropertyInfo = (~) Bool
    type AttrTransferTypeConstraint WidgetFocusablePropertyInfo = (~) Bool
    type AttrTransferType WidgetFocusablePropertyInfo = Bool
    type AttrGetType WidgetFocusablePropertyInfo = Bool
    type AttrLabel WidgetFocusablePropertyInfo = "focusable"
    type AttrOrigin WidgetFocusablePropertyInfo = Widget
    attrGet = getWidgetFocusable
    attrSet = setWidgetFocusable
    attrPut = setWidgetFocusable
    attrTransfer _ v = do
        return v
    attrConstruct = constructWidgetFocusable
    attrClear = undefined
    dbgAttrInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Gtk.Objects.Widget.focusable"
        , O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk4-4.0.12/docs/GI-Gtk-Objects-Widget.html#g:attr:focusable"
        })
#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 a. IO a -> m a
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 a. IO a -> m a
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 t'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 a. IO a -> m a
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 a. IO a -> IO a
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, 'AttrPut]
    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
    attrPut = 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-gtk4-4.0.12/docs/GI-Gtk-Objects-Widget.html#g:attr:halign"
        })
#endif

-- VVV Prop "has-default"
   -- Type: TBasicType TBoolean
   -- Flags: [PropertyReadable]
   -- Nullable: (Just False,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 a. IO a -> m a
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"

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

-- VVV Prop "has-focus"
   -- Type: TBasicType TBoolean
   -- Flags: [PropertyReadable]
   -- Nullable: (Just False,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 a. IO a -> m a
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"

#if defined(ENABLE_OVERLOADING)
data WidgetHasFocusPropertyInfo
instance AttrInfo WidgetHasFocusPropertyInfo where
    type AttrAllowedOps WidgetHasFocusPropertyInfo = '[ 'AttrGet]
    type AttrBaseTypeConstraint WidgetHasFocusPropertyInfo = IsWidget
    type AttrSetTypeConstraint WidgetHasFocusPropertyInfo = (~) ()
    type AttrTransferTypeConstraint WidgetHasFocusPropertyInfo = (~) ()
    type AttrTransferType WidgetHasFocusPropertyInfo = ()
    type AttrGetType WidgetHasFocusPropertyInfo = Bool
    type AttrLabel WidgetHasFocusPropertyInfo = "has-focus"
    type AttrOrigin WidgetHasFocusPropertyInfo = Widget
    attrGet = getWidgetHasFocus
    attrSet = undefined
    attrPut = undefined
    attrTransfer _ = undefined
    attrConstruct = undefined
    attrClear = undefined
    dbgAttrInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Gtk.Objects.Widget.hasFocus"
        , O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk4-4.0.12/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 a. IO a -> m a
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 a. IO a -> m a
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 -> Bool -> IO ()
forall a. GObject a => a -> String -> Bool -> IO ()
B.Properties.setObjectPropertyBool o
obj String
"has-tooltip" Bool
val

-- | Construct a t'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 a. IO a -> m a
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 a. IO a -> IO a
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, 'AttrPut]
    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
    attrPut = 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-gtk4-4.0.12/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 a. IO a -> m a
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 a. IO a -> m a
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 t'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 a. IO a -> m a
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 a. IO a -> IO a
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, 'AttrPut]
    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
    attrPut = 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-gtk4-4.0.12/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 a. IO a -> m a
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 a. IO a -> m a
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 -> Bool -> IO ()
forall a. GObject a => a -> String -> Bool -> IO ()
B.Properties.setObjectPropertyBool o
obj String
"hexpand" Bool
val

-- | Construct a t'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 a. IO a -> m a
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 a. IO a -> IO a
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, 'AttrPut]
    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
    attrPut = 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-gtk4-4.0.12/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 a. IO a -> m a
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 a. IO a -> m a
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 -> Bool -> IO ()
forall a. GObject a => a -> String -> Bool -> IO ()
B.Properties.setObjectPropertyBool o
obj String
"hexpand-set" Bool
val

-- | Construct a t'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 a. IO a -> m a
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 a. IO a -> IO a
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, 'AttrPut]
    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
    attrPut = 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-gtk4-4.0.12/docs/GI-Gtk-Objects-Widget.html#g:attr:hexpandSet"
        })
#endif

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

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

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

-- | Construct a t'GValueConstruct' with valid value for the “@layout-manager@” property. This is rarely needed directly, but it is used by `Data.GI.Base.Constructible.new`.
constructWidgetLayoutManager :: (IsWidget o, MIO.MonadIO m, Gtk.LayoutManager.IsLayoutManager a) => a -> m (GValueConstruct o)
constructWidgetLayoutManager :: forall o (m :: * -> *) a.
(IsWidget o, MonadIO m, IsLayoutManager a) =>
a -> m (GValueConstruct o)
constructWidgetLayoutManager a
val = IO (GValueConstruct o) -> m (GValueConstruct o)
forall a. IO a -> m a
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 a. IO a -> IO a
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
"layout-manager" (a -> Maybe a
forall a. a -> Maybe a
P.Just a
val)

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

#if defined(ENABLE_OVERLOADING)
data WidgetLayoutManagerPropertyInfo
instance AttrInfo WidgetLayoutManagerPropertyInfo where
    type AttrAllowedOps WidgetLayoutManagerPropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet, 'AttrClear]
    type AttrBaseTypeConstraint WidgetLayoutManagerPropertyInfo = IsWidget
    type AttrSetTypeConstraint WidgetLayoutManagerPropertyInfo = Gtk.LayoutManager.IsLayoutManager
    type AttrTransferTypeConstraint WidgetLayoutManagerPropertyInfo = Gtk.LayoutManager.IsLayoutManager
    type AttrTransferType WidgetLayoutManagerPropertyInfo = Gtk.LayoutManager.LayoutManager
    type AttrGetType WidgetLayoutManagerPropertyInfo = (Maybe Gtk.LayoutManager.LayoutManager)
    type AttrLabel WidgetLayoutManagerPropertyInfo = "layout-manager"
    type AttrOrigin WidgetLayoutManagerPropertyInfo = Widget
    attrGet = getWidgetLayoutManager
    attrSet = setWidgetLayoutManager
    attrPut = undefined
    attrTransfer _ v = do
        unsafeCastTo Gtk.LayoutManager.LayoutManager v
    attrConstruct = constructWidgetLayoutManager
    attrClear = clearWidgetLayoutManager
    dbgAttrInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Gtk.Objects.Widget.layoutManager"
        , O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk4-4.0.12/docs/GI-Gtk-Objects-Widget.html#g:attr:layoutManager"
        })
#endif

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

-- | Get the value of the “@limit-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 #limitEvents
-- @
getWidgetLimitEvents :: (MonadIO m, IsWidget o) => o -> m Bool
getWidgetLimitEvents :: forall (m :: * -> *) o. (MonadIO m, IsWidget o) => o -> m Bool
getWidgetLimitEvents o
obj = IO Bool -> m Bool
forall a. IO a -> m a
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
"limit-events"

-- | Set the value of the “@limit-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 [ #limitEvents 'Data.GI.Base.Attributes.:=' value ]
-- @
setWidgetLimitEvents :: (MonadIO m, IsWidget o) => o -> Bool -> m ()
setWidgetLimitEvents :: forall (m :: * -> *) o.
(MonadIO m, IsWidget o) =>
o -> Bool -> m ()
setWidgetLimitEvents o
obj Bool
val = IO () -> m ()
forall a. IO a -> m a
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 -> Bool -> IO ()
forall a. GObject a => a -> String -> Bool -> IO ()
B.Properties.setObjectPropertyBool o
obj String
"limit-events" Bool
val

-- | Construct a t'GValueConstruct' with valid value for the “@limit-events@” property. This is rarely needed directly, but it is used by `Data.GI.Base.Constructible.new`.
constructWidgetLimitEvents :: (IsWidget o, MIO.MonadIO m) => Bool -> m (GValueConstruct o)
constructWidgetLimitEvents :: forall o (m :: * -> *).
(IsWidget o, MonadIO m) =>
Bool -> m (GValueConstruct o)
constructWidgetLimitEvents Bool
val = IO (GValueConstruct o) -> m (GValueConstruct o)
forall a. IO a -> m a
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 a. IO a -> IO a
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
"limit-events" Bool
val

#if defined(ENABLE_OVERLOADING)
data WidgetLimitEventsPropertyInfo
instance AttrInfo WidgetLimitEventsPropertyInfo where
    type AttrAllowedOps WidgetLimitEventsPropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet, 'AttrPut]
    type AttrBaseTypeConstraint WidgetLimitEventsPropertyInfo = IsWidget
    type AttrSetTypeConstraint WidgetLimitEventsPropertyInfo = (~) Bool
    type AttrTransferTypeConstraint WidgetLimitEventsPropertyInfo = (~) Bool
    type AttrTransferType WidgetLimitEventsPropertyInfo = Bool
    type AttrGetType WidgetLimitEventsPropertyInfo = Bool
    type AttrLabel WidgetLimitEventsPropertyInfo = "limit-events"
    type AttrOrigin WidgetLimitEventsPropertyInfo = Widget
    attrGet = getWidgetLimitEvents
    attrSet = setWidgetLimitEvents
    attrPut = setWidgetLimitEvents
    attrTransfer _ v = do
        return v
    attrConstruct = constructWidgetLimitEvents
    attrClear = undefined
    dbgAttrInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Gtk.Objects.Widget.limitEvents"
        , O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk4-4.0.12/docs/GI-Gtk-Objects-Widget.html#g:attr:limitEvents"
        })
#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 a. IO a -> m a
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 a. IO a -> m a
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 t'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 a. IO a -> m a
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 a. IO a -> IO a
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, 'AttrPut]
    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
    attrPut = 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-gtk4-4.0.12/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 a. IO a -> m a
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 a. IO a -> m a
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 t'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 a. IO a -> m a
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 a. IO a -> IO a
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, 'AttrPut]
    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
    attrPut = 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-gtk4-4.0.12/docs/GI-Gtk-Objects-Widget.html#g:attr:marginEnd"
        })
#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 a. IO a -> m a
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 a. IO a -> m a
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 t'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 a. IO a -> m a
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 a. IO a -> IO a
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, 'AttrPut]
    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
    attrPut = 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-gtk4-4.0.12/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 a. IO a -> m a
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 a. IO a -> m a
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 t'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 a. IO a -> m a
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 a. IO a -> IO a
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, 'AttrPut]
    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
    attrPut = 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-gtk4-4.0.12/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 a. IO a -> m a
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 a. IO a -> m a
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 t'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 a. IO a -> m a
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 a. IO a -> IO a
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, 'AttrPut]
    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
    attrPut = 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-gtk4-4.0.12/docs/GI-Gtk-Objects-Widget.html#g:attr:name"
        })
#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 a. IO a -> m a
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 a. IO a -> m a
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 t'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 a. IO a -> m a
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 a. IO a -> IO a
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, 'AttrPut]
    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
    attrPut = 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-gtk4-4.0.12/docs/GI-Gtk-Objects-Widget.html#g:attr:opacity"
        })
#endif

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

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

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

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

#if defined(ENABLE_OVERLOADING)
data WidgetOverflowPropertyInfo
instance AttrInfo WidgetOverflowPropertyInfo where
    type AttrAllowedOps WidgetOverflowPropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet, 'AttrPut]
    type AttrBaseTypeConstraint WidgetOverflowPropertyInfo = IsWidget
    type AttrSetTypeConstraint WidgetOverflowPropertyInfo = (~) Gtk.Enums.Overflow
    type AttrTransferTypeConstraint WidgetOverflowPropertyInfo = (~) Gtk.Enums.Overflow
    type AttrTransferType WidgetOverflowPropertyInfo = Gtk.Enums.Overflow
    type AttrGetType WidgetOverflowPropertyInfo = Gtk.Enums.Overflow
    type AttrLabel WidgetOverflowPropertyInfo = "overflow"
    type AttrOrigin WidgetOverflowPropertyInfo = Widget
    attrGet = getWidgetOverflow
    attrSet = setWidgetOverflow
    attrPut = setWidgetOverflow
    attrTransfer _ v = do
        return v
    attrConstruct = constructWidgetOverflow
    attrClear = undefined
    dbgAttrInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Gtk.Objects.Widget.overflow"
        , O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk4-4.0.12/docs/GI-Gtk-Objects-Widget.html#g:attr:overflow"
        })
#endif

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

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

#if defined(ENABLE_OVERLOADING)
data WidgetParentPropertyInfo
instance AttrInfo WidgetParentPropertyInfo where
    type AttrAllowedOps WidgetParentPropertyInfo = '[ 'AttrGet]
    type AttrBaseTypeConstraint WidgetParentPropertyInfo = IsWidget
    type AttrSetTypeConstraint WidgetParentPropertyInfo = (~) ()
    type AttrTransferTypeConstraint WidgetParentPropertyInfo = (~) ()
    type AttrTransferType WidgetParentPropertyInfo = ()
    type AttrGetType WidgetParentPropertyInfo = (Maybe Widget)
    type AttrLabel WidgetParentPropertyInfo = "parent"
    type AttrOrigin WidgetParentPropertyInfo = Widget
    attrGet = getWidgetParent
    attrSet = undefined
    attrPut = undefined
    attrTransfer _ = undefined
    attrConstruct = undefined
    attrClear = undefined
    dbgAttrInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Gtk.Objects.Widget.parent"
        , O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk4-4.0.12/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 a. IO a -> m a
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 a. IO a -> m a
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 -> Bool -> IO ()
forall a. GObject a => a -> String -> Bool -> IO ()
B.Properties.setObjectPropertyBool o
obj String
"receives-default" Bool
val

-- | Construct a t'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 a. IO a -> m a
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 a. IO a -> IO a
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, 'AttrPut]
    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
    attrPut = 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-gtk4-4.0.12/docs/GI-Gtk-Objects-Widget.html#g:attr:receivesDefault"
        })
#endif

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

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

#if defined(ENABLE_OVERLOADING)
data WidgetRootPropertyInfo
instance AttrInfo WidgetRootPropertyInfo where
    type AttrAllowedOps WidgetRootPropertyInfo = '[ 'AttrGet, 'AttrClear]
    type AttrBaseTypeConstraint WidgetRootPropertyInfo = IsWidget
    type AttrSetTypeConstraint WidgetRootPropertyInfo = (~) ()
    type AttrTransferTypeConstraint WidgetRootPropertyInfo = (~) ()
    type AttrTransferType WidgetRootPropertyInfo = ()
    type AttrGetType WidgetRootPropertyInfo = (Maybe Gtk.Root.Root)
    type AttrLabel WidgetRootPropertyInfo = "root"
    type AttrOrigin WidgetRootPropertyInfo = Widget
    attrGet = getWidgetRoot
    attrSet = undefined
    attrPut = undefined
    attrTransfer _ = undefined
    attrConstruct = undefined
    attrClear = undefined
    dbgAttrInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Gtk.Objects.Widget.root"
        , O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk4-4.0.12/docs/GI-Gtk-Objects-Widget.html#g:attr:root"
        })
#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 a. IO a -> m a
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
    attrPut = 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-gtk4-4.0.12/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 a. IO a -> m a
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 a. IO a -> m a
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 -> Bool -> IO ()
forall a. GObject a => a -> String -> Bool -> IO ()
B.Properties.setObjectPropertyBool o
obj String
"sensitive" Bool
val

-- | Construct a t'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 a. IO a -> m a
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 a. IO a -> IO a
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, 'AttrPut]
    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
    attrPut = 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-gtk4-4.0.12/docs/GI-Gtk-Objects-Widget.html#g:attr:sensitive"
        })
#endif

-- VVV Prop "tooltip-markup"
   -- Type: TBasicType TUTF8
   -- Flags: [PropertyReadable,PropertyWritable]
   -- Nullable: (Just True,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 a. IO a -> m a
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 a. IO a -> m a
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 t'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 a. IO a -> m a
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 a. IO a -> IO a
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 a. IO a -> m a
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
    attrPut = undefined
    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-gtk4-4.0.12/docs/GI-Gtk-Objects-Widget.html#g:attr:tooltipMarkup"
        })
#endif

-- VVV Prop "tooltip-text"
   -- Type: TBasicType TUTF8
   -- Flags: [PropertyReadable,PropertyWritable]
   -- Nullable: (Just True,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 a. IO a -> m a
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 a. IO a -> m a
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 t'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 a. IO a -> m a
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 a. IO a -> IO a
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 a. IO a -> m a
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
    attrPut = undefined
    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-gtk4-4.0.12/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 a. IO a -> m a
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 a. IO a -> m a
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 t'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 a. IO a -> m a
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 a. IO a -> IO a
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, 'AttrPut]
    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
    attrPut = 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-gtk4-4.0.12/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 a. IO a -> m a
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 a. IO a -> m a
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 -> Bool -> IO ()
forall a. GObject a => a -> String -> Bool -> IO ()
B.Properties.setObjectPropertyBool o
obj String
"vexpand" Bool
val

-- | Construct a t'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 a. IO a -> m a
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 a. IO a -> IO a
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, 'AttrPut]
    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
    attrPut = 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-gtk4-4.0.12/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 a. IO a -> m a
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 a. IO a -> m a
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 -> Bool -> IO ()
forall a. GObject a => a -> String -> Bool -> IO ()
B.Properties.setObjectPropertyBool o
obj String
"vexpand-set" Bool
val

-- | Construct a t'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 a. IO a -> m a
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 a. IO a -> IO a
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, 'AttrPut]
    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
    attrPut = 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-gtk4-4.0.12/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 a. IO a -> m a
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 a. IO a -> m a
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 -> Bool -> IO ()
forall a. GObject a => a -> String -> Bool -> IO ()
B.Properties.setObjectPropertyBool o
obj String
"visible" Bool
val

-- | Construct a t'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 a. IO a -> m a
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 a. IO a -> IO a
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, 'AttrPut]
    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
    attrPut = 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-gtk4-4.0.12/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 a. IO a -> m a
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 a. IO a -> m a
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 t'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 a. IO a -> m a
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 a. IO a -> IO a
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, 'AttrPut]
    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
    attrPut = 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-gtk4-4.0.12/docs/GI-Gtk-Objects-Widget.html#g:attr:widthRequest"
        })
#endif

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

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

widgetCanTarget :: AttrLabelProxy "canTarget"
widgetCanTarget = AttrLabelProxy

widgetCssClasses :: AttrLabelProxy "cssClasses"
widgetCssClasses = AttrLabelProxy

widgetCssName :: AttrLabelProxy "cssName"
widgetCssName = AttrLabelProxy

widgetCursor :: AttrLabelProxy "cursor"
widgetCursor = AttrLabelProxy

widgetFocusOnClick :: AttrLabelProxy "focusOnClick"
widgetFocusOnClick = AttrLabelProxy

widgetFocusable :: AttrLabelProxy "focusable"
widgetFocusable = AttrLabelProxy

widgetHalign :: AttrLabelProxy "halign"
widgetHalign = AttrLabelProxy

widgetHasTooltip :: AttrLabelProxy "hasTooltip"
widgetHasTooltip = AttrLabelProxy

widgetHeightRequest :: AttrLabelProxy "heightRequest"
widgetHeightRequest = AttrLabelProxy

widgetHexpand :: AttrLabelProxy "hexpand"
widgetHexpand = AttrLabelProxy

widgetHexpandSet :: AttrLabelProxy "hexpandSet"
widgetHexpandSet = AttrLabelProxy

widgetLayoutManager :: AttrLabelProxy "layoutManager"
widgetLayoutManager = AttrLabelProxy

widgetLimitEvents :: AttrLabelProxy "limitEvents"
widgetLimitEvents = AttrLabelProxy

widgetMarginBottom :: AttrLabelProxy "marginBottom"
widgetMarginBottom = AttrLabelProxy

widgetMarginEnd :: AttrLabelProxy "marginEnd"
widgetMarginEnd = AttrLabelProxy

widgetMarginStart :: AttrLabelProxy "marginStart"
widgetMarginStart = AttrLabelProxy

widgetMarginTop :: AttrLabelProxy "marginTop"
widgetMarginTop = AttrLabelProxy

widgetName :: AttrLabelProxy "name"
widgetName = AttrLabelProxy

widgetOpacity :: AttrLabelProxy "opacity"
widgetOpacity = AttrLabelProxy

widgetOverflow :: AttrLabelProxy "overflow"
widgetOverflow = AttrLabelProxy

widgetParent :: AttrLabelProxy "parent"
widgetParent = AttrLabelProxy

widgetReceivesDefault :: AttrLabelProxy "receivesDefault"
widgetReceivesDefault = AttrLabelProxy

widgetRoot :: AttrLabelProxy "root"
widgetRoot = AttrLabelProxy

widgetScaleFactor :: AttrLabelProxy "scaleFactor"
widgetScaleFactor = AttrLabelProxy

widgetSensitive :: AttrLabelProxy "sensitive"
widgetSensitive = AttrLabelProxy

widgetTooltipMarkup :: AttrLabelProxy "tooltipMarkup"
widgetTooltipMarkup = AttrLabelProxy

widgetTooltipText :: AttrLabelProxy "tooltipText"
widgetTooltipText = AttrLabelProxy

widgetValign :: AttrLabelProxy "valign"
widgetValign = AttrLabelProxy

widgetVexpand :: AttrLabelProxy "vexpand"
widgetVexpand = AttrLabelProxy

widgetVexpandSet :: AttrLabelProxy "vexpandSet"
widgetVexpandSet = AttrLabelProxy

widgetVisible :: AttrLabelProxy "visible"
widgetVisible = AttrLabelProxy

widgetWidthRequest :: AttrLabelProxy "widthRequest"
widgetWidthRequest = AttrLabelProxy

#endif

#if defined(ENABLE_OVERLOADING)
type instance O.SignalList Widget = WidgetSignalList
type WidgetSignalList = ('[ '("destroy", WidgetDestroySignalInfo), '("directionChanged", WidgetDirectionChangedSignalInfo), '("hide", WidgetHideSignalInfo), '("keynavFailed", WidgetKeynavFailedSignalInfo), '("map", WidgetMapSignalInfo), '("mnemonicActivate", WidgetMnemonicActivateSignalInfo), '("moveFocus", WidgetMoveFocusSignalInfo), '("notify", GObject.Object.ObjectNotifySignalInfo), '("queryTooltip", WidgetQueryTooltipSignalInfo), '("realize", WidgetRealizeSignalInfo), '("show", WidgetShowSignalInfo), '("stateFlagsChanged", WidgetStateFlagsChangedSignalInfo), '("unmap", WidgetUnmapSignalInfo), '("unrealize", WidgetUnrealizeSignalInfo)] :: [(Symbol, DK.Type)])

#endif

-- method Widget::action_set_enabled
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "widget"
--           , argType = TInterface Name { namespace = "Gtk" , name = "Widget" }
--           , argCType = Just "GtkWidget*"
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a widget" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "action_name"
--           , argType = TBasicType TUTF8
--           , argCType = Just "const char*"
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "action name, such as \"clipboard.paste\""
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "enabled"
--           , argType = TBasicType TBoolean
--           , argCType = Just "gboolean"
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "whether the action is now enabled"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "gtk_widget_action_set_enabled" gtk_widget_action_set_enabled :: 
    Ptr Widget ->                           -- widget : TInterface (Name {namespace = "Gtk", name = "Widget"})
    CString ->                              -- action_name : TBasicType TUTF8
    CInt ->                                 -- enabled : TBasicType TBoolean
    IO ()

-- | Enables or disables an action installed with
-- 'GI.Gtk.Structs.WidgetClass.widgetClassInstallAction'.
widgetActionSetEnabled ::
    (B.CallStack.HasCallStack, MonadIO m, IsWidget a) =>
    a
    -- ^ /@widget@/: a widget
    -> T.Text
    -- ^ /@actionName@/: action name, such as \"clipboard.paste\"
    -> Bool
    -- ^ /@enabled@/: whether the action is now enabled
    -> m ()
widgetActionSetEnabled :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsWidget a) =>
a -> Text -> Bool -> m ()
widgetActionSetEnabled a
widget Text
actionName Bool
enabled = IO () -> m ()
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    widget' <- a -> IO (Ptr Widget)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
widget
    actionName' <- textToCString actionName
    let enabled' = (Int -> CInt
forall a b. (Integral a, Num b) => a -> b
P.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
P.fromEnum) Bool
enabled
    gtk_widget_action_set_enabled widget' actionName' enabled'
    touchManagedPtr widget
    freeMem actionName'
    return ()

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

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


#endif

-- method Widget::activate
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "widget"
--           , argType = TInterface Name { namespace = "Gtk" , name = "Widget" }
--           , argCType = Just "GtkWidget*"
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a widget that is activatable"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = 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

-- | Activates the widget.
-- 
-- The activation will emit the signal set using
-- 'GI.Gtk.Structs.WidgetClass.widgetClassSetActivateSignal'
-- during class initialization.
-- 
-- Activation is what happens when you press \<kbd>Enter\<\/kbd>
-- on a widget.
-- 
-- If you wish to handle the activation keybinding yourself,
-- it is recommended to use 'GI.Gtk.Structs.WidgetClass.widgetClassAddShortcut'
-- with an action created with 'GI.Gtk.Objects.SignalAction.signalActionNew'.
-- 
-- If /@widget@/ is not activatable, the function returns false.
widgetActivate ::
    (B.CallStack.HasCallStack, MonadIO m, IsWidget a) =>
    a
    -- ^ /@widget@/: a widget that is activatable
    -> m Bool
    -- ^ __Returns:__ true if the widget was activated
widgetActivate :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsWidget a) =>
a -> m Bool
widgetActivate a
widget = IO Bool -> m Bool
forall a. IO a -> m a
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
    widget' <- a -> IO (Ptr Widget)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
widget
    result <- gtk_widget_activate widget'
    let result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= CInt
0) CInt
result
    touchManagedPtr widget
    return 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-gtk4-4.0.12/docs/GI-Gtk-Objects-Widget.html#v:widgetActivate"
        })


#endif

-- method Widget::activate_action
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "widget"
--           , argType = TInterface Name { namespace = "Gtk" , name = "Widget" }
--           , argCType = Just "GtkWidget*"
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a widget" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "name"
--           , argType = TBasicType TUTF8
--           , argCType = Just "const char*"
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "the name of the action to activate"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "args"
--           , argType = TVariant
--           , argCType = Just "GVariant*"
--           , direction = DirectionIn
--           , mayBeNull = True
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "parameters to use" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TBasicType TBoolean)
-- throws : False
-- Skip return : False

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

-- | Activates an action for the widget.
-- 
-- The action is looked up in the action groups associated with
-- /@widget@/ and its ancestors.
-- 
-- If the action is in an action group added with
-- 'GI.Gtk.Objects.Widget.widgetInsertActionGroup', the /@name@/ is expected
-- to be prefixed with the prefix that was used when the group was
-- inserted.
-- 
-- The arguments must match the actions expected parameter type,
-- as returned by 'GI.Gio.Interfaces.Action.actionGetParameterType'.
widgetActivateAction ::
    (B.CallStack.HasCallStack, MonadIO m, IsWidget a) =>
    a
    -- ^ /@widget@/: a widget
    -> T.Text
    -- ^ /@name@/: the name of the action to activate
    -> Maybe (GVariant)
    -- ^ /@args@/: parameters to use
    -> m Bool
    -- ^ __Returns:__ true if the action was activated
widgetActivateAction :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsWidget a) =>
a -> Text -> Maybe GVariant -> m Bool
widgetActivateAction a
widget Text
name Maybe GVariant
args = IO Bool -> m Bool
forall a. IO a -> m a
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
    widget' <- a -> IO (Ptr Widget)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
widget
    name' <- textToCString name
    maybeArgs <- case args of
        Maybe GVariant
Nothing -> Ptr GVariant -> IO (Ptr GVariant)
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr GVariant
forall a. Ptr a
FP.nullPtr
        Just GVariant
jArgs -> do
            jArgs' <- GVariant -> IO (Ptr GVariant)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr GVariant
jArgs
            return jArgs'
    result <- gtk_widget_activate_action_variant widget' name' maybeArgs
    let result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= CInt
0) CInt
result
    touchManagedPtr widget
    whenJust args touchManagedPtr
    freeMem name'
    return result'

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

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


#endif

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

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

-- | Activates the @default.activate@ action for the widget.
-- 
-- The action is looked up in the same was as for
-- 'GI.Gtk.Objects.Widget.widgetActivateAction'.
widgetActivateDefault ::
    (B.CallStack.HasCallStack, MonadIO m, IsWidget a) =>
    a
    -- ^ /@widget@/: a widget
    -> m ()
widgetActivateDefault :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsWidget a) =>
a -> m ()
widgetActivateDefault a
widget = IO () -> m ()
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    widget' <- a -> IO (Ptr Widget)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
widget
    gtk_widget_activate_default widget'
    touchManagedPtr widget
    return ()

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

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


#endif

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

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

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

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

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


#endif

-- method Widget::add_css_class
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "widget"
--           , argType = TInterface Name { namespace = "Gtk" , name = "Widget" }
--           , argCType = Just "GtkWidget*"
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a widget" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "css_class"
--           , argType = TBasicType TUTF8
--           , argCType = Just "const char*"
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText =
--                     Just "style class to add to @widget, without the leading period"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

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

-- | Adds a style class to the widget.
-- 
-- After calling this function, the widget’s style will match
-- for /@cssClass@/, according to CSS matching rules.
-- 
-- Use 'GI.Gtk.Objects.Widget.widgetRemoveCssClass' to remove the
-- style again.
widgetAddCssClass ::
    (B.CallStack.HasCallStack, MonadIO m, IsWidget a) =>
    a
    -- ^ /@widget@/: a widget
    -> T.Text
    -- ^ /@cssClass@/: style class to add to /@widget@/, without the leading period
    -> m ()
widgetAddCssClass :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsWidget a) =>
a -> Text -> m ()
widgetAddCssClass a
widget Text
cssClass = IO () -> m ()
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    widget' <- a -> IO (Ptr Widget)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
widget
    cssClass' <- textToCString cssClass
    gtk_widget_add_css_class widget' cssClass'
    touchManagedPtr widget
    freeMem cssClass'
    return ()

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

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


#endif

-- method Widget::add_mnemonic_label
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "widget"
--           , argType = TInterface Name { namespace = "Gtk" , name = "Widget" }
--           , argCType = Just "GtkWidget*"
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a widget" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "label"
--           , argType = TInterface Name { namespace = "Gtk" , name = "Widget" }
--           , argCType = Just "GtkWidget*"
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText =
--                     Just "a widget that acts as a mnemonic label for @widget"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = 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 that 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.
widgetAddMnemonicLabel ::
    (B.CallStack.HasCallStack, MonadIO m, IsWidget a, IsWidget b) =>
    a
    -- ^ /@widget@/: a widget
    -> b
    -- ^ /@label@/: a 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 a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    widget' <- a -> IO (Ptr Widget)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
widget
    label' <- unsafeManagedPtrCastPtr label
    gtk_widget_add_mnemonic_label widget' label'
    touchManagedPtr widget
    touchManagedPtr label
    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-gtk4-4.0.12/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" }
--           , argCType = Just "GtkWidget*"
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a widget" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "callback"
--           , argType =
--               TInterface Name { namespace = "Gtk" , name = "TickCallback" }
--           , argCType = Just "GtkTickCallback"
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "function\n  to call for updating animations"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeNotified
--           , argClosure = 2
--           , argDestroy = 3
--           , argCallerAllocates = False
--           , argCallbackUserData = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "user_data"
--           , argType = TBasicType TPtr
--           , argCType = Just "gpointer"
--           , direction = DirectionIn
--           , mayBeNull = True
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "data to pass to @callback"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "notify"
--           , argType =
--               TInterface Name { namespace = "GLib" , name = "DestroyNotify" }
--           , argCType = Just "GDestroyNotify"
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "function to call to free @user_data"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeAsync
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = 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 label),
-- then you will have to call 'GI.Gtk.Objects.Widget.widgetQueueResize' or
-- 'GI.Gtk.Objects.Widget.widgetQueueDraw' yourself.
-- 
-- 'GI.Gdk.Objects.FrameClock.frameClockGetFrameTime' should generally be used
-- for timing continuous animations and
-- 'GI.Gdk.Structs.FrameTimings.frameTimingsGetPredictedPresentationTime' should be
-- used if you are trying to display isolated frames at particular times.
-- 
-- This is a more convenient alternative to connecting directly to the
-- [FrameClock::update]("GI.Gdk.Objects.FrameClock#g:signal:update") signal of the frame clock, since you
-- don\'t have to worry about when a frame clock is assigned to a widget.
-- 
-- To remove a tick callback, pass the ID that is returned by this function
-- to 'GI.Gtk.Objects.Widget.widgetRemoveTickCallback'.
widgetAddTickCallback ::
    (B.CallStack.HasCallStack, MonadIO m, IsWidget a) =>
    a
    -- ^ /@widget@/: a widget
    -> Gtk.Callbacks.TickCallback
    -- ^ /@callback@/: function
    --   to call for updating animations
    -> m Word32
    -- ^ __Returns:__ an ID for this callback
widgetAddTickCallback :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsWidget a) =>
a -> TickCallback -> m Word32
widgetAddTickCallback a
widget TickCallback
callback = IO Word32 -> m Word32
forall a. IO a -> m a
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
    widget' <- a -> IO (Ptr Widget)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
widget
    callback' <- Gtk.Callbacks.mk_TickCallback (Gtk.Callbacks.wrap_TickCallback Nothing (Gtk.Callbacks.drop_closures_TickCallback callback))
    let userData = FunPtr C_TickCallback -> Ptr ()
forall a b. FunPtr a -> Ptr b
castFunPtrToPtr FunPtr C_TickCallback
callback'
    let notify = FunPtr (Ptr a -> IO ())
forall a. FunPtr (Ptr a -> IO ())
SP.safeFreeFunPtrPtr
    result <- gtk_widget_add_tick_callback widget' callback' userData notify
    touchManagedPtr widget
    return 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-gtk4-4.0.12/docs/GI-Gtk-Objects-Widget.html#v:widgetAddTickCallback"
        })


#endif

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

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

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

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

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


#endif

-- method Widget::child_focus
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "widget"
--           , argType = TInterface Name { namespace = "Gtk" , name = "Widget" }
--           , argCType = Just "GtkWidget*"
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a widget" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "direction"
--           , argType =
--               TInterface Name { namespace = "Gtk" , name = "DirectionType" }
--           , argCType = Just "GtkDirectionType"
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "direction of focus movement"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = 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

-- | Called by widgets as the user moves around the window using
-- keyboard shortcuts.
-- 
-- The /@direction@/ argument indicates what kind of motion is taking
-- place (up, down, left, right, tab forward, tab backward).
-- 
-- This function calls the t'GI.Gtk.Objects.Widget.Widget'.@/focus/@() virtual function;
-- widgets can override the virtual function in order to implement
-- appropriate focus behavior.
-- 
-- The default @focus()@ virtual function for a widget should return
-- true if moving in /@direction@/ left the focus on a focusable location
-- inside that widget, and false if moving in /@direction@/ moved the focus
-- outside the widget. When returning true, widgets normally call
-- 'GI.Gtk.Objects.Widget.widgetGrabFocus' to place the focus accordingly;
-- when returning false, they don’t modify the current focus location.
-- 
-- 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.
widgetChildFocus ::
    (B.CallStack.HasCallStack, MonadIO m, IsWidget a) =>
    a
    -- ^ /@widget@/: a widget
    -> Gtk.Enums.DirectionType
    -- ^ /@direction@/: direction of focus movement
    -> m Bool
    -- ^ __Returns:__ 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 a. IO a -> m a
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
    widget' <- a -> IO (Ptr Widget)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
widget
    let 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
    result <- gtk_widget_child_focus widget' direction'
    let result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= CInt
0) CInt
result
    touchManagedPtr widget
    return 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-gtk4-4.0.12/docs/GI-Gtk-Objects-Widget.html#v:widgetChildFocus"
        })


#endif

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

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

-- | Computes the bounds for /@widget@/ in the coordinate space of /@target@/.
-- 
-- The bounds of widget are (the bounding box of) the region that it is
-- expected to draw in. See the <https://docs.gtk.org/gtk4/coordinates.html coordinate system>
-- overview to learn more.
-- 
-- If the operation is successful, true is returned. If /@widget@/ has no
-- bounds or the bounds cannot be expressed in /@target@/\'s coordinate space
-- (for example if both widgets are in different windows), false is
-- returned and /@bounds@/ is set to the zero rectangle.
-- 
-- It is valid for /@widget@/ and /@target@/ to be the same widget.
widgetComputeBounds ::
    (B.CallStack.HasCallStack, MonadIO m, IsWidget a, IsWidget b) =>
    a
    -- ^ /@widget@/: the widget to query
    -> b
    -- ^ /@target@/: the target widget
    -> m ((Bool, Graphene.Rect.Rect))
    -- ^ __Returns:__ true if the bounds could be computed
widgetComputeBounds :: forall (m :: * -> *) a b.
(HasCallStack, MonadIO m, IsWidget a, IsWidget b) =>
a -> b -> m (Bool, Rect)
widgetComputeBounds a
widget b
target = IO (Bool, Rect) -> m (Bool, Rect)
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Bool, Rect) -> m (Bool, Rect))
-> IO (Bool, Rect) -> m (Bool, Rect)
forall a b. (a -> b) -> a -> b
$ do
    widget' <- a -> IO (Ptr Widget)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
widget
    target' <- unsafeManagedPtrCastPtr target
    outBounds <- SP.callocBoxedBytes 16 :: IO (Ptr Graphene.Rect.Rect)
    result <- gtk_widget_compute_bounds widget' target' outBounds
    let result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= CInt
0) CInt
result
    outBounds' <- (wrapBoxed Graphene.Rect.Rect) outBounds
    touchManagedPtr widget
    touchManagedPtr target
    return (result', outBounds')

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

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


#endif

-- method Widget::compute_expand
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "widget"
--           , argType = TInterface Name { namespace = "Gtk" , name = "Widget" }
--           , argCType = Just "GtkWidget*"
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a widget" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "orientation"
--           , argType =
--               TInterface Name { namespace = "Gtk" , name = "Orientation" }
--           , argCType = Just "GtkOrientation"
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "expand direction" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = 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 parent widget should give this widget
-- extra space when possible.
-- 
-- Widgets with children 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@/: a 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 a. IO a -> m a
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
    widget' <- a -> IO (Ptr Widget)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
widget
    let 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
    result <- gtk_widget_compute_expand widget' orientation'
    let result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= CInt
0) CInt
result
    touchManagedPtr widget
    return 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-gtk4-4.0.12/docs/GI-Gtk-Objects-Widget.html#v:widgetComputeExpand"
        })


#endif

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

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

-- | Translates the given /@point@/ in /@widget@/\'s coordinates to coordinates
-- in /@target@/’s coordinate system.
-- 
-- In order to perform this operation, both widgets must share a
-- a common ancestor. If that is not the case, /@outPoint@/ is set
-- to (0, 0) and false is returned.
widgetComputePoint ::
    (B.CallStack.HasCallStack, MonadIO m, IsWidget a, IsWidget b) =>
    a
    -- ^ /@widget@/: the widget to query
    -> b
    -- ^ /@target@/: the widget to transform into
    -> Graphene.Point.Point
    -- ^ /@point@/: a point in /@widget@/\'s coordinate system
    -> m ((Bool, Graphene.Point.Point))
    -- ^ __Returns:__ true if /@srcWidget@/ and /@destWidget@/ have a common
    --   ancestor, false otherwise
widgetComputePoint :: forall (m :: * -> *) a b.
(HasCallStack, MonadIO m, IsWidget a, IsWidget b) =>
a -> b -> Point -> m (Bool, Point)
widgetComputePoint a
widget b
target Point
point = IO (Bool, Point) -> m (Bool, Point)
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Bool, Point) -> m (Bool, Point))
-> IO (Bool, Point) -> m (Bool, Point)
forall a b. (a -> b) -> a -> b
$ do
    widget' <- a -> IO (Ptr Widget)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
widget
    target' <- unsafeManagedPtrCastPtr target
    point' <- unsafeManagedPtrGetPtr point
    outPoint <- SP.callocBoxedBytes 8 :: IO (Ptr Graphene.Point.Point)
    result <- gtk_widget_compute_point widget' target' point' outPoint
    let result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= CInt
0) CInt
result
    outPoint' <- (wrapBoxed Graphene.Point.Point) outPoint
    touchManagedPtr widget
    touchManagedPtr target
    touchManagedPtr point
    return (result', outPoint')

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

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


#endif

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

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

-- | Computes a matrix suitable to describe a transformation from
-- /@widget@/\'s coordinate system into /@target@/\'s coordinate system.
-- 
-- The transform can not be computed in certain cases, for example
-- when /@widget@/ and /@target@/ do not share a common ancestor. In that
-- case /@outTransform@/ gets set to the identity matrix.
-- 
-- To learn more about widget coordinate systems, see the coordinate
-- system <https://docs.gtk.org/gtk4/coordinates.html overview>.
widgetComputeTransform ::
    (B.CallStack.HasCallStack, MonadIO m, IsWidget a, IsWidget b) =>
    a
    -- ^ /@widget@/: a widget
    -> b
    -- ^ /@target@/: the target widget that the matrix will transform to
    -> m ((Bool, Graphene.Matrix.Matrix))
    -- ^ __Returns:__ true if the transform could be computed
widgetComputeTransform :: forall (m :: * -> *) a b.
(HasCallStack, MonadIO m, IsWidget a, IsWidget b) =>
a -> b -> m (Bool, Matrix)
widgetComputeTransform a
widget b
target = IO (Bool, Matrix) -> m (Bool, Matrix)
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Bool, Matrix) -> m (Bool, Matrix))
-> IO (Bool, Matrix) -> m (Bool, Matrix)
forall a b. (a -> b) -> a -> b
$ do
    widget' <- a -> IO (Ptr Widget)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
widget
    target' <- unsafeManagedPtrCastPtr target
    outTransform <- SP.callocBoxedBytes 64 :: IO (Ptr Graphene.Matrix.Matrix)
    result <- gtk_widget_compute_transform widget' target' outTransform
    let result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= CInt
0) CInt
result
    outTransform' <- (wrapBoxed Graphene.Matrix.Matrix) outTransform
    touchManagedPtr widget
    touchManagedPtr target
    return (result', outTransform')

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

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


#endif

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

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

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

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

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


#endif

-- method Widget::create_pango_context
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "widget"
--           , argType = TInterface Name { namespace = "Gtk" , name = "Widget" }
--           , argCType = Just "GtkWidget*"
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a widget" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = 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 @PangoContext@ that is configured for the widget.
-- 
-- The @PangoContext@ will have the appropriate font map,
-- font options, font description, and base direction set.
-- 
-- See also 'GI.Gtk.Objects.Widget.widgetGetPangoContext'.
widgetCreatePangoContext ::
    (B.CallStack.HasCallStack, MonadIO m, IsWidget a) =>
    a
    -- ^ /@widget@/: a widget
    -> m Pango.Context.Context
    -- ^ __Returns:__ the new @PangoContext@
widgetCreatePangoContext :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsWidget a) =>
a -> m Context
widgetCreatePangoContext a
widget = IO Context -> m Context
forall a. IO a -> m a
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
    widget' <- a -> IO (Ptr Widget)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
widget
    result <- gtk_widget_create_pango_context widget'
    checkUnexpectedReturnNULL "widgetCreatePangoContext" result
    result' <- (wrapObject Pango.Context.Context) result
    touchManagedPtr widget
    return 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-gtk4-4.0.12/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" }
--           , argCType = Just "GtkWidget*"
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a widget" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "text"
--           , argType = TBasicType TUTF8
--           , argCType = Just "const char*"
--           , direction = DirectionIn
--           , mayBeNull = True
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "text to set on the layout"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = 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 @PangoLayout@ that is configured for the widget.
-- 
-- The @PangoLayout@ will have the appropriate font map,
-- font description, and base direction set.
-- 
-- If you keep a @PangoLayout@ created in this way around,
-- you need to re-create it when the widgets @PangoContext@
-- is replaced. This can be tracked by listening to changes
-- of the [Widget:root]("GI.Gtk.Objects.Widget#g:attr:root") property on the widget.
widgetCreatePangoLayout ::
    (B.CallStack.HasCallStack, MonadIO m, IsWidget a) =>
    a
    -- ^ /@widget@/: a widget
    -> Maybe (T.Text)
    -- ^ /@text@/: text to set on the layout
    -> m Pango.Layout.Layout
    -- ^ __Returns:__ the new @PangoLayout@
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 a. IO a -> m a
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
    widget' <- a -> IO (Ptr Widget)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
widget
    maybeText <- case text of
        Maybe Text
Nothing -> CString -> IO CString
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return CString
forall a. Ptr a
FP.nullPtr
        Just Text
jText -> do
            jText' <- Text -> IO CString
textToCString Text
jText
            return jText'
    result <- gtk_widget_create_pango_layout widget' maybeText
    checkUnexpectedReturnNULL "widgetCreatePangoLayout" result
    result' <- (wrapObject Pango.Layout.Layout) result
    touchManagedPtr widget
    freeMem maybeText
    return 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-gtk4-4.0.12/docs/GI-Gtk-Objects-Widget.html#v:widgetCreatePangoLayout"
        })


#endif

-- method Widget::dispose_template
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "widget"
--           , argType = TInterface Name { namespace = "Gtk" , name = "Widget" }
--           , argCType = Just "GtkWidget*"
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "the widget with a template"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "widget_type"
--           , argType = TBasicType TGType
--           , argCType = Just "GType"
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText =
--                     Just "the type of the widget to finalize the template for"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "gtk_widget_dispose_template" gtk_widget_dispose_template :: 
    Ptr Widget ->                           -- widget : TInterface (Name {namespace = "Gtk", name = "Widget"})
    CGType ->                               -- widget_type : TBasicType TGType
    IO ()

-- | Clears the template children for the widget.
-- 
-- This function is the opposite of 'GI.Gtk.Objects.Widget.widgetInitTemplate',
-- and it is used to clear all the template children from a widget
-- instance. If you bound a template child to a field in the instance
-- structure, or in the instance private data structure, the field will
-- be set to @NULL@ after this function returns.
-- 
-- You should call this function inside the @GObjectClass.dispose()@
-- implementation of any widget that called 'GI.Gtk.Objects.Widget.widgetInitTemplate'.
-- Typically, you will want to call this function last, right before
-- chaining up to the parent type\'s dispose implementation, e.g.
-- 
-- 
-- === /c code/
-- >static void
-- >some_widget_dispose (GObject *gobject)
-- >{
-- >  SomeWidget *self = SOME_WIDGET (gobject);
-- >
-- >  // Clear the template data for SomeWidget
-- >  gtk_widget_dispose_template (GTK_WIDGET (self), SOME_TYPE_WIDGET);
-- >
-- >  G_OBJECT_CLASS (some_widget_parent_class)->dispose (gobject);
-- >}
-- 
-- 
-- /Since: 4.8/
widgetDisposeTemplate ::
    (B.CallStack.HasCallStack, MonadIO m, IsWidget a) =>
    a
    -- ^ /@widget@/: the widget with a template
    -> GType
    -- ^ /@widgetType@/: the type of the widget to finalize the template for
    -> m ()
widgetDisposeTemplate :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsWidget a) =>
a -> GType -> m ()
widgetDisposeTemplate a
widget GType
widgetType = IO () -> m ()
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    widget' <- a -> IO (Ptr Widget)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
widget
    let widgetType' = GType -> CGType
gtypeToCGType GType
widgetType
    gtk_widget_dispose_template widget' widgetType'
    touchManagedPtr widget
    return ()

#if defined(ENABLE_OVERLOADING)
data WidgetDisposeTemplateMethodInfo
instance (signature ~ (GType -> m ()), MonadIO m, IsWidget a) => O.OverloadedMethod WidgetDisposeTemplateMethodInfo a signature where
    overloadedMethod = widgetDisposeTemplate

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


#endif

-- method Widget::drag_check_threshold
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "widget"
--           , argType = TInterface Name { namespace = "Gtk" , name = "Widget" }
--           , argCType = Just "GtkWidget*"
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a widget" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "start_x"
--           , argType = TBasicType TInt
--           , argCType = Just "int"
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "X coordinate of start of drag"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "start_y"
--           , argType = TBasicType TInt
--           , argCType = Just "int"
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "Y coordinate of start of drag"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "current_x"
--           , argType = TBasicType TInt
--           , argCType = Just "int"
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "current X coordinate"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "current_y"
--           , argType = TBasicType TInt
--           , argCType = Just "int"
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "current Y coordinate"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = 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 drag movement has passed the GTK drag threshold.
widgetDragCheckThreshold ::
    (B.CallStack.HasCallStack, MonadIO m, IsWidget a) =>
    a
    -- ^ /@widget@/: a 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:__ 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 a. IO a -> m a
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
    widget' <- a -> IO (Ptr Widget)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
widget
    result <- gtk_drag_check_threshold widget' startX startY currentX currentY
    let result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= CInt
0) CInt
result
    touchManagedPtr widget
    return 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-gtk4-4.0.12/docs/GI-Gtk-Objects-Widget.html#v:widgetDragCheckThreshold"
        })


#endif

-- method Widget::error_bell
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "widget"
--           , argType = TInterface Name { namespace = "Gtk" , name = "Widget" }
--           , argCType = Just "GtkWidget*"
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a widget" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = 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 the widget.
-- 
-- If the [Settings:gtkErrorBell]("GI.Gtk.Objects.Settings#g:attr:gtkErrorBell") setting is true,
-- it calls 'GI.Gdk.Objects.Surface.surfaceBeep', otherwise it does nothing.
-- 
-- Note that the effect of 'GI.Gdk.Objects.Surface.surfaceBeep' can be configured
-- in many ways, depending on the windowing backend and the desktop
-- environment or window manager that is used.
widgetErrorBell ::
    (B.CallStack.HasCallStack, MonadIO m, IsWidget a) =>
    a
    -- ^ /@widget@/: a widget
    -> m ()
widgetErrorBell :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsWidget a) =>
a -> m ()
widgetErrorBell a
widget = IO () -> m ()
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    widget' <- a -> IO (Ptr Widget)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
widget
    gtk_widget_error_bell widget'
    touchManagedPtr widget
    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-gtk4-4.0.12/docs/GI-Gtk-Objects-Widget.html#v:widgetErrorBell"
        })


#endif

-- method Widget::get_allocated_baseline
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "widget"
--           , argType = TInterface Name { namespace = "Gtk" , name = "Widget" }
--           , argCType = Just "GtkWidget*"
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "the widget to query"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = 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

{-# DEPRECATED widgetGetAllocatedBaseline ["(Since version 4.12)","Use 'GI.Gtk.Objects.Widget.widgetGetBaseline' instead"] #-}
-- | Returns the baseline that has currently been allocated to the widget.
-- 
-- This function is intended to be used when implementing handlers
-- for the @GtkWidget@Class.@/snapshot()/@ function, and when allocating
-- child widgets in @GtkWidget@Class.@/size_allocate()/@.
widgetGetAllocatedBaseline ::
    (B.CallStack.HasCallStack, MonadIO m, IsWidget a) =>
    a
    -- ^ /@widget@/: the widget to query
    -> m Int32
    -- ^ __Returns:__ the baseline of the /@widget@/, or -1 if none
widgetGetAllocatedBaseline :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsWidget a) =>
a -> m Int32
widgetGetAllocatedBaseline a
widget = IO Int32 -> m Int32
forall a. IO a -> m a
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
    widget' <- a -> IO (Ptr Widget)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
widget
    result <- gtk_widget_get_allocated_baseline widget'
    touchManagedPtr widget
    return 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-gtk4-4.0.12/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" }
--           , argCType = Just "GtkWidget*"
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "the widget to query"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = 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

{-# DEPRECATED widgetGetAllocatedHeight ["(Since version 4.12)","Use 'GI.Gtk.Objects.Widget.widgetGetHeight' instead"] #-}
-- | Returns the height that has currently been allocated to the widget.
-- 
-- To learn more about widget sizes, see the coordinate
-- system <https://docs.gtk.org/gtk4/coordinates.html overview>.
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 a. IO a -> m a
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
    widget' <- a -> IO (Ptr Widget)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
widget
    result <- gtk_widget_get_allocated_height widget'
    touchManagedPtr widget
    return 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-gtk4-4.0.12/docs/GI-Gtk-Objects-Widget.html#v:widgetGetAllocatedHeight"
        })


#endif

-- method Widget::get_allocated_width
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "widget"
--           , argType = TInterface Name { namespace = "Gtk" , name = "Widget" }
--           , argCType = Just "GtkWidget*"
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "the widget to query"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = 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

{-# DEPRECATED widgetGetAllocatedWidth ["(Since version 4.12)","Use 'GI.Gtk.Objects.Widget.widgetGetWidth' instead"] #-}
-- | Returns the width that has currently been allocated to the widget.
-- 
-- To learn more about widget sizes, see the coordinate
-- system <https://docs.gtk.org/gtk4/coordinates.html overview>.
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 a. IO a -> m a
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
    widget' <- a -> IO (Ptr Widget)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
widget
    result <- gtk_widget_get_allocated_width widget'
    touchManagedPtr widget
    return 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-gtk4-4.0.12/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" }
--           , argCType = Just "GtkWidget*"
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a widget" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "allocation"
--           , argType =
--               TInterface Name { namespace = "Gdk" , name = "Rectangle" }
--           , argCType = Just "GtkAllocation*"
--           , 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
--           , argCallbackUserData = False
--           , 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 ()

{-# DEPRECATED widgetGetAllocation ["(Since version 4.12)","Use 'GI.Gtk.Objects.Widget.widgetComputeBounds',","'GI.Gtk.Objects.Widget.widgetGetWidth' or 'GI.Gtk.Objects.Widget.widgetGetHeight' instead."] #-}
-- | Retrieves the widget’s allocation.
-- 
-- Note, when implementing a layout widget: a widget’s allocation
-- will be its “adjusted” allocation, that is, the widget’s parent
-- 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 layout widget is guaranteed that its children stay inside
-- the assigned bounds, but not that they have exactly the bounds the
-- widget assigned.
widgetGetAllocation ::
    (B.CallStack.HasCallStack, MonadIO m, IsWidget a) =>
    a
    -- ^ /@widget@/: a 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 a. IO a -> m a
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
    widget' <- a -> IO (Ptr Widget)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
widget
    allocation <- SP.callocBoxedBytes 16 :: IO (Ptr Gdk.Rectangle.Rectangle)
    gtk_widget_get_allocation widget' allocation
    allocation' <- (wrapBoxed Gdk.Rectangle.Rectangle) allocation
    touchManagedPtr widget
    return 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-gtk4-4.0.12/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" }
--           , argCType = Just "GtkWidget*"
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a widget" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "widget_type"
--           , argType = TBasicType TGType
--           , argCType = Just "GType"
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "ancestor type" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = 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 the widget with type /@widgetType@/.
-- 
-- For example, @gtk_widget_get_ancestor (widget, GTK_TYPE_BOX)@
-- gets the first @GtkBox@ that’s an ancestor of /@widget@/. No
-- reference will be added to the returned widget; it should
-- not be unreferenced.
-- 
-- Note that unlike 'GI.Gtk.Objects.Widget.widgetIsAncestor', this function
-- considers /@widget@/ to be an ancestor of itself.
widgetGetAncestor ::
    (B.CallStack.HasCallStack, MonadIO m, IsWidget a) =>
    a
    -- ^ /@widget@/: a widget
    -> GType
    -- ^ /@widgetType@/: ancestor type
    -> m (Maybe Widget)
    -- ^ __Returns:__ the ancestor widget
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 a. IO a -> m a
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
    widget' <- a -> IO (Ptr Widget)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
widget
    let widgetType' = GType -> CGType
gtypeToCGType GType
widgetType
    result <- gtk_widget_get_ancestor widget' widgetType'
    maybeResult <- convertIfNonNull result $ \Ptr Widget
result' -> do
        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'
        return result''
    touchManagedPtr widget
    return 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-gtk4-4.0.12/docs/GI-Gtk-Objects-Widget.html#v:widgetGetAncestor"
        })


#endif

-- method Widget::get_baseline
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "widget"
--           , argType = TInterface Name { namespace = "Gtk" , name = "Widget" }
--           , argCType = Just "GtkWidget*"
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "the widget to query"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TBasicType TInt)
-- throws : False
-- Skip return : False

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

-- | Returns the baseline that has currently been allocated to the widget.
-- 
-- This function is intended to be used when implementing handlers
-- for the @GtkWidgetClass.snapshot()@ function, and when allocating
-- child widgets in @GtkWidgetClass.size_allocate()@.
-- 
-- /Since: 4.12/
widgetGetBaseline ::
    (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
widgetGetBaseline :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsWidget a) =>
a -> m Int32
widgetGetBaseline a
widget = IO Int32 -> m Int32
forall a. IO a -> m a
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
    widget' <- a -> IO (Ptr Widget)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
widget
    result <- gtk_widget_get_baseline widget'
    touchManagedPtr widget
    return result

#if defined(ENABLE_OVERLOADING)
data WidgetGetBaselineMethodInfo
instance (signature ~ (m Int32), MonadIO m, IsWidget a) => O.OverloadedMethod WidgetGetBaselineMethodInfo a signature where
    overloadedMethod = widgetGetBaseline

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


#endif

-- method Widget::get_can_focus
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "widget"
--           , argType = TInterface Name { namespace = "Gtk" , name = "Widget" }
--           , argCType = Just "GtkWidget*"
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a widget" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = 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 the input focus can enter the widget or any
-- of its children.
-- 
-- See 'GI.Gtk.Objects.Widget.widgetSetCanFocus'.
widgetGetCanFocus ::
    (B.CallStack.HasCallStack, MonadIO m, IsWidget a) =>
    a
    -- ^ /@widget@/: a widget
    -> m Bool
    -- ^ __Returns:__ true if the input focus can enter /@widget@/
widgetGetCanFocus :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsWidget a) =>
a -> m Bool
widgetGetCanFocus a
widget = IO Bool -> m Bool
forall a. IO a -> m a
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
    widget' <- a -> IO (Ptr Widget)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
widget
    result <- gtk_widget_get_can_focus widget'
    let result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= CInt
0) CInt
result
    touchManagedPtr widget
    return 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-gtk4-4.0.12/docs/GI-Gtk-Objects-Widget.html#v:widgetGetCanFocus"
        })


#endif

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

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

-- | Queries whether the widget can be the target of pointer events.
widgetGetCanTarget ::
    (B.CallStack.HasCallStack, MonadIO m, IsWidget a) =>
    a
    -- ^ /@widget@/: a widget
    -> m Bool
    -- ^ __Returns:__ true if /@widget@/ can receive pointer events
widgetGetCanTarget :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsWidget a) =>
a -> m Bool
widgetGetCanTarget a
widget = IO Bool -> m Bool
forall a. IO a -> m a
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
    widget' <- a -> IO (Ptr Widget)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
widget
    result <- gtk_widget_get_can_target widget'
    let result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= CInt
0) CInt
result
    touchManagedPtr widget
    return result'

#if defined(ENABLE_OVERLOADING)
data WidgetGetCanTargetMethodInfo
instance (signature ~ (m Bool), MonadIO m, IsWidget a) => O.OverloadedMethod WidgetGetCanTargetMethodInfo a signature where
    overloadedMethod = widgetGetCanTarget

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


#endif

-- method Widget::get_child_visible
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "widget"
--           , argType = TInterface Name { namespace = "Gtk" , name = "Widget" }
--           , argCType = Just "GtkWidget*"
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a widget" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = 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 widget implementations
-- and should never be called by an application.
widgetGetChildVisible ::
    (B.CallStack.HasCallStack, MonadIO m, IsWidget a) =>
    a
    -- ^ /@widget@/: a widget
    -> m Bool
    -- ^ __Returns:__ 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 a. IO a -> m a
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
    widget' <- a -> IO (Ptr Widget)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
widget
    result <- gtk_widget_get_child_visible widget'
    let result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= CInt
0) CInt
result
    touchManagedPtr widget
    return 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-gtk4-4.0.12/docs/GI-Gtk-Objects-Widget.html#v:widgetGetChildVisible"
        })


#endif

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

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

-- | Gets the clipboard object for the widget.
-- 
-- This is a utility function to get the clipboard object for the
-- display that /@widget@/ is using.
-- 
-- Note that this function always works, even when /@widget@/ is not
-- realized yet.
widgetGetClipboard ::
    (B.CallStack.HasCallStack, MonadIO m, IsWidget a) =>
    a
    -- ^ /@widget@/: a widget
    -> m Gdk.Clipboard.Clipboard
    -- ^ __Returns:__ the appropriate clipboard object
widgetGetClipboard :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsWidget a) =>
a -> m Clipboard
widgetGetClipboard a
widget = IO Clipboard -> m Clipboard
forall a. IO a -> m a
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
    widget' <- a -> IO (Ptr Widget)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
widget
    result <- gtk_widget_get_clipboard widget'
    checkUnexpectedReturnNULL "widgetGetClipboard" result
    result' <- (newObject Gdk.Clipboard.Clipboard) result
    touchManagedPtr widget
    return result'

#if defined(ENABLE_OVERLOADING)
data WidgetGetClipboardMethodInfo
instance (signature ~ (m Gdk.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-gtk4-4.0.12/docs/GI-Gtk-Objects-Widget.html#v:widgetGetClipboard"
        })


#endif

-- method Widget::get_color
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "widget"
--           , argType = TInterface Name { namespace = "Gtk" , name = "Widget" }
--           , argCType = Just "GtkWidget*"
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a widget" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "color"
--           , argType = TInterface Name { namespace = "Gdk" , name = "RGBA" }
--           , argCType = Just "GdkRGBA*"
--           , direction = DirectionOut
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "return location for the color"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = True
--           , argCallbackUserData = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "gtk_widget_get_color" gtk_widget_get_color :: 
    Ptr Widget ->                           -- widget : TInterface (Name {namespace = "Gtk", name = "Widget"})
    Ptr Gdk.RGBA.RGBA ->                    -- color : TInterface (Name {namespace = "Gdk", name = "RGBA"})
    IO ()

-- | Gets the current foreground color for the widget’s style.
-- 
-- This function should only be used in snapshot
-- implementations that need to do custom drawing
-- with the foreground color.
-- 
-- /Since: 4.10/
widgetGetColor ::
    (B.CallStack.HasCallStack, MonadIO m, IsWidget a) =>
    a
    -- ^ /@widget@/: a widget
    -> m (Gdk.RGBA.RGBA)
widgetGetColor :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsWidget a) =>
a -> m RGBA
widgetGetColor a
widget = IO RGBA -> m RGBA
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO RGBA -> m RGBA) -> IO RGBA -> m RGBA
forall a b. (a -> b) -> a -> b
$ do
    widget' <- a -> IO (Ptr Widget)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
widget
    color <- SP.callocBoxedBytes 16 :: IO (Ptr Gdk.RGBA.RGBA)
    gtk_widget_get_color widget' color
    color' <- (wrapBoxed Gdk.RGBA.RGBA) color
    touchManagedPtr widget
    return color'

#if defined(ENABLE_OVERLOADING)
data WidgetGetColorMethodInfo
instance (signature ~ (m (Gdk.RGBA.RGBA)), MonadIO m, IsWidget a) => O.OverloadedMethod WidgetGetColorMethodInfo a signature where
    overloadedMethod = widgetGetColor

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


#endif

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

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

-- | Returns the list of style classes applied to the widget.
widgetGetCssClasses ::
    (B.CallStack.HasCallStack, MonadIO m, IsWidget a) =>
    a
    -- ^ /@widget@/: a widget
    -> m [T.Text]
    -- ^ __Returns:__ a @NULL@-terminated list of
    --   css classes currently applied to /@widget@/
widgetGetCssClasses :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsWidget a) =>
a -> m [Text]
widgetGetCssClasses a
widget = IO [Text] -> m [Text]
forall a. IO a -> m a
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
    widget' <- a -> IO (Ptr Widget)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
widget
    result <- gtk_widget_get_css_classes widget'
    checkUnexpectedReturnNULL "widgetGetCssClasses" result
    result' <- unpackZeroTerminatedUTF8CArray result
    mapZeroTerminatedCArray freeMem result
    freeMem result
    touchManagedPtr widget
    return result'

#if defined(ENABLE_OVERLOADING)
data WidgetGetCssClassesMethodInfo
instance (signature ~ (m [T.Text]), MonadIO m, IsWidget a) => O.OverloadedMethod WidgetGetCssClassesMethodInfo a signature where
    overloadedMethod = widgetGetCssClasses

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


#endif

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

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

-- | Returns the CSS name of the widget.
widgetGetCssName ::
    (B.CallStack.HasCallStack, MonadIO m, IsWidget a) =>
    a
    -- ^ /@self@/: a widget
    -> m T.Text
    -- ^ __Returns:__ the CSS name
widgetGetCssName :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsWidget a) =>
a -> m Text
widgetGetCssName a
self = IO Text -> m Text
forall a. IO a -> m a
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
    self' <- a -> IO (Ptr Widget)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
self
    result <- gtk_widget_get_css_name self'
    checkUnexpectedReturnNULL "widgetGetCssName" result
    result' <- cstringToText result
    touchManagedPtr self
    return result'

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

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


#endif

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

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

-- | Gets the cursor set on the widget.
-- 
-- See 'GI.Gtk.Objects.Widget.widgetSetCursor' for details.
widgetGetCursor ::
    (B.CallStack.HasCallStack, MonadIO m, IsWidget a) =>
    a
    -- ^ /@widget@/: a widget
    -> m (Maybe Gdk.Cursor.Cursor)
    -- ^ __Returns:__ the cursor
    --   that is set on /@widget@/
widgetGetCursor :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsWidget a) =>
a -> m (Maybe Cursor)
widgetGetCursor a
widget = IO (Maybe Cursor) -> m (Maybe Cursor)
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Maybe Cursor) -> m (Maybe Cursor))
-> IO (Maybe Cursor) -> m (Maybe Cursor)
forall a b. (a -> b) -> a -> b
$ do
    widget' <- a -> IO (Ptr Widget)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
widget
    result <- gtk_widget_get_cursor widget'
    maybeResult <- convertIfNonNull result $ \Ptr Cursor
result' -> do
        result'' <- ((ManagedPtr Cursor -> Cursor) -> Ptr Cursor -> IO Cursor
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr Cursor -> Cursor
Gdk.Cursor.Cursor) Ptr Cursor
result'
        return result''
    touchManagedPtr widget
    return maybeResult

#if defined(ENABLE_OVERLOADING)
data WidgetGetCursorMethodInfo
instance (signature ~ (m (Maybe Gdk.Cursor.Cursor)), MonadIO m, IsWidget a) => O.OverloadedMethod WidgetGetCursorMethodInfo a signature where
    overloadedMethod = widgetGetCursor

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


#endif

-- method Widget::get_direction
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "widget"
--           , argType = TInterface Name { namespace = "Gtk" , name = "Widget" }
--           , argCType = Just "GtkWidget*"
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a widget" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = 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 the widget.
-- 
-- See 'GI.Gtk.Objects.Widget.widgetSetDirection'.
widgetGetDirection ::
    (B.CallStack.HasCallStack, MonadIO m, IsWidget a) =>
    a
    -- ^ /@widget@/: a 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 a. IO a -> m a
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
    widget' <- a -> IO (Ptr Widget)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
widget
    result <- gtk_widget_get_direction widget'
    let 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
    touchManagedPtr widget
    return 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-gtk4-4.0.12/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" }
--           , argCType = Just "GtkWidget*"
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a widget" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = 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 display for the window that the widget belongs to.
-- 
-- This function can only be called after the widget has been
-- added to a widget hierarchy with a @GtkRoot@ at the top.
-- 
-- In general, you should only create display-specific
-- resources when a widget has been realized, and you should
-- free those resources when the widget is unrealized.
widgetGetDisplay ::
    (B.CallStack.HasCallStack, MonadIO m, IsWidget a) =>
    a
    -- ^ /@widget@/: a widget
    -> m Gdk.Display.Display
    -- ^ __Returns:__ the display for this widget
widgetGetDisplay :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsWidget a) =>
a -> m Display
widgetGetDisplay a
widget = IO Display -> m Display
forall a. IO a -> m a
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
    widget' <- a -> IO (Ptr Widget)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
widget
    result <- gtk_widget_get_display widget'
    checkUnexpectedReturnNULL "widgetGetDisplay" result
    result' <- (newObject Gdk.Display.Display) result
    touchManagedPtr widget
    return 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-gtk4-4.0.12/docs/GI-Gtk-Objects-Widget.html#v:widgetGetDisplay"
        })


#endif

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

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

-- | Returns the widget’s first child.
-- 
-- This function is primarily meant for widget implementations.
widgetGetFirstChild ::
    (B.CallStack.HasCallStack, MonadIO m, IsWidget a) =>
    a
    -- ^ /@widget@/: a widget
    -> m (Maybe Widget)
    -- ^ __Returns:__ the widget\'s first child
widgetGetFirstChild :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsWidget a) =>
a -> m (Maybe Widget)
widgetGetFirstChild a
widget = IO (Maybe Widget) -> m (Maybe Widget)
forall a. IO a -> m a
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
    widget' <- a -> IO (Ptr Widget)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
widget
    result <- gtk_widget_get_first_child widget'
    maybeResult <- convertIfNonNull result $ \Ptr Widget
result' -> do
        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'
        return result''
    touchManagedPtr widget
    return maybeResult

#if defined(ENABLE_OVERLOADING)
data WidgetGetFirstChildMethodInfo
instance (signature ~ (m (Maybe Widget)), MonadIO m, IsWidget a) => O.OverloadedMethod WidgetGetFirstChildMethodInfo a signature where
    overloadedMethod = widgetGetFirstChild

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


#endif

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

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

-- | Returns the focus child of the widget.
widgetGetFocusChild ::
    (B.CallStack.HasCallStack, MonadIO m, IsWidget a) =>
    a
    -- ^ /@widget@/: a widget
    -> m (Maybe Widget)
    -- ^ __Returns:__ the current focus
    --   child of /@widget@/
widgetGetFocusChild :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsWidget a) =>
a -> m (Maybe Widget)
widgetGetFocusChild a
widget = IO (Maybe Widget) -> m (Maybe Widget)
forall a. IO a -> m a
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
    widget' <- a -> IO (Ptr Widget)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
widget
    result <- gtk_widget_get_focus_child widget'
    maybeResult <- convertIfNonNull result $ \Ptr Widget
result' -> do
        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'
        return result''
    touchManagedPtr widget
    return maybeResult

#if defined(ENABLE_OVERLOADING)
data WidgetGetFocusChildMethodInfo
instance (signature ~ (m (Maybe Widget)), MonadIO m, IsWidget a) => O.OverloadedMethod WidgetGetFocusChildMethodInfo a signature where
    overloadedMethod = widgetGetFocusChild

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


#endif

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

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

-- | Returns whether the widget should grab focus when it is clicked
-- with the mouse.
-- 
-- See 'GI.Gtk.Objects.Widget.widgetSetFocusOnClick'.
widgetGetFocusOnClick ::
    (B.CallStack.HasCallStack, MonadIO m, IsWidget a) =>
    a
    -- ^ /@widget@/: a widget
    -> m Bool
    -- ^ __Returns:__ 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 a. IO a -> m a
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
    widget' <- a -> IO (Ptr Widget)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
widget
    result <- gtk_widget_get_focus_on_click widget'
    let result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= CInt
0) CInt
result
    touchManagedPtr widget
    return 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-gtk4-4.0.12/docs/GI-Gtk-Objects-Widget.html#v:widgetGetFocusOnClick"
        })


#endif

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

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

-- | Determines whether the widget can own the input focus.
-- 
-- See 'GI.Gtk.Objects.Widget.widgetSetFocusable'.
widgetGetFocusable ::
    (B.CallStack.HasCallStack, MonadIO m, IsWidget a) =>
    a
    -- ^ /@widget@/: a widget
    -> m Bool
    -- ^ __Returns:__ true if /@widget@/ can own the input focus
widgetGetFocusable :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsWidget a) =>
a -> m Bool
widgetGetFocusable a
widget = IO Bool -> m Bool
forall a. IO a -> m a
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
    widget' <- a -> IO (Ptr Widget)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
widget
    result <- gtk_widget_get_focusable widget'
    let result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= CInt
0) CInt
result
    touchManagedPtr widget
    return result'

#if defined(ENABLE_OVERLOADING)
data WidgetGetFocusableMethodInfo
instance (signature ~ (m Bool), MonadIO m, IsWidget a) => O.OverloadedMethod WidgetGetFocusableMethodInfo a signature where
    overloadedMethod = widgetGetFocusable

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


#endif

-- method Widget::get_font_map
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "widget"
--           , argType = TInterface Name { namespace = "Gtk" , name = "Widget" }
--           , argCType = Just "GtkWidget*"
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a widget" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = 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 of the widget.
-- 
-- See 'GI.Gtk.Objects.Widget.widgetSetFontMap'.
widgetGetFontMap ::
    (B.CallStack.HasCallStack, MonadIO m, IsWidget a) =>
    a
    -- ^ /@widget@/: a widget
    -> m (Maybe Pango.FontMap.FontMap)
    -- ^ __Returns:__ the font map of /@widget@/
widgetGetFontMap :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsWidget a) =>
a -> m (Maybe FontMap)
widgetGetFontMap a
widget = IO (Maybe FontMap) -> m (Maybe FontMap)
forall a. IO a -> m a
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
    widget' <- a -> IO (Ptr Widget)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
widget
    result <- gtk_widget_get_font_map widget'
    maybeResult <- convertIfNonNull result $ \Ptr FontMap
result' -> do
        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'
        return result''
    touchManagedPtr widget
    return 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-gtk4-4.0.12/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" }
--           , argCType = Just "GtkWidget*"
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a widget" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = 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)

{-# DEPRECATED widgetGetFontOptions ["(Since version 4.16)"] #-}
-- | Returns the @cairo_font_options_t@ of the widget.
-- 
-- Seee 'GI.Gtk.Objects.Widget.widgetSetFontOptions'.
widgetGetFontOptions ::
    (B.CallStack.HasCallStack, MonadIO m, IsWidget a) =>
    a
    -- ^ /@widget@/: a widget
    -> m (Maybe Cairo.FontOptions.FontOptions)
    -- ^ __Returns:__ the @cairo_font_options_t@ of widget
widgetGetFontOptions :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsWidget a) =>
a -> m (Maybe FontOptions)
widgetGetFontOptions a
widget = IO (Maybe FontOptions) -> m (Maybe FontOptions)
forall a. IO a -> m a
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
    widget' <- a -> IO (Ptr Widget)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
widget
    result <- gtk_widget_get_font_options widget'
    maybeResult <- convertIfNonNull result $ \Ptr FontOptions
result' -> do
        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'
        return result''
    touchManagedPtr widget
    return 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-gtk4-4.0.12/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" }
--           , argCType = Just "GtkWidget*"
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a widget" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TInterface Name { namespace = "Gdk" , name = "FrameClock" })
-- throws : False
-- Skip return : False

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

-- | Obtains the frame clock for a widget.
-- 
-- The frame clock is a global “ticker” that can be used to drive
-- animations and repaints. The most common reason to get the frame
-- clock is to call 'GI.Gdk.Objects.FrameClock.frameClockGetFrameTime', in order
-- to get a time to use for animating. For example you might record
-- the start of the animation with an initial value from
-- 'GI.Gdk.Objects.FrameClock.frameClockGetFrameTime', and then update the animation
-- by calling 'GI.Gdk.Objects.FrameClock.frameClockGetFrameTime' again during each repaint.
-- 
-- 'GI.Gdk.Objects.FrameClock.frameClockRequestPhase' will result in a new frame on the
-- clock, but won’t necessarily repaint any widgets. To repaint a widget,
-- you have to use 'GI.Gtk.Objects.Widget.widgetQueueDraw' which invalidates the
-- widget (thus scheduling it to receive a draw on the next frame).
-- 'GI.Gtk.Objects.Widget.widgetQueueDraw' will also end up requesting a frame
-- on the appropriate frame clock.
-- 
-- A widget’s frame clock will not change while the widget is mapped.
-- Reparenting a widget (which implies a temporary unmap) can change
-- the widget’s frame clock.
-- 
-- Unrealized widgets do not have a frame clock.
widgetGetFrameClock ::
    (B.CallStack.HasCallStack, MonadIO m, IsWidget a) =>
    a
    -- ^ /@widget@/: a widget
    -> m (Maybe Gdk.FrameClock.FrameClock)
    -- ^ __Returns:__ the frame clock
widgetGetFrameClock :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsWidget a) =>
a -> m (Maybe FrameClock)
widgetGetFrameClock a
widget = IO (Maybe FrameClock) -> m (Maybe FrameClock)
forall a. IO a -> m a
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
    widget' <- a -> IO (Ptr Widget)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
widget
    result <- gtk_widget_get_frame_clock widget'
    maybeResult <- convertIfNonNull result $ \Ptr FrameClock
result' -> do
        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'
        return result''
    touchManagedPtr widget
    return 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-gtk4-4.0.12/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" }
--           , argCType = Just "GtkWidget*"
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a widget" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = 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 horizontal alignment of the widget.
-- 
-- For backwards compatibility reasons this method will never return
-- one of the baseline alignments, but instead it will convert it to
-- 'GI.Gtk.Enums.AlignFill' or 'GI.Gtk.Enums.AlignCenter'.
-- 
-- Baselines are not supported for horizontal alignment.
widgetGetHalign ::
    (B.CallStack.HasCallStack, MonadIO m, IsWidget a) =>
    a
    -- ^ /@widget@/: a 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 a. IO a -> m a
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
    widget' <- a -> IO (Ptr Widget)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
widget
    result <- gtk_widget_get_halign widget'
    let 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
    touchManagedPtr widget
    return 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-gtk4-4.0.12/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" }
--           , argCType = Just "GtkWidget*"
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a widget" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = 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.
widgetGetHasTooltip ::
    (B.CallStack.HasCallStack, MonadIO m, IsWidget a) =>
    a
    -- ^ /@widget@/: a 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 a. IO a -> m a
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
    widget' <- a -> IO (Ptr Widget)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
widget
    result <- gtk_widget_get_has_tooltip widget'
    let result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= CInt
0) CInt
result
    touchManagedPtr widget
    return 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-gtk4-4.0.12/docs/GI-Gtk-Objects-Widget.html#v:widgetGetHasTooltip"
        })


#endif

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

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

-- | Returns the content height of the widget.
-- 
-- This function returns the height passed to its
-- size-allocate implementation, which is the height you
-- should be using in t'GI.Gtk.Objects.Widget.Widget'.@/snapshot/@().
-- 
-- For pointer events, see 'GI.Gtk.Objects.Widget.widgetContains'.
-- 
-- To learn more about widget sizes, see the coordinate
-- system <https://docs.gtk.org/gtk4/coordinates.html overview>.
widgetGetHeight ::
    (B.CallStack.HasCallStack, MonadIO m, IsWidget a) =>
    a
    -- ^ /@widget@/: a widget
    -> m Int32
    -- ^ __Returns:__ The height of /@widget@/
widgetGetHeight :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsWidget a) =>
a -> m Int32
widgetGetHeight a
widget = IO Int32 -> m Int32
forall a. IO a -> m a
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
    widget' <- a -> IO (Ptr Widget)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
widget
    result <- gtk_widget_get_height widget'
    touchManagedPtr widget
    return result

#if defined(ENABLE_OVERLOADING)
data WidgetGetHeightMethodInfo
instance (signature ~ (m Int32), MonadIO m, IsWidget a) => O.OverloadedMethod WidgetGetHeightMethodInfo a signature where
    overloadedMethod = widgetGetHeight

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


#endif

-- method Widget::get_hexpand
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "widget"
--           , argType = TInterface Name { namespace = "Gtk" , name = "Widget" }
--           , argCType = Just "GtkWidget*"
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a widget" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = 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 window, widgets with expand set to true generally
-- receive the extra space. For example, a list or scrollable area
-- or document in your window would often be set to expand.
-- 
-- Widgets with children should use 'GI.Gtk.Objects.Widget.widgetComputeExpand'
-- rather than this function, to see whether 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@/: a 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 a. IO a -> m a
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
    widget' <- a -> IO (Ptr Widget)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
widget
    result <- gtk_widget_get_hexpand widget'
    let result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= CInt
0) CInt
result
    touchManagedPtr widget
    return 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-gtk4-4.0.12/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" }
--           , argCType = Just "GtkWidget*"
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a widget" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = 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 the @hexpand@ flag has been explicitly set.
-- 
-- If [Widget:hexpand]("GI.Gtk.Objects.Widget#g:attr:hexpand") property 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@/: a 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 a. IO a -> m a
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
    widget' <- a -> IO (Ptr Widget)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
widget
    result <- gtk_widget_get_hexpand_set widget'
    let result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= CInt
0) CInt
result
    touchManagedPtr widget
    return 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-gtk4-4.0.12/docs/GI-Gtk-Objects-Widget.html#v:widgetGetHexpandSet"
        })


#endif

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

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

-- | Returns the widget’s last child.
-- 
-- This function is primarily meant for widget implementations.
widgetGetLastChild ::
    (B.CallStack.HasCallStack, MonadIO m, IsWidget a) =>
    a
    -- ^ /@widget@/: a widget
    -> m (Maybe Widget)
    -- ^ __Returns:__ the widget\'s last child
widgetGetLastChild :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsWidget a) =>
a -> m (Maybe Widget)
widgetGetLastChild a
widget = IO (Maybe Widget) -> m (Maybe Widget)
forall a. IO a -> m a
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
    widget' <- a -> IO (Ptr Widget)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
widget
    result <- gtk_widget_get_last_child widget'
    maybeResult <- convertIfNonNull result $ \Ptr Widget
result' -> do
        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'
        return result''
    touchManagedPtr widget
    return maybeResult

#if defined(ENABLE_OVERLOADING)
data WidgetGetLastChildMethodInfo
instance (signature ~ (m (Maybe Widget)), MonadIO m, IsWidget a) => O.OverloadedMethod WidgetGetLastChildMethodInfo a signature where
    overloadedMethod = widgetGetLastChild

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


#endif

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

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

-- | Retrieves the layout manager of the widget.
-- 
-- See 'GI.Gtk.Objects.Widget.widgetSetLayoutManager'.
widgetGetLayoutManager ::
    (B.CallStack.HasCallStack, MonadIO m, IsWidget a) =>
    a
    -- ^ /@widget@/: a widget
    -> m (Maybe Gtk.LayoutManager.LayoutManager)
    -- ^ __Returns:__ the layout manager of /@widget@/
widgetGetLayoutManager :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsWidget a) =>
a -> m (Maybe LayoutManager)
widgetGetLayoutManager a
widget = IO (Maybe LayoutManager) -> m (Maybe LayoutManager)
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Maybe LayoutManager) -> m (Maybe LayoutManager))
-> IO (Maybe LayoutManager) -> m (Maybe LayoutManager)
forall a b. (a -> b) -> a -> b
$ do
    widget' <- a -> IO (Ptr Widget)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
widget
    result <- gtk_widget_get_layout_manager widget'
    maybeResult <- convertIfNonNull result $ \Ptr LayoutManager
result' -> do
        result'' <- ((ManagedPtr LayoutManager -> LayoutManager)
-> Ptr LayoutManager -> IO LayoutManager
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr LayoutManager -> LayoutManager
Gtk.LayoutManager.LayoutManager) Ptr LayoutManager
result'
        return result''
    touchManagedPtr widget
    return maybeResult

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

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


#endif

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

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

-- | Gets the value of the [Widget:limitEvents]("GI.Gtk.Objects.Widget#g:attr:limitEvents") property.
-- 
-- /Since: 4.18/
widgetGetLimitEvents ::
    (B.CallStack.HasCallStack, MonadIO m, IsWidget a) =>
    a
    -- ^ /@widget@/: a @GtkWidget@
    -> m Bool
widgetGetLimitEvents :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsWidget a) =>
a -> m Bool
widgetGetLimitEvents a
widget = IO Bool -> m Bool
forall a. IO a -> m a
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
    widget' <- a -> IO (Ptr Widget)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
widget
    result <- gtk_widget_get_limit_events widget'
    let result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= CInt
0) CInt
result
    touchManagedPtr widget
    return result'

#if defined(ENABLE_OVERLOADING)
data WidgetGetLimitEventsMethodInfo
instance (signature ~ (m Bool), MonadIO m, IsWidget a) => O.OverloadedMethod WidgetGetLimitEventsMethodInfo a signature where
    overloadedMethod = widgetGetLimitEvents

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


#endif

-- method Widget::get_mapped
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "widget"
--           , argType = TInterface Name { namespace = "Gtk" , name = "Widget" }
--           , argCType = Just "GtkWidget*"
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a widget" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = 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

-- | Returns whether the widget is mapped.
widgetGetMapped ::
    (B.CallStack.HasCallStack, MonadIO m, IsWidget a) =>
    a
    -- ^ /@widget@/: a widget
    -> m Bool
    -- ^ __Returns:__ true if the widget is mapped
widgetGetMapped :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsWidget a) =>
a -> m Bool
widgetGetMapped a
widget = IO Bool -> m Bool
forall a. IO a -> m a
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
    widget' <- a -> IO (Ptr Widget)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
widget
    result <- gtk_widget_get_mapped widget'
    let result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= CInt
0) CInt
result
    touchManagedPtr widget
    return 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-gtk4-4.0.12/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" }
--           , argCType = Just "GtkWidget*"
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a widget" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = 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 bottom margin of the widget.
widgetGetMarginBottom ::
    (B.CallStack.HasCallStack, MonadIO m, IsWidget a) =>
    a
    -- ^ /@widget@/: a 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 a. IO a -> m a
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
    widget' <- a -> IO (Ptr Widget)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
widget
    result <- gtk_widget_get_margin_bottom widget'
    touchManagedPtr widget
    return 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-gtk4-4.0.12/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" }
--           , argCType = Just "GtkWidget*"
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a widget" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = 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 end margin of the widget.
widgetGetMarginEnd ::
    (B.CallStack.HasCallStack, MonadIO m, IsWidget a) =>
    a
    -- ^ /@widget@/: a 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 a. IO a -> m a
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
    widget' <- a -> IO (Ptr Widget)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
widget
    result <- gtk_widget_get_margin_end widget'
    touchManagedPtr widget
    return 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-gtk4-4.0.12/docs/GI-Gtk-Objects-Widget.html#v:widgetGetMarginEnd"
        })


#endif

-- method Widget::get_margin_start
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "widget"
--           , argType = TInterface Name { namespace = "Gtk" , name = "Widget" }
--           , argCType = Just "GtkWidget*"
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a widget" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = 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 start margin of the widget.
widgetGetMarginStart ::
    (B.CallStack.HasCallStack, MonadIO m, IsWidget a) =>
    a
    -- ^ /@widget@/: a 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 a. IO a -> m a
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
    widget' <- a -> IO (Ptr Widget)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
widget
    result <- gtk_widget_get_margin_start widget'
    touchManagedPtr widget
    return 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-gtk4-4.0.12/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" }
--           , argCType = Just "GtkWidget*"
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a widget" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = 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 top margin of the widget.
widgetGetMarginTop ::
    (B.CallStack.HasCallStack, MonadIO m, IsWidget a) =>
    a
    -- ^ /@widget@/: a 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 a. IO a -> m a
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
    widget' <- a -> IO (Ptr Widget)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
widget
    result <- gtk_widget_get_margin_top widget'
    touchManagedPtr widget
    return 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-gtk4-4.0.12/docs/GI-Gtk-Objects-Widget.html#v:widgetGetMarginTop"
        })


#endif

-- method Widget::get_name
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "widget"
--           , argType = TInterface Name { namespace = "Gtk" , name = "Widget" }
--           , argCType = Just "GtkWidget*"
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a widget" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = 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 widget
    -> m T.Text
    -- ^ __Returns:__ name of the widget
widgetGetName :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsWidget a) =>
a -> m Text
widgetGetName a
widget = IO Text -> m Text
forall a. IO a -> m a
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
    widget' <- a -> IO (Ptr Widget)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
widget
    result <- gtk_widget_get_name widget'
    checkUnexpectedReturnNULL "widgetGetName" result
    result' <- cstringToText result
    touchManagedPtr widget
    return 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-gtk4-4.0.12/docs/GI-Gtk-Objects-Widget.html#v:widgetGetName"
        })


#endif

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

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

-- | Returns the nearest @GtkNative@ ancestor of the widget.
-- 
-- This function will return @NULL@ if the widget is not
-- contained inside a widget tree with a native ancestor.
-- 
-- @GtkNative@ widgets will return themselves here.
widgetGetNative ::
    (B.CallStack.HasCallStack, MonadIO m, IsWidget a) =>
    a
    -- ^ /@widget@/: a widget
    -> m (Maybe Gtk.Native.Native)
    -- ^ __Returns:__ the @GtkNative@ ancestor of /@widget@/
widgetGetNative :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsWidget a) =>
a -> m (Maybe Native)
widgetGetNative a
widget = IO (Maybe Native) -> m (Maybe Native)
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Maybe Native) -> m (Maybe Native))
-> IO (Maybe Native) -> m (Maybe Native)
forall a b. (a -> b) -> a -> b
$ do
    widget' <- a -> IO (Ptr Widget)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
widget
    result <- gtk_widget_get_native widget'
    maybeResult <- convertIfNonNull result $ \Ptr Native
result' -> do
        result'' <- ((ManagedPtr Native -> Native) -> Ptr Native -> IO Native
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr Native -> Native
Gtk.Native.Native) Ptr Native
result'
        return result''
    touchManagedPtr widget
    return maybeResult

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

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


#endif

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

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

-- | Returns the widget’s next sibling.
-- 
-- This function is primarily meant for widget implementations.
widgetGetNextSibling ::
    (B.CallStack.HasCallStack, MonadIO m, IsWidget a) =>
    a
    -- ^ /@widget@/: a widget
    -> m (Maybe Widget)
    -- ^ __Returns:__ the widget\'s next sibling
widgetGetNextSibling :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsWidget a) =>
a -> m (Maybe Widget)
widgetGetNextSibling a
widget = IO (Maybe Widget) -> m (Maybe Widget)
forall a. IO a -> m a
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
    widget' <- a -> IO (Ptr Widget)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
widget
    result <- gtk_widget_get_next_sibling widget'
    maybeResult <- convertIfNonNull result $ \Ptr Widget
result' -> do
        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'
        return result''
    touchManagedPtr widget
    return maybeResult

#if defined(ENABLE_OVERLOADING)
data WidgetGetNextSiblingMethodInfo
instance (signature ~ (m (Maybe Widget)), MonadIO m, IsWidget a) => O.OverloadedMethod WidgetGetNextSiblingMethodInfo a signature where
    overloadedMethod = widgetGetNextSibling

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


#endif

-- method Widget::get_opacity
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "widget"
--           , argType = TInterface Name { namespace = "Gtk" , name = "Widget" }
--           , argCType = Just "GtkWidget*"
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a widget" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = 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 the widget.
-- 
-- See 'GI.Gtk.Objects.Widget.widgetSetOpacity'.
widgetGetOpacity ::
    (B.CallStack.HasCallStack, MonadIO m, IsWidget a) =>
    a
    -- ^ /@widget@/: a 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 a. IO a -> m a
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
    widget' <- a -> IO (Ptr Widget)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
widget
    result <- gtk_widget_get_opacity widget'
    let result' = CDouble -> Double
forall a b. (Real a, Fractional b) => a -> b
realToFrac CDouble
result
    touchManagedPtr widget
    return 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-gtk4-4.0.12/docs/GI-Gtk-Objects-Widget.html#v:widgetGetOpacity"
        })


#endif

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

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

-- | Returns the widget’s overflow value.
widgetGetOverflow ::
    (B.CallStack.HasCallStack, MonadIO m, IsWidget a) =>
    a
    -- ^ /@widget@/: a widget
    -> m Gtk.Enums.Overflow
    -- ^ __Returns:__ The widget\'s overflow value
widgetGetOverflow :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsWidget a) =>
a -> m Overflow
widgetGetOverflow a
widget = IO Overflow -> m Overflow
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Overflow -> m Overflow) -> IO Overflow -> m Overflow
forall a b. (a -> b) -> a -> b
$ do
    widget' <- a -> IO (Ptr Widget)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
widget
    result <- gtk_widget_get_overflow widget'
    let result' = (Int -> Overflow
forall a. Enum a => Int -> a
toEnum (Int -> Overflow) -> (CUInt -> Int) -> CUInt -> Overflow
forall b c a. (b -> c) -> (a -> b) -> a -> c
. CUInt -> Int
forall a b. (Integral a, Num b) => a -> b
fromIntegral) CUInt
result
    touchManagedPtr widget
    return result'

#if defined(ENABLE_OVERLOADING)
data WidgetGetOverflowMethodInfo
instance (signature ~ (m Gtk.Enums.Overflow), MonadIO m, IsWidget a) => O.OverloadedMethod WidgetGetOverflowMethodInfo a signature where
    overloadedMethod = widgetGetOverflow

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


#endif

-- method Widget::get_pango_context
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "widget"
--           , argType = TInterface Name { namespace = "Gtk" , name = "Widget" }
--           , argCType = Just "GtkWidget*"
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a widget" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = 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 @PangoContext@ that is configured for the widget.
-- 
-- The @PangoContext@ will have the appropriate font map, font description,
-- and base direction set.
-- 
-- 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 listening to changes of the
-- [Widget:root]("GI.Gtk.Objects.Widget#g:attr:root") property on the widget.
widgetGetPangoContext ::
    (B.CallStack.HasCallStack, MonadIO m, IsWidget a) =>
    a
    -- ^ /@widget@/: a widget
    -> m Pango.Context.Context
    -- ^ __Returns:__ the @PangoContext@ for the widget
widgetGetPangoContext :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsWidget a) =>
a -> m Context
widgetGetPangoContext a
widget = IO Context -> m Context
forall a. IO a -> m a
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
    widget' <- a -> IO (Ptr Widget)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
widget
    result <- gtk_widget_get_pango_context widget'
    checkUnexpectedReturnNULL "widgetGetPangoContext" result
    result' <- (newObject Pango.Context.Context) result
    touchManagedPtr widget
    return 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-gtk4-4.0.12/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" }
--           , argCType = Just "GtkWidget*"
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a widget" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TInterface Name { namespace = "Gtk" , name = "Widget" })
-- throws : False
-- Skip return : False

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

-- | Returns the parent widget of the widget.
widgetGetParent ::
    (B.CallStack.HasCallStack, MonadIO m, IsWidget a) =>
    a
    -- ^ /@widget@/: a widget
    -> m (Maybe Widget)
    -- ^ __Returns:__ the parent widget of /@widget@/
widgetGetParent :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsWidget a) =>
a -> m (Maybe Widget)
widgetGetParent a
widget = IO (Maybe Widget) -> m (Maybe Widget)
forall a. IO a -> m a
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
    widget' <- a -> IO (Ptr Widget)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
widget
    result <- gtk_widget_get_parent widget'
    maybeResult <- convertIfNonNull result $ \Ptr Widget
result' -> do
        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'
        return result''
    touchManagedPtr widget
    return 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-gtk4-4.0.12/docs/GI-Gtk-Objects-Widget.html#v:widgetGetParent"
        })


#endif

-- method Widget::get_preferred_size
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "widget"
--           , argType = TInterface Name { namespace = "Gtk" , name = "Widget" }
--           , argCType = Just "GtkWidget*"
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a `GtkWidget` instance"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "minimum_size"
--           , argType =
--               TInterface Name { namespace = "Gtk" , name = "Requisition" }
--           , argCType = Just "GtkRequisition*"
--           , direction = DirectionOut
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "location for storing the minimum size"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = True
--           , argCallbackUserData = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "natural_size"
--           , argType =
--               TInterface Name { namespace = "Gtk" , name = "Requisition" }
--           , argCType = Just "GtkRequisition*"
--           , direction = DirectionOut
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "location for storing the natural size"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = True
--           , argCallbackUserData = False
--           , 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 @GtkFixed@.
-- 
-- Handle with care. Note that the natural height of a height-for-width
-- widget will generally be a smaller size than the minimum height, since
-- the required height for the natural width is generally smaller than the
-- required height for the minimum width.
-- 
-- Use 'GI.Gtk.Objects.Widget.widgetMeasure' if you want to support baseline alignment.
widgetGetPreferredSize ::
    (B.CallStack.HasCallStack, MonadIO m, IsWidget a) =>
    a
    -- ^ /@widget@/: a @GtkWidget@ 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 a. IO a -> m a
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
    widget' <- a -> IO (Ptr Widget)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
widget
    minimumSize <- SP.callocBoxedBytes 8 :: IO (Ptr Gtk.Requisition.Requisition)
    naturalSize <- SP.callocBoxedBytes 8 :: IO (Ptr Gtk.Requisition.Requisition)
    gtk_widget_get_preferred_size widget' minimumSize naturalSize
    minimumSize' <- (wrapBoxed Gtk.Requisition.Requisition) minimumSize
    naturalSize' <- (wrapBoxed Gtk.Requisition.Requisition) naturalSize
    touchManagedPtr widget
    return (minimumSize', 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-gtk4-4.0.12/docs/GI-Gtk-Objects-Widget.html#v:widgetGetPreferredSize"
        })


#endif

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

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

-- | Returns the widget’s previous sibling.
-- 
-- This function is primarily meant for widget implementations.
widgetGetPrevSibling ::
    (B.CallStack.HasCallStack, MonadIO m, IsWidget a) =>
    a
    -- ^ /@widget@/: a widget
    -> m (Maybe Widget)
    -- ^ __Returns:__ the widget\'s previous sibling
widgetGetPrevSibling :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsWidget a) =>
a -> m (Maybe Widget)
widgetGetPrevSibling a
widget = IO (Maybe Widget) -> m (Maybe Widget)
forall a. IO a -> m a
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
    widget' <- a -> IO (Ptr Widget)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
widget
    result <- gtk_widget_get_prev_sibling widget'
    maybeResult <- convertIfNonNull result $ \Ptr Widget
result' -> do
        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'
        return result''
    touchManagedPtr widget
    return maybeResult

#if defined(ENABLE_OVERLOADING)
data WidgetGetPrevSiblingMethodInfo
instance (signature ~ (m (Maybe Widget)), MonadIO m, IsWidget a) => O.OverloadedMethod WidgetGetPrevSiblingMethodInfo a signature where
    overloadedMethod = widgetGetPrevSibling

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


#endif

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

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

-- | Gets the primary clipboard of the widget.
-- 
-- This is a utility function to get the primary clipboard object
-- for the display that /@widget@/ is using.
-- 
-- Note that this function always works, even when /@widget@/ is not
-- realized yet.
widgetGetPrimaryClipboard ::
    (B.CallStack.HasCallStack, MonadIO m, IsWidget a) =>
    a
    -- ^ /@widget@/: a widget
    -> m Gdk.Clipboard.Clipboard
    -- ^ __Returns:__ the appropriate clipboard object
widgetGetPrimaryClipboard :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsWidget a) =>
a -> m Clipboard
widgetGetPrimaryClipboard a
widget = IO Clipboard -> m Clipboard
forall a. IO a -> m a
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
    widget' <- a -> IO (Ptr Widget)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
widget
    result <- gtk_widget_get_primary_clipboard widget'
    checkUnexpectedReturnNULL "widgetGetPrimaryClipboard" result
    result' <- (newObject Gdk.Clipboard.Clipboard) result
    touchManagedPtr widget
    return result'

#if defined(ENABLE_OVERLOADING)
data WidgetGetPrimaryClipboardMethodInfo
instance (signature ~ (m Gdk.Clipboard.Clipboard), MonadIO m, IsWidget a) => O.OverloadedMethod WidgetGetPrimaryClipboardMethodInfo a signature where
    overloadedMethod = widgetGetPrimaryClipboard

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


#endif

-- method Widget::get_realized
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "widget"
--           , argType = TInterface Name { namespace = "Gtk" , name = "Widget" }
--           , argCType = Just "GtkWidget*"
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a widget" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = 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 the widget is realized.
widgetGetRealized ::
    (B.CallStack.HasCallStack, MonadIO m, IsWidget a) =>
    a
    -- ^ /@widget@/: a widget
    -> m Bool
    -- ^ __Returns:__ true if /@widget@/ is realized
widgetGetRealized :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsWidget a) =>
a -> m Bool
widgetGetRealized a
widget = IO Bool -> m Bool
forall a. IO a -> m a
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
    widget' <- a -> IO (Ptr Widget)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
widget
    result <- gtk_widget_get_realized widget'
    let result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= CInt
0) CInt
result
    touchManagedPtr widget
    return 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-gtk4-4.0.12/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" }
--           , argCType = Just "GtkWidget*"
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a widget" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = 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 the widget is always treated as the default widget
-- within its toplevel when it has the focus, even if another widget
-- is the default.
-- 
-- See 'GI.Gtk.Objects.Widget.widgetSetReceivesDefault'.
widgetGetReceivesDefault ::
    (B.CallStack.HasCallStack, MonadIO m, IsWidget a) =>
    a
    -- ^ /@widget@/: a widget
    -> m Bool
    -- ^ __Returns:__ true if /@widget@/ acts as the default widget when focused
widgetGetReceivesDefault :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsWidget a) =>
a -> m Bool
widgetGetReceivesDefault a
widget = IO Bool -> m Bool
forall a. IO a -> m a
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
    widget' <- a -> IO (Ptr Widget)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
widget
    result <- gtk_widget_get_receives_default widget'
    let result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= CInt
0) CInt
result
    touchManagedPtr widget
    return 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-gtk4-4.0.12/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" }
--           , argCType = Just "GtkWidget*"
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a `GtkWidget` instance"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = 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.
-- 
-- Single-child widgets generally propagate the preference of
-- their child, more complex widgets need to request something
-- either in context of their children or in context of their
-- allocation capabilities.
widgetGetRequestMode ::
    (B.CallStack.HasCallStack, MonadIO m, IsWidget a) =>
    a
    -- ^ /@widget@/: a @GtkWidget@ instance
    -> m Gtk.Enums.SizeRequestMode
    -- ^ __Returns:__ The @GtkSizeRequestMode@ preferred by /@widget@/.
widgetGetRequestMode :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsWidget a) =>
a -> m SizeRequestMode
widgetGetRequestMode a
widget = IO SizeRequestMode -> m SizeRequestMode
forall a. IO a -> m a
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
    widget' <- a -> IO (Ptr Widget)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
widget
    result <- gtk_widget_get_request_mode widget'
    let 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
    touchManagedPtr widget
    return 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-gtk4-4.0.12/docs/GI-Gtk-Objects-Widget.html#v:widgetGetRequestMode"
        })


#endif

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

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

-- | Returns the @GtkRoot@ widget of the widget.
-- 
-- This function will return @NULL@ if the widget is not contained
-- inside a widget tree with a root widget.
-- 
-- @GtkRoot@ widgets will return themselves here.
widgetGetRoot ::
    (B.CallStack.HasCallStack, MonadIO m, IsWidget a) =>
    a
    -- ^ /@widget@/: a widget
    -> m (Maybe Gtk.Root.Root)
    -- ^ __Returns:__ the root widget of /@widget@/
widgetGetRoot :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsWidget a) =>
a -> m (Maybe Root)
widgetGetRoot a
widget = IO (Maybe Root) -> m (Maybe Root)
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Maybe Root) -> m (Maybe Root))
-> IO (Maybe Root) -> m (Maybe Root)
forall a b. (a -> b) -> a -> b
$ do
    widget' <- a -> IO (Ptr Widget)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
widget
    result <- gtk_widget_get_root widget'
    maybeResult <- convertIfNonNull result $ \Ptr Root
result' -> do
        result'' <- ((ManagedPtr Root -> Root) -> Ptr Root -> IO Root
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr Root -> Root
Gtk.Root.Root) Ptr Root
result'
        return result''
    touchManagedPtr widget
    return maybeResult

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

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


#endif

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

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

-- | Retrieves the internal scale factor that maps from window
-- coordinates to the actual device pixels.
-- 
-- On traditional systems this is 1, on high density outputs,
-- it can be a higher value (typically 2).
-- 
-- See 'GI.Gdk.Objects.Surface.surfaceGetScaleFactor'.
-- 
-- Note that modern systems may support *fractional* scaling,
-- where the scale factor is not an integer. On such systems,
-- this function will return the next higher integer value,
-- but you probably want to use 'GI.Gdk.Objects.Surface.surfaceGetScale'
-- to get the fractional scale value.
widgetGetScaleFactor ::
    (B.CallStack.HasCallStack, MonadIO m, IsWidget a) =>
    a
    -- ^ /@widget@/: a 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 a. IO a -> m a
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
    widget' <- a -> IO (Ptr Widget)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
widget
    result <- gtk_widget_get_scale_factor widget'
    touchManagedPtr widget
    return 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-gtk4-4.0.12/docs/GI-Gtk-Objects-Widget.html#v:widgetGetScaleFactor"
        })


#endif

-- method Widget::get_sensitive
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "widget"
--           , argType = TInterface Name { namespace = "Gtk" , name = "Widget" }
--           , argCType = Just "GtkWidget*"
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a widget" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = 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.
-- 
-- This function returns the value that has been set using
-- 'GI.Gtk.Objects.Widget.widgetSetSensitive').
-- 
-- The effective sensitivity of a widget is however determined
-- by both its own and its parent widget’s sensitivity.
-- See 'GI.Gtk.Objects.Widget.widgetIsSensitive'.
widgetGetSensitive ::
    (B.CallStack.HasCallStack, MonadIO m, IsWidget a) =>
    a
    -- ^ /@widget@/: a widget
    -> m Bool
    -- ^ __Returns:__ 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 a. IO a -> m a
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
    widget' <- a -> IO (Ptr Widget)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
widget
    result <- gtk_widget_get_sensitive widget'
    let result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= CInt
0) CInt
result
    touchManagedPtr widget
    return 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-gtk4-4.0.12/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" }
--           , argCType = Just "GtkWidget*"
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a widget" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = 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 the widget.
-- 
-- Note that this function can only be called when the @GtkWidget@
-- is attached to a toplevel, since the settings object is specific
-- to a particular display. If you want to monitor the widget for
-- changes in its settings, connect to the @notify::display@ signal.
widgetGetSettings ::
    (B.CallStack.HasCallStack, MonadIO m, IsWidget a) =>
    a
    -- ^ /@widget@/: a widget
    -> m Gtk.Settings.Settings
    -- ^ __Returns:__ the relevant settings object
widgetGetSettings :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsWidget a) =>
a -> m Settings
widgetGetSettings a
widget = IO Settings -> m Settings
forall a. IO a -> m a
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
    widget' <- a -> IO (Ptr Widget)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
widget
    result <- gtk_widget_get_settings widget'
    checkUnexpectedReturnNULL "widgetGetSettings" result
    result' <- (newObject Gtk.Settings.Settings) result
    touchManagedPtr widget
    return 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-gtk4-4.0.12/docs/GI-Gtk-Objects-Widget.html#v:widgetGetSettings"
        })


#endif

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

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

-- | Returns the content width or height of the widget.
-- 
-- Which dimension is returned depends on /@orientation@/.
-- 
-- This is equivalent to calling 'GI.Gtk.Objects.Widget.widgetGetWidth'
-- for 'GI.Gtk.Enums.OrientationHorizontal' or 'GI.Gtk.Objects.Widget.widgetGetHeight'
-- for 'GI.Gtk.Enums.OrientationVertical', but can be used when
-- writing orientation-independent code, such as when
-- implementing t'GI.Gtk.Interfaces.Orientable.Orientable' widgets.
-- 
-- To learn more about widget sizes, see the coordinate
-- system <https://docs.gtk.org/gtk4/coordinates.html overview>.
widgetGetSize ::
    (B.CallStack.HasCallStack, MonadIO m, IsWidget a) =>
    a
    -- ^ /@widget@/: a widget
    -> Gtk.Enums.Orientation
    -- ^ /@orientation@/: the orientation to query
    -> m Int32
    -- ^ __Returns:__ the size of /@widget@/ in /@orientation@/
widgetGetSize :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsWidget a) =>
a -> Orientation -> m Int32
widgetGetSize a
widget Orientation
orientation = IO Int32 -> m Int32
forall a. IO a -> m a
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
    widget' <- a -> IO (Ptr Widget)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
widget
    let 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
    result <- gtk_widget_get_size widget' orientation'
    touchManagedPtr widget
    return result

#if defined(ENABLE_OVERLOADING)
data WidgetGetSizeMethodInfo
instance (signature ~ (Gtk.Enums.Orientation -> m Int32), MonadIO m, IsWidget a) => O.OverloadedMethod WidgetGetSizeMethodInfo a signature where
    overloadedMethod = widgetGetSize

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


#endif

-- method Widget::get_size_request
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "widget"
--           , argType = TInterface Name { namespace = "Gtk" , name = "Widget" }
--           , argCType = Just "GtkWidget*"
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a widget" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "width"
--           , argType = TBasicType TInt
--           , argCType = Just "int*"
--           , direction = DirectionOut
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "return location for width"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = False
--           , transfer = TransferEverything
--           }
--       , Arg
--           { argCName = "height"
--           , argType = TBasicType TInt
--           , argCType = Just "int*"
--           , direction = DirectionOut
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "return location for height"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = 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.
-- 
-- A value of -1 stored in /@width@/ or /@height@/ indicates that that
-- dimension has not been set explicitly and the natural requisition
-- of the widget will be used instead.
-- 
-- See 'GI.Gtk.Objects.Widget.widgetSetSizeRequest'.
-- 
-- To get the size a widget will actually request, call
-- 'GI.Gtk.Objects.Widget.widgetMeasure' instead of this function.
widgetGetSizeRequest ::
    (B.CallStack.HasCallStack, MonadIO m, IsWidget a) =>
    a
    -- ^ /@widget@/: a 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 a. IO a -> m a
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
    widget' <- a -> IO (Ptr Widget)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
widget
    width <- allocMem :: IO (Ptr Int32)
    height <- allocMem :: IO (Ptr Int32)
    gtk_widget_get_size_request widget' width height
    width' <- peek width
    height' <- peek height
    touchManagedPtr widget
    freeMem width
    freeMem height
    return (width', 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-gtk4-4.0.12/docs/GI-Gtk-Objects-Widget.html#v:widgetGetSizeRequest"
        })


#endif

-- method Widget::get_state_flags
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "widget"
--           , argType = TInterface Name { namespace = "Gtk" , name = "Widget" }
--           , argCType = Just "GtkWidget*"
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a widget" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = 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 [flags/@gtk@/.StateFlags.insensitive]
-- 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
-- [flags/@gtk@/.StateFlags] to pass to a t'GI.Gtk.Objects.StyleContext.StyleContext'
-- method, you should look at 'GI.Gtk.Objects.StyleContext.styleContextGetState'.
widgetGetStateFlags ::
    (B.CallStack.HasCallStack, MonadIO m, IsWidget a) =>
    a
    -- ^ /@widget@/: a widget
    -> m [Gtk.Flags.StateFlags]
    -- ^ __Returns:__ the state flags of widget
widgetGetStateFlags :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsWidget a) =>
a -> m [StateFlags]
widgetGetStateFlags a
widget = IO [StateFlags] -> m [StateFlags]
forall a. IO a -> m a
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
    widget' <- a -> IO (Ptr Widget)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
widget
    result <- gtk_widget_get_state_flags widget'
    let result' = CUInt -> [StateFlags]
forall a b. (Storable a, Integral a, Bits a, IsGFlag b) => a -> [b]
wordToGFlags CUInt
result
    touchManagedPtr widget
    return 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-gtk4-4.0.12/docs/GI-Gtk-Objects-Widget.html#v:widgetGetStateFlags"
        })


#endif

-- method Widget::get_style_context
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "widget"
--           , argType = TInterface Name { namespace = "Gtk" , name = "Widget" }
--           , argCType = Just "GtkWidget*"
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a widget" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = 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)

{-# DEPRECATED widgetGetStyleContext ["(Since version 4.10)","Style contexts will be removed in GTK 5"] #-}
-- | Returns the style context associated to the 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 widget
    -> m Gtk.StyleContext.StyleContext
    -- ^ __Returns:__ the widgets style context
widgetGetStyleContext :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsWidget a) =>
a -> m StyleContext
widgetGetStyleContext a
widget = IO StyleContext -> m StyleContext
forall a. IO a -> m a
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
    widget' <- a -> IO (Ptr Widget)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
widget
    result <- gtk_widget_get_style_context widget'
    checkUnexpectedReturnNULL "widgetGetStyleContext" result
    result' <- (newObject Gtk.StyleContext.StyleContext) result
    touchManagedPtr widget
    return 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-gtk4-4.0.12/docs/GI-Gtk-Objects-Widget.html#v:widgetGetStyleContext"
        })


#endif

-- method Widget::get_template_child
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "widget"
--           , argType = TInterface Name { namespace = "Gtk" , name = "Widget" }
--           , argCType = Just "GtkWidget*"
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a widget" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "widget_type"
--           , argType = TBasicType TGType
--           , argCType = Just "GType"
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText =
--                     Just
--                       "The type of the widget class that defines the child in the template"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "name"
--           , argType = TBasicType TUTF8
--           , argCType = Just "const char*"
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "ID of the child defined in the template XML"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = 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)

-- | Fetches an object build from the template XML for /@widgetType@/ in
-- the widget.
-- 
-- 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 widget
    -> GType
    -- ^ /@widgetType@/: The type of the widget class that defines the child in the template
    -> T.Text
    -- ^ /@name@/: 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 a. IO a -> m a
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
    widget' <- a -> IO (Ptr Widget)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
widget
    let widgetType' = GType -> CGType
gtypeToCGType GType
widgetType
    name' <- textToCString name
    result <- gtk_widget_get_template_child widget' widgetType' name'
    checkUnexpectedReturnNULL "widgetGetTemplateChild" result
    result' <- (newObject GObject.Object.Object) result
    touchManagedPtr widget
    freeMem name'
    return 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-gtk4-4.0.12/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" }
--           , argCType = Just "GtkWidget*"
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a widget" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = 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 the widget.
-- 
-- If the tooltip has not been set using
-- 'GI.Gtk.Objects.Widget.widgetSetTooltipMarkup', this
-- function returns @NULL@.
widgetGetTooltipMarkup ::
    (B.CallStack.HasCallStack, MonadIO m, IsWidget a) =>
    a
    -- ^ /@widget@/: a widget
    -> m (Maybe T.Text)
    -- ^ __Returns:__ the tooltip text
widgetGetTooltipMarkup :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsWidget a) =>
a -> m (Maybe Text)
widgetGetTooltipMarkup a
widget = IO (Maybe Text) -> m (Maybe Text)
forall a. IO a -> m a
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
    widget' <- a -> IO (Ptr Widget)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
widget
    result <- gtk_widget_get_tooltip_markup widget'
    maybeResult <- convertIfNonNull result $ \CString
result' -> do
        result'' <- HasCallStack => CString -> IO Text
CString -> IO Text
cstringToText CString
result'
        return result''
    touchManagedPtr widget
    return 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-gtk4-4.0.12/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" }
--           , argCType = Just "GtkWidget*"
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a widget" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = 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 the widget.
-- 
-- If the /@widget@/\'s tooltip was set using
-- 'GI.Gtk.Objects.Widget.widgetSetTooltipMarkup',
-- this function will return the escaped text.
widgetGetTooltipText ::
    (B.CallStack.HasCallStack, MonadIO m, IsWidget a) =>
    a
    -- ^ /@widget@/: a widget
    -> m (Maybe T.Text)
    -- ^ __Returns:__ the tooltip text
widgetGetTooltipText :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsWidget a) =>
a -> m (Maybe Text)
widgetGetTooltipText a
widget = IO (Maybe Text) -> m (Maybe Text)
forall a. IO a -> m a
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
    widget' <- a -> IO (Ptr Widget)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
widget
    result <- gtk_widget_get_tooltip_text widget'
    maybeResult <- convertIfNonNull result $ \CString
result' -> do
        result'' <- HasCallStack => CString -> IO Text
CString -> IO Text
cstringToText CString
result'
        return result''
    touchManagedPtr widget
    return 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-gtk4-4.0.12/docs/GI-Gtk-Objects-Widget.html#v:widgetGetTooltipText"
        })


#endif

-- method Widget::get_valign
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "widget"
--           , argType = TInterface Name { namespace = "Gtk" , name = "Widget" }
--           , argCType = Just "GtkWidget*"
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a widget" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = 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 vertical alignment of the widget.
widgetGetValign ::
    (B.CallStack.HasCallStack, MonadIO m, IsWidget a) =>
    a
    -- ^ /@widget@/: a widget
    -> m Gtk.Enums.Align
    -- ^ __Returns:__ the vertical alignment of /@widget@/
widgetGetValign :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsWidget a) =>
a -> m Align
widgetGetValign a
widget = IO Align -> m Align
forall a. IO a -> m a
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
    widget' <- a -> IO (Ptr Widget)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
widget
    result <- gtk_widget_get_valign widget'
    let 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
    touchManagedPtr widget
    return 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-gtk4-4.0.12/docs/GI-Gtk-Objects-Widget.html#v:widgetGetValign"
        })


#endif

-- method Widget::get_vexpand
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "widget"
--           , argType = TInterface Name { namespace = "Gtk" , name = "Widget" }
--           , argCType = Just "GtkWidget*"
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a widget" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = 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@/: a 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 a. IO a -> m a
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
    widget' <- a -> IO (Ptr Widget)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
widget
    result <- gtk_widget_get_vexpand widget'
    let result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= CInt
0) CInt
result
    touchManagedPtr widget
    return 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-gtk4-4.0.12/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" }
--           , argCType = Just "GtkWidget*"
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a widget" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = 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 the @vexpand@ flag has been explicitly set.
-- 
-- See 'GI.Gtk.Objects.Widget.widgetGetHexpandSet' for more detail.
widgetGetVexpandSet ::
    (B.CallStack.HasCallStack, MonadIO m, IsWidget a) =>
    a
    -- ^ /@widget@/: a 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 a. IO a -> m a
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
    widget' <- a -> IO (Ptr Widget)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
widget
    result <- gtk_widget_get_vexpand_set widget'
    let result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= CInt
0) CInt
result
    touchManagedPtr widget
    return 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-gtk4-4.0.12/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" }
--           , argCType = Just "GtkWidget*"
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a widget" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TBasicType TBoolean)
-- throws : False
-- Skip return : False

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

-- | Determines whether the widget is visible.
-- 
-- If you want to take into account whether the widget’s
-- parent is also marked as visible, use
-- 'GI.Gtk.Objects.Widget.widgetIsVisible' instead.
-- 
-- This function does not check if the widget is
-- obscured in any way.
-- 
-- See 'GI.Gtk.Objects.Widget.widgetSetVisible'.
widgetGetVisible ::
    (B.CallStack.HasCallStack, MonadIO m, IsWidget a) =>
    a
    -- ^ /@widget@/: a widget
    -> m Bool
    -- ^ __Returns:__ 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 a. IO a -> m a
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
    widget' <- a -> IO (Ptr Widget)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
widget
    result <- gtk_widget_get_visible widget'
    let result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= CInt
0) CInt
result
    touchManagedPtr widget
    return 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-gtk4-4.0.12/docs/GI-Gtk-Objects-Widget.html#v:widgetGetVisible"
        })


#endif

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

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

-- | Returns the content width of the widget.
-- 
-- This function returns the width passed to its
-- size-allocate implementation, which is the width you
-- should be using in t'GI.Gtk.Objects.Widget.Widget'.@/snapshot/@().
-- 
-- For pointer events, see 'GI.Gtk.Objects.Widget.widgetContains'.
-- 
-- To learn more about widget sizes, see the coordinate
-- system <https://docs.gtk.org/gtk4/coordinates.html overview>.
widgetGetWidth ::
    (B.CallStack.HasCallStack, MonadIO m, IsWidget a) =>
    a
    -- ^ /@widget@/: a widget
    -> m Int32
    -- ^ __Returns:__ The width of /@widget@/
widgetGetWidth :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsWidget a) =>
a -> m Int32
widgetGetWidth a
widget = IO Int32 -> m Int32
forall a. IO a -> m a
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
    widget' <- a -> IO (Ptr Widget)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
widget
    result <- gtk_widget_get_width widget'
    touchManagedPtr widget
    return result

#if defined(ENABLE_OVERLOADING)
data WidgetGetWidthMethodInfo
instance (signature ~ (m Int32), MonadIO m, IsWidget a) => O.OverloadedMethod WidgetGetWidthMethodInfo a signature where
    overloadedMethod = widgetGetWidth

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


#endif

-- method Widget::grab_focus
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "widget"
--           , argType = TInterface Name { namespace = "Gtk" , name = "Widget" }
--           , argCType = Just "GtkWidget*"
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a widget" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TBasicType TBoolean)
-- 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 CInt

-- | Causes /@widget@/ to have the keyboard focus for the window
-- that it belongs to.
-- 
-- If /@widget@/ is not focusable, or its t'GI.Gtk.Objects.Widget.Widget'.@/grab_focus/@()
-- implementation cannot transfer the focus to a descendant of /@widget@/
-- that is focusable, it will not take focus and false will be returned.
-- 
-- Calling 'GI.Gtk.Objects.Widget.widgetGrabFocus' on an already focused widget
-- is allowed, should not have an effect, and return true.
widgetGrabFocus ::
    (B.CallStack.HasCallStack, MonadIO m, IsWidget a) =>
    a
    -- ^ /@widget@/: a widget
    -> m Bool
    -- ^ __Returns:__ true if focus is now inside /@widget@/
widgetGrabFocus :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsWidget a) =>
a -> m Bool
widgetGrabFocus a
widget = IO Bool -> m Bool
forall a. IO a -> m a
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
    widget' <- a -> IO (Ptr Widget)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
widget
    result <- gtk_widget_grab_focus widget'
    let result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= CInt
0) CInt
result
    touchManagedPtr widget
    return result'

#if defined(ENABLE_OVERLOADING)
data WidgetGrabFocusMethodInfo
instance (signature ~ (m Bool), 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-gtk4-4.0.12/docs/GI-Gtk-Objects-Widget.html#v:widgetGrabFocus"
        })


#endif

-- method Widget::has_css_class
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "widget"
--           , argType = TInterface Name { namespace = "Gtk" , name = "Widget" }
--           , argCType = Just "GtkWidget*"
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a widget" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "css_class"
--           , argType = TBasicType TUTF8
--           , argCType = Just "const char*"
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "style class, without the leading period"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TBasicType TBoolean)
-- throws : False
-- Skip return : False

foreign import ccall "gtk_widget_has_css_class" gtk_widget_has_css_class :: 
    Ptr Widget ->                           -- widget : TInterface (Name {namespace = "Gtk", name = "Widget"})
    CString ->                              -- css_class : TBasicType TUTF8
    IO CInt

-- | Returns whether a style class is currently applied to the widget.
widgetHasCssClass ::
    (B.CallStack.HasCallStack, MonadIO m, IsWidget a) =>
    a
    -- ^ /@widget@/: a widget
    -> T.Text
    -- ^ /@cssClass@/: style class, without the leading period
    -> m Bool
    -- ^ __Returns:__ true if /@cssClass@/ is currently applied to /@widget@/
widgetHasCssClass :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsWidget a) =>
a -> Text -> m Bool
widgetHasCssClass a
widget Text
cssClass = IO Bool -> m Bool
forall a. IO a -> m a
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
    widget' <- a -> IO (Ptr Widget)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
widget
    cssClass' <- textToCString cssClass
    result <- gtk_widget_has_css_class widget' cssClass'
    let result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= CInt
0) CInt
result
    touchManagedPtr widget
    freeMem cssClass'
    return result'

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

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


#endif

-- method Widget::has_default
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "widget"
--           , argType = TInterface Name { namespace = "Gtk" , name = "Widget" }
--           , argCType = Just "GtkWidget*"
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a widget" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = 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 the widget is the current default widget
-- within its toplevel.
widgetHasDefault ::
    (B.CallStack.HasCallStack, MonadIO m, IsWidget a) =>
    a
    -- ^ /@widget@/: a widget
    -> m Bool
    -- ^ __Returns:__ true if /@widget@/ is the current default widget
    --   within its toplevel
widgetHasDefault :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsWidget a) =>
a -> m Bool
widgetHasDefault a
widget = IO Bool -> m Bool
forall a. IO a -> m a
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
    widget' <- a -> IO (Ptr Widget)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
widget
    result <- gtk_widget_has_default widget'
    let result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= CInt
0) CInt
result
    touchManagedPtr widget
    return 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-gtk4-4.0.12/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" }
--           , argCType = Just "GtkWidget*"
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a widget" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TBasicType TBoolean)
-- throws : False
-- Skip return : False

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

-- | Determines if the widget has the global input focus.
-- 
-- See 'GI.Gtk.Objects.Widget.widgetIsFocus' for the difference between
-- having the global input focus, and only having the focus
-- within a toplevel.
widgetHasFocus ::
    (B.CallStack.HasCallStack, MonadIO m, IsWidget a) =>
    a
    -- ^ /@widget@/: a widget
    -> m Bool
    -- ^ __Returns:__ 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 a. IO a -> m a
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
    widget' <- a -> IO (Ptr Widget)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
widget
    result <- gtk_widget_has_focus widget'
    let result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= CInt
0) CInt
result
    touchManagedPtr widget
    return 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-gtk4-4.0.12/docs/GI-Gtk-Objects-Widget.html#v:widgetHasFocus"
        })


#endif

-- method Widget::has_visible_focus
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "widget"
--           , argType = TInterface Name { namespace = "Gtk" , name = "Widget" }
--           , argCType = Just "GtkWidget*"
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a widget" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = 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 that takes into account whether
-- focus indication should currently be shown in the toplevel window
-- of /@widget@/. See 'GI.Gtk.Objects.Window.windowGetFocusVisible' for more
-- information about focus indication.
-- 
-- To find out if the widget has the global input focus, use
-- 'GI.Gtk.Objects.Widget.widgetHasFocus'.
widgetHasVisibleFocus ::
    (B.CallStack.HasCallStack, MonadIO m, IsWidget a) =>
    a
    -- ^ /@widget@/: a widget
    -> m Bool
    -- ^ __Returns:__ 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 a. IO a -> m a
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
    widget' <- a -> IO (Ptr Widget)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
widget
    result <- gtk_widget_has_visible_focus widget'
    let result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= CInt
0) CInt
result
    touchManagedPtr widget
    return 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-gtk4-4.0.12/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" }
--           , argCType = Just "GtkWidget*"
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a widget" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = 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 ()

{-# DEPRECATED widgetHide ["(Since version 4.10)","Use 'GI.Gtk.Objects.Widget.widgetSetVisible' instead"] #-}
-- | Reverses the effects of [method.Gtk.Widget.show].
-- 
-- This is causing the widget to be hidden (invisible to the user).
widgetHide ::
    (B.CallStack.HasCallStack, MonadIO m, IsWidget a) =>
    a
    -- ^ /@widget@/: a widget
    -> m ()
widgetHide :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsWidget a) =>
a -> m ()
widgetHide a
widget = IO () -> m ()
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    widget' <- a -> IO (Ptr Widget)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
widget
    gtk_widget_hide widget'
    touchManagedPtr widget
    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-gtk4-4.0.12/docs/GI-Gtk-Objects-Widget.html#v:widgetHide"
        })


#endif

-- method Widget::in_destruction
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "widget"
--           , argType = TInterface Name { namespace = "Gtk" , name = "Widget" }
--           , argCType = Just "GtkWidget*"
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a widget" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = 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 widget
    -> m Bool
    -- ^ __Returns:__ 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 a. IO a -> m a
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
    widget' <- a -> IO (Ptr Widget)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
widget
    result <- gtk_widget_in_destruction widget'
    let result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= CInt
0) CInt
result
    touchManagedPtr widget
    return 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-gtk4-4.0.12/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" }
--           , argCType = Just "GtkWidget*"
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a widget" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = 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 widget subclass and not in @GObject.constructed()@ or
-- @GObject.constructor()@ for two reasons:
-- 
-- * derived widgets will assume that the composite widgets
--   defined by its parent classes have been created in their
--   relative instance initializers
-- * 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
-- 
-- 
-- A good rule of thumb is to call this function as the first thing in
-- an instance initialization function.
widgetInitTemplate ::
    (B.CallStack.HasCallStack, MonadIO m, IsWidget a) =>
    a
    -- ^ /@widget@/: a widget
    -> m ()
widgetInitTemplate :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsWidget a) =>
a -> m ()
widgetInitTemplate a
widget = IO () -> m ()
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    widget' <- a -> IO (Ptr Widget)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
widget
    gtk_widget_init_template widget'
    touchManagedPtr widget
    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-gtk4-4.0.12/docs/GI-Gtk-Objects-Widget.html#v:widgetInitTemplate"
        })


#endif

-- method Widget::insert_action_group
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "widget"
--           , argType = TInterface Name { namespace = "Gtk" , name = "Widget" }
--           , argCType = Just "GtkWidget*"
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a widget" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "name"
--           , argType = TBasicType TUTF8
--           , argCType = Just "const char*"
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "the prefix for actions in @group"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "group"
--           , argType =
--               TInterface Name { namespace = "Gio" , name = "ActionGroup" }
--           , argCType = Just "GActionGroup*"
--           , direction = DirectionIn
--           , mayBeNull = True
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "an action group" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = 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 an action group into the widget\'s actions.
-- 
-- 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@.
-- 
-- Note that inheritance is defined for individual actions. I.e.
-- even if you insert a group with prefix /@prefix@/, actions with
-- the same prefix will still be inherited from the parent, unless
-- the group contains an action with the same name.
-- 
-- If /@group@/ is @NULL@, a previously inserted group for /@name@/ is
-- removed from /@widget@/.
widgetInsertActionGroup ::
    (B.CallStack.HasCallStack, MonadIO m, IsWidget a, Gio.ActionGroup.IsActionGroup b) =>
    a
    -- ^ /@widget@/: a widget
    -> T.Text
    -- ^ /@name@/: the prefix for actions in /@group@/
    -> Maybe (b)
    -- ^ /@group@/: an action group
    -> 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 a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    widget' <- a -> IO (Ptr Widget)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
widget
    name' <- textToCString name
    maybeGroup <- case group of
        Maybe b
Nothing -> Ptr ActionGroup -> IO (Ptr ActionGroup)
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr ActionGroup
forall a. Ptr a
FP.nullPtr
        Just b
jGroup -> do
            jGroup' <- b -> IO (Ptr ActionGroup)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
jGroup
            return jGroup'
    gtk_widget_insert_action_group widget' name' maybeGroup
    touchManagedPtr widget
    whenJust group touchManagedPtr
    freeMem name'
    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-gtk4-4.0.12/docs/GI-Gtk-Objects-Widget.html#v:widgetInsertActionGroup"
        })


#endif

-- method Widget::insert_after
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "widget"
--           , argType = TInterface Name { namespace = "Gtk" , name = "Widget" }
--           , argCType = Just "GtkWidget*"
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a widget" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "parent"
--           , argType = TInterface Name { namespace = "Gtk" , name = "Widget" }
--           , argCType = Just "GtkWidget*"
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "the parent widget to insert @widget into"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "previous_sibling"
--           , argType = TInterface Name { namespace = "Gtk" , name = "Widget" }
--           , argCType = Just "GtkWidget*"
--           , direction = DirectionIn
--           , mayBeNull = True
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "the new previous sibling of @widget"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

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

-- | Sets the parent widget of the widget.
-- 
-- In contrast to 'GI.Gtk.Objects.Widget.widgetSetParent', this function
-- inserts /@widget@/ at a specific position into the list of children
-- of the /@parent@/ widget.
-- 
-- It will be placed after /@previousSibling@/, or at the beginning if
-- /@previousSibling@/ is @NULL@.
-- 
-- After calling this function, @gtk_widget_get_prev_sibling (widget)@
-- will return /@previousSibling@/.
-- 
-- If /@parent@/ is already set as the parent widget of /@widget@/, this
-- function can also be used to reorder /@widget@/ in the child widget
-- list of /@parent@/.
-- 
-- This function is primarily meant for widget implementations; if you are
-- just using a widget, you *must* use its own API for adding children.
widgetInsertAfter ::
    (B.CallStack.HasCallStack, MonadIO m, IsWidget a, IsWidget b, IsWidget c) =>
    a
    -- ^ /@widget@/: a widget
    -> b
    -- ^ /@parent@/: the parent widget to insert /@widget@/ into
    -> Maybe (c)
    -- ^ /@previousSibling@/: the new previous sibling of /@widget@/
    -> m ()
widgetInsertAfter :: forall (m :: * -> *) a b c.
(HasCallStack, MonadIO m, IsWidget a, IsWidget b, IsWidget c) =>
a -> b -> Maybe c -> m ()
widgetInsertAfter a
widget b
parent Maybe c
previousSibling = IO () -> m ()
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    widget' <- a -> IO (Ptr Widget)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
widget
    parent' <- unsafeManagedPtrCastPtr parent
    maybePreviousSibling <- case previousSibling of
        Maybe c
Nothing -> Ptr Widget -> IO (Ptr Widget)
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr Widget
forall a. Ptr a
FP.nullPtr
        Just c
jPreviousSibling -> do
            jPreviousSibling' <- c -> IO (Ptr Widget)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr c
jPreviousSibling
            return jPreviousSibling'
    gtk_widget_insert_after widget' parent' maybePreviousSibling
    touchManagedPtr widget
    touchManagedPtr parent
    whenJust previousSibling touchManagedPtr
    return ()

#if defined(ENABLE_OVERLOADING)
data WidgetInsertAfterMethodInfo
instance (signature ~ (b -> Maybe (c) -> m ()), MonadIO m, IsWidget a, IsWidget b, IsWidget c) => O.OverloadedMethod WidgetInsertAfterMethodInfo a signature where
    overloadedMethod = widgetInsertAfter

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


#endif

-- method Widget::insert_before
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "widget"
--           , argType = TInterface Name { namespace = "Gtk" , name = "Widget" }
--           , argCType = Just "GtkWidget*"
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a widget" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "parent"
--           , argType = TInterface Name { namespace = "Gtk" , name = "Widget" }
--           , argCType = Just "GtkWidget*"
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "the parent widget to insert @widget into"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "next_sibling"
--           , argType = TInterface Name { namespace = "Gtk" , name = "Widget" }
--           , argCType = Just "GtkWidget*"
--           , direction = DirectionIn
--           , mayBeNull = True
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "the new next sibling of @widget"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

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

-- | Sets the parent widget of the widget.
-- 
-- In contrast to 'GI.Gtk.Objects.Widget.widgetSetParent', this function
-- inserts /@widget@/ at a specific position into the list of children
-- of the /@parent@/ widget.
-- 
-- It will be placed before /@nextSibling@/, or at the end if
-- /@nextSibling@/ is @NULL@.
-- 
-- After calling this function, @gtk_widget_get_next_sibling (widget)@
-- will return /@nextSibling@/.
-- 
-- If /@parent@/ is already set as the parent widget of /@widget@/, this function
-- can also be used to reorder /@widget@/ in the child widget list of /@parent@/.
-- 
-- This function is primarily meant for widget implementations; if you are
-- just using a widget, you *must* use its own API for adding children.
widgetInsertBefore ::
    (B.CallStack.HasCallStack, MonadIO m, IsWidget a, IsWidget b, IsWidget c) =>
    a
    -- ^ /@widget@/: a widget
    -> b
    -- ^ /@parent@/: the parent widget to insert /@widget@/ into
    -> Maybe (c)
    -- ^ /@nextSibling@/: the new next sibling of /@widget@/
    -> m ()
widgetInsertBefore :: forall (m :: * -> *) a b c.
(HasCallStack, MonadIO m, IsWidget a, IsWidget b, IsWidget c) =>
a -> b -> Maybe c -> m ()
widgetInsertBefore a
widget b
parent Maybe c
nextSibling = IO () -> m ()
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    widget' <- a -> IO (Ptr Widget)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
widget
    parent' <- unsafeManagedPtrCastPtr parent
    maybeNextSibling <- case nextSibling of
        Maybe c
Nothing -> Ptr Widget -> IO (Ptr Widget)
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr Widget
forall a. Ptr a
FP.nullPtr
        Just c
jNextSibling -> do
            jNextSibling' <- c -> IO (Ptr Widget)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr c
jNextSibling
            return jNextSibling'
    gtk_widget_insert_before widget' parent' maybeNextSibling
    touchManagedPtr widget
    touchManagedPtr parent
    whenJust nextSibling touchManagedPtr
    return ()

#if defined(ENABLE_OVERLOADING)
data WidgetInsertBeforeMethodInfo
instance (signature ~ (b -> Maybe (c) -> m ()), MonadIO m, IsWidget a, IsWidget b, IsWidget c) => O.OverloadedMethod WidgetInsertBeforeMethodInfo a signature where
    overloadedMethod = widgetInsertBefore

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


#endif

-- method Widget::is_ancestor
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "widget"
--           , argType = TInterface Name { namespace = "Gtk" , name = "Widget" }
--           , argCType = Just "GtkWidget*"
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a widget" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "ancestor"
--           , argType = TInterface Name { namespace = "Gtk" , name = "Widget" }
--           , argCType = Just "GtkWidget*"
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "another `GtkWidget`"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = 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 the widget is a descendent of /@ancestor@/.
widgetIsAncestor ::
    (B.CallStack.HasCallStack, MonadIO m, IsWidget a, IsWidget b) =>
    a
    -- ^ /@widget@/: a widget
    -> b
    -- ^ /@ancestor@/: another @GtkWidget@
    -> m Bool
    -- ^ __Returns:__ 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 a. IO a -> m a
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
    widget' <- a -> IO (Ptr Widget)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
widget
    ancestor' <- unsafeManagedPtrCastPtr ancestor
    result <- gtk_widget_is_ancestor widget' ancestor'
    let result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= CInt
0) CInt
result
    touchManagedPtr widget
    touchManagedPtr ancestor
    return 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-gtk4-4.0.12/docs/GI-Gtk-Objects-Widget.html#v:widgetIsAncestor"
        })


#endif

-- method Widget::is_drawable
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "widget"
--           , argType = TInterface Name { namespace = "Gtk" , name = "Widget" }
--           , argCType = Just "GtkWidget*"
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a widget" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = 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 the widget can be drawn to.
-- 
-- A widget can be drawn if it is mapped and visible.
widgetIsDrawable ::
    (B.CallStack.HasCallStack, MonadIO m, IsWidget a) =>
    a
    -- ^ /@widget@/: a widget
    -> m Bool
    -- ^ __Returns:__ true if /@widget@/ is drawable
widgetIsDrawable :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsWidget a) =>
a -> m Bool
widgetIsDrawable a
widget = IO Bool -> m Bool
forall a. IO a -> m a
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
    widget' <- a -> IO (Ptr Widget)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
widget
    result <- gtk_widget_is_drawable widget'
    let result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= CInt
0) CInt
result
    touchManagedPtr widget
    return 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-gtk4-4.0.12/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" }
--           , argCType = Just "GtkWidget*"
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a widget" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = 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 [Widget:hasFocus]("GI.Gtk.Objects.Widget#g:attr:hasFocus")
-- property is necessarily set; [Widget:hasFocus]("GI.Gtk.Objects.Widget#g:attr:hasFocus")
-- 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 widget
    -> m Bool
    -- ^ __Returns:__ 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 a. IO a -> m a
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
    widget' <- a -> IO (Ptr Widget)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
widget
    result <- gtk_widget_is_focus widget'
    let result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= CInt
0) CInt
result
    touchManagedPtr widget
    return 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-gtk4-4.0.12/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" }
--           , argCType = Just "GtkWidget*"
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a widget" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = 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.
-- 
-- This means it is sensitive itself and also its
-- parent widget is sensitive.
widgetIsSensitive ::
    (B.CallStack.HasCallStack, MonadIO m, IsWidget a) =>
    a
    -- ^ /@widget@/: a widget
    -> m Bool
    -- ^ __Returns:__ 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 a. IO a -> m a
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
    widget' <- a -> IO (Ptr Widget)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
widget
    result <- gtk_widget_is_sensitive widget'
    let result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= CInt
0) CInt
result
    touchManagedPtr widget
    return 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-gtk4-4.0.12/docs/GI-Gtk-Objects-Widget.html#v:widgetIsSensitive"
        })


#endif

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

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

-- | Determines whether the widget and all its parents are marked as
-- visible.
-- 
-- This function does not check if the widget is obscured in any way.
-- 
-- See also 'GI.Gtk.Objects.Widget.widgetGetVisible' and
-- 'GI.Gtk.Objects.Widget.widgetSetVisible'.
widgetIsVisible ::
    (B.CallStack.HasCallStack, MonadIO m, IsWidget a) =>
    a
    -- ^ /@widget@/: a widget
    -> m Bool
    -- ^ __Returns:__ 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 a. IO a -> m a
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
    widget' <- a -> IO (Ptr Widget)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
widget
    result <- gtk_widget_is_visible widget'
    let result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= CInt
0) CInt
result
    touchManagedPtr widget
    return 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-gtk4-4.0.12/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" }
--           , argCType = Just "GtkWidget*"
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a widget" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "direction"
--           , argType =
--               TInterface Name { namespace = "Gtk" , name = "DirectionType" }
--           , argCType = Just "GtkDirectionType"
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "direction of focus movement"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = 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

-- | Emits the [Widget::keynavFailed]("GI.Gtk.Objects.Widget#g:signal:keynavFailed") signal on the widget.
-- 
-- This function should be called whenever keyboard navigation
-- within a single widget hits a boundary.
-- 
-- The return value of this function should be interpreted
-- in a way similar to the return value of
-- 'GI.Gtk.Objects.Widget.widgetChildFocus'. When 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 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 [Widget::keynavFailed]("GI.Gtk.Objects.Widget#g:signal:keynavFailed") handler returns
-- false for [enum/@gtk@/.DirectionType.tab-forward] and
-- [enum/@gtk@/.DirectionType.tab-backward]. For the other values
-- of t'GI.Gtk.Enums.DirectionType' it returns true.
-- 
-- Whenever the default handler returns 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 @::keynav-failed@
-- (either by connecting to it or by overriding it) would be a row of
-- t'GI.Gtk.Objects.Entry.Entry' widgets where the user should be able to navigate
-- the entire row with the cursor keys, as e.g. known from user
-- interfaces that require entering license keys.
widgetKeynavFailed ::
    (B.CallStack.HasCallStack, MonadIO m, IsWidget a) =>
    a
    -- ^ /@widget@/: a widget
    -> Gtk.Enums.DirectionType
    -- ^ /@direction@/: direction of focus movement
    -> m Bool
    -- ^ __Returns:__ true if stopping keyboard navigation is fine, false
    --   if the emitting widget should try to handle the keyboard
    --   navigation attempt in its parent widget
widgetKeynavFailed :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsWidget a) =>
a -> DirectionType -> m Bool
widgetKeynavFailed a
widget DirectionType
direction = IO Bool -> m Bool
forall a. IO a -> m a
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
    widget' <- a -> IO (Ptr Widget)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
widget
    let 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
    result <- gtk_widget_keynav_failed widget' direction'
    let result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= CInt
0) CInt
result
    touchManagedPtr widget
    return 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-gtk4-4.0.12/docs/GI-Gtk-Objects-Widget.html#v:widgetKeynavFailed"
        })


#endif

-- method Widget::list_mnemonic_labels
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "widget"
--           , argType = TInterface Name { namespace = "Gtk" , name = "Widget" }
--           , argCType = Just "GtkWidget*"
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a widget" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = 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 the widgets for which this widget is the target of a
-- mnemonic.
-- 
-- Typically, these widgets will be labels. See, for example,
-- 'GI.Gtk.Objects.Label.labelSetMnemonicWidget'.
-- 
-- The widgets in the list are not individually referenced.
-- If you want to iterate through the list and perform actions
-- involving callbacks that might destroy the widgets, you
-- must call @g_list_foreach (result, (GFunc)g_object_ref, NULL)@
-- first, and then unref all the widgets afterwards.
widgetListMnemonicLabels ::
    (B.CallStack.HasCallStack, MonadIO m, IsWidget a) =>
    a
    -- ^ /@widget@/: a widget
    -> m [Widget]
    -- ^ __Returns:__ the list
    --   of mnemonic labels
widgetListMnemonicLabels :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsWidget a) =>
a -> m [Widget]
widgetListMnemonicLabels a
widget = IO [Widget] -> m [Widget]
forall a. IO a -> m a
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
    widget' <- a -> IO (Ptr Widget)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
widget
    result <- gtk_widget_list_mnemonic_labels widget'
    result' <- unpackGList result
    result'' <- mapM (newObject Widget) result'
    g_list_free result
    touchManagedPtr widget
    return 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-gtk4-4.0.12/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" }
--           , argCType = Just "GtkWidget*"
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a widget" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = 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 ()

-- | Causes a widget to be mapped if it isn’t already.
-- 
-- This function is only for use in widget implementations.
widgetMap ::
    (B.CallStack.HasCallStack, MonadIO m, IsWidget a) =>
    a
    -- ^ /@widget@/: a widget
    -> m ()
widgetMap :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsWidget a) =>
a -> m ()
widgetMap a
widget = IO () -> m ()
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    widget' <- a -> IO (Ptr Widget)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
widget
    gtk_widget_map widget'
    touchManagedPtr widget
    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-gtk4-4.0.12/docs/GI-Gtk-Objects-Widget.html#v:widgetMap"
        })


#endif

-- method Widget::measure
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "widget"
--           , argType = TInterface Name { namespace = "Gtk" , name = "Widget" }
--           , argCType = Just "GtkWidget*"
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "A `GtkWidget` instance"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "orientation"
--           , argType =
--               TInterface Name { namespace = "Gtk" , name = "Orientation" }
--           , argCType = Just "GtkOrientation"
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "the orientation to measure"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "for_size"
--           , argType = TBasicType TInt
--           , argCType = Just "int"
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText =
--                     Just
--                       "Size for the opposite of @orientation, i.e.\n  if @orientation is %GTK_ORIENTATION_HORIZONTAL, this is\n  the height the widget should be measured with. The %GTK_ORIENTATION_VERTICAL\n  case is analogous. This way, both height-for-width and width-for-height\n  requests can be implemented. If no size is known, -1 can be passed."
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "minimum"
--           , argType = TBasicType TInt
--           , argCType = Just "int*"
--           , direction = DirectionOut
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "location to store the minimum size"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = False
--           , transfer = TransferEverything
--           }
--       , Arg
--           { argCName = "natural"
--           , argType = TBasicType TInt
--           , argCType = Just "int*"
--           , direction = DirectionOut
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "location to store the natural size"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = False
--           , transfer = TransferEverything
--           }
--       , Arg
--           { argCName = "minimum_baseline"
--           , argType = TBasicType TInt
--           , argCType = Just "int*"
--           , direction = DirectionOut
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText =
--                     Just
--                       "location to store the baseline\n  position for the minimum size, or -1 to report no baseline"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = False
--           , transfer = TransferEverything
--           }
--       , Arg
--           { argCName = "natural_baseline"
--           , argType = TBasicType TInt
--           , argCType = Just "int*"
--           , direction = DirectionOut
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText =
--                     Just
--                       "location to store the baseline\n  position for the natural size, or -1 to report no baseline"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = False
--           , transfer = TransferEverything
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "gtk_widget_measure" gtk_widget_measure :: 
    Ptr Widget ->                           -- widget : TInterface (Name {namespace = "Gtk", name = "Widget"})
    CUInt ->                                -- orientation : TInterface (Name {namespace = "Gtk", name = "Orientation"})
    Int32 ->                                -- for_size : TBasicType TInt
    Ptr Int32 ->                            -- minimum : TBasicType TInt
    Ptr Int32 ->                            -- natural : TBasicType TInt
    Ptr Int32 ->                            -- minimum_baseline : TBasicType TInt
    Ptr Int32 ->                            -- natural_baseline : TBasicType TInt
    IO ()

-- | Measures /@widget@/ in the orientation /@orientation@/ and for the given /@forSize@/.
-- 
-- As an example, if /@orientation@/ is 'GI.Gtk.Enums.OrientationHorizontal' and /@forSize@/
-- is 300, this functions will compute the minimum and natural width of /@widget@/
-- if it is allocated at a height of 300 pixels.
-- 
-- See <https://docs.gtk.org/gtk4/class.Widget.html#height-for-width-geometry-management GtkWidget’s geometry management section> for
-- a more details on implementing @GtkWidgetClass.measure()@.
widgetMeasure ::
    (B.CallStack.HasCallStack, MonadIO m, IsWidget a) =>
    a
    -- ^ /@widget@/: A @GtkWidget@ instance
    -> Gtk.Enums.Orientation
    -- ^ /@orientation@/: the orientation to measure
    -> Int32
    -- ^ /@forSize@/: Size for the opposite of /@orientation@/, i.e.
    --   if /@orientation@/ is 'GI.Gtk.Enums.OrientationHorizontal', this is
    --   the height the widget should be measured with. The 'GI.Gtk.Enums.OrientationVertical'
    --   case is analogous. This way, both height-for-width and width-for-height
    --   requests can be implemented. If no size is known, -1 can be passed.
    -> m ((Int32, Int32, Int32, Int32))
widgetMeasure :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsWidget a) =>
a -> Orientation -> Int32 -> m (Int32, Int32, Int32, Int32)
widgetMeasure a
widget Orientation
orientation Int32
forSize = IO (Int32, Int32, Int32, Int32) -> m (Int32, Int32, Int32, Int32)
forall a. IO a -> m a
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
    widget' <- a -> IO (Ptr Widget)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
widget
    let 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
    minimum <- allocMem :: IO (Ptr Int32)
    natural <- allocMem :: IO (Ptr Int32)
    minimumBaseline <- allocMem :: IO (Ptr Int32)
    naturalBaseline <- allocMem :: IO (Ptr Int32)
    gtk_widget_measure widget' orientation' forSize minimum natural minimumBaseline naturalBaseline
    minimum' <- peek minimum
    natural' <- peek natural
    minimumBaseline' <- peek minimumBaseline
    naturalBaseline' <- peek naturalBaseline
    touchManagedPtr widget
    freeMem minimum
    freeMem natural
    freeMem minimumBaseline
    freeMem naturalBaseline
    return (minimum', natural', minimumBaseline', naturalBaseline')

#if defined(ENABLE_OVERLOADING)
data WidgetMeasureMethodInfo
instance (signature ~ (Gtk.Enums.Orientation -> Int32 -> m ((Int32, Int32, Int32, Int32))), MonadIO m, IsWidget a) => O.OverloadedMethod WidgetMeasureMethodInfo a signature where
    overloadedMethod = widgetMeasure

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


#endif

-- method Widget::mnemonic_activate
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "widget"
--           , argType = TInterface Name { namespace = "Gtk" , name = "Widget" }
--           , argCType = Just "GtkWidget*"
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a widget" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "group_cycling"
--           , argType = TBasicType TBoolean
--           , argCType = Just "gboolean"
--           , 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
--           , argCallbackUserData = 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 [Widget::mnemonicActivate]("GI.Gtk.Objects.Widget#g:signal:mnemonicActivate") signal.
widgetMnemonicActivate ::
    (B.CallStack.HasCallStack, MonadIO m, IsWidget a) =>
    a
    -- ^ /@widget@/: a widget
    -> Bool
    -- ^ /@groupCycling@/: true if there are other widgets with the same mnemonic
    -> m Bool
    -- ^ __Returns:__ 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 a. IO a -> m a
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
    widget' <- a -> IO (Ptr Widget)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
widget
    let groupCycling' = (Int -> CInt
forall a b. (Integral a, Num b) => a -> b
P.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
P.fromEnum) Bool
groupCycling
    result <- gtk_widget_mnemonic_activate widget' groupCycling'
    let result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= CInt
0) CInt
result
    touchManagedPtr widget
    return 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-gtk4-4.0.12/docs/GI-Gtk-Objects-Widget.html#v:widgetMnemonicActivate"
        })


#endif

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

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

-- | Returns a list model to track the children of the widget.
-- 
-- Calling this function will enable extra internal bookkeeping
-- to track children and emit signals on the returned listmodel.
-- It may slow down operations a lot.
-- 
-- Applications should try hard to avoid calling this function
-- because of the slowdowns.
widgetObserveChildren ::
    (B.CallStack.HasCallStack, MonadIO m, IsWidget a) =>
    a
    -- ^ /@widget@/: a widget
    -> m Gio.ListModel.ListModel
    -- ^ __Returns:__ 
    --   a list model tracking /@widget@/\'s children
widgetObserveChildren :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsWidget a) =>
a -> m ListModel
widgetObserveChildren a
widget = IO ListModel -> m ListModel
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO ListModel -> m ListModel) -> IO ListModel -> m ListModel
forall a b. (a -> b) -> a -> b
$ do
    widget' <- a -> IO (Ptr Widget)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
widget
    result <- gtk_widget_observe_children widget'
    checkUnexpectedReturnNULL "widgetObserveChildren" result
    result' <- (wrapObject Gio.ListModel.ListModel) result
    touchManagedPtr widget
    return result'

#if defined(ENABLE_OVERLOADING)
data WidgetObserveChildrenMethodInfo
instance (signature ~ (m Gio.ListModel.ListModel), MonadIO m, IsWidget a) => O.OverloadedMethod WidgetObserveChildrenMethodInfo a signature where
    overloadedMethod = widgetObserveChildren

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


#endif

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

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

-- | Returns a list model to track the event controllers of the widget.
-- 
-- Calling this function will enable extra internal bookkeeping
-- to track controllers and emit signals on the returned listmodel.
-- It may slow down operations a lot.
-- 
-- Applications should try hard to avoid calling this function
-- because of the slowdowns.
widgetObserveControllers ::
    (B.CallStack.HasCallStack, MonadIO m, IsWidget a) =>
    a
    -- ^ /@widget@/: a widget
    -> m Gio.ListModel.ListModel
    -- ^ __Returns:__ 
    --   a list model tracking /@widget@/\'s controllers
widgetObserveControllers :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsWidget a) =>
a -> m ListModel
widgetObserveControllers a
widget = IO ListModel -> m ListModel
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO ListModel -> m ListModel) -> IO ListModel -> m ListModel
forall a b. (a -> b) -> a -> b
$ do
    widget' <- a -> IO (Ptr Widget)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
widget
    result <- gtk_widget_observe_controllers widget'
    checkUnexpectedReturnNULL "widgetObserveControllers" result
    result' <- (wrapObject Gio.ListModel.ListModel) result
    touchManagedPtr widget
    return result'

#if defined(ENABLE_OVERLOADING)
data WidgetObserveControllersMethodInfo
instance (signature ~ (m Gio.ListModel.ListModel), MonadIO m, IsWidget a) => O.OverloadedMethod WidgetObserveControllersMethodInfo a signature where
    overloadedMethod = widgetObserveControllers

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


#endif

-- method Widget::pick
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "widget"
--           , argType = TInterface Name { namespace = "Gtk" , name = "Widget" }
--           , argCType = Just "GtkWidget*"
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "the widget to query"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "x"
--           , argType = TBasicType TDouble
--           , argCType = Just "double"
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText =
--                     Just "x coordinate to test, relative to @widget's origin"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "y"
--           , argType = TBasicType TDouble
--           , argCType = Just "double"
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText =
--                     Just "y coordinate to test, relative to @widget's origin"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "flags"
--           , argType =
--               TInterface Name { namespace = "Gtk" , name = "PickFlags" }
--           , argCType = Just "GtkPickFlags"
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "flags to influence what is picked"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TInterface Name { namespace = "Gtk" , name = "Widget" })
-- throws : False
-- Skip return : False

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

-- | Finds the descendant of the widget closest to a point.
-- 
-- The point (x, y) must be given in widget coordinates, so (0, 0)
-- is assumed to be the top left of /@widget@/\'s content area.
-- 
-- Usually widgets will return @NULL@ if the given coordinate is not
-- contained in /@widget@/ checked via 'GI.Gtk.Objects.Widget.widgetContains'.
-- Otherwise they will recursively try to find a child that does
-- not return @NULL@. Widgets are however free to customize their
-- picking algorithm.
-- 
-- This function is used on the toplevel to determine the widget
-- below the mouse cursor for purposes of hover highlighting and
-- delivering events.
widgetPick ::
    (B.CallStack.HasCallStack, MonadIO m, IsWidget a) =>
    a
    -- ^ /@widget@/: the widget to query
    -> Double
    -- ^ /@x@/: x coordinate to test, relative to /@widget@/\'s origin
    -> Double
    -- ^ /@y@/: y coordinate to test, relative to /@widget@/\'s origin
    -> [Gtk.Flags.PickFlags]
    -- ^ /@flags@/: flags to influence what is picked
    -> m (Maybe Widget)
    -- ^ __Returns:__ the widget\'s descendant at (x, y)
widgetPick :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsWidget a) =>
a -> Double -> Double -> [PickFlags] -> m (Maybe Widget)
widgetPick a
widget Double
x Double
y [PickFlags]
flags = IO (Maybe Widget) -> m (Maybe Widget)
forall a. IO a -> m a
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
    widget' <- a -> IO (Ptr Widget)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
widget
    let x' = Double -> CDouble
forall a b. (Real a, Fractional b) => a -> b
realToFrac Double
x
    let y' = Double -> CDouble
forall a b. (Real a, Fractional b) => a -> b
realToFrac Double
y
    let flags' = [PickFlags] -> CUInt
forall b a. (Num b, IsGFlag a) => [a] -> b
gflagsToWord [PickFlags]
flags
    result <- gtk_widget_pick widget' x' y' flags'
    maybeResult <- convertIfNonNull result $ \Ptr Widget
result' -> do
        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'
        return result''
    touchManagedPtr widget
    return maybeResult

#if defined(ENABLE_OVERLOADING)
data WidgetPickMethodInfo
instance (signature ~ (Double -> Double -> [Gtk.Flags.PickFlags] -> m (Maybe Widget)), MonadIO m, IsWidget a) => O.OverloadedMethod WidgetPickMethodInfo a signature where
    overloadedMethod = widgetPick

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


#endif

-- method Widget::queue_allocate
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "widget"
--           , argType = TInterface Name { namespace = "Gtk" , name = "Widget" }
--           , argCType = Just "GtkWidget*"
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a widget" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = 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 ()

-- | Flags the widget for a rerun of the t'GI.Gtk.Objects.Widget.Widget'.@/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'.
-- 
-- This function is only for use in widget implementations.
widgetQueueAllocate ::
    (B.CallStack.HasCallStack, MonadIO m, IsWidget a) =>
    a
    -- ^ /@widget@/: a widget
    -> m ()
widgetQueueAllocate :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsWidget a) =>
a -> m ()
widgetQueueAllocate a
widget = IO () -> m ()
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    widget' <- a -> IO (Ptr Widget)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
widget
    gtk_widget_queue_allocate widget'
    touchManagedPtr widget
    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-gtk4-4.0.12/docs/GI-Gtk-Objects-Widget.html#v:widgetQueueAllocate"
        })


#endif

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

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

-- | Schedules this widget to be redrawn.
-- 
-- The redraw will happen in the paint phase
-- of the current or the next frame.
-- 
-- This means /@widget@/\'s t'GI.Gtk.Objects.Widget.Widget'.@/snapshot/@()
-- implementation will be called.
widgetQueueDraw ::
    (B.CallStack.HasCallStack, MonadIO m, IsWidget a) =>
    a
    -- ^ /@widget@/: a widget
    -> m ()
widgetQueueDraw :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsWidget a) =>
a -> m ()
widgetQueueDraw a
widget = IO () -> m ()
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    widget' <- a -> IO (Ptr Widget)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
widget
    gtk_widget_queue_draw widget'
    touchManagedPtr widget
    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-gtk4-4.0.12/docs/GI-Gtk-Objects-Widget.html#v:widgetQueueDraw"
        })


#endif

-- method Widget::queue_resize
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "widget"
--           , argType = TInterface Name { namespace = "Gtk" , name = "Widget" }
--           , argCType = Just "GtkWidget*"
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a widget" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = 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 ()

-- | Flags a widget to have its size renegotiated.
-- 
-- This 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', the 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 t'GI.Gtk.Objects.Widget.Widget'.@/size_allocate/@()
-- virtual method. Calls to 'GI.Gtk.Objects.Widget.widgetQueueResize' from inside
-- t'GI.Gtk.Objects.Widget.Widget'.@/size_allocate/@() will be silently ignored.
-- 
-- This function is only for use in widget implementations.
widgetQueueResize ::
    (B.CallStack.HasCallStack, MonadIO m, IsWidget a) =>
    a
    -- ^ /@widget@/: a widget
    -> m ()
widgetQueueResize :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsWidget a) =>
a -> m ()
widgetQueueResize a
widget = IO () -> m ()
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    widget' <- a -> IO (Ptr Widget)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
widget
    gtk_widget_queue_resize widget'
    touchManagedPtr widget
    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-gtk4-4.0.12/docs/GI-Gtk-Objects-Widget.html#v:widgetQueueResize"
        })


#endif

-- method Widget::realize
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "widget"
--           , argType = TInterface Name { namespace = "Gtk" , name = "Widget" }
--           , argCType = Just "GtkWidget*"
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a widget" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = 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 resources associated with a widget.
-- 
-- 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 this function 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
-- [Widget::realize]("GI.Gtk.Objects.Widget#g:signal:realize").
widgetRealize ::
    (B.CallStack.HasCallStack, MonadIO m, IsWidget a) =>
    a
    -- ^ /@widget@/: a widget
    -> m ()
widgetRealize :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsWidget a) =>
a -> m ()
widgetRealize a
widget = IO () -> m ()
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    widget' <- a -> IO (Ptr Widget)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
widget
    gtk_widget_realize widget'
    touchManagedPtr widget
    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-gtk4-4.0.12/docs/GI-Gtk-Objects-Widget.html#v:widgetRealize"
        })


#endif

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

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

-- | Removes an event controller from the widget.
-- 
-- The removed event controller will not receive any more events,
-- and should not be used again.
-- 
-- Widgets will remove all event controllers automatically when they
-- are destroyed, there is normally no need to call this function.
widgetRemoveController ::
    (B.CallStack.HasCallStack, MonadIO m, IsWidget a, Gtk.EventController.IsEventController b) =>
    a
    -- ^ /@widget@/: a widget
    -> b
    -- ^ /@controller@/: an event controller
    -> m ()
widgetRemoveController :: forall (m :: * -> *) a b.
(HasCallStack, MonadIO m, IsWidget a, IsEventController b) =>
a -> b -> m ()
widgetRemoveController a
widget b
controller = IO () -> m ()
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    widget' <- a -> IO (Ptr Widget)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
widget
    controller' <- unsafeManagedPtrCastPtr controller
    gtk_widget_remove_controller widget' controller'
    touchManagedPtr widget
    touchManagedPtr controller
    return ()

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

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


#endif

-- method Widget::remove_css_class
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "widget"
--           , argType = TInterface Name { namespace = "Gtk" , name = "Widget" }
--           , argCType = Just "GtkWidget*"
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a widget" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "css_class"
--           , argType = TBasicType TUTF8
--           , argCType = Just "const char*"
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText =
--                     Just
--                       "style class to remove from @widget, without the leading period"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

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

-- | Removes a style from the widget.
-- 
-- After this, the style of /@widget@/ will stop matching for /@cssClass@/.
widgetRemoveCssClass ::
    (B.CallStack.HasCallStack, MonadIO m, IsWidget a) =>
    a
    -- ^ /@widget@/: a widget
    -> T.Text
    -- ^ /@cssClass@/: style class to remove from /@widget@/, without the leading period
    -> m ()
widgetRemoveCssClass :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsWidget a) =>
a -> Text -> m ()
widgetRemoveCssClass a
widget Text
cssClass = IO () -> m ()
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    widget' <- a -> IO (Ptr Widget)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
widget
    cssClass' <- textToCString cssClass
    gtk_widget_remove_css_class widget' cssClass'
    touchManagedPtr widget
    freeMem cssClass'
    return ()

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

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


#endif

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

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

-- | Removes a widget from the list of mnemonic labels for this widget.
-- 
-- See 'GI.Gtk.Objects.Widget.widgetListMnemonicLabels'.
-- 
-- The widget must have previously been added to the list with
-- 'GI.Gtk.Objects.Widget.widgetAddMnemonicLabel'.
widgetRemoveMnemonicLabel ::
    (B.CallStack.HasCallStack, MonadIO m, IsWidget a, IsWidget b) =>
    a
    -- ^ /@widget@/: a widget
    -> b
    -- ^ /@label@/: a widget that is a mnemonic label for /@widget@/
    -> m ()
widgetRemoveMnemonicLabel :: forall (m :: * -> *) a b.
(HasCallStack, MonadIO m, IsWidget a, IsWidget b) =>
a -> b -> m ()
widgetRemoveMnemonicLabel a
widget b
label = IO () -> m ()
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    widget' <- a -> IO (Ptr Widget)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
widget
    label' <- unsafeManagedPtrCastPtr label
    gtk_widget_remove_mnemonic_label widget' label'
    touchManagedPtr widget
    touchManagedPtr label
    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-gtk4-4.0.12/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" }
--           , argCType = Just "GtkWidget*"
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a widget" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "id"
--           , argType = TBasicType TUInt
--           , argCType = Just "guint"
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText =
--                     Just "an ID returned by [method@Gtk.Widget.add_tick_callback]"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

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

-- | Removes a tick callback previously registered with
-- 'GI.Gtk.Objects.Widget.widgetAddTickCallback'.
widgetRemoveTickCallback ::
    (B.CallStack.HasCallStack, MonadIO m, IsWidget a) =>
    a
    -- ^ /@widget@/: a 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 a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    widget' <- a -> IO (Ptr Widget)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
widget
    gtk_widget_remove_tick_callback widget' id
    touchManagedPtr widget
    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-gtk4-4.0.12/docs/GI-Gtk-Objects-Widget.html#v:widgetRemoveTickCallback"
        })


#endif

-- method Widget::set_can_focus
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "widget"
--           , argType = TInterface Name { namespace = "Gtk" , name = "Widget" }
--           , argCType = Just "GtkWidget*"
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a widget" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "can_focus"
--           , argType = TBasicType TBoolean
--           , argCType = Just "gboolean"
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText =
--                     Just
--                       "whether the input focus can enter\n  the widget or any of its children"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = 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 ()

-- | Sets whether the input focus can enter the widget or
-- any of its children.
-- 
-- Applications should set /@canFocus@/ to false to mark a
-- widget as for pointer\/touch use only.
-- 
-- Note that having /@canFocus@/ be true is only one of the
-- necessary conditions for being focusable. A widget must
-- also be sensitive and focusable and not have an ancestor
-- that is marked as not can-focus in order to receive input
-- focus.
-- 
-- See 'GI.Gtk.Objects.Widget.widgetGrabFocus' for actually setting
-- the input focus on a widget.
widgetSetCanFocus ::
    (B.CallStack.HasCallStack, MonadIO m, IsWidget a) =>
    a
    -- ^ /@widget@/: a widget
    -> Bool
    -- ^ /@canFocus@/: whether the input focus can enter
    --   the widget or any of its children
    -> m ()
widgetSetCanFocus :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsWidget a) =>
a -> Bool -> m ()
widgetSetCanFocus a
widget Bool
canFocus = IO () -> m ()
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    widget' <- a -> IO (Ptr Widget)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
widget
    let canFocus' = (Int -> CInt
forall a b. (Integral a, Num b) => a -> b
P.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
P.fromEnum) Bool
canFocus
    gtk_widget_set_can_focus widget' canFocus'
    touchManagedPtr widget
    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-gtk4-4.0.12/docs/GI-Gtk-Objects-Widget.html#v:widgetSetCanFocus"
        })


#endif

-- method Widget::set_can_target
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "widget"
--           , argType = TInterface Name { namespace = "Gtk" , name = "Widget" }
--           , argCType = Just "GtkWidget*"
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a widget" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "can_target"
--           , argType = TBasicType TBoolean
--           , argCType = Just "gboolean"
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText =
--                     Just
--                       "whether this widget should be able to\n  receive pointer events"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

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

-- | Sets whether the widget can be the target of pointer events.
widgetSetCanTarget ::
    (B.CallStack.HasCallStack, MonadIO m, IsWidget a) =>
    a
    -- ^ /@widget@/: a widget
    -> Bool
    -- ^ /@canTarget@/: whether this widget should be able to
    --   receive pointer events
    -> m ()
widgetSetCanTarget :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsWidget a) =>
a -> Bool -> m ()
widgetSetCanTarget a
widget Bool
canTarget = IO () -> m ()
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    widget' <- a -> IO (Ptr Widget)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
widget
    let canTarget' = (Int -> CInt
forall a b. (Integral a, Num b) => a -> b
P.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
P.fromEnum) Bool
canTarget
    gtk_widget_set_can_target widget' canTarget'
    touchManagedPtr widget
    return ()

#if defined(ENABLE_OVERLOADING)
data WidgetSetCanTargetMethodInfo
instance (signature ~ (Bool -> m ()), MonadIO m, IsWidget a) => O.OverloadedMethod WidgetSetCanTargetMethodInfo a signature where
    overloadedMethod = widgetSetCanTarget

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


#endif

-- method Widget::set_child_visible
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "widget"
--           , argType = TInterface Name { namespace = "Gtk" , name = "Widget" }
--           , argCType = Just "GtkWidget*"
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a widget" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "child_visible"
--           , argType = TBasicType TBoolean
--           , argCType = Just "gboolean"
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText =
--                     Just "whether @widget should be mapped along\n  with its parent"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

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

-- | Sets whether the widget should be mapped along with its parent.
-- 
-- 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 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 widget implementations
-- and should never be called by an application.
widgetSetChildVisible ::
    (B.CallStack.HasCallStack, MonadIO m, IsWidget a) =>
    a
    -- ^ /@widget@/: a widget
    -> Bool
    -- ^ /@childVisible@/: whether /@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
childVisible = IO () -> m ()
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    widget' <- a -> IO (Ptr Widget)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
widget
    let childVisible' = (Int -> CInt
forall a b. (Integral a, Num b) => a -> b
P.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
P.fromEnum) Bool
childVisible
    gtk_widget_set_child_visible widget' childVisible'
    touchManagedPtr widget
    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-gtk4-4.0.12/docs/GI-Gtk-Objects-Widget.html#v:widgetSetChildVisible"
        })


#endif

-- method Widget::set_css_classes
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "widget"
--           , argType = TInterface Name { namespace = "Gtk" , name = "Widget" }
--           , argCType = Just "GtkWidget*"
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a widget" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "classes"
--           , argType = TCArray True (-1) (-1) (TBasicType TUTF8)
--           , argCType = Just "const char**"
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "\n  `NULL`-terminated list of style classes"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "gtk_widget_set_css_classes" gtk_widget_set_css_classes :: 
    Ptr Widget ->                           -- widget : TInterface (Name {namespace = "Gtk", name = "Widget"})
    Ptr CString ->                          -- classes : TCArray True (-1) (-1) (TBasicType TUTF8)
    IO ()

-- | Replaces the current style classes of the widget with /@classes@/.
widgetSetCssClasses ::
    (B.CallStack.HasCallStack, MonadIO m, IsWidget a) =>
    a
    -- ^ /@widget@/: a widget
    -> [T.Text]
    -- ^ /@classes@/: 
    --   @NULL@-terminated list of style classes
    -> m ()
widgetSetCssClasses :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsWidget a) =>
a -> [Text] -> m ()
widgetSetCssClasses a
widget [Text]
classes = IO () -> m ()
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    widget' <- a -> IO (Ptr Widget)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
widget
    classes' <- packZeroTerminatedUTF8CArray classes
    gtk_widget_set_css_classes widget' classes'
    touchManagedPtr widget
    mapZeroTerminatedCArray freeMem classes'
    freeMem classes'
    return ()

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

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


#endif

-- method Widget::set_cursor
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "widget"
--           , argType = TInterface Name { namespace = "Gtk" , name = "Widget" }
--           , argCType = Just "GtkWidget*"
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a widget" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "cursor"
--           , argType = TInterface Name { namespace = "Gdk" , name = "Cursor" }
--           , argCType = Just "GdkCursor*"
--           , direction = DirectionIn
--           , mayBeNull = True
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "the new cursor" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "gtk_widget_set_cursor" gtk_widget_set_cursor :: 
    Ptr Widget ->                           -- widget : TInterface (Name {namespace = "Gtk", name = "Widget"})
    Ptr Gdk.Cursor.Cursor ->                -- cursor : TInterface (Name {namespace = "Gdk", name = "Cursor"})
    IO ()

-- | Sets the cursor to be shown when the pointer hovers over
-- the widget.
-- 
-- If the /@cursor@/ is @NULL@, /@widget@/ will use the cursor
-- inherited from its parent.
widgetSetCursor ::
    (B.CallStack.HasCallStack, MonadIO m, IsWidget a, Gdk.Cursor.IsCursor b) =>
    a
    -- ^ /@widget@/: a widget
    -> Maybe (b)
    -- ^ /@cursor@/: the new cursor
    -> m ()
widgetSetCursor :: forall (m :: * -> *) a b.
(HasCallStack, MonadIO m, IsWidget a, IsCursor b) =>
a -> Maybe b -> m ()
widgetSetCursor a
widget Maybe b
cursor = IO () -> m ()
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    widget' <- a -> IO (Ptr Widget)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
widget
    maybeCursor <- case cursor of
        Maybe b
Nothing -> Ptr Cursor -> IO (Ptr Cursor)
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr Cursor
forall a. Ptr a
FP.nullPtr
        Just b
jCursor -> do
            jCursor' <- b -> IO (Ptr Cursor)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
jCursor
            return jCursor'
    gtk_widget_set_cursor widget' maybeCursor
    touchManagedPtr widget
    whenJust cursor touchManagedPtr
    return ()

#if defined(ENABLE_OVERLOADING)
data WidgetSetCursorMethodInfo
instance (signature ~ (Maybe (b) -> m ()), MonadIO m, IsWidget a, Gdk.Cursor.IsCursor b) => O.OverloadedMethod WidgetSetCursorMethodInfo a signature where
    overloadedMethod = widgetSetCursor

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


#endif

-- method Widget::set_cursor_from_name
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "widget"
--           , argType = TInterface Name { namespace = "Gtk" , name = "Widget" }
--           , argCType = Just "GtkWidget*"
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a widget" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "name"
--           , argType = TBasicType TUTF8
--           , argCType = Just "const char*"
--           , direction = DirectionIn
--           , mayBeNull = True
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "the name of the cursor"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

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

-- | Sets the cursor to be shown when the pointer hovers over
-- the widget.
-- 
-- This is a utility function that creates a cursor via
-- 'GI.Gdk.Objects.Cursor.cursorNewFromName' and then sets it on /@widget@/
-- with 'GI.Gtk.Objects.Widget.widgetSetCursor'. See those functions for
-- details.
-- 
-- On top of that, this function allows /@name@/ to be @NULL@, which
-- will do the same as calling 'GI.Gtk.Objects.Widget.widgetSetCursor'
-- with a @NULL@ cursor.
widgetSetCursorFromName ::
    (B.CallStack.HasCallStack, MonadIO m, IsWidget a) =>
    a
    -- ^ /@widget@/: a widget
    -> Maybe (T.Text)
    -- ^ /@name@/: the name of the cursor
    -> m ()
widgetSetCursorFromName :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsWidget a) =>
a -> Maybe Text -> m ()
widgetSetCursorFromName a
widget Maybe Text
name = IO () -> m ()
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    widget' <- a -> IO (Ptr Widget)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
widget
    maybeName <- case name of
        Maybe Text
Nothing -> CString -> IO CString
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return CString
forall a. Ptr a
FP.nullPtr
        Just Text
jName -> do
            jName' <- Text -> IO CString
textToCString Text
jName
            return jName'
    gtk_widget_set_cursor_from_name widget' maybeName
    touchManagedPtr widget
    freeMem maybeName
    return ()

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

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


#endif

-- method Widget::set_direction
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "widget"
--           , argType = TInterface Name { namespace = "Gtk" , name = "Widget" }
--           , argCType = Just "GtkWidget*"
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a widget" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "dir"
--           , argType =
--               TInterface Name { namespace = "Gtk" , name = "TextDirection" }
--           , argCType = Just "GtkTextDirection"
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "the new direction" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = 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 the 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
-- prevail, except for widgets where the children 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 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 a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    widget' <- a -> IO (Ptr Widget)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
widget
    let 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
    gtk_widget_set_direction widget' dir'
    touchManagedPtr widget
    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-gtk4-4.0.12/docs/GI-Gtk-Objects-Widget.html#v:widgetSetDirection"
        })


#endif

-- method Widget::set_focus_child
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "widget"
--           , argType = TInterface Name { namespace = "Gtk" , name = "Widget" }
--           , argCType = Just "GtkWidget*"
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a widget" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "child"
--           , argType = TInterface Name { namespace = "Gtk" , name = "Widget" }
--           , argCType = Just "GtkWidget*"
--           , direction = DirectionIn
--           , mayBeNull = True
--           , argDoc =
--               Documentation
--                 { rawDocText =
--                     Just
--                       "a direct child widget of @widget\n  or `NULL` to unset the focus child"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

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

-- | Set the focus child of the widget.
-- 
-- This function is only suitable for widget implementations.
-- If you want a certain widget to get the input focus, call
-- 'GI.Gtk.Objects.Widget.widgetGrabFocus' on it.
widgetSetFocusChild ::
    (B.CallStack.HasCallStack, MonadIO m, IsWidget a, IsWidget b) =>
    a
    -- ^ /@widget@/: a widget
    -> Maybe (b)
    -- ^ /@child@/: a direct child widget of /@widget@/
    --   or @NULL@ to unset the focus child
    -> m ()
widgetSetFocusChild :: forall (m :: * -> *) a b.
(HasCallStack, MonadIO m, IsWidget a, IsWidget b) =>
a -> Maybe b -> m ()
widgetSetFocusChild a
widget Maybe b
child = IO () -> m ()
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    widget' <- a -> IO (Ptr Widget)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
widget
    maybeChild <- case child of
        Maybe b
Nothing -> Ptr Widget -> IO (Ptr Widget)
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr Widget
forall a. Ptr a
FP.nullPtr
        Just b
jChild -> do
            jChild' <- b -> IO (Ptr Widget)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
jChild
            return jChild'
    gtk_widget_set_focus_child widget' maybeChild
    touchManagedPtr widget
    whenJust child touchManagedPtr
    return ()

#if defined(ENABLE_OVERLOADING)
data WidgetSetFocusChildMethodInfo
instance (signature ~ (Maybe (b) -> m ()), MonadIO m, IsWidget a, IsWidget b) => O.OverloadedMethod WidgetSetFocusChildMethodInfo a signature where
    overloadedMethod = widgetSetFocusChild

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


#endif

-- method Widget::set_focus_on_click
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "widget"
--           , argType = TInterface Name { namespace = "Gtk" , name = "Widget" }
--           , argCType = Just "GtkWidget*"
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a widget" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "focus_on_click"
--           , argType = TBasicType TBoolean
--           , argCType = Just "gboolean"
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText =
--                     Just
--                       "whether the widget should grab focus when clicked\n  with the mouse"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

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

-- | Sets whether the widget should grab focus when it is clicked
-- with the mouse.
-- 
-- Making mouse clicks not grab focus is useful in places like
-- toolbars where you don’t want the keyboard focus removed from
-- the main area of the application.
widgetSetFocusOnClick ::
    (B.CallStack.HasCallStack, MonadIO m, IsWidget a) =>
    a
    -- ^ /@widget@/: a 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 a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    widget' <- a -> IO (Ptr Widget)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
widget
    let focusOnClick' = (Int -> CInt
forall a b. (Integral a, Num b) => a -> b
P.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
P.fromEnum) Bool
focusOnClick
    gtk_widget_set_focus_on_click widget' focusOnClick'
    touchManagedPtr widget
    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-gtk4-4.0.12/docs/GI-Gtk-Objects-Widget.html#v:widgetSetFocusOnClick"
        })


#endif

-- method Widget::set_focusable
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "widget"
--           , argType = TInterface Name { namespace = "Gtk" , name = "Widget" }
--           , argCType = Just "GtkWidget*"
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a widget" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "focusable"
--           , argType = TBasicType TBoolean
--           , argCType = Just "gboolean"
--           , 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
--           , argCallbackUserData = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

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

-- | Sets whether the widget can own the input focus.
-- 
-- Widget implementations should set /@focusable@/ to true in
-- their @/init()/@ function if they want to receive keyboard input.
-- 
-- Note that having /@focusable@/ be true is only one of the
-- necessary conditions for being focusable. A widget must
-- also be sensitive and can-focus and not have an ancestor
-- that is marked as not can-focus in order to receive input
-- focus.
-- 
-- See 'GI.Gtk.Objects.Widget.widgetGrabFocus' for actually setting
-- the input focus on a widget.
widgetSetFocusable ::
    (B.CallStack.HasCallStack, MonadIO m, IsWidget a) =>
    a
    -- ^ /@widget@/: a widget
    -> Bool
    -- ^ /@focusable@/: whether or not /@widget@/ can own the input focus
    -> m ()
widgetSetFocusable :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsWidget a) =>
a -> Bool -> m ()
widgetSetFocusable a
widget Bool
focusable = IO () -> m ()
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    widget' <- a -> IO (Ptr Widget)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
widget
    let focusable' = (Int -> CInt
forall a b. (Integral a, Num b) => a -> b
P.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
P.fromEnum) Bool
focusable
    gtk_widget_set_focusable widget' focusable'
    touchManagedPtr widget
    return ()

#if defined(ENABLE_OVERLOADING)
data WidgetSetFocusableMethodInfo
instance (signature ~ (Bool -> m ()), MonadIO m, IsWidget a) => O.OverloadedMethod WidgetSetFocusableMethodInfo a signature where
    overloadedMethod = widgetSetFocusable

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


#endif

-- method Widget::set_font_map
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "widget"
--           , argType = TInterface Name { namespace = "Gtk" , name = "Widget" }
--           , argCType = Just "GtkWidget*"
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a widget" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "font_map"
--           , argType =
--               TInterface Name { namespace = "Pango" , name = "FontMap" }
--           , argCType = Just "PangoFontMap*"
--           , direction = DirectionIn
--           , mayBeNull = True
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a `PangoFontMap`" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = 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 text rendering in the widget.
-- 
-- The font map is the object that is used to look up fonts.
-- Setting a custom font map can be useful in special situations,
-- e.g. when you need to add application-specific fonts to the set
-- of available fonts.
-- 
-- When not set, the widget will inherit the font map from its parent.
widgetSetFontMap ::
    (B.CallStack.HasCallStack, MonadIO m, IsWidget a, Pango.FontMap.IsFontMap b) =>
    a
    -- ^ /@widget@/: a widget
    -> Maybe (b)
    -- ^ /@fontMap@/: a @PangoFontMap@
    -> 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 a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    widget' <- a -> IO (Ptr Widget)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
widget
    maybeFontMap <- case fontMap of
        Maybe b
Nothing -> Ptr FontMap -> IO (Ptr FontMap)
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr FontMap
forall a. Ptr a
FP.nullPtr
        Just b
jFontMap -> do
            jFontMap' <- b -> IO (Ptr FontMap)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
jFontMap
            return jFontMap'
    gtk_widget_set_font_map widget' maybeFontMap
    touchManagedPtr widget
    whenJust fontMap touchManagedPtr
    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-gtk4-4.0.12/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" }
--           , argCType = Just "GtkWidget*"
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a widget" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "options"
--           , argType =
--               TInterface Name { namespace = "cairo" , name = "FontOptions" }
--           , argCType = Just "const cairo_font_options_t*"
--           , direction = DirectionIn
--           , mayBeNull = True
--           , argDoc =
--               Documentation
--                 { rawDocText =
--                     Just
--                       "a `cairo_font_options_t` struct\n  to unset any previously set default font options"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = 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 ()

{-# DEPRECATED widgetSetFontOptions ["(Since version 4.16)"] #-}
-- | Sets the @cairo_font_options_t@ used for text rendering
-- in the widget.
-- 
-- When not set, the default font options for the @GdkDisplay@
-- will be used.
widgetSetFontOptions ::
    (B.CallStack.HasCallStack, MonadIO m, IsWidget a) =>
    a
    -- ^ /@widget@/: a widget
    -> Maybe (Cairo.FontOptions.FontOptions)
    -- ^ /@options@/: a @cairo_font_options_t@ struct
    --   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 a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    widget' <- a -> IO (Ptr Widget)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
widget
    maybeOptions <- case options of
        Maybe FontOptions
Nothing -> Ptr FontOptions -> IO (Ptr FontOptions)
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr FontOptions
forall a. Ptr a
FP.nullPtr
        Just FontOptions
jOptions -> do
            jOptions' <- FontOptions -> IO (Ptr FontOptions)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr FontOptions
jOptions
            return jOptions'
    gtk_widget_set_font_options widget' maybeOptions
    touchManagedPtr widget
    whenJust options touchManagedPtr
    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-gtk4-4.0.12/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" }
--           , argCType = Just "GtkWidget*"
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a widget" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "align"
--           , argType = TInterface Name { namespace = "Gtk" , name = "Align" }
--           , argCType = Just "GtkAlign"
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "the horizontal alignment"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = 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 the widget.
widgetSetHalign ::
    (B.CallStack.HasCallStack, MonadIO m, IsWidget a) =>
    a
    -- ^ /@widget@/: a 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 a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    widget' <- a -> IO (Ptr Widget)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
widget
    let 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
    gtk_widget_set_halign widget' align'
    touchManagedPtr widget
    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-gtk4-4.0.12/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" }
--           , argCType = Just "GtkWidget*"
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a widget" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "has_tooltip"
--           , argType = TBasicType TBoolean
--           , argCType = Just "gboolean"
--           , 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
--           , argCallbackUserData = 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 the widget.
widgetSetHasTooltip ::
    (B.CallStack.HasCallStack, MonadIO m, IsWidget a) =>
    a
    -- ^ /@widget@/: a 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 a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    widget' <- a -> IO (Ptr Widget)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
widget
    let hasTooltip' = (Int -> CInt
forall a b. (Integral a, Num b) => a -> b
P.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
P.fromEnum) Bool
hasTooltip
    gtk_widget_set_has_tooltip widget' hasTooltip'
    touchManagedPtr widget
    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-gtk4-4.0.12/docs/GI-Gtk-Objects-Widget.html#v:widgetSetHasTooltip"
        })


#endif

-- method Widget::set_hexpand
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "widget"
--           , argType = TInterface Name { namespace = "Gtk" , name = "Widget" }
--           , argCType = Just "GtkWidget*"
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a widget" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "expand"
--           , argType = TBasicType TBoolean
--           , argCType = Just "gboolean"
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "whether to expand" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = 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 window, widgets with expand set to 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 widget can decide how the expandability of children affects its
-- own expansion by overriding the @compute_expand@ virtual method on
-- @GtkWidget@.).
-- 
-- 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@/: a 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 a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    widget' <- a -> IO (Ptr Widget)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
widget
    let expand' = (Int -> CInt
forall a b. (Integral a, Num b) => a -> b
P.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
P.fromEnum) Bool
expand
    gtk_widget_set_hexpand widget' expand'
    touchManagedPtr widget
    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-gtk4-4.0.12/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" }
--           , argCType = Just "GtkWidget*"
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a widget" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "set"
--           , argType = TBasicType TBoolean
--           , argCType = Just "gboolean"
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "value for hexpand-set property"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = 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 will be used.
-- 
-- The [Widget:hexpandSet]("GI.Gtk.Objects.Widget#g:attr:hexpandSet") 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@/: a 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 a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    widget' <- a -> IO (Ptr Widget)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
widget
    let set' = (Int -> CInt
forall a b. (Integral a, Num b) => a -> b
P.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
P.fromEnum) Bool
set
    gtk_widget_set_hexpand_set widget' set'
    touchManagedPtr widget
    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-gtk4-4.0.12/docs/GI-Gtk-Objects-Widget.html#v:widgetSetHexpandSet"
        })


#endif

-- method Widget::set_layout_manager
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "widget"
--           , argType = TInterface Name { namespace = "Gtk" , name = "Widget" }
--           , argCType = Just "GtkWidget*"
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a widget" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "layout_manager"
--           , argType =
--               TInterface Name { namespace = "Gtk" , name = "LayoutManager" }
--           , argCType = Just "GtkLayoutManager*"
--           , direction = DirectionIn
--           , mayBeNull = True
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a layout manager" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = False
--           , transfer = TransferEverything
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

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

-- | Sets the layout manager to use for measuring and allocating children
-- of the widget.
widgetSetLayoutManager ::
    (B.CallStack.HasCallStack, MonadIO m, IsWidget a, Gtk.LayoutManager.IsLayoutManager b) =>
    a
    -- ^ /@widget@/: a widget
    -> Maybe (b)
    -- ^ /@layoutManager@/: a layout manager
    -> m ()
widgetSetLayoutManager :: forall (m :: * -> *) a b.
(HasCallStack, MonadIO m, IsWidget a, IsLayoutManager b) =>
a -> Maybe b -> m ()
widgetSetLayoutManager a
widget Maybe b
layoutManager = IO () -> m ()
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    widget' <- a -> IO (Ptr Widget)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
widget
    maybeLayoutManager <- case layoutManager of
        Maybe b
Nothing -> Ptr LayoutManager -> IO (Ptr LayoutManager)
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr LayoutManager
forall a. Ptr a
FP.nullPtr
        Just b
jLayoutManager -> do
            jLayoutManager' <- b -> IO (Ptr LayoutManager)
forall a b. (HasCallStack, GObject a) => a -> IO (Ptr b)
B.ManagedPtr.disownObject b
jLayoutManager
            return jLayoutManager'
    gtk_widget_set_layout_manager widget' maybeLayoutManager
    touchManagedPtr widget
    whenJust layoutManager touchManagedPtr
    return ()

#if defined(ENABLE_OVERLOADING)
data WidgetSetLayoutManagerMethodInfo
instance (signature ~ (Maybe (b) -> m ()), MonadIO m, IsWidget a, Gtk.LayoutManager.IsLayoutManager b) => O.OverloadedMethod WidgetSetLayoutManagerMethodInfo a signature where
    overloadedMethod = widgetSetLayoutManager

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


#endif

-- method Widget::set_limit_events
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "widget"
--           , argType = TInterface Name { namespace = "Gtk" , name = "Widget" }
--           , argCType = Just "GtkWidget*"
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a `GtkWidget`" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "limit_events"
--           , argType = TBasicType TBoolean
--           , argCType = Just "gboolean"
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "whether to limit events"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

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

-- | Sets whether the widget acts like a modal dialog,
-- with respect to event delivery.
-- 
-- /Since: 4.18/
widgetSetLimitEvents ::
    (B.CallStack.HasCallStack, MonadIO m, IsWidget a) =>
    a
    -- ^ /@widget@/: a @GtkWidget@
    -> Bool
    -- ^ /@limitEvents@/: whether to limit events
    -> m ()
widgetSetLimitEvents :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsWidget a) =>
a -> Bool -> m ()
widgetSetLimitEvents a
widget Bool
limitEvents = IO () -> m ()
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    widget' <- a -> IO (Ptr Widget)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
widget
    let limitEvents' = (Int -> CInt
forall a b. (Integral a, Num b) => a -> b
P.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
P.fromEnum) Bool
limitEvents
    gtk_widget_set_limit_events widget' limitEvents'
    touchManagedPtr widget
    return ()

#if defined(ENABLE_OVERLOADING)
data WidgetSetLimitEventsMethodInfo
instance (signature ~ (Bool -> m ()), MonadIO m, IsWidget a) => O.OverloadedMethod WidgetSetLimitEventsMethodInfo a signature where
    overloadedMethod = widgetSetLimitEvents

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


#endif

-- method Widget::set_margin_bottom
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "widget"
--           , argType = TInterface Name { namespace = "Gtk" , name = "Widget" }
--           , argCType = Just "GtkWidget*"
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a widget" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "margin"
--           , argType = TBasicType TInt
--           , argCType = Just "int"
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "the bottom margin" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = 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 the widget.
widgetSetMarginBottom ::
    (B.CallStack.HasCallStack, MonadIO m, IsWidget a) =>
    a
    -- ^ /@widget@/: a 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 a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    widget' <- a -> IO (Ptr Widget)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
widget
    gtk_widget_set_margin_bottom widget' margin
    touchManagedPtr widget
    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-gtk4-4.0.12/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" }
--           , argCType = Just "GtkWidget*"
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a widget" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "margin"
--           , argType = TBasicType TInt
--           , argCType = Just "int"
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "the end margin" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = 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 the widget.
widgetSetMarginEnd ::
    (B.CallStack.HasCallStack, MonadIO m, IsWidget a) =>
    a
    -- ^ /@widget@/: a 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 a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    widget' <- a -> IO (Ptr Widget)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
widget
    gtk_widget_set_margin_end widget' margin
    touchManagedPtr widget
    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-gtk4-4.0.12/docs/GI-Gtk-Objects-Widget.html#v:widgetSetMarginEnd"
        })


#endif

-- method Widget::set_margin_start
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "widget"
--           , argType = TInterface Name { namespace = "Gtk" , name = "Widget" }
--           , argCType = Just "GtkWidget*"
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a widget" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "margin"
--           , argType = TBasicType TInt
--           , argCType = Just "int"
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "the start margin" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = 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 the widget.
widgetSetMarginStart ::
    (B.CallStack.HasCallStack, MonadIO m, IsWidget a) =>
    a
    -- ^ /@widget@/: a 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 a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    widget' <- a -> IO (Ptr Widget)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
widget
    gtk_widget_set_margin_start widget' margin
    touchManagedPtr widget
    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-gtk4-4.0.12/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" }
--           , argCType = Just "GtkWidget*"
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a widget" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "margin"
--           , argType = TBasicType TInt
--           , argCType = Just "int"
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "the top margin" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = 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 the widget.
widgetSetMarginTop ::
    (B.CallStack.HasCallStack, MonadIO m, IsWidget a) =>
    a
    -- ^ /@widget@/: a 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 a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    widget' <- a -> IO (Ptr Widget)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
widget
    gtk_widget_set_margin_top widget' margin
    touchManagedPtr widget
    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-gtk4-4.0.12/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" }
--           , argCType = Just "GtkWidget*"
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a widget" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "name"
--           , argType = TBasicType TUTF8
--           , argCType = Just "const char*"
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "name for the widget"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = 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 ()

-- | Sets a widgets name.
-- 
-- Setting a name allows you to refer to the widget 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 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 a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    widget' <- a -> IO (Ptr Widget)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
widget
    name' <- textToCString name
    gtk_widget_set_name widget' name'
    touchManagedPtr widget
    freeMem name'
    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-gtk4-4.0.12/docs/GI-Gtk-Objects-Widget.html#v:widgetSetName"
        })


#endif

-- method Widget::set_opacity
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "widget"
--           , argType = TInterface Name { namespace = "Gtk" , name = "Widget" }
--           , argCType = Just "GtkWidget*"
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a widget" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "opacity"
--           , argType = TBasicType TDouble
--           , argCType = Just "double"
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "desired opacity, between 0 and 1"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = 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 ()

-- | Requests the widget to be rendered partially transparent.
-- 
-- An opacity of 0 is fully transparent and an opacity of 1
-- is fully opaque.
-- 
-- Opacity works on both toplevel widgets and child widgets, although
-- there are some limitations: For toplevel widgets, applying opacity
-- depends on the capabilities of the windowing system. On X11, this
-- has any effect only on X displays with a compositing manager, see
-- 'GI.Gdk.Objects.Display.displayIsComposited'. On Windows and Wayland it will
-- always work, although setting a window’s opacity after the window
-- has been shown may cause some flicker.
-- 
-- Note that the opacity is inherited through inclusion — if you set
-- a toplevel to be partially translucent, all of its content will
-- appear translucent, since it is ultimatively rendered on that
-- toplevel. The opacity value itself is not inherited by child
-- widgets (since that would make widgets deeper in the hierarchy
-- progressively more translucent). As a consequence, t'GI.Gtk.Objects.Popover.Popover'
-- instances and other t'GI.Gtk.Interfaces.Native.Native' widgets with their own surface
-- will use their own opacity value, and thus by default appear
-- non-translucent, even if they are attached to a toplevel that
-- is translucent.
widgetSetOpacity ::
    (B.CallStack.HasCallStack, MonadIO m, IsWidget a) =>
    a
    -- ^ /@widget@/: a 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 a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    widget' <- a -> IO (Ptr Widget)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
widget
    let opacity' = Double -> CDouble
forall a b. (Real a, Fractional b) => a -> b
realToFrac Double
opacity
    gtk_widget_set_opacity widget' opacity'
    touchManagedPtr widget
    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-gtk4-4.0.12/docs/GI-Gtk-Objects-Widget.html#v:widgetSetOpacity"
        })


#endif

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

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

-- | Sets how the widget treats content that is drawn outside the
-- it\'s content area.
-- 
-- See the definition of t'GI.Gtk.Enums.Overflow' for details.
-- 
-- This setting is provided for widget implementations and
-- should not be used by application code.
-- 
-- The default value is 'GI.Gtk.Enums.OverflowVisible'.
widgetSetOverflow ::
    (B.CallStack.HasCallStack, MonadIO m, IsWidget a) =>
    a
    -- ^ /@widget@/: a widget
    -> Gtk.Enums.Overflow
    -- ^ /@overflow@/: desired overflow value
    -> m ()
widgetSetOverflow :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsWidget a) =>
a -> Overflow -> m ()
widgetSetOverflow a
widget Overflow
overflow = IO () -> m ()
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    widget' <- a -> IO (Ptr Widget)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
widget
    let overflow' = (Int -> CUInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CUInt) -> (Overflow -> Int) -> Overflow -> CUInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Overflow -> Int
forall a. Enum a => a -> Int
fromEnum) Overflow
overflow
    gtk_widget_set_overflow widget' overflow'
    touchManagedPtr widget
    return ()

#if defined(ENABLE_OVERLOADING)
data WidgetSetOverflowMethodInfo
instance (signature ~ (Gtk.Enums.Overflow -> m ()), MonadIO m, IsWidget a) => O.OverloadedMethod WidgetSetOverflowMethodInfo a signature where
    overloadedMethod = widgetSetOverflow

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


#endif

-- method Widget::set_parent
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "widget"
--           , argType = TInterface Name { namespace = "Gtk" , name = "Widget" }
--           , argCType = Just "GtkWidget*"
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a widget" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "parent"
--           , argType = TInterface Name { namespace = "Gtk" , name = "Widget" }
--           , argCType = Just "GtkWidget*"
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "parent widget" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = 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 ()

-- | Sets the parent widget of the widget.
-- 
-- This takes care of details such as updating the state and style
-- of the child to reflect its new location and resizing the parent.
-- The opposite function is 'GI.Gtk.Objects.Widget.widgetUnparent'.
-- 
-- This function is useful only when implementing subclasses of
-- @GtkWidget@.
widgetSetParent ::
    (B.CallStack.HasCallStack, MonadIO m, IsWidget a, IsWidget b) =>
    a
    -- ^ /@widget@/: a widget
    -> b
    -- ^ /@parent@/: parent widget
    -> m ()
widgetSetParent :: forall (m :: * -> *) a b.
(HasCallStack, MonadIO m, IsWidget a, IsWidget b) =>
a -> b -> m ()
widgetSetParent a
widget b
parent = IO () -> m ()
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    widget' <- a -> IO (Ptr Widget)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
widget
    parent' <- unsafeManagedPtrCastPtr parent
    gtk_widget_set_parent widget' parent'
    touchManagedPtr widget
    touchManagedPtr parent
    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-gtk4-4.0.12/docs/GI-Gtk-Objects-Widget.html#v:widgetSetParent"
        })


#endif

-- method Widget::set_receives_default
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "widget"
--           , argType = TInterface Name { namespace = "Gtk" , name = "Widget" }
--           , argCType = Just "GtkWidget*"
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a widget" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "receives_default"
--           , argType = TBasicType TBoolean
--           , argCType = Just "gboolean"
--           , 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
--           , argCallbackUserData = 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 ()

-- | Sets whether the widget will be treated as the default
-- widget within its toplevel when it has the focus, even if
-- another widget is the default.
widgetSetReceivesDefault ::
    (B.CallStack.HasCallStack, MonadIO m, IsWidget a) =>
    a
    -- ^ /@widget@/: a 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 a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    widget' <- a -> IO (Ptr Widget)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
widget
    let receivesDefault' = (Int -> CInt
forall a b. (Integral a, Num b) => a -> b
P.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
P.fromEnum) Bool
receivesDefault
    gtk_widget_set_receives_default widget' receivesDefault'
    touchManagedPtr widget
    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-gtk4-4.0.12/docs/GI-Gtk-Objects-Widget.html#v:widgetSetReceivesDefault"
        })


#endif

-- method Widget::set_sensitive
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "widget"
--           , argType = TInterface Name { namespace = "Gtk" , name = "Widget" }
--           , argCType = Just "GtkWidget*"
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a widget" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "sensitive"
--           , argType = TBasicType TBoolean
--           , argCType = Just "gboolean"
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "true to make the widget sensitive"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = 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 the 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 widget
    -> Bool
    -- ^ /@sensitive@/: 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 a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    widget' <- a -> IO (Ptr Widget)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
widget
    let sensitive' = (Int -> CInt
forall a b. (Integral a, Num b) => a -> b
P.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
P.fromEnum) Bool
sensitive
    gtk_widget_set_sensitive widget' sensitive'
    touchManagedPtr widget
    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-gtk4-4.0.12/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" }
--           , argCType = Just "GtkWidget*"
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a widget" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "width"
--           , argType = TBasicType TInt
--           , argCType = Just "int"
--           , 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
--           , argCallbackUserData = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "height"
--           , argType = TBasicType TInt
--           , argCType = Just "int"
--           , 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
--           , argCallbackUserData = 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 the 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.
-- 
-- 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 is
-- basically impossible to hardcode a size that will always work.
-- 
-- 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
-- properties
-- [Widget:marginStart]("GI.Gtk.Objects.Widget#g:attr:marginStart"),
-- [Widget:marginEnd]("GI.Gtk.Objects.Widget#g:attr:marginEnd"),
-- [Widget:marginTop]("GI.Gtk.Objects.Widget#g:attr:marginTop"), and
-- [Widget:marginBottom]("GI.Gtk.Objects.Widget#g:attr:marginBottom"), but it does include pretty
-- much all other padding or border properties set by any subclass
-- of @GtkWidget@.
widgetSetSizeRequest ::
    (B.CallStack.HasCallStack, MonadIO m, IsWidget a) =>
    a
    -- ^ /@widget@/: a 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 a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    widget' <- a -> IO (Ptr Widget)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
widget
    gtk_widget_set_size_request widget' width height
    touchManagedPtr widget
    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-gtk4-4.0.12/docs/GI-Gtk-Objects-Widget.html#v:widgetSetSizeRequest"
        })


#endif

-- method Widget::set_state_flags
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "widget"
--           , argType = TInterface Name { namespace = "Gtk" , name = "Widget" }
--           , argCType = Just "GtkWidget*"
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a widget" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "flags"
--           , argType =
--               TInterface Name { namespace = "Gtk" , name = "StateFlags" }
--           , argCType = Just "GtkStateFlags"
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "state flags to turn on"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "clear"
--           , argType = TBasicType TBoolean
--           , argCType = Just "gboolean"
--           , 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
--           , argCallbackUserData = 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 ()

-- | Turns on flag values in the current widget state.
-- 
-- Typical widget states are insensitive, prelighted, etc.
-- 
-- This function accepts the values [flags/@gtk@/.StateFlags.dir-ltr] and
-- [flags/@gtk@/.StateFlags.dir-rtl] but ignores them. If you want to set
-- the widget\'s direction, use 'GI.Gtk.Objects.Widget.widgetSetDirection'.
-- 
-- This function is for use in widget implementations.
widgetSetStateFlags ::
    (B.CallStack.HasCallStack, MonadIO m, IsWidget a) =>
    a
    -- ^ /@widget@/: a 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 a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    widget' <- a -> IO (Ptr Widget)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
widget
    let flags' = [StateFlags] -> CUInt
forall b a. (Num b, IsGFlag a) => [a] -> b
gflagsToWord [StateFlags]
flags
    let clear' = (Int -> CInt
forall a b. (Integral a, Num b) => a -> b
P.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
P.fromEnum) Bool
clear
    gtk_widget_set_state_flags widget' flags' clear'
    touchManagedPtr widget
    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-gtk4-4.0.12/docs/GI-Gtk-Objects-Widget.html#v:widgetSetStateFlags"
        })


#endif

-- method Widget::set_tooltip_markup
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "widget"
--           , argType = TInterface Name { namespace = "Gtk" , name = "Widget" }
--           , argCType = Just "GtkWidget*"
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a widget" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "markup"
--           , argType = TBasicType TUTF8
--           , argCType = Just "const char*"
--           , 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
--           , argCallbackUserData = 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 the contents of the tooltip for widget.
-- 
-- /@markup@/ must contain Pango markup.
-- 
-- This function will take care of setting the
-- [Widget:hasTooltip]("GI.Gtk.Objects.Widget#g:attr:hasTooltip") as a side effect, and of the
-- default handler for the [Widget::queryTooltip]("GI.Gtk.Objects.Widget#g:signal:queryTooltip") signal.
-- 
-- See also 'GI.Gtk.Objects.Tooltip.tooltipSetMarkup'.
widgetSetTooltipMarkup ::
    (B.CallStack.HasCallStack, MonadIO m, IsWidget a) =>
    a
    -- ^ /@widget@/: a widget
    -> Maybe (T.Text)
    -- ^ /@markup@/: the contents of the tooltip for /@widget@/
    -> m ()
widgetSetTooltipMarkup :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsWidget a) =>
a -> Maybe Text -> m ()
widgetSetTooltipMarkup a
widget Maybe Text
markup = IO () -> m ()
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    widget' <- a -> IO (Ptr Widget)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
widget
    maybeMarkup <- case markup of
        Maybe Text
Nothing -> CString -> IO CString
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return CString
forall a. Ptr a
FP.nullPtr
        Just Text
jMarkup -> do
            jMarkup' <- Text -> IO CString
textToCString Text
jMarkup
            return jMarkup'
    gtk_widget_set_tooltip_markup widget' maybeMarkup
    touchManagedPtr widget
    freeMem maybeMarkup
    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-gtk4-4.0.12/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" }
--           , argCType = Just "GtkWidget*"
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a widget" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "text"
--           , argType = TBasicType TUTF8
--           , argCType = Just "const char*"
--           , 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
--           , argCallbackUserData = 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 the contents of the tooltip for the widget.
-- 
-- If /@text@/ contains any markup, it will be escaped.
-- 
-- This function will take care of setting
-- [Widget:hasTooltip]("GI.Gtk.Objects.Widget#g:attr:hasTooltip") as a side effect,
-- and of the default handler for the
-- [Widget::queryTooltip]("GI.Gtk.Objects.Widget#g:signal:queryTooltip") signal.
-- 
-- See also 'GI.Gtk.Objects.Tooltip.tooltipSetText'.
widgetSetTooltipText ::
    (B.CallStack.HasCallStack, MonadIO m, IsWidget a) =>
    a
    -- ^ /@widget@/: a 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 a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    widget' <- a -> IO (Ptr Widget)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
widget
    maybeText <- case text of
        Maybe Text
Nothing -> CString -> IO CString
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return CString
forall a. Ptr a
FP.nullPtr
        Just Text
jText -> do
            jText' <- Text -> IO CString
textToCString Text
jText
            return jText'
    gtk_widget_set_tooltip_text widget' maybeText
    touchManagedPtr widget
    freeMem maybeText
    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-gtk4-4.0.12/docs/GI-Gtk-Objects-Widget.html#v:widgetSetTooltipText"
        })


#endif

-- method Widget::set_valign
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "widget"
--           , argType = TInterface Name { namespace = "Gtk" , name = "Widget" }
--           , argCType = Just "GtkWidget*"
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a widget" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "align"
--           , argType = TInterface Name { namespace = "Gtk" , name = "Align" }
--           , argCType = Just "GtkAlign"
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "the vertical alignment"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = 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 the widget.
widgetSetValign ::
    (B.CallStack.HasCallStack, MonadIO m, IsWidget a) =>
    a
    -- ^ /@widget@/: a 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 a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    widget' <- a -> IO (Ptr Widget)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
widget
    let 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
    gtk_widget_set_valign widget' align'
    touchManagedPtr widget
    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-gtk4-4.0.12/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" }
--           , argCType = Just "GtkWidget*"
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a widget" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "expand"
--           , argType = TBasicType TBoolean
--           , argCType = Just "gboolean"
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "whether to expand" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = 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@/: a 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 a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    widget' <- a -> IO (Ptr Widget)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
widget
    let expand' = (Int -> CInt
forall a b. (Integral a, Num b) => a -> b
P.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
P.fromEnum) Bool
expand
    gtk_widget_set_vexpand widget' expand'
    touchManagedPtr widget
    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-gtk4-4.0.12/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" }
--           , argCType = Just "GtkWidget*"
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "the widget" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "set"
--           , argType = TBasicType TBoolean
--           , argCType = Just "gboolean"
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "value for vexpand-set property"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = 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 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 a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    widget' <- a -> IO (Ptr Widget)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
widget
    let set' = (Int -> CInt
forall a b. (Integral a, Num b) => a -> b
P.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
P.fromEnum) Bool
set
    gtk_widget_set_vexpand_set widget' set'
    touchManagedPtr widget
    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-gtk4-4.0.12/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" }
--           , argCType = Just "GtkWidget*"
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a widget" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "visible"
--           , argType = TBasicType TBoolean
--           , argCType = Just "gboolean"
--           , 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
--           , argCallbackUserData = 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 true doesn’t mean the widget is
-- actually viewable, see 'GI.Gtk.Objects.Widget.widgetGetVisible'.
widgetSetVisible ::
    (B.CallStack.HasCallStack, MonadIO m, IsWidget a) =>
    a
    -- ^ /@widget@/: a 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 a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    widget' <- a -> IO (Ptr Widget)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
widget
    let visible' = (Int -> CInt
forall a b. (Integral a, Num b) => a -> b
P.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
P.fromEnum) Bool
visible
    gtk_widget_set_visible widget' visible'
    touchManagedPtr widget
    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-gtk4-4.0.12/docs/GI-Gtk-Objects-Widget.html#v:widgetSetVisible"
        })


#endif

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

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

-- | Returns whether the widget should contribute to
-- the measuring and allocation of its parent.
-- 
-- This is false for invisible children, but also
-- for children that have their own surface, such
-- as t'GI.Gtk.Objects.Popover.Popover' instances.
widgetShouldLayout ::
    (B.CallStack.HasCallStack, MonadIO m, IsWidget a) =>
    a
    -- ^ /@widget@/: a widget
    -> m Bool
    -- ^ __Returns:__ true if child should be included in
    --   measuring and allocating
widgetShouldLayout :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsWidget a) =>
a -> m Bool
widgetShouldLayout a
widget = IO Bool -> m Bool
forall a. IO a -> m a
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
    widget' <- a -> IO (Ptr Widget)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
widget
    result <- gtk_widget_should_layout widget'
    let result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= CInt
0) CInt
result
    touchManagedPtr widget
    return result'

#if defined(ENABLE_OVERLOADING)
data WidgetShouldLayoutMethodInfo
instance (signature ~ (m Bool), MonadIO m, IsWidget a) => O.OverloadedMethod WidgetShouldLayoutMethodInfo a signature where
    overloadedMethod = widgetShouldLayout

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


#endif

-- method Widget::show
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "widget"
--           , argType = TInterface Name { namespace = "Gtk" , name = "Widget" }
--           , argCType = Just "GtkWidget*"
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a widget" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = 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 ()

{-# DEPRECATED widgetShow ["(Since version 4.10)","Use 'GI.Gtk.Objects.Widget.widgetSetVisible' instead"] #-}
-- | Flags a widget to be displayed.
-- 
-- Any widget that isn’t shown will not appear on the screen.
-- 
-- Remember that you have to show the containers containing a widget,
-- in addition to the widget itself, before it will appear onscreen.
-- 
-- When a toplevel widget is shown, it is immediately realized and
-- mapped; other shown widgets are realized and mapped when their
-- toplevel widget is realized and mapped.
widgetShow ::
    (B.CallStack.HasCallStack, MonadIO m, IsWidget a) =>
    a
    -- ^ /@widget@/: a widget
    -> m ()
widgetShow :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsWidget a) =>
a -> m ()
widgetShow a
widget = IO () -> m ()
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    widget' <- a -> IO (Ptr Widget)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
widget
    gtk_widget_show widget'
    touchManagedPtr widget
    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-gtk4-4.0.12/docs/GI-Gtk-Objects-Widget.html#v:widgetShow"
        })


#endif

-- method Widget::size_allocate
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "widget"
--           , argType = TInterface Name { namespace = "Gtk" , name = "Widget" }
--           , argCType = Just "GtkWidget*"
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a widget" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "allocation"
--           , argType =
--               TInterface Name { namespace = "Gdk" , name = "Rectangle" }
--           , argCType = Just "const GtkAllocation*"
--           , 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
--           , argCallbackUserData = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "baseline"
--           , argType = TBasicType TInt
--           , argCType = Just "int"
--           , 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
--           , argCallbackUserData = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "gtk_widget_size_allocate" gtk_widget_size_allocate :: 
    Ptr Widget ->                           -- widget : TInterface (Name {namespace = "Gtk", name = "Widget"})
    Ptr Gdk.Rectangle.Rectangle ->          -- allocation : TInterface (Name {namespace = "Gdk", name = "Rectangle"})
    Int32 ->                                -- baseline : TBasicType TInt
    IO ()

-- | Allocates widget with a transformation that translates
-- the origin to the position in /@allocation@/.
-- 
-- This is a simple form of 'GI.Gtk.Objects.Widget.widgetAllocate'.
widgetSizeAllocate ::
    (B.CallStack.HasCallStack, MonadIO m, IsWidget a) =>
    a
    -- ^ /@widget@/: a widget
    -> Gdk.Rectangle.Rectangle
    -- ^ /@allocation@/: position and size to be allocated to /@widget@/
    -> Int32
    -- ^ /@baseline@/: the baseline of the child, or -1
    -> m ()
widgetSizeAllocate :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsWidget a) =>
a -> Rectangle -> Int32 -> m ()
widgetSizeAllocate a
widget Rectangle
allocation Int32
baseline = IO () -> m ()
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    widget' <- a -> IO (Ptr Widget)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
widget
    allocation' <- unsafeManagedPtrGetPtr allocation
    gtk_widget_size_allocate widget' allocation' baseline
    touchManagedPtr widget
    touchManagedPtr allocation
    return ()

#if defined(ENABLE_OVERLOADING)
data WidgetSizeAllocateMethodInfo
instance (signature ~ (Gdk.Rectangle.Rectangle -> Int32 -> 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-gtk4-4.0.12/docs/GI-Gtk-Objects-Widget.html#v:widgetSizeAllocate"
        })


#endif

-- method Widget::snapshot_child
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "widget"
--           , argType = TInterface Name { namespace = "Gtk" , name = "Widget" }
--           , argCType = Just "GtkWidget*"
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a widget" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "child"
--           , argType = TInterface Name { namespace = "Gtk" , name = "Widget" }
--           , argCType = Just "GtkWidget*"
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a child of @widget" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "snapshot"
--           , argType =
--               TInterface Name { namespace = "Gtk" , name = "Snapshot" }
--           , argCType = Just "GtkSnapshot*"
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText =
--                     Just
--                       "snapshot as passed to the widget. In particular, no\n  calls to [method@Gtk.Snapshot.translate] or other transform calls\n  should have been made"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "gtk_widget_snapshot_child" gtk_widget_snapshot_child :: 
    Ptr Widget ->                           -- widget : TInterface (Name {namespace = "Gtk", name = "Widget"})
    Ptr Widget ->                           -- child : TInterface (Name {namespace = "Gtk", name = "Widget"})
    Ptr Gtk.Snapshot.Snapshot ->            -- snapshot : TInterface (Name {namespace = "Gtk", name = "Snapshot"})
    IO ()

-- | Snapshots a child of the widget.
-- 
-- When a widget receives a call to the snapshot function,
-- it must send synthetic t'GI.Gtk.Objects.Widget.Widget'.@/snapshot/@() calls
-- to all children. This function provides a convenient way
-- of doing this. A widget, when it receives a call to its
-- t'GI.Gtk.Objects.Widget.Widget'.@/snapshot/@() function, calls
-- 'GI.Gtk.Objects.Widget.widgetSnapshotChild' once for each child, passing in
-- the /@snapshot@/ the widget received.
-- 
-- This function takes care of translating the origin of /@snapshot@/,
-- and deciding whether the child needs to be snapshot.
-- 
-- It does nothing for children that implement @GtkNative@.
widgetSnapshotChild ::
    (B.CallStack.HasCallStack, MonadIO m, IsWidget a, IsWidget b, Gtk.Snapshot.IsSnapshot c) =>
    a
    -- ^ /@widget@/: a widget
    -> b
    -- ^ /@child@/: a child of /@widget@/
    -> c
    -- ^ /@snapshot@/: snapshot as passed to the widget. In particular, no
    --   calls to 'GI.Gtk.Objects.Snapshot.snapshotTranslate' or other transform calls
    --   should have been made
    -> m ()
widgetSnapshotChild :: forall (m :: * -> *) a b c.
(HasCallStack, MonadIO m, IsWidget a, IsWidget b, IsSnapshot c) =>
a -> b -> c -> m ()
widgetSnapshotChild a
widget b
child c
snapshot = IO () -> m ()
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    widget' <- a -> IO (Ptr Widget)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
widget
    child' <- unsafeManagedPtrCastPtr child
    snapshot' <- unsafeManagedPtrCastPtr snapshot
    gtk_widget_snapshot_child widget' child' snapshot'
    touchManagedPtr widget
    touchManagedPtr child
    touchManagedPtr snapshot
    return ()

#if defined(ENABLE_OVERLOADING)
data WidgetSnapshotChildMethodInfo
instance (signature ~ (b -> c -> m ()), MonadIO m, IsWidget a, IsWidget b, Gtk.Snapshot.IsSnapshot c) => O.OverloadedMethod WidgetSnapshotChildMethodInfo a signature where
    overloadedMethod = widgetSnapshotChild

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


#endif

-- method Widget::translate_coordinates
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "src_widget"
--           , argType = TInterface Name { namespace = "Gtk" , name = "Widget" }
--           , argCType = Just "GtkWidget*"
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a widget" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "dest_widget"
--           , argType = TInterface Name { namespace = "Gtk" , name = "Widget" }
--           , argCType = Just "GtkWidget*"
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "another widget" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "src_x"
--           , argType = TBasicType TDouble
--           , argCType = Just "double"
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText =
--                     Just "X position in widget coordinates of @src_widget"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "src_y"
--           , argType = TBasicType TDouble
--           , argCType = Just "double"
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText =
--                     Just "Y position in widget coordinates of @src_widget"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "dest_x"
--           , argType = TBasicType TDouble
--           , argCType = Just "double*"
--           , direction = DirectionOut
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText =
--                     Just
--                       "location to store X position in widget coordinates of @dest_widget"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = False
--           , transfer = TransferEverything
--           }
--       , Arg
--           { argCName = "dest_y"
--           , argType = TBasicType TDouble
--           , argCType = Just "double*"
--           , direction = DirectionOut
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText =
--                     Just
--                       "location to store Y position in widget coordinates of @dest_widget"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = 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"})
    CDouble ->                              -- src_x : TBasicType TDouble
    CDouble ->                              -- src_y : TBasicType TDouble
    Ptr CDouble ->                          -- dest_x : TBasicType TDouble
    Ptr CDouble ->                          -- dest_y : TBasicType TDouble
    IO CInt

{-# DEPRECATED widgetTranslateCoordinates ["(Since version 4.12)","Use 'GI.Gtk.Objects.Widget.widgetComputePoint' instead"] #-}
-- | Translates coordinates relative to /@srcWidget@/’s allocation
-- to coordinates relative to /@destWidget@/’s allocations.
-- 
-- In order to perform this operation, both widget must share
-- a common ancestor. If that is not the case, /@destX@/ and /@destY@/
-- are set to 0 and false is returned.
widgetTranslateCoordinates ::
    (B.CallStack.HasCallStack, MonadIO m, IsWidget a, IsWidget b) =>
    a
    -- ^ /@srcWidget@/: a widget
    -> b
    -- ^ /@destWidget@/: another widget
    -> Double
    -- ^ /@srcX@/: X position in widget coordinates of /@srcWidget@/
    -> Double
    -- ^ /@srcY@/: Y position in widget coordinates of /@srcWidget@/
    -> m ((Bool, Double, Double))
    -- ^ __Returns:__ true if /@srcWidget@/ and /@destWidget@/ have a common
    --   ancestor, false otherwise
widgetTranslateCoordinates :: forall (m :: * -> *) a b.
(HasCallStack, MonadIO m, IsWidget a, IsWidget b) =>
a -> b -> Double -> Double -> m (Bool, Double, Double)
widgetTranslateCoordinates a
srcWidget b
destWidget Double
srcX Double
srcY = IO (Bool, Double, Double) -> m (Bool, Double, Double)
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Bool, Double, Double) -> m (Bool, Double, Double))
-> IO (Bool, Double, Double) -> m (Bool, Double, Double)
forall a b. (a -> b) -> a -> b
$ do
    srcWidget' <- a -> IO (Ptr Widget)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
srcWidget
    destWidget' <- unsafeManagedPtrCastPtr destWidget
    let srcX' = Double -> CDouble
forall a b. (Real a, Fractional b) => a -> b
realToFrac Double
srcX
    let srcY' = Double -> CDouble
forall a b. (Real a, Fractional b) => a -> b
realToFrac Double
srcY
    destX <- allocMem :: IO (Ptr CDouble)
    destY <- allocMem :: IO (Ptr CDouble)
    result <- gtk_widget_translate_coordinates srcWidget' destWidget' srcX' srcY' destX destY
    let result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= CInt
0) CInt
result
    destX' <- peek destX
    let destX'' = CDouble -> Double
forall a b. (Real a, Fractional b) => a -> b
realToFrac CDouble
destX'
    destY' <- peek destY
    let destY'' = CDouble -> Double
forall a b. (Real a, Fractional b) => a -> b
realToFrac CDouble
destY'
    touchManagedPtr srcWidget
    touchManagedPtr destWidget
    freeMem destX
    freeMem destY
    return (result', destX'', destY'')

#if defined(ENABLE_OVERLOADING)
data WidgetTranslateCoordinatesMethodInfo
instance (signature ~ (b -> Double -> Double -> m ((Bool, Double, Double))), 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-gtk4-4.0.12/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" }
--           , argCType = Just "GtkWidget*"
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a widget" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = 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 of the widget.
widgetTriggerTooltipQuery ::
    (B.CallStack.HasCallStack, MonadIO m, IsWidget a) =>
    a
    -- ^ /@widget@/: a widget
    -> m ()
widgetTriggerTooltipQuery :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsWidget a) =>
a -> m ()
widgetTriggerTooltipQuery a
widget = IO () -> m ()
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    widget' <- a -> IO (Ptr Widget)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
widget
    gtk_widget_trigger_tooltip_query widget'
    touchManagedPtr widget
    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-gtk4-4.0.12/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" }
--           , argCType = Just "GtkWidget*"
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a widget" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = 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 ()

-- | Causes a widget to be unmapped if it’s currently mapped.
-- 
-- This function is only for use in widget implementations.
widgetUnmap ::
    (B.CallStack.HasCallStack, MonadIO m, IsWidget a) =>
    a
    -- ^ /@widget@/: a widget
    -> m ()
widgetUnmap :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsWidget a) =>
a -> m ()
widgetUnmap a
widget = IO () -> m ()
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    widget' <- a -> IO (Ptr Widget)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
widget
    gtk_widget_unmap widget'
    touchManagedPtr widget
    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-gtk4-4.0.12/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" }
--           , argCType = Just "GtkWidget*"
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a widget" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = 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 ()

-- | Removes /@widget@/ from its parent.
-- 
-- This function is only for use in widget implementations,
-- typically in dispose.
widgetUnparent ::
    (B.CallStack.HasCallStack, MonadIO m, IsWidget a) =>
    a
    -- ^ /@widget@/: a widget
    -> m ()
widgetUnparent :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsWidget a) =>
a -> m ()
widgetUnparent a
widget = IO () -> m ()
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    widget' <- a -> IO (Ptr Widget)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
widget
    gtk_widget_unparent widget'
    touchManagedPtr widget
    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-gtk4-4.0.12/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" }
--           , argCType = Just "GtkWidget*"
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a widget" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = 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 ()

-- | Causes a widget to be unrealized.
-- 
-- This frees all GDK resources associated with the widget.
-- 
-- This function is only useful in widget implementations.
widgetUnrealize ::
    (B.CallStack.HasCallStack, MonadIO m, IsWidget a) =>
    a
    -- ^ /@widget@/: a widget
    -> m ()
widgetUnrealize :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsWidget a) =>
a -> m ()
widgetUnrealize a
widget = IO () -> m ()
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    widget' <- a -> IO (Ptr Widget)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
widget
    gtk_widget_unrealize widget'
    touchManagedPtr widget
    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-gtk4-4.0.12/docs/GI-Gtk-Objects-Widget.html#v:widgetUnrealize"
        })


#endif

-- method Widget::unset_state_flags
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "widget"
--           , argType = TInterface Name { namespace = "Gtk" , name = "Widget" }
--           , argCType = Just "GtkWidget*"
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a widget" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "flags"
--           , argType =
--               TInterface Name { namespace = "Gtk" , name = "StateFlags" }
--           , argCType = Just "GtkStateFlags"
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "state flags to turn off"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = 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 ()

-- | Turns off flag values for the current widget state.
-- 
-- See 'GI.Gtk.Objects.Widget.widgetSetStateFlags'.
-- 
-- This function is for use in widget implementations.
widgetUnsetStateFlags ::
    (B.CallStack.HasCallStack, MonadIO m, IsWidget a) =>
    a
    -- ^ /@widget@/: a 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 a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    widget' <- a -> IO (Ptr Widget)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
widget
    let flags' = [StateFlags] -> CUInt
forall b a. (Num b, IsGFlag a) => [a] -> b
gflagsToWord [StateFlags]
flags
    gtk_widget_unset_state_flags widget' flags'
    touchManagedPtr widget
    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-gtk4-4.0.12/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 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 a. IO a -> m a
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
    result <- IO CUInt
gtk_widget_get_default_direction
    let 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
    return result'

#if defined(ENABLE_OVERLOADING)
#endif

-- method Widget::set_default_direction
-- method type : MemberFunction
-- Args: [ Arg
--           { argCName = "dir"
--           , argType =
--               TInterface Name { namespace = "Gtk" , name = "TextDirection" }
--           , argCType = Just "GtkTextDirection"
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText =
--                     Just
--                       "the new default direction, either [enum@Gtk.TextDirection.ltr]\n  or [enum@Gtk.TextDirection.rtl]"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = 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.
-- 
-- See 'GI.Gtk.Objects.Widget.widgetSetDirection'.
widgetSetDefaultDirection ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    Gtk.Enums.TextDirection
    -- ^ /@dir@/: the new default direction, either 'GI.Gtk.Enums.TextDirectionLtr'
    --   or 'GI.Gtk.Enums.TextDirectionRtl'
    -> m ()
widgetSetDefaultDirection :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
TextDirection -> m ()
widgetSetDefaultDirection TextDirection
dir = IO () -> m ()
forall a. IO a -> m a
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 a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return ()

#if defined(ENABLE_OVERLOADING)
#endif