mirror of
https://github.com/fastfetch-cli/fastfetch.git
synced 2026-10-29 16:26:39 +01:00
Refactor: move media detection to own header
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
#include "fastfetch.h"
|
||||
#include "detection/media.h"
|
||||
|
||||
#include <string.h>
|
||||
#include <pthread.h>
|
||||
|
||||
@@ -0,0 +1,20 @@
|
||||
#pragma once
|
||||
|
||||
#ifndef FF_INCLUDED_detection_media
|
||||
#define FF_INCLUDED_detection_media
|
||||
|
||||
#include "fastfetch.h"
|
||||
|
||||
typedef struct FFMediaResult
|
||||
{
|
||||
FFstrbuf busNameShort; //e.g. plasma-browser-integration
|
||||
FFstrbuf player; // e.g. Google Chrome
|
||||
FFstrbuf song;
|
||||
FFstrbuf artist;
|
||||
FFstrbuf album;
|
||||
FFstrbuf url;
|
||||
} FFMediaResult;
|
||||
|
||||
const FFMediaResult* ffDetectMedia(FFinstance* instance);
|
||||
|
||||
#endif
|
||||
@@ -189,16 +189,6 @@ typedef struct FFVulkanResult
|
||||
FFlist devices; //List of FFGPUResult
|
||||
} FFVulkanResult;
|
||||
|
||||
typedef struct FFMediaResult
|
||||
{
|
||||
FFstrbuf busNameShort; //e.g. plasma-browser-integration
|
||||
FFstrbuf player; // e.g. Google Chrome
|
||||
FFstrbuf song;
|
||||
FFstrbuf artist;
|
||||
FFstrbuf album;
|
||||
FFstrbuf url;
|
||||
} FFMediaResult;
|
||||
|
||||
//////////////////////
|
||||
// Init functions //
|
||||
//////////////////////
|
||||
@@ -226,9 +216,6 @@ void ffLogoBuiltinListAutocompletion();
|
||||
// Detection functions //
|
||||
/////////////////////////
|
||||
|
||||
//detection/media.c
|
||||
const FFMediaResult* ffDetectMedia(FFinstance* instance);
|
||||
|
||||
//detection/vulkan.c
|
||||
const FFVulkanResult* ffDetectVulkan(const FFinstance* instance);
|
||||
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
#include "fastfetch.h"
|
||||
#include "common/printing.h"
|
||||
#include "detection/media.h"
|
||||
|
||||
#include <ctype.h>
|
||||
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
#include "fastfetch.h"
|
||||
#include "common/printing.h"
|
||||
#include "detection/media.h"
|
||||
|
||||
#include <ctype.h>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user