home *** CD-ROM | disk | FTP | other *** search
/ PC Pro 2002 April / pcpro0402.iso / essentials / graphics / Gimp / gimp-src-20001226.exe / src / gimp / plug-ins / gap / gap_dbbrowser_utils.h < prev    next >
Encoding:
C/C++ Source or Header  |  2000-08-24  |  3.4 KB  |  129 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.  
  19.  
  20. /* 
  21.    gap_dbbrowser_utils.h (original code dbbrowser_utils.h by Thomas NOEL <thomas@minet.net>
  22.    
  23.    09. dec .1998   hof: update for GIMP 1.1
  24.    20. dec .1997   hof: GAP variant of DBbrowser
  25.                         removed apply_callback
  26.                         added constraint_procedure, 
  27.                         added 2 buttons
  28.                         added return type
  29.  
  30.    0.08  26th sept 97  by Thomas NOEL <thomas@minet.net> 
  31. */
  32.  
  33. #ifndef _GAP_DB_BROWSER_UTILS_H
  34. #define _GAP_DB_BROWSER_UTILS_H
  35.  
  36. /* configuration */
  37.  
  38. #define DBL_LIST_WIDTH 220
  39. #define DBL_WIDTH DBL_LIST_WIDTH+400
  40. #define DBL_HEIGHT 250
  41.  
  42. /* end of configuration */
  43.  
  44. #include <stdlib.h>
  45. #include "gtk/gtk.h"
  46. #include "libgimp/gimp.h"
  47. # include "gap_filter.h"
  48.  
  49. typedef struct {
  50.   gchar *label;
  51.   gchar *func;
  52. } ListEntry_t;
  53.  
  54. typedef struct {
  55.  
  56.   GtkWidget* dlg;
  57.  
  58.   GtkWidget* search_entry;
  59.   GtkWidget* name_button;
  60.   GtkWidget* blurb_button;
  61.   GtkWidget* app_const_button;
  62.   GtkWidget* app_vary_button;
  63.  
  64.   GtkWidget* descr_scroll;
  65.   GtkWidget* descr_table;
  66.  
  67.   GtkWidget* clist;
  68.   GtkWidget* scrolled_win;
  69.  
  70.   /* the currently selected procedure */
  71.   gchar           *selected_proc_name;
  72.   gchar           *selected_scheme_proc_name;
  73.   gchar           *selected_proc_blurb;
  74.   gchar           *selected_proc_help;
  75.   gchar           *selected_proc_author;
  76.   gchar           *selected_proc_copyright;
  77.   gchar           *selected_proc_date;
  78.   GimpPDBProcType  selected_proc_type;
  79.   gint             selected_nparams;
  80.   gint             selected_nreturn_vals;
  81.   GimpParamDef    *selected_params;
  82.   GimpParamDef    *selected_return_vals; 
  83.  
  84.   t_constraint_func      constraint_func;
  85.   t_constraint_func      constraint_func_sel1;
  86.   t_constraint_func      constraint_func_sel2;
  87.   t_gap_db_browse_result *result;
  88.   
  89.   gint codegen_flag;
  90. } dbbrowser_t;
  91.  
  92. /* local functions */
  93.  
  94. static void
  95. dialog_button_1_callback(GtkWidget *, gpointer );
  96.  
  97. static void
  98. dialog_button_2_callback(GtkWidget *, gpointer );
  99.  
  100. static void
  101. dialog_button_3_callback(GtkWidget *, gpointer );
  102.  
  103. static gint
  104. procedure_select_callback (GtkWidget *widget,
  105.                gint row, 
  106.                gint column, 
  107.                GdkEventButton * bevent,
  108.                gpointer data);
  109.  
  110. static void
  111. dialog_search_callback(GtkWidget *, 
  112.                gpointer);
  113.  
  114. static void
  115. dialog_select(dbbrowser_t *dbbrowser, 
  116.           gchar *proc_name);
  117.  
  118. static void
  119. dialog_close_callback(GtkWidget *, 
  120.               gpointer);
  121.  
  122. static void      
  123. convert_string (gchar *str);
  124.  
  125. static gchar* 
  126. GParamType2char(GimpPDBArgType t);
  127.  
  128. #endif
  129.