[gtksourceview/wip/new-space-drawing-api: 6/6] New API to draw whitespaces, with two enums (space types vs locations)



commit b14b35e0f1127a223123bea64bf367f60306dc58
Author: Sébastien Wilmet <swilmet gnome org>
Date:   Sat Jul 23 17:37:25 2016 +0200

    New API to draw whitespaces, with two enums (space types vs locations)
    
    https://bugzilla.gnome.org/show_bug.cgi?id=683678

 gtksourceview/gtksourceview.h |   48 +++++++++++++++++++++++++++++++++++++++++
 1 files changed, 48 insertions(+), 0 deletions(-)
---
diff --git a/gtksourceview/gtksourceview.h b/gtksourceview/gtksourceview.h
index 55265ec..3ff9bae 100644
--- a/gtksourceview/gtksourceview.h
+++ b/gtksourceview/gtksourceview.h
@@ -111,6 +111,54 @@ typedef enum _GtkSourceDrawSpacesFlags
 } GtkSourceDrawSpacesFlags;
 
 /**
+ * GtkSourceSpaceTypeFlags:
+ * @GTK_SOURCE_SPACE_TYPE_NONE: No flags.
+ * @GTK_SOURCE_SPACE_TYPE_SPACE: Space character.
+ * @GTK_SOURCE_SPACE_TYPE_TAB: Tab character.
+ * @GTK_SOURCE_SPACE_TYPE_NEWLINE: Line break character.
+ * @GTK_SOURCE_SPACE_TYPE_NBSP: Non-breaking space character.
+ * @GTK_SOURCE_SPACE_TYPE_ALL: All whitespaces.
+ *
+ * #GtkSourceSpaceTypeFlags contains flags for whitespace types.
+ *
+ * Since: 3.24
+ */
+typedef enum _GtkSourceSpaceTypeFlags
+{
+       GTK_SOURCE_SPACE_TYPE_NONE      = 0,
+       GTK_SOURCE_SPACE_TYPE_SPACE     = 1 << 0,
+       GTK_SOURCE_SPACE_TYPE_TAB       = 1 << 1,
+       GTK_SOURCE_SPACE_TYPE_NEWLINE   = 1 << 2,
+       GTK_SOURCE_SPACE_TYPE_NBSP      = 1 << 3,
+       GTK_SOURCE_SPACE_TYPE_ALL       = 0xff
+} GtkSourceSpaceTypeFlags;
+
+/**
+ * GtkSourceSpaceLocationFlags:
+ * @GTK_SOURCE_SPACE_LOCATION_NONE: No flags.
+ * @GTK_SOURCE_SPACE_LOCATION_LEADING: Leading whitespaces on a line, i.e. the
+ *   indentation.
+ * @GTK_SOURCE_SPACE_LOCATION_INSIDE_TEXT: Whitespaces inside a line of text.
+ * @GTK_SOURCE_SPACE_LOCATION_TRAILING: Trailing whitespaces on a line.
+ * @GTK_SOURCE_SPACE_LOCATION_ALL: Whitespaces anywhere.
+ *
+ * #GtkSourceSpaceLocationFlags contains flags for whitespace locations.
+ *
+ * If a line contains only whitespaces (no text), the whitespaces match both
+ * %GTK_SOURCE_SPACE_LOCATION_LEADING and %GTK_SOURCE_SPACE_LOCATION_TRAILING.
+ *
+ * Since: 3.24
+ */
+typedef enum _GtkSourceSpaceLocationFlags
+{
+       GTK_SOURCE_SPACE_LOCATION_NONE          = 0,
+       GTK_SOURCE_SPACE_LOCATION_LEADING       = 1 << 0,
+       GTK_SOURCE_SPACE_LOCATION_INSIDE_TEXT   = 1 << 1,
+       GTK_SOURCE_SPACE_LOCATION_TRAILING      = 1 << 2,
+       GTK_SOURCE_SPACE_LOCATION_ALL           = 0xff
+} GtkSourceSpaceLocationFlags;
+
+/**
  * GtkSourceBackgroundPatternType:
  * @GTK_SOURCE_BACKGROUND_PATTERN_TYPE_NONE: no pattern
  * @GTK_SOURCE_BACKGROUND_PATTERN_TYPE_GRID: grid pattern


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]