Commit 89fd6ad3 authored by Manish Singh's avatar Manish Singh Committed by Manish Singh
Browse files

add -DGDK_DISABLE_DEPRECATED

Sun Nov 17 13:45:08 2002  Manish Singh  <yosh@gimp.org>

        * gdk/Makefile.am: add -DGDK_DISABLE_DEPRECATED

        * gdk/gdk.c (gdk_exit): remove obsolete comment

        * gdk/gdk.h: declare gdk_input_add_full if GTK_COMPILATION for
        gtk_input_add_full

        * gdk/gdkcolor.c (gdk_color_white, gdk_color_black): use
        gdk_colormap_alloc_color instead of gdk_color_alloc

        * gdk/gdkcolor.h: declare gdk_colormap_change if GDK_COMPILATION for
        gdk_colors_store. Also, gdk_colors_{alloc,free} for
        gdk_rgb_try_colormap

        * gdk/gdkdrawable.h: declare gdk_draw_string if GTK_COMPILATION for
        gtk_default_draw_string. Also, gdk_draw_text and gdk_draw_text_wc
        if GDK_COMPILATION for the respective gdk_window_ and gdk_pixmap_
        functions.

        * gdk/gdkfont.c: #undef GDK_DISABLE_DEPRECATED, completely compat
        code here

        * gdk/gdkfont.h: allow the GdkFont structure and a few gdk_font_
        functions for compat code in GDK_COMPILATION and GTK_COMPILATION.

        * gdk/gdkrgb.c (gdk_rgb_cmap_fail, gdk_rgb_try_colormap): use
        gdk_colormap_free_colors instead of gdk_colors_free.

        * gdk/gdkrgb.c (gdk_draw_rgb_image_core): no need to set fg/bg
        for own_gc, unused.

        * gdk/gdkwindow.h: declare gdk_window_get_deskrelative_origin if
        GTK_COMPILATION for gtk_handle_box_button_changed.

        * gdk/x11/Makefile.am: add -DGDK_DISABLE_DEPRECATED, renmae
        -DINSIDE_GDK_X11 to -DGDK_COMPILATION

        * gdk/x11/gdkcolor-x11.c: remove duplicate doc string for
        gdk_colormap_alloc_colors.

        * gdk/x11/gdkfont-x11.c:  #undef GDK_DISABLE_DEPRECATED, completely
        compat code here

        * gdk/x11/gdkx.h: use GDK_COMPILATION instead of INSIDE_GDK_X11,
        allow a few gdk_x11_font_ functions if GDK_COMPILATION for compat
        code

        * gtk/Makefile.am: add -DGDK_DISABLE_DEPRECATED

        * gtk/gtkclist.c
        * gtk/gtkctree.c
        * gtk/gtkpixmap.c
        * gtk/gtkpreview.c
        * gtk/gtktext.c: #undef GDK_DISABLE_DEPRECATED, deprecated widget

        * gtk/gtkhandlebox.c (gtk_handle_box_motion): use
        gdk_window_set_geometry_hints instead of gdk_window_set_hints.

        * gtk/gtkmain.c (gtk_exit): call exit directly

        * gtktipsquery.c (gtk_tips_query_real_start_query)
        * gtk/gtktreeitem.c (gtk_tree_item_add_pixmaps): remove some
        deprecated GDK usage.
parent 1d2c2268
...@@ -14,14 +14,15 @@ EXTRA_DIST = \ ...@@ -14,14 +14,15 @@ EXTRA_DIST = \
common_includes = @STRIP_BEGIN@ \ common_includes = @STRIP_BEGIN@ \
-DG_LOG_DOMAIN=\"Gdk\" \ -DG_LOG_DOMAIN=\"Gdk\" \
-DGDK_COMPILATION \
-I$(top_srcdir) \ -I$(top_srcdir) \
-I$(top_builddir)/gdk \ -I$(top_builddir)/gdk \
-I$(top_srcdir)/gdk-pixbuf \ -I$(top_srcdir)/gdk-pixbuf \
-DG_DISABLE_DEPRECATED \ -DG_DISABLE_DEPRECATED \
-DGDK_PIXBUF_DISABLE_DEPRECATED \ -DGDK_PIXBUF_DISABLE_DEPRECATED \
-DGDK_DISABLE_DEPRECATED \
@GTK_DEBUG_FLAGS@ \ @GTK_DEBUG_FLAGS@ \
@GDK_DEP_CFLAGS@ \ @GDK_DEP_CFLAGS@ \
-DGDK_COMPILATION \
@STRIP_END@ @STRIP_END@
INCLUDES = $(common_includes) INCLUDES = $(common_includes)
......
...@@ -475,8 +475,6 @@ gdk_init (int *argc, char ***argv) ...@@ -475,8 +475,6 @@ gdk_init (int *argc, char ***argv)
void void
gdk_exit (gint errorcode) gdk_exit (gint errorcode)
{ {
/* de-initialisation is done by the gdk_exit_funct(),
no need to do this here (Alex J.) */
exit (errorcode); exit (errorcode);
} }
......
...@@ -88,12 +88,15 @@ gboolean gdk_get_use_xshm (void); ...@@ -88,12 +88,15 @@ gboolean gdk_get_use_xshm (void);
gchar* gdk_get_display (void); gchar* gdk_get_display (void);
G_CONST_RETURN gchar* gdk_get_display_arg_name (void); G_CONST_RETURN gchar* gdk_get_display_arg_name (void);
#ifndef GDK_DISABLE_DEPRECATED #if !defined (GDK_DISABLE_DEPRECATED) || defined (GTK_COMPILATION)
/* Used by gtk_input_add_full () */
gint gdk_input_add_full (gint source, gint gdk_input_add_full (gint source,
GdkInputCondition condition, GdkInputCondition condition,
GdkInputFunction function, GdkInputFunction function,
gpointer data, gpointer data,
GdkDestroyNotify destroy); GdkDestroyNotify destroy);
#endif /* !GDK_DISABLE_DEPRECATED || GTK_COMPILATION */
#ifndef GDK_DISABLE_DEPRECATED
gint gdk_input_add (gint source, gint gdk_input_add (gint source,
GdkInputCondition condition, GdkInputCondition condition,
GdkInputFunction function, GdkInputFunction function,
......
...@@ -170,7 +170,7 @@ gdk_color_white (GdkColormap *colormap, ...@@ -170,7 +170,7 @@ gdk_color_white (GdkColormap *colormap,
color->green = 65535; color->green = 65535;
color->blue = 65535; color->blue = 65535;
return_val = gdk_color_alloc (colormap, color); return_val = gdk_colormap_alloc_color (colormap, color, FALSE, TRUE);
} }
else else
return_val = FALSE; return_val = FALSE;
...@@ -202,7 +202,7 @@ gdk_color_black (GdkColormap *colormap, ...@@ -202,7 +202,7 @@ gdk_color_black (GdkColormap *colormap,
color->green = 0; color->green = 0;
color->blue = 0; color->blue = 0;
return_val = gdk_color_alloc (colormap, color); return_val = gdk_colormap_alloc_color (colormap, color, FALSE, TRUE);
} }
else else
return_val = FALSE; return_val = FALSE;
......
...@@ -74,7 +74,10 @@ GdkScreen *gdk_colormap_get_screen (GdkColormap *cmap); ...@@ -74,7 +74,10 @@ GdkScreen *gdk_colormap_get_screen (GdkColormap *cmap);
#ifndef GDK_DISABLE_DEPRECATED #ifndef GDK_DISABLE_DEPRECATED
gint gdk_colormap_get_system_size (void); gint gdk_colormap_get_system_size (void);
#endif
#if !defined (GDK_DISABLE_DEPRECATED) || defined (GDK_COMPILATION)
/* Used by gdk_colors_store () */
void gdk_colormap_change (GdkColormap *colormap, void gdk_colormap_change (GdkColormap *colormap,
gint ncolors); gint ncolors);
#endif #endif
...@@ -113,6 +116,18 @@ GType gdk_color_get_type (void); ...@@ -113,6 +116,18 @@ GType gdk_color_get_type (void);
void gdk_colors_store (GdkColormap *colormap, void gdk_colors_store (GdkColormap *colormap,
GdkColor *colors, GdkColor *colors,
gint ncolors); gint ncolors);
gint gdk_color_white (GdkColormap *colormap,
GdkColor *color);
gint gdk_color_black (GdkColormap *colormap,
GdkColor *color);
gint gdk_color_alloc (GdkColormap *colormap,
GdkColor *color);
gint gdk_color_change (GdkColormap *colormap,
GdkColor *color);
#endif /* GDK_DISABLE_DEPRECATED */
#if !defined (GDK_DISABLE_DEPRECATED) || defined (GDK_COMPILATION)
/* Used by gdk_rgb_try_colormap () */
gint gdk_colors_alloc (GdkColormap *colormap, gint gdk_colors_alloc (GdkColormap *colormap,
gboolean contiguous, gboolean contiguous,
gulong *planes, gulong *planes,
...@@ -123,15 +138,7 @@ void gdk_colors_free (GdkColormap *colormap, ...@@ -123,15 +138,7 @@ void gdk_colors_free (GdkColormap *colormap,
gulong *pixels, gulong *pixels,
gint npixels, gint npixels,
gulong planes); gulong planes);
gint gdk_color_white (GdkColormap *colormap, #endif /* !GDK_DISABLE_DEPRECATED || GDK_COMPILATION */
GdkColor *color);
gint gdk_color_black (GdkColormap *colormap,
GdkColor *color);
gint gdk_color_alloc (GdkColormap *colormap,
GdkColor *color);
gint gdk_color_change (GdkColormap *colormap,
GdkColor *color);
#endif /* GDK_DISABLE_DEPRECATED */
#ifdef __cplusplus #ifdef __cplusplus
} }
......
...@@ -236,13 +236,17 @@ void gdk_draw_polygon (GdkDrawable *drawable, ...@@ -236,13 +236,17 @@ void gdk_draw_polygon (GdkDrawable *drawable,
gboolean filled, gboolean filled,
GdkPoint *points, GdkPoint *points,
gint npoints); gint npoints);
#ifndef GDK_DISABLE_DEPRECATED #if !defined (GDK_DISABLE_DEPRECATED) || defined (GTK_COMPILATION)
/* Used by gtk_default_draw_string () */
void gdk_draw_string (GdkDrawable *drawable, void gdk_draw_string (GdkDrawable *drawable,
GdkFont *font, GdkFont *font,
GdkGC *gc, GdkGC *gc,
gint x, gint x,
gint y, gint y,
const gchar *string); const gchar *string);
#endif /* !GDK_DISABLE_DEPRECATED || GTK_COMPILATION */
#if !defined (GDK_DISABLE_DEPRECATED) || defined (GDK_COMPILATION)
/* Used by gdk_pixmap_draw_text (), gdk_window_draw_text() */
void gdk_draw_text (GdkDrawable *drawable, void gdk_draw_text (GdkDrawable *drawable,
GdkFont *font, GdkFont *font,
GdkGC *gc, GdkGC *gc,
...@@ -250,6 +254,7 @@ void gdk_draw_text (GdkDrawable *drawable, ...@@ -250,6 +254,7 @@ void gdk_draw_text (GdkDrawable *drawable,
gint y, gint y,
const gchar *text, const gchar *text,
gint text_length); gint text_length);
/* Used by gdk_pixmap_draw_text_wc (), gdk_window_draw_text_wc () */
void gdk_draw_text_wc (GdkDrawable *drawable, void gdk_draw_text_wc (GdkDrawable *drawable,
GdkFont *font, GdkFont *font,
GdkGC *gc, GdkGC *gc,
...@@ -257,7 +262,7 @@ void gdk_draw_text_wc (GdkDrawable *drawable, ...@@ -257,7 +262,7 @@ void gdk_draw_text_wc (GdkDrawable *drawable,
gint y, gint y,
const GdkWChar *text, const GdkWChar *text,
gint text_length); gint text_length);
#endif /* GDK_DISABLE_DEPRECATED */ #endif /* !GDK_DISABLE_DEPRECATED || GDK_COMPILATION */
void gdk_draw_drawable (GdkDrawable *drawable, void gdk_draw_drawable (GdkDrawable *drawable,
GdkGC *gc, GdkGC *gc,
GdkDrawable *src, GdkDrawable *src,
......
...@@ -24,6 +24,8 @@ ...@@ -24,6 +24,8 @@
* GTK+ at ftp://ftp.gtk.org/pub/gtk/. * GTK+ at ftp://ftp.gtk.org/pub/gtk/.
*/ */
#undef GDK_DISABLE_DEPRECATED
#include "gdkdisplay.h" #include "gdkdisplay.h"
#include "gdkfont.h" #include "gdkfont.h"
#include "gdkinternals.h" #include "gdkinternals.h"
......
#ifndef GDK_DISABLE_DEPRECATED #if !defined(GDK_DISABLE_DEPRECATED) || defined(GDK_COMPILATION) || defined(GTK_COMPILATION)
#ifndef __GDK_FONT_H__ #ifndef __GDK_FONT_H__
#define __GDK_FONT_H__ #define __GDK_FONT_H__
...@@ -31,11 +31,11 @@ struct _GdkFont ...@@ -31,11 +31,11 @@ struct _GdkFont
GType gdk_font_get_type (void); GType gdk_font_get_type (void);
#ifndef GDK_MULTIHEAD_SAFE GdkFont* gdk_font_ref (GdkFont *font);
GdkFont* gdk_font_load (const gchar *font_name); void gdk_font_unref (GdkFont *font);
GdkFont* gdk_fontset_load (const gchar *fontset_name); gint gdk_font_id (const GdkFont *font);
GdkFont* gdk_font_from_description (PangoFontDescription *font_desc); gboolean gdk_font_equal (const GdkFont *fonta,
#endif const GdkFont *fontb);
GdkFont *gdk_font_load_for_display (GdkDisplay *display, GdkFont *gdk_font_load_for_display (GdkDisplay *display,
const gchar *font_name); const gchar *font_name);
...@@ -44,11 +44,13 @@ GdkFont *gdk_fontset_load_for_display (GdkDisplay *display, ...@@ -44,11 +44,13 @@ GdkFont *gdk_fontset_load_for_display (GdkDisplay *display,
GdkFont *gdk_font_from_description_for_display (GdkDisplay *display, GdkFont *gdk_font_from_description_for_display (GdkDisplay *display,
PangoFontDescription *font_desc); PangoFontDescription *font_desc);
GdkFont* gdk_font_ref (GdkFont *font); #ifndef GDK_DISABLE_DEPRECATED
void gdk_font_unref (GdkFont *font);
gint gdk_font_id (const GdkFont *font); #ifndef GDK_MULTIHEAD_SAFE
gboolean gdk_font_equal (const GdkFont *fonta, GdkFont* gdk_font_load (const gchar *font_name);
const GdkFont *fontb); GdkFont* gdk_fontset_load (const gchar *fontset_name);
GdkFont* gdk_font_from_description (PangoFontDescription *font_desc);
#endif
gint gdk_string_width (GdkFont *font, gint gdk_string_width (GdkFont *font,
const gchar *string); const gchar *string);
...@@ -103,10 +105,12 @@ void gdk_string_extents (GdkFont *font, ...@@ -103,10 +105,12 @@ void gdk_string_extents (GdkFont *font,
GdkDisplay * gdk_font_get_display (GdkFont *font); GdkDisplay * gdk_font_get_display (GdkFont *font);
#endif /* GDK_DISABLE_DEPRECATED */
#ifdef __cplusplus #ifdef __cplusplus
} }
#endif /* __cplusplus */ #endif /* __cplusplus */
#endif /* __GDK_FONT_H__ */ #endif /* __GDK_FONT_H__ */
#endif /* GDK_DISABLE_DEPRECATED */ #endif /* !GDK_DISABLE_DEPRECATED || GDK_COMPILATION || GTK_COMPILATION */
...@@ -146,7 +146,7 @@ static gboolean gdk_rgb_verbose = FALSE; ...@@ -146,7 +146,7 @@ static gboolean gdk_rgb_verbose = FALSE;
static gint static gint
gdk_rgb_cmap_fail (const char *msg, GdkColormap *cmap, gulong *pixels) gdk_rgb_cmap_fail (const char *msg, GdkColormap *cmap, gulong *pixels)
{ {
gulong free_pixels[256]; GdkColor free_colors[256];
gint n_free; gint n_free;
gint i; gint i;
...@@ -156,9 +156,9 @@ gdk_rgb_cmap_fail (const char *msg, GdkColormap *cmap, gulong *pixels) ...@@ -156,9 +156,9 @@ gdk_rgb_cmap_fail (const char *msg, GdkColormap *cmap, gulong *pixels)
n_free = 0; n_free = 0;
for (i = 0; i < 256; i++) for (i = 0; i < 256; i++)
if (pixels[i] < 256) if (pixels[i] < 256)
free_pixels[n_free++] = pixels[i]; free_colors[n_free++].pixel = pixels[i];
if (n_free) if (n_free)
gdk_colors_free (cmap, free_pixels, n_free, 0); gdk_colormap_free_colors (cmap, free_colors, n_free);
return 0; return 0;
} }
...@@ -257,18 +257,22 @@ gdk_rgb_try_colormap (GdkRgbInfo *image_info, gboolean force, ...@@ -257,18 +257,22 @@ gdk_rgb_try_colormap (GdkRgbInfo *image_info, gboolean force,
b0 = bi * 255 / (nb - 1); b0 = bi * 255 / (nb - 1);
idx = ((ri * nr) + gi) * nb + bi; idx = ((ri * nr) + gi) * nb + bi;
d2 = (r - r0) * (r - r0) + (g - g0) * (g - g0) + (b - b0) * (b - b0); d2 = (r - r0) * (r - r0) + (g - g0) * (g - g0) + (b - b0) * (b - b0);
if (d2 < best[idx]) { if (d2 < best[idx])
if (pixels[idx] < 256) {
gdk_colors_free (cmap, pixels + idx, 1, 0); if (pixels[idx] < 256)
else {
colors_needed--; color.pixel = pixels[idx];
color = cmap->colors[i]; gdk_colormap_free_colors (cmap, &color, 1);
if (!gdk_colormap_alloc_color (cmap, &color, FALSE, FALSE)) }
return gdk_rgb_cmap_fail ("error allocating system color\n", else
cmap, pixels); colors_needed--;
pixels[idx] = color.pixel; /* which is almost certainly i */ color = cmap->colors[i];
best[idx] = d2; if (!gdk_colormap_alloc_color (cmap, &color, FALSE, FALSE))
} return gdk_rgb_cmap_fail ("error allocating system color\n",
cmap, pixels);
pixels[idx] = color.pixel; /* which is almost certainly i */
best[idx] = d2;
}
} }
#endif #endif
...@@ -3108,15 +3112,7 @@ gdk_draw_rgb_image_core (GdkRgbInfo *image_info, ...@@ -3108,15 +3112,7 @@ gdk_draw_rgb_image_core (GdkRgbInfo *image_info,
if (image_info->bitmap) if (image_info->bitmap)
{ {
if (image_info->own_gc == NULL) if (image_info->own_gc == NULL)
{ image_info->own_gc = gdk_gc_new (drawable);
GdkColor color;
image_info->own_gc = gdk_gc_new (drawable);
gdk_color_white (image_info->cmap, &color);
gdk_gc_set_foreground (image_info->own_gc, &color);
gdk_color_black (image_info->cmap, &color);
gdk_gc_set_background (image_info->own_gc, &color);
}
gc = image_info->own_gc; gc = image_info->own_gc;
} }
for (y0 = 0; y0 < height; y0 += GDK_SCRATCH_IMAGE_HEIGHT) for (y0 = 0; y0 < height; y0 += GDK_SCRATCH_IMAGE_HEIGHT)
......
...@@ -449,7 +449,8 @@ gint gdk_window_get_origin (GdkWindow *window, ...@@ -449,7 +449,8 @@ gint gdk_window_get_origin (GdkWindow *window,
gint *x, gint *x,
gint *y); gint *y);
#ifndef GDK_DISABLE_DEPRECATED #if !defined (GDK_DISABLE_DEPRECATED) || defined (GTK_COMPILATION)
/* Used by gtk_handle_box_button_changed () */
gboolean gdk_window_get_deskrelative_origin (GdkWindow *window, gboolean gdk_window_get_deskrelative_origin (GdkWindow *window,
gint *x, gint *x,
gint *y); gint *y);
......
...@@ -4,12 +4,13 @@ libgdkincludedir = $(includedir)/gtk-2.0/gdk ...@@ -4,12 +4,13 @@ libgdkincludedir = $(includedir)/gtk-2.0/gdk
INCLUDES = @STRIP_BEGIN@ \ INCLUDES = @STRIP_BEGIN@ \
-DG_LOG_DOMAIN=\"Gdk\" \ -DG_LOG_DOMAIN=\"Gdk\" \
-DINSIDE_GDK_X11 \ -DGDK_COMPILATION \
-I$(top_srcdir) \ -I$(top_srcdir) \
-I$(top_srcdir)/gdk \ -I$(top_srcdir)/gdk \
-I$(top_builddir)/gdk \ -I$(top_builddir)/gdk \
-DG_DISABLE_DEPRECATED \ -DG_DISABLE_DEPRECATED \
-DGDK_PIXBUF_DISABLE_DEPRECATED \ -DGDK_PIXBUF_DISABLE_DEPRECATED \
-DGDK_DISABLE_DEPRECATED \
@GTK_DEBUG_FLAGS@ \ @GTK_DEBUG_FLAGS@ \
@GDK_DEP_CFLAGS@ \ @GDK_DEP_CFLAGS@ \
@STRIP_END@ @STRIP_END@
......
...@@ -1072,26 +1072,6 @@ gint ...@@ -1072,26 +1072,6 @@ gint
gdk_colormap_alloc_colors (GdkColormap *colormap, gdk_colormap_alloc_colors (GdkColormap *colormap,
GdkColor *colors, GdkColor *colors,
gint ncolors, gint ncolors,
/**
* gdk_colormap_alloc_colors:
* @colormap: a #GdkColormap.
* @colors: The color values to allocate. On return, the pixel
* values for allocated colors will be filled in.
* @ncolors: The number of colors in @colors.
* @writeable: If %TRUE, the colors are allocated writeable
* (their values can later be changed using gdk_color_change()).
* Writeable colors cannot be shared between applications.
* @best_match: If %TRUE, GDK will attempt to do matching against
* existing colors if the colors cannot be allocated as requested.
* @success: An array of length @ncolors. On return, this
* indicates whether the corresponding color in @colors was
* sucessfully allocated or not.
*
* Allocates colors from a colormap.
*
* Return value: The number of colors that were not sucessfully
* allocated.
**/
gboolean writeable, gboolean writeable,
gboolean best_match, gboolean best_match,
gboolean *success) gboolean *success)
......
...@@ -24,6 +24,8 @@ ...@@ -24,6 +24,8 @@
* GTK+ at ftp://ftp.gtk.org/pub/gtk/. * GTK+ at ftp://ftp.gtk.org/pub/gtk/.
*/ */
#undef GDK_DISABLE_DEPRECATED
#include <X11/Xlib.h> #include <X11/Xlib.h>
#include <X11/Xos.h> #include <X11/Xos.h>
#include <locale.h> #include <locale.h>
......
...@@ -73,7 +73,7 @@ gint gdk_x11_get_default_screen (void); ...@@ -73,7 +73,7 @@ gint gdk_x11_get_default_screen (void);
#define GDK_DISPLAY() gdk_display #define GDK_DISPLAY() gdk_display
#endif #endif
#ifdef INSIDE_GDK_X11 #ifdef GDK_COMPILATION
#include "gdkprivate-x11.h" #include "gdkprivate-x11.h"
#include "gdkscreen-x11.h" #include "gdkscreen-x11.h"
...@@ -95,7 +95,7 @@ gint gdk_x11_get_default_screen (void); ...@@ -95,7 +95,7 @@ gint gdk_x11_get_default_screen (void);
#define GDK_GC_GET_XGC(gc) (GDK_GC_X11(gc)->dirty_mask ? _gdk_x11_gc_flush (gc) : ((GdkGCX11 *)(gc))->xgc) #define GDK_GC_GET_XGC(gc) (GDK_GC_X11(gc)->dirty_mask ? _gdk_x11_gc_flush (gc) : ((GdkGCX11 *)(gc))->xgc)
#define GDK_WINDOW_XWINDOW GDK_DRAWABLE_XID #define GDK_WINDOW_XWINDOW GDK_DRAWABLE_XID
#else /* INSIDE_GDK_X11 */ #else /* GDK_COMPILATION */
#ifndef GDK_MULTIHEAD_SAFE #ifndef GDK_MULTIHEAD_SAFE
#define GDK_ROOT_WINDOW() (gdk_x11_get_default_root_xwindow ()) #define GDK_ROOT_WINDOW() (gdk_x11_get_default_root_xwindow ())
...@@ -117,7 +117,7 @@ gint gdk_x11_get_default_screen (void); ...@@ -117,7 +117,7 @@ gint gdk_x11_get_default_screen (void);
#define GDK_SCREEN_XNUMBER(screen) (gdk_x11_screen_get_screen_number (screen)) #define GDK_SCREEN_XNUMBER(screen) (gdk_x11_screen_get_screen_number (screen))
#define GDK_VISUAL_XVISUAL(visual) (gdk_x11_visual_get_xvisual (visual)) #define GDK_VISUAL_XVISUAL(visual) (gdk_x11_visual_get_xvisual (visual))
#endif /* INSIDE_GDK_X11 */ #endif /* GDK_COMPILATION */
GdkVisual* gdk_x11_screen_lookup_visual (GdkScreen *screen, GdkVisual* gdk_x11_screen_lookup_visual (GdkScreen *screen,
VisualID xvisualid); VisualID xvisualid);
...@@ -172,22 +172,27 @@ G_CONST_RETURN gchar *gdk_x11_get_xatom_name (Atom xatom); ...@@ -172,22 +172,27 @@ G_CONST_RETURN gchar *gdk_x11_get_xatom_name (Atom xatom);
void gdk_x11_display_grab (GdkDisplay *display); void gdk_x11_display_grab (GdkDisplay *display);
void gdk_x11_display_ungrab (GdkDisplay *display); void gdk_x11_display_ungrab (GdkDisplay *display);
#if !defined(GDK_DISABLE_DEPRECATED) || defined(GDK_COMPILATION)
gpointer gdk_x11_font_get_xfont (GdkFont *font);
#define GDK_FONT_XFONT(font) (gdk_x11_font_get_xfont (font))
#define gdk_font_lookup_for_display(display, xid) ((GdkFont*) gdk_xid_table_lookup_for_display (display, xid))
#endif /* !GDK_DISABLE_DEPRECATED || GDK_COMPILATION */
#ifndef GDK_DISABLE_DEPRECATED #ifndef GDK_DISABLE_DEPRECATED
Display * gdk_x11_font_get_xdisplay (GdkFont *font); Display * gdk_x11_font_get_xdisplay (GdkFont *font);
gpointer gdk_x11_font_get_xfont (GdkFont *font);
G_CONST_RETURN char *gdk_x11_font_get_name (GdkFont *font); G_CONST_RETURN char *gdk_x11_font_get_name (GdkFont *font);
#define GDK_FONT_XDISPLAY(font) (gdk_x11_font_get_xdisplay (font)) #define GDK_FONT_XDISPLAY(font) (gdk_x11_font_get_xdisplay (font))
#define GDK_FONT_XFONT(font) (gdk_x11_font_get_xfont (font))
#ifndef GDK_MULTIHEAD_SAFE #ifndef GDK_MULTIHEAD_SAFE
#define gdk_font_lookup(xid) ((GdkFont*) gdk_xid_table_lookup (xid)) #define gdk_font_lookup(xid) ((GdkFont*) gdk_xid_table_lookup (xid))
#endif /* GDK_MULTIHEAD_SAFE */ #endif /* GDK_MULTIHEAD_SAFE */
#define gdk_font_lookup_for_display(display, xid) ((GdkFont*) gdk_xid_table_lookup_for_display (display, xid))
#endif /* GDK_DISABLE_DEPRECATED */ #endif /* GDK_DISABLE_DEPRECATED */
G_END_DECLS G_END_DECLS
......
...@@ -18,6 +18,7 @@ INCLUDES = @STRIP_BEGIN@ \ ...@@ -18,6 +18,7 @@ INCLUDES = @STRIP_BEGIN@ \
-I$(top_srcdir)/gdk-pixbuf -I../gdk-pixbuf \ -I$(top_srcdir)/gdk-pixbuf -I../gdk-pixbuf \
-DG_DISABLE_DEPRECATED \ -DG_DISABLE_DEPRECATED \
-DGDK_PIXBUF_DISABLE_DEPRECATED \ -DGDK_PIXBUF_DISABLE_DEPRECATED \
-DGDK_DISABLE_DEPRECATED \
@GTK_DEBUG_FLAGS@ \ @GTK_DEBUG_FLAGS@ \
@GTK_DEP_CFLAGS@ \ @GTK_DEP_CFLAGS@ \
@STRIP_END@ @STRIP_END@
......
...@@ -25,6 +25,8 @@ ...@@ -25,6 +25,8 @@
* GTK+ at ftp://ftp.gtk.org/pub/gtk/. * GTK+ at ftp://ftp.gtk.org/pub/gtk/.
*/ */
#undef GDK_DISABLE_DEPRECATED
#include <stdlib.h> #include <stdlib.h>
#include <string.h> #include <string.h>
#include "config.h" #include "config.h"
......
...@@ -28,6 +28,8 @@ ...@@ -28,6 +28,8 @@
* GTK+ at ftp://ftp.gtk.org/pub/gtk/. * GTK+ at ftp://ftp.gtk.org/pub/gtk/.
*/ */
#undef GDK_DISABLE_DEPRECATED
#include <stdlib.h> #include <stdlib.h>
#include "gtkctree.h" #include "gtkctree.h"
#include "gtkbindings.h" #include "gtkbindings.h"
......
...@@ -1094,6 +1094,7 @@ gtk_handle_box_motion (GtkWidget *widget, ...@@ -1094,6 +1094,7 @@ gtk_handle_box_motion (GtkWidget *widget,
gint snap_edge; gint snap_edge;
gboolean is_snapped = FALSE; gboolean is_snapped = FALSE;
gint handle_position; gint handle_position;
GdkGeometry geometry;
hb = GTK_HANDLE_BOX (widget); hb = GTK_HANDLE_BOX (widget);
if (!hb->in_drag) if (!hb->in_drag)
...@@ -1260,7 +1261,7 @@ gtk_handle_box_motion (GtkWidget *widget, ...@@ -1260,7 +1261,7 @@ gtk_handle_box_motion (GtkWidget *widget,
gdk_window_move_resize (hb->float_window, new_x, new_y, width, height);