GEOS SDK TechDocs
|
|
3.4 Matching a File's Creator App
|
3.6 Masking File Names
ATTR_GEN_FILE_SELECTOR_GEODE_ATTR, MSG_GEN_FILE_SELECTOR_SET_GEODE_ATTRS, MSG_GEN_FILE_SELECTOR_GET_GEODE_ATTRS
Every geode in GEOS has a structure of type
GeodeAttrs
stored in its file. As a result, you can limit the File Selector's searches to include only a certain set of geodes--those with the attributes set in the File Selector's
ATTR_GEN_FILE_SELECTOR_GEODE_ATTR
vardata instance field.
ATTR_GEN_FILE_SELECTOR_GEODE_ATTR
is a structure of type
GenFileSelectorGeodeAttrs
, which consists of two parts.
GFSGA_match
represents the geode attributes an acceptable file must have on, and
GFSGA_mismatch
represents the geode attributes an acceptable file must have off. The structure's definition is shown below:
typedef struct {
GeodeAttrs GFSGA_match;
GeodeAttrs GFSGA_mismatch;
} GenFileSelectorGeodeAttrs;
To retrieve the current geode match information, send the message
MSG_GEN_FILE_SELECTOR_GET_GEODE_ATTRS
to the File Selector object. To set them, send
MSG_GEN_FILE_SELECTOR_SET_GEODE_ATTRS
. If you do not explicitly set the geode match information, the File Selector will not apply the geode match filter to its directory scans.
The possible geode attributes on which you can match or mismatch are shown below. They are all flags of the
GeodeAttrs
record, a system type that is not specific to
GenFileSelectorClass
void MSG_GEN_FILE_SELECTOR_SET_GEODE_ATTRS(
GeodeAttrs matchGeodeAttrs,
GeodeAttrs mismatchGeodeAttrs);
This message sets the File Selector's vardata instance field
ATTR_GEN_FILE_SELECTOR_GEODE_ATTR
to the two passed values.
If the File Selector is visible when it receives this message, it will automatically rescan the current directory, applying the new geode filter. Otherwise, the new geode match/mismatch records will be stored but no rescan will occur.
Source: Unrestricted.
Destination: Any GenFileSelector object.
Parameters:
matchGeodeAttrs
A
GeodeAttrs
record indicating the flags that every acceptable file must have set. This record will be set into
GFSGA_match
.
mismatchGeodeAttrs
GeodeAttrs
record indicating the flags that every acceptable file must have clear. This record will be set into
GFSGA_mismatch
.Return: Nothing.
Interception: Generally not intercepted.
See Also:
MSG_GEN_FILE_SELECTOR_SET_FILE_CRITERIA
dword MSG_GEN_FILE_SELECTOR_GET_GEODE_ATTRS();
This message returns the File Selector's current geode attribute match information.
Source: Unrestricted.
Destination: Any GenFileSelector object.
Parameters: None.
Return: The returned dword consists of the two
GeodeAttrs
records stored in the File Selector's
ATTR_GEN_FILE_SELECTOR_GEODE_ATTR
vardata field. To extract the match attributes (
GFSGA_match
), use the macro
GET_MATCH_ATTRS
. To extract the mismatch attributes (
GFSGA_mismatch
), use GET_MISMATCH_ATTRS.
Interception: Generally not intercepted.
See Also:
MSG_GEN_FILE_SELECTOR_SET_FILE_CRITERIA
word GET_MATCH_ATTRS(attr);
dword attr;
This macro extracts the
GFSGA_match
record (
GeodeAttrs
) from the given dword (returned by
MSG_GEN_FILE_SELECTOR_GET_GEODE_ATTRS
).
word GET_MISMATCH_ATTRS(attr);
dword attr;
This macro extracts the
GFSGA_match
record (
GeodeAttrs
) from the given dword (returned by
MSG_GEN_FILE_SELECTOR_GET_GEODE_ATTRS
).
GEOS SDK TechDocs
|
|
3.4 Matching a File's Creator App
|
3.6 Masking File Names