Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(33)

Side by Side Diff: chromeos/dbus/ibus/ibus_text.h

Issue 10332228: Extends IBusText I/O function. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Apply comments. Created 8 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | chromeos/dbus/ibus/ibus_text.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CHROMEOS_DBUS_IBUS_IBUS_TEXT_H_ 5 #ifndef CHROMEOS_DBUS_IBUS_IBUS_TEXT_H_
6 #define CHROMEOS_DBUS_IBUS_IBUS_TEXT_H_ 6 #define CHROMEOS_DBUS_IBUS_IBUS_TEXT_H_
7 7
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
75 // ] 75 // ]
76 // } 76 // }
77 // } 77 // }
78 // 78 //
79 class IBusText; 79 class IBusText;
80 80
81 // Pops a IBusText from |reader|. 81 // Pops a IBusText from |reader|.
82 // Returns false if an error occures. 82 // Returns false if an error occures.
83 bool CHROMEOS_EXPORT PopIBusText(dbus::MessageReader* reader, 83 bool CHROMEOS_EXPORT PopIBusText(dbus::MessageReader* reader,
84 IBusText* ibus_text); 84 IBusText* ibus_text);
85 // Pops a IBusText from |reader| and stores it's text field into text. Use
86 // PopIBusText instead in the case of using any attribute entries in IBusText.
87 // Returns true on success.
88 bool CHROMEOS_EXPORT PopStringFromIBusText(dbus::MessageReader* reader,
89 std::string* text);
85 // Appends a IBusText to |writer|. 90 // Appends a IBusText to |writer|.
86 void CHROMEOS_EXPORT AppendIBusText(const IBusText& ibus_text, 91 void CHROMEOS_EXPORT AppendIBusText(const IBusText& ibus_text,
87 dbus::MessageWriter* writer); 92 dbus::MessageWriter* writer);
88 93
94 // Appends a string to |writer| as IBusText without any attributes. Use
95 // AppendIBusText instead in the case of using any attribute entries.
96 void CHROMEOS_EXPORT AppendStringAsIBusText(const std::string& text,
97 dbus::MessageWriter* writer);
98
89 // Handles IBusText object which is used in dbus communication with ibus-daemon. 99 // Handles IBusText object which is used in dbus communication with ibus-daemon.
90 // The IBusAttribute has four uint32 variables and the IBusAttributes represents 100 // The IBusAttribute has four uint32 variables and the IBusAttributes represents
91 // three type of decoration based on it's values. 101 // three type of decoration based on it's values.
92 // 1. Underline decoration (corresponds to UnderlineAttribute structure) 102 // 1. Underline decoration (corresponds to UnderlineAttribute structure)
93 // 1st value: indicates underline attribute. 103 // 1st value: indicates underline attribute.
94 // 2nd value: type of decoration. Chrome only support single and double 104 // 2nd value: type of decoration. Chrome only support single and double
95 // underline and error line. 105 // underline and error line.
96 // 3rd value: the start index of this attribute in multibyte. 106 // 3rd value: the start index of this attribute in multibyte.
97 // 4th value: the end index of this attribute in multibyte. 107 // 4th value: the end index of this attribute in multibyte.
98 // 108 //
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
143 std::vector<UnderlineAttribute> underline_attributes_; 153 std::vector<UnderlineAttribute> underline_attributes_;
144 std::vector<SelectionAttribute> selection_attributes_; 154 std::vector<SelectionAttribute> selection_attributes_;
145 155
146 DISALLOW_COPY_AND_ASSIGN(IBusText); 156 DISALLOW_COPY_AND_ASSIGN(IBusText);
147 }; 157 };
148 158
149 } // namespace ibus 159 } // namespace ibus
150 } // namespace chromeos 160 } // namespace chromeos
151 161
152 #endif // CHROMEOS_DBUS_IBUS_IBUS_TEXT_H_ 162 #endif // CHROMEOS_DBUS_IBUS_IBUS_TEXT_H_
OLDNEW
« no previous file with comments | « no previous file | chromeos/dbus/ibus/ibus_text.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698