Subject: FVWM: M_MINI_ICON packets

From: "Randy J. Ray" <[email-masked]>
Date: Fri, 28 Mar 1997 14:29:01 -0700

Ahhhh... the last packet to be documented and grokked by my interface... :-)

The packet M_MINI_ICON sends six word/integer values to the recepient:

word	meaning

0	X Window ID
1	X Pixmap ID of the picture
2	X Pixmap ID of the mask
3	Width
4	Height
5	Depth

The problems that jump out at me:

* As with the window-shade packets I pointed to earlier this week, the standard
  3 args are missing from the start of this packet.

* I don't think that either of the X Pixmap IDs (not to be confused with XPMs
  themselves, these can identify either a pixmap *or* a bitmap) are at all
  useful to a module. I don't know how easy it is for an application to get a
  pixmap using only this value. Under a widget library like Tk, I don't know if
  it is even possible. Perhaps for the C-based modules, this can be used. I
  would prefer to see a string, though.

I would propose that the packet look more like:

word	meaning

0	X Win ID
1	Frame X Win ID
2	Fvwm ID
3	Width
4	Height
5	Depth
6+	File name

of course, if the Pixmap ID values are of use, they can be added back in
before the file name.

A quick check shows that the only module using M_MINI_ICON currently is the
FvwmIconMan that comes with Fvwm (I assume the more current version of
FvwmIconMan also uses it).

Randy
--
===============================================================================
Randy J. Ray -- U S WEST Technologies IAD/CSS/DPDS         Phone: (303)595-2869
                Denver, CO                                     [email-masked]
"It's not denial. I'm just very selective about the reality I accept." --Calvin
===============================================================================
--
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 [email-masked].
To report problems, send mail to [email-masked].

---

From: Brady Montz <[email-masked]>
Date: 28 Mar 1997 21:29:15 -0700

"Randy J. Ray" <[email-masked]> writes:

> * I don't think that either of the X Pixmap IDs (not to be confused with
>   XPMs themselves, these can identify either a pixmap *or* a bitmap) are at
>   all useful to a module. I don't know how easy it is for an application to
>   get a pixmap using only this value. Under a widget library like Tk, I
>   don't know if it is even possible. Perhaps for the C-based modules, this
>   can be used. I would prefer to see a string, though.

The X Pixmap ID's are awesome. This way the server only needs to allocate each
pixmap once, and the modules don't need to go searching for the damn
file. Also this is how fvwm95 does it and they did it first so we might as
stay compatible with it.

> FvwmIconMan also uses it).

FvwmPager has been modified to use it as well. And I believe the FvwmTaskbar
module thingy uses them too.

-- 
 Brady Montz
 [email-masked]

---

From: "Randy J. Ray" <[email-masked]>
Date: Sat, 29 Mar 1997 16:55:40 -0700

> ...

I'm more interested in keeping up with FvwmPager than with Fvwm '95. :-)

I was afraid that this was the case. I can see the need for the Pixmap IDs to
stay in the packet, but I believe we still need the first three arguments to
match the standard, and putting the name at the very end really wouldn't hurt.
There may be other applications besides perl/Tk that can't directly use the
Pixmap ID.

Randy

---

From: [email-masked]
Date: Sat, 29 Mar 1997 20:43:47 -0500

I use tcl/tk for a fvwm2 module (tkgoodstuff), and I too would like to
access mini-icons.  Including the filename in the MINI_ICON packet
would be marvelous.  I've looked into the idea of writing C code to
create a tk image from an X pixmap id, but I don't have the time or
expertise.  Would it be so hard to include the filename?

Mark

---

From: "Randy J. Ray" <[email-masked]>
Date: Mon, 31 Mar 1997 11:45:47 -0700

> module thingy uses them too.

So there is a need for the IDs to stay in. I am currently discussing on the
Perl/Tk mailing list the work that would be needed for having the Photo class
(the class from which images are allocated and created) support a new format
that is just creating a bitmap/pixmap from an ID.

The proposed packet should then be:

word	meaning

0	X Win ID
1	Frame X Win ID
2	Fvwm ID
3	Pixmap ID
4	Mask ID
5	Width
6	Height
7	Depth
8+	File name

This would still require that C modules using the M_MINI_ICON packet be
updated, but I think that it is important to have the first three arguments be
consistent with the other packets. Particularly since the Fvwm ID is touted in
several places as a possible database or hash index, due to the guaranteed
uniqueness.

Randy