2N/A * GRUB -- GRand Unified Bootloader 2N/A * Copyright (C) 2008,2009 Free Software Foundation, Inc. 2N/A * GRUB is free software: you can redistribute it and/or modify 2N/A * it under the terms of the GNU General Public License as published by 2N/A * the Free Software Foundation, either version 3 of the License, or 2N/A * (at your option) any later version. 2N/A * GRUB is distributed in the hope that it will be useful, 2N/A * but WITHOUT ANY WARRANTY; without even the implied warranty of 2N/A * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 2N/A * GNU General Public License for more details. 2N/A * You should have received a copy of the GNU General Public License 2N/A/* Currently hard coded to '.png' extension. */ 2N/A /* Icon cache: linked list w/ dummy head node. */ 2N/A/* Create a new icon manager and return a point to it. */ 2N/A /* Initialize the dummy head node. */ 2N/A/* Destroy the icon manager MGR, freeing all resources used by it. 2N/ANote: Any bitmaps returned by grub_gfxmenu_icon_manager_get_icon() 2N/Aare destroyed and must not be used by the caller after this function 2N/A/* Clear the icon cache. */ 2N/A/* Set the theme path. If the theme path is changed, the icon cache 2N/A /* Clear the cache if the theme path has changed. */ 2N/A/* Set the icon size. When icons are requested from the icon manager, 2N/A they are scaled to this size before being returned. If the size is 2N/A changed, the icon cache is cleared. */ 2N/A /* If the width or height is changed, we must clear the cache, since the 2N/A scaled bitmaps are stored in the cache. */ 2N/A/* Try to load an icon for the specified CLASS_NAME in the directory DIR. 2N/A Returns 0 if the icon could not be loaded, or returns a pointer to a new 2N/A bitmap if it was successful. */ 2N/A/* Get the icon for the specified class CLASS_NAME. If an icon for 2N/A CLASS_NAME already exists in the cache, then a reference to the cached 2N/A bitmap is returned. If it is not cached, then it is loaded and cached. 2N/A If no icon could be could for CLASS_NAME, then 0 is returned. */ 2N/A /* First check the icon cache. */ 2N/A /* Otherwise, we search for an icon to load. */ 2N/A /* No icon was found. */ 2N/A /* This should probably be noted in the cache, so that a search is not 2N/A performed each time an icon for CLASS_NAME is requested. */ 2N/A /* Insert a new cache entry for this icon. */ 2N/A/* Get the best available icon for ENTRY. Beginning with the first class 2N/A listed in the menu entry and proceeding forward, an icon for each class 2N/A is searched for. The first icon found is returned. The returned icon 2N/A is scaled to the size specified by 2N/A grub_gfxmenu_icon_manager_set_icon_size(). 2N/A Note: Bitmaps returned by this function are destroyed when the 2N/A icon manager is destroyed. 2N/A /* Try each class in succession. */