You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
42 lines
902 B
42 lines
902 B
#ifndef MODGMT_GSFUNCS_H |
|
#define MODGMT_GSFUNCS_H |
|
#include <string> |
|
#include <ghostscript/iapi.h> |
|
#include <ghostscript/ierrors.h> |
|
|
|
#ifndef e_Quit |
|
#define e_Quit (-101) |
|
#endif |
|
|
|
struct gs_abilities_struct |
|
{ |
|
bool havepngmono,havepngmonod,havepng16,havepng256,havepnggray,havepng16m; |
|
bool havejpeg,havejpeggray; |
|
bool havepdf,havebbox; |
|
}; |
|
|
|
extern struct gs_abilities_struct gs_abilities; |
|
|
|
struct gs_runtime |
|
{ |
|
union |
|
{ |
|
struct |
|
{ |
|
const std::string* in; |
|
uint pos; |
|
}; |
|
void* indata; |
|
}; |
|
std::string* out; |
|
std::string* err; |
|
}; |
|
|
|
typedef int (*gs_callback)(void *caller_handle, char *buf, int len); |
|
|
|
int GhostRun(const std::string& opts, const std::string& input, std::string* sout, std::string* serr, std::string* out); |
|
int GhostRun(const std::string& opts, gs_callback input, void* inputdata, std::string* sout, std::string* serr, std::string* out); |
|
|
|
void CheckGhostscriptAbilities(); |
|
|
|
#endif
|
|
|