[gtksourceview] Replace 'typedef enum' with 'typedef enum _EnumType'
- From: Sébastien Wilmet <swilmet src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtksourceview] Replace 'typedef enum' with 'typedef enum _EnumType'
- Date: Thu, 21 Jul 2016 11:29:37 +0000 (UTC)
commit 9176008c6484ec12e739599f99033ee92c9c940e
Author: Sébastien Wilmet <swilmet gnome org>
Date: Thu Jul 21 12:33:06 2016 +0200
Replace 'typedef enum' with 'typedef enum _EnumType'
With the enum name prefixed by an underscore, we can easily find an enum
definition with grep.
gtksourceview/gtksourcebuffer.h | 6 +++---
gtksourceview/gtksourcecompletion.h | 2 +-
gtksourceview/gtksourcecompletioncontext.h | 2 +-
gtksourceview/gtksourcecontextengine.c | 6 +++---
gtksourceview/gtksourcecontextengine.h | 4 ++--
gtksourceview/gtksourceencoding.c | 2 +-
gtksourceview/gtksourcefileloader.h | 2 +-
gtksourceview/gtksourcefilesaver.h | 4 ++--
gtksourceview/gtksourcegutterrenderer.h | 4 ++--
gtksourceview/gtksourcelanguage-parser-2.c | 2 +-
gtksourceview/gtksourcepixbufhelper.c | 2 +-
gtksourceview/gtksourceprintcompositor.c | 2 +-
gtksourceview/gtksourcetypes.h | 6 +++---
gtksourceview/gtksourceundomanagerdefault.c | 4 ++--
gtksourceview/gtksourceview.c | 2 +-
gtksourceview/gtksourceview.h | 6 +++---
16 files changed, 28 insertions(+), 28 deletions(-)
---
diff --git a/gtksourceview/gtksourcebuffer.h b/gtksourceview/gtksourcebuffer.h
index 7526ed3..a943257 100644
--- a/gtksourceview/gtksourcebuffer.h
+++ b/gtksourceview/gtksourcebuffer.h
@@ -57,7 +57,7 @@ typedef struct _GtkSourceBufferPrivate GtkSourceBufferPrivate;
* @GTK_SOURCE_BRACKET_MATCH_NOT_FOUND: a matching bracket was not found.
* @GTK_SOURCE_BRACKET_MATCH_FOUND: a matching bracket was found.
*/
-typedef enum
+typedef enum _GtkSourceBracketMatchType
{
GTK_SOURCE_BRACKET_MATCH_NONE,
GTK_SOURCE_BRACKET_MATCH_OUT_OF_RANGE,
@@ -74,7 +74,7 @@ typedef enum
*
* Since: 3.12
*/
-typedef enum
+typedef enum _GtkSourceChangeCaseType
{
GTK_SOURCE_CHANGE_CASE_LOWER,
GTK_SOURCE_CHANGE_CASE_UPPER,
@@ -91,7 +91,7 @@ typedef enum
*
* Since: 3.18
*/
-typedef enum
+typedef enum _GtkSourceSortFlags
{
GTK_SOURCE_SORT_FLAGS_NONE = 0,
GTK_SOURCE_SORT_FLAGS_CASE_SENSITIVE = 1 << 0,
diff --git a/gtksourceview/gtksourcecompletion.h b/gtksourceview/gtksourcecompletion.h
index 87b4228..9553a7d 100644
--- a/gtksourceview/gtksourcecompletion.h
+++ b/gtksourceview/gtksourcecompletion.h
@@ -68,7 +68,7 @@ typedef struct _GtkSourceCompletionClass GtkSourceCompletionClass;
* An error code used with %GTK_SOURCE_COMPLETION_ERROR in a #GError returned
* from a completion-related function.
*/
-typedef enum
+typedef enum _GtkSourceCompletionError
{
GTK_SOURCE_COMPLETION_ERROR_ALREADY_BOUND = 0,
GTK_SOURCE_COMPLETION_ERROR_NOT_BOUND
diff --git a/gtksourceview/gtksourcecompletioncontext.h b/gtksourceview/gtksourcecompletioncontext.h
index 42b7ffa..053704d 100644
--- a/gtksourceview/gtksourcecompletioncontext.h
+++ b/gtksourceview/gtksourcecompletioncontext.h
@@ -55,7 +55,7 @@ typedef struct _GtkSourceCompletionContextPrivate GtkSourceCompletionContextPriv
* By default, it occurs when the user presses
* <keycombo><keycap>Control</keycap><keycap>space</keycap></keycombo>.
*/
-typedef enum
+typedef enum _GtkSourceCompletionActivation
{
GTK_SOURCE_COMPLETION_ACTIVATION_NONE = 0,
GTK_SOURCE_COMPLETION_ACTIVATION_INTERACTIVE = 1 << 0,
diff --git a/gtksourceview/gtksourcecontextengine.c b/gtksourceview/gtksourcecontextengine.c
index e77f3ae..a316b17 100644
--- a/gtksourceview/gtksourcecontextengine.c
+++ b/gtksourceview/gtksourcecontextengine.c
@@ -134,7 +134,7 @@ typedef struct _LineInfo LineInfo;
typedef struct _InvalidRegion InvalidRegion;
typedef struct _ContextClassTag ContextClassTag;
-typedef enum {
+typedef enum _GtkSourceContextEngineError {
GTK_SOURCE_CONTEXT_ENGINE_ERROR_DUPLICATED_ID = 0,
GTK_SOURCE_CONTEXT_ENGINE_ERROR_INVALID_ARGS,
GTK_SOURCE_CONTEXT_ENGINE_ERROR_INVALID_PARENT,
@@ -145,12 +145,12 @@ typedef enum {
GTK_SOURCE_CONTEXT_ENGINE_ERROR_BAD_FILE
} GtkSourceContextEngineError;
-typedef enum {
+typedef enum _ContextType {
CONTEXT_TYPE_SIMPLE = 0,
CONTEXT_TYPE_CONTAINER
} ContextType;
-typedef enum {
+typedef enum _SubPatternWhere {
SUB_PATTERN_WHERE_DEFAULT = 0,
SUB_PATTERN_WHERE_START,
SUB_PATTERN_WHERE_END
diff --git a/gtksourceview/gtksourcecontextengine.h b/gtksourceview/gtksourcecontextengine.h
index 2394ff3..cb7e85b 100644
--- a/gtksourceview/gtksourcecontextengine.h
+++ b/gtksourceview/gtksourcecontextengine.h
@@ -55,7 +55,7 @@ struct _GtkSourceContextEngineClass
GObjectClass parent_class;
};
-typedef enum {
+typedef enum _GtkSourceContextFlags {
GTK_SOURCE_CONTEXT_EXTEND_PARENT = 1 << 0,
GTK_SOURCE_CONTEXT_END_PARENT = 1 << 1,
GTK_SOURCE_CONTEXT_END_AT_LINE_END = 1 << 2,
@@ -64,7 +64,7 @@ typedef enum {
GTK_SOURCE_CONTEXT_STYLE_INSIDE = 1 << 5
} GtkSourceContextFlags;
-typedef enum {
+typedef enum _GtkSourceContextRefOptions {
GTK_SOURCE_CONTEXT_IGNORE_STYLE = 1 << 0,
GTK_SOURCE_CONTEXT_OVERRIDE_STYLE = 1 << 1,
GTK_SOURCE_CONTEXT_REF_ORIGINAL = 1 << 2
diff --git a/gtksourceview/gtksourceencoding.c b/gtksourceview/gtksourceencoding.c
index a9c5982..29e41ae 100644
--- a/gtksourceview/gtksourceencoding.c
+++ b/gtksourceview/gtksourceencoding.c
@@ -56,7 +56,7 @@ G_DEFINE_BOXED_TYPE (GtkSourceEncoding, gtk_source_encoding,
* Copyright (C) 2002 Red Hat, Inc.
*/
-typedef enum
+typedef enum _GtkSourceEncodingIndex
{
GTK_SOURCE_ENCODING_ISO_8859_1,
GTK_SOURCE_ENCODING_ISO_8859_2,
diff --git a/gtksourceview/gtksourcefileloader.h b/gtksourceview/gtksourcefileloader.h
index ad2c08a..a710523 100644
--- a/gtksourceview/gtksourcefileloader.h
+++ b/gtksourceview/gtksourcefileloader.h
@@ -60,7 +60,7 @@ typedef struct _GtkSourceFileLoaderPrivate GtkSourceFileLoaderPrivate;
*
* An error code used with the %GTK_SOURCE_FILE_LOADER_ERROR domain.
*/
-typedef enum
+typedef enum _GtkSourceFileLoaderError
{
GTK_SOURCE_FILE_LOADER_ERROR_TOO_BIG,
GTK_SOURCE_FILE_LOADER_ERROR_ENCODING_AUTO_DETECTION_FAILED,
diff --git a/gtksourceview/gtksourcefilesaver.h b/gtksourceview/gtksourcefilesaver.h
index 01b8d37..fac8904 100644
--- a/gtksourceview/gtksourcefilesaver.h
+++ b/gtksourceview/gtksourcefilesaver.h
@@ -60,7 +60,7 @@ typedef struct _GtkSourceFileSaverPrivate GtkSourceFileSaverPrivate;
* An error code used with the %GTK_SOURCE_FILE_SAVER_ERROR domain.
* Since: 3.14
*/
-typedef enum
+typedef enum _GtkSourceFileSaverError
{
GTK_SOURCE_FILE_SAVER_ERROR_INVALID_CHARS,
GTK_SOURCE_FILE_SAVER_ERROR_EXTERNALLY_MODIFIED
@@ -76,7 +76,7 @@ typedef enum
* Flags to define the behavior of a #GtkSourceFileSaver.
* Since: 3.14
*/
-typedef enum
+typedef enum _GtkSourceFileSaverFlags
{
GTK_SOURCE_FILE_SAVER_FLAGS_NONE = 0,
GTK_SOURCE_FILE_SAVER_FLAGS_IGNORE_INVALID_CHARS = 1 << 0,
diff --git a/gtksourceview/gtksourcegutterrenderer.h b/gtksourceview/gtksourcegutterrenderer.h
index 5169303..12454fe 100644
--- a/gtksourceview/gtksourcegutterrenderer.h
+++ b/gtksourceview/gtksourcegutterrenderer.h
@@ -56,7 +56,7 @@ typedef struct _GtkSourceGutterRendererPrivate GtkSourceGutterRendererPrivate;
* @GTK_SOURCE_GUTTER_RENDERER_STATE_SELECTED: area in the renderer represents
* a line in the buffer which contains part of the selection
**/
-typedef enum
+typedef enum _GtkSourceGutterRendererState
{
GTK_SOURCE_GUTTER_RENDERER_STATE_NORMAL = 0,
GTK_SOURCE_GUTTER_RENDERER_STATE_CURSOR = 1 << 0,
@@ -73,7 +73,7 @@ typedef enum
* The alignment mode of the renderer, when a cell spans multiple lines (due to
* text wrapping).
**/
-typedef enum
+typedef enum _GtkSourceGutterRendererAlignmentMode
{
GTK_SOURCE_GUTTER_RENDERER_ALIGNMENT_MODE_CELL,
GTK_SOURCE_GUTTER_RENDERER_ALIGNMENT_MODE_FIRST,
diff --git a/gtksourceview/gtksourcelanguage-parser-2.c b/gtksourceview/gtksourcelanguage-parser-2.c
index 90510fe..fc033e6 100644
--- a/gtksourceview/gtksourcelanguage-parser-2.c
+++ b/gtksourceview/gtksourcelanguage-parser-2.c
@@ -55,7 +55,7 @@
#define PARSER_ERROR (parser_error_quark ())
#define ATTR_NO_STYLE ""
-typedef enum {
+typedef enum _ParserError {
PARSER_ERROR_CANNOT_OPEN = 0,
PARSER_ERROR_CANNOT_VALIDATE,
PARSER_ERROR_INVALID_DOC,
diff --git a/gtksourceview/gtksourcepixbufhelper.c b/gtksourceview/gtksourcepixbufhelper.c
index 57e4a10..7a76d11 100644
--- a/gtksourceview/gtksourcepixbufhelper.c
+++ b/gtksourceview/gtksourcepixbufhelper.c
@@ -21,7 +21,7 @@
#include "gtksourcepixbufhelper.h"
-typedef enum
+typedef enum _IconType
{
ICON_TYPE_PIXBUF,
ICON_TYPE_STOCK,
diff --git a/gtksourceview/gtksourceprintcompositor.c b/gtksourceview/gtksourceprintcompositor.c
index f3b4d1c..dcb3a15 100644
--- a/gtksourceview/gtksourceprintcompositor.c
+++ b/gtksourceview/gtksourceprintcompositor.c
@@ -91,7 +91,7 @@ static GTimer *pagination_timer = NULL;
/* Number of pages paginated on each invocation of the paginate() method. */
#define PAGINATION_CHUNK_SIZE 3
-typedef enum
+typedef enum _PaginatorState
{
/* Initial state: properties can be changed only when the paginator
is in the INIT state */
diff --git a/gtksourceview/gtksourcetypes.h b/gtksourceview/gtksourcetypes.h
index 28277c2..fd2fc4d 100644
--- a/gtksourceview/gtksourcetypes.h
+++ b/gtksourceview/gtksourcetypes.h
@@ -73,7 +73,7 @@ typedef struct _GtkSourceView GtkSourceView;
*
* Since: 3.14
*/
-typedef enum
+typedef enum _GtkSourceNewlineType
{
GTK_SOURCE_NEWLINE_TYPE_LF,
GTK_SOURCE_NEWLINE_TYPE_CR,
@@ -100,7 +100,7 @@ typedef enum
*
* Since: 3.14
*/
-typedef enum
+typedef enum _GtkSourceCompressionType
{
GTK_SOURCE_COMPRESSION_TYPE_NONE,
GTK_SOURCE_COMPRESSION_TYPE_GZIP
@@ -113,7 +113,7 @@ typedef enum
*
* Since: 3.16
*/
-typedef enum
+typedef enum _GtkSourceBackgroundPatternType
{
GTK_SOURCE_BACKGROUND_PATTERN_TYPE_NONE,
GTK_SOURCE_BACKGROUND_PATTERN_TYPE_GRID
diff --git a/gtksourceview/gtksourceundomanagerdefault.c b/gtksourceview/gtksourceundomanagerdefault.c
index c870967..36a1cf3 100644
--- a/gtksourceview/gtksourceundomanagerdefault.c
+++ b/gtksourceview/gtksourceundomanagerdefault.c
@@ -33,7 +33,7 @@
typedef struct _Action Action;
typedef struct _ActionGroup ActionGroup;
-typedef enum
+typedef enum _ActionType
{
ACTION_TYPE_INSERT,
ACTION_TYPE_DELETE
@@ -44,7 +44,7 @@ typedef enum
* events on the GtkSourceView widget, which is more complicated than simply
* listening to the insert-text and delete-range GtkTextBuffer signals.
*/
-typedef enum
+typedef enum _DeletionType
{
DELETION_TYPE_SELECTION_DELETED,
DELETION_TYPE_BACKSPACE_KEY,
diff --git a/gtksourceview/gtksourceview.c b/gtksourceview/gtksourceview.c
index a4fffed..12d8087 100644
--- a/gtksourceview/gtksourceview.c
+++ b/gtksourceview/gtksourceview.c
@@ -223,7 +223,7 @@ G_DEFINE_TYPE_WITH_CODE (GtkSourceView, gtk_source_view, GTK_TYPE_TEXT_VIEW,
gtk_source_view_buildable_interface_init))
/* Implement DnD for application/x-color drops */
-typedef enum {
+typedef enum _GtkSourceViewDropTypes {
TARGET_COLOR = 200
} GtkSourceViewDropTypes;
diff --git a/gtksourceview/gtksourceview.h b/gtksourceview/gtksourceview.h
index 045c022..30f6ebe 100644
--- a/gtksourceview/gtksourceview.h
+++ b/gtksourceview/gtksourceview.h
@@ -54,7 +54,7 @@ typedef struct _GtkSourceViewPrivate GtkSourceViewPrivate;
* @GTK_SOURCE_VIEW_GUTTER_POSITION_MARKS: the gutter position of the marks
* renderer
*/
-typedef enum
+typedef enum _GtkSourceViewGutterPosition
{
GTK_SOURCE_VIEW_GUTTER_POSITION_LINES = -30,
GTK_SOURCE_VIEW_GUTTER_POSITION_MARKS = -20
@@ -72,7 +72,7 @@ typedef enum
* @GTK_SOURCE_SMART_HOME_END_ALWAYS: always move to the first/last
* non-whitespace character when the HOME/END keys are pressed.
*/
-typedef enum
+typedef enum _GtkSourceSmartHomeEndType
{
GTK_SOURCE_SMART_HOME_END_DISABLED,
GTK_SOURCE_SMART_HOME_END_BEFORE,
@@ -96,7 +96,7 @@ typedef enum
* GTK_SOURCE_DRAW_SPACES_TRAILING is specified, whitespaces at any position in
* the line will be drawn (i.e. it has the same effect as specifying all of them).
*/
-typedef enum
+typedef enum _GtkSourceDrawSpacesFlags
{
GTK_SOURCE_DRAW_SPACES_SPACE = 1 << 0,
GTK_SOURCE_DRAW_SPACES_TAB = 1 << 1,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]