Lines Matching defs:dpy

123 init_dga_ext(dpy)
124 Display *dpy;
134 if (dga_extinfo_table_size < (dpy->fd + 1)) {
143 if (size < (dpy->fd + 1))
159 if (dga_extinfo_table[dpy->fd] != NULL)
160 return dga_extinfo_table[dpy->fd];
162 if (!islocalhost(dpy))
165 if ((xecp = XInitExtension(dpy, "SUN_DGA")) != NULL) {
166 if (XDgaQueryVersion(dpy, &protmajor, &protminor) == 0) {
182 dga_extinfo_table[dpy->fd] = infop;
183 XESetCloseDisplay(dpy, infop->extension, terminate_dga_ext);
188 islocalhost(dpy)
189 Display *dpy;
215 if (dpy->display_name[0] == ':')
218 colon = strrchr(dpy->display_name, ':');
220 colon = rindex(dpy->display_name, ':');
222 phostlen = strlen(dpy->display_name) - (colon ? strlen(colon) : 0);
223 if((strncmp("unix", dpy->display_name, MIN(phostlen, 4)) == 0) ||
224 (strncmp("localhost", dpy->display_name, MIN(phostlen, 9)) == 0))
231 if(getpeername(dpy->fd, (struct sockaddr *) &addr,
303 lookup_dga_ext(dpy)
304 Display *dpy;
306 if (dga_extinfo_table_size < (dpy->fd + 1))
308 return dga_extinfo_table[dpy->fd];
312 terminate_dga_ext(dpy, codes)
313 Display *dpy;
316 free(dga_extinfo_table[dpy->fd]);
317 dga_extinfo_table[dpy->fd] = NULL;
318 dga_winlist_free(dpy, NULL);
325 XDgaGrabWindow(dpy, win)
326 Display *dpy;
340 if (dga_winlist_add(val, dpy, win) == 0) {
341 XDgaUnGrabWindow(dpy, win);
351 if ((extinfop = init_dga_ext(dpy)) == NULL)
353 LockDisplay(dpy);
358 if (!_XReply(dpy, (xReply *) &rep, 0, xTrue)) {
359 UnlockDisplay(dpy);
363 UnlockDisplay(dpy);
366 if (dga_winlist_add(rep.data00, dpy, win) == 0) {
367 XDgaUnGrabWindow(dpy, win);
376 XDgaUnGrabWindow(dpy, win)
377 Display *dpy;
391 if (dga_winlist_free(dpy, win) == 0)
400 if ((extinfop = lookup_dga_ext(dpy)) == NULL)
402 LockDisplay(dpy);
407 if (!_XReply(dpy, (xReply *) &rep, 0, xTrue)) {
408 UnlockDisplay(dpy);
412 UnlockDisplay(dpy);
415 if (dga_winlist_free(dpy, win) == 0)
425 XDgaGrabColormap(dpy, cmap)
426 Display *dpy;
436 if ((extinfop = init_dga_ext(dpy)) == NULL) {
442 LockDisplay(dpy);
447 if (!_XReply(dpy, (xReply *) &rep, 0, xTrue)) {
448 UnlockDisplay(dpy);
455 UnlockDisplay(dpy);
464 XDgaUnGrabColormap(dpy, cmap)
465 Display *dpy;
475 if ((extinfop = lookup_dga_ext(dpy)) == NULL) {
481 LockDisplay(dpy);
486 if (!_XReply(dpy, (xReply *) &rep, 0, xTrue)) {
487 UnlockDisplay(dpy);
494 UnlockDisplay(dpy);
504 XDgaDrawGrabWids(dpy, drawid, nwids)
505 Display *dpy;
525 if (((extinfop = lookup_dga_ext(dpy)) == NULL) ||
532 LockDisplay(dpy);
538 if (!_XReply(dpy, (xReply *) &rep, 0, xTrue)) {
539 UnlockDisplay(dpy);
546 UnlockDisplay(dpy);
556 XDgaGrabWids(dpy, win, nwids)
557 Display *dpy;
561 return (XDgaDrawGrabWids(dpy, (Drawable)win, nwids));
565 XDgaDrawGrabFCS(dpy, drawid, nfcs)
566 Display *dpy;
587 if (((extinfop = lookup_dga_ext(dpy)) == NULL) ||
594 LockDisplay(dpy);
600 if (!_XReply(dpy, (xReply *) &rep, 0, xTrue)) {
601 UnlockDisplay(dpy);
608 UnlockDisplay(dpy);
618 XDgaGrabFCS(dpy, win, nfcs)
619 Display *dpy;
623 return (XDgaDrawGrabFCS(dpy, (Drawable)win, nfcs));
627 XDgaDrawGrabZbuf(dpy, drawid, nzbuftype)
628 Display *dpy;
648 if (((extinfop = lookup_dga_ext(dpy)) == NULL) ||
655 LockDisplay(dpy);
661 if (!_XReply(dpy, (xReply *) &rep, 0, xTrue)) {
662 UnlockDisplay(dpy);
669 UnlockDisplay(dpy);
679 XDgaGrabZbuf(dpy, win, nzbuftype)
680 Display *dpy;
684 return (XDgaDrawGrabZbuf(dpy, (Drawable)win, nzbuftype));
688 XDgaDrawGrabStereo(dpy, drawid, st_mode)
689 Display *dpy;
709 if (((extinfop = lookup_dga_ext(dpy)) == NULL) ||
716 LockDisplay(dpy);
722 if (!_XReply(dpy, (xReply *) &rep, 0, xTrue)) {
723 UnlockDisplay(dpy);
730 UnlockDisplay(dpy);
740 XDgaGrabStereo(dpy, win, st_mode)
741 Display *dpy;
745 return (XDgaDrawGrabStereo(dpy, (Drawable)win, st_mode));
749 XDgaGrabABuffers(dpy, win, type, buffer_site)
750 Display *dpy;
769 if ((extinfop = lookup_dga_ext(dpy)) == NULL)
773 LockDisplay(dpy);
780 if (!_XReply(dpy, (xReply *) &rep, 0, xTrue)) {
781 UnlockDisplay(dpy);
785 UnlockDisplay(dpy);
792 XDgaUnGrabABuffers(dpy, win, type)
793 Display *dpy;
810 if ((extinfop = lookup_dga_ext(dpy)) == NULL)
814 LockDisplay(dpy);
821 if (!_XReply(dpy, (xReply *) &rep, 0, xTrue)) {
822 UnlockDisplay(dpy);
826 UnlockDisplay(dpy);
833 XDgaGrabBuffers(dpy, win, nbuffers)
834 Display *dpy;
852 if ((extinfop = lookup_dga_ext(dpy)) == NULL)
856 LockDisplay(dpy);
862 if (!_XReply(dpy, (xReply *) &rep, 0, xTrue)) {
863 UnlockDisplay(dpy);
867 UnlockDisplay(dpy);
875 XDgaUnGrabBuffers(dpy, win)
876 Display *dpy;
892 if ((extinfop = lookup_dga_ext(dpy)) == NULL)
896 LockDisplay(dpy);
900 if (!_XReply(dpy, (xReply *) &rep, 0, xTrue)) {
901 UnlockDisplay(dpy);
905 UnlockDisplay(dpy);
913 XDgaGrabRetainedWindow(dpy, win)
914 Display *dpy;
930 if ((extinfop = lookup_dga_ext(dpy)) == NULL)
934 LockDisplay(dpy);
938 if (!_XReply(dpy, (xReply *) &rep, 0, xTrue)) {
939 UnlockDisplay(dpy);
943 UnlockDisplay(dpy);
951 XDgaUnGrabRetainedWindow(dpy, win)
952 Display *dpy;
968 if ((extinfop = lookup_dga_ext(dpy)) == NULL)
972 LockDisplay(dpy);
976 if (!_XReply(dpy, (xReply *) &rep, 0, xTrue)) {
977 UnlockDisplay(dpy);
981 UnlockDisplay(dpy);
989 XDgaGetRetainedPath(dpy, win, path)
990 Display *dpy;
1005 if ((extinfop = lookup_dga_ext(dpy)) == NULL)
1009 LockDisplay(dpy);
1013 if (!_XReply(dpy, (xReply *) &rep,
1015 UnlockDisplay(dpy);
1019 UnlockDisplay(dpy);
1028 XDgaQueryVersion(dpy, major_versionp, minor_versionp)
1029 Display *dpy;
1042 if (XQueryExtension(dpy, "SUN_DGA", &opcode, &tmp, &tmp) == 0)
1045 LockDisplay(dpy);
1049 if (!_XReply(dpy, (xReply *) & rep, 0, xTrue)) {
1050 UnlockDisplay(dpy);
1056 UnlockDisplay(dpy);
1064 XDgaGrabPixmap(dpy, d)
1065 Display *dpy;
1079 if (dga_pixlist_add(val, dpy, d) == 0) {
1080 XDgaUnGrabPixmap(dpy, d);
1090 if ((extinfop = init_dga_ext(dpy)) == NULL)
1094 LockDisplay(dpy);
1098 if (!_XReply(dpy, (xReply *) &rep, 0, xTrue)) {
1099 UnlockDisplay(dpy);
1103 UnlockDisplay(dpy);
1106 if (dga_pixlist_add(rep.data00, dpy, d) == 0) {
1107 XDgaUnGrabPixmap(dpy, d);
1117 XDgaUnGrabPixmap(dpy, d)
1118 Display *dpy;
1132 if (dga_pixlist_free(dpy, d) == 0)
1141 if ((extinfop = lookup_dga_ext(dpy)) == NULL)
1145 LockDisplay(dpy);
1149 if (!_XReply(dpy, (xReply *) &rep, 0, xTrue)) {
1150 UnlockDisplay(dpy);
1154 UnlockDisplay(dpy);
1162 dgai_grabDrawRequest (Display *dpy, Drawable drawid, int *drawType)
1175 if ((extinfop = init_dga_ext(dpy)) == NULL)
1179 LockDisplay(dpy);
1183 if (!_XReply(dpy, (xReply *) &rep, 0, xTrue)) {
1184 UnlockDisplay(dpy);
1188 UnlockDisplay(dpy);
1205 dgai_ungrabDrawRequest (Display *dpy, Drawable drawid)
1218 if ((extinfop = lookup_dga_ext(dpy)) == NULL)
1222 LockDisplay(dpy);
1226 if (!_XReply(dpy, (xReply *) &rep, 0, xTrue)) {
1227 UnlockDisplay(dpy);
1231 UnlockDisplay(dpy);
1239 XDgaGrabDrawable(Display *dpy, Drawable drawid)
1247 if (!(token = dgai_grabDrawRequest(dpy, drawid, &drawType))) {
1260 if (!dga_winlist_add(token, dpy, (Window)drawid)) {
1263 if (!(dgawin = (_Dga_window) dgai_win_grab_common(dpy, -1, token, 1))) { goto Bad;
1265 dgawin->w_dpy = dpy;
1282 if (!dga_pixlist_add(token, dpy, (Pixmap)drawid)) {
1288 dgapix->p_dpy = dpy;
1299 (void) dgai_ungrabDrawRequest(dpy, drawid);
1312 Display *dpy = dga_draw_display(dgadraw);
1316 if (dpy == NULL)
1332 status = dgai_ungrabDrawRequest(dpy, drawid);
1344 dga_winlist_add(token, dpy, win)
1346 Display *dpy;
1355 if ((win == listwin) && (dpy == listdpy)) {
1367 recp->dpy = dpy;
1378 dga_winlist_free(dpy, win)
1379 Display *dpy;
1388 if (recp->dpy == dpy) {
1424 *dpyp = recp->dpy;
1438 dga_pixlist_add(token, dpy, pix)
1440 Display *dpy;
1447 if (dpy == listdpy) {
1451 dga_pixlist_free(dpy, pix); /* remove bogus entry from list */
1459 recp->dpy = dpy;
1466 dga_pixlist_free(dpy, pix)
1467 Display *dpy;
1476 if (recp->dpy == dpy) {
1511 *dpyp = recp->dpy;
1537 XDgaGetXineramaInfo(dpy , VirtualWID, info )
1538 Display *dpy;
1546 if ((extinfop = init_dga_ext(dpy)) == NULL)
1551 LockDisplay(dpy);
1557 if (!_XReply(dpy, (xReply *)rep, (sizeof(xDgaXineramaInfoReply)-32) >> 2,
1560 UnlockDisplay(dpy);
1567 UnlockDisplay(dpy);