1
/* $Id: item_dialog.h 4135 2004-09-13 20:31:39Z jasper $
3
* Copyright 2003-2004 Jasper Huijsmans (jasper@xfce.org)
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.
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.
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.
20
#ifndef __XFCE_ITEM_DIALOG_H__
21
#define __XFCE_ITEM_DIALOG_H__
24
#include <panel/item.h>
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).
33
* You can set a callback that will be run when something changes.
35
typedef struct _CommandOptions CommandOptions;
37
struct _CommandOptions
39
/* add this to your dialog */
42
/* use the functions declared below to change the contents of
43
* the members of this struct */
45
GtkWidget *command_entry;
46
GtkWidget *term_checkbutton;
47
GtkWidget *sn_checkbutton;
49
void (*on_change) (const char *command, gboolean in_term, gboolean use_sn,
54
G_MODULE_IMPORT CommandOptions *create_command_options (GtkSizeGroup * sg);
56
G_MODULE_IMPORT void destroy_command_options (CommandOptions * opts);
58
G_MODULE_IMPORT void command_options_set_command (CommandOptions * opts, const char *command,
59
gboolean in_term, gboolean use_sn);
61
G_MODULE_IMPORT void command_options_set_callback (CommandOptions * opts,
62
void (*callback) (const char *, gboolean,
66
G_MODULE_IMPORT void command_options_get_command (CommandOptions * opts, char **command,
67
gboolean * in_term, gboolean * use_sn);
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
78
* You can set a callback that will be run when the icon is changed.
80
typedef struct _IconOptions IconOptions;
84
/* add this to your dialog */
87
/* use the functions declared below to change the contents of
88
* the members of this struct */
91
GtkWidget *icon_entry;
94
/* complex signal handling needed */
100
void (*on_change) (int icon_id, const char *icon_path, gpointer data);
104
G_MODULE_IMPORT IconOptions *create_icon_options (GtkSizeGroup * sg, gboolean use_builtins);
106
G_MODULE_IMPORT void destroy_icon_options (IconOptions * opts);
108
G_MODULE_IMPORT void icon_options_set_icon (IconOptions * opts, int id, const char *path);
110
G_MODULE_IMPORT void icon_options_set_callback (IconOptions * opts,
111
void (*callback) (int, const char *,
112
gpointer), gpointer data);
114
G_MODULE_IMPORT void icon_options_get_icon (IconOptions * opts, int *id, char **path);
117
/* PanelItem and MenuItem dialogs
118
* ------------------------------
119
* These functions should only be used by the panel
121
G_MODULE_IMPORT void panel_item_create_options (Control * control, GtkContainer * container,
124
G_MODULE_IMPORT void edit_menu_item_dialog (Item * mi);
126
G_MODULE_IMPORT void add_menu_item_dialog (PanelPopup * pp);
128
G_MODULE_IMPORT void destroy_menu_dialog (void);
130
#endif /* __XFCE_ITEM_DIALOG_H__ */