mirror of
				https://gitlab.freedesktop.org/wayland/wayland.git
				synced 2025-11-03 09:01:42 -05:00 
			
		
		
		
	shm: Add shm_buffer getters for width and height
This commit is contained in:
		
							parent
							
								
									0a9cd16f6a
								
							
						
					
					
						commit
						7ba218c9f8
					
				
					 2 changed files with 22 additions and 0 deletions
				
			
		| 
						 | 
					@ -428,6 +428,12 @@ wl_shm_buffer_get_stride(struct wl_buffer *buffer);
 | 
				
			||||||
uint32_t
 | 
					uint32_t
 | 
				
			||||||
wl_shm_buffer_get_format(struct wl_buffer *buffer);
 | 
					wl_shm_buffer_get_format(struct wl_buffer *buffer);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					int32_t
 | 
				
			||||||
 | 
					wl_shm_buffer_get_width(struct wl_buffer *buffer);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					int32_t
 | 
				
			||||||
 | 
					wl_shm_buffer_get_height(struct wl_buffer *buffer);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
int
 | 
					int
 | 
				
			||||||
wl_buffer_is_shm(struct wl_buffer *buffer);
 | 
					wl_buffer_is_shm(struct wl_buffer *buffer);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -291,3 +291,19 @@ wl_shm_buffer_get_format(struct wl_buffer *buffer_base)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	return buffer->format;
 | 
						return buffer->format;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					WL_EXPORT uint32_t
 | 
				
			||||||
 | 
					wl_shm_buffer_get_width(struct wl_buffer *buffer_base)
 | 
				
			||||||
 | 
					{
 | 
				
			||||||
 | 
						struct wl_shm_buffer *buffer = (struct wl_shm_buffer *) buffer_base;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						return buffer->base.width;
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					WL_EXPORT uint32_t
 | 
				
			||||||
 | 
					wl_shm_buffer_get_height(struct wl_buffer *buffer_base)
 | 
				
			||||||
 | 
					{
 | 
				
			||||||
 | 
						struct wl_shm_buffer *buffer = (struct wl_shm_buffer *) buffer_base;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						return buffer->base.height;
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue