Merged changes from branch build_system_redesign at revision 14573.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14574 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Ingo Weinhold
2005-10-29 16:27:43 +00:00
parent 5412b02d50
commit 338b8dc301
1836 changed files with 114718 additions and 14057 deletions
@@ -0,0 +1,261 @@
/*
Copyright 1999-2001, Be Incorporated. All Rights Reserved.
This file may be used under the terms of the Be Sample Code License.
*/
#ifndef _FSPROTO_H
#define _FSPROTO_H
#include <sys/dirent.h>
#include <sys/types.h>
#include <sys/param.h>
#include <sys/stat.h>
#include <unistd.h>
#include <iovec.h>
#include <OS.h>
#include <fs_attr.h>
#include <fs_info.h>
#include <BeBuild.h>
#include <Drivers.h>
typedef dev_t nspace_id;
typedef ino_t vnode_id;
/*
* PUBLIC PART OF THE FILE SYSTEM PROTOCOL
*/
#define WSTAT_MODE 0x0001
#define WSTAT_UID 0x0002
#define WSTAT_GID 0x0004
#define WSTAT_SIZE 0x0008
#define WSTAT_ATIME 0x0010
#define WSTAT_MTIME 0x0020
#define WSTAT_CRTIME 0x0040
#define WFSSTAT_NAME 0x0001
#define B_ENTRY_CREATED 1
#define B_ENTRY_REMOVED 2
#define B_ENTRY_MOVED 3
#define B_STAT_CHANGED 4
#define B_ATTR_CHANGED 5
#define B_DEVICE_MOUNTED 6
#define B_DEVICE_UNMOUNTED 7
#define B_STOP_WATCHING 0x0000
#define B_WATCH_NAME 0x0001
#define B_WATCH_STAT 0x0002
#define B_WATCH_ATTR 0x0004
#define B_WATCH_DIRECTORY 0x0008
#define SELECT_READ 1
#define SELECT_WRITE 2
#define SELECT_EXCEPTION 3
#define B_CUR_FS_API_VERSION 2
#define IOCTL_FILE_UNCACHED_IO 10000
#define IOCTL_CREATE_TIME 10002
#define IOCTL_MODIFIED_TIME 10003
struct attr_info;
struct index_info;
typedef int op_read_vnode(void *ns, vnode_id vnid, char r, void **node);
typedef int op_write_vnode(void *ns, void *node, char r);
typedef int op_remove_vnode(void *ns, void *node, char r);
typedef int op_secure_vnode(void *ns, void *node);
typedef int op_wake_vnode(void *ns, void *node);
typedef int op_suspend_vnode(void *ns, void *node);
typedef int op_walk(void *ns, void *base, const char *file, char **newpath,
vnode_id *vnid);
typedef int op_access(void *ns, void *node, int mode);
typedef int op_create(void *ns, void *dir, const char *name,
int omode, int perms, vnode_id *vnid, void **cookie);
typedef int op_mkdir(void *ns, void *dir, const char *name, int perms);
typedef int op_symlink(void *ns, void *dir, const char *name,
const char *path);
typedef int op_link(void *ns, void *dir, const char *name, void *node);
typedef int op_rename(void *ns, void *olddir, const char *oldname,
void *newdir, const char *newname);
typedef int op_unlink(void *ns, void *dir, const char *name);
typedef int op_rmdir(void *ns, void *dir, const char *name);
typedef int op_readlink(void *ns, void *node, char *buf, size_t *bufsize);
typedef int op_opendir(void *ns, void *node, void **cookie);
typedef int op_closedir(void *ns, void *node, void *cookie);
typedef int op_rewinddir(void *ns, void *node, void *cookie);
typedef int op_readdir(void *ns, void *node, void *cookie, long *num,
struct dirent *buf, size_t bufsize);
typedef int op_open(void *ns, void *node, int omode, void **cookie);
typedef int op_close(void *ns, void *node, void *cookie);
typedef int op_free_cookie(void *ns, void *node, void *cookie);
typedef int op_read(void *ns, void *node, void *cookie, off_t pos, void *buf,
size_t *len);
typedef int op_write(void *ns, void *node, void *cookie, off_t pos,
const void *buf, size_t *len);
typedef int op_readv(void *ns, void *node, void *cookie, off_t pos, const iovec *vec,
size_t count, size_t *len);
typedef int op_writev(void *ns, void *node, void *cookie, off_t pos, const iovec *vec,
size_t count, size_t *len);
typedef int op_ioctl(void *ns, void *node, void *cookie, int cmd, void *buf,
size_t len);
typedef int op_setflags(void *ns, void *node, void *cookie, int flags);
typedef int op_rstat(void *ns, void *node, struct stat *);
typedef int op_wstat(void *ns, void *node, struct stat *, long mask);
typedef int op_fsync(void *ns, void *node);
typedef int op_select(void *ns, void *node, void *cookie, uint8 event,
uint32 ref, selectsync *sync);
typedef int op_deselect(void *ns, void *node, void *cookie, uint8 event,
selectsync *sync);
typedef int op_initialize(const char *devname, void *parms, size_t len);
typedef int op_mount(nspace_id nsid, const char *devname, ulong flags,
void *parms, size_t len, void **data, vnode_id *vnid);
typedef int op_unmount(void *ns);
typedef int op_sync(void *ns);
typedef int op_rfsstat(void *ns, struct fs_info *);
typedef int op_wfsstat(void *ns, struct fs_info *, long mask);
typedef int op_open_attrdir(void *ns, void *node, void **cookie);
typedef int op_close_attrdir(void *ns, void *node, void *cookie);
typedef int op_rewind_attrdir(void *ns, void *node, void *cookie);
typedef int op_read_attrdir(void *ns, void *node, void *cookie, long *num,
struct dirent *buf, size_t bufsize);
typedef int op_remove_attr(void *ns, void *node, const char *name);
typedef int op_rename_attr(void *ns, void *node, const char *oldname,
const char *newname);
typedef int op_stat_attr(void *ns, void *node, const char *name,
struct attr_info *buf);
typedef int op_write_attr(void *ns, void *node, const char *name, int type,
const void *buf, size_t *len, off_t pos);
typedef int op_read_attr(void *ns, void *node, const char *name, int type,
void *buf, size_t *len, off_t pos);
typedef int op_open_indexdir(void *ns, void **cookie);
typedef int op_close_indexdir(void *ns, void *cookie);
typedef int op_rewind_indexdir(void *ns, void *cookie);
typedef int op_read_indexdir(void *ns, void *cookie, long *num,
struct dirent *buf, size_t bufsize);
typedef int op_create_index(void *ns, const char *name, int type, int flags);
typedef int op_remove_index(void *ns, const char *name);
typedef int op_rename_index(void *ns, const char *oldname,
const char *newname);
typedef int op_stat_index(void *ns, const char *name, struct index_info *buf);
typedef int op_open_query(void *ns, const char *query, ulong flags,
port_id port, long token, void **cookie);
typedef int op_close_query(void *ns, void *cookie);
typedef int op_read_query(void *ns, void *cookie, long *num,
struct dirent *buf, size_t bufsize);
typedef struct vnode_ops {
op_read_vnode (*read_vnode);
op_write_vnode (*write_vnode);
op_remove_vnode (*remove_vnode);
op_secure_vnode (*secure_vnode);
op_walk (*walk);
op_access (*access);
op_create (*create);
op_mkdir (*mkdir);
op_symlink (*symlink);
op_link (*link);
op_rename (*rename);
op_unlink (*unlink);
op_rmdir (*rmdir);
op_readlink (*readlink);
op_opendir (*opendir);
op_closedir (*closedir);
op_free_cookie (*free_dircookie);
op_rewinddir (*rewinddir);
op_readdir (*readdir);
op_open (*open);
op_close (*close);
op_free_cookie (*free_cookie);
op_read (*read);
op_write (*write);
op_readv (*readv);
op_writev (*writev);
op_ioctl (*ioctl);
op_setflags (*setflags);
op_rstat (*rstat);
op_wstat (*wstat);
op_fsync (*fsync);
op_initialize (*initialize);
op_mount (*mount);
op_unmount (*unmount);
op_sync (*sync);
op_rfsstat (*rfsstat);
op_wfsstat (*wfsstat);
op_select (*select);
op_deselect (*deselect);
op_open_indexdir (*open_indexdir);
op_close_indexdir (*close_indexdir);
op_free_cookie (*free_indexdircookie);
op_rewind_indexdir (*rewind_indexdir);
op_read_indexdir (*read_indexdir);
op_create_index (*create_index);
op_remove_index (*remove_index);
op_rename_index (*rename_index);
op_stat_index (*stat_index);
op_open_attrdir (*open_attrdir);
op_close_attrdir (*close_attrdir);
op_free_cookie (*free_attrdircookie);
op_rewind_attrdir (*rewind_attrdir);
op_read_attrdir (*read_attrdir);
op_write_attr (*write_attr);
op_read_attr (*read_attr);
op_remove_attr (*remove_attr);
op_rename_attr (*rename_attr);
op_stat_attr (*stat_attr);
op_open_query (*open_query);
op_close_query (*close_query);
op_free_cookie (*free_querycookie);
op_read_query (*read_query);
// for Dano compatibility only
op_wake_vnode (*wake_vnode);
op_suspend_vnode (*suspend_vnode);
} vnode_ops;
#ifdef __cplusplus
extern "C" {
#endif
extern _IMPEXP_KERNEL int new_path(const char *path, char **copy);
extern _IMPEXP_KERNEL void free_path(char *p);
extern _IMPEXP_KERNEL int notify_listener(int op, nspace_id nsid,
vnode_id vnida, vnode_id vnidb,
vnode_id vnidc, const char *name);
extern _IMPEXP_KERNEL int send_notification(port_id port, long token,
ulong what, long op, nspace_id nsida,
nspace_id nsidb, vnode_id vnida,
vnode_id vnidb, vnode_id vnidc,
const char *name);
extern _IMPEXP_KERNEL int get_vnode(nspace_id nsid, vnode_id vnid, void **data);
extern _IMPEXP_KERNEL int put_vnode(nspace_id nsid, vnode_id vnid);
extern _IMPEXP_KERNEL int new_vnode(nspace_id nsid, vnode_id vnid, void *data);
extern _IMPEXP_KERNEL int remove_vnode(nspace_id nsid, vnode_id vnid);
extern _IMPEXP_KERNEL int unremove_vnode(nspace_id nsid, vnode_id vnid);
extern _IMPEXP_KERNEL int is_vnode_removed(nspace_id nsid, vnode_id vnid);
#ifdef __cplusplus
}
#endif
extern _EXPORT vnode_ops fs_entry;
extern _EXPORT int32 api_version;
#endif
@@ -0,0 +1,249 @@
#if !defined(_ACCELERANT_H_)
#define _ACCELERANT_H_
#include <BeBuild.h>
#include <SupportDefs.h>
#include <GraphicsDefs.h>
#include <OS.h>
#if defined(__cplusplus)
extern "C" {
#endif
#define B_ACCELERANT_ENTRY_POINT "get_accelerant_hook"
#define B_ACCELERANT_VERSION 1
typedef void * (*GetAccelerantHook)(uint32, void *);
_EXPORT void * get_accelerant_hook(uint32 feature, void *data);
enum {
/* initialization */
B_INIT_ACCELERANT = 0, /* required */
B_ACCELERANT_CLONE_INFO_SIZE, /* required */
B_GET_ACCELERANT_CLONE_INFO, /* required */
B_CLONE_ACCELERANT, /* required */
B_UNINIT_ACCELERANT, /* required */
B_GET_ACCELERANT_DEVICE_INFO, /* required */
B_ACCELERANT_RETRACE_SEMAPHORE, /* optional */
/* mode configuration */
B_ACCELERANT_MODE_COUNT = 0x100, /* required */
B_GET_MODE_LIST, /* required */
B_PROPOSE_DISPLAY_MODE, /* optional */
B_SET_DISPLAY_MODE, /* required */
B_GET_DISPLAY_MODE, /* required */
B_GET_FRAME_BUFFER_CONFIG, /* required */
B_GET_PIXEL_CLOCK_LIMITS, /* required */
B_GET_TIMING_CONSTRAINTS, /* optional */
B_MOVE_DISPLAY, /* optional */
B_SET_INDEXED_COLORS, /* required if driver supports 8bit indexed modes */
B_DPMS_CAPABILITIES, /* required if driver supports DPMS */
B_DPMS_MODE, /* required if driver supports DPMS */
B_SET_DPMS_MODE, /* required if driver supports DPMS */
/* cursor managment */
B_MOVE_CURSOR = 0x200, /* optional */
B_SET_CURSOR_SHAPE, /* optional */
B_SHOW_CURSOR, /* optional */
/* synchronization */
B_ACCELERANT_ENGINE_COUNT = 0x300, /* required */
B_ACQUIRE_ENGINE, /* required */
B_RELEASE_ENGINE, /* required */
B_WAIT_ENGINE_IDLE, /* required */
B_GET_SYNC_TOKEN, /* required */
B_SYNC_TO_TOKEN, /* required */
/* 2D acceleration */
B_SCREEN_TO_SCREEN_BLIT = 0x400, /* optional */
B_FILL_RECTANGLE, /* optional */
B_INVERT_RECTANGLE, /* optional */
B_FILL_SPAN, /* optional */
B_SCREEN_TO_SCREEN_TRANSPARENT_BLIT, /* optional */
B_SCREEN_TO_SCREEN_SCALED_FILTERED_BLIT, /* optional. NOTE: source and dest may NOT overlap */
/* 3D acceleration */
B_ACCELERANT_PRIVATE_START = (int)0x80000000
};
typedef struct {
uint32 version; /* structure version number */
char name[32]; /* a name the user will recognize the device by */
char chipset[32]; /* the chipset used by the device */
char serial_no[32]; /* serial number for the device */
uint32 memory; /* amount of memory on the device, in bytes */
uint32 dac_speed; /* nominal DAC speed, in MHz */
} accelerant_device_info;
typedef struct {
uint32 pixel_clock; /* kHz */
uint16 h_display; /* in pixels (not character clocks) */
uint16 h_sync_start;
uint16 h_sync_end;
uint16 h_total;
uint16 v_display; /* in lines */
uint16 v_sync_start;
uint16 v_sync_end;
uint16 v_total;
uint32 flags; /* sync polarity, etc. */
} display_timing;
typedef struct {
display_timing timing; /* CTRC info */
uint32 space; /* pixel configuration */
uint16 virtual_width; /* in pixels */
uint16 virtual_height; /* in lines */
uint16 h_display_start; /* first displayed pixel in line */
uint16 v_display_start; /* first displayed line */
uint32 flags; /* mode flags */
} display_mode;
typedef struct {
void *frame_buffer; /* pointer to first byte of frame buffer in virtual memory */
void *frame_buffer_dma; /* pointer to first byte of frame buffer in physical memory for DMA */
uint32 bytes_per_row; /* number of bytes in one virtual_width line */
/* not neccesarily the same as virtual_width * byte_per_pixel */
} frame_buffer_config;
typedef struct {
uint16 h_res; /* minimum effective change in horizontal pixels, usually 8 */
uint16 h_sync_min; /* min/max horizontal sync pulse width in pixels, a multiple of h_res */
uint16 h_sync_max;
uint16 h_blank_min; /* min/max horizontal blank pulse width in pixels, a multiple of h_res */
uint16 h_blank_max;
uint16 v_res; /* minimum effective change in vertical lines, usually 1 */
uint16 v_sync_min; /* min/max vertical sync pulse width in lines, a multiple of v_res */
uint16 v_sync_max;
uint16 v_blank_min; /* min/max vertical blank pulse width in linex, a multiple of v_res */
uint16 v_blank_max;
} display_timing_constraints;
enum { /* mode flags */
B_SCROLL = 1 << 0,
B_8_BIT_DAC = 1 << 1,
B_HARDWARE_CURSOR = 1 << 2,
B_PARALLEL_ACCESS = 1 << 3,
B_DPMS = 1 << 4,
B_IO_FB_NA = 1 << 5
};
enum { /* power saver flags */
B_DPMS_ON = 1 << 0,
B_DPMS_STAND_BY = 1 << 1,
B_DPMS_SUSPEND = 1 << 2,
B_DPMS_OFF = 1 << 3
};
enum { /* timing flags */
B_BLANK_PEDESTAL = 1 << 27,
B_TIMING_INTERLACED = 1 << 28,
B_POSITIVE_HSYNC = 1 << 29,
B_POSITIVE_VSYNC = 1 << 30,
B_SYNC_ON_GREEN = 1 << 31
};
typedef struct {
uint16 src_left; /* guaranteed constrained to virtual width and height */
uint16 src_top;
uint16 dest_left;
uint16 dest_top;
uint16 width; /* 0 to N, where zero means one pixel, one means two pixels, etc. */
uint16 height; /* 0 to M, where zero means one line, one means two lines, etc. */
} blit_params;
typedef struct {
uint16 src_left; /* guaranteed constrained to virtual width and height */
uint16 src_top;
uint16 src_width; /* 0 to N, where zero means one pixel, one means two pixels, etc. */
uint16 src_height; /* 0 to M, where zero means one line, one means two lines, etc. */
uint16 dest_left;
uint16 dest_top;
uint16 dest_width; /* 0 to N, where zero means one pixel, one means two pixels, etc. */
uint16 dest_height; /* 0 to M, where zero means one line, one means two lines, etc. */
} scaled_blit_params;
typedef struct {
uint16 left; /* guaranteed constrained to virtual width and height */
uint16 top;
uint16 right;
uint16 bottom;
} fill_rect_params;
typedef struct {
uint32 engine_id; /* 0 == no engine, 1,2,3 etc individual engines */
uint32 capability_mask; /* features this engine supports */
void *opaque; /* optional pointer to engine private storage */
} engine_token;
enum { /* engine capabilities */
B_2D_ACCELERATION = 1 << 0,
B_3D_ACCELERATION = 1 << 1
};
typedef struct {
uint64 counter; /* counts issued primatives */
uint32 engine_id; /* what engine the counter is for */
char opaque[12]; /* 12 bytes of private storage */
} sync_token;
/* Masks for color info */
/* B_CMAP8 - 0x000000ff */
/* B_RGB15/16 - 0x0000ffff */
/* B_RGB24 - 0x00ffffff */
/* B_RGB32 - 0xffffffff */
typedef status_t (*init_accelerant)(int fd);
typedef ssize_t (*accelerant_clone_info_size)(void);
typedef void (*get_accelerant_clone_info)(void *data);
typedef status_t (*clone_accelerant)(void *data);
typedef void (*uninit_accelerant)(void);
typedef status_t (*get_accelerant_device_info)(accelerant_device_info *adi);
typedef uint32 (*accelerant_mode_count)(void);
typedef status_t (*get_mode_list)(display_mode *);
typedef status_t (*propose_display_mode)(display_mode *target, display_mode *low, display_mode *high);
typedef status_t (*set_display_mode)(display_mode *mode_to_set);
typedef status_t (*get_display_mode)(display_mode *current_mode);
typedef status_t (*get_frame_buffer_config)(frame_buffer_config *a_frame_buffer);
typedef status_t (*get_pixel_clock_limits)(display_mode *dm, uint32 *low, uint32 *high);
typedef status_t (*move_display_area)(uint16 h_display_start, uint16 v_display_start);
typedef status_t (*get_timing_constraints)(display_timing_constraints *dtc);
typedef void (*set_indexed_colors)(uint count, uint8 first, uint8 *color_data, uint32 flags);
typedef uint32 (*dpms_capabilities)(void);
typedef uint32 (*dpms_mode)(void);
typedef status_t (*set_dpms_mode)(uint32 dpms_flags);
typedef sem_id (*accelerant_retrace_semaphore)(void);
typedef status_t (*set_cursor_shape)(uint16 width, uint16 height, uint16 hot_x, uint16 hot_y, uint8 *andMask, uint8 *xorMask);
typedef void (*move_cursor)(uint16 x, uint16 y);
typedef void (*show_cursor)(bool is_visible);
typedef uint32 (*accelerant_engine_count)(void);
typedef status_t (*acquire_engine)(uint32 capabilities, uint32 max_wait, sync_token *st, engine_token **et);
typedef status_t (*release_engine)(engine_token *et, sync_token *st);
typedef void (*wait_engine_idle)(void);
typedef status_t (*get_sync_token)(engine_token *et, sync_token *st);
typedef status_t (*sync_to_token)(sync_token *st);
typedef void (*screen_to_screen_blit)(engine_token *et, blit_params *list, uint32 count);
typedef void (*fill_rectangle)(engine_token *et, uint32 color, fill_rect_params *list, uint32 count);
typedef void (*invert_rectangle)(engine_token *et, fill_rect_params *list, uint32 count);
typedef void (*screen_to_screen_transparent_blit)(engine_token *et, uint32 transparent_color, blit_params *list, uint32 count);
typedef void (*screen_to_screen_scaled_filtered_blit)(engine_token *et, scaled_blit_params *list, uint32 count);
typedef void (*fill_span)(engine_token *et, uint32 color, uint16 *list, uint32 count);
/*
The uint16 *list points to a list of tripples:
list[N+0] Y co-ordinate of span
list[N+1] Left x co-ordinate of span
list[N+2] Right x co-ordinate of span
where N is in the range 0 to count-1.
*/
#if defined(__cplusplus)
}
#endif
#endif
@@ -0,0 +1,188 @@
/******************************************************************************
/
/ File: GraphicsCard.h
/
/ Description: App Server interface for graphics card add-ons.
/
/ Copyright 1993-98, Be Incorporated
/
*******************************************************************************/
#ifndef _GRAPHICS_CARD_H
#define _GRAPHICS_CARD_H
#include <BeBuild.h>
#include <GraphicsDefs.h>
#include <SupportDefs.h>
/*-------------------------------------------------------------*/
/*----- Command Constants -------------------------------------*/
enum {
B_OPEN_GRAPHICS_CARD,
B_CLOSE_GRAPHICS_CARD,
B_GET_GRAPHICS_CARD_INFO,
B_GET_GRAPHICS_CARD_HOOKS,
B_SET_INDEXED_COLOR,
B_GET_SCREEN_SPACES,
B_CONFIG_GRAPHICS_CARD,
B_GET_REFRESH_RATES,
B_SET_SCREEN_GAMMA,
B_GET_INFO_FOR_CLONE_SIZE,
B_GET_INFO_FOR_CLONE,
B_SET_CLONED_GRAPHICS_CARD,
B_CLOSE_CLONED_GRAPHICS_CARD,
B_PROPOSE_FRAME_BUFFER,
B_SET_FRAME_BUFFER,
B_SET_DISPLAY_AREA,
B_MOVE_DISPLAY_AREA}
;
/*----- Optional ---------------*/
enum {
B_CRT_CONTROL = 0x0001,
B_GAMMA_CONTROL = 0x0002,
B_FRAME_BUFFER_CONTROL = 0x0004,
B_PARALLEL_BUFFER_ACCESS = 0x0008,
B_LAME_ASS_CARD = 0x0010
};
/*-------------------------------------------------------------*/
/*----- Structures --------------------------------------------*/
typedef struct {
int16 version;
int16 id;
void *frame_buffer;
char rgba_order[4];
int16 flags;
int16 bits_per_pixel;
int16 bytes_per_row;
int16 width;
int16 height;
} graphics_card_info;
typedef struct {
int32 index;
rgb_color color;
} indexed_color;
typedef struct {
uint32 space;
float refresh_rate;
uchar h_position;
uchar v_position;
uchar h_size;
uchar v_size;
} graphics_card_config;
typedef struct {
float min;
float max;
float current;
} refresh_rate_info;
typedef struct {
void *screen_base;
void *io_base;
uint32 vendor_id;
uint32 device_id;
uint32 _reserved1_;
uint32 _reserved2_;
} graphics_card_spec;
typedef struct {
int16 x1;
int16 y1;
int16 x2;
int16 y2;
rgb_color color;
} rgb_color_line;
typedef struct {
int16 x1;
int16 y1;
int16 x2;
int16 y2;
uchar color;
} indexed_color_line;
typedef struct {
int16 bits_per_pixel;
int16 bytes_per_row;
int16 width;
int16 height;
int16 display_width;
int16 display_height;
int16 display_x;
int16 display_y;
} frame_buffer_info;
typedef struct {
uchar red[256];
uchar green[256];
uchar blue[256];
} screen_gamma;
/*-------------------------------------------------------------*/
/*----- Hook Function -----------------------------------------*/
typedef void (*graphics_card_hook) ();
#define B_GRAPHICS_HOOK_COUNT 48
#ifdef __cplusplus
extern "C" {
#endif
_EXPORT int32 control_graphics_card(uint32, void*);
#ifdef __cplusplus
}
#endif
/*-------------------------------------------------------------*/
/*----- Debugging Functions ------------------------------------*/
#ifdef __cplusplus
extern "C" {
#endif
void dprintf(const char *format, ...);
bool set_dprintf_enabled(bool); /* returns old enable flag */
#ifdef __cplusplus
}
#endif
/*-------------------------------------------------------------*/
/*----- Obsolete ---------------------------------------------*/
#define B_HOOK_COUNT B_GRAPHICS_HOOK_COUNT
/*-------------------------------------------------------------*/
/*-------------------------------------------------------------*/
#endif /* _GRAPHICS_CARD_H */
@@ -0,0 +1,79 @@
/******************************************************************************
/
/ File: InputServerDevice.h
/
/ Description: Add-on class for input_server devices.
/
/ Copyright 1998, Be Incorporated, All Rights Reserved.
/
******************************************************************************/
#ifndef _INPUTSERVERDEVICE_H
#define _INPUTSERVERDEVICE_H
#include <BeBuild.h>
#include <Input.h>
#include <SupportDefs.h>
struct input_device_ref {
char *name;
input_device_type type;
void *cookie;
};
enum {
// B_KEYBOARD_DEVICE notifications
B_KEY_MAP_CHANGED = 1,
B_KEY_LOCKS_CHANGED,
B_KEY_REPEAT_DELAY_CHANGED,
B_KEY_REPEAT_RATE_CHANGED,
// B_POINTING_DEVICE notifications
B_MOUSE_TYPE_CHANGED,
B_MOUSE_MAP_CHANGED,
B_MOUSE_SPEED_CHANGED,
B_CLICK_SPEED_CHANGED,
B_MOUSE_ACCELERATION_CHANGED
};
class _BDeviceAddOn_;
class BInputServerDevice {
public:
BInputServerDevice();
virtual ~BInputServerDevice();
virtual status_t InitCheck();
virtual status_t SystemShuttingDown();
virtual status_t Start(const char *device, void *cookie);
virtual status_t Stop(const char *device, void *cookie);
virtual status_t Control(const char *device,
void *cookie,
uint32 code,
BMessage *message);
status_t RegisterDevices(input_device_ref **devices);
status_t UnregisterDevices(input_device_ref **devices);
status_t EnqueueMessage(BMessage *message);
status_t StartMonitoringDevice(const char *device);
status_t StopMonitoringDevice(const char *device);
private:
_BDeviceAddOn_* fOwner;
virtual void _ReservedInputServerDevice1();
virtual void _ReservedInputServerDevice2();
virtual void _ReservedInputServerDevice3();
virtual void _ReservedInputServerDevice4();
uint32 _reserved[4];
};
#endif
@@ -0,0 +1,39 @@
/******************************************************************************
/
/ File: InputServerFilter.h
/
/ Description: Add-on class for input_server filters.
/
/ Copyright 1998, Be Incorporated, All Rights Reserved.
/
*******************************************************************************/
#ifndef _INPUTSERVERFILTER_H
#define _INPUTSERVERFILTER_H
#include <BeBuild.h>
#include <MessageFilter.h>
#include <SupportDefs.h>
class BInputServerFilter {
public:
BInputServerFilter();
virtual ~BInputServerFilter();
virtual status_t InitCheck();
virtual filter_result Filter(BMessage *message, BList *outList);
status_t GetScreenRegion(BRegion *region) const;
private:
virtual void _ReservedInputServerFilter1();
virtual void _ReservedInputServerFilter2();
virtual void _ReservedInputServerFilter3();
virtual void _ReservedInputServerFilter4();
uint32 _reserved[4];
};
#endif
@@ -0,0 +1,51 @@
/******************************************************************************
/
/ File: InputServerMethod.h
/
/ Description: Add-on class for input_server methods.
/
/ Copyright 1998, Be Incorporated, All Rights Reserved.
/
******************************************************************************/
#ifndef _INPUTSERVERMETHOD_H
#define _INPUTSERVERMETHOD_H
#include <BeBuild.h>
#include <InputServerFilter.h>
#include <SupportDefs.h>
class _BMethodAddOn_;
class AddOnManager;
class InputServer;
class BInputServerMethod : public BInputServerFilter {
public:
BInputServerMethod(const char *name,
const uchar *icon);
virtual ~BInputServerMethod();
virtual status_t MethodActivated(bool active);
status_t EnqueueMessage(BMessage *message);
status_t SetName(const char *name);
status_t SetIcon(const uchar *icon);
status_t SetMenu(const BMenu *menu, const BMessenger target);
private:
_BMethodAddOn_* fOwner;
friend class AddOnManager;
friend class InputServer;
virtual void _ReservedInputServerMethod1();
virtual void _ReservedInputServerMethod2();
virtual void _ReservedInputServerMethod3();
virtual void _ReservedInputServerMethod4();
uint32 _reserved[4];
};
#endif
@@ -0,0 +1,98 @@
#ifndef ZOIDBERG_MAIL_CHAIN_RUNNER_H
#define ZOIDBERG_MAIL_CHAIN_RUNNER_H
/* ChainRunner - runs the mail inbound and outbound chains
**
** Copyright 2001 Dr. Zoidberg Enterprises. All rights reserved.
*/
#include <MailAddon.h>
#include <MailSettings.h>
#include <Looper.h>
class BStringList;
class BMailStatusWindow;
class BMailStatusView;
class BMailChain;
class BMailChainCallback {
public:
virtual void Callback(status_t result) = 0;
// Called by the callback routines in ChainRunner
// result is the message that ended the chain
// (MD_HANDLED, MD_DISCARD, MD_NO_MORE_MESSAGES)
// Obviously, for process callbacks, result is
// gauranteed to be MD_NO_MORE_MESSAGES.
};
class BMailChainRunner : public BLooper {
public:
BMailChainRunner(BMailChain *chain, BMailStatusWindow *status,
bool self_destruct_when_done = true, bool save_chain_when_done = false,
bool destruct_chain_when_done = false);
~BMailChainRunner();
//----Callback functions. Callback objects will be deleted for you.
void RegisterMessageCallback(BMailChainCallback *callback);
// Your callback->Callback() function will be called when
// the current message is done being processed.
void RegisterProcessCallback(BMailChainCallback *callback);
// Your callback->Callback() function will be called when
// a filter returns MD_PASS_COMPLETE and before we go back
// to waiting for new messages, or when the fetch list
// runs out.
void RegisterChainCallback(BMailChainCallback *callback);
// Your callback->Callback() function will be called when
// a filter returns MD_ALL_PASSES_DONE and before everything
// is unloaded and sent home.
void Stop(bool immediately = false);
void ReportProgress(int bytes, int messages, const char *message = NULL);
void ResetProgress(const char *message = NULL);
void GetMessages(BStringList *list, int32 bytes);
void GetSingleMessage(const char *uid, int32 length, BPath *into);
// The bytes or length field is the total size, used for updating the
// progress bar. Use -1 for unknown maximum size.
bool QuitRequested();
void ShowError(const char *error);
void ShowMessage(const char *message);
BMailChain *Chain();
//----The big, bad asynchronous RunChain() function. Pretty harmless looking, huh?
status_t RunChain(bool asynchronous = true);
void MessageReceived (BMessage *msg);
private:
void CallCallbacksFor(BList &list, status_t code);
void get_messages(BStringList *list);
status_t Init();
#if USE_NASTY_SYNC_THREAD_HACK
static int32 thread_sync_func(void *arg);
status_t init_addons();
#endif
BMailChain *_chain;
BList message_cb, process_cb, chain_cb;
bool destroy_self, destroy_chain, save_chain;
BMailStatusWindow *_status;
BMailStatusView *_statview;
BList addons;
bool suicide;
uint8 _other_reserved[3];
uint32 _reserved[4];
};
BMailChainRunner *GetMailChainRunner(int32 chain_id, BMailStatusWindow *status, bool selfDestruct = true);
#endif /* ZOIDBERG_MAIL_CHAIN_RUNNER_H */
@@ -0,0 +1,151 @@
#ifndef ZOIDBERG_MAIL_ADDON_H
#define ZOIDBERG_MAIL_ADDON_H
/* Filter - the base class for all mail filters
**
** Copyright 2001 Dr. Zoidberg Enterprises. All rights reserved.
*/
class BMessage;
class BView;
class BPositionIO;
class BEntry;
class BPath;
class BView;
class BString;
class BPositionIO;
class BEntry;
enum {
B_MAIL_DISCARD = B_MAIL_ERROR_BASE + 8,
//--- This terminates the chain and removes the message being processed
// both from disk and from the server.
B_MAIL_END_FETCH,
//--- Terminates the current operation
B_MAIL_END_CHAIN
//--- This is for yikes errors, like an unreachable server.
};
class BMailStatusView;
class BMailChainRunner;
class BMailFilter
{
public:
BMailFilter(BMessage* settings);
// How to support queueing messages until a time of the
// day/week/month/year? The settings will contain a
// persistent ChainID field, the same for all Filters
// on the same "chain".
virtual ~BMailFilter();
// This will be called when the settings for this Filter
// are changed, or there are no new messages to consume
// after settings->FindInt32("timeout") seconds.
virtual status_t InitCheck(BString* out_message = NULL) = 0;
// Returns B_OK if the Filter was constructed success-
// fully. Otherwise it returns an error code. If it is
// passed a valid BString*, it may add an error message
// to the end of that BString iff it returns an error.
// If it returns an error code then the MailFilter will
// probably be deleted and the error shown to the user.
virtual status_t ProcessMailMessage
(
BPositionIO** io_message, BEntry* io_entry,
BMessage* io_headers, BPath* io_folder, const char *io_uid
) = 0;
// Filters a message. On input and output, the arguments
// are expected to be as below; however it is allowed for
// the MailFilter to alter any of these values as nece-
// ssary, so long as the constraints are as described when
// the function returns:
//
// * io_message - a PositionIO that contains the message
// data, pointing to the first byte of the message's
// header. This can be swapped if, eg, the message
// is copied across volume boundries. When the chain
// begins this is a file in /tmp.
// * io_entry - The entry for the PositionIO above.
// * io_headers - a list of attributes that will be added
// to the message file.
// * io_folder - The message's "folder"---may be com-
// pletely unrelated to its on-disk Entry.
// * io_uid - The unique ID provided by the message's
// Protocol
//
// At most one Filter::ProcessMailMessage() for a given
// chain (and thus ChainID) will be called at a time.
private:
virtual void _ReservedFilter1();
virtual void _ReservedFilter2();
virtual void _ReservedFilter3();
virtual void _ReservedFilter4();
};
//
// The addon interface: export instantiate_mailfilter()
// and instantiate_mailconfig() to create a Filter addon
//
extern "C" _EXPORT BView* instantiate_config_panel(BMessage *settings,BMessage *metadata);
// return a view that configures the MailProtocol or MailFilter
// returned by the functions below. BView::Archive(foo,true)
// produces this addon's settings, which are passed to the in-
// stantiate_* functions and stored persistently. This function
// should gracefully handle empty and NULL settings.
// A note on the metadata argument: The metadata pointer is
// guaranteed to remain valid as long as this view exists. As it is
// a pointer to the chain's metadata, your view can save any
// chain-global settings to it in its Archive() function. Note that
// you must cache this pointer yourself! You will never get it again.
// Also note that it is possible for it to be NULL.
extern "C" _EXPORT BMailFilter* instantiate_mailfilter(BMessage *settings,
BMailChainRunner *runner);
// Return a MailProtocol or MailFilter ready to do its thing,
// based on settings produced by archiving your config panel.
// Note that a Mail::Protocol is a Mail::Filter, so use
// instantiate_mailfilter to start things up.
extern "C" _EXPORT status_t descriptive_name(BMessage *msg, char *buffer);
// the config panel will show this name in the chains filter
// list if this function returns B_OK.
// The buffer is as big as B_FILE_NAME_LENGTH.
// standard Filters:
//
// * Parser - does ParseRFC2822(io_message,io_headers)
// * Folder - stores the message in the specified folder,
// optionally under io_folder, returns MD_HANDLED
// * HeaderFilter(regex,Yes_fiters,No_filters) -
// Applies Nes_filters to messages that have a header
// matching regex; applies No_filters otherwise.
// * CompatabilityFilter - Invokes the standard mail_dae-
// mon filter ~/config/settings/add-ons/MailDaemon/Filter
// on the message's Entry.
// * Producer - Reads outbound messages from disk and inserts
// them into the queue.
// * SMTPSender - Sends the message, via the specified
// SMTP server, to the people in header field
// "MAIL:recipients", changes the the Entry's
// "MAIL:flags" field to no longer pending, changes the
// "MAIL:status" header field to "Sent", and adds a header
// field "MAIL:when" with the time it was sent.
// * Dumper - returns MD_DISCARD
//
//
// Standard chain types:
//
// Incoming Mail: Protocol - Parser - Notifier - Folder
// Outgoing Mail: Producer - SMTPSender
//
// "chains" are lists of addons that appear in, or can be
// added to, the "Accounts" list in the config panel, a tree-
// view ordered by the chain type and the chain's AccountName().
// Their config views should be shown, one after the other,
// in the config panel.
#endif /* ZOIDBERG_MAIL_ADDON_H */
@@ -0,0 +1,107 @@
#ifndef ZOIDBERG_MAIL_PROTOCOL_H
#define ZOIDBERG_MAIL_PROTOCOL_H
/* Protocol - the base class for protocol filters
**
** Copyright 2001 Dr. Zoidberg Enterprises. All rights reserved.
*/
#include <OS.h>
#include <MailAddon.h>
class BHandler;
class BStringList;
class BMailChainRunner;
class BMailProtocol : public BMailFilter
{
public:
BMailProtocol(BMessage* settings, BMailChainRunner *runner);
// Open a connection based on 'settings'. 'settings' will
// contain a persistent uint32 ChainID field. At most one
// Protocol per ChainID will exist at a given time.
// The constructor of Mail::Protocol initializes manifest.
// It is your responsibility to fill in unique_ids, *and
// to keep it updated* in the course of whatever nefarious
// things your protocol does.
virtual ~BMailProtocol();
// Close the connection and clean up. This will be cal-
// led after FetchMessage() or FetchNewMessage() returns
// B_TIMED_OUT or B_ERROR, or when the settings for this
// Protocol are changed.
virtual status_t GetMessage(
const char* uid,
BPositionIO** out_file, BMessage* out_headers,
BPath* out_folder_location
)=0;
// Downloads the message with id uid, writing the message's
// RFC2822 contents to *out_file and storing any headers it
// wants to add other than those from the message itself into
// out_headers. It may store a path (if this type of account
// supports folders) in *out_folder_location.
//
// Returns B_OK if the message is now available in out_file,
// B_NAME_NOT_FOUND if there is no message with id 'uid' on
// the server, or another error if the connection failed.
//
// B_OK will cause the message to be stored and processed.
// B_NAME_NOT_FOUND will cause appropriate recovery to be
// taken (if such exists) but not cause the connection to
// be terminated. Any other error will cause anything writen
// to be discarded and and the connection closed.
// OBS:
// The Protocol may replace *out_file with a custom (read-
// only) BPositionIO-derived object that preserves the il-
// lusion that the message is writen to *out_file, but in
// fact only reads from the server and writes to *out_file
// on demand. This BPositionIO must guarantee that any
// data returned by Read() has also been writen to *out_-
// file. It must return a read error if reading from the
// network or writing to *out_file fails.
//
// The mail_daemon will delete *out_file before invoking
// FetchMessage() or FetchNewMessage() again.
virtual status_t DeleteMessage(const char* uid)=0;
// Removes the message from the server. After this, it's
// assumed (but not required) that GetMessage(uid,...)
// et al will fail with B_NAME_NOT_FOUND.
void CheckForDeletedMessages();
// You can call this to trigger a sweep for deleted messages.
// Automatically called at the beginning of the chain.
//------MailFilter calls
virtual status_t ProcessMailMessage
(
BPositionIO** io_message, BEntry* io_entry,
BMessage* io_headers, BPath* io_folder, const char* io_uid
);
protected:
BStringList *manifest, *unique_ids;
BMessage *settings;
BMailChainRunner *runner;
private:
inline void error_alert(const char *process, status_t error);
virtual void _ReservedProtocol1();
virtual void _ReservedProtocol2();
virtual void _ReservedProtocol3();
virtual void _ReservedProtocol4();
virtual void _ReservedProtocol5();
friend class DeletePass;
BHandler *trash_monitor;
BStringList *uids_on_disk;
uint32 _reserved[3];
};
#endif // ZOIDBERG_MAIL_PROTOCOL_H
@@ -0,0 +1,38 @@
#ifndef ZOIDBERG_PROTOCOL_CONFIG_VIEW_H
#define ZOIDBERG_PROTOCOL_CONFIG_VIEW_H
/* ProtocolConfigView - the standard config view for all protocols
**
** Copyright 2001 Dr. Zoidberg Enterprises. All rights reserved.
*/
#include <View.h>
typedef enum {
B_MAIL_PROTOCOL_HAS_AUTH_METHODS = 1,
B_MAIL_PROTOCOL_HAS_FLAVORS = 2,
B_MAIL_PROTOCOL_HAS_USERNAME = 4,
B_MAIL_PROTOCOL_HAS_PASSWORD = 8,
B_MAIL_PROTOCOL_HAS_HOSTNAME = 16,
B_MAIL_PROTOCOL_CAN_LEAVE_MAIL_ON_SERVER = 32
} b_mail_protocol_config_options;
class BMailProtocolConfigView : public BView {
public:
BMailProtocolConfigView(uint32 options_mask = B_MAIL_PROTOCOL_HAS_FLAVORS | B_MAIL_PROTOCOL_HAS_USERNAME | B_MAIL_PROTOCOL_HAS_PASSWORD | B_MAIL_PROTOCOL_HAS_HOSTNAME);
virtual ~BMailProtocolConfigView();
void SetTo(BMessage *archive);
void AddFlavor(const char *label);
void AddAuthMethod(const char *label,bool needUserPassword = true);
virtual status_t Archive(BMessage *into, bool deep = true) const;
virtual void GetPreferredSize(float *width, float *height);
virtual void AttachedToWindow();
virtual void MessageReceived(BMessage *msg);
private:
uint32 _reserved[5];
};
#endif /* ZOIDBERG_PROTOCOL_CONFIG_VIEW_H */
@@ -0,0 +1,41 @@
#ifndef ZOIDBERG_MAIL_REMOTESTORAGEPROTOCOL_H
#define ZOIDBERG_MAIL_REMOTESTORAGEPROTOCOL_H
/* RemoteStorageProtocol - the base class for protocol filters
**
** Copyright 2003 Dr. Zoidberg Enterprises. All rights reserved.
*/
#include <MailProtocol.h>
#include <StringList.h>
class BRemoteMailStorageProtocol : public BMailProtocol {
public:
BRemoteMailStorageProtocol(BMessage *settings, BMailChainRunner *runner);
virtual ~BRemoteMailStorageProtocol();
virtual status_t GetMessage(const char *mailbox, const char *message, BPositionIO **, BMessage *headers) = 0;
virtual status_t AddMessage(const char *mailbox, BPositionIO *data, BString *id) = 0;
virtual status_t DeleteMessage(const char *mailbox, const char *message) = 0;
virtual status_t CopyMessage(const char *mailbox, const char *to_mailbox, BString *message) = 0;
virtual status_t CreateMailbox(const char *mailbox) = 0;
virtual status_t DeleteMailbox(const char *mailbox) = 0;
void SyncMailbox(const char *mailbox);
//----Mail::Protocol stuff
virtual status_t GetMessage(
const char* uid,
BPositionIO** out_file, BMessage* out_headers,
BPath* out_folder_location);
virtual status_t DeleteMessage(const char* uid);
//---Data members
BStringList mailboxes;
private:
BHandler *handler;
};
#endif // ZOIDBERG_MAIL_REMOTESTORAGEPROTOCOL_H
@@ -0,0 +1,73 @@
#ifndef ZOIDBERG_STRING_LIST_H
#define ZOIDBERG_STRING_LIST_H
/* StringList - a string list implementation
**
** Copyright 2001 Dr. Zoidberg Enterprises. All rights reserved.
*/
#include <Flattenable.h>
class BList;
class BStringList : public BFlattenable {
public:
BStringList();
BStringList(const BStringList&);
~BStringList(void);
BStringList &operator=(const BStringList &from);
/* Flattenable stuff */
virtual bool IsFixedSize() const; //--false for obvious reasons
virtual type_code TypeCode() const;
virtual ssize_t FlattenedSize() const;
virtual status_t Flatten(void *buffer, ssize_t size) const;
virtual bool AllowsTypeCode(type_code code) const;
virtual status_t Unflatten(type_code c, const void *buf, ssize_t size);
/* Adding and removing items. */
void AddItem(const char *item);
void AddList(const BStringList *newItems);
bool RemoveItem(const char *item);
void MakeEmpty();
/* Retrieving items. */
const char *ItemAt(int32) const;
int32 IndexOf(const char *) const;
/* Querying the list. */
bool HasItem(const char *item) const;
int32 CountItems() const;
bool IsEmpty() const;
/* Determining differences between lists */
void NotHere(BStringList &other_list, BStringList *results);
void NotThere(BStringList &other_list, BStringList *results);
/* Useful list logic operators */
BStringList &operator += (const char *item);
BStringList &operator += (BStringList &list);
BStringList &operator -= (const char *item);
BStringList &operator -= (BStringList &list);
BStringList operator | (BStringList &list);
BStringList &operator |= (BStringList &list);
BStringList operator ^ (BStringList &list);
BStringList &operator ^= (BStringList &list);
bool operator == (BStringList &list);
const char *operator [] (int32 index);
private:
void *_buckets[256];
int32 _items;
BList *_indexed;
uint32 _reserved[5];
};
#endif /* ZOIDBERG_STRING_LIST_H */
@@ -0,0 +1,82 @@
#if ! defined _SCREENSAVER_H
#define _SCREENSAVER_H
#include <BeBuild.h>
#include <DirectWindow.h> // for direct_buffer_info
#include <image.h>
#include <Message.h>
class BView;
class BScreenSaver
{
public:
BScreenSaver(BMessage *archive, image_id);
virtual ~BScreenSaver();
// Return an error if something goes wrong or if you don't
// like the running environment (lack of 3D acceleration,
// lack of sound, ...).
virtual status_t InitCheck();
// Animation start and stop. The view is not yet visible when
// StartSaver is called.
virtual status_t StartSaver(BView *view, bool preview);
virtual void StopSaver();
// This hook is called periodically, you should
// override it to do the drawing. Notice that you
// should clear the screen when frame == 0 if you
// don't want to paint over the desktop.
virtual void Draw(BView *view, int32 frame);
// These hooks are for direct screen access, the first is
// called every time the settings change, the second is
// the equivalent of Draw to be called to access the screen
// directly. Draw and DirectDraw can be used at the same time.
virtual void DirectConnected(direct_buffer_info *info);
virtual void DirectDraw(int32 frame);
// configuration dialog methods
virtual void StartConfig(BView *configView);
virtual void StopConfig();
// Module should fill this in with metadata
// example: randomizable = true
virtual void SupplyInfo(BMessage *info) const;
// Send all the metadata info to the module
virtual void ModulesChanged(const BMessage *info);
// BArchivable like parameter saver method
virtual status_t SaveState(BMessage *into) const;
// These methods can be used to control drawing frequency.
void SetTickSize(bigtime_t ts);
bigtime_t TickSize() const;
// These methods can be used to control animation loop cycles
void SetLoop(int32 on_count, int32 off_count);
int32 LoopOnCount() const;
int32 LoopOffCount() const;
private:
virtual void _ReservedScreenSaver1();
virtual void _ReservedScreenSaver2();
virtual void _ReservedScreenSaver3();
virtual void _ReservedScreenSaver4();
virtual void _ReservedScreenSaver5();
virtual void _ReservedScreenSaver6();
virtual void _ReservedScreenSaver7();
virtual void _ReservedScreenSaver8();
bigtime_t ticksize;
int32 looponcount;
int32 loopoffcount;
uint32 _reservedScreenSaver[6];
};
extern "C" _EXPORT BScreenSaver *instantiate_screen_saver(BMessage *msg, image_id id);
#endif
@@ -0,0 +1,44 @@
/*******************************************************************************
/
/ File: Background.h
/
/ Description: Defines constants for setting Tracker background images
/
/ Copyright 1998-1999, Be Incorporated, All Rights Reserved
/
*******************************************************************************/
#ifndef _TRACKER_BACKGROUND_H
#define _TRACKER_BACKGROUND_H
/*----------------------------------------------------------------*/
/*----- Tracker background attribute name ----------------------*/
#define B_BACKGROUND_INFO "be:bgndimginfo"
/*----------------------------------------------------------------*/
/*----- Tracker background BMessage entries --------------------*/
#define B_BACKGROUND_IMAGE "be:bgndimginfopath" // string path
#define B_BACKGROUND_MODE "be:bgndimginfomode" // int32, the enum below
#define B_BACKGROUND_ORIGIN "be:bgndimginfooffset" // BPoint
#define B_BACKGROUND_ERASE_TEXT "be:bgndimginfoerasetext" // bool
#define B_BACKGROUND_WORKSPACES "be:bgndimginfoworkspaces" // uint32
/*----------------------------------------------------------------*/
/*----- Background mode values ---------------------------------*/
enum {
B_BACKGROUND_MODE_USE_ORIGIN,
B_BACKGROUND_MODE_CENTERED, // only works on Desktop
B_BACKGROUND_MODE_SCALED, // only works on Desktop
B_BACKGROUND_MODE_TILED
};
/*----------------------------------------------------------------*/
/*----------------------------------------------------------------*/
const int32 B_RESTORE_BACKGROUND_IMAGE = 'Tbgr'; // force a Tracker window to
// use a new background image
#endif /* _TRACKER_BACKGROUND_H */
@@ -0,0 +1,27 @@
/******************************************************************************
/
/ File: TrackerAddOn.h
/
/ Description: Protocol for the process_refs() hook function.
/
/ Copyright 1995-98, Be Incorporated, All Rights Reserved.
/
*******************************************************************************/
#ifndef _TRACKER_ADDON_H
#define _TRACKER_ADDON_H
#include <BeBuild.h>
struct entry_ref;
class BMessage;
/*-------------------------------------------------------------*/
/*------- This is why you're here: ----------------------------*/
extern "C" _EXPORT void process_refs(entry_ref dir_ref, BMessage* msg, void*);
/*-------------------------------------------------------------*/
/*-------------------------------------------------------------*/
#endif /* _TRACKER_ADDON_H */