xkbcommon-0.0.3: Haskell bindings for libxkbcommon

Safe HaskellNone
LanguageHaskell98

Text.XkbCommon.Context

Synopsis

Documentation

data Context Source #

Context is the exposed datatype of an xkbcommon context (struct xkb_context)

defaultFlags :: ContextFlags Source #

Default ContextFlags: consider RMLVO prefs from the environment variables, and search for Keymap files in the default paths.

pureFlags :: ContextFlags Source #

Pure ContextFlags: don't consider env vars or default search paths, which are system-dependent.

newContext :: ContextFlags -> IO (Maybe Context) Source #

Construct a new Xkb context from creation preferences. xkb_context_new can fail if the default include path does not exist.

(xkb_context_new)

getIncludePaths :: Context -> IO [FilePath] Source #

Get the current include paths of a Context. Upon Keymap creation, these directories will be searched for keymap definitions.

setIncludePaths Source #

Arguments

:: Context

Context whose search paths we are changing

-> [FilePath]

New list of search paths

-> Bool

Set to True if you also want to search on the default path

-> IO (Maybe ())

returns Just () if addition of at least one path succeeded

Set a new list of include paths for a Context.

appendIncludePath :: Context -> FilePath -> IO (Maybe ()) Source #

Append a search path for Keymap files to a Context. (xkb_context_include_path_append)

Preferred API is to use getIncludePaths and setIncludePaths

numIncludePaths :: Context -> IO Int Source #

(xkb_context_num_include_paths)

Preferred API is to use getIncludePaths and setIncludePaths

clearIncludePath :: Context -> IO () Source #

Remove all Keymap file search paths from a Context.

Preferred API is to use getIncludePaths and setIncludePaths

(xkb_context_include_path_clear)

appendDefaultIncludePath :: Context -> IO (Maybe ()) Source #

Append the default Keymap search path (whose location depends on libxkbcommon compile-time settings) (xkb_context_include_path_append_default)

Preferred API is to use getIncludePaths and setIncludePaths

includePathShow :: Context -> Int -> IO FilePath Source #

Get a specific include path from the context's include path. (xkb_context_include_path_get)

Preferred API is to use getIncludePaths and setIncludePaths