Hi again,
For sure you should probably use:
g_signal_connect_after(your_text_buffer, "changed",
G_CALLBACK(your_text_buffer_changed_callback), your_data);
and YOUR_DATA(your_data) just casts to your pointer to a struct or
object containing some information:
struct _YourData{
gint last_newli
Hi,
g_object_get(your_text_view,
"buffer", &your_text_buffer,
NULL);
g_signal_connect(your_text_buffer, "changed",
G_CALLBACK(your_text_buffer_changed_callback), your_data);
void your_text_buffer_changed_callback(GtkTextBuffer
*your_text_buffer, gpointer your_data)
{
gint line_count;
l
Eric, thanks for the ideas!
I tried a bunch of things to distinguish the callbacks, but it got too
complicated. Checking for a different line number is a clever idea, but
PgUp and PgDown also move the cursor which changes the line number.
Similar problems for tracking the char offset in the line
Hi Doug,
Try getting the vertical adjustment of the scrolled window and connect to
"value-changed". See if that will work. Something like
...
static void value_changed(GtkAdjustment *v_adjust, gpointer user_data)
{
}
...
GtkWidget *scroll=gtk_scrolled_window_new(NULL, NULL);
GtkAdjustment