Mac OSX Build and Run!

OSX上でのプログラミングの初歩について、情報共有ができればと思います。

スポンサーサイト

上記の広告は1ヶ月以上更新のないブログに表示されています。
新しい記事を書く事で広告が消せます。

ToolBox用構造体(C&FB)SCRAP MANAGER

SCRAP MANAGERで使用される構造体です。CとFutureBasicのヘッダーを対応させています。

//--------------------------------------------------

/*
________________________________________________________________
CARBON SCRAP MANAGER INTERFACES
________________________________________________________________
The following interfaces are available only when compiling for
Carbon.
________________________________________________________________
*/

/*
When promising a scrap flavor, it's OK if you
don't yet know how big the flavor data will be.
In this case, just pass kScrapFlavorSizeUnknown
for the flavor data size.
*/

enum {
kScrapFlavorSizeUnknown = -1
};

/*
kScrapReservedFlavorType is a flavor type which is reserved
for use by Scrap Manager. If you pass it to Scrap Manager,
it will be rejected.
*/

enum {
kScrapReservedFlavorType = 'srft'
};

/*
We've added scrap flavor flags ala Drag Manager.

kScrapFlavorMaskNone means you want none of the flags.

kScrapFlavorSenderOnlyMask means only the process which
put the flavor on the scrap can see it. If some other
process put a flavor with this flag on the scrap,
your process will never see the flavor, so there's
no point in testing for this flag.

kScrapFlavorTranslated means the flavor was translated
from some other flavor in the scrap by Translation Manager.
Most callers should not care about this bit.
*/
enum {
kScrapFlavorMaskNone = 0x00000000,
kScrapFlavorMaskSenderOnly = 0x00000001,
kScrapFlavorMaskTranslated = 0x00000002
};

typedef UInt32 ScrapFlavorFlags;
/*
ScrapFlavorInfo describes a single flavor within
a scrap.
*/
struct ScrapFlavorInfo {
ScrapFlavorType flavorType;
ScrapFlavorFlags flavorFlags;
};
typedef struct ScrapFlavorInfo ScrapFlavorInfo;
typedef struct OpaqueScrapRef* ScrapRef;



_kScrapFlavorSizeUnknown = -1
_kScrapReservedFlavorType = _"srft"
_kScrapFlavorMaskNone = 0
_kScrapFlavorMaskSenderOnly = 1
_kScrapFlavorMaskTranslated = 2
_kScrapRefNone = _nil

#define ScrapFlavorFlags as UInt32
#define ScrapFlavorType as OSType

begin record ScrapFlavorInfo
dim flavorType as ScrapFlavorType
dim flavorFlags as ScrapFlavorFlags
end record

#define ScrapRef as UInt32
#endif

//--------------------------------------------------
スポンサーサイト
上記広告は1ヶ月以上更新のないブログに表示されています。新しい記事を書くことで広告を消せます。