Commit Graph

89 Commits

Author SHA1 Message Date
Matthias Clasen
18788c2a86 Remove gtk_widget_get/set_has_surface
These serve no purpose anymore - widgets don't
have surfaces, unless they're a GtkNative.
2019-05-28 20:25:15 +00:00
Timm Bäder
d8274856de drawingarea: Clarify some comments 2018-06-18 17:35:03 +02:00
Benjamin Otte
73b4a62f51 snapshot: Redo debug messages
Instead of every snapshot function having debug messages, have an
explicit gtk_snapshot_push_debug() function that appends a debug node.
2018-04-24 04:06:58 +02:00
Alexander Larsson
63e060a21d GtkWidget: Start renaming widget->window
This is an automated change doing these command:

git sed -f g gtk_widget_set_has_window gtk_widget_set_has_surface
git sed -f g gtk_widget_get_has_window gtk_widget_get_has_surface
git sed -f g gtk_widget_set_parent_window gtk_widget_set_parent_surface
git sed -f g gtk_widget_get_parent_window gtk_widget_get_parent_surface
git sed -f g gtk_widget_set_window gtk_widget_set_surface
git sed -f g gtk_widget_get_window gtk_widget_get_surface
git sed -f g gtk_widget_register_window gtk_widget_register_surface
git sed -f g gtk_widget_unregister_window gtk_widget_unregister_surface

git checkout NEWS*
2018-03-20 15:21:12 +01:00
Matthias Clasen
4c150d8eb5 The big versioning cleanup
Remove all the old 2.x and 3.x version annotations.
GTK+ 4 is a new start, and from the perspective of a
GTK+ 4 developer all these APIs have been around since
the beginning.
2018-02-06 01:16:32 -05:00
Timm Bäder
1aa811ce12 Remove all gtk_widget_get_content_size usages
And remove the function itself. Make everything use gtk_widget_get_width
and gtk_widget_get_height instead.
2017-12-06 07:56:12 +01:00
Timm Bäder
114f232a99 drawingarea: Fix code snippet
Remove state parameter to gtk_style_context_get_color
2017-10-12 15:42:03 +02:00
Timm Bäder
e2e91bf9bc Fix a few documentation issues 2017-07-19 21:27:15 -04:00
Timm Bäder
4fb2fc7d89 drawingarea: Remove useless line from code example
backgrounds are drawn automatically now.
2017-07-19 21:27:15 -04:00
Timm Bäder
3dc6d240b3 Fix a few allocation coordinates & sizes 2017-07-19 21:27:15 -04:00
Benjamin Otte
6055028c96 snapshot: Rename append APIs
Instead of having gtk_snapshot_append_foo_node(), just have
gtk_snapshot_append_foo(). Nobody needs to know that this internally
uses nodes.
2017-01-13 04:46:09 +01:00
Emmanuele Bassi
4cbe079767 Use Graphene init macros for compound literals
The Graphene init macros can now be used for compound literals, which
means we need to update our mixed uses.
2016-11-21 16:21:38 +00:00
Benjamin Otte
2745c2502f snapshot: Move GtkSnapshot declaration to gtypes.h 2016-11-19 20:58:36 +01:00
Benjamin Otte
5940625e9e drawingarea: Add gtk_drawing_area_set_draw_func() 2016-11-18 06:40:53 +01:00
Benjamin Otte
41d1e1fea8 drawingarea: Add content-width and content-height properties
People should use these instead of gtk_widget_set_size_request().
2016-11-18 06:40:53 +01:00
Benjamin Otte
100ac17505 drawingarea: Clean up
No need to send configure events anymore and this should be a no-window
widget.
2016-11-18 06:40:53 +01:00
Timm Bäder
c944bf7330 Call gtk_widget_set_has_window for missing windowed widgets 2016-11-12 21:48:23 +01:00
Benjamin Otte
8b76d12f28 drawingarea: Clarify docs
Don't use gdk_window_invalidate(), use gtk_widget_queue_draw().
2016-10-27 05:07:23 +02:00
Benjamin Otte
9d2309cc39 drawingarea: Use gdk_window_new_child() 2016-10-18 00:22:35 +02:00
Benjamin Otte
eace2cf421 API: Remove gdk_window_set_background()
Backgrounds are always transparent black.
2016-10-16 18:17:21 +02:00
Benjamin Otte
662001b60a API: Remove ability to set visuals on windows
And with it, gtk_widget_get_visual() and gtk_widget_set_visual() are
gone.

We now always use the RGBA visual (if available) and otherwise fall back
to the system visual.
2016-10-16 18:17:21 +02:00
Matthias Clasen
5a80a35757 drawingarea: Update docs around background handling
The behavior changed this cycle. Update the docs to recommend
an explicit gtk_render_background call.
2016-02-21 00:46:54 -05:00
Cosimo Cecchi
62af1cbb1d drawingarea: use same background approach as GtkLayout
Call gtk_style_context_set_background() every time the style is updated
and add a comment as to why we still need to do it here.

https://bugzilla.gnome.org/show_bug.cgi?id=752599
2015-07-20 08:43:08 -07:00
Cosimo Cecchi
90d237ced4 Revert "drawingarea: don't call gtk_style_context_set_background()"
This reverts commit 6786c9d724.

https://bugzilla.gnome.org/show_bug.cgi?id=752599
2015-07-20 08:43:08 -07:00
Cosimo Cecchi
11ce41d9c4 Revert "drawingarea: checks parent's draw() before call it"
This reverts commit b3166b745f.

https://bugzilla.gnome.org/show_bug.cgi?id=752599
2015-07-20 08:43:08 -07:00
Víctor Manuel Jáquez Leal
b3166b745f drawingarea: checks parent's draw() before call it
commit 6786c9d7 introduced a bug when a drawing area is used for
rendering videos, since GtkWidgetClass doesn't set a draw()
method by itself.

https://bugzilla.gnome.org/show_bug.cgi?id=751877
2015-07-03 14:21:30 +01:00
Cosimo Cecchi
6786c9d724 drawingarea: don't call gtk_style_context_set_background() 2015-07-01 16:09:22 -07:00
Jasper St. Pierre
2651b99a13 colorplane: Don't connect to the configure-event signal
We want to stop people from using configure events
entirely. GtkDrawingArea synthesizes a configure event, but we can just
make the only user of this functionality stop it, and correct the
documentation to not mention it.
2014-06-28 00:10:42 -04:00
Matthias Clasen
38e4fbc90c Revert "colorplane: Don't connect to the configure-event signal"
This reverts commit 886f58e1cf.

This made the color plane go missing.
2014-06-27 22:03:59 -04:00
Jasper St. Pierre
886f58e1cf colorplane: Don't connect to the configure-event signal
We want to stop people from using configure events
entirely. GtkDrawingArea synthesizes a configure event, but we can just
make the only user of this functionality stop it, and correct the
documentation to not mention it.
2014-06-26 15:58:44 -04:00
Matthias Clasen
c779b42476 Docs: use // for comments in examples
Without sgml mode, we can't escape /* as /* anymore,
so just switch to // for comments in examples.
2014-02-14 23:34:22 -05:00
Matthias Clasen
7f6a964c47 Docs: Remove all entities and turn off sgml mode
With all element markup gone, it is time to turn off
sgml mode, and get rid of entities as well.
2014-02-09 17:58:07 -05:00
William Jon McCann
285d216d3e docs: use apostrophe in *'ll 2014-02-07 13:35:54 -05:00
William Jon McCann
7a208fbbf3 docs: use proper apostrophe
https://wiki.gnome.org/Design/OS/Typography
2014-02-07 13:06:10 -05:00
William Jon McCann
0ce016650b docs: Use markup for links 2014-02-07 09:42:12 -05:00
William Jon McCann
2a45418b67 docs: use proper quotes 2014-02-05 15:08:42 -05:00
William Jon McCann
3b3d8ca456 docs: Use "#" for refsect2 instead of ## 2014-02-04 21:00:58 -05:00
William Jon McCann
63e887e165 docs: replace all <examples> with markdown headings 2014-02-04 16:58:54 -05:00
Matthias Clasen
30cc1512e6 Docs: Use markdown for lists
This greatly reduces the amount of xml in the docs.
2014-02-02 01:07:39 -05:00
William Jon McCann
e31ebda1d7 docs: don't escape entities in example code
https://bugzilla.gnome.org/show_bug.cgi?id=723119
2014-01-29 12:45:49 -05:00
William Jon McCann
4c8bd8e7cf docs: Identify examples that are C code
https://bugzilla.gnome.org/show_bug.cgi?id=723119
2014-01-29 12:45:49 -05:00
William Jon McCann
768bc44081 docs: use |[ ]| instead of <programlisting></programlisting>
https://bugzilla.gnome.org/show_bug.cgi?id=723119
2014-01-29 12:45:49 -05:00
Matthias Clasen
e904d1c97d GtkDrawingArea: Set an accessible role
And update the a11y tests to match. Pointed out in
https://bugzilla.gnome.org/show_bug.cgi?id=721040
2014-01-04 17:41:23 -05:00
Adel Gadllah
0b1f8a5c4b Fix compiler warnings
Remove two unused variables.
2013-02-11 11:40:15 +01:00
Alexander Larsson
3d4cd4db3e Add gtk_widget_(un)register_window
This replaces the previously hardcoded calls to gdk_window_set_user_data,
and also lets us track which windows are a part of a widget. Old code
should continue working as is, but new features that require the
windows may not work perfectly.

We need this for the transparent widget support to work, as we need
to specially mark the windows of child widgets.

https://bugzilla.gnome.org/show_bug.cgi?id=687842
2013-02-07 11:11:37 +01:00
Benjamin Otte
7844e8089c types: Clean up gtkwidget.h includes
In particular gtksettings.h and gtkstylecontext.h needed to be included
in lots of places now.

Also, I order the includes alphabetically in a bunch of headers.
2012-03-03 19:45:03 +01:00
Javier Jardón
9d0febc9a6 Change FSF Address 2012-02-27 17:06:11 +00:00
Paolo Borelli
350d0b54e3 Do not use old functions in the docs. 2011-01-29 21:32:56 +01:00
Matthias Clasen
c770fdd08a Move GtkDrawingArea docs inline
Based on a patch by Garrett Regier.

https://bugzilla.gnome.org/show_bug.cgi?id=617315
2011-01-04 13:26:32 -05:00
Carlos Garnacho
c180edd80c Make GtkDrawingArea use GtkStyleContext 2011-01-04 03:06:19 +01:00