mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-12-24 12:41:16 +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_has_user_ref_count
|
||||
gtk_window_set_titlebar
|
||||
gtk_window_add_popover
|
||||
gtk_window_remove_popover
|
||||
gtk_window_set_popover_position
|
||||
gtk_window_get_popover_position
|
||||
|
||||
<SUBSECTION Standard>
|
||||
GTK_WINDOW
|
||||
|
@ -7935,7 +7935,7 @@ gtk_window_remove (GtkContainer *container,
|
||||
if (widget == window->priv->title_box)
|
||||
unset_titlebar (window);
|
||||
else if (_gtk_window_has_popover (window, widget))
|
||||
gtk_window_remove_popover (window, widget);
|
||||
_gtk_window_remove_popover (window, widget);
|
||||
else
|
||||
GTK_CONTAINER_CLASS (gtk_window_parent_class)->remove (container, widget);
|
||||
}
|
||||
@ -12028,19 +12028,9 @@ _gtk_window_get_shadow_width (GtkWindow *window,
|
||||
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
|
||||
gtk_window_add_popover (GtkWindow *window,
|
||||
GtkWidget *popover)
|
||||
_gtk_window_add_popover (GtkWindow *window,
|
||||
GtkWidget *popover)
|
||||
{
|
||||
GtkWindowPrivate *priv;
|
||||
GtkWindowPopover *data;
|
||||
@ -12064,18 +12054,9 @@ gtk_window_add_popover (GtkWindow *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
|
||||
gtk_window_remove_popover (GtkWindow *window,
|
||||
GtkWidget *popover)
|
||||
_gtk_window_remove_popover (GtkWindow *window,
|
||||
GtkWidget *popover)
|
||||
{
|
||||
GtkWindowPrivate *priv;
|
||||
GtkWindowPopover *data;
|
||||
@ -12094,25 +12075,11 @@ gtk_window_remove_popover (GtkWindow *window,
|
||||
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
|
||||
gtk_window_set_popover_position (GtkWindow *window,
|
||||
GtkWidget *popover,
|
||||
GtkPositionType pos,
|
||||
const cairo_rectangle_int_t *rect)
|
||||
_gtk_window_set_popover_position (GtkWindow *window,
|
||||
GtkWidget *popover,
|
||||
GtkPositionType pos,
|
||||
const cairo_rectangle_int_t *rect)
|
||||
{
|
||||
GtkWindowPopover *data;
|
||||
|
||||
@ -12152,22 +12119,11 @@ gtk_window_set_popover_position (GtkWindow *window,
|
||||
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
|
||||
gtk_window_get_popover_position (GtkWindow *window,
|
||||
GtkWidget *popover,
|
||||
GtkPositionType *pos,
|
||||
cairo_rectangle_int_t *rect)
|
||||
_gtk_window_get_popover_position (GtkWindow *window,
|
||||
GtkWidget *popover,
|
||||
GtkPositionType *pos,
|
||||
cairo_rectangle_int_t *rect)
|
||||
{
|
||||
GtkWindowPopover *data;
|
||||
|
||||
|
@ -483,23 +483,6 @@ void gtk_window_set_titlebar (GtkWindow *window,
|
||||
GDK_AVAILABLE_IN_3_12
|
||||
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
|
||||
|
||||
#endif /* __GTK_WINDOW_H__ */
|
||||
|
@ -93,6 +93,20 @@ void _gtk_window_get_shadow_width (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
|
||||
|
||||
#endif /* __GTK_WINDOW_PRIVATE_H__ */
|
||||
|
Loading…
Reference in New Issue
Block a user