]> git.sur5r.net Git - glabels/blobdiff - src/pixbuf-cache.c
Imported Upstream version 3.0.0
[glabels] / src / pixbuf-cache.c
index df6760473c87ca1b451a60ba9cd98a23adc8d7bf..77b2fc59f9cc95c8be5d8e05851854cfa2872624 100644 (file)
@@ -1,32 +1,30 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 8 -*- */
-
 /*
- *  (GLABELS) Label and Business Card Creation program for GNOME
- *
- *  pixbuf-cache.c:  GLabels pixbuf cache module
+ *  pixbuf-cache.c
+ *  Copyright (C) 2003-2009  Jim Evins <evins@snaught.com>.
  *
- *  Copyright (C) 2003  Jim Evins <evins@snaught.com>.
+ *  This file is part of gLabels.
  *
- *  This program is free software; you can redistribute it and/or modify
+ *  gLabels is free software: you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
- *  the Free Software Foundation; either version 2 of the License, or
+ *  the Free Software Foundation, either version 3 of the License, or
  *  (at your option) any later version.
  *
- *  This program is distributed in the hope that it will be useful,
+ *  gLabels 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 General Public License for more details.
  *
  *  You should have received a copy of the GNU General Public License
- *  along with this program; if not, write to the Free Software
- *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+ *  along with gLabels.  If not, see <http://www.gnu.org/licenses/>.
  */
+
 #include <config.h>
 
 #include "pixbuf-cache.h"
 
 #include "debug.h"
 
+
 /*========================================================*/
 /* Private types.                                         */
 /*========================================================*/
@@ -37,10 +35,12 @@ typedef struct {
        GdkPixbuf *pixbuf;
 } CacheRecord;
 
+
 /*========================================================*/
 /* Private globals.                                       */
 /*========================================================*/
 
+
 /*========================================================*/
 /* Private function prototypes.                           */
 /*========================================================*/
@@ -51,7 +51,7 @@ static void  add_name_to_list (gpointer key,
                               gpointer val,
                               gpointer user_data);
 
-\f
+
 /*---------------------------------------------------------------------------*/
 /* PRIVATE.  Destroy cache record.                                           */
 /*---------------------------------------------------------------------------*/
@@ -67,6 +67,7 @@ record_destroy (gpointer val)
        g_free (record);
 }
 
+
 /*****************************************************************************/
 /* Create a new hash table to keep track of cached pixbufs.                  */
 /*****************************************************************************/
@@ -87,6 +88,7 @@ gl_pixbuf_cache_new (void)
        return pixbuf_cache;
 }
 
+
 /*****************************************************************************/
 /* Free up previously allocated hash table and its contents.                 */
 /*****************************************************************************/
@@ -100,6 +102,7 @@ gl_pixbuf_cache_free (GHashTable *pixbuf_cache)
        gl_debug (DEBUG_PIXBUF_CACHE, "END");
 }
 
+
 /*****************************************************************************/
 /* Add pixbuf to cache explicitly (not a reference).                         */
 /*****************************************************************************/
@@ -129,6 +132,7 @@ gl_pixbuf_cache_add_pixbuf (GHashTable *pixbuf_cache,
        gl_debug (DEBUG_PIXBUF_CACHE, "END");
 }
 
+
 /*****************************************************************************/
 /* Get pixbuf.  If not in cache, read it and add to cache.                   */
 /*****************************************************************************/
@@ -166,6 +170,7 @@ gl_pixbuf_cache_get_pixbuf (GHashTable *pixbuf_cache,
        return pixbuf;
 }
 
+
 /*****************************************************************************/
 /* Remove pixbuf, but only if no references left.                            */
 /*****************************************************************************/
@@ -194,6 +199,7 @@ gl_pixbuf_cache_remove_pixbuf (GHashTable *pixbuf_cache,
        gl_debug (DEBUG_PIXBUF_CACHE, "END");
 }
 
+
 /*---------------------------------------------------------------------------*/
 /* PRIVATE.  Add a name to a GList while iterating over cache.               */
 /*---------------------------------------------------------------------------*/
@@ -214,6 +220,7 @@ add_name_to_list (gpointer key,
        gl_debug (DEBUG_PIXBUF_CACHE, "END");
 }
 
+
 /*****************************************************************************/
 /* Return a list of names for all pixbufs in the cache.                      */
 /*****************************************************************************/
@@ -231,6 +238,7 @@ gl_pixbuf_cache_get_name_list (GHashTable *pixbuf_cache)
        return name_list;
 }
 
+
 /*****************************************************************************/
 /* Free up a list of pixbuf names.                                           */
 /*****************************************************************************/
@@ -252,3 +260,13 @@ gl_pixbuf_cache_free_name_list (GList *name_list)
 }
 
 
+
+
+/*
+ * Local Variables:       -- emacs
+ * mode: C                -- emacs
+ * c-basic-offset: 8      -- emacs
+ * tab-width: 8           -- emacs
+ * indent-tabs-mode: nil  -- emacs
+ * End:                   -- emacs
+ */