Commit Graph

2248 Commits

Author SHA1 Message Date
Owen W. Taylor
1db87c897f Add gdk_frame_clock_begin/end_updating()
Add an API to start or stop continually updating the frame clock.
This is a slight convenience for applcations and avoids the problem
of getting one more frame run after an animation stops, but the
primary motivation for this is because it looks like we might have
to use timeBeginPeriod()/timeEndPeriod() on Windows to get reasonably
accurate timing, and for that we'll need to know if there is an
animation running.

https://bugzilla.gnome.org/show_bug.cgi?id=693934
2013-02-18 17:14:24 +01:00
Jasper St. Pierre
367364a8e1 Fix deprecations for GtkIconInfo 2013-02-15 19:48:56 -05:00
Owen W. Taylor
7bb07317f3 GtkTickCallback: document use of G_SOURCE_CONTINUE/REMOVE for return value
Document that G_SOURCE_CONTINUE and G_SOURCE_REMOVE are the preferred
return values from a tick callback.
2013-02-14 17:19:53 -05:00
Owen W. Taylor
63a36aa434 Merge with Merge GdkFrameHistory into GdkFrameClock 2013-02-14 17:19:53 -05:00
Owen W. Taylor
bb11195ec0 GdkFrameClock: Clean up the public API
* remove gdk_frame_clock_get_frame_time_val(); a convenience
  function that would rarely be used.
* remove gdk_frame_clock_get_requested() and
  ::frame-requested signal; while we might want to eventually
   be able to track the requested phases for a clock, we don't
  have a current use case.
* Make gdk_frame_clock_freeze/thaw() private: they are only
  used within GTK+ and have complex semantics.
* Remove gdk_frame_clock_get_last_complete(). Another convenience
  function that I don't have a current use case for.
* Rename:
  gdk_frame_clock_get_start() => gdk_frame_clock_get_history_start()
  gdk_frame_clocK_get_current_frame_timings() => gdk_frame_clock_get_timings()
2013-02-14 17:19:52 -05:00
Owen W. Taylor
515e5f74aa Merge GdkFrameHistory into GdkFrameClock
Now that GdkFrameClock is a  class, not interface, there's no real advantage
to splitting the frame history into an aggregate object, so directly
merge it into GdkFrameClock.
2013-02-14 17:19:52 -05:00
Owen W. Taylor
449e8c8856 Add gtk_widget_add_tick_callback(), remove GtkTimeline, etc.
Add a very simple GtkWidget function for an "tick" callback, which
is connected to the ::update signal of GdkFrameClock.

Remove:

 - GtkTimeline. The consensus is that it is too complex.
 - GdkPaintClockTarget. In the rare cases where tick callbacks
    aren't sufficient, it's possible to track the
    paint clock with ::realize/::unrealize/::hierarchy-changed.

GtkTimeline is kept using ::update directly to allow using a GtkTimeline
with a paint clock but no widget.
2013-02-14 17:19:52 -05:00
Owen W. Taylor
40fa28de3d video-timer: add simple example of PLL-style clock adjustment
The first version of the video-timer simply played back the video
according to the wall clock, and showed each frame at the neareste
presentatin time. But an alternative strategy for playing back
video is that if the frame-rate is an integer-divisor of the
display refresh rate, or very close to that, is to change the playback
speed to complete avoid frame drops and changes in latency.
(This would require resampling audio if present.)

Demonstrate this technique by adding a --pll option to the
video-timer demo.

https://bugzilla.gnome.org/show_bug.cgi?id=685460
2013-02-14 17:19:51 -05:00
Owen W. Taylor
e77a96a0ea video-timer: add a test case for display at a constant frame rate
Add a test case that simulates the timing operaton that goes on
when showing a constant frame rate stream like a video - each
frame is shown at the VBlank interval that is closest to when it
would ideally be timed.

https://bugzilla.gnome.org/show_bug.cgi?id=685460
2013-02-14 17:19:51 -05:00
Owen W. Taylor
9690567d50 animated-resizing: enhance output
Show the average and standard deviation of the latency in addition to
the frame rate. Add options to print the output in machine-readable form,
and to control the frequency and total number of statistics that will be
output.

https://bugzilla.gnome.org/show_bug.cgi?id=685460
2013-02-14 17:19:51 -05:00
Owen W. Taylor
574301d34d animated-resizing: make circle size a #define
Clean up the code with a #define for circle size. This also allows
determining we're throttled by number-of-requests or number-of-pixels.

https://bugzilla.gnome.org/show_bug.cgi?id=685460
2013-02-14 17:19:50 -05:00
Owen W. Taylor
a69285da08 Compress motion synchronized with the paint cycle
When we have pending motion events, instead of delivering them
directly, request the new FLUSH_EVENTS phase of the frame clock.
This allows us to compress repeated motion events sent to the
same window.

In the FLUSH_EVENTS phase, which occur at priority GDK_PRIORITY_EVENTS + 1,
we deliver any pending motion events then turn off event delivery
until the end of the next frame. Turning off event delivery means
that we'll reliably paint the compressed motion events even if more
have arrived.

Add a motion-compression test case which demonstrates behavior when
an application takes too long handle motion events. It is unusable
without this patch but behaves fine with the patch.

https://bugzilla.gnome.org/show_bug.cgi?id=685460
2013-02-14 17:19:49 -05:00
Owen W. Taylor
623803c1fe Add a test of an animated resizing window
Add a test of a window with an animated size and contents. The
test accepts load factor command line argument to see how things
work as the drawing of the content requires more GPU resources.

https://bugzilla.gnome.org/show_bug.cgi?id=685460
2013-02-14 17:19:49 -05:00
Alexander Larsson
7690846c3f Add gtk_icon_info_load_icon_async
This lets you asynchronously load icons. We need this for gnome-shell
to replace its current non-threadsafe use of GtkIconTheme.

https://bugzilla.gnome.org/show_bug.cgi?id=693802
2013-02-14 22:10:09 +01:00
Matthias Clasen
fbb1ee02bc Add a test for setting accessible name from gtkbuilder
This is wrongly documented in the GtkWidget docs.
2013-02-10 15:47:08 -05:00
Alexander Larsson
97c235405d css: Add opacity reftest
https://bugzilla.gnome.org/show_bug.cgi?id=687842
2013-02-07 11:12:21 +01:00
Alexander Larsson
b57a2c8341 Add widget transparency test to testgtk
https://bugzilla.gnome.org/show_bug.cgi?id=687842
2013-02-07 11:11:38 +01:00
Matthias Clasen
cb539841a4 Update expected output again
pickers.ui is just too sensitive to environment, and the … in
the output doesn't help.
2013-02-04 10:50:24 -05:00
Matthias Clasen
b166a6bb0e Avoid deprecation warnings in a11y tests
We are testing the deprecated GtkTable here.
2013-02-04 09:27:28 -05:00
Matthias Clasen
0162e92aba Update a11y test results to match
Range widgets have lost their action. Update expected output.
2013-02-04 01:03:37 -05:00
Matthias Clasen
f8050c90fa Update a11y test results to match
The newly added descriptions show up in the accessible
information dumps.
2013-02-04 00:57:46 -05:00
Matthias Clasen
b396e37b96 Update a11y test results to match
The new way of setting the icons in GtkMessageDialog changes
the accessible dump output slightly.
2013-02-04 00:57:44 -05:00
Cosimo Cecchi
ce869921ab Don't use gtk_scrolled_window_add_with_viewport() in tests
https://bugzilla.gnome.org/show_bug.cgi?id=693015
2013-02-01 22:58:55 -05:00
Mike Gorse
92f0c5c384 Add accessibility for GtkLevelBar and value test 2013-02-01 11:44:15 -06:00
Olivier Fourdan
7d9751130c tests: add a test for fullscreen mode
https://bugzilla.gnome.org/show_bug.cgi?id=691856
2013-01-25 13:16:57 +01:00
Jasper St. Pierre
cca05d1dc8 Add git.mk to more places 2013-01-24 17:47:34 -05:00
William Jon McCann
a84f244dc0 Add a simple test for activate on single click
https://bugzilla.gnome.org/show_bug.cgi?id=345023
2013-01-20 16:49:30 -05:00
Benjamin Otte
96d4eb5411 reftests: Add a reftest for width-chars not shrinking the allocation
width-chars and max-width chars should (and do) only change the
requested sizes, not the allocated size of the label.

This came out of an IRC discussion, so no bug.
2013-01-20 20:25:58 +01:00
Benjamin Otte
bef1a5d720 reftests: Add reftest for latest warning fix 2013-01-17 00:45:33 +01:00
Matthias Clasen
cdaa6e036e Update expected output of a11y tests
The output for GtkAboutDialog changed as a result of the
Homepage -> Website string change.
2013-01-14 23:12:36 -05:00
Benjamin Otte
b867970bf4 tests: return 0; from main()
So that gcc stops complaining.
2013-01-08 12:23:52 +01:00
Matthias Clasen
9e9824a0a1 Add a test for deriving accessible implementations
This is a trivial example. Just check that we can derive
from GtkButtonAccessible, and have a GtkButton subclass
use the derived accessible implementation.
2012-12-27 12:06:22 -05:00
Benjamin Otte
a70e85702f testgtk: Remove GtkAlignment usage from progressbar test
We can use gtk_widget_set_[hv]align here.
2012-12-21 19:47:40 +01:00
Matthias Clasen
33e5866b6f Update results for Unicode ellises 2012-12-18 00:14:53 -05:00
Matthias Clasen
b85ae11e0e Update for some changes to selectable/selected state handling
Since this is no longer implemented automatically in atk, some
accessibles, such as menus, loose their selectable state.
2012-12-18 00:02:09 -05:00
Benjamin Otte
a405c9917c tests: Don't call to-be-deprecated function 2012-12-06 02:57:18 +01:00
Benjamin Otte
85d8f3c51e reftests: Fix wrong name in test
Typo in d8306aaeb3
2012-12-04 20:02:36 +01:00
Benjamin Otte
d8306aaeb3 reftests: Add a test for the new font size names 2012-12-01 16:27:45 +01:00
Benjamin Otte
cc0b493216 reftests: Fix a reftest
Recent Adwaita changes caused diffs. We don't want that, so we run this
test against the default settings.
2012-11-30 20:10:23 +01:00
Alexander Larsson
e36f80f0ef css: Make test pass
The new css tree may change the order of selectors (keeping the
same semantics). This affects how the selectors are printed later,
which causes some css parsing tests to not match the references.

Fortunately the order is consistent between runs given the same
css, so we just have to switch around the order in some of the
.ref.css files.
2012-11-30 14:53:30 +01:00
Benjamin Otte
29c8420746 tests: Add CSS test for comment detection
Tests recent fix.
2012-11-28 21:11:48 +01:00
Benjamin Otte
6b33ee9c53 reftests: Add reftest for broken fixed height mode
https://bugzilla.gnome.org/show_bug.cgi?id=687816
2012-11-26 00:09:35 +01:00
Matthias Clasen
6333cd8e83 Update expected output for the entries a11y test
This change is due to entry icons now being accessible.
2012-11-20 06:28:59 -05:00
Benjamin Otte
8d28e2d8e9 reftests: Fix linear-gradient reftest (again)
Make it so that the repeating vs normal test only uses sharp color
cutoffs instead of real gradients. That removes rounding errors and
makes the test pass.
2012-11-20 12:21:03 +01:00
Matthias Clasen
d967500c92 Fix parser tests for color changes 2012-11-20 05:54:53 -05:00
Benjamin Otte
15570dd63d reftests: Turns out, green changed color
What used to be "green" is now "lime"
2012-11-14 01:55:28 +01:00
Benjamin Otte
10c47c0226 reftests: Update named colors reftest
Make reftest conform with correct colors. Pango has been updated to
these colors in commit d2c319b9ded8cce864914d9f1fd704a7aff3112f
2012-11-14 01:55:28 +01:00
Mike Gorse
b7743430aa Add accessibles for GtkEntry icons
Expose GtkEntry icons as child accessibles of a GtkEntry, and provide
actions to simulate clicking them. Also, refactor the a11y children test
slightly to add a test.

https://bugzilla.gnome.org/show_bug.cgi?id=686347
2012-11-12 09:21:27 -06:00
Benjamin Otte
872097603f reftests: Add a test for border-width problems 2012-11-11 20:26:28 +01:00
Benjamin Otte
10c3a66e40 reftests: Add a test for all the color names
BIG NOTE: We fail on some of these to give the colors defined in the CSS
specs. This is not good, but I'm not sure how to best fix it.
For those cases, I've kept the correct color in the CSS file but added
the correct one next to it.
2012-11-10 14:25:17 +01:00