home *** CD-ROM | disk | FTP | other *** search
/ Chip 2005 February / CMCD0205.ISO / Linux / gimp-2.2.0.tar.gz / gimp-2.2.0.tar / gimp-2.2.0 / libgimpwidgets / gimppatheditor.h < prev    next >
C/C++ Source or Header  |  2004-01-28  |  4KB  |  103 lines

  1. /* LIBGIMP - The GIMP Library
  2.  * Copyright (C) 1995-1997 Peter Mattis and Spencer Kimball
  3.  *
  4.  * gimppatheditor.h
  5.  * Copyright (C) 1999-2004 Michael Natterer <mitch@gimp.org>
  6.  *
  7.  * This library is free software; you can redistribute it and/or
  8.  * modify it under the terms of the GNU Lesser General Public
  9.  * License as published by the Free Software Foundation; either
  10.  * version 2 of the License, or (at your option) any later version.
  11.  *
  12.  * This library is distributed in the hope that it will be useful,
  13.  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  14.  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  15.  * Lesser General Public License for more details.
  16.  *
  17.  * You should have received a copy of the GNU Lesser General Public
  18.  * License along with this library; if not, write to the
  19.  * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
  20.  * Boston, MA 02111-1307, USA.
  21.  */
  22.  
  23. #ifndef __GIMP_PATH_EDITOR_H__
  24. #define __GIMP_PATH_EDITOR_H__
  25.  
  26. G_BEGIN_DECLS
  27.  
  28. /* For information look into the C source or the html documentation */
  29.  
  30.  
  31. #define GIMP_TYPE_PATH_EDITOR            (gimp_path_editor_get_type ())
  32. #define GIMP_PATH_EDITOR(obj)            (G_TYPE_CHECK_INSTANCE_CAST ((obj), GIMP_TYPE_PATH_EDITOR, GimpPathEditor))
  33. #define GIMP_PATH_EDITOR_CLASS(klass)    (G_TYPE_CHECK_CLASS_CAST ((klass), GIMP_TYPE_PATH_EDITOR, GimpPathEditorClass))
  34. #define GIMP_IS_PATH_EDITOR(obj)         (G_TYPE_CHECK_INSTANCE_TYPE (obj, GIMP_TYPE_PATH_EDITOR))
  35. #define GIMP_IS_PATH_EDITOR_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GIMP_TYPE_PATH_EDITOR))
  36. #define GIMP_PATH_EDITOR_GET_CLASS(obj)  (G_TYPE_INSTANCE_GET_CLASS ((obj), GIMP_TYPE_PATH_EDITOR, GimpPathEditorClass))
  37.  
  38.  
  39. typedef struct _GimpPathEditorClass  GimpPathEditorClass;
  40.  
  41. struct _GimpPathEditor
  42. {
  43.   GtkVBox            parent_instance;
  44.  
  45.   GtkWidget         *upper_hbox;
  46.  
  47.   GtkWidget         *new_button;
  48.   GtkWidget         *up_button;
  49.   GtkWidget         *down_button;
  50.   GtkWidget         *delete_button;
  51.  
  52.   GtkWidget         *file_entry;
  53.  
  54.   GtkListStore      *dir_list;
  55.  
  56.   GtkTreeSelection  *sel;
  57.   GtkTreePath       *sel_path;
  58.  
  59.   GtkTreeViewColumn *writable_column;
  60.  
  61.   gint               num_items;
  62. };
  63.  
  64. struct _GimpPathEditorClass
  65. {
  66.   GtkVBoxClass  parent_class;
  67.  
  68.   void (* path_changed)     (GimpPathEditor *editor);
  69.   void (* writable_changed) (GimpPathEditor *editor);
  70.  
  71.   /* Padding for future expansion */
  72.   void (* _gimp_reserved1) (void);
  73.   void (* _gimp_reserved2) (void);
  74.   void (* _gimp_reserved3) (void);
  75.   void (* _gimp_reserved4) (void);
  76. };
  77.  
  78.  
  79. /* For information look into the C source or the html documentation */
  80.  
  81. GType       gimp_path_editor_get_type          (void) G_GNUC_CONST;
  82.  
  83. GtkWidget * gimp_path_editor_new               (const gchar    *filesel_title,
  84.                                                 const gchar    *path);
  85.  
  86. gchar     * gimp_path_editor_get_path          (GimpPathEditor *editor);
  87. void        gimp_path_editor_set_path          (GimpPathEditor *editor,
  88.                                                 const gchar    *path);
  89.  
  90. gchar     * gimp_path_editor_get_writable_path (GimpPathEditor *editor);
  91. void        gimp_path_editor_set_writable_path (GimpPathEditor *editor,
  92.                                                 const gchar    *path);
  93.  
  94. gboolean    gimp_path_editor_get_dir_writable  (GimpPathEditor *editor,
  95.                                                 const gchar    *directory);
  96. void        gimp_path_editor_set_dir_writable  (GimpPathEditor *editor,
  97.                                                 const gchar    *directory,
  98.                                                 gboolean        writable);
  99.  
  100. G_END_DECLS
  101.  
  102. #endif /* __GIMP_PATH_EDITOR_H__ */
  103.