mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-12-28 06:21:14 +00:00
entry: Delegate to GtkText
Use a GtkText child, and delegate the editable functionality to it. Also forward all the properties that are provided by GtkText. Some of the more internal APIs, such as layout and im context access and caps-lock warning, are removed here, but we preserve most of the plain GtkEntry API by forwarding it to the GtkText child.
This commit is contained in:
parent
936181f354
commit
45fb1d06e3
@ -942,10 +942,6 @@ gtk_entry_set_placeholder_text
|
||||
gtk_entry_get_placeholder_text
|
||||
gtk_entry_set_overwrite_mode
|
||||
gtk_entry_get_overwrite_mode
|
||||
gtk_entry_get_layout
|
||||
gtk_entry_get_layout_offsets
|
||||
gtk_entry_layout_index_to_text_index
|
||||
gtk_entry_text_index_to_layout_index
|
||||
gtk_entry_set_attributes
|
||||
gtk_entry_get_attributes
|
||||
gtk_entry_set_completion
|
||||
@ -955,7 +951,6 @@ gtk_entry_get_progress_fraction
|
||||
gtk_entry_set_progress_pulse_step
|
||||
gtk_entry_get_progress_pulse_step
|
||||
gtk_entry_progress_pulse
|
||||
gtk_entry_im_context_filter_keypress
|
||||
gtk_entry_reset_im_context
|
||||
gtk_entry_set_tabs
|
||||
gtk_entry_get_tabs
|
||||
|
6199
gtk/gtkentry.c
6199
gtk/gtkentry.c
File diff suppressed because it is too large
Load Diff
@ -115,28 +115,9 @@ struct _GtkEntryClass
|
||||
{
|
||||
GtkWidgetClass parent_class;
|
||||
|
||||
/* Hook to customize right-click popup */
|
||||
void (* populate_popup) (GtkEntry *entry,
|
||||
GtkWidget *popup);
|
||||
|
||||
/* Action signals
|
||||
*/
|
||||
void (* activate) (GtkEntry *entry);
|
||||
void (* move_cursor) (GtkEntry *entry,
|
||||
GtkMovementStep step,
|
||||
gint count,
|
||||
gboolean extend_selection);
|
||||
void (* insert_at_cursor) (GtkEntry *entry,
|
||||
const gchar *str);
|
||||
void (* delete_from_cursor) (GtkEntry *entry,
|
||||
GtkDeleteType type,
|
||||
gint count);
|
||||
void (* backspace) (GtkEntry *entry);
|
||||
void (* cut_clipboard) (GtkEntry *entry);
|
||||
void (* copy_clipboard) (GtkEntry *entry);
|
||||
void (* paste_clipboard) (GtkEntry *entry);
|
||||
void (* toggle_overwrite) (GtkEntry *entry);
|
||||
void (* insert_emoji) (GtkEntry *entry);
|
||||
|
||||
/*< private >*/
|
||||
|
||||
@ -224,12 +205,6 @@ void gtk_entry_set_text (GtkEntry *entry,
|
||||
GDK_AVAILABLE_IN_ALL
|
||||
const gchar* gtk_entry_get_text (GtkEntry *entry);
|
||||
|
||||
GDK_AVAILABLE_IN_ALL
|
||||
PangoLayout* gtk_entry_get_layout (GtkEntry *entry);
|
||||
GDK_AVAILABLE_IN_ALL
|
||||
void gtk_entry_get_layout_offsets (GtkEntry *entry,
|
||||
gint *x,
|
||||
gint *y);
|
||||
GDK_AVAILABLE_IN_ALL
|
||||
void gtk_entry_set_alignment (GtkEntry *entry,
|
||||
gfloat xalign);
|
||||
@ -242,13 +217,6 @@ void gtk_entry_set_completion (GtkEntry *entry,
|
||||
GDK_AVAILABLE_IN_ALL
|
||||
GtkEntryCompletion *gtk_entry_get_completion (GtkEntry *entry);
|
||||
|
||||
GDK_AVAILABLE_IN_ALL
|
||||
gint gtk_entry_layout_index_to_text_index (GtkEntry *entry,
|
||||
gint layout_index);
|
||||
GDK_AVAILABLE_IN_ALL
|
||||
gint gtk_entry_text_index_to_layout_index (GtkEntry *entry,
|
||||
gint text_index);
|
||||
|
||||
/* Progress API
|
||||
*/
|
||||
GDK_AVAILABLE_IN_ALL
|
||||
@ -341,9 +309,6 @@ void gtk_entry_get_icon_area (GtkEntry *
|
||||
GdkRectangle *icon_area);
|
||||
|
||||
GDK_AVAILABLE_IN_ALL
|
||||
gboolean gtk_entry_im_context_filter_keypress (GtkEntry *entry,
|
||||
GdkEventKey *event);
|
||||
GDK_AVAILABLE_IN_ALL
|
||||
void gtk_entry_reset_im_context (GtkEntry *entry);
|
||||
|
||||
GDK_AVAILABLE_IN_ALL
|
||||
|
@ -26,6 +26,7 @@
|
||||
#include "gtktreemodelfilter.h"
|
||||
#include "gtktreeviewcolumn.h"
|
||||
#include "gtkeventcontrollerkey.h"
|
||||
#include "gtktextprivate.h"
|
||||
|
||||
G_BEGIN_DECLS
|
||||
|
||||
@ -84,17 +85,12 @@ void _gtk_entry_completion_connect (GtkEntryCompletion *completion,
|
||||
GtkEntry *entry);
|
||||
void _gtk_entry_completion_disconnect (GtkEntryCompletion *completion);
|
||||
|
||||
gchar* _gtk_entry_get_display_text (GtkEntry *entry,
|
||||
gint start_pos,
|
||||
gint end_pos);
|
||||
GtkIMContext* _gtk_entry_get_im_context (GtkEntry *entry);
|
||||
void gtk_entry_enter_text (GtkEntry *entry,
|
||||
const char *text);
|
||||
void gtk_entry_set_positions (GtkEntry *entry,
|
||||
int current_pos,
|
||||
int selection_bound);
|
||||
|
||||
GtkEventController * gtk_entry_get_key_controller (GtkEntry *entry);
|
||||
GtkText *gtk_entry_get_text_widget (GtkEntry *entry);
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user