Commit Graph

570 Commits

Author SHA1 Message Date
Matthias Clasen
997f0de4d5 a11y: Intern a string 2017-11-17 23:25:45 -05:00
Matthias Clasen
0d23606653 Drop gtk_icon_size_lookup
Add a new, private gtk_image_get_image_size to replace it, and
update the remaining callers in a suitable way.
2017-11-15 14:22:17 -05:00
Benjamin Otte
049cc6aa01 image: Change getters
Instead of returning the icon size with them, make
gtk_image_get_icon_name() and gtk_image_get_gicon() only return the icon
itself.

As a benefit, we can turn them into regular getters that return values
instead of requiring out parameters.

Instead, provide gtk_image_get_icon_size() to query the icon size.
2017-11-15 14:22:17 -05:00
Benjamin Otte
e0d3602331 a11y: Handle a treeview with no columns
Code was spewing criticals to stderr because of nonexisting columns. So
check that there's actually an existing column first.
2017-11-13 03:51:53 +01:00
Benjamin Otte
51c5ccf412 a11y: Report correct spinner size 2017-11-10 14:56:42 +01:00
Benjamin Otte
2d959553e9 image: Add the ability to set textures
This also adds it to all other places that use the same infrastructure:
GtkEntry and GtkCellRendererPixbuf
2017-11-05 00:07:17 +01:00
Benjamin Otte
f7646cf541 textview: Remove GdkWindow usage from the public API
A sideeffect is that we don't set the correct parent window on child
widgets anymore, but that is hopefully going to be fixed once we get rid
of child windows completely.
2017-11-04 15:22:25 +01:00
Benjamin Otte
1c36c6ed4d widget: Remove gtk_widget_has_screen()
All widgets always have a screen (or display).
2017-10-31 04:33:11 +01:00
Alexander Larsson
96b04836d8 Drop all uses of GdkPixbufAnimation in the gtk APIs
These are basically animated gifs, and don't fit well in how
modern things animate.
2017-10-23 16:56:49 +02:00
Alexander Larsson
0089e4ad58 Drop pixbuf support in IconHelper and ImageDefinition
These are no longer used, instead we always covert to surface as
early as possible and drop the pixbuf.

This means we never store both the pixbuf and the surface at
for any longer time, which is wasteful. Also, its one step further
to drop GdkPixbufs from generic use in our APIs.
2017-10-23 15:28:33 +02:00
Alexander Larsson
2b194089dd GtkImage: Drop support for storing pixbufs
This drops the pixbuf property and the pixbuf getters. We keep
gtk_image_new/set_from_pixbuf, but these are small helpers that
immediately convert to a surface, and there is no way to later get
back the pixbuf you passed in.

The from file/resource codepaths are also changed to load a surface
instead of a pixbuf.
2017-10-23 15:28:33 +02:00
Matthias Clasen
9da057568c Fix GtkStatusbarAccessible
GtkStatusbar is no longer a container, so GtkStatusbarAccessible
can no longer be a container accessible.
2017-10-18 17:30:20 +02:00
Daniel Boles
a5c0a5c546 a11y/entry: Fixups for previous commit
We still declare all variables at the start of the block.

Also, we can use the fast private _gtk_widget_get_allocation().

https://bugzilla.gnome.org/show_bug.cgi?id=784509
2017-10-15 12:58:25 +01:00
Samuel Thibault
9af088693a a11y/entry: Fix text coords not adjusted for alloc
What is missing is the "allocation" part of x/y coordinates. Since
gtk_entry_realize doesn't call gtk_widget_set_window(priv->text_area),
the coordinates returned by gdk_window_get_origin don't include it.

This patch fixes this.

https://bugzilla.gnome.org/show_bug.cgi?id=784509
2017-10-15 12:37:44 +01:00
Benjamin Otte
43c212ac28 build: Enable -Wswitch-enum and -Wswitch-default
This patch makes that work using 1 of 2 options:

1. Add all missing enums to the switch statement
  or
2. Cast the switch argument to a uint to avoid having to do that (mostly
   for GdkEventType).

I even found a bug while doing that: clearing a GtkImage with a surface
did not notify thae surface property.

The reason for enabling this flag even though it is tedious at times is
that it is very useful when adding values to an enum, because it makes
GTK immediately warn about all the switch statements where this enum is
relevant.
And I expect changes to enums to be frequent during the GTK4 development
cycle.
2017-10-06 21:23:39 +02:00
Benjamin Otte
c1e9869329 build: Don't turn off critical warnings
-Wint-conversion is important because it checks casts from ints to
pointers.

-Wdiscarded-qualifiers is important to catch cases where we don't
strings when we should.
2017-10-06 16:03:08 +02:00
Benjamin Otte
2936953d9f build: Remove old Makefile.inc files
They seem to have been forgotten in the meson transition
2017-10-06 16:03:07 +02:00
Matthias Clasen
d0c92fba69 entry accessible: Give up on GdkEvent api for now
Just include gdkeventsprivate.h here for now. This may be
resolved by just dropping icon support from GtkEntry down
the road.
2017-09-19 18:39:03 +02:00
Matthias Clasen
0554f6372b a11y: Stop listening for configure events
This needs to be done differently.
2017-09-19 18:39:03 +02:00
Matthias Clasen
efd287feb3 a11y: Use GdkEvent API in some places
More work needed.
2017-09-19 18:39:03 +02:00
Matthias Clasen
9794dc5628 window accessible: Use GdkEvent API 2017-09-19 18:39:02 +02:00
Matthias Clasen
16781c8598 widget accessible: Use GdkEvent API 2017-09-19 18:39:02 +02:00
Carlos Garnacho
e5a3e95b8c a11y: Partially update to using GdkEvent API 2017-09-19 18:39:02 +02:00
Benjamin Otte
212c46e20a a11y: Remove check for GtkEventBox 2017-08-02 16:58:05 +01:00
Timm Bäder
cc60046ae9 treeviewaccessible: Don't rely on nonexistent style properties
The expander-size style property has been gone for a long time.
2017-07-19 21:27:14 -04:00
Timm Bäder
b60686e8f1 spinbuttonaccessible: Inherit from GtkWidgetAccessible 2017-07-19 21:27:11 -04:00
Tim-Philipp Müller
bdfcfdec57 meson: gtk: install headers 2017-05-03 15:10:54 +01:00
Timm Bäder
4fcca9945f meson: update build files 2017-05-03 15:10:52 +01:00
Timm Bäder
409ed21594 meson: Sort input files by name 2017-05-03 15:10:52 +01:00
Timm Bäder
5475768d32 Meson build v2 2017-05-03 15:10:50 +01:00
Emmanuele Bassi
7a90e06a3c Add Meson build files
Original work by: Jussi Pakkanen <jpakkane@gmail.com>

https://bugzilla.gnome.org/show_bug.cgi?id=769881
2017-05-03 15:10:50 +01:00
Timm Bäder
0ce9f26dc5 window: Remove has-toplevel-focus property
Since embedded toplevels don't exist anymore, :has-toplevel-focus is
equivalent to :active.
2017-03-31 09:50:39 +02:00
Timm Bäder
2aea8dfee9 togglebutton: Move :inconsistent to GtkCheckButton 2017-01-30 18:11:00 +01:00
Benjamin Otte
d50b73f66d treeview: Remove gtk_tree_view_get_bin_window()
We don't want to expose GdkWindows in the public API.
2017-01-08 00:48:12 +01:00
Florian Müllner
593b75fb69 GtkLabelAccessible: Initialize link before setting parent
Since at-spi-atk commit 96621a5e95 fixed PropertyChange notifications
for AccessibleParent, setting the parent will result in a call to
ref_state_set() which assumes that the object is fully initialized.

https://bugzilla.gnome.org/show_bug.cgi?id=774939
2016-11-23 18:55:42 -05:00
Matthias Clasen
6e178aede2 Use GdkRGBA for text attributes
Now that GtkTextAttributes is private, we can clean this struct
up a bit. The first step is to switch from GdkColor to GdkRGBA,
and adapt all users.
2016-11-01 13:58:10 -04:00
Matthias Clasen
745c348ff8 Make GtkTextAttributes private
This is a problematic struct, and giving direct access to it
has kept us from making improvements to GtkTextView. Drop it
from the public API, together with the auxiliary APIs. If
it turns out that this functionality is needed, we should add
individual getters.
2016-11-01 13:58:10 -04:00
Rico Tzschichholz
2273f5d28e iconset: Remove stray references 2016-10-23 11:12:13 +02:00
Timm Bäder
a5867ffe71 Remove some more GdkColor properties 2016-10-20 20:12:08 +02:00
Timm Bäder
dece018994 Remove GtkAlignment 2016-10-18 00:29:19 +02:00
Timm Bäder
e9a974f4f6 buttonaccessible: Stop looking at the button's image 2016-10-18 00:29:19 +02:00
Emmanuele Bassi
81e5996c91 Include the appropriate headers
The GtkStackAccessible implementation should include the private header,
and the private header should include the public one.
2016-10-17 11:10:14 +01:00
Emmanuele Bassi
d8892c0fdb Remove redundant declarations 2016-10-17 11:10:14 +01:00
Emmanuele Bassi
137e1aa988 Use appropriate const declaration for static strings 2016-10-17 11:10:14 +01:00
Benjamin Otte
1518fe0a8f API: stylecontext: Remove state argument from getters
The argument must always be the current state.
2016-10-16 18:18:58 +02:00
Timm Bäder
6a6c49369e Fix a few GtkTextTag:*-gdk references 2016-10-16 18:17:21 +02:00
Timm Bäder
7f79a3fade Remove GtkMisc 2016-10-16 18:17:21 +02:00
Timm Bäder
367f13a76f Remove GtkArrow 2016-10-16 18:17:21 +02:00
Timm Bäder
ad155fb26c Remove GtkStock API from GtkImage 2016-10-16 18:17:21 +02:00
Benjamin Otte
021fe010b6 API: Remove GtkPlug, GtkSocket and GtkWin32EmbedWidget 2016-10-16 18:17:21 +02:00