]> Pileus Git - ~andy/gtk/blobdiff - gtk/gtkcsssection.c
Change FSF Address
[~andy/gtk] / gtk / gtkcsssection.c
index 4b1d0e513f0c24d9ae0e421692426807fc2d0eac..dd4cc021f7463fa688770d55d9a7b8aec658aaac 100644 (file)
@@ -12,9 +12,7 @@
  * 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, write to the
- * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.
  */
 
 #include "config.h"
@@ -74,6 +72,23 @@ _gtk_css_section_new (GtkCssSection     *parent,
   return section;
 }
 
+GtkCssSection *
+_gtk_css_section_new_for_file (GtkCssSectionType  type,
+                               GFile             *file)
+{
+  GtkCssSection *section;
+
+  g_return_val_if_fail (G_IS_FILE (file), NULL);
+
+  section = g_slice_new0 (GtkCssSection);
+
+  section->ref_count = 1;
+  section->section_type = type;
+  section->file = g_object_ref (file);
+
+  return section;
+}
+
 void
 _gtk_css_section_end (GtkCssSection *section)
 {
@@ -262,13 +277,13 @@ gtk_css_section_get_end_line (const GtkCssSection *section)
 }
 
 /**
- * gtk_css_section_get_start_position:
+ * gtk_css_section_get_end_position:
  * @section: the section
  *
  * Returns the offset in bytes from the start of the current line
  * returned via gtk_css_section_get_end_line().
  * This value may change in future invocations of this function if
- * @section is not yet parsed completely. This will for example 
+ * @section is not yet parsed completely. This will for example
  * happen in the GtkCssProvider::parsing-error signal.
  * The end position and line may be identical to the start
  * position and line for sections which failed to parse anything