| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2006 Apple Computer, Inc. All rights reserved. | 2 * Copyright (C) 2006 Apple Computer, Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions | 5 * modification, are permitted provided that the following conditions |
| 6 * are met: | 6 * are met: |
| 7 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
| 8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
| 9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
| 10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 42 ScrollInlineDirectionForward | 42 ScrollInlineDirectionForward |
| 43 }; | 43 }; |
| 44 | 44 |
| 45 enum ScrollDirectionPhysical { | 45 enum ScrollDirectionPhysical { |
| 46 ScrollUp, | 46 ScrollUp, |
| 47 ScrollDown, | 47 ScrollDown, |
| 48 ScrollLeft, | 48 ScrollLeft, |
| 49 ScrollRight | 49 ScrollRight |
| 50 }; | 50 }; |
| 51 | 51 |
| 52 enum ScrollType { |
| 53 UserScroll, |
| 54 ProgrammaticScroll, |
| 55 CompositorScroll |
| 56 }; |
| 57 |
| 52 // Convert logical scroll direction to physical. Physical scroll directions are
unaffected. | 58 // Convert logical scroll direction to physical. Physical scroll directions are
unaffected. |
| 53 inline ScrollDirectionPhysical toPhysicalDirection(ScrollDirection direction, bo
ol isVertical, bool isFlipped) | 59 inline ScrollDirectionPhysical toPhysicalDirection(ScrollDirection direction, bo
ol isVertical, bool isFlipped) |
| 54 { | 60 { |
| 55 switch (direction) { | 61 switch (direction) { |
| 56 case ScrollBlockDirectionBackward: { | 62 case ScrollBlockDirectionBackward: { |
| 57 if (isVertical) { | 63 if (isVertical) { |
| 58 if (!isFlipped) | 64 if (!isFlipped) |
| 59 return ScrollUp; | 65 return ScrollUp; |
| 60 return ScrollDown; | 66 return ScrollDown; |
| 61 } | 67 } |
| (...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 210 bool didScrollY; | 216 bool didScrollY; |
| 211 float unusedScrollDeltaX; | 217 float unusedScrollDeltaX; |
| 212 float unusedScrollDeltaY; | 218 float unusedScrollDeltaY; |
| 213 }; | 219 }; |
| 214 | 220 |
| 215 typedef unsigned ScrollbarControlPartMask; | 221 typedef unsigned ScrollbarControlPartMask; |
| 216 | 222 |
| 217 } | 223 } |
| 218 | 224 |
| 219 #endif | 225 #endif |
| OLD | NEW |