Skip to content

Commit

Permalink
Add doxygen + doxygen action.
Browse files Browse the repository at this point in the history
Signed-off-by: Cyril Hrubis <[email protected]>
  • Loading branch information
metan-ucw committed Nov 22, 2024
1 parent a1b9d30 commit c5212b6
Show file tree
Hide file tree
Showing 9 changed files with 107 additions and 38 deletions.
18 changes: 18 additions & 0 deletions .github/workflows/doxygen-gh-pages.yml
Original file line number Diff line number Diff line change
@@ -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/[email protected]
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
branch: gh-pages
folder: docs/html
config_file: Doxyfile
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
nekowm
*.dep
*.o
docs/
34 changes: 34 additions & 0 deletions Doxyfile
Original file line number Diff line number Diff line change
@@ -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
13 changes: 7 additions & 6 deletions neko_ctx.h
Original file line number Diff line number Diff line change
@@ -1,16 +1,17 @@
//SPDX-License-Identifier: GPL-2.0-or-later
/*
Copyright (c) 2019-2023 Cyril Hrubis <[email protected]>
Copyright (c) 2019-2024 Cyril Hrubis <[email protected]>
*/

/*
* 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 <text/gp_text.h>
#include <core/gp_types.h>
Expand All @@ -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 */
18 changes: 15 additions & 3 deletions neko_view.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,21 +7,27 @@

/**
* @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 <core/gp_core.h>
#include <backends/gp_types.h>

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);
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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. */
Expand Down Expand Up @@ -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 */
19 changes: 14 additions & 5 deletions neko_view_app.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,21 +2,30 @@
/*
Copyright (c) 2019-2024 Cyril Hrubis <[email protected]>
*/

/**
* @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);

Expand All @@ -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 */
10 changes: 8 additions & 2 deletions neko_view_app_launcher.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,9 @@
*/

/*
* Application launcher
/**
* @brief Application launcher.
* @file neko_view_app_launcher.h
*/

#ifndef NEKO_VIEW_APP_LAUNCHER_H
Expand All @@ -15,6 +16,11 @@
#include <input/gp_types.h>
#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 */
13 changes: 10 additions & 3 deletions neko_view_running_apps.h
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand All @@ -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 */
19 changes: 0 additions & 19 deletions nekowm.h

This file was deleted.

0 comments on commit c5212b6

Please sign in to comment.