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 682788 - Hide the ClutterEvent structure contents
Hide the ClutterEvent structure contents
Status: RESOLVED OBSOLETE
Product: clutter
Classification: Platform
Component: general
git master
Other Linux
: Normal enhancement
: 2.0
Assigned To: clutter-maint
clutter-maint
Depends on:
Blocks: clutter-2-0
 
 
Reported: 2012-08-27 10:35 UTC by Emmanuele Bassi (:ebassi)
Modified: 2021-06-10 11:30 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
event: Make event structure opaque (29.75 KB, patch)
2012-08-27 14:31 UTC, Emmanuele Bassi (:ebassi)
none Details | Review

Description Emmanuele Bassi (:ebassi) 2012-08-27 10:35:36 UTC
ClutterEvent should be fully opaque to the user, and only offer accessor functions to retrieve its state.

Synthetic ClutterEvent should only be allocated through clutter_event_new(), and never be placed on the stack.
Comment 1 Emmanuele Bassi (:ebassi) 2012-08-27 14:31:29 UTC
Created attachment 222557 [details] [review]
event: Make event structure opaque

ClutterEvent should not be fully exposed to the C developer: it prevents
us from expanding the event-related API, and forces us to use nasty
tricks to add platform-specific or extended data without breaking the
ABI for people placing events on the stack.
Comment 2 Emmanuele Bassi (:ebassi) 2012-10-08 13:24:47 UTC
one thing we need to determine is whether to remove copy/free and make Event a refcounted type, or add copy-on-write semantics for Events.

we could make it so that events are mutable by default, until pushed onto the queue, after which they become immutable and can only be copied in order to be modified. for instance:

  event = clutter_event_create_pointer (PRESS, &coords, button, state, time).
  assert (event.is_mutable())

  clutter_event_set_foo (event, blah)

  clutter_event_push (event);
  assert (!event.is_mutable())

  clutter_event_set_foo (event, blah) ← warns and fails
Comment 3 André Klapper 2021-06-10 11:30:53 UTC
GNOME is going to shut down bugzilla.gnome.org in favor of gitlab.gnome.org.
As part of that, we are mass-closing older open tickets in bugzilla.gnome.org
which have not seen updates for a longer time (resources are unfortunately
quite limited so not every ticket can get handled).

If you can still reproduce the situation described in this ticket in a recent
and supported software version of clutter, then please follow
  https://wiki.gnome.org/GettingInTouch/BugReportingGuidelines
and create a ticket at
  https://gitlab.gnome.org/GNOME/clutter/-/issues/

Thank you for your understanding and your help.