Fix doxygen doc generation and document platform specific files

Pure platform specific files like 'src/*_win32.cxx' are excluded from
doxygen processing and don't need doxygen specific guard macros.

Document this fact prominently at the beginning of each file.

Fix exclude patterns and remove duplicates from Doxyfile.in.
This commit is contained in:
Albrecht Schlosser 2023-05-09 22:36:41 +02:00
parent fe0fcecd61
commit a4c6c18b3d
7 changed files with 33 additions and 27 deletions

View File

@ -614,12 +614,6 @@ RECURSIVE = YES
# subdirectory from a directory tree whose root is specified with the INPUT tag. # subdirectory from a directory tree whose root is specified with the INPUT tag.
EXCLUDE = @FLTK_SOURCE_DIR@/src/drivers/ EXCLUDE = @FLTK_SOURCE_DIR@/src/drivers/
EXCLUDE += @FLTK_SOURCE_DIR@/src/fl_dnd_win32.cxx
EXCLUDE += @FLTK_SOURCE_DIR@/src/fl_dnd_x.cxx
EXCLUDE += @FLTK_SOURCE_DIR@/src/fl_font_mac.cxx
EXCLUDE += @FLTK_SOURCE_DIR@/src/fl_font_win32.cxx
EXCLUDE += @FLTK_SOURCE_DIR@/src/Fl_get_key_mac.cxx
EXCLUDE += @FLTK_SOURCE_DIR@/src/Fl_get_key_win32.cxx
# The EXCLUDE_SYMLINKS tag can be used select whether or not files or # The EXCLUDE_SYMLINKS tag can be used select whether or not files or
# directories that are symbolic links (a Unix filesystem feature) are excluded # directories that are symbolic links (a Unix filesystem feature) are excluded
@ -633,15 +627,17 @@ EXCLUDE_SYMLINKS = NO
# against the file with absolute path, so to exclude all test directories # against the file with absolute path, so to exclude all test directories
# for example use the pattern */test/* # for example use the pattern */test/*
EXCLUDE_PATTERNS = @FLTK_SOURCE_DIR@/src/*_win32.cxx # Exclude pure platform specific source files
EXCLUDE_PATTERNS += @FLTK_SOURCE_DIR@/src/*_mac.cxx
EXCLUDE_PATTERNS += @FLTK_SOURCE_DIR@/src/*_x.cxx
# Exclude Wayland specific files that are generated in the source tree EXCLUDE_PATTERNS = */src/*_win32.cxx
# by configure + make EXCLUDE_PATTERNS += */src/*_mac.cxx
EXCLUDE_PATTERNS += */src/*_x.cxx
EXCLUDE_PATTERNS += @FLTK_SOURCE_DIR@/src/xdg* # Exclude Wayland specific files generated in the source tree
EXCLUDE_PATTERNS += @FLTK_SOURCE_DIR@/src/text-input* # by configure + make (but not by CMake)
EXCLUDE_PATTERNS += */src/xdg*
EXCLUDE_PATTERNS += */src/text-input*
# The EXCLUDE_SYMBOLS tag can be used to specify one or more symbol names # The EXCLUDE_SYMBOLS tag can be used to specify one or more symbol names
# (namespaces, classes, functions, etc.) that should be excluded from the # (namespaces, classes, functions, etc.) that should be excluded from the

View File

@ -1,7 +1,7 @@
// //
// MacOS keyboard state routines for the Fast Light Tool Kit (FLTK). // MacOS keyboard state routines for the Fast Light Tool Kit (FLTK).
// //
// Copyright 1998-2018 by Bill Spitzak and others. // Copyright 1998-2023 by Bill Spitzak and others.
// //
// This library is free software. Distribution and use rights are outlined in // This library is free software. Distribution and use rights are outlined in
// the file "COPYING" which should have been included with this file. If this // the file "COPYING" which should have been included with this file. If this
@ -14,6 +14,9 @@
// https://www.fltk.org/bugs.php // https://www.fltk.org/bugs.php
// //
// Note: this file contains platform specific code and will therefore
// not be processed by doxygen (see Doxyfile.in).
// Return the current state of a key. Keys are named by fltk symbols, // Return the current state of a key. Keys are named by fltk symbols,
// which are actually X keysyms. So this has to translate to macOS // which are actually X keysyms. So this has to translate to macOS
// symbols. // symbols.

View File

@ -1,7 +1,7 @@
// //
// Windows keyboard state routines for the Fast Light Tool Kit (FLTK). // Windows keyboard state routines for the Fast Light Tool Kit (FLTK).
// //
// Copyright 1998-2018 by Bill Spitzak and others. // Copyright 1998-2023 by Bill Spitzak and others.
// //
// This library is free software. Distribution and use rights are outlined in // This library is free software. Distribution and use rights are outlined in
// the file "COPYING" which should have been included with this file. If this // the file "COPYING" which should have been included with this file. If this
@ -14,6 +14,9 @@
// https://www.fltk.org/bugs.php // https://www.fltk.org/bugs.php
// //
// Note: this file contains platform specific code and will therefore
// not be processed by doxygen (see Doxyfile.in).
// Return the current state of a key. Keys are named by fltk symbols, // Return the current state of a key. Keys are named by fltk symbols,
// which are actually X keysyms. So this has to translate to Windows // which are actually X keysyms. So this has to translate to Windows
// VK_x symbols. // VK_x symbols.

View File

@ -14,12 +14,13 @@
// https://www.fltk.org/bugs.php // https://www.fltk.org/bugs.php
// //
// Note: this file contains platform specific code and will therefore
// not be processed by doxygen (see Doxyfile.in).
// This file contains Windows-specific code for FLTK which is always linked // This file contains Windows-specific code for FLTK which is always linked
// in. Search other files for "_WIN32" or filenames ending in _win32.cxx // in. Search other files for "_WIN32" or filenames ending in _win32.cxx
// for other system-specific code. // for other system-specific code.
#if defined(_WIN32) && !defined(FL_DOXYGEN)
/* We require Windows 2000 features (e.g. VK definitions) */ /* We require Windows 2000 features (e.g. VK definitions) */
# if !defined(WINVER) || (WINVER < 0x0500) # if !defined(WINVER) || (WINVER < 0x0500)
# ifdef WINVER # ifdef WINVER
@ -2741,5 +2742,3 @@ void Fl_WinAPI_Window_Driver::capture_titlebar_and_borders(Fl_RGB_Image *&top, F
fl_graphics_driver->gc(save_gc); fl_graphics_driver->gc(save_gc);
Fl_Surface_Device::pop_current(); Fl_Surface_Device::pop_current();
} }
#endif // defined(_WIN32) and !defined(FL_DOXYGEN)

View File

@ -14,7 +14,8 @@
// https://www.fltk.org/bugs.php // https://www.fltk.org/bugs.php
// //
#if !defined(FL_DOXYGEN) // Note: this file contains platform specific code and will therefore
// not be processed by doxygen (see Doxyfile.in).
# ifndef FLTK_CONSOLIDATE_MOTION # ifndef FLTK_CONSOLIDATE_MOTION
# define FLTK_CONSOLIDATE_MOTION 0 # define FLTK_CONSOLIDATE_MOTION 0
@ -3026,5 +3027,3 @@ void Fl_X11_Window_Driver::show() {
XMapRaised(fl_display, fl_xid(pWindow)); XMapRaised(fl_display, fl_xid(pWindow));
} }
} }
#endif // !defined(FL_DOXYGEN)

View File

@ -1,7 +1,7 @@
// //
// Drag & Drop code for the Fast Light Tool Kit (FLTK). // Drag & Drop code for the Fast Light Tool Kit (FLTK).
// //
// Copyright 1998-2022 by Bill Spitzak and others. // Copyright 1998-2023 by Bill Spitzak and others.
// //
// This library is free software. Distribution and use rights are outlined in // This library is free software. Distribution and use rights are outlined in
// the file "COPYING" which should have been included with this file. If this // the file "COPYING" which should have been included with this file. If this
@ -14,6 +14,9 @@
// https://www.fltk.org/bugs.php // https://www.fltk.org/bugs.php
// //
// Note: this file contains platform specific code and will therefore
// not be processed by doxygen (see Doxyfile.in).
// This file contains Windows-specific code for FLTK which is always linked // This file contains Windows-specific code for FLTK which is always linked
// in. Search other files for "_WIN32" or filenames ending in _win32.cxx // in. Search other files for "_WIN32" or filenames ending in _win32.cxx
// for other system-specific code. // for other system-specific code.

View File

@ -1,7 +1,7 @@
// //
// Drag & Drop code for the Fast Light Tool Kit (FLTK). // Drag & Drop code for the Fast Light Tool Kit (FLTK).
// //
// Copyright 1998-2021 by Bill Spitzak and others. // Copyright 1998-2023 by Bill Spitzak and others.
// //
// This library is free software. Distribution and use rights are outlined in // This library is free software. Distribution and use rights are outlined in
// the file "COPYING" which should have been included with this file. If this // the file "COPYING" which should have been included with this file. If this
@ -14,6 +14,9 @@
// https://www.fltk.org/bugs.php // https://www.fltk.org/bugs.php
// //
// Note: this file contains platform specific code and will therefore
// not be processed by doxygen (see Doxyfile.in).
#include <FL/Fl.H> #include <FL/Fl.H>
#include <FL/Fl_Window.H> #include <FL/Fl_Window.H>
#include <FL/platform.H> #include <FL/platform.H>