/* $Id: desktopicon.h,v 1.1 2010/01/29 17:34:20 khorben Exp $ */ /* Copyright (c) 2010 Pierre Pronchery */ /* This file is part of DeforaOS Desktop Browser */ /* This program 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, version 3 of the License. * * This program 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, see . */ #ifndef BROWSER_DESKTOPICON_H # define BROWSER_DESKTOPICON_H # include # include "desktop.h" /* DesktopIcon */ /* types */ # ifndef Desktop # define Desktop Desktop typedef struct _Desktop Desktop; # endif # ifndef DesktopIcon # define DesktopIcon DesktopIcon typedef struct _DesktopIcon DesktopIcon; # endif /* constants */ #define DESKTOPICON_ICON_SIZE 48 #define DESKTOPICON_MAX_HEIGHT 100 #define DESKTOPICON_MAX_WIDTH 100 #define DESKTOPICON_MIN_HEIGHT (DESKTOPICON_ICON_SIZE << 1) #define DESKTOPICON_MIN_WIDTH DESKTOPICON_MAX_WIDTH /* functions */ DesktopIcon * desktopicon_new(Desktop * desktop, char const * name, char const * url); void desktopicon_delete(DesktopIcon * desktopicon); /* accessors */ char const * desktopicon_get_path(DesktopIcon * desktopicon); gboolean desktopicon_get_selected(DesktopIcon * desktopicon); gboolean desktopicon_get_updated(DesktopIcon * desktopicon); void desktopicon_set_icon(DesktopIcon * desktopicon, GdkPixbuf * icon); void desktopicon_set_immutable(DesktopIcon * desktopicon, gboolean immutable); void desktopicon_set_selected(DesktopIcon * desktopicon, gboolean selected); void desktopicon_set_updated(DesktopIcon * desktopicon, gboolean updated); /* useful */ void desktopicon_move(DesktopIcon * desktopicon, int x, int y); void desktopicon_show(DesktopIcon * desktopicon); #endif /* !BROWSER_DESKTOPICON_H */