How does libXt do resource type comparison?

Lucas de Sena lucas at seninha.org
Fri May 27 12:46:50 UTC 2022


Hi,

I'm using libXt to write some widgets, and I'm using Xt's resource
management system to convert string X resources to XftFont objects,
by setting converters and destructor functions with the
XtSetTypeConverter(3) routine.

It seems that Xt can cache converted objects so it does not have to do
the same conversion again and again.

However, I'm not sure how the resource management system knows whether
two conversions from the same from_type to the same to_type have the
same value in order to cache the results.

For example, I have set a converter from String to XftFont for me to
draw text using Xft.  How can Xt tells whether a second conversion from
the same String to XftFont as a previous conversion has to be cached?
Can I set a comparison function?


More information about the xorg mailing list