File: hookref.tex

package info (click to toggle)
ion3 20050502-2
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 5,188 kB
  • ctags: 5,450
  • sloc: ansic: 39,916; perl: 2,445; sh: 1,229; makefile: 639; ruby: 90
file content (230 lines) | stat: -rw-r--r-- 8,201 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230

\begin{function}
    \index{clientwin-do-manage-alt@\code{clientwin_do_manage_alt}}
    \hookname{clientwin_do_manage_alt}
    \hookparams{(WClientWin, table)}
    \begin{funcdesc}
      Called when we want to manage a new client window.
      The table argument contains the following fields:
      
      \begin{tabularx}{\linewidth}{llX}
          \tabhead{Field & Type & Description}
          \var{switchto} & bool & Do we want to switch to the client window. \\
          \var{jumpto} & bool & Do we want to jump to the client window. \\
          \var{userpos} & bool & Geometry set by user. \\
          \var{dockapp} & bool & Client window is a dockapp. \\
          \var{maprq} & bool & Map request (and not initialisation scan). \\
          \var{gravity} & number & Window gravity. \\
          \var{geom} & table & Requested geometry; \var{x}, \var{y}, \var{w}, \var{h}.\\
          \var{tfor} & WClientWin & Transient for window.
      \end{tabularx}

      This hook is not called in protected mode and can be used for
      arbitrary placement policies (deciding in which workspace a new
      \type{WClientWin} should go). In this case, you can call
\begin{verbatim}
reg:attach(cwin)
\end{verbatim}
      where \var{reg} is the region where the window should go, and
      \var{cwin} is the first argument of the function added to the
      hook.
    \end{funcdesc}
\end{function}


\begin{function}
    \index{clientwin-mapped-hook@\code{clientwin_mapped_hook}}
    \hookname{clientwin_mapped_hook}
    \hookparams{WClientWin}
    \begin{funcdesc}
      Called when we have started to manage a client window.
    \end{funcdesc}
\end{function}


\begin{function}
    \index{clientwin-unmapped-hook@\code{clientwin_unmapped_hook}}
    \hookname{clientwin_unmapped_hook}
    \hookparams{number}
    \begin{funcdesc}
      Called when we no longer manage a client window. The parameter
      is the X ID of the window; see \fnref{WClientWin.xid}.
    \end{funcdesc}
\end{function}


\begin{function}
    \index{frame-managed-changed-hook@\code{frame_managed_changed_hook}}
    \hookname{frame_managed_changed_hook}
    \hookparams{table}
    \begin{funcdesc}
      Called when there are changes in the objects managed by a frame
      or their order. The table parameter has the following fields:

      \begin{tabularx}{\linewidth}{llX}
          \tabhead{Field & Type & Description}
          \var{reg} & WFrame & The frame in question \\
          \var{mode} & string & \var{"switchonly"}, \var{"reorder"},
                                \var{"add"} or \var{"remove"} \\
          \var{sw} & bool & Switch occured \\
          \var{sub} & WRegion & The managed region (primarily) affected \\
      \end{tabularx}
    \end{funcdesc}
\end{function}


\begin{function}
    \index{ioncore-sigchld-hook@\code{ioncore_sigchld_hook}}
    \hookname{ioncore_sigchld_hook}
    \hookparams{integer}
    \begin{funcdesc}
      Called when a child process has exited. The parameter
      is the PID of the process.
    \end{funcdesc}
\end{function}

\begin{function}
    \index{ioncore-deinit-hook@\code{ioncore_deinit_hook}}
    \hookname{ioncore_deinit_hook}
    \hookparams{()}
    \begin{funcdesc}
      Called when Ion is deinitialising and about to quit.
    \end{funcdesc}
\end{function}

%ioncore_handle_event_alt -- not available to lua side

\begin{function}
    \index{ioncore-post-layout-setup-hook@\code{ioncore_post_layout_setup_hook}}
    \hookname{ioncore_post_layout_setup_hook}
    \hookparams{()}
    \begin{funcdesc}
      Called when Ion has done all initialisation and is almost ready to
      enter the mainloop, except no windows are yet being managed.
    \end{funcdesc}
\end{function}


\begin{function}
    \index{ioncore-snapshot-hook@\code{ioncore_snapshot_hook}}
    \hookname{ioncore_snapshot_hook}
    \hookparams{()}
    \begin{funcdesc}
      Called to signal scripts and modules to save their state (if any).
    \end{funcdesc}
\end{function}


\begin{function}
    \index{ionws-placement-alt@\code{ionws_placement_alt}}
    \hookname{ionws_placement_alt}
    \hookparams{table}
    \begin{funcdesc}
      Called when a client window is about to be managed by a \type{WIonWS}
      to allow for alternative placement policies. The table has the
      following fields:
      \begin{tabularx}{\linewidth}{llX}
          \tabhead{Field & Type & Description}
          \var{ws} & \type{WIonWS} & The workspace \\
          \var{reg} & \type{WRegion} & The region (always a WClientWin at 
              the moment) to be placed \\
          \var{mp} & \type{table} & This table contains the same fields as
            the parameter of \fnref{clientwin_do_manage_alt} \\
          \var{res_frame} & \type{WFrame} & A succesfull handler should 
            return the target frame here. \\
      \end{tabularx}
      This hook is just for placing within a given workspace after the
      workspace has been decided by the default workspace selection
      policy. It is called in protected mode. For arbitrary placement
      policies, \fnref{clientwin_do_manage_alt} should be used; it
      isn't called in protected mode,
    \end{funcdesc}
\end{function}


\begin{function}
    \index{panews-init-layout-alt@\code{panews_init_layout_alt}}
    \hookname{panews_init_layout_alt}
    \hookparams{table}
    \begin{funcdesc}
      Called to initialise panews layout. The table parameter has
      initially a single field \var{ws} pointing to the workspace,
      but the succesfull handler should set the field \var{layout}
      to a proper layout (as those saved in the layout savefiles).
    \end{funcdesc}
\end{function}


\begin{function}
    \index{panews-make-placement-alt@\code{panews_make_placement_alt}}
    \hookname{panews_make_placement_alt}
    \hookparams{table}
    \begin{funcdesc}
      Called to make a placement on panews. The parameter table has
      the following fields:
      
      \begin{tabularx}{\linewidth}{llX}
          \tabhead{Field & Type & Description}
          \var{ws} & \type{WPaneWS} & The workspace \\
          \var{frame} & \type{WFrame} & A frame initially allocated for the
              region to be placed \\
          \var{reg} & \type{WRegion} & The region to be placed \\
          \var{specifier} & \type{WRegion} & For drag\&drop on handling empty areas\\
      \end{tabularx}
      
      The handler should set some of these fields on success:

      \begin{tabularx}{\linewidth}{llX}
          \tabhead{Field & Type & Description}
          \var{res_node} & \type{WSplit} & Target split \\
          \var{res_config} & \type{WFrame} &  New configuration for it, unless
              \type{WSplitRegion} \\
          \var{res_w} & integer & New width for target split (optional) \\
          \var{res_h} & integer & New height for target split (optional) \\
      \end{tabularx}
    \end{funcdesc}
\end{function}


\begin{function}
    \index{region-activated-hook@\code{region_activated_hook}}
    \hookname{region_activated_hook}
    \hookparams{WRegion}
    \begin{funcdesc}
      Signalled when a region or one of its children has received the focus.
    \end{funcdesc}
\end{function}


\begin{function}
    \index{region-do-warp-alt@\code{region_do_warp_alt}}
    \hookname{region_do_warp_alt}
    \hookparams{WRegion}
    \begin{funcdesc}
      This alt-hook exist to allow for alternative pointer warping
      implementations.
    \end{funcdesc}
\end{function}


\begin{function}
    \index{region-inactivated-hook@\code{region_inactivated_hook}}
    \hookname{region_inactivated_hook}
    \hookparams{WRegion}
    \begin{funcdesc}
      Signalled when the focus has moved from the parameter region or
      one of its children to a non-child region of the parameter region.
    \end{funcdesc}
\end{function}


\begin{function}
    \index{screen-managed-changed-hook@\code{screen_managed_changed_hook}}
    \hookname{screen_managed_changed_hook}
    \hookparams{table}
    \begin{funcdesc}
      Called when there are changes in the objects managed by a screen
      or their order. The table parameter is similar to that of
      \fnref{frame_managed_changed_hook}.
    \end{funcdesc}
\end{function}