Seal GtkEntry

svn path=/trunk/; revision=20534
This commit is contained in:
Tim Janik
2008-06-20 11:01:56 +00:00
parent 66e81271ac
commit 49b07b9460
2 changed files with 145 additions and 42 deletions

View File

@ -56,61 +56,62 @@ struct _GtkEntry
{
GtkWidget widget;
gchar *text;
gchar *GSEAL (text);
guint editable : 1;
guint visible : 1;
guint overwrite_mode : 1;
guint in_drag : 1; /* Dragging within the selection */
guint GSEAL (editable) : 1;
guint GSEAL (visible) : 1;
guint GSEAL (overwrite_mode) : 1;
guint GSEAL (in_drag) : 1; /* FIXME: Should be private?
Dragging within the selection */
guint16 text_length; /* length in use, in chars */
guint16 text_max_length;
guint16 GSEAL (text_length); /* length in use, in chars */
guint16 GSEAL (text_max_length);
/*< private >*/
GdkWindow *text_area;
GtkIMContext *im_context;
GtkWidget *popup_menu;
GdkWindow *GSEAL (text_area);
GtkIMContext *GSEAL (im_context);
GtkWidget *GSEAL (popup_menu);
gint current_pos;
gint selection_bound;
gint GSEAL (current_pos);
gint GSEAL (selection_bound);
PangoLayout *cached_layout;
PangoLayout *GSEAL (cached_layout);
guint cache_includes_preedit : 1;
guint need_im_reset : 1;
guint has_frame : 1;
guint activates_default : 1;
guint cursor_visible : 1;
guint in_click : 1; /* Flag so we don't select all when clicking in entry to focus in */
guint is_cell_renderer : 1;
guint editing_canceled : 1; /* Only used by GtkCellRendererText */
guint mouse_cursor_obscured : 1;
guint select_words : 1;
guint select_lines : 1;
guint resolved_dir : 4; /* PangoDirection */
guint truncate_multiline : 1;
guint GSEAL (cache_includes_preedit) : 1;
guint GSEAL (need_im_reset) : 1;
guint GSEAL (has_frame) : 1;
guint GSEAL (activates_default) : 1;
guint GSEAL (cursor_visible) : 1;
guint GSEAL (in_click) : 1; /* Flag so we don't select all when clicking in entry to focus in */
guint GSEAL (is_cell_renderer) : 1;
guint GSEAL (editing_canceled) : 1; /* Only used by GtkCellRendererText */
guint GSEAL (mouse_cursor_obscured) : 1;
guint GSEAL (select_words) : 1;
guint GSEAL (select_lines) : 1;
guint GSEAL (resolved_dir) : 4; /* PangoDirection */
guint GSEAL (truncate_multiline) : 1;
guint button;
guint blink_timeout;
guint recompute_idle;
gint scroll_offset;
gint ascent; /* font ascent, in pango units */
gint descent; /* font descent, in pango units */
guint GSEAL (button);
guint GSEAL (blink_timeout);
guint GSEAL (recompute_idle);
gint GSEAL (scroll_offset);
gint GSEAL (ascent); /* font ascent in pango units */
gint GSEAL (descent); /* font descent in pango units */
guint16 text_size; /* allocated size, in bytes */
guint16 n_bytes; /* length in use, in bytes */
guint16 GSEAL (text_size); /* allocated size, in bytes */
guint16 GSEAL (n_bytes); /* length in use, in bytes */
guint16 preedit_length; /* length of preedit string, in bytes */
guint16 preedit_cursor; /* offset of cursor within preedit string, in chars */
guint16 GSEAL (preedit_length); /* length of preedit string, in bytes */
guint16 GSEAL (preedit_cursor); /* offset of cursor within preedit string, in chars */
gint dnd_position; /* In chars, -1 == no DND cursor */
gint GSEAL (dnd_position); /* In chars, -1 == no DND cursor */
gint drag_start_x;
gint drag_start_y;
gint GSEAL (drag_start_x);
gint GSEAL (drag_start_y);
gunichar invisible_char;
gunichar GSEAL (invisible_char);
gint width_chars;
gint GSEAL (width_chars);
};
struct _GtkEntryClass
@ -165,10 +166,14 @@ gboolean gtk_entry_get_has_frame (GtkEntry *entry);
void gtk_entry_set_inner_border (GtkEntry *entry,
const GtkBorder *border);
G_CONST_RETURN GtkBorder* gtk_entry_get_inner_border (GtkEntry *entry);
void gtk_entry_set_overwrite_mode (GtkEntry *entry,
gboolean overwrite);
gboolean gtk_entry_get_overwrite_mode (GtkEntry *entry);
/* text is truncated if needed */
void gtk_entry_set_max_length (GtkEntry *entry,
gint max);
gint gtk_entry_get_max_length (GtkEntry *entry);
guint16 gtk_entry_get_text_length (GtkEntry *entry);
void gtk_entry_set_activates_default (GtkEntry *entry,
gboolean setting);
gboolean gtk_entry_get_activates_default (GtkEntry *entry);