Fixed doxygen warnings and added a new documentation module "Callback

function typedefs" so that they appear in an own documentation group.


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@7334 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
This commit is contained in:
Albrecht Schlosser
2010-03-25 14:37:46 +00:00
parent 5591315e17
commit ee2935de68
4 changed files with 24 additions and 4 deletions
+18
View File
@@ -52,6 +52,22 @@ class Fl_Window;
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 @@ typedef void (*Fl_Atclose_Handler)(Fl_Window *window, void *data);
/** 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.
+3 -3
View File
@@ -66,7 +66,7 @@ static void call_idle() {
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 @@ void Fl::add_idle(void (*cb)(void*), void* data) {
/**
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 @@ int Fl::has_idle(void (*cb)(void*), void* data) {
/**
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;
+1 -1
View File
@@ -277,7 +277,7 @@ int Fl::arg(int argc, char **argv, int &i) {
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) {
+2
View File
@@ -138,11 +138,13 @@ Fl_Widget *fl_check_forms() {
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: