]> Pileus Git - ~andy/gtk/commitdiff
Remove some deprecated stuff from GdkWindow
authorJavier Jardón <jjardon@gnome.org>
Wed, 12 May 2010 02:25:46 +0000 (04:25 +0200)
committerJavier Jardón <jjardon@gnome.org>
Wed, 12 May 2010 02:29:55 +0000 (04:29 +0200)
Also, substitute the deprecated functions with the correct ones

15 files changed:
docs/faq/gtk-faq.sgml
docs/reference/gdk/gdk3-sections.txt
docs/reference/gdk/tmpl/event_structs.sgml
docs/reference/gdk/tmpl/windows.sgml
docs/reference/gdk/tmpl/x_interaction.sgml
gdk/directfb/gdkwindow-directfb.c
gdk/gdk.symbols
gdk/gdkwindow.h
gdk/quartz/gdkwindow-quartz.c
gdk/testgdk.c
gdk/win32/gdkdnd-win32.c
gdk/win32/gdkwin32.h
gdk/win32/gdkwindow-win32.c
gdk/x11/gdkwindow-x11.c
gtk/gtkwidget.c

index 481f17faec82e06d6c7bfb801d9a47e6ba8d8182..0da5e48e65a8eeba3b41e637412e0ebc1af80d7e 100644 (file)
@@ -3102,7 +3102,7 @@ like this:</para>
   gc = gdk_gc_new(widget->window);
 
   /* find proper dimensions for rectangle */
-  gdk_window_get_size(widget->window, &amp;width, &amp;height);
+  gdk_drawable_get_size(widget->window, &amp;width, &amp;height);
 
   /* the color we want to use */
   color = (GdkColor *)malloc(sizeof(GdkColor));
index 065a670e4a5446045805f9a8f0c604e5b406c023..58d069a409e740008d0cabedb73f62165199293f 100644 (file)
@@ -612,8 +612,6 @@ GdkWindowAttr
 GdkWindowAttributesType
 gdk_window_new
 gdk_window_destroy
-gdk_window_ref
-gdk_window_unref
 gdk_window_get_window_type
 gdk_window_at_pointer
 gdk_window_show
@@ -647,7 +645,6 @@ gdk_window_reparent
 gdk_window_clear
 gdk_window_clear_area
 gdk_window_clear_area_e
-gdk_window_copy_area
 gdk_window_raise
 gdk_window_lower
 gdk_window_restack
@@ -696,14 +693,12 @@ gdk_window_input_shape_combine_region
 gdk_window_set_child_input_shapes
 gdk_window_merge_child_input_shapes
 gdk_window_set_static_gravities
-gdk_window_set_hints
 gdk_window_set_title
 gdk_window_set_background
 gdk_window_set_back_pixmap
 GDK_PARENT_RELATIVE
 gdk_window_set_cursor
 gdk_window_get_cursor
-gdk_window_set_colormap
 gdk_window_get_user_data
 gdk_window_get_geometry
 gdk_window_set_geometry_hints
@@ -717,10 +712,6 @@ gdk_window_set_urgency_hint
 gdk_window_get_position
 gdk_window_get_root_origin
 gdk_window_get_frame_extents
-gdk_window_get_size
-gdk_window_get_visual
-gdk_window_get_colormap
-gdk_window_get_type
 gdk_window_get_origin
 gdk_window_get_deskrelative_origin
 gdk_window_get_root_coords
@@ -1237,7 +1228,6 @@ gdk_drag_context_get_type
 <TITLE>X Window System Interaction</TITLE>
 <FILE>x_interaction</FILE>
 GDK_ROOT_WINDOW
-GDK_ROOT_PARENT
 GDK_DISPLAY
 GDK_WINDOW_XDISPLAY
 GDK_WINDOW_XID
index 42c54b06f23b72f3c61440fff5e10eacd6303ef6..2ba31393a43876948c136855a915102522d59282 100644 (file)
@@ -383,7 +383,7 @@ union, 16-bit data uses the s array, and 32-bit data uses the l array.
 <!-- ##### STRUCT GdkEventNoExpose ##### -->
 <para>
 Generated when the area of a #GdkDrawable being copied, with gdk_draw_drawable()
-or gdk_window_copy_area(), was completely available.
+, was completely available.
 </para>
 <para>
 FIXME: add more here.
index 0b2d7145114df8e35a9b0897c0c3d86504eab63c..c2e725ed34bd4cb8c8e0ee3513d72e70c1b9a249 100644 (file)
@@ -510,21 +510,6 @@ corresponding flag in #GdkWindowAttributesType.
 @window: 
 
 
-<!-- ##### MACRO gdk_window_ref ##### -->
-<para>
-Deprecated equivalent of g_object_ref()
-</para>
-
-@Returns: the window
-
-
-<!-- ##### MACRO gdk_window_unref ##### -->
-<para>
-Deprecated equivalent of g_object_unref()
-</para>
-
-
-
 <!-- ##### FUNCTION gdk_window_get_window_type ##### -->
 <para>
 
@@ -825,26 +810,6 @@ Deprecated equivalent of g_object_unref()
 @height: 
 
 
-<!-- ##### MACRO gdk_window_copy_area ##### -->
-<para>
-Deprecated equivalent to gdk_draw_drawable(), see that function for docs
-</para>
-
-@drawable: a #GdkDrawable
-@gc: a #GdkGC sharing the drawable's visual and colormap
-@x: X position in @drawable where the rectangle should be drawn
-@y: Y position in @drawable where the rectangle should be drawn
-@source_drawable: the source #GdkDrawable, which may be the same as @drawable
-@source_x: X position in @src of rectangle to draw
-@source_y: Y position in @src of rectangle to draw
-@width: width of rectangle to draw, or -1 for entire @src width
-@height: height of rectangle to draw, or -1 for entire @src height
-<!-- # Unused Parameters # -->
-@drawable: a #GdkDrawable
-@xdest: X position in @drawable where the rectangle should be drawn
-@ydest: Y position in @drawable where the rectangle should be drawn
-
-
 <!-- ##### FUNCTION gdk_window_raise ##### -->
 <para>
 
@@ -1248,21 +1213,6 @@ backend, <type>MSG</type>s for Win32).
 @Returns: 
 
 
-<!-- ##### FUNCTION gdk_window_set_hints ##### -->
-<para>
-
-</para>
-
-@window: 
-@x: 
-@y: 
-@min_width: 
-@min_height: 
-@max_width: 
-@max_height: 
-@flags: 
-
-
 <!-- ##### FUNCTION gdk_window_set_title ##### -->
 <para>
 
@@ -1318,13 +1268,6 @@ window.
 @Returns: 
 
 
-<!-- ##### MACRO gdk_window_set_colormap ##### -->
-<para>
-Deprecated equivalent to gdk_drawable_set_colormap()
-</para>
-
-
-
 <!-- ##### FUNCTION gdk_window_get_user_data ##### -->
 <para>
 
@@ -1449,37 +1392,6 @@ Deprecated equivalent to gdk_drawable_set_colormap()
 @rect: 
 
 
-<!-- ##### MACRO gdk_window_get_size ##### -->
-<para>
-Deprecated equivalent of gdk_drawable_get_size().
-</para>
-
-
-
-<!-- ##### MACRO gdk_window_get_visual ##### -->
-<para>
-Deprecated equivalent of gdk_drawable_get_visual().
-</para>
-
-@Returns: the #GdkVisual of the window
-
-
-<!-- ##### MACRO gdk_window_get_colormap ##### -->
-<para>
-Deprecated equivalent of gdk_drawable_get_colormap().
-</para>
-
-@Returns: colormap for the window
-
-
-<!-- ##### MACRO gdk_window_get_type ##### -->
-<para>
-Deprecated equivalent of gdk_drawable_get_type().
-</para>
-
-@Returns: type of drawable
-
-
 <!-- ##### FUNCTION gdk_window_get_origin ##### -->
 <para>
 
index 66a5a0717202ffb9259d38864ed9fa5b04f499cf..350073ff1cd71c531180cffe0caac4c23bc44ae8 100644 (file)
@@ -26,14 +26,6 @@ Obtains the Xlib window id of the root window of the current screen.
 </para>
 
 
-
-<!-- ##### MACRO GDK_ROOT_PARENT ##### -->
-<para>
-Obtains the Xlib window id of the root window of the default screen.
-</para>
-
-
-
 <!-- ##### MACRO GDK_DISPLAY ##### -->
 <para>
 The current display.
index e35da69bb54256b0854618b6f7d2421d4c7a6b8e..83da5b8a849e78747aeff3e3e6cae8570a3671fc 100644 (file)
@@ -1526,26 +1526,6 @@ gdk_window_directfb_lower (GdkWindow *window)
     }
 }
 
-void
-gdk_window_set_hints (GdkWindow *window,
-                      gint       x,
-                      gint       y,
-                      gint       min_width,
-                      gint       min_height,
-                      gint       max_width,
-                      gint       max_height,
-                      gint       flags)
-{
-  g_return_if_fail (GDK_IS_WINDOW (window));
-
-  if (GDK_WINDOW_DESTROYED (window))
-    return;
-
-  D_DEBUG_AT( GDKDFB_Window, "%s( %p, %3d,%3d, min %4dx%4d, max %4dx%4d, flags 0x%08x )\n", G_STRFUNC,
-              window, x,y, min_width, min_height, max_width, max_height, flags );
-  /* N/A */
-}
-
 void
 gdk_window_set_geometry_hints (GdkWindow         *window,
                                const GdkGeometry *geometry,
index 992d2760334835f3d6a1bc86aba2cf3bcb54ee7e..8f1aaf3a4aff8deb2af582d55fbf46e986d048b1 100644 (file)
@@ -744,9 +744,6 @@ gdk_window_foreign_new_for_display
 gdk_window_focus
 gdk_window_lookup
 gdk_window_lookup_for_display
-#ifndef GDK_DISABLE_DEPRECATED
-gdk_window_set_hints
-#endif
 gdk_window_get_type_hint
 gdk_window_set_type_hint
 gdk_window_set_modal_hint
index f901f28201dd0f305d7c3776310483612457ea67..5d2ade816892542707083f99064dd541fcbc034a 100644 (file)
@@ -475,16 +475,6 @@ GdkWindow*    gdk_window_lookup_for_display (GdkDisplay      *display,
 
 /* GdkWindow */
 
-#ifndef GDK_DISABLE_DEPRECATED
-void         gdk_window_set_hints       (GdkWindow       *window,
-                                         gint             x,
-                                         gint             y,
-                                         gint             min_width,
-                                         gint             min_height,
-                                         gint             max_width,
-                                         gint             max_height,
-                                         gint             flags);
-#endif
 void              gdk_window_set_type_hint (GdkWindow        *window,
                                             GdkWindowTypeHint hint);
 GdkWindowTypeHint gdk_window_get_type_hint (GdkWindow        *window);
@@ -699,19 +689,6 @@ void       gdk_window_redirect_to_drawable   (GdkWindow     *window,
                                               gint           height);
 void       gdk_window_remove_redirection     (GdkWindow     *window);
 
-#ifndef GDK_DISABLE_DEPRECATED
-#define GDK_ROOT_PARENT()             (gdk_get_default_root_window ())
-#define gdk_window_get_size            gdk_drawable_get_size
-#define gdk_window_get_type            gdk_window_get_window_type
-#define gdk_window_get_colormap        gdk_drawable_get_colormap
-#define gdk_window_set_colormap        gdk_drawable_set_colormap
-#define gdk_window_get_visual          gdk_drawable_get_visual
-#define gdk_window_ref                 g_object_ref
-#define gdk_window_unref               g_object_unref
-
-#define gdk_window_copy_area(drawable,gc,x,y,source_drawable,source_x,source_y,width,height) \
-   gdk_draw_pixmap(drawable,gc,source_drawable,source_x,source_y,x,y,width,height)
-#endif /* GDK_DISABLE_DEPRECATED */
 
 G_END_DECLS
 
index a8e385f0dd6a052ace474d47a4d224ab872d568b..9717b31754a3826f0290cb6e39612e54a931cf8b 100644 (file)
@@ -1333,9 +1333,9 @@ move_resize_window_internal (GdkWindow *window,
       old_visible.x = -private->x;
       old_visible.y = -private->y;
 
-      gdk_window_get_size (GDK_DRAWABLE (private->parent), 
-                           &old_visible.width, 
-                           &old_visible.height);
+      gdk_drawable_get_size (GDK_DRAWABLE (private->parent),
+                             &old_visible.width,
+                             &old_visible.height);
     }
 
   if (x != -1)
@@ -2341,19 +2341,6 @@ gdk_window_focus (GdkWindow *window,
     }
 }
 
-void
-gdk_window_set_hints (GdkWindow *window,
-                     gint       x,
-                     gint       y,
-                     gint       min_width,
-                     gint       min_height,
-                     gint       max_width,
-                     gint       max_height,
-                     gint       flags)
-{
-  /* FIXME: Implement */
-}
-
 static
 gint window_type_hint_to_level (GdkWindowTypeHint hint)
 {
index 9b4687c0c6bbd2169cd1e557ea4fe343f7aea955..0532ab25a4ec000f870abfe833c17ab0413e2206 100644 (file)
@@ -361,7 +361,7 @@ test_pixmaps (gint depth)
       {
        pixmap = gdk_pixmap_new (NULL, width, height, depth);
        ASSERT (pixmap != NULL);
-       gdk_window_get_size (pixmap, &w, &h);
+       gdk_drawable_get_size (pixmap, &w, &h);
        QTESTF (w == width, (" w:%d", w));
        QTESTF (h == height, (" h:%d", h));
        image = gdk_drawable_get_image (pixmap, 0, 0, w, h);
@@ -444,10 +444,10 @@ test_temp_windows (void)
        gdk_window_get_geometry (window, &x, &y, &w, &h, &d);
        QTESTF (w == 37, ("w:%d", w));
        QTESTF (h == 19, ("h:%d", h));
-       visual = gdk_window_get_visual (window);
+       visual = gdk_drawable_get_visual (window);
        QTEST (visual == system_visual);
        gdk_window_hide (window);
-       gdk_window_unref (window);
+       g_object_unref (window);
       }
   TEST (retval);
 }
@@ -600,7 +600,7 @@ test_one_line_on_drawable (GdkDrawable *drawable,
   line_width = gcvalues.line_width > 0 ? gcvalues.line_width : 1;
   w_up = w_left = line_width/2;
   w_down = w_right = (line_width & 1) ? line_width/2 : line_width/2-1;
-  gdk_window_get_size (drawable, &w, &h);
+  gdk_drawable_get_size (drawable, &w, &h);
   oldimage = gdk_drawable_get_image (drawable, 0, 0, w, h);
 
   if (depth == 32)
@@ -714,7 +714,7 @@ test_one_rectangle_on_drawable (GdkDrawable *drawable,
       w_down = w_right = (line_width & 1) ? line_width/2 : line_width/2-1;
     }
 
-  gdk_window_get_size (drawable, &w, &h);
+  gdk_drawable_get_size (drawable, &w, &h);
   oldimage = gdk_drawable_get_image (drawable, 0, 0, w, h);
 
   if (depth == 32)
@@ -820,7 +820,7 @@ test_some_arcs_on_drawable (GdkDrawable *drawable,
       w_down = w_right = (line_width & 1) ? line_width/2 : line_width/2-1;
     }
 
-  gdk_window_get_size (drawable, &w, &h);
+  gdk_drawable_get_size (drawable, &w, &h);
   oldimage = gdk_drawable_get_image (drawable, 0, 0, w, h);
 
   if (depth == 32)
index dc34afe45e1694a95d8ffa37dbdcfc96cb6449ea..f0b57a9b68a34b0b125f9b6e58b3a6c8b23b018e 100644 (file)
@@ -2359,7 +2359,7 @@ gdk_window_register_dnd (GdkWindow *window)
            OTHER_API_FAILED ("RegisterDragDrop");
          else
            {
-             gdk_window_ref (window);
+             g_object_ref (window);
              g_hash_table_insert (target_ctx_for_window, GDK_WINDOW_HWND (window), ctx);
            }
        }
index bf1fd4b1601b0b03db609392543aea2305cdfe57..401bca8fd1b25693c97886f409fb3f639ef7f0b2 100644 (file)
@@ -41,8 +41,6 @@ G_BEGIN_DECLS
 
 #include "gdkprivate-win32.h"
 
-#undef GDK_ROOT_PARENT /* internal access is direct */
-#define GDK_ROOT_PARENT()             ((GdkWindow *) _gdk_parent_root)
 #define GDK_WINDOW_HWND(win)          (GDK_DRAWABLE_IMPL_WIN32(((GdkWindowObject *)win)->impl)->handle)
 #define GDK_PIXMAP_HBITMAP(pixmap)    (GDK_DRAWABLE_IMPL_WIN32(((GdkPixmapObject *)pixmap)->impl)->handle)
 #define GDK_DRAWABLE_IMPL_WIN32_HANDLE(d) (((GdkDrawableImplWin32 *) d)->handle)
index 598d291ed1cc4ec2ec54c47e813d6677f6daf809..55ca651efe77a2995df701406a313ab908768b15 100644 (file)
@@ -1460,52 +1460,6 @@ gdk_win32_window_lower (GdkWindow *window)
     }
 }
 
-void
-gdk_window_set_hints (GdkWindow *window,
-                     gint       x,
-                     gint       y,
-                     gint       min_width,
-                     gint       min_height,
-                     gint       max_width,
-                     gint       max_height,
-                     gint       flags)
-{
-  /* Note that this function is obsolete */
-
-  GdkWindowImplWin32 *impl;
-
-  g_return_if_fail (GDK_IS_WINDOW (window));
-  
-  if (GDK_WINDOW_DESTROYED (window))
-    return;
-  
-  impl = GDK_WINDOW_IMPL_WIN32 (GDK_WINDOW_OBJECT (window)->impl);
-
-  GDK_NOTE (MISC, g_print ("gdk_window_set_hints: %p: %dx%d..%dx%d @%+d%+d\n",
-                          GDK_WINDOW_HWND (window),
-                          min_width, min_height, max_width, max_height,
-                          x, y));
-
-  if (flags)
-    {
-      GdkGeometry geom;
-      gint geom_mask = 0;
-
-      geom.min_width  = min_width;
-      geom.min_height = min_height;
-      geom.max_width  = max_width;
-      geom.max_height = max_height;
-
-      if (flags & GDK_HINT_MIN_SIZE)
-        geom_mask |= GDK_HINT_MIN_SIZE;
-
-      if (flags & GDK_HINT_MAX_SIZE)
-        geom_mask |= GDK_HINT_MAX_SIZE;
-
-      gdk_window_set_geometry_hints (window, &geom, geom_mask);
-    }
-}
-
 void
 gdk_window_set_urgency_hint (GdkWindow *window,
                             gboolean   urgent)
index e2dd131f3b8e472d991033ddb25cc636f9c0948b..2dc074af7db2113bf2d0ee3ef7765e78c9c60dfe 100644 (file)
@@ -1877,72 +1877,6 @@ gdk_window_focus (GdkWindow *window,
     }
 }
 
-/**
- * gdk_window_set_hints:
- * @window: a #GdkWindow
- * @x: ignored field, does not matter
- * @y: ignored field, does not matter
- * @min_width: minimum width hint
- * @min_height: minimum height hint
- * @max_width: max width hint
- * @max_height: max height hint
- * @flags: logical OR of GDK_HINT_POS, GDK_HINT_MIN_SIZE, and/or GDK_HINT_MAX_SIZE
- *
- * This function is broken and useless and you should ignore it.
- * If using GTK+, use functions such as gtk_window_resize(), gtk_window_set_size_request(),
- * gtk_window_move(), gtk_window_parse_geometry(), and gtk_window_set_geometry_hints(),
- * depending on what you're trying to do.
- *
- * If using GDK directly, use gdk_window_set_geometry_hints().
- * 
- **/
-void
-gdk_window_set_hints (GdkWindow *window,
-                     gint       x,
-                     gint       y,
-                     gint       min_width,
-                     gint       min_height,
-                     gint       max_width,
-                     gint       max_height,
-                     gint       flags)
-{
-  XSizeHints size_hints;
-  
-  if (GDK_WINDOW_DESTROYED (window) ||
-      !WINDOW_IS_TOPLEVEL_OR_FOREIGN (window))
-    return;
-  
-  size_hints.flags = 0;
-  
-  if (flags & GDK_HINT_POS)
-    {
-      size_hints.flags |= PPosition;
-      size_hints.x = x;
-      size_hints.y = y;
-    }
-  
-  if (flags & GDK_HINT_MIN_SIZE)
-    {
-      size_hints.flags |= PMinSize;
-      size_hints.min_width = min_width;
-      size_hints.min_height = min_height;
-    }
-  
-  if (flags & GDK_HINT_MAX_SIZE)
-    {
-      size_hints.flags |= PMaxSize;
-      size_hints.max_width = max_width;
-      size_hints.max_height = max_height;
-    }
-  
-  /* FIXME: Would it be better to delete this property if
-   *        flags == 0? It would save space on the server
-   */
-  XSetWMNormalHints (GDK_WINDOW_XDISPLAY (window),
-                    GDK_WINDOW_XID (window),
-                    &size_hints);
-}
-
 /**
  * gdk_window_set_type_hint:
  * @window: A toplevel #GdkWindow
index c97a56164e840c702dff895b54356b7197cdadb9..1ef3526c0d1429be1c2854e15fd9fcfcfea08b0e 100644 (file)
@@ -2170,8 +2170,8 @@ gtk_widget_class_init (GtkWidgetClass *klass)
    * @event: the #GdkEventNoExpose which triggered this signal
    *
    * The ::no-expose-event will be emitted when the @widget's window is 
-   * drawn as a copy of another #GdkDrawable (with gdk_draw_drawable() or
-   * gdk_window_copy_area()) which was completely unobscured. If the source
+   * drawn as a copy of another #GdkDrawable (with gdk_draw_drawable())
+   * which was completely unobscured. If the source
    * window was partially obscured #GdkEventExpose events will be generated
    * for those areas.
    *