Lines Matching defs:conn

82 winClipboardCreateMessagingWindow(xcb_connection_t *conn, xcb_window_t iWindow, ClipboardAtoms *atoms);
85 intern_atom(xcb_connection_t *conn, const char *atomName)
91 atom_cookie = xcb_intern_atom(conn, 0, strlen(atomName), atomName);
92 atom_reply = xcb_intern_atom_reply(conn, atom_cookie, NULL);
120 xcb_connection_t *conn;
130 conn = xcb_connect_to_display_with_auth_info(szDisplay, auth_info, &screen);
131 if (xcb_connection_has_error(conn)) {
140 iConnectionNumber = xcb_get_file_descriptor(conn);
157 xfixes_query = xcb_get_extension_data(conn, &xcb_xfixes_id);
163 xcb_xfixes_query_version_unchecked(conn, 1, 0);
166 atoms.atomClipboard = intern_atom(conn, "CLIPBOARD");
167 atoms.atomLocalProperty = intern_atom(conn, "CYGX_CUT_BUFFER");
168 atoms.atomUTF8String = intern_atom(conn, "UTF8_STRING");
169 atoms.atomCompoundText = intern_atom(conn, "COMPOUND_TEXT");
170 atoms.atomTargets = intern_atom(conn, "TARGETS");
171 atoms.atomIncr = intern_atom(conn, "INCR");
173 xcb_screen_t *root_screen = xcb_aux_get_screen(conn, screen);
177 iWindow = xcb_generate_id(conn);
178 xcb_void_cookie_t cookie = xcb_create_window_checked(conn,
191 if ((error = xcb_request_check(conn, cookie))) {
197 xcb_icccm_set_wm_name(conn, iWindow, XCB_ATOM_STRING, 8, strlen("xwinclip"), "xwinclip");
201 cookie = xcb_change_window_attributes_checked(conn, iWindow, XCB_CW_EVENT_MASK, values);
202 if ((error = xcb_request_check(conn, cookie))) {
207 xcb_xfixes_select_selection_input(conn,
214 xcb_xfixes_select_selection_input(conn,
224 hwnd = winClipboardCreateMessagingWindow(conn, iWindow, &atoms);
232 cookie = xcb_set_selection_owner_checked(conn, iWindow, XCB_ATOM_PRIMARY, XCB_CURRENT_TIME);
233 if ((error = xcb_request_check(conn, cookie))) {
240 cookie = xcb_set_selection_owner_checked(conn, iWindow, atoms.atomClipboard, XCB_CURRENT_TIME);
241 if ((error = xcb_request_check(conn, cookie))) {
255 winClipboardFlushXEvents(hwnd, iWindow, conn, &data, &atoms);
265 xcb_flush(conn);
347 if (!xcb_connection_has_error(conn) && iWindow) {
348 cookie = xcb_destroy_window_checked(conn, iWindow);
349 if ((error = xcb_request_check(conn, cookie)))
367 if (!xcb_connection_has_error(conn)) {
369 xcb_disconnect(conn);
383 winClipboardCreateMessagingWindow(xcb_connection_t *conn, xcb_window_t iWindow, ClipboardAtoms *atoms)
405 cwcp.pClipboardDisplay = conn;