Use forward declarations
This commit is contained in:
parent
c7fe85413a
commit
361689a945
1
arb.h
1
arb.h
|
@ -1,7 +1,6 @@
|
|||
#pragma once
|
||||
|
||||
#include <atomic>
|
||||
#include "logcat_thread.h"
|
||||
|
||||
#define ARB_MAX_SIZE 255
|
||||
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
#pragma once
|
||||
|
||||
#include <imgui/imgui.h>
|
||||
struct ImFont; // forward declaration from imgui/imgui.h
|
||||
|
||||
#include "config.h"
|
||||
#include "logcat_thread.h"
|
||||
struct Config; // forward declaration from config.h
|
||||
class LogcatThread; // forward declaration from logcat_thread.h
|
||||
|
||||
void event_loop(ImFont* monospace_font, Config& active_config, LogcatThread& logcat_thread);
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
#pragma once
|
||||
|
||||
#include <vector>
|
||||
#include "../config.h"
|
||||
struct Config; // forward declaration from ../config.h
|
||||
#include "../filters.h"
|
||||
|
||||
void filters_fragment(Config& active_config, Filters& __restrict active_filters, Filters& __restrict inactive_filters,
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
#pragma once
|
||||
|
||||
#include <imgui/imgui.h>
|
||||
struct ImVec2; // forward declaration from imgui/imgui.h
|
||||
|
||||
// The following code is slightly modified public domain code from https://github.com/thedmd
|
||||
// All modifications have an inline comment with "[CUSTOM]"
|
||||
|
|
|
@ -3,6 +3,7 @@
|
|||
#include <thread>
|
||||
#include <variant>
|
||||
#include "arb.h"
|
||||
#include "log.h"
|
||||
#include "logcat_entry.h"
|
||||
|
||||
typedef std::variant<LogEntry, LogcatEntry> LogcatThreadItem;
|
||||
|
|
3
misc.h
3
misc.h
|
@ -1,7 +1,8 @@
|
|||
#pragma once
|
||||
|
||||
#include <string>
|
||||
#include <imgui/imgui.h>
|
||||
typedef int ImGuiWindowFlags; // forward declaration from imgui/imgui.h
|
||||
typedef int ImGuiKeyChord; // forward declaration from imgui/imgui.h
|
||||
|
||||
std::string quote(const std::string& str);
|
||||
void throw_system_error(int err, const char* what);
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
#pragma once
|
||||
|
||||
#include "log.h"
|
||||
#include <string>
|
||||
void log(std::string message); // forward declaration from log.h
|
||||
|
||||
#define IM_ASSERT_USER_ERROR(expr,msg) do { if (!(expr)) { log(msg); } } while (0);
|
||||
#define IMGUI_DISABLE_OBSOLETE_FUNCTIONS
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
#pragma once
|
||||
|
||||
#include "../logcat_thread.h"
|
||||
class LogcatThread; // forward declaration from ../logcat_thread.h
|
||||
|
||||
void debug_window(LogcatThread& logcat_thread);
|
||||
|
|
|
@ -2,8 +2,8 @@
|
|||
|
||||
#include <vector>
|
||||
|
||||
struct Config; // forward declaration from ../config.h
|
||||
#include "../logcat_entry.h"
|
||||
#include "../config.h"
|
||||
|
||||
void exclusions_window(Config& __restrict active_config, Config& __restrict inactive_config,
|
||||
const std::vector<LogcatEntry>& logcat_entries, std::vector<size_t>& filtered_logcat_entry_offsets,
|
||||
|
|
|
@ -2,8 +2,8 @@
|
|||
|
||||
#include <vector>
|
||||
|
||||
struct Config; // forward declaration from ../config.h
|
||||
#include "../logcat_entry.h"
|
||||
#include "../config.h"
|
||||
|
||||
void filters_window(Config& __restrict active_config, Config& __restrict inactive_config,
|
||||
const std::vector<LogcatEntry>& logcat_entries, std::vector<size_t>& filtered_logcat_entry_offsets,
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
#pragma once
|
||||
|
||||
#include <imgui/imgui.h>
|
||||
struct ImFont; // forward declaration from imgui/imgui.h
|
||||
|
||||
void logs_window(ImFont* monospace_font, bool* __restrict autoscrolling, bool* __restrict p_open);
|
||||
|
|
|
@ -4,6 +4,7 @@
|
|||
#include <vector>
|
||||
|
||||
#include "../misc.h"
|
||||
#include "../config.h"
|
||||
#include "../logcat_entry.h"
|
||||
#include "../logcat_thread.h"
|
||||
#include "main.h"
|
||||
|
@ -113,7 +114,7 @@ void main_window(bool latest_log_entries_read, ImFont* monospace_font, LogcatThr
|
|||
|
||||
ImGui::SetNextWindowPos(ImGui::GetMainViewport()->WorkPos);
|
||||
ImGui::SetNextWindowSize(ImGui::GetMainViewport()->WorkSize);
|
||||
if (!ImGui::BeginWithCloseShortcut("LogMeow", nullptr,
|
||||
if (!ImGui::Begin("LogMeow", nullptr,
|
||||
ImGuiWindowFlags_NoDecoration | ImGuiWindowFlags_NoMove | ImGuiWindowFlags_NoBringToFrontOnFocus)) {
|
||||
ImGui::End();
|
||||
return;
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
#pragma once
|
||||
|
||||
#include <imgui/imgui.h>
|
||||
struct ImFont; // forward declaration from imgui/imgui.h
|
||||
#include <vector>
|
||||
|
||||
#include "../config.h"
|
||||
struct Config; // forward declaration from ../config.h
|
||||
class LogcatThread; // forward declaration from ../logcat_thread.h
|
||||
#include "../logcat_entry.h"
|
||||
#include "../logcat_thread.h"
|
||||
|
||||
void main_window(bool latest_log_entries_read, ImFont* monospace_font, LogcatThread& logcat_thread,
|
||||
std::vector<LogcatEntry>& logcat_entries, std::vector<size_t>& filtered_logcat_entry_offsets,
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
#pragma once
|
||||
|
||||
#include "../config.h"
|
||||
struct Config; // forward declaration from ../config.h
|
||||
|
||||
void settings_window(Config& __restrict active_config, Config& __restrict inactive_config, bool* p_open);
|
||||
|
|
Loading…
Reference in New Issue