summaryrefslogtreecommitdiffstats
path: root/lib/Graphics/X11/Xlib/Atom/Extra.hs
blob: d7ba0dae27ed7df81e61bf6a1a654db6d05c1eee (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
module Graphics.X11.Xlib.Atom.Extra where

import Graphics.X11.Types (Atom)
import Graphics.X11.Xlib.Atom (internAtom)
import Graphics.X11.Xlib.Display.Extra (withDefaultDisplay)
import System.IO.Unsafe (unsafePerformIO)


unsafeInternAtom :: String -> Bool -> Atom
unsafeInternAtom atomName onlyIfExists =
  unsafePerformIO $ withDefaultDisplay $ \display ->
    internAtom display atomName onlyIfExists

_WIN_WORKSPACE :: Atom
_WIN_WORKSPACE = unsafeInternAtom "_WIN_WORKSPACE" False

_WIN_WORKSPACE_NAMES :: Atom
_WIN_WORKSPACE_NAMES = unsafeInternAtom "_WIN_WORKSPACE_NAMES" False

_WM_NAME :: Atom
_WM_NAME = unsafeInternAtom "WM_NAME" False

uTF8_STRING :: Atom
uTF8_STRING = unsafeInternAtom "UTF8_STRING" False