2014-10-22 21:41:50 +00:00
|
|
|
/*
|
|
|
|
* Copyright © 2012 Red Hat Inc.
|
|
|
|
*
|
|
|
|
* This library 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 library 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
|
|
|
|
* Lesser General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU Lesser General Public
|
|
|
|
* License along with this library. If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
*
|
|
|
|
* Authors: Benjamin Otte <otte@gnome.org>
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef __GTK_CSS_STYLE_PRIVATE_H__
|
|
|
|
#define __GTK_CSS_STYLE_PRIVATE_H__
|
|
|
|
|
|
|
|
#include <glib-object.h>
|
2019-04-10 16:40:50 +00:00
|
|
|
#include <gtk/css/gtkcss.h>
|
2014-10-22 21:41:50 +00:00
|
|
|
|
|
|
|
#include "gtk/gtkbitmaskprivate.h"
|
|
|
|
#include "gtk/gtkcssvalueprivate.h"
|
|
|
|
|
|
|
|
G_BEGIN_DECLS
|
|
|
|
|
|
|
|
#define GTK_TYPE_CSS_STYLE (gtk_css_style_get_type ())
|
|
|
|
#define GTK_CSS_STYLE(obj) (G_TYPE_CHECK_INSTANCE_CAST (obj, GTK_TYPE_CSS_STYLE, GtkCssStyle))
|
|
|
|
#define GTK_CSS_STYLE_CLASS(cls) (G_TYPE_CHECK_CLASS_CAST (cls, GTK_TYPE_CSS_STYLE, GtkCssStyleClass))
|
|
|
|
#define GTK_IS_CSS_STYLE(obj) (G_TYPE_CHECK_INSTANCE_TYPE (obj, GTK_TYPE_CSS_STYLE))
|
|
|
|
#define GTK_IS_CSS_STYLE_CLASS(obj) (G_TYPE_CHECK_CLASS_TYPE (obj, GTK_TYPE_CSS_STYLE))
|
|
|
|
#define GTK_CSS_STYLE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GTK_TYPE_CSS_STYLE, GtkCssStyleClass))
|
|
|
|
|
|
|
|
/* typedef struct _GtkCssStyle GtkCssStyle; */
|
|
|
|
typedef struct _GtkCssStyleClass GtkCssStyleClass;
|
|
|
|
|
|
|
|
struct _GtkCssStyle
|
|
|
|
{
|
|
|
|
GObject parent;
|
|
|
|
};
|
|
|
|
|
|
|
|
struct _GtkCssStyleClass
|
|
|
|
{
|
|
|
|
GObjectClass parent_class;
|
2014-10-23 02:10:03 +00:00
|
|
|
|
|
|
|
/* Get the value for the given property id. This needs to be FAST. */
|
|
|
|
GtkCssValue * (* get_value) (GtkCssStyle *style,
|
|
|
|
guint id);
|
|
|
|
/* Get the section the value at the given id was declared at or NULL if unavailable.
|
|
|
|
* Optional: default impl will just return NULL */
|
|
|
|
GtkCssSection * (* get_section) (GtkCssStyle *style,
|
|
|
|
guint id);
|
2015-02-27 17:41:13 +00:00
|
|
|
/* TRUE if this style will require changes based on timestamp */
|
|
|
|
gboolean (* is_static) (GtkCssStyle *style);
|
2014-10-22 21:41:50 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
GType gtk_css_style_get_type (void) G_GNUC_CONST;
|
|
|
|
|
|
|
|
GtkCssValue * gtk_css_style_get_value (GtkCssStyle *style,
|
2019-02-15 03:06:22 +00:00
|
|
|
guint id) G_GNUC_PURE;
|
2014-10-22 21:41:50 +00:00
|
|
|
GtkCssSection * gtk_css_style_get_section (GtkCssStyle *style,
|
2019-02-15 03:06:22 +00:00
|
|
|
guint id) G_GNUC_PURE;
|
|
|
|
gboolean gtk_css_style_is_static (GtkCssStyle *style) G_GNUC_PURE;
|
2014-10-22 21:41:50 +00:00
|
|
|
|
|
|
|
char * gtk_css_style_to_string (GtkCssStyle *style);
|
2016-01-03 22:05:16 +00:00
|
|
|
gboolean gtk_css_style_print (GtkCssStyle *style,
|
2016-01-03 20:34:08 +00:00
|
|
|
GString *string,
|
|
|
|
guint indent,
|
|
|
|
gboolean skip_initial);
|
2016-06-03 04:19:24 +00:00
|
|
|
PangoAttrList * gtk_css_style_get_pango_attributes (GtkCssStyle *style);
|
|
|
|
|
2016-06-03 04:29:05 +00:00
|
|
|
PangoFontDescription * gtk_css_style_get_pango_font (GtkCssStyle *style);
|
2014-10-22 21:41:50 +00:00
|
|
|
|
|
|
|
G_END_DECLS
|
|
|
|
|
|
|
|
#endif /* __GTK_CSS_STYLE_PRIVATE_H__ */
|