GtkEntry blinking cursor patch



Hi,
Here are a couple of patches that add blinking cursor support to the GtkEntry.
One is for gtkentry.h and other for gtkentry.c

I dont know if this is the best way to do it but it does works.

Added 3 new members to the GtkEntry struct:
GTimer   *blink    /* The timer for the blinking */
gint         blink_to  /* The timeout for the blinking */
gboolean show_cursor /* wheather to show the cursor or not */

Also added some new functions:
gtk_entry_cursor_blink                /* Set as the entry->blink_to GSourceFunc */
gtk_entry_cursor_start_blink       /* Starts to blink, called by focus_in */
gtk_entry_cursor_stop_blink       /* Stopt the blink, called by focus_out */
gtk_entry_cursor_reset_blink      /* Resets blink, called by gtk_entry_key_press and button_press */

Also modified gtk_entry_draw_cursor_on_drawable, *realize and *init.

Regards,
Matias Mutchinick





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