After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 730095 - Add a private call API to export internals to modules
Add a private call API to export internals to modules
Status: RESOLVED FIXED
Product: gtk+
Classification: Platform
Component: .General
unspecified
Other All
: Normal normal
: ---
Assigned To: gtk-bugs
gtk-bugs
Depends on:
Blocks:
 
 
Reported: 2014-05-14 00:39 UTC by Matthias Clasen
Modified: 2014-05-15 01:40 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Add a private call API to export internals to modules (4.07 KB, patch)
2014-05-14 00:39 UTC, Matthias Clasen
none Details | Review
inspector: Show GAction information (16.40 KB, patch)
2014-05-14 00:40 UTC, Matthias Clasen
none Details | Review
GtkActionMuxer: Add getters (2.16 KB, patch)
2014-05-14 00:56 UTC, Matthias Clasen
committed Details | Review
Add private GtkWidget api for action groups (1.80 KB, patch)
2014-05-14 00:56 UTC, Matthias Clasen
committed Details | Review
Add a private call API to export internals to modules (4.07 KB, patch)
2014-05-14 00:56 UTC, Matthias Clasen
none Details | Review
inspector: Show GAction information (16.40 KB, patch)
2014-05-14 00:57 UTC, Matthias Clasen
committed Details | Review

Description Matthias Clasen 2014-05-14 00:39:39 UTC
This is modeled on the glib-private.h mechanism in GLib.

The gtk__private__() API exports a hidden vtable, and adds
a GTK_PRIVATE_CALL() macro to use it conveniently. This mechanism
can be used to make internal functions available to code that is
part of the GTK+ repository, but lives outside libgtk.so.

The first user of this mechanism is the inspector module.
Comment 1 Matthias Clasen 2014-05-14 00:39:42 UTC
Created attachment 276489 [details] [review]
Add a private call API to export internals to modules
Comment 2 Matthias Clasen 2014-05-14 00:40:17 UTC
Created attachment 276490 [details] [review]
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.

This patch uses the new GTK_PRIVATE_CALL() api to get
information about action groups that is not available
via the regular GTK+ api.
Comment 3 Matthias Clasen 2014-05-14 00:56:19 UTC
Created attachment 276493 [details] [review]
GtkActionMuxer: Add getters

Add a way to enumerate all prefixes, and to get the
action group for a prefix.
Comment 4 Matthias Clasen 2014-05-14 00:56:32 UTC
Created attachment 276494 [details] [review]
Add private GtkWidget api for action groups

Similar to the just-added action muxer api for enumerating
action prefixes and for getting the action group for a
prefix.
Comment 5 Matthias Clasen 2014-05-14 00:56:50 UTC
Created attachment 276495 [details] [review]
Add a private call API to export internals to modules

This is modeled on the glib-private.h mechanism in GLib.

The gtk__private__() API exports a hidden vtable, and adds
a GTK_PRIVATE_CALL() macro to use it conveniently. This mechanism
can be used to make internal functions available to code that is
part of the GTK+ repository, but lives outside libgtk.so.

The first user of this mechanism is the inspector module.
Comment 6 Matthias Clasen 2014-05-14 00:57:01 UTC
Created attachment 276496 [details] [review]
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.

This patch uses the new GTK_PRIVATE_CALL() api to get
information about action groups that is not available
via the regular GTK+ api.
Comment 7 Matthias Clasen 2014-05-14 03:57:30 UTC
Benjamin suggested as an alternative to move the inspector from being a module into libgtk, giving it full access to internals.
Comment 8 Matthias Clasen 2014-05-15 01:40:37 UTC
Attachment 276493 [details] pushed as 4396bbd - GtkActionMuxer: Add getters
Attachment 276494 [details] pushed as 3f224a7 - Add private GtkWidget api for action groups
Attachment 276496 [details] pushed as 2d2f986 - inspector: Show GAction information