2 #ifndef __GTK_DIR_SEL_H__
3 #define __GTK_DIR_SEL_H__
7 #include <gtk/gtkdialog.h>
12 #endif /* __cplusplus */
15 #define GTK_TYPE_DIR_SELECTION (gtk_dir_selection_get_type ())
16 #define GTK_DIR_SELECTION(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GTK_TYPE_DIR_SELECTION, GtkDirSelection))
17 #define GTK_DIR_SELECTION_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GTK_TYPE_DIR_SELECTION, GtkDirSelectionClass))
18 #define GTK_IS_DIR_SELECTION(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GTK_TYPE_DIR_SELECTION))
19 #define GTK_IS_DIR_SELECTION_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GTK_TYPE_DIR_SELECTION))
20 #define GTK_DIR_SELECTION_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GTK_TYPE_DIR_SELECTION, GtkDirSelectionClass))
23 typedef struct _GtkDirSelection GtkDirSelection
;
24 typedef struct _GtkDirSelectionClass GtkDirSelectionClass
;
26 struct _GtkDirSelection
28 GtkDialog parent_instance
;
32 GtkWidget
*selection_entry
;
33 GtkWidget
*selection_text
;
36 GtkWidget
*cancel_button
;
37 GtkWidget
*help_button
;
38 GtkWidget
*history_pulldown
;
39 GtkWidget
*history_menu
;
41 GtkWidget
*fileop_dialog
;
42 GtkWidget
*fileop_entry
;
46 GtkWidget
*fileop_c_dir
;
47 GtkWidget
*fileop_del_file
;
48 GtkWidget
*fileop_ren_file
;
50 GtkWidget
*button_area
;
51 GtkWidget
*action_area
;
53 GPtrArray
*selected_names
;
57 struct _GtkDirSelectionClass
59 GtkDialogClass parent_class
;
61 /* Padding for future expansion */
62 void (*_gtk_reserved1
) (void);
63 void (*_gtk_reserved2
) (void);
64 void (*_gtk_reserved3
) (void);
65 void (*_gtk_reserved4
) (void);
69 GType
gtk_dir_selection_get_type (void) G_GNUC_CONST
;
70 GtkWidget
* gtk_dir_selection_new (const gchar
*title
);
71 void gtk_dir_selection_set_filename (GtkDirSelection
*filesel
,
72 const gchar
*filename
);
73 /* This function returns the selected filename in the C runtime's
74 * multibyte string encoding, which may or may not be the same as that
75 * used by GDK (UTF-8). To convert to UTF-8, call g_filename_to_utf8().
76 * The returned string points to a statically allocated buffer and
77 * should be copied away.
79 G_CONST_RETURN gchar
* gtk_dir_selection_get_filename (GtkDirSelection
*filesel
);
81 void gtk_dir_selection_complete (GtkDirSelection
*filesel
,
82 const gchar
*pattern
);
83 void gtk_dir_selection_show_fileop_buttons (GtkDirSelection
*filesel
);
84 void gtk_dir_selection_hide_fileop_buttons (GtkDirSelection
*filesel
);
86 gchar
** gtk_dir_selection_get_selections (GtkDirSelection
*filesel
);
87 gchar
* gtk_dir_selection_get_dir (GtkDirSelection
*filesel
);
88 void gtk_dir_selection_set_select_multiple (GtkDirSelection
*filesel
,
89 gboolean select_multiple
);
90 gboolean
gtk_dir_selection_get_select_multiple (GtkDirSelection
*filesel
);
94 #endif /* __cplusplus */
97 #endif /* __GTK_DIR_SEL_H__ */