mirror of
				https://github.com/RGBCube/serenity
				synced 2025-10-31 21:22:46 +00:00 
			
		
		
		
	 4f98a35beb
			
		
	
	
		4f98a35beb
		
	
	
	
	
		
			
			In order to move the WindowServer to userspace, I have to eliminate its dependence on system call facilities. The communication channel with each client needs to be message-based in both directions.
		
			
				
	
	
		
			26 lines
		
	
	
	
		
			482 B
		
	
	
	
		
			C++
		
	
	
	
	
	
			
		
		
	
	
			26 lines
		
	
	
	
		
			482 B
		
	
	
	
		
			C++
		
	
	
	
	
	
| #pragma once
 | |
| 
 | |
| #include <LibGUI/GMenu.h>
 | |
| #include <AK/Badge.h>
 | |
| #include <AK/OwnPtr.h>
 | |
| #include <AK/Vector.h>
 | |
| 
 | |
| class GApplication;
 | |
| 
 | |
| class GMenuBar {
 | |
| public:
 | |
|     GMenuBar();
 | |
|     ~GMenuBar();
 | |
| 
 | |
|     void add_menu(OwnPtr<GMenu>&&);
 | |
| 
 | |
|     void notify_added_to_application(Badge<GApplication>);
 | |
|     void notify_removed_from_application(Badge<GApplication>);
 | |
| 
 | |
| private:
 | |
|     int realize_menubar();
 | |
|     void unrealize_menubar();
 | |
| 
 | |
|     int m_menubar_id { 0 };
 | |
|     Vector<OwnPtr<GMenu>> m_menus;
 | |
| };
 |