summaryrefslogtreecommitdiff
path: root/src/xfce-desktop.h
blob: 59149581816e7c7883f58edc6e370e75a1c33c8c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
/*
 *  xfdesktop - xfce4's desktop manager
 *
 *  Copyright (c) 2004-2007 Brian Tarricone, <bjt23@cornell.edu>
 *
 *  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; either version 2 of the License, or
 *  (at your option) any later version.
 *
 *  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 Library General Public License for more details.
 *
 *  You should have received a copy of the GNU General Public License
 *  along with this program; if not, write to the Free Software
 *  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
 */

#ifndef _XFCE_DESKTOP_H_
#define _XFCE_DESKTOP_H_

#include <gtk/gtk.h>

#include "xfce-backdrop.h"

G_BEGIN_DECLS

#define XFCE_TYPE_DESKTOP              (xfce_desktop_get_type())
#define XFCE_DESKTOP(object)           (G_TYPE_CHECK_INSTANCE_CAST((object), XFCE_TYPE_DESKTOP, XfceDesktop))
#define XFCE_DESKTOP_CLASS(klass)      (G_TYPE_CHECK_CLASS_CAST((klass), XFCE_TYPE_DESKTOP, XfceDesktopClass))
#define XFCE_IS_DESKTOP(object)        (G_TYPE_CHECK_INSTANCE_TYPE((object), XFCE_TYPE_DESKTOP))
#define XFCE_IS_DESKTOP_CLASS(klass)   (G_TYPE_CHECK_CLASS_TYPE((klass), XFCE_TYPE_DESKTOP))
#define XFCE_DESKTOP_GET_CLASS(object) (G_TYPE_INSTANCE_GET_CLASS((object), XFCE_TYPE_DESKTOP, XfceDesktopClass))

typedef struct _XfceDesktop XfceDesktop;
typedef struct _XfceDesktopClass XfceDesktopClass;
typedef struct _XfceDesktopPriv XfceDesktopPriv;

typedef void (*SessionLogoutFunc)();

typedef enum
{
    XFCE_DESKTOP_ICON_STYLE_NONE = 0,
    XFCE_DESKTOP_ICON_STYLE_WINDOWS,
    XFCE_DESKTOP_ICON_STYLE_FILES,
} XfceDesktopIconStyle;

struct _XfceDesktop
{
    GtkWindow window;
    
    /*< private >*/
    XfceDesktopPriv *priv;
};

struct _XfceDesktopClass
{
    GtkWindowClass parent_class;
    
    /*< signals >*/
    
    /* for the app menu/file context menu */
    void (*populate_root_menu)(XfceDesktop *desktop,
                               GtkMenuShell *menu);
    
    /* for the windowlist menu */
    void (*populate_secondary_root_menu)(XfceDesktop *desktop,
                                         GtkMenuShell *menu);
};

GType xfce_desktop_get_type                     () G_GNUC_CONST;

GtkWidget *xfce_desktop_new(GdkScreen *gscreen);

guint xfce_desktop_get_n_monitors(XfceDesktop *desktop);

gint xfce_desktop_get_width(XfceDesktop *desktop);
gint xfce_desktop_get_height(XfceDesktop *desktop);

void xfce_desktop_set_xinerama_stretch(XfceDesktop *desktop,
                                       gboolean stretch);
gboolean xfce_desktop_get_xinerama_stretch(XfceDesktop *desktop);

void xfce_desktop_set_icon_style(XfceDesktop *desktop,
                                 XfceDesktopIconStyle style);
XfceDesktopIconStyle xfce_desktop_get_icon_style(XfceDesktop *desktop);

void xfce_desktop_set_icon_size(XfceDesktop *desktop,
                                guint icon_size);

void xfce_desktop_set_icon_use_system_font_size(XfceDesktop *desktop,
                                                gboolean use_system);
void xfce_desktop_set_icon_font_size(XfceDesktop *desktop,
                                     guint font_size_points);

void xfce_desktop_set_session_logout_func(XfceDesktop *desktop,
                                          SessionLogoutFunc logout_func);

void xfce_desktop_freeze_updates(XfceDesktop *desktop);
void xfce_desktop_thaw_updates(XfceDesktop *desktop);

XfceBackdrop *xfce_desktop_peek_backdrop(XfceDesktop *desktop,
                                         guint monitor);

void xfce_desktop_popup_root_menu(XfceDesktop *desktop,
                                  guint button,
                                  guint activate_time);
void xfce_desktop_popup_secondary_root_menu(XfceDesktop *desktop,
                                            guint button,
                                            guint activate_time);

G_END_DECLS

#endif