Richard Lister <ric_at_giccs.georgetown.edu> writes:
> On Wed, 13 Aug 1997 18:14:16 +0300 (IDT)
> Elad Eyal <elad_at_CS.bgu.ac.il>
> wrote concerning 'FVWM: Modules Programming':
> >
> > 1. Is there a definite source of information about module programming, in
> > addition to copy-and-pasting from existing modules?
>
> Yes. Look at docs/modules.tex in the fvwm2 distribution.
>
>
> Ric
I think this may be out of date, since a couple new message types were
added. Nothing fundamental changed though, and it's unlikely he'd use the new
message types (which are M_STRING, and M_MINI_ICON).
Elad should also look at how other modules do things. When I started writing
FvwmIconMan, I found most of the available modules were coded pretty
poorly. Things have gotten better since then. You might look at FvwmForm,
FvwmIconMan, and FvwmButtons. Basically you need to figure out:
1. How to read the fvwmrc file (link in fvwmlib, and use the stuff in Parse.c
and use GetConfigLine in Module.c). If you want to get into slick ways to
parse the config lines, you're on your own :-). I don't think any of the
modules really do a correct/clean job of it, including mine. I intend to
rewrite how FvwmIconMan tokenizes things, so if you come up with something
clever, please let me know.
2. How to set up things to receive events from fvwm and X (use
XConnectionNumber to find the X socket, and use select to switch between
reading X events and fvwm events. You probably can get away with just
ignoring fvwm events while rubberbanding). You will need to keep tabs on
where the various windows are though. It would be really cool if your
module could do some SmartPlacement like stuff to keep minimize
overlapping. I don't use smartplacement myself, but I bet some people would
like this.
3. How to send and receive messages to/from fvwm. (use ReadFvwmPacket in
fvwmlib, and then you might use the unions that I defined in FvwmIconMan,
or that the FvwmForm module uses to get at the fields).
4. How to set up the Imakefile (cut and paste). If you plan on making this
module into something that you'll be spending a lot of time tinkering with
and making cool - which I would recommend since there's a lot of room for
the module you have planned to grow (in other words, please make it cool!)
then you might look into setting things up so you can compile your module
both with and without the fvwm source around. I can send you how I do
things if you like. Basically I have two Imakefiles, and a private copy of
fvwmlib and some ifdef's here and there.
As for things I could see this module doing: "smart resizing" like smart
placement, so as I rubberband my window, my outline gets "guided" by the
module to stay clear of other windows. Not sure how this would work exactly,
but it could be cool. Having the module remember former locations/sizes of
windows, so I could move a window back to previous configutions
quickly. Having some keybindings during the rubberband process that would
maximize horizontally/vertically, move window all the way to the
left/top/bottom/right of the screen, move window to a given desk or page, etc.
Basically, everything anyone might want to do while moving or resizing a
window.
--
Brady Montz
bradym_at_cs.arizona.edu
--
Visit the official FVWM web page at <URL:http://www.hpc.uh.edu/fvwm/>.
To unsubscribe from the list, send "unsubscribe fvwm" in the body of a
message to majordomo_at_hpc.uh.edu.
To report problems, send mail to fvwm-owner_at_hpc.uh.edu.
Received on Wed Aug 13 1997 - 13:21:15 BST