From cd1b53ee65a04c86691bbcc607439251074056c6 Mon Sep 17 00:00:00 2001 From: dijunkun Date: Fri, 4 Sep 2026 02:06:36 +0800 Subject: [PATCH] [chore] standardize source file headers --- .../src/gui/application/application_state.h | 12 +++++++++--- apps/desktop/src/gui/application/gui_application.h | 8 +++++++- .../src/gui/application/server_window_state.h | 12 ++++++++++-- apps/desktop/src/gui/application/window_geometry.h | 11 ++++++++++- apps/desktop/src/gui/render.h | 12 +++++++++--- .../src/gui/rendering/slint_video_presenter.h | 12 +++++++++--- apps/desktop/src/gui/runtime/cursor_position.h | 8 +++++++- .../src/gui/runtime/cursor_state_provider.h | 8 +++++++- .../src/gui/runtime/device_presence_cache.h | 8 ++++---- apps/desktop/src/gui/runtime/gui_runtime.h | 12 +++++++++--- apps/desktop/src/gui/runtime/gui_state.h | 14 ++++++-------- apps/desktop/src/gui/runtime/peer_event_handler.h | 12 +++++++++--- apps/desktop/src/gui/runtime/remote_action_codec.h | 12 +++++++++--- apps/desktop/src/gui/runtime/remote_session.h | 8 +++++++- apps/desktop/src/gui/runtime/runtime_state.h | 8 +++++++- apps/desktop/src/gui/ui/ui_localization.h | 13 ++++++++++--- apps/desktop/src/platform/macos/system_info.cpp | 12 ++++++++++++ 17 files changed, 141 insertions(+), 41 deletions(-) diff --git a/apps/desktop/src/gui/application/application_state.h b/apps/desktop/src/gui/application/application_state.h index 1ac3ed93..4d7f0541 100644 --- a/apps/desktop/src/gui/application/application_state.h +++ b/apps/desktop/src/gui/application/application_state.h @@ -1,5 +1,11 @@ -#ifndef CROSSDESK_GUI_APPLICATION_STATE_H_ -#define CROSSDESK_GUI_APPLICATION_STATE_H_ +/* + * @Author: DI JUNKUN + * @Date: 2026-09-04 + * Copyright (c) 2026 by DI JUNKUN, All Rights Reserved. + */ + +#ifndef _APPLICATION_STATE_H_ +#define _APPLICATION_STATE_H_ #include #include @@ -192,4 +198,4 @@ struct ApplicationState : MainWindowState, } // namespace crossdesk::gui_detail -#endif // CROSSDESK_GUI_APPLICATION_STATE_H_ +#endif \ No newline at end of file diff --git a/apps/desktop/src/gui/application/gui_application.h b/apps/desktop/src/gui/application/gui_application.h index 392d1f0a..f05d757d 100644 --- a/apps/desktop/src/gui/application/gui_application.h +++ b/apps/desktop/src/gui/application/gui_application.h @@ -1,3 +1,9 @@ +/* + * @Author: DI JUNKUN + * @Date: 2026-09-04 + * Copyright (c) 2026 by DI JUNKUN, All Rights Reserved. + */ + #ifndef _GUI_APPLICATION_H_ #define _GUI_APPLICATION_H_ @@ -94,4 +100,4 @@ private: } // namespace crossdesk -#endif +#endif \ No newline at end of file diff --git a/apps/desktop/src/gui/application/server_window_state.h b/apps/desktop/src/gui/application/server_window_state.h index bc693000..369cd5f3 100644 --- a/apps/desktop/src/gui/application/server_window_state.h +++ b/apps/desktop/src/gui/application/server_window_state.h @@ -1,4 +1,11 @@ -#pragma once +/* + * @Author: DI JUNKUN + * @Date: 2026-09-04 + * Copyright (c) 2026 by DI JUNKUN, All Rights Reserved. + */ + +#ifndef _SERVER_WINDOW_STATE_H_ +#define _SERVER_WINDOW_STATE_H_ #include #include @@ -24,5 +31,6 @@ inline int ReconcileSelectedController(const std::vector& ids, } return static_cast(std::distance(ids.begin(), selected)); } +} // namespace crossdesk::server_window_state -} // namespace crossdesk::server_window_state +#endif \ No newline at end of file diff --git a/apps/desktop/src/gui/application/window_geometry.h b/apps/desktop/src/gui/application/window_geometry.h index f6b0f1fd..0c3d14ea 100644 --- a/apps/desktop/src/gui/application/window_geometry.h +++ b/apps/desktop/src/gui/application/window_geometry.h @@ -1,4 +1,11 @@ -#pragma once +/* + * @Author: DI JUNKUN + * @Date: 2026-09-04 + * Copyright (c) 2026 by DI JUNKUN, All Rights Reserved. + */ + +#ifndef _WINDOW_GEOMETRY_H_ +#define _WINDOW_GEOMETRY_H_ #include @@ -38,3 +45,5 @@ constexpr PhysicalPosition BottomRightPosition(const PhysicalRect& bounds, } } // namespace crossdesk::window_geometry + +#endif \ No newline at end of file diff --git a/apps/desktop/src/gui/render.h b/apps/desktop/src/gui/render.h index 738ebb42..7ba6ea96 100644 --- a/apps/desktop/src/gui/render.h +++ b/apps/desktop/src/gui/render.h @@ -1,5 +1,11 @@ -#ifndef CROSSDESK_GUI_RENDER_H_ -#define CROSSDESK_GUI_RENDER_H_ +/* + * @Author: DI JUNKUN + * @Date: 2026-09-04 + * Copyright (c) 2026 by DI JUNKUN, All Rights Reserved. + */ + +#ifndef _RENDER_H_ +#define _RENDER_H_ #include @@ -25,4 +31,4 @@ private: } // namespace crossdesk -#endif // CROSSDESK_GUI_RENDER_H_ +#endif \ No newline at end of file diff --git a/apps/desktop/src/gui/rendering/slint_video_presenter.h b/apps/desktop/src/gui/rendering/slint_video_presenter.h index e7ff6a7e..a971f3bb 100644 --- a/apps/desktop/src/gui/rendering/slint_video_presenter.h +++ b/apps/desktop/src/gui/rendering/slint_video_presenter.h @@ -1,5 +1,11 @@ -#ifndef CROSSDESK_GUI_RENDERING_SLINT_VIDEO_PRESENTER_H_ -#define CROSSDESK_GUI_RENDERING_SLINT_VIDEO_PRESENTER_H_ +/* + * @Author: DI JUNKUN + * @Date: 2026-09-04 + * Copyright (c) 2026 by DI JUNKUN, All Rights Reserved. + */ + +#ifndef _SLINT_VIDEO_PRESENTER_H_ +#define _SLINT_VIDEO_PRESENTER_H_ #include #include @@ -72,4 +78,4 @@ private: } // namespace crossdesk -#endif // CROSSDESK_GUI_RENDERING_SLINT_VIDEO_PRESENTER_H_ +#endif \ No newline at end of file diff --git a/apps/desktop/src/gui/runtime/cursor_position.h b/apps/desktop/src/gui/runtime/cursor_position.h index a1939e91..1edc7975 100644 --- a/apps/desktop/src/gui/runtime/cursor_position.h +++ b/apps/desktop/src/gui/runtime/cursor_position.h @@ -1,3 +1,9 @@ +/* + * @Author: DI JUNKUN + * @Date: 2026-09-04 + * Copyright (c) 2026 by DI JUNKUN, All Rights Reserved. + */ + #ifndef _CURSOR_POSITION_H_ #define _CURSOR_POSITION_H_ @@ -64,4 +70,4 @@ inline bool NormalizeCursorPosition( } // namespace crossdesk -#endif +#endif \ No newline at end of file diff --git a/apps/desktop/src/gui/runtime/cursor_state_provider.h b/apps/desktop/src/gui/runtime/cursor_state_provider.h index 84f1d096..5ee177a6 100644 --- a/apps/desktop/src/gui/runtime/cursor_state_provider.h +++ b/apps/desktop/src/gui/runtime/cursor_state_provider.h @@ -1,3 +1,9 @@ +/* + * @Author: DI JUNKUN + * @Date: 2026-09-04 + * Copyright (c) 2026 by DI JUNKUN, All Rights Reserved. + */ + #ifndef _CURSOR_STATE_PROVIDER_H_ #define _CURSOR_STATE_PROVIDER_H_ @@ -30,4 +36,4 @@ class CursorStateProvider { } // namespace crossdesk -#endif +#endif \ No newline at end of file diff --git a/apps/desktop/src/gui/runtime/device_presence_cache.h b/apps/desktop/src/gui/runtime/device_presence_cache.h index c1d3ee61..e799f29f 100644 --- a/apps/desktop/src/gui/runtime/device_presence_cache.h +++ b/apps/desktop/src/gui/runtime/device_presence_cache.h @@ -1,11 +1,11 @@ /* * @Author: DI JUNKUN - * @Date: 2026-02-28 + * @Date: 2026-09-04 * Copyright (c) 2026 by DI JUNKUN, All Rights Reserved. */ -#ifndef CROSSDESK_GUI_DEVICE_PRESENCE_CACHE_H_ -#define CROSSDESK_GUI_DEVICE_PRESENCE_CACHE_H_ +#ifndef _DEVICE_PRESENCE_CACHE_H_ +#define _DEVICE_PRESENCE_CACHE_H_ #include #include @@ -38,4 +38,4 @@ private: } // namespace crossdesk -#endif // CROSSDESK_GUI_DEVICE_PRESENCE_CACHE_H_ +#endif \ No newline at end of file diff --git a/apps/desktop/src/gui/runtime/gui_runtime.h b/apps/desktop/src/gui/runtime/gui_runtime.h index fcb31469..b1da3415 100644 --- a/apps/desktop/src/gui/runtime/gui_runtime.h +++ b/apps/desktop/src/gui/runtime/gui_runtime.h @@ -1,5 +1,11 @@ -#ifndef CROSSDESK_GUI_RUNTIME_H_ -#define CROSSDESK_GUI_RUNTIME_H_ +/* + * @Author: DI JUNKUN + * @Date: 2026-09-04 + * Copyright (c) 2026 by DI JUNKUN, All Rights Reserved. + */ + +#ifndef _GUI_RUNTIME_H_ +#define _GUI_RUNTIME_H_ #include #include @@ -98,4 +104,4 @@ class GuiRuntime : protected gui_detail::GuiState { } // namespace crossdesk -#endif // CROSSDESK_GUI_RUNTIME_H_ +#endif \ No newline at end of file diff --git a/apps/desktop/src/gui/runtime/gui_state.h b/apps/desktop/src/gui/runtime/gui_state.h index 1d9d922a..96d888f2 100644 --- a/apps/desktop/src/gui/runtime/gui_state.h +++ b/apps/desktop/src/gui/runtime/gui_state.h @@ -1,13 +1,11 @@ /* - * Aggregate state visible to GuiRuntime and GuiApplication. - * - * Definitions live beside their owners: SDL/window state in application and - * connection/session state in runtime. This header is intentionally only the - * composition point. + * @Author: DI JUNKUN + * @Date: 2026-09-04 + * Copyright (c) 2026 by DI JUNKUN, All Rights Reserved. */ -#ifndef CROSSDESK_GUI_STATE_H_ -#define CROSSDESK_GUI_STATE_H_ +#ifndef _GUI_STATE_H_ +#define _GUI_STATE_H_ #include "application/application_state.h" #include "runtime/runtime_state.h" @@ -18,4 +16,4 @@ struct GuiState : ApplicationState, RuntimeState {}; } // namespace crossdesk::gui_detail -#endif // CROSSDESK_GUI_STATE_H_ +#endif \ No newline at end of file diff --git a/apps/desktop/src/gui/runtime/peer_event_handler.h b/apps/desktop/src/gui/runtime/peer_event_handler.h index d3d3d56a..96cf1a1d 100644 --- a/apps/desktop/src/gui/runtime/peer_event_handler.h +++ b/apps/desktop/src/gui/runtime/peer_event_handler.h @@ -1,5 +1,11 @@ -#ifndef CROSSDESK_GUI_PEER_EVENT_HANDLER_H_ -#define CROSSDESK_GUI_PEER_EVENT_HANDLER_H_ +/* + * @Author: DI JUNKUN + * @Date: 2026-09-04 + * Copyright (c) 2026 by DI JUNKUN, All Rights Reserved. + */ + +#ifndef _PEER_EVENT_HANDLER_H_ +#define _PEER_EVENT_HANDLER_H_ #include #include @@ -47,4 +53,4 @@ private: } // namespace crossdesk -#endif // CROSSDESK_GUI_PEER_EVENT_HANDLER_H_ +#endif \ No newline at end of file diff --git a/apps/desktop/src/gui/runtime/remote_action_codec.h b/apps/desktop/src/gui/runtime/remote_action_codec.h index 76598f0a..a92274fe 100644 --- a/apps/desktop/src/gui/runtime/remote_action_codec.h +++ b/apps/desktop/src/gui/runtime/remote_action_codec.h @@ -1,5 +1,11 @@ -#ifndef CROSSDESK_GUI_REMOTE_ACTION_CODEC_H_ -#define CROSSDESK_GUI_REMOTE_ACTION_CODEC_H_ +/* + * @Author: DI JUNKUN + * @Date: 2026-09-04 + * Copyright (c) 2026 by DI JUNKUN, All Rights Reserved. + */ + +#ifndef _REMOTE_ACTION_CODEC_H_ +#define _REMOTE_ACTION_CODEC_H_ #include #include @@ -14,4 +20,4 @@ void Free(RemoteAction &action); } // namespace crossdesk::remote_action_codec -#endif // CROSSDESK_GUI_REMOTE_ACTION_CODEC_H_ +#endif \ No newline at end of file diff --git a/apps/desktop/src/gui/runtime/remote_session.h b/apps/desktop/src/gui/runtime/remote_session.h index a7149893..c3da5019 100644 --- a/apps/desktop/src/gui/runtime/remote_session.h +++ b/apps/desktop/src/gui/runtime/remote_session.h @@ -1,3 +1,9 @@ +/* + * @Author: DI JUNKUN + * @Date: 2026-09-04 + * Copyright (c) 2026 by DI JUNKUN, All Rights Reserved. + */ + #ifndef _REMOTE_SESSION_H_ #define _REMOTE_SESSION_H_ @@ -174,4 +180,4 @@ using RemoteSessionPtr = std::shared_ptr; } // namespace crossdesk::gui_detail -#endif +#endif \ No newline at end of file diff --git a/apps/desktop/src/gui/runtime/runtime_state.h b/apps/desktop/src/gui/runtime/runtime_state.h index e780fa46..229b22f0 100644 --- a/apps/desktop/src/gui/runtime/runtime_state.h +++ b/apps/desktop/src/gui/runtime/runtime_state.h @@ -1,3 +1,9 @@ +/* + * @Author: DI JUNKUN + * @Date: 2026-09-04 + * Copyright (c) 2026 by DI JUNKUN, All Rights Reserved. + */ + #ifndef _RUNTIME_STATE_H_ #define _RUNTIME_STATE_H_ @@ -212,4 +218,4 @@ struct RuntimeState : InfrastructureState, } // namespace crossdesk::gui_detail -#endif +#endif \ No newline at end of file diff --git a/apps/desktop/src/gui/ui/ui_localization.h b/apps/desktop/src/gui/ui/ui_localization.h index 5396f421..b00e15f3 100644 --- a/apps/desktop/src/gui/ui/ui_localization.h +++ b/apps/desktop/src/gui/ui/ui_localization.h @@ -1,5 +1,11 @@ -#ifndef CROSSDESK_GUI_UI_UI_LOCALIZATION_H_ -#define CROSSDESK_GUI_UI_UI_LOCALIZATION_H_ +/* + * @Author: DI JUNKUN + * @Date: 2026-09-04 + * Copyright (c) 2026 by DI JUNKUN, All Rights Reserved. + */ + +#ifndef _UI_LOCALIZATION_H_ +#define _UI_LOCALIZATION_H_ #include @@ -162,4 +168,5 @@ inline int ApplyStreamWindowStrings( } // namespace crossdesk::ui_localization -#endif // CROSSDESK_GUI_UI_UI_LOCALIZATION_H_ + +#endif \ No newline at end of file diff --git a/apps/desktop/src/platform/macos/system_info.cpp b/apps/desktop/src/platform/macos/system_info.cpp index 0373c354..eec86b5d 100644 --- a/apps/desktop/src/platform/macos/system_info.cpp +++ b/apps/desktop/src/platform/macos/system_info.cpp @@ -1,3 +1,12 @@ +/* + * @Author: DI JUNKUN + * @Date: 2026-09-04 + * Copyright (c) 2026 by DI JUNKUN, All Rights Reserved. + */ + +#ifndef _SYSTEM_INFO_H_ +#define _SYSTEM_INFO_H_ + #include "platform.h" #include @@ -53,3 +62,6 @@ std::string GetHostName() { bool IsWaylandSession() { return false; } } // namespace crossdesk + + +#endif \ No newline at end of file