2 * ROX-Filer, filer for the ROX desktop project
3 * Thomas Leonard, <tal197@users.sourceforge.net>
11 #include <sys/types.h>
13 #define USEFUL_GIO_ATTRS "standard::*,unix::*,time::*,thumbnail::path"
15 extern time_t diritem_recent_time
;
19 ITEM_FLAG_SYMLINK
= 0x01, /* Is a symlink */
20 ITEM_FLAG_APPDIR
= 0x02, /* Contains an AppRun */
21 ITEM_FLAG_MOUNT_POINT
= 0x04, /* Is mounted or in fstab */
22 ITEM_FLAG_MOUNTED
= 0x08, /* Is mounted */
23 ITEM_FLAG_EXEC_FILE
= 0x20, /* File, and has an X bit set (or is a .desktop)*/
24 ITEM_FLAG_MAY_DELETE
= 0x40, /* Delete on finishing scan */
25 ITEM_FLAG_RECENT
= 0x80, /* [MC]-time is around now */
27 /* DirItems are created with this flag set. Restatting or queuing an
28 * item in this state clears the flag. This is to prevent an item
29 * being added to the queue more than once at a time.
31 ITEM_FLAG_NEED_RESCAN_QUEUE
= 0x100,
33 ITEM_FLAG_HAS_XATTR
= 0x200, /* Has extended attributes set */
39 CollateKey
*leafname_collate
; /* Preprocessed for sorting */
40 gboolean may_delete
; /* Not yet found, this scan */
45 time_t atime
, ctime
, mtime
;
46 MaskedPixmap
*_image
; /* NULL => leafname only so far */
50 int lstat_errno
; /* 0 if details are valid */
53 void diritem_init(void);
54 DirItem
*diritem_new(const guchar
*leafname
);
55 void diritem_restat(const guchar
*path
, DirItem
*item
, struct stat
*parent
);
56 void diritem_restat_gfile(GFile
*path
, DirItem
*item
);
57 void _diritem_get_image(DirItem
*item
);
58 void diritem_free(DirItem
*item
);
60 static inline MaskedPixmap
*di_image(DirItem
*item
)
62 if (!item
->_image
&& item
->base_type
!= TYPE_UNKNOWN
)
63 _diritem_get_image(item
);
67 #endif /* _DIRITEM_H */