home *** CD-ROM | disk | FTP | other *** search
/ PC Pro 2002 April / pcpro0402.iso / essentials / graphics / Gimp / gimp-src-20001226.exe / src / gimp / app / selection.h < prev    next >
Encoding:
C/C++ Source or Header  |  1998-04-12  |  3.6 KB  |  70 lines

  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 __SELECTION_H__
  19. #define __SELECTION_H__
  20.  
  21. typedef struct _selection Selection;
  22.  
  23. struct _selection
  24. {
  25.   /*  This information is for maintaining the selection's appearance  */
  26.   GdkWindow *   win;             /*  Window to draw to                 */
  27.   void *        gdisp;           /*  GDisplay that owns the selection  */
  28.   GdkGC *       gc_in;           /*  GC for drawing selection outline  */
  29.   GdkGC *       gc_out;          /*  GC for selected regions outside current layer */
  30.   GdkGC *       gc_layer;        /*  GC for current layer outline      */
  31.  
  32.   /*  This information is for drawing the marching ants around the border  */
  33.   GdkSegment *  segs_in;         /*  gdk segments of area boundary     */
  34.   GdkSegment *  segs_out;        /*  gdk segments of area boundary     */
  35.   GdkSegment *  segs_layer;      /*  gdk segments of area boundary     */
  36.   int           num_segs_in;     /*  number of segments in segs1       */
  37.   int           num_segs_out;    /*  number of segments in segs2       */
  38.   int           num_segs_layer;  /*  number of segments in segs3       */
  39.   int           index_in;        /*  index of current stipple pattern  */
  40.   int           index_out;       /*  index of current stipple pattern  */
  41.   int           index_layer;     /*  index of current stipple pattern  */
  42.   int           state;           /*  internal drawing state            */
  43.   int           paused;          /*  count of pause requests           */
  44.   int           recalc;          /*  flag to recalculate the selection */
  45.   int           speed;           /*  speed of marching ants            */
  46.   int           hidden;          /*  is the selection hidden?          */
  47.   gint          timer;           /*  timer for successive draws        */
  48.   int           cycle;           /*  color cycling turned on           */
  49.   GdkPixmap *   cycle_pix;       /*  cycling pixmap                    */
  50.  
  51.   /* These are used only if USE_XDRAWPOINTS is defined. */
  52.   GdkPoint *    points_in[8];    /*  points of segs_in for fast ants   */
  53.   int           num_points_in[8]; /* number of points in points_in     */
  54.   GdkGC *       gc_white;        /*  gc for drawing white points       */
  55.   GdkGC *       gc_black;        /*  gc for drawing black points       */
  56. };
  57.  
  58. /*  Function declarations  */
  59.  
  60. Selection *  selection_create          (GdkWindow *, gpointer, int, int, int);
  61. void         selection_pause           (Selection *);
  62. void         selection_resume          (Selection *);
  63. void         selection_start           (Selection *, int);
  64. void         selection_invis           (Selection *);
  65. void         selection_layer_invis     (Selection *);
  66. void         selection_hide            (Selection *, void *);
  67. void         selection_free            (Selection *);
  68.  
  69. #endif  /*  __SELECTION_H__  */
  70.