#ifndef IVIEWEXT_H
#define IVIEWEXT_H

/* dialog.c */
extern int check_point_list();
extern Point ListToPoint();
extern LVAL PointToList();
extern int dialog_p(),
  xsgetdialog(),
  xsdialog_isnew(),
  xsdialog_allocate(),
  xsdialog_remove(),
  xsdialog_allocated_p(),
  xsdialog_default_button(),
  xsdialog_modal();
extern int dialog_item_p();
extern LVAL xsgetdialogitem(),
  xsdialog_item_do_action(),
  xsdialog_item_action();
extern int button_item_p();
extern LVAL xsgetbuttonitem(),
  xsbutton_item_isnew();
extern int toggle_item_p();
extern LVAL xsgettoggleitem(),
  xstoggle_item_isnew(),
  xstoggle_item_value();
extern int text_item_p();
extern LVAL xsgettextitem(),
  xstext_item_isnew(),
  xstext_item_text();
extern int choice_item_p();
extern LVAL xsgetchoiceitem(),
  xschoice_item_isnew(),
  xschoice_item_value();
extern int scroll_item_p();
extern LVAL xsgetscrollitem(),
  xsscroll_item_isnew(),
  xsscroll_item_value(),
  xsscroll_item_max(),
  xsscroll_item_min(),
  xsscroll_item_action();
extern int list_item_p();
extern LVAL xsgetlistitem(),
  xslist_item_isnew(),
  xslist_item_action(),
  xslist_item_text(),
  xslist_item_selection();

/* hardwareobjects.c */
extern void standard_hardware_clobber();
extern LVAL get_hardware_object_by_address();
extern int valid_window_address();
extern void set_window_address();
extern IVIEW_WINDOW GETWINDOWADDRESS();
extern int valid_iview_window_address();
extern void set_iview_window_address();
extern IVIEW_WINDOW GETIVIEWWINDOWADDRESS();
extern int valid_iview_address();
extern void set_iview_address();
extern IVIEW_WINDOW get_iview_address(),
  GETIVIEWADDRESS();
extern int valid_menu_address();
extern void set_menu_address();
  *get_menu_address();
#ifdef MACINTOSH
extern int valid_apple_menu_address();
extern void set_apple_menu_address();
extern char *get_apple_menu_address();
#endif MACINTOSH
extern int valid_dialog_address();
extern void set_dialog_address();
extern IVIEW_WINDOW GETDIALOGADDRESS();
#ifdef MACINTOSH
extern int valid_edit_window_address();
extern void set_edit_window_address();
extern char *get_edit_window_address();
extern int valid_display_window_address();
extern void set_dislay_window_address();
extern char *get_display_window_address();
#endif MACINTOSH

/* iview.c */
extern void IViewSetRange(),
  IViewGetRange();
extern double IViewEncodeValue(),
  IViewDecodeValue();
extern void IviewSetPointState(),
  IViewDrawDataPoints(),
  IViewDrawDataLines(),
#ifdef USESTRINGS
  IViewDrawDataStrings(),
#endif USESTRINGS
  IViewDepthCuePoints(),
  IViewStdResize(),
  IViewStdRedraw(),
  IViewStdRedrawBackground(),
  IViewGetContentMarginRect(),
  IViewStdRedrawContent(),
  IViewStdMarkPointsInRect(),
  IViewStdAdjustScreen(),
  IViewStdAdjustPointsInRect(),
  IViewStdAdjustScreenPoint(),
  IViewRotate2(),
  GetNiceRange();

/* iviewdata.c */
extern IViewDATA IViewDataNew();
extern void IViewDataFree();
extern IViewBasicPoints IViewDataPoints(),
  IViewDataLines();
#ifdef USESTRINGS
extern IViewBasicPoints IViewDataStrings();
#endif USESTRINGS
extern int IViewDataNumVariables();
extern void IViewDataSetVariableLabel();
extern char *IViewDataVariableLabel();
extern void IViewDataSetRange(),
  IViewDataGetRange(),
  IViewDataSetScreenRange(),
  IViewDataGetScreenRange(),
  IViewDataSetIdentityTransformation(),
  IViewDataSetTransformation();
extern double **IViewDataTransformation();
extern void IViewDataApplyTransformation();
extern int IViewDataIsTransformed();
extern void IViewDataAddPoints(),
  IViewDataClearPoints();
extern int IViewDataNumPoints();
extern void IViewDataSetPointValue();
extern double IViewDataPointValue(),
  IViewDataPointTransformed();
extern int IViewDataPointScreenValue();
extern void IViewDatGetScreenPointValue(),
  IViewDataSetPointMask();
extern int IViewDataPointMasked();
extern void IViewDSataSetPointColor();
extern ColorCode IViewDataPointColor();
extern void IViewDataSetPointState();
extern PointState IViewDataPointState();
extern void IViewDataSetPointScreenState();
extern PointState IViewDataPointScreenState();
extern void IViewDataResetScreenStates(),
  IViewDataSetPointMark();
extern int IViewDataPointMarked();
extern void IViewDataClearPointMarks(),
  IViewDataSetPointLabel();
extern char *IViewDataPointLabel();
extern void IViewDataSetPointSymbol(),
  IViewDataGetPointSymbol();
extern int IViewDataNumLines();
extern void IViewDataAddLines();
  IViewDataClearLines(),
  IViewDataSetLineValue();
extern double IViewDataLineValue(),
  IViewDatLineTransformedValue();
extern int IViewDataLineScreenValue();
extern void IViewDataSetLineMask();
extern int IViewDataLineMasked();
extern void IViewDataSetLineColor();
extern ColorCode IViewDataLineColor();
extern void IViewDataSetLineWidth();
extern int IViewDataGetLineWidth();
extern void IViewDataSetNextLine();
extern int IViewDataNextLine();
extern void IViewDataSetLineType();
extern int IViewDataLineType();
#ifdef USESTRINGS
extern int IViewDataNumStrings();
extern void IViewDataAddStrings(),
  IViewDataClearStrings(),
  IViewDataSetStringValue();
extern double IViewDataStringValue(),
  IViewDSataStringTransformedValue();
extern int IViewDataStringScreenValue();
extern void IViewDataSetStringMask();
extern int IViewDataStringMasked();
extern void IViewDataSetStringColor();
extern ColorCode IViewDataStringColor();
extern void IViewDataSetStringString();
extern char *IViewDataStringString();
extern void IViewDataSetStringModifiers(),
  IViewDataGetStringModifiers();
#endif USESTRINGS
extern void IViewDataDrawPoints(),
  IViewDataCuePoints();

/* iviewinternal.c */
extern void IViewFreeMem();
extern IVIEW_WINDOW IViewNew();
extern void IViewSetMouseMode();
extern MouseMode IViewMouseMode();
extern void IViewSetShowingLabels();
extern int IViewShowingLabels();
extern void IViewSetData();
extern IViewDATA IViewData();
extern void IViewSetFixedAspect();
extern int IViewFixedAspect();
extern void IViewSetScale();
extern double IViewScale();
extern void IViewSetShift();
extern double IViewShift();
extern void IViewGetAxisMargin(),
  IViewSetXaxis(),
  IViewGetXaxis(),
  IViewSetYaxis(),
  IViewGetYaxis(),
  IViewDrawAxes(),
  IViewSetBrush(),
  IViewGetBrush(),
  IViewEraseBrush(),
  IViewDrawBrush(),
  IViewMoveBrush(),
  IViewStdSelectingMouseAction(),
  IViewStdBrushingMouseAction(),
  IViewStdMouseAction(),
  IViewStdUnselectAllPoints(),
  IViewEraseSelection(),
  IViewMaskSelection(),
  IViewUnmaskAllPoints(),
  IViewShowAllPoints();
extern int IViewAllPointsShowing(),
  IViewAllPointsUnmasked(),
  IViewAllPointsSelected();
#ifdef OLDLINKS
extern int IViewInternalIsLinked();
extern void IViewLinkWindow(),
  IViewUnlinkWindow(),
  IViewUnlinkALlWindows(),
  IViewMatchPointState(),
  IViewAdjustScreens();
extern int IViewIsLinked();
#else
extern void IViewSetLinks();
extern long IViewGetLinks();
extern int IViewIsLinked();
#endif OLDLINKS

/* iviewscale.c */
extern void IViewGetVisibleRange(),
  IViewScaleToRange(),
  IViewApplyScaleShift();

/* menus.c */
extern int menu_p();
extern LVAL xsgetmenu(),
  xsmenu_isnew(),
  xsallocate_menu(),
  xsdispose_menu(),
  xsallocated_p(),
  xsmenu_items(0,
  xsinstall_menu(0,
  xsremove_menu(),
  xsinstalled_p(),
  xsmenu_enabled(),
  xsappend_items(),
  xsdelete_items(),
  xsmenu_select(),
  xsmenu_title(),
  xsmenu_popup();
extern int menu_item_p();
extern LVAL xsgetmenuitem(),
  xsitem_isnew(),
  xsitem_title(),
  xsitem_key(),
  xsitem_mark(),
  xsitem_style(),
  xsitem_action(),
  xsitem_enabled(),
  xsitem_intstalled_p(),
  xsitem_do_action();

/* xsgraphics.c */
#ifdef MACINTOSH
extern LVAL iview_window_copy_to_clip();
#endif MACINTOSH
extern LVAL iview_visible_range(),
  iview_scale_to_range(),
  iview_scale(),
  iview_shift(),
  iview_clear_masks(),
  iview_slice_variable(), 
  iview_real_to_screen(),
  iview_scaled_to_screen(),
  iview_screen_to_real(),
  iview_screen_to_scaled(),
  iview_points_in_rect(),
  iview_window_drag_grey_rect(),
  iview_point_showing(),
  iview_point_hilited(),
  iview_point_selected();

/* xshistogram.c */
extern void newhistinternals();
extern LVAL iview_hist_isnew(),
  iview_hist_allocate(),
  iview_hist_num_bins(),
  iview_hist_bin_counts(),
  iview_hist_add_points(),
  iview_hist_clear_points(),
  iview_hist_resize(), 
  iview_hist_redraw_content(),
  iview_hist_adjust_to_data(),
  iview_hist_adjust_screen(),
  iview_hist_adjust_points_in_rect(),
  iview_hist_mark_points_in_rect(),
  iview_hist_adjust_screen_point();

/* xsiview.c */
extern void internal_ivew_add_points();
extern LVAL iview_add_points(),
  iview_clear_points();
extern void internal_iview_add_lines();
extern LVAL iview_add_lines(),
  iview_clear_lines();
#ifdef USESTRINGS
extern void internal_iview_add_strings();
extern LVAL iview_add_strings(),
  iview_clear_strings();
#endif USESTRINGS
extern LVAL iview_std_resize(),
  iview_std_redraw(),
  iview_std_redraw_background(),
  iview_std_redraw_content();
extern void IViewRedrawBackground(),
  IViewRedrawContent(),
  IViewRedrawOverlays(),
  IViewResizeOverlays(),
  check_add_to_screen(),
  check_redraw();
extern int draw_key_arg();

/* xsiview2.c */
extern LVAL iview_num_variables(),
  iview_num_points(),
  iview_point_coordinate(),
  iview_point_screen_coordinate(),
  iview_point_transformed_coordinate(),
  iview_point_masked(),
  iview_point_color(),
  iview_point_state(),
  iview_point_screen_state(),
  iview_point_marked(),
  iview_point_label(),
  iview_point_symbol(),
  iview_num_lines(),
  iview_line_coordinate(),
  iview_line_screen_coordinate(),
  iview_line_transformed_coordinate(),
  iview_line_masked(),
  iview_line_color(),
  iview_line_next(),
  iview_line_type(),
  iview_line_width();
#ifdef USESTRINGS
extern LVAL iview_num_strings(),
  iview_string_coordinate(),
  iview_string_screen_coordinate(),
  iview_string_transformed_coordinate(),
  iview_string_masked(),
  iview_string_color(),
  iview_string_modifiers();
#endif /* USESTRINGS */

/* xsiview3.c */
extern LVAL iview_variable_label(),
  iview_range(),
  iview_scaled_range(),
  iview_screen_range(),
  iview_transformation(),
  iview_apply_transformation(),
  iview_draw_data_points(),
  iview_draw_data_lines(),
#ifdef USESTRINGS
  iview_draw_data_strings(),
#endif /* USESTRINGS */
  iview_std_mark_points_in_rect(),
  iview_std_adjust_screen();
extern PointState decode_point_state();
extern LVAL iview_std_adjust_points_in_rect(),
  iview_std_adjust_screen_point(),
  iview_rotate_2(),
  iview_get_nice_range(),
  iview_adjust_depth_cuing();

/* xsiviewintrn.c */
extern LVAL iview_isnew();
extern void initialize_graph();
extern LVAL iview_allocate();
extern void get_iview_keys(object),
  IViewAdjustOwnScreen(),
  IViewMarkPointsInRect();
extern LVAL encode_point_state();
extern void IViewAdjustPointsInRect(),
  IViewAdjustOwnScreenPoint(),
  IViewUnselectAllPoints(),
  initialize_iview(),
  get_iview_ivars();
extern LVAL iview_window_show_window(),
  iview_content_rect(),
  iview_content_origin(),
  iview_content_variables(),
  iview_click_range(),
  iview_mouse_mode(),
  iview_showing_labels(),
  iview_margin(),
  iview_fixed_aspect(),
  iview_dirty(),
  iview_x_axis(),
  iview_y_axis(),
  iview_brush(),
  iview_erase_brush(),
  iview_draw_brush(),
  iview_move_brush(),
  iview_resize_brush(); 
extern void IViewDoClick(),
  IViewDoMotion();
extern LVAL iview_do_click(),
  iview_do_motion(),
  iview_std_click(),
  iview_std_motion(),
  iview_unselect_all_points(),
  iview_erase_selection(),
  iview_mask_selection(),
  iview_unmask_all_points(),
  iview_show_all_points(),
  iview_all_points_showing(),
  iview_all_points_unmasked(),
  iview_any_points_selected();
#ifdef OLDLINKS
extern LVAL iview_linked(), iview_unlink_all_windows();
#else
extern int IViewInternalIsLinked();
extern LVAL iview_linked(),
  iview_links();
extern void IViewUnlinkWindow();
extern LVAL iview_unlink_all_windows();
extern void IViewMatchPointState(),
  IViewAdjustScreens(),
  IViewCheckLinks();
#endif OLDLINKS

/* xsiviewwindow.c */
extern LVAL iview_window_isnew(),
  iview_window_allocate();
extern void void StGWGetAllocInfo(),
  StGWObDoClobber(),
  StGWObResize(),
  StGWObRedraw(),
  StGWObDoIdle(),
  StGWObDoMouse(),
  StGWObDoKey();
extern StGWWinInfo *StGWObWinInfo();
extern void initialize_graph_window();
extern LVAL xsiview_window_update(),
  xsiview_window_activate();
  iview_window_idle_on();
  iview_window_menu();

/* xsiviewwindow2.c */
extern LVAL iview_window_remove(),
  iview_window_while_button_down();
extern ColorCode decode_lisp_color();
extern LVAL encode_lisp_color();
extern LVAL iview_window_canvas_width(),
  iview_window_canvas_height(),
  iview_window_line_type(),
  iview_window_draw_mode(),
  iview_window_draw_color(),
  iview_window_back_color(),
  iview_window_use_color(),
  iview_window_reverse_colors(),
  iview_window_view_rect(),
  iview_window_line_width();
  iview_window_has_h_scroll(),
  iview_window_has_v_scroll(),
  iview_window_scroll(),
  iview_window_h_scroll_incs(),
  iview_window_v_scroll_incs(),
  iview_window_draw_line(),
  iview_window_draw_point(),
  iview_window_erase_rect(),
  iview_window_frame_rect(),
  iview_window_paint_rect(),
  iview_window_erase_oval(),
  iview_window_frame_oval(),
  iview_window_paint_oval(),
  iview_window_erase_arc(),
  iview_window_frame_arc(),
  iview_window_paint_arc(),
  iview_window_erase_poly(),
  iview_window_frame_poly(),
  iview_window_paint_poly(),
  iview_window_text_ascent(),
  iview_window_text_descent(), 
  iview_window_text_width(),
  iview_window_draw_string(),
  iview_window_draw_string_up(),
  iview_window_draw_text(),
  iview_window_draw_text_up(),
  iview_window_draw_symbol(),
  iview_window_replace_symbol(),
  iview_window_start_buffering(),
  iview_window_buffer_to_screen(),
  iview_window_clip_rect();
extern int int decode_cursor();
extern LVAL encode_cursor(),
  iview_window_cursor(),
  iview_window_reset_buffer(),
  iview_window_dump_image(),
  gw_make_color(),
  gw_free_color(),
  gw_make_cursor(),
  gw_free_cursor();
extern void decode_point_symbol();
extern LVAL encode_point_symbol(),
  gw_draw_bitmap();

/* xsnamelist.c */
extern LVAL iview_list_allocate(), 
  iview_list_add_points(),
  iview_list_redraw_content(),
  iview_list_adjust_screen_point(),
  iview_list_adjust_points_in_rect(),
  iview_list_mark_points_in_rect();

/* xsscatmat.c */
extern LVAL iview_scatmat_allocate(),
  iview_scatmat_add_points(),
  iview_scatmat_add_lines(),
#ifdef USESTRINGS
  iview_scatmat_add_strings(),
#endif /* USESTRINGS */
  iview_scatmat_resize(),
  iview_scatmat_redraw_content(),
  iview_scatmat_click(),
  iview_scatmat_motion(), 
  iview_scatmat_adjust_screen(),
  iview_scatmat_adjust_screen_point(),
  iview_scatmat_adjust_points_in_rect(),
  iview_scatmat_mark_points_in_rect();

/* xsspin.c */
extern LVAL iview_spin_allocate(),
  iview_spin_content_variables(),
  iview_spin_depth_cuing(),
  iview_spin_showing_axes(),
  iview_spin_angle(), 
  iview_spin_resize(),
  iview_spin_draw_axes(),
  iview_spin_redraw_content(),
  iview_spin_rotate();

/* xsscatterplot.c */
extern LVAL iview_plot2d_adjust_to_data();
  iview_plot2d_add_points(),
  iview_plot2d_add_lines();
#ifdef USESTRINGS
extern LVAL iview_plot2d_add_strings();
#endif /* USESTRINGS */

/* maciviewwindow.c */
extern char *IViewWindowWinInfo();
extern WindowPtr IViewWindowNew();

/* maciviewwindow2.c */
extern long IViewWindowGetObject();

/* macresizebrush.c */
extern int IViewGetNewBrushSize();

#endif IVIEWEXT_H