Lines Matching defs:screen
24 * xlock.c - X11 client to lock a display and show a screen saver.
60 * 28-Oct-90: center prompt screen.
82 * added -screensaver (don't disable screen saver) for the paranoid.
123 * Added screen saver override.
176 int screen; /* current screen */
181 static Window win[MAXSCREENS]; /* window used to cover screen */
186 static XColor bgcol[MAXSCREENS];/* background of text screen */
187 XColor ssblack[MAXSCREENS];/* black color for screen saver screen */
188 XColor sswhite[MAXSCREENS];/* white color for screen saver screen */
199 static int sstimeout; /* screen saver parameters */
373 int thisscreen = screen;
376 for (screen = 0; screen < screens; screen++)
377 if (thisscreen == screen)
378 init(icon[screen]);
380 init(win[screen]);
389 for (screen = 0; screen < screens; screen++)
390 if (thisscreen == screen)
391 callback(icon[screen]);
393 callback(win[screen]);
397 screen = thisscreen;
402 screen = thisscreen;
445 XSetForeground(dsp, Scr[screen].gc, bgcol[screen].pixel);
453 XFillRectangle(dsp, win[screen], Scr[screen].gc,
457 XDrawString(dsp, win[screen], textgc[screen],
476 if (((XButtonEvent *) & event)->window == icon[screen]) {
485 XRaiseWindow(dsp, win[screen]);
544 Screen *scr = ScreenOfDisplay(dsp, screen);
546 left = iconx[screen] + ICONW + font->max_bounds.width;
547 y = icony[screen] + font->ascent + font->ascent + font->descent + 2;
549 XSetForeground(dsp, Scr[screen].gc, bgcol[screen].pixel);
551 XFillRectangle(dsp, win[screen], Scr[screen].gc,
555 XDrawString(dsp, win[screen], textgc[screen],
557 XDrawString(dsp, win[screen], textgc[screen],
568 Screen *scr = ScreenOfDisplay(dsp, screen);
570 y = icony[screen] + ICONH + font->ascent + 2;
572 XSetForeground(dsp, Scr[screen].gc, bgcol[screen].pixel);
574 XFillRectangle(dsp, win[screen], Scr[screen].gc,
575 iconx[screen], y - font->ascent,
576 WIDTH - iconx[screen],
579 XDrawString(dsp, win[screen], textgc[screen],
580 iconx[screen], y, infoMsg, (int) strlen(infoMsg));
678 /* Audit start of screen lock -- equivalent to logout ;-) */
702 * audit_unlock - audit screen unlock
867 XGetWindowAttributes(dsp, win[screen], &xgwa);
871 XSetForeground(dsp, Scr[screen].gc, bgcol[screen].pixel);
872 XFillRectangle(dsp, win[screen], Scr[screen].gc,
875 XMapWindow(dsp, icon[screen]);
876 XRaiseWindow(dsp, icon[screen]);
878 left = iconx[screen] + ICONW + font->max_bounds.width;
879 y = icony[screen] + font->ascent;
881 XDrawString(dsp, win[screen], textgc[screen],
883 XDrawString(dsp, win[screen], textgc[screen],
885 XDrawString(dsp, win[screen], textgc[screen],
889 y = icony[screen] - (font->descent + 2);
891 XDrawString(dsp, win[screen], textgc[screen],
892 iconx[screen], y, text_info, (int) strlen(text_info));
898 y = icony[screen] + ICONH + font->ascent + 2
1032 XFillRectangle(dsp, win[screen], Scr[screen].gc,
1060 XUnmapWindow(dsp, icon[screen]);
1069 for (screen = 0; screen < screens; screen++)
1070 init(win[screen]);
1075 for (screen = 0; screen < screens; screen++)
1076 callback(win[screen]);
1088 for (screen = 0; screen < screens; screen++)
1089 if (event.xbutton.root == RootWindow(dsp, screen))
1172 for (screen = 0; screen < screens; screen++) {
1174 Screen *scr = ScreenOfDisplay(dsp, screen);
1175 Visual *vis = XDefaultVisual(dsp, screen);
1177 root[screen] = RootWindowOfScreen(scr);
1179 cmap = XCreateColormap(dsp, root[screen], vis, AllocNone);
1181 XAllocNamedColor(dsp, cmap, "White", &sswhite[screen], &tmp);
1182 XAllocNamedColor(dsp, cmap, "Black", &ssblack[screen], &tmp);
1186 &bgcol[screen], &tmp)) {
1187 XAllocNamedColor(dsp, cmap, "White", &bgcol[screen], &tmp);
1190 &fgcol[screen], &tmp)) {
1191 XAllocNamedColor(dsp, cmap, "Black", &fgcol[screen], &tmp);
1193 Scr[screen].pixels[0] = fgcol[screen].pixel;
1194 Scr[screen].pixels[1] = bgcol[screen].pixel;
1195 Scr[screen].npixels = 2;
1204 &bgcol[screen], &tmp)) {
1206 XAllocNamedColor(dsp, cmap, "White", &bgcol[screen], &tmp);
1209 &fgcol[screen], &tmp)) {
1211 XAllocNamedColor(dsp, cmap, "Black", &fgcol[screen], &tmp);
1215 Scr[screen].npixels = 0;
1227 Scr[screen].pixels[i] = xcolor.pixel;
1228 Scr[screen].npixels++;
1231 fprintf(stderr, "%d pixels allocated\n", Scr[screen].npixels);
1235 xswa.background_pixel = ssblack[screen].pixel;
1239 win[screen] = XCreateWindow(dsp, root[screen], 0, 0, WIDTH, HEIGHT, 0,
1249 XChangeProperty(dsp, win[screen],
1255 iconx[screen] = (DisplayWidth(dsp, screen) -
1258 icony[screen] = DisplayHeight(dsp, screen) / 6;
1260 xswa.border_pixel = fgcol[screen].pixel;
1261 xswa.background_pixel = bgcol[screen].pixel;
1266 icon[screen] = XCreateWindow(dsp, win[screen],
1267 iconx[screen], icony[screen],
1272 XMapWindow(dsp, win[screen]);
1273 XRaiseWindow(dsp, win[screen]);
1276 xgcv.foreground = sswhite[screen].pixel;
1277 xgcv.background = ssblack[screen].pixel;
1278 Scr[screen].gc = XCreateGC(dsp, win[screen],
1281 xgcv.foreground = fgcol[screen].pixel;
1282 xgcv.background = bgcol[screen].pixel;
1284 textgc[screen] = XCreateGC(dsp, win[screen],
1290 &fgcol[screen], &bgcol[screen], 0, 0);
1299 XSetScreenSaver(dsp, 0, 0, 0, 0); /* disable screen saver */