Hyprland/src/helpers/MiscFunctions.hpp

17 lines
733 B
C++
Raw Normal View History

2022-03-28 16:10:30 +02:00
#pragma once
#include "../includes.hpp"
2022-04-02 19:09:27 +02:00
void addWLSignal(wl_signal*, wl_listener*, void* pOwner, std::string ownerString);
2022-04-04 19:44:25 +02:00
void wlr_signal_emit_safe(struct wl_signal *signal, void *data);
std::string getFormat(const char *fmt, ...); // Basically Debug::log to a string
2022-04-18 13:25:27 +02:00
void scaleBox(wlr_box*, float);
2022-04-20 16:53:41 +02:00
std::string removeBeginEndSpacesTabs(std::string);
2022-06-26 22:15:06 +02:00
bool isNumber(const std::string&, bool allowfloat = false);
2022-05-05 12:50:25 +02:00
bool isDirection(const std::string&);
2022-05-18 12:18:58 +02:00
int getWorkspaceIDFromString(const std::string&, std::string&);
float vecToRectDistanceSquared(const Vector2D& vec, const Vector2D& p1, const Vector2D& p2);
2022-06-25 20:49:06 +02:00
void logSystemInfo();
std::string execAndGet(const char*);
2022-04-20 16:53:41 +02:00
float getPlusMinusKeywordResult(std::string in, float relative);