Bug 1186 - NEWT Window: Use a Bitfield holding all state flags and expose it accordingly.
Summary: NEWT Window: Use a Bitfield holding all state flags and expose it accordingly.
Status: RESOLVED FIXED
Alias: None
Product: Newt
Classification: JogAmp
Component: core (show other bugs)
Version: 2.3.2
Hardware: All all
: --- enhancement
Assignee: Sven Gothel
URL:
Depends on:
Blocks: 637 1188
  Show dependency treegraph
 
Reported: 2015-08-03 17:47 CEST by Sven Gothel
Modified: 2015-09-27 03:25 CEST (History)
0 users

See Also:
Type: FEATURE
SCM Refs:
gluegen e241034942725b7a189cb6186fd331d9defde7bc gluegen 0caa9474833a224060b9e4deefb7e0b171a8f273 gluegen 6296e71c438c45efa5e952b77245dd8c4a3afbbb gluegen c0f38b3f8d862d8ce38c36ad7459494a11d833e3 gluegen 805800e9b02acf54a6cc5a04ce94c9b465c42f43 gluegen 047e9adaf2a5f51f7acfa194a744c99b6bfadaea gluegen 8342d3bdbe2e14ad44dfc708e00daf721dae6a58 gluegen 74c25e4f1ee32686229c4032671b94022269d33b gluegen bea171a16539b16b493acc9cc0e102985e2939a6 gluegen fb970d92bc737afe34e23a0667b1737c6b105fde jogl 1a8b5c63c2f5328724a84ced2fa16a04ee6e8ac5 jogl 87f29ea276d70171bbf227c0800991349ccf4873 jogl 24b646d387b3d85467bb22763b016a556d665707 jogl da1a4cc5bc4a7fda0605709b61a63564b9070378 jogl 2d837a7a7130702ad36b694875613fae77c7ef06
Workaround: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Sven Gothel 2015-08-03 17:47:18 CEST
Instead of having 10s of boolean fields for tracking
NEWTs Window states like visibility, decoration, always-on-top, 
pointer-visibility, ..
we shall utilize a Bitfield to hold these states efficiently.

Further we shall expose this via an API entry
and enum-type holding all states.

The core state API methods may stay intact (visibility, fullscreen),
more 'simple' states like decoration, always-on-top, pointer-visibility, .. 
shall get folded into the new single get/set API using the enum-type.
Comment 1 Sven Gothel 2015-08-03 17:54:49 CEST
gluegen e241034942725b7a189cb6186fd331d9defde7bc
gluegen 0caa9474833a224060b9e4deefb7e0b171a8f273
gluegen 6296e71c438c45efa5e952b77245dd8c4a3afbbb
gluegen c0f38b3f8d862d8ce38c36ad7459494a11d833e3
gluegen 805800e9b02acf54a6cc5a04ce94c9b465c42f43
gluegen 047e9adaf2a5f51f7acfa194a744c99b6bfadaea
gluegen 8342d3bdbe2e14ad44dfc708e00daf721dae6a58
gluegen 74c25e4f1ee32686229c4032671b94022269d33b
gluegen bea171a16539b16b493acc9cc0e102985e2939a6
gluegen fb970d92bc737afe34e23a0667b1737c6b105fde

^^ Implement GlueGen's new Bitfield interface
using 32bit integer field and array,
depending on desired bitsize.
All validated by unit tests.
Comment 2 Sven Gothel 2015-08-03 17:56:31 CEST
jogl 1a8b5c63c2f5328724a84ced2fa16a04ee6e8ac5
jogl 87f29ea276d70171bbf227c0800991349ccf4873
jogl 24b646d387b3d85467bb22763b016a556d665707
jogl da1a4cc5bc4a7fda0605709b61a63564b9070378

- Use GlueGen's Bitfield instead of IntBitfield
- NEWT.WindowImpl: Adopt synchronized Bitfield for state flags
  replacing 11 booleans.
Comment 3 Sven Gothel 2015-08-10 15:48:10 CEST
(In reply to comment #0)
> Instead of having 10s of boolean fields for tracking
> NEWTs Window states like visibility, decoration, always-on-top, 
> pointer-visibility, ..
> we shall utilize a Bitfield to hold these states efficiently.
> 
> Further we shall expose this via an API entry
> and enum-type holding all states.

No enum-type, due to efficiency.

> 
> The core state API methods may stay intact (visibility, fullscreen),
> more 'simple' states like decoration, always-on-top, pointer-visibility, .. 
> shall get folded into the new single get/set API using the enum-type.

get state via bit-field, however the explicit API 
  [get|set]<FEATURE>(..)
stays intact.
Comment 4 Sven Gothel 2015-08-10 16:25:35 CEST
commit 2d837a7a7130702ad36b694875613fae77c7ef06

- refine state bits/mask and usage