~ubuntu-branches/debian/experimental/xfce4-panel/experimental

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
117
118
119
120
121
122
123
124
125
126
/* vim: set expandtab ts=8 sw=4: */

/*  $Id: xfce-panel-item-iface.h 22660 2006-08-04 21:02:22Z jasper $
 *
 *  Copyright © 2005 Jasper Huijsmans <jasper@xfce.org>
 *
 *  This program is free software; you can redistribute it and/or modify
 *  it under the terms of the GNU Library 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 Library 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_PANEL_ITEM_H
#define _XFCE_PANEL_ITEM_H

#include <glib-object.h>
#include <libxfce4panel/xfce-panel-enums.h>

#define XFCE_TYPE_PANEL_ITEM                (xfce_panel_item_get_type ())
#define XFCE_PANEL_ITEM(obj)                (G_TYPE_CHECK_INSTANCE_CAST ((obj), XFCE_TYPE_PANEL_ITEM, XfcePanelItem))
#define XFCE_IS_PANEL_ITEM(obj)             (G_TYPE_CHECK_INSTANCE_TYPE ((obj), XFCE_TYPE_PANEL_ITEM))
#define XFCE_PANEL_ITEM_GET_INTERFACE(inst) (G_TYPE_INSTANCE_GET_INTERFACE ((inst), XFCE_TYPE_PANEL_ITEM, XfcePanelItemInterface))


G_BEGIN_DECLS

typedef struct _XfcePanelItem XfcePanelItem;    /* dummy object */
typedef struct _XfcePanelItemInterface XfcePanelItemInterface;

struct _XfcePanelItemInterface
{
    GTypeInterface parent;

    /* vtable */
    G_CONST_RETURN char *(*get_name)         (XfcePanelItem *item);

    G_CONST_RETURN char *(*get_id)           (XfcePanelItem *item);

    G_CONST_RETURN char *(*get_display_name) (XfcePanelItem *item);

    gboolean (*get_expand)                   (XfcePanelItem *item);

    void (*free_data)                        (XfcePanelItem *item);
    
    void (*save)                             (XfcePanelItem *item);

    void (*set_size)                         (XfcePanelItem *item, int size);

    void (*set_screen_position)              (XfcePanelItem *item, 
                                              XfceScreenPosition position);

    void (*set_sensitive)                    (XfcePanelItem *item,
                                              gboolean sensitive);

    void (*remove)                           (XfcePanelItem *item);

    void (*configure)                        (XfcePanelItem *item);

    /* reserved for future expansion */
    void (*_panel_reserved1) (void);
    void (*_panel_reserved2) (void);
    void (*_panel_reserved3) (void);
};

GType xfce_panel_item_get_type (void) G_GNUC_CONST;

/* focus */
void xfce_panel_item_focus_panel (XfcePanelItem *item);

/* emit signals -- to be called from implementors */

void xfce_panel_item_expand_changed (XfcePanelItem *item, gboolean expand);

void xfce_panel_item_menu_deactivated (XfcePanelItem *item);

void xfce_panel_item_menu_opened (XfcePanelItem *item);

void xfce_panel_item_customize_panel (XfcePanelItem *item);

void xfce_panel_item_customize_items (XfcePanelItem *item);

void xfce_panel_item_move (XfcePanelItem *item);

void xfce_panel_item_set_panel_hidden (XfcePanelItem *item, gboolean hidden);


/* vtable */

G_CONST_RETURN char *xfce_panel_item_get_name (XfcePanelItem *item);

G_CONST_RETURN char *xfce_panel_item_get_id (XfcePanelItem *item);

G_CONST_RETURN char *xfce_panel_item_get_display_name (XfcePanelItem *item);

gboolean xfce_panel_item_get_expand (XfcePanelItem *item);

void xfce_panel_item_save (XfcePanelItem *item);

void xfce_panel_item_free_data (XfcePanelItem *item);

void xfce_panel_item_set_size (XfcePanelItem *item, 
                               int size);

void xfce_panel_item_set_screen_position (XfcePanelItem *item, 
                                          XfceScreenPosition position);

void xfce_panel_item_set_sensitive (XfcePanelItem *item,
                                    gboolean sensitive);

void xfce_panel_item_remove (XfcePanelItem *item);

void xfce_panel_item_configure (XfcePanelItem *item);


G_END_DECLS

#endif /* _XFCE_PANEL_ITEM_H */