Commit cc223eef authored by Owen Taylor's avatar Owen Taylor Committed by Owen Taylor

Fix stupid error introduced last night that was making things decidedly

Sun Jun 24 11:29:35 2001  Owen Taylor  <otaylor@redhat.com>

	* gdk/x11/gdkimage-x11.c (gdk_image_new): Fix stupid error
	introduced last night that was making things decidedly not work.

	* gtk/*.[ch]: Patch from Kristian Rietveld adding 80 getters
	so that we have getter/setter pairing everywhere it makes
	sense. (#55767)

	* gtk/gtkradiobutton.[ch] gtk/gtktoolbar.c tests/testgtk.:
	Rename gtk_radio_button_group to gtk_radio_button_get_group, add a
	deprecated compat macro. (#55516)

	* gtk/gtklabel.[ch]: Add functions
	gtk_label_set/get_use_underline(), gtk_label_set/get_use_markup(),
	gtk_label_set_label(), which mirror the property API for GtkLabel.
	Make gtk_label_get_attributes() only reflect the attributes
	set by gtk_label_set_attributes.

	* gtk/gtknotebook.c (gtk_notebook_set_current_page) gtk/gtkcompat.h: Rename
	from gtk_notebook_set_page().
parent 5a5580a8
Sun Jun 24 11:29:35 2001 Owen Taylor <otaylor@redhat.com>
* gdk/x11/gdkimage-x11.c (gdk_image_new): Fix stupid error
introduced last night that was making things decidedly not work.
* gtk/*.[ch]: Patch from Kristian Rietveld adding 80 getters
so that we have getter/setter pairing everywhere it makes
sense. (#55767)
* gtk/gtkradiobutton.[ch] gtk/gtktoolbar.c tests/testgtk.:
Rename gtk_radio_button_group to gtk_radio_button_get_group, add a
deprecated compat macro. (#55516)
* gtk/gtklabel.[ch]: Add functions
gtk_label_set/get_use_underline(), gtk_label_set/get_use_markup(),
gtk_label_set_label(), which mirror the property API for GtkLabel.
Make gtk_label_get_attributes() only reflect the attributes
set by gtk_label_set_attributes.
* gtk/gtknotebook.c (gtk_notebook_set_current_page) gtk/gtkcompat.h: Rename
from gtk_notebook_set_page().
Sat Jun 23 18:02:46 2001 Owen Taylor <otaylor@redhat.com>
* configure.in: Fix tests for XShm.h.
......
Sun Jun 24 11:29:35 2001 Owen Taylor <otaylor@redhat.com>
* gdk/x11/gdkimage-x11.c (gdk_image_new): Fix stupid error
introduced last night that was making things decidedly not work.
* gtk/*.[ch]: Patch from Kristian Rietveld adding 80 getters
so that we have getter/setter pairing everywhere it makes
sense. (#55767)
* gtk/gtkradiobutton.[ch] gtk/gtktoolbar.c tests/testgtk.:
Rename gtk_radio_button_group to gtk_radio_button_get_group, add a
deprecated compat macro. (#55516)
* gtk/gtklabel.[ch]: Add functions
gtk_label_set/get_use_underline(), gtk_label_set/get_use_markup(),
gtk_label_set_label(), which mirror the property API for GtkLabel.
Make gtk_label_get_attributes() only reflect the attributes
set by gtk_label_set_attributes.
* gtk/gtknotebook.c (gtk_notebook_set_current_page) gtk/gtkcompat.h: Rename
from gtk_notebook_set_page().
Sat Jun 23 18:02:46 2001 Owen Taylor <otaylor@redhat.com>
* configure.in: Fix tests for XShm.h.
......
Sun Jun 24 11:29:35 2001 Owen Taylor <otaylor@redhat.com>
* gdk/x11/gdkimage-x11.c (gdk_image_new): Fix stupid error
introduced last night that was making things decidedly not work.
* gtk/*.[ch]: Patch from Kristian Rietveld adding 80 getters
so that we have getter/setter pairing everywhere it makes
sense. (#55767)
* gtk/gtkradiobutton.[ch] gtk/gtktoolbar.c tests/testgtk.:
Rename gtk_radio_button_group to gtk_radio_button_get_group, add a
deprecated compat macro. (#55516)
* gtk/gtklabel.[ch]: Add functions
gtk_label_set/get_use_underline(), gtk_label_set/get_use_markup(),
gtk_label_set_label(), which mirror the property API for GtkLabel.
Make gtk_label_get_attributes() only reflect the attributes
set by gtk_label_set_attributes.
* gtk/gtknotebook.c (gtk_notebook_set_current_page) gtk/gtkcompat.h: Rename
from gtk_notebook_set_page().
Sat Jun 23 18:02:46 2001 Owen Taylor <otaylor@redhat.com>
* configure.in: Fix tests for XShm.h.
......
Sun Jun 24 11:29:35 2001 Owen Taylor <otaylor@redhat.com>
* gdk/x11/gdkimage-x11.c (gdk_image_new): Fix stupid error
introduced last night that was making things decidedly not work.
* gtk/*.[ch]: Patch from Kristian Rietveld adding 80 getters
so that we have getter/setter pairing everywhere it makes
sense. (#55767)
* gtk/gtkradiobutton.[ch] gtk/gtktoolbar.c tests/testgtk.:
Rename gtk_radio_button_group to gtk_radio_button_get_group, add a
deprecated compat macro. (#55516)
* gtk/gtklabel.[ch]: Add functions
gtk_label_set/get_use_underline(), gtk_label_set/get_use_markup(),
gtk_label_set_label(), which mirror the property API for GtkLabel.
Make gtk_label_get_attributes() only reflect the attributes
set by gtk_label_set_attributes.
* gtk/gtknotebook.c (gtk_notebook_set_current_page) gtk/gtkcompat.h: Rename
from gtk_notebook_set_page().
Sat Jun 23 18:02:46 2001 Owen Taylor <otaylor@redhat.com>
* configure.in: Fix tests for XShm.h.
......
Sun Jun 24 11:29:35 2001 Owen Taylor <otaylor@redhat.com>
* gdk/x11/gdkimage-x11.c (gdk_image_new): Fix stupid error
introduced last night that was making things decidedly not work.
* gtk/*.[ch]: Patch from Kristian Rietveld adding 80 getters
so that we have getter/setter pairing everywhere it makes
sense. (#55767)
* gtk/gtkradiobutton.[ch] gtk/gtktoolbar.c tests/testgtk.:
Rename gtk_radio_button_group to gtk_radio_button_get_group, add a
deprecated compat macro. (#55516)
* gtk/gtklabel.[ch]: Add functions
gtk_label_set/get_use_underline(), gtk_label_set/get_use_markup(),
gtk_label_set_label(), which mirror the property API for GtkLabel.
Make gtk_label_get_attributes() only reflect the attributes
set by gtk_label_set_attributes.
* gtk/gtknotebook.c (gtk_notebook_set_current_page) gtk/gtkcompat.h: Rename
from gtk_notebook_set_page().
Sat Jun 23 18:02:46 2001 Owen Taylor <otaylor@redhat.com>
* configure.in: Fix tests for XShm.h.
......
Sun Jun 24 11:29:35 2001 Owen Taylor <otaylor@redhat.com>
* gdk/x11/gdkimage-x11.c (gdk_image_new): Fix stupid error
introduced last night that was making things decidedly not work.
* gtk/*.[ch]: Patch from Kristian Rietveld adding 80 getters
so that we have getter/setter pairing everywhere it makes
sense. (#55767)
* gtk/gtkradiobutton.[ch] gtk/gtktoolbar.c tests/testgtk.:
Rename gtk_radio_button_group to gtk_radio_button_get_group, add a
deprecated compat macro. (#55516)
* gtk/gtklabel.[ch]: Add functions
gtk_label_set/get_use_underline(), gtk_label_set/get_use_markup(),
gtk_label_set_label(), which mirror the property API for GtkLabel.
Make gtk_label_get_attributes() only reflect the attributes
set by gtk_label_set_attributes.
* gtk/gtknotebook.c (gtk_notebook_set_current_page) gtk/gtkcompat.h: Rename
from gtk_notebook_set_page().
Sat Jun 23 18:02:46 2001 Owen Taylor <otaylor@redhat.com>
* configure.in: Fix tests for XShm.h.
......
Sun Jun 24 11:29:35 2001 Owen Taylor <otaylor@redhat.com>
* gdk/x11/gdkimage-x11.c (gdk_image_new): Fix stupid error
introduced last night that was making things decidedly not work.
* gtk/*.[ch]: Patch from Kristian Rietveld adding 80 getters
so that we have getter/setter pairing everywhere it makes
sense. (#55767)
* gtk/gtkradiobutton.[ch] gtk/gtktoolbar.c tests/testgtk.:
Rename gtk_radio_button_group to gtk_radio_button_get_group, add a
deprecated compat macro. (#55516)
* gtk/gtklabel.[ch]: Add functions
gtk_label_set/get_use_underline(), gtk_label_set/get_use_markup(),
gtk_label_set_label(), which mirror the property API for GtkLabel.
Make gtk_label_get_attributes() only reflect the attributes
set by gtk_label_set_attributes.
* gtk/gtknotebook.c (gtk_notebook_set_current_page) gtk/gtkcompat.h: Rename
from gtk_notebook_set_page().
Sat Jun 23 18:02:46 2001 Owen Taylor <otaylor@redhat.com>
* configure.in: Fix tests for XShm.h.
......
......@@ -132,10 +132,11 @@ Compatibility macro; in gtkcompat.h.
@Returns:
<!-- ##### FUNCTION gtk_notebook_set_page ##### -->
<!-- ##### MACRO gtk_notebook_set_page ##### -->
<para>
</para>
<!-- # Unused Parameters # -->
@notebook:
@page_num:
......
......@@ -129,14 +129,15 @@ as @group.
@Returns: a new radio button.
<!-- ##### FUNCTION gtk_radio_button_group ##### -->
<!-- ##### MACRO gtk_radio_button_group ##### -->
<para>
Retrieves the group assigned to a radio button.
</para>
@radio_button: a #GtkRadioButton.
@Returns: a linked list containing all the radio buttons in the same group
as @radio_button.
<!-- # Unused Parameters # -->
@radio_button: a #GtkRadioButton.
<!-- ##### FUNCTION gtk_radio_button_set_group ##### -->
......
......@@ -313,9 +313,8 @@ gdk_image_new (GdkImageType type,
image_list = g_list_prepend (image_list, image);
}
else
#else /* !USE_SHM */
goto error;
#endif /* USE_SHM */
goto error;
break;
case GDK_IMAGE_NORMAL:
private->ximage = XCreateImage (private->xdisplay, xvisual, visual->depth,
......
......@@ -226,6 +226,24 @@ gtk_accel_label_finalize (GObject *object)
G_OBJECT_CLASS (parent_class)->finalize (object);
}
/**
* gtk_accel_label_get_accel_widget:
* @accel_label: a #GtkAccelLabel
*
* Fetches the widget monitored by this accelerator label. See
* gtk_accel_label_set_accel_widget().
*
* Return value: the widget monitored by the accelerator label,
* or %NULL.
**/
GtkWidget *
gtk_accel_label_get_accel_widget (GtkAccelLabel *accel_label)
{
g_return_val_if_fail (GTK_IS_ACCEL_LABEL (accel_label), NULL);
return accel_label->accel_widget;
}
guint
gtk_accel_label_get_accel_width (GtkAccelLabel *accel_label)
{
......
......@@ -78,6 +78,7 @@ struct _GtkAccelLabelClass
GtkType gtk_accel_label_get_type (void) G_GNUC_CONST;
GtkWidget* gtk_accel_label_new (const gchar *string);
GtkWidget* gtk_accel_label_get_accel_widget (GtkAccelLabel *accel_label);
guint gtk_accel_label_get_accel_width (GtkAccelLabel *accel_label);
void gtk_accel_label_set_accel_widget (GtkAccelLabel *accel_label,
GtkWidget *accel_widget);
......
......@@ -126,6 +126,23 @@ gtk_adjustment_new (gdouble value,
return GTK_OBJECT (adjustment);
}
/**
* gtk_adjustment_get_value:
* @adjustment: a #GtkAdjustment
*
* Gets the current value of the adjustment. See
* gtk_adjustment_set_value ().
*
* Return value: The current value of the adjustment.
**/
gdouble
gtk_adjustment_get_value (GtkAdjustment *adjustment)
{
g_return_val_if_fail (GTK_IS_ADJUSTMENT (adjustment), 0.);
return adjustment->value;
}
void
gtk_adjustment_set_value (GtkAdjustment *adjustment,
gdouble value)
......
......@@ -81,6 +81,7 @@ void gtk_adjustment_value_changed (GtkAdjustment *adjustment);
void gtk_adjustment_clamp_page (GtkAdjustment *adjustment,
gdouble lower,
gdouble upper);
gdouble gtk_adjustment_get_value (GtkAdjustment *adjustment);
void gtk_adjustment_set_value (GtkAdjustment *adjustment,
gdouble value);
......
......@@ -478,6 +478,23 @@ gtk_box_set_homogeneous (GtkBox *box,
}
}
/**
* gtk_box_get_homogeneous:
* @box: a #GtkBox
*
* Returns whether the box is homogeneous (all children are the
* same size). See gtk_box_set_homogeneous ().
*
* Return value: %TRUE if the box is homogeneous.
**/
gboolean
gtk_box_get_homogeneous (GtkBox *box)
{
g_return_val_if_fail (GTK_IS_BOX (box), FALSE);
return box->homogeneous;
}
void
gtk_box_set_spacing (GtkBox *box,
gint spacing)
......
......@@ -90,6 +90,7 @@ void gtk_box_pack_end_defaults (GtkBox *box,
GtkWidget *widget);
void gtk_box_set_homogeneous (GtkBox *box,
gboolean homogeneous);
gboolean gtk_box_get_homogeneous (GtkBox *box);
void gtk_box_set_spacing (GtkBox *box,
gint spacing);
gint gtk_box_get_spacing (GtkBox *box);
......
......@@ -57,6 +57,7 @@ struct _GtkCellRendererToggleClass
GtkType gtk_cell_renderer_toggle_get_type (void);
GtkCellRenderer *gtk_cell_renderer_toggle_new (void);
gboolean gtk_cell_renderer_toggle_get_radio (GtkCellRendererToggle *toggle);
void gtk_cell_renderer_toggle_set_radio (GtkCellRendererToggle *toggle,
gboolean radio);
......
......@@ -210,6 +210,23 @@ gtk_check_menu_item_set_active (GtkCheckMenuItem *check_menu_item,
}
}
/**
* gtk_check_menu_item_get_active:
* @check_menu_item: a #GtkCheckMenuItem
*
* Returns whether the check menu item is active. See
* gtk_check_menu_item_set_active ().
*
* Return value: %TRUE if the menu item is checked.
*/
gboolean
gtk_check_menu_item_get_active (GtkCheckMenuItem *check_menu_item)
{
g_return_val_if_fail (GTK_IS_CHECK_MENU_ITEM (check_menu_item), FALSE);
return check_menu_item->active;
}
static void
gtk_check_menu_item_toggle_size_request (GtkMenuItem *menu_item,
gint *requisition)
......
......@@ -73,6 +73,7 @@ GtkWidget* gtk_check_menu_item_new_with_label (const gchar *label);
GtkWidget* gtk_check_menu_item_new_with_mnemonic (const gchar *label);
void gtk_check_menu_item_set_active (GtkCheckMenuItem *check_menu_item,
gboolean is_active);
gboolean gtk_check_menu_item_get_active (GtkCheckMenuItem *check_menu_item);
void gtk_check_menu_item_toggled (GtkCheckMenuItem *check_menu_item);
void gtk_check_menu_item_set_inconsistent (GtkCheckMenuItem *check_menu_item,
gboolean setting);
......
......@@ -63,6 +63,7 @@ extern "C" {
#define gtk_accel_label_accelerator_width gtk_accel_label_get_accel_width
#define gtk_container_border_width gtk_container_set_border_width
#define gtk_notebook_current_page gtk_notebook_get_current_page
#define gtk_notebook_set_page gtk_notebook_set_current_page
#define gtk_packer_configure gtk_packer_set_child_packing
#define gtk_paned_gutter_size(p,s) (void) 0
#define gtk_paned_set_gutter_size(p,s) (void) 0
......
......@@ -815,6 +815,23 @@ gtk_container_set_border_width (GtkContainer *container,
}
}
/**
* gtk_container_get_border_width:
* @container: a #GtkContainer
*
* Retrieves the border width of the container. See
* gtk_container_set_border_width().
*
* Return value: the current border width
**/
guint
gtk_container_get_border_width (GtkContainer *container)
{
g_return_val_if_fail (GTK_IS_CONTAINER (container), 0);
return container->border_width;
}
/**
* gtk_container_add:
* @container: a #GtkContainer
......@@ -938,6 +955,23 @@ gtk_container_set_resize_mode (GtkContainer *container,
}
}
/**
* gtk_container_get_resize_mode:
* @container: a #GtkContainer
*
* Returns the resize mode for the container. See
* gtk_container_set_resize_mode ().
*
* Return value: the current resize mode
**/
GtkResizeMode
gtk_container_get_resize_mode (GtkContainer *container)
{
g_return_val_if_fail (GTK_IS_CONTAINER (container), GTK_RESIZE_PARENT);
return container->resize_mode;
}
void
gtk_container_set_reallocate_redraws (GtkContainer *container,
gboolean needs_redraws)
......@@ -1498,11 +1532,7 @@ gtk_container_real_set_focus_child (GtkContainer *container,
static GList*
get_focus_chain (GtkContainer *container)
{
GList *chain;
chain = g_object_get_data (G_OBJECT (container), "gtk-container-focus-chain");
return chain;
return g_object_get_data (G_OBJECT (container), "gtk-container-focus-chain");
}
static GList*
......@@ -1561,11 +1591,7 @@ gtk_container_focus (GtkWidget *widget,
*/
if (container->has_focus_chain)
{
GList *chain;
chain = get_focus_chain (container);
children = g_list_copy (chain);
children = g_list_copy (get_focus_chain (container));
}
else
{
......@@ -2082,6 +2108,41 @@ gtk_container_set_focus_chain (GtkContainer *container,
chain);
}
/**
* gtk_container_get_focus_chain:
* @container: a #GtkContainer
* @focusable_widgets: location to store the focus chain of the
* container, or %NULL. You should free this list
* using g_list_free() when you are done with it, however
* no additional reference count is added to the
* individual widgets in the focus chain.
*
* Retrieve the focus chain of the container, if one has been
* set explicitely. If no focus chain has been explicitely
* set, GTK+ computes the focus chain based on the positions
* of the children. In that case, GTK+ stores %NULL in
* @focusable_widgets and returns %FALSE.
*
* Return value: %TRUE if the focus chain of the container,
* has been set explicitely.
**/
gboolean
gtk_container_get_focus_chain (GtkContainer *container,
GList **focus_chain)
{
g_return_val_if_fail (GTK_IS_CONTAINER (container), NULL);
if (focus_chain)
{
if (container->has_focus_chain)
*focus_chain = g_list_copy (get_focus_chain (container));
else
*focus_chain = NULL;
}
return container->has_focus_chain;
}
void
gtk_container_unset_focus_chain (GtkContainer *container)
{
......@@ -2131,6 +2192,29 @@ gtk_container_set_focus_vadjustment (GtkContainer *container,
(GtkDestroyNotify) gtk_object_unref);
}
/**
* gtk_container_get_focus_vadjustment:
* @container: a #GtkContainer
*
* Retrieves the vertical focus adjustment for the container. See
* gtk_container_set_focus_vadjustment ().
*
* Return value: the vertical focus adjustment, or %NULL if
* none has been set.
**/
GtkAdjustment *
gtk_container_get_focus_vadjustment (GtkContainer *container)
{
GtkAdjustment *vadjustment;
g_return_val_if_fail (GTK_IS_CONTAINER (container), NULL);
vadjustment = gtk_object_get_data_by_id (GTK_OBJECT (container),
vadjustment_key_id);
return vadjustment;
}
void
gtk_container_set_focus_hadjustment (GtkContainer *container,
GtkAdjustment *adjustment)
......@@ -2149,6 +2233,29 @@ gtk_container_set_focus_hadjustment (GtkContainer *container,
(GtkDestroyNotify) gtk_object_unref);
}
/**
* gtk_container_get_focus_hadjustment:
* @container: a #GtkContainer
*
* Retrieves the horizontal focus adjustment for the container. See
* gtk_container_set_focus_hadjustment ().
*
* Return value: the horizontal focus adjustment, or %NULL if none
* none has been set.
**/
GtkAdjustment *
gtk_container_get_focus_hadjustment (GtkContainer *container)
{
GtkAdjustment *hadjustment;
g_return_val_if_fail (GTK_IS_CONTAINER (container), NULL);
hadjustment = gtk_object_get_data_by_id (GTK_OBJECT (container),
hadjustment_key_id);
return hadjustment;
}
static void
gtk_container_show_all (GtkWidget *widget)
......
......@@ -107,6 +107,7 @@ struct _GtkContainerClass
GtkType gtk_container_get_type (void) G_GNUC_CONST;
void gtk_container_set_border_width (GtkContainer *container,
guint border_width);
guint gtk_container_get_border_width (GtkContainer *container);
void gtk_container_add (GtkContainer *container,
GtkWidget *widget);
void gtk_container_remove (GtkContainer *container,
......@@ -114,6 +115,7 @@ void gtk_container_remove (GtkContainer *container,
void gtk_container_set_resize_mode (GtkContainer *container,
GtkResizeMode resize_mode);
GtkResizeMode gtk_container_get_resize_mode (GtkContainer *container);
void gtk_container_check_resize (GtkContainer *container);
......@@ -132,6 +134,8 @@ void gtk_container_propagate_expose (GtkContainer *container,
void gtk_container_set_focus_chain (GtkContainer *container,
GList *focusable_widgets);
gboolean gtk_container_get_focus_chain (GtkContainer *container,
GList **focusable_widgets);
void gtk_container_unset_focus_chain (GtkContainer *container);
/* Widget-level methods */
......@@ -142,8 +146,10 @@ void gtk_container_set_focus_child (GtkContainer *container,
GtkWidget *child);
void gtk_container_set_focus_vadjustment (GtkContainer *container,
GtkAdjustment *adjustment);
GtkAdjustment *gtk_container_get_focus_vadjustment (GtkContainer *container);
void gtk_container_set_focus_hadjustment (GtkContainer *container,
GtkAdjustment *adjustment);
GtkAdjustment *gtk_container_get_focus_hadjustment (GtkContainer *container);
void gtk_container_resize_children (GtkContainer *container);
......
......@@ -179,3 +179,24 @@ gtk_editable_set_editable (GtkEditable *editable,
"editable", is_editable != FALSE,
NULL);
}
/**
* gtk_editable_get_editable:
* @editable: a #GtkEditable
*
* Retrieves whether @editable is editable. See
* gtk_editable_set_editable().
*
* Return value: %TRUE if @editable is editable.
**/
gboolean
gtk_editable_get_editable (GtkEditable *editable)
{
gboolean value;
g_return_val_if_fail (GTK_IS_EDITABLE (editable), FALSE);
gtk_object_get (GTK_OBJECT (editable), "editable", &value, NULL);
return value;
}
......@@ -98,6 +98,7 @@ void gtk_editable_set_position (GtkEditable *editable,
gint gtk_editable_get_position (GtkEditable *editable);
void gtk_editable_set_editable (GtkEditable *editable,
gboolean is_editable);
gboolean gtk_editable_get_editable (GtkEditable *editable);
#ifdef __cplusplus
}
......
......@@ -3074,6 +3074,23 @@ gtk_entry_set_visibility (GtkEntry *entry,
gtk_entry_recompute (entry);
}
/**
* gtk_entry_get_visibility:
* @entry: a #GtkEntry
*
* Retrieves whether the text in @entry is visible. See
* gtk_entry_set_visibility().
*
* Return value: %TRUE if the text is currently visible
**/
gboolean
gtk_entry_get_visibility (GtkEntry *entry)
{
g_return_val_if_fail (GTK_IS_ENTRY (entry), FALSE);
return entry->visible;
}
/**
* gtk_entry_set_invisible_char:
* @entry: a #GtkEntry
......@@ -3102,6 +3119,24 @@ gtk_entry_set_invisible_char (GtkEntry *entry,
gtk_entry_recompute (entry);
}
/**
* gtk_entry_get_invisible_char:
* @entry: a #GtkEntry
*
* Retrieves the character displayed in place of the real characters
* for entries with visisbility set to false. See gtk_entry_set_invisible_char().
*
* Return value: the current invisible char, or 0, if the entry does not
* show invisible text at all.
**/
gunichar
gtk_entry_get_invisible_char (GtkEntry *entry)
{
g_return_val_if_fail (GTK_IS_ENTRY (entry), 0);
return entry->invisible_char;
}
void
gtk_entry_set_editable(GtkEntry *entry,
gboolean editable)
......@@ -3143,6 +3178,24 @@ gtk_entry_set_max_length (GtkEntry *entry,
g_object_notify (G_OBJECT (entry), "max_length");
}
/**
* gtk_entry_get_max_length:
* @entry: a #GtkEntry
*
* Retrieves the maximum allowed length of the text in
* @entry. See gtk_entry_set_max_length().
*
* Return value: the maximum allowed number of characters
* in #GtkEntry, or 0 if there is no maximum.
**/
gint
gtk_entry_get_max_length (GtkEntry *entry)
{
g_return_val_if_fail (GTK_IS_ENTRY (entry), 0);
return entry->text_max_length;
}
/**
* gtk_entry_set_activates_default:
* @entry: a #GtkEntry
......
......@@ -149,8 +149,10 @@ GtkType gtk_entry_get_type (void) G_GNUC_CONST;
GtkWidget* gtk_entry_new (void);
void gtk_entry_set_visibility (GtkEntry *entry,
gboolean visible);
gboolean gtk_entry_get_visibility (GtkEntry *entry);
void gtk_entry_set_invisible_char (GtkEntry *entry,
gunichar ch);
gunichar gtk_entry_get_invisible_char (GtkEntry *entry);
void gtk_entry_set_editable (GtkEntry *entry,
gboolean editable);
void gtk_entry_set_has_frame (GtkEntry *entry,
......@@ -159,6 +161,7 @@ gboolean gtk_entry_get_has_frame (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);
void gtk_entry_set_activates_default (GtkEntry *entry,
gboolean setting);
gboolean gtk_entry_get_activates_default (GtkEntry *entry);
......
......@@ -387,6 +387,23 @@ gtk_frame_set_label_widget (GtkFrame *frame,
g_object_notify (G_OBJECT (frame), "label_widget");
}
/**
* gtk_frame_get_label_widget:
* @frame: a #GtkFrame
*
* Retrieves the label widget for the frame. See
* gtk_frame_set_label_widget().
*
* Return value: the label widget, or %NULL if there is none.
**/
GtkWidget *
gtk_frame_get_label_widget (GtkFrame *frame)
{
g_return_val_if_fail (GTK_IS_FRAME (frame), NULL);
return frame->label_widget;
}
void