diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-27 15:07:22 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-27 15:07:22 +0000 |
commit | f9d480cfe50ca1d7a0f0b5a2b8bb9932962bfbe7 (patch) | |
tree | ce9e8db2d4e8799780fa72ae8f1953039373e2ee /src/st/st-theme-context.h | |
parent | Initial commit. (diff) | |
download | gnome-shell-f9d480cfe50ca1d7a0f0b5a2b8bb9932962bfbe7.tar.xz gnome-shell-f9d480cfe50ca1d7a0f0b5a2b8bb9932962bfbe7.zip |
Adding upstream version 3.38.6.upstream/3.38.6upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'src/st/st-theme-context.h')
-rw-r--r-- | src/st/st-theme-context.h | 65 |
1 files changed, 65 insertions, 0 deletions
diff --git a/src/st/st-theme-context.h b/src/st/st-theme-context.h new file mode 100644 index 0000000..165ce25 --- /dev/null +++ b/src/st/st-theme-context.h @@ -0,0 +1,65 @@ +/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */ +/* + * st-theme-context.c: holds global information about a tree of styled objects + * + * Copyright 2009, 2010 Red Hat, Inc. + * Copyright 2009 Florian Müllner + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation, either version 2.1 of + * the License, or (at your option) any later version. + * + * This program is distributed in the hope it will be useful, but WITHOUT ANY + * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for + * more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ + +#ifndef __ST_THEME_CONTEXT_H__ +#define __ST_THEME_CONTEXT_H__ + +#include <clutter/clutter.h> +#include <pango/pango.h> +#include "st-theme-node.h" + +G_BEGIN_DECLS + +/** + * SECTION:st-theme-context + * @short_description: holds global information about a tree of styled objects + * + * #StThemeContext is responsible for managing information global to a tree of styled objects, + * such as the set of stylesheets or the default font. In normal usage, a #StThemeContext + * is bound to a #ClutterStage; a singleton #StThemeContext can be obtained for a #ClutterStage + * by using st_theme_context_get_for_stage(). + */ + +#define ST_TYPE_THEME_CONTEXT (st_theme_context_get_type ()) +G_DECLARE_FINAL_TYPE (StThemeContext, st_theme_context, + ST, THEME_CONTEXT, GObject) + +StThemeContext *st_theme_context_new (void); +StThemeContext *st_theme_context_get_for_stage (ClutterStage *stage); + +void st_theme_context_set_theme (StThemeContext *context, + StTheme *theme); +StTheme * st_theme_context_get_theme (StThemeContext *context); + +void st_theme_context_set_font (StThemeContext *context, + const PangoFontDescription *font); +const PangoFontDescription *st_theme_context_get_font (StThemeContext *context); + +StThemeNode * st_theme_context_get_root_node (StThemeContext *context); + +StThemeNode * st_theme_context_intern_node (StThemeContext *context, + StThemeNode *node); + +int st_theme_context_get_scale_factor (StThemeContext *context); + +G_END_DECLS + +#endif /* __ST_THEME_CONTEXT_H__ */ |