{
   $Id: gtkcurve.pp,v 1.1 2000/07/13 06:34:03 michael Exp $
}

{****************************************************************************
                                 Interface
****************************************************************************}

{$ifdef read_interface}

  type
     Tgfloatarray = Array[0..1] of gfloat;
     PgfloatArray = ^TgfloatArray;

     PGtkCurve = ^TGtkCurve;
     TGtkCurve = record
          graph : TGtkDrawingArea;
          cursor_type : gint;
          min_x : gfloat;
          max_x : gfloat;
          min_y : gfloat;
          max_y : gfloat;
          pixmap : PGdkPixmap;
          curve_type : TGtkCurveType;
          height : gint;
          grab_point : gint;
          last : gint;
          num_points : gint;
          point : PGdkPoint;
          num_ctlpoints : gint;
          ctlpoint : PgfloatArray;
       end;

     PGtkCurveClass = ^TGtkCurveClass;
     TGtkCurveClass = record
          parent_class : TGtkDrawingAreaClass;
          curve_type_changed : procedure (curve:PGtkCurve); cdecl;
       end;

Type
  GTK_CURVE=PGtkCurve;
  GTK_CURVE_CLASS=PGtkCurveClass;

function  GTK_CURVE_TYPE:TGtkType;cdecl;external gtkdll name 'gtk_curve_get_type';
function  GTK_IS_CURVE(obj:pointer):boolean;
function  GTK_IS_CURVE_CLASS(klass:pointer):boolean;

function  gtk_curve_get_type:TGtkType;cdecl;external gtkdll name 'gtk_curve_get_type';
function  gtk_curve_new : PGtkWidget;cdecl;external gtkdll name 'gtk_curve_new';
procedure gtk_curve_reset(curve:PGtkCurve);cdecl;external gtkdll name 'gtk_curve_reset';
procedure gtk_curve_set_gamma(curve:PGtkCurve; gamma:gfloat);cdecl;external gtkdll name 'gtk_curve_set_gamma';
procedure gtk_curve_set_range(curve:PGtkCurve; min_x:gfloat; max_x:gfloat; min_y:gfloat; max_y:gfloat);cdecl;external gtkdll name 'gtk_curve_set_range';
procedure gtk_curve_get_vector(curve:PGtkCurve; veclen:longint; vector:Pgfloat);cdecl;external gtkdll name 'gtk_curve_get_vector';
procedure gtk_curve_set_vector(curve:PGtkCurve; veclen:longint; vector:Pgfloat);cdecl;external gtkdll name 'gtk_curve_set_vector';
procedure gtk_curve_set_curve_type(curve:PGtkCurve; thetype:TGtkCurveType);cdecl;external gtkdll name 'gtk_curve_set_curve_type';

{$endif read_interface}


{****************************************************************************
                              Implementation
****************************************************************************}

{$ifdef read_implementation}

function  GTK_IS_CURVE(obj:pointer):boolean;
begin
  GTK_IS_CURVE:=(obj<>nil) and GTK_IS_CURVE_CLASS(PGtkTypeObject(obj)^.klass);
end;

function  GTK_IS_CURVE_CLASS(klass:pointer):boolean;
begin
  GTK_IS_CURVE_CLASS:=(klass<>nil) and (PGtkTypeClass(klass)^.thetype=GTK_CURVE_TYPE);
end;

{$endif read_implementation}


{
  $Log: gtkcurve.pp,v $
  Revision 1.1  2000/07/13 06:34:03  michael
  + Initial import

  Revision 1.1  1999/11/24 23:36:35  peter
    * moved to packages dir

  Revision 1.11  1999/10/21 08:42:01  florian
    * some changes to get it work with gtk 1.3 under Windows 98:
      - removed some trailing space after the import name
      - In gtkbindings.h is
        #define  gtk_binding_entry_add          gtk_binding_entry_clear
        so in the pascal headers the import name of gtk_bindings_entry_add should be
        gtk_binding_entry_clear!
      - removed the declaration of
        gtk_drag_source_unset in gtkdnd.pp it isn't in gtk-1.3.dll!
      - in gdk.pp glibdll must be set to gdk-1.3:
        const
           gdkdll='gdk-1.3';
           glibdll='gdk-1.3';
        else the whole gdk_* calls are imported from glib-1.3.dll which is wrong!

  Revision 1.10  1999/10/06 17:42:48  peter
    * external is now only in the interface
    * removed gtk 1.0 support

  Revision 1.9  1999/07/23 16:12:11  peter
    * use packrecords C

  Revision 1.8  1999/05/11 00:38:23  peter
    * win32 fixes

  Revision 1.7  1999/05/10 15:19:10  peter
    * cdecl fixes

  Revision 1.6  1999/05/10 09:03:06  peter
    * gtk 1.2 port working

  Revision 1.5  1999/05/07 17:40:18  peter
    * more updates

  Revision 1.4  1998/11/09 10:09:44  peter
    + C type casts are now correctly handled

  Revision 1.3  1998/10/21 20:22:19  peter
    * cdecl, packrecord fixes (from the gtk.tar.gz)
    * win32 support
    * gtk.pp,gdk.pp for an all in one unit

}

