modules/jdk.packager/src/main/native/library/common/LinuxPlatform.h

Print this page

        

@@ -1,7 +1,7 @@
 /*
- * Copyright (c) 2014, 2015, Oracle and/or its affiliates.
+ * Copyright (c) 2014, 2017, Oracle and/or its affiliates.
  * All rights reserved. Use is subject to license terms.
  *
  * This file is available and licensed under the following license:
  *
  * Redistribution and use in source and binary forms, with or without

@@ -39,21 +39,26 @@
 #define LINUXPLATFORM_H
 
 #include "PosixPlatform.h"
 #include "GenericPlatform.h"
 #include "JavaUserPreferences.h"
-
+#include <X11/Xlib.h>
+#include <X11/Xatom.h>
 #include <pthread.h>
+#include <list>
 
 
 #pragma warning( push )
 #pragma warning( disable : 4250 ) // C4250 - 'class1' : inherits 'class2::member'
 class LinuxPlatform : virtual public Platform, GenericPlatform, PosixPlatform
 {
 private:
     pthread_t FMainThread;
 
+protected:
+    virtual const char* getTmpDirString();
+
 public:
     LinuxPlatform(void);
     virtual ~LinuxPlatform(void);
 
     virtual void ShowMessage(TString title, TString description);

@@ -72,10 +77,11 @@
     virtual TString GetSystemJVMLibraryFileName();
     virtual TString GetSystemJRE();
 
     virtual ISectionalPropertyContainer* GetConfigFile(TString FileName);
 
+    virtual void reactivateAnotherInstance();
     virtual bool IsMainThread();
     virtual TPlatformNumber GetMemorySize();
 
 #ifdef DEBUG
     virtual bool IsNativeDebuggerPresent();

@@ -94,8 +100,22 @@
     ~LinuxJavaUserPreferences(void);
 
     virtual bool Load(TString Appid);
 };
 
+class ProcessReactivator {
+private:
+    void searchWindowHelper(Window w);
+
+    pid_t _pid;
+    Atom _atomPid;
+    Display* _display;
+    std::list<Window> _result;
+public:
+    ProcessReactivator(Display *display, pid_t pid);
+
+    void reactivateProcess();
+};
+
 #endif //LINUXPLATFORM_H
 
 #endif //LINUX