Merge branch 'matthiasc/for-master' into 'master'

Matthiasc/for master

See merge request GNOME/gtk!2052
This commit is contained in:
Matthias Clasen 2020-06-06 05:30:30 +00:00
commit a0c489048a
24 changed files with 320 additions and 91 deletions

8
NEWS
View File

@ -16,7 +16,7 @@ Overview of Changes in GTK 3.98.5
* GtkFileChooser:
- Add a tracker3-based search engine implementation
- Rate-limite updates from the trash monitor
- Rate-limit updates from the trash monitor
* GtkWindow:
- Redo the css node setup. There is now a single 'window' node
@ -47,6 +47,10 @@ Overview of Changes in GTK 3.98.5
* Themes:
- Adwaita: Limit the scope of backdrop
* Accessibility:
- Clean up and reorganize the code to prepare for the
dropping of ATK
* GDK:
- Drop unused enum and struct definitions from headers
- Make keymap translation API public again. Still needed
@ -57,7 +61,7 @@ Overview of Changes in GTK 3.98.5
- X11: Improve sync when the Nvidia driver is used
* GSK:
- GL renderer: Fix blurred outsed shadows
- GL renderer: Fix blurred outset shadows
- GL renderer: handle nested transform nodes properly
- GL renderer: Optimize clip handling

View File

@ -93,7 +93,6 @@ gdk_display_get_clipboard
gdk_display_get_primary_clipboard
gdk_display_get_setting
gdk_display_get_startup_notification_id
gdk_display_setup_window_visual
<SUBSECTION>
gdk_display_put_event
@ -502,6 +501,7 @@ gdk_event_get_position
gdk_event_get_axes
gdk_event_get_axis
gdk_event_get_pointer_emulated
gdk_event_triggers_context_menu
gdk_button_event_get_button
gdk_scroll_event_get_direction
gdk_scroll_event_get_deltas
@ -520,6 +520,7 @@ gdk_crossing_event_get_mode
gdk_crossing_event_get_detail
gdk_crossing_event_get_focus
gdk_grab_broken_event_get_grab_surface
gdk_grab_broken_event_get_implicit
gdk_dnd_event_get_drop
gdk_configure_event_get_size
gdk_touchpad_event_get_gesture_phase
@ -545,8 +546,23 @@ GDK_TYPE_CROSSING_MODE
GDK_TYPE_SCROLL_DIRECTION
GDK_TYPE_NOTIFY_TYPE
GDK_IS_EVENT
gdk_event_get_type
gdk_event_sequence_get_type
gdk_button_event_get_type
gdk_configure_event_get_type
gdk_crossing_event_get_type
gdk_delete_event_get_type
gdk_dnd_event_get_type
gdk_focus_event_get_type
gdk_grab_broken_event_get_type
gdk_key_event_get_type
gdk_motion_event_get_type
gdk_pad_event_get_type
gdk_proximity_event_get_type
gdk_scroll_event_get_type
gdk_touch_event_get_type
gdk_touchpad_event_get_type
</SECTION>
<SECTION>

View File

@ -27,15 +27,19 @@ private_headers = [
'gdkmonitorprivate.h',
'gdkmemorytextureprivate.h',
'gdkpipeiostreamprivate.h',
'gdkpopupprivate.h',
'gdkprofilerprivate.h',
'gdkscreenprivate.h',
'gdkseatdefaultprivate.h',
'gdkseatprivate.h',
'gdksnapshotprivate.h',
'gdksurfaceimpl.h',
'gdksurfaceprivate.h',
'gdktextureprivate.h',
'gdktoplevelprivate.h',
'gdkvulkancontextprivate.h',
'keyname-table.h',
'gdkprivate-x11.h',
'x11/gdkprivate-x11.h',
'x11/gdkeventsource.h',
'gtk-primary-selection-client-protocol.h',
'gtk-shell-client-protocol.h',

View File

@ -236,7 +236,6 @@ gsk_transform_to_translate
gsk_transform_transform
gsk_transform_invert
gsk_transform_matrix
gsk_transform_matrix_with_category
gsk_transform_translate
gsk_transform_translate_3d
gsk_transform_rotate

View File

@ -9,9 +9,11 @@ private_headers = [
'gskprofilerprivate.h',
'gskrendererprivate.h',
'gskrendernodeprivate.h',
'gskrendernodeparserprivate.h',
'gskroundedrectprivate.h',
'gskshaderbuilderprivate.h',
'gsktextureprivate.h',
'gsktransformprivate.h',
'gskvulkanblendpipelineprivate.h',
'gskvulkanborderpipelineprivate.h',
'gskvulkanboxshadowpipelineprivate.h',

View File

@ -121,6 +121,7 @@
<xi:include href="xml/gtkaboutdialog.xml" />
<xi:include href="xml/gtkassistant.xml" />
<xi:include href="xml/gtkwindowgroup.xml" />
<xi:include href="xml/gtknativedialog.xml" />
</chapter>
<chapter id="LayoutContainers">

View File

@ -397,7 +397,6 @@ gtk_single_selection_get_type
<TITLE>GtkMultiSeledction</TITLE>
GtkMultiSelection
gtk_multi_selection_new
gtk_multi_selection_copy
<SUBSECTION Private>
gtk_multi_selection_get_type
</SECTION>
@ -1455,7 +1454,6 @@ gtk_custom_filter_get_type
<FILE>gtkfilterlistmodel</FILE>
<TITLE>GtkFilterListModel</TITLE>
GtkFilterListModel
GtkFilterListModelFilterFunc
gtk_filter_list_model_new
gtk_filter_list_model_new_for_type
gtk_filter_list_model_set_model
@ -2133,12 +2131,18 @@ GtkNotebookPrivate
<TITLE>GtkPaned</TITLE>
GtkPaned
gtk_paned_new
gtk_paned_add1
gtk_paned_add2
gtk_paned_pack1
gtk_paned_pack2
gtk_paned_get_child1
gtk_paned_get_child2
gtk_paned_set_start_child
gtk_paned_get_start_child
gtk_paned_set_end_child
gtk_paned_get_end_child
gtk_paned_set_resize_start_child
gtk_paned_get_resize_start_child
gtk_paned_set_resize_end_child
gtk_paned_get_resize_end_child
gtk_paned_set_shrink_start_child
gtk_paned_get_shrink_start_child
gtk_paned_set_shrink_end_child
gtk_paned_get_shrink_end_child
gtk_paned_set_position
gtk_paned_get_position
gtk_paned_set_wide_handle

View File

@ -13,6 +13,7 @@ private_headers = [
'gtkappchooserprivate.h',
'gtkapplicationaccelsprivate.h',
'gtkapplicationprivate.h',
'gtkarrayimplprivate.h',
'gtkbindingsprivate.h',
'gtkbitmaskprivate.h',
'gtkbuilderprivate.h',
@ -148,10 +149,14 @@ private_headers = [
'gtkmagnifierprivate.h',
'gtkmediafileprivate.h',
'gtkmenubuttonprivate.h',
'gtkmenusectionboxprivate.h',
'gtkmenutrackeritemprivate.h',
'gtkmenutrackerprivate.h',
'gtkmodulesprivate.h',
'gtkmountoperationprivate.h',
'gtknativedialogprivate.h',
'gtknomediafileprivate.h',
'gtkpango.h',
'gtkplacessidebarprivate.h',
'gtkplacesviewprivate.h',
'gtkplacesviewrowprivate.h',
@ -161,6 +166,7 @@ private_headers = [
'gtkprintoperation-private.h',
'gtkprivate.h',
'gtkprogresstrackerprivate.h',
'gtkquery.h',
'gtkrangeprivate.h',
'gtkrbtreeprivate.h',
'gtkrenderbackgroundprivate.h',
@ -170,7 +176,9 @@ private_headers = [
'gtkroundedboxprivate.h',
'gtkscalerprivate.h',
'gtksearchentryprivate.h',
'gtkset.h',
'gtksettingsprivate.h',
'gtkshortcutcontrollerprivate.h',
'gtkshortcutsshortcutprivate.h',
'gtkshortcutswindowprivate.h',
'gtksidebarrowprivate.h',
@ -197,7 +205,9 @@ private_headers = [
'gtktoolbarprivate.h',
'gtktooltipprivate.h',
'gtktooltipwindowprivate.h',
'gtktreepopoverprivate.h',
'gtktreeprivate.h',
'gtktreerbtreeprivate.h',
'gtkutilsprivate.h',
'gtkwidgetpaintableprivate.h',
'gtkwidgetpathprivate.h',

View File

@ -1775,6 +1775,15 @@ gdk_device_get_device_tool (GdkDevice *device)
return device->last_tool;
}
/**
* gdk_device_get_caps_lock_state:
* @device: a #GdkDevice
*
* Retrieves whether the Caps Lock modifier of the
* keyboard is locked, if @device is a keyboard device.
*
* Returns: %TRUE if Caps Lock is on for @device
*/
gboolean
gdk_device_get_caps_lock_state (GdkDevice *device)
{
@ -1786,6 +1795,15 @@ gdk_device_get_caps_lock_state (GdkDevice *device)
return FALSE;
}
/**
* gdk_device_get_num_lock_state:
* @device: a #GdkDevice
*
* Retrieves whether the Num Lock modifier of the
* keyboard is locked, if @device is a keyboard device.
*
* Returns: %TRUE if Num Lock is on for @device
*/
gboolean
gdk_device_get_num_lock_state (GdkDevice *device)
{
@ -1797,6 +1815,15 @@ gdk_device_get_num_lock_state (GdkDevice *device)
return FALSE;
}
/**
* gdk_device_get_scroll_lock_state:
* @device: a #GdkDevice
*
* Retrieves whether the Scroll Lock modifier of the
* keyboard is locked, if @device is a keyboard device.
*
* Returns: %TRUE if Scroll Lock is on for @device
*/
gboolean
gdk_device_get_scroll_lock_state (GdkDevice *device)
{
@ -1808,6 +1835,15 @@ gdk_device_get_scroll_lock_state (GdkDevice *device)
return FALSE;
}
/**
* gdk_device_get_modifier_state:
* @device: a #GdkDevice
*
* Retrieves the current modifier state of the keyboard,
* if @device is a keyboard device.
*
* Returns: the current modifier state
*/
GdkModifierType
gdk_device_get_modifier_state (GdkDevice *device)
{
@ -1819,6 +1855,20 @@ gdk_device_get_modifier_state (GdkDevice *device)
return 0;
}
/**
* gdk_device_get_direction:
* @device: a #GdkDevice
*
* Returns the direction of effective layout of the keyboard,
* if @device is a keyboard device.
*
* The direction of a layout is the direction of the majority
* of its symbols. See pango_unichar_direction().
*
* Returns: %PANGO_DIRECTION_LTR or %PANGO_DIRECTION_RTL
* if it can determine the direction. %PANGO_DIRECTION_NEUTRAL
* otherwise
*/
PangoDirection
gdk_device_get_direction (GdkDevice *device)
{
@ -1830,6 +1880,17 @@ gdk_device_get_direction (GdkDevice *device)
return PANGO_DIRECTION_NEUTRAL;
}
/**
* gdk_device_has_bidi_layouts:
* @device: a #GdkDevice
*
* Determines if keyboard layouts for both right-to-left and
* left-to-right languages are in use on the keyboard, if
* @device is a keyboard device.
*
* Returns: %TRUE if there are layouts with both directions,
* %FALSE otherwise
*/
gboolean
gdk_device_has_bidi_layouts (GdkDevice *device)
{

View File

@ -71,6 +71,8 @@ typedef enum
/**
* GdkPopupLayout:
*
* Struct containing information for gdk_popup_present()
*/
typedef struct _GdkPopupLayout GdkPopupLayout;

View File

@ -31,6 +31,8 @@ G_BEGIN_DECLS
/**
* GdkTopLevelLayout:
*
* Struct containing information for gdk_toplevel_present()
*/
typedef struct _GdkToplevelLayout GdkToplevelLayout;

View File

@ -370,7 +370,7 @@ gsk_linear_gradient_node_get_n_color_stops (GskRenderNode *node)
* @node: (type GskLinearGradientNode): a #GskRenderNode for a linear gradient
* @n_stops: (out) (optional): the number of color stops in the returned array
*
* Retrievs the color stops in the gradient.
* Retrieves the color stops in the gradient.
*
* Returns: (array length=n_stops): the color stops in the gradient
*/
@ -555,6 +555,14 @@ gsk_border_node_diff (GskRenderNode *node1,
gsk_render_node_diff_impossible (node1, node2, region);
}
/**
* gsk_border_node_peek_outline:
* @node: (type GskBorderNode): a #GskRenderNode for a border
*
* Retrieves the outline of the border.
*
* Returns: the outline of the border
*/
const GskRoundedRect *
gsk_border_node_peek_outline (GskRenderNode *node)
{
@ -563,6 +571,15 @@ gsk_border_node_peek_outline (GskRenderNode *node)
return &self->outline;
}
/**
* gsk_border_node_peek_widths:
* @node: (type GskBorderNode): a #GskRenderNode for a border
*
* Retrieves the stroke widths of the border.
*
* Returns: (transfer none): an array of 4 floats for the top,
* right, bottom and left stroke width of the border
*/
const float *
gsk_border_node_peek_widths (GskRenderNode *node)
{
@ -571,6 +588,15 @@ gsk_border_node_peek_widths (GskRenderNode *node)
return self->border_width;
}
/**
* gsk_border_node_peek_colors:
* @node: (type GskBorderNode): a #GskRenderNode for a border
*
* Retrieves the colors of the border.
*
* Returns: (transfer none): an array of 4 #GdkRGBA structs
* for the top, right, bottom and left color of the border
*/
const GdkRGBA *
gsk_border_node_peek_colors (GskRenderNode *node)
{
@ -3626,6 +3652,14 @@ gsk_text_node_has_color_glyphs (GskRenderNode *node)
return self->has_color_glyphs;
}
/**
* gsk_text_node_get_num_glyphs:
* @node: (type GskTextNode): a text #GskRenderNode
*
* Retrieves the number of glyphs in the text node.
*
* Returns: the number of glyphs
*/
guint
gsk_text_node_get_num_glyphs (GskRenderNode *node)
{

View File

@ -831,7 +831,7 @@ gtk_column_view_column_set_visible (GtkColumnViewColumn *self,
}
/**
* gtk_column_view_get_visible:
* gtk_column_view_column_get_visible:
* @self: a #GtkColumnViewColumn
*
* Returns whether this column is visible.
@ -915,7 +915,7 @@ gtk_column_view_column_set_expand (GtkColumnViewColumn *self,
}
/**
* gtk_column_view_get_expand:
* gtk_column_view_column_get_expand:
* @self: a #GtkColumnViewColumn
*
* Returns whether this column should expand.
@ -933,7 +933,7 @@ gtk_column_view_column_get_expand (GtkColumnViewColumn *self)
/**
* gtk_column_view_column_set_resizable:
* @self: a #GtkColumnViewColumn
* @resizable: whether this column should be resizable
* @resizable: whether this column should be resizable
*
* Sets whether this column should be resizable by dragging.
*/
@ -952,7 +952,7 @@ gtk_column_view_column_set_resizable (GtkColumnViewColumn *self,
}
/**
* gtk_column_view_get_resizable:
* gtk_column_view_column_get_resizable:
* @self: a #GtkColumnView
*
* Returns whether this column is resizable.

View File

@ -839,6 +839,7 @@ gtk_drop_down_set_enable_search (GtkDropDown *self,
/**
* gtk_drop_down_get_enable_search:
* @self: a #GtkDropDown
*
* Returns whether search is enabled.
*
@ -1014,20 +1015,20 @@ gtk_drop_down_strings_model_new (const char *const *text)
/**
* gtk_drop_down_set_from_strings:
* @self: a #GtkDropDown
* text: a %NULL-terminated string array
* @texts: a %NULL-terminated string array
*
* Populates @self with the strings in @text,
* by creating a suitable model and factory.
*/
void
gtk_drop_down_set_from_strings (GtkDropDown *self,
const char *const *text)
const char *const *texts)
{
GtkExpression *expression;
GListModel *model;
g_return_if_fail (GTK_IS_DROP_DOWN (self));
g_return_if_fail (text != NULL);
g_return_if_fail (texts != NULL);
set_default_factory (self);
@ -1035,7 +1036,7 @@ gtk_drop_down_set_from_strings (GtkDropDown *self,
gtk_drop_down_set_expression (self, expression);
gtk_expression_unref (expression);
model = gtk_drop_down_strings_model_new (text);
model = gtk_drop_down_strings_model_new (texts);
gtk_drop_down_set_model (self, model);
g_object_unref (model);
}

View File

@ -41,6 +41,7 @@ typedef struct _RubberbandData RubberbandData;
struct _RubberbandData
{
GtkWidget *widget;
GtkSet *active;
double x1, y1;
double x2, y2;
gboolean modify;
@ -53,6 +54,7 @@ rubberband_data_free (gpointer data)
RubberbandData *rdata = data;
g_clear_pointer (&rdata->widget, gtk_widget_unparent);
g_clear_pointer (&rdata->active, gtk_set_free);
g_free (rdata);
}
@ -1341,6 +1343,7 @@ gtk_list_base_start_rubberband (GtkListBase *self,
priv->rubberband->widget = gtk_gizmo_new ("rubberband",
NULL, NULL, NULL, NULL, NULL, NULL);
gtk_widget_set_parent (priv->rubberband->widget, GTK_WIDGET (self));
priv->rubberband->active = gtk_set_new ();
}
static void
@ -1352,7 +1355,7 @@ range_cb (guint position,
{
GtkSet *set = data;
gtk_set_find_range (set, position, gtk_set_get_max (set), start, n_items, selected);
gtk_set_find_range (set, position, gtk_set_get_max (set) + 1, start, n_items, selected);
}
static void
@ -1361,46 +1364,32 @@ gtk_list_base_stop_rubberband (GtkListBase *self)
GtkListBasePrivate *priv = gtk_list_base_get_instance_private (self);
GtkListItemManagerItem *item;
GtkSelectionModel *model;
GtkSet *active;
if (!priv->rubberband)
return;
active = gtk_set_new ();
for (item = gtk_list_item_manager_get_first (priv->item_manager);
item != NULL;
item = gtk_rb_tree_node_get_next (item))
{
if (!item->widget)
continue;
if (gtk_widget_get_state_flags (item->widget) & GTK_STATE_FLAG_ACTIVE)
{
guint pos;
pos = gtk_list_item_manager_get_item_position (priv->item_manager, item);
gtk_set_add_item (active, pos);
gtk_widget_unset_state_flags (item->widget, GTK_STATE_FLAG_ACTIVE);
}
if (item->widget)
gtk_widget_unset_state_flags (item->widget, GTK_STATE_FLAG_ACTIVE);
}
model = gtk_list_item_manager_get_model (priv->item_manager);
if (priv->rubberband->modify)
{
gtk_selection_model_unselect_callback (model, range_cb, active);
gtk_selection_model_unselect_callback (model, range_cb, priv->rubberband->active);
}
else
{
if (!priv->rubberband->extend)
gtk_selection_model_unselect_all (model);
gtk_selection_model_select_callback (model, range_cb, active);
gtk_selection_model_select_callback (model, range_cb, priv->rubberband->active);
}
gtk_set_free (active);
g_clear_pointer (&priv->rubberband, rubberband_data_free);
remove_autoscroll (self);
@ -1472,15 +1461,25 @@ gtk_list_base_update_rubberband_selection (GtkListBase *self)
item != NULL;
item = gtk_rb_tree_node_get_next (item))
{
guint pos;
if (!item->widget)
continue;
pos = gtk_list_item_manager_get_item_position (priv->item_manager, item);
gtk_widget_get_allocation (item->widget, &alloc);
if (gdk_rectangle_intersect (&rect, &alloc, &alloc))
gtk_widget_set_state_flags (item->widget, GTK_STATE_FLAG_ACTIVE, FALSE);
{
gtk_set_add_item (priv->rubberband->active, pos);
gtk_widget_set_state_flags (item->widget, GTK_STATE_FLAG_ACTIVE, FALSE);
}
else
gtk_widget_unset_state_flags (item->widget, GTK_STATE_FLAG_ACTIVE);
{
gtk_set_remove_item (priv->rubberband->active, pos);
gtk_widget_unset_state_flags (item->widget, GTK_STATE_FLAG_ACTIVE);
}
}
}

View File

@ -324,8 +324,6 @@ gtk_list_item_widget_click_gesture_pressed (GtkGestureClick *gesture,
{
GtkListItemWidgetPrivate *priv = gtk_list_item_widget_get_instance_private (self);
GtkWidget *widget = GTK_WIDGET (self);
GtkWidget * parent = gtk_widget_get_parent (widget);
gboolean rubberband;
if (priv->list_item && !priv->list_item->selectable && !priv->list_item->activatable)
{
@ -333,29 +331,6 @@ gtk_list_item_widget_click_gesture_pressed (GtkGestureClick *gesture,
return;
}
if (GTK_IS_LIST_BASE (parent))
rubberband = gtk_list_base_get_enable_rubberband (GTK_LIST_BASE (parent));
else
rubberband = FALSE;
if (!rubberband && (!priv->list_item || priv->list_item->selectable))
{
GdkModifierType state;
GdkEvent *event;
gboolean extend, modify;
event = gtk_gesture_get_last_event (GTK_GESTURE (gesture),
gtk_gesture_single_get_current_sequence (GTK_GESTURE_SINGLE (gesture)));
state = gdk_event_get_modifier_state (event);
extend = (state & GDK_SHIFT_MASK) != 0;
modify = (state & GDK_CONTROL_MASK) != 0;
gtk_widget_activate_action (GTK_WIDGET (self),
"list.select-item",
"(ubb)",
priv->position, modify, extend);
}
if (!priv->list_item || priv->list_item->activatable)
{
if (n_press == 2 || priv->single_click_activate)
@ -373,6 +348,36 @@ gtk_list_item_widget_click_gesture_pressed (GtkGestureClick *gesture,
gtk_widget_grab_focus (widget);
}
static void
gtk_list_item_widget_click_gesture_released (GtkGestureClick *gesture,
int n_press,
double x,
double y,
GtkListItemWidget *self)
{
GtkListItemWidgetPrivate *priv = gtk_list_item_widget_get_instance_private (self);
if (!priv->list_item || priv->list_item->selectable)
{
GdkModifierType state;
GdkEvent *event;
gboolean extend, modify;
event = gtk_gesture_get_last_event (GTK_GESTURE (gesture),
gtk_gesture_single_get_current_sequence (GTK_GESTURE_SINGLE (gesture)));
state = gdk_event_get_modifier_state (event);
extend = (state & GDK_SHIFT_MASK) != 0;
modify = (state & GDK_CONTROL_MASK) != 0;
gtk_widget_activate_action (GTK_WIDGET (self),
"list.select-item",
"(ubb)",
priv->position, modify, extend);
}
gtk_widget_unset_state_flags (GTK_WIDGET (self), GTK_STATE_FLAG_ACTIVE);
}
static void
gtk_list_item_widget_enter_cb (GtkEventControllerFocus *controller,
GtkListItemWidget *self)
@ -406,16 +411,6 @@ gtk_list_item_widget_hover_cb (GtkEventControllerMotion *controller,
}
}
static void
gtk_list_item_widget_click_gesture_released (GtkGestureClick *gesture,
int n_press,
double x,
double y,
GtkListItemWidget *self)
{
gtk_widget_unset_state_flags (GTK_WIDGET (self), GTK_STATE_FLAG_ACTIVE);
}
static void
gtk_list_item_widget_click_gesture_canceled (GtkGestureClick *gesture,
GdkEventSequence *sequence,

View File

@ -963,7 +963,7 @@ gtk_menu_tracker_item_request_submenu_shown (GtkMenuTrackerItem *self,
gtk_menu_tracker_item_set_submenu_shown (self, shown);
}
/**
/*
* gtk_menu_tracker_item_get_is_visible:
* @self: A #GtkMenuTrackerItem instance
*
@ -978,7 +978,7 @@ gtk_menu_tracker_item_get_is_visible (GtkMenuTrackerItem *self)
return self->is_visible;
}
/**
/*
* gtk_menu_tracker_item_may_disappear:
* @self: A #GtkMenuTrackerItem instance
*

View File

@ -202,7 +202,8 @@ gtk_multi_selection_add_or_remove (GtkSelectionModel *model,
}
while (n > 0);
gtk_selection_model_selection_changed (model, min, max - min + 1);
if (min <= max)
gtk_selection_model_selection_changed (model, min, max - min + 1);
return TRUE;
}

View File

@ -109,10 +109,14 @@
*
* gtk_widget_set_size_request (hpaned, 200, -1);
*
* gtk_paned_pack1 (GTK_PANED (hpaned), frame1, TRUE, FALSE);
* gtk_paned_set_start_child (GTK_PANED (hpaned), frame1);
* gtk_paned_set_start_child_resize (GTK_PANED (hpaned), TRUE);
* gtk_paned_set_start_child_shrink (GTK_PANED (hpaned), FALSE);
* gtk_widget_set_size_request (frame1, 50, -1);
*
* gtk_paned_pack2 (GTK_PANED (hpaned), frame2, FALSE, FALSE);
* gtk_paned_set_end_child (GTK_PANED (hpaned), frame2);
* gtk_paned_set_end_child_resize (GTK_PANED (hpaned), FALSE);
* gtk_paned_set_end_child_shrink (GTK_PANED (hpaned), FALSE);
* gtk_widget_set_size_request (frame2, 50, -1);
* ]|
*/
@ -1555,6 +1559,13 @@ gtk_paned_new (GtkOrientation orientation)
NULL);
}
/**
* gtk_paned_set_start_child:
* @paned: a #GtkPaned
* @child: the widget to add
*
* Sets the start child of @paned to @child.
*/
void
gtk_paned_set_start_child (GtkPaned *paned,
GtkWidget *child)
@ -1591,6 +1602,13 @@ gtk_paned_get_start_child (GtkPaned *paned)
return paned->start_child;
}
/**
* gtk_paned_set_resize_start_child:
* @paned: a #GtkPaned
* @resize: %TRUE to let the start child be resized
*
* Sets the #GtkPaned:resize-start-child property
*/
void
gtk_paned_set_resize_start_child (GtkPaned *paned,
gboolean resize)
@ -1605,6 +1623,14 @@ gtk_paned_set_resize_start_child (GtkPaned *paned,
g_object_notify (G_OBJECT (paned), "resize-start-child");
}
/**
* gtk_paned_get_resize_start_child:
* @paned: a #GtkPaned
*
* Returns whether the start child can be resized.
*
* Returns: %TRUE if the start child is resizable
*/
gboolean
gtk_paned_get_resize_start_child (GtkPaned *paned)
{
@ -1613,6 +1639,13 @@ gtk_paned_get_resize_start_child (GtkPaned *paned)
return paned->resize_start_child;
}
/**
* gtk_paned_set_shrink_start_child:
* @paned: a #GtkPaned
* @resize: %TRUE to let the start child be shrunk
*
* Sets the #GtkPaned:shrink-start-child property
*/
void
gtk_paned_set_shrink_start_child (GtkPaned *paned,
gboolean shrink)
@ -1627,6 +1660,14 @@ gtk_paned_set_shrink_start_child (GtkPaned *paned,
g_object_notify (G_OBJECT (paned), "shrink-start-child");
}
/**
* gtk_paned_get_shrink_start_child:
* @paned: a #GtkPaned
*
* Returns whether the start child can be shrunk.
*
* Returns: %TRUE if the start child is shrinkable
*/
gboolean
gtk_paned_get_shrink_start_child (GtkPaned *paned)
{
@ -1636,14 +1677,11 @@ gtk_paned_get_shrink_start_child (GtkPaned *paned)
}
/**
* gtk_paned_get_end_child:
* gtk_paned_set_end_child:
* @paned: a #GtkPaned
* @child: the widget to add
*
* Retrieves the end child of the given #GtkPaned.
*
* See also: #GtkPaned:end-child
*
* Returns: (transfer none) (nullable): the end child widget
* Sets the end child of @paned to @child.
*/
void
gtk_paned_set_end_child (GtkPaned *paned,
@ -1663,6 +1701,16 @@ gtk_paned_set_end_child (GtkPaned *paned,
g_object_notify (G_OBJECT (paned), "end-child");
}
/**
* gtk_paned_get_end_child:
* @paned: a #GtkPaned
*
* Retrieves the end child of the given #GtkPaned.
*
* See also: #GtkPaned:end-child
*
* Returns: (transfer none) (nullable): the end child widget
*/
GtkWidget *
gtk_paned_get_end_child (GtkPaned *paned)
{
@ -1671,6 +1719,13 @@ gtk_paned_get_end_child (GtkPaned *paned)
return paned->end_child;
}
/**
* gtk_paned_set_resize_end_child:
* @paned: a #GtkPaned
* @resize: %TRUE to let the end child be resized
*
* Sets the #GtkPaned:resize-end-child property
*/
void
gtk_paned_set_resize_end_child (GtkPaned *paned,
gboolean resize)
@ -1685,6 +1740,14 @@ gtk_paned_set_resize_end_child (GtkPaned *paned,
g_object_notify (G_OBJECT (paned), "resize-end-child");
}
/**
* gtk_paned_get_resize_end_child:
* @paned: a #GtkPaned
*
* Returns whether the end child can be resized.
*
* Returns: %TRUE if the end child is resizable
*/
gboolean
gtk_paned_get_resize_end_child (GtkPaned *paned)
{
@ -1693,6 +1756,13 @@ gtk_paned_get_resize_end_child (GtkPaned *paned)
return paned->resize_end_child;
}
/**
* gtk_paned_set_shrink_end_child:
* @paned: a #GtkPaned
* @resize: %TRUE to let the end child be shrunk
*
* Sets the #GtkPaned:shrink-end-child property
*/
void
gtk_paned_set_shrink_end_child (GtkPaned *paned,
gboolean shrink)
@ -1707,6 +1777,14 @@ gtk_paned_set_shrink_end_child (GtkPaned *paned,
g_object_notify (G_OBJECT (paned), "shrink-end-child");
}
/**
* gtk_paned_get_shrink_end_child:
* @paned: a #GtkPaned
*
* Returns whether the end child can be shrunk.
*
* Returns: %TRUE if the end child is shrinkable
*/
gboolean
gtk_paned_get_shrink_end_child (GtkPaned *paned)
{

View File

@ -330,6 +330,7 @@ gtk_string_sorter_get_ignore_case (GtkStringSorter *self)
/**
* gtk_string_sorter_set_ignore_case:
* @self: a #GtkStringSorter
* @ignore_case: %TRUE to ignore case differences
*
* Sets whether the sorter will ignore case differences.
*/

View File

@ -430,6 +430,7 @@ gtk_text_child_anchor_finalize (GObject *obj)
/**
* gtk_text_child_anchor_get_widgets:
* @anchor: a #GtkTextChildAnchor
* @out_len: (out): return location for the length of the array
*
* Gets a list of all widgets anchored at this child anchor.
*

View File

@ -5737,6 +5737,14 @@ gtk_text_view_snapshot (GtkWidget *widget,
}
}
/**
* gtk_text_view_remove:
* @text_view: a #GtkTextView
* @child: the child to remove
*
* Removes a child widget from @text_view.
*/
void
gtk_text_view_remove (GtkTextView *text_view,
GtkWidget *child)

View File

@ -11846,6 +11846,8 @@ gtk_widget_observe_controllers (GtkWidget *widget)
* gtk_widget_get_first_child:
* @widget: a #GtkWidget
*
* Returns the widgets first child.
*
* Returns: (transfer none) (nullable): The widget's first child
*/
GtkWidget *
@ -11862,6 +11864,8 @@ gtk_widget_get_first_child (GtkWidget *widget)
* gtk_widget_get_last_child:
* @widget: a #GtkWidget
*
* Returns the widgets last child.
*
* Returns: (transfer none) (nullable): The widget's last child
*/
GtkWidget *
@ -11878,6 +11882,8 @@ gtk_widget_get_last_child (GtkWidget *widget)
* gtk_widget_get_next_sibling:
* @widget: a #GtkWidget
*
* Returns the widgets next sibling.
*
* Returns: (transfer none) (nullable): The widget's next sibling
*/
GtkWidget *
@ -11894,6 +11900,8 @@ gtk_widget_get_next_sibling (GtkWidget *widget)
* gtk_widget_get_prev_sibling:
* @widget: a #GtkWidget
*
* Returns the widgets previous sibling.
*
* Returns: (transfer none) (nullable): The widget's previous sibling
*/
GtkWidget *

View File

@ -161,8 +161,6 @@ struct _GtkWidget
* @grab_notify: Signal emitted when a widget becomes shadowed by a
* GTK+ grab (not a pointer or keyboard grab) on another widget, or
* when it becomes unshadowed due to a grab being removed.
* @child_notify: Signal emitted for each child property that has
* changed on an object.
* @get_request_mode: This allows a widget to tell its parent container whether
* it prefers to be allocated in %GTK_SIZE_REQUEST_HEIGHT_FOR_WIDTH or
* %GTK_SIZE_REQUEST_WIDTH_FOR_HEIGHT mode.