| Top |
| void | gtk_source_gutter_lines_add_class () |
| void | gtk_source_gutter_lines_add_qclass () |
| GtkTextBuffer * | gtk_source_gutter_lines_get_buffer () |
| guint | gtk_source_gutter_lines_get_first () |
| void | gtk_source_gutter_lines_get_iter_at_line () |
| guint | gtk_source_gutter_lines_get_last () |
| void | gtk_source_gutter_lines_get_line_yrange () |
| GtkTextView * | gtk_source_gutter_lines_get_view () |
| void | gtk_source_gutter_lines_get_yrange () |
| gboolean | gtk_source_gutter_lines_has_class () |
| gboolean | gtk_source_gutter_lines_has_qclass () |
| gboolean | gtk_source_gutter_lines_is_cursor () |
| gboolean | gtk_source_gutter_lines_is_prelit () |
| gboolean | gtk_source_gutter_lines_is_selected () |
| void | gtk_source_gutter_lines_remove_class () |
| void | gtk_source_gutter_lines_remove_qclass () |
The GtkSourceGutterLines object is used to collect information about visible lines.
Use this from your “query-data” to collect the necessary information on visible lines. Doing so reduces the number of passes through the text btree allowing GtkSourceView to reach more frames-per-second while performing kinetic scrolling.
void gtk_source_gutter_lines_add_class (GtkSourceGutterLines *lines,guint line,const gchar *name);
Adds the class name
to line
.
name
will be converted to a GQuark as part of this process. A
faster version of this function is available via
gtk_source_gutter_lines_add_qclass() for situations where the GQuark is
known ahead of time.
Since: 5.0
void gtk_source_gutter_lines_add_qclass (GtkSourceGutterLines *lines,guint line,GQuark qname);
Adds the class denoted by qname
to line
.
You may check if a line has qname
by calling
gtk_source_gutter_lines_has_qclass().
You can remove qname
by calling
gtk_source_gutter_lines_remove_qclass().
Since: 5.0
GtkTextBuffer *
gtk_source_gutter_lines_get_buffer (GtkSourceGutterLines *lines);
Gets the GtkTextBuffer that the GtkSourceGutterLines represents.
Since: 5.0
guint
gtk_source_gutter_lines_get_first (GtkSourceGutterLines *lines);
Gets the line number (starting from 0) for the first line that is user visible.
Since: 5.0
void gtk_source_gutter_lines_get_iter_at_line (GtkSourceGutterLines *lines,GtkTextIter *iter,guint line);
Gets a GtkTextIter for the current buffer at line
Since: 5.0
guint
gtk_source_gutter_lines_get_last (GtkSourceGutterLines *lines);
Gets the line number (starting from 0) for the last line that is user visible.
Since: 5.0
void gtk_source_gutter_lines_get_line_yrange (GtkSourceGutterLines *lines,guint line,GtkSourceGutterRendererAlignmentMode mode,gint *y,gint *height);
Gets the Y range for a line based on mode
.
The value for y
is relative to the renderers widget coordinates.
lines |
||
line |
a line number starting from zero |
|
mode |
||
y |
a location for the Y position in widget coordinates. |
[out] |
height |
the line height based on |
[out] |
Since: 5.0
GtkTextView *
gtk_source_gutter_lines_get_view (GtkSourceGutterLines *lines);
Gets the GtkTextView that the GtkSourceGutterLines represents.
Since: 5.0
void gtk_source_gutter_lines_get_yrange (GtkSourceGutterLines *lines,guint line,guint *line_y,guint *line_height);
gboolean gtk_source_gutter_lines_has_class (GtkSourceGutterLines *lines,guint line,const gchar *name);
Checks to see if gtk_source_gutter_lines_add_class() was called with
the name
for line
.
A faster version of this function is provided via
gtk_source_gutter_lines_has_qclass() for situations where the quark
is known ahead of time.
lines |
||
line |
a line number starting from zero |
|
name |
a class name that may be converted, to a GQuark |
Since: 5.0
gboolean gtk_source_gutter_lines_has_qclass (GtkSourceGutterLines *lines,guint line,GQuark qname);
Checks to see if gtk_source_gutter_lines_add_qclass() was called with
the quark denoted by qname
for line
.
Since: 5.0
gboolean gtk_source_gutter_lines_is_cursor (GtkSourceGutterLines *lines,guint line);
Checks to see if line
contains the insertion cursor.
Since: 5.0
gboolean gtk_source_gutter_lines_is_prelit (GtkSourceGutterLines *lines,guint line);
Checks to see if line
is marked as prelit. Generally, this means
the mouse pointer is over the line within the gutter.
Since: 5.0
gboolean gtk_source_gutter_lines_is_selected (GtkSourceGutterLines *lines,guint line);
Checks to see if the view had a selection and if that selection overlaps
line
in some way.
Since: 5.0
void gtk_source_gutter_lines_remove_class (GtkSourceGutterLines *lines,guint line,const gchar *name);
Removes the class matching name
from line
.
A faster version of this function is available via
gtk_source_gutter_lines_remove_qclass() for situations where the
GQuark is known ahead of time.
Since: 5.0
void gtk_source_gutter_lines_remove_qclass (GtkSourceGutterLines *lines,guint line,GQuark qname);
Reverses a call to gtk_source_gutter_lines_add_qclass() by removing
the GQuark matching qname
.
Since: 5.0