Commit Graph

2531 Commits

Author SHA1 Message Date
Garrett Regier
5fcf06bb91 docs: Move documentation to inline comments: GtkComboBoxEntry
Fixes https://bugzilla.gnome.org/show_bug.cgi?id=617308

Signed-off-by: Javier Jardón <jjardon@gnome.org>
2010-10-02 22:39:35 +02:00
Benjamin Otte
872ef111ec gdk: Make gdk_pixbuf_get_from_*() bindable
The ownership of the return value for gdk_pixbuf_get_from_window() and
gdk_pixbuf_get_from_surface() was determined by the first argument.

Because that is an ugly design and the functions are new to GTK3, we
decided to adapt them.
And that adaptation was quite easy since almost no one passses anything
but NULL as the first argument.
2010-10-02 03:08:24 +02:00
Matthias Clasen
9595501dbd Fix make dist 2010-10-01 18:46:09 -04:00
Matthias Clasen
fc2da1a137 Migration guide: Add an example for creating custom cursors 2010-10-01 14:54:11 -04:00
Matthias Clasen
86665897db Revert an erroneous change 2010-10-01 13:46:39 -04:00
Matthias Clasen
0bca60fdd3 GTK docs: various fixups 2010-10-01 13:05:12 -04:00
Matthias Clasen
32d1defc76 GDK docs: help gtk-doc understand gdk_window_invalidate_maybe_recurse 2010-10-01 09:10:52 -04:00
Matthias Clasen
4e96a84c67 GDK docs: Clean out some dead symbols 2010-10-01 08:09:31 -04:00
Javier Jardón
b072ea220c Remove unneded casts
As gtk_adjustment_new() returns a GtkAdjustment* now

https://bugzilla.gnome.org/show_bug.cgi?id=630731
2010-09-29 01:18:10 +02:00
Javier Jardón
42f480a537 gtk_adjustment_new() should return a GtkAdjustment*
Fixes https://bugzilla.gnome.org/show_bug.cgi?id=630731
2010-09-29 01:18:10 +02:00
Benjamin Otte
948768c708 API: remove gtk_window_set_visual()
gtk_widget_set_visual() exists now and can be used instead.

This reverts commit 59b227e123.
2010-09-28 19:13:24 +02:00
Benjamin Otte
5ac6234815 API: gtk: Add gtk_widget_set_visual()
It turns out that the previous handling of just providing a way to set
visuals just on toplevels was not sufficient. In particular it
complicated the various implementations of the tray icon specification.
This patch reintroduces gtk_widget_set_visual() which behaves very
similar to GTK2's gtk_widget_set_colormap().

A future commit will remove the gtk_window_set_visual() function.
2010-09-28 19:11:21 +02:00
Matthias Clasen
87e29c99d7 Add a migration guide section on GtkObject 2010-09-26 22:29:33 -04:00
Matthias Clasen
b81de973af Remove GtkObject from the docs 2010-09-26 22:18:46 -04:00
Matthias Clasen
f53ad33994 Remove GtkObject completely 2010-09-26 22:18:19 -04:00
Javier Jardón
945e97e505 Move documentation to inline comments: GtkPaperSize 2010-09-27 03:49:49 +02:00
Javier Jardón
e267ed84db Move documentation to inline comments: GtkAccelMap 2010-09-27 02:56:25 +02:00
Matthias Clasen
aa8561aac2 Add a missing end tag 2010-09-26 20:42:07 -04:00
Matthias Clasen
b522a1b367 Migration guide: Add an example for colormap -> visual 2010-09-26 15:11:46 +02:00
Matthias Clasen
d3a90eae72 Expand the migration guide
This commit add some text about mult-window ::draw implementations,
pointing out the gtk_cairo_should_draw_window() and
gtk_cairo_transform_to_window() convenience functions.
2010-09-26 15:11:46 +02:00
Benjamin Otte
0795f1e0c9 API: Add gtk_cairo_transform_to_window()
The function reverses the transform that GTK does before emitting a draw
event. So we can use it in "old" widgets to revert the coordinate system
properly.
2010-09-26 15:11:45 +02:00
Benjamin Otte
d9c9259861 Move GtkSizeRequest into GtkWidget
It doesn't make sense to keep them separate as GtkSizeRequest requires a
GtkWidget and GtkWidget implements GtkSizeRequest, so you can never have
one without the other.
It also makes the code a lot easier because no casts are required when
calling functions.

Also, the names would translate to gtk_widget_get_width() and people
agreed that this would be a too generic name, so a "preferred" was added
to the names.

So this patch moves the functions:
gtk_size_request_get_request_mode() => gtk_widget_get_request_mode()
gtk_size_request_get_width() => gtk_widget_get_preferred_width()
gtk_size_request_get_height() => gtk_widget_get_preferred_height()
gtk_size_request_get_size() => gtk_widget_get_preferred_size()
gtk_size_request_get_width_for_height() =>
  gtk_widget_get_preferred_width_for_height()
gtk_size_request_get_height_for_width() =>
  gtk_widget_get_preferred_height_for_width()
... and moves the corresponding vfuncs to the GtkWidgetClass.

The patch also renames the implementations of the vfuncs in widgets to
include the word "preferrred".
2010-09-26 15:11:45 +02:00
Benjamin Otte
f52a1fcfbd API: remove gdk_drawable_get_size() 2010-09-26 15:11:45 +02:00
Benjamin Otte
9403e167b4 docs: Get rid of gdk_drawable_get_size() usage in shooter example 2010-09-26 15:11:45 +02:00
Benjamin Otte
6c971ac479 API: Remove window clear APIs
The feature can and should be implemented manually using
gdk_window_get_background() and Cairo drawing. A non-cairo drawing API
does not make sense in GDK anymore.
2010-09-26 15:11:43 +02:00
Benjamin Otte
af32c9c9be API: Add size getters for GdkWindow
gdk_window_get_width() and gdk_window_get_height() will replace
gdk_drawable_get_size().
2010-09-26 15:11:43 +02:00
Matthias Clasen
f3ccf2fccf Add gtk_cairo_should_draw_window to the docs 2010-09-26 15:11:43 +02:00
Matthias Clasen
b7027d778c Docs: start migration guide additions 2010-09-26 15:11:43 +02:00
Benjamin Otte
b89920e203 API: Add gtk_widget_draw()
And here's the final patch that all the previous patches were about.
2010-09-26 15:11:43 +02:00
Benjamin Otte
9aa4f417d0 API: Remove gtk_container_propagate_expose()
Also, move the documentation to its replacement
gtk_widget_propagate_draw().
2010-09-26 15:11:42 +02:00
Benjamin Otte
f5a10b05b5 API: ruler: Remove private ruler draw functions from header 2010-09-26 15:11:34 +02:00
Benjamin Otte
9507670db4 API: Add API to query width and height when rendering
The functions are gtk_widget_get_allocated_width() and
gtk_widget_get_allocated_height().

They are currently identical to using width/height of
gtk_widget_get_allocation(), but are introduced for ease of use (no need
to use a custom struct) and to free people from having to think about
allocation.x and allocation.y (which is where the origin of the cairo
context in GtkWidget::draw is located).
2010-09-26 15:11:34 +02:00
Benjamin Otte
d4f08efd57 API: add gdk_cairo_get_clip_rectangle() convenience API 2010-09-26 15:11:34 +02:00
Matthias Clasen
0775b0a858 Make the docs build 2010-09-26 15:11:34 +02:00
Benjamin Otte
e624656c20 API: Remove GdkColormap 2010-09-26 15:11:34 +02:00
Benjamin Otte
cf4cb4f6d9 API: Remove colormap handling from GdkScreen
In particular, the following functions are gone:
- gdk_screen_get_default_colormap()
- gdk_screen_set_default_colormap()
- gdk_screen_get_system_colormap()
- gdk_screen_get_rgba_colormap()
2010-09-26 15:11:34 +02:00
Benjamin Otte
04d5c477aa API: Remove gdk_drawable_get_colormap()
And with it, remove any notion of colormaps from GdkWindow. In
particular, X11 windows will now not set attrs.colormap when calling
XCreateWindow.
2010-09-26 15:11:33 +02:00
Benjamin Otte
504a2d4194 API: Remove gdk_drawable_get_display() 2010-09-26 15:11:33 +02:00
Benjamin Otte
7f486231ac API: Add gdk_window_get_display() 2010-09-26 15:11:33 +02:00
Benjamin Otte
a6ef356107 API: Remove drawable getters for visual, screen and depth
Removed and replaced are:
gdk_drawable_get_visual() => gdk_window_get_visual()
gdk_drawable_get_screen() => gdk_window_get_screen()
gdk_drawable_get_depth()  => gdk_visual_get_depth
                                          (gdk_window_get_visual())
2010-09-26 15:11:33 +02:00
Benjamin Otte
5b9bbf9de2 API: Add gdk_window_get_visual() and gdk_window_get_screen()
Now that we store the visual in the GdkWindow, these are rather trivial
accessors.
2010-09-26 15:11:32 +02:00
Benjamin Otte
894d402c0f API: Remove gdk_drawable_set_colormap() 2010-09-26 15:11:32 +02:00
Benjamin Otte
e316157671 API: gdk_pixbuf_get_from_drawable() => gdk_pixbuf_get_from_window()
The Colormap argument needed to be removed, so the renaming is just a
side effect.
2010-09-26 15:11:32 +02:00
Benjamin Otte
3607a4c082 API: Remove setters and getters for default colormaps
This removes:
gtk_widget_set_default_colormap()
gtk_widget_get_default_colormap()
gtk_widget_get_default_visual()

Colormaps are gone, and the default visual is the system visual of the
default screen.
2010-09-26 15:11:32 +02:00
Benjamin Otte
c51e8bd9e5 API: Remove colormap setting and getting from GtkWidget
gtk_widget_get_colormap() and gtk_widget_set_colormap() are gone. They
are replaced by visuals.
2010-09-26 15:11:32 +02:00
Benjamin Otte
59b227e123 window: Keep track of own visual
Add gtk_window_set_visual() and a "visual" property. This allows
changing the window visual to the rgba one and other awesome things
(like implementing the trayicon spec).
2010-09-26 15:11:32 +02:00
Benjamin Otte
b479ff9cb5 API: Remove gtk_widget_push_colormap()
And of course, gtk_widget_pop_colormap() is gone, too.
No replacement is necessary, the function is basically unused.
2010-09-26 15:11:31 +02:00
Benjamin Otte
f74f9b2766 gdk: Remove GdkPixmap
All iusers of it are gone, so it's now time to let go.
cairo_surface_t is a full replacement, combined with
gdk_window_create_similar_surface().
2010-09-26 15:11:30 +02:00
Benjamin Otte
6607f2b794 API: Rename gdk_set_source_pixmap() to gdk_set_source_window()
That's what it's used for now.
2010-09-26 15:11:30 +02:00
Benjamin Otte
4a9c32dc36 API: Remove APIs to generate pixmaps from pixbufs
The 3 functions in question were:
- gdk_pixbuf_render_threshold_alpha()
- gdk_pixbuf_render_pixmap_and_mask()
- gdk_pixbuf_render_pixmap_and_mask_for_colormap()

All of them can be replaced using Cairo if they have to. The
functionality is only needed to talk to old X interfaces and normal apps
do fine without them.
2010-09-26 15:11:29 +02:00