<?xml version="1.0"?>
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN"
               "http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd" [
<!ENTITY % local.common.attrib "xmlns:xi  CDATA  #FIXED 'http://www.w3.org/2003/XInclude'">
<!ENTITY version SYSTEM "version.xml">
<!ENTITY pi "&#960;">
<!ENTITY solidus "&#8260;">
]>
<refentry id="GtkStyleProvider">
<refmeta>
<refentrytitle role="top_of_page" id="GtkStyleProvider.top_of_page">GtkStyleProvider</refentrytitle>
<manvolnum>3</manvolnum>
<refmiscinfo>GTK4 Library</refmiscinfo>
</refmeta>
<refnamediv>
<refname>GtkStyleProvider</refname>
<refpurpose>Interface to provide style information to GtkStyleContext</refpurpose>
</refnamediv>

<refsect1 id="GtkStyleProvider.signals" role="signal_proto">
<title role="signal_proto.title">Signals</title>
<informaltable frame="none">
<tgroup cols="3">
<colspec colname="signal_proto_type" colwidth="150px"/>
<colspec colname="signal_proto_name" colwidth="300px"/>
<colspec colname="signal_proto_flags" colwidth="200px"/>
<tbody>
<row><entry role="signal_type"><link linkend="void"><returnvalue>void</returnvalue></link></entry><entry role="signal_name"><link linkend="GtkStyleProvider-gtk-private-changed">gtk-private-changed</link></entry><entry role="signal_flags"><link linkend="G-SIGNAL-RUN-LAST:CAPS">Run Last</link></entry></row>

</tbody>
</tgroup>
</informaltable>
</refsect1>
<refsect1 id="GtkStyleProvider.other" role="other_proto">
<title role="other_proto.title">Types and Values</title>
<informaltable pgwide="1" frame="none">
<tgroup cols="2">
<colspec colname="other_proto_type" colwidth="150px"/>
<colspec colname="other_proto_name"/>
<tbody>
<row><entry role="datatype_keyword"></entry><entry role="function_name"><link linkend="GtkStyleProvider-struct">GtkStyleProvider</link></entry></row>
<row><entry role="define_keyword">#define</entry><entry role="function_name"><link linkend="GTK-STYLE-PROVIDER-PRIORITY-FALLBACK:CAPS">GTK_STYLE_PROVIDER_PRIORITY_FALLBACK</link></entry></row>
<row><entry role="define_keyword">#define</entry><entry role="function_name"><link linkend="GTK-STYLE-PROVIDER-PRIORITY-THEME:CAPS">GTK_STYLE_PROVIDER_PRIORITY_THEME</link></entry></row>
<row><entry role="define_keyword">#define</entry><entry role="function_name"><link linkend="GTK-STYLE-PROVIDER-PRIORITY-SETTINGS:CAPS">GTK_STYLE_PROVIDER_PRIORITY_SETTINGS</link></entry></row>
<row><entry role="define_keyword">#define</entry><entry role="function_name"><link linkend="GTK-STYLE-PROVIDER-PRIORITY-APPLICATION:CAPS">GTK_STYLE_PROVIDER_PRIORITY_APPLICATION</link></entry></row>
<row><entry role="define_keyword">#define</entry><entry role="function_name"><link linkend="GTK-STYLE-PROVIDER-PRIORITY-USER:CAPS">GTK_STYLE_PROVIDER_PRIORITY_USER</link></entry></row>

</tbody>
</tgroup>
</informaltable>
</refsect1>
<refsect1 id="GtkStyleProvider.object-hierarchy" role="object_hierarchy">
<title role="object_hierarchy.title">Object Hierarchy</title>
<screen>    <link linkend="GInterface">GInterface</link>
    <phrase role="lineart">&#9584;&#9472;&#9472;</phrase> GtkStyleProvider
</screen>
</refsect1>
<refsect1 id="GtkStyleProvider.prerequisites" role="prerequisites">
<title role="prerequisites.title">Prerequisites</title>
<para>
GtkStyleProvider requires
 <link linkend="GObject">GObject</link>.</para>

</refsect1>
<refsect1 id="GtkStyleProvider.implementations" role="implementations">
<title role="implementations.title">Known Implementations</title>
<para>
GtkStyleProvider is implemented by
 <link linkend="GtkCssProvider">GtkCssProvider</link> and  <link linkend="GtkSettings">GtkSettings</link>.</para>

</refsect1>

<refsect1 id="GtkStyleProvider.includes"><title>Includes</title><synopsis>#include &lt;gtk/gtk.h&gt;
</synopsis></refsect1>

<refsect1 id="GtkStyleProvider.description" role="desc">
<title role="desc.title">Description</title>
<para>GtkStyleProvider is an interface used to provide style information to a <link linkend="GtkStyleContext"><type>GtkStyleContext</type></link>.
See <link linkend="gtk-style-context-add-provider"><function>gtk_style_context_add_provider()</function></link> and <link linkend="gtk-style-context-add-provider-for-display"><function>gtk_style_context_add_provider_for_display()</function></link>.</para>

</refsect1>
<refsect1 id="GtkStyleProvider.functions_details" role="details">
<title role="details.title">Functions</title>
<para />
</refsect1>
<refsect1 id="GtkStyleProvider.other_details" role="details">
<title role="details.title">Types and Values</title>
<refsect2 id="GtkStyleProvider-struct" role="struct">
<title>GtkStyleProvider</title>
<indexterm zone="GtkStyleProvider-struct"><primary>GtkStyleProvider</primary></indexterm>
<programlisting language="C">typedef struct _GtkStyleProvider GtkStyleProvider;</programlisting>
</refsect2>
<refsect2 id="GTK-STYLE-PROVIDER-PRIORITY-FALLBACK:CAPS" role="macro">
<title>GTK_STYLE_PROVIDER_PRIORITY_FALLBACK</title>
<indexterm zone="GTK-STYLE-PROVIDER-PRIORITY-FALLBACK:CAPS"><primary>GTK_STYLE_PROVIDER_PRIORITY_FALLBACK</primary></indexterm>
<programlisting language="C">#define GTK_STYLE_PROVIDER_PRIORITY_FALLBACK      1
</programlisting>
<para>The priority used for default style information
that is used in the absence of themes.</para>
<para>Note that this is not very useful for providing default
styling for custom style classes - themes are likely to
override styling provided at this priority with
catch-all <literal>* {...}</literal> rules.</para>
</refsect2>
<refsect2 id="GTK-STYLE-PROVIDER-PRIORITY-THEME:CAPS" role="macro">
<title>GTK_STYLE_PROVIDER_PRIORITY_THEME</title>
<indexterm zone="GTK-STYLE-PROVIDER-PRIORITY-THEME:CAPS"><primary>GTK_STYLE_PROVIDER_PRIORITY_THEME</primary></indexterm>
<programlisting language="C">#define GTK_STYLE_PROVIDER_PRIORITY_THEME     200
</programlisting>
<para>The priority used for style information provided
by themes.</para>
</refsect2>
<refsect2 id="GTK-STYLE-PROVIDER-PRIORITY-SETTINGS:CAPS" role="macro">
<title>GTK_STYLE_PROVIDER_PRIORITY_SETTINGS</title>
<indexterm zone="GTK-STYLE-PROVIDER-PRIORITY-SETTINGS:CAPS"><primary>GTK_STYLE_PROVIDER_PRIORITY_SETTINGS</primary></indexterm>
<programlisting language="C">#define GTK_STYLE_PROVIDER_PRIORITY_SETTINGS    400
</programlisting>
<para>The priority used for style information provided
via <link linkend="GtkSettings"><type>GtkSettings</type></link>.</para>
<para>This priority is higher than <link linkend="GTK-STYLE-PROVIDER-PRIORITY-THEME:CAPS"><type>GTK_STYLE_PROVIDER_PRIORITY_THEME</type></link>
to let settings override themes.</para>
</refsect2>
<refsect2 id="GTK-STYLE-PROVIDER-PRIORITY-APPLICATION:CAPS" role="macro">
<title>GTK_STYLE_PROVIDER_PRIORITY_APPLICATION</title>
<indexterm zone="GTK-STYLE-PROVIDER-PRIORITY-APPLICATION:CAPS"><primary>GTK_STYLE_PROVIDER_PRIORITY_APPLICATION</primary></indexterm>
<programlisting language="C">#define GTK_STYLE_PROVIDER_PRIORITY_APPLICATION 600
</programlisting>
<para>A priority that can be used when adding a <link linkend="GtkStyleProvider"><type>GtkStyleProvider</type></link>
for application-specific style information.</para>
</refsect2>
<refsect2 id="GTK-STYLE-PROVIDER-PRIORITY-USER:CAPS" role="macro">
<title>GTK_STYLE_PROVIDER_PRIORITY_USER</title>
<indexterm zone="GTK-STYLE-PROVIDER-PRIORITY-USER:CAPS"><primary>GTK_STYLE_PROVIDER_PRIORITY_USER</primary></indexterm>
<programlisting language="C">#define GTK_STYLE_PROVIDER_PRIORITY_USER        800
</programlisting>
<para>The priority used for the style information from
<literal>$XDG_CONFIG_HOME/gtk-4.0/gtk.css</literal>.</para>
<para>You should not use priorities higher than this, to
give the user the last word.</para>
</refsect2>

</refsect1>
<refsect1 id="GtkStyleProvider.signal-details" role="signals">
<title role="signals.title">Signal Details</title>
<refsect2 id="GtkStyleProvider-gtk-private-changed" role="signal"><title>The <literal>“gtk-private-changed”</literal> signal</title>
<indexterm zone="GtkStyleProvider-gtk-private-changed"><primary>GtkStyleProvider::gtk-private-changed</primary></indexterm>
<programlisting language="C"><link linkend="void"><returnvalue>void</returnvalue></link>
user_function (<link linkend="GtkStyleProvider"><type>GtkStyleProvider</type></link> *styleprovider,
               <link linkend="gpointer"><type>gpointer</type></link>          user_data)</programlisting>
<para>Flags: <link linkend="G-SIGNAL-RUN-LAST:CAPS">Run Last</link></para>
</refsect2>
</refsect1>
<refsect1 id="GtkStyleProvider.see-also">
<title>See Also</title>
<para><link linkend="GtkStyleContext"><type>GtkStyleContext</type></link>, <link linkend="GtkCssProvider"><type>GtkCssProvider</type></link></para>

</refsect1>

</refentry>
