mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-11-10 10:50:10 +00:00
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().
This commit is contained in:
parent
5a5580a8e7
commit
cc223eeff6
22
ChangeLog
22
ChangeLog
@ -1,3 +1,25 @@
|
||||
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.
|
||||
|
@ -1,3 +1,25 @@
|
||||
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.
|
||||
|
@ -1,3 +1,25 @@
|
||||
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.
|
||||
|
@ -1,3 +1,25 @@
|
||||
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.
|
||||
|
@ -1,3 +1,25 @@
|
||||
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.
|
||||
|
@ -1,3 +1,25 @@
|
||||
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.
|
||||
|
@ -1,3 +1,25 @@
|
||||
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);
|
||||
|
||||
|
17
gtk/gtkbox.c
17
gtk/gtkbox.c
@ -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
|
||||
gtk_frame_set_label_align (GtkFrame *frame,
|
||||
gfloat xalign,
|
||||
@ -413,6 +430,28 @@ gtk_frame_set_label_align (GtkFrame *frame,
|
||||
gtk_widget_queue_resize (GTK_WIDGET (frame));
|
||||
}
|
||||
|
||||
/**
|
||||
* gtk_frame_get_label_align:
|
||||
* @frame: a #GtkFrame
|
||||
* @xalign: location to store X alignment of frame's label, or %NULL
|
||||
* @yalign: location to store X alignment of frame's label, or %NULL
|
||||
*
|
||||
* Retrieves the X and Y alignment of the frame's label. See
|
||||
* gtk_frame_set_label_align().
|
||||
**/
|
||||
void
|
||||
gtk_frame_get_label_align (GtkFrame *frame,
|
||||
gfloat *xalign,
|
||||
gfloat *yalign)
|
||||
{
|
||||
g_return_if_fail (GTK_IS_FRAME (frame));
|
||||
|
||||
if (xalign)
|
||||
*xalign = frame->label_xalign;
|
||||
if (yalign)
|
||||
*yalign = frame->label_yalign;
|
||||
}
|
||||
|
||||
void
|
||||
gtk_frame_set_shadow_type (GtkFrame *frame,
|
||||
GtkShadowType type)
|
||||
@ -434,6 +473,23 @@ gtk_frame_set_shadow_type (GtkFrame *frame,
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* gtk_frame_get_shadow_type:
|
||||
* @frame: a #GtkFrame
|
||||
*
|
||||
* Retrieves the shadow type of the frame. See
|
||||
* gtk_frame_set_shadow_type().
|
||||
*
|
||||
* Return value: the current shadow type of the frame.
|
||||
**/
|
||||
GtkShadowType
|
||||
gtk_frame_get_shadow_type (GtkFrame *frame)
|
||||
{
|
||||
g_return_val_if_fail (GTK_IS_FRAME (frame), GTK_SHADOW_ETCHED_IN);
|
||||
|
||||
return frame->shadow_type;
|
||||
}
|
||||
|
||||
static void
|
||||
gtk_frame_paint (GtkWidget *widget,
|
||||
GdkRectangle *area)
|
||||
|
@ -77,11 +77,16 @@ G_CONST_RETURN gchar *gtk_frame_get_label (GtkFrame *frame);
|
||||
|
||||
void gtk_frame_set_label_widget (GtkFrame *frame,
|
||||
GtkWidget *label_widget);
|
||||
GtkWidget *gtk_frame_get_label_widget (GtkFrame *frame);
|
||||
void gtk_frame_set_label_align (GtkFrame *frame,
|
||||
gfloat xalign,
|
||||
gfloat yalign);
|
||||
void gtk_frame_get_label_align (GtkFrame *frame,
|
||||
gfloat *xalign,
|
||||
gfloat *yalign);
|
||||
void gtk_frame_set_shadow_type (GtkFrame *frame,
|
||||
GtkShadowType type);
|
||||
GtkShadowType gtk_frame_get_shadow_type (GtkFrame *frame);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
@ -201,7 +201,7 @@ gtk_handle_box_class_init (GtkHandleBoxClass *class)
|
||||
_("Snap edge"),
|
||||
_("Side of the handlebox that's lined up with the docking point to dock the handlebox."),
|
||||
GTK_TYPE_POSITION_TYPE,
|
||||
GTK_POS_LEFT,
|
||||
GTK_POS_TOP,
|
||||
G_PARAM_READABLE | G_PARAM_WRITABLE));
|
||||
object_class->destroy = gtk_handle_box_destroy;
|
||||
|
||||
@ -747,6 +747,23 @@ gtk_handle_box_set_shadow_type (GtkHandleBox *handle_box,
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* gtk_handle_box_get_shadow_type:
|
||||
* @handle_box: a #GtkHandleBox
|
||||
*
|
||||
* Gets the type of shadow drawn around the handle box. See
|
||||
* gtk_handle_box_set_shadow_type().
|
||||
*
|
||||
* Return value: the type of shadow currently drawn around the handle box.
|
||||
**/
|
||||
GtkShadowType
|
||||
gtk_handle_box_get_shadow_type (GtkHandleBox *handle_box)
|
||||
{
|
||||
g_return_val_if_fail (GTK_IS_HANDLE_BOX (handle_box), GTK_SHADOW_ETCHED_OUT);
|
||||
|
||||
return handle_box->shadow_type;
|
||||
}
|
||||
|
||||
void
|
||||
gtk_handle_box_set_handle_position (GtkHandleBox *handle_box,
|
||||
GtkPositionType position)
|
||||
@ -759,6 +776,23 @@ gtk_handle_box_set_handle_position (GtkHandleBox *handle_box,
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* gtk_handle_box_get_handle_position:
|
||||
* @handle_box: a #GtkHandleBox
|
||||
*
|
||||
* Gets the handle position of the handle box. See
|
||||
* gtk_handle_box_set_handle_position().
|
||||
*
|
||||
* Return value: the current handle position.
|
||||
**/
|
||||
GtkPositionType
|
||||
gtk_handle_box_get_handle_position (GtkHandleBox *handle_box)
|
||||
{
|
||||
g_return_val_if_fail (GTK_IS_HANDLE_BOX (handle_box), GTK_POS_LEFT);
|
||||
|
||||
return handle_box->handle_position;
|
||||
}
|
||||
|
||||
void
|
||||
gtk_handle_box_set_snap_edge (GtkHandleBox *handle_box,
|
||||
GtkPositionType edge)
|
||||
@ -773,6 +807,24 @@ gtk_handle_box_set_snap_edge (GtkHandleBox *handle_box,
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* gtk_handle_box_get_snap_edge:
|
||||
* @handle_box: a #GtkHandleBox
|
||||
*
|
||||
* Gets the edge used for determining reattachment of the handle box. See
|
||||
* gtk_handle_box_set_snap_edge().
|
||||
*
|
||||
* Return value: the edge used for determining reattachment, or (GtkPositionType)-1 if this
|
||||
* is determined (as per default) from the handle position.
|
||||
**/
|
||||
GtkPositionType
|
||||
gtk_handle_box_get_snap_edge (GtkHandleBox *handle_box)
|
||||
{
|
||||
g_return_val_if_fail (GTK_IS_HANDLE_BOX (handle_box), (GtkPositionType)-1);
|
||||
|
||||
return handle_box->snap_edge;
|
||||
}
|
||||
|
||||
static void
|
||||
gtk_handle_box_paint (GtkWidget *widget,
|
||||
GdkEventExpose *event,
|
||||
|
@ -88,14 +88,17 @@ struct _GtkHandleBoxClass
|
||||
};
|
||||
|
||||
|
||||
GtkType gtk_handle_box_get_type (void) G_GNUC_CONST;
|
||||
GtkWidget* gtk_handle_box_new (void);
|
||||
void gtk_handle_box_set_shadow_type (GtkHandleBox *handle_box,
|
||||
GtkShadowType type);
|
||||
void gtk_handle_box_set_handle_position (GtkHandleBox *handle_box,
|
||||
GtkPositionType position);
|
||||
void gtk_handle_box_set_snap_edge (GtkHandleBox *handle_box,
|
||||
GtkPositionType edge);
|
||||
GtkType gtk_handle_box_get_type (void) G_GNUC_CONST;
|
||||
GtkWidget* gtk_handle_box_new (void);
|
||||
void gtk_handle_box_set_shadow_type (GtkHandleBox *handle_box,
|
||||
GtkShadowType type);
|
||||
GtkShadowType gtk_handle_box_get_shadow_type (GtkHandleBox *handle_box);
|
||||
void gtk_handle_box_set_handle_position (GtkHandleBox *handle_box,
|
||||
GtkPositionType position);
|
||||
GtkPositionType gtk_handle_box_get_handle_position(GtkHandleBox *handle_box);
|
||||
void gtk_handle_box_set_snap_edge (GtkHandleBox *handle_box,
|
||||
GtkPositionType edge);
|
||||
GtkPositionType gtk_handle_box_get_snap_edge (GtkHandleBox *handle_box);
|
||||
|
||||
|
||||
|
||||
|
278
gtk/gtklabel.c
278
gtk/gtklabel.c
@ -285,24 +285,16 @@ gtk_label_set_property (GObject *object,
|
||||
switch (prop_id)
|
||||
{
|
||||
case PROP_LABEL:
|
||||
gtk_label_set_label_internal (label,
|
||||
g_strdup (g_value_get_string (value)));
|
||||
gtk_label_recalculate (label);
|
||||
if (last_keyval != label->mnemonic_keyval)
|
||||
gtk_label_setup_mnemonic (label, last_keyval);
|
||||
gtk_label_set_label (label, g_value_get_string (value));
|
||||
break;
|
||||
case PROP_ATTRIBUTES:
|
||||
gtk_label_set_attributes (label, g_value_get_boxed (value));
|
||||
break;
|
||||
case PROP_USE_MARKUP:
|
||||
gtk_label_set_use_markup_internal (label, g_value_get_boolean (value));
|
||||
gtk_label_recalculate (label);
|
||||
gtk_label_set_use_markup (label, g_value_get_boolean (value));
|
||||
break;
|
||||
case PROP_USE_UNDERLINE:
|
||||
gtk_label_set_use_underline_internal (label, g_value_get_boolean (value));
|
||||
gtk_label_recalculate (label);
|
||||
if (label->use_underline)
|
||||
gtk_label_setup_mnemonic (label, last_keyval);
|
||||
gtk_label_set_use_underline (label, g_value_get_boolean (value));
|
||||
break;
|
||||
case PROP_JUSTIFY:
|
||||
gtk_label_set_justify (label, g_value_get_enum (value));
|
||||
@ -398,9 +390,10 @@ gtk_label_init (GtkLabel *label)
|
||||
/**
|
||||
* gtk_label_new:
|
||||
* @str: The text of the label
|
||||
* @returns: a new #GtkLabel
|
||||
*
|
||||
* Creates a new #GtkLabel, containing the text in @str.
|
||||
*
|
||||
* Return value: the new #GtkLabel
|
||||
**/
|
||||
GtkWidget*
|
||||
gtk_label_new (const gchar *str)
|
||||
@ -419,7 +412,6 @@ gtk_label_new (const gchar *str)
|
||||
* gtk_label_new_with_mnemonic:
|
||||
* @str: The text of the label, with an underscore in front of the
|
||||
* mnemonic character
|
||||
* @returns: a new #GtkLabel
|
||||
*
|
||||
* Creates a new #GtkLabel, containing the text in @str.
|
||||
*
|
||||
@ -435,6 +427,8 @@ gtk_label_new (const gchar *str)
|
||||
* label is inside a button or menu item, the button or menu item will
|
||||
* automatically become the mnemonic widget and be activated by
|
||||
* the mnemonic.
|
||||
*
|
||||
* Return value: the new #GtkLabel
|
||||
**/
|
||||
GtkWidget*
|
||||
gtk_label_new_with_mnemonic (const gchar *str)
|
||||
@ -550,6 +544,23 @@ gtk_label_set_mnemonic_widget (GtkLabel *label,
|
||||
gtk_widget_ref (label->mnemonic_widget);
|
||||
}
|
||||
|
||||
/**
|
||||
* gtk_label_get_mnemonic_widget:
|
||||
* @label: a #GtkLabel
|
||||
*
|
||||
* Retrieves the target of the mnemonic (keyboard shortcut) of this
|
||||
* label. See gtk_label_set_mnemonic_widget ().
|
||||
*
|
||||
* Return value: the target of the label's mnemonic, or %NULL if none
|
||||
* has been set and the default algorithm will be used.
|
||||
**/
|
||||
GtkWidget *
|
||||
gtk_label_get_mnemonic_widget (GtkLabel *label)
|
||||
{
|
||||
g_return_val_if_fail (GTK_IS_LABEL (label), NULL);
|
||||
|
||||
return label->mnemonic_widget;
|
||||
}
|
||||
|
||||
/**
|
||||
* gtk_label_get_mnemonic_keyval:
|
||||
@ -593,12 +604,14 @@ gtk_label_set_label_internal (GtkLabel *label,
|
||||
|
||||
static void
|
||||
gtk_label_set_use_markup_internal (GtkLabel *label,
|
||||
gboolean val)
|
||||
gboolean val)
|
||||
{
|
||||
val = val != FALSE;
|
||||
if (label->use_markup != val)
|
||||
g_object_notify (G_OBJECT (label), "use_markup");
|
||||
label->use_markup = val;
|
||||
{
|
||||
g_object_notify (G_OBJECT (label), "use_markup");
|
||||
label->use_markup = val;
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
@ -607,13 +620,15 @@ gtk_label_set_use_underline_internal (GtkLabel *label,
|
||||
{
|
||||
val = val != FALSE;
|
||||
if (label->use_underline != val)
|
||||
g_object_notify (G_OBJECT (label), "use_underline");
|
||||
label->use_underline = val;
|
||||
{
|
||||
g_object_notify (G_OBJECT (label), "use_underline");
|
||||
label->use_underline = val;
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
gtk_label_set_attributes_internal (GtkLabel *label,
|
||||
PangoAttrList *attrs)
|
||||
gtk_label_set_attributes_internal (GtkLabel *label,
|
||||
PangoAttrList *attrs)
|
||||
{
|
||||
if (attrs)
|
||||
pango_attr_list_ref (attrs);
|
||||
@ -621,6 +636,14 @@ gtk_label_set_attributes_internal (GtkLabel *label,
|
||||
if (label->attrs)
|
||||
pango_attr_list_unref (label->attrs);
|
||||
|
||||
if (!label->use_markup && !label->use_underline)
|
||||
{
|
||||
pango_attr_list_ref (attrs);
|
||||
if (label->effective_attrs)
|
||||
pango_attr_list_unref (label->effective_attrs);
|
||||
label->effective_attrs = attrs;
|
||||
}
|
||||
|
||||
label->attrs = attrs;
|
||||
g_object_notify (G_OBJECT (label), "attributes");
|
||||
}
|
||||
@ -633,7 +656,7 @@ static void
|
||||
gtk_label_recalculate (GtkLabel *label)
|
||||
{
|
||||
if (label->use_markup)
|
||||
set_markup (label, label->label, label->use_underline);
|
||||
set_markup (label, label->label, label->use_underline);
|
||||
else
|
||||
{
|
||||
if (label->use_underline)
|
||||
@ -641,7 +664,11 @@ gtk_label_recalculate (GtkLabel *label)
|
||||
else
|
||||
{
|
||||
gtk_label_set_text_internal (label, g_strdup (label->label));
|
||||
gtk_label_set_attributes_internal (label, NULL);
|
||||
if (label->attrs)
|
||||
pango_attr_list_ref (label->attrs);
|
||||
if (label->effective_attrs)
|
||||
pango_attr_list_unref (label->effective_attrs);
|
||||
label->effective_attrs = label->attrs;
|
||||
}
|
||||
}
|
||||
|
||||
@ -685,7 +712,8 @@ gtk_label_set_text (GtkLabel *label,
|
||||
* @attrs: a #PangoAttrList
|
||||
*
|
||||
* Sets a #PangoAttrList; the attributes in the list are applied to the
|
||||
* label text.
|
||||
* label text. The attributes set with this function will be ignored
|
||||
* if label->use_underline or label->use_markup is %TRUE.
|
||||
**/
|
||||
void
|
||||
gtk_label_set_attributes (GtkLabel *label,
|
||||
@ -699,6 +727,72 @@ gtk_label_set_attributes (GtkLabel *label,
|
||||
gtk_widget_queue_resize (GTK_WIDGET (label));
|
||||
}
|
||||
|
||||
/**
|
||||
* gtk_label_get_attributes:
|
||||
* @label: a #GtkLabel
|
||||
*
|
||||
* Gets the attribute list that was set on the label using
|
||||
* gtk_label_set_attributes(), if any. This function does
|
||||
* not reflect attributes that come from the labels markup
|
||||
* (see gtk_label_set_markup()). If you want to get the
|
||||
* effective attributes for the label, use
|
||||
* pango_layout_get_attribute (gtk_label_get_layout (label)).
|
||||
*
|
||||
* Return value: the attribute list, or %NULL if none was set.
|
||||
**/
|
||||
PangoAttrList *
|
||||
gtk_label_get_attributes (GtkLabel *label)
|
||||
{
|
||||
g_return_val_if_fail (GTK_IS_LABEL (label), NULL);
|
||||
|
||||
return label->attrs;
|
||||
}
|
||||
|
||||
/**
|
||||
* gtk_label_set_label:
|
||||
* @label: a #GtkLabel
|
||||
* @str: the new text to set for the label
|
||||
*
|
||||
* Sets the text of the label. The label is interpreted as
|
||||
* including embedded underlines and/or Pango markup depending
|
||||
* on the values of label->use_underline and label->use_markup.
|
||||
**/
|
||||
void
|
||||
gtk_label_set_label (GtkLabel *label,
|
||||
const gchar *str)
|
||||
{
|
||||
guint last_keyval;
|
||||
|
||||
g_return_if_fail (GTK_IS_LABEL (label));
|
||||
g_return_if_fail (str != NULL);
|
||||
|
||||
last_keyval = label->mnemonic_keyval;
|
||||
|
||||
gtk_label_set_label_internal (label, g_strdup (str));
|
||||
gtk_label_recalculate (label);
|
||||
if (last_keyval != label->mnemonic_keyval)
|
||||
gtk_label_setup_mnemonic (label, last_keyval);
|
||||
}
|
||||
|
||||
/**
|
||||
* gtk_label_get_label:
|
||||
* @label: a #GtkLabel
|
||||
*
|
||||
* Fetches the text from a label widget including any embedded
|
||||
* underlines indicating mnemonics and Pango markup. (See
|
||||
* gtk_label_get_text ()).
|
||||
*
|
||||
* Return value: the text of the label widget. This string is
|
||||
* owned by the widget and must not be modified or freed.
|
||||
**/
|
||||
G_CONST_RETURN gchar *
|
||||
gtk_label_get_label (GtkLabel *label)
|
||||
{
|
||||
g_return_val_if_fail (GTK_IS_LABEL (label), NULL);
|
||||
|
||||
return label->label;
|
||||
}
|
||||
|
||||
static void
|
||||
set_markup (GtkLabel *label,
|
||||
const gchar *str,
|
||||
@ -728,8 +822,9 @@ set_markup (GtkLabel *label,
|
||||
|
||||
if (attrs)
|
||||
{
|
||||
gtk_label_set_attributes_internal (label, attrs);
|
||||
pango_attr_list_unref (attrs);
|
||||
if (label->effective_attrs)
|
||||
pango_attr_list_unref (label->effective_attrs);
|
||||
label->effective_attrs = attrs;
|
||||
}
|
||||
|
||||
if (accel_char != 0)
|
||||
@ -792,10 +887,12 @@ gtk_label_set_markup_with_mnemonic (GtkLabel *label,
|
||||
* gtk_label_get_text:
|
||||
* @label: a #GtkLabel
|
||||
*
|
||||
* Fetches the text from a label widget
|
||||
* Fetches the text from a label widget, as displayed on the
|
||||
* screen. This does not include any embedded underlines
|
||||
* indicating mnemonics or Pango markup. (See gtk_label_get_label())
|
||||
*
|
||||
* Return value: the text in the label widget. This is the internal
|
||||
* string used by the label, and must not be modified.
|
||||
* string used by the label, and must not be modified.
|
||||
**/
|
||||
G_CONST_RETURN gchar *
|
||||
gtk_label_get_text (GtkLabel *label)
|
||||
@ -854,7 +951,6 @@ gtk_label_set_pattern_internal (GtkLabel *label,
|
||||
g_return_if_fail (GTK_IS_LABEL (label));
|
||||
|
||||
attrs = gtk_label_pattern_to_attrs (label, pattern);
|
||||
|
||||
gtk_label_set_attributes_internal (label, attrs);
|
||||
}
|
||||
|
||||
@ -871,6 +967,14 @@ gtk_label_set_pattern (GtkLabel *label,
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* gtk_label_set_justify:
|
||||
* @label: a #GtkLabel
|
||||
* @jtype: a #GtkJustification
|
||||
*
|
||||
* Sets the alignment of the lines in the text of the label relative to
|
||||
* each other.
|
||||
**/
|
||||
void
|
||||
gtk_label_set_justify (GtkLabel *label,
|
||||
GtkJustification jtype)
|
||||
@ -890,6 +994,29 @@ gtk_label_set_justify (GtkLabel *label,
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* gtk_label_get_justify:
|
||||
* @label: a #GtkLabel
|
||||
*
|
||||
* Returns the justification of the label. See gtk_label_set_justification ().
|
||||
*
|
||||
* Return value: GtkJustification
|
||||
**/
|
||||
GtkJustification
|
||||
gtk_label_get_justify (GtkLabel *label)
|
||||
{
|
||||
g_return_val_if_fail (GTK_IS_LABEL (label), 0);
|
||||
|
||||
return label->jtype;
|
||||
}
|
||||
|
||||
/**
|
||||
* gtk_label_set_line_wrap:
|
||||
* @label: a #GtkLabel
|
||||
* @wrap: the setting
|
||||
*
|
||||
* If true, the lines will be wrapped if the text becomes too wide.
|
||||
*/
|
||||
void
|
||||
gtk_label_set_line_wrap (GtkLabel *label,
|
||||
gboolean wrap)
|
||||
@ -907,6 +1034,22 @@ gtk_label_set_line_wrap (GtkLabel *label,
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* gtk_label_get_line_wrap:
|
||||
* @label: a #GtkLabel
|
||||
*
|
||||
* Returns whether lines in the label are automatically wrapped. See gtk_label_set_line_wrap ().
|
||||
*
|
||||
* Return value: %TRUE if the lines of the label are automatically wrapped.
|
||||
*/
|
||||
gboolean
|
||||
gtk_label_get_line_wrap (GtkLabel *label)
|
||||
{
|
||||
g_return_val_if_fail (GTK_IS_LABEL (label), FALSE);
|
||||
|
||||
return label->wrap;
|
||||
}
|
||||
|
||||
void
|
||||
gtk_label_get (GtkLabel *label,
|
||||
gchar **str)
|
||||
@ -946,6 +1089,9 @@ gtk_label_finalize (GObject *object)
|
||||
if (label->attrs)
|
||||
pango_attr_list_unref (label->attrs);
|
||||
|
||||
if (label->effective_attrs)
|
||||
pango_attr_list_unref (label->attrs);
|
||||
|
||||
g_free (label->select_info);
|
||||
|
||||
G_OBJECT_CLASS (parent_class)->finalize (object);
|
||||
@ -1002,8 +1148,8 @@ gtk_label_ensure_layout (GtkLabel *label,
|
||||
|
||||
label->layout = gtk_widget_create_pango_layout (widget, label->text);
|
||||
|
||||
if (label->attrs)
|
||||
pango_layout_set_attributes (label->layout, label->attrs);
|
||||
if (label->effective_attrs)
|
||||
pango_layout_set_attributes (label->layout, label->effective_attrs);
|
||||
|
||||
switch (label->jtype)
|
||||
{
|
||||
@ -2102,3 +2248,75 @@ gtk_label_get_layout_offsets (GtkLabel *label,
|
||||
get_layout_location (label, x, y);
|
||||
}
|
||||
|
||||
/**
|
||||
* gtk_label_set_use_markup:
|
||||
* @label: a #GtkLabel
|
||||
* @setting: %TRUE if the label's text should be parsed for markup.
|
||||
*
|
||||
* Sets whether the text of the label contains markup in Pango's
|
||||
* text markup lango. See gtk_label_set_markup().
|
||||
**/
|
||||
void
|
||||
gtk_label_set_use_markup (GtkLabel *label,
|
||||
gboolean setting)
|
||||
{
|
||||
g_return_if_fail (GTK_IS_LABEL (label));
|
||||
|
||||
gtk_label_set_use_markup_internal (label, setting);
|
||||
gtk_label_recalculate (label);
|
||||
}
|
||||
|
||||
/**
|
||||
* gtk_label_get_use_markup:
|
||||
* @label: a #GtkLabel
|
||||
*
|
||||
* Returns whether the label's text is interpreted as marked up with the
|
||||
* Pango text markup language. See gtk_label_set_use_markup ().
|
||||
*
|
||||
* Return value: %TRUE if the label's text will be parsed for markup.
|
||||
**/
|
||||
gboolean
|
||||
gtk_label_get_use_markup (GtkLabel *label)
|
||||
{
|
||||
g_return_val_if_fail (GTK_IS_LABEL (label), FALSE);
|
||||
|
||||
return label->use_markup;
|
||||
}
|
||||
|
||||
/**
|
||||
* gtk_label_set_use_underline:
|
||||
* @label: a #GtkLabel
|
||||
* @setting: %TRUE if underlines in the text indicate mnemonics
|
||||
*
|
||||
* If true, an underline in the text indicates the next character should be
|
||||
* used for the mnemonic accelerator key.
|
||||
*/
|
||||
void
|
||||
gtk_label_set_use_underline (GtkLabel *label,
|
||||
gboolean setting)
|
||||
{
|
||||
g_return_if_fail (GTK_IS_LABEL (label));
|
||||
|
||||
gtk_label_set_use_underline_internal (label, setting);
|
||||
gtk_label_recalculate (label);
|
||||
if (label->use_underline)
|
||||
gtk_label_setup_mnemonic (label, label->mnemonic_keyval);
|
||||
}
|
||||
|
||||
/**
|
||||
* gtk_label_get_use_underline:
|
||||
* @label: a #GtkLabel
|
||||
*
|
||||
* Returns whether an embedded underline in thef label indicates a
|
||||
* mnemonic. See gtk_label_set_use_underline ().
|
||||
*
|
||||
* Return value: %TRUE whether an embedded underline in the label indicates
|
||||
* the mnemonic accelerator keys.
|
||||
**/
|
||||
gboolean
|
||||
gtk_label_get_use_underline (GtkLabel *label)
|
||||
{
|
||||
g_return_val_if_fail (GTK_IS_LABEL (label), FALSE);
|
||||
|
||||
return label->use_underline;
|
||||
}
|
||||
|
@ -65,6 +65,7 @@ struct _GtkLabel
|
||||
|
||||
gchar *text;
|
||||
PangoAttrList *attrs;
|
||||
PangoAttrList *effective_attrs;
|
||||
|
||||
PangoLayout *layout;
|
||||
|
||||
@ -80,28 +81,42 @@ struct _GtkLabelClass
|
||||
};
|
||||
|
||||
GtkType gtk_label_get_type (void) G_GNUC_CONST;
|
||||
GtkWidget* gtk_label_new (const char *str);
|
||||
GtkWidget* gtk_label_new_with_mnemonic (const char *str);
|
||||
void gtk_label_set_text (GtkLabel *label,
|
||||
const char *str);
|
||||
G_CONST_RETURN gchar* gtk_label_get_text (GtkLabel *label);
|
||||
void gtk_label_set_attributes (GtkLabel *label,
|
||||
PangoAttrList *attrs);
|
||||
void gtk_label_set_markup (GtkLabel *label,
|
||||
const gchar *str);
|
||||
GtkWidget* gtk_label_new (const char *str);
|
||||
GtkWidget* gtk_label_new_with_mnemonic (const char *str);
|
||||
void gtk_label_set_text (GtkLabel *label,
|
||||
const char *str);
|
||||
G_CONST_RETURN gchar* gtk_label_get_text (GtkLabel *label);
|
||||
void gtk_label_set_attributes (GtkLabel *label,
|
||||
PangoAttrList *attrs);
|
||||
PangoAttrList *gtk_label_get_attributes (GtkLabel *label);
|
||||
void gtk_label_set_label (GtkLabel *label,
|
||||
const gchar *str);
|
||||
G_CONST_RETURN gchar *gtk_label_get_label (GtkLabel *label);
|
||||
void gtk_label_set_markup (GtkLabel *label,
|
||||
const gchar *str);
|
||||
void gtk_label_set_use_markup (GtkLabel *label,
|
||||
gboolean setting);
|
||||
gboolean gtk_label_get_use_markup (GtkLabel *label);
|
||||
void gtk_label_set_use_underline (GtkLabel *label,
|
||||
gboolean setting);
|
||||
gboolean gtk_label_get_use_underline (GtkLabel *label);
|
||||
|
||||
void gtk_label_set_markup_with_mnemonic (GtkLabel *label,
|
||||
const gchar *str);
|
||||
guint gtk_label_get_mnemonic_keyval (GtkLabel *label);
|
||||
void gtk_label_set_mnemonic_widget (GtkLabel *label,
|
||||
GtkWidget *widget);
|
||||
GtkWidget *gtk_label_get_mnemonic_widget (GtkLabel *label);
|
||||
void gtk_label_set_text_with_mnemonic (GtkLabel *label,
|
||||
const gchar *str);
|
||||
void gtk_label_set_justify (GtkLabel *label,
|
||||
GtkJustification jtype);
|
||||
GtkJustification gtk_label_get_justify (GtkLabel *label);
|
||||
void gtk_label_set_pattern (GtkLabel *label,
|
||||
const gchar *pattern);
|
||||
void gtk_label_set_line_wrap (GtkLabel *label,
|
||||
gboolean wrap);
|
||||
gboolean gtk_label_get_line_wrap (GtkLabel *label);
|
||||
void gtk_label_set_selectable (GtkLabel *label,
|
||||
gboolean setting);
|
||||
gboolean gtk_label_get_selectable (GtkLabel *label);
|
||||
@ -118,7 +133,6 @@ void gtk_label_get_layout_offsets (GtkLabel *label,
|
||||
gint *y);
|
||||
|
||||
|
||||
|
||||
#ifndef GTK_DISABLE_COMPAT_H
|
||||
# define gtk_label_set gtk_label_set_text
|
||||
#endif /* GTK_DISABLE_COMPAT_H */
|
||||
|
@ -344,6 +344,29 @@ gtk_layout_set_size (GtkLayout *layout,
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* gtk_layout_get_size:
|
||||
* @layout: a #GtkLayout
|
||||
* @width: location to store the width set on @layout, or %NULL
|
||||
* @height: location to store the height set on @layout, or %NULL
|
||||
*
|
||||
* Gets the size that has been set on the layout, and that determines
|
||||
* the total extents of the layout's scrollbar area. See
|
||||
* gtk_layout_set_size ().
|
||||
**/
|
||||
void
|
||||
gtk_layout_get_size (GtkLayout *layout,
|
||||
guint *width,
|
||||
guint *height)
|
||||
{
|
||||
g_return_if_fail (GTK_IS_LAYOUT (layout));
|
||||
|
||||
if (width)
|
||||
*width = layout->width;
|
||||
if (height)
|
||||
*height = layout->height;
|
||||
}
|
||||
|
||||
void
|
||||
gtk_layout_freeze (GtkLayout *layout)
|
||||
{
|
||||
|
@ -98,6 +98,9 @@ void gtk_layout_move (GtkLayout *layout,
|
||||
void gtk_layout_set_size (GtkLayout *layout,
|
||||
guint width,
|
||||
guint height);
|
||||
void gtk_layout_get_size (GtkLayout *layout,
|
||||
guint *width,
|
||||
guint *height);
|
||||
|
||||
GtkAdjustment* gtk_layout_get_hadjustment (GtkLayout *layout);
|
||||
GtkAdjustment* gtk_layout_get_vadjustment (GtkLayout *layout);
|
||||
|
@ -910,6 +910,23 @@ gtk_menu_set_tearoff_state (GtkMenu *menu,
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* gtk_menu_get_tearoff_state:
|
||||
* @menu: a #GtkMenu
|
||||
*
|
||||
* Returns whether the menu is torn off. See
|
||||
* gtk_menu_set_tearoff_state ().
|
||||
*
|
||||
* Return value: %TRUE if the menu is currently torn off.
|
||||
**/
|
||||
gboolean
|
||||
gtk_menu_get_tearoff_state (GtkMenu *menu)
|
||||
{
|
||||
g_return_val_if_fail (GTK_IS_MENU (menu), FALSE);
|
||||
|
||||
return menu->torn_off;
|
||||
}
|
||||
|
||||
void
|
||||
gtk_menu_set_title (GtkMenu *menu,
|
||||
const gchar *title)
|
||||
@ -921,6 +938,23 @@ gtk_menu_set_title (GtkMenu *menu,
|
||||
g_strdup (title), (GtkDestroyNotify) g_free);
|
||||
}
|
||||
|
||||
/**
|
||||
* gtk_menu_get_title:
|
||||
* @menu: a #GtkMenu
|
||||
*
|
||||
* Returns the title of the menu. See gtk_menu_set_title().
|
||||
*
|
||||
* Return value: the title of the menu, or %NULL if the menu has no
|
||||
* title set on it.
|
||||
**/
|
||||
G_CONST_RETURN gchar *
|
||||
gtk_menu_get_title (GtkMenu *menu)
|
||||
{
|
||||
g_return_val_if_fail (GTK_IS_MENU (menu), NULL);
|
||||
|
||||
return gtk_object_get_data (GTK_OBJECT (menu), "gtk-menu-title");
|
||||
}
|
||||
|
||||
void
|
||||
gtk_menu_reorder_child (GtkMenu *menu,
|
||||
GtkWidget *child,
|
||||
|
@ -165,12 +165,14 @@ GtkWidget* gtk_menu_get_attach_widget (GtkMenu *menu);
|
||||
|
||||
void gtk_menu_set_tearoff_state (GtkMenu *menu,
|
||||
gboolean torn_off);
|
||||
gboolean gtk_menu_get_tearoff_state (GtkMenu *menu);
|
||||
|
||||
/* This sets the window manager title for the window that
|
||||
* appears when a menu is torn off
|
||||
*/
|
||||
void gtk_menu_set_title (GtkMenu *menu,
|
||||
const gchar *title);
|
||||
G_CONST_RETURN gchar *gtk_menu_get_title (GtkMenu *menu);
|
||||
|
||||
void gtk_menu_reorder_child (GtkMenu *menu,
|
||||
GtkWidget *child,
|
||||
|
@ -311,6 +311,23 @@ gtk_menu_item_set_submenu (GtkMenuItem *menu_item,
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* gtk_menu_item_get_submenu:
|
||||
* @menu_item: a #GtkMenuItem
|
||||
*
|
||||
* Gets the submenu underneath this menu item, if any. See
|
||||
* gtk_menu_item_set_submenu().
|
||||
*
|
||||
* Return value: submenu for this menu item, or %NULL if none.
|
||||
**/
|
||||
GtkWidget *
|
||||
gtk_menu_item_get_submenu (GtkMenuItem *menu_item)
|
||||
{
|
||||
g_return_val_if_fail (GTK_IS_MENU_ITEM (menu_item), NULL);
|
||||
|
||||
return menu_item->submenu;
|
||||
}
|
||||
|
||||
void
|
||||
gtk_menu_item_remove_submenu (GtkMenuItem *menu_item)
|
||||
{
|
||||
|
@ -93,6 +93,7 @@ GtkWidget* gtk_menu_item_new_with_label (const gchar *label);
|
||||
GtkWidget* gtk_menu_item_new_with_mnemonic (const gchar *label);
|
||||
void gtk_menu_item_set_submenu (GtkMenuItem *menu_item,
|
||||
GtkWidget *submenu);
|
||||
GtkWidget* gtk_menu_item_get_submenu (GtkMenuItem *menu_item);
|
||||
void gtk_menu_item_remove_submenu (GtkMenuItem *menu_item);
|
||||
void gtk_menu_item_set_placement (GtkMenuItem *menu_item,
|
||||
GtkSubmenuPlacement placement);
|
||||
|
@ -242,6 +242,28 @@ gtk_misc_set_alignment (GtkMisc *misc,
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* gtk_misc_get_alignment:
|
||||
* @misc: a #GtkMisc
|
||||
* @xalign: location to store X alignment of @misc, or %NULL
|
||||
* @yalign: location to store Y alignment of @misc, or %NULL
|
||||
*
|
||||
* Gets the X and Y alignment of the widget within its allocation. See
|
||||
* gtk_misc_set_alignment().
|
||||
**/
|
||||
void
|
||||
gtk_misc_get_alignment (GtkMisc *misc,
|
||||
gfloat *xalign,
|
||||
gfloat *yalign)
|
||||
{
|
||||
g_return_if_fail (GTK_IS_MISC (misc));
|
||||
|
||||
if (xalign)
|
||||
*xalign = misc->xalign;
|
||||
if (yalign)
|
||||
*yalign = misc->yalign;
|
||||
}
|
||||
|
||||
void
|
||||
gtk_misc_set_padding (GtkMisc *misc,
|
||||
gint xpad,
|
||||
@ -280,6 +302,27 @@ gtk_misc_set_padding (GtkMisc *misc,
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* gtk_misc_get_padding:
|
||||
* @misc: a #GtkMisc
|
||||
* @xpad: location to store padding in the X direction, or %NULL
|
||||
* @ypad: location to store padding in the Y direction, or %NULL
|
||||
*
|
||||
* Gets the padding in the X and Y directions of the widget. See gtk_misc_set_padding().
|
||||
**/
|
||||
void
|
||||
gtk_misc_get_padding (GtkMisc *misc,
|
||||
gint *xpad,
|
||||
gint *ypad)
|
||||
{
|
||||
g_return_if_fail (GTK_IS_MISC (misc));
|
||||
|
||||
if (xpad)
|
||||
*xpad = misc->xpad;
|
||||
if (ypad)
|
||||
*ypad = misc->ypad;
|
||||
}
|
||||
|
||||
static void
|
||||
gtk_misc_realize (GtkWidget *widget)
|
||||
{
|
||||
|
@ -69,9 +69,15 @@ GtkType gtk_misc_get_type (void) G_GNUC_CONST;
|
||||
void gtk_misc_set_alignment (GtkMisc *misc,
|
||||
gfloat xalign,
|
||||
gfloat yalign);
|
||||
void gtk_misc_get_alignment (GtkMisc *misc,
|
||||
gfloat *xalign,
|
||||
gfloat *yalign);
|
||||
void gtk_misc_set_padding (GtkMisc *misc,
|
||||
gint xpad,
|
||||
gint ypad);
|
||||
void gtk_misc_get_padding (GtkMisc *misc,
|
||||
gint *xpad,
|
||||
gint *ypad);
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
@ -614,7 +614,7 @@ gtk_notebook_set_property (GObject *object,
|
||||
gtk_notebook_set_homogeneous_tabs (notebook, g_value_get_boolean (value));
|
||||
break;
|
||||
case PROP_PAGE:
|
||||
gtk_notebook_set_page (notebook, g_value_get_int (value));
|
||||
gtk_notebook_set_current_page (notebook, g_value_get_int (value));
|
||||
break;
|
||||
case PROP_TAB_POS:
|
||||
gtk_notebook_set_tab_pos (notebook, g_value_get_enum (value));
|
||||
@ -3956,7 +3956,7 @@ gtk_notebook_remove_page (GtkNotebook *notebook,
|
||||
/* Public GtkNotebook Page Switch Methods :
|
||||
* gtk_notebook_get_current_page
|
||||
* gtk_notebook_page_num
|
||||
* gtk_notebook_set_page
|
||||
* gtk_notebook_set_current_page
|
||||
* gtk_notebook_next_page
|
||||
* gtk_notebook_prev_page
|
||||
*/
|
||||
@ -4044,7 +4044,7 @@ gtk_notebook_page_num (GtkNotebook *notebook,
|
||||
}
|
||||
|
||||
/**
|
||||
* gtk_notebook_set_page:
|
||||
* gtk_notebook_set_current_page:
|
||||
* @notebook: a #GtkNotebook
|
||||
* @page_num: index of the page to switch to, starting from 0.
|
||||
* If negative, or greater than the number of pages
|
||||
@ -4053,8 +4053,8 @@ gtk_notebook_page_num (GtkNotebook *notebook,
|
||||
* Switches to the page number @page_num.
|
||||
**/
|
||||
void
|
||||
gtk_notebook_set_page (GtkNotebook *notebook,
|
||||
gint page_num)
|
||||
gtk_notebook_set_current_page (GtkNotebook *notebook,
|
||||
gint page_num)
|
||||
{
|
||||
GList *list;
|
||||
|
||||
@ -4159,6 +4159,23 @@ gtk_notebook_set_show_border (GtkNotebook *notebook,
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* gtk_notebook_get_show_border:
|
||||
* @notebook: a #GtkNotebook
|
||||
*
|
||||
* Returns whether a bevel will be drawn around the notebook pages. See
|
||||
* gtk_notebook_set_show_border().
|
||||
*
|
||||
* Return value: %TRUE if the bevel is drawn
|
||||
**/
|
||||
gboolean
|
||||
gtk_notebook_get_show_border (GtkNotebook *notebook)
|
||||
{
|
||||
g_return_val_if_fail (GTK_IS_NOTEBOOK (notebook), FALSE);
|
||||
|
||||
return notebook->show_border;
|
||||
}
|
||||
|
||||
/**
|
||||
* gtk_notebook_set_show_tabs:
|
||||
* @notebook: a #GtkNotebook
|
||||
@ -4214,6 +4231,23 @@ gtk_notebook_set_show_tabs (GtkNotebook *notebook,
|
||||
g_object_notify (G_OBJECT (notebook), "show_tabs");
|
||||
}
|
||||
|
||||
/**
|
||||
* gtk_notebook_get_show_tabs:
|
||||
* @notebook: a #GtkNotebook
|
||||
*
|
||||
* Returns whether the tabs of the notebook are shown. See
|
||||
* gtk_notebook_set_show_tabs().
|
||||
*
|
||||
* Return value: %TRUE if the tabs are shown
|
||||
**/
|
||||
gboolean
|
||||
gtk_notebook_get_show_tabs (GtkNotebook *notebook)
|
||||
{
|
||||
g_return_val_if_fail (GTK_IS_NOTEBOOK (notebook), FALSE);
|
||||
|
||||
return notebook->show_tabs;
|
||||
}
|
||||
|
||||
/**
|
||||
* gtk_notebook_set_tab_pos:
|
||||
* @notebook:
|
||||
@ -4238,6 +4272,23 @@ gtk_notebook_set_tab_pos (GtkNotebook *notebook,
|
||||
g_object_notify (G_OBJECT (notebook), "tab_pos");
|
||||
}
|
||||
|
||||
/**
|
||||
* gtk_notebook_get_tab_pos:
|
||||
* @notebook: a #GtkNotebook
|
||||
*
|
||||
* Gets the edge at which the tabs for switching pages in the
|
||||
* notebook are drawn.
|
||||
*
|
||||
* Return value: the edge at which the tabs are drawn
|
||||
**/
|
||||
GtkPositionType
|
||||
gtk_notebook_get_tab_pos (GtkNotebook *notebook)
|
||||
{
|
||||
g_return_val_if_fail (GTK_IS_NOTEBOOK (notebook), GTK_POS_TOP);
|
||||
|
||||
return notebook->tab_pos;
|
||||
}
|
||||
|
||||
/**
|
||||
* gtk_notebook_set_homogeneous_tabs:
|
||||
* @notebook: a #GtkNotebook
|
||||
@ -4373,6 +4424,23 @@ gtk_notebook_set_scrollable (GtkNotebook *notebook,
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* gtk_notebook_get_scrollable:
|
||||
* @notebook: a #GtkNotebook
|
||||
*
|
||||
* Returns whether the tab label area has arrows for scrolling. See
|
||||
* gtk_notebook_set_scrollable().
|
||||
*
|
||||
* Return value: %TRUE if arrows for scrolling are present
|
||||
**/
|
||||
gboolean
|
||||
gtk_notebook_get_scrollable (GtkNotebook *notebook)
|
||||
{
|
||||
g_return_val_if_fail (GTK_IS_NOTEBOOK (notebook), FALSE);
|
||||
|
||||
return notebook->scrollable;
|
||||
}
|
||||
|
||||
/* Public GtkNotebook Popup Menu Methods:
|
||||
*
|
||||
* gtk_notebook_popup_enable
|
||||
@ -4560,16 +4628,46 @@ gtk_notebook_set_tab_label_text (GtkNotebook *notebook,
|
||||
gtk_widget_child_notify (child, "tab_label");
|
||||
}
|
||||
|
||||
/**
|
||||
* gtk_notebook_get_tab_label_text:
|
||||
* @notebook: a #GtkNotebook
|
||||
* @child: a widget contained in a page of @notebook
|
||||
*
|
||||
* Retrieves the text of the tab label for the page containing
|
||||
* @child.
|
||||
*
|
||||
* Returns value: the text of the tab label, or %NULL if the
|
||||
* tab label widget is not a #GtkLabel. The
|
||||
* string is owned by the widget and must not
|
||||
* be freed.
|
||||
**/
|
||||
G_CONST_RETURN gchar *
|
||||
gtk_notebook_get_tab_label_text (GtkNotebook *notebook,
|
||||
GtkWidget *child)
|
||||
{
|
||||
GtkWidget *tab_label;
|
||||
|
||||
g_return_val_if_fail (GTK_IS_NOTEBOOK (notebook), NULL);
|
||||
g_return_val_if_fail (GTK_IS_WIDGET (child), NULL);
|
||||
|
||||
tab_label = gtk_notebook_get_tab_label (notebook, child);
|
||||
|
||||
if (tab_label && GTK_IS_LABEL (tab_label))
|
||||
return gtk_label_get_text (GTK_LABEL (tab_label));
|
||||
else
|
||||
return NULL;
|
||||
}
|
||||
|
||||
/**
|
||||
* gtk_notebook_get_menu_label:
|
||||
* @notebook: a #GtkNotebook
|
||||
* @child: the page
|
||||
* @child: a widget contained in a page of @notebook
|
||||
*
|
||||
* Returns the menu label of the page containing @child. NULL is
|
||||
* returned if @child is not in @notebook or NULL if it has the
|
||||
* default menu label.
|
||||
* Retrieves the menu label widget of the page containing @child.
|
||||
*
|
||||
* Return value: the menu label
|
||||
* Return value: the menu label, or %NULL if the
|
||||
* notebook page does not have a menu label other
|
||||
* than the default (the tab label).
|
||||
**/
|
||||
GtkWidget*
|
||||
gtk_notebook_get_menu_label (GtkNotebook *notebook,
|
||||
@ -4663,6 +4761,37 @@ gtk_notebook_set_menu_label_text (GtkNotebook *notebook,
|
||||
gtk_widget_child_notify (child, "menu_label");
|
||||
}
|
||||
|
||||
/**
|
||||
* gtk_notebook_get_menu_label_text:
|
||||
* @notebook: a #GtkNotebook
|
||||
* @child: the child widget of a page of the notebook.
|
||||
*
|
||||
* Retrieves the text of the menu label for the page containing
|
||||
* @child.
|
||||
*
|
||||
* Returns value: the text of the tab label, or %NULL if the
|
||||
* widget does not have a menu label other than
|
||||
* the default menu label, or the menu label widget
|
||||
* is not a #GtkLabel. The string is owned by
|
||||
* the widget and must not be freed.
|
||||
**/
|
||||
G_CONST_RETURN gchar *
|
||||
gtk_notebook_get_menu_label_text (GtkNotebook *notebook,
|
||||
GtkWidget *child)
|
||||
{
|
||||
GtkWidget *menu_label;
|
||||
|
||||
g_return_val_if_fail (GTK_IS_NOTEBOOK (notebook), NULL);
|
||||
g_return_val_if_fail (GTK_IS_WIDGET (child), NULL);
|
||||
|
||||
menu_label = gtk_notebook_get_menu_label (notebook, child);
|
||||
|
||||
if (menu_label && GTK_IS_LABEL (menu_label))
|
||||
return gtk_label_get_text (GTK_LABEL (menu_label));
|
||||
else
|
||||
return NULL;
|
||||
}
|
||||
|
||||
/* Helper function called when pages are reordered
|
||||
*/
|
||||
static void
|
||||
|
@ -143,7 +143,7 @@ GtkWidget* gtk_notebook_get_nth_page (GtkNotebook *notebook,
|
||||
gint page_num);
|
||||
gint gtk_notebook_page_num (GtkNotebook *notebook,
|
||||
GtkWidget *child);
|
||||
void gtk_notebook_set_page (GtkNotebook *notebook,
|
||||
void gtk_notebook_set_current_page (GtkNotebook *notebook,
|
||||
gint page_num);
|
||||
void gtk_notebook_next_page (GtkNotebook *notebook);
|
||||
void gtk_notebook_prev_page (GtkNotebook *notebook);
|
||||
@ -152,22 +152,30 @@ void gtk_notebook_prev_page (GtkNotebook *notebook);
|
||||
* set Notebook, NotebookTab style *
|
||||
***********************************************************/
|
||||
|
||||
void gtk_notebook_set_show_border (GtkNotebook *notebook,
|
||||
gboolean show_border);
|
||||
void gtk_notebook_set_show_tabs (GtkNotebook *notebook,
|
||||
gboolean show_tabs);
|
||||
void gtk_notebook_set_tab_pos (GtkNotebook *notebook,
|
||||
GtkPositionType pos);
|
||||
void gtk_notebook_set_homogeneous_tabs (GtkNotebook *notebook,
|
||||
gboolean homogeneous);
|
||||
void gtk_notebook_set_tab_border (GtkNotebook *notebook,
|
||||
guint border_width);
|
||||
void gtk_notebook_set_tab_hborder (GtkNotebook *notebook,
|
||||
guint tab_hborder);
|
||||
void gtk_notebook_set_tab_vborder (GtkNotebook *notebook,
|
||||
guint tab_vborder);
|
||||
void gtk_notebook_set_scrollable (GtkNotebook *notebook,
|
||||
gboolean scrollable);
|
||||
void gtk_notebook_set_show_border (GtkNotebook *notebook,
|
||||
gboolean show_border);
|
||||
gboolean gtk_notebook_get_show_border (GtkNotebook *notebook);
|
||||
void gtk_notebook_set_show_tabs (GtkNotebook *notebook,
|
||||
gboolean show_tabs);
|
||||
gboolean gtk_notebook_get_show_tabs (GtkNotebook *notebook);
|
||||
void gtk_notebook_set_tab_pos (GtkNotebook *notebook,
|
||||
GtkPositionType pos);
|
||||
GtkPositionType gtk_notebook_get_tab_pos (GtkNotebook *notebook);
|
||||
|
||||
#ifndef GTK_DISABLE_DEPRECATED
|
||||
void gtk_notebook_set_homogeneous_tabs (GtkNotebook *notebook,
|
||||
gboolean homogeneous);
|
||||
void gtk_notebook_set_tab_border (GtkNotebook *notebook,
|
||||
guint border_width);
|
||||
void gtk_notebook_set_tab_hborder (GtkNotebook *notebook,
|
||||
guint tab_hborder);
|
||||
void gtk_notebook_set_tab_vborder (GtkNotebook *notebook,
|
||||
guint tab_vborder);
|
||||
#endif /* GTK_DISABLE_DEPRECATED */
|
||||
|
||||
void gtk_notebook_set_scrollable (GtkNotebook *notebook,
|
||||
gboolean scrollable);
|
||||
gboolean gtk_notebook_get_scrollable (GtkNotebook *notebook);
|
||||
|
||||
/***********************************************************
|
||||
* enable/disable PopupMenu *
|
||||
@ -188,6 +196,8 @@ void gtk_notebook_set_tab_label (GtkNotebook *notebook,
|
||||
void gtk_notebook_set_tab_label_text (GtkNotebook *notebook,
|
||||
GtkWidget *child,
|
||||
const gchar *tab_text);
|
||||
G_CONST_RETURN gchar *gtk_notebook_get_tab_label_text (GtkNotebook *notebook,
|
||||
GtkWidget *child);
|
||||
GtkWidget * gtk_notebook_get_menu_label (GtkNotebook *notebook,
|
||||
GtkWidget *child);
|
||||
void gtk_notebook_set_menu_label (GtkNotebook *notebook,
|
||||
@ -196,6 +206,8 @@ void gtk_notebook_set_menu_label (GtkNotebook *notebook,
|
||||
void gtk_notebook_set_menu_label_text (GtkNotebook *notebook,
|
||||
GtkWidget *child,
|
||||
const gchar *menu_text);
|
||||
G_CONST_RETURN gchar *gtk_notebook_get_menu_label_text (GtkNotebook *notebook,
|
||||
GtkWidget *child);
|
||||
void gtk_notebook_query_tab_label_packing (GtkNotebook *notebook,
|
||||
GtkWidget *child,
|
||||
gboolean *expand,
|
||||
|
@ -129,7 +129,7 @@ gtk_radio_button_set_arg (GtkObject *object,
|
||||
|
||||
case ARG_GROUP:
|
||||
if (GTK_VALUE_OBJECT (*arg))
|
||||
slist = gtk_radio_button_group ((GtkRadioButton*) GTK_VALUE_OBJECT (*arg));
|
||||
slist = gtk_radio_button_get_group ((GtkRadioButton*) GTK_VALUE_OBJECT (*arg));
|
||||
else
|
||||
slist = NULL;
|
||||
gtk_radio_button_set_group (radio_button, slist);
|
||||
@ -263,7 +263,7 @@ gtk_radio_button_new_from_widget (GtkRadioButton *group)
|
||||
{
|
||||
GSList *l = NULL;
|
||||
if (group)
|
||||
l = gtk_radio_button_group (group);
|
||||
l = gtk_radio_button_get_group (group);
|
||||
return gtk_radio_button_new (l);
|
||||
}
|
||||
|
||||
@ -274,7 +274,7 @@ gtk_radio_button_new_with_label_from_widget (GtkRadioButton *group,
|
||||
{
|
||||
GSList *l = NULL;
|
||||
if (group)
|
||||
l = gtk_radio_button_group (group);
|
||||
l = gtk_radio_button_get_group (group);
|
||||
return gtk_radio_button_new_with_label (l, label);
|
||||
}
|
||||
|
||||
@ -295,12 +295,12 @@ gtk_radio_button_new_with_mnemonic_from_widget (GtkRadioButton *group,
|
||||
{
|
||||
GSList *l = NULL;
|
||||
if (group)
|
||||
l = gtk_radio_button_group (group);
|
||||
l = gtk_radio_button_get_group (group);
|
||||
return gtk_radio_button_new_with_mnemonic (l, label);
|
||||
}
|
||||
|
||||
GSList*
|
||||
gtk_radio_button_group (GtkRadioButton *radio_button)
|
||||
gtk_radio_button_get_group (GtkRadioButton *radio_button)
|
||||
{
|
||||
g_return_val_if_fail (radio_button != NULL, NULL);
|
||||
g_return_val_if_fail (GTK_IS_RADIO_BUTTON (radio_button), NULL);
|
||||
|
@ -73,10 +73,14 @@ GtkWidget* gtk_radio_button_new_with_mnemonic (GSList *group
|
||||
const gchar *label);
|
||||
GtkWidget* gtk_radio_button_new_with_mnemonic_from_widget (GtkRadioButton *group,
|
||||
const gchar *label);
|
||||
GSList* gtk_radio_button_group (GtkRadioButton *radio_button);
|
||||
GSList* gtk_radio_button_get_group (GtkRadioButton *radio_button);
|
||||
void gtk_radio_button_set_group (GtkRadioButton *radio_button,
|
||||
GSList *group);
|
||||
|
||||
#ifndef GTK_DISABLE_DEPRECATED
|
||||
#define gtk_radio_button_group gtk_radio_button_get_group
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif /* __cplusplus */
|
||||
|
@ -430,6 +430,22 @@ gtk_range_set_update_policy (GtkRange *range,
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* gtk_range_get_update_policy:
|
||||
* @range: a #GtkRange
|
||||
*
|
||||
* Gets the update policy of @range. See gtk_range_set_update_policy().
|
||||
*
|
||||
* Return value: the current update policy
|
||||
**/
|
||||
GtkUpdateType
|
||||
gtk_range_get_update_policy (GtkRange *range)
|
||||
{
|
||||
g_return_val_if_fail (GTK_IS_RANGE (range), GTK_UPDATE_CONTINUOUS);
|
||||
|
||||
return range->update_policy;
|
||||
}
|
||||
|
||||
/**
|
||||
* gtk_range_set_adjustment:
|
||||
* @range: a #GtkRange
|
||||
|
@ -123,6 +123,7 @@ GtkType gtk_range_get_type (void) G_GNUC_CONST;
|
||||
|
||||
void gtk_range_set_update_policy (GtkRange *range,
|
||||
GtkUpdateType policy);
|
||||
GtkUpdateType gtk_range_get_update_policy (GtkRange *range);
|
||||
void gtk_range_set_adjustment (GtkRange *range,
|
||||
GtkAdjustment *adjustment);
|
||||
GtkAdjustment* gtk_range_get_adjustment (GtkRange *range);
|
||||
|
@ -239,6 +239,30 @@ gtk_ruler_set_metric (GtkRuler *ruler,
|
||||
gtk_widget_queue_draw (GTK_WIDGET (ruler));
|
||||
}
|
||||
|
||||
/**
|
||||
* gtk_ruler_get_metric:
|
||||
* @ruler: a #GtkRuler
|
||||
*
|
||||
* Gets the units used for a #GtkRule . See gtk_ruler_set_metric().
|
||||
*
|
||||
* Return value: the units currently used for @ruler
|
||||
**/
|
||||
GtkMetricType
|
||||
gtk_ruler_get_metric (GtkRuler *ruler)
|
||||
{
|
||||
gint i;
|
||||
|
||||
g_return_val_if_fail (GTK_IS_RULER (ruler), 0);
|
||||
|
||||
for (i = 0; i < G_N_ELEMENTS (ruler_metrics); i++)
|
||||
if (ruler->metric == &ruler_metrics[i])
|
||||
return i;
|
||||
|
||||
g_assert_not_reached ();
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
void
|
||||
gtk_ruler_set_range (GtkRuler *ruler,
|
||||
gdouble lower,
|
||||
@ -274,6 +298,37 @@ gtk_ruler_set_range (GtkRuler *ruler,
|
||||
gtk_widget_queue_draw (GTK_WIDGET (ruler));
|
||||
}
|
||||
|
||||
/**
|
||||
* gtk_ruler_get_range:
|
||||
* @ruler: a #GtkRuler
|
||||
* @lower: location to store lower limit of the ruler, or %NULL
|
||||
* @upper: location to store upper limit of the ruler, or %NULL
|
||||
* @position: location to store the current position of the mark on the ruler, or %NULL
|
||||
* @max_size: location to store the maximum size of the ruler used when calculating
|
||||
* the space to leave for the text, or %NULL.
|
||||
*
|
||||
* Retrieves values indicating the range and current position of a #GtkRuler.
|
||||
* See gtk_ruler_set_range().
|
||||
**/
|
||||
void
|
||||
gtk_ruler_get_range (GtkRuler *ruler,
|
||||
gdouble *lower,
|
||||
gdouble *upper,
|
||||
gdouble *position,
|
||||
gdouble *max_size)
|
||||
{
|
||||
g_return_if_fail (GTK_IS_RULER (ruler));
|
||||
|
||||
if (lower)
|
||||
*lower = ruler->lower;
|
||||
if (upper)
|
||||
*upper = ruler->upper;
|
||||
if (position)
|
||||
*position = ruler->position;
|
||||
if (max_size)
|
||||
*max_size = ruler->max_size;
|
||||
}
|
||||
|
||||
void
|
||||
gtk_ruler_draw_ticks (GtkRuler *ruler)
|
||||
{
|
||||
|
@ -113,6 +113,12 @@ void gtk_ruler_set_range (GtkRuler *ruler,
|
||||
void gtk_ruler_draw_ticks (GtkRuler *ruler);
|
||||
void gtk_ruler_draw_pos (GtkRuler *ruler);
|
||||
|
||||
GtkMetricType gtk_ruler_get_metric (GtkRuler *ruler);
|
||||
void gtk_ruler_get_range (GtkRuler *ruler,
|
||||
gdouble *lower,
|
||||
gdouble *upper,
|
||||
gdouble *position,
|
||||
gdouble *max_size);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
@ -455,6 +455,28 @@ gtk_scrolled_window_set_policy (GtkScrolledWindow *scrolled_window,
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* gtk_scrolled_window_get_policy:
|
||||
* @scrolled_window: a #GtkScrolledWindow
|
||||
* @hscrollbar_policy: location to store the policy for the horizontal scrollbar, or %NULL.
|
||||
* @vscrollbar_policy: location to store the policy for the horizontal scrollbar, or %NULL.
|
||||
*
|
||||
* Retrieves the current policy values for the horizontal and vertical
|
||||
* scrollbars. See gtk_scrolled_window_set_policy().
|
||||
**/
|
||||
void
|
||||
gtk_scrolled_window_get_policy (GtkScrolledWindow *scrolled_window,
|
||||
GtkPolicyType *hscrollbar_policy,
|
||||
GtkPolicyType *vscrollbar_policy)
|
||||
{
|
||||
g_return_if_fail (GTK_IS_SCROLLED_WINDOW (scrolled_window));
|
||||
|
||||
if (hscrollbar_policy)
|
||||
*hscrollbar_policy = scrolled_window->hscrollbar_policy;
|
||||
if (vscrollbar_policy)
|
||||
*vscrollbar_policy = scrolled_window->vscrollbar_policy;
|
||||
}
|
||||
|
||||
void
|
||||
gtk_scrolled_window_set_placement (GtkScrolledWindow *scrolled_window,
|
||||
GtkCornerType window_placement)
|
||||
@ -470,6 +492,23 @@ gtk_scrolled_window_set_placement (GtkScrolledWindow *scrolled_window,
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* gtk_scrolled_window_get_placement:
|
||||
* @scrolled_window: a #GtkScrolledWindow
|
||||
*
|
||||
* Gets the placement of the scrollbars for the scrolled window. See
|
||||
* gtk_scrolled_window_set_placement().
|
||||
*
|
||||
* Return value: the current placement value.
|
||||
**/
|
||||
GtkCornerType
|
||||
gtk_scrolled_window_get_placement (GtkScrolledWindow *scrolled_window)
|
||||
{
|
||||
g_return_val_if_fail (GTK_IS_SCROLLED_WINDOW (scrolled_window), GTK_CORNER_TOP_LEFT);
|
||||
|
||||
return scrolled_window->window_placement;
|
||||
}
|
||||
|
||||
/**
|
||||
* gtk_scrolled_window_set_shadow_type:
|
||||
* @scrolled_window: a #GtkScrolledWindow
|
||||
@ -497,6 +536,23 @@ gtk_scrolled_window_set_shadow_type (GtkScrolledWindow *scrolled_window,
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* gtk_scrolled_window_get_shadow_type:
|
||||
* @scrolled_window: a #GtkScrolledWindow
|
||||
*
|
||||
* Gets the shadow type of the scrolled window. See
|
||||
* gtk_scrolled_window_set_shadow_type().
|
||||
*
|
||||
* Return value: the current shadow type
|
||||
**/
|
||||
GtkShadowType
|
||||
gtk_scrolled_window_get_shadow_type (GtkScrolledWindow *scrolled_window)
|
||||
{
|
||||
g_return_val_if_fail (GTK_IS_SCROLLED_WINDOW (scrolled_window), GTK_SHADOW_NONE);
|
||||
|
||||
return scrolled_window->shadow_type;
|
||||
}
|
||||
|
||||
static void
|
||||
gtk_scrolled_window_destroy (GtkObject *object)
|
||||
{
|
||||
|
@ -87,10 +87,15 @@ GtkAdjustment* gtk_scrolled_window_get_vadjustment (GtkScrolledWindow *scrolle
|
||||
void gtk_scrolled_window_set_policy (GtkScrolledWindow *scrolled_window,
|
||||
GtkPolicyType hscrollbar_policy,
|
||||
GtkPolicyType vscrollbar_policy);
|
||||
void gtk_scrolled_window_get_policy (GtkScrolledWindow *scrolled_window,
|
||||
GtkPolicyType *hscrollbar_policy,
|
||||
GtkPolicyType *vscrollvar_policy);
|
||||
void gtk_scrolled_window_set_placement (GtkScrolledWindow *scrolled_window,
|
||||
GtkCornerType window_placement);
|
||||
GtkCornerType gtk_scrolled_window_get_placement (GtkScrolledWindow *scrolled_window);
|
||||
void gtk_scrolled_window_set_shadow_type (GtkScrolledWindow *scrolled_window,
|
||||
GtkShadowType type);
|
||||
GtkShadowType gtk_scrolled_window_get_shadow_type (GtkScrolledWindow *scrolled_window);
|
||||
void gtk_scrolled_window_add_with_viewport (GtkScrolledWindow *scrolled_window,
|
||||
GtkWidget *child);
|
||||
|
||||
|
@ -1652,6 +1652,22 @@ gtk_spin_button_set_digits (GtkSpinButton *spin_button,
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* gtk_spin_button_get_digits:
|
||||
* @spin_button: a #GtkSpinButton
|
||||
*
|
||||
* Fetches the precision of @spin_button. See gtk_spin_button_set_digits().
|
||||
*
|
||||
* Returns: the current precision
|
||||
**/
|
||||
guint
|
||||
gtk_spin_button_get_digits (GtkSpinButton *spin_button)
|
||||
{
|
||||
g_return_val_if_fail (GTK_IS_SPIN_BUTTON (spin_button), 0);
|
||||
|
||||
return spin_button->digits;
|
||||
}
|
||||
|
||||
/**
|
||||
* gtk_spin_button_set_increments:
|
||||
* @spin_button: a #GtkSpinButton
|
||||
@ -1672,6 +1688,28 @@ gtk_spin_button_set_increments (GtkSpinButton *spin_button,
|
||||
spin_button->adjustment->page_increment = page;
|
||||
}
|
||||
|
||||
/**
|
||||
* gtk_spin_button_get_increments:
|
||||
* @psin_button: a #GtkSpinButton
|
||||
* @step: location to store step increment, or %NULL
|
||||
* @page: location to store page increment, or %NULL
|
||||
*
|
||||
* Gets the current step and page the increments used by @spin_button. See
|
||||
* gtk_spin_button_set_increments().
|
||||
**/
|
||||
void
|
||||
gtk_spin_button_get_increments (GtkSpinButton *spin_button,
|
||||
gdouble *step,
|
||||
gdouble *page)
|
||||
{
|
||||
g_return_if_fail (GTK_IS_SPIN_BUTTON (spin_button));
|
||||
|
||||
if (step)
|
||||
*step = spin_button->adjustment->step_increment;
|
||||
if (page)
|
||||
*page = spin_button->adjustment->page_increment;
|
||||
}
|
||||
|
||||
/**
|
||||
* gtk_spin_button_set_range:
|
||||
* @spin_button: a #GtkSpinButton
|
||||
@ -1702,6 +1740,28 @@ gtk_spin_button_set_range (GtkSpinButton *spin_button,
|
||||
gtk_adjustment_changed (spin_button->adjustment);
|
||||
}
|
||||
|
||||
/**
|
||||
* gtk_spin_button_get_range:
|
||||
* @spin_button: a #GtkSpinButton
|
||||
* @min: location to store minimum allowed value, or %NULL
|
||||
* @max: location to store maximum allowed value, or %NULL
|
||||
*
|
||||
* Gets the range allowed for @spin_button. See
|
||||
* gtk_spin_button_set_range().
|
||||
**/
|
||||
void
|
||||
gtk_spin_button_get_range (GtkSpinButton *spin_button,
|
||||
gdouble *min,
|
||||
gdouble *max)
|
||||
{
|
||||
g_return_if_fail (GTK_IS_SPIN_BUTTON (spin_button));
|
||||
|
||||
if (min)
|
||||
*min = spin_button->adjustment->lower;
|
||||
if (max)
|
||||
*max = spin_button->adjustment->upper;
|
||||
}
|
||||
|
||||
/**
|
||||
* gtk_spin_button_get_value:
|
||||
* @spin_button: a #GtkSpinButton
|
||||
@ -1786,6 +1846,23 @@ gtk_spin_button_set_update_policy (GtkSpinButton *spin_button,
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* gtk_spin_button_get_update_policy:
|
||||
* @spin_button: a #GtkSpinButton
|
||||
*
|
||||
* Gets the update behavior of a spin button. See
|
||||
* gtk_spin_button_set_update_policy().
|
||||
*
|
||||
* Return value: the current update policy
|
||||
**/
|
||||
GtkSpinButtonUpdatePolicy
|
||||
gtk_spin_button_get_update_policy (GtkSpinButton *spin_button)
|
||||
{
|
||||
g_return_val_if_fail (GTK_IS_SPIN_BUTTON (spin_button), GTK_UPDATE_ALWAYS);
|
||||
|
||||
return spin_button->update_policy;
|
||||
}
|
||||
|
||||
/**
|
||||
* gtk_spin_button_set_numeric:
|
||||
* @spin_button: a #GtkSpinButton
|
||||
@ -1805,6 +1882,23 @@ gtk_spin_button_set_numeric (GtkSpinButton *spin_button,
|
||||
g_object_notify (G_OBJECT (spin_button), "numeric");
|
||||
}
|
||||
|
||||
/**
|
||||
* gtk_spin_button_get_numeric:
|
||||
* @spin_button: a #GtkSpinButton
|
||||
*
|
||||
* Returns whether non-numeric text can be typed into the spin button.
|
||||
* See gtk_spin_button_set_numeric().
|
||||
*
|
||||
* Return value: %TRUE if only numeric text can be entered
|
||||
**/
|
||||
gboolean
|
||||
gtk_spin_button_get_numeric (GtkSpinButton *spin_button)
|
||||
{
|
||||
g_return_val_if_fail (GTK_IS_SPIN_BUTTON (spin_button), FALSE);
|
||||
|
||||
return spin_button->numeric;
|
||||
}
|
||||
|
||||
/**
|
||||
* gtk_spin_button_set_wrap:
|
||||
* @spin_button: a #GtkSpinButton
|
||||
@ -1824,6 +1918,24 @@ gtk_spin_button_set_wrap (GtkSpinButton *spin_button,
|
||||
g_object_notify (G_OBJECT (spin_button), "wrap");
|
||||
}
|
||||
|
||||
/**
|
||||
* gtk_spin_button_get_wrap:
|
||||
* @spin_button: a #GtkSpinButton
|
||||
*
|
||||
* Returns whether the spin button's value wraps around to the
|
||||
* opposite limit when the upper or lower limit of the range is
|
||||
* exceeded. See gtk_spin_button_set_wrap().
|
||||
*
|
||||
* Return value: %TRUE if the spin button wraps around
|
||||
**/
|
||||
gboolean
|
||||
gtk_spin_button_get_wrap (GtkSpinButton *spin_button)
|
||||
{
|
||||
g_return_val_if_fail (GTK_IS_SPIN_BUTTON (spin_button), FALSE);
|
||||
|
||||
return spin_button->wrap;
|
||||
}
|
||||
|
||||
/**
|
||||
* spin_button_get_shadow_type:
|
||||
* @spin_button: a #GtkSpinButton
|
||||
@ -1871,6 +1983,23 @@ gtk_spin_button_set_snap_to_ticks (GtkSpinButton *spin_button,
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* gtk_spin_button_get_snap_to_ticks:
|
||||
* @spin_button: a #GtkSpinButton
|
||||
*
|
||||
* Returns whether the values are corrected to the nearest step. See
|
||||
* gtk_spin_button_set_snap_to_ticks().
|
||||
*
|
||||
* Return value: %TRUE if values are snapped to the nearest step.
|
||||
**/
|
||||
gboolean
|
||||
gtk_spin_button_get_snap_to_ticks (GtkSpinButton *spin_button)
|
||||
{
|
||||
g_return_val_if_fail (GTK_IS_SPIN_BUTTON (spin_button), FALSE);
|
||||
|
||||
return spin_button->snap_to_ticks;
|
||||
}
|
||||
|
||||
/**
|
||||
* gtk_spin_button_spin:
|
||||
* @spin_button: a #GtkSpinButton
|
||||
|
@ -132,14 +132,21 @@ GtkAdjustment* gtk_spin_button_get_adjustment (GtkSpinButton *spin_button);
|
||||
|
||||
void gtk_spin_button_set_digits (GtkSpinButton *spin_button,
|
||||
guint digits);
|
||||
guint gtk_spin_button_get_digits (GtkSpinButton *spin_button);
|
||||
|
||||
void gtk_spin_button_set_increments (GtkSpinButton *spin_button,
|
||||
gdouble step,
|
||||
gdouble page);
|
||||
void gtk_spin_button_get_increments (GtkSpinButton *spin_button,
|
||||
gdouble *step,
|
||||
gdouble *page);
|
||||
|
||||
void gtk_spin_button_set_range (GtkSpinButton *spin_button,
|
||||
gdouble min,
|
||||
gdouble max);
|
||||
void gtk_spin_button_get_range (GtkSpinButton *spin_button,
|
||||
gdouble *min,
|
||||
gdouble *max);
|
||||
|
||||
gdouble gtk_spin_button_get_value (GtkSpinButton *spin_button);
|
||||
|
||||
@ -150,9 +157,11 @@ void gtk_spin_button_set_value (GtkSpinButton *spin_button,
|
||||
|
||||
void gtk_spin_button_set_update_policy (GtkSpinButton *spin_button,
|
||||
GtkSpinButtonUpdatePolicy policy);
|
||||
GtkSpinButtonUpdatePolicy gtk_spin_button_get_update_policy (GtkSpinButton *spin_button);
|
||||
|
||||
void gtk_spin_button_set_numeric (GtkSpinButton *spin_button,
|
||||
gboolean numeric);
|
||||
gboolean gtk_spin_button_get_numeric (GtkSpinButton *spin_button);
|
||||
|
||||
void gtk_spin_button_spin (GtkSpinButton *spin_button,
|
||||
GtkSpinType direction,
|
||||
@ -160,9 +169,11 @@ void gtk_spin_button_spin (GtkSpinButton *spin_button,
|
||||
|
||||
void gtk_spin_button_set_wrap (GtkSpinButton *spin_button,
|
||||
gboolean wrap);
|
||||
gboolean gtk_spin_button_get_wrap (GtkSpinButton *spin_button);
|
||||
|
||||
void gtk_spin_button_set_snap_to_ticks (GtkSpinButton *spin_button,
|
||||
gboolean snap_to_ticks);
|
||||
gboolean gtk_spin_button_get_snap_to_ticks (GtkSpinButton *spin_button);
|
||||
void gtk_spin_button_update (GtkSpinButton *spin_button);
|
||||
|
||||
|
||||
|
@ -661,6 +661,26 @@ gtk_table_set_row_spacing (GtkTable *table,
|
||||
g_object_notify (G_OBJECT (table), "row_spacing");
|
||||
}
|
||||
|
||||
/**
|
||||
* gtk_table_get_row_spacing:
|
||||
* @table: a #GtkTable
|
||||
* @row: a row in the table, 0 indicates the first row
|
||||
*
|
||||
* Gets the amount of space between row @row, and
|
||||
* row @row + 1. See gtk_table_set_row_spacing().
|
||||
*
|
||||
* Return value: the row spacing
|
||||
**/
|
||||
guint
|
||||
gtk_table_get_row_spacing (GtkTable *table,
|
||||
guint row)
|
||||
{
|
||||
g_return_val_if_fail (GTK_IS_TABLE (table), 0);
|
||||
g_return_val_if_fail (row < table->nrows - 1, 0);
|
||||
|
||||
return table->rows[row].spacing;
|
||||
}
|
||||
|
||||
void
|
||||
gtk_table_set_col_spacing (GtkTable *table,
|
||||
guint column,
|
||||
@ -681,6 +701,26 @@ gtk_table_set_col_spacing (GtkTable *table,
|
||||
g_object_notify (G_OBJECT (table), "column_spacing");
|
||||
}
|
||||
|
||||
/**
|
||||
* gtk_table_get_col_spacing:
|
||||
* @table: a #GtkTable
|
||||
* @col: a column in the table, 0 indicates the first column
|
||||
*
|
||||
* Gets the amount of space between column @col, and
|
||||
* column @col + 1. See gtk_table_set_col_spacing().
|
||||
*
|
||||
* Return value: the column spacing
|
||||
**/
|
||||
guint
|
||||
gtk_table_get_col_spacing (GtkTable *table,
|
||||
guint column)
|
||||
{
|
||||
g_return_val_if_fail (GTK_IS_TABLE (table), 0);
|
||||
g_return_val_if_fail (column < table->ncols, 0);
|
||||
|
||||
return table->cols[column].spacing;
|
||||
}
|
||||
|
||||
void
|
||||
gtk_table_set_row_spacings (GtkTable *table,
|
||||
guint spacing)
|
||||
@ -698,6 +738,24 @@ gtk_table_set_row_spacings (GtkTable *table,
|
||||
gtk_widget_queue_resize (GTK_WIDGET (table));
|
||||
}
|
||||
|
||||
/**
|
||||
* gtk_table_get_default_row_spacing:
|
||||
* @table: a #GtkTable
|
||||
*
|
||||
* Gets the default row spacing for the table. This is
|
||||
* the spacing that will be used for newly added rows.
|
||||
* (See gtk_table_set_row_spacings())
|
||||
*
|
||||
* Returns value: the default row spacing
|
||||
**/
|
||||
guint
|
||||
gtk_table_get_default_row_spacing (GtkTable *table)
|
||||
{
|
||||
g_return_val_if_fail (GTK_IS_TABLE (table), 0);
|
||||
|
||||
return table->row_spacing;
|
||||
}
|
||||
|
||||
void
|
||||
gtk_table_set_col_spacings (GtkTable *table,
|
||||
guint spacing)
|
||||
@ -715,6 +773,24 @@ gtk_table_set_col_spacings (GtkTable *table,
|
||||
gtk_widget_queue_resize (GTK_WIDGET (table));
|
||||
}
|
||||
|
||||
/**
|
||||
* gtk_table_get_default_col_spacing:
|
||||
* @table: a #GtkTable
|
||||
*
|
||||
* Gets the default column spacing for the table. This is
|
||||
* the spacing that will be used for newly added columns.
|
||||
* (See gtk_table_set_col_spacings())
|
||||
*
|
||||
* Returns value: the default column spacing
|
||||
**/
|
||||
guint
|
||||
gtk_table_get_default_col_spacing (GtkTable *table)
|
||||
{
|
||||
g_return_val_if_fail (GTK_IS_TABLE (table), 0);
|
||||
|
||||
return table->column_spacing;
|
||||
}
|
||||
|
||||
void
|
||||
gtk_table_set_homogeneous (GtkTable *table,
|
||||
gboolean homogeneous)
|
||||
@ -732,6 +808,23 @@ gtk_table_set_homogeneous (GtkTable *table,
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* gtk_table_get_homogeneous:
|
||||
* @table: a #GtkTable
|
||||
*
|
||||
* Returns whether the table cells are all constrained to the same
|
||||
* width and height. (See gtk_table_set_homogenous ())
|
||||
*
|
||||
* Return value: %TRUE if the cells are all constrained to the same size
|
||||
**/
|
||||
gboolean
|
||||
gtk_table_get_homogeneous (GtkTable *table)
|
||||
{
|
||||
g_return_val_if_fail (GTK_IS_TABLE (table), FALSE);
|
||||
|
||||
return table->homogeneous;
|
||||
}
|
||||
|
||||
static void
|
||||
gtk_table_finalize (GObject *object)
|
||||
{
|
||||
|
@ -125,15 +125,22 @@ void gtk_table_attach_defaults (GtkTable *table,
|
||||
void gtk_table_set_row_spacing (GtkTable *table,
|
||||
guint row,
|
||||
guint spacing);
|
||||
guint gtk_table_get_row_spacing (GtkTable *table,
|
||||
guint row);
|
||||
void gtk_table_set_col_spacing (GtkTable *table,
|
||||
guint column,
|
||||
guint spacing);
|
||||
guint gtk_table_get_col_spacing (GtkTable *table,
|
||||
guint column);
|
||||
void gtk_table_set_row_spacings (GtkTable *table,
|
||||
guint spacing);
|
||||
guint gtk_table_get_default_row_spacing (GtkTable *table);
|
||||
void gtk_table_set_col_spacings (GtkTable *table,
|
||||
guint spacing);
|
||||
guint gtk_table_get_default_col_spacing (GtkTable *table);
|
||||
void gtk_table_set_homogeneous (GtkTable *table,
|
||||
gboolean homogeneous);
|
||||
gboolean gtk_table_get_homogeneous (GtkTable *table);
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
@ -363,6 +363,23 @@ gtk_text_layout_set_cursor_direction (GtkTextLayout *layout,
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* gtk_text_layout_get_buffer:
|
||||
* @layout: a #GtkTextLayout
|
||||
*
|
||||
* Gets the text buffer used by the layout. See
|
||||
* gtk_text_layout_set_buffer().
|
||||
*
|
||||
* Return value: the text buffer used by the layout.
|
||||
**/
|
||||
GtkTextBuffer *
|
||||
gtk_text_layout_get_buffer (GtkTextLayout *layout)
|
||||
{
|
||||
g_return_val_if_fail (GTK_IS_TEXT_LAYOUT (layout), NULL);
|
||||
|
||||
return layout->buffer;
|
||||
}
|
||||
|
||||
void
|
||||
gtk_text_layout_set_screen_width (GtkTextLayout *layout, gint width)
|
||||
{
|
||||
|
@ -245,18 +245,20 @@ struct _GtkTextLineDisplay
|
||||
extern PangoAttrType gtk_text_attr_appearance_type;
|
||||
|
||||
GType gtk_text_layout_get_type (void) G_GNUC_CONST;
|
||||
GtkTextLayout* gtk_text_layout_new (void);
|
||||
void gtk_text_layout_set_buffer (GtkTextLayout *layout,
|
||||
GtkTextBuffer *buffer);
|
||||
void gtk_text_layout_set_default_style (GtkTextLayout *layout,
|
||||
GtkTextAttributes *values);
|
||||
void gtk_text_layout_set_contexts (GtkTextLayout *layout,
|
||||
PangoContext *ltr_context,
|
||||
PangoContext *rtl_context);
|
||||
void gtk_text_layout_set_cursor_direction (GtkTextLayout *layout,
|
||||
GtkTextDirection direction);
|
||||
void gtk_text_layout_default_style_changed (GtkTextLayout *layout);
|
||||
|
||||
|
||||
GtkTextLayout* gtk_text_layout_new (void);
|
||||
void gtk_text_layout_set_buffer (GtkTextLayout *layout,
|
||||
GtkTextBuffer *buffer);
|
||||
GtkTextBuffer *gtk_text_layout_get_buffer (GtkTextLayout *layout);
|
||||
void gtk_text_layout_set_default_style (GtkTextLayout *layout,
|
||||
GtkTextAttributes *values);
|
||||
void gtk_text_layout_set_contexts (GtkTextLayout *layout,
|
||||
PangoContext *ltr_context,
|
||||
PangoContext *rtl_context);
|
||||
void gtk_text_layout_set_cursor_direction (GtkTextLayout *layout,
|
||||
GtkTextDirection direction);
|
||||
void gtk_text_layout_default_style_changed (GtkTextLayout *layout);
|
||||
|
||||
void gtk_text_layout_set_screen_width (GtkTextLayout *layout,
|
||||
gint width);
|
||||
void gtk_text_layout_set_preedit_string (GtkTextLayout *layout,
|
||||
|
@ -6043,11 +6043,51 @@ gtk_text_view_set_border_window_size (GtkTextView *text_view,
|
||||
break;
|
||||
|
||||
default:
|
||||
g_warning ("Can't set size of center or widget or private GtkTextWindowType in %s", G_STRLOC);
|
||||
g_warning ("Can only set size of left/right/top/bottom border windows with gtk_text_view_set_border_window_size in %s\n", G_STRLOC);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* gtk_text_view_get_border_window_size:
|
||||
* @text_view: a #GtkTextView
|
||||
* @type: window to return size from
|
||||
*
|
||||
* Gets the width of the specified border window. See
|
||||
* gtk_text_view_set_border_window_size().
|
||||
*
|
||||
* Return value: width of window
|
||||
**/
|
||||
gint
|
||||
gtk_text_view_get_border_window_size (GtkTextView *text_view,
|
||||
GtkTextWindowType type)
|
||||
{
|
||||
g_return_val_if_fail (GTK_IS_TEXT_VIEW (text_view), 0);
|
||||
g_return_val_if_fail (type != GTK_TEXT_WINDOW_WIDGET, 0);
|
||||
g_return_val_if_fail (type != GTK_TEXT_WINDOW_TEXT, 0);
|
||||
|
||||
switch (type)
|
||||
{
|
||||
case GTK_TEXT_WINDOW_LEFT:
|
||||
return text_view->left_window->requisition.width;
|
||||
|
||||
case GTK_TEXT_WINDOW_RIGHT:
|
||||
return text_view->right_window->requisition.width;
|
||||
|
||||
case GTK_TEXT_WINDOW_TOP:
|
||||
return text_view->top_window->requisition.height;
|
||||
|
||||
case GTK_TEXT_WINDOW_BOTTOM:
|
||||
return text_view->bottom_window->requisition.height;
|
||||
|
||||
default:
|
||||
g_warning ("Can only get size of left/right/top/bottom border windows with gtk_text_view_get_border_window_size in %s\n", G_STRLOC);
|
||||
break;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* gtk_text_view_set_text_window_size:
|
||||
* @text_view: a #GtkTextView
|
||||
|
@ -248,6 +248,8 @@ GtkTextWindowType gtk_text_view_get_window_type (GtkTextView *text_view,
|
||||
void gtk_text_view_set_border_window_size (GtkTextView *text_view,
|
||||
GtkTextWindowType type,
|
||||
gint size);
|
||||
gint gtk_text_view_get_border_window_size (GtkTextView *text_view,
|
||||
GtkTextWindowType type);
|
||||
void gtk_text_view_set_text_window_size (GtkTextView *text_view,
|
||||
gint width,
|
||||
gint height);
|
||||
|
@ -333,6 +333,23 @@ gtk_toggle_button_set_mode (GtkToggleButton *toggle_button,
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* gtk_toggle_button_get_mode:
|
||||
* @toggle_button: a #GtkToggleButton
|
||||
*
|
||||
* Retrieves whether the button is displayed as a separate indicator
|
||||
* and label. See gtk_toggle_button_set_mode().
|
||||
*
|
||||
* Return value: %TRUE if the togglebutton is drawn as a separate indicator
|
||||
* and label.
|
||||
**/
|
||||
gboolean
|
||||
gtk_toggle_button_get_mode (GtkToggleButton *toggle_button)
|
||||
{
|
||||
g_return_val_if_fail (GTK_IS_TOGGLE_BUTTON (toggle_button), FALSE);
|
||||
|
||||
return toggle_button->draw_indicator;
|
||||
}
|
||||
|
||||
void
|
||||
gtk_toggle_button_set_active (GtkToggleButton *toggle_button,
|
||||
|
@ -74,6 +74,7 @@ GtkWidget* gtk_toggle_button_new_with_label (const gchar *label);
|
||||
GtkWidget* gtk_toggle_button_new_with_mnemonic (const gchar *label);
|
||||
void gtk_toggle_button_set_mode (GtkToggleButton *toggle_button,
|
||||
gboolean draw_indicator);
|
||||
gboolean gtk_toggle_button_get_mode (GtkToggleButton *toggle_button);
|
||||
void gtk_toggle_button_set_active (GtkToggleButton *toggle_button,
|
||||
gboolean is_active);
|
||||
gboolean gtk_toggle_button_get_active (GtkToggleButton *toggle_button);
|
||||
|
@ -1057,6 +1057,22 @@ gtk_toolbar_set_icon_size (GtkToolbar *toolbar,
|
||||
gtk_widget_queue_resize (GTK_WIDGET (toolbar));
|
||||
}
|
||||
|
||||
/**
|
||||
* gtk_toolbar_get_icon_size:
|
||||
* @toolbar: a #GtkToolbar
|
||||
*
|
||||
* Retrieves the icon size fo the toolbar. See gtk_toolbar_set_icon_size().
|
||||
*
|
||||
* Return value: the current icon size for the icons on the toolbar.
|
||||
**/
|
||||
GtkIconSize
|
||||
gtk_toolbar_get_icon_size (GtkToolbar *toolbar)
|
||||
{
|
||||
g_return_val_if_fail (GTK_IS_TOOLBAR (toolbar), GTK_ICON_SIZE_LARGE_TOOLBAR);
|
||||
|
||||
return toolbar->icon_size;
|
||||
}
|
||||
|
||||
/**
|
||||
* gtk_toolbar_unset_icon_size:
|
||||
* @toolbar: a #GtkToolbar
|
||||
@ -1377,7 +1393,7 @@ gtk_toolbar_internal_insert_element (GtkToolbar *toolbar,
|
||||
else
|
||||
{
|
||||
child->widget = gtk_radio_button_new (widget
|
||||
? gtk_radio_button_group (GTK_RADIO_BUTTON (widget))
|
||||
? gtk_radio_button_get_group (GTK_RADIO_BUTTON (widget))
|
||||
: NULL);
|
||||
gtk_button_set_relief (GTK_BUTTON (child->widget), get_button_relief (toolbar));
|
||||
gtk_toggle_button_set_mode (GTK_TOGGLE_BUTTON (child->widget), FALSE);
|
||||
@ -1466,6 +1482,23 @@ gtk_toolbar_set_orientation (GtkToolbar *toolbar,
|
||||
gtk_signal_emit (GTK_OBJECT (toolbar), toolbar_signals[ORIENTATION_CHANGED], orientation);
|
||||
}
|
||||
|
||||
/**
|
||||
* gtk_toolbar_get_orientation:
|
||||
* @toolbar: a #GtkToolbar
|
||||
*
|
||||
* Retrieves the current orientation of the toolbar. See
|
||||
* gtk_toolbar_set_orientation().
|
||||
*
|
||||
* Return value: the orientation
|
||||
**/
|
||||
GtkOrientation
|
||||
gtk_toolbar_get_orientation (GtkToolbar *toolbar)
|
||||
{
|
||||
g_return_val_if_fail (GTK_IS_TOOLBAR (toolbar), GTK_ORIENTATION_HORIZONTAL);
|
||||
|
||||
return toolbar->orientation;
|
||||
}
|
||||
|
||||
void
|
||||
gtk_toolbar_set_style (GtkToolbar *toolbar,
|
||||
GtkToolbarStyle style)
|
||||
@ -1476,6 +1509,23 @@ gtk_toolbar_set_style (GtkToolbar *toolbar,
|
||||
gtk_signal_emit (GTK_OBJECT (toolbar), toolbar_signals[STYLE_CHANGED], style);
|
||||
}
|
||||
|
||||
/**
|
||||
* gtk_toolbar_get_style:
|
||||
* @toolbar: a #GtkToolbar
|
||||
*
|
||||
* Retrieves whether the toolbar has text, icons, or both . See
|
||||
* gtk_toolbar_set_style().
|
||||
|
||||
* Return value: the current style of @toolbar
|
||||
**/
|
||||
GtkToolbarStyle
|
||||
gtk_toolbar_get_style (GtkToolbar *toolbar)
|
||||
{
|
||||
g_return_val_if_fail (GTK_IS_TOOLBAR (toolbar), GTK_TOOLBAR_BOTH);
|
||||
|
||||
return toolbar->style;
|
||||
}
|
||||
|
||||
/**
|
||||
* gtk_toolbar_unset_style:
|
||||
* @toolbar: a #GtkToolbar
|
||||
@ -1517,6 +1567,23 @@ gtk_toolbar_set_tooltips (GtkToolbar *toolbar,
|
||||
gtk_tooltips_disable (toolbar->tooltips);
|
||||
}
|
||||
|
||||
/**
|
||||
* gtk_toolbar_get_tooltips:
|
||||
* @toolbar: a #GtkToolbar
|
||||
*
|
||||
* Retrieves whether tooltips are enabled. See
|
||||
* gtk_toolbar_set_tooltips().
|
||||
*
|
||||
* Return value: %TRUE if tooltips are enabled
|
||||
**/
|
||||
gboolean
|
||||
gtk_toolbar_get_tooltips (GtkToolbar *toolbar)
|
||||
{
|
||||
g_return_val_if_fail (GTK_IS_TOOLBAR (toolbar), FALSE);
|
||||
|
||||
return toolbar->tooltips->enabled;
|
||||
}
|
||||
|
||||
static void
|
||||
gtk_toolbar_update_button_relief (GtkToolbar *toolbar)
|
||||
{
|
||||
|
@ -215,6 +215,11 @@ void gtk_toolbar_set_tooltips (GtkToolbar *toolbar,
|
||||
void gtk_toolbar_unset_style (GtkToolbar *toolbar);
|
||||
void gtk_toolbar_unset_icon_size (GtkToolbar *toolbar);
|
||||
|
||||
GtkOrientation gtk_toolbar_get_orientation (GtkToolbar *toolbar);
|
||||
GtkToolbarStyle gtk_toolbar_get_style (GtkToolbar *toolbar);
|
||||
GtkIconSize gtk_toolbar_get_icon_size (GtkToolbar *toolbar);
|
||||
gboolean gtk_toolbar_get_tooltips (GtkToolbar *toolbar);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif /* __cplusplus */
|
||||
|
@ -165,9 +165,9 @@ _gtk_tree_selection_set_tree_view (GtkTreeSelection *selection,
|
||||
/**
|
||||
* gtk_tree_selection_set_mode:
|
||||
* @selection: A #GtkTreeSelection.
|
||||
* @type: The selection type.
|
||||
* @type: The selection mode
|
||||
*
|
||||
* Sets the selection type of the @selection. If the previous type was
|
||||
* Sets the selection mode of the @selection. If the previous type was
|
||||
* #GTK_TREE_SELECTION_MULTI and @type is #GTK_TREE_SELECTION_SINGLE, then
|
||||
* the anchor is kept selected, if it was previously selected.
|
||||
**/
|
||||
@ -218,6 +218,23 @@ gtk_tree_selection_set_mode (GtkTreeSelection *selection,
|
||||
selection->type = type;
|
||||
}
|
||||
|
||||
/**
|
||||
* gtk_tree_selection_get_mode:
|
||||
* @selection: a #GtkTreeSelection
|
||||
*
|
||||
* Gets the selection mode for @selection. See
|
||||
* gtk_tree_selection_set_mode().
|
||||
*
|
||||
* Return value: the current selection mode
|
||||
**/
|
||||
GtkTreeSelectionMode
|
||||
gtk_tree_selection_get_mode (GtkTreeSelection *selection)
|
||||
{
|
||||
g_return_val_if_fail (GTK_IS_TREE_SELECTION (selection), GTK_TREE_SELECTION_SINGLE);
|
||||
|
||||
return selection->type;
|
||||
}
|
||||
|
||||
/**
|
||||
* gtk_tree_selection_set_select_function:
|
||||
* @selection: A #GtkTreeSelection.
|
||||
|
@ -73,6 +73,7 @@ GtkType gtk_tree_selection_get_type (void);
|
||||
|
||||
void gtk_tree_selection_set_mode (GtkTreeSelection *selection,
|
||||
GtkTreeSelectionMode type);
|
||||
GtkTreeSelectionMode gtk_tree_selection_get_mode (GtkTreeSelection *selection);
|
||||
void gtk_tree_selection_set_select_function (GtkTreeSelection *selection,
|
||||
GtkTreeSelectionFunc func,
|
||||
gpointer data,
|
||||
|
@ -7317,6 +7317,24 @@ static GtkTargetEntry row_targets[] = {
|
||||
{ "GTK_TREE_MODEL_ROW", GTK_TARGET_SAME_WIDGET, 0 }
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* gtk_tree_view_get_reorderable:
|
||||
* @tree_view: a #GtkTreeView
|
||||
*
|
||||
* Retrieves whether the user can reorder the tree via drag-and-drop. See
|
||||
* gtk_tree_view_set_reorderable().
|
||||
*
|
||||
* Return value: %TRUE if the tree can be reordered.
|
||||
**/
|
||||
gboolean
|
||||
gtk_tree_view_get_reorderable (GtkTreeView *tree_view)
|
||||
{
|
||||
g_return_val_if_fail (GTK_IS_TREE_VIEW (tree_view), FALSE);
|
||||
|
||||
return tree_view->priv->reorderable;
|
||||
}
|
||||
|
||||
/**
|
||||
* gtk_tree_view_set_reorderable:
|
||||
* @tree_view: A #GtkTreeView.
|
||||
|
@ -207,6 +207,7 @@ gboolean gtk_tree_view_row_expanded (GtkTreeView
|
||||
GtkTreePath *path);
|
||||
void gtk_tree_view_set_reorderable (GtkTreeView *tree_view,
|
||||
gboolean reorderable);
|
||||
gboolean gtk_tree_view_get_reorderable (GtkTreeView *tree_view);
|
||||
void gtk_tree_view_set_cursor (GtkTreeView *tree_view,
|
||||
GtkTreePath *path);
|
||||
|
||||
|
@ -1748,8 +1748,9 @@ gtk_tree_view_column_get_reorderable (GtkTreeViewColumn *tree_column)
|
||||
* @tree_column: a #GtkTreeViewColumn
|
||||
* @sort_column_id: The sort_column_id of the model to sort on.
|
||||
*
|
||||
* Sets the sort_column_id that the column sorts on. Doing so makes headers
|
||||
* clickable.
|
||||
* Sets the logical sort_column_id that this column sorts on when this
|
||||
* column is selected for sorting. Doing so makes
|
||||
* the column header clickable.
|
||||
**/
|
||||
void
|
||||
gtk_tree_view_column_set_sort_column_id (GtkTreeViewColumn *tree_column,
|
||||
@ -1794,6 +1795,24 @@ gtk_tree_view_column_set_sort_column_id (GtkTreeViewColumn *tree_column,
|
||||
gtk_tree_view_column_setup_sort_column_id_callback (tree_column);
|
||||
}
|
||||
|
||||
/**
|
||||
* gtk_tree_view_column_get_sort_column_id:
|
||||
* @tree_column: a #GtkTreeViewColumn
|
||||
*
|
||||
* Gets the logical sort_column_id that the model sorts on when this
|
||||
* coumn is selected for sorting. See gtk_tree_view_column_set_sort_column_id().
|
||||
*
|
||||
* Return value: the current sort_column_id for this column, or -1 if
|
||||
* this column can't be used for sorting.
|
||||
**/
|
||||
gint
|
||||
gtk_tree_view_column_get_sort_column_id (GtkTreeViewColumn *tree_column)
|
||||
{
|
||||
g_return_val_if_fail (GTK_IS_TREE_VIEW_COLUMN (tree_column), 0);
|
||||
|
||||
return tree_column->sort_column_id;
|
||||
}
|
||||
|
||||
/**
|
||||
* gtk_tree_view_column_set_sort_indicator:
|
||||
* @tree_column: a #GtkTreeViewColumn
|
||||
|
@ -167,6 +167,7 @@ gboolean gtk_tree_view_column_get_reorderable (GtkTreeViewCol
|
||||
*/
|
||||
void gtk_tree_view_column_set_sort_column_id (GtkTreeViewColumn *tree_column,
|
||||
gint sort_column_id);
|
||||
gint gtk_tree_view_column_get_sort_column_id (GtkTreeViewColumn *tree_column);
|
||||
void gtk_tree_view_column_set_sort_indicator (GtkTreeViewColumn *tree_column,
|
||||
gboolean setting);
|
||||
gboolean gtk_tree_view_column_get_sort_indicator (GtkTreeViewColumn *tree_column);
|
||||
|
@ -400,6 +400,22 @@ gtk_viewport_set_shadow_type (GtkViewport *viewport,
|
||||
g_object_notify (G_OBJECT (viewport), "shadow_type");
|
||||
}
|
||||
|
||||
/**
|
||||
* gtk_viewport_get_shadow_type:
|
||||
* @viewport: a #GtkViewport
|
||||
*
|
||||
* Gets the shadow type of the #GtkViewport. See
|
||||
* gtk_viewport_set_shadow_type().
|
||||
|
||||
* Return value: the shadow type
|
||||
**/
|
||||
GtkShadowType
|
||||
gtk_viewport_get_shadow_type (GtkViewport *viewport)
|
||||
{
|
||||
g_return_val_if_fail (GTK_IS_VIEWPORT (viewport), GTK_SHADOW_NONE);
|
||||
|
||||
return viewport->shadow_type;
|
||||
}
|
||||
|
||||
static void
|
||||
gtk_viewport_map (GtkWidget *widget)
|
||||
|
@ -81,6 +81,7 @@ void gtk_viewport_set_vadjustment (GtkViewport *viewport,
|
||||
GtkAdjustment *adjustment);
|
||||
void gtk_viewport_set_shadow_type (GtkViewport *viewport,
|
||||
GtkShadowType type);
|
||||
GtkShadowType gtk_viewport_get_shadow_type (GtkViewport *viewport);
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
@ -3415,6 +3415,22 @@ gtk_widget_set_parent (GtkWidget *widget,
|
||||
g_object_notify (G_OBJECT (widget), "parent");
|
||||
}
|
||||
|
||||
/**
|
||||
* gtk_widget_get_parent:
|
||||
* @widget: a #GtkWidget
|
||||
*
|
||||
* Returns the parent container of @widget.
|
||||
*
|
||||
* Return value: the parent container of @widget, or %NULL
|
||||
**/
|
||||
GtkWidget *
|
||||
gtk_widget_get_parent (GtkWidget *widget)
|
||||
{
|
||||
g_return_val_if_fail (GTK_IS_WIDGET (widget), NULL);
|
||||
|
||||
return widget->parent;
|
||||
}
|
||||
|
||||
/*****************************************
|
||||
* Widget styles
|
||||
* see docs/styles.txt
|
||||
@ -4399,6 +4415,36 @@ gtk_widget_set_usize (GtkWidget *widget,
|
||||
g_object_thaw_notify (G_OBJECT (widget));
|
||||
}
|
||||
|
||||
/**
|
||||
* gtk_widget_get_usize:
|
||||
* @widget: a #GtkWidget
|
||||
* @width: location to store the width, or %NULL
|
||||
* @height: location to store the height, or %NULL
|
||||
*
|
||||
* Gets the size that has explicitely set for the widget to request,
|
||||
* if any. A value of -1 stored in @width or @height indicates that
|
||||
* that dimension has not been set explicitely and the natural
|
||||
* requisition of the widget will be used intead. See
|
||||
* gtk_widget_set_usize().
|
||||
**/
|
||||
void
|
||||
gtk_widget_get_usize (GtkWidget *widget,
|
||||
gint *width,
|
||||
gint *height)
|
||||
{
|
||||
GtkWidgetAuxInfo *aux_info;
|
||||
|
||||
g_return_if_fail (GTK_IS_WIDGET (widget));
|
||||
|
||||
aux_info = _gtk_widget_get_aux_info (widget, FALSE);
|
||||
|
||||
if (width)
|
||||
*width = aux_info ? aux_info->width : -1;
|
||||
|
||||
if (height)
|
||||
*height = aux_info ? aux_info->height : -1;
|
||||
}
|
||||
|
||||
/**
|
||||
* gtk_widget_set_events:
|
||||
* @widget: a #GtkWidget
|
||||
|
@ -538,6 +538,7 @@ void gtk_widget_set_parent (GtkWidget *widget,
|
||||
GtkWidget *parent);
|
||||
void gtk_widget_set_parent_window (GtkWidget *widget,
|
||||
GdkWindow *parent_window);
|
||||
GtkWidget *gtk_widget_get_parent (GtkWidget *widget);
|
||||
GdkWindow *gtk_widget_get_parent_window (GtkWidget *widget);
|
||||
gboolean gtk_widget_child_focus (GtkWidget *widget,
|
||||
GtkDirectionType direction);
|
||||
@ -547,6 +548,9 @@ void gtk_widget_set_uposition (GtkWidget *widget,
|
||||
void gtk_widget_set_usize (GtkWidget *widget,
|
||||
gint width,
|
||||
gint height);
|
||||
void gtk_widget_get_usize (GtkWidget *widget,
|
||||
gint *width,
|
||||
gint *height);
|
||||
void gtk_widget_set_events (GtkWidget *widget,
|
||||
gint events);
|
||||
void gtk_widget_add_events (GtkWidget *widget,
|
||||
|
218
gtk/gtkwindow.c
218
gtk/gtkwindow.c
@ -740,6 +740,24 @@ gtk_window_set_title (GtkWindow *window,
|
||||
g_object_notify (G_OBJECT (window), "title");
|
||||
}
|
||||
|
||||
/**
|
||||
* gtk_window_get_title:
|
||||
* @window: a #GtkWindow
|
||||
*
|
||||
* Retrieves the title of the window. See gtk_window_set_title().
|
||||
*
|
||||
* Return value: the title of the window, or %NULL if none has
|
||||
* been set explicitely. The returned string is owned by the widget
|
||||
* and must not be modified or freed.
|
||||
**/
|
||||
G_CONST_RETURN gchar *
|
||||
gtk_window_get_title (GtkWindow *window)
|
||||
{
|
||||
g_return_val_if_fail (GTK_IS_WINDOW (window), NULL);
|
||||
|
||||
return window->title;
|
||||
}
|
||||
|
||||
/**
|
||||
* gtk_window_set_wmclass:
|
||||
* @window: a #GtkWindow
|
||||
@ -806,6 +824,25 @@ gtk_window_set_role (GtkWindow *window,
|
||||
g_warning ("gtk_window_set_role(): shouldn't set role after window is realized!\n");
|
||||
}
|
||||
|
||||
/**
|
||||
* gtk_window_get_role:
|
||||
* @window: a #GtkWindow
|
||||
*
|
||||
* Returns the role of the window. See gtk_window_set_role() for
|
||||
* further explanation.
|
||||
*
|
||||
* Return value: the role of the window if set, or %NULL. The
|
||||
* returned is owned by the widget and must not be modified
|
||||
* or freed.
|
||||
**/
|
||||
G_CONST_RETURN gchar *
|
||||
gtk_window_get_role (GtkWindow *window)
|
||||
{
|
||||
g_return_val_if_fail (GTK_IS_WINDOW (window), NULL);
|
||||
|
||||
return window->wm_role;
|
||||
}
|
||||
|
||||
/**
|
||||
* gtk_window_set_focus:
|
||||
* @window: a #GtkWindow
|
||||
@ -1044,6 +1081,24 @@ gtk_window_set_mnemonic_modifier (GtkWindow *window,
|
||||
window->mnemonic_modifier = modifier;
|
||||
}
|
||||
|
||||
/**
|
||||
* gtk_window_get_mnemonic_modifier:
|
||||
* @window: a #GtkWindow
|
||||
*
|
||||
* Returns the mnemonic modifier for this window. See
|
||||
* gtk_window_set_mnemonic_modifier().
|
||||
*
|
||||
* Return value: the modifier mask used to activate
|
||||
* mnemonics on this window.
|
||||
**/
|
||||
GdkModifierType
|
||||
gtk_window_get_mnemonic_modifier (GtkWindow *window)
|
||||
{
|
||||
g_return_val_if_fail (GTK_IS_WINDOW (window), 0);
|
||||
|
||||
return window->mnemonic_modifier;
|
||||
}
|
||||
|
||||
void
|
||||
gtk_window_set_position (GtkWindow *window,
|
||||
GtkWindowPosition position)
|
||||
@ -1125,6 +1180,23 @@ gtk_window_set_modal (GtkWindow *window,
|
||||
g_object_notify (G_OBJECT (window), "modal");
|
||||
}
|
||||
|
||||
/**
|
||||
* gtk_window_get_modal:
|
||||
* @window: a #GtkWindow
|
||||
*
|
||||
* Returns whether the window is modal. See gtk_window_set_modal().
|
||||
*
|
||||
* Return value: %TRUE if the window is set to be modal and
|
||||
* establishes a grab when shown
|
||||
**/
|
||||
gboolean
|
||||
gtk_window_get_modal (GtkWindow *window)
|
||||
{
|
||||
g_return_val_if_fail (GTK_IS_WINDOW (window), FALSE);
|
||||
|
||||
return window->modal;
|
||||
}
|
||||
|
||||
/**
|
||||
* gtk_window_list_toplevels:
|
||||
*
|
||||
@ -1368,6 +1440,24 @@ gtk_window_set_transient_for (GtkWindow *window,
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* gtk_window_get_transient_for:
|
||||
* @window: a #GtkWindow
|
||||
*
|
||||
* Fetches the transient parent for this window. See
|
||||
* gtk_window_set_transient_for().
|
||||
*
|
||||
* Return value: the transient parent for this window, or %NULL
|
||||
* if no transient parent has been set.
|
||||
**/
|
||||
GtkWindow *
|
||||
gtk_window_get_transient_for (GtkWindow *window)
|
||||
{
|
||||
g_return_val_if_fail (GTK_IS_WINDOW (window), NULL);
|
||||
|
||||
return window->transient_parent;
|
||||
}
|
||||
|
||||
/**
|
||||
* gtk_window_set_type_hint:
|
||||
* @window: a #GtkWindow
|
||||
@ -1392,6 +1482,22 @@ gtk_window_set_type_hint (GtkWindow *window,
|
||||
window->type_hint = hint;
|
||||
}
|
||||
|
||||
/**
|
||||
* gtk_window_get_type_hint:
|
||||
* @window: a #GtkWindow
|
||||
*
|
||||
* Gets the type hint for this window. See gtk_window_set_type_hint().
|
||||
*
|
||||
* Return value: the type hint for @window.
|
||||
**/
|
||||
GdkWindowTypeHint
|
||||
gtk_window_get_type_hint (GtkWindow *window)
|
||||
{
|
||||
g_return_val_if_fail (GTK_IS_WINDOW (window), GDK_WINDOW_TYPE_HINT_NORMAL);
|
||||
|
||||
return window->type_hint;
|
||||
}
|
||||
|
||||
/**
|
||||
* gtk_window_set_destroy_with_parent:
|
||||
* @window: a #GtkWindow
|
||||
@ -1425,6 +1531,23 @@ gtk_window_set_destroy_with_parent (GtkWindow *window,
|
||||
g_object_notify (G_OBJECT (window), "destroy_with_parent");
|
||||
}
|
||||
|
||||
/**
|
||||
* gtk_window_get_destroy_with_parent:
|
||||
* @window: a #GtkWindow
|
||||
*
|
||||
* Returns whether the window will be destroyed with its transient parent. See
|
||||
* gtk_window_set_destroy_with_parent ().
|
||||
*
|
||||
* Return value: %TRUE if the window will be destroyed with its transient parent.
|
||||
**/
|
||||
gboolean
|
||||
gtk_window_get_destroy_with_parent (GtkWindow *window)
|
||||
{
|
||||
g_return_val_if_fail (GTK_IS_WINDOW (window), FALSE);
|
||||
|
||||
return window->destroy_with_parent;
|
||||
}
|
||||
|
||||
static GtkWindowGeometryInfo*
|
||||
gtk_window_get_geometry_info (GtkWindow *window,
|
||||
gboolean create)
|
||||
@ -1527,6 +1650,23 @@ gtk_window_set_decorated (GtkWindow *window,
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* gtk_window_get_decorated:
|
||||
* @window: a #GtkWindow
|
||||
*
|
||||
* Returns whether the window has been set to have decorations
|
||||
* such as a title bar via gtk_window_set_decorated().
|
||||
*
|
||||
* Return value: %TRUE if the window has been set to have decorations
|
||||
**/
|
||||
gboolean
|
||||
gtk_window_get_decorated (GtkWindow *window)
|
||||
{
|
||||
g_return_val_if_fail (GTK_IS_WINDOW (window), TRUE);
|
||||
|
||||
return window->decorated;
|
||||
}
|
||||
|
||||
/**
|
||||
* gtk_window_set_default_size:
|
||||
* @window: a #GtkWindow
|
||||
@ -1580,6 +1720,35 @@ gtk_window_set_default_size (GtkWindow *window,
|
||||
|
||||
gtk_widget_queue_resize (GTK_WIDGET (window));
|
||||
}
|
||||
|
||||
/**
|
||||
* gtk_window_get_default_size:
|
||||
* @window: a #GtkWindow
|
||||
* @width: location to store the default width, or %NULL
|
||||
* @height: location to store the default height, or %NULL
|
||||
*
|
||||
* Gets the default size of the window. A value of 0 for the
|
||||
* width or height indicates that a default size has not
|
||||
* been explicitely set for that dimension, so the value
|
||||
* will be computed from the requisition of the window.
|
||||
**/
|
||||
void
|
||||
gtk_window_get_default_size (GtkWindow *window,
|
||||
gint *width,
|
||||
gint *height)
|
||||
{
|
||||
GtkWindowGeometryInfo *info;
|
||||
|
||||
g_return_if_fail (GTK_IS_WINDOW (window));
|
||||
|
||||
info = gtk_window_get_geometry_info (window, FALSE);
|
||||
|
||||
if (width)
|
||||
*width = info ? info->width : 0;
|
||||
|
||||
if (height)
|
||||
*height = info ? info->height : 0;
|
||||
}
|
||||
|
||||
static void
|
||||
gtk_window_destroy (GtkObject *object)
|
||||
@ -3100,7 +3269,7 @@ gtk_window_expose (GtkWidget *widget,
|
||||
*
|
||||
* If this function is called on a window with setting of TRUE, before
|
||||
* it is realized or showed, it will have a "frame" window around
|
||||
* widget-window, accessible in window->frame. Using the signal
|
||||
* widget->window, accessible in window->frame. Using the signal
|
||||
* frame_event you can recieve all events targeted at the frame.
|
||||
*
|
||||
* This function is used by the linux-fb port to implement managed
|
||||
@ -3118,6 +3287,24 @@ gtk_window_set_has_frame (GtkWindow *window,
|
||||
window->has_frame = setting != FALSE;
|
||||
}
|
||||
|
||||
/**
|
||||
* gtk_window_get_has_frame:
|
||||
* @window: a #GtkWindow
|
||||
*
|
||||
* Returns whether the window has a frame window exterior to
|
||||
* widget->window. See gtk_window_set_has_frame ().
|
||||
*
|
||||
* Return value: %TRUE if a frame has been added to the window
|
||||
* via gtk_widow_has_frame
|
||||
**/
|
||||
gboolean
|
||||
gtk_window_get_has_frame (GtkWindow *window)
|
||||
{
|
||||
g_return_val_if_fail (GTK_IS_WINDOW (window), FALSE);
|
||||
|
||||
return window->has_frame;
|
||||
}
|
||||
|
||||
/**
|
||||
* gtk_window_set_frame_dimensions:
|
||||
* @window: a #GtkWindow that has a frame
|
||||
@ -3569,6 +3756,35 @@ gtk_window_begin_resize_drag (GtkWindow *window,
|
||||
timestamp);
|
||||
}
|
||||
|
||||
/**
|
||||
* gtk_window_get_frame_dimensions:
|
||||
* @window: a #GtkWindow
|
||||
* @left: location to store the width of the frame at the left, or %NULL
|
||||
* @top: location to store the height of the frame at the top, or %NULL
|
||||
* @right: location to store the width of the frame at the returns, or %NULL
|
||||
* @bottom: location to store the height of the frame at the bottom, or %NULL
|
||||
*
|
||||
* Retrieves the dimensions of the frame window for this toplevel.
|
||||
* See gtk_window_set_has_frame(), gtk_window_set_frame_dimensions().
|
||||
**/
|
||||
void
|
||||
gtk_window_get_frame_dimensions (GtkWindow *window,
|
||||
gint *left,
|
||||
gint *top,
|
||||
gint *right,
|
||||
gint *bottom)
|
||||
{
|
||||
g_return_if_fail (GTK_IS_WINDOW (window));
|
||||
|
||||
if (left)
|
||||
*left = window->frame_left;
|
||||
if (top)
|
||||
*top = window->frame_top;
|
||||
if (right)
|
||||
*top = window->frame_right;
|
||||
if (bottom)
|
||||
*top = window->frame_bottom;
|
||||
}
|
||||
|
||||
/**
|
||||
* gtk_window_begin_move_drag:
|
||||
|
@ -149,11 +149,13 @@ GtkType gtk_window_get_type (void) G_GNUC_CONST;
|
||||
GtkWidget* gtk_window_new (GtkWindowType type);
|
||||
void gtk_window_set_title (GtkWindow *window,
|
||||
const gchar *title);
|
||||
G_CONST_RETURN gchar *gtk_window_get_title (GtkWindow *window);
|
||||
void gtk_window_set_wmclass (GtkWindow *window,
|
||||
const gchar *wmclass_name,
|
||||
const gchar *wmclass_class);
|
||||
void gtk_window_set_role (GtkWindow *window,
|
||||
const gchar *role);
|
||||
G_CONST_RETURN gchar *gtk_window_get_role (GtkWindow *window);
|
||||
void gtk_window_add_accel_group (GtkWindow *window,
|
||||
GtkAccelGroup *accel_group);
|
||||
void gtk_window_remove_accel_group (GtkWindow *window,
|
||||
@ -165,10 +167,13 @@ gboolean gtk_window_activate_default (GtkWindow *window);
|
||||
|
||||
void gtk_window_set_transient_for (GtkWindow *window,
|
||||
GtkWindow *parent);
|
||||
GtkWindow *gtk_window_get_transient_for (GtkWindow *window);
|
||||
void gtk_window_set_type_hint (GtkWindow *window,
|
||||
GdkWindowTypeHint hint);
|
||||
GdkWindowTypeHint gtk_window_get_type_hint (GtkWindow *window);
|
||||
void gtk_window_set_destroy_with_parent (GtkWindow *window,
|
||||
gboolean setting);
|
||||
gboolean gtk_window_get_destroy_with_parent (GtkWindow *window);
|
||||
|
||||
void gtk_window_set_resizeable (GtkWindow *window,
|
||||
gboolean resizeable);
|
||||
@ -187,18 +192,25 @@ void gtk_window_set_geometry_hints (GtkWindow *window,
|
||||
/* gtk_window_set_has_frame () must be called before realizing the window_*/
|
||||
void gtk_window_set_has_frame (GtkWindow *window,
|
||||
gboolean setting);
|
||||
gboolean gtk_window_get_has_frame (GtkWindow *window);
|
||||
void gtk_window_set_frame_dimensions (GtkWindow *window,
|
||||
gint left,
|
||||
gint top,
|
||||
gint right,
|
||||
gint bottom);
|
||||
|
||||
void gtk_window_set_decorated (GtkWindow *window,
|
||||
gboolean setting);
|
||||
void gtk_window_get_frame_dimensions (GtkWindow *window,
|
||||
gint *left,
|
||||
gint *top,
|
||||
gint *right,
|
||||
gint *bottom);
|
||||
void gtk_window_set_decorated (GtkWindow *window,
|
||||
gboolean setting);
|
||||
gboolean gtk_window_get_decorated (GtkWindow *window);
|
||||
|
||||
/* If window is set modal, input will be grabbed when show and released when hide */
|
||||
void gtk_window_set_modal (GtkWindow *window,
|
||||
gboolean modal);
|
||||
gboolean gtk_window_get_modal (GtkWindow *window);
|
||||
GList* gtk_window_list_toplevels (void);
|
||||
|
||||
void gtk_window_add_mnemonic (GtkWindow *window,
|
||||
@ -212,6 +224,7 @@ gboolean gtk_window_mnemonic_activate (GtkWindow *window,
|
||||
GdkModifierType modifier);
|
||||
void gtk_window_set_mnemonic_modifier (GtkWindow *window,
|
||||
GdkModifierType modifier);
|
||||
GdkModifierType gtk_window_get_mnemonic_modifier (GtkWindow *window);
|
||||
|
||||
void gtk_window_present (GtkWindow *window);
|
||||
void gtk_window_iconify (GtkWindow *window);
|
||||
@ -246,6 +259,9 @@ void gtk_window_set_policy (GtkWindow *window,
|
||||
void gtk_window_set_default_size (GtkWindow *window,
|
||||
gint width,
|
||||
gint height);
|
||||
void gtk_window_get_default_size (GtkWindow *window,
|
||||
gint *width,
|
||||
gint *height);
|
||||
|
||||
/* Window groups
|
||||
*/
|
||||
|
@ -444,18 +444,18 @@ create_radio_buttons (void)
|
||||
gtk_box_pack_start (GTK_BOX (box2), button, TRUE, TRUE, 0);
|
||||
|
||||
button = gtk_radio_button_new_with_label (
|
||||
gtk_radio_button_group (GTK_RADIO_BUTTON (button)),
|
||||
gtk_radio_button_get_group (GTK_RADIO_BUTTON (button)),
|
||||
"button2");
|
||||
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (button), TRUE);
|
||||
gtk_box_pack_start (GTK_BOX (box2), button, TRUE, TRUE, 0);
|
||||
|
||||
button = gtk_radio_button_new_with_label (
|
||||
gtk_radio_button_group (GTK_RADIO_BUTTON (button)),
|
||||
gtk_radio_button_get_group (GTK_RADIO_BUTTON (button)),
|
||||
"button3");
|
||||
gtk_box_pack_start (GTK_BOX (box2), button, TRUE, TRUE, 0);
|
||||
|
||||
button = gtk_radio_button_new_with_label (
|
||||
gtk_radio_button_group (GTK_RADIO_BUTTON (button)),
|
||||
gtk_radio_button_get_group (GTK_RADIO_BUTTON (button)),
|
||||
"inconsistent");
|
||||
gtk_toggle_button_set_inconsistent (GTK_TOGGLE_BUTTON (button), TRUE);
|
||||
gtk_box_pack_start (GTK_BOX (box2), button, TRUE, TRUE, 0);
|
||||
@ -1424,17 +1424,17 @@ create_tree_mode_window(void)
|
||||
gtk_box_pack_start(GTK_BOX(box4), button, TRUE, TRUE, 0);
|
||||
sTreeSampleSelection.single_button = button;
|
||||
|
||||
button = gtk_radio_button_new_with_label(gtk_radio_button_group (GTK_RADIO_BUTTON (button)),
|
||||
button = gtk_radio_button_new_with_label(gtk_radio_button_get_group (GTK_RADIO_BUTTON (button)),
|
||||
"BROWSE");
|
||||
gtk_box_pack_start(GTK_BOX(box4), button, TRUE, TRUE, 0);
|
||||
sTreeSampleSelection.browse_button = button;
|
||||
|
||||
button = gtk_radio_button_new_with_label(gtk_radio_button_group (GTK_RADIO_BUTTON (button)),
|
||||
button = gtk_radio_button_new_with_label(gtk_radio_button_get_group (GTK_RADIO_BUTTON (button)),
|
||||
"MULTIPLE");
|
||||
gtk_box_pack_start(GTK_BOX(box4), button, TRUE, TRUE, 0);
|
||||
sTreeSampleSelection.multiple_button = button;
|
||||
|
||||
sTreeSampleSelection.selection_mode_group = gtk_radio_button_group (GTK_RADIO_BUTTON (button));
|
||||
sTreeSampleSelection.selection_mode_group = gtk_radio_button_get_group (GTK_RADIO_BUTTON (button));
|
||||
|
||||
/* create option mode frame */
|
||||
frame = gtk_frame_new("Options");
|
||||
|
Loading…
Reference in New Issue
Block a user