The FileSelector Object: 3.5 File Selector Instance Data: Matching a File's Geode Attributes

Up: GEOS SDK TechDocs | Up | Prev: 3.4 Matching a File's Creator App | Next: 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

. Note that none of these flags is set by default. (Geode attributes are described in detail in the Applications and Geodes chapter.)

GA_PROCESS
This flag indicates the geode is a process (has an initial thread).
GA_LIBRARY
This flag indicates the geode is a library (exports routines).
GA_DRIVER
This flag indicates the geode is a driver (has a Driver Table).
GA_KEEP_FILE_OPEN
This flag indicates the .geo file must stay open (e.g. is a resource that is designated as discardable).
GA_SYSTEM
This flag indicates the geode is a GEOS system geode.
GA_MULTI_LAUNCHABLE
This flag indicates the geode may be loaded more than once.
GA_APPLICATION
This flag indicates the geode is a user-launchable application.
GA_DRIVER_INITIALIZED
Set on the fly by GEOS if the geode's driver aspect has been initialized (should not be matched).
GA_LIBRARY_INITIALIZED
Set on the fly by GEOS if the geode's library aspect has been initialized (should not be matched).
GA_GEODE_INITIALIZED
Set on the fly by GEOS if the geode's process aspect has been initialized (should not be matched).
GA_USES_COPROC
This flag indicates that the geode uses a coprocessor if one is available.
GA_REQUIRES_COPROC
This flag indicates the geode requires a coprocessor or coprocessor emulator.
GA_HAS_GENERAL_CONSUMER_MODE
This flag indicates the geode can be run in GCM mode.
GA_ENTRY_POINTS_IN_C
This flag indicates that the geode has library/driver entry points in C.

MSG_GEN_FILE_SELECTOR_SET_GEODE_ATTRS

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
A 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

MSG_GEN_FILE_SELECTOR_GET_GEODE_ATTRS

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

GET_MATCH_ATTRS

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 ).

GET_MISMATCH_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 ).


Up: GEOS SDK TechDocs | Up | Prev: 3.4 Matching a File's Creator App | Next: 3.6 Masking File Names