gnome-control-center/panels/universal-access/cc-ua-typing-page.h
Christopher Davis 793498ba91 universal-access: Port to Adw{Navigation,Toolbar}View
AdwNavigationView is a new widget meant to be used specifically
for navigation, unlike AdwLeaflet which was multipurpose.
AdwNavigationView provides a cleaner API and gives us automatic
titles, back buttons, gestures, actions, and windowcontrols.

AdwToolbarView is a utility widget that simplifies setting the
top and bottom bars for simple views, giving us styling with
undershoots, the ability to use flat headers in scrolling views,
and proper styling when used with the new sidebar widgets.

This commit ports the Accessibility panel to AdwNavigationView
and AdwToolbarView. Subpages now subclass AdwNavigationPage
and contain toolbar views - meaning their headers are joined with
their content. Their titles and their back buttons are automatically
handled by libadwaita, with proper accessibility.

The actions provided by AdwNavigationPage allow us to remove
the custom listbox we used for the `row-activated` signal. Rows
now use the `navigation.push` action in order to push a subpage
by tag.

Currently our AdwToolbarViews use the `raised` style, as we
have not ported to the new sidebar widget yet.
2023-08-25 08:00:43 +00:00

42 lines
1.4 KiB
C

/* -*- mode: c; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
*
* Copyright (C) 2008 William Jon McCann <jmccann@redhat.com>
* Copyright (C) 2010 Intel, Inc
* Copyright 2022 Mohammed Sadiq <sadiq@sadiqpk.org>
* Copyright 2022 Purism SPC
*
* Licensed under the GNU General Public License Version 2
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Author(s):
* Thomas Wood <thomas.wood@intel.com>
* Rodrigo Moya <rodrigo@gnome.org>
* Mohammed Sadiq <sadiq@sadiqpk.org>
*
* SPDX-License-Identifier: GPL-2.0-or-later
*/
#pragma once
#include <adwaita.h>
G_BEGIN_DECLS
#define CC_TYPE_UA_TYPING_PAGE (cc_ua_typing_page_get_type ())
G_DECLARE_FINAL_TYPE (CcUaTypingPage, cc_ua_typing_page, CC, UA_TYPING_PAGE, AdwNavigationPage)
G_END_DECLS