Skip to content

Commit

Permalink
Update App Kit Documentation.
Browse files Browse the repository at this point in the history
The biggest change is the addition of \since to each method. I've gone
through old versions of the BeBook and documented what version of BeOS
each method was introduced in. I'm only counting production releases
so I'm starting with BeOS R3 ignoring all DR and PR releases. Likewise,
all methods new to Haiku are listed as being introduced \since Haiku R1
ignoring alpha releases.
  • Loading branch information
jscipione committed Jun 11, 2014
1 parent 1c52b28 commit ac9714d
Show file tree
Hide file tree
Showing 8 changed files with 1,803 additions and 768 deletions.
169 changes: 124 additions & 45 deletions docs/user/app/Application.dox

Large diffs are not rendered by default.

60 changes: 50 additions & 10 deletions docs/user/app/Clipboard.dox
@@ -1,14 +1,14 @@
/*
* Copyright 2011 Haiku, Inc. All rights reserved.
* Copyright 2011-2014 Haiku, Inc. All rights reserved.
* Distributed under the terms of the MIT License.
*
* Authors:
* Gabe Yoder, gyoder@stny.rr.com
* John Scipione, jscipione@gmail.com
*
* Corresponds to:
* headers/os/app/Clipboard.h rev 42274
* src/kits/app/Clipboard.cpp rev 42274
* headers/os/app/Clipboard.h hrev47355
* src/kits/app/Clipboard.cpp hrev47355
*/


Expand All @@ -23,6 +23,8 @@
/*!
\var be_clipboard
\brief Global system clipboard object.

\since BeOS R3
*/


Expand Down Expand Up @@ -97,24 +99,30 @@ if (be_clipboard->Lock()) {
} else
fprintf(stderr, "could not lock clipboard.\n");
\endcode

\since BeOS R3
*/


/*!
\fn BClipboard::BClipboard(const char *name, bool transient = false)
\fn BClipboard::BClipboard(const char* name, bool transient = false)
\brief Create a BClipboard object with the given \a name.

If the \a name parameter is \c NULL then the "system" BClipboard object
is constructed instead.

\param name The \a name of the clipboard.
\param transient If \c true, lose data after a reboot (currently unused).

\since BeOS R3
*/


/*!
\fn BClipboard::~BClipboard()
\brief Destroys the BClipboard object. The clipboard data is not destroyed.

\since BeOS R3
*/


Expand All @@ -123,11 +131,13 @@ if (be_clipboard->Lock()) {
\brief Returns the name of the BClipboard object.

\returns The name of the clipboard.

\since BeOS R3
*/


/*!
\name Commit Count Methods
\name Commit Count
*/


Expand All @@ -147,6 +157,8 @@ if (be_clipboard->Lock()) {
\return The number of commits to the clipboard.

\sa SystemCount()

\since BeOS R5
*/


Expand All @@ -164,14 +176,16 @@ if (be_clipboard->Lock()) {
\return The number of commits to the clipboard.

\sa LocalCount()

\since BeOS R5
*/


//! @}


/*!
\name Monitoring Methods
\name Monitoring
*/


Expand All @@ -190,6 +204,8 @@ if (be_clipboard->Lock()) {
\retval B_ERROR An error occured.

\sa StopWatching()

\since BeOS R5
*/


Expand All @@ -202,14 +218,16 @@ if (be_clipboard->Lock()) {
\retval B_ERROR An error occurred.

\sa StartWatching()

\since BeOS R5
*/


//! @}


/*!
\name Locking Methods
\name Locking
*/


Expand All @@ -219,13 +237,15 @@ if (be_clipboard->Lock()) {
/*!
\fn bool BClipboard::Lock()
\brief Locks the clipboard so that no other tread can read from it or
write to it.
write to it.

You should call Lock() before reading or writing to the clipboard.

\returns \c true if the clipboard was locked, \c false otherwise.

\sa Unlock()

\since BeOS R3
*/


Expand All @@ -234,6 +254,8 @@ if (be_clipboard->Lock()) {
\brief Unlocks the clipboard.

\sa Lock()

\since BeOS R3
*/


Expand All @@ -242,14 +264,16 @@ if (be_clipboard->Lock()) {
\brief Returns whether or not the clipboard is locked.

\returns \c true if the clipboard is locked, \c false if it is unlocked.

\since BeOS R5
*/


//! @}


/*!
\name Clipboard Data Transaction Methods
\name Clipboard Data Transaction
*/


Expand All @@ -262,20 +286,26 @@ if (be_clipboard->Lock()) {

You should call Clear() before adding new data to the BClipboard object.

\return A status code.
\retval B_OK Everything went find.
\retval B_NOT_ALLOWED The clipboard is not locked.
\retval B_NO_MEMORY Ran out of memory initializing the data message.
\retval B_ERROR Another error occurred.

\since BeOS R3
*/


/*!
\fn status_t BClipboard::Commit()
\brief Commits the clipboard data to the BClipboard object.

\return A status code.
\retval B_OK Everything went find.
\retval B_NOT_ALLOWED The clipboard is not locked.
\retval B_ERROR Another error occurred.

\since BeOS R3
*/


Expand All @@ -287,9 +317,12 @@ if (be_clipboard->Lock()) {
\param failIfChanged Whether or not to fail to commit the changes
if there is a change in the clipboard data.

\return A status code.
\retval B_OK Everything went find.
\retval B_NOT_ALLOWED The clipboard is not locked.
\retval B_ERROR Another error occurred.

\since BeOS R5
*/


Expand All @@ -301,18 +334,21 @@ if (be_clipboard->Lock()) {
clipboard data message and then decide to revert the change instead of
committing it.

\return A status code.
\retval B_OK Everything went find.
\retval B_NOT_ALLOWED The clipboard is not locked.
\retval B_NO_MEMORY Ran out of memory initializing the data message.
\retval B_ERROR Another error occurred.

\since BeOS R5
*/


//! @}


/*!
\name Clipboard Data Message Methods
\name Clipboard Data Message
*/


Expand All @@ -328,6 +364,8 @@ if (be_clipboard->Lock()) {

\returns A BMessenger object that targets the application that last
modified the clipboard.

\since BeOS R3
*/


Expand All @@ -340,6 +378,8 @@ if (be_clipboard->Lock()) {

\returns A pointer to the BMessage object that holds the clipboard
data or \c NULL if the clipboard is not locked.

\since BeOS R3
*/


Expand Down

0 comments on commit ac9714d

Please sign in to comment.