mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2025-01-12 05:20:17 +00:00
window: Make popover window private
This commit is contained in:
parent
889a280979
commit
168227165d
@ -5692,10 +5692,6 @@ gtk_window_get_application
|
|||||||
gtk_window_set_application
|
gtk_window_set_application
|
||||||
gtk_window_set_has_user_ref_count
|
gtk_window_set_has_user_ref_count
|
||||||
gtk_window_set_titlebar
|
gtk_window_set_titlebar
|
||||||
gtk_window_add_popover
|
|
||||||
gtk_window_remove_popover
|
|
||||||
gtk_window_set_popover_position
|
|
||||||
gtk_window_get_popover_position
|
|
||||||
|
|
||||||
<SUBSECTION Standard>
|
<SUBSECTION Standard>
|
||||||
GTK_WINDOW
|
GTK_WINDOW
|
||||||
|
@ -7935,7 +7935,7 @@ gtk_window_remove (GtkContainer *container,
|
|||||||
if (widget == window->priv->title_box)
|
if (widget == window->priv->title_box)
|
||||||
unset_titlebar (window);
|
unset_titlebar (window);
|
||||||
else if (_gtk_window_has_popover (window, widget))
|
else if (_gtk_window_has_popover (window, widget))
|
||||||
gtk_window_remove_popover (window, widget);
|
_gtk_window_remove_popover (window, widget);
|
||||||
else
|
else
|
||||||
GTK_CONTAINER_CLASS (gtk_window_parent_class)->remove (container, widget);
|
GTK_CONTAINER_CLASS (gtk_window_parent_class)->remove (container, widget);
|
||||||
}
|
}
|
||||||
@ -12028,18 +12028,8 @@ _gtk_window_get_shadow_width (GtkWindow *window,
|
|||||||
get_shadow_width (GTK_WIDGET (window), border);
|
get_shadow_width (GTK_WIDGET (window), border);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* gtk_window_add_popover:
|
|
||||||
* @window: a #GtkWindow
|
|
||||||
* @popover: a #GtkWidget to be added as a popover of @window
|
|
||||||
*
|
|
||||||
* Adds a widget so it acts as a popover within @window, it can
|
|
||||||
* be later positioned through gtk_window_set_popover_position().
|
|
||||||
*
|
|
||||||
* Since: 3.12
|
|
||||||
**/
|
|
||||||
void
|
void
|
||||||
gtk_window_add_popover (GtkWindow *window,
|
_gtk_window_add_popover (GtkWindow *window,
|
||||||
GtkWidget *popover)
|
GtkWidget *popover)
|
||||||
{
|
{
|
||||||
GtkWindowPrivate *priv;
|
GtkWindowPrivate *priv;
|
||||||
@ -12064,17 +12054,8 @@ gtk_window_add_popover (GtkWindow *window,
|
|||||||
gtk_widget_set_parent (popover, GTK_WIDGET (window));
|
gtk_widget_set_parent (popover, GTK_WIDGET (window));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* gtk_window_remove_popover:
|
|
||||||
* @window: a #GtkWindow
|
|
||||||
* @popover: a #GtkWidget acting as a popover on @window
|
|
||||||
*
|
|
||||||
* Removes @popover from being a popover of @window.
|
|
||||||
*
|
|
||||||
* Since: 3.12
|
|
||||||
**/
|
|
||||||
void
|
void
|
||||||
gtk_window_remove_popover (GtkWindow *window,
|
_gtk_window_remove_popover (GtkWindow *window,
|
||||||
GtkWidget *popover)
|
GtkWidget *popover)
|
||||||
{
|
{
|
||||||
GtkWindowPrivate *priv;
|
GtkWindowPrivate *priv;
|
||||||
@ -12094,22 +12075,8 @@ gtk_window_remove_popover (GtkWindow *window,
|
|||||||
popover_destroy (data);
|
popover_destroy (data);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* gtk_window_set_popover_position:
|
|
||||||
* @window: a #GtkWindow
|
|
||||||
* @popover: #GtkWidget to be positioned on top of window contents
|
|
||||||
* @pos: Position of the popover, relative of the contents it's related to
|
|
||||||
* @rect: Disclosure rectangle, in @window coordinates
|
|
||||||
*
|
|
||||||
* Positions @popover so it is at the side given by @pos of the rectangle @rect.
|
|
||||||
* If @popover is set to expand horizontally or vertically, the position given
|
|
||||||
* by @pos will be used to determine how the popover is allowed to expand
|
|
||||||
* without covering the content it's logically attached to.
|
|
||||||
*
|
|
||||||
* Since: 3.12
|
|
||||||
**/
|
|
||||||
void
|
void
|
||||||
gtk_window_set_popover_position (GtkWindow *window,
|
_gtk_window_set_popover_position (GtkWindow *window,
|
||||||
GtkWidget *popover,
|
GtkWidget *popover,
|
||||||
GtkPositionType pos,
|
GtkPositionType pos,
|
||||||
const cairo_rectangle_int_t *rect)
|
const cairo_rectangle_int_t *rect)
|
||||||
@ -12152,19 +12119,8 @@ gtk_window_set_popover_position (GtkWindow *window,
|
|||||||
gtk_widget_queue_resize (popover);
|
gtk_widget_queue_resize (popover);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* gtk_window_get_popover_position:
|
|
||||||
* @window: a #GtkWindow
|
|
||||||
* @popover: a #GtkWidget acting as popover
|
|
||||||
* @pos: return value for the position of @popover relative to @rect
|
|
||||||
* @rect: return value for the disclosure rectangle
|
|
||||||
*
|
|
||||||
* Returns the positioning details of @popover, relative to @window.
|
|
||||||
*
|
|
||||||
* Since: 3.12
|
|
||||||
**/
|
|
||||||
void
|
void
|
||||||
gtk_window_get_popover_position (GtkWindow *window,
|
_gtk_window_get_popover_position (GtkWindow *window,
|
||||||
GtkWidget *popover,
|
GtkWidget *popover,
|
||||||
GtkPositionType *pos,
|
GtkPositionType *pos,
|
||||||
cairo_rectangle_int_t *rect)
|
cairo_rectangle_int_t *rect)
|
||||||
|
@ -483,23 +483,6 @@ void gtk_window_set_titlebar (GtkWindow *window,
|
|||||||
GDK_AVAILABLE_IN_3_12
|
GDK_AVAILABLE_IN_3_12
|
||||||
gboolean gtk_window_is_maximized (GtkWindow *window);
|
gboolean gtk_window_is_maximized (GtkWindow *window);
|
||||||
|
|
||||||
GDK_AVAILABLE_IN_3_12
|
|
||||||
void gtk_window_add_popover (GtkWindow *window,
|
|
||||||
GtkWidget *popover);
|
|
||||||
GDK_AVAILABLE_IN_3_12
|
|
||||||
void gtk_window_remove_popover (GtkWindow *window,
|
|
||||||
GtkWidget *popover);
|
|
||||||
GDK_AVAILABLE_IN_3_12
|
|
||||||
void gtk_window_set_popover_position (GtkWindow *window,
|
|
||||||
GtkWidget *popover,
|
|
||||||
GtkPositionType pos,
|
|
||||||
const cairo_rectangle_int_t *rect);
|
|
||||||
GDK_AVAILABLE_IN_3_12
|
|
||||||
void gtk_window_get_popover_position (GtkWindow *window,
|
|
||||||
GtkWidget *popover,
|
|
||||||
GtkPositionType *pos,
|
|
||||||
cairo_rectangle_int_t *rect);
|
|
||||||
|
|
||||||
G_END_DECLS
|
G_END_DECLS
|
||||||
|
|
||||||
#endif /* __GTK_WINDOW_H__ */
|
#endif /* __GTK_WINDOW_H__ */
|
||||||
|
@ -93,6 +93,20 @@ void _gtk_window_get_shadow_width (GtkWindow *window,
|
|||||||
|
|
||||||
void _gtk_window_toggle_maximized (GtkWindow *window);
|
void _gtk_window_toggle_maximized (GtkWindow *window);
|
||||||
|
|
||||||
|
/* Popovers */
|
||||||
|
void _gtk_window_add_popover (GtkWindow *window,
|
||||||
|
GtkWidget *popover);
|
||||||
|
void _gtk_window_remove_popover (GtkWindow *window,
|
||||||
|
GtkWidget *popover);
|
||||||
|
void _gtk_window_set_popover_position (GtkWindow *window,
|
||||||
|
GtkWidget *popover,
|
||||||
|
GtkPositionType pos,
|
||||||
|
const cairo_rectangle_int_t *rect);
|
||||||
|
void _gtk_window_get_popover_position (GtkWindow *window,
|
||||||
|
GtkWidget *popover,
|
||||||
|
GtkPositionType *pos,
|
||||||
|
cairo_rectangle_int_t *rect);
|
||||||
|
|
||||||
G_END_DECLS
|
G_END_DECLS
|
||||||
|
|
||||||
#endif /* __GTK_WINDOW_PRIVATE_H__ */
|
#endif /* __GTK_WINDOW_PRIVATE_H__ */
|
||||||
|
Loading…
Reference in New Issue
Block a user