propertyGet

fnbool propertyGet(gdk.window.Window window, gdk.atom.Atom property, gdk.atom.Atom type, gulong offset, gulong length, int pdelete, out gdk.atom.Atom actualPropertyType, out int actualFormat, out ubyte[] data)

Retrieves a portion of the contents of a property. If the property does not exist, then the function returns false, and GDK_NONE will be stored in actual_property_type.

The XGetWindowProperty() function that [gdk.global.propertyGet] uses has a very confusing and complicated set of semantics. Unfortunately, [gdk.global.propertyGet] makes the situation worse instead of better (the semantics should be considered undefined), and also prints warnings to stderr in cases where it should return a useful error to the program. You are advised to use XGetWindowProperty() directly until a replacement function for [gdk.global.propertyGet] is provided.

Parameters

windowa #GdkWindow
propertythe property to retrieve
typethe desired property type, or GDK_NONE, if any type of data is acceptable. If this does not match the actual type, then actual_format and actual_length will be filled in, a warning will be printed to stderr and no data will be returned.
offsetthe offset into the property at which to begin retrieving data, in 4 byte units.
lengththe length of the data to retrieve in bytes. Data is considered to be retrieved in 4 byte chunks, so length will be rounded up to the next highest 4 byte boundary (so be careful not to pass a value that might overflow when rounded up).
pdeleteif true, delete the property after retrieving the data.
actualPropertyTypelocation to store the actual type of the property.
actualFormatlocation to store the actual return format of the data; either 8, 16 or 32 bits.
datalocation to store a pointer to the data. The retrieved data should be freed with [glib.global.gfree] when you are finished using it.

Returns

true if data was successfully received and stored

in data, otherwise false.