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

Generated when the owner of a selection changes. On X11, this
information is only available if the X server supports the XFIXES
extension.

/Since: 2.6/
-}

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

module GI.Gdk.Structs.EventOwnerChange
    (

-- * Exported types
    EventOwnerChange(..)                    ,
    newZeroEventOwnerChange                 ,
    noEventOwnerChange                      ,


 -- * Properties
-- ** owner #attr:owner#
{- | the new owner of the selection, or 'Nothing' if there is none
-}
    clearEventOwnerChangeOwner              ,
#if ENABLE_OVERLOADING
    eventOwnerChange_owner                  ,
#endif
    getEventOwnerChangeOwner                ,
    setEventOwnerChangeOwner                ,


-- ** reason #attr:reason#
{- | the reason for the ownership change as a 'GI.Gdk.Enums.OwnerChange' value
-}
#if ENABLE_OVERLOADING
    eventOwnerChange_reason                 ,
#endif
    getEventOwnerChangeReason               ,
    setEventOwnerChangeReason               ,


-- ** selection #attr:selection#
{- | the atom identifying the selection
-}
#if ENABLE_OVERLOADING
    eventOwnerChange_selection              ,
#endif
    getEventOwnerChangeSelection            ,


-- ** selectionTime #attr:selectionTime#
{- | the time at which the selection ownership was taken
  over
-}
#if ENABLE_OVERLOADING
    eventOwnerChange_selectionTime          ,
#endif
    getEventOwnerChangeSelectionTime        ,
    setEventOwnerChangeSelectionTime        ,


-- ** sendEvent #attr:sendEvent#
{- | 'True' if the event was sent explicitly.
-}
#if ENABLE_OVERLOADING
    eventOwnerChange_sendEvent              ,
#endif
    getEventOwnerChangeSendEvent            ,
    setEventOwnerChangeSendEvent            ,


-- ** time #attr:time#
{- | the timestamp of the event
-}
#if ENABLE_OVERLOADING
    eventOwnerChange_time                   ,
#endif
    getEventOwnerChangeTime                 ,
    setEventOwnerChangeTime                 ,


-- ** type #attr:type#
{- | the type of the event ('GI.Gdk.Enums.EventTypeOwnerChange').
-}
#if ENABLE_OVERLOADING
    eventOwnerChange_type                   ,
#endif
    getEventOwnerChangeType                 ,
    setEventOwnerChangeType                 ,


-- ** window #attr:window#
{- | the window which received the event
-}
    clearEventOwnerChangeWindow             ,
#if ENABLE_OVERLOADING
    eventOwnerChange_window                 ,
#endif
    getEventOwnerChangeWindow               ,
    setEventOwnerChangeWindow               ,




    ) where

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

import qualified Data.GI.Base.Attributes as GI.Attributes
import qualified Data.GI.Base.ManagedPtr as B.ManagedPtr
import qualified Data.GI.Base.GClosure as B.GClosure
import qualified Data.GI.Base.GError as B.GError
import qualified Data.GI.Base.GVariant as B.GVariant
import qualified Data.GI.Base.GValue as B.GValue
import qualified Data.GI.Base.GParamSpec as B.GParamSpec
import qualified Data.GI.Base.CallStack as B.CallStack
import qualified Data.GI.Base.Properties as B.Properties
import qualified Data.Text as T
import qualified Data.ByteString.Char8 as B
import qualified Data.Map as Map
import qualified Foreign.Ptr as FP
import qualified GHC.OverloadedLabels as OL

import {-# SOURCE #-} qualified GI.Gdk.Enums as Gdk.Enums
import {-# SOURCE #-} qualified GI.Gdk.Objects.Window as Gdk.Window
import {-# SOURCE #-} qualified GI.Gdk.Structs.Atom as Gdk.Atom

-- | Memory-managed wrapper type.
newtype EventOwnerChange = EventOwnerChange (ManagedPtr EventOwnerChange)
instance WrappedPtr EventOwnerChange where
    wrappedPtrCalloc = callocBytes 56
    wrappedPtrCopy = \p -> withManagedPtr p (copyBytes 56 >=> wrapPtr EventOwnerChange)
    wrappedPtrFree = Just ptr_to_g_free

-- | Construct a `EventOwnerChange` struct initialized to zero.
newZeroEventOwnerChange :: MonadIO m => m EventOwnerChange
newZeroEventOwnerChange = liftIO $ wrappedPtrCalloc >>= wrapPtr EventOwnerChange

instance tag ~ 'AttrSet => Constructible EventOwnerChange tag where
    new _ attrs = do
        o <- newZeroEventOwnerChange
        GI.Attributes.set o attrs
        return o


-- | A convenience alias for `Nothing` :: `Maybe` `EventOwnerChange`.
noEventOwnerChange :: Maybe EventOwnerChange
noEventOwnerChange = Nothing

{- |
Get the value of the “@type@” field.
When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to

@
'Data.GI.Base.Attributes.get' eventOwnerChange #type
@
-}
getEventOwnerChangeType :: MonadIO m => EventOwnerChange -> m Gdk.Enums.EventType
getEventOwnerChangeType s = liftIO $ withManagedPtr s $ \ptr -> do
    val <- peek (ptr `plusPtr` 0) :: IO CInt
    let val' = (toEnum . fromIntegral) val
    return val'

{- |
Set the value of the “@type@” field.
When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to

@
'Data.GI.Base.Attributes.set' eventOwnerChange [ #type 'Data.GI.Base.Attributes.:=' value ]
@
-}
setEventOwnerChangeType :: MonadIO m => EventOwnerChange -> Gdk.Enums.EventType -> m ()
setEventOwnerChangeType s val = liftIO $ withManagedPtr s $ \ptr -> do
    let val' = (fromIntegral . fromEnum) val
    poke (ptr `plusPtr` 0) (val' :: CInt)

#if ENABLE_OVERLOADING
data EventOwnerChangeTypeFieldInfo
instance AttrInfo EventOwnerChangeTypeFieldInfo where
    type AttrAllowedOps EventOwnerChangeTypeFieldInfo = '[ 'AttrSet, 'AttrGet]
    type AttrSetTypeConstraint EventOwnerChangeTypeFieldInfo = (~) Gdk.Enums.EventType
    type AttrBaseTypeConstraint EventOwnerChangeTypeFieldInfo = (~) EventOwnerChange
    type AttrGetType EventOwnerChangeTypeFieldInfo = Gdk.Enums.EventType
    type AttrLabel EventOwnerChangeTypeFieldInfo = "type"
    type AttrOrigin EventOwnerChangeTypeFieldInfo = EventOwnerChange
    attrGet _ = getEventOwnerChangeType
    attrSet _ = setEventOwnerChangeType
    attrConstruct = undefined
    attrClear _ = undefined

eventOwnerChange_type :: AttrLabelProxy "type"
eventOwnerChange_type = AttrLabelProxy

#endif


{- |
Get the value of the “@window@” field.
When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to

@
'Data.GI.Base.Attributes.get' eventOwnerChange #window
@
-}
getEventOwnerChangeWindow :: MonadIO m => EventOwnerChange -> m (Maybe Gdk.Window.Window)
getEventOwnerChangeWindow s = liftIO $ withManagedPtr s $ \ptr -> do
    val <- peek (ptr `plusPtr` 8) :: IO (Ptr Gdk.Window.Window)
    result <- SP.convertIfNonNull val $ \val' -> do
        val'' <- (newObject Gdk.Window.Window) val'
        return val''
    return result

{- |
Set the value of the “@window@” field.
When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to

@
'Data.GI.Base.Attributes.set' eventOwnerChange [ #window 'Data.GI.Base.Attributes.:=' value ]
@
-}
setEventOwnerChangeWindow :: MonadIO m => EventOwnerChange -> Ptr Gdk.Window.Window -> m ()
setEventOwnerChangeWindow s val = liftIO $ withManagedPtr s $ \ptr -> do
    poke (ptr `plusPtr` 8) (val :: Ptr Gdk.Window.Window)

{- |
Set the value of the “@window@” field to `Nothing`.
When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to

@
'Data.GI.Base.Attributes.clear' #window
@
-}
clearEventOwnerChangeWindow :: MonadIO m => EventOwnerChange -> m ()
clearEventOwnerChangeWindow s = liftIO $ withManagedPtr s $ \ptr -> do
    poke (ptr `plusPtr` 8) (FP.nullPtr :: Ptr Gdk.Window.Window)

#if ENABLE_OVERLOADING
data EventOwnerChangeWindowFieldInfo
instance AttrInfo EventOwnerChangeWindowFieldInfo where
    type AttrAllowedOps EventOwnerChangeWindowFieldInfo = '[ 'AttrSet, 'AttrGet, 'AttrClear]
    type AttrSetTypeConstraint EventOwnerChangeWindowFieldInfo = (~) (Ptr Gdk.Window.Window)
    type AttrBaseTypeConstraint EventOwnerChangeWindowFieldInfo = (~) EventOwnerChange
    type AttrGetType EventOwnerChangeWindowFieldInfo = Maybe Gdk.Window.Window
    type AttrLabel EventOwnerChangeWindowFieldInfo = "window"
    type AttrOrigin EventOwnerChangeWindowFieldInfo = EventOwnerChange
    attrGet _ = getEventOwnerChangeWindow
    attrSet _ = setEventOwnerChangeWindow
    attrConstruct = undefined
    attrClear _ = clearEventOwnerChangeWindow

eventOwnerChange_window :: AttrLabelProxy "window"
eventOwnerChange_window = AttrLabelProxy

#endif


{- |
Get the value of the “@send_event@” field.
When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to

@
'Data.GI.Base.Attributes.get' eventOwnerChange #sendEvent
@
-}
getEventOwnerChangeSendEvent :: MonadIO m => EventOwnerChange -> m Int8
getEventOwnerChangeSendEvent s = liftIO $ withManagedPtr s $ \ptr -> do
    val <- peek (ptr `plusPtr` 16) :: IO Int8
    return val

{- |
Set the value of the “@send_event@” field.
When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to

@
'Data.GI.Base.Attributes.set' eventOwnerChange [ #sendEvent 'Data.GI.Base.Attributes.:=' value ]
@
-}
setEventOwnerChangeSendEvent :: MonadIO m => EventOwnerChange -> Int8 -> m ()
setEventOwnerChangeSendEvent s val = liftIO $ withManagedPtr s $ \ptr -> do
    poke (ptr `plusPtr` 16) (val :: Int8)

#if ENABLE_OVERLOADING
data EventOwnerChangeSendEventFieldInfo
instance AttrInfo EventOwnerChangeSendEventFieldInfo where
    type AttrAllowedOps EventOwnerChangeSendEventFieldInfo = '[ 'AttrSet, 'AttrGet]
    type AttrSetTypeConstraint EventOwnerChangeSendEventFieldInfo = (~) Int8
    type AttrBaseTypeConstraint EventOwnerChangeSendEventFieldInfo = (~) EventOwnerChange
    type AttrGetType EventOwnerChangeSendEventFieldInfo = Int8
    type AttrLabel EventOwnerChangeSendEventFieldInfo = "send_event"
    type AttrOrigin EventOwnerChangeSendEventFieldInfo = EventOwnerChange
    attrGet _ = getEventOwnerChangeSendEvent
    attrSet _ = setEventOwnerChangeSendEvent
    attrConstruct = undefined
    attrClear _ = undefined

eventOwnerChange_sendEvent :: AttrLabelProxy "sendEvent"
eventOwnerChange_sendEvent = AttrLabelProxy

#endif


{- |
Get the value of the “@owner@” field.
When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to

@
'Data.GI.Base.Attributes.get' eventOwnerChange #owner
@
-}
getEventOwnerChangeOwner :: MonadIO m => EventOwnerChange -> m (Maybe Gdk.Window.Window)
getEventOwnerChangeOwner s = liftIO $ withManagedPtr s $ \ptr -> do
    val <- peek (ptr `plusPtr` 24) :: IO (Ptr Gdk.Window.Window)
    result <- SP.convertIfNonNull val $ \val' -> do
        val'' <- (newObject Gdk.Window.Window) val'
        return val''
    return result

{- |
Set the value of the “@owner@” field.
When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to

@
'Data.GI.Base.Attributes.set' eventOwnerChange [ #owner 'Data.GI.Base.Attributes.:=' value ]
@
-}
setEventOwnerChangeOwner :: MonadIO m => EventOwnerChange -> Ptr Gdk.Window.Window -> m ()
setEventOwnerChangeOwner s val = liftIO $ withManagedPtr s $ \ptr -> do
    poke (ptr `plusPtr` 24) (val :: Ptr Gdk.Window.Window)

{- |
Set the value of the “@owner@” field to `Nothing`.
When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to

@
'Data.GI.Base.Attributes.clear' #owner
@
-}
clearEventOwnerChangeOwner :: MonadIO m => EventOwnerChange -> m ()
clearEventOwnerChangeOwner s = liftIO $ withManagedPtr s $ \ptr -> do
    poke (ptr `plusPtr` 24) (FP.nullPtr :: Ptr Gdk.Window.Window)

#if ENABLE_OVERLOADING
data EventOwnerChangeOwnerFieldInfo
instance AttrInfo EventOwnerChangeOwnerFieldInfo where
    type AttrAllowedOps EventOwnerChangeOwnerFieldInfo = '[ 'AttrSet, 'AttrGet, 'AttrClear]
    type AttrSetTypeConstraint EventOwnerChangeOwnerFieldInfo = (~) (Ptr Gdk.Window.Window)
    type AttrBaseTypeConstraint EventOwnerChangeOwnerFieldInfo = (~) EventOwnerChange
    type AttrGetType EventOwnerChangeOwnerFieldInfo = Maybe Gdk.Window.Window
    type AttrLabel EventOwnerChangeOwnerFieldInfo = "owner"
    type AttrOrigin EventOwnerChangeOwnerFieldInfo = EventOwnerChange
    attrGet _ = getEventOwnerChangeOwner
    attrSet _ = setEventOwnerChangeOwner
    attrConstruct = undefined
    attrClear _ = clearEventOwnerChangeOwner

eventOwnerChange_owner :: AttrLabelProxy "owner"
eventOwnerChange_owner = AttrLabelProxy

#endif


{- |
Get the value of the “@reason@” field.
When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to

@
'Data.GI.Base.Attributes.get' eventOwnerChange #reason
@
-}
getEventOwnerChangeReason :: MonadIO m => EventOwnerChange -> m Gdk.Enums.OwnerChange
getEventOwnerChangeReason s = liftIO $ withManagedPtr s $ \ptr -> do
    val <- peek (ptr `plusPtr` 32) :: IO CUInt
    let val' = (toEnum . fromIntegral) val
    return val'

{- |
Set the value of the “@reason@” field.
When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to

@
'Data.GI.Base.Attributes.set' eventOwnerChange [ #reason 'Data.GI.Base.Attributes.:=' value ]
@
-}
setEventOwnerChangeReason :: MonadIO m => EventOwnerChange -> Gdk.Enums.OwnerChange -> m ()
setEventOwnerChangeReason s val = liftIO $ withManagedPtr s $ \ptr -> do
    let val' = (fromIntegral . fromEnum) val
    poke (ptr `plusPtr` 32) (val' :: CUInt)

#if ENABLE_OVERLOADING
data EventOwnerChangeReasonFieldInfo
instance AttrInfo EventOwnerChangeReasonFieldInfo where
    type AttrAllowedOps EventOwnerChangeReasonFieldInfo = '[ 'AttrSet, 'AttrGet]
    type AttrSetTypeConstraint EventOwnerChangeReasonFieldInfo = (~) Gdk.Enums.OwnerChange
    type AttrBaseTypeConstraint EventOwnerChangeReasonFieldInfo = (~) EventOwnerChange
    type AttrGetType EventOwnerChangeReasonFieldInfo = Gdk.Enums.OwnerChange
    type AttrLabel EventOwnerChangeReasonFieldInfo = "reason"
    type AttrOrigin EventOwnerChangeReasonFieldInfo = EventOwnerChange
    attrGet _ = getEventOwnerChangeReason
    attrSet _ = setEventOwnerChangeReason
    attrConstruct = undefined
    attrClear _ = undefined

eventOwnerChange_reason :: AttrLabelProxy "reason"
eventOwnerChange_reason = AttrLabelProxy

#endif


{- |
Get the value of the “@selection@” field.
When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to

@
'Data.GI.Base.Attributes.get' eventOwnerChange #selection
@
-}
getEventOwnerChangeSelection :: MonadIO m => EventOwnerChange -> m Gdk.Atom.Atom
getEventOwnerChangeSelection s = liftIO $ withManagedPtr s $ \ptr -> do
    let val = ptr `plusPtr` 40 :: (Ptr Gdk.Atom.Atom)
    val' <- (newPtr Gdk.Atom.Atom) val
    return val'

#if ENABLE_OVERLOADING
data EventOwnerChangeSelectionFieldInfo
instance AttrInfo EventOwnerChangeSelectionFieldInfo where
    type AttrAllowedOps EventOwnerChangeSelectionFieldInfo = '[ 'AttrGet]
    type AttrSetTypeConstraint EventOwnerChangeSelectionFieldInfo = (~) (Ptr Gdk.Atom.Atom)
    type AttrBaseTypeConstraint EventOwnerChangeSelectionFieldInfo = (~) EventOwnerChange
    type AttrGetType EventOwnerChangeSelectionFieldInfo = Gdk.Atom.Atom
    type AttrLabel EventOwnerChangeSelectionFieldInfo = "selection"
    type AttrOrigin EventOwnerChangeSelectionFieldInfo = EventOwnerChange
    attrGet _ = getEventOwnerChangeSelection
    attrSet _ = undefined
    attrConstruct = undefined
    attrClear _ = undefined

eventOwnerChange_selection :: AttrLabelProxy "selection"
eventOwnerChange_selection = AttrLabelProxy

#endif


{- |
Get the value of the “@time@” field.
When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to

@
'Data.GI.Base.Attributes.get' eventOwnerChange #time
@
-}
getEventOwnerChangeTime :: MonadIO m => EventOwnerChange -> m Word32
getEventOwnerChangeTime s = liftIO $ withManagedPtr s $ \ptr -> do
    val <- peek (ptr `plusPtr` 48) :: IO Word32
    return val

{- |
Set the value of the “@time@” field.
When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to

@
'Data.GI.Base.Attributes.set' eventOwnerChange [ #time 'Data.GI.Base.Attributes.:=' value ]
@
-}
setEventOwnerChangeTime :: MonadIO m => EventOwnerChange -> Word32 -> m ()
setEventOwnerChangeTime s val = liftIO $ withManagedPtr s $ \ptr -> do
    poke (ptr `plusPtr` 48) (val :: Word32)

#if ENABLE_OVERLOADING
data EventOwnerChangeTimeFieldInfo
instance AttrInfo EventOwnerChangeTimeFieldInfo where
    type AttrAllowedOps EventOwnerChangeTimeFieldInfo = '[ 'AttrSet, 'AttrGet]
    type AttrSetTypeConstraint EventOwnerChangeTimeFieldInfo = (~) Word32
    type AttrBaseTypeConstraint EventOwnerChangeTimeFieldInfo = (~) EventOwnerChange
    type AttrGetType EventOwnerChangeTimeFieldInfo = Word32
    type AttrLabel EventOwnerChangeTimeFieldInfo = "time"
    type AttrOrigin EventOwnerChangeTimeFieldInfo = EventOwnerChange
    attrGet _ = getEventOwnerChangeTime
    attrSet _ = setEventOwnerChangeTime
    attrConstruct = undefined
    attrClear _ = undefined

eventOwnerChange_time :: AttrLabelProxy "time"
eventOwnerChange_time = AttrLabelProxy

#endif


{- |
Get the value of the “@selection_time@” field.
When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to

@
'Data.GI.Base.Attributes.get' eventOwnerChange #selectionTime
@
-}
getEventOwnerChangeSelectionTime :: MonadIO m => EventOwnerChange -> m Word32
getEventOwnerChangeSelectionTime s = liftIO $ withManagedPtr s $ \ptr -> do
    val <- peek (ptr `plusPtr` 52) :: IO Word32
    return val

{- |
Set the value of the “@selection_time@” field.
When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to

@
'Data.GI.Base.Attributes.set' eventOwnerChange [ #selectionTime 'Data.GI.Base.Attributes.:=' value ]
@
-}
setEventOwnerChangeSelectionTime :: MonadIO m => EventOwnerChange -> Word32 -> m ()
setEventOwnerChangeSelectionTime s val = liftIO $ withManagedPtr s $ \ptr -> do
    poke (ptr `plusPtr` 52) (val :: Word32)

#if ENABLE_OVERLOADING
data EventOwnerChangeSelectionTimeFieldInfo
instance AttrInfo EventOwnerChangeSelectionTimeFieldInfo where
    type AttrAllowedOps EventOwnerChangeSelectionTimeFieldInfo = '[ 'AttrSet, 'AttrGet]
    type AttrSetTypeConstraint EventOwnerChangeSelectionTimeFieldInfo = (~) Word32
    type AttrBaseTypeConstraint EventOwnerChangeSelectionTimeFieldInfo = (~) EventOwnerChange
    type AttrGetType EventOwnerChangeSelectionTimeFieldInfo = Word32
    type AttrLabel EventOwnerChangeSelectionTimeFieldInfo = "selection_time"
    type AttrOrigin EventOwnerChangeSelectionTimeFieldInfo = EventOwnerChange
    attrGet _ = getEventOwnerChangeSelectionTime
    attrSet _ = setEventOwnerChangeSelectionTime
    attrConstruct = undefined
    attrClear _ = undefined

eventOwnerChange_selectionTime :: AttrLabelProxy "selectionTime"
eventOwnerChange_selectionTime = AttrLabelProxy

#endif



#if ENABLE_OVERLOADING
instance O.HasAttributeList EventOwnerChange
type instance O.AttributeList EventOwnerChange = EventOwnerChangeAttributeList
type EventOwnerChangeAttributeList = ('[ '("type", EventOwnerChangeTypeFieldInfo), '("window", EventOwnerChangeWindowFieldInfo), '("sendEvent", EventOwnerChangeSendEventFieldInfo), '("owner", EventOwnerChangeOwnerFieldInfo), '("reason", EventOwnerChangeReasonFieldInfo), '("selection", EventOwnerChangeSelectionFieldInfo), '("time", EventOwnerChangeTimeFieldInfo), '("selectionTime", EventOwnerChangeSelectionTimeFieldInfo)] :: [(Symbol, *)])
#endif

#if ENABLE_OVERLOADING
type family ResolveEventOwnerChangeMethod (t :: Symbol) (o :: *) :: * where
    ResolveEventOwnerChangeMethod l o = O.MethodResolutionFailed l o

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

#endif