~ubuntu-branches/debian/squeeze/galeon/squeeze

« back to all changes in this revision

Viewing changes to mozilla/gfilepicker.h

  • Committer: Bazaar Package Importer
  • Author(s): Mark Howard
  • Date: 2004-06-06 09:02:01 UTC
  • Revision ID: james.westby@ubuntu.com-20040606090201-yhx6ruhq8um7ggs2
Tags: upstream-1.3.15
ImportĀ upstreamĀ versionĀ 1.3.15

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
 *  Copyright (C) 2001 Philip Langdale
 
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 as published by
 
6
 *  the Free Software Foundation; either version 2, or (at your option)
 
7
 *  any later version.
 
8
 *
 
9
 *  This program 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
 
12
 *  GNU General Public License for more details.
 
13
 *
 
14
 *  You should have received a copy of the GNU General Public License
 
15
 *  along with this program; if not, write to the Free Software
 
16
 *  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
 
17
 */
 
18
 
 
19
#ifndef __filepicker_h
 
20
#define __filepicker_h
 
21
 
 
22
/**
 
23
 * FilePickerMode: What mode FilePicker should run in
 
24
 */
 
25
 
 
26
typedef enum
 
27
{
 
28
        modeOpen = 0,
 
29
        modeSave = 1,
 
30
        modeGetFolder =2
 
31
} FilePickerMode;
 
32
 
 
33
typedef struct 
 
34
{
 
35
        /* description of the file format */
 
36
        gchar *description;
 
37
        /* tipical sufixes, NULL terminated */
 
38
        gchar **extensions;
 
39
} FileFormat;
 
40
 
 
41
////////////////////////////////////////////////////////////////////////////////
 
42
/**
 
43
 * show_file_picker: Shows a file picker. Can be configured to select a
 
44
 * file or a directory.
 
45
 * @parentWidget: Parent Widget for file picker.
 
46
 * @title: Title for file picker.
 
47
 * @directory: Initial directory to start in.
 
48
 * @file: Initial filename to show in filepicker.
 
49
 * @mode: Mode to run filepicker in (modeOpen, modeSave, modeGetFolder)
 
50
 * @ret_fullpath: On a successful return, will hold the full path to selected
 
51
 *              file or directory.
 
52
 * @ret_save_content: If this arg is not NULL, then the file picker will
 
53
 *              contain a checkbox to indicate whether document content should
 
54
 *              be saved along with the document. It will contain the value
 
55
 *              of the checkbox on return.
 
56
 * @file_formats: an array of FileFormat structures to fill the format chooser
 
57
 *              optionmenu. NULL if not needed. The last item must have 
 
58
 *              description == NULL;
 
59
 * @ret_file_format: where to store the index of the format selected (can be
 
60
 *              NULL)
 
61
 * returns: TRUE for success, FALSE for failure.
 
62
 */
 
63
////////////////////////////////////////////////////////////////////////////////
 
64
 
 
65
#ifndef __cplusplus
 
66
 
 
67
extern gboolean
 
68
show_file_picker (GtkWidget *parentWidget, const char* title,
 
69
                  const char* directory, const char* file, FilePickerMode mode,
 
70
                  char * *ret_fullpath, gboolean* ret_save_content, 
 
71
                  FileFormat *file_formats, gint *ret_file_format);
 
72
 
 
73
#endif
 
74
 
 
75
#endif