{-# LINE 2 "./Graphics/UI/Gtk/Abstract/Widget.chs" #-}
module Graphics.UI.Gtk.Abstract.Widget (
Widget,
WidgetClass,
castToWidget, gTypeWidget,
toWidget,
EventMask(..),
ExtensionMode(..),
GType,
KeyVal,
Region,
Bitmap,
Requisition(..),
Rectangle(..),
Color,
IconSize(..),
StateType(..),
TextDirection(..),
AccelFlags(..),
DirectionType(..),
StockId,
WidgetHelpType(..),
Allocation,
widgetShow,
widgetShowNow,
widgetHide,
widgetShowAll,
widgetHideAll,
widgetDestroy,
widgetQueueDraw,
widgetQueueResize,
widgetQueueResizeNoRedraw,
widgetSizeRequest,
widgetGetChildRequisition,
widgetSizeAllocate,
widgetAddAccelerator,
widgetRemoveAccelerator,
widgetSetAccelPath,
widgetCanActivateAccel,
widgetActivate,
widgetIntersect,
widgetHasIntersection,
widgetGetIsFocus,
widgetGrabFocus,
widgetGrabDefault,
widgetSetName,
widgetGetName,
widgetSetSensitive,
widgetSetSensitivity,
widgetGetParentWindow,
widgetGetDrawWindow,
widgetDelEvents,
widgetAddEvents,
widgetGetEvents,
widgetSetEvents,
widgetSetExtensionEvents,
widgetGetExtensionEvents,
widgetGetToplevel,
widgetGetAncestor,
widgetGetColormap,
widgetSetColormap,
widgetGetPointer,
widgetIsAncestor,
widgetTranslateCoordinates,
widgetSetStyle,
widgetGetStyle,
widgetPushColormap,
widgetPopColormap,
widgetSetDefaultColormap,
widgetGetDefaultColormap,
widgetGetDefaultStyle,
widgetSetDirection,
widgetGetDirection,
widgetSetDefaultDirection,
widgetGetDefaultDirection,
widgetShapeCombineMask,
widgetInputShapeCombineMask,
{-# LINE 178 "./Graphics/UI/Gtk/Abstract/Widget.chs" #-}
widgetGetSnapshot,
widgetPath,
widgetClassPath,
widgetGetCompositeName,
widgetModifyStyle,
widgetGetModifierStyle,
widgetModifyFg,
widgetModifyBg,
widgetModifyText,
widgetModifyBase,
widgetModifyFont,
widgetRestoreFg,
widgetRestoreBg,
widgetRestoreText,
widgetRestoreBase,
widgetCreatePangoContext,
widgetGetPangoContext,
widgetCreateLayout,
widgetRenderIcon,
widgetQueueDrawArea,
widgetResetShapes,
widgetSetAppPaintable,
widgetSetDoubleBuffered,
widgetSetRedrawOnAllocate,
widgetSetCompositeName,
widgetMnemonicActivate,
widgetSetScrollAdjustments,
widgetRegionIntersect,
widgetGetAccessible,
widgetChildFocus,
widgetGetChildVisible,
widgetGetParent,
widgetGetSettings,
widgetGetClipboard,
widgetGetDisplay,
widgetGetRootWindow,
widgetGetScreen,
widgetHasScreen,
widgetGetSizeRequest,
widgetSetChildVisible,
widgetSetSizeRequest,
widgetSetNoShowAll,
widgetGetNoShowAll,
widgetListMnemonicLabels,
widgetAddMnemonicLabel,
widgetRemoveMnemonicLabel,
widgetGetAction,
widgetIsComposited,
widgetErrorBell,
widgetKeynavFailed,
widgetGetTooltipMarkup,
widgetSetTooltipMarkup,
widgetGetTooltipText,
widgetSetTooltipText,
widgetGetTooltipWindow,
widgetSetTooltipWindow,
widgetGetHasTooltip,
widgetSetHasTooltip,
widgetTriggerTooltipQuery,
widgetGetWindow,
{-# LINE 274 "./Graphics/UI/Gtk/Abstract/Widget.chs" #-}
widgetReparent,
widgetGetCanFocus,
widgetSetCanFocus,
widgetGetAllocation,
{-# LINE 292 "./Graphics/UI/Gtk/Abstract/Widget.chs" #-}
widgetGetAppPaintable,
widgetGetCanDefault,
widgetSetCanDefault,
widgetGetHasWindow,
widgetSetHasWindow,
widgetGetSensitive,
widgetIsSensitive,
widgetGetState,
widgetGetVisible,
{-# LINE 311 "./Graphics/UI/Gtk/Abstract/Widget.chs" #-}
widgetGetHasDefault,
widgetGetHasFocus,
widgetHasGrab,
widgetIsDrawable,
widgetIsToplevel,
widgetSetWindow,
widgetSetReceivesDefault,
widgetGetReceivesDefault,
{-# LINE 335 "./Graphics/UI/Gtk/Abstract/Widget.chs" #-}
widgetSetState,
widgetGetSavedState,
widgetGetSize,
widgetEvent,
{-# LINE 351 "./Graphics/UI/Gtk/Abstract/Widget.chs" #-}
widgetName,
widgetParent,
widgetWidthRequest,
widgetHeightRequest,
widgetMarginLeft,
widgetMarginRight,
widgetMarginTop,
widgetMarginBottom,
widgetVisible,
widgetOpacity,
widgetSensitive,
widgetAppPaintable,
widgetCanFocus,
widgetHasFocus,
widgetIsFocus,
widgetCanDefault,
widgetHasDefault,
widgetReceivesDefault,
widgetCompositeChild,
widgetStyle,
widgetState,
widgetEvents,
widgetExtensionEvents,
widgetExpand,
widgetHExpand,
widgetHExpandSet,
widgetVExpand,
widgetVExpandSet,
widgetNoShowAll,
widgetChildVisible,
widgetColormap,
widgetCompositeName,
widgetDirection,
widgetTooltipMarkup,
widgetTooltipText,
widgetHasTooltip,
widgetHasRcStyle,
widgetGetRealized,
widgetGetMapped,
widgetSetRealized,
widgetSetMapped,
realize,
unrealize,
mapSignal,
unmapSignal,
sizeRequest,
sizeAllocate,
showSignal,
hideSignal,
focus,
stateChanged,
parentSet,
hierarchyChanged,
styleSet,
directionChanged,
grabNotify,
popupMenuSignal,
showHelp,
accelClosuresChanged,
screenChanged,
queryTooltip,
buttonPressEvent,
buttonReleaseEvent,
configureEvent,
deleteEvent,
destroyEvent,
enterNotifyEvent,
exposeEvent,
focusInEvent,
focusOutEvent,
grabBrokenEvent,
keyPressEvent,
keyReleaseEvent,
leaveNotifyEvent,
mapEvent,
motionNotifyEvent,
noExposeEvent,
proximityInEvent,
proximityOutEvent,
scrollEvent,
unmapEvent,
visibilityNotifyEvent,
windowStateEvent,
onButtonPress,
afterButtonPress,
onButtonRelease,
afterButtonRelease,
onClient,
afterClient,
onConfigure,
afterConfigure,
onDelete,
afterDelete,
onDestroyEvent,
afterDestroyEvent,
onDirectionChanged,
afterDirectionChanged,
onEnterNotify,
afterEnterNotify,
onLeaveNotify,
afterLeaveNotify,
onExpose,
afterExpose,
onExposeRect,
afterExposeRect,
onFocus,
afterFocus,
onFocusIn,
afterFocusIn,
onFocusOut,
afterFocusOut,
onGrabFocus,
afterGrabFocus,
onDestroy,
afterDestroy,
onHide,
afterHide,
onHierarchyChanged,
afterHierarchyChanged,
onKeyPress,
afterKeyPress,
onKeyRelease,
afterKeyRelease,
onMnemonicActivate,
afterMnemonicActivate,
onMotionNotify,
afterMotionNotify,
onParentSet,
afterParentSet,
onPopupMenu,
afterPopupMenu,
onProximityIn,
afterProximityIn,
onProximityOut,
afterProximityOut,
onRealize,
afterRealize,
onScroll,
afterScroll,
onShow,
afterShow,
onSizeAllocate,
afterSizeAllocate,
onSizeRequest,
afterSizeRequest,
onStateChanged,
afterStateChanged,
onUnmap,
afterUnmap,
onUnrealize,
afterUnrealize,
onVisibilityNotify,
afterVisibilityNotify,
onWindowState,
afterWindowState
) where
import Control.Monad (liftM, unless)
import Data.Maybe (fromMaybe)
import Control.Monad.Reader (ask)
import Control.Monad.Trans (liftIO)
import System.Glib.FFI
import System.Glib.Flags (fromFlags, toFlags)
import System.Glib.UTFString
import System.Glib.Attributes
import System.Glib.Properties
import System.Glib.GType (GType)
import System.Glib.GList (fromGList)
import Graphics.UI.Gtk.Abstract.Object (makeNewObject)
import Graphics.UI.Gtk.General.DNDTypes (Atom (Atom), SelectionTag)
import Graphics.UI.Gtk.Types
{-# LINE 556 "./Graphics/UI/Gtk/Abstract/Widget.chs" #-}
import Graphics.UI.Gtk.Signals
{-# LINE 557 "./Graphics/UI/Gtk/Abstract/Widget.chs" #-}
import Graphics.UI.Gtk.Gdk.Enums (EventMask(..)
, ExtensionMode(..)
)
import Graphics.UI.Gtk.Gdk.Keys (KeyVal)
import Graphics.UI.Gtk.Gdk.Region (Region(..), makeNewRegion)
import Graphics.UI.Gtk.Gdk.Pixmap (Bitmap)
import Graphics.UI.Gtk.General.Structs (Allocation, Rectangle(..)
,Requisition(..), Color, IconSize(..)
,Point
,widgetGetSavedState
,widgetGetDrawWindow, widgetGetSize
)
import Graphics.UI.Gtk.Gdk.Events (Event(..), marshalEvent, marshExposeRect)
import Graphics.UI.Gtk.Gdk.EventM (EventM,
EventM,
EAny,
EKey,
EButton,
EScroll,
EMotion,
EExpose,
EVisibility,
ECrossing,
EFocus,
EConfigure,
EProperty,
EProximity,
EWindowState,
EGrabBroken,
)
import Graphics.UI.Gtk.General.Enums (StateType(..), TextDirection(..),
AccelFlags(..), DirectionType(..), Modifier
)
import Graphics.Rendering.Pango.Types
{-# LINE 610 "./Graphics/UI/Gtk/Abstract/Widget.chs" #-}
import Graphics.Rendering.Pango.BasicTypes (FontDescription(FontDescription),
PangoLayout(PangoLayout), makeNewPangoString )
import Graphics.UI.Gtk.General.StockItems (StockId)
import Data.IORef ( newIORef )
import Control.Monad.Reader ( runReaderT )
{-# LINE 621 "./Graphics/UI/Gtk/Abstract/Widget.chs" #-}
widgetShow :: WidgetClass self => self -> IO ()
widgetShow self =
(\(Widget arg1) -> withForeignPtr arg1 $ \argPtr1 ->gtk_widget_show argPtr1)
{-# LINE 640 "./Graphics/UI/Gtk/Abstract/Widget.chs" #-}
(toWidget self)
widgetShowNow :: WidgetClass self => self -> IO ()
widgetShowNow self =
(\(Widget arg1) -> withForeignPtr arg1 $ \argPtr1 ->gtk_widget_show_now argPtr1)
{-# LINE 650 "./Graphics/UI/Gtk/Abstract/Widget.chs" #-}
(toWidget self)
widgetHide :: WidgetClass self => self -> IO ()
widgetHide self =
(\(Widget arg1) -> withForeignPtr arg1 $ \argPtr1 ->gtk_widget_hide argPtr1)
{-# LINE 658 "./Graphics/UI/Gtk/Abstract/Widget.chs" #-}
(toWidget self)
widgetShowAll :: WidgetClass self => self -> IO ()
widgetShowAll self =
(\(Widget arg1) -> withForeignPtr arg1 $ \argPtr1 ->gtk_widget_show_all argPtr1)
{-# LINE 666 "./Graphics/UI/Gtk/Abstract/Widget.chs" #-}
(toWidget self)
widgetHideAll :: WidgetClass self => self -> IO ()
widgetHideAll self =
(\(Widget arg1) -> withForeignPtr arg1 $ \argPtr1 ->gtk_widget_hide_all argPtr1)
{-# LINE 675 "./Graphics/UI/Gtk/Abstract/Widget.chs" #-}
(toWidget self)
widgetDestroy :: WidgetClass self => self -> IO ()
widgetDestroy self =
(\(Widget arg1) -> withForeignPtr arg1 $ \argPtr1 ->gtk_widget_destroy argPtr1)
{-# LINE 694 "./Graphics/UI/Gtk/Abstract/Widget.chs" #-}
(toWidget self)
{-# LINE 726 "./Graphics/UI/Gtk/Abstract/Widget.chs" #-}
widgetQueueDraw :: WidgetClass self => self -> IO ()
widgetQueueDraw self =
(\(Widget arg1) -> withForeignPtr arg1 $ \argPtr1 ->gtk_widget_queue_draw argPtr1)
{-# LINE 735 "./Graphics/UI/Gtk/Abstract/Widget.chs" #-}
(toWidget self)
widgetQueueResize :: WidgetClass self => self -> IO ()
widgetQueueResize self =
(\(Widget arg1) -> withForeignPtr arg1 $ \argPtr1 ->gtk_widget_queue_resize argPtr1)
{-# LINE 747 "./Graphics/UI/Gtk/Abstract/Widget.chs" #-}
(toWidget self)
widgetQueueResizeNoRedraw :: WidgetClass self => self -> IO ()
widgetQueueResizeNoRedraw self =
(\(Widget arg1) -> withForeignPtr arg1 $ \argPtr1 ->gtk_widget_queue_resize_no_redraw argPtr1)
{-# LINE 758 "./Graphics/UI/Gtk/Abstract/Widget.chs" #-}
(toWidget self)
{-# LINE 803 "./Graphics/UI/Gtk/Abstract/Widget.chs" #-}
widgetSizeRequest :: WidgetClass self => self -> IO Requisition
widgetSizeRequest self = alloca $ \reqPtr -> do
(\(Widget arg1) arg2 -> withForeignPtr arg1 $ \argPtr1 ->gtk_widget_size_request argPtr1 arg2) (toWidget self) (castPtr reqPtr)
peek reqPtr
widgetGetChildRequisition :: WidgetClass self => self -> IO Requisition
widgetGetChildRequisition self = alloca $ \reqPtr -> do
(\(Widget arg1) arg2 -> withForeignPtr arg1 $ \argPtr1 ->gtk_widget_get_child_requisition argPtr1 arg2) (toWidget self) (castPtr reqPtr)
peek reqPtr
widgetSizeAllocate :: WidgetClass self => self
-> Allocation
-> IO ()
widgetSizeAllocate self rect = with rect $ \rectPtr ->
(\(Widget arg1) arg2 -> withForeignPtr arg1 $ \argPtr1 ->gtk_widget_size_allocate argPtr1 arg2) (toWidget self) (castPtr rectPtr)
{-# LINE 880 "./Graphics/UI/Gtk/Abstract/Widget.chs" #-}
widgetAddAccelerator :: (WidgetClass self, GlibString string) => self
-> string
-> AccelGroup
-> KeyVal
-> [Modifier]
-> [AccelFlags]
-> IO ()
widgetAddAccelerator self accelSignal accelGroup accelKey accelMods accelFlags =
withUTFString accelSignal $ \accelSignalPtr ->
(\(Widget arg1) arg2 (AccelGroup arg3) arg4 arg5 arg6 -> withForeignPtr arg1 $ \argPtr1 ->withForeignPtr arg3 $ \argPtr3 ->gtk_widget_add_accelerator argPtr1 arg2 argPtr3 arg4 arg5 arg6)
{-# LINE 903 "./Graphics/UI/Gtk/Abstract/Widget.chs" #-}
(toWidget self)
accelSignalPtr
accelGroup
(fromIntegral accelKey)
((fromIntegral . fromFlags) accelMods)
((fromIntegral . fromFlags) accelFlags)
widgetRemoveAccelerator :: WidgetClass self => self
-> AccelGroup
-> KeyVal
-> [Modifier]
-> IO Bool
widgetRemoveAccelerator self accelGroup accelKey accelMods =
liftM toBool $
(\(Widget arg1) (AccelGroup arg2) arg3 arg4 -> withForeignPtr arg1 $ \argPtr1 ->withForeignPtr arg2 $ \argPtr2 ->gtk_widget_remove_accelerator argPtr1 argPtr2 arg3 arg4)
{-# LINE 924 "./Graphics/UI/Gtk/Abstract/Widget.chs" #-}
(toWidget self)
accelGroup
(fromIntegral accelKey)
((fromIntegral . fromFlags) accelMods)
widgetSetAccelPath :: (WidgetClass self, GlibString string) => self
-> string
-> AccelGroup
-> IO ()
widgetSetAccelPath self accelPath accelGroup =
withUTFString accelPath $ \accelPathPtr ->
(\(Widget arg1) arg2 (AccelGroup arg3) -> withForeignPtr arg1 $ \argPtr1 ->withForeignPtr arg3 $ \argPtr3 ->gtk_widget_set_accel_path argPtr1 arg2 argPtr3)
{-# LINE 953 "./Graphics/UI/Gtk/Abstract/Widget.chs" #-}
(toWidget self)
accelPathPtr
accelGroup
widgetCanActivateAccel :: WidgetClass self =>
(ConnectId self)
-> IO Bool
widgetCanActivateAccel (ConnectId signalId self) =
liftM toBool $
(\(Widget arg1) arg2 -> withForeignPtr arg1 $ \argPtr1 ->gtk_widget_can_activate_accel argPtr1 arg2)
{-# LINE 974 "./Graphics/UI/Gtk/Abstract/Widget.chs" #-}
(toWidget self)
(fromIntegral signalId)
widgetActivate :: WidgetClass self => self
-> IO Bool
widgetActivate self =
liftM toBool $
(\(Widget arg1) -> withForeignPtr arg1 $ \argPtr1 ->gtk_widget_activate argPtr1)
{-# LINE 988 "./Graphics/UI/Gtk/Abstract/Widget.chs" #-}
(toWidget self)
widgetIntersect :: WidgetClass self => self
-> Rectangle
-> IO (Maybe Rectangle)
widgetIntersect self area =
with area $ \areaPtr ->
alloca $ \intersectionPtr -> do
hasIntersection <- (\(Widget arg1) arg2 arg3 -> withForeignPtr arg1 $ \argPtr1 ->gtk_widget_intersect argPtr1 arg2 arg3)
{-# LINE 1000 "./Graphics/UI/Gtk/Abstract/Widget.chs" #-}
(toWidget self)
(castPtr areaPtr)
(castPtr intersectionPtr)
if (toBool hasIntersection)
then liftM Just $ peek intersectionPtr
else return Nothing
widgetHasIntersection :: WidgetClass self => self
-> Rectangle
-> IO Bool
widgetHasIntersection self area =
liftM toBool $
with area $ \areaPtr ->
(\(Widget arg1) arg2 arg3 -> withForeignPtr arg1 $ \argPtr1 ->gtk_widget_intersect argPtr1 arg2 arg3)
{-# LINE 1016 "./Graphics/UI/Gtk/Abstract/Widget.chs" #-}
(toWidget self)
(castPtr areaPtr)
(castPtr nullPtr)
widgetGetIsFocus :: WidgetClass self => self
-> IO Bool
widgetGetIsFocus self =
liftM toBool $
(\(Widget arg1) -> withForeignPtr arg1 $ \argPtr1 ->gtk_widget_is_focus argPtr1)
{-# LINE 1031 "./Graphics/UI/Gtk/Abstract/Widget.chs" #-}
(toWidget self)
widgetGrabFocus :: WidgetClass self => self -> IO ()
widgetGrabFocus self =
(\(Widget arg1) -> withForeignPtr arg1 $ \argPtr1 ->gtk_widget_grab_focus argPtr1)
{-# LINE 1043 "./Graphics/UI/Gtk/Abstract/Widget.chs" #-}
(toWidget self)
widgetGrabDefault :: WidgetClass self => self -> IO ()
widgetGrabDefault self =
(\(Widget arg1) -> withForeignPtr arg1 $ \argPtr1 ->gtk_widget_grab_default argPtr1)
{-# LINE 1054 "./Graphics/UI/Gtk/Abstract/Widget.chs" #-}
(toWidget self)
widgetSetName :: (WidgetClass self, GlibString string) => self
-> string
-> IO ()
widgetSetName self name =
withUTFString name $ \namePtr ->
(\(Widget arg1) arg2 -> withForeignPtr arg1 $ \argPtr1 ->gtk_widget_set_name argPtr1 arg2)
{-# LINE 1070 "./Graphics/UI/Gtk/Abstract/Widget.chs" #-}
(toWidget self)
namePtr
widgetGetName :: (WidgetClass self, GlibString string) => self -> IO string
widgetGetName self =
(\(Widget arg1) -> withForeignPtr arg1 $ \argPtr1 ->gtk_widget_get_name argPtr1)
{-# LINE 1079 "./Graphics/UI/Gtk/Abstract/Widget.chs" #-}
(toWidget self)
>>= peekUTFString
widgetSetSensitive :: WidgetClass self => self
-> Bool
-> IO ()
widgetSetSensitive self sensitive =
(\(Widget arg1) arg2 -> withForeignPtr arg1 $ \argPtr1 ->gtk_widget_set_sensitive argPtr1 arg2)
{-# LINE 1093 "./Graphics/UI/Gtk/Abstract/Widget.chs" #-}
(toWidget self)
(fromBool sensitive)
widgetSetSensitivity :: WidgetClass self => self -> Bool -> IO ()
widgetSetSensitivity = widgetSetSensitive
widgetGetParentWindow :: WidgetClass self => self -> IO DrawWindow
widgetGetParentWindow self =
makeNewGObject mkDrawWindow $
(\(Widget arg1) -> withForeignPtr arg1 $ \argPtr1 ->gtk_widget_get_parent_window argPtr1)
{-# LINE 1106 "./Graphics/UI/Gtk/Abstract/Widget.chs" #-}
(toWidget self)
widgetDelEvents :: WidgetClass self => self -> [EventMask] -> IO ()
widgetDelEvents self events = do
mask <- (\(Widget arg1) -> withForeignPtr arg1 $ \argPtr1 ->gtk_widget_get_events argPtr1) (toWidget self)
let mask' = mask .&. (complement (fromIntegral $ fromFlags events))
(\(Widget arg1) arg2 -> withForeignPtr arg1 $ \argPtr1 ->gtk_widget_set_events argPtr1 arg2) (toWidget self) mask'
widgetAddEvents :: WidgetClass self => self -> [EventMask] -> IO ()
widgetAddEvents self [] = return ()
widgetAddEvents self events =
(\(Widget arg1) arg2 -> withForeignPtr arg1 $ \argPtr1 ->gtk_widget_add_events argPtr1 arg2)
{-# LINE 1134 "./Graphics/UI/Gtk/Abstract/Widget.chs" #-}
(toWidget self)
(fromIntegral $ fromFlags events)
widgetGetEvents :: WidgetClass self => self -> IO [EventMask]
widgetGetEvents self =
liftM (toFlags . fromIntegral) $
(\(Widget arg1) -> withForeignPtr arg1 $ \argPtr1 ->gtk_widget_get_events argPtr1)
{-# LINE 1145 "./Graphics/UI/Gtk/Abstract/Widget.chs" #-}
(toWidget self)
widgetSetEvents :: WidgetClass self => self
-> [EventMask]
-> IO ()
widgetSetEvents self events =
(\(Widget arg1) arg2 -> withForeignPtr arg1 $ \argPtr1 ->gtk_widget_set_events argPtr1 arg2)
{-# LINE 1163 "./Graphics/UI/Gtk/Abstract/Widget.chs" #-}
(toWidget self)
(fromIntegral $ fromFlags events)
widgetSetExtensionEvents :: WidgetClass self => self
-> [ExtensionMode]
-> IO ()
widgetSetExtensionEvents self mode =
(\(Widget arg1) arg2 -> withForeignPtr arg1 $ \argPtr1 ->gtk_widget_set_extension_events argPtr1 arg2)
{-# LINE 1176 "./Graphics/UI/Gtk/Abstract/Widget.chs" #-}
(toWidget self)
((fromIntegral . fromFlags) mode)
widgetGetExtensionEvents :: WidgetClass self => self
-> IO [ExtensionMode]
widgetGetExtensionEvents self =
liftM (toFlags . fromIntegral) $
(\(Widget arg1) -> withForeignPtr arg1 $ \argPtr1 ->gtk_widget_get_extension_events argPtr1)
{-# LINE 1188 "./Graphics/UI/Gtk/Abstract/Widget.chs" #-}
(toWidget self)
widgetGetToplevel :: WidgetClass self =>
self
-> IO Widget
widgetGetToplevel self =
makeNewObject mkWidget $
(\(Widget arg1) -> withForeignPtr arg1 $ \argPtr1 ->gtk_widget_get_toplevel argPtr1)
{-# LINE 1203 "./Graphics/UI/Gtk/Abstract/Widget.chs" #-}
(toWidget self)
widgetGetAncestor :: WidgetClass self => self
-> GType
-> IO (Maybe Widget)
widgetGetAncestor self widgetType = do
ptr <- (\(Widget arg1) arg2 -> withForeignPtr arg1 $ \argPtr1 ->gtk_widget_get_ancestor argPtr1 arg2)
{-# LINE 1219 "./Graphics/UI/Gtk/Abstract/Widget.chs" #-}
(toWidget self)
widgetType
if ptr==nullPtr then return Nothing else
liftM Just $ makeNewObject mkWidget (return ptr)
widgetGetColormap :: WidgetClass self => self
-> IO Colormap
widgetGetColormap self =
makeNewGObject mkColormap $
(\(Widget arg1) -> withForeignPtr arg1 $ \argPtr1 ->gtk_widget_get_colormap argPtr1)
{-# LINE 1233 "./Graphics/UI/Gtk/Abstract/Widget.chs" #-}
(toWidget self)
widgetSetColormap :: WidgetClass self => self
-> Colormap
-> IO ()
widgetSetColormap self colormap =
(\(Widget arg1) (Colormap arg2) -> withForeignPtr arg1 $ \argPtr1 ->withForeignPtr arg2 $ \argPtr2 ->gtk_widget_set_colormap argPtr1 argPtr2)
{-# LINE 1245 "./Graphics/UI/Gtk/Abstract/Widget.chs" #-}
(toWidget self)
colormap
widgetGetPointer :: WidgetClass self => self
-> IO (Int, Int)
widgetGetPointer self =
alloca $ \xPtr ->
alloca $ \yPtr ->
(\(Widget arg1) arg2 arg3 -> withForeignPtr arg1 $ \argPtr1 ->gtk_widget_get_pointer argPtr1 arg2 arg3)
{-# LINE 1262 "./Graphics/UI/Gtk/Abstract/Widget.chs" #-}
(toWidget self)
xPtr
yPtr
>>
peek xPtr >>= \x ->
peek yPtr >>= \y ->
return (fromIntegral x, fromIntegral y)
widgetIsAncestor :: (WidgetClass self, WidgetClass ancestor) =>
self
-> ancestor
-> IO Bool
widgetIsAncestor self ancestor =
liftM toBool $
(\(Widget arg1) (Widget arg2) -> withForeignPtr arg1 $ \argPtr1 ->withForeignPtr arg2 $ \argPtr2 ->gtk_widget_is_ancestor argPtr1 argPtr2)
{-# LINE 1282 "./Graphics/UI/Gtk/Abstract/Widget.chs" #-}
(toWidget self)
(toWidget ancestor)
widgetTranslateCoordinates :: (WidgetClass self, WidgetClass destWidget) =>
self
-> destWidget
-> Int
-> Int
-> IO (Maybe (Int, Int))
widgetTranslateCoordinates self destWidget srcX srcY =
alloca $ \destXPtr ->
alloca $ \destYPtr -> do
worked <- (\(Widget arg1) (Widget arg2) arg3 arg4 arg5 arg6 -> withForeignPtr arg1 $ \argPtr1 ->withForeignPtr arg2 $ \argPtr2 ->gtk_widget_translate_coordinates argPtr1 argPtr2 arg3 arg4 arg5 arg6)
{-# LINE 1303 "./Graphics/UI/Gtk/Abstract/Widget.chs" #-}
(toWidget self)
(toWidget destWidget)
(fromIntegral srcX)
(fromIntegral srcY)
destXPtr
destYPtr
if (toBool worked)
then do destX <- peek destXPtr
destY <- peek destYPtr
return (Just (fromIntegral destX, fromIntegral destY))
else return Nothing
widgetSetStyle :: WidgetClass self => self
-> Maybe Style
-> IO ()
widgetSetStyle self style =
(\(Widget arg1) (Style arg2) -> withForeignPtr arg1 $ \argPtr1 ->withForeignPtr arg2 $ \argPtr2 ->gtk_widget_set_style argPtr1 argPtr2)
{-# LINE 1326 "./Graphics/UI/Gtk/Abstract/Widget.chs" #-}
(toWidget self)
(fromMaybe (Style nullForeignPtr) style)
widgetGetStyle :: WidgetClass widget => widget -> IO Style
widgetGetStyle widget = do
(\(Widget arg1) -> withForeignPtr arg1 $ \argPtr1 ->gtk_widget_ensure_style argPtr1) (toWidget widget)
makeNewGObject mkStyle $ (\(Widget arg1) -> withForeignPtr arg1 $ \argPtr1 ->gtk_widget_get_style argPtr1) (toWidget widget)
widgetPushColormap ::
Colormap
-> IO ()
widgetPushColormap cmap =
(\(Colormap arg1) -> withForeignPtr arg1 $ \argPtr1 ->gtk_widget_push_colormap argPtr1)
{-# LINE 1347 "./Graphics/UI/Gtk/Abstract/Widget.chs" #-}
cmap
widgetPopColormap :: IO ()
widgetPopColormap =
gtk_widget_pop_colormap
{-# LINE 1355 "./Graphics/UI/Gtk/Abstract/Widget.chs" #-}
widgetSetDefaultColormap ::
Colormap
-> IO ()
widgetSetDefaultColormap colormap =
(\(Colormap arg1) -> withForeignPtr arg1 $ \argPtr1 ->gtk_widget_set_default_colormap argPtr1)
{-# LINE 1366 "./Graphics/UI/Gtk/Abstract/Widget.chs" #-}
colormap
widgetGetDefaultStyle ::
IO Style
widgetGetDefaultStyle =
makeNewGObject mkStyle $
gtk_widget_get_default_style
{-# LINE 1378 "./Graphics/UI/Gtk/Abstract/Widget.chs" #-}
widgetGetDefaultColormap ::
IO Colormap
widgetGetDefaultColormap =
makeNewGObject mkColormap $
gtk_widget_get_default_colormap
{-# LINE 1388 "./Graphics/UI/Gtk/Abstract/Widget.chs" #-}
widgetSetDirection :: WidgetClass self => self -> TextDirection -> IO ()
widgetSetDirection self dir =
(\(Widget arg1) arg2 -> withForeignPtr arg1 $ \argPtr1 ->gtk_widget_set_direction argPtr1 arg2)
{-# LINE 1405 "./Graphics/UI/Gtk/Abstract/Widget.chs" #-}
(toWidget self)
((fromIntegral . fromEnum) dir)
widgetGetDirection :: WidgetClass self => self -> IO TextDirection
widgetGetDirection self =
liftM (toEnum . fromIntegral) $
(\(Widget arg1) -> withForeignPtr arg1 $ \argPtr1 ->gtk_widget_get_direction argPtr1)
{-# LINE 1415 "./Graphics/UI/Gtk/Abstract/Widget.chs" #-}
(toWidget self)
widgetSetDefaultDirection ::
TextDirection
-> IO ()
widgetSetDefaultDirection dir =
gtk_widget_set_default_direction
{-# LINE 1427 "./Graphics/UI/Gtk/Abstract/Widget.chs" #-}
((fromIntegral . fromEnum) dir)
widgetGetDefaultDirection :: IO TextDirection
widgetGetDefaultDirection =
liftM (toEnum . fromIntegral) $
gtk_widget_get_default_direction
{-# LINE 1436 "./Graphics/UI/Gtk/Abstract/Widget.chs" #-}
widgetShapeCombineMask :: WidgetClass self => self
-> Maybe Bitmap
-> Int
-> Int
-> IO ()
widgetShapeCombineMask self shapeMask offsetX offsetY =
case (fromMaybe (Pixmap nullForeignPtr) shapeMask) of
Pixmap fPtr -> withForeignPtr fPtr $ \bitmapPtr ->
(\(Widget arg1) arg2 arg3 arg4 -> withForeignPtr arg1 $ \argPtr1 ->gtk_widget_shape_combine_mask argPtr1 arg2 arg3 arg4)
{-# LINE 1452 "./Graphics/UI/Gtk/Abstract/Widget.chs" #-}
(toWidget self)
(castPtr bitmapPtr)
(fromIntegral offsetX)
(fromIntegral offsetY)
widgetInputShapeCombineMask :: WidgetClass self => self
-> Maybe Bitmap
-> Int
-> Int
-> IO ()
widgetInputShapeCombineMask self shapeMask offsetX offsetY =
case (fromMaybe (Pixmap nullForeignPtr) shapeMask) of
Pixmap fPtr -> withForeignPtr fPtr $ \bitmapPtr ->
(\(Widget arg1) arg2 arg3 arg4 -> withForeignPtr arg1 $ \argPtr1 ->gtk_widget_input_shape_combine_mask argPtr1 arg2 arg3 arg4)
{-# LINE 1477 "./Graphics/UI/Gtk/Abstract/Widget.chs" #-}
(toWidget self)
(castPtr bitmapPtr)
(fromIntegral offsetX)
(fromIntegral offsetY)
{-# LINE 1511 "./Graphics/UI/Gtk/Abstract/Widget.chs" #-}
widgetGetSnapshot :: WidgetClass self => self
-> Rectangle
-> IO (Maybe Pixmap)
widgetGetSnapshot widget clipRect =
maybeNull (wrapNewGObject mkPixmap) $
with clipRect $ \ clipRectPtr ->
(\(Widget arg1) arg2 -> withForeignPtr arg1 $ \argPtr1 ->gtk_widget_get_snapshot argPtr1 arg2)
{-# LINE 1538 "./Graphics/UI/Gtk/Abstract/Widget.chs" #-}
(toWidget widget)
(castPtr clipRectPtr)
widgetPath :: (WidgetClass self, GlibString string) => self
-> IO (Int, string, string)
widgetPath self =
alloca $ \pathLengthPtr ->
alloca $ \pathPtr ->
alloca $ \pathReversedPtr ->
(\(Widget arg1) arg2 arg3 arg4 -> withForeignPtr arg1 $ \argPtr1 ->gtk_widget_path argPtr1 arg2 arg3 arg4)
{-# LINE 1564 "./Graphics/UI/Gtk/Abstract/Widget.chs" #-}
(toWidget self)
pathLengthPtr
pathPtr
pathReversedPtr
>>
peek pathLengthPtr >>= \pathLength ->
peek pathPtr >>= readUTFString >>= \path ->
peek pathReversedPtr >>= readUTFString >>= \pathReversed ->
return (fromIntegral pathLength, path, pathReversed)
widgetClassPath :: (WidgetClass self, GlibString string) => self
-> IO (Int, string, string)
widgetClassPath self =
alloca $ \pathLengthPtr ->
alloca $ \pathPtr ->
alloca $ \pathReversedPtr ->
(\(Widget arg1) arg2 arg3 arg4 -> withForeignPtr arg1 $ \argPtr1 ->gtk_widget_class_path argPtr1 arg2 arg3 arg4)
{-# LINE 1587 "./Graphics/UI/Gtk/Abstract/Widget.chs" #-}
(toWidget self)
pathLengthPtr
pathPtr
pathReversedPtr
>>
peek pathLengthPtr >>= \pathLength ->
peek pathPtr >>= readUTFString >>= \path ->
peek pathReversedPtr >>= readUTFString >>= \pathReversed ->
return (fromIntegral pathLength, path, pathReversed)
widgetGetCompositeName :: (WidgetClass self, GlibString string) => self
-> IO (Maybe string)
widgetGetCompositeName self =
(\(Widget arg1) -> withForeignPtr arg1 $ \argPtr1 ->gtk_widget_get_composite_name argPtr1)
{-# LINE 1605 "./Graphics/UI/Gtk/Abstract/Widget.chs" #-}
(toWidget self)
>>= maybePeek peekUTFString
{-# LINE 1707 "./Graphics/UI/Gtk/Abstract/Widget.chs" #-}
widgetModifyStyle :: (WidgetClass self, RcStyleClass style) => self
-> style
-> IO ()
widgetModifyStyle self style =
(\(Widget arg1) (RcStyle arg2) -> withForeignPtr arg1 $ \argPtr1 ->withForeignPtr arg2 $ \argPtr2 ->gtk_widget_modify_style argPtr1 argPtr2)
{-# LINE 1728 "./Graphics/UI/Gtk/Abstract/Widget.chs" #-}
(toWidget self)
(toRcStyle style)
widgetGetModifierStyle :: WidgetClass self => self -> IO RcStyle
widgetGetModifierStyle self =
makeNewGObject mkRcStyle $
(\(Widget arg1) -> withForeignPtr arg1 $ \argPtr1 ->gtk_widget_get_modifier_style argPtr1)
{-# LINE 1748 "./Graphics/UI/Gtk/Abstract/Widget.chs" #-}
(toWidget self)
widgetModifyFg :: WidgetClass self => self
-> StateType
-> Color
-> IO ()
widgetModifyFg self state color =
with color $ \colorPtr ->
(\(Widget arg1) arg2 arg3 -> withForeignPtr arg1 $ \argPtr1 ->gtk_widget_modify_fg argPtr1 arg2 arg3)
{-# LINE 1762 "./Graphics/UI/Gtk/Abstract/Widget.chs" #-}
(toWidget self)
((fromIntegral . fromEnum) state)
(castPtr colorPtr)
widgetRestoreFg :: WidgetClass self => self
-> StateType
-> IO ()
widgetRestoreFg self state =
(\(Widget arg1) arg2 arg3 -> withForeignPtr arg1 $ \argPtr1 ->gtk_widget_modify_fg argPtr1 arg2 arg3)
{-# LINE 1774 "./Graphics/UI/Gtk/Abstract/Widget.chs" #-}
(toWidget self)
((fromIntegral . fromEnum) state)
nullPtr
widgetModifyBg :: WidgetClass self => self
-> StateType
-> Color
-> IO ()
widgetModifyBg self state color =
with color $ \colorPtr ->
(\(Widget arg1) arg2 arg3 -> withForeignPtr arg1 $ \argPtr1 ->gtk_widget_modify_bg argPtr1 arg2 arg3)
{-# LINE 1797 "./Graphics/UI/Gtk/Abstract/Widget.chs" #-}
(toWidget self)
((fromIntegral . fromEnum) state)
(castPtr colorPtr)
widgetRestoreBg :: WidgetClass self => self
-> StateType
-> IO ()
widgetRestoreBg self state =
(\(Widget arg1) arg2 arg3 -> withForeignPtr arg1 $ \argPtr1 ->gtk_widget_modify_bg argPtr1 arg2 arg3)
{-# LINE 1809 "./Graphics/UI/Gtk/Abstract/Widget.chs" #-}
(toWidget self)
((fromIntegral . fromEnum) state)
nullPtr
widgetModifyText :: WidgetClass self => self
-> StateType
-> Color
-> IO ()
widgetModifyText self state color =
with color $ \colorPtr ->
(\(Widget arg1) arg2 arg3 -> withForeignPtr arg1 $ \argPtr1 ->gtk_widget_modify_text argPtr1 arg2 arg3)
{-# LINE 1827 "./Graphics/UI/Gtk/Abstract/Widget.chs" #-}
(toWidget self)
((fromIntegral . fromEnum) state)
(castPtr colorPtr)
widgetRestoreText :: WidgetClass self => self
-> StateType
-> IO ()
widgetRestoreText self state =
(\(Widget arg1) arg2 arg3 -> withForeignPtr arg1 $ \argPtr1 ->gtk_widget_modify_text argPtr1 arg2 arg3)
{-# LINE 1839 "./Graphics/UI/Gtk/Abstract/Widget.chs" #-}
(toWidget self)
((fromIntegral . fromEnum) state)
nullPtr
widgetModifyBase :: WidgetClass self => self
-> StateType
-> Color
-> IO ()
widgetModifyBase self state color =
with color $ \colorPtr ->
(\(Widget arg1) arg2 arg3 -> withForeignPtr arg1 $ \argPtr1 ->gtk_widget_modify_base argPtr1 arg2 arg3)
{-# LINE 1864 "./Graphics/UI/Gtk/Abstract/Widget.chs" #-}
(toWidget self)
((fromIntegral . fromEnum) state)
(castPtr colorPtr)
widgetRestoreBase :: WidgetClass self => self
-> StateType
-> IO ()
widgetRestoreBase self state =
(\(Widget arg1) arg2 arg3 -> withForeignPtr arg1 $ \argPtr1 ->gtk_widget_modify_base argPtr1 arg2 arg3)
{-# LINE 1876 "./Graphics/UI/Gtk/Abstract/Widget.chs" #-}
(toWidget self)
((fromIntegral . fromEnum) state)
nullPtr
widgetModifyFont :: WidgetClass self => self
-> Maybe FontDescription
-> IO ()
widgetModifyFont self fontDesc =
(\(Widget arg1) (FontDescription arg2) -> withForeignPtr arg1 $ \argPtr1 ->withForeignPtr arg2 $ \argPtr2 ->gtk_widget_modify_font argPtr1 argPtr2)
{-# LINE 1892 "./Graphics/UI/Gtk/Abstract/Widget.chs" #-}
(toWidget self)
(fromMaybe (FontDescription nullForeignPtr) fontDesc)
widgetCreatePangoContext :: WidgetClass self => self
-> IO PangoContext
widgetCreatePangoContext self =
wrapNewGObject mkPangoContext $
(\(Widget arg1) -> withForeignPtr arg1 $ \argPtr1 ->gtk_widget_create_pango_context argPtr1)
{-# LINE 1904 "./Graphics/UI/Gtk/Abstract/Widget.chs" #-}
(toWidget self)
widgetGetPangoContext :: WidgetClass self => self
-> IO PangoContext
widgetGetPangoContext self =
makeNewGObject mkPangoContext $
(\(Widget arg1) -> withForeignPtr arg1 $ \argPtr1 ->gtk_widget_get_pango_context argPtr1)
{-# LINE 1924 "./Graphics/UI/Gtk/Abstract/Widget.chs" #-}
(toWidget self)
widgetCreateLayout :: (WidgetClass self, GlibString string) => self
-> string
-> IO PangoLayout
widgetCreateLayout self text = do
pl <- wrapNewGObject mkPangoLayoutRaw $
withUTFString text $ \textPtr ->
(\(Widget arg1) arg2 -> withForeignPtr arg1 $ \argPtr1 ->gtk_widget_create_pango_layout argPtr1 arg2)
{-# LINE 1950 "./Graphics/UI/Gtk/Abstract/Widget.chs" #-}
(toWidget self)
textPtr
ps <- makeNewPangoString text
psRef <- newIORef ps
return (PangoLayout psRef pl)
widgetRenderIcon :: (WidgetClass self, GlibString string) => self
-> string
-> IconSize
-> string
-> IO (Maybe Pixbuf)
widgetRenderIcon self stockId size detail =
maybeNull (wrapNewGObject mkPixbuf) $
withUTFString detail $ \detailPtr ->
withUTFString stockId $ \stockIdPtr ->
(\(Widget arg1) arg2 arg3 arg4 -> withForeignPtr arg1 $ \argPtr1 ->gtk_widget_render_icon argPtr1 arg2 arg3 arg4)
{-# LINE 1982 "./Graphics/UI/Gtk/Abstract/Widget.chs" #-}
(toWidget self)
stockIdPtr
((fromIntegral . fromEnum) size)
detailPtr
widgetQueueDrawArea :: WidgetClass self => self
-> Int
-> Int
-> Int
-> Int
-> IO ()
widgetQueueDrawArea self x y width height =
(\(Widget arg1) arg2 arg3 arg4 arg5 -> withForeignPtr arg1 $ \argPtr1 ->gtk_widget_queue_draw_area argPtr1 arg2 arg3 arg4 arg5)
{-# LINE 2020 "./Graphics/UI/Gtk/Abstract/Widget.chs" #-}
(toWidget self)
(fromIntegral x)
(fromIntegral y)
(fromIntegral width)
(fromIntegral height)
{-# LINE 2047 "./Graphics/UI/Gtk/Abstract/Widget.chs" #-}
widgetResetShapes :: WidgetClass self => self -> IO ()
widgetResetShapes self =
(\(Widget arg1) -> withForeignPtr arg1 $ \argPtr1 ->gtk_widget_reset_shapes argPtr1)
{-# LINE 2053 "./Graphics/UI/Gtk/Abstract/Widget.chs" #-}
(toWidget self)
widgetSetAppPaintable :: WidgetClass self => self
-> Bool
-> IO ()
widgetSetAppPaintable self appPaintable =
(\(Widget arg1) arg2 -> withForeignPtr arg1 $ \argPtr1 ->gtk_widget_set_app_paintable argPtr1 arg2)
{-# LINE 2072 "./Graphics/UI/Gtk/Abstract/Widget.chs" #-}
(toWidget self)
(fromBool appPaintable)
widgetSetDoubleBuffered :: WidgetClass self => self
-> Bool
-> IO ()
widgetSetDoubleBuffered self doubleBuffered =
(\(Widget arg1) arg2 -> withForeignPtr arg1 $ \argPtr1 ->gtk_widget_set_double_buffered argPtr1 arg2)
{-# LINE 2102 "./Graphics/UI/Gtk/Abstract/Widget.chs" #-}
(toWidget self)
(fromBool doubleBuffered)
widgetSetRedrawOnAllocate :: WidgetClass self => self
-> Bool
-> IO ()
widgetSetRedrawOnAllocate self redrawOnAllocate =
(\(Widget arg1) arg2 -> withForeignPtr arg1 $ \argPtr1 ->gtk_widget_set_redraw_on_allocate argPtr1 arg2)
{-# LINE 2127 "./Graphics/UI/Gtk/Abstract/Widget.chs" #-}
(toWidget self)
(fromBool redrawOnAllocate)
widgetSetCompositeName :: (WidgetClass self, GlibString string) => self
-> string
-> IO ()
widgetSetCompositeName self name =
withUTFString name $ \namePtr ->
(\(Widget arg1) arg2 -> withForeignPtr arg1 $ \argPtr1 ->gtk_widget_set_composite_name argPtr1 arg2)
{-# LINE 2140 "./Graphics/UI/Gtk/Abstract/Widget.chs" #-}
(toWidget self)
namePtr
widgetMnemonicActivate :: WidgetClass self => self
-> Bool
-> IO Bool
widgetMnemonicActivate self groupCycling =
liftM toBool $
(\(Widget arg1) arg2 -> withForeignPtr arg1 $ \argPtr1 ->gtk_widget_mnemonic_activate argPtr1 arg2)
{-# LINE 2153 "./Graphics/UI/Gtk/Abstract/Widget.chs" #-}
(toWidget self)
(fromBool groupCycling)
widgetSetScrollAdjustments :: WidgetClass self => self
-> Maybe Adjustment
-> Maybe Adjustment
-> IO Bool
widgetSetScrollAdjustments self hadjustment vadjustment =
liftM toBool $
(\(Widget arg1) (Adjustment arg2) (Adjustment arg3) -> withForeignPtr arg1 $ \argPtr1 ->withForeignPtr arg2 $ \argPtr2 ->withForeignPtr arg3 $ \argPtr3 ->gtk_widget_set_scroll_adjustments argPtr1 argPtr2 argPtr3)
{-# LINE 2173 "./Graphics/UI/Gtk/Abstract/Widget.chs" #-}
(toWidget self)
(fromMaybe (Adjustment nullForeignPtr) hadjustment)
(fromMaybe (Adjustment nullForeignPtr) vadjustment)
widgetRegionIntersect :: WidgetClass self => self
-> Region
-> IO Region
widgetRegionIntersect self region = do
intersectionPtr <- (\(Widget arg1) (Region arg2) -> withForeignPtr arg1 $ \argPtr1 ->withForeignPtr arg2 $ \argPtr2 ->gtk_widget_region_intersect argPtr1 argPtr2)
{-# LINE 2196 "./Graphics/UI/Gtk/Abstract/Widget.chs" #-}
(toWidget self)
region
makeNewRegion intersectionPtr
widgetGetAccessible :: WidgetClass self => self
-> IO Object
widgetGetAccessible self =
makeNewGObject mkObject $
liftM castPtr $
(\(Widget arg1) -> withForeignPtr arg1 $ \argPtr1 ->gtk_widget_get_accessible argPtr1)
{-# LINE 2230 "./Graphics/UI/Gtk/Abstract/Widget.chs" #-}
(toWidget self)
widgetChildFocus :: WidgetClass self => self
-> DirectionType
-> IO Bool
widgetChildFocus self direction =
liftM toBool $
(\(Widget arg1) arg2 -> withForeignPtr arg1 $ \argPtr1 ->gtk_widget_child_focus argPtr1 arg2)
{-# LINE 2251 "./Graphics/UI/Gtk/Abstract/Widget.chs" #-}
(toWidget self)
((fromIntegral . fromEnum) direction)
widgetGetChildVisible :: WidgetClass self => self
-> IO Bool
widgetGetChildVisible self =
liftM toBool $
(\(Widget arg1) -> withForeignPtr arg1 $ \argPtr1 ->gtk_widget_get_child_visible argPtr1)
{-# LINE 2266 "./Graphics/UI/Gtk/Abstract/Widget.chs" #-}
(toWidget self)
widgetGetParent :: WidgetClass self => self
-> IO (Maybe Widget)
widgetGetParent self = do
parentPtr <- (\(Widget arg1) -> withForeignPtr arg1 $ \argPtr1 ->gtk_widget_get_parent argPtr1) (toWidget self)
if parentPtr==nullPtr then return Nothing else
liftM Just $ makeNewObject mkWidget (return parentPtr)
widgetGetSettings :: WidgetClass self => self
-> IO Settings
widgetGetSettings self =
makeNewGObject mkSettings $
(\(Widget arg1) -> withForeignPtr arg1 $ \argPtr1 ->gtk_widget_get_settings argPtr1)
{-# LINE 2293 "./Graphics/UI/Gtk/Abstract/Widget.chs" #-}
(toWidget self)
widgetGetClipboard :: WidgetClass self => self
-> SelectionTag
-> IO Clipboard
widgetGetClipboard self (Atom tagPtr) =
makeNewGObject mkClipboard $
(\(Widget arg1) arg2 -> withForeignPtr arg1 $ \argPtr1 ->gtk_widget_get_clipboard argPtr1 arg2)
{-# LINE 2313 "./Graphics/UI/Gtk/Abstract/Widget.chs" #-}
(toWidget self)
tagPtr
widgetGetDisplay :: WidgetClass self => self
-> IO Display
widgetGetDisplay self =
makeNewGObject mkDisplay $
(\(Widget arg1) -> withForeignPtr arg1 $ \argPtr1 ->gtk_widget_get_display argPtr1)
{-# LINE 2332 "./Graphics/UI/Gtk/Abstract/Widget.chs" #-}
(toWidget self)
widgetGetRootWindow :: WidgetClass self => self
-> IO DrawWindow
widgetGetRootWindow self =
makeNewGObject mkDrawWindow $
(\(Widget arg1) -> withForeignPtr arg1 $ \argPtr1 ->gtk_widget_get_root_window argPtr1)
{-# LINE 2352 "./Graphics/UI/Gtk/Abstract/Widget.chs" #-}
(toWidget self)
widgetGetScreen :: WidgetClass self => self
-> IO Screen
widgetGetScreen self =
makeNewGObject mkScreen $
(\(Widget arg1) -> withForeignPtr arg1 $ \argPtr1 ->gtk_widget_get_screen argPtr1)
{-# LINE 2370 "./Graphics/UI/Gtk/Abstract/Widget.chs" #-}
(toWidget self)
widgetHasScreen :: WidgetClass self => self
-> IO Bool
widgetHasScreen self =
liftM toBool $
(\(Widget arg1) -> withForeignPtr arg1 $ \argPtr1 ->gtk_widget_has_screen argPtr1)
{-# LINE 2385 "./Graphics/UI/Gtk/Abstract/Widget.chs" #-}
(toWidget self)
widgetGetSizeRequest :: WidgetClass self => self
-> IO (Int, Int)
widgetGetSizeRequest self =
alloca $ \widthPtr ->
alloca $ \heightPtr -> do
(\(Widget arg1) arg2 arg3 -> withForeignPtr arg1 $ \argPtr1 ->gtk_widget_get_size_request argPtr1 arg2 arg3)
{-# LINE 2402 "./Graphics/UI/Gtk/Abstract/Widget.chs" #-}
(toWidget self)
widthPtr
heightPtr
width <- peek widthPtr
height <- peek heightPtr
return (fromIntegral width, fromIntegral height)
widgetSetChildVisible :: WidgetClass self => self
-> Bool
-> IO ()
widgetSetChildVisible self isVisible =
(\(Widget arg1) arg2 -> withForeignPtr arg1 $ \argPtr1 ->gtk_widget_set_child_visible argPtr1 arg2)
{-# LINE 2432 "./Graphics/UI/Gtk/Abstract/Widget.chs" #-}
(toWidget self)
(fromBool isVisible)
widgetSetSizeRequest :: WidgetClass self => self
-> Int
-> Int
-> IO ()
widgetSetSizeRequest self width height =
(\(Widget arg1) arg2 arg3 -> withForeignPtr arg1 $ \argPtr1 ->gtk_widget_set_size_request argPtr1 arg2 arg3)
{-# LINE 2469 "./Graphics/UI/Gtk/Abstract/Widget.chs" #-}
(toWidget self)
(fromIntegral width)
(fromIntegral height)
widgetSetNoShowAll :: WidgetClass self => self
-> Bool
-> IO ()
widgetSetNoShowAll self noShowAll =
(\(Widget arg1) arg2 -> withForeignPtr arg1 $ \argPtr1 ->gtk_widget_set_no_show_all argPtr1 arg2)
{-# LINE 2488 "./Graphics/UI/Gtk/Abstract/Widget.chs" #-}
(toWidget self)
(fromBool noShowAll)
widgetGetNoShowAll :: WidgetClass self => self
-> IO Bool
widgetGetNoShowAll self =
liftM toBool $
(\(Widget arg1) -> withForeignPtr arg1 $ \argPtr1 ->gtk_widget_get_no_show_all argPtr1)
{-# LINE 2503 "./Graphics/UI/Gtk/Abstract/Widget.chs" #-}
(toWidget self)
widgetListMnemonicLabels :: WidgetClass self => self
-> IO [Widget]
widgetListMnemonicLabels self =
(\(Widget arg1) -> withForeignPtr arg1 $ \argPtr1 ->gtk_widget_list_mnemonic_labels argPtr1)
{-# LINE 2516 "./Graphics/UI/Gtk/Abstract/Widget.chs" #-}
(toWidget self)
>>= fromGList
>>= mapM (makeNewGObject mkWidget . return)
widgetAddMnemonicLabel :: (WidgetClass self, WidgetClass label) => self
-> label
-> IO ()
widgetAddMnemonicLabel self label =
(\(Widget arg1) (Widget arg2) -> withForeignPtr arg1 $ \argPtr1 ->withForeignPtr arg2 $ \argPtr2 ->gtk_widget_add_mnemonic_label argPtr1 argPtr2)
{-# LINE 2535 "./Graphics/UI/Gtk/Abstract/Widget.chs" #-}
(toWidget self)
(toWidget label)
widgetRemoveMnemonicLabel :: (WidgetClass self, WidgetClass label) => self
-> label
-> IO ()
widgetRemoveMnemonicLabel self label =
(\(Widget arg1) (Widget arg2) -> withForeignPtr arg1 $ \argPtr1 ->withForeignPtr arg2 $ \argPtr2 ->gtk_widget_remove_mnemonic_label argPtr1 argPtr2)
{-# LINE 2551 "./Graphics/UI/Gtk/Abstract/Widget.chs" #-}
(toWidget self)
(toWidget label)
widgetGetAction :: WidgetClass self => self
-> IO (Maybe Action)
widgetGetAction self = do
ptr <- (\(Widget arg1) -> withForeignPtr arg1 $ \argPtr1 ->gtk_widget_get_action argPtr1) (toWidget self)
if ptr==nullPtr then return Nothing else liftM Just $
makeNewGObject mkAction (return ptr)
widgetIsComposited :: WidgetClass self => self
-> IO Bool
widgetIsComposited self =
liftM toBool $
(\(Widget arg1) -> withForeignPtr arg1 $ \argPtr1 ->gtk_widget_is_composited argPtr1)
{-# LINE 2586 "./Graphics/UI/Gtk/Abstract/Widget.chs" #-}
(toWidget self)
widgetErrorBell :: WidgetClass self => self
-> IO ()
widgetErrorBell self =
(\(Widget arg1) -> withForeignPtr arg1 $ \argPtr1 ->gtk_widget_error_bell argPtr1)
{-# LINE 2602 "./Graphics/UI/Gtk/Abstract/Widget.chs" #-}
(toWidget self)
widgetKeynavFailed :: WidgetClass self => self
-> DirectionType
-> IO Bool
widgetKeynavFailed self direction =
liftM toBool $
(\(Widget arg1) arg2 -> withForeignPtr arg1 $ \argPtr1 ->gtk_widget_keynav_failed argPtr1 arg2)
{-# LINE 2638 "./Graphics/UI/Gtk/Abstract/Widget.chs" #-}
(toWidget self)
((fromIntegral . fromEnum) direction)
widgetGetTooltipMarkup :: (WidgetClass self, GlibString markup) => self
-> IO (Maybe markup)
widgetGetTooltipMarkup self =
(\(Widget arg1) -> withForeignPtr arg1 $ \argPtr1 ->gtk_widget_get_tooltip_markup argPtr1)
{-# LINE 2646 "./Graphics/UI/Gtk/Abstract/Widget.chs" #-}
(toWidget self)
>>= maybePeek peekUTFString
widgetSetTooltipMarkup :: (WidgetClass self, GlibString markup) => self
-> Maybe markup
-> IO ()
widgetSetTooltipMarkup self markup =
maybeWith withUTFString markup $ \ markupPtr ->
(\(Widget arg1) arg2 -> withForeignPtr arg1 $ \argPtr1 ->gtk_widget_set_tooltip_markup argPtr1 arg2)
{-# LINE 2662 "./Graphics/UI/Gtk/Abstract/Widget.chs" #-}
(toWidget self)
markupPtr
widgetGetTooltipText :: (WidgetClass self, GlibString text) => self
-> IO (Maybe text)
widgetGetTooltipText self =
(\(Widget arg1) -> withForeignPtr arg1 $ \argPtr1 ->gtk_widget_get_tooltip_text argPtr1)
{-# LINE 2670 "./Graphics/UI/Gtk/Abstract/Widget.chs" #-}
(toWidget self)
>>= maybePeek peekUTFString
widgetSetTooltipText :: (WidgetClass widget, GlibString text) => widget
-> Maybe text
-> IO ()
widgetSetTooltipText widget text =
maybeWith withUTFString text $ \ textPtr ->
(\(Widget arg1) arg2 -> withForeignPtr arg1 $ \argPtr1 ->gtk_widget_set_tooltip_text argPtr1 arg2)
{-# LINE 2684 "./Graphics/UI/Gtk/Abstract/Widget.chs" #-}
(toWidget widget)
textPtr
widgetGetTooltipWindow :: WidgetClass self => self
-> IO Window
widgetGetTooltipWindow self =
makeNewObject mkWindow $
(\(Widget arg1) -> withForeignPtr arg1 $ \argPtr1 ->gtk_widget_get_tooltip_window argPtr1)
{-# LINE 2697 "./Graphics/UI/Gtk/Abstract/Widget.chs" #-}
(toWidget self)
widgetSetTooltipWindow :: (WidgetClass self, WindowClass customWindow) => self
-> Maybe customWindow
-> IO ()
widgetSetTooltipWindow self customWindow =
(\(Widget arg1) (Window arg2) -> withForeignPtr arg1 $ \argPtr1 ->withForeignPtr arg2 $ \argPtr2 ->gtk_widget_set_tooltip_window argPtr1 argPtr2)
{-# LINE 2713 "./Graphics/UI/Gtk/Abstract/Widget.chs" #-}
(toWidget self)
(maybe (Window nullForeignPtr) toWindow customWindow)
widgetGetHasTooltip :: WidgetClass widget => widget
-> IO Bool
widgetGetHasTooltip widget =
liftM toBool $
(\(Widget arg1) -> withForeignPtr arg1 $ \argPtr1 ->gtk_widget_get_has_tooltip argPtr1)
{-# LINE 2723 "./Graphics/UI/Gtk/Abstract/Widget.chs" #-}
(toWidget widget)
widgetSetHasTooltip :: WidgetClass widget => widget
-> Bool
-> IO ()
widgetSetHasTooltip widget hasTooltip =
(\(Widget arg1) arg2 -> withForeignPtr arg1 $ \argPtr1 ->gtk_widget_set_has_tooltip argPtr1 arg2)
{-# LINE 2732 "./Graphics/UI/Gtk/Abstract/Widget.chs" #-}
(toWidget widget)
(fromBool hasTooltip)
widgetTriggerTooltipQuery :: WidgetClass self => self -> IO ()
widgetTriggerTooltipQuery self =
(\(Widget arg1) -> withForeignPtr arg1 $ \argPtr1 ->gtk_widget_trigger_tooltip_query argPtr1)
{-# LINE 2743 "./Graphics/UI/Gtk/Abstract/Widget.chs" #-}
(toWidget self)
widgetGetWindow :: WidgetClass self => self -> IO (Maybe DrawWindow)
widgetGetWindow self =
maybeNull (makeNewGObject mkDrawWindow) $
(\(Widget arg1) -> withForeignPtr arg1 $ \argPtr1 ->gtk_widget_get_window argPtr1)
{-# LINE 2755 "./Graphics/UI/Gtk/Abstract/Widget.chs" #-}
(toWidget self)
{-# LINE 2821 "./Graphics/UI/Gtk/Abstract/Widget.chs" #-}
widgetReparent :: (WidgetClass self, WidgetClass newParent) => self
-> newParent
-> IO ()
widgetReparent self newParent =
(\(Widget arg1) (Widget arg2) -> withForeignPtr arg1 $ \argPtr1 ->withForeignPtr arg2 $ \argPtr2 ->gtk_widget_reparent argPtr1 argPtr2)
{-# LINE 2828 "./Graphics/UI/Gtk/Abstract/Widget.chs" #-}
(toWidget self)
(toWidget newParent)
widgetSetCanFocus :: WidgetClass self => self -> Bool -> IO ()
widgetSetCanFocus = objectSetPropertyBool "can_focus"
widgetGetCanFocus :: WidgetClass self => self -> IO Bool
widgetGetCanFocus = objectGetPropertyBool "can_focus"
widgetGetAllocation :: WidgetClass self => self -> IO Allocation
widgetGetAllocation widget =
alloca $ \ allocationPtr -> do
(\(Widget arg1) arg2 -> withForeignPtr arg1 $ \argPtr1 ->gtk_widget_get_allocation argPtr1 arg2) (toWidget widget) (castPtr allocationPtr)
peek allocationPtr
{-# LINE 2916 "./Graphics/UI/Gtk/Abstract/Widget.chs" #-}
widgetGetAppPaintable :: WidgetClass widget => widget
-> IO Bool
widgetGetAppPaintable widget =
liftM toBool $
(\(Widget arg1) -> withForeignPtr arg1 $ \argPtr1 ->gtk_widget_get_app_paintable argPtr1)
{-# LINE 2924 "./Graphics/UI/Gtk/Abstract/Widget.chs" #-}
(toWidget widget)
widgetGetCanDefault :: WidgetClass widget => widget
-> IO Bool
widgetGetCanDefault widget =
liftM toBool $
(\(Widget arg1) -> withForeignPtr arg1 $ \argPtr1 ->gtk_widget_get_can_default argPtr1)
{-# LINE 2933 "./Graphics/UI/Gtk/Abstract/Widget.chs" #-}
(toWidget widget)
widgetSetCanDefault :: WidgetClass widget => widget
-> Bool
-> IO ()
widgetSetCanDefault widget canDefault =
(\(Widget arg1) arg2 -> withForeignPtr arg1 $ \argPtr1 ->gtk_widget_set_can_default argPtr1 arg2)
{-# LINE 2942 "./Graphics/UI/Gtk/Abstract/Widget.chs" #-}
(toWidget widget)
(fromBool canDefault)
widgetGetHasWindow :: WidgetClass widget => widget
-> IO Bool
widgetGetHasWindow widget =
liftM toBool $
(\(Widget arg1) -> withForeignPtr arg1 $ \argPtr1 ->gtk_widget_get_has_window argPtr1)
{-# LINE 2951 "./Graphics/UI/Gtk/Abstract/Widget.chs" #-}
(toWidget widget)
widgetSetHasWindow :: WidgetClass widget => widget
-> Bool
-> IO ()
widgetSetHasWindow widget hasWindow =
(\(Widget arg1) arg2 -> withForeignPtr arg1 $ \argPtr1 ->gtk_widget_set_has_window argPtr1 arg2)
{-# LINE 2967 "./Graphics/UI/Gtk/Abstract/Widget.chs" #-}
(toWidget widget)
(fromBool hasWindow)
widgetGetSensitive :: WidgetClass widget => widget
-> IO Bool
widgetGetSensitive widget =
liftM toBool $
(\(Widget arg1) -> withForeignPtr arg1 $ \argPtr1 ->gtk_widget_get_sensitive argPtr1)
{-# LINE 2980 "./Graphics/UI/Gtk/Abstract/Widget.chs" #-}
(toWidget widget)
widgetIsSensitive :: WidgetClass widget => widget
-> IO Bool
widgetIsSensitive widget =
liftM toBool $
(\(Widget arg1) -> withForeignPtr arg1 $ \argPtr1 ->gtk_widget_is_sensitive argPtr1)
{-# LINE 2989 "./Graphics/UI/Gtk/Abstract/Widget.chs" #-}
(toWidget widget)
widgetGetState :: WidgetClass self => self -> IO StateType
widgetGetState widget =
liftM (toEnum . fromIntegral) $
(\(Widget arg1) -> withForeignPtr arg1 $ \argPtr1 ->gtk_widget_get_state argPtr1)
{-# LINE 3000 "./Graphics/UI/Gtk/Abstract/Widget.chs" #-}
(toWidget widget)
widgetGetVisible :: WidgetClass widget => widget
-> IO Bool
widgetGetVisible widget =
liftM toBool $
(\(Widget arg1) -> withForeignPtr arg1 $ \argPtr1 ->gtk_widget_get_visible argPtr1)
{-# LINE 3013 "./Graphics/UI/Gtk/Abstract/Widget.chs" #-}
(toWidget widget)
{-# LINE 3077 "./Graphics/UI/Gtk/Abstract/Widget.chs" #-}
widgetGetHasDefault :: WidgetClass widget => widget
-> IO Bool
widgetGetHasDefault widget =
liftM toBool $
(\(Widget arg1) -> withForeignPtr arg1 $ \argPtr1 ->gtk_widget_has_default argPtr1)
{-# LINE 3084 "./Graphics/UI/Gtk/Abstract/Widget.chs" #-}
(toWidget widget)
widgetGetHasFocus :: WidgetClass widget => widget
-> IO Bool
widgetGetHasFocus widget =
liftM toBool $
(\(Widget arg1) -> withForeignPtr arg1 $ \argPtr1 ->gtk_widget_has_focus argPtr1)
{-# LINE 3094 "./Graphics/UI/Gtk/Abstract/Widget.chs" #-}
(toWidget widget)
{-# LINE 3114 "./Graphics/UI/Gtk/Abstract/Widget.chs" #-}
widgetHasGrab :: WidgetClass widget => widget
-> IO Bool
widgetHasGrab widget =
liftM toBool $
(\(Widget arg1) -> withForeignPtr arg1 $ \argPtr1 ->gtk_widget_has_grab argPtr1)
{-# LINE 3123 "./Graphics/UI/Gtk/Abstract/Widget.chs" #-}
(toWidget widget)
widgetIsDrawable :: WidgetClass widget => widget
-> IO Bool
widgetIsDrawable widget =
liftM toBool $
(\(Widget arg1) -> withForeignPtr arg1 $ \argPtr1 ->gtk_widget_is_drawable argPtr1)
{-# LINE 3132 "./Graphics/UI/Gtk/Abstract/Widget.chs" #-}
(toWidget widget)
widgetIsToplevel :: WidgetClass widget => widget
-> IO Bool
widgetIsToplevel widget =
liftM toBool $
(\(Widget arg1) -> withForeignPtr arg1 $ \argPtr1 ->gtk_widget_is_toplevel argPtr1)
{-# LINE 3143 "./Graphics/UI/Gtk/Abstract/Widget.chs" #-}
(toWidget widget)
widgetSetWindow :: (WidgetClass widget, DrawWindowClass window) => widget
-> window
-> IO ()
widgetSetWindow widget window =
(\(Widget arg1) (DrawWindow arg2) -> withForeignPtr arg1 $ \argPtr1 ->withForeignPtr arg2 $ \argPtr2 ->gtk_widget_set_window argPtr1 argPtr2)
{-# LINE 3160 "./Graphics/UI/Gtk/Abstract/Widget.chs" #-}
(toWidget widget)
(toDrawWindow window)
widgetSetReceivesDefault :: WidgetClass widget => widget
-> Bool
-> IO ()
widgetSetReceivesDefault widget receivesDefault =
(\(Widget arg1) arg2 -> withForeignPtr arg1 $ \argPtr1 ->gtk_widget_set_receives_default argPtr1 arg2)
{-# LINE 3172 "./Graphics/UI/Gtk/Abstract/Widget.chs" #-}
(toWidget widget)
(fromBool receivesDefault)
widgetGetReceivesDefault :: WidgetClass widget => widget
-> IO Bool
widgetGetReceivesDefault widget =
liftM toBool $
(\(Widget arg1) -> withForeignPtr arg1 $ \argPtr1 ->gtk_widget_get_receives_default argPtr1)
{-# LINE 3185 "./Graphics/UI/Gtk/Abstract/Widget.chs" #-}
(toWidget widget)
{-# LINE 3241 "./Graphics/UI/Gtk/Abstract/Widget.chs" #-}
widgetSetState :: WidgetClass self => self -> StateType -> IO ()
widgetSetState widget state =
(\(Widget arg1) arg2 -> withForeignPtr arg1 $ \argPtr1 ->gtk_widget_set_state argPtr1 arg2)
{-# LINE 3248 "./Graphics/UI/Gtk/Abstract/Widget.chs" #-}
(toWidget widget)
((fromIntegral . fromEnum) state)
widgetEvent :: WidgetClass self => self -> EventM t Bool
widgetEvent widget = do
ptr <- ask
liftIO $ liftM toBool $ (\(Widget arg1) arg2 -> withForeignPtr arg1 $ \argPtr1 ->gtk_widget_event argPtr1 arg2) (toWidget widget) (castPtr ptr)
widgetName :: (WidgetClass self, GlibString string) => Attr self (Maybe string)
widgetName = newAttrFromMaybeStringProperty "name"
widgetMarginLeft :: WidgetClass self => Attr self Int
widgetMarginLeft = newAttrFromIntProperty "margin-left"
widgetMarginRight :: WidgetClass self => Attr self Int
widgetMarginRight = newAttrFromIntProperty "margin-right"
{-# LINE 3286 "./Graphics/UI/Gtk/Abstract/Widget.chs" #-}
widgetMarginTop :: WidgetClass self => Attr self Int
widgetMarginTop = newAttrFromIntProperty "margin-top"
widgetMarginBottom :: WidgetClass self => Attr self Int
widgetMarginBottom = newAttrFromIntProperty "margin-bottom"
widgetParent :: (WidgetClass self, ContainerClass container) => ReadWriteAttr self (Maybe Container) (Maybe container)
widgetParent = newAttrFromMaybeObjectProperty "parent" gTypeContainer
widgetWidthRequest :: WidgetClass self => Attr self Int
widgetWidthRequest = newAttrFromIntProperty "width-request"
widgetHeightRequest :: WidgetClass self => Attr self Int
widgetHeightRequest = newAttrFromIntProperty "height-request"
widgetVisible :: WidgetClass self => Attr self Bool
widgetVisible = newAttrFromBoolProperty "visible"
widgetOpacity :: WidgetClass self => Attr self Double
widgetOpacity = newAttrFromDoubleProperty "opacity"
widgetSensitive :: WidgetClass self => Attr self Bool
widgetSensitive = newAttrFromBoolProperty "sensitive"
widgetAppPaintable :: WidgetClass self => Attr self Bool
widgetAppPaintable = newAttrFromBoolProperty "app-paintable"
widgetCanFocus :: WidgetClass self => Attr self Bool
widgetCanFocus = newAttrFromBoolProperty "can-focus"
widgetHasFocus :: WidgetClass self => Attr self Bool
widgetHasFocus = newAttrFromBoolProperty "has-focus"
widgetIsFocus :: WidgetClass self => Attr self Bool
widgetIsFocus = newAttrFromBoolProperty "is-focus"
widgetCanDefault :: WidgetClass self => Attr self Bool
widgetCanDefault = newAttrFromBoolProperty "can-default"
widgetHasDefault :: WidgetClass self => Attr self Bool
widgetHasDefault = newAttrFromBoolProperty "has-default"
widgetReceivesDefault :: WidgetClass self => Attr self Bool
widgetReceivesDefault = newAttrFromBoolProperty "receives-default"
widgetCompositeChild :: WidgetClass self => ReadAttr self Bool
widgetCompositeChild = readAttrFromBoolProperty "composite-child"
widgetStyle :: WidgetClass self => Attr self Style
widgetStyle = newAttrFromObjectProperty "style" gTypeStyle
widgetState :: WidgetClass self => Attr self StateType
widgetState = newAttr
widgetGetState
widgetSetState
widgetEvents :: WidgetClass self => Attr self [EventMask]
widgetEvents = newAttrFromFlagsProperty "events"
gdk_event_mask_get_type
{-# LINE 3430 "./Graphics/UI/Gtk/Abstract/Widget.chs" #-}
widgetExtensionEvents :: WidgetClass self => Attr self [ExtensionMode]
widgetExtensionEvents = newAttr
widgetGetExtensionEvents
widgetSetExtensionEvents
widgetExpand :: WidgetClass self => Attr self Bool
widgetExpand = newAttrFromBoolProperty "expand"
widgetHExpand :: WidgetClass self => Attr self Bool
widgetHExpand = newAttrFromBoolProperty "hexpand"
widgetHExpandSet :: WidgetClass self => Attr self Bool
widgetHExpandSet = newAttrFromBoolProperty "hexpand-set"
widgetVExpand :: WidgetClass self => Attr self Bool
widgetVExpand = newAttrFromBoolProperty "vexpand"
widgetVExpandSet :: WidgetClass self => Attr self Bool
widgetVExpandSet = newAttrFromBoolProperty "vexpand-set"
widgetNoShowAll :: WidgetClass self => Attr self Bool
widgetNoShowAll = newAttrFromBoolProperty "no-show-all"
widgetChildVisible :: WidgetClass self => Attr self Bool
widgetChildVisible = newAttr
widgetGetChildVisible
widgetSetChildVisible
widgetColormap :: WidgetClass self => Attr self Colormap
widgetColormap = newAttr
widgetGetColormap
widgetSetColormap
widgetCompositeName :: (WidgetClass self, GlibString string) => ReadWriteAttr self (Maybe string) string
widgetCompositeName = newAttr
widgetGetCompositeName
widgetSetCompositeName
widgetDirection :: WidgetClass self => Attr self TextDirection
widgetDirection = newAttr
widgetGetDirection
widgetSetDirection
widgetTooltipMarkup :: (WidgetClass self, GlibString markup) => Attr self (Maybe markup)
widgetTooltipMarkup = newAttrFromMaybeStringProperty "tooltip-markup"
widgetTooltipText :: (WidgetClass self, GlibString string) => Attr self (Maybe string)
widgetTooltipText = newAttrFromMaybeStringProperty "tooltip-text"
widgetHasTooltip :: WidgetClass self => Attr self Bool
widgetHasTooltip = newAttrFromBoolProperty "has-tooltip"
widgetHasRcStyle :: WidgetClass self => self
-> IO Bool
widgetHasRcStyle self =
liftM toBool $
(\(Widget arg1) -> withForeignPtr arg1 $ \argPtr1 ->gtk_widget_has_rc_style argPtr1)
{-# LINE 3575 "./Graphics/UI/Gtk/Abstract/Widget.chs" #-}
(toWidget self)
widgetGetRealized :: WidgetClass self => self
-> IO Bool
widgetGetRealized self =
liftM toBool $
(\(Widget arg1) -> withForeignPtr arg1 $ \argPtr1 ->gtk_widget_get_realized argPtr1)
{-# LINE 3583 "./Graphics/UI/Gtk/Abstract/Widget.chs" #-}
(toWidget self)
widgetGetMapped :: WidgetClass self => self
-> IO Bool
widgetGetMapped self =
liftM toBool $
(\(Widget arg1) -> withForeignPtr arg1 $ \argPtr1 ->gtk_widget_get_mapped argPtr1)
{-# LINE 3591 "./Graphics/UI/Gtk/Abstract/Widget.chs" #-}
(toWidget self)
widgetSetRealized :: WidgetClass widget => widget
-> Bool
-> IO ()
widgetSetRealized widget realized =
(\(Widget arg1) arg2 -> withForeignPtr arg1 $ \argPtr1 ->gtk_widget_set_realized argPtr1 arg2)
{-# LINE 3603 "./Graphics/UI/Gtk/Abstract/Widget.chs" #-}
(toWidget widget)
(fromBool realized)
widgetSetMapped :: WidgetClass widget => widget
-> Bool
-> IO ()
widgetSetMapped widget mapped =
(\(Widget arg1) arg2 -> withForeignPtr arg1 $ \argPtr1 ->gtk_widget_set_mapped argPtr1 arg2)
{-# LINE 3615 "./Graphics/UI/Gtk/Abstract/Widget.chs" #-}
(toWidget widget)
(fromBool mapped)
{-# LINE 3678 "./Graphics/UI/Gtk/Abstract/Widget.chs" #-}
mapSignal :: WidgetClass self => Signal self (IO ())
mapSignal = Signal (connect_NONE__NONE "map")
unmapSignal :: WidgetClass self => Signal self (IO ())
unmapSignal = Signal (connect_NONE__NONE "unmap")
realize :: WidgetClass self => Signal self (IO ())
realize = Signal (connect_NONE__NONE "realize")
unrealize :: WidgetClass self => Signal self (IO ())
unrealize = Signal (connect_NONE__NONE "unrealize")
sizeRequest :: WidgetClass self => Signal self (IO Requisition)
sizeRequest = Signal (\after w fun ->
connect_PTR__NONE "size-request" after w
(\rqPtr -> fun >>= \req -> unless (rqPtr==nullPtr) $ poke rqPtr req))
sizeAllocate :: WidgetClass self => Signal self (Allocation -> IO ())
sizeAllocate = Signal (connect_BOXED__NONE "size-allocate" peek)
showSignal :: WidgetClass self => Signal self (IO ())
showSignal = Signal (connect_NONE__NONE "show")
hideSignal :: WidgetClass self => Signal self (IO ())
hideSignal = Signal (connect_NONE__NONE "hide")
focus :: WidgetClass self => Signal self (DirectionType -> IO Bool)
focus = Signal (connect_ENUM__BOOL "focus")
stateChanged :: WidgetClass self => Signal self (StateType -> IO ())
stateChanged = Signal (connect_ENUM__NONE "state-changed")
{-# LINE 3776 "./Graphics/UI/Gtk/Abstract/Widget.chs" #-}
parentSet :: WidgetClass self => Signal self (Maybe Widget -> IO ())
parentSet = Signal (connect_MOBJECT__NONE "parent-set")
hierarchyChanged :: WidgetClass self => Signal self (Maybe Widget -> IO ())
hierarchyChanged = Signal (connect_MOBJECT__NONE "hierarchy-changed")
styleSet :: WidgetClass self => Signal self (Style -> IO ())
styleSet = Signal (connect_OBJECT__NONE "style-set")
directionChanged :: WidgetClass self => Signal self (TextDirection -> IO ())
directionChanged = Signal (connect_ENUM__NONE "direction-changed")
grabNotify :: WidgetClass self => Signal self (Bool -> IO ())
grabNotify = Signal (connect_BOOL__NONE "grab-notify")
popupMenuSignal :: WidgetClass self => Signal self (IO Bool)
popupMenuSignal = Signal (connect_NONE__BOOL "popup-menu")
data WidgetHelpType = WidgetHelpTooltip
| WidgetHelpWhatsThis
deriving (Enum,Eq,Show)
{-# LINE 3829 "./Graphics/UI/Gtk/Abstract/Widget.chs" #-}
showHelp :: WidgetClass self => Signal self (WidgetHelpType -> IO Bool)
showHelp = Signal (connect_ENUM__BOOL "show-help")
accelClosuresChanged :: WidgetClass self => Signal self (IO ())
accelClosuresChanged = Signal (connect_NONE__NONE "accel-closures-changed")
screenChanged :: WidgetClass self => Signal self (Screen -> IO ())
screenChanged = Signal (connect_OBJECT__NONE "screen-changed")
queryTooltip :: WidgetClass self => Signal self (Widget -> Maybe Point -> Tooltip -> IO Bool)
queryTooltip =
Signal (\after model user ->
connect_OBJECT_INT_INT_BOOL_OBJECT__BOOL "query-tooltip"
after model (\widget x y keyb tooltip ->
user widget (if keyb then Nothing else Just (x, y)) tooltip))
{-# LINE 3874 "./Graphics/UI/Gtk/Abstract/Widget.chs" #-}
eventM :: WidgetClass w => SignalName -> [EventMask] ->
ConnectAfter -> w -> (EventM t Bool) -> IO (ConnectId w)
eventM name eMask after obj fun = do
id <- connect_PTR__BOOL name after obj (runReaderT fun)
widgetAddEvents obj eMask
return id
buttonPressEvent :: WidgetClass self => Signal self (EventM EButton Bool)
buttonPressEvent = Signal (eventM "button_press_event" [ButtonPressMask])
buttonReleaseEvent :: WidgetClass self => Signal self (EventM EButton Bool)
buttonReleaseEvent = Signal (eventM "button_release_event" [ButtonReleaseMask])
scrollEvent :: WidgetClass self => Signal self (EventM EScroll Bool)
scrollEvent = Signal (eventM "scroll_event" [ScrollMask])
motionNotifyEvent :: WidgetClass self => Signal self (EventM EMotion Bool)
motionNotifyEvent = Signal (eventM "motion_notify_event" [])
deleteEvent :: WidgetClass self => Signal self (EventM EAny Bool)
deleteEvent = Signal (eventM "delete_event" [])
destroyEvent :: WidgetClass self => Signal self (EventM EAny Bool)
destroyEvent = Signal (eventM "destroy_event" [])
exposeEvent :: WidgetClass self => Signal self (EventM EExpose Bool)
exposeEvent = Signal (eventM "expose_event" [])
keyPressEvent :: WidgetClass self => Signal self (EventM EKey Bool)
keyPressEvent = Signal (eventM "key_press_event" [KeyPressMask])
keyReleaseEvent :: WidgetClass self => Signal self (EventM EKey Bool)
keyReleaseEvent = Signal (eventM "key_release_event" [KeyReleaseMask])
enterNotifyEvent :: WidgetClass self => Signal self (EventM ECrossing Bool)
enterNotifyEvent = Signal (eventM "enter_notify_event" [EnterNotifyMask])
leaveNotifyEvent :: WidgetClass self => Signal self (EventM ECrossing Bool)
leaveNotifyEvent = Signal (eventM "leave_notify_event" [LeaveNotifyMask])
configureEvent :: WidgetClass self => Signal self (EventM EConfigure Bool)
configureEvent = Signal (eventM "configure_event" [])
focusInEvent :: WidgetClass self => Signal self (EventM EFocus Bool)
focusInEvent = Signal (eventM "focus_in_event" [FocusChangeMask])
focusOutEvent :: WidgetClass self => Signal self (EventM EFocus Bool)
focusOutEvent = Signal (eventM "focus_out_event" [FocusChangeMask])
mapEvent :: WidgetClass self => Signal self (EventM EAny Bool)
mapEvent = Signal (eventM "map_event" [])
unmapEvent :: WidgetClass self => Signal self (EventM EAny Bool)
unmapEvent = Signal (eventM "unmap_event" [])
_propertyNotifyEvent :: WidgetClass self => Signal self (EventM EProperty Bool)
_propertyNotifyEvent = Signal (eventM "property_notify_event" [PropertyChangeMask])
proximityInEvent :: WidgetClass self => Signal self (EventM EProximity Bool)
proximityInEvent = Signal (eventM "proximity_in_event" [ProximityInMask])
proximityOutEvent :: WidgetClass self => Signal self (EventM EProximity Bool)
proximityOutEvent = Signal (eventM "proximity_out_event" [ProximityOutMask])
visibilityNotifyEvent :: WidgetClass self => Signal self (EventM EVisibility Bool)
visibilityNotifyEvent = Signal (eventM "visibility_notify_event" [VisibilityNotifyMask])
noExposeEvent :: WidgetClass self => Signal self (EventM EAny Bool)
noExposeEvent = Signal (eventM "no_expose_event" [])
windowStateEvent :: WidgetClass self => Signal self (EventM EWindowState Bool)
windowStateEvent = Signal (eventM "window_state_event" [])
grabBrokenEvent :: WidgetClass self => Signal self (EventM EGrabBroken Bool)
grabBrokenEvent = Signal (eventM "grab_broken_event" [])
event :: WidgetClass w => SignalName -> [EventMask] ->
ConnectAfter -> w -> (Event -> IO Bool) -> IO (ConnectId w)
event name eMask after obj fun = do
id <- connect_BOXED__BOOL name marshalEvent after obj fun
widgetAddEvents obj eMask
return id
onButtonPress, afterButtonPress :: WidgetClass w => w -> (Event -> IO Bool) ->
IO (ConnectId w)
onButtonPress = event "button_press_event" [ButtonPressMask] False
afterButtonPress = event "button_press_event" [ButtonPressMask] True
onButtonRelease, afterButtonRelease :: WidgetClass w => w ->
(Event -> IO Bool) -> IO (ConnectId w)
onButtonRelease = event "button_release_event" [ButtonReleaseMask] False
afterButtonRelease = event "button_release_event" [ButtonReleaseMask] True
onClient, afterClient :: WidgetClass w => w -> (Event -> IO Bool) ->
IO (ConnectId w)
onClient = event "client_event" [] False
afterClient = event "client_event" [] True
onConfigure, afterConfigure :: WidgetClass w => w -> (Event -> IO Bool) ->
IO (ConnectId w)
onConfigure = event "configure_event" [] False
afterConfigure = event "configure_event" [] True
onDelete, afterDelete :: WidgetClass w => w -> (Event -> IO Bool) ->
IO (ConnectId w)
onDelete = event "delete_event" [] False
afterDelete = event "delete_event" [] True
onDestroyEvent, afterDestroyEvent :: WidgetClass w =>
w -> (Event -> IO Bool) ->
IO (ConnectId w)
onDestroyEvent = event "destroy_event" [] False
afterDestroyEvent = event "destroy_event" [] True
onDirectionChanged, afterDirectionChanged :: WidgetClass w => w ->
(Event -> IO Bool) ->
IO (ConnectId w)
onDirectionChanged = event "direction_changed" [] False
afterDirectionChanged = event "direction_changed" [] True
onEnterNotify, afterEnterNotify :: WidgetClass w => w -> (Event -> IO Bool) ->
IO (ConnectId w)
onEnterNotify = event "enter_notify_event" [EnterNotifyMask] False
afterEnterNotify = event "enter_notify_event" [EnterNotifyMask] True
onLeaveNotify, afterLeaveNotify :: WidgetClass w => w -> (Event -> IO Bool) ->
IO (ConnectId w)
onLeaveNotify = event "leave_notify_event" [LeaveNotifyMask] False
afterLeaveNotify = event "leave_notify_event" [LeaveNotifyMask] True
onExpose, afterExpose :: WidgetClass w => w -> (Event -> IO Bool) ->
IO (ConnectId w)
onExpose = event "expose_event" [] False
afterExpose = event "expose_event" [] True
onExposeRect, afterExposeRect ::
WidgetClass w => w -> (Rectangle -> IO ()) -> IO (ConnectId w)
onExposeRect w act = connect_BOXED__BOOL "expose_event"
marshExposeRect False w (\r -> act r >> return True)
afterExposeRect w act = connect_BOXED__BOOL "expose_event"
marshExposeRect True w (\r -> act r >> return True)
onFocus, afterFocus :: WidgetClass w => w -> (DirectionType -> IO Bool) ->
IO (ConnectId w)
onFocus = connect_ENUM__BOOL "focus" False
afterFocus = connect_ENUM__BOOL "focus" True
onFocusIn, afterFocusIn :: WidgetClass w => w -> (Event -> IO Bool) ->
IO (ConnectId w)
onFocusIn = event "focus_in_event" [FocusChangeMask] False
afterFocusIn = event "focus_in_event" [FocusChangeMask] True
onFocusOut, afterFocusOut :: WidgetClass w => w -> (Event -> IO Bool) ->
IO (ConnectId w)
onFocusOut = event "focus_out_event" [FocusChangeMask] False
afterFocusOut = event "focus_out_event" [FocusChangeMask] True
onGrabFocus, afterGrabFocus :: WidgetClass w => w -> IO () ->
IO (ConnectId w)
onGrabFocus = connect_NONE__NONE "grab_focus" False
afterGrabFocus = connect_NONE__NONE "grab_focus" True
onDestroy, afterDestroy :: WidgetClass w => w -> (IO ()) ->
IO (ConnectId w)
onDestroy = connect_NONE__NONE "destroy" False
afterDestroy = connect_NONE__NONE "destroy" True
onHide, afterHide :: WidgetClass w => w -> IO () -> IO (ConnectId w)
onHide = connect_NONE__NONE "hide" False
afterHide = connect_NONE__NONE "hide" True
onHierarchyChanged, afterHierarchyChanged :: WidgetClass w => w -> IO () ->
IO (ConnectId w)
onHierarchyChanged = connect_NONE__NONE "hierarchy_changed" False
afterHierarchyChanged = connect_NONE__NONE "hierarchy_changed" True
onKeyPress, afterKeyPress :: WidgetClass w => w -> (Event -> IO Bool) ->
IO (ConnectId w)
onKeyPress = event "key_press_event" [KeyPressMask] False
afterKeyPress = event "key_press_event" [KeyPressMask] True
onKeyRelease, afterKeyRelease :: WidgetClass w => w -> (Event -> IO Bool) ->
IO (ConnectId w)
onKeyRelease = event "key_release_event" [KeyReleaseMask] False
afterKeyRelease = event "key_release_event" [KeyReleaseMask] True
onMnemonicActivate, afterMnemonicActivate :: WidgetClass w => w ->
(Bool -> IO Bool) ->
IO (ConnectId w)
onMnemonicActivate = connect_BOOL__BOOL "mnemonic_activate" False
afterMnemonicActivate = connect_BOOL__BOOL "mnemonic_activate" True
onMotionNotify, afterMotionNotify :: WidgetClass w => w -> Bool ->
(Event -> IO Bool) ->
IO (ConnectId w)
onMotionNotify w hint = event "motion_notify_event"
(if hint then [PointerMotionMask, PointerMotionHintMask]
else [PointerMotionMask]) False w
afterMotionNotify w hint = event "motion_notify_event"
(if hint then [PointerMotionMask, PointerMotionHintMask]
else [PointerMotionMask]) True w
onParentSet, afterParentSet :: (WidgetClass w, WidgetClass old) => w ->
(old -> IO ()) -> IO (ConnectId w)
onParentSet = connect_OBJECT__NONE "parent_set" False
afterParentSet = connect_OBJECT__NONE "parent_set" True
onPopupMenu, afterPopupMenu :: WidgetClass w => w -> IO () -> IO (ConnectId w)
onPopupMenu = connect_NONE__NONE "popup_menu" False
afterPopupMenu = connect_NONE__NONE "popup_menu" True
onProximityIn, afterProximityIn :: WidgetClass w => w -> (Event -> IO Bool) ->
IO (ConnectId w)
onProximityIn = event "proximity_in_event" [ProximityInMask] False
afterProximityIn = event "proximity_in_event" [ProximityInMask] True
onProximityOut, afterProximityOut :: WidgetClass w => w ->
(Event -> IO Bool) -> IO (ConnectId w)
onProximityOut = event "proximity_out_event" [ProximityOutMask] False
afterProximityOut = event "proximity_out_event" [ProximityOutMask] True
onRealize, afterRealize :: WidgetClass w => w -> IO () -> IO (ConnectId w)
onRealize = connect_NONE__NONE "realize" False
afterRealize = connect_NONE__NONE "realize" True
onScroll, afterScroll :: WidgetClass w => w -> (Event -> IO Bool) ->
IO (ConnectId w)
onScroll = event "scroll_event" [ScrollMask] False
afterScroll = event "scroll_event" [ScrollMask] True
onShow, afterShow :: WidgetClass w => w -> IO () -> IO (ConnectId w)
onShow = connect_NONE__NONE "show" False
afterShow = connect_NONE__NONE "show" True
onSizeAllocate, afterSizeAllocate :: WidgetClass w => w ->
(Allocation -> IO ()) -> IO (ConnectId w)
onSizeAllocate = connect_BOXED__NONE "size_allocate" peek False
afterSizeAllocate = connect_BOXED__NONE "size_allocate" peek True
onSizeRequest, afterSizeRequest :: WidgetClass w => w -> (IO Requisition) ->
IO (ConnectId w)
onSizeRequest w fun = connect_PTR__NONE "size_request" False w (\rqPtr -> do
req <- fun
unless (rqPtr==nullPtr) $ poke rqPtr req)
afterSizeRequest w fun = connect_PTR__NONE "size_request" True w (\rqPtr -> do
req <- fun
unless (rqPtr==nullPtr) $ poke rqPtr req)
onStateChanged, afterStateChanged :: WidgetClass w => w ->
(StateType -> IO ()) -> IO (ConnectId w)
onStateChanged = connect_ENUM__NONE "state_changed" False
afterStateChanged = connect_ENUM__NONE "state_changed" True
onUnmap, afterUnmap :: WidgetClass w => w -> IO () -> IO (ConnectId w)
onUnmap = connect_NONE__NONE "unmap" False
afterUnmap = connect_NONE__NONE "unmap" True
onUnrealize, afterUnrealize :: WidgetClass w => w -> IO () -> IO (ConnectId w)
onUnrealize = connect_NONE__NONE "unrealize" False
afterUnrealize = connect_NONE__NONE "unrealize" True
onVisibilityNotify, afterVisibilityNotify :: WidgetClass w => w ->
(Event -> IO Bool) ->
IO (ConnectId w)
onVisibilityNotify =
event "visibility_notify_event" [VisibilityNotifyMask] False
afterVisibilityNotify =
event "visibility_notify_event" [VisibilityNotifyMask] True
onWindowState, afterWindowState :: WidgetClass w => w -> (Event -> IO Bool) ->
IO (ConnectId w)
onWindowState = event "window_state_event" [] False
afterWindowState = event "window_state_event" [] True
foreign import ccall safe "gtk_widget_show"
gtk_widget_show :: ((Ptr Widget) -> (IO ()))
foreign import ccall safe "gtk_widget_show_now"
gtk_widget_show_now :: ((Ptr Widget) -> (IO ()))
foreign import ccall safe "gtk_widget_hide"
gtk_widget_hide :: ((Ptr Widget) -> (IO ()))
foreign import ccall safe "gtk_widget_show_all"
gtk_widget_show_all :: ((Ptr Widget) -> (IO ()))
foreign import ccall safe "gtk_widget_hide_all"
gtk_widget_hide_all :: ((Ptr Widget) -> (IO ()))
foreign import ccall safe "gtk_widget_destroy"
gtk_widget_destroy :: ((Ptr Widget) -> (IO ()))
foreign import ccall safe "gtk_widget_queue_draw"
gtk_widget_queue_draw :: ((Ptr Widget) -> (IO ()))
foreign import ccall safe "gtk_widget_queue_resize"
gtk_widget_queue_resize :: ((Ptr Widget) -> (IO ()))
foreign import ccall safe "gtk_widget_queue_resize_no_redraw"
gtk_widget_queue_resize_no_redraw :: ((Ptr Widget) -> (IO ()))
foreign import ccall safe "gtk_widget_size_request"
gtk_widget_size_request :: ((Ptr Widget) -> ((Ptr ()) -> (IO ())))
foreign import ccall safe "gtk_widget_get_child_requisition"
gtk_widget_get_child_requisition :: ((Ptr Widget) -> ((Ptr ()) -> (IO ())))
foreign import ccall safe "gtk_widget_size_allocate"
gtk_widget_size_allocate :: ((Ptr Widget) -> ((Ptr ()) -> (IO ())))
foreign import ccall safe "gtk_widget_add_accelerator"
gtk_widget_add_accelerator :: ((Ptr Widget) -> ((Ptr CChar) -> ((Ptr AccelGroup) -> (CUInt -> (CInt -> (CInt -> (IO ())))))))
foreign import ccall safe "gtk_widget_remove_accelerator"
gtk_widget_remove_accelerator :: ((Ptr Widget) -> ((Ptr AccelGroup) -> (CUInt -> (CInt -> (IO CInt)))))
foreign import ccall safe "gtk_widget_set_accel_path"
gtk_widget_set_accel_path :: ((Ptr Widget) -> ((Ptr CChar) -> ((Ptr AccelGroup) -> (IO ()))))
foreign import ccall safe "gtk_widget_can_activate_accel"
gtk_widget_can_activate_accel :: ((Ptr Widget) -> (CUInt -> (IO CInt)))
foreign import ccall safe "gtk_widget_activate"
gtk_widget_activate :: ((Ptr Widget) -> (IO CInt))
foreign import ccall unsafe "gtk_widget_intersect"
gtk_widget_intersect :: ((Ptr Widget) -> ((Ptr ()) -> ((Ptr ()) -> (IO CInt))))
foreign import ccall unsafe "gtk_widget_is_focus"
gtk_widget_is_focus :: ((Ptr Widget) -> (IO CInt))
foreign import ccall safe "gtk_widget_grab_focus"
gtk_widget_grab_focus :: ((Ptr Widget) -> (IO ()))
foreign import ccall safe "gtk_widget_grab_default"
gtk_widget_grab_default :: ((Ptr Widget) -> (IO ()))
foreign import ccall safe "gtk_widget_set_name"
gtk_widget_set_name :: ((Ptr Widget) -> ((Ptr CChar) -> (IO ())))
foreign import ccall unsafe "gtk_widget_get_name"
gtk_widget_get_name :: ((Ptr Widget) -> (IO (Ptr CChar)))
foreign import ccall safe "gtk_widget_set_sensitive"
gtk_widget_set_sensitive :: ((Ptr Widget) -> (CInt -> (IO ())))
foreign import ccall safe "gtk_widget_get_parent_window"
gtk_widget_get_parent_window :: ((Ptr Widget) -> (IO (Ptr DrawWindow)))
foreign import ccall unsafe "gtk_widget_get_events"
gtk_widget_get_events :: ((Ptr Widget) -> (IO CInt))
foreign import ccall unsafe "gtk_widget_set_events"
gtk_widget_set_events :: ((Ptr Widget) -> (CInt -> (IO ())))
foreign import ccall unsafe "gtk_widget_add_events"
gtk_widget_add_events :: ((Ptr Widget) -> (CInt -> (IO ())))
foreign import ccall safe "gtk_widget_set_extension_events"
gtk_widget_set_extension_events :: ((Ptr Widget) -> (CInt -> (IO ())))
foreign import ccall safe "gtk_widget_get_extension_events"
gtk_widget_get_extension_events :: ((Ptr Widget) -> (IO CInt))
foreign import ccall unsafe "gtk_widget_get_toplevel"
gtk_widget_get_toplevel :: ((Ptr Widget) -> (IO (Ptr Widget)))
foreign import ccall safe "gtk_widget_get_ancestor"
gtk_widget_get_ancestor :: ((Ptr Widget) -> (CULong -> (IO (Ptr Widget))))
foreign import ccall safe "gtk_widget_get_colormap"
gtk_widget_get_colormap :: ((Ptr Widget) -> (IO (Ptr Colormap)))
foreign import ccall safe "gtk_widget_set_colormap"
gtk_widget_set_colormap :: ((Ptr Widget) -> ((Ptr Colormap) -> (IO ())))
foreign import ccall safe "gtk_widget_get_pointer"
gtk_widget_get_pointer :: ((Ptr Widget) -> ((Ptr CInt) -> ((Ptr CInt) -> (IO ()))))
foreign import ccall unsafe "gtk_widget_is_ancestor"
gtk_widget_is_ancestor :: ((Ptr Widget) -> ((Ptr Widget) -> (IO CInt)))
foreign import ccall safe "gtk_widget_translate_coordinates"
gtk_widget_translate_coordinates :: ((Ptr Widget) -> ((Ptr Widget) -> (CInt -> (CInt -> ((Ptr CInt) -> ((Ptr CInt) -> (IO CInt)))))))
foreign import ccall safe "gtk_widget_set_style"
gtk_widget_set_style :: ((Ptr Widget) -> ((Ptr Style) -> (IO ())))
foreign import ccall safe "gtk_widget_ensure_style"
gtk_widget_ensure_style :: ((Ptr Widget) -> (IO ()))
foreign import ccall safe "gtk_widget_get_style"
gtk_widget_get_style :: ((Ptr Widget) -> (IO (Ptr Style)))
foreign import ccall safe "gtk_widget_push_colormap"
gtk_widget_push_colormap :: ((Ptr Colormap) -> (IO ()))
foreign import ccall safe "gtk_widget_pop_colormap"
gtk_widget_pop_colormap :: (IO ())
foreign import ccall safe "gtk_widget_set_default_colormap"
gtk_widget_set_default_colormap :: ((Ptr Colormap) -> (IO ()))
foreign import ccall safe "gtk_widget_get_default_style"
gtk_widget_get_default_style :: (IO (Ptr Style))
foreign import ccall safe "gtk_widget_get_default_colormap"
gtk_widget_get_default_colormap :: (IO (Ptr Colormap))
foreign import ccall safe "gtk_widget_set_direction"
gtk_widget_set_direction :: ((Ptr Widget) -> (CInt -> (IO ())))
foreign import ccall safe "gtk_widget_get_direction"
gtk_widget_get_direction :: ((Ptr Widget) -> (IO CInt))
foreign import ccall safe "gtk_widget_set_default_direction"
gtk_widget_set_default_direction :: (CInt -> (IO ()))
foreign import ccall safe "gtk_widget_get_default_direction"
gtk_widget_get_default_direction :: (IO CInt)
foreign import ccall safe "gtk_widget_shape_combine_mask"
gtk_widget_shape_combine_mask :: ((Ptr Widget) -> ((Ptr ()) -> (CInt -> (CInt -> (IO ())))))
foreign import ccall safe "gtk_widget_input_shape_combine_mask"
gtk_widget_input_shape_combine_mask :: ((Ptr Widget) -> ((Ptr ()) -> (CInt -> (CInt -> (IO ())))))
foreign import ccall safe "gtk_widget_get_snapshot"
gtk_widget_get_snapshot :: ((Ptr Widget) -> ((Ptr ()) -> (IO (Ptr Pixmap))))
foreign import ccall safe "gtk_widget_path"
gtk_widget_path :: ((Ptr Widget) -> ((Ptr CUInt) -> ((Ptr (Ptr CChar)) -> ((Ptr (Ptr CChar)) -> (IO ())))))
foreign import ccall safe "gtk_widget_class_path"
gtk_widget_class_path :: ((Ptr Widget) -> ((Ptr CUInt) -> ((Ptr (Ptr CChar)) -> ((Ptr (Ptr CChar)) -> (IO ())))))
foreign import ccall safe "gtk_widget_get_composite_name"
gtk_widget_get_composite_name :: ((Ptr Widget) -> (IO (Ptr CChar)))
foreign import ccall safe "gtk_widget_modify_style"
gtk_widget_modify_style :: ((Ptr Widget) -> ((Ptr RcStyle) -> (IO ())))
foreign import ccall safe "gtk_widget_get_modifier_style"
gtk_widget_get_modifier_style :: ((Ptr Widget) -> (IO (Ptr RcStyle)))
foreign import ccall safe "gtk_widget_modify_fg"
gtk_widget_modify_fg :: ((Ptr Widget) -> (CInt -> ((Ptr ()) -> (IO ()))))
foreign import ccall safe "gtk_widget_modify_bg"
gtk_widget_modify_bg :: ((Ptr Widget) -> (CInt -> ((Ptr ()) -> (IO ()))))
foreign import ccall safe "gtk_widget_modify_text"
gtk_widget_modify_text :: ((Ptr Widget) -> (CInt -> ((Ptr ()) -> (IO ()))))
foreign import ccall safe "gtk_widget_modify_base"
gtk_widget_modify_base :: ((Ptr Widget) -> (CInt -> ((Ptr ()) -> (IO ()))))
foreign import ccall safe "gtk_widget_modify_font"
gtk_widget_modify_font :: ((Ptr Widget) -> ((Ptr FontDescription) -> (IO ())))
foreign import ccall safe "gtk_widget_create_pango_context"
gtk_widget_create_pango_context :: ((Ptr Widget) -> (IO (Ptr PangoContext)))
foreign import ccall safe "gtk_widget_get_pango_context"
gtk_widget_get_pango_context :: ((Ptr Widget) -> (IO (Ptr PangoContext)))
foreign import ccall unsafe "gtk_widget_create_pango_layout"
gtk_widget_create_pango_layout :: ((Ptr Widget) -> ((Ptr CChar) -> (IO (Ptr PangoLayoutRaw))))
foreign import ccall safe "gtk_widget_render_icon"
gtk_widget_render_icon :: ((Ptr Widget) -> ((Ptr CChar) -> (CInt -> ((Ptr CChar) -> (IO (Ptr Pixbuf))))))
foreign import ccall safe "gtk_widget_queue_draw_area"
gtk_widget_queue_draw_area :: ((Ptr Widget) -> (CInt -> (CInt -> (CInt -> (CInt -> (IO ()))))))
foreign import ccall safe "gtk_widget_reset_shapes"
gtk_widget_reset_shapes :: ((Ptr Widget) -> (IO ()))
foreign import ccall safe "gtk_widget_set_app_paintable"
gtk_widget_set_app_paintable :: ((Ptr Widget) -> (CInt -> (IO ())))
foreign import ccall safe "gtk_widget_set_double_buffered"
gtk_widget_set_double_buffered :: ((Ptr Widget) -> (CInt -> (IO ())))
foreign import ccall safe "gtk_widget_set_redraw_on_allocate"
gtk_widget_set_redraw_on_allocate :: ((Ptr Widget) -> (CInt -> (IO ())))
foreign import ccall safe "gtk_widget_set_composite_name"
gtk_widget_set_composite_name :: ((Ptr Widget) -> ((Ptr CChar) -> (IO ())))
foreign import ccall safe "gtk_widget_mnemonic_activate"
gtk_widget_mnemonic_activate :: ((Ptr Widget) -> (CInt -> (IO CInt)))
foreign import ccall safe "gtk_widget_set_scroll_adjustments"
gtk_widget_set_scroll_adjustments :: ((Ptr Widget) -> ((Ptr Adjustment) -> ((Ptr Adjustment) -> (IO CInt))))
foreign import ccall safe "gtk_widget_region_intersect"
gtk_widget_region_intersect :: ((Ptr Widget) -> ((Ptr Region) -> (IO (Ptr Region))))
foreign import ccall safe "gtk_widget_get_accessible"
gtk_widget_get_accessible :: ((Ptr Widget) -> (IO (Ptr AtkObject)))
foreign import ccall safe "gtk_widget_child_focus"
gtk_widget_child_focus :: ((Ptr Widget) -> (CInt -> (IO CInt)))
foreign import ccall safe "gtk_widget_get_child_visible"
gtk_widget_get_child_visible :: ((Ptr Widget) -> (IO CInt))
foreign import ccall safe "gtk_widget_get_parent"
gtk_widget_get_parent :: ((Ptr Widget) -> (IO (Ptr Widget)))
foreign import ccall safe "gtk_widget_get_settings"
gtk_widget_get_settings :: ((Ptr Widget) -> (IO (Ptr Settings)))
foreign import ccall safe "gtk_widget_get_clipboard"
gtk_widget_get_clipboard :: ((Ptr Widget) -> ((Ptr ()) -> (IO (Ptr Clipboard))))
foreign import ccall safe "gtk_widget_get_display"
gtk_widget_get_display :: ((Ptr Widget) -> (IO (Ptr Display)))
foreign import ccall safe "gtk_widget_get_root_window"
gtk_widget_get_root_window :: ((Ptr Widget) -> (IO (Ptr DrawWindow)))
foreign import ccall safe "gtk_widget_get_screen"
gtk_widget_get_screen :: ((Ptr Widget) -> (IO (Ptr Screen)))
foreign import ccall safe "gtk_widget_has_screen"
gtk_widget_has_screen :: ((Ptr Widget) -> (IO CInt))
foreign import ccall safe "gtk_widget_get_size_request"
gtk_widget_get_size_request :: ((Ptr Widget) -> ((Ptr CInt) -> ((Ptr CInt) -> (IO ()))))
foreign import ccall safe "gtk_widget_set_child_visible"
gtk_widget_set_child_visible :: ((Ptr Widget) -> (CInt -> (IO ())))
foreign import ccall safe "gtk_widget_set_size_request"
gtk_widget_set_size_request :: ((Ptr Widget) -> (CInt -> (CInt -> (IO ()))))
foreign import ccall safe "gtk_widget_set_no_show_all"
gtk_widget_set_no_show_all :: ((Ptr Widget) -> (CInt -> (IO ())))
foreign import ccall safe "gtk_widget_get_no_show_all"
gtk_widget_get_no_show_all :: ((Ptr Widget) -> (IO CInt))
foreign import ccall safe "gtk_widget_list_mnemonic_labels"
gtk_widget_list_mnemonic_labels :: ((Ptr Widget) -> (IO (Ptr ())))
foreign import ccall safe "gtk_widget_add_mnemonic_label"
gtk_widget_add_mnemonic_label :: ((Ptr Widget) -> ((Ptr Widget) -> (IO ())))
foreign import ccall safe "gtk_widget_remove_mnemonic_label"
gtk_widget_remove_mnemonic_label :: ((Ptr Widget) -> ((Ptr Widget) -> (IO ())))
foreign import ccall safe "gtk_widget_get_action"
gtk_widget_get_action :: ((Ptr Widget) -> (IO (Ptr Action)))
foreign import ccall safe "gtk_widget_is_composited"
gtk_widget_is_composited :: ((Ptr Widget) -> (IO CInt))
foreign import ccall safe "gtk_widget_error_bell"
gtk_widget_error_bell :: ((Ptr Widget) -> (IO ()))
foreign import ccall safe "gtk_widget_keynav_failed"
gtk_widget_keynav_failed :: ((Ptr Widget) -> (CInt -> (IO CInt)))
foreign import ccall safe "gtk_widget_get_tooltip_markup"
gtk_widget_get_tooltip_markup :: ((Ptr Widget) -> (IO (Ptr CChar)))
foreign import ccall safe "gtk_widget_set_tooltip_markup"
gtk_widget_set_tooltip_markup :: ((Ptr Widget) -> ((Ptr CChar) -> (IO ())))
foreign import ccall safe "gtk_widget_get_tooltip_text"
gtk_widget_get_tooltip_text :: ((Ptr Widget) -> (IO (Ptr CChar)))
foreign import ccall safe "gtk_widget_set_tooltip_text"
gtk_widget_set_tooltip_text :: ((Ptr Widget) -> ((Ptr CChar) -> (IO ())))
foreign import ccall safe "gtk_widget_get_tooltip_window"
gtk_widget_get_tooltip_window :: ((Ptr Widget) -> (IO (Ptr Window)))
foreign import ccall safe "gtk_widget_set_tooltip_window"
gtk_widget_set_tooltip_window :: ((Ptr Widget) -> ((Ptr Window) -> (IO ())))
foreign import ccall safe "gtk_widget_get_has_tooltip"
gtk_widget_get_has_tooltip :: ((Ptr Widget) -> (IO CInt))
foreign import ccall safe "gtk_widget_set_has_tooltip"
gtk_widget_set_has_tooltip :: ((Ptr Widget) -> (CInt -> (IO ())))
foreign import ccall safe "gtk_widget_trigger_tooltip_query"
gtk_widget_trigger_tooltip_query :: ((Ptr Widget) -> (IO ()))
foreign import ccall safe "gtk_widget_get_window"
gtk_widget_get_window :: ((Ptr Widget) -> (IO (Ptr DrawWindow)))
foreign import ccall safe "gtk_widget_reparent"
gtk_widget_reparent :: ((Ptr Widget) -> ((Ptr Widget) -> (IO ())))
foreign import ccall safe "gtk_widget_get_allocation"
gtk_widget_get_allocation :: ((Ptr Widget) -> ((Ptr ()) -> (IO ())))
foreign import ccall safe "gtk_widget_get_app_paintable"
gtk_widget_get_app_paintable :: ((Ptr Widget) -> (IO CInt))
foreign import ccall safe "gtk_widget_get_can_default"
gtk_widget_get_can_default :: ((Ptr Widget) -> (IO CInt))
foreign import ccall safe "gtk_widget_set_can_default"
gtk_widget_set_can_default :: ((Ptr Widget) -> (CInt -> (IO ())))
foreign import ccall safe "gtk_widget_get_has_window"
gtk_widget_get_has_window :: ((Ptr Widget) -> (IO CInt))
foreign import ccall safe "gtk_widget_set_has_window"
gtk_widget_set_has_window :: ((Ptr Widget) -> (CInt -> (IO ())))
foreign import ccall safe "gtk_widget_get_sensitive"
gtk_widget_get_sensitive :: ((Ptr Widget) -> (IO CInt))
foreign import ccall safe "gtk_widget_is_sensitive"
gtk_widget_is_sensitive :: ((Ptr Widget) -> (IO CInt))
foreign import ccall safe "gtk_widget_get_state"
gtk_widget_get_state :: ((Ptr Widget) -> (IO CInt))
foreign import ccall safe "gtk_widget_get_visible"
gtk_widget_get_visible :: ((Ptr Widget) -> (IO CInt))
foreign import ccall safe "gtk_widget_has_default"
gtk_widget_has_default :: ((Ptr Widget) -> (IO CInt))
foreign import ccall safe "gtk_widget_has_focus"
gtk_widget_has_focus :: ((Ptr Widget) -> (IO CInt))
foreign import ccall safe "gtk_widget_has_grab"
gtk_widget_has_grab :: ((Ptr Widget) -> (IO CInt))
foreign import ccall safe "gtk_widget_is_drawable"
gtk_widget_is_drawable :: ((Ptr Widget) -> (IO CInt))
foreign import ccall safe "gtk_widget_is_toplevel"
gtk_widget_is_toplevel :: ((Ptr Widget) -> (IO CInt))
foreign import ccall safe "gtk_widget_set_window"
gtk_widget_set_window :: ((Ptr Widget) -> ((Ptr DrawWindow) -> (IO ())))
foreign import ccall safe "gtk_widget_set_receives_default"
gtk_widget_set_receives_default :: ((Ptr Widget) -> (CInt -> (IO ())))
foreign import ccall safe "gtk_widget_get_receives_default"
gtk_widget_get_receives_default :: ((Ptr Widget) -> (IO CInt))
foreign import ccall safe "gtk_widget_set_state"
gtk_widget_set_state :: ((Ptr Widget) -> (CInt -> (IO ())))
foreign import ccall safe "gtk_widget_event"
gtk_widget_event :: ((Ptr Widget) -> ((Ptr ()) -> (IO CInt)))
foreign import ccall unsafe "gdk_event_mask_get_type"
gdk_event_mask_get_type :: CULong
foreign import ccall safe "gtk_widget_has_rc_style"
gtk_widget_has_rc_style :: ((Ptr Widget) -> (IO CInt))
foreign import ccall safe "gtk_widget_get_realized"
gtk_widget_get_realized :: ((Ptr Widget) -> (IO CInt))
foreign import ccall safe "gtk_widget_get_mapped"
gtk_widget_get_mapped :: ((Ptr Widget) -> (IO CInt))
foreign import ccall safe "gtk_widget_set_realized"
gtk_widget_set_realized :: ((Ptr Widget) -> (CInt -> (IO ())))
foreign import ccall safe "gtk_widget_set_mapped"
gtk_widget_set_mapped :: ((Ptr Widget) -> (CInt -> (IO ())))