From 03b52202d15def20288e2b5d0d5f930e75d167f7 Mon Sep 17 00:00:00 2001 From: Niels Sascha Reedijk Date: Mon, 2 Sep 2019 06:58:44 +0100 Subject: [PATCH] API Docs: various AppKit improvements --- docs/user/app/Application.dox | 64 +++++++++++++++++++++++++++++++++-- docs/user/app/Cursor.dox | 12 +++---- docs/user/app/Invoker.dox | 12 ++++++- docs/user/app/Looper.dox | 11 +++++- 4 files changed, 88 insertions(+), 11 deletions(-) diff --git a/docs/user/app/Application.dox b/docs/user/app/Application.dox index 7c12a2338c..b5c4299be9 100644 --- a/docs/user/app/Application.dox +++ b/docs/user/app/Application.dox @@ -1,13 +1,13 @@ /* - * Copyright 2011-2014 Haiku, Inc. All rights reserved. + * Copyright 2011-2014, 2019 Haiku, Inc. All rights reserved. * Distributed under the terms of the MIT License. * * Authors: * John Scipione, jscipione@gmail.com * * Corresponds to: - * headers/os/app/Application.h hrev47355 - * src/kits/app/Application.cpp hrev47355 + * headers/os/app/Application.h hrev49893 + * src/kits/app/Application.cpp hrev52620 */ @@ -517,6 +517,14 @@ main() */ +/*! + \fn const char* BApplication::Signature() const + \brief Returns the signature of the Application + + \since Haiku R1 +*/ + + /*! \fn status_t BApplication::GetAppInfo(app_info *info) const \brief Fills out the \a info parameter with information about the @@ -631,3 +639,53 @@ main() //! @} + + +/*! + \name Lifecycle Management +*/ + + +//! @{ + + +/*! + \fn status_t BApplication::RegisterLooper(BLooper* looper) + \brief Register a looper to quit when the application quits + + There are situations where you create BLooper objects, that you may want to + have BApplication quit properly, when the application is quitting. This + method allows you to add Loopers under management of BApplication. + + Note that Windows are automatically handled by BApplication, so there is no + need to manually register BWindow-based loopers using this method. + + \returns \c B_OK when the looper was registered without an issue, + \c B_BAD_VALUE when you try to register a BWindow, or \c B_ERROR + when the looper was already registered. + + \since Haiku R1 +*/ + + +/*! + \fn status_t BApplication::UnregisterLooper(BLooper* looper) + \brief Remove a previously registered Looper from the quit-list + + If a looper has been added to the quit list using + BApplication::RegisterLooper, they can be unregistered using this method. + You should do this in the case the looper quits before the application + does. + + Note that Windows are automatically handled by BApplication, so you don't + have to use this function to unregister windows. + + \returns \c B_OK when the looper has been removed, \c B_BAD_VALUE when you + try to unregister a BWindow, or \c B_ERROR when the looper was not + previously registered. + + \since Haiku R1 +*/ + + +//! @{ diff --git a/docs/user/app/Cursor.dox b/docs/user/app/Cursor.dox index 46c961d50b..7f4e91fe70 100644 --- a/docs/user/app/Cursor.dox +++ b/docs/user/app/Cursor.dox @@ -1,5 +1,5 @@ /* - * Copyright 2012-2014 Haiku, Inc. All rights reserved. + * Copyright 2012-2014, 2019 Haiku, Inc. All rights reserved. * Distributed under the terms of the MIT License. * * Authors: @@ -324,7 +324,7 @@ /*! - status_t BCursor::Archive(BMessage *into, bool deep) const + \fn status_t BCursor::Archive(BMessage *into, bool deep) const \brief Archive the cursor. Not implemented. \since BeOS R5 @@ -332,7 +332,7 @@ /*! - BArchivable* BCursor::Instantiate(BMessage *data) + \fn BArchivable* BCursor::Instantiate(BMessage *archive) \brief Instantiate the cursor from a message. Not implemented. \since BeOS R5 @@ -340,7 +340,7 @@ /*! - BCursor& BCursor::operator=(const BCursor& other) + \fn BCursor& BCursor::operator=(const BCursor &other) \brief Set the cursor to another cursor object. \param other The cursor object to copy from. @@ -352,7 +352,7 @@ /*! - bool BCursor::operator==(const BCursor& other) const + \fn bool BCursor::operator==(const BCursor &other) const \brief Compare a cursor object to another and return if they are equal. \param other The cursor object to compare to. @@ -365,7 +365,7 @@ /*! - bool BCursor::operator!=(const BCursor& other) const + \fn bool BCursor::operator!=(const BCursor &other) const \brief Compare a cursor object to another and return if they are not equal. \param other The cursor object to compare to. diff --git a/docs/user/app/Invoker.dox b/docs/user/app/Invoker.dox index 6450be84b5..90022acc5d 100644 --- a/docs/user/app/Invoker.dox +++ b/docs/user/app/Invoker.dox @@ -1,5 +1,5 @@ /* - * Copyright 2015 Haiku, Inc. All rights reserved. + * Copyright 2015, 2019 Haiku, Inc. All rights reserved. * Distributed under the terms of the MIT License. * * Authors: @@ -174,6 +174,16 @@ */ +/*! + \fn BHandler* BInvoker::Target(BLooper** _looper = NULL) const + \brief Invoke BMessenger::Target() on the internal messenger + + \see BMessenger::Target() + + \since BeOS R3 +*/ + + /*! \fn BMessenger BInvoker::Messenger() const \brief Returns the BMessenger object that the invoker uses to send its diff --git a/docs/user/app/Looper.dox b/docs/user/app/Looper.dox index fba19d88a3..482c0f909c 100644 --- a/docs/user/app/Looper.dox +++ b/docs/user/app/Looper.dox @@ -1,5 +1,5 @@ /* - * Copyright 2008-2018 Haiku, Inc. All rights reserved. + * Copyright 2008-2019 Haiku, Inc. All rights reserved. * Distributed under the terms of the MIT License. * * Authors: @@ -438,6 +438,15 @@ */ +/*! + \fn void BLooper::DispatchExternalMessage(BMessage* message, + BHandler* handler, bool& _detached) + \brief Internal method to support single-threaded GUI toolkits + + \since Haiku R1 +*/ + + /*! \fn BMessageQueue* BLooper::MessageQueue() const \brief Get a pointer to the internal message queue of this looper.