diff options
Diffstat (limited to 'samplecode/SampleCode.h')
-rw-r--r-- | samplecode/SampleCode.h | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/samplecode/SampleCode.h b/samplecode/SampleCode.h new file mode 100644 index 0000000..ff660f2 --- /dev/null +++ b/samplecode/SampleCode.h @@ -0,0 +1,38 @@ +#ifndef SampleCode_DEFINED +#define SampleCode_DEFINED + +#include "SkEvent.h" + +class SampleCode { +public: + static bool TitleQ(const SkEvent&); + static void TitleR(SkEvent*, const char title[]); + + static bool PrefSizeQ(const SkEvent&); + static void PrefSizeR(SkEvent*, SkScalar width, SkScalar height); +}; + +////////////////////////////////////////////////////////////////////////////// + +class SkView; + +typedef SkView* (*SkViewFactory)(); + +class SkViewRegister : SkNoncopyable { +public: + SkViewRegister(SkViewFactory); + + static const SkViewRegister* Head() { return gHead; } + + SkViewRegister* next() const { return fChain; } + SkViewFactory factory() const { return fFact; } + +private: + SkViewFactory fFact; + SkViewRegister* fChain; + + static SkViewRegister* gHead; +}; + +#endif + |