]> git.decadent.org.uk Git - ion3-doc.git/blob - hookref.tex
Add 20080411-1.
[ion3-doc.git] / hookref.tex
1
2 \begin{function}
3     \index{clientwin-do-manage-alt@\code{clientwin_do_manage_alt}}
4     \hookname{clientwin_do_manage_alt}
5     \hookparams{(WClientWin, table)}
6     \begin{funcdesc}
7       Called when we want to manage a new client window.
8       The table argument contains the following fields:
9       
10       \begin{tabularx}{\linewidth}{llX}
11           \tabhead{Field & Type & Description}
12           \var{switchto} & bool & Do we want to switch to the client window. \\
13           \var{jumpto} & bool & Do we want to jump to the client window. \\
14           \var{userpos} & bool & Geometry set by user. \\
15           \var{dockapp} & bool & Client window is a dock-app. \\
16           \var{maprq} & bool & Map request (and not initialisation scan). \\
17           \var{gravity} & number & Window gravity. \\
18           \var{geom} & table & Requested geometry; \var{x}, \var{y}, \var{w}, \var{h}.\\
19           \var{tfor} & WClientWin & Transient for window.
20       \end{tabularx}
21
22       This hook is not called in protected mode and can be used for
23       arbitrary placement policies (deciding in which workspace a new
24       \type{WClientWin} should go). In this case, you can call
25 \begin{verbatim}
26 reg:attach(cwin)
27 \end{verbatim}
28       where \var{reg} is the region where the window should go, and
29       \var{cwin} is the first argument of the function added to the
30       hook.
31     \end{funcdesc}
32 \end{function}
33
34
35 \begin{function}
36     \index{clientwin-mapped-hook@\code{clientwin_mapped_hook}}
37     \hookname{clientwin_mapped_hook}
38     \hookparams{WClientWin}
39     \begin{funcdesc}
40       Called when we have started to manage a client window.
41     \end{funcdesc}
42 \end{function}
43
44
45 \begin{function}
46     \index{clientwin-property-change-hook@\code{clientwin_property_change_hook}}
47     \hookname{clientwin_property_change_hook}
48     \hookparams{(WClientWin, integer)}
49     \begin{funcdesc}
50       Called when the property identified by the parameter atom id
51       (integer) has changed on a client window.
52     \end{funcdesc}
53 \end{function}
54
55
56 \begin{function}
57     \index{clientwin-unmapped-hook@\code{clientwin_unmapped_hook}}
58     \hookname{clientwin_unmapped_hook}
59     \hookparams{number}
60     \begin{funcdesc}
61       Called when we no longer manage a client window. The parameter
62       is the X ID of the window; see \fnref{WClientWin.xid}.
63     \end{funcdesc}
64 \end{function}
65
66
67 \begin{function}
68     \index{frame-managed-changed-hook@\code{frame_managed_changed_hook}}
69     \hookname{frame_managed_changed_hook}
70     \hookparams{table}
71     \begin{funcdesc}
72       Called when there are changes in the objects managed by a frame
73       or their order. The table parameter has the following fields:
74
75       \begin{tabularx}{\linewidth}{llX}
76           \tabhead{Field & Type & Description}
77           \var{reg} & WFrame & The frame in question \\
78           \var{mode} & string & \codestr{switchonly}, \codestr{reorder},
79                                 \codestr{add} or \codestr{remove} \\
80           \var{sw} & bool & Switch occurred \\
81           \var{sub} & WRegion & The managed region (primarily) affected \\
82       \end{tabularx}
83     \end{funcdesc}
84 \end{function}
85
86
87 \begin{function}
88     \index{ioncore-sigchld-hook@\code{ioncore_sigchld_hook}}
89     \hookname{ioncore_sigchld_hook}
90     \hookparams{integer}
91     \begin{funcdesc}
92       Called when a child process has exited. The parameter
93       is the PID of the process.
94     \end{funcdesc}
95 \end{function}
96
97 \begin{function}
98     \index{ioncore-deinit-hook@\code{ioncore_deinit_hook}}
99     \hookname{ioncore_deinit_hook}
100     \hookparams{()}
101     \begin{funcdesc}
102       Called when Ion is deinitialising and about to quit.
103     \end{funcdesc}
104 \end{function}
105
106 %ioncore_handle_event_alt -- not available to lua side
107
108 \begin{function}
109     \index{ioncore-post-layout-setup-hook@\code{ioncore_post_layout_setup_hook}}
110     \hookname{ioncore_post_layout_setup_hook}
111     \hookparams{()}
112     \begin{funcdesc}
113       Called when Ion has done all initialisation and is almost ready to
114       enter the main-loop, except no windows are yet being managed.
115     \end{funcdesc}
116 \end{function}
117
118
119 \begin{function}
120     \index{ioncore-snapshot-hook@\code{ioncore_snapshot_hook}}
121     \hookname{ioncore_snapshot_hook}
122     \hookparams{()}
123     \begin{funcdesc}
124       Called to signal scripts and modules to save their state (if any).
125     \end{funcdesc}
126 \end{function}
127
128
129 \begin{function}
130     \index{ioncore-submap-ungrab-hook@\code{ioncore_submap_ungrab_hook}}
131     \hookname{ioncore_submap_ungrab_hook}
132     \hookparams{()}
133     \begin{funcdesc}
134       This hook is used to signal whenever Ion leaves the submap grab mode.
135     \end{funcdesc}
136 \end{function}
137
138
139 \begin{function}
140     \index{tiling-placement-alt@\code{tiling_placement_alt}}
141     \hookname{tiling_placement_alt}
142     \hookparams{table}
143     \begin{funcdesc}
144       Called when a client window is about to be managed by a \type{WTiling}
145       to allow for alternative placement policies. The table has the
146       following fields:
147       \begin{tabularx}{\linewidth}{llX}
148           \tabhead{Field & Type & Description}
149           \var{tiling} & \type{WTiling} & The tiling \\
150           \var{reg} & \type{WRegion} & The region (always a WClientWin at 
151               the moment) to be placed \\
152           \var{mp} & \type{table} & This table contains the same fields as
153             the parameter of \fnref{clientwin_do_manage_alt} \\
154           \var{res_frame} & \type{WFrame} & A successful handler should 
155             return the target frame here. \\
156       \end{tabularx}
157       This hook is just for placing within a given workspace after the
158       workspace has been decided by the default workspace selection
159       policy. It is called in protected mode. For arbitrary placement
160       policies, \fnref{clientwin_do_manage_alt} should be used; it
161       isn't called in protected mode,
162     \end{funcdesc}
163 \end{function}
164
165
166 \begin{function}
167     \index{region-do-warp-alt@\code{region_do_warp_alt}}
168     \hookname{region_do_warp_alt}
169     \hookparams{WRegion}
170     \begin{funcdesc}
171       This alt-hook exist to allow for alternative pointer warping
172       implementations.
173     \end{funcdesc}
174 \end{function}
175
176
177 \begin{function}
178     \index{screen-managed-changed-hook@\code{screen_managed_changed_hook}}
179     \hookname{screen_managed_changed_hook}
180     \hookparams{table}
181     \begin{funcdesc}
182       Called when there are changes in the objects managed by a screen
183       or their order. The table parameter is similar to that of
184       \fnref{frame_managed_changed_hook}.
185     \end{funcdesc}
186 \end{function}
187
188
189 \begin{function}
190     \index{region-notify-hook@\code{region_notify_hook}}
191     \hookname{region_notify_hook}
192     \hookparams{(WRegion, string)}
193     \begin{funcdesc}
194       Signalled when something (minor) has changed in relation to 
195       the first parameter region. The string argument gives the
196       change:
197       
198       \begin{tabularx}{\linewidth}{lX}
199           \tabhead{String & Description}
200           \code{deinit} & The region is about to be deinitialised. \\
201           \code{activated} & The region has received focus. \\
202           \code{inactivated} & The region has lost focus. \\
203           \code{activity} & There's been activity in the region itself. \\
204           \code{sub_activity} & There's been activity in some sub-region. \\
205           \code{name} & The name of the region has changed. \\
206           \code{unset_manager} & The region no longer has a manager. \\
207           \code{set_manager} & The region now has a manager. \\
208           \code{tag} & Tagging state has changed. \\
209           \code{pseudoactivated} & The region has become pseudo-active
210                       (see below). \\
211           \code{pseudoinactivated} & The region is no longer pseudo-active. \\
212       \end{tabularx}
213
214       A region is pseudo-active, when a) it is itself not active (does
215       not not have the focus, and may not even have a window that could
216       have it), but b) some region managed by it is active.
217     \end{funcdesc}
218 \end{function}
219
220