Commit fc7e845c authored by Owen Taylor's avatar Owen Taylor Committed by Owen Taylor

configure.in gdk/gdk.[ch] gdk/gdkcc.c gdk/gdkglobals.c

Thu Feb 19 01:11:48 1998  Owen Taylor  <owt1@cornell.edu>

	* configure.in         gdk/gdk.[ch]         gdk/gdkcc.c
	  gdk/gdkglobals.c     gdk/gdkinputcommon.h gdk/gdkprivate.h
	  gdk/gdkvisual.c      glib/configure.in    glib/glib.h
	  glib/gutils.c        gtk/Makefile.am      gtk/gtkmain.c
	  gtk/gtkobject.[ch]   gtk/gtkdebug.h       docs/debugging.txt

	New system for controlling debugging:

	* --enable-debug=[no/yes/minimum]
	* G_DISABLE_ASSERT and G_DISABLE_CHECKS for glib
	* G_NO_CHECK_CASTS to control cast checking
	* G_ENABLE_DEBUG enables run time checking which controls:
	    Object tracing
	    Showing events
	    Miscellaneous g_print's in GDK
	  And is controlled by --gdk-debug/GDK_DEBUG, --gtk-debug/GTK_DEBUG
        * debug_level and show_events are gone from GTK

	See docs/debugging.txt for details.

	And some fixups to the configure.in's so '-g' can be
	overriden on the command line for --enable-debug
parent 3d4cc2f9
Thu Feb 19 01:11:48 1998 Owen Taylor <owt1@cornell.edu>
* configure.in gdk/gdk.[ch] gdk/gdkcc.c
gdk/gdkglobals.c gdk/gdkinputcommon.h gdk/gdkprivate.h
gdk/gdkvisual.c glib/configure.in glib/glib.h
glib/gutils.c gtk/Makefile.am gtk/gtkmain.c
gtk/gtkobject.[ch] gtk/gtkdebug.h docs/debugging.txt
New system for controlling debugging:
* --enable-debug=[no/yes/minimum]
* G_DISABLE_ASSERT and G_DISABLE_CHECKS for glib
* G_NO_CHECK_CASTS to control cast checking
* G_ENABLE_DEBUG enables run time checking which controls:
Object tracing
Showing events
Miscellaneous g_print's in GDK
And is controlled by --gdk-debug/GDK_DEBUG, --gtk-debug/GTK_DEBUG
* debug_level and show_events are gone from GTK
See docs/debugging.txt for details.
And some fixups to the configure.in's so '-g' can be
overriden on the command line for --enable-debug
Thu Feb 19 05:40:51 1998 Tim Janik <timj@gimp.org>
* gtk/gtknotebook.h:
......
Thu Feb 19 01:11:48 1998 Owen Taylor <owt1@cornell.edu>
* configure.in gdk/gdk.[ch] gdk/gdkcc.c
gdk/gdkglobals.c gdk/gdkinputcommon.h gdk/gdkprivate.h
gdk/gdkvisual.c glib/configure.in glib/glib.h
glib/gutils.c gtk/Makefile.am gtk/gtkmain.c
gtk/gtkobject.[ch] gtk/gtkdebug.h docs/debugging.txt
New system for controlling debugging:
* --enable-debug=[no/yes/minimum]
* G_DISABLE_ASSERT and G_DISABLE_CHECKS for glib
* G_NO_CHECK_CASTS to control cast checking
* G_ENABLE_DEBUG enables run time checking which controls:
Object tracing
Showing events
Miscellaneous g_print's in GDK
And is controlled by --gdk-debug/GDK_DEBUG, --gtk-debug/GTK_DEBUG
* debug_level and show_events are gone from GTK
See docs/debugging.txt for details.
And some fixups to the configure.in's so '-g' can be
overriden on the command line for --enable-debug
Thu Feb 19 05:40:51 1998 Tim Janik <timj@gimp.org>
* gtk/gtknotebook.h:
......
Thu Feb 19 01:11:48 1998 Owen Taylor <owt1@cornell.edu>
* configure.in gdk/gdk.[ch] gdk/gdkcc.c
gdk/gdkglobals.c gdk/gdkinputcommon.h gdk/gdkprivate.h
gdk/gdkvisual.c glib/configure.in glib/glib.h
glib/gutils.c gtk/Makefile.am gtk/gtkmain.c
gtk/gtkobject.[ch] gtk/gtkdebug.h docs/debugging.txt
New system for controlling debugging:
* --enable-debug=[no/yes/minimum]
* G_DISABLE_ASSERT and G_DISABLE_CHECKS for glib
* G_NO_CHECK_CASTS to control cast checking
* G_ENABLE_DEBUG enables run time checking which controls:
Object tracing
Showing events
Miscellaneous g_print's in GDK
And is controlled by --gdk-debug/GDK_DEBUG, --gtk-debug/GTK_DEBUG
* debug_level and show_events are gone from GTK
See docs/debugging.txt for details.
And some fixups to the configure.in's so '-g' can be
overriden on the command line for --enable-debug
Thu Feb 19 05:40:51 1998 Tim Janik <timj@gimp.org>
* gtk/gtknotebook.h:
......
Thu Feb 19 01:11:48 1998 Owen Taylor <owt1@cornell.edu>
* configure.in gdk/gdk.[ch] gdk/gdkcc.c
gdk/gdkglobals.c gdk/gdkinputcommon.h gdk/gdkprivate.h
gdk/gdkvisual.c glib/configure.in glib/glib.h
glib/gutils.c gtk/Makefile.am gtk/gtkmain.c
gtk/gtkobject.[ch] gtk/gtkdebug.h docs/debugging.txt
New system for controlling debugging:
* --enable-debug=[no/yes/minimum]
* G_DISABLE_ASSERT and G_DISABLE_CHECKS for glib
* G_NO_CHECK_CASTS to control cast checking
* G_ENABLE_DEBUG enables run time checking which controls:
Object tracing
Showing events
Miscellaneous g_print's in GDK
And is controlled by --gdk-debug/GDK_DEBUG, --gtk-debug/GTK_DEBUG
* debug_level and show_events are gone from GTK
See docs/debugging.txt for details.
And some fixups to the configure.in's so '-g' can be
overriden on the command line for --enable-debug
Thu Feb 19 05:40:51 1998 Tim Janik <timj@gimp.org>
* gtk/gtknotebook.h:
......
Thu Feb 19 01:11:48 1998 Owen Taylor <owt1@cornell.edu>
* configure.in gdk/gdk.[ch] gdk/gdkcc.c
gdk/gdkglobals.c gdk/gdkinputcommon.h gdk/gdkprivate.h
gdk/gdkvisual.c glib/configure.in glib/glib.h
glib/gutils.c gtk/Makefile.am gtk/gtkmain.c
gtk/gtkobject.[ch] gtk/gtkdebug.h docs/debugging.txt
New system for controlling debugging:
* --enable-debug=[no/yes/minimum]
* G_DISABLE_ASSERT and G_DISABLE_CHECKS for glib
* G_NO_CHECK_CASTS to control cast checking
* G_ENABLE_DEBUG enables run time checking which controls:
Object tracing
Showing events
Miscellaneous g_print's in GDK
And is controlled by --gdk-debug/GDK_DEBUG, --gtk-debug/GTK_DEBUG
* debug_level and show_events are gone from GTK
See docs/debugging.txt for details.
And some fixups to the configure.in's so '-g' can be
overriden on the command line for --enable-debug
Thu Feb 19 05:40:51 1998 Tim Janik <timj@gimp.org>
* gtk/gtknotebook.h:
......
Thu Feb 19 01:11:48 1998 Owen Taylor <owt1@cornell.edu>
* configure.in gdk/gdk.[ch] gdk/gdkcc.c
gdk/gdkglobals.c gdk/gdkinputcommon.h gdk/gdkprivate.h
gdk/gdkvisual.c glib/configure.in glib/glib.h
glib/gutils.c gtk/Makefile.am gtk/gtkmain.c
gtk/gtkobject.[ch] gtk/gtkdebug.h docs/debugging.txt
New system for controlling debugging:
* --enable-debug=[no/yes/minimum]
* G_DISABLE_ASSERT and G_DISABLE_CHECKS for glib
* G_NO_CHECK_CASTS to control cast checking
* G_ENABLE_DEBUG enables run time checking which controls:
Object tracing
Showing events
Miscellaneous g_print's in GDK
And is controlled by --gdk-debug/GDK_DEBUG, --gtk-debug/GTK_DEBUG
* debug_level and show_events are gone from GTK
See docs/debugging.txt for details.
And some fixups to the configure.in's so '-g' can be
overriden on the command line for --enable-debug
Thu Feb 19 05:40:51 1998 Tim Janik <timj@gimp.org>
* gtk/gtknotebook.h:
......
Thu Feb 19 01:11:48 1998 Owen Taylor <owt1@cornell.edu>
* configure.in gdk/gdk.[ch] gdk/gdkcc.c
gdk/gdkglobals.c gdk/gdkinputcommon.h gdk/gdkprivate.h
gdk/gdkvisual.c glib/configure.in glib/glib.h
glib/gutils.c gtk/Makefile.am gtk/gtkmain.c
gtk/gtkobject.[ch] gtk/gtkdebug.h docs/debugging.txt
New system for controlling debugging:
* --enable-debug=[no/yes/minimum]
* G_DISABLE_ASSERT and G_DISABLE_CHECKS for glib
* G_NO_CHECK_CASTS to control cast checking
* G_ENABLE_DEBUG enables run time checking which controls:
Object tracing
Showing events
Miscellaneous g_print's in GDK
And is controlled by --gdk-debug/GDK_DEBUG, --gtk-debug/GTK_DEBUG
* debug_level and show_events are gone from GTK
See docs/debugging.txt for details.
And some fixups to the configure.in's so '-g' can be
overriden on the command line for --enable-debug
Thu Feb 19 05:40:51 1998 Tim Janik <timj@gimp.org>
* gtk/gtknotebook.h:
......
......@@ -35,22 +35,24 @@ AC_CANONICAL_HOST
AC_ARG_ENABLE(shm, [ --enable-shm support shared memory if available [default=yes]],
echo $enable_shm, enable_shm="yes")
AC_ARG_ENABLE(debug, [ --enable-debug turn on debugging [default=no]],
if test "x$enable_debug" = "xyes"; then
DEBUGFLAG="-g"
fi)
AC_ARG_ENABLE(debug, [ --enable-debug=[no/minimum/yes] turn on debugging [default=minimum]],,enable_debug=minimum)
AC_ARG_ENABLE(ansi, [ --enable-ansi turn on strict ansi [default=no]],
, enable_ansi=no)
AC_ARG_ENABLE(xim, [ --enable-xim support XIM [default=yes]],
echo $enable_xim, enable_xim="yes")
AC_ARG_WITH(locale, [ --with-locale=LOCALE locale name you want to use ])
AC_ARG_WITH(xinput, [ --with-xinput[=no/gxi/xfree] support XInput ])
AC_ARG_WITH(xinput, [ --with-xinput=[no/gxi/xfree] support XInput ])
if test -n "$DEBUGFLAG"; then
test "$cflags_set" = set || CFLAGS="$DEBUGFLAG"
if test "x$enable_debug" = "xyes"; then
test "$cflags_set" = set || CFLAGS="-g"
CFLAGS="$CFLAGS -DG_ENABLE_DEBUG"
else
CFLAGS="$CFLAGS -DNDEBUG"
if test "x$enable_debug" = "xno"; then
CFLAGS="$CFLAGS -DG_DISABLE_ASSERT -DG_DISABLE_CHECKS -DGTK_NO_CHECK_CASTS"
else
CFLAGS="$CFLAGS -DGTK_NO_CHECK_CASTS"
fi
fi
# Build time sanity check...
......
The GLIB, GDK, and GTK libraries have extensive support for
debugging the library and your programs.
The amount of debugging being done can be determined both
at run time and compile time.
COMPILE TIME OPTIONS
--------------------
At compile time, the amount of debugging support included is
determined by four macros:
G_ENABLE_DEBUG
If set, enable support for runtime checking.
G_DISABLE_ASSERT
If set, disable g_assert macros
G_DISABLE_CHECKS
If set, disable the g_return_if_fail and g_return_val_if_fail macros
GTK_NO_CHECK_CASTS
If set, don't check casts between different object types
Whether these macros are defined is controlled at configuration
time by the --enable-debug option.
--enable-debug=minimum [default]
Enable only inexpensive sanity checking
sets GTK_NO_CHECK_CASTS
--enable-debug=yes
Enable all debugging support
sets G_ENABLE_DEBUG
--enable-debug=no (or --disable-debug)
Disable all debugging support (fastest)
sets G_DISABLE_ASSERT, G_DISABLE_CHECKS, and GTK_NO_CHECK_CASTS
RUN TIME OPTIONS
----------------
At run time, if GTK+ was compiled with debugging enabled,
different types of debugging information can be printed
out by setting the --gtk-debug and --gdk-debug command line
options, or the GTK_DEBUG and GDK_DEBUG environment
variables. (The command line options override the environment
variables)
Each of these can either be the special value ALL,
or a sequence of ':' separated options. (Note, case is
significant)
As noted below, some of these are useful in application
debugging, but most are only interested to those debugging
the libraries
GTK_DEBUG
---------
Application relevant options:
'objects' - Trace the creation and destruction of objects, print
out a summary at program termination
Options only interesting to library maintainers:
GDK_DEBUG
---------
Application relevant options:
'events' - Show all events received by GTK
Options only interesting to library maintainers:
'misc' - Miscellaneous information
'dnd' - Information about drag-and-drop
'color-context' - Information about the internal workings of
GdkColorContext
'xim' - Information about X Input Method support
This diff is collapsed.
......@@ -42,7 +42,6 @@ void gdk_event_put (GdkEvent *event);
GdkEvent *gdk_event_copy (GdkEvent *event);
void gdk_event_free (GdkEvent *event);
void gdk_set_debug_level (gint level);
void gdk_set_show_events (gint show_events);
void gdk_set_use_xshm (gint use_xshm);
......
......@@ -552,11 +552,11 @@ gdk_color_context_new (GdkVisual *visual,
{
case GDK_VISUAL_STATIC_GRAY:
case GDK_VISUAL_GRAYSCALE:
if (gdk_debug_level >= 1)
GDK_NOTE (COLOR_CONTEXT,
g_print ("gdk_color_context_new: visual class is %s\n",
(visual->type == GDK_VISUAL_STATIC_GRAY) ?
"GDK_VISUAL_STATIC_GRAY" :
"GDK_VISUAL_GRAYSCALE");
"GDK_VISUAL_GRAYSCALE"));
if (GDK_VISUAL_XVISUAL (cc->visual)->map_entries == 2)
init_bw (cc);
......@@ -566,26 +566,26 @@ gdk_color_context_new (GdkVisual *visual,
break;
case GDK_VISUAL_TRUE_COLOR: /* shifts */
if (gdk_debug_level >= 1)
g_print ("gdk_color_context_new: visual class is GDK_VISUAL_TRUE_COLOR\n");
GDK_NOTE (COLOR_CONTEXT,
g_print ("gdk_color_context_new: visual class is GDK_VISUAL_TRUE_COLOR\n"));
init_true_color (cc);
break;
case GDK_VISUAL_DIRECT_COLOR: /* shifts and fake CLUT */
if (gdk_debug_level >= 1)
g_print ("gdk_color_context_new: visual class is GDK_VISUAL_DIRECT_COLOR\n");
GDK_NOTE (COLOR_CONTEXT,
g_print ("gdk_color_context_new: visual class is GDK_VISUAL_DIRECT_COLOR\n"));
init_direct_color (cc);
break;
case GDK_VISUAL_STATIC_COLOR:
case GDK_VISUAL_PSEUDO_COLOR:
if (gdk_debug_level >= 1)
GDK_NOTE (COLOR_CONTEXT,
g_print ("gdk_color_context_new: visual class is %s\n",
(visual->type == GDK_VISUAL_STATIC_COLOR) ?
"GDK_VISUAL_STATIC_COLOR" :
"GDK_VISUAL_PSEUDO_COLOR");
"GDK_VISUAL_PSEUDO_COLOR"));
init_color (cc);
break;
......@@ -607,9 +607,9 @@ gdk_color_context_new (GdkVisual *visual,
cc->num_allocated = 0;
if (gdk_debug_level >= 1)
GDK_NOTE (COLOR_CONTEXT,
g_print ("gdk_color_context_new: screen depth is %i, no. of colors is %i\n",
cc->visual->depth, cc->num_colors);
cc->visual->depth, cc->num_colors));
/* check if we need to initialize a hash table */
......@@ -811,10 +811,10 @@ gdk_color_context_get_pixel (GdkColorContext *cc,
{
cc->max_colors *= 2;
if (gdk_debug_level >= 1)
GDK_NOTE (COLOR_CONTEXT,
g_print ("gdk_color_context_get_pixel: "
"resizing CLUT to %i entries\n",
cc->max_colors);
cc->max_colors));
cc->clut = g_realloc (cc->clut,
cc->max_colors * sizeof (gulong));
......@@ -906,9 +906,9 @@ gdk_color_context_get_pixels (GdkColorContext *cc,
if ((ncols == ncolors) || (nopen == 0))
{
if (gdk_debug_level >= 1)
GDK_NOTE (COLOR_CONTEXT,
g_print ("gdk_color_context_get_pixels: got all %i colors; "
"(%i colors allocated so far)\n", ncolors, cc->num_allocated);
"(%i colors allocated so far)\n", ncolors, cc->num_allocated));
return;
}
......@@ -1031,10 +1031,10 @@ gdk_color_context_get_pixels (GdkColorContext *cc,
if ((ncols == ncolors) || (nopen == 0))
{
if (gdk_debug_level >= 1)
GDK_NOTE (COLOR_CONTEXT,
g_print ("gdk_color_context_get_pixels: got %i colors, %i exact and "
"%i close (%i colors allocated so far)\n",
ncolors, exact_col, close_col, cc->num_allocated);
ncolors, exact_col, close_col, cc->num_allocated));
return;
}
......@@ -1102,10 +1102,10 @@ gdk_color_context_get_pixels (GdkColorContext *cc,
}
while (++idx < nopen);
if (gdk_debug_level >= 1)
GDK_NOTE (COLOR_CONTEXT,
g_print ("gdk_color_context_get_pixels: got %i colors, %i exact, %i close, "
"%i substituted, %i to black (%i colors allocated so far)\n",
ncolors, exact_col, close_col, subst_col, black_col, cc->num_allocated);
ncolors, exact_col, close_col, subst_col, black_col, cc->num_allocated));
}
void
......@@ -1176,9 +1176,9 @@ gdk_color_context_get_pixels_incremental (GdkColorContext *cc,
}
#ifdef DEBUG
else
if (gdk_debug_level >= 1)
GDK_NOTE (COLOR_CONTEXT,
g_print ("gdk_color_context_get_pixels_incremental: "
"pixel at slot %i already allocated, skipping\n", i);
"pixel at slot %i already allocated, skipping\n", i));
#endif
}
}
......@@ -1187,10 +1187,10 @@ gdk_color_context_get_pixels_incremental (GdkColorContext *cc,
if ((ncols == ncolors) || (nopen == 0))
{
if (gdk_debug_level >= 1)
GDK_NOTE (COLOR_CONTEXT,
g_print ("gdk_color_context_get_pixels_incremental: got all %i colors "
"(%i colors allocated so far)\n",
ncolors, cc->num_allocated);
ncolors, cc->num_allocated));
return;
}
......@@ -1293,11 +1293,11 @@ gdk_color_context_get_pixels_incremental (GdkColorContext *cc,
if ((ncols == ncolors) || (nopen == 0))
{
if (gdk_debug_level >= 1)
GDK_NOTE (COLOR_CONTEXT,
g_print ("gdk_color_context_get_pixels_incremental: "
"got %i colors, %i exact and %i close "
"(%i colors allocated so far)\n",
ncolors, exact_col, close_col, cc->num_allocated);
ncolors, exact_col, close_col, cc->num_allocated));
return;
}
......@@ -1364,11 +1364,11 @@ gdk_color_context_get_pixels_incremental (GdkColorContext *cc,
}
while (++idx < nopen);
if (gdk_debug_level >= 1)
GDK_NOTE (COLOR_CONTEXT,
g_print ("gdk_color_context_get_pixels_incremental: "
"got %i colors, %i exact, %i close, %i substituted, %i to black "
"(%i colors allocated so far)\n",
ncolors, exact_col, close_col, subst_col, black_col, cc->num_allocated);
ncolors, exact_col, close_col, subst_col, black_col, cc->num_allocated));
}
gint
......
......@@ -20,8 +20,7 @@
#include "gdktypes.h"
#include "gdkprivate.h"
gint gdk_debug_level = 0;
gint gdk_show_events = FALSE;
guint gdk_debug_flags = 0;
gint gdk_use_xshm = TRUE;
gchar *gdk_display_name = NULL;
Display *gdk_display = NULL;
......
......@@ -581,13 +581,13 @@ gdk_input_common_other_event (GdkEvent *event,
event->button.state = gdk_input_translate_state(xdbe->state,xdbe->device_state);
event->button.button = xdbe->button;
if (gdk_show_events)
GDK_NOTE (EVENTS,
g_print ("button %s:\t\twindow: %ld device: %ld x,y: %f %f button: %d\n",
(event->button.type == GDK_BUTTON_PRESS) ? "press" : "release",
xdbe->window,
xdbe->deviceid,
event->button.x, event->button.y,
xdbe->button);
xdbe->button));
return TRUE;
}
......@@ -597,12 +597,12 @@ gdk_input_common_other_event (GdkEvent *event,
{
XDeviceKeyEvent *xdke = (XDeviceKeyEvent *)(xevent);
if (gdk_show_events)
GDK_NOTE (EVENTS,
g_print ("device key %s:\twindow: %ld device: %ld keycode: %d\n",
(event->key.type == GDK_KEY_PRESS) ? "press" : "release",
xdke->window,
xdke->deviceid,
xdke->keycode);
xdke->keycode));
if (xdke->keycode < gdkdev->min_keycode ||
xdke->keycode >= gdkdev->min_keycode + gdkdev->info.num_keys)
......@@ -615,8 +615,8 @@ gdk_input_common_other_event (GdkEvent *event,
if (event->key.keyval == 0)
{
if (gdk_show_events)
g_print ("\t\ttranslation - NONE\n");
GDK_NOTE (EVENTS,
g_print ("\t\ttranslation - NONE\n"));
return FALSE;
}
......@@ -644,10 +644,10 @@ gdk_input_common_other_event (GdkEvent *event,
event->key.string = g_new0 (gchar, 1);
}
if (gdk_show_events)
GDK_NOTE (EVENTS,
g_print ("\t\ttranslation - keyval: %d modifiers: %#x\n",
event->key.keyval,
event->key.state);
event->key.state));
return TRUE;
}
......@@ -672,13 +672,13 @@ gdk_input_common_other_event (GdkEvent *event,
event->motion.source = gdkdev->info.source;
event->motion.deviceid = xdme->deviceid;
if (gdk_show_events)
GDK_NOTE (EVENTS,
g_print ("motion notify:\t\twindow: %ld device: %ld x,y: %f %f state %#4x hint: %s\n",
xdme->window,
xdme->deviceid,
event->motion.x, event->motion.y,
event->motion.state,
(xdme->is_hint) ? "true" : "false");
(xdme->is_hint) ? "true" : "false"));
return TRUE;
......
......@@ -170,7 +170,6 @@ typedef struct _GdkICPrivate GdkICPrivate;
#endif /* USE_XIM */
struct _GdkColorContextPrivate
{
GdkColorContext color_context;
......@@ -178,6 +177,13 @@ struct _GdkColorContextPrivate
XStandardColormap std_cmap;
};
typedef enum {
GDK_DEBUG_MISC = 1<<0,
GDK_DEBUG_EVENTS = 1 << 1,
GDK_DEBUG_DND = 1<<2,
GDK_DEBUG_COLOR_CONTEXT = 1<<3,
GDK_DEBUG_XIM = 1<<4
} GdkDebugFlag;
void gdk_window_init (void);
void gdk_visual_init (void);
......@@ -219,6 +225,22 @@ extern gchar *gdk_progclass;
extern gint gdk_error_code;
extern gint gdk_error_warnings;
/* Debugging support */
#ifdef G_ENABLE_DEBUG
#define GDK_NOTE(type,action) G_STMT_START { \
if (gdk_debug_flags & GDK_DEBUG_##type) \
action; } G_STMT_END
#else /* !G_ENABLE_DEBUG */
#define GDK_NOTE(type,action)
#endif /* G_ENABLE_DEBUG */
extern guint gdk_debug_flags;
#ifdef __cplusplus
}
......
......@@ -201,7 +201,7 @@ gdk_visual_init ()
break;
}
if (gdk_debug_level >= 1)
if (gdk_debug_flags & GDK_DEBUG_MISC)
for (i = 0; i < nvisuals; i++)
g_print ("visual: %s: %d\n",
visual_names[visuals[i].visual.type],
......
......@@ -552,11 +552,11 @@ gdk_color_context_new (GdkVisual *visual,
{
case GDK_VISUAL_STATIC_GRAY:
case GDK_VISUAL_GRAYSCALE:
if (gdk_debug_level >= 1)
GDK_NOTE (COLOR_CONTEXT,
g_print ("gdk_color_context_new: visual class is %s\n",
(visual->type == GDK_VISUAL_STATIC_GRAY) ?
"GDK_VISUAL_STATIC_GRAY" :
"GDK_VISUAL_GRAYSCALE");
"GDK_VISUAL_GRAYSCALE"));
if (GDK_VISUAL_XVISUAL (cc->visual)->map_entries == 2)
init_bw (cc);
......@@ -566,26 +566,26 @@ gdk_color_context_new (GdkVisual *visual,
break;
case GDK_VISUAL_TRUE_COLOR: /* shifts */
if (gdk_debug_level >= 1)
g_print ("gdk_color_context_new: visual class is GDK_VISUAL_TRUE_COLOR\n");
GDK_NOTE (COLOR_CONTEXT,
g_print ("gdk_color_context_new: visual class is GDK_VISUAL_TRUE_COLOR\n"));
init_true_color (cc);
break;
case GDK_VISUAL_DIRECT_COLOR: /* shifts and fake CLUT */
if (gdk_debug_level >= 1)
g_print ("gdk_color_context_new: visual class is GDK_VISUAL_DIRECT_COLOR\n");
GDK_NOTE (COLOR_CONTEXT,
g_print ("gdk_color_context_new: visual class is GDK_VISUAL_DIRECT_COLOR\n"));
init_direct_color (cc);
break;
case GDK_VISUAL_STATIC_COLOR:
case GDK_VISUAL_PSEUDO_COLOR:
if (gdk_debug_level >= 1)
GDK_NOTE (COLOR_CONTEXT,
g_print ("gdk_color_context_new: visual class is %s\n",
(visual->type == GDK_VISUAL_STATIC_COLOR) ?
"GDK_VISUAL_STATIC_COLOR" :
"GDK_VISUAL_PSEUDO_COLOR");
"GDK_VISUAL_PSEUDO_COLOR"));
init_color (cc);
break;
......@@ -607,9 +607,9 @@ gdk_color_context_new (GdkVisual *visual,
cc->num_allocated = 0;
if (gdk_debug_level >= 1)
GDK_NOTE (COLOR_CONTEXT,
g_print ("gdk_color_context_new: screen depth is %i, no. of colors is %i\n",
cc->visual->depth, cc->num_colors);
cc->visual->depth, cc->num_colors));
/* check if we need to initialize a hash table */
......@@ -811,10 +811,10 @@ gdk_color_context_get_pixel (GdkColorContext *cc,
{
cc->max_colors *= 2;
if (gdk_debug_level >= 1)
GDK_NOTE (COLOR_CONTEXT,
g_print ("gdk_color_context_get_pixel: "
"resizing CLUT to %i entries\n",
cc->max_colors);
cc->max_colors));
cc->clut = g_realloc (cc->clut,
cc->max_colors * sizeof (gulong));
......@@ -906,9 +906,9 @@ gdk_color_context_get_pixels (GdkColorContext *cc,
if ((ncols == ncolors) || (nopen == 0))
{
if (gdk_debug_level >= 1)
GDK_NOTE (COLOR_CONTEXT,
g_print ("gdk_color_context_get_pixels: got all %i colors; "
"(%i colors allocated so far)\n", ncolors, cc->num_allocated);
"(%i colors allocated so far)\n", ncolors, cc->num_allocated));
return;
}
......@@ -1031,10 +1031,10 @@ gdk_color_context_get_pixels (GdkColorContext *cc,
if ((ncols == ncolors) || (nopen == 0))
{
if (gdk_debug_level >= 1)
GDK_NOTE (COLOR_CONTEXT,
g_print ("gdk_color_context_get_pixels: got %i colors, %i exact and "
"%i close (%i colors allocated so far)\n",
ncolors, exact_col, close_col, cc->num_allocated);
ncolors, exact_col, close_col, cc->num_allocated));
return;
}
......@@ -1102,10 +1102,10 @@ gdk_color_context_get_pixels (GdkColorContext *cc,
}
while (++idx < nopen);
if (gdk_debug_level >= 1)
GDK_NOTE (COLOR_CONTEXT,
g_print ("gdk_color_context_get_pixels: got %i colors, %i exact, %i close, "
"%i substituted, %i to black (%i colors allocated so far)\n",
ncolors, exact_col, close_col, subst_col, black_col, cc->num_allocated);
ncolors, exact_col, close_col, subst_col, black_col, cc->num_allocated));
}
void
......@@ -1176,9 +1176,9 @@ gdk_color_context_get_pixels_incremental (GdkColorContext *cc,
}
#ifdef DEBUG
else
if (gdk_debug_level >= 1)
GDK_NOTE (COLOR_CONTEXT,
g_print ("gdk_color_context_get_pixels_incremental: "
"pixel at slot %i already allocated, skipping\n", i);
"pixel at slot %i already allocated, skipping\n", i));
#endif
}
}
......@@ -1187,10 +1187,10 @@ gdk_color_context_get_pixels_incremental (GdkColorContext *cc,
if ((ncols == ncolors) || (nopen == 0))
{
if (gdk_debug_level >= 1)
GDK_NOTE (COLOR_CONTEXT,
g_print ("gdk_color_context_get_pixels_incremental: got all %i colors "
"(%i colors allocated so far)\n",
ncolors, cc->num_allocated);
ncolors, cc->num_allocated));
return;