diff options
author | Brian Osman <brianosman@google.com> | 2017-12-01 10:52:28 -0500 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2017-12-01 17:12:49 +0000 |
commit | 8ceee43de49b314fff58852c2d89ed3885ae71ee (patch) | |
tree | c3046b938bd7c026c84f164b785f749472629f80 /include/views/SkEvent.h | |
parent | 3ac99cfaa2d434c71d9c82fc234fadd55fe96394 (diff) |
Remove more views code, just to simplify things
Bug: skia:
Change-Id: Ie31a3c764e4f88f2b08f4198bd253841a2d8c264
Reviewed-on: https://skia-review.googlesource.com/79100
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Diffstat (limited to 'include/views/SkEvent.h')
-rw-r--r-- | include/views/SkEvent.h | 28 |
1 files changed, 4 insertions, 24 deletions
diff --git a/include/views/SkEvent.h b/include/views/SkEvent.h index aad3f58f3a..a2ccb0c748 100644 --- a/include/views/SkEvent.h +++ b/include/views/SkEvent.h @@ -9,7 +9,6 @@ #define SkEvent_DEFINED #include "SkMetaData.h" -#include "SkString.h" /** Unique 32bit id used to identify an instance of SkEventSink. When events are posted, they are posted to a specific sinkID. When it is time to dispatch the @@ -27,35 +26,18 @@ typedef uint32_t SkEventSinkID; */ class SkEvent { public: - /** - * Function pointer that takes an event, returns true if it "handled" it. - */ - typedef bool (*Proc)(const SkEvent& evt); - SkEvent(); - explicit SkEvent(const SkString& type); explicit SkEvent(const char type[]); SkEvent(const SkEvent& src); ~SkEvent(); - /** Copy the event's type into the specified SkString parameter */ - void getType(SkString* str) const; - - /** Returns true if the event's type matches exactly the specified type (case sensitive) */ - bool isType(const SkString& str) const; - /** Returns true if the event's type matches exactly the specified type (case sensitive) */ - bool isType(const char type[], size_t len = 0) const; + bool isType(const char type[]) const; /** * Set the event's type to the specified string. */ - void setType(const SkString&); - - /** - * Set the event's type to the specified string. - */ - void setType(const char type[], size_t len = 0); + void setType(const char type[]); /** * Return the event's unnamed 32bit field. Default value is 0 @@ -123,8 +105,6 @@ public: return fMeta.setScalars(name, count, values); } /** Add/replace the named string field to the event. In XML use the subelement <data name=... string=... */ - void setString(const char name[], const SkString& value) { fMeta.setString(name, value.c_str()); } - /** Add/replace the named string field to the event. In XML use the subelement <data name=... string=... */ void setString(const char name[], const char value[]) { fMeta.setString(name, value); } /** Add/replace the named pointer field to the event. There is no XML equivalent for this call */ void setPtr(const char name[], void* value) { fMeta.setPtr(name, value); } @@ -142,10 +122,10 @@ public: private: SkMetaData fMeta; - mutable char* fType; // may be characters with low bit set to know that it is not a pointer + char* fType; uint32_t f32; - void initialize(const char* type, size_t typeLen); + void initialize(const char* type); }; #endif |