split/Tioga/wrappers.c in tioga-1.7 vs split/Tioga/wrappers.c in tioga-1.8
- old
+ new
@@ -1,8 +1,10 @@
+/* -*- c-basic-offset: 3; -*- */
/* wrappers.c */
/*
Copyright (C) 2007 Bill Paxton
+ (C) 2008 Vincent Fourmond
This file is part of Tioga.
Tioga is free software; you can redistribute it and/or modify
it under the terms of the GNU General Library Public License as published
@@ -27,11 +29,19 @@
// This file has the wrappers for ruby Tioga
// axes.c
OBJ_PTR FM_show_axis(OBJ_PTR fmkr, OBJ_PTR loc) { int ierr=0;
- c_show_axis(fmkr, Get_FM(fmkr, &ierr), Number_to_int(loc, &ierr), &ierr); RETURN_NIL; }
+ /* Now choosing between c_show_axis_generic and c_show_axis */
+ if(Is_Kind_of_Integer(loc)) /* A simple location */
+ c_show_axis(fmkr, Get_FM(fmkr, &ierr),
+ Number_to_int(loc, &ierr), &ierr);
+ else /* A hash */
+ c_show_axis_generic(fmkr, Get_FM(fmkr, &ierr), loc, &ierr);
+ RETURN_NIL;
+}
+
OBJ_PTR FM_show_edge(OBJ_PTR fmkr, OBJ_PTR loc) { int ierr=0;
c_show_edge(fmkr, Get_FM(fmkr, &ierr), Number_to_int(loc, &ierr), &ierr); RETURN_NIL; }
OBJ_PTR FM_no_title(OBJ_PTR fmkr) { int ierr=0; c_no_title(fmkr, Get_FM(fmkr, &ierr), &ierr); RETURN_NIL; }
OBJ_PTR FM_no_xlabel(OBJ_PTR fmkr) { int ierr=0; c_no_xlabel(fmkr, Get_FM(fmkr, &ierr), &ierr); RETURN_NIL; }
OBJ_PTR FM_no_ylabel(OBJ_PTR fmkr) { int ierr=0; c_no_ylabel(fmkr, Get_FM(fmkr, &ierr), &ierr); RETURN_NIL; }
@@ -40,10 +50,16 @@
OBJ_PTR FM_no_left_edge(OBJ_PTR fmkr) { int ierr=0; c_no_left_edge(fmkr, Get_FM(fmkr, &ierr), &ierr); RETURN_NIL; }
OBJ_PTR FM_no_right_edge(OBJ_PTR fmkr) { int ierr=0; c_no_right_edge(fmkr, Get_FM(fmkr, &ierr), &ierr); RETURN_NIL; }
OBJ_PTR FM_no_top_edge(OBJ_PTR fmkr) { int ierr=0; c_no_top_edge(fmkr, Get_FM(fmkr, &ierr), &ierr); RETURN_NIL; }
OBJ_PTR FM_no_bottom_edge(OBJ_PTR fmkr) { int ierr=0; c_no_bottom_edge(fmkr, Get_FM(fmkr, &ierr), &ierr); RETURN_NIL;}
+OBJ_PTR FM_axis_information(OBJ_PTR fmkr, OBJ_PTR spec)
+{
+ int ierr=0;
+ return c_axis_get_information(fmkr, Get_FM(fmkr, &ierr), spec, &ierr);
+}
+
// init.c
OBJ_PTR FM_private_init_fm_data(OBJ_PTR fmkr) { int ierr=0;
c_private_init_fm_data(fmkr, Get_FM(fmkr, &ierr), &ierr); RETURN_NIL; }
OBJ_PTR FM_set_frame_sides(OBJ_PTR fmkr, OBJ_PTR left, OBJ_PTR right, OBJ_PTR top, OBJ_PTR bottom) { int ierr=0;
c_set_frame_sides(fmkr, Get_FM(fmkr, &ierr),
@@ -475,15 +491,15 @@
RETURN_NIL; }
OBJ_PTR FM_check_label_clip(OBJ_PTR fmkr, OBJ_PTR xloc, OBJ_PTR yloc) { int ierr=0;
return c_check_label_clip(fmkr, Get_FM(fmkr, &ierr), Number_to_double(xloc, &ierr), Number_to_double(yloc, &ierr), &ierr); }
-OBJ_PTR FM_save_measure(OBJ_PTR fmkr, OBJ_PTR measure_name,
- OBJ_PTR width, OBJ_PTR height, OBJ_PTR depth)
+OBJ_PTR FM_private_save_measure(OBJ_PTR fmkr, OBJ_PTR measure_name,
+ OBJ_PTR width, OBJ_PTR height, OBJ_PTR depth)
{
int ierr;
- c_save_measure(fmkr, measure_name,
- Number_to_double(width,&ierr),
- Number_to_double(height,&ierr),
- Number_to_double(depth,&ierr));
+ c_private_save_measure(fmkr, measure_name,
+ Number_to_double(width,&ierr),
+ Number_to_double(height,&ierr),
+ Number_to_double(depth,&ierr));
return OBJ_NIL;
}