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.
39 lines
857 B
39 lines
857 B
9 years ago
|
#ifndef MODGMT_GSFUNCS_H
|
||
|
#define MODGMT_GSFUNCS_H
|
||
|
#include <string>
|
||
|
#include <ghostscript/iapi.h>
|
||
|
#include <ghostscript/ierrors.h>
|
||
|
|
||
|
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
|