💾 Archived View for gemini.rmf-dev.com › repo › Vaati › Menkar › files › 6deb9ddc64768d54e7a2ce676d4… captured on 2022-07-16 at 17:10:54. Gemini links have been rewritten to link to archived content

View Raw

More Information

➡️ Next capture (2023-03-20)

-=-=-=-=-=-=-

0 #if !defined(HINTS_H)

1 #define HINTS_H

2

3 /*

4 * Copyright 2006 Johan Veenhuizen

5 *

6 * Permission is hereby granted, free of charge, to any person obtaining a

7 * copy of this software and associated documentation files (the "Software"),

8 * to deal in the Software without restriction, including without limitation

9 * the rights to use, copy, modify, merge, publish, distribute, sublicense,

10 * and/or sell copies of the Software, and to permit persons to whom the

11 * Software is furnished to do so, subject to the following conditions:

12 *

13 * The above copyright notice and this permission notice shall be included

14 * in all copies or substantial portions of the Software.

15 *

16 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR

17 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,

18 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL

19 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER

20 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING

21 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER

22 * DEALINGS IN THE SOFTWARE.

23 */

24

25 struct window;

26

27 struct hints {

28 /* The name of the hints */

29 char *name;

30

31 /* Called at program start */

32 void (*init)(void);

33

34 /* Called before shutting down */

35 void (*fini)(void);

36

37 /* Called when a new window is managed */

38 void (*manage)(struct window *);

39

40 /* Called when a window is unmanaged */

41 void (*unmanage)(struct window *);

42

43 /* Called when a window is mapped */

44 void (*map)(struct window *);

45

46 /* Called when a window is unmapped */

47 void (*unmap)(struct window *);

48

49 /* Called when a client withdraws (unmaps) itself */

50 void (*withdraw)(struct window *);

51

52 /* Called when a window becomes active, NULL if none */

53 void (*activate)(struct window *);

54

55 /* Called when a window loses focus */

56 void (*deactivate)(struct window *);

57

58 /* Called when a window was moved but not resized */

59 void (*move)(struct window *);

60

61 /* Called when a window was resized but not moved */

62 void (*resize)(struct window *);

63

64 /* Called when a window was moved AND resized */

65 void (*moveresize)(struct window *);

66

67 /*

68 * Called when a client message arrives for a window.

69 * A hint should return nonzero if the message was understood.

70 */

71 int (*clientmessage)(struct window *, XClientMessageEvent *);

72

73 /*

74 * Called when a property event arrives for a window.

75 * A hint should return nonzero if the property was understood.

76 */

77 int (*propertynotify)(struct window *, XPropertyEvent *);

78

79 /*

80 * Called when a hint should try to gracefully delete the

81 * window. A hint should return nonzero if it knows how

82 * to delete the window.

83 */

84 int (*delete)(struct window *);

85

86 /* Called after restacking windows */

87 void (*restack)(void);

88 };

89

90 void hints_init(void);

91 void hints_fini(void);

92 void hints_manage(struct window *);

93 void hints_unmanage(struct window *);

94 void hints_map(struct window *);

95 void hints_unmap(struct window *);

96 void hints_withdraw(struct window *);

97 void hints_activate(struct window *);

98 void hints_deactivate(struct window *);

99 void hints_move(struct window *);

100 void hints_resize(struct window *);

101 void hints_moveresize(struct window *);

102 void hints_clientmessage(struct window *, XClientMessageEvent *);

103 void hints_propertynotify(struct window *, XPropertyEvent *);

104 int hints_delete(struct window *);

105 void hints_restack(void);

106

107 #endif /* !defined(HINTS_H) */

108