Mikhael Goikhman <[EMAIL PROTECTED]> writes: > On 14 Sep 2004 20:22:39 -0400, Salvatore Domenick Desiano wrote: >> >> On 14 Sep 2004, Mark Gray wrote: >> >> o I am writing a fvwm perl module and anticipate wanting to parse the >> o window_flags data upon receiving each M_ADD_WINDOW event. Looking >> o through the FVWM perl modules I did not see any function for doing >> o this, and before going to the trouble to translate the bit-fields in >> o fvwm.h to perl I thought I would ask if it has already been done (and >> o I just didn't look hard enough:-) This will be my first FVWM perl >> o module so I apologize if this is a FAQ. >> >> Unfortunately, the flag locations differs from platform to platform and >> from compiler to compiler. If you (or anyone) wanted to write a robust >> version, it would have to do a compile of a C program during the build of >> fvwm, and produce some perl code from the result. >> >> I've done it for individual flags, but my process is entirely manual >> because I'm only using two or three flags.
> The proper solution is to serialize the flags without dumping C > structures. Here is a discussion: > http://www.hpc.uh.edu/fvwm/archive/0407/msg00186.html > > It is not very hard to implement what is suggested in the link without > removing the current complier dependent flags. The hard part is to decide > on the 50 most useful flags to be packed in two integers; I don't think > we need to pass more flags, no modules use them. But I currently don't > have a time to implement this in fvwm. Unfortunately. > > If someone implements this, I will try to find the time to support these > packed flags in perl stuff, including FvwmDebug and WindowList tracker. What are your feelings about adding a C Perl module to the FVWM perl modules which would do this? My only experience with writing C/C++ Perl modules consists of working through the examples and exercises in books on Perl, but it sounds like it might be a faster route to a solution (faster than for me to learn the internal operations of the fvwm code well enough to hack in another event to fvwm as msg00186.html suggests.) The biggest problem I can see with adding a C Perl module to fvwm's perllib, is in the build process on unknown platforms -- not everyone is going to even have their systems in a state that is capable of compiling a C Perl module (old Redhat Linux systems come to mind). -- Visit the official FVWM web page at <URL: http://www.fvwm.org/>. To unsubscribe from the list, send "unsubscribe fvwm" in the body of a message to [EMAIL PROTECTED] To report problems, send mail to [EMAIL PROTECTED]