summaryrefslogtreecommitdiff
path: root/sj2/source/jscpp/sjapplet_impl.hxx
blob: c8d83b083255d037d1fcb22e8eef509940fcac54 (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
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
#include <cstdarg>

#ifdef SOLAR_JAVA
#include <jni.h>
#endif // SOLAR_JAVA

#ifdef SOLAR_JAVA
#include <com/sun/star/java/XJavaVM.hpp>
#include <com/sun/star/java/XJavaThreadRegister_11.hpp>
#else
#include <com/sun/star/uno/RuntimeException.hpp>
#endif // SOLAR_JAVA

#include "rtl/ref.hxx"
#include "com/sun/star/uno/Reference.hxx"
#include "jvmaccess/virtualmachine.hxx"

class Window;
class INetURLObject;
class SvCommandList;
class Size;
namespace com { namespace sun { namespace star { namespace uno {
    class XComponentContext;
} } } }

#ifdef SOLAR_JAVA
struct EmbeddedWindow;
#endif // SOLAR_JAVA

struct SjApplet2_Impl {
#ifdef SOLAR_JAVA
    Window 				* _pParentWin;

    rtl::Reference<jvmaccess::VirtualMachine> _virtualMachine;

    jobject		_joAppletExecutionContext;
    jclass		_jcAppletExecutionContext;

    EmbeddedWindow * _pEmbeddedWindow;
#endif // SOLAR_JAVA
    SjApplet2_Impl() throw(com::sun::star::uno::RuntimeException);
    ~SjApplet2_Impl() throw();

    void init(Window * pParentWin, 
              com::sun::star::uno::Reference<
                  com::sun::star::uno::XComponentContext > const & context,
              const INetURLObject & rDocBase, 
              const SvCommandList & rCmdList) throw(com::sun::star::uno::RuntimeException);

    void setSize(const Size & rSize) throw(com::sun::star::uno::RuntimeException);
    void restart() throw(com::sun::star::uno::RuntimeException);
    void reload() throw(com::sun::star::uno::RuntimeException);
    void start() throw(com::sun::star::uno::RuntimeException);
    void stop() throw(com::sun::star::uno::RuntimeException);
    void close() throw(com::sun::star::uno::RuntimeException);
};