Skip to content

Commit

Permalink
Fix Doxygen warnings.
Browse files Browse the repository at this point in the history
There was one obvious warning in src/fl_read_image.cxx, but others
have to do with incomplete code and platform specific definitions.

I'm not entirely happy with these changes. Temporary changes have been
marked with 'FIXME' and should be removed later if possible.


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@11547 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
  • Loading branch information
Albrecht Schlosser committed Apr 6, 2016
1 parent 9fa4059 commit f120334
Show file tree
Hide file tree
Showing 8 changed files with 39 additions and 8 deletions.
5 changes: 3 additions & 2 deletions FL/Fl.H
Expand Up @@ -168,6 +168,7 @@ public: // run time information about compile time configuration
/** @} */

public: // should be private!

#ifndef FL_DOXYGEN
static int e_number;
static int e_x;
Expand Down Expand Up @@ -197,8 +198,8 @@ public: // should be private!
static void reset_marked_text(); // resets marked text
static void insertion_point_location(int x, int y, int height); // sets window coordinates & height of insertion point
#endif // FL_DOXYGEN


/**
If true then flush() will do something.
*/
Expand Down
2 changes: 1 addition & 1 deletion FL/Fl_Window.H
Expand Up @@ -351,7 +351,7 @@ public:
void icon(const Fl_RGB_Image*);
void icons(const Fl_RGB_Image*[], int);

#ifdef WIN32
#if defined(WIN32) && !defined(FL_DOXYGEN)
typedef struct HICON__* HICON;
// These 2 member functions break the driver model but are kept for back compatibility.
// They are implemented in Fl_WinAPI_Window_Driver.cxx
Expand Down
16 changes: 15 additions & 1 deletion src/Fl.cxx
Expand Up @@ -1888,14 +1888,28 @@ int Fl::dnd()
return Fl::screen_driver()->dnd();
}

#if !defined(FL_DOXYGEN) // FIXME - silence Doxygen warnings

/**
Resets marked text.
\todo Please explain what exactly this does and how to use it.
*/
void Fl::reset_marked_text() {
Fl::screen_driver()->reset_marked_text();
}

void Fl::insertion_point_location(int x, int y, int height) { // sets window coordinates & height of insertion point
/**
Sets window coordinates and height of insertion point.
\todo Please explain what exactly this does and how to use it.
*/
void Fl::insertion_point_location(int x, int y, int height) {
Fl::screen_driver()->insertion_point_location(x, y, height);
}

#endif // !defined(FL_DOXYGEN) // FIXME - silence Doxygen warnings

int Fl::event_key(int k) {
return system_driver()->event_key(k);
}
Expand Down
4 changes: 4 additions & 0 deletions src/drivers/PicoAndroid/Fl_PicoAndroid_Screen_Driver.cxx
Expand Up @@ -458,6 +458,8 @@ Fl_Fontdesc* fl_fonts = NULL;
Undefined symbols for architecture x86_64:
*/

#if !defined(FL_DOXYGEN) // *FIXME* silence Doxygen warnings

void fl_set_spot(int, int, int, int, int, int, Fl_Window*) { }
void fl_reset_spot() { }
const char *fl_filename_name(char const*) { return 0; }
Expand Down Expand Up @@ -533,6 +535,8 @@ Fl_Font_Descriptor::~Fl_Font_Descriptor()
{
}

#endif // !defined(FL_DOXYGEN)

#if 0

ld: error: ./obj/local/armeabi-v7a/objs/native-activity/src/drivers/PicoAndroid/Fl_PicoAndroid_Screen_Driver.o: multiple definition of 'Fl_Window::make_current()'
Expand Down
3 changes: 3 additions & 0 deletions src/drivers/PicoAndroid/Fl_PicoAndroid_Window_Driver.cxx
Expand Up @@ -108,12 +108,15 @@ void Fl_PicoAndroid_Window_Driver::flush_single()
scr->drawFrame();
}

#if !defined(FL_DOXYGEN) // FIXME - silence Doxygen warning

void Fl_X::flush()
{
w->flush();
}

#endif // !defined(FL_DOXYGEN) // FIXME - silence Doxygen warning


#if 0
void Fl_PicoAndroid_Window_Driver::flush()
Expand Down
4 changes: 4 additions & 0 deletions src/drivers/PicoSDL/Fl_PicoSDL_Screen_Driver.cxx
Expand Up @@ -145,6 +145,8 @@ double Fl_PicoSDL_Screen_Driver::wait(double time_to_wait)
Undefined symbols for architecture x86_64:
*/

#if !defined(FL_DOXYGEN) // FIXME silence Doxygen warnings

void fl_set_spot(int, int, int, int, int, int, Fl_Window*) { }
void fl_reset_spot() { }
const char *fl_filename_name(char const*) { return 0; }
Expand Down Expand Up @@ -213,6 +215,8 @@ void Fl_X::flush()
w->flush();
}

#endif // !defined(FL_DOXYGEN) // FIXME silence Doxygen warnings


//
// End of "$Id: Fl_PicoSDL_Screen_Driver.cxx 11253 2016-03-01 00:54:21Z matt $".
Expand Down
7 changes: 6 additions & 1 deletion src/drivers/WinAPI/Fl_WinAPI_Window_Driver.cxx
Expand Up @@ -360,6 +360,8 @@ void Fl_WinAPI_Window_Driver::free_icons() {
}


#if !defined(FL_DOXYGEN) // FIXME - silence Doxygen warnings

/** Sets the window icons using Windows' native HICON icon handles.
The given icons are copied. You can free the icons immediately after
Expand All @@ -381,7 +383,6 @@ void Fl_Window::icons(HICON big_icon, HICON small_icon)
Fl_X::i(this)->set_icons();
}


/** Sets the default window icons.
Convenience function to set the default icons using Windows'
Expand All @@ -405,6 +406,7 @@ void Fl_Window::default_icons(HICON big_icon, HICON small_icon) {
Fl_X::set_default_icons(big_icon, small_icon);
}

#endif // !defined(FL_DOXYGEN) // FIXME - silence Doxygen warnings

void Fl_WinAPI_Window_Driver::wait_for_expose() {
if (!shown()) return;
Expand Down Expand Up @@ -531,6 +533,7 @@ void Fl_WinAPI_Window_Driver::unmap() {
ShowWindow(fl_xid(pWindow), SW_HIDE);
}

#if !defined(FL_DOXYGEN) // FIXME - silence Doxygen warning

void Fl_X::make_fullscreen(int X, int Y, int W, int H) {
int top, bottom, left, right;
Expand Down Expand Up @@ -565,6 +568,8 @@ void Fl_X::make_fullscreen(int X, int Y, int W, int H) {
SetWindowPos(xid, HWND_TOP, X, Y, W, H, SWP_NOSENDCHANGING | SWP_FRAMECHANGED);
}

#endif // !defined(FL_DOXYGEN) // FIXME - silence Doxygen warning


void Fl_WinAPI_Window_Driver::fullscreen_on() {
pWindow->_set_fullscreen();
Expand Down
6 changes: 3 additions & 3 deletions src/fl_read_image.cxx
Expand Up @@ -3,7 +3,7 @@
//
// X11 image reading routines for the Fast Light Tool Kit (FLTK).
//
// Copyright 1998-2014 by Bill Spitzak and others.
// Copyright 1998-2016 by Bill Spitzak and others.
//
// 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
Expand Down Expand Up @@ -36,8 +36,8 @@
and the value that is placed in the alpha channel. If 0, no alpha
channel is generated.
*/
uchar *fl_read_image(uchar *p, int X, int Y, int w, int h, int alpha) {
return Fl::screen_driver()->read_image(p, X, Y, w, h, alpha);
uchar *fl_read_image(uchar *p, int X, int Y, int W, int H, int alpha) {
return Fl::screen_driver()->read_image(p, X, Y, W, H, alpha);
}

//
Expand Down

0 comments on commit f120334

Please sign in to comment.