Mon 21 Jul 22:43:21 CEST 2025
This commit is contained in:
		
							parent
							
								
									fa39d86e02
								
							
						
					
					
						commit
						4987125010
					
				
							
								
								
									
										15
									
								
								js/x11/core/examples/simple/creategc.js
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										15
									
								
								js/x11/core/examples/simple/creategc.js
									
									
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,15 @@ | |||
| var x11 = require('../../lib'); | ||||
| 
 | ||||
| var PointerMotion = x11.eventMask.PointerMotion; | ||||
| x11.createClient(function(err, display) { | ||||
|     var X = display.client; | ||||
|     var root = display.screen[0].root; | ||||
|     var white = display.screen[0].white_pixel; | ||||
|     var black = display.screen[0].black_pixel; | ||||
| 
 | ||||
|     var wid = X.AllocID(); | ||||
|     X.CreateWindow(wid, root, 0, 0, 400, 300, 0, 0, 0, 0, { backgroundPixel: white, eventMask: PointerMotion });  | ||||
|     var gc = X.AllocID(); | ||||
|     X.CreateGC(gc, wid);      | ||||
|     X.MapWindow(wid); | ||||
| }); | ||||
		Loading…
	
		Reference in New Issue
	
	Block a user