-static void
-xlockmore_handle_events (ModeInfo *mi,
- void (*reshape) (ModeInfo *, int, int),
- Bool (*hook) (ModeInfo *, XEvent *))
-{
- if (XtAppPending (app) & (XtIMTimer|XtIMAlternateInput))
- XtAppProcessEvent (app, XtIMTimer|XtIMAlternateInput);
-
- while (XPending (mi->dpy))
- {
- XEvent event;
- XNextEvent (mi->dpy, &event);
- if (reshape && event.xany.type == ConfigureNotify)
- {
- XGetWindowAttributes (mi->dpy, mi->window, &mi->xgwa);
- reshape (mi, mi->xgwa.width, mi->xgwa.height);
- }
- else if (hook && hook (mi, &event))
- {
- }
- else
- {
- screenhack_handle_event (mi->dpy, &event);
- }
- }
-}
-
-
-void
-xlockmore_screenhack (Display *dpy, Window window,
- Bool want_writable_colors,
- Bool want_uniform_colors,
- Bool want_smooth_colors,
- Bool want_bright_colors,
- unsigned long event_mask,
- void (*hack_init) (ModeInfo *),
- void (*hack_draw) (ModeInfo *),
- void (*hack_reshape) (ModeInfo *, int, int),
- Bool (*hack_handle_events) (ModeInfo *, XEvent *),
- void (*hack_free) (ModeInfo *))