Apply clang-format to all C, C++ and ObjC files (issue #2171)

This commit is contained in:
Marshall Greenblatt
2017-05-17 11:29:28 +02:00
parent a566549e04
commit 31d9407ee2
1331 changed files with 33014 additions and 32258 deletions

View File

@@ -33,6 +33,8 @@
// by hand. See the translator.README.txt file in the tools directory for
// more information.
//
// $hash=0dbd10f061bf4d63be22d050b93f5231fd7fb677$
//
#ifndef CEF_INCLUDE_CAPI_VIEWS_CEF_TEXTFIELD_CAPI_H_
#define CEF_INCLUDE_CAPI_VIEWS_CEF_TEXTFIELD_CAPI_H_
@@ -45,7 +47,6 @@
extern "C" {
#endif
///
// A Textfield supports editing of text. This control is custom rendered with no
// platform-specific code. Methods must be called on the browser process UI
@@ -60,60 +61,60 @@ typedef struct _cef_textfield_t {
///
// Sets whether the text will be displayed as asterisks.
///
void (CEF_CALLBACK *set_password_input)(struct _cef_textfield_t* self,
int password_input);
void(CEF_CALLBACK* set_password_input)(struct _cef_textfield_t* self,
int password_input);
///
// Returns true (1) if the text will be displayed as asterisks.
///
int (CEF_CALLBACK *is_password_input)(struct _cef_textfield_t* self);
int(CEF_CALLBACK* is_password_input)(struct _cef_textfield_t* self);
///
// Sets whether the text will read-only.
///
void (CEF_CALLBACK *set_read_only)(struct _cef_textfield_t* self,
int read_only);
void(CEF_CALLBACK* set_read_only)(struct _cef_textfield_t* self,
int read_only);
///
// Returns true (1) if the text is read-only.
///
int (CEF_CALLBACK *is_read_only)(struct _cef_textfield_t* self);
int(CEF_CALLBACK* is_read_only)(struct _cef_textfield_t* self);
///
// Returns the currently displayed text.
///
// The resulting string must be freed by calling cef_string_userfree_free().
cef_string_userfree_t (CEF_CALLBACK *get_text)(struct _cef_textfield_t* self);
cef_string_userfree_t(CEF_CALLBACK* get_text)(struct _cef_textfield_t* self);
///
// Sets the contents to |text|. The cursor will be moved to end of the text if
// the current position is outside of the text range.
///
void (CEF_CALLBACK *set_text)(struct _cef_textfield_t* self,
const cef_string_t* text);
void(CEF_CALLBACK* set_text)(struct _cef_textfield_t* self,
const cef_string_t* text);
///
// Appends |text| to the previously-existing text.
///
void (CEF_CALLBACK *append_text)(struct _cef_textfield_t* self,
const cef_string_t* text);
void(CEF_CALLBACK* append_text)(struct _cef_textfield_t* self,
const cef_string_t* text);
///
// Inserts |text| at the current cursor position replacing any selected text.
///
void (CEF_CALLBACK *insert_or_replace_text)(struct _cef_textfield_t* self,
const cef_string_t* text);
void(CEF_CALLBACK* insert_or_replace_text)(struct _cef_textfield_t* self,
const cef_string_t* text);
///
// Returns true (1) if there is any selected text.
///
int (CEF_CALLBACK *has_selection)(struct _cef_textfield_t* self);
int(CEF_CALLBACK* has_selection)(struct _cef_textfield_t* self);
///
// Returns the currently selected text.
///
// The resulting string must be freed by calling cef_string_userfree_free().
cef_string_userfree_t (CEF_CALLBACK *get_selected_text)(
cef_string_userfree_t(CEF_CALLBACK* get_selected_text)(
struct _cef_textfield_t* self);
///
@@ -121,62 +122,63 @@ typedef struct _cef_textfield_t {
// logical beginning of the text; this generally shows the leading portion of
// text that overflows its display area.
///
void (CEF_CALLBACK *select_all)(struct _cef_textfield_t* self, int reversed);
void(CEF_CALLBACK* select_all)(struct _cef_textfield_t* self, int reversed);
///
// Clears the text selection and sets the caret to the end.
///
void (CEF_CALLBACK *clear_selection)(struct _cef_textfield_t* self);
void(CEF_CALLBACK* clear_selection)(struct _cef_textfield_t* self);
///
// Returns the selected logical text range.
///
cef_range_t (CEF_CALLBACK *get_selected_range)(struct _cef_textfield_t* self);
cef_range_t(CEF_CALLBACK* get_selected_range)(struct _cef_textfield_t* self);
///
// Selects the specified logical text range.
///
void (CEF_CALLBACK *select_range)(struct _cef_textfield_t* self,
const cef_range_t* range);
void(CEF_CALLBACK* select_range)(struct _cef_textfield_t* self,
const cef_range_t* range);
///
// Returns the current cursor position.
///
size_t (CEF_CALLBACK *get_cursor_position)(struct _cef_textfield_t* self);
size_t(CEF_CALLBACK* get_cursor_position)(struct _cef_textfield_t* self);
///
// Sets the text color.
///
void (CEF_CALLBACK *set_text_color)(struct _cef_textfield_t* self,
cef_color_t color);
void(CEF_CALLBACK* set_text_color)(struct _cef_textfield_t* self,
cef_color_t color);
///
// Returns the text color.
///
cef_color_t (CEF_CALLBACK *get_text_color)(struct _cef_textfield_t* self);
cef_color_t(CEF_CALLBACK* get_text_color)(struct _cef_textfield_t* self);
///
// Sets the selection text color.
///
void (CEF_CALLBACK *set_selection_text_color)(struct _cef_textfield_t* self,
cef_color_t color);
void(CEF_CALLBACK* set_selection_text_color)(struct _cef_textfield_t* self,
cef_color_t color);
///
// Returns the selection text color.
///
cef_color_t (CEF_CALLBACK *get_selection_text_color)(
cef_color_t(CEF_CALLBACK* get_selection_text_color)(
struct _cef_textfield_t* self);
///
// Sets the selection background color.
///
void (CEF_CALLBACK *set_selection_background_color)(
struct _cef_textfield_t* self, cef_color_t color);
void(CEF_CALLBACK* set_selection_background_color)(
struct _cef_textfield_t* self,
cef_color_t color);
///
// Returns the selection background color.
///
cef_color_t (CEF_CALLBACK *get_selection_background_color)(
cef_color_t(CEF_CALLBACK* get_selection_background_color)(
struct _cef_textfield_t* self);
///
@@ -189,16 +191,17 @@ typedef struct _cef_textfield_t {
// Here are examples of valid font description strings: - "Arial, Helvetica,
// Bold Italic 14px" - "Arial, 14px"
///
void (CEF_CALLBACK *set_font_list)(struct _cef_textfield_t* self,
const cef_string_t* font_list);
void(CEF_CALLBACK* set_font_list)(struct _cef_textfield_t* self,
const cef_string_t* font_list);
///
// Applies |color| to the specified |range| without changing the default
// color. If |range| is NULL the color will be set on the complete text
// contents.
///
void (CEF_CALLBACK *apply_text_color)(struct _cef_textfield_t* self,
cef_color_t color, const cef_range_t* range);
void(CEF_CALLBACK* apply_text_color)(struct _cef_textfield_t* self,
cef_color_t color,
const cef_range_t* range);
///
// Applies |style| to the specified |range| without changing the default
@@ -206,15 +209,17 @@ typedef struct _cef_textfield_t {
// will be removed. If |range| is NULL the style will be set on the complete
// text contents.
///
void (CEF_CALLBACK *apply_text_style)(struct _cef_textfield_t* self,
cef_text_style_t style, int add, const cef_range_t* range);
void(CEF_CALLBACK* apply_text_style)(struct _cef_textfield_t* self,
cef_text_style_t style,
int add,
const cef_range_t* range);
///
// Returns true (1) if the action associated with the specified command id is
// enabled. See additional comments on execute_command().
///
int (CEF_CALLBACK *is_command_enabled)(struct _cef_textfield_t* self,
int command_id);
int(CEF_CALLBACK* is_command_enabled)(struct _cef_textfield_t* self,
int command_id);
///
// Performs the action associated with the specified command id. Valid values
@@ -222,50 +227,48 @@ typedef struct _cef_textfield_t {
// IDS_APP_PASTE, IDS_APP_DELETE, IDS_APP_SELECT_ALL, IDS_DELETE_* and
// IDS_MOVE_*. See include/cef_pack_strings.h for definitions.
///
void (CEF_CALLBACK *execute_command)(struct _cef_textfield_t* self,
int command_id);
void(CEF_CALLBACK* execute_command)(struct _cef_textfield_t* self,
int command_id);
///
// Clears Edit history.
///
void (CEF_CALLBACK *clear_edit_history)(struct _cef_textfield_t* self);
void(CEF_CALLBACK* clear_edit_history)(struct _cef_textfield_t* self);
///
// Sets the placeholder text that will be displayed when the Textfield is
// NULL.
///
void (CEF_CALLBACK *set_placeholder_text)(struct _cef_textfield_t* self,
const cef_string_t* text);
void(CEF_CALLBACK* set_placeholder_text)(struct _cef_textfield_t* self,
const cef_string_t* text);
///
// Returns the placeholder text that will be displayed when the Textfield is
// NULL.
///
// The resulting string must be freed by calling cef_string_userfree_free().
cef_string_userfree_t (CEF_CALLBACK *get_placeholder_text)(
cef_string_userfree_t(CEF_CALLBACK* get_placeholder_text)(
struct _cef_textfield_t* self);
///
// Sets the placeholder text color.
///
void (CEF_CALLBACK *set_placeholder_text_color)(struct _cef_textfield_t* self,
cef_color_t color);
void(CEF_CALLBACK* set_placeholder_text_color)(struct _cef_textfield_t* self,
cef_color_t color);
///
// Set the accessible name that will be exposed to assistive technology (AT).
///
void (CEF_CALLBACK *set_accessible_name)(struct _cef_textfield_t* self,
const cef_string_t* name);
void(CEF_CALLBACK* set_accessible_name)(struct _cef_textfield_t* self,
const cef_string_t* name);
} cef_textfield_t;
///
// Create a new Textfield.
///
CEF_EXPORT cef_textfield_t* cef_textfield_create(
struct _cef_textfield_delegate_t* delegate);
#ifdef __cplusplus
}
#endif