GtkWindow: Add a getter for the custom titlebar

This is needed for the glade integration of CSD windows.
This commit is contained in:
Matthias Clasen 2014-10-18 12:42:29 -04:00
parent 57751fa391
commit c5c21bb1cf
3 changed files with 28 additions and 0 deletions

View File

@ -5741,6 +5741,7 @@ gtk_window_get_application
gtk_window_set_application
gtk_window_set_has_user_ref_count
gtk_window_set_titlebar
gtk_window_get_titlebar
gtk_window_set_interactive_debugging
<SUBSECTION Standard>

View File

@ -4007,6 +4007,31 @@ out:
gtk_widget_map (widget);
}
/**
* gtk_window_get_titlebar:
* @window: a #GtkWindow
*
* Returns the custom titlebar that has been set with
* gtk_window_set_titlebar().
*
* Returns: (transfer none): the custom titlebar, or %NULL
*
* Since: 3.16
*/
GtkWidget *
gtk_window_get_titlebar (GtkWindow *window)
{
GtkWindowPrivate *priv = window->priv;
g_return_val_if_fail (GTK_IS_WINDOW (window), NULL);
/* Don't return the internal titlebar */
if (priv->title_box == priv->titlebar)
return NULL;
return priv->title_box;
}
gboolean
_gtk_window_titlebar_shows_app_menu (GtkWindow *window)
{

View File

@ -482,6 +482,8 @@ gboolean gtk_window_get_resize_grip_area (GtkWindow *window,
GDK_AVAILABLE_IN_3_10
void gtk_window_set_titlebar (GtkWindow *window,
GtkWidget *titlebar);
GDK_AVAILABLE_IN_3_16
GtkWidget *gtk_window_get_titlebar (GtkWindow *window);
GDK_AVAILABLE_IN_3_12
gboolean gtk_window_is_maximized (GtkWindow *window);