packages feed

gi-gtk-0.3.18.13: GI/Gtk/Objects/IMContextSimple.hs


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

module GI.Gtk.Objects.IMContextSimple
    ( 

-- * Exported types
    IMContextSimple(..)                     ,
    IMContextSimpleK                        ,
    toIMContextSimple                       ,
    noIMContextSimple                       ,


 -- * Methods
-- ** iMContextSimpleNew
    iMContextSimpleNew                      ,




    ) where

import Prelude ()
import Data.GI.Base.ShortPrelude

import qualified Data.Text as T
import qualified Data.ByteString.Char8 as B
import qualified Data.Map as Map

import GI.Gtk.Types
import GI.Gtk.Callbacks
import qualified GI.GObject as GObject

newtype IMContextSimple = IMContextSimple (ForeignPtr IMContextSimple)
foreign import ccall "gtk_im_context_simple_get_type"
    c_gtk_im_context_simple_get_type :: IO GType

type instance ParentTypes IMContextSimple = IMContextSimpleParentTypes
type IMContextSimpleParentTypes = '[IMContext, GObject.Object]

instance GObject IMContextSimple where
    gobjectIsInitiallyUnowned _ = False
    gobjectType _ = c_gtk_im_context_simple_get_type
    

class GObject o => IMContextSimpleK o
instance (GObject o, IsDescendantOf IMContextSimple o) => IMContextSimpleK o

toIMContextSimple :: IMContextSimpleK o => o -> IO IMContextSimple
toIMContextSimple = unsafeCastTo IMContextSimple

noIMContextSimple :: Maybe IMContextSimple
noIMContextSimple = Nothing

type family ResolveIMContextSimpleMethod (t :: Symbol) (o :: *) :: * where
    ResolveIMContextSimpleMethod "bindProperty" o = GObject.ObjectBindPropertyMethodInfo
    ResolveIMContextSimpleMethod "bindPropertyFull" o = GObject.ObjectBindPropertyFullMethodInfo
    ResolveIMContextSimpleMethod "deleteSurrounding" o = IMContextDeleteSurroundingMethodInfo
    ResolveIMContextSimpleMethod "filterKeypress" o = IMContextFilterKeypressMethodInfo
    ResolveIMContextSimpleMethod "focusIn" o = IMContextFocusInMethodInfo
    ResolveIMContextSimpleMethod "focusOut" o = IMContextFocusOutMethodInfo
    ResolveIMContextSimpleMethod "forceFloating" o = GObject.ObjectForceFloatingMethodInfo
    ResolveIMContextSimpleMethod "freezeNotify" o = GObject.ObjectFreezeNotifyMethodInfo
    ResolveIMContextSimpleMethod "isFloating" o = GObject.ObjectIsFloatingMethodInfo
    ResolveIMContextSimpleMethod "notify" o = GObject.ObjectNotifyMethodInfo
    ResolveIMContextSimpleMethod "notifyByPspec" o = GObject.ObjectNotifyByPspecMethodInfo
    ResolveIMContextSimpleMethod "ref" o = GObject.ObjectRefMethodInfo
    ResolveIMContextSimpleMethod "refSink" o = GObject.ObjectRefSinkMethodInfo
    ResolveIMContextSimpleMethod "replaceData" o = GObject.ObjectReplaceDataMethodInfo
    ResolveIMContextSimpleMethod "replaceQdata" o = GObject.ObjectReplaceQdataMethodInfo
    ResolveIMContextSimpleMethod "reset" o = IMContextResetMethodInfo
    ResolveIMContextSimpleMethod "runDispose" o = GObject.ObjectRunDisposeMethodInfo
    ResolveIMContextSimpleMethod "stealData" o = GObject.ObjectStealDataMethodInfo
    ResolveIMContextSimpleMethod "stealQdata" o = GObject.ObjectStealQdataMethodInfo
    ResolveIMContextSimpleMethod "thawNotify" o = GObject.ObjectThawNotifyMethodInfo
    ResolveIMContextSimpleMethod "unref" o = GObject.ObjectUnrefMethodInfo
    ResolveIMContextSimpleMethod "watchClosure" o = GObject.ObjectWatchClosureMethodInfo
    ResolveIMContextSimpleMethod "getData" o = GObject.ObjectGetDataMethodInfo
    ResolveIMContextSimpleMethod "getPreeditString" o = IMContextGetPreeditStringMethodInfo
    ResolveIMContextSimpleMethod "getProperty" o = GObject.ObjectGetPropertyMethodInfo
    ResolveIMContextSimpleMethod "getQdata" o = GObject.ObjectGetQdataMethodInfo
    ResolveIMContextSimpleMethod "getSurrounding" o = IMContextGetSurroundingMethodInfo
    ResolveIMContextSimpleMethod "setClientWindow" o = IMContextSetClientWindowMethodInfo
    ResolveIMContextSimpleMethod "setCursorLocation" o = IMContextSetCursorLocationMethodInfo
    ResolveIMContextSimpleMethod "setData" o = GObject.ObjectSetDataMethodInfo
    ResolveIMContextSimpleMethod "setProperty" o = GObject.ObjectSetPropertyMethodInfo
    ResolveIMContextSimpleMethod "setSurrounding" o = IMContextSetSurroundingMethodInfo
    ResolveIMContextSimpleMethod "setUsePreedit" o = IMContextSetUsePreeditMethodInfo
    ResolveIMContextSimpleMethod l o = MethodResolutionFailed l o

instance (info ~ ResolveIMContextSimpleMethod t IMContextSimple, MethodInfo info IMContextSimple p) => IsLabelProxy t (IMContextSimple -> p) where
    fromLabelProxy _ = overloadedMethod (MethodProxy :: MethodProxy info)

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

type instance AttributeList IMContextSimple = IMContextSimpleAttributeList
type IMContextSimpleAttributeList = ('[ '("inputHints", IMContextInputHintsPropertyInfo), '("inputPurpose", IMContextInputPurposePropertyInfo)] :: [(Symbol, *)])

type instance SignalList IMContextSimple = IMContextSimpleSignalList
type IMContextSimpleSignalList = ('[ '("commit", IMContextCommitSignalInfo), '("deleteSurrounding", IMContextDeleteSurroundingSignalInfo), '("notify", GObject.ObjectNotifySignalInfo), '("preeditChanged", IMContextPreeditChangedSignalInfo), '("preeditEnd", IMContextPreeditEndSignalInfo), '("preeditStart", IMContextPreeditStartSignalInfo), '("retrieveSurrounding", IMContextRetrieveSurroundingSignalInfo)] :: [(Symbol, *)])

-- method IMContextSimple::new
-- method type : Constructor
-- Args : []
-- Lengths : []
-- returnType : TInterface "Gtk" "IMContextSimple"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_im_context_simple_new" gtk_im_context_simple_new :: 
    IO (Ptr IMContextSimple)


iMContextSimpleNew ::
    (MonadIO m) =>
    m IMContextSimple                       -- result
iMContextSimpleNew  = liftIO $ do
    result <- gtk_im_context_simple_new
    checkUnexpectedReturnNULL "gtk_im_context_simple_new" result
    result' <- (wrapObject IMContextSimple) result
    return result'