You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

126 lines
4.2 KiB

  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 Lesser 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. * Lesser General Public License for more details.
  13. *
  14. * You should have received a copy of the GNU Lesser 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. * Modified by the GTK+ Team and others 1997-2000. See the AUTHORS
  21. * file for a list of people on the GTK+ Team. See the ChangeLog
  22. * files for a list of changes. These files are distributed with
  23. * GTK+ at ftp://ftp.gtk.org/pub/gtk/.
  24. */
  25. #ifndef GTK_DISABLE_DEPRECATED
  26. #ifndef __GTK_FILESEL_H__
  27. #define __GTK_FILESEL_H__
  28. #include <gtk/gtk.h>
  29. G_BEGIN_DECLS
  30. #define GTK_TYPE_FILE_SELECTION (gtk_file_selection_get_type ())
  31. #define GTK_FILE_SELECTION(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GTK_TYPE_FILE_SELECTION, GtkFileSelection))
  32. #define GTK_FILE_SELECTION_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GTK_TYPE_FILE_SELECTION, GtkFileSelectionClass))
  33. #define GTK_IS_FILE_SELECTION(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GTK_TYPE_FILE_SELECTION))
  34. #define GTK_IS_FILE_SELECTION_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GTK_TYPE_FILE_SELECTION))
  35. #define GTK_FILE_SELECTION_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GTK_TYPE_FILE_SELECTION, GtkFileSelectionClass))
  36. typedef struct _GtkFileSelection GtkFileSelection;
  37. typedef struct _GtkFileSelectionClass GtkFileSelectionClass;
  38. struct _GtkFileSelection
  39. {
  40. /*< private >*/
  41. GtkDialog parent_instance;
  42. /*< public >*/
  43. GtkWidget *dir_list;
  44. GtkWidget *file_list;
  45. GtkWidget *selection_entry;
  46. GtkWidget *selection_text;
  47. GtkWidget *main_vbox;
  48. GtkWidget *ok_button;
  49. GtkWidget *cancel_button;
  50. GtkWidget *help_button;
  51. GtkWidget *history_pulldown;
  52. GtkWidget *history_menu;
  53. GList *history_list;
  54. GtkWidget *fileop_dialog;
  55. GtkWidget *fileop_entry;
  56. gchar *fileop_file;
  57. gpointer cmpl_state;
  58. GtkWidget *fileop_c_dir;
  59. GtkWidget *fileop_del_file;
  60. GtkWidget *fileop_ren_file;
  61. GtkWidget *button_area;
  62. GtkWidget *action_area;
  63. /*< private >*/
  64. GPtrArray *selected_names;
  65. gchar *last_selected;
  66. };
  67. struct _GtkFileSelectionClass
  68. {
  69. GtkDialogClass parent_class;
  70. /* Padding for future expansion */
  71. void (*_gtk_reserved1) (void);
  72. void (*_gtk_reserved2) (void);
  73. void (*_gtk_reserved3) (void);
  74. void (*_gtk_reserved4) (void);
  75. };
  76. #ifdef G_OS_WIN32
  77. /* Reserve old names for DLL ABI backward compatibility */
  78. #define gtk_file_selection_get_filename gtk_file_selection_get_filename_utf8
  79. #define gtk_file_selection_set_filename gtk_file_selection_set_filename_utf8
  80. #define gtk_file_selection_get_selections gtk_file_selection_get_selections_utf8
  81. #endif
  82. GType gtk_file_selection_get_type (void) G_GNUC_CONST;
  83. GtkWidget* gtk_file_selection_new (const gchar *title);
  84. void gtk_file_selection_set_filename (GtkFileSelection *filesel,
  85. const gchar *filename);
  86. G_CONST_RETURN gchar* gtk_file_selection_get_filename (GtkFileSelection *filesel);
  87. void gtk_file_selection_complete (GtkFileSelection *filesel,
  88. const gchar *pattern);
  89. void gtk_file_selection_show_fileop_buttons (GtkFileSelection *filesel);
  90. void gtk_file_selection_hide_fileop_buttons (GtkFileSelection *filesel);
  91. gchar** gtk_file_selection_get_selections (GtkFileSelection *filesel);
  92. void gtk_file_selection_set_select_multiple (GtkFileSelection *filesel,
  93. gboolean select_multiple);
  94. gboolean gtk_file_selection_get_select_multiple (GtkFileSelection *filesel);
  95. G_END_DECLS
  96. #endif /* __GTK_FILESEL_H__ */
  97. #endif /* GTK_DISABLE_DEPRECATED */