-/* -*- 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. */
/*========================================================*/
GdkPixbuf *pixbuf;
} CacheRecord;
+
/*========================================================*/
/* Private globals. */
/*========================================================*/
+
/*========================================================*/
/* Private function prototypes. */
/*========================================================*/
gpointer val,
gpointer user_data);
-\f
+
/*---------------------------------------------------------------------------*/
/* PRIVATE. Destroy cache record. */
/*---------------------------------------------------------------------------*/
g_free (record);
}
+
/*****************************************************************************/
/* Create a new hash table to keep track of cached pixbufs. */
/*****************************************************************************/
return pixbuf_cache;
}
+
/*****************************************************************************/
/* Free up previously allocated hash table and its contents. */
/*****************************************************************************/
gl_debug (DEBUG_PIXBUF_CACHE, "END");
}
+
/*****************************************************************************/
/* Add pixbuf to cache explicitly (not a reference). */
/*****************************************************************************/
gl_debug (DEBUG_PIXBUF_CACHE, "END");
}
+
/*****************************************************************************/
/* Get pixbuf. If not in cache, read it and add to cache. */
/*****************************************************************************/
return pixbuf;
}
+
/*****************************************************************************/
/* Remove pixbuf, but only if no references left. */
/*****************************************************************************/
gl_debug (DEBUG_PIXBUF_CACHE, "END");
}
+
/*---------------------------------------------------------------------------*/
/* PRIVATE. Add a name to a GList while iterating over cache. */
/*---------------------------------------------------------------------------*/
gl_debug (DEBUG_PIXBUF_CACHE, "END");
}
+
/*****************************************************************************/
/* Return a list of names for all pixbufs in the cache. */
/*****************************************************************************/
return name_list;
}
+
/*****************************************************************************/
/* Free up a list of pixbuf names. */
/*****************************************************************************/
}
+
+
+/*
+ * Local Variables: -- emacs
+ * mode: C -- emacs
+ * c-basic-offset: 8 -- emacs
+ * tab-width: 8 -- emacs
+ * indent-tabs-mode: nil -- emacs
+ * End: -- emacs
+ */