mirror of
https://github.com/polybar/polybar.git
synced 2024-11-11 13:50:56 -05:00
32 lines
764 B
C++
32 lines
764 B
C++
|
#pragma once
|
||
|
|
||
|
#include <cassert>
|
||
|
#include <cmath>
|
||
|
#include <stdexcept>
|
||
|
#include <string>
|
||
|
|
||
|
#include "components/types.hpp"
|
||
|
#include "utils/string.hpp"
|
||
|
|
||
|
POLYBAR_NS
|
||
|
|
||
|
namespace units_utils {
|
||
|
int point_to_pixel(double point, double dpi);
|
||
|
|
||
|
int extent_to_pixel(const extent_val size, double dpi);
|
||
|
unsigned extent_to_pixel_nonnegative(const extent_val size, double dpi);
|
||
|
|
||
|
extent_type parse_extent_unit(const string& str);
|
||
|
extent_val parse_extent(const string& str);
|
||
|
|
||
|
string extent_to_string(extent_val extent);
|
||
|
|
||
|
unsigned percentage_with_offset_to_pixel(percentage_with_offset g_format, double max, double dpi);
|
||
|
|
||
|
spacing_type parse_spacing_unit(const string& str);
|
||
|
spacing_val parse_spacing(const string& str);
|
||
|
|
||
|
} // namespace units_utils
|
||
|
|
||
|
POLYBAR_NS_END
|