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

A 'GI.Gdk.Objects.FrameClock.FrameClock' tells the application when to update and repaint a
window. This may be synced to the vertical refresh rate of the
monitor, for example. Even when the frame clock uses a simple timer
rather than a hardware-based vertical sync, the frame clock helps
because it ensures everything paints at the same time (reducing the
total number of frames). The frame clock can also automatically
stop painting when it knows the frames will not be visible, or
scale back animation framerates.

'GI.Gdk.Objects.FrameClock.FrameClock' is designed to be compatible with an OpenGL-based
implementation or with mozRequestAnimationFrame in Firefox,
for example.

A frame clock is idle until someone requests a frame with
'GI.Gdk.Objects.FrameClock.frameClockRequestPhase'. At some later point that makes
sense for the synchronization being implemented, the clock will
process a frame and emit signals for each phase that has been
requested. (See the signals of the 'GI.Gdk.Objects.FrameClock.FrameClock' class for
documentation of the phases. 'GI.Gdk.Flags.FrameClockPhaseUpdate' and the
'GI.Gdk.Objects.FrameClock.FrameClock'::@/update/@ signal are most interesting for application
writers, and are used to update the animations, using the frame time
given by 'GI.Gdk.Objects.FrameClock.frameClockGetFrameTime'.

The frame time is reported in microseconds and generally in the same
timescale as 'GI.GLib.Functions.getMonotonicTime', however, it is not the same
as 'GI.GLib.Functions.getMonotonicTime'. The frame time does not advance during
the time a frame is being painted, and outside of a frame, an attempt
is made so that all calls to 'GI.Gdk.Objects.FrameClock.frameClockGetFrameTime' that
are called at a “similar” time get the same value. This means that
if different animations are timed by looking at the difference in
time between an initial value from 'GI.Gdk.Objects.FrameClock.frameClockGetFrameTime'
and the value inside the 'GI.Gdk.Objects.FrameClock.FrameClock'::@/update/@ signal of the clock,
they will stay exactly synchronized.
-}

module GI.Gdk.Objects.FrameClock
    ( 

-- * Exported types
    FrameClock(..)                          ,
    IsFrameClock                            ,
    toFrameClock                            ,
    noFrameClock                            ,


 -- * Methods
-- ** beginUpdating #method:beginUpdating#
    FrameClockBeginUpdatingMethodInfo       ,
    frameClockBeginUpdating                 ,


-- ** endUpdating #method:endUpdating#
    FrameClockEndUpdatingMethodInfo         ,
    frameClockEndUpdating                   ,


-- ** getCurrentTimings #method:getCurrentTimings#
    FrameClockGetCurrentTimingsMethodInfo   ,
    frameClockGetCurrentTimings             ,


-- ** getFrameCounter #method:getFrameCounter#
    FrameClockGetFrameCounterMethodInfo     ,
    frameClockGetFrameCounter               ,


-- ** getFrameTime #method:getFrameTime#
    FrameClockGetFrameTimeMethodInfo        ,
    frameClockGetFrameTime                  ,


-- ** getHistoryStart #method:getHistoryStart#
    FrameClockGetHistoryStartMethodInfo     ,
    frameClockGetHistoryStart               ,


-- ** getRefreshInfo #method:getRefreshInfo#
    FrameClockGetRefreshInfoMethodInfo      ,
    frameClockGetRefreshInfo                ,


-- ** getTimings #method:getTimings#
    FrameClockGetTimingsMethodInfo          ,
    frameClockGetTimings                    ,


-- ** requestPhase #method:requestPhase#
    FrameClockRequestPhaseMethodInfo        ,
    frameClockRequestPhase                  ,




 -- * Signals
-- ** afterPaint #signal:afterPaint#
    C_FrameClockAfterPaintCallback          ,
    FrameClockAfterPaintCallback            ,
    FrameClockAfterPaintSignalInfo          ,
    afterFrameClockAfterPaint               ,
    genClosure_FrameClockAfterPaint         ,
    mk_FrameClockAfterPaintCallback         ,
    noFrameClockAfterPaintCallback          ,
    onFrameClockAfterPaint                  ,
    wrap_FrameClockAfterPaintCallback       ,


-- ** beforePaint #signal:beforePaint#
    C_FrameClockBeforePaintCallback         ,
    FrameClockBeforePaintCallback           ,
    FrameClockBeforePaintSignalInfo         ,
    afterFrameClockBeforePaint              ,
    genClosure_FrameClockBeforePaint        ,
    mk_FrameClockBeforePaintCallback        ,
    noFrameClockBeforePaintCallback         ,
    onFrameClockBeforePaint                 ,
    wrap_FrameClockBeforePaintCallback      ,


-- ** flushEvents #signal:flushEvents#
    C_FrameClockFlushEventsCallback         ,
    FrameClockFlushEventsCallback           ,
    FrameClockFlushEventsSignalInfo         ,
    afterFrameClockFlushEvents              ,
    genClosure_FrameClockFlushEvents        ,
    mk_FrameClockFlushEventsCallback        ,
    noFrameClockFlushEventsCallback         ,
    onFrameClockFlushEvents                 ,
    wrap_FrameClockFlushEventsCallback      ,


-- ** layout #signal:layout#
    C_FrameClockLayoutCallback              ,
    FrameClockLayoutCallback                ,
    FrameClockLayoutSignalInfo              ,
    afterFrameClockLayout                   ,
    genClosure_FrameClockLayout             ,
    mk_FrameClockLayoutCallback             ,
    noFrameClockLayoutCallback              ,
    onFrameClockLayout                      ,
    wrap_FrameClockLayoutCallback           ,


-- ** paint #signal:paint#
    C_FrameClockPaintCallback               ,
    FrameClockPaintCallback                 ,
    FrameClockPaintSignalInfo               ,
    afterFrameClockPaint                    ,
    genClosure_FrameClockPaint              ,
    mk_FrameClockPaintCallback              ,
    noFrameClockPaintCallback               ,
    onFrameClockPaint                       ,
    wrap_FrameClockPaintCallback            ,


-- ** resumeEvents #signal:resumeEvents#
    C_FrameClockResumeEventsCallback        ,
    FrameClockResumeEventsCallback          ,
    FrameClockResumeEventsSignalInfo        ,
    afterFrameClockResumeEvents             ,
    genClosure_FrameClockResumeEvents       ,
    mk_FrameClockResumeEventsCallback       ,
    noFrameClockResumeEventsCallback        ,
    onFrameClockResumeEvents                ,
    wrap_FrameClockResumeEventsCallback     ,


-- ** update #signal:update#
    C_FrameClockUpdateCallback              ,
    FrameClockUpdateCallback                ,
    FrameClockUpdateSignalInfo              ,
    afterFrameClockUpdate                   ,
    genClosure_FrameClockUpdate             ,
    mk_FrameClockUpdateCallback             ,
    noFrameClockUpdateCallback              ,
    onFrameClockUpdate                      ,
    wrap_FrameClockUpdateCallback           ,




    ) where

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

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

import qualified GI.GObject.Objects.Object as GObject.Object
import {-# SOURCE #-} qualified GI.Gdk.Flags as Gdk.Flags
import {-# SOURCE #-} qualified GI.Gdk.Structs.FrameTimings as Gdk.FrameTimings

newtype FrameClock = FrameClock (ManagedPtr FrameClock)
foreign import ccall "gdk_frame_clock_get_type"
    c_gdk_frame_clock_get_type :: IO GType

instance GObject FrameClock where
    gobjectType _ = c_gdk_frame_clock_get_type
    

class GObject o => IsFrameClock o
#if MIN_VERSION_base(4,9,0)
instance {-# OVERLAPPABLE #-} (GObject a, O.UnknownAncestorError FrameClock a) =>
    IsFrameClock a
#endif
instance IsFrameClock FrameClock
instance GObject.Object.IsObject FrameClock

toFrameClock :: IsFrameClock o => o -> IO FrameClock
toFrameClock = unsafeCastTo FrameClock

noFrameClock :: Maybe FrameClock
noFrameClock = Nothing

type family ResolveFrameClockMethod (t :: Symbol) (o :: *) :: * where
    ResolveFrameClockMethod "beginUpdating" o = FrameClockBeginUpdatingMethodInfo
    ResolveFrameClockMethod "bindProperty" o = GObject.Object.ObjectBindPropertyMethodInfo
    ResolveFrameClockMethod "bindPropertyFull" o = GObject.Object.ObjectBindPropertyFullMethodInfo
    ResolveFrameClockMethod "endUpdating" o = FrameClockEndUpdatingMethodInfo
    ResolveFrameClockMethod "forceFloating" o = GObject.Object.ObjectForceFloatingMethodInfo
    ResolveFrameClockMethod "freezeNotify" o = GObject.Object.ObjectFreezeNotifyMethodInfo
    ResolveFrameClockMethod "isFloating" o = GObject.Object.ObjectIsFloatingMethodInfo
    ResolveFrameClockMethod "notify" o = GObject.Object.ObjectNotifyMethodInfo
    ResolveFrameClockMethod "notifyByPspec" o = GObject.Object.ObjectNotifyByPspecMethodInfo
    ResolveFrameClockMethod "ref" o = GObject.Object.ObjectRefMethodInfo
    ResolveFrameClockMethod "refSink" o = GObject.Object.ObjectRefSinkMethodInfo
    ResolveFrameClockMethod "replaceData" o = GObject.Object.ObjectReplaceDataMethodInfo
    ResolveFrameClockMethod "replaceQdata" o = GObject.Object.ObjectReplaceQdataMethodInfo
    ResolveFrameClockMethod "requestPhase" o = FrameClockRequestPhaseMethodInfo
    ResolveFrameClockMethod "runDispose" o = GObject.Object.ObjectRunDisposeMethodInfo
    ResolveFrameClockMethod "stealData" o = GObject.Object.ObjectStealDataMethodInfo
    ResolveFrameClockMethod "stealQdata" o = GObject.Object.ObjectStealQdataMethodInfo
    ResolveFrameClockMethod "thawNotify" o = GObject.Object.ObjectThawNotifyMethodInfo
    ResolveFrameClockMethod "unref" o = GObject.Object.ObjectUnrefMethodInfo
    ResolveFrameClockMethod "watchClosure" o = GObject.Object.ObjectWatchClosureMethodInfo
    ResolveFrameClockMethod "getCurrentTimings" o = FrameClockGetCurrentTimingsMethodInfo
    ResolveFrameClockMethod "getData" o = GObject.Object.ObjectGetDataMethodInfo
    ResolveFrameClockMethod "getFrameCounter" o = FrameClockGetFrameCounterMethodInfo
    ResolveFrameClockMethod "getFrameTime" o = FrameClockGetFrameTimeMethodInfo
    ResolveFrameClockMethod "getHistoryStart" o = FrameClockGetHistoryStartMethodInfo
    ResolveFrameClockMethod "getProperty" o = GObject.Object.ObjectGetPropertyMethodInfo
    ResolveFrameClockMethod "getQdata" o = GObject.Object.ObjectGetQdataMethodInfo
    ResolveFrameClockMethod "getRefreshInfo" o = FrameClockGetRefreshInfoMethodInfo
    ResolveFrameClockMethod "getTimings" o = FrameClockGetTimingsMethodInfo
    ResolveFrameClockMethod "setData" o = GObject.Object.ObjectSetDataMethodInfo
    ResolveFrameClockMethod "setProperty" o = GObject.Object.ObjectSetPropertyMethodInfo
    ResolveFrameClockMethod l o = O.MethodResolutionFailed l o

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

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

-- signal FrameClock::after-paint
type FrameClockAfterPaintCallback =
    IO ()

noFrameClockAfterPaintCallback :: Maybe FrameClockAfterPaintCallback
noFrameClockAfterPaintCallback = Nothing

type C_FrameClockAfterPaintCallback =
    Ptr () ->                               -- object
    Ptr () ->                               -- user_data
    IO ()

foreign import ccall "wrapper"
    mk_FrameClockAfterPaintCallback :: C_FrameClockAfterPaintCallback -> IO (FunPtr C_FrameClockAfterPaintCallback)

genClosure_FrameClockAfterPaint :: FrameClockAfterPaintCallback -> IO Closure
genClosure_FrameClockAfterPaint cb = do
    let cb' = wrap_FrameClockAfterPaintCallback cb
    mk_FrameClockAfterPaintCallback cb' >>= newCClosure


wrap_FrameClockAfterPaintCallback ::
    FrameClockAfterPaintCallback ->
    Ptr () ->
    Ptr () ->
    IO ()
wrap_FrameClockAfterPaintCallback _cb _ _ = do
    _cb 


onFrameClockAfterPaint :: (GObject a, MonadIO m) => a -> FrameClockAfterPaintCallback -> m SignalHandlerId
onFrameClockAfterPaint obj cb = liftIO $ connectFrameClockAfterPaint obj cb SignalConnectBefore
afterFrameClockAfterPaint :: (GObject a, MonadIO m) => a -> FrameClockAfterPaintCallback -> m SignalHandlerId
afterFrameClockAfterPaint obj cb = connectFrameClockAfterPaint obj cb SignalConnectAfter

connectFrameClockAfterPaint :: (GObject a, MonadIO m) =>
                               a -> FrameClockAfterPaintCallback -> SignalConnectMode -> m SignalHandlerId
connectFrameClockAfterPaint obj cb after = liftIO $ do
    let cb' = wrap_FrameClockAfterPaintCallback cb
    cb'' <- mk_FrameClockAfterPaintCallback cb'
    connectSignalFunPtr obj "after-paint" cb'' after

-- signal FrameClock::before-paint
type FrameClockBeforePaintCallback =
    IO ()

noFrameClockBeforePaintCallback :: Maybe FrameClockBeforePaintCallback
noFrameClockBeforePaintCallback = Nothing

type C_FrameClockBeforePaintCallback =
    Ptr () ->                               -- object
    Ptr () ->                               -- user_data
    IO ()

foreign import ccall "wrapper"
    mk_FrameClockBeforePaintCallback :: C_FrameClockBeforePaintCallback -> IO (FunPtr C_FrameClockBeforePaintCallback)

genClosure_FrameClockBeforePaint :: FrameClockBeforePaintCallback -> IO Closure
genClosure_FrameClockBeforePaint cb = do
    let cb' = wrap_FrameClockBeforePaintCallback cb
    mk_FrameClockBeforePaintCallback cb' >>= newCClosure


wrap_FrameClockBeforePaintCallback ::
    FrameClockBeforePaintCallback ->
    Ptr () ->
    Ptr () ->
    IO ()
wrap_FrameClockBeforePaintCallback _cb _ _ = do
    _cb 


onFrameClockBeforePaint :: (GObject a, MonadIO m) => a -> FrameClockBeforePaintCallback -> m SignalHandlerId
onFrameClockBeforePaint obj cb = liftIO $ connectFrameClockBeforePaint obj cb SignalConnectBefore
afterFrameClockBeforePaint :: (GObject a, MonadIO m) => a -> FrameClockBeforePaintCallback -> m SignalHandlerId
afterFrameClockBeforePaint obj cb = connectFrameClockBeforePaint obj cb SignalConnectAfter

connectFrameClockBeforePaint :: (GObject a, MonadIO m) =>
                                a -> FrameClockBeforePaintCallback -> SignalConnectMode -> m SignalHandlerId
connectFrameClockBeforePaint obj cb after = liftIO $ do
    let cb' = wrap_FrameClockBeforePaintCallback cb
    cb'' <- mk_FrameClockBeforePaintCallback cb'
    connectSignalFunPtr obj "before-paint" cb'' after

-- signal FrameClock::flush-events
type FrameClockFlushEventsCallback =
    IO ()

noFrameClockFlushEventsCallback :: Maybe FrameClockFlushEventsCallback
noFrameClockFlushEventsCallback = Nothing

type C_FrameClockFlushEventsCallback =
    Ptr () ->                               -- object
    Ptr () ->                               -- user_data
    IO ()

foreign import ccall "wrapper"
    mk_FrameClockFlushEventsCallback :: C_FrameClockFlushEventsCallback -> IO (FunPtr C_FrameClockFlushEventsCallback)

genClosure_FrameClockFlushEvents :: FrameClockFlushEventsCallback -> IO Closure
genClosure_FrameClockFlushEvents cb = do
    let cb' = wrap_FrameClockFlushEventsCallback cb
    mk_FrameClockFlushEventsCallback cb' >>= newCClosure


wrap_FrameClockFlushEventsCallback ::
    FrameClockFlushEventsCallback ->
    Ptr () ->
    Ptr () ->
    IO ()
wrap_FrameClockFlushEventsCallback _cb _ _ = do
    _cb 


onFrameClockFlushEvents :: (GObject a, MonadIO m) => a -> FrameClockFlushEventsCallback -> m SignalHandlerId
onFrameClockFlushEvents obj cb = liftIO $ connectFrameClockFlushEvents obj cb SignalConnectBefore
afterFrameClockFlushEvents :: (GObject a, MonadIO m) => a -> FrameClockFlushEventsCallback -> m SignalHandlerId
afterFrameClockFlushEvents obj cb = connectFrameClockFlushEvents obj cb SignalConnectAfter

connectFrameClockFlushEvents :: (GObject a, MonadIO m) =>
                                a -> FrameClockFlushEventsCallback -> SignalConnectMode -> m SignalHandlerId
connectFrameClockFlushEvents obj cb after = liftIO $ do
    let cb' = wrap_FrameClockFlushEventsCallback cb
    cb'' <- mk_FrameClockFlushEventsCallback cb'
    connectSignalFunPtr obj "flush-events" cb'' after

-- signal FrameClock::layout
type FrameClockLayoutCallback =
    IO ()

noFrameClockLayoutCallback :: Maybe FrameClockLayoutCallback
noFrameClockLayoutCallback = Nothing

type C_FrameClockLayoutCallback =
    Ptr () ->                               -- object
    Ptr () ->                               -- user_data
    IO ()

foreign import ccall "wrapper"
    mk_FrameClockLayoutCallback :: C_FrameClockLayoutCallback -> IO (FunPtr C_FrameClockLayoutCallback)

genClosure_FrameClockLayout :: FrameClockLayoutCallback -> IO Closure
genClosure_FrameClockLayout cb = do
    let cb' = wrap_FrameClockLayoutCallback cb
    mk_FrameClockLayoutCallback cb' >>= newCClosure


wrap_FrameClockLayoutCallback ::
    FrameClockLayoutCallback ->
    Ptr () ->
    Ptr () ->
    IO ()
wrap_FrameClockLayoutCallback _cb _ _ = do
    _cb 


onFrameClockLayout :: (GObject a, MonadIO m) => a -> FrameClockLayoutCallback -> m SignalHandlerId
onFrameClockLayout obj cb = liftIO $ connectFrameClockLayout obj cb SignalConnectBefore
afterFrameClockLayout :: (GObject a, MonadIO m) => a -> FrameClockLayoutCallback -> m SignalHandlerId
afterFrameClockLayout obj cb = connectFrameClockLayout obj cb SignalConnectAfter

connectFrameClockLayout :: (GObject a, MonadIO m) =>
                           a -> FrameClockLayoutCallback -> SignalConnectMode -> m SignalHandlerId
connectFrameClockLayout obj cb after = liftIO $ do
    let cb' = wrap_FrameClockLayoutCallback cb
    cb'' <- mk_FrameClockLayoutCallback cb'
    connectSignalFunPtr obj "layout" cb'' after

-- signal FrameClock::paint
type FrameClockPaintCallback =
    IO ()

noFrameClockPaintCallback :: Maybe FrameClockPaintCallback
noFrameClockPaintCallback = Nothing

type C_FrameClockPaintCallback =
    Ptr () ->                               -- object
    Ptr () ->                               -- user_data
    IO ()

foreign import ccall "wrapper"
    mk_FrameClockPaintCallback :: C_FrameClockPaintCallback -> IO (FunPtr C_FrameClockPaintCallback)

genClosure_FrameClockPaint :: FrameClockPaintCallback -> IO Closure
genClosure_FrameClockPaint cb = do
    let cb' = wrap_FrameClockPaintCallback cb
    mk_FrameClockPaintCallback cb' >>= newCClosure


wrap_FrameClockPaintCallback ::
    FrameClockPaintCallback ->
    Ptr () ->
    Ptr () ->
    IO ()
wrap_FrameClockPaintCallback _cb _ _ = do
    _cb 


onFrameClockPaint :: (GObject a, MonadIO m) => a -> FrameClockPaintCallback -> m SignalHandlerId
onFrameClockPaint obj cb = liftIO $ connectFrameClockPaint obj cb SignalConnectBefore
afterFrameClockPaint :: (GObject a, MonadIO m) => a -> FrameClockPaintCallback -> m SignalHandlerId
afterFrameClockPaint obj cb = connectFrameClockPaint obj cb SignalConnectAfter

connectFrameClockPaint :: (GObject a, MonadIO m) =>
                          a -> FrameClockPaintCallback -> SignalConnectMode -> m SignalHandlerId
connectFrameClockPaint obj cb after = liftIO $ do
    let cb' = wrap_FrameClockPaintCallback cb
    cb'' <- mk_FrameClockPaintCallback cb'
    connectSignalFunPtr obj "paint" cb'' after

-- signal FrameClock::resume-events
type FrameClockResumeEventsCallback =
    IO ()

noFrameClockResumeEventsCallback :: Maybe FrameClockResumeEventsCallback
noFrameClockResumeEventsCallback = Nothing

type C_FrameClockResumeEventsCallback =
    Ptr () ->                               -- object
    Ptr () ->                               -- user_data
    IO ()

foreign import ccall "wrapper"
    mk_FrameClockResumeEventsCallback :: C_FrameClockResumeEventsCallback -> IO (FunPtr C_FrameClockResumeEventsCallback)

genClosure_FrameClockResumeEvents :: FrameClockResumeEventsCallback -> IO Closure
genClosure_FrameClockResumeEvents cb = do
    let cb' = wrap_FrameClockResumeEventsCallback cb
    mk_FrameClockResumeEventsCallback cb' >>= newCClosure


wrap_FrameClockResumeEventsCallback ::
    FrameClockResumeEventsCallback ->
    Ptr () ->
    Ptr () ->
    IO ()
wrap_FrameClockResumeEventsCallback _cb _ _ = do
    _cb 


onFrameClockResumeEvents :: (GObject a, MonadIO m) => a -> FrameClockResumeEventsCallback -> m SignalHandlerId
onFrameClockResumeEvents obj cb = liftIO $ connectFrameClockResumeEvents obj cb SignalConnectBefore
afterFrameClockResumeEvents :: (GObject a, MonadIO m) => a -> FrameClockResumeEventsCallback -> m SignalHandlerId
afterFrameClockResumeEvents obj cb = connectFrameClockResumeEvents obj cb SignalConnectAfter

connectFrameClockResumeEvents :: (GObject a, MonadIO m) =>
                                 a -> FrameClockResumeEventsCallback -> SignalConnectMode -> m SignalHandlerId
connectFrameClockResumeEvents obj cb after = liftIO $ do
    let cb' = wrap_FrameClockResumeEventsCallback cb
    cb'' <- mk_FrameClockResumeEventsCallback cb'
    connectSignalFunPtr obj "resume-events" cb'' after

-- signal FrameClock::update
type FrameClockUpdateCallback =
    IO ()

noFrameClockUpdateCallback :: Maybe FrameClockUpdateCallback
noFrameClockUpdateCallback = Nothing

type C_FrameClockUpdateCallback =
    Ptr () ->                               -- object
    Ptr () ->                               -- user_data
    IO ()

foreign import ccall "wrapper"
    mk_FrameClockUpdateCallback :: C_FrameClockUpdateCallback -> IO (FunPtr C_FrameClockUpdateCallback)

genClosure_FrameClockUpdate :: FrameClockUpdateCallback -> IO Closure
genClosure_FrameClockUpdate cb = do
    let cb' = wrap_FrameClockUpdateCallback cb
    mk_FrameClockUpdateCallback cb' >>= newCClosure


wrap_FrameClockUpdateCallback ::
    FrameClockUpdateCallback ->
    Ptr () ->
    Ptr () ->
    IO ()
wrap_FrameClockUpdateCallback _cb _ _ = do
    _cb 


onFrameClockUpdate :: (GObject a, MonadIO m) => a -> FrameClockUpdateCallback -> m SignalHandlerId
onFrameClockUpdate obj cb = liftIO $ connectFrameClockUpdate obj cb SignalConnectBefore
afterFrameClockUpdate :: (GObject a, MonadIO m) => a -> FrameClockUpdateCallback -> m SignalHandlerId
afterFrameClockUpdate obj cb = connectFrameClockUpdate obj cb SignalConnectAfter

connectFrameClockUpdate :: (GObject a, MonadIO m) =>
                           a -> FrameClockUpdateCallback -> SignalConnectMode -> m SignalHandlerId
connectFrameClockUpdate obj cb after = liftIO $ do
    let cb' = wrap_FrameClockUpdateCallback cb
    cb'' <- mk_FrameClockUpdateCallback cb'
    connectSignalFunPtr obj "update" cb'' after

instance O.HasAttributeList FrameClock
type instance O.AttributeList FrameClock = FrameClockAttributeList
type FrameClockAttributeList = ('[ ] :: [(Symbol, *)])

data FrameClockAfterPaintSignalInfo
instance SignalInfo FrameClockAfterPaintSignalInfo where
    type HaskellCallbackType FrameClockAfterPaintSignalInfo = FrameClockAfterPaintCallback
    connectSignal _ = connectFrameClockAfterPaint

data FrameClockBeforePaintSignalInfo
instance SignalInfo FrameClockBeforePaintSignalInfo where
    type HaskellCallbackType FrameClockBeforePaintSignalInfo = FrameClockBeforePaintCallback
    connectSignal _ = connectFrameClockBeforePaint

data FrameClockFlushEventsSignalInfo
instance SignalInfo FrameClockFlushEventsSignalInfo where
    type HaskellCallbackType FrameClockFlushEventsSignalInfo = FrameClockFlushEventsCallback
    connectSignal _ = connectFrameClockFlushEvents

data FrameClockLayoutSignalInfo
instance SignalInfo FrameClockLayoutSignalInfo where
    type HaskellCallbackType FrameClockLayoutSignalInfo = FrameClockLayoutCallback
    connectSignal _ = connectFrameClockLayout

data FrameClockPaintSignalInfo
instance SignalInfo FrameClockPaintSignalInfo where
    type HaskellCallbackType FrameClockPaintSignalInfo = FrameClockPaintCallback
    connectSignal _ = connectFrameClockPaint

data FrameClockResumeEventsSignalInfo
instance SignalInfo FrameClockResumeEventsSignalInfo where
    type HaskellCallbackType FrameClockResumeEventsSignalInfo = FrameClockResumeEventsCallback
    connectSignal _ = connectFrameClockResumeEvents

data FrameClockUpdateSignalInfo
instance SignalInfo FrameClockUpdateSignalInfo where
    type HaskellCallbackType FrameClockUpdateSignalInfo = FrameClockUpdateCallback
    connectSignal _ = connectFrameClockUpdate

type instance O.SignalList FrameClock = FrameClockSignalList
type FrameClockSignalList = ('[ '("afterPaint", FrameClockAfterPaintSignalInfo), '("beforePaint", FrameClockBeforePaintSignalInfo), '("flushEvents", FrameClockFlushEventsSignalInfo), '("layout", FrameClockLayoutSignalInfo), '("notify", GObject.Object.ObjectNotifySignalInfo), '("paint", FrameClockPaintSignalInfo), '("resumeEvents", FrameClockResumeEventsSignalInfo), '("update", FrameClockUpdateSignalInfo)] :: [(Symbol, *)])

-- method FrameClock::begin_updating
-- method type : OrdinaryMethod
-- Args : [Arg {argCName = "frame_clock", argType = TInterface (Name {namespace = "Gdk", name = "FrameClock"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GdkFrameClock", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]
-- Lengths : []
-- returnType : Nothing
-- throws : False
-- Skip return : False

foreign import ccall "gdk_frame_clock_begin_updating" gdk_frame_clock_begin_updating :: 
    Ptr FrameClock ->                       -- frame_clock : TInterface (Name {namespace = "Gdk", name = "FrameClock"})
    IO ()

{- |
Starts updates for an animation. Until a matching call to
'GI.Gdk.Objects.FrameClock.frameClockEndUpdating' is made, the frame clock will continually
request a new frame with the 'GI.Gdk.Flags.FrameClockPhaseUpdate' phase.
This function may be called multiple times and frames will be
requested until 'GI.Gdk.Objects.FrameClock.frameClockEndUpdating' is called the same
number of times.

@since 3.8
-}
frameClockBeginUpdating ::
    (B.CallStack.HasCallStack, MonadIO m, IsFrameClock a) =>
    a
    {- ^ /@frameClock@/: a 'GI.Gdk.Objects.FrameClock.FrameClock' -}
    -> m ()
frameClockBeginUpdating frameClock = liftIO $ do
    frameClock' <- unsafeManagedPtrCastPtr frameClock
    gdk_frame_clock_begin_updating frameClock'
    touchManagedPtr frameClock
    return ()

data FrameClockBeginUpdatingMethodInfo
instance (signature ~ (m ()), MonadIO m, IsFrameClock a) => O.MethodInfo FrameClockBeginUpdatingMethodInfo a signature where
    overloadedMethod _ = frameClockBeginUpdating

-- method FrameClock::end_updating
-- method type : OrdinaryMethod
-- Args : [Arg {argCName = "frame_clock", argType = TInterface (Name {namespace = "Gdk", name = "FrameClock"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GdkFrameClock", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]
-- Lengths : []
-- returnType : Nothing
-- throws : False
-- Skip return : False

foreign import ccall "gdk_frame_clock_end_updating" gdk_frame_clock_end_updating :: 
    Ptr FrameClock ->                       -- frame_clock : TInterface (Name {namespace = "Gdk", name = "FrameClock"})
    IO ()

{- |
Stops updates for an animation. See the documentation for
'GI.Gdk.Objects.FrameClock.frameClockBeginUpdating'.

@since 3.8
-}
frameClockEndUpdating ::
    (B.CallStack.HasCallStack, MonadIO m, IsFrameClock a) =>
    a
    {- ^ /@frameClock@/: a 'GI.Gdk.Objects.FrameClock.FrameClock' -}
    -> m ()
frameClockEndUpdating frameClock = liftIO $ do
    frameClock' <- unsafeManagedPtrCastPtr frameClock
    gdk_frame_clock_end_updating frameClock'
    touchManagedPtr frameClock
    return ()

data FrameClockEndUpdatingMethodInfo
instance (signature ~ (m ()), MonadIO m, IsFrameClock a) => O.MethodInfo FrameClockEndUpdatingMethodInfo a signature where
    overloadedMethod _ = frameClockEndUpdating

-- method FrameClock::get_current_timings
-- method type : OrdinaryMethod
-- Args : [Arg {argCName = "frame_clock", argType = TInterface (Name {namespace = "Gdk", name = "FrameClock"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GdkFrameClock", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]
-- Lengths : []
-- returnType : Just (TInterface (Name {namespace = "Gdk", name = "FrameTimings"}))
-- throws : False
-- Skip return : False

foreign import ccall "gdk_frame_clock_get_current_timings" gdk_frame_clock_get_current_timings :: 
    Ptr FrameClock ->                       -- frame_clock : TInterface (Name {namespace = "Gdk", name = "FrameClock"})
    IO (Ptr Gdk.FrameTimings.FrameTimings)

{- |
Gets the frame timings for the current frame.

@since 3.8
-}
frameClockGetCurrentTimings ::
    (B.CallStack.HasCallStack, MonadIO m, IsFrameClock a) =>
    a
    {- ^ /@frameClock@/: a 'GI.Gdk.Objects.FrameClock.FrameClock' -}
    -> m (Maybe Gdk.FrameTimings.FrameTimings)
    {- ^ __Returns:__ the 'GI.Gdk.Structs.FrameTimings.FrameTimings' for the frame currently
 being processed, or even no frame is being processed, for the
 previous frame. Before any frames have been procesed, returns
 'Nothing'. -}
frameClockGetCurrentTimings frameClock = liftIO $ do
    frameClock' <- unsafeManagedPtrCastPtr frameClock
    result <- gdk_frame_clock_get_current_timings frameClock'
    maybeResult <- convertIfNonNull result $ \result' -> do
        result'' <- (wrapBoxed Gdk.FrameTimings.FrameTimings) result'
        return result''
    touchManagedPtr frameClock
    return maybeResult

data FrameClockGetCurrentTimingsMethodInfo
instance (signature ~ (m (Maybe Gdk.FrameTimings.FrameTimings)), MonadIO m, IsFrameClock a) => O.MethodInfo FrameClockGetCurrentTimingsMethodInfo a signature where
    overloadedMethod _ = frameClockGetCurrentTimings

-- method FrameClock::get_frame_counter
-- method type : OrdinaryMethod
-- Args : [Arg {argCName = "frame_clock", argType = TInterface (Name {namespace = "Gdk", name = "FrameClock"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GdkFrameClock", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]
-- Lengths : []
-- returnType : Just (TBasicType TInt64)
-- throws : False
-- Skip return : False

foreign import ccall "gdk_frame_clock_get_frame_counter" gdk_frame_clock_get_frame_counter :: 
    Ptr FrameClock ->                       -- frame_clock : TInterface (Name {namespace = "Gdk", name = "FrameClock"})
    IO Int64

{- |
A 'GI.Gdk.Objects.FrameClock.FrameClock' maintains a 64-bit counter that increments for
each frame drawn.

@since 3.8
-}
frameClockGetFrameCounter ::
    (B.CallStack.HasCallStack, MonadIO m, IsFrameClock a) =>
    a
    {- ^ /@frameClock@/: a 'GI.Gdk.Objects.FrameClock.FrameClock' -}
    -> m Int64
    {- ^ __Returns:__ inside frame processing, the value of the frame counter
 for the current frame. Outside of frame processing, the frame
  counter for the last frame. -}
frameClockGetFrameCounter frameClock = liftIO $ do
    frameClock' <- unsafeManagedPtrCastPtr frameClock
    result <- gdk_frame_clock_get_frame_counter frameClock'
    touchManagedPtr frameClock
    return result

data FrameClockGetFrameCounterMethodInfo
instance (signature ~ (m Int64), MonadIO m, IsFrameClock a) => O.MethodInfo FrameClockGetFrameCounterMethodInfo a signature where
    overloadedMethod _ = frameClockGetFrameCounter

-- method FrameClock::get_frame_time
-- method type : OrdinaryMethod
-- Args : [Arg {argCName = "frame_clock", argType = TInterface (Name {namespace = "Gdk", name = "FrameClock"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GdkFrameClock", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]
-- Lengths : []
-- returnType : Just (TBasicType TInt64)
-- throws : False
-- Skip return : False

foreign import ccall "gdk_frame_clock_get_frame_time" gdk_frame_clock_get_frame_time :: 
    Ptr FrameClock ->                       -- frame_clock : TInterface (Name {namespace = "Gdk", name = "FrameClock"})
    IO Int64

{- |
Gets the time that should currently be used for animations.  Inside
the processing of a frame, it’s the time used to compute the
animation position of everything in a frame. Outside of a frame, it\'s
the time of the conceptual “previous frame,” which may be either
the actual previous frame time, or if that’s too old, an updated
time.

@since 3.8
-}
frameClockGetFrameTime ::
    (B.CallStack.HasCallStack, MonadIO m, IsFrameClock a) =>
    a
    {- ^ /@frameClock@/: a 'GI.Gdk.Objects.FrameClock.FrameClock' -}
    -> m Int64
    {- ^ __Returns:__ a timestamp in microseconds, in the timescale of
 of 'GI.GLib.Functions.getMonotonicTime'. -}
frameClockGetFrameTime frameClock = liftIO $ do
    frameClock' <- unsafeManagedPtrCastPtr frameClock
    result <- gdk_frame_clock_get_frame_time frameClock'
    touchManagedPtr frameClock
    return result

data FrameClockGetFrameTimeMethodInfo
instance (signature ~ (m Int64), MonadIO m, IsFrameClock a) => O.MethodInfo FrameClockGetFrameTimeMethodInfo a signature where
    overloadedMethod _ = frameClockGetFrameTime

-- method FrameClock::get_history_start
-- method type : OrdinaryMethod
-- Args : [Arg {argCName = "frame_clock", argType = TInterface (Name {namespace = "Gdk", name = "FrameClock"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GdkFrameClock", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]
-- Lengths : []
-- returnType : Just (TBasicType TInt64)
-- throws : False
-- Skip return : False

foreign import ccall "gdk_frame_clock_get_history_start" gdk_frame_clock_get_history_start :: 
    Ptr FrameClock ->                       -- frame_clock : TInterface (Name {namespace = "Gdk", name = "FrameClock"})
    IO Int64

{- |
'GI.Gdk.Objects.FrameClock.FrameClock' internally keeps a history of 'GI.Gdk.Structs.FrameTimings.FrameTimings'
objects for recent frames that can be retrieved with
'GI.Gdk.Objects.FrameClock.frameClockGetTimings'. The set of stored frames
is the set from the counter values given by
'GI.Gdk.Objects.FrameClock.frameClockGetHistoryStart' and
'GI.Gdk.Objects.FrameClock.frameClockGetFrameCounter', inclusive.

@since 3.8
-}
frameClockGetHistoryStart ::
    (B.CallStack.HasCallStack, MonadIO m, IsFrameClock a) =>
    a
    {- ^ /@frameClock@/: a 'GI.Gdk.Objects.FrameClock.FrameClock' -}
    -> m Int64
    {- ^ __Returns:__ the frame counter value for the oldest frame
 that is available in the internal frame history of the
 'GI.Gdk.Objects.FrameClock.FrameClock'. -}
frameClockGetHistoryStart frameClock = liftIO $ do
    frameClock' <- unsafeManagedPtrCastPtr frameClock
    result <- gdk_frame_clock_get_history_start frameClock'
    touchManagedPtr frameClock
    return result

data FrameClockGetHistoryStartMethodInfo
instance (signature ~ (m Int64), MonadIO m, IsFrameClock a) => O.MethodInfo FrameClockGetHistoryStartMethodInfo a signature where
    overloadedMethod _ = frameClockGetHistoryStart

-- method FrameClock::get_refresh_info
-- method type : OrdinaryMethod
-- Args : [Arg {argCName = "frame_clock", argType = TInterface (Name {namespace = "Gdk", name = "FrameClock"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GdkFrameClock", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "base_time", argType = TBasicType TInt64, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "base time for determining a presentaton time", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "refresh_interval_return", argType = TBasicType TInt64, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a location to store the determined refresh\n interval, or %NULL. A default refresh interval of 1/60th of\n a second will be stored if no history is present.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "presentation_time_return", argType = TBasicType TInt64, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a location to store the next\n candidate presentation time after the given base time.\n 0 will be will be stored if no history is present.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]
-- Lengths : []
-- returnType : Nothing
-- throws : False
-- Skip return : False

foreign import ccall "gdk_frame_clock_get_refresh_info" gdk_frame_clock_get_refresh_info :: 
    Ptr FrameClock ->                       -- frame_clock : TInterface (Name {namespace = "Gdk", name = "FrameClock"})
    Int64 ->                                -- base_time : TBasicType TInt64
    Int64 ->                                -- refresh_interval_return : TBasicType TInt64
    Int64 ->                                -- presentation_time_return : TBasicType TInt64
    IO ()

{- |
Using the frame history stored in the frame clock, finds the last
known presentation time and refresh interval, and assuming that
presentation times are separated by the refresh interval,
predicts a presentation time that is a multiple of the refresh
interval after the last presentation time, and later than /@baseTime@/.

@since 3.8
-}
frameClockGetRefreshInfo ::
    (B.CallStack.HasCallStack, MonadIO m, IsFrameClock a) =>
    a
    {- ^ /@frameClock@/: a 'GI.Gdk.Objects.FrameClock.FrameClock' -}
    -> Int64
    {- ^ /@baseTime@/: base time for determining a presentaton time -}
    -> Int64
    {- ^ /@refreshIntervalReturn@/: a location to store the determined refresh
 interval, or 'Nothing'. A default refresh interval of 1\/60th of
 a second will be stored if no history is present. -}
    -> Int64
    {- ^ /@presentationTimeReturn@/: a location to store the next
 candidate presentation time after the given base time.
 0 will be will be stored if no history is present. -}
    -> m ()
frameClockGetRefreshInfo frameClock baseTime refreshIntervalReturn presentationTimeReturn = liftIO $ do
    frameClock' <- unsafeManagedPtrCastPtr frameClock
    gdk_frame_clock_get_refresh_info frameClock' baseTime refreshIntervalReturn presentationTimeReturn
    touchManagedPtr frameClock
    return ()

data FrameClockGetRefreshInfoMethodInfo
instance (signature ~ (Int64 -> Int64 -> Int64 -> m ()), MonadIO m, IsFrameClock a) => O.MethodInfo FrameClockGetRefreshInfoMethodInfo a signature where
    overloadedMethod _ = frameClockGetRefreshInfo

-- method FrameClock::get_timings
-- method type : OrdinaryMethod
-- Args : [Arg {argCName = "frame_clock", argType = TInterface (Name {namespace = "Gdk", name = "FrameClock"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GdkFrameClock", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "frame_counter", argType = TBasicType TInt64, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the frame counter value identifying the frame to\n be received.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]
-- Lengths : []
-- returnType : Just (TInterface (Name {namespace = "Gdk", name = "FrameTimings"}))
-- throws : False
-- Skip return : False

foreign import ccall "gdk_frame_clock_get_timings" gdk_frame_clock_get_timings :: 
    Ptr FrameClock ->                       -- frame_clock : TInterface (Name {namespace = "Gdk", name = "FrameClock"})
    Int64 ->                                -- frame_counter : TBasicType TInt64
    IO (Ptr Gdk.FrameTimings.FrameTimings)

{- |
Retrieves a 'GI.Gdk.Structs.FrameTimings.FrameTimings' object holding timing information
for the current frame or a recent frame. The 'GI.Gdk.Structs.FrameTimings.FrameTimings'
object may not yet be complete: see 'GI.Gdk.Structs.FrameTimings.frameTimingsGetComplete'.

@since 3.8
-}
frameClockGetTimings ::
    (B.CallStack.HasCallStack, MonadIO m, IsFrameClock a) =>
    a
    {- ^ /@frameClock@/: a 'GI.Gdk.Objects.FrameClock.FrameClock' -}
    -> Int64
    {- ^ /@frameCounter@/: the frame counter value identifying the frame to
 be received. -}
    -> m (Maybe Gdk.FrameTimings.FrameTimings)
    {- ^ __Returns:__ the 'GI.Gdk.Structs.FrameTimings.FrameTimings' object for the specified
 frame, or 'Nothing' if it is not available. See
 'GI.Gdk.Objects.FrameClock.frameClockGetHistoryStart'. -}
frameClockGetTimings frameClock frameCounter = liftIO $ do
    frameClock' <- unsafeManagedPtrCastPtr frameClock
    result <- gdk_frame_clock_get_timings frameClock' frameCounter
    maybeResult <- convertIfNonNull result $ \result' -> do
        result'' <- (wrapBoxed Gdk.FrameTimings.FrameTimings) result'
        return result''
    touchManagedPtr frameClock
    return maybeResult

data FrameClockGetTimingsMethodInfo
instance (signature ~ (Int64 -> m (Maybe Gdk.FrameTimings.FrameTimings)), MonadIO m, IsFrameClock a) => O.MethodInfo FrameClockGetTimingsMethodInfo a signature where
    overloadedMethod _ = frameClockGetTimings

-- method FrameClock::request_phase
-- method type : OrdinaryMethod
-- Args : [Arg {argCName = "frame_clock", argType = TInterface (Name {namespace = "Gdk", name = "FrameClock"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GdkFrameClock", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "phase", argType = TInterface (Name {namespace = "Gdk", name = "FrameClockPhase"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the phase that is requested", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]
-- Lengths : []
-- returnType : Nothing
-- throws : False
-- Skip return : False

foreign import ccall "gdk_frame_clock_request_phase" gdk_frame_clock_request_phase :: 
    Ptr FrameClock ->                       -- frame_clock : TInterface (Name {namespace = "Gdk", name = "FrameClock"})
    CUInt ->                                -- phase : TInterface (Name {namespace = "Gdk", name = "FrameClockPhase"})
    IO ()

{- |
Asks the frame clock to run a particular phase. The signal
corresponding the requested phase will be emitted the next
time the frame clock processes. Multiple calls to
'GI.Gdk.Objects.FrameClock.frameClockRequestPhase' will be combined together
and only one frame processed. If you are displaying animated
content and want to continually request the
'GI.Gdk.Flags.FrameClockPhaseUpdate' phase for a period of time,
you should use 'GI.Gdk.Objects.FrameClock.frameClockBeginUpdating' instead, since
this allows GTK+ to adjust system parameters to get maximally
smooth animations.

@since 3.8
-}
frameClockRequestPhase ::
    (B.CallStack.HasCallStack, MonadIO m, IsFrameClock a) =>
    a
    {- ^ /@frameClock@/: a 'GI.Gdk.Objects.FrameClock.FrameClock' -}
    -> [Gdk.Flags.FrameClockPhase]
    {- ^ /@phase@/: the phase that is requested -}
    -> m ()
frameClockRequestPhase frameClock phase = liftIO $ do
    frameClock' <- unsafeManagedPtrCastPtr frameClock
    let phase' = gflagsToWord phase
    gdk_frame_clock_request_phase frameClock' phase'
    touchManagedPtr frameClock
    return ()

data FrameClockRequestPhaseMethodInfo
instance (signature ~ ([Gdk.Flags.FrameClockPhase] -> m ()), MonadIO m, IsFrameClock a) => O.MethodInfo FrameClockRequestPhaseMethodInfo a signature where
    overloadedMethod _ = frameClockRequestPhase