Compare commits

..

638 Commits

Author SHA1 Message Date
Tristan Van Berkom
54d44a9bd0 Merge branch 'master' into native-layout
Conflicts:
	gtk/gtkplug.c
	gtk/gtkscrolledwindow.c
2010-08-30 14:56:28 +09:00
Tristan Van Berkom
67194ed77b Fixed debug build for GTK_PLUG (plug)->socket_window direct accesses. 2010-08-28 16:19:16 +09:00
Tristan Van Berkom
deaa351630 Added initial revision of GtkWrapBox container widget and test case. 2010-08-28 16:01:59 +09:00
Javier Jardón
2a2f7c0993 gtk/gtkwidget.c: Use accessor functions to access GtkWindow 2010-08-28 03:40:47 +02:00
Javier Jardón
face33a411 docs/reference/gtk/gtk3-sections.txt: Use GtkFooPrivate instead GtkFooPriv
This completes commit 1e5d7c0225
2010-08-28 03:24:04 +02:00
Fran Diéguez
cd7c3625d7 Updated Galician translations 2010-08-27 23:25:56 +02:00
Javier Jardón
e8184f2a46 GtkPlug: move public members to private structures 2010-08-27 23:12:12 +02:00
Javier Jardón
af8efa0b46 Use accessor functions to access GtkPlug 2010-08-27 23:12:12 +02:00
Bruno Brouard
2425dad948 Updated French translation 2010-08-27 22:19:23 +02:00
Bruno Brouard
0293e2443d Updated French translation 2010-08-27 20:54:25 +02:00
Claude Paroz
c3395dd726 Add missing files in po-properties/POTFILES.in
Accessorily, use the same sort in both POTFILES.in to easily compare
files.
2010-08-27 18:34:10 +02:00
Alexander Shopov
8526997205 Updated Bulgarian translation 2010-08-27 16:20:48 +03:00
Yaron Shahrabani
f3ff581c26 Updated Hebrew translation. 2010-08-27 16:19:53 +03:00
Javier Jardón
1e5d7c0225 Use GtkFooPrivate instead GtkFooPriv 2010-08-27 04:48:23 +02:00
Javier Jardón
c6a44d8494 gtk/gtkseparator: Do not use GET_PRIVATE macro all the time
Use a private pointer instead
2010-08-26 18:00:09 +02:00
Javier Jardón
8d983a4547 gtk/gtkfilesystem: Do not use GET_PRIVATE macro all the time
Use a private pointer instead
2010-08-26 15:58:20 +02:00
Javier Jardón
904769b004 gdk/gdkwindowimpl.c: Use G_DEFINE_INTERFACE macro 2010-08-26 14:57:56 +02:00
Javier Jardón
29685170cf gdk/x11/gdkeventtranslator.c: use G_DEFINE_INTERFACE macro 2010-08-26 14:57:56 +02:00
Gabor Kelemen
3247a3a7cd Updated Hungarian translation 2010-08-26 04:01:47 +02:00
Javier Jardón
1b77e36a59 gtk/gtksizerequest.c: Use G_DEFINE_INTERFACE macro 2010-08-26 00:33:56 +02:00
Javier Jardón
523ea1c656 gtk/gtktoolshell.c: Use G_DEFINE_INTERFACE macro 2010-08-26 00:33:56 +02:00
Javier Jardón
c0b8104232 gtk/gtkcellsizerequest.c: Use G_DEFINE_INTERFACE macro 2010-08-26 00:33:56 +02:00
Javier Jardón
24fedeccac gtk/gtkcelllayout.c: Use G_DEFINE_INTERFACE macro 2010-08-26 00:33:56 +02:00
Javier Jardón
208e548ab1 gtk/gtkrecentchooser.c: Use G_DEFINE_INTERFACE macro 2010-08-26 00:33:56 +02:00
Javier Jardón
c1476c951e gtk/gtkfilechooser.c: Use G_DEFINE_INTERFACE macro 2010-08-26 00:33:56 +02:00
Matthias Clasen
3e4e2b233b Fix trivial doc typo
Pointed out in bug 627912.
2010-08-25 18:17:43 -04:00
Javier Jardón
45e2176683 Use G_DEFINE_INTERFACE macro in gtkactivatable
https://bugzilla.gnome.org/show_bug.cgi?id=605186
2010-08-25 15:06:40 +02:00
Matthias Clasen
d5a8a3c9bc Make gdk_keymap_map_virtual_modifiers work early
It needs to ensure that we have an uptodate modmap. Bug 616401
2010-08-25 01:05:29 -04:00
Matthias Clasen
1f1b404194 Document that the GTK_STOCK_FILE label is new 2010-08-25 00:46:47 -04:00
Matthias Clasen
586bbc9b13 Make the initial focus in dialogs work as intended
We had code that tried to prevent selecting the text in the label
if we end up focusing a label, but it didn't take effect, because
we were moving the focus into the label again afterwards.
2010-08-25 00:43:16 -04:00
Matthias Clasen
e1143c2d45 Make empty buttonboxes work again
There was some less than careful / nvis_children.
2010-08-25 00:29:27 -04:00
Matthias Clasen
06c2777d88 Make builtin rc consistent
I removed the default label style a few days ago, so it should
no longer be referenced either.
2010-08-25 00:28:23 -04:00
Matthias Clasen
2766cd14ad Remove depth restriction from gtk_combo_box_set_active_iter docs
While it may not work perfectly in menu mode, it works fine for
list mode. Bug 627843.
2010-08-24 21:51:17 -04:00
Sergey Orlov
a676f9dada bgo#614006 - GtkFileSystemModel - Make sure to generate node IDs are valid for new files
When a file was inserted during the period that the editable row was
active, the node IDs would not get updated correctly.

Signed-off-by: Federico Mena Quintero <federico@novell.com>
2010-08-24 17:09:37 -05:00
Javier Jardón
72fad93587 tests/testsocket: Fix broken test
Fixes https://bugzilla.gnome.org/show_bug.cgi?id=627867
2010-08-24 23:49:21 +02:00
Javier Jardón
1abb8f6e7f gdk/gdkwindow.c: Fix compilation warning 2010-08-24 21:27:57 +02:00
Javier Jardón
c05f344c0a Use gtk_window_has_group() to know if the window has an explicit window group.
gtk_window_get_group() never returns NULL; if the window isn't in a group,
a default window group is returned instead. Use gtk_window_has_group() instead.
This fixes some previous commits to use accessors to access GtkWindow.

Reported by Philip Withnall in bug
https://bugzilla.gnome.org/show_bug.cgi?id=627828
2010-08-24 16:16:42 +02:00
Ivar Smolin
891694d9ff [l10n] Updated Estonian translation 2010-08-24 15:11:59 +03:00
noch
10ff05fb0c Added Armenian translation - po file. Modified LINGUAS. 2010-08-24 10:01:41 +05:00
noch
1e33284d60 Added Armenian translation - po file in ./po and ./po-properties directories. Modified LINGUAS. 2010-08-24 09:57:43 +05:00
Javier Jardón
f4f607690d GtkRange: move public members to private structure 2010-08-23 20:48:03 +02:00
Javier Jardón
ff445e2b79 Use accessor functions to access GtkRange 2010-08-23 20:47:52 +02:00
Javier Jardón
27ec5cd556 gtkscalebutton: use accessor functions to access GtkRange 2010-08-23 20:47:45 +02:00
Javier Jardón
a64869db9e gtkscale: use accessor functions to access GtkRange 2010-08-23 20:47:38 +02:00
Javier Jardón
f300aefa7e Added _gtk_range_set_steppers () internal function
It's needed by gtkscrollbar
2010-08-23 20:47:30 +02:00
Javier Jardón
1814ea6abd Added _gtk_range_set_round_digits() insternal function
It's needed by gtkscale
2010-08-23 20:47:23 +02:00
Javier Jardón
d38bf4825a gtkrange: Add some checks to gtk_range_set_slider_size_fixed()
Recalculate layout only if the range is already mapped and
adjustment is not NULL.
2010-08-23 20:47:16 +02:00
Javier Jardón
65a28efc15 gtk/gtkprintunixdialog.c: Use accessor functions to access GtkWindow 2010-08-23 20:19:44 +02:00
Javier Jardón
f05acd707d gtk/gtktreeview.c: Use accessor functions to access GtkWindow 2010-08-23 20:19:38 +02:00
Javier Jardón
31d22d3083 gtk/gtksocket.c: Use accessor functions to access GtkWindow 2010-08-23 20:19:31 +02:00
Javier Jardón
97cbe801c1 gtk/gtkrecentchooserdefault.c: Use accessor functions to access GtkWindow 2010-08-23 20:19:24 +02:00
Javier Jardón
fb4661be6d gtk/gtkprintoperation.c: Use accessor functions to access GtkWindow 2010-08-23 20:19:18 +02:00
Javier Jardón
54b8b51f43 gtk/gtkpaned.c: Use accessor functions to access GtkWindow 2010-08-23 20:19:11 +02:00
Javier Jardón
f91e5e2ac9 gtk/gtknotebook.c: Use accessor functions to access GtkWindow 2010-08-23 20:19:03 +02:00
Javier Jardón
991eaa7580 gtk/gtklabel.c: Use accessor functions to access GtkWindow 2010-08-23 20:18:55 +02:00
Javier Jardón
e00ffe3872 gtk/gtkfontsel.c: Use accessor functions to access GtkWindow 2010-08-23 20:18:48 +02:00
Javier Jardón
7325c67570 gtk/gtkfilechooserdefault.c: Use accessor functions to access GtkWindow 2010-08-23 20:18:41 +02:00
Javier Jardón
64fca99a89 gtk/gtkfilechooserbutton.c: Use accessor functions to access GtkWindow 2010-08-23 20:18:34 +02:00
Javier Jardón
65266d971e gtk/gtkentry.c: Use accessor functions to access GtkWindow 2010-08-23 20:18:27 +02:00
Javier Jardón
50aec80efb gtk/gtkdnd.c: Use accessor functions to access GtkWindow 2010-08-23 20:18:20 +02:00
Javier Jardón
014fc1f73a gtk/gtkdialog.c: Use accessor functions to access GtkWindow 2010-08-23 20:18:10 +02:00
Javier Jardón
595b27e22d gtk/gtkcontainer.c: Use accessor functions to access GtkWindow 2010-08-23 20:18:03 +02:00
Javier Jardón
1fe89643a5 gtk/gtkcolorsel.c: Use accessor functions to access GtkWindow 2010-08-23 20:17:56 +02:00
Javier Jardón
fe16bdd8d4 gail: Use accessor functions to access GtkWindow 2010-08-23 20:17:49 +02:00
Javier Jardón
a0e0c9e89c tests/testgtk.c: Use accessor functions to access GtkWindow 2010-08-23 20:17:41 +02:00
Javier Jardón
e5ed2c02a3 Revert from "edit-preferences" to "gtk-preferences"
There is not a icon named "edit-preferences" in the spec
http://standards.freedesktop.org/icon-naming-spec/icon-naming-spec-latest.html
2010-08-23 18:18:05 +02:00
Tor Lillqvist
56f71f0123 Fix Win32 build
Builds now, except for the ms-windows theme engine. It doesn't really
work, though.
2010-08-23 18:55:54 +03:00
Javier Jardón
29a758d4c2 The correct icon name is "dialog-information", not "dialog-info"
Spec here:
http://standards.freedesktop.org/icon-naming-spec/icon-naming-spec-latest.html
2010-08-23 17:47:28 +02:00
Klemen Košir
1dc0502b4a Updated Slovenian translation 2010-08-23 14:53:38 +02:00
Benjamin Otte
8856bfc60e directfb: Remove
As announced by email and on IRC, this backend is removed from GTK 3.
It has been broken for over a year with no one fixing it.
2010-08-23 12:44:58 +02:00
Benjamin Otte
7eabb8fd3c container: suggest parentheses around assignment used as truth value 2010-08-23 12:37:22 +02:00
Torstein Adolf Winterseth
64a852dc76 Updated Norwegian Nynorsk translation 2010-08-23 09:17:26 +02:00
Fran Diéguez
7451827cf9 Updated galician translations 2010-08-23 02:22:00 +02:00
Matthias Clasen
b415d2f79b Fix a translation problem in the about dialog
The license preamble needs to be translated with the GTK+ domain,
not the applications. Bug 627643.
2010-08-22 19:05:35 -04:00
Javier Jardón
ab93613037 gtk/gtk.symbols: Add gtk_cell_view_get_desired_height_for_width_of_row() 2010-08-22 23:35:27 +02:00
Javier Jardón
f3d6aa8bf3 gtk/gtktrayicon-x11.c: Use accessor functions to access GtkWidget 2010-08-22 22:56:17 +02:00
Javier Jardón
04fd195b9b gtk/gtksocket-x11.c: Use accessor functions to access GtkWidget 2010-08-22 22:56:17 +02:00
Javier Jardón
f25ad7899a gtk/gtkplug-x11.c: Use accessor functions to access GtkWidget 2010-08-22 22:56:17 +02:00
Javier Jardón
0a1130dcb9 gtk/gtkprintunixdialog.c: Use accessor functions to access GtkWidget 2010-08-22 22:56:17 +02:00
Javier Jardón
07d3f20202 gtk/gtkdnd.c: Use accessor functions to access GtkWidget 2010-08-22 22:56:16 +02:00
Javier Jardón
b99348e443 gtk/gtkaboutdialog.c: use accessor functions to access GtkWidget 2010-08-22 22:56:16 +02:00
Javier Jardón
091335fcb4 gtk/gtkalignment.c: use accessor functions to access GtkWidget 2010-08-22 22:56:16 +02:00
Javier Jardón
2201b2abb6 gtk/gtkassistant.c: use accessor functions to access GtkWidget 2010-08-22 22:56:16 +02:00
Javier Jardón
b05e897453 gtk/gtkbbox.c: use accessor functions to access GtkWidget 2010-08-22 22:56:16 +02:00
Javier Jardón
d9b459dd64 gtk/gtkbox.c: use accessor functions to access GtkWidget 2010-08-22 22:56:16 +02:00
Javier Jardón
6cad69e32a gtk/gtkbutton.c: use accessor functions to access GtkWidget 2010-08-22 22:56:15 +02:00
Javier Jardón
1b1845863a gtk/gtkcalendar.c: use accessor functions to access GtkWidget 2010-08-22 22:56:15 +02:00
Javier Jardón
c6b86761d6 gtk/gtkcellrendereraccel.c: use accessor functions to access GtkWidget 2010-08-22 22:56:15 +02:00
Javier Jardón
7b5656b492 gtk/gtkcellrendererpixbuf.c: use accessor functions to access GtkWidget 2010-08-22 22:56:15 +02:00
Javier Jardón
4a17e27a1e gtk/gtkcellrendererprogress.c: use accessor functions to access GtkWidget 2010-08-22 22:56:15 +02:00
Javier Jardón
cc70f342d0 gtk/gtkcellrendererspinner.c: use accessor functions to access GtkWidget 2010-08-22 22:56:15 +02:00
Javier Jardón
aad72e59fa gtk/gtkcellrenderertext.c: use accessor functions to access GtkWidget 2010-08-22 22:56:14 +02:00
Javier Jardón
dd61c2bdea gtk/gtkcellrenderertoggle.c: use accessor functions to access GtkWidget 2010-08-22 22:56:14 +02:00
Javier Jardón
e9915fc8d6 gtk/gtkcellview.c: use accessor functions to access GtkWidget 2010-08-22 22:56:14 +02:00
Javier Jardón
aa63485b87 gtk/gtkcheckbutton.c: use accessor functions to access GtkWidget 2010-08-22 22:56:14 +02:00
Javier Jardón
1e3448f222 gtk/gtkcheckmenuitem.c: use accessor functions to access GtkWidget 2010-08-22 22:56:14 +02:00
Javier Jardón
0baa3feb4b gtk/gtkcolorbutton.c: use accessor functions to access GtkWidget 2010-08-22 22:56:14 +02:00
Javier Jardón
e9b85cf100 gtk/gtkcolorsel.c: use accessor functions to access GtkWidget 2010-08-22 22:56:13 +02:00
Javier Jardón
42a0a8143b gtk/gtkcombobox.c: use accessor functions to access GtkWidget 2010-08-22 22:56:13 +02:00
Javier Jardón
3a89cc150c gtk/gtkcontainer.c: use accessor functions to access GtkWidget 2010-08-22 22:56:13 +02:00
Javier Jardón
83372be93e gtk/gtkcontainer.c: use accessor functions to access GtkWidget 2010-08-22 22:56:13 +02:00
Javier Jardón
4def73b386 gtk/gtkdialog.c: use accessor functions to access GtkWidget 2010-08-22 22:56:13 +02:00
Javier Jardón
379fc17fa9 gtk/gtkdrawingarea.c: use accessor functions to access GtkWidget 2010-08-22 22:56:12 +02:00
Javier Jardón
4ddff2691b gtk/gtkentry.c: use accessor functions to access GtkWidget 2010-08-22 22:56:12 +02:00
Javier Jardón
325a00e40d gtk/gtkentrycompletion.c: use accessor functions to access GtkWidget 2010-08-22 22:56:12 +02:00
Javier Jardón
7764ee564c gtk/gtkeventbox.c: use accessor functions to access GtkWidget 2010-08-22 22:56:12 +02:00
Javier Jardón
f11207c33e gtk/gtkexpander.c: use accessor functions to access GtkWidget 2010-08-22 22:56:12 +02:00
Javier Jardón
b62b834eb5 gtk/gtkfilechooserdefault.c: use accessor functions to access GtkWidget 2010-08-22 22:56:12 +02:00
Javier Jardón
7f8aaf04da gtk/gtkfilechooserentry.c: use accessor functions to access GtkWidget 2010-08-22 22:56:11 +02:00
Javier Jardón
fe2815026b gtk/gtkfixed.c: use accessor functions to access GtkWidget 2010-08-22 22:56:11 +02:00
Javier Jardón
2758329204 gtk/gtkframe.c: use accessor functions to access GtkWidget 2010-08-22 22:56:11 +02:00
Javier Jardón
effdde9471 gtk/gtkhsv.c: use accessor functions to access GtkWidget 2010-08-22 22:56:11 +02:00
Javier Jardón
90ee7ca493 gtk/gtkimagemenuitem.c: use accessor functions to access GtkWidget 2010-08-22 22:56:11 +02:00
Javier Jardón
37d62149bb gtk/gtkinfobar.c: use accessor functions to access GtkWidget 2010-08-22 22:56:10 +02:00
Javier Jardón
0a3431e8f6 gtk/gtkinvisible.c: use accessor functions to access GtkWidget 2010-08-22 22:56:10 +02:00
Javier Jardón
84297150e8 gtk/gtkitem.c: use accessor functions to access GtkWidget 2010-08-22 22:56:10 +02:00
Javier Jardón
69b6dbdb08 gtk/gtklabel.c: use accessor functions to access GtkWidget 2010-08-22 22:56:10 +02:00
Javier Jardón
26f21cf0e9 gtk/gtklayout.c: use accessor functions to access GtkWidget 2010-08-22 22:56:10 +02:00
Javier Jardón
00152ff835 gtk/gtklinkbutton.c: use accessor functions to access GtkWidget 2010-08-22 22:56:10 +02:00
Javier Jardón
1783b227e8 gtk/gtkmain.c: use accessor functions to access GtkWidget 2010-08-22 22:56:09 +02:00
Javier Jardón
7587ee2dde gtk/gtkmenubar.c: use accessor functions to access GtkWidget 2010-08-22 22:56:09 +02:00
Javier Jardón
4d928459d3 gtk/gtkmenuitem.c: use accessor functions to access GtkWidget 2010-08-22 22:56:09 +02:00
Javier Jardón
03842616fb gtk/gtkmenushell.c: use accessor functions to access GtkWidget 2010-08-22 22:56:09 +02:00
Javier Jardón
298b3643aa gtk/gtkmenutoolbutton.c: use accessor functions to access GtkWidget 2010-08-22 22:56:09 +02:00
Javier Jardón
593b32c6ab gtk/gtkmessagedialog.c: use accessor functions to access GtkWidget 2010-08-22 21:25:26 +02:00
Javier Jardón
ce977a1a33 gtk/gtkmnemonichash.c: use accessor functions to access GtkWidget 2010-08-22 21:25:26 +02:00
Javier Jardón
f8ac83bc07 gtk/gtkoffscreenwindow.c: use accessor functions to access GtkWidget 2010-08-22 21:25:26 +02:00
Javier Jardón
e49c130018 gtk/gtkpaned.c: use accessor functions to access GtkWidget 2010-08-22 21:25:26 +02:00
Javier Jardón
d854499f4a gtk/gtkplug.c: use accessor functions to access GtkWidget 2010-08-22 21:25:26 +02:00
Javier Jardón
6b7efdf8a1 gtk/gtkprogressbar.c: use accessor functions to access GtkWidget 2010-08-22 21:25:25 +02:00
Javier Jardón
d52eb49529 gtk/gtkradiobutton.c: use accessor functions to access GtkWidget 2010-08-22 21:25:25 +02:00
Javier Jardón
c6f4e71a31 gtk/gtkrange.c: use accessor functions to access GtkWidget 2010-08-22 21:25:25 +02:00
Javier Jardón
c35fa9bc5a gtk/gtkrecentchooserdefault.c: use accessor functions to access GtkWidget 2010-08-22 21:25:25 +02:00
Javier Jardón
dbd395a7ac gtk/gtkscale.c: use accessor functions to access GtkWidget 2010-08-22 21:25:25 +02:00
Javier Jardón
41fcf40648 gtk/gtkscalebutton.c: use accessor functions to access GtkWidget 2010-08-22 21:25:25 +02:00
Javier Jardón
482637a41e gtk/gtkscrolledwindow.c: use accessor functions to access GtkWidget 2010-08-22 21:25:25 +02:00
Javier Jardón
804ad0dd88 gtk/gtksizegroup.c: use accessor functions to access GtkWidget 2010-08-22 21:25:25 +02:00
Javier Jardón
4870f2ec30 gtk/gtkselection.c: use accessor functions to access GtkWidget 2010-08-22 21:25:24 +02:00
Javier Jardón
ab27b01fb9 gtk/gtkseparatortoolitem.c: use accessor functions to access GtkWidget 2010-08-22 21:25:24 +02:00
Javier Jardón
551fa5c8df gtk/gtksocket.c: use accessor functions to access GtkWidget 2010-08-22 21:25:24 +02:00
Javier Jardón
91a49bac5a gtk/gtkspinner.c: use accessor functions to access GtkWidget 2010-08-22 21:25:24 +02:00
Javier Jardón
4847b9a940 gtk/gtkstatusbar.c: use accessor functions to access GtkWidget 2010-08-22 21:25:24 +02:00
Javier Jardón
f43610e110 gtk/gtkstatusicon.c: use accessor functions to access GtkWidget 2010-08-22 21:25:24 +02:00
Javier Jardón
bf1f03ad5d gtk/gtkstyle.c: use accessor functions to access GtkWidget 2010-08-22 21:25:24 +02:00
Javier Jardón
c9dd25bd11 gtk/gtktable.c: use accessor functions to access GtkWidget 2010-08-22 21:25:24 +02:00
Javier Jardón
c4b452a22c gtk/gtktearoffmenuitem.c: use accessor functions to access GtkWidget 2010-08-22 21:25:23 +02:00
Javier Jardón
c6dcef5089 gtk/gtktestutils.c: use accessor functions to access GtkWidget 2010-08-22 21:25:23 +02:00
Javier Jardón
82f521b514 gtk/gtktextdisplay.c: use accessor functions to access GtkWidget 2010-08-22 21:25:23 +02:00
Javier Jardón
063454f630 gtk/gtktextutil.c: use accessor functions to access GtkWidget 2010-08-22 21:25:23 +02:00
Javier Jardón
7fd15c82bf gtk/gtktoolbar.c: use accessor functions to access GtkWidget 2010-08-22 21:25:23 +02:00
Javier Jardón
7e753a9a86 gtk/gtktoolbutton.c: use accessor functions to access GtkWidget 2010-08-22 21:25:23 +02:00
Javier Jardón
5e2c943742 gtk/gtktoolitem.c: use accessor functions to access GtkWidget 2010-08-22 21:25:23 +02:00
Javier Jardón
1f9eb57338 gtk/gtktoolitemgroup.c: use accessor functions to access GtkWidget 2010-08-22 21:25:23 +02:00
Javier Jardón
34e63dcd46 gtk/gtktoolpalette.c: use accessor functions to access GtkWidget 2010-08-22 21:25:23 +02:00
Javier Jardón
3f101bb08c gtk/gtktooltip.c: use accessor functions to access GtkWidget 2010-08-22 21:25:22 +02:00
Javier Jardón
1c6b3f53a0 gtk/gtktreeviewcolumn.c: use accessor functions to access GtkWidget 2010-08-22 21:25:22 +02:00
Javier Jardón
a44969e877 gtk/gtkuimanager.c: use accessor functions to access GtkWidget 2010-08-22 21:25:22 +02:00
Javier Jardón
ae47b7925a gtk/gtkviewport: use accessor functions to access GtkWidget 2010-08-22 21:25:22 +02:00
Javier Jardón
e3be606a1c gtk/gtkwin32embedwidget: use accessor functions to access GtkWidget 2010-08-22 21:25:22 +02:00
Javier Jardón
7b4cf7587a gtk/gtkwindow-decorate: use accessor functions to access GtkWidget 2010-08-22 21:25:22 +02:00
Jorge González
40e3d43394 Updated Spanish translation 2010-08-22 21:16:34 +02:00
Javier Jardón
a1c2a00d63 docs: Add GtkLicense enum definition to the docs 2010-08-22 20:53:58 +02:00
Javier Jardón
7d9c4b71a9 gtk/tests/builder.c: Use accessor functions to access GtkWidget 2010-08-22 18:33:10 +02:00
Javier Jardón
46e65a9164 gtk/tests/testing.c: Use accessor functions to access GtkWidget 2010-08-22 18:33:04 +02:00
Javier Jardón
6f74ff20a2 gtk/tests/treeview-scrolling.c: Use accessor functions to acccess GtkWidget 2010-08-22 18:32:56 +02:00
Javier Jardón
b1924555df modules/input/gtkimcontextxim.c: Use accessors to GtkWidget 2010-08-22 18:32:50 +02:00
Javier Jardón
104fdae2bf Gail: use accessor functions to access GtkWidget 2010-08-22 18:32:43 +02:00
Javier Jardón
c8afa3f000 tests/testxinerama.c: Use accessor functions to access GtkWidget 2010-08-22 18:31:12 +02:00
Javier Jardón
bd52a8541e tests/testwindows.c: Use accessor functions to access GtkWidget 2010-08-22 18:31:06 +02:00
Javier Jardón
42c71a1d4a tests/testtooltips.c: Use accessor functions to access GtkWidget 2010-08-22 18:30:58 +02:00
Javier Jardón
f332976871 tests/testsocket_common.c: Use accessor functions to access GtkWidget 2010-08-22 18:30:51 +02:00
Javier Jardón
b012f0f930 tests/testsocket.c: Use accessor functions to access GtkWidget 2010-08-22 18:30:44 +02:00
Javier Jardón
07e38c51e8 tests/testselection.c: Use accessor functions to access GtkWidget 2010-08-22 18:30:37 +02:00
Javier Jardón
1577a7d415 tests/testoffscreenwindow.c: Use accessor functions to access GtkWidget 2010-08-22 18:30:31 +02:00
Javier Jardón
26d837dd2f tests/testoffscreen.c: Use accessor functions to access GtkWidget 2010-08-22 18:30:23 +02:00
Javier Jardón
0059a30f0d tests/testinput.c: Use accessor functions to access GtkWidget 2010-08-22 18:30:17 +02:00
Javier Jardón
4a9c3bc214 tests/testiconview-keynav.c: Use accessor functions to access GtkWidget 2010-08-22 18:30:10 +02:00
Javier Jardón
252a8fc048 tests/testgtk.c: Use accessor functions to access GtkWidget 2010-08-22 18:30:03 +02:00
Javier Jardón
1b7b30bf31 tests/testframe.c: Use accessor functions to access GtkWidget 2010-08-22 18:29:56 +02:00
Javier Jardón
4210ec87b0 tests/testellipsise.c: Use accessor functions to access GtkWidget 2010-08-22 18:29:49 +02:00
Javier Jardón
067f418604 tests/testcairo.c: Use accessor functions to access GtkWidget 2010-08-22 18:29:42 +02:00
Javier Jardón
40dbb2deb2 tests/print-editor.c: Use accessor functions to access GtkWidget 2010-08-22 18:29:35 +02:00
Javier Jardón
5d48658f58 tests/gtkoffscreenbox.c: Use accessor functions to access GtkWidget 2010-08-22 18:29:28 +02:00
Javier Jardón
b6306a0def perf/gtkwidgetprofiler.c: Use accessor functions to access GtkWidget 2010-08-22 18:29:20 +02:00
Javier Jardón
76b0a349ef docs/tools/widgets.c: Use accessor functions to access GtkWidget 2010-08-22 18:29:09 +02:00
Javier Jardón
3d77c49e16 docs/tools/shooter.c: Use accessor functions to access GtkWidget 2010-08-22 18:29:02 +02:00
Javier Jardón
26fcfcc5a6 demos/testpixbuf-scale.c: Use accessor functions to access GtkWidget 2010-08-22 18:28:55 +02:00
Javier Jardón
6b3a2fede6 demos/gtk-demo/toolpalette.c: Use accessor functions to access GtkWidget 2010-08-22 18:28:48 +02:00
Javier Jardón
3d942908d3 demos/gtk-demo/rotated_text.c: Use accessor functions to access GtkWidget 2010-08-22 18:28:42 +02:00
Javier Jardón
3204cf726c demos/gtk-demo/panes.c: Use accessor functions to access GtkWidget 2010-08-22 18:28:33 +02:00
Javier Jardón
5bf0ed62d7 demos/gtk-demo/offscreen_window2.c: Use accessor functions to access GtkWidget 2010-08-22 18:28:25 +02:00
Javier Jardón
4011b70928 demos/gtk-demo/offscreen_window.c: Use accessor functions to access GtkWidget 2010-08-22 18:28:19 +02:00
Javier Jardón
8c4783da05 demos/gtk-demo/hypertext.c: Use accessor functions to access GtkWidget 2010-08-22 18:28:12 +02:00
Javier Jardón
e80db673b1 demos/gtk-demo/drawingarea.c: Use accessor functions to access GtkWidget 2010-08-22 18:28:06 +02:00
Javier Jardón
6a28e7b164 demos/gtk-demo/colorsel.c: Use accessor functions to access GtkWidget 2010-08-22 18:28:01 +02:00
Javier Jardón
876c0b2937 demos/gtk-demo/changedisplay.c: Use accessor functions to access GtkWidget 2010-08-22 18:27:51 +02:00
Philip Withnall
5fa4a05ccc Miscellaneous string fixes
Mostly capitalisation fixes. Closes: bgo#528257
2010-08-22 15:06:45 +01:00
Gabor Kelemen
6c6bb9b3d3 Updated Hungarian translation 2010-08-22 13:52:18 +02:00
Ask H. Larsen
45aafa477f Updated Danish translation 2010-08-22 13:32:28 +02:00
Philip Withnall
12e83244b1 Bug 528257 — File selector and stock string problems
Fix some stock item strings. Helps: bgo#528257
2010-08-22 12:24:00 +01:00
Ivar Smolin
2164e18cd8 [l10n] Updated Estonian translation 2010-08-22 10:37:33 +03:00
Matthias Clasen
fe1a39b1f2 Make button boxes semi-homogeneous
If a child is too large (> 1.5 the average), let it have its own
size. The old behaviour of fully homogeneous button boxes can still
be had by setting the homogeneous property to TRUE. Bug 84188.
2010-08-22 00:33:37 -04:00
Philip Withnall
df5ade16ab GtkFontSelection: don't notify the non-existent "font" property
The "font" property was removed in 418d84f311.
Closes: bgo#627580
2010-08-22 02:47:00 +01:00
Tristan Van Berkom
b3b22c31b9 Merge branch 'master' into native-layout 2010-08-21 12:38:55 -04:00
Gabor Kelemen
4ef5035674 Updated Hungarian translation 2010-08-21 16:43:05 +02:00
Chao-Hsiung Liao
bfbfa9a589 Updated Traditional Chinese translation (Hong Kong and Taiwan) 2010-08-21 19:50:06 +08:00
Jorge González
50f5b1289c Updated Spanish translation 2010-08-21 13:01:34 +02:00
Kjartan Maraas
e020217622 Updated Norwegian bokmål translation 2010-08-21 11:18:59 +02:00
Yaron Shahrabani
0b2e5bcb30 Updated Hebrew translation. 2010-08-21 11:55:22 +03:00
Tristan Van Berkom
804c800979 Fixed oversized menus allocated offscreen
Removed the old toplevel window size-request signal and
do the clamping in gtk_menu_get_height_for_width() instead,
also make sure to invalidate the size before doing a new
request just after invoking the delegate menu position func.
2010-08-20 21:18:13 -04:00
Tristan Van Berkom
10ceb9da68 Fixed GtkMenuItem to not access the menu->requisition but get the minimum size request instead. 2010-08-20 21:18:13 -04:00
Javier Jardón
9016f0d9a6 Use standard icon names in demos and tests 2010-08-21 03:08:15 +02:00
Tristan Van Berkom
005e8a6c2f Changed combo box's menu position function to use child menu
item's allocation instead of a complex calculation to guess
it's height for width.
2010-08-20 19:26:10 -04:00
Tristan Van Berkom
af7a187919 Added GtkCellRendererText::max-width-chars property
Added a property to limit the minimum/natural size request
of a text cell renderer.
2010-08-20 19:26:09 -04:00
Matthias Clasen
f7a6c05158 Remove leftover debug spew 2010-08-20 17:32:21 -04:00
Jonh Wendell
c9340c37a9 Drop one duplicated function header 2010-08-20 14:20:51 -03:00
Jonh Wendell
02b50d71ce Use an acessor function instead of a deprecated macro 2010-08-20 14:11:05 -03:00
Matthias Clasen
a64bd5d1f0 Fix gtk_widget_queue_draw
The draw-border removal did not get it right for !no-window widgets.
Bug 627445.
2010-08-20 08:48:07 -04:00
Tristan Van Berkom
7ef9cc3a1c Prevent file filter name sizes from expanding the dialog (bgo #527499).
Made GtkFileChooser file filter combobox ellipsize.
2010-08-19 19:09:53 -04:00
Fabrício Godoy
491bfd6355 Updated Brazilian Portuguese Translation 2010-08-19 13:06:52 -03:00
Khaled Hosny
41c2024d22 Updated Arabic translation 2010-08-19 17:53:26 +02:00
Sandeep Shedmake
3d3e9d85d1 fixed incorrect spelling of calender; corrected to calendar 2010-08-19 21:04:14 +05:30
krishnababu k
af04aeeaed Updated telugu transaltions 2010-08-19 20:34:34 +05:30
Benjamin Otte
de8b07c3df textview: Make cursor display again
The code for initializing the clip rectangle was accidentally deleted in
a previous patch. Put it back.
2010-08-19 12:08:23 +02:00
Stefan Kost
0e1eee26b9 [filechooserentry] don't show misplaced completion popup
Override the key-press-event instead of overriding the focus method.
Fixes #627139
2010-08-19 09:37:53 +03:00
Yaron Shahrabani
ad3e451632 Updated Hebrew translation. 2010-08-19 09:28:39 +03:00
Tristan Van Berkom
dd6aa6d1cf Merge branch 'master' into native-layout
Conflicts:
	tests/testheightforwidth.c
2010-08-18 20:03:24 -04:00
Tristan Van Berkom
d73c11b549 Added test case to testheightforwidth.c to show GtkComboBox/GtkMenu wrapping in action 2010-08-18 20:01:28 -04:00
Tristan Van Berkom
52e5f36dc3 Implemented height-for-width geometry management for menus
Now GtkMenu/GtkMenuItem request/allocate in height-for-width
manner... to reduce the height of the menu one must explicitly
set the requested minimum width of the menu to a greater value
(using gtk_widget_set_size_request()).
2010-08-18 20:01:28 -04:00
Tristan Van Berkom
9c26bd525f Added height-for-width management for GtkComboBox/GtkCellView
now GtkComboBox (and GtkCellView) request and allocate children/cells
in a height-for-width manner.
2010-08-18 20:01:28 -04:00
Tristan Van Berkom
9f762fe86c Added GtkCellSizeRequest bits to makefile, gtk/gtk.h and gtk/gtk.symbols. 2010-08-18 20:01:28 -04:00
Tristan Van Berkom
e2a82c70b4 Added/Implemented GtkCellSizeRequestIface
This patch adds height-for-width geometry management
for cell renderers while still responding to the old
gtk_cell_renderer_get_size() apis with virtual return values
(obtained by soliciting the new height-for-width cell renderer
apis).
2010-08-18 20:01:28 -04:00
Tristan Van Berkom
fa565f3a3e Fixed accel label to do its derived work in ->get_width() instead of the old ->size_request() 2010-08-18 20:01:27 -04:00
Tristan Van Berkom
0cb7aa9c7b GtkBox: Clipped values passed to gtk_distribute_natural_allocation() incase allocated less than requested. 2010-08-18 20:01:27 -04:00
Tristan Van Berkom
8c14bf009d Added return_if_fail guard to gtk_distribute_natural_allocation() 2010-08-18 20:01:27 -04:00
Tristan Van Berkom
4f47197d33 Removed unused variables. 2010-08-18 19:27:13 -04:00
Tristan Van Berkom
4a2905c34b Fixed gtk_cell_view_allocate() to allocate a fixed array size instead of using
a growing dynamic GArray in a loop.
2010-08-18 19:11:01 -04:00
Matthias Clasen
0cb1f9a180 Make print backends use standard icon names for printers
This is to make the print dialog work with the previous commit.
See bug 626474.
2010-08-18 18:27:39 -04:00
Matthias Clasen
f65265fff9 Make stock icons use standard icon names
At least where standard names are available, instead of relying
on a symlink forest in the icon theme directory. For directional
variants, we look up icons by the pair ("foo-rtl", "foo") or
("foo-ltr", "foo"). See bug 626474.
2010-08-18 18:26:58 -04:00
Tristan Van Berkom
99babef4b8 Merge branch 'master' into native-layout 2010-08-18 15:43:40 -04:00
Tristan Van Berkom
d25c4f9dc1 Added test to show wrapping text in combo boxes and menu items. 2010-08-18 15:23:46 -04:00
Tristan Van Berkom
ddd32757be Fixed combo box's custom menu positioning function to work with new
height-for-width menus.
2010-08-18 15:17:22 -04:00
Tristan Van Berkom
4ff413f48d Added height-for-width geometry management to menus
Now menus can be height-for-width, for a menu to be
height for width it must have a width explicitly set
with gtk_widget_set_size_request()... if such a request
is set then menus will be allocated a smaller height
for the larger provided width (if you have any
wrapping content in the menu items)
2010-08-18 15:14:59 -04:00
Tristan Van Berkom
59aacd7935 Fixing accel label to do its thing in ->get_width() instead
of the old ->size_request()
2010-08-18 15:13:39 -04:00
Matthias Clasen
501eeaff11 Remove GtkWidget::draw-border
This is a never-used style property that came out of some old
themeing experiments, and handling it has some performance
overhead. Bug 426924
2010-08-18 12:46:57 -04:00
Christian Persch
ffa07ee21e Use G_DEFINE_BOXED_TYPE
Bug #627214.
2010-08-18 15:34:47 +02:00
Javier Jardón
f730af8360 docs: gtk_window_group_get_current_device_grab() was added in 3.0 2010-08-18 05:29:17 +02:00
Fran Diéguez
1229bfc620 Updated Galician translations 2010-08-17 18:35:35 +02:00
Tomeu Vizoso
24d8c776d4 The 'len' argument of gtk_text_buffer_insert and gtk_text_buffer_insert_at_cursor isn't really the length of the 'text' argument 2010-08-17 17:57:58 +02:00
Tomeu Vizoso
813da6a39a gtk_tree_model_iter_next's iter is (in), not (inout) 2010-08-17 17:43:04 +02:00
Matthias Clasen
bbebe979da Bump version to 2.90.7 2010-08-17 11:41:57 -04:00
Jorge González
d6bfd81323 Updated Spanish translation 2010-08-17 17:39:26 +02:00
Carlos Garnacho
bddb72476c GtkButton: Also handle activate from mouse events. 2010-08-17 15:45:17 +02:00
Carlos Garnacho
b2545e1732 GdkWindow: Check device cursor first in update_cursor(). 2010-08-17 15:45:17 +02:00
Matthias Clasen
203c06342d Remove no-longer-existing file from POTFILES.in 2010-08-17 09:14:09 -04:00
Matthias Clasen
3115de0c36 Remove no-longer-existing file from POTFILES.in 2010-08-17 08:56:07 -04:00
Tristan Van Berkom
72856830e7 Merge branch 'master' into native-layout 2010-08-17 01:39:09 -04:00
Tristan Van Berkom
94f7cf0347 Fixed height-for-width implementation for combobox/cellview
Now the combo box requests height-for-width properly taking
into account all of its cells at request/allocation time.

Note an implementation of menu-items is needed to get the
the combo's drop-down menu to condense to a proper (smaller)
height when given enough width.
2010-08-17 01:33:11 -04:00
Tristan Van Berkom
c4119e58cf Clipped values for gtk_distribute_natural_allocation() 2010-08-17 01:32:44 -04:00
Tristan Van Berkom
1b526bfcc1 Fixed cellrenderertext to always request a natural width >= minimum width. 2010-08-17 01:30:52 -04:00
Tristan Van Berkom
7d3cb3f9d9 Added an argument check to gtk_distribute_natural_allocation()
and clipped some values in gtkbox.c in case it was allocated less
than it requested.
2010-08-17 01:29:23 -04:00
Matthias Clasen
6917d46749 Remove a dangling reference 2010-08-17 00:04:10 -04:00
Matthias Clasen
ce08b9bb01 Fix some documentation issues 2010-08-16 23:52:03 -04:00
Matthias Clasen
db3af409cc NEWS for 2.90.6 2010-08-16 23:28:35 -04:00
Matthias Clasen
0ea8572d89 Drop internal function from header
Make _gtk_button_box_child_requisition static.
2010-08-16 21:58:26 -04:00
Matthias Clasen
e057cb8b4d Drop some unnecessary variables 2010-08-16 21:58:26 -04:00
Benjamin Otte
434b3e1072 gdk: Use gdk_window_get_background_pixmap() when setting up paint 2010-08-16 19:48:46 +02:00
Benjamin Otte
2944561ba3 API: Add gdk_window_get_background_pattern()
This is the suggested way for GTK3 to store a Window's background so it
makes sense to use the same function today already.
2010-08-16 19:48:46 +02:00
Benjamin Otte
8805b58e62 textview: Fix rendering of embedded images 2010-08-16 19:48:45 +02:00
Tristan Van Berkom
6a5f77a992 Merge branch 'master' into native-layout 2010-08-16 12:02:02 -04:00
Fran Diéguez
7993ee6d0e Updated Galician translations 2010-08-16 10:26:42 +02:00
Jorge González
a0a302f7f7 Updated Spanish translation 2010-08-15 21:44:22 +02:00
Jorge González
6a88255e00 Updated Spanish translation 2010-08-15 21:01:19 +02:00
Jorge González
c411df5406 Updated Spanish translation 2010-08-15 21:01:12 +02:00
Kristian Rietveld
14cc894dd7 quartz: gdk_window_get_frame_extents() needs to get effective toplevel 2010-08-15 17:34:44 +02:00
Benjamin Otte
dc7a8f9be7 tests: unbreak testwindows test
Delete code that was broken and also used the APIs I just removed.
2010-08-15 03:51:39 +02:00
Benjamin Otte
0b29f4e769 Remove window background getters again
They were added as accessors for 2.22 even though querying the
background wasn't possible previously. As GTK 3.0 will change background
handling, it doesn't make sense at all to expose these getters.
2010-08-15 03:34:02 +02:00
Javier Jardón
374d5094a3 Use accessor functions to access GtkToolbar 2010-08-14 02:25:33 +02:00
Javier Jardón
83c20d4b32 GtkToolbar: move public members to private structure 2010-08-14 02:25:33 +02:00
Benjamin Otte
ca7d3f9081 gdk: When using OPERATOR_SOURCE, use clip + paint instead of fill
SOURCE is unbounded, so we clear unwanted areas.
2010-08-14 01:46:04 +02:00
Benjamin Otte
fc170551b6 gdk: Do final copy with OPERATOR_SOURCE in end_implicit_paint
For windows with alpha channel, the previous contents would otherwise
not be erased. Visible for example in the status icon code.

Thanks to Thomas Wood for noticing.
2010-08-13 20:48:36 +02:00
Matthias Clasen
6334d13de5 Remove some leftovers of deprecated functionality
There were some vestiges of the gtk_{h,v}button_box_set_default_layout()
functionality left. These are gone now. I have also removed
the GTK_BUTTONBOX_DEFAULT value in GtkButtonBoxStyle, but the other
values have been kept at their numeric values, to avoid more serious
ABI change.
2010-08-12 23:25:10 -04:00
Javier Jardón
05e33f69eb gtk_range_set_min_slider_size() should receive an gint, not a gboolean 2010-08-13 02:49:27 +02:00
Benjamin Otte
cc09ec0732 gtk-demo: update drawingarea example
Use gdk_window_create_similar_surface() instead of gdk_pixmap_new()
2010-08-12 23:43:24 +02:00
Benjamin Otte
c989d3000a API: Add gdk_window_create_similar_surface() 2010-08-12 23:43:11 +02:00
Javier Jardón
97fbf97be2 GtkTextTagTable: move public members to private structure 2010-08-12 18:33:28 +02:00
Javier Jardón
1516c86ca4 Use accessor funcions to access GtkCalendar 2010-08-12 18:02:31 +02:00
Javier Jardón
e6ed4da215 GtkCalendar: move public members to private structure 2010-08-12 18:02:31 +02:00
Christian Persch
05134768fe Revert "Added UG translation" AGAIN
This reverts commit ac94b406a1.
2010-08-12 16:18:47 +02:00
Klemen Košir
8313c7fdbb Updated Slovenian translation 2010-08-12 14:12:17 +02:00
Claudio Saavedra
e4a83370c4 Improve the looks of the license text in GtkAboutDialog
It is not safe to assume that copyright text in applications is
one liner, therefore it's better to split it from the program name.

Also, the license text should be in a paragraph of its own, so
add an extra '\n' above it.

https://bugzilla.gnome.org/show_bug.cgi?id=626514
2010-08-12 14:23:58 +03:00
Sven Herzberg
cd00b0a490 avoid redundant recursion for executing tests
* Makefile.decl: make sure that check-local does not depend on a
  recursive target for the tests. This way check can recurse and call
  check-local in each folder which then invokes test-cwd. This will
  make sure that a toplevel check-local doesn't recurse into subfolders
  as well. The was resulting in test being run twice (for "/tests"), tree
  times (e.g. for "/gtk/tests") and potentially more often
2010-08-12 11:20:41 +02:00
Kristian Rietveld
8b917eeaf6 quartz: make it compile 2010-08-12 10:57:59 +02:00
Benjamin Otte
159caba3e2 Add gtk_license_get_type() to gtk.symbols 2010-08-11 21:43:47 +02:00
Benjamin Otte
ddc184ec79 gdk: Remove nonexistant symbols
These symbols have been deleted from the public API with the rendering
cleanup work.
2010-08-11 21:43:47 +02:00
Fran Diéguez
48c34b6868 Updated galician translations 2010-08-11 18:19:34 +02:00
Sahran
ac94b406a1 Added UG translation 2010-08-11 17:48:38 +02:00
Yinghua Wang
aa8a1a8a8e Update Simplified Chinese UI translation. 2010-08-11 22:42:48 +08:00
Yinghua Wang
a151eac4fb Update Simplified Chinese property nicks translation. 2010-08-11 22:37:13 +08:00
Benjamin Otte
416d132a72 docs: Some style fixes to the migration guide
Most importantly, I decided to not capitalize "cairo".
2010-08-11 05:12:49 +02:00
Matthias Clasen
2acf529b3b Beef up the migration guide
This includes a first cut at documenting the rendering cleanup changes
and the region removal.
2010-08-10 21:22:40 -04:00
Benjamin Otte
eff92cb1d6 dnd: Remove default_icon_pixmap variable and friends
The functions to set them were gone already, this is just cleanup
2010-08-11 02:30:29 +02:00
Kristian Rietveld
bde0f9a8f6 quartz: Misc. fixes for getting offscreen windows to work
Mainly fixes to properly differentiate between toplevel and offscreen
windows, since these sometimes need different treatment.  Furthermore,
usage of gdk_window_get_effective_foo() instead of gdk_window_get_foo()
where applicable.
2010-08-10 21:02:31 +02:00
Kristian Rietveld
d819bc4814 Invalidate cairo surface if resizing is not supported for target
While X11 surfaces can be resized, this is not the case for Quartz
surfaces.  Instead of resizing we will invalidate the surface instead.
By giving _gdk_windowing_set_cairo_surface_size() a boolean return
value, we can signal back whether or not resizing was possible.  If not
possible, we invalidate the surface.
2010-08-10 21:02:31 +02:00
Kristian Rietveld
9c6696dfcc quartz: Convert default background drawing to cairo
Includes some untested (read: uncompiled) simplifications from Benjamin
Otte.
2010-08-10 21:02:31 +02:00
Benjamin Otte
709e05cdb2 style: Use _gtk_pango_fill_layout() 2010-08-10 21:02:31 +02:00
Benjamin Otte
ccacd3a46a style: Apply same matrix conversion as gdk_draw_layout() did
This is only necessary for GtkLabel with an angle set as no other widget
rotates text.
Note that the label code does not need these adjustments as those paths
are only taken when the label is not rotated.
2010-08-10 21:02:31 +02:00
Benjamin Otte
c9d08d02e5 gdk: Remove data consructors for GdkPixmap
That is all of the gdk_pixmap/bitmap_create_from_* constructors.
2010-08-10 21:02:31 +02:00
Benjamin Otte
4f37e6833c x11: Create empty cursor without old functions
In particular, clear the bitmap manually instead of using
create_from_data.
2010-08-10 21:02:31 +02:00
Benjamin Otte
aaf70d1327 testgtk: Use Cairo to load XBM image
This should really use GdkPixbuf, but apparently we can't load XBM
images. And I'm too lazy to convert it.
2010-08-10 21:02:31 +02:00
Benjamin Otte
de285edc72 testgtk: Use Pixbufs in the shapes example 2010-08-10 21:02:31 +02:00
Benjamin Otte
2513636877 testgtk: Rename pixmap => pixbuf in various places
Now that we use Pixbufs for the tests instead of Pixmaps, we should name
the tests like that.
2010-08-10 21:02:31 +02:00
Benjamin Otte
6b19815f87 testgtk: Use pixbufs instead of pixmaps
This is for creating a GtkImage with an icon.
2010-08-10 21:02:31 +02:00
Benjamin Otte
ad571a3a5e testgtk: Make image test not use Pixmaps, but Pixbufs 2010-08-10 21:02:31 +02:00
Benjamin Otte
727122b8d6 testgtk: Fix types and get rid of casting 2010-08-10 21:02:31 +02:00
Benjamin Otte
f3c3e47db7 testdnd: Convert to use pixbufs as icons
Using Pixmaps is outdated.
2010-08-10 21:02:30 +02:00
Benjamin Otte
e98f760e9c x11: Make fallback pixbuf-cursor code not use old constructors
These bitmap constructors are about to die. The replacement is painting
with Cairo image surfaces and that's what we do here.
2010-08-10 21:02:30 +02:00
Benjamin Otte
e42033d2cc colorsel: Create cursor image using Cairo 2010-08-10 21:02:30 +02:00
Benjamin Otte
7b9e2b941c style: Don't use gdk_pixmap_create_from_xpm
Instead, do what that code did manually.
2010-08-10 21:02:30 +02:00
Kristian Høgsberg
1e706ed64f gdk: Drop Xrender configure.ac check
GTK+ no longer depends on the render extension!
2010-08-10 21:02:30 +02:00
Benjamin Otte
8868e77fa0 x11: Remove display_x11->have_render
Also remove setters and getters for the variable and the GdkTristate
enum, as it's the only place where it was used.
2010-08-10 21:02:30 +02:00
Benjamin Otte
7182a2dc19 gdk-xft: Don't call render about the subpixel order
Instead assume that the root window property is working properly. This
removes the last real Xrender call from GTK.
2010-08-10 21:02:30 +02:00
Kristian Høgsberg
c7bd2ad1c9 gdk: Remove picture pointer from X11 drawable
It's not used anymore
2010-08-10 21:02:30 +02:00
Benjamin Otte
c4f280651a gdk: Don't infinite loop when flushing moves
Spotted by Kristian Rietvield. Fixes testoffscreen test.
2010-08-10 21:02:30 +02:00
Matthias Clasen
075661d376 generic damage generation for offscreen windows
Generating damage from gdk drawing api doesn't help for cairo rendering
...and the gdk drawing api is gone anyway. Bug 621571
2010-08-10 21:02:30 +02:00
Matthias Clasen
7fd148fc59 Cleanup gdk_pixbuf_render_pixmap_and_mask_for_colormap() 2010-08-10 21:02:30 +02:00
Benjamin Otte
d0d2a6f12c API: remove gdk_colormap_query_color 2010-08-10 21:02:30 +02:00
Benjamin Otte
09fbed7bc9 style: Do not allocate colors anymore 2010-08-10 21:02:30 +02:00
Benjamin Otte
a50843e160 gtkbuilder: Do not allocate colors when parsing GtkBuilder files 2010-08-10 21:02:30 +02:00
Benjamin Otte
25fc4d97f8 textview: remove GtkTextAttributes (un)realize code
It was unused (apart from a few assertion that indeed it was unused).
2010-08-10 21:02:30 +02:00
Benjamin Otte
1308731580 gdk: Don't require allocating window background colors anymore
X!! allocates the colors itself now.
2010-08-10 21:02:30 +02:00
Kristian Rietveld
c3a59fbfcc Fix compile warnings 2010-08-10 21:02:30 +02:00
Kristian Rietveld
54ac92aaaf Add call to cairo_destroy() to gtk_text_layout_draw() 2010-08-10 21:02:29 +02:00
Kristian Rietveld
089892df27 Add missing calls to cairo_destroy() 2010-08-10 21:02:29 +02:00
Kristian Rietveld
f7a8bac5e6 quartz: Make backend compile again 2010-08-10 21:02:29 +02:00
Kristian Rietveld
23c9cee274 quartz: Fix up _gdk_quartz_window_translate 2010-08-10 21:02:29 +02:00
Benjamin Otte
6a48a042c7 API: remove GdkGC
XXX: Some traces in the win32 code are left. I suppose they'd best be
replaced using Cairo.
2010-08-10 21:02:29 +02:00
Benjamin Otte
0fa7d810e7 calendar: Remove unused GdkGC members 2010-08-10 21:02:29 +02:00
Benjamin Otte
ef2d37cdaf API: remove begin/end_direct_draw functions
They're not needed without GdkGCs.

FIXME: This breaks the win32 XP theme. Someone gotta fix it.
2010-08-10 21:02:29 +02:00
Benjamin Otte
ac3ddfa2a7 API: Remove gtk_gc_get() and gtk_gc_release()
With this change, GTK does not use GdkGC anymore.
2010-08-10 21:02:29 +02:00
Benjamin Otte
acf33c9e4c API: Remove GC members from GtkStyle 2010-08-10 21:02:29 +02:00
Benjamin Otte
90ac7b915c textview: Replace GdkGC * argument with gpointer
The argument is unused.
That's also the reason why we can pass NULL instead of the real GC in
the caller.
2010-08-10 21:02:29 +02:00
Benjamin Otte
f7608c33ac gdk: Move scratch GC handling to X11
... and implement it directly instead of using GdkGC, as GdkGC is about
to be deleted, but we need this code.
2010-08-10 21:02:29 +02:00
Benjamin Otte
9c026fb32e x11: Remove unused code
These are function definitions and leftover variabl;es that weren't in
use for a while.
2010-08-10 21:02:29 +02:00
Benjamin Otte
1ac8d80e34 API: remove GdkPangoRenderer
Also removes the pango attributes for stipple, emboss and emboss color
2010-08-10 21:02:29 +02:00
Benjamin Otte
fea39c078b textview: Make the PangoRenderer use Cairo exclusively
No more gdkpango usage, no more GdkGC required, yay!
2010-08-10 21:02:29 +02:00
Benjamin Otte
4c16995868 gdk: remove get_composite_drawable vfunc
The vfunc is not used anymore.
2010-08-10 21:02:29 +02:00
Benjamin Otte
61d4a019f8 API: remove gdk_draw_drawable() 2010-08-10 21:02:29 +02:00
Benjamin Otte
0cef9c2bbe quartz: Do repeated fill with Cairo
Some things are so easy with Cairo...

XXX: I did not compile this, this is just proof of concept.
2010-08-10 21:02:28 +02:00
Benjamin Otte
65ac54bb23 gdk: Make window moves a custom vfunc
The window move code needs special attention for multiple reasons:
- invalid areas for expose events need to be modified
- self-copy is not supported by Cairo
- in X11, copying from an overlapped Window might cause unexposed areas
  to be copied in, spo expose events for those need to be generated.

This was all special cased in various parts of the code. By making it an
explicit vfunc, we can work around it.
2010-08-10 21:02:28 +02:00
Benjamin Otte
a581401920 API: remove gdk_draw_layout_*() 2010-08-10 21:02:28 +02:00
Benjamin Otte
805e0d1082 label: Draw all text using PangoCairo
This includes the addition of a "small" helper function,
_gtk_pango_fill_layout() that ignores color information. This
functionality is not available inside Pango and until that happens, we
need this fix. The bug is filed at:

https://bugzilla.gnome.org/show_bug.cgi?id=624917
2010-08-10 21:02:28 +02:00
Benjamin Otte
9f1939cbd5 API: Remove GtkTextTag's stipple properties
They seem pretty much unused and the only reason why GtkTextView uses a
GdkPangoRenderer and not a PangoCairoRenderer.
2010-08-10 21:02:28 +02:00
Benjamin Otte
4729460a4f gtk-demo: Adapt textview example for stipple removal 2010-08-10 21:02:28 +02:00
Benjamin Otte
3fc31e88b0 gdk: Remove _gdk_drawable_get_scratch_gc()
The function is unused now.
2010-08-10 21:02:28 +02:00
Benjamin Otte
db5fc43759 gdk: Draw redirected windows using Cairo 2010-08-10 21:02:28 +02:00
Benjamin Otte
56e7abb8a4 gdk: Refactor redirection code
This will make future patches easier
2010-08-10 21:02:28 +02:00
Benjamin Otte
755bd51757 gdk: Simplify code
Use new Cairo APIs to make the code simpler.
2010-08-10 21:02:28 +02:00
Benjamin Otte
a6fcc75774 gdk: Remove excess variables 2010-08-10 21:02:28 +02:00
Benjamin Otte
3df6726656 gdk: Do end_implicit_paint copy with Cairo 2010-08-10 21:02:28 +02:00
Benjamin Otte
f1620b5ce1 gdk: Implement gdk_window_get_source_drawable() using Cairo
Do we have a test case for this?
2010-08-10 21:02:28 +02:00
Benjamin Otte
46206f8bb8 gdk: Implement end_implicit_paint() with Cairo 2010-08-10 21:02:28 +02:00
Benjamin Otte
600fbd3e74 API: remove gdk_draw_rectangle() 2010-08-10 21:02:28 +02:00
Benjamin Otte
66048b2f92 style: Replace last gdk_draw_rectangle() with Cairo 2010-08-10 21:02:28 +02:00
Benjamin Otte
9ee5176492 API: remove gdk_draw_point(s) 2010-08-10 21:02:27 +02:00
Benjamin Otte
a9e99e7f5b API: remove gdk_draw_{line,lines,segments}
Those were the 3 intermixed line drawing calls.
2010-08-10 21:02:27 +02:00
Benjamin Otte
c661eb73a1 testgtk: Remove image from drawable test
The test only tested old APIs.
2010-08-10 21:02:27 +02:00
Benjamin Otte
a3057d0150 style: replace draw_frame_gap with Cairo calls 2010-08-10 21:02:27 +02:00
Benjamin Otte
5eb76955fd style: Replace draw_diamond vfunc with Cairo calls 2010-08-10 21:02:27 +02:00
Benjamin Otte
8f21b09eee tests: remove "draw drawable" button from testwindows test
draw_drawable is gone soon. And testing the proper functioning of
drawing calls is Cairo's job anyway.
2010-08-10 21:02:27 +02:00
Benjamin Otte
e85dfc7cc4 API: remove gdk_draw_polygon() 2010-08-10 21:02:27 +02:00
Benjamin Otte
d2b1da4e84 API: remove gtk_paint_polygon()
Almost noone uses it in real applications and it's broken in most theme
engines.
2010-08-10 21:02:27 +02:00
Benjamin Otte
53b9bdc3fc iconview: Remove debug drawing code
It uses APIs I'm about to deprecate.
2010-08-10 21:02:27 +02:00
Benjamin Otte
1c4ce45a42 style: apply cleanup patch from bug 576988
Ideally this patch would be split up into chunks, but the git branch it
came from doesn't exist anymore. Only this patch is left in a bug
report.

It it's adapted to use accessors and contains some fixes that were
spotted while using the patch.

https://bugzilla.gnome.org/show_bug.cgi?id=576988
2010-08-10 21:02:27 +02:00
Benjamin Otte
89d28eb09d API: remove gdk_draw_glyphs() and gdk_draw_glyphs_transformed() 2010-08-10 21:02:27 +02:00
Benjamin Otte
92f4882497 API: remove gdk_draw_trapezoids() and GdkTrapezoid struct 2010-08-10 21:02:27 +02:00
Benjamin Otte
559ae63f01 API: remove gdk_draw_arc() 2010-08-10 21:02:27 +02:00
Benjamin Otte
9b713fa4fd gdk: Remove testgdk code
The file wasn't build anyway and it's using all the APIs that are
getting removed.
2010-08-10 21:02:27 +02:00
Benjamin Otte
14fe04ec89 API: remove GdkImage
It was unused and buggy.
2010-08-10 21:02:26 +02:00
Benjamin Otte
6f5084551a API: remove gdk_drawable_copy_to_image() 2010-08-10 21:02:26 +02:00
Benjamin Otte
2a72ffd4de API: remove gdk_drawable_get_image() 2010-08-10 21:02:26 +02:00
Benjamin Otte
a1a1b135ac API: remove gdk_pixbuf_get_from_image() 2010-08-10 21:02:26 +02:00
Benjamin Otte
7489c260eb colorsel: Use gdk_pixbuf_get_from_drawable()
Instead of fiddling with GdkImage directly.
2010-08-10 21:02:26 +02:00
Benjamin Otte
84015d4d3f Implement gdk_pixbuf_get_from_drawable() with Cairo
Use gdk_pixbuf_get_from_surface() instead of
gdk_pixbuf_get_from_image().
2010-08-10 21:02:26 +02:00
Benjamin Otte
39b47eaf25 API: Add gdk_pixbuf_get_from_surface()
New API to copy any cairo surface into a pixbuf.
2010-08-10 21:02:26 +02:00
Benjamin Otte
b926ce719b API: remove gdk_draw_image() 2010-08-10 21:02:26 +02:00
Benjamin Otte
d18abf42b7 API: Get rid of GdkRGB 2010-08-10 21:02:26 +02:00
Benjamin Otte
17b8bee168 demos: Convert testpixbuf-save to Cairo 2010-08-10 21:02:26 +02:00
Benjamin Otte
46794cc65c demos: Remove testpixbuf
Another test mainly utilizing inline pixbufs and GdkRGB, both of which
are kinda outdated.
2010-08-10 21:02:26 +02:00
Benjamin Otte
638e415a6d demos: remove testpixbuf-drawable
It only tested GdkRGB, and we're about to kill that.
2010-08-10 21:02:26 +02:00
Benjamin Otte
a513bdf3f7 testgtk: Remove alpha drawing test
We use Cairo for that these days.
2010-08-10 21:02:26 +02:00
Benjamin Otte
8f19db7565 Replace gdk_rgb_find_color()
Use gdk_colormap_alloc_color() instead.
2010-08-10 21:02:26 +02:00
Benjamin Otte
548ebc29e5 debug: remove GdkRGB debuggability
GdkRGB is on its way out, so there's no need to have a debugging
category for it.
2010-08-10 21:02:26 +02:00
Benjamin Otte
119d48c89b gdk: Remove unused gdkrgb.h includes 2010-08-10 21:02:26 +02:00
Benjamin Otte
d54c2cfeee API: remove gdk_screen_get_rgb_colormap/visual()
People want to use gdk_screen_get_default_colormap/visual().
Also, GdkRGB is about to die.
2010-08-10 21:02:26 +02:00
Benjamin Otte
32c95ebe27 tests: remove testrgb test
This is in preparation for the GdkRGB removal
2010-08-10 21:02:25 +02:00
Benjamin Otte
24a867f8da image: remove GdkImage as a possible image type
GdkImage is about to be deprecated.
2010-08-10 21:02:25 +02:00
Benjamin Otte
4f8dbd4a8d API: Remove gdk_draw_pixbuf() 2010-08-10 21:02:25 +02:00
Kristian Rietveld
11ee2abacc Add missing cairo_destroy() call 2010-08-10 21:02:25 +02:00
Benjamin Otte
a66e4ebe1a docs: Add sgml goo for new notebook APIs 2010-08-10 21:02:25 +02:00
Benjamin Otte
472b9d6f66 docs: Add sgml goo for new GtkExpander APIs 2010-08-10 21:02:25 +02:00
Benjamin Otte
1481ab6626 docs: Add sgml goo for gdk_display_is_closed() 2010-08-10 21:02:25 +02:00
Benjamin Otte
50266ca95d filechooser: Remove unused functions.
The last user is gone since 3a1ba3bd1e
2010-08-10 21:02:25 +02:00
Matthias Clasen
2c40c2b7c8 Don't activate insensitive widgets
This was reported by Christian Becke in bug 626052.
2010-08-10 13:42:17 -04:00
Federico Mena Quintero
3a1ba3bd1e bgo#625416 - Don't reload the filechooser's folder during a re-map event
Long ago, before we had file monitoring at the GIO/Glib level, we would
reload the current folder each time a file chooser gets (re)mapped.
This was basically to let the GIMP recycle the same file chooser for all
file/open or file/save operations, instead of creating a new one every time.
In that case, we reloaded the folder with each ::map() event so that the
file chooser would present an up-to-date view of the folder that was being
displayed.  Now, the folder should always be up-to-date as we do
file monitoring all the time.

Signed-off-by: Federico Mena Quintero <federico@novell.com>
2010-08-10 11:36:03 -05:00
Matthias Clasen
316b9da873 Allow to unset the tree selection function
This is not causing problems, and seems natural. Bug 626276.
2010-08-10 07:35:54 -04:00
Yaron Shahrabani
89d4eb6ded Updated Hebrew translation. 2010-08-10 11:35:59 +03:00
Yaron Shahrabani
ad8f1ef85b Updated Hebrew translation. 2010-08-10 11:33:34 +03:00
Yaron Shahrabani
7f985e760a Updated Hebrew translation. 2010-08-10 11:31:57 +03:00
Philip Withnall
3eb197b51f Bug 596125 — Property string fixes 2010-08-10 09:23:49 +01:00
Matthias Clasen
fb48e023d2 Fix a sporadic segfault in treeview keynav
If a a treeview has frequent periodic additions and removals of
rows, it is possible that a page down keypress moves the cursor
out of the height of the treeview. In some of these cases, we
can be tricked into dereferencing a  NULL pointer.

Bug 612919.
2010-08-10 00:31:46 -04:00
Gabor Kelemen
e3bd926c1e Set translation domain for parameter_string in gtk_init_with_args
This was requested in bug 554926.
2010-08-10 00:11:40 -04:00
Emmanuele Bassi
73030c462f about: Add :license-type property
The :license-type property of GtkAboutDialog allows using a symbolic
enumeration value that will construct a placeholder license preamble
linking to a specific URL. This allows localization of the licensing
text without using a translation of the actual license, since it would
not be valid.
Bug 336225.
2010-08-10 00:00:15 -04:00
Matthias Clasen
79ef5de505 Make it possible to make the expander label fill the entire space
This adds a boolean GtkExpander::label-fill property and uses it
when allocating space to the label. Based on a patch by Matt Barnes,
bug 614049.
2010-08-09 23:08:39 -04:00
Matthias Clasen
7844d3b8db Fix gail_notebook_get_selection_count()
This function should return 0 for empty notebooks. Based on
a patch by Mike Gorse, bug 557263.
2010-08-09 22:24:24 -04:00
Javier Jardón
f760538f17 gtkaccellabel: Remove unused class members
Fixes https://bugzilla.gnome.org/show_bug.cgi?id=97414
2010-08-10 04:17:29 +02:00
Matthias Clasen
61e34032ec Clarify the docs for gtk_widget_set_has_window()
The previous version of the docs did not make it clear that has-window
is the defaults. Pointed out by Magnus Hjorth, bug 615474.
2010-08-09 21:39:20 -04:00
Christian Dywan
2a12f74c8e Clarify memory management of tree models
It helps to be explicit about these things.
Bug 609264.
2010-08-09 21:35:26 -04:00
Hiroyuki Ikezoe
0824862e3b Drop xim-related configure options from the docs
These options have been dropped from configure a while ago,
so they should no longer be in the docs either. Bug 605190.
2010-08-09 21:31:25 -04:00
Sam Thursfield
a2b72c5953 Add missing accessors for notebook details
The ms-windows theme engine needs to access the tab-{h,v}border,
so add accessors. Bug 625655.
2010-08-09 21:20:07 -04:00
Sam Thursfield
4047d0526d Towards GSEAL-clean build on win32
Use accessors instead of direct member access in a few places.
Bug 625655.
2010-08-09 21:17:37 -04:00
Szilárd Pfeiffer
93fa95e79f Implement GailAdjustment::get_minimium_increment
...and use it in GailRange and GailSpinButton. Bug 625953.
2010-08-09 21:12:46 -04:00
Szilárd Pfeiffer
2686af2fbb Make Gail work with custom treemodels
Gail did set the role to ATK_ROLE_TABLE for anything that is
not a GtkTreeStore. The propery way to do this is to look at the
tree model flags for list-onlyness. Bug 580291.
2010-08-09 21:09:30 -04:00
Javier Jardón
99e8a76cab Revert "Added UG translation"
ug.po is not in po-properties directory

This reverts commit 623c6239ac.
2010-08-09 13:21:24 +02:00
A S Alam
8397e8e219 update for Punjabi in master by A S Alam 2010-08-10 06:10:54 +05:30
Sahran
623c6239ac Added UG translation 2010-08-08 13:11:50 +02:00
Sahran
ae5700f64b Added UG translation 2010-08-08 13:10:49 +02:00
Javier Jardón
e15e37b6ce Fix GtkIMContextClass inheritance
Should be GObjectClass instead GtkObjectClass

Fixes https://bugzilla.gnome.org/show_bug.cgi?id=90935
2010-08-08 06:22:45 +02:00
Javier Jardón
8b2108a8a4 gtkcombobox: Only use the child if It is a GtkCellLayout
This error was introduced in
commit 4427760bcc

Fixes https://bugzilla.gnome.org/show_bug.cgi?id=625104
2010-08-08 06:22:45 +02:00
Dan Williams
1d8aec51cc Elaborate interaction of gtk_widget_grab_default() and GtkEntry widgets 2010-08-07 23:14:47 -05:00
Tristan Van Berkom
8740bd2faf Merge branch 'master' into native-layout
Conflicts:
	gtk/gtkframe.c
	tests/testheightforwidth.c
2010-08-07 19:24:35 -04:00
Tristan Van Berkom
9ddef2365f Fixed expressions in gtk_button_size_allocate()
Children were getting negative allocations by misusage
of MAX() macro (bad signedness of expressions).
2010-08-07 17:41:29 -04:00
Javier Jardón
3ccc617052 Completely remove any use of GtkWindow allow-grow and allow-shrink properties
These have been deprecated and removed from master.
GtkWindow:resizable should be used instead.
This completes commit 1a03a65e36

Reported by Benjamin Otte
2010-08-07 17:19:16 +02:00
John Stowers
4198dd8519 Add gdk_display_is_closed
https://bugzilla.gnome.org/show_bug.cgi?id=624224
2010-08-07 23:21:31 +12:00
Tristan Van Berkom
59e7571aae Fixed alignment of wrapping labels allocated a greater width than needed
When wrapping labels to allocation width, never set the label wrap
width to a size greater than needed for the label's text (closes bug 625715)
2010-08-06 22:44:11 -04:00
Benjamin Otte
32d365f476 label: Make angle part of GtkLabelPrivate 2010-08-07 02:24:00 +02:00
Tadej Borovšak
35105ab2b4 Fix improperly unwinded loops 2010-08-06 20:08:32 -04:00
Tristan Van Berkom
03dfaf3c3e Fixed bad typo causing bad vertical requests on frames with no label. 2010-08-06 18:57:41 -04:00
Tadej Borovšak
651bed57a4 Implement fair extra space allocation 2010-08-06 17:28:07 -04:00
Tristan Van Berkom
208ba9bb50 Make GtkFrame allocate its label considering natural size requests
Also like the GtkExpander, the label widget is allocated the minimum
height for its allocated width and the remaining space is given to
the child, test case included.
2010-08-06 16:57:11 -04:00
Tristan Van Berkom
360e2c4dd5 Make GtkFrame allocate its label considering natural size requests
Also like the GtkExpander, the label widget is allocated the minimum
height for its allocated width and the remaining space is given to
the child, test case included.
2010-08-06 15:58:12 -04:00
Tristan Van Berkom
fd66586b33 Pulling back some cleanup/changes from the incubator branch 2010-08-06 14:22:59 -04:00
Tristan Van Berkom
add39dfea8 Merge branch 'master' into native-layout 2010-08-06 13:20:57 -04:00
Daniel Nylander
c9579f3ca4 Updated Swedish translation 2010-08-06 14:11:43 +02:00
Daniel Nylander
63958858c1 Updated Swedish translation 2010-08-06 14:10:27 +02:00
Tristan Van Berkom
a4086282c1 Fixed some merge problems (matching updates from the incubator branch) 2010-08-05 16:59:17 -04:00
Tristan Van Berkom
c3da4007db Fixed merge problem 2010-08-05 16:55:35 -04:00
Tristan Van Berkom
e569c77648 Removed useless struct definition (oops) 2010-08-05 16:54:13 -04:00
Tristan Van Berkom
f0b205f40c Merge branch 'master' into native-layout
Conflicts:
	gtk/gtkbox.c
	gtk/gtkcellrenderer.c
	gtk/gtkcellrenderertext.c
	gtk/gtkcellview.c
	gtk/gtkcombobox.c
	gtk/gtkexpander.c
	gtk/gtkiconview.c
	gtk/gtkplug.c
	gtk/gtkscrolledwindow.c
	gtk/gtksizerequest.c
	gtk/gtksocket.c
	gtk/gtktreeview.c
	gtk/gtktreeviewcolumn.c
	tests/testheightforwidth.c
2010-08-05 14:24:42 -04:00
Tristan Van Berkom
e83a8826e6 Implemented GtkSizeRequest on GtkExpander and added test
Now the expander requests and distributes space naturally,
the expander widget prioritizes the child widget vertically
and only allocates the minimum height for width to the label
widget.
2010-08-05 12:50:25 -04:00
Tristan Van Berkom
95b3e63057 Migrated old loops to use gtk_distribute_allocation(). 2010-08-05 12:50:25 -04:00
Tristan Van Berkom
6c76243f46 Added gtk_distribute_allocation()
Added a convenience api for containers to use when allocating
children (used to distribute space evenly to children).
2010-08-05 12:50:25 -04:00
Fran Diéguez
32869d439d Updated Galician translations 2010-08-05 16:16:43 +02:00
Yaron Shahrabani
b220c2b975 Updated Hebrew translation. 2010-08-05 13:32:41 +03:00
Jorge González
119a04e0cb Updated Spanish translation 2010-08-05 11:46:38 +02:00
Tomeu Vizoso
963e1ec033 Stop assuming that priv->label_widget will be a GtkLabel.
https://bugzilla.gnome.org/show_bug.cgi?id=623603
2010-08-05 10:31:40 +02:00
Carlos Garcia Campos
76267f9d06 Add _gtk_box_get_children() internal function
https://bugzilla.gnome.org/show_bug.cgi?id=625300
2010-08-05 09:51:15 +02:00
Matthias Clasen
dcdb00adb4 Avoid warnings with tooltips on toplevels
This was reported for tooltips on statusicons in bug 625235, but
it was affecting regular toplevel windows as well.
2010-08-05 00:12:41 -04:00
Matthias Clasen
92d34337f7 Re-add a lost Since: line
Pointed out in bug 579583
2010-08-04 22:58:14 -04:00
Matthias Clasen
519eae8729 Don't allocate space for "" in scale marks
Turns out GtkBuilder ends up creating marks with non-NULL
empty texts, so ignore those. Bug 614443, reported by Filippo Argiolas.
2010-08-04 21:47:54 -04:00
Philip Withnall
3a34295b9c Add (transfer none) annotation to gtk_tree_selection_get_selected_rows()
Closes: bgo#625650
2010-08-05 00:53:43 +01:00
Philip Withnall
080e8ab0a8 Add (inout) annotation to gtk_tree_model_iter_next()
Closes: bgo#625650
2010-08-05 00:53:36 +01:00
Lucian Adrian Grijincu
ae66d4feb4 Updated Romanian translation 2010-08-05 02:04:30 +03:00
Paolo Borelli
cffda84e93 Annotate GtkTextBuffer insert methods 2010-08-04 21:04:04 +02:00
Pablo Castellano
7df17ad475 Update git.mk from pango 2010-08-03 19:54:02 +02:00
Cody Russell
cd3510ce1f Change GtkCalendar's inner border and separator values from hard-coded
ones to using style properties.

https://bugzilla.gnome.org/show_bug.cgi?id=624779
2010-08-03 10:45:14 -05:00
Javier Jardón
237ed3bbf8 Remove some unused variables 2010-08-03 12:44:52 +02:00
Fridrich Štrba
c4b129bac2 Fix 32-bit Windows build using mingw-w64 toolchain 2010-08-03 03:01:49 +02:00
Fridrich Štrba
02068350ff Make the Windows manifest correspond to the name of the binary 2010-08-03 02:49:01 +02:00
Javier Jardón
57550e1b47 POTFILES.in: Add some missing files
Fixes https://bugzilla.gnome.org/show_bug.cgi?id=624737
2010-08-03 00:42:52 +02:00
Benjamin Otte
5e8c274e32 progressbar: Remove act_mode_enter vfunc
It doesn't make sense to have a vfunc for this.
2010-07-31 22:42:59 +02:00
Benjamin Otte
97f361c98f progressbar: Remove offscreen pixmap
Why did the progressbar keep an offscreen pixmap anyway? It didn't even
double buffer...
2010-07-31 22:42:59 +02:00
Benjamin Otte
ca513cec2e progressbar: Remove paint vfunc
Unconditionally call gtk_progress_bar_paint() instead. It was called in
various places instead of the vfunc already anyway.
2010-07-31 22:42:59 +02:00
Benjamin Otte
de401fd06d progressbar: Remove unused update vfunc 2010-07-31 22:42:59 +02:00
Benjamin Otte
decbe42212 docs: Add gdk_cursor_get_cursor_type() template 2010-07-31 22:42:59 +02:00
Benjamin Otte
f03ce229e9 docs: Remove GtkNotebookPage from docs 2010-07-31 22:41:51 +02:00
Benjamin Otte
5d5332a493 paned: Remove unused GdkGC 2010-07-31 22:41:39 +02:00
John (J5) Palmieri
5f1827983b add the transfer and element-type annotation to gdk_device_manager_list_devices 2010-07-29 04:53:54 -04:00
Tomeu Vizoso
1fa7f1085e Annotate gdk_rectangle_intersect 2010-07-28 17:02:18 +02:00
Xandru Armesto
14d4bc3c40 Updated asturian translation 2010-07-28 12:53:24 +02:00
Xandru Armesto
c774b0fbdb Updated asturian translation 2010-07-28 12:47:57 +02:00
Jorge González
5a02536da4 Updated Spanish translation 2010-07-26 20:59:11 +02:00
Benjamin Otte
a37ec87ed7 gdk: Flush implicit paints with Cairo 2010-07-26 16:42:49 +02:00
Benjamin Otte
cfa3a71c7b gdk: Do DEBUG_UPDATES drawing with Cairo 2010-07-26 16:42:49 +02:00
Benjamin Otte
2db020890e offscreenwindow: Copy old to new pixmap using Cairo 2010-07-26 16:42:49 +02:00
Benjamin Otte
b13480702b gdk: Create solid mask with Cairo 2010-07-26 16:42:49 +02:00
Benjamin Otte
b478081b7d gdk: Always clear backing store with Cairo
The code to use Cairo existed but wasn't used on Unix due to a bug in
XAA (that was fixed). Fwiw, we use EXA these days...
2010-07-26 16:42:49 +02:00
Benjamin Otte
331d77f3d7 gdkgc: Draw clip mask with Cairo 2010-07-26 16:42:49 +02:00
Benjamin Otte
37c502eae3 gdkpixbuf: Implement gdk_pixbuf_render_threshold_alpha() with Cairo 2010-07-26 16:42:49 +02:00
Benjamin Otte
5649431acb docs: Remove mention of gdk_draw_drawable()
That function is about to die.
2010-07-26 16:42:49 +02:00
Benjamin Otte
ccc26207fe gdk: Use the system colormap, not the rgb colormap
RGB colormaps are on their way out.
2010-07-26 16:42:49 +02:00
Benjamin Otte
b68801f168 gdk: Get rid of GdkRGB usage
Unfortunately, there's no code for getting rid of the alpha channel,
so we opacify the image ourselves.
2010-07-26 16:42:49 +02:00
Benjamin Otte
7b213d5604 gdk: Get rid of gdk_draw_pixbuf() call
Use Cairo code instead.
2010-07-26 16:42:49 +02:00
Benjamin Otte
610e29892e style: Draw insertion cursor with Cairo 2010-07-26 16:42:49 +02:00
Benjamin Otte
9bac13b1f5 Remove _gtk_widget_get_cursor_gc() function
It's unused now.
2010-07-26 16:42:48 +02:00
Benjamin Otte
761b0ea3ae testing: Use Cairo calls instead of gdk_draw_line() to test server sync 2010-07-26 16:42:48 +02:00
Benjamin Otte
188884a9b1 gtk-demo: Blit backing pixmap using Cairo 2010-07-26 16:42:48 +02:00
Benjamin Otte
831afa2159 gtk-demo: Convert color selection example to Cairo 2010-07-26 16:42:48 +02:00
Benjamin Otte
760ba34bd8 gtk-demo: Convert drawingarea example to Cairo 2010-07-26 16:42:48 +02:00
Benjamin Otte
4d07fa5772 gtk-demo: Make pixbufs demo use Cairo 2010-07-26 16:42:48 +02:00
Benjamin Otte
1e64e36b58 demos: No need to set the rgb colormap here 2010-07-26 16:42:48 +02:00
Benjamin Otte
da49daecc4 demos: Convert to drawing with Cairo instead of GdkRGB 2010-07-26 16:42:48 +02:00
Benjamin Otte
73ae8a787e demos: Use Cairo instead of gdk_draw_pixbuf() 2010-07-26 16:42:48 +02:00
Benjamin Otte
e0efb8798a testgtk: Remove unused variable 2010-07-26 16:42:48 +02:00
Benjamin Otte
e8bf80ebea testgtk: Draw rotated text example with pangocairo 2010-07-26 16:42:48 +02:00
Benjamin Otte
8630657324 testgtk: Replace gdk_draw_rectangle() with Cairo 2010-07-26 16:42:48 +02:00
Benjamin Otte
0a451f508b test: Convert testinput to Cairo
The test is broken though as it draws onto windows outside of expose
events.
And we all know you shouldn't do that.
2010-07-26 16:42:48 +02:00
Benjamin Otte
6dd7e5af08 tests: Make testoffscreen use Cairo 2010-07-26 16:42:48 +02:00
Benjamin Otte
a625e587a3 tests: replace gdk_draw_drawable() with Cairo calls in testinput 2010-07-26 16:42:48 +02:00
Benjamin Otte
17bd528df5 tests: Use gdk_screen_get_default_colormap()
We don't need the RGB colormap here.
2010-07-26 16:42:48 +02:00
Benjamin Otte
58ef2afdfa tests: Use GdkPixbuf for taking a screenshot, not GdkImage 2010-07-26 16:42:48 +02:00
Benjamin Otte
6d4bae5ccc tests: Remove gdk_draw_pixbuf() with Cairo equivalent 2010-07-26 16:42:47 +02:00
Benjamin Otte
c1c9b7dfc8 pixbuf-engine: Draw mask with Cairo
No more gdk_pixbuf_render_threshold_alpha()
2010-07-26 16:42:47 +02:00
Benjamin Otte
a22ebc974f pixbuf-engine: replace call to gdk_draw_pixbuf() with Cairo equivalent 2010-07-26 16:42:47 +02:00
Benjamin Otte
59db821725 pixbuf-engine: Replace gdk_draw_pixbuf() with Cairo equivalent
This replaces the tiled fill call only.
2010-07-26 16:42:47 +02:00
Benjamin Otte
7f1801eae1 imcontextxim: Draw with Cairo 2010-07-26 16:42:47 +02:00
Benjamin Otte
c122d31c29 decorations: Draw text with Cairo 2010-07-26 16:42:47 +02:00
Benjamin Otte
a8d805ffbc decorate: Draw decorations using Cairo
Patch is untested, is there an example using this?
2010-07-26 16:42:47 +02:00
Benjamin Otte
ff25b0dc20 hsv: Remove unused variable 2010-07-26 16:42:47 +02:00
Benjamin Otte
5cd6d309ea treeview: Draw the dnd pixmaps with Cairo 2010-07-26 16:42:47 +02:00
Benjamin Otte
da426ec97c treeview: Draw lines with Cairo 2010-07-26 16:42:47 +02:00
Benjamin Otte
8dd3317502 treeview: Unify all line drawing into the same function
This is useful because the dashing stuff needs to be done and it seems
like a good idea to unify it.
2010-07-26 16:42:47 +02:00
Benjamin Otte
526aac1fda treeview: Draw column reordering arrows with Cairo 2010-07-26 16:42:47 +02:00
Benjamin Otte
41621e212b ruler: Replace gdk_draw_drawable calls with Cairo
and get rid of the custom GC
2010-07-26 16:42:47 +02:00
Benjamin Otte
5fd0c28c78 menu: replace gdk_draw_drawable() call with Cairo equivalent 2010-07-26 16:42:47 +02:00
Benjamin Otte
671c506dfc filechooser: Remove commented out code
It wouldn't compile with current APIs anyway
2010-07-26 16:42:47 +02:00
Benjamin Otte
4181abd69a progressbar: Use cairo instead of gdk_draw_drawable() 2010-07-26 16:42:47 +02:00
Benjamin Otte
6eed185502 spinner: We want the default colormap, not the RGB colormap
GtkSpinner doesn't use GdkRGB
2010-07-26 16:42:46 +02:00
Benjamin Otte
8f6a014de4 image: Use Cairo instead of gdk_draw_drawable() 2010-07-26 16:42:46 +02:00
Benjamin Otte
847d401df3 image: replace gdk_draw_pixbuf() call with Cairo equivalent 2010-07-26 16:42:46 +02:00
Benjamin Otte
0310626938 textview: draw dnd icon with Pango 2010-07-26 16:42:46 +02:00
Benjamin Otte
dec093d9f1 textview: Draw selection background with Cairo 2010-07-26 16:42:46 +02:00
Benjamin Otte
3e469d737e textview: Draw drag icons using Cairo 2010-07-26 16:42:46 +02:00
Benjamin Otte
f1074be1ed textview: Use _gtk_widget_get_cursor_color() and Cairo
Previously the code was using _gtk_widget_get_cursor_gc()
2010-07-26 16:42:46 +02:00
Benjamin Otte
8c035b6048 textview: Draw empty shape logo with Cairo 2010-07-26 16:42:46 +02:00
Benjamin Otte
373128ce29 textview: replace gdk_draw_pixbuf() call with Cairo version 2010-07-26 16:42:46 +02:00
Benjamin Otte
de6314d084 colorbutton: Render with Cairo
In particular, this gets rid of gdk_draw_pixbuf() and GdkGC usage.
2010-07-26 16:42:46 +02:00
Benjamin Otte
d203b830a9 entry: replace gdk_draw_pixbuf() call with Cairo version 2010-07-26 16:42:46 +02:00
Benjamin Otte
2883a274cc gdk: Revert making get_size optional
49a0ec6e95 added this hunk without
explanations and it's obviously wrong because failing to have a get_size
vfunc will now not set width and height and they'll end up with invalid
values.

In fact, the GdkDrawableImpl{X11,Win32,Quartz} functions do not have
get_size implemented, so the patch was most likely an attempt to work
around calling this function erroneously on the impl objects.

The correct fix is to call impl->wrapper instead.
2010-07-26 16:42:46 +02:00
Benjamin Otte
8adfc326f8 x11: Query size on real drawable
The X11 drawable does not have a clue about the real size of the
surface.

This might also be the cause for:
https://bugzilla.gnome.org/show_bug.cgi?id=599574
2010-07-26 16:42:46 +02:00
Benjamin Otte
b806701cdb docs: Fix sgml file to add gdk_keymap_get_num_lock_state() 2010-07-26 16:42:46 +02:00
Benjamin Otte
c90ba0a3be cups: Fix cast warnings 2010-07-26 16:42:46 +02:00
Klemen Košir
90cd0f6ae7 Updated Slovenian translation 2010-07-26 14:45:57 +02:00
Szilárd Pfeiffer
ac34031b4e Moved the drawing of horizontal grid lines after cell drawing.
Without the change if the cell background is set the horizontal
grid line cannot be seen.
2010-07-25 14:50:12 +02:00
John Stowers
fe603cccf2 Add gdk_cursor_get_cursor_type
https://bugzilla.gnome.org/show_bug.cgi?id=624087
2010-07-25 22:12:34 +12:00
Aron Xu
5616a82c0a Update Simplified Chinese translation. 2010-07-24 13:15:32 +08:00
Federico Mena Quintero
917f5c1272 Clarify what the @event is used for when calling gtk_drag_begin()
Signed-off-by: Federico Mena Quintero <federico@novell.com>
2010-07-23 11:51:46 -05:00
Christian Dywan
1c5ee1df12 Correct marshaller for switch-page and adjust emission from menu
Fixes: https://bugzilla.gnome.org/show_bug.cgi?id=624687
2010-07-23 13:21:33 +02:00
Stanislav Brabec
ccc3d2c69f Fix stuck pointer grab due to passing GDK_CURRENT_TIME to gtk_drag_begin()
If gtk_drag_begin() gets passed GDK_CURRENT_TIME, try to use
gtk_get_current_event_time().  If it fails, use GDK_CURRENT_TIME when
ungrabbing in gtk_drag_end().

For more see https://bugzilla.gnome.org/show_bug.cgi?id=623865
2010-07-22 16:20:06 -05:00
Javier Jardón
c1a2ecc369 Check if childs actually exists before using it
Check seems to have gone lost during GtkBin sealing in commit 4427760b

Fixes https://bugzilla.gnome.org/show_bug.cgi?id=624707
2010-07-22 17:17:43 +02:00
Fran Diéguez
90db251624 Updated Galician translations 2010-07-22 16:28:52 +02:00
Tao Wang
a94ff624b6 Update Simplified Chinese translations. 2010-07-21 12:04:06 +08:00
Fran Diéguez
d3ef6af1a6 Updated Galician translations 2010-07-20 12:27:07 +02:00
Javier Jardón
6852137e13 Move GtkBoxChild from the public .h to gtkbox.c
https://bugzilla.gnome.org/show_bug.cgi?id=624397
2010-07-20 02:58:36 +02:00
Javier Jardón
82efd2d92f Do not use GtkBoxChild in GtkStatusBar
https://bugzilla.gnome.org/show_bug.cgi?id=624397
2010-07-20 02:35:49 +02:00
Javier Jardón
910ad4872c gtkentrycompletion: check return value because It can be non-UTF8
Fixes https://bugzilla.gnome.org/show_bug.cgi?id=624270
2010-07-19 23:56:22 +02:00
Kjartan Maraas
0a8043da13 Updated Norwegian bokmål translation 2010-07-19 21:38:04 +02:00
Yaron Shahrabani
4a7cff0cab Updated Hebrew translation. 2010-07-19 21:39:43 +03:00
Javier Jardón
cd9a9e1548 GtkWindowGroup: Add guards to some gtk_window_group_* functions 2010-07-19 17:53:51 +02:00
Javier Jardón
9ee3d73a19 Add _gtk_check_menu_item_set_active() internal function
It's needed by gtkradiomenuitem

Fixes https://bugzilla.gnome.org/show_bug.cgi?id=624432
2010-07-19 16:08:07 +02:00
Christian Persch
1af1362a36 gtknotebook: Fix critical warnings on scroll events
Fixes https://bugzilla.gnome.org/show_bug.cgi?id=604391
2010-07-19 15:28:03 +02:00
Ted Gould
6330ea9e43 gtkstock: Adding a File label stock item.
Fixes https://bugzilla.gnome.org/show_bug.cgi?id=622658
2010-07-19 15:26:18 +02:00
Javier Jardón
1bfa931e20 Add _gtk_toggle_action_set_active() internal function
It's needed in gtkradioaction

Fixes https://bugzilla.gnome.org/show_bug.cgi?id=624540
2010-07-19 15:16:03 +02:00
Carlos Garnacho
4682d563cf GtkWindow: keep a reference of the widget on focus change.
Focus out could lead to the widget being destroyed (for example,
in editable cell renderers when DnD starts), so keep the widget
alive while iterating through the devices.
2010-07-19 15:08:43 +02:00
Javier Jardón
0fd82767ff gtktextbuffer: Remove GET_PRIVATE macro
It's only needed one time and should not be used again in the code.
2010-07-19 15:01:02 +02:00
Mario Blättermann
ad9a9b7915 [i18n] Updated German translation 2010-07-18 20:35:06 +02:00
Mario Blättermann
1411613a70 [i18n] Updated German translation 2010-07-18 20:31:28 +02:00
Jorge González
a9e96106f9 Updated Spanish translation 2010-07-18 12:03:33 +02:00
Andika Triwidada
edbee1d9fc Updated Indonesian translation after reapply newest POT 2010-07-18 12:00:22 +07:00
Andika Triwidada
442f7fb2a6 Updated Indonesian translation 2010-07-18 11:56:38 +07:00
Ignacio Casal Quinteiro
a1be4eccb0 Move GtkTextBuffer sealed attributes to private struct. 2010-07-17 10:39:37 +02:00
Emmanuele Bassi
e42c29ca98 gail-util: Constify gchar argument
And avoid a compiler warning.

https://bugzilla.gnome.org/show_bug.cgi?id=624349
2010-07-16 17:44:15 +01:00
Yaron Shahrabani
ddcbc0e051 Updated Hebrew translation. 2010-07-16 17:17:13 +03:00
Matthias Clasen
271d66fc81 Remove accidental addition 2010-07-16 01:22:01 -04:00
Matthias Clasen
7491e9e97a Allow windows to be dragged by clicking on empty areas
Allow windows to be dragged by clicking on empty areas in menubars
and toolbars. This is under theme control, via the GtkWidget::window-dragging
style property. The idea is that it makes sense to turn this on if a
theme makes the window frame and the menubar/toolbar appear visually
contiguous.

The main patch was written by Cody Russell, with a contribution by
Ayan George. See bug 611313.
2010-07-16 01:15:47 -04:00
Matthias Clasen
89d0955431 Back down glib requires
We really only need 2.25.11 after all.
2010-07-15 23:42:04 -04:00
Paolo Borelli
0754f2d72f Do not use GtkBoxChild in GtkButtonBox.
Do not store the is_secondary bit in the deprecated parent struct, use a
simple flag on the object instead. Fixes bug #624367.
2010-07-15 22:42:07 +02:00
Javier Jardón
133f0744b9 docs: gitignore GtkRecentManager .sgml template
THis completes commit 8eeeb97de6
2010-07-15 15:43:48 +02:00
Emmanuele Bassi
8eeeb97de6 docs: Inline GtkRecentManager documentation 2010-07-15 09:10:55 +01:00
Javier Jardón
cfa241a891 Remove GtkRecenManager:limit deprecated property 2010-07-15 03:12:12 +02:00
Javier Jardón
678e738f8d Deprecate GtkRecenManager::limit property
The :limit property of GtkRecentManager does not serve any useful
purpose: the length of the list should be managed by the view
(implementing GtkRecentChooser), and not by the model (the recent
manager).

https://bugzilla.gnome.org/show_bug.cgi?id=624333
2010-07-15 02:40:28 +02:00
Jonh Wendell
5c2966dda3 Do not access an invalid ActionGroup. Closes #624362. 2010-07-14 14:50:28 -03:00
Tristan Van Berkom
a564e69e51 Merge branch 'master' into native-layout 2010-06-30 10:02:19 -04:00
Tristan Van Berkom
84e2a854dd Merge branch 'master' into native-layout
Conflicts:
	gtk/gtktreeview.c
2010-06-29 17:13:19 -04:00
Tristan Van Berkom
237d97dc25 Augmented the wrapping treeview test to include a scrolled window. 2010-06-29 17:06:53 -04:00
Tristan Van Berkom
6d47681722 GtkTreeview now watches the allocation of the parent scrolled window
at allocation time in order to detect possible feedback loops.

To avoid locking up the desktop some feedback protection is needed,
this patch is not the best but as far as I can see it does the job.
Ideally we should be looking into a GtkScrollable interface that
takes this height-for-width possibility into account.

The problem being that some height-for-width calculations at
allocation time are asynchronous and at some sizes cause the
height-for-width logic to compete with parent allocations
which change due to scrollbars toggling visiblity.

Specific considerations
  a.) The child treeview should not have knowlage of its parents
      allocation or the size of the scrollbars (this patch cheats
      that idealistic rule).
  b.) The parent scrolled window cannot safely determine if a child
      wants its size renegotiated based on a content change or based
      on a previous allocation
2010-06-29 17:01:13 -04:00
Tristan Van Berkom
0809e06881 Made scrolled windows forward along the height-for-width request in
the off-chance that both scrollbars are set to never appear.
2010-06-29 11:24:00 -04:00
Tristan Van Berkom
6d9d23009c Merge branch 'master' into native-layout 2010-06-27 18:40:20 -04:00
Tristan Van Berkom
93b76327ec Changed default window width of wrapping treeview height-for-width demo. 2010-06-27 18:37:53 -04:00
Tristan Van Berkom
a30585167f Filtered GtkCellSizeRequest apis to explicitly return GtkCellRenderer fixed sizes if any are set. 2010-06-27 18:36:53 -04:00
Tristan Van Berkom
deab62c29e Changed private api to allow setting a column dirty without resetting the width
(used when only the height is known to be dirty).
2010-06-27 18:35:54 -04:00
Tristan Van Berkom
02c37eb098 Fixed initial height of treeview when cells are wrapping to allocation.
This commit also adresses the refresh a little more gently and avoids
a lockup when resizing the 'editable cells' demo.
2010-06-27 18:33:56 -04:00
Tristan Van Berkom
ea4d2f9a52 Merge branch 'master' into native-layout 2010-06-26 13:25:40 -04:00
Tristan Van Berkom
bba9e3e070 Added test to demonstrate height-for-width tradeoffs in expander
labels.
2010-06-26 13:22:58 -04:00
Tristan Van Berkom
89a8f35b28 Implemented GtkSizeRequest interface on GtkExpander
In this particular case the label widget is never allocated
anything more than its natural width or its minimum height for
that width (thus prioritizing the content area to the label height).

We could allocate to the full available allocation but
  a.) focus would be drawn around the complete allocation
      instead of only the label
  b.) labels in expanders will need explicit alignments
2010-06-26 13:20:02 -04:00
Tristan Van Berkom
c71bf29d24 Properly separated get_width/get_height code for GtkScrolledWindow
This makes sure only one direction of the children is queried at
a time (and the previous code had a bug when calculating the
extra space for scrollbars).
2010-06-26 13:18:04 -04:00
Tristan Van Berkom
1d0650f871 Merge branch 'master' into native-layout
Conflicts:
	gtk/gtktreeview.c
2010-06-25 12:25:28 -04:00
Tristan Van Berkom
9d97153738 Added test to demonstrate word-wrapping cell renderers in treeviews. 2010-06-24 19:23:45 -04:00
Tristan Van Berkom
86f360fec2 Merge branch 'master' into native-layout 2010-06-24 18:09:33 -04:00
Tristan Van Berkom
f1998d568a Simulate gtk_cell_renderer_get_size() with height-for-width api
Same as GtkWidget does with GtkSizeRequestIface, this will allow
removal of the ->get_size() implementation for renderers that
implement the new api.
2010-06-24 18:09:08 -04:00
Tristan Van Berkom
9f3ad94e75 Fixed some faulty comparisons. 2010-06-24 18:09:08 -04:00
Tristan Van Berkom
4dbbcefe7c Fixed allocation of column buttons (was miscalculating padding). 2010-06-24 18:09:07 -04:00
Tristan Van Berkom
27065e257b Fixed treeview column allocations
Fixed allocations so that the column->width is not to
mention any padding taken into account by the treeview
(it's the allocated width of the column without padding/spacing).
2010-06-24 18:09:07 -04:00
Tristan Van Berkom
fca8db084d Fixed treecolumn's get_width() implementation to report collective width
based on cached widths of all rows.
2010-06-24 18:09:07 -04:00
Tristan Van Berkom
103f3a6a18 Fixed cell renderer to properly export it's height-for-width implementation. 2010-06-24 18:09:07 -04:00
Paolo Borelli
c683dffa9e Do not leak devices list in do_focus_change 2010-06-24 18:09:07 -04:00
noch
ecedc58113 Added Armenian translation - po file. 2010-06-24 18:09:07 -04:00
noch
4a7c237b79 Modified Armenian translation - po file. 2010-06-24 18:09:07 -04:00
noch
2f2486bd5b Added Armenian translation - po file. Modified LINGUAS. 2010-06-24 18:09:07 -04:00
Javier Jardón
ff82a56f28 [gtk] Add gtk_font_selection_dialog_get_font_selection()
This is needed to access the fontsel sealed member.
2010-06-24 18:09:07 -04:00
Javier Jardón
f463059f00 [test] Exclude message-area as it's a object property 2010-06-24 18:09:07 -04:00
Javier Jardón
6d16148936 Add new api to gtk.symbols
Add newly added api gtk_accessible_set_widget() and
gtk_message_dialog_get_message_area()
2010-06-24 18:09:07 -04:00
Jorge González
92ae8ebb01 Updated Spanish translation 2010-06-24 18:09:06 -04:00
Javier Jardón
380120bda9 [gtkaccessible] Use the correct guards in gtk_accessible_set_widget()
Also, allow the widget variable to be NULL
2010-06-24 18:09:06 -04:00
Tor Lillqvist
2517035bc0 Generate correct grab broken event for WM_KILLFOCUS
WM_KILLFOCUS means that a keyboard grab (not a pointer grab), if any,
has been broken. I don't think this bug has matterd much as gtk
generates a grab-broken-event signal for both keybord and pointer
grabs being broken anyway.
2010-06-24 18:09:06 -04:00
Federico Mena Quintero
3651dc278d bgo#328069 - Add gtk_message_dialog_get_message_area()
Signed-off-by: Federico Mena Quintero <federico@novell.com>
2010-06-24 18:09:06 -04:00
Vincent Untz
2c7058bd13 bgo#622371 - Add gtk_accessible_set_widget() - the widget field was GSEAL()ed.
https://bugzilla.gnome.org/show_bug.cgi?id=622371
2010-06-24 18:09:06 -04:00
Chris Kühl
ed639b211e [docs] Fixes issue with GtkEntryBuffer signal documentation 2010-06-24 18:09:06 -04:00
Murray Cumming
49f050a9bc gtkenums.h: Remove trailing comma to fix warning. 2010-06-24 18:09:06 -04:00
Tristan Van Berkom
51dadc0a1a Added test case to reflect natural size allocations in GtkTreeView and GtkTreeViewColumn 2010-06-23 18:02:05 -04:00
Tristan Van Berkom
1700cbe458 Implemented natural size allocations in GtkTreeView and GtkTreeViewColumn
This patch adds gtk_tree_view_column_allocate_width() to compute
the renderer allocation when the column width changes, furthermore
it effects treeview to allocate columns respecting their natural
widths (height-for-width requests still not effecting row heights).
2010-06-23 17:55:45 -04:00
Tristan Van Berkom
ee097eb7ab Fixing debug build (s/extended layout/size request/ in GTK_NOTE flags). 2010-06-23 17:53:30 -04:00
Tristan Van Berkom
9f6c01c665 Refactored gtk_tree_view_column_cell_process_action() and removed
much redundant code.
2010-06-22 13:43:21 -04:00
Tristan Van Berkom
101ad51803 Added height-for-width apis to treeviewcolumn
Added get_natural_width() and get_height_for_width() apis
which need to be treated in a special way from treeview because
of the intricate nature of treeviews and thier requirements:
  - get_natural_width() must be called in the request phase for
    every row which will cache the ->requested_width and ->natural_width
  - get_height_for_width() must be called only after caching the widths
    for the entire view
2010-06-22 13:01:39 -04:00
Tristan Van Berkom
99f73c09f6 Revert "Fixed GtkSpinner to request 12x12 at init time instead of at expose time."
This reverts commit 0dff033a64.

That commit was introduced as a workaround to an erronous state
in the extended layout work, it was not merged into master and
this new commit backs it out from native-layout branch.
2010-06-20 14:30:03 -04:00
Tristan Van Berkom
7c66a29e87 Merge branch 'master' into native-layout 2010-06-20 14:23:14 -04:00
Tristan Van Berkom
0eff4061ab Some more gtk-doc corrections 2010-06-20 14:19:10 -04:00
Tristan Van Berkom
9653cf57b6 Make cell renderer's wrap to allocation. 2010-06-20 14:16:01 -04:00
Tristan Van Berkom
06a5095dc5 Created a _gtk_distribute_allocation() helper function for size allocators.
Migrated a portion of the GtkBox allocator loop to live in
a private function and be reused for distribution of space along
a single orientation.
2010-06-18 19:40:02 -04:00
Tristan Van Berkom
ee9115fb9f Mass API change commit GtkExtendedCell --> GtkCellSizeRequest
This commit moves gtkextendedcell.[ch] --> gtkcellsizerequest.[ch]
and effects the API change all over the tree.

Furthermore it includes the initial height-for-width implementation
on GtkCellRendererText.
2010-06-18 17:07:03 -04:00
Tristan Van Berkom
33d3f72b98 More gtk-doc cleanup 2010-06-18 17:06:29 -04:00
Tristan Van Berkom
4ef145bda6 Merge branch 'master' into native-layout
Conflicts:
	gtk/Makefile.am
	gtk/gtk.h
	gtk/gtk.symbols
	gtk/gtksizerequest.c
2010-06-18 00:44:00 -04:00
Tristan Van Berkom
6e705d7087 Completed missing peices of the GtkExtendedCell api 2010-06-17 20:58:59 -04:00
Tristan Van Berkom
c2abe27b03 Created _gtk_cell_renderer_calc_offset()
Created an internal helper to replace the meaningless 'cell_area',
'x_offset' and 'y_offset' from gtk_cell_renderer_get_size() which
will be deprecated in favor of the new h4w api. At this point GTK+
does no longer depend on renderers calculating this alignment and
its safe to change the calls to gtk_extended_cell_get_desired_size().
2010-06-17 20:58:59 -04:00
Tristan Van Berkom
c20c3fd757 Mass api change from GtkExtendedLayout --> GtkSizeRequest part 2.
This commit makes the api change on the remaining portions of the
native-layout branch.
2010-06-17 20:41:01 -04:00
Tristan Van Berkom
c5a0e04a8d Mass api change from GtkExtendedLayout --> GtkSizeGroup
This commit makes a few massive changes to the extended layout
code:
  a.) gtkextendedlayout.c --> gtksizerequest.c
  b.) _is_height_for_width --> get_request_mode()
  c.) get_desired_size(), get_desired_width(), get_desired_height() -->
      get_size(), get_width(), get_height()

This is the first partial commit and only effects portions
of the tree that have already been merged in master (in order to
easily cherry pick this commit).
2010-06-17 20:38:16 -04:00
Tristan Van Berkom
f04f94e881 Merge branch 'master' into native-layout 2010-06-15 15:04:53 -04:00
Tristan Van Berkom
16715a662e Revert "Mega commit backing out everything from the native-layout branch that"
This reverts commit 2a5272647d.

Conflicts:

	gtk/gtk.symbols
	gtk/gtkextendedlayout.c
2010-06-11 15:44:56 -04:00
845 changed files with 69447 additions and 106614 deletions

View File

@@ -30,13 +30,17 @@ XVFB_START = \
# call as: $(XVFB_START) && someprogram
# test: run all tests in cwd and subdirs
test: ${TEST_PROGS}
test: test-cwd test-recurse
# test-cwd: run tests in cwd
test-cwd: ${TEST_PROGS}
@$(SKIP_GDKTARGET) || test -z "${TEST_PROGS}" || { \
$(XVFB_START) && { set -e; ${GTESTER} --verbose ${TEST_PROGS}; }; \
$(XVFB_START) && { set -e; $(TESTS_ENVIRONMENT) ${GTESTER} --verbose ${TEST_PROGS}; }; \
}
# test-recurse: run tests in subdirs
test-recurse:
@ for subdir in $(SUBDIRS) ; do \
test "$$subdir" = "." -o "$$subdir" = "po" -o "$$subdir" = "po-properties" || \
( cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $@ ) || exit $? ; \
( cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) test ) || exit $? ; \
done
# test-report: run tests in subdirs and generate report
# perf-report: run tests in subdirs with -m perf and generate report
@@ -77,6 +81,6 @@ test-report perf-report full-report: ${TEST_PROGS}
rm -rf "$$GTESTER_LOGDIR"/ ; \
${GTESTER_REPORT} --version 2>/dev/null 1>&2 ; test "$$?" != 0 || ${GTESTER_REPORT} $@.xml >$@.html ; \
}
.PHONY: test test-report perf-report full-report
# run make test as part of make check
check-local: test
.PHONY: test test-cwd test-recurse test-report perf-report full-report
# run make test-cwd as part of make check
check-local: test-cwd

100
NEWS
View File

@@ -1,3 +1,103 @@
Overview of Changes from GTK+ 2.90.5 to 2.90.6
==============================================
* All drawing done by GTK+ itself has been ported from
GDK drawing APIs to cairo
* GtkExpander and GtkFrame now implement GtkSizeRequest
* GtkExpander gained a ::label-fill property to make the label
fill the entire horizontal space
* Allow windows to be dragged by clicking on empty
areas in menubars and toolbars
* GtkAboutDialog can now refer to licenses using a ::license-type
enumeration instead of embedding the license text
* Deprecations and cleanups:
- Remove GtkNotebookPage
- Remove public struct members in many classes
- Remove the GtkRecentManager::limit property
- Remove all GDK drawing functions, ie gdk_draw_*. Use cairo instead
- Remove all GdkGC functions. Use cairo instead
- Remove all of GdkImage. Use cairo instead
- Remove all of GdkRGB. Use cairo instead
- Remove gdk_{bit,pix}map_create_from_data
- GDK no longer depends on the render X extension
* New accessors:
- gdk_cursor_get_cursor_type
- gdk_device_get_n_axes
- gdk_display_is_closed
- gtk_notebook_get_tab_[hv]border
* New cairo-related APIs:
- gdk_window_create_similar_surface
- gdk_window_get_background_pattern
* Bugs fixed:
90935 GtkIMContextClass inheritance ...
97414 gtkaccellabel: s/seperator/separator/
336225 Support for common licenses in about dialog
554926 gtk_init_with_args: not setting translation domain...
557263 Notebooks return 1 selection even if they have no pages
579583 GtkStatusIcon's scroll-event documentation missing "Since: ..."
580291 Gail does not work with custom treemodels
596125 Property string fixes
604391 Gtk-CRITICAL when switching between tab
605190 Should delete the description of xim related options...
609264 gtk_(tree/list)_store_set documentation unclear about ownership
611313 Window dragging from menubars/toolbars
612919 crash in System Monitor: I was moving up-down wit...
614049 Allow packing options for GtkExpander label widgets
614443 Doxygen 'forgets' #define documentation under certain conditions
615474 gtk_widget_set_has_window() documentation is not correct
618327 GtkNotebookPage should be deprecated
621571 Fix damage events on offscreen windows
622658 GTK_STOCK_FILE Stock Label
623603 meld built with pygtk-2.16.0 giving warnings
623865 gtkdnd: pointer grab may never finish (ungrab before grab)
624087 Missing accessor for GdkCursor.type
624224 Missing accessor for GdkDisplay.closed
624270 crash in gtk_entry_completion_default_completion_func
624333 Deprecate GtkRecentManager:limit
624362 access an invalid ActionGroup
624367 GtkButtonBox is broken
624397 Move GtkBoxChild from public .h to gtkbox.c
624432 GtkRadioMenuItem is broken
624540 GtkRadionAction loop in its activate handler
624687 switch-page bug when activated from menu
624707 warnings when showing gnome-terminal menus on gtk master
624779 GtkCalendar padding/margin/spacing/border/whatever is hard-coded
625104 Don't try and use the child of a GtkSeparatorMenuItem
625235 Tooltips cause warnings
625300 Buttons order in dialogs broken in gtk+3
625416 gtk_file_chooser_default_map should not reload directory
625650 Add annotations to gtk_tree_model_iter_next() and...
625655 win32 compile failure due to G_SEAL
625715 comment string in GtkAboutDialog is not centered
625953 GailAdjustment does not implement get_minimum_increment...
626052 Activating a file in GtkFileChooserDialog activates action...
626276 gtk_tree_selection_set_select_function() should allow...
626514 License dialog doesn't take into account long copyrights
* Translation updates:
Asturian
Galician
German
Hebrew
Indonesian
Norwegian bokmål
Punjabi
Romanian
Simplified Chinese
Slovenian
Spanish
Swedish
Traditional Chinese
Overview of Changes from GTK+ 2.90.4 to 2.90.5
==============================================

View File

@@ -134,7 +134,6 @@
<File RelativePath="..\..\..\gdk\win32\gdkgeometry-win32.c" />
<File RelativePath="..\..\..\gdk\win32\gdkglobals-win32.c" />
<File RelativePath="..\..\..\gdk\win32\gdkim-win32.c" />
<File RelativePath="..\..\..\gdk\win32\gdkimage-win32.c" />
<File RelativePath="..\..\..\gdk\win32\gdkinput-win32.c" />
<File RelativePath="..\..\..\gdk\win32\gdkinput.c" />
<File RelativePath="..\..\..\gdk\win32\gdkkeys-win32.c" />

View File

@@ -108,7 +108,6 @@ copy ..\..\..\gdk\gdkevents.h $(OutDir)\include\gtk-$(GtkApiVersion)\gdk&#x0D;&#
copy ..\..\..\gdk\gdkfont.h $(OutDir)\include\gtk-$(GtkApiVersion)\gdk&#x0D;&#x0A;
copy ..\..\..\gdk\gdkgc.h $(OutDir)\include\gtk-$(GtkApiVersion)\gdk&#x0D;&#x0A;
copy ..\..\..\gdk\gdki18n.h $(OutDir)\include\gtk-$(GtkApiVersion)\gdk&#x0D;&#x0A;
copy ..\..\..\gdk\gdkimage.h $(OutDir)\include\gtk-$(GtkApiVersion)\gdk&#x0D;&#x0A;
copy ..\..\..\gdk\gdkinput.h $(OutDir)\include\gtk-$(GtkApiVersion)\gdk&#x0D;&#x0A;
copy ..\..\..\gdk\gdkkeys.h $(OutDir)\include\gtk-$(GtkApiVersion)\gdk&#x0D;&#x0A;
copy ..\..\..\gdk\gdkkeysyms.h $(OutDir)\include\gtk-$(GtkApiVersion)\gdk&#x0D;&#x0A;

View File

@@ -12,7 +12,7 @@ AC_PREREQ([2.62])
m4_define([gtk_major_version], [2])
m4_define([gtk_minor_version], [90])
m4_define([gtk_micro_version], [6])
m4_define([gtk_micro_version], [7])
m4_define([gtk_interface_age], [0])
m4_define([gtk_binary_age],
[m4_eval(100 * gtk_minor_version + gtk_micro_version)])
@@ -31,7 +31,7 @@ m4_define([gtk_api_version], [3.0])
m4_define([gtk_binary_version], [3.0.0])
# required versions of other packages
m4_define([glib_required_version], [2.25.12])
m4_define([glib_required_version], [2.25.15])
m4_define([pango_required_version], [1.20])
m4_define([atk_required_version], [1.29.2])
m4_define([cairo_required_version], [1.9.10])
@@ -257,13 +257,13 @@ else
gdktarget=x11
fi
AC_ARG_WITH(gdktarget, [ --with-gdktarget=[[x11/win32/quartz/directfb]] select non-default GDK target],
AC_ARG_WITH(gdktarget, [ --with-gdktarget=[[x11/win32/quartz]] select non-default GDK target],
gdktarget=$with_gdktarget)
AC_SUBST(gdktarget)
case $gdktarget in
x11|win32|quartz|directfb) ;;
*) AC_MSG_ERROR([Invalid target for GDK: use x11, quartz, directfb or win32.]);;
x11|win32|quartz) ;;
*) AC_MSG_ERROR([Invalid target for GDK: use x11, quartz or win32.]);;
esac
gdktargetlib=libgdk-$gdktarget-$GTK_API_VERSION.la
@@ -942,11 +942,11 @@ if test "x$gdktarget" = "xx11"; then
#
# Check for basic X packages; we use pkg-config if available
#
if $PKG_CONFIG --exists x11 xext xrender; then
if $PKG_CONFIG --exists x11 xext; then
have_base_x_pc=true
X_PACKAGES="$X_PACKAGES x11 xext xrender"
x_libs="`$PKG_CONFIG --libs x11 xext xrender`"
X_CFLAGS="`$PKG_CONFIG --cflags x11 xext xrender`"
X_PACKAGES="$X_PACKAGES x11 xext"
x_libs="`$PKG_CONFIG --libs x11 xext`"
X_CFLAGS="`$PKG_CONFIG --cflags x11 xext`"
# Strip out any .la files that pkg-config might give us (this happens
# with -uninstalled.pc files)
@@ -967,9 +967,9 @@ if test "x$gdktarget" = "xx11"; then
fi
x_cflags="$X_CFLAGS"
x_libs_for_checks="$X_LIBS -lXext -lXrender -lX11 $X_EXTRA_LIBS"
x_libs_for_checks="$X_LIBS -lXext -lX11 $X_EXTRA_LIBS"
GTK_DEP_LIBS_FOR_X="$X_LIBS -lXrender -lX11 $X_EXTRA_LIBS"
GTK_DEP_LIBS_FOR_X="$X_LIBS -lX11 $X_EXTRA_LIBS"
fi
# Extra libraries found during checks (-lXinerama, etc), not from pkg-config.
@@ -988,8 +988,6 @@ if test "x$gdktarget" = "xx11"; then
AC_MSG_ERROR([*** libX11 not found. Check 'config.log' for more details.]))
AC_CHECK_FUNC(XextFindDisplay, :,
AC_MSG_ERROR([*** libXext not found. Check 'config.log' for more details.]))
AC_CHECK_FUNC(XRenderQueryExtension, :,
AC_MSG_ERROR([*** libXrender not found. Check 'config.log' for more details.]))
# Check for xReply
@@ -1250,17 +1248,6 @@ else
AM_CONDITIONAL(USE_QUARTZ, false)
fi
if test "x$gdktarget" = "xdirectfb"; then
DIRECTFB_REQUIRED_VERSION=1.0.0
AC_MSG_CHECKING(for DirectFB)
PKG_CHECK_MODULES(DIRECTFB, [directfb >= $DIRECTFB_REQUIRED_VERSION])
AM_CONDITIONAL(USE_DIRECTFB, true)
else
AM_CONDITIONAL(USE_DIRECTFB, false)
fi
# Check for Pango flags
if test "x$gdktarget" = "xwin32"; then
@@ -1654,9 +1641,6 @@ elif test "x$gdktarget" = "xwin32" ; then
elif test "x$gdktarget" = "xquartz" ; then
gdk_windowing='
#define GDK_WINDOWING_QUARTZ'
elif test "x$gdktarget" = "xdirectfb" ; then
gdk_windowing='
#define GDK_WINDOWING_DIRECTFB'
fi
if test x$gdk_wchar_h = xyes; then
@@ -1732,7 +1716,6 @@ gdk/win32/Makefile
gdk/win32/rc/Makefile
gdk/win32/rc/gdk.rc
gdk/quartz/Makefile
gdk/directfb/Makefile
gdk/tests/Makefile
gtk/Makefile
gtk/makefile.msc

View File

@@ -22,42 +22,24 @@ LDADDS = \
$(MATH_LIB)
noinst_PROGRAMS = \
testpixbuf-drawable \
testanimation \
testpixbuf-color \
testpixbuf-save \
testpixbuf-scale \
pixbuf-demo
# Need to build test-inline-pixbufs.h for testpixbuf
noinst_PROGRAMS += testpixbuf
BUILT_SOURCES = test-inline-pixbufs.h
test-inline-pixbufs.h: apple-red.png gnome-foot.png
$(GDK_PIXBUF_CSOURCE) --raw --build-list \
apple_red $(srcdir)/apple-red.png \
gnome_foot $(srcdir)/gnome-foot.png \
> test-inline-pixbufs.h \
|| (rm -f test-inline-pixbufs.h && false)
testpixbuf_DEPENDENCIES = $(DEPS)
testpixbuf_drawable_DEPENDENCIES = $(DEPS)
testpixbuf_save_DEPENDENCIES = $(DEPS)
testpixbuf_color_DEPENDENCIES = $(DEPS)
testpixbuf_scale_DEPENDENCIES = $(DEPS)
testanimation_DEPENDENCIES = $(DEPS)
pixbuf_demo_DEPENDENCIES = $(DEPS)
testpixbuf_LDADD = $(LDADDS)
testpixbuf_drawable_LDADD = $(LDADDS)
testpixbuf_save_LDADD = $(LDADDS)
testpixbuf_color_LDADD = $(LDADDS)
testpixbuf_scale_LDADD = $(LDADDS)
testanimation_LDADD = $(LDADDS)
pixbuf_demo_LDADD = $(LDADDS)
testpixbuf_SOURCES = testpixbuf.c pixbuf-init.c
testpixbuf_drawable_SOURCES = testpixbuf-drawable.c pixbuf-init.c
testpixbuf_save_SOURCES = testpixbuf-save.c
testpixbuf_color_SOURCES = testpixbuf-color.c
testpixbuf_scale_SOURCES = testpixbuf-scale.c pixbuf-init.c
@@ -75,6 +57,4 @@ EXTRA_DIST += \
gnome-gsame.png \
gnu-keys.png
DISTCLEANFILES = test-inline-pixbufs.h
-include $(top_srcdir)/git.mk

View File

@@ -109,22 +109,6 @@ about_cb (GtkAction *action,
NULL
};
const gchar *license =
"This library is free software; you can redistribute it and/or\n"
"modify it under the terms of the GNU Library General Public License as\n"
"published by the Free Software Foundation; either version 2 of the\n"
"License, or (at your option) any later version.\n"
"\n"
"This library is distributed in the hope that it will be useful,\n"
"but WITHOUT ANY WARRANTY; without even the implied warranty of\n"
"MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU\n"
"Library General Public License for more details.\n"
"\n"
"You should have received a copy of the GNU Library General Public\n"
"License along with the Gnome Library; see the file COPYING.LIB. If not,\n"
"write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,\n"
"Boston, MA 02111-1307, USA.\n";
pixbuf = NULL;
transparent = NULL;
filename = demo_find_file ("gtk-logo-rgb.gif", NULL);
@@ -142,7 +126,7 @@ about_cb (GtkAction *action,
"program-name", "GTK+ Code Demos",
"version", PACKAGE_VERSION,
"copyright", "(C) 1997-2009 The GTK+ Team",
"license", license,
"license-type", GTK_LICENSE_LGPL_2_1,
"website", "http://www.gtk.org",
"comments", "Program to demonstrate GTK+ functions.",
"authors", authors,
@@ -459,7 +443,7 @@ do_appwindow (GtkWidget *do_widget)
gtk_window_set_screen (GTK_WINDOW (window),
gtk_widget_get_screen (do_widget));
gtk_window_set_title (GTK_WINDOW (window), "Application Window");
gtk_window_set_icon_name (GTK_WINDOW (window), "gtk-open");
gtk_window_set_icon_name (GTK_WINDOW (window), "document-open");
/* NULL window variable when window is closed */
g_signal_connect (window, "destroy",

View File

@@ -128,7 +128,7 @@ query_for_toplevel (GdkScreen *screen,
gtk_widget_show_all (popup);
cursor = gdk_cursor_new_for_display (display, GDK_CROSSHAIR);
if (gdk_pointer_grab (popup->window, FALSE,
if (gdk_pointer_grab (gtk_widget_get_window (popup), FALSE,
GDK_BUTTON_RELEASE_MASK,
NULL,
cursor,

View File

@@ -19,17 +19,23 @@ expose_event_callback (GtkWidget *widget,
GdkEventExpose *event,
gpointer data)
{
if (widget->window)
GdkWindow *window;
window = gtk_widget_get_window (widget);
if (window)
{
GtkStyle *style;
cairo_t *cr;
style = gtk_widget_get_style (widget);
gdk_draw_rectangle (widget->window,
style->bg_gc[GTK_STATE_NORMAL],
TRUE,
event->area.x, event->area.y,
event->area.width, event->area.height);
cr = gdk_cairo_create (window);
gdk_cairo_set_source_color (cr, &style->bg[GTK_STATE_NORMAL]);
gdk_cairo_rectangle (cr, &event->area);
cairo_fill (cr);
cairo_destroy (cr);
}
return TRUE;

View File

@@ -17,52 +17,53 @@
static GtkWidget *window = NULL;
/* Pixmap for scribble area, to store current scribbles */
static GdkPixmap *pixmap = NULL;
static cairo_surface_t *surface = NULL;
/* Create a new pixmap of the appropriate size to store our scribbles */
/* Create a new surface of the appropriate size to store our scribbles */
static gboolean
scribble_configure_event (GtkWidget *widget,
GdkEventConfigure *event,
gpointer data)
{
if (pixmap)
g_object_unref (pixmap);
GtkAllocation allocation;
cairo_t *cr;
pixmap = gdk_pixmap_new (widget->window,
widget->allocation.width,
widget->allocation.height,
-1);
if (surface)
cairo_surface_destroy (surface);
/* Initialize the pixmap to white */
gdk_draw_rectangle (pixmap,
widget->style->white_gc,
TRUE,
0, 0,
widget->allocation.width,
widget->allocation.height);
gtk_widget_get_allocation (widget, &allocation);
surface = gdk_window_create_similar_surface (gtk_widget_get_window (widget),
CAIRO_CONTENT_COLOR,
allocation.width,
allocation.height);
/* Initialize the surface to white */
cr = cairo_create (surface);
cairo_set_source_rgb (cr, 1, 1, 1);
cairo_paint (cr);
cairo_destroy (cr);
/* We've handled the configure event, no need for further processing. */
return TRUE;
}
/* Redraw the screen from the pixmap */
/* Redraw the screen from the surface */
static gboolean
scribble_expose_event (GtkWidget *widget,
GdkEventExpose *event,
gpointer data)
{
/* We use the "foreground GC" for the widget since it already exists,
* but honestly any GC would work. The only thing to worry about
* is whether the GC has an inappropriate clip region set.
*/
cairo_t *cr;
gdk_draw_drawable (widget->window,
widget->style->fg_gc[gtk_widget_get_state (widget)],
pixmap,
/* Only copy the area that was exposed. */
event->area.x, event->area.y,
event->area.x, event->area.y,
event->area.width, event->area.height);
cr = gdk_cairo_create (gtk_widget_get_window (widget));
cairo_set_source_surface (cr, surface, 0, 0);
gdk_cairo_rectangle (cr, &event->area);
cairo_fill (cr);
cairo_destroy (cr);
return FALSE;
}
@@ -74,21 +75,23 @@ draw_brush (GtkWidget *widget,
gdouble y)
{
GdkRectangle update_rect;
cairo_t *cr;
update_rect.x = x - 3;
update_rect.y = y - 3;
update_rect.width = 6;
update_rect.height = 6;
/* Paint to the pixmap, where we store our state */
gdk_draw_rectangle (pixmap,
widget->style->black_gc,
TRUE,
update_rect.x, update_rect.y,
update_rect.width, update_rect.height);
/* Paint to the surface, where we store our state */
cr = cairo_create (surface);
gdk_cairo_rectangle (cr, &update_rect);
cairo_fill (cr);
cairo_destroy (cr);
/* Now invalidate the affected region of the drawing area. */
gdk_window_invalidate_rect (widget->window,
gdk_window_invalidate_rect (gtk_widget_get_window (widget),
&update_rect,
FALSE);
}
@@ -98,7 +101,7 @@ scribble_button_press_event (GtkWidget *widget,
GdkEventButton *event,
gpointer data)
{
if (pixmap == NULL)
if (surface == NULL)
return FALSE; /* paranoia check, in case we haven't gotten a configure event */
if (event->button == 1)
@@ -116,7 +119,7 @@ scribble_motion_notify_event (GtkWidget *widget,
int x, y;
GdkModifierType state;
if (pixmap == NULL)
if (surface == NULL)
return FALSE; /* paranoia check, in case we haven't gotten a configure event */
/* This call is very important; it requests the next motion event.
@@ -145,9 +148,9 @@ checkerboard_expose (GtkWidget *da,
GdkEventExpose *event,
gpointer data)
{
GtkAllocation allocation;
gint i, j, xcount, ycount;
GdkGC *gc1, *gc2;
GdkColor color;
cairo_t *cr;
#define CHECK_SIZE 10
#define SPACING 2
@@ -159,47 +162,30 @@ checkerboard_expose (GtkWidget *da,
* works.
*/
/* It would be a bit more efficient to keep these
* GC's around instead of recreating on each expose, but
* this is the lazy/slow way.
*/
gc1 = gdk_gc_new (da->window);
color.red = 30000;
color.green = 0;
color.blue = 30000;
gdk_gc_set_rgb_fg_color (gc1, &color);
gc2 = gdk_gc_new (da->window);
color.red = 65535;
color.green = 65535;
color.blue = 65535;
gdk_gc_set_rgb_fg_color (gc2, &color);
cr = gdk_cairo_create (gtk_widget_get_window (da));
gdk_cairo_rectangle (cr, &event->area);
cairo_clip (cr);
gtk_widget_get_allocation (da, &allocation);
xcount = 0;
i = SPACING;
while (i < da->allocation.width)
while (i < allocation.width)
{
j = SPACING;
ycount = xcount % 2; /* start with even/odd depending on row */
while (j < da->allocation.height)
while (j < allocation.height)
{
GdkGC *gc;
if (ycount % 2)
gc = gc1;
cairo_set_source_rgb (cr, 0.45777, 0, 0.45777);
else
gc = gc2;
cairo_set_source_rgb (cr, 1, 1, 1);
/* If we're outside event->area, this will do nothing.
* It might be mildly more efficient if we handled
* the clipping ourselves, but again we're feeling lazy.
*/
gdk_draw_rectangle (da->window,
gc,
TRUE,
i, j,
CHECK_SIZE,
CHECK_SIZE);
cairo_rectangle (cr, i, j, CHECK_SIZE, CHECK_SIZE);
cairo_fill (cr);
j += CHECK_SIZE + SPACING;
++ycount;
@@ -209,8 +195,7 @@ checkerboard_expose (GtkWidget *da,
++xcount;
}
g_object_unref (gc1);
g_object_unref (gc2);
cairo_destroy (cr);
/* return TRUE because we've handled this event, so no
* further processing is required.
@@ -223,9 +208,9 @@ close_window (void)
{
window = NULL;
if (pixmap)
g_object_unref (pixmap);
pixmap = NULL;
if (surface)
g_object_unref (surface);
surface = NULL;
}
GtkWidget *
@@ -292,7 +277,7 @@ do_drawingarea (GtkWidget *do_widget)
gtk_container_add (GTK_CONTAINER (frame), da);
/* Signals used to handle backing pixmap */
/* Signals used to handle backing surface */
g_signal_connect (da, "expose-event",
G_CALLBACK (scribble_expose_event), NULL);

View File

@@ -225,7 +225,8 @@ motion_notify_event (GtkWidget *text_view,
set_cursor_if_appropriate (GTK_TEXT_VIEW (text_view), x, y);
gdk_window_get_pointer (text_view->window, NULL, NULL, NULL);
gdk_window_get_pointer (gtk_widget_get_window (text_view),
NULL, NULL, NULL);
return FALSE;
}
@@ -237,9 +238,10 @@ visibility_notify_event (GtkWidget *text_view,
GdkEventVisibility *event)
{
gint wx, wy, bx, by;
gdk_window_get_pointer (text_view->window, &wx, &wy, NULL);
gdk_window_get_pointer (gtk_widget_get_window (text_view),
&wx, &wy, NULL);
gtk_text_view_window_to_buffer_coords (GTK_TEXT_VIEW (text_view),
GTK_TEXT_WINDOW_WIDGET,
wx, wy, &bx, &by);

View File

@@ -74,7 +74,7 @@ to_child (GtkRotatedBin *bin,
s = sin (bin->angle);
c = cos (bin->angle);
child_area = bin->child->allocation;
gtk_widget_get_allocation (bin->child, &child_area);
w = c * child_area.width + s * child_area.height;
h = s * child_area.width + c * child_area.height;
@@ -114,7 +114,7 @@ to_parent (GtkRotatedBin *bin,
s = sin (bin->angle);
c = cos (bin->angle);
child_area = bin->child->allocation;
gtk_widget_get_allocation (bin->child, &child_area);
w = c * child_area.width + s * child_area.height;
h = s * child_area.width + c * child_area.height;
@@ -188,7 +188,7 @@ pick_offscreen_child (GdkWindow *offscreen_window,
{
to_child (bin, widget_x, widget_y, &x, &y);
child_area = bin->child->allocation;
gtk_widget_get_allocation (bin->child, &child_area);
if (x >= 0 && x < child_area.width &&
y >= 0 && y < child_area.height)
@@ -224,6 +224,9 @@ static void
gtk_rotated_bin_realize (GtkWidget *widget)
{
GtkRotatedBin *bin = GTK_ROTATED_BIN (widget);
GtkAllocation allocation;
GtkStyle *style;
GdkWindow *window;
GdkWindowAttr attributes;
gint attributes_mask;
guint border_width;
@@ -231,12 +234,13 @@ gtk_rotated_bin_realize (GtkWidget *widget)
gtk_widget_set_realized (widget, TRUE);
gtk_widget_get_allocation (widget, &allocation);
border_width = gtk_container_get_border_width (GTK_CONTAINER (widget));
attributes.x = widget->allocation.x + border_width;
attributes.y = widget->allocation.y + border_width;
attributes.width = widget->allocation.width - 2 * border_width;
attributes.height = widget->allocation.height - 2 * border_width;
attributes.x = allocation.x + border_width;
attributes.y = allocation.y + border_width;
attributes.width = allocation.width - 2 * border_width;
attributes.height = allocation.height - 2 * border_width;
attributes.window_type = GDK_WINDOW_CHILD;
attributes.event_mask = gtk_widget_get_events (widget)
| GDK_EXPOSURE_MASK
@@ -253,10 +257,11 @@ gtk_rotated_bin_realize (GtkWidget *widget)
attributes_mask = GDK_WA_X | GDK_WA_Y | GDK_WA_VISUAL | GDK_WA_COLORMAP;
widget->window = gdk_window_new (gtk_widget_get_parent_window (widget),
&attributes, attributes_mask);
gdk_window_set_user_data (widget->window, widget);
g_signal_connect (widget->window, "pick-embedded-child",
window = gdk_window_new (gtk_widget_get_parent_window (widget),
&attributes, attributes_mask);
gtk_widget_set_window (widget, window);
gdk_window_set_user_data (window, widget);
g_signal_connect (window, "pick-embedded-child",
G_CALLBACK (pick_offscreen_child), bin);
attributes.window_type = GDK_WINDOW_OFFSCREEN;
@@ -264,24 +269,27 @@ gtk_rotated_bin_realize (GtkWidget *widget)
child_requisition.width = child_requisition.height = 0;
if (bin->child && gtk_widget_get_visible (bin->child))
{
attributes.width = bin->child->allocation.width;
attributes.height = bin->child->allocation.height;
GtkAllocation child_allocation;
gtk_widget_get_allocation (bin->child, &child_allocation);
attributes.width = child_allocation.width;
attributes.height = child_allocation.height;
}
bin->offscreen_window = gdk_window_new (gtk_widget_get_root_window (widget),
&attributes, attributes_mask);
gdk_window_set_user_data (bin->offscreen_window, widget);
if (bin->child)
gtk_widget_set_parent_window (bin->child, bin->offscreen_window);
gdk_offscreen_window_set_embedder (bin->offscreen_window, widget->window);
gdk_offscreen_window_set_embedder (bin->offscreen_window, window);
g_signal_connect (bin->offscreen_window, "to-embedder",
G_CALLBACK (offscreen_window_to_parent), bin);
g_signal_connect (bin->offscreen_window, "from-embedder",
G_CALLBACK (offscreen_window_from_parent), bin);
widget->style = gtk_style_attach (widget->style, widget->window);
gtk_style_set_background (widget->style, widget->window, GTK_STATE_NORMAL);
gtk_style_set_background (widget->style, bin->offscreen_window, GTK_STATE_NORMAL);
gtk_widget_style_attach (widget);
style = gtk_widget_get_style (widget);
gtk_style_set_background (style, window, GTK_STATE_NORMAL);
gtk_style_set_background (style, bin->offscreen_window, GTK_STATE_NORMAL);
gdk_window_show (bin->offscreen_window);
}
@@ -405,7 +413,7 @@ gtk_rotated_bin_size_allocate (GtkWidget *widget,
gint w, h;
gdouble s, c;
widget->allocation = *allocation;
gtk_widget_set_allocation (widget, allocation);
border_width = gtk_container_get_border_width (GTK_CONTAINER (widget));
@@ -413,7 +421,7 @@ gtk_rotated_bin_size_allocate (GtkWidget *widget,
h = allocation->height - border_width * 2;
if (gtk_widget_get_realized (widget))
gdk_window_move_resize (widget->window,
gdk_window_move_resize (gtk_widget_get_window (widget),
allocation->x + border_width,
allocation->y + border_width,
w, h);
@@ -454,7 +462,8 @@ static gboolean
gtk_rotated_bin_damage (GtkWidget *widget,
GdkEventExpose *event)
{
gdk_window_invalidate_rect (widget->window, NULL, FALSE);
gdk_window_invalidate_rect (gtk_widget_get_window (widget),
NULL, FALSE);
return TRUE;
}
@@ -464,13 +473,15 @@ gtk_rotated_bin_expose (GtkWidget *widget,
GdkEventExpose *event)
{
GtkRotatedBin *bin = GTK_ROTATED_BIN (widget);
GdkWindow *window;
gint width, height;
gdouble s, c;
gdouble w, h;
if (gtk_widget_is_drawable (widget))
{
if (event->window == widget->window)
window = gtk_widget_get_window (widget);
if (event->window == window)
{
GdkPixmap *pixmap;
GtkAllocation child_area;
@@ -479,9 +490,9 @@ gtk_rotated_bin_expose (GtkWidget *widget,
if (bin->child && gtk_widget_get_visible (bin->child))
{
pixmap = gdk_offscreen_window_get_pixmap (bin->offscreen_window);
child_area = bin->child->allocation;
gtk_widget_get_allocation (bin->child, &child_area);
cr = gdk_cairo_create (widget->window);
cr = gdk_cairo_create (window);
/* transform */
s = sin (bin->angle);
@@ -507,7 +518,7 @@ gtk_rotated_bin_expose (GtkWidget *widget,
}
else if (event->window == bin->offscreen_window)
{
gtk_paint_flat_box (widget->style, event->window,
gtk_paint_flat_box (gtk_widget_get_style (widget), event->window,
GTK_STATE_NORMAL, GTK_SHADOW_NONE,
&event->area, widget, "blah",
0, 0, -1, -1);

View File

@@ -126,7 +126,7 @@ pick_offscreen_child (GdkWindow *offscreen_window,
{
to_child (bin, widget_x, widget_y, &x, &y);
child_area = bin->child->allocation;
gtk_widget_get_allocation (bin->child, &child_area);
if (x >= 0 && x < child_area.width &&
y >= 0 && y < child_area.height)
@@ -162,6 +162,9 @@ static void
gtk_mirror_bin_realize (GtkWidget *widget)
{
GtkMirrorBin *bin = GTK_MIRROR_BIN (widget);
GtkAllocation allocation;
GtkStyle *style;
GdkWindow *window;
GdkWindowAttr attributes;
gint attributes_mask;
guint border_width;
@@ -169,12 +172,13 @@ gtk_mirror_bin_realize (GtkWidget *widget)
gtk_widget_set_realized (widget, TRUE);
gtk_widget_get_allocation (widget, &allocation);
border_width = gtk_container_get_border_width (GTK_CONTAINER (widget));
attributes.x = widget->allocation.x + border_width;
attributes.y = widget->allocation.y + border_width;
attributes.width = widget->allocation.width - 2 * border_width;
attributes.height = widget->allocation.height - 2 * border_width;
attributes.x = allocation.x + border_width;
attributes.y = allocation.y + border_width;
attributes.width = allocation.width - 2 * border_width;
attributes.height = allocation.height - 2 * border_width;
attributes.window_type = GDK_WINDOW_CHILD;
attributes.event_mask = gtk_widget_get_events (widget)
| GDK_EXPOSURE_MASK
@@ -191,10 +195,11 @@ gtk_mirror_bin_realize (GtkWidget *widget)
attributes_mask = GDK_WA_X | GDK_WA_Y | GDK_WA_VISUAL | GDK_WA_COLORMAP;
widget->window = gdk_window_new (gtk_widget_get_parent_window (widget),
&attributes, attributes_mask);
gdk_window_set_user_data (widget->window, widget);
g_signal_connect (widget->window, "pick-embedded-child",
window = gdk_window_new (gtk_widget_get_parent_window (widget),
&attributes, attributes_mask);
gtk_widget_set_window (widget, window);
gdk_window_set_user_data (window, widget);
g_signal_connect (window, "pick-embedded-child",
G_CALLBACK (pick_offscreen_child), bin);
attributes.window_type = GDK_WINDOW_OFFSCREEN;
@@ -202,24 +207,27 @@ gtk_mirror_bin_realize (GtkWidget *widget)
child_requisition.width = child_requisition.height = 0;
if (bin->child && gtk_widget_get_visible (bin->child))
{
attributes.width = bin->child->allocation.width;
attributes.height = bin->child->allocation.height;
GtkAllocation child_allocation;
gtk_widget_get_allocation (bin->child, &child_allocation);
attributes.width = child_allocation.width;
attributes.height = child_allocation.height;
}
bin->offscreen_window = gdk_window_new (gtk_widget_get_root_window (widget),
&attributes, attributes_mask);
gdk_window_set_user_data (bin->offscreen_window, widget);
if (bin->child)
gtk_widget_set_parent_window (bin->child, bin->offscreen_window);
gdk_offscreen_window_set_embedder (bin->offscreen_window, widget->window);
gdk_offscreen_window_set_embedder (bin->offscreen_window, window);
g_signal_connect (bin->offscreen_window, "to-embedder",
G_CALLBACK (offscreen_window_to_parent), bin);
g_signal_connect (bin->offscreen_window, "from-embedder",
G_CALLBACK (offscreen_window_from_parent), bin);
widget->style = gtk_style_attach (widget->style, widget->window);
gtk_style_set_background (widget->style, widget->window, GTK_STATE_NORMAL);
gtk_style_set_background (widget->style, bin->offscreen_window, GTK_STATE_NORMAL);
gtk_widget_style_attach (widget);
style = gtk_widget_get_style (widget);
gtk_style_set_background (style, window, GTK_STATE_NORMAL);
gtk_style_set_background (style, bin->offscreen_window, GTK_STATE_NORMAL);
gdk_window_show (bin->offscreen_window);
}
@@ -323,7 +331,7 @@ gtk_mirror_bin_size_allocate (GtkWidget *widget,
gint w, h;
guint border_width;
widget->allocation = *allocation;
gtk_widget_set_allocation (widget, allocation);
border_width = gtk_container_get_border_width (GTK_CONTAINER (widget));
@@ -331,7 +339,7 @@ gtk_mirror_bin_size_allocate (GtkWidget *widget,
h = allocation->height - border_width * 2;
if (gtk_widget_get_realized (widget))
gdk_window_move_resize (widget->window,
gdk_window_move_resize (gtk_widget_get_window (widget),
allocation->x + border_width,
allocation->y + border_width,
w, h);
@@ -360,7 +368,8 @@ static gboolean
gtk_mirror_bin_damage (GtkWidget *widget,
GdkEventExpose *event)
{
gdk_window_invalidate_rect (widget->window, NULL, FALSE);
gdk_window_invalidate_rect (gtk_widget_get_window (widget),
NULL, FALSE);
return TRUE;
}
@@ -370,11 +379,13 @@ gtk_mirror_bin_expose (GtkWidget *widget,
GdkEventExpose *event)
{
GtkMirrorBin *bin = GTK_MIRROR_BIN (widget);
GdkWindow *window;
gint width, height;
if (gtk_widget_is_drawable (widget))
{
if (event->window == widget->window)
window = gtk_widget_get_window (widget);
if (event->window == window)
{
GdkPixmap *pixmap;
cairo_t *cr;
@@ -386,7 +397,7 @@ gtk_mirror_bin_expose (GtkWidget *widget,
pixmap = gdk_offscreen_window_get_pixmap (bin->offscreen_window);
gdk_drawable_get_size (pixmap, &width, &height);
cr = gdk_cairo_create (widget->window);
cr = gdk_cairo_create (window);
cairo_save (cr);
@@ -426,7 +437,7 @@ gtk_mirror_bin_expose (GtkWidget *widget,
}
else if (event->window == bin->offscreen_window)
{
gtk_paint_flat_box (widget->style, event->window,
gtk_paint_flat_box (gtk_widget_get_style (widget), event->window,
GTK_STATE_NORMAL, GTK_SHADOW_NONE,
&event->area, widget, "blah",
0, 0, -1, -1);

View File

@@ -17,17 +17,23 @@ void
toggle_resize (GtkWidget *widget,
GtkWidget *child)
{
GtkPaned *paned = GTK_PANED (child->parent);
gboolean is_child1 = (child == gtk_paned_get_child1 (paned));
GtkWidget *parent;
GtkPaned *paned;
gboolean is_child1;
gboolean resize, shrink;
parent = gtk_widget_get_parent (child);
paned = GTK_PANED (parent);
is_child1 = (child == gtk_paned_get_child1 (paned));
gtk_container_child_get (GTK_CONTAINER (paned), child,
"resize", &resize,
"shrink", &shrink,
NULL);
g_object_ref (child);
gtk_container_remove (GTK_CONTAINER (child->parent), child);
gtk_container_remove (GTK_CONTAINER (parent), child);
if (is_child1)
gtk_paned_pack1 (paned, child, !resize, shrink);
else
@@ -39,17 +45,23 @@ void
toggle_shrink (GtkWidget *widget,
GtkWidget *child)
{
GtkPaned *paned = GTK_PANED (child->parent);
gboolean is_child1 = (child == gtk_paned_get_child1 (paned));
GtkWidget *parent;
GtkPaned *paned;
gboolean is_child1;
gboolean resize, shrink;
parent = gtk_widget_get_parent (child);
paned = GTK_PANED (parent);
is_child1 = (child == gtk_paned_get_child1 (paned));
gtk_container_child_get (GTK_CONTAINER (paned), child,
"resize", &resize,
"shrink", &shrink,
NULL);
g_object_ref (child);
gtk_container_remove (GTK_CONTAINER (child->parent), child);
gtk_container_remove (GTK_CONTAINER (parent), child);
if (is_child1)
gtk_paned_pack1 (paned, child, resize, !shrink);
else

View File

@@ -100,20 +100,15 @@ expose_cb (GtkWidget *widget,
GdkEventExpose *event,
gpointer data)
{
guchar *pixels;
int rowstride;
cairo_t *cr;
rowstride = gdk_pixbuf_get_rowstride (frame);
cr = gdk_cairo_create (event->window);
pixels = gdk_pixbuf_get_pixels (frame) + rowstride * event->area.y + event->area.x * 3;
gdk_cairo_set_source_pixbuf (cr, frame, 0, 0);
gdk_cairo_rectangle (cr, &event->area);
cairo_fill (cr);
gdk_draw_rgb_image_dithalign (widget->window,
widget->style->black_gc,
event->area.x, event->area.y,
event->area.width, event->area.height,
GDK_RGB_DITHER_NORMAL,
pixels, rowstride,
event->area.x, event->area.y);
cairo_destroy (cr);
return TRUE;
}

View File

@@ -99,6 +99,8 @@ rotated_text_expose_event (GtkWidget *widget,
#define N_WORDS 5
#define FONT "Serif 18"
GtkAllocation allocation;
PangoContext *context;
PangoLayout *layout;
PangoFontDescription *desc;
@@ -108,16 +110,20 @@ rotated_text_expose_event (GtkWidget *widget,
PangoAttrList *attrs;
int width = widget->allocation.width;
int height = widget->allocation.height;
int width;
int height;
double device_radius;
int i;
gtk_widget_get_allocation (widget, &allocation);
width = allocation.width;
height = allocation.height;
/* Create a cairo context and set up a transformation matrix so that the user
* space coordinates for the centered square where we draw are [-RADIUS, RADIUS],
* [-RADIUS, RADIUS].
* We first center, then change the scale. */
cr = gdk_cairo_create (widget->window);
cr = gdk_cairo_create (gtk_widget_get_window (widget));
device_radius = MIN (width, height) / 2.;
cairo_translate (cr,
device_radius + (width - 2 * device_radius) / 2,

View File

@@ -58,18 +58,10 @@ stock_item_info_copy (StockItemInfo *src)
return info;
}
static GType
stock_item_info_get_type (void)
{
static GType our_type = 0;
if (our_type == 0)
our_type = g_boxed_type_register_static ("StockItemInfo",
(GBoxedCopyFunc) stock_item_info_copy,
(GBoxedFreeFunc) stock_item_info_free);
return our_type;
}
static
G_DEFINE_BOXED_TYPE (StockItemInfo, stock_item_info,
stock_item_info_copy,
stock_item_info_free)
typedef struct _StockItemDisplay StockItemDisplay;
struct _StockItemDisplay

View File

@@ -14,17 +14,9 @@
static void easter_egg_callback (GtkWidget *button, gpointer data);
#define gray50_width 2
#define gray50_height 2
static char gray50_bits[] = {
0x02, 0x01
};
static void
create_tags (GtkTextBuffer *buffer)
{
GdkBitmap *stipple;
/* Create a bunch of tags. Note that it's also possible to
* create tags with gtk_text_tag_new() then add them to the
* tag table for the buffer, gtk_text_buffer_create_tag() is
@@ -74,18 +66,6 @@ create_tags (GtkTextBuffer *buffer)
gtk_text_buffer_create_tag (buffer, "red_background",
"background", "red", NULL);
stipple = gdk_bitmap_create_from_data (NULL,
gray50_bits, gray50_width,
gray50_height);
gtk_text_buffer_create_tag (buffer, "background_stipple",
"background_stipple", stipple, NULL);
gtk_text_buffer_create_tag (buffer, "foreground_stipple",
"foreground_stipple", stipple, NULL);
g_object_unref (stipple);
gtk_text_buffer_create_tag (buffer, "big_gap_before_line",
"pixels_above_lines", 30, NULL);
@@ -227,17 +207,9 @@ insert_text (GtkTextBuffer *buffer)
"red_background", NULL);
gtk_text_buffer_insert (buffer, &iter, " or even ", -1);
gtk_text_buffer_insert_with_tags_by_name (buffer, &iter,
"a stippled red background", -1,
"red_background",
"background_stipple",
NULL);
gtk_text_buffer_insert (buffer, &iter, " or ", -1);
gtk_text_buffer_insert_with_tags_by_name (buffer, &iter,
"a stippled blue foreground on solid red background", -1,
"a blue foreground on red background", -1,
"blue_foreground",
"red_background",
"foreground_stipple",
NULL);
gtk_text_buffer_insert (buffer, &iter, " (select that to read it) can be used.\n\n", -1);

View File

@@ -84,15 +84,18 @@ static gboolean
canvas_expose_event (GtkWidget *widget,
GdkEventExpose *event)
{
GtkAllocation allocation;
cairo_t *cr;
GList *iter;
cr = gdk_cairo_create (widget->window);
cr = gdk_cairo_create (gtk_widget_get_window (widget));
gdk_cairo_region (cr, event->region);
cairo_clip (cr);
gtk_widget_get_allocation (widget, &allocation);
cairo_set_source_rgb (cr, 1, 1, 1);
cairo_rectangle (cr, 0, 0, widget->allocation.width, widget->allocation.height);
cairo_rectangle (cr, 0, 0, allocation.width, allocation.height);
cairo_fill (cr);
for (iter = canvas_items; iter; iter = iter->next)
@@ -173,6 +176,7 @@ palette_drag_data_received (GtkWidget *widget,
guint time,
gpointer data)
{
GtkAllocation allocation;
GtkToolItemGroup *drop_group = NULL;
GtkWidget *drag_palette = gtk_drag_get_source_widget (context);
GtkWidget *drag_item = NULL;
@@ -193,10 +197,13 @@ palette_drag_data_received (GtkWidget *widget,
GTK_TOOL_ITEM_GROUP (drag_item),
drop_group);
else if (GTK_IS_TOOL_ITEM (drag_item) && drop_group)
palette_drop_item (GTK_TOOL_ITEM (drag_item),
drop_group,
x - GTK_WIDGET (drop_group)->allocation.x,
y - GTK_WIDGET (drop_group)->allocation.y);
{
gtk_widget_get_allocation (GTK_WIDGET (drop_group), &allocation);
palette_drop_item (GTK_TOOL_ITEM (drag_item),
drop_group,
x - allocation.x,
y - allocation.y);
}
}
/********************************/
@@ -372,11 +379,13 @@ on_combo_orientation_changed (GtkComboBox *combo_box,
gpointer user_data)
{
GtkToolPalette *palette = GTK_TOOL_PALETTE (user_data);
GtkScrolledWindow *sw = GTK_SCROLLED_WINDOW (GTK_WIDGET (palette)->parent);
GtkScrolledWindow *sw;
GtkTreeModel *model = gtk_combo_box_get_model (combo_box);
GtkTreeIter iter;
gint val = 0;
sw = GTK_SCROLLED_WINDOW (gtk_widget_get_parent (GTK_WIDGET (palette)));
if (!gtk_combo_box_get_active_iter (combo_box, &iter))
return;

View File

@@ -89,20 +89,14 @@ load_pixbufs (void)
static gint
expose_cb (GtkWidget *widget, GdkEventExpose *event, gpointer data)
{
guchar *pixels;
int rowstride;
cairo_t *cr;
cr = gdk_cairo_create (event->window);
gdk_cairo_set_source_pixbuf (cr, frame, 0, 0);
gdk_cairo_rectangle (cr, &event->area);
cairo_fill (cr);
rowstride = gdk_pixbuf_get_rowstride (frame);
pixels = gdk_pixbuf_get_pixels (frame) + rowstride * event->area.y + event->area.x * 3;
gdk_draw_rgb_image_dithalign (widget->window,
widget->style->black_gc,
event->area.x, event->area.y,
event->area.width, event->area.height,
GDK_RGB_DITHER_NORMAL,
pixels, rowstride,
event->area.x, event->area.y);
cairo_destroy (cr);
return TRUE;
}

View File

@@ -111,8 +111,6 @@ main (int argc, char **argv)
gtk_init (&argc, &argv);
gtk_widget_set_default_colormap (gdk_rgb_get_colormap ());
root = gdk_get_default_root_window ();
pixbuf = gdk_pixbuf_get_from_drawable (NULL, root, NULL,
0, 0, 0, 0, 150, 160);

View File

@@ -1,115 +0,0 @@
#include "config.h"
#include <gtk/gtk.h>
int
close_app (GtkWidget *widget, gpointer data)
{
gtk_main_quit ();
return TRUE;
}
int
expose_cb (GtkWidget *drawing_area, GdkEventExpose *evt, gpointer data)
{
GdkPixbuf *pixbuf;
pixbuf = (GdkPixbuf *) g_object_get_data (G_OBJECT (drawing_area), "pixbuf");
if (gdk_pixbuf_get_has_alpha (pixbuf))
{
gdk_draw_rgb_32_image (drawing_area->window,
drawing_area->style->black_gc,
evt->area.x, evt->area.y,
evt->area.width,
evt->area.height,
GDK_RGB_DITHER_MAX,
gdk_pixbuf_get_pixels (pixbuf) +
(evt->area.y * gdk_pixbuf_get_rowstride (pixbuf)) +
(evt->area.x * gdk_pixbuf_get_n_channels (pixbuf)),
gdk_pixbuf_get_rowstride (pixbuf));
}
else
{
gdk_draw_rgb_image (drawing_area->window,
drawing_area->style->black_gc,
evt->area.x, evt->area.y,
evt->area.width,
evt->area.height,
GDK_RGB_DITHER_NORMAL,
gdk_pixbuf_get_pixels (pixbuf) +
(evt->area.y * gdk_pixbuf_get_rowstride (pixbuf)) +
(evt->area.x * gdk_pixbuf_get_n_channels (pixbuf)),
gdk_pixbuf_get_rowstride (pixbuf));
}
return FALSE;
}
int
configure_cb (GtkWidget *drawing_area, GdkEventConfigure *evt, gpointer data)
{
GdkPixbuf *pixbuf;
pixbuf = (GdkPixbuf *) g_object_get_data (G_OBJECT (drawing_area), "pixbuf");
g_print ("X:%d Y:%d\n", evt->width, evt->height);
if (evt->width != gdk_pixbuf_get_width (pixbuf) || evt->height != gdk_pixbuf_get_height (pixbuf))
{
GdkWindow *root;
GdkPixbuf *new_pixbuf;
root = gdk_get_default_root_window ();
new_pixbuf = gdk_pixbuf_get_from_drawable (NULL, root, NULL,
0, 0, 0, 0, evt->width, evt->height);
g_object_set_data (G_OBJECT (drawing_area), "pixbuf", new_pixbuf);
g_object_unref (pixbuf);
}
return FALSE;
}
extern void pixbuf_init (void);
int
main (int argc, char **argv)
{
GdkWindow *root;
GtkWidget *window;
GtkWidget *vbox;
GtkWidget *drawing_area;
GdkPixbuf *pixbuf;
pixbuf_init ();
gtk_init (&argc, &argv);
gdk_rgb_set_verbose (TRUE);
gtk_widget_set_default_colormap (gdk_rgb_get_colormap ());
root = gdk_get_default_root_window ();
pixbuf = gdk_pixbuf_get_from_drawable (NULL, root, NULL,
0, 0, 0, 0, 150, 160);
window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
g_signal_connect (window, "delete_event",
G_CALLBACK (close_app), NULL);
g_signal_connect (window, "destroy",
G_CALLBACK (close_app), NULL);
vbox = gtk_vbox_new (FALSE, 0);
gtk_container_add (GTK_CONTAINER (window), vbox);
drawing_area = gtk_drawing_area_new ();
gtk_widget_set_size_request (GTK_WIDGET (drawing_area),
gdk_pixbuf_get_width (pixbuf),
gdk_pixbuf_get_height (pixbuf));
g_signal_connect (drawing_area, "expose_event",
G_CALLBACK (expose_cb), NULL);
g_signal_connect (drawing_area, "configure_event",
G_CALLBACK (configure_cb), NULL);
g_object_set_data (G_OBJECT (drawing_area), "pixbuf", pixbuf);
gtk_box_pack_start (GTK_BOX (vbox), drawing_area, TRUE, TRUE, 0);
gtk_widget_show_all (window);
gtk_main ();
return 0;
}

View File

@@ -311,32 +311,18 @@ static int
expose_cb (GtkWidget *drawing_area, GdkEventExpose *evt, gpointer data)
{
GdkPixbuf *pixbuf;
cairo_t *cr;
pixbuf = (GdkPixbuf *) g_object_get_data (G_OBJECT (drawing_area),
"pixbuf");
if (gdk_pixbuf_get_has_alpha (pixbuf)) {
gdk_draw_rgb_32_image (drawing_area->window,
drawing_area->style->black_gc,
evt->area.x, evt->area.y,
evt->area.width,
evt->area.height,
GDK_RGB_DITHER_MAX,
gdk_pixbuf_get_pixels (pixbuf) +
(evt->area.y * gdk_pixbuf_get_rowstride (pixbuf)) +
(evt->area.x * gdk_pixbuf_get_n_channels (pixbuf)),
gdk_pixbuf_get_rowstride (pixbuf));
} else {
gdk_draw_rgb_image (drawing_area->window,
drawing_area->style->black_gc,
evt->area.x, evt->area.y,
evt->area.width,
evt->area.height,
GDK_RGB_DITHER_NORMAL,
gdk_pixbuf_get_pixels (pixbuf) +
(evt->area.y * gdk_pixbuf_get_rowstride (pixbuf)) +
(evt->area.x * gdk_pixbuf_get_n_channels (pixbuf)),
gdk_pixbuf_get_rowstride (pixbuf));
}
cr = gdk_cairo_create (evt->window);
gdk_cairo_set_source_pixbuf (cr, pixbuf, 0, 0);
gdk_cairo_rectangle (cr, &evt->area);
cairo_fill (cr);
cairo_destroy (cr);
return FALSE;
}
@@ -374,8 +360,6 @@ main (int argc, char **argv)
gtk_init (&argc, &argv);
gtk_widget_set_default_colormap (gdk_rgb_get_colormap ());
root = gdk_get_default_root_window ();
pixbuf = gdk_pixbuf_get_from_drawable (NULL, root, NULL,
0, 0, 0, 0, 150, 160);

View File

@@ -34,25 +34,31 @@ overall_changed_cb (GtkAdjustment *adjustment, gpointer data)
gboolean
expose_cb (GtkWidget *widget, GdkEventExpose *event, gpointer data)
{
GtkAllocation allocation;
GdkPixbuf *dest;
cairo_t *cr;
gdk_window_set_back_pixmap (gtk_widget_get_window (widget),
NULL, FALSE);
gdk_window_set_back_pixmap (widget->window, NULL, FALSE);
dest = gdk_pixbuf_new (GDK_COLORSPACE_RGB, FALSE, 8, event->area.width, event->area.height);
gtk_widget_get_allocation (widget, &allocation);
gdk_pixbuf_composite_color (pixbuf, dest,
0, 0, event->area.width, event->area.height,
-event->area.x, -event->area.y,
(double) widget->allocation.width / gdk_pixbuf_get_width (pixbuf),
(double) widget->allocation.height / gdk_pixbuf_get_height (pixbuf),
(double) allocation.width / gdk_pixbuf_get_width (pixbuf),
(double) allocation.height / gdk_pixbuf_get_height (pixbuf),
interp_type, overall_alpha,
event->area.x, event->area.y, 16, 0xaaaaaa, 0x555555);
gdk_draw_pixbuf (widget->window, widget->style->fg_gc[GTK_STATE_NORMAL], dest,
0, 0, event->area.x, event->area.y,
event->area.width, event->area.height,
GDK_RGB_DITHER_NORMAL, event->area.x, event->area.y);
cr = gdk_cairo_create (event->window);
gdk_cairo_set_source_pixbuf (cr, dest, 0, 0);
gdk_cairo_rectangle (cr, &event->area);
cairo_fill (cr);
cairo_destroy (cr);
g_object_unref (dest);
return TRUE;

View File

@@ -1,640 +0,0 @@
/* testpixbuf -- test program for gdk-pixbuf code
* Copyright (C) 1999 Mark Crichton, Larry Ewing
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
* Boston, MA 02111-1307, USA.
*/
#include "config.h"
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <string.h>
#include <gtk/gtk.h>
#include <gdk-pixbuf/gdk-pixbuf.h>
#include "test-inline-pixbufs.h"
typedef struct {
FILE *imagefile;
GdkPixbufLoader *loader;
GtkWidget **rgbwin;
guchar *buf;
guint timeout;
guint readlen;
} ProgressFileStatus;
#define DEFAULT_WIDTH 24
#define DEFAULT_HEIGHT 24
static const unsigned char default_image[] = {
0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff,
0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff,
0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff,
0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff,
0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff,
0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff,
0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff,
0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff,
0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff,
0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff,
0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff,
0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff,
0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff,
0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff,
0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff,
0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff,
0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff,
0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff,
0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff,
0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff,
0xff, 0x00, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x00, 0xff,
0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff,
0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff,
0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff,
0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0xae, 0xb3, 0xb3, 0xc6, 0xc9, 0xcd, 0xd7, 0xd4, 0xdf,
0xec, 0xde, 0xf3, 0xe7, 0xcb, 0xe9, 0xd9, 0xb5, 0xd3, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff,
0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff,
0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff,
0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0x00, 0x00, 0x00, 0xb1, 0xb7, 0xa5,
0xb0, 0xb8, 0xad, 0xb3, 0xb9, 0xb6, 0xc1, 0xc6, 0xc8, 0xd5, 0xd3, 0xdc,
0xec, 0xde, 0xf3, 0xe5, 0xca, 0xe6, 0xe0, 0xbb, 0xd7, 0xe1, 0xad, 0xc2,
0xe3, 0xac, 0xa3, 0x00, 0x00, 0x00, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff,
0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff,
0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff,
0xff, 0x00, 0xff, 0x00, 0x00, 0x00, 0xca, 0xc1, 0xa4, 0xc5, 0xc7, 0xac,
0xb7, 0xbe, 0xaf, 0xad, 0xb4, 0xaf, 0xbd, 0xc2, 0xc3, 0xd1, 0xd0, 0xd8,
0xec, 0xde, 0xf3, 0xe5, 0xc7, 0xe4, 0xe0, 0xb6, 0xd1, 0xe7, 0xa9, 0xb4,
0xed, 0xcd, 0xb6, 0xd6, 0xcf, 0xae, 0x00, 0x00, 0x00, 0xff, 0x00, 0xff,
0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff,
0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff,
0x00, 0x00, 0x00, 0xdf, 0xa7, 0x9f, 0xdd, 0xbf, 0xaa, 0xcf, 0xc5, 0xa9,
0xc1, 0xc4, 0xac, 0xb2, 0xba, 0xaf, 0xb6, 0xbb, 0xbb, 0xcd, 0xce, 0xd4,
0xec, 0xde, 0xf3, 0xe4, 0xc4, 0xe1, 0xe0, 0xaf, 0xc7, 0xea, 0xbc, 0xae,
0xe1, 0xd6, 0xb6, 0xc7, 0xcc, 0xae, 0xa2, 0xab, 0x9a, 0x00, 0x00, 0x00,
0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff,
0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff,
0x00, 0x00, 0x00, 0xe3, 0xab, 0xc0, 0xe6, 0xa3, 0xa7, 0xdf, 0xba, 0xa8,
0xcf, 0xc5, 0xa9, 0xbd, 0xc2, 0xae, 0xad, 0xb4, 0xaf, 0xc6, 0xc9, 0xcd,
0xec, 0xde, 0xf3, 0xe2, 0xbf, 0xdc, 0xe7, 0xa9, 0xb4, 0xe7, 0xd6, 0xb8,
0xc7, 0xcc, 0xae, 0xac, 0xb6, 0xa6, 0x9d, 0xa8, 0x9f, 0x00, 0x00, 0x00,
0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff,
0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0x00, 0x00, 0x00,
0xd9, 0xaf, 0xcf, 0xe1, 0xb4, 0xd2, 0xe2, 0xb0, 0xcb, 0xe4, 0xa9, 0xbb,
0xe2, 0xb2, 0xa6, 0xcf, 0xc5, 0xa9, 0x6a, 0x6a, 0x6a, 0x0d, 0x0d, 0x0d,
0x0d, 0x0d, 0x0d, 0x6a, 0x6a, 0x6a, 0xed, 0xcd, 0xb6, 0xc7, 0xcc, 0xae,
0xa6, 0xb1, 0xa3, 0x98, 0xa2, 0x9c, 0x8f, 0x97, 0x96, 0x7e, 0x84, 0x85,
0x00, 0x00, 0x00, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff,
0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0x00, 0x00, 0x00,
0xe8, 0xc6, 0xe7, 0xe5, 0xc2, 0xe3, 0xe3, 0xbd, 0xdd, 0xe1, 0xb6, 0xd5,
0xe2, 0xb0, 0xcb, 0x6a, 0x6a, 0x6a, 0x00, 0x00, 0x00, 0xff, 0x00, 0xff,
0xff, 0x00, 0xff, 0x00, 0x00, 0x00, 0x6a, 0x6a, 0x6a, 0x9d, 0xa8, 0x9f,
0x8f, 0x97, 0x96, 0x8b, 0x90, 0x92, 0x97, 0x9e, 0xa2, 0xa0, 0xa7, 0xae,
0x00, 0x00, 0x00, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff,
0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0x00, 0x00, 0x00,
0xe7, 0xd3, 0xed, 0xe8, 0xd1, 0xed, 0xe8, 0xce, 0xec, 0xe9, 0xcc, 0xeb,
0xe8, 0xc6, 0xe7, 0x0d, 0x0d, 0x0d, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff,
0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0x0d, 0x0d, 0x0d, 0x97, 0x9e, 0xa2,
0xa7, 0xae, 0xb7, 0xb2, 0xb6, 0xc5, 0xba, 0xbc, 0xce, 0xbf, 0xbe, 0xd3,
0x00, 0x00, 0x00, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff,
0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0x00, 0x00, 0x00,
0xe9, 0xdf, 0xf0, 0xe9, 0xdf, 0xf0, 0xe9, 0xdf, 0xf0, 0xe9, 0xdf, 0xf0,
0xe9, 0xdf, 0xf0, 0x0d, 0x0d, 0x0d, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff,
0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0x0d, 0x0d, 0x0d, 0xe1, 0xd2, 0xf7,
0xe1, 0xd2, 0xf7, 0xe1, 0xd2, 0xf7, 0xe1, 0xd2, 0xf7, 0xe1, 0xd2, 0xf7,
0x00, 0x00, 0x00, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff,
0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0x00, 0x00, 0x00,
0xca, 0xc7, 0xd2, 0xc5, 0xc4, 0xcd, 0xbf, 0xbf, 0xc7, 0xb8, 0xb9, 0xc0,
0xae, 0xaf, 0xb6, 0x6a, 0x6a, 0x6a, 0x00, 0x00, 0x00, 0xff, 0x00, 0xff,
0xff, 0x00, 0xff, 0x00, 0x00, 0x00, 0x6a, 0x6a, 0x6a, 0xd5, 0xa8, 0xe1,
0xd8, 0xb2, 0xe9, 0xd9, 0xb8, 0xed, 0xdb, 0xbd, 0xf0, 0xdc, 0xbf, 0xf1,
0x00, 0x00, 0x00, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff,
0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0x00, 0x00, 0x00,
0xa4, 0xa6, 0xac, 0xa8, 0xaa, 0xaf, 0xa0, 0xa6, 0xa8, 0x98, 0x9e, 0x9c,
0xa1, 0xa8, 0x9e, 0xb1, 0xb6, 0xa1, 0x6a, 0x6a, 0x6a, 0x0d, 0x0d, 0x0d,
0x0d, 0x0d, 0x0d, 0x6a, 0x6a, 0x6a, 0xc0, 0x8c, 0xad, 0xcc, 0x90, 0xb5,
0xd3, 0x94, 0xca, 0xd6, 0xa2, 0xdb, 0xd5, 0xa8, 0xe1, 0xcf, 0xa7, 0xdf,
0x00, 0x00, 0x00, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff,
0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff,
0x00, 0x00, 0x00, 0x98, 0x9f, 0x9b, 0xa1, 0xa8, 0x9e, 0xac, 0xb3, 0xa0,
0xb9, 0xb9, 0xa4, 0xd0, 0xb8, 0xa8, 0xc5, 0xb5, 0xb8, 0xb6, 0xbb, 0xad,
0xe3, 0xd7, 0xb5, 0xdd, 0xb4, 0xa9, 0xcb, 0x89, 0xac, 0xc0, 0x8c, 0xad,
0xc8, 0x91, 0xb5, 0xd1, 0x8d, 0xb7, 0xd3, 0x94, 0xca, 0x00, 0x00, 0x00,
0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff,
0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff,
0x00, 0x00, 0x00, 0xa1, 0xa7, 0x98, 0xb1, 0xb6, 0xa1, 0xbd, 0xb9, 0xa5,
0xd0, 0xb8, 0xa8, 0xca, 0xb5, 0xb7, 0xb8, 0xb1, 0xb1, 0xc2, 0xc8, 0xb2,
0xe3, 0xd7, 0xb5, 0xe1, 0xbf, 0xaf, 0xdb, 0x92, 0x9a, 0xbe, 0x82, 0xa6,
0xc0, 0x8c, 0xad, 0xc8, 0x91, 0xb4, 0xc7, 0x8b, 0xb0, 0x00, 0x00, 0x00,
0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff,
0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff,
0xff, 0x00, 0xff, 0x00, 0x00, 0x00, 0xbc, 0xb6, 0xa1, 0xd0, 0xb8, 0xa8,
0xcd, 0xb6, 0xb7, 0xc0, 0xb4, 0xb5, 0xb1, 0xb1, 0xaa, 0xca, 0xd1, 0xb4,
0xe3, 0xd7, 0xb5, 0xe2, 0xc1, 0xb0, 0xdb, 0xa8, 0xa3, 0xd2, 0x8a, 0xa9,
0xb7, 0x7e, 0xa2, 0xbd, 0x89, 0xa9, 0x00, 0x00, 0x00, 0xff, 0x00, 0xff,
0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff,
0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff,
0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0x00, 0x00, 0x00, 0xc9, 0xaf, 0xaf,
0xc5, 0xb5, 0xb8, 0xb8, 0xb1, 0xb1, 0xb6, 0xbb, 0xad, 0xd0, 0xd6, 0xb5,
0xe3, 0xd7, 0xb5, 0xe2, 0xbf, 0xaf, 0xdd, 0xb4, 0xa9, 0xdb, 0x92, 0x9a,
0xc6, 0x84, 0xa7, 0x00, 0x00, 0x00, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff,
0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff,
0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff,
0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0xac, 0xaa, 0xa6, 0xbd, 0xc3, 0xb0, 0xd2, 0xd7, 0xb5,
0xe3, 0xd7, 0xb5, 0xe2, 0xbf, 0xae, 0xdb, 0xb6, 0xa8, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff,
0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff,
0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff,
0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff,
0xff, 0x00, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x00, 0xff,
0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff,
0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff,
0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff,
0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff,
0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff,
0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff,
0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff,
0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff,
0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff,
0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff,
0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff,
0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff,
0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff,
0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff,
0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff,
0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff,
0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff,
0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff,
0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff,
0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0xff
};
static const char * book_open_xpm[] = {
"16 16 4 1",
" c None s None",
". c black",
"X c #808080",
"o c white",
" ",
" .. ",
" .Xo. ... ",
" .Xoo. ..oo. ",
" .Xooo.Xooo... ",
" .Xooo.oooo.X. ",
" .Xooo.Xooo.X. ",
" .Xooo.oooo.X. ",
" .Xooo.Xooo.X. ",
" .Xooo.oooo.X. ",
" .Xoo.Xoo..X. ",
" .Xo.o..ooX. ",
" .X..XXXXX. ",
" ..X....... ",
" .. ",
" "};
static const char * book_closed_xpm[] = {
"16 16 6 1",
" c None s None",
". c black",
"X c red",
"o c yellow",
"O c #808080",
"# c white",
" ",
" .. ",
" ..XX. ",
" ..XXXXX. ",
" ..XXXXXXXX. ",
".ooXXXXXXXXX. ",
"..ooXXXXXXXXX. ",
".X.ooXXXXXXXXX. ",
".XX.ooXXXXXX.. ",
" .XX.ooXXX..#O ",
" .XX.oo..##OO. ",
" .XX..##OO.. ",
" .X.#OO.. ",
" ..O.. ",
" .. ",
" "};
static const char * mini_page_xpm[] = {
"16 16 4 1",
" c None s None",
". c black",
"X c white",
"o c #808080",
" ",
" ....... ",
" .XXXXX.. ",
" .XoooX.X. ",
" .XXXXX.... ",
" .XooooXoo.o ",
" .XXXXXXXX.o ",
" .XooooooX.o ",
" .XXXXXXXX.o ",
" .XooooooX.o ",
" .XXXXXXXX.o ",
" .XooooooX.o ",
" .XXXXXXXX.o ",
" ..........o ",
" oooooooooo ",
" "};
static const char * gtk_mini_xpm[] = {
"15 20 17 1",
" c None",
". c #14121F",
"+ c #278828",
"@ c #9B3334",
"# c #284C72",
"$ c #24692A",
"% c #69282E",
"& c #37C539",
"* c #1D2F4D",
"= c #6D7076",
"- c #7D8482",
"; c #E24A49",
"> c #515357",
", c #9B9C9B",
"' c #2FA232",
") c #3CE23D",
"! c #3B6CCB",
" ",
" ***> ",
" >.*!!!* ",
" ***....#*= ",
" *!*.!!!**!!# ",
" .!!#*!#*!!!!# ",
" @%#!.##.*!!$& ",
" @;%*!*.#!#')) ",
" @;;@%!!*$&)'' ",
" @%.%@%$'&)$+' ",
" @;...@$'*'*)+ ",
" @;%..@$+*.')$ ",
" @;%%;;$+..$)# ",
" @;%%;@$$$'.$# ",
" %;@@;;$$+))&* ",
" %;;;@+$&)&* ",
" %;;@'))+> ",
" %;@'&# ",
" >%$$ ",
" >= "};
const gchar ** xpms[] = {
book_open_xpm,
book_closed_xpm,
mini_page_xpm,
gtk_mini_xpm,
NULL
};
static void
quit_func (GtkWidget *widget, gpointer dummy)
{
gtk_main_quit ();
}
static void
expose_func (GtkWidget *drawing_area, GdkEventExpose *event, gpointer data)
{
GdkPixbuf *pixbuf;
pixbuf = (GdkPixbuf *)g_object_get_data (G_OBJECT (drawing_area), "pixbuf");
if (gdk_pixbuf_get_has_alpha (pixbuf)) {
GdkPixbuf *dest;
gdk_window_set_back_pixmap (drawing_area->window, NULL, FALSE);
dest = gdk_pixbuf_new (GDK_COLORSPACE_RGB, FALSE, 8, event->area.width, event->area.height);
gdk_pixbuf_composite_color (pixbuf, dest,
0, 0, event->area.width, event->area.height,
-event->area.x, -event->area.y,
(double) drawing_area->allocation.width / gdk_pixbuf_get_width (pixbuf),
(double) drawing_area->allocation.height / gdk_pixbuf_get_height (pixbuf),
GDK_INTERP_BILINEAR, 255,
event->area.x, event->area.y, 16, 0xaaaaaa, 0x555555);
gdk_draw_pixbuf (drawing_area->window, drawing_area->style->fg_gc[GTK_STATE_NORMAL], dest,
0, 0, event->area.x, event->area.y,
event->area.width, event->area.height,
GDK_RGB_DITHER_NORMAL, event->area.x, event->area.y);
g_object_unref (dest);
} else {
gdk_draw_rgb_image (drawing_area->window,
drawing_area->style->white_gc,
event->area.x, event->area.y,
event->area.width,
event->area.height,
GDK_RGB_DITHER_NORMAL,
gdk_pixbuf_get_pixels (pixbuf)
+ (event->area.y * gdk_pixbuf_get_rowstride (pixbuf))
+ (event->area.x * gdk_pixbuf_get_n_channels (pixbuf)),
gdk_pixbuf_get_rowstride (pixbuf));
}
}
static void
config_func (GtkWidget *drawing_area, GdkEventConfigure *event, gpointer data)
{
#if 0
GdkPixbuf *pixbuf;
pixbuf = (GdkPixbuf *)g_object_get_data (G_OBJECT (drawing_area), "pixbuf");
if (((event->width) != gdk_pixbuf_get_width (pixbuf)) ||
((event->height) != gdk_pixbuf_get_height (pixbuf)))
gdk_pixbuf_scale (pixbuf, event->width, event->height);
#endif
}
static GtkWidget*
new_testrgb_window (GdkPixbuf *pixbuf, gchar *title)
{
GtkWidget *window;
GtkWidget *vbox;
GtkWidget *temp_box;
GtkWidget *button;
GtkWidget *drawing_area;
gint w, h;
g_return_val_if_fail (pixbuf != NULL, NULL);
w = gdk_pixbuf_get_width (pixbuf);
h = gdk_pixbuf_get_height (pixbuf);
window = g_object_new (gtk_window_get_type (),
"GtkObject::user_data", NULL,
"GtkWindow::type", GTK_WINDOW_TOPLEVEL,
"GtkWindow::title", title ? title : "testrgb",
"GtkWindow::allow_shrink", TRUE,
NULL);
g_signal_connect (window, "destroy",
G_CALLBACK (quit_func), NULL);
vbox = gtk_vbox_new (FALSE, 0);
if (title)
gtk_box_pack_start (GTK_BOX (vbox), gtk_label_new (title),
TRUE, TRUE, 0);
drawing_area = gtk_drawing_area_new ();
temp_box = gtk_hbox_new (FALSE, 0);
gtk_widget_set_size_request (GTK_WIDGET (drawing_area), w, h);
gtk_box_pack_start (GTK_BOX (temp_box), drawing_area, FALSE, FALSE, 0);
gtk_box_pack_start (GTK_BOX (vbox), temp_box, FALSE, FALSE, 0);
g_signal_connect (drawing_area, "expose_event",
G_CALLBACK (expose_func), NULL);
g_signal_connect (drawing_area, "configure_event",
G_CALLBACK (config_func), NULL);
g_object_set_data (G_OBJECT (drawing_area), "pixbuf", pixbuf);
gtk_widget_show (drawing_area);
button = gtk_button_new_with_label ("Quit");
gtk_box_pack_start (GTK_BOX (vbox), button, FALSE, FALSE, 0);
g_signal_connect_swapped (button, "clicked",
G_CALLBACK (gtk_widget_destroy), window);
gtk_widget_show (button);
gtk_container_add (GTK_CONTAINER (window), vbox);
gtk_widget_show_all (vbox);
gtk_widget_show (window);
return drawing_area;
}
static gint
update_timeout (gpointer data)
{
ProgressFileStatus *status = data;
gboolean done;
GError *error;
done = FALSE;
error = NULL;
if (!feof (status->imagefile)) {
gint nbytes;
nbytes = fread (status->buf, 1, status->readlen,
status->imagefile);
if (!gdk_pixbuf_loader_write (GDK_PIXBUF_LOADER (status->loader), status->buf, nbytes, &error)) {
g_warning ("Error writing to loader: %s",
error->message);
g_error_free (error);
done = TRUE;
}
}
else
done = TRUE;
if (done) {
/* ignoring errors, we should not do that. */
gdk_pixbuf_loader_close (GDK_PIXBUF_LOADER (status->loader), NULL);
gtk_widget_queue_draw (*status->rgbwin);
g_object_unref (status->loader);
fclose (status->imagefile);
g_free (status->buf);
}
return !done;
}
static void
progressive_prepared_callback (GdkPixbufLoader* loader, gpointer data)
{
GtkWidget** retloc = data;
GdkPixbuf* pixbuf;
pixbuf = gdk_pixbuf_loader_get_pixbuf (loader);
g_assert (pixbuf != NULL);
g_object_ref (pixbuf); /* for the RGB window */
*retloc = new_testrgb_window (pixbuf, "Progressive");
return;
}
static void
progressive_updated_callback (GdkPixbufLoader* loader, guint x, guint y, guint width, guint height, gpointer data)
{
GtkWidget** window_loc = data;
if (*window_loc != NULL)
gtk_widget_queue_draw_area (*window_loc,
x, y, width, height);
return;
}
static int readlen = 4096;
extern void pixbuf_init (void);
void size_func (GdkPixbufLoader *loader, gint width, gint height, gpointer data)
{
gdk_pixbuf_loader_set_size (loader, width*2, height*2);
}
int
main (int argc, char **argv)
{
int i;
int found_valid = FALSE;
GdkPixbuf *pixbuf;
GdkPixbufLoader *pixbuf_loader;
pixbuf_init ();
gtk_init (&argc, &argv);
/* gdk_rgb_set_verbose (TRUE);*/
gtk_widget_set_default_colormap (gdk_rgb_get_colormap ());
{
char *tbf_readlen = getenv ("TBF_READLEN");
if (tbf_readlen) readlen = atoi (tbf_readlen);
}
{
char *tbf_bps = getenv ("TBF_KBPS");
guint bps;
if (tbf_bps) {
bps = atoi (tbf_bps);
g_print ("Simulating %d kBytes/sec\n", bps);
readlen = (bps*1024)/10;
}
}
i = 1;
if (argc == 1) {
const gchar*** xpmp;
GError *error = NULL;
pixbuf = gdk_pixbuf_new_from_data (default_image, GDK_COLORSPACE_RGB, FALSE, 8,
DEFAULT_WIDTH, DEFAULT_HEIGHT, DEFAULT_WIDTH * 3,
NULL, NULL);
new_testrgb_window (pixbuf, NULL);
xpmp = xpms;
while (*xpmp) {
pixbuf = gdk_pixbuf_new_from_xpm_data (*xpmp);
new_testrgb_window (pixbuf, NULL);
++xpmp;
}
/* Test loading from inline data. */
pixbuf = gdk_pixbuf_new_from_inline (-1, apple_red, FALSE, &error);
if (!pixbuf)
{
fprintf (stderr, "failed to construct \"red apple\" pixbuf: %s\n",
error->message);
g_error_free (error);
}
else
new_testrgb_window (pixbuf, "Red apple from inlined RLE data");
pixbuf = gdk_pixbuf_new_from_inline (sizeof (gnome_foot), gnome_foot, TRUE, NULL);
new_testrgb_window (pixbuf, "GNOME Foot from inlined RLE data");
found_valid = TRUE;
} else {
for (i = 1; i < argc; i++) {
GError *error;
error = NULL;
pixbuf = gdk_pixbuf_new_from_file (argv[i], &error);
if (pixbuf == NULL) {
g_warning ("Error loading image: %s",
error->message);
g_error_free (error);
}
#if 0
pixbuf = gdk_pixbuf_rotate (pixbuf, 10.0);
#endif
if (pixbuf) {
new_testrgb_window (pixbuf, "File");
found_valid = TRUE;
}
}
#if 1
{
GtkWidget* rgb_window = NULL;
ProgressFileStatus status;
pixbuf_loader = gdk_pixbuf_loader_new ();
status.loader = pixbuf_loader;
status.rgbwin = &rgb_window;
status.buf = g_malloc (readlen);
#if 0
g_signal_connect (pixbuf_loader, "size_prepared",
G_CALLBACK (size_func), NULL);
#endif
g_signal_connect (pixbuf_loader, "area_prepared",
G_CALLBACK (progressive_prepared_callback),
&rgb_window);
g_signal_connect (pixbuf_loader, "area_updated",
G_CALLBACK (progressive_updated_callback),
&rgb_window);
status.imagefile = fopen (argv[1], "r");
g_assert (status.imagefile != NULL);
status.readlen = readlen;
status.timeout = gdk_threads_add_timeout (100, update_timeout, &status);
}
#endif
}
if (found_valid)
gtk_main ();
return 0;
}

View File

@@ -29,7 +29,6 @@ IGNORE_HFILES= \
gdkpoly-generic.h \
keyname-table.h \
win32 \
directfb \
x11 \
quartz

View File

@@ -24,12 +24,9 @@
<xi:include href="xml/gdkscreen.xml" />
<xi:include href="xml/regions.xml" />
<xi:include href="xml/gcs.xml" />
<xi:include href="xml/drawing.xml" />
<xi:include href="xml/pixmaps.xml" />
<xi:include href="xml/rgb.xml" />
<xi:include href="xml/images.xml" />
<xi:include href="xml/pixbufs.xml" />
<xi:include href="xml/colors.xml" />

View File

@@ -52,7 +52,6 @@ gdk_error_trap_pop
GDK_WINDOWING_X11
GDK_WINDOWING_WIN32
GDK_WINDOWING_QUARTZ
GDK_WINDOWING_DIRECTFB
<SUBSECTION Standard>
GDK_TYPE_GRAB_STATUS
@@ -71,25 +70,17 @@ gdk_drag_protocol_get_type
gdk_event_mask_get_type
gdk_event_type_get_type
gdk_extension_mode_get_type
gdk_fill_get_type
gdk_fill_rule_get_type
gdk_filter_return_get_type
gdk_function_get_type
gdk_gc_values_mask_get_type
gdk_grab_ownership_get_type
gdk_grab_status_get_type
gdk_gravity_get_type
gdk_image_type_get_type
gdk_input_mode_get_type
gdk_input_source_get_type
gdk_join_style_get_type
gdk_line_style_get_type
gdk_modifier_type_get_type
gdk_notify_type_get_type
gdk_overlap_type_get_type
gdk_property_state_get_type
gdk_prop_mode_get_type
gdk_rgb_dither_get_type
gdk_scroll_direction_get_type
gdk_setting_action_get_type
gdk_status_get_type
@@ -129,6 +120,7 @@ gdk_display_beep
gdk_display_sync
gdk_display_flush
gdk_display_close
gdk_display_is_closed
gdk_display_list_devices
gdk_display_get_event
gdk_display_peek_event
@@ -201,8 +193,6 @@ gdk_screen_get_default_colormap
gdk_screen_set_default_colormap
gdk_screen_get_system_colormap
gdk_screen_get_system_visual
gdk_screen_get_rgb_colormap
gdk_screen_get_rgb_visual
gdk_screen_get_rgba_colormap
gdk_screen_get_rgba_visual
gdk_screen_is_composited
@@ -254,12 +244,6 @@ gdk_screen_get_type
<FILE>pixmaps</FILE>
GdkPixmap
gdk_pixmap_new
gdk_bitmap_create_from_data
gdk_pixmap_create_from_data
gdk_pixmap_create_from_xpm
gdk_pixmap_colormap_create_from_xpm
gdk_pixmap_create_from_xpm_d
gdk_pixmap_colormap_create_from_xpm_d
GdkBitmap
<SUBSECTION Standard>
@@ -277,77 +261,6 @@ GdkPixmapObject
GdkPixmapObjectClass
</SECTION>
<SECTION>
<TITLE>Images</TITLE>
<FILE>images</FILE>
GdkImage
gdk_image_new
GdkImageType
gdk_image_get_colormap
gdk_image_set_colormap
gdk_image_get_bits_per_pixel
gdk_image_get_bytes_per_pixel
gdk_image_get_bytes_per_line
gdk_image_get_byte_order
gdk_image_get_depth
gdk_image_get_height
gdk_image_get_image_type
gdk_image_get_visual
gdk_image_get_width
gdk_image_get_pixels
<SUBSECTION>
gdk_image_put_pixel
gdk_image_get_pixel
<SUBSECTION Standard>
GDK_IMAGE
GDK_TYPE_IMAGE
GDK_IS_IMAGE
GDK_IMAGE_CLASS
GDK_IMAGE_GET_CLASS
GDK_IS_IMAGE_CLASS
GDK_TYPE_IMAGE_TYPE
<SUBSECTION Private>
GdkImageClass
gdk_image_get_type
</SECTION>
<SECTION>
<TITLE>GdkRGB</TITLE>
<FILE>rgb</FILE>
<SUBSECTION>
gdk_draw_rgb_image
gdk_draw_rgb_image_dithalign
gdk_draw_indexed_image
gdk_draw_gray_image
gdk_draw_rgb_32_image
gdk_draw_rgb_32_image_dithalign
GdkRgbDither
<SUBSECTION>
gdk_rgb_cmap_new
gdk_rgb_cmap_free
GdkRgbCmap
<SUBSECTION>
gdk_rgb_find_color
<SUBSECTION>
gdk_rgb_set_install
gdk_rgb_set_min_colors
gdk_rgb_get_visual
gdk_rgb_get_colormap
gdk_rgb_ditherable
gdk_rgb_colormap_ditherable
gdk_rgb_set_verbose
<SUBSECTION Standard>
GDK_TYPE_RGB_DITHER
</SECTION>
<SECTION>
<TITLE>Pixbufs</TITLE>
<FILE>pixbufs</FILE>
@@ -355,7 +268,7 @@ gdk_pixbuf_render_threshold_alpha
gdk_pixbuf_render_pixmap_and_mask
gdk_pixbuf_render_pixmap_and_mask_for_colormap
gdk_pixbuf_get_from_drawable
gdk_pixbuf_get_from_image
gdk_pixbuf_get_from_surface
</SECTION>
<SECTION>
@@ -368,7 +281,6 @@ gdk_colormap_get_system
gdk_colormap_alloc_colors
gdk_colormap_alloc_color
gdk_colormap_free_colors
gdk_colormap_query_color
gdk_colormap_get_visual
gdk_colormap_get_screen
gdk_color_copy
@@ -407,32 +319,6 @@ gdk_drawable_get_size
gdk_drawable_get_clip_region
gdk_drawable_get_visible_region
<SUBSECTION>
gdk_draw_point
gdk_draw_points
gdk_draw_line
gdk_draw_lines
gdk_draw_pixbuf
gdk_draw_segments
GdkSegment
gdk_draw_rectangle
gdk_draw_arc
gdk_draw_polygon
gdk_draw_trapezoids
GdkTrapezoid
gdk_draw_glyphs
gdk_draw_glyphs_transformed
gdk_draw_layout_line
gdk_draw_layout_line_with_colors
gdk_draw_layout
gdk_draw_layout_with_colors
<SUBSECTION>
gdk_draw_drawable
gdk_draw_image
gdk_drawable_get_image
gdk_drawable_copy_to_image
<SUBSECTION Standard>
GDK_DRAWABLE
GDK_DRAWABLE_GET_CLASS
@@ -445,69 +331,6 @@ GDK_IS_DRAWABLE_CLASS
GdkDrawableClass
</SECTION>
<SECTION>
<TITLE>Graphics Contexts</TITLE>
<FILE>gcs</FILE>
GdkGC
GdkGCValues
GdkGCValuesMask
GdkFunction
gdk_gc_new
gdk_gc_new_with_values
gdk_gc_get_screen
gdk_gc_set_values
gdk_gc_get_values
gdk_gc_set_foreground
gdk_gc_set_background
gdk_gc_set_rgb_fg_color
gdk_gc_set_rgb_bg_color
gdk_gc_set_function
gdk_gc_set_fill
GdkFill
gdk_gc_set_tile
gdk_gc_set_stipple
gdk_gc_set_ts_origin
gdk_gc_set_clip_origin
gdk_gc_set_clip_mask
gdk_gc_set_clip_rectangle
gdk_gc_set_clip_region
gdk_gc_set_subwindow
GdkSubwindowMode
gdk_gc_set_exposures
gdk_gc_set_line_attributes
GdkLineStyle
GdkCapStyle
GdkJoinStyle
gdk_gc_set_dashes
gdk_gc_copy
gdk_gc_set_colormap
gdk_gc_get_colormap
gdk_gc_offset
<SUBSECTION Standard>
GDK_GC
GDK_TYPE_GC
GDK_IS_GC
GDK_GC_CLASS
GDK_GC_GET_CLASS
GDK_IS_GC_CLASS
GDK_TYPE_CAP_STYLE
GDK_TYPE_FILL
GDK_TYPE_FILL_RULE
GDK_TYPE_FUNCTION
GDK_TYPE_GC_VALUES_MASK
GDK_TYPE_JOIN_STYLE
GDK_TYPE_LINE_STYLE
GDK_TYPE_SUBWINDOW_MODE
<SUBSECTION Private>
GdkGCClass
gdk_gc_get_type
</SECTION>
<SECTION>
<TITLE>Visuals</TITLE>
<FILE>visuals</FILE>
@@ -653,9 +476,8 @@ gdk_window_merge_child_input_shapes
gdk_window_set_static_gravities
gdk_window_set_title
gdk_window_set_background
gdk_window_get_background
gdk_window_set_back_pixmap
gdk_window_get_back_pixmap
gdk_window_get_background_pattern
GDK_PARENT_RELATIVE
gdk_window_set_cursor
gdk_window_get_cursor
@@ -817,40 +639,16 @@ GDK_TYPE_PROP_MODE
<SECTION>
<TITLE>Pango Interaction</TITLE>
<FILE>pango_interaction</FILE>
GdkPangoRenderer
GdkPangoRendererClass
gdk_pango_renderer_new
gdk_pango_renderer_get_default
gdk_pango_renderer_set_drawable
gdk_pango_renderer_set_gc
gdk_pango_renderer_set_stipple
gdk_pango_renderer_set_override_color
gdk_pango_context_get
gdk_pango_context_get_for_screen
GdkPangoAttrEmbossed
GdkPangoAttrEmbossColor
GdkPangoAttrStipple
gdk_pango_attr_emboss_color_new
gdk_pango_attr_embossed_new
gdk_pango_attr_stipple_new
gdk_pango_layout_get_clip_region
gdk_pango_layout_line_get_clip_region
<SUBSECTION Standard>
GDK_TYPE_PANGO_RENDERER
GDK_PANGO_RENDERER
GDK_IS_PANGO_RENDERER
GDK_PANGO_RENDERER_CLASS
GDK_IS_PANGO_RENDERER_CLASS
GDK_PANGO_RENDERER_GET_CLASS
<SUBSECTION Private>
gdk_pango_renderer_get_type
GdkPangoRendererPrivate
gdk_pango_context_get
gdk_pango_context_get_for_screen
</SECTION>
<SECTION>
<TITLE>Cairo Interaction</TITLE>
<FILE>cairo_interaction</FILE>
gdk_window_create_similar_surface
gdk_cairo_create
gdk_cairo_set_source_color
gdk_cairo_set_source_pixbuf
@@ -1147,6 +945,7 @@ gdk_cursor_new_from_name
gdk_cursor_new_for_display
gdk_cursor_get_display
gdk_cursor_get_image
gdk_cursor_get_cursor_type
gdk_cursor_ref
gdk_cursor_unref
@@ -1215,9 +1014,6 @@ GDK_PIXMAP_XID
GDK_DISPLAY_XDISPLAY
GDK_DRAWABLE_XDISPLAY
GDK_DRAWABLE_XID
GDK_IMAGE_XDISPLAY
GDK_IMAGE_XIMAGE
GDK_GC_XDISPLAY
GDK_COLORMAP_XDISPLAY
GDK_COLORMAP_XCOLORMAP
GDK_SCREEN_XDISPLAY
@@ -1226,8 +1022,6 @@ GDK_SCREEN_XSCREEN
GDK_VISUAL_XVISUAL
GDK_CURSOR_XCURSOR
GDK_CURSOR_XDISPLAY
GDK_GC_XGC
GDK_GC_GET_XGC
GDK_WINDOW_XWINDOW
gdkx_visual_get
gdk_pixmap_foreign_new
@@ -1265,14 +1059,10 @@ gdk_x11_display_set_cursor_theme
gdk_x11_register_standard_event_type
gdk_x11_drawable_get_xdisplay
gdk_x11_drawable_get_xid
gdk_x11_gc_get_xdisplay
gdk_x11_gc_get_xgc
gdk_x11_get_default_root_xwindow
gdk_x11_get_default_screen
gdk_x11_get_default_xdisplay
gdk_x11_grab_server
gdk_x11_image_get_xdisplay
gdk_x11_image_get_ximage
gdk_x11_screen_get_screen_number
gdk_x11_screen_get_xscreen
gdk_x11_ungrab_server

View File

@@ -5,9 +5,7 @@ gdk_display_manager_get_type
gdk_screen_get_type
gdk_drawable_get_type
gdk_window_object_get_type
gdk_pango_renderer_get_type
gdk_pixmap_get_type
gdk_gc_get_type
gdk_keymap_get_type
gdk_device_get_type
gdk_device_manager_get_type

View File

@@ -116,16 +116,6 @@ The colormap structure contains the following public fields.
@n_colors:
<!-- ##### FUNCTION gdk_colormap_query_color ##### -->
<para>
</para>
@colormap:
@pixel:
@result:
<!-- ##### FUNCTION gdk_colormap_get_visual ##### -->
<para>
</para>

View File

@@ -199,6 +199,15 @@ The standard cursors available.
@Returns:
<!-- ##### FUNCTION gdk_cursor_get_cursor_type ##### -->
<para>
</para>
@cursor:
@Returns:
<!-- ##### FUNCTION gdk_cursor_ref ##### -->
<para>

View File

@@ -127,293 +127,3 @@ or a #GdkWindow.
@Returns:
<!-- ##### FUNCTION gdk_draw_point ##### -->
<para>
</para>
@drawable:
@gc:
@x:
@y:
<!-- ##### FUNCTION gdk_draw_points ##### -->
<para>
</para>
@drawable:
@gc:
@points:
@n_points:
<!-- ##### FUNCTION gdk_draw_line ##### -->
<para>
</para>
@drawable:
@gc:
@x1_:
@y1_:
@x2_:
@y2_:
<!-- ##### FUNCTION gdk_draw_lines ##### -->
<para>
</para>
@drawable:
@gc:
@points:
lines.
@n_points:
<!-- ##### FUNCTION gdk_draw_pixbuf ##### -->
<para>
</para>
@drawable:
@gc:
@pixbuf:
@src_x:
@src_y:
@dest_x:
@dest_y:
@width:
@height:
@dither:
@x_dither:
@y_dither:
<!-- ##### FUNCTION gdk_draw_segments ##### -->
<para>
</para>
@drawable:
@gc:
@segs:
@n_segs:
<!-- ##### STRUCT GdkSegment ##### -->
<para>
Specifies the start and end point of a line for use by the gdk_draw_segments()
function.
</para>
@x1: the x coordinate of the start point.
@y1: the y coordinate of the start point.
@x2: the x coordinate of the end point.
@y2: the y coordinate of the end point.
<!-- ##### FUNCTION gdk_draw_rectangle ##### -->
<para>
</para>
<note>
<para>
</para>
</note>
@drawable:
@gc:
@filled:
@x:
@y:
@width:
@height:
<!-- ##### FUNCTION gdk_draw_arc ##### -->
<para>
</para>
@drawable:
@gc:
@filled:
@x:
@y:
@width:
@height:
@angle1:
@angle2:
<!-- ##### FUNCTION gdk_draw_polygon ##### -->
<para>
</para>
@drawable:
@gc:
@filled:
@points:
@n_points:
<!-- ##### FUNCTION gdk_draw_trapezoids ##### -->
<para>
</para>
@drawable:
@gc:
@trapezoids:
@n_trapezoids:
<!-- ##### STRUCT GdkTrapezoid ##### -->
<para>
Specifies a trapezpoid for use by the gdk_draw_trapezoids().
The trapezoids used here have parallel, horizontal top and
bottom edges.
</para>
@y1: the y coordinate of the start point.
@x11: the x coordinate of the top left corner
@x21: the x coordinate of the top right corner
@y2: the y coordinate of the end point.
@x12: the x coordinate of the bottom left corner
@x22: the x coordinate of the bottom right corner
<!-- ##### FUNCTION gdk_draw_glyphs ##### -->
<para>
</para>
@drawable:
@gc:
@font:
@x:
@y:
@glyphs:
<!-- ##### FUNCTION gdk_draw_glyphs_transformed ##### -->
<para>
</para>
@drawable:
@gc:
@matrix:
@font:
@x:
@y:
@glyphs:
<!-- ##### FUNCTION gdk_draw_layout_line ##### -->
<para>
</para>
@drawable:
@gc:
@x:
@y:
@line:
<!-- ##### FUNCTION gdk_draw_layout_line_with_colors ##### -->
<para>
</para>
@drawable:
@gc:
@x:
@y:
@line:
@foreground:
@background:
<!-- ##### FUNCTION gdk_draw_layout ##### -->
<para>
</para>
@drawable:
@gc:
@x:
@y:
@layout:
<!-- ##### FUNCTION gdk_draw_layout_with_colors ##### -->
<para>
</para>
@drawable:
@gc:
@x:
@y:
@layout:
@foreground:
@background:
<!-- ##### FUNCTION gdk_draw_drawable ##### -->
<para>
</para>
@drawable:
@gc:
@src:
@xsrc:
@ysrc:
@xdest:
@ydest:
@width:
@height:
<!-- ##### FUNCTION gdk_draw_image ##### -->
<para>
</para>
@drawable:
@gc:
@image:
@xsrc:
@ysrc:
@xdest:
@ydest:
@width:
@height:
<!-- ##### FUNCTION gdk_drawable_get_image ##### -->
<para>
</para>
@drawable:
@x:
@y:
@width:
@height:
@Returns:
<!-- ##### FUNCTION gdk_drawable_copy_to_image ##### -->
<para>
</para>
@drawable:
@image:
@src_x:
@src_y:
@dest_x:
@dest_y:
@width:
@height:
@Returns:

View File

@@ -382,8 +382,7 @@ union, 16-bit data uses the s array, and 32-bit data uses the l array.
<!-- ##### STRUCT GdkEventNoExpose ##### -->
<para>
Generated when the area of a #GdkDrawable being copied, with gdk_draw_drawable()
, was completely available.
Generated when the area of a #GdkDrawable being copied was completely available.
</para>
<para>
FIXME: add more here.

View File

@@ -1,427 +0,0 @@
<!-- ##### SECTION Title ##### -->
Graphics Contexts
<!-- ##### SECTION Short_Description ##### -->
Objects to encapsulate drawing properties
<!-- ##### SECTION Long_Description ##### -->
<para>
All drawing operations in GDK take a
<firstterm>graphics context</firstterm> (GC) argument.
A graphics context encapsulates information about
the way things are drawn, such as the foreground
color or line width. By using graphics contexts,
the number of arguments to each drawing call is
greatly reduced, and communication overhead is
minimized, since identical arguments do not need
to be passed repeatedly.
</para>
<para>
Most values of a graphics context can be set at
creation time by using gdk_gc_new_with_values(),
or can be set one-by-one using functions such
as gdk_gc_set_foreground(). A few of the values
in the GC, such as the dash pattern, can only
be set by the latter method.
</para>
<!-- ##### SECTION See_Also ##### -->
<para>
</para>
<!-- ##### SECTION Stability_Level ##### -->
<!-- ##### SECTION Image ##### -->
<!-- ##### STRUCT GdkGC ##### -->
<para>
The #GdkGC structure represents a graphics context.
It is an opaque structure with no user-visible
elements.
</para>
<!-- ##### STRUCT GdkGCValues ##### -->
<para>
The #GdkGCValues structure holds a set of values used
to create or modify a graphics context.
</para>
@foreground: the foreground color. Note that gdk_gc_get_values()
only sets the pixel value.
@background: the background color. Note that gdk_gc_get_values()
only sets the pixel value.
@font: the default font.
@function: the bitwise operation used when drawing.
@fill: the fill style.
@tile: the tile pixmap.
@stipple: the stipple bitmap.
@clip_mask: the clip mask bitmap.
@subwindow_mode: the subwindow mode.
@ts_x_origin: the x origin of the tile or stipple.
@ts_y_origin: the y origin of the tile or stipple.
@clip_x_origin: the x origin of the clip mask.
@clip_y_origin: the y origin of the clip mask.
@graphics_exposures: whether graphics exposures are enabled.
@line_width: the line width.
@line_style: the way dashed lines are drawn.
@cap_style: the way the ends of lines are drawn.
@join_style: the way joins between lines are drawn.
<!-- ##### ENUM GdkGCValuesMask ##### -->
<para>
A set of bit flags used to indicate which fields
#GdkGCValues structure are set.
</para>
@GDK_GC_FOREGROUND: the @foreground is set.
@GDK_GC_BACKGROUND: the @background is set.
@GDK_GC_FUNCTION: the @function is set.
@GDK_GC_FILL: the @fill is set.
@GDK_GC_TILE: the @tile is set.
@GDK_GC_STIPPLE: the @stipple is set.
@GDK_GC_CLIP_MASK: the @clip_mask is set.
@GDK_GC_SUBWINDOW: the @subwindow_mode is set.
@GDK_GC_TS_X_ORIGIN: the @ts_x_origin is set.
@GDK_GC_TS_Y_ORIGIN: the @ts_y_origin is set.
@GDK_GC_CLIP_X_ORIGIN: the @clip_x_origin is set.
@GDK_GC_CLIP_Y_ORIGIN: the @clip_y_origin is set.
@GDK_GC_EXPOSURES: the @graphics_exposures is set.
@GDK_GC_LINE_WIDTH: the @line_width is set.
@GDK_GC_LINE_STYLE: the @line_style is set.
@GDK_GC_CAP_STYLE: the @cap_style is set.
@GDK_GC_JOIN_STYLE: the @join_style is set.
<!-- ##### ENUM GdkFunction ##### -->
<para>
Determines how the bit values for the source pixels are combined with
the bit values for destination pixels to produce the final result. The
sixteen values here correspond to the 16 different possible 2x2 truth
tables. Only a couple of these values are usually useful; for colored
images, only %GDK_COPY, %GDK_XOR and %GDK_INVERT are generally
useful. For bitmaps, %GDK_AND and %GDK_OR are also useful.
</para>
@GDK_COPY: <literal>dst = src</literal>
@GDK_INVERT: <literal>dst = NOT dst</literal>
@GDK_XOR: <literal>dst = src XOR dst</literal>
@GDK_CLEAR: <literal>dst = 0</literal>
@GDK_AND: <literal>dst = dst AND src</literal>
@GDK_AND_REVERSE: <literal>dst = src AND (NOT dst)</literal>
@GDK_AND_INVERT: <literal>dst = (NOT src) AND dst</literal>
@GDK_NOOP: <literal>dst = dst</literal>
@GDK_OR: <literal>dst = src OR dst</literal>
@GDK_EQUIV: <literal>dst = (NOT src) XOR dst</literal>
@GDK_OR_REVERSE: <literal>dst = src OR (NOT dst)</literal>
@GDK_COPY_INVERT: <literal>dst = NOT src</literal>
@GDK_OR_INVERT: <literal>dst = (NOT src) OR dst</literal>
@GDK_NAND: <literal>dst = (NOT src) OR (NOT dst)</literal>
@GDK_NOR: <literal>dst = (NOT src) AND (NOT dst)</literal>
@GDK_SET: <literal>dst = 1</literal>
<!-- ##### FUNCTION gdk_gc_new ##### -->
<para>
</para>
@drawable:
@Returns:
<!-- ##### FUNCTION gdk_gc_new_with_values ##### -->
<para>
</para>
@drawable:
@values:
@values_mask:
@Returns:
<!-- ##### FUNCTION gdk_gc_get_screen ##### -->
<para>
</para>
@gc:
@Returns:
<!-- ##### FUNCTION gdk_gc_set_values ##### -->
<para>
</para>
@gc:
@values:
@values_mask:
<!-- ##### FUNCTION gdk_gc_get_values ##### -->
<para>
</para>
@gc:
@values:
<!-- ##### FUNCTION gdk_gc_set_foreground ##### -->
<para>
</para>
@gc:
@color:
<!-- ##### FUNCTION gdk_gc_set_background ##### -->
<para>
</para>
@gc:
@color:
<!-- ##### FUNCTION gdk_gc_set_rgb_fg_color ##### -->
<para>
</para>
@gc:
@color:
<!-- ##### FUNCTION gdk_gc_set_rgb_bg_color ##### -->
<para>
</para>
@gc:
@color:
<!-- ##### FUNCTION gdk_gc_set_function ##### -->
<para>
</para>
@gc:
@function:
<!-- ##### FUNCTION gdk_gc_set_fill ##### -->
<para>
</para>
@gc:
@fill:
<!-- ##### ENUM GdkFill ##### -->
<para>
Determines how primitives are drawn.
</para>
@GDK_SOLID: draw with the foreground color.
@GDK_TILED: draw with a tiled pixmap.
@GDK_STIPPLED: draw using the stipple bitmap. Pixels corresponding
to bits in the stipple bitmap that are set will be drawn in the
foreground color; pixels corresponding to bits that are
not set will be left untouched.
@GDK_OPAQUE_STIPPLED: draw using the stipple bitmap. Pixels corresponding
to bits in the stipple bitmap that are set will be drawn in the
foreground color; pixels corresponding to bits that are
not set will be drawn with the background color.
<!-- ##### FUNCTION gdk_gc_set_tile ##### -->
<para>
</para>
@gc:
@tile:
<!-- ##### FUNCTION gdk_gc_set_stipple ##### -->
<para>
</para>
@gc:
@stipple:
<!-- ##### FUNCTION gdk_gc_set_ts_origin ##### -->
<para>
</para>
@gc:
@x:
@y:
<!-- ##### FUNCTION gdk_gc_set_clip_origin ##### -->
<para>
</para>
@gc:
@x:
@y:
<!-- ##### FUNCTION gdk_gc_set_clip_mask ##### -->
<para>
</para>
@gc:
@mask:
<!-- ##### FUNCTION gdk_gc_set_clip_rectangle ##### -->
<para>
</para>
@gc:
@rectangle:
<!-- ##### FUNCTION gdk_gc_set_clip_region ##### -->
<para>
</para>
@gc:
@region:
<!-- ##### FUNCTION gdk_gc_set_subwindow ##### -->
<para>
</para>
@gc:
@mode:
<!-- ##### ENUM GdkSubwindowMode ##### -->
<para>
Determines how drawing onto a window will affect child
windows of that window.
</para>
@GDK_CLIP_BY_CHILDREN: only draw onto the window itself.
@GDK_INCLUDE_INFERIORS: draw onto the window and child windows.
<!-- ##### FUNCTION gdk_gc_set_exposures ##### -->
<para>
</para>
@gc:
@exposures:
<!-- ##### FUNCTION gdk_gc_set_line_attributes ##### -->
<para>
</para>
@gc:
@line_width:
@line_style:
@cap_style:
@join_style:
<!-- ##### ENUM GdkLineStyle ##### -->
<para>
Determines how lines are drawn.
</para>
@GDK_LINE_SOLID: lines are drawn solid.
@GDK_LINE_ON_OFF_DASH: even segments are drawn; odd segments are not drawn.
@GDK_LINE_DOUBLE_DASH: even segments are normally. Odd segments are drawn
in the background color if the fill style is %GDK_SOLID, or in the background
color masked by the stipple if the fill style is %GDK_STIPPLED.
<!-- ##### ENUM GdkCapStyle ##### -->
<para>
Determines how the end of lines are drawn.
</para>
@GDK_CAP_NOT_LAST: the same as %GDK_CAP_BUTT for lines of non-zero width.
for zero width lines, the final point on the line will not be drawn.
@GDK_CAP_BUTT: the ends of the lines are drawn squared off and extending
to the coordinates of the end point.
@GDK_CAP_ROUND: the ends of the lines are drawn as semicircles with the
diameter equal to the line width and centered at the end point.
@GDK_CAP_PROJECTING: the ends of the lines are drawn squared off and extending
half the width of the line beyond the end point.
<!-- ##### ENUM GdkJoinStyle ##### -->
<para>
Determines how the joins between segments of a polygon are drawn.
</para>
@GDK_JOIN_MITER: the sides of each line are extended to meet at an angle.
@GDK_JOIN_ROUND: the sides of the two lines are joined by a circular arc.
@GDK_JOIN_BEVEL: the sides of the two lines are joined by a straight line which
makes an equal angle with each line.
<!-- ##### FUNCTION gdk_gc_set_dashes ##### -->
<para>
</para>
@gc:
@dash_offset:
@dash_list:
@n:
<!-- ##### FUNCTION gdk_gc_copy ##### -->
<para>
</para>
@dst_gc:
@src_gc:
<!-- ##### FUNCTION gdk_gc_set_colormap ##### -->
<para>
</para>
@gc:
@colormap:
<!-- ##### FUNCTION gdk_gc_get_colormap ##### -->
<para>
</para>
@gc:
@Returns:
<!-- ##### FUNCTION gdk_gc_offset ##### -->
<para>
</para>
@gc:
@x_offset:
@y_offset:

View File

@@ -190,6 +190,15 @@ of an X display. All its fields are private and should not be accessed directly.
@display:
<!-- ##### FUNCTION gdk_display_is_closed ##### -->
<para>
</para>
@display:
@Returns:
<!-- ##### FUNCTION gdk_display_list_devices ##### -->
<para>

View File

@@ -113,24 +113,6 @@ when GDK gets multihead support.
@Returns:
<!-- ##### FUNCTION gdk_screen_get_rgb_colormap ##### -->
<para>
</para>
@screen:
@Returns:
<!-- ##### FUNCTION gdk_screen_get_rgb_visual ##### -->
<para>
</para>
@screen:
@Returns:
<!-- ##### FUNCTION gdk_screen_get_rgba_colormap ##### -->
<para>

View File

@@ -1,228 +0,0 @@
<!-- ##### SECTION Title ##### -->
Images
<!-- ##### SECTION Short_Description ##### -->
A client-side area for bit-mapped graphics
<!-- ##### SECTION Long_Description ##### -->
<para>
The #GdkImage type represents an area for drawing graphics.
It has now been superceded to a large extent by the much more flexible
<link linkend="gdk-GdkRGB">GdkRGB</link> functions.
</para>
<para>
To create an empty #GdkImage use gdk_image_new().
To create an image from part of a #GdkWindow use gdk_drawable_get_image().
</para>
<para>
The image can be manipulated with gdk_image_get_pixel() and
gdk_image_put_pixel(), or alternatively by changing the actual pixel data.
Though manipulating the pixel data requires complicated code to cope with
the different formats that may be used.
</para>
<para>
To draw a #GdkImage in a #GdkWindow or #GdkPixmap use gdk_draw_image().
</para>
<para>
To destroy a #GdkImage use g_object_unref().
</para>
<!-- ##### SECTION See_Also ##### -->
<para>
<variablelist>
<varlistentry>
<term><link linkend="gdk-Bitmaps-and-Pixmaps">Bitmaps and Pixmaps</link></term>
<listitem><para>
Graphics which are stored on the X Windows server.
Since these are stored on the server they can be drawn very quickly, and all
of the <link linkend="gdk-Drawing-Primitives">Drawing Primitives</link> can be
used to draw on them. Their main disadvantage is that manipulating individual
pixels can be very slow.
</para></listitem>
</varlistentry>
<varlistentry>
<term><link linkend="gdk-GdkRGB">GdkRGB</link></term>
<listitem><para>
Built on top of #GdkImage, this provides much more functionality,
including the dithering of colors to produce better output on low-color
displays.
</para></listitem>
</varlistentry>
</variablelist>
</para>
<!-- ##### SECTION Stability_Level ##### -->
<!-- ##### SECTION Image ##### -->
<!-- ##### STRUCT GdkImage ##### -->
<para>
The #GdkImage struct contains information on the image and the pixel data.
</para>
@parent_instance: the parent instance
<!-- ##### FUNCTION gdk_image_new ##### -->
<para>
Creates a new #GdkImage.
</para>
@type: the type of the #GdkImage, one of %GDK_IMAGE_NORMAL, %GDK_IMAGE_SHARED
and %GDK_IMAGE_FASTEST. %GDK_IMAGE_FASTEST is probably the best choice, since
it will try creating a %GDK_IMAGE_SHARED image first and if that fails it will
then use %GDK_IMAGE_NORMAL.
@visual: the #GdkVisual to use for the image.
@width: the width of the image in pixels.
@height: the height of the image in pixels.
@Returns: a new #GdkImage, or %NULL if the image could not be created.
<!-- ##### ENUM GdkImageType ##### -->
<para>
Specifies the type of a #GdkImage.
</para>
@GDK_IMAGE_NORMAL: The original X image type, which is quite slow since the
image has to be transferred from the client to the server to display it.
@GDK_IMAGE_SHARED: A faster image type, which uses shared memory to transfer
the image data between client and server. However this will only be available
if client and server are on the same machine and the shared memory extension
is supported by the server.
@GDK_IMAGE_FASTEST: Specifies that %GDK_IMAGE_SHARED should be tried first,
and if that fails then %GDK_IMAGE_NORMAL will be used.
<!-- ##### FUNCTION gdk_image_get_colormap ##### -->
<para>
</para>
@image:
@Returns:
<!-- ##### FUNCTION gdk_image_set_colormap ##### -->
<para>
</para>
@image:
@colormap:
<!-- ##### FUNCTION gdk_image_get_bits_per_pixel ##### -->
<para>
</para>
@image:
@Returns:
<!-- ##### FUNCTION gdk_image_get_bytes_per_pixel ##### -->
<para>
</para>
@image:
@Returns:
<!-- ##### FUNCTION gdk_image_get_bytes_per_line ##### -->
<para>
</para>
@image:
@Returns:
<!-- ##### FUNCTION gdk_image_get_byte_order ##### -->
<para>
</para>
@image:
@Returns:
<!-- ##### FUNCTION gdk_image_get_depth ##### -->
<para>
</para>
@image:
@Returns:
<!-- ##### FUNCTION gdk_image_get_height ##### -->
<para>
</para>
@image:
@Returns:
<!-- ##### FUNCTION gdk_image_get_image_type ##### -->
<para>
</para>
@image:
@Returns:
<!-- ##### FUNCTION gdk_image_get_visual ##### -->
<para>
</para>
@image:
@Returns:
<!-- ##### FUNCTION gdk_image_get_width ##### -->
<para>
</para>
@image:
@Returns:
<!-- ##### FUNCTION gdk_image_get_pixels ##### -->
<para>
</para>
@image:
@Returns:
<!-- ##### FUNCTION gdk_image_put_pixel ##### -->
<para>
Sets a pixel in a #GdkImage to a given pixel value.
</para>
@image: a #GdkImage.
@x: the x coordinate of the pixel to set.
@y: the y coordinate of the pixel to set.
@pixel: the pixel value to set.
<!-- ##### FUNCTION gdk_image_get_pixel ##### -->
<para>
Gets a pixel value at a specified position in a #GdkImage.
</para>
@image: a #GdkImage.
@x: the x coordinate of the pixel to get.
@y: the y coordinate of the pixel to get.
@Returns: the pixel value at the given position.

View File

@@ -238,6 +238,15 @@ Returns: %PANGO_DIRECTION_LTR or %PANGO_DIRECTION_RTL.
@Returns:
<!-- ##### FUNCTION gdk_keymap_get_num_lock_state ##### -->
<para>
</para>
@keymap:
@Returns:
<!-- ##### FUNCTION gdk_keymap_add_virtual_modifiers ##### -->
<para>

View File

@@ -25,11 +25,10 @@ linkend="PANGO-SCALE-CAPS">PANGO_SCALE</link> or the PANGO_PIXELS() macro.)
</para>
<para>
Rendering a Pango layout is done most simply with gdk_draw_layout();
you can also draw pieces of the layout with gdk_draw_layout() or
gdk_draw_glyphs(). #GdkPangoRenderer is a subclass of #PangoRenderer
that is used internally to implement these functions. Using it
directly or subclassing it can be useful in some cases. See the
#GdkPangoRenderer documentation for details.
you can also draw pieces of the layout with gdk_draw_layout().
#GdkPangoRenderer is a subclass of #PangoRenderer that is used internally
to implement these functions. Using it directly or subclassing it can be
useful in some cases. See the #GdkPangoRenderer documentation for details.
</para>
<example id="rotated-example">
<title>Using #GdkPangoRenderer to draw transformed text</title>
@@ -135,150 +134,6 @@ g_object_unref (gc);
<!-- ##### SECTION Image ##### -->
<!-- ##### STRUCT GdkPangoRenderer ##### -->
<para>
</para>
<!-- ##### ARG GdkPangoRenderer:screen ##### -->
<para>
</para>
<!-- ##### STRUCT GdkPangoRendererClass ##### -->
<para>
</para>
<!-- ##### FUNCTION gdk_pango_renderer_new ##### -->
<para>
</para>
@screen:
@Returns:
<!-- ##### FUNCTION gdk_pango_renderer_get_default ##### -->
<para>
</para>
@screen:
@Returns:
<!-- ##### FUNCTION gdk_pango_renderer_set_drawable ##### -->
<para>
</para>
@gdk_renderer:
@drawable:
<!-- ##### FUNCTION gdk_pango_renderer_set_gc ##### -->
<para>
</para>
@gdk_renderer:
@gc:
<!-- ##### FUNCTION gdk_pango_renderer_set_stipple ##### -->
<para>
</para>
@gdk_renderer:
@part:
@stipple:
<!-- ##### FUNCTION gdk_pango_renderer_set_override_color ##### -->
<para>
</para>
@gdk_renderer:
@part:
@color:
<!-- ##### FUNCTION gdk_pango_context_get ##### -->
<para>
</para>
@void:
@Returns:
<!-- ##### FUNCTION gdk_pango_context_get_for_screen ##### -->
<para>
</para>
@screen:
@Returns:
<!-- ##### STRUCT GdkPangoAttrEmbossed ##### -->
<para>
A Pango text attribute containing a embossed bitmap to be used when
rendering the text.
</para>
@attr: the #PangoAttribute.
@embossed: the embossed bitmap.
<!-- ##### STRUCT GdkPangoAttrEmbossColor ##### -->
<para>
A Pango text attribute specifying the color to emboss text with.
</para>
@attr: the #PangoAttribute
@color: the color
<!-- ##### STRUCT GdkPangoAttrStipple ##### -->
<para>
A Pango text attribute containing a stipple bitmap to be used when
rendering the text.
</para>
@attr: the #PangoAttribute.
@stipple: the stipple bitmap.
<!-- ##### FUNCTION gdk_pango_attr_emboss_color_new ##### -->
<para>
</para>
@color:
@Returns:
<!-- ##### FUNCTION gdk_pango_attr_embossed_new ##### -->
<para>
</para>
@embossed:
@Returns:
<!-- ##### FUNCTION gdk_pango_attr_stipple_new ##### -->
<para>
</para>
@stipple:
@Returns:
<!-- ##### FUNCTION gdk_pango_layout_get_clip_region ##### -->
<para>

View File

@@ -83,14 +83,13 @@ pixbufs, see the #GdkPixbuf API documentation.
@Returns:
<!-- ##### FUNCTION gdk_pixbuf_get_from_image ##### -->
<!-- ##### FUNCTION gdk_pixbuf_get_from_surface ##### -->
<para>
</para>
@dest:
@src:
@cmap:
@surface:
@src_x:
@src_y:
@dest_x:

View File

@@ -8,7 +8,7 @@ Offscreen drawables
<para>
Pixmaps are offscreen drawables. They can be drawn upon with the
standard drawing primitives, then copied to another drawable (such as
a #GdkWindow) with gdk_draw_drawable(). The depth of a pixmap
a #GdkWindow). The depth of a pixmap
is the number of bits per pixels. Bitmaps are simply pixmaps
with a depth of 1. (That is, they are monochrome bitmaps - each
pixel can be either on or off).
@@ -49,78 +49,6 @@ for the new pixmap. Can be %NULL if @depth is specified,
@Returns: the #GdkPixmap
<!-- ##### FUNCTION gdk_bitmap_create_from_data ##### -->
<para>
Creates a new bitmap from data in XBM format.
</para>
@drawable: a #GdkDrawable, used to determine default values
for the new pixmap. Can be %NULL, in which case the root
window is used.
@data: a pointer to the XBM data.
@width: the width of the new pixmap in pixels.
@height: the height of the new pixmap in pixels.
@Returns: the #GdkBitmap
<!-- ##### FUNCTION gdk_pixmap_create_from_data ##### -->
<para>
Create a two-color pixmap from data in XBM data.
</para>
@drawable: a #GdkDrawable, used to determine default values
for the new pixmap. Can be %NULL, if the depth is given.
@data: a pointer to the data.
@width: the width of the new pixmap in pixels.
@height: the height of the new pixmap in pixels.
@depth: the depth (number of bits per pixel) of the new pixmap.
@fg: the foreground color.
@bg: the background color.
@Returns: the #GdkPixmap
<!-- ##### FUNCTION gdk_pixmap_create_from_xpm ##### -->
@drawable:
@mask:
@transparent_color:
@filename:
@Returns:
<!-- ##### FUNCTION gdk_pixmap_colormap_create_from_xpm ##### -->
@drawable:
@colormap:
@mask:
@transparent_color:
@filename:
@Returns:
<!-- ##### FUNCTION gdk_pixmap_create_from_xpm_d ##### -->
@drawable:
@mask:
@transparent_color:
@data:
@Returns:
<!-- ##### FUNCTION gdk_pixmap_colormap_create_from_xpm_d ##### -->
@drawable:
@colormap:
@mask:
@transparent_color:
@data:
@Returns:
<!-- ##### TYPEDEF GdkBitmap ##### -->
<para>
An opaque structure representing an offscreen drawable of depth

View File

@@ -1,410 +0,0 @@
<!-- ##### SECTION Title ##### -->
GdkRGB
<!-- ##### SECTION Short_Description ##### -->
Renders RGB, grayscale, or indexed image data to a GdkDrawable
<!-- ##### SECTION Long_Description ##### -->
<para>
GdkRGB is a low-level module which renders RGB, grayscale, and indexed
colormap images to a #GdkDrawable. It does this as efficiently as
possible, handling issues such as colormaps, visuals, dithering,
temporary buffers, and so on. Most code should use the higher-level
#GdkPixbuf features in place of this module; for example,
gdk_draw_pixbuf() uses GdkRGB in its implementation.
</para>
<para>
GdkRGB allocates a color cube to use when rendering images. You can
set the threshold for installing colormaps with
gdk_rgb_set_min_colors(). The default is 5x5x5 (125). If a colorcube
of this size or larger can be allocated in the default colormap, then
that's done. Otherwise, GdkRGB creates its own private colormap.
Setting it to 0 means that it always tries to use the default
colormap, and setting it to 216 means that it always creates a private
one if it cannot allocate the 6x6x6 colormap in the default. If you
always want a private colormap (to avoid consuming too many colormap
entries for other apps, say), you can use
<literal>gdk_rgb_set_install(TRUE)</literal>.
Setting the value greater than 216 exercises a bug in older versions
of GdkRGB. Note, however, that setting it to 0 doesn't let you get
away with ignoring the colormap and visual - a colormap is always
created in grayscale and direct color modes, and the visual is changed
in cases where a "better" visual than the default is available.
</para>
<para>
If GDK is built with the Sun mediaLib library, the GdkRGB functions are
accelerated using mediaLib, which provides hardware acceleration on Intel,
AMD, and Sparc chipsets. If desired, mediaLib support can be turned off
by setting the GDK_DISABLE_MEDIALIB environment variable.
</para>
<example>
<title>A simple example program using GdkRGB</title>
<programlisting>
&num;include &lt;gtk/gtk.h&gt;
&num;define IMAGE_WIDTH 256
&num;define IMAGE_HEIGHT 256
guchar rgbbuf[IMAGE_WIDTH * IMAGE_HEIGHT * 3];
gboolean on_darea_expose (GtkWidget *widget,
GdkEventExpose *event,
gpointer user_data);
int
main (int argc, char *argv[])
{
GtkWidget *window, *darea;
gint x, y;
guchar *pos;
gtk_init (&amp;argc, &amp;argv);
window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
darea = gtk_drawing_area_new (<!-- -->);
gtk_widget_set_size_request (darea, IMAGE_WIDTH, IMAGE_HEIGHT);
gtk_container_add (GTK_CONTAINER (window), darea);
gtk_signal_connect (GTK_OBJECT (darea), "expose-event",
GTK_SIGNAL_FUNC (on_darea_expose), NULL);
gtk_widget_show_all (window);
/* Set up the RGB buffer. */
pos = rgbbuf;
for (y = 0; y &lt; IMAGE_HEIGHT; y++)
{
for (x = 0; x &lt; IMAGE_WIDTH; x++)
{
*pos++ = x - x % 32; /* Red. */
*pos++ = (x / 32) * 4 + y - y % 32; /* Green. */
*pos++ = y - y % 32; /* Blue. */
}
}
gtk_main (<!-- -->);
return 0;
}
gboolean
on_darea_expose (GtkWidget *widget,
GdkEventExpose *event,
gpointer user_data)
{
gdk_draw_rgb_image (widget->window, widget->style->fg_gc[GTK_STATE_NORMAL],
0, 0, IMAGE_WIDTH, IMAGE_HEIGHT,
GDK_RGB_DITHER_MAX, rgbbuf, IMAGE_WIDTH * 3);
return TRUE;
}
</programlisting>
</example>
<!-- ##### SECTION See_Also ##### -->
<para>
<variablelist>
<varlistentry>
<term>#GdkColor</term>
<listitem><para>The underlying GDK mechanism for allocating
colors.</para></listitem>
</varlistentry>
<varlistentry>
<term>#GdkPixbuf and gdk_draw_pixbuf()</term>
<listitem><para>Higher-level image handling.</para></listitem>
</varlistentry>
</variablelist>
</para>
<!-- ##### SECTION Stability_Level ##### -->
<!-- ##### SECTION Image ##### -->
<!-- ##### FUNCTION gdk_draw_rgb_image ##### -->
<para>
Draws an RGB image in the drawable. This is the core GdkRGB
function, and likely the only one you will need to use.
</para>
<para>
The @rowstride parameter allows for lines to be aligned more flexibly.
For example, lines may be allocated to begin on 32-bit boundaries,
even if the width of the rectangle is odd. Rowstride is also useful
when drawing a subrectangle of a larger image in memory. Finally, to
replicate the same line a number of times, the trick of setting
@rowstride to 0 is allowed.
</para>
<para>
In general, for 0 &lt;= i &lt; @width and 0 &lt;= j &lt; height,
the pixel (x + i, y + j) is colored with red value @rgb_buf[@j *
@rowstride + @i * 3], green value @rgb_buf[@j * @rowstride + @i * 3 +
1], and blue value @rgb_buf[@j * @rowstride + @i * 3 + 2].
</para>
@drawable: The #GdkDrawable to draw in (usually a #GdkWindow).
@gc: The graphics context (all GDK drawing operations require one; its
contents are ignored).
@x: The x coordinate of the top-left corner in the drawable.
@y: The y coordinate of the top-left corner in the drawable.
@width: The width of the rectangle to be drawn.
@height: The height of the rectangle to be drawn.
@dith: A #GdkRgbDither value, selecting the desired dither mode.
@rgb_buf: The pixel data, represented as packed 24-bit data.
@rowstride: The number of bytes from the start of one row in @rgb_buf to the
start of the next.
<!-- ##### FUNCTION gdk_draw_rgb_image_dithalign ##### -->
<para>
Draws an RGB image in the drawable, with an adjustment for dither alignment.
</para>
<para>
This function is useful when drawing dithered images into a window
that may be scrolled. Pixel (x, y) will be drawn dithered as if its
actual location is (x + @xdith, y + @ydith). Thus, if you draw an
image into a window using zero dither alignment, then scroll up one
pixel, subsequent draws to the window should have @ydith = 1.
</para>
<para>
Setting the dither alignment correctly allows updating of small parts
of the screen while avoiding visible "seams" between the different
dither textures.
</para>
@drawable: The #GdkDrawable to draw in (usually a #GdkWindow).
@gc: The graphics context.
@x: The x coordinate of the top-left corner in the drawable.
@y: The y coordinate of the top-left corner in the drawable.
@width: The width of the rectangle to be drawn.
@height: The height of the rectangle to be drawn.
@dith: A #GdkRgbDither value, selecting the desired dither mode.
@rgb_buf: The pixel data, represented as packed 24-bit data.
@rowstride: The number of bytes from the start of one row in @rgb_buf to the
start of the next.
@xdith: An x offset for dither alignment.
@ydith: A y offset for dither alignment.
<!-- ##### FUNCTION gdk_draw_indexed_image ##### -->
<para>
Draws an indexed image in the drawable, using a #GdkRgbCmap to assign
actual colors to the color indices.
</para>
@drawable: The #GdkDrawable to draw in (usually a #GdkWindow).
@gc: The graphics context.
@x: The x coordinate of the top-left corner in the drawable.
@y: The y coordinate of the top-left corner in the drawable.
@width: The width of the rectangle to be drawn.
@height: The height of the rectangle to be drawn.
@dith: A #GdkRgbDither value, selecting the desired dither mode.
@buf: The pixel data, represented as 8-bit color indices.
@rowstride: The number of bytes from the start of one row in @buf to the
start of the next.
@cmap: The #GdkRgbCmap used to assign colors to the color indices.
<!-- ##### FUNCTION gdk_draw_gray_image ##### -->
<para>
Draws a grayscale image in the drawable.
</para>
@drawable: The #GdkDrawable to draw in (usually a #GdkWindow).
@gc: The graphics context.
@x: The x coordinate of the top-left corner in the drawable.
@y: The y coordinate of the top-left corner in the drawable.
@width: The width of the rectangle to be drawn.
@height: The height of the rectangle to be drawn.
@dith: A #GdkRgbDither value, selecting the desired dither mode.
@buf: The pixel data, represented as 8-bit gray values.
@rowstride: The number of bytes from the start of one row in @buf to the
start of the next.
<!-- ##### FUNCTION gdk_draw_rgb_32_image ##### -->
<para>
Draws a padded RGB image in the drawable. The image is stored as one
pixel per 32-bit word. It is laid out as a red byte, a green byte, a
blue byte, and a padding byte.
</para>
<para>
It's unlikely that this function will give significant performance
gains in practice. In my experience, the performance gain from having
pixels aligned to 32-bit boundaries is cancelled out by the increased
memory bandwidth.
</para>
@drawable: The #GdkDrawable to draw in (usually a #GdkWindow).
@gc: The graphics context.
@x: The x coordinate of the top-left corner in the drawable.
@y: The y coordinate of the top-left corner in the drawable.
@width: The width of the rectangle to be drawn.
@height: The height of the rectangle to be drawn.
@dith: A #GdkRgbDither value, selecting the desired dither mode.
@buf: The pixel data, represented as padded 32-bit data.
@rowstride: The number of bytes from the start of one row in @buf to the
start of the next.
<!-- ##### FUNCTION gdk_draw_rgb_32_image_dithalign ##### -->
<para>
</para>
@drawable:
@gc:
@x:
@y:
@width:
@height:
@dith:
@buf:
@rowstride:
@xdith:
@ydith:
<!-- ##### ENUM GdkRgbDither ##### -->
<para>
Selects whether or not GdkRGB applies dithering
to the image on display.
</para>
<para>
Since GdkRGB currently only handles images with 8 bits per component,
dithering on 24 bit per pixel displays is a moot point.
</para>
@GDK_RGB_DITHER_NONE: Never use dithering.
@GDK_RGB_DITHER_NORMAL: Use dithering in 8 bits per pixel (and below)
only.
@GDK_RGB_DITHER_MAX: Use dithering in 16 bits per pixel and below.
<!-- ##### FUNCTION gdk_rgb_cmap_new ##### -->
<para>
Creates a new #GdkRgbCmap structure. The cmap maps color indexes to
RGB colors. If @n_colors is less than 256, then images containing
color values greater than or equal to @n_colors will produce undefined
results, including possibly segfaults.
</para>
@colors: The colors, represented as 0xRRGGBB integer values.
@n_colors: The number of colors in the cmap.
@Returns: The newly created #GdkRgbCmap
<!-- ##### FUNCTION gdk_rgb_cmap_free ##### -->
<para>
Frees the memory associated with a #GdkRgbCmap created by gdk_rgb_cmap_new().
</para>
@cmap: The #GdkRgbCmap to free.
<!-- ##### STRUCT GdkRgbCmap ##### -->
<para>
A private data structure which maps color indices to actual RGB
colors. This is used only for gdk_draw_indexed_image().
</para>
@colors: The colors, represented as 0xRRGGBB integer values.
@n_colors: The number of colors in the cmap.
<!-- ##### FUNCTION gdk_rgb_find_color ##### -->
<para>
</para>
@colormap:
@color:
<!-- ##### FUNCTION gdk_rgb_set_install ##### -->
<para>
If @install is %TRUE, directs GdkRGB to always install a new "private"
colormap rather than trying to find a best fit with the colors already
allocated. Ordinarily, GdkRGB will install a colormap only if a
sufficient cube cannot be allocated.
</para>
<para>
A private colormap has more colors, leading to better quality display,
but also leads to the dreaded "colormap flashing" effect.
</para>
@install: %TRUE to set install mode.
<!-- ##### FUNCTION gdk_rgb_set_min_colors ##### -->
<para>
Sets the minimum number of colors for the color cube. Generally,
GdkRGB tries to allocate the largest color cube it can. If it can't
allocate a color cube at least as large as @min_colors, it installs a
private colormap.
</para>
@min_colors: The minimum number of colors accepted.
<!-- ##### FUNCTION gdk_rgb_get_visual ##### -->
<para>
</para>
@void:
@Returns:
<!-- ##### FUNCTION gdk_rgb_get_colormap ##### -->
<para>
</para>
@void:
@Returns:
<!-- ##### FUNCTION gdk_rgb_ditherable ##### -->
<para>
Determines whether the preferred visual is ditherable. This function may be
useful for presenting a user interface choice to the user about which
dither mode is desired; if the display is not ditherable, it may make
sense to gray out or hide the corresponding UI widget.
</para>
@void:
@Returns: %TRUE if the preferred visual is ditherable.
<!-- ##### FUNCTION gdk_rgb_colormap_ditherable ##### -->
<para>
Determines whether the visual associated with @cmap is ditherable. This
function may be useful for presenting a user interface choice to the user
about which dither mode is desired; if the display is not ditherable, it may
make sense to gray out or hide the corresponding UI widget.
</para>
@cmap: a #GdkColormap
@Returns: %TRUE if the visual associated with @cmap is ditherable.
<!-- ##### FUNCTION gdk_rgb_set_verbose ##### -->
<para>
Sets the "verbose" flag. This is generally only useful for debugging.
</para>
@verbose: %TRUE if verbose messages are desired.

View File

@@ -17,14 +17,6 @@ of an RGB pixel may be in the top 8 bits of the pixel, or may be in the lower
4 bits.
</para>
<para>
Usually you can avoid thinking about visuals in GTK+. Visuals are useful to
interpret the contents of a #GdkImage, but you should avoid #GdkImage precisely
because its contents depend on the display hardware; use #GdkPixbuf instead, for
all but the most low-level purposes. Also, anytime you provide a #GdkColormap,
the visual is implied as part of the colormap (gdk_colormap_get_visual()), so
you won't have to provide a visual in addition.
</para>
<para>
There are several standard visuals. The visual returned
by gdk_visual_get_system() is the system's default
visual. gdk_rgb_get_visual() return the visual most
@@ -48,7 +40,7 @@ then %GDK_VISUAL_STATIC_GRAY.
<!-- ##### SECTION See_Also ##### -->
<para>
#GdkImage, #GdkColormap, #GdkRGB
#GdkColormap
</para>
<!-- ##### SECTION Stability_Level ##### -->

View File

@@ -97,33 +97,6 @@ Returns the X resource (window or pixmap) belonging to a #GdkDrawable.
@Returns: the ID of @win's X resource.
<!-- ##### MACRO GDK_IMAGE_XDISPLAY ##### -->
<para>
Returns the display of a #GdkImage.
</para>
@image: a #GdkImage.
@Returns: an Xlib <type>Display*</type>.
<!-- ##### MACRO GDK_IMAGE_XIMAGE ##### -->
<para>
Returns the X image belonging to a #GdkImage.
</para>
@image: a #GdkImage.
@Returns: an <type>XImage*</type>.
<!-- ##### MACRO GDK_GC_XDISPLAY ##### -->
<para>
Returns the display of a #GdkGC.
</para>
@gc: a #GdkGC.
@Returns: an Xlib <type>Display*</type>.
<!-- ##### MACRO GDK_COLORMAP_XDISPLAY ##### -->
<para>
Returns the display of a #GdkColormap.
@@ -197,24 +170,6 @@ Returns the display of a #GdkCursor.
@Returns: an Xlib <type>Display*</type>.
<!-- ##### MACRO GDK_GC_XGC ##### -->
<para>
Returns the X GC of a #GdkGC.
</para>
@gc: a #GdkGC.
@Returns: an Xlib <type>GC</type>.
<!-- ##### MACRO GDK_GC_GET_XGC ##### -->
<para>
Returns the X GC of a #GdkGC.
</para>
@gc: a #GdkGC.
@Returns: an Xlib <type>GC</type>.
<!-- ##### MACRO GDK_WINDOW_XWINDOW ##### -->
<para>
Another name for GDK_DRAWABLE_XID().
@@ -557,24 +512,6 @@ Another name for GDK_DRAWABLE_XID().
@Returns:
<!-- ##### FUNCTION gdk_x11_gc_get_xdisplay ##### -->
<para>
</para>
@gc:
@Returns:
<!-- ##### FUNCTION gdk_x11_gc_get_xgc ##### -->
<para>
</para>
@gc:
@Returns:
<!-- ##### FUNCTION gdk_x11_get_default_root_xwindow ##### -->
<para>
@@ -610,24 +547,6 @@ Another name for GDK_DRAWABLE_XID().
@void:
<!-- ##### FUNCTION gdk_x11_image_get_xdisplay ##### -->
<para>
</para>
@image:
@Returns:
<!-- ##### FUNCTION gdk_x11_image_get_ximage ##### -->
<para>
</para>
@image:
@Returns:
<!-- ##### FUNCTION gdk_x11_screen_get_screen_number ##### -->
<para>

View File

@@ -117,7 +117,6 @@ content_files = \
running.sgml \
building.sgml \
compiling.sgml \
directfb.sgml \
drawing-model.xml \
glossary.xml \
migrating-2to3.xml \

View File

@@ -337,14 +337,6 @@ How to compile GTK+ itself
<arg>--disable-shm</arg>
<arg>--enable-shm</arg>
</group>
<group>
<arg>--disable-xim</arg>
<arg>--enable-xim</arg>
</group>
<group>
<arg>--disable-xim-inst</arg>
<arg>--enable-xim-inst</arg>
</group>
<group>
<arg>--disable-xkb</arg>
<arg>--enable-xkb</arg>
@@ -369,7 +361,7 @@ How to compile GTK+ itself
<arg>--with-xinput=[no|yes]</arg>
</group>
<group>
<arg>--with-gdktarget=[x11|win32|quartz|directfb]</arg>
<arg>--with-gdktarget=[x11|win32|quartz]</arg>
</group>
<group>
<arg>--disable-introspection</arg>
@@ -471,30 +463,6 @@ How to compile GTK+ itself
</para>
</formalpara>
<formalpara>
<title><systemitem>--disable-xim</systemitem> and
<systemitem>--enable-xim</systemitem></title>
<para>
These options can be used to control whether GTK+ will
be compiled with support for XIM. (The X Input Method
extension, used for Japanese input.) The default is yes.
</para>
</formalpara>
<formalpara>
<title><systemitem>--disable-xim-inst</systemitem> and
<systemitem>--enable-xim-inst</systemitem></title>
<para>
These options determine whether GTK+ will use the
XIM instantiate callback.
The default is 'yes', unless the host system is Solaris,
where <function>XRegisterIMInstantiateCallback()</function>
seems to cause a segfault.
</para>
</formalpara>
<formalpara>
<title><systemitem>--disable-xkb</systemitem> and
<systemitem>--enable-xkb</systemitem></title>
@@ -583,8 +551,7 @@ How to compile GTK+ itself
Toggles between the supported backends for GDK.
The default is x11, unless the platform is Windows, in which
case the default is win32. Other supported backends are
the quartz backend for OS X, and the DirectFB backend
for the Linux framebuffer.
the quartz backend for OS X.
</para>
</formalpara>
<formalpara>

View File

@@ -1,44 +0,0 @@
<?xml version="1.0"?>
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN"
"http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd" [
]>
<refentry id="gtk-directfb">
<refmeta>
<refentrytitle>Using GTK+ on DirectFB</refentrytitle>
<manvolnum>3</manvolnum>
<refmiscinfo>GTK Library</refmiscinfo>
</refmeta>
<refnamediv>
<refname>Using GTK+ on DirectFB</refname>
<refpurpose>
DirectFB-specific aspects of using GTK+
</refpurpose>
</refnamediv>
<refsect1>
<title>Using GTK+ on DirectFB</title>
<para>
The DirectFB port of GTK+ is an implementation of GDK (and therefore GTK+)
on top of the <ulink url="http://www.directfb.org">DirectFB</ulink>
libraries.
</para>
<para>
Like the obsolete linux-fb port of GTK+, it runs on the Linux framebuffer,
but the DirectFB libraries provide additional features like hardware graphics
acceleration, input device handling and abstraction and an integrated windowing
system.
</para>
<refsect2><title>Build requirements</title>
<para>
Beyond the usual GTK+ build requirements, the DirectFB backend (obviously)
needs the DirectFB libraries (at least 0.9.21) and cairo compiled with
DirectFB support.
</para>
</refsect2>
</refsect1>
</refentry>

View File

@@ -119,7 +119,6 @@ that is, GUI components such as #GtkButton or #GtkTextView.
<xi:include href="x11.sgml" />
<xi:include href="windows.sgml" />
<xi:include href="osx.sgml" />
<xi:include href="directfb.sgml" />
<xi:include href="resources.sgml" />
<xi:include href="xml/question_index.sgml" />
<xi:include href="drawing-model.xml" />
@@ -140,7 +139,6 @@ that is, GUI components such as #GtkButton or #GtkTextView.
<xi:include href="xml/gtksettings.xml" />
<xi:include href="xml/gtkbindings.xml" />
<xi:include href="xml/gtkenums.xml" />
<xi:include href="xml/gtkgc.xml" />
<xi:include href="xml/gtkstyle.xml" />
<xi:include href="xml/gtkselection.xml" />
<xi:include href="xml/gtkfeatures.xml" />
@@ -428,7 +426,7 @@ that is, GUI components such as #GtkButton or #GtkTextView.
</partintro>
<xi:include href="xml/migrating-checklist.sgml" />
<xi:include href="migrating-2to3.xml" />
<xi:include href="xml/migrating-2to3.xml" />
</part>
<part>

View File

@@ -5,6 +5,7 @@
<FILE>gtkaboutdialog</FILE>
<TITLE>GtkAboutDialog</TITLE>
GtkAboutDialog
GtkLicense
gtk_about_dialog_new
gtk_about_dialog_get_program_name
gtk_about_dialog_set_program_name
@@ -18,6 +19,8 @@ gtk_about_dialog_get_license
gtk_about_dialog_set_license
gtk_about_dialog_get_wrap_license
gtk_about_dialog_set_wrap_license
gtk_about_dialog_get_license_type
gtk_about_dialog_set_license_type
gtk_about_dialog_get_website
gtk_about_dialog_set_website
gtk_about_dialog_get_website_label
@@ -421,7 +424,6 @@ gtk_aspect_frame_get_type
<FILE>gtkbbox</FILE>
<TITLE>GtkButtonBox</TITLE>
GtkButtonBox
GTK_BUTTONBOX_DEFAULT
gtk_button_box_new
gtk_button_box_get_layout
gtk_button_box_get_child_secondary
@@ -458,7 +460,6 @@ gtk_bin_get_type
<FILE>gtkbox</FILE>
<TITLE>GtkBox</TITLE>
GtkBox
GtkBoxChild
gtk_box_new
gtk_box_pack_start
gtk_box_pack_end
@@ -1155,6 +1156,8 @@ gtk_expander_set_use_markup
gtk_expander_get_use_markup
gtk_expander_set_label_widget
gtk_expander_get_label_widget
gtk_expander_set_label_fill
gtk_expander_get_label_fill
<SUBSECTION Standard>
GTK_TYPE_EXPANDER
GTK_EXPANDER_CLASS
@@ -1672,7 +1675,6 @@ GtkIconViewPrivate
GtkImage
GtkImageType
gtk_image_get_icon_set
gtk_image_get_image
gtk_image_get_pixbuf
gtk_image_get_pixmap
gtk_image_get_stock
@@ -1682,7 +1684,6 @@ gtk_image_get_gicon
gtk_image_get_storage_type
gtk_image_new_from_file
gtk_image_new_from_icon_set
gtk_image_new_from_image
gtk_image_new_from_pixbuf
gtk_image_new_from_pixmap
gtk_image_new_from_stock
@@ -1691,7 +1692,6 @@ gtk_image_new_from_icon_name
gtk_image_new_from_gicon
gtk_image_set_from_file
gtk_image_set_from_icon_set
gtk_image_set_from_image
gtk_image_set_from_pixbuf
gtk_image_set_from_pixmap
gtk_image_set_from_stock
@@ -2024,6 +2024,7 @@ GTK_MENU_BAR_CLASS
GTK_IS_MENU_BAR_CLASS
GTK_MENU_BAR_GET_CLASS
<SUBSECTION Private>
GtkMenuBarPrivate
gtk_menu_bar_get_type
</SECTION>
@@ -2144,6 +2145,7 @@ GTK_MESSAGE_DIALOG_CLASS
GTK_IS_MESSAGE_DIALOG_CLASS
GTK_MESSAGE_DIALOG_GET_CLASS
<SUBSECTION Private>
GtkMessageDialogPrivate
gtk_message_dialog_get_type
</SECTION>
@@ -2193,6 +2195,7 @@ GTK_MISC_CLASS
GTK_IS_MISC_CLASS
GTK_MISC_GET_CLASS
<SUBSECTION Private>
GtkMiscPrivate
gtk_misc_get_type
</SECTION>
@@ -2200,7 +2203,6 @@ gtk_misc_get_type
<FILE>gtknotebook</FILE>
<TITLE>GtkNotebook</TITLE>
GtkNotebook
GtkNotebookPage
gtk_notebook_new
gtk_notebook_append_page
gtk_notebook_append_page_menu
@@ -2238,6 +2240,8 @@ gtk_notebook_get_tab_label_text
gtk_notebook_get_tab_pos
gtk_notebook_get_tab_reorderable
gtk_notebook_get_tab_detachable
gtk_notebook_get_tab_hborder
gtk_notebook_get_tab_vborder
gtk_notebook_set_current_page
gtk_notebook_set_group
gtk_notebook_get_group
@@ -2255,6 +2259,7 @@ GTK_NOTEBOOK_GET_CLASS
<SUBSECTION Private>
gtk_notebook_get_type
GtkNotebookTab
GtkNotebookPrivate
</SECTION>
<SECTION>
@@ -2343,6 +2348,7 @@ GTK_PLUG_CLASS
GTK_IS_PLUG_CLASS
GTK_PLUG_GET_CLASS
<SUBSECTION Private>
GtkPlugPrivate
gtk_plug_get_type
</SECTION>
@@ -2373,6 +2379,7 @@ GTK_PROGRESS_BAR_CLASS
GTK_IS_PROGRESS_BAR_CLASS
GTK_PROGRESS_BAR_GET_CLASS
<SUBSECTION Private>
GtkProgressBarPrivate
gtk_progress_bar_get_type
</SECTION>
@@ -2418,6 +2425,7 @@ GTK_RADIO_BUTTON_CLASS
GTK_IS_RADIO_BUTTON_CLASS
GTK_RADIO_BUTTON_GET_CLASS
<SUBSECTION Private>
GtkRadioButtonPrivate
gtk_radio_button_get_type
</SECTION>
@@ -2441,6 +2449,7 @@ GTK_RADIO_MENU_ITEM_CLASS
GTK_IS_RADIO_MENU_ITEM_CLASS
GTK_RADIO_MENU_ITEM_GET_CLASS
<SUBSECTION Private>
GtkRadioMenuItemPrivate
gtk_radio_menu_item_get_type
</SECTION>
@@ -2644,8 +2653,6 @@ gtk_recent_manager_remove_item
gtk_recent_manager_lookup_item
gtk_recent_manager_has_item
gtk_recent_manager_move_item
gtk_recent_manager_get_limit
gtk_recent_manager_set_limit
gtk_recent_manager_get_items
gtk_recent_manager_purge_items
<SUBSECTION>
@@ -2726,6 +2733,7 @@ GTK_RULER_CLASS
GTK_IS_RULER_CLASS
GTK_RULER_GET_CLASS
<SUBSECTION Private>
GtkRulerPrivate
gtk_ruler_get_type
gtk_ruler_draw_ticks
gtk_ruler_draw_pos
@@ -2755,6 +2763,7 @@ GTK_SCALE_CLASS
GTK_IS_SCALE_CLASS
GTK_SCALE_GET_CLASS
<SUBSECTION Private>
GtkScalePrivate
gtk_scale_get_type
</SECTION>
@@ -2914,6 +2923,7 @@ GTK_SIZE_GROUP_CLASS
GTK_IS_SIZE_GROUP_CLASS
GTK_SIZE_GROUP_GET_CLASS
<SUBSECTION Private>
GtkSizeGroupPrivate
gtk_size_group_get_type
</SECTION>
@@ -2975,6 +2985,7 @@ GTK_SPIN_BUTTON_CLASS
GTK_IS_SPIN_BUTTON_CLASS
GTK_SPIN_BUTTON_GET_CLASS
<SUBSECTION Private>
GtkSpinButtonPrivate
gtk_spin_button_get_type
</SECTION>
@@ -3021,6 +3032,7 @@ GTK_STATUSBAR_CLASS
GTK_IS_STATUSBAR_CLASS
GTK_STATUSBAR_GET_CLASS
<SUBSECTION Private>
GtkStatusbarPrivate
gtk_statusbar_get_type
</SECTION>
@@ -3104,6 +3116,7 @@ GTK_TABLE_CLASS
GTK_IS_TABLE_CLASS
GTK_TABLE_GET_CLASS
<SUBSECTION Private>
GtkTablePrivate
GtkTableChild
GtkTableRowCol
gtk_table_get_type
@@ -3122,6 +3135,7 @@ GTK_TEAROFF_MENU_ITEM_CLASS
GTK_IS_TEAROFF_MENU_ITEM_CLASS
GTK_TEAROFF_MENU_ITEM_GET_CLASS
<SUBSECTION Private>
GtkTearoffMenuItemPrivate
gtk_tearoff_menu_item_get_type
</SECTION>
@@ -3216,6 +3230,7 @@ GTK_TEXT_BUFFER_CLASS
GTK_IS_TEXT_BUFFER_CLASS
GTK_TEXT_BUFFER_GET_CLASS
<SUBSECTION Private>
GtkTextBufferPrivate
gtk_text_buffer_get_type
GtkTextLogAttrCache
</SECTION>
@@ -3392,6 +3407,7 @@ GTK_TEXT_TAG_TABLE_CLASS
GTK_IS_TEXT_TAG_TABLE_CLASS
GTK_TEXT_TAG_TABLE_GET_CLASS
<SUBSECTION Private>
GtkTextTagTablePrivate
gtk_text_tag_table_get_type
</SECTION>
@@ -3481,6 +3497,7 @@ GTK_TEXT_CHILD_ANCHOR_CLASS
GTK_IS_TEXT_CHILD_ANCHOR_CLASS
GTK_TEXT_CHILD_ANCHOR_GET_CLASS
<SUBSECTION Private>
GtkTextViewPrivate
gtk_text_view_get_type
gtk_text_child_anchor_get_type
GtkTextBTree
@@ -4591,6 +4608,7 @@ GTK_LIST_STORE_CLASS
GTK_IS_LIST_STORE_CLASS
GTK_LIST_STORE_GET_CLASS
<SUBSECTION Private>
GtkListStorePrivate
gtk_list_store_get_type
</SECTION>
@@ -4647,6 +4665,7 @@ GTK_VIEWPORT_CLASS
GTK_IS_VIEWPORT_CLASS
GTK_VIEWPORT_GET_CLASS
<SUBSECTION Private>
GtkViewportPrivate
gtk_viewport_get_type
</SECTION>
@@ -5186,14 +5205,6 @@ GTK_INTERFACE_AGE
GTK_CHECK_VERSION
</SECTION>
<SECTION>
<FILE>gtkgc</FILE>
<TITLE>Graphics Contexts</TITLE>
gtk_gc_get
gtk_gc_release
</SECTION>
<SECTION>
<FILE>gtkstyle</FILE>
<TITLE>GtkStyle</TITLE>
@@ -5222,7 +5233,6 @@ gtk_paint_focus
gtk_paint_handle
gtk_paint_hline
gtk_paint_option
gtk_paint_polygon
gtk_paint_shadow
gtk_paint_shadow_gap
gtk_paint_slider
@@ -6304,12 +6314,14 @@ gtk_orientable_get_type
GtkSizeRequest
GtkSizeRequestIface
GtkSizeRequestMode
GtkRequestedSize
gtk_size_request_get_height
gtk_size_request_get_width
gtk_size_request_get_height_for_width
gtk_size_request_get_width_for_height
gtk_size_request_get_request_mode
gtk_size_request_get_size
gtk_distribute_natural_allocation
<SUBSECTION Standard>
GTK_SIZE_REQUEST
@@ -6333,6 +6345,7 @@ gtk_application_quit
gtk_application_set_action_group
gtk_application_get_window
gtk_application_add_window
gtk_application_get_windows
gtk_application_create_window
<SUBSECTION Standard>

View File

@@ -6,14 +6,69 @@
<title>Migrating from GTK+ 2.x to GTK+ 3</title>
<para>
There are a number of steps that you can take to prepare your GTK+ 2.x
application for the switch to GTK+ 3.
GTK+ 3 is a major new version of GTK+ that breaks both API and ABI
compared to GTK+ 2.x, which has remained API- and ABI-stable for a
long time. Thankfully, most of the changes are not hard to adapt to
and there are a number of steps that you can take to prepare your
GTK+ 2.x application for the switch to GTK+ 3. After that, there's
a small number of adjustments that you may have to do when you actually
switch your application to build against GTK+ 3.
</para>
<section>
<title>Only single includes</title>
<title>Preparation in GTK+ 2.x</title>
<para>
The steps outlined in the following sections assume that your
application is working with GTK+ 2.22, which is the final stable
release of GTK+ 2.x. It includes all the necessary APIs and tools
to help you port your application to GTK+ 3. If you are still using
an older version of GTK+ 2.x, you should first get your application
to build and work with 2.22.
</para>
<section>
<title>Do not include individual headers</title>
<para>
Make sure your program only include the toplevel headers:
With GTK+ 2.x it was common to include just the header files for
a few widgets that your application was using, which could lead
to problems with missing definitions, etc. GTK+ 3 tightens the
rules about which header files you are allowed to include directly.
The allowed header files are are
<variablelist>
<varlistentry>
<term><filename>gtk/gtk.h</filename></term>
<listitem>for GTK</listitem>
</varlistentry>
<varlistentry>
<term><filename>gtk/gtkunixprint.h</filename></term>
<listitem>for low-level, UNIX-specific printing functions</listitem>
</varlistentry>
<varlistentry>
<term><filename>gdk-pixbuf/gdk-pixbuf.h</filename></term>
<listitem>for GdkPixbuf</listitem>
</varlistentry>
<varlistentry>
<term><filename>gdk/gdk.h</filename></term>
<listitem>for GDK</listitem>
</varlistentry>
<varlistentry>
<term><filename>gdk/gdkx.h</filename></term>
<listitem>for GDK functions that are X11-specific</listitem>
</varlistentry>
<varlistentry>
<term><filename>gdk/gdkkeysyms.h</filename></term>
<listitem>if you need the GDK keysym definitions</listitem>
</varlistentry>
</variablelist>
(these relative paths are assuming that you are using the include
paths that are specified in the gtk+-2.0.pc file, as returned by
<literal>pkg-config --cflags gtk+-2.0.pc</literal>.)
</para>
<para>
To check that your application only includes the allowed headers,
you can use defines to disable inclusion of individual headers,
as follows:
<programlisting>
make CFLAGS+="-DG_DISABLE_SINGLE_INCLUDES -DGDK_PIXBUF_DISABLE_SINGLE_INCLUDES -DGTK_DISABLE_SINGLE_INCLUDES"
</programlisting>
@@ -23,8 +78,17 @@
<section>
<title>Do not use deprecated symbols</title>
<para>
Make sure your program doesn't use any functions that have been
deprecated in GTK+ 2.x:
Over the years, a number of functions, and in some cases, entire
widgets have been deprecated. These deprecations are clearly spelled
out in the API reference, with hints about the recommended replacements.
The API reference also includes an
<link linkend="api-index-deprecated">index</link> of all deprecated
symbols.
</para>
<para>
To verify that your program does not use any deprecated symbols,
you can use defines to remove deprecated symbols from the header files,
as follows:
<programlisting>
make CFLAGS+="-DG_DISABLE_DEPRECATED -DGDK_PIXBUF_DISABLE_DEPRECATED -DGDK_DISABLE_DEPRECATED -DGTK_DISABLE_DEPRECATED"
</programlisting>
@@ -32,23 +96,316 @@
</section>
<section>
<title>Use accessor functions instead direct access</title>
<title>Use accessor functions instead of direct access</title>
<para>
GTK+ 3 removes many implementation details and struct members from
its public headers. To ensure that your application does not have problems
with this, you define the preprocessor symbol GSEAL_ENABLE. This will
make the compiler catch all uses of direct access to struct fields so that
you can go through them one by one and replace them with a call to an
accessor function instead.
its public headers.
</para>
<para>
To ensure that your application does not have problems with this, you
define the preprocessor symbol <literal>GSEAL_ENABLE</literal>. This
will make the compiler catch all uses of direct access to struct fields
so that you can go through them one by one and replace them with a call
to an accessor function instead.
<programlisting>
make CFLAGS+="-DGSEAL_ENABLE"
</programlisting>
Starting with 2.90.4, GTK+'s .pc files turn on GSEAL_ENABLE by default.
</para>
</section>
<section>
<title>GTK+ Modules</title>
<title>Use cairo for drawing</title>
<para>
In GTK+ 3, the GDK drawing API (which closely mimics the X
drawing API, which is itself modeled after PostScript) has been
removed. All drawing in GTK+ 3 is done via cairo.
</para>
<para>
The #GdkGC and #GdkImage objects, as well as all the functions using
them are gone. This includes the <literal>gdk_draw_</literal> family
of functions like gdk_draw_rectangle() and gdk_draw_drawable(). As
#GdkGC is roughly equivalent to #cairo_t and #GdkImage was used for
drawing images to GdkDrawables, which cairo supports automatically,
a transition is usually straightforward.
</para>
<para>
The following examples show a few common drawing idioms used by
applications that have been ported to use cairo and how the code
was replaced.
</para>
<example>
<title>Drawing a GdkPixbuf onto a GdkDrawable</title>
<para>
Drawing a pixbuf onto a drawable used to be done like this:
<programlisting><![CDATA[
gdk_draw_pixbuf (window,
gtk_widget_get_style (widget)->black_gc,
pixbuf,
0, 0
x, y,
gdk_pixbuf_get_width (pixbuf),
gdk_pixbuf_get_height (pixbuf),
GDK_RGB_DITHER_NORMAL,
0, 0);
]]></programlisting>
Doing the same thing with cairo:
<programlisting><![CDATA[
cairo_t *cr = gdk_cairo_create (window);
gdk_cairo_set_source_pixbuf (cr, pixbuf, x, y);
cairo_paint (cr);
cairo_destroy (cr);
]]></programlisting>
Note that very similar code can be used for drawing pixmaps
by using gdk_cairo_set_source_pixmap() instead of
gdk_cairo_set_source_pixbuf().
</para>
</example>
<example>
<title>Drawing a tiled GdkPixmap to a GdkDrawable</title>
<para>
Tiled pixmaps are often used for drawing backgrounds.
Old code looked something like this:
<programlisting><![CDATA[
GdkGCValues gc_values;
GdkGC *gc;
/* setup */
gc = gtk_widget_get_style (widget)->black_gc;
gdk_gc_set_tile (gc, pixmap);
gdk_gc_set_fill (gc, GDK_TILED);
gdk_gc_set_ts_origin (gc, x_origin, y_origin);
/* use */
gdk_draw_rectangle (drawable, gc, TRUE, 0, 0, width, height);
/* restore */
gdk_gc_set_tile (gc, NULL);
gdk_gc_set_fill (gc, GDK_SOLID);
gdk_gc_set_ts_origin (gc, 0, 0);
]]></programlisting>
The equivalent cairo code looks like this:
<programlisting><![CDATA[
cairo_t *cr;
cr = gdk_cairo_create (drawable);
gdk_cairo_set_source_pixmap (cr, pixmap, x_origin, y_origin);
cairo_pattern_set_extend (cairo_get_source (cr), CAIRO_EXTEND_REPEAT);
cairo_rectangle (cr, 0, 0, width, height);
cairo_fill (cr);
cairo_destroy (cr);
]]></programlisting>
Again, you can exchange pixbufs and pixmaps by using
gdk_cairo_set_source_pixbuf() instead of
gdk_cairo_set_source_pixmap().
</para>
</example>
<example>
<title>Drawing a PangoLayout to a clipped area</title>
<para>
Drawing layouts clipped is often used to avoid overdraw or to
allow drawing selections. Code would have looked like this:
<programlisting><![CDATA[
GdkGC *gc;
/* setup */
gc = gtk_widget_get_style (widget)->text_gc[state];
gdk_gc_set_clip_rectangle (gc, &area);
/* use */
gdk_draw_layout (drawable, gc, x, y, layout);
/* restore */
gdk_gc_set_clip_rectangle (gc, NULL);
]]></programlisting>
With cairo, the same effect can be achieved using:
<programlisting><![CDATA[
cairo_t *cr;
cr = gdk_cairo_create (drawable);
/* clip */
gdk_cairo_rectangle (cr, &area);
cairo_clip (cr);
/* set the correct source color */
gdk_cairo_set_source_color (cr, &gtk_widget_get_style (widget)->text[state]);
/* draw the text */
cairo_move_to (cr, x, y);
pango_cairo_show_layout (cr, layout);
cairo_destroy (cr);
]]></programlisting>
Clipping using cairo_clip() is of course not restricted to text
rendering and can be used everywhere where GC clips were used.
And using gdk_cairo_set_source_color() with style colors should
be used in all the places where a styles GC was used to achieve
a particular color.
</para>
</example>
<section>
<title>what should you be aware of ?</title>
<formalpara><title>No more stippling</title>
<para>
Stippling is the usage of a bi-level mask, called a #GdkBitmap.
It was often used to achieve a checkerboard effect. You can use
cairo_mask() to achieve this effect. To get a checkerbox mask,
you can use code like this:
<programlisting><![CDATA[
static cairo_pattern_t *
gtk_color_button_get_checkered (void)
{
/* need to respect pixman's stride being a multiple of 4 */
static unsigned char data[8] = { 0xFF, 0x00, 0x00, 0x00,
0x00, 0xFF, 0x00, 0x00 };
cairo_surface_t *surface;
cairo_pattern_t *pattern;
surface = cairo_image_surface_create_for_data (data,
CAIRO_FORMAT_A8,
2, 2,
4);
pattern = cairo_pattern_create_for_surface (surface);
cairo_surface_destroy (surface);
cairo_pattern_set_extend (pattern, CAIRO_EXTEND_REPEAT);
cairo_pattern_set_filter (pattern, CAIRO_FILTER_NEAREST);
return pattern;
}
]]></programlisting>
Note that stippling looks very outdated in UIs, and is rarely
used in modern applications. All properties that made use of
stippling have been removed from GTK+ 3. Most prominently,
stippling is absent from text rendering, in particular #GtkTextTag.
</para>
</formalpara>
<formalpara><title>Using the the target drawable also as source or mask</title>
<para>
The gdk_draw_drawable() function allowed using the same drawable
as source and target. This was often used to achieve a scrolling
effect. Cairo does not allow this yet. You can however use
cairo_push_group() to get a different intermediate target that
you can copy to. So you can replace this code:
<programlisting><![CDATA[
gdk_draw_drawable (pixmap,
gc,
pixmap,
area.x + dx, area.y + dy,
area.x, area.y,
area.width, area.height);
]]></programlisting>
By using this code:
<programlisting><![CDATA[
cairo_t *cr = gdk_cairo_create (pixmap);
/* clipping restricts the intermediate surface's size, so it's a good idea
* to use it. */
gdk_cairo_rectangle (cr, &area);
cairo_clip (cr);
/* Now push a group to change the target */
cairo_push_group (cr);
gdk_cairo_set_source_pixmap (cr, pixmap, dx, dy);
cairo_paint (cr);
/* Now copy the intermediate target back */
cairo_pop_group_to_source (cr);
cairo_paint (cr);
cairo_destroy (cr);
]]></programlisting>
The cairo developers plan to add self-copies in the future to allow
exactly this effect, so you might want to keep up on cairo
development to be able to change your code.
</para>
</formalpara>
<formalpara><title>Using pango_cairo_show_layout() instead of gdk_draw_layout_with_colors()</title>
<para>
GDK provided a way to ignore the color attributes of text and use
a hardcoded text color with the gdk_draw_layout_with_colors()
function. This is often used to draw text shadows or selections.
Pangos cairo support does not yet provide this functionality. If
you use Pango layouts that change colors, the easiest way to achieve
a similar effect is using pango_cairo_layout_path() and cairo_fill()
instead of gdk_draw_layout_with_colors(). Note that this results in
a slightly uglier-looking text, as subpixel anti-aliasing is not
supported.
</para>
</formalpara>
</section>
</section>
</section>
<section>
<title>Changes that need to be done at the time of the switch</title>
<para>
This section outlines porting tasks that you need to tackle when
you get to the point that you actually build your application against
GTK+ 3. Making it possible to prepare for these in GTK+ 2.22 would
have been either impossible or impractical.
</para>
<section>
<title>Replace GdkRegion by cairo_region_t</title>
<para>
Starting with version 1.10, cairo provides a region API that is
equivalent to the GDK region API (which was itself copied from
the X server). Therefore, the region API has been removed in GTK+ 3.
</para>
<para>
Porting your application to the cairo region API should be a straight
find-and-replace task. Please refer to the following table:
<table>
<tgroup cols="2">
<thead>
<row><entry>GDK</entry><entry>cairo</entry></row>
</thead>
<tbody>
<row><entry>#GdkRegion</entry><entry>#cairo_region_t</entry></row>
<row><entry>#GdkRectangle</entry><entry>#cairo_rectangle_int_t</entry></row>
<row><entry>gdk_rectangle_intersect()</entry><entry>this function is still there</entry></row>
<row><entry>gdk_rectangle_union()</entry><entry>this function is still there</entry></row>
<row><entry>gdk_region_new()</entry><entry>cairo_region_create()</entry></row>
<row><entry>gdk_region_copy()</entry><entry>cairo_region_copy()</entry></row>
<row><entry>gdk_region_destroy()</entry><entry>cairo_region_destroy()</entry></row>
<row><entry>gdk_region_rectangle()</entry><entry>cairo_region_create_rectangle()</entry></row>
<row><entry>gdk_region_get_clipbox()</entry><entry>cairo_region_get_extents()</entry></row>
<row><entry>gdk_region_get_rectangles()</entry><entry>cairo_region_num_rectangles() and
cairo_region_get_rectangle()</entry></row>
<row><entry>gdk_region_empty()</entry><entry>cairo_region_is_empty()</entry></row>
<row><entry>gdk_region_equal()</entry><entry>cairo_region_equal()</entry></row>
<row><entry>gdk_region_point_in()</entry><entry>cairo_region_contains_point()</entry></row>
<row><entry>gdk_region_rect_in()</entry><entry>cairo_region_contains_rectangle()</entry></row>
<row><entry>gdk_region_offset()</entry><entry>cairo_region_translate()</entry></row>
<row><entry>gdk_region_union_with_rect()</entry><entry>cairo_region_union_rectangle()</entry></row>
<row><entry>gdk_region_intersect()</entry><entry>cairo_region_intersect()</entry></row>
<row><entry>gdk_region_union()</entry><entry>cairo_region_union()</entry></row>
<row><entry>gdk_region_subtract()</entry><entry>cairo_region_subtract()</entry></row>
<row><entry>gdk_region_xor()</entry><entry>cairo_region_xor()</entry></row>
<row><entry>gdk_region_shrink()</entry><entry>no replacement</entry></row>
<row><entry>gdk_region_polygon()</entry><entry>no replacement, use cairo paths instead</entry></row>
</tbody>
</tgroup>
</table>
</para>
</section>
<section>
<title>Prevent mixed linkage</title>
<para>
Linking against GTK+ 2.x and GTK+ 3 in the same process is problematic
and can lead to hard-to-diagnose crashes. The gtk_init() function in
both GTK+ 2.22 and in GTK+ 3 tries to detect this situation and abort
with a diagnostic message, but this check is not 100% reliable (e.g. if
the problematic linking happens only in loadable modules).
</para>
<para>
Direct linking of your application against both versions of GTK+ is
easy to avoid; the problem gets harder when your application is using
libraries that are themselves linked against some version of GTK+.
In that case, you have to verify that you are using a version of the
library that is linked against GTK+ 3.
</para>
<para>
If you are using packages provided by a distributor, it is likely that
parallel installable versions of the library exist for GTK+ 2.x and
GTK+ 3, e.g for vte, check for vte3; for webkitgtk look for webkitgtk3,
and so on.
</para>
</section>
<section>
<title>Install GTK+ modules in the right place</title>
<para>
Some software packages install loadable GTK+ modules such as theme engines,
gdk-pixbuf loaders or input methods. Since GTK+ 3 is parallel-installable
@@ -78,4 +435,7 @@
unhappiness and must be avoided.
</para>
</section>
</section>
</chapter>

View File

@@ -20,6 +20,7 @@ gtkrecentchooser.sgml
gtkrecentchooserdialog.sgml
gtkrecentchoosermenu.sgml
gtkrecentchooserwidget.sgml
gtkrecentmanager.sgml
gtkscalebutton.sgml
gtkseparator.sgml
gtkseparatormenuitem.sgml

View File

@@ -55,11 +55,14 @@ that drawing is implicitly clipped to the exposed area.
gboolean
expose_event_callback (GtkWidget *widget, GdkEventExpose *event, gpointer data)
{
gdk_draw_arc (widget->window,
widget->style->fg_gc[gtk_widget_get_state (widget)],
TRUE,
0, 0, widget->allocation.width, widget->allocation.height,
0, 64 * 360);
cairo_t *cr;
cr = gdk_cairo_create (event->window);
cairo_set_source_rgb (cr, 0.0, 0.0, 1.0);
cairo_paint (cr);
cairo_destroy (cr);
return TRUE;
}

View File

@@ -115,6 +115,11 @@ a &lt;child&gt; type attribute.
</para>
<!-- ##### ARG GtkExpander:label-fill ##### -->
<para>
</para>
<!-- ##### ARG GtkExpander:label-widget ##### -->
<para>
@@ -271,3 +276,21 @@ a &lt;child&gt; type attribute.
@Returns:
<!-- ##### FUNCTION gtk_expander_set_label_fill ##### -->
<para>
</para>
@expander:
@label_fill:
<!-- ##### FUNCTION gtk_expander_get_label_fill ##### -->
<para>
</para>
@expander:
@Returns:

View File

@@ -1,51 +0,0 @@
<!-- ##### SECTION Title ##### -->
Graphics Contexts
<!-- ##### SECTION Short_Description ##### -->
A shared pool of GdkGC objects
<!-- ##### SECTION Long_Description ##### -->
<para>
These functions provide access to a shared pool of #GdkGC objects.
When a new #GdkGC is needed, gtk_gc_get() is called with the required depth,
colormap and #GdkGCValues. If a #GdkGC with the required properties already
exists then that is returned. If not, a new #GdkGC is created.
When the #GdkGC is no longer needed, gtk_gc_release() should be called.
</para>
<!-- ##### SECTION See_Also ##### -->
<para>
</para>
<!-- ##### SECTION Stability_Level ##### -->
<!-- ##### SECTION Image ##### -->
<!-- ##### FUNCTION gtk_gc_get ##### -->
<para>
Gets a #GdkGC with the given depth, colormap and #GdkGCValues.
If a #GdkGC with the given properties already exists then it is returned,
otherwise a new #GdkGC is created.
The returned #GdkGC should be released with gtk_gc_release() when it is no
longer needed.
</para>
@depth: the depth of the #GdkGC to create.
@colormap: the #GdkColormap (FIXME: I don't know why this is needed).
@values: a #GdkGCValues struct containing settings for the #GdkGC.
@values_mask: a set of flags indicating which of the fields in @values has
been set.
@Returns: a #GdkGC.
<!-- ##### FUNCTION gtk_gc_release ##### -->
<para>
Releases a #GdkGC allocated using gtk_gc_get().
</para>
@gc: a #GdkGC.

View File

@@ -278,12 +278,6 @@ Emitted when the user or a function changes the current page.
</para>
<!-- ##### STRUCT GtkNotebookPage ##### -->
<para>
The #GtkNotebookPage is an opaque implementation detail of #GtkNotebook.
</para>
<!-- ##### FUNCTION gtk_notebook_new ##### -->
<para>
</para>
@@ -619,6 +613,24 @@ The #GtkNotebookPage is an opaque implementation detail of #GtkNotebook.
@Returns:
<!-- ##### FUNCTION gtk_notebook_get_tab_hborder ##### -->
<para>
</para>
@notebook:
@Returns:
<!-- ##### FUNCTION gtk_notebook_get_tab_vborder ##### -->
<para>
</para>
@notebook:
@Returns:
<!-- ##### FUNCTION gtk_notebook_set_current_page ##### -->
<para>

View File

@@ -1,482 +0,0 @@
<!-- ##### SECTION Title ##### -->
GtkRecentManager
<!-- ##### SECTION Short_Description ##### -->
Managing Recently Used Files
<!-- ##### SECTION Long_Description ##### -->
<para>
#GtkRecentManager provides a facility for adding, removing and
looking up recently used files. Each recently used file is
identified by its URI, and has meta-data associated to it, like
the names and command lines of the applications that have
registered it, the number of time each application has registered
the same file, the mime type of the file and whether the file
should be displayed only by the applications that have
registered it.
</para>
<para>
The #GtkRecentManager acts like a database of all the recently
used files. You can create new #GtkRecentManager objects, but
it is more efficient to use the standard recent manager for
the #GdkScreen so that informations about the recently used
files is shared with other people using them. In case the
default screen is being used, adding a new recently used
file is as simple as:
</para>
<informalexample>
<programlisting>
GtkRecentManager *manager;
manager = gtk_recent_manager_get_default ();
gtk_recent_manager_add_item (manager, file_uri);
</programlisting>
</informalexample>
While looking up a recently used file is as simple as:
<informalexample>
<programlisting>
GtkRecentManager *manager;
GtkRecentInfo *info;
GError *error = NULL;
manager = gtk_recent_manager_get_default ();
info = gtk_recent_manager_lookup_item (manager, file_uri, &amp;error);
if (error)
{
g_warning ("Could not find the file: &percnt;s", error-&gt;message);
g_error_free (error);
}
else
{
/* Use the info object */
gtk_recent_info_unref (info);
}
</programlisting>
</informalexample>
<para>
Recently used files are supported since GTK+ 2.10.
</para>
<!-- ##### SECTION See_Also ##### -->
<para>
</para>
<!-- ##### SECTION Stability_Level ##### -->
<!-- ##### SECTION Image ##### -->
<!-- ##### STRUCT GtkRecentManager ##### -->
<para>
Acts as a database of information about the list of recently
used files. Normally, you retrieve the recent manager for a
particular screen using gtk_recent_manager_get_for_screen()
and it will contain information about current recent manager
for that screen.</para>
<!-- ##### SIGNAL GtkRecentManager::changed ##### -->
<para>
</para>
@recentmanager: the object which received the signal.
<!-- ##### ARG GtkRecentManager:filename ##### -->
<para>
</para>
<!-- ##### ARG GtkRecentManager:limit ##### -->
<para>
</para>
<!-- ##### ARG GtkRecentManager:size ##### -->
<para>
</para>
<!-- ##### STRUCT GtkRecentInfo ##### -->
<para>
Contains informations found when looking up an entry of the
recently used files list.
</para>
<!-- ##### STRUCT GtkRecentData ##### -->
<para>
</para>
@display_name:
@description:
@mime_type:
@app_name:
@app_exec:
@groups:
@is_private:
<!-- ##### MACRO GTK_RECENT_MANAGER_ERROR ##### -->
<para>
The #GQuark used for #GtkRecentManagerError errors.
</para>
<!-- ##### ENUM GtkRecentManagerError ##### -->
<para>
</para>
@GTK_RECENT_MANAGER_ERROR_NOT_FOUND:
@GTK_RECENT_MANAGER_ERROR_INVALID_URI:
@GTK_RECENT_MANAGER_ERROR_INVALID_ENCODING:
@GTK_RECENT_MANAGER_ERROR_NOT_REGISTERED:
@GTK_RECENT_MANAGER_ERROR_READ:
@GTK_RECENT_MANAGER_ERROR_WRITE:
@GTK_RECENT_MANAGER_ERROR_UNKNOWN:
<!-- ##### FUNCTION gtk_recent_manager_new ##### -->
<para>
</para>
@void:
@Returns:
<!-- ##### FUNCTION gtk_recent_manager_get_default ##### -->
<para>
</para>
@void:
@Returns:
<!-- ##### FUNCTION gtk_recent_manager_add_item ##### -->
<para>
</para>
@manager:
@uri:
@Returns:
<!-- ##### FUNCTION gtk_recent_manager_add_full ##### -->
<para>
</para>
@manager:
@uri:
@recent_data:
@Returns:
<!-- ##### FUNCTION gtk_recent_manager_remove_item ##### -->
<para>
</para>
@manager:
@uri:
@error:
@Returns:
<!-- ##### FUNCTION gtk_recent_manager_lookup_item ##### -->
<para>
</para>
@manager:
@uri:
@error:
@Returns:
<!-- ##### FUNCTION gtk_recent_manager_has_item ##### -->
<para>
</para>
@manager:
@uri:
@Returns:
<!-- ##### FUNCTION gtk_recent_manager_move_item ##### -->
<para>
</para>
@manager:
@uri:
@new_uri:
@error:
@Returns:
<!-- ##### FUNCTION gtk_recent_manager_get_limit ##### -->
<para>
</para>
@manager:
@Returns:
<!-- ##### FUNCTION gtk_recent_manager_set_limit ##### -->
<para>
</para>
@manager:
@limit:
<!-- ##### FUNCTION gtk_recent_manager_get_items ##### -->
<para>
</para>
@manager:
@Returns:
<!-- ##### FUNCTION gtk_recent_manager_purge_items ##### -->
<para>
</para>
@manager:
@error:
@Returns:
<!-- ##### FUNCTION gtk_recent_info_ref ##### -->
<para>
</para>
@info:
@Returns:
<!-- ##### FUNCTION gtk_recent_info_unref ##### -->
<para>
</para>
@info:
<!-- ##### FUNCTION gtk_recent_info_get_uri ##### -->
<para>
</para>
@info:
@Returns:
<!-- ##### FUNCTION gtk_recent_info_get_display_name ##### -->
<para>
</para>
@info:
@Returns:
<!-- ##### FUNCTION gtk_recent_info_get_description ##### -->
<para>
</para>
@info:
@Returns:
<!-- ##### FUNCTION gtk_recent_info_get_mime_type ##### -->
<para>
</para>
@info:
@Returns:
<!-- ##### FUNCTION gtk_recent_info_get_added ##### -->
<para>
</para>
@info:
@Returns:
<!-- ##### FUNCTION gtk_recent_info_get_modified ##### -->
<para>
</para>
@info:
@Returns:
<!-- ##### FUNCTION gtk_recent_info_get_visited ##### -->
<para>
</para>
@info:
@Returns:
<!-- ##### FUNCTION gtk_recent_info_get_private_hint ##### -->
<para>
</para>
@info:
@Returns:
<!-- ##### FUNCTION gtk_recent_info_get_application_info ##### -->
<para>
</para>
@info:
@app_name:
@app_exec:
@count:
@time_:
@Returns:
<!-- ##### FUNCTION gtk_recent_info_get_applications ##### -->
<para>
</para>
@info:
@length:
@Returns:
<!-- ##### FUNCTION gtk_recent_info_last_application ##### -->
<para>
</para>
@info:
@Returns:
<!-- ##### FUNCTION gtk_recent_info_get_groups ##### -->
<para>
</para>
@info:
@length:
@Returns:
<!-- ##### FUNCTION gtk_recent_info_has_group ##### -->
<para>
</para>
@info:
@group_name:
@Returns:
<!-- ##### FUNCTION gtk_recent_info_has_application ##### -->
<para>
</para>
@info:
@app_name:
@Returns:
<!-- ##### FUNCTION gtk_recent_info_get_icon ##### -->
<para>
</para>
@info:
@size:
@Returns:
<!-- ##### FUNCTION gtk_recent_info_get_short_name ##### -->
<para>
</para>
@info:
@Returns:
<!-- ##### FUNCTION gtk_recent_info_get_uri_display ##### -->
<para>
</para>
@info:
@Returns:
<!-- ##### FUNCTION gtk_recent_info_get_age ##### -->
<para>
</para>
@info:
@Returns:
<!-- ##### FUNCTION gtk_recent_info_is_local ##### -->
<para>
</para>
@info:
@Returns:
<!-- ##### FUNCTION gtk_recent_info_exists ##### -->
<para>
</para>
@info:
@Returns:
<!-- ##### FUNCTION gtk_recent_info_match ##### -->
<para>
</para>
@info_a:
@info_b:
@Returns:

View File

@@ -84,16 +84,6 @@ It is working (with minor issues) since 2.8.
</para>
<!-- ##### ARG GtkTextTag:background-stipple ##### -->
<para>
</para>
<!-- ##### ARG GtkTextTag:background-stipple-set ##### -->
<para>
</para>
<!-- ##### ARG GtkTextTag:direction ##### -->
<para>
@@ -144,16 +134,6 @@ It is working (with minor issues) since 2.8.
</para>
<!-- ##### ARG GtkTextTag:foreground-stipple ##### -->
<para>
</para>
<!-- ##### ARG GtkTextTag:foreground-stipple-set ##### -->
<para>
</para>
<!-- ##### ARG GtkTextTag:indent ##### -->
<para>
@@ -418,7 +398,6 @@ modified directly.
@invisible:
@bg_full_height:
@editable:
@realized:
<!-- ##### FUNCTION gtk_text_tag_new ##### -->
<para>
@@ -466,8 +445,6 @@ modified directly.
@bg_color:
@fg_color:
@bg_stipple:
@fg_stipple:
@rise:
@underline:
@strikethrough:

View File

@@ -106,8 +106,7 @@ GtkWindow::default_width, GtkWindow::default_height:
- default_height is -1 if unset, or >= 0 if
a default height is set
GtkWindow::allow_grow, GtkWindow::resizable:
- equivalent properties; changing one notifies on the other
GtkWindow::resizable:
- if FALSE, we set the min size to the max size in the geometry
hints.
- If the app programmer has called gtk_window_set_geometry_hints()

View File

@@ -193,6 +193,7 @@ int main (int argc, char **argv)
for (node = toplevels; node; node = g_list_next (node))
{
GtkAllocation allocation;
GdkWindow *window;
WidgetInfo *info;
XID id;
@@ -202,13 +203,14 @@ int main (int argc, char **argv)
gtk_widget_show (info->window);
window = info->window->window;
window = gtk_widget_get_window (info->window);
gtk_widget_get_allocation (info->window, &allocation);
gtk_widget_show_now (info->window);
gtk_widget_queue_draw_area (info->window,
info->window->allocation.x, info->window->allocation.y,
info->window->allocation.width, info->window->allocation.height);
gdk_window_process_updates (info->window->window, TRUE);
allocation.x, allocation.y,
allocation.width, allocation.height);
gdk_window_process_updates (window, TRUE);
while (gtk_events_pending ())
{

View File

@@ -42,6 +42,7 @@ adjust_size_callback (WidgetInfo *info)
{
Window toplevel;
Window root;
GdkWindow *window;
gint tx;
gint ty;
guint twidth;
@@ -51,8 +52,9 @@ adjust_size_callback (WidgetInfo *info)
gint target_width = 0;
gint target_height = 0;
toplevel = find_toplevel_window (GDK_WINDOW_XID (info->window->window));
XGetGeometry (GDK_WINDOW_XDISPLAY (info->window->window),
window = gtk_widget_get_window (info->window);
toplevel = find_toplevel_window (GDK_WINDOW_XID (window));
XGetGeometry (GDK_WINDOW_XDISPLAY (window),
toplevel,
&root, &tx, &ty, &twidth, &theight, &tborder_width, &tdepth);
@@ -798,7 +800,7 @@ create_message_dialog (void)
GTK_MESSAGE_INFO,
GTK_BUTTONS_OK,
NULL);
gtk_window_set_icon_name (GTK_WINDOW (widget), "gtk-copy");
gtk_window_set_icon_name (GTK_WINDOW (widget), "edit-copy");
gtk_message_dialog_set_markup (GTK_MESSAGE_DIALOG (widget),
"<b>Message Dialog</b>\n\nWith secondary text");
return new_widget_info ("messagedialog", widget, ASIS);
@@ -823,11 +825,11 @@ create_about_dialog (void)
"copyright", "(C) 1997-2009 The GTK+ Team",
"website", "http://www.gtk.org",
"comments", "Program to demonstrate GTK+ functions.",
"logo-icon-name", "gtk-about",
"logo-icon-name", "help-about",
"title", "About GTK+ Code Demos",
"authors", authors,
NULL);
gtk_window_set_icon_name (GTK_WINDOW (widget), "gtk-about");
gtk_window_set_icon_name (GTK_WINDOW (widget), "help-about");
return new_widget_info ("aboutdialog", widget, ASIS);
}
@@ -995,11 +997,13 @@ static WidgetInfo *
create_volume_button (void)
{
GtkWidget *button, *widget;
GtkWidget *plus_button;
button = gtk_volume_button_new ();
gtk_scale_button_set_value (GTK_SCALE_BUTTON (button), 33);
/* Hack: get the private dock */
widget = gtk_scale_button_get_plus_button (GTK_SCALE_BUTTON (button))->parent->parent->parent;
plus_button = gtk_scale_button_get_plus_button (GTK_SCALE_BUTTON (button));
widget = gtk_widget_get_parent (gtk_widget_get_parent (gtk_widget_get_parent (plus_button)));
gtk_widget_show_all (widget);
return new_widget_info ("volumebutton", widget, ASIS);
}

View File

@@ -7599,7 +7599,6 @@ int main (int argc, char *argv[])
dialog = gtk_dialog_new ();
gtk_window_set_title (GTK_WINDOW (dialog), "GTKToolbar Tutorial");
gtk_widget_set_size_request (GTK_WIDGET (dialog), 600, 300);
GTK_WINDOW (dialog)->allow_shrink = TRUE;
/* typically we quit if someone tries to close us */
g_signal_connect (dialog, "delete-event",

View File

@@ -9,7 +9,7 @@ INTROSPECTION_COMPILER_ARGS = \
--includedir=.
SUBDIRS = $(gdktarget) . tests
DIST_SUBDIRS = win32 x11 quartz directfb tests
DIST_SUBDIRS = win32 x11 quartz tests
CLEANFILES =
@@ -81,8 +81,6 @@ gdk_public_h_sources = \
gdkdnd.h \
gdkdrawable.h \
gdkevents.h \
gdkgc.h \
gdkimage.h \
gdkinput.h \
gdkkeys.h \
gdkkeysyms.h \
@@ -91,7 +89,6 @@ gdk_public_h_sources = \
gdkpixmap.h \
gdkprivate.h \
gdkproperty.h \
gdkrgb.h \
gdkscreen.h \
gdkselection.h \
gdkspawn.h \
@@ -123,9 +120,7 @@ gdk_c_sources = \
gdkdnd.c \
gdkdraw.c \
gdkevents.c \
gdkgc.c \
gdkglobals.c \
gdkimage.c \
gdkkeys.c \
gdkkeyuni.c \
gdkoffscreenwindow.c \
@@ -134,7 +129,6 @@ gdk_c_sources = \
gdkpixbuf-render.c \
gdkpixmap.c \
gdkrectangle.c \
gdkrgb.c \
gdkscreen.c \
gdkselection.c \
gdkvisual.c \
@@ -161,10 +155,6 @@ common_sources = \
gdkmarshalers.c \
gdkmarshalers.h
libgdk_directfb_3_0_la_SOURCES = $(common_sources)
libgdk_directfb_3_0_la_LIBADD = directfb/libgdk-directfb.la $(GDK_DEP_LIBS)
libgdk_directfb_3_0_la_LDFLAGS = $(LDADD)
libgdk_x11_3_0_la_SOURCES = $(common_sources)
libgdk_x11_3_0_la_LIBADD = x11/libgdk-x11.la $(GDK_DEP_LIBS)
libgdk_x11_3_0_la_LDFLAGS = $(LDADD)
@@ -213,10 +203,8 @@ x11_introspection_files = \
x11/gdkdrawable-x11.c \
x11/gdkeventsource.c \
x11/gdkeventtranslator.c \
x11/gdkgc-x11.c \
x11/gdkgeometry-x11.c \
x11/gdkglobals-x11.c \
x11/gdkimage-x11.c \
x11/gdkim-x11.c \
x11/gdkinput.c \
x11/gdkkeys-x11.c \
@@ -294,7 +282,7 @@ endif
lib_LTLIBRARIES = $(gdktargetlib)
EXTRA_LTLIBRARIES = libgdk-x11-3.0.la libgdk-win32-3.0.la libgdk-quartz-3.0.la libgdk-directfb-3.0.la
EXTRA_LTLIBRARIES = libgdk-x11-3.0.la libgdk-win32-3.0.la libgdk-quartz-3.0.la
MAINTAINERCLEANFILES = $(gdk_built_sources) stamp-gdkenumtypes.h
EXTRA_DIST += $(gdk_built_sources)

View File

@@ -1,28 +0,0 @@
The GDK DirectFB backend was written by
Denis Oliver Kropp <dok@directfb.org>
Sven Neumann <neo@directfb.org>
Large parts of the code are based on other GDK backends
especially the linuxfb backend which was written mainly
by Alex Larsson <alexl@redhat.com>.
The upgrade to gtk 2.8.x was done by
Michael Emmel <mike.emmel@gmail.com>
Extensive help and support and code was recieved from the Debian
community especially the Debian installer team who bravely chose to
use the gdk directfb port for the graphical debian installer. In
particular
Attilio Fiandrotti <fiandro@tiscalinet.it>
Davide Viti <zinosat@tiscali.it>
for there tireless work bringing the backend from a small project to
stability.
And finally thanks to the Extremadura goverment for bringing the
directfb developers and debian installer team together for a workshop.

View File

@@ -1,59 +0,0 @@
## Makefile.am for gtk+/gdk/gdk-directfb
include $(top_srcdir)/Makefile.decl
libgdkincludedir = $(includedir)/gtk-3.0/gdk
INCLUDES = \
-DG_LOG_DOMAIN=\"Gdk-DirectFB\" \
-DGDK_COMPILATION \
-I$(top_srcdir) \
-I$(top_srcdir)/gdk \
-I$(top_builddir)/gdk \
-DG_DISABLE_DEPRECATED \
@GTK_DEBUG_FLAGS@ \
@GDK_DEP_CFLAGS@
LDADDS = \
@GDK_DEP_LIBS@
noinst_LTLIBRARIES = libgdk-directfb.la
libgdk_directfb_la_SOURCES = \
gdkapplaunchcontext-directfb.c \
gdkcolor-directfb.c \
gdkcursor-directfb.c \
gdkdnd-directfb.c \
gdkdisplay-directfb.c \
gdkdisplay-directfb.h \
gdkdrawable-directfb.c \
gdkevents-directfb.c \
gdkgc-directfb.c \
gdkgeometry-directfb.c \
gdkglobals-directfb.c \
gdkim-directfb.c \
gdkimage-directfb.c \
gdkinput-directfb.c \
gdkinput-directfb.h \
gdkkeys-directfb.c \
gdkmain-directfb.c \
gdkpixmap-directfb.c \
gdkprivate-directfb.h \
gdkproperty-directfb.c \
gdkscreen-directfb.c \
gdkselection-directfb.c \
gdkspawn-directfb.c \
gdktestutils-directfb.c \
gdkvisual-directfb.c \
gdkdirectfb.h \
gdkwindow-directfb.c \
gdkwindowid.c \
x-cursors.xbm
libgdkinclude_HEADERS = \
gdkdirectfb.h \
gdkprivate-directfb.h
EXTRA_DIST += AUTHORS README TODO
-include $(top_srcdir)/git.mk

View File

@@ -1,106 +0,0 @@
README for GDK-DirectFB
------------------------
This is the GDK backend that allows GTK to work on top of DirectFB.
Important:
The current code does not pass through directfb passed on the gtk
apps command line on to directfb you need to set the environment variable
DFBARGS.
Example:
export DFBARGS=system=sdl
DirectFB is a hardware abstraction layer on top of the Linux
frame buffer that provides drawing functions, a window stack and
support for input devices. The code you find here is a backend for
GDK, the drawing kit used by GTK+.
As DirectFB provides drawing functions, a windowing stack and manages
input devices, this is a lightweight GDK port. Some parts of GDK
require higher level drawing functions that are supported by
cairo on DirectFB.
GDK also uses some feature like bitmaps that do not map well to
modern graphics hardware and are for that reason not yet supported in
this snapshot. See the file TODO for a list of missing features.
If you want GTK+ to draw window decorations for you, edit the file
gtk/gtkwindow-decorate.c and uncomment the line that says
#define DECORATE_WINDOWS.
GTK+ application compiled with this version of GTK+ understand some
additional command-line options special to the DirectFB GDK backend:
--transparent-unfocused Makes unfocused windows translucent.
--argb-font Use ARGB surfaces for fonts, needed for some
broken hardware.
--glyph-surface-cache Lets you tune the size of the glyph cache,
the default is to cache glyphs from 8 faces.
--enable-color-keying This option turns on a hack that does the
following:
(1) It overrides the color used to draw the window background to
gdk_directfb_bg_color as defined in gdkprivate-directfb.h.
Note that the alpha value only takes effect if the window has
an alpha channel.
(2) It also draws all rectangles that are drawn in
gdk_directfb_bg_color_key in this color (gdk_directfb_bg_color).
This feature can be used to create windows with translucent background.
Additionally all DirectFB command-line options as described in the
directfbrc man-page are supported.
This version of GTK+ also introduces two new functions that are special
to the DirectFB version. You need to include gdk/gdkdirectfb.h to be
able to use them.
gdk_directfb_window_set_opacity (GdkWindow *window, guchar opacity));
This function sets the overall opacity for toplevel GDK windows.
gdk_directfb_visual_by_format (DFBSurfacePixelFormat pixel_format);
This function returns a GdkVisual for a DirectFB pixelformat and
thus gives you control over the window surface. If for example
you want to create a window with alpha channel you can use some
code like the following:
visual = gdk_directfb_visual_by_format (DSPF_ARGB);
cmap = gdk_colormap_new (visual, FALSE);
gtk_widget_push_colormap (cmap);
window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
gtk_widget_pop_colormap ();
g_object_unref (cmap);
Don't use these functions if you want to be able to compile your
application against GTK+-X11 or other GTK+ versions.
If you are developing a GTK+ application for GTK+-DirectFB make sure
you use the gtk+-directfb-2.0.pc file when calling pkg-config to get
the correct compiler and linker flags for GTK+-DirectFB:
pkg-config --cflags gtk+-directfb-2.0
pkg-config --libs gtk+-directfb-2.0
See the file TODO for a list of unimplemented features.
Detailed and up-to-date instructions on how to build a complete
set of GTK-DFB libraries is avalable in the WIKI of the DirectFB project
at the address
http://www.directfb.org/wiki/index.php/Projects:GTK_on_DirectFB
This library is free software; you can redistribute it and/or modify it
under the terms of the GNU Lesser General Public License as published
by the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.

View File

@@ -1,57 +0,0 @@
A list of missing things and known bugs in the DirectFB GDK backend:
- Implement more GDK drawing functions. The most important ones
(including XOR) do work now. Other drawing functions are rarely
used and would need support from DirectFB.
- Implemenent extended input devices. Shouldn't be too hard.
- Look into DND and selections. DND seems to work inside one
application at least.
- Consider using the recently added glyph cache in PangoFT2 to
implement our glyph surface cache. Probably limit the number
of cached glyphs or the size of the surface cache instead of
keeping all glyphs from a number of fonts in the cache.
Some things that will probably never happen:
- Line styles, joining and related stuff. We could use code from the
LinuxFB backend but it seems to be bloat for most applications.
Implementing dashed lines would probably make sense and shouldn't
be too hard.
- Bitmaps (they are partly supported) and masks. This stuff should
be entirely deprecated. Use real alpha channels instead!
This is a simple list of unimplemented function stubs and there file
to see the implementation check the x11 dir.
Its not started yet.
gdkcolor-directfb.c
gdkcursor-directfb.c
gdkdisplay-directfb.c
gdkdnd-directfb.c
gdkdrawable-directfb.c
gdkevents-directfb.c
gdkgc-directfb.c
gdkgeometry-directfb.c
gdkglobals-directfb.c
gdkimage-directfb.c
gdkim-directfb.c
gdkinput-directfb.c
gdkkeys-directfb.c
gdk_keymap_lookup_key
gdk_keyval_convert_case
gdkmain-directfb.c
gdkpixmap-directfb.c
gdkproperty-directfb.c
gdkscreen-directfb.c
gdkselection-directfb.c
gdkspawn-directfb.c
gdkvisual-directfb.c
gdkwindow-directfb.c
gdkwindowid.c
glyphsurfacecache.c
NOTES:
event filter callbacks missing see the x11 impl

View File

@@ -1,42 +0,0 @@
/* gdkapplaunchcontext-directfb.c - Gtk+ implementation for GAppLaunchContext
Copyright (C) 2007 Red Hat, Inc.
The Gnome Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public License as
published by the Free Software Foundation; either version 2 of the
License, or (at your option) any later version.
The Gnome Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Library General Public License for more details.
You should have received a copy of the GNU Library General Public
License along with the Gnome Library; see the file COPYING.LIB. If not,
write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA.
Author: Matthias Clasen <mclasen@redhat.com>
*/
#include "config.h"
#include "gdkapplaunchcontext.h"
char *
_gdk_windowing_get_startup_notify_id (GAppLaunchContext *context,
GAppInfo *info,
GList *files)
{
return NULL;
}
void
_gdk_windowing_launch_failed (GAppLaunchContext *context,
const char *startup_notify_id)
{
}

View File

@@ -1,511 +0,0 @@
/* GDK - The GIMP Drawing Kit
* Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
* Boston, MA 02111-1307, USA.
*/
/*
* Modified by the GTK+ Team and others 1997-2000. See the AUTHORS
* file for a list of people on the GTK+ Team.
*/
/*
* GTK+ DirectFB backend
* Copyright (C) 2001-2002 convergence integrated media GmbH
* Copyright (C) 2002 convergence GmbH
* Written by Denis Oliver Kropp <dok@convergence.de> and
* Sven Neumann <sven@convergence.de>
*/
#include "config.h"
#include "gdk.h"
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "gdkcolor.h"
#include "gdkinternals.h"
#include "gdkdirectfb.h"
#include "gdkprivate-directfb.h"
typedef struct {
GdkColorInfo *info;
IDirectFBPalette *palette;
} GdkColormapPrivateDirectFB;
static void gdk_colormap_finalize (GObject *object);
static gint gdk_colormap_alloc_pseudocolors (GdkColormap *colormap,
GdkColor *colors,
gint ncolors,
gboolean writeable,
gboolean best_match,
gboolean *success);
static void gdk_directfb_allocate_color_key (GdkColormap *colormap);
G_DEFINE_TYPE (GdkColormap, gdk_colormap, G_TYPE_OBJECT)
static void
gdk_colormap_init (GdkColormap *colormap)
{
colormap->size = 0;
colormap->colors = NULL;
colormap->windowing_data = NULL;
}
static void
gdk_colormap_class_init (GdkColormapClass *klass)
{
GObjectClass *object_class = G_OBJECT_CLASS (klass);
object_class->finalize = gdk_colormap_finalize;
}
static void
gdk_colormap_finalize (GObject *object)
{
GdkColormap *colormap = GDK_COLORMAP (object);
GdkColormapPrivateDirectFB *private = colormap->windowing_data;
g_free (colormap->colors);
if (private)
{
g_free (private->info);
if (private->palette)
private->palette->Release (private->palette);
g_free (private);
colormap->windowing_data = NULL;
}
G_OBJECT_CLASS (gdk_colormap_parent_class)->finalize (object);
}
GdkColormap*
gdk_colormap_new (GdkVisual *visual,
gboolean private_cmap)
{
GdkColormap *colormap;
gint i;
g_return_val_if_fail (visual != NULL, NULL);
colormap = g_object_new (gdk_colormap_get_type (), NULL);
colormap->visual = visual;
colormap->size = visual->colormap_size;
switch (visual->type)
{
case GDK_VISUAL_PSEUDO_COLOR:
{
IDirectFB *dfb = _gdk_display->directfb;
IDirectFBPalette *palette;
GdkColormapPrivateDirectFB *private;
DFBPaletteDescription dsc;
dsc.flags = DPDESC_SIZE;
dsc.size = colormap->size;
if (!dfb->CreatePalette (dfb, &dsc, &palette))
return NULL;
colormap->colors = g_new0 (GdkColor, colormap->size);
private = g_new0 (GdkColormapPrivateDirectFB, 1);
private->info = g_new0 (GdkColorInfo, colormap->size);
if (visual == gdk_visual_get_system())
{
/* save the first (transparent) palette entry */
private->info[0].ref_count++;
}
private->palette = palette;
colormap->windowing_data = private;
gdk_directfb_allocate_color_key (colormap);
}
break;
case GDK_VISUAL_STATIC_COLOR:
colormap->colors = g_new0 (GdkColor, colormap->size);
for (i = 0; i < colormap->size; i++)
{
GdkColor *color = colormap->colors + i;
color->pixel = i;
color->red = (i & 0xE0) << 8 | (i & 0xE0);
color->green = (i & 0x1C) << 11 | (i & 0x1C) << 3;
color->blue = (i & 0x03) << 14 | (i & 0x03) << 6;
}
break;
default:
break;
}
return colormap;
}
GdkScreen*
gdk_colormap_get_screen (GdkColormap *cmap)
{
return _gdk_screen;
}
GdkColormap*
gdk_screen_get_system_colormap (GdkScreen *screen)
{
static GdkColormap *colormap = NULL;
if (!colormap)
{
GdkVisual *visual = gdk_visual_get_system();
/* special case PSEUDO_COLOR to use the system palette */
if (visual->type == GDK_VISUAL_PSEUDO_COLOR)
{
GdkColormapPrivateDirectFB *private;
IDirectFBSurface *surface;
colormap = g_object_new (gdk_colormap_get_type (), NULL);
colormap->visual = visual;
colormap->size = visual->colormap_size;
colormap->colors = g_new0 (GdkColor, colormap->size);
private = g_new0 (GdkColormapPrivateDirectFB, 1);
private->info = g_new0 (GdkColorInfo, colormap->size);
surface=GDK_WINDOW_IMPL_DIRECTFB (
GDK_WINDOW_OBJECT (_gdk_parent_root)->impl)->drawable.surface;
surface->GetPalette (surface, &private->palette);
colormap->windowing_data = private;
/* save the first (transparent) palette entry */
private->info[0].ref_count++;
gdk_directfb_allocate_color_key (colormap);
}
else
{
colormap = gdk_colormap_new (visual, FALSE);
}
}
return colormap;
}
void
gdk_colormap_free_colors (GdkColormap *colormap,
const GdkColor *colors,
gint ncolors)
{
GdkColormapPrivateDirectFB *private;
gint i;
g_return_if_fail (GDK_IS_COLORMAP (colormap));
g_return_if_fail (colors != NULL);
private = colormap->windowing_data;
if (!private)
return;
for (i = 0; i < ncolors; i++)
{
gint index = colors[i].pixel;
if (index < 0 || index >= colormap->size)
continue;
if (private->info[index].ref_count)
private->info[index].ref_count--;
}
}
gint
gdk_colormap_alloc_colors (GdkColormap *colormap,
GdkColor *colors,
gint ncolors,
gboolean writeable,
gboolean best_match,
gboolean *success)
{
GdkVisual *visual;
gint i;
g_return_val_if_fail (GDK_IS_COLORMAP (colormap), 0);
g_return_val_if_fail (colors != NULL, 0);
g_return_val_if_fail (success != NULL, 0);
switch (colormap->visual->type)
{
case GDK_VISUAL_TRUE_COLOR:
visual = colormap->visual;
for (i = 0; i < ncolors; i++)
{
colors[i].pixel =
(((colors[i].red
>> (16 - visual->red_prec)) << visual->red_shift) +
((colors[i].green
>> (16 - visual->green_prec)) << visual->green_shift) +
((colors[i].blue
>> (16 - visual->blue_prec)) << visual->blue_shift));
success[i] = TRUE;
}
break;
case GDK_VISUAL_PSEUDO_COLOR:
return gdk_colormap_alloc_pseudocolors (colormap,
colors, ncolors,
writeable, best_match,
success);
break;
case GDK_VISUAL_STATIC_COLOR:
for (i = 0; i < ncolors; i++)
{
colors[i].pixel = (((colors[i].red & 0xE000) >> 8) |
((colors[i].green & 0xE000) >> 11) |
((colors[i].blue & 0xC000) >> 14));
success[i] = TRUE;
}
break;
default:
for (i = 0; i < ncolors; i++)
success[i] = FALSE;
break;
}
return 0;
}
void
gdk_colormap_query_color (GdkColormap *colormap,
gulong pixel,
GdkColor *result)
{
GdkVisual *visual;
g_return_if_fail (GDK_IS_COLORMAP (colormap));
visual = gdk_colormap_get_visual (colormap);
switch (visual->type)
{
case GDK_VISUAL_TRUE_COLOR:
result->red = 65535. *
(gdouble)((pixel & visual->red_mask) >> visual->red_shift) /
((1 << visual->red_prec) - 1);
result->green = 65535. *
(gdouble)((pixel & visual->green_mask) >> visual->green_shift) /
((1 << visual->green_prec) - 1);
result->blue = 65535. *
(gdouble)((pixel & visual->blue_mask) >> visual->blue_shift) /
((1 << visual->blue_prec) - 1);
break;
case GDK_VISUAL_STATIC_COLOR:
case GDK_VISUAL_PSEUDO_COLOR:
if (pixel >= 0 && pixel < colormap->size)
{
result->red = colormap->colors[pixel].red;
result->green = colormap->colors[pixel].green;
result->blue = colormap->colors[pixel].blue;
}
else
g_warning ("gdk_colormap_query_color: pixel outside colormap");
break;
case GDK_VISUAL_DIRECT_COLOR:
case GDK_VISUAL_GRAYSCALE:
case GDK_VISUAL_STATIC_GRAY:
/* unsupported */
g_assert_not_reached ();
break;
}
}
IDirectFBPalette *
gdk_directfb_colormap_get_palette (GdkColormap *colormap)
{
GdkColormapPrivateDirectFB *private;
g_return_val_if_fail (GDK_IS_COLORMAP (colormap), NULL);
private = colormap->windowing_data;
if (private && private->palette)
return private->palette;
else
return NULL;
}
static gint
gdk_colormap_alloc_pseudocolors (GdkColormap *colormap,
GdkColor *colors,
gint ncolors,
gboolean writeable,
gboolean best_match,
gboolean *success)
{
GdkColormapPrivateDirectFB *private = colormap->windowing_data;
IDirectFBPalette *palette;
gint i, j;
gint remaining = ncolors;
palette = private->palette;
for (i = 0; i < ncolors; i++)
{
guint index;
DFBColor lookup = { 0xFF,
colors[i].red >> 8,
colors[i].green >> 8,
colors[i].blue >> 8 };
success[i] = FALSE;
if (writeable)
{
/* look for an empty slot and allocate a new color */
for (j = 0; j < colormap->size; j++)
if (private->info[j].ref_count == 0)
{
index = j;
palette->SetEntries (palette, &lookup, 1, index);
private->info[index].flags = GDK_COLOR_WRITEABLE;
colors[i].pixel = index;
colormap->colors[index] = colors[i];
goto allocated;
}
}
else
{
palette->FindBestMatch (palette,
lookup.r, lookup.g, lookup.b, lookup.a,
&index);
if (index < 0 || index > colormap->size)
continue;
/* check if we have an exact (non-writeable) match */
if (private->info[index].ref_count &&
!(private->info[index].flags & GDK_COLOR_WRITEABLE))
{
DFBColor entry;
palette->GetEntries (palette, &entry, 1, index);
if (entry.a == 0xFF &&
entry.r == lookup.r && entry.g == lookup.g && entry.b == lookup.b)
{
colors[i].pixel = index;
goto allocated;
}
}
/* look for an empty slot and allocate a new color */
for (j = 0; j < colormap->size; j++)
if (private->info[j].ref_count == 0)
{
index = j;
palette->SetEntries (palette, &lookup, 1, index);
private->info[index].flags = 0;
colors[i].pixel = index;
colormap->colors[index] = colors[i];
goto allocated;
}
/* if that failed, use the best match */
if (best_match &&
!(private->info[index].flags & GDK_COLOR_WRITEABLE))
{
#if 0
g_print ("best match for (%d %d %d) ",
colormap->colors[index].red,
colormap->colors[index].green,
colormap->colors[index].blue);
#endif
colors[i].pixel = index;
goto allocated;
}
}
/* if we got here, all attempts failed */
continue;
allocated:
private->info[index].ref_count++;
#if 0
g_print ("cmap %p: allocated (%d %d %d) %d [%d]\n", colormap,
colors[i].red, colors[i].green, colors[i].blue, colors[i].pixel,
private->info[index].ref_count);
#endif
success[i] = TRUE;
remaining--;
}
return remaining;
}
/* dirty hack for color_keying */
static void
gdk_directfb_allocate_color_key (GdkColormap *colormap)
{
GdkColormapPrivateDirectFB *private = colormap->windowing_data;
IDirectFBPalette *palette = private->palette;
if (!gdk_directfb_enable_color_keying)
return;
palette->SetEntries (palette, &gdk_directfb_bg_color, 1, 255);
colormap->colors[255].pixel = 255;
colormap->colors[255].red = ((gdk_directfb_bg_color_key.r << 8)
| gdk_directfb_bg_color_key.r);
colormap->colors[255].green = ((gdk_directfb_bg_color_key.g << 8)
| gdk_directfb_bg_color_key.g);
colormap->colors[255].blue = ((gdk_directfb_bg_color_key.b << 8)
| gdk_directfb_bg_color_key.b);
private->info[255].ref_count++;
}

View File

@@ -1,546 +0,0 @@
/* GDK - The GIMP Drawing Kit
* Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
* Boston, MA 02111-1307, USA.
*/
/*
* Modified by the GTK+ Team and others 1997-2000. See the AUTHORS
* file for a list of people on the GTK+ Team.
*/
/*
* GTK+ DirectFB backend
* Copyright (C) 2001-2002 convergence integrated media GmbH
* Copyright (C) 2002 convergence GmbH
* Written by Denis Oliver Kropp <dok@convergence.de> and
* Sven Neumann <sven@convergence.de>
*/
#include "config.h"
#include "gdk.h"
#include "gdkdirectfb.h"
#include "gdkprivate-directfb.h"
#include "gdkcursor.h"
#include "x-cursors.xbm"
#include <directfb_version.h>
static struct {
const guchar *bits;
int width, height, hotx, hoty;
GdkCursor *cursor;
} stock_cursors[] = {
{X_cursor_bits, X_cursor_width, X_cursor_height, X_cursor_x_hot, X_cursor_y_hot},
{X_cursor_mask_bits, X_cursor_mask_width, X_cursor_mask_height, X_cursor_mask_x_hot, X_cursor_mask_y_hot},
{arrow_bits, arrow_width, arrow_height, arrow_x_hot, arrow_y_hot},
{arrow_mask_bits, arrow_mask_width, arrow_mask_height, arrow_mask_x_hot, arrow_mask_y_hot},
{based_arrow_down_bits, based_arrow_down_width, based_arrow_down_height, based_arrow_down_x_hot, based_arrow_down_y_hot},
{based_arrow_down_mask_bits, based_arrow_down_mask_width, based_arrow_down_mask_height, based_arrow_down_mask_x_hot, based_arrow_down_mask_y_hot},
{based_arrow_up_bits, based_arrow_up_width, based_arrow_up_height, based_arrow_up_x_hot, based_arrow_up_y_hot},
{based_arrow_up_mask_bits, based_arrow_up_mask_width, based_arrow_up_mask_height, based_arrow_up_mask_x_hot, based_arrow_up_mask_y_hot},
{boat_bits, boat_width, boat_height, boat_x_hot, boat_y_hot},
{boat_mask_bits, boat_mask_width, boat_mask_height, boat_mask_x_hot, boat_mask_y_hot},
{bogosity_bits, bogosity_width, bogosity_height, bogosity_x_hot, bogosity_y_hot},
{bogosity_mask_bits, bogosity_mask_width, bogosity_mask_height, bogosity_mask_x_hot, bogosity_mask_y_hot},
{bottom_left_corner_bits, bottom_left_corner_width, bottom_left_corner_height, bottom_left_corner_x_hot, bottom_left_corner_y_hot},
{bottom_left_corner_mask_bits, bottom_left_corner_mask_width, bottom_left_corner_mask_height, bottom_left_corner_mask_x_hot, bottom_left_corner_mask_y_hot},
{bottom_right_corner_bits, bottom_right_corner_width, bottom_right_corner_height, bottom_right_corner_x_hot, bottom_right_corner_y_hot},
{bottom_right_corner_mask_bits, bottom_right_corner_mask_width, bottom_right_corner_mask_height, bottom_right_corner_mask_x_hot, bottom_right_corner_mask_y_hot},
{bottom_side_bits, bottom_side_width, bottom_side_height, bottom_side_x_hot, bottom_side_y_hot},
{bottom_side_mask_bits, bottom_side_mask_width, bottom_side_mask_height, bottom_side_mask_x_hot, bottom_side_mask_y_hot},
{bottom_tee_bits, bottom_tee_width, bottom_tee_height, bottom_tee_x_hot, bottom_tee_y_hot},
{bottom_tee_mask_bits, bottom_tee_mask_width, bottom_tee_mask_height, bottom_tee_mask_x_hot, bottom_tee_mask_y_hot},
{box_spiral_bits, box_spiral_width, box_spiral_height, box_spiral_x_hot, box_spiral_y_hot},
{box_spiral_mask_bits, box_spiral_mask_width, box_spiral_mask_height, box_spiral_mask_x_hot, box_spiral_mask_y_hot},
{center_ptr_bits, center_ptr_width, center_ptr_height, center_ptr_x_hot, center_ptr_y_hot},
{center_ptr_mask_bits, center_ptr_mask_width, center_ptr_mask_height, center_ptr_mask_x_hot, center_ptr_mask_y_hot},
{circle_bits, circle_width, circle_height, circle_x_hot, circle_y_hot},
{circle_mask_bits, circle_mask_width, circle_mask_height, circle_mask_x_hot, circle_mask_y_hot},
{clock_bits, clock_width, clock_height, clock_x_hot, clock_y_hot},
{clock_mask_bits, clock_mask_width, clock_mask_height, clock_mask_x_hot, clock_mask_y_hot},
{coffee_mug_bits, coffee_mug_width, coffee_mug_height, coffee_mug_x_hot, coffee_mug_y_hot},
{coffee_mug_mask_bits, coffee_mug_mask_width, coffee_mug_mask_height, coffee_mug_mask_x_hot, coffee_mug_mask_y_hot},
{cross_bits, cross_width, cross_height, cross_x_hot, cross_y_hot},
{cross_mask_bits, cross_mask_width, cross_mask_height, cross_mask_x_hot, cross_mask_y_hot},
{cross_reverse_bits, cross_reverse_width, cross_reverse_height, cross_reverse_x_hot, cross_reverse_y_hot},
{cross_reverse_mask_bits, cross_reverse_mask_width, cross_reverse_mask_height, cross_reverse_mask_x_hot, cross_reverse_mask_y_hot},
{crosshair_bits, crosshair_width, crosshair_height, crosshair_x_hot, crosshair_y_hot},
{crosshair_mask_bits, crosshair_mask_width, crosshair_mask_height, crosshair_mask_x_hot, crosshair_mask_y_hot},
{diamond_cross_bits, diamond_cross_width, diamond_cross_height, diamond_cross_x_hot, diamond_cross_y_hot},
{diamond_cross_mask_bits, diamond_cross_mask_width, diamond_cross_mask_height, diamond_cross_mask_x_hot, diamond_cross_mask_y_hot},
{dot_bits, dot_width, dot_height, dot_x_hot, dot_y_hot},
{dot_mask_bits, dot_mask_width, dot_mask_height, dot_mask_x_hot, dot_mask_y_hot},
{dotbox_bits, dotbox_width, dotbox_height, dotbox_x_hot, dotbox_y_hot},
{dotbox_mask_bits, dotbox_mask_width, dotbox_mask_height, dotbox_mask_x_hot, dotbox_mask_y_hot},
{double_arrow_bits, double_arrow_width, double_arrow_height, double_arrow_x_hot, double_arrow_y_hot},
{double_arrow_mask_bits, double_arrow_mask_width, double_arrow_mask_height, double_arrow_mask_x_hot, double_arrow_mask_y_hot},
{draft_large_bits, draft_large_width, draft_large_height, draft_large_x_hot, draft_large_y_hot},
{draft_large_mask_bits, draft_large_mask_width, draft_large_mask_height, draft_large_mask_x_hot, draft_large_mask_y_hot},
{draft_small_bits, draft_small_width, draft_small_height, draft_small_x_hot, draft_small_y_hot},
{draft_small_mask_bits, draft_small_mask_width, draft_small_mask_height, draft_small_mask_x_hot, draft_small_mask_y_hot},
{draped_box_bits, draped_box_width, draped_box_height, draped_box_x_hot, draped_box_y_hot},
{draped_box_mask_bits, draped_box_mask_width, draped_box_mask_height, draped_box_mask_x_hot, draped_box_mask_y_hot},
{exchange_bits, exchange_width, exchange_height, exchange_x_hot, exchange_y_hot},
{exchange_mask_bits, exchange_mask_width, exchange_mask_height, exchange_mask_x_hot, exchange_mask_y_hot},
{fleur_bits, fleur_width, fleur_height, fleur_x_hot, fleur_y_hot},
{fleur_mask_bits, fleur_mask_width, fleur_mask_height, fleur_mask_x_hot, fleur_mask_y_hot},
{gobbler_bits, gobbler_width, gobbler_height, gobbler_x_hot, gobbler_y_hot},
{gobbler_mask_bits, gobbler_mask_width, gobbler_mask_height, gobbler_mask_x_hot, gobbler_mask_y_hot},
{gumby_bits, gumby_width, gumby_height, gumby_x_hot, gumby_y_hot},
{gumby_mask_bits, gumby_mask_width, gumby_mask_height, gumby_mask_x_hot, gumby_mask_y_hot},
{hand1_bits, hand1_width, hand1_height, hand1_x_hot, hand1_y_hot},
{hand1_mask_bits, hand1_mask_width, hand1_mask_height, hand1_mask_x_hot, hand1_mask_y_hot},
{hand2_bits, hand2_width, hand2_height, hand2_x_hot, hand2_y_hot},
{hand2_mask_bits, hand2_mask_width, hand2_mask_height, hand2_mask_x_hot, hand2_mask_y_hot},
{heart_bits, heart_width, heart_height, heart_x_hot, heart_y_hot},
{heart_mask_bits, heart_mask_width, heart_mask_height, heart_mask_x_hot, heart_mask_y_hot},
{icon_bits, icon_width, icon_height, icon_x_hot, icon_y_hot},
{icon_mask_bits, icon_mask_width, icon_mask_height, icon_mask_x_hot, icon_mask_y_hot},
{iron_cross_bits, iron_cross_width, iron_cross_height, iron_cross_x_hot, iron_cross_y_hot},
{iron_cross_mask_bits, iron_cross_mask_width, iron_cross_mask_height, iron_cross_mask_x_hot, iron_cross_mask_y_hot},
{left_ptr_bits, left_ptr_width, left_ptr_height, left_ptr_x_hot, left_ptr_y_hot},
{left_ptr_mask_bits, left_ptr_mask_width, left_ptr_mask_height, left_ptr_mask_x_hot, left_ptr_mask_y_hot},
{left_side_bits, left_side_width, left_side_height, left_side_x_hot, left_side_y_hot},
{left_side_mask_bits, left_side_mask_width, left_side_mask_height, left_side_mask_x_hot, left_side_mask_y_hot},
{left_tee_bits, left_tee_width, left_tee_height, left_tee_x_hot, left_tee_y_hot},
{left_tee_mask_bits, left_tee_mask_width, left_tee_mask_height, left_tee_mask_x_hot, left_tee_mask_y_hot},
{leftbutton_bits, leftbutton_width, leftbutton_height, leftbutton_x_hot, leftbutton_y_hot},
{leftbutton_mask_bits, leftbutton_mask_width, leftbutton_mask_height, leftbutton_mask_x_hot, leftbutton_mask_y_hot},
{ll_angle_bits, ll_angle_width, ll_angle_height, ll_angle_x_hot, ll_angle_y_hot},
{ll_angle_mask_bits, ll_angle_mask_width, ll_angle_mask_height, ll_angle_mask_x_hot, ll_angle_mask_y_hot},
{lr_angle_bits, lr_angle_width, lr_angle_height, lr_angle_x_hot, lr_angle_y_hot},
{lr_angle_mask_bits, lr_angle_mask_width, lr_angle_mask_height, lr_angle_mask_x_hot, lr_angle_mask_y_hot},
{man_bits, man_width, man_height, man_x_hot, man_y_hot},
{man_mask_bits, man_mask_width, man_mask_height, man_mask_x_hot, man_mask_y_hot},
{middlebutton_bits, middlebutton_width, middlebutton_height, middlebutton_x_hot, middlebutton_y_hot},
{middlebutton_mask_bits, middlebutton_mask_width, middlebutton_mask_height, middlebutton_mask_x_hot, middlebutton_mask_y_hot},
{mouse_bits, mouse_width, mouse_height, mouse_x_hot, mouse_y_hot},
{mouse_mask_bits, mouse_mask_width, mouse_mask_height, mouse_mask_x_hot, mouse_mask_y_hot},
{pencil_bits, pencil_width, pencil_height, pencil_x_hot, pencil_y_hot},
{pencil_mask_bits, pencil_mask_width, pencil_mask_height, pencil_mask_x_hot, pencil_mask_y_hot},
{pirate_bits, pirate_width, pirate_height, pirate_x_hot, pirate_y_hot},
{pirate_mask_bits, pirate_mask_width, pirate_mask_height, pirate_mask_x_hot, pirate_mask_y_hot},
{plus_bits, plus_width, plus_height, plus_x_hot, plus_y_hot},
{plus_mask_bits, plus_mask_width, plus_mask_height, plus_mask_x_hot, plus_mask_y_hot},
{question_arrow_bits, question_arrow_width, question_arrow_height, question_arrow_x_hot, question_arrow_y_hot},
{question_arrow_mask_bits, question_arrow_mask_width, question_arrow_mask_height, question_arrow_mask_x_hot, question_arrow_mask_y_hot},
{right_ptr_bits, right_ptr_width, right_ptr_height, right_ptr_x_hot, right_ptr_y_hot},
{right_ptr_mask_bits, right_ptr_mask_width, right_ptr_mask_height, right_ptr_mask_x_hot, right_ptr_mask_y_hot},
{right_side_bits, right_side_width, right_side_height, right_side_x_hot, right_side_y_hot},
{right_side_mask_bits, right_side_mask_width, right_side_mask_height, right_side_mask_x_hot, right_side_mask_y_hot},
{right_tee_bits, right_tee_width, right_tee_height, right_tee_x_hot, right_tee_y_hot},
{right_tee_mask_bits, right_tee_mask_width, right_tee_mask_height, right_tee_mask_x_hot, right_tee_mask_y_hot},
{rightbutton_bits, rightbutton_width, rightbutton_height, rightbutton_x_hot, rightbutton_y_hot},
{rightbutton_mask_bits, rightbutton_mask_width, rightbutton_mask_height, rightbutton_mask_x_hot, rightbutton_mask_y_hot},
{rtl_logo_bits, rtl_logo_width, rtl_logo_height, rtl_logo_x_hot, rtl_logo_y_hot},
{rtl_logo_mask_bits, rtl_logo_mask_width, rtl_logo_mask_height, rtl_logo_mask_x_hot, rtl_logo_mask_y_hot},
{sailboat_bits, sailboat_width, sailboat_height, sailboat_x_hot, sailboat_y_hot},
{sailboat_mask_bits, sailboat_mask_width, sailboat_mask_height, sailboat_mask_x_hot, sailboat_mask_y_hot},
{sb_down_arrow_bits, sb_down_arrow_width, sb_down_arrow_height, sb_down_arrow_x_hot, sb_down_arrow_y_hot},
{sb_down_arrow_mask_bits, sb_down_arrow_mask_width, sb_down_arrow_mask_height, sb_down_arrow_mask_x_hot, sb_down_arrow_mask_y_hot},
{sb_h_double_arrow_bits, sb_h_double_arrow_width, sb_h_double_arrow_height, sb_h_double_arrow_x_hot, sb_h_double_arrow_y_hot},
{sb_h_double_arrow_mask_bits, sb_h_double_arrow_mask_width, sb_h_double_arrow_mask_height, sb_h_double_arrow_mask_x_hot, sb_h_double_arrow_mask_y_hot},
{sb_left_arrow_bits, sb_left_arrow_width, sb_left_arrow_height, sb_left_arrow_x_hot, sb_left_arrow_y_hot},
{sb_left_arrow_mask_bits, sb_left_arrow_mask_width, sb_left_arrow_mask_height, sb_left_arrow_mask_x_hot, sb_left_arrow_mask_y_hot},
{sb_right_arrow_bits, sb_right_arrow_width, sb_right_arrow_height, sb_right_arrow_x_hot, sb_right_arrow_y_hot},
{sb_right_arrow_mask_bits, sb_right_arrow_mask_width, sb_right_arrow_mask_height, sb_right_arrow_mask_x_hot, sb_right_arrow_mask_y_hot},
{sb_up_arrow_bits, sb_up_arrow_width, sb_up_arrow_height, sb_up_arrow_x_hot, sb_up_arrow_y_hot},
{sb_up_arrow_mask_bits, sb_up_arrow_mask_width, sb_up_arrow_mask_height, sb_up_arrow_mask_x_hot, sb_up_arrow_mask_y_hot},
{sb_v_double_arrow_bits, sb_v_double_arrow_width, sb_v_double_arrow_height, sb_v_double_arrow_x_hot, sb_v_double_arrow_y_hot},
{sb_v_double_arrow_mask_bits, sb_v_double_arrow_mask_width, sb_v_double_arrow_mask_height, sb_v_double_arrow_mask_x_hot, sb_v_double_arrow_mask_y_hot},
{shuttle_bits, shuttle_width, shuttle_height, shuttle_x_hot, shuttle_y_hot},
{shuttle_mask_bits, shuttle_mask_width, shuttle_mask_height, shuttle_mask_x_hot, shuttle_mask_y_hot},
{sizing_bits, sizing_width, sizing_height, sizing_x_hot, sizing_y_hot},
{sizing_mask_bits, sizing_mask_width, sizing_mask_height, sizing_mask_x_hot, sizing_mask_y_hot},
{spider_bits, spider_width, spider_height, spider_x_hot, spider_y_hot},
{spider_mask_bits, spider_mask_width, spider_mask_height, spider_mask_x_hot, spider_mask_y_hot},
{spraycan_bits, spraycan_width, spraycan_height, spraycan_x_hot, spraycan_y_hot},
{spraycan_mask_bits, spraycan_mask_width, spraycan_mask_height, spraycan_mask_x_hot, spraycan_mask_y_hot},
{star_bits, star_width, star_height, star_x_hot, star_y_hot},
{star_mask_bits, star_mask_width, star_mask_height, star_mask_x_hot, star_mask_y_hot},
{target_bits, target_width, target_height, target_x_hot, target_y_hot},
{target_mask_bits, target_mask_width, target_mask_height, target_mask_x_hot, target_mask_y_hot},
{tcross_bits, tcross_width, tcross_height, tcross_x_hot, tcross_y_hot},
{tcross_mask_bits, tcross_mask_width, tcross_mask_height, tcross_mask_x_hot, tcross_mask_y_hot},
{top_left_arrow_bits, top_left_arrow_width, top_left_arrow_height, top_left_arrow_x_hot, top_left_arrow_y_hot},
{top_left_arrow_mask_bits, top_left_arrow_mask_width, top_left_arrow_mask_height, top_left_arrow_mask_x_hot, top_left_arrow_mask_y_hot},
{top_left_corner_bits, top_left_corner_width, top_left_corner_height, top_left_corner_x_hot, top_left_corner_y_hot},
{top_left_corner_mask_bits, top_left_corner_mask_width, top_left_corner_mask_height, top_left_corner_mask_x_hot, top_left_corner_mask_y_hot},
{top_right_corner_bits, top_right_corner_width, top_right_corner_height, top_right_corner_x_hot, top_right_corner_y_hot},
{top_right_corner_mask_bits, top_right_corner_mask_width, top_right_corner_mask_height, top_right_corner_mask_x_hot, top_right_corner_mask_y_hot},
{top_side_bits, top_side_width, top_side_height, top_side_x_hot, top_side_y_hot},
{top_side_mask_bits, top_side_mask_width, top_side_mask_height, top_side_mask_x_hot, top_side_mask_y_hot},
{top_tee_bits, top_tee_width, top_tee_height, top_tee_x_hot, top_tee_y_hot},
{top_tee_mask_bits, top_tee_mask_width, top_tee_mask_height, top_tee_mask_x_hot, top_tee_mask_y_hot},
{trek_bits, trek_width, trek_height, trek_x_hot, trek_y_hot},
{trek_mask_bits, trek_mask_width, trek_mask_height, trek_mask_x_hot, trek_mask_y_hot},
{ul_angle_bits, ul_angle_width, ul_angle_height, ul_angle_x_hot, ul_angle_y_hot},
{ul_angle_mask_bits, ul_angle_mask_width, ul_angle_mask_height, ul_angle_mask_x_hot, ul_angle_mask_y_hot},
{umbrella_bits, umbrella_width, umbrella_height, umbrella_x_hot, umbrella_y_hot},
{umbrella_mask_bits, umbrella_mask_width, umbrella_mask_height, umbrella_mask_x_hot, umbrella_mask_y_hot},
{ur_angle_bits, ur_angle_width, ur_angle_height, ur_angle_x_hot, ur_angle_y_hot},
{ur_angle_mask_bits, ur_angle_mask_width, ur_angle_mask_height, ur_angle_mask_x_hot, ur_angle_mask_y_hot},
{watch_bits, watch_width, watch_height, watch_x_hot, watch_y_hot},
{watch_mask_bits, watch_mask_width, watch_mask_height, watch_mask_x_hot, watch_mask_y_hot},
{xterm_bits, xterm_width, xterm_height, xterm_x_hot, xterm_y_hot},
{xterm_mask_bits, xterm_mask_width, xterm_mask_height, xterm_mask_x_hot, xterm_mask_y_hot}
};
GdkCursor *
gdk_cursor_new_for_display (GdkDisplay *display,GdkCursorType cursor_type)
{
GdkCursor *cursor;
GdkDisplayDFB *dfb_display = GDK_DISPLAY_DFB(display);
if (cursor_type >= sizeof(stock_cursors)/sizeof(stock_cursors[0]))
return NULL;
cursor = stock_cursors[cursor_type].cursor;
if (!cursor)
{
GdkCursorDirectFB *private;
DFBResult ret;
IDirectFBSurface *temp;
IDirectFBSurface *shape;
int width = stock_cursors[cursor_type+1].width;
int height = stock_cursors[cursor_type+1].height;
temp =gdk_display_dfb_create_surface(dfb_display,DSPF_ARGB,width,height);
if (!temp)
{
return NULL;
}
else
{
u32 *dst;
int pitch;
ret = temp->Lock (temp, DSLF_WRITE, (void**)&dst, &pitch);
if (ret)
{
DirectFBError ("gdkcursor-directfb.c (gdk_cursor_new): "
"temp->Lock", ret);
temp->Release (temp);
return NULL;
}
else
{
gint x, y;
gint mx, my;
gint p = ((stock_cursors[cursor_type].width + 7) / 8) * 8;
gint mp = ((stock_cursors[cursor_type+1].width + 7) / 8) * 8;
const guchar *src;
const guchar *mask;
pitch >>= 2;
src = stock_cursors[cursor_type].bits;
mask = stock_cursors[cursor_type+1].bits;
mx = stock_cursors[cursor_type+1].hotx - stock_cursors[cursor_type].hotx;
my = stock_cursors[cursor_type+1].hoty - stock_cursors[cursor_type].hoty;
for (y = 0; y < height; y++)
{
for (x = 0; x < width; x++)
{
gint bit = x-mx + (y-my) * p;
gint mbit = x + y * mp;
u32 color = (x-mx < 0 || y-my < 0 ||
x-mx >= stock_cursors[cursor_type].width ||
y-my >= stock_cursors[cursor_type].height)
? 0x00FFFFFF : (src[bit/8] & (1 << bit%8) ? 0 : 0x00FFFFFF);
u8 a = color ? 0xE0 : 0xFF;
u32 alpha = mask[mbit/8] & (1 << mbit%8) ? (a << 24) : 0;
dst[x + y*pitch] = alpha | color;
}
}
temp->Unlock (temp);
}
}
width += 2;
height += 2;
shape=gdk_display_dfb_create_surface(dfb_display,DSPF_ARGB,width,height);
if( !shape ) {
temp->Release(temp);
return NULL;
}
shape->Clear (shape, 0x80, 0x80, 0x80, 0);
shape->SetBlittingFlags (shape, (DSBLIT_BLEND_COLORALPHA |
DSBLIT_BLEND_ALPHACHANNEL));
shape->SetColor (shape, 0, 0, 0, 0x30);
shape->Blit (shape, temp, NULL, 0, 0);
shape->Blit (shape, temp, NULL, 0, 2);
shape->Blit (shape, temp, NULL, 2, 0);
shape->Blit (shape, temp, NULL, 2, 2);
shape->SetColor (shape, 0, 0, 0, 0xA0);
shape->Blit (shape, temp, NULL, 1, 0);
shape->Blit (shape, temp, NULL, 0, 1);
shape->Blit (shape, temp, NULL, 2, 1);
shape->Blit (shape, temp, NULL, 1, 2);
shape->SetColor (shape, 0, 0, 0, 0xE0);
shape->Blit (shape, temp, NULL, 1, 1);
temp->Release (temp);
private = g_new0 (GdkCursorDirectFB, 1);
cursor = (GdkCursor *) private;
cursor->type = GDK_CURSOR_IS_PIXMAP;
cursor->ref_count = 1;
private->shape = shape;
private->hot_x = stock_cursors[cursor_type].hotx;
private->hot_y = stock_cursors[cursor_type].hoty;
stock_cursors[cursor_type].cursor = cursor;
}
return gdk_cursor_ref (cursor);
}
GdkCursor *
gdk_cursor_new_from_pixmap (GdkPixmap *source,
GdkPixmap *mask,
const GdkColor *fg,
const GdkColor *bg,
gint x,
gint y)
{
GdkCursor *cursor;
GdkCursorDirectFB *private;
GdkDrawableImplDirectFB *impl;
GdkDrawableImplDirectFB *mask_impl;
IDirectFBSurface *shape;
g_return_val_if_fail (GDK_IS_PIXMAP (source), NULL);
g_return_val_if_fail (GDK_IS_PIXMAP (mask), NULL);
impl = GDK_DRAWABLE_IMPL_DIRECTFB (GDK_PIXMAP_OBJECT (source)->impl);
mask_impl = GDK_DRAWABLE_IMPL_DIRECTFB (GDK_PIXMAP_OBJECT (mask)->impl);
int width = impl->width;
int height = impl->height;
shape=gdk_display_dfb_create_surface(_gdk_display,DSPF_ARGB,width,height);
if (!shape)
{
return NULL;
}
/*
* The following code assumes that pixmap and mask are A8 surfaces
* that correspond to X11 bitmaps. This is the traditional usage of
* gdk_cursor_new_from_pixmap(). For GTK+-DirectFB it might make
* sense to allow arbitrary ARGB cursors.
*/
shape->Clear (shape, bg->red >> 8, bg->green >> 8, bg->blue >> 8, 0xFF);
shape->SetColor (shape, fg->red >> 8, fg->green >> 8, fg->blue >> 8, 0xFF);
shape->SetBlittingFlags (shape,
DSBLIT_BLEND_ALPHACHANNEL | DSBLIT_COLORIZE);
shape->Blit (shape, impl->surface, NULL, 0, 0);
shape->SetPorterDuff (shape, DSPD_DST_IN);
shape->Blit (shape, mask_impl->surface, NULL, 0, 0);
shape->SetBlittingFlags (shape, DSBLIT_NOFX);
shape->SetPorterDuff (shape, DSPD_NONE);
private = g_new (GdkCursorDirectFB, 1);
cursor = (GdkCursor *) private;
cursor->type = GDK_CURSOR_IS_PIXMAP;
cursor->ref_count = 1;
private->shape = shape;
private->hot_x = x;
private->hot_y = y;
return cursor;
}
GdkCursor *
gdk_cursor_new_from_pixbuf (GdkDisplay *display,
GdkPixbuf *pixbuf,
gint x,
gint y)
{
GdkPixmap *pixmap, *mask;
GdkCursor *cursor;
gint width, height, depth = 8;
GdkVisual* visual;
/* FIXME: this is not the right way to set colours */
GdkColor fg = { 0, 65535, 65535, 65535 };
GdkColor bg = { 0, 65535, 65535, 65535 };
g_return_val_if_fail (GDK_IS_DISPLAY (display), NULL);
g_return_val_if_fail (GDK_IS_PIXBUF (pixbuf), NULL);
g_return_val_if_fail (0 <= x && x < gdk_pixbuf_get_width (pixbuf), NULL);
g_return_val_if_fail (0 <= y && y < gdk_pixbuf_get_height (pixbuf), NULL);
width = gdk_pixbuf_get_width(pixbuf);
height = gdk_pixbuf_get_height(pixbuf);
pixmap = gdk_pixmap_new ( NULL, width, height, depth);
mask = gdk_pixmap_new ( NULL, width, height, 1);
visual = gdk_rgb_get_visual ();
depth = visual->depth;
gdk_pixbuf_render_pixmap_and_mask (pixbuf, &pixmap, &mask, 0);
g_return_val_if_fail (GDK_IS_PIXMAP (pixmap), NULL);
g_return_val_if_fail (GDK_IS_PIXMAP (mask), NULL);
cursor = gdk_cursor_new_from_pixmap (pixmap, mask, &fg, &bg, x, y) ;
g_object_unref (pixmap);
g_object_unref (mask);
/* a cursor of type GDK_CURSOR_IS_PIXMAP is returned */
return cursor;
}
GdkCursor*
gdk_cursor_new_from_name (GdkDisplay *display,
const gchar *name)
{
GdkCursor *cursor;
GdkPixbuf *pixbuf;
g_return_val_if_fail (GDK_IS_DISPLAY (display), NULL);
pixbuf = gdk_pixbuf_new_from_file(name, NULL);
/* Prevents attempts to load stock X cursors from generating error messages */
if (pixbuf == NULL)
return NULL;
g_return_val_if_fail (GDK_IS_PIXBUF (pixbuf), NULL);
cursor = gdk_cursor_new_from_pixbuf (display, pixbuf, 1, 1);
g_object_unref (pixbuf);
return cursor;
}
GdkPixbuf*
gdk_cursor_get_image (GdkCursor *cursor)
{
g_return_val_if_fail (cursor != NULL, NULL);
return NULL;
}
void
_gdk_cursor_destroy (GdkCursor *cursor)
{
GdkCursorDirectFB *private;
g_return_if_fail (cursor != NULL);
g_return_if_fail (cursor->ref_count == 0);
private = (GdkCursorDirectFB *) cursor;
private->shape->Release (private->shape);
g_free (private);
}
GdkDisplay *
gdk_cursor_get_display (GdkCursor *cursor)
{
return gdk_display_get_default ();
}
guint
gdk_display_get_default_cursor_size (GdkDisplay *display)
{
g_return_val_if_fail (GDK_IS_DISPLAY (display), 0);
return 16;
}
/**
* gdk_display_get_maximal_cursor_size:
* @display: a #GdkDisplay
* @width: the return location for the maximal cursor width
* @height: the return location for the maximal cursor height
*
* Gets the maximal size to use for cursors on @display.
*
* Since: 2.4
*/
void
gdk_display_get_maximal_cursor_size (GdkDisplay *display,
guint *width,
guint *height)
{
g_return_if_fail (GDK_IS_DISPLAY (display));
/* Cursor sizes in DirectFB can be large (4095x4095), but we limit this to
128x128 for max compatibility with the x11 backend. */
*width = 128;
*height = 128;
}
/**
* gdk_display_supports_cursor_alpha:
* @display: a #GdkDisplay
*
* Returns %TRUE if cursors can use an 8bit alpha channel
* on @display. Otherwise, cursors are restricted to bilevel
* alpha (i.e. a mask).
*
* Returns: whether cursors can have alpha channels.
*
* Since: 2.4
*/
gboolean
gdk_display_supports_cursor_alpha (GdkDisplay *display)
{
g_return_val_if_fail (GDK_IS_DISPLAY (display), FALSE);
return TRUE;
}
gboolean
gdk_display_supports_cursor_color (GdkDisplay *display)
{
g_return_val_if_fail (GDK_IS_DISPLAY (display), FALSE);
return TRUE;
}

View File

@@ -1,82 +0,0 @@
/* GDK - The GIMP Drawing Kit
* Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
* Boston, MA 02111-1307, USA.
*/
/*
* Modified by the GTK+ Team and others 1997-2000. See the AUTHORS
* file for a list of people on the GTK+ Team.
*/
/*
* GTK+ DirectFB backend
* Copyright (C) 2001-2002 convergence integrated media GmbH
* Copyright (C) 2002 convergence GmbH
* Written by Denis Oliver Kropp <dok@convergence.de> and
* Sven Neumann <sven@convergence.de>
*/
#ifndef __GDK_DIRECTFB_H__
#define __GDK_DIRECTFB_H__
/* This define disables some experimental code
*/
#define GDK_DIRECTFB_NO_EXPERIMENTS
#include <cairo.h>
#include <directfb.h>
#include "gdk/gdkprivate.h"
extern GdkWindow * _gdk_parent_root;
G_BEGIN_DECLS
#define GDK_ROOT_WINDOW() _gdk_parent_root
#define GDK_WINDOW_DFB_ID(win) (GDK_WINDOW_IMPL_DIRECTFB (GDK_WINDOW_OBJECT (win)->impl)->dfb_id)
/* used for the --transparent-unfocused hack */
extern gboolean gdk_directfb_apply_focus_opacity;
/* used for the --enable-color-keying hack */
extern gboolean gdk_directfb_enable_color_keying;
extern DFBColor gdk_directfb_bg_color;
extern DFBColor gdk_directfb_bg_color_key;
/* to disable antialiasing */
extern gboolean gdk_directfb_monochrome_fonts;
/* GTK+-DirectFB specific functions */
void gdk_directfb_window_set_opacity (GdkWindow *window,
guchar opacity);
GdkVisual * gdk_directfb_visual_by_format (DFBSurfacePixelFormat pixel_format);
IDirectFBWindow *gdk_directfb_window_lookup(GdkWindow *window);
IDirectFBSurface *gdk_directfb_surface_lookup(GdkWindow *window);
GdkWindow *gdk_directfb_create_child_window(GdkWindow *parent,
IDirectFBSurface *subsurface);
G_END_DECLS
#endif /* __GDK_DIRECTFB_H__ */

View File

@@ -1,541 +0,0 @@
/* GDK - The GIMP Drawing Kit
* Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
* Boston, MA 02111-1307, USA.
*/
/*
* Modified by the GTK+ Team and others 1997-2000. See the AUTHORS
* file for a list of people on the GTK+ Team. See the ChangeLog
* files for a list of changes. These files are distributed with
* GTK+ at ftp://ftp.gtk.org/pub/gtk/.
*/
#include "config.h"
#include <glib.h>
#include "gdk.h"
#include "gdkdirectfb.h"
#include "gdkprivate-directfb.h"
#include "gdkscreen.h"
#include "gdkdisplaymanager.h"
extern void _gdk_visual_init (void);
extern void _gdk_events_init (void);
extern void _gdk_input_init (void);
extern void _gdk_dnd_init (void);
extern void _gdk_windowing_window_init (void);
extern void _gdk_windowing_image_init (void);
extern void _gdk_directfb_keyboard_init (void);
static gboolean gdk_directfb_argb_font = FALSE;
static gint gdk_directfb_glyph_surface_cache = 8;
const GOptionEntry _gdk_windowing_args[] =
{
{ "disable-aa-fonts",0,0,G_OPTION_ARG_INT,&gdk_directfb_monochrome_fonts,NULL,NULL },
{ "argb-font",0,0, G_OPTION_ARG_INT, &gdk_directfb_argb_font,NULL,NULL},
{ "transparent-unfocused",0,0, G_OPTION_ARG_INT, &gdk_directfb_apply_focus_opacity,NULL,NULL },
{ "glyph-surface-cache",0,0,G_OPTION_ARG_INT,&gdk_directfb_glyph_surface_cache,NULL,NULL },
{ "enable-color-keying",0,0,G_OPTION_ARG_INT,&gdk_directfb_enable_color_keying,NULL,NULL },
{ NULL}
};
/* Main entry point for gdk in 2.6 args are parsed
*/
GdkDisplay * gdk_display_open (const gchar *display_name)
{
IDirectFB *directfb;
IDirectFBDisplayLayer *layer;
IDirectFBInputDevice *keyboard;
DFBResult ret;
if (_gdk_display)
{
return GDK_DISPLAY_OBJECT(_gdk_display); /* single display only */
}
ret = DirectFBInit (NULL, NULL);
if (ret != DFB_OK)
{
DirectFBError ("gdk_display_open: DirectFBInit", ret);
return NULL;
}
ret = DirectFBCreate (&directfb);
if (ret != DFB_OK)
{
DirectFBError ("gdk_display_open: DirectFBCreate", ret);
return NULL;
}
_gdk_display = g_object_new (GDK_TYPE_DISPLAY_DFB, NULL);
_gdk_display->directfb = directfb;
ret = directfb->GetDisplayLayer (directfb, DLID_PRIMARY, &layer);
if (ret != DFB_OK)
{
DirectFBError ("gdk_display_open: GetDisplayLayer", ret);
directfb->Release (directfb);
_gdk_display->directfb = NULL;
return NULL;
}
ret = directfb->GetInputDevice (directfb, DIDID_KEYBOARD, &keyboard);
if (ret != DFB_OK)
{
DirectFBError ("gdk_display_open: GetInputDevice", ret);
directfb->Release (directfb);
_gdk_display->directfb = NULL;
return NULL;
}
_gdk_display->layer=layer;
_gdk_display->keyboard=keyboard;
_gdk_directfb_keyboard_init ();
_gdk_screen = g_object_new (GDK_TYPE_SCREEN, NULL);
_gdk_visual_init ();
_gdk_windowing_window_init ();
gdk_screen_set_default_colormap (_gdk_screen,
gdk_screen_get_system_colormap (_gdk_screen)); _gdk_windowing_image_init ();
_gdk_events_init ();
_gdk_input_init ();
_gdk_dnd_init ();
layer->EnableCursor (layer, 1);
g_signal_emit_by_name (gdk_display_manager_get (),
"display_opened", _gdk_display);
return GDK_DISPLAY_OBJECT(_gdk_display);
}
GType
gdk_display_dfb_get_type (void)
{
static GType object_type = 0;
if (!object_type)
{
const GTypeInfo object_info =
{
sizeof (GdkDisplayDFBClass),
(GBaseInitFunc) NULL,
(GBaseFinalizeFunc) NULL,
(GClassInitFunc) NULL,
NULL, /* class_finalize */
NULL, /* class_data */
sizeof (GdkDisplayDFB),
0, /* n_preallocs */
(GInstanceInitFunc) NULL,
};
object_type = g_type_register_static (GDK_TYPE_DISPLAY,
"GdkDisplayDFB",
&object_info, 0);
}
return object_type;
}
IDirectFBSurface * gdk_display_dfb_create_surface (GdkDisplayDFB *display,int format,int width, int height) {
DFBResult ret;
IDirectFBSurface *temp;
DFBSurfaceDescription dsc;
dsc.flags = DSDESC_WIDTH | DSDESC_HEIGHT | DSDESC_PIXELFORMAT;
dsc.width = width;
dsc.height = height;
dsc.pixelformat = format;
ret = display->directfb->CreateSurface (display->directfb, &dsc, &temp);
if (ret)
{
DirectFBError ("gdk_display_dfb_create_surface ", ret);
return NULL;
}
return temp;
}
/*************************************************************************************************
* Displays and Screens
*/
void
_gdk_windowing_set_default_display (GdkDisplay *display)
{
_gdk_display=GDK_DISPLAY_DFB(display);
}
G_CONST_RETURN gchar *
gdk_display_get_name (GdkDisplay *display)
{
return gdk_get_display_arg_name ();
}
int
gdk_display_get_n_screens (GdkDisplay *display)
{
return 1;
}
GdkScreen *
gdk_display_get_screen (GdkDisplay *display,
gint screen_num)
{
return _gdk_screen;
}
GdkScreen *
gdk_display_get_default_screen (GdkDisplay *display)
{
return _gdk_screen;
}
gboolean
gdk_display_supports_shapes (GdkDisplay *display)
{
return FALSE;
}
gboolean
gdk_display_supports_input_shapes (GdkDisplay *display)
{
return FALSE;
}
GdkWindow *gdk_display_get_default_group (GdkDisplay *display)
{
g_return_val_if_fail (GDK_IS_DISPLAY (display), NULL);
return _gdk_parent_root;
}
/*************************************************************************************************
* Selection and Clipboard
*/
gboolean
gdk_display_supports_selection_notification (GdkDisplay *display)
{
return FALSE;
}
gboolean gdk_display_request_selection_notification (GdkDisplay *display,
GdkAtom selection)
{
g_warning("gdk_display_request_selection_notification Unimplemented function \n");
return FALSE;
}
gboolean
gdk_display_supports_clipboard_persistence (GdkDisplay *display)
{
g_warning("gdk_display_supports_clipboard_persistence Unimplemented function \n");
return FALSE;
}
void
gdk_display_store_clipboard (GdkDisplay *display,
GdkWindow *clipboard_window,
guint32 time_,
const GdkAtom *targets,
gint n_targets)
{
g_warning("gdk_display_store_clipboard Unimplemented function \n");
}
/*************************************************************************************************
* Pointer
*/
static gboolean _gdk_directfb_pointer_implicit_grab = FALSE;
GdkGrabStatus
gdk_directfb_pointer_grab (GdkWindow *window,
gint owner_events,
GdkEventMask event_mask,
GdkWindow *confine_to,
GdkCursor *cursor,
guint32 time,
gboolean implicit_grab)
{
GdkWindow *toplevel;
GdkWindowImplDirectFB *impl;
if (_gdk_directfb_pointer_grab_window)
{
if (implicit_grab && !_gdk_directfb_pointer_implicit_grab)
return GDK_GRAB_ALREADY_GRABBED;
gdk_pointer_ungrab (time);
}
toplevel = gdk_directfb_window_find_toplevel (window);
impl = GDK_WINDOW_IMPL_DIRECTFB (GDK_WINDOW_OBJECT (toplevel)->impl);
if (impl->window)
{
if (impl->window->GrabPointer (impl->window) == DFB_LOCKED)
return GDK_GRAB_ALREADY_GRABBED;
}
if (event_mask & GDK_BUTTON_MOTION_MASK)
event_mask |= (GDK_BUTTON1_MOTION_MASK |
GDK_BUTTON2_MOTION_MASK |
GDK_BUTTON3_MOTION_MASK);
_gdk_directfb_pointer_implicit_grab = implicit_grab;
_gdk_directfb_pointer_grab_window = g_object_ref (window);
_gdk_directfb_pointer_grab_owner_events = owner_events;
_gdk_directfb_pointer_grab_confine = (confine_to ?
g_object_ref (confine_to) : NULL);
_gdk_directfb_pointer_grab_events = event_mask;
_gdk_directfb_pointer_grab_cursor = (cursor ?
gdk_cursor_ref (cursor) : NULL);
gdk_directfb_window_send_crossing_events (NULL,
window,
GDK_CROSSING_GRAB);
return GDK_GRAB_SUCCESS;
}
void
gdk_directfb_pointer_ungrab (guint32 time,
gboolean implicit_grab)
{
GdkWindow *toplevel;
GdkWindow *mousewin;
GdkWindow *old_grab_window;
GdkWindowImplDirectFB *impl;
if (implicit_grab && !_gdk_directfb_pointer_implicit_grab)
return;
if (!_gdk_directfb_pointer_grab_window)
return;
toplevel =
gdk_directfb_window_find_toplevel (_gdk_directfb_pointer_grab_window);
impl = GDK_WINDOW_IMPL_DIRECTFB (GDK_WINDOW_OBJECT (toplevel)->impl);
if (impl->window)
impl->window->UngrabPointer (impl->window);
if (_gdk_directfb_pointer_grab_confine)
{
g_object_unref (_gdk_directfb_pointer_grab_confine);
_gdk_directfb_pointer_grab_confine = NULL;
}
if (_gdk_directfb_pointer_grab_cursor)
{
gdk_cursor_unref (_gdk_directfb_pointer_grab_cursor);
_gdk_directfb_pointer_grab_cursor = NULL;
}
old_grab_window = _gdk_directfb_pointer_grab_window;
_gdk_directfb_pointer_grab_window = NULL;
_gdk_directfb_pointer_implicit_grab = FALSE;
mousewin = gdk_window_at_pointer (NULL, NULL);
gdk_directfb_window_send_crossing_events (old_grab_window,
mousewin,
GDK_CROSSING_UNGRAB);
g_object_unref (old_grab_window);
}
void
gdk_display_pointer_ungrab (GdkDisplay *display,
guint32 time)
{
GdkPointerGrabInfo *grab = _gdk_display_get_last_pointer_grab (display);
if (grab)
{
grab->serial_end = 0;
}
_gdk_display_pointer_grab_update (display, 0);
}
/*************************************************************************************************
* Keyboard
*/
GdkGrabStatus
gdk_directfb_keyboard_grab (GdkDisplay *display,
GdkWindow *window,
gint owner_events,
guint32 time)
{
GdkWindow *toplevel;
GdkWindowImplDirectFB *impl;
g_return_val_if_fail (GDK_IS_WINDOW (window), 0);
if (_gdk_directfb_keyboard_grab_window)
gdk_keyboard_ungrab (time);
toplevel = gdk_directfb_window_find_toplevel (window);
impl = GDK_WINDOW_IMPL_DIRECTFB (GDK_WINDOW_OBJECT (toplevel)->impl);
if (impl->window)
{
if (impl->window->GrabKeyboard (impl->window) == DFB_LOCKED)
return GDK_GRAB_ALREADY_GRABBED;
}
_gdk_directfb_keyboard_grab_window = g_object_ref (window);
_gdk_directfb_keyboard_grab_owner_events = owner_events;
return GDK_GRAB_SUCCESS;
}
void
gdk_directfb_keyboard_ungrab (GdkDisplay *display,
guint32 time)
{
GdkWindow *toplevel;
GdkWindowImplDirectFB *impl;
if (!_gdk_directfb_keyboard_grab_window)
return;
toplevel = gdk_directfb_window_find_toplevel (_gdk_directfb_keyboard_grab_window);
impl = GDK_WINDOW_IMPL_DIRECTFB (GDK_WINDOW_OBJECT (toplevel)->impl);
if (impl->window)
impl->window->UngrabKeyboard (impl->window);
g_object_unref (_gdk_directfb_keyboard_grab_window);
_gdk_directfb_keyboard_grab_window = NULL;
}
/*
*--------------------------------------------------------------
* gdk_keyboard_grab
*
* Grabs the keyboard to a specific window
*
* Arguments:
* "window" is the window which will receive the grab
* "owner_events" specifies whether events will be reported as is,
* or relative to "window"
* "time" specifies the time
*
* Results:
*
* Side effects:
* requires a corresponding call to gdk_keyboard_ungrab
*
*--------------------------------------------------------------
*/
GdkGrabStatus
gdk_display_keyboard_grab (GdkDisplay *display,
GdkWindow *window,
gint owner_events,
guint32 time)
{
return gdk_directfb_keyboard_grab (display, window, owner_events, time);
}
void
gdk_display_keyboard_ungrab (GdkDisplay *display,
guint32 time)
{
return gdk_directfb_keyboard_ungrab (display, time);
}
/*************************************************************************************************
* Misc Stuff
*/
void
gdk_display_beep (GdkDisplay *display)
{
}
void
gdk_display_sync (GdkDisplay *display)
{
}
void
gdk_display_flush (GdkDisplay *display)
{
}
/*************************************************************************************************
* Notifications
*/
void
gdk_notify_startup_complete (void)
{
}
/**
* gdk_notify_startup_complete_with_id:
* @startup_id: a startup-notification identifier, for which notification
* process should be completed
*
* Indicates to the GUI environment that the application has finished
* loading, using a given identifier.
*
* GTK+ will call this function automatically for #GtkWindow with custom
* startup-notification identifier unless
* gtk_window_set_auto_startup_notification() is called to disable
* that feature.
*
* Since: 2.12
**/
void
gdk_notify_startup_complete_with_id (const gchar* startup_id)
{
}
/*************************************************************************************************
* Compositing
*/
gboolean
gdk_display_supports_composite (GdkDisplay *display)
{
return FALSE;
}

View File

@@ -1,59 +0,0 @@
/*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Library General Public License for more details.
*
* You should have received a copy of the GNU Library General Public
* License along with this library; if not, write to the
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
* Boston, MA 02111-1307, USA.
*/
#ifndef GDK_DISPLAY_DFB_H
#define GDK_DISPLAY_DFB_H
#include <directfb.h>
#include <gdk/gdkdisplay.h>
#include <gdk/gdkkeys.h>
G_BEGIN_DECLS
typedef struct _GdkDisplayDFB GdkDisplayDFB;
typedef struct _GdkDisplayDFBClass GdkDisplayDFBClass;
#define GDK_TYPE_DISPLAY_DFB (gdk_display_dfb_get_type())
#define GDK_DISPLAY_DFB(object) (G_TYPE_CHECK_INSTANCE_CAST ((object), GDK_TYPE_DISPLAY_DFB, GdkDisplayDFB))
#define GDK_DISPLAY_DFB_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GDK_TYPE_DISPLAY_DFB, GdkDisplayDFBClass))
#define GDK_IS_DISPLAY_DFB(object) (G_TYPE_CHECK_INSTANCE_TYPE ((object), GDK_TYPE_DISPLAY_DFB))
#define GDK_IS_DISPLAY_DFB_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GDK_TYPE_DISPLAY_DFB))
#define GDK_DISPLAY_DFB_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GDK_TYPE_DISPLAY_DFB, GdkDisplayDFBClass))
struct _GdkDisplayDFB
{
GdkDisplay parent;
IDirectFB *directfb;
IDirectFBDisplayLayer *layer;
IDirectFBEventBuffer *buffer;
IDirectFBInputDevice *keyboard;
GdkKeymap *keymap;
};
struct _GdkDisplayDFBClass
{
GdkDisplayClass parent;
};
GType gdk_display_dfb_get_type (void);
IDirectFBSurface * gdk_display_dfb_create_surface (GdkDisplayDFB *display,int format,int width, int height);
G_END_DECLS
#endif /* GDK_DISPLAY_DFB_H */

View File

@@ -1,634 +0,0 @@
/* GDK - The GIMP Drawing Kit
* Copyright (C) 1995-1999 Peter Mattis, Spencer Kimball and Josh MacDonald
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
* Boston, MA 02111-1307, USA.
*/
/*
* Modified by the GTK+ Team and others 1997-2000. See the AUTHORS
* file for a list of people on the GTK+ Team.
*/
/*
* GTK+ DirectFB backend
* Copyright (C) 2001-2002 convergence integrated media GmbH
* Copyright (C) 2002-2004 convergence GmbH
* Written by Denis Oliver Kropp <dok@convergence.de> and
* Sven Neumann <sven@convergence.de>
*/
#include "config.h"
#include "gdk.h"
#include "gdkdirectfb.h"
#include "gdkprivate-directfb.h"
#include "gdkdnd.h"
#include "gdkproperty.h"
typedef struct _GdkDragContextPrivate GdkDragContextPrivate;
typedef enum
{
GDK_DRAG_STATUS_DRAG,
GDK_DRAG_STATUS_MOTION_WAIT,
GDK_DRAG_STATUS_ACTION_WAIT,
GDK_DRAG_STATUS_DROP
} GtkDragStatus;
/* Structure that holds information about a drag in progress.
* this is used on both source and destination sides.
*/
struct _GdkDragContextPrivate
{
GdkAtom local_selection;
guint16 last_x; /* Coordinates from last event */
guint16 last_y;
guint drag_status : 4; /* current status of drag */
};
/* Drag Contexts */
static GList *contexts = NULL;
static GdkDragContext *current_dest_drag = NULL;
#define GDK_DRAG_CONTEXT_PRIVATE_DATA(ctx) ((GdkDragContextPrivate *) GDK_DRAG_CONTEXT (ctx)->windowing_data)
static void gdk_drag_context_finalize (GObject *object);
G_DEFINE_TYPE (GdkDragContext, gdk_drag_context, G_TYPE_OBJECT)
static void
gdk_drag_context_init (GdkDragContext *dragcontext)
{
GdkDragContextPrivate *private;
private = G_TYPE_INSTANCE_GET_PRIVATE (dragcontext,
GDK_TYPE_DRAG_CONTEXT,
GdkDragContextPrivate);
dragcontext->windowing_data = private;
contexts = g_list_prepend (contexts, dragcontext);
}
static void
gdk_drag_context_class_init (GdkDragContextClass *klass)
{
GObjectClass *object_class = G_OBJECT_CLASS (klass);
object_class->finalize = gdk_drag_context_finalize;
g_type_class_add_private (object_class, sizeof (GdkDragContextPrivate));
}
static void
gdk_drag_context_finalize (GObject *object)
{
GdkDragContext *context = GDK_DRAG_CONTEXT (object);
g_list_free (context->targets);
if (context->source_window)
g_object_unref (context->source_window);
if (context->dest_window)
g_object_unref (context->dest_window);
contexts = g_list_remove (contexts, context);
G_OBJECT_CLASS (gdk_drag_context_parent_class)->finalize (object);
}
GdkDragContext *
gdk_drag_context_new (void)
{
return g_object_new (gdk_drag_context_get_type (), NULL);
}
static GdkDragContext *
gdk_drag_context_find (gboolean is_source,
GdkWindow *source,
GdkWindow *dest)
{
GdkDragContext *context;
GdkDragContextPrivate *private;
GList *list;
for (list = contexts; list; list = list->next)
{
context = (GdkDragContext *) list->data;
private = GDK_DRAG_CONTEXT_PRIVATE_DATA (context);
if ((!context->is_source == !is_source) &&
((source == NULL) ||
(context->source_window && (context->source_window == source))) &&
((dest == NULL) ||
(context->dest_window && (context->dest_window == dest))))
return context;
}
return NULL;
}
/************************** Public API ***********************/
void
_gdk_dnd_init (void)
{
}
/* Source side */
static void
local_send_leave (GdkDragContext *context,
guint32 time)
{
GdkEvent event;
if ((current_dest_drag != NULL) &&
(current_dest_drag->protocol == GDK_DRAG_PROTO_LOCAL) &&
(current_dest_drag->source_window == context->source_window))
{
event.dnd.type = GDK_DRAG_LEAVE;
event.dnd.window = context->dest_window;
/* Pass ownership of context to the event */
event.dnd.context = current_dest_drag;
event.dnd.send_event = FALSE;
event.dnd.time = time;
current_dest_drag = NULL;
gdk_event_put (&event);
}
}
static void
local_send_enter (GdkDragContext *context,
guint32 time)
{
GdkDragContextPrivate *private;
GdkDragContext *new_context;
GdkEvent event;
private = GDK_DRAG_CONTEXT_PRIVATE_DATA (context);
if (!private->local_selection)
private->local_selection = gdk_atom_intern ("LocalDndSelection", FALSE);
if (current_dest_drag != NULL)
{
g_object_unref (current_dest_drag);
current_dest_drag = NULL;
}
new_context = gdk_drag_context_new ();
new_context->protocol = GDK_DRAG_PROTO_LOCAL;
new_context->is_source = FALSE;
new_context->source_window = g_object_ref (context->source_window);
new_context->dest_window = g_object_ref (context->dest_window);
new_context->targets = g_list_copy (context->targets);
gdk_window_set_events (new_context->source_window,
gdk_window_get_events (new_context->source_window) |
GDK_PROPERTY_CHANGE_MASK);
new_context->actions = context->actions;
event.dnd.type = GDK_DRAG_ENTER;
event.dnd.window = context->dest_window;
event.dnd.send_event = FALSE;
event.dnd.context = new_context;
event.dnd.time = time;
current_dest_drag = new_context;
(GDK_DRAG_CONTEXT_PRIVATE_DATA (new_context))->local_selection =
private->local_selection;
gdk_event_put (&event);
}
static void
local_send_motion (GdkDragContext *context,
gint x_root,
gint y_root,
GdkDragAction action,
guint32 time)
{
GdkEvent event;
if ((current_dest_drag != NULL) &&
(current_dest_drag->protocol == GDK_DRAG_PROTO_LOCAL) &&
(current_dest_drag->source_window == context->source_window))
{
event.dnd.type = GDK_DRAG_MOTION;
event.dnd.window = current_dest_drag->dest_window;
event.dnd.send_event = FALSE;
event.dnd.context = current_dest_drag;
event.dnd.time = time;
event.dnd.x_root = x_root;
event.dnd.y_root = y_root;
current_dest_drag->suggested_action = action;
current_dest_drag->actions = action;
(GDK_DRAG_CONTEXT_PRIVATE_DATA (current_dest_drag))->last_x = x_root;
(GDK_DRAG_CONTEXT_PRIVATE_DATA (current_dest_drag))->last_y = y_root;
GDK_DRAG_CONTEXT_PRIVATE_DATA (context)->drag_status = GDK_DRAG_STATUS_MOTION_WAIT;
gdk_event_put (&event);
}
}
static void
local_send_drop (GdkDragContext *context,
guint32 time)
{
GdkEvent event;
if ((current_dest_drag != NULL) &&
(current_dest_drag->protocol == GDK_DRAG_PROTO_LOCAL) &&
(current_dest_drag->source_window == context->source_window))
{
GdkDragContextPrivate *private;
private = GDK_DRAG_CONTEXT_PRIVATE_DATA (current_dest_drag);
event.dnd.type = GDK_DROP_START;
event.dnd.window = current_dest_drag->dest_window;
event.dnd.send_event = FALSE;
event.dnd.context = current_dest_drag;
event.dnd.time = time;
event.dnd.x_root = private->last_x;
event.dnd.y_root = private->last_y;
gdk_event_put (&event);
}
}
static void
gdk_drag_do_leave (GdkDragContext *context,
guint32 time)
{
if (context->dest_window)
{
switch (context->protocol)
{
case GDK_DRAG_PROTO_LOCAL:
local_send_leave (context, time);
break;
default:
break;
}
g_object_unref (context->dest_window);
context->dest_window = NULL;
}
}
GdkDragContext *
gdk_drag_begin (GdkWindow *window,
GList *targets)
{
GList *list;
GdkDragContext *new_context;
g_return_val_if_fail (window != NULL, NULL);
g_object_ref (window);
new_context = gdk_drag_context_new ();
new_context->is_source = TRUE;
new_context->source_window = window;
new_context->targets = NULL;
new_context->actions = 0;
for (list = targets; list; list = list->next)
new_context->targets = g_list_append (new_context->targets, list->data);
return new_context;
}
guint32
gdk_drag_get_protocol_for_display(GdkDisplay *display, guint32 xid,
GdkDragProtocol *protocol)
{
GdkWindow *window;
window = gdk_window_lookup ((GdkNativeWindow) xid);
if (window &&
g_object_get_data (G_OBJECT (window), "gdk-dnd-registered") != NULL)
{
*protocol = GDK_DRAG_PROTO_LOCAL;
return xid;
}
*protocol = GDK_DRAG_PROTO_NONE;
return 0;
}
void
gdk_drag_find_window_for_screen (GdkDragContext *context,
GdkWindow *drag_window,
GdkScreen *screen,
gint x_root,
gint y_root,
GdkWindow **dest_window,
GdkDragProtocol *protocol)
{
GdkWindow *dest;
g_return_if_fail (context != NULL);
dest = gdk_window_get_pointer (NULL, &x_root, &y_root, NULL);
if (context->dest_window != dest)
{
guint32 recipient;
/* Check if new destination accepts drags, and which protocol */
if ((recipient = gdk_drag_get_protocol (GDK_WINDOW_DFB_ID (dest),
protocol)))
{
*dest_window = gdk_window_lookup ((GdkNativeWindow) recipient);
if (dest_window)
g_object_ref (*dest_window);
}
else
*dest_window = NULL;
}
else
{
*dest_window = context->dest_window;
if (*dest_window)
g_object_ref (*dest_window);
*protocol = context->protocol;
}
}
gboolean
gdk_drag_motion (GdkDragContext *context,
GdkWindow *dest_window,
GdkDragProtocol protocol,
gint x_root,
gint y_root,
GdkDragAction suggested_action,
GdkDragAction possible_actions,
guint32 time)
{
GdkDragContextPrivate *private;
g_return_val_if_fail (context != NULL, FALSE);
private = GDK_DRAG_CONTEXT_PRIVATE_DATA (context);
if (context->dest_window != dest_window)
{
GdkEvent event;
/* Send a leave to the last destination */
gdk_drag_do_leave (context, time);
private->drag_status = GDK_DRAG_STATUS_DRAG;
/* Check if new destination accepts drags, and which protocol */
if (dest_window)
{
context->dest_window = g_object_ref (dest_window);
context->protocol = protocol;
switch (protocol)
{
case GDK_DRAG_PROTO_LOCAL:
local_send_enter (context, time);
break;
default:
break;
}
context->suggested_action = suggested_action;
}
else
{
context->dest_window = NULL;
context->action = 0;
}
/* Push a status event, to let the client know that
* the drag changed
*/
event.dnd.type = GDK_DRAG_STATUS;
event.dnd.window = context->source_window;
/* We use this to signal a synthetic status. Perhaps
* we should use an extra field...
*/
event.dnd.send_event = TRUE;
event.dnd.context = context;
event.dnd.time = time;
gdk_event_put (&event);
}
else
{
context->suggested_action = suggested_action;
}
/* Send a drag-motion event */
private->last_x = x_root;
private->last_y = y_root;
if (context->dest_window)
{
if (private->drag_status == GDK_DRAG_STATUS_DRAG)
{
switch (context->protocol)
{
case GDK_DRAG_PROTO_LOCAL:
local_send_motion (context,
x_root, y_root, suggested_action, time);
break;
case GDK_DRAG_PROTO_NONE:
g_warning ("GDK_DRAG_PROTO_NONE is not valid in gdk_drag_motion()");
break;
default:
break;
}
}
else
return TRUE;
}
return FALSE;
}
void
gdk_drag_drop (GdkDragContext *context,
guint32 time)
{
g_return_if_fail (context != NULL);
if (context->dest_window)
{
switch (context->protocol)
{
case GDK_DRAG_PROTO_LOCAL:
local_send_drop (context, time);
break;
case GDK_DRAG_PROTO_NONE:
g_warning ("GDK_DRAG_PROTO_NONE is not valid in gdk_drag_drop()");
break;
default:
break;
}
}
}
void
gdk_drag_abort (GdkDragContext *context,
guint32 time)
{
g_return_if_fail (context != NULL);
gdk_drag_do_leave (context, time);
}
/* Destination side */
void
gdk_drag_status (GdkDragContext *context,
GdkDragAction action,
guint32 time)
{
GdkDragContextPrivate *private;
GdkDragContext *src_context;
GdkEvent event;
g_return_if_fail (context != NULL);
private = GDK_DRAG_CONTEXT_PRIVATE_DATA (context);
src_context = gdk_drag_context_find (TRUE,
context->source_window,
context->dest_window);
if (src_context)
{
GdkDragContextPrivate *private;
private = GDK_DRAG_CONTEXT_PRIVATE_DATA (src_context);
if (private->drag_status == GDK_DRAG_STATUS_MOTION_WAIT)
private->drag_status = GDK_DRAG_STATUS_DRAG;
event.dnd.type = GDK_DRAG_STATUS;
event.dnd.window = src_context->source_window;
event.dnd.send_event = FALSE;
event.dnd.context = src_context;
event.dnd.time = time;
src_context->action = action;
gdk_event_put (&event);
}
}
void
gdk_drop_reply (GdkDragContext *context,
gboolean ok,
guint32 time)
{
g_return_if_fail (context != NULL);
}
void
gdk_drop_finish (GdkDragContext *context,
gboolean success,
guint32 time)
{
GdkDragContextPrivate *private;
GdkDragContext *src_context;
GdkEvent event;
g_return_if_fail (context != NULL);
private = GDK_DRAG_CONTEXT_PRIVATE_DATA (context);
src_context = gdk_drag_context_find (TRUE,
context->source_window,
context->dest_window);
if (src_context)
{
g_object_ref (src_context);
event.dnd.type = GDK_DROP_FINISHED;
event.dnd.window = src_context->source_window;
event.dnd.send_event = FALSE;
event.dnd.context = src_context;
gdk_event_put (&event);
}
}
gboolean
gdk_drag_drop_succeeded (GdkDragContext *context)
{
g_warning("gdk_drag_drop_succeeded unimplemented \n");
return TRUE;
}
void
gdk_window_register_dnd (GdkWindow *window)
{
g_return_if_fail (window != NULL);
if (g_object_get_data (G_OBJECT (window), "gdk-dnd-registered") != NULL)
return;
g_object_set_data (G_OBJECT (window),
"gdk-dnd-registered",
GINT_TO_POINTER (TRUE));
}
/*************************************************************
* gdk_drag_get_selection:
* Returns the selection atom for the current source window
* arguments:
*
* results:
*************************************************************/
GdkAtom
gdk_drag_get_selection (GdkDragContext *context)
{
g_return_val_if_fail (context != NULL, GDK_NONE);
if (context->protocol == GDK_DRAG_PROTO_LOCAL)
return (GDK_DRAG_CONTEXT_PRIVATE_DATA (context))->local_selection;
else
return GDK_NONE;
}

File diff suppressed because it is too large Load Diff

View File

@@ -1,963 +0,0 @@
/* GDK - The GIMP Drawing Kit
* Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
* Boston, MA 02111-1307, USA.
*/
/*
* Modified by the GTK+ Team and others 1997-2000. See the AUTHORS
* file for a list of people on the GTK+ Team.
*/
/*
* GTK+ DirectFB backend
* Copyright (C) 2001-2002 convergence integrated media GmbH
* Copyright (C) 2002-2004 convergence GmbH
* Written by Denis Oliver Kropp <dok@convergence.de> and
* Sven Neumann <sven@convergence.de>
*/
#include "config.h"
#include "gdk.h"
#include "gdkdirectfb.h"
#include "gdkprivate-directfb.h"
#include "gdkinternals.h"
#include "gdkkeysyms.h"
#include "gdkinput-directfb.h"
#include <string.h>
#ifndef __GDK_X_H__
#define __GDK_X_H__
gboolean gdk_net_wm_supports (GdkAtom property);
#endif
#define EventBuffer _gdk_display->buffer
#define DirectFB _gdk_display->directfb
/*********************************************
* Functions for maintaining the event queue *
*********************************************/
static GdkEvent * gdk_event_translate (DFBWindowEvent *dfbevent,
GdkWindow *window);
/*
* Private variable declarations
*/
static GList *client_filters; /* Filters for client messages */
static void
fixup_event (GdkEvent *event)
{
if (event->any.window)
g_object_ref (event->any.window);
if (((event->any.type == GDK_ENTER_NOTIFY) ||
(event->any.type == GDK_LEAVE_NOTIFY)) &&
(event->crossing.subwindow != NULL))
g_object_ref (event->crossing.subwindow);
event->any.send_event = FALSE;
}
static GdkFilterReturn
apply_filters (GdkWindow *window,
DFBWindowEvent *dfbevent,
GList *filters)
{
GdkFilterReturn result = GDK_FILTER_CONTINUE;
GdkEvent *event;
GList *node;
GList *tmp_list;
event = gdk_event_new (GDK_NOTHING);
if (window != NULL)
event->any.window = g_object_ref (window);
((GdkEventPrivate *)event)->flags |= GDK_EVENT_PENDING;
/* I think GdkFilterFunc semantics require the passed-in event
* to already be in the queue. The filter func can generate
* more events and append them after it if it likes.
*/
node = _gdk_event_queue_append ((GdkDisplay*)_gdk_display, event);
tmp_list = filters;
while (tmp_list)
{
GdkEventFilter *filter = (GdkEventFilter *) tmp_list->data;
tmp_list = tmp_list->next;
result = filter->function (dfbevent, event, filter->data);
if (result != GDK_FILTER_CONTINUE)
break;
}
if (result == GDK_FILTER_CONTINUE || result == GDK_FILTER_REMOVE)
{
_gdk_event_queue_remove_link ((GdkDisplay*)_gdk_display, node);
g_list_free_1 (node);
gdk_event_free (event);
}
else /* GDK_FILTER_TRANSLATE */
{
((GdkEventPrivate *)event)->flags &= ~GDK_EVENT_PENDING;
fixup_event (event);
}
return result;
}
static void
dfb_events_process_window_event (DFBWindowEvent *event)
{
GdkWindow *window;
/*
* Apply global filters
*
* If result is GDK_FILTER_CONTINUE, we continue as if nothing
* happened. If it is GDK_FILTER_REMOVE or GDK_FILTER_TRANSLATE,
* we return TRUE and won't dispatch the event.
*/
if (_gdk_default_filters)
{
switch (apply_filters (NULL, event, _gdk_default_filters))
{
case GDK_FILTER_REMOVE:
case GDK_FILTER_TRANSLATE:
return;
default:
break;
}
}
window = gdk_directfb_window_id_table_lookup (event->window_id);
if (!window)
return;
gdk_event_translate (event, window);
}
static gboolean
gdk_event_send_client_message_by_window (GdkEvent *event,
GdkWindow *window)
{
DFBUserEvent evt;
g_return_val_if_fail(event != NULL, FALSE);
g_return_val_if_fail(GDK_IS_WINDOW(window), FALSE);
evt.clazz = DFEC_USER;
evt.type = GPOINTER_TO_UINT (GDK_ATOM_TO_POINTER (event->client.message_type));
evt.data = (void *) event->client.data.l[0];
_gdk_display->buffer->PostEvent(_gdk_display->buffer, DFB_EVENT (&evt));
return TRUE;
}
static void
dfb_events_dispatch (void)
{
GdkDisplay *display = gdk_display_get_default ();
GdkEvent *event;
GDK_THREADS_ENTER ();
while ((event = _gdk_event_unqueue (display)) != NULL)
{
if (_gdk_event_func)
(*_gdk_event_func) (event, _gdk_event_data);
gdk_event_free (event);
}
GDK_THREADS_LEAVE ();
}
static gboolean
dfb_events_io_func (GIOChannel *channel,
GIOCondition condition,
gpointer data)
{
gsize i;
gsize read;
GIOStatus result;
DFBEvent buf[23];
DFBEvent *event;
result = g_io_channel_read_chars (channel,
(gchar *) buf, sizeof (buf), &read, NULL);
if (result == G_IO_STATUS_ERROR)
{
g_warning ("%s: GIOError occured", G_STRFUNC);
return TRUE;
}
read /= sizeof (DFBEvent);
for (i = 0, event = buf; i < read; i++, event++)
{
switch (event->clazz)
{
case DFEC_WINDOW:
/* TODO workaround to prevent two DWET_ENTER in a row from being delivered */
if (event->window.type == DWET_ENTER ) {
if ( i>0 && buf[i-1].window.type != DWET_ENTER )
dfb_events_process_window_event (&event->window);
}
else
dfb_events_process_window_event (&event->window);
break;
case DFEC_USER:
{
GList *list;
GDK_NOTE (EVENTS, g_print (" client_message"));
for (list = client_filters; list; list = list->next)
{
GdkClientFilter *filter = list->data;
DFBUserEvent *user_event = (DFBUserEvent *) event;
GdkAtom type;
type = GDK_POINTER_TO_ATOM (GUINT_TO_POINTER (user_event->type));
if (filter->type == type)
{
if (filter->function (user_event,
NULL,
filter->data) != GDK_FILTER_CONTINUE)
break;
}
}
}
break;
default:
break;
}
}
EventBuffer->Reset (EventBuffer);
dfb_events_dispatch ();
return TRUE;
}
void
_gdk_events_init (void)
{
GIOChannel *channel;
GSource *source;
DFBResult ret;
gint fd;
ret = DirectFB->CreateEventBuffer (DirectFB, &EventBuffer);
if (ret)
{
DirectFBError ("_gdk_events_init: "
"IDirectFB::CreateEventBuffer() failed", ret);
return;
}
ret = EventBuffer->CreateFileDescriptor (EventBuffer, &fd);
if (ret)
{
DirectFBError ("_gdk_events_init: "
"IDirectFBEventBuffer::CreateFileDescriptor() failed",
ret);
return;
}
channel = g_io_channel_unix_new (fd);
g_io_channel_set_encoding (channel, NULL, NULL);
g_io_channel_set_buffered (channel, FALSE);
source = g_io_create_watch (channel, G_IO_IN);
g_source_set_priority (source, G_PRIORITY_DEFAULT);
g_source_set_can_recurse (source, TRUE);
g_source_set_callback (source, (GSourceFunc) dfb_events_io_func, NULL, NULL);
g_source_attach (source, NULL);
g_source_unref (source);
}
gboolean
gdk_events_pending (void)
{
GdkDisplay *display = gdk_display_get_default ();
return _gdk_event_queue_find_first (display) ? TRUE : FALSE;
}
void
_gdk_events_queue (GdkDisplay *display)
{
}
void
gdk_flush (void)
{
gdk_display_flush ( GDK_DISPLAY_OBJECT(_gdk_display));
}
/* Sends a ClientMessage to all toplevel client windows */
gboolean
gdk_event_send_client_message_for_display (GdkDisplay *display,
GdkEvent *event,
guint32 xid)
{
GdkWindow *win = NULL;
gboolean ret = TRUE;
g_return_val_if_fail(event != NULL, FALSE);
win = gdk_window_lookup_for_display (display, (GdkNativeWindow) xid);
g_return_val_if_fail(win != NULL, FALSE);
if ((GDK_WINDOW_OBJECT(win)->window_type != GDK_WINDOW_CHILD) &&
(g_object_get_data (G_OBJECT (win), "gdk-window-child-handler")))
{
/* Managed window, check children */
GList *ltmp = NULL;
for (ltmp = GDK_WINDOW_OBJECT(win)->children; ltmp; ltmp = ltmp->next)
{
ret &= gdk_event_send_client_message_by_window (event,
GDK_WINDOW(ltmp->data));
}
}
else
{
ret &= gdk_event_send_client_message_by_window (event, win);
}
return ret;
}
/*****/
guint32
gdk_directfb_get_time (void)
{
GTimeVal tv;
g_get_current_time (&tv);
return (guint32) tv.tv_sec * 1000 + tv.tv_usec / 1000;
}
void
gdk_directfb_event_windows_add (GdkWindow *window)
{
GdkWindowImplDirectFB *impl;
g_return_if_fail (GDK_IS_WINDOW (window));
impl = GDK_WINDOW_IMPL_DIRECTFB (GDK_WINDOW_OBJECT (window)->impl);
if (!impl->window)
return;
if (EventBuffer)
impl->window->AttachEventBuffer (impl->window, EventBuffer);
else
impl->window->CreateEventBuffer (impl->window, &EventBuffer);
}
void
gdk_directfb_event_windows_remove (GdkWindow *window)
{
GdkWindowImplDirectFB *impl;
g_return_if_fail (GDK_IS_WINDOW (window));
impl = GDK_WINDOW_IMPL_DIRECTFB (GDK_WINDOW_OBJECT (window)->impl);
if (!impl->window)
return;
if (EventBuffer)
impl->window->DetachEventBuffer (impl->window, EventBuffer);
/* FIXME: should we warn if (! EventBuffer) ? */
}
GdkWindow *
gdk_directfb_child_at (GdkWindow *window,
gint *winx,
gint *winy)
{
GdkWindowObject *private;
GList *list;
g_return_val_if_fail (GDK_IS_WINDOW (window), NULL);
private = GDK_WINDOW_OBJECT (window);
for (list = private->children; list; list = list->next)
{
GdkWindowObject *win = list->data;
if (GDK_WINDOW_IS_MAPPED (win) &&
*winx >= win->x &&
*winx < win->x + GDK_DRAWABLE_IMPL_DIRECTFB (win->impl)->width &&
*winy >= win->y &&
*winy < win->y + GDK_DRAWABLE_IMPL_DIRECTFB (win->impl)->height)
{
*winx -= win->x;
*winy -= win->y;
return gdk_directfb_child_at (GDK_WINDOW (win), winx, winy );
}
}
return window;
}
static GdkEvent *
gdk_event_translate (DFBWindowEvent *dfbevent,
GdkWindow *window)
{
GdkWindowObject *private;
GdkDisplay *display;
GdkEvent *event = NULL;
g_return_val_if_fail (dfbevent != NULL, NULL);
g_return_val_if_fail (GDK_IS_WINDOW (window), NULL);
private = GDK_WINDOW_OBJECT (window);
g_object_ref (G_OBJECT (window));
/*
* Apply per-window filters
*
* If result is GDK_FILTER_CONTINUE, we continue as if nothing
* happened. If it is GDK_FILTER_REMOVE or GDK_FILTER_TRANSLATE,
* we return TRUE and won't dispatch the event.
*/
if (private->filters)
{
switch (apply_filters (window, dfbevent, private->filters))
{
case GDK_FILTER_REMOVE:
case GDK_FILTER_TRANSLATE:
g_object_unref (G_OBJECT (window));
return NULL;
default:
break;
}
}
display = gdk_drawable_get_display (GDK_DRAWABLE (window));
switch (dfbevent->type)
{
case DWET_BUTTONDOWN:
case DWET_BUTTONUP:
{
static gboolean click_grab = FALSE;
GdkWindow *child;
gint wx, wy;
guint mask;
guint button;
_gdk_directfb_mouse_x = wx = dfbevent->cx;
_gdk_directfb_mouse_y = wy = dfbevent->cy;
switch (dfbevent->button)
{
case DIBI_LEFT:
button = 1;
mask = GDK_BUTTON1_MASK;
break;
case DIBI_MIDDLE:
button = 2;
mask = GDK_BUTTON2_MASK;
break;
case DIBI_RIGHT:
button = 3;
mask = GDK_BUTTON3_MASK;
break;
default:
button = dfbevent->button + 1;
mask = 0;
break;
}
child = gdk_directfb_child_at (_gdk_parent_root, &wx, &wy);
if (_gdk_directfb_pointer_grab_window &&
(_gdk_directfb_pointer_grab_events & (dfbevent->type ==
DWET_BUTTONDOWN ?
GDK_BUTTON_PRESS_MASK :
GDK_BUTTON_RELEASE_MASK)) &&
(_gdk_directfb_pointer_grab_owner_events == FALSE ||
child == _gdk_parent_root) )
{
GdkDrawableImplDirectFB *impl;
child = _gdk_directfb_pointer_grab_window;
impl = GDK_DRAWABLE_IMPL_DIRECTFB (GDK_WINDOW_OBJECT (child)->impl);
dfbevent->x = dfbevent->cx - impl->abs_x;
dfbevent->y = dfbevent->cy - impl->abs_y;
}
else if (!_gdk_directfb_pointer_grab_window ||
(_gdk_directfb_pointer_grab_owner_events == TRUE))
{
dfbevent->x = wx;
dfbevent->y = wy;
}
else
{
child = NULL;
}
if (dfbevent->type == DWET_BUTTONDOWN)
_gdk_directfb_modifiers |= mask;
else
_gdk_directfb_modifiers &= ~mask;
if (child)
{
event =
gdk_directfb_event_make (child,
dfbevent->type == DWET_BUTTONDOWN ?
GDK_BUTTON_PRESS : GDK_BUTTON_RELEASE);
event->button.x_root = _gdk_directfb_mouse_x;
event->button.y_root = _gdk_directfb_mouse_y;
event->button.x = dfbevent->x;
event->button.y = dfbevent->y;
event->button.state = _gdk_directfb_modifiers;
event->button.button = button;
event->button.device = display->core_pointer;
GDK_NOTE (EVENTS,
g_message ("button: %d at %d,%d %s with state 0x%08x",
event->button.button,
(int)event->button.x, (int)event->button.y,
dfbevent->type == DWET_BUTTONDOWN ?
"pressed" : "released",
_gdk_directfb_modifiers));
if (dfbevent->type == DWET_BUTTONDOWN)
_gdk_event_button_generate (display, event);
}
/* Handle implicit button grabs: */
if (dfbevent->type == DWET_BUTTONDOWN && !click_grab && child)
{
if (gdk_directfb_pointer_grab (child, FALSE,
gdk_window_get_events (child),
NULL, NULL,
GDK_CURRENT_TIME,
TRUE) == GDK_GRAB_SUCCESS)
click_grab = TRUE;
}
else if (dfbevent->type == DWET_BUTTONUP &&
!(_gdk_directfb_modifiers & (GDK_BUTTON1_MASK |
GDK_BUTTON2_MASK |
GDK_BUTTON3_MASK)) && click_grab)
{
gdk_directfb_pointer_ungrab (GDK_CURRENT_TIME, TRUE);
click_grab = FALSE;
}
}
break;
case DWET_MOTION:
{
GdkWindow *event_win=NULL;
GdkWindow *child;
_gdk_directfb_mouse_x = dfbevent->cx;
_gdk_directfb_mouse_y = dfbevent->cy;
//child = gdk_directfb_child_at (window, &dfbevent->x, &dfbevent->y);
/* Go all the way to root to catch popup menus */
int wx=_gdk_directfb_mouse_x;
int wy=_gdk_directfb_mouse_y;
child = gdk_directfb_child_at (_gdk_parent_root, &wx, &wy);
/* first let's see if any cossing event has to be send */
gdk_directfb_window_send_crossing_events (NULL, child, GDK_CROSSING_NORMAL);
/* then dispatch the motion event to the window the cursor it's inside */
event_win = gdk_directfb_pointer_event_window (child, GDK_MOTION_NOTIFY);
if (event_win)
{
if (event_win == _gdk_directfb_pointer_grab_window) {
GdkDrawableImplDirectFB *impl;
child = _gdk_directfb_pointer_grab_window;
impl = GDK_DRAWABLE_IMPL_DIRECTFB (GDK_WINDOW_OBJECT (child)->impl);
dfbevent->x = _gdk_directfb_mouse_x - impl->abs_x;
dfbevent->y = _gdk_directfb_mouse_y - impl->abs_y;
}
event = gdk_directfb_event_make (child, GDK_MOTION_NOTIFY);
event->motion.x_root = _gdk_directfb_mouse_x;
event->motion.y_root = _gdk_directfb_mouse_y;
//event->motion.x = dfbevent->x;
//event->motion.y = dfbevent->y;
event->motion.x = wx;
event->motion.y = wy;
event->motion.state = _gdk_directfb_modifiers;
event->motion.is_hint = FALSE;
event->motion.device = display->core_pointer;
if (GDK_WINDOW_OBJECT (event_win)->event_mask &
GDK_POINTER_MOTION_HINT_MASK)
{
while (EventBuffer->PeekEvent (EventBuffer,
DFB_EVENT (dfbevent)) == DFB_OK
&& dfbevent->type == DWET_MOTION)
{
EventBuffer->GetEvent (EventBuffer, DFB_EVENT (dfbevent));
event->motion.is_hint = TRUE;
}
}
}
/* make sure crossing events go to the event window found */
/* GdkWindow *ev_win = ( event_win == NULL ) ? gdk_window_at_pointer (NULL,NULL) :event_win;
gdk_directfb_window_send_crossing_events (NULL,ev_win,GDK_CROSSING_NORMAL);
*/
}
break;
case DWET_GOTFOCUS:
gdk_directfb_change_focus (window);
break;
case DWET_LOSTFOCUS:
gdk_directfb_change_focus (_gdk_parent_root);
break;
case DWET_POSITION:
{
GdkWindow *event_win;
private->x = dfbevent->x;
private->y = dfbevent->y;
event_win = gdk_directfb_other_event_window (window, GDK_CONFIGURE);
if (event_win)
{
event = gdk_directfb_event_make (event_win, GDK_CONFIGURE);
event->configure.x = dfbevent->x;
event->configure.y = dfbevent->y;
event->configure.width =
GDK_DRAWABLE_IMPL_DIRECTFB (private->impl)->width;
event->configure.height =
GDK_DRAWABLE_IMPL_DIRECTFB (private->impl)->height;
}
_gdk_directfb_calc_abs (window);
}
break;
case DWET_POSITION_SIZE:
private->x = dfbevent->x;
private->y = dfbevent->y;
/* fallthru */
case DWET_SIZE:
{
GdkDrawableImplDirectFB *impl;
GdkWindow *event_win;
GList *list;
impl = GDK_DRAWABLE_IMPL_DIRECTFB (private->impl);
event_win = gdk_directfb_other_event_window (window, GDK_CONFIGURE);
if (event_win)
{
event = gdk_directfb_event_make (event_win, GDK_CONFIGURE);
event->configure.x = private->x;
event->configure.y = private->y;
event->configure.width = dfbevent->w;
event->configure.height = dfbevent->h;
}
impl->width = dfbevent->w;
impl->height = dfbevent->h;
for (list = private->children; list; list = list->next)
{
GdkWindowObject *win;
GdkDrawableImplDirectFB *impl;
win = GDK_WINDOW_OBJECT (list->data);
impl = GDK_DRAWABLE_IMPL_DIRECTFB (win->impl);
_gdk_directfb_move_resize_child (GDK_WINDOW (win),
win->x, win->y,
impl->width, impl->height);
}
_gdk_directfb_calc_abs (window);
gdk_window_clear (window);
gdk_window_invalidate_rect (window, NULL, TRUE);
}
break;
case DWET_KEYDOWN:
case DWET_KEYUP:
{
GdkEventType type = (dfbevent->type == DWET_KEYUP ?
GDK_KEY_RELEASE : GDK_KEY_PRESS);
GdkWindow *event_win =
gdk_directfb_keyboard_event_window (gdk_directfb_window_find_focus (),
type);
if (event_win)
{
event = gdk_directfb_event_make (event_win, type);
gdk_directfb_translate_key_event (dfbevent, &event->key);
}
}
break;
case DWET_LEAVE:
_gdk_directfb_mouse_x = dfbevent->cx;
_gdk_directfb_mouse_y = dfbevent->cy;
gdk_directfb_window_send_crossing_events (NULL, _gdk_parent_root,
GDK_CROSSING_NORMAL);
if (gdk_directfb_apply_focus_opacity)
{
if (GDK_WINDOW_IS_MAPPED (window))
GDK_WINDOW_IMPL_DIRECTFB (private->impl)->window->SetOpacity
(GDK_WINDOW_IMPL_DIRECTFB (private->impl)->window,
(GDK_WINDOW_IMPL_DIRECTFB (private->impl)->opacity >> 1) +
(GDK_WINDOW_IMPL_DIRECTFB (private->impl)->opacity >> 2));
}
break;
case DWET_ENTER:
{
GdkWindow *child;
_gdk_directfb_mouse_x = dfbevent->cx;
_gdk_directfb_mouse_y = dfbevent->cy;
child = gdk_directfb_child_at (window, &dfbevent->x, &dfbevent->y);
/* this makes sure pointer is set correctly when it previously left
* a window being not standard shaped
*/
gdk_window_set_cursor (window, NULL);
gdk_directfb_window_send_crossing_events (NULL, child,
GDK_CROSSING_NORMAL);
if (gdk_directfb_apply_focus_opacity)
{
GDK_WINDOW_IMPL_DIRECTFB (private->impl)->window->SetOpacity
(GDK_WINDOW_IMPL_DIRECTFB (private->impl)->window,
GDK_WINDOW_IMPL_DIRECTFB (private->impl)->opacity);
}
}
break;
case DWET_CLOSE:
{
GdkWindow *event_win;
event_win = gdk_directfb_other_event_window (window, GDK_DELETE);
if (event_win)
event = gdk_directfb_event_make (event_win, GDK_DELETE);
}
break;
case DWET_DESTROYED:
{
GdkWindow *event_win;
event_win = gdk_directfb_other_event_window (window, GDK_DESTROY);
if (event_win)
event = gdk_directfb_event_make (event_win, GDK_DESTROY);
gdk_window_destroy_notify (window);
}
break;
case DWET_WHEEL:
{
GdkWindow *event_win;
_gdk_directfb_mouse_x = dfbevent->cx;
_gdk_directfb_mouse_y = dfbevent->cy;
if (_gdk_directfb_pointer_grab_window)
{
GdkDrawableImplDirectFB *impl;
event_win = _gdk_directfb_pointer_grab_window;
impl =
GDK_DRAWABLE_IMPL_DIRECTFB (GDK_WINDOW_OBJECT (event_win)->impl);
dfbevent->x = dfbevent->cx - impl->abs_x;
dfbevent->y = dfbevent->cy - impl->abs_y;
}
else
{
event_win = gdk_directfb_child_at (window,
&dfbevent->x, &dfbevent->y);
}
if (event_win)
{
event = gdk_directfb_event_make (event_win, GDK_SCROLL);
event->scroll.direction = (dfbevent->step < 0 ?
GDK_SCROLL_DOWN : GDK_SCROLL_UP);
event->scroll.x_root = _gdk_directfb_mouse_x;
event->scroll.y_root = _gdk_directfb_mouse_y;
event->scroll.x = dfbevent->x;
event->scroll.y = dfbevent->y;
event->scroll.state = _gdk_directfb_modifiers;
event->scroll.device = display->core_pointer;
}
}
break;
default:
g_message ("unhandled DirectFB windowing event 0x%08x", dfbevent->type);
}
g_object_unref (G_OBJECT (window));
return event;
}
gboolean
gdk_screen_get_setting (GdkScreen *screen,
const gchar *name,
GValue *value)
{
return FALSE;
}
void
gdk_display_add_client_message_filter (GdkDisplay *display,
GdkAtom message_type,
GdkFilterFunc func,
gpointer data)
{
/* XXX: display should be used */
GdkClientFilter *filter = g_new (GdkClientFilter, 1);
filter->type = message_type;
filter->function = func;
filter->data = data;
client_filters = g_list_append (client_filters, filter);
}
void
gdk_add_client_message_filter (GdkAtom message_type,
GdkFilterFunc func,
gpointer data)
{
gdk_display_add_client_message_filter (gdk_display_get_default (),
message_type, func, data);
}
void
gdk_screen_broadcast_client_message (GdkScreen *screen,
GdkEvent *sev)
{
GdkWindow *root_window;
GdkWindowObject *private;
GList *top_level = NULL;
g_return_if_fail (GDK_IS_SCREEN (screen));
g_return_if_fail(sev != NULL);
root_window = gdk_screen_get_root_window (screen);
g_return_if_fail(GDK_IS_WINDOW(root_window));
private = GDK_WINDOW_OBJECT (root_window);
for (top_level = private->children; top_level; top_level = top_level->next)
{
gdk_event_send_client_message_for_display (gdk_drawable_get_display(GDK_DRAWABLE(root_window)),
sev,
(guint32)(GDK_WINDOW_DFB_ID(GDK_WINDOW(top_level->data))));
}
}
/**
* gdk_net_wm_supports:
* @property: a property atom.
*
* This function is specific to the X11 backend of GDK, and indicates
* whether the window manager for the default screen supports a certain
* hint from the Extended Window Manager Hints Specification. See
* gdk_x11_screen_supports_net_wm_hint() for complete details.
*
* Return value: %TRUE if the window manager supports @property
**/
gboolean
gdk_net_wm_supports (GdkAtom property)
{
return FALSE;
}
void
_gdk_windowing_event_data_copy (const GdkEvent *src,
GdkEvent *dst)
{
}
void
_gdk_windowing_event_data_free (GdkEvent *event)
{
}

View File

@@ -1,386 +0,0 @@
/* GDK - The GIMP Drawing Kit
* Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
* Boston, MA 02111-1307, USA.
*/
/*
* Modified by the GTK+ Team and others 1997-2000. See the AUTHORS
* file for a list of people on the GTK+ Team.
*/
/*
* GTK+ DirectFB backend
* Copyright (C) 2001-2002 convergence integrated media GmbH
* Copyright (C) 2002-2004 convergence GmbH
* Written by Denis Oliver Kropp <dok@convergence.de> and
* Sven Neumann <sven@convergence.de>
*/
#undef GDK_DISABLE_DEPRECATED
#include "config.h"
#include "gdk.h"
#include <string.h>
#include "gdkdirectfb.h"
#include "gdkprivate-directfb.h"
#include "gdkgc.h"
#include "gdkpixmap.h"
static void gdk_directfb_gc_get_values (GdkGC *gc,
GdkGCValues *values);
static void gdk_directfb_gc_set_values (GdkGC *gc,
GdkGCValues *values,
GdkGCValuesMask values_mask);
static void gdk_directfb_gc_set_dashes (GdkGC *gc,
gint dash_offset,
gint8 dash_list[],
gint n);
static void gdk_gc_directfb_finalize (GObject *object);
G_DEFINE_TYPE (GdkGCDirectFB, _gdk_gc_directfb, GDK_TYPE_GC)
static void
_gdk_gc_directfb_init (GdkGCDirectFB *directfb_gc)
{
}
static void
_gdk_gc_directfb_class_init (GdkGCDirectFBClass *klass)
{
GObjectClass *object_class = G_OBJECT_CLASS (klass);
GdkGCClass *gc_class = GDK_GC_CLASS (klass);
object_class->finalize = gdk_gc_directfb_finalize;
gc_class->get_values = gdk_directfb_gc_get_values;
gc_class->set_values = gdk_directfb_gc_set_values;
gc_class->set_dashes = gdk_directfb_gc_set_dashes;
}
static void
gdk_gc_directfb_finalize (GObject *object)
{
GdkGCDirectFB *directfb_gc = GDK_GC_DIRECTFB (object);
if (directfb_gc->clip_region.numRects)
temp_region_deinit (&directfb_gc->clip_region);
if (directfb_gc->values.clip_mask)
g_object_unref (directfb_gc->values.clip_mask);
if (directfb_gc->values.stipple)
g_object_unref (directfb_gc->values.stipple);
if (directfb_gc->values.tile)
g_object_unref (directfb_gc->values.tile);
G_OBJECT_CLASS (_gdk_gc_directfb_parent_class)->finalize (object);
}
GdkGC *
_gdk_directfb_gc_new (GdkDrawable *drawable,
GdkGCValues *values,
GdkGCValuesMask values_mask)
{
GdkGC *gc;
GdkGCDirectFB *private;
/* NOTICE that the drawable here has to be the impl drawable, not the
publicly visible drawable. */
g_return_val_if_fail (GDK_IS_DRAWABLE_IMPL_DIRECTFB (drawable), NULL);
gc = GDK_GC (g_object_new (_gdk_gc_directfb_get_type (), NULL));
_gdk_gc_init (gc, drawable, values, values_mask);
private = GDK_GC_DIRECTFB (gc);
#if 0
private->values.background.pixel = 0;
private->values.background.red =
private->values.background.green =
private->values.background.blue = 0;
private->values.foreground.pixel = 0;
private->values.foreground.red =
private->values.foreground.green =
private->values.foreground.blue = 0;
#endif
private->values.cap_style = GDK_CAP_BUTT;
gdk_directfb_gc_set_values (gc, values, values_mask);
return gc;
}
static void
gdk_directfb_gc_get_values (GdkGC *gc,
GdkGCValues *values)
{
*values = GDK_GC_DIRECTFB (gc)->values;
}
#if 0
void
_gdk_windowing_gc_get_foreground (GdkGC *gc,
GdkColor *color)
{
GdkGCDirectFB *private;
private = GDK_GC_DIRECTFB (gc);
*color =private->values.foreground;
}
#endif
static void
gdk_directfb_gc_set_values (GdkGC *gc,
GdkGCValues *values,
GdkGCValuesMask values_mask)
{
GdkGCDirectFB *private = GDK_GC_DIRECTFB (gc);
if (values_mask & GDK_GC_FOREGROUND)
{
private->values.foreground = values->foreground;
private->values_mask |= GDK_GC_FOREGROUND;
}
if (values_mask & GDK_GC_BACKGROUND)
{
private->values.background = values->background;
private->values_mask |= GDK_GC_BACKGROUND;
}
if (values_mask & GDK_GC_FUNCTION)
{
private->values.function = values->function;
private->values_mask |= GDK_GC_FUNCTION;
}
if (values_mask & GDK_GC_FILL)
{
private->values.fill = values->fill;
private->values_mask |= GDK_GC_FILL;
}
if (values_mask & GDK_GC_TILE)
{
GdkPixmap *oldpm = private->values.tile;
if (values->tile)
g_assert (GDK_PIXMAP_OBJECT (values->tile)->depth > 1);
private->values.tile = values->tile ? g_object_ref (values->tile) : NULL;
private->values_mask |= GDK_GC_TILE;
if (oldpm)
g_object_unref (oldpm);
}
if (values_mask & GDK_GC_STIPPLE)
{
GdkPixmap *oldpm = private->values.stipple;
if (values->stipple)
g_assert (GDK_PIXMAP_OBJECT (values->stipple)->depth == 1);
private->values.stipple = (values->stipple ?
g_object_ref (values->stipple) : NULL);
private->values_mask |= GDK_GC_STIPPLE;
if (oldpm)
g_object_unref (oldpm);
}
if (values_mask & GDK_GC_CLIP_MASK)
{
GdkPixmap *oldpm = private->values.clip_mask;
private->values.clip_mask = (values->clip_mask ?
g_object_ref (values->clip_mask) : NULL);
private->values_mask |= GDK_GC_CLIP_MASK;
if (oldpm)
g_object_unref (oldpm);
temp_region_reset (&private->clip_region);
}
if (values_mask & GDK_GC_SUBWINDOW)
{
private->values.subwindow_mode = values->subwindow_mode;
private->values_mask |= GDK_GC_SUBWINDOW;
}
if (values_mask & GDK_GC_TS_X_ORIGIN)
{
private->values.ts_x_origin = values->ts_x_origin;
private->values_mask |= GDK_GC_TS_X_ORIGIN;
}
if (values_mask & GDK_GC_TS_Y_ORIGIN)
{
private->values.ts_y_origin = values->ts_y_origin;
private->values_mask |= GDK_GC_TS_Y_ORIGIN;
}
if (values_mask & GDK_GC_CLIP_X_ORIGIN)
{
private->values.clip_x_origin = GDK_GC (gc)->clip_x_origin = values->clip_x_origin;
private->values_mask |= GDK_GC_CLIP_X_ORIGIN;
}
if (values_mask & GDK_GC_CLIP_Y_ORIGIN)
{
private->values.clip_y_origin = GDK_GC (gc)->clip_y_origin = values->clip_y_origin;
private->values_mask |= GDK_GC_CLIP_Y_ORIGIN;
}
if (values_mask & GDK_GC_EXPOSURES)
{
private->values.graphics_exposures = values->graphics_exposures;
private->values_mask |= GDK_GC_EXPOSURES;
}
if (values_mask & GDK_GC_LINE_WIDTH)
{
private->values.line_width = values->line_width;
private->values_mask |= GDK_GC_LINE_WIDTH;
}
if (values_mask & GDK_GC_LINE_STYLE)
{
private->values.line_style = values->line_style;
private->values_mask |= GDK_GC_LINE_STYLE;
}
if (values_mask & GDK_GC_CAP_STYLE)
{
private->values.cap_style = values->cap_style;
private->values_mask |= GDK_GC_CAP_STYLE;
}
if (values_mask & GDK_GC_JOIN_STYLE)
{
private->values.join_style = values->join_style;
private->values_mask |= GDK_GC_JOIN_STYLE;
}
}
static void
gdk_directfb_gc_set_dashes (GdkGC *gc,
gint dash_offset,
gint8 dash_list[],
gint n)
{
g_warning ("gdk_directfb_gc_set_dashes not implemented");
}
static void
gc_unset_clip_mask (GdkGC *gc)
{
GdkGCDirectFB *data = GDK_GC_DIRECTFB (gc);
if (data->values.clip_mask)
{
g_object_unref (data->values.clip_mask);
data->values.clip_mask = NULL;
data->values_mask &= ~ GDK_GC_CLIP_MASK;
}
}
void
_gdk_windowing_gc_set_clip_region (GdkGC *gc,
const cairo_region_t *region,
gboolean reset_origin)
{
GdkGCDirectFB *data;
g_return_if_fail (gc != NULL);
data = GDK_GC_DIRECTFB (gc);
if (region == &data->clip_region)
return;
if (region)
temp_region_init_copy (&data->clip_region, region);
else
temp_region_reset (&data->clip_region);
if (reset_origin)
{
gc->clip_x_origin = 0;
gc->clip_y_origin = 0;
data->values.clip_x_origin = 0;
data->values.clip_y_origin = 0;
}
gc_unset_clip_mask (gc);
}
void
_gdk_windowing_gc_copy (GdkGC *dst_gc,
GdkGC *src_gc)
{
GdkGCDirectFB *dst_private;
g_return_if_fail (dst_gc != NULL);
g_return_if_fail (src_gc != NULL);
dst_private = GDK_GC_DIRECTFB (dst_gc);
temp_region_reset(&dst_private->clip_region);
if (dst_private->values_mask & GDK_GC_TILE)
g_object_unref (dst_private->values.tile);
if (dst_private->values_mask & GDK_GC_STIPPLE)
g_object_unref (dst_private->values.stipple);
if (dst_private->values_mask & GDK_GC_CLIP_MASK)
g_object_unref (dst_private->values.clip_mask);
*dst_gc = *src_gc;
if (dst_private->values_mask & GDK_GC_TILE)
g_object_ref (dst_private->values.tile);
if (dst_private->values_mask & GDK_GC_STIPPLE)
g_object_ref (dst_private->values.stipple);
if (dst_private->values_mask & GDK_GC_CLIP_MASK)
g_object_ref (dst_private->values.clip_mask);
}
/**
* gdk_gc_get_screen:
* @gc: a #GdkGC.
*
* Gets the #GdkScreen for which @gc was created
*
* Returns: the #GdkScreen for @gc.
*
* Since: 2.2
*/
GdkScreen *
gdk_gc_get_screen (GdkGC *gc)
{
g_return_val_if_fail (GDK_IS_GC_DIRECTFB (gc), NULL);
return _gdk_screen;
}

View File

@@ -1,254 +0,0 @@
/* GDK - The GIMP Drawing Kit
* Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
* Boston, MA 02111-1307, USA.
*/
/*
* Modified by the GTK+ Team and others 1997-2000. See the AUTHORS
* file for a list of people on the GTK+ Team.
*/
/*
* GTK+ DirectFB backend
* Copyright (C) 2001-2002 convergence integrated media GmbH
* Copyright (C) 2002-2004 convergence GmbH
* Written by Denis Oliver Kropp <dok@convergence.de> and
* Sven Neumann <sven@convergence.de>
*/
#include "config.h"
#include "gdk.h" /* For gdk_rectangle_intersect */
#include "gdkdirectfb.h"
#include "gdkprivate-directfb.h"
#include "gdkinternals.h"
void
_gdk_directfb_window_get_offsets (GdkWindow *window,
gint *x_offset,
gint *y_offset)
{
if (x_offset)
*x_offset = 0;
if (y_offset)
*y_offset = 0;
}
gboolean
_gdk_windowing_window_queue_antiexpose (GdkWindow *window,
cairo_region_t *area)
{
return FALSE;
}
/**
* gdk_window_scroll:
* @window: a #GdkWindow
* @dx: Amount to scroll in the X direction
* @dy: Amount to scroll in the Y direction
*
* Scroll the contents of its window, both pixels and children, by
* the given amount. Portions of the window that the scroll operation
* brings in from offscreen areas are invalidated.
**/
void
_gdk_directfb_window_scroll (GdkWindow *window,
gint dx,
gint dy)
{
GdkWindowObject *private;
GdkDrawableImplDirectFB *impl;
cairo_region_t *invalidate_region = NULL;
GList *list;
g_return_if_fail (GDK_IS_WINDOW (window));
if (GDK_WINDOW_DESTROYED (window))
return;
private = GDK_WINDOW_OBJECT (window);
impl = GDK_DRAWABLE_IMPL_DIRECTFB (private->impl);
if (dx == 0 && dy == 0)
return;
/* Move the current invalid region */
if (private->update_area)
cairo_region_translate (private->update_area, dx, dy);
if (GDK_WINDOW_IS_MAPPED (window))
{
GdkRectangle clip_rect = { 0, 0, impl->width, impl->height };
GdkRectangle rect = { dx, dy, impl->width, impl->height };
invalidate_region = cairo_region_create_rectangle (&clip_rect);
if (gdk_rectangle_intersect (&rect, &clip_rect, &rect) &&
(!private->update_area ||
!cairo_region_contains_rectangle (private->update_area, &rect)))
{
cairo_region_t *region;
region = cairo_region_create_rectangle (&rect);
cairo_region_subtract (invalidate_region, region);
cairo_region_destroy (region);
if (impl->surface)
{
DFBRegion update = { rect.x, rect.y,
rect.x + rect.width - 1,
rect.y + rect.height - 1 };
impl->surface->SetClip (impl->surface, &update);
impl->surface->Blit (impl->surface, impl->surface, NULL, dx, dy);
impl->surface->SetClip (impl->surface, NULL);
impl->surface->Flip(impl->surface,&update,0);
}
}
}
for (list = private->children; list; list = list->next)
{
GdkWindowObject *obj = GDK_WINDOW_OBJECT (list->data);
GdkDrawableImplDirectFB *obj_impl = GDK_DRAWABLE_IMPL_DIRECTFB (obj->impl);
_gdk_directfb_move_resize_child (list->data,
obj->x + dx,
obj->y + dy,
obj_impl->width,
obj_impl->height);
}
_gdk_directfb_calc_abs (window);
if (invalidate_region)
{
gdk_window_invalidate_region (window, invalidate_region, TRUE);
cairo_region_destroy (invalidate_region);
}
}
/**
* gdk_window_move_region:
* @window: a #GdkWindow
* @region: The #cairo_region_t to move
* @dx: Amount to move in the X direction
* @dy: Amount to move in the Y direction
*
* Move the part of @window indicated by @region by @dy pixels in the Y
* direction and @dx pixels in the X direction. The portions of @region
* that not covered by the new position of @region are invalidated.
*
* Child windows are not moved.
*
* Since: 2.8
**/
void
_gdk_directfb_window_move_region (GdkWindow *window,
const cairo_region_t *region,
gint dx,
gint dy)
{
GdkWindowObject *private;
GdkDrawableImplDirectFB *impl;
cairo_region_t *window_clip;
cairo_region_t *src_region;
cairo_region_t *brought_in;
cairo_region_t *dest_region;
cairo_region_t *moving_invalid_region;
GdkRectangle dest_extents;
g_return_if_fail (GDK_IS_WINDOW (window));
g_return_if_fail (region != NULL);
if (GDK_WINDOW_DESTROYED (window))
return;
private = GDK_WINDOW_OBJECT (window);
impl = GDK_DRAWABLE_IMPL_DIRECTFB (private->impl);
if (dx == 0 && dy == 0)
return;
GdkRectangle clip_rect = { 0, 0, impl->width, impl->height };
window_clip = cairo_region_create_rectangle (&clip_rect);
/* compute source regions */
src_region = cairo_region_copy (region);
brought_in = cairo_region_copy (region);
cairo_region_intersect (src_region, window_clip);
cairo_region_subtract (brought_in, src_region);
cairo_region_translate (brought_in, dx, dy);
/* compute destination regions */
dest_region = cairo_region_copy (src_region);
cairo_region_translate (dest_region, dx, dy);
cairo_region_intersect (dest_region, window_clip);
cairo_region_get_extents (dest_region, &dest_extents);
cairo_region_destroy (window_clip);
/* calculating moving part of current invalid area */
moving_invalid_region = NULL;
if (private->update_area)
{
moving_invalid_region = cairo_region_copy (private->update_area);
cairo_region_intersect (moving_invalid_region, src_region);
cairo_region_translate (moving_invalid_region, dx, dy);
}
/* invalidate all of the src region */
gdk_window_invalidate_region (window, src_region, FALSE);
/* un-invalidate destination region */
if (private->update_area)
cairo_region_subtract (private->update_area, dest_region);
/* invalidate moving parts of existing update area */
if (moving_invalid_region)
{
gdk_window_invalidate_region (window, moving_invalid_region, FALSE);
cairo_region_destroy (moving_invalid_region);
}
/* invalidate area brought in from off-screen */
gdk_window_invalidate_region (window, brought_in, FALSE);
cairo_region_destroy (brought_in);
/* Actually do the moving */
if (impl->surface)
{
DFBRectangle source = { dest_extents.x - dx,
dest_extents.y - dy,
dest_extents.width,
dest_extents.height};
DFBRegion destination = { dest_extents.x,
dest_extents.y,
dest_extents.x+dest_extents.width-1,
dest_extents.y+dest_extents.height-1};
impl->surface->SetClip (impl->surface, &destination);
impl->surface->Blit (impl->surface, impl->surface,&source,dx,dy);
impl->surface->SetClip (impl->surface, NULL);
impl->surface->Flip(impl->surface,&destination,0);
}
cairo_region_destroy (src_region);
cairo_region_destroy (dest_region);
}

View File

@@ -1,58 +0,0 @@
/* GDK - The GIMP Drawing Kit
* Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
* Boston, MA 02111-1307, USA.
*/
/*
* Modified by the GTK+ Team and others 1997-2000. See the AUTHORS
* file for a list of people on the GTK+ Team.
*/
/*
* GTK+ DirectFB backend
* Copyright (C) 2001-2002 convergence integrated media GmbH
* Copyright (C) 2002-2004 convergence GmbH
* Written by Denis Oliver Kropp <dok@convergence.de> and
* Sven Neumann <sven@convergence.de>
*/
#include "config.h"
#include "gdk.h"
#include "gdkdirectfb.h"
#include "gdkprivate-directfb.h"
GdkDisplayDFB *_gdk_display = NULL;
GdkScreen * _gdk_screen = NULL;
gboolean gdk_directfb_apply_focus_opacity = FALSE;
gboolean gdk_directfb_enable_color_keying = FALSE;
DFBColor gdk_directfb_bg_color = { 0, 0, 0, 0 };
DFBColor gdk_directfb_bg_color_key = { 0, 0, 0, 0 };
gboolean gdk_directfb_monochrome_fonts = FALSE;
GdkWindow * _gdk_directfb_pointer_grab_window = NULL;
GdkWindow * _gdk_directfb_keyboard_grab_window = NULL;
GdkWindow * _gdk_directfb_pointer_grab_confine = NULL;
gboolean _gdk_directfb_pointer_grab_owner_events = FALSE;
gboolean _gdk_directfb_keyboard_grab_owner_events = FALSE;
GdkEventMask _gdk_directfb_pointer_grab_events = 0;
GdkEventMask _gdk_directfb_keyboard_grab_events = 0;
GdkCursor * _gdk_directfb_pointer_grab_cursor = NULL;
GdkAtom _gdk_selection_property = 0;

View File

@@ -1,60 +0,0 @@
/* GDK - The GIMP Drawing Kit
* Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
* Boston, MA 02111-1307, USA.
*/
/*
* Modified by the GTK+ Team and others 1997-2000. See the AUTHORS
* file for a list of people on the GTK+ Team.
*/
/*
* GTK+ DirectFB backend
* Copyright (C) 2001-2002 convergence integrated media GmbH
* Copyright (C) 2002-2004 convergence GmbH
* Written by Denis Oliver Kropp <dok@convergence.de> and
* Sven Neumann <sven@convergence.de>
*/
#include "config.h"
#include <string.h>
#include <locale.h>
#include "gdkdirectfb.h"
/*
*--------------------------------------------------------------
* gdk_set_locale
*
* Arguments:
*
* Results:
*
* Side effects:
*
*--------------------------------------------------------------
*/
gchar*
gdk_set_locale (void)
{
if (!setlocale (LC_ALL,""))
g_warning ("locale not supported by C library");
return setlocale (LC_ALL, NULL);
}

View File

@@ -1,405 +0,0 @@
/* GDK - The GIMP Drawing Kit
* Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
* Boston, MA 02111-1307, USA.
*/
/*
* Modified by the GTK+ Team and others 1997-2000. See the AUTHORS
* file for a list of people on the GTK+ Team.
*/
/*
* GTK+ DirectFB backend
* Copyright (C) 2001-2002 convergence integrated media GmbH
* Copyright (C) 2002-2004 convergence GmbH
* Written by Denis Oliver Kropp <dok@convergence.de> and
* Sven Neumann <sven@convergence.de>
*/
#include "config.h"
#include "gdk.h"
#include "gdkdirectfb.h"
#include "gdkprivate-directfb.h"
#include "gdkinternals.h"
#include "gdkimage.h"
static GList *image_list = NULL;
static gpointer parent_class = NULL;
static void gdk_directfb_image_destroy (GdkImage *image);
static void gdk_image_init (GdkImage *image);
static void gdk_image_class_init (GdkImageClass *klass);
static void gdk_image_finalize (GObject *object);
GType
gdk_image_get_type (void)
{
static GType object_type = 0;
if (!object_type)
{
const GTypeInfo object_info =
{
sizeof (GdkImageClass),
(GBaseInitFunc) NULL,
(GBaseFinalizeFunc) NULL,
(GClassInitFunc) gdk_image_class_init,
NULL, /* class_finalize */
NULL, /* class_data */
sizeof (GdkImage),
0, /* n_preallocs */
(GInstanceInitFunc) gdk_image_init,
};
object_type = g_type_register_static (G_TYPE_OBJECT,
"GdkImage",
&object_info, 0);
}
return object_type;
}
static void
gdk_image_init (GdkImage *image)
{
image->windowing_data = g_new0 (GdkImageDirectFB, 1);
image->mem = NULL;
image_list = g_list_prepend (image_list, image);
}
static void
gdk_image_class_init (GdkImageClass *klass)
{
GObjectClass *object_class = G_OBJECT_CLASS (klass);
parent_class = g_type_class_peek_parent (klass);
object_class->finalize = gdk_image_finalize;
}
static void
gdk_image_finalize (GObject *object)
{
GdkImage *image;
image = GDK_IMAGE (object);
image_list = g_list_remove (image_list, image);
if (image->depth == 1)
g_free (image->mem);
gdk_directfb_image_destroy (image);
if (G_OBJECT_CLASS (parent_class)->finalize)
G_OBJECT_CLASS (parent_class)->finalize (object);
}
/* this function is called from the atexit handler! */
void
_gdk_image_exit (void)
{
GObject *image;
while (image_list)
{
image = image_list->data;
gdk_image_finalize (image);
}
}
void
_gdk_windowing_image_init (void)
{
}
GdkImage*
_gdk_image_new_for_depth (GdkScreen *screen,
GdkImageType type,
GdkVisual *visual,
gint width,
gint height,
gint depth)
{
GdkImage *image;
GdkImageDirectFB *private;
DFBResult ret;
gint pitch;
DFBSurfacePixelFormat format;
IDirectFBSurface *surface;
if (type == GDK_IMAGE_FASTEST || type == GDK_IMAGE_NORMAL)
type = GDK_IMAGE_SHARED;
if (visual)
depth = visual->depth;
switch (depth)
{
case 8:
format = DSPF_LUT8;
break;
case 15:
format = DSPF_ARGB1555;
break;
case 16:
format = DSPF_RGB16;
break;
case 24:
format = DSPF_RGB32;
break;
case 32:
format = DSPF_ARGB;
break;
default:
g_message ("unimplemented %s for depth %d", G_STRFUNC, depth);
return NULL;
}
surface = gdk_display_dfb_create_surface(_gdk_display,format,width,height);
if (!surface)
{
return NULL;
}
surface->GetPixelFormat( surface, &format );
image = g_object_new (gdk_image_get_type (), NULL);
private = image->windowing_data;
private->surface = surface;
ret = surface->Lock( surface, DSLF_WRITE, &image->mem, &pitch );
if (ret)
{
DirectFBError( "IDirectFBSurface::Lock() for writing failed!\n", ret );
g_object_unref( image );
return NULL;
}
image->type = type;
image->visual = visual;
#if G_BYTE_ORDER == G_BIG_ENDIAN
image->byte_order = GDK_MSB_FIRST;
#else
image->byte_order = GDK_LSB_FIRST;
#endif
image->width = width;
image->height = height;
image->depth = depth;
image->bpp = DFB_BYTES_PER_PIXEL (format);
image->bpl = pitch;
image->bits_per_pixel = DFB_BITS_PER_PIXEL (format);
image_list = g_list_prepend (image_list, image);
return image;
}
GdkImage*
_gdk_directfb_copy_to_image (GdkDrawable *drawable,
GdkImage *image,
gint src_x,
gint src_y,
gint dest_x,
gint dest_y,
gint width,
gint height)
{
GdkDrawableImplDirectFB *impl;
GdkImageDirectFB *private;
int pitch;
DFBRectangle rect = { src_x, src_y, width, height };
IDirectFBDisplayLayer *layer = _gdk_display->layer;
g_return_val_if_fail (GDK_IS_DRAWABLE_IMPL_DIRECTFB (drawable), NULL);
g_return_val_if_fail (image != NULL || (dest_x == 0 && dest_y == 0), NULL);
impl = GDK_DRAWABLE_IMPL_DIRECTFB (drawable);
if (impl->wrapper == _gdk_parent_root)
{
DFBResult ret;
ret = layer->SetCooperativeLevel (layer, DLSCL_ADMINISTRATIVE);
if (ret)
{
DirectFBError ("_gdk_directfb_copy_to_image - SetCooperativeLevel",
ret);
return NULL;
}
ret = layer->GetSurface (layer, &impl->surface);
if (ret)
{
layer->SetCooperativeLevel (layer, DLSCL_SHARED);
DirectFBError ("_gdk_directfb_copy_to_image - GetSurface", ret);
return NULL;
}
}
if (! impl->surface)
return NULL;
if (!image)
image = gdk_image_new (GDK_IMAGE_NORMAL,
gdk_drawable_get_visual (drawable), width, height);
private = image->windowing_data;
private->surface->Unlock( private->surface );
private->surface->Blit( private->surface,
impl->surface, &rect, dest_x, dest_y );
private->surface->Lock( private->surface, DSLF_READ | DSLF_WRITE, &image->mem, &pitch );
image->bpl = pitch;
if (impl->wrapper == _gdk_parent_root)
{
impl->surface->Release (impl->surface);
impl->surface = NULL;
layer->SetCooperativeLevel (layer, DLSCL_SHARED);
}
return image;
}
guint32
gdk_image_get_pixel (GdkImage *image,
gint x,
gint y)
{
guint32 pixel = 0;
g_return_val_if_fail (GDK_IS_IMAGE (image), 0);
if (!(x >= 0 && x < image->width && y >= 0 && y < image->height))
return 0;
if (image->depth == 1)
pixel = (((guchar *) image->mem)[y * image->bpl + (x >> 3)] & (1 << (7 - (x & 0x7)))) != 0;
else
{
guchar *pixelp = (guchar *) image->mem + y * image->bpl + x * image->bpp;
switch (image->bpp)
{
case 1:
pixel = *pixelp;
break;
case 2:
pixel = pixelp[0] | (pixelp[1] << 8);
break;
case 3:
pixel = pixelp[0] | (pixelp[1] << 8) | (pixelp[2] << 16);
break;
case 4:
pixel = pixelp[0] | (pixelp[1] << 8) | (pixelp[2] << 16);
break;
}
}
return pixel;
}
void
gdk_image_put_pixel (GdkImage *image,
gint x,
gint y,
guint32 pixel)
{
g_return_if_fail (image != NULL);
if (!(x >= 0 && x < image->width && y >= 0 && y < image->height))
return;
if (image->depth == 1)
if (pixel & 1)
((guchar *) image->mem)[y * image->bpl + (x >> 3)] |= (1 << (7 - (x & 0x7)));
else
((guchar *) image->mem)[y * image->bpl + (x >> 3)] &= ~(1 << (7 - (x & 0x7)));
else
{
guchar *pixelp = (guchar *) image->mem + y * image->bpl + x * image->bpp;
switch (image->bpp)
{
case 4:
pixelp[3] = 0xFF;
case 3:
pixelp[2] = ((pixel >> 16) & 0xFF);
case 2:
pixelp[1] = ((pixel >> 8) & 0xFF);
case 1:
pixelp[0] = (pixel & 0xFF);
}
}
}
static void
gdk_directfb_image_destroy (GdkImage *image)
{
GdkImageDirectFB *private;
g_return_if_fail (GDK_IS_IMAGE (image));
private = image->windowing_data;
if (!private)
return;
GDK_NOTE (MISC, g_print ("gdk_directfb_image_destroy: %#lx\n",
(gulong) private->surface));
private->surface->Unlock( private->surface );
private->surface->Release( private->surface );
g_free (private);
image->windowing_data = NULL;
}
gint
_gdk_windowing_get_bits_for_depth (GdkDisplay *display,
gint depth)
{
switch (depth)
{
case 1:
case 8:
return 8;
case 15:
case 16:
return 16;
case 24:
case 32:
return 32;
}
return 0;
}

View File

@@ -1,327 +0,0 @@
/* GDK - The GIMP Drawing Kit
* Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald
* Copyright (C) 1999 Tor Lillqvist
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
* Boston, MA 02111-1307, USA.
*/
/*
* Modified by the GTK+ Team and others 1997-2000. See the AUTHORS
* file for a list of people on the GTK+ Team.
*/
/*
* GTK+ DirectFB backend
* Copyright (C) 2001-2002 convergence integrated media GmbH
* Copyright (C) 2002-2004 convergence GmbH
* Written by Denis Oliver Kropp <dok@convergence.de> and
* Sven Neumann <sven@convergence.de>
*/
#include "config.h"
#include "gdk.h"
#include "gdkdirectfb.h"
#include "gdkprivate-directfb.h"
#include "gdkinput-directfb.h"
#include "gdkinput.h"
#include "gdkkeysyms.h"
static GdkDeviceAxis gdk_input_core_axes[] =
{
{ GDK_AXIS_X, 0, 0 },
{ GDK_AXIS_Y, 0, 0 }
};
GdkDevice * _gdk_core_pointer = NULL;
GList * _gdk_input_devices = NULL;
gboolean _gdk_input_ignore_core = FALSE;
int _gdk_directfb_mouse_x = 0;
int _gdk_directfb_mouse_y = 0;
void
_gdk_init_input_core (void)
{
GdkDisplay *display = GDK_DISPLAY_OBJECT(_gdk_display);
_gdk_core_pointer = g_object_new (GDK_TYPE_DEVICE, NULL);
_gdk_core_pointer->name = "Core Pointer";
_gdk_core_pointer->source = GDK_SOURCE_MOUSE;
_gdk_core_pointer->mode = GDK_MODE_SCREEN;
_gdk_core_pointer->has_cursor = TRUE;
_gdk_core_pointer->num_axes = 2;
_gdk_core_pointer->axes = gdk_input_core_axes;
_gdk_core_pointer->num_keys = 0;
_gdk_core_pointer->keys = NULL;
display->core_pointer = _gdk_core_pointer;
}
static void
gdk_device_finalize (GObject *object)
{
g_error ("A GdkDevice object was finalized. This should not happen");
}
static void
gdk_device_class_init (GObjectClass *class)
{
class->finalize = gdk_device_finalize;
}
GType
gdk_device_get_type (void)
{
static GType object_type = 0;
if (!object_type)
{
const GTypeInfo object_info =
{
sizeof (GdkDeviceClass),
(GBaseInitFunc) NULL,
(GBaseFinalizeFunc) NULL,
(GClassInitFunc) gdk_device_class_init,
NULL, /* class_finalize */
NULL, /* class_data */
sizeof (GdkDevice),
0, /* n_preallocs */
(GInstanceInitFunc) NULL,
};
object_type = g_type_register_static (G_TYPE_OBJECT,
"GdkDevice",
&object_info, 0);
}
return object_type;
}
void
_gdk_input_init (void)
{
_gdk_init_input_core ();
_gdk_input_devices = g_list_append (NULL, _gdk_core_pointer);
_gdk_input_ignore_core = FALSE;
}
void
_gdk_input_exit (void)
{
GList *tmp_list;
GdkDevice *gdkdev;
for (tmp_list = _gdk_input_devices; tmp_list; tmp_list = tmp_list->next)
{
gdkdev = (GdkDevice *)(tmp_list->data);
if (!GDK_IS_CORE (gdkdev))
{
gdk_device_set_mode ((GdkDevice *)gdkdev, GDK_MODE_DISABLED);
g_free (gdkdev->name);
g_free (gdkdev->axes);
g_free (gdkdev->keys);
g_free (gdkdev);
}
}
g_list_free (_gdk_input_devices);
}
/**
* gdk_device_get_axis:
* @device: a #GdkDevice
* @axes: pointer to an array of axes
* @use: the use to look for
* @value: location to store the found value.
*
* Interprets an array of double as axis values for a given device,
* and locates the value in the array for a given axis use.
*
* Return value: %TRUE if the given axis use was found, otherwise %FALSE
**/
gboolean
gdk_device_get_axis (GdkDevice *device,
gdouble *axes,
GdkAxisUse use,
gdouble *value)
{
gint i;
g_return_val_if_fail (device != NULL, FALSE);
if (axes == NULL)
return FALSE;
for (i = 0; i < device->num_axes; i++)
if (device->axes[i].use == use)
{
if (value)
*value = axes[i];
return TRUE;
}
return FALSE;
}
void
gdk_device_set_key (GdkDevice *device,
guint index,
guint keyval,
GdkModifierType modifiers)
{
g_return_if_fail (device != NULL);
g_return_if_fail (index < device->num_keys);
device->keys[index].keyval = keyval;
device->keys[index].modifiers = modifiers;
}
void
gdk_device_set_axis_use (GdkDevice *device,
guint index,
GdkAxisUse use)
{
g_return_if_fail (device != NULL);
g_return_if_fail (index < device->num_axes);
device->axes[index].use = use;
switch (use)
{
case GDK_AXIS_X:
case GDK_AXIS_Y:
device->axes[index].min = 0.0;
device->axes[index].max = 0.0;
break;
case GDK_AXIS_XTILT:
case GDK_AXIS_YTILT:
device->axes[index].min = -1.0;
device->axes[index].max = 1.0;
break;
default:
device->axes[index].min = 0.0;
device->axes[index].max = 1.0;
break;
}
}
gboolean
gdk_device_set_mode (GdkDevice *device,
GdkInputMode mode)
{
g_message ("unimplemented %s", G_STRFUNC);
return FALSE;
}
gboolean
gdk_device_get_history (GdkDevice *device,
GdkWindow *window,
guint32 start,
guint32 stop,
GdkTimeCoord ***events,
gint *n_events)
{
g_return_val_if_fail (GDK_IS_WINDOW (window), FALSE);
g_return_val_if_fail (events != NULL, FALSE);
g_return_val_if_fail (n_events != NULL, FALSE);
*n_events = 0;
*events = NULL;
if (GDK_WINDOW_DESTROYED (window))
return FALSE;
if (GDK_IS_CORE (device))
return FALSE;
else
return FALSE;
//TODODO_gdk_device_get_history (device, window, start, stop, events, n_events);
}
void
gdk_device_free_history (GdkTimeCoord **events,
gint n_events)
{
gint i;
for (i = 0; i < n_events; i++)
g_free (events[i]);
g_free (events);
}
void
gdk_device_get_state (GdkDevice *device,
GdkWindow *window,
gdouble *axes,
GdkModifierType *mask)
{
g_return_if_fail (device != NULL);
g_return_if_fail (GDK_IS_WINDOW (window));
if (mask)
*mask = _gdk_directfb_modifiers;
}
void
gdk_directfb_mouse_get_info (gint *x,
gint *y,
GdkModifierType *mask)
{
if (x)
*x = _gdk_directfb_mouse_x;
if (y)
*y = _gdk_directfb_mouse_y;
if (mask)
*mask = _gdk_directfb_modifiers;
}
void
gdk_input_set_extension_events (GdkWindow *window,
gint mask,
GdkExtensionMode mode)
{
g_message ("unimplemented %s", G_STRFUNC);
}
GList *
gdk_devices_list (void)
{
return _gdk_input_devices;
}
GList *
gdk_display_list_devices (GdkDisplay *dpy)
{
return _gdk_input_devices;
}
void
gdk_device_set_source (GdkDevice *device,
GdkInputSource source)
{
g_return_if_fail (device != NULL);
device->source = source;
}

View File

@@ -1,143 +0,0 @@
/* GDK - The GIMP Drawing Kit
* Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Library General Public License for more details.
*
* You should have received a copy of the GNU Library General Public
* License along with this library; if not, write to the
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
* Boston, MA 02111-1307, USA.
*/
/*
* Modified by the GTK+ Team and others 1997-2000. See the AUTHORS
* file for a list of people on the GTK+ Team.
*/
/*
* GTK+ DirectFB backend
* Copyright (C) 2001-2002 convergence integrated media GmbH
* Copyright (C) 2002 convergence GmbH
* Written by Denis Oliver Kropp <dok@convergence.de> and
* Sven Neumann <sven@convergence.de>
*/
#ifndef __GDK_INPUT_DIRECTFB_H__
#define __GDK_INPUT_DIRECTFB_H__
extern GdkModifierType _gdk_directfb_modifiers;
extern int _gdk_directfb_mouse_x, _gdk_directfb_mouse_y;
typedef struct _GdkAxisInfo GdkAxisInfo;
/* information about a device axis */
struct _GdkAxisInfo
{
/* reported x resolution */
gint xresolution;
/* reported x minimum/maximum values */
gint xmin_value, xmax_value;
/* calibrated resolution (for aspect ration) - only relative values
between axes used */
gint resolution;
/* calibrated minimum/maximum values */
gint min_value, max_value;
};
#define GDK_INPUT_NUM_EVENTC 6
struct _GdkDeviceClass
{
GObjectClass parent_class;
};
struct _GdkInputWindow
{
/* gdk window */
GdkWindow *window;
/* Extension mode (GDK_EXTENSION_EVENTS_ALL/CURSOR) */
GdkExtensionMode mode;
/* position relative to root window */
gint root_x;
gint root_y;
/* rectangles relative to window of windows obscuring this one */
GdkRectangle *obscuring;
gint num_obscuring;
/* Is there a pointer grab for this window ? */
gint grabbed;
};
/* Global data */
#define GDK_IS_CORE(d) (((GdkDevice *)(d)) == _gdk_core_pointer)
extern GList *_gdk_input_devices;
extern GList *_gdk_input_windows;
extern gint _gdk_input_ignore_core;
/* Function declarations */
/* The following functions are provided by each implementation
*/
gint _gdk_input_window_none_event(GdkEvent *event,
gchar *msg);
void _gdk_input_configure_event (GdkEventConfigure *event,
GdkWindow *window);
void _gdk_input_enter_event (GdkEventCrossing *event,
GdkWindow *window);
gint _gdk_input_other_event (GdkEvent *event,
gchar *msg,
GdkWindow *window);
/* These should be in gdkinternals.h */
GdkInputWindow * gdk_input_window_find (GdkWindow *window);
void gdk_input_window_destroy (GdkWindow *window);
gint _gdk_input_enable_window (GdkWindow *window,
GdkDevice *gdkdev);
gint _gdk_input_disable_window (GdkWindow *window,
GdkDevice *gdkdev);
gint _gdk_input_grab_pointer (GdkWindow *window,
gint owner_events,
GdkEventMask event_mask,
GdkWindow *confine_to,
guint32 time);
void _gdk_input_ungrab_pointer (guint32 time);
gboolean _gdk_device_get_history (GdkDevice *device,
GdkWindow *window,
guint32 start,
guint32 stop,
GdkTimeCoord ***events,
gint *n_events);
gint gdk_input_common_init (gint include_core);
gint gdk_input_common_other_event (GdkEvent *event,
gchar *msg,
GdkInputWindow *input_window,
GdkWindow *window);
void _gdk_directfb_keyboard_init (void);
void _gdk_directfb_keyboard_exit (void);
void gdk_directfb_translate_key_event (DFBWindowEvent *dfb_event,
GdkEventKey *event);
#endif /* __GDK_INPUT_DIRECTFB_H__ */

File diff suppressed because it is too large Load Diff

View File

@@ -1,417 +0,0 @@
/* GDK - The GIMP Drawing Kit
* Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald
* Copyright (C) 1998-1999 Tor Lillqvist
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
* Boston, MA 02111-1307, USA.
*/
/*
* Modified by the GTK+ Team and others 1997-2000. See the AUTHORS
* file for a list of people on the GTK+ Team.
*/
/*
* GTK+ DirectFB backend
* Copyright (C) 2001-2002 convergence integrated media GmbH
* Copyright (C) 2002-2004 convergence GmbH
* Written by Denis Oliver Kropp <dok@convergence.de> and
* Sven Neumann <sven@convergence.de>
*/
/*
Main entry point for 2.6 seems to be open_display so
most stuff in main is moved over to gdkdisplay-directfb.c
I'll move stub functions here that make no sense for directfb
and true globals
Michael Emmel
*/
#include "config.h"
#include <string.h>
#include <stdlib.h>
#include "gdk.h"
#include "gdkdisplay.h"
#include "gdkdirectfb.h"
#include "gdkprivate-directfb.h"
#include "gdkinternals.h"
#include "gdkinput-directfb.h"
#include "gdkintl.h"
void
_gdk_windowing_init (void)
{
/* Not that usable called before parse_args
*/
}
void
_gdk_windowing_display_set_sm_client_id (GdkDisplay *display,const gchar *sm_client_id)
{
g_message ("gdk_set_sm_client_id() is unimplemented.");
}
void
_gdk_windowing_exit (void)
{
if (_gdk_display->buffer)
_gdk_display->buffer->Release (_gdk_display->buffer);
_gdk_directfb_keyboard_exit ();
if (_gdk_display->keyboard)
_gdk_display->keyboard->Release (_gdk_display->keyboard);
_gdk_display->layer->Release (_gdk_display->layer);
_gdk_display->directfb->Release (_gdk_display->directfb);
g_free (_gdk_display);
_gdk_display = NULL;
}
gchar *
gdk_get_display (void)
{
return g_strdup (gdk_display_get_name (gdk_display_get_default ()));
}
/* utils */
static const guint type_masks[] =
{
GDK_STRUCTURE_MASK, /* GDK_DELETE = 0, */
GDK_STRUCTURE_MASK, /* GDK_DESTROY = 1, */
GDK_EXPOSURE_MASK, /* GDK_EXPOSE = 2, */
GDK_POINTER_MOTION_MASK, /* GDK_MOTION_NOTIFY = 3, */
GDK_BUTTON_PRESS_MASK, /* GDK_BUTTON_PRESS = 4, */
GDK_BUTTON_PRESS_MASK, /* GDK_2BUTTON_PRESS = 5, */
GDK_BUTTON_PRESS_MASK, /* GDK_3BUTTON_PRESS = 6, */
GDK_BUTTON_RELEASE_MASK, /* GDK_BUTTON_RELEASE = 7, */
GDK_KEY_PRESS_MASK, /* GDK_KEY_PRESS = 8, */
GDK_KEY_RELEASE_MASK, /* GDK_KEY_RELEASE = 9, */
GDK_ENTER_NOTIFY_MASK, /* GDK_ENTER_NOTIFY = 10, */
GDK_LEAVE_NOTIFY_MASK, /* GDK_LEAVE_NOTIFY = 11, */
GDK_FOCUS_CHANGE_MASK, /* GDK_FOCUS_CHANGE = 12, */
GDK_STRUCTURE_MASK, /* GDK_CONFIGURE = 13, */
GDK_VISIBILITY_NOTIFY_MASK,/* GDK_MAP = 14, */
GDK_VISIBILITY_NOTIFY_MASK,/* GDK_UNMAP = 15, */
GDK_PROPERTY_CHANGE_MASK, /* GDK_PROPERTY_NOTIFY = 16, */
GDK_PROPERTY_CHANGE_MASK, /* GDK_SELECTION_CLEAR = 17, */
GDK_PROPERTY_CHANGE_MASK, /* GDK_SELECTION_REQUEST = 18, */
GDK_PROPERTY_CHANGE_MASK, /* GDK_SELECTION_NOTIFY = 19, */
GDK_PROXIMITY_IN_MASK, /* GDK_PROXIMITY_IN = 20, */
GDK_PROXIMITY_OUT_MASK, /* GDK_PROXIMITY_OUT = 21, */
GDK_ALL_EVENTS_MASK, /* GDK_DRAG_ENTER = 22, */
GDK_ALL_EVENTS_MASK, /* GDK_DRAG_LEAVE = 23, */
GDK_ALL_EVENTS_MASK, /* GDK_DRAG_MOTION = 24, */
GDK_ALL_EVENTS_MASK, /* GDK_DRAG_STATUS = 25, */
GDK_ALL_EVENTS_MASK, /* GDK_DROP_START = 26, */
GDK_ALL_EVENTS_MASK, /* GDK_DROP_FINISHED = 27, */
GDK_ALL_EVENTS_MASK, /* GDK_CLIENT_EVENT = 28, */
GDK_VISIBILITY_NOTIFY_MASK,/* GDK_VISIBILITY_NOTIFY = 29, */
GDK_EXPOSURE_MASK, /* GDK_NO_EXPOSE = 30, */
GDK_SCROLL_MASK /* GDK_SCROLL = 31 */
};
GdkWindow *
gdk_directfb_other_event_window (GdkWindow *window,
GdkEventType type)
{
guint32 evmask;
GdkWindow *w;
w = window;
while (w != _gdk_parent_root)
{
/* Huge hack, so that we don't propagate events to GtkWindow->frame */
if ((w != window) &&
(GDK_WINDOW_OBJECT (w)->window_type != GDK_WINDOW_CHILD) &&
(g_object_get_data (G_OBJECT (w), "gdk-window-child-handler")))
break;
evmask = GDK_WINDOW_OBJECT (w)->event_mask;
if (evmask & type_masks[type])
return w;
w = gdk_window_get_parent (w);
}
return NULL;
}
GdkWindow *
gdk_directfb_pointer_event_window (GdkWindow *window,
GdkEventType type)
{
guint evmask;
GdkModifierType mask;
GdkWindow *w;
gdk_directfb_mouse_get_info (NULL, NULL, &mask);
if (_gdk_directfb_pointer_grab_window && !_gdk_directfb_pointer_grab_owner_events )
{
evmask = _gdk_directfb_pointer_grab_events;
if (evmask & (GDK_BUTTON1_MOTION_MASK |
GDK_BUTTON2_MOTION_MASK |
GDK_BUTTON3_MOTION_MASK))
{
if (((mask & GDK_BUTTON1_MASK) &&
(evmask & GDK_BUTTON1_MOTION_MASK)) ||
((mask & GDK_BUTTON2_MASK) &&
(evmask & GDK_BUTTON2_MOTION_MASK)) ||
((mask & GDK_BUTTON3_MASK) &&
(evmask & GDK_BUTTON3_MOTION_MASK)))
evmask |= GDK_POINTER_MOTION_MASK;
}
if (evmask & type_masks[type]) {
if( _gdk_directfb_pointer_grab_owner_events ) {
return _gdk_directfb_pointer_grab_window;
}else {
GdkWindowObject *obj= GDK_WINDOW_OBJECT(window);
while (obj != NULL &&
obj != GDK_WINDOW_OBJECT(_gdk_directfb_pointer_grab_window)) {
obj = (GdkWindowObject *)obj->parent;
}
if( obj ==GDK_WINDOW_OBJECT(_gdk_directfb_pointer_grab_window) ) {
return window;
}else {
//was not child of the grab window so return the grab window
return _gdk_directfb_pointer_grab_window;
}
}
}
}
w = window;
while (w != _gdk_parent_root)
{
/* Huge hack, so that we don't propagate events to GtkWindow->frame */
if ((w != window) &&
(GDK_WINDOW_OBJECT (w)->window_type != GDK_WINDOW_CHILD) &&
(g_object_get_data (G_OBJECT (w), "gdk-window-child-handler")))
break;
evmask = GDK_WINDOW_OBJECT (w)->event_mask;
if (evmask & (GDK_BUTTON1_MOTION_MASK |
GDK_BUTTON2_MOTION_MASK |
GDK_BUTTON3_MOTION_MASK))
{
if (((mask & GDK_BUTTON1_MASK) &&
(evmask & GDK_BUTTON1_MOTION_MASK)) ||
((mask & GDK_BUTTON2_MASK) &&
(evmask & GDK_BUTTON2_MOTION_MASK)) ||
((mask & GDK_BUTTON3_MASK) &&
(evmask & GDK_BUTTON3_MOTION_MASK)))
evmask |= GDK_POINTER_MOTION_MASK;
}
if (evmask & type_masks[type])
return w;
w = gdk_window_get_parent (w);
}
return NULL;
}
GdkWindow *
gdk_directfb_keyboard_event_window (GdkWindow *window,
GdkEventType type)
{
guint32 evmask;
GdkWindow *w;
if (_gdk_directfb_keyboard_grab_window &&
!_gdk_directfb_keyboard_grab_owner_events)
{
return _gdk_directfb_keyboard_grab_window;
}
w = window;
while (w != _gdk_parent_root)
{
/* Huge hack, so that we don't propagate events to GtkWindow->frame */
if ((w != window) &&
(GDK_WINDOW_OBJECT (w)->window_type != GDK_WINDOW_CHILD) &&
(g_object_get_data (G_OBJECT (w), "gdk-window-child-handler")))
break;
evmask = GDK_WINDOW_OBJECT (w)->event_mask;
if (evmask & type_masks[type])
return w;
w = gdk_window_get_parent (w);
}
return w;
}
GdkEvent *
gdk_directfb_event_make (GdkWindow *window,
GdkEventType type)
{
GdkEvent *event = gdk_event_new (GDK_NOTHING);
guint32 the_time = gdk_directfb_get_time ();
event->any.type = type;
event->any.window = g_object_ref (window);
event->any.send_event = FALSE;
switch (type)
{
case GDK_MOTION_NOTIFY:
event->motion.time = the_time;
event->motion.axes = NULL;
break;
case GDK_BUTTON_PRESS:
case GDK_2BUTTON_PRESS:
case GDK_3BUTTON_PRESS:
case GDK_BUTTON_RELEASE:
event->button.time = the_time;
event->button.axes = NULL;
break;
case GDK_KEY_PRESS:
case GDK_KEY_RELEASE:
event->key.time = the_time;
break;
case GDK_ENTER_NOTIFY:
case GDK_LEAVE_NOTIFY:
event->crossing.time = the_time;
break;
case GDK_PROPERTY_NOTIFY:
event->property.time = the_time;
break;
case GDK_SELECTION_CLEAR:
case GDK_SELECTION_REQUEST:
case GDK_SELECTION_NOTIFY:
event->selection.time = the_time;
break;
case GDK_PROXIMITY_IN:
case GDK_PROXIMITY_OUT:
event->proximity.time = the_time;
break;
case GDK_DRAG_ENTER:
case GDK_DRAG_LEAVE:
case GDK_DRAG_MOTION:
case GDK_DRAG_STATUS:
case GDK_DROP_START:
case GDK_DROP_FINISHED:
event->dnd.time = the_time;
break;
case GDK_SCROLL:
event->scroll.time = the_time;
break;
case GDK_FOCUS_CHANGE:
case GDK_CONFIGURE:
case GDK_MAP:
case GDK_UNMAP:
case GDK_CLIENT_EVENT:
case GDK_VISIBILITY_NOTIFY:
case GDK_NO_EXPOSE:
case GDK_DELETE:
case GDK_DESTROY:
case GDK_EXPOSE:
default:
break;
}
_gdk_event_queue_append (gdk_display_get_default (), event);
return event;
}
void
gdk_error_trap_push (void)
{
}
gint
gdk_error_trap_pop (void)
{
return 0;
}
GdkGrabStatus
gdk_keyboard_grab (GdkWindow *window,
gint owner_events,
guint32 time)
{
return gdk_directfb_keyboard_grab (gdk_display_get_default(),
window,
owner_events,
time);
}
/*
*--------------------------------------------------------------
* gdk_pointer_grab
*
* Grabs the pointer to a specific window
*
* Arguments:
* "window" is the window which will receive the grab
* "owner_events" specifies whether events will be reported as is,
* or relative to "window"
* "event_mask" masks only interesting events
* "confine_to" limits the cursor movement to the specified window
* "cursor" changes the cursor for the duration of the grab
* "time" specifies the time
*
* Results:
*
* Side effects:
* requires a corresponding call to gdk_pointer_ungrab
*
*--------------------------------------------------------------
*/
GdkGrabStatus
_gdk_windowing_pointer_grab (GdkWindow *window,
GdkWindow *native,
gboolean owner_events,
GdkEventMask event_mask,
GdkWindow *confine_to,
GdkCursor *cursor,
guint32 time)
{
g_return_val_if_fail (GDK_IS_WINDOW (window), 0);
g_return_val_if_fail (confine_to == NULL || GDK_IS_WINDOW (confine_to), 0);
_gdk_display_add_pointer_grab (&_gdk_display->parent,
window,
native,
owner_events,
event_mask,
0,
time,
FALSE);
return GDK_GRAB_SUCCESS;
}

View File

@@ -1,337 +0,0 @@
/* GDK - The GIMP Drawing Kit
* Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald
* Copyright (C) 1998-1999 Tor Lillqvist
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
* Boston, MA 02111-1307, USA.
*/
/*
* Modified by the GTK+ Team and others 1997-2000. See the AUTHORS
* file for a list of people on the GTK+ Team.
*/
/*
* GTK+ DirectFB backend
* Copyright (C) 2001-2002 convergence integrated media GmbH
* Copyright (C) 2002-2004 convergence GmbH
* Written by Denis Oliver Kropp <dok@convergence.de> and
* Sven Neumann <sven@convergence.de>
*/
#include "config.h"
#include "gdk.h"
#include <stdlib.h>
#include <string.h>
#include "gdkdirectfb.h"
#include "gdkprivate-directfb.h"
#include "gdkinternals.h"
#include "gdkpixmap.h"
static void gdk_pixmap_impl_directfb_init (GdkPixmapImplDirectFB *pixmap);
static void gdk_pixmap_impl_directfb_class_init (GdkPixmapImplDirectFBClass *klass);
static void gdk_pixmap_impl_directfb_finalize (GObject *object);
static gpointer parent_class = NULL;
GType
gdk_pixmap_impl_directfb_get_type (void)
{
static GType object_type = 0;
if (!object_type)
{
const GTypeInfo object_info =
{
sizeof (GdkPixmapImplDirectFBClass),
(GBaseInitFunc) NULL,
(GBaseFinalizeFunc) NULL,
(GClassInitFunc) gdk_pixmap_impl_directfb_class_init,
NULL, /* class_finalize */
NULL, /* class_data */
sizeof (GdkPixmapImplDirectFB),
0, /* n_preallocs */
(GInstanceInitFunc) gdk_pixmap_impl_directfb_init,
};
object_type = g_type_register_static (GDK_TYPE_DRAWABLE_IMPL_DIRECTFB,
"GdkPixmapImplDirectFB",
&object_info, 0);
}
return object_type;
}
GType
_gdk_pixmap_impl_get_type (void)
{
return gdk_pixmap_impl_directfb_get_type ();
}
static void
gdk_pixmap_impl_directfb_init (GdkPixmapImplDirectFB *impl)
{
GdkDrawableImplDirectFB *draw_impl = GDK_DRAWABLE_IMPL_DIRECTFB (impl);
draw_impl->width = 1;
draw_impl->height = 1;
}
static void
gdk_pixmap_impl_directfb_class_init (GdkPixmapImplDirectFBClass *klass)
{
GObjectClass *object_class = G_OBJECT_CLASS (klass);
parent_class = g_type_class_peek_parent (klass);
object_class->finalize = gdk_pixmap_impl_directfb_finalize;
}
static void
gdk_pixmap_impl_directfb_finalize (GObject *object)
{
if (G_OBJECT_CLASS (parent_class)->finalize)
G_OBJECT_CLASS (parent_class)->finalize (object);
}
GdkPixmap*
_gdk_pixmap_new (GdkDrawable *drawable,
gint width,
gint height,
gint depth)
{
DFBSurfacePixelFormat format;
IDirectFBSurface *surface;
GdkPixmap *pixmap;
GdkDrawableImplDirectFB *draw_impl;
g_return_val_if_fail (drawable == NULL || GDK_IS_DRAWABLE (drawable), NULL);
g_return_val_if_fail (drawable != NULL || depth != -1, NULL);
g_return_val_if_fail (width > 0 && height > 0, NULL);
if (!drawable)
drawable = _gdk_parent_root;
if (GDK_IS_WINDOW (drawable) && GDK_WINDOW_DESTROYED (drawable))
return NULL;
GDK_NOTE (MISC, g_print ("gdk_pixmap_new: %dx%dx%d\n",
width, height, depth));
if (depth == -1)
{
draw_impl =
GDK_DRAWABLE_IMPL_DIRECTFB (GDK_WINDOW_OBJECT (drawable)->impl);
g_return_val_if_fail (draw_impl != NULL, NULL);
draw_impl->surface->GetPixelFormat (draw_impl->surface, &format);
depth = DFB_BITS_PER_PIXEL (format);
}
else
{
switch (depth)
{
case 1:
format = DSPF_A8;
break;
case 8:
format = DSPF_LUT8;
break;
case 15:
format = DSPF_ARGB1555;
break;
case 16:
format = DSPF_RGB16;
break;
case 24:
format = DSPF_RGB24;
break;
case 32:
format = DSPF_RGB32;
break;
default:
g_message ("unimplemented %s for depth %d", G_STRFUNC, depth);
return NULL;
}
}
if( !(surface =
gdk_display_dfb_create_surface(_gdk_display,format,width,height) )) {
g_assert( surface != NULL);
return NULL;
}
pixmap = g_object_new (gdk_pixmap_get_type (), NULL);
draw_impl = GDK_DRAWABLE_IMPL_DIRECTFB (GDK_PIXMAP_OBJECT (pixmap)->impl);
draw_impl->surface = surface;
surface->Clear (surface, 0x0, 0x0, 0x0, 0x0);
surface->GetSize (surface, &draw_impl->width, &draw_impl->height);
surface->GetPixelFormat (surface, &draw_impl->format);
draw_impl->abs_x = draw_impl->abs_y = 0;
GDK_PIXMAP_OBJECT (pixmap)->depth = depth;
return pixmap;
}
GdkPixmap *
_gdk_bitmap_create_from_data (GdkDrawable *drawable,
const gchar *data,
gint width,
gint height)
{
GdkPixmap *pixmap;
g_return_val_if_fail (drawable == NULL || GDK_IS_DRAWABLE (drawable), NULL);
g_return_val_if_fail (data != NULL, NULL);
g_return_val_if_fail (width > 0 && height > 0, NULL);
GDK_NOTE (MISC, g_print ("gdk_bitmap_create_from_data: %dx%d\n",
width, height));
pixmap = gdk_pixmap_new (drawable, width, height, 1);
#define GET_PIXEL(data,pixel) \
((data[(pixel / 8)] & (0x1 << ((pixel) % 8))) >> ((pixel) % 8))
if (pixmap)
{
guchar *dst;
gint pitch;
IDirectFBSurface *surface;
surface = GDK_DRAWABLE_IMPL_DIRECTFB (GDK_PIXMAP_OBJECT (pixmap)->impl)->surface;
if (surface->Lock( surface, DSLF_WRITE, (void**)(&dst), &pitch ) == DFB_OK)
{
gint i, j;
for (i = 0; i < height; i++)
{
for (j = 0; j < width; j++)
{
dst[j] = GET_PIXEL (data, j) * 255;
}
data += (width + 7) / 8;
dst += pitch;
}
surface->Unlock( surface );
}
}
#undef GET_PIXEL
return pixmap;
}
GdkPixmap*
_gdk_pixmap_create_from_data (GdkDrawable *drawable,
const gchar *data,
gint width,
gint height,
gint depth,
const GdkColor *fg,
const GdkColor *bg)
{
GdkPixmap *pixmap;
g_return_val_if_fail (drawable == NULL || GDK_IS_DRAWABLE (drawable), NULL);
g_return_val_if_fail (data != NULL, NULL);
g_return_val_if_fail (drawable != NULL || depth > 0, NULL);
g_return_val_if_fail (width > 0 && height > 0, NULL);
GDK_NOTE (MISC, g_print ("gdk_pixmap_create_from_data: %dx%dx%d\n",
width, height, depth));
pixmap = gdk_pixmap_new (drawable, width, height, depth);
if (pixmap)
{
IDirectFBSurface *surface;
gchar *dst;
gint pitch;
gint src_pitch;
depth = gdk_drawable_get_depth (pixmap);
src_pitch = width * ((depth + 7) / 8);
surface = GDK_DRAWABLE_IMPL_DIRECTFB (GDK_PIXMAP_OBJECT (pixmap)->impl)->surface;
if (surface->Lock( surface,
DSLF_WRITE, (void**)(&dst), &pitch ) == DFB_OK)
{
gint i;
for (i = 0; i < height; i++)
{
memcpy (dst, data, src_pitch);
dst += pitch;
data += src_pitch;
}
surface->Unlock( surface );
}
}
return pixmap;
}
GdkPixmap*
gdk_pixmap_foreign_new (GdkNativeWindow anid)
{
g_warning(" gdk_pixmap_foreign_new unsuporrted \n");
return NULL;
}
GdkPixmap*
gdk_pixmap_foreign_new_for_display (GdkDisplay *display, GdkNativeWindow anid)
{
return gdk_pixmap_foreign_new(anid);
}
GdkPixmap*
gdk_pixmap_foreign_new_for_screen (GdkScreen *screen,
GdkNativeWindow anid,
gint width,
gint height,
gint depth)
{
/*Use the root drawable for now since only one screen */
return gdk_pixmap_new(NULL,width,height,depth);
}
GdkPixmap*
gdk_pixmap_lookup (GdkNativeWindow anid)
{
g_warning(" gdk_pixmap_lookup unsuporrted \n");
return NULL;
}
GdkPixmap* gdk_pixmap_lookup_for_display (GdkDisplay *display,GdkNativeWindow anid)
{
return gdk_pixmap_lookup (anid);
}

View File

@@ -1,421 +0,0 @@
/* GDK - The GIMP Drawing Kit
* Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
* Boston, MA 02111-1307, USA.
*/
/*
* Modified by the GTK+ Team and others 1997-2000. See the AUTHORS
* file for a list of people on the GTK+ Team.
*/
/*
* GTK+ DirectFB backend
* Copyright (C) 2001-2002 convergence integrated media GmbH
* Copyright (C) 2002-2004 convergence GmbH
* Written by Denis Oliver Kropp <dok@convergence.de> and
* Sven Neumann <sven@convergence.de>
*/
#ifndef __GDK_PRIVATE_DIRECTFB_H__
#define __GDK_PRIVATE_DIRECTFB_H__
//#include <gdk/gdk.h>
#include <gdk/gdkprivate.h>
#include "gdkinternals.h"
#include "gdkcursor.h"
#include "gdkdisplay-directfb.h"
#include <cairo.h>
#include <string.h>
#include <directfb_util.h>
#define GDK_TYPE_DRAWABLE_IMPL_DIRECTFB (gdk_drawable_impl_directfb_get_type ())
#define GDK_DRAWABLE_IMPL_DIRECTFB(object) (G_TYPE_CHECK_INSTANCE_CAST ((object), GDK_TYPE_DRAWABLE_IMPL_DIRECTFB, GdkDrawableImplDirectFB))
#define GDK_IS_DRAWABLE_IMPL_DIRECTFB(object) (G_TYPE_CHECK_INSTANCE_TYPE ((object), GDK_TYPE_DRAWABLE_IMPL_DIRECTFB))
#define GDK_TYPE_WINDOW_IMPL_DIRECTFB (gdk_window_impl_directfb_get_type ())
#define GDK_WINDOW_IMPL_DIRECTFB(object) (G_TYPE_CHECK_INSTANCE_CAST ((object), GDK_TYPE_WINDOW_IMPL_DIRECTFB, GdkWindowImplDirectFB))
#define GDK_IS_WINDOW_IMPL_DIRECTFB(object) (G_TYPE_CHECK_INSTANCE_TYPE ((object), GDK_TYPE_WINDOW_IMPL_DIRECTFB))
#define GDK_TYPE_PIXMAP_IMPL_DIRECTFB (gdk_pixmap_impl_directfb_get_type ())
#define GDK_PIXMAP_IMPL_DIRECTFB(object) (G_TYPE_CHECK_INSTANCE_CAST ((object), GDK_TYPE_PIXMAP_IMPL_DIRECTFB, GdkPixmapImplDirectFB))
#define GDK_IS_PIXMAP_IMPL_DIRECTFB(object) (G_TYPE_CHECK_INSTANCE_TYPE ((object), GDK_TYPE_PIXMAP_IMPL_DIRECTFB))
typedef struct _GdkDrawableImplDirectFB GdkDrawableImplDirectFB;
typedef struct _GdkWindowImplDirectFB GdkWindowImplDirectFB;
typedef struct _GdkPixmapImplDirectFB GdkPixmapImplDirectFB;
struct _GdkDrawableImplDirectFB
{
GdkDrawable parent_object;
GdkDrawable *wrapper;
gboolean buffered;
cairo_region_t paint_region;
gint paint_depth;
gint width;
gint height;
gint abs_x;
gint abs_y;
cairo_region_t clip_region;
GdkColormap *colormap;
IDirectFBSurface *surface;
DFBSurfacePixelFormat format;
cairo_surface_t * cairo_surface;
};
typedef struct
{
GdkDrawableClass parent_class;
} GdkDrawableImplDirectFBClass;
GType gdk_drawable_impl_directfb_get_type (void);
GdkEvent * gdk_directfb_event_make (GdkWindow *window,
GdkEventType type);
/*
* Pixmap
*/
struct _GdkPixmapImplDirectFB
{
GdkDrawableImplDirectFB parent_instance;
};
typedef struct
{
GdkDrawableImplDirectFBClass parent_class;
} GdkPixmapImplDirectFBClass;
GType gdk_pixmap_impl_directfb_get_type (void);
/*
* Window
*/
typedef struct
{
gulong length;
GdkAtom type;
gint format;
guchar data[1];
} GdkWindowProperty;
struct _GdkWindowImplDirectFB
{
GdkDrawableImplDirectFB drawable;
GdkWindow *gdkWindow;
IDirectFBWindow *window;
DFBWindowID dfb_id;
GdkCursor *cursor;
GHashTable *properties;
guint8 opacity;
GdkWindowTypeHint type_hint;
DFBUpdates flips;
DFBRegion flip_regions[4];
};
typedef struct
{
GdkDrawableImplDirectFBClass parent_class;
} GdkWindowImplDirectFBClass;
GType gdk_window_impl_directfb_get_type (void);
void gdk_directfb_window_send_crossing_events (GdkWindow *src,
GdkWindow *dest,
GdkCrossingMode mode);
void _gdk_directfb_calc_abs (GdkWindow *window);
GdkWindow * gdk_directfb_window_find_toplevel (GdkWindow *window);
void gdk_directfb_window_id_table_insert (DFBWindowID dfb_id,
GdkWindow *window);
void gdk_directfb_window_id_table_remove (DFBWindowID dfb_id);
GdkWindow * gdk_directfb_window_id_table_lookup (DFBWindowID dfb_id);
void _gdk_directfb_window_get_offsets (GdkWindow *window,
gint *x_offset,
gint *y_offset);
void _gdk_directfb_window_scroll (GdkWindow *window,
gint dx,
gint dy);
void _gdk_directfb_window_move_region (GdkWindow *window,
const cairo_region_t *region,
gint dx,
gint dy);
typedef struct
{
GdkCursor cursor;
gint hot_x;
gint hot_y;
IDirectFBSurface *shape;
} GdkCursorDirectFB;
typedef struct
{
GdkVisual visual;
DFBSurfacePixelFormat format;
} GdkVisualDirectFB;
typedef struct
{
IDirectFBSurface *surface;
} GdkImageDirectFB;
#define GDK_TYPE_GC_DIRECTFB (_gdk_gc_directfb_get_type ())
#define GDK_GC_DIRECTFB(object) (G_TYPE_CHECK_INSTANCE_CAST ((object), GDK_TYPE_GC_DIRECTFB, GdkGCDirectFB))
#define GDK_IS_GC_DIRECTFB(object) (G_TYPE_CHECK_INSTANCE_TYPE ((object), GDK_TYPE_GC_DIRECTFB))
typedef struct
{
GdkGC parent_instance;
cairo_region_t clip_region;
GdkGCValuesMask values_mask;
GdkGCValues values;
} GdkGCDirectFB;
typedef struct
{
GdkGCClass parent_class;
} GdkGCDirectFBClass;
GType _gdk_gc_directfb_get_type (void);
GdkGC * _gdk_directfb_gc_new (GdkDrawable *drawable,
GdkGCValues *values,
GdkGCValuesMask values_mask);
GdkImage* _gdk_directfb_copy_to_image (GdkDrawable *drawable,
GdkImage *image,
gint src_x,
gint src_y,
gint dest_x,
gint dest_y,
gint width,
gint height);
void gdk_directfb_event_windows_add (GdkWindow *window);
void gdk_directfb_event_windows_remove (GdkWindow *window);
GdkGrabStatus gdk_directfb_keyboard_grab (GdkDisplay *display,
GdkWindow *window,
gint owner_events,
guint32 time);
void gdk_directfb_keyboard_ungrab(GdkDisplay *display,
guint32 time);
GdkGrabStatus gdk_directfb_pointer_grab (GdkWindow *window,
gint owner_events,
GdkEventMask event_mask,
GdkWindow *confine_to,
GdkCursor *cursor,
guint32 time,
gboolean implicit_grab);
void gdk_directfb_pointer_ungrab (guint32 time,
gboolean implicit_grab);
guint32 gdk_directfb_get_time (void);
GdkWindow * gdk_directfb_pointer_event_window (GdkWindow *window,
GdkEventType type);
GdkWindow * gdk_directfb_keyboard_event_window (GdkWindow *window,
GdkEventType type);
GdkWindow * gdk_directfb_other_event_window (GdkWindow *window,
GdkEventType type);
void _gdk_selection_window_destroyed (GdkWindow *window);
void _gdk_directfb_move_resize_child (GdkWindow *window,
gint x,
gint y,
gint width,
gint height);
GdkWindow * gdk_directfb_child_at (GdkWindow *window,
gint *x,
gint *y);
GdkWindow * gdk_directfb_window_find_focus (void);
void gdk_directfb_change_focus (GdkWindow *new_focus_window);
void gdk_directfb_mouse_get_info (gint *x,
gint *y,
GdkModifierType *mask);
/**********************/
/* Global variables */
/**********************/
extern GdkDisplayDFB *_gdk_display;
/* Pointer grab info */
extern GdkWindow * _gdk_directfb_pointer_grab_window;
extern gboolean _gdk_directfb_pointer_grab_owner_events;
extern GdkWindow * _gdk_directfb_pointer_grab_confine;
extern GdkEventMask _gdk_directfb_pointer_grab_events;
extern GdkCursor * _gdk_directfb_pointer_grab_cursor;
/* Keyboard grab info */
extern GdkWindow * _gdk_directfb_keyboard_grab_window;
extern GdkEventMask _gdk_directfb_keyboard_grab_events;
extern gboolean _gdk_directfb_keyboard_grab_owner_events;
extern GdkScreen * _gdk_screen;
extern GdkAtom _gdk_selection_property;
IDirectFBPalette * gdk_directfb_colormap_get_palette (GdkColormap *colormap);
/* these are Linux-FB specific functions used for window decorations */
typedef gboolean (* GdkWindowChildChanged) (GdkWindow *window,
gint x,
gint y,
gint width,
gint height,
gpointer user_data);
typedef void (* GdkWindowChildGetPos) (GdkWindow *window,
gint *x,
gint *y,
gpointer user_data);
void gdk_fb_window_set_child_handler (GdkWindow *window,
GdkWindowChildChanged changed,
GdkWindowChildGetPos get_pos,
gpointer user_data);
void gdk_directfb_clip_region (GdkDrawable *drawable,
GdkGC *gc,
GdkRectangle *draw_rect,
cairo_region_t *ret_clip);
/* Utilities for avoiding mallocs */
static inline void
temp_region_init_copy( cairo_region_t *region,
const cairo_region_t *source)
{
if (region != source) /* don't want to copy to itself */
{
if (region->size < source->numRects)
{
if (region->rects && region->rects != &region->extents)
g_free( region->rects );
region->rects = g_new (cairo_region_tBox, source->numRects);
region->size = source->numRects;
}
region->numRects = source->numRects;
region->extents = source->extents;
memcpy( region->rects, source->rects, source->numRects * sizeof (cairo_region_tBox) );
}
}
static inline void
temp_region_init_rectangle( cairo_region_t *region,
const GdkRectangle *rect )
{
region->numRects = 1;
region->rects = &region->extents;
region->extents.x1 = rect->x;
region->extents.y1 = rect->y;
region->extents.x2 = rect->x + rect->width;
region->extents.y2 = rect->y + rect->height;
region->size = 1;
}
static inline void
temp_region_init_rectangle_vals( cairo_region_t *region,
int x,
int y,
int w,
int h )
{
region->numRects = 1;
region->rects = &region->extents;
region->extents.x1 = x;
region->extents.y1 = y;
region->extents.x2 = x + w;
region->extents.y2 = y + h;
region->size = 1;
}
static inline void
temp_region_reset( cairo_region_t *region )
{
if (region->size > 32 && region->rects && region->rects != &region->extents) {
g_free( region->rects );
region->size = 1;
region->rects = &region->extents;
}
region->numRects = 0;
}
static inline void
temp_region_deinit( cairo_region_t *region )
{
if (region->rects && region->rects != &region->extents) {
g_free( region->rects );
region->rects = NULL;
}
region->numRects = 0;
}
#define GDKDFB_RECTANGLE_VALS_FROM_BOX(s) (s)->x1, (s)->y1, (s)->x2-(s)->x1, (s)->y2-(s)->y1
#endif /* __GDK_PRIVATE_DIRECTFB_H__ */

View File

@@ -1,397 +0,0 @@
/* GDK - The GIMP Drawing Kit
* Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
* Boston, MA 02111-1307, USA.
*/
/*
* Modified by the GTK+ Team and others 1997-2000. See the AUTHORS
* file for a list of people on the GTK+ Team.
*/
/*
* GTK+ DirectFB backend
* Copyright (C) 2001-2002 convergence integrated media GmbH
* Copyright (C) 2002-2004 convergence GmbH
* Written by Denis Oliver Kropp <dok@convergence.de> and
* Sven Neumann <sven@convergence.de>
*/
#include "config.h"
#include "gdk.h"
#include <string.h>
#include "gdkproperty.h"
#include "gdkdirectfb.h"
#include "gdkprivate-directfb.h"
#include "gdkinternals.h"
static GHashTable *names_to_atoms;
static GPtrArray *atoms_to_names;
static const gchar xatoms_string[] =
/* These are all the standard predefined X atoms */
"NONE\0"
"PRIMARY\0"
"SECONDARY\0"
"ARC\0"
"ATOM\0"
"BITMAP\0"
"CARDINAL\0"
"COLORMAP\0"
"CURSOR\0"
"CUT_BUFFER0\0"
"CUT_BUFFER1\0"
"CUT_BUFFER2\0"
"CUT_BUFFER3\0"
"CUT_BUFFER4\0"
"CUT_BUFFER5\0"
"CUT_BUFFER6\0"
"CUT_BUFFER7\0"
"DRAWABLE\0"
"FONT\0"
"INTEGER\0"
"PIXMAP\0"
"POINT\0"
"RECTANGLE\0"
"RESOURCE_MANAGER\0"
"RGB_COLOR_MAP\0"
"RGB_BEST_MAP\0"
"RGB_BLUE_MAP\0"
"RGB_DEFAULT_MAP\0"
"RGB_GRAY_MAP\0"
"RGB_GREEN_MAP\0"
"RGB_RED_MAP\0"
"STRING\0"
"VISUALID\0"
"WINDOW\0"
"WM_COMMAND\0"
"WM_HINTS\0"
"WM_CLIENT_MACHINE\0"
"WM_ICON_NAME\0"
"WM_ICON_SIZE\0"
"WM_NAME\0"
"WM_NORMAL_HINTS\0"
"WM_SIZE_HINTS\0"
"WM_ZOOM_HINTS\0"
"MIN_SPACE\0"
"NORM_SPACE\0"
"MAX_SPACE\0"
"END_SPACE\0"
"SUPERSCRIPT_X\0"
"SUPERSCRIPT_Y\0"
"SUBSCRIPT_X\0"
"SUBSCRIPT_Y\0"
"UNDERLINE_POSITION\0"
"UNDERLINE_THICKNESS\0"
"STRIKEOUT_ASCENT\0"
"STRIKEOUT_DESCENT\0"
"ITALIC_ANGLE\0"
"X_HEIGHT\0"
"QUAD_WIDTH\0"
"WEIGHT\0"
"POINT_SIZE\0"
"RESOLUTION\0"
"COPYRIGHT\0"
"NOTICE\0"
"FONT_NAME\0"
"FAMILY_NAME\0"
"FULL_NAME\0"
"CAP_HEIGHT\0"
"WM_CLASS\0"
"WM_TRANSIENT_FOR\0"
;
static const gint xatoms_offset[] = {
0, 5, 13, 23, 27, 32, 39, 48, 57, 64, 76, 88,
100, 112, 124, 136, 148, 160, 169, 174, 182, 189, 195, 205,
222, 236, 249, 262, 278, 291, 305, 317, 324, 333, 340, 351,
360, 378, 391, 404, 412, 428, 442, 456, 466, 477, 487, 497,
511, 525, 537, 549, 568, 588, 605, 623, 636, 645, 656, 663,
674, 685, 695, 702, 712, 724, 734, 745, 754
};
#define N_CUSTOM_PREDEFINED 1
static void
ensure_atom_tables (void)
{
int i;
if (names_to_atoms)
return;
names_to_atoms = g_hash_table_new (g_str_hash, g_str_equal);
atoms_to_names = g_ptr_array_sized_new (G_N_ELEMENTS (xatoms_offset));
for (i = 0; i < G_N_ELEMENTS (xatoms_offset); i++)
{
g_hash_table_insert(names_to_atoms, (gchar *)xatoms_string + xatoms_offset[i], GINT_TO_POINTER (i));
g_ptr_array_add(atoms_to_names, (gchar *)xatoms_string + xatoms_offset[i]);
}
}
static GdkAtom
intern_atom_internal (const gchar *atom_name, gboolean allocate)
{
gpointer result;
gchar *name;
g_return_val_if_fail (atom_name != NULL, GDK_NONE);
ensure_atom_tables ();
if (g_hash_table_lookup_extended (names_to_atoms, atom_name, NULL, &result))
return result;
result = GINT_TO_POINTER (atoms_to_names->len);
name = allocate ? g_strdup (atom_name) : (gchar *)atom_name;
g_hash_table_insert(names_to_atoms, name, result);
g_ptr_array_add(atoms_to_names, name);
return result;
}
GdkAtom
gdk_atom_intern (const gchar *atom_name,
gboolean only_if_exists)
{
return intern_atom_internal (atom_name, TRUE);
}
GdkAtom
gdk_atom_intern_static_string (const gchar *atom_name)
{
return intern_atom_internal (atom_name, FALSE);
}
gchar *
gdk_atom_name (GdkAtom atom)
{
if (!atoms_to_names)
return NULL;
if (GPOINTER_TO_INT (atom) >= atoms_to_names->len)
return NULL;
return g_strdup(g_ptr_array_index (atoms_to_names, GPOINTER_TO_INT (atom)));
}
static void
gdk_property_delete_2 (GdkWindow *window,
GdkAtom property,
GdkWindowProperty *prop)
{
GdkWindowImplDirectFB *impl;
GdkEvent *event;
GdkWindow *event_window;
impl = GDK_WINDOW_IMPL_DIRECTFB (GDK_WINDOW_OBJECT (window)->impl);
g_hash_table_remove (impl->properties, GUINT_TO_POINTER (property));
g_free (prop);
event_window = gdk_directfb_other_event_window (window, GDK_PROPERTY_NOTIFY);
if (event_window)
{
event = gdk_directfb_event_make (event_window, GDK_PROPERTY_NOTIFY);
event->property.atom = property;
event->property.state = GDK_PROPERTY_DELETE;
}
}
void
gdk_property_delete (GdkWindow *window,
GdkAtom property)
{
GdkWindowImplDirectFB *impl;
GdkWindowProperty *prop;
g_return_if_fail (GDK_IS_WINDOW (window));
impl = GDK_WINDOW_IMPL_DIRECTFB (GDK_WINDOW_OBJECT (window)->impl);
if (!impl->properties)
return;
prop = g_hash_table_lookup (impl->properties, GUINT_TO_POINTER (property));
if (!prop)
return;
gdk_property_delete_2 (window, property, prop);
}
gboolean
gdk_property_get (GdkWindow *window,
GdkAtom property,
GdkAtom type,
gulong offset,
gulong length,
gint pdelete,
GdkAtom *actual_property_type,
gint *actual_format_type,
gint *actual_length,
guchar **data)
{
GdkWindowImplDirectFB *impl;
GdkWindowProperty *prop;
gint nbytes = 0;
g_return_val_if_fail (window == NULL || GDK_IS_WINDOW (window), FALSE);
g_return_val_if_fail (data != NULL, FALSE);
if (!window)
window = _gdk_parent_root;
if (GDK_WINDOW_DESTROYED (window))
return FALSE;
impl = GDK_WINDOW_IMPL_DIRECTFB (GDK_WINDOW_OBJECT (window)->impl);
if (!impl->properties)
return FALSE;
prop = g_hash_table_lookup (impl->properties, GUINT_TO_POINTER (property));
if (!prop)
{
if (actual_property_type)
*actual_property_type = GDK_NONE;
return FALSE;
}
nbytes = CLAMP (length, 0, prop->length - offset * 4);
if (nbytes > 0 &&
(prop->type == 0 /* AnyPropertyType */ || prop->type == type))
{
*data = g_malloc (nbytes + 1);
memcpy (*data, prop->data + offset, nbytes);
(*data)[nbytes] = 0;
}
else
{
*data = NULL;
}
if (actual_length)
*actual_length = nbytes;
if (actual_property_type)
*actual_property_type = prop->type;
if (actual_format_type)
*actual_format_type = prop->format;
/* only delete the property if it was completely retrieved */
if (pdelete && length >= *actual_length && *data != NULL)
{
gdk_property_delete_2 (window, property, prop);
}
return TRUE;
}
void
gdk_property_change (GdkWindow *window,
GdkAtom property,
GdkAtom type,
gint format,
GdkPropMode mode,
const guchar *data,
gint nelements)
{
GdkWindowImplDirectFB *impl;
GdkWindowProperty *prop;
GdkWindowProperty *new_prop;
gint new_size = 0;
GdkEvent *event;
GdkWindow *event_window;
g_return_if_fail (window == NULL || GDK_IS_WINDOW (window));
if (!window)
window = _gdk_parent_root;
if (GDK_WINDOW_DESTROYED (window))
return;
impl = GDK_WINDOW_IMPL_DIRECTFB (GDK_WINDOW_OBJECT (window)->impl);
if (!impl->properties)
impl->properties = g_hash_table_new (NULL, NULL);
prop = g_hash_table_lookup (impl->properties, GUINT_TO_POINTER (property));
switch (mode)
{
case GDK_PROP_MODE_REPLACE:
new_size = nelements * (format >> 3);
break;
case GDK_PROP_MODE_PREPEND:
case GDK_PROP_MODE_APPEND:
new_size = nelements * (format >> 3);
if (prop)
{
if (type != prop->type || format != prop->format)
return;
new_size += prop->length;
}
break;
}
new_prop = g_malloc (G_STRUCT_OFFSET (GdkWindowProperty, data) + new_size);
new_prop->length = new_size;
new_prop->type = type;
new_prop->format = format;
switch (mode)
{
case GDK_PROP_MODE_REPLACE:
memcpy (new_prop->data, data, new_size);
break;
case GDK_PROP_MODE_APPEND:
if (prop)
memcpy (new_prop->data, prop->data, prop->length);
memcpy (new_prop->data + new_prop->length,
data, (nelements * (format >> 3)));
break;
case GDK_PROP_MODE_PREPEND:
memcpy (new_prop->data, data, (nelements * (format >> 3)));
if (prop)
memcpy (new_prop->data + (nelements * (format >> 3)),
prop->data, prop->length);
break;
}
g_hash_table_insert (impl->properties,
GUINT_TO_POINTER (property), new_prop);
g_free (prop);
event_window = gdk_directfb_other_event_window (window, GDK_PROPERTY_NOTIFY);
if (event_window)
{
event = gdk_directfb_event_make (event_window, GDK_PROPERTY_NOTIFY);
event->property.atom = property;
event->property.state = GDK_PROPERTY_NEW_VALUE;
}
}

View File

@@ -1,248 +0,0 @@
/* GDK - The GIMP Drawing Kit
* Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald
* Copyright (C) 1998-1999 Tor Lillqvist
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
* Boston, MA 02111-1307, USA.
*/
/*
* Modified by the GTK+ Team and others 1997-2000. See the AUTHORS
* file for a list of people on the GTK+ Team.
*/
/*
* GTK+ DirectFB backend
* Copyright (C) 2001-2002 convergence integrated media GmbH
* Copyright (C) 2002-2004 convergence GmbH
* Written by Denis Oliver Kropp <dok@convergence.de> and
* Sven Neumann <sven@convergence.de>
*/
#include "config.h"
#include "gdk.h"
#include "gdkscreen.h"
#include "gdkdirectfb.h"
#include "gdkprivate-directfb.h"
#include "gdkinternals.h"
static GdkColormap *default_colormap = NULL;
GdkDisplay *
gdk_screen_get_display (GdkScreen *screen)
{
return GDK_DISPLAY_OBJECT(_gdk_display);
}
GdkWindow *
gdk_screen_get_root_window (GdkScreen *screen)
{
return _gdk_parent_root;
}
GdkColormap*
gdk_screen_get_default_colormap (GdkScreen *screen)
{
return default_colormap;
}
void
gdk_screen_set_default_colormap (GdkScreen *screen,
GdkColormap *colormap)
{
GdkColormap *old_colormap;
g_return_if_fail (GDK_IS_SCREEN (screen));
g_return_if_fail (GDK_IS_COLORMAP (colormap));
old_colormap = default_colormap;
default_colormap = g_object_ref (colormap);
if (old_colormap)
g_object_unref (old_colormap);
}
gint
gdk_screen_get_n_monitors (GdkScreen *screen)
{
g_return_val_if_fail (GDK_IS_SCREEN (screen), 0);
return 1;
}
gint
gdk_screen_get_primary_monitor (GdkScreen *screen)
{
g_return_val_if_fail (GDK_IS_SCREEN (screen), 0);
return 0;
}
void
gdk_screen_get_monitor_geometry (GdkScreen *screen,
gint num_monitor,
GdkRectangle *dest)
{
g_return_if_fail (GDK_IS_SCREEN (screen));
g_return_if_fail (dest != NULL);
dest->x = 0;
dest->y = 0;
dest->width = gdk_screen_width ();
dest->height = gdk_screen_height ();
}
gint
gdk_screen_get_monitor_width_mm (GdkScreen *screen,
gint monitor_num)
{
return gdk_screen_get_width_mm (screen);
}
gint
gdk_screen_get_monitor_height_mm (GdkScreen *screen,
gint monitor_num)
{
return gdk_screen_get_height_mm (screen);
}
gchar *
gdk_screen_get_monitor_plug_name (GdkScreen *screen,
gint monitor_num)
{
return g_strdup ("DirectFB");
}
gint
gdk_screen_get_number (GdkScreen *screen)
{
g_return_val_if_fail (GDK_IS_SCREEN (screen), 0);
return 0;
}
gchar *
_gdk_windowing_substitute_screen_number (const gchar *display_name,
int screen_number)
{
return g_strdup (display_name);
}
gchar *
gdk_screen_make_display_name (GdkScreen *screen)
{
return g_strdup ("DirectFB");
}
gint
gdk_screen_get_width (GdkScreen *screen)
{
DFBDisplayLayerConfig dlc;
_gdk_display->layer->GetConfiguration (_gdk_display->layer, &dlc);
return dlc.width;
}
gint
gdk_screen_get_height (GdkScreen *screen)
{
DFBDisplayLayerConfig dlc;
_gdk_display->layer->GetConfiguration (_gdk_display->layer, &dlc);
return dlc.height;
}
gint
gdk_screen_get_width_mm (GdkScreen *screen)
{
static gboolean first_call = TRUE;
DFBDisplayLayerConfig dlc;
if (first_call)
{
g_message
("gdk_screen_width_mm() assumes a screen resolution of 72 dpi");
first_call = FALSE;
}
_gdk_display->layer->GetConfiguration (_gdk_display->layer, &dlc);
return (dlc.width * 254) / 720;
}
gint
gdk_screen_get_height_mm (GdkScreen *screen)
{
static gboolean first_call = TRUE;
DFBDisplayLayerConfig dlc;
if (first_call)
{
g_message
("gdk_screen_height_mm() assumes a screen resolution of 72 dpi");
first_call = FALSE;
}
_gdk_display->layer->GetConfiguration (_gdk_display->layer, &dlc);
return (dlc.height * 254) / 720;
}
GdkVisual *
gdk_screen_get_rgba_visual (GdkScreen *screen)
{
static GdkVisual *rgba_visual;
if( !rgba_visual )
rgba_visual = gdk_directfb_visual_by_format(DSPF_ARGB);
return rgba_visual;
}
GdkColormap *
gdk_screen_get_rgba_colormap (GdkScreen *screen)
{
static GdkColormap *rgba_colormap;
if( !rgba_colormap && gdk_screen_get_rgba_visual(screen) )
rgba_colormap = gdk_colormap_new (gdk_screen_get_rgba_visual(screen),FALSE);
return rgba_colormap;
}
GdkWindow *
gdk_screen_get_active_window (GdkScreen *screen)
{
g_return_val_if_fail (GDK_IS_SCREEN (screen), NULL);
return NULL;
}
GList *
gdk_screen_get_window_stack (GdkScreen *screen)
{
g_return_val_if_fail (GDK_IS_SCREEN (screen), NULL);
return NULL;
}
gboolean
gdk_screen_is_composited (GdkScreen *screen)
{
g_return_val_if_fail (GDK_IS_SCREEN (screen), FALSE);
return FALSE;
}

View File

@@ -1,494 +0,0 @@
/* GDK - The GIMP Drawing Kit
* Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
* Boston, MA 02111-1307, USA.
*/
/*
* Modified by the GTK+ Team and others 1997-2000. See the AUTHORS
* file for a list of people on the GTK+ Team.
*/
/*
* GTK+ DirectFB backend
* Copyright (C) 2001-2002 convergence integrated media GmbH
* Copyright (C) 2002-2004 convergence GmbH
* Written by Denis Oliver Kropp <dok@convergence.de> and
* Sven Neumann <sven@convergence.de>
*/
#include "config.h"
#include <string.h>
#include "gdkdirectfb.h"
#include "gdkprivate-directfb.h"
#include "gdkproperty.h"
#include "gdkselection.h"
#include "gdkprivate.h"
typedef struct _OwnerInfo OwnerInfo;
struct _OwnerInfo
{
GdkAtom selection;
GdkWindow *owner;
};
GSList *owner_list = NULL;
/* When a window is destroyed we check if it is the owner
* of any selections. This is somewhat inefficient, but
* owner_list is typically short, and it is a low memory,
* low code solution
*/
void
_gdk_selection_window_destroyed (GdkWindow *window)
{
GSList *tmp_list = owner_list;
while (tmp_list)
{
OwnerInfo *info = tmp_list->data;
tmp_list = tmp_list->next;
if (info->owner == window)
{
owner_list = g_slist_remove (owner_list, info);
g_free (info);
}
}
}
gint
gdk_selection_owner_set_for_display (GdkDisplay *display,
GdkWindow *owner,
GdkAtom selection,
guint32 time,
gint send_event)
{
GSList *tmp_list;
OwnerInfo *info;
tmp_list = owner_list;
while (tmp_list)
{
info = tmp_list->data;
if (info->selection == selection)
{
owner_list = g_slist_remove (owner_list, info);
g_free (info);
break;
}
tmp_list = tmp_list->next;
}
if (owner)
{
info = g_new (OwnerInfo, 1);
info->owner = owner;
info->selection = selection;
owner_list = g_slist_prepend (owner_list, info);
}
return TRUE;
}
GdkWindow *
gdk_selection_owner_get_for_display (GdkDisplay *display,
GdkAtom selection)
{
OwnerInfo *info;
GSList *tmp_list;
tmp_list = owner_list;
while (tmp_list)
{
info = tmp_list->data;
if (info->selection == selection)
{
return info->owner;
}
tmp_list = tmp_list->next;
}
return NULL;
}
void
gdk_selection_convert (GdkWindow *requestor,
GdkAtom selection,
GdkAtom target,
guint32 time)
{
GdkEvent *event;
GdkWindow *owner;
GdkWindow *event_window;
owner = gdk_selection_owner_get (selection);
if (owner)
{
event_window = gdk_directfb_other_event_window (owner,
GDK_SELECTION_REQUEST);
if (event_window)
{
event = gdk_directfb_event_make (event_window,
GDK_SELECTION_REQUEST);
event->selection.requestor = GDK_WINDOW_DFB_ID (requestor);
event->selection.selection = selection;
event->selection.target = target;
event->selection.property = _gdk_selection_property;
}
}
else
{
/* If no owner for the specified selection exists, the X server
* generates a SelectionNotify event to the requestor with property None.
*/
gdk_selection_send_notify (GDK_WINDOW_DFB_ID (requestor),
selection,
target,
GDK_NONE,
0);
}
}
gint
gdk_selection_property_get (GdkWindow *requestor,
guchar **data,
GdkAtom *ret_type,
gint *ret_format)
{
guchar *t = NULL;
GdkAtom prop_type;
gint prop_format;
gint prop_len;
g_return_val_if_fail (requestor != NULL, 0);
g_return_val_if_fail (GDK_IS_WINDOW (requestor), 0);
if (!gdk_property_get (requestor,
_gdk_selection_property,
0/*AnyPropertyType?*/,
0, 0,
FALSE,
&prop_type, &prop_format, &prop_len,
&t))
{
*data = NULL;
return 0;
}
if (ret_type)
*ret_type = prop_type;
if (ret_format)
*ret_format = prop_format;
if (!gdk_property_get (requestor,
_gdk_selection_property,
0/*AnyPropertyType?*/,
0, prop_len + 1,
FALSE,
&prop_type, &prop_format, &prop_len,
&t))
{
*data = NULL;
return 0;
}
*data = t;
return prop_len;
}
void
gdk_selection_send_notify_for_display (GdkDisplay *display,
guint32 requestor,
GdkAtom selection,
GdkAtom target,
GdkAtom property,
guint32 time)
{
GdkEvent *event;
GdkWindow *event_window;
event_window = gdk_window_lookup ((GdkNativeWindow) requestor);
if (!event_window)
return;
event_window = gdk_directfb_other_event_window (event_window,
GDK_SELECTION_NOTIFY);
if (event_window)
{
event = gdk_directfb_event_make (event_window, GDK_SELECTION_NOTIFY);
event->selection.selection = selection;
event->selection.target = target;
event->selection.property = property;
event->selection.requestor = (GdkNativeWindow) requestor;
}
}
gint
gdk_text_property_to_text_list_for_display (GdkDisplay *display,
GdkAtom encoding,
gint format,
const guchar *text,
gint length,
gchar ***list)
{
g_warning ("gdk_text_property_to_text_list() not implemented\n");
return 0;
}
void
gdk_free_text_list (gchar **list)
{
g_return_if_fail (list != NULL);
g_warning ("gdk_free_text_list() not implemented\n");
}
gint
gdk_string_to_compound_text_for_display (GdkDisplay *display,
const gchar *str,
GdkAtom *encoding,
gint *format,
guchar **ctext,
gint *length)
{
g_warning ("gdk_string_to_compound_text() not implemented\n");
return 0;
}
void
gdk_free_compound_text (guchar *ctext)
{
g_warning ("gdk_free_compound_text() not implemented\n");
}
/**
* gdk_utf8_to_string_target:
* @str: a UTF-8 string
*
* Convert an UTF-8 string into the best possible representation
* as a STRING. The representation of characters not in STRING
* is not specified; it may be as pseudo-escape sequences
* \x{ABCD}, or it may be in some other form of approximation.
*
* Return value: the newly allocated string, or %NULL if the
* conversion failed. (It should not fail for
* any properly formed UTF-8 string.)
**/
gchar *
gdk_utf8_to_string_target (const gchar *str)
{
g_warning ("gdk_utf8_to_string_target() not implemented\n");
return 0;
}
/**
* gdk_utf8_to_compound_text:
* @str: a UTF-8 string
* @encoding: location to store resulting encoding
* @format: location to store format of the result
* @ctext: location to store the data of the result
* @length: location to store the length of the data
* stored in @ctext
*
* Convert from UTF-8 to compound text.
*
* Return value: %TRUE if the conversion succeeded, otherwise
* false.
**/
gboolean
gdk_utf8_to_compound_text_for_display (GdkDisplay *display,
const gchar *str,
GdkAtom *encoding,
gint *format,
guchar **ctext,
gint *length)
{
g_warning ("gdk_utf8_to_compound_text() not implemented\n");
return 0;
}
static gint
make_list (const gchar *text,
gint length,
gboolean latin1,
gchar ***list)
{
GSList *strings = NULL;
gint n_strings = 0;
gint i;
const gchar *p = text;
const gchar *q;
GSList *tmp_list;
GError *error = NULL;
while (p < text + length)
{
gchar *str;
q = p;
while (*q && q < text + length)
q++;
if (latin1)
{
str = g_convert (p, q - p,
"UTF-8", "ISO-8859-1",
NULL, NULL, &error);
if (!str)
{
g_warning ("Error converting selection from STRING: %s",
error->message);
g_error_free (error);
}
}
else
str = g_strndup (p, q - p);
if (str)
{
strings = g_slist_prepend (strings, str);
n_strings++;
}
p = q + 1;
}
if (list)
*list = g_new (gchar *, n_strings + 1);
(*list)[n_strings] = NULL;
i = n_strings;
tmp_list = strings;
while (tmp_list)
{
if (list)
(*list)[--i] = tmp_list->data;
else
g_free (tmp_list->data);
tmp_list = tmp_list->next;
}
g_slist_free (strings);
return n_strings;
}
/**
* gdk_text_property_to_utf8_list:
* @encoding: an atom representing the encoding of the text
* @format: the format of the property
* @text: the text to convert
* @length: the length of @text, in bytes
* @list: location to store the list of strings or %NULL. The
* list should be freed with g_strfreev().
*
* Convert a text property in the giving encoding to
* a list of UTF-8 strings.
*
* Return value: the number of strings in the resulting
* list.
**/
gint
gdk_text_property_to_utf8_list_for_display (GdkDisplay *display,
GdkAtom encoding,
gint format,
const guchar *text,
gint length,
gchar ***list)
{
g_return_val_if_fail (text != NULL, 0);
g_return_val_if_fail (length >= 0, 0);
if (encoding == GDK_TARGET_STRING)
{
return make_list ((gchar *)text, length, TRUE, list);
}
else if (encoding == gdk_atom_intern ("UTF8_STRING", FALSE))
{
return make_list ((gchar *)text, length, FALSE, list);
}
else
{
gchar **local_list;
gint local_count;
gint i;
const gchar *charset = NULL;
gboolean need_conversion = !g_get_charset (&charset);
gint count = 0;
GError *error = NULL;
/* Probably COMPOUND text, we fall back to Xlib routines
*/
local_count = gdk_text_property_to_text_list (encoding,
format,
text,
length,
&local_list);
if (list)
*list = g_new (gchar *, local_count + 1);
for (i = 0; i < local_count; i++)
{
/* list contains stuff in our default encoding
*/
if (need_conversion)
{
gchar *utf = g_convert (local_list[i], -1,
"UTF-8", charset,
NULL, NULL, &error);
if (utf)
{
if (list)
(*list)[count++] = utf;
else
g_free (utf);
}
else
{
g_warning ("Error converting to UTF-8 from '%s': %s",
charset, error->message);
g_error_free (error);
error = NULL;
}
}
else
{
if (list)
(*list)[count++] = g_strdup (local_list[i]);
}
}
gdk_free_text_list (local_list);
(*list)[count] = NULL;
return count;
}
}

View File

@@ -1,104 +0,0 @@
/*
* Copyright (C) 2003 Sun Microsystems Inc.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Library General Public License for more details.
*
* You should have received a copy of the GNU Library General Public
* License along with this library; if not, write to the
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
* Boston, MA 02111-1307, USA.
*
* Authors: Mark McLoughlin <mark@skynet.ie>
*/
#include "config.h"
#include <glib.h>
#include "gdk.h"
#include "gdkspawn.h"
#include "gdkprivate.h"
gboolean
gdk_spawn_on_screen (GdkScreen *screen,
const gchar *working_directory,
gchar **argv,
gchar **envp,
GSpawnFlags flags,
GSpawnChildSetupFunc child_setup,
gpointer user_data,
GPid *child_pid,
GError **error)
{
g_return_val_if_fail (GDK_IS_SCREEN (screen), FALSE);
return g_spawn_async (working_directory,
argv,
envp,
flags,
child_setup,
user_data,
child_pid,
error);
}
gboolean
gdk_spawn_on_screen_with_pipes (GdkScreen *screen,
const gchar *working_directory,
gchar **argv,
gchar **envp,
GSpawnFlags flags,
GSpawnChildSetupFunc child_setup,
gpointer user_data,
GPid *child_pid,
gint *standard_input,
gint *standard_output,
gint *standard_error,
GError **error)
{
g_return_val_if_fail (GDK_IS_SCREEN (screen), FALSE);
return g_spawn_async_with_pipes (working_directory,
argv,
envp,
flags,
child_setup,
user_data,
child_pid,
standard_input,
standard_output,
standard_error,
error);
}
gboolean
gdk_spawn_command_line_on_screen (GdkScreen *screen,
const gchar *command_line,
GError **error)
{
gchar **argv = NULL;
gboolean retval;
g_return_val_if_fail (command_line != NULL, FALSE);
if (!g_shell_parse_argv (command_line,
NULL, &argv,
error))
return FALSE;
retval = gdk_spawn_on_screen (screen,
NULL, argv, NULL,
G_SPAWN_SEARCH_PATH,
NULL, NULL, NULL,
error);
g_strfreev (argv);
return retval;
}

View File

@@ -1,263 +0,0 @@
/* Gtk+ testing utilities
* Copyright (C) 2007 Imendio AB
* Authors: Tim Janik
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
* Boston, MA 02111-1307, USA.
*/
/*
* GTK+ DirectFB backend
* Copyright (C) 2001-2002 convergence integrated media GmbH
* Copyright (C) 2002-2004 convergence GmbH
* Written by Denis Oliver Kropp <dok@convergence.de> and
* Sven Neumann <sven@convergence.de>
*/
#include "config.h"
#include <unistd.h>
#include "gdk.h"
#include "gdkdirectfb.h"
#include "gdkprivate-directfb.h"
#include <gdk/gdktestutils.h>
#include <gdk/gdkkeysyms.h>
static DFBInputDeviceKeySymbol
_gdk_keyval_to_directfb (guint keyval)
{
switch (keyval) {
case 0 ... 127:
return DFB_KEY( UNICODE, keyval );
case GDK_F1 ... GDK_F12:
return keyval - GDK_F1 + DIKS_F1;
case GDK_BackSpace:
return DIKS_BACKSPACE;
case GDK_Tab:
return DIKS_TAB;
case GDK_Return:
return DIKS_RETURN;
case GDK_Escape:
return DIKS_ESCAPE;
case GDK_Delete:
return DIKS_DELETE;
case GDK_Left:
return DIKS_CURSOR_LEFT;
case GDK_Up:
return DIKS_CURSOR_UP;
case GDK_Right:
return DIKS_CURSOR_RIGHT;
case GDK_Down:
return DIKS_CURSOR_DOWN;
case GDK_Insert:
return DIKS_INSERT;
case GDK_Home:
return DIKS_HOME;
case GDK_End:
return DIKS_END;
case GDK_Page_Up:
return DIKS_PAGE_UP;
case GDK_Page_Down:
return DIKS_PAGE_DOWN;
case GDK_Print:
return DIKS_PRINT;
case GDK_Pause:
return DIKS_PAUSE;
case GDK_Clear:
return DIKS_CLEAR;
case GDK_Cancel:
return DIKS_CANCEL;
/* TODO: handle them all */
default:
break;
}
return DIKS_NULL;
}
static DFBInputDeviceModifierMask
_gdk_modifiers_to_directfb (GdkModifierType modifiers)
{
DFBInputDeviceModifierMask dfb_modifiers = 0;
if (modifiers & GDK_MOD1_MASK)
dfb_modifiers |= DIMM_ALT;
if (modifiers & GDK_MOD2_MASK)
dfb_modifiers |= DIMM_ALTGR;
if (modifiers & GDK_CONTROL_MASK)
dfb_modifiers |= DIMM_CONTROL;
if (modifiers & GDK_SHIFT_MASK)
dfb_modifiers |= DIMM_SHIFT;
return dfb_modifiers;
}
/**
* gdk_test_render_sync
* @window: a mapped GdkWindow
*
* This function retrives a pixel from @window to force the windowing
* system to carry out any pending rendering commands.
* This function is intended to be used to syncronize with rendering
* pipelines, to benchmark windowing system rendering operations.
**/
void
gdk_test_render_sync (GdkWindow *window)
{
_gdk_display->directfb->WaitIdle (_gdk_display->directfb);
}
/**
* gdk_test_simulate_key
* @window: Gdk window to simulate a key event for.
* @x: x coordinate within @window for the key event.
* @y: y coordinate within @window for the key event.
* @keyval: A Gdk keyboard value.
* @modifiers: Keyboard modifiers the event is setup with.
* @key_pressrelease: either %GDK_KEY_PRESS or %GDK_KEY_RELEASE
*
* This function is intended to be used in Gtk+ test programs.
* If (@x,@y) are > (-1,-1), it will warp the mouse pointer to
* the given (@x,@y) corrdinates within @window and simulate a
* key press or release event.
* When the mouse pointer is warped to the target location, use
* of this function outside of test programs that run in their
* own virtual windowing system (e.g. Xvfb) is not recommended.
* If (@x,@y) are passed as (-1,-1), the mouse pointer will not
* be warped and @window origin will be used as mouse pointer
* location for the event.
* Also, gtk_test_simulate_key() is a fairly low level function,
* for most testing purposes, gtk_test_widget_send_key() is the
* right function to call which will generate a key press event
* followed by its accompanying key release event.
*
* Returns: wether all actions neccessary for a key event simulation were carried out successfully.
**/
gboolean
gdk_test_simulate_key (GdkWindow *window,
gint x,
gint y,
guint keyval,
GdkModifierType modifiers,
GdkEventType key_pressrelease)
{
GdkWindowObject *private;
GdkWindowImplDirectFB *impl;
DFBWindowEvent evt;
g_return_val_if_fail (GDK_IS_WINDOW(window), FALSE);
g_return_val_if_fail (key_pressrelease == GDK_KEY_PRESS ||
key_pressrelease == GDK_KEY_RELEASE, FALSE);
private = GDK_WINDOW_OBJECT (window);
impl = GDK_WINDOW_IMPL_DIRECTFB (private->impl);
if (x >= 0 && y >= 0) {
int win_x, win_y;
impl->window->GetPosition (impl->window, &win_x, &win_y);
if (_gdk_display->layer->WarpCursor (_gdk_display->layer, win_x+x, win_y+y))
return FALSE;
}
evt.clazz = DFEC_WINDOW;
evt.type = (key_pressrelease == GDK_KEY_PRESS) ? DWET_KEYDOWN : DWET_KEYUP;
#if ((DIRECTFB_MAJOR_VERSION > 1) || (DIRECTFB_MINOR_VERSION >= 2))
evt.flags = DWEF_NONE;
#endif
evt.window_id = impl->dfb_id;
evt.x = MAX(x, 0);
evt.y = MAX(y, 0);
_gdk_display->layer->GetCursorPosition (_gdk_display->layer, &evt.cx, &evt.cy);
evt.key_code = -1;
evt.key_symbol = _gdk_keyval_to_directfb (keyval);
evt.modifiers = _gdk_modifiers_to_directfb (modifiers);
evt.locks = (modifiers & GDK_LOCK_MASK) ? DILS_CAPS : 0;
gettimeofday (&evt.timestamp, NULL);
_gdk_display->buffer->PostEvent (_gdk_display->buffer, DFB_EVENT(&evt));
return TRUE;
}
/**
* gdk_test_simulate_button
* @window: Gdk window to simulate a button event for.
* @x: x coordinate within @window for the button event.
* @y: y coordinate within @window for the button event.
* @button: Number of the pointer button for the event, usually 1, 2 or 3.
* @modifiers: Keyboard modifiers the event is setup with.
* @button_pressrelease: either %GDK_BUTTON_PRESS or %GDK_BUTTON_RELEASE
*
* This function is intended to be used in Gtk+ test programs.
* It will warp the mouse pointer to the given (@x,@y) corrdinates
* within @window and simulate a button press or release event.
* Because the mouse pointer needs to be warped to the target
* location, use of this function outside of test programs that
* run in their own virtual windowing system (e.g. Xvfb) is not
* recommended.
* Also, gtk_test_simulate_button() is a fairly low level function,
* for most testing purposes, gtk_test_widget_click() is the right
* function to call which will generate a button press event followed
* by its accompanying button release event.
*
* Returns: wether all actions neccessary for a button event simulation were carried out successfully.
**/
gboolean
gdk_test_simulate_button (GdkWindow *window,
gint x,
gint y,
guint button, /*1..3*/
GdkModifierType modifiers,
GdkEventType button_pressrelease)
{
GdkWindowObject *private;
GdkWindowImplDirectFB *impl;
DFBWindowEvent evt;
g_return_val_if_fail (GDK_IS_WINDOW(window), FALSE);
g_return_val_if_fail (button_pressrelease == GDK_BUTTON_PRESS ||
button_pressrelease == GDK_BUTTON_RELEASE, FALSE);
private = GDK_WINDOW_OBJECT (window);
impl = GDK_WINDOW_IMPL_DIRECTFB (private->impl);
if (x >= 0 && y >= 0) {
int win_x, win_y;
impl->window->GetPosition (impl->window, &win_x, &win_y);
if (_gdk_display->layer->WarpCursor (_gdk_display->layer, win_x+x, win_y+y))
return FALSE;
}
evt.clazz = DFEC_WINDOW;
evt.type = (button_pressrelease == GDK_BUTTON_PRESS) ? DWET_BUTTONDOWN : DWET_BUTTONUP;
#if ((DIRECTFB_MAJOR_VERSION > 1) || (DIRECTFB_MINOR_VERSION >= 2))
evt.flags = DWEF_NONE;
#endif
evt.window_id = impl->dfb_id;
evt.x = MAX(x, 0);
evt.y = MAX(y, 0);
_gdk_display->layer->GetCursorPosition (_gdk_display->layer, &evt.cx, &evt.cy);
evt.modifiers = _gdk_modifiers_to_directfb (modifiers);
evt.locks = (modifiers & GDK_LOCK_MASK) ? DILS_CAPS : 0;
evt.button = button;
evt.buttons = 0;
gettimeofday (&evt.timestamp, NULL);
_gdk_display->buffer->PostEvent (_gdk_display->buffer, DFB_EVENT(&evt));
return TRUE;
}

View File

@@ -1,493 +0,0 @@
/* GDK - The GIMP Drawing Kit
* Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
* Boston, MA 02111-1307, USA.
*/
/*
* Modified by the GTK+ Team and others 1997-2000. See the AUTHORS
* file for a list of people on the GTK+ Team.
*/
/*
* GTK+ DirectFB backend
* Copyright (C) 2001-2002 convergence integrated media GmbH
* Copyright (C) 2002-2004 convergence GmbH
* Written by Denis Oliver Kropp <dok@convergence.de> and
* Sven Neumann <sven@convergence.de>
*/
#include "config.h"
#include "gdkdirectfb.h"
#include "gdkprivate-directfb.h"
#include "gdkscreen.h"
#include "gdkvisual.h"
struct _GdkVisualClass
{
GObjectClass parent_class;
};
static void gdk_visual_decompose_mask (gulong mask,
gint *shift,
gint *prec);
static GdkVisualDirectFB * gdk_directfb_visual_create (DFBSurfacePixelFormat pixelformat);
static DFBSurfacePixelFormat formats[] =
{
DSPF_ARGB,
DSPF_LUT8,
DSPF_RGB32,
DSPF_RGB24,
DSPF_RGB16,
DSPF_ARGB1555,
DSPF_RGB332
};
GdkVisual * system_visual = NULL;
static GdkVisualDirectFB * visuals[G_N_ELEMENTS (formats) + 1] = { NULL };
static gint available_depths[G_N_ELEMENTS (formats) + 1] = {0};
static GdkVisualType available_types[G_N_ELEMENTS (formats) + 1] = {0};
static void
gdk_visual_finalize (GObject *object)
{
g_error ("A GdkVisual object was finalized. This should not happen");
}
static void
gdk_visual_class_init (GObjectClass *class)
{
class->finalize = gdk_visual_finalize;
}
GType
gdk_visual_get_type (void)
{
static GType object_type = 0;
if (!object_type)
{
const GTypeInfo object_info =
{
sizeof (GdkVisualClass),
(GBaseInitFunc) NULL,
(GBaseFinalizeFunc) NULL,
(GClassInitFunc) gdk_visual_class_init,
NULL, /* class_finalize */
NULL, /* class_data */
sizeof (GdkVisualDirectFB),
0, /* n_preallocs */
(GInstanceInitFunc) NULL,
};
object_type = g_type_register_static (G_TYPE_OBJECT,
"GdkVisual",
&object_info, 0);
}
return object_type;
}
void
_gdk_visual_init ()
{
DFBDisplayLayerConfig dlc;
DFBSurfaceDescription desc;
IDirectFBSurface *dest;
gint i, c;
_gdk_display->layer->GetConfiguration (_gdk_display->layer, &dlc);
g_assert( dlc.pixelformat != DSPF_UNKNOWN);
dest = gdk_display_dfb_create_surface(_gdk_display,dlc.pixelformat,8,8);
g_assert (dest != NULL);
/* We could provide all visuals since DirectFB allows us to mix
surface formats. Blitting with format conversion can however
be incredibly slow, so we've choosen to register only those
visuals that can be blitted to the display layer in hardware.
If you want to use a special pixelformat that is not registered
here, you can create it using the DirectFB-specific function
gdk_directfb_visual_by_format().
Note:
changed to do all formats but we should redo this code
to ensure the base format ARGB LUT8 RGB etc then add ones supported
by the hardware
*/
for (i = 0; i < G_N_ELEMENTS (formats); i++)
{
IDirectFBSurface *src;
DFBAccelerationMask acc;
desc.flags = DSDESC_WIDTH | DSDESC_HEIGHT | DSDESC_PIXELFORMAT;
desc.width = 8;
desc.height = 8;
desc.pixelformat = formats[i];
//call direct so fail silently is ok
if (_gdk_display->directfb->CreateSurface (_gdk_display->directfb,
&desc, &src) != DFB_OK)
continue;
visuals[i] = gdk_directfb_visual_create (formats[i]);
dest->GetAccelerationMask (dest, src, &acc);
if (acc & DFXL_BLIT || formats[i] == dlc.pixelformat)
{
system_visual = GDK_VISUAL (visuals[i]);
}
src->Release (src);
}
dest->Release (dest);
//fallback to ARGB must be supported
if (!system_visual)
{
g_assert (visuals[DSPF_ARGB] != NULL);
system_visual = GDK_VISUAL(visuals[DSPF_ARGB]);
}
g_assert (system_visual != NULL);
}
gint
gdk_visual_get_best_depth (void)
{
return system_visual->depth;
}
GdkVisualType
gdk_visual_get_best_type (void)
{
return system_visual->type;
}
GdkVisual*
gdk_screen_get_system_visual (GdkScreen *screen)
{
g_assert( system_visual);
return system_visual;
}
GdkVisual*
gdk_visual_get_best (void)
{
return system_visual;
}
GdkVisual*
gdk_visual_get_best_with_depth (gint depth)
{
gint i;
for (i = 0; visuals[i]; i++)
{
if( visuals[i] ) {
GdkVisual *visual = GDK_VISUAL (visuals[i]);
if (depth == visual->depth)
return visual;
}
}
return NULL;
}
GdkVisual*
gdk_visual_get_best_with_type (GdkVisualType visual_type)
{
gint i;
for (i = 0; visuals[i]; i++)
{
if( visuals[i] ) {
GdkVisual *visual = GDK_VISUAL (visuals[i]);
if (visual_type == visual->type)
return visual;
}
}
return NULL;
}
GdkVisual*
gdk_visual_get_best_with_both (gint depth,
GdkVisualType visual_type)
{
gint i;
for (i = 0; visuals[i]; i++)
{
if( visuals[i] ) {
GdkVisual *visual = GDK_VISUAL (visuals[i]);
if (depth == visual->depth && visual_type == visual->type)
return visual;
}
}
return system_visual;
}
void
gdk_query_depths (gint **depths,
gint *count)
{
gint i;
for (i = 0; available_depths[i]; i++)
;
*count = i;
*depths = available_depths;
}
void
gdk_query_visual_types (GdkVisualType **visual_types,
gint *count)
{
gint i;
for (i = 0; available_types[i]; i++)
;
*count = i;
*visual_types = available_types;
}
GList *
gdk_screen_list_visuals (GdkScreen *screen)
{
GList *list = NULL;
gint i;
for (i = 0; visuals[i]; i++)
if( visuals[i] ) {
GdkVisual * vis = GDK_VISUAL(visuals[i]);
list = g_list_append (list,vis);
}
return list;
}
/**
* gdk_directfb_visual_by_format:
* @pixel_format: the pixel_format of the requested visual
*
* This function is specific to the DirectFB backend. It allows
* to specify a GdkVisual by @pixel_format.
*
* At startup, only those visuals that can be blitted
* hardware-accelerated are registered. By using
* gdk_directfb_visual_by_format() you can retrieve visuals that
* don't match this criteria since this function will try to create
* a new visual for the desired @pixel_format for you.
*
* Return value: a pointer to the GdkVisual or %NULL if the
* pixel_format is unsupported.
**/
GdkVisual *
gdk_directfb_visual_by_format (DFBSurfacePixelFormat pixel_format)
{
gint i;
/* first check if one the registered visuals matches */
for (i = 0; visuals[i]; i++)
if ( visuals[i] && visuals[i]->format == pixel_format)
return GDK_VISUAL (visuals[i]);
/* none matched, try to create a new one for this pixel_format */
{
DFBSurfaceDescription desc;
IDirectFBSurface *test;
desc.flags = DSDESC_WIDTH | DSDESC_HEIGHT | DSDESC_PIXELFORMAT;
desc.width = 8;
desc.height = 8;
desc.pixelformat = pixel_format;
if ( _gdk_display->directfb->CreateSurface ( _gdk_display->directfb, &desc, &test) != DFB_OK)
return NULL;
test->Release (test);
}
return GDK_VISUAL(gdk_directfb_visual_create (pixel_format));
}
GdkScreen *
gdk_visual_get_screen (GdkVisual *visual)
{
g_return_val_if_fail (GDK_IS_VISUAL (visual), NULL);
return gdk_screen_get_default ();
}
static void
gdk_visual_decompose_mask (gulong mask,
gint *shift,
gint *prec)
{
*shift = 0;
*prec = 0;
while (!(mask & 0x1))
{
(*shift)++;
mask >>= 1;
}
while (mask & 0x1)
{
(*prec)++;
mask >>= 1;
}
}
static GdkVisualDirectFB *
gdk_directfb_visual_create (DFBSurfacePixelFormat pixelformat)
{
GdkVisual *visual;
gint i;
for (i = 0; i < G_N_ELEMENTS (formats); i++)
if (formats[i] == pixelformat)
break;
if (i == G_N_ELEMENTS (formats))
{
g_warning ("unsupported pixelformat");
return NULL;
}
visual = g_object_new (GDK_TYPE_VISUAL, NULL);
switch (pixelformat)
{
case DSPF_LUT8:
visual->type = GDK_VISUAL_PSEUDO_COLOR;
visual->bits_per_rgb = 8;
break;
case DSPF_RGB332:
visual->type = GDK_VISUAL_STATIC_COLOR;
visual->bits_per_rgb = 3;
break;
case DSPF_ARGB1555:
visual->type = GDK_VISUAL_TRUE_COLOR;
visual->red_mask = 0x00007C00;
visual->green_mask = 0x000003E0;
visual->blue_mask = 0x0000001F;
visual->bits_per_rgb = 5;
break;
case DSPF_RGB16:
visual->type = GDK_VISUAL_TRUE_COLOR;
visual->red_mask = 0x0000F800;
visual->green_mask = 0x000007E0;
visual->blue_mask = 0x0000001F;
visual->bits_per_rgb = 6;
break;
case DSPF_RGB24:
case DSPF_RGB32:
case DSPF_ARGB:
visual->type = GDK_VISUAL_TRUE_COLOR;
visual->red_mask = 0x00FF0000;
visual->green_mask = 0x0000FF00;
visual->blue_mask = 0x000000FF;
visual->bits_per_rgb = 8;
break;
default:
g_assert_not_reached ();
}
#if G_BYTE_ORDER == G_BIG_ENDIAN
visual->byte_order = GDK_MSB_FIRST;
#else
visual->byte_order = GDK_LSB_FIRST;
#endif
visual->depth = DFB_BITS_PER_PIXEL (pixelformat);
switch (visual->type)
{
case GDK_VISUAL_TRUE_COLOR:
gdk_visual_decompose_mask (visual->red_mask,
&visual->red_shift, &visual->red_prec);
gdk_visual_decompose_mask (visual->green_mask,
&visual->green_shift, &visual->green_prec);
gdk_visual_decompose_mask (visual->blue_mask,
&visual->blue_shift, &visual->blue_prec);
/* the number of possible levels per color component */
visual->colormap_size = 1 << MAX (visual->red_prec,
MAX (visual->green_prec,
visual->blue_prec));
break;
case GDK_VISUAL_STATIC_COLOR:
case GDK_VISUAL_PSEUDO_COLOR:
visual->colormap_size = 1 << visual->depth;
visual->red_mask = 0;
visual->red_shift = 0;
visual->red_prec = 0;
visual->green_mask = 0;
visual->green_shift = 0;
visual->green_prec = 0;
visual->blue_mask = 0;
visual->blue_shift = 0;
visual->blue_prec = 0;
break;
default:
g_assert_not_reached ();
}
((GdkVisualDirectFB *)visual)->format = pixelformat;
for (i = 0; available_depths[i]; i++)
if (available_depths[i] == visual->depth)
break;
if (!available_depths[i])
available_depths[i] = visual->depth;
for (i = 0; available_types[i]; i++)
if (available_types[i] == visual->type)
break;
if (!available_types[i])
available_types[i] = visual->type;
return (GdkVisualDirectFB *) visual;
}

File diff suppressed because it is too large Load Diff

View File

@@ -1,69 +0,0 @@
/* GDK - The GIMP Drawing Kit
* Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
* Boston, MA 02111-1307, USA.
*/
/*
* Modified by the GTK+ Team and others 1997-2000. See the AUTHORS
* file for a list of people on the GTK+ Team.
*/
/*
* GTK+ DirectFB backend
* Copyright (C) 2001-2002 convergence integrated media GmbH
* Copyright (C) 2002-2004 convergence GmbH
* Written by Denis Oliver Kropp <dok@convergence.de> and
* Sven Neumann <sven@convergence.de>
*/
#include "config.h"
#include "gdkdirectfb.h"
#include "gdkprivate-directfb.h"
static GHashTable *window_id_ht = NULL;
void
gdk_directfb_window_id_table_insert (DFBWindowID dfb_id,
GdkWindow *window)
{
if (!window_id_ht)
window_id_ht = g_hash_table_new (g_direct_hash, g_direct_equal);
g_hash_table_insert (window_id_ht, GUINT_TO_POINTER (dfb_id), window);
}
void
gdk_directfb_window_id_table_remove (DFBWindowID dfb_id)
{
if (window_id_ht)
g_hash_table_remove (window_id_ht, GUINT_TO_POINTER (dfb_id));
}
GdkWindow *
gdk_directfb_window_id_table_lookup (DFBWindowID dfb_id)
{
GdkWindow *window = NULL;
if (window_id_ht)
window = (GdkWindow *) g_hash_table_lookup (window_id_ht,
GUINT_TO_POINTER (dfb_id));
return window;
}

View File

@@ -1,924 +0,0 @@
#define X_cursor_width 14
#define X_cursor_height 14
#define X_cursor_x_hot 6
#define X_cursor_y_hot 6
static unsigned char X_cursor_bits[] = {
0x07, 0xb8, 0x0f, 0x3c, 0x1f, 0x3e, 0x3e, 0x1f, 0xfc, 0x0f, 0xf8, 0x07, 0xf0, 0x03, 0xf0, 0x03, 0xf8, 0x07, 0xfc, 0x0f, 0x3e, 0x1f, 0x1f, 0x3e, 0x0f, 0x3c, 0x07, 0x38};
#define X_cursor_mask_width 16
#define X_cursor_mask_height 16
#define X_cursor_mask_x_hot 7
#define X_cursor_mask_y_hot 7
static unsigned char X_cursor_mask_bits[] = {
0x0f, 0xf0, 0x1f, 0xf8, 0x3f, 0xfc, 0x7f, 0xfe, 0xfe, 0x7f, 0xfc, 0x3f, 0xf8, 0x1f, 0xf0, 0x0f, 0xf0, 0x0f, 0xf8, 0x1f, 0xfc, 0x3f, 0xfe, 0x7f, 0x7f, 0xfe, 0x3f, 0xfc, 0x1f, 0xf8, 0x0f, 0xf0};
#define arrow_width 14
#define arrow_height 14
#define arrow_x_hot 13
#define arrow_y_hot 0
static unsigned char arrow_bits[] = {
00, 0xb0, 00, 0x3c, 00, 0x1f, 0xc0, 0x1f, 0xf0, 0x0f, 0xfc, 0x0f, 0xc0, 0x07, 0xe0, 0x07, 0x70, 0x03, 0x38, 0x03, 0x1c, 0x01, 0x0e, 0x01, 0x07, 00, 0x02, 00};
#define arrow_mask_width 16
#define arrow_mask_height 16
#define arrow_mask_x_hot 14
#define arrow_mask_y_hot 1
static unsigned char arrow_mask_bits[] = {
00, 0xe0, 00, 0xf8, 00, 0xfe, 0x80, 0x7f, 0xe0, 0x7f, 0xf8, 0x3f, 0xfc, 0x3f, 0xfc, 0x1f, 0xe0, 0x1f, 0xf0, 0x0f, 0xf8, 0x0f, 0x7c, 0x07, 0x3e, 0x07, 0x1f, 0x02, 0x0e, 00, 0x04, 00};
#define based_arrow_down_width 8
#define based_arrow_down_height 10
#define based_arrow_down_x_hot 3
#define based_arrow_down_y_hot 9
static unsigned char based_arrow_down_bits[] = {
0xff, 00, 0xff, 0x18, 0x18, 0x18, 0x18, 0x5a, 0x3c, 0x18};
#define based_arrow_down_mask_width 10
#define based_arrow_down_mask_height 12
#define based_arrow_down_mask_x_hot 4
#define based_arrow_down_mask_y_hot 10
static unsigned char based_arrow_down_mask_bits[] = {
0xff, 0x23, 0xff, 0x03, 0xff, 0x03, 0xff, 0x03, 0xff, 0x03, 0x78, 00, 0x78, 00, 0xfe, 0x01, 0xfe, 0x01, 0xfe, 0x01, 0xfc, 00, 0x78, 00};
#define based_arrow_up_width 8
#define based_arrow_up_height 10
#define based_arrow_up_x_hot 3
#define based_arrow_up_y_hot 9
static unsigned char based_arrow_up_bits[] = {
0x18, 0x3c, 0x5a, 0x18, 0x18, 0x18, 0x18, 0xff, 00, 0xff};
#define based_arrow_up_mask_width 10
#define based_arrow_up_mask_height 12
#define based_arrow_up_mask_x_hot 4
#define based_arrow_up_mask_y_hot 10
static unsigned char based_arrow_up_mask_bits[] = {
0x30, 0x20, 0x78, 00, 0xfe, 0x01, 0xfe, 0x01, 0xfe, 0x01, 0x78, 00, 0x78, 00, 0xff, 0x03, 0xff, 0x03, 0xff, 0x03, 0xff, 0x03, 0xff, 0x03};
#define boat_width 16
#define boat_height 8
#define boat_x_hot 14
#define boat_y_hot 3
static unsigned char boat_bits[] = {
0x80, 00, 0xe0, 0x03, 0x11, 0x06, 0xff, 0xff, 00, 0x18, 00, 0x04, 00, 0x02, 0xff, 0x03};
#define boat_mask_width 16
#define boat_mask_height 9
#define boat_mask_x_hot 14
#define boat_mask_y_hot 4
static unsigned char boat_mask_bits[] = {
0xe0, 00, 0xf0, 0x03, 0xf9, 0x07, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x1f, 0xff, 0x07, 0xff, 0x03};
#define bogosity_width 13
#define bogosity_height 14
#define bogosity_x_hot 6
#define bogosity_y_hot 6
static unsigned char bogosity_bits[] = {
0x47, 0x9c, 0x44, 0x04, 0x44, 0x04, 0x44, 0x04, 0xff, 0x1f, 0x45, 0x14, 0x45, 0x14, 0x45, 0x14, 0x45, 0x14, 0xff, 0x1f, 0x44, 0x04, 0x44, 0x04, 0x44, 0x04, 0x47, 0x1c};
#define bogosity_mask_width 15
#define bogosity_mask_height 16
#define bogosity_mask_x_hot 7
#define bogosity_mask_y_hot 7
static unsigned char bogosity_mask_bits[] = {
0xdf, 0x7d, 0xdf, 0x7d, 0xdf, 0x7d, 0xdc, 0x1d, 0xff, 0x7f, 0xff, 0x7f, 0xff, 0x7f, 0xdf, 0x7d, 0xdf, 0x7d, 0xff, 0x7f, 0xff, 0x7f, 0xff, 0x7f, 0xdc, 0x1d, 0xdf, 0x7d, 0xdf, 0x7d, 0xdf, 0x7d};
#define bottom_left_corner_width 14
#define bottom_left_corner_height 14
#define bottom_left_corner_x_hot 0
#define bottom_left_corner_y_hot 13
static unsigned char bottom_left_corner_bits[] = {
0x03, 0x80, 0x03, 00, 0x23, 0x08, 0x23, 0x04, 0x23, 0x02, 0x23, 0x01, 0xa3, 00, 0x63, 00, 0xe3, 0x0f, 0x03, 00, 0x03, 00, 0x03, 00, 0xff, 0x3f, 0xff, 0x3f};
#define bottom_left_corner_mask_width 16
#define bottom_left_corner_mask_height 16
#define bottom_left_corner_mask_x_hot 1
#define bottom_left_corner_mask_y_hot 14
static unsigned char bottom_left_corner_mask_bits[] = {
0x0f, 00, 0x0f, 00, 0xef, 0x30, 0xef, 0x38, 0xef, 0x1c, 0xef, 0x0e, 0xef, 0x07, 0xef, 0x03, 0xef, 0x3f, 0xef, 0x3f, 0xef, 0x3f, 0x0f, 00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff};
#define bottom_right_corner_width 14
#define bottom_right_corner_height 14
#define bottom_right_corner_x_hot 13
#define bottom_right_corner_y_hot 13
static unsigned char bottom_right_corner_bits[] = {
00, 0xb0, 00, 0x30, 0x04, 0x31, 0x08, 0x31, 0x10, 0x31, 0x20, 0x31, 0x40, 0x31, 0x80, 0x31, 0xfc, 0x31, 00, 0x30, 00, 0x30, 00, 0x30, 0xff, 0x3f, 0xff, 0x3f};
#define bottom_right_corner_mask_width 16
#define bottom_right_corner_mask_height 16
#define bottom_right_corner_mask_x_hot 14
#define bottom_right_corner_mask_y_hot 14
static unsigned char bottom_right_corner_mask_bits[] = {
00, 0xf0, 00, 0xf0, 0x0c, 0xf7, 0x1c, 0xf7, 0x38, 0xf7, 0x70, 0xf7, 0xe0, 0xf7, 0xc0, 0xf7, 0xfc, 0xf7, 0xfc, 0xf7, 0xfc, 0xf7, 00, 0xf0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff};
#define bottom_side_width 13
#define bottom_side_height 14
#define bottom_side_x_hot 6
#define bottom_side_y_hot 13
static unsigned char bottom_side_bits[] = {
0x40, 0x80, 0x40, 00, 0x40, 00, 0x40, 00, 0x40, 00, 0x40, 00, 0x44, 0x04, 0x48, 0x02, 0x50, 0x01, 0xe0, 00, 0x40, 00, 00, 00, 0xff, 0x1f, 0xff, 0x1f};
#define bottom_side_mask_width 15
#define bottom_side_mask_height 16
#define bottom_side_mask_x_hot 7
#define bottom_side_mask_y_hot 14
static unsigned char bottom_side_mask_bits[] = {
0xc0, 0x01, 0xc0, 0x01, 0xc0, 0x01, 0xc0, 0x01, 0xc0, 0x01, 0xc0, 0x01, 0xcc, 0x19, 0xdc, 0x1d, 0xf8, 0x0f, 0xf0, 0x07, 0xe0, 0x03, 0xc0, 0x01, 0xff, 0x7f, 0xff, 0x7f, 0xff, 0x7f, 0xff, 0x7f};
#define bottom_tee_width 14
#define bottom_tee_height 10
#define bottom_tee_x_hot 7
#define bottom_tee_y_hot 9
static unsigned char bottom_tee_bits[] = {
0xc0, 0x80, 0xc0, 00, 0xc0, 00, 0xc0, 00, 0xc0, 00, 0xc0, 00, 0xc0, 00, 0xc0, 00, 0xff, 0x3f, 0xff, 0x3f};
#define bottom_tee_mask_width 16
#define bottom_tee_mask_height 12
#define bottom_tee_mask_x_hot 8
#define bottom_tee_mask_y_hot 10
static unsigned char bottom_tee_mask_bits[] = {
0xc0, 0x03, 0xc0, 0x03, 0xc0, 0x03, 0xc0, 0x03, 0xc0, 0x03, 0xc0, 0x03, 0xc0, 0x03, 0xc0, 0x03, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff};
#define box_spiral_width 15
#define box_spiral_height 16
#define box_spiral_x_hot 8
#define box_spiral_y_hot 8
static unsigned char box_spiral_bits[] = {
0xff, 0xff, 0x01, 00, 0xfd, 0x7f, 0x05, 0x40, 0xf5, 0x5f, 0x15, 0x50, 0xd5, 0x57, 0x55, 0x54, 0x55, 0x55, 0xd5, 0x55, 0x15, 0x54, 0xf5, 0x57, 0x05, 0x50, 0xfd, 0x5f, 0x01, 0x40, 0xff, 0x7f};
#define box_spiral_mask_width 16
#define box_spiral_mask_height 16
#define box_spiral_mask_x_hot 8
#define box_spiral_mask_y_hot 8
static unsigned char box_spiral_mask_bits[] = {
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff};
#define center_ptr_width 10
#define center_ptr_height 14
#define center_ptr_x_hot 4
#define center_ptr_y_hot 0
static unsigned char center_ptr_bits[] = {
0x30, 0x90, 0x30, 00, 0x78, 00, 0x78, 00, 0xfc, 00, 0xfc, 00, 0xfe, 0x01, 0xfe, 0x01, 0x33, 0x03, 0x31, 0x02, 0x30, 00, 0x30, 00, 0x30, 00, 0x30, 00};
#define center_ptr_mask_width 12
#define center_ptr_mask_height 16
#define center_ptr_mask_x_hot 5
#define center_ptr_mask_y_hot 1
static unsigned char center_ptr_mask_bits[] = {
0xf0, 0x20, 0xf0, 00, 0xf8, 0x01, 0xf8, 0x01, 0xfc, 0x03, 0xfc, 0x03, 0xfe, 0x07, 0xfe, 0x07, 0xff, 0x0f, 0xff, 0x0f, 0xff, 0x0f, 0xf7, 0x0e, 0xf0, 00, 0xf0, 00, 0xf0, 00, 0xf0, 00};
#define circle_width 14
#define circle_height 14
#define circle_x_hot 7
#define circle_y_hot 7
static unsigned char circle_bits[] = {
0xe0, 0x81, 0xf8, 0x07, 0xfc, 0x0f, 0x1e, 0x1e, 0x0e, 0x1c, 0x07, 0x38, 0x07, 0x38, 0x07, 0x38, 0x07, 0x38, 0x0e, 0x1c, 0x1e, 0x1e, 0xfc, 0x0f, 0xf8, 0x07, 0xe0, 0x01};
#define circle_mask_width 16
#define circle_mask_height 16
#define circle_mask_x_hot 8
#define circle_mask_y_hot 8
static unsigned char circle_mask_bits[] = {
0xe0, 0x07, 0xf8, 0x1f, 0xfc, 0x3f, 0xfe, 0x7f, 0xfe, 0x7f, 0x3f, 0xfc, 0x1f, 0xf8, 0x1f, 0xf8, 0x1f, 0xf8, 0x1f, 0xf8, 0x3f, 0xfc, 0xfe, 0x7f, 0xfe, 0x7f, 0xfc, 0x3f, 0xf8, 0x1f, 0xe0, 0x07};
#define clock_width 14
#define clock_height 16
#define clock_x_hot 6
#define clock_y_hot 3
static unsigned char clock_bits[] = {
0xfc, 0x8f, 0xe6, 0x19, 0x13, 0x33, 0xc9, 0x24, 0x79, 0x24, 0x11, 0x22, 0xe3, 0x31, 0xfe, 0x1f, 0xca, 0x14, 0xca, 0x14, 0xca, 0x14, 0xea, 0x15, 0xcb, 0x34, 0x0f, 0x3c, 0xff, 0x3f, 0xff, 0x3f};
#define clock_mask_width 15
#define clock_mask_height 16
#define clock_mask_x_hot 6
#define clock_mask_y_hot 3
static unsigned char clock_mask_bits[] = {
0xfe, 0x1f, 0xf7, 0x39, 0xdb, 0x77, 0xed, 0x6d, 0xfd, 0x6f, 0xf9, 0x66, 0xf3, 0x73, 0xff, 0x3f, 0xeb, 0x35, 0xeb, 0x35, 0xeb, 0x35, 0xfb, 0x37, 0xeb, 0x75, 0xcf, 0x7c, 0xff, 0x7f, 0xff, 0x7f};
#define coffee_mug_width 15
#define coffee_mug_height 16
#define coffee_mug_x_hot 7
#define coffee_mug_y_hot 9
static unsigned char coffee_mug_bits[] = {
0xf8, 0x8f, 0x04, 0x10, 0x06, 0x60, 0x0a, 0x58, 0xf2, 0x47, 0x03, 0x40, 0x03, 0x40, 0x02, 0x40, 0x02, 0x40, 0x9a, 0x58, 0x56, 0x55, 0xd7, 0x55, 0x5b, 0x59, 0x02, 0x40, 0x02, 0x40, 0xfc, 0x3f};
#define coffee_mug_mask_width 16
#define coffee_mug_mask_height 16
#define coffee_mug_mask_x_hot 7
#define coffee_mug_mask_y_hot 9
static unsigned char coffee_mug_mask_bits[] = {
0xf8, 0x0f, 0xfc, 0x1f, 0xfe, 0xff, 0xfe, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfe, 0xff, 0xfe, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfe, 0xff, 0xfc, 0x3f};
#define cross_width 16
#define cross_height 15
#define cross_x_hot 7
#define cross_y_hot 7
static unsigned char cross_bits[] = {
0x40, 0x01, 0x40, 0x01, 0x40, 0x01, 0x40, 0x01, 0x40, 0x01, 0x40, 0x01, 0x7f, 0xff, 00, 00, 0x7f, 0xff, 0x40, 0x01, 0x40, 0x01, 0x40, 0x01, 0x40, 0x01, 0x40, 0x01, 0x40, 0x01};
#define cross_mask_width 16
#define cross_mask_height 16
#define cross_mask_x_hot 7
#define cross_mask_y_hot 7
static unsigned char cross_mask_bits[] = {
0xe0, 0x03, 0xe0, 0x03, 0xe0, 0x03, 0xe0, 0x03, 0xe0, 0x03, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xe0, 0x03, 0xe0, 0x03, 0xe0, 0x03, 0xe0, 0x03, 0xe0, 0x03, 0xe0, 0x03};
#define cross_reverse_width 16
#define cross_reverse_height 15
#define cross_reverse_x_hot 7
#define cross_reverse_y_hot 7
static unsigned char cross_reverse_bits[] = {
0x42, 0x21, 0x45, 0x51, 0x4a, 0x29, 0x54, 0x15, 0x68, 0x0b, 0x50, 0x05, 0xbf, 0xfe, 0x40, 0x01, 0xbf, 0xfe, 0x50, 0x05, 0x68, 0x0b, 0x54, 0x15, 0x4a, 0x29, 0x45, 0x51, 0x42, 0x21};
#define cross_reverse_mask_width 16
#define cross_reverse_mask_height 15
#define cross_reverse_mask_x_hot 7
#define cross_reverse_mask_y_hot 7
static unsigned char cross_reverse_mask_bits[] = {
0x66, 0x33, 0x6d, 0xdb, 0x7b, 0x6f, 0x76, 0x37, 0x6c, 0x1b, 0x5f, 0xfd, 0x3f, 0xfe, 0x80, 00, 0x3f, 0xfe, 0x5f, 0xfd, 0x6c, 0x1b, 0x76, 0x37, 0x7b, 0x6f, 0x6d, 0xdb, 0x66, 0x33};
#define crosshair_width 16
#define crosshair_height 15
#define crosshair_x_hot 7
#define crosshair_y_hot 7
static unsigned char crosshair_bits[] = {
0x80, 00, 0x80, 00, 0x80, 00, 0x80, 00, 0x80, 00, 0x80, 00, 0x80, 00, 0x7f, 0xff, 0x80, 00, 0x80, 00, 0x80, 00, 0x80, 00, 0x80, 00, 0x80, 00, 0x80, 00};
#define crosshair_mask_width 16
#define crosshair_mask_height 16
#define crosshair_mask_x_hot 7
#define crosshair_mask_y_hot 7
static unsigned char crosshair_mask_bits[] = {
0xc0, 0x01, 0xc0, 0x01, 0xc0, 0x01, 0xc0, 0x01, 0xc0, 0x01, 0xc0, 0x01, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xc0, 0x01, 0xc0, 0x01, 0xc0, 0x01, 0xc0, 0x01, 0xc0, 0x01, 0xc0, 0x01, 0xc0, 0x01};
#define diamond_cross_width 15
#define diamond_cross_height 15
#define diamond_cross_x_hot 7
#define diamond_cross_y_hot 7
static unsigned char diamond_cross_bits[] = {
0x40, 0x81, 0x60, 0x03, 0x50, 0x05, 0x48, 0x09, 0x44, 0x11, 0x42, 0x21, 0x7f, 0x7f, 00, 00, 0x7f, 0x7f, 0x42, 0x21, 0x44, 0x11, 0x48, 0x09, 0x50, 0x05, 0x60, 0x03, 0x40, 0x01};
#define diamond_cross_mask_width 16
#define diamond_cross_mask_height 16
#define diamond_cross_mask_x_hot 7
#define diamond_cross_mask_y_hot 7
static unsigned char diamond_cross_mask_bits[] = {
0xe0, 0x03, 0xf0, 0x07, 0xf8, 0x0f, 0xdc, 0x1d, 0xce, 0x39, 0xc7, 0x71, 0xff, 0xff, 0x7f, 0xff, 0xff, 0xff, 0xc7, 0x71, 0xce, 0x39, 0xdc, 0x1d, 0xf8, 0x0f, 0xf0, 0x07, 0xe0, 0x03, 0xc0, 0x01};
#define dot_width 10
#define dot_height 10
#define dot_x_hot 5
#define dot_y_hot 5
static unsigned char dot_bits[] = {
0x78, 0x90, 0xfe, 0x01, 0xfe, 0x01, 0xff, 0x03, 0xff, 0x03, 0xff, 0x03, 0xff, 0x03, 0xfe, 0x01, 0xfe, 0x01, 0x78, 00};
#define dot_mask_width 12
#define dot_mask_height 12
#define dot_mask_x_hot 6
#define dot_mask_y_hot 6
static unsigned char dot_mask_bits[] = {
0xf8, 0x21, 0xfe, 0x07, 0xfe, 0x07, 0xff, 0x0f, 0xff, 0x0f, 0xff, 0x0f, 0xff, 0x0f, 0xff, 0x0f, 0xff, 0x0f, 0xfe, 0x07, 0xfe, 0x07, 0xf8, 0x01};
#define dotbox_width 12
#define dotbox_height 12
#define dotbox_x_hot 6
#define dotbox_y_hot 5
static unsigned char dotbox_bits[] = {
0xff, 0x9f, 0x01, 0x08, 0x01, 0x08, 0x01, 0x08, 0x01, 0x08, 0x61, 0x08, 0x61, 0x08, 0x01, 0x08, 0x01, 0x08, 0x01, 0x08, 0x01, 0x08, 0xff, 0x0f};
#define dotbox_mask_width 14
#define dotbox_mask_height 14
#define dotbox_mask_x_hot 7
#define dotbox_mask_y_hot 6
static unsigned char dotbox_mask_bits[] = {
0xff, 0x3f, 0xff, 0x3f, 0xff, 0x3f, 0x07, 0x38, 0x07, 0x38, 0xe7, 0x39, 0xe7, 0x39, 0xe7, 0x39, 0xe7, 0x39, 0x07, 0x38, 0x07, 0x38, 0xff, 0x3f, 0xff, 0x3f, 0xff, 0x3f};
#define double_arrow_width 10
#define double_arrow_height 14
#define double_arrow_x_hot 5
#define double_arrow_y_hot 7
static unsigned char double_arrow_bits[] = {
0x30, 0x90, 0x78, 00, 0xfc, 00, 0xb6, 0x01, 0x33, 0x03, 0x30, 00, 0x30, 00, 0x30, 00, 0x30, 00, 0x33, 0x03, 0xb6, 0x01, 0xfc, 00, 0x78, 00, 0x30, 00};
#define double_arrow_mask_width 12
#define double_arrow_mask_height 16
#define double_arrow_mask_x_hot 6
#define double_arrow_mask_y_hot 8
static unsigned char double_arrow_mask_bits[] = {
0xf0, 0x20, 0xf8, 0x01, 0xfc, 0x03, 0xfe, 0x07, 0xff, 0x0f, 0xff, 0x0f, 0xff, 0x0f, 0xf0, 00, 0xf0, 00, 0xff, 0x0f, 0xff, 0x0f, 0xff, 0x0f, 0xfe, 0x07, 0xfc, 0x03, 0xf8, 0x01, 0xf0, 00};
#define draft_large_width 15
#define draft_large_height 15
#define draft_large_x_hot 14
#define draft_large_y_hot 0
static unsigned char draft_large_bits[] = {
00, 0xc0, 00, 0x30, 00, 0x3c, 00, 0x1f, 0xc0, 0x1f, 0xf0, 0x0f, 0xfc, 0x0f, 0x80, 0x07, 0x40, 0x07, 0x20, 0x03, 0x10, 0x03, 0x08, 0x01, 0x04, 0x01, 0x02, 00, 0x01, 00};
#define draft_large_mask_width 15
#define draft_large_mask_height 16
#define draft_large_mask_x_hot 14
#define draft_large_mask_y_hot 0
static unsigned char draft_large_mask_bits[] = {
00, 0x60, 00, 0x78, 00, 0x7e, 0x80, 0x3f, 0xe0, 0x1f, 0xf8, 0x1f, 0xfe, 0x0f, 0xfe, 0x0f, 0xe0, 0x07, 0xf0, 0x07, 0xb8, 0x03, 0x9c, 0x03, 0x8e, 0x01, 0x87, 0x01, 0x03, 00, 0x01, 00};
#define draft_small_width 15
#define draft_small_height 15
#define draft_small_x_hot 14
#define draft_small_y_hot 0
static unsigned char draft_small_bits[] = {
00, 0x40, 00, 0x30, 00, 0x3c, 00, 0x1f, 0xc0, 0x1f, 00, 0x0e, 00, 0x0d, 0x80, 0x04, 0x40, 0x04, 0x20, 00, 0x10, 00, 0x08, 00, 0x04, 00, 0x02, 00, 0x01, 00};
#define draft_small_mask_width 15
#define draft_small_mask_height 15
#define draft_small_mask_x_hot 14
#define draft_small_mask_y_hot 0
static unsigned char draft_small_mask_bits[] = {
00, 0x60, 00, 0x78, 00, 0x3e, 0x80, 0x3f, 0xe0, 0x1f, 0xe0, 0x1f, 0x80, 0x0f, 0xc0, 0x0f, 0xe0, 0x06, 0x70, 0x02, 0x38, 00, 0x1c, 00, 0x0e, 00, 0x07, 00, 0x03, 00};
#define draped_box_width 12
#define draped_box_height 12
#define draped_box_x_hot 6
#define draped_box_y_hot 5
static unsigned char draped_box_bits[] = {
0xff, 0x1f, 0x91, 0x08, 0x99, 0x09, 0x0d, 0x0b, 0x07, 0x0e, 0x61, 0x08, 0x61, 0x08, 0x07, 0x0e, 0x0d, 0x0b, 0x99, 0x09, 0x91, 0x08, 0xff, 0x0f};
#define draped_box_mask_width 14
#define draped_box_mask_height 14
#define draped_box_mask_x_hot 7
#define draped_box_mask_y_hot 6
static unsigned char draped_box_mask_bits[] = {
0xff, 0x3f, 0xff, 0x3f, 0xf3, 0x33, 0xfb, 0x37, 0x3f, 0x3f, 0xdf, 0x3e, 0xef, 0x3d, 0xef, 0x3d, 0xdf, 0x3e, 0x3f, 0x3f, 0xfb, 0x37, 0xf3, 0x33, 0xff, 0x3f, 0xff, 0x3f};
#define exchange_width 14
#define exchange_height 14
#define exchange_x_hot 6
#define exchange_y_hot 6
static unsigned char exchange_bits[] = {
0xf1, 0x03, 0xfb, 0x07, 0x1f, 0x0c, 0x09, 0x08, 0x19, 00, 0x3f, 00, 00, 00, 00, 00, 00, 0x3f, 00, 0x26, 0x04, 0x24, 0x0c, 0x3e, 0xf8, 0x37, 0xf0, 0x23};
#define exchange_mask_width 16
#define exchange_mask_height 16
#define exchange_mask_x_hot 7
#define exchange_mask_y_hot 7
static unsigned char exchange_mask_bits[] = {
0xe3, 0x07, 0xf7, 0x0f, 0xff, 0x1f, 0xff, 0x3f, 0x3f, 0x38, 0xff, 0x30, 0xff, 00, 0xff, 00, 00, 0xff, 00, 0xff, 0x0c, 0xfe, 0x1c, 0xfc, 0xfc, 0xff, 0xf8, 0xff, 0xf0, 0xef, 0xe0, 0xc7};
#define fleur_width 14
#define fleur_height 14
#define fleur_x_hot 7
#define fleur_y_hot 7
static unsigned char fleur_bits[] = {
0xc0, 00, 0xe0, 0x01, 0xf0, 0x03, 0xc0, 00, 0xc4, 0x08, 0xc6, 0x18, 0xff, 0x3f, 0xff, 0x3f, 0xc6, 0x18, 0xc4, 0x08, 0xc0, 00, 0xf0, 0x03, 0xe0, 0x01, 0xc0, 00};
#define fleur_mask_width 16
#define fleur_mask_height 16
#define fleur_mask_x_hot 8
#define fleur_mask_y_hot 8
static unsigned char fleur_mask_bits[] = {
0xc0, 0x03, 0xc0, 0x07, 0xe0, 0x07, 0xf0, 0x0f, 0xe8, 0x17, 0xdc, 0x3b, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xdc, 0x3b, 0xe8, 0x17, 0xf0, 0x0f, 0xe0, 0x07, 0xc0, 0x03, 0xc0, 0x03};
#define gobbler_width 16
#define gobbler_height 15
#define gobbler_x_hot 14
#define gobbler_y_hot 2
static unsigned char gobbler_bits[] = {
00, 0x1e, 00, 0x0e, 0x01, 0xcc, 0xf9, 0x0d, 0xff, 0x0f, 0x7f, 0x0c, 0x3f, 0x0c, 0x06, 0x1c, 00, 0x0f, 0xf8, 0x07, 0x10, 00, 0x10, 00, 0x10, 00, 0x10, 00, 0x78, 00};
#define gobbler_mask_width 16
#define gobbler_mask_height 16
#define gobbler_mask_x_hot 14
#define gobbler_mask_y_hot 3
static unsigned char gobbler_mask_bits[] = {
00, 0x3f, 00, 0x3f, 0x03, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x3f, 0xff, 0x3f, 0xff, 0x3f, 0xff, 0x3f, 0xff, 0x3f, 0xfe, 0x1f, 0xf8, 0x0f, 0x38, 00, 0x38, 00, 0xfc, 00, 0xfc, 00};
#define gumby_width 16
#define gumby_height 16
#define gumby_x_hot 2
#define gumby_y_hot 0
static unsigned char gumby_bits[] = {
0xfc, 00, 0x08, 0x01, 0x13, 0x02, 0x57, 0x05, 0x13, 0x04, 0xd3, 0x05, 0x1f, 0x3c, 0x1c, 0xfc, 0x10, 0xe4, 0x10, 0xe4, 0x90, 0xf4, 0x90, 0xe4, 0x90, 0x04, 0x88, 0x08, 0x84, 0x10, 0x7c, 0x1f};
#define gumby_mask_width 16
#define gumby_mask_height 16
#define gumby_mask_x_hot 2
#define gumby_mask_y_hot 0
static unsigned char gumby_mask_bits[] = {
0xfc, 00, 0xfb, 0x01, 0xf7, 0x03, 0xff, 0x07, 0xf7, 0x07, 0xf7, 0x3f, 0xff, 0x7f, 0xff, 0xff, 0xfc, 0xf7, 0xf0, 0xf7, 0xf0, 0xff, 0xf0, 0xf7, 0xf0, 0xe7, 0xf8, 0x0f, 0xfc, 0x1f, 0x7c, 0x1f};
#define hand1_width 13
#define hand1_height 16
#define hand1_x_hot 12
#define hand1_y_hot 0
static unsigned char hand1_bits[] = {
00, 0x18, 00, 0x1e, 0x80, 0x07, 0xc0, 0x03, 0xe0, 0x01, 0xf0, 0x03, 0xf8, 0x07, 0xfa, 0x03, 0xff, 0x07, 0xfd, 0x07, 0xf0, 0x03, 0xf0, 0x01, 0x29, 00, 0x23, 00, 0x16, 00, 0x0c, 00};
#define hand1_mask_width 13
#define hand1_mask_height 16
#define hand1_mask_x_hot 12
#define hand1_mask_y_hot 0
static unsigned char hand1_mask_bits[] = {
00, 0xdc, 00, 0x1f, 0xc0, 0x0f, 0xe0, 0x07, 0xf0, 0x03, 0xf8, 0x07, 0xfe, 0x0f, 0xff, 0x0f, 0xff, 0x0f, 0xff, 0x0f, 0xff, 0x07, 0xff, 0x03, 0xff, 0x01, 0x7f, 00, 0x3f, 00, 0x1e, 00};
#define hand2_width 15
#define hand2_height 14
#define hand2_x_hot 0
#define hand2_y_hot 0
static unsigned char hand2_bits[] = {
0xfe, 0x01, 0x01, 0x02, 0x7e, 0x04, 0x08, 0x08, 0x70, 0x08, 0x08, 0x08, 0x70, 0x14, 0x08, 0x22, 0x30, 0x41, 0xc0, 0x20, 0x40, 0x12, 0x80, 0x08, 00, 0x05, 00, 0x02};
#define hand2_mask_width 16
#define hand2_mask_height 16
#define hand2_mask_x_hot 0
#define hand2_mask_y_hot 1
static unsigned char hand2_mask_bits[] = {
0xfe, 0x01, 0xff, 0x03, 0xff, 0x07, 0xff, 0x0f, 0xfe, 0x1f, 0xf8, 0x1f, 0xfc, 0x1f, 0xf8, 0x3f, 0xfc, 0x7f, 0xf8, 0xff, 0xf0, 0x7f, 0xe0, 0x3f, 0xc0, 0x1f, 0x80, 0x0f, 00, 0x07, 00, 0x02};
#define heart_width 15
#define heart_height 14
#define heart_x_hot 6
#define heart_y_hot 8
static unsigned char heart_bits[] = {
0x7c, 0x1f, 0xc6, 0x31, 0x83, 0x60, 0x01, 0x40, 0x01, 0x40, 0x01, 0x40, 0x01, 0x40, 0x03, 0x60, 0x06, 0x30, 0x0c, 0x18, 0x18, 0x0c, 0x30, 0x06, 0x60, 0x03, 0xc0, 0x01};
#define heart_mask_width 15
#define heart_mask_height 14
#define heart_mask_x_hot 6
#define heart_mask_y_hot 8
static unsigned char heart_mask_bits[] = {
0x7c, 0x9f, 0xfe, 0x3f, 0xc7, 0x71, 0x83, 0x60, 0x03, 0x60, 0x03, 0x60, 0x43, 0x61, 0x87, 0x70, 0x0e, 0x38, 0x1c, 0x1c, 0x38, 0x0e, 0xf0, 0x07, 0xe0, 0x03, 0xc0, 0x01};
#define icon_width 16
#define icon_height 16
#define icon_x_hot 8
#define icon_y_hot 8
static unsigned char icon_bits[] = {
0xff, 0xff, 0xab, 0xaa, 0x55, 0xd5, 0xab, 0xaa, 0x05, 0xd0, 0x0b, 0xa0, 0x05, 0xd0, 0x0b, 0xa0, 0x05, 0xd0, 0x0b, 0xa0, 0x05, 0xd0, 0x0b, 0xa0, 0x55, 0xd5, 0xab, 0xaa, 0x55, 0xd5, 0xff, 0xff};
#define icon_mask_width 16
#define icon_mask_height 16
#define icon_mask_x_hot 8
#define icon_mask_y_hot 8
static unsigned char icon_mask_bits[] = {
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff};
#define iron_cross_width 14
#define iron_cross_height 14
#define iron_cross_x_hot 7
#define iron_cross_y_hot 6
static unsigned char iron_cross_bits[] = {
0xfe, 0x1f, 0xfc, 0x0f, 0xf9, 0x27, 0xf3, 0x33, 0xe7, 0x39, 0xcf, 0x3c, 0xff, 0x3f, 0xff, 0x3f, 0xcf, 0x3c, 0xe7, 0x39, 0xf3, 0x33, 0xf9, 0x27, 0xfc, 0x0f, 0xfe, 0x1f};
#define iron_cross_mask_width 16
#define iron_cross_mask_height 16
#define iron_cross_mask_x_hot 8
#define iron_cross_mask_y_hot 7
static unsigned char iron_cross_mask_bits[] = {
0xfc, 0x3f, 0xfe, 0x7f, 0xfe, 0x7f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfe, 0x7f, 0xfe, 0x7f, 0xfc, 0x3f};
#define left_ptr_width 8
#define left_ptr_height 14
#define left_ptr_x_hot 0
#define left_ptr_y_hot 0
static unsigned char left_ptr_bits[] = {
0x01, 0x03, 0x07, 0x0f, 0x1f, 0x3f, 0x7f, 0xff, 0x1f, 0x1b, 0x31, 0x30, 0x60, 0x60};
#define left_ptr_mask_width 10
#define left_ptr_mask_height 16
#define left_ptr_mask_x_hot 1
#define left_ptr_mask_y_hot 1
static unsigned char left_ptr_mask_bits[] = {
0x03, 0xc0, 0x07, 00, 0x0f, 00, 0x1f, 00, 0x3f, 00, 0x7f, 00, 0xff, 00, 0xff, 0x01, 0xff, 0x03, 0xff, 0x03, 0x7f, 00, 0xf7, 00, 0xf3, 00, 0xe0, 0x01, 0xe0, 0x01, 0xc0, 00};
#define left_side_width 14
#define left_side_height 13
#define left_side_x_hot 0
#define left_side_y_hot 6
static unsigned char left_side_bits[] = {
0x03, 00, 0x03, 00, 0x83, 00, 0x43, 00, 0x23, 00, 0x13, 00, 0xfb, 0x3f, 0x13, 00, 0x23, 00, 0x43, 00, 0x83, 00, 0x03, 00, 0x03, 00};
#define left_side_mask_width 16
#define left_side_mask_height 15
#define left_side_mask_x_hot 1
#define left_side_mask_y_hot 7
static unsigned char left_side_mask_bits[] = {
0x0f, 00, 0x0f, 00, 0x0f, 0x03, 0x8f, 0x03, 0xcf, 0x01, 0xef, 00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xef, 00, 0xcf, 0x01, 0x8f, 0x03, 0x0f, 0x03, 0x0f, 00, 0x0f, 00};
#define left_tee_width 10
#define left_tee_height 14
#define left_tee_x_hot 0
#define left_tee_y_hot 7
static unsigned char left_tee_bits[] = {
0x03, 0x10, 0x03, 00, 0x03, 00, 0x03, 00, 0x03, 00, 0x03, 00, 0xff, 0x03, 0xff, 0x03, 0x03, 00, 0x03, 00, 0x03, 00, 0x03, 00, 0x03, 00, 0x03, 00};
#define left_tee_mask_width 12
#define left_tee_mask_height 16
#define left_tee_mask_x_hot 1
#define left_tee_mask_y_hot 8
static unsigned char left_tee_mask_bits[] = {
0x0f, 0xc0, 0x0f, 00, 0x0f, 00, 0x0f, 00, 0x0f, 00, 0x0f, 00, 0xff, 0x0f, 0xff, 0x0f, 0xff, 0x0f, 0xff, 0x0f, 0x0f, 00, 0x0f, 00, 0x0f, 00, 0x0f, 00, 0x0f, 00, 0x0f, 00};
#define leftbutton_width 16
#define leftbutton_height 16
#define leftbutton_x_hot 8
#define leftbutton_y_hot 8
static unsigned char leftbutton_bits[] = {
0x01, 0xc0, 0xfe, 0xbf, 0xfe, 0xbf, 0x22, 0xa2, 0xa2, 0xaa, 0xa2, 0xaa, 0xa2, 0xaa, 0xa2, 0xaa, 0x22, 0xa2, 0xfe, 0xbf, 0xfe, 0xbf, 0xfe, 0xbf, 0xfe, 0xbf, 0xfe, 0xbf, 0xfe, 0xbf, 0x01, 0xc0};
#define leftbutton_mask_width 15
#define leftbutton_mask_height 16
#define leftbutton_mask_x_hot 8
#define leftbutton_mask_y_hot 8
static unsigned char leftbutton_mask_bits[] = {
0xfe, 0xbf, 0xff, 0x7f, 0xff, 0x7f, 0xff, 0x7f, 0xff, 0x7f, 0xff, 0x7f, 0xff, 0x7f, 0xff, 0x7f, 0xff, 0x7f, 0xff, 0x7f, 0xff, 0x7f, 0xff, 0x7f, 0xff, 0x7f, 0xff, 0x7f, 0xff, 0x7f, 0xfe, 0x3f};
#define ll_angle_width 10
#define ll_angle_height 10
#define ll_angle_x_hot 0
#define ll_angle_y_hot 9
static unsigned char ll_angle_bits[] = {
0x03, 0x10, 0x03, 00, 0x03, 00, 0x03, 00, 0x03, 00, 0x03, 00, 0x03, 00, 0x03, 00, 0xff, 0x03, 0xff, 0x03};
#define ll_angle_mask_width 12
#define ll_angle_mask_height 12
#define ll_angle_mask_x_hot 1
#define ll_angle_mask_y_hot 10
static unsigned char ll_angle_mask_bits[] = {
0x0f, 0xc0, 0x0f, 00, 0x0f, 00, 0x0f, 00, 0x0f, 00, 0x0f, 00, 0x0f, 00, 0x0f, 00, 0xff, 0x0f, 0xff, 0x0f, 0xff, 0x0f, 0xff, 0x0f};
#define lr_angle_width 10
#define lr_angle_height 10
#define lr_angle_x_hot 9
#define lr_angle_y_hot 9
static unsigned char lr_angle_bits[] = {
00, 0x13, 00, 0x03, 00, 0x03, 00, 0x03, 00, 0x03, 00, 0x03, 00, 0x03, 00, 0x03, 0xff, 0x03, 0xff, 0x03};
#define lr_angle_mask_width 12
#define lr_angle_mask_height 12
#define lr_angle_mask_x_hot 10
#define lr_angle_mask_y_hot 10
static unsigned char lr_angle_mask_bits[] = {
00, 0xcf, 00, 0x0f, 00, 0x0f, 00, 0x0f, 00, 0x0f, 00, 0x0f, 00, 0x0f, 00, 0x0f, 0xff, 0x0f, 0xff, 0x0f, 0xff, 0x0f, 0xff, 0x0f};
#define man_width 16
#define man_height 16
#define man_x_hot 14
#define man_y_hot 5
static unsigned char man_bits[] = {
0xc0, 0x01, 0x78, 0x0f, 0x40, 0x01, 0x81, 00, 0xc2, 0xe1, 0x24, 0xd2, 0xb8, 0x0e, 0xa0, 0x02, 0x20, 0x02, 0x40, 0x01, 0x20, 0x02, 0x90, 0x04, 0x48, 0x09, 0x28, 0x0a, 0x1e, 0x3c, 0x1f, 0xfc};
#define man_mask_width 16
#define man_mask_height 16
#define man_mask_x_hot 14
#define man_mask_y_hot 5
static unsigned char man_mask_bits[] = {
0xf8, 0x07, 0xfc, 0x0f, 0xfc, 0x1f, 0xc3, 0x41, 0xe7, 0xe3, 0xfe, 0xff, 0xfc, 0xdf, 0xf8, 0x0f, 0xe0, 0x07, 0xe0, 0x03, 0xf0, 0x07, 0xf8, 0x0f, 0xfc, 0x1f, 0x7e, 0x3f, 0x3f, 0xfe, 0x3f, 0xfe};
#define middlebutton_width 16
#define middlebutton_height 16
#define middlebutton_x_hot 8
#define middlebutton_y_hot 8
static unsigned char middlebutton_bits[] = {
0x01, 0xc0, 0xfe, 0xbf, 0xfe, 0xbf, 0x22, 0xa2, 0x2a, 0xaa, 0x2a, 0xaa, 0x2a, 0xaa, 0x2a, 0xaa, 0x22, 0xa2, 0xfe, 0xbf, 0xfe, 0xbf, 0xfe, 0xbf, 0xfe, 0xbf, 0xfe, 0xbf, 0xfe, 0xbf, 0x01, 0xc0};
#define middlebutton_mask_width 15
#define middlebutton_mask_height 16
#define middlebutton_mask_x_hot 8
#define middlebutton_mask_y_hot 8
static unsigned char middlebutton_mask_bits[] = {
0xfe, 0xbf, 0xff, 0x7f, 0xff, 0x7f, 0xff, 0x7f, 0xff, 0x7f, 0xff, 0x7f, 0xff, 0x7f, 0xff, 0x7f, 0xff, 0x7f, 0xff, 0x7f, 0xff, 0x7f, 0xff, 0x7f, 0xff, 0x7f, 0xff, 0x7f, 0xff, 0x7f, 0xfe, 0x3f};
#define mouse_width 15
#define mouse_height 14
#define mouse_x_hot 4
#define mouse_y_hot 1
static unsigned char mouse_bits[] = {
0xe0, 00, 0x30, 00, 0x60, 00, 0xc0, 00, 0xfe, 0x1f, 0x01, 0x20, 0xcd, 0x6c, 0xcd, 0x6c, 0xcd, 0x6c, 0x01, 0x60, 0x01, 0x60, 0x06, 0x38, 0x18, 0x06, 0xe0, 0x01};
#define mouse_mask_width 16
#define mouse_mask_height 16
#define mouse_mask_x_hot 4
#define mouse_mask_y_hot 1
static unsigned char mouse_mask_bits[] = {
0xf0, 0x01, 0x78, 00, 0xf0, 00, 0xe0, 00, 0xfe, 0x1f, 0xff, 0x3f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfc, 0xef, 0xf8, 0x07, 0xf0, 0x03, 0xe0, 0x01};
#define pencil_width 11
#define pencil_height 16
#define pencil_x_hot 10
#define pencil_y_hot 15
static unsigned char pencil_bits[] = {
0x0e, 0x10, 0x11, 00, 0x31, 00, 0x52, 00, 0x5e, 00, 0x84, 00, 0x88, 00, 0x08, 0x01, 0x10, 0x01, 0x30, 0x02, 0x20, 0x02, 0x40, 0x04, 0x80, 0x07, 00, 0x07, 00, 0x06, 00, 0x04};
#define pencil_mask_width 13
#define pencil_mask_height 16
#define pencil_mask_x_hot 11
#define pencil_mask_y_hot 15
static unsigned char pencil_mask_bits[] = {
0x3f, 0xc0, 0x7f, 00, 0xff, 00, 0xfe, 00, 0xfc, 0x01, 0xfc, 0x01, 0xf8, 0x03, 0xf0, 0x03, 0xf0, 0x07, 0xe0, 0x07, 0xe0, 0x0f, 0xc0, 0x1f, 0x80, 0x1f, 00, 0x1f, 00, 0x1e, 00, 0x1c};
#define pirate_width 15
#define pirate_height 16
#define pirate_x_hot 7
#define pirate_y_hot 12
static unsigned char pirate_bits[] = {
0xe0, 0x01, 0xf0, 0x03, 0xf8, 0x07, 0xcc, 0x0c, 0xcc, 0x0c, 0xf8, 0x07, 0xf0, 0x03, 0xe0, 0x01, 0xe1, 0x21, 0xe1, 0x61, 0xc2, 0x10, 0x1c, 0x0e, 0xe0, 0x01, 0xf8, 0x47, 0x0f, 0x7c, 0x01, 0x20};
#define pirate_mask_width 16
#define pirate_mask_height 16
#define pirate_mask_x_hot 7
#define pirate_mask_y_hot 12
static unsigned char pirate_mask_bits[] = {
0xf0, 0x03, 0xf8, 0x07, 0xfc, 0x0f, 0xfe, 0x1f, 0xfe, 0x1f, 0xfc, 0x0f, 0xf8, 0x07, 0xf1, 0x83, 0xf1, 0xe3, 0xf3, 0xf3, 0xef, 0x39, 0x1e, 0x1e, 0xe0, 0x01, 0xfe, 0xc7, 0xff, 0xff, 0x0f, 0x7c};
#define plus_width 10
#define plus_height 10
#define plus_x_hot 4
#define plus_y_hot 5
static unsigned char plus_bits[] = {
0x30, 0x10, 0x30, 00, 0x30, 00, 0x30, 00, 0xff, 0x03, 0xff, 0x03, 0x30, 00, 0x30, 00, 0x30, 00, 0x30, 00};
#define plus_mask_width 12
#define plus_mask_height 12
#define plus_mask_x_hot 5
#define plus_mask_y_hot 6
static unsigned char plus_mask_bits[] = {
0xf0, 0xc0, 0xf0, 00, 0xf0, 00, 0xf0, 00, 0xff, 0x0f, 0xff, 0x0f, 0xff, 0x0f, 0xff, 0x0f, 0xf0, 00, 0xf0, 00, 0xf0, 00, 0xf0, 00};
#define question_arrow_width 9
#define question_arrow_height 15
#define question_arrow_x_hot 4
#define question_arrow_y_hot 7
static unsigned char question_arrow_bits[] = {
0x7c, 0x10, 0xfe, 00, 0xc7, 0x01, 0x83, 0x01, 0x87, 0x01, 0xc6, 0x01, 0xe0, 00, 0x78, 00, 0x38, 00, 0x28, 00, 0x28, 00, 0xee, 00, 0x6c, 00, 0x38, 00, 0x10, 00};
#define question_arrow_mask_width 11
#define question_arrow_mask_height 16
#define question_arrow_mask_x_hot 5
#define question_arrow_mask_y_hot 8
static unsigned char question_arrow_mask_bits[] = {
0xf8, 0xc0, 0xfc, 0x01, 0xfe, 0x03, 0xff, 0x07, 0x8f, 0x07, 0x9f, 0x07, 0xde, 0x07, 0xfc, 0x03, 0xf8, 0x01, 0xf8, 00, 0xf8, 00, 0xfc, 0x01, 0xfe, 0x03, 0xfc, 0x01, 0xf8, 00, 0x70, 00};
#define right_ptr_width 8
#define right_ptr_height 14
#define right_ptr_x_hot 7
#define right_ptr_y_hot 0
static unsigned char right_ptr_bits[] = {
0x80, 0xc0, 0xe0, 0xf0, 0xf8, 0xfc, 0xfe, 0xff, 0xf8, 0xd8, 0x8c, 0x0c, 0x06, 0x06};
#define right_ptr_mask_width 10
#define right_ptr_mask_height 16
#define right_ptr_mask_x_hot 8
#define right_ptr_mask_y_hot 1
static unsigned char right_ptr_mask_bits[] = {
00, 0xc3, 0x80, 0x03, 0xc0, 0x03, 0xe0, 0x03, 0xf0, 0x03, 0xf8, 0x03, 0xfc, 0x03, 0xfe, 0x03, 0xff, 0x03, 0xff, 0x03, 0xf8, 0x03, 0xbc, 0x03, 0x3c, 0x03, 0x1e, 00, 0x1e, 00, 0x0c, 00};
#define right_side_width 14
#define right_side_height 13
#define right_side_x_hot 13
#define right_side_y_hot 6
static unsigned char right_side_bits[] = {
00, 0x30, 00, 0x30, 0x40, 0x30, 0x80, 0x30, 00, 0x31, 00, 0x32, 0xff, 0x37, 00, 0x32, 00, 0x31, 0x80, 0x30, 0x40, 0x30, 00, 0x30, 00, 0x30};
#define right_side_mask_width 16
#define right_side_mask_height 15
#define right_side_mask_x_hot 14
#define right_side_mask_y_hot 7
static unsigned char right_side_mask_bits[] = {
00, 0xf0, 00, 0xf0, 0xc0, 0xf0, 0xc0, 0xf1, 0x80, 0xf3, 00, 0xf7, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 00, 0xf7, 0x80, 0xf3, 0xc0, 0xf1, 0xc0, 0xf0, 00, 0xf0, 00, 0xf0};
#define right_tee_width 10
#define right_tee_height 14
#define right_tee_x_hot 9
#define right_tee_y_hot 7
static unsigned char right_tee_bits[] = {
00, 0x13, 00, 0x03, 00, 0x03, 00, 0x03, 00, 0x03, 00, 0x03, 0xff, 0x03, 0xff, 0x03, 00, 0x03, 00, 0x03, 00, 0x03, 00, 0x03, 00, 0x03, 00, 0x03};
#define right_tee_mask_width 12
#define right_tee_mask_height 16
#define right_tee_mask_x_hot 10
#define right_tee_mask_y_hot 8
static unsigned char right_tee_mask_bits[] = {
00, 0xcf, 00, 0x0f, 00, 0x0f, 00, 0x0f, 00, 0x0f, 00, 0x0f, 0xff, 0x0f, 0xff, 0x0f, 0xff, 0x0f, 0xff, 0x0f, 00, 0x0f, 00, 0x0f, 00, 0x0f, 00, 0x0f, 00, 0x0f, 00, 0x0f};
#define rightbutton_width 16
#define rightbutton_height 16
#define rightbutton_x_hot 8
#define rightbutton_y_hot 8
static unsigned char rightbutton_bits[] = {
0x01, 0xc0, 0xfe, 0xbf, 0xfe, 0xbf, 0x22, 0xa2, 0xaa, 0xa2, 0xaa, 0xa2, 0xaa, 0xa2, 0xaa, 0xa2, 0x22, 0xa2, 0xfe, 0xbf, 0xfe, 0xbf, 0xfe, 0xbf, 0xfe, 0xbf, 0xfe, 0xbf, 0xfe, 0xbf, 0x01, 0xc0};
#define rightbutton_mask_width 15
#define rightbutton_mask_height 16
#define rightbutton_mask_x_hot 8
#define rightbutton_mask_y_hot 8
static unsigned char rightbutton_mask_bits[] = {
0xfe, 0xbf, 0xff, 0x7f, 0xff, 0x7f, 0xff, 0x7f, 0xff, 0x7f, 0xff, 0x7f, 0xff, 0x7f, 0xff, 0x7f, 0xff, 0x7f, 0xff, 0x7f, 0xff, 0x7f, 0xff, 0x7f, 0xff, 0x7f, 0xff, 0x7f, 0xff, 0x7f, 0xfe, 0x3f};
#define rtl_logo_width 14
#define rtl_logo_height 14
#define rtl_logo_x_hot 6
#define rtl_logo_y_hot 6
static unsigned char rtl_logo_bits[] = {
0xff, 0x3f, 0x01, 0x22, 0x01, 0x22, 0x01, 0x22, 0xff, 0x23, 0x11, 0x22, 0x11, 0x22, 0x11, 0x22, 0x11, 0x22, 0xf1, 0x3f, 0x11, 0x20, 0x11, 0x20, 0x11, 0x20, 0xff, 0x3f};
#define rtl_logo_mask_width 16
#define rtl_logo_mask_height 16
#define rtl_logo_mask_x_hot 7
#define rtl_logo_mask_y_hot 7
static unsigned char rtl_logo_mask_bits[] = {
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x07, 0xee, 0xff, 0xef, 0xff, 0xef, 0xff, 0xef, 0x77, 0xee, 0x77, 0xee, 0xf7, 0xff, 0xf7, 0xff, 0xf7, 0xff, 0x77, 0xe0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff};
#define sailboat_width 12
#define sailboat_height 13
#define sailboat_x_hot 6
#define sailboat_y_hot -1
static unsigned char sailboat_bits[] = {
0x80, 0x10, 0x80, 00, 0xa0, 0x01, 0xa0, 0x01, 0xb0, 0x01, 0xb0, 0x03, 0xb8, 0x03, 0xb8, 0x03, 0xbc, 0x07, 0xbc, 0x07, 0xbe, 0x07, 0xbe, 0x0f, 0x1f, 0x07};
#define sailboat_mask_width 16
#define sailboat_mask_height 16
#define sailboat_mask_x_hot 8
#define sailboat_mask_y_hot 0
static unsigned char sailboat_mask_bits[] = {
00, 0x03, 00, 0x07, 0x80, 0x07, 0xc0, 0x0f, 0xc0, 0x0f, 0xe0, 0x0f, 0xe0, 0x1f, 0xf0, 0x1f, 0xf0, 0x1f, 0xf8, 0x3f, 0xf8, 0x3f, 0xfc, 0x3f, 0xfc, 0xff, 0xfe, 0xff, 0xff, 0x1f, 0xfe, 0x07};
#define sb_down_arrow_width 7
#define sb_down_arrow_height 15
#define sb_down_arrow_x_hot 3
#define sb_down_arrow_y_hot 15
static unsigned char sb_down_arrow_bits[] = {
0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x7f, 0x3e, 0x1c, 0x08};
#define sb_down_arrow_mask_width 9
#define sb_down_arrow_mask_height 16
#define sb_down_arrow_mask_x_hot 4
#define sb_down_arrow_mask_y_hot 15
static unsigned char sb_down_arrow_mask_bits[] = {
0x7c, 0xc0, 0x7c, 00, 0x7c, 00, 0x7c, 00, 0x7c, 00, 0x7c, 00, 0x7c, 00, 0x7c, 00, 0x7c, 00, 0x7c, 00, 0xff, 0x01, 0xff, 0x01, 0xfe, 00, 0x7c, 00, 0x38, 00, 0x10, 00};
#define sb_h_double_arrow_width 15
#define sb_h_double_arrow_height 7
#define sb_h_double_arrow_x_hot 7
#define sb_h_double_arrow_y_hot 3
static unsigned char sb_h_double_arrow_bits[] = {
0x08, 0x08, 0x0c, 0x18, 0xfe, 0x3f, 0x0f, 0x78, 0xfe, 0x3f, 0x0c, 0x18, 0x08, 0x08};
#define sb_h_double_arrow_mask_width 15
#define sb_h_double_arrow_mask_height 9
#define sb_h_double_arrow_mask_x_hot 7
#define sb_h_double_arrow_mask_y_hot 4
static unsigned char sb_h_double_arrow_mask_bits[] = {
0x18, 0x8c, 0x1c, 0x1c, 0xfe, 0x3f, 0xff, 0x7f, 0xff, 0x7f, 0xff, 0x7f, 0xfe, 0x3f, 0x1c, 0x1c, 0x18, 0x0c};
#define sb_left_arrow_width 15
#define sb_left_arrow_height 7
#define sb_left_arrow_x_hot -1
#define sb_left_arrow_y_hot 3
static unsigned char sb_left_arrow_bits[] = {
0x08, 00, 0x0c, 00, 0xfe, 0x7f, 0x0f, 00, 0xfe, 0x7f, 0x0c, 00, 0x08, 00};
#define sb_left_arrow_mask_width 16
#define sb_left_arrow_mask_height 9
#define sb_left_arrow_mask_x_hot 0
#define sb_left_arrow_mask_y_hot 4
static unsigned char sb_left_arrow_mask_bits[] = {
0x30, 00, 0x38, 00, 0xfc, 0xff, 0xfe, 0xff, 0xff, 0xff, 0xfe, 0xff, 0xfc, 0xff, 0x38, 00, 0x30, 00};
#define sb_right_arrow_width 15
#define sb_right_arrow_height 7
#define sb_right_arrow_x_hot 15
#define sb_right_arrow_y_hot 3
static unsigned char sb_right_arrow_bits[] = {
00, 0x08, 00, 0x18, 0xff, 0x3f, 00, 0x78, 0xff, 0x3f, 00, 0x18, 00, 0x08};
#define sb_right_arrow_mask_width 16
#define sb_right_arrow_mask_height 9
#define sb_right_arrow_mask_x_hot 15
#define sb_right_arrow_mask_y_hot 4
static unsigned char sb_right_arrow_mask_bits[] = {
00, 0x0c, 00, 0x1c, 0xff, 0x3f, 0xff, 0x7f, 0xff, 0xff, 0xff, 0x7f, 0xff, 0x3f, 00, 0x1c, 00, 0x0c};
#define sb_up_arrow_width 7
#define sb_up_arrow_height 15
#define sb_up_arrow_x_hot 3
#define sb_up_arrow_y_hot -1
static unsigned char sb_up_arrow_bits[] = {
0x08, 0x9c, 0x3e, 0x7f, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14};
#define sb_up_arrow_mask_width 9
#define sb_up_arrow_mask_height 16
#define sb_up_arrow_mask_x_hot 4
#define sb_up_arrow_mask_y_hot 0
static unsigned char sb_up_arrow_mask_bits[] = {
0x10, 0xc0, 0x38, 00, 0x7c, 00, 0xfe, 00, 0xff, 0x01, 0xff, 0x01, 0x7c, 00, 0x7c, 00, 0x7c, 00, 0x7c, 00, 0x7c, 00, 0x7c, 00, 0x7c, 00, 0x7c, 00, 0x7c, 00, 0x7c, 00};
#define sb_v_double_arrow_width 7
#define sb_v_double_arrow_height 15
#define sb_v_double_arrow_x_hot 3
#define sb_v_double_arrow_y_hot 7
static unsigned char sb_v_double_arrow_bits[] = {
0x08, 0x9c, 0x3e, 0x7f, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x7f, 0x3e, 0x1c, 0x08};
#define sb_v_double_arrow_mask_width 9
#define sb_v_double_arrow_mask_height 15
#define sb_v_double_arrow_mask_x_hot 4
#define sb_v_double_arrow_mask_y_hot 7
static unsigned char sb_v_double_arrow_mask_bits[] = {
0x38, 0xc0, 0x7c, 00, 0xfe, 00, 0xff, 0x01, 0xff, 0x01, 0x7c, 00, 0x7c, 00, 0x7c, 00, 0x7c, 00, 0x7c, 00, 0xff, 0x01, 0xff, 0x01, 0xfe, 00, 0x7c, 00, 0x38, 00};
#define shuttle_width 15
#define shuttle_height 16
#define shuttle_x_hot 10
#define shuttle_y_hot 0
static unsigned char shuttle_bits[] = {
00, 0x84, 00, 0x0e, 00, 0x1f, 0x80, 0x7b, 0xa0, 0x7b, 0x90, 0x7b, 0x88, 0x7b, 0x88, 0x7b, 0x88, 0x7b, 0x88, 0x7b, 0x8c, 0x7b, 0x8e, 0x7b, 0xbf, 0x7b, 0x18, 0x11, 00, 0x1e, 00, 0x0c};
#define shuttle_mask_width 16
#define shuttle_mask_height 16
#define shuttle_mask_x_hot 11
#define shuttle_mask_y_hot 0
static unsigned char shuttle_mask_bits[] = {
00, 0x1c, 00, 0x3e, 00, 0x7f, 00, 0xff, 0x60, 0xff, 0x70, 0xff, 0x78, 0xff, 0x78, 0xff, 0x78, 0xff, 0x78, 0xff, 0x7c, 0xff, 0x7e, 0xff, 0x7f, 0xff, 0x7e, 0x7f, 0x30, 0x7e, 00, 0x3c};
#define sizing_width 14
#define sizing_height 14
#define sizing_x_hot 7
#define sizing_y_hot 7
static unsigned char sizing_bits[] = {
0xff, 0xc0, 0x01, 00, 0x01, 00, 0x01, 00, 0xf1, 0x03, 0x11, 0x02, 0x11, 0x22, 0x11, 0x22, 0x10, 0x22, 0xf0, 0x23, 00, 0x24, 00, 0x28, 00, 0x30, 0xc0, 0x3f};
#define sizing_mask_width 16
#define sizing_mask_height 16
#define sizing_mask_x_hot 8
#define sizing_mask_y_hot 8
static unsigned char sizing_mask_bits[] = {
0xff, 0x03, 0xff, 0x03, 0xff, 0x03, 0x07, 00, 0xf7, 0x0f, 0xf7, 0x0f, 0xf7, 0xef, 0x77, 0xee, 0x77, 0xee, 0xf7, 0xef, 0xf0, 0xef, 0xf0, 0xff, 00, 0xf8, 0xc0, 0xff, 0xc0, 0xff, 0xc0, 0xff};
#define spider_width 16
#define spider_height 16
#define spider_x_hot 6
#define spider_y_hot 7
static unsigned char spider_bits[] = {
0x04, 0x08, 0x08, 0x04, 0x08, 0x04, 0x10, 0x02, 0x10, 0x02, 0xe1, 0xe1, 0xe6, 0x19, 0xf8, 0x07, 0xf8, 0x07, 0xe6, 0x19, 0xe1, 0xe1, 0x10, 0x02, 0x10, 0x02, 0x08, 0x04, 0x08, 0x04, 0x04, 0x08};
#define spider_mask_width 16
#define spider_mask_height 16
#define spider_mask_x_hot 6
#define spider_mask_y_hot 7
static unsigned char spider_mask_bits[] = {
0x06, 0x18, 0x0c, 0x0c, 0x08, 0x04, 0x18, 0x06, 0xf1, 0x83, 0xf3, 0xf3, 0xf6, 0x3b, 0xfc, 0x0f, 0xfc, 0x07, 0xf6, 0x1f, 0xf3, 0xf3, 0xf1, 0x83, 0x18, 0x02, 0x18, 0x06, 0x0c, 0x0c, 0x06, 0x18};
#define spraycan_width 11
#define spraycan_height 16
#define spraycan_x_hot 9
#define spraycan_y_hot 2
static unsigned char spraycan_bits[] = {
00, 0xe6, 0x80, 00, 0x2c, 0x06, 0x9e, 00, 0x16, 0x06, 0x3f, 00, 0x21, 00, 0x27, 00, 0x25, 00, 0x27, 00, 0x25, 00, 0x27, 00, 0x27, 00, 0x21, 00, 0x21, 00, 0x3f, 00};
#define spraycan_mask_width 12
#define spraycan_mask_height 16
#define spraycan_mask_x_hot 10
#define spraycan_mask_y_hot 2
static unsigned char spraycan_mask_bits[] = {
00, 0x4c, 0x18, 0x0d, 0x7c, 0x0d, 0x7c, 0x0d, 0x7e, 0x0d, 0xff, 00, 0xff, 00, 0xff, 00, 0xff, 00, 0xff, 00, 0xff, 00, 0xff, 00, 0xff, 00, 0xff, 00, 0xff, 00, 0xff, 00};
#define star_width 15
#define star_height 16
#define star_x_hot 7
#define star_y_hot 7
static unsigned char star_bits[] = {
0x80, 0x80, 0x40, 0x01, 0x40, 0x01, 0x40, 0x01, 0x20, 0x02, 0x20, 0x02, 0x20, 0x02, 0x9c, 0x1c, 0x03, 0x60, 0x1c, 0x1c, 0x90, 0x04, 0x48, 0x09, 0x24, 0x12, 0x14, 0x14, 0x0c, 0x18, 0x04, 0x10};
#define star_mask_width 16
#define star_mask_height 16
#define star_mask_x_hot 7
#define star_mask_y_hot 7
static unsigned char star_mask_bits[] = {
0x80, 00, 0xc0, 0x01, 0xc0, 0x01, 0x60, 0x03, 0x60, 0x03, 0x30, 0x06, 0x38, 0x1e, 0x9f, 0x7c, 0x03, 0xe0, 0x1f, 0x7c, 0x9c, 0x1c, 0xcc, 0x19, 0x66, 0x33, 0x36, 0x36, 0x1e, 0x3c, 0x0e, 0x38};
#define target_width 15
#define target_height 13
#define target_x_hot 7
#define target_y_hot 6
static unsigned char target_bits[] = {
0xc0, 0x81, 0xf0, 0x07, 0x38, 0x0e, 0x0c, 0x18, 0x06, 0x30, 0x83, 0x60, 0x43, 0x61, 0x83, 0x60, 0x06, 0x30, 0x0c, 0x18, 0x38, 0x0e, 0xf0, 0x07, 0xc0, 0x01};
#define target_mask_width 16
#define target_mask_height 14
#define target_mask_x_hot 7
#define target_mask_y_hot 7
static unsigned char target_mask_bits[] = {
0xe0, 0x03, 0xf0, 0x07, 0xf8, 0x0f, 0x3c, 0x1e, 0x0e, 0x38, 0x87, 0x70, 0xc3, 0xe1, 0x63, 0xe3, 0xc3, 0xe1, 0x87, 0x70, 0x0e, 0x38, 0x3c, 0x1e, 0xf8, 0x0f, 0xe0, 0x03};
#define tcross_width 13
#define tcross_height 13
#define tcross_x_hot 6
#define tcross_y_hot 6
static unsigned char tcross_bits[] = {
0x40, 0xe0, 0x40, 00, 0x40, 00, 0x40, 00, 0x40, 00, 0x40, 00, 0xff, 0x1f, 0x40, 00, 0x40, 00, 0x40, 00, 0x40, 00, 0x40, 00, 0x40, 00};
#define tcross_mask_width 15
#define tcross_mask_height 15
#define tcross_mask_x_hot 7
#define tcross_mask_y_hot 7
static unsigned char tcross_mask_bits[] = {
0xc0, 0x01, 0xc0, 0x01, 0xc0, 0x01, 0xc0, 0x01, 0xc0, 0x01, 0xc0, 0x01, 0xff, 0x7f, 0xff, 0x7f, 0xff, 0x7f, 0xc0, 0x01, 0xc0, 0x01, 0xc0, 0x01, 0xc0, 0x01, 0xc0, 0x01, 0xc0, 0x01};
#define top_left_arrow_width 14
#define top_left_arrow_height 14
#define top_left_arrow_x_hot 0
#define top_left_arrow_y_hot 0
static unsigned char top_left_arrow_bits[] = {
0x03, 0xc0, 0x0f, 00, 0x3e, 00, 0xfe, 00, 0xfc, 0x03, 0xfc, 0x0f, 0xf8, 00, 0xf8, 00, 0x30, 0x01, 0x30, 0x02, 0x20, 0x04, 0x20, 0x08, 00, 0x10, 00, 0x20};
#define top_left_arrow_mask_width 16
#define top_left_arrow_mask_height 16
#define top_left_arrow_mask_x_hot 1
#define top_left_arrow_mask_y_hot 1
static unsigned char top_left_arrow_mask_bits[] = {
0x07, 00, 0x1f, 00, 0x7f, 00, 0xfe, 0x01, 0xfe, 0x07, 0xfc, 0x3f, 0xfc, 0x3f, 0xf8, 0x3f, 0xf8, 0x03, 0xf0, 0x07, 0xf0, 0x0e, 0xe0, 0x1c, 0xe0, 0x38, 0xe0, 0x70, 00, 0xe0, 00, 0xc0};
#define top_left_corner_width 14
#define top_left_corner_height 14
#define top_left_corner_x_hot 0
#define top_left_corner_y_hot 0
static unsigned char top_left_corner_bits[] = {
0xff, 0xff, 0xff, 0x3f, 0x03, 00, 0x03, 00, 0x03, 00, 0xe3, 0x0f, 0x63, 00, 0xa3, 00, 0x23, 0x01, 0x23, 0x02, 0x23, 0x04, 0x23, 0x08, 0x03, 00, 0x03, 00};
#define top_left_corner_mask_width 16
#define top_left_corner_mask_height 16
#define top_left_corner_mask_x_hot 1
#define top_left_corner_mask_y_hot 1
static unsigned char top_left_corner_mask_bits[] = {
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x0f, 00, 0xef, 0x3f, 0xef, 0x3f, 0xef, 0x3f, 0xef, 0x03, 0xef, 0x07, 0xef, 0x0e, 0xef, 0x1c, 0xef, 0x38, 0xef, 0x30, 0x0f, 00, 0x0f, 00};
#define top_right_corner_width 14
#define top_right_corner_height 14
#define top_right_corner_x_hot 13
#define top_right_corner_y_hot 0
static unsigned char top_right_corner_bits[] = {
0xff, 0xff, 0xff, 0x3f, 00, 0x30, 00, 0x30, 00, 0x30, 0xfc, 0x31, 0x80, 0x31, 0x40, 0x31, 0x20, 0x31, 0x10, 0x31, 0x08, 0x31, 0x04, 0x31, 00, 0x30, 00, 0x30};
#define top_right_corner_mask_width 16
#define top_right_corner_mask_height 16
#define top_right_corner_mask_x_hot 14
#define top_right_corner_mask_y_hot 1
static unsigned char top_right_corner_mask_bits[] = {
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 00, 0xf0, 0xfc, 0xf7, 0xfc, 0xf7, 0xfc, 0xf7, 0xc0, 0xf7, 0xe0, 0xf7, 0x70, 0xf7, 0x38, 0xf7, 0x1c, 0xf7, 0x0c, 0xf7, 00, 0xf0, 00, 0xf0};
#define top_side_width 13
#define top_side_height 14
#define top_side_x_hot 6
#define top_side_y_hot 0
static unsigned char top_side_bits[] = {
0xff, 0xff, 0xff, 0x1f, 00, 00, 0x40, 00, 0xe0, 00, 0x50, 0x01, 0x48, 0x02, 0x44, 0x04, 0x40, 00, 0x40, 00, 0x40, 00, 0x40, 00, 0x40, 00, 0x40, 00};
#define top_side_mask_width 15
#define top_side_mask_height 16
#define top_side_mask_x_hot 7
#define top_side_mask_y_hot 1
static unsigned char top_side_mask_bits[] = {
0xff, 0x7f, 0xff, 0x7f, 0xff, 0x7f, 0xff, 0x7f, 0xc0, 0x01, 0xe0, 0x03, 0xf0, 0x07, 0xf8, 0x0f, 0xdc, 0x1d, 0xcc, 0x19, 0xc0, 0x01, 0xc0, 0x01, 0xc0, 0x01, 0xc0, 0x01, 0xc0, 0x01, 0xc0, 0x01};
#define top_tee_width 14
#define top_tee_height 10
#define top_tee_x_hot 7
#define top_tee_y_hot 0
static unsigned char top_tee_bits[] = {
0xff, 0xff, 0xff, 0x3f, 0xc0, 00, 0xc0, 00, 0xc0, 00, 0xc0, 00, 0xc0, 00, 0xc0, 00, 0xc0, 00, 0xc0, 00};
#define top_tee_mask_width 16
#define top_tee_mask_height 12
#define top_tee_mask_x_hot 8
#define top_tee_mask_y_hot 1
static unsigned char top_tee_mask_bits[] = {
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xc0, 0x03, 0xc0, 0x03, 0xc0, 0x03, 0xc0, 0x03, 0xc0, 0x03, 0xc0, 0x03, 0xc0, 0x03, 0xc0, 0x03};
#define trek_width 7
#define trek_height 16
#define trek_x_hot 3
#define trek_y_hot 0
static unsigned char trek_bits[] = {
0x88, 0x80, 0x1c, 0x3e, 0x7f, 0x77, 0x7f, 0x3e, 0x1c, 0x08, 0x5d, 0x6b, 0x49, 0x41, 0x41, 0x41};
#define trek_mask_width 9
#define trek_mask_height 16
#define trek_mask_x_hot 4
#define trek_mask_y_hot 0
static unsigned char trek_mask_bits[] = {
0x38, 0x40, 0x38, 00, 0x7c, 00, 0xfe, 00, 0xff, 0x01, 0xff, 0x01, 0xff, 0x01, 0xfe, 00, 0x7c, 00, 0xba, 00, 0xff, 0x01, 0xff, 0x01, 0xff, 0x01, 0xd7, 0x01, 0xd7, 0x01, 0xc7, 0x01};
#define ul_angle_width 10
#define ul_angle_height 10
#define ul_angle_x_hot 0
#define ul_angle_y_hot 0
static unsigned char ul_angle_bits[] = {
0xff, 0xe3, 0xff, 0x03, 0x03, 00, 0x03, 00, 0x03, 00, 0x03, 00, 0x03, 00, 0x03, 00, 0x03, 00, 0x03, 00};
#define ul_angle_mask_width 12
#define ul_angle_mask_height 12
#define ul_angle_mask_x_hot 1
#define ul_angle_mask_y_hot 1
static unsigned char ul_angle_mask_bits[] = {
0xff, 0x4f, 0xff, 0x0f, 0xff, 0x0f, 0xff, 0x0f, 0x0f, 00, 0x0f, 00, 0x0f, 00, 0x0f, 00, 0x0f, 00, 0x0f, 00, 0x0f, 00, 0x0f, 00};
#define umbrella_width 14
#define umbrella_height 14
#define umbrella_x_hot 7
#define umbrella_y_hot 2
static unsigned char umbrella_bits[] = {
0x88, 0xc4, 0x20, 0x0a, 0xc9, 0x32, 0xf2, 0x09, 0x4c, 0x06, 0x43, 0x18, 0x40, 00, 0x40, 00, 0x40, 00, 0x40, 00, 0x40, 00, 0x40, 0x01, 0x40, 0x01, 0x80, 00};
#define umbrella_mask_width 16
#define umbrella_mask_height 16
#define umbrella_mask_x_hot 8
#define umbrella_mask_y_hot 2
static unsigned char umbrella_mask_bits[] = {
0xe8, 0x76, 0xfb, 0xdf, 0xfd, 0x3f, 0xfe, 0xff, 0xff, 0x3f, 0xff, 0xff, 0xcf, 0x79, 0xc0, 0x01, 0xc0, 0x01, 0xc0, 0x01, 0xc0, 0x01, 0xc0, 0x07, 0xc0, 0x07, 0xc0, 0x07, 0xc0, 0x07, 0x80, 0x03};
#define ur_angle_width 10
#define ur_angle_height 10
#define ur_angle_x_hot 9
#define ur_angle_y_hot 0
static unsigned char ur_angle_bits[] = {
0xff, 0xe3, 0xff, 0x03, 00, 0x03, 00, 0x03, 00, 0x03, 00, 0x03, 00, 0x03, 00, 0x03, 00, 0x03, 00, 0x03};
#define ur_angle_mask_width 12
#define ur_angle_mask_height 12
#define ur_angle_mask_x_hot 10
#define ur_angle_mask_y_hot 1
static unsigned char ur_angle_mask_bits[] = {
0xff, 0x4f, 0xff, 0x0f, 0xff, 0x0f, 0xff, 0x0f, 00, 0x0f, 00, 0x0f, 00, 0x0f, 00, 0x0f, 00, 0x0f, 00, 0x0f, 00, 0x0f, 00, 0x0f};
#define watch_width 16
#define watch_height 16
#define watch_x_hot 15
#define watch_y_hot 9
static unsigned char watch_bits[] = {
0xf8, 0x07, 0xf8, 0x07, 0xf8, 0x07, 0xfc, 0x0f, 0x86, 0x18, 0x83, 0x30, 0x81, 0xe0, 0xc1, 0xe1, 0xc1, 0xe1, 0x21, 0xe0, 0x13, 0x30, 0x06, 0x18, 0xfc, 0x0f, 0xf8, 0x07, 0xf8, 0x07, 0xf8, 0x07};
#define watch_mask_width 16
#define watch_mask_height 16
#define watch_mask_x_hot 15
#define watch_mask_y_hot 9
static unsigned char watch_mask_bits[] = {
0xfc, 0x0f, 0xfc, 0x0f, 0xfc, 0x0f, 0xfe, 0x1f, 0xff, 0x3f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x3f, 0xfe, 0x1f, 0xfc, 0x0f, 0xfc, 0x0f, 0xfc, 0x0f};
#define xterm_width 7
#define xterm_height 14
#define xterm_x_hot 3
#define xterm_y_hot 7
static unsigned char xterm_bits[] = {
0xf7, 0x9c, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x1c, 0x77};
#define xterm_mask_width 9
#define xterm_mask_height 16
#define xterm_mask_x_hot 4
#define xterm_mask_y_hot 8
static unsigned char xterm_mask_bits[] = {
0xef, 0x41, 0xff, 0x01, 0xff, 0x01, 0x7c, 00, 0x38, 00, 0x38, 00, 0x38, 00, 0x38, 00, 0x38, 00, 0x38, 00, 0x38, 00, 0x38, 00, 0x7c, 00, 0xff, 0x01, 0xff, 0x01, 0xef, 0x01};

View File

@@ -71,7 +71,6 @@ static const GDebugKey gdk_debug_keys[] = {
{"xim", GDK_DEBUG_XIM},
{"nograbs", GDK_DEBUG_NOGRABS},
{"colormap", GDK_DEBUG_COLORMAP},
{"gdkrgb", GDK_DEBUG_GDKRGB},
{"gc", GDK_DEBUG_GC},
{"pixmap", GDK_DEBUG_PIXMAP},
{"image", GDK_DEBUG_IMAGE},
@@ -160,10 +159,10 @@ static const GOptionEntry gdk_args[] = {
/* Placeholder in --screen=SCREEN in --help output */ N_("SCREEN") },
#ifdef G_ENABLE_DEBUG
{ "gdk-debug", 0, 0, G_OPTION_ARG_CALLBACK, gdk_arg_debug_cb,
/* Description of --gdk-debug=FLAGS in --help output */ N_("Gdk debugging flags to set"),
/* Description of --gdk-debug=FLAGS in --help output */ N_("GDK debugging flags to set"),
/* Placeholder in --gdk-debug=FLAGS in --help output */ N_("FLAGS") },
{ "gdk-no-debug", 0, 0, G_OPTION_ARG_CALLBACK, gdk_arg_no_debug_cb,
/* Description of --gdk-no-debug=FLAGS in --help output */ N_("Gdk debugging flags to unset"),
/* Description of --gdk-no-debug=FLAGS in --help output */ N_("GDK debugging flags to unset"),
/* Placeholder in --gdk-no-debug=FLAGS in --help output */ N_("FLAGS") },
#endif
{ NULL }
@@ -266,9 +265,6 @@ gdk_parse_args (int *argc,
}
g_option_context_free (option_context);
if (_gdk_debug_flags && GDK_DEBUG_GDKRGB)
gdk_rgb_set_verbose (TRUE);
GDK_NOTE (MISC, g_message ("progname: \"%s\"", g_get_prgname ()));
}

View File

@@ -41,15 +41,12 @@
#include <gdk/gdkdrawable.h>
#include <gdk/gdkenumtypes.h>
#include <gdk/gdkevents.h>
#include <gdk/gdkgc.h>
#include <gdk/gdkimage.h>
#include <gdk/gdkinput.h>
#include <gdk/gdkkeys.h>
#include <gdk/gdkpango.h>
#include <gdk/gdkpixbuf.h>
#include <gdk/gdkpixmap.h>
#include <gdk/gdkproperty.h>
#include <gdk/gdkrgb.h>
#include <gdk/gdkscreen.h>
#include <gdk/gdkselection.h>
#include <gdk/gdkspawn.h>

View File

@@ -245,26 +245,20 @@ gdk_utf8_to_compound_text_for_display
#if IN_HEADER(__GDK_ENUM_TYPES_H__)
#if IN_FILE(__GDK_ENUM_TYPES_C__)
gdk_rgb_dither_get_type G_GNUC_CONST
gdk_drag_protocol_get_type G_GNUC_CONST
gdk_input_source_get_type G_GNUC_CONST
gdk_input_mode_get_type G_GNUC_CONST
gdk_axis_use_get_type G_GNUC_CONST
gdk_byte_order_get_type G_GNUC_CONST
gdk_cap_style_get_type G_GNUC_CONST
gdk_crossing_mode_get_type G_GNUC_CONST
gdk_device_type_get_type G_GNUC_CONST
gdk_extension_mode_get_type G_GNUC_CONST
gdk_event_mask_get_type G_GNUC_CONST
gdk_event_type_get_type G_GNUC_CONST
gdk_fill_get_type G_GNUC_CONST
gdk_filter_return_get_type G_GNUC_CONST
gdk_function_get_type G_GNUC_CONST
gdk_grab_ownership_get_type G_GNUC_CONST
gdk_grab_status_get_type G_GNUC_CONST
gdk_gravity_get_type G_GNUC_CONST
gdk_join_style_get_type G_GNUC_CONST
gdk_line_style_get_type G_GNUC_CONST
gdk_modifier_type_get_type G_GNUC_CONST
gdk_notify_type_get_type G_GNUC_CONST
gdk_owner_change_get_type G_GNUC_CONST
@@ -273,13 +267,11 @@ gdk_prop_mode_get_type G_GNUC_CONST
gdk_scroll_direction_get_type G_GNUC_CONST
gdk_setting_action_get_type G_GNUC_CONST
gdk_status_get_type G_GNUC_CONST
gdk_subwindow_mode_get_type G_GNUC_CONST
gdk_visibility_state_get_type G_GNUC_CONST
gdk_wm_decoration_get_type G_GNUC_CONST
gdk_wm_function_get_type G_GNUC_CONST
gdk_cursor_type_get_type G_GNUC_CONST
gdk_drag_action_get_type G_GNUC_CONST
gdk_gc_values_mask_get_type G_GNUC_CONST
gdk_window_attributes_type_get_type G_GNUC_CONST
gdk_window_class_get_type G_GNUC_CONST
gdk_window_edge_get_type G_GNUC_CONST
@@ -287,7 +279,6 @@ gdk_window_hints_get_type G_GNUC_CONST
gdk_window_state_get_type G_GNUC_CONST
gdk_window_type_get_type G_GNUC_CONST
gdk_window_type_hint_get_type G_GNUC_CONST
gdk_image_type_get_type G_GNUC_CONST
gdk_visual_type_get_type G_GNUC_CONST
#endif
#endif
@@ -325,7 +316,6 @@ gdk_colormap_new
gdk_colormap_get_type G_GNUC_CONST
gdk_colormap_alloc_colors
gdk_colormap_free_colors
gdk_colormap_query_color
gdk_colormap_get_screen
#endif
#endif
@@ -333,6 +323,7 @@ gdk_colormap_get_screen
#if IN_HEADER(__GDK_CURSOR_H__)
#if IN_FILE(__GDK_CURSOR_C__)
gdk_cursor_get_type G_GNUC_CONST
gdk_cursor_get_cursor_type
gdk_cursor_new
gdk_cursor_ref
gdk_cursor_unref
@@ -414,6 +405,7 @@ gdk_input_set_extension_events
#if IN_HEADER(__GDK_DISPLAY_H__)
#if IN_FILE(__GDK_DISPLAY_C__)
gdk_display_close
gdk_display_is_closed
gdk_display_get_event
gdk_display_get_device_manager
gdk_display_get_device_state
@@ -539,78 +531,16 @@ gdk_drag_get_protocol
#if IN_HEADER(__GDK_DRAWABLE_H__)
#if IN_FILE(__GDK_DRAW_C__)
gdk_drawable_copy_to_image
gdk_drawable_get_clip_region
gdk_drawable_get_colormap
gdk_drawable_get_depth
gdk_drawable_get_display
gdk_drawable_get_image
gdk_drawable_get_screen
gdk_drawable_get_size
gdk_drawable_get_type G_GNUC_CONST
gdk_drawable_get_visible_region
gdk_drawable_get_visual
gdk_drawable_set_colormap
gdk_draw_arc
gdk_draw_drawable
gdk_draw_glyphs
gdk_draw_glyphs_transformed
gdk_draw_image
gdk_draw_line
gdk_draw_lines
gdk_draw_pixbuf
gdk_draw_point
gdk_draw_points
gdk_draw_polygon
gdk_draw_rectangle
gdk_draw_segments
gdk_draw_trapezoids
#endif
#endif
#if IN_HEADER(__GDK_DRAWABLE_H__)
#if IN_FILE(__GDK_PANGO_C__)
gdk_draw_layout
gdk_draw_layout_line
gdk_draw_layout_line_with_colors
gdk_draw_layout_with_colors
#endif
#endif
#if IN_HEADER(__GDK_GC_H__)
#if IN_FILE(__GDK_GC_C__)
gdk_gc_new
gdk_gc_get_type G_GNUC_CONST
gdk_gc_new_with_values
gdk_gc_get_values
gdk_gc_set_values
gdk_gc_set_foreground
gdk_gc_set_background
gdk_gc_set_function
gdk_gc_set_fill
gdk_gc_set_tile
gdk_gc_set_stipple
gdk_gc_set_ts_origin
gdk_gc_set_clip_origin
gdk_gc_set_clip_mask
gdk_gc_set_clip_rectangle
gdk_gc_set_clip_region
gdk_gc_set_subwindow
gdk_gc_set_exposures
gdk_gc_set_line_attributes
gdk_gc_set_dashes
gdk_gc_offset
gdk_gc_copy
gdk_gc_get_colormap
gdk_gc_set_colormap
gdk_gc_set_rgb_bg_color
gdk_gc_set_rgb_fg_color
#endif
#endif
#if IN_HEADER(__GDK_GC_H__)
#if IN_FILE(__GDK_GC_X11_C__)
gdk_gc_get_screen
#endif
#endif
@@ -649,8 +579,7 @@ gdk_window_move_resize
gdk_window_scroll
gdk_window_move_region
gdk_window_get_accept_focus
gdk_window_get_back_pixmap
gdk_window_get_background
gdk_window_get_background_pattern
gdk_window_get_composited
gdk_window_get_cursor
gdk_window_get_focus_on_map
@@ -687,6 +616,7 @@ gdk_window_clear_area_e
gdk_window_constrain_size
gdk_window_coords_from_parent
gdk_window_coords_to_parent
gdk_window_create_similar_surface
gdk_window_destroy
gdk_window_end_paint
gdk_window_flush
@@ -809,32 +739,6 @@ gdk_window_configure_finished
#endif
#endif
#if IN_HEADER(__GDK_IMAGE_H__)
#if IN_FILE(__GDK_IMAGE_C__)
gdk_image_get_bits_per_pixel
gdk_image_get_bytes_per_pixel
gdk_image_get_bytes_per_line
gdk_image_get_byte_order
gdk_image_get_colormap
gdk_image_get_depth
gdk_image_get_height
gdk_image_get_image_type
gdk_image_get_visual
gdk_image_get_width
gdk_image_get_pixels
gdk_image_set_colormap
gdk_image_new
#endif
#endif
#if IN_HEADER(__GDK_IMAGE_H__)
#if IN_FILE(__GDK_IMAGE_X11_C__)
gdk_image_get_pixel
gdk_image_put_pixel
gdk_image_get_type G_GNUC_CONST
#endif
#endif
#if IN_HEADER(__GDK_KEYS_H__)
#if IN_FILE(__GDK_KEYS_C__)
gdk_keymap_get_default
@@ -872,23 +776,6 @@ gdk_keyval_name G_GNUC_CONST
#endif
#endif
#if IN_HEADER(__GDK_KEYS_H__)
#if IN_FILE(__GDK_KEYS_DIRECTFB_C__)
gdk_keymap_get_direction
gdk_keymap_get_entries_for_keycode
gdk_keymap_get_entries_for_keyval
gdk_keymap_get_for_display
gdk_keymap_get_caps_lock_state
gdk_keymap_get_num_lock_state
gdk_keymap_lookup_key
gdk_keymap_translate_keyboard_state
gdk_keymap_add_virtual_modifiers
gdk_keymap_map_virtual_modifiers
gdk_keyval_from_name
gdk_keyval_name G_GNUC_CONST
#endif
#endif
#if IN_HEADER(__GDK_VISUAL_H__)
#if IN_FILE(__GDK_VISUAL_C__)
gdk_list_visuals
@@ -921,27 +808,17 @@ gdk_visual_get_type G_GNUC_CONST
#if IN_HEADER(__GDK_PANGO_H__)
#if IN_FILE(__GDK_PANGO_C__)
gdk_pango_attr_emboss_color_new
gdk_pango_attr_embossed_new
gdk_pango_attr_stipple_new
gdk_pango_context_get
gdk_pango_context_get_for_screen
gdk_pango_layout_get_clip_region
gdk_pango_layout_line_get_clip_region
gdk_pango_renderer_get_default
gdk_pango_renderer_get_type G_GNUC_CONST
gdk_pango_renderer_new
gdk_pango_renderer_set_drawable
gdk_pango_renderer_set_gc
gdk_pango_renderer_set_override_color
gdk_pango_renderer_set_stipple
#endif
#endif
#if IN_HEADER(__GDK_PIXBUF_H__)
#if IN_FILE(__GDK_PIXBUF_DRAWABLE_C__)
gdk_pixbuf_get_from_drawable
gdk_pixbuf_get_from_image
gdk_pixbuf_get_from_surface
#endif
#endif
@@ -955,12 +832,6 @@ gdk_pixbuf_render_threshold_alpha
#if IN_HEADER(__GDK_PIXMAP_H__)
#if IN_FILE(__GDK_PIXMAP_C__)
gdk_bitmap_create_from_data
gdk_pixmap_colormap_create_from_xpm
gdk_pixmap_create_from_data
gdk_pixmap_create_from_xpm
gdk_pixmap_colormap_create_from_xpm_d
gdk_pixmap_create_from_xpm_d
gdk_pixmap_get_type G_GNUC_CONST
gdk_pixmap_new
#endif
@@ -976,27 +847,6 @@ gdk_pixmap_lookup_for_display
#endif
#endif
#if IN_HEADER(__GDK_RGB_H__)
#if IN_FILE(__GDK_RGB_C__)
gdk_rgb_cmap_free
gdk_rgb_cmap_new
gdk_rgb_colormap_ditherable
gdk_rgb_ditherable
gdk_rgb_find_color
gdk_rgb_get_colormap
gdk_rgb_get_visual
gdk_rgb_set_install
gdk_rgb_set_min_colors
gdk_rgb_set_verbose
gdk_draw_gray_image
gdk_draw_indexed_image
gdk_draw_rgb_32_image
gdk_draw_rgb_32_image_dithalign
gdk_draw_rgb_image
gdk_draw_rgb_image_dithalign
#endif
#endif
#if IN_HEADER(__GDK_SCREEN_H__)
#if IN_FILE(__GDK_SCREEN_C__)
gdk_screen_get_type G_GNUC_CONST
@@ -1015,13 +865,6 @@ gdk_screen_get_default
#endif
#endif
#if IN_HEADER(__GDK_SCREEN_H__)
#if IN_FILE(__GDK_RGB_C__)
gdk_screen_get_rgb_colormap
gdk_screen_get_rgb_visual
#endif
#endif
#if IN_HEADER(__GDK_SCREEN_H__)
#if IN_FILE(__GDK_VISUAL_X11_C__)
gdk_screen_get_system_visual
@@ -1117,8 +960,6 @@ gdk_window_destroy_notify
#if IN_HEADER(__GDK_WIN32_H__)
#if IN_FILE(__GDK_WINDOW_WIN32_C__)
gdk_win32_window_is_win32
gdk_win32_begin_direct_draw_libgtk_only
gdk_win32_end_direct_draw_libgtk_only
#endif
#endif
@@ -1147,13 +988,6 @@ gdk_win32_set_modal_dialog_libgtk_only
#endif
#endif
#if IN_HEADER(__GDK_WIN32_H__)
#if IN_FILE(__GDK_GC_WIN32_C__)
gdk_win32_hdc_get
gdk_win32_hdc_release
#endif
#endif
#if IN_HEADER(__GDK_WIN32_H__)
#if IN_FILE(__GDK_SELECTION_WIN32_C__)
gdk_win32_selection_add_targets
@@ -1204,11 +1038,6 @@ gdk_x11_window_get_drawable_impl
gdk_x11_pixmap_get_drawable_impl
#endif
#if IN_FILE(__GDK_GC_X11_C__)
gdk_x11_gc_get_xdisplay
gdk_x11_gc_get_xgc
#endif
#if IN_FILE(__GDK_MAIN_X11_C__)
gdk_x11_get_default_root_xwindow
gdk_x11_get_default_screen
@@ -1217,11 +1046,6 @@ gdk_x11_grab_server
gdk_x11_ungrab_server
#endif
#if IN_FILE(__GDK_IMAGE_X11_C__)
gdk_x11_image_get_xdisplay
gdk_x11_image_get_ximage
#endif
#if IN_FILE(__GDK_SCREEN_X11_C__)
gdk_net_wm_supports
gdk_x11_screen_get_screen_number

View File

@@ -156,17 +156,9 @@ gdk_color_equal (const GdkColor *colora,
(colora->blue == colorb->blue));
}
GType
gdk_color_get_type (void)
{
static GType our_type = 0;
if (our_type == 0)
our_type = g_boxed_type_register_static (g_intern_static_string ("GdkColor"),
(GBoxedCopyFunc)gdk_color_copy,
(GBoxedFreeFunc)gdk_color_free);
return our_type;
}
G_DEFINE_BOXED_TYPE (GdkColor, gdk_color,
gdk_color_copy,
gdk_color_free)
/**
* gdk_color_parse:

View File

@@ -110,9 +110,6 @@ gboolean gdk_colormap_alloc_color (GdkColormap *colormap,
void gdk_colormap_free_colors (GdkColormap *colormap,
const GdkColor *colors,
gint n_colors);
void gdk_colormap_query_color (GdkColormap *colormap,
gulong pixel,
GdkColor *result);
GdkVisual *gdk_colormap_get_visual (GdkColormap *colormap);

Some files were not shown because too many files have changed in this diff Show More