| 
									
										
										
										
											2019-08-27 09:57:12 -05:00
										 |  |  | // Copyright (c) 2019 GitHub, Inc.
 | 
					
						
							|  |  |  | // Use of this source code is governed by the MIT license that can be
 | 
					
						
							|  |  |  | // found in the LICENSE file.
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2021-11-22 08:34:31 +01:00
										 |  |  | #ifndef ELECTRON_SHELL_BROWSER_UI_GTK_UTIL_H_
 | 
					
						
							|  |  |  | #define ELECTRON_SHELL_BROWSER_UI_GTK_UTIL_H_
 | 
					
						
							| 
									
										
										
										
											2019-10-28 18:12:35 -04:00
										 |  |  | 
 | 
					
						
							|  |  |  | #include <gtk/gtk.h>
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | class SkBitmap; | 
					
						
							| 
									
										
										
										
											2019-08-27 09:57:12 -05:00
										 |  |  | 
 | 
					
						
							|  |  |  | namespace gtk_util { | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2021-09-22 20:12:50 +02:00
										 |  |  | const char* GetCancelLabel(); | 
					
						
							|  |  |  | const char* GetOpenLabel(); | 
					
						
							|  |  |  | const char* GetSaveLabel(); | 
					
						
							|  |  |  | const char* GetOkLabel(); | 
					
						
							|  |  |  | const char* GetNoLabel(); | 
					
						
							|  |  |  | const char* GetYesLabel(); | 
					
						
							| 
									
										
										
										
											2019-08-27 09:57:12 -05:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2019-10-28 18:12:35 -04:00
										 |  |  | // Convert and copy a SkBitmap to a GdkPixbuf. NOTE: this uses BGRAToRGBA, so
 | 
					
						
							|  |  |  | // it is an expensive operation.  The returned GdkPixbuf will have a refcount of
 | 
					
						
							|  |  |  | // 1, and the caller is responsible for unrefing it when done.
 | 
					
						
							|  |  |  | GdkPixbuf* GdkPixbufFromSkBitmap(const SkBitmap& bitmap); | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2019-08-27 09:57:12 -05:00
										 |  |  | }  // namespace gtk_util
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2021-11-22 08:34:31 +01:00
										 |  |  | #endif  // ELECTRON_SHELL_BROWSER_UI_GTK_UTIL_H_
 |