Commit Graph

45 Commits

Author SHA1 Message Date
Matthias Clasen
ef9dc43474 Show layout children in the inspector 2019-04-05 19:15:55 +00:00
Matthias Clasen
5371055495 inspector: Redo the object page switcher
The combobox for page switching was not very good.
Instead, do a sidebar that can be hidden.
2019-04-02 23:29:22 +00:00
Matthias Clasen
9861887f1a inspector: Avoid grabs for inspecting
Instead of using a grab on a GtkInvisible, use
a hook in the GTK event propagation machinery to
get events.

The only downside of this approach is that we
lose the crosshair cursor. But we get rid of
the last use of GtkInvisible.
2019-02-24 09:41:13 -05:00
Benjamin Otte
5e8983883e inspector: Rename "Gestures" page to "Controllers"
And rename GtkInspectorGestures => GtkInspectorControllers, too.
2018-09-16 18:50:17 +02:00
Benjamin Otte
05e752e096 inspector: Turn object tree into a GtkListBox
The code gets rid of the GtkTreeView and replaces it with a GtkListBox.

Most of the logic is now done via GListModel subclasses.

A big change is that this new list is now tracking updates itself and
doesn't need to be manually updated. All code that used to cause rescans
or add forgotten objects to the tree has been removed.

If objects are missing from the object tree, the logic for tracking them
needs to be added.
2018-09-16 18:50:17 +02:00
Carlos Garnacho
9a541d9b91 inspector: Use gestures/controllers for inspect button 2018-07-30 13:14:12 +02:00
Benjamin Otte
de990614d7 inspector: Introduce so-called "overlays"
Overlays are drawings that get rendered on top of the inspected window.

The only overlay in existence so far is the highlight overlay, which is
used to highlight widgets and replaces the "draw" signal handler used
previously.
2018-04-05 14:57:10 +02:00
Benjamin Otte
6c55096933 inspector: Change semantics of inspector render node notify
Instead of just notifying the inspector of what is going to be rendered,
allow the inspector to modify it.

This way, the inspector can overlay information it deems relevant over
the render node while still having access to what the actual widget
(without the inspector) would paint.
2018-04-05 14:57:10 +02:00
Benjamin Otte
d0873c7dec gsk: Fold gsk_renderer_begin_draw_frame() into renderer
It doesn't need to be exported anymore.

As a side effect, the inspector no longer has any information about the
render region, so remove the code that was taking care of that.
2018-04-05 14:56:38 +02:00
Alexander Larsson
39851fbdbf Continue renaming window to surface
This renames a lot of arguments, local variables and functions.
2018-03-21 11:49:14 +01:00
Alexander Larsson
391727bd0d GdkWindow -> GdkSurface initial type rename
This renames the GdkWindow class and related classes (impl, backend
subclasses) to surface. Additionally it renames related types:
GdkWindowAttr, GdkWindowPaint, GdkWindowWindowClass, GdkWindowType,
GdkWindowTypeHint, GdkWindowHints, GdkWindowState, GdkWindowEdge

This is an automatic conversion using the below commands:

git sed -f g GdkWindowWindowClass GdkSurfaceSurfaceClass

git sed -f g GdkWindow GdkSurface
git sed -f g "gdk_window\([ _\(\),;]\|$\)" "gdk_surface\1" # Avoid hitting gdk_windowing
git sed -f g "GDK_WINDOW\([ _\(]\|$\)" "GDK_SURFACE\1" # Avoid hitting GDK_WINDOWING
git sed "GDK_\([A-Z]*\)IS_WINDOW\([_ (]\|$\)" "GDK_\1IS_SURFACE\2"
git sed GDK_TYPE_WINDOW GDK_TYPE_SURFACE
git sed -f g GdkPointerWindowInfo GdkPointerSurfaceInfo

git sed -f g "BROADWAY_WINDOW" "BROADWAY_SURFACE"
git sed -f g "broadway_window" "broadway_surface"
git sed -f g "BroadwayWindow" "BroadwaySurface"
git sed -f g "WAYLAND_WINDOW" "WAYLAND_SURFACE"
git sed -f g "wayland_window" "wayland_surface"
git sed -f g "WaylandWindow" "WaylandSurface"
git sed -f g "X11_WINDOW" "X11_SURFACE"
git sed -f g "x11_window" "x11_surface"
git sed -f g "X11Window" "X11Surface"
git sed -f g "WIN32_WINDOW" "WIN32_SURFACE"
git sed -f g "win32_window" "win32_surface"
git sed -f g "Win32Window" "Win32Surface"
git sed -f g "QUARTZ_WINDOW" "QUARTZ_SURFACE"
git sed -f g "quartz_window" "quartz_surface"
git sed -f g "QuartzWindow" "QuartzSurface"

git checkout NEWS* po-properties
2018-03-20 11:40:08 +01:00
Alexander Larsson
65ad2541d7 Snapshot: Only record names if inspector is recording
Otherwise we do a lot of allocations and vprintf calls which are
not used.
2017-01-11 10:22:40 +01:00
Benjamin Otte
e950a5190d inspector: Pass the drawing context into the recorder
That way we can capture both the actual changes (clip region) and the
area that was redrawn (render region), which in OpenGL might not be
identical.

Nothing shows the render region yet though...
2016-12-05 15:02:47 +01:00
Benjamin Otte
be237dbb5a inspector: Pass the renderer when recording
... and collect the profiler information from the renderer.
2016-11-20 03:54:43 +01:00
Benjamin Otte
e6f711a94a inspector: Add more infrastructure
This one introduces the Recording object which is essentially a single
instance of something that happened.
The RenderRecording is an instance of an actual rendering operation.
2016-11-01 18:34:40 +01:00
Benjamin Otte
98a500a434 inspector: Add outline for a new "recorder" tab 2016-11-01 18:34:40 +01:00
Matthias Clasen
aa193ce4a4 inspector: UI refresh
The sidebar in the object page was using up more space than it deserves.
Replace it with a combo box in the subheader. Now that we have more space,
put the CSS node tree and the style properties in the same page again.
2016-03-07 00:24:15 -05:00
Matthias Clasen
4b5bcdeaa5 inspector: Drop the per-object CSS editor
The global editor is good enough for all uses.
2016-03-06 21:41:46 -05:00
Matthias Clasen
9a44f18940 inspector: Add a function to rescan
Currently, we only ever scanned the toplevel list and
widget tree once. That is not enough.
2015-07-23 21:27:37 -04:00
Benjamin Otte
d55c261079 inspector: Add a new page that lists the CSS node tree 2015-03-18 15:23:33 +01:00
Matthias Clasen
2b07b6c069 inspector: Add a magnifier
Add a magnifier that shows the selected widget up to 5 times
enlarged.
2014-12-20 19:24:08 -05:00
Alexander Larsson
2d6ae59d7f Inspector: Support extending the inspector using GIOModules
This allows external modules to add a page to the Gtk Inspector.

https://bugzilla.gnome.org/show_bug.cgi?id=740983
2014-12-08 17:34:54 -05:00
Matthias Clasen
850143b7a0 Inspector: Make picking work without a grab
Turns out Weston takes an X grab while delivering button events.
Thus, trying to take a grab in response to a button press is
futile.
2014-10-28 07:05:45 -04:00
Matthias Clasen
a46d4e51f7 inspector: Improve details buttons
Ensure that the details buttons are only sensitive when
we actually have details to show.
2014-10-24 21:52:23 -04:00
Matthias Clasen
70c3241bd3 inspector: Improve tab switching
Switch the object and resource trees away from activate-on-single-click
and add a 'view details' button.
2014-10-24 21:14:16 -04:00
Matthias Clasen
c16fa45bfe inspector: Use a separate display connection
This helps isolate the inspector from some of the changes that
it can trigger. To specify a different display, set
GTK_INSPECTOR_DISPLAY to the name of the display to use for
the inspector window. If no display is specified, GTK+ will
use a separate connection to the default display.
2014-10-24 15:57:33 -04:00
Matthias Clasen
3a19c76017 inspector: Bring the selector back
Make it a separate page instead of the old button path.
2014-10-12 07:57:29 -04:00
Matthias Clasen
7b20bb917f inspector: Small improvements to the resource tab
Move the close button to the header bar and center the info grid.
2014-10-11 00:59:36 -04:00
Matthias Clasen
a5846645d1 inspector: Cosmetic fixes
Set scrollbars and shadows consistently.
2014-10-11 00:59:36 -04:00
Matthias Clasen
dffceb1a17 inspector: Avoid a split pane for objects
Like for the resources page, use a separate page for details
to gain more room for both the tree and the details.
2014-10-11 00:59:36 -04:00
Matthias Clasen
a8dc098699 inspector: More refactoring
Rename widget tree to object tree. It contains plenty of
non-widgets nowadays, after all.
2014-10-11 00:59:36 -04:00
Matthias Clasen
bee90aa8c8 inspector: Drop unused python shell code
This is getting in the way; if somebody comes by who wants
to add scripting support back, we can resurrect this.
2014-10-11 00:59:36 -04:00
Matthias Clasen
6128082f20 inspector: Save some more space
Instead of nesting two notebooks, use a stack switcher in
the headerbar for the outer notebook. This saves valuable
vertical space.
2014-10-11 00:59:36 -04:00
Matthias Clasen
4222e8d713 inspector: Drop the button path
The button path takes up quite a bit of room, and is not _that_
useful. If this information is useful, it can find a new home
on the misc tab.
2014-10-11 00:59:36 -04:00
Matthias Clasen
c88c16d1f4 inspector: Fix various compiler warnings
Mostly missing declarations and missing statics.
2014-09-05 20:52:03 -04:00
Matthias Clasen
2a7577d23a inspector: Show misc info
Add yet another tab for showing information about a widget that
does not quite fit into any of the other tabs (not a property,
not style information, etc...).

For now, we show the widget state, as well as the default and
focus widget for windows.
2014-07-21 11:18:29 -04:00
Matthias Clasen
f8986d9aa7 inspector: Clean up includes
Don't include gtk.h, instead include individual headers.
And include config.h and gi18n-lib.h everywhere.
2014-07-11 23:14:04 -04:00
Matthias Clasen
b0390a3349 GtkInspector: Add a function to select the widget under the pointer 2014-07-06 22:37:57 -04:00
Matthias Clasen
2a053cc6c3 GtkInspector: Add a style tab
This tab shows css properties of a widget, and their origin.
2014-07-06 22:37:57 -04:00
Matthias Clasen
2346ccde43 inspector: show GMenus
This does not quite work yet, and I have no idea why.
2014-06-05 08:32:15 -04:00
Matthias Clasen
205e8f7e58 inspector: Show the widget tree when picking
Makes more sense that way.
2014-06-04 20:12:42 -04:00
Matthias Clasen
a47d0406a7 inspector: Add more complete gesture support
Add a dedicated tab that shows how gestures are grouped,
and allows changing the propagation phase.
2014-05-23 19:54:32 +02:00
Matthias Clasen
538b987bc5 inspector: Add a way to highlight widgets
In contrast to the flashing, where we blink the widget a
few times, this is explicitly turned on and off.

It will be used for indicating widgets that are part of
a size group, in the next commit.
2014-05-20 21:43:00 -04:00
Matthias Clasen
2d2f9861a6 inspector: Show GAction information
Show the actions that are added to GtkApplication and
GtkApplicationWindows, as well as action groups that are
inserted elsewhere with gtk_widget_insert_action_group.

https://bugzilla.gnome.org/show_bug.cgi?id=730095
2014-05-14 21:40:01 -04:00
Matthias Clasen
59c9d24bbf inspector: stop being a module
Moving the inspector into libgtk lets use reuse internals without
having to add public API for everything or inventing awkward private
call conventions.

https://bugzilla.gnome.org/show_bug.cgi?id=730095
2014-05-14 21:23:44 -04:00