| 
									
										
										
										
											2013-04-17 23:09:55 -04:00
										 |  |  | // Copyright 2013 Dolphin Emulator Project
 | 
					
						
							|  |  |  | // Licensed under GPLv2
 | 
					
						
							|  |  |  | // Refer to the license.txt file included.
 | 
					
						
							| 
									
										
										
										
											2009-02-23 06:17:57 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-04-03 14:35:49 +00:00
										 |  |  | #ifndef _OSD_H_
 | 
					
						
							|  |  |  | #define _OSD_H_
 | 
					
						
							| 
									
										
										
										
											2009-02-23 06:17:57 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2013-08-24 02:13:54 +02:00
										 |  |  | #include <functional>
 | 
					
						
							| 
									
										
										
										
											2013-08-24 01:41:17 +02:00
										 |  |  | #include <string>
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | namespace OSD | 
					
						
							| 
									
										
										
										
											2009-02-23 06:17:57 +00:00
										 |  |  | { | 
					
						
							|  |  |  | // On-screen message display
 | 
					
						
							| 
									
										
										
										
											2013-08-24 01:41:17 +02:00
										 |  |  | void AddMessage(const std::string& str, u32 ms = 2000); | 
					
						
							| 
									
										
										
										
											2009-02-23 06:17:57 +00:00
										 |  |  | void DrawMessages(); // draw the current messages on the screen. Only call once per frame.
 | 
					
						
							| 
									
										
										
										
											2011-02-02 04:40:27 +00:00
										 |  |  | void ClearMessages(); | 
					
						
							| 
									
										
										
										
											2009-02-23 06:17:57 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2013-04-13 00:48:53 -05:00
										 |  |  | // On-screen callbacks
 | 
					
						
							|  |  |  | enum CallbackType | 
					
						
							|  |  |  | { | 
					
						
							|  |  |  | 	OSD_INIT = 0, | 
					
						
							|  |  |  | 	OSD_ONFRAME, | 
					
						
							|  |  |  | 	OSD_SHUTDOWN | 
					
						
							|  |  |  | }; | 
					
						
							| 
									
										
										
										
											2013-08-24 02:13:54 +02:00
										 |  |  | typedef std::function<void()> Callback; | 
					
						
							| 
									
										
										
										
											2013-04-13 00:48:53 -05:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2013-08-24 02:13:54 +02:00
										 |  |  | void AddCallback(CallbackType type, Callback cb); | 
					
						
							|  |  |  | void DoCallbacks(CallbackType type); | 
					
						
							|  |  |  | }  // namespace OSD
 | 
					
						
							| 
									
										
										
										
											2009-02-23 06:17:57 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-04-03 14:35:49 +00:00
										 |  |  | #endif // _OSD_H_
 |