summaryrefslogtreecommitdiff
path: root/helpers.h
blob: b5f4cdd0cf10dd2158a9cf33e0f86842d94dd051 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
#ifndef __HELPERS_H
#define __HELPERS_H

#include <vdr/osd.h>
#include <vdr/plugin.h>

cOsd *CreateOsd(int Left, int Top, int Width, int Height);
void DrawBlendedBackground(cPixmap *pixmap, int xStart, int width, tColor color, tColor colorBlending, bool fromTop);
void DrawRoundedCorners(cPixmap *p, int radius, int x, int y, int width, int height);
void DrawRoundedCornersWithBorder(cPixmap *p, tColor borderColor, int radius, int width, int height);
void DrawProgressbar(cPixmap *p, int left, int top, int width, int height, int Current, int Total, tColor color, tColor colorBlending, bool blend = false);
cSize ScaleToFit(int widthMax, int heightMax, int widthOriginal, int heightOriginal);
int Minimum(int a, int b, int c, int d, int e, int f);
std::string CutText(std::string text, int width, const cFont *font);
std::string StrToLowerCase(std::string str);
cString GetScreenResolutionIcon(void);

class splitstring : public std::string {
    std::vector<std::string> flds;
public:
    splitstring(const char *s) : std::string(s) { };
    std::vector<std::string>& split(char delim, int rep=0);
};

cPlugin *GetScraperPlugin(void);

#endif // __HELPERS_H