File: xpcominit.cpp

package info (click to toggle)
swt-gtk 3.5.1-2.1
  • links: PTS, VCS
  • area: main
  • in suites: squeeze
  • size: 11,744 kB
  • ctags: 23,317
  • sloc: java: 109,142; ansic: 30,160; cpp: 8,948; sh: 125; makefile: 55; xml: 42
file content (77 lines) | stat: -rw-r--r-- 3,131 bytes parent folder | download | duplicates (2)
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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
/*******************************************************************************
 * Copyright (c) 2000, 2008 IBM Corporation and others.
 * All rights reserved. This program and the accompanying materials
 * are made available under the terms of the Eclipse Public License v1.0
 * which accompanies this distribution, and is available at
 * http://www.eclipse.org/legal/epl-v10.html
 *
 * Contributors:
 *    IBM Corporation - initial API and implementation
 *******************************************************************************/

#include "swt.h"
#include "xpcominit_structs.h"
#include "xpcominit_stats.h"

#define XPCOMInit_NATIVE(func) Java_org_eclipse_swt_internal_mozilla_init_XPCOMInit_##func

#ifndef NO_GREVersionRange_1sizeof
extern "C" JNIEXPORT jint JNICALL XPCOMInit_NATIVE(GREVersionRange_1sizeof)(JNIEnv *env, jclass that);
JNIEXPORT jint JNICALL XPCOMInit_NATIVE(GREVersionRange_1sizeof)
	(JNIEnv *env, jclass that)
{
	jint rc = 0;
	XPCOMInit_NATIVE_ENTER(env, that, GREVersionRange_1sizeof_FUNC);
	rc = (jint)GREVersionRange_sizeof();
	XPCOMInit_NATIVE_EXIT(env, that, GREVersionRange_1sizeof_FUNC);
	return rc;
}
#endif

#ifndef NO__1GRE_1GetGREPathWithProperties
extern "C" JNIEXPORT jint JNICALL XPCOMInit_NATIVE(_1GRE_1GetGREPathWithProperties)(JNIEnv *env, jclass that, jobject arg0, jint arg1, jintLong arg2, jint arg3, jintLong arg4, jint arg5);
JNIEXPORT jint JNICALL XPCOMInit_NATIVE(_1GRE_1GetGREPathWithProperties)
	(JNIEnv *env, jclass that, jobject arg0, jint arg1, jintLong arg2, jint arg3, jintLong arg4, jint arg5)
{
	GREVersionRange _arg0, *lparg0=NULL;
	jint rc = 0;
	XPCOMInit_NATIVE_ENTER(env, that, _1GRE_1GetGREPathWithProperties_FUNC);
	if (arg0) if ((lparg0 = getGREVersionRangeFields(env, arg0, &_arg0)) == NULL) goto fail;
	rc = (jint)GRE_GetGREPathWithProperties((const GREVersionRange *)lparg0, arg1, (const GREProperty *)arg2, arg3, (char *)arg4, arg5);
fail:
	if (arg0 && lparg0) setGREVersionRangeFields(env, arg0, lparg0);
	XPCOMInit_NATIVE_EXIT(env, that, _1GRE_1GetGREPathWithProperties_FUNC);
	return rc;
}
#endif

#ifndef NO__1XPCOMGlueShutdown
extern "C" JNIEXPORT jint JNICALL XPCOMInit_NATIVE(_1XPCOMGlueShutdown)(JNIEnv *env, jclass that);
JNIEXPORT jint JNICALL XPCOMInit_NATIVE(_1XPCOMGlueShutdown)
	(JNIEnv *env, jclass that)
{
	jint rc = 0;
	XPCOMInit_NATIVE_ENTER(env, that, _1XPCOMGlueShutdown_FUNC);
	rc = (jint)XPCOMGlueShutdown();
	XPCOMInit_NATIVE_EXIT(env, that, _1XPCOMGlueShutdown_FUNC);
	return rc;
}
#endif

#ifndef NO__1XPCOMGlueStartup
extern "C" JNIEXPORT jint JNICALL XPCOMInit_NATIVE(_1XPCOMGlueStartup)(JNIEnv *env, jclass that, jbyteArray arg0);
JNIEXPORT jint JNICALL XPCOMInit_NATIVE(_1XPCOMGlueStartup)
	(JNIEnv *env, jclass that, jbyteArray arg0)
{
	jbyte *lparg0=NULL;
	jint rc = 0;
	XPCOMInit_NATIVE_ENTER(env, that, _1XPCOMGlueStartup_FUNC);
	if (arg0) if ((lparg0 = env->GetByteArrayElements(arg0, NULL)) == NULL) goto fail;
	rc = (jint)XPCOMGlueStartup((const char *)lparg0);
fail:
	if (arg0 && lparg0) env->ReleaseByteArrayElements(arg0, lparg0, 0);
	XPCOMInit_NATIVE_EXIT(env, that, _1XPCOMGlueStartup_FUNC);
	return rc;
}
#endif