MCPcopy Create free account
hub / github.com/SFML/SFML / ClipboardImpl

Method ClipboardImpl

src/SFML/Window/Unix/ClipboardImpl.cpp:77–94  ·  view source on GitHub ↗

///////////////////////////////////////////////////////

Source from the content-addressed store, hash-verified

75
76////////////////////////////////////////////////////////////
77ClipboardImpl::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////////////////////////////////////////////////////////////

Callers

nothing calls this directly

Calls 3

openDisplayFunction · 0.85
getAtomFunction · 0.85
getMethod · 0.80

Tested by

no test coverage detected