mirror of
https://github.com/ZoiteChat/zoitechat.git
synced 2026-03-12 16:50:19 +00:00
Add marker-line functionality for scrollback, instant seek.
Fixes #662.
This commit is contained in:
@@ -68,6 +68,14 @@ typedef union offsets_u {
|
||||
guint32 u;
|
||||
} offsets_t;
|
||||
|
||||
typedef enum marker_reset_reason_e {
|
||||
MARKER_WAS_NEVER_SET,
|
||||
MARKER_IS_SET,
|
||||
MARKER_RESET_MANUALLY,
|
||||
MARKER_RESET_BY_KILL,
|
||||
MARKER_RESET_BY_CLEAR
|
||||
} marker_reset_reason;
|
||||
|
||||
typedef struct {
|
||||
GtkXText *xtext; /* attached to this widget */
|
||||
|
||||
@@ -90,6 +98,7 @@ typedef struct {
|
||||
int indent; /* position of separator (pixels) from left */
|
||||
|
||||
textentry *marker_pos;
|
||||
marker_reset_reason marker_state;
|
||||
|
||||
int window_width; /* window size when last rendered. */
|
||||
int window_height;
|
||||
@@ -98,7 +107,6 @@ typedef struct {
|
||||
unsigned int scrollbar_down:1;
|
||||
unsigned int needs_recalc:1;
|
||||
unsigned int marker_seen:1;
|
||||
unsigned int reset_marker_pos:1;
|
||||
|
||||
GList *search_found; /* list of textentries where search found strings */
|
||||
gchar *search_text; /* desired text to search for */
|
||||
@@ -257,7 +265,9 @@ void gtk_xtext_refresh (GtkXText * xtext);
|
||||
int gtk_xtext_lastlog (xtext_buffer *out, xtext_buffer *search_area);
|
||||
textentry *gtk_xtext_search (GtkXText * xtext, const gchar *text, gtk_xtext_search_flags flags, GError **err);
|
||||
void gtk_xtext_reset_marker_pos (GtkXText *xtext);
|
||||
int gtk_xtext_moveto_marker_pos (GtkXText *xtext);
|
||||
void gtk_xtext_check_marker_visibility(GtkXText *xtext);
|
||||
void gtk_xtext_set_marker_last (session *sess);
|
||||
|
||||
gboolean gtk_xtext_is_empty (xtext_buffer *buf);
|
||||
typedef void (*GtkXTextForeach) (GtkXText *xtext, unsigned char *text, void *data);
|
||||
|
||||
Reference in New Issue
Block a user