home *** CD-ROM | disk | FTP | other *** search
/ PC Pro 2002 April / pcpro0402.iso / essentials / graphics / Gimp / gimp-src-20001226.exe / src / gimp / plug-ins / imagemap / imap_main.h < prev    next >
Encoding:
C/C++ Source or Header  |  2000-01-15  |  3.0 KB  |  99 lines

  1. /*
  2.  * This is a plug-in for the GIMP.
  3.  *
  4.  * Generates clickable image maps.
  5.  *
  6.  * Copyright (C) 1998-1999 Maurits Rijk  lpeek.mrijk@consunet.nl
  7.  *
  8.  * This program is free software; you can redistribute it and/or modify
  9.  * it under the terms of the GNU General Public License as published by
  10.  * the Free Software Foundation; either version 2 of the License, or
  11.  * (at your option) any later version.
  12.  *
  13.  * This program is distributed in the hope that it will be useful,
  14.  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  15.  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  16.  * GNU General Public License for more details.
  17.  *
  18.  * You should have received a copy of the GNU General Public License
  19.  * along with this program; if not, write to the Free Software
  20.  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
  21.  *
  22.  */
  23.  
  24. #ifndef _IMAP_MAIN_H
  25. #define _IMAP_MAIN_H
  26.  
  27. #include "imap_mru.h"
  28. #include "imap_object.h"
  29. #include "imap_preferences.h"
  30.  
  31. typedef enum {NCSA, CERN, CSIM} MapFormat_t;
  32.  
  33. typedef struct {
  34.    MapFormat_t map_format;
  35.    gchar *image_name;
  36.    gchar *title;
  37.    gchar *author;
  38.    gchar *default_url;
  39.    gchar *description;
  40.    gint   old_image_width;
  41.    gint   old_image_height;
  42.    gboolean color;        /* Color (TRUE) or Gray (FALSE) */
  43.    gboolean show_gray;
  44. } MapInfo_t;
  45.  
  46. void main_set_dimension(gint width, gint height);
  47. void main_clear_dimension(void);
  48. void load(const gchar *filename);
  49. void save_as(const gchar *filename);
  50. void dump_output(gpointer param, OutputFunc_t output);
  51. MRU_t *get_mru(void);
  52. MapInfo_t *get_map_info(void);
  53. PreferencesData_t *get_preferences(void);
  54.  
  55. gint get_image_width(void);
  56. gint get_image_height(void);
  57.  
  58. void set_busy_cursor(void);
  59. void remove_busy_cursor(void);
  60.  
  61. void main_toolbar_set_grid(gboolean active);
  62.  
  63. void set_zoom(gint zoom_factor);
  64. gint get_real_coord(gint coord);
  65. void draw_line(GdkWindow *window, GdkGC *gc, gint x1, gint y1, gint x2, 
  66.            gint y2);
  67. void draw_rectangle(GdkWindow *window, GdkGC *gc, gint filled, gint x, gint y,
  68.             gint width, gint height);
  69. void draw_arc(GdkWindow *window, GdkGC *gc, gint filled, gint x, gint y,
  70.           gint width, gint height, gint angle1, gint angle2);
  71. void draw_circle(GdkWindow *window, GdkGC *gc, gint filled, gint x, gint y, 
  72.          gint r);
  73. void draw_polygon(GdkWindow *window, GdkGC *gc, GList *list);
  74.  
  75. const char *get_filename(void);
  76.  
  77. void set_arrow_func(void);
  78. void set_rectangle_func(void);
  79. void set_circle_func(void);
  80. void set_polygon_func(void);
  81.  
  82. ObjectList_t *get_shapes(void);
  83. void add_shape(Object_t *obj);
  84. void update_shape(Object_t *obj);
  85. void select_shape(GtkWidget *widget, GdkEventButton *event);
  86. void edit_shape(gint x, gint y);
  87.  
  88. void do_popup_menu(GdkEventButton *event);
  89. void draw_shapes(GtkWidget *preview);
  90.  
  91. void redraw_preview(void);
  92. void preview_freeze(void);
  93. void preview_thaw(void);
  94.  
  95. void show_url(void);
  96. void hide_url(void);
  97.  
  98. #endif /* _IMAP_MAIN_H */
  99.