Doxygen for haiku.h/haiku.cpp
This commit is contained in:
parent
8e4abd357b
commit
6a575ed491
@ -17,8 +17,12 @@
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with Grafx2; if not, see <http://www.gnu.org/licenses/>
|
||||
*/
|
||||
#include "struct.h"
|
||||
|
||||
/** @file haiku.cpp
|
||||
* Definition of Haiku specific functions.
|
||||
*
|
||||
* Haiku API is C++, so this is C++ code exporting as C symbols
|
||||
* to be called by GrafX2 C code.
|
||||
*/
|
||||
#ifdef __HAIKU__
|
||||
#include <Clipboard.h>
|
||||
#include <Entry.h>
|
||||
@ -26,8 +30,7 @@
|
||||
|
||||
#include <string.h>
|
||||
|
||||
extern "C" qword haiku_get_free_space(char* path);
|
||||
extern "C" char* haiku_get_clipboard();
|
||||
#include "haiku.h"
|
||||
|
||||
qword haiku_get_free_space(char* path)
|
||||
{
|
||||
@ -38,6 +41,9 @@ qword haiku_get_free_space(char* path)
|
||||
return (qword) disk.Capacity();
|
||||
}
|
||||
|
||||
/**
|
||||
* @return NULL or a string that should be free()'d by the caller
|
||||
*/
|
||||
char* haiku_get_clipboard()
|
||||
{
|
||||
if (be_clipboard->Lock())
|
||||
|
||||
16
src/haiku.h
16
src/haiku.h
@ -1,15 +1,21 @@
|
||||
#include "struct.h"
|
||||
|
||||
/*
|
||||
/** @file haiku.h
|
||||
* Declarations of HAIKU specific functions.
|
||||
*
|
||||
* Haiku specific code was moved here, because the API is C++.
|
||||
* It can't be compiled in the usual C files.
|
||||
* So we provide a C wrapper to the functons we need.
|
||||
* So we provide a C wrapper to the functions we need.
|
||||
*/
|
||||
|
||||
#ifndef __HAIKU_H
|
||||
#define __HAIKU_H
|
||||
#include "struct.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
qword haiku_get_free_space(char* path);
|
||||
char* haiku_get_clipboard();
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
@ -1974,7 +1974,7 @@ INCLUDE_FILE_PATTERNS =
|
||||
# recursively expanded use the := operator instead of the = operator.
|
||||
# This tag requires that the tag ENABLE_PREPROCESSING is set to YES.
|
||||
|
||||
PREDEFINED = __attribute__(x)=
|
||||
PREDEFINED = __attribute__(x)= __HAIKU__
|
||||
|
||||
# If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then this
|
||||
# tag can be used to specify a list of macro names that should be expanded. The
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user