mirror of
				https://github.com/RGBCube/serenity
				synced 2025-10-31 19:12:43 +00:00 
			
		
		
		
	LibGUI: Define supported functions for using command line arguments
This commit is contained in:
		
							parent
							
								
									fabc717b39
								
							
						
					
					
						commit
						c4da2a49a5
					
				
					 2 changed files with 9 additions and 0 deletions
				
			
		|  | @ -23,6 +23,10 @@ GApplication::GApplication(int argc, char** argv) | |||
|     s_the = this; | ||||
|     m_event_loop = make<CEventLoop>(); | ||||
|     GWindowServerConnection::the(); | ||||
|     if (argc > 0) | ||||
|         m_invoked_as = argv[0]; | ||||
|     for (int i = 1; i < argc; i++) | ||||
|         m_args.append(argv[i]); | ||||
| } | ||||
| 
 | ||||
| GApplication::~GApplication() | ||||
|  |  | |||
|  | @ -35,6 +35,9 @@ public: | |||
| 
 | ||||
|     void did_delete_last_window(Badge<GWindow>); | ||||
| 
 | ||||
|     const String& invoked_as() const { return m_invoked_as; } | ||||
|     const Vector<String>& args() const { return m_args; } | ||||
| 
 | ||||
| private: | ||||
|     OwnPtr<CEventLoop> m_event_loop; | ||||
|     OwnPtr<GMenuBar> m_menubar; | ||||
|  | @ -42,4 +45,6 @@ private: | |||
|     class TooltipWindow; | ||||
|     TooltipWindow* m_tooltip_window { nullptr }; | ||||
|     bool m_quit_when_last_window_deleted { true }; | ||||
|     String m_invoked_as; | ||||
|     Vector<String> m_args; | ||||
| }; | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Conrad Pankoff
						Conrad Pankoff