diff options
author | nyamatongwe <unknown> | 2009-05-06 11:00:26 +0000 |
---|---|---|
committer | nyamatongwe <unknown> | 2009-05-06 11:00:26 +0000 |
commit | 55d4a1dcbbe2f7b5f4651808825f40bd16c78b66 (patch) | |
tree | 2bd35ffd1403abdc76a0575740266be72dd6731d /include/Platform.h | |
parent | d5903ff90d8aad528c5f47f549563f3730d65d0c (diff) | |
download | scintilla-mirror-55d4a1dcbbe2f7b5f4651808825f40bd16c78b66.tar.gz |
First stage of Cocoa platform addition.
Changed identifier id since this is a reserved word in Objective C.
SCI_LEXER and SCI_NAMESPACE turned on automatically for OS X native
compilation.
Diffstat (limited to 'include/Platform.h')
-rw-r--r-- | include/Platform.h | 31 |
1 files changed, 17 insertions, 14 deletions
diff --git a/include/Platform.h b/include/Platform.h index 98fd7e042..c552c170e 100644 --- a/include/Platform.h +++ b/include/Platform.h @@ -38,7 +38,10 @@ #define PLAT_GTK_WIN32 1 #endif -#elif defined(MACOSX) +#elif defined(__APPLE__) +#define SCI_NAMESPACE +#define SCI_LEXER + #undef PLAT_MACOSX #define PLAT_MACOSX 1 @@ -282,13 +285,13 @@ public: */ class Font { protected: - FontID id; + FontID fid; #if PLAT_WX int ascent; #endif // Private so Font objects can not be copied Font(const Font &) {} - Font &operator=(const Font &) { id=0; return *this; } + Font &operator=(const Font &) { fid=0; return *this; } public: Font(); virtual ~Font(); @@ -297,9 +300,9 @@ public: bool bold, bool italic, bool extraFontFlag=false); virtual void Release(); - FontID GetID() { return id; } + FontID GetID() { return fid; } // Alias another font - caller guarantees not to Release - void SetID(FontID id_) { id = id_; } + void SetID(FontID fid_) { fid = fid_; } friend class Surface; friend class SurfaceImpl; }; @@ -370,31 +373,31 @@ typedef void (*CallBackAction)(void*); */ class Window { protected: - WindowID id; + WindowID wid; #if PLAT_MACOSX void *windowRef; void *control; #endif public: - Window() : id(0), cursorLast(cursorInvalid) { + Window() : wid(0), cursorLast(cursorInvalid) { #if PLAT_MACOSX windowRef = 0; control = 0; #endif } - Window(const Window &source) : id(source.id), cursorLast(cursorInvalid) { + Window(const Window &source) : wid(source.wid), cursorLast(cursorInvalid) { #if PLAT_MACOSX windowRef = 0; control = 0; #endif } virtual ~Window(); - Window &operator=(WindowID id_) { - id = id_; + Window &operator=(WindowID wid_) { + wid = wid_; return *this; } - WindowID GetID() const { return id; } - bool Created() const { return id != 0; } + WindowID GetID() const { return wid; } + bool Created() const { return wid != 0; } void Destroy(); bool HasFocus(); PRectangle GetPosition(); @@ -451,10 +454,10 @@ public: * Menu management. */ class Menu { - MenuID id; + MenuID mid; public: Menu(); - MenuID GetID() { return id; } + MenuID GetID() { return mid; } void CreatePopUp(); void Destroy(); void Show(Point pt, Window &w); |