///////////////////////////////////////////////////////
| 75 | |
| 76 | //////////////////////////////////////////////////////////// |
| 77 | ClipboardImpl::ClipboardImpl() |
| 78 | { |
| 79 | // Open a connection with the X server |
| 80 | m_display = openDisplay(); |
| 81 | |
| 82 | // Get the atoms we need to make use of the clipboard |
| 83 | m_clipboard = getAtom("CLIPBOARD", false); |
| 84 | m_targets = getAtom("TARGETS", false); |
| 85 | m_text = getAtom("TEXT", false); |
| 86 | m_utf8String = getAtom("UTF8_STRING", true); |
| 87 | m_targetProperty = getAtom("SFML_CLIPBOARD_TARGET_PROPERTY", false); |
| 88 | |
| 89 | // Create a hidden window that will broker our clipboard interactions with X |
| 90 | m_window = XCreateSimpleWindow(m_display.get(), DefaultRootWindow(m_display.get()), 0, 0, 1, 1, 0, 0, 0); |
| 91 | |
| 92 | // Register the events we are interested in |
| 93 | XSelectInput(m_display.get(), m_window, SelectionNotify | SelectionClear | SelectionRequest); |
| 94 | } |
| 95 | |
| 96 | |
| 97 | //////////////////////////////////////////////////////////// |
nothing calls this directly
no test coverage detected