home *** CD-ROM | disk | FTP | other *** search
/ PC Online 1998 November / PCO_1198.ISO / filesbbs / os2 / gimpos2.arj / GIMP10BI.ZIP / XFree86 / include / plug-ins / megawidget / megawidget.h
Encoding:
C/C++ Source or Header  |  1998-09-13  |  3.8 KB  |  107 lines

  1. /**************************************************
  2.  * file: megawidget/megawidget.h
  3.  *
  4.  * Copyright (c) 1997 Eric L. Hernes (erich@rrnet.com)
  5.  * All rights reserved.
  6.  *
  7.  * Redistribution and use in source and binary forms, with or without
  8.  * modification, are permitted provided that the following conditions
  9.  * are met:
  10.  * 1. Redistributions of source code must retain the above copyright
  11.  *    notice, this list of conditions and the following disclaimer.
  12.  * 2. The name of the author may not be used to endorse or promote products
  13.  *    derived from this software withough specific prior written permission
  14.  *
  15.  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
  16.  * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
  17.  * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
  18.  * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
  19.  * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
  20.  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
  21.  * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
  22.  * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
  23.  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
  24.  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  25.  *
  26.  * $Id: megawidget.h,v 1.2 1998/03/22 20:44:29 adrian Exp $
  27.  */
  28.  
  29. #ifndef MEGAWIDGET_H
  30.  
  31. struct mwRadioGroup {
  32.    gchar *name;
  33.    gint var;
  34. };
  35. struct mwValueRadioGroup {
  36.    gchar *name;
  37.    glong val;
  38. };
  39.  
  40. struct mwPreview {
  41.    gint width;
  42.    gint height;
  43.    gint bpp;
  44.    gdouble scale;
  45.    guchar *bits;
  46. };
  47.  
  48. struct mwColorSel {
  49.    gdouble *color;
  50.    gdouble savcolor[4];
  51.    gint opacity;
  52.    guchar *name;
  53.    GtkWidget *window;
  54.    GtkWidget *preview;
  55. };
  56.  
  57. #ifndef PREVIEW_SIZE
  58. #define PREVIEW_SIZE 100
  59. #endif
  60.  
  61. GtkWidget *mw_app_new(gchar *resname, gchar *appname, gint *runpp);
  62. void mw_fscale_entry_new(GtkWidget *table, char *name,
  63.                          gfloat lorange, gfloat hirange,
  64.                          gfloat st_inc, gfloat pg_inc, gfloat pgsiz,
  65.                          gint left_a, gint right_a, gint top_a,
  66.                          gint bottom_a, gdouble *var);
  67. void mw_iscale_entry_new(GtkWidget *table, char *name,
  68.                          gint lorange, gint hirange,
  69.                          gint st_inc, gint pg_inc, gint pgsiz,
  70.                          gint left_a, gint right_a, gint top_a,
  71.                          gint bottom_a, gint *var);
  72.  
  73. GSList *mw_radio_new(GSList *gsl, GtkWidget *parent, gchar *name,
  74.              gint *varp, gint init);
  75. GSList *mw_radio_group_new(GtkWidget *parent, gchar *name,
  76.                            struct mwRadioGroup *rg);
  77. gint mw_radio_result(struct mwRadioGroup *rg);
  78. GSList * mw_value_radio_group_new(GtkWidget *parent, gchar *name,
  79.                   struct mwValueRadioGroup *rg, glong *var);
  80.  
  81. GtkWidget *mw_toggle_button_new(GtkWidget *parent, gchar *fname,
  82.                                 gchar *label, gint *varp);
  83. GtkWidget *mw_ientry_button_new(GtkWidget *parent, gchar *fname,
  84.                                 gchar *name, gint *varp);
  85. GtkWidget *mw_fentry_button_new(GtkWidget *parent, gchar *fname,
  86.                                 gchar *name, gdouble *varp);
  87. struct mwColorSel *mw_color_select_button_create(GtkWidget *parent,
  88.                          gchar *name,
  89.                          gdouble *color,
  90.                          gint opacity);
  91.  
  92. void mw_ientry_new(GtkWidget *parent, gchar *fname,
  93.            gchar *name, gint *varp);
  94. void mw_fentry_new(GtkWidget *parent, gchar *fname,
  95.            gchar *name, gdouble *varp);
  96.  
  97. typedef void mw_preview_t (GtkWidget *pvw);
  98.  
  99. GtkWidget *mw_preview_new(GtkWidget *parent, struct mwPreview *mwp,
  100.                           mw_preview_t *fcn);
  101.  
  102. struct mwPreview *mw_preview_build(GDrawable *drw);
  103. struct mwPreview *mw_preview_build_virgin(GDrawable *drw);
  104.  
  105. #endif /* MEGAWIDGET_H */
  106. /* end of megawidget/megawidget.h */
  107.