Commit c2c55f83 authored by Tor Lillqvist's avatar Tor Lillqvist Committed by Tor Lillqvist
Browse files

gdk/win32/gdkcolor-win32.c gdk/win32/gdkscreen-win32.c Whitespace

2005-11-02  Tor Lillqvist  <tml@novell.com>

	* gdk/win32/gdkcolor-win32.c
	* gdk/win32/gdkscreen-win32.c
	* gdk/win32/gdkwindow-win32.c: Whitespace consistency
	fixes. Remove superfluous test for GdkWindow* parameters being
	non-NULL. Testing GDK_IS_WINDOW() is enough. As there is only one
	GdkScreen and one GdkDisplay in the Win32 backend, use those
	variables instead of the getter functions. For GdkDisplay* and
	GdkScreen* parameters, check that they are equal to the
	corresponding singleton variables instead of the more general
	GDK_IS_DISPLAY() or GDK_IS_SCREEN().
parent aa70008f
2005-11-02 Tor Lillqvist <tml@novell.com>
* gdk/win32/gdkcolor-win32.c
* gdk/win32/gdkscreen-win32.c
* gdk/win32/gdkwindow-win32.c: Whitespace consistency
fixes. Remove superfluous test for GdkWindow* parameters being
non-NULL. Testing GDK_IS_WINDOW() is enough. As there is only one
GdkScreen and one GdkDisplay in the Win32 backend, use those
variables instead of the getter functions. For GdkDisplay* and
GdkScreen* parameters, check that they are equal to the
corresponding singleton variables instead of the more general
GDK_IS_DISPLAY() or GDK_IS_SCREEN().
2005-11-02 Matthias Clasen <mclasen@redhat.com>
* gtk/gtktextview.c: Remove some g_return_if_fail() from
......
2005-11-02 Tor Lillqvist <tml@novell.com>
* gdk/win32/gdkcolor-win32.c
* gdk/win32/gdkscreen-win32.c
* gdk/win32/gdkwindow-win32.c: Whitespace consistency
fixes. Remove superfluous test for GdkWindow* parameters being
non-NULL. Testing GDK_IS_WINDOW() is enough. As there is only one
GdkScreen and one GdkDisplay in the Win32 backend, use those
variables instead of the getter functions. For GdkDisplay* and
GdkScreen* parameters, check that they are equal to the
corresponding singleton variables instead of the more general
GDK_IS_DISPLAY() or GDK_IS_SCREEN().
2005-11-02 Matthias Clasen <mclasen@redhat.com>
* gtk/gtktextview.c: Remove some g_return_if_fail() from
......
......@@ -599,6 +599,8 @@ gdk_screen_get_system_colormap (GdkScreen *screen)
static GdkColormap *colormap = NULL;
GdkColormapPrivateWin32 *private;
g_return_val_if_fail (screen == _gdk_screen, NULL);
if (!colormap)
{
colormap = g_object_new (gdk_colormap_get_type (), NULL);
......@@ -652,7 +654,7 @@ gdk_colormap_change (GdkColormap *colormap,
PALETTEENTRY *pe;
int i;
g_return_if_fail (colormap != NULL);
g_return_if_fail (GDK_IS_COLORMAP (colormap));
cmapp = GDK_WIN32_COLORMAP_DATA (colormap);
......@@ -694,7 +696,7 @@ gdk_colors_alloc (GdkColormap *colormap,
gint return_val;
gint i;
g_return_val_if_fail (GDK_IS_COLORMAP (colormap), 0);
g_return_val_if_fail (GDK_IS_COLORMAP (colormap), FALSE);
private = GDK_WIN32_COLORMAP_DATA (colormap);
......@@ -1143,6 +1145,7 @@ gdk_colormap_alloc_colors (GdkColormap *colormap,
g_return_val_if_fail (GDK_IS_COLORMAP (colormap), FALSE);
g_return_val_if_fail (colors != NULL, FALSE);
g_return_val_if_fail (success != NULL, ncolors);
private = GDK_WIN32_COLORMAP_DATA (colormap);
......@@ -1301,8 +1304,8 @@ gdk_colormap_match_color (GdkColormap *cmap,
GdkScreen*
gdk_colormap_get_screen (GdkColormap *cmap)
{
g_return_val_if_fail (cmap != NULL, NULL);
g_return_val_if_fail (GDK_IS_COLORMAP (cmap), NULL);
return gdk_screen_get_default ();
return _gdk_screen;
}
......@@ -47,7 +47,7 @@ gdk_screen_set_default_colormap (GdkScreen *screen,
{
GdkColormap *old_colormap;
g_return_if_fail (GDK_IS_SCREEN (screen));
g_return_if_fail (screen == _gdk_screen);
g_return_if_fail (GDK_IS_COLORMAP (colormap));
old_colormap = default_colormap;
......@@ -61,7 +61,7 @@ gdk_screen_set_default_colormap (GdkScreen *screen,
gint
gdk_screen_get_n_monitors (GdkScreen *screen)
{
g_return_val_if_fail (GDK_IS_SCREEN (screen), 0);
g_return_val_if_fail (screen == _gdk_screen, 0);
return _gdk_num_monitors;
}
......@@ -71,7 +71,7 @@ gdk_screen_get_monitor_geometry (GdkScreen *screen,
gint num_monitor,
GdkRectangle *dest)
{
g_return_if_fail (GDK_IS_SCREEN (screen));
g_return_if_fail (screen == _gdk_screen);
g_return_if_fail (num_monitor < _gdk_num_monitors);
g_return_if_fail (num_monitor >= 0);
......@@ -81,7 +81,7 @@ gdk_screen_get_monitor_geometry (GdkScreen *screen,
GdkColormap *
gdk_screen_get_rgba_colormap (GdkScreen *screen)
{
g_return_val_if_fail (GDK_IS_SCREEN (screen), NULL);
g_return_val_if_fail (screen == _gdk_screen, NULL);
return NULL;
}
......@@ -89,7 +89,7 @@ gdk_screen_get_rgba_colormap (GdkScreen *screen)
GdkVisual *
gdk_screen_get_rgba_visual (GdkScreen *screen)
{
g_return_val_if_fail (GDK_IS_SCREEN (screen), NULL);
g_return_val_if_fail (screen == _gdk_screen, NULL);
return NULL;
}
......@@ -97,7 +97,7 @@ gdk_screen_get_rgba_visual (GdkScreen *screen)
gint
gdk_screen_get_number (GdkScreen *screen)
{
g_return_val_if_fail (GDK_IS_SCREEN (screen), 0);
g_return_val_if_fail (screen == _gdk_screen, 0);
return 0;
}
......
This diff is collapsed.
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment