Lines Matching refs:dpy
33 char * sendToVim(Display *dpy, char *name, char *cmd, int asKeys, int *code);
71 static int x_error_check(Display *dpy, XErrorEvent *error_event);
74 static Window LookupName(Display *dpy, char *name,
76 static int SendInit(Display *dpy);
77 static char *SendEventProc(Display *dpy, XEvent *eventPtr,
98 Display *dpy, /* Where to send. */ in sendToVim() argument
120 if (commProperty == None && dpy != NULL) in sendToVim()
122 if (SendInit(dpy) < 0) in sendToVim()
139 w = LookupName(dpy, name, 0, &loosename); in sendToVim()
143 plist = XListProperties(dpy, w, &res); in sendToVim()
144 XSync(dpy, False); in sendToVim()
149 LookupName(dpy, loosename ? loosename : name, in sendToVim()
187 res = AppendPropCarefully(dpy, w, commProperty, property, length + 1); in sendToVim()
213 fds.fd = ConnectionNumber(dpy); in sendToVim()
224 FD_SET(ConnectionNumber(dpy), &fds); in sendToVim()
225 if (select(ConnectionNumber(dpy) + 1, &fds, NULL, NULL, &tv) < 0) in sendToVim()
228 while (XEventsQueued(dpy, QueuedAfterReading) > 0) in sendToVim()
230 XNextEvent(dpy, &event); in sendToVim()
232 if ((result = SendEventProc(dpy, &event, serial, code)) != NULL) in sendToVim()
248 SendInit(Display *dpy) in SendInit() argument
259 commProperty = XInternAtom(dpy, "Comm", False); in SendInit()
261 registryProperty = XInternAtom(dpy, "VimRegistry", False); in SendInit()
266 XCreateSimpleWindow(dpy, XDefaultRootWindow(dpy), in SendInit()
268 WhitePixel(dpy, DefaultScreen(dpy)), in SendInit()
269 WhitePixel(dpy, DefaultScreen(dpy))); in SendInit()
270 XSelectInput(dpy, commWindow, PropertyChangeMask); in SendInit()
273 XSync(dpy, False); in SendInit()
292 Display *dpy, /* Display whose registry to check. */ in LookupName() argument
310 result = XGetWindowProperty(dpy, RootWindow(dpy, 0), registryProperty, 0, in LookupName()
326 XDeleteProperty(dpy, RootWindow(dpy, 0), registryProperty); in LookupName()
387 XChangeProperty(dpy, RootWindow(dpy, 0), registryProperty, XA_STRING, in LookupName()
390 XSync(dpy, False); in LookupName()
399 Display *dpy, in SendEventProc() argument
422 result = XGetWindowProperty(dpy, commWindow, commProperty, 0, in SendEventProc()
538 Display *dpy, /* Display on which to operate. */ in AppendPropCarefully() argument
549 XChangeProperty(dpy, window, property, XA_STRING, 8, in AppendPropCarefully()
551 XSync(dpy, False); in AppendPropCarefully()
562 x_error_check(Display *dpy, XErrorEvent *error_event) in x_error_check() argument