1 <!-- Creator : groff version 1.18.1 -->
2 <!-- CreationDate: Tue Dec 13 14:56:40 2005 -->
5 <meta name="generator" content="groff -Thtml, see www.gnu.org">
6 <meta name="Content-Style" content="text/css">
11 <h1 align=center>Fvwm</h1>
12 <a href="#NAME">NAME</a><br>
13 <a href="#SYNOPSIS">SYNOPSIS</a><br>
14 <a href="#DESCRIPTION">DESCRIPTION</a><br>
15 <a href="#VARIABLES">VARIABLES</a><br>
16 <a href="#FUNCTIONS">FUNCTIONS</a><br>
17 <a href="#EVENTS">EVENTS</a><br>
18 <a href="#EVENT LIST">EVENT LIST</a><br>
19 <a href="#ERROR REPORTING">ERROR REPORTING</a><br>
20 <a href="#SEE ALSO">SEE ALSO</a><br>
21 <a href="#BUGS">BUGS</a><br>
22 <a href="#AUTHOR">AUTHOR</a><br>
28 <table width="100%" border=0 rules="none" frame="void"
29 cols="2" cellspacing="0" cellpadding="0">
30 <tr valign="top" align="left">
33 <p>Fvwm − Fvwm module interface for Tcl</p>
36 <a name="SYNOPSIS"></a>
39 <table width="100%" border=0 rules="none" frame="void"
40 cols="2" cellspacing="0" cellpadding="0">
41 <tr valign="top" align="left">
44 <p>package require <b>Fvwm</b></p>
46 <p><b>fvwm::send</b> <i>command</i> ?<i>windowid</i>?</p>
48 <p><b>fvwm::bind</b> <i>event</i> ?<i>script</i>?</p>
50 <p><b>fvwm::getConfig</b> <i>varname</i>
51 ?<i>globPattern</i>?</p>
53 <p><b>fvwm::getWindowList</b> <i>varname</i></p>
55 <p><b>fvwm::setMask</b> <i>list</i></p>
57 <p><b>fvwm::iconPath</b> <i>name</i> ?<i>option</i>?</p>
60 <a name="DESCRIPTION"></a>
63 <table width="100%" border=0 rules="none" frame="void"
64 cols="2" cellspacing="0" cellpadding="0">
65 <tr valign="top" align="left">
68 <p><b>Fvwm</b> package is a Tcl-only package which provides
69 a way to build <b>fvwm</b>(1) modules on Tcl/Tk. Upon
70 package initialization it checks if script is invoked as
71 fvwm module and set ups pipes to communicate with
72 <b>fvwm</b>. If script doesn’t started as fvwm module,
73 package initialization fails. Package provides procedures to
74 set commands to fvwm and obtain information from it. It
75 provides procedures to parse fvwm <b>WindowList</b> and
76 <b>ConfigInfo</b> messages and way to handle messages sended
77 by fvwm just like Tk events.</p>
79 <p>Upon initialization <b>Fvwm</b> package removes all
80 fvwm-specific information from global <b>argv</b> variable
81 and changes <b>argc</b> accordingly. This information can be
82 accessed via package variables.</p>
85 <a name="VARIABLES"></a>
88 <table width="100%" border=0 rules="none" frame="void"
89 cols="4" cellspacing="0" cellpadding="0">
90 <tr valign="top" align="left">
99 <p>Contain information about context in which module is
100 called. It can be one of following strings:</p>
104 <table width="100%" border=0 rules="none" frame="void"
105 cols="2" cellspacing="0" cellpadding="0">
106 <tr valign="top" align="left">
107 <td width="21%"></td>
109 <p><b>NO_CONTEXT</b>, <b>WINDOW</b>, <b>TITLE</b>,
110 <b>ICON</b>, <b>ROOT</b>, <b>FRAME</b>, <b>SIDEBAR</b>,
111 <b>LEFT1</b> - <b>LEFT5</b>, <b>RIGHT1</b> -
114 <p>which corresponds with parts of window decorations,
115 provided by fvwm</p></td>
118 <table width="100%" border=0 rules="none" frame="void"
119 cols="2" cellspacing="0" cellpadding="0">
120 <tr valign="top" align="left">
121 <td width="10%"></td>
123 <p><b>WindowId</b></p></td>
126 <table width="100%" border=0 rules="none" frame="void"
127 cols="2" cellspacing="0" cellpadding="0">
128 <tr valign="top" align="left">
129 <td width="23%"></td>
131 <p>Integer (decimal) identifier of window, in whose context
132 script was called</p>
136 <table width="100%" border=0 rules="none" frame="void"
137 cols="2" cellspacing="0" cellpadding="0">
138 <tr valign="top" align="left">
139 <td width="10%"></td>
141 <p><b>configFile</b></p></td>
144 <table width="100%" border=0 rules="none" frame="void"
145 cols="2" cellspacing="0" cellpadding="0">
146 <tr valign="top" align="left">
147 <td width="23%"></td>
149 <p>Name of <b>fvwm</b> configuration file (probably useless
150 for fvwm 2.0, because configuration info could be requested
151 from fvwm itself.</p>
154 <a name="FUNCTIONS"></a>
157 <table width="100%" border=0 rules="none" frame="void"
158 cols="2" cellspacing="0" cellpadding="0">
159 <tr valign="top" align="left">
160 <td width="10%"></td>
162 <p><b>send</b> <i>command</i> ?<i>windowId</i>?</p></td>
165 <table width="100%" border=0 rules="none" frame="void"
166 cols="2" cellspacing="0" cellpadding="0">
167 <tr valign="top" align="left">
168 <td width="23%"></td>
170 <p>sends a command to fvwm. Command is a string exactly as
171 it appears in <b>.fvwmrc</b> file. Command may be optionally
172 followed by <i>window id</i>, in this case it can be applied
177 <table width="100%" border=0 rules="none" frame="void"
178 cols="2" cellspacing="0" cellpadding="0">
179 <tr valign="top" align="left">
180 <td width="10%"></td>
182 <p><b>setMask</b> <i>list</i></p></td>
185 <table width="100%" border=0 rules="none" frame="void"
186 cols="2" cellspacing="0" cellpadding="0">
187 <tr valign="top" align="left">
188 <td width="23%"></td>
190 <p>Instructs <b>fvwm</b> to send only certain events to this
191 script. List should contain list of event names (see EVENTS
196 <table width="100%" border=0 rules="none" frame="void"
197 cols="2" cellspacing="0" cellpadding="0">
198 <tr valign="top" align="left">
199 <td width="10%"></td>
201 <p><b>bind</b> <i>event</i> ?<i>script</i>?</p></td>
204 <table width="100%" border=0 rules="none" frame="void"
205 cols="2" cellspacing="0" cellpadding="0">
206 <tr valign="top" align="left">
207 <td width="23%"></td>
209 <p>binds a script with specific fvwm event (see EVENTS
210 below) Script will be executed in global namespace appended
211 by list of event arguments. If script is omitted, current
212 script would be returned. Specifying empty string disables
213 processing of given event.</p>
217 <table width="100%" border=0 rules="none" frame="void"
218 cols="2" cellspacing="0" cellpadding="0">
219 <tr valign="top" align="left">
220 <td width="10%"></td>
222 <p><b>getConfig</b> <i>varname</i>
223 ?<i>globPattern</i>?</p></td>
226 <table width="100%" border=0 rules="none" frame="void"
227 cols="2" cellspacing="0" cellpadding="0">
228 <tr valign="top" align="left">
229 <td width="23%"></td>
231 <p>Requests configuration information from fvwm and stores
232 it in the array <i>varname</i>. Glob pattern allows to
233 restrict configuration to lines matching pattern.</p></td>
236 <table width="100%" border=0 rules="none" frame="void"
237 cols="2" cellspacing="0" cellpadding="0">
238 <tr valign="top" align="left">
239 <td width="21%"></td>
241 <p>Global configuration lines such as <b>PixmapPath</b>
242 would be always returned, but module-specific lines (those
243 which start from <b>‘*’</b>), would be returned
244 only if they (with ‘*’ stripped off) match given
245 pattern. First word in line (without ‘*’) would
246 be used as array index. If multiple lines have same first
247 word, they would be concatenated into Tcl list.</p>
249 <p>Entries which are lists of directories (<b>IconPath</b>,
250 <b>PixmapPath</b>) are converted to Tcl list too.</p></td>
253 <table width="100%" border=0 rules="none" frame="void"
254 cols="2" cellspacing="0" cellpadding="0">
255 <tr valign="top" align="left">
256 <td width="10%"></td>
258 <p><b>getWindowList</b> <i>varname</i></p></td>
261 <table width="100%" border=0 rules="none" frame="void"
262 cols="2" cellspacing="0" cellpadding="0">
263 <tr valign="top" align="left">
264 <td width="23%"></td>
266 <p>Requests information about current desktop state and
267 stores it in the given array variable. This array would have
271 <table width="100%" border=0 rules="none" frame="void"
272 cols="2" cellspacing="0" cellpadding="0">
273 <tr valign="top" align="left">
274 <td width="21%"></td>
276 <p><b>Desk</b></p></td>
279 <table width="100%" border=0 rules="none" frame="void"
280 cols="2" cellspacing="0" cellpadding="0">
281 <tr valign="top" align="left">
282 <td width="29%"></td>
284 <p>Number of current desk</p>
288 <table width="100%" border=0 rules="none" frame="void"
289 cols="2" cellspacing="0" cellpadding="0">
290 <tr valign="top" align="left">
291 <td width="21%"></td>
293 <p><b>Page</b></p></td>
296 <table width="100%" border=0 rules="none" frame="void"
297 cols="2" cellspacing="0" cellpadding="0">
298 <tr valign="top" align="left">
299 <td width="29%"></td>
301 <p>list of four coordinates of current page</p>
305 <table width="100%" border=0 rules="none" frame="void"
306 cols="2" cellspacing="0" cellpadding="0">
307 <tr valign="top" align="left">
308 <td width="21%"></td>
310 <p><b>Focus</b></p></td>
313 <table width="100%" border=0 rules="none" frame="void"
314 cols="2" cellspacing="0" cellpadding="0">
315 <tr valign="top" align="left">
316 <td width="29%"></td>
318 <p>containing Id of toplevel window.</p>
322 <table width="100%" border=0 rules="none" frame="void"
323 cols="2" cellspacing="0" cellpadding="0">
324 <tr valign="top" align="left">
325 <td width="21%"></td>
327 <p><b>DefaultIcon</b></p></td>
330 <table width="100%" border=0 rules="none" frame="void"
331 cols="2" cellspacing="0" cellpadding="0">
332 <tr valign="top" align="left">
333 <td width="29%"></td>
335 <p>name of default icon (used for windows which have no icon
336 defined) <i>windowId</i><b>,frame</b> for each window there
337 is list of following values: windowId of window frame, X of
338 frame, Y of frame, width of frame, height of frame, height
339 of title, border width,</p>
343 <table width="100%" border=0 rules="none" frame="void"
344 cols="2" cellspacing="0" cellpadding="0">
345 <tr valign="top" align="left">
346 <td width="21%"></td>
348 <p><i>windowId</i><b>,desk</b></p></td>
351 <table width="100%" border=0 rules="none" frame="void"
352 cols="2" cellspacing="0" cellpadding="0">
353 <tr valign="top" align="left">
354 <td width="29%"></td>
356 <p>number of desktop,</p>
360 <table width="100%" border=0 rules="none" frame="void"
361 cols="2" cellspacing="0" cellpadding="0">
362 <tr valign="top" align="left">
363 <td width="21%"></td>
365 <p><i>windowId</i><b>,flags</b></p></td>
368 <table width="100%" border=0 rules="none" frame="void"
369 cols="2" cellspacing="0" cellpadding="0">
370 <tr valign="top" align="left">
371 <td width="29%"></td>
373 <p>window flags field</p>
377 <table width="100%" border=0 rules="none" frame="void"
378 cols="2" cellspacing="0" cellpadding="0">
379 <tr valign="top" align="left">
380 <td width="21%"></td>
382 <p><i>windowId</i><b>,base</b></p></td>
385 <table width="100%" border=0 rules="none" frame="void"
386 cols="2" cellspacing="0" cellpadding="0">
387 <tr valign="top" align="left">
388 <td width="29%"></td>
390 <p>Offset of window base coordinates from top-left frame
395 <table width="100%" border=0 rules="none" frame="void"
396 cols="2" cellspacing="0" cellpadding="0">
397 <tr valign="top" align="left">
398 <td width="21%"></td>
400 <p><i>windowId</i><b>,grid</b></p></td>
403 <table width="100%" border=0 rules="none" frame="void"
404 cols="2" cellspacing="0" cellpadding="0">
405 <tr valign="top" align="left">
406 <td width="29%"></td>
408 <p>resize width increment, resize height increment,</p>
412 <table width="100%" border=0 rules="none" frame="void"
413 cols="2" cellspacing="0" cellpadding="0">
414 <tr valign="top" align="left">
415 <td width="21%"></td>
417 <p><i>windowId</i><b>,min</b></p></td>
420 <table width="100%" border=0 rules="none" frame="void"
421 cols="2" cellspacing="0" cellpadding="0">
422 <tr valign="top" align="left">
423 <td width="29%"></td>
425 <p>minimum width, minimum height.</p>
429 <table width="100%" border=0 rules="none" frame="void"
430 cols="2" cellspacing="0" cellpadding="0">
431 <tr valign="top" align="left">
432 <td width="21%"></td>
434 <p><i>windowId</i><b>,max</b></p></td>
437 <table width="100%" border=0 rules="none" frame="void"
438 cols="2" cellspacing="0" cellpadding="0">
439 <tr valign="top" align="left">
440 <td width="29%"></td>
442 <p>maximum width, maximum height.</p>
446 <table width="100%" border=0 rules="none" frame="void"
447 cols="2" cellspacing="0" cellpadding="0">
448 <tr valign="top" align="left">
449 <td width="21%"></td>
451 <p><i>windowId</i><b>,iconIds</b></p></td>
454 <table width="100%" border=0 rules="none" frame="void"
455 cols="2" cellspacing="0" cellpadding="0">
456 <tr valign="top" align="left">
457 <td width="29%"></td>
459 <p>icon label window id (or 0), icon pixmap window id (or
464 <table width="100%" border=0 rules="none" frame="void"
465 cols="2" cellspacing="0" cellpadding="0">
466 <tr valign="top" align="left">
467 <td width="21%"></td>
469 <p><i>windowId</i><b>,gravity</b>window</p></td>
472 <table width="100%" border=0 rules="none" frame="void"
473 cols="2" cellspacing="0" cellpadding="0">
474 <tr valign="top" align="left">
475 <td width="29%"></td>
477 <p>gravity, string, as defined in
478 /usr/X11R6/include/X11/X.h</p>
482 <table width="100%" border=0 rules="none" frame="void"
483 cols="2" cellspacing="0" cellpadding="0">
484 <tr valign="top" align="left">
485 <td width="21%"></td>
487 <p><i>windowId</i><b>,title</b></p></td>
490 <table width="100%" border=0 rules="none" frame="void"
491 cols="2" cellspacing="0" cellpadding="0">
492 <tr valign="top" align="left">
493 <td width="29%"></td>
495 <p>Title of window</p>
499 <table width="100%" border=0 rules="none" frame="void"
500 cols="2" cellspacing="0" cellpadding="0">
501 <tr valign="top" align="left">
502 <td width="21%"></td>
504 <p><i>windowId</i><b>,iconName</b></p></td>
507 <table width="100%" border=0 rules="none" frame="void"
508 cols="2" cellspacing="0" cellpadding="0">
509 <tr valign="top" align="left">
510 <td width="29%"></td>
512 <p>Title of icon for this window</p>
516 <table width="100%" border=0 rules="none" frame="void"
517 cols="2" cellspacing="0" cellpadding="0">
518 <tr valign="top" align="left">
519 <td width="21%"></td>
521 <p><i>windowId</i><b>,resource</b></p></td>
524 <table width="100%" border=0 rules="none" frame="void"
525 cols="2" cellspacing="0" cellpadding="0">
526 <tr valign="top" align="left">
527 <td width="29%"></td>
529 <p>Resource name for this window</p>
533 <table width="100%" border=0 rules="none" frame="void"
534 cols="2" cellspacing="0" cellpadding="0">
535 <tr valign="top" align="left">
536 <td width="21%"></td>
538 <p><i>windowId</i><b>,class</b></p></td>
541 <table width="100%" border=0 rules="none" frame="void"
542 cols="2" cellspacing="0" cellpadding="0">
543 <tr valign="top" align="left">
544 <td width="29%"></td>
546 <p>Resource class for this window</p>
550 <table width="100%" border=0 rules="none" frame="void"
551 cols="2" cellspacing="0" cellpadding="0">
552 <tr valign="top" align="left">
553 <td width="21%"></td>
555 <p><i>windowId</i><b>,icon</b></p></td>
558 <table width="100%" border=0 rules="none" frame="void"
559 cols="2" cellspacing="0" cellpadding="0">
560 <tr valign="top" align="left">
561 <td width="29%"></td>
563 <p>Name of xpm file which is used as icon for this
568 <table width="100%" border=0 rules="none" frame="void"
569 cols="2" cellspacing="0" cellpadding="0">
570 <tr valign="top" align="left">
571 <td width="21%"></td>
573 <p><i>windowId</i><b>,miniIcon</b></p></td>
576 <table width="100%" border=0 rules="none" frame="void"
577 cols="2" cellspacing="0" cellpadding="0">
578 <tr valign="top" align="left">
579 <td width="29%"></td>
581 <p>Name of xpm file which is used as title icon (fvwm-95
585 <table width="100%" border=0 rules="none" frame="void"
586 cols="2" cellspacing="0" cellpadding="0">
587 <tr valign="top" align="left">
588 <td width="10%"></td>
590 <p><b>iconPath</b> <i>filename</i> ?<i>option</i>?</p></td>
593 <table width="100%" border=0 rules="none" frame="void"
594 cols="2" cellspacing="0" cellpadding="0">
595 <tr valign="top" align="left">
596 <td width="23%"></td>
598 <p>Searches for given filename in fvwm pixmap or icon path
599 and returns full pathname of it if found. I don’t like
600 an idea to return Tcl image because there is two Tcl
601 extension which can create Xpm images - Img and Tix and I
602 don’t know which you’ll prefer.</p></td>
605 <table width="100%" border=0 rules="none" frame="void"
606 cols="2" cellspacing="0" cellpadding="0">
607 <tr valign="top" align="left">
608 <td width="21%"></td>
610 <p><i>option</i> can be either <b>-pixmap</b> or
611 <b>-icon</b> which would cause <b>PixmapPath</b> or
612 <b>IconPath</b> to be searched. Defaults to
613 <b>PixmapPath</b>.</p>
616 <a name="EVENTS"></a>
619 <table width="100%" border=0 rules="none" frame="void"
620 cols="2" cellspacing="0" cellpadding="0">
621 <tr valign="top" align="left">
622 <td width="10%"></td>
624 <p>Fvwm events are described in file <b>docs/modules.tex</b>
625 in fvwm distribution. If you are seriously planning to
626 develop fvwm module, you should read it anyway. Note that
627 event names in tcl Fvwm package differs in capitalization
628 from C constants, defined in fvwm’s <b>module.h</b>.
629 List of names is shown below.</p>
631 <p>When event handler is called it is appended by long list
632 of arguments. First argument passed is always event name,
633 thus allowing you to use same handlers for several event
634 types. All other fields are all field from fvwm packet body,
635 even they are appear completely useless. Refer to
636 <b>modules.tex</b> for description of this fields</p>
638 <p>For convinience we would note that if event is related to
639 particular window, its ID is passed as first argument, and
640 if event have text message associated with it, it is always
641 fourth (don’t counting event name).</p>
643 <p>There is one additional event type <b>DeadPipe</b>, which
644 occurs if eof on pipe is encountered. This event have
645 default handler, which exits from script. It can be
646 redefined to perform applicaton cleanup.</p>
648 <p>Event of type <b>Error</b> have default handler, which
649 raises Tcl error with same message as original event. This
650 error is raised from <b>after idle</b> handler to avoid
651 closing pipe, which is default Tcl behavoir in case of
652 unhandled errors in fileevent scripts.</p>
655 <a name="EVENT LIST"></a>
658 <table width="100%" border=0 rules="none" frame="void"
659 cols="2" cellspacing="0" cellpadding="0">
660 <tr valign="top" align="left">
661 <td width="10%"></td>
663 <p><b>FVWM 2.0.43 events</b></p></td>
666 <table width="100%" border=0 rules="none" frame="void"
667 cols="2" cellspacing="0" cellpadding="0">
668 <tr valign="top" align="left">
669 <td width="17%"></td>
671 <p>NewPage NewDesk AddWindow RaiseWindow LowerWindow
672 ConfigureWindow FocusChange DestroyWindow Iconify Deiconify
673 WindowName IconName ResClass ResName End_WindowList
674 IconLocation Map Error ConfigInfo End_ConfigInfo IconFile
675 DefaultIcon String</p>
679 <table width="100%" border=0 rules="none" frame="void"
680 cols="2" cellspacing="0" cellpadding="0">
681 <tr valign="top" align="left">
682 <td width="10%"></td>
684 <p><b>FVWM-95 only</b></p></td>
687 <table width="100%" border=0 rules="none" frame="void"
688 cols="2" cellspacing="0" cellpadding="0">
689 <tr valign="top" align="left">
690 <td width="17%"></td>
692 <p>FunctionEnd MiniIcon ScrollRegion</p>
696 <table width="100%" border=0 rules="none" frame="void"
697 cols="2" cellspacing="0" cellpadding="0">
698 <tr valign="top" align="left">
699 <td width="10%"></td>
701 <p><b>Dummy event, generated by package itself</b></p></td>
704 <table width="100%" border=0 rules="none" frame="void"
705 cols="2" cellspacing="0" cellpadding="0">
706 <tr valign="top" align="left">
707 <td width="17%"></td>
712 <a name="ERROR REPORTING"></a>
713 <h2>ERROR REPORTING</h2>
714 <a name="SEE ALSO"></a>
717 <table width="100%" border=0 rules="none" frame="void"
718 cols="2" cellspacing="0" cellpadding="0">
719 <tr valign="top" align="left">
720 <td width="10%"></td>
722 <p><b>fvwm(1)</b>, <b>docs/modules.tex</b> in fvwm
729 <table width="100%" border=0 rules="none" frame="void"
730 cols="2" cellspacing="0" cellpadding="0">
731 <tr valign="top" align="left">
732 <td width="10%"></td>
734 <p>getWindowList doesn’t properly handle pixel color
735 values, returned by fvwm. Parsing event args should be
736 better (may be keyed lists), especially for AddWindow and
737 ConfigureWindow. There could be problems with wrong
738 capitalization in fvwm config file, because <b>getConfig</b>
739 and <b>iconPath</b> work in case-sensitive manner, and fvwm
740 seems to be case-insensitive.</p>
743 <a name="AUTHOR"></a>
746 <table width="100%" border=0 rules="none" frame="void"
747 cols="2" cellspacing="0" cellpadding="0">
748 <tr valign="top" align="left">
749 <td width="10%"></td>
751 <p>Victor Wagner <vitus@ice.ru></p>