| OLD | NEW |
| (Empty) |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | |
| 2 // Use of this source code is governed by a BSD-style license that can be | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #ifndef WIN8_METRO_DRIVER_IME_INPUT_SOURCE_H_ | |
| 6 #define WIN8_METRO_DRIVER_IME_INPUT_SOURCE_H_ | |
| 7 | |
| 8 #include <Windows.h> | |
| 9 | |
| 10 #include "base/memory/scoped_ptr.h" | |
| 11 | |
| 12 namespace metro_driver { | |
| 13 | |
| 14 class InputSourceObserver; | |
| 15 | |
| 16 // An interface through which information about the input source can be | |
| 17 // retrieved, where an input source represents an IME or a keyboard layout. | |
| 18 class InputSource { | |
| 19 public: | |
| 20 virtual ~InputSource() {} | |
| 21 // Create an instance. Returns NULL if fails. | |
| 22 static scoped_ptr<InputSource> Create(); | |
| 23 | |
| 24 // Returns true if |langid| and |is_ime| are filled based on the current | |
| 25 // active input source. | |
| 26 virtual bool GetActiveSource(LANGID* langid, bool* is_ime) = 0; | |
| 27 | |
| 28 // Adds/Removes an observer to receive notifications when the active input | |
| 29 // source is changed. | |
| 30 virtual void AddObserver(InputSourceObserver* observer) = 0; | |
| 31 virtual void RemoveObserver(InputSourceObserver* observer) = 0; | |
| 32 }; | |
| 33 | |
| 34 } // namespace metro_driver | |
| 35 | |
| 36 #endif // WIN8_METRO_DRIVER_IME_INPUT_SOURCE_H_ | |
| OLD | NEW |