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

« back to all changes in this revision

Viewing changes to panel/item_dialog.h

  • Committer: Bazaar Package Importer
  • Author(s): Yves-Alexis Perez
  • Date: 2008-05-19 08:08:22 UTC
  • mfrom: (1.1.16 upstream)
  • Revision ID: james.westby@ubuntu.com-20080519080822-c8ptdv1s8o9r4ou0
Tags: 4.4.2-6
* switch to triggers:
  - debian/postinst: remove xfce-mcs-manager refresh.
  - debian/prerm dropped.
  - debian/control: conflicts against non-triggers-enable xfce4-mcs-manager.
* debian/control: remove useless Conflicts/Replaces against Sarge stuff.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/*  $Id: item_dialog.h 4135 2004-09-13 20:31:39Z jasper $
2
 
 *
3
 
 *  Copyright 2003-2004 Jasper Huijsmans (jasper@xfce.org)
4
 
 *
5
 
 *  This program is free software; you can redistribute it and/or modify
6
 
 *  it under the terms of the GNU General Public License as published by
7
 
 *  the Free Software Foundation; either version 2 of the License, or
8
 
 *  (at your option) any later version.
9
 
 *
10
 
 *  This program is distributed in the hope that it will be useful,
11
 
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
12
 
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13
 
 *  GNU Library General Public License for more details.
14
 
 *
15
 
 *  You should have received a copy of the GNU General Public License
16
 
 *  along with this program; if not, write to the Free Software
17
 
 *  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
18
 
 */
19
 
 
20
 
#ifndef __XFCE_ITEM_DIALOG_H__
21
 
#define __XFCE_ITEM_DIALOG_H__
22
 
 
23
 
#include <gmodule.h>
24
 
#include <panel/item.h>
25
 
 
26
 
/* CommandOptions
27
 
 * --------------
28
 
 * For use in property dialogs. Consists of:
29
 
 * - Entry to hold command. 
30
 
 * - Checkbutton to run in terminal.
31
 
 * - Checkbutton to use startup notification (if available at compile time).
32
 
 *
33
 
 * You can set a callback that will be run when something changes.
34
 
*/
35
 
typedef struct _CommandOptions CommandOptions;
36
 
 
37
 
struct _CommandOptions
38
 
{
39
 
    /* add this to your dialog */
40
 
    GtkWidget *base;
41
 
 
42
 
    /* use the functions declared below to change the contents of 
43
 
     * the members of this struct */
44
 
 
45
 
    GtkWidget *command_entry;
46
 
    GtkWidget *term_checkbutton;
47
 
    GtkWidget *sn_checkbutton;
48
 
 
49
 
    void (*on_change) (const char *command, gboolean in_term, gboolean use_sn,
50
 
                       gpointer data);
51
 
    gpointer data;
52
 
};
53
 
 
54
 
G_MODULE_IMPORT CommandOptions *create_command_options (GtkSizeGroup * sg);
55
 
 
56
 
G_MODULE_IMPORT void destroy_command_options (CommandOptions * opts);
57
 
 
58
 
G_MODULE_IMPORT void command_options_set_command (CommandOptions * opts, const char *command,
59
 
                                  gboolean in_term, gboolean use_sn);
60
 
 
61
 
G_MODULE_IMPORT void command_options_set_callback (CommandOptions * opts,
62
 
                                   void (*callback) (const char *, gboolean,
63
 
                                                     gboolean, gpointer),
64
 
                                   gpointer data);
65
 
 
66
 
G_MODULE_IMPORT void command_options_get_command (CommandOptions * opts, char **command,
67
 
                                  gboolean * in_term, gboolean * use_sn);
68
 
 
69
 
 
70
 
/* IconOptions
71
 
 * --------------
72
 
 * For use in property dialogs. Consists of:
73
 
 * - Preview frame for the icon (allows dropping of image files).
74
 
 * - Optional option menu for builtin, themed icons.
75
 
 * - Entry to hold file name. Gives access to xfmime-edit when that is
76
 
 *   installed.
77
 
 *
78
 
 * You can set a callback that will be run when the icon is changed.
79
 
*/
80
 
typedef struct _IconOptions IconOptions;
81
 
 
82
 
struct _IconOptions
83
 
{
84
 
    /* add this to your dialog */
85
 
    GtkWidget *base;
86
 
 
87
 
    /* use the functions declared below to change the contents of 
88
 
     * the members of this struct */
89
 
 
90
 
    GtkWidget *icon_menu;
91
 
    GtkWidget *icon_entry;
92
 
    GtkWidget *image;
93
 
 
94
 
    /* complex signal handling needed */
95
 
    int id_sig;
96
 
    int icon_id;
97
 
    char *saved_path;
98
 
 
99
 
    /* callback */
100
 
    void (*on_change) (int icon_id, const char *icon_path, gpointer data);
101
 
    gpointer data;
102
 
};
103
 
 
104
 
G_MODULE_IMPORT IconOptions *create_icon_options (GtkSizeGroup * sg, gboolean use_builtins);
105
 
 
106
 
G_MODULE_IMPORT void destroy_icon_options (IconOptions * opts);
107
 
 
108
 
G_MODULE_IMPORT void icon_options_set_icon (IconOptions * opts, int id, const char *path);
109
 
 
110
 
G_MODULE_IMPORT void icon_options_set_callback (IconOptions * opts,
111
 
                                void (*callback) (int, const char *,
112
 
                                                  gpointer), gpointer data);
113
 
 
114
 
G_MODULE_IMPORT void icon_options_get_icon (IconOptions * opts, int *id, char **path);
115
 
 
116
 
 
117
 
/* PanelItem and MenuItem dialogs
118
 
 * ------------------------------
119
 
 * These functions should only be used by the panel 
120
 
*/
121
 
G_MODULE_IMPORT void panel_item_create_options (Control * control, GtkContainer * container,
122
 
                                GtkWidget * done);
123
 
 
124
 
G_MODULE_IMPORT void edit_menu_item_dialog (Item * mi);
125
 
 
126
 
G_MODULE_IMPORT void add_menu_item_dialog (PanelPopup * pp);
127
 
 
128
 
G_MODULE_IMPORT void destroy_menu_dialog (void);
129
 
 
130
 
#endif /* __XFCE_ITEM_DIALOG_H__ */