Commit Graph

84 Commits

Author SHA1 Message Date
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
Matthias Clasen
841edfe8c3 Remove an unused pointer from GtkDrawingArea
This is part of removing all sealed members from instance structures.
2010-12-17 20:54:13 -05:00
Benjamin Otte
e8a6bad00b gtk: Don't set colormap anymore when creating GDK windows
Colormaps are about to be removed, so not using them sounds like an
awesome idea.
2010-09-26 15:11:31 +02:00
Javier Jardón
379fc17fa9 gtk/gtkdrawingarea.c: use accessor functions to access GtkWidget 2010-08-22 22:56:12 +02:00
Javier Jardón
0a07e9733b gtk/: fully remove gtkalias hacks
https://bugzilla.gnome.org/show_bug.cgi?id=623845
2010-07-10 02:51:26 +02:00
Christian Dywan
2eb26d68f6 Remove deprecated function from GtkDrawingArea 2010-05-03 01:39:49 +02:00