xsecurelock  1.7.0
XSecureLock is an X11 screen lock utility.
unmap_all.h
Go to the documentation of this file.
1 /*
2 Copyright 2018 Google Inc. All rights reserved.
3 
4 Licensed under the Apache License, Version 2.0 (the "License");
5 you may not use this file except in compliance with the License.
6 You may obtain a copy of the License at
7 
8  http://www.apache.org/licenses/LICENSE-2.0
9 
10 Unless required by applicable law or agreed to in writing, software
11 distributed under the License is distributed on an "AS IS" BASIS,
12 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 See the License for the specific language governing permissions and
14 limitations under the License.
15 */
16 
17 #ifndef UNMAP_ALL_H
18 #define UNMAP_ALL_H
19 
20 #include <X11/X.h> // for Window
21 #include <X11/Xlib.h> // for Display
22 
23 typedef struct {
24  Display *display;
25  Window root_window;
26 
27  // The window list; None windows should be skipped when iterating.
28  Window *windows;
29  unsigned int n_windows;
30  unsigned int first_unmapped_window;
32 
43  Window root_window, const Window *ignored_windows,
44  unsigned int n_ignored_windows,
45  const char *my_res_class, const char *my_res_name,
46  int include_frame);
47 
59  int (*just_unmapped_can_we_stop)(Window w, void *arg),
60  void *arg);
61 
67 
72 
73 #endif
unsigned int n_windows
Definition: unmap_all.h:29
void RemapAllWindows(UnmapAllWindowsState *state)
Remaps all windows from the state.
Definition: unmap_all.c:94
Display * display
The X11 display.
Definition: auth_x11.c:200
int InitUnmapAllWindowsState(UnmapAllWindowsState *state, Display *display, Window root_window, const Window *ignored_windows, unsigned int n_ignored_windows, const char *my_res_class, const char *my_res_name, int include_frame)
Stores the list of all mapped application windows in the state.
Definition: unmap_all.c:9
Window * windows
Definition: unmap_all.h:28
Definition: unmap_all.h:23
void ClearUnmapAllWindowsState(UnmapAllWindowsState *state)
Clears the UnmapAllWindowsState when done, and returns resources to X11.
Definition: unmap_all.c:104
int UnmapAllWindows(UnmapAllWindowsState *state, int(*just_unmapped_can_we_stop)(Window w, void *arg), void *arg)
Unmaps all windows, and stores them in the state.
Definition: unmap_all.c:71
Window root_window
Definition: unmap_all.h:25
Display * display
Definition: unmap_all.h:24
unsigned int first_unmapped_window
Definition: unmap_all.h:30