Index: ChangeLog =================================================================== RCS file: /cvsroot/xforms/xforms/ChangeLog,v retrieving revision 1.108 diff -u -p -r1.108 ChangeLog --- ChangeLog 17 May 2004 11:22:10 -0000 1.108 +++ ChangeLog 17 May 2004 21:53:18 -0000 @@ -1,5 +1,49 @@ 2004-05-17 Angus Leeming + Revert some functions to the same API as was used in XForms + version 0.89, patch level 5. In all cases, this is just a case of using + the typedef rather than the raw type. + + * lib/browser.c (fl_create_browser, fl_add_browser): + * lib/include/browser.h (fl_create_browser, fl_add_browser): use FL_Coord. + + * lib/flcolor.c (fl_bk_color, fl_bk_textcolor): + * lib/include/Basic.h (fl_bk_color, fl_bk_textcolor): use FL_COLOR. + + * lib/flresource.c (fl_initialize): + * lib/include/XBasic.h (fl_initialize): use FL_CMD_OPT *. + + * lib/formbrowser.c (fl_add_formbrowser): + * lib/include/formbrowser.h (fl_add_formbrowser): use FL_Coord. + + * lib/oneliner.c (fl_show_oneliner): + * lib/include/goodies.h (fl_show_oneliner): use FL_Coord. + + * lib/scrollbar.c (fl_create_scrollbar, fl_add_scrollbar(): + * lib/include/scrollbar.h (fl_create_scrollbar, fl_add_scrollbar(): + use FL_Coord. + + * lib/signal.c (fl_add_signal_callback): + * lib/include/Basic.h (fl_add_signal_callback): use FL_SIGNAL_HANDLER. + + * lib/tabfolder.c (fl_add_tabfolder, fl_get_folder_area): + * lib/include/tabfolder.h (fl_add_tabfolder, fl_get_folder_area): + use FL_Coord. + + * lib/win.c (fl_winmove, fl_winreshape): + * lib/include/XBasic.h (fl_winmove, fl_winreshape): use FL_Coord. + + * lib/xdraw.c (fl_polygon): + * lib/include/XBasic.h (fl_polygon): use FL_COLOR. + + * lib/xtext.c (fl_drw_text_beside): + * lib/include/Basic.h (fl_drw_text_beside): use FL_COLOR. + + * lib/include/goodies.h (fl_exe_command, fl_end_command, fl_check_command): + use FL_PID_T. + +2004-05-17 Angus Leeming + * lib/include/canvas.h: change the change to AUTOINCLUDE_GLCANVAS_H. * gl/glcanvas.h: #include . Add C++ guards. Index: lib/browser.c =================================================================== RCS file: /cvsroot/xforms/xforms/lib/browser.c,v retrieving revision 1.7 diff -u -p -r1.7 browser.c --- lib/browser.c 9 Sep 2003 00:28:25 -0000 1.7 +++ lib/browser.c 17 May 2004 21:53:19 -0000 @@ -379,7 +379,7 @@ fl_get_default_scrollbarsize(FL_OBJECT * } FL_OBJECT * -fl_create_browser(int type, int x, int y, int w, int h, const char *l) +fl_create_browser(int type, FL_Coord x, FL_Coord y, FL_Coord w, FL_Coord h, const char *l) { FL_OBJECT *ob; SPEC *sp; @@ -426,7 +426,7 @@ fl_create_browser(int type, int x, int y } FL_OBJECT * -fl_add_browser(int type, int x, int y, int w, int h, const char *l) +fl_add_browser(int type, FL_Coord x, FL_Coord y, FL_Coord w, FL_Coord h, const char *l) { FL_OBJECT *ob = fl_create_browser(type, x, y, w, h, l); SPEC *sp = ob->spec; Index: lib/flcolor.c =================================================================== RCS file: /cvsroot/xforms/xforms/lib/flcolor.c,v retrieving revision 1.9 diff -u -p -r1.9 flcolor.c --- lib/flcolor.c 28 Nov 2003 14:28:46 -0000 1.9 +++ lib/flcolor.c 17 May 2004 21:53:20 -0000 @@ -874,7 +874,7 @@ fl_textcolor(FL_COLOR col) } void -fl_bk_color(unsigned long col) +fl_bk_color(FL_COLOR col) { if (flx->bkcolor != col) { @@ -886,7 +886,7 @@ fl_bk_color(unsigned long col) } void -fl_bk_textcolor(unsigned long col) +fl_bk_textcolor(FL_COLOR col) { if (flx->bktextcolor != col) { Index: lib/flresource.c =================================================================== RCS file: /cvsroot/xforms/xforms/lib/flresource.c,v retrieving revision 1.12 diff -u -p -r1.12 flresource.c --- lib/flresource.c 3 May 2004 12:00:28 -0000 1.12 +++ lib/flresource.c 17 May 2004 21:53:21 -0000 @@ -762,7 +762,7 @@ void fl_set_input_navigate(unsigned mask Display * fl_initialize(int *na, char *arg[], const char *appclass, - XrmOptionDescList appopt, int nappopt) + FL_CMD_OPT * appopt, int nappopt) { char disp_name[256], disp_cls[256], buf[256]; XrmValue xval; Index: lib/formbrowser.c =================================================================== RCS file: /cvsroot/xforms/xforms/lib/formbrowser.c,v retrieving revision 1.7 diff -u -p -r1.7 formbrowser.c --- lib/formbrowser.c 9 Sep 2003 00:28:25 -0000 1.7 +++ lib/formbrowser.c 17 May 2004 21:53:22 -0000 @@ -127,7 +127,7 @@ fl_create_formbrowser(int type, FL_Coord } FL_OBJECT * -fl_add_formbrowser(int type, int x, int y, int w, int h, const char *label) +fl_add_formbrowser(int type, FL_Coord x, FL_Coord y, FL_Coord w, FL_Coord h, const char *label) { FL_OBJECT *ob = fl_create_formbrowser(type, x, y, w, h, label); Index: lib/oneliner.c =================================================================== RCS file: /cvsroot/xforms/xforms/lib/oneliner.c,v retrieving revision 1.6 diff -u -p -r1.6 oneliner.c --- lib/oneliner.c 9 Sep 2003 00:28:25 -0000 1.6 +++ lib/oneliner.c 17 May 2004 21:53:22 -0000 @@ -60,7 +60,7 @@ create_it(void) } void -fl_show_oneliner(const char *s, int x, int y) +fl_show_oneliner(const char *s, FL_Coord x, FL_Coord y) { int maxw = 0, maxh = 0; Index: lib/scrollbar.c =================================================================== RCS file: /cvsroot/xforms/xforms/lib/scrollbar.c,v retrieving revision 1.6 diff -u -p -r1.6 scrollbar.c --- lib/scrollbar.c 24 Apr 2003 09:35:35 -0000 1.6 +++ lib/scrollbar.c 17 May 2004 21:53:22 -0000 @@ -232,7 +232,7 @@ down_cb(FL_OBJECT * ob, long data) FL_OBJECT * -fl_create_scrollbar(int type, int x, int y, int w, int h, const char *l) +fl_create_scrollbar(int type, FL_Coord x, FL_Coord y, FL_Coord w, FL_Coord h, const char *l) { SPEC *sp; FL_OBJECT *obj; @@ -307,7 +307,7 @@ fl_create_scrollbar(int type, int x, int FL_OBJECT * -fl_add_scrollbar(int type, int x, int y, int w, int h, const char *l) +fl_add_scrollbar(int type, FL_Coord x, FL_Coord y, FL_Coord w, FL_Coord h, const char *l) { FL_OBJECT *ob = fl_create_scrollbar(type, x, y, w, h, l); Index: lib/signal.c =================================================================== RCS file: /cvsroot/xforms/xforms/lib/signal.c,v retrieving revision 1.8 diff -u -p -r1.8 signal.c --- lib/signal.c 30 Mar 2004 13:03:51 -0000 1.8 +++ lib/signal.c 17 May 2004 21:53:23 -0000 @@ -85,7 +85,7 @@ default_signal_handler(int sig) void -fl_add_signal_callback(int s, void (*cb) (int, void *), void *data) +fl_add_signal_callback(int s, FL_SIGNAL_HANDLER cb, void *data) { FL_SIGNAL_REC *sig_rec, *rec = fl_context->signal_rec; Index: lib/tabfolder.c =================================================================== RCS file: /cvsroot/xforms/xforms/lib/tabfolder.c,v retrieving revision 1.10 diff -u -p -r1.10 tabfolder.c --- lib/tabfolder.c 13 Nov 2003 21:56:02 -0000 1.10 +++ lib/tabfolder.c 17 May 2004 21:53:29 -0000 @@ -219,7 +219,7 @@ fl_create_tabfolder(int type, FL_Coord x } FL_OBJECT * -fl_add_tabfolder(int type, int x, int y, int w, int h, const char *l) +fl_add_tabfolder(int type, FL_Coord x, FL_Coord y, FL_Coord w, FL_Coord h, const char *l) { FL_OBJECT *ob = fl_create_tabfolder(type, x, y, w, h, l); SPEC *sp = ob->spec; @@ -745,7 +745,7 @@ fl_get_active_folder_name(FL_OBJECT * ob void -fl_get_folder_area(FL_OBJECT * ob, int *x, int *y, int *w, int *h) +fl_get_folder_area(FL_OBJECT * ob, FL_Coord *x, FL_Coord *y, FL_Coord *w, FL_Coord *h) { SPEC *sp = ob->spec; Index: lib/win.c =================================================================== RCS file: /cvsroot/xforms/xforms/lib/win.c,v retrieving revision 1.6 diff -u -p -r1.6 win.c --- lib/win.c 9 Sep 2003 00:28:25 -0000 1.6 +++ lib/win.c 17 May 2004 21:53:29 -0000 @@ -292,7 +292,7 @@ fl_transient(void) } void -fl_winmove(Window win, int dx, int dy) +fl_winmove(Window win, FL_Coord dx, FL_Coord dy) { if (win) XMoveWindow(flx->display, win, dx, dy); @@ -301,7 +301,7 @@ fl_winmove(Window win, int dx, int dy) } void -fl_winreshape(Window win, int dx, int dy, int w, int h) +fl_winreshape(Window win, FL_Coord dx, FL_Coord dy, FL_Coord w, FL_Coord h) { if (win) XMoveResizeWindow(flx->display, win, dx, dy, w, h); Index: lib/xdraw.c =================================================================== RCS file: /cvsroot/xforms/xforms/lib/xdraw.c,v retrieving revision 1.5 diff -u -p -r1.5 xdraw.c --- lib/xdraw.c 24 Apr 2003 09:35:35 -0000 1.5 +++ lib/xdraw.c 17 May 2004 21:53:29 -0000 @@ -107,7 +107,7 @@ fl_rectangle(int fill, FL_Coord x, FL_Co /* if fill == 0, xp must be 1 more than n */ void -fl_polygon(int fill, FL_POINT * xp, int n, unsigned long col) +fl_polygon(int fill, FL_POINT * xp, int n, FL_COLOR col) { int bw = fl_dithered(fl_vmode) && mono_dither(col); GC gc = flx->gc; Index: lib/xtext.c =================================================================== RCS file: /cvsroot/xforms/xforms/lib/xtext.c,v retrieving revision 1.6 diff -u -p -r1.6 xtext.c --- lib/xtext.c 6 May 2004 10:03:37 -0000 1.6 +++ lib/xtext.c 17 May 2004 21:53:29 -0000 @@ -596,7 +596,7 @@ fl_draw_text_beside(int align, FL_Coord void fl_drw_text_beside(int align, FL_Coord x, FL_Coord y, FL_Coord w, FL_Coord h, - unsigned long c, int style, int size, char *str) + FL_COLOR c, int style, int size, char *str) { int newa, newx, newy, dx = 0, dy = 0; Index: lib/include/Basic.h =================================================================== RCS file: /cvsroot/xforms/xforms/lib/include/Basic.h,v retrieving revision 1.6 diff -u -p -r1.6 Basic.h --- lib/include/Basic.h 9 Sep 2003 00:28:25 -0000 1.6 +++ lib/include/Basic.h 17 May 2004 21:53:29 -0000 @@ -708,10 +708,10 @@ FL_EXPORT void fl_remove_io_callback( /* signals */ typedef void (*FL_SIGNAL_HANDLER) (int, void *); + FL_EXPORT void fl_add_signal_callback( int s, - void (*cb)(int, - void *), + FL_SIGNAL_HANDLER cb, void *data ); @@ -1379,7 +1379,7 @@ FL_EXPORT void fl_drw_text_beside( FL_Coord y, FL_Coord w, FL_Coord h, - unsigned long c, + FL_COLOR c, int style, int size, char *str @@ -1523,7 +1523,7 @@ FL_EXPORT void fl_color( ); FL_EXPORT void fl_bk_color( - unsigned long col + FL_COLOR col ); FL_EXPORT void fl_textcolor( @@ -1531,7 +1531,7 @@ FL_EXPORT void fl_textcolor( ); FL_EXPORT void fl_bk_textcolor( - unsigned long col + FL_COLOR col ); FL_EXPORT void fl_set_gamma( Index: lib/include/XBasic.h =================================================================== RCS file: /cvsroot/xforms/xforms/lib/include/XBasic.h,v retrieving revision 1.3 diff -u -p -r1.3 XBasic.h --- lib/include/XBasic.h 9 Sep 2003 00:28:25 -0000 1.3 +++ lib/include/XBasic.h 17 May 2004 21:53:29 -0000 @@ -226,7 +226,7 @@ FL_EXPORT void fl_polygon( int fill, FL_POINT *xp, int n, - unsigned long col + FL_COLOR col ); #define fl_polyf(p,n,c) fl_polygon(1, p, n, c) @@ -534,16 +534,16 @@ FL_EXPORT void fl_winresize( FL_EXPORT void fl_winmove( Window win, - int dx, - int dy + FL_Coord dx, + FL_Coord dy ); FL_EXPORT void fl_winreshape( Window win, - int dx, - int dy, - int w, - int h + FL_Coord dx, + FL_Coord dy, + FL_Coord w, + FL_Coord h ); FL_EXPORT void fl_winicon( @@ -841,7 +841,7 @@ FL_EXPORT Display *fl_initialize( int *na, char *arg[], const char *appclass, - XrmOptionDescList appopt, + FL_CMD_OPT * appopt, int nappopt ); Index: lib/include/browser.h =================================================================== RCS file: /cvsroot/xforms/xforms/lib/include/browser.h,v retrieving revision 1.2 diff -u -p -r1.2 browser.h --- lib/include/browser.h 10 Apr 2003 20:46:37 -0000 1.2 +++ lib/include/browser.h 17 May 2004 21:53:29 -0000 @@ -58,19 +58,19 @@ FL_BROWSER_TYPE; FL_EXPORT FL_OBJECT *fl_create_browser( int type, - int x, - int y, - int w, - int h, + FL_Coord x, + FL_Coord y, + FL_Coord w, + FL_Coord h, const char *l ); FL_EXPORT FL_OBJECT *fl_add_browser( int type, - int x, - int y, - int w, - int h, + FL_Coord x, + FL_Coord y, + FL_Coord w, + FL_Coord h, const char *l ); Index: lib/include/formbrowser.h =================================================================== RCS file: /cvsroot/xforms/xforms/lib/include/formbrowser.h,v retrieving revision 1.3 diff -u -p -r1.3 formbrowser.h --- lib/include/formbrowser.h 9 Sep 2003 00:28:25 -0000 1.3 +++ lib/include/formbrowser.h 17 May 2004 21:53:29 -0000 @@ -136,10 +136,10 @@ FL_EXPORT int fl_find_formbrowser_form_n FL_EXPORT FL_OBJECT *fl_add_formbrowser( int type, - int x, - int y, - int w, - int h, + FL_Coord x, + FL_Coord y, + FL_Coord w, + FL_Coord h, const char *label ); Index: lib/include/goodies.h =================================================================== RCS file: /cvsroot/xforms/xforms/lib/include/goodies.h,v retrieving revision 1.2 diff -u -p -r1.2 goodies.h --- lib/include/goodies.h 10 Apr 2003 20:46:37 -0000 1.2 +++ lib/include/goodies.h 17 May 2004 21:53:29 -0000 @@ -148,8 +148,8 @@ FL_EXPORT void fl_set_choice_shortcut( FL_EXPORT void fl_show_oneliner( const char *s, - int x, - int y + FL_Coord x, + FL_Coord y ); FL_EXPORT void fl_hide_oneliner( @@ -206,17 +206,17 @@ FD_CMDLOG; #define FL_PID_T long #endif -FL_EXPORT long fl_exe_command( +FL_EXPORT FL_PID_T fl_exe_command( const char *cmd, int block ); FL_EXPORT int fl_end_command( - long pid + FL_PID_T pid ); FL_EXPORT int fl_check_command( - long pid + FL_PID_T pid ); FL_EXPORT FILE *fl_popen( Index: lib/include/scrollbar.h =================================================================== RCS file: /cvsroot/xforms/xforms/lib/include/scrollbar.h,v retrieving revision 1.1 diff -u -p -r1.1 scrollbar.h --- lib/include/scrollbar.h 6 Apr 2003 15:52:40 -0000 1.1 +++ lib/include/scrollbar.h 17 May 2004 21:53:29 -0000 @@ -49,19 +49,19 @@ enum FL_EXPORT FL_OBJECT *fl_create_scrollbar( int type, - int x, - int y, - int w, - int h, + FL_Coord x, + FL_Coord y, + FL_Coord w, + FL_Coord h, const char *l ); FL_EXPORT FL_OBJECT *fl_add_scrollbar( int type, - int x, - int y, - int w, - int h, + FL_Coord x, + FL_Coord y, + FL_Coord w, + FL_Coord h, const char *l ); Index: lib/include/tabfolder.h =================================================================== RCS file: /cvsroot/xforms/xforms/lib/include/tabfolder.h,v retrieving revision 1.3 diff -u -p -r1.3 tabfolder.h --- lib/include/tabfolder.h 9 Sep 2003 00:28:25 -0000 1.3 +++ lib/include/tabfolder.h 17 May 2004 21:53:29 -0000 @@ -56,10 +56,10 @@ FL_EXPORT FL_OBJECT *fl_create_tabfolder FL_EXPORT FL_OBJECT *fl_add_tabfolder( int type, - int x, - int y, - int w, - int h, + FL_Coord x, + FL_Coord y, + FL_Coord w, + FL_Coord h, const char *l ); @@ -147,10 +147,10 @@ FL_EXPORT const char *fl_get_active_fold FL_EXPORT void fl_get_folder_area( FL_OBJECT *ob, - int *x, - int *y, - int *w, - int *h + FL_Coord *x, + FL_Coord *y, + FL_Coord *w, + FL_Coord *h ); Index: lib/include/xyplot.h =================================================================== RCS file: /cvsroot/xforms/xforms/lib/include/xyplot.h,v retrieving revision 1.3 diff -u -p -r1.3 xyplot.h --- lib/include/xyplot.h 13 May 2004 17:01:14 -0000 1.3 +++ lib/include/xyplot.h 17 May 2004 21:53:29 -0000 @@ -269,7 +269,7 @@ FL_EXPORT void fl_replace_xyplot_point( double y ); -/* Replace the value of a particular point in dataset setID, +/* Replace the value of a particular point in dataset setID, * where setID=0 is the first data set. * This routine is an extension of fl_replace_xyplot_point * which acts on the first dataset only.