refactor: standardize headers to #pragma once, add [[nodiscard]]/[[maybe_unused]] annotations
This commit is contained in:
+13
-15
@@ -1,5 +1,4 @@
|
||||
#ifndef PEACHWM_CLIENT_H
|
||||
#define PEACHWM_CLIENT_H
|
||||
#pragma once
|
||||
|
||||
#include <wayland-server-core.h>
|
||||
#include <wlr/util/box.h>
|
||||
@@ -77,21 +76,21 @@ typedef struct {
|
||||
} LayerSurface;
|
||||
|
||||
/* Function declarations */
|
||||
int client_is_x11(Client *c);
|
||||
[[nodiscard]] int client_is_x11(Client *c);
|
||||
struct wlr_surface *client_surface(Client *c);
|
||||
int toplevel_from_wlr_surface(struct wlr_surface *s, Client **pc, LayerSurface **pl);
|
||||
[[nodiscard]] int toplevel_from_wlr_surface(struct wlr_surface *s, Client **pc, LayerSurface **pl);
|
||||
void client_activate_surface(struct wlr_surface *s, int activated);
|
||||
uint32_t client_set_bounds(Client *c, int32_t width, int32_t height);
|
||||
const char *client_get_appid(Client *c);
|
||||
[[nodiscard]] const char *client_get_appid(Client *c);
|
||||
void client_get_clip(Client *c, struct wlr_box *clip);
|
||||
void client_get_geometry(Client *c, struct wlr_box *geom);
|
||||
Client *client_get_parent(Client *c);
|
||||
int client_has_children(Client *c);
|
||||
const char *client_get_title(Client *c);
|
||||
int client_is_float_type(Client *c);
|
||||
int client_is_rendered_on_mon(Client *c, Monitor *m);
|
||||
int client_is_stopped(Client *c);
|
||||
int client_is_unmanaged(Client *c);
|
||||
[[nodiscard]] Client *client_get_parent(Client *c);
|
||||
[[nodiscard]] int client_has_children(Client *c);
|
||||
[[nodiscard]] const char *client_get_title(Client *c);
|
||||
[[nodiscard]] int client_is_float_type(Client *c);
|
||||
[[nodiscard]] int client_is_rendered_on_mon(Client *c, Monitor *m);
|
||||
[[nodiscard]] int client_is_stopped(Client *c);
|
||||
[[nodiscard]] int client_is_unmanaged(Client *c);
|
||||
void client_notify_enter(struct wlr_surface *s, struct wlr_keyboard *kb);
|
||||
void client_send_close(Client *c);
|
||||
void client_set_border_color(Client *c, const float color[static 4]);
|
||||
@@ -100,7 +99,6 @@ void client_set_scale(struct wlr_surface *s, float scale);
|
||||
uint32_t client_set_size(Client *c, uint32_t width, uint32_t height);
|
||||
void client_set_tiled(Client *c, uint32_t edges);
|
||||
void client_set_suspended(Client *c, int suspended);
|
||||
int client_wants_focus(Client *c);
|
||||
int client_wants_fullscreen(Client *c);
|
||||
[[nodiscard]] int client_wants_focus(Client *c);
|
||||
[[nodiscard]] int client_wants_fullscreen(Client *c);
|
||||
|
||||
#endif /* PEACHWM_CLIENT_H */
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
#ifndef PEACHWM_EXT_WORKSPACE_H
|
||||
#define PEACHWM_EXT_WORKSPACE_H
|
||||
#pragma once
|
||||
|
||||
#include "monitor.h"
|
||||
|
||||
@@ -20,4 +19,3 @@ void ext_workspace_cleanupmon(Monitor *m);
|
||||
void ext_workspace_printstatus(Monitor *m);
|
||||
void workspaces_init(void);
|
||||
|
||||
#endif /* PEACHWM_EXT_WORKSPACE_H */
|
||||
|
||||
@@ -20,8 +20,7 @@
|
||||
* 0x80000002 = mode 0x80000003 = window
|
||||
*/
|
||||
|
||||
#ifndef PEACHWM_IPC_SOCKET_H
|
||||
#define PEACHWM_IPC_SOCKET_H
|
||||
#pragma once
|
||||
|
||||
#include <stddef.h>
|
||||
#include <stdint.h>
|
||||
@@ -88,4 +87,3 @@ void ipc_socket_send_workspace_event(const char *change);
|
||||
void ipc_socket_send_window_event(const char *change);
|
||||
void ipc_socket_send_output_event(void);
|
||||
|
||||
#endif /* PEACHWM_IPC_SOCKET_H */
|
||||
|
||||
+1
-3
@@ -1,5 +1,4 @@
|
||||
#ifndef PEACHWM_MONITOR_H
|
||||
#define PEACHWM_MONITOR_H
|
||||
#pragma once
|
||||
|
||||
#include <wlr/types/wlr_output.h>
|
||||
#include <wlr/types/wlr_scene.h>
|
||||
@@ -55,4 +54,3 @@ struct Monitor {
|
||||
struct Client *scratchpad_current; /* currently visible scratchpad client */
|
||||
};
|
||||
|
||||
#endif /* PEACHWM_MONITOR_H */
|
||||
|
||||
Reference in New Issue
Block a user