summaryrefslogtreecommitdiffstats
path: root/src/newt/native/NewtCommon.c
Commit message (Collapse)AuthorAgeFilesLines
* Bug 1412: Fix commit a8c2de110a2254af137a3d99007cc77e3ecd8078Sven Gothel2019-12-061-4/+9
|
* Bug 1412 - JNI: NEWT Check & Handle Exception after calling back into Java ↵Sven Gothel2019-12-061-0/+1
| | | | (NewtCommon.c)
* Bug 1412 - JNI: NEWT Check & Handle Exception after calling back into Java ↵Sven Gothel2019-12-061-6/+33
| | | | (X11Display + X11Window)
* NEWT iOS: Support Multi-Touch Events, PixelScale, ..Sven Gothel2019-07-081-0/+5
| | | | | | | | | | | | | | | | | Note: Two subsequent commit will add some required change in the native UIWindow/UIView creation methods to actually make the NEWT view being displayed ;-) The demo 'com.jogamp.opengl.demos.ios.Hello' demonstrated a standard NEWT application running on iOS. Previous NativeWindow wrap-around demo is preserved in 'com.jogamp.opengl.demos.ios.Hello1'. Tested on ipad 11'inch arm64 and x86_64 simulation: - Using GearsES2 demo - PixelScale 1f, 2f and 0f - last two using max pixel scale - Touch w/ GearsES2 works: -- 1 finger rotate -- 2 finger drag -- 2 finger pinch-zoom gesture detection
* Copyright: Add missing Copyright tagSven Gothel2019-07-081-1/+27
| | | | | | | | | Adding the missing JogAmp copyright tag on certain files. Currently in debate whether 'JogAmp Community' is a legal Copyright tag in the first place, we might need to add (or replace it with) my authorship. However, as authorship is well documented via the git repository, this should be no real world issue.
* [Jogl|Nativewindow|Newt]Common: Align all ↵Sven Gothel2014-01-111-30/+66
| | | | | | | | | | | *Common_GetJNIEnv()/_ReleaseJNIEnv() Methods and Usage / Check arguments .. Since we still don't use inter-module native code sharing, align the JNIEnv get/release methods and usage. Most beneficary here is OSX and the GLDebugMessageHandle, both managed the JVM handle on their own - removed now. Also ensuring that *Common_init(..) is called for all modules on all platforms.
* NEWT/Native: NewtCommon_GetJNIEnv(..) adding 'asDaemon' flag, used by all ↵Sven Gothel2013-04-081-2/+7
| | | | OSX JNI attachments to save time since detachment is skipped.
* NativeWindow/Newt X11ErrorHandler enhancement / unification - don't throw ↵Sven Gothel2012-07-051-0/+19
| | | | | | | | | | | | exceptions. Handles also XAWT BadMatch X_SetInputFocus. X11ErrorHandler code now dumps proper information about the opcode and error message and the running Java thread. Having propery "nativewindow.debug.X11Util.XErrorStackDump" or "nativewindow.debug=all' set, a stack trace is dumped. Since the X11ErrorHandler may catch an XAWT error: BadMatch X_SetInputFocus, we cannot throw an exception and better keep running.
* NEWT/JOGL: MacOSX UpdateSven Gothel2011-09-251-0/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Feature related: - Added always-on-top - Added translucency - Child Window Position - AWT parent: manual traverse up the tree and calc position on screen (Problem: the parent view rect is not at the proper position, but covers the whole frame) EDTUtil related: - Works now w/ AWT ot headless (again) - OSX native JNI callbacks gathering JNIEnv properly and attaches/detaches thread. - AWT case: using AWT-Event which properly dispatches our cocoa events - MainThread (headless) case: Fork off thread w/ main class and kick off NSApp run(). This leads to same behavior as w/ AWT case. - Using DefaultEDTUtil - Cleanup MainThread (implements EDTUtil) - Currently not used as EDTUtil (osx), just as launcher - Removed EDTUtil impl code, reuse DefaultEDTUtil - Cleanup AWTEDTUtil (implements EDTUtil) - Currently not used as EDTUtil (osx)
* Misc cleanup, strings etcSven Gothel2011-04-241-2/+2
|
* Fix ScreenMode ; Add FatalError to NewtCommon.c ; Fix Windows BuildSven Gothel2010-10-291-14/+27
| | | | | | | | Fix ScreenMode - Avoid NPE/Out-of-memory: Return zero sized NewIntArrays instead of NULL. Fix Windows Build - ScreenMode still has a regression
* NEWT: ScreenMode changesSven Gothel2010-10-261-0/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - New type definition: ScreenMode { MonitorMode { SurfaceSize { Resolution, bpp }, ScreenSizeMM, refreshRate }, rotation }, where Resolution and ScreenSizeMM are of type DimensionReadOnly - ScreenMute instance is - immutable - hashable - cloneable The above allows fast query and storage w/o redundancies. More than 300 modes via permutation could be expected. ScreenMode impl. changes: ScreenImpl: To be implemented methods by native specialization: - protected int[] getScreenModeFirstImpl() - protected int[] getScreenModeNextImpl() - protected ScreenMode getCurrentScreenModeImpl() - protected boolean setCurrentScreenModeImpl(ScreenMode screenMode) The data unification etc is implemented generic using ScreenModeUtil and the 'int[]' streaming. ScreenModeStatus holds all ScreenMode related data and provides a locking strategy. ScreenModeListener provides a callback facility for ScreenMode change events. - Screens listen to ScreenModeStatus, so all FQN referenced Screen's receive the change. - Windows listen to Screen, to take appropriate action for the event (fullscreen, reshape). Misc: - Screen/Display: promoting 'addReference'/'removeReference' to public interface, so a user may trigger construction/destruction (-> junit tests, plus other clients than WindowImpl). - Gears: 'setSwapInterval' at 'reshape' instead of 'init', so it's reset when ScreenMode is changing. -
* NEWT Fixes:Sven Gothel2010-05-041-0/+13
- Common native in NewtCommon.c/.h - Add simple NEWTEventFiFo, providing a pattern to spool events by an EventListener and to process them where it impacts (GLEventListener ..) - Window [X11|Windows]: setSize/setPosition: - always store the values, - only act if valid and !fullscreen - Window [X11]: - Add requestFocus - Add setTitle - Fix parent/child window creation - Fix parent/child window fullscreen (reparenting) - JUnit Test: ParentTest: - Shows parent and client window animation - Client window shall be able to go into fullscreen, ie disconnect/reconnect from its parent. Test: Focus-client + type-'f' - Both windows receive/dispatch events properly