home *** CD-ROM | disk | FTP | other *** search
/ PC Pro 2002 April / pcpro0402.iso / essentials / graphics / Gimp / gimp-src-20001226.exe / src / gimp / app / devices.h < prev    next >
Encoding:
C/C++ Source or Header  |  1999-10-27  |  2.4 KB  |  78 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., 675 Mass Ave, Cambridge, MA 02139, USA.
  17.  */
  18. #ifndef __DEVICES_H__
  19. #define __DEVICES_H__
  20.  
  21. #include "tools.h"
  22.  
  23. typedef enum
  24. {
  25.   DEVICE_MODE       = 1 << 0,
  26.   DEVICE_AXES       = 1 << 1,
  27.   DEVICE_KEYS       = 1 << 2,
  28.   DEVICE_TOOL       = 1 << 3,
  29.   DEVICE_FOREGROUND = 1 << 4,
  30.   DEVICE_BACKGROUND = 1 << 5,
  31.   DEVICE_BRUSH      = 1 << 6,
  32.   DEVICE_PATTERN    = 1 << 7,
  33.   DEVICE_GRADIENT   = 1 << 8
  34. } DeviceValues;
  35.  
  36. /*  Initialize the input devices  */
  37. void   devices_init         (void);
  38.  
  39. /*  Restores device settings from rc file  */
  40. void   devices_restore      (void);
  41.  
  42. /*  Create device info dialog  */
  43. void   input_dialog_create  (void);
  44.  
  45. /*  Create the device status dialog  */
  46. void   device_status_create (void);
  47.  
  48. /*  Returns TRUE, and makes necessary global changes
  49.  *  event is not for current_device
  50.  */
  51. gint   devices_check_change (GdkEvent     *event);
  52.  
  53. /*  Loads stored device settings (tool, cursor, ...)  */
  54. void   select_device        (guint32       device);
  55.  
  56. /* Add information about one tool from rc file */
  57. void   devices_rc_update    (gchar        *name,
  58.                  DeviceValues  values,
  59.                  GdkInputMode  mode,
  60.                  gint          num_axes,
  61.                  GdkAxisUse   *axes,
  62.                  gint          num_keys,
  63.                  GdkDeviceKey *keys,
  64.                  ToolType      tool,
  65.                  guchar        foreground[],
  66.                  guchar        background[],
  67.                  gchar        *brush_name,
  68.                  gchar        *pattern_name,
  69.                  gchar        *gradient_name);
  70.  
  71. /*  Free device status (only for session-managment)  */
  72. void   device_status_free   (void);
  73.  
  74. /*  Current device id  */
  75. extern gint current_device;
  76.  
  77. #endif /* __DEVICES_H__ */
  78.