Use @ for doxygen commands (#2597)

This commit is contained in:
Patrick Ziegler 2022-02-20 21:40:48 +01:00 committed by GitHub
parent ce93188a4a
commit 62da14e30d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
31 changed files with 99 additions and 99 deletions

View File

@ -21,7 +21,7 @@ POLYBAR_NS
namespace cairo {
/**
* \brief Cairo context
* @brief Cairo context
*/
class context {
public:

View File

@ -16,12 +16,12 @@ POLYBAR_NS
namespace cairo {
/**
* \brief Global pointer to the Freetype library handler
* @brief Global pointer to the Freetype library handler
*/
static FT_Library g_ftlib;
/**
* \brief Abstract font face
* @brief Abstract font face
*/
class font {
public:
@ -52,7 +52,7 @@ namespace cairo {
};
/**
* \brief Font based on fontconfig/freetype
* @brief Font based on fontconfig/freetype
*/
class font_fc : public font {
public:

View File

@ -12,7 +12,7 @@ POLYBAR_NS
namespace cairo {
/**
* \brief Base surface
* @brief Base surface
*/
class surface {
public:
@ -57,7 +57,7 @@ namespace cairo {
};
/**
* \brief Surface for xcb
* @brief Surface for xcb
*/
class xcb_surface : public surface {
public:

View File

@ -10,7 +10,7 @@ POLYBAR_NS
namespace cairo {
namespace utils {
/**
* \brief RAII wrapper used acquire cairo_device_t
* @brief RAII wrapper used acquire cairo_device_t
*/
class device_lock {
public:
@ -24,7 +24,7 @@ namespace cairo {
};
/**
* \brief RAII wrapper used to access the underlying
* @brief RAII wrapper used to access the underlying
* FT_Face of a scaled font face
*/
class ft_face_lock {
@ -39,7 +39,7 @@ namespace cairo {
};
/**
* \brief Unicode character containing converted codepoint
* @brief Unicode character containing converted codepoint
* and details on where its position in the source string
*/
struct unicode_character {
@ -51,17 +51,17 @@ namespace cairo {
using unicode_charlist = std::list<unicode_character>;
/**
* \see <cairo/cairo.h>
* @see <cairo/cairo.h>
*/
cairo_operator_t str2operator(const string& mode, cairo_operator_t fallback);
/**
* \brief Create a UCS-4 codepoint from a utf-8 encoded string
* @brief Create a UCS-4 codepoint from a utf-8 encoded string
*/
bool utf8_to_ucs4(const unsigned char* src, unicode_charlist& result_list);
/**
* \brief Convert a UCS-4 codepoint to a utf-8 encoded string
* @brief Convert a UCS-4 codepoint to a utf-8 encoded string
*/
size_t ucs4_to_utf8(char* utf8, unsigned int ucs);
}

View File

@ -36,7 +36,7 @@ class config {
static constexpr const char* BAR_PREFIX = "bar/";
/**
* \brief Instruct the config to connect to the xresource manager
* @brief Instruct the config to connect to the xresource manager
*/
void use_xrm();
@ -229,7 +229,7 @@ class config {
}
/**
* \see deprecated<T>
* @see deprecated<T>
*/
template <typename T = string>
T deprecated_list(const string& section, const string& old, const string& newkey, const vector<T>& fallback) const {

View File

@ -12,7 +12,7 @@ POLYBAR_NS
DEFINE_ERROR(parser_error);
/**
* \brief Exception object for syntax errors
* @brief Exception object for syntax errors
*
* Contains filepath and line number where syntax error was found
*/
@ -46,12 +46,12 @@ class invalid_name_error : public syntax_error {
};
/**
* \brief All different types a line in a config can be
* @brief All different types a line in a config can be
*/
enum class line_type { KEY, HEADER, COMMENT, EMPTY, UNKNOWN };
/**
* \brief Storage for a single config line
* @brief Storage for a single config line
*
* More sanitized than the actual string of the comment line, with information
* about line type and structure
@ -98,23 +98,23 @@ class config_parser {
config_parser(logger&& logger, string&& file, string&& bar) = delete;
/**
* \brief Performs the parsing of the main config file m_file
* @brief Performs the parsing of the main config file m_file
*
* \returns config class instance populated with the parsed config
* @returns config class instance populated with the parsed config
*
* \throws syntax_error If there was any kind of syntax error
* \throws parser_error If aynthing else went wrong
* @throws syntax_error If there was any kind of syntax error
* @throws parser_error If aynthing else went wrong
*/
config::make_type parse();
protected:
/**
* \brief Converts the `lines` vector to a proper sectionmap
* @brief Converts the `lines` vector to a proper sectionmap
*/
sectionmap_t create_sectionmap();
/**
* \brief Parses the given file, extracts key-value pairs and section
* @brief Parses the given file, extracts key-value pairs and section
* headers and adds them onto the `lines` vector
*
* This method directly resolves `include-file` directives and checks for
@ -125,7 +125,7 @@ class config_parser {
void parse_file(const string& file, file_list path);
/**
* \brief Parses the given line string to the given line_t struct
* @brief Parses the given line string to the given line_t struct
*
* We use the INI file syntax (https://en.wikipedia.org/wiki/INI_file)
* Whitespaces (tested with isspace()) at the beginning and end of a line are ignored
@ -153,7 +153,7 @@ class config_parser {
*
* sections are defined as [section], everything inside the square brackets is part of the name
*
* \throws syntax_error if the line isn't well formed. The syntax error
* @throws syntax_error if the line isn't well formed. The syntax error
* does not contain the filename or line numbers because parse_line
* doesn't know about those. Whoever calls parse_line needs to
* catch those exceptions and set the file path and line number
@ -161,7 +161,7 @@ class config_parser {
void parse_line(line_t& line, const string& line_str);
/**
* \brief Determines the type of a line read from a config file
* @brief Determines the type of a line read from a config file
*
* Expects that line is trimmed
* This mainly looks at the first character and doesn't check if the line is
@ -174,33 +174,33 @@ class config_parser {
static line_type get_line_type(const string& line);
/**
* \brief Parse a line containing a section header and returns the header name
* @brief Parse a line containing a section header and returns the header name
*
* Only assumes that the line starts with '[' and is trimmed
*
* \throws syntax_error if the line doesn't end with ']' or the header name
* @throws syntax_error if the line doesn't end with ']' or the header name
* contains forbidden characters
*/
string parse_header(const line_t& line, const string& line_str);
/**
* \brief Parses a line containing a key-value pair and returns the key name
* @brief Parses a line containing a key-value pair and returns the key name
* and the value string inside an std::pair
*
* Only assumes that the line contains '=' at least once and is trimmed
*
* \throws syntax_error if the key contains forbidden characters
* @throws syntax_error if the key contains forbidden characters
*/
std::pair<string, string> parse_key(const line_t& line, const string& line_str);
/**
* \brief Parses the given value, checks if the given value contains
* @brief Parses the given value, checks if the given value contains
* one or more unescaped backslashes and logs an error if yes
*/
string parse_escaped_value(const line_t& line, string&& value, const string& key);
/**
* \brief Name of all the files the config includes values from
* @brief Name of all the files the config includes values from
*
* The line_t struct uses indices to this vector to map lines to their
* original files. This allows us to point the user to the exact location
@ -210,7 +210,7 @@ class config_parser {
private:
/**
* \brief Checks if the given name doesn't contain any spaces or characters
* @brief Checks if the given name doesn't contain any spaces or characters
* in config_parser::m_forbidden_chars
*/
bool is_valid_name(const string& name);
@ -218,7 +218,7 @@ class config_parser {
vector<string> get_bars(const sectionmap_t& sections) const;
/**
* \brief Whether or not an xresource manager should be used
* @brief Whether or not an xresource manager should be used
*
* Is set to true if any ${xrdb...} references are found
*/
@ -227,7 +227,7 @@ class config_parser {
const logger& m_log;
/**
* \brief Absolute path to the main config file
* @brief Absolute path to the main config file
*/
string m_config;
@ -237,7 +237,7 @@ class config_parser {
string m_barname;
/**
* \brief List of all the lines in the config (with included files)
* @brief List of all the lines in the config (with included files)
*
* The order here matters, as we have not yet associated key-value pairs
* with sections
@ -245,12 +245,12 @@ class config_parser {
vector<line_t> m_lines;
/**
* \brief None of these characters can be used in the key and section names
* @brief None of these characters can be used in the key and section names
*/
const string m_forbidden_chars{"\"'=;#[](){}:.$\\%"};
/**
* \brief List of names that cannot be used as section names
* @brief List of names that cannot be used as section names
*
* These strings have a special meaning inside references and so the
* section [self] could never be referenced.

View File

@ -102,7 +102,7 @@ class controller : public signal_receiver<SIGN_PRIORITY_CONTROLLER, signals::eve
bool m_has_ipc;
/**
* \brief Async handle to notify the eventloop
* @brief Async handle to notify the eventloop
*
* This handle is used to notify the eventloop of changes which are not otherwise covered by other handles.
* E.g. click actions.
@ -117,34 +117,34 @@ class controller : public signal_receiver<SIGN_PRIORITY_CONTROLLER, signals::eve
notifications_t m_notifications{};
/**
* \brief Protected m_notifications.
* @brief Protected m_notifications.
*
* All accesses to m_notifications must hold this mutex.
*/
std::mutex m_notification_mutex{};
/**
* \brief Destination path of generated snapshot
* @brief Destination path of generated snapshot
*/
string m_snapshot_dst;
/**
* \brief Controls weather the output gets printed to stdout
* @brief Controls weather the output gets printed to stdout
*/
bool m_writeback{false};
/**
* \brief Loaded modules
* @brief Loaded modules
*/
vector<module_t> m_modules;
/**
* \brief Loaded modules grouped by block
* @brief Loaded modules grouped by block
*/
modulemap_t m_blocks;
/**
* \brief Flag to trigger reload after shutdown
* @brief Flag to trigger reload after shutdown
*/
bool m_reload{false};
};

View File

@ -76,10 +76,10 @@ namespace eventloop {
/**
* Generic callback function that can be used for all uv handle callbacks.
*
* \tparam Event Event class/struct. Must have a constructor that takes all arguments passed to the uv callback,
* @tparam Event Event class/struct. Must have a constructor that takes all arguments passed to the uv callback,
* except for the handle argument.
* \tparam Member Pointer to class member where callback function is stored
* \tparam Args Additional arguments in the uv callback. Inferred by the compiler
* @tparam Member Pointer to class member where callback function is stored
* @tparam Args Additional arguments in the uv callback. Inferred by the compiler
*/
template <typename Event, cb_event<Event> Self::*Member, typename... Args>
static void event_cb(H* handle, Args... args) {

View File

@ -7,7 +7,7 @@
POLYBAR_NS
/**
* \brief Holds all signal receivers attached to the emitter
* @brief Holds all signal receivers attached to the emitter
*/
extern signal_receivers_t g_signal_receivers;

View File

@ -26,7 +26,7 @@ namespace modules {
private:
static constexpr auto TAG_LABEL = "<label>";
// \deprecated: Use <label>
// @deprecated: Use <label>
static constexpr auto TAG_DATE = "<date>";
label_t m_label;

View File

@ -15,19 +15,19 @@ namespace modules {
enum class state {
NONE,
/**
* \brief Active workspace on focused monitor
* @brief Active workspace on focused monitor
*/
FOCUSED,
/**
* \brief Inactive workspace on any monitor
* @brief Inactive workspace on any monitor
*/
UNFOCUSED,
/**
* \brief Active workspace on unfocused monitor
* @brief Active workspace on unfocused monitor
*/
VISIBLE,
/**
* \brief Workspace with urgency hint set
* @brief Workspace with urgency hint set
*/
URGENT,
};

View File

@ -125,7 +125,7 @@ namespace modules {
* Any implementation is free to ignore the data, if the action does not
* require additional data.
*
* \returns true if the action is supported and false otherwise
* @returns true if the action is supported and false otherwise
*/
virtual bool input(const string& action, const string& data) = 0;

View File

@ -20,11 +20,11 @@ namespace actions_util {
*
* Only call this function with an action string that begins with '#'.
*
* \returns a triple (name, action, data)
* @returns a triple (name, action, data)
* If no data exists, the third string will be empty.
* This means "#name.action." and "#name.action" will be produce the
* same result.
* \throws runtime_error If the action string is malformed
* @throws runtime_error If the action string is malformed
*/
action parse_action_string(string action);
} // namespace actions_util

View File

@ -21,23 +21,23 @@ DEFINE_ERROR(command_error);
*
* Example usage:
*
* \code cpp
* @code cpp
* auto cmd = command_util::make_command<output_policy::REDIRECTED>("cat /etc/rc.local");
* cmd->exec();
* cmd->tail([](string s) { std::cout << s << std::endl; });
* \endcode
* @endcode
*
* \code cpp
* @code cpp
* auto cmd = command_util::make_command<output_policy::REDIRECTED>("for i in 1 2 3; do echo $i; done");
* cmd->exec();
* cout << cmd->readline(); // 1
* cout << cmd->readline() << cmd->readline(); // 23
* \endcode
* @endcode
*
* \code cpp
* @code cpp
* auto cmd = command_util::make_command<output_policy::IGNORED>("ping kernel.org");
* int status = cmd->exec();
* \endcode
* @endcode
*/
template <output_policy>
class command;

View File

@ -23,12 +23,12 @@ namespace scope_util {
* leaving the object's scope (i.e, when it gets destroyed)
*
* Example usage:
* \code cpp
* @code cpp
* {
* auto handler = scope_util::make_exit_handler([]{ ... })
* ...
* }
* \endcode
* @endcode
*/
template <typename Fn = function<void()>, typename... Args>
decltype(auto) make_exit_handler(Fn&& fn, Args&&... args) {

View File

@ -33,11 +33,11 @@ namespace socket_util {
* Creates a wrapper for a unix socket connection
*
* Example usage:
* \code cpp
* @code cpp
* auto conn = socket_util::make_unix_connection("/tmp/socket");
* conn->send(...);
* conn->receive(...);
* \endcode
* @endcode
*/
inline unique_ptr<unix_connection> make_unix_connection(string&& path) {
return std::make_unique<unix_connection>(forward<string>(path));

View File

@ -57,7 +57,7 @@ class bg_slice {
};
/**
* \brief Class to keep track of the desktop background used to support pseudo-transparency
* @brief Class to keep track of the desktop background used to support pseudo-transparency
*
* For pseudo-transparency that bar needs access to the desktop background.
* We only need to store the slice of the background image which is covered by the bar window,
@ -89,8 +89,8 @@ class background_manager : public signal_receiver<SIGN_PRIORITY_SCREEN, signals:
* caches the background. If you don't need the background anymore, destroy the shared_ptr to free up
* resources.
*
* \param rect Slice of the background to observe (coordinates relative to window).
* \param window Coordinates are interpreted relative to this window
* @param rect Slice of the background to observe (coordinates relative to window).
* @param window Coordinates are interpreted relative to this window
*/
std::shared_ptr<bg_slice> observe(xcb_rectangle_t rect, xcb_window_t window);

View File

@ -117,7 +117,7 @@ struct cw_flush {
* Create X window
*
* Example usage:
* \code cpp
* @code cpp
* auto win = winspec(m_connection)
* << cw_size(100, 200)
* << cw_pos(10, -20)
@ -125,7 +125,7 @@ struct cw_flush {
* << cw_class(XCB_WINDOW_CLASS_INPUT_ONLY)
* << cw_parent(0x000110a);
* << cw_flush(false);
* \endcode
* @endcode
*/
class winspec {
public:

View File

@ -46,7 +46,7 @@ namespace cairo {
// }}}
/**
* \see <cairo/cairo.h>
* @see <cairo/cairo.h>
*/
cairo_operator_t str2operator(const string& mode, cairo_operator_t fallback) {
if (mode.empty()) {
@ -89,7 +89,7 @@ namespace cairo {
}
/**
* \brief Create a UCS-4 codepoint from a utf-8 encoded string
* @brief Create a UCS-4 codepoint from a utf-8 encoded string
*/
bool utf8_to_ucs4(const unsigned char* src, unicode_charlist& result_list) {
if (!src) {
@ -130,7 +130,7 @@ namespace cairo {
}
/**
* \brief Convert a UCS-4 codepoint to a utf-8 encoded string
* @brief Convert a UCS-4 codepoint to a utf-8 encoded string
*/
size_t ucs4_to_utf8(char* utf8, unsigned int ucs) {
if (ucs <= 0x7f) {

View File

@ -366,8 +366,8 @@ const bar_settings bar::settings() const {
/**
* Parse input string and redraw the bar window
*
* \param data Input string
* \param force Unless true, do not parse unchanged data
* @param data Input string
* @param force Unless true, do not parse unchanged data
*/
void bar::parse(string&& data, bool force) {
bool unchanged = data == m_lastinput;

View File

@ -109,7 +109,7 @@ void builder::node(const string& str) {
/**
* Insert text node with specific font index
*
* \see builder::node
* @see builder::node
*/
void builder::node(const string& str, int font_index) {
font(font_index);

View File

@ -288,7 +288,7 @@ void controller::read_events(bool confwatch) {
* Tries to match the given command to a legacy action string and sends the
* appropriate new action (and data) to the right module if possible.
*
* \returns true iff the given command matches a legacy action string and was
* @returns true iff the given command matches a legacy action string and was
* successfully forwarded to a module
*/
bool controller::try_forward_legacy_action(const string& cmd) {

View File

@ -69,8 +69,8 @@ namespace ipc {
/**
* If we are waiting for header data, read as many bytes as possible from the given buffer.
*
* \return Number of bytes processed.
* \throws decoder::error on message errors
* @return Number of bytes processed.
* @throws decoder::error on message errors
*/
ssize_t decoder::process_header_data(const uint8_t* data, size_t size) {
assert(state == state::HEADER);
@ -107,8 +107,8 @@ namespace ipc {
/**
* If we are waiting for message data, read as many bytes as possible from the given buffer.
*
* \return Number of bytes processed.
* \throws decoder::error on message errors
* @return Number of bytes processed.
* @throws decoder::error on message errors
*/
ssize_t decoder::process_msg_data(const uint8_t* data, size_t size) {
assert(state == state::PAYLOAD);

View File

@ -114,10 +114,10 @@ namespace bspwm_util {
* Create an ipc socket connection
*
* Example usage:
* \code cpp
* @code cpp
* auto ipc = make_connection();
* ipc->send(make_payload("desktop -f eDP-1:^1"));
* \endcode
* @endcode
*/
connection_t make_connection() {
return socket_util::make_unix_connection(get_socket_path());
@ -128,7 +128,7 @@ namespace bspwm_util {
* on the bspwm socket
*
* Example usage:
* \code cpp
* @code cpp
* auto ipc = make_subscriber();
*
* while (!ipc->poll(POLLHUP, 0)) {
@ -136,7 +136,7 @@ namespace bspwm_util {
* auto data = ipc->receive(BUFSIZ-1, bytes_received, 0);
* std::cout << data << std::endl;
* }
* \endcode
* @endcode
*/
connection_t make_subscriber() {
auto conn = make_connection();

View File

@ -13,7 +13,7 @@ POLYBAR_NS
* Colors without alpha channel will get an alpha channel of FF
* The input does not have to start with '#'
*
* \returns Empty string for malformed input, either AA for the alpha only
* @returns Empty string for malformed input, either AA for the alpha only
* input or an 8 character string of the expanded form AARRGGBB
*/
static string normalize_hex(string hex) {
@ -166,7 +166,7 @@ rgba rgba::apply_alpha_to(rgba other) const {
* If this is an ALPHA_ONLY color, applies this alpha channel to the other
* color, otherwise just returns this.
*
* \returns the new color if this is ALPHA_ONLY or a copy of this otherwise.
* @returns the new color if this is ALPHA_ONLY or a copy of this otherwise.
*/
rgba rgba::try_apply_alpha_to(rgba other) const {
if (m_type == type::ALPHA_ONLY) {

View File

@ -181,7 +181,7 @@ int command<output_policy::REDIRECTED>::exec(bool wait_for_completion, const vec
/**
* Tail command output
*
* \note: This is a blocking call and will not
* @note: This is a blocking call and will not
* end until the stream is closed
*/
void command<output_policy::REDIRECTED>::tail(std::function<void(string)> cb) {

View File

@ -51,7 +51,7 @@ void inotify_watch::remove(bool force) {
/**
* Poll the inotify fd for events
*
* \brief A wait_ms of -1 blocks until an event is fired
* @brief A wait_ms of -1 blocks until an event is fired
*/
bool inotify_watch::poll(int wait_ms) const {
if (m_fd == -1) {

View File

@ -78,7 +78,7 @@ namespace process_util {
*
* Use this if you want to run a command and just forget about it.
*
* \returns The PID of the child process
* @returns The PID of the child process
*/
void fork_detached(std::function<void()> const& lambda) {
pid_t pid = fork();
@ -166,7 +166,7 @@ namespace process_util {
/**
* Non-blocking wait
*
* \see wait_for_completion
* @see wait_for_completion
*/
pid_t wait_for_completion_nohang(pid_t process_id, int* status) {
return wait_for_completion(process_id, status, WNOHANG);
@ -175,7 +175,7 @@ namespace process_util {
/**
* Non-blocking wait
*
* \see wait_for_completion
* @see wait_for_completion
*/
pid_t wait_for_completion_nohang(int* status) {
return wait_for_completion_nohang(-1, status);
@ -184,7 +184,7 @@ namespace process_util {
/**
* Non-blocking wait
*
* \see wait_for_completion
* @see wait_for_completion
*/
pid_t wait_for_completion_nohang() {
int status = 0;
@ -194,7 +194,7 @@ namespace process_util {
/**
* Non-blocking wait call which returns pid of any child process
*
* \see wait_for_completion
* @see wait_for_completion
*/
bool notify_childprocess() {
return wait_for_completion_nohang() > 0;

View File

@ -85,7 +85,7 @@ namespace socket_util {
}
/**
* \see receive
* @see receive
*/
string unix_connection::receive(const ssize_t receive_bytes, int flags) {
ssize_t bytes{0};

View File

@ -969,7 +969,7 @@ void tray_manager::handle(const evt::configure_request& evt) {
}
/**
* \see tray_manager::handle(const evt::configure_request&);
* @see tray_manager::handle(const evt::configure_request&);
*/
void tray_manager::handle(const evt::resize_request& evt) {
if (m_activated && is_embedded(evt->window)) {

View File

@ -26,7 +26,7 @@ namespace xembed {
/**
* Query _XEMBED_INFO for the given window
*
* \return Whether valid XEMBED info was found
* @return Whether valid XEMBED info was found
*/
bool query(connection& conn, xcb_window_t win, info& data) {
auto info = conn.get_property(false, win, _XEMBED_INFO, _XEMBED_INFO, 0L, 2);