]> git.xonotic.org Git - xonotic/netradiant.git/blob - radiant/gtkfilesel-linux.h
Merge branch 'master' of github.com:TTimo/GtkRadiant
[xonotic/netradiant.git] / radiant / gtkfilesel-linux.h
1 /* GTK - The GIMP Toolkit
2  * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald
3  *
4  * This library is free software; you can redistribute it and/or
5  * modify it under the terms of the GNU Library General Public
6  * License as published by the Free Software Foundation; either
7  * version 2 of the License, or (at your option) any later version.
8  *
9  * This library is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
12  * Library General Public License for more details.
13  *
14  * You should have received a copy of the GNU Library General Public
15  * License along with this library; if not, write to the
16  * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
17  * Boston, MA 02111-1307, USA.
18  */
19
20 /*
21  * Modified by the GTK+ Team and others 1997-1999.  See the AUTHORS
22  * file for a list of people on the GTK+ Team.  See the ChangeLog
23  * files for a list of changes.  These files are distributed with
24  * GTK+ at ftp://ftp.gtk.org/pub/gtk/.
25  */
26
27 #ifndef __GTK_FILESEL_H__
28 #define __GTK_FILESEL_H__
29
30
31 #include <gdk/gdk.h>
32 #include <gtk/gtkwindow.h>
33
34
35 #ifdef __cplusplus
36 extern "C" {
37 #endif /* __cplusplus */
38
39
40 #define GTK_TYPE_FILE_SELECTION            ( gtk_file_selection_get_type() )
41 #define GTK_FILE_SELECTION( obj )            ( GTK_CHECK_CAST( ( obj ), GTK_TYPE_FILE_SELECTION, GtkFileSelection ) )
42 #define GTK_FILE_SELECTION_CLASS( klass )    ( GTK_CHECK_CLASS_CAST( ( klass ), GTK_TYPE_FILE_SELECTION, GtkFileSelectionClass ) )
43 #define GTK_IS_FILE_SELECTION( obj )         ( GTK_CHECK_TYPE( ( obj ), GTK_TYPE_FILE_SELECTION ) )
44 #define GTK_IS_FILE_SELECTION_CLASS( klass ) ( GTK_CHECK_CLASS_TYPE( ( klass ), GTK_TYPE_FILE_SELECTION ) )
45
46
47 typedef struct _GtkFileSelection GtkFileSelection;
48 typedef struct _GtkFileSelectionClass GtkFileSelectionClass;
49
50 struct _GtkFileSelection
51 {
52         GtkWindow window;
53
54         GtkWidget *dir_list;
55         GtkWidget *file_list;
56         GtkWidget *selection_entry;
57         GtkWidget *selection_text;
58         GtkWidget *main_vbox;
59         GtkWidget *ok_button;
60         GtkWidget *cancel_button;
61         GtkWidget *help_button;
62
63         /* These are not used.  Just fillers in the class structure */
64         GtkWidget *history_pulldown;
65         GtkWidget *history_menu;
66         GList     *history_list;
67         /* ***************** */
68
69         GtkWidget *fileop_dialog;
70         GtkWidget *fileop_entry;
71         gchar     *fileop_file;
72         gpointer cmpl_state;
73         gpointer fileop_data;
74
75         GtkWidget *fileop_c_dir;
76         GtkWidget *fileop_del_file;
77         GtkWidget *fileop_ren_file;
78
79         GtkWidget *button_area;
80         GtkWidget *action_area;
81
82         GtkWidget *history_combo;
83         GList     *prev_history;
84         GList     *next_history;
85         GtkWidget *mask_entry;
86         gchar     *mask;
87         gchar     *saved_entry;
88         gchar     *saved_entry1;
89         GtkWidget *completion_label;
90
91         GtkWidget *bookmark_menu;
92         GList     *bookmark_list;
93         GList     *masks;
94
95         GtkWidget *fileop_menu;
96
97 };
98
99 struct _GtkFileSelectionClass
100 {
101         GtkWindowClass parent_class;
102 };
103
104
105 GtkType    gtk_file_selection_get_type( void );
106 GtkWidget* gtk_file_selection_new( const gchar      *title );
107 void       gtk_file_selection_set_filename( GtkFileSelection *filesel,
108                                                                                         const gchar      *filename );
109 gchar*     gtk_file_selection_get_filename( GtkFileSelection *filesel );
110 void       gtk_file_selection_complete( GtkFileSelection *filesel,
111                                                                                 const gchar      *pattern );
112 void       gtk_file_selection_show_fileop_buttons( GtkFileSelection *filesel );
113 void       gtk_file_selection_hide_fileop_buttons( GtkFileSelection *filesel );
114
115 /* proposed interface */
116 void       gtk_file_selection_clear_masks( GtkFileSelection *filesel );
117 void       gtk_file_selection_set_masks( GtkFileSelection *filesel,
118                                                                                  const gchar      **masks );
119 /*
120    where masks is a NULL-terminated array of strings of the format:
121
122    "DESCRIPTION <MASK>" or simply "MASK"
123    ie: "C,C++ files <*.[Cc],*.cc,*.cpp>" or simply
124    "*.jpg,*.gif" etc
125
126  */
127
128 #ifdef __cplusplus
129 }
130 #endif /* __cplusplus */
131
132
133 #endif /* __GTK_FILESEL_H__ */