summaryrefslogtreecommitdiffstats
path: root/ui/views/events
Commit message (Collapse)AuthorAgeFilesLines
* aura: Move GestureRecognizer from views into aura.sadrul@chromium.org2012-01-193-23/+38
| | | | | | | | | | | Remove deprecated GestureManager, and move the functional GestureRecognizer from views into aura. BUG=110227 TEST=views_unittests:GestureEvent, aura_unittests:GestureRecognizerTest Review URL: https://chromiumcodereview.appspot.com/9255019 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@118200 0039d316-1c4b-4281-b951-d872f2087c98
* Initial views touchui Gesture Recognizer supportvollick@google.com2012-01-172-2/+74
| | | | | | | | | | | | | This is just a merge of Gajen's patch (http://codereview.chromium.org/8364039/) with ToT. BUG=101645 TEST=views_unittest Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=117869 Review URL: https://chromiumcodereview.appspot.com/9076002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@117894 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 117869 - Initial views touchui Gesture Recognizer supportvollick@google.com2012-01-172-74/+2
| | | | | | | | | | | | | | | This is just a merge of Gajen's patch (http://codereview.chromium.org/8364039/) with ToT. BUG=101645 TEST=views_unittest Review URL: http://codereview.chromium.org/9076002 TBR=vollick@chromium.org Review URL: https://chromiumcodereview.appspot.com/9231013 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@117870 0039d316-1c4b-4281-b951-d872f2087c98
* Initial views touchui Gesture Recognizer supportvollick@chromium.org2012-01-172-2/+74
| | | | | | | | | | | | This is just a merge of Gajen's patch (http://codereview.chromium.org/8364039/) with ToT. BUG=101645 TEST=views_unittest Review URL: http://codereview.chromium.org/9076002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@117869 0039d316-1c4b-4281-b951-d872f2087c98
* Do not modify |native_event()->xkey.state| in GetUnmodifiedCharaceter.yusukes@chromium.org2012-01-051-6/+5
| | | | | | | | | | | | This is a partial revert of r107141. Since the revision, bits in |native_event()->xkey.state| for Control, Caps Lock, Alt, and Num Lock are cleared when GetUnmodifiedCharaceter() is called, but the behavior would't be desirable. This CL reverts the part so that the function would only modify a copy of XKeyEvent object. BUG=none TEST=ran try Review URL: http://codereview.chromium.org/8965022 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@116483 0039d316-1c4b-4281-b951-d872f2087c98
* Do not use ui::GetCharacterFromXEvent when Control is pressed.yusukes@chromium.org2012-01-051-2/+4
| | | | | | | | | | | | The function does not take into account the modifier. BUG=107837 TEST=see the bug Review URL: http://codereview.chromium.org/8968011 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@116451 0039d316-1c4b-4281-b951-d872f2087c98
* Bypass ToplevelWindowEventFilter for panels.prasadt@chromium.org2011-12-271-4/+0
| | | | | | | | | | | With this change minimize and drag work on panels in Aura. BUG=108497 TEST=Run chrome in aura. Create a panel. Click on titlebar. Drag. Review URL: http://codereview.chromium.org/9027020 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@115850 0039d316-1c4b-4281-b951-d872f2087c98
* Rename ui::EventFlags mouse flags to be more sensibledhollowa@chromium.org2011-12-203-21/+21
| | | | | | | | | | | | | | | | Changes EF_(LEFT|MIDDLE|RIGHT)_BUTTON_DOWN to EF_(LEF|MIDDLE|RIGHT)_MOUSE_BUTTON since these are not specific to "down" button events. This is follow up from review http://codereview.chromium.org/8953037 BUG=none TEST=Compiles. R=ben@chromium.org Review URL: http://codereview.chromium.org/9007016 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@115188 0039d316-1c4b-4281-b951-d872f2087c98
* CMT can now generate motion events w/ valuators instead of a sequence of ↵davemoore@chromium.org2011-12-152-0/+19
| | | | | | | | | | | button events. This supports them BUG=None TEST=None Review URL: http://codereview.chromium.org/8907005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@114660 0039d316-1c4b-4281-b951-d872f2087c98
* Rename ui::DefaultSymbolFromXEvent to ui::GetCharacterFromXEvent following ↵yusukes@chromium.org2011-12-081-2/+2
| | | | | | | | | | | | | | suzhe's suggestion. The new name would be more consistent since other functions that return a Unicode code point use ui::GetCharacterXXX. For example, keyboard_code_conversion.h has ui::GetCharacterFromKeyCode. BUG=None TEST=ran try Review URL: http://codereview.chromium.org/8802002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@113586 0039d316-1c4b-4281-b951-d872f2087c98
* views: Move the remaining file from views/ to ui/views/.tfarina@chromium.org2011-12-011-1/+1
| | | | | | | | | | BUG=104039 R=ben@chromium.org TBR=stevenjb@chromium.org Review URL: http://codereview.chromium.org/8771006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@112469 0039d316-1c4b-4281-b951-d872f2087c98
* views: Move view.h to ui/views/.tfarina@chromium.org2011-11-301-1/+1
| | | | | | | | | | BUG=104039 R=ben@chromium.org TBR=stevenjb@chromium.org Review URL: http://codereview.chromium.org/8742030 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@112333 0039d316-1c4b-4281-b951-d872f2087c98
* On AURA builds, mouse wheel event on native menus doesn't work.ckqr36@motorola.com2011-11-291-1/+5
| | | | | | | | | | | | | | | The code in SubmenuView expects the delta scroll to be in multiples of MouseWheelEvent::kWheelDelta which is defined as 120 for all platforms. However, MouseWheelEvent has an offset which is created using kWheelScrollAmount, defined in ui/base/x/events_x.cc, which is set to 53(this is a value used in GTK). BUG=none TEST=Open google.com in AURA build, go to Wrench Menu->Tools->Encoding where it shows a big list of menu items. Use mouse wheel to scroll through the list. Observe that the sub menu scrolls. Patch by ckqr36@motorola.com Review URL: http://codereview.chromium.org/8538003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@111933 0039d316-1c4b-4281-b951-d872f2087c98
* views: Move widget/ directory to ui/views.tfarina@chromium.org2011-11-222-2/+2
| | | | | | | | | | | BUG=104039 R=ben@chromium.org Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=110949 Review URL: http://codereview.chromium.org/8598031 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@111077 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 110949 - views: Move widget/ directory to ui/views.wez@chromium.org2011-11-212-2/+2
| | | | | | | | | | | | BUG=104039 R=ben@chromium.org Review URL: http://codereview.chromium.org/8598031 TBR=tfarina@chromium.org Review URL: http://codereview.chromium.org/8547015 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@110953 0039d316-1c4b-4281-b951-d872f2087c98
* views: Move widget/ directory to ui/views.tfarina@chromium.org2011-11-212-2/+2
| | | | | | | | | BUG=104039 R=ben@chromium.org Review URL: http://codereview.chromium.org/8598031 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@110949 0039d316-1c4b-4281-b951-d872f2087c98
* Now that we are doing a hard-cut-over to Aura, remove a bunch of *Views ↵ben@chromium.org2011-11-191-23/+0
| | | | | | | | | | | | | | | | | based classes that are obsoleted by Aura. Also remove a bunch of Wayland stuff, since any future Wayland integration is likely done as an implementation detail of Aura, not Views. Specifically: - views-desktop (classes and NativeWidgetView[s]) - NativeWidgetViews subclasses in Chrome (Constrained Windows, NTCVV, NTCCV, BrowserFrameViews et al). - RWHVV, NWKEV - NativeViewHostViews BUG=none TEST=none Review URL: http://codereview.chromium.org/8598024 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@110832 0039d316-1c4b-4281-b951-d872f2087c98
* views: Delete bubble, events, focus, layout directories and its stubbed files.tfarina@chromium.org2011-11-187-7/+7
| | | | | | | | | BUG=104039 R=ben@chromium.org Review URL: http://codereview.chromium.org/8566052 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@110787 0039d316-1c4b-4281-b951-d872f2087c98
* views: Move bubble, events, focus and layout to ui/views/.tfarina@chromium.org2011-11-188-0/+1193
| | | | | | | | | | | | Left stub files that will be removed in a follow up patch after updating the files to point to the new location. BUG=104039 R=ben@chromium.org Review URL: http://codereview.chromium.org/8588064 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@110761 0039d316-1c4b-4281-b951-d872f2087c98
* Remove src/ui/views.tfarina@chromium.org2011-10-268-594/+0
| | | | | | | | | BUG=101590 R=pkasting@chromium.org Review URL: http://codereview.chromium.org/8395036 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@107428 0039d316-1c4b-4281-b951-d872f2087c98
* Consolidate/cleanup event cracking code; single out GdkEvents; saves ~850 lines.msw@chromium.org2011-09-263-196/+23
| | | | | | | | | | | | | | | | | | | | | Move ui::NativeEvent typdefs and common functions to ui/base/events.h. Remove NativeEvent2 typedef, single out GdkEvent* uses that should be removed. Implement platform specific ui/base/[platform]/events_[platform].cc. Revise views::NativeEvent definitions (to support Aura abstraction). Consolidate Event[Type/Flags/Location]FromNative(), GetMouseWheelOffset(), etc. Remove GetRepeatCount(), GetWindowsFlags(), IsExtendedKey(), etc. Add IsMouseEvent(), KeyboardCodeFromNative(), EF_EXTENDED flag, etc. Localize GetFlagsFromGdkEvent(), move some file locals to new helpers files. Move views/touchui/touch_factory.h|cc to ui/base/touch. Stop mixing Windows mouse events' MK_*BUTTON into their wParams. BUG=93945 TEST=No build breaks (many configs...), no mouse/key behavior changes. Review URL: http://codereview.chromium.org/7942004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@102815 0039d316-1c4b-4281-b951-d872f2087c98
* Remove EventType, EventFlags, MouseEventFlags enum re-definitions.msw@chromium.org2011-09-082-38/+1
| | | | | | | | | | | Remove unnecessary includes from ui/base/models/accelerator.h. BUG=93945 TEST=none Review URL: http://codereview.chromium.org/7848011 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@100179 0039d316-1c4b-4281-b951-d872f2087c98
* Rename app_strings to ui_strings.tfarina@chromium.org2011-07-071-1/+1
| | | | | | | | | | | BUG=72317 TEST=None R=rsesek@chromium.org, tony@chromium.org Review URL: http://codereview.chromium.org/7210060 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@91704 0039d316-1c4b-4281-b951-d872f2087c98
* Made the OS_LINUX ifdefs in ui/ and webkit/ directories more cross-platform, ↵chromium@hybridsource.org2011-05-251-2/+2
| | | | | | | | so that these files can be used on multiple POSIX platforms. Review URL: http://codereview.chromium.org/6990051 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@86742 0039d316-1c4b-4281-b951-d872f2087c98
* ui/base/models: Convert GetKeyCode() to unit_hacker() style (key_code()).tfarina@chromium.org2011-05-201-9/+9
| | | | | | | | | | | | | Note: This was a TODO for beng. BUG=None TEST=None R=ben@chromium.org Review URL: http://codereview.chromium.org/7050025 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@86079 0039d316-1c4b-4281-b951-d872f2087c98
* Add new MouseEvent ctors; update WidgetWin & WindowWin usage.msw@chromium.org2011-03-081-25/+17
| | | | | | | | | BUG=72040 TEST=Manual mouse event testing. Review URL: http://codereview.chromium.org/6591120 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@77221 0039d316-1c4b-4281-b951-d872f2087c98
* Rename ContextMenuController::ShowContextMenu() to ShowContextMenuForView().thakis@chromium.org2011-03-041-3/+3
| | | | | | | | | | | | | | | For classes deriving from both View and ContextMenuController, this makes it clear which of method is overridden. Rename TabController::ShowContextMenu to ShowContextMenuForTab for the same reason. No intended functionality change. BUG=70465,72205 TEST=none TBR=beng git-svn-id: svn://svn.chromium.org/chrome/trunk/src@76878 0039d316-1c4b-4281-b951-d872f2087c98
* Rename the methods in DragController.thakis@chromium.org2011-03-041-7/+7
| | | | | | | | | | | | | | | They used to have the same name as methods in View. Some views would derive from both View and DragController, which was confusing. For example for clang's -Woverride-virtual. No functionality change. BUG=70465,72205 TEST=none Review URL: http://codereview.chromium.org/6609033 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@76847 0039d316-1c4b-4281-b951-d872f2087c98
* View API/implementation cleanup:pkasting@chromium.org2011-02-222-27/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | * Don't include the container type ("vector") in the typedef for "a bunch of children". Users generally should not know or care what the container is, so this makes reading easier as the code is not constantly pointing out to you, "hey! I'm a vector!" Added bonus: less verbose, allows condensing a lot of loop declarations onto one line. * Consistently put getters before setters. * Remove 4-arg form of SetBounds() and make people use Rects (we should move the codebase towards Points, Sizes, and Rects wherever possible). * Use "origin" instead of "position" to be consistent with Rect's terminology. * Minor naming changes, e.g. GetViewById() -> GetViewByID(). * Remove const qualifier on member functions that are not logically const. This also got rid of all the const_cast<>()s. * Better comments. * Use const ref args for Views whenever the provided View is not being modified, to make that obvious to the caller. * Turn some accessors into pairs of (non-const, const) accessors. In these cases make the non-const version call the const version. (GetWidget() does this in the header because the const version is virtual; this way people who override the const version can see why they don't need to override the non-const version). * Make RemoveChildView() take a bool for consistency with RemoveAllChildViews() (also eliminates the need to return a View*). * Add STL-style iterators and rename a few accessors to match STL terminology ("size" instead of "count"). * Turn IsFocusable() into a cheap inline getter. * Greatly simplify private tree ops ("NotifyHierarchyChangedXXX()") by realizing that they were always being called with |parent| == |this|. * Declare iterators inside loops, not above them. * Standardize iterator naming to |i|. The existing code wasn't always consistent, and while there's nothing wrong with |it|, using that would have made almost every loop declaration into two lines instead of one. * Simpler code, sometimes by using STL algorithms. * Unindent via early-returns. * Use CHECK_NE() and similar where possible. * Fix memory corruption in RemoveAllChildViews() due to using an iterator after modifying its container. BUG=none TEST=none Review URL: http://codereview.chromium.org/6541030 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@75642 0039d316-1c4b-4281-b951-d872f2087c98
* Migrate Event API methods to Google Style.ben@chromium.org2011-02-101-26/+26
| | | | | | | | | | | | | | Re-landing, moving the bits Mac uses to ui/base/events.h BUG=72040 TEST=none TBR=sky Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=74377 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@74408 0039d316-1c4b-4281-b951-d872f2087c98
* Change includes of gfx/* to ui/gfx/*sail@chromium.org2011-02-051-1/+1
| | | | | | | | | BUG=71063 TEST=compiled Review URL: http://codereview.chromium.org/6312156 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@73890 0039d316-1c4b-4281-b951-d872f2087c98
* Switch to using FocusEvent for focus change notifications. ben@chromium.org2011-02-034-2/+73
| | | | | | | | | | | | | I also removed ViewStorage usage for now. Jay described generally the kind of cases where this might be useful but I have not encountered them yet in my current testing. I will reintroduce this code if it becomes necessary. Note that I have not yet verified that this works. That comes next. BUG=none TEST=none Review URL: http://codereview.chromium.org/6368083 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@73655 0039d316-1c4b-4281-b951-d872f2087c98
* Copy more focus manager into V2. Comment out a bunch of stuff and add stub ↵ben@chromium.org2011-02-024-0/+228
| | | | | | | | | | | impls of methods with TODOs so that it builds. BUG=none TEST=none Review URL: http://codereview.chromium.org/6334062 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@73513 0039d316-1c4b-4281-b951-d872f2087c98
* sFirst cut at an experiment with what a simplified View/Widget API would ↵ben@chromium.org2011-02-015-0/+513
look like. Of note: - Widget is a cross-platform class encapsulating widget-specific state - NativeWidget interface wraps different implementations of a native widget. Starting with HWND. - NativeWidget implementation should eventually be swappable at runtime. - Simpler Event construction directly from a NativeEvent (e.g. MSG struct) - Simpler View API with fewer, more clearly delineated overrides. Notes: - Window* are just empty files for now while I get View/Widget to work. BUG=none TEST=see unittests, in development Review URL: http://codereview.chromium.org/6286013 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@73353 0039d316-1c4b-4281-b951-d872f2087c98