github.com/racerxdl/gonx@v0.0.0-20210103083128-c5afc43bcbd2/services/display/window.go (about) 1 package display 2 3 import ( 4 "github.com/racerxdl/gonx/nx/nxtypes" 5 "github.com/racerxdl/gonx/services/vi" 6 ) 7 8 const ( 9 // From Android window.h. 10 /* attributes queriable with query() */ 11 NativeWindowWidth = 0 12 NativeWindowHeight = 1 13 NativeWindowFormat = 2 14 ) 15 16 // From Android window.h. 17 /* parameter for NATIVE_WINDOW_[API_][DIS]CONNECT */ 18 //... 19 /* Buffers will be queued after being filled using the CPU 20 */ 21 const NativeWindowAPICPU = 2 22 23 type BqRect struct { 24 Left int32 25 Top int32 26 Right int32 27 Bottom int32 28 } 29 30 type NativeWindow struct { 31 Magic uint32 32 bq vi.Binder 33 event nxtypes.Event 34 SlotsConfigured uint64 35 SlotsRequested uint64 36 CurSlot int32 37 Width uint32 38 Height uint32 39 Format uint32 40 Usage uint32 41 Crop BqRect 42 ScalingMode uint32 43 Transform uint32 44 StickyTransform uint32 45 DefaultWidth uint32 46 DefaultHeight uint32 47 SwapInterval uint32 48 IsConnected bool 49 ProducerControlledByApp bool 50 ConsumerRunningBehind bool 51 }