Commit Graph

26 Commits

Author SHA1 Message Date
Matthias Clasen
18e0eaa9d6 tests: Stop using gtk_widget_show/hide 2022-12-13 13:46:02 -05:00
Jonas Ådahl
d7d738d745 tests/animated-resizing: Use gtk_window_default_size() instead
This will actually make it resize on-demand, as the default size is the
size used when computing the window size when the size is not fixed.
2020-12-07 20:37:29 +01:00
Jonas Ådahl
8e3ee58e3f tests/animated-resizing: Don't try to resize during frame dispatch
This will not work on X11 because it's too late to resize, due to
resizing being asynchronous i.e. it won't be complete before we need to
draw.
2020-12-07 20:37:29 +01:00
Jonas Ådahl
98fffe6f23 tests/animated-resizing: Resize widget instead of window
This means the window needs to be marked as non-resizable, otherwise it
won't shrink.
2020-12-07 09:46:39 +01:00
Benjamin Otte
4c7914dc49 display: Remove unneeded getters
Applications can use the listmodel instead.
2020-05-17 07:32:37 +02:00
Matthias Clasen
f59f355190 Use gtk_window_set_child throughout
Replace all uses of gtk_container_add on windows
by gtk_window_set_child.
2020-05-04 22:53:08 -04:00
Benjamin Otte
a278edab22 window: Remove type argument from gtk_window_new() 2020-02-14 21:18:49 +01:00
Matthias Clasen
a6c5466900 Stop using gtk_main and gtk_main_quit
Replace these calls with direct use of GMainContext api.
2020-02-09 23:12:32 -05:00
Matthias Clasen
a46f9af1c0 Remove primary monitor api
We only have implementations of this on X11 and Win32,
so make it available as backend api there.

Update all callers to use either the backend api, or
just monitor 0.
2020-01-30 21:33:37 +01:00
Matthias Clasen
de741e57f3 tests: Stop using gtk_window_set_gravity
This api is going away.
2019-03-26 17:55:29 -04:00
Matthias Clasen
27c286773c tests: Stop using gtk_window_move
It is going away.
2019-03-26 17:55:29 -04:00
Matthias Clasen
3cb93a479a tests: Avoid a use of ::map-event
We can use the ::map signal here instead.
2018-01-16 14:14:09 -05:00
Timm Bäder
ea897c6df4 Remove gtk_widget_show_all 2017-01-20 21:37:04 +01:00
Matthias Clasen
2c7e567f05 Update callers
Adapt all our tests and examples to the new initialization api.
2017-01-19 13:50:17 -05:00
Benjamin Otte
e950d0cd8b tests: Use a drawing area in animated-resizing 2016-11-18 21:44:25 +01:00
Timm Bäder
5071206d60 widget: Remove app-paintable 2016-10-31 19:28:28 +01:00
Benjamin Otte
29c570a660 tests: Port to GdkMonitor 2016-10-16 18:17:21 +02:00
Owen W. Taylor
a082f4d804 animated-resizing, video-timer: Add missing return value from ::draw
When we connect to GtkWidget::draw, the signal handler should have
a return value. This fixes overdrawing client-side decorations.
2013-04-25 13:44:58 -04:00
Owen W. Taylor
b7063509f8 tests/animated-resizing: Split frame statistics out into a separate file
Split the code for computing frame rate and latency into a separate file
so we can use it from multiple tests.
2013-04-23 14:04:40 -04: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
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
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
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