Re: FVWM: Parsing window_flags in perl

From: Salvatore Domenick Desiano <sal_at_email.arc.nasa.gov>
Date: Wed, 15 Sep 2004 12:54:26 -0400 (EDT)

Ah, yes. The correct solution is always to work with both code bases (C
and Perl) to get an efficient cross-platform solution. As JAPH, however, I
tend to fix things in Perl because it means I don't have to risk breaking
other people's code. Nonetheless, Mikhael is right. If someone's going to
do this, and they have the support of the rest of the community, it should
be in the C code base.

That said, I would vote to see the export of all of the flags, or we might
regret our choices later.

Another possibility is to have Fvwm do a dump of flag names and bit
offsets to all modules on startup. This would allow us to use all 384 bits
with a small amount of startup overhead, and would even ensure that
modules work if they are running on different platforms from fvwm (a
situation that I don't personally foresee, but I haven't been thinking
about these things long).

-- Sal
smile.



On Wed, 15 Sep 2004, Mikhael Goikhman wrote:

o On 14 Sep 2004 20:22:39 -0400, Salvatore Domenick Desiano wrote:
o >
o > On 14 Sep 2004, Mark Gray wrote:
o >
o > o I am writing a fvwm perl module and anticipate wanting to parse the
o > o window_flags data upon receiving each M_ADD_WINDOW event. Looking
o > o through the FVWM perl modules I did not see any function for doing
o > o this, and before going to the trouble to translate the bit-fields in
o > o fvwm.h to perl I thought I would ask if it has already been done (and
o > o I just didn't look hard enough:-) This will be my first FVWM perl
o > o module so I apologize if this is a FAQ.
o >
o > Unfortunately, the flag locations differs from platform to platform and
o > from compiler to compiler. If you (or anyone) wanted to write a robust
o > version, it would have to do a compile of a C program during the build of
o > fvwm, and produce some perl code from the result.
o >
o > I've done it for individual flags, but my process is entirely manual
o > because I'm only using two or three flags.
o
o The proper solution is to serialize the flags without dumping C
o structures. Here is a discussion:
o http://www.hpc.uh.edu/fvwm/archive/0407/msg00186.html
o
o It is not very hard to implement what is suggested in the link without
o removing the current complier dependent flags. The hard part is to decide
o on the 50 most useful flags to be packed in two integers; I don't think
o we need to pass more flags, no modules use them. But I currently don't
o have a time to implement this in fvwm. Unfortunately.
o
o If someone implements this, I will try to find the time to support these
o packed flags in perl stuff, including FvwmDebug and WindowList tracker.
o
o Regards,
o Mikhael.
o --
o Visit the official FVWM web page at <URL: http://www.fvwm.org/>.
o To unsubscribe from the list, send "unsubscribe fvwm" in the body of a
o message to majordomo_at_fvwm.org.
o To report problems, send mail to fvwm-owner_at_fvwm.org.
o
o
o

--------------
  Salvatore Domenick Desiano
    Research Scientist
      NASA Ames Research Center (QSS Group, Inc.)


--
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 majordomo_at_fvwm.org.
To report problems, send mail to fvwm-owner_at_fvwm.org.
Received on Wed Sep 15 2004 - 11:54:54 BST

This archive was generated by hypermail 2.3.0 : Mon Aug 29 2016 - 19:37:57 BST