| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2006, 2007, 2008 Apple Inc. All rights reserved. | 2 * Copyright (C) 2006, 2007, 2008 Apple 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 27 matching lines...) Expand all Loading... |
| 38 class Text; | 38 class Text; |
| 39 | 39 |
| 40 // FIXME: We should move PlainTextOffsets to own file for using InputMethodContr
oller | 40 // FIXME: We should move PlainTextOffsets to own file for using InputMethodContr
oller |
| 41 // and TextIterator and unify PlainTextRange defined in AccessibilityObject.h. | 41 // and TextIterator and unify PlainTextRange defined in AccessibilityObject.h. |
| 42 class PlainTextOffsets { | 42 class PlainTextOffsets { |
| 43 public: | 43 public: |
| 44 PlainTextOffsets(); | 44 PlainTextOffsets(); |
| 45 PlainTextOffsets(int start, int length); | 45 PlainTextOffsets(int start, int length); |
| 46 size_t end() const { return m_end; } | 46 size_t end() const { return m_end; } |
| 47 size_t start() const { return m_start; } | 47 size_t start() const { return m_start; } |
| 48 bool isNull() const { return m_start == notFound; } | 48 bool isNull() const { return m_start == kNotFound; } |
| 49 private: | 49 private: |
| 50 size_t m_start; | 50 size_t m_start; |
| 51 size_t m_end; | 51 size_t m_end; |
| 52 }; | 52 }; |
| 53 | 53 |
| 54 class InputMethodController { | 54 class InputMethodController { |
| 55 public: | 55 public: |
| 56 static PassOwnPtr<InputMethodController> create(Frame*); | 56 static PassOwnPtr<InputMethodController> create(Frame*); |
| 57 ~InputMethodController(); | 57 ~InputMethodController(); |
| 58 | 58 |
| (...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 109 void selectComposition() const; | 109 void selectComposition() const; |
| 110 enum FinishCompositionMode { ConfirmComposition, CancelComposition }; | 110 enum FinishCompositionMode { ConfirmComposition, CancelComposition }; |
| 111 void finishComposition(const String&, FinishCompositionMode); | 111 void finishComposition(const String&, FinishCompositionMode); |
| 112 PlainTextOffsets getSelectionOffsets() const; | 112 PlainTextOffsets getSelectionOffsets() const; |
| 113 bool setSelectionOffsets(const PlainTextOffsets&); | 113 bool setSelectionOffsets(const PlainTextOffsets&); |
| 114 }; | 114 }; |
| 115 | 115 |
| 116 } // namespace WebCore | 116 } // namespace WebCore |
| 117 | 117 |
| 118 #endif // InputMethodController_h | 118 #endif // InputMethodController_h |
| OLD | NEW |