Mercurial > hg > octave-nkf
changeset 15507:b9b9795a7cd9
build: Build FLTK-associated DOCSTRINGS even when HAVE_FLTK is 0 (bug #37541).
* libinterp/dldfcn/__init_fltk__.cc(F__init_fltk__, F__fltk_redraw__,
F__fltk_maxtime__, F__have_fltk__): Define docstrings for these functions.
Use '#ifdef HAVE_FLTK' around function bodies.
* libinterp/dldfcn/__fltk_uigetfile__.cc(F__fltk_uigetfile__): Define
docstring for function. Use '#ifdef HAVE_FLTK' around function body..
author | Rik <rik@octave.org> |
---|---|
date | Thu, 11 Oct 2012 19:13:29 -0700 |
parents | b3762b89c3c0 |
children | cea08e743c2c |
files | libinterp/dldfcn/__fltk_uigetfile__.cc libinterp/dldfcn/__init_fltk__.cc |
diffstat | 2 files changed, 54 insertions(+), 19 deletions(-) [+] |
line wrap: on
line diff
--- a/libinterp/dldfcn/__fltk_uigetfile__.cc +++ b/libinterp/dldfcn/__fltk_uigetfile__.cc @@ -24,7 +24,7 @@ #include <config.h> #endif -#if defined (HAVE_FLTK) +#ifdef HAVE_FLTK #ifdef WIN32 #define WIN32_LEAN_AND_MEAN @@ -39,6 +39,8 @@ // headers which may require Octave's Complex typedef. #undef Complex +#endif + #include "defun-dld.h" #include "file-ops.h" @@ -48,6 +50,7 @@ Undocumented internal function.\n\ @end deftypefn") { +#ifdef HAVE_FLTK // Expected argument list: // // args(0) ... FileFilter in fltk format @@ -132,6 +135,10 @@ Fl::flush (); return retval; +#else + error ("__fltk_uigetfile__: not available without OpenGL and FLTK libraries"); + return octave_value (); +#endif } /* @@ -139,4 +146,3 @@ %!assert (1) */ -#endif
--- a/libinterp/dldfcn/__init_fltk__.cc +++ b/libinterp/dldfcn/__init_fltk__.cc @@ -38,7 +38,7 @@ #include "defun-dld.h" #include "error.h" -#if defined (HAVE_FLTK) +#ifdef HAVE_FLTK #include <map> #include <set> @@ -1984,10 +1984,17 @@ } }; +#endif + // Initialize the fltk graphics toolkit. -DEFUN_DLD (__init_fltk__, , , "") +DEFUN_DLD (__init_fltk__, , , + "-*- texinfo -*-\n\ +@deftypefn {Loadable Function} {} __init_fltk__ ()\n\ +Undocumented internal function.\n\ +@end deftypefn") { +#ifdef HAVE_FLTK if (! toolkit_loaded) { mlock (); @@ -2000,20 +2007,36 @@ args(0) = "__fltk_redraw__"; feval ("add_input_event_hook", args, 0); } - - octave_value retval; - return retval; -} - -DEFUN_DLD (__fltk_redraw__, , , "") -{ - __fltk_redraw__ (); +#else + error ("__init_fltk__: not available without OpenGL and FLTK libraries"); +#endif return octave_value (); } -DEFUN_DLD (__fltk_maxtime__, args, ,"") +DEFUN_DLD (__fltk_redraw__, , , + "-*- texinfo -*-\n\ +@deftypefn {Loadable Function} {} __fltk_redraw__ ()\n\ +Undocumented internal function.\n\ +@end deftypefn") { +#ifdef HAVE_FLTK + __fltk_redraw__ (); +#else + error ("__fltk_redraw__: not available without OpenGL and FLTK libraries"); +#endif + + return octave_value (); +} + +DEFUN_DLD (__fltk_maxtime__, args, , + "-*- texinfo -*-\n\ +@deftypefn {Loadable Function} {@var{maxtime} =} __fltk_maxtime__ ()\n\ +@deftypefnx {Loadable Function} {} __fltk_maxtime__ (@var{maxtime})\n\ +Undocumented internal function.\n\ +@end deftypefn") +{ +#ifdef HAVE_FLTK octave_value retval = fltk_maxtime; if (args.length () == 1) @@ -2025,15 +2048,21 @@ } return retval; +#else + error ("__fltk_maxtime__: not available without OpenGL and FLTK libraries"); + return octave_value (); +#endif } -#endif - -DEFUN_DLD (__have_fltk__, , , "") +DEFUN_DLD (__have_fltk__, , , + "-*- texinfo -*-\n\ +@deftypefn {Loadable Function} {@var{FLTK_available} =} __have_fltk__ ()\n\ +Undocumented internal function.\n\ +@end deftypefn") { octave_value retval; -#if defined (HAVE_FLTK) +#ifdef HAVE_FLTK retval = true; #else retval = false; @@ -2059,7 +2088,7 @@ @seealso{gui_mode}\n\ @end deftypefn") { -#if defined (HAVE_FLTK) +#ifdef HAVE_FLTK octave_value retval = wheel_zoom_speed; if (args.length () == 1) @@ -2099,7 +2128,7 @@ @seealso{mouse_wheel_zoom}\n\ @end deftypefn") { -#if defined (HAVE_FLTK) +#ifdef HAVE_FLTK caseless_str mode_str; if (gui_mode == pan_zoom)