Bug 19171 - [GTK] GTypes for enumeration
: [GTK] GTypes for enumeration
Status: RESOLVED FIXED
Product: WebKit
Classification: Unclassified
Component: WebKit Gtk
: 528+ (Nightly build)
: All All
: P2 Normal
Assigned To: Nobody
:
Depends on:
Blocks: 16562
  Show dependency treegraph
 
Reported: 2008-05-21 11:53 PDT by Marco Barisione
Modified: 2008-06-18 04:38 PDT (History)
1 user (show)

See Also:


Attachments
Generate webkit-enum-types.h and .cpp (4.83 KB, patch)
2008-05-21 12:05 PDT, Marco Barisione
no flags Details | Formatted Diff | Diff
Generate webkit-enum-types.h and .cpp (4.91 KB, patch)
2008-06-12 11:15 PDT, Marco Barisione
alp: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Marco Barisione 2008-05-21 11:53:23 PDT
WebKit doesn't have gobject types for enums, so they cannot be used as properties.
Comment 1 Marco Barisione 2008-05-21 12:05:07 PDT
Created attachment 21273 [details]
Generate webkit-enum-types.h and .cpp
Comment 2 Jan Alonzo 2008-05-22 06:21:56 PDT
*** Bug 16119 has been marked as a duplicate of this bug. ***
Comment 3 Jan Alonzo 2008-05-29 06:30:54 PDT
Rather than using sed, is it better to use /*< underscore_name=foo >*/ in beside the enum decl?
Comment 4 Eric Seidel 2008-06-06 13:42:51 PDT
Comment on attachment 21273 [details]
Generate webkit-enum-types.h and .cpp

Um.  I have no clue if this is right or not.  Looks sane to me, but someone from GTK land should review.
Comment 5 Marco Barisione 2008-06-12 08:09:05 PDT
(In reply to comment #3)
> Rather than using sed, is it better to use /*< underscore_name=foo >*/ in
> beside the enum decl?

I didn't know of its existence and on #gnome-hackers everyone suggested to use sed. What I don't like of underscore_name is that you have to remember to put it everywhere and if you forget it you will probably realise the error only when someone will start using a WebKit enum type for a property.

What do you prefer: the clean and error prone way or the ugly but working one? ;)
Comment 6 Jan Alonzo 2008-06-12 08:16:21 PDT
Working is good =)
Comment 7 Marco Barisione 2008-06-12 11:15:25 PDT
Created attachment 21663 [details]
Generate webkit-enum-types.h and .cpp

Same patch but that doesn't break out-of-tree builds.
Comment 8 Alp Toker 2008-06-17 08:46:23 PDT
Comment on attachment 21663 [details]
Generate webkit-enum-types.h and .cpp

Please keep an eye on the bot when landing this to avoid build breakage.
Comment 9 Jan Alonzo 2008-06-18 04:38:58 PDT
Landed in r34646