Axel Dörfler 06ba3f0acb * Added two new ways to retrieve an icon from a device:
- B_GET_ICON_NAME: returns the name of an icon. This will then be read from
    a predefined location on disk (not yet implemented). This would also allow
    to add specifiers like "-boot", or "-fat|bfs|ntfs|...", and have special
    icons for those.
  - B_GET_VECTOR_ICON: retrieves the vector icon of a device, if any.
* get_device_icon(BBitmap*, ...) now supports other color spaces than B_CMAP8.
* Added get_device_icon(), BPartition::GetIcon(), and BVolume::GetIcon()
  variants that can also retrieve the icon data directly (like
  BNodeInfo::GetIcon()).
* Reenabled the previous BPartition::GetIcon(), based on a patch by
  Justin O'Dell - this fixes #1391.
* Tracker's MountMenu class now uses B_RGBA32 icons, instead of B_CMAP8.
* Added vector icon to scsi_disk, and scsi_cd. The former doesn't have any
  special removable icon, though.
* Header cleanup, added/updated license, whitespace cleanup.
* Marked deprecated/obsolete driver ioctls in Drivers.h.
* Removed OpenBeOS namespace in the headers I touched that still had them.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27001 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-17 11:27:07 +00:00

58 lines
1.2 KiB
C++

/*
* Copyright 2004-2008, Haiku Inc. All Rights Reserved.
* Distributed under the terms of the MIT License.
*/
#ifndef _MIME_H
#define _MIME_H
#include <sys/types.h>
#include <SupportDefs.h>
#include <StorageDefs.h>
static const uint32 B_MIME_STRING_TYPE = 'MIMS';
enum icon_size {
B_LARGE_ICON = 32,
B_MINI_ICON = 16
};
// values for the "force" parameter of update_mime_info() (Haiku only)
enum {
B_UPDATE_MIME_INFO_NO_FORCE = 0,
B_UPDATE_MIME_INFO_FORCE_KEEP_TYPE = 1,
B_UPDATE_MIME_INFO_FORCE_UPDATE_ALL = 2,
};
// C functions
#ifdef __cplusplus
extern "C" {
#endif
int update_mime_info(const char* path, int recursive, int synchronous,
int force);
status_t create_app_meta_mime(const char* path, int recursive, int synchronous,
int force);
status_t get_device_icon(const char* device, void* icon, int32 size);
#ifdef __cplusplus
}
// C++ functions, Haiku only!
class BBitmap;
status_t get_device_icon(const char* device, BBitmap* icon, icon_size which);
status_t get_device_icon(const char* device, uint8** _data, size_t* _size,
type_code* _type);
// include MimeType.h for convenience
# include <MimeType.h>
#endif // __cplusplus
#endif // _MIME_H