It compiles and runs after the cleanups
[lttv.git] / ltt / branches / poly / lttv / modules / gui / lttvgui / gtkdirsel.h
1 /* This file is part of the Linux Trace Toolkit viewer
2 * Copyright (C) 2003-2004 Xiangxiu Yang
3 *
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License Version 2 as
6 * published by the Free Software Foundation;
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program; if not, write to the Free Software
15 * Foundation, Inc., 59 Temple Place - Suite 330, Boston,
16 * MA 02111-1307, USA.
17 */
18
19
20 #ifndef __GTK_DIR_SEL_H__
21 #define __GTK_DIR_SEL_H__
22
23
24 #include <gdk/gdk.h>
25 #include <gtk/gtkdialog.h>
26
27
28 #ifdef __cplusplus
29 extern "C" {
30 #endif /* __cplusplus */
31
32
33 #define GTK_TYPE_DIR_SELECTION (gtk_dir_selection_get_type ())
34 #define GTK_DIR_SELECTION(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GTK_TYPE_DIR_SELECTION, GtkDirSelection))
35 #define GTK_DIR_SELECTION_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GTK_TYPE_DIR_SELECTION, GtkDirSelectionClass))
36 #define GTK_IS_DIR_SELECTION(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GTK_TYPE_DIR_SELECTION))
37 #define GTK_IS_DIR_SELECTION_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GTK_TYPE_DIR_SELECTION))
38 #define GTK_DIR_SELECTION_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GTK_TYPE_DIR_SELECTION, GtkDirSelectionClass))
39
40
41 typedef struct _GtkDirSelection GtkDirSelection;
42 typedef struct _GtkDirSelectionClass GtkDirSelectionClass;
43
44 struct _GtkDirSelection
45 {
46 GtkDialog parent_instance;
47
48 GtkWidget *dir_list;
49 GtkWidget *file_list;
50 GtkWidget *selection_entry;
51 GtkWidget *selection_text;
52 GtkWidget *main_vbox;
53 GtkWidget *ok_button;
54 GtkWidget *cancel_button;
55 GtkWidget *help_button;
56 GtkWidget *history_pulldown;
57 GtkWidget *history_menu;
58 GList *history_list;
59 GtkWidget *fileop_dialog;
60 GtkWidget *fileop_entry;
61 gchar *fileop_file;
62 gpointer cmpl_state;
63
64 GtkWidget *fileop_c_dir;
65 GtkWidget *fileop_del_file;
66 GtkWidget *fileop_ren_file;
67
68 GtkWidget *button_area;
69 GtkWidget *action_area;
70
71 GPtrArray *selected_names;
72 gchar *last_selected;
73 };
74
75 struct _GtkDirSelectionClass
76 {
77 GtkDialogClass parent_class;
78
79 /* Padding for future expansion */
80 void (*_gtk_reserved1) (void);
81 void (*_gtk_reserved2) (void);
82 void (*_gtk_reserved3) (void);
83 void (*_gtk_reserved4) (void);
84 };
85
86
87 GType gtk_dir_selection_get_type (void) G_GNUC_CONST;
88 GtkWidget* gtk_dir_selection_new (const gchar *title);
89 void gtk_dir_selection_set_filename (GtkDirSelection *filesel,
90 const gchar *filename);
91 /* This function returns the selected filename in the C runtime's
92 * multibyte string encoding, which may or may not be the same as that
93 * used by GDK (UTF-8). To convert to UTF-8, call g_filename_to_utf8().
94 * The returned string points to a statically allocated buffer and
95 * should be copied away.
96 */
97 G_CONST_RETURN gchar* gtk_dir_selection_get_filename (GtkDirSelection *filesel);
98
99 void gtk_dir_selection_complete (GtkDirSelection *filesel,
100 const gchar *pattern);
101 void gtk_dir_selection_show_fileop_buttons (GtkDirSelection *filesel);
102 void gtk_dir_selection_hide_fileop_buttons (GtkDirSelection *filesel);
103
104 gchar** gtk_dir_selection_get_selections (GtkDirSelection *filesel);
105 const gchar * gtk_dir_selection_get_dir (GtkDirSelection *filesel);
106 void gtk_dir_selection_set_select_multiple (GtkDirSelection *filesel,
107 gboolean select_multiple);
108 gboolean gtk_dir_selection_get_select_multiple (GtkDirSelection *filesel);
109
110 #ifdef __cplusplus
111 }
112 #endif /* __cplusplus */
113
114
115 #endif /* __GTK_DIR_SEL_H__ */
This page took 0.030847 seconds and 4 git commands to generate.