1 /* 2 * xfdesktop - xfce4's desktop manager 3 * 4 * Copyright (c) 2004-2007 Brian Tarricone, <bjt23@cornell.edu> 5 * 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. 10 * 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 Library General Public License for more details. 15 * 16 * You should have received a copy of the GNU General Public License 17 * along with this program; if not, write to the Free Software Foundation, 18 * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA 19 */ 20 21 #ifndef _XFCE_DESKTOP_H_ 22 #define _XFCE_DESKTOP_H_ 23 24 #include <gtk/gtk.h> 25 #include <xfconf/xfconf.h> 26 27 #include "xfce-backdrop.h" 28 29 G_BEGIN_DECLS 30 31 #define XFCE_TYPE_DESKTOP (xfce_desktop_get_type()) 32 #define XFCE_DESKTOP(object) (G_TYPE_CHECK_INSTANCE_CAST((object), XFCE_TYPE_DESKTOP, XfceDesktop)) 33 #define XFCE_DESKTOP_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass), XFCE_TYPE_DESKTOP, XfceDesktopClass)) 34 #define XFCE_IS_DESKTOP(object) (G_TYPE_CHECK_INSTANCE_TYPE((object), XFCE_TYPE_DESKTOP)) 35 #define XFCE_IS_DESKTOP_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass), XFCE_TYPE_DESKTOP)) 36 #define XFCE_DESKTOP_GET_CLASS(object) (G_TYPE_INSTANCE_GET_CLASS((object), XFCE_TYPE_DESKTOP, XfceDesktopClass)) 37 38 typedef struct _XfceDesktop XfceDesktop; 39 typedef struct _XfceDesktopClass XfceDesktopClass; 40 typedef struct _XfceDesktopPrivate XfceDesktopPrivate; 41 42 typedef void (*SessionLogoutFunc)(); 43 44 typedef enum 45 { 46 XFCE_DESKTOP_ICON_STYLE_NONE = 0, 47 XFCE_DESKTOP_ICON_STYLE_WINDOWS, 48 XFCE_DESKTOP_ICON_STYLE_FILES, 49 } XfceDesktopIconStyle; 50 51 struct _XfceDesktop 52 { 53 GtkWindow window; 54 55 /*< private >*/ 56 XfceDesktopPrivate *priv; 57 }; 58 59 struct _XfceDesktopClass 60 { 61 GtkWindowClass parent_class; 62 63 /*< signals >*/ 64 65 /* for the app menu/file context menu */ 66 void (*populate_root_menu)(XfceDesktop *desktop, 67 GtkMenuShell *menu); 68 69 /* for the windowlist menu */ 70 void (*populate_secondary_root_menu)(XfceDesktop *desktop, 71 GtkMenuShell *menu); 72 }; 73 74 GType xfce_desktop_get_type (void) G_GNUC_CONST; 75 76 GtkWidget *xfce_desktop_new(GdkScreen *gscreen, 77 XfconfChannel *channel, 78 const gchar *property_prefix); 79 80 gint xfce_desktop_get_n_monitors(XfceDesktop *desktop); 81 82 void xfce_desktop_set_icon_style(XfceDesktop *desktop, 83 XfceDesktopIconStyle style); 84 XfceDesktopIconStyle xfce_desktop_get_icon_style(XfceDesktop *desktop); 85 86 void xfce_desktop_set_icon_size(XfceDesktop *desktop, 87 guint icon_size); 88 89 void xfce_desktop_set_primary(XfceDesktop *desktop, 90 gboolean primary); 91 92 void xfce_desktop_set_use_icon_font_size(XfceDesktop *desktop, 93 gboolean use_system); 94 void xfce_desktop_set_icon_font_size(XfceDesktop *desktop, 95 guint font_size_points); 96 97 void xfce_desktop_set_center_text(XfceDesktop *desktop, 98 gboolean center_text); 99 100 void xfce_desktop_set_session_logout_func(XfceDesktop *desktop, 101 SessionLogoutFunc logout_func); 102 103 void xfce_desktop_freeze_updates(XfceDesktop *desktop); 104 void xfce_desktop_thaw_updates(XfceDesktop *desktop); 105 106 107 void xfce_desktop_popup_root_menu(XfceDesktop *desktop, 108 guint button, 109 guint activate_time); 110 void xfce_desktop_popup_secondary_root_menu(XfceDesktop *desktop, 111 guint button, 112 guint activate_time); 113 114 void xfce_desktop_refresh(XfceDesktop *desktop, gboolean advance_wallpaper); 115 116 void xfce_desktop_arrange_icons(XfceDesktop *desktop); 117 118 gboolean xfce_desktop_get_cycle_backdrop(XfceDesktop *desktop); 119 120 G_END_DECLS 121 122 #endif 123