首页> 外国专利> Method of integrating X Window Intrinsics based toolkits and widgets with JAVA

Method of integrating X Window Intrinsics based toolkits and widgets with JAVA

机译:将基于X Window Intrinsics的工具包和小部件与JAVA集成的方法

摘要

A method of integrating an Xt Intrinsics based toolkit with a JAVA application. The application includes a process thread that implements an X event loop and an application thread that suspends execution of the event loop to allow a call to be made through the JAVA Native Interface to a toolkit or a widget to cause something to be displayed. The application thread includes a write socket to communicate a token to a read socket of the event loop, and performs a blocking read suspending the thread. The event loop returns an acknowledgment token via a write socket to a read socket of the thread that unblocks its blocking read and the event loop invokes its own blocking read suspending its execution. The file descriptor function, XtAppAddInput, preferably, is used to read the token and to set the blocking read. After a toolkit call is made, a token is sent from a second write socket of the thread to a second read socket of the event loop that unblocks its blocking read resuming the event loop. JAVA multithreading support services, such as JAVA's wait and notifyAll methods, are employed in multithreaded applications to ensure that only one thread at a time can make a call. Use of a separate Intrinsics application context to service the event loop is employed, windows are managed in separate hierarchies associated with each application context, and a special JAVA Canvas manages native windows transparent to the programmer.
机译:一种将基于Xt Intrinsics的工具箱与JAVA应用程序集成的方法。该应用程序包括一个实现X事件循环的进程线程和一个中止事件循环执行的应用程序线程,以允许通过JAVA本机接口对工具箱或窗口小部件进行调用以显示某些内容。应用程序线程包括一个写套接字,用于将令牌传递到事件循环的读套接字,并执行阻塞读取,从而使线程挂起。事件循环通过写套接字向线程的读套接字返回确认令牌,该线程取消阻塞读的阻塞,而事件循环调用自己的阻塞读以中止执行。文件描述符函数XtAppAddInput最好用于读取令牌并设置阻止读取。进行工具包调用后,将令牌从线程的第二个写套接字发送到事件循环的第二个读套接字,以解除阻塞,恢复事件循环。 JAVA多线程支持服务(例如JAVA的wait和notifyAll方法)用于多线程应用程序中,以确保一次只能有一个线程可以进行调用。使用单独的Intrinsics应用程序上下文来服务事件循环,在与每个应用程序上下文关联的单独的层次结构中管理窗口,并且特殊的JAVA Canvas管理对程序员透明的本机窗口。

著录项

相似文献

  • 专利
  • 外文文献
  • 中文文献
获取专利

客服邮箱:kefu@zhangqiaokeyan.com

京公网安备:11010802029741号 ICP备案号:京ICP备15016152号-6 六维联合信息科技 (北京) 有限公司©版权所有
  • 客服微信

  • 服务号