File: instance_data.h

package info (click to toggle)
ghostscript 10.0.0~dfsg-11%2Bdeb12u7
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 98,252 kB
  • sloc: ansic: 891,828; python: 7,649; cpp: 6,493; cs: 6,209; sh: 6,043; java: 4,028; perl: 2,372; tcl: 1,639; makefile: 521; awk: 66; javascript: 43; yacc: 18
file content (35 lines) | stat: -rw-r--r-- 1,163 bytes parent folder | download | duplicates (6)
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
28
29
30
31
32
33
34
35
#pragma once

#include <jni.h>

#include "settings.h"

/*
This class stores data about a Ghostscript instance.
*/
class GSInstanceData
{
public:
	void *instance = NULL;			// The Ghostscript instance
	void *callerHandle = NULL;		// The caller handle passed to gsapi_new_instance
	void *stdioHandle = NULL;		// The caller handle passed to gsapi_set_stdio_with_handle
	void *displayHandle = NULL;		// The handle passed to display callbacks

	JNIEnv *env = NULL;				// The JNIEnv which should be used for JNI API calls

	jobject stdIn = NULL;			// The user IStdInFunction class for stdin input
	jobject stdOut = NULL;			// The user IStdOutFunction class for stdout output
	jobject stdErr = NULL;			// The user IStdErrFunction class for stderr output

	jobject poll = NULL;			// The user IPollFunction class

	jobject displayCallback = NULL;	// The user DisplayCallback class

	jobject callout = NULL;			// The user ICalloutFunction class

	bool hasinit = false;			// Whether the user has called init_with_args
};

GSInstanceData *putInstanceData(GSInstanceData *data);
GSInstanceData *findDataFromInstance(void *instance);
void deleteDataFromInstance(void *instance);