pattern_select.h 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081
  1. /* The GIMP -- an image manipulation program
  2. * Copyright (C) 1995 Spencer Kimball and Peter Mattis
  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 of the License, or
  7. * (at your option) 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. #ifndef __PATTERN_SELECT_H__
  19. #define __PATTERN_SELECT_H__
  20. #include "patterns.h"
  21. typedef struct _PatternSelect PatternSelect;
  22. struct _PatternSelect
  23. {
  24. GtkWidget *shell;
  25. /* The preview and it's vscale data */
  26. GtkWidget *preview;
  27. GdkGC *gc;
  28. GtkAdjustment *sbar_data;
  29. GtkWidget *options_box;
  30. GtkWidget *pattern_name;
  31. GtkWidget *pattern_size;
  32. /* Pattern popup */
  33. GtkWidget *pattern_popup;
  34. GtkWidget *pattern_preview;
  35. guint popup_timeout_tag;
  36. /* Callback function name */
  37. gchar *callback_name;
  38. /* Context to store the current pattern */
  39. GimpContext *context;
  40. GPattern *dnd_pattern;
  41. /* Some variables to keep the GUI consistent */
  42. gint cell_width;
  43. gint cell_height;
  44. gint scroll_offset;
  45. gint old_row;
  46. gint old_col;
  47. gint NUM_PATTERN_COLUMNS;
  48. gint NUM_PATTERN_ROWS;
  49. };
  50. /* list of active dialogs */
  51. extern GSList *pattern_active_dialogs;
  52. /* the main pattern dialog */
  53. extern PatternSelect *pattern_select_dialog;
  54. PatternSelect * pattern_select_new (gchar *title,
  55. gchar *initial_pattern);
  56. void pattern_select_free (PatternSelect *psp);
  57. void patterns_check_dialogs (void);
  58. /* the main pattern selection */
  59. void pattern_dialog_create (void);
  60. void pattern_dialog_free (void);
  61. #endif /* __PATTERN_SELECT_H__ */