iconcache.h

Go to the documentation of this file.
00001 /* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */
00002 
00003 /* Metacity window icons */
00004 
00005 /* 
00006  * Copyright (C) 2002 Havoc Pennington
00007  * 
00008  * This program is free software; you can redistribute it and/or
00009  * modify it under the terms of the GNU General Public License as
00010  * published by the Free Software Foundation; either version 2 of the
00011  * License, or (at your option) any later version.
00012  *
00013  * This program is distributed in the hope that it will be useful, but
00014  * WITHOUT ANY WARRANTY; without even the implied warranty of
00015  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00016  * General Public License for more details.
00017  * 
00018  * You should have received a copy of the GNU General Public License
00019  * along with this program; if not, write to the Free Software
00020  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
00021  * 02111-1307, USA.
00022  */
00023 
00024 #ifndef META_ICON_CACHE_H
00025 #define META_ICON_CACHE_H
00026 
00027 #include "screen-private.h"
00028 
00029 typedef struct _MetaIconCache MetaIconCache;
00030 
00031 typedef enum
00032 {
00033   /* These MUST be in ascending order of preference;
00034    * i.e. if we get _NET_WM_ICON and already have
00035    * WM_HINTS, we prefer _NET_WM_ICON
00036    */
00037   USING_NO_ICON,
00038   USING_FALLBACK_ICON,
00039   USING_KWM_WIN_ICON,
00040   USING_WM_HINTS,
00041   USING_NET_WM_ICON
00042 } IconOrigin;
00043 
00044 struct _MetaIconCache
00045 {
00046   int origin;
00047   Pixmap prev_pixmap;
00048   Pixmap prev_mask;
00049   guint want_fallback : 1;
00050   /* TRUE if these props have changed */
00051   guint wm_hints_dirty : 1;
00052   guint kwm_win_icon_dirty : 1;
00053   guint net_wm_icon_dirty : 1;
00054 };
00055 
00056 void           meta_icon_cache_init                 (MetaIconCache *icon_cache);
00057 void           meta_icon_cache_free                 (MetaIconCache *icon_cache);
00058 void           meta_icon_cache_property_changed     (MetaIconCache *icon_cache,
00059                                                      MetaDisplay   *display,
00060                                                      Atom           atom);
00061 gboolean       meta_icon_cache_get_icon_invalidated (MetaIconCache *icon_cache);
00062 
00063 gboolean meta_read_icons         (MetaScreen     *screen,
00064                                   Window          xwindow,
00065                                   MetaIconCache  *icon_cache,
00066                                   Pixmap          wm_hints_pixmap,
00067                                   Pixmap          wm_hints_mask,
00068                                   GdkPixbuf     **iconp,
00069                                   int             ideal_width,
00070                                   int             ideal_height,
00071                                   GdkPixbuf     **mini_iconp,
00072                                   int             ideal_mini_width,
00073                                   int             ideal_mini_height);
00074 
00075 #endif
00076 
00077 
00078 
00079 

Generated on Sat Aug 23 22:04:16 2008 for metacity by  doxygen 1.5.5