gdk3 gdk.h/gtk.h enums wrong values
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
lsb |
In Progress
|
Medium
|
Unassigned | ||
Mandriva |
In Progress
|
Medium
|
Bug Description
Most of the enums defined in gtk-3.0/gdk/gdk.h have fields given
explicit values in the upstream, but have no values in the LSB version
(note the LSB gtk-2.0 ones do get assigned values). In some cases
this may be harmless but in some cases there are clear errors. These
enums all need to be examined and fixed up. Here's a partial example,
a hand-crafted bit of code to print out the first entries from
GdkEventType:
Native build:
GDK_NOTHING = -1
GDK_DELETE = 0
GDK_DESTROY = 1
GDK_EXPOSE = 2
GDK_MOTION_NOTIFY = 3
GDK_BUTTON_PRESS = 4
GDK_2BUTTON_PRESS = 5
GDK_DOUBLE_
GDK_3BUTTON_PRESS = 6
GDK_TRIPLE_
GDK_BUTTON_
GDK_KEY_PRESS = 8
GDK_KEY_RELEASE = 9
GDK_ENTER_NOTIFY = 10
GDK_LEAVE_NOTIFY = 11
LSBCC build:
GDK_NOTHING = 0
GDK_DELETE = 1
GDK_DESTROY = 2
GDK_EXPOSE = 3
GDK_MOTION_NOTIFY = 4
GDK_BUTTON_PRESS = 5
GDK_2BUTTON_PRESS = 6
GDK_DOUBLE_
GDK_3BUTTON_PRESS = 8
GDK_TRIPLE_
GDK_BUTTON_
GDK_KEY_PRESS = 11
GDK_KEY_RELEASE = 12
GDK_ENTER_NOTIFY = 13
GDK_LEAVE_NOTIFY = 14
notice by not giving values, we've missed the -1 for GDK_NOTHING,
which instead starts at the default 0; and the import also missed that
GDK_DOUBLE_
don't take distinct values. They're defined as follows in the upstream
header:
GDK_2BUTTON_PRESS = 5,
GDK_DOUBLE_
GDK_3BUTTON_PRESS = 6,
GDK_TRIPLE_
Changed in mandriva: | |
importance: | Unknown → Medium |
status: | Unknown → In Progress |
tags: | added: zclose |
tags: | added: gtk3 |