Compare commits

..

111 Commits

Author SHA1 Message Date
Alexander Larsson 4ab2f28f8e GtkPixelCache: Free cache if not used in 20 seconds
No need to keep a performance enhancing cache around if its not
actually in use.
2013-05-07 14:27:17 +02:00
Alexander Larsson da0cf5fbff gdkwindow: Expose all native windows
We need to send exposes for all native windows, even the ones
without an exposure mask set, because otherwise non-native
children of the native window with an exposure mask will
not be drawn.
2013-05-07 11:46:50 +02:00
Alexander Larsson c60395cfc9 GtkStack: Fix double-draw in crossfade
We should only draw the cross-fade on the bin window, not doing this
was causing us to draw it multiple times using ADD which resulted
in weird colors.
2013-05-07 09:28:30 +02:00
Alexander Larsson cb2ba0abc0 gdkwindow: Avoid some unnecessary typechecks
This removes the typechecks in GDK_WINDOW_TYPE and GDK_WINDOW_DESTROYED. These
are only used internally in gdkwindow.c and gdkdisplay.c anyway,  and these
functions check for typesafety of arguments on function entry.
2013-05-03 10:44:44 +02:00
Alexander Larsson e8e21e7012 GtkWidget: Use gdk_window_get_children_for_user_data
This makes iterating over the children a lot faster, as we're
not doing lots of intra-library calls and type checks. We're still
in some sence O(n^2) since we iterate over each child window for each
widget, but the profiles look much better.
2013-05-03 10:42:40 +02:00
Alexander Larsson 97ad2d7897 Add gdk_window_get_children_with_user_data
This function returns all the children that has a specific user_data set.
This is used a lot in the new GtkWidget drawing code and doing
it this way is faster than getting every child and calling get_user_data
on each (which was a non-neglible part of the profiles). Additionally it
also allows use to use some kind of hashtable to make this operation even
faster if needed in the future.
2013-05-03 10:39:24 +02:00
Alexander Larsson f9592e3c9a GtkTreeView: port to PixelCache
We register an invalidate handler on the bin window to get told
of child widget invalidations, although we manually need to discard
invalidates from the scroll operation.

Additionally we invalidate all of the pixel cache whenever
the TreeView itself is queue_draw()n to handle e.g. style (bg)
changes, or changes due to model changes causing queue_draw() in
the tree view.
2013-05-02 19:03:12 +02:00
Alexander Larsson fdd57076eb Make GtkViewport use GtkPixelCache
Since gdk_window_move() no longer uses XCopyArea all scrolling
now re-renders everything in the window. To get performance
back we use a GtkPixelCache to store already drawn children,
and we when we expose the viewport we just blit the
offscreen to the right place.
2013-05-02 19:03:12 +02:00
Alexander Larsson 994a1bc016 GtkPixelCache: Add debug feature to track redraws
Each time we redraw we tint it in a different color so that
you can see which regions are redrawn.
2013-05-02 19:03:12 +02:00
Alexander Larsson 1d178b5464 Add GtkPixelCache
GtkPixelCache is a helper utility that lets you implement
faster scrolling of a viewport of a canvas by using an
offscreen pixmap cache.

You call _gtk_pixel_cache_draw with a callback function that
does the drawing, and additionally you specify the size and the
position of the viewport in the widget, and the position and size
of the canvas wrt the viewport. The callback will be called to
draw on an offscreen surface, and the surface will be drawn
on the window. The next time you do the same, any already drawn
pieces of the surface are re-used from the offscreen and need
not be rendered again.

If things inside the canvas change you need to call
_gtk_pixel_cache_invalidate to tell the cache about this.

Some other details:

* The offscreen surface is generally a bit larger than
  the viewport, so scrolling a small amount can often
  be done without redrawing children.
* If the canvas is not larger than the viewport no
  offscreen surface is used.

GtkPixelCache: Make sure we always copy using SOURCE

We were using OVER for the first copy (from source to group surface.

GtkPixelCache: Fix x/y typos

GtkPixelCache: Allow NULL for invalidate region

gtkpixelcache: Use CONTENT_COLOR for solid bg windows
2013-05-02 19:03:12 +02:00
Alexander Larsson fe6aa38522 GtkWidget: Add a vfunc for queue_draw_region
Since widgets now cache drawn state we allow them to override
queue_draw_region to detect when some region of the widget
should be redrawn. For instance, if a widget draws the
background color in a pixel cache we will need to invalidate
that when the style context changes which queues a repaint.
2013-05-02 19:03:12 +02:00
Alexander Larsson b2e7ebf6b9 Add gdk_window_set_invalidate_handler
This lets you register callbacks for when child widgets invalidate
areas of the window read it and/or change it.

For instance, this lets you do rendering effects and keeping offscreen
caches uptodate.
2013-05-02 19:03:00 +02:00
Alexander Larsson d4968d8140 wayland: Don't use double buffers for wayland when not needed
If we got the release event for the last buffer then we're
fine with writing directly to the window surface, as wayland
will not be looing at it. This saves us from allocating
and copying more data.
2013-05-02 19:02:09 +02:00
Alexander Larsson adc4f0cdd9 gdkwindow: Make GdkPaintable normal GdkWindowImpl vfuncs
There is no need for this to be a separate interface, its just looking
weird.
2013-05-02 19:02:08 +02:00
Alexander Larsson 9c0bf55a17 gdkwindow: Change how paints work
First of all, we now only do paints on native windows, as there is
really no reason anymore to do it for subwindows. Secondly, we
keep track of the paints even for GtkPaintable windows, but for
that case we don't create the offscreen surface, but rather
assume the windowing system does the backing store.
2013-05-02 19:02:08 +02:00
Alexander Larsson 5fc83197dd GtkWindow: Move cairo_save/restore from marshaller
We do the save/restore when emitting ::draw rather than in a custom
marshaller, as this saves an extra stack frame, which is helpfull now
that we do painting fully recursive. This is also likely to save a few
cycles.
2013-05-02 19:02:08 +02:00
Alexander Larsson c2c976cb6a gdkframeclock: Loop the layout phase if needed
In the case where the layout phase queued a layout we don't
want to progress to the paint phase with invalid allocations, so
we loop the layout. This shouldn't normally happen, but it may
happen in some edge cases like if user/wm resizes clash with
natural window size changes from a gtk widget. This should not
generally loop though, so we detect this after 4 cycles and
print a warning.

This was detected because of an issue in GtkWindow where it
seems to incorrectly handle the case of a user interactive resize.
It seems gtk_window_move_resize() believes that configure_request_size_changed
changed due to hitting some corner case so it calls
gtk_widget_queue_resize_no_redraw(), marking the window as need_alloc
after the layout phase. This commit fixes the issue, but we should
also look into if we can fix that.
2013-05-02 19:02:08 +02:00
Alexander Larsson b1a59dad5e gdkwindow: Simplify invalidation
Now that all windows are non-opaque we can simplify the invalidation
a lot. There is no need to clip the invalidate area to child regions,
because we will always redraw everything under all the children.
We only have to handle native childen specially.
2013-05-02 17:18:12 +02:00
Alexander Larsson 5fef6ed4dc gdkwindow: Remove implicit paints
We now only do one expose event per native window, so there will
only be one begin/end_paint() call. This means all the work with
implicit paints to combine the paints on a single double buffer
surface is unnecessary, so we can just delete it.
2013-05-02 17:18:12 +02:00
Alexander Larsson 6a11e0545d Only handle exposes on native window, propagate to children via draw()
We now consider non-native windows non-opaque, which means any invalid
area in a subwindow will also be invalid all the way up to the nearest
native windows. We take advantage of this by ignoring all expose events
on non-native windows (which typically means just the toplevel) and instead
propagating down the draw() calls to children directly via
gtk_container_propagate_draw.

This is nice as it means we always draw widgets the same way, and it
will let us do some interesting ways in the future.

We also clean up the GtkWidget opacity handling as we can now always
rely on the draing happening via cairo.

We can't really just draw by walking down the widget hierarchy, as
this doesn't get the clipping right (so e.g. widgets doing cairo_paint
may draw outside the expected gdkwindow subarea) nor does it let
us paint window backgrounds.

So, we now do multiple draws for each widget, once for each GdkWindow,
although we still do it on the same base cairo_t that we get for the
toplevel native window. The difference is only the clipping, the rendering
order, and which other widgets we propagate into.

We also collect all the windows of a widget so we can expose them inside
the same opacity group if needed.

NOTE: This change neuters gtk_widget_set_double_buffered for
widgets without native windows. Its impossible to disable
the double buffering in this model.
2013-05-02 17:18:03 +02:00
Alexander Larsson 456321c2d7 gdkwindow: Remove ancient USE_BACKING_STORE define
This is always set anyway.
2013-05-02 16:09:09 +02:00
Alexander Larsson 14a63693de gdkwindow: Simplify clip region calculations
Since we no longer make overlapping siblings affect clip_region we
can further simplify the clip region calculation and updating.
2013-05-02 16:09:09 +02:00
Alexander Larsson 6f32b6fadc gdkwindow: Simplify clip region handling
Since we dropped the move region optimization there is really no need
to try carefully keep track of opaque non-overlapped regions, as we
don't use this information to trigger the optimization anymore.

So, by assuming that all windows are non-opaque we can vastly simplify
the clip region stuff. First of all, we don't need clip_region_with_children,
as each window will need to draw under all children anyway. Secondly, we
don't remove overlapping sibling areas from clip_region, as these are
all non-opaque anyway and we need to draw under them

Finally, we don't need to track the layered region anymore as its
essentially unused. The few times something like it is needed we can
compute it explicitly.

For the case of native children of widgets we may cause a repaint
under native windows that are guaranteed to be opaque, but these
will be clipped by the native child anyway.
2013-05-02 16:09:09 +02:00
Alexander Larsson 3431a5346d gdkwindow: Remove translate vfunc
This is not used anymore
2013-05-02 16:09:09 +02:00
Alexander Larsson 1dd823f6f6 gdkwindow: Remove outstanding_moves stuff
Since we now never move regions directly on the window we can
remove all the stuff that track outstanding moves and flushes then.
2013-05-02 16:09:08 +02:00
Alexander Larsson 479b69a8bf gdk: Don't ever do copies from the window
This basically neuters gdk_window_move_region, gdk_window_scroll
and gdk_window_move_resize, in that they now never copy any bits but
just invalidate the source and destination regions. This is a performance
loss, but the hope is that the simplifications it later allows will let
us recover this performance loss (which mainly affects scrolling).
2013-05-02 16:09:08 +02:00
Benjamin Otte 7cecc8e524 a11y: Remove AtkSelection implementation from combobox
AtkSelection requires that the immediate children of the object are the
selectable items. The combobox however is implemented with just 1 child:
The popup menu.

The popup menu is implementing the selectable interface.

Test are updated to reflect this change.
2013-05-02 15:31:26 +02:00
Matthias Clasen c6894cd606 Try this again
When the hostnamed call is cancelled, we get a G_IO_ERROR_CANCELLED
error back. Handle it properly.
2013-05-02 09:29:35 -04:00
Matthias Clasen f7f63ae3ee Revert "Remove a superfluous ref"
This reverts commit f326c0eac8.

Grr, turns out that cancelling is not that reliable :-(
2013-05-02 08:23:58 -04:00
Matthias Clasen 117c86d08a Clear list of attached windows when disposing a widget
We were silently relying on everybody to detach their windows,
and would leak memory otherwise.
2013-05-02 08:02:40 -04:00
Matthias Clasen fb08a26acd GtkWindow: use a weak ref to keep track of attach_widget
Taking a full reference of the attach widget creates a reference
cycle, and keeps the attach_widget alive longer than it should.
2013-05-02 08:01:14 -04:00
Matthias Clasen f326c0eac8 Remove a superfluous ref
If we cancel the call in dispose, no need to ref the object
we pass as userdata. Avoids the risk of leaking the ref if
the call is actually canceled.
2013-05-02 05:53:40 -04:00
Matthias Clasen 4dc01aca43 Fix build 2013-05-02 05:37:58 -04:00
Matthias Clasen 6c79fb72bd Revert "Temporarily remove window-border reftest"
This reverts commit cf6695088e.
2013-05-01 22:23:11 -04:00
Matthias Clasen e399798da8 Revert "Disable the filechooser template tests"
This reverts commit 17b9733372.
2013-05-01 22:22:22 -04:00
Matthias Clasen 8eeb379f7c Revert "Disable the object-finalize test for now"
This reverts commit a021dc793c.
2013-05-01 22:22:09 -04:00
Matthias Clasen 67595f3614 Reenable display manager tests
Still broken, but they test the right thing.
2013-05-01 22:20:58 -04:00
Matthias Clasen 43b42704c5 Bump version 2013-05-01 22:06:46 -04:00
Matthias Clasen 3c7fbe237d Remove window-border tests from makefile too 2013-05-01 21:43:19 -04:00
Matthias Clasen 0d49b97fce Silence a compiler warning 2013-05-01 21:35:39 -04:00
Matthias Clasen 286d3466a1 Revert "Temporarily remove button-wrapping reftest"
This reverts commit 851b631c4e.
2013-05-01 21:31:12 -04:00
Matthias Clasen 78189bf5e0 Fix up doc sections 2013-05-01 21:27:25 -04:00
Matthias Clasen 210451e86f Minor doc comment fix 2013-05-01 21:27:06 -04:00
Matthias Clasen 3f397d6b38 Make gtkplacessidebar.h look like a gtk header 2013-05-01 21:23:55 -04:00
Matthias Clasen 2f0a5dd541 GtkPlacesSidebar: Correct all since tags 2013-05-01 21:19:37 -04:00
Matthias Clasen e9e4c8b168 Disable broken picker a11y test
The GtkComboBox accessible implementation is pretty broken,
and it shows through in this a11y test. Disable it for now.
2013-05-01 21:03:55 -04:00
Matthias Clasen b84b933cac Update a few a11y test results 2013-05-01 19:07:10 -04:00
Matthias Clasen 51bbb76d35 Fix image-load-from-file reftest
Need to reset css here to avoid theme interference.
2013-05-01 19:07:10 -04:00
Matthias Clasen 3605e6c900 Temporarily remove grid-span reftest
This was testing grid size allocation changes that had to be
reverted because they broke gnumeric.
2013-05-01 19:07:10 -04:00
Matthias Clasen cf6695088e Temporarily remove window-border reftest
It is broken by unfinished csd changes.
2013-05-01 19:07:10 -04:00
Matthias Clasen 851b631c4e Temporarily remove button-wrapping reftest
Its broken by unsettled GtkBin size allocation changes.
2013-05-01 19:07:10 -04:00
Piotr Drąg 0f9c43b569 Updated POTFILES.skip 2013-05-01 23:48:33 +02:00
Benjamin Otte 327a164744 paned: Fixup recent commit
d90e3670ce had a bunch of embarrassing
bugs.

Fixes paned-undersized reftest.
2013-05-01 23:26:27 +02:00
Benjamin Otte a30b84f522 wayland: Don't add/remove displays manually
This code is handled by GdkDisplay itself these days.
2013-05-01 18:12:38 +02:00
Benjamin Otte 0122a9da8e x11: Move initialization code
Move it from GdkDisplayManagerX11.init to GdkDisplay.class_init.

This shouldn't cause any problems, but who knows, so keep this patch
small.

Reason for this is the unification of display managers.
2013-05-01 18:11:26 +02:00
Benjamin Otte 2d35f7a8e1 tests: make deprecated functions not warn
We still want to test them though.
2013-05-01 17:50:14 +02:00
Benjamin Otte 61f47829ba tests: Comment out unused functions 2013-05-01 17:46:50 +02:00
Benjamin Otte 2d29c4a43f window: last size is more important than default size
reorder size computation code to reflect that.

https://bugzilla.gnome.org/show_bug.cgi?id=696882
2013-05-01 16:41:12 +02:00
Benjamin Otte 01f7ed1d07 window: Deprecate gtk_window_reshow_with_initial_size() 2013-05-01 16:41:12 +02:00
Benjamin Otte d90e3670ce paned: Correctly compute child sizes in size requests 2013-05-01 16:41:12 +02:00
Benjamin Otte 6146bf7a32 gtkprivate: #define OPPOSITE_ORIENTATION
and use it
2013-05-01 16:41:11 +02:00
Benjamin Otte ea98c61f3c paned: Split size request code
The code is pretty different for both cases, so better split things
here.
2013-05-01 16:41:11 +02:00
Benjamin Otte 9c2eb4f233 paned: Split out a function 2013-05-01 16:41:11 +02:00
Benjamin Otte cb99cd2052 button: Rework size request/allocation code
- Split out a common function
- Implement hfw properly.
2013-05-01 16:41:11 +02:00
Benjamin Otte 41e8d3df6d widget: Improve debug output 2013-05-01 16:41:11 +02:00
Benjamin Otte 01fe4ce7f4 button: Use _gtk_widget_get_preferred_size_for_size()
This was accidently lost when merging baseline support.
2013-05-01 16:41:11 +02:00
Benjamin Otte 1349292e47 widget: Adapt _gtk_widget_get_preferred_size_for_size()
... for baseline support byu taking two extra (possible NULL) arguments.
2013-05-01 16:41:11 +02:00
Benjamin Otte 8f06590712 tests: Add reftest for broken button sizing
https://bugzilla.gnome.org/show_bug.cgi?id=698433
2013-05-01 16:41:11 +02:00
Matthias Clasen 17b9733372 Disable the filechooser template tests
The places sidebar breaks the finalization checks in these tests
https://bugzilla.gnome.org/show_bug.cgi?id=699393
2013-05-01 10:28:53 -04:00
Matthias Clasen a021dc793c Disable the object-finalize test for now
GtkPlacesSidebar breaks this:
https://bugzilla.gnome.org/show_bug.cgi?id=699393
2013-05-01 10:28:03 -04:00
Matthias Clasen 032636f3ea Add missing symbols 2013-05-01 10:27:48 -04:00
Matthias Clasen 4f9a71d286 Comment out broken tests
Tsk, tsk. These tests were broken in the recent display manager
changes.  Please run make check after major refactoring.
2013-05-01 09:41:11 -04:00
Matthias Clasen e30d5acc60 Avoid an accidental export 2013-05-01 08:46:50 -04:00
Matthias Clasen b01c69a018 Updates 2013-05-01 08:29:01 -04:00
Hib Eris 4dcd49352b Revert "Don't build gtk-launch when gio-unix is not available"
The gtk-launch tool can be build without gio-unix (although it
will not really do much without an alternative implementation for
g_desktop_app_info).

So there is no need to not build gtk-launch anymore.

This reverts commit 9a1235bf0d.

https://bugzilla.gnome.org/show_bug.cgi?id=682824
2013-05-01 07:39:36 +02:00
Milo Casagrande 11c9c70673 [l10n] Updated Italian translation. 2013-04-30 19:22:41 +02:00
Milo Casagrande c67eb10fcb [l10n] Updated Italian translation. 2013-04-29 23:01:03 +02:00
Matthias Clasen f47e578737 Fix a typo
Modifed should be Modified.
https://bugzilla.gnome.org/show_bug.cgi?id=699225
2013-04-29 13:08:18 -04:00
Alexander Larsson 8cb78d82d6 gtksizerequestcache: Fix typo that lead to crash/leak
We were checking for cache->requests_x but freeing cache->requests_y
which could cause a crash/leak.
2013-04-29 18:17:02 +02:00
David King b8d2806417 docs: Reorder compiler command line for new GCC
Newer versions of GCC/binutils must have the source file come before the
preprocessor and linker flags on the compiler command line, and this is
also compatible with previous versions.

https://bugzilla.gnome.org/show_bug.cgi?id=680241
2013-04-29 07:31:16 +01:00
David King 59c3e7bfe8 docs: Add GtkWidget::show,hide,map,unmap,realize,unrealize
Add gtk-doc comments for several signals on GtkWidget.

https://bugzilla.gnome.org/show_bug.cgi?id=688896
2013-04-29 07:23:46 +01:00
David King 402985077b docs: Add (inout) to requisition of gtk_menu_item_toggle_size_request()
https://bugzilla.gnome.org/show_bug.cgi?id=675571
2013-04-29 07:18:54 +01:00
Matthias Clasen e9f182e37a Fix a few memory leaks wrt to translations
Pointed out in https://bugzilla.gnome.org/show_bug.cgi?id=699016
The fix here is slightly different. We make
_gtk_builder_parser_translate return a const char * instead of
a dup'ed string, and fix up the callers.
2013-04-28 21:43:49 -04:00
Matthias Clasen 13858fde29 GtkGrid: Undo a size allocation tweak
Revert 5e1a06d1b1

This change caused empty rows to 'open up', which was not
intended and causes problems as seen in bug 698660.
2013-04-28 18:46:41 -04:00
Matthias Clasen ef759ef19d Add a testcase for empty grid rows
This adds a testcase described in bug 698660 to testgrid.
2013-04-28 18:46:11 -04:00
Žygimantas Beručka 51a31f9098 Updated Lithuanian translation 2013-04-28 13:24:47 +03:00
Mario Blättermann 0e4b460574 Updated German translation 2013-04-27 22:42:37 +02:00
Matthias Clasen 1f17efb81c Add some tests for GtkWindow
These tests may have some assumptions on reasonable window manager
behaviour.  For now, we just test that the default size of the
window ends up as the allocated size of the content. This test
currently fails with client-side decorations, because we are
not properly discriminating between overall window size and
content size.
2013-04-27 13:41:17 -04:00
Paolo Borelli d35596fe92 GtkImage: do not leak metrics in baseline align
https://bugzilla.gnome.org/show_bug.cgi?id=699020
2013-04-27 13:59:29 +02:00
Rico Tzschichholz b957e16695 gtk: Add COMPOSITE_TEMPLATES to EXTRA_DIST 2013-04-26 09:25:44 +02:00
Owen W. Taylor b72cf9129c wayland: when possible, fill in actual and predicted presentation times
There is currently no Wayland protocol for providing presentation
timestamps or hints about when drawing will be presented onscreen.
However, by assuming the straightforward algorithm used by the
DRM backend to Weston, we can reverse engineer the right values.

https://bugzilla.gnome.org/show_bug.cgi?id=698864
2013-04-25 13:55:03 -04:00
Owen W. Taylor 23031defde wayland: fill in refresh_interval in GdkFrameTimings
Track the outputs that a window is on, and use the refresh rate from
a random one of those outputs for the refresh_interval in
GdkFrameTimings.

https://bugzilla.gnome.org/show_bug.cgi?id=698864
2013-04-25 13:50:01 -04:00
Owen W. Taylor f1ce727b06 GdkWaylandWindow: Consolidate surface creation and destruction code
Combine duplicate code for creating and destroying surfaces.
To make the operation of the destroy() operation more obvious, the
destruction of the (fake) root window at display dispose time is
changed to not be a "foreign" destroy.

https://bugzilla.gnome.org/show_bug.cgi?id=698864
2013-04-25 13:49:47 -04:00
Owen W. Taylor ca120a98e5 GdkWaylandWindow: synchronize frame drawing
Use wl_surface_frame() to get notification when the compositor paints
a frame, and use this to throttle drawing to the compositor's refresh
cycle.

https://bugzilla.gnome.org/show_bug.cgi?id=698864
2013-04-25 13:45:21 -04:00
Owen W. Taylor c71fea568f GdkWindowWayland: make sure we attach the surface when repainting
Lazily creating the cairo surface that backs a window when we
first paint to it means that the call to
gdk_wayland_window_attach_image() in
gdk_wayland_window_process_updates_recurse() wasn't working the
first time a window was painted.

https://bugzilla.gnome.org/show_bug.cgi?id=698864
2013-04-25 13:45:12 -04:00
Owen W. Taylor d5310f9367 GdkWindowWayland: draw, then damage, then commit
When exposing an area, we were individually damaging and committing
each rectangle, *before* drawing. Surprisingly, this almost worked.
Order things right and only commit once.

https://bugzilla.gnome.org/show_bug.cgi?id=698864
2013-04-25 13:45:06 -04: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
Matthias Clasen 8dc090b9b1 GtkStack: improve docs 2013-04-24 22:07:09 -04:00
Matthias Clasen c69d2e4254 Generate new images 2013-04-24 21:56:08 -04:00
Matthias Clasen f3685c5e88 Docs: some widget gallery updates
Add images for Scrollbar, info bar, combo box text, etc.
2013-04-24 21:55:13 -04:00
Matthias Clasen a8a41b52ad GtkStackSwitcher: unset tooltip
It was pointed out to me that we leave the tooltip behind
when setting and unsetting an icon.
2013-04-24 20:10:05 -04:00
Matthias Clasen af49dd33cf GtkNotebook: Consistent boolean handling
Normalize boolean parameters in gtk_notebook_set_tab_reorderable and
gtk_notebook_set_tab_detachable before comparing them. Pointed out in
https://bugzilla.gnome.org/show_bug.cgi?id=697196
2013-04-24 19:58:22 -04:00
Cosimo Cecchi 06c8e8fa43 docs: fix some typos in newly introduced methods 2013-04-24 13:10:54 -04:00
Nik Kalach 95ce57443c [l10n] Update Interlingua translation 2013-04-24 16:03:15 +02:00
Yaron Shahrabani 9544ae08af Updated Hebrew translation. 2013-04-24 10:08:19 +03:00
Yaron Shahrabani 648ef7f7fa Updated Hebrew translation. 2013-04-24 09:45:26 +03:00
Matthias Clasen 661f24736b widget-factory: Add new widgets
Add GtkStack and GtkRevealer to the second page in
gtk3-widget-factory.
2013-04-23 17:39:46 -04:00
Benjamin Otte 174664b235 overlay: Silence gcc warnings 2013-04-23 14:13:51 -04:00
Owen W. Taylor 8c68050af8 tests/scrolling-performance: Add a new test for GtkViewport performance
Add a test that takes four copies of the widget-factory widgets and
scrolls them around to test how smoothly we can scroll and draw.
2013-04-23 14:04:40 -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 0032b2dc5a GtkSpinButton: don't constantly recreate style contexts for buttons
Cache the style contexts for the up and down panels, instead of recreating
them each time they are drawn or size requested. GtkSpinButtons were
many times slower to draw than other widgets because of the constant
style matching.

https://bugzilla.gnome.org/show_bug.cgi?id=698682
2013-04-23 14:04:39 -04:00
119 changed files with 8411 additions and 8252 deletions
+198
View File
@@ -1,3 +1,201 @@
Overview of Changes in GTK+ 3.7 to 3.9
======================================
* GtkFileChooser:
- Always show fuse-mounted locations in shortcuts
- GtkFileChooserButton has received a lot of fixes and tests have
been added for many of them
* GtkWindow:
- Initial support for client-side decorations has been added. This
is going to be used by default under Wayland. To try it with other
backends, set the GTK_CSD=1 environment variable.
- gtk_window_set_titlebar: A new function that can set a custom,
client-side titlebar on toplevel windows.
* Wayland:
- Use client-side decorations
- Implement maximization
- Improve cursor handling
- Improve multi-monitor handling
- Support most GtkSettings (for now by reading GSettings directly)
- Complete the keymap implementation
- Add support for custom surfaces
- Implement animated cursors
- Support the WAYLAND_SOCKET environment variable
- Implement frame synchronizatio
- Document Wayland-specific APIs
* Broadway:
- Improve window size handling
- Implement frame synchronization
- Add support for password authentication
* New APIs, widgets, feature additions:
- GtkHeaderBar is a new widget similar to a GtkBox, with the extra
feature that it can center a child (typically a title), independent
of the other content.
- GtkPlacesSidebar is the sidebar widget in the file chooser, exported
as a public widget - it will be shared with nautilus.
- GtkStack is an alternative to GtkNotebook for showing one of several
child widgets at a time. It supports animated transitions. Tabs are
not built into this widgets, but instead provided by the separate
GtkStackSwitcher widget.
- GtkRevealer is a new new widget that can hide or show its child
in an animated fashion.
- GtkMenuTracker is a helper object that makes dealing with
GMenuModels easier and more efficient.
- gtk_grid_remove_row/column: New functions to remove whole rows
or columns from a GtkGrid
- Support for composite children has been added to GtkWidget. This
allows to create complex widgets from GtkBuilder ui files. All
complex GTK+ widgets have been converted to use this facility.
- Baseline support was added to the GTK+ size allocation machinery.
Widgets can now export the baseline of the text they contain,
and containers can align their children wrt to their baselines.
* Known problems, feature removals, compatibility caveats:
- Handling of window size is currently in flux, and there are
some known problems with sizes unintentionally changing
- Support for the Motif DND protocol has been dropped
- Client-side decorations still have some issues when drawing
directly on toplevel windows or setting their background
- Support for multiple screens per display has been removed. This
was only ever supported on X11, and is an exceedingly rare setup
nowadays. The display-screen relation is now 1:1, and we will do
some more simplification of displaymanager/display/screen/monitor
APIs.
- gdk_window_get_display has been deprecated
- gtk_widget_push_composite_child has been deprecated - this was
used for anything
- GtkSwitch has been changed to draw focus internally, instead of
reserving space outside the switch for it. This may require some
application adjustment where margins were tweaked to 'correct'
the alignment of switches manually
* Printing:
- Avoid blocking when looking for avahi printers
- Don't link against avahi-gobject, use D-Bus directly
* Bugs fixed:
504901 GtkCellRendererCombo requires click-and-hold
586367 In local_only mode, file chooser should return native pa...
671939 [regression] crash on exit
672018 Need API to set global application state (busy, counters...
674051 Scrolling zoom in view - incorrect image display
674759 GtkLabel: wrong value of "mnemonic-keyval" when "use-mar...
675571 (out) or (inout) annotation possibly missing for gtk_men...
675649 gtk-demo: Fix typo
680241 Instructions on how to build a GTK app won't work with r...
681446 gtkdnd memory leak
685419 gtkprintbackendfile: Infinite loop in _cairo_write()
685420 Critical warnings when GtkPrintJob is released too early
688820 GIcon is a bad interface
688896 Add documentation for GtkWidget::show,hide,map,unmap,rea...
690275 scrolling on other windows is applied when coming back (...
691040 selection is reported incorrectly in file chooser button
692871 Need to expose output information to make GdkScreen API ...
694339 Fix build of GTK+ on Windows
694465 Allow backends to fail during initialisation
695200 Switching apps while a combobox open makes the parent wi...
695228 GdkPixbuf:ERROR:gdk-pixbuf-animation.c:242:gdk_pixbuf_an...
695278 Avoid passing a NULL title to setTitle
695304 GtkTextView: don't popdown a bubble if we don't have one
695312 Initial 'text' set in the non-numeric-only GtkSpinButton...
695375 GtkEntryAccessible: also handle entry icon tooltip NULL ...
695380 gtk_binding_entry_skip broken
695391 wayland documentation section id is "gtk-osx"
695473 treeview: fix a critical warning
695476 Drop the Motif DND protocol
695482 Universal Access panel appears jumbled and horrible afte...
695493 testgtk: issues with the color selection example
695495 testgtk: cursor example segfaults
695497 testgtk: lack of key repeat
695506 gtk-demo: link hovering unreliable
695682 Cannot build docs for wayland-only build
695714 Getting of printer info can hang
695772 Different appearance of menus within Audacious
695783 GtkApplication: Allow passing windows on non-X11 targets
695861 Allow to use custom surfaces for GdkWindows in Wayland
695874 GtkFontChooser docs
695895 Fix the gtk3-demo demo program on Windows
695945 implement minimize / maximize functionality
695948 GtkFontButton sets wrong show-preview-entry
695998 csd: enable shadows in the outer border
696051 vertical grid lines in rtl mode
696138 GtkWidget: some deprecation marks are missing
696171 GtkAssistant highlighted font unreadable
696202 Add GtkSpinner animation back to Win32 theme
696232 win32: do not crash on invalid utf8 conversion
696340 wayland: device list is populated async
696370 GtkOverlay doesn't work on top of GtkClutterEmbed
696429 wayland: Implement animated cursors
696457 gnome-ostree build broken by 3a9de35a6cefddc09aaf000e523...
696468 improve GMenuModel -> GtkMenu conversion
696546 gtk_print_backend_cups_finalize() crashes if cups_get_pr...
696553 Crash in avahi_create_browsers
696561 GtkApplicationWindow rendering broken
696608 css_image_value_parse: returning FALSE in pointer function
696622 gtk option printer widget segfault in epiphany
696623 GtkOverlay with a revealer produces warnings setting a m...
696767 a pair of memory leaks
696882 [regression] GtkWindow changes size after hide/show cycle
697048 GtkTextView: small code improvements
697144 Popup menu mnemonics fixes
697196 gtk_notebook_set_tab_reorderable boolean handling
697200 GtkWindow: notify::attached-to not emitted
697263 Impossible to set window transparency on 3.8
697275 gtk_window_set_default_size() doesn't work anymore
697427 Unreferencing GtkStatusIcon object causes abort
697673 Apps should connect only once when using Wayland
697795 xi2: Improve pointer emulation debug reporting
697886 dnd icon drawing broken on master
697947 A lot of GTK+ apps fail to launch with error "desktop_she...
698181 Document icon-shadow CSS property
698433 Geometry management broken in GtkBin widgets
698682 GtkSpinButton: don't constantly recreate style contexts f...
698864 wayland: improve integration with GdkFrameClock
699020 GtkImage: do not leak metrics in baseline align
699225 typo: Modifed -> Modified
* Translation updates:
Arabic
Aragonese
Assamese
Belarusian
Brazilian Portuguese
British English
Catalan
Catalan (Valencian)
Czech
Danish
Finnish
French
Galician
German
Greek
Hindi
Hungarian
Indonesian
Italian
Kazakh
Korean
Latvian
Malayalam
Odia
Persian
Polish
Punjabi
Russian
Serbian
Simplified Chinese
Slovenian
Tajik
Tamil
Ukrainian
Overview of Changes in GTK+ 3.7.12
==================================
+1 -2
View File
@@ -10,7 +10,7 @@
m4_define([gtk_major_version], [3])
m4_define([gtk_minor_version], [9])
m4_define([gtk_micro_version], [0])
m4_define([gtk_micro_version], [1])
m4_define([gtk_interface_age], [0])
m4_define([gtk_binary_age],
[m4_eval(100 * gtk_minor_version + gtk_micro_version)])
@@ -1242,7 +1242,6 @@ if test "$have_gio_unix" = "yes"; then
else
GDK_GIO_PACKAGE=gio-2.0
fi
AM_CONDITIONAL(HAVE_GIO_UNIX, test "$have_gio_unix" = "yes")
# Check for Pango flags
+38
View File
@@ -78,6 +78,35 @@ on_page_toggled (GtkToggleButton *button,
gtk_notebook_set_current_page (pages, page);
}
static void
spin_value_changed (GtkAdjustment *adjustment, GtkWidget *label)
{
GtkWidget *w;
gint v;
gchar *text;
v = (int)gtk_adjustment_get_value (adjustment);
if ((v % 3) == 0)
{
text = g_strdup_printf ("%d is a multiple of 3", v);
gtk_label_set_label (GTK_LABEL (label), text);
g_free (text);
}
w = gtk_widget_get_ancestor (label, GTK_TYPE_REVEALER);
gtk_revealer_set_reveal_child (GTK_REVEALER (w), (v % 3) == 0);
}
static void
dismiss (GtkWidget *button)
{
GtkWidget *w;
w = gtk_widget_get_ancestor (button, GTK_TYPE_REVEALER);
gtk_revealer_set_reveal_child (GTK_REVEALER (w), FALSE);
}
int
main (int argc, char *argv[])
{
@@ -86,6 +115,7 @@ main (int argc, char *argv[])
GtkWidget *widget;
GtkWidget *notebook;
gboolean dark = FALSE;
GtkAdjustment *adj;
gtk_init (&argc, &argv);
@@ -114,6 +144,14 @@ main (int argc, char *argv[])
widget = (GtkWidget*) gtk_builder_get_object (builder, "aboutmenuitem");
g_signal_connect (widget, "activate", G_CALLBACK (show_about), window);
widget = (GtkWidget*) gtk_builder_get_object (builder, "page2dismiss");
g_signal_connect (widget, "clicked", G_CALLBACK (dismiss), NULL);
widget = (GtkWidget*) gtk_builder_get_object (builder, "page2note");
adj = (GtkAdjustment *) gtk_builder_get_object (builder, "adjustment2");
g_signal_connect (adj, "value-changed",
G_CALLBACK (spin_value_changed), widget);
g_object_unref (G_OBJECT (builder));
gtk_widget_show (window);
+160 -15
View File
@@ -54,6 +54,23 @@ Vestibulum in tortor diam, quis aliquet quam. Praesent ut justo neque, tempus ru
Duis eu lectus quam. Vivamus eget metus a mauris molestie venenatis pulvinar eleifend nisi.
Nulla facilisi. Pellentesque at dolor sit amet purus dapibus pulvinar molestie quis neque.
Suspendisse feugiat quam quis dolor accumsan cursus. </property>
</object>
<object class="GtkTextBuffer" id="textbuffer2">
<property name="text">* Translation updates:
Aragonese
Assamese
Basque
Brazilian Portuguese
Dutch
German
Hebrew
Hungarian
Polish
Portuguese
Serbian
Slovenian
Spanish
Uyghur</property>
</object>
<object class="GtkAccelGroup" id="accelgroup1"/>
<object class="GtkWindow" id="window">
@@ -2146,30 +2163,158 @@ Suspendisse feugiat quam quis dolor accumsan cursus. </property>
</object>
</child>
<child>
<object class="GtkBox" id="page2">
<object class="GtkOverlay" id="page2">
<property name="visible">True</property>
<property name="orientation">vertical</property>
<property name="spacing">6</property>
<property name="border-width">6</property>
<child>
<object class="GtkBox" id="page2box1">
<child type="overlay">
<object class="GtkRevealer" id="page2revealer">
<property name="visible">True</property>
<property name="orientation">horizontal</property>
<property name="spacing">4</property>
<property name="halign">center</property>
<property name="valign">start</property>
<child>
<object class="GtkSpinButton" id="verticalspin1">
<object class="GtkFrame" id="page2frame">
<property name="visible">True</property>
<property name="orientation">vertical</property>
<property name="adjustment">adjustment2</property>
<property name="margin-top">2</property>
<child>
<object class="GtkBox" id="page2box">
<property name="visible">True</property>
<property name="margin-top">10</property>
<property name="margin-bottom">10</property>
<property name="margin-left">10</property>
<property name="margin-right">10</property>
<property name="spacing">20</property>
<child>
<object class="GtkLabel" id="page2note">
<property name="visible">True</property>
<property name="hexpand">True</property>
<property name="halign">start</property>
<property name="label">NEWS!</property>
</object>
</child>
<child>
<object class="GtkButton" id="page2dismiss">
<property name="visible">True</property>
<child>
<object class="GtkImage" id="page2dismissi">
<property name="visible">True</property>
<property name="icon-name">window-close-symbolic</property>
<property name="icon-size">0</property>
</object>
</child>
</object>
</child>
</object>
</child>
</object>
</child>
</object>
</child>
<child>
<object class="GtkGrid" id="page2grid">
<property name="visible">True</property>
<property name="column-homogeneous">True</property>
<property name="row-spacing">6</property>
<property name="column-spacing">6</property>
<property name="border-width">6</property>
<child>
<object class="GtkSpinButton" id="verticalspin2">
<object class="GtkBox" id="page2box1">
<property name="visible">True</property>
<property name="sensitive">False</property>
<property name="orientation">vertical</property>
<property name="adjustment">adjustment1</property>
<property name="orientation">horizontal</property>
<property name="spacing">4</property>
<child>
<object class="GtkSpinButton" id="verticalspin1">
<property name="visible">True</property>
<property name="orientation">vertical</property>
<property name="adjustment">adjustment2</property>
</object>
</child>
<child>
<object class="GtkSpinButton" id="verticalspin2">
<property name="visible">True</property>
<property name="sensitive">False</property>
<property name="orientation">vertical</property>
<property name="adjustment">adjustment1</property>
</object>
</child>
</object>
<packing>
<property name="left-attach">0</property>
<property name="top-attach">0</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="filler1">
<property name="visible">True</property>
</object>
<packing>
<property name="left-attach">1</property>
<property name="top-attach">0</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="filler2">
<property name="visible">True</property>
</object>
<packing>
<property name="left-attach">2</property>
<property name="top-attach">0</property>
</packing>
</child>
<child>
<object class="GtkStackSwitcher" id="switcher">
<property name="visible">True</property>
<property name="stack">stack</property>
<property name="halign">center</property>
</object>
<packing>
<property name="left-attach">0</property>
<property name="top-attach">1</property>
</packing>
</child>
<child>
<object class="GtkFrame" id="frame">
<property name="visible">True</property>
<property name="hexpand">False</property>
<child>
<object class="GtkStack" id="stack">
<property name="visible">True</property>
<property name="transition-type">crossfade</property>
<property name="transition-duration">1000</property>
<child>
<object class="GtkScrolledWindow" id="swo">
<property name="visible">True</property>
<property name="shadow-type">none</property>
<child>
<object class="GtkTextView" id="tvo">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="buffer">textbuffer2</property>
</object>
</child>
</object>
<packing>
<property name="name">page1</property>
<property name="icon-name">document-open-recent-symbolic</property>
<property name="title">News</property>
</packing>
</child>
<child>
<object class="GtkImage" id="imageo">
<property name="visible">True</property>
<property name="resource">/logos/gtk-logo-256.png</property>
</object>
<packing>
<property name="name">page2</property>
<property name="icon-name">system-shutdown-symbolic</property>
<property name="title">Logo</property>
</packing>
</child>
</object>
</child>
</object>
<packing>
<property name="left-attach">0</property>
<property name="top-attach">2</property>
</packing>
</child>
</object>
</child>
+5 -2
View File
@@ -301,7 +301,7 @@ HTML_IMAGES = \
$(srcdir)/images/appchooserdialog.png \
$(srcdir)/images/assistant.png \
$(srcdir)/images/box-packing.png \
$(srcdir)/images/box-expand.png \
$(srcdir)/images/box-expand.png \
$(srcdir)/images/button.png \
$(srcdir)/images/check-button.png \
$(srcdir)/images/color-button.png \
@@ -309,8 +309,8 @@ HTML_IMAGES = \
$(srcdir)/images/colorchooser.png \
$(srcdir)/images/combo-box.png \
$(srcdir)/images/combo-box-entry.png \
$(srcdir)/images/combo-box-text.png \
$(srcdir)/images/entry.png \
$(srcdir)/images/search-entry.png \
$(srcdir)/images/figure-hierarchical-drawing.png \
$(srcdir)/images/figure-windowed-label.png \
$(srcdir)/images/file-button.png \
@@ -321,6 +321,7 @@ HTML_IMAGES = \
$(srcdir)/images/frame.png \
$(srcdir)/images/icon-view.png \
$(srcdir)/images/image.png \
$(srcdir)/images/info-bar.png \
$(srcdir)/images/label.png \
$(srcdir)/images/levelbar.png \
$(srcdir)/images/link-button.png \
@@ -342,7 +343,9 @@ HTML_IMAGES = \
$(srcdir)/images/radio-group.png \
$(srcdir)/images/recentchooserdialog.png \
$(srcdir)/images/scales.png \
$(srcdir)/images/scrollbar.png \
$(srcdir)/images/scrolledwindow.png \
$(srcdir)/images/search-entry.png \
$(srcdir)/images/separator.png \
$(srcdir)/images/spinbutton.png \
$(srcdir)/images/spinner.png \
+3 -3
View File
@@ -42,7 +42,7 @@ feature of the shell. If you enclose a command in backticks
substituted into the command line before execution. So to compile
a GTK+ Hello, World, you would type the following:
<programlisting>
$ cc `pkg-config --cflags --libs gtk+-3.0` hello.c -o hello
$ cc `pkg-config --cflags gtk+-3.0` hello.c -o hello `pkg-config --libs gtk+-3.0`
</programlisting>
</para>
@@ -67,7 +67,7 @@ this range will trigger compiler warnings.
Here is how you would compile hello.c if you want to allow it
to use symbols that were not deprecated in 3.2:
<programlisting>
$ cc -DGDK_VERSION_MIN_REQUIRED=GDK_VERSION_3_2 `pkg-config --cflags --libs gtk+-3.0` hello.c -o hello
$ cc `pkg-config --cflags gtk+-3.0` -DGDK_VERSION_MIN_REQIRED=GDK_VERSION_3_2 hello.c -o hello `pkg-config --libs gtk+-3.0`
</programlisting>
</para>
@@ -75,7 +75,7 @@ $ cc -DGDK_VERSION_MIN_REQUIRED=GDK_VERSION_3_2 `pkg-config --cflags --libs gtk+
And here is how you would compile hello.c if you don't want
it to use any symbols that were introduced after 3.4:
<programlisting>
$ cc -DGDK_VERSION_MAX_ALLOWED=GDK_VERSION_3_4 `pkg-config --cflags --libs gtk+-3.0` hello.c -o hello
$ cc `pkg-config --cflags gtk+-3.0` -DGDK_VERSION_MAX_ALLOWED=GDK_VERSION_3_4 hello.c -o hello `pkg-config --libs gtk+-3.0`
</programlisting>
</para>
+5 -2
View File
@@ -2487,7 +2487,7 @@ gtk_paned_get_type
<SECTION>
<FILE>gtkplacessidebar</FILE>
<TITLE>GtkPlacesSidebar</FILE>
<TITLE>GtkPlacesSidebar</TITLE>
GtkPlacesSidebar
GtkPlacesOpenFlags
gtk_places_sidebar_new
@@ -2495,11 +2495,14 @@ gtk_places_sidebar_set_open_flags
gtk_places_sidebar_set_location
gtk_places_sidebar_get_location
gtk_places_sidebar_set_show_desktop
gtk_places_sidebar_set_accept_uri_drops
gtk_places_sidebar_add_shortcut
gtk_places_sidebar_remove_shortcut
gtk_places_sidebar_list_shortcuts
gtk_places_sidebar_get_nth_bookmark
gtk_places_sidebar_get_open_flags
gtk_places_sidebar_get_show_connect_to_server
gtk_places_sidebar_get_show_desktop
gtk_places_sidebar_set_show_connect_to_server
<SUBSECTION Standard>
GTK_PLACES_SIDEBAR
GTK_IS_PLACES_SIDEBAR
Binary file not shown.

Before

Width:  |  Height:  |  Size: 17 KiB

After

Width:  |  Height:  |  Size: 22 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.6 KiB

After

Width:  |  Height:  |  Size: 3.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 67 KiB

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.8 KiB

After

Width:  |  Height:  |  Size: 8.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.8 KiB

After

Width:  |  Height:  |  Size: 3.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.6 KiB

After

Width:  |  Height:  |  Size: 2.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.6 KiB

After

Width:  |  Height:  |  Size: 2.7 KiB

+12
View File
@@ -18,6 +18,9 @@
<link linkend="GtkComboBox">
<inlinegraphic fileref="combo-box.png" format="PNG"></inlinegraphic>
</link>
<link linkend="GtkComboBoxText">
<inlinegraphic fileref="combo-box-text.png" format="PNG"></inlinegraphic>
</link>
<link linkend="GtkEntry">
<inlinegraphic fileref="entry.png" format="PNG"></inlinegraphic>
</link>
@@ -147,4 +150,13 @@
<link linkend="GtkFontChooserDialog">
<inlinegraphic fileref="fontchooser.png" format="PNG"></inlinegraphic>
</link>
<link linkend="GtkAboutDialog">
<inlinegraphic fileref="aboutdialog.png" format="PNG"></inlinegraphic>
</link>
<link linkend="GtkInfoBar">
<inlinegraphic fileref="info-bar.png" format="PNG"></inlinegraphic>
</link>
<link linkend="GtkScrollbar">
<inlinegraphic fileref="scrollbar.png" format="PNG"></inlinegraphic>
</link>
</para>
+76 -16
View File
@@ -400,11 +400,6 @@ create_combo_box_entry (void)
GtkWidget *align;
GtkWidget *child;
GtkTreeModel *model;
gtk_rc_parse_string ("style \"combo-box-entry-style\" {\n"
" GtkComboBox::appears-as-list = 1\n"
"}\n"
"widget_class \"GtkComboBoxEntry\" style \"combo-box-entry-style\"\n" );
model = (GtkTreeModel *)gtk_list_store_new (1, G_TYPE_STRING);
widget = g_object_new (GTK_TYPE_COMBO_BOX,
@@ -427,14 +422,22 @@ create_combo_box (void)
{
GtkWidget *widget;
GtkWidget *align;
gtk_rc_parse_string ("style \"combo-box-style\" {\n"
" GtkComboBox::appears-as-list = 0\n"
"}\n"
"widget_class \"GtkComboBox\" style \"combo-box-style\"\n" );
GtkCellRenderer *cell;
GtkListStore *store;
widget = gtk_combo_box_new ();
gtk_cell_layout_clear (GTK_CELL_LAYOUT (widget));
cell = gtk_cell_renderer_pixbuf_new ();
gtk_cell_layout_pack_start (GTK_CELL_LAYOUT (widget), cell, FALSE);
gtk_cell_layout_set_attributes (GTK_CELL_LAYOUT (widget), cell, "icon-name", 0, NULL);
cell = gtk_cell_renderer_text_new ();
gtk_cell_layout_pack_start (GTK_CELL_LAYOUT (widget), cell, FALSE);
gtk_cell_layout_set_attributes (GTK_CELL_LAYOUT (widget), cell, "text", 1, NULL);
store = gtk_list_store_new (2, G_TYPE_STRING, G_TYPE_STRING);
gtk_list_store_insert_with_values (store, NULL, -1, 0, "edit-delete", 1, "Combo Box", -1);
gtk_combo_box_set_model (GTK_COMBO_BOX (widget), GTK_TREE_MODEL (store));
widget = gtk_combo_box_text_new ();
gtk_combo_box_text_append_text (GTK_COMBO_BOX_TEXT (widget), "Combo Box");
gtk_combo_box_set_active (GTK_COMBO_BOX (widget), 0);
align = gtk_alignment_new (0.5, 0.5, 0.0, 0.0);
gtk_container_add (GTK_CONTAINER (align), widget);
@@ -442,6 +445,38 @@ create_combo_box (void)
return new_widget_info ("combo-box", align, SMALL);
}
static WidgetInfo *
create_combo_box_text (void)
{
GtkWidget *widget;
GtkWidget *align;
widget = gtk_combo_box_text_new ();
gtk_combo_box_text_append_text (GTK_COMBO_BOX_TEXT (widget), "Combo Box Text");
gtk_combo_box_set_active (GTK_COMBO_BOX (widget), 0);
align = gtk_alignment_new (0.5, 0.5, 0.0, 0.0);
gtk_container_add (GTK_CONTAINER (align), widget);
return new_widget_info ("combo-box-text", align, SMALL);
}
static WidgetInfo *
create_info_bar (void)
{
GtkWidget *widget;
GtkWidget *align;
widget = gtk_info_bar_new_with_buttons ("Close", 0, NULL);
gtk_info_bar_set_message_type (GTK_INFO_BAR (widget), GTK_MESSAGE_INFO);
gtk_container_add (GTK_CONTAINER (gtk_info_bar_get_content_area (GTK_INFO_BAR (widget))),
gtk_label_new ("Info Bar"));
align = gtk_alignment_new (0.5, 0.5, 0.0, 0.0);
gtk_container_add (GTK_CONTAINER (align), widget);
return new_widget_info ("info-bar", align, SMALL);
}
static WidgetInfo *
create_recent_chooser_dialog (void)
{
@@ -679,12 +714,12 @@ create_panes (void)
pane = gtk_paned_new (GTK_ORIENTATION_HORIZONTAL);
gtk_paned_pack1 (GTK_PANED (pane),
g_object_new (GTK_TYPE_FRAME,
"shadow", GTK_SHADOW_IN,
"shadow-type", GTK_SHADOW_IN,
NULL),
FALSE, FALSE);
gtk_paned_pack2 (GTK_PANED (pane),
g_object_new (GTK_TYPE_FRAME,
"shadow", GTK_SHADOW_IN,
"shadow-type", GTK_SHADOW_IN,
NULL),
FALSE, FALSE);
gtk_box_pack_start (GTK_BOX (hbox),
@@ -693,12 +728,12 @@ create_panes (void)
pane = gtk_paned_new (GTK_ORIENTATION_VERTICAL);
gtk_paned_pack1 (GTK_PANED (pane),
g_object_new (GTK_TYPE_FRAME,
"shadow", GTK_SHADOW_IN,
"shadow-type", GTK_SHADOW_IN,
NULL),
FALSE, FALSE);
gtk_paned_pack2 (GTK_PANED (pane),
g_object_new (GTK_TYPE_FRAME,
"shadow", GTK_SHADOW_IN,
"shadow-type", GTK_SHADOW_IN,
NULL),
FALSE, FALSE);
gtk_box_pack_start (GTK_BOX (hbox),
@@ -1022,6 +1057,8 @@ create_scrolledwindow (void)
GtkWidget *scrolledwin, *label;
scrolledwin = gtk_scrolled_window_new (NULL, NULL);
gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (scrolledwin),
GTK_POLICY_ALWAYS, GTK_POLICY_ALWAYS);
label = gtk_label_new ("Scrolled Window");
gtk_container_add (GTK_CONTAINER (scrolledwin), label);
@@ -1029,6 +1066,26 @@ create_scrolledwindow (void)
return new_widget_info ("scrolledwindow", scrolledwin, MEDIUM);
}
static WidgetInfo *
create_scrollbar (void)
{
GtkWidget *widget;
GtkWidget *vbox, *align;
widget = gtk_scrollbar_new (GTK_ORIENTATION_HORIZONTAL, NULL);
gtk_widget_set_size_request (widget, 100, -1);
vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 3);
align = gtk_alignment_new (0.5, 0.5, 0.0, 0.0);
gtk_container_add (GTK_CONTAINER (align), widget);
gtk_box_pack_start (GTK_BOX (vbox), align, FALSE, FALSE, 0);
gtk_box_pack_start (GTK_BOX (vbox),
gtk_label_new ("Scrollbar"),
FALSE, FALSE, 0);
return new_widget_info ("scrollbar", vbox, SMALL);
}
static WidgetInfo *
create_spinbutton (void)
{
@@ -1257,6 +1314,7 @@ get_all_widgets (void)
retval = g_list_prepend (retval, create_color_button ());
retval = g_list_prepend (retval, create_combo_box ());
retval = g_list_prepend (retval, create_combo_box_entry ());
retval = g_list_prepend (retval, create_combo_box_text ());
retval = g_list_prepend (retval, create_entry ());
retval = g_list_prepend (retval, create_file_button ());
retval = g_list_prepend (retval, create_font_button ());
@@ -1273,6 +1331,7 @@ get_all_widgets (void)
retval = g_list_prepend (retval, create_radio ());
retval = g_list_prepend (retval, create_scales ());
retval = g_list_prepend (retval, create_scrolledwindow ());
retval = g_list_prepend (retval, create_scrollbar ());
retval = g_list_prepend (retval, create_separator ());
retval = g_list_prepend (retval, create_spinbutton ());
retval = g_list_prepend (retval, create_statusbar ());
@@ -1298,6 +1357,7 @@ get_all_widgets (void)
retval = g_list_prepend (retval, create_menu_button ());
retval = g_list_prepend (retval, create_search_entry ());
retval = g_list_prepend (retval, create_level_bar ());
retval = g_list_prepend (retval, create_info_bar ());
return retval;
}
-51
View File
@@ -1470,56 +1470,6 @@ _gdk_broadway_window_queue_antiexpose (GdkWindow *window,
return TRUE;
}
static void
copy_region (cairo_surface_t *surface,
cairo_region_t *area,
gint dx,
gint dy)
{
cairo_t *cr;
cr = cairo_create (surface);
gdk_cairo_region (cr, area);
cairo_clip (cr);
/* NB: This is a self-copy and Cairo doesn't support that yet.
* So we do a litle trick.
*/
cairo_push_group (cr);
cairo_set_source_surface (cr, surface, dx, dy);
cairo_paint (cr);
cairo_pop_group_to_source (cr);
cairo_paint (cr);
cairo_destroy (cr);
}
void
_gdk_broadway_window_translate (GdkWindow *window,
cairo_region_t *area,
gint dx,
gint dy)
{
GdkWindowImplBroadway *impl;
GdkBroadwayDisplay *broadway_display;
impl = GDK_WINDOW_IMPL_BROADWAY (window->impl);
if (impl->surface)
{
copy_region (impl->surface, area, dx, dy);
broadway_display = GDK_BROADWAY_DISPLAY (gdk_window_get_display (window));
if (_gdk_broadway_server_window_translate (broadway_display->server,
impl->id,
area, dx, dy))
queue_flush (window);
}
}
guint32
gdk_broadway_get_last_seen_time (GdkWindow *window)
{
@@ -1558,7 +1508,6 @@ gdk_window_impl_broadway_class_init (GdkWindowImplBroadwayClass *klass)
impl_class->input_shape_combine_region = gdk_window_broadway_input_shape_combine_region;
impl_class->set_static_gravities = gdk_window_broadway_set_static_gravities;
impl_class->queue_antiexpose = _gdk_broadway_window_queue_antiexpose;
impl_class->translate = _gdk_broadway_window_translate;
impl_class->destroy = _gdk_broadway_window_destroy;
impl_class->destroy_foreign = gdk_broadway_window_destroy_foreign;
impl_class->resize_cairo_surface = gdk_window_broadway_resize_cairo_surface;
+1 -1
View File
@@ -310,7 +310,7 @@ struct _GdkBackend {
GdkDisplay * (* open_display) (const char *name);
};
GdkBackend gdk_backends[] = {
static GdkBackend gdk_backends[] = {
#ifdef GDK_WINDOWING_QUARTZ
{ "quartz", gdk_quartz_display_manager_get_type, _gdk_quartz_display_open },
#endif
+11 -1
View File
@@ -384,6 +384,7 @@ gdk_frame_clock_paint_idle (void *data)
case GDK_FRAME_CLOCK_PHASE_LAYOUT:
if (priv->freeze_count == 0)
{
int iter;
#ifdef G_ENABLE_DEBUG
if ((_gdk_debug_flags & GDK_DEBUG_FRAMES) != 0)
{
@@ -394,11 +395,20 @@ gdk_frame_clock_paint_idle (void *data)
#endif /* G_ENABLE_DEBUG */
priv->phase = GDK_FRAME_CLOCK_PHASE_LAYOUT;
if (priv->requested & GDK_FRAME_CLOCK_PHASE_LAYOUT)
/* We loop in the layout phase, because we don't want to progress
* into the paint phase with invalid size allocations. This may
* happen in some situation like races between user window
* resizes and natural size changes.
*/
iter = 0;
while ((priv->requested & GDK_FRAME_CLOCK_PHASE_LAYOUT) &&
priv->freeze_count == 0 && iter++ < 4)
{
priv->requested &= ~GDK_FRAME_CLOCK_PHASE_LAYOUT;
g_signal_emit_by_name (G_OBJECT (clock), "layout");
}
if (iter == 5)
g_warning ("gdk-frame-clock: layout continuously requested, giving up after 4 tries");
}
case GDK_FRAME_CLOCK_PHASE_PAINT:
if (priv->freeze_count == 0)
+4 -26
View File
@@ -224,6 +224,7 @@ struct _GdkWindow
guint native_visibility : 2; /* the native visibility of a impl windows */
guint viewable : 1; /* mapped and all parents mapped */
guint applied_shape : 1;
guint in_update : 1;
GdkFullscreenMode fullscreen_mode;
/* The GdkWindow that has the impl, ref:ed if another window.
@@ -250,10 +251,6 @@ struct _GdkWindow
GdkCursor *cursor;
GHashTable *device_cursor;
GSList *implicit_paint;
GList *outstanding_moves;
cairo_region_t *shape;
cairo_region_t *input_shape;
@@ -269,10 +266,11 @@ struct _GdkWindow
guint num_offscreen_children;
GdkFrameClock *frame_clock; /* NULL to use from parent or default */
GdkWindowInvalidateHandlerFunc invalidate_handler;
};
#define GDK_WINDOW_TYPE(d) (((GDK_WINDOW (d)))->window_type)
#define GDK_WINDOW_DESTROYED(d) (GDK_WINDOW (d)->destroyed)
#define GDK_WINDOW_TYPE(d) ((((GdkWindow *)(d)))->window_type)
#define GDK_WINDOW_DESTROYED(d) (((GdkWindow *)(d))->destroyed)
extern gchar *_gdk_display_name;
extern gint _gdk_screen_number;
@@ -354,26 +352,6 @@ void _gdk_windowing_got_event (GdkDisplay *display,
#define GDK_WINDOW_IS_MAPPED(window) (((window)->state & GDK_WINDOW_STATE_WITHDRAWN) == 0)
#define GDK_TYPE_PAINTABLE (_gdk_paintable_get_type ())
#define GDK_PAINTABLE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GDK_TYPE_PAINTABLE, GdkPaintable))
#define GDK_IS_PAINTABLE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GDK_TYPE_PAINTABLE))
#define GDK_PAINTABLE_GET_IFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), GDK_TYPE_PAINTABLE, GdkPaintableIface))
typedef struct _GdkPaintable GdkPaintable;
typedef struct _GdkPaintableIface GdkPaintableIface;
struct _GdkPaintableIface
{
GTypeInterface g_iface;
void (* begin_paint_region) (GdkPaintable *paintable,
GdkWindow *window,
const cairo_region_t *region);
void (* end_paint) (GdkPaintable *paintable);
};
GType _gdk_paintable_get_type (void) G_GNUC_CONST;
void _gdk_window_invalidate_for_expose (GdkWindow *window,
cairo_region_t *region);
-37
View File
@@ -555,42 +555,6 @@ gdk_offscreen_window_queue_antiexpose (GdkWindow *window,
return FALSE;
}
static void
gdk_offscreen_window_translate (GdkWindow *window,
cairo_region_t *area,
gint dx,
gint dy)
{
GdkOffscreenWindow *offscreen = GDK_OFFSCREEN_WINDOW (window->impl);
if (offscreen->surface)
{
cairo_t *cr;
cr = cairo_create (offscreen->surface);
area = cairo_region_copy (area);
gdk_cairo_region (cr, area);
cairo_clip (cr);
/* NB: This is a self-copy and Cairo doesn't support that yet.
* So we do a litle trick.
*/
cairo_push_group (cr);
cairo_set_source_surface (cr, offscreen->surface, dx, dy);
cairo_paint (cr);
cairo_pop_group_to_source (cr);
cairo_paint (cr);
cairo_destroy (cr);
}
_gdk_window_add_damage (window, area);
}
static cairo_surface_t *
gdk_offscreen_window_resize_cairo_surface (GdkWindow *window,
cairo_surface_t *surface,
@@ -752,7 +716,6 @@ gdk_offscreen_window_class_init (GdkOffscreenWindowClass *klass)
impl_class->input_shape_combine_region = gdk_offscreen_window_input_shape_combine_region;
impl_class->set_static_gravities = gdk_offscreen_window_set_static_gravities;
impl_class->queue_antiexpose = gdk_offscreen_window_queue_antiexpose;
impl_class->translate = gdk_offscreen_window_translate;
impl_class->destroy = gdk_offscreen_window_destroy;
impl_class->destroy_foreign = NULL;
impl_class->resize_cairo_surface = gdk_offscreen_window_resize_cairo_surface;
+344 -1502
View File
File diff suppressed because it is too large Load Diff
+23
View File
@@ -634,6 +634,26 @@ gboolean gdk_window_set_static_gravities (GdkWindow *window,
/* GdkWindow */
/**
* GdkWindowInvalidateHandlerFunc:
* @window: a #GdkWindow
* @region: a #cairo_region_t
*
* Whenever some area of the window is invalidated (directly in the
* window or in a child window) this gets called with @region in
* the coordinate space of @window. You can use @region to just
* keep track of the dirty region, or you can actually change
* @region in case you are doing display tricks like showing
* a child in multiple places.
*
* Since: 3.10
*/
typedef void (*GdkWindowInvalidateHandlerFunc) (GdkWindow *window,
cairo_region_t *region);
GDK_AVAILABLE_IN_3_10
void gdk_window_set_invalidate_handler (GdkWindow *window,
GdkWindowInvalidateHandlerFunc handler);
gboolean gdk_window_has_native (GdkWindow *window);
void gdk_window_set_type_hint (GdkWindow *window,
GdkWindowTypeHint hint);
@@ -747,6 +767,9 @@ GdkWindow * gdk_window_get_effective_toplevel (GdkWindow *window);
GList * gdk_window_get_children (GdkWindow *window);
GList * gdk_window_peek_children (GdkWindow *window);
GList * gdk_window_get_children_with_user_data (GdkWindow *window,
gpointer user_data);
GdkEventMask gdk_window_get_events (GdkWindow *window);
void gdk_window_set_events (GdkWindow *window,
GdkEventMask event_mask);
+3 -10
View File
@@ -101,6 +101,9 @@ struct _GdkWindowImplClass
gint *x,
gint *y,
GdkModifierType *mask);
gboolean (* begin_paint_region) (GdkWindow *window,
const cairo_region_t *region);
void (* end_paint) (GdkWindow *window);
cairo_region_t * (* get_shape) (GdkWindow *window);
cairo_region_t * (* get_input_shape) (GdkWindow *window);
@@ -125,16 +128,6 @@ struct _GdkWindowImplClass
gboolean (* queue_antiexpose) (GdkWindow *window,
cairo_region_t *update_area);
/* Called to move @area inside @window by @dx x @dy pixels. @area is
* guaranteed to be inside @window. If part of @area is not invisible or
* invalid, it is this function's job to queue expose events in those
* areas.
*/
void (* translate) (GdkWindow *window,
cairo_region_t *area,
gint dx,
gint dy);
/* Called to do the windowing system specific part of gdk_window_destroy(),
*
* window: The window being destroyed
+10 -68
View File
@@ -364,19 +364,18 @@ gdk_window_impl_quartz_init (GdkWindowImplQuartz *impl)
impl->type_hint = GDK_WINDOW_TYPE_HINT_NORMAL;
}
static void
gdk_window_impl_quartz_begin_paint_region (GdkPaintable *paintable,
GdkWindow *window,
static gboolean
gdk_window_impl_quartz_begin_paint_region (GdkWindow *window,
const cairo_region_t *region)
{
GdkWindowImplQuartz *impl = GDK_WINDOW_IMPL_QUARTZ (paintable);
GdkWindowImplQuartz *impl = GDK_WINDOW_IMPL_QUARTZ (window->imp);
cairo_region_t *clipped_and_offset_region;
cairo_t *cr;
clipped_and_offset_region = cairo_region_copy (region);
cairo_region_intersect (clipped_and_offset_region,
window->clip_region_with_children);
window->clip_region);
cairo_region_translate (clipped_and_offset_region,
window->abs_x, window->abs_y);
@@ -415,12 +414,14 @@ gdk_window_impl_quartz_begin_paint_region (GdkPaintable *paintable,
done:
cairo_region_destroy (clipped_and_offset_region);
return FALSE;
}
static void
gdk_window_impl_quartz_end_paint (GdkPaintable *paintable)
gdk_window_impl_quartz_end_paint (GdkWindow *window)
{
GdkWindowImplQuartz *impl = GDK_WINDOW_IMPL_QUARTZ (paintable);
GdkWindowImplQuartz *impl = GDK_WINDOW_IMPL_QUARTZ (window->impl);
impl->begin_paint_count--;
@@ -536,13 +537,6 @@ _gdk_quartz_display_after_process_all_updates (GdkDisplay *display)
NSEnableScreenUpdates ();
}
static void
gdk_window_impl_quartz_paintable_init (GdkPaintableIface *iface)
{
iface->begin_paint_region = gdk_window_impl_quartz_begin_paint_region;
iface->end_paint = gdk_window_impl_quartz_end_paint;
}
static const gchar *
get_default_title (void)
{
@@ -2237,49 +2231,6 @@ gdk_quartz_window_queue_antiexpose (GdkWindow *window,
return FALSE;
}
static void
gdk_quartz_window_translate (GdkWindow *window,
cairo_region_t *area,
gint dx,
gint dy)
{
cairo_region_t *invalidate, *scrolled;
GdkWindowImplQuartz *impl = (GdkWindowImplQuartz *)window->impl;
GdkRectangle extents;
cairo_region_get_extents (area, &extents);
[impl->view scrollRect:NSMakeRect (extents.x - dx, extents.y - dy,
extents.width, extents.height)
by:NSMakeSize (dx, dy)];
if (impl->needs_display_region)
{
cairo_region_t *intersection;
/* Invalidate already invalidated area that was moved at new
* location.
*/
intersection = cairo_region_copy (impl->needs_display_region);
cairo_region_intersect (intersection, area);
cairo_region_translate (intersection, dx, dy);
gdk_quartz_window_set_needs_display_in_region (window, intersection);
cairo_region_destroy (intersection);
}
/* Calculate newly exposed area that needs invalidation */
scrolled = cairo_region_copy (area);
cairo_region_translate (scrolled, dx, dy);
invalidate = cairo_region_copy (area);
cairo_region_subtract (invalidate, scrolled);
cairo_region_destroy (scrolled);
gdk_quartz_window_set_needs_display_in_region (window, invalidate);
cairo_region_destroy (invalidate);
}
static void
gdk_quartz_window_set_focus_on_map (GdkWindow *window,
gboolean focus_on_map)
@@ -3078,12 +3029,13 @@ gdk_window_impl_quartz_class_init (GdkWindowImplQuartzClass *klass)
impl_class->input_shape_combine_region = gdk_window_quartz_input_shape_combine_region;
impl_class->set_static_gravities = gdk_window_quartz_set_static_gravities;
impl_class->queue_antiexpose = gdk_quartz_window_queue_antiexpose;
impl_class->translate = gdk_quartz_window_translate;
impl_class->destroy = gdk_quartz_window_destroy;
impl_class->destroy_foreign = gdk_quartz_window_destroy_foreign;
impl_class->resize_cairo_surface = gdk_window_quartz_resize_cairo_surface;
impl_class->get_shape = gdk_quartz_window_get_shape;
impl_class->get_input_shape = gdk_quartz_window_get_input_shape;
impl_class->begin_paint_region = gdk_window_impl_quartz_begin_paint_region;
impl_class->end_paint = gdk_window_impl_quartz_end_paint;
impl_class->focus = gdk_quartz_window_focus;
impl_class->set_type_hint = gdk_quartz_window_set_type_hint;
@@ -3159,19 +3111,9 @@ _gdk_window_impl_quartz_get_type (void)
(GInstanceInitFunc) gdk_window_impl_quartz_init,
};
const GInterfaceInfo paintable_info =
{
(GInterfaceInitFunc) gdk_window_impl_quartz_paintable_init,
NULL,
NULL
};
object_type = g_type_register_static (GDK_TYPE_WINDOW_IMPL,
"GdkWindowImplQuartz",
&object_info, 0);
g_type_add_interface_static (object_type,
GDK_TYPE_PAINTABLE,
&paintable_info);
}
return object_type;
+1 -1
View File
@@ -5,7 +5,7 @@
static void
test_unset_display (void)
{
if (g_test_trap_fork (0, G_TEST_TRAP_SILENCE_STDOUT | G_TEST_TRAP_SILENCE_STDERR))
if (g_test_trap_fork (0, 0))//G_TEST_TRAP_SILENCE_STDOUT | G_TEST_TRAP_SILENCE_STDERR))
{
GdkDisplayManager *manager;
-5
View File
@@ -260,8 +260,6 @@ gdk_wayland_display_dispose (GObject *object)
{
GdkWaylandDisplay *display_wayland = GDK_WAYLAND_DISPLAY (object);
_gdk_wayland_display_manager_remove_display (gdk_display_manager_get (),
GDK_DISPLAY (display_wayland));
g_list_foreach (display_wayland->input_devices,
(GFunc) g_object_run_dispose, NULL);
@@ -613,9 +611,6 @@ gdk_wayland_display_class_init (GdkWaylandDisplayClass * class)
static void
gdk_wayland_display_init (GdkWaylandDisplay *display)
{
_gdk_wayland_display_manager_add_display (gdk_display_manager_get (),
GDK_DISPLAY (display));
display->xkb_context = xkb_context_new (0);
}
-28
View File
@@ -101,31 +101,3 @@ gdk_wayland_display_manager_init (GdkWaylandDisplayManager *manager)
{
}
void
_gdk_wayland_display_manager_add_display (GdkDisplayManager *manager,
GdkDisplay *display)
{
GdkWaylandDisplayManager *manager_wayland = GDK_WAYLAND_DISPLAY_MANAGER (manager);
if (manager_wayland->displays == NULL)
gdk_display_manager_set_default_display (manager, display);
manager_wayland->displays = g_slist_prepend (manager_wayland->displays, display);
}
void
_gdk_wayland_display_manager_remove_display (GdkDisplayManager *manager,
GdkDisplay *display)
{
GdkWaylandDisplayManager *manager_wayland = GDK_WAYLAND_DISPLAY_MANAGER (manager);
manager_wayland->displays = g_slist_remove (manager_wayland->displays, display);
if (gdk_display_manager_get_default_display (manager) == display)
{
if (manager_wayland->displays)
gdk_display_manager_set_default_display (manager, manager_wayland->displays->data);
else
gdk_display_manager_set_default_display (manager, NULL);
}
}
+2 -5
View File
@@ -164,11 +164,8 @@ void _gdk_wayland_screen_add_output (GdkScreen *screen,
struct wl_output *output);
void _gdk_wayland_screen_remove_output (GdkScreen *screen,
guint32 id);
void _gdk_wayland_display_manager_add_display (GdkDisplayManager *manager,
GdkDisplay *display);
void _gdk_wayland_display_manager_remove_display (GdkDisplayManager *manager,
GdkDisplay *display);
int _gdk_wayland_screen_get_output_refresh_rate (GdkScreen *screen,
struct wl_output *output);
void _gdk_wayland_window_set_device_grabbed (GdkWindow *window,
GdkDevice *device,
+21 -1
View File
@@ -87,6 +87,7 @@ struct _GdkWaylandMonitor
int height_mm;
char * output_name;
char * manufacturer;
int refresh_rate;
};
G_DEFINE_TYPE (GdkWaylandScreen, _gdk_wayland_screen, GDK_TYPE_SCREEN)
@@ -130,7 +131,7 @@ gdk_wayland_screen_dispose (GObject *object)
GdkWaylandScreen *screen_wayland = GDK_WAYLAND_SCREEN (object);
if (screen_wayland->root_window)
_gdk_window_destroy (screen_wayland->root_window, TRUE);
_gdk_window_destroy (screen_wayland->root_window, FALSE);
G_OBJECT_CLASS (_gdk_wayland_screen_parent_class)->dispose (object);
}
@@ -917,6 +918,7 @@ output_handle_mode(void *data,
monitor->geometry.width = width;
monitor->geometry.height = height;
monitor->refresh_rate = refresh;
g_signal_emit_by_name (monitor->screen, "monitors-changed");
update_screen_size (monitor->screen);
@@ -965,3 +967,21 @@ _gdk_wayland_screen_remove_output (GdkScreen *screen,
}
}
}
int
_gdk_wayland_screen_get_output_refresh_rate (GdkScreen *screen,
struct wl_output *output)
{
GdkWaylandScreen *screen_wayland = GDK_WAYLAND_SCREEN (screen);
int i;
for (i = 0; i < screen_wayland->monitors->len; i++)
{
GdkWaylandMonitor *monitor = screen_wayland->monitors->pdata[i];
if (monitor->output == output)
return monitor->refresh_rate;
}
return 0;
}
+288 -85
View File
@@ -26,6 +26,7 @@
#include "gdkwindow.h"
#include "gdkwindowimpl.h"
#include "gdkdisplay-wayland.h"
#include "gdkframeclockprivate.h"
#include "gdkprivate-wayland.h"
#include "gdkinternals.h"
#include "gdkdeviceprivate.h"
@@ -95,6 +96,9 @@ struct _GdkWindowImplWayland
GdkCursor *cursor;
/* The wl_outputs that this window currently touches */
GSList *outputs;
struct wl_surface *surface;
struct wl_shell_surface *shell_surface;
unsigned int mapped : 1;
@@ -140,6 +144,9 @@ struct _GdkWindowImplWayland
} saved_fullscreen, saved_maximized;
gboolean use_custom_surface;
gboolean pending_commit;
gint64 pending_frame_counter;
};
struct _GdkWindowImplWaylandClass
@@ -256,6 +263,162 @@ get_default_title (void)
return title;
}
static void
fill_presentation_time_from_frame_time (GdkFrameTimings *timings,
guint32 frame_time)
{
/* The timestamp in a wayland frame is a msec time value that in some
* way reflects the time at which the server started drawing the frame.
* This is not useful from our perspective.
*
* However, for the DRM backend of Weston, on reasonably recent
* Linux, we know that the time is the
* clock_gettime(CLOCK_MONOTONIC) value at the vblank, and that
* backend starts drawing immediately after receiving the vblank
* notification. If we detect this, and make the assumption that the
* compositor will finish drawing before the next vblank, we can
* then determine the presentation time as the frame time we
* recieved plus one refresh interval.
*
* If a backend is using clock_gettime(CLOCK_MONOTONIC), but not
* picking values right at the vblank, then the presentation times
* we compute won't be accurate, but not really worse than then
* the alternative of not providing presentation times at all.
*
* The complexity here is dealing with the fact that we receive
* only the low 32 bits of the CLOCK_MONOTONIC value in milliseconds.
*/
gint64 now_monotonic = g_get_monotonic_time ();
gint64 now_monotonic_msec = now_monotonic / 1000;
uint32_t now_monotonic_low = (uint32_t)now_monotonic_msec;
if (frame_time - now_monotonic_low < 1000 ||
frame_time - now_monotonic_low > (uint32_t)-1000)
{
/* Timestamp we received is within one second of the current time.
*/
gint64 last_frame_time = now_monotonic + (gint64)1000 * (gint32)(frame_time - now_monotonic_low);
if ((gint32)now_monotonic_low < 0 && (gint32)frame_time > 0)
last_frame_time += (gint64)1000 * G_GINT64_CONSTANT(0x100000000);
else if ((gint32)now_monotonic_low > 0 && (gint32)frame_time < 0)
last_frame_time -= (gint64)1000 * G_GINT64_CONSTANT(0x100000000);
timings->presentation_time = last_frame_time + timings->refresh_interval;
}
}
static void
frame_callback (void *data,
struct wl_callback *callback,
uint32_t time)
{
GdkWindow *window = data;
GdkWindowImplWayland *impl = GDK_WINDOW_IMPL_WAYLAND (window->impl);
GdkWaylandDisplay *wayland_display = GDK_WAYLAND_DISPLAY (gdk_window_get_display (window));
GdkFrameClock *clock = gdk_window_get_frame_clock (window);
GdkFrameTimings *timings;
wl_callback_destroy (callback);
_gdk_frame_clock_thaw (clock);
timings = gdk_frame_clock_get_timings (clock, impl->pending_frame_counter);
impl->pending_frame_counter = 0;
if (timings == NULL)
return;
timings->refresh_interval = 16667; /* default to 1/60th of a second */
if (impl->outputs)
{
/* We pick a random output out of the outputs that the window touches
* The rate here is in milli-hertz */
int refresh_rate = _gdk_wayland_screen_get_output_refresh_rate (wayland_display->screen,
impl->outputs->data);
if (refresh_rate != 0)
timings->refresh_interval = G_GINT64_CONSTANT(1000000000) / refresh_rate;
}
fill_presentation_time_from_frame_time (timings, time);
timings->complete = TRUE;
#ifdef G_ENABLE_DEBUG
if ((_gdk_debug_flags & GDK_DEBUG_FRAMES) != 0)
_gdk_frame_clock_debug_print_timings (clock, timings);
#endif
}
static const struct wl_callback_listener listener = {
frame_callback
};
static void
on_frame_clock_before_paint (GdkFrameClock *clock,
GdkWindow *window)
{
GdkFrameTimings *timings = gdk_frame_clock_get_current_timings (clock);
gint64 presentation_time;
gint64 refresh_interval;
gdk_frame_clock_get_refresh_info (clock,
timings->frame_time,
&refresh_interval, &presentation_time);
if (presentation_time != 0)
{
/* Assume the algorithm used by the DRM backend of Weston - it
* starts drawing at the next vblank after receiving the commit
* for this frame, and presentation occurs at the vblank
* after that.
*/
timings->predicted_presentation_time = presentation_time + refresh_interval;
}
else
{
/* As above, but we don't actually know the phase of the vblank,
* so just assume that we're half way through a refresh cycle.
*/
timings->predicted_presentation_time = timings->frame_time + refresh_interval / 2 + refresh_interval;
}
}
static const cairo_user_data_key_t gdk_wayland_cairo_key;
typedef struct _GdkWaylandCairoSurfaceData {
gpointer buf;
size_t buf_length;
struct wl_shm_pool *pool;
struct wl_buffer *buffer;
GdkWaylandDisplay *display;
int32_t width, height;
gboolean busy;
} GdkWaylandCairoSurfaceData;
static void
on_frame_clock_after_paint (GdkFrameClock *clock,
GdkWindow *window)
{
GdkWindowImplWayland *impl = GDK_WINDOW_IMPL_WAYLAND (window->impl);
GdkWaylandCairoSurfaceData *data;
struct wl_callback *callback;
if (!impl->pending_commit)
return;
impl->pending_commit = FALSE;
impl->pending_frame_counter = gdk_frame_clock_get_frame_counter (clock);
callback = wl_surface_frame (impl->surface);
wl_callback_add_listener (callback, &listener, window);
_gdk_frame_clock_freeze (clock);
wl_surface_commit (impl->surface);
data = cairo_surface_get_user_data (impl->cairo_surface,
&gdk_wayland_cairo_key);
data->busy = TRUE;
}
void
_gdk_wayland_display_create_window_impl (GdkDisplay *display,
GdkWindow *window,
@@ -266,6 +429,7 @@ _gdk_wayland_display_create_window_impl (GdkDisplay *display,
gint attributes_mask)
{
GdkWindowImplWayland *impl;
GdkFrameClock *frame_clock;
const char *title;
impl = g_object_new (GDK_TYPE_WINDOW_IMPL_WAYLAND, NULL);
@@ -306,19 +470,15 @@ _gdk_wayland_display_create_window_impl (GdkDisplay *display,
if (attributes_mask & GDK_WA_TYPE_HINT)
gdk_window_set_type_hint (window, attributes->type_hint);
frame_clock = gdk_window_get_frame_clock (window);
g_signal_connect (frame_clock, "before-paint",
G_CALLBACK (on_frame_clock_before_paint), window);
g_signal_connect (frame_clock, "after-paint",
G_CALLBACK (on_frame_clock_after_paint), window);
}
static const cairo_user_data_key_t gdk_wayland_cairo_key;
typedef struct _GdkWaylandCairoSurfaceData {
gpointer buf;
size_t buf_length;
struct wl_shm_pool *pool;
struct wl_buffer *buffer;
GdkWaylandDisplay *display;
int32_t width, height;
} GdkWaylandCairoSurfaceData;
static void
gdk_wayland_window_attach_image (GdkWindow *window)
{
@@ -368,6 +528,7 @@ gdk_wayland_window_attach_image (GdkWindow *window)
/* Attach this new buffer to the surface */
wl_surface_attach (impl->surface, data->buffer, dx, dy);
impl->pending_commit = TRUE;
}
static void
@@ -433,6 +594,19 @@ _create_shm_pool (struct wl_shm *shm,
return pool;
}
static void
buffer_release_callback (void *_data, struct wl_buffer *wl_buffer)
{
GdkWaylandCairoSurfaceData *data = _data;
data->busy = FALSE;
}
static const struct wl_buffer_listener buffer_listener = {
buffer_release_callback
};
static cairo_surface_t *
gdk_wayland_create_cairo_surface (GdkWaylandDisplay *display,
int width, int height)
@@ -447,6 +621,7 @@ gdk_wayland_create_cairo_surface (GdkWaylandDisplay *display,
data->buffer = NULL;
data->width = width;
data->height = height;
data->busy = FALSE;
stride = width * 4;
@@ -458,6 +633,7 @@ gdk_wayland_create_cairo_surface (GdkWaylandDisplay *display,
data->buffer = wl_shm_pool_create_buffer (data->pool, 0,
width, height,
stride, WL_SHM_FORMAT_ARGB8888);
wl_buffer_add_listener (data->buffer, &buffer_listener, data);
surface = cairo_image_surface_create_for_data (data->buf,
CAIRO_FORMAT_ARGB32,
@@ -478,28 +654,34 @@ gdk_wayland_create_cairo_surface (GdkWaylandDisplay *display,
return surface;
}
/* On this first call this creates a double reference - the first reference
* is held by the GdkWindowImplWayland struct - since unlike other backends
* the Cairo surface is not just a cheap wrapper around some other backing.
* It is the buffer itself.
*/
static cairo_surface_t *
gdk_wayland_window_ref_cairo_surface (GdkWindow *window)
static void
gdk_wayland_window_ensure_cairo_surface (GdkWindow *window)
{
GdkWindowImplWayland *impl = GDK_WINDOW_IMPL_WAYLAND (window->impl);
GdkWaylandDisplay *display_wayland =
GDK_WAYLAND_DISPLAY (gdk_window_get_display (impl->wrapper));
if (GDK_WINDOW_DESTROYED (impl->wrapper))
return NULL;
if (!impl->cairo_surface)
{
GdkWaylandDisplay *display_wayland =
GDK_WAYLAND_DISPLAY (gdk_window_get_display (impl->wrapper));
impl->cairo_surface =
gdk_wayland_create_cairo_surface (display_wayland,
impl->wrapper->width,
impl->wrapper->height);
}
}
/* Unlike other backends the Cairo surface is not just a cheap wrapper
* around some other backing. It is the buffer itself.
*/
static cairo_surface_t *
gdk_wayland_window_ref_cairo_surface (GdkWindow *window)
{
GdkWindowImplWayland *impl = GDK_WINDOW_IMPL_WAYLAND (window->impl);
if (GDK_WINDOW_DESTROYED (impl->wrapper))
return NULL;
gdk_wayland_window_ensure_cairo_surface (window);
cairo_surface_reference (impl->cairo_surface);
@@ -507,6 +689,20 @@ gdk_wayland_window_ref_cairo_surface (GdkWindow *window)
}
static gboolean
gdk_window_impl_wayland_begin_paint_region (GdkWindow *window,
const cairo_region_t *region)
{
GdkWindowImplWayland *impl = GDK_WINDOW_IMPL_WAYLAND (window->impl);
GdkWaylandCairoSurfaceData *data;
gdk_wayland_window_ensure_cairo_surface (window);
data = cairo_surface_get_user_data (impl->cairo_surface,
&gdk_wayland_cairo_key);
return data->busy;
}
static void
gdk_window_impl_wayland_finalize (GObject *object)
{
@@ -518,8 +714,6 @@ gdk_window_impl_wayland_finalize (GObject *object)
if (impl->cursor)
g_object_unref (impl->cursor);
if (impl->server_surface)
cairo_surface_destroy (impl->server_surface);
G_OBJECT_CLASS (_gdk_window_impl_wayland_parent_class)->finalize (object);
}
@@ -638,6 +832,28 @@ gdk_wayland_window_map (GdkWindow *window)
}
}
static void
surface_enter (void *data,
struct wl_surface *wl_surface,
struct wl_output *output)
{
GdkWindow *window = GDK_WINDOW (data);
GdkWindowImplWayland *impl = GDK_WINDOW_IMPL_WAYLAND (window->impl);
impl->outputs = g_slist_prepend (impl->outputs, output);
}
static void
surface_leave (void *data,
struct wl_surface *wl_surface,
struct wl_output *output)
{
GdkWindow *window = GDK_WINDOW (data);
GdkWindowImplWayland *impl = GDK_WINDOW_IMPL_WAYLAND (window->impl);
impl->outputs = g_slist_remove (impl->outputs, output);
}
static void
shell_surface_handle_configure(void *data,
struct wl_shell_surface *shell_surface,
@@ -686,12 +902,30 @@ shell_surface_ping (void *data,
wl_shell_surface_pong(shell_surface, serial);
}
static const struct wl_surface_listener surface_listener = {
surface_enter,
surface_leave
};
static const struct wl_shell_surface_listener shell_surface_listener = {
shell_surface_ping,
shell_surface_handle_configure,
shell_surface_popup_done
};
static void
gdk_wayland_window_create_surface (GdkWindow *window)
{
GdkWindowImplWayland *impl = GDK_WINDOW_IMPL_WAYLAND (window->impl);
GdkWaylandDisplay *display_wayland = GDK_WAYLAND_DISPLAY (gdk_window_get_display (window));
impl->surface = wl_compositor_create_surface (display_wayland->compositor);
wl_surface_set_user_data(impl->surface, window);
wl_surface_add_listener(impl->surface,
&surface_listener, window);
}
static void
gdk_wayland_window_show (GdkWindow *window, gboolean already_mapped)
{
@@ -709,10 +943,7 @@ gdk_wayland_window_show (GdkWindow *window, gboolean already_mapped)
gdk_wayland_window_set_user_time (window, impl->user_time);
if (!impl->surface)
{
impl->surface = wl_compositor_create_surface(display_wayland->compositor);
wl_surface_set_user_data(impl->surface, window);
}
gdk_wayland_window_create_surface (window);
if (!impl->shell_surface &&
!impl->use_custom_surface &&
@@ -738,7 +969,8 @@ gdk_wayland_window_show (GdkWindow *window, gboolean already_mapped)
}
static void
gdk_wayland_window_hide (GdkWindow *window)
gdk_wayland_window_hide_surface (GdkWindow *window,
gboolean is_destroy)
{
GdkWindowImplWayland *impl = GDK_WINDOW_IMPL_WAYLAND (window->impl);
@@ -746,7 +978,7 @@ gdk_wayland_window_hide (GdkWindow *window)
{
if (impl->shell_surface)
wl_shell_surface_destroy(impl->shell_surface);
if (impl->use_custom_surface)
if (impl->use_custom_surface && !is_destroy)
{
wl_surface_attach (impl->surface, NULL, 0, 0);
wl_surface_commit (impl->surface);
@@ -755,21 +987,27 @@ gdk_wayland_window_hide (GdkWindow *window)
{
wl_surface_destroy(impl->surface);
impl->surface = NULL;
g_slist_free (impl->outputs);
impl->outputs = NULL;
}
impl->shell_surface = NULL;
cairo_surface_destroy(impl->server_surface);
impl->server_surface = NULL;
impl->mapped = FALSE;
}
}
static void
gdk_wayland_window_hide (GdkWindow *window)
{
gdk_wayland_window_hide_surface (window, FALSE);
_gdk_window_clear_update_area (window);
}
static void
gdk_window_wayland_withdraw (GdkWindow *window)
{
GdkWindowImplWayland *impl;
if (!window->destroyed)
{
if (GDK_WINDOW_IS_MAPPED (window))
@@ -777,26 +1015,7 @@ gdk_window_wayland_withdraw (GdkWindow *window)
g_assert (!GDK_WINDOW_IS_MAPPED (window));
impl = GDK_WINDOW_IMPL_WAYLAND (window->impl);
if (impl->surface)
{
if (impl->shell_surface)
wl_shell_surface_destroy(impl->shell_surface);
if (impl->use_custom_surface)
{
wl_surface_attach (impl->surface, NULL, 0, 0);
wl_surface_commit (impl->surface);
}
else if (impl->surface)
{
wl_surface_destroy(impl->surface);
impl->surface = NULL;
}
impl->shell_surface = NULL;
cairo_surface_destroy(impl->server_surface);
impl->server_surface = NULL;
impl->mapped = FALSE;
}
gdk_wayland_window_hide_surface (window, FALSE);
}
}
@@ -1009,15 +1228,6 @@ gdk_wayland_window_queue_antiexpose (GdkWindow *window,
return FALSE;
}
static void
gdk_wayland_window_translate (GdkWindow *window,
cairo_region_t *area,
gint dx,
gint dy)
{
_gdk_window_invalidate_for_expose (window, area);
}
static void
gdk_wayland_window_destroy (GdkWindow *window,
gboolean recursing,
@@ -1027,22 +1237,20 @@ gdk_wayland_window_destroy (GdkWindow *window,
g_return_if_fail (GDK_IS_WINDOW (window));
/* We don't have nested windows */
g_return_if_fail (!recursing);
/* Wayland windows can't be externally destroyed; we may possibly
* eventually want to use this path at display close-down */
g_return_if_fail (!foreign_destroy);
gdk_wayland_window_hide_surface (window, TRUE);
if (impl->cairo_surface)
{
cairo_surface_finish (impl->cairo_surface);
cairo_surface_set_user_data (impl->cairo_surface, &gdk_wayland_cairo_key,
NULL, NULL);
}
if (!recursing && !foreign_destroy)
{
if (impl->shell_surface)
wl_shell_surface_destroy(impl->shell_surface);
if (impl->surface)
wl_surface_destroy(impl->surface);
impl->shell_surface = NULL;
impl->surface = NULL;
}
}
static void
@@ -1623,8 +1831,10 @@ gdk_wayland_window_process_updates_recurse (GdkWindow *window,
gdk_wayland_window_map (window);
if (impl->cairo_surface)
gdk_wayland_window_attach_image (window);
gdk_wayland_window_ensure_cairo_surface (window);
gdk_wayland_window_attach_image (window);
_gdk_window_process_updates_recurse (window, region);
n = cairo_region_num_rectangles(region);
for (i = 0; i < n; i++)
@@ -1632,10 +1842,8 @@ gdk_wayland_window_process_updates_recurse (GdkWindow *window,
cairo_region_get_rectangle (region, i, &rect);
wl_surface_damage (impl->surface,
rect.x, rect.y, rect.width, rect.height);
wl_surface_commit(impl->surface);
impl->pending_commit = TRUE;
}
_gdk_window_process_updates_recurse (window, region);
}
static void
@@ -1726,12 +1934,12 @@ _gdk_window_impl_wayland_class_init (GdkWindowImplWaylandClass *klass)
impl_class->input_shape_combine_region = gdk_window_wayland_input_shape_combine_region;
impl_class->set_static_gravities = gdk_window_wayland_set_static_gravities;
impl_class->queue_antiexpose = gdk_wayland_window_queue_antiexpose;
impl_class->translate = gdk_wayland_window_translate;
impl_class->destroy = gdk_wayland_window_destroy;
impl_class->destroy_foreign = gdk_window_wayland_destroy_foreign;
impl_class->resize_cairo_surface = gdk_window_wayland_resize_cairo_surface;
impl_class->get_shape = gdk_wayland_window_get_shape;
impl_class->get_input_shape = gdk_wayland_window_get_input_shape;
impl_class->begin_paint_region = gdk_window_impl_wayland_begin_paint_region;
/* impl_class->beep */
impl_class->focus = gdk_wayland_window_focus;
@@ -1897,18 +2105,13 @@ void
gdk_wayland_window_set_use_custom_surface (GdkWindow *window)
{
GdkWindowImplWayland *impl;
GdkWaylandDisplay *display;
g_return_if_fail (GDK_IS_WAYLAND_WINDOW (window));
impl = GDK_WINDOW_IMPL_WAYLAND (window->impl);
if (!impl->surface)
{
display = GDK_WAYLAND_DISPLAY (gdk_window_get_display (window));
impl->surface = wl_compositor_create_surface (display->compositor);
wl_surface_set_user_data (impl->surface, window);
}
gdk_wayland_window_create_surface (window);
impl->use_custom_surface = TRUE;
}
-72
View File
@@ -3319,77 +3319,6 @@ _gdk_win32_window_queue_antiexpose (GdkWindow *window,
return FALSE;
}
/* Gets called from gdwindow.c(do_move_region_bits_on_impl)
* and got tested with testgtk::big_window. Given the previous,
* untested implementation this one looks much too simple ;)
*/
static void
_gdk_win32_window_translate (GdkWindow *window,
cairo_region_t *area, /* In impl window coords */
gint dx,
gint dy)
{
GdkWindowImplWin32 *impl = GDK_WINDOW_IMPL_WIN32 (window->impl);
HRGN hrgn, area_hrgn;
cairo_region_t *update_region;
HDC hdc;
int ret;
/* Note: This is the destination area, not the source, and
it has been moved by dx, dy from the source area */
area_hrgn = cairo_region_to_hrgn (area, 0, 0);
/* First we copy any outstanding invalid areas in the
source area to the new position in the destination area */
hrgn = CreateRectRgn (0, 0, 0, 0);
ret = GetUpdateRgn (GDK_WINDOW_HWND (window), hrgn, FALSE);
if (ret == ERROR)
WIN32_API_FAILED ("GetUpdateRgn");
else if (ret != NULLREGION)
{
/* Convert the source invalid region as it would be copied */
OffsetRgn (hrgn, dx, dy);
/* Keep what intersects the copy destination area */
ret = CombineRgn (hrgn, hrgn, area_hrgn, RGN_AND);
/* And invalidate it */
if (ret == ERROR)
WIN32_API_FAILED ("CombineRgn");
else if (ret != NULLREGION)
API_CALL (InvalidateRgn, (GDK_WINDOW_HWND (window), hrgn, TRUE));
}
/* Then we copy the bits, invalidating whatever is copied from
otherwise invisible areas */
hdc = _gdk_win32_impl_acquire_dc (impl);
/* Clip hdc to target region */
API_CALL (SelectClipRgn, (hdc, area_hrgn));
SetRectRgn (hrgn, 0, 0, 0, 0);
if (!ScrollDC (hdc, dx, dy, NULL, NULL, hrgn, NULL))
WIN32_GDI_FAILED ("ScrollDC");
else
{
update_region = _gdk_win32_hrgn_to_region (hrgn);
if (!cairo_region_is_empty (update_region))
_gdk_window_invalidate_for_expose (window, update_region);
cairo_region_destroy (update_region);
}
/* Unset hdc clip region */
API_CALL (SelectClipRgn, (hdc, NULL));
_gdk_win32_impl_release_dc (impl);
if (!DeleteObject (hrgn))
WIN32_GDI_FAILED ("DeleteObject");
if (!DeleteObject (area_hrgn))
WIN32_GDI_FAILED ("DeleteObject");
}
static void
gdk_win32_input_shape_combine_region (GdkWindow *window,
const cairo_region_t *shape_region,
@@ -3556,7 +3485,6 @@ gdk_window_impl_win32_class_init (GdkWindowImplWin32Class *klass)
impl_class->input_shape_combine_region = gdk_win32_input_shape_combine_region;
impl_class->set_static_gravities = gdk_win32_window_set_static_gravities;
impl_class->queue_antiexpose = _gdk_win32_window_queue_antiexpose;
impl_class->translate = _gdk_win32_window_translate;
impl_class->destroy = gdk_win32_window_destroy;
impl_class->destroy_foreign = gdk_win32_window_destroy_foreign;
impl_class->resize_cairo_surface = gdk_win32_window_resize_cairo_surface;
+2
View File
@@ -2824,4 +2824,6 @@ gdk_x11_display_class_init (GdkX11DisplayClass * class)
display_class->convert_selection = _gdk_x11_display_convert_selection;
display_class->text_property_to_utf8_list = _gdk_x11_display_text_property_to_utf8_list;
display_class->utf8_to_string_target = _gdk_x11_display_utf8_to_string_target;
_gdk_x11_windowing_init ();
}
-1
View File
@@ -75,7 +75,6 @@ g_initable_iface_init (GInitableIface *iface)
static void
gdk_x11_display_manager_init (GdkX11DisplayManager *manager)
{
_gdk_x11_windowing_init ();
}
static void
+6 -126
View File
@@ -28,26 +28,11 @@
typedef struct _GdkWindowQueueItem GdkWindowQueueItem;
typedef struct _GdkWindowParentPos GdkWindowParentPos;
typedef enum {
GDK_WINDOW_QUEUE_TRANSLATE,
GDK_WINDOW_QUEUE_ANTIEXPOSE
} GdkWindowQueueType;
struct _GdkWindowQueueItem
{
GdkWindow *window;
gulong serial;
GdkWindowQueueType type;
union {
struct {
cairo_region_t *area;
gint dx;
gint dy;
} translate;
struct {
cairo_region_t *area;
} antiexpose;
} u;
cairo_region_t *antiexpose_area;
};
void
@@ -140,14 +125,7 @@ queue_item_free (GdkWindowQueueItem *item)
(gpointer *)&(item->window));
}
if (item->type == GDK_WINDOW_QUEUE_ANTIEXPOSE)
cairo_region_destroy (item->u.antiexpose.area);
else
{
if (item->u.translate.area)
cairo_region_destroy (item->u.translate.area);
}
cairo_region_destroy (item->antiexpose_area);
g_free (item);
}
@@ -213,11 +191,8 @@ gdk_window_queue (GdkWindow *window,
GdkWindowQueueItem *item = tmp_list->data;
GList *next = tmp_list->next;
if (item->type == GDK_WINDOW_QUEUE_ANTIEXPOSE)
{
queue_delete_link (display_x11->translate_queue, tmp_list);
queue_item_free (item);
}
queue_delete_link (display_x11->translate_queue, tmp_list);
queue_item_free (item);
tmp_list = next;
}
@@ -232,86 +207,12 @@ gdk_window_queue (GdkWindow *window,
g_queue_push_tail (display_x11->translate_queue, item);
}
static GC
_get_scratch_gc (GdkWindow *window, cairo_region_t *clip_region)
{
GdkX11Screen *screen;
XRectangle *rectangles;
gint n_rects;
gint depth;
screen = GDK_X11_SCREEN (gdk_window_get_screen (window));
depth = gdk_visual_get_depth (gdk_window_get_visual (window)) - 1;
if (!screen->subwindow_gcs[depth])
{
XGCValues values;
values.graphics_exposures = True;
values.subwindow_mode = IncludeInferiors;
screen->subwindow_gcs[depth] = XCreateGC (screen->xdisplay,
GDK_WINDOW_XID (window),
GCSubwindowMode | GCGraphicsExposures,
&values);
}
_gdk_x11_region_get_xrectangles (clip_region,
0, 0,
&rectangles,
&n_rects);
XSetClipRectangles (screen->xdisplay,
screen->subwindow_gcs[depth],
0, 0,
rectangles, n_rects,
YXBanded);
g_free (rectangles);
return screen->subwindow_gcs[depth];
}
void
_gdk_x11_window_translate (GdkWindow *window,
cairo_region_t *area,
gint dx,
gint dy)
{
GdkWindowQueueItem *item;
GC xgc;
GdkRectangle extents;
cairo_region_get_extents (area, &extents);
xgc = _get_scratch_gc (window, area);
cairo_region_translate (area, -dx, -dy); /* Move to source region */
item = g_new (GdkWindowQueueItem, 1);
item->type = GDK_WINDOW_QUEUE_TRANSLATE;
item->u.translate.area = cairo_region_copy (area);
item->u.translate.dx = dx;
item->u.translate.dy = dy;
gdk_window_queue (window, item);
XCopyArea (GDK_WINDOW_XDISPLAY (window),
GDK_WINDOW_XID (window),
GDK_WINDOW_XID (window),
xgc,
extents.x - dx, extents.y - dy,
extents.width, extents.height,
extents.x, extents.y);
}
gboolean
_gdk_x11_window_queue_antiexpose (GdkWindow *window,
cairo_region_t *area)
{
GdkWindowQueueItem *item = g_new (GdkWindowQueueItem, 1);
item->type = GDK_WINDOW_QUEUE_ANTIEXPOSE;
item->u.antiexpose.area = area;
item->antiexpose_area = area;
gdk_window_queue (window, item);
@@ -339,28 +240,7 @@ _gdk_x11_window_process_expose (GdkWindow *window,
if (serial - item->serial > (gulong) G_MAXLONG)
{
if (item->window == window)
{
if (item->type == GDK_WINDOW_QUEUE_TRANSLATE)
{
if (item->u.translate.area)
{
cairo_region_t *intersection;
intersection = cairo_region_copy (invalidate_region);
cairo_region_intersect (intersection, item->u.translate.area);
cairo_region_subtract (invalidate_region, intersection);
cairo_region_translate (intersection, item->u.translate.dx, item->u.translate.dy);
cairo_region_union (invalidate_region, intersection);
cairo_region_destroy (intersection);
}
else
cairo_region_translate (invalidate_region, item->u.translate.dx, item->u.translate.dy);
}
else /* anti-expose */
{
cairo_region_subtract (invalidate_region, item->u.antiexpose.area);
}
}
cairo_region_subtract (invalidate_region, item->antiexpose_area);
}
else
{
-1
View File
@@ -5334,7 +5334,6 @@ gdk_window_impl_x11_class_init (GdkWindowImplX11Class *klass)
impl_class->input_shape_combine_region = gdk_window_x11_input_shape_combine_region;
impl_class->set_static_gravities = gdk_window_x11_set_static_gravities;
impl_class->queue_antiexpose = _gdk_x11_window_queue_antiexpose;
impl_class->translate = _gdk_x11_window_translate;
impl_class->destroy = gdk_x11_window_destroy;
impl_class->destroy_foreign = gdk_x11_window_destroy_foreign;
impl_class->resize_cairo_surface = gdk_window_x11_resize_cairo_surface;
+7 -5
View File
@@ -295,7 +295,6 @@ gtk_public_h_sources = \
gtkpagesetup.h \
gtkpaned.h \
gtkpapersize.h \
gtkpathbar.h \
gtkplacessidebar.h \
gtkplug.h \
gtkprintcontext.h \
@@ -515,10 +514,12 @@ gtk_private_h_sources = \
gtknumerableiconprivate.h \
gtkorientableprivate.h \
gtkpango.h \
gtkpathbar.h \
gtkpressandholdprivate.h \
gtkprintoperation-private.h \
gtkprintutils.h \
gtkprivate.h \
gtkpixelcacheprivate.h \
gtkquery.h \
gtkrbtree.h \
gtkrecentchooserdefault.h \
@@ -800,6 +801,7 @@ gtk_base_c_sources = \
gtkprivate.c \
gtkprivatetypebuiltins.c \
gtkprogressbar.c \
gtkpixelcache.c \
gtkradioaction.c \
gtkradiobutton.c \
gtkradiomenuitem.c \
@@ -1356,7 +1358,9 @@ endif
#
# Installed tools
#
bin_PROGRAMS = gtk-query-immodules-3.0
bin_PROGRAMS = \
gtk-query-immodules-3.0 \
gtk-launch
if BUILD_ICON_CACHE
bin_PROGRAMS += gtk-update-icon-cache
@@ -1403,11 +1407,8 @@ gtk_update_icon_cache_LDADD = $(GDK_PIXBUF_LIBS)
gtk_update_icon_cache_SOURCES = updateiconcache.c
endif
if HAVE_GIO_UNIX
bin_PROGRAMS += gtk-launch
gtk_launch_LDADD = $(LDADDS)
gtk_launch_SOURCES = gtk-launch.c
endif
noinst_PROGRAMS = extract-strings
@@ -1737,6 +1738,7 @@ endif
EXTRA_DIST += \
$(STOCK_ICONS) \
$(COMPOSITE_TEMPLATES) \
$(DND_CURSORS) \
$(GENERATED_ICONS) \
gtk.def \
+1 -107
View File
@@ -29,11 +29,9 @@ struct _GtkComboBoxAccessiblePrivate
};
static void atk_action_interface_init (AtkActionIface *iface);
static void atk_selection_interface_init (AtkSelectionIface *iface);
G_DEFINE_TYPE_WITH_CODE (GtkComboBoxAccessible, gtk_combo_box_accessible, GTK_TYPE_CONTAINER_ACCESSIBLE,
G_IMPLEMENT_INTERFACE (ATK_TYPE_ACTION, atk_action_interface_init)
G_IMPLEMENT_INTERFACE (ATK_TYPE_SELECTION, atk_selection_interface_init))
G_IMPLEMENT_INTERFACE (ATK_TYPE_ACTION, atk_action_interface_init))
static void
changed_cb (GtkWidget *widget)
@@ -52,7 +50,6 @@ changed_cb (GtkWidget *widget)
{
accessible->priv->old_selection = index;
g_object_notify (G_OBJECT (obj), "accessible-name");
g_signal_emit_by_name (obj, "selection-changed");
}
}
@@ -333,106 +330,3 @@ atk_action_interface_init (AtkActionIface *iface)
iface->get_localized_name = gtk_combo_box_accessible_action_get_localized_name;
iface->get_description = gtk_combo_box_accessible_action_get_description;
}
static gboolean
gtk_combo_box_accessible_add_selection (AtkSelection *selection,
gint i)
{
GtkWidget *widget;
widget = gtk_accessible_get_widget (GTK_ACCESSIBLE (selection));
if (widget == NULL)
return FALSE;
gtk_combo_box_set_active (GTK_COMBO_BOX (widget), i);
return TRUE;
}
static gboolean
gtk_combo_box_accessible_clear_selection (AtkSelection *selection)
{
GtkWidget *widget;
widget = gtk_accessible_get_widget (GTK_ACCESSIBLE (selection));
if (widget == NULL)
return FALSE;
gtk_combo_box_set_active (GTK_COMBO_BOX (widget), -1);
return TRUE;
}
static AtkObject *
gtk_combo_box_accessible_ref_selection (AtkSelection *selection,
gint i)
{
GtkComboBox *combo_box;
GtkWidget *widget;
AtkObject *obj;
gint index;
widget = gtk_accessible_get_widget (GTK_ACCESSIBLE (selection));
if (widget == NULL)
return NULL;
if (i != 0)
return NULL;
combo_box = GTK_COMBO_BOX (widget);
obj = gtk_combo_box_get_popup_accessible (combo_box);
index = gtk_combo_box_get_active (combo_box);
return atk_object_ref_accessible_child (obj, index);
}
static gint
gtk_combo_box_accessible_get_selection_count (AtkSelection *selection)
{
GtkWidget *widget;
widget = gtk_accessible_get_widget (GTK_ACCESSIBLE (selection));
if (widget == NULL)
return 0;
return (gtk_combo_box_get_active (GTK_COMBO_BOX (widget)) == -1) ? 0 : 1;
}
static gboolean
gtk_combo_box_accessible_is_child_selected (AtkSelection *selection,
gint i)
{
GtkWidget *widget;
gint j;
widget = gtk_accessible_get_widget (GTK_ACCESSIBLE (selection));
if (widget == NULL)
return FALSE;
j = gtk_combo_box_get_active (GTK_COMBO_BOX (widget));
return (j == i);
}
static gboolean
gtk_combo_box_accessible_remove_selection (AtkSelection *selection,
gint i)
{
if (atk_selection_is_child_selected (selection, i))
atk_selection_clear_selection (selection);
return TRUE;
}
static void
atk_selection_interface_init (AtkSelectionIface *iface)
{
iface->add_selection = gtk_combo_box_accessible_add_selection;
iface->clear_selection = gtk_combo_box_accessible_clear_selection;
iface->ref_selection = gtk_combo_box_accessible_ref_selection;
iface->get_selection_count = gtk_combo_box_accessible_get_selection_count;
iface->is_child_selected = gtk_combo_box_accessible_is_child_selected;
iface->remove_selection = gtk_combo_box_accessible_remove_selection;
}
-1
View File
@@ -145,7 +145,6 @@
#include <gtk/gtkpagesetup.h>
#include <gtk/gtkpapersize.h>
#include <gtk/gtkpaned.h>
#include <gtk/gtkpathbar.h>
#include <gtk/gtkplacessidebar.h>
#include <gtk/gtkprintcontext.h>
#include <gtk/gtkprintoperation.h>
+4
View File
@@ -1907,6 +1907,7 @@ gtk_places_sidebar_add_shortcut
gtk_places_sidebar_get_location
gtk_places_sidebar_get_nth_bookmark
gtk_places_sidebar_get_open_flags
gtk_places_sidebar_get_show_connect_to_server
gtk_places_sidebar_get_show_desktop
gtk_places_sidebar_get_type
gtk_places_sidebar_list_shortcuts
@@ -1914,6 +1915,7 @@ gtk_places_sidebar_new
gtk_places_sidebar_remove_shortcut
gtk_places_sidebar_set_location
gtk_places_sidebar_set_open_flags
gtk_places_sidebar_set_show_connect_to_server
gtk_places_sidebar_set_show_desktop
#ifdef G_OS_UNIX
gtk_plug_construct
@@ -2445,6 +2447,7 @@ gtk_requisition_new
gtk_resize_mode_get_type
gtk_response_type_get_type
gtk_revealer_new
gtk_revealer_get_type
gtk_revealer_get_reveal_child
gtk_revealer_set_reveal_child
gtk_revealer_get_child_revealed
@@ -2452,6 +2455,7 @@ gtk_revealer_get_transition_duration
gtk_revealer_set_transition_duration
gtk_revealer_get_transition_type
gtk_revealer_set_transition_type
gtk_revealer_transition_type_get_type
gtk_rgb_to_hsv
gtk_scale_accessible_get_type
gtk_scale_add_mark
+1 -4
View File
@@ -791,10 +791,7 @@ gtk_box_compute_expand (GtkWidget *widget,
gboolean opposite_expand;
GtkOrientation opposite_orientation;
if (private->orientation == GTK_ORIENTATION_HORIZONTAL)
opposite_orientation = GTK_ORIENTATION_VERTICAL;
else
opposite_orientation = GTK_ORIENTATION_HORIZONTAL;
opposite_orientation = OPPOSITE_ORIENTATION (private->orientation);
our_expand = FALSE;
opposite_expand = FALSE;
+6 -7
View File
@@ -1015,19 +1015,19 @@ start_element (GMarkupParseContext *context,
element_name);
}
gchar *
const gchar *
_gtk_builder_parser_translate (const gchar *domain,
const gchar *context,
const gchar *text)
{
const char *s;
const gchar *s;
if (context)
s = g_dpgettext2 (domain, context, text);
else
s = g_dgettext (domain, text);
return g_strdup (s);
return s;
}
/* Called for close tags </foo> */
@@ -1128,15 +1128,14 @@ end_element (GMarkupParseContext *context,
if (prop_info->translatable && prop_info->text->len)
{
prop_info->data = _gtk_builder_parser_translate (data->domain,
prop_info->context,
prop_info->text->str);
prop_info->data = g_strdup (_gtk_builder_parser_translate (data->domain,
prop_info->context,
prop_info->text->str));
g_string_free (prop_info->text, TRUE);
}
else
{
prop_info->data = g_string_free (prop_info->text, FALSE);
}
object_info->properties =
+3 -3
View File
@@ -148,9 +148,9 @@ gboolean _gtk_builder_flags_from_string (GType type,
const char *string,
guint *value,
GError **error);
gchar * _gtk_builder_parser_translate (const gchar *domain,
const gchar *context,
const gchar *text);
const gchar * _gtk_builder_parser_translate (const gchar *domain,
const gchar *context,
const gchar *text);
gchar * _gtk_builder_get_resource_path (GtkBuilder *builder,
const gchar *string);
gchar * _gtk_builder_get_absolute_filename (GtkBuilder *builder,
+62 -81
View File
@@ -53,6 +53,7 @@
#include "gtkactivatable.h"
#include "gtksizerequest.h"
#include "gtktypebuiltins.h"
#include "gtkwidgetprivate.h"
#include "gtkprivate.h"
#include "gtkintl.h"
#include "a11y/gtkbuttonaccessible.h"
@@ -1596,30 +1597,48 @@ gtk_button_get_props (GtkButton *button,
gtk_style_context_get_border (context, state, border);
}
/* Computes the size of the border around the button's child
* including all CSS and style properties so it can be used
* during size allocation and size request phases. */
static void
gtk_button_size_allocate (GtkWidget *widget,
GtkAllocation *allocation)
gtk_button_get_full_border (GtkButton *button,
GtkBorder *full_border)
{
GtkButton *button = GTK_BUTTON (widget);
GtkButtonPrivate *priv = button->priv;
GtkAllocation child_allocation;
GtkWidget *widget = GTK_WIDGET (button);
GtkStyleContext *context;
GtkWidget *child;
GtkBorder default_border;
GtkBorder padding;
GtkBorder border;
gint focus_width;
gint focus_pad;
gint baseline;
GtkBorder default_border, padding, border;
int focus_width, focus_pad;
context = gtk_widget_get_style_context (widget);
gtk_button_get_props (button, &default_border, NULL,
&padding, &border, NULL);
gtk_style_context_get_style (context,
"focus-line-width", &focus_width,
"focus-padding", &focus_pad,
NULL);
"focus-line-width", &focus_width,
"focus-padding", &focus_pad,
NULL);
full_border->left = padding.left + border.left + focus_width + focus_pad;
full_border->right = padding.right + border.right + focus_width + focus_pad;
full_border->top = padding.top + border.top + focus_width + focus_pad;
full_border->bottom = padding.bottom + border.bottom + focus_width + focus_pad;
if (gtk_widget_get_can_default (GTK_WIDGET (button)))
{
full_border->left += default_border.left;
full_border->right += default_border.right;
full_border->top += default_border.top;
full_border->bottom += default_border.bottom;
}
}
static void
gtk_button_size_allocate (GtkWidget *widget,
GtkAllocation *allocation)
{
GtkButton *button = GTK_BUTTON (widget);
GtkButtonPrivate *priv = button->priv;
GtkWidget *child;
gtk_widget_set_allocation (widget, allocation);
@@ -1633,50 +1652,34 @@ gtk_button_size_allocate (GtkWidget *widget,
child = gtk_bin_get_child (GTK_BIN (button));
if (child && gtk_widget_get_visible (child))
{
child_allocation.x = allocation->x + padding.left + border.left;
child_allocation.y = allocation->y + padding.top + border.top;
GtkAllocation child_allocation;
GtkBorder border;
gint baseline;
child_allocation.width =
allocation->width -
(padding.left + padding.right) -
(border.left + border.right);
gtk_button_get_full_border (button, &border);
child_allocation.height =
allocation->height -
(padding.top + padding.bottom) -
(border.top + border.bottom);
if (gtk_widget_get_can_default (GTK_WIDGET (button)))
{
child_allocation.x += default_border.left;
child_allocation.y += default_border.top;
child_allocation.width = child_allocation.width - default_border.left - default_border.right;
child_allocation.height = child_allocation.height - default_border.top - default_border.bottom;
}
if (gtk_widget_get_can_focus (GTK_WIDGET (button)))
{
child_allocation.x += focus_width + focus_pad;
child_allocation.y += focus_width + focus_pad;
child_allocation.width = child_allocation.width - (focus_width + focus_pad) * 2;
child_allocation.height = child_allocation.height - (focus_width + focus_pad) * 2;
}
child_allocation.x = allocation->x + border.left;
child_allocation.y = allocation->y + border.top;
child_allocation.width = allocation->width - border.left - border.right;
child_allocation.height = allocation->height - border.top - border.bottom;
baseline = gtk_widget_get_allocated_baseline (widget);
if (baseline != -1)
baseline -= child_allocation.y - allocation->y;
baseline -= border.top;
if (priv->depressed)
{
gint child_displacement_x;
gint child_displacement_y;
gtk_style_context_get_style (context,
gtk_style_context_get_style (gtk_widget_get_style_context (GTK_WIDGET (button)),
"child-displacement-x", &child_displacement_x,
"child-displacement-y", &child_displacement_y,
NULL);
child_allocation.x += child_displacement_x;
child_allocation.y += child_displacement_y;
if (baseline != -1)
baseline -= child_displacement_y;
}
child_allocation.width = MAX (1, child_allocation.width);
@@ -2100,67 +2103,45 @@ gtk_button_get_size (GtkWidget *widget,
gint *natural_baseline)
{
GtkButton *button = GTK_BUTTON (widget);
GtkStyleContext *context;
GtkWidget *child;
GtkBorder default_border;
GtkBorder padding;
GtkBorder border;
gint focus_width;
gint focus_pad;
gint minimum, natural;
gint top_offset;
context = gtk_widget_get_style_context (widget);
gtk_button_get_props (button, &default_border, NULL,
&padding, &border, NULL);
gtk_style_context_get_style (context,
"focus-line-width", &focus_width,
"focus-padding", &focus_pad,
NULL);
top_offset = 0;
gtk_button_get_full_border (button, &border);
if (orientation == GTK_ORIENTATION_HORIZONTAL)
{
minimum = padding.left + padding.right +
border.left + border.right;
minimum = border.left + border.right;
natural = minimum;
if (gtk_widget_get_can_default (GTK_WIDGET (widget)))
minimum += default_border.left + default_border.right;
if (for_size >= 0)
for_size -= border.top + border.bottom;
}
else
{
minimum = padding.top + padding.bottom +
border.top + border.bottom;
minimum = border.top + border.bottom;
natural = minimum;
top_offset = padding.top + border.top + focus_width + focus_pad;
if (gtk_widget_get_can_default (GTK_WIDGET (widget)))
{
minimum += default_border.top + default_border.bottom;
top_offset += default_border.top;
}
if (for_size >= 0)
for_size -= border.left + border.right;
}
minimum += 2 * (focus_width + focus_pad);
natural = minimum;
if ((child = gtk_bin_get_child (GTK_BIN (button))) &&
gtk_widget_get_visible (child))
{
gint child_min, child_nat;
gint child_min_baseline = -1, child_nat_baseline = -1;
if (orientation == GTK_ORIENTATION_HORIZONTAL)
gtk_widget_get_preferred_width (child, &child_min, &child_nat);
else
gtk_widget_get_preferred_height_and_baseline_for_width (child, -1, &child_min, &child_nat, &child_min_baseline, &child_nat_baseline);
_gtk_widget_get_preferred_size_for_size (child,
orientation,
for_size,
&child_min, &child_nat,
&child_min_baseline, &child_nat_baseline);
if (minimum_baseline && child_min_baseline >= 0)
*minimum_baseline = child_min_baseline + top_offset;
*minimum_baseline = child_min_baseline + border.top;
if (natural_baseline && child_nat_baseline >= 0)
*natural_baseline = child_nat_baseline + top_offset;
*natural_baseline = child_nat_baseline + border.top;
minimum += child_min;
natural += child_nat;
-4
View File
@@ -239,10 +239,6 @@ G_DEFINE_TYPE_WITH_CODE (GtkCellAreaBox, gtk_cell_area_box, GTK_TYPE_CELL_AREA,
gtk_cell_area_box_cell_layout_init)
G_IMPLEMENT_INTERFACE (GTK_TYPE_ORIENTABLE, NULL));
#define OPPOSITE_ORIENTATION(orientation) \
((orientation) == GTK_ORIENTATION_HORIZONTAL ? \
GTK_ORIENTATION_VERTICAL : GTK_ORIENTATION_HORIZONTAL)
static void
gtk_cell_area_box_init (GtkCellAreaBox *box)
{
+1 -1
View File
@@ -812,7 +812,7 @@ cell_packing_end_element (GMarkupParseContext *context,
/* translate the string */
if (parser_data->string->len && parser_data->translatable)
{
gchar *translated;
const gchar *translated;
const gchar* domain;
domain = gtk_builder_get_translation_domain (parser_data->builder);
+1 -1
View File
@@ -234,7 +234,7 @@ item_end_element (GMarkupParseContext *context,
{
if (data->translatable)
{
gchar *translated;
const gchar *translated;
/* FIXME: This will not use the domain set in the .ui file,
* since the parser is not telling the builder about the domain.
+23 -10
View File
@@ -664,8 +664,8 @@ attributes_end_element (GMarkupParseContext *context,
/* translate the string */
if (parser_data->string->len && parser_data->translatable)
{
gchar *translated;
const gchar* domain;
const gchar *translated;
const gchar *domain;
domain = gtk_builder_get_translation_domain (parser_data->builder);
@@ -3365,7 +3365,7 @@ gtk_container_propagate_draw (GtkContainer *container,
{
GdkEventExpose *event;
GtkAllocation allocation;
GdkWindow *window, *w;
GdkWindow *window, *w, *event_window, *child_in_window;
int x, y;
g_return_if_fail (GTK_IS_CONTAINER (container));
@@ -3374,13 +3374,26 @@ gtk_container_propagate_draw (GtkContainer *container,
g_assert (gtk_widget_get_parent (child) == GTK_WIDGET (container));
if (!gtk_widget_is_drawable (child))
return;
/* Only propagate to native child window if we're not handling
an expose (i.e. in a pure gtk_widget_draw() call */
event = _gtk_cairo_get_event (cr);
if (event)
{
if (gtk_widget_get_has_window (child) ||
gtk_widget_get_window (child) != event->window)
return;
}
if (event &&
(gtk_widget_get_has_window (child) &&
gdk_window_has_native (gtk_widget_get_window (child))))
return;
/* Never propagate to a child window when exposing a window
that is not the one the child widget is in. */
event_window = _gtk_cairo_get_event_window (cr);
if (gtk_widget_get_has_window (child))
child_in_window = gdk_window_get_parent (gtk_widget_get_window (child));
else
child_in_window = gtk_widget_get_window (child);
if (event_window != NULL && child_in_window != event_window)
return;
cairo_save (cr);
@@ -3422,7 +3435,7 @@ gtk_container_propagate_draw (GtkContainer *container,
cairo_translate (cr, x, y);
_gtk_widget_draw_internal (child, cr, TRUE);
_gtk_widget_draw (child, cr);
cairo_restore (cr);
}
+2 -1
View File
@@ -48,7 +48,8 @@ typedef enum {
GTK_DEBUG_BUILDER = 1 << 11,
GTK_DEBUG_SIZE_REQUEST = 1 << 12,
GTK_DEBUG_NO_CSS_CACHE = 1 << 13,
GTK_DEBUG_BASELINES = 1 << 14
GTK_DEBUG_BASELINES = 1 << 14,
GTK_DEBUG_PIXEL_CACHE = 1 << 15
} GtkDebugFlag;
#ifdef G_ENABLE_DEBUG
+13 -13
View File
@@ -504,11 +504,11 @@ static void list_row_activated (GtkTreeView *tree_view,
GtkTreeViewColumn *column,
GtkFileChooserDefault *impl);
static void path_bar_open_location_cb (GtkPathBar *path_bar,
GFile *file,
GFile *child,
gboolean child_is_hidden,
GtkFileChooserDefault *impl);
static void path_bar_clicked (GtkPathBar *path_bar,
GFile *file,
GFile *child,
gboolean child_is_hidden,
GtkFileChooserDefault *impl);
static void update_cell_renderer_attributes (GtkFileChooserDefault *impl);
@@ -2522,7 +2522,7 @@ put_recent_folder_in_pathbar (GtkFileChooserDefault *impl, GtkTreeIter *iter)
gtk_tree_model_get (GTK_TREE_MODEL (priv->recent_model), iter,
MODEL_COL_FILE, &file,
-1);
gtk_path_bar_set_location (GTK_PATH_BAR (priv->browse_path_bar), file, FALSE);
_gtk_path_bar_set_file (GTK_PATH_BAR (priv->browse_path_bar), file, FALSE);
g_object_unref (file);
}
@@ -4615,7 +4615,7 @@ update_current_folder_get_info_cb (GCancellable *cancellable,
if (! _gtk_file_info_consider_as_directory (info))
goto out;
gtk_path_bar_set_location (GTK_PATH_BAR (priv->browse_path_bar), data->file, data->keep_trail);
_gtk_path_bar_set_file (GTK_PATH_BAR (priv->browse_path_bar), data->file, data->keep_trail);
if (priv->current_folder != data->file)
{
@@ -7014,11 +7014,11 @@ list_row_activated (GtkTreeView *tree_view,
}
static void
path_bar_open_location_cb (GtkPathBar *path_bar,
GFile *file,
GFile *child_file,
gboolean child_is_hidden,
GtkFileChooserDefault *impl)
path_bar_clicked (GtkPathBar *path_bar,
GFile *file,
GFile *child_file,
gboolean child_is_hidden,
GtkFileChooserDefault *impl)
{
if (child_file)
pending_select_files_add (impl, child_file);
@@ -7507,7 +7507,7 @@ _gtk_file_chooser_default_class_init (GtkFileChooserDefaultClass *class)
gtk_widget_class_bind_callback (widget_class, filter_combo_changed);
gtk_widget_class_bind_callback (widget_class, location_button_toggled_cb);
gtk_widget_class_bind_callback (widget_class, new_folder_button_clicked);
gtk_widget_class_bind_callback (widget_class, path_bar_open_location_cb);
gtk_widget_class_bind_callback (widget_class, path_bar_clicked);
gtk_widget_class_bind_callback (widget_class, places_sidebar_open_location_cb);
gtk_widget_class_bind_callback (widget_class, places_sidebar_show_error_message_cb);
}
+2 -2
View File
@@ -79,7 +79,7 @@
<object class="GtkPathBar" id="browse_path_bar">
<property name="visible">True</property>
<property name="can_focus">False</property>
<signal name="open-location" handler="path_bar_open_location_cb" after="yes" swapped="no"/>
<signal name="path-clicked" handler="path_bar_clicked" after="yes" swapped="no"/>
</object>
<packing>
<property name="expand">True</property>
@@ -290,7 +290,7 @@
<child>
<object class="GtkTreeViewColumn" id="list_mtime_column">
<property name="resizable">True</property>
<property name="title" translatable="yes">Modifed</property>
<property name="title" translatable="yes">Modified</property>
<child>
<object class="GtkCellRendererText" id="list_mtime_renderer"/>
</child>
+2 -14
View File
@@ -617,18 +617,8 @@ gtk_grid_request_init (GtkGridRequest *request,
child = list->data;
attach = &child->attach[orientation];
if (attach->span != 1)
continue;
if (gtk_widget_compute_expand (child->widget, orientation))
if (attach->span == 1 && gtk_widget_compute_expand (child->widget, orientation))
lines->lines[attach->pos - lines->min].expand = TRUE;
lines->lines[attach->pos - lines->min].empty = FALSE;
}
for (i = 0; i < lines->max - lines->min; i++)
{
if (lines->lines[i].empty)
lines->lines[i].expand = TRUE;
}
}
@@ -1037,8 +1027,6 @@ gtk_grid_request_compute_expand (GtkGridRequest *request,
if (attach->pos + i >= max || attach->pos + 1 < min)
continue;
if (line->empty)
line->expand = TRUE;
line->empty = FALSE;
}
@@ -2552,7 +2540,7 @@ gtk_grid_set_baseline_row (GtkGrid *grid,
}
/**
* gtk_grid_set_baseline_row:
* gtk_grid_get_baseline_row:
* @grid: a #GtkGrid
*
* Returns which row defines the global baseline of @grid.
+2
View File
@@ -1417,6 +1417,8 @@ gtk_image_get_baseline_align (GtkImage *image)
image->priv->baseline_align =
(float)pango_font_metrics_get_ascent (metrics) /
(pango_font_metrics_get_ascent (metrics) + pango_font_metrics_get_descent (metrics));
pango_font_metrics_unref (metrics);
}
return image->priv->baseline_align;
+3 -3
View File
@@ -2555,9 +2555,9 @@ list_store_text (GMarkupParseContext *context,
* since the parser is not telling the builder about the domain.
* However, it will work for gtk_builder_set_translation_domain() calls.
*/
translated = _gtk_builder_parser_translate (data->domain,
info->context,
string);
translated = g_strdup (_gtk_builder_parser_translate (data->domain,
info->context,
string));
g_free (string);
string = translated;
}
+13 -4
View File
@@ -172,7 +172,8 @@ static const GDebugKey gtk_debug_keys[] = {
{"builder", GTK_DEBUG_BUILDER},
{"size-request", GTK_DEBUG_SIZE_REQUEST},
{"no-css-cache", GTK_DEBUG_NO_CSS_CACHE},
{"baselines", GTK_DEBUG_BASELINES}
{"baselines", GTK_DEBUG_BASELINES},
{"pixel-cache", GTK_DEBUG_PIXEL_CACHE}
};
#endif /* G_ENABLE_DEBUG */
@@ -1615,9 +1616,17 @@ gtk_main_do_event (GdkEvent *event)
case GDK_EXPOSE:
if (event->any.window && gtk_widget_get_double_buffered (event_widget))
{
gdk_window_begin_paint_region (event->any.window, event->expose.region);
gtk_widget_send_expose (event_widget, event);
gdk_window_end_paint (event->any.window);
/* We handle exposes only on native windows, relying on the
* draw() handler to propagate down to non-native windows.
* This is ok now that we child windows always are considered
* (semi)transparent.
*/
if (gdk_window_has_native (event->expose.window))
{
gdk_window_begin_paint_region (event->any.window, event->expose.region);
gtk_widget_send_expose (event_widget, event);
gdk_window_end_paint (event->any.window);
}
}
else
{
+1 -1
View File
@@ -356,7 +356,7 @@ gtk_menu_bar_size_request (GtkWidget *widget,
if (gtk_widget_get_visible (child))
{
_gtk_widget_get_preferred_size_for_size (child, orientation, size, &child_minimum, &child_natural);
_gtk_widget_get_preferred_size_for_size (child, orientation, size, &child_minimum, &child_natural, NULL, NULL);
if (use_toggle_size)
{
+1 -1
View File
@@ -1378,7 +1378,7 @@ gtk_menu_item_activate (GtkMenuItem *menu_item)
/**
* gtk_menu_item_toggle_size_request:
* @menu_item: the menu item
* @requisition: the requisition to use as signal data.
* @requisition: (inout): the requisition to use as signal data.
*
* Emits the #GtkMenuItem::toggle-size-request signal on the given item.
*/
+9 -3
View File
@@ -2267,7 +2267,9 @@ gtk_notebook_size_request (GtkWidget *widget,
orientation,
size,
&child_minimum,
&child_natural);
&child_natural,
NULL,
NULL);
*minimum = MAX (*minimum, child_minimum);
*natural = MAX (*natural, child_natural);
@@ -8176,9 +8178,11 @@ gtk_notebook_set_tab_reorderable (GtkNotebook *notebook,
if (!list)
return;
reorderable = reorderable != FALSE;
if (GTK_NOTEBOOK_PAGE (list)->reorderable != reorderable)
{
GTK_NOTEBOOK_PAGE (list)->reorderable = (reorderable == TRUE);
GTK_NOTEBOOK_PAGE (list)->reorderable = reorderable;
gtk_widget_child_notify (child, "reorderable");
}
}
@@ -8269,9 +8273,11 @@ gtk_notebook_set_tab_detachable (GtkNotebook *notebook,
if (!list)
return;
detachable = detachable != FALSE;
if (GTK_NOTEBOOK_PAGE (list)->detachable != detachable)
{
GTK_NOTEBOOK_PAGE (list)->detachable = (detachable == TRUE);
GTK_NOTEBOOK_PAGE (list)->detachable = detachable;
gtk_widget_child_notify (child, "detachable");
}
}
+8
View File
@@ -399,6 +399,10 @@ gtk_overlay_get_child_position (GtkOverlay *overlay,
case GTK_ALIGN_END:
alloc->x += main_alloc.width - req.width;
break;
case GTK_ALIGN_BASELINE:
default:
g_assert_not_reached ();
break;
}
alloc->y = main_alloc.y;
@@ -418,6 +422,10 @@ gtk_overlay_get_child_position (GtkOverlay *overlay,
case GTK_ALIGN_END:
alloc->y += main_alloc.height - req.height;
break;
case GTK_ALIGN_BASELINE:
default:
g_assert_not_reached ();
break;
}
return TRUE;
+152 -59
View File
@@ -871,11 +871,68 @@ gtk_paned_finalize (GObject *object)
}
static void
gtk_paned_get_preferred_size (GtkWidget *widget,
GtkOrientation orientation,
gint size,
gint *minimum,
gint *natural)
gtk_paned_compute_position (GtkPaned *paned,
gint allocation,
gint child1_req,
gint child2_req,
gint *min_pos,
gint *max_pos,
gint *out_pos)
{
GtkPanedPrivate *priv = paned->priv;
gint min, max, pos;
min = priv->child1_shrink ? 0 : child1_req;
max = allocation;
if (!priv->child2_shrink)
max = MAX (1, max - child2_req);
max = MAX (min, max);
if (!priv->position_set)
{
if (priv->child1_resize && !priv->child2_resize)
pos = MAX (0, allocation - child2_req);
else if (!priv->child1_resize && priv->child2_resize)
pos = child1_req;
else if (child1_req + child2_req != 0)
pos = allocation * ((gdouble)child1_req / (child1_req + child2_req)) + 0.5;
else
pos = allocation * 0.5 + 0.5;
}
else
{
/* If the position was set before the initial allocation.
* (priv->last_allocation <= 0) just clamp it and leave it.
*/
if (priv->last_allocation > 0)
{
if (priv->child1_resize && !priv->child2_resize)
pos = priv->child1_size + allocation - priv->last_allocation;
else if (!(!priv->child1_resize && priv->child2_resize))
pos = allocation * ((gdouble) priv->child1_size / (priv->last_allocation)) + 0.5;
else
pos = priv->child1_size;
}
else
pos = priv->child1_size;
}
pos = CLAMP (pos, min, max);
if (min_pos)
*min_pos = min;
if (max_pos)
*max_pos = max;
if (out_pos)
*out_pos = pos;
}
static void
gtk_paned_get_preferred_size_for_orientation (GtkWidget *widget,
gint size,
gint *minimum,
gint *natural)
{
GtkPaned *paned = GTK_PANED (widget);
GtkPanedPrivate *priv = paned->priv;
@@ -885,8 +942,8 @@ gtk_paned_get_preferred_size (GtkWidget *widget,
if (priv->child1 && gtk_widget_get_visible (priv->child1))
{
_gtk_widget_get_preferred_size_for_size (priv->child1, orientation, size, &child_min, &child_nat);
if (priv->child1_shrink && priv->orientation == orientation)
_gtk_widget_get_preferred_size_for_size (priv->child1, priv->orientation, size, &child_min, &child_nat, NULL, NULL);
if (priv->child1_shrink)
*minimum = 0;
else
*minimum = child_min;
@@ -895,19 +952,11 @@ gtk_paned_get_preferred_size (GtkWidget *widget,
if (priv->child2 && gtk_widget_get_visible (priv->child2))
{
_gtk_widget_get_preferred_size_for_size (priv->child2, orientation, size, &child_min, &child_nat);
_gtk_widget_get_preferred_size_for_size (priv->child2, priv->orientation, size, &child_min, &child_nat, NULL, NULL);
if (priv->orientation == orientation)
{
if (!priv->child2_shrink)
*minimum += child_min;
*natural += child_nat;
}
else
{
*minimum = MAX (*minimum, child_min);
*natural = MAX (*natural, child_nat);
}
if (!priv->child2_shrink)
*minimum += child_min;
*natural += child_nat;
}
if (priv->child1 && gtk_widget_get_visible (priv->child1) &&
@@ -917,14 +966,89 @@ gtk_paned_get_preferred_size (GtkWidget *widget,
gtk_widget_style_get (widget, "handle-size", &handle_size, NULL);
if (priv->orientation == orientation)
{
*minimum += handle_size;
*natural += handle_size;
}
*minimum += handle_size;
*natural += handle_size;
}
}
static void
gtk_paned_get_preferred_size_for_opposite_orientation (GtkWidget *widget,
gint size,
gint *minimum,
gint *natural)
{
GtkPaned *paned = GTK_PANED (widget);
GtkPanedPrivate *priv = paned->priv;
gint for_child1, for_child2;
gint child_min, child_nat;
if (size > -1 &&
priv->child1 && gtk_widget_get_visible (priv->child1) &&
priv->child2 && gtk_widget_get_visible (priv->child2))
{
gint child1_req, child2_req;
gint handle_size;
gtk_widget_style_get (widget, "handle-size", &handle_size, NULL);
_gtk_widget_get_preferred_size_for_size (priv->child1, priv->orientation, -1, &child1_req, NULL, NULL, NULL);
_gtk_widget_get_preferred_size_for_size (priv->child2, priv->orientation, -1, &child2_req, NULL, NULL, NULL);
gtk_paned_compute_position (paned,
size, child1_req, child2_req,
NULL, NULL, &for_child1);
for_child2 = size - for_child1 - handle_size;
}
else
{
for_child1 = size;
for_child2 = size;
}
*minimum = *natural = 0;
if (priv->child1 && gtk_widget_get_visible (priv->child1))
{
_gtk_widget_get_preferred_size_for_size (priv->child1,
OPPOSITE_ORIENTATION (priv->orientation),
for_child1,
&child_min, &child_nat,
NULL, NULL);
*minimum = child_min;
*natural = child_nat;
}
if (priv->child2 && gtk_widget_get_visible (priv->child2))
{
_gtk_widget_get_preferred_size_for_size (priv->child2,
OPPOSITE_ORIENTATION (priv->orientation),
for_child2,
&child_min, &child_nat,
NULL, NULL);
*minimum = MAX (*minimum, child_min);
*natural = MAX (*natural, child_nat);
}
}
static void
gtk_paned_get_preferred_size (GtkWidget *widget,
GtkOrientation orientation,
gint size,
gint *minimum,
gint *natural)
{
GtkPaned *paned = GTK_PANED (widget);
GtkPanedPrivate *priv = paned->priv;
if (orientation == priv->orientation)
return gtk_paned_get_preferred_size_for_orientation (widget, size, minimum, natural);
else
return gtk_paned_get_preferred_size_for_opposite_orientation (widget, size, minimum, natural);
}
static void
gtk_paned_get_preferred_width (GtkWidget *widget,
gint *minimum,
@@ -2064,41 +2188,10 @@ gtk_paned_calc_position (GtkPaned *paned,
old_min_position = priv->min_position;
old_max_position = priv->max_position;
priv->min_position = priv->child1_shrink ? 0 : child1_req;
priv->max_position = allocation;
if (!priv->child2_shrink)
priv->max_position = MAX (1, priv->max_position - child2_req);
priv->max_position = MAX (priv->min_position, priv->max_position);
if (!priv->position_set)
{
if (priv->child1_resize && !priv->child2_resize)
priv->child1_size = MAX (0, allocation - child2_req);
else if (!priv->child1_resize && priv->child2_resize)
priv->child1_size = child1_req;
else if (child1_req + child2_req != 0)
priv->child1_size = allocation * ((gdouble)child1_req / (child1_req + child2_req)) + 0.5;
else
priv->child1_size = allocation * 0.5 + 0.5;
}
else
{
/* If the position was set before the initial allocation.
* (priv->last_allocation <= 0) just clamp it and leave it.
*/
if (priv->last_allocation > 0)
{
if (priv->child1_resize && !priv->child2_resize)
priv->child1_size += allocation - priv->last_allocation;
else if (!(!priv->child1_resize && priv->child2_resize))
priv->child1_size = allocation * ((gdouble) priv->child1_size / (priv->last_allocation)) + 0.5;
}
}
priv->child1_size = CLAMP (priv->child1_size,
priv->min_position,
priv->max_position);
gtk_paned_compute_position (paned,
allocation, child1_req, child2_req,
&priv->min_position, &priv->max_position,
&priv->child1_size);
if (priv->child1)
gtk_paned_set_child_visible (paned, 0, priv->child1_size != 0);
+344 -721
View File
File diff suppressed because it is too large Load Diff
+9 -22
View File
@@ -18,13 +18,8 @@
#ifndef __GTK_PATH_BAR_H__
#define __GTK_PATH_BAR_H__
#if !defined (__GTK_H_INSIDE__) && !defined (GTK_COMPILATION)
#error "Only <gtk/gtk.h> can be included directly."
#endif
#include <gtk/gtkcontainer.h>
#include <gtk/gtkfilesystem.h>
#include <gtk/gtkplacessidebar.h>
#include "gtkcontainer.h"
#include "gtkfilesystem.h"
G_BEGIN_DECLS
@@ -51,26 +46,18 @@ struct _GtkPathBarClass
{
GtkContainerClass parent_class;
void (* open_location) (GtkPathBar *path_bar,
GFile *file,
GFile *child_file,
gboolean child_is_hidden);
void (* path_clicked) (GtkPathBar *path_bar,
GFile *file,
GFile *child_file,
gboolean child_is_hidden);
};
GType gtk_path_bar_get_type (void) G_GNUC_CONST;
GtkWidget *gtk_path_bar_new (void);
GtkPlacesOpenFlags gtk_path_bar_get_open_flags (GtkPathBar *path_bar);
void gtk_path_bar_set_open_flags (GtkPathBar *path_bar, GtkPlacesOpenFlags flags);
void gtk_path_bar_set_location (GtkPathBar *path_bar,
GFile *location,
gboolean keep_trail);
GFile *gtk_path_bar_get_location (GtkPathBar *path_bar);
void _gtk_path_bar_set_file_system (GtkPathBar *path_bar,
GtkFileSystem *file_system);
void _gtk_path_bar_set_file (GtkPathBar *path_bar,
GFile *file,
gboolean keep_trail);
void _gtk_path_bar_up (GtkPathBar *path_bar);
void _gtk_path_bar_down (GtkPathBar *path_bar);
+395
View File
@@ -0,0 +1,395 @@
/* GTK - The GIMP Toolkit
* Copyright (C) 2013 Red Hat, Inc.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
#include "config.h"
#include "gtkdebug.h"
#include "gtkpixelcacheprivate.h"
#define BLOW_CACHE_TIMEOUT_SEC 20
/* The extra size of the offscreen surface we allocate
to make scrolling more efficient */
#define EXTRA_SIZE 64
/* When resizing viewport to smaller we allow this extra
size to avoid constantly reallocating when resizing */
#define ALLOW_LARGER_SIZE 32
struct _GtkPixelCache {
cairo_surface_t *surface;
/* Valid if surface != NULL */
int surface_x;
int surface_y;
int surface_w;
int surface_h;
/* may be null if not dirty */
cairo_region_t *surface_dirty;
guint timeout_tag;
};
GtkPixelCache *
_gtk_pixel_cache_new ()
{
GtkPixelCache *cache;
cache = g_new0 (GtkPixelCache, 1);
return cache;
}
void
_gtk_pixel_cache_free (GtkPixelCache *cache)
{
if (cache == NULL)
return;
if (cache->timeout_tag)
g_source_remove (cache->timeout_tag);
if (cache->surface != NULL)
cairo_surface_destroy (cache->surface);
if (cache->surface_dirty != NULL)
cairo_region_destroy (cache->surface_dirty);
g_free (cache);
}
/* Region is in canvas coordinates */
void
_gtk_pixel_cache_invalidate (GtkPixelCache *cache,
cairo_region_t *region)
{
cairo_rectangle_int_t r;
cairo_region_t *free_region = NULL;
if (cache->surface == NULL ||
(region != NULL && cairo_region_is_empty (region)))
return;
if (region == NULL)
{
r.x = cache->surface_x;
r.y = cache->surface_y;
r.width = cache->surface_w;
r.height = cache->surface_h;
free_region = region =
cairo_region_create_rectangle (&r);
}
if (cache->surface_dirty == NULL)
{
cache->surface_dirty = cairo_region_copy (region);
cairo_region_translate (cache->surface_dirty,
-cache->surface_x,
-cache->surface_y);
}
else
{
cairo_region_translate (region,
-cache->surface_x,
-cache->surface_y);
cairo_region_union (cache->surface_dirty, region);
cairo_region_translate (region,
cache->surface_x,
cache->surface_y);
}
if (free_region)
cairo_region_destroy (free_region);
r.x = 0;
r.y = 0;
r.width = cache->surface_w;
r.height = cache->surface_h;
cairo_region_intersect_rectangle (cache->surface_dirty, &r);
}
static void
_gtk_pixel_cache_create_surface_if_needed (GtkPixelCache *cache,
GdkWindow *window,
cairo_rectangle_int_t *view_rect,
cairo_rectangle_int_t *canvas_rect)
{
cairo_rectangle_int_t rect;
int surface_w, surface_h;
cairo_content_t content;
cairo_pattern_t *bg;
double red, green, blue, alpha;
content = CAIRO_CONTENT_COLOR_ALPHA;
bg = gdk_window_get_background_pattern (window);
if (bg != NULL &&
cairo_pattern_get_type (bg) == CAIRO_PATTERN_TYPE_SOLID &&
cairo_pattern_get_rgba (bg, &red, &green, &blue, &alpha) == CAIRO_STATUS_SUCCESS &&
alpha == 1.0)
content = CAIRO_CONTENT_COLOR;
surface_w = view_rect->width;
if (canvas_rect->width > surface_w)
surface_w = MIN (surface_w + EXTRA_SIZE, canvas_rect->width);
surface_h = view_rect->height;
if (canvas_rect->height > surface_h)
surface_h = MIN (surface_h + EXTRA_SIZE, canvas_rect->height);
/* If current surface can't fit view_rect or is too large, kill it */
if (cache->surface != NULL &&
(cairo_surface_get_content (cache->surface) != content ||
cache->surface_w < view_rect->width ||
cache->surface_w > surface_w + ALLOW_LARGER_SIZE ||
cache->surface_h < view_rect->height ||
cache->surface_h > surface_h + ALLOW_LARGER_SIZE))
{
cairo_surface_destroy (cache->surface);
cache->surface = NULL;
if (cache->surface_dirty)
cairo_region_destroy (cache->surface_dirty);
cache->surface_dirty = NULL;
}
/* Don't allocate a surface if view >= canvas, as we won't
be scrolling then anyway */
if (cache->surface == NULL &&
(view_rect->width < canvas_rect->width ||
view_rect->height < canvas_rect->height))
{
cache->surface_x = -canvas_rect->x;
cache->surface_y = -canvas_rect->y;
cache->surface_w = surface_w;
cache->surface_h = surface_h;
cache->surface =
gdk_window_create_similar_surface (window, content,
surface_w, surface_h);
rect.x = 0;
rect.y = 0;
rect.width = surface_w;
rect.height = surface_h;
cache->surface_dirty =
cairo_region_create_rectangle (&rect);
}
}
void
_gtk_pixel_cache_set_position (GtkPixelCache *cache,
cairo_rectangle_int_t *view_rect,
cairo_rectangle_int_t *canvas_rect)
{
cairo_rectangle_int_t r, view_pos;
cairo_region_t *copy_region;
int new_surf_x, new_surf_y;
cairo_t *backing_cr;
if (cache->surface == NULL)
return;
/* Position of view inside canvas */
view_pos.x = -canvas_rect->x;
view_pos.y = -canvas_rect->y;
view_pos.width = view_rect->width;
view_pos.height = view_rect->height;
/* Reposition so all is visible */
if (view_pos.x < cache->surface_x ||
view_pos.x + view_pos.width >
cache->surface_x + cache->surface_w ||
view_pos.y < cache->surface_y ||
view_pos.y + view_pos.height >
cache->surface_y + cache->surface_h)
{
new_surf_x = cache->surface_x;
if (view_pos.x < cache->surface_x)
new_surf_x = MAX (view_pos.x + view_pos.width - cache->surface_w, 0);
else if (view_pos.x + view_pos.width >
cache->surface_x + cache->surface_w)
new_surf_x = MIN (view_pos.x, canvas_rect->width - cache->surface_w);
new_surf_y = cache->surface_y;
if (view_pos.y < cache->surface_y)
new_surf_y = MAX (view_pos.y + view_pos.height - cache->surface_h, 0);
else if (view_pos.y + view_pos.height >
cache->surface_y + cache->surface_h)
new_surf_y = MIN (view_pos.y, canvas_rect->height - cache->surface_h);
r.x = 0;
r.y = 0;
r.width = cache->surface_w;
r.height = cache->surface_h;
copy_region = cairo_region_create_rectangle (&r);
if (cache->surface_dirty)
{
cairo_region_subtract (copy_region, cache->surface_dirty);
cairo_region_destroy (cache->surface_dirty);
cache->surface_dirty = NULL;
}
cairo_region_translate (copy_region,
cache->surface_x - new_surf_x,
cache->surface_y - new_surf_y);
cairo_region_intersect_rectangle (copy_region, &r);
backing_cr = cairo_create (cache->surface);
gdk_cairo_region (backing_cr, copy_region);
cairo_set_operator (backing_cr, CAIRO_OPERATOR_SOURCE);
cairo_clip (backing_cr);
cairo_push_group (backing_cr);
cairo_set_source_surface (backing_cr, cache->surface,
cache->surface_x - new_surf_x,
cache->surface_y - new_surf_y);
cairo_paint (backing_cr);
cairo_pop_group_to_source (backing_cr);
cairo_paint (backing_cr);
cairo_destroy (backing_cr);
cache->surface_x = new_surf_x;
cache->surface_y = new_surf_y;
cairo_region_xor_rectangle (copy_region, &r);
cache->surface_dirty = copy_region;
}
}
void
_gtk_pixel_cache_repaint (GtkPixelCache *cache,
GtkPixelCacheDrawFunc draw,
cairo_rectangle_int_t *view_rect,
cairo_rectangle_int_t *canvas_rect,
gpointer user_data)
{
cairo_t *backing_cr;
if (cache->surface &&
cache->surface_dirty &&
!cairo_region_is_empty (cache->surface_dirty))
{
backing_cr = cairo_create (cache->surface);
gdk_cairo_region (backing_cr, cache->surface_dirty);
cairo_clip (backing_cr);
cairo_translate (backing_cr,
-cache->surface_x - canvas_rect->x - view_rect->x,
-cache->surface_y - canvas_rect->y - view_rect->y);
cairo_set_source_rgba (backing_cr,
0.0, 0, 0, 0.0);
cairo_set_operator (backing_cr, CAIRO_OPERATOR_SOURCE);
cairo_paint (backing_cr);
cairo_set_operator (backing_cr, CAIRO_OPERATOR_OVER);
cairo_save (backing_cr);
draw (backing_cr, user_data);
cairo_restore (backing_cr);
#ifdef G_ENABLE_DEBUG
if (gtk_get_debug_flags () & GTK_DEBUG_PIXEL_CACHE)
{
GdkRGBA colors[] = {
{ 1, 0, 0, 0.08},
{ 0, 1, 0, 0.08},
{ 0, 0, 1, 0.08},
{ 1, 0, 1, 0.08},
{ 1, 1, 0, 0.08},
{ 0, 1, 1, 0.08},
};
static int current_color = 0;
gdk_cairo_set_source_rgba (backing_cr, &colors[(current_color++) % G_N_ELEMENTS (colors)]);
cairo_paint (backing_cr);
}
#endif
cairo_destroy (backing_cr);
}
if (cache->surface_dirty)
{
cairo_region_destroy (cache->surface_dirty);
cache->surface_dirty = NULL;
}
}
static gboolean
blow_cache_cb (gpointer user_data)
{
GtkPixelCache *cache = user_data;
cache->timeout_tag = 0;
if (cache->surface)
{
cairo_surface_destroy (cache->surface);
cache->surface = NULL;
if (cache->surface_dirty)
cairo_region_destroy (cache->surface_dirty);
cache->surface_dirty = NULL;
}
return G_SOURCE_REMOVE;
}
void
_gtk_pixel_cache_draw (GtkPixelCache *cache,
cairo_t *cr,
GdkWindow *window,
/* View position in widget coords */
cairo_rectangle_int_t *view_rect,
/* Size and position of canvas in view coords */
cairo_rectangle_int_t *canvas_rect,
GtkPixelCacheDrawFunc draw,
gpointer user_data)
{
if (cache->timeout_tag)
g_source_remove (cache->timeout_tag);
cache->timeout_tag = g_timeout_add_seconds (BLOW_CACHE_TIMEOUT_SEC,
blow_cache_cb, cache);
_gtk_pixel_cache_create_surface_if_needed (cache, window,
view_rect, canvas_rect);
_gtk_pixel_cache_set_position (cache, view_rect, canvas_rect);
_gtk_pixel_cache_repaint (cache, draw, view_rect, canvas_rect, user_data);
if (cache->surface &&
/* Don't use backing surface if rendering elsewhere */
cairo_surface_get_type (cache->surface) == cairo_surface_get_type (cairo_get_target (cr)))
{
cairo_save (cr);
cairo_set_source_surface (cr, cache->surface,
cache->surface_x + view_rect->x + canvas_rect->x,
cache->surface_y + view_rect->y + canvas_rect->y);
cairo_rectangle (cr, view_rect->x, view_rect->y,
view_rect->width, view_rect->height);
cairo_fill (cr);
cairo_restore (cr);
}
else
{
cairo_rectangle (cr,
view_rect->x, view_rect->y,
view_rect->width, view_rect->height);
cairo_clip (cr);
draw (cr, user_data);
}
}
+48
View File
@@ -0,0 +1,48 @@
/*
* Copyright © 2013 Red Hat Inc.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library. If not, see <http://www.gnu.org/licenses/>.
*
* Authors: Alexander Larsson <alexl@gnome.org>
*/
#ifndef __GTK_PIXEL_CACHE_PRIVATE_H__
#define __GTK_PIXEL_CACHE_PRIVATE_H__
#include <glib-object.h>
#include <gtkwidget.h>
G_BEGIN_DECLS
typedef struct _GtkPixelCache GtkPixelCache;
typedef void (*GtkPixelCacheDrawFunc) (cairo_t *cr,
gpointer user_data);
GtkPixelCache *_gtk_pixel_cache_new (void);
void _gtk_pixel_cache_free (GtkPixelCache *cache);
void _gtk_pixel_cache_invalidate (GtkPixelCache *cache,
cairo_region_t *region);
void _gtk_pixel_cache_draw (GtkPixelCache *cache,
cairo_t *cr,
GdkWindow *window,
cairo_rectangle_int_t *view_rect,
cairo_rectangle_int_t *canvas_rect,
GtkPixelCacheDrawFunc draw,
gpointer user_data);
G_END_DECLS
#endif /* __GTK_PIXEL_CACHE_PRIVATE_H__ */
+25 -22
View File
@@ -3568,12 +3568,15 @@ hostname_proxy_new_cb (GObject *source_object,
{
GtkPlacesSidebar *sidebar = user_data;
GError *error = NULL;
GDBusProxy *proxy;
sidebar->hostnamed_proxy = g_dbus_proxy_new_for_bus_finish (res, &error);
proxy = g_dbus_proxy_new_for_bus_finish (res, &error);
if (g_error_matches (error, G_IO_ERROR, G_IO_ERROR_CANCELLED))
return;
sidebar->hostnamed_proxy = proxy;
g_clear_object (&sidebar->hostnamed_cancellable);
g_object_unref (sidebar);
if (error != NULL) {
g_debug ("Failed to create D-Bus proxy: %s", error->message);
g_error_free (error);
@@ -3833,7 +3836,7 @@ gtk_places_sidebar_init (GtkPlacesSidebar *sidebar)
"org.freedesktop.hostname1",
sidebar->hostnamed_cancellable,
hostname_proxy_new_cb,
g_object_ref (sidebar));
sidebar);
sidebar->drop_state = DROP_STATE_NORMAL;
sidebar->new_bookmark_index = -1;
@@ -3989,7 +3992,7 @@ gtk_places_sidebar_class_init (GtkPlacesSidebarClass *class)
* location; for example, a file manager should show a list of files in
* the specified location.
*
* Since: 3.8
* Since: 3.10
*/
places_sidebar_signals [OPEN_LOCATION] =
g_signal_new (I_("open-location"),
@@ -4028,7 +4031,7 @@ gtk_places_sidebar_class_init (GtkPlacesSidebarClass *class)
* dismisses the menu. The menu is re-created (and thus, this signal is
* emitted) every time the user activates the contextual menu.
*
* Since: 3.8
* Since: 3.10
*/
places_sidebar_signals [POPULATE_POPUP] =
g_signal_new (I_("populate-popup"),
@@ -4053,7 +4056,7 @@ gtk_places_sidebar_class_init (GtkPlacesSidebarClass *class)
* refer to mounting or unmounting media, for example, when a drive
* cannot be started for some reason.
*
* Since: 3.8
* Since: 3.10
*/
places_sidebar_signals [SHOW_ERROR_MESSAGE] =
g_signal_new (I_("show-error-message"),
@@ -4076,7 +4079,7 @@ gtk_places_sidebar_class_init (GtkPlacesSidebarClass *class)
* a URL like "sftp://ftp.example.com". It is up to the application to create
* the corresponding mount by using, for example, g_file_mount_enclosing_volume().
*
* Since: 3.8
* Since: 3.10
*/
places_sidebar_signals [SHOW_CONNECT_TO_SERVER] =
g_signal_new (I_("show-connect-to-server"),
@@ -4108,7 +4111,7 @@ gtk_places_sidebar_class_init (GtkPlacesSidebarClass *class)
* or #GDK_ACTION_MOVE, or 0 if no action is allowed here (i.e. drops
* are not allowed in the specified @dest_file).
*
* Since: 3.8
* Since: 3.10
*/
places_sidebar_signals [DRAG_ACTION_REQUESTED] =
g_signal_new (I_("drag-action-requested"),
@@ -4133,7 +4136,7 @@ gtk_places_sidebar_class_init (GtkPlacesSidebarClass *class)
* Return value: the final drag action that the sidebar should pass to the drag side
* of the drag-and-drop operation.
*
* Since: 3.8
* Since: 3.10
*/
places_sidebar_signals [DRAG_ACTION_ASK] =
g_signal_new (I_("drag-action-ask"),
@@ -4158,7 +4161,7 @@ gtk_places_sidebar_class_init (GtkPlacesSidebarClass *class)
* @source_file_list has the list of files that are dropped into it and
* which should be copied/moved/etc. based on the specified @action.
*
* Since: 3.8
* Since: 3.10
*/
places_sidebar_signals [DRAG_PERFORM_DROP] =
g_signal_new (I_("drag-perform-drop"),
@@ -4316,7 +4319,7 @@ shortcuts_model_new (GtkPlacesSidebar *sidebar)
* Passing 0 for @flags will cause #GTK_PLACES_OPEN_NORMAL to always be sent
* to callbacks for the "open-location" signal.
*
* Since: 3.8
* Since: 3.10
*/
void
gtk_places_sidebar_set_open_flags (GtkPlacesSidebar *sidebar, GtkPlacesOpenFlags flags)
@@ -4348,7 +4351,7 @@ gtk_places_sidebar_get_open_flags (GtkPlacesSidebar *sidebar)
* places, or it will unhighlight everything if the @location is not among the
* places in the list.
*
* Since: 3.8
* Since: 3.10
*/
void
gtk_places_sidebar_set_location (GtkPlacesSidebar *sidebar, GFile *location)
@@ -4408,7 +4411,7 @@ gtk_places_sidebar_set_location (GtkPlacesSidebar *sidebar, GFile *location)
* Returns: (transfer full): a GFile with the selected location, or #NULL if nothing is visually
* selected.
*
* Since: 3.8
* Since: 3.10
*/
GFile *
gtk_places_sidebar_get_location (GtkPlacesSidebar *sidebar)
@@ -4443,7 +4446,7 @@ gtk_places_sidebar_get_location (GtkPlacesSidebar *sidebar)
* An application may want to turn this on if the desktop environment actually supports the
* notion of a desktop.
*
* Since: 3.8
* Since: 3.10
*/
void
gtk_places_sidebar_set_show_desktop (GtkPlacesSidebar *sidebar, gboolean show_desktop)
@@ -4466,7 +4469,7 @@ gtk_places_sidebar_set_show_desktop (GtkPlacesSidebar *sidebar, gboolean show_de
*
* Return value: %TRUE if the sidebar will display a builtin shortcut to the desktop folder.
*
* Since: 3.8
* Since: 3.10
*/
gboolean
gtk_places_sidebar_get_show_desktop (GtkPlacesSidebar *sidebar)
@@ -4485,7 +4488,7 @@ gtk_places_sidebar_get_show_desktop (GtkPlacesSidebar *sidebar)
* An application may want to turn this on if it implements a way for the user to connect
* to network servers directly.
*
* Since: 3.8
* Since: 3.10
*/
void
gtk_places_sidebar_set_show_connect_to_server (GtkPlacesSidebar *sidebar, gboolean show_connect_to_server)
@@ -4508,7 +4511,7 @@ gtk_places_sidebar_set_show_connect_to_server (GtkPlacesSidebar *sidebar, gboole
*
* Return value: %TRUE if the sidebar will display a "Connect to Server" item.
*
* Since: 3.8
* Since: 3.10
*/
gboolean
gtk_places_sidebar_get_show_connect_to_server (GtkPlacesSidebar *sidebar)
@@ -4550,7 +4553,7 @@ find_shortcut_link (GtkPlacesSidebar *sidebar, GFile *location)
* is called multiple times with different locations, then they are added
* to the sidebar's list in the same order as the function is called.
*
* Since: 3.8
* Since: 3.10
*/
void
gtk_places_sidebar_add_shortcut (GtkPlacesSidebar *sidebar, GFile *location)
@@ -4573,7 +4576,7 @@ gtk_places_sidebar_add_shortcut (GtkPlacesSidebar *sidebar, GFile *location)
* inserted with gtk_places_sidebar_add_shortcut(). If the @location is not a
* shortcut in the sidebar, then nothing is done.
*
* Since: 3.8
* Since: 3.10
*/
void
gtk_places_sidebar_remove_shortcut (GtkPlacesSidebar *sidebar, GFile *location)
@@ -4606,7 +4609,7 @@ gtk_places_sidebar_remove_shortcut (GtkPlacesSidebar *sidebar, GFile *location)
* g_slist_free_full (list, (GDestroyNotify) g_object_unref);
* ]|
*
* Since: 3.8
* Since: 3.10
*/
GSList *
gtk_places_sidebar_list_shortcuts (GtkPlacesSidebar *sidebar)
@@ -4629,7 +4632,7 @@ gtk_places_sidebar_list_shortcuts (GtkPlacesSidebar *sidebar)
* #NULL if no such index exist. Note that the indices start at 0, even though
* the file chooser starts them with the keyboard shortcut "Alt-1".
*
* Since: 3.8
* Since: 3.10
*/
GFile *
gtk_places_sidebar_get_nth_bookmark (GtkPlacesSidebar *sidebar, int n)
+21 -14
View File
@@ -77,26 +77,33 @@ typedef enum {
GTK_PLACES_OPEN_NEW_WINDOW = 1 << 2
} GtkPlacesOpenFlags;
GType gtk_places_sidebar_get_type (void);
GtkWidget *gtk_places_sidebar_new (void);
GType gtk_places_sidebar_get_type (void) G_GNUC_CONST;
GtkWidget * gtk_places_sidebar_new (void);
GtkPlacesOpenFlags gtk_places_sidebar_get_open_flags (GtkPlacesSidebar *sidebar);
void gtk_places_sidebar_set_open_flags (GtkPlacesSidebar *sidebar, GtkPlacesOpenFlags flags);
GtkPlacesOpenFlags gtk_places_sidebar_get_open_flags (GtkPlacesSidebar *sidebar);
void gtk_places_sidebar_set_open_flags (GtkPlacesSidebar *sidebar,
GtkPlacesOpenFlags flags);
GFile *gtk_places_sidebar_get_location (GtkPlacesSidebar *sidebar);
void gtk_places_sidebar_set_location (GtkPlacesSidebar *sidebar, GFile *location);
GFile * gtk_places_sidebar_get_location (GtkPlacesSidebar *sidebar);
void gtk_places_sidebar_set_location (GtkPlacesSidebar *sidebar,
GFile *location);
gboolean gtk_places_sidebar_get_show_desktop (GtkPlacesSidebar *sidebar);
void gtk_places_sidebar_set_show_desktop (GtkPlacesSidebar *sidebar, gboolean show_desktop);
gboolean gtk_places_sidebar_get_show_desktop (GtkPlacesSidebar *sidebar);
void gtk_places_sidebar_set_show_desktop (GtkPlacesSidebar *sidebar,
gboolean show_desktop);
gboolean gtk_places_sidebar_get_show_connect_to_server (GtkPlacesSidebar *sidebar);
void gtk_places_sidebar_set_show_connect_to_server (GtkPlacesSidebar *sidebar, gboolean show_connect_to_server);
gboolean gtk_places_sidebar_get_show_connect_to_server (GtkPlacesSidebar *sidebar);
void gtk_places_sidebar_set_show_connect_to_server (GtkPlacesSidebar *sidebar,
gboolean show_connect_to_server);
void gtk_places_sidebar_add_shortcut (GtkPlacesSidebar *sidebar, GFile *location);
void gtk_places_sidebar_remove_shortcut (GtkPlacesSidebar *sidebar, GFile *location);
GSList *gtk_places_sidebar_list_shortcuts (GtkPlacesSidebar *sidebar);
void gtk_places_sidebar_add_shortcut (GtkPlacesSidebar *sidebar,
GFile *location);
void gtk_places_sidebar_remove_shortcut (GtkPlacesSidebar *sidebar,
GFile *location);
GSList * gtk_places_sidebar_list_shortcuts (GtkPlacesSidebar *sidebar);
GFile *gtk_places_sidebar_get_nth_bookmark (GtkPlacesSidebar *sidebar, int n);
GFile * gtk_places_sidebar_get_nth_bookmark (GtkPlacesSidebar *sidebar,
gint n);
G_END_DECLS
+2
View File
@@ -37,6 +37,8 @@ G_BEGIN_DECLS
#define GTK_PARAM_WRITABLE G_PARAM_WRITABLE|G_PARAM_STATIC_NAME|G_PARAM_STATIC_NICK|G_PARAM_STATIC_BLURB
#define GTK_PARAM_READWRITE G_PARAM_READWRITE|G_PARAM_STATIC_NAME|G_PARAM_STATIC_NICK|G_PARAM_STATIC_BLURB
#define OPPOSITE_ORIENTATION(_orientation) (1 - (_orientation))
#ifdef G_DISABLE_CAST_CHECKS
/* This is true for debug no and minimum */
#define gtk_internal_return_if_fail(__expr) G_STMT_START{ (void)0; }G_STMT_END
+3 -3
View File
@@ -659,7 +659,7 @@ gtk_revealer_set_reveal_child (GtkRevealer *revealer,
/**
* gtk_revealer_get_reveal_child:
* @revealer:
* @revealer: a #GtkRevealer
*
* Returns whether the child is currently
* revealed. See gtk_revealer_set_reveal_child().
@@ -874,8 +874,8 @@ gtk_revealer_get_transition_type (GtkRevealer *revealer)
}
/**
* gtk_stack_set_transition_type:
* @stack: a #GtkStack
* gtk_revealer_set_transition_type:
* @revealer: a #GtkRevealer
* @transition: the new transition type
*
* Sets the type of animation that will be used for
+1 -1
View File
@@ -1880,7 +1880,7 @@ gtk_scale_buildable_custom_finished (GtkBuildable *buildable,
if (strcmp (tagname, "marks") == 0)
{
GSList *m;
gchar *markup;
const gchar *markup;
marks_data = (MarksSubparserData *)user_data;
+22 -9
View File
@@ -858,20 +858,33 @@ _gtk_widget_get_preferred_size_for_size (GtkWidget *widget,
GtkOrientation orientation,
gint size,
gint *minimum,
gint *natural)
gint *natural,
gint *minimum_baseline,
gint *natural_baseline)
{
g_return_if_fail (GTK_IS_WIDGET (widget));
g_return_if_fail (size >= -1);
if (orientation == GTK_ORIENTATION_HORIZONTAL)
if (size < 0)
gtk_widget_get_preferred_width (widget, minimum, natural);
else
gtk_widget_get_preferred_width_for_height (widget, size, minimum, natural);
{
if (size < 0)
gtk_widget_get_preferred_width (widget, minimum, natural);
else
gtk_widget_get_preferred_width_for_height (widget, size, minimum, natural);
if (minimum_baseline)
*minimum_baseline = -1;
if (natural_baseline)
*natural_baseline = -1;
}
else
if (size < 0)
gtk_widget_get_preferred_height (widget, minimum, natural);
else
gtk_widget_get_preferred_height_for_width (widget, size, minimum, natural);
{
gtk_widget_get_preferred_height_and_baseline_for_width (widget,
size,
minimum,
natural,
minimum_baseline,
natural_baseline);
}
}
+1 -1
View File
@@ -58,7 +58,7 @@ _gtk_size_request_cache_free (SizeRequestCache *cache)
{
if (cache->requests_x)
free_sizes_x (cache->requests_x);
if (cache->requests_x)
if (cache->requests_y)
free_sizes_y (cache->requests_y);
}
+48 -10
View File
@@ -156,6 +156,9 @@ struct _GtkSpinButtonPrivate
GdkWindow *down_panel;
GdkWindow *up_panel;
GtkStyleContext *down_panel_context;
GtkStyleContext *up_panel_context;
GdkWindow *click_child;
GdkWindow *in_child;
@@ -248,6 +251,7 @@ static void gtk_spin_button_grab_notify (GtkWidget *widget,
gboolean was_grabbed);
static void gtk_spin_button_state_flags_changed (GtkWidget *widget,
GtkStateFlags previous_state);
static void gtk_spin_button_style_updated (GtkWidget *widget);
static gboolean gtk_spin_button_timer (GtkSpinButton *spin_button);
static gboolean gtk_spin_button_stop_spinning (GtkSpinButton *spin);
static void gtk_spin_button_value_changed (GtkAdjustment *adjustment,
@@ -328,6 +332,7 @@ gtk_spin_button_class_init (GtkSpinButtonClass *class)
widget_class->focus_out_event = gtk_spin_button_focus_out;
widget_class->grab_notify = gtk_spin_button_grab_notify;
widget_class->state_flags_changed = gtk_spin_button_state_flags_changed;
widget_class->style_updated = gtk_spin_button_style_updated;
entry_class->activate = gtk_spin_button_activate;
entry_class->get_text_area_size = gtk_spin_button_get_text_area_size;
@@ -684,7 +689,16 @@ gtk_spin_button_init (GtkSpinButton *spin_button)
static void
gtk_spin_button_finalize (GObject *object)
{
gtk_spin_button_set_adjustment (GTK_SPIN_BUTTON (object), NULL);
GtkSpinButton *spin_button = GTK_SPIN_BUTTON (object);
GtkSpinButtonPrivate *priv = spin_button->priv;
gtk_spin_button_set_adjustment (spin_button, NULL);
if (priv->down_panel_context)
g_object_unref (priv->down_panel_context);
if (priv->up_panel_context)
g_object_unref (priv->up_panel_context);
G_OBJECT_CLASS (gtk_spin_button_parent_class)->finalize (object);
}
@@ -730,7 +744,7 @@ gtk_spin_button_unmap (GtkWidget *widget)
static void
gtk_spin_button_panel_nthchildize_context (GtkSpinButton *spin_button,
GtkStyleContext *context,
GdkWindow *panel)
gboolean is_down_panel)
{
GtkSpinButtonPrivate *priv = spin_button->priv;
GtkWidget *widget = GTK_WIDGET (spin_button);
@@ -777,7 +791,7 @@ gtk_spin_button_panel_nthchildize_context (GtkSpinButton *spin_button,
gtk_widget_path_iter_add_class (siblings_path, up_pos, GTK_STYLE_CLASS_SPINBUTTON);
gtk_widget_path_iter_add_class (siblings_path, down_pos, GTK_STYLE_CLASS_SPINBUTTON);
if (panel == priv->down_panel)
if (is_down_panel)
gtk_widget_path_append_with_siblings (path, siblings_path, down_pos);
else
gtk_widget_path_append_with_siblings (path, siblings_path, up_pos);
@@ -846,12 +860,20 @@ static GtkStyleContext *
gtk_spin_button_panel_get_context (GtkSpinButton *spin_button,
GdkWindow *panel)
{
GtkStyleContext *context;
GtkSpinButtonPrivate *priv = spin_button->priv;
GtkStyleContext **contextp;
context = gtk_style_context_new ();
gtk_spin_button_panel_nthchildize_context (spin_button, context, panel);
contextp = (panel == priv->down_panel) ?
&priv->down_panel_context : &priv->up_panel_context;
return context;
if (*contextp == NULL)
{
*contextp = gtk_style_context_new ();
gtk_spin_button_panel_nthchildize_context (spin_button, *contextp,
panel == priv->down_panel);
}
return *contextp;
}
static void
@@ -874,8 +896,6 @@ gtk_spin_button_panel_get_size (GtkSpinButton *spin_button,
gtk_style_context_get_padding (context, state, &button_padding);
gtk_style_context_get_border (context, state, &button_border);
g_object_unref (context);
if (width)
*width = icon_size + button_padding.left + button_padding.right +
button_border.left + button_border.right;
@@ -1004,7 +1024,6 @@ gtk_spin_button_panel_draw (GtkSpinButton *spin_button,
cairo_restore (cr);
g_object_unref (icon_helper);
g_object_unref (context);
}
static void
@@ -1361,6 +1380,25 @@ gtk_spin_button_state_flags_changed (GtkWidget *widget,
}
}
static void
gtk_spin_button_style_updated (GtkWidget *widget)
{
GtkSpinButton *spin = GTK_SPIN_BUTTON (widget);
GtkSpinButtonPrivate *priv = spin->priv;
if (priv->down_panel_context)
gtk_spin_button_panel_nthchildize_context (spin,
priv->down_panel_context,
TRUE);
if (priv->up_panel_context)
gtk_spin_button_panel_nthchildize_context (spin,
priv->up_panel_context,
FALSE);
GTK_WIDGET_CLASS (gtk_spin_button_parent_class)->style_updated (widget);
}
static gint
gtk_spin_button_scroll (GtkWidget *widget,
GdkEventScroll *event)
+6 -5
View File
@@ -36,9 +36,9 @@
*
* The GtkStack widget is a container which only shows
* one of its children at a time. In contrast to GtkNotebook,
* GtkStack does not provide a visible means for users
* to change the visible child. Instead, the #GtkStackSwitcher
* widget can be used with GtkStack to provide this functionality.
* GtkStack does not provide a means for users to change the
* visible child. Instead, the #GtkStackSwitcher widget can be
* used with GtkStack to provide this functionality.
*
* Transitions between pages can be animated as slides or
* fades. This can be controlled with gtk_stack_set_transition_type().
@@ -1437,7 +1437,8 @@ gtk_stack_draw (GtkWidget *widget,
GtkStackPrivate *priv = stack->priv;
cairo_t *pattern_cr;
if (priv->visible_child)
if (priv->visible_child &&
gtk_cairo_should_draw_window (cr, priv->bin_window))
{
if (priv->transition_pos < 1.0)
{
@@ -1475,7 +1476,7 @@ gtk_stack_draw (GtkWidget *widget,
}
}
else if (gtk_cairo_should_draw_window (cr, priv->bin_window))
else
gtk_container_propagate_draw (GTK_CONTAINER (stack),
priv->visible_child->widget,
cr);
+2
View File
@@ -122,6 +122,8 @@ rebuild_child (GtkWidget *self,
{
button_child = gtk_label_new (title);
gtk_widget_set_tooltip_text (GTK_WIDGET (self), NULL);
gtk_style_context_remove_class (context, "image-button");
gtk_style_context_add_class (context, "text-button");
}
+110 -30
View File
@@ -53,6 +53,7 @@
#include "gtkmain.h"
#include "gtksettings.h"
#include "gtkwidgetpath.h"
#include "gtkpixelcacheprivate.h"
#include "a11y/gtktreeviewaccessibleprivate.h"
@@ -304,6 +305,8 @@ struct _GtkTreeViewPrivate
GdkWindow *bin_window;
GdkWindow *header_window;
GtkPixelCache *pixel_cache;
/* Scroll position state keeping */
GtkTreeRowReference *top_row;
gint top_row_dy;
@@ -492,6 +495,8 @@ struct _GtkTreeViewPrivate
guint in_grab : 1;
guint in_scroll : 1;
/* Whether our key press handler is to avoid sending an unhandled binding to the search entry */
guint search_entry_avoid_unhandled_binding : 1;
@@ -794,6 +799,8 @@ static void gtk_tree_view_stop_rubber_band (GtkTreeView
static void update_prelight (GtkTreeView *tree_view,
int x,
int y);
static void gtk_tree_view_queue_draw_region (GtkWidget *widget,
const cairo_region_t *region);
static inline gint gtk_tree_view_get_effective_header_height (GtkTreeView *tree_view);
@@ -960,6 +967,7 @@ gtk_tree_view_class_init (GtkTreeViewClass *class)
widget_class->style_updated = gtk_tree_view_style_updated;
widget_class->grab_notify = gtk_tree_view_grab_notify;
widget_class->state_flags_changed = gtk_tree_view_state_flags_changed;
widget_class->queue_draw_region = gtk_tree_view_queue_draw_region;
/* GtkContainer signals */
container_class->remove = gtk_tree_view_remove;
@@ -1730,6 +1738,8 @@ gtk_tree_view_init (GtkTreeView *tree_view)
tree_view->priv->headers_visible = TRUE;
tree_view->priv->activate_on_single_click = FALSE;
tree_view->priv->pixel_cache = _gtk_pixel_cache_new ();
/* We need some padding */
tree_view->priv->dy = 0;
tree_view->priv->cursor_offset = 0;
@@ -2130,6 +2140,10 @@ gtk_tree_view_destroy (GtkWidget *widget)
tree_view->priv->vadjustment = NULL;
}
if (tree_view->priv->pixel_cache)
_gtk_pixel_cache_free (tree_view->priv->pixel_cache);
tree_view->priv->pixel_cache = NULL;
GTK_WIDGET_CLASS (gtk_tree_view_parent_class)->destroy (widget);
}
@@ -2217,6 +2231,47 @@ gtk_tree_view_ensure_background (GtkTreeView *tree_view)
gtk_style_context_set_background (context, tree_view->priv->header_window);
}
static void
gtk_tree_view_bin_window_invalidate_handler (GdkWindow *window,
cairo_region_t *region)
{
gpointer widget;
GtkTreeView *tree_view;
int y;
gdk_window_get_user_data (window, &widget);
tree_view = GTK_TREE_VIEW (widget);
/* Scrolling will invalidate everything in the bin window,
but we already have it in the cache, so we can ignore that */
if (tree_view->priv->in_scroll)
return;
y = gtk_adjustment_get_value (tree_view->priv->vadjustment);
cairo_region_translate (region,
0, y);
_gtk_pixel_cache_invalidate (tree_view->priv->pixel_cache, region);
cairo_region_translate (region,
0, -y);
}
static void
gtk_tree_view_queue_draw_region (GtkWidget *widget,
const cairo_region_t *region)
{
GtkTreeView *tree_view = GTK_TREE_VIEW (widget);
/* There is no way we can know if a region targets the
not-currently-visible but in pixel cache region, so we
always just invalidate the whole thing whenever the
tree view gets a queue draw. This doesn't normally happen
in normal scrolling cases anyway. */
_gtk_pixel_cache_invalidate (tree_view->priv->pixel_cache, NULL);
GTK_WIDGET_CLASS (gtk_tree_view_parent_class)->queue_draw_region (widget,
region);
}
static void
gtk_tree_view_realize (GtkWidget *widget)
{
@@ -2268,6 +2323,8 @@ gtk_tree_view_realize (GtkWidget *widget)
tree_view->priv->bin_window = gdk_window_new (window,
&attributes, attributes_mask);
gtk_widget_register_window (widget, tree_view->priv->bin_window);
gdk_window_set_invalidate_handler (tree_view->priv->bin_window,
gtk_tree_view_bin_window_invalidate_handler);
gtk_widget_get_allocation (widget, &allocation);
@@ -4769,8 +4826,6 @@ gtk_tree_view_bin_draw (GtkWidget *widget,
bin_window_width = gdk_window_get_width (tree_view->priv->bin_window);
bin_window_height = gdk_window_get_height (tree_view->priv->bin_window);
cairo_rectangle (cr, 0, 0, bin_window_width, bin_window_height);
cairo_clip (cr);
if (!gdk_cairo_get_clip_rectangle (cr, &clip))
return TRUE;
@@ -5368,6 +5423,35 @@ done:
return FALSE;
}
static void
draw_bin (cairo_t *cr,
gpointer user_data)
{
GtkWidget *widget = GTK_WIDGET (user_data);
GtkTreeView *tree_view = GTK_TREE_VIEW (widget);
GList *tmp_list;
cairo_save (cr);
gtk_cairo_transform_to_window (cr, widget, tree_view->priv->bin_window);
gtk_tree_view_bin_draw (widget, cr);
cairo_restore (cr);
/* We can't just chain up to Container::draw as it will try to send the
* event to the headers, so we handle propagating it to our children
* (eg. widgets being edited) ourselves.
*/
tmp_list = tree_view->priv->children;
while (tmp_list)
{
GtkTreeViewChild *child = tmp_list->data;
tmp_list = tmp_list->next;
gtk_container_propagate_draw (GTK_CONTAINER (tree_view), child->widget, cr);
}
}
static gboolean
gtk_tree_view_draw (GtkWidget *widget,
cairo_t *cr)
@@ -5384,27 +5468,22 @@ gtk_tree_view_draw (GtkWidget *widget,
if (gtk_cairo_should_draw_window (cr, tree_view->priv->bin_window))
{
GList *tmp_list;
cairo_rectangle_int_t view_rect;
cairo_rectangle_int_t canvas_rect;
cairo_save (cr);
view_rect.x = 0;
view_rect.y = gtk_tree_view_get_effective_header_height (tree_view);
view_rect.width = gdk_window_get_width (tree_view->priv->bin_window);
view_rect.height = gdk_window_get_height (tree_view->priv->bin_window);
gtk_cairo_transform_to_window (cr, widget, tree_view->priv->bin_window);
gtk_tree_view_bin_draw (widget, cr);
gdk_window_get_position (tree_view->priv->bin_window, &canvas_rect.x, &canvas_rect.y);
canvas_rect.y = -gtk_adjustment_get_value (tree_view->priv->vadjustment);
canvas_rect.width = gdk_window_get_width (tree_view->priv->bin_window);
canvas_rect.height = tree_view->priv->height;
cairo_restore (cr);
/* We can't just chain up to Container::draw as it will try to send the
* event to the headers, so we handle propagating it to our children
* (eg. widgets being edited) ourselves.
*/
tmp_list = tree_view->priv->children;
while (tmp_list)
{
GtkTreeViewChild *child = tmp_list->data;
tmp_list = tmp_list->next;
gtk_container_propagate_draw (GTK_CONTAINER (tree_view), child->widget, cr);
}
_gtk_pixel_cache_draw (tree_view->priv->pixel_cache, cr, tree_view->priv->bin_window,
&view_rect, &canvas_rect,
draw_bin, widget);
}
gtk_style_context_save (context);
@@ -5974,18 +6053,17 @@ gtk_tree_view_node_queue_redraw (GtkTreeView *tree_view,
GtkRBTree *tree,
GtkRBNode *node)
{
GtkAllocation allocation;
gint y;
GdkRectangle rect;
y = _gtk_rbtree_node_find_offset (tree, node)
- gtk_adjustment_get_value (tree_view->priv->vadjustment)
+ gtk_tree_view_get_effective_header_height (tree_view);
rect.x = 0;
rect.y =
_gtk_rbtree_node_find_offset (tree, node)
- gtk_adjustment_get_value (tree_view->priv->vadjustment);
rect.width = gtk_widget_get_allocated_width (GTK_WIDGET (tree_view));
rect.height = GTK_RBNODE_GET_HEIGHT (node);
gtk_widget_get_allocation (GTK_WIDGET (tree_view), &allocation);
gtk_widget_queue_draw_area (GTK_WIDGET (tree_view),
0, y,
allocation.width,
GTK_RBNODE_GET_HEIGHT (node));
gdk_window_invalidate_rect (tree_view->priv->bin_window,
&rect, TRUE);
}
static gboolean
@@ -11236,7 +11314,9 @@ gtk_tree_view_adjustment_changed (GtkAdjustment *adjustment,
}
}
}
tree_view->priv->in_scroll = TRUE;
gdk_window_scroll (tree_view->priv->bin_window, 0, dy);
tree_view->priv->in_scroll = FALSE;
if (tree_view->priv->dy != (int) gtk_adjustment_get_value (tree_view->priv->vadjustment))
{
+82 -22
View File
@@ -32,6 +32,7 @@
#include "gtkprivate.h"
#include "gtkscrollable.h"
#include "gtktypebuiltins.h"
#include "gtkpixelcacheprivate.h"
/**
@@ -66,6 +67,8 @@ struct _GtkViewportPrivate
GdkWindow *bin_window;
GdkWindow *view_window;
GtkPixelCache *pixel_cache;
/* GtkScrollablePolicy needs to be checked when
* driving the scrollable adjustment values */
guint hscroll_policy : 1;
@@ -113,6 +116,8 @@ static void gtk_viewport_get_preferred_height (GtkWidget *widget,
static void viewport_set_adjustment (GtkViewport *viewport,
GtkOrientation orientation,
GtkAdjustment *adjustment);
static void gtk_viewport_queue_draw_region (GtkWidget *widget,
const cairo_region_t *region);
G_DEFINE_TYPE_WITH_CODE (GtkViewport, gtk_viewport, GTK_TYPE_BIN,
G_IMPLEMENT_INTERFACE (GTK_TYPE_SCROLLABLE, NULL))
@@ -139,6 +144,7 @@ gtk_viewport_class_init (GtkViewportClass *class)
widget_class->style_updated = gtk_viewport_style_updated;
widget_class->get_preferred_width = gtk_viewport_get_preferred_width;
widget_class->get_preferred_height = gtk_viewport_get_preferred_height;
widget_class->queue_draw_region = gtk_viewport_queue_draw_region;
gtk_widget_class_set_accessible_role (widget_class, ATK_ROLE_VIEWPORT);
@@ -249,6 +255,8 @@ gtk_viewport_init (GtkViewport *viewport)
priv->hadjustment = NULL;
priv->vadjustment = NULL;
priv->pixel_cache = _gtk_pixel_cache_new ();
viewport_set_adjustment (viewport, GTK_ORIENTATION_HORIZONTAL, NULL);
viewport_set_adjustment (viewport, GTK_ORIENTATION_VERTICAL, NULL);
}
@@ -301,10 +309,15 @@ static void
gtk_viewport_destroy (GtkWidget *widget)
{
GtkViewport *viewport = GTK_VIEWPORT (widget);
GtkViewportPrivate *priv = viewport->priv;
viewport_disconnect_adjustment (viewport, GTK_ORIENTATION_HORIZONTAL);
viewport_disconnect_adjustment (viewport, GTK_ORIENTATION_VERTICAL);
if (priv->pixel_cache)
_gtk_pixel_cache_free (priv->pixel_cache);
priv->pixel_cache = NULL;
GTK_WIDGET_CLASS (gtk_viewport_parent_class)->destroy (widget);
}
@@ -649,6 +662,40 @@ gtk_viewport_get_view_window (GtkViewport *viewport)
return viewport->priv->view_window;
}
static void
gtk_viewport_bin_window_invalidate_handler (GdkWindow *window,
cairo_region_t *region)
{
gpointer widget;
GtkViewport *viewport;
GtkViewportPrivate *priv;
gdk_window_get_user_data (window, &widget);
viewport = GTK_VIEWPORT (widget);
priv = viewport->priv;
_gtk_pixel_cache_invalidate (priv->pixel_cache, region);
}
static void
gtk_viewport_queue_draw_region (GtkWidget *widget,
const cairo_region_t *region)
{
GtkViewport *viewport = GTK_VIEWPORT (widget);
GtkViewportPrivate *priv = viewport->priv;
/* There is no way we can know if a region targets the
not-currently-visible but in pixel cache region, so we
always just invalidate the whole thing whenever the
tree view gets a queue draw. This doesn't normally happen
in normal scrolling cases anyway. */
_gtk_pixel_cache_invalidate (priv->pixel_cache, NULL);
GTK_WIDGET_CLASS (gtk_viewport_parent_class)->queue_draw_region (widget,
region);
}
static void
gtk_viewport_realize (GtkWidget *widget)
{
@@ -713,6 +760,8 @@ gtk_viewport_realize (GtkWidget *widget)
priv->bin_window = gdk_window_new (priv->view_window, &attributes, attributes_mask);
gtk_widget_register_window (widget, priv->bin_window);
gdk_window_set_invalidate_handler (priv->bin_window,
gtk_viewport_bin_window_invalidate_handler);
child = gtk_bin_get_child (bin);
if (child)
@@ -743,6 +792,25 @@ gtk_viewport_unrealize (GtkWidget *widget)
GTK_WIDGET_CLASS (gtk_viewport_parent_class)->unrealize (widget);
}
static void
draw_bin (cairo_t *cr,
gpointer user_data)
{
GtkWidget *widget = GTK_WIDGET (user_data);
GtkViewport *viewport = GTK_VIEWPORT (widget);
GtkViewportPrivate *priv = viewport->priv;
GtkStyleContext *context;
int x, y;
context = gtk_widget_get_style_context (widget);
gdk_window_get_position (priv->bin_window, &x, &y);
gtk_render_background (context, cr, x, y,
gdk_window_get_width (priv->bin_window),
gdk_window_get_height (priv->bin_window));
GTK_WIDGET_CLASS (gtk_viewport_parent_class)->draw (widget, cr);
}
static gint
gtk_viewport_draw (GtkWidget *widget,
cairo_t *cr)
@@ -750,7 +818,6 @@ gtk_viewport_draw (GtkWidget *widget,
GtkViewport *viewport = GTK_VIEWPORT (widget);
GtkViewportPrivate *priv = viewport->priv;
GtkStyleContext *context;
int x, y;
context = gtk_widget_get_style_context (widget);
@@ -766,30 +833,23 @@ gtk_viewport_draw (GtkWidget *widget,
gtk_style_context_restore (context);
}
if (gtk_cairo_should_draw_window (cr, priv->view_window))
{
/* This is a cute hack to ensure the contents of bin_window are
* restricted to where they are visible. We only need to do this
* clipping when called via gtk_widget_draw() and not in expose
* events. And when that happens every window (including this one)
* should be drawn.
*/
gdk_window_get_position (priv->view_window, &x, &y);
cairo_rectangle (cr, x, y,
gdk_window_get_width (priv->view_window),
gdk_window_get_height (priv->view_window));
cairo_clip (cr);
}
if (gtk_cairo_should_draw_window (cr, priv->bin_window))
{
gdk_window_get_position (priv->bin_window, &x, &y);
gtk_render_background (context, cr, x, y,
gdk_window_get_width (priv->bin_window),
gdk_window_get_height (priv->bin_window));
cairo_rectangle_int_t view_rect;
cairo_rectangle_int_t canvas_rect;
GTK_WIDGET_CLASS (gtk_viewport_parent_class)->draw (widget, cr);
gdk_window_get_position (priv->view_window, &view_rect.x, &view_rect.y);
view_rect.width = gdk_window_get_width (priv->view_window);
view_rect.height = gdk_window_get_height (priv->view_window);
gdk_window_get_position (priv->bin_window, &canvas_rect.x, &canvas_rect.y);
canvas_rect.width = gdk_window_get_width (priv->bin_window);
canvas_rect.height = gdk_window_get_height (priv->bin_window);
_gtk_pixel_cache_draw (priv->pixel_cache, cr, priv->bin_window,
&view_rect, &canvas_rect,
draw_bin, widget);
}
return FALSE;
@@ -843,7 +903,7 @@ gtk_viewport_size_allocate (GtkWidget *widget,
viewport_set_hadjustment_values (viewport);
viewport_set_vadjustment_values (viewport);
child_allocation.x = 0;
child_allocation.y = 0;
child_allocation.width = gtk_adjustment_get_upper (hadjustment);
+270 -236
View File
@@ -751,6 +751,8 @@ static void gtk_widget_real_get_width_for_height (GtkWidget
gint *natural_width);
static void gtk_widget_real_state_flags_changed (GtkWidget *widget,
GtkStateFlags old_state);
static void gtk_widget_real_queue_draw_region (GtkWidget *widget,
const cairo_region_t *region);
static const GtkWidgetAuxInfo* _gtk_widget_get_aux_info_or_defaults (GtkWidget *widget);
static GtkWidgetAuxInfo* gtk_widget_get_aux_info (GtkWidget *widget,
gboolean create);
@@ -854,9 +856,10 @@ static void gtk_widget_on_frame_clock_update (GdkFrameClock *frame_clock,
GtkWidget *widget);
static gboolean event_window_is_still_viewable (GdkEvent *event);
static void gtk_cairo_set_event_window (cairo_t *cr,
GdkWindow *window);
static void gtk_cairo_set_event (cairo_t *cr,
GdkEventExpose *event);
static void gtk_widget_propagate_alpha (GtkWidget *widget);
/* --- variables --- */
static gpointer gtk_widget_parent_class = NULL;
@@ -955,110 +958,6 @@ child_property_notify_dispatcher (GObject *object,
GTK_WIDGET_GET_CLASS (object)->dispatch_child_properties_changed (GTK_WIDGET (object), n_pspecs, pspecs);
}
/* We guard against the draw signal callbacks modifying the state of the
* cairo context by surounding it with save/restore.
* Maybe we should also cairo_new_path() just to be sure?
*/
static void
gtk_widget_draw_marshaller (GClosure *closure,
GValue *return_value,
guint n_param_values,
const GValue *param_values,
gpointer invocation_hint,
gpointer marshal_data)
{
GtkWidget *widget = g_value_get_object (&param_values[0]);
GdkEventExpose *tmp_event;
gboolean push_group;
cairo_t *cr = g_value_get_boxed (&param_values[1]);
cairo_save (cr);
tmp_event = _gtk_cairo_get_event (cr);
push_group =
widget->priv->opacity_group ||
(widget->priv->alpha != 255 &&
(!gtk_widget_get_has_window (widget) || tmp_event == NULL));
if (push_group)
{
cairo_push_group (cr);
gtk_cairo_set_event (cr, NULL);
}
_gtk_marshal_BOOLEAN__BOXED (closure,
return_value,
n_param_values,
param_values,
invocation_hint,
marshal_data);
if (push_group)
{
cairo_pop_group_to_source (cr);
cairo_set_operator (cr, CAIRO_OPERATOR_OVER);
cairo_paint_with_alpha (cr, widget->priv->alpha / 255.0);
}
gtk_cairo_set_event (cr, tmp_event);
cairo_restore (cr);
}
static void
gtk_widget_draw_marshallerv (GClosure *closure,
GValue *return_value,
gpointer instance,
va_list args,
gpointer marshal_data,
int n_params,
GType *param_types)
{
GtkWidget *widget = GTK_WIDGET (instance);
GdkEventExpose *tmp_event;
gboolean push_group;
cairo_t *cr;
va_list args_copy;
G_VA_COPY (args_copy, args);
cr = va_arg (args_copy, gpointer);
cairo_save (cr);
tmp_event = _gtk_cairo_get_event (cr);
push_group =
widget->priv->opacity_group ||
(widget->priv->alpha != 255 &&
(!gtk_widget_get_has_window (widget) || tmp_event == NULL));
if (push_group)
{
cairo_push_group (cr);
gtk_cairo_set_event (cr, NULL);
}
_gtk_marshal_BOOLEAN__BOXEDv (closure,
return_value,
instance,
args,
marshal_data,
n_params,
param_types);
if (push_group)
{
cairo_pop_group_to_source (cr);
cairo_set_operator (cr, CAIRO_OPERATOR_OVER);
cairo_paint_with_alpha (cr, widget->priv->alpha / 255.0);
}
gtk_cairo_set_event (cr, tmp_event);
cairo_restore (cr);
va_end (args_copy);
}
static void
gtk_widget_class_init (GtkWidgetClass *klass)
{
@@ -1181,6 +1080,7 @@ gtk_widget_class_init (GtkWidgetClass *klass)
klass->adjust_baseline_request = gtk_widget_real_adjust_baseline_request;
klass->adjust_size_allocation = gtk_widget_real_adjust_size_allocation;
klass->adjust_baseline_allocation = gtk_widget_real_adjust_baseline_allocation;
klass->queue_draw_region = gtk_widget_real_queue_draw_region;
g_object_class_install_property (gobject_class,
PROP_NAME,
@@ -1651,6 +1551,9 @@ gtk_widget_class_init (GtkWidgetClass *klass)
/**
* GtkWidget::show:
* @widget: the object which received the signal.
*
* The ::show signal is emitted when @widget is shown, for example with
* gtk_widget_show().
*/
widget_signals[SHOW] =
g_signal_new (I_("show"),
@@ -1664,6 +1567,9 @@ gtk_widget_class_init (GtkWidgetClass *klass)
/**
* GtkWidget::hide:
* @widget: the object which received the signal.
*
* The ::hide signal is emitted when @widget is hidden, for example with
* gtk_widget_hide().
*/
widget_signals[HIDE] =
g_signal_new (I_("hide"),
@@ -1677,6 +1583,16 @@ gtk_widget_class_init (GtkWidgetClass *klass)
/**
* GtkWidget::map:
* @widget: the object which received the signal.
*
* The ::map signal is emitted when @widget is going to be mapped, that is
* when the widget is visible (which is controlled with
* gtk_widget_set_visible()) and all its parents up to the toplevel widget
* are also visible. Once the map has occurred, #GtkWidget::map-event will
* be emitted.
*
* The ::map signal can be used to determine whether a widget will be drawn,
* for instance it can resume an animation that was stopped during the
* emission of #GtkWidget::unmap.
*/
widget_signals[MAP] =
g_signal_new (I_("map"),
@@ -1690,6 +1606,13 @@ gtk_widget_class_init (GtkWidgetClass *klass)
/**
* GtkWidget::unmap:
* @widget: the object which received the signal.
*
* The ::unmap signal is emitted when @widget is going to be unmapped, which
* means that either it or any of its parents up to the toplevel widget have
* been set as hidden.
*
* As ::unmap indicates that a widget will not be shown any longer, it can be
* used to, for example, stop an animation on the widget.
*/
widget_signals[UNMAP] =
g_signal_new (I_("unmap"),
@@ -1703,6 +1626,10 @@ gtk_widget_class_init (GtkWidgetClass *klass)
/**
* GtkWidget::realize:
* @widget: the object which received the signal.
*
* The ::realize signal is emitted when @widget is associated with a
* #GdkWindow, which means that gtk_wiget_realize() has been called or the
* widget has been mapped (that is, it is going to be drawn).
*/
widget_signals[REALIZE] =
g_signal_new (I_("realize"),
@@ -1716,6 +1643,11 @@ gtk_widget_class_init (GtkWidgetClass *klass)
/**
* GtkWidget::unrealize:
* @widget: the object which received the signal.
*
* The ::unrealize signal is emitted when the #GdkWindow associated with
* @widget is destroyed, which means that gtk_widget_unrealize() has been
* called or the widget has been unmapped (that is, it is going to be
* hidden).
*/
widget_signals[UNREALIZE] =
g_signal_new (I_("unrealize"),
@@ -1962,12 +1894,12 @@ gtk_widget_class_init (GtkWidgetClass *klass)
G_TYPE_FROM_CLASS (gobject_class),
G_SIGNAL_RUN_LAST,
G_STRUCT_OFFSET (GtkWidgetClass, draw),
_gtk_boolean_handled_accumulator, NULL,
gtk_widget_draw_marshaller,
_gtk_boolean_handled_accumulator, NULL,
_gtk_marshal_BOOLEAN__BOXED,
G_TYPE_BOOLEAN, 1,
CAIRO_GOBJECT_TYPE_CONTEXT);
CAIRO_GOBJECT_TYPE_CONTEXT | G_SIGNAL_TYPE_STATIC_SCOPE);
g_signal_set_va_marshaller (widget_signals[DRAW], G_TYPE_FROM_CLASS (klass),
gtk_widget_draw_marshallerv);
_gtk_marshal_BOOLEAN__BOXEDv);
/**
* GtkWidget::mnemonic-activate:
@@ -4203,8 +4135,6 @@ gtk_widget_unparent (GtkWidget *widget)
g_object_notify_queue_clear (G_OBJECT (widget), nqueue);
g_object_notify_queue_thaw (G_OBJECT (widget), nqueue);
gtk_widget_propagate_alpha (widget);
gtk_widget_pop_verify_invariants (widget);
g_object_unref (widget);
}
@@ -5034,6 +4964,15 @@ gtk_widget_unrealize (GtkWidget *widget)
* Draw queueing.
*****************************************/
static void
gtk_widget_real_queue_draw_region (GtkWidget *widget,
const cairo_region_t *region)
{
GtkWidgetPrivate *priv = widget->priv;
gdk_window_invalidate_region (priv->window, region, TRUE);
}
/**
* gtk_widget_queue_draw_region:
* @widget: a #GtkWidget
@@ -5071,7 +5010,7 @@ gtk_widget_queue_draw_region (GtkWidget *widget,
if (!gtk_widget_get_mapped (w))
return;
gdk_window_invalidate_region (priv->window, region, TRUE);
WIDGET_CLASS (widget)->queue_draw_region (widget, region);
}
/**
@@ -5399,8 +5338,9 @@ gtk_widget_size_allocate_with_baseline (GtkWidget *widget,
}
name = g_type_name (G_OBJECT_TYPE (G_OBJECT (widget)));
g_print ("gtk_widget_size_allocate: %*s%s %d %d",
g_print ("gtk_widget_size_allocate: %*s%s %d %d %d %d",
2 * depth, " ", name,
allocation->x, allocation->y,
allocation->width, allocation->height);
if (baseline != -1)
g_print (" baseline: %d", baseline);
@@ -6282,6 +6222,23 @@ gtk_widget_real_mnemonic_activate (GtkWidget *widget,
return TRUE;
}
static const cairo_user_data_key_t event_window_key;
GdkWindow *
_gtk_cairo_get_event_window (cairo_t *cr)
{
g_return_val_if_fail (cr != NULL, NULL);
return cairo_get_user_data (cr, &event_window_key);
}
static void
gtk_cairo_set_event_window (cairo_t *cr,
GdkWindow *event_window)
{
cairo_set_user_data (cr, &event_window_key, event_window, NULL);
}
static const cairo_user_data_key_t event_key;
GdkEventExpose *
@@ -6294,7 +6251,7 @@ _gtk_cairo_get_event (cairo_t *cr)
static void
gtk_cairo_set_event (cairo_t *cr,
GdkEventExpose *event)
GdkEventExpose *event)
{
cairo_set_user_data (cr, &event_key, event, NULL);
}
@@ -6323,15 +6280,15 @@ gboolean
gtk_cairo_should_draw_window (cairo_t *cr,
GdkWindow *window)
{
GdkEventExpose *event;
GdkWindow *event_window;
g_return_val_if_fail (cr != NULL, FALSE);
g_return_val_if_fail (GDK_IS_WINDOW (window), FALSE);
event = _gtk_cairo_get_event (cr);
event_window = _gtk_cairo_get_event_window (cr);
return event == NULL ||
event->window == window;
return event_window == NULL ||
event_window == window;
}
static gboolean
@@ -6348,17 +6305,20 @@ gtk_widget_get_clip_draw (GtkWidget *widget)
return TRUE;
}
/* code shared by gtk_container_propagate_draw() and
* gtk_widget_draw()
*/
void
static void
_gtk_widget_draw_internal (GtkWidget *widget,
cairo_t *cr,
gboolean clip_to_size)
gboolean clip_to_size,
GdkWindow *window)
{
GdkWindow *tmp_event_window;
if (!gtk_widget_is_drawable (widget))
return;
tmp_event_window = _gtk_cairo_get_event_window (cr);
gtk_cairo_set_event_window (cr, window);
clip_to_size &= gtk_widget_get_clip_draw (widget);
if (clip_to_size)
@@ -6374,10 +6334,14 @@ _gtk_widget_draw_internal (GtkWidget *widget,
{
gboolean result;
cairo_save (cr);
g_signal_emit (widget, widget_signals[DRAW],
0, cr,
&result);
cairo_restore (cr);
#ifdef G_ENABLE_DEBUG
if (G_UNLIKELY (gtk_get_debug_flags () & GTK_DEBUG_BASELINES))
{
@@ -6399,7 +6363,7 @@ _gtk_widget_draw_internal (GtkWidget *widget,
#endif
if (cairo_status (cr) &&
_gtk_cairo_get_event (cr))
_gtk_cairo_get_event_window (cr))
{
/* We check the event so we only warn about internal GTK calls.
* Errors might come from PDF streams having write failures and
@@ -6411,8 +6375,169 @@ _gtk_widget_draw_internal (GtkWidget *widget,
cairo_status_to_string (cairo_status (cr)));
}
}
gtk_cairo_set_event_window (cr, tmp_event_window);
}
/* Emit draw() on the widget that owns window,
and on any child windows that also belong
to the widget. */
static void
_gtk_widget_draw_windows (GdkWindow *window,
cairo_t *cr,
int window_x,
int window_y)
{
cairo_pattern_t *pattern;
gboolean do_clip;
GtkWidget *widget = NULL;
GList *children, *l;
int x, y;
if (!gdk_window_is_viewable (window))
return;
cairo_save (cr);
cairo_translate (cr, window_x, window_y);
cairo_rectangle (cr, 0, 0,
gdk_window_get_width (window),
gdk_window_get_height (window));
cairo_clip (cr);
if (gdk_cairo_get_clip_rectangle (cr, NULL))
{
gdk_window_get_user_data (window, (gpointer *) &widget);
/* Only clear bg if double bufferer. This is what we used
to do before, where begin_paint() did the clearing. */
pattern = gdk_window_get_background_pattern (window);
if (pattern != NULL &&
widget->priv->double_buffered)
{
cairo_save (cr);
cairo_set_source (cr, pattern);
cairo_paint (cr);
cairo_restore (cr);
}
do_clip = _gtk_widget_get_translation_to_window (widget, window,
&x, &y);
cairo_save (cr);
cairo_translate (cr, -x, -y);
_gtk_widget_draw_internal (widget, cr, do_clip, window);
cairo_restore (cr);
children = gdk_window_get_children_with_user_data (window, widget);
for (l = children; l != NULL; l = l->next)
{
GdkWindow *child_window = l->data;
GdkWindowType type;
int wx, wy;
if (!gdk_window_is_visible (child_window) ||
gdk_window_is_input_only (child_window))
continue;
type = gdk_window_get_window_type (child_window);
if (type == GDK_WINDOW_OFFSCREEN ||
type == GDK_WINDOW_FOREIGN)
continue;
gdk_window_get_position (child_window, &wx, &wy);
_gtk_widget_draw_windows (child_window, cr, wx,wy);
}
g_list_free (children);
}
cairo_restore (cr);
}
void
_gtk_widget_draw (GtkWidget *widget,
cairo_t *cr)
{
GdkWindow *window, *child_window;
GList *children, *l;
int wx, wy;
gboolean push_group;
GdkWindowType type;
/* We get expose events only on native windows, so the draw
* implementation has to walk the entire widget hierarchy, except
* that it stops at native subwindows while we're in an expose
* event (_gtk_cairo_get_event () != NULL).
*
* However, we need to properly clip drawing into child windows
* to avoid drawing outside if widgets use e.g. cairo_paint(), so
* we traverse over GdkWindows as well as GtkWidgets.
*
* In order to be able to have opacity groups for entire widgets
* that consists of multiple windows we collect all the windows
* that belongs to a widget and draw them in one go. This means
* we may somewhat reorder GdkWindows when we paint them, but
* thats not generally a problem, as if you want a guaranteed
* order you generally use a windowed widget where you control
* the window hierarchy.
*/
cairo_save (cr);
push_group =
widget->priv->opacity_group ||
(widget->priv->alpha != 255 &&
!gtk_widget_is_toplevel (widget));
if (push_group)
cairo_push_group (cr);
window = gtk_widget_get_window (widget);
if (gtk_widget_get_has_window (widget))
{
/* The widget will be completely contained in its window, so just
* expose that (and any child window belonging to the widget) */
_gtk_widget_draw_windows (window, cr, 0, 0);
}
else
{
/* The widget draws in its parent window, so we send a draw() for
* that. */
_gtk_widget_draw_internal (widget, cr, TRUE, window);
/* But, it may also have child windows in the parent which we should
* draw (after having drawn on the parent) */
children = gdk_window_get_children_with_user_data (window, widget);
for (l = children; l != NULL; l = l->next)
{
child_window = l->data;
if (!gdk_window_is_visible (child_window) ||
gdk_window_is_input_only (child_window))
continue;
type = gdk_window_get_window_type (child_window);
if (type == GDK_WINDOW_OFFSCREEN ||
type == GDK_WINDOW_FOREIGN)
continue;
gdk_window_get_position (child_window, &wx, &wy);
_gtk_widget_draw_windows (child_window, cr,
wx - widget->priv->allocation.x,
wy - widget->priv->allocation.y);
}
g_list_free (children);
}
if (push_group)
{
cairo_pop_group_to_source (cr);
cairo_set_operator (cr, CAIRO_OPERATOR_OVER);
cairo_paint_with_alpha (cr, widget->priv->alpha / 255.0);
}
cairo_restore (cr);
}
/**
* gtk_widget_draw:
* @widget: the widget to draw. It must be drawable (see
@@ -6443,24 +6568,11 @@ void
gtk_widget_draw (GtkWidget *widget,
cairo_t *cr)
{
GdkEventExpose *tmp_event;
g_return_if_fail (GTK_IS_WIDGET (widget));
g_return_if_fail (!widget->priv->alloc_needed);
g_return_if_fail (cr != NULL);
cairo_save (cr);
/* We have to reset the event here so that draw functions can call
* gtk_widget_draw() on random other widgets and get the desired
* effect: Drawing all contents, not just the current window.
*/
tmp_event = _gtk_cairo_get_event (cr);
gtk_cairo_set_event (cr, NULL);
_gtk_widget_draw_internal (widget, cr, TRUE);
gtk_cairo_set_event (cr, tmp_event);
cairo_restore (cr);
_gtk_widget_draw (widget, cr);
}
static gboolean
@@ -6755,8 +6867,6 @@ gtk_widget_send_expose (GtkWidget *widget,
{
gboolean result = FALSE;
cairo_t *cr;
int x, y;
gboolean do_clip;
g_return_val_if_fail (GTK_IS_WIDGET (widget), TRUE);
g_return_val_if_fail (gtk_widget_get_realized (widget), TRUE);
@@ -6764,21 +6874,18 @@ gtk_widget_send_expose (GtkWidget *widget,
g_return_val_if_fail (event->type == GDK_EXPOSE, TRUE);
cr = gdk_cairo_create (event->expose.window);
gtk_cairo_set_event (cr, &event->expose);
gdk_cairo_region (cr, event->expose.region);
cairo_clip (cr);
do_clip = _gtk_widget_get_translation_to_window (widget,
event->expose.window,
&x, &y);
cairo_translate (cr, -x, -y);
gtk_cairo_set_event (cr, &event->expose);
_gtk_widget_draw_internal (widget, cr, do_clip);
if (event->expose.window == widget->priv->window)
_gtk_widget_draw (widget, cr);
else
_gtk_widget_draw_windows (event->expose.window, cr, 0, 0);
/* unset here, so if someone keeps a reference to cr we
* don't leak the window. */
gtk_cairo_set_event (cr, NULL);
cairo_destroy (cr);
return result;
@@ -8460,6 +8567,9 @@ gtk_widget_get_app_paintable (GtkWidget *widget)
* expose events, since even the clearing to the background color or
* pixmap will not happen automatically (as it is done in
* gdk_window_begin_paint_region()).
*
* Since 3.10 this function only works for widgets with native
* windows.
**/
void
gtk_widget_set_double_buffered (GtkWidget *widget,
@@ -8718,8 +8828,6 @@ gtk_widget_set_parent (GtkWidget *widget,
gtk_widget_queue_compute_expand (parent);
}
gtk_widget_propagate_alpha (widget);
gtk_widget_pop_verify_invariants (widget);
}
@@ -11019,6 +11127,9 @@ gtk_widget_dispose (GObject *object)
g_clear_object (&priv->muxer);
g_list_free (priv->attached_windows);
priv->attached_windows = NULL;
G_OBJECT_CLASS (gtk_widget_parent_class)->dispose (object);
}
@@ -13522,7 +13633,7 @@ gtk_widget_buildable_custom_finished (GtkBuildable *buildable,
if (i < n_actions)
{
gchar *description;
const gchar *description;
if (action_data->translatable && action_data->description->len)
description = _gtk_builder_parser_translate (gtk_builder_get_translation_domain (builder),
@@ -14556,10 +14667,6 @@ gtk_widget_set_window (GtkWidget *widget,
{
priv->window = window;
if (gtk_widget_get_has_window (widget) && window != NULL && !gdk_window_has_native (window))
gdk_window_set_opacity (window,
priv->norender ? 0 : priv->alpha / 255.0);
g_object_notify (G_OBJECT (widget), "window");
}
}
@@ -14698,86 +14805,8 @@ gtk_widget_set_support_multidevice (GtkWidget *widget,
* in gtk_widget_set_opacity, secondly we can get it from the css opacity. These two
* are multiplied together to form the total alpha. Secondly, the user can specify
* an opacity group for a widget, which means we must essentially handle it as having alpha.
*
* We handle opacity in two ways. For a windowed widget, with opacity set but no opacity
* group we directly set the opacity of widget->window. This will cause gdk to properly
* redirect drawing inside the window to a buffer and do OVER paint_with_alpha.
*
* However, if the widget is not windowed, or the user specified an opacity group for the
* widget we do the opacity handling in the ::draw marshaller for the widget. A naive
* implementation of this would break for windowed widgets or descendant widgets with
* windows, as these would not be handled by the ::draw signal. To handle this we set
* all such gdkwindows as fully transparent and then override gtk_cairo_should_draw_window()
* to make the draw signal propagate to *all* child widgets/windows.
*
* Note: We don't make all child windows fully transparent, we stop at the first one
* in each branch when propagating down the hierarchy.
*/
/* This is called when priv->alpha or priv->opacity_group group changes, and should
* update priv->norender and GdkWindow opacity for this widget and any children that
* needs changing. It is also called whenver the parent changes, the parents
* norender_children state changes, or the has_window state of the widget changes.
*/
static void
gtk_widget_propagate_alpha (GtkWidget *widget)
{
GtkWidgetPrivate *priv = widget->priv;
GtkWidget *parent;
gboolean norender, norender_children;
GList *l;
parent = priv->parent;
/* Norender affects only windowed widget and means don't render widget->window in the
normal fashion.
We only set this if the parent has norender_children, because:
a) For an opacity group (that does not have a norender_children parent) we still
need to render the window or we will never get an expose event.
b) For alpha we set the opacity of window->widget directly, so no other
work is needed.
*/
norender = (parent != NULL && parent->priv->norender_children);
/* windows under this widget should not render if:
a) This widget has an opacity group
b) This widget has alpha and is no-windowed (otherwise we'd set alpha on widget->window)
c) This widget has norender but is no-windowed (a windowed widget would "swallow" the norender)
*/
norender_children =
priv->opacity_group ||
(!gtk_widget_get_has_window (widget) &&
( norender || priv->alpha != 255));
if (gtk_widget_get_has_window (widget))
{
if (priv->window != NULL &&
(!gdk_window_has_native (priv->window) || gtk_widget_is_toplevel (widget)))
gdk_window_set_opacity (priv->window,
norender ? 0 : priv->alpha / 255.0);
}
for (l = priv->registered_windows; l != NULL; l = l->next)
{
GdkWindow *w = l->data;
if (w != priv->window && !gdk_window_has_native (w))
gdk_window_set_opacity (w, norender_children ? 0.0 : 1.0);
}
priv->norender = norender;
if (priv->norender_children != norender_children)
{
priv->norender_children = norender_children;
if (GTK_IS_CONTAINER (widget))
gtk_container_forall (GTK_CONTAINER (widget), (GtkCallback)gtk_widget_propagate_alpha, NULL);
}
if (gtk_widget_get_realized (widget))
gtk_widget_queue_draw (widget);
}
static void
gtk_widget_update_alpha (GtkWidget *widget)
{
@@ -14804,8 +14833,12 @@ gtk_widget_update_alpha (GtkWidget *widget)
priv->alpha = alpha;
gtk_widget_propagate_alpha (widget);
if (gtk_widget_is_toplevel (widget))
gdk_window_set_opacity (priv->window,
priv->alpha / 255.0);
if (gtk_widget_get_realized (widget))
gtk_widget_queue_draw (widget);
}
static void
@@ -14825,7 +14858,8 @@ gtk_widget_set_has_opacity_group (GtkWidget *widget,
priv->opacity_group = has_opacity_group;
gtk_widget_propagate_alpha (widget);
if (gtk_widget_get_realized (widget))
gtk_widget_queue_draw (widget);
}
/**
+2 -1
View File
@@ -444,13 +444,14 @@ struct _GtkWidgetClass
gint *natural_baseline);
void (* adjust_baseline_allocation) (GtkWidget *widget,
gint *baseline);
void (*queue_draw_region) (GtkWidget *widget,
const cairo_region_t *region);
/*< private >*/
GtkWidgetClassPrivate *priv;
/* Padding for future expansion */
void (*_gtk_reserved5) (void);
void (*_gtk_reserved6) (void);
void (*_gtk_reserved7) (void);
};
+6 -4
View File
@@ -45,6 +45,8 @@ void _gtk_widget_set_shadowed (GtkWidget *widget,
gboolean _gtk_widget_get_alloc_needed (GtkWidget *widget);
void _gtk_widget_set_alloc_needed (GtkWidget *widget,
gboolean alloc_needed);
void _gtk_widget_draw (GtkWidget *widget,
cairo_t *cr);
void _gtk_widget_add_sizegroup (GtkWidget *widget,
gpointer group);
@@ -76,7 +78,9 @@ void _gtk_widget_get_preferred_size_for_size (GtkWidget *widget,
GtkOrientation orientation,
gint size,
gint *minimum,
gint *natural);
gint *natural,
gint *minimum_baseline,
gint *natural_baseline);
gboolean _gtk_widget_has_baseline_support (GtkWidget *widget);
gboolean _gtk_widget_get_translation_to_window (GtkWidget *widget,
@@ -89,11 +93,9 @@ const gchar* _gtk_widget_get_accel_path (GtkWidget *widget,
AtkObject * _gtk_widget_peek_accessible (GtkWidget *widget);
GdkWindow * _gtk_cairo_get_event_window (cairo_t *cr);
GdkEventExpose * _gtk_cairo_get_event (cairo_t *cr);
void _gtk_widget_draw_internal (GtkWidget *widget,
cairo_t *cr,
gboolean clip_to_size);
void _gtk_widget_set_has_default (GtkWidget *widget,
gboolean has_default);
void _gtk_widget_set_has_grab (GtkWidget *widget,
+11 -6
View File
@@ -2510,7 +2510,7 @@ remove_attach_widget (GtkWindow *window)
{
_gtk_widget_remove_attached_window (priv->attach_widget, window);
g_object_unref (priv->attach_widget);
g_object_remove_weak_pointer (priv->attach_widget, &priv->attach_widget);
priv->attach_widget = NULL;
}
}
@@ -2760,7 +2760,7 @@ gtk_window_set_attached_to (GtkWindow *window,
{
_gtk_widget_add_attached_window (priv->attach_widget, window);
g_object_ref (priv->attach_widget);
g_object_add_weak_pointer (priv->attach_widget, &priv->attach_widget);
}
/* Update the style, as the widget path might change. */
@@ -4871,6 +4871,10 @@ gtk_window_get_position (GtkWindow *window,
* Hides @window, then reshows it, resetting the
* default size and position of the window. Used
* by GUI builders only.
*
* Deprecated: 3.10: GUI builders can call gtk_widget_hide(),
* gtk_widget_unrealize() and then gtk_widget_show() on @window
* themselves, if they still need this functionality.
**/
void
gtk_window_reshow_with_initial_size (GtkWindow *window)
@@ -7834,9 +7838,6 @@ gtk_window_compute_configure_request_size (GtkWindow *window,
info = gtk_window_get_geometry_info (window, FALSE);
gtk_window_guess_default_size (window, width, height);
gtk_window_get_remembered_size (window, &w, &h);
*width = MAX (*width, w);
*height = MAX (*height, h);
/* If window is empty so requests 0, default to random nonzero size */
if (*width == 0 && *height == 0)
@@ -7846,7 +7847,6 @@ gtk_window_compute_configure_request_size (GtkWindow *window,
}
/* Override with default size */
if (info)
{
if (info->default_width > 0)
@@ -7860,6 +7860,11 @@ gtk_window_compute_configure_request_size (GtkWindow *window,
info->default_height > 0 ? height : NULL);
}
/* Override with last size of this window */
gtk_window_get_remembered_size (window, &w, &h);
*width = MAX (*width, w);
*height = MAX (*height, h);
/* Override any size with gtk_window_resize() values */
if (info)
{
+1
View File
@@ -315,6 +315,7 @@ GtkWindowGroup *gtk_window_get_group (GtkWindow *window);
gboolean gtk_window_has_group (GtkWindow *window);
/* Ignore this unless you are writing a GUI builder */
GDK_DEPRECATED_IN_3_10
void gtk_window_reshow_with_initial_size (GtkWindow *window);
GtkWindowType gtk_window_get_window_type (GtkWindow *window);
+4
View File
@@ -176,6 +176,10 @@ TEST_PROGS += objects-finalize
objects_finalize_SOURCES = objects-finalize.c
objects_finalize_LDADD = $(progs_ldadd)
TEST_PROGS += window
window_SOURCES = window.c
window_LDADD = $(progs_ldadd)
EXTRA_DIST += \
file-chooser-test-dir/empty \
file-chooser-test-dir/text.txt
+1 -1
View File
@@ -653,7 +653,7 @@ test_file_chooser_button_with_response (const FileChooserButtonTest *setup, gint
{
WindowAndButton w;
SignalWatcher *watcher;
GtkWidget *fc_dialog;
GtkWidget *fc_dialog = NULL;
int iterations;
int i;
+50
View File
@@ -0,0 +1,50 @@
#include <gtk/gtk.h>
static gboolean
stop_main (gpointer data)
{
gtk_main_quit ();
return G_SOURCE_REMOVE;
}
static void
test_default_size (void)
{
GtkWidget *window;
GtkWidget *box;
gint w, h;
window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
box = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0);
gtk_container_add (GTK_CONTAINER (window), box);
gtk_window_get_default_size (GTK_WINDOW (window), &w, &h);
g_assert (w == -1 && h == -1);
gtk_window_set_default_size (GTK_WINDOW (window), 300, 300);
gtk_window_get_default_size (GTK_WINDOW (window), &w, &h);
g_assert (w == 300 && h == 300);
gtk_widget_show_all (window);
g_timeout_add (1000, stop_main, NULL);
gtk_main ();
g_assert (gtk_widget_get_allocated_width (window) == 300);
g_assert (gtk_widget_get_allocated_height (window) == 300);
g_assert (gtk_widget_get_allocated_width (box) == 300);
g_assert (gtk_widget_get_allocated_height (box) == 300);
}
int
main (int argc, char *argv[])
{
gtk_test_init (&argc, &argv);
g_test_add_func ("/window/default-size", test_default_size);
return g_test_run ();
}
+2
View File
@@ -36,6 +36,8 @@ tests/reftests/border-image-url.ui
tests/reftests/box-packing.ui
tests/reftests/box-pseudo-classes.ref.ui
tests/reftests/box-pseudo-classes.ui
tests/reftests/button-wrapping.ref.ui
tests/reftests/button-wrapping.ui
tests/reftests/css-match-import.ref.ui
tests/reftests/css-match-import.ui
tests/reftests/css-match-inherit-different-state.ref.ui
+2691 -2248
View File
File diff suppressed because it is too large Load Diff
+2
View File
@@ -37,6 +37,8 @@ tests/reftests/border-image-url.ui
tests/reftests/box-packing.ui
tests/reftests/box-pseudo-classes.ref.ui
tests/reftests/box-pseudo-classes.ui
tests/reftests/button-wrapping.ref.ui
tests/reftests/button-wrapping.ui
tests/reftests/css-match-import.ref.ui
tests/reftests/css-match-import.ui
tests/reftests/css-match-inherit-different-state.ref.ui
+136 -138
View File
@@ -22,7 +22,7 @@
# Hendrik Richter <hendrikr@gnome.org>, 2004-2009.
# Hendrik Brandt <heb@gnome-de.org>, 2004-2005.
# Andre Klapper <ak-47@gmx.net>, 2008.
# Mario Blättermann <mario.blaettermann@gmail.com>, 2009-2012.
# Mario Blättermann <mario.blaettermann@gmail.com>, 2009-2013.
# Jakob Kramer <jakob.kramer@gmx.de>, 2010.
# Paul Seyfert <pseyfert@mathphys.fsk.uni-heidelberg.de>, 2011.
# Christian Kirbach <christian.kirbach@gmail.com>, 2009-2011, 2012.
@@ -32,8 +32,8 @@ msgstr ""
"Project-Id-Version: GTK+ master\n"
"Report-Msgid-Bugs-To: http://bugzilla.gnome.org/enter_bug.cgi?product=gtk"
"%2b&keywords=I18N+L10N&component=general\n"
"POT-Creation-Date: 2013-03-20 23:44+0000\n"
"PO-Revision-Date: 2013-03-21 09:40+0100\n"
"POT-Creation-Date: 2013-04-27 17:41+0000\n"
"PO-Revision-Date: 2013-04-27 21:40+0100\n"
"Last-Translator: Mario Blättermann <mario.blaettermann@gmail.com>\n"
"Language-Team: Deutsch <gnome-de@gnome.org>\n"
"Language: de_DE\n"
@@ -41,9 +41,7 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
"X-Generator: Poedit 1.5.5\n"
"X-Poedit-Language: German\n"
"X-Poedit-Country: GERMANY\n"
"X-Generator: Poedit 1.5.4\n"
#: ../gdk/gdk.c:157
#, c-format
@@ -304,132 +302,132 @@ msgstr "Entf"
#. Translators: 'Mon' means Monitor here, and the XF86 prefix should be removed
#: ../gdk/keyname-table.h:3991
msgctxt "keyboard label"
msgid "MonBrightnessUp"
msgid "XF86MonBrightnessUp"
msgstr "Monitorhelligkeit erhöhen"
#: ../gdk/keyname-table.h:3992
msgctxt "keyboard label"
msgid "MonBrightnessDown"
msgid "XF86MonBrightnessDown"
msgstr "Monitorhelligkeit senken"
#: ../gdk/keyname-table.h:3993
msgctxt "keyboard label"
msgid "AudioMute"
msgid "XF86AudioMute"
msgstr "Stumm schalten"
#: ../gdk/keyname-table.h:3994
msgctxt "keyboard label"
msgid "AudioLowerVolume"
msgid "XF86AudioLowerVolume"
msgstr "Lautstärke senken"
#: ../gdk/keyname-table.h:3995
msgctxt "keyboard label"
msgid "AudioRaiseVolume"
msgid "XF86AudioRaiseVolume"
msgstr "Lautstärke erhöhen"
#: ../gdk/keyname-table.h:3996
msgctxt "keyboard label"
msgid "AudioPlay"
msgid "XF86AudioPlay"
msgstr "Wiedergabe starten"
#: ../gdk/keyname-table.h:3997
msgctxt "keyboard label"
msgid "AudioStop"
msgid "XF86AudioStop"
msgstr "Wiedergabe stoppen"
#: ../gdk/keyname-table.h:3998
msgctxt "keyboard label"
msgid "AudioNext"
msgid "XF86AudioNext"
msgstr "Nächster Titel"
#: ../gdk/keyname-table.h:3999
msgctxt "keyboard label"
msgid "AudioPrev"
msgid "XF86AudioPrev"
msgstr "Vorheriger Titel"
#: ../gdk/keyname-table.h:4000
msgctxt "keyboard label"
msgid "AudioRecord"
msgid "XF86AudioRecord"
msgstr "Aufnahme starten"
#: ../gdk/keyname-table.h:4001
msgctxt "keyboard label"
msgid "AudioPause"
msgid "XF86AudioPause"
msgstr "Aufnahme pausieren"
#: ../gdk/keyname-table.h:4002
msgctxt "keyboard label"
msgid "AudioRewind"
msgid "XF86AudioRewind"
msgstr "Zurückspulen"
#: ../gdk/keyname-table.h:4003
msgctxt "keyboard label"
msgid "AudioMedia"
msgstr "AudioMedia"
msgid "XF86AudioMedia"
msgstr "XF86AudioMedia"
#: ../gdk/keyname-table.h:4004
msgctxt "keyboard label"
msgid "ScreenSaver"
msgid "XF86ScreenSaver"
msgstr "Bildschirmschoner"
#: ../gdk/keyname-table.h:4005
msgctxt "keyboard label"
msgid "Battery"
msgid "XF86Battery"
msgstr "Batterie"
#: ../gdk/keyname-table.h:4006
msgctxt "keyboard label"
msgid "Launch1"
msgid "XF86Launch1"
msgstr "Starten1"
#: ../gdk/keyname-table.h:4007
msgctxt "keyboard label"
msgid "Forward"
msgid "XF86Forward"
msgstr "Vorwärts"
#: ../gdk/keyname-table.h:4008
msgctxt "keyboard label"
msgid "Back"
msgid "XF86Back"
msgstr "Rückwärts"
#: ../gdk/keyname-table.h:4009
msgctxt "keyboard label"
msgid "Sleep"
msgid "XF86Sleep"
msgstr "Bereitschaft"
#: ../gdk/keyname-table.h:4010
msgctxt "keyboard label"
msgid "Hibernate"
msgid "XF86Hibernate"
msgstr "Ruhezustand"
#: ../gdk/keyname-table.h:4011
msgctxt "keyboard label"
msgid "WLAN"
msgid "XF86WLAN"
msgstr "WLAN"
#: ../gdk/keyname-table.h:4012
msgctxt "keyboard label"
msgid "WebCam"
msgid "XF86WebCam"
msgstr "WebCam"
#: ../gdk/keyname-table.h:4013
msgctxt "keyboard label"
msgid "Display"
msgid "XF86Display"
msgstr "Anzeige"
#: ../gdk/keyname-table.h:4014
msgctxt "keyboard label"
msgid "TouchpadToggle"
msgstr "TouchpadToggle"
msgid "XF86TouchpadToggle"
msgstr "XF86TouchpadToggle"
#: ../gdk/keyname-table.h:4015
msgctxt "keyboard label"
msgid "WakeUp"
msgid "XF86WakeUp"
msgstr "Aufwecken"
#: ../gdk/keyname-table.h:4016
msgctxt "keyboard label"
msgid "Suspend"
msgid "XF86Suspend"
msgstr "In Bereitschaft versetzen"
#. Description of --sync in --help output
@@ -513,7 +511,7 @@ msgstr "Bearbeiten"
#: ../gtk/a11y/gtkcellaccessible.c:262
#: ../gtk/a11y/gtkcolorswatchaccessible.c:72
#: ../gtk/a11y/gtkentryaccessible.c:1541
#: ../gtk/a11y/gtkentryaccessible.c:1557
#: ../gtk/a11y/gtkexpanderaccessible.c:281
msgctxt "Action name"
msgid "Activate"
@@ -571,7 +569,7 @@ msgctxt "Action description"
msgid "Presses the combobox"
msgstr "Klickt das Kombinationsfeld an"
#: ../gtk/a11y/gtkentryaccessible.c:1550
#: ../gtk/a11y/gtkentryaccessible.c:1566
msgctxt "Action description"
msgid "Activates the entry"
msgstr "Eintrag aktivieren"
@@ -769,8 +767,8 @@ msgstr ""
#. * since we want to save the color first
#.
#: ../gtk/deprecated/gtkcolorseldialog.c:201 ../gtk/gtkappchooserdialog.c:509
#: ../gtk/gtkcolorchooserdialog.c:150 ../gtk/gtkfontchooserdialog.c:174
#: ../gtk/gtkprinteroptionwidget.c:550
#: ../gtk/gtkcolorchooserdialog.c:149 ../gtk/gtkfontchooserdialog.c:174
#: ../gtk/gtkprinteroptionwidget.c:552
msgid "_Select"
msgstr "Aus_wählen"
@@ -1014,7 +1012,7 @@ msgstr ""
#: ../gtk/gtkapplicationwindow.c:333 ../gtk/gtkprintoperation-unix.c:480
#: ../gtk/gtkprintoperation-win32.c:1445
msgid "Application"
msgstr "Anwendunge"
msgstr "Anwendung"
#: ../gtk/gtkassistant.c:1008
msgid "C_ontinue"
@@ -1177,7 +1175,7 @@ msgstr "%d %%"
msgid "Pick a Color"
msgstr "Wählen Sie eine Farbe"
#: ../gtk/gtkcolorchooserdialog.c:164
#: ../gtk/gtkcolorchooserdialog.c:162
msgid "Select a Color"
msgstr "Farbe auswählen"
@@ -1925,12 +1923,12 @@ msgid "System (%s)"
msgstr "System (%s)"
#. Open Link
#: ../gtk/gtklabel.c:6144
#: ../gtk/gtklabel.c:6167
msgid "_Open Link"
msgstr "Link ö_ffnen"
#. Copy Link Address
#: ../gtk/gtklabel.c:6156
#: ../gtk/gtklabel.c:6179
msgid "Copy _Link Address"
msgstr "Link-Adresse _kopieren"
@@ -2243,11 +2241,11 @@ msgstr "Dateisystem-Wurzel"
msgid "Authentication"
msgstr "Legitimation"
#: ../gtk/gtkprinteroptionwidget.c:546
#: ../gtk/gtkprinteroptionwidget.c:548
msgid "Select a filename"
msgstr "Dateiname auswählen"
#: ../gtk/gtkprinteroptionwidget.c:770
#: ../gtk/gtkprinteroptionwidget.c:772
msgid "Not available"
msgstr "Nicht verfügbar"
@@ -2343,7 +2341,7 @@ msgstr "Kein Papier mehr"
#. Translators: this is a printer status.
#: ../gtk/gtkprintoperation-win32.c:613
#: ../modules/printbackends/cups/gtkprintbackendcups.c:2286
#: ../modules/printbackends/cups/gtkprintbackendcups.c:2288
msgid "Paused"
msgstr "Pausiert"
@@ -2470,42 +2468,42 @@ msgstr "Allgemein"
#. * multiple pages on a sheet when printing
#.
#: ../gtk/gtkprintunixdialog.c:3058
#: ../modules/printbackends/cups/gtkprintbackendcups.c:4622
#: ../modules/printbackends/cups/gtkprintbackendcups.c:4634
msgid "Left to right, top to bottom"
msgstr "Links nach rechts, oben nach unten"
#: ../gtk/gtkprintunixdialog.c:3058
#: ../modules/printbackends/cups/gtkprintbackendcups.c:4622
#: ../modules/printbackends/cups/gtkprintbackendcups.c:4634
msgid "Left to right, bottom to top"
msgstr "Links nach rechts, unten nach oben"
#: ../gtk/gtkprintunixdialog.c:3059
#: ../modules/printbackends/cups/gtkprintbackendcups.c:4623
#: ../modules/printbackends/cups/gtkprintbackendcups.c:4635
msgid "Right to left, top to bottom"
msgstr "Rechts nach links, oben nach unten"
#: ../gtk/gtkprintunixdialog.c:3059
#: ../modules/printbackends/cups/gtkprintbackendcups.c:4623
#: ../modules/printbackends/cups/gtkprintbackendcups.c:4635
msgid "Right to left, bottom to top"
msgstr "Rechts nach links, unten nach oben"
#: ../gtk/gtkprintunixdialog.c:3060
#: ../modules/printbackends/cups/gtkprintbackendcups.c:4624
#: ../modules/printbackends/cups/gtkprintbackendcups.c:4636
msgid "Top to bottom, left to right"
msgstr "Oben nach unten, links nach rechts"
#: ../gtk/gtkprintunixdialog.c:3060
#: ../modules/printbackends/cups/gtkprintbackendcups.c:4624
#: ../modules/printbackends/cups/gtkprintbackendcups.c:4636
msgid "Top to bottom, right to left"
msgstr "Oben nach unten, rechts nach links"
#: ../gtk/gtkprintunixdialog.c:3061
#: ../modules/printbackends/cups/gtkprintbackendcups.c:4625
#: ../modules/printbackends/cups/gtkprintbackendcups.c:4637
msgid "Bottom to top, left to right"
msgstr "Unten nach oben, links nach rechts"
#: ../gtk/gtkprintunixdialog.c:3061
#: ../modules/printbackends/cups/gtkprintbackendcups.c:4625
#: ../modules/printbackends/cups/gtkprintbackendcups.c:4637
msgid "Bottom to top, right to left"
msgstr "Unten nach oben, rechts nach links"
@@ -2513,7 +2511,7 @@ msgstr "Unten nach oben, rechts nach links"
#. * dialog that controls in what order multiple pages are arranged
#.
#: ../gtk/gtkprintunixdialog.c:3065 ../gtk/gtkprintunixdialog.c:3078
#: ../modules/printbackends/cups/gtkprintbackendcups.c:4702
#: ../modules/printbackends/cups/gtkprintbackendcups.c:4714
msgid "Page Ordering"
msgstr "Reihenfolge"
@@ -4545,268 +4543,268 @@ msgstr "Vietnamesisch (VIQR)"
msgid "X Input Method"
msgstr "X-Eingabemethode"
#: ../modules/printbackends/cups/gtkprintbackendcups.c:1002
#: ../modules/printbackends/cups/gtkprintbackendcups.c:1217
#: ../modules/printbackends/cups/gtkprintbackendcups.c:1004
#: ../modules/printbackends/cups/gtkprintbackendcups.c:1219
msgid "Username:"
msgstr "Benutzername:"
#: ../modules/printbackends/cups/gtkprintbackendcups.c:1003
#: ../modules/printbackends/cups/gtkprintbackendcups.c:1226
#: ../modules/printbackends/cups/gtkprintbackendcups.c:1005
#: ../modules/printbackends/cups/gtkprintbackendcups.c:1228
msgid "Password:"
msgstr "Passwort:"
#: ../modules/printbackends/cups/gtkprintbackendcups.c:1042
#: ../modules/printbackends/cups/gtkprintbackendcups.c:1239
#: ../modules/printbackends/cups/gtkprintbackendcups.c:1044
#: ../modules/printbackends/cups/gtkprintbackendcups.c:1241
#, c-format
msgid "Authentication is required to print document '%s' on printer %s"
msgstr "Das Drucken von Dokument »%s« auf Drucker %s erfordert Legitimation"
#: ../modules/printbackends/cups/gtkprintbackendcups.c:1044
#: ../modules/printbackends/cups/gtkprintbackendcups.c:1046
#, c-format
msgid "Authentication is required to print a document on %s"
msgstr "Das Drucken eines Dokuments auf %s erfordert Legitimation"
#: ../modules/printbackends/cups/gtkprintbackendcups.c:1048
#: ../modules/printbackends/cups/gtkprintbackendcups.c:1050
#, c-format
msgid "Authentication is required to get attributes of job '%s'"
msgstr ""
"Das Auslesen von Attributen des Druckauftrags »%s« erfordert Legitimation"
#: ../modules/printbackends/cups/gtkprintbackendcups.c:1050
#: ../modules/printbackends/cups/gtkprintbackendcups.c:1052
msgid "Authentication is required to get attributes of a job"
msgstr "Das Auslesen von Attributen eines Druckauftrags erfordert Legitimation"
#: ../modules/printbackends/cups/gtkprintbackendcups.c:1054
#: ../modules/printbackends/cups/gtkprintbackendcups.c:1056
#, c-format
msgid "Authentication is required to get attributes of printer %s"
msgstr "Das Auslesen von Attributen des Druckers %s erfordert Legitimation"
#: ../modules/printbackends/cups/gtkprintbackendcups.c:1056
#: ../modules/printbackends/cups/gtkprintbackendcups.c:1058
msgid "Authentication is required to get attributes of a printer"
msgstr "Das Auslesen von Attributen eines Druckers erfordert Legitimation"
#: ../modules/printbackends/cups/gtkprintbackendcups.c:1059
#: ../modules/printbackends/cups/gtkprintbackendcups.c:1061
#, c-format
msgid "Authentication is required to get default printer of %s"
msgstr "Das Feststellen des Vorgabedruckers auf %s erfordert Legitimation"
#: ../modules/printbackends/cups/gtkprintbackendcups.c:1062
#: ../modules/printbackends/cups/gtkprintbackendcups.c:1064
#, c-format
msgid "Authentication is required to get printers from %s"
msgstr "Das Auslesen von Druckern auf %s erfordert Legitimation"
#: ../modules/printbackends/cups/gtkprintbackendcups.c:1067
#: ../modules/printbackends/cups/gtkprintbackendcups.c:1069
#, c-format
msgid "Authentication is required to get a file from %s"
msgstr "Der Zugriff auf eine Datei von %s erfordert Legitimation"
#: ../modules/printbackends/cups/gtkprintbackendcups.c:1069
#: ../modules/printbackends/cups/gtkprintbackendcups.c:1071
#, c-format
msgid "Authentication is required on %s"
msgstr "Der Zugriff auf %s erfordert Legitimation"
#: ../modules/printbackends/cups/gtkprintbackendcups.c:1211
#: ../modules/printbackends/cups/gtkprintbackendcups.c:1213
msgid "Domain:"
msgstr "Domäne:"
#: ../modules/printbackends/cups/gtkprintbackendcups.c:1241
#: ../modules/printbackends/cups/gtkprintbackendcups.c:1243
#, c-format
msgid "Authentication is required to print document '%s'"
msgstr "Das Drucken eines Dokuments »%s« erfordert Legitimation"
#: ../modules/printbackends/cups/gtkprintbackendcups.c:1246
#: ../modules/printbackends/cups/gtkprintbackendcups.c:1248
#, c-format
msgid "Authentication is required to print this document on printer %s"
msgstr "Das Drucken dieses Dokuments auf Drucker %s erfordert Legitimation"
#: ../modules/printbackends/cups/gtkprintbackendcups.c:1248
#: ../modules/printbackends/cups/gtkprintbackendcups.c:1250
msgid "Authentication is required to print this document"
msgstr "Das Drucken dieses Dokuments erfordert Legitimation"
#: ../modules/printbackends/cups/gtkprintbackendcups.c:1810
#: ../modules/printbackends/cups/gtkprintbackendcups.c:1812
#, c-format
msgid "Printer '%s' is low on toner."
msgstr "Drucker »%s« hat nur noch wenig Toner."
#: ../modules/printbackends/cups/gtkprintbackendcups.c:1811
#: ../modules/printbackends/cups/gtkprintbackendcups.c:1813
#, c-format
msgid "Printer '%s' has no toner left."
msgstr "Drucker »%s« hat keinen Toner mehr."
#. Translators: "Developer" like on photo development context
#: ../modules/printbackends/cups/gtkprintbackendcups.c:1813
#: ../modules/printbackends/cups/gtkprintbackendcups.c:1815
#, c-format
msgid "Printer '%s' is low on developer."
msgstr "Drucker »%s« hat nur noch wenig Entwickler."
#. Translators: "Developer" like on photo development context
#: ../modules/printbackends/cups/gtkprintbackendcups.c:1815
#: ../modules/printbackends/cups/gtkprintbackendcups.c:1817
#, c-format
msgid "Printer '%s' is out of developer."
msgstr "Drucker »%s« hat keinen Entwickler mehr."
#. Translators: "marker" is one color bin of the printer
#: ../modules/printbackends/cups/gtkprintbackendcups.c:1817
#: ../modules/printbackends/cups/gtkprintbackendcups.c:1819
#, c-format
msgid "Printer '%s' is low on at least one marker supply."
msgstr ""
"Drucker »%s« hat nur noch wenig Farbe für mindestens einen Farbbehälter."
#. Translators: "marker" is one color bin of the printer
#: ../modules/printbackends/cups/gtkprintbackendcups.c:1819
#: ../modules/printbackends/cups/gtkprintbackendcups.c:1821
#, c-format
msgid "Printer '%s' is out of at least one marker supply."
msgstr "Drucker »%s« hat keine Farbe mehr für mindestens einen Farbbehälter."
#: ../modules/printbackends/cups/gtkprintbackendcups.c:1820
#: ../modules/printbackends/cups/gtkprintbackendcups.c:1822
#, c-format
msgid "The cover is open on printer '%s'."
msgstr "Die Abdeckung des Druckers »%s« ist geöffnet."
#: ../modules/printbackends/cups/gtkprintbackendcups.c:1821
#: ../modules/printbackends/cups/gtkprintbackendcups.c:1823
#, c-format
msgid "The door is open on printer '%s'."
msgstr "Die Klappe des Druckers »%s« ist geöffnet."
#: ../modules/printbackends/cups/gtkprintbackendcups.c:1822
#: ../modules/printbackends/cups/gtkprintbackendcups.c:1824
#, c-format
msgid "Printer '%s' is low on paper."
msgstr "Der Drucker »%s« hat nur noch wenig Papier."
#: ../modules/printbackends/cups/gtkprintbackendcups.c:1823
#: ../modules/printbackends/cups/gtkprintbackendcups.c:1825
#, c-format
msgid "Printer '%s' is out of paper."
msgstr "Der Drucker »%s« hat kein Papier mehr."
#: ../modules/printbackends/cups/gtkprintbackendcups.c:1824
#: ../modules/printbackends/cups/gtkprintbackendcups.c:1826
#, c-format
msgid "Printer '%s' is currently offline."
msgstr "Der Drucker »%s« ist momentan nicht betriebsbereit."
#: ../modules/printbackends/cups/gtkprintbackendcups.c:1825
#: ../modules/printbackends/cups/gtkprintbackendcups.c:1827
#, c-format
msgid "There is a problem on printer '%s'."
msgstr "Es besteht ein Problem mit dem Drucker »%s«."
#. Translators: this is a printer status.
#: ../modules/printbackends/cups/gtkprintbackendcups.c:2283
#: ../modules/printbackends/cups/gtkprintbackendcups.c:2285
msgid "Paused; Rejecting Jobs"
msgstr "Pausiert; Aufträge werden abgewiesen"
#. Translators: this is a printer status.
#: ../modules/printbackends/cups/gtkprintbackendcups.c:2289
#: ../modules/printbackends/cups/gtkprintbackendcups.c:2291
msgid "Rejecting Jobs"
msgstr "Aufträge werden abgewiesen"
#. Translators: this string connects multiple printer states together.
#: ../modules/printbackends/cups/gtkprintbackendcups.c:2331
#: ../modules/printbackends/cups/gtkprintbackendcups.c:2333
msgid "; "
msgstr "; "
#: ../modules/printbackends/cups/gtkprintbackendcups.c:3845
#: ../modules/printbackends/cups/gtkprintbackendcups.c:3857
msgid "Two Sided"
msgstr "Beidseitig"
#: ../modules/printbackends/cups/gtkprintbackendcups.c:3846
#: ../modules/printbackends/cups/gtkprintbackendcups.c:3858
msgid "Paper Type"
msgstr "Papierart"
#: ../modules/printbackends/cups/gtkprintbackendcups.c:3847
#: ../modules/printbackends/cups/gtkprintbackendcups.c:3859
msgid "Paper Source"
msgstr "Papiereinzug"
#: ../modules/printbackends/cups/gtkprintbackendcups.c:3848
#: ../modules/printbackends/cups/gtkprintbackendcups.c:3860
msgid "Output Tray"
msgstr "Ausgabeschacht"
#: ../modules/printbackends/cups/gtkprintbackendcups.c:3849
#: ../modules/printbackends/cups/gtkprintbackendcups.c:3861
msgid "Resolution"
msgstr "Auflösung"
#: ../modules/printbackends/cups/gtkprintbackendcups.c:3850
#: ../modules/printbackends/cups/gtkprintbackendcups.c:3862
msgid "GhostScript pre-filtering"
msgstr "GhostScript-Vorfilterung"
#: ../modules/printbackends/cups/gtkprintbackendcups.c:3859
#: ../modules/printbackends/cups/gtkprintbackendcups.c:3871
msgid "One Sided"
msgstr "Einseitig"
#. Translators: this is an option of "Two Sided"
#: ../modules/printbackends/cups/gtkprintbackendcups.c:3861
#: ../modules/printbackends/cups/gtkprintbackendcups.c:3873
msgid "Long Edge (Standard)"
msgstr "Langer Rand (Vorgabe)"
#. Translators: this is an option of "Two Sided"
#: ../modules/printbackends/cups/gtkprintbackendcups.c:3863
#: ../modules/printbackends/cups/gtkprintbackendcups.c:3875
msgid "Short Edge (Flip)"
msgstr "Kurzer Rand (Umdrehen)"
#. Translators: this is an option of "Paper Source"
#: ../modules/printbackends/cups/gtkprintbackendcups.c:3865
#: ../modules/printbackends/cups/gtkprintbackendcups.c:3867
#: ../modules/printbackends/cups/gtkprintbackendcups.c:3875
#: ../modules/printbackends/cups/gtkprintbackendcups.c:3877
#: ../modules/printbackends/cups/gtkprintbackendcups.c:3879
#: ../modules/printbackends/cups/gtkprintbackendcups.c:3887
msgid "Auto Select"
msgstr "Automatische Auswahl"
#. Translators: this is an option of "Paper Source"
#. Translators: this is an option of "Resolution"
#: ../modules/printbackends/cups/gtkprintbackendcups.c:3869
#: ../modules/printbackends/cups/gtkprintbackendcups.c:3871
#: ../modules/printbackends/cups/gtkprintbackendcups.c:3873
#: ../modules/printbackends/cups/gtkprintbackendcups.c:3877
#: ../modules/printbackends/cups/gtkprintbackendcups.c:4365
#: ../modules/printbackends/cups/gtkprintbackendcups.c:3881
#: ../modules/printbackends/cups/gtkprintbackendcups.c:3883
#: ../modules/printbackends/cups/gtkprintbackendcups.c:3885
#: ../modules/printbackends/cups/gtkprintbackendcups.c:3889
#: ../modules/printbackends/cups/gtkprintbackendcups.c:4377
msgid "Printer Default"
msgstr "Vorgabe-Drucker"
#. Translators: this is an option of "GhostScript"
#: ../modules/printbackends/cups/gtkprintbackendcups.c:3879
#: ../modules/printbackends/cups/gtkprintbackendcups.c:3891
msgid "Embed GhostScript fonts only"
msgstr "Nur GhostScript-Schriften einbinden"
#. Translators: this is an option of "GhostScript"
#: ../modules/printbackends/cups/gtkprintbackendcups.c:3881
#: ../modules/printbackends/cups/gtkprintbackendcups.c:3893
msgid "Convert to PS level 1"
msgstr "Zu PS Level 1 konvertieren"
#. Translators: this is an option of "GhostScript"
#: ../modules/printbackends/cups/gtkprintbackendcups.c:3883
#: ../modules/printbackends/cups/gtkprintbackendcups.c:3895
msgid "Convert to PS level 2"
msgstr "Zu PS Level 2 konvertieren"
#. Translators: this is an option of "GhostScript"
#: ../modules/printbackends/cups/gtkprintbackendcups.c:3885
#: ../modules/printbackends/cups/gtkprintbackendcups.c:3897
msgid "No pre-filtering"
msgstr "Keine Vorfilterung"
#. Translators: "Miscellaneous" is the label for a button, that opens
#. up an extra panel of settings in a print dialog.
#: ../modules/printbackends/cups/gtkprintbackendcups.c:3894
#: ../modules/printbackends/cups/gtkprintbackendcups.c:3906
msgid "Miscellaneous"
msgstr "Erweitert"
#. Translators: These strings name the possible values of the
#. * job priority option in the print dialog
#.
#: ../modules/printbackends/cups/gtkprintbackendcups.c:4617
#: ../modules/printbackends/cups/gtkprintbackendcups.c:4629
msgid "Urgent"
msgstr "Dringend"
#: ../modules/printbackends/cups/gtkprintbackendcups.c:4617
#: ../modules/printbackends/cups/gtkprintbackendcups.c:4629
msgid "High"
msgstr "Hoch"
#: ../modules/printbackends/cups/gtkprintbackendcups.c:4617
#: ../modules/printbackends/cups/gtkprintbackendcups.c:4629
msgid "Medium"
msgstr "Mittel"
#: ../modules/printbackends/cups/gtkprintbackendcups.c:4617
#: ../modules/printbackends/cups/gtkprintbackendcups.c:4629
msgid "Low"
msgstr "Niedrig"
#. Translators, this string is used to label the job priority option
#. * in the print dialog
#.
#: ../modules/printbackends/cups/gtkprintbackendcups.c:4647
#: ../modules/printbackends/cups/gtkprintbackendcups.c:4659
msgid "Job Priority"
msgstr "Priorität"
@@ -4814,59 +4812,59 @@ msgstr "Priorität"
#. Translators, this string is used to label the billing info entry
#. * in the print dialog
#.
#: ../modules/printbackends/cups/gtkprintbackendcups.c:4658
#: ../modules/printbackends/cups/gtkprintbackendcups.c:4670
msgid "Billing Info"
msgstr "Abrechnungsinfo"
#. Translators, these strings are names for various 'standard' cover
#. * pages that the printing system may support.
#.
#: ../modules/printbackends/cups/gtkprintbackendcups.c:4673
#: ../modules/printbackends/cups/gtkprintbackendcups.c:4685
msgid "None"
msgstr "Keine"
#: ../modules/printbackends/cups/gtkprintbackendcups.c:4673
#: ../modules/printbackends/cups/gtkprintbackendcups.c:4685
msgid "Classified"
msgstr "Klassifiziert"
#: ../modules/printbackends/cups/gtkprintbackendcups.c:4673
#: ../modules/printbackends/cups/gtkprintbackendcups.c:4685
msgid "Confidential"
msgstr "Vertraulich"
#: ../modules/printbackends/cups/gtkprintbackendcups.c:4673
#: ../modules/printbackends/cups/gtkprintbackendcups.c:4685
msgid "Secret"
msgstr "Geheim"
#: ../modules/printbackends/cups/gtkprintbackendcups.c:4673
#: ../modules/printbackends/cups/gtkprintbackendcups.c:4685
msgid "Standard"
msgstr "Standard"
#: ../modules/printbackends/cups/gtkprintbackendcups.c:4673
#: ../modules/printbackends/cups/gtkprintbackendcups.c:4685
msgid "Top Secret"
msgstr "Streng geheim"
#: ../modules/printbackends/cups/gtkprintbackendcups.c:4673
#: ../modules/printbackends/cups/gtkprintbackendcups.c:4685
msgid "Unclassified"
msgstr "Unklassifiziert"
#. Translators, this string is used to label the pages-per-sheet option
#. * in the print dialog
#.
#: ../modules/printbackends/cups/gtkprintbackendcups.c:4684
#: ../modules/printbackends/cups/gtkprintbackendcups.c:4696
msgid "Pages per Sheet"
msgstr "Seiten pro Blatt"
#. Translators, this is the label used for the option in the print
#. * dialog that controls the front cover page.
#.
#: ../modules/printbackends/cups/gtkprintbackendcups.c:4744
#: ../modules/printbackends/cups/gtkprintbackendcups.c:4756
msgid "Before"
msgstr "Vorne"
#. Translators, this is the label used for the option in the print
#. * dialog that controls the back cover page.
#.
#: ../modules/printbackends/cups/gtkprintbackendcups.c:4759
#: ../modules/printbackends/cups/gtkprintbackendcups.c:4771
msgid "After"
msgstr "Hinten"
@@ -4874,14 +4872,14 @@ msgstr "Hinten"
#. * a print job is printed. Possible values are 'now', a specified time,
#. * or 'on hold'
#.
#: ../modules/printbackends/cups/gtkprintbackendcups.c:4779
#: ../modules/printbackends/cups/gtkprintbackendcups.c:4791
msgid "Print at"
msgstr "Drucken um"
#. Translators: this is the name of the option that allows the user
#. * to specify a time when a print job will be printed.
#.
#: ../modules/printbackends/cups/gtkprintbackendcups.c:4790
#: ../modules/printbackends/cups/gtkprintbackendcups.c:4802
msgid "Print at time"
msgstr "Drucken zu Uhrzeit"
@@ -4889,17 +4887,17 @@ msgstr "Drucken zu Uhrzeit"
#. * size. The two placeholders are replaced with the width and height
#. * in points. E.g: "Custom 230.4x142.9"
#.
#: ../modules/printbackends/cups/gtkprintbackendcups.c:4825
#: ../modules/printbackends/cups/gtkprintbackendcups.c:4837
#, c-format
msgid "Custom %sx%s"
msgstr "Benutzerdefiniert %s×%s"
#: ../modules/printbackends/cups/gtkprintbackendcups.c:4906
#: ../modules/printbackends/cups/gtkprintbackendcups.c:4918
msgid "Printer Profile"
msgstr "Druckerfarbprofil"
#. TRANSLATORS: this is when color profile information is unavailable
#: ../modules/printbackends/cups/gtkprintbackendcups.c:4913
#: ../modules/printbackends/cups/gtkprintbackendcups.c:4925
msgid "Unavailable"
msgstr "Nicht verfügbar"
@@ -4923,32 +4921,32 @@ msgstr "Nicht angegebenes Profil"
msgid "output"
msgstr "Ausgabe"
#: ../modules/printbackends/file/gtkprintbackendfile.c:521
#: ../modules/printbackends/file/gtkprintbackendfile.c:527
msgid "Print to File"
msgstr "In Datei drucken"
#: ../modules/printbackends/file/gtkprintbackendfile.c:647
#: ../modules/printbackends/file/gtkprintbackendfile.c:653
msgid "PDF"
msgstr "PDF"
#: ../modules/printbackends/file/gtkprintbackendfile.c:647
#: ../modules/printbackends/file/gtkprintbackendfile.c:653
msgid "Postscript"
msgstr "Postscript"
#: ../modules/printbackends/file/gtkprintbackendfile.c:647
#: ../modules/printbackends/file/gtkprintbackendfile.c:653
msgid "SVG"
msgstr "SVG"
#: ../modules/printbackends/file/gtkprintbackendfile.c:660
#: ../modules/printbackends/file/gtkprintbackendfile.c:666
#: ../modules/printbackends/test/gtkprintbackendtest.c:501
msgid "Pages per _sheet:"
msgstr "Seiten pro _Blatt:"
#: ../modules/printbackends/file/gtkprintbackendfile.c:719
#: ../modules/printbackends/file/gtkprintbackendfile.c:725
msgid "File"
msgstr "Datei"
#: ../modules/printbackends/file/gtkprintbackendfile.c:729
#: ../modules/printbackends/file/gtkprintbackendfile.c:735
msgid "_Output format"
msgstr "_Ausgabeformat"
+1016 -1157
View File
File diff suppressed because it is too large Load Diff
+345 -468
View File
File diff suppressed because it is too large Load Diff
+2 -2
View File
@@ -3162,7 +3162,7 @@ msgstr "Su_mažinti"
#: ../gtk/gtkswitch.c:337 ../gtk/gtkswitch.c:392 ../gtk/gtkswitch.c:583
msgctxt "switch"
msgid "ON"
msgstr "Įjungta"
msgstr ""
#. Translators: if the "off" state label requires more than three
#. * glyphs then use WHITE CIRCLE (U+25CB) as the text for the state
@@ -3170,7 +3170,7 @@ msgstr "Įjungta"
#: ../gtk/gtkswitch.c:345 ../gtk/gtkswitch.c:393 ../gtk/gtkswitch.c:598
msgctxt "switch"
msgid "OFF"
msgstr "Išjungta"
msgstr ""
#: ../gtk/gtktextbufferrichtext.c:649
#, c-format
+11
View File
@@ -27,6 +27,7 @@ endif
noinst_PROGRAMS = $(TEST_PROGS) \
animated-resizing \
motion-compression \
scrolling-performance \
simple \
flicker \
print-editor \
@@ -158,6 +159,7 @@ endif
animated_resizing_DEPENDENCIES = $(TEST_DEPS)
flicker_DEPENDENCIES = $(TEST_DEPS)
motion_compression_DEPENDENCIES = $(TEST_DEPS)
scrolling_performance_DEPENDENCIES = $(TEST_DEPS)
simple_DEPENDENCIES = $(TEST_DEPS)
print_editor_DEPENDENCIES = $(TEST_DEPS)
video_timer_DEPENDENCIES = $(TEST_DEPS)
@@ -263,6 +265,15 @@ testrevealer_DEPENDENCIES = $(TEST_DEPS)
animated_resizing_SOURCES = \
animated-resizing.c \
frame-stats.c \
frame-stats.h \
variable.c \
variable.h
scrolling_performance_SOURCES = \
scrolling-performance.c \
frame-stats.c \
frame-stats.h \
variable.c \
variable.h
+226 -67
View File
@@ -7,7 +7,7 @@ window1
<AtkComponent>
layer: window
alpha: 1
unnamed-GtkContainerAccessible-0
dialog-vbox1
"filler"
parent: window1
index: 0
@@ -16,18 +16,18 @@ window1
<AtkComponent>
layer: widget
alpha: 1
unnamed-GtkContainerAccessible-1
box
"filler"
parent: unnamed-GtkContainerAccessible-0
parent: dialog-vbox1
index: 0
state: enabled sensitive showing vertical visible
toolkit: gtk
<AtkComponent>
layer: widget
alpha: 1
unnamed-GtkImageAccessible-2
logo_image
"icon"
parent: unnamed-GtkContainerAccessible-1
parent: box
index: 0
state: enabled sensitive showing visible
toolkit: gtk
@@ -35,11 +35,11 @@ window1
layer: widget
alpha: 1
<AtkImage>
image size: -1 x -1
image size: 20 x 20
image description: (null)
FancyPants
name_label
"label"
parent: unnamed-GtkContainerAccessible-1
parent: box
index: 1
name: FancyPants
state: enabled focusable multi-line sensitive showing visible
@@ -76,9 +76,9 @@ window1
variant: <omitted>
weight: <omitted>
wrap-mode: word
unnamed-GtkNotebookAccessible-3
notebook
"page tab list"
parent: unnamed-GtkContainerAccessible-1
parent: box
index: 2
state: enabled sensitive showing visible
toolkit: gtk
@@ -86,16 +86,16 @@ window1
layer: widget
alpha: 1
<AtkSelection>
selected children: unnamed-GtkNotebookPageAccessible-4
unnamed-GtkNotebookPageAccessible-4
selected children: unnamed-GtkNotebookPageAccessible-0
unnamed-GtkNotebookPageAccessible-0
"page tab"
parent: unnamed-GtkNotebookAccessible-3
parent: notebook
index: 0
state: enabled selectable selected showing visible
<AtkComponent>
layer: widget
alpha: 1
unnamed-GtkContainerAccessible-5
page_vbox
"filler"
index: 0
state: enabled sensitive showing vertical visible
@@ -103,9 +103,9 @@ window1
<AtkComponent>
layer: widget
alpha: 1
0.99
version_label
"label"
parent: unnamed-GtkContainerAccessible-5
parent: page_vbox
index: 0
name: 0.99
state: enabled focusable multi-line sensitive showing visible
@@ -142,9 +142,9 @@ window1
variant: <omitted>
weight: <omitted>
wrap-mode: word
comments
comments_label
"label"
parent: unnamed-GtkContainerAccessible-5
parent: page_vbox
index: 1
name: comments
state: enabled focusable multi-line sensitive showing visible
@@ -181,18 +181,18 @@ window1
variant: <omitted>
weight: <omitted>
wrap-mode: word
unnamed-GtkContainerAccessible-6
hbox
"filler"
parent: unnamed-GtkContainerAccessible-5
parent: page_vbox
index: 2
state: enabled horizontal sensitive showing visible
toolkit: gtk
<AtkComponent>
layer: widget
alpha: 1
Website
website_label
"label"
parent: unnamed-GtkContainerAccessible-6
parent: hbox
index: 0
name: Website
state: enabled focusable multi-line sensitive showing visible
@@ -229,9 +229,9 @@ window1
variant: <omitted>
weight: <omitted>
wrap-mode: word
no comments
copyright_label
"label"
parent: unnamed-GtkContainerAccessible-5
parent: page_vbox
index: 3
name: no comments
state: enabled focusable multi-line sensitive showing visible
@@ -268,10 +268,9 @@ window1
variant: <omitted>
weight: <omitted>
wrap-mode: word
This program comes with ABSOLUTELY NO WARRANTY;
for details, visit http://www.gnu.org/licenses/gpl.html
license_label
"label"
parent: unnamed-GtkContainerAccessible-5
parent: page_vbox
index: 4
name: This program comes with ABSOLUTELY NO WARRANTY;
for details, visit http://www.gnu.org/licenses/gpl.html
@@ -284,7 +283,7 @@ for details, visit http://www.gnu.org/licenses/gpl.html
text: This program comes with ABSOLUTELY NO WARRANTY;
for details, visit http://www.gnu.org/licenses/gpl.html
character count: 103
caret offset: 0
caret offset: 67
default attributes: bg-color: <omitted>
bg-full-height: 0
direction: <omitted>
@@ -310,53 +309,179 @@ for details, visit http://www.gnu.org/licenses/gpl.html
variant: <omitted>
weight: <omitted>
wrap-mode: word
unnamed-GtkContainerAccessible-7
unnamed-GtkNotebookPageAccessible-1
"page tab"
parent: notebook
index: 1
state: enabled selectable visible
<AtkComponent>
layer: widget
alpha: 1
credits_page
"filler"
index: 0
state: enabled sensitive vertical visible
toolkit: gtk
<AtkComponent>
layer: widget
alpha: 1
scrolledwindow1
"scroll pane"
parent: credits_page
index: 0
state: enabled focusable sensitive visible
toolkit: gtk
<AtkComponent>
layer: widget
alpha: 1
viewport1
"viewport"
parent: scrolledwindow1
index: 0
state: enabled sensitive visible
toolkit: gtk
<AtkComponent>
layer: widget
alpha: 1
credits_grid
"panel"
parent: viewport1
index: 0
state: enabled sensitive vertical visible
toolkit: gtk
<AtkComponent>
layer: widget
alpha: 1
unnamed-GtkRangeAccessible-2
"scroll bar"
parent: scrolledwindow1
state: enabled horizontal sensitive visible
toolkit: gtk
<AtkComponent>
layer: widget
alpha: 1
<AtkValue>
minimum value: 0.000000
maximum value: 0.000000
current value: 0.000000
minimum increment: 39.200000
unnamed-GtkRangeAccessible-3
"scroll bar"
parent: scrolledwindow1
state: enabled sensitive vertical visible
toolkit: gtk
<AtkComponent>
layer: widget
alpha: 1
<AtkValue>
minimum value: 0.000000
maximum value: 0.000000
current value: 0.000000
minimum increment: 13.400000
unnamed-GtkNotebookPageAccessible-4
"page tab"
parent: notebook
index: 2
state: enabled selectable visible
<AtkComponent>
layer: widget
alpha: 1
license_page
"filler"
index: 0
state: enabled sensitive vertical visible
toolkit: gtk
<AtkComponent>
layer: widget
alpha: 1
scrolledwindow2
"scroll pane"
parent: license_page
index: 0
state: enabled focusable sensitive visible
toolkit: gtk
<AtkComponent>
layer: widget
alpha: 1
license_view
"text"
parent: scrolledwindow2
index: 0
state: enabled focusable multi-line sensitive visible
toolkit: gtk
<AtkComponent>
layer: widget
alpha: 1
<AtkText>
text:
character count: 0
caret offset: 0
default attributes: bg-color: <omitted>
bg-full-height: false
direction: <omitted>
editable: false
family-name: <omitted>
fg-color: <omitted>
indent: 0
invisible: false
justification: left
language: <omitted>
left-margin: 8
pixels-above-lines: 0
pixels-below-lines: 0
pixels-inside-wrap: 0
right-margin: 8
rise: 0
scale: 1
size: <omitted>
stretch: <omitted>
strikethrough: false
style: <omitted>
underline: none
variant: <omitted>
weight: <omitted>
wrap-mode: none
<AtkStreamableContent>
mime types: application/x-gtk-text-buffer-rich-text text/plain
unnamed-GtkRangeAccessible-5
"scroll bar"
parent: scrolledwindow2
state: enabled horizontal sensitive visible
toolkit: gtk
<AtkComponent>
layer: widget
alpha: 1
<AtkValue>
minimum value: 0.000000
maximum value: 0.000000
current value: 0.000000
minimum increment: 39.800000
unnamed-GtkRangeAccessible-6
"scroll bar"
parent: scrolledwindow2
state: enabled sensitive vertical visible
toolkit: gtk
<AtkComponent>
layer: widget
alpha: 1
<AtkValue>
minimum value: 0.000000
maximum value: 0.000000
current value: 0.000000
minimum increment: 14.000000
dialog-action_area1
"filler"
parent: unnamed-GtkContainerAccessible-0
parent: dialog-vbox1
index: 1
state: enabled horizontal sensitive showing visible
toolkit: gtk
<AtkComponent>
layer: widget
alpha: 1
unnamed-GtkToggleButtonAccessible-8
"toggle button"
parent: unnamed-GtkContainerAccessible-7
index: 0
name: License
state: enabled focusable sensitive
toolkit: gtk
<AtkComponent>
layer: widget
alpha: 1
<AtkImage>
image size: -1 x -1
image description: (null)
<AtkAction>
action 0 name: click
action 0 description: Clicks the button
action 0 keybinding: <Alt>l
unnamed-GtkToggleButtonAccessible-9
"toggle button"
parent: unnamed-GtkContainerAccessible-7
index: 1
name: Credits
state: enabled focusable sensitive
toolkit: gtk
<AtkComponent>
layer: widget
alpha: 1
<AtkImage>
image size: 20 x 20
image description: (null)
<AtkAction>
action 0 name: click
action 0 description: Clicks the button
action 0 keybinding: <Alt>r
unnamed-GtkButtonAccessible-10
close_button
"push button"
parent: unnamed-GtkContainerAccessible-7
index: 2
parent: dialog-action_area1
index: 0
name: Close
state: enabled focusable sensitive showing visible default
toolkit: gtk
@@ -370,3 +495,37 @@ for details, visit http://www.gnu.org/licenses/gpl.html
action 0 name: click
action 0 description: Clicks the button
action 0 keybinding: <Alt>c
license_button
"toggle button"
parent: dialog-action_area1
index: 1
name: License
state: enabled focusable sensitive
toolkit: gtk
<AtkComponent>
layer: widget
alpha: 1
<AtkImage>
image size: -1 x -1
image description: (null)
<AtkAction>
action 0 name: click
action 0 description: Clicks the button
action 0 keybinding: <Alt>l
credits_button
"toggle button"
parent: dialog-action_area1
index: 2
name: Credits
state: enabled focusable sensitive
toolkit: gtk
<AtkComponent>
layer: widget
alpha: 1
<AtkImage>
image size: 20 x 20
image description: (null)
<AtkAction>
action 0 name: click
action 0 description: Clicks the button
action 0 keybinding: <Alt>r
+16 -16
View File
@@ -9,7 +9,7 @@ window1
button1
"push button"
index: 0
name: Page 1
name:
state: enabled focusable sensitive showing visible
toolkit: gtk
<AtkComponent>
@@ -24,7 +24,7 @@ window1
button2
"push button"
index: 0
name: Page 2
name:
state: enabled focusable sensitive visible
toolkit: gtk
<AtkComponent>
@@ -36,18 +36,18 @@ window1
<AtkAction>
action 0 name: click
action 0 description: Clicks the button
unnamed-GtkContainerAccessible-0
action_area
"filler"
parent: unnamed-GtkContainerAccessible-1
parent: content_box
index: 1
state: enabled horizontal sensitive showing visible
toolkit: gtk
<AtkComponent>
layer: widget
alpha: 1
unnamed-GtkButtonAccessible-2
close
"push button"
parent: unnamed-GtkContainerAccessible-0
parent: action_area
index: 0
name: Close
state: enabled focusable sensitive
@@ -62,9 +62,9 @@ window1
action 0 name: click
action 0 description: Clicks the button
action 0 keybinding: <Alt>c
unnamed-GtkButtonAccessible-3
cancel
"push button"
parent: unnamed-GtkContainerAccessible-0
parent: action_area
index: 1
name: Cancel
state: enabled focusable sensitive showing visible
@@ -79,9 +79,9 @@ window1
action 0 name: click
action 0 description: Clicks the button
action 0 keybinding: <Alt>c
unnamed-GtkButtonAccessible-4
last
"push button"
parent: unnamed-GtkContainerAccessible-0
parent: action_area
index: 2
name: Finish
state: focusable
@@ -96,9 +96,9 @@ window1
action 0 name: click
action 0 description: Clicks the button
action 0 keybinding: <Alt>f
unnamed-GtkButtonAccessible-5
back
"push button"
parent: unnamed-GtkContainerAccessible-0
parent: action_area
index: 3
name: Go Back
state: enabled focusable sensitive
@@ -113,9 +113,9 @@ window1
action 0 name: click
action 0 description: Clicks the button
action 0 keybinding: <Alt>b
unnamed-GtkButtonAccessible-6
forward
"push button"
parent: unnamed-GtkContainerAccessible-0
parent: action_area
index: 4
name: Continue
state: focusable showing visible
@@ -130,9 +130,9 @@ window1
action 0 name: click
action 0 description: Clicks the button
action 0 keybinding: <Alt>o
unnamed-GtkButtonAccessible-7
apply
"push button"
parent: unnamed-GtkContainerAccessible-0
parent: action_area
index: 5
name: Apply
state: enabled focusable sensitive
+146 -146
View File
@@ -7,7 +7,7 @@ window1
<AtkComponent>
layer: window
alpha: 1
unnamed-GtkContainerAccessible-0
vbox
"filler"
parent: window1
index: 0
@@ -16,36 +16,36 @@ window1
<AtkComponent>
layer: widget
alpha: 1
unnamed-GtkContainerAccessible-1
unnamed-GtkContainerAccessible-0
"color chooser"
parent: unnamed-GtkContainerAccessible-0
parent: vbox
index: 0
state: enabled sensitive showing vertical visible
toolkit: gtk
<AtkComponent>
layer: widget
alpha: 1
unnamed-GtkContainerAccessible-2
unnamed-GtkContainerAccessible-1
"filler"
parent: unnamed-GtkContainerAccessible-1
parent: unnamed-GtkContainerAccessible-0
index: 0
state: enabled horizontal sensitive showing visible
toolkit: gtk
<AtkComponent>
layer: widget
alpha: 1
unnamed-GtkContainerAccessible-3
unnamed-GtkContainerAccessible-2
"filler"
parent: unnamed-GtkContainerAccessible-2
parent: unnamed-GtkContainerAccessible-1
index: 0
state: enabled sensitive showing vertical visible
toolkit: gtk
<AtkComponent>
layer: widget
alpha: 1
unnamed-GtkWidgetAccessible-4
unnamed-GtkWidgetAccessible-3
"color chooser"
parent: unnamed-GtkContainerAccessible-3
parent: unnamed-GtkContainerAccessible-2
index: 0
name: Color Wheel
description: Select the color you want from the outer ring. Select the darkness or lightness of that color using the inner triangle.
@@ -60,36 +60,36 @@ window1
<AtkComponent>
layer: widget
alpha: 1
unnamed-GtkContainerAccessible-5
unnamed-GtkContainerAccessible-4
"filler"
parent: unnamed-GtkContainerAccessible-3
parent: unnamed-GtkContainerAccessible-2
index: 1
state: enabled horizontal sensitive showing visible
toolkit: gtk
<AtkComponent>
layer: widget
alpha: 1
unnamed-GtkFrameAccessible-6
unnamed-GtkFrameAccessible-5
"panel"
parent: unnamed-GtkContainerAccessible-5
parent: unnamed-GtkContainerAccessible-4
index: 0
state: enabled sensitive showing visible
toolkit: gtk
<AtkComponent>
layer: widget
alpha: 1
unnamed-GtkContainerAccessible-7
unnamed-GtkContainerAccessible-6
"filler"
parent: unnamed-GtkFrameAccessible-6
parent: unnamed-GtkFrameAccessible-5
index: 0
state: enabled horizontal sensitive showing visible
toolkit: gtk
<AtkComponent>
layer: widget
alpha: 1
unnamed-GtkWidgetAccessible-8
unnamed-GtkWidgetAccessible-7
"unknown"
parent: unnamed-GtkContainerAccessible-7
parent: unnamed-GtkContainerAccessible-6
index: 0
description: The previously-selected color, for comparison to the color you're selecting now.
state: enabled sensitive showing visible
@@ -97,9 +97,9 @@ window1
<AtkComponent>
layer: widget
alpha: 1
unnamed-GtkWidgetAccessible-9
unnamed-GtkWidgetAccessible-8
"unknown"
parent: unnamed-GtkContainerAccessible-7
parent: unnamed-GtkContainerAccessible-6
index: 1
description: The color you've chosen.
state: enabled sensitive showing visible
@@ -107,9 +107,9 @@ window1
<AtkComponent>
layer: widget
alpha: 1
unnamed-GtkButtonAccessible-10
unnamed-GtkButtonAccessible-9
"push button"
parent: unnamed-GtkContainerAccessible-5
parent: unnamed-GtkContainerAccessible-4
index: 1
description: Click the eyedropper, then click a color anywhere on your screen to select that color.
state: enabled focusable sensitive showing visible
@@ -123,18 +123,18 @@ window1
<AtkAction>
action 0 name: click
action 0 description: Clicks the button
unnamed-GtkContainerAccessible-11
unnamed-GtkContainerAccessible-10
"filler"
parent: unnamed-GtkContainerAccessible-2
parent: unnamed-GtkContainerAccessible-1
index: 1
state: enabled sensitive showing vertical visible
toolkit: gtk
<AtkComponent>
layer: widget
alpha: 1
unnamed-GtkContainerAccessible-12
unnamed-GtkContainerAccessible-11
"panel"
parent: unnamed-GtkContainerAccessible-11
parent: unnamed-GtkContainerAccessible-10
index: 0
state: enabled horizontal sensitive showing visible
toolkit: gtk
@@ -143,7 +143,7 @@ window1
alpha: 1
#FFFFFF
"text"
parent: unnamed-GtkContainerAccessible-12
parent: unnamed-GtkContainerAccessible-11
index: 0
description: You can enter an HTML-style hexadecimal color value, or simply a color name such as 'orange' in this entry.
labelled-by: Color name:
@@ -187,7 +187,7 @@ window1
action 0 keybinding: <Alt>n
Color name:
"label"
parent: unnamed-GtkContainerAccessible-12
parent: unnamed-GtkContainerAccessible-11
index: 1
name: Color name:
label-for: #FFFFFF
@@ -227,7 +227,7 @@ window1
wrap-mode: word
255
"text"
parent: unnamed-GtkContainerAccessible-12
parent: unnamed-GtkContainerAccessible-11
index: 2
description: Transparency of the color.
state: editable enabled focusable sensitive single-line
@@ -267,9 +267,9 @@ window1
<AtkAction>
action 0 name: activate
action 0 description: Activates the entry
unnamed-GtkScaleAccessible-13
unnamed-GtkScaleAccessible-12
"slider"
parent: unnamed-GtkContainerAccessible-12
parent: unnamed-GtkContainerAccessible-11
index: 3
description: Transparency of the color.
labelled-by: Opacity:
@@ -285,10 +285,10 @@ window1
minimum increment: 1.000000
Opacity:
"label"
parent: unnamed-GtkContainerAccessible-12
parent: unnamed-GtkContainerAccessible-11
index: 4
name: Opacity:
label-for: unnamed-GtkScaleAccessible-13
label-for: unnamed-GtkScaleAccessible-12
state: enabled multi-line sensitive
toolkit: gtk
<AtkComponent>
@@ -323,9 +323,9 @@ window1
variant: <omitted>
weight: <omitted>
wrap-mode: word
unnamed-GtkWidgetAccessible-14
unnamed-GtkWidgetAccessible-13
"separator"
parent: unnamed-GtkContainerAccessible-12
parent: unnamed-GtkContainerAccessible-11
index: 5
state: enabled horizontal sensitive showing visible
toolkit: gtk
@@ -334,10 +334,10 @@ window1
alpha: 1
255
"spin button"
parent: unnamed-GtkContainerAccessible-12
parent: unnamed-GtkContainerAccessible-11
index: 6
description: Amount of blue light in the color.
controller-for: unnamed-GtkWidgetAccessible-4
controller-for: unnamed-GtkWidgetAccessible-3
labelled-by: Blue:
state: editable enabled focusable horizontal sensitive showing single-line visible
toolkit: gtk
@@ -384,7 +384,7 @@ window1
minimum increment: 1.000000
Blue:
"label"
parent: unnamed-GtkContainerAccessible-12
parent: unnamed-GtkContainerAccessible-11
index: 7
name: Blue:
label-for: 255
@@ -424,10 +424,10 @@ window1
wrap-mode: word
255
"spin button"
parent: unnamed-GtkContainerAccessible-12
parent: unnamed-GtkContainerAccessible-11
index: 8
description: Amount of green light in the color.
controller-for: unnamed-GtkWidgetAccessible-4
controller-for: unnamed-GtkWidgetAccessible-3
labelled-by: Green:
state: editable enabled focusable horizontal sensitive showing single-line visible
toolkit: gtk
@@ -474,7 +474,7 @@ window1
minimum increment: 1.000000
Green:
"label"
parent: unnamed-GtkContainerAccessible-12
parent: unnamed-GtkContainerAccessible-11
index: 9
name: Green:
label-for: 255
@@ -514,10 +514,10 @@ window1
wrap-mode: word
255
"spin button"
parent: unnamed-GtkContainerAccessible-12
parent: unnamed-GtkContainerAccessible-11
index: 10
description: Amount of red light in the color.
controller-for: unnamed-GtkWidgetAccessible-4
controller-for: unnamed-GtkWidgetAccessible-3
labelled-by: Red:
state: editable enabled focusable horizontal sensitive showing single-line visible
toolkit: gtk
@@ -564,7 +564,7 @@ window1
minimum increment: 1.000000
Red:
"label"
parent: unnamed-GtkContainerAccessible-12
parent: unnamed-GtkContainerAccessible-11
index: 11
name: Red:
label-for: 255
@@ -604,10 +604,10 @@ window1
wrap-mode: word
100
"spin button"
parent: unnamed-GtkContainerAccessible-12
parent: unnamed-GtkContainerAccessible-11
index: 12
description: Brightness of the color.
controller-for: unnamed-GtkWidgetAccessible-4
controller-for: unnamed-GtkWidgetAccessible-3
labelled-by: Value:
state: editable enabled focusable horizontal sensitive showing single-line visible
toolkit: gtk
@@ -654,7 +654,7 @@ window1
minimum increment: 1.000000
Value:
"label"
parent: unnamed-GtkContainerAccessible-12
parent: unnamed-GtkContainerAccessible-11
index: 13
name: Value:
label-for: 100
@@ -694,10 +694,10 @@ window1
wrap-mode: word
0
"spin button"
parent: unnamed-GtkContainerAccessible-12
parent: unnamed-GtkContainerAccessible-11
index: 14
description: Intensity of the color.
controller-for: unnamed-GtkWidgetAccessible-4
controller-for: unnamed-GtkWidgetAccessible-3
labelled-by: Saturation:
state: editable enabled focusable horizontal sensitive showing single-line visible
toolkit: gtk
@@ -744,7 +744,7 @@ window1
minimum increment: 1.000000
Saturation:
"label"
parent: unnamed-GtkContainerAccessible-12
parent: unnamed-GtkContainerAccessible-11
index: 15
name: Saturation:
label-for: 0
@@ -784,10 +784,10 @@ window1
wrap-mode: word
0
"spin button"
parent: unnamed-GtkContainerAccessible-12
parent: unnamed-GtkContainerAccessible-11
index: 16
description: Position on the color wheel.
controller-for: unnamed-GtkWidgetAccessible-4
controller-for: unnamed-GtkWidgetAccessible-3
labelled-by: Hue:
state: editable enabled focusable horizontal sensitive showing single-line visible
toolkit: gtk
@@ -834,7 +834,7 @@ window1
minimum increment: 1.000000
Hue:
"label"
parent: unnamed-GtkContainerAccessible-12
parent: unnamed-GtkContainerAccessible-11
index: 17
name: Hue:
label-for: 0
@@ -872,9 +872,9 @@ window1
variant: <omitted>
weight: <omitted>
wrap-mode: word
unnamed-GtkContainerAccessible-15
unnamed-GtkContainerAccessible-14
"filler"
parent: unnamed-GtkContainerAccessible-11
parent: unnamed-GtkContainerAccessible-10
index: 1
state: enabled sensitive vertical
toolkit: gtk
@@ -883,10 +883,10 @@ window1
alpha: 1
Palette:
"label"
parent: unnamed-GtkContainerAccessible-15
parent: unnamed-GtkContainerAccessible-14
index: 0
name: Palette:
label-for: unnamed-GtkWidgetAccessible-16
label-for: unnamed-GtkWidgetAccessible-15
state: enabled multi-line sensitive visible
toolkit: gtk
<AtkComponent>
@@ -921,27 +921,27 @@ window1
variant: <omitted>
weight: <omitted>
wrap-mode: word
unnamed-GtkContainerAccessible-17
unnamed-GtkContainerAccessible-16
"panel"
parent: unnamed-GtkContainerAccessible-15
parent: unnamed-GtkContainerAccessible-14
index: 1
state: enabled horizontal sensitive visible
toolkit: gtk
<AtkComponent>
layer: widget
alpha: 1
unnamed-GtkFrameAccessible-18
unnamed-GtkFrameAccessible-17
"panel"
parent: unnamed-GtkContainerAccessible-17
parent: unnamed-GtkContainerAccessible-16
index: 0
state: enabled sensitive visible
toolkit: gtk
<AtkComponent>
layer: widget
alpha: 1
unnamed-GtkWidgetAccessible-19
unnamed-GtkWidgetAccessible-18
"unknown"
parent: unnamed-GtkFrameAccessible-18
parent: unnamed-GtkFrameAccessible-17
index: 0
description: Click this palette entry to make it the current color. To change this entry, drag a color swatch here or right-click it and select "Save color here."
state: enabled focusable sensitive visible
@@ -949,18 +949,18 @@ window1
<AtkComponent>
layer: widget
alpha: 1
unnamed-GtkFrameAccessible-20
unnamed-GtkFrameAccessible-19
"panel"
parent: unnamed-GtkContainerAccessible-17
parent: unnamed-GtkContainerAccessible-16
index: 1
state: enabled sensitive visible
toolkit: gtk
<AtkComponent>
layer: widget
alpha: 1
unnamed-GtkWidgetAccessible-21
unnamed-GtkWidgetAccessible-20
"unknown"
parent: unnamed-GtkFrameAccessible-20
parent: unnamed-GtkFrameAccessible-19
index: 0
description: Click this palette entry to make it the current color. To change this entry, drag a color swatch here or right-click it and select "Save color here."
state: enabled focusable sensitive visible
@@ -968,18 +968,18 @@ window1
<AtkComponent>
layer: widget
alpha: 1
unnamed-GtkFrameAccessible-22
unnamed-GtkFrameAccessible-21
"panel"
parent: unnamed-GtkContainerAccessible-17
parent: unnamed-GtkContainerAccessible-16
index: 2
state: enabled sensitive visible
toolkit: gtk
<AtkComponent>
layer: widget
alpha: 1
unnamed-GtkWidgetAccessible-23
unnamed-GtkWidgetAccessible-22
"unknown"
parent: unnamed-GtkFrameAccessible-22
parent: unnamed-GtkFrameAccessible-21
index: 0
description: Click this palette entry to make it the current color. To change this entry, drag a color swatch here or right-click it and select "Save color here."
state: enabled focusable sensitive visible
@@ -987,18 +987,18 @@ window1
<AtkComponent>
layer: widget
alpha: 1
unnamed-GtkFrameAccessible-24
unnamed-GtkFrameAccessible-23
"panel"
parent: unnamed-GtkContainerAccessible-17
parent: unnamed-GtkContainerAccessible-16
index: 3
state: enabled sensitive visible
toolkit: gtk
<AtkComponent>
layer: widget
alpha: 1
unnamed-GtkWidgetAccessible-25
unnamed-GtkWidgetAccessible-24
"unknown"
parent: unnamed-GtkFrameAccessible-24
parent: unnamed-GtkFrameAccessible-23
index: 0
description: Click this palette entry to make it the current color. To change this entry, drag a color swatch here or right-click it and select "Save color here."
state: enabled focusable sensitive visible
@@ -1006,18 +1006,18 @@ window1
<AtkComponent>
layer: widget
alpha: 1
unnamed-GtkFrameAccessible-26
unnamed-GtkFrameAccessible-25
"panel"
parent: unnamed-GtkContainerAccessible-17
parent: unnamed-GtkContainerAccessible-16
index: 4
state: enabled sensitive visible
toolkit: gtk
<AtkComponent>
layer: widget
alpha: 1
unnamed-GtkWidgetAccessible-27
unnamed-GtkWidgetAccessible-26
"unknown"
parent: unnamed-GtkFrameAccessible-26
parent: unnamed-GtkFrameAccessible-25
index: 0
description: Click this palette entry to make it the current color. To change this entry, drag a color swatch here or right-click it and select "Save color here."
state: enabled focusable sensitive visible
@@ -1025,18 +1025,18 @@ window1
<AtkComponent>
layer: widget
alpha: 1
unnamed-GtkFrameAccessible-28
unnamed-GtkFrameAccessible-27
"panel"
parent: unnamed-GtkContainerAccessible-17
parent: unnamed-GtkContainerAccessible-16
index: 5
state: enabled sensitive visible
toolkit: gtk
<AtkComponent>
layer: widget
alpha: 1
unnamed-GtkWidgetAccessible-29
unnamed-GtkWidgetAccessible-28
"unknown"
parent: unnamed-GtkFrameAccessible-28
parent: unnamed-GtkFrameAccessible-27
index: 0
description: Click this palette entry to make it the current color. To change this entry, drag a color swatch here or right-click it and select "Save color here."
state: enabled focusable sensitive visible
@@ -1044,18 +1044,18 @@ window1
<AtkComponent>
layer: widget
alpha: 1
unnamed-GtkFrameAccessible-30
unnamed-GtkFrameAccessible-29
"panel"
parent: unnamed-GtkContainerAccessible-17
parent: unnamed-GtkContainerAccessible-16
index: 6
state: enabled sensitive visible
toolkit: gtk
<AtkComponent>
layer: widget
alpha: 1
unnamed-GtkWidgetAccessible-31
unnamed-GtkWidgetAccessible-30
"unknown"
parent: unnamed-GtkFrameAccessible-30
parent: unnamed-GtkFrameAccessible-29
index: 0
description: Click this palette entry to make it the current color. To change this entry, drag a color swatch here or right-click it and select "Save color here."
state: enabled focusable sensitive visible
@@ -1063,18 +1063,18 @@ window1
<AtkComponent>
layer: widget
alpha: 1
unnamed-GtkFrameAccessible-32
unnamed-GtkFrameAccessible-31
"panel"
parent: unnamed-GtkContainerAccessible-17
parent: unnamed-GtkContainerAccessible-16
index: 7
state: enabled sensitive visible
toolkit: gtk
<AtkComponent>
layer: widget
alpha: 1
unnamed-GtkWidgetAccessible-33
unnamed-GtkWidgetAccessible-32
"unknown"
parent: unnamed-GtkFrameAccessible-32
parent: unnamed-GtkFrameAccessible-31
index: 0
description: Click this palette entry to make it the current color. To change this entry, drag a color swatch here or right-click it and select "Save color here."
state: enabled focusable sensitive visible
@@ -1082,18 +1082,18 @@ window1
<AtkComponent>
layer: widget
alpha: 1
unnamed-GtkFrameAccessible-34
unnamed-GtkFrameAccessible-33
"panel"
parent: unnamed-GtkContainerAccessible-17
parent: unnamed-GtkContainerAccessible-16
index: 8
state: enabled sensitive visible
toolkit: gtk
<AtkComponent>
layer: widget
alpha: 1
unnamed-GtkWidgetAccessible-35
unnamed-GtkWidgetAccessible-34
"unknown"
parent: unnamed-GtkFrameAccessible-34
parent: unnamed-GtkFrameAccessible-33
index: 0
description: Click this palette entry to make it the current color. To change this entry, drag a color swatch here or right-click it and select "Save color here."
state: enabled focusable sensitive visible
@@ -1101,18 +1101,18 @@ window1
<AtkComponent>
layer: widget
alpha: 1
unnamed-GtkFrameAccessible-36
unnamed-GtkFrameAccessible-35
"panel"
parent: unnamed-GtkContainerAccessible-17
parent: unnamed-GtkContainerAccessible-16
index: 9
state: enabled sensitive visible
toolkit: gtk
<AtkComponent>
layer: widget
alpha: 1
unnamed-GtkWidgetAccessible-37
unnamed-GtkWidgetAccessible-36
"unknown"
parent: unnamed-GtkFrameAccessible-36
parent: unnamed-GtkFrameAccessible-35
index: 0
description: Click this palette entry to make it the current color. To change this entry, drag a color swatch here or right-click it and select "Save color here."
state: enabled focusable sensitive visible
@@ -1120,18 +1120,18 @@ window1
<AtkComponent>
layer: widget
alpha: 1
unnamed-GtkFrameAccessible-38
unnamed-GtkFrameAccessible-37
"panel"
parent: unnamed-GtkContainerAccessible-17
parent: unnamed-GtkContainerAccessible-16
index: 10
state: enabled sensitive visible
toolkit: gtk
<AtkComponent>
layer: widget
alpha: 1
unnamed-GtkWidgetAccessible-39
unnamed-GtkWidgetAccessible-38
"unknown"
parent: unnamed-GtkFrameAccessible-38
parent: unnamed-GtkFrameAccessible-37
index: 0
description: Click this palette entry to make it the current color. To change this entry, drag a color swatch here or right-click it and select "Save color here."
state: enabled focusable sensitive visible
@@ -1139,18 +1139,18 @@ window1
<AtkComponent>
layer: widget
alpha: 1
unnamed-GtkFrameAccessible-40
unnamed-GtkFrameAccessible-39
"panel"
parent: unnamed-GtkContainerAccessible-17
parent: unnamed-GtkContainerAccessible-16
index: 11
state: enabled sensitive visible
toolkit: gtk
<AtkComponent>
layer: widget
alpha: 1
unnamed-GtkWidgetAccessible-41
unnamed-GtkWidgetAccessible-40
"unknown"
parent: unnamed-GtkFrameAccessible-40
parent: unnamed-GtkFrameAccessible-39
index: 0
description: Click this palette entry to make it the current color. To change this entry, drag a color swatch here or right-click it and select "Save color here."
state: enabled focusable sensitive visible
@@ -1158,18 +1158,18 @@ window1
<AtkComponent>
layer: widget
alpha: 1
unnamed-GtkFrameAccessible-42
unnamed-GtkFrameAccessible-41
"panel"
parent: unnamed-GtkContainerAccessible-17
parent: unnamed-GtkContainerAccessible-16
index: 12
state: enabled sensitive visible
toolkit: gtk
<AtkComponent>
layer: widget
alpha: 1
unnamed-GtkWidgetAccessible-43
unnamed-GtkWidgetAccessible-42
"unknown"
parent: unnamed-GtkFrameAccessible-42
parent: unnamed-GtkFrameAccessible-41
index: 0
description: Click this palette entry to make it the current color. To change this entry, drag a color swatch here or right-click it and select "Save color here."
state: enabled focusable sensitive visible
@@ -1177,18 +1177,18 @@ window1
<AtkComponent>
layer: widget
alpha: 1
unnamed-GtkFrameAccessible-44
unnamed-GtkFrameAccessible-43
"panel"
parent: unnamed-GtkContainerAccessible-17
parent: unnamed-GtkContainerAccessible-16
index: 13
state: enabled sensitive visible
toolkit: gtk
<AtkComponent>
layer: widget
alpha: 1
unnamed-GtkWidgetAccessible-45
unnamed-GtkWidgetAccessible-44
"unknown"
parent: unnamed-GtkFrameAccessible-44
parent: unnamed-GtkFrameAccessible-43
index: 0
description: Click this palette entry to make it the current color. To change this entry, drag a color swatch here or right-click it and select "Save color here."
state: enabled focusable sensitive visible
@@ -1196,18 +1196,18 @@ window1
<AtkComponent>
layer: widget
alpha: 1
unnamed-GtkFrameAccessible-46
unnamed-GtkFrameAccessible-45
"panel"
parent: unnamed-GtkContainerAccessible-17
parent: unnamed-GtkContainerAccessible-16
index: 14
state: enabled sensitive visible
toolkit: gtk
<AtkComponent>
layer: widget
alpha: 1
unnamed-GtkWidgetAccessible-47
unnamed-GtkWidgetAccessible-46
"unknown"
parent: unnamed-GtkFrameAccessible-46
parent: unnamed-GtkFrameAccessible-45
index: 0
description: Click this palette entry to make it the current color. To change this entry, drag a color swatch here or right-click it and select "Save color here."
state: enabled focusable sensitive visible
@@ -1215,18 +1215,18 @@ window1
<AtkComponent>
layer: widget
alpha: 1
unnamed-GtkFrameAccessible-48
unnamed-GtkFrameAccessible-47
"panel"
parent: unnamed-GtkContainerAccessible-17
parent: unnamed-GtkContainerAccessible-16
index: 15
state: enabled sensitive visible
toolkit: gtk
<AtkComponent>
layer: widget
alpha: 1
unnamed-GtkWidgetAccessible-49
unnamed-GtkWidgetAccessible-48
"unknown"
parent: unnamed-GtkFrameAccessible-48
parent: unnamed-GtkFrameAccessible-47
index: 0
description: Click this palette entry to make it the current color. To change this entry, drag a color swatch here or right-click it and select "Save color here."
state: enabled focusable sensitive visible
@@ -1234,18 +1234,18 @@ window1
<AtkComponent>
layer: widget
alpha: 1
unnamed-GtkFrameAccessible-50
unnamed-GtkFrameAccessible-49
"panel"
parent: unnamed-GtkContainerAccessible-17
parent: unnamed-GtkContainerAccessible-16
index: 16
state: enabled sensitive visible
toolkit: gtk
<AtkComponent>
layer: widget
alpha: 1
unnamed-GtkWidgetAccessible-51
unnamed-GtkWidgetAccessible-50
"unknown"
parent: unnamed-GtkFrameAccessible-50
parent: unnamed-GtkFrameAccessible-49
index: 0
description: Click this palette entry to make it the current color. To change this entry, drag a color swatch here or right-click it and select "Save color here."
state: enabled focusable sensitive visible
@@ -1253,18 +1253,18 @@ window1
<AtkComponent>
layer: widget
alpha: 1
unnamed-GtkFrameAccessible-52
unnamed-GtkFrameAccessible-51
"panel"
parent: unnamed-GtkContainerAccessible-17
parent: unnamed-GtkContainerAccessible-16
index: 17
state: enabled sensitive visible
toolkit: gtk
<AtkComponent>
layer: widget
alpha: 1
unnamed-GtkWidgetAccessible-53
unnamed-GtkWidgetAccessible-52
"unknown"
parent: unnamed-GtkFrameAccessible-52
parent: unnamed-GtkFrameAccessible-51
index: 0
description: Click this palette entry to make it the current color. To change this entry, drag a color swatch here or right-click it and select "Save color here."
state: enabled focusable sensitive visible
@@ -1272,18 +1272,18 @@ window1
<AtkComponent>
layer: widget
alpha: 1
unnamed-GtkFrameAccessible-54
unnamed-GtkFrameAccessible-53
"panel"
parent: unnamed-GtkContainerAccessible-17
parent: unnamed-GtkContainerAccessible-16
index: 18
state: enabled sensitive visible
toolkit: gtk
<AtkComponent>
layer: widget
alpha: 1
unnamed-GtkWidgetAccessible-55
unnamed-GtkWidgetAccessible-54
"unknown"
parent: unnamed-GtkFrameAccessible-54
parent: unnamed-GtkFrameAccessible-53
index: 0
description: Click this palette entry to make it the current color. To change this entry, drag a color swatch here or right-click it and select "Save color here."
state: enabled focusable sensitive visible
@@ -1291,18 +1291,18 @@ window1
<AtkComponent>
layer: widget
alpha: 1
unnamed-GtkFrameAccessible-56
unnamed-GtkFrameAccessible-55
"panel"
parent: unnamed-GtkContainerAccessible-17
parent: unnamed-GtkContainerAccessible-16
index: 19
state: enabled sensitive visible
toolkit: gtk
<AtkComponent>
layer: widget
alpha: 1
unnamed-GtkWidgetAccessible-16
unnamed-GtkWidgetAccessible-15
"unknown"
parent: unnamed-GtkFrameAccessible-56
parent: unnamed-GtkFrameAccessible-55
index: 0
description: Click this palette entry to make it the current color. To change this entry, drag a color swatch here or right-click it and select "Save color here."
labelled-by: Palette:
@@ -1311,18 +1311,18 @@ window1
<AtkComponent>
layer: widget
alpha: 1
unnamed-GtkContainerAccessible-57
action_area
"filler"
parent: unnamed-GtkContainerAccessible-0
parent: vbox
index: 1
state: enabled horizontal sensitive showing visible
toolkit: gtk
<AtkComponent>
layer: widget
alpha: 1
unnamed-GtkButtonAccessible-58
unnamed-GtkButtonAccessible-56
"push button"
parent: unnamed-GtkContainerAccessible-57
parent: action_area
index: 0
name: Help
state: enabled focusable sensitive
@@ -1337,9 +1337,9 @@ window1
action 0 name: click
action 0 description: Clicks the button
action 0 keybinding: <Alt>h
unnamed-GtkButtonAccessible-59
unnamed-GtkButtonAccessible-57
"push button"
parent: unnamed-GtkContainerAccessible-57
parent: action_area
index: 1
name: Select
state: enabled focusable sensitive showing visible default
@@ -1354,9 +1354,9 @@ window1
action 0 name: click
action 0 description: Clicks the button
action 0 keybinding: <Alt>s
unnamed-GtkButtonAccessible-60
unnamed-GtkButtonAccessible-58
"push button"
parent: unnamed-GtkContainerAccessible-57
parent: action_area
index: 2
name: Cancel
state: enabled focusable sensitive showing visible
-4
View File
@@ -69,7 +69,6 @@ window1
action 0 name: press
action 0 description: Presses the combobox
action 0 keybinding: <Alt>c
<AtkSelection>
unnamed-GtkMenuAccessible-0
"menu"
parent: combo1
@@ -92,7 +91,6 @@ window1
<AtkAction>
action 0 name: press
action 0 description: Presses the combobox
<AtkSelection>
unnamed-GtkMenuAccessible-1
"menu"
parent: combo2
@@ -156,7 +154,6 @@ window1
<AtkAction>
action 0 name: press
action 0 description: Presses the combobox
<AtkSelection>
unnamed-GtkMenuAccessible-2
"menu"
parent: combo3
@@ -179,7 +176,6 @@ window1
<AtkAction>
action 0 name: press
action 0 description: Presses the combobox
<AtkSelection>
unnamed-GtkMenuAccessible-3
"menu"
parent: combo4
+1 -1
View File
@@ -64,7 +64,7 @@ window1
variant: <omitted>
weight: <omitted>
wrap-mode: word
unnamed-GtkContainerAccessible-0
action_area
"filler"
parent: bar1
index: 1

Some files were not shown because too many files have changed in this diff Show More