diff options
author | rmistry@google.com <rmistry@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2012-08-23 18:09:54 +0000 |
---|---|---|
committer | rmistry@google.com <rmistry@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2012-08-23 18:09:54 +0000 |
commit | fbfcd5602128ec010c82cb733c9cdc0a3254f9f3 (patch) | |
tree | d8b4815d15946c32ee9d254e932411e93be942bb /include/views | |
parent | 2abed834789bb64c7da740df4c47efc142b7311a (diff) |
Result of running tools/sanitize_source_files.py (which was added in https://codereview.appspot.com/6465078/)
This CL is part I of IV (I broke down the 1280 files into 4 CLs).
Review URL: https://codereview.appspot.com/6485054
git-svn-id: http://skia.googlecode.com/svn/trunk@5262 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'include/views')
-rw-r--r-- | include/views/SkEvent.h | 6 | ||||
-rw-r--r-- | include/views/SkKey.h | 6 | ||||
-rw-r--r-- | include/views/SkOSMenu.h | 76 | ||||
-rw-r--r-- | include/views/SkOSWindow_Mac.h | 4 | ||||
-rw-r--r-- | include/views/SkOSWindow_Win.h | 4 | ||||
-rwxr-xr-x | include/views/SkOSWindow_iOS.h | 4 | ||||
-rw-r--r-- | include/views/SkOSWindow_wxwidgets.h | 10 | ||||
-rw-r--r-- | include/views/SkStackViewLayout.h | 2 | ||||
-rw-r--r-- | include/views/SkSystemEventTypes.h | 2 | ||||
-rw-r--r-- | include/views/SkTouchGesture.h | 6 | ||||
-rw-r--r-- | include/views/SkView.h | 24 | ||||
-rw-r--r-- | include/views/SkViewInflate.h | 4 | ||||
-rw-r--r-- | include/views/SkWindow.h | 4 | ||||
-rw-r--r-- | include/views/animated/SkImageView.h | 8 | ||||
-rw-r--r-- | include/views/animated/SkProgressBarView.h | 12 | ||||
-rw-r--r-- | include/views/animated/SkScrollBarView.h | 8 | ||||
-rw-r--r-- | include/views/animated/SkWidgetViews.h | 22 |
17 files changed, 101 insertions, 101 deletions
diff --git a/include/views/SkEvent.h b/include/views/SkEvent.h index b3a07e9551..e11c1573d2 100644 --- a/include/views/SkEvent.h +++ b/include/views/SkEvent.h @@ -105,7 +105,7 @@ public: fTargetProc = proc; return this; } - + /** * Return the event's unnamed 32bit field. Default value is 0 */ @@ -195,7 +195,7 @@ public: void post() { return this->postDelay(0); } - + /** * Post to the event queue using the event's targetID or target-proc and * the specifed millisecond delay. @@ -204,7 +204,7 @@ public: * the event queue. It cannot be allocated on the stack or in a global. */ void postDelay(SkMSec delay); - + /** * Post to the event queue using the event's targetID or target-proc. * The event will be delivered no sooner than the specified millisecond diff --git a/include/views/SkKey.h b/include/views/SkKey.h index 4db3108d4c..a019c28115 100644 --- a/include/views/SkKey.h +++ b/include/views/SkKey.h @@ -13,9 +13,9 @@ #include "SkTypes.h" enum SkKey { - //reordering these to match android.app.KeyEvent + //reordering these to match android.app.KeyEvent kNONE_SkKey, //corresponds to android's UNKNOWN - + kLeftSoftKey_SkKey, kRightSoftKey_SkKey, @@ -23,7 +23,7 @@ enum SkKey { kBack_SkKey, //!< (CLR) kSend_SkKey, //!< the green (talk) key kEnd_SkKey, //!< the red key - + k0_SkKey, k1_SkKey, k2_SkKey, diff --git a/include/views/SkOSMenu.h b/include/views/SkOSMenu.h index 0c4a619efa..3e5ee43920 100644 --- a/include/views/SkOSMenu.h +++ b/include/views/SkOSMenu.h @@ -17,9 +17,9 @@ class SkOSMenu { public: explicit SkOSMenu(const char title[] = ""); ~SkOSMenu(); - + /** - * Each of these (except action) has an associated value, which is stored in + * Each of these (except action) has an associated value, which is stored in * the event payload for the item. * Each type has a specific type for its value... * Action : none @@ -40,23 +40,23 @@ public: kTextField_Type, kCustom_Type }; - + enum TriState { kMixedState = -1, kOffState = 0, kOnState = 1 }; - + class Item { public: /** * Auto increments a global to generate an unique ID for each new item * Note: Thread safe */ - Item(const char label[], SkOSMenu::Type type, const char slotName[], + Item(const char label[], SkOSMenu::Type type, const char slotName[], SkEvent* evt); ~Item() { delete fEvent; } - + SkEvent* getEvent() const { return fEvent; } int getID() const { return fID; } const char* getLabel() const { return fLabel.c_str(); } @@ -64,18 +64,18 @@ public: Type getType() const { return fType; } void setKeyEquivalent(SkUnichar key) { fKey = key; } SkUnichar getKeyEquivalent() const { return fKey; } - + /** * Helper functions for predefined types */ void setBool(bool value) const; //For Switch - void setScalar(SkScalar value) const; //For Slider + void setScalar(SkScalar value) const; //For Slider void setInt(int value) const; //For List void setTriState(TriState value) const; //For Tristate void setString(const char value[]) const; //For TextField - + /** - * Post event associated with the menu item to target, any changes to + * Post event associated with the menu item to target, any changes to * the associated event must be made prior to calling this method */ void postEvent() const { (new SkEvent(*(fEvent)))->post(); } @@ -88,80 +88,80 @@ public: Type fType; SkUnichar fKey; }; - + void reset(); const char* getTitle() const { return fTitle.c_str(); } void setTitle (const char title[]) { fTitle.set(title); } int getCount() const { return fItems.count(); } const Item* getItemByID(int itemID) const; void getItems(const Item* items[]) const; - + /** - * Assign key to the menu item with itemID, will do nothing if there's no + * Assign key to the menu item with itemID, will do nothing if there's no * item with the id given */ void assignKeyEquivalentToItem(int itemID, SkUnichar key); /** - * Call this in a SkView's onHandleChar to trigger any menu items with the - * given key equivalent. If such an item is found, the method will return - * true and its corresponding event will be triggered (default behavior + * Call this in a SkView's onHandleChar to trigger any menu items with the + * given key equivalent. If such an item is found, the method will return + * true and its corresponding event will be triggered (default behavior * defined for switches(toggling), tristates(cycle), and lists(cycle), - * for anything else, the event attached is posted without state changes) + * for anything else, the event attached is posted without state changes) * If no menu item can be matched with the key, false will be returned */ bool handleKeyEquivalent(SkUnichar key); - + /** - * The following functions append new items to the menu and returns their - * associated unique id, which can be used to by the client to refer to + * The following functions append new items to the menu and returns their + * associated unique id, which can be used to by the client to refer to * the menu item created and change its state. slotName specifies the string * identifier of any state/value to be returned in the item's SkEvent object * NOTE: evt must be dynamically allocated */ - int appendItem(const char label[], Type type, const char slotName[], - SkEvent* evt); - + int appendItem(const char label[], Type type, const char slotName[], + SkEvent* evt); + /** - * Create predefined items with the given parameters. To be used with the + * Create predefined items with the given parameters. To be used with the * other helper functions below to retrive/update state information. - * Note: the helper functions below assume that slotName is UNIQUE for all + * Note: the helper functions below assume that slotName is UNIQUE for all * menu items of the same type since it's used to identify the event */ int appendAction(const char label[], SkEventSinkID target); - int appendList(const char label[], const char slotName[], + int appendList(const char label[], const char slotName[], SkEventSinkID target, int defaultIndex, const char[] ...); - int appendSlider(const char label[], const char slotName[], - SkEventSinkID target, SkScalar min, SkScalar max, + int appendSlider(const char label[], const char slotName[], + SkEventSinkID target, SkScalar min, SkScalar max, SkScalar defaultValue); - int appendSwitch(const char label[], const char slotName[], + int appendSwitch(const char label[], const char slotName[], SkEventSinkID target, bool defaultState = false); int appendTriState(const char label[], const char slotName[], SkEventSinkID target, TriState defaultState = kOffState); int appendTextField(const char label[], const char slotName[], SkEventSinkID target, const char placeholder[] = ""); - - + + /** * Helper functions to retrieve information other than the stored value for * some predefined types */ static bool FindListItemCount(const SkEvent& evt, int* count); /** - * Ensure that the items array can store n SkStrings where n is the count + * Ensure that the items array can store n SkStrings where n is the count * extracted using FindListItemCount */ static bool FindListItems(const SkEvent& evt, SkString items[]); static bool FindSliderMin(const SkEvent& evt, SkScalar* min); static bool FindSliderMax(const SkEvent& evt, SkScalar* max); - + /** * Returns true if an action with the given label is found, false otherwise */ static bool FindAction(const SkEvent& evt, const char label[]); /** - * The following helper functions will return true if evt is generated from - * a predefined item type and retrieve the corresponding state information. - * They will return false and leave value unchanged if there's a type + * The following helper functions will return true if evt is generated from + * a predefined item type and retrieve the corresponding state information. + * They will return false and leave value unchanged if there's a type * mismatch or slotName is incorrect */ static bool FindListIndex(const SkEvent& evt, const char slotName[], int* value); @@ -169,11 +169,11 @@ public: static bool FindSwitchState(const SkEvent& evt, const char slotName[], bool* value); static bool FindTriState(const SkEvent& evt, const char slotName[], TriState* value); static bool FindText(const SkEvent& evt, const char slotName[], SkString* value); - + private: SkString fTitle; SkTDArray<Item*> fItems; - + // illegal SkOSMenu(const SkOSMenu&); SkOSMenu& operator=(const SkOSMenu&); diff --git a/include/views/SkOSWindow_Mac.h b/include/views/SkOSWindow_Mac.h index 3391785ef9..d195cf1b65 100644 --- a/include/views/SkOSWindow_Mac.h +++ b/include/views/SkOSWindow_Mac.h @@ -17,7 +17,7 @@ public: ~SkOSWindow(); void* getHWND() const { return fHWND; } - virtual bool onDispatchClick(int x, int y, Click::State state, + virtual bool onDispatchClick(int x, int y, Click::State state, void* owner); enum SkBackEndTypes { kNone_BackEndType, @@ -39,7 +39,7 @@ protected: virtual void onAddMenu(const SkOSMenu*); virtual void onUpdateMenu(const SkOSMenu*); virtual void onSetTitle(const char[]); - + private: void* fHWND; bool fInvalEventIsPending; diff --git a/include/views/SkOSWindow_Win.h b/include/views/SkOSWindow_Win.h index 5add420803..ff289bd6a6 100644 --- a/include/views/SkOSWindow_Win.h +++ b/include/views/SkOSWindow_Win.h @@ -61,7 +61,7 @@ protected: private: void* fHWND; - + void doPaint(void* ctx); #if SK_SUPPORT_GPU @@ -89,7 +89,7 @@ private: #endif // SK_ANGLE #endif // SK_SUPPORT_GPU - typedef SkWindow INHERITED; + typedef SkWindow INHERITED; }; #endif diff --git a/include/views/SkOSWindow_iOS.h b/include/views/SkOSWindow_iOS.h index 33f014cb59..a1c4956be9 100755 --- a/include/views/SkOSWindow_iOS.h +++ b/include/views/SkOSWindow_iOS.h @@ -16,7 +16,7 @@ public: ~SkOSWindow(); void* getHWND() const { return fHWND; } - virtual bool onDispatchClick(int x, int y, Click::State state, + virtual bool onDispatchClick(int x, int y, Click::State state, void* owner); enum SkBackEndTypes { @@ -37,7 +37,7 @@ protected: virtual void onAddMenu(const SkOSMenu*); virtual void onUpdateMenu(const SkOSMenu*); virtual void onSetTitle(const char[]); - + private: void* fHWND; bool fInvalEventIsPending; diff --git a/include/views/SkOSWindow_wxwidgets.h b/include/views/SkOSWindow_wxwidgets.h index a662b4099e..ad939b2865 100644 --- a/include/views/SkOSWindow_wxwidgets.h +++ b/include/views/SkOSWindow_wxwidgets.h @@ -17,19 +17,19 @@ public: SkOSWindow(); SkOSWindow(const wxString& title, int x, int y, int width, int height); ~SkOSWindow(); - + wxFrame* getWXFrame() const { return fFrame; } - + void updateSize(); - + protected: virtual void onHandleInval(const SkIRect&); virtual void onAddMenu(const SkOSMenu*); - + private: wxFrame* fFrame; typedef SkWindow INHERITED; - + }; #endifpedef SkWindow INHERITED; diff --git a/include/views/SkStackViewLayout.h b/include/views/SkStackViewLayout.h index 705ff74bdb..f8d23de783 100644 --- a/include/views/SkStackViewLayout.h +++ b/include/views/SkStackViewLayout.h @@ -37,7 +37,7 @@ public: kStart_Pack, kCenter_Pack, kEnd_Pack, - + kPackCount }; Pack getPack() const { return (Pack)fPack; } diff --git a/include/views/SkSystemEventTypes.h b/include/views/SkSystemEventTypes.h index f0f2952a32..bb2b5d5279 100644 --- a/include/views/SkSystemEventTypes.h +++ b/include/views/SkSystemEventTypes.h @@ -17,7 +17,7 @@ */ #define SK_EventType_Delay "\xd" "lay" #define SK_EventType_Inval "nv" "\xa" "l" -#define SK_EventType_Key "key" "\x1" +#define SK_EventType_Key "key" "\x1" #define SK_EventType_OnEnd "on" "\xe" "n" #define SK_EventType_Unichar "\xc" "har" #define SK_EventType_KeyUp "key" "\xf" diff --git a/include/views/SkTouchGesture.h b/include/views/SkTouchGesture.h index 527065e540..1ba3865aa5 100644 --- a/include/views/SkTouchGesture.h +++ b/include/views/SkTouchGesture.h @@ -13,13 +13,13 @@ struct SkFlingState { SkFlingState() : fActive(false) {} - + bool isActive() const { return fActive; } void stop() { fActive = false; } - + void reset(float sx, float sy); bool evaluateMatrix(SkMatrix* matrix); - + private: SkPoint fDirection; SkScalar fSpeed0; diff --git a/include/views/SkView.h b/include/views/SkView.h index de497dd768..eb0621a18f 100644 --- a/include/views/SkView.h +++ b/include/views/SkView.h @@ -82,9 +82,9 @@ public: void getLocalBounds(SkRect* bounds) const; /** Loc - the view's offset with respect to its parent in its view hiearchy. - NOTE: For more complex transforms, use Local Matrix. The tranformations + NOTE: For more complex transforms, use Local Matrix. The tranformations are applied in the following order: - canvas->translate(fLoc.fX, fLoc.fY); + canvas->translate(fLoc.fX, fLoc.fY); canvas->concat(fMatrix); */ /** Return the view's left edge */ @@ -96,13 +96,13 @@ public: void setLoc(const SkPoint& loc) { this->setLoc(loc.fX, loc.fY); } void setLocX(SkScalar x) { this->setLoc(x, fLoc.fY); } void setLocY(SkScalar y) { this->setLoc(fLoc.fX, y); } - - /** Local Matrix - matrix used to tranform the view with respect to its - parent in its view hiearchy. Use setLocalMatrix to apply matrix + + /** Local Matrix - matrix used to tranform the view with respect to its + parent in its view hiearchy. Use setLocalMatrix to apply matrix transformations to the current view and in turn affect its children. NOTE: For simple offsets, use Loc. The transformations are applied in the following order: - canvas->translate(fLoc.fX, fLoc.fY); + canvas->translate(fLoc.fX, fLoc.fY); canvas->concat(fMatrix); */ const SkMatrix& getLocalMatrix() const { return fMatrix; } @@ -205,7 +205,7 @@ public: /** Convert the specified point from global coordinates into view-local coordinates * Return true on success; false on failure */ - bool globalToLocal(SkPoint* pt) const { + bool globalToLocal(SkPoint* pt) const { if (NULL != pt) { return this->globalToLocal(pt->fX, pt->fY, pt); } @@ -217,7 +217,7 @@ public: bool globalToLocal(SkScalar globalX, SkScalar globalY, SkPoint* local) const; /** \class F2BIter - + Iterator that will return each of this view's children, in front-to-back order (the order used for clicking). The first call to next() returns the front-most child view. When @@ -232,7 +232,7 @@ public: }; /** \class B2FIter - + Iterator that will return each of this view's children, in back-to-front order (the order they are drawn). The first call to next() returns the back-most child view. When @@ -247,7 +247,7 @@ public: }; /** \class Artist - + Install a subclass of this in a view (calling setArtist()), and then the default implementation of that view's onDraw() will invoke this object automatically. @@ -275,7 +275,7 @@ public: Artist* setArtist(Artist* artist); /** \class Layout - + Install a subclass of this in a view (calling setLayout()), and then the default implementation of that view's onLayoutChildren() will invoke this object automatically. @@ -382,7 +382,7 @@ private: friend class B2FIter; friend class F2BIter; - + friend class SkLayerView; bool setFocusView(SkView* fvOrNull); diff --git a/include/views/SkViewInflate.h b/include/views/SkViewInflate.h index 7282091c45..b2cd1e67ce 100644 --- a/include/views/SkViewInflate.h +++ b/include/views/SkViewInflate.h @@ -17,7 +17,7 @@ class SkView; class SkViewInflate { -public: +public: SkViewInflate(); virtual ~SkViewInflate(); @@ -33,7 +33,7 @@ public: if no match is found. */ SkView* findViewByID(const char id[]) const; - + SkDEBUGCODE(void dump() const;) protected: diff --git a/include/views/SkWindow.h b/include/views/SkWindow.h index c72163c223..a71bf4d7dc 100644 --- a/include/views/SkWindow.h +++ b/include/views/SkWindow.h @@ -54,7 +54,7 @@ public: void addMenu(SkOSMenu*); const SkTDArray<SkOSMenu*>* getMenus() { return &fMenus; } - + const char* getTitle() const { return fTitle.c_str(); } void setTitle(const char title[]); @@ -93,7 +93,7 @@ private: SkView* fFocusView; bool fWaitingOnInval; - + SkString fTitle; SkMatrix fMatrix; diff --git a/include/views/animated/SkImageView.h b/include/views/animated/SkImageView.h index e17914151b..a21da0be51 100644 --- a/include/views/animated/SkImageView.h +++ b/include/views/animated/SkImageView.h @@ -25,7 +25,7 @@ public: void getUri(SkString*) const; void setUri(const char []); void setUri(const SkString&); - + enum ScaleType { kMatrix_ScaleType, @@ -36,7 +36,7 @@ public: }; ScaleType getScaleType() const { return (ScaleType)fScaleType; } void setScaleType(ScaleType); - + bool getImageMatrix(SkMatrix*) const; void setImageMatrix(const SkMatrix*); @@ -45,7 +45,7 @@ protected: virtual bool onEvent(const SkEvent&); virtual void onDraw(SkCanvas*); virtual void onInflate(const SkDOM&, const SkDOMNode*); - + private: SkString fUri; SkMatrix* fMatrix; // null or copy of caller's matrix ,,,,, @@ -56,7 +56,7 @@ private: uint8_t fScaleType; SkBool8 fDataIsAnim; // as opposed to bitmap SkBool8 fUriIsValid; - + void onUriChange(); bool getDataBounds(SkRect* bounds); bool freeData(); diff --git a/include/views/animated/SkProgressBarView.h b/include/views/animated/SkProgressBarView.h index 0e39d1e0b6..7e670a9ad5 100644 --- a/include/views/animated/SkProgressBarView.h +++ b/include/views/animated/SkProgressBarView.h @@ -18,29 +18,29 @@ class SkProgressBarView : public SkWidgetView { public: SkProgressBarView(); //SkProgressBarView(int max); - + //inflate: "sk-progress" - + void reset(); //reset progress to zero void setProgress(int progress); void changeProgress(int diff); void setMax(int max); - + int getProgress() const { return fProgress; } int getMax() const { return fMax; } - + protected: //overrides virtual void onInflate(const SkDOM& dom, const SkDOM::Node* node); virtual void onSizeChange(); virtual void onDraw(SkCanvas* canvas); virtual bool onEvent(const SkEvent& evt); - + private: SkAnimator fAnim; int fProgress; int fMax; - + typedef SkWidgetView INHERITED; }; diff --git a/include/views/animated/SkScrollBarView.h b/include/views/animated/SkScrollBarView.h index 110d0e12f0..1270e14136 100644 --- a/include/views/animated/SkScrollBarView.h +++ b/include/views/animated/SkScrollBarView.h @@ -22,10 +22,10 @@ public: unsigned getShown() const { return fShownLength; } unsigned getTotal() const { return fTotalLength; } - void setStart(unsigned start); + void setStart(unsigned start); void setShown(unsigned shown); void setTotal(unsigned total); - + protected: //overrides virtual void onInflate(const SkDOM& dom, const SkDOM::Node* node); @@ -36,9 +36,9 @@ protected: private: SkAnimator fAnim; unsigned fTotalLength, fStartPoint, fShownLength; - + void adjust(); - + typedef SkWidgetView INHERITED; }; #endif diff --git a/include/views/animated/SkWidgetViews.h b/include/views/animated/SkWidgetViews.h index 93adeef6b0..40346600c3 100644 --- a/include/views/animated/SkWidgetViews.h +++ b/include/views/animated/SkWidgetViews.h @@ -21,7 +21,7 @@ enum SkWidgetEnum { kProgress_WidgetEnum, //!< <sk-progress> kScroll_WidgetEnum, //!< <sk-scroll> kText_WidgetEnum, //!< <sk-text> - + kWidgetEnumCount }; @@ -32,7 +32,7 @@ enum SkinEnum { kProgress_SkinEnum, kScroll_SkinEnum, kStaticText_SkinEnum, - + kSkinEnumCount }; @@ -73,7 +73,7 @@ public: /** Returns true if the widget can post its event to its listeners. */ bool postWidgetEvent(); - + /** Returns the sinkID of the widgetview that posted the event, or 0 */ static SkEventSinkID GetWidgetEventSinkID(const SkEvent&); @@ -93,11 +93,11 @@ protected: // overrides virtual void onInflate(const SkDOM& dom, const SkDOM::Node*); - + private: SkString fLabel; SkEvent fEvent; - + typedef SkView INHERITED; }; @@ -106,7 +106,7 @@ private: class SkButtonView : public SkWidgetView { public: // inflate: "sk-button" - + protected: // overrides virtual bool onEvent(const SkEvent&); @@ -121,7 +121,7 @@ public: SkCheckButtonView(); // inflate: "sk-checkbutton" - + enum CheckState { kOff_CheckState, //!< inflate: check-state="off" kOn_CheckState, //!< inflate: check-state="on" @@ -144,10 +144,10 @@ protected: // overrides virtual void onInflate(const SkDOM& dom, const SkDOM::Node*); virtual bool onPrepareWidgetEvent(SkEvent* evt); - + private: uint8_t fCheckState; - + typedef SkWidgetView INHERITED; }; @@ -214,7 +214,7 @@ public: bool hasScrollBar() const { return fScrollBar != NULL; } void setHasScrollBar(bool); - + /** Return the number of visible rows */ int getVisibleRowCount() const { return fVisibleRowCount; } @@ -300,7 +300,7 @@ public: virtual void getRecord(int rowIndex, int fieldIndex, SkString* data); virtual bool prepareWidgetEvent(SkEvent*, int rowIndex); - + static SkListSource* Factory(const char name[]); private: typedef SkRefCnt INHERITED; |