]>
Dogcows Code - chaz/openbox/blob - render/imagecache.h
1 /* -*- indent-tabs-mode: nil; tab-width: 4; c-basic-offset: 4; -*-
3 imagecache.h for the Openbox window manager
4 Copyright (c) 2008 Dana Jansens
6 This program is free software; you can redistribute it and/or modify
7 it under the terms of the GNU General Public License as published by
8 the Free Software Foundation; either version 2 of the License, or
9 (at your option) any later version.
11 This program is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 GNU General Public License for more details.
16 See the COPYING file for a copy of the GNU General Public License.
19 #ifndef __imagecache_h
20 #define __imagecache_h
26 guint
RrImagePicHash(const struct _RrImagePic
*p
);
28 /*! Create a new image cache. An image cache is basically a hash table to look
29 up RrImages. Each RrImage in the cache may contain one or more Pictures,
30 that is one or more actual copies of image data at various sizes. For eg,
31 for a window, all of its various icons are loaded into the same RrImage.
32 When an RrImage is drawn and a picture inside it needs to be resized, that
33 is also saved within the RrImage.
35 For each picture that an RrImage has, the picture is hashed and that is used
36 as a key to find the RrImage. So, given any picture in any RrImage in the
37 cache, if you hash it, you will find the RrImage.
39 struct _RrImageCache
{
41 /*! When an original picture is resized for an RrImage, the resized picture
42 is saved in the RrImage. This specifies how many pictures should be
43 saved at a time. When this is exceeded, the least recently used
44 "resized" picture is deleted.
46 gint max_resized_saved
;
This page took 0.035463 seconds and 4 git commands to generate.