Author: AlbrechtS
Date: 2010-03-25 07:37:46 -0700 (Thu, 25 Mar 2010)
New Revision: 7334
Log:
Fixed doxygen warnings and added a new documentation module "Callback
function typedefs" so that they appear in an own documentation group.
Modified:
branches/branch-1.3/FL/Fl.H
branches/branch-1.3/src/Fl_add_idle.cxx
branches/branch-1.3/src/Fl_arg.cxx
branches/branch-1.3/src/forms_compatability.cxx
Modified: branches/branch-1.3/FL/Fl.H
===================================================================
--- branches/branch-1.3/FL/Fl.H 2010-03-25 14:35:45 UTC (rev 7333)
+++ branches/branch-1.3/FL/Fl.H 2010-03-25 14:37:46 UTC (rev 7334)
@@ -52,6 +52,22 @@
class Fl_Image;
struct Fl_Label;
+
+/** \defgroup callback_functions Callback function typedefs
+ \brief Typedefs for callback or handler functions passed as function
parameters.
+
+ FLTK uses callback functions as parameters for some function calls, e.g. to
+ set up global event handlers (Fl::add_handler()), to add a timeout handler
+ (Fl::add_timeout()), and many more.
+
+ The typedefs defined in this group describe the function parameters used
to set
+ up or clear the callback functions and should also be referenced to define
the
+ callback function to handle such events in the user's code.
+
+ \see Fl::add_handler(), Fl::add_timeout(), Fl::repeat_timeout(),
+ Fl::remove_timeout() and others
+ @{ */
+
/** signature of some label drawing functions passed as parameters */
typedef void (Fl_Label_Draw_F)(const Fl_Label *label, int x, int y, int w, int
h, Fl_Align align);
@@ -88,6 +104,8 @@
/** signature of args functions passed as parameters */
typedef int (*Fl_Args_Handler)(int argc, char **argv, int &i);
+/** @} */ /* group callback_functions */
+
/**
The Fl is the FLTK global (static) containing
state information and global methods for the current application.
Modified: branches/branch-1.3/src/Fl_add_idle.cxx
===================================================================
--- branches/branch-1.3/src/Fl_add_idle.cxx 2010-03-25 14:35:45 UTC (rev
7333)
+++ branches/branch-1.3/src/Fl_add_idle.cxx 2010-03-25 14:37:46 UTC (rev
7334)
@@ -66,7 +66,7 @@
FLTK will not recursively call the idle callback.
*/
-void Fl::add_idle(void (*cb)(void*), void* data) {
+void Fl::add_idle(Fl_Idle_Handler cb, void* data) {
idle_cb* p = freelist;
if (p) freelist = p->next;
else p = new idle_cb;
@@ -86,7 +86,7 @@
/**
Returns true if the specified idle callback is currently installed.
*/
-int Fl::has_idle(void (*cb)(void*), void* data) {
+int Fl::has_idle(Fl_Idle_Handler cb, void* data) {
idle_cb* p = first;
if (!p) return 0;
for (;; p = p->next) {
@@ -98,7 +98,7 @@
/**
Removes the specified idle callback, if it is installed.
*/
-void Fl::remove_idle(void (*cb)(void*), void* data) {
+void Fl::remove_idle(Fl_Idle_Handler cb, void* data) {
idle_cb* p = first;
if (!p) return;
idle_cb* l = last;
Modified: branches/branch-1.3/src/Fl_arg.cxx
===================================================================
--- branches/branch-1.3/src/Fl_arg.cxx 2010-03-25 14:35:45 UTC (rev 7333)
+++ branches/branch-1.3/src/Fl_arg.cxx 2010-03-25 14:37:46 UTC (rev 7334)
@@ -277,7 +277,7 @@
Fl::help pointer.
*/
-int Fl::args(int argc, char** argv, int& i, int (*cb)(int,char**,int&)) {
+int Fl::args(int argc, char** argv, int& i, Fl_Args_Handler cb) {
arg_called = 1;
i = 1; // skip argv[0]
while (i < argc) {
Modified: branches/branch-1.3/src/forms_compatability.cxx
===================================================================
--- branches/branch-1.3/src/forms_compatability.cxx 2010-03-25 14:35:45 UTC
(rev 7333)
+++ branches/branch-1.3/src/forms_compatability.cxx 2010-03-25 14:37:46 UTC
(rev 7334)
@@ -138,11 +138,13 @@
void fl_set_graphics_mode(int /*r*/,int /*d*/) {}
+#ifndef FL_DOXYGEN // FIXME: suppress doxygen warning
void Fl_FormsText::draw() {
draw_box();
align(align()|FL_ALIGN_INSIDE); // questionable method of compatibility
draw_label();
}
+#endif
// Create a forms button by selecting correct fltk subclass:
_______________________________________________
fltk-commit mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk-commit