css: Move gtkcsssection.[ch] into gtk/css

This commit is contained in:
Benjamin Otte 2019-04-10 18:40:50 +02:00
parent 76826cfa2f
commit 2e0a56665a
13 changed files with 35 additions and 29 deletions

View File

@ -34,6 +34,7 @@
#include <gtk/css/gtkcssenumtypes.h>
#include <gtk/css/gtkcsserror.h>
#include <gtk/css/gtkcsslocation.h>
#include <gtk/css/gtkcsssection.h>
#undef __GTK_CSS_H_INSIDE__

View File

@ -20,7 +20,6 @@
#include "gtkcsssection.h"
#include "gtkcssparserprivate.h"
#include "gtkprivate.h"
struct _GtkCssSection
{
@ -52,9 +51,9 @@ gtk_css_section_new (GFile *file,
{
GtkCssSection *result;
gtk_internal_return_val_if_fail (file == NULL || G_IS_FILE (file), NULL);
gtk_internal_return_val_if_fail (start != NULL, NULL);
gtk_internal_return_val_if_fail (end != NULL, NULL);
g_return_val_if_fail (file == NULL || G_IS_FILE (file), NULL);
g_return_val_if_fail (start != NULL, NULL);
g_return_val_if_fail (end != NULL, NULL);
result = g_slice_new0 (GtkCssSection);
@ -78,7 +77,7 @@ gtk_css_section_new (GFile *file,
GtkCssSection *
gtk_css_section_ref (GtkCssSection *section)
{
gtk_internal_return_val_if_fail (section != NULL, NULL);
g_return_val_if_fail (section != NULL, NULL);
section->ref_count += 1;
@ -95,7 +94,7 @@ gtk_css_section_ref (GtkCssSection *section)
void
gtk_css_section_unref (GtkCssSection *section)
{
gtk_internal_return_if_fail (section != NULL);
g_return_if_fail (section != NULL);
section->ref_count -= 1;
if (section->ref_count > 0)
@ -126,7 +125,7 @@ gtk_css_section_unref (GtkCssSection *section)
GtkCssSection *
gtk_css_section_get_parent (const GtkCssSection *section)
{
gtk_internal_return_val_if_fail (section != NULL, NULL);
g_return_val_if_fail (section != NULL, NULL);
return section->parent;
}
@ -145,7 +144,7 @@ gtk_css_section_get_parent (const GtkCssSection *section)
GFile *
gtk_css_section_get_file (const GtkCssSection *section)
{
gtk_internal_return_val_if_fail (section != NULL, NULL);
g_return_val_if_fail (section != NULL, NULL);
return section->file;
}
@ -162,7 +161,7 @@ gtk_css_section_get_file (const GtkCssSection *section)
const GtkCssLocation *
gtk_css_section_get_start_location (const GtkCssSection *section)
{
gtk_internal_return_val_if_fail (section != NULL, NULL);
g_return_val_if_fail (section != NULL, NULL);
return &section->start_location;
}
@ -179,7 +178,7 @@ gtk_css_section_get_start_location (const GtkCssSection *section)
const GtkCssLocation *
gtk_css_section_get_end_location (const GtkCssSection *section)
{
gtk_internal_return_val_if_fail (section != NULL, NULL);
g_return_val_if_fail (section != NULL, NULL);
return &section->end_location;
}
@ -245,7 +244,7 @@ gtk_css_section_to_string (const GtkCssSection *section)
{
GString *string;
gtk_internal_return_val_if_fail (section != NULL, NULL);
g_return_val_if_fail (section != NULL, NULL);
string = g_string_new (NULL);
gtk_css_section_print (section, string);

View File

@ -18,8 +18,13 @@
#ifndef __GTK_CSS_SECTION_H__
#define __GTK_CSS_SECTION_H__
#if !defined (__GTK_CSS_H_INSIDE__) && !defined (GTK_CSS_COMPILATION)
#error "Only <gtk/css/gtkcss.h> can be included directly."
#endif
#include <gio/gio.h>
#include <gtk/css/gtkcss.h>
#include <gdk/gdkversionmacros.h>
#include <gtk/css/gtkcsslocation.h>
G_BEGIN_DECLS

View File

@ -1,6 +1,7 @@
gtk_css_public_sources = files([
'gtkcsslocation.c',
'gtkcsserror.c',
'gtkcsssection.c',
])
gtk_css_private_sources = files([
@ -12,6 +13,7 @@ gtk_css_public_headers = files([
'gtkcssenums.h',
'gtkcsserror.h',
'gtkcsslocation.h',
'gtkcsssection.h',
])
install_headers(gtk_css_public_headers, 'gtkcss.h', subdir: 'gtk-4.0/gtk/css')

View File

@ -84,7 +84,6 @@
#include <gtk/gtkcomboboxtext.h>
#include <gtk/gtkcontainer.h>
#include <gtk/gtkcssprovider.h>
#include <gtk/gtkcsssection.h>
#include <gtk/gtkcustomlayout.h>
#include <gtk/gtkdebug.h>
#include <gtk/gtkdialog.h>

View File

@ -19,9 +19,11 @@
#define __GTK_CSS_LOOKUP_PRIVATE_H__
#include <glib-object.h>
#include "gtk/gtkbitmaskprivate.h"
#include "gtk/gtkcssstaticstyleprivate.h"
#include "gtk/gtkcsssection.h"
#include "gtk/css/gtkcsssection.h"
G_BEGIN_DECLS

View File

@ -17,12 +17,6 @@
#include "config.h"
#include <string.h>
#include <stdlib.h>
#include <gdk-pixbuf/gdk-pixbuf.h>
#include <cairo-gobject.h>
#include "gtkcssproviderprivate.h"
#include "gtkbitmaskprivate.h"
@ -30,7 +24,6 @@
#include "gtkcsscolorvalueprivate.h"
#include "gtkcsskeyframesprivate.h"
#include "gtkcssparserprivate.h"
#include "gtkcsssection.h"
#include "gtkcssselectorprivate.h"
#include "gtkcssshorthandpropertyprivate.h"
#include "gtksettingsprivate.h"
@ -45,6 +38,12 @@
#include "gtkintl.h"
#include "gtkversion.h"
#include <string.h>
#include <stdlib.h>
#include <gdk-pixbuf/gdk-pixbuf.h>
#include <cairo-gobject.h>
/**
* SECTION:gtkcssprovider
* @Short_description: CSS-like styling for widgets

View File

@ -19,7 +19,7 @@
#define __GTK_CSS_PROVIDER_H__
#include <gio/gio.h>
#include <gtk/gtkcsssection.h>
#include <gtk/css/gtkcss.h>
G_BEGIN_DECLS

View File

@ -29,7 +29,6 @@
#include "gtkcssinitialvalueprivate.h"
#include "gtkcssnumbervalueprivate.h"
#include "gtkcssrgbavalueprivate.h"
#include "gtkcsssection.h"
#include "gtkcssshorthandpropertyprivate.h"
#include "gtkcssstringvalueprivate.h"
#include "gtkcssfontfeaturesvalueprivate.h"

View File

@ -21,9 +21,9 @@
#define __GTK_CSS_STYLE_PRIVATE_H__
#include <glib-object.h>
#include <gtk/css/gtkcss.h>
#include "gtk/gtkbitmaskprivate.h"
#include "gtk/gtkcsssection.h"
#include "gtk/gtkcssvalueprivate.h"
G_BEGIN_DECLS

View File

@ -22,8 +22,9 @@
#error "Only <gtk/gtk.h> can be included directly."
#endif
#include <gtk/css/gtkcss.h>
#include <gtk/gtkborder.h>
#include <gtk/gtkcsssection.h>
#include <gtk/gtkstyleprovider.h>
#include <gtk/gtktypes.h>

View File

@ -21,7 +21,6 @@
*/
#include "config.h"
#include <glib/gi18n-lib.h>
#include "css-node-tree.h"
#include "prop-editor.h"
@ -33,7 +32,6 @@
#include "gtk/gtkwidgetprivate.h"
#include "gtkcssproviderprivate.h"
#include "gtkcssstylepropertyprivate.h"
#include "gtkcsssection.h"
#include "gtkcssstyleprivate.h"
#include "gtkcssvalueprivate.h"
#include "gtkcssselectorprivate.h"
@ -45,6 +43,9 @@
#include "gtkmodelbutton.h"
#include "gtkstack.h"
#include <glib/gi18n-lib.h>
#include <gtk/css/gtkcss.h>
enum {
COLUMN_NODE_NAME,
COLUMN_NODE_VISIBLE,

View File

@ -201,7 +201,6 @@ gtk_public_sources = files([
'gtkcomposetable.c',
'gtkcontainer.c',
'gtkcssprovider.c',
'gtkcsssection.c',
'gtkdialog.c',
'gtkdnd.c',
'gtkdragdest.c',
@ -459,7 +458,6 @@ gtk_public_headers = files([
'gtkcomboboxtext.h',
'gtkcontainer.h',
'gtkcssprovider.h',
'gtkcsssection.h',
'gtkcustomlayout.h',
'gtkdebug.h',
'gtkdialog.h',