void gs_page_reload (GsPage *page) { GsPageClass *klass; g_return_if_fail (GS_IS_PAGE (page)); klass = GS_PAGE_GET_CLASS (page); g_assert (klass->reload != NULL); klass->reload (page); }
/** * gs_page_switch_from: * * Pure virtual method that subclasses have to override to show page specific * widgets. */ void gs_page_switch_from (GsPage *page) { GsPageClass *klass = GS_PAGE_GET_CLASS (page); GsPagePrivate *priv = gs_page_get_instance_private (page); priv->is_active = FALSE; if (klass->switch_from != NULL) klass->switch_from (page); }
/** * gs_page_switch_to: * * Pure virtual method that subclasses have to override to show page specific * widgets. */ void gs_page_switch_to (GsPage *page, gboolean scroll_up) { GsPageClass *klass = GS_PAGE_GET_CLASS (page); GsPagePrivate *priv = gs_page_get_instance_private (page); priv->is_active = TRUE; if (klass->switch_to != NULL) klass->switch_to (page, scroll_up); }
/** * gs_page_switch_to: * * Pure virtual method that subclasses have to override to show page specific * widgets. */ void gs_page_switch_to (GsPage *page, gboolean scroll_up) { GsPageClass *klass; g_return_if_fail (GS_IS_PAGE (page)); klass = GS_PAGE_GET_CLASS (page); g_assert (klass->switch_to != NULL); klass->switch_to (page, scroll_up); }
gboolean gs_page_setup (GsPage *page, GsShell *shell, GsPluginLoader *plugin_loader, GtkBuilder *builder, GCancellable *cancellable, GError **error) { GsPageClass *klass; GsPagePrivate *priv = gs_page_get_instance_private (page); g_return_val_if_fail (GS_IS_PAGE (page), FALSE); klass = GS_PAGE_GET_CLASS (page); g_assert (klass->setup != NULL); priv->plugin_loader = g_object_ref (plugin_loader); priv->shell = shell; return klass->setup (page, shell, plugin_loader, builder, cancellable, error); }