mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-09-30 11:07:38 +00:00
API: Add gdk_pixmap_get_size()
Allows querying a pixmap's size when compiling with deprecations.
This commit is contained in:
parent
174158bf9c
commit
176218c5a0
@ -259,6 +259,7 @@ gdk_pixmap_create_from_xpm
|
||||
gdk_pixmap_colormap_create_from_xpm
|
||||
gdk_pixmap_create_from_xpm_d
|
||||
gdk_pixmap_colormap_create_from_xpm_d
|
||||
gdk_pixmap_get_size
|
||||
gdk_pixmap_ref
|
||||
gdk_pixmap_unref
|
||||
GdkBitmap
|
||||
|
@ -1006,6 +1006,7 @@ gdk_pixmap_create_from_data
|
||||
gdk_pixmap_create_from_xpm
|
||||
gdk_pixmap_colormap_create_from_xpm_d
|
||||
gdk_pixmap_create_from_xpm_d
|
||||
gdk_pixmap_get_size
|
||||
gdk_pixmap_get_type G_GNUC_CONST
|
||||
gdk_pixmap_new
|
||||
#endif
|
||||
|
@ -152,7 +152,8 @@ gdk_drawable_get_data (GdkDrawable *drawable,
|
||||
* size is the size reported in the most-recently-processed configure
|
||||
* event, rather than the current size on the X server.
|
||||
*
|
||||
* Deprecated: 2.24: Use gdk_window_get_width() and gdk_window_get_height()
|
||||
* Deprecated: 2.24: Use gdk_window_get_width() and gdk_window_get_height() for
|
||||
* #GdkWindows. Use gdk_pixmap_get_size() for #GdkPixmaps.
|
||||
*/
|
||||
void
|
||||
gdk_drawable_get_size (GdkDrawable *drawable,
|
||||
|
@ -843,5 +843,27 @@ gdk_pixmap_real_get_screen (GdkDrawable *drawable)
|
||||
return gdk_drawable_get_screen (GDK_PIXMAP_OBJECT (drawable)->impl);
|
||||
}
|
||||
|
||||
/**
|
||||
* gdk_pixmap_get_size:
|
||||
* @pixmap: a #GdkPixmap
|
||||
* @width: (out) (allow-none): location to store @pixmap's width, or %NULL
|
||||
* @height: (out) (allow-none): location to store @pixmap's height, or %NULL
|
||||
*
|
||||
* This function is purely to make it possible to query the size of pixmaps
|
||||
* even when compiling without deprecated symbols and you must use pixmaps.
|
||||
* It is identical to gdk_drawable_get_size(), but for pixmaps.
|
||||
*
|
||||
* Since: 2.24
|
||||
**/
|
||||
void
|
||||
gdk_pixmap_get_size (GdkPixmap *pixmap,
|
||||
gint *width,
|
||||
gint *height)
|
||||
{
|
||||
g_return_if_fail (GDK_IS_PIXMAP (pixmap));
|
||||
|
||||
gdk_drawable_get_size (pixmap, width, height);
|
||||
}
|
||||
|
||||
#define __GDK_PIXMAP_C__
|
||||
#include "gdkaliasdef.c"
|
||||
|
@ -103,6 +103,10 @@ GdkPixmap* gdk_pixmap_colormap_create_from_xpm_d (GdkDrawable *drawable,
|
||||
gchar **data);
|
||||
#endif
|
||||
|
||||
void gdk_pixmap_get_size (GdkPixmap *pixmap,
|
||||
gint *width,
|
||||
gint *height);
|
||||
|
||||
/* Functions to create/lookup pixmaps from their native equivalents
|
||||
*/
|
||||
#ifndef GDK_MULTIHEAD_SAFE
|
||||
|
Loading…
Reference in New Issue
Block a user