initial import
[vuplus_webkit] / Source / WebCore / editing / EditingBehaviorTypes.h
1 /*
2  * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies)
3  * Copyright (C) 2010 Apple Inc. All rights reserved.
4  *
5  * This library is free software; you can redistribute it and/or
6  * modify it under the terms of the GNU Library General Public
7  * License as published by the Free Software Foundation; either
8  * version 2 of the License, or (at your option) any later version.
9  *
10  * This library is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
13  * Library General Public License for more details.
14  *
15  * You should have received a copy of the GNU Library General Public License
16  * along with this library; see the file COPYING.LIB.  If not, write to
17  * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
18  * Boston, MA 02110-1301, USA.
19  */
20
21 #ifndef EditingBehaviorTypes_h
22 #define EditingBehaviorTypes_h
23
24 namespace WebCore {
25
26 // There are multiple editing details that are different on Windows than Macintosh.
27 // We use a single switch for all of them. Some examples:
28 //
29 //    1) Clicking below the last line of an editable area puts the caret at the end
30 //       of the last line on Mac, but in the middle of the last line on Windows.
31 //    2) Pushing the down arrow key on the last line puts the caret at the end of the
32 //       last line on Mac, but does nothing on Windows. A similar case exists on the
33 //       top line.
34 //
35 // This setting is intended to control these sorts of behaviors. There are some other
36 // behaviors with individual function calls on EditorClient (smart copy and paste and
37 // selecting the space after a double click) that could be combined with this if
38 // if possible in the future.
39 enum EditingBehaviorType {
40     EditingMacBehavior,
41     EditingWindowsBehavior,
42     EditingUnixBehavior
43 };
44
45 } // WebCore namespace
46
47 #endif // EditingBehaviorTypes_h