2010-02-08 18:40:25 +00:00
|
|
|
/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */
|
2010-11-10 22:00:45 +00:00
|
|
|
/*
|
|
|
|
* st-theme-node-private.h: private structures and functions for StThemeNode
|
|
|
|
*
|
|
|
|
* Copyright 2009, 2010 Red Hat, Inc.
|
2011-12-23 17:59:20 +00:00
|
|
|
* Copyright 2011 Quentin "Sardem FF7" Glidic
|
2010-11-10 22:00:45 +00:00
|
|
|
*
|
|
|
|
* 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/>.
|
|
|
|
*/
|
|
|
|
|
2010-02-08 18:40:25 +00:00
|
|
|
#ifndef __ST_THEME_NODE_PRIVATE_H__
|
|
|
|
#define __ST_THEME_NODE_PRIVATE_H__
|
|
|
|
|
|
|
|
#include <gdk/gdk.h>
|
|
|
|
|
|
|
|
#include "st-theme-node.h"
|
2014-11-11 14:04:46 +00:00
|
|
|
#include <libcroco/libcroco.h>
|
2011-12-23 17:59:20 +00:00
|
|
|
#include "st-types.h"
|
2010-02-08 18:40:25 +00:00
|
|
|
|
|
|
|
G_BEGIN_DECLS
|
|
|
|
|
|
|
|
struct _StThemeNode {
|
|
|
|
GObject parent;
|
|
|
|
|
|
|
|
StThemeContext *context;
|
|
|
|
StThemeNode *parent_node;
|
|
|
|
StTheme *theme;
|
|
|
|
|
|
|
|
PangoFontDescription *font_desc;
|
|
|
|
|
|
|
|
ClutterColor background_color;
|
|
|
|
/* If gradient is set, then background_color is the gradient start */
|
|
|
|
StGradientType background_gradient_type;
|
|
|
|
ClutterColor background_gradient_end;
|
|
|
|
|
2010-09-01 16:13:43 +00:00
|
|
|
int background_position_x;
|
|
|
|
int background_position_y;
|
2012-07-28 07:49:14 +00:00
|
|
|
|
2011-12-23 17:59:20 +00:00
|
|
|
StBackgroundSize background_size;
|
|
|
|
gint background_size_w;
|
|
|
|
gint background_size_h;
|
2010-09-01 16:13:43 +00:00
|
|
|
|
2010-02-08 18:40:25 +00:00
|
|
|
ClutterColor foreground_color;
|
|
|
|
ClutterColor border_color[4];
|
2010-05-26 20:50:24 +00:00
|
|
|
ClutterColor outline_color;
|
2010-02-08 18:40:25 +00:00
|
|
|
|
|
|
|
int border_width[4];
|
|
|
|
int border_radius[4];
|
2010-05-26 20:50:24 +00:00
|
|
|
int outline_width;
|
2010-02-08 18:40:25 +00:00
|
|
|
guint padding[4];
|
2014-11-11 14:04:46 +00:00
|
|
|
guint margin[4];
|
2010-02-08 18:40:25 +00:00
|
|
|
|
|
|
|
int width;
|
|
|
|
int height;
|
|
|
|
int min_width;
|
|
|
|
int min_height;
|
|
|
|
int max_width;
|
|
|
|
int max_height;
|
|
|
|
|
2010-05-30 21:06:37 +00:00
|
|
|
int transition_duration;
|
|
|
|
|
2014-09-19 00:04:00 +00:00
|
|
|
GFile *background_image;
|
2010-02-08 18:40:25 +00:00
|
|
|
StBorderImage *border_image;
|
2011-01-13 23:27:24 +00:00
|
|
|
StShadow *box_shadow;
|
|
|
|
StShadow *background_image_shadow;
|
2010-07-24 14:56:50 +00:00
|
|
|
StShadow *text_shadow;
|
2010-11-01 02:06:48 +00:00
|
|
|
StIconColors *icon_colors;
|
2010-02-08 18:40:25 +00:00
|
|
|
|
|
|
|
GType element_type;
|
|
|
|
char *element_id;
|
2012-11-07 18:44:33 +00:00
|
|
|
GStrv element_classes;
|
|
|
|
GStrv pseudo_classes;
|
2010-02-08 18:40:25 +00:00
|
|
|
char *inline_style;
|
|
|
|
|
|
|
|
CRDeclaration **properties;
|
|
|
|
int n_properties;
|
|
|
|
|
|
|
|
/* We hold onto these separately so we can destroy them on finalize */
|
|
|
|
CRDeclaration *inline_properties;
|
|
|
|
|
2012-07-28 07:49:14 +00:00
|
|
|
guint background_position_set : 1;
|
2012-07-28 08:36:20 +00:00
|
|
|
guint background_repeat : 1;
|
2012-07-28 07:49:14 +00:00
|
|
|
|
2010-02-08 18:40:25 +00:00
|
|
|
guint properties_computed : 1;
|
|
|
|
guint geometry_computed : 1;
|
|
|
|
guint background_computed : 1;
|
|
|
|
guint foreground_computed : 1;
|
|
|
|
guint border_image_computed : 1;
|
2011-01-13 23:27:24 +00:00
|
|
|
guint box_shadow_computed : 1;
|
|
|
|
guint background_image_shadow_computed : 1;
|
2010-07-24 14:56:50 +00:00
|
|
|
guint text_shadow_computed : 1;
|
2010-02-08 18:40:25 +00:00
|
|
|
guint link_type : 2;
|
2013-07-03 16:01:00 +00:00
|
|
|
guint rendered_once : 1;
|
2013-07-04 13:26:08 +00:00
|
|
|
guint cached_textures : 1;
|
2013-07-03 16:01:00 +00:00
|
|
|
|
|
|
|
int box_shadow_min_width;
|
|
|
|
int box_shadow_min_height;
|
2013-04-05 01:22:34 +00:00
|
|
|
|
2019-04-30 12:42:59 +00:00
|
|
|
guint stylesheets_changed_id;
|
|
|
|
|
2015-09-26 02:20:22 +00:00
|
|
|
CoglPipeline *border_slices_texture;
|
2015-10-15 21:42:19 +00:00
|
|
|
CoglPipeline *border_slices_pipeline;
|
2015-09-26 02:20:22 +00:00
|
|
|
CoglPipeline *background_texture;
|
2015-10-15 21:42:19 +00:00
|
|
|
CoglPipeline *background_pipeline;
|
|
|
|
CoglPipeline *background_shadow_pipeline;
|
2015-11-12 10:22:52 +00:00
|
|
|
CoglPipeline *color_pipeline;
|
2013-07-04 13:26:08 +00:00
|
|
|
|
|
|
|
StThemeNodePaintState cached_state;
|
2010-02-08 18:40:25 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
void _st_theme_node_ensure_background (StThemeNode *node);
|
|
|
|
void _st_theme_node_ensure_geometry (StThemeNode *node);
|
2014-11-11 14:04:46 +00:00
|
|
|
void _st_theme_node_apply_margins (StThemeNode *node,
|
|
|
|
ClutterActor *actor);
|
2019-10-24 12:03:12 +00:00
|
|
|
void _st_theme_node_reset_for_stylesheet_change (StThemeNode *node);
|
2010-02-08 18:40:25 +00:00
|
|
|
|
|
|
|
G_END_DECLS
|
|
|
|
|
|
|
|
#endif /* __ST_THEME_NODE_PRIVATE_H__ */
|