home *** CD-ROM | disk | FTP | other *** search
/ PC Online 1998 November / PCO_1198.ISO / filesbbs / os2 / gimpos2.arj / GIMP10BI.ZIP / XFree86 / include / libgimp / gimp.h next >
Encoding:
C/C++ Source or Header  |  1998-09-13  |  24.0 KB  |  699 lines

  1. /* LIBGIMP - The GIMP Library                                                   
  2.  * Copyright (C) 1995-1997 Peter Mattis and Spencer Kimball                
  3.  *
  4.  * This library is free software; you can redistribute it and/or
  5.  * modify it under the terms of the GNU Library 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.  * Library General Public License for more details.
  13.  *
  14.  * You should have received a copy of the GNU Library 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. #ifndef __GIMP_H__
  20. #define __GIMP_H__
  21.  
  22.  
  23. #include <glib.h>
  24. #include <libgimp/gimpenums.h>
  25.  
  26.  
  27. #ifdef __cplusplus
  28. extern "C" {
  29. #endif /* __cplusplus */
  30.  
  31.  
  32. typedef struct _GPlugInInfo  GPlugInInfo;
  33. typedef struct _GTile        GTile;
  34. typedef struct _GDrawable    GDrawable;
  35. typedef struct _GPixelRgn    GPixelRgn;
  36. typedef struct _GParamDef    GParamDef;
  37. typedef struct _GParamColor  GParamColor;
  38. typedef struct _GParamRegion GParamRegion;
  39. typedef union  _GParamData   GParamData;
  40. typedef struct _GParam       GParam;
  41. typedef void   (* GRunProc) (char    *name,
  42.                  int      nparams,
  43.                  GParam  *param,
  44.                  int     *nreturn_vals,
  45.                  GParam **return_vals);
  46.  
  47.  
  48. struct _GPlugInInfo
  49. {
  50.   /* called when the gimp application initially starts up */
  51.   void (*init_proc) (void);
  52.  
  53.   /* called when the gimp application exits */
  54.   void (*quit_proc) (void);
  55.  
  56.   /* called by the gimp so that the plug-in can inform the
  57.    *  gimp of what it does. (ie. installing a procedure database
  58.    *  procedure).
  59.    */
  60.   void (*query_proc) (void);
  61.  
  62.   /* called to run a procedure the plug-in installed in the
  63.    *  procedure database.
  64.    */
  65.   void (*run_proc) (char    *name,
  66.             int      nparams,
  67.             GParam  *param,
  68.             int     *nreturn_vals,
  69.             GParam **return_vals);
  70. };
  71.  
  72. struct _GTile
  73. {
  74.   guint ewidth;        /* the effective width of the tile */
  75.   guint eheight;       /* the effective height of the tile */
  76.   guint bpp;           /* the bytes per pixel (1, 2, 3 or 4 ) */
  77.   guint tile_num;      /* the number of this tile within the drawable */
  78.   guint16 ref_count;   /* reference count for the tile */
  79.   guint dirty : 1;     /* is the tile dirty? has it been modified? */
  80.   guint shadow: 1;     /* is this a shadow tile */
  81.   guchar *data;        /* the pixel data for the tile */
  82.   GDrawable *drawable; /* the drawable this tile came from */
  83. };
  84.  
  85. struct _GDrawable
  86. {
  87.   gint32 id;            /* drawable ID */
  88.   guint width;          /* width of drawble */
  89.   guint height;         /* height of drawble */
  90.   guint bpp;            /* bytes per pixel of drawable */
  91.   guint ntile_rows;     /* # of tile rows */
  92.   guint ntile_cols;     /* # of tile columns */
  93.   GTile *tiles;         /* the normal tiles */
  94.   GTile *shadow_tiles;  /* the shadow tiles */
  95. };
  96.  
  97. struct _GPixelRgn
  98. {
  99.   guchar *data;         /* pointer to region data */
  100.   GDrawable *drawable;  /* pointer to drawable */
  101.   guint bpp;            /* bytes per pixel */
  102.   guint rowstride;      /* bytes per pixel row */
  103.   guint x, y;           /* origin */
  104.   guint w, h;           /* width and height of region */
  105.   guint dirty : 1;      /* will this region be dirtied? */
  106.   guint shadow : 1;     /* will this region use the shadow or normal tiles */
  107.   guint process_count;  /* used internally */
  108. };
  109.  
  110. struct _GParamDef
  111. {
  112.   GParamType type;
  113.   char *name;
  114.   char *description;
  115. };
  116.  
  117. struct _GParamColor
  118. {
  119.   guint8 red;
  120.   guint8 green;
  121.   guint8 blue;
  122. };
  123.  
  124. struct _GParamRegion
  125. {
  126.   gint32 x;
  127.   gint32 y;
  128.   gint32 width;
  129.   gint32 height;
  130. };
  131.  
  132. union _GParamData
  133. {
  134.   gint32 d_int32;
  135.   gint16 d_int16;
  136.   gint8 d_int8;
  137.   gdouble d_float;
  138.   gchar *d_string;
  139.   gint32 *d_int32array;
  140.   gint16 *d_int16array;
  141.   gint8 *d_int8array;
  142.   gdouble *d_floatarray;
  143.   gchar **d_stringarray;
  144.   GParamColor d_color;
  145.   GParamRegion d_region;
  146.   gint32 d_display;
  147.   gint32 d_image;
  148.   gint32 d_layer;
  149.   gint32 d_channel;
  150.   gint32 d_drawable;
  151.   gint32 d_selection;
  152.   gint32 d_boundary;
  153.   gint32 d_path;
  154.   gint32 d_status;
  155. };
  156.  
  157. struct _GParam
  158. {
  159.   GParamType type;
  160.   GParamData data;
  161. };
  162.  
  163.  
  164. #ifndef __EMX__
  165. #define MAIN() int main (int argc, char *argv[]) { return gimp_main (argc, argv); }
  166. #else
  167. #define MAIN() int main (int argc, char *argv[]) { set_gimp_PLUG_IN_INFO(&PLUG_IN_INFO); return gimp_main (argc, argv); }
  168. #endif
  169.  
  170.  
  171. /* The main procedure that should be called with the
  172.  *  'argc' and 'argv' that are passed to "main".
  173.  */
  174. int gimp_main (int   argc,
  175.            char *argv[]);
  176.  
  177. /* Forcefully causes the gimp library to exit and
  178.  *  close down its connection to main gimp application.
  179.  */
  180. void gimp_quit (void);
  181.  
  182. /* Specify a range of data to be associated with 'id'.
  183.  *  The data will exist for as long as the main gimp
  184.  *  application is running.
  185.  */
  186. void gimp_set_data (gchar *  id,
  187.             gpointer data,
  188.             guint32  length);
  189.  
  190. /* Retrieve the piece of data stored within the main
  191.  *  gimp application specified by 'id'. The data is
  192.  *  stored in the supplied buffer.  Make sure enough
  193.  *  space is allocated.
  194.  */
  195. void gimp_get_data (gchar *  id,
  196.             gpointer data);
  197.  
  198.  
  199. /* Initialize the progress bar with "message". If "message"
  200.  *  is NULL, the message displayed in the progress window will
  201.  *  be the name of the plug-in.
  202.  */
  203. void gimp_progress_init (char *message);
  204.  
  205. /* Update the progress bar. If the progress bar has not been
  206.  *  initialized then it will be automatically initialized as if
  207.  *  "gimp_progress_init (NULL)" were called. "percentage" is a
  208.  *  value between 0 and 1.
  209.  */
  210. void gimp_progress_update (gdouble percentage);
  211.  
  212.  
  213. /* Pops up a dialog box with "message". Useful for status and
  214.  * error reports. If "message" is NULL, do nothing.
  215.  */
  216. void gimp_message (char *message);
  217.  
  218.  
  219. /* Query the gimp application's procedural database.
  220.  *  The arguments are regular expressions which select
  221.  *  which procedure names will be returned in 'proc_names'.
  222.  */
  223. void gimp_query_database (char   *name_regexp,
  224.               char   *blurb_regexp,
  225.               char   *help_regexp,
  226.               char   *author_regexp,
  227.               char   *copyright_regexp,
  228.               char   *date_regexp,
  229.               char   *proc_type_regexp,
  230.               int    *nprocs,
  231.               char ***proc_names);
  232.  
  233. /* Query the gimp application's procedural database
  234.  *  regarding a particular procedure.
  235.  */
  236. gint gimp_query_procedure  (char       *proc_name,
  237.                 char      **proc_blurb,
  238.                 char      **proc_help,
  239.                 char      **proc_author,
  240.                 char      **proc_copyright,
  241.                 char      **proc_date,
  242.                 int        *proc_type,
  243.                 int        *nparams,
  244.                 int        *nreturn_vals,
  245.                 GParamDef  **params,
  246.                 GParamDef  **return_vals);
  247.  
  248. /* Query the gimp application regarding all open images.
  249.  *  The list of open image id's is returned in 'image_ids'.
  250.  */
  251. gint32* gimp_query_images (int *nimages);
  252.  
  253.  
  254. /* Install a procedure in the procedure database.
  255.  */
  256. void gimp_install_procedure (char      *name,
  257.                  char      *blurb,
  258.                  char      *help,
  259.                  char      *author,
  260.                  char      *copyright,
  261.                  char      *date,
  262.                  char      *menu_path,
  263.                  char      *image_types,
  264.                  int        type,
  265.                  int        nparams,
  266.                  int        nreturn_vals,
  267.                  GParamDef *params,
  268.                  GParamDef *return_vals);
  269.  
  270. /* Install a temporary procedure in the procedure database.
  271.  */
  272. void gimp_install_temp_proc (char      *name,
  273.                  char      *blurb,
  274.                  char      *help,
  275.                  char      *author,
  276.                  char      *copyright,
  277.                  char      *date,
  278.                  char      *menu_path,
  279.                  char      *image_types,
  280.                  int        type,
  281.                  int        nparams,
  282.                  int        nreturn_vals,
  283.                  GParamDef *params,
  284.                  GParamDef *return_vals,
  285.                  GRunProc   run_proc);
  286.  
  287. /* Uninstall a temporary procedure
  288.  */
  289. void gimp_uninstall_temp_proc (char *name);
  290.  
  291. /* Install a load file format handler in the procedure database.
  292.  */
  293. void gimp_register_magic_load_handler (char *name,
  294.                        char *extensions,
  295.                        char *prefixes,
  296.                        char *magics);
  297.  
  298. /* Install a load file format handler in the procedure database.
  299.  */
  300. void gimp_register_load_handler (char *name,
  301.                  char *extensions,
  302.                  char *prefixes);
  303.  
  304. /* Install a save file format handler in the procedure database.
  305.  */
  306. void gimp_register_save_handler (char *name,
  307.                  char *extensions,
  308.                  char *prefixes);
  309.  
  310. /* Run a procedure in the procedure database. The parameters are
  311.  *  specified via the variable length argument list. The return
  312.  *  values are returned in the 'GParam*' array.
  313.  */
  314. GParam* gimp_run_procedure (char *name,
  315.                 int  *nreturn_vals,
  316.                 ...);
  317.  
  318. /* Run a procedure in the procedure database. The parameters are
  319.  *  specified as an array of GParam.  The return
  320.  *  values are returned in the 'GParam*' array.
  321.  */
  322. GParam* gimp_run_procedure2 (char   *name,
  323.                  int    *nreturn_vals,
  324.                  int     nparams,
  325.                  GParam *params);
  326.  
  327. /* Destroy the an array of parameters. This is useful for
  328.  *  destroying the return values returned by a call to
  329.  *  'gimp_run_procedure'.
  330.  */
  331. void gimp_destroy_params (GParam *params,
  332.               int     nparams);
  333.  
  334. gdouble  gimp_gamma        (void);
  335. gint     gimp_install_cmap (void);
  336. gint     gimp_use_xshm     (void);
  337. guchar*  gimp_color_cube   (void);
  338. gchar*   gimp_gtkrc        (void);
  339.  
  340.  
  341. /****************************************
  342.  *              Images                  *
  343.  ****************************************/
  344.  
  345. gint32     gimp_image_new                   (guint      width,
  346.                          guint      height,
  347.                          GImageType type);
  348. void       gimp_image_delete                (gint32     image_ID);
  349. guint      gimp_image_width                 (gint32     image_ID);
  350. guint      gimp_image_height                (gint32     image_ID);
  351. GImageType gimp_image_base_type             (gint32     image_ID);
  352. gint32     gimp_image_floating_selection    (gint32     image_ID);
  353. void       gimp_image_add_channel           (gint32     image_ID,
  354.                          gint32     channel_ID,
  355.                          gint       position);
  356. void       gimp_image_add_layer             (gint32     image_ID,
  357.                          gint32     layer_ID,
  358.                          gint       position);
  359. void       gimp_image_add_layer_mask        (gint32     image_ID,
  360.                          gint32     layer_ID,
  361.                          gint32     mask_ID);
  362. void       gimp_image_clean_all             (gint32     image_ID);
  363. void       gimp_image_disable_undo          (gint32     image_ID);
  364. void       gimp_image_enable_undo           (gint32     image_ID);
  365. void       gimp_image_clean_all             (gint32     image_ID);
  366. void       gimp_image_flatten               (gint32     image_ID);
  367. void       gimp_image_lower_channel         (gint32     image_ID,
  368.                          gint32     channel_ID);
  369. void       gimp_image_lower_layer           (gint32     image_ID,
  370.                          gint32     layer_ID);
  371. gint32     gimp_image_merge_visible_layers  (gint32     image_ID,
  372.                          gint       merge_type);
  373. gint32     gimp_image_pick_correlate_layer  (gint32     image_ID,
  374.                          gint       x,
  375.                          gint       y);
  376. void       gimp_image_raise_channel         (gint32     image_ID,
  377.                          gint32     channel_ID);
  378. void       gimp_image_raise_layer           (gint32     image_ID,
  379.                          gint32     layer_ID);
  380. void       gimp_image_remove_channel        (gint32     image_ID,
  381.                          gint32     channel_ID);
  382. void       gimp_image_remove_layer          (gint32     image_ID,
  383.                          gint32     layer_ID);
  384. void       gimp_image_remove_layer_mask     (gint32     image_ID,
  385.                          gint32     layer_ID,
  386.                          gint       mode);
  387. void       gimp_image_resize                (gint32     image_ID,
  388.                          guint      new_width,
  389.                          guint      new_height,
  390.                          gint       offset_x,
  391.                          gint       offset_y);
  392. gint32     gimp_image_get_active_channel    (gint32     image_ID);
  393. gint32     gimp_image_get_active_layer      (gint32     image_ID);
  394. gint32*    gimp_image_get_channels          (gint32     image_ID,
  395.                          gint      *nchannels);
  396. guchar*    gimp_image_get_cmap              (gint32     image_ID,
  397.                          gint      *ncolors);
  398. gint       gimp_image_get_component_active  (gint32     image_ID,
  399.                          gint       component);
  400. gint       gimp_image_get_component_visible (gint32     image_ID,
  401.                          gint       component);
  402. char*      gimp_image_get_filename          (gint32     image_ID);
  403. gint32*    gimp_image_get_layers            (gint32     image_ID,
  404.                          gint      *nlayers);
  405. gint32     gimp_image_get_selection         (gint32     image_ID);
  406. void       gimp_image_set_active_channel    (gint32     image_ID,
  407.                          gint32     channel_ID);
  408. void       gimp_image_set_active_layer      (gint32     image_ID,
  409.                          gint32     layer_ID);
  410. void       gimp_image_set_cmap              (gint32     image_ID,
  411.                          guchar    *cmap,
  412.                          gint       ncolors);
  413. void       gimp_image_set_component_active  (gint32     image_ID,
  414.                          gint       component,
  415.                          gint       active);
  416. void       gimp_image_set_component_visible (gint32     image_ID,
  417.                          gint       component,
  418.                          gint       visible);
  419. void       gimp_image_set_filename          (gint32     image_ID,
  420.                          char      *name);
  421.  
  422.  
  423. /****************************************
  424.  *             Displays                 *
  425.  ****************************************/
  426.  
  427. gint32 gimp_display_new    (gint32 image_ID);
  428. void   gimp_display_delete (gint32 display_ID);
  429. void   gimp_displays_flush (void);
  430.  
  431.  
  432. /****************************************
  433.  *              Layers                  *
  434.  ****************************************/
  435.  
  436. gint32        gimp_layer_new                       (gint32        image_ID,
  437.                             char         *name,
  438.                             guint         width,
  439.                             guint         height,
  440.                             GDrawableType  type,
  441.                             gdouble       opacity,
  442.                             GLayerMode    mode);
  443. gint32        gimp_layer_copy                      (gint32        layer_ID);
  444. void          gimp_layer_delete                    (gint32        layer_ID);
  445. guint         gimp_layer_width                     (gint32        layer_ID);
  446. guint         gimp_layer_height                    (gint32        layer_ID);
  447. guint         gimp_layer_bpp                       (gint32        layer_ID);
  448. GDrawableType gimp_layer_type                      (gint32       layer_ID);
  449. void          gimp_layer_add_alpha                 (gint32        layer_ID);
  450. gint32        gimp_layer_create_mask               (gint32        layer_ID,
  451.                             gint          mask_type);
  452. void          gimp_layer_resize                    (gint32        layer_ID,
  453.                             guint         new_width,
  454.                             guint         new_height,
  455.                             gint          offset_x,
  456.                             gint          offset_y);
  457. void          gimp_layer_scale                     (gint32        layer_ID,
  458.                             guint         new_width,
  459.                             guint         new_height,
  460.                             gint          local_origin);
  461. void          gimp_layer_translate                 (gint32        layer_ID,
  462.                             gint          offset_x,
  463.                             gint          offset_y);
  464. gint          gimp_layer_is_floating_selection     (gint32        layer_ID);
  465. gint32        gimp_layer_get_image_id              (gint32        layer_ID);
  466. gint32        gimp_layer_get_mask_id               (gint32        layer_ID);
  467. gint          gimp_layer_get_apply_mask            (gint32        layer_ID);
  468. gint          gimp_layer_get_edit_mask             (gint32        layer_ID);
  469. GLayerMode    gimp_layer_get_mode                  (gint32        layer_ID);
  470. char*         gimp_layer_get_name                  (gint32        layer_ID);
  471. gdouble       gimp_layer_get_opacity               (gint32        layer_ID);
  472. gint          gimp_layer_get_preserve_transparency (gint32        layer_ID);
  473. gint          gimp_layer_get_show_mask             (gint32        layer_ID);
  474. gint          gimp_layer_get_visible               (gint32        layer_ID);
  475. void          gimp_layer_set_apply_mask            (gint32        layer_ID,
  476.                             gint          apply_mask);
  477. void          gimp_layer_set_edit_mask             (gint32        layer_ID,
  478.                             gint          edit_mask);
  479. void          gimp_layer_set_mode                  (gint32        layer_ID,
  480.                             GLayerMode    mode);
  481. void          gimp_layer_set_name                  (gint32        layer_ID,
  482.                             char         *name);
  483. void          gimp_layer_set_offsets               (gint32        layer_ID,
  484.                             gint          offset_x,
  485.                             gint          offset_y);
  486. void          gimp_layer_set_opacity               (gint32        layer_ID,
  487.                             gdouble       opacity);
  488. void          gimp_layer_set_preserve_transparency (gint32        layer_ID,
  489.                             gint          preserve_transparency);
  490. void          gimp_layer_set_show_mask             (gint32        layer_ID,
  491.                             gint          show_mask);
  492. void          gimp_layer_set_visible               (gint32        layer_ID,
  493.                             gint          visible);
  494.  
  495.  
  496. /****************************************
  497.  *             Channels                 *
  498.  ****************************************/
  499.  
  500. gint32  gimp_channel_new             (gint32   image_ID,
  501.                       char    *name,
  502.                       guint    width,
  503.                       guint    height,
  504.                       gdouble  opacity,
  505.                       guchar  *color);
  506. gint32  gimp_channel_copy            (gint32   channel_ID);
  507. void    gimp_channel_delete          (gint32   channel_ID);
  508. guint   gimp_channel_width           (gint32   channel_ID);
  509. guint   gimp_channel_height          (gint32   channel_ID);
  510. gint32  gimp_channel_get_image_id    (gint32   channel_ID);
  511. gint32  gimp_channel_get_layer_id    (gint32   channel_ID);
  512. void    gimp_channel_get_color       (gint32   channel_ID,
  513.                       guchar  *red,
  514.                       guchar  *green,
  515.                       guchar  *blue);
  516. char*   gimp_channel_get_name        (gint32   channel_ID);
  517. gdouble gimp_channel_get_opacity     (gint32   channel_ID);
  518. gint    gimp_channel_get_show_masked (gint32   channel_ID);
  519. gint    gimp_channel_get_visible     (gint32   channel_ID);
  520. void    gimp_channel_set_color       (gint32   channel_ID,
  521.                       guchar   red,
  522.                       guchar   green,
  523.                       guchar   blue);
  524. void    gimp_channel_set_name        (gint32   channel_ID,
  525.                       char    *name);
  526. void    gimp_channel_set_opacity     (gint32   channel_ID,
  527.                       gdouble  opacity);
  528. void    gimp_channel_set_show_masked (gint32   channel_ID,
  529.                       gint     show_masked);
  530. void    gimp_channel_set_visible     (gint32   channel_ID,
  531.                       gint     visible);
  532.  
  533.  
  534. /****************************************
  535.  *             GDrawables                *
  536.  ****************************************/
  537.  
  538. GDrawable*    gimp_drawable_get          (gint32     drawable_ID);
  539. void          gimp_drawable_detach       (GDrawable *drawable);
  540. void          gimp_drawable_flush        (GDrawable *drawable);
  541. void          gimp_drawable_delete       (GDrawable *drawable);
  542. void          gimp_drawable_update       (gint32     drawable_ID,
  543.                       gint       x,
  544.                       gint       y,
  545.                       guint      width,
  546.                       guint      height);
  547. void          gimp_drawable_merge_shadow (gint32     drawable_ID,
  548.                       gint       undoable);
  549. gint32        gimp_drawable_image_id     (gint32     drawable_ID);
  550. char*         gimp_drawable_name         (gint32     drawable_ID);
  551. guint         gimp_drawable_width        (gint32     drawable_ID);
  552. guint         gimp_drawable_height       (gint32     drawable_ID);
  553. guint         gimp_drawable_bpp          (gint32     drawable_ID);
  554. GDrawableType gimp_drawable_type         (gint32     drawable_ID);
  555. gint          gimp_drawable_visible      (gint32     drawable_ID);
  556. gint          gimp_drawable_channel      (gint32     drawable_ID);
  557. gint          gimp_drawable_color        (gint32     drawable_ID);
  558. gint          gimp_drawable_gray         (gint32     drawable_ID);
  559. gint          gimp_drawable_has_alpha    (gint32     drawable_ID);
  560. gint          gimp_drawable_indexed      (gint32     drawable_ID);
  561. gint          gimp_drawable_layer        (gint32     drawable_ID);
  562. gint          gimp_drawable_layer_mask   (gint32     drawable_ID);
  563. gint          gimp_drawable_mask_bounds  (gint32     drawable_ID,
  564.                       gint      *x1,
  565.                       gint      *y1,
  566.                       gint      *x2,
  567.                       gint      *y2);
  568. void          gimp_drawable_offsets      (gint32     drawable_ID,
  569.                       gint      *offset_x,
  570.                       gint      *offset_y);
  571. void          gimp_drawable_fill         (gint32     drawable_ID,
  572.                       gint       fill_type);
  573. void          gimp_drawable_set_name     (gint32     drawable_ID,
  574.                       char      *name);
  575. void          gimp_drawable_set_visible  (gint32     drawable_ID,
  576.                       gint       visible);
  577. GTile*        gimp_drawable_get_tile     (GDrawable *drawable,
  578.                       gint       shadow,
  579.                       gint       row,
  580.                       gint       col);
  581. GTile*        gimp_drawable_get_tile2    (GDrawable *drawable,
  582.                       gint       shadow,
  583.                       gint       x,
  584.                       gint       y);
  585.  
  586.  
  587. /****************************************
  588.  *               GTiles                  *
  589.  ****************************************/
  590.  
  591. void  gimp_tile_ref          (GTile   *tile);
  592. void  gimp_tile_ref_zero     (GTile   *tile);
  593. void  gimp_tile_unref        (GTile   *tile,
  594.                   int     dirty);
  595. void  gimp_tile_flush        (GTile   *tile);
  596. void  gimp_tile_cache_size   (gulong  kilobytes);
  597. void  gimp_tile_cache_ntiles (gulong  ntiles);
  598. guint gimp_tile_width        (void);
  599. guint gimp_tile_height       (void);
  600.  
  601.  
  602. /****************************************
  603.  *           Pixel Regions              *
  604.  ****************************************/
  605.  
  606. void     gimp_pixel_rgn_init      (GPixelRgn *pr,
  607.                    GDrawable *drawable,
  608.                    int        x,
  609.                    int        y,
  610.                    int        width,
  611.                    int        height,
  612.                    int        dirty,
  613.                    int        shadow);
  614. void     gimp_pixel_rgn_resize    (GPixelRgn *pr,
  615.                    int        x,
  616.                    int        y,
  617.                    int        width,
  618.                    int        height);
  619. void     gimp_pixel_rgn_get_pixel (GPixelRgn *pr,
  620.                    guchar    *buf,
  621.                    int        x,
  622.                    int        y);
  623. void     gimp_pixel_rgn_get_row   (GPixelRgn *pr,
  624.                    guchar    *buf,
  625.                    int        x,
  626.                    int        y,
  627.                    int        width);
  628. void     gimp_pixel_rgn_get_col   (GPixelRgn *pr,
  629.                    guchar    *buf,
  630.                    int        x,
  631.                    int        y,
  632.                    int        height);
  633. void     gimp_pixel_rgn_get_rect  (GPixelRgn *pr,
  634.                    guchar    *buf,
  635.                    int        x,
  636.                    int        y,
  637.                    int        width,
  638.                    int        height);
  639. void     gimp_pixel_rgn_set_pixel (GPixelRgn *pr,
  640.                    guchar    *buf,
  641.                    int        x,
  642.                    int        y);
  643. void     gimp_pixel_rgn_set_row   (GPixelRgn *pr,
  644.                    guchar    *buf,
  645.                    int        x,
  646.                    int        y,
  647.                    int        width);
  648. void     gimp_pixel_rgn_set_col   (GPixelRgn *pr,
  649.                    guchar    *buf,
  650.                    int        x,
  651.                    int        y,
  652.                    int        height);
  653. void     gimp_pixel_rgn_set_rect  (GPixelRgn *pr,
  654.                    guchar    *buf,
  655.                    int        x,
  656.                    int        y,
  657.                    int        width,
  658.                    int        height);
  659. gpointer gimp_pixel_rgns_register (int        nrgns,
  660.                    ...);
  661. gpointer gimp_pixel_rgns_process  (gpointer   pri_ptr);
  662.  
  663.  
  664. /****************************************
  665.  *            The Palette               *
  666.  ****************************************/
  667.  
  668. void gimp_palette_get_background (guchar *red,
  669.                   guchar *green,
  670.                   guchar *blue);
  671. void gimp_palette_get_foreground (guchar *red,
  672.                   guchar *green,
  673.                   guchar *blue);
  674. void gimp_palette_set_background (guchar  red,
  675.                   guchar  green,
  676.                   guchar  blue);
  677. void gimp_palette_set_foreground (guchar  red,
  678.                   guchar  green,
  679.                   guchar  blue);
  680.  
  681. /****************************************
  682.  *            Gradients                 *
  683.  ****************************************/
  684.  
  685. char**   gimp_gradients_get_list       (gint    *num_gradients);
  686. char*    gimp_gradients_get_active     (void);
  687. void     gimp_gradients_set_active     (char    *name);
  688. gdouble* gimp_gradients_sample_uniform (gint     num_samples);
  689. gdouble* gimp_gradients_sample_custom  (gint     num_samples,
  690.                     gdouble *positions);
  691.  
  692.  
  693. #ifdef __cplusplus
  694. }
  695. #endif /* __cplusplus */
  696.  
  697.  
  698. #endif /* __GIMP_H__ */
  699.