diff --git a/.github/workflows/doxygen-gh-pages.yml b/.github/workflows/doxygen-gh-pages.yml new file mode 100644 index 0000000..3c52861 --- /dev/null +++ b/.github/workflows/doxygen-gh-pages.yml @@ -0,0 +1,18 @@ +name: Doxygen GitHub Pages Deploy Action + +on: + push: + branches: + - main + workflow_dispatch: + +jobs: + deploy: + runs-on: ubuntu-latest + steps: + - uses: DenverCoder1/doxygen-github-pages-action@v1.3.1 + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + branch: gh-pages + folder: docs/html + config_file: Doxyfile diff --git a/.gitignore b/.gitignore index 5a0a2b2..7918da5 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ nekowm *.dep *.o +docs/ diff --git a/Doxyfile b/Doxyfile new file mode 100644 index 0000000..3a3c14c --- /dev/null +++ b/Doxyfile @@ -0,0 +1,34 @@ +PROJECT_NAME = NekoWM +PROJECT_BRIEF = "A gfxprim proxy backend tiling window manager" +PROJECT_LOGO = +OUTPUT_DIRECTORY = docs +TAB_SIZE = 8 +OPTIMIZE_OUTPUT_FOR_C = YES +TOC_INCLUDE_HEADINGS = 0 +DISTRIBUTE_GROUP_DOC = YES +EXTRACT_STATIC = YES +EXTRACT_LOCAL_CLASSES = NO +HIDE_UNDOC_MEMBERS = YES +HIDE_UNDOC_CLASSES = YES +CASE_SENSE_NAMES = YES +WARN_NO_PARAMDOC = YES +INPUT = . +FILE_PATTERNS = *.h +RECURSIVE = YES +EXCLUDE = README.md +SOURCE_BROWSER = YES +REFERENCED_BY_RELATION = YES +REFERENCES_RELATION = YES +REFERENCES_LINK_SOURCE = NO +GENERATE_LATEX = NO +MACRO_EXPANSION = YES +INCLUDE_PATH = . +PREDEFINED = DOXYGEN=1 +EXPAND_AS_DEFINED = no_name +HAVE_DOT = YES +CLASS_GRAPH = NO +COLLABORATION_GRAPH = YES +INCLUDE_GRAPH = NO +INCLUDED_BY_GRAPH = NO +GRAPHICAL_HIERARCHY = NO +DIRECTORY_GRAPH = NO diff --git a/neko_ctx.h b/neko_ctx.h index 4ea5580..54ff5cc 100644 --- a/neko_ctx.h +++ b/neko_ctx.h @@ -1,16 +1,17 @@ //SPDX-License-Identifier: GPL-2.0-or-later /* - Copyright (c) 2019-2023 Cyril Hrubis + Copyright (c) 2019-2024 Cyril Hrubis */ -/* - * Configuration. +/** + * @brief Global context, font, colors, backend pointer. + * @file neko_ctx.h */ -#ifndef NEKO_CTX__ -#define NEKO_CTX__ +#ifndef NEKO_CTX_H +#define NEKO_CTX_H #include #include @@ -31,4 +32,4 @@ extern struct neko_ctx ctx; void neko_ctx_init(gp_backend *backend, const char *font_family); -#endif /* NEKO_CTX__ */ +#endif /* NEKO_CTX_H */ diff --git a/neko_view.h b/neko_view.h index 7837a5a..20e1bdf 100644 --- a/neko_view.h +++ b/neko_view.h @@ -7,14 +7,15 @@ /** * @brief View is an abstraction for a piece of a screen. + * @file neko_view.h * * View can be divided into subviews recursively. * * Each view has a slot, if slot is not empty the screen is taken over by the * slot content. */ -#ifndef NEKO_VIEW -#define NEKO_VIEW +#ifndef NEKO_VIEW_H +#define NEKO_VIEW_H #include #include @@ -22,6 +23,11 @@ struct neko_view; struct neko_view_slot; +/** + * @brief A view slot ops. + * + * Callback to render a slot content. + */ typedef struct neko_view_slot_ops { /** @brief Request child exit. */ void (*exit)(struct neko_view_slot *self); @@ -65,6 +71,11 @@ typedef struct neko_view_slot_ops { void (*resize)(struct neko_view *self); } neko_view_slot_ops; +/** + * @brief A view slot content. + * + * Something to be shown in the view on the screen. + */ typedef struct neko_view_slot { /** @brief A neko view child implementation. */ const neko_view_slot_ops *ops; @@ -106,6 +117,7 @@ typedef struct neko_view { /** @brief A view may be split into two subviews. */ struct neko_view *subviews[2]; + /** @brief Currently focused subview. */ unsigned int focused_subview; /** @brief What is shown in the view. */ @@ -215,4 +227,4 @@ void neko_view_show(neko_view *self); void neko_view_hide(neko_view *self); -#endif /* NEKO_VIEW */ +#endif /* NEKO_VIEW_H */ diff --git a/neko_view_app.h b/neko_view_app.h index 7065ad1..5c9e0ef 100644 --- a/neko_view_app.h +++ b/neko_view_app.h @@ -2,21 +2,30 @@ /* Copyright (c) 2019-2024 Cyril Hrubis +*/ +/** + * @brief A running application. + * @file neko_view_app.h */ -#ifndef NEKO_VIEW_APP -#define NEKO_VIEW_APP +#ifndef NEKO_VIEW_APP_H +#define NEKO_VIEW_APP_H /** - * @brief Creates a child for a running application. + * @brief Creates a slot content for a running application. + * + * @param cli A proxy backend client handle. * * Displays an application. */ neko_view_slot *neko_view_app_init(gp_proxy_cli *cli); /** - * @brief A poll handler for the app child. + * @brief A poll handler for the app slot. + * + * @param self A gfxprim poll fd. The priv pointer must point to the + * application slot returned from neko_view_app_init(). */ enum gp_poll_event_ret neko_view_app_event(gp_fd *self); @@ -36,4 +45,4 @@ extern neko_view_slot **neko_apps; */ gp_proxy_cli *neko_view_app_cli(neko_view_slot *self); -#endif /* NEKO_VIEW_APP */ +#endif /* NEKO_VIEW_APP_H */ diff --git a/neko_view_app_launcher.h b/neko_view_app_launcher.h index e2d694c..1679f0e 100644 --- a/neko_view_app_launcher.h +++ b/neko_view_app_launcher.h @@ -5,8 +5,9 @@ */ -/* - * Application launcher +/** + * @brief Application launcher. + * @file neko_view_app_launcher.h */ #ifndef NEKO_VIEW_APP_LAUNCHER_H @@ -15,6 +16,11 @@ #include #include "neko_view.h" +/** + * @brief Creates a new slot content with app launcher. + * + * @return A neko view slot. + */ neko_view_slot *neko_app_launcher_init(void); #endif /* NEKO_VIEW_APP_LAUNCHER_H */ diff --git a/neko_view_running_apps.h b/neko_view_running_apps.h index 1901648..bed559f 100644 --- a/neko_view_running_apps.h +++ b/neko_view_running_apps.h @@ -5,13 +5,20 @@ */ -#ifndef NEKO_RUNNING_APPS -#define NEKO_RUNINNG_APPS +/** + * @brief A view slot content with a list of runinng apps. + * @file neko_view_running_apps.h + */ + +#ifndef NEKO_RUNNING_APPS_H +#define NEKO_RUNINNG_APPS_H /** * @brief Creates a new running apps view child. * * Displays a list of currently connected applications. + * + * @return A neko view slot. */ neko_view_slot *neko_running_apps_init(void); @@ -22,4 +29,4 @@ neko_view_slot *neko_running_apps_init(void); */ void neko_running_apps_changed(void); -#endif /* NEKO_RUNNING_APPS */ +#endif /* NEKO_RUNNING_APPS_H */ diff --git a/nekowm.h b/nekowm.h deleted file mode 100644 index 999aa63..0000000 --- a/nekowm.h +++ /dev/null @@ -1,19 +0,0 @@ -//SPDX-License-Identifier: GPL-2.0-or-later -/* - - Copyright (c) 2019-2024 Cyril Hrubis - - */ - -/* - * Access to nekowm fd loop etc. - */ - -#ifndef NEKOWM_H -#define NEKOWM_H - -#include - -void nekowm_poll_rem(gp_fd *self); - -#endif /* NEKOWM_H */