[refactor] add namespace 'crossdesk' to codebase

This commit is contained in:
dijunkun
2025-10-27 21:09:39 +08:00
parent 3b34c26555
commit 401bfe4483
68 changed files with 313 additions and 606 deletions

View File

@@ -3,9 +3,11 @@
#include "rd_log.h"
#include "render.h"
namespace crossdesk {
int Render::AboutWindow() {
if (show_about_window_) {
const ImGuiViewport *viewport = ImGui::GetMainViewport();
const ImGuiViewport* viewport = ImGui::GetMainViewport();
ImGui::SetNextWindowPos(ImVec2(
(viewport->WorkSize.x - viewport->WorkPos.x - about_window_width_) / 2,
@@ -58,4 +60,5 @@ int Render::AboutWindow() {
ImGui::PopStyleColor();
}
return 0;
}
}
} // namespace crossdesk

View File

@@ -3,9 +3,11 @@
#include "rd_log.h"
#include "render.h"
namespace crossdesk {
bool Render::ConnectionStatusWindow(
std::shared_ptr<SubStreamWindowProperties> &props) {
const ImGuiViewport *viewport = ImGui::GetMainViewport();
std::shared_ptr<SubStreamWindowProperties>& props) {
const ImGuiViewport* viewport = ImGui::GetMainViewport();
bool ret_flag = false;
ImGui::SetNextWindowPos(ImVec2((viewport->WorkSize.x - viewport->WorkPos.x -
connection_status_window_width_) /
@@ -168,4 +170,5 @@ bool Render::ConnectionStatusWindow(
ImGui::PopStyleVar();
return ret_flag;
}
}
} // namespace crossdesk

View File

@@ -1,7 +1,9 @@
#include "rd_log.h"
#include "render.h"
int Render::ControlWindow(std::shared_ptr<SubStreamWindowProperties> &props) {
namespace crossdesk {
int Render::ControlWindow(std::shared_ptr<SubStreamWindowProperties>& props) {
double time_duration =
ImGui::GetTime() - props->control_bar_button_pressed_time_;
if (props->control_window_width_is_changing_) {
@@ -220,4 +222,5 @@ int Render::ControlWindow(std::shared_ptr<SubStreamWindowProperties> &props) {
ImGui::PopStyleColor();
return 0;
}
}
} // namespace crossdesk

View File

@@ -3,6 +3,8 @@
#include "rd_log.h"
#include "render.h"
namespace crossdesk {
int Render::SettingWindow() {
if (show_settings_window_) {
if (settings_window_pos_reset_) {
@@ -390,4 +392,5 @@ int Render::SettingWindow() {
}
return 0;
}
}
} // namespace crossdesk

View File

@@ -2,6 +2,8 @@
#include "rd_log.h"
#include "render.h"
namespace crossdesk {
int Render::MainWindow() {
ImGui::SetNextWindowPos(ImVec2(0, title_bar_height_), ImGuiCond_Always);
ImGui::PushStyleVar(ImGuiStyleVar_WindowPadding, ImVec2(0.0f, 0.0f));
@@ -47,3 +49,4 @@ int Render::MainWindow() {
return 0;
}
} // namespace crossdesk

View File

@@ -10,6 +10,8 @@
#include "rd_log.h"
#include "render.h"
namespace crossdesk {
std::vector<std::string> GetRootEntries() {
std::vector<std::string> roots;
#ifdef _WIN32
@@ -318,4 +320,5 @@ int Render::SelfHostedServerWindow() {
}
return 0;
}
}
} // namespace crossdesk

View File

@@ -2,6 +2,8 @@
#include "rd_log.h"
#include "render.h"
namespace crossdesk {
void Render::DrawConnectionStatusText(
std::shared_ptr<SubStreamWindowProperties>& props) {
std::string text;
@@ -199,4 +201,5 @@ int Render::StreamWindow() {
ImGui::End(); // End VideoBg
return 0;
}
}
} // namespace crossdesk