Compare commits

..

573 Commits

Author SHA1 Message Date
Matthias Clasen 11140f8ba9 Queue an expand recompute if scrollbar visibility changes 2010-10-11 22:35:28 -04:00
Matthias Clasen ffd079a411 Queue an expand recompute if scrollbar visibility changes 2010-10-11 19:46:48 -04:00
Matthias Clasen 175f361d33 Unify handling of GtkWindow::resizable property 2010-10-11 17:23:01 -04:00
Matthias Clasen 406d1981be Support GtkWidget expand properties in GtkScrolledWindow
Always expand if a scrollbar is visible, otherwise inherit
the contents expand flag.
2010-10-11 15:39:47 -04:00
Matthias Clasen f0e7c9fc64 Support GtkWidget expand properties in GtkNotebook
We expand a tab if either tab-expand is set, or the generic widget
expand property in the correct direction is set. And we do not
propagate expand flags from tab labels to the notebook, only
the expand flags from the pages.
2010-10-11 15:23:03 -04:00
Matthias Clasen 8017a12b46 Remove expand child properties from GtkWrapBox
Instead, use generic widget expand properties.
2010-10-11 14:44:43 -04:00
Matthias Clasen 1f7966c143 Support GtkWidget expand properties in GtkTable
We expand a child when it either has the table-specific expand flag
or the generic expand property set. Override compute_expand so that
it also takes the table-specific expand flags of children into
account.

https://bugzilla.gnome.org/show_bug.cgi?id=628902
2010-10-11 13:59:44 -04:00
Matthias Clasen a0950f0f54 Set fill options on all children 2010-10-11 13:56:36 -04:00
Matthias Clasen f618f781b9 Add a GtkTable testcase 2010-10-11 13:26:11 -04:00
Havoc Pennington 5a11341c19 add tests/testexpand.c used to test the expand props on GtkWidget
There are two colored boxes with toggle buttons nested
inside several GtkBox. Toggling these to expand mode
should automatically propagate expansion up through
the several GtkBox such that resizing the window
results in resizing the colored boxes.

https://bugzilla.gnome.org/show_bug.cgi?id=628902
2010-09-25 11:53:12 -04:00
Havoc Pennington 9c2dde1c27 Support GtkWidget expand properties in GtkBox
This consists of:
* expand a child if either child->expand || gtk_widget_get_expand(child)
* override compute_expand so that child->expand will cause us to
  return TRUE for gtk_widget_get_expand()

https://bugzilla.gnome.org/show_bug.cgi?id=628902
2010-09-25 11:53:07 -04:00
Havoc Pennington 23715e121a Add horizontal and vertical expand flags, compute_expand() to GtkWidget
GtkWidget now has flags for horizontal and vertical expand, and
a compute_expand() method. compute_expand() is used by containers
to set a default expand flag. (If a widget has expand set explicitly,
it always overrides the results of compute_expand.)

GtkContainer has a default implementation of compute_expand which
simply walks over all child widgets and sets expand=TRUE
if any child is expanding.

The overall effect is that you only have to set expand on
leaf nodes in the widget tree, while previously you had to
set expand all the way up the tree as you packed every
container. Also, now containers need not have their own child
properties for expand.

For old containers which do have "expand" child properties,
they should override compute_expand and include the child
properties in whether the container is expand=TRUE.
Also, the old container should use
"child_prop_expand || gtk_widget_compute_expand()" everywhere
it previously used simply "child_prop_expand"

https://bugzilla.gnome.org/show_bug.cgi?id=628902
2010-09-25 11:52:58 -04:00
Matthias Clasen 5aad25aa42 Nuke the 'Types' section from the docs 2010-09-24 23:03:51 -04:00
Matthias Clasen 3fd767c92d Remove mention of input dialog from the docs 2010-09-24 22:16:53 -04:00
Matthias Clasen 8b5bc9669b GtkOffscreenWindow: shorten doc title 2010-09-24 22:13:42 -04:00
Matthias Clasen a98127fc12 GtkScale: Remove links from doc section title 2010-09-24 21:52:58 -04:00
Matthias Clasen 92ededc9b4 GtkMenu: Add a destroy notify to gtk_menu_popup_for_device
This is necessary so language bindings can use gtk_menu_popup_for_device()
as a 'full' variant of gtk_menu_popup().

http://bugzilla.gnome.org/show_bug.cgi?id=623664
2010-09-24 13:52:49 -04:00
Matthias Clasen cc9ac5b7ea Update docs of GtkAboutDialog and GtkLinkButton
Remove references to global hooks from the docs. Also move remaining
docs inline, and remove the templates.
2010-09-24 13:41:29 -04:00
Matthias Clasen bc6a3f8cd8 DND: don't use uninitialized memory
The dest_x/y members of GtkDragDestInfo were not initialized.
At the same time, switch some of the small temporary structs
to g_slice allocation.

https://bugzilla.gnome.org/show_bug.cgi?id=630532
2010-09-24 13:23:47 -04:00
Matthias Clasen 1773b6d50a GtkAboutDialog: correct a since tag 2010-09-24 12:43:55 -04:00
Christian Dywan 7dde4d93ad gtkeditable: move documentation to inline comments
Fixes: https://bugzilla.gnome.org/show_bug.cgi?id=617316
2010-09-24 18:42:44 +02:00
Florian Müllner 93fd2b44c3 introspection: Fix typo in annotation 2010-09-24 18:26:34 +02:00
Tomeu Vizoso 41f4fd94df Don't try to unref event->dnd.context unconditionally.
As it's not set in gdk_event_new but eventually later.

https://bugzilla.gnome.org/show_bug.cgi?id=630520
2010-09-24 18:20:41 +02:00
Matthias Clasen 26c93dc04b GtkAboutDialog: escape mail addresses
This got lost when converting to the ::activate-link signal.
2010-09-24 12:02:37 -04:00
Matthias Clasen 8578ff4b38 Remove gtk_notebook_set_window_creation_hook in testnotebookdnd.c 2010-09-24 11:53:20 -04:00
Matthias Clasen 94e9a35a16 Another since tag 2010-09-24 11:31:23 -04:00
Matthias Clasen 50971f704c Correct since tags 2010-09-24 11:29:17 -04:00
Matthias Clasen 3c19eea34b GtkNotebook: replace group by group_name
Dealing with bare pointers is problematic for language bindings,
using interned strings is much more straightforward and more than
good enough for what is needed here.

http://bugzilla.gnome.org/show_bug.cgi?id=630521
2010-09-24 11:13:30 -04:00
Matthias Clasen b47b1428b8 GtkNotebook: remove gtk_notebook_set_window_creation_hook
http://bugzilla.gnome.org/show_bug.cgi?id=630521
2010-09-24 11:10:51 -04:00
Matthias Clasen 3557761fb3 docs: Add a CODING-STYLE document
This document mostly codifies the existing GTK+ coding style
conventions; it is strongly based on the clutter document of
the same name.
2010-09-23 22:28:02 -04:00
Matthias Clasen 65db1100ec docs: remove defsformat.txt
We should not ship documentation for file formats we are no longer
using.
2010-09-23 22:28:01 -04:00
Matthias Clasen c45985ae01 docs: remove gtk-config.txt
Considering that gtk-config has been obsoleted by pkg-config
a decade ago, we should stop shipping docs for it...
2010-09-23 22:28:01 -04:00
Matthias Clasen 8026cd386b Bump gobject-introspection dep in INSTALL.in 2010-09-23 22:28:01 -04:00
Johan Dahlin 8736d31a04 Fix a couple of broken annotations 2010-09-23 17:57:16 -03:00
Matthias Clasen 76d7331578 Fix the annotation of gtk_tree_view_create_row_drag_icon 2010-09-23 13:17:52 -04:00
Matthias Clasen 84bae92928 fix a typo in the gtk_widget_render_icon annotations 2010-09-23 13:17:52 -04:00
Takayuki KUSANO 381c14f1e2 Updated Japanese translation 2010-09-24 02:16:55 +09:00
Javier Jardón 61e9f570d9 INSTALL.in: Automate the versions of the dependencies 2010-09-23 19:05:13 +02:00
Kenneth Nielsen e56a209077 Updated Danish translation 2010-09-22 22:58:04 +02:00
Tristan Van Berkom aad77642be Fixed GtkWrapBox base requests for ALIGNED and FREE mode
Problems were; in FREE mode there was a simple typo where we were
repeatedly checking the size of the same item in get_largest_line_length(),
and in ALIGNED mode we were assuming something like HOMOGENEOUS which
was incorrect; added get_largest_aligned_line_length() which properly
adds up the collective max sizes of every index in the line.
2010-09-22 16:06:42 +09:00
Tristan Van Berkom c9ca4beb35 Fixed gtk_distribute_natural_allocation() to place the g_newa *after* g_return_if_fail() guards. 2010-09-22 16:06:42 +09:00
Matthias Clasen b0713fb3bb Remove url hooks from GtkAboutDialog and GtkLinkButton
With gtk_show_uri, global configurability of link activation has
moved to GIO/gvfs. For local overrides, GtkLinkButton has the ::clicked
signal, and GtkAboutDialog gets an ::activate-link signal.

Bug 339745
2010-09-22 00:36:13 -04:00
Tristan Van Berkom 0e1bba6ef5 Fixed GtkViewport to set adjustments properly for width-for-height widgets
Make GtkViewport calculate widget-for-height as well as height-for-width
cases when setting the scroll adjustment values, also base the scrolling
on the minimum size instead of the natural size in the interest of showing
as much content as possible when the viewport is smaller than the natural
size.
2010-09-22 12:50:06 +09:00
Javier Jardón bb90394147 Do not disable GDK deprecation guards 2010-09-22 04:28:53 +02:00
Javier Jardón fb62d6105f Do not disable deprecation guards 2010-09-22 04:21:13 +02:00
Javier Jardón 9ef738c4ab Add deprecation guards for gdk_device_get_core_pointer() 2010-09-22 03:53:23 +02:00
Javier Jardón 9c3d1080d6 Do not use deprecated gdk_display_get_core_pointer()
Use gdk_device_manager_get_client_pointer() instead
2010-09-22 03:42:15 +02:00
Matthias Clasen 59bc9e8860 Fix an off-by-one error in serial range handling
trap->end_sequence is the first serial for which we don't
ignore errors anymore, so we know the trap is dead if
end_sequence <= processed_serial.

Bug 629608
2010-09-21 21:10:15 -04:00
Matthias Clasen 0f88b6808c GtkScrolledWindow: change default policy to 'automatic'
This change was proposed in bug 468672.
2010-09-21 20:14:46 -04:00
Cody Russell 27bc88f7c2 Merge branch 'notebooks-without-mouse-scrolling' 2010-09-21 16:19:10 -05:00
Cody Russell ad48f4d52b Remove mouse scrolling from GtkNotebook tabs. Bug #630226. 2010-09-21 16:18:22 -05:00
Matthias Clasen eba2d6cf61 autogen.sh: run gtkdocize before aclocal 2010-09-21 12:45:51 -04:00
Tristan Van Berkom e976abe825 Split up GtkWrapBox:spreading property into two orientation specific properties.
Now GtkWrapBox has "horizontal-spreading" and "vertical-spreading" options,
before GtkWrapBox never spread out children across the opposing orientation
(i.e. it never grew "lines" larger then their natural width, they would
act as if set to GTK_WRAP_BOX_SPREAD_START, now they are completely configurable).
2010-09-21 22:00:54 +09:00
Michael Natterer 9e2996decd configure.ac: remove check for sigsetjmp(), it belonged to gdk-pixbuf 2010-09-21 12:35:37 +02:00
Owen W. Taylor 93e203e067 Use g_warning() for X errors and X IO errors
Currently fprintf(stderr, ...) is used for X error and X IO errors
(unless compiled with debugging, in which case g_error() is used for
X errors.)

But if an application is redirecting log messages, we really want
X errors to appear in that same log, so it's better to use a g_logv()
variant.

Though g_warning() isn't really appropriate for "lost connection to the
server", G_LOG_LEVEL_INFO isn't part of the "prefixed log levels"
so will produce output without the application name and PID.

https://bugzilla.gnome.org/show_bug.cgi?id=630216
2010-09-21 00:30:46 -04:00
Matthias Clasen e0aa12eb0a Tons of transfer annotations 2010-09-21 00:18:11 -04:00
Tristan Van Berkom ca251cf1d4 Reduced overall SizeRequestCache size
This patch changes the 'age' counting previous approach taken
verbatim from clutter and changes it for a counter of validated
caches and an index to the last cached value which we use to
round-robin through the cache if ever a widget is requested
for more than 3 contextual sizes (cache is reduced by 3 * sizeof (int)
per widget private data).
2010-09-21 12:57:27 +09:00
Johan Dahlin 6ba904486c Add a couple of missing transfer annotations 2010-09-20 23:45:01 -03:00
Johan Dahlin 330bc154ed Fixup gtk-doc comment syntax 2010-09-20 23:40:21 -03:00
Matthias Clasen 2ddfaeddad More error trap cleanups
Remove syncs in front of gdk_error_trap_pop() calls, and convert
gdk_error_trap_pop() calls to gdk_error_trap_pop_ignored() in gdk.
2010-09-20 16:40:14 -04:00
Owen W. Taylor 14e38da150 Only store error codes in inner-most X error trap
When an error occurs with nested traps in place, only the innermost
trap should have the error code stored in it; outer traps are
shielded by the inner trap.

https://bugzilla.gnome.org/show_bug.cgi?id=629608
2010-09-20 16:35:41 -04:00
Aron Xu 1592738d2f Add a ug.po for po-properties, re-enable ug in LINGUAS. 2010-09-20 20:16:29 +00:00
Emmanuele Bassi 1aea318d0f po: Disable ug localization
The ug.po file is missing from the po-properties directory and it's
breaking the build.
2010-09-20 13:51:38 +01:00
Takayuki KUSANO bb7ffddff2 Updated Japanese translation 2010-09-20 18:50:58 +09:00
Sweta Kothari e8a60e6123 Updated Gujarati Translations 2010-09-20 12:50:44 +05:30
Aron Xu d14687ef4b Add ug to LINGUAS. 2010-09-20 05:17:10 +00:00
Matthias Clasen def95d1319 Add new error trap api to gdk.symbols and gdk3-sections.txt 2010-09-19 22:45:02 -04:00
Javier Jardón 743202261a Add deprecation guards for gtk_cell_renderer_get_size() 2010-09-19 17:47:09 +02:00
Kenneth Nielsen ae3be469b3 Updated Danish translation 2010-09-19 17:40:56 +02:00
Wouter Bolsterlee bc7654826f Updated Dutch translation by Vincent van Adrighem 2010-09-19 16:39:54 +02:00
Matthias Clasen 1dcd209cdd Fix a few dubious return values in return_if_fail calls
These were pointed out in bug 623958.
2010-09-19 01:58:46 -04:00
Matthias Clasen 8e117b6f3a Add a rename-to annotation for gtk_tree_path_get_indices_with_depth
https://bugzilla.gnome.org/show_bug.cgi?id=621590
2010-09-19 01:15:17 -04:00
Matthias Clasen 6b4992d647 Point to the new GtkWidget align and margin properties 2010-09-19 01:01:09 -04:00
Matthias Clasen 35e0ad72e4 Another fix for the initial focus heuristic
We were trying to avoid selecting a label initially, but the code
was sometimes leaving labels selected when the focus eventually
ended up on a button instead.
2010-09-19 00:54:50 -04:00
Matthias Clasen 92411d2c84 Fix an annotation 2010-09-19 00:22:37 -04:00
Matthias Clasen 1243b4861c Use gdk_error_trap_pop_ignore() where appropriate 2010-09-18 23:17:31 -04:00
Havoc Pennington e32ab82069 Improve tests for X error traps, fix two bugs
* don't lose track of previous X error handler
  if nested traps are pushed
* free any remaining traps when display
  is finalized

Test will fail unless bug 630032 is closed so
gdk_display_close() works.

https://bugzilla.gnome.org/show_bug.cgi?id=630033
2010-09-18 23:03:31 -04:00
Havoc Pennington c7d73ee587 Fix bugs that crashed gdk_display_close() on x11
* _gdk_device_set_associated_device() did not allow NULL device
* GdkDisplay should dispose device manager to avoid devices
  trying to touch the display in finalize
* GdkDeviceManagerXI did not ref devices in id hash
* GdkDisplayX11 did not ref devices in ->input_devices
2010-09-18 22:57:36 -04:00
Havoc Pennington b837ef5a6d Revamp and modernize X error traps
* add per-display gdk_x11_display_error_trap_push()
  (X11-specific because gdk_error_trap_push() probably
  should have been)
* make gdk_error_trap_push() handle only GDK displays
  not displays opened without a GDK wrapper
* make gdk_error_trap_pop() and gdk_x11_display_error_trap_pop()
  automatically sync only if needed, so manual gdk_flush() is not
  required
* add gdk_error_trap_pop_ignored() which just asynchronously
  ignores errors, so never needs to sync
* add G_GNUC_WARN_UNUSED_RESULT to plain pop(), because
  if you use plain pop() and don't need the return value,
  the async gdk_error_trap_pop_ignored() should be used
  instead. This results in lots of warnings to clean
  up in a later patch.

The main objective here was to avoid the need to sync just
to ignore an error. Now, syncing is automatic, and only
happens when we need to know the error code.

https://bugzilla.gnome.org/show_bug.cgi?id=629608
2010-09-18 18:19:27 -04:00
Matthias Clasen 4f3e5e6ebc Add some minimal test for X error traps 2010-09-18 18:18:36 -04:00
Havoc Pennington 8d5b4e9f6e Replace crufty old code for gdk error traps with GQueue and GSlice
No need to do a manual free list these days.

https://bugzilla.gnome.org/show_bug.cgi?id=629608
2010-09-18 16:44:25 -04:00
Havoc Pennington de3512dbba Remove trailing whitespace and obsolete doc comments from gdk_error_trap code
(there are actual docs in the template file, these were some kind of
pre-gtk-doc comments without useful info)

https://bugzilla.gnome.org/show_bug.cgi?id=629608
2010-09-18 16:39:56 -04:00
Johan Dahlin 19cab17c22 Add a couple of missing annotations 2010-09-18 13:43:06 -03:00
Johan Dahlin 60c920f228 [introspection] Do not parse private sources
Private sources include private headers which we may not be able
to parse properly since some of them use unsupported syntax such
as objective-c.
2010-09-18 13:43:00 -03:00
Johan Dahlin 8c3900f420 [introspection] Do not include internal api
GtkTextLayout is internal and unsupported, do not include
it in the gir
2010-09-18 13:28:52 -03:00
Ryan Lortie ac051a7b2c depend on GLib 2.27.0 2010-09-17 20:49:30 -04:00
Javier Jardón 809dbe9f99 gail: Do not use deprecated gtk_cell_renderer_get_size()
Use gtk_cell_size_request_get_size() instead

https://bugzilla.gnome.org/show_bug.cgi?id=629785
2010-09-17 20:00:25 +02:00
Javier Jardón 15a5a231fc Do not use deprecated gtk_cell_renderer_get_size()
Use gtk_cell_size_request_get_size() instead

Fixes https://bugzilla.gnome.org/show_bug.cgi?id=629785
2010-09-17 19:59:56 +02:00
Javier Jardón efbf04236e Change GtkEditable typedef from GtkEditableClass to GtkEditabeInterface
Fixes https://bugzilla.gnome.org/show_bug.cgi?id=323904
2010-09-17 19:57:09 +02:00
Matthias Clasen 6e9349d858 Fix a trivial typo in a doc comment
https://bugzilla.gnome.org/show_bug.cgi?id=629733
2010-09-17 10:30:37 -04:00
Matthias Clasen 54077d61e2 Add some element-type annotations to gtk apis 2010-09-17 09:26:39 -04:00
Matthias Clasen 28c66ed9b0 Fix a doc comment 2010-09-17 09:25:49 -04:00
Matthias Clasen bf19aa46e9 Scan gdk/x11 sources for Gdk-3.0.gir
The doc comments (with annotations) for some of the gdk api are down
in x11/ sources, so we need to scan those too, when building Gdk-3.0.gir.
2010-09-17 09:23:30 -04:00
Matthias Clasen 6aa8941b84 Add annotations
The goi scanner warns about these nowadays.
2010-09-17 00:18:20 -04:00
Aron Xu ab0e68e586 Update Simplified Chinese translation of po-properties. 2010-09-16 17:34:27 +00:00
Matthias Clasen 2f78aa3024 Rename h/v-align to h/valign
And adjust the getters and setters to match. Also include some
documentation by Havoc Pennington about adjustment of size requests
and allocations.
2010-09-15 20:14:56 -04:00
Colin Walters bf2a7ee1b6 introspection: Only use 0.9.3 API 2010-09-15 15:07:58 -04:00
Petr Kovar 8e72e9a7a0 Update Czech translation 2010-09-15 20:31:29 +02:00
Petr Kovar 67e6ac5af9 Update Czech translation 2010-09-15 20:01:47 +02:00
Matthias Clasen b9f66d9197 Add docs for new API 2010-09-15 13:52:52 -04:00
Matthias Clasen 3e91238071 Add new api to gtk.symbols 2010-09-15 13:49:00 -04:00
Matthias Clasen 38e09dcbb1 Use gint instead of in for local consistency 2010-09-15 13:22:51 -04:00
Tristan Van Berkom 896e249e8f Added a default size of a magic number to testwrapbox.c
This was added to the test only for the sake of making it
easier to reproduce a bug with scrolled windows (bug 629778).

Expected behaviour: The vertical scrollbar should dissapear as soon
as the required height for the full allocation width (without any
vertical scrollbar) is small enough to not need a scrollbar.
2010-09-16 01:41:53 +09:00
Sebastian Dröge 560ca1eaad gdk: Only use XComposite if it is available
Fixes build if it isn't available. Bug #629748.
2010-09-15 16:42:57 +02:00
Tor Lillqvist 57e0b9a979 Fix build on Windows
No idea of the widget embedding crack has worked in recent versions,
even less now. But at least it now compiles.
2010-09-15 14:19:40 +03:00
Tristan Van Berkom 1110375f24 spinner: Dont inherit from GtkDrawingArea part 2.
Seems commit 7b42d4feda makes
GtkSpinner a direct subclass of GtkWidget but forgets to
update the header file to include gtkwidget.h instead and
declare the instance and class structures properly (assuming
this was just a missed file in the commit).
2010-09-15 16:52:29 +09:00
Javier Jardón f5a06df3dc spinner: timeout should add/remove in map/unmap, not realize/unrealize.
Otherwise hiding the spinner won't stop it
2010-09-15 04:00:55 +02:00
Javier Jardón 8345760fdb gtkentry: remove unnneded check in map/unmap functions 2010-09-15 03:28:24 +02:00
Javier Jardón e3a8e29a6c Add deprecation guards for gtk_widget_size_request() 2010-09-15 03:14:34 +02:00
Javier Jardón 15d46dd866 demos: Use gtk_size_request_get_size() instead gtk_widget_size_request() 2010-09-15 03:14:34 +02:00
Javier Jardón b140884fec Use gtk_size_request_get_size() instead deprecated gtk_widget_size_request()
Fixes https://bugzilla.gnome.org/show_bug.cgi?id=629598

Signed-off-by: Javier Jardón <jjardon@gnome.org>
Signed-off-by: Tristan Van Berkom <tristanvb@openismus.com>
2010-09-15 03:02:58 +02:00
Christian Kirbach a18e2370bf [l10n] Updated German translation 2010-09-14 23:38:07 +02:00
Tristan Van Berkom 2ee532645f Adjusted new documentation for GtkSizeGroup. 2010-09-15 04:51:36 +09:00
Tristan Van Berkom 266476d32b Added documentation to gtksizegroup.sgml explaining what happens with height-for-width widgets.
When grouping height-for-width trading widgets (wrapping labels for instance)
vertically; the height for the minimum width will always be used for the entire
group... this patch warns about this in the docs.
2010-09-15 04:04:02 +09:00
Tristan Van Berkom 8bfb1e0ab8 Fixed GtkSizeGroups to adjust both minimum and natural requisitions
Originally the GtkSizeRequestIface patches left GtkSizeGroup working
only by bumping the minimum sizes - this commit fixes size groups to take
both minimum and natural requests into account.
2010-09-15 04:04:02 +09:00
Javier Jardón ab4ba69cc8 Add deprecation guards for gtk_cell_view_get_size_of_row() 2010-09-14 20:40:34 +02:00
Benjamin Otte 7b42d4feda spinner: Don't inherit from drawing area
A drawing area is not meant to be subclassed from. It also doesn't
provide any feature a spinner would need either.
2010-09-14 01:28:01 +02:00
Benjamin Otte 032d3f0ada spinner: Implement the size request interface
Doing size requests in expose is broken.
2010-09-14 01:25:07 +02:00
Benjamin Otte c22b80949d spinner: Move G_DEFINE_TYPE() below function definitions
Also remove redundant double definition.
2010-09-14 01:19:48 +02:00
Benjamin Otte 419e1548ab wrapbox: Lookie, an unused variable 2010-09-14 01:17:17 +02:00
Benjamin Otte 5ba6295a10 spinner: Define desired size at top of file
No magic numbers in the code please
2010-09-14 01:09:53 +02:00
Matthias Clasen ff29972a48 GtkWrapBox: let GtkContainer handle border width 2010-09-13 18:47:59 -04:00
Matthias Clasen b64e91adf0 Remove fill options from GtkWrapBox
GtkWidget alignment properties make this unnecessary in new containers.
2010-09-13 18:47:59 -04:00
Matthias Clasen 0e484a83d1 Remove padding from GtkWrapBox
GtkWidget margins make this unnecessary in new containers.
2010-09-13 18:47:58 -04:00
Matthias Clasen 8204fe6036 GtkBox: let GtkContainer handle border width 2010-09-13 18:47:58 -04:00
Javier Jardón 97ffc36540 Add deprecation guards for gtk_widget_get_child_requisition() 2010-09-13 22:37:11 +02:00
Javier Jardón 450beef2a2 demos: Do not use deprecated gtk_widget_get_child_requisition()
Use gtk_size_request_get_size() instead
2010-09-13 22:37:11 +02:00
Milan Bouchet-Valat e02252cdd6 bgo#486839 - Fix path bar size group in the file chooser
Since the location button is hidden in save mode, we need to add the
path bar to the size group too. The location button still has to be in
the group though, because it's larger than the path bar (when
shown). Instead of using the recent/search icons, add their hboxes so
that themed widget spacings don't introduce variations.
2010-09-13 14:57:23 -05:00
Javier Jardón 9e81022bf6 Use gtk_size_request_get_size() instead deprecated gtk_widget_get_child_requisition()
Fixes https://bugzilla.gnome.org/show_bug.cgi?id=629177
2010-09-13 21:26:01 +02:00
Tristan Van Berkom 153bfacde0 Fixed GtkWrapBox to allocate variable row AND column heights when in ALIGNED mode
With this new approach at request and allocate time, the average child size
is used to determine a good guess at how many columns will fit the box
width; afterwards extra columns are appended and checked to fit.
Then the row heights are calculated based on height-for-width of each
child in the row which now may have individual widths.
2010-09-14 02:32:36 +09:00
Tristan Van Berkom 96c3858b21 Make testwrapbox scrolled window scrollbars automatic.
Did this in the hope to reproduce infinite recursion bugs
with height-for-width in scrolled windows (see complex bgo #611740
for reference for now).
2010-09-14 02:32:36 +09:00
Tristan Van Berkom a79637f081 Changed GtkWrapBox code to avoid a growing GArray of a known size. 2010-09-14 02:32:36 +09:00
Adel Gadllah 85ae875dcb [GdkWindowCache] Don't ignore the CompositeOverlayWindow
Add the composite overlay window to the cache, as this can be a reasonable Xdnd proxy as well.

This is only done when the screen is composited in order to avoid mapping
the COW. We assume that the CM is using the COW (which is true for pretty
much any CM currently in use).

https://bugzilla.gnome.org/show_bug.cgi?id=601731
2010-09-13 18:20:22 +02:00
Kristian Rietveld a79d6676ac Update gtkstyle.c to account for removal of row-ending-details
The detail strings now have more "detail" by default, so gtkstyle.c
needed to be updated to properly handle this.  Tests like testtreeview,
testtreesort now have proper background drawing again.

This strncmp trick was the best I could think of so quickly, if anybody
has an idea to do this in a better way, let me know.
2010-09-13 17:13:21 +02:00
Kristian Rietveld ecaa37529c Mark declaration of symbol _gtk_text_unknown_char_utf8 as extern
So that the symbol is not re-created each time the header is included.
The symbol is defined in gtktexttypes.c already.
2010-09-13 16:47:14 +02:00
Kristian Rietveld 31cd439385 Use accessor functions to access GtkWidget 2010-09-13 16:39:55 +02:00
Kristian Rietveld 0fc5433753 Update for GDK key name changes 2010-09-13 16:27:08 +02:00
Kristian Rietveld 234d750bb3 Update Quartz backend for GDK key name changes 2010-09-13 16:26:02 +02:00
Takayuki KUSANO d93ab58829 Updated Japanese translation. 2010-09-13 22:19:59 +09:00
Havoc Pennington 1dc9451b57 Add padding and alignment tests to testadjustsize.c 2010-09-12 21:47:10 -04:00
Havoc Pennington 474f80442a Add margin and alignment properties to GtkWidget
h-align = START,END,CENTER,FILL
v-align = START,END,CENTER,FILL
margin-left,right,top,bottom
margin

These should obsolete all such similar properties on
layout containers, GtkMisc, GtkAlignment, GtkContainer::border-width

Margin is outside the size request.
If margin were not outside the set_size_request() it would not work the
same way as container-supplied (child property) padding.

Conceptually set_size_request() forces the value from the subclass
(the original unadjusted request) and then we go on to adjust
the request further by adding the margin.
2010-09-12 21:47:10 -04:00
Havoc Pennington 85735112d7 GtkButton: let GtkContainer handle border width 2010-09-12 21:47:10 -04:00
Havoc Pennington daebca19da add gtk_container_class_handle_border_width() so subclasses can ignore border_width
A subclass calls gtk_container_class_handle_border_width()
in its class_init

This marks the subclass as expecting GtkContainer to deal with
border width automatically, which GtkContainer then does.
2010-09-12 21:47:10 -04:00
Havoc Pennington dc1940e99e Add testadjustsize test, to test new adjust size methods and related features
This will test size adjust, and interactions with other padding and border
2010-09-12 21:47:10 -04:00
Havoc Pennington cd2a19a68d GtkWidget: add adjust_size_request adjust_size_allocation virtual funcs
Use these new methods to handle set_size_request (aka aux_info)
inside gtkwidget.c, instead of having external code mess with it.

The virtual functions can be used for other purposes in the
future. For example, GtkContainer::border_width could be
automatically implemented for all container subclasses.
2010-09-12 21:47:10 -04:00
Havoc Pennington 9debfe243f Use _gtk_widget_get_aux_info_or_defaults() when possible in gtkwidget.c
Did not update uses in other files because the plan is to
get rid of those other uses anyhow. So don't want to make
this function available in the header.
2010-09-12 21:47:10 -04:00
Havoc Pennington cf68c2636a add _gtk_widget_get_aux_info_or_defaults()
This is better than peeking aux info then testing != NULL
in several ways:
- it returns const aux info so if we don't create we can't write
- it ensures that the default we assume if aux_info is NULL is
  the same as the default we set if we've created the aux info
- it avoids typing in != NULL checks
2010-09-12 21:47:10 -04:00
Havoc Pennington c29f0a1392 Fix more SizeRequest implementations to avoid recursive calls to wrapper API
GtkFrame, GtkComboBox, GtkExpander, GtkMenu, GtkWrapBox

These are all the examples I could find so far.

https://bugzilla.gnome.org/show_bug.cgi?id=628829
2010-09-12 21:47:10 -04:00
Havoc Pennington 8960d64cc6 Warn about recursively calling size req wrappers on the same object and orientation
We are not re-entrant and there is no reason for widgets to
do this, most likely they'll just get unexpected bugs because
the wrappers may modify the request.

Computing the request should logically rely only on the
widget itself, not on any adjustments caused by set_size_request,
size groups, and so forth.

https://bugzilla.gnome.org/show_bug.cgi?id=628829
2010-09-12 21:47:09 -04:00
Havoc Pennington cf6eb47758 default impls of width_for_height,hfw should chain directly not use wrapper API
In GtkBin and GtkWidget we tried to provide handy defaults that
call get_width if there's no get_width_for_height and
get_height for get_height_for_width.

However, they used the wrapper API on GtkSizeRequest instead of
chaining directly to the other method implementation.

This could result in all kinds of surprising behavior, for example,
get_width_for_height() would now already include the effects of set_size_request().

If nothing else it's inefficient. But it's just conceptually wrong,
because to chain to another implementation, we should call the other
implementation, not call a wrapper around the other implementation
(when we're already inside a previous invocation of the wrapper,
i.e. compute_size_for_orientation() ends up reinvoking itself
in the same orientation on the same object which it pretty
likely isn't intending to do)

https://bugzilla.gnome.org/show_bug.cgi?id=628829
2010-09-12 21:47:09 -04:00
Havoc Pennington b3079c0d18 Use gint16 for GtkBorder
32K of border ought to be enough for any pixel dimensions. At least
until screens are so huge we start using doubles.

This saves a nice 64 bits of space when we have a GtkBorder
stored somewhere.

Signed integers are used to avoid surprising unsigned math
issues. Just search GTK's whole git log from inception
for "unsigned" if you want to find any number of commits
fixing signed/unsigned bugs.

https://bugzilla.gnome.org/show_bug.cgi?id=629387
2010-09-12 21:47:09 -04:00
Javier Jardón 7e520d908a Fix some compilation warnings
GScanner token field is declared as GTokenType instead a guint
See Glib bug: https://bugzilla.gnome.org/show_bug.cgi?id=627890

Fixes https://bugzilla.gnome.org/show_bug.cgi?id=627962
2010-09-13 03:28:36 +02:00
Javier Jardón e3fafd7512 docs: Fix gdk_display_get_core_pointer() docs
Point to gdk_device_manager_get_client_pointer(),
not gdk_display_get_client_pointer().
2010-09-13 02:48:21 +02:00
Benjamin Otte 66e860b5d1 style: Fix drawing of insensitive text
When writing the original code I erroneously assumed that the current
point of the cairo context would be saved by cairo_save/restore(), but
of course the current point is part of the path and therefor isn't
saved.

Also do a cairo_new_path() before rendering any text so that we are sure
the text ends up at the right spot.
2010-09-12 16:00:05 +02:00
Matthias Clasen 08dd02fe25 Don't use g_idle_add to schedule idles in GDK
We need to use gdk_threads_add_idle, in order to keep GDK code
under the GDK lock.

Bug 629277
2010-09-10 22:32:44 -04:00
Javier Jardón d3661589f4 gtk/gtkwidget.c: Use accessor functions to access GtkWindowGroup 2010-09-11 04:25:41 +02:00
Javier Jardón ab248d7ca3 Revert "gtk/gtkmain.c: Use accessor functions to access GtkWindowGroup"
This reverts commit 65b9fc3e5b.
2010-09-11 04:24:54 +02:00
Javier Jardón 65b9fc3e5b gtk/gtkmain.c: Use accessor functions to access GtkWindowGroup 2010-09-11 03:34:01 +02:00
Javier Jardón 6eae25e0b0 GtkWindow: move public members to private structure
Signed-off-by: Christian Dywan <christian@twotoasts.de>
2010-09-11 02:22:28 +02:00
Matthias Clasen 402e3bed47 Bump version to 2.90.8 2010-09-10 12:31:15 -04:00
Matthias Clasen 056ec835cc Include gdkkeysyms.h in gdk.h
Followup to bug 629093
2010-09-10 11:08:18 -04:00
Mike Gorse e356769f33 Gail: Remove gail_cell_type_add_action_interface, as it no longer does anything 2010-09-10 09:46:34 -04:00
Mike Gorse da0975d5f2 Gail: Take fill/page size into account when returning a range's maximum value 2010-09-10 06:09:41 -04:00
Kjartan Maraas 6460fb6b3e Updated Norwegian bokmål translation 2010-09-10 09:53:58 +02:00
Matthias Clasen e2a492cf80 Some more updates 2010-09-09 22:33:56 -04:00
Matthias Clasen 36437a635d Update potfiles 2010-09-09 22:17:27 -04:00
Matthias Clasen 149b84dacf Really stop exporting text-related variables 2010-09-09 22:11:36 -04:00
Matthias Clasen 95eb4a868e Remove GDK_DISPLAY() usage 2010-09-09 21:55:28 -04:00
Matthias Clasen 2a27c90479 Update NEWS for 2.90.7 2010-09-09 19:50:24 -04:00
Matthias Clasen 0dcaad3a85 Drop the gdk_display variable from gdk
This was the last exported variable; it wasn't multihead safe,
and there's easy replacement with gdk_display_get_default().
Also drop the GDK_DISPLAY() macro which was just a wrapper around
the variable.
2010-09-09 19:46:41 -04:00
Matthias Clasen 001d16cb87 Fix the docs build after GtkItem removal 2010-09-09 16:11:31 -04:00
Tristan Van Berkom a6a036ce22 Adding note to docs of gtk_widget_set_window()
gtk_widget_set_window() does not add a reference to the
owned window... this is an exception to most gtk_foo_set_bar()
functions where as it acts as if it were named gtk_widget_take_window().

Adding note to the docs to avoid people giving the window to the
widget and naturally proceeding to unref the window.
2010-09-10 03:25:21 +09:00
Benjamin Otte 6624da6393 widget: Fix SEGV when no focus widget exists 2010-09-09 18:10:04 +02:00
Benjamin Otte b0b8393f99 gail: Add missing include 2010-09-09 15:46:55 +02:00
Tor Lillqvist e748334327 Avoid potential DLL hijacking in Wintab code
Load Wintab32.dll from an absolute path. A proper Wintab32.dll, if
present, should be in the Windows system directory, so load it from
there.
2010-09-09 15:44:12 +03:00
Tor Lillqvist 7464a9ca08 Use accessor functions 2010-09-09 15:02:33 +03:00
Tor Lillqvist 0c662ecb9a Fix gail build 2010-09-09 15:01:36 +03:00
Tor Lillqvist ceca2ff10c Adapt to the GDK_KEY changes 2010-09-09 14:35:20 +03:00
Tristan Van Berkom 73ea777c33 Fixed GtkTextView & GtkIconView to consult it's true previous size request
Fixed issues in my previous patch for bug 626939 removing GtkRequisition
cache: these widgets monitor the previous requested size and decide whether
to queue a resize when the content changes based on it's prior request.
2010-09-09 17:19:18 +09:00
Tristan Van Berkom 843be48572 Moved GtkSizeRequest cache to GtkWidget->priv
Now that we have a private data installed directly on
the GtkWidget instance it makes no sense to cache the size
requests on widget qdata. This change will generally make
GTK+ memory less fragmented as well as significantly speed
up the size request process.
2010-09-09 17:19:18 +09:00
Tor Lillqvist f76fddb8a7 Use accessor functions in Win32-only code 2010-09-09 11:09:55 +03:00
Tor Lillqvist dd36afc207 Don't use the same name for a function that used to be a variable
Rename the gtk_major_version() etc functions I introduced yesterday to
start with gtk_get. Avoids misleading results in client programs whose
developers that don't notice the change or the compiler warnings, and
when recompiling against gtk3 then use the function addresses as the
version numbers.
2010-09-09 11:06:26 +03:00
Matthias Clasen 91d0728dfa Fix build of gail after GtkItem removal 2010-09-09 00:51:08 -04:00
Matthias Clasen 3bd93e5bfd Remove GtkItem
With the demise of GtkList and GtkTree, it has GtkMenuItem as sole
derived class, and is not really adding any value as a separate class.
Its few useful features have been merged into GtkMenuItem.

Bug 629104
2010-09-08 23:38:09 -04:00
Javier Jardón 72ac2175e2 gtk/gtkhandlebox.c: Do not use gdk_window_get_deskrelative_origin()
This completes commit bd277fad50
2010-09-09 02:26:43 +02:00
Colin Walters e08c43faf4 porting guide: Update to mention GDK_KEY_ transition 2010-09-08 18:51:44 -04:00
Colin Walters 913cdf3be7 GDK: Prefix key names with KEY_
The keysyms create a lot of potential namespace conflicts for
C, and are especially problematic for introspection, where we take
constants into the namespace, so GDK_Display conflicts with GdkDisplay.

For C application compatiblity, add gdkkeysyms-compat.h which uses
the old names.

Just one user in GTK+ continues to use gdkkeysyms-compat.h, which is
the gtkimcontextsimple.c, since porting that requires porting more
custom Perl code.
2010-09-08 18:51:44 -04:00
Colin Walters 03c19e37af gdk: Update gdkkeysyms.h
In preparation for adding a namespace prefix for introspection.
2010-09-08 18:51:44 -04:00
Javier Jardón bd277fad50 Remove deprecated gdk_window_get_deskrelative_origin() and its implementations 2010-09-09 00:50:46 +02:00
Tor Lillqvist 3dda0adf76 Drop GDK_DEBUG_GC and _IMAGE as GDK doesn't do that any more 2010-09-09 01:09:49 +03:00
Mike Gorse 8fb5bc2583 Remove a duplicate variable
Bug#629110: gtk_spinner_accessible_get_type always returns null
2010-09-08 17:55:28 -04:00
Javier Jardón 1b0d2fcd51 Use G_CALLBACK() instead deprecated GTK_SIGNAL_FUNC() 2010-09-08 23:42:25 +02:00
Javier Jardón 016093d007 docs: Remove GtkFileSelection deprecated docs 2010-09-08 22:58:03 +02:00
Javier Jardón a76d198508 GtkWidget: Move public members to private structure 2010-09-08 21:28:16 +02:00
Javier Jardón efaed1b8f1 gtk/gtknotebook.c: use accessor functions to access GtkWidget 2010-09-08 21:13:04 +02:00
Javier Jardón f8cfb895ed gtk/gtkarrow.c: use accessor functions to access GtkWidget 2010-09-08 21:13:04 +02:00
Javier Jardón d9e7680735 gtk/gtkpathbar.c: use accessor functions to access GtkWidget 2010-09-08 21:13:04 +02:00
Javier Jardón a338d5dea5 gtk/gtkruler.c: use accessor functions to access GtkWidget 2010-09-08 21:13:04 +02:00
Javier Jardón e4dc454f59 gtk/gtkseparator.c: use accessor functions to access GtkWidget 2010-09-08 21:13:04 +02:00
Javier Jardón 50ef420378 gtk/gtkhandlebox.c: use accessor functions to access GtkWidget 2010-09-08 21:13:04 +02:00
Javier Jardón 89e8f79f07 gtk/gtkiconview.c: use accessor functions to access GtkWidget 2010-09-08 21:13:04 +02:00
Javier Jardón a48d28848e gtk/gtkimage.c: use accessor functions to access GtkWidget 2010-09-08 21:13:03 +02:00
Javier Jardón ec2f2c3daf gtk/gtkmenu.c: use accessor functions to access GtkWidget 2010-09-08 21:13:03 +02:00
Javier Jardón 0993bc4d1c gtk/gtkmisc.c: use accessor functions to access GtkWidget 2010-09-08 21:13:03 +02:00
Javier Jardón 29044f0f0e gtk/gtkspinbutton.c: use accessor functions to access GtkWidget 2010-09-08 21:13:03 +02:00
Javier Jardón 5533264958 gtk/gtktextview.c: use accessor functions to access GtkWidget 2010-09-08 21:13:03 +02:00
Javier Jardón d05d713068 gtk/gtktreeview.c: use accessor functions to access GtkWidget 2010-09-08 21:13:03 +02:00
Javier Jardón 2d0a655201 gtk/gtkwindow.c: Fix warning
Cast to GtkSizeRequest

This was added in
commit b654afcb48
2010-09-08 21:13:03 +02:00
Tor Lillqvist 87141cf4c8 Get rid of the rest of variables exported from libgtk
Especially the gtk_*_type ones in gtktexttypes.h were mentioned in
gtk.symbols presumably by accident. That header isn't even installed,
so no way can they be supposed to be public.

gtk_text_attr_appearance_type is from the installed but "semi-private"
gtktextlayout.h, so drop that one too from gtk.symbols for now.

The use of gtk_text_unknown_char_utf8 is bit of a mess. Code in a few
files knew implicitly that it is three bytes. Define a symbolic name
for the length of it instead. Add an exported function
gtk_text_unknown_char_utf8_gtk_tests_only() that returns a pointer to
it just for the sake of gtk/tests/textbuffer.c. Prefix the variable
with an underscore.

I doubt the usefulness of the test_utf8() in textbuffer.c. If it could
be dropped, gtk_text_unknown_char_utf8_gtk_tests_only() could be
dropped, too.
2010-09-08 21:31:34 +03:00
Tor Lillqvist 801875b805 Replace gtk_debug_flags with getter and setter functions
Preferrably should be made just into a local variable for libgtk like
_gdk_debug_flags for libgdk. But for now used by
gtk/tests/textbuffer.c and modules/printbackends/cups/gtkprintbackendcups.c.
2010-09-08 21:31:34 +03:00
Tor Lillqvist 2ab562a6f7 Remove also the docs for the gdk_threads_mutex variable 2010-09-08 21:31:33 +03:00
Tor Lillqvist cb24bcc613 Turn the gtk version and age variables into functions
Having variables exported from a DLL is slightly painful and
potentially error-prone on Windows, so let's try get rid of them now
when we can. Starting with these.
2010-09-08 21:31:33 +03:00
Javier Jardón b654afcb48 gtk/gtkwindow.c: Use gtk_size_request_get_size() instead gtk_widget_get_requisition() 2010-09-08 19:40:51 +02:00
Tristan Van Berkom 9934007420 Completely removed requisition cache from GtkWidget instance structure.
Since we have a new mechanism for requesting sizes: GtkSizeRequestIface;
it makes no sense to maintain this cache on the GtkWidget structure...
removing the requisition cache however does not break the old "size-request"
signal which is there for backwards compatability reasons.

In any case widget->requisition should not have been accessed,
gtk_widget_get_child_requisition() would have been the correct way
to consult the cache.

This commit also deprecates the newly added gtk_widget_get_requisition()
API and makes it fallback on gtk_size_request_get_size().
2010-09-08 18:50:24 +02:00
Javier Jardón 4e6a665e61 tests: Use gtk_widget_set_size_request() instead gtk_widget_set_usize() 2010-09-08 18:39:36 +02:00
Javier Jardón bc366cef52 gtknotebook: Do not mention deprecated API 2010-09-08 17:46:11 +02:00
Javier Jardón eb81216e32 demos: Do not use deprecated API 2010-09-08 17:45:51 +02:00
Javier Jardón 4a5e0a35b9 gtksocket: Remove mention to gtk_socket_steal() deprecated function 2010-09-08 17:14:37 +02:00
Javier Jardón ca3348f8f1 Do not use deprecated API in docs and examples
gtk_calendar_display_options() was deprecated and removed. Use
gtk_calendar_set_display_options() instead
2010-09-08 17:10:37 +02:00
Tor Lillqvist 3963d5aa76 Remove variables from the platform-independent GDK API
gdk_threads_mutex, gdk_threads_lock and gdk_threads_unlock are removed
from public API. gdk_threads_mutex was deprecated already. Instead of
using gdk_threads_lock and _unlock one was presumably supposed to use
the GDK_THREADS_ENTER and _LEAVE macros, which now simply call the
corresponding gdk_threads_enter() and _leave() functions.

Remove he dllimport/dllexport ugliness for GDK for Windows.

There is still a gdk_display variable being exported by the X11
backend.
2010-09-08 15:59:09 +03:00
Colin Walters 319bc22c5c gtk.symbols: Update expected ABI 2010-09-07 14:17:10 -04:00
Owen W. Taylor d04e557370 Fix annotations for gdk_window_get_device_position()
Add (out) and (transfer none) as appropriate
2010-09-07 14:03:18 -04:00
John (J5) Palmieri c78a23bdca add annotations for tranfer and scope so that methods are exported by GI 2010-09-07 13:50:40 -04:00
John (J5) Palmieri eeaf576316 add array annotation to gtk_builder_add_objects_from_string 2010-09-07 12:06:29 -04:00
John (J5) Palmieri 8a210673fb add gtk_radio_button_join_group method for bindings
* this mirrors the committed change for gtk_radio_action_join_group in
  commit 85b53969b2
* Due to object ownership issues it is impossible to correctly use
  get_group/set_group from a GI binding
* join_group is safer because at the binding level it works with individual
  GtkRadioButton objects and not with the list of objects that gets
  modified in the library

https://bugzilla.gnome.org/show_bug.cgi?id=628935
2010-09-07 10:41:40 -04:00
Tristan Van Berkom 278957a5a4 Removed x/y/x_set/y_set from GtkWidgetAuxInfo
These members of GtkWidgetAuxData can no longer be set after
the removal of deprecated gtk_widget_set_uposition(), now removed
these members completely and removed the access to them from
gtk_widget_size_allocate().
2010-09-07 16:21:44 +09:00
Tristan Van Berkom d5278b5994 Removed _gtk_window_reposition()
_gtk_window_reposition() was only some extra confusing code, internally
it only calls the public API gtk_window_move()... replaced calls to
_gtk_window_reposition() with direct calls to gtk_window_move() and
removed the redundant internal API (probably there only for some historical
reason).
2010-09-07 15:45:15 +09:00
Havoc Pennington c50db9c208 Use a bitfield for Widget::private_flags, ::state, ::saved_state
This recovers 10 bits, since state and saved_state as uint8 both
wasted 5 bits. Now we can add 10 more flags.

Also, a possible future patch could just do 1-bit bitfields
for the private flags instead of using manual bit twiddling.

https://bugzilla.gnome.org/show_bug.cgi?id=628884
2010-09-07 00:13:11 -04:00
Matthias Clasen d5c2cb7bcb Avoid segfault on xkbless systems
This was reported in bug 628932 to cause problems on VNC.
2010-09-07 00:10:26 -04:00
Duarte Loreto 87b192773c Updated Portuguese translation 2010-09-07 00:51:47 +01:00
Klemen Košir fc5b39a4b8 Updated Slovenian translation 2010-09-06 16:47:25 +02:00
Baurzhan Muftakhidinov 134f9774dd Updated Kazakh translation 2010-09-06 10:29:49 +06:00
Matthias Clasen 3c5f9fd1a2 Remove use of ::has-separator property 2010-09-06 00:26:17 -04:00
Matthias Clasen 2f966e8418 Remove some unused enums
The GtkAnchorType and GtkVisibility enums are not used anywhere,
so remove them.
2010-09-05 23:55:47 -04:00
Havoc Pennington 88a90b8abb Warn if a widget requests minimum size > natural size
Since this makes no sense and there's no reason we should
have to check for it elsewhere just in case some widget is
busted.

https://bugzilla.gnome.org/show_bug.cgi?id=628808
2010-09-05 21:46:22 -04:00
Havoc Pennington d7d940c71e Add more "reserved for expansion" fields to GtkWidgetClass
Only 3 were left. 3.x cycle may need more.

https://bugzilla.gnome.org/show_bug.cgi?id=628807
2010-09-05 21:42:35 -04:00
Claude Paroz 956a3f53e1 Updated French translation 2010-09-04 23:21:19 +02:00
Murray Cumming 08ddea5069 GtkStatusIcon: Remove get/set_blinking() declarations from header.
This was apparently forgotten in
commit 18b47b6cd0 .
2010-09-04 13:18:09 +02:00
Martin Schlemmer e6da33a302 MS Windows engine: draw elements in the right place.
Work in progress, still remains to be solved the problem of clipping.
2010-09-03 22:19:39 +02:00
Matej Urbančič 3b63ef0ac6 Updated Slovenian translation 2010-09-03 19:16:38 +02:00
Matthew Barnes bf3b5f785e Don't leak display name
Bug 628656 - _gdk_windowing_get_startup_notify_id memory leak

get_display_name() returns a newly allocated string, which was being fed
directory info a g_strdup_printf() call.
2010-09-03 12:48:50 -04:00
Benjamin Otte d8f3a162c8 style: Use gtk_widget_get_state() for the entry background
New code sets the entry background to GTK_STATE_ACTIVE when it has focus
and the active color in the default theme looks rather bad.
2010-09-03 17:14:17 +02:00
Mattias Põldaru 7e78999034 [l10n] Updated Estonian translation 2010-09-03 18:06:48 +03:00
Benjamin Otte 78ccc74879 entry: Use the same state for the flat box of text area and icons 2010-09-03 17:01:06 +02:00
Benjamin Otte 3fdb4f6069 x11: Unused variable 2010-09-03 13:39:24 +02:00
Benjamin Otte 9c2eca5b06 range: Unused variable 2010-09-03 13:39:10 +02:00
Benjamin Otte 3685db091d window: Use brackets to silence gcc 2010-09-03 13:38:55 +02:00
Benjamin Otte fc46f2ca2f tests: Remove all code relating to the blink menu item 2010-09-03 13:38:29 +02:00
Matthias Clasen 1be5f91491 Document --disable-Bsymbolic option 2010-09-02 22:56:41 -04:00
Matthias Clasen d095448be3 Remove unused --disable-visibility option 2010-09-02 22:56:15 -04:00
Tor Lillqvist f42814168c Just use TrackMouseEvent directly
TrackMouseEvent is present in user32.dll in all Windows versions we
support. No need to look it up dynamically. No need to fallback to
_TrackMouseEvent from comctrl32.dll.
2010-09-03 00:30:56 +03:00
Colin Walters 00ce32d940 gtk-demo: Drop use of GTK_DIALOG_NO_SEPARATOR
Commit d433a60611 dropped this API.
2010-09-02 16:48:45 -04:00
Klemen Košir 6aa846cc4d Updated Slovenian translation 2010-09-02 18:24:32 +02:00
Fridrich Štrba 03b6a9b6a0 Oops, make the MS Windows theme really compile. 2010-09-02 15:39:19 +02:00
Matthias Clasen 18b47b6cd0 Remove blinking from status icons
This feature was just a bad idea.
2010-09-02 09:37:06 -04:00
Matthias Clasen 46f15e7d68 Adapt docs to dialog api changes 2010-09-02 09:35:50 -04:00
Matthias Clasen 76b21033f9 Adapt tests to dialog api change 2010-09-02 09:31:54 -04:00
Matthias Clasen d433a60611 Remove separators from dialogs
It seems more reasonable to remove this feature than to keep fighting
off every separator that pops up by accident in a dialog.
2010-09-02 09:14:20 -04:00
Fridrich Štrba 97cd2500c3 Make the MS Windows engine compile again.
Nevertheless, it is not working and needs a lot of fixing before
it can be useful.
2010-09-02 15:04:14 +02:00
Matthias Clasen a60a933ca6 Update docs or GtkProgressBar api changes 2010-09-02 08:59:27 -04:00
Matthias Clasen ece148eec0 Remove ::state-hint use
This use of the property was overlooked when it was removed.
We now always behave as if state-hint == TRUE.
2010-09-02 08:59:27 -04:00
Matthias Clasen 55d5d3679e Table gymnastics 2010-09-02 08:59:26 -04:00
Tor Lillqvist 2994fa11fb Avoid potential DLL hijacking in ms-windows theme engine
Load uxtheme.dll from an absolute path. A proper uxtheme.dll, if
present, will always be in the Windows system directory, so load it
from there.
2010-09-02 14:45:59 +03:00
Fridrich Štrba e78851b928 Adapt to progressbar api change 2010-09-02 10:24:34 +02:00
Fridrich Štrba 31b709d08a Export one needed symbol 2010-09-02 10:24:34 +02:00
Tristan Van Berkom 68568cff66 Enhanced/Simplified GtkWrapBox api as per Havoc's comments.
Made an enum GtkWrapBoxPacking for the expand/fill horizontal/vertical
boolean options... changed xpadding/ypadding to be horizontal-padding
and vertical-padding for a more consistent api and better readablility.
2010-09-02 15:36:36 +09:00
Tristan Van Berkom c9ccc7551b Some api changes for GtkWrapBox
Ammended documentation for GTK_WRAP_BOX_SPREAD_EVEN and renamed
GTK_WRAP_BOX_SPREAD_BEGIN -> GTK_WRAP_BOX_SPREAD_START.
2010-09-02 14:22:55 +09:00
Tristan Van Berkom f2279d5e51 Fixed GtkNotebook to not consult GtkWidget->requisition directly
GtkNotebook was filling widget->requisition directly at "size-request"
time instead of filling in the *requsition argument, also (more importantly)
at size_allocate time GtkNotebook was consulting the action widget's
widget->requisition directly instead of safely calling
gtk_widget_get_child_requisition(). This commit closes bgo #628068.
2010-09-02 13:50:27 +09:00
Matthias Clasen 42a90aa00c Add information about progressbar migration
Add a section to the migration guide about GtkProgressBar.
Also, actually include the wrap box docs.
2010-09-02 00:05:32 -04:00
Matthias Clasen 6b5672c199 Remove now unused GtkProgressBarOrientation enum 2010-09-01 23:30:21 -04:00
Matthias Clasen 0ff6aedca0 Convert GtkCellRendererProgress to a GtkOrientable
And add an inverted property to it, too.
2010-09-01 23:27:00 -04:00
Matthias Clasen 3302f22da2 Adapt testgtk progressbar test to api changes 2010-09-01 23:26:19 -04:00
Matthias Clasen 4230f7998b Make GtkProgressBar implement GtkOrientable
This also means that gtk_progress_bar_[sg]et_orientation are
gone.
2010-09-01 23:25:22 -04:00
Matthias Clasen c3a19a4a14 Split the GtkProgressBar::orientation property
We splict the orientation property into a GtkOrientation and a
'inverted' boolean, the same way that GtkRange is set up.
2010-09-01 23:24:20 -04:00
Matthias Clasen e4af3782d3 Rename GtkIconView::orientation property
Rename the ::orientation property of GtkIconView to item-orientation,
which is both clearer and avoids the conflict with the orientation
property of GtkOrientable implementations.
2010-09-01 23:03:48 -04:00
Matthias Clasen 1956cf8d28 Remove GtkRange::activate-slider
This was a style property to let theme engines 'opt-in' to more
correct behaviour while maintaining compatibility with existing
themes. GTK+ 3 engines are expected to handle the more correct
behaviour.
2010-09-01 22:09:44 -04:00
Matthias Clasen d28af9cbb9 Remove GtkRange::stepper-position-details
This was a style property to let theme engines 'opt-in' to more
correct behaviour while maintaining compatibility with existing
themes. GTK+ 3 engines are expected to handle the more correct
behaviour.
2010-09-01 21:48:44 -04:00
Matthias Clasen 658f99b8ee Remove GtkRange::trough-side-details
This was a style property to let theme engines 'opt-in' to more
correct behaviour while maintaining compatibility with existing
themes. GTK+ 3 engines are expected to handle the more correct
behaviour.
2010-09-01 21:30:47 -04:00
Matthias Clasen 095fb1afe4 Remove GtkTreeView::row-ending-details
This was a style property to let theme engines 'opt-in' to more
    correct behaviour while maintaining compatibility with existing
    themes. GTK+ 3 engines are expected to handle the more correct
    behaviour.
2010-09-01 20:58:39 -04:00
Matthias Clasen 399580f9e1 Remove GtkEntry::state-hint
This was a style property to let theme engines 'opt-in' to more
correct behaviour while maintaining compatibility with existing
themes. GTK+ 3 engines are expected to handle the more correct
behaviour.
2010-09-01 20:21:21 -04:00
Matthias Clasen 299454b7ed Update NEWS for 2.90.7 2010-09-01 20:09:10 -04:00
Matthias Clasen 15ea566813 Wrap box assimilation
Some coding style cleanups, rename Priv to Private, add docs
2010-09-01 20:03:30 -04:00
Matthias Clasen 7670b13d19 Update GtkButtonBox docs 2010-09-01 19:15:59 -04:00
Javier Jardón 6e5d65c9af gtkscale: move documentation to inline comments 2010-09-01 20:37:39 +02:00
Javier Jardón 5484211c90 gtktexttagtable: move documentation to inline comments 2010-09-01 20:37:39 +02:00
Javier Jardón 7eadf45888 gtktypeutils: move documentation to inline comments 2010-09-01 20:37:39 +02:00
Javier Jardón a47e5483b6 gtkimcontextsimple: move documentation to inline comments 2010-09-01 20:37:39 +02:00
Javier Jardón 3a752e03a8 gtkimmulticontext: move documentation to inline comments 2010-09-01 20:37:39 +02:00
Colin Walters 787df491f3 Add correct namespace prefix to ColorSelectionPrivate
gobject-introspection is now more strict about garbage in public headers.
2010-09-01 13:16:37 -04:00
Carl-Anton Ingmarsson 38fad43129 docs: Further fix GtkStock documentation
Some icons were left out from the
commit 9688665334

https://bugzilla.gnome.org/show_bug.cgi?id=628308

Signed-off-by: Javier Jardón <jjardon@gnome.org>
2010-09-01 17:43:59 +02:00
Stefan Kost 9074f74c6f container: use priv in last commit
container->focus_child to container->priv->focus_child
2010-09-01 17:33:33 +03:00
Stefan Kost 94420f7110 widget: more details on gtk_widget_grab_focus docs
Tell that widget needs to be mapped and realized.
2010-09-01 16:59:00 +03:00
Stefan Kost 267a2156d8 container: clarify the docs
Hightlight more that focus_child is a container internal thing and suggest
what application developers most likely were looking for instead.
2010-09-01 16:59:00 +03:00
Stefan Kost b00b1c33a3 container: don't leak the focus_child ref count
gtk_conatiner_set_focus_child() takes a ref. Release the ref in _destroy().
Fixes #414712.
2010-09-01 16:59:00 +03:00
Matthias Clasen 9688665334 Fix GtkStock documentation
After the big icon rename, all the links in the docs have to
be updated, and we need to copy the right icons.
2010-09-01 00:14:45 -04:00
Colin Walters b04b1b2e84 introspection: Update to new scanner API
* Add --warn-all
* Drop unnecessary  of --strip-prefix; for GdkX11, use --symbol-prefix

https://bugzilla.gnome.org/show_bug.cgi?id=628160
2010-08-31 16:21:08 -04:00
Fridrich Štrba 5032cdf88f Porting MS Windows theme engine to cairo - Part 1: stippling 2010-08-31 18:05:41 +02:00
Fridrich Štrba 78dc2debc0 Porting the MS Windows theme engine to cairo - Part 2 rectangle and line drawing 2010-08-31 18:05:41 +02:00
Dirgita 34c6ea0307 Updated Indonesian translation 2010-08-31 21:38:52 +07:00
Dirgita 1810943d5d Updated Indonesian translation 2010-08-31 21:34:05 +07:00
Javier Jardón 213f8e2f1b gtk/gtkwindow: use accessor functions to access GtkWidget 2010-08-31 02:51:36 +02:00
Javier Jardón 1a980d0be6 gtk/gtkplug.c: Use accessor functions to access GtkWindow 2010-08-31 02:51:36 +02:00
Javier Jardón 304b1a1f56 Added _gtk_widget_get_wmclass() internal function
Needed by GtkPlug
2010-08-31 02:51:36 +02:00
Gabor Kelemen 6250627d9e Updated Hungarian translation 2010-08-31 02:28:25 +02:00
Gabor Kelemen 7879d5af11 Updated Hungarian translation 2010-08-31 02:26:03 +02:00
Javier Jardón cc06f3dde6 GtkScrolledWindow: move public members to private structure 2010-08-31 01:34:02 +02:00
Javier Jardón 8da741f955 Gail: use accessor functions to access GtkScrolledWindow 2010-08-31 01:34:02 +02:00
Szilárd Pfeiffer d8a90be370 Fixed minimum increment calculation of GailScaleButton.
Also implemented to use the adjustment to determine the current, minimum,
maximum values and mimimum increment just as the other widgets which have
adjustment.

Fixes https://bugzilla.gnome.org/show_bug.cgi?id=626710
2010-08-30 22:39:11 +02:00
Martin Schlemmer e14560cf1e [win32] Properly draw the menu separator for Windows Vista/7.
Also adds the bits for transparency.
2010-08-30 20:05:09 +02:00
Martin Schlemmer 8476d22dea [win32] Use pango_win32_font_description_from_logfontw() to get
the system font, instead of the code duplication.
2010-08-30 20:01:41 +02:00
Martin Schlemmer 04e241fd85 [win32] Fix some warnings related to type differences and unused variables 2010-08-30 19:58:19 +02:00
Tor Lillqvist 4491bdbb9d Drop Win32 DLL ABI compatibility cruft
No need for that any longer as we are changing DLL name.
2010-08-30 14:57:48 +03:00
Tristan Van Berkom 972f617b77 Fixed GtkToolPalette realize() vfunc.
It seems with latest GSEAL work for widget->window access a
call to gtk_widget_set_window() was missed (added the window
assignment and now the palette shows up in Glade again).
2010-08-30 18:25:14 +09:00
Tristan Van Berkom bbf38a8ebd Fixing email address in copyright header for testwrapbox test. 2010-08-30 18:24:41 +09:00
Philip Withnall ba158a24fe Miscellaneous property string fixes 2010-08-29 19:00:14 +01:00
Szilárd Pfeiffer 86851b7ad3 modules/other/gail/gailtogglebutton.c: Add/remove indeterminate state
GailToggleButton does not set/unset ATK_STATE_INDETERMINATE according to the
value of GtkToggleButton's inconsistent property.

Fixes https://bugzilla.gnome.org/show_bug.cgi?id=626537
2010-08-29 19:21:05 +02:00
Javier Jardón f84707d6f9 Add gtk_calendar_day_is_marked() function
The marked state of calendar day is not accessible

Fixes https://bugzilla.gnome.org/show_bug.cgi?id=627028
2010-08-29 19:14:24 +02:00
Daiki Ueno 6afa615690 Fix typo in GtkIMContextClass doc. 2010-08-29 19:01:30 +02:00
Милош Поповић a026b8227c Updated Serbian translation 2010-08-29 20:14:16 +02:00
Tor Lillqvist 87bf99dcc5 Fix Win32 build 2010-08-29 12:40:56 +03:00
Matthias Clasen 8d36170b8d Remove deprecated GTK_SELECTION_EXTENDED selection mode 2010-08-28 22:42:59 -04:00
Matthias Clasen 29aa3818a4 Remove deprecated text and text_length field in GtkEntry
These fields have been superseded by GtkEntryBuffer.
2010-08-28 22:27:36 -04:00
Matthias Clasen af8539bf11 Move deprectated menu enumerations to a private header
The GtkSubmenuDirection and GtkSubmenuPlacement enumerations
have been deprecated as public API for a while, but are still used
internally in the menu code. Move them to a private header. This
also prevents to generation of GObject boilerplate for these enums.
2010-08-28 21:24:11 -04:00
Matthias Clasen eb10e6b128 Remove the long deprecated GDK_WINDOW_DIALOG type.
This has been deprecated forever, and was just left in for
compatibility reasons.
2010-08-28 20:10:02 -04:00
Matthias Clasen 00438fea3d Declare the GtkWidget::window-dragging style property as readonly
This is how we generally declare style properties, and declaring
this one r/w was just an oversight.
2010-08-28 20:08:14 -04:00
Matthias Clasen 5d6b21e7b2 Remove long-deprecated page-horizontally signal
This signal has been superseded by GTK_MOVEMENT_HORIZONTAL_PAGES
long ago. This breaks the GtkTextView ABI.
2010-08-28 19:26:42 -04:00
Matthias Clasen d2d344a531 Remove a workaround for old toolbar api
The old, deprecated toolbar api has been removed, so this workaround
is no longer necessary.
2010-08-28 19:11:23 -04:00
Matthias Clasen 6dd4f32f37 Remove deprecated GTK_CALENDAR_WEEK_START_MONDAY option
This has been deprecated and ignored for a long time.
2010-08-28 19:09:21 -04:00
Matthias Clasen d45d970144 Remove deprecated 'shadow' properties in GtkFrame and GtkHandleBox 2010-08-28 17:20:53 -04:00
Philip Withnall f733ab0e75 Update British English translation 2010-08-28 15:58:56 +01:00
Yaron Shahrabani 34a8213b0f Updated Hebrew translation. 2010-08-28 10:27:28 +03: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
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 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
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
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
889 changed files with 88721 additions and 94029 deletions
+4 -2
View File
@@ -5,9 +5,11 @@ GTK+ requires the following packages:
- The GLib, Pango, GdkPixbuf, ATK and cairo libraries, available at
the same location as GTK+. GTK+ @GTK_VERSION@ requires at least
GLib 2.23.6, Pango 1.20, GdkPixbuf 2.21.0 ATK 1.29.2 and cairo 1.6.0.
GLib @GLIB_REQUIRED_VERSION@, Pango @PANGO_REQUIRED_VERSION@,
GdkPixbuf @GDK_PIXBUF_REQUIRED_VERSION@, ATK @ATK_REQUIRED_VERSION@
and cairo @CAIRO_REQUIRED_VERSION@.
- gobject-introspection 0.6.7 or newer.
- gobject-introspection 0.9.3 or newer.
Simple install procedure
========================
+110
View File
@@ -1,3 +1,113 @@
Overview of Changes from GTK+ 2.90.6 to 2.90.7
==============================================
* Various deprecated APIs have been removed:
- the GtkWidget::draw-border style property
- the GtkEntry::state-hint style property
- the GtkTreeView::row-ending-details style property
- the GtkRange::trough-side-details style property
- the GtkRange::stepper-position-details style property
- the GtkRange::activate-slider style property
- the GTK_CALENDAR_WEEK_START_MONDAY option
- the GtkFrame::shadow and GtkHandleBox::shadow properties
- the GtkTextView::page-horizontally signal
- the GDK_WINDOW_DIALOG window type
- the GTK_SELECTION_EXTENDED selection mode
- the GtkProgressBarOrientation, GtkAnchorType and GtkVisibility
enumerations
- GtkDialog separators, including the GtkDialog::has-separator
property, including setter/getter, the GTK_DIALOG_NO_SEPARATOR
flag and the GtkMessageDialog::use-separator style property
- gtk_status_icon_set/get_blinking
- gdk_window_et_deskrelative_origin
- The GtkItem class has been removed. Its functionality has
been merged into is sole subclass, GtkMenuItem
* The GtkIconView::orientation property has been renamed
to 'item-orientation'
* GtkProgressBar and GtkCellRendererProgress implement GtkOrientable
now, and their 'orientation' property have been split into
a 'orientation' property of type GtkOrientation and a boolean
'inverted' property
* GDK no longer exports variables: gdk_threads_lock, gdk_threads_unlock,
gdk_threads_mutex and gdk_display are no longer available
* GTK no longer exports variables: gtk_major_version, gtk_minor_version,
gtk_micro_version, gtk_binary_age, gtk_interface_age have been
converted to functions. gtk_debug_flags has a getter and a setter.
Misc. variables that had been exported by the semi-private text
API have been removed.
* All GDK keysym names have been changed from GDK_keysym to GDK_KEY_keysym;
the previous names are still available in gdkkeysyms-compat.h.
* GtkWrapBox is a new container, which distributes its children
over multiple rows/columns
* GTK+ now uses standard icon names when looking up stock icons
* More widgets and cell renderers have been converted to support
width-for-height: GtkCellRendererText, GtkAccelLabel, GtkCellView,
GtkComboBox, GtkMenu, GtkMenuItem
* Button boxes are now semi-homogeneous.
* The directfb backend has been removed
* Bugs fixed:
77669 GtkWrapBox for gtk itself, not gimp?
84188 "Dialogue" button widths should not be homogenous
414712 gtk_container_set_focus_child leaks widget
527499 FileFilter combo becames too wide
528257 File selector and stock string problems
605186 Use G_DEFINE_INTERFACE macro
614006 File chooser crashes when creating a new folder...
616401 Noneffective gdk_keymap_map_virtual_modifiers in early use
626710 GailScaleButton calculates wrong value for minimum increment
627028 Marked state of calendar day is not accessible
627139 gtkfilechooserentry shows completion progress tooltip on first show
627445 Removal of GtkWidget::draw-border breaks gtk_widget_queue_draw()
627580 GtkFontSelection: don't notify the non-existent "font" property
627643 gtkaboutdialog gettext problem
627828 Drag and drop between treeviews in different window groups broken...
627843 set_active_iter doc: remove restriction on path length
627867 tests/testsocket is broken
627912 misprint in the desc. of "hover-expand" and "hover-selection"...
628160 introspection: Update to new scanner API
628308 docs referencing non existing icons
628656 _gdk_windowing_get_startup_notify_id memory leak
628807 Add more "reserved for expansion" fields to GtkWidgetClass
628808 Warn if a widget requests minimum size > natural size
628884 Use a bitfield for Widget::private_flags, ::state, ::saved_state
628935 add gtk_radio_button_join_group method for bindings
629110 gtk_spinner_accessible_get_type always returns null
* Translation updates
Arabic
Armenian
Brazilian Portuguese
British English
Bulgarian
Danish
Estonian
French
Galician
Hebrew
Hungarian
Indonesian
Kazakh
Norwegian bokmål
Norwegian Nynorsk
Portuguese
Serbian
Slovenian
Spanish
Telugu
Traditional Chinese
Overview of Changes from GTK+ 2.90.5 to 2.90.6
==============================================
+2 -1
View File
@@ -110,10 +110,11 @@ rm -rf autom4te.cache
# regenerated from their corresponding *.in files by ./configure anyway.
touch README INSTALL
gtkdocize || exit $?
$ACLOCAL -I m4 $ACLOCAL_FLAGS || exit $?
libtoolize --force || exit $?
gtkdocize || exit $?
autoheader || exit $?
+17 -43
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], [8])
m4_define([gtk_interface_age], [0])
m4_define([gtk_binary_age],
[m4_eval(100 * gtk_minor_version + gtk_micro_version)])
@@ -31,11 +31,21 @@ 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.11])
m4_define([glib_required_version], [2.27.0])
m4_define([pango_required_version], [1.20])
m4_define([atk_required_version], [1.29.2])
m4_define([cairo_required_version], [1.9.10])
m4_define([gdk_pixbuf_required_version], [2.21.0])
GLIB_REQUIRED_VERSION=glib_required_version
PANGO_REQUIRED_VERSION=pango_required_version
ATK_REQUIRED_VERSION=atk_required_version
CAIRO_REQUIRED_VERSION=cairo_required_version
GDK_PIXBUF_REQUIRED_VERSION=gdk_pixbuf_required_version
AC_SUBST(GLIB_REQUIRED_VERSION)
AC_SUBST(PANGO_REQUIRED_VERSION)
AC_SUBST(ATK_REQUIRED_VERSION)
AC_SUBST(CAIRO_REQUIRED_VERSION)
AC_SUBST(GDK_PIXBUF_REQUIRED_VERSION)
AC_INIT([gtk+], [gtk_version],
@@ -243,10 +253,6 @@ AC_ARG_ENABLE(rebuilds,
[AC_HELP_STRING([--disable-rebuilds],
[disable all source autogeneration rules])],,
[enable_rebuilds=yes])
AC_ARG_ENABLE(visibility,
[AC_HELP_STRING([--disable-visibility],
[do not use ELF visibility attributes])],,
[enable_visibility=yes])
AC_ARG_WITH(xinput,
[AC_HELP_STRING([--with-xinput=@<:@no/yes@:>@], [support XInput])])
@@ -257,13 +263,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
@@ -284,11 +290,6 @@ else
fi
if test "x$enable_visibility" = "xno"; then
GTK_DEBUG_FLAGS="$GTK_DEBUG_FLAGS -DDISABLE_VISIBILITY"
fi
AC_DEFINE_UNQUOTED(GTK_COMPILED_WITH_DEBUGGING, "${enable_debug}",
[Define if debugging is enabled])
@@ -486,18 +487,6 @@ if test "$gtk_ok" = "yes"; then
[Define if _NL_PAPER_WIDTH is available])
fi
# sigsetjmp is a macro on some platforms, so AC_CHECK_FUNCS is not reliable
AC_MSG_CHECKING(for sigsetjmp)
AC_TRY_LINK([#include <setjmp.h>], [
sigjmp_buf env;
sigsetjmp(env, 0);
], gtk_ok=yes, gtk_ok=no)
AC_MSG_RESULT($gtk_ok)
if test "$gtk_ok" = "yes"; then
AC_DEFINE(HAVE_SIGSETJMP, 1,
[Define to 1 if sigsetjmp is available])
fi
# i18n stuff
ALL_LINGUAS="`grep -v '^#' "$srcdir/po/LINGUAS" | tr '\n' ' '`"
AM_GLIB_GNU_GETTEXT
@@ -1248,17 +1237,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
@@ -1554,7 +1532,7 @@ fi
# GObject introspection
##################################################
GOBJECT_INTROSPECTION_CHECK([0.9.0])
GOBJECT_INTROSPECTION_CHECK([0.9.3])
##################################################
# Checks for gtk-doc and docbook-tools
@@ -1652,9 +1630,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
@@ -1730,7 +1705,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
@@ -1761,4 +1735,4 @@ perf/Makefile
AC_OUTPUT
echo "configuration:
target: $gdktarget"
target: $gdktarget"
+6 -23
View File
@@ -67,25 +67,6 @@ activate_radio_action (GtkAction *action, GtkRadioAction *current)
}
}
static void
activate_email (GtkAboutDialog *about,
const gchar *link,
gpointer data)
{
gchar *text;
text = g_strdup_printf ("send mail to %s", link);
g_print ("%s\n", text);
g_free (text);
}
static void
activate_url (GtkAboutDialog *about,
const gchar *link,
gpointer data)
{
g_print ("show url %s\n", link);
}
static void
about_cb (GtkAction *action,
GtkWidget *window)
@@ -120,11 +101,13 @@ about_cb (GtkAction *action,
g_object_unref (pixbuf);
}
gtk_about_dialog_set_email_hook (activate_email, NULL, NULL);
gtk_about_dialog_set_url_hook (activate_url, NULL, NULL);
gtk_show_about_dialog (GTK_WINDOW (window),
"program-name", "GTK+ Code Demos",
"version", PACKAGE_VERSION,
"version", g_strdup_printf ("%s,\nRunning against GTK+ %d.%d.%d",
PACKAGE_VERSION,
gtk_get_major_version (),
gtk_get_minor_version (),
gtk_get_micro_version ()),
"copyright", "(C) 1997-2009 The GTK+ Team",
"license-type", GTK_LICENSE_LGPL_2_1,
"website", "http://www.gtk.org",
@@ -443,7 +426,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",
+2 -2
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,
@@ -610,7 +610,7 @@ do_changedisplay (GtkWidget *do_widget)
info->window = gtk_dialog_new_with_buttons ("Change Screen or display",
GTK_WINDOW (do_widget),
GTK_DIALOG_NO_SEPARATOR,
0,
GTK_STOCK_CLOSE, GTK_RESPONSE_CLOSE,
"Change", GTK_RESPONSE_OK,
NULL);
+5 -2
View File
@@ -19,14 +19,17 @@ 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);
cr = gdk_cairo_create (widget->window);
cr = gdk_cairo_create (window);
gdk_cairo_set_source_color (cr, &style->bg[GTK_STATE_NORMAL]);
gdk_cairo_rectangle (cr, &event->area);
+2 -2
View File
@@ -271,7 +271,7 @@ struct _MaskEntryClass
};
static void mask_entry_editable_init (GtkEditableClass *iface);
static void mask_entry_editable_init (GtkEditableInterface *iface);
G_DEFINE_TYPE_WITH_CODE (MaskEntry, mask_entry, GTK_TYPE_ENTRY,
G_IMPLEMENT_INTERFACE (GTK_TYPE_EDITABLE,
@@ -316,7 +316,7 @@ mask_entry_class_init (MaskEntryClass *klass)
static void
mask_entry_editable_init (GtkEditableClass *iface)
mask_entry_editable_init (GtkEditableInterface *iface)
{
iface->changed = mask_entry_changed;
}
+12 -8
View File
@@ -25,15 +25,17 @@ scribble_configure_event (GtkWidget *widget,
GdkEventConfigure *event,
gpointer data)
{
GtkAllocation allocation;
cairo_t *cr;
if (surface)
cairo_surface_destroy (surface);
surface = gdk_window_create_similar_surface (widget->window,
gtk_widget_get_allocation (widget, &allocation);
surface = gdk_window_create_similar_surface (gtk_widget_get_window (widget),
CAIRO_CONTENT_COLOR,
widget->allocation.width,
widget->allocation.height);
allocation.width,
allocation.height);
/* Initialize the surface to white */
cr = cairo_create (surface);
@@ -55,7 +57,7 @@ scribble_expose_event (GtkWidget *widget,
{
cairo_t *cr;
cr = gdk_cairo_create (widget->window);
cr = gdk_cairo_create (gtk_widget_get_window (widget));
cairo_set_source_surface (cr, surface, 0, 0);
gdk_cairo_rectangle (cr, &event->area);
@@ -89,7 +91,7 @@ draw_brush (GtkWidget *widget,
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);
}
@@ -146,6 +148,7 @@ checkerboard_expose (GtkWidget *da,
GdkEventExpose *event,
gpointer data)
{
GtkAllocation allocation;
gint i, j, xcount, ycount;
cairo_t *cr;
@@ -159,17 +162,18 @@ checkerboard_expose (GtkWidget *da,
* works.
*/
cr = gdk_cairo_create (da->window);
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)
{
if (ycount % 2)
cairo_set_source_rgb (cr, 0.45777, 0, 0.45777);
+8 -6
View File
@@ -113,8 +113,8 @@ key_press_event (GtkWidget *text_view,
switch (event->keyval)
{
case GDK_Return:
case GDK_KP_Enter:
case GDK_KEY_Return:
case GDK_KEY_KP_Enter:
buffer = gtk_text_view_get_buffer (GTK_TEXT_VIEW (text_view));
gtk_text_buffer_get_iter_at_mark (buffer, &iter,
gtk_text_buffer_get_insert (buffer));
@@ -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);
+2 -2
View File
@@ -120,8 +120,8 @@ do_iconview_edit (GtkWidget *do_widget)
gtk_icon_view_set_selection_mode (GTK_ICON_VIEW (icon_view),
GTK_SELECTION_SINGLE);
gtk_icon_view_set_orientation (GTK_ICON_VIEW (icon_view),
GTK_ORIENTATION_HORIZONTAL);
gtk_icon_view_set_item_orientation (GTK_ICON_VIEW (icon_view),
GTK_ORIENTATION_HORIZONTAL);
gtk_icon_view_set_columns (GTK_ICON_VIEW (icon_view), 2);
gtk_icon_view_set_reorderable (GTK_ICON_VIEW (icon_view), TRUE);
+1 -1
View File
@@ -279,7 +279,7 @@ static gchar *types[] =
"GtkTreeStore ",
"GtkEntry ",
"GtkEditable ",
"GtkEditableClass ",
"GtkEditableInterface ",
"GdkPixmap ",
"GdkEventConfigure ",
"GdkEventMotion ",
+40 -27
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);
}
@@ -384,7 +392,8 @@ gtk_rotated_bin_size_request (GtkWidget *widget,
child_requisition.height = 0;
if (bin->child && gtk_widget_get_visible (bin->child))
gtk_widget_size_request (bin->child, &child_requisition);
gtk_size_request_get_size (GTK_SIZE_REQUEST (bin->child),
&child_requisition, NULL);
s = sin (bin->angle);
c = cos (bin->angle);
@@ -405,7 +414,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 +422,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);
@@ -426,7 +435,8 @@ gtk_rotated_bin_size_allocate (GtkWidget *widget,
s = sin (bin->angle);
c = cos (bin->angle);
gtk_widget_get_child_requisition (bin->child, &child_requisition);
gtk_size_request_get_size (GTK_SIZE_REQUEST (bin->child),
&child_requisition, NULL);
child_allocation.x = 0;
child_allocation.y = 0;
child_allocation.height = child_requisition.height;
@@ -454,7 +464,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 +475,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 +492,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 +520,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);
+37 -24
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);
}
@@ -308,7 +316,8 @@ gtk_mirror_bin_size_request (GtkWidget *widget,
child_requisition.height = 0;
if (bin->child && gtk_widget_get_visible (bin->child))
gtk_widget_size_request (bin->child, &child_requisition);
gtk_size_request_get_size (GTK_SIZE_REQUEST (bin->child),
&child_requisition, NULL);
border_width = gtk_container_get_border_width (GTK_CONTAINER (widget));
requisition->width = border_width * 2 + child_requisition.width + 10;
@@ -323,7 +332,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 +340,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);
@@ -341,7 +350,8 @@ gtk_mirror_bin_size_allocate (GtkWidget *widget,
GtkRequisition child_requisition;
GtkAllocation child_allocation;
gtk_widget_get_child_requisition (bin->child, &child_requisition);
gtk_size_request_get_size (GTK_SIZE_REQUEST (bin->child),
&child_requisition, NULL);
child_allocation.x = 0;
child_allocation.y = 0;
child_allocation.height = child_requisition.height;
@@ -360,7 +370,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 +381,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 +399,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 +439,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);
+18 -6
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
+9 -3
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,
+4 -12
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
+16 -7
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;
+8 -8
View File
@@ -369,16 +369,16 @@ main (int argc, char **argv)
gtk_label_new ("Source"));
tag = gtk_text_buffer_create_tag (info_buffer, "title");
gtk_object_set (GTK_OBJECT (tag),
"font", "Sans 18",
NULL);
g_object_set (tag,
"font", "Sans 18",
NULL);
tag = gtk_text_buffer_create_tag (info_buffer, "source");
gtk_object_set (GTK_OBJECT (tag),
"font", "Courier 10",
"pixels_above_lines", 0,
"pixels_below_lines", 0,
NULL);
g_object_set (tag,
"font", "Courier 10",
"pixels_above_lines", 0,
"pixels_below_lines", 0,
NULL);
gtk_window_set_default_size (GTK_WINDOW (window), 600, 400);
gtk_widget_show_all (window);
+9 -5
View File
@@ -34,18 +34,21 @@ 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 (widget->window, NULL, FALSE);
gdk_window_set_back_pixmap (gtk_widget_get_window (widget),
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);
@@ -138,7 +141,8 @@ main(int argc, char **argv)
gtk_widget_show_all (vbox);
/* Compute the size without the drawing area, so we know how big to make the default size */
gtk_widget_size_request (vbox, &scratch_requisition);
gtk_size_request_get_size (GTK_SIZE_REQUEST (vbox),
&scratch_requisition, NULL);
darea = gtk_drawing_area_new ();
gtk_box_pack_start (GTK_BOX (vbox), darea, TRUE, TRUE, 0);
+635
View File
@@ -0,0 +1,635 @@
GTK+ Coding Style
-------------------------------------------------------------------------------
This document is intended to be a short description of the preferred
coding style to be used for the GTK+ source code. It was strongly
inspired by Clutter's CODING_STYLE.
Coding style is a matter of consistency, readability and maintainance;
coding style is also completely arbitrary and a matter of taste. This
document will use examples at the very least to provide authoritative
and consistent answers to common questions regarding the coding style,
and will also try to identify the allowed exceptions.
The examples will show the preferred coding style; the negative examples
will be clearly identified. Please, don't submit code to GTK+ that
looks like any of these.
Part of the rationales for these coding style rules are available either
in the kernel CodingStyle document or in Cairo's CODING_STYLE one.
When in doubt, check the surrounding code and try to imitate it.
+ Line width
The maximum line width for source files is 80 characters, whenever possible.
Longer lines are usually an indication that you either need a function
or a pre-processor macro.
+ Indentation
Each new level is indented 2 or more spaces than the previous level:
if (condition)
single_statement ();
This can only be achieved using space characters. It may not be achieved
using tab characters alone, or using a combination of spaces and tabs.
Do not change the editor's configuration to change the meaning of a
tab character (see below); code using tabs to indent will not be accepted
into GTK+.
Even if two spaces for each indentation level allows deeper nesting than
8 spaces, GTK+ favours self-documenting function names that can take
quite some space. For this reason you should avoid deeply nested code.
+ Tab characters
The tab character must always be expanded to spaces. If a literal
tab must be used inside the source, the tab must always be interpreted
according to its traditional meaning:
Advance to the next column which is a multiple of 8.
[ these two lines should be aligned ]
+ Braces
Curly braces should not be used for single statement blocks:
if (condition)
single_statement ();
else
another_single_statement (arg1);
In case of multiple statements, curly braces should be put on another
indentation level:
if (condition)
{
statement_1 ();
statement_2 ();
statement_3 ();
}
The "no block for single statements" rule has only four exceptions:
① if the single statement covers multiple lines, e.g. for functions with
many arguments, and it is followed by else or else if:
/* valid */
if (condition)
{
a_single_statement_with_many_arguments (some_lengthy_argument,
another_lengthy_argument,
and_another_one,
plus_one);
}
else
another_single_statement (arg1, arg2);
② if the condition is composed of many lines:
/* valid */
if (condition1 ||
(condition2 && condition3) ||
condition4 ||
(condition5 && (condition6 || condition7)))
{
a_single_statement ();
}
③ Nested if's, in which case the block should be placed on the
outermost if:
/* valid */
if (condition)
{
if (another_condition)
single_statement ();
else
another_single_statement ();
}
/* invalid */
if (condition)
if (another_condition)
single_statement ();
else if (yet_another_condition)
another_single_statement ();
④ If either side of an if-else statement has braces, both sides
should, to match up indentation:
/* valid */
if (condition)
{
foo ();
bar ();
}
else
{
baz ();
}
/* invalid */
if (condition)
{
foo ();
bar ();
}
else
baz ();
In general, new blocks should be placed on a new indentation level,
like:
int retval = 0;
statement_1 ();
statement_2 ();
{
int var1 = 42;
gboolean res = FALSE;
res = statement_3 (var1);
retval = res ? -1 : 1;
}
While curly braces for function definitions should rest on a new line
they should not add an indentation level:
/* valid */
static void
my_function (int argument)
{
do_my_things ();
}
/* invalid */
static void
my_function (int argument) {
do_my_things ();
}
/* invalid */
static void
my_function (int argument)
{
do_my_things ();
}
Curly braces must not be placed on the same line as a condition:
/* invalid */
if (condition) {
statement_1 ();
statement_2 ();
}
+ Conditions
Do not check boolean values for equality:
/* invalid */
if (condition == TRUE)
do_foo ();
/* valid */
if (another_condition)
do_bar ();
Even if C handles NULL equality like a boolean, be explicit:
/* valid */
if (some_pointer == NULL)
do_blah ();
/* invalid */
if (some_other_pointer)
do_blurp ();
In case of conditions split over multiple lines, the logical operators should
always go at the end of the line:
/* invalid */
if (condition1
|| condition2
|| condition3)
{
do_foo ();
}
/* valid */
if (condition1 &&
condition2 &&
(condition3 || (condition4 && condition5)))
{
do_blah ();
}
+ Functions
Functions should be declared by placing the returned value on a separate
line from the function name:
void
my_function (void)
{
}
The arguments list must be broken into a new line for each argument,
with the argument names right aligned, taking into account pointers:
void
my_function (some_type_t type,
another_type_t *a_pointer,
final_type_t another_type)
{
}
The alignment also holds when invoking a function without breaking the
80 characters limit:
align_function_arguments (first_argument,
second_argument,
third_argument);
To respect the 80 characters limit do not break the function name from
the arguments:
/* invalid */
a_very_long_function_name_with_long_parameters
(argument_the_first, argument_the_second);
/* valid */
first_a = argument_the_first;
second_a = argument_the_second;
a_very_long_function_name_with_long_parameters (first_a, second_a);
+ Whitespace
Always put a space before a parenthesis but never after:
/* valid */
if (condition)
do_my_things ();
/* valid */
switch (condition)
{
}
/* invalid */
if(condition)
do_my_things();
/* invalid */
if ( condition )
do_my_things ( );
A switch() should open a block on a new indentation level, and each case
should start on the same indentation level as the curly braces, with the
case block on a new indentation level:
/* valid */
switch (condition)
{
case FOO:
do_foo ();
break;
case BAR:
do_bar ();
break;
}
/* invalid */
switch (condition) {
case FOO: do_foo (); break;
case BAR: do_bar (); break;
}
/* invalid */
switch (condition)
{
case FOO: do_foo ();
break;
case BAR: do_bar ();
break;
}
/* invalid */
switch (condition)
{
case FOO:
do_foo ();
break;
case BAR:
do_bar ();
break;
}
It is preferable, though not mandatory, to separate the various cases with
a newline:
switch (condition)
{
case FOO:
do_foo ();
break;
case BAR:
do_bar ();
break;
default:
do_default ();
}
The 'break' statement for the default: case is not mandatory.
If a case block needs to declare new variables, the same rules as the
inner blocks (see above) apply; the break statement should be placed
outside of the inner block:
switch (condition)
{
case FOO:
{
int foo;
foo = do_foo ();
}
break;
...
}
When declaring a structure type use newlines to separate logical sections
of the structure:
struct _GtkWrapBoxPrivate
{
GtkOrientation orientation;
GtkWrapAllocationMode mode;
GtkWrapBoxSpreading horizontal_spreading;
GtkWrapBoxSpreading vertical_spreading;
guint16 vertical_spacing;
guint16 horizontal_spacing;
guint16 minimum_line_children;
guint16 natural_line_children;
GList *children;
};
Do not eliminate whitespace and newlines just because something would
fit on 80 characters:
/* invalid */
if (condition) foo (); else bar ();
Do eliminate trailing whitespace on any line, preferably as a separate
patch or commit. Never use empty lines at the beginning or at the end of
a file.
Do enable the default git pre-commit hook that detect trailing
whitespace for you and help you to avoid corrupting GTK+'s tree with
it. Do that as follows:
chmod a+x .git/hooks/pre-commit
You might also find the git-stripspace utility helpful which acts as a
filter to remove trailing whitespace as well as initial, final, and
duplicate blank lines.
+ Headers
Headers are special, for GTK+, in that they don't have to obey the
80 characters limit. The only major rule for headers is that the function
definitions should be vertically aligned in three columns:
return value function_name (type argument,
type argument,
type argument);
The maximum width of each column is given by the longest element in the
column:
void gtk_type_set_property (GtkType *type,
const gchar *value,
GError **error);
G_CONST_RETURN gchar *gtk_type_get_property (GtkType *type);
It is also possible to align the columns to the next tab:
void gtk_type_set_prop (GtkType *type,
gfloat value);
gfloat gtk_type_get_prop (GtkType *type);
gint gtk_type_update_foobar (GtkType *type);
Public headers should never be included directly:
#if !defined (__GTK_H_INSIDE__) && !defined (GTK_COMPILATION)
#error "Only <gtk/gtk.h> can be included directly."
#endif
All headers should have inclusion guards (for internal usage)
and C++ guards:
#ifndef __GTK_FOO_H__
#define __GTK_FOO_H__
#include <gtk/gtk-bar.h>
G_BEGIN_DECLS
...
G_END_DECLS
#endif /* __GTK_FOO_H__ */
+ Includes
GTK+ source files should never include the global gtk.h header, but
instead include the individual headers that are needed. Every file must
include config.h first, then its own header, then other GTK+ headers
that it needs, then system and third-party headers that it needs.
/* valid */
#include "config.h"
#include "gtkfoo.h"
#include "gtkwidget.h"
#include "gtkbutton.h"
...
#include <string.h>
+ GObject
GObject classes definition and implementation require some additional
coding style notices.
Typedef declarations should be placed at the beginning of the file:
typedef struct _GtkFoo GtkFoo;
typedef struct _GtkFooClass GtkFooClass;
typedef struct _GtkFooPrivate GtkFooPrivate;
This includes enumeration types:
typedef enum
{
GTK_SIZE_REQUEST_WIDTH_FOR_HEIGHT,
GTK_SIZE_REQUEST_HEIGHT_FOR_WIDTH
} GtkSizeRequestMode;
And callback types:
typedef void (* GtkCallback) (GtkWidget *widget,
gpointer user_data);
Instance structures should only contain the parent type and a pointer to a
private data structure, and they should be annotated as "private":
struct _GtkFoo
{
/*< private >*/
GtkWidget parent_instance;
GtkFooPrivate *priv;
};
All the properties should be stored inside the private data structure, which
is defined inside the source file - or, if needed, inside a private header
file; the private header filename must end with "private.h" and must not be
installed.
The private data structure should only be accessed internally using the
pointer inside the instance structure, and never using the
G_TYPE_INSTANCE_GET_PRIVATE() macro or the g_type_instance_get_private()
function.
Always use the G_DEFINE_TYPE(), G_DEFINE_TYPE_WITH_CODE() macros, or
their abstract variants G_DEFINE_ABSTRACT_TYPE() and
G_DEFINE_ABSTRACT_TYPE_WITH_CODE(), and the similar macros for defining
interfaces.
Interface types should always have the dummy typedef for cast purposes:
typedef struct _GtkFoo GtkFoo;
The interface structure should have "Interface" postfixed to the dummy typedef:
typedef struct _GtkFooInterface GtkFooInterface;
Interfaces must have the following macros:
- Macro: - Expands to:
• GTK_TYPE_<iface_name> <iface_name>_get_type
• GTK_<iface_name> G_TYPE_CHECK_INSTANCE_CAST
• GTK_IS_<iface_name> G_TYPE_CHECK_INSTANCE_TYPE
• GTK_<iface_name>_GET_IFACE G_TYPE_INSTANCE_GET_INTERFACE
+ Memory allocation
When dynamically allocating data on the heap either use g_new() or,
if allocating multiple small data structures, g_slice_new().
Public structure types should always be returned after being zero-ed,
either explicitly for each member, or by using g_new0() or g_slice_new0().
+ Macros
Try to avoid private macros unless strictly necessary. Remember to #undef
them at the end of a block or a series of functions needing them.
Inline functions are usually preferable to private macros.
Public macros should not be used unless they evaluate to a constant.
+ Public API
Avoid exporting variables as public API, since this is cumbersome on some
platforms. It is always preferable to add getters and setters instead.
All public functions must be listed in the gtk.symbols file.
+ Private API
Non-exported functions that are needed in more than one source file
should be named "_gtk_...", and declared in a private header file.
Underscore-prefixed functions are never exported.
Non-exported functions that are only needed in one source file
should be declared static.
+ Documentation
All public APIs must have gtk-doc comments. For functions, these should
be placed in the source file, directly above the function.
/* valid */
/**
* gtk_get_flow:
* @widget: a #GtkWidget
*
* Gets the flow of a widget.
*
* Note that flows may be laminar or turbulent...
*
* Returns: (transfer none): the flow of @widget
*/
GtkFlow *
gtk_get_flow (GtkWidget *widget)
{
...
}
Doc comments for macros, function types, class structs, etc should be
placed next to the definitions, typically in headers.
Section introductions should be placed in the source file they describe,
after the license header:
/* valid */
/**
* SECTION:gtksizerequest
* @Short_Description: Height-for-width geometry management
* @Title: GtkSizeRequest
*
* The GtkSizeRequest interface is GTK+'s height-for-width (and
* width-for-height) geometry management system.
* ...
*/
To properly document a new function, macro, function type or struct,
it needs to be listed in the gtk3-sections.txt file.
To properly document a new class, it needs to be given its own section
in gtk3-sections.txt, needs to be included in gtk-docs.sgml, and the
get_type function needs to listed in gtk3.types.
+ Old code
New code that is being added to GTK+ should adhere to the style
explained above. Existing GTK+ code does largely follow these
conventions, but there are some differences, e.g. occurrences
of tabs, etc.
It is ok to update the style of a code block or function when you
are touching it anyway, but sweeping whitespace changes obscure the
git history and should be avoided.
-338
View File
@@ -1,338 +0,0 @@
The overall syntax is:
(type-of-thing-being-defined name-used-to-refer-to-this-thing
(attribute-name attribute-value-depending-on-the-attribute)
(attribute-name attribute-value-depending-on-the-attribute)
(attribute-name attribute-value-depending-on-the-attribute))
Some definitions can have a c-declaration field that gives the C code
we parsed to arrive at the definition. The c-declaration is a quoted
string because it can contain parentheses and such.
Defined types and their attributes:
===
(module module-name
(submodule-of module-name)) ;; submodule is optional
Ex: (module Gtk)
Ex: (module Rgb
(submodule-of Gdk))
modules are later referred to with a list of module names, like
(Gdk Rgb) or (Gtk)
Object and boxed type definitions automatically create a submodule.
For example, GtkCList creates the module (module CList (submodule-of
(Gtk))) which is referred to as module (Gtk CList).
===
(type
(alias some-unique-identifier)
(in-module module-name) ;; optional, gchar* is not in a module
(gtk-type-id gtk-type-system-id) ;; optional, absent if this is not
;; in the type system
(is-parametric boolean) ;; optional default to #f
(in-c-name name-of-symbol-in-C)
(out-c-name name-of-symbol-in-C)
(inout-c-name name-of-symbol-in-C))
Ex: (type
(alias string)
(gtk-type-id GTK_TYPE_STRING)
(in-c-name "const gchar*")
(out-c-name "gchar**") ;; actually I'm not sure how strings work out/inout
(inout-c-name "gchar*"))
(type
(alias list)
(gtk-type-id GTK_TYPE_POINTER)
(is-parametric #t)
(in-c-name "GList*")
(out-c-name "GList**")
(inout-c-name "GList**"))
;; This one would be implied by the (object) def for GtkWidget I
;; think - (type) is only required for types that are not implied
;; by other definitions, such as int/boolean/etc.
(type
(alias GtkWidget)
(in-module (Gtk))
(gtk-type-id GTK_TYPE_WIDGET)
(in-c-name "GtkWidget*")
(inout-c-name "GtkWidget*")
(out-c-name "GtkWidget**"))
"Type" bindings are automatically assumed for objects, boxed types,
etc. as defined below.
The alias field is used to refer to the type later on.
Whenever a type alias can be used, it is also possible to use the
keyword "native", which implies that the type in question is too
C-specific to represent. Then a c-declaration will typically be
available for use.
C types containing [] or () are function pointers or arrays. For
arrays that don't specify a size, we just treat them as pointers. For
function pointers, we need special (type) syntax/attributes of some
kind, but since there basically aren't any of these right now in the
libs we care about we can just ignore them. For arrays that specify a
size ditto, you would handle them by adding an (array-size) attribute
or something or using the "native" keyword and skipping the (type)
stuff.
===
(object object-name
(in-module module-name-list)
(parent object-name optional-module-name-if-different)
(abstract boolean-is-abstract-class) ;; omit for default of #f
(c-name name-of-the-object-in-C)
(field (type-and-name type-alias-of-struct-field name-of-struct-field)
(access read-or-write-or-readwrite)))
Ex: (object Widget
(in-module (Gtk))
(parent Object) ;; could say (parent Object (Gtk))
(abstract #t)
(c-name GtkWidget)
(field (type-and-name GdkWindow* window) (access read)))
An "object" declaration automatically implies the type definition:
(type
(alias concat-module-elements-and-object-name)
(in-c-name pointer-to-c-name)
(out-c-name pointer-to-pointer-to-c-name)
(inout-c-name pointer-to-c-name))
Ex:
(type (alias GtkWidget)
(in-c-name GtkWidget*)
(out-c-name GtkWidget**)
(inout-c-name GtkWidget*))
It also implies a module that is the name broken into parts:
(module CTree
(submodule-of Gtk))
===
(function function-name
(in-module module-name-list) ;; "static methods" go in their
;; object's module
(is-constructor-of object-type-alias) ;; optional, marks a constructor
(c-name function-name)
(return-type return-value-type) ;; defaults to void
(caller-owns-return boolean-value) ;; defaults to #f
(can-return-null boolean-value) ;; defaults to #t
(parameter in-or-out-or-inout
(type-and-name parameter-type-alias parameter-name)
(type-parameter name-of-contained-type) ;; optional, requires parametric type
(c-declaration "c-type-and-name")) ;; c-declaration only required
;; if the type alias is "native"
(varargs #t) ;; has varargs at the end
)
Ex:
(function init
(in-module (Gdk Rgb)
(c-name gdk_rgb_init)))
Ex:
(function new
(in-module (Gdk Rgb Cmap))
(is-constructor-of GdkRgbCmap)
(c-name gdk_rgb_cmap_new)
(return-type GdkRgbCmap)
(caller-owns-return #t) ;; perhaps this could be implied by is-constructor-of
(parameter in (type-and-name array-of-guint32 colors))
(parameter in (type-and-name gint n_colors)))
Ex:
(function config_set_set_handler
(in-module (Gnome))
(c-name gnome_config_set_set_handler)
(parameter in (type-and-name native func)
(c-declaration "void (*func)(void*)"))
(parameter in (type-and-name gpointer data)))
===
(method method-name
(of-object object-name module-name)
;; retval/arg attributes as for (function), but with first parameter
;; omitted for non-constructors
)
Ex:
(method set_text
(of-object Label (Gtk))
(parameter (type-and-name const-gchar* str)))
===
(object-argument arg-name
(of-object object-we-are-an-argument-of optional-objects-module)
(type-id argument-type) ;; GTK_TYPE_OBJECT etc.
;; flags all default to #f
(readable bool-value)
(writeable bool-value)
(construct-only bool-value))
Ex:
(object-argument label
(of-object Label (Gtk))
(type GTK_TYPE_STRING)
(readable #t)
(writeable #t))
===
(signal signal-name
(run-action bool-value)
(run-first bool-value)
(run-last bool-value)
(of-object object-we-are-a-signal-of optional-objects-module)
;; return value and parameters as for a function, omitting the object
;; and user data parameters
;; what other properties matter for a signal?
)
Ex:
(signal select_row
(of-object CList (Gtk))
(run-first #t)
;; return type defaults to void
(parameter in (type-and-name gint row))
(parameter in (type-and-name gint column))
(parameter in (type-and-name GdkEvent* event)))
===
(enum enum-name
(in-module modname)
(c-name name-in-c)
(value (nick value-name-noprefixes-hyphen-lowercase) (c-name value-c-name)))
Ex:
(enum DirectionType
(in-module Gtk)
(c-name GtkDirectionType)
(value (nick tab-forward) (c-name GTK_DIR_TAB_FORWARD))
(value (nick tab-backward) (c-name GTK_DIR_TAB_BACKWARD))
(value (nick up) (c-name GTK_DIR_UP))
(value (nick down) (c-name GTK_DIR_DOWN))
(value (nick left) (c-name GTK_DIR_LEFT))
(value (nick right) (c-name GTK_DIR_RIGHT)))
(enum Pos
(in-module (Gtk CTree))
(c-name GtkCTreePos)
(value (nick before) (c-name GTK_CTREE_POS_BEFORE))
(value (nick as-child) (c-name GTK_CTREE_POS_AS_CHILD))
(value (nick after) (c-name GTK_CTREE_POS_AFTER)))
===
(flags) is just like enum, but some bindings may wrap enums and flags differently.
===
(boxed boxed-name
(in-module modname)
(c-name c-name)
(ref-func func-to-increase-refcount)
(copy-func func-to-copy)
(release-func func-to-destroy-or-decrement-refcount)
(field (type-and-name type-alias-of-struct-field name-of-struct-field) (access access-rule)))
It is never OK to use memcpy() to copy a boxed type, or use
malloc()/free() to alloc/free one.
Ex:
(boxed Pixmap
(in-module (Gdk))
(c-name GdkPixmap)
(ref-func pixmap_ref)
(release-func pixmap_unref))
An "object" declaration automatically implies the type definition:
(type
(alias concat-module-elements-and-boxed-name)
(in-c-name pointer-to-c-name)
(out-c-name pointer-to-pointer-to-c-name)
(inout-c-name pointer-to-c-name))
Ex:
(type (alias GdkPixmap)
(in-c-name GdkPixmap*)
(out-c-name GdkPixmap**)
(inout-c-name GdkPixmap*))
===
(struct struct-name
(in-module modname)
(c-name c-name)
(field (type-and-name type-alias-of-struct-field name-of-struct-field) (access access-rule)))
Unlike a boxed type, a struct type can be copied with memcpy() and
allocated on the stack or with g_malloc().
Ex:
(struct Rectangle
(in-module (Gdk))
(c-name GdkRectangle)
(field (type-and-name gint16 x) (access readwrite))
(field (type-and-name gint16 y) (access readwrite))
(field (type-and-name guint16 width) (access readwrite))
(field (type-and-name guint16 height) (access readwrite)))
Implies GdkRectangle type alias:
(type (alias GdkRectangle)
(in-c-name GdkRectangle*)
(out-c-name GdkRectangle*) ;; note - not the same as boxed types
(inout-c-name GdkRectangle*))
===
(user-function name
(in-module module)
(c-name c-typedef-name)
;; return-type and parameters as for (function)
)
Ex:
(user-function PrintFunc
(in-module (Gtk))
(parameter in (type-and-name gpointer func_data))
(parameter in (type-and-name gchar* str)))
===
(typedef new-name
(in-module module)
(c-name c-full-name)
(orig-type alias-of-orig-type))
Ex:
(typedef Type
(in-module (Gtk))
(c-name GtkType)
(orig-type guint))
-236
View File
@@ -1,236 +0,0 @@
CONFIGURING PACKAGES TO WORK WITH GTK
-------------------------------------
Compiling a program successfully against the GTK, GDK, and GLIB
libraries can require a large number of command line options
to your compiler and linker that are hard to guess correctly.
The additional libraries required may, for example, depend on the
manner which GTK was configured
Several tools are included in this package to make process
easier.
First, there is the shell script 'gtk-config' (installed in
$exec_prefix/bin):
Invoking gtk-config
-------------------
gtk-config takes the following flags:
--version
Prints out the version of GTK installed
--cflags
Prints '-I' flags pointing to the installed header files.
--libs
Prints out the linker flags necessary to link a program against GTK
--prefix[=PREFIX]
If PREFIX is specified, overrides the configured value of $prefix.
(And of exec-prefix, unless --exec-prefix is also specified)
Otherwise, prints out the configured value of $prefix
--exec-prefix[=PREFIX]
If PREFIX is specified, overrides the configured value of $exec_prefix.
Otherwise, prints out the configured value of $exec_prefix
You may also add to the command line a list of additional
libraries that gtk-config should supply the CFLAGS and LIBS
for. The only currently supported library is 'gthread'.
As an example of this latter usage, you can get the
appropriate cflags for a threaded program with:
gtk-config --cflags gthread
Example of using gtk-config
---------------------------
Typically, gtk-config will be used within a configure script,
as described below. It, however, can also be used directly
from the command line to compile a simple program. For example:
cc -o simple `gtk-config --cflags` simple.c `gtk-config --libs`
This command line might expand to (for example):
cc -o simple -I/usr/local/lib/glib/include -I/usr/local/include \
-I/usr/X11R6/include simple.c -L/usr/local/lib -L/usr/X11R6/lib \
-lgtk -lgdk -lglib -lXi -lXext -lX11 -lm
Not only is the form using gtk-config easier to type, it will
work on any system, no matter how GTK was configured.
AM_PATH_GTK
-----------
For packages configured using GNU automake, GTK also provides
a macro to automate the process of running GTK.
AM_PATH_GTK([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]])
This macro:
* Determines the location of GTK using gtk-config, which is either
found in the user's path, or from the environment variable
GTK_CONFIG
* Tests the installed libraries to make sure that there version
is later than MINIMUM-VERSION. (A default version will be used
if not specified)
* If the required version was found, sets the GTK_CFLAGS variable to
the output of `gtk-config --cflags` and the GTK_LIBS variable to
the output of `gtk-config --libs`, and calls AC_SUBST() for these
variables so they can be used in generated makefiles, and then
executes ACTION-IF-FOUND.
* If the required version was not found, sets GTK_CFLAGS and GTK_LIBS
to empty strings, and executes ACTION-IF-NOT-FOUND.
This macro is in file 'gtk.m4' which is installed in $datadir/aclocal.
Note that if automake was installed with a different --prefix than
GTK, you will either have to manually move gtk.m4 to automake's
$datadir/aclocal, or give aclocal the -I option when running it.
Configuring a package that uses AM_PATH_GTK
-------------------------------------------
Simply make sure that gtk-config is in your path, and run
the configure script.
Notes:
* The directory where the GTK libraries are installed needs
to be found by your system's dynamic linker.
This is generally done by
editing /etc/ld.so.conf and running ldconfig
Or by:
setting the environment variable LD_LIBRARY_PATH,
or, as a last resort,
Giving a -R or -rpath flag (depending on your linker) when
running configure, for instance:
LDFLAGS=-R/usr/home/owen/lib ./configure
* You can also specify a gtk-config not in your path by
setting the GTK_CONFIG environment variable to the
name of the executable
* If you move the GTK package from its installed location,
you will need either need to modify gtk-config script
manually to point to the new location or rebuild GTK.
Advanced note:
* configure flags
--with-gtk-prefix=PREFIX
--with-gtk-exec-prefix=PREFIX
are provided to override the prefix and exec-prefix that were stored
in the gtk-config shell script by GTK's configure. You are generally
better off configuring GTK with the right path to begin with.
Example of a package using AM_PATH_GTK
--------------------------------------
The following shows how to build a simple package using automake
and the AM_PATH_GTK macro. The program used here is the testinput.c
You should first read the introductory portions of the automake
Manual, if you are not already familiar with it.
Two files are needed, 'configure.ac', which is used to build the
configure script:
==configure.ac===
dnl Process this file with autoconf to produce a configure script.
AC_INIT(testinput.c)
AM_INIT_AUTOMAKE(testinput.c, 1.0.0)
AC_PROG_CC
AM_PROG_CC_STDC
AC_PROG_INSTALL
AM_PATH_GTK(0.99.5,
[LIBS="$LIBS $GTK_LIBS"
CFLAGS="$CFLAGS $GTK_CFLAGS"],
AC_MSG_ERROR(Cannot find GTK: Is gtk-config in path?))
AC_OUTPUT(Makefile)
=================
The only command in this which is not standard for automake
is the AM_PATH_GTK() macro.
That command does the following:
If a GTK version greater than 0.99.5 is found, adds $GTK_LIBS to
$LIBS and $GTK_CFLAGS to $CFLAGS. Otherwise, dies with the error
message "Cannot find GTK: Is gtk-config in path?"
And the 'Makefile.am', which will be used to build the Makefile.
== Makefile.am ==
bin_PROGRAMS = testinput
testinput_SOURCES = testinput.c
=================
This Makefile.am, says that we are building a single executable,
from a single sourcefile 'testinput.c'. Since every program
we are building uses GTK we simply added the GTK options
to $LIBS and $CFLAGS, but in other circumstances, we might
want to specify them on a per-program basis: for instance by
adding the lines:
testinput_LDADD = $(GTK_LIBS)
INCLUDES = $(GTK_CFLAGS)
to the Makefile.am.
To try this example out, create a new directory, add the two
files above two it, and copy the testinput.c file from
the gtk/ subdirectory to the new directory. Edit the line:
#include "gtk.h"
in testgtk.c, to read:
#include <gtk/gtk.h>
Now execute the following commands:
automake --add-missing
aclocal
autoconf
You now have a package that can be built in the normal fashion
./configure
make
make install
Notes:
* If you are converting a package that used a pre-1.0 version of
GTK, you should remove the autoconf tests for X. The results
of these tests are included in gtk-config and will be added
to GTK_LIBS and GTK_CFLAGS by the AM_PATH_GTK macro.
Owen Taylor
14 Mar 1997
-1
View File
@@ -29,7 +29,6 @@ IGNORE_HFILES= \
gdkpoly-generic.h \
keyname-table.h \
win32 \
directfb \
x11 \
quartz
+4 -3
View File
@@ -47,12 +47,12 @@ gdk_beep
<SUBSECTION>
gdk_error_trap_push
gdk_error_trap_pop
gdk_error_trap_pop_ignored
<SUBSECTION>
GDK_WINDOWING_X11
GDK_WINDOWING_WIN32
GDK_WINDOWING_QUARTZ
GDK_WINDOWING_DIRECTFB
<SUBSECTION Standard>
GDK_TYPE_GRAB_STATUS
@@ -1007,7 +1007,6 @@ gdk_drag_context_get_type
<TITLE>X Window System Interaction</TITLE>
<FILE>x_interaction</FILE>
GDK_ROOT_WINDOW
GDK_DISPLAY
GDK_WINDOW_XDISPLAY
GDK_WINDOW_XID
GDK_PIXMAP_XDISPLAY
@@ -1056,6 +1055,9 @@ gdk_x11_display_get_startup_notification_id
gdk_x11_display_get_xdisplay
gdk_x11_display_grab
gdk_x11_display_ungrab
gdk_x11_display_error_trap_push
gdk_x11_display_error_trap_pop
gdk_x11_display_error_trap_pop_ignored
gdk_x11_display_set_cursor_theme
gdk_x11_register_standard_event_type
gdk_x11_drawable_get_xdisplay
@@ -1078,7 +1080,6 @@ gdk_x11_get_xatom_name
gdk_x11_get_xatom_name_for_display
<SUBSECTION Private>
gdk_display
GDK_HAVE_WCHAR_H
GDK_HAVE_WCTYPE_H
gdk_x11_pixmap_get_drawable_impl
-36
View File
@@ -326,42 +326,6 @@ available.
@void:
<!-- ##### FUNCTION gdk_error_trap_push ##### -->
<para>
This function allows X errors to be trapped instead of the normal behavior
of exiting the application. It should only be used if it is not possible to
avoid the X error in any other way.
</para>
<example>
<title>Trapping an X error</title>
<programlisting>
gdk_error_trap_push (<!-- -->);
/* ... Call the X function which may cause an error here ... */
/* Flush the X queue to catch errors now. */
gdk_flush (<!-- -->);
if (gdk_error_trap_pop (<!-- -->))
{
/* ... Handle the error here ... */
}
</programlisting>
</example>
@void:
<!-- ##### FUNCTION gdk_error_trap_pop ##### -->
<para>
Removes the X error trap installed with gdk_error_trap_push().
</para>
@void:
@Returns: the X error code, or 0 if no error occurred.
<!-- ##### MACRO GDK_WINDOWING_X11 ##### -->
<para>
This macro is defined if GDK is configured to use the X11 backend.
+5 -6
View File
@@ -11,13 +11,12 @@ They appear in the <structfield>keyval</structfield> field of the
#GdkEventKey structure, which is passed to signal handlers for the
"key-press-event" and "key-release-event" signals.
The complete list of key values can be found in the <filename>&lt;gdk/gdkkeysyms.h&gt;</filename>
header file. <filename>&lt;gdk/gdkkeysyms.h&gt;</filename> is not included in <filename>&lt;gdk/gdk.h&gt;</filename>,
it must be included independently, because the file is quite large.
header file.
</para>
<para>
Key values are regularly updated from the upstream X.org X11 implementation,
so new values are added regularly. They will be prefixed with GDK_ rather than
XF86XK_ or XK_ (for older symbols).
so new values are added regularly. They will be prefixed with GDK_KEY_ rather
than XF86XK_ or XK_ (for older symbols).
</para>
<para>
Key values can be converted into a string representation using
@@ -30,7 +29,7 @@ gdk_keyval_is_lower(). Key values can be converted to upper or lower case
using gdk_keyval_to_upper() and gdk_keyval_to_lower().
</para>
<para>
When it makes sense, key values can be converted to and from
When it makes sense, key values can be converted to and from
Unicode characters with gdk_keyval_to_unicode() and gdk_unicode_to_keyval().
</para>
@@ -270,7 +269,7 @@ Returns: %PANGO_DIRECTION_LTR or %PANGO_DIRECTION_RTL.
<para>
Converts a key value into a symbolic name.
The names are the same as those in the <filename>&lt;gdk/gdkkeysyms.h&gt;</filename> header file
but without the leading "GDK_".
but without the leading "GDK_KEY_".
</para>
@keyval: a key value.
-7
View File
@@ -300,13 +300,6 @@ Leaves a critical region begun with gdk_threads_enter().
@void:
<!-- ##### VARIABLE gdk_threads_mutex ##### -->
<para>
The #GMutex used to implement the critical region for
gdk_threads_enter()/gdk_threads_leave().
</para>
<!-- ##### FUNCTION gdk_threads_set_lock_functions ##### -->
<para>
+96 -97
View File
@@ -117,7 +117,6 @@ content_files = \
running.sgml \
building.sgml \
compiling.sgml \
directfb.sgml \
drawing-model.xml \
glossary.xml \
migrating-2to3.xml \
@@ -146,125 +145,125 @@ expand_content_files = \
# Images to copy into HTML directory
HTML_IMAGES = \
$(top_srcdir)/gtk/stock-icons/24/gtk-about.png \
$(top_srcdir)/gtk/stock-icons/24/gtk-add.png \
$(top_srcdir)/gtk/stock-icons/24/help-about.png \
$(top_srcdir)/gtk/stock-icons/24/list-add.png \
$(top_srcdir)/gtk/stock-icons/20/gtk-apply.png \
$(top_srcdir)/gtk/stock-icons/24/gtk-bold.png \
$(top_srcdir)/gtk/stock-icons/24/format-text-bold.png \
$(top_srcdir)/gtk/stock-icons/20/gtk-cancel.png \
$(top_srcdir)/gtk/stock-icons/24/gtk-caps-lock-warning.png \
$(top_srcdir)/gtk/stock-icons/24/gtk-cdrom.png \
$(top_srcdir)/gtk/stock-icons/24/gtk-clear.png \
$(top_srcdir)/gtk/stock-icons/24/gtk-close.png \
$(top_srcdir)/gtk/stock-icons/24/media-optical.png \
$(top_srcdir)/gtk/stock-icons/24/edit-clear.png \
$(top_srcdir)/gtk/stock-icons/24/window-close.png \
$(top_srcdir)/gtk/stock-icons/24/gtk-connect.png \
$(top_srcdir)/gtk/stock-icons/24/gtk-convert.png \
$(top_srcdir)/gtk/stock-icons/24/gtk-copy.png \
$(top_srcdir)/gtk/stock-icons/24/gtk-cut.png \
$(top_srcdir)/gtk/stock-icons/24/gtk-delete.png \
$(top_srcdir)/gtk/stock-icons/48/gtk-dialog-authentication.png \
$(top_srcdir)/gtk/stock-icons/48/gtk-dialog-error.png \
$(top_srcdir)/gtk/stock-icons/48/gtk-dialog-info.png \
$(top_srcdir)/gtk/stock-icons/48/gtk-dialog-question.png \
$(top_srcdir)/gtk/stock-icons/48/gtk-dialog-warning.png \
$(top_srcdir)/gtk/stock-icons/24/gtk-directory.png \
$(top_srcdir)/gtk/stock-icons/24/edit-copy.png \
$(top_srcdir)/gtk/stock-icons/24/edit-cut.png \
$(top_srcdir)/gtk/stock-icons/24/edit-delete.png \
$(top_srcdir)/gtk/stock-icons/48/dialog-password.png \
$(top_srcdir)/gtk/stock-icons/48/dialog-error.png \
$(top_srcdir)/gtk/stock-icons/48/dialog-information.png \
$(top_srcdir)/gtk/stock-icons/48/dialog-question.png \
$(top_srcdir)/gtk/stock-icons/48/dialog-warning.png \
$(top_srcdir)/gtk/stock-icons/24/folder.png \
$(top_srcdir)/gtk/stock-icons/24/gtk-disconnect.png \
$(top_srcdir)/gtk/stock-icons/32/gtk-dnd.png \
$(top_srcdir)/gtk/stock-icons/32/gtk-dnd-multiple.png \
$(top_srcdir)/gtk/stock-icons/24/gtk-edit.png \
$(top_srcdir)/gtk/stock-icons/24/gtk-execute.png \
$(top_srcdir)/gtk/stock-icons/24/gtk-file.png \
$(top_srcdir)/gtk/stock-icons/24/gtk-find.png \
$(top_srcdir)/gtk/stock-icons/24/gtk-find-and-replace.png \
$(top_srcdir)/gtk/stock-icons/24/gtk-goto-bottom.png \
$(top_srcdir)/gtk/stock-icons/24/gtk-goto-first-ltr.png \
$(top_srcdir)/gtk/stock-icons/24/gtk-goto-first-rtl.png \
$(top_srcdir)/gtk/stock-icons/24/gtk-goto-last-ltr.png \
$(top_srcdir)/gtk/stock-icons/24/gtk-goto-last-rtl.png \
$(top_srcdir)/gtk/stock-icons/24/gtk-goto-top.png \
$(top_srcdir)/gtk/stock-icons/24/gtk-go-back-ltr.png \
$(top_srcdir)/gtk/stock-icons/24/gtk-go-back-rtl.png \
$(top_srcdir)/gtk/stock-icons/24/gtk-go-down.png \
$(top_srcdir)/gtk/stock-icons/24/gtk-go-forward-ltr.png \
$(top_srcdir)/gtk/stock-icons/24/gtk-go-forward-rtl.png \
$(top_srcdir)/gtk/stock-icons/24/gtk-go-up.png \
$(top_srcdir)/gtk/stock-icons/24/gtk-harddisk.png \
$(top_srcdir)/gtk/stock-icons/24/gtk-network.png \
$(top_srcdir)/gtk/stock-icons/24/gtk-help.png \
$(top_srcdir)/gtk/stock-icons/24/gtk-home.png \
$(top_srcdir)/gtk/stock-icons/24/system-run.png \
$(top_srcdir)/gtk/stock-icons/24/document-x-generic.png \
$(top_srcdir)/gtk/stock-icons/24/edit-find.png \
$(top_srcdir)/gtk/stock-icons/24/edit-find-replace.png \
$(top_srcdir)/gtk/stock-icons/24/go-bottom.png \
$(top_srcdir)/gtk/stock-icons/24/go-first-ltr.png \
$(top_srcdir)/gtk/stock-icons/24/go-first-rtl.png \
$(top_srcdir)/gtk/stock-icons/24/go-last-ltr.png \
$(top_srcdir)/gtk/stock-icons/24/go-last-rtl.png \
$(top_srcdir)/gtk/stock-icons/24/go-top.png \
$(top_srcdir)/gtk/stock-icons/24/go-previous-ltr.png \
$(top_srcdir)/gtk/stock-icons/24/go-previous-rtl.png \
$(top_srcdir)/gtk/stock-icons/24/go-down.png \
$(top_srcdir)/gtk/stock-icons/24/go-next-ltr.png \
$(top_srcdir)/gtk/stock-icons/24/go-next-rtl.png \
$(top_srcdir)/gtk/stock-icons/24/go-up.png \
$(top_srcdir)/gtk/stock-icons/24/drive-harddisk.png \
$(top_srcdir)/gtk/stock-icons/24/network-idle.png \
$(top_srcdir)/gtk/stock-icons/24/help-contents.png \
$(top_srcdir)/gtk/stock-icons/24/go-home.png \
$(top_srcdir)/gtk/stock-icons/24/gtk-index.png \
$(top_srcdir)/gtk/stock-icons/24/gtk-indent-ltr.png \
$(top_srcdir)/gtk/stock-icons/24/gtk-indent-rtl.png \
$(top_srcdir)/gtk/stock-icons/24/gtk-unindent-ltr.png \
$(top_srcdir)/gtk/stock-icons/24/gtk-unindent-rtl.png \
$(top_srcdir)/gtk/stock-icons/24/gtk-italic.png \
$(top_srcdir)/gtk/stock-icons/24/gtk-jump-to-ltr.png \
$(top_srcdir)/gtk/stock-icons/24/gtk-jump-to-rtl.png \
$(top_srcdir)/gtk/stock-icons/24/gtk-justify-center.png \
$(top_srcdir)/gtk/stock-icons/24/gtk-justify-fill.png \
$(top_srcdir)/gtk/stock-icons/24/gtk-justify-left.png \
$(top_srcdir)/gtk/stock-icons/24/gtk-justify-right.png \
$(top_srcdir)/gtk/stock-icons/24/gtk-missing-image.png \
$(top_srcdir)/gtk/stock-icons/24/gtk-new.png \
$(top_srcdir)/gtk/stock-icons/24/format-indent-more-ltr.png \
$(top_srcdir)/gtk/stock-icons/24/format-indent-more-rtl.png \
$(top_srcdir)/gtk/stock-icons/24/format-indent-less-ltr.png \
$(top_srcdir)/gtk/stock-icons/24/format-indent-less-rtl.png \
$(top_srcdir)/gtk/stock-icons/24/format-text-italic.png \
$(top_srcdir)/gtk/stock-icons/24/go-jump-ltr.png \
$(top_srcdir)/gtk/stock-icons/24/go-jump-rtl.png \
$(top_srcdir)/gtk/stock-icons/24/format-justify-center.png \
$(top_srcdir)/gtk/stock-icons/24/format-justify-fill.png \
$(top_srcdir)/gtk/stock-icons/24/format-justify-left.png \
$(top_srcdir)/gtk/stock-icons/24/format-justify-right.png \
$(top_srcdir)/gtk/stock-icons/24/image-missing.png \
$(top_srcdir)/gtk/stock-icons/24/document-new.png \
$(top_srcdir)/gtk/stock-icons/20/gtk-no.png \
$(top_srcdir)/gtk/stock-icons/20/gtk-ok.png \
$(top_srcdir)/gtk/stock-icons/24/gtk-open.png \
$(top_srcdir)/gtk/stock-icons/24/document-open.png \
$(top_srcdir)/gtk/stock-icons/24/gtk-orientation-landscape.png \
$(top_srcdir)/gtk/stock-icons/24/gtk-orientation-portrait.png \
$(top_srcdir)/gtk/stock-icons/24/gtk-orientation-reverse-landscape.png \
$(top_srcdir)/gtk/stock-icons/24/gtk-orientation-reverse-portrait.png \
$(top_srcdir)/gtk/stock-icons/24/gtk-paste.png \
$(top_srcdir)/gtk/stock-icons/24/edit-paste.png \
$(top_srcdir)/gtk/stock-icons/24/gtk-preferences.png \
$(top_srcdir)/gtk/stock-icons/24/gtk-print.png \
$(top_srcdir)/gtk/stock-icons/24/gtk-print-error.png \
$(top_srcdir)/gtk/stock-icons/24/gtk-print-paused.png \
$(top_srcdir)/gtk/stock-icons/24/gtk-print-preview.png \
$(top_srcdir)/gtk/stock-icons/24/gtk-print-report.png \
$(top_srcdir)/gtk/stock-icons/24/gtk-print-warning.png \
$(top_srcdir)/gtk/stock-icons/24/gtk-properties.png \
$(top_srcdir)/gtk/stock-icons/24/gtk-quit.png \
$(top_srcdir)/gtk/stock-icons/24/gtk-redo-ltr.png \
$(top_srcdir)/gtk/stock-icons/24/gtk-redo-rtl.png \
$(top_srcdir)/gtk/stock-icons/24/gtk-refresh.png \
$(top_srcdir)/gtk/stock-icons/24/gtk-remove.png \
$(top_srcdir)/gtk/stock-icons/24/gtk-revert-to-saved-ltr.png \
$(top_srcdir)/gtk/stock-icons/24/gtk-revert-to-saved-rtl.png \
$(top_srcdir)/gtk/stock-icons/24/gtk-floppy.png \
$(top_srcdir)/gtk/stock-icons/24/gtk-save.png \
$(top_srcdir)/gtk/stock-icons/24/gtk-save-as.png \
$(top_srcdir)/gtk/stock-icons/24/gtk-select-all.png \
$(top_srcdir)/gtk/stock-icons/24/document-print.png \
$(top_srcdir)/gtk/stock-icons/24/printer-error.png \
$(top_srcdir)/gtk/stock-icons/24/printer-paused.png \
$(top_srcdir)/gtk/stock-icons/24/document-print-preview.png \
$(top_srcdir)/gtk/stock-icons/24/printer-info.png \
$(top_srcdir)/gtk/stock-icons/24/printer-warning.png \
$(top_srcdir)/gtk/stock-icons/24/document-properties.png \
$(top_srcdir)/gtk/stock-icons/24/application-exit.png \
$(top_srcdir)/gtk/stock-icons/24/edit-redo-ltr.png \
$(top_srcdir)/gtk/stock-icons/24/edit-redo-rtl.png \
$(top_srcdir)/gtk/stock-icons/24/view-refresh.png \
$(top_srcdir)/gtk/stock-icons/24/list-remove.png \
$(top_srcdir)/gtk/stock-icons/24/document-revert-ltr.png \
$(top_srcdir)/gtk/stock-icons/24/document-revert-rtl.png \
$(top_srcdir)/gtk/stock-icons/24/media-floppy.png \
$(top_srcdir)/gtk/stock-icons/24/document-save.png \
$(top_srcdir)/gtk/stock-icons/24/document-save-as.png \
$(top_srcdir)/gtk/stock-icons/24/edit-select-all.png \
$(top_srcdir)/gtk/stock-icons/24/gtk-select-color.png \
$(top_srcdir)/gtk/stock-icons/24/gtk-color-picker.png \
$(top_srcdir)/gtk/stock-icons/24/gtk-font.png \
$(top_srcdir)/gtk/stock-icons/24/gtk-sort-ascending.png \
$(top_srcdir)/gtk/stock-icons/24/gtk-sort-descending.png \
$(top_srcdir)/gtk/stock-icons/24/gtk-spell-check.png \
$(top_srcdir)/gtk/stock-icons/24/gtk-stop.png \
$(top_srcdir)/gtk/stock-icons/24/gtk-strikethrough.png \
$(top_srcdir)/gtk/stock-icons/24/view-sort-ascending.png \
$(top_srcdir)/gtk/stock-icons/24/view-sort-descending.png \
$(top_srcdir)/gtk/stock-icons/24/tools-check-spelling.png \
$(top_srcdir)/gtk/stock-icons/24/process-stop.png \
$(top_srcdir)/gtk/stock-icons/24/format-text-strikethrough.png \
$(top_srcdir)/gtk/stock-icons/24/gtk-undelete-ltr.png \
$(top_srcdir)/gtk/stock-icons/24/gtk-undelete-rtl.png \
$(top_srcdir)/gtk/stock-icons/24/gtk-underline.png \
$(top_srcdir)/gtk/stock-icons/24/gtk-undo-ltr.png \
$(top_srcdir)/gtk/stock-icons/24/gtk-undo-rtl.png \
$(top_srcdir)/gtk/stock-icons/24/format-text-underline.png \
$(top_srcdir)/gtk/stock-icons/24/edit-undo-ltr.png \
$(top_srcdir)/gtk/stock-icons/24/edit-undo-rtl.png \
$(top_srcdir)/gtk/stock-icons/20/gtk-yes.png \
$(top_srcdir)/gtk/stock-icons/24/gtk-zoom-100.png \
$(top_srcdir)/gtk/stock-icons/24/gtk-zoom-fit.png \
$(top_srcdir)/gtk/stock-icons/24/gtk-zoom-in.png \
$(top_srcdir)/gtk/stock-icons/24/gtk-zoom-out.png \
$(top_srcdir)/gtk/stock-icons/24/gtk-media-forward-ltr.png \
$(top_srcdir)/gtk/stock-icons/24/gtk-media-forward-rtl.png \
$(top_srcdir)/gtk/stock-icons/24/gtk-media-next-ltr.png \
$(top_srcdir)/gtk/stock-icons/24/gtk-media-next-rtl.png \
$(top_srcdir)/gtk/stock-icons/24/gtk-media-pause.png \
$(top_srcdir)/gtk/stock-icons/24/gtk-media-play-ltr.png \
$(top_srcdir)/gtk/stock-icons/24/gtk-media-play-rtl.png \
$(top_srcdir)/gtk/stock-icons/24/gtk-media-previous-ltr.png \
$(top_srcdir)/gtk/stock-icons/24/gtk-media-previous-rtl.png \
$(top_srcdir)/gtk/stock-icons/24/gtk-media-record.png \
$(top_srcdir)/gtk/stock-icons/24/gtk-media-rewind-ltr.png \
$(top_srcdir)/gtk/stock-icons/24/gtk-media-rewind-rtl.png \
$(top_srcdir)/gtk/stock-icons/24/gtk-media-stop.png \
$(top_srcdir)/gtk/stock-icons/24/gtk-fullscreen.png \
$(top_srcdir)/gtk/stock-icons/24/gtk-leave-fullscreen.png \
$(top_srcdir)/gtk/stock-icons/24/gtk-info.png \
$(top_srcdir)/gtk/stock-icons/24/zoom-original.png \
$(top_srcdir)/gtk/stock-icons/24/zoom-fit-best.png \
$(top_srcdir)/gtk/stock-icons/24/zoom-in.png \
$(top_srcdir)/gtk/stock-icons/24/zoom-out.png \
$(top_srcdir)/gtk/stock-icons/24/media-seek-forward-ltr.png \
$(top_srcdir)/gtk/stock-icons/24/media-seek-forward-rtl.png \
$(top_srcdir)/gtk/stock-icons/24/media-skip-forward-ltr.png \
$(top_srcdir)/gtk/stock-icons/24/media-skip-forward-rtl.png \
$(top_srcdir)/gtk/stock-icons/24/media-playback-pause.png \
$(top_srcdir)/gtk/stock-icons/24/media-playback-start-ltr.png \
$(top_srcdir)/gtk/stock-icons/24/media-playback-start-rtl.png \
$(top_srcdir)/gtk/stock-icons/24/media-seek-backward-ltr.png \
$(top_srcdir)/gtk/stock-icons/24/media-seek-backward-rtl.png \
$(top_srcdir)/gtk/stock-icons/24/media-record.png \
$(top_srcdir)/gtk/stock-icons/24/media-skip-backward-ltr.png \
$(top_srcdir)/gtk/stock-icons/24/media-skip-backward-rtl.png \
$(top_srcdir)/gtk/stock-icons/24/media-playback-stop.png \
$(top_srcdir)/gtk/stock-icons/24/view-fullscreen.png \
$(top_srcdir)/gtk/stock-icons/24/view-restore.png \
$(top_srcdir)/gtk/stock-icons/24/gtk-page-setup.png \
$(srcdir)/images/aboutdialog.png \
$(srcdir)/images/accel-label.png \
$(srcdir)/images/assistant.png \
+9 -14
View File
@@ -330,8 +330,8 @@ How to compile GTK+ itself
<arg>--enable-debug=[no|minimum|yes]</arg>
</group>
<group>
<arg>--disable-visibility</arg>
<arg>--enable-visibility</arg>
<arg>--disable-Bsymbolic</arg>
<arg>--enable-Bsymbolic</arg>
</group>
<group>
<arg>--disable-shm</arg>
@@ -361,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>
@@ -398,7 +398,7 @@ How to compile GTK+ itself
<formalpara>
<title><systemitem>--enable-debug</systemitem></title>
<para>
Turns on various amounts of debugging support. Setting this to 'no'
disables g_assert(), g_return_if_fail(), g_return_val_if_fail() and
@@ -415,15 +415,11 @@ How to compile GTK+ itself
</formalpara>
<formalpara>
<title><systemitem>--disable-visibility</systemitem> and
<systemitem>--enable-visibility</systemitem></title>
<title><systemitem>--disable-Bsymbolic</systemitem> and
<systemitem>--enable-Bsymbolic</systemitem></title>
<para>
The option <systemitem>--disable-visibility</systemitem>
turns off the use of ELF visibility attributes for linking
optimizations. This makes sense while changing GTK+ itself,
since the way in which GTK+ uses visibility attributes
forces a full rebuild of all source files for any header
modification.
The option <systemitem>--disable-Bsymbolic</systemitem>
turns off the use of the -Bsymbolic-functions linker flag.
</para>
</formalpara>
@@ -551,8 +547,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>
-44
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>
+2 -5
View File
@@ -4,7 +4,6 @@
<!ENTITY % local.common.attrib "xmlns:xi CDATA #FIXED 'http://www.w3.org/2003/XInclude'">
<!ENTITY version SYSTEM "version.xml">
]>
<!--ENTITY index-Objects-Grouped SYSTEM "objects_grouped.sgml"-->
<book id="index" xmlns:xi="http://www.w3.org/2003/XInclude">
<bookinfo>
<title>GTK+ Reference Manual</title>
@@ -119,7 +118,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" />
@@ -143,7 +141,6 @@ that is, GUI components such as #GtkButton or #GtkTextView.
<xi:include href="xml/gtkstyle.xml" />
<xi:include href="xml/gtkselection.xml" />
<xi:include href="xml/gtkfeatures.xml" />
<xi:include href="xml/gtktypeutils.xml" />
<xi:include href="xml/gtktesting.xml" />
<xi:include href="xml/filesystem.xml" />
</part>
@@ -283,7 +280,7 @@ that is, GUI components such as #GtkButton or #GtkTextView.
</chapter>
<chapter id="SelectorWidgets">
<title>Selectors (File/Font/Color/Input Devices)</title>
<title>Selectors (Color/File/Font)</title>
<xi:include href="xml/gtkcolorbutton.xml" />
<xi:include href="xml/gtkcolorseldlg.xml" />
<xi:include href="xml/gtkcolorsel.xml" />
@@ -308,6 +305,7 @@ that is, GUI components such as #GtkButton or #GtkTextView.
<xi:include href="xml/gtkbbox.xml" />
<xi:include href="xml/gtkhbbox.xml" />
<xi:include href="xml/gtkvbbox.xml" />
<xi:include href="xml/gtkwrapbox.xml" />
<xi:include href="xml/gtkfixed.xml" />
<xi:include href="xml/gtkpaned.xml" />
<xi:include href="xml/gtkhpaned.xml" />
@@ -369,7 +367,6 @@ that is, GUI components such as #GtkButton or #GtkTextView.
<title>Abstract Base Classes</title>
<xi:include href="xml/gtkbin.xml" />
<xi:include href="xml/gtkcontainer.xml" />
<xi:include href="xml/gtkitem.xml" />
<xi:include href="xml/gtkmenushell.xml" />
<xi:include href="xml/gtkmisc.xml" />
<xi:include href="xml/gtkobject.xml" />
+83 -61
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
@@ -593,6 +594,7 @@ gtk_calendar_select_month
gtk_calendar_select_day
gtk_calendar_mark_day
gtk_calendar_unmark_day
gtk_calendar_get_day_is_marked
gtk_calendar_clear_marks
<SUBSECTION>
@@ -897,9 +899,7 @@ gtk_dialog_response
gtk_dialog_add_button
gtk_dialog_add_buttons
gtk_dialog_add_action_widget
gtk_dialog_get_has_separator
gtk_dialog_set_default_response
gtk_dialog_set_has_separator
gtk_dialog_set_response_sensitive
gtk_dialog_get_response_for_widget
gtk_dialog_get_widget_for_response
@@ -1611,8 +1611,8 @@ gtk_icon_view_get_cursor
gtk_icon_view_selected_foreach
gtk_icon_view_set_selection_mode
gtk_icon_view_get_selection_mode
gtk_icon_view_set_orientation
gtk_icon_view_get_orientation
gtk_icon_view_set_item_orientation
gtk_icon_view_get_item_orientation
gtk_icon_view_set_columns
gtk_icon_view_get_columns
gtk_icon_view_set_item_width
@@ -1832,24 +1832,6 @@ GTK_INVISIBLE_GET_CLASS
gtk_invisible_get_type
</SECTION>
<SECTION>
<FILE>gtkitem</FILE>
<TITLE>GtkItem</TITLE>
GtkItem
gtk_item_select
gtk_item_deselect
gtk_item_toggle
<SUBSECTION Standard>
GTK_ITEM
GTK_IS_ITEM
GTK_TYPE_ITEM
GTK_ITEM_CLASS
GTK_IS_ITEM_CLASS
GTK_ITEM_GET_CLASS
<SUBSECTION Private>
gtk_item_get_type
</SECTION>
<SECTION>
<FILE>gtklabel</FILE>
<TITLE>GtkLabel</TITLE>
@@ -1943,8 +1925,6 @@ gtk_link_button_new
gtk_link_button_new_with_label
gtk_link_button_get_uri
gtk_link_button_set_uri
GtkLinkButtonUriFunc
gtk_link_button_set_uri_hook
gtk_link_button_get_visited
gtk_link_button_set_visited
@@ -2144,7 +2124,7 @@ GTK_MESSAGE_DIALOG_CLASS
GTK_IS_MESSAGE_DIALOG_CLASS
GTK_MESSAGE_DIALOG_GET_CLASS
<SUBSECTION Private>
GtkMessageDialogPriv
GtkMessageDialogPrivate
gtk_message_dialog_get_type
</SECTION>
@@ -2194,7 +2174,7 @@ GTK_MISC_CLASS
GTK_IS_MISC_CLASS
GTK_MISC_GET_CLASS
<SUBSECTION Private>
GtkMiscPriv
GtkMiscPrivate
gtk_misc_get_type
</SECTION>
@@ -2242,12 +2222,10 @@ 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
gtk_notebook_set_group_name
gtk_notebook_get_group_name
gtk_notebook_set_action_widget
gtk_notebook_get_action_widget
GtkNotebookWindowCreationFunc
gtk_notebook_set_window_creation_hook
<SUBSECTION Standard>
GTK_NOTEBOOK
GTK_IS_NOTEBOOK
@@ -2258,7 +2236,7 @@ GTK_NOTEBOOK_GET_CLASS
<SUBSECTION Private>
gtk_notebook_get_type
GtkNotebookTab
GtkNotebookPriv
GtkNotebookPrivate
</SECTION>
<SECTION>
@@ -2347,6 +2325,7 @@ GTK_PLUG_CLASS
GTK_IS_PLUG_CLASS
GTK_PLUG_GET_CLASS
<SUBSECTION Private>
GtkPlugPrivate
gtk_plug_get_type
</SECTION>
@@ -2358,9 +2337,8 @@ gtk_progress_bar_new
gtk_progress_bar_pulse
gtk_progress_bar_set_fraction
gtk_progress_bar_get_fraction
GtkProgressBarOrientation
gtk_progress_bar_set_orientation
gtk_progress_bar_get_orientation
gtk_progress_bar_set_inverted
gtk_progress_bar_get_inverted
gtk_progress_bar_set_show_text
gtk_progress_bar_get_show_text
gtk_progress_bar_set_text
@@ -2377,7 +2355,7 @@ GTK_PROGRESS_BAR_CLASS
GTK_IS_PROGRESS_BAR_CLASS
GTK_PROGRESS_BAR_GET_CLASS
<SUBSECTION Private>
GtkProgressBarPriv
GtkProgressBarPrivate
gtk_progress_bar_get_type
</SECTION>
@@ -2423,7 +2401,7 @@ GTK_RADIO_BUTTON_CLASS
GTK_IS_RADIO_BUTTON_CLASS
GTK_RADIO_BUTTON_GET_CLASS
<SUBSECTION Private>
GtkRadioButtonPriv
GtkRadioButtonPrivate
gtk_radio_button_get_type
</SECTION>
@@ -2447,7 +2425,7 @@ GTK_RADIO_MENU_ITEM_CLASS
GTK_IS_RADIO_MENU_ITEM_CLASS
GTK_RADIO_MENU_ITEM_GET_CLASS
<SUBSECTION Private>
GtkRadioMenuItemPriv
GtkRadioMenuItemPrivate
gtk_radio_menu_item_get_type
</SECTION>
@@ -2731,7 +2709,7 @@ GTK_RULER_CLASS
GTK_IS_RULER_CLASS
GTK_RULER_GET_CLASS
<SUBSECTION Private>
GtkRulerPriv
GtkRulerPrivate
gtk_ruler_get_type
gtk_ruler_draw_ticks
gtk_ruler_draw_pos
@@ -2761,7 +2739,7 @@ GTK_SCALE_CLASS
GTK_IS_SCALE_CLASS
GTK_SCALE_GET_CLASS
<SUBSECTION Private>
GtkScalePriv
GtkScalePrivate
gtk_scale_get_type
</SECTION>
@@ -2921,7 +2899,7 @@ GTK_SIZE_GROUP_CLASS
GTK_IS_SIZE_GROUP_CLASS
GTK_SIZE_GROUP_GET_CLASS
<SUBSECTION Private>
GtkSizeGroupPriv
GtkSizeGroupPrivate
gtk_size_group_get_type
</SECTION>
@@ -2983,7 +2961,7 @@ GTK_SPIN_BUTTON_CLASS
GTK_IS_SPIN_BUTTON_CLASS
GTK_SPIN_BUTTON_GET_CLASS
<SUBSECTION Private>
GtkSpinButtonPriv
GtkSpinButtonPrivate
gtk_spin_button_get_type
</SECTION>
@@ -3030,7 +3008,7 @@ GTK_STATUSBAR_CLASS
GTK_IS_STATUSBAR_CLASS
GTK_STATUSBAR_GET_CLASS
<SUBSECTION Private>
GtkStatusbarPriv
GtkStatusbarPrivate
gtk_statusbar_get_type
</SECTION>
@@ -3068,8 +3046,6 @@ gtk_status_icon_get_title
gtk_status_icon_set_name
gtk_status_icon_set_visible
gtk_status_icon_get_visible
gtk_status_icon_set_blinking
gtk_status_icon_get_blinking
gtk_status_icon_is_embedded
gtk_status_icon_position_menu
gtk_status_icon_get_geometry
@@ -3114,7 +3090,7 @@ GTK_TABLE_CLASS
GTK_IS_TABLE_CLASS
GTK_TABLE_GET_CLASS
<SUBSECTION Private>
GtkTablePriv
GtkTablePrivate
GtkTableChild
GtkTableRowCol
gtk_table_get_type
@@ -3133,7 +3109,7 @@ GTK_TEAROFF_MENU_ITEM_CLASS
GTK_IS_TEAROFF_MENU_ITEM_CLASS
GTK_TEAROFF_MENU_ITEM_GET_CLASS
<SUBSECTION Private>
GtkTearoffMenuItemPriv
GtkTearoffMenuItemPrivate
gtk_tearoff_menu_item_get_type
</SECTION>
@@ -3405,7 +3381,7 @@ GTK_TEXT_TAG_TABLE_CLASS
GTK_IS_TEXT_TAG_TABLE_CLASS
GTK_TEXT_TAG_TABLE_GET_CLASS
<SUBSECTION Private>
GtkTextTagTablePriv
GtkTextTagTablePrivate
gtk_text_tag_table_get_type
</SECTION>
@@ -3610,7 +3586,7 @@ GTK_IS_TOOLBAR_CLASS
GTK_TOOLBAR_GET_CLASS
<SUBSECTION Private>
gtk_toolbar_get_type
GtkToolbarPriv
GtkToolbarPrivate
</SECTION>
<SECTION>
@@ -4606,7 +4582,7 @@ GTK_LIST_STORE_CLASS
GTK_IS_LIST_STORE_CLASS
GTK_LIST_STORE_GET_CLASS
<SUBSECTION Private>
GtkListStorePriv
GtkListStorePrivate
gtk_list_store_get_type
</SECTION>
@@ -4663,7 +4639,7 @@ GTK_VIEWPORT_CLASS
GTK_IS_VIEWPORT_CLASS
GTK_VIEWPORT_GET_CLASS
<SUBSECTION Private>
GtkViewportPriv
GtkViewportPrivate
gtk_viewport_get_type
</SECTION>
@@ -4963,6 +4939,21 @@ gtk_requisition_new
gtk_requisition_copy
gtk_requisition_free
<SUBSECTION>
GtkAlign
gtk_widget_get_halign
gtk_widget_set_halign
gtk_widget_get_valign
gtk_widget_set_valign
gtk_widget_get_margin_left
gtk_widget_set_margin_left
gtk_widget_get_margin_right
gtk_widget_set_margin_right
gtk_widget_get_margin_top
gtk_widget_set_margin_top
gtk_widget_get_margin_bottom
gtk_widget_set_margin_bottom
<SUBSECTION Standard>
GTK_WIDGET
GTK_IS_WIDGET
@@ -4972,6 +4963,7 @@ GTK_IS_WIDGET_CLASS
GTK_WIDGET_GET_CLASS
GTK_TYPE_REQUISITION
<SUBSECTION Private>
GtkWidgetPrivate
gtk_widget_get_type
gtk_requisition_get_type
</SECTION>
@@ -5091,6 +5083,7 @@ GTK_IS_WINDOW_CLASS
GTK_WINDOW_GET_CLASS
<SUBSECTION Private>
GtkWindowPrivate
gtk_window_get_type
GtkWindowGeometryInfo
gtk_window_remove_embedded_xid
@@ -5154,9 +5147,12 @@ gtk_device_grab_add
gtk_device_grab_remove
<SUBSECTION>
GtkFunction
gtk_init_add
gtk_quit_add_destroy
gtk_quit_add
GtkCallbackMarshal
GtkArg
gtk_quit_add_full
gtk_quit_remove
gtk_quit_remove_by_data
@@ -5461,17 +5457,6 @@ gtk_drag_source_add_image_targets
gtk_drag_source_add_uri_targets
</SECTION>
<SECTION>
<FILE>gtktypeutils</FILE>
<TITLE>Types</TITLE>
GtkFunction
GtkCallbackMarshal
GtkArg
<SUBSECTION Private>
GTK_TYPE_IDENTIFIER
gtk_identifier_get_type
</SECTION>
<SECTION>
<FILE>gtkbindings</FILE>
<TITLE>Bindings</TITLE>
@@ -6358,3 +6343,40 @@ GTK_APPLICATION_GET_CLASS
gtk_application_get_type
GtkApplicationPrivate
</SECTION>
<SECTION>
<FILE>gtkwrapbox</FILE>
<TITLE>GtkWrapBox</TITLE>
GtkWrapBox
gtk_wrap_box_new
gtk_wrap_box_insert_child
gtk_wrap_box_reorder_child
GtkWrapAllocationMode
gtk_wrap_box_set_allocation_mode
gtk_wrap_box_get_allocation_mode
GtkWrapBoxSpreading
gtk_wrap_box_set_spreading
gtk_Wrap_box_get_spreading
gtk_wrap_box_set_vertical_spacing
gtk_wrap_box_get_vertical_spacing
gtk_wrap_box_set_horizontal_spacing
gtk_wrap_box_get_horizontal_spacing
gtk_wrap_box_set_minimum_line_children
gtk_wrap_box_get_minimum_line_children
gtk_wrap_box_set_natural_line_children
gtk_wrap_box_get_natural_line_children
<SUBSECTION Standard>
GtkWrapBoxClass
GTK_TYPE_WRAP_BOX
GTK_WRAP_BOX
GTK_WRAP_BOX_CLASS
GTK_IS_WRAP_BOX
GTK_IS_WRAP_BOX_CLASS
GTK_WRAP_BOX_GET_CLASS
<SUBSECTION Private>
gtk_wrap_box_get_type
GtkWrapBoxPrivate
</SECTION>
+1 -1
View File
@@ -80,7 +80,6 @@ gtk_im_context_simple_get_type
gtk_im_multicontext_get_type
gtk_info_bar_get_type
gtk_invisible_get_type
gtk_item_get_type
gtk_label_get_type
gtk_layout_get_type
gtk_link_button_get_type
@@ -179,3 +178,4 @@ gtk_vseparator_get_type
gtk_widget_get_type
gtk_window_get_type
gtk_window_group_get_type
gtk_wrap_box_get_type
+46
View File
@@ -113,6 +113,20 @@
</para>
</section>
<section>
<title>Replace GDK_&lt;keyname&gt; with GDK_KEY_&lt;keyname&gt;</title>
<para>
Key constants have gained a <literal>_KEY</literal>, prefix.
For example, <literal>GDK_a</literal> is now
<literal>GDK_KEY_a</literal>. In GTK+ 2, the old names continue
to be available. In GTK+ 3 however, the old names will require
an explicit include of the
<literal>gdkkeysyms-compat.h</literal> header.
</para>
</section>
<section>
<title>Use cairo for drawing</title>
<para>
@@ -380,6 +394,38 @@ cairo_destroy (cr);
</para>
</section>
<section>
<title>GtkProgressBar orientation</title>
<para>
In GTK+ 2.x, #GtkProgressBar and #GtkCellRendererProgress were using the
GtkProgressBarOrientation enumeration to specify their orientation and
direction. In GTK+ 3, both the widget and the cell renderer implement
#GtkOrientable, and have an additional 'inverted' property to determine
their direction. Therefore, a call to gtk_progress_bar_set_orientation()
needs to be replaced by a pair of calls to
gtk_orientable_set_orientation() and gtk_progress_bar_set_inverted().
The following values correspond:
<table>
<tgroup cols="3">
<colspec colname="1"/>
<colspec colname="2"/>
<colspec colname="3"/>
<thead>
<row><entry>GTK+ 2.x</entry><entry namest="2" nameend="3">GTK+ 3</entry></row>
<row><entry>GtkProgressBarOrientation</entry><entry>GtkOrientation</entry><entry>inverted</entry></row>
</thead>
<tbody>
<row><entry>GTK_PROGRESS_LEFT_TO_RIGHT</entry><entry>GTK_ORIENTATION_HORIZONTAL</entry><entry>FALSE</entry></row>
<row><entry>GTK_PROGRESS_RIGHT_TO_LEFT</entry><entry>GTK_ORIENTATION_HORIZONTAL</entry><entry>TRUE</entry></row>
<row><entry>GTK_PROGRESS_TOP_TO_BOTTOM</entry><entry>GTK_ORIENTATION_VERTICAL</entry><entry>FALSE</entry></row>
<row><entry>GTK_PROGRESS_BOTTOM_TO_TOP</entry><entry>GTK_ORIENTATION_VERTICAL</entry><entry>TRUE</entry></row>
</tbody>
</tgroup>
</table>
</para>
</section>
<section>
<title>Prevent mixed linkage</title>
<para>
+8
View File
@@ -1,12 +1,17 @@
gtkactiongroup.sgml
gtkaboutdialog.sgml
gtkbbox.sgml
gtkbox.sgml
gtkbuilder.sgml
gtkbutton.sgml
gtkcalendar.sgml
gtkcelleditable.sgml
gtkeditable.sgml
gtkhbox.sgml
gtkiconview.sgml
gtkimcontextsimple.sgml
gtkimmulticontext.sgml
gtklinkbutton.sgml
gtkmessagedialog.sgml
gtkobject.sgml
gtkorientable.sgml
@@ -21,6 +26,7 @@ gtkrecentchooserdialog.sgml
gtkrecentchoosermenu.sgml
gtkrecentchooserwidget.sgml
gtkrecentmanager.sgml
gtkscale.sgml
gtkscalebutton.sgml
gtkseparator.sgml
gtkseparatormenuitem.sgml
@@ -29,7 +35,9 @@ gtkstatusbar.sgml
gtkstyle.sgml
gtktesting.sgml
gtktextiter.sgml
gtktexttagtable.sgml
gtktoggleaction.sgml
gtktoolitem.sgml
gtktreednd.sgml
gtktypeutils.sgml
gtkwindow.sgml
+1 -1
View File
@@ -58,7 +58,7 @@ of their children.
<para>
The size requisition phase of the widget layout process operates top-down.
It starts at a top-level widget, typically a #GtkWindow. The top-level widget
asks its child for its size requisition by calling gtk_widget_size_request().
asks its child for its size requisition by calling gtk_size_request_get_size().
To determine its requisition, the child asks its own children for their
requisitions and so on. Finally, the top-level widget will get a requisition
back from its child.
+3 -4
View File
@@ -221,12 +221,11 @@ drops.
<!-- ##### FUNCTION gtk_drag_get_source_widget ##### -->
<para>
Determines the source widget for a drag.
</para>
@context: a (destination side) drag context.
@Returns: if the drag is occurring within a single application,
a pointer to the source widget. Otherwise, %NULL.
@context:
@Returns:
<!-- ##### FUNCTION gtk_drag_highlight ##### -->
-214
View File
@@ -1,214 +0,0 @@
<!-- ##### SECTION Title ##### -->
GtkEditable
<!-- ##### SECTION Short_Description ##### -->
Interface for text-editing widgets
<!-- ##### SECTION Long_Description ##### -->
<para>
The #GtkEditable interface is an interface which should be implemented by
text editing widgets, such as #GtkEntry and #GtkText. It contains functions
for generically manipulating an editable widget, a large number of action
signals used for key bindings, and several signals that an application can
connect to to modify the behavior of a widget.
</para>
<para>
As an example of the latter usage, by connecting
the following handler to "insert_text", an application
can convert all entry into a widget into uppercase.
<example>
<title>Forcing entry to uppercase.</title>
<programlisting>
#include &lt;ctype.h&gt;
void
insert_text_handler (GtkEditable *editable,
const gchar *text,
gint length,
gint *position,
gpointer data)
{
int i;
gchar *result = g_utf8_strup (text, length);
g_signal_handlers_block_by_func (editable,
(gpointer) insert_text_handler, data);
gtk_editable_insert_text (editable, result, length, position);
g_signal_handlers_unblock_by_func (editable,
(gpointer) insert_text_handler, data);
g_signal_stop_emission_by_name (editable, "insert_text");
g_free (result);
}
</programlisting>
</example>
</para>
<!-- ##### SECTION See_Also ##### -->
<para>
</para>
<!-- ##### SECTION Stability_Level ##### -->
<!-- ##### SECTION Image ##### -->
<!-- ##### STRUCT GtkEditable ##### -->
<para>
The #GtkEditable structure is an opaque structure whose members
cannot be directly accessed.
</para>
<!-- ##### SIGNAL GtkEditable::changed ##### -->
<para>
</para>
@editable: the object which received the signal.
<!-- ##### SIGNAL GtkEditable::delete-text ##### -->
<para>
</para>
@editable:
@start_pos:
@end_pos:
<!-- ##### SIGNAL GtkEditable::insert-text ##### -->
<para>
</para>
@editable:
@new_text:
@new_text_length:
@position:
<!-- ##### FUNCTION gtk_editable_select_region ##### -->
<para>
</para>
@editable:
@start_pos:
@end_pos:
<!-- ##### FUNCTION gtk_editable_get_selection_bounds ##### -->
<para>
</para>
@editable:
@start_pos:
@end_pos:
@Returns:
<!-- ##### FUNCTION gtk_editable_insert_text ##### -->
<para>
</para>
@editable:
@new_text:
@new_text_length:
@position:
<!-- ##### FUNCTION gtk_editable_delete_text ##### -->
<para>
</para>
@editable:
@start_pos:
@end_pos:
<!-- ##### FUNCTION gtk_editable_get_chars ##### -->
<para>
</para>
@editable:
@start_pos:
@end_pos:
@Returns:
<!-- ##### FUNCTION gtk_editable_cut_clipboard ##### -->
<para>
</para>
@editable:
<!-- ##### FUNCTION gtk_editable_copy_clipboard ##### -->
<para>
</para>
@editable:
<!-- ##### FUNCTION gtk_editable_paste_clipboard ##### -->
<para>
</para>
@editable:
<!-- ##### FUNCTION gtk_editable_delete_selection ##### -->
<para>
</para>
@editable:
<!-- ##### FUNCTION gtk_editable_set_position ##### -->
<para>
</para>
@editable:
@position:
<!-- ##### FUNCTION gtk_editable_get_position ##### -->
<para>
</para>
@editable:
@Returns:
<!-- ##### FUNCTION gtk_editable_set_editable ##### -->
<para>
</para>
@editable:
@is_editable:
<!-- ##### FUNCTION gtk_editable_get_editable ##### -->
<para>
</para>
@editable:
@Returns:
-58
View File
@@ -22,64 +22,6 @@ typically use the features described here.
<!-- ##### SECTION Image ##### -->
<!-- ##### VARIABLE gtk_major_version ##### -->
<para>
The major version number of the GTK+ library. (e.g. in GTK+ version
1.2.5 this is 1.)
</para>
<para>
This variable is in the library, so represents the
GTK+ library you have linked against. Contrast with the
#GTK_MAJOR_VERSION macro, which represents the major version of the
GTK+ headers you have included.
</para>
<!-- ##### VARIABLE gtk_minor_version ##### -->
<para>
The minor version number of the GTK+ library.
(e.g. in GTK+ version 1.2.5 this is 2.)
</para>
<para>
This variable is in the library, so represents the
GTK+ library you have linked against. Contrast with the
#GTK_MINOR_VERSION macro, which represents the minor version of the
GTK+ headers you have included.
</para>
<!-- ##### VARIABLE gtk_micro_version ##### -->
<para>
The micro version number of the GTK+ library.
(e.g. in GTK+ version 1.2.5 this is 5.)
</para>
<para>
This variable is in the library, so represents the GTK+ library you
have linked against. Contrast with the #GTK_MICRO_VERSION macro, which
represents the micro version of the GTK+ headers you have included.
</para>
<!-- ##### VARIABLE gtk_binary_age ##### -->
<para>
This is the binary age passed to <application>libtool</application>. If
<application>libtool</application> means nothing to you, don't worry
about it. ;-)
</para>
<!-- ##### VARIABLE gtk_interface_age ##### -->
<para>
This is the interface age passed to <application>libtool</application>. If
<application>libtool</application> means nothing to you, don't worry
about it. ;-)
</para>
<!-- ##### FUNCTION gtk_check_version ##### -->
<para>
</para>
@@ -37,7 +37,7 @@ The #GtkFileChooserButton supports the #GtkFileChooserAction<!--
<para>
The #GtkFileChooserButton will ellipsize the label,
and thus will thus request little horizontal space. To give the button
more space, you should call gtk_widget_size_request(),
more space, you should call gtk_size_request_get_size(),
gtk_file_chooser_button_set_width_chars(), or pack the button in
such a way that other interface elements give space to the widget.
</para>
-226
View File
@@ -1,226 +0,0 @@
<!-- ##### SECTION Title ##### -->
GtkFileSelection
<!-- ##### SECTION Short_Description ##### -->
Prompt the user for a file or directory name
<!-- ##### SECTION Long_Description ##### -->
<para>
#GtkFileSelection has been superseded by the newer #GtkFileChooser family
of widgets.
</para>
<para>
#GtkFileSelection should be used to retrieve file or directory names from
the user. It will create a new dialog window containing a directory list,
and a file list corresponding to the current working directory. The filesystem
can be navigated using the directory list or the drop-down history menu.
Alternatively, the TAB key can be used to navigate using filename
completion - common in text based editors such as emacs and jed.
</para>
<para>
File selection dialogs are created with a call to gtk_file_selection_new().
</para>
<para>
The default filename can be set using gtk_file_selection_set_filename() and the selected filename retrieved using gtk_file_selection_get_filename().
</para>
<para>
Use gtk_file_selection_complete() to display files and directories
that match a given pattern. This can be used for example, to show only
*.txt files, or only files beginning with gtk*.
</para>
<para>
Simple file operations; create directory, delete file, and rename file, are available from buttons at the top of the dialog. These can be hidden using gtk_file_selection_hide_fileop_buttons() and shown again using gtk_file_selection_show_fileop_buttons().
</para>
<para>
<example>
<title>Getting a filename from the user.</title>
<programlisting>
/* The file selection widget and the string to store the chosen filename */
void store_filename (GtkWidget *widget, gpointer user_data) {
GtkWidget *file_selector = GTK_WIDGET (user_data);
const gchar *selected_filename;
selected_filename = gtk_file_selection_get_filename (GTK_FILE_SELECTION (file_selector));
g_print ("Selected filename: &percnt;s\n", selected_filename);
}
void create_file_selection (void) {
GtkWidget *file_selector;
/* Create the selector */
file_selector = gtk_file_selection_new ("Please select a file for editing.");
g_signal_connect (GTK_FILE_SELECTION (file_selector)->ok_button,
"clicked",
G_CALLBACK (store_filename),
file_selector);
/* Ensure that the dialog box is destroyed when the user clicks a button. */
g_signal_connect_swapped (GTK_FILE_SELECTION (file_selector)->ok_button,
"clicked",
G_CALLBACK (gtk_widget_destroy),
file_selector);
g_signal_connect_swapped (GTK_FILE_SELECTION (file_selector)->cancel_button,
"clicked",
G_CALLBACK (gtk_widget_destroy),
file_selector);
/* Display that dialog */
gtk_widget_show (file_selector);
}
</programlisting>
</example>
</para>
<!-- ##### SECTION See_Also ##### -->
<para>
<variablelist>
<varlistentry>
<term>#GtkDialog</term>
<listitem><para>Add your own widgets into the #GtkFileSelection.</para></listitem>
</varlistentry>
</variablelist>
</para>
<!-- ##### SECTION Stability_Level ##### -->
<!-- ##### STRUCT GtkFileSelection ##### -->
<para>
The #GtkFileSelection struct contains the following #GtkWidget fields:
</para>
@dir_list:
@file_list:
@selection_entry:
@selection_text:
@main_vbox:
@ok_button:
@cancel_button: the two main buttons that signals should be connected
to in order to perform an action when the user hits either OK or
Cancel.
@help_button:
@history_pulldown: the #GtkOptionMenu used to create the drop-down
directory history.
@history_menu:
@history_list:
@fileop_dialog: the dialog box used to display the #GtkFileSelection.
It can be customized by adding/removing widgets from it using the
standard #GtkDialog functions.
@fileop_entry:
@fileop_file:
@cmpl_state:
@fileop_c_dir:
@fileop_del_file:
@fileop_ren_file: the buttons that appear at the top of the file
selection dialog. These "operation buttons" can be hidden and
redisplayed with gtk_file_selection_hide_fileop_buttons() and
gtk_file_selection_show_fileop_buttons() respectively.
@button_area:
@action_area:
<!-- ##### ARG GtkFileSelection:filename ##### -->
<para>
</para>
<!-- ##### ARG GtkFileSelection:select-multiple ##### -->
<para>
</para>
<!-- ##### ARG GtkFileSelection:show-fileops ##### -->
<para>
</para>
<!-- ##### FUNCTION gtk_file_selection_new ##### -->
<para>
Creates a new file selection dialog box. By default it will contain a #GtkTreeView of the application's current working directory, and a file listing. Operation buttons that allow the user to create a directory, delete files and rename files, are also present.
</para>
@title: a message that will be placed in the file requestor's titlebar.
@Returns: the new file selection.
@Deprecated: Use gtk_file_chooser_dialog_new() instead
<!-- ##### FUNCTION gtk_file_selection_set_filename ##### -->
<para>
</para>
@filesel:
@filename:
<!-- ##### FUNCTION gtk_file_selection_get_filename ##### -->
<para>
</para>
@filesel:
@Returns:
<!-- ##### FUNCTION gtk_file_selection_complete ##### -->
<para>
Will attempt to match @pattern to a valid filenames or subdirectories in the current directory. If a match can be made, the matched filename will appear in the text entry field of the file selection dialog.
If a partial match can be made, the "Files" list will contain those
file names which have been partially matched, and the "Folders"
list those directories which have been partially matched.
</para>
@filesel: a #GtkFileSelection.
@pattern: a string of characters which may or may not match any filenames in the current directory.
<!-- ##### FUNCTION gtk_file_selection_show_fileop_buttons ##### -->
<para>
Shows the file operation buttons, if they have previously been hidden. The rest of the widgets in the dialog will be resized accordingly.
</para>
@filesel: a #GtkFileSelection.
<!-- ##### FUNCTION gtk_file_selection_hide_fileop_buttons ##### -->
<para>
Hides the file operation buttons that normally appear at the top of the dialog. Useful if you wish to create a custom file selector, based on #GtkFileSelection.
</para>
@filesel: a #GtkFileSelection.
<!-- ##### FUNCTION gtk_file_selection_get_selections ##### -->
<para>
</para>
@filesel:
@Returns:
<!-- ##### FUNCTION gtk_file_selection_set_select_multiple ##### -->
<para>
</para>
@filesel:
@select_multiple:
<!-- ##### FUNCTION gtk_file_selection_get_select_multiple ##### -->
<para>
</para>
@filesel:
@Returns:
@@ -1,55 +0,0 @@
<!-- ##### SECTION Title ##### -->
GtkIMContextSimple
<!-- ##### SECTION Short_Description ##### -->
An input method context supporting table-based input methods
<!-- ##### SECTION Long_Description ##### -->
<para>
</para>
<!-- ##### SECTION See_Also ##### -->
<para>
</para>
<!-- ##### SECTION Stability_Level ##### -->
<!-- ##### SECTION Image ##### -->
<!-- ##### STRUCT GtkIMContextSimple ##### -->
<para>
</para>
<!-- ##### FUNCTION gtk_im_context_simple_new ##### -->
<para>
</para>
@void:
@Returns:
<!-- ##### FUNCTION gtk_im_context_simple_add_table ##### -->
<para>
</para>
@context_simple:
@data:
@max_seq_len:
@n_seqs:
<!-- ##### MACRO GTK_MAX_COMPOSE_LEN ##### -->
<para>
The maximum length of sequences in compose tables.
</para>
@@ -1,64 +0,0 @@
<!-- ##### SECTION Title ##### -->
GtkIMMulticontext
<!-- ##### SECTION Short_Description ##### -->
An input method context supporting multiple, loadable input methods
<!-- ##### SECTION Long_Description ##### -->
<para>
</para>
<!-- ##### SECTION See_Also ##### -->
<para>
</para>
<!-- ##### SECTION Stability_Level ##### -->
<!-- ##### SECTION Image ##### -->
<!-- ##### STRUCT GtkIMMulticontext ##### -->
<para>
</para>
<!-- ##### FUNCTION gtk_im_multicontext_new ##### -->
<para>
</para>
@void:
@Returns:
<!-- ##### FUNCTION gtk_im_multicontext_append_menuitems ##### -->
<para>
</para>
@context:
@menushell:
<!-- ##### FUNCTION gtk_im_multicontext_get_context_id ##### -->
<para>
</para>
@context:
@Returns:
<!-- ##### FUNCTION gtk_im_multicontext_set_context_id ##### -->
<para>
</para>
@context:
@context_id:
-75
View File
@@ -1,75 +0,0 @@
<!-- ##### SECTION Title ##### -->
GtkItem
<!-- ##### SECTION Short_Description ##### -->
Abstract base class for GtkMenuItem, GtkListItem and GtkTreeItem
<!-- ##### SECTION Long_Description ##### -->
<para>
The #GtkItem widget is an abstract base class for #GtkMenuItem, #GtkListItem
and #GtkTreeItem.
</para>
<!-- ##### SECTION See_Also ##### -->
<para>
</para>
<!-- ##### SECTION Stability_Level ##### -->
<!-- ##### SECTION Image ##### -->
<!-- ##### STRUCT GtkItem ##### -->
<para>
The #GtkItem-struct struct contains private data only, and
should be accessed using the functions below.
</para>
<!-- ##### SIGNAL GtkItem::deselect ##### -->
<para>
Emitted when the item is deselected.
</para>
@item: the object which received the signal.
<!-- ##### SIGNAL GtkItem::select ##### -->
<para>
Emitted when the item is selected.
</para>
@item: the object which received the signal.
<!-- ##### SIGNAL GtkItem::toggle ##### -->
<para>
Emitted when the item is toggled.
</para>
@item: the object which received the signal.
<!-- ##### FUNCTION gtk_item_select ##### -->
<para>
Emits the "select" signal on the given item.
</para>
@item: a #GtkItem.
<!-- ##### FUNCTION gtk_item_deselect ##### -->
<para>
Emits the "deselect" signal on the given item.
</para>
@item: a #GtkItem.
<!-- ##### FUNCTION gtk_item_toggle ##### -->
<para>
Emits the "toggle" signal on the given item.
</para>
@item: a #GtkItem.
-139
View File
@@ -1,139 +0,0 @@
<!-- ##### SECTION Title ##### -->
GtkLinkButton
<!-- ##### SECTION Short_Description ##### -->
Create buttons bound to a URL
<!-- ##### SECTION Long_Description ##### -->
<para>
A #GtkLinkButton is a #GtkButton with a hyperlink, similar to the one
used by web browsers, which triggers an action when clicked. It is useful
to show quick links to resources.
</para>
<para>
A link button is created by calling either gtk_link_button_new() or
gtk_link_button_new_with_label(). If using the former, the URI you pass
to the constructor is used as a label for the widget.
</para>
<para>
The URI bound to a #GtkLinkButton can be set specifically using
gtk_link_button_set_uri(), and retrieved using gtk_link_button_get_uri().
</para>
<para>
#GtkLinkButton offers a global hook, which is called when the used clicks
on it: see gtk_link_button_set_uri_hook().
</para>
<para>
#GtkLinkButton was added in GTK+ 2.10.
</para>
<!-- ##### SECTION See_Also ##### -->
<para>
#GtkButton
</para>
<!-- ##### SECTION Stability_Level ##### -->
<!-- ##### SECTION Image ##### -->
<!-- ##### STRUCT GtkLinkButton ##### -->
<para>
The #GtkLinkButton struct contains private data only, and should be
manipulated using the functions below.
</para>
<!-- ##### ARG GtkLinkButton:uri ##### -->
<para>
</para>
<!-- ##### ARG GtkLinkButton:visited ##### -->
<para>
</para>
<!-- ##### FUNCTION gtk_link_button_new ##### -->
<para>
</para>
@uri:
@Returns:
<!-- ##### FUNCTION gtk_link_button_new_with_label ##### -->
<para>
</para>
@uri:
@label:
@Returns:
<!-- ##### FUNCTION gtk_link_button_get_uri ##### -->
<para>
</para>
@link_button:
@Returns:
<!-- ##### FUNCTION gtk_link_button_set_uri ##### -->
<para>
</para>
@link_button:
@uri:
<!-- ##### USER_FUNCTION GtkLinkButtonUriFunc ##### -->
<para>
The type of a function which is called when the #GtkLinkButton is
clicked.
</para>
@button: the #GtkLinkButton which was clicked
@link_: the URI to which the clicked #GtkLinkButton points
@user_data: user data that was passed when the function was registered
with gtk_link_button_set_uri_hook()
<!-- ##### FUNCTION gtk_link_button_set_uri_hook ##### -->
<para>
</para>
@func:
@data:
@destroy:
@Returns:
<!-- ##### FUNCTION gtk_link_button_get_visited ##### -->
<para>
</para>
@link_button:
@Returns:
<!-- ##### FUNCTION gtk_link_button_set_visited ##### -->
<para>
</para>
@link_button:
@visited:
+3 -3
View File
@@ -392,11 +392,11 @@ widget and this function does nothing.
<!-- ##### FUNCTION gtk_grab_get_current ##### -->
<para>
Queries the current grab of the default window group.
</para>
@void:
@Returns: The widget which currently has the grab or %NULL if no grab is active.
@void:
@Returns:
<!-- ##### FUNCTION gtk_grab_remove ##### -->
+5
View File
@@ -19,6 +19,11 @@ positioned within its allocated area. Note that if the widget is added to
a container in such a way that it expands automatically to fill its
allocated area, the alignment settings will not alter the widgets position.
</para>
<para>
Note that the desired effect can in most cases be achieved by using the
#GtkWidget:halign, #GtkWidget:valign and #GtkWidget:margin properties
on the child widget.
</para>
<!-- ##### SECTION See_Also ##### -->
<para>
@@ -140,11 +140,10 @@ Sets the group of a radio menu item, or changes it.
<!-- ##### FUNCTION gtk_radio_menu_item_get_group ##### -->
<para>
Returns the group to which the radio menu item belongs, as a #GList of
#GtkRadioMenuItem. The list belongs to GTK+ and should not be freed.
</para>
@radio_menu_item: a #GtkRadioMenuItem.
@Returns: the group of @radio_menu_item.
@radio_menu_item:
@Returns:
-193
View File
@@ -1,193 +0,0 @@
<!-- ##### SECTION Title ##### -->
GtkScale
<!-- ##### SECTION Short_Description ##### -->
Base class for GtkHScale and GtkVScale
<!-- ##### SECTION Long_Description ##### -->
<para>
A #GtkScale is a slider control used to select a numeric value.
To use it, you'll probably want to investigate the methods on
its base class, #GtkRange, in addition to the methods for #GtkScale itself.
To set the value of a scale, you would normally use gtk_range_set_value().
To detect changes to the value, you would normally use the "value_changed"
signal.
</para>
<refsect2 id="GtkScale-BUILDER-UI"><title>GtkScale as GtkBuildable</title>
<para>
GtkScale supports a custom &lt;marks&gt; element, which
can contain multiple &lt;mark&gt; elements. The "value" and "position"
attributes have the same meaning as gtk_scale_add_mark() parameters of the
same name. If the element is not empty, its content is taken as the markup
to show at the mark. It can be translated with the usual "translatable and
"context" attributes.
</para>
</refsect2>
<!-- ##### SECTION See_Also ##### -->
<para>
</para>
<!-- ##### SECTION Stability_Level ##### -->
<!-- ##### SECTION Image ##### -->
<!-- ##### STRUCT GtkScale ##### -->
<para>
The fields of the #GtkScale-struct struct should only be accessed via
the accessor functions.
</para>
<!-- ##### SIGNAL GtkScale::format-value ##### -->
<para>
</para>
@scale:
@value:
@Returns:
<!-- ##### ARG GtkScale:digits ##### -->
<para>
</para>
<!-- ##### ARG GtkScale:draw-value ##### -->
<para>
</para>
<!-- ##### ARG GtkScale:value-pos ##### -->
<para>
</para>
<!-- ##### ARG GtkScale:slider-length ##### -->
<para>
</para>
<!-- ##### ARG GtkScale:value-spacing ##### -->
<para>
</para>
<!-- ##### FUNCTION gtk_scale_new ##### -->
<para>
</para>
@orientation:
@adjustment:
@Returns:
<!-- ##### FUNCTION gtk_scale_new_with_range ##### -->
<para>
</para>
@orientation:
@min:
@max:
@step:
@Returns:
<!-- ##### FUNCTION gtk_scale_set_digits ##### -->
<para>
</para>
@scale:
@digits:
<!-- ##### FUNCTION gtk_scale_set_draw_value ##### -->
<para>
</para>
@scale:
@draw_value:
<!-- ##### FUNCTION gtk_scale_set_value_pos ##### -->
<para>
</para>
@scale:
@pos:
<!-- ##### FUNCTION gtk_scale_get_digits ##### -->
<para>
</para>
@scale:
@Returns:
<!-- ##### FUNCTION gtk_scale_get_draw_value ##### -->
<para>
</para>
@scale:
@Returns:
<!-- ##### FUNCTION gtk_scale_get_value_pos ##### -->
<para>
</para>
@scale:
@Returns:
<!-- ##### FUNCTION gtk_scale_get_layout ##### -->
<para>
</para>
@scale:
@Returns:
<!-- ##### FUNCTION gtk_scale_get_layout_offsets ##### -->
<para>
</para>
@scale:
@x:
@y:
<!-- ##### FUNCTION gtk_scale_add_mark ##### -->
<para>
</para>
@scale:
@value:
@position:
@markup:
<!-- ##### FUNCTION gtk_scale_clear_marks ##### -->
<para>
</para>
@scale:
+15
View File
@@ -44,6 +44,21 @@ vertical size from the vertical requisition of all widgets that can be
reached from the widget by a chain of size groups of type
%GTK_SIZE_GROUP_VERTICAL or %GTK_SIZE_GROUP_BOTH.
</para>
<para>
Note that only non-contextual sizes of every widget are ever consulted
by size groups (since size groups have no knowledge of what size a widget
will be allocated in one dimension, it cannot derive how much height
a widget will receive for a given width). When grouping widgets that
trade height for width in mode %GTK_SIZE_GROUP_VERTICAL or %GTK_SIZE_GROUP_BOTH:
the height for the minimum width will be the requested height for all
widgets in the group. The same is of course true when horizontally grouping
width for height widgets.
</para>
<para>
Widgets that trade height-for-width should set a reasonably large minimum width
by way of GtkLabel:width-chars for instance. Widgets with static sizes as well
as widgets that grow (such as ellipsizing text) need no such considerations.
</para>
<refsect2 id="GtkSizeGroup-BUILDER-UI">
<title>GtkSizeGroup as GtkBuildable</title>
<para>
@@ -1,125 +0,0 @@
<!-- ##### SECTION Title ##### -->
GtkTextTagTable
<!-- ##### SECTION Short_Description ##### -->
Collection of tags that can be used together
<!-- ##### SECTION Long_Description ##### -->
<para>
You may wish to begin by reading the <link linkend="TextWidget">text widget
conceptual overview</link> which gives an overview of all the objects and data
types related to the text widget and how they work together.
</para>
<para>
</para>
<!-- ##### SECTION See_Also ##### -->
<para>
</para>
<!-- ##### SECTION Stability_Level ##### -->
<!-- ##### SECTION Image ##### -->
<!-- ##### STRUCT GtkTextTagTable ##### -->
<para>
</para>
<!-- ##### SIGNAL GtkTextTagTable::tag-added ##### -->
<para>
</para>
@texttagtable: the object which received the signal.
@arg1:
<!-- ##### SIGNAL GtkTextTagTable::tag-changed ##### -->
<para>
</para>
@texttagtable: the object which received the signal.
@arg1:
@arg2:
<!-- ##### SIGNAL GtkTextTagTable::tag-removed ##### -->
<para>
</para>
@texttagtable: the object which received the signal.
@arg1:
<!-- ##### USER_FUNCTION GtkTextTagTableForeach ##### -->
<para>
</para>
@tag:
@data:
<!-- ##### FUNCTION gtk_text_tag_table_new ##### -->
<para>
</para>
@void:
@Returns:
<!-- ##### FUNCTION gtk_text_tag_table_add ##### -->
<para>
</para>
@table:
@tag:
<!-- ##### FUNCTION gtk_text_tag_table_remove ##### -->
<para>
</para>
@table:
@tag:
<!-- ##### FUNCTION gtk_text_tag_table_lookup ##### -->
<para>
</para>
@table:
@name:
@Returns:
<!-- ##### FUNCTION gtk_text_tag_table_foreach ##### -->
<para>
</para>
@table:
@func:
@data:
<!-- ##### FUNCTION gtk_text_tag_table_get_size ##### -->
<para>
</para>
@table:
@Returns:
-51
View File
@@ -1,51 +0,0 @@
<!-- ##### SECTION Title ##### -->
Types
<!-- ##### SECTION Short_Description ##### -->
Handle run-time type creation
<!-- ##### SECTION Long_Description ##### -->
<para>
The GTK+ type system is extensible. Because of that, types have to be
managed at runtime.
</para>
<!-- ##### SECTION See_Also ##### -->
<para>
</para>
<!-- ##### SECTION Stability_Level ##### -->
<!-- ##### SECTION Image ##### -->
<!-- ##### USER_FUNCTION GtkFunction ##### -->
<para>
Defines a function pointer.
</para>
@data: #gpointer
@Returns: #gint
<!-- ##### USER_FUNCTION GtkCallbackMarshal ##### -->
<para>
Defines a function pointer.
</para>
@object: #GtkObject*
@data: #gpointer
@n_args: #guint
@args: #GtkArg*
<!-- ##### STRUCT GtkArg ##### -->
<para>
This is a structure that we use to pass in typed values (and names).
</para>
@type:
@name:
+9 -7
View File
@@ -33,7 +33,7 @@ find_toplevel_window (Window xid)
do
{
if (XQueryTree (GDK_DISPLAY (), xid, &root,
if (XQueryTree (GDK_DISPLAY_XDISPLAY (gdk_display_get_default ()), xid, &root,
&parent, &children, &nchildren) == 0)
{
g_warning ("Couldn't find window manager window");
@@ -82,7 +82,7 @@ remove_shaped_area (GdkPixbuf *pixbuf,
gdk_pixbuf_get_height (pixbuf));
gdk_pixbuf_fill (retval, 0);
rectangles = XShapeGetRectangles (GDK_DISPLAY (), window,
rectangles = XShapeGetRectangles (GDK_DISPLAY_XDISPLAY (gdk_display_get_default ()), window,
ShapeBounding, &rectangle_count, &rectangle_order);
for (i = 0; i < rectangle_count; i++)
@@ -130,7 +130,7 @@ take_window_shot (Window child,
GdkPixbuf *tmp, *tmp2;
GdkPixbuf *retval;
disp = GDK_DISPLAY ();
disp = GDK_DISPLAY_XDISPLAY (gdk_display_get_default ());
w = GDK_ROOT_WINDOW ();
if (include_decoration)
@@ -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 ())
{
+12 -8
View File
@@ -21,7 +21,7 @@ find_toplevel_window (Window xid)
do
{
if (XQueryTree (GDK_DISPLAY (), xid, &root,
if (XQueryTree (GDK_DISPLAY_XDISPLAY (gdk_display_get_default ()), xid, &root,
&parent, &children, &nchildren) == 0)
{
g_warning ("Couldn't find window manager window");
@@ -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);
@@ -268,7 +270,7 @@ create_accel_label (void)
info = new_widget_info ("accel-label", box, SMALL);
gtk_widget_add_accelerator (button, "activate", accel_group, GDK_Q, GDK_CONTROL_MASK,
gtk_widget_add_accelerator (button, "activate", accel_group, GDK_KEY_Q, GDK_CONTROL_MASK,
GTK_ACCEL_VISIBLE | GTK_ACCEL_LOCKED);
return info;
@@ -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);
}
+12 -20
View File
@@ -1910,7 +1910,7 @@ given item, and perform the cast. Some common ones you will see are:</para>
G_OBJECT (object)
GTK_WIDGET (widget)
GTK_OBJECT (object)
GTK_SIGNAL_FUNC (function)
G_CALLBACK (function)
GTK_CONTAINER (container)
GTK_WINDOW (window)
GTK_BOX (box)
@@ -5369,8 +5369,8 @@ widget.</para>
the widget both looks and operates by using the function</para>
<programlisting role="C">
void gtk_calendar_display_options( GtkCalendar *calendar,
GtkCalendarDisplayOptions flags );
void gtk_calendar_set_display_options( GtkCalendar *calendar,
GtkCalendarDisplayOptions flags );
</programlisting>
<para>The <literal>flags</literal> argument can be formed by combining either of the
@@ -5405,14 +5405,6 @@ number for each week should be displayed down the left side of the
calendar. (eg. Jan 1 = Week 1,Dec 31 = Week 52).</para>
</listitem>
</varlistentry>
<varlistentry>
<term><literal>GTK_CALENDAR_WEEK_START_MONDAY</literal></term>
<listitem><para>this option states that the
calander week will start on Monday instead of Sunday which is the
default. This only affects the order in which days are displayed from
left to right.</para>
</listitem>
</varlistentry>
</variablelist>
<para>The following functions are used to set the the currently displayed
@@ -5678,7 +5670,7 @@ static void calendar_set_flags( CalendarData *calendar )
options = options + (1 &lt;&lt; i);
}
if (calendar-&gt;window)
gtk_calendar_display_options (GTK_CALENDAR (calendar-&gt;window), options);
gtk_calendar_set_display_options (GTK_CALENDAR (calendar-&gt;window), options);
}
static void calendar_toggle_flag( GtkWidget *toggle,
@@ -6153,7 +6145,7 @@ gint main( gint argc,
gtk_widget_set_events (drawingarea, GDK_BUTTON_PRESS_MASK);
g_signal_connect (GTK_OBJECT (drawingarea), "event",
GTK_SIGNAL_FUNC (area_event), (gpointer) drawingarea);
G_CALLBACK (area_event), (gpointer) drawingarea);
/* Add drawingarea to window, then show them both */
@@ -7650,7 +7642,7 @@ the toolbar widget.</para>
"Closes this app", /* this button's tooltip */
"Private", /* tooltip private info */
iconw, /* icon widget */
GTK_SIGNAL_FUNC (delete_event), /* a signal */
G_CALLBACK (delete_event), /* a signal */
NULL);
gtk_toolbar_append_space (GTK_TOOLBAR (toolbar)); /* space after item */
</programlisting>
@@ -7674,7 +7666,7 @@ widget, so that we can work with it in the normal way.</para>
"Only icons in toolbar", /* tooltip */
"Private", /* tooltip private string */
iconw, /* icon */
GTK_SIGNAL_FUNC (radio_event), /* signal */
G_CALLBACK (radio_event), /* signal */
toolbar); /* data for signal */
gtk_toolbar_append_space (GTK_TOOLBAR (toolbar));
</programlisting>
@@ -7700,7 +7692,7 @@ tutorial).</para>
"Only texts in toolbar",
"Private",
iconw,
GTK_SIGNAL_FUNC (radio_event),
G_CALLBACK (radio_event),
toolbar);
gtk_toolbar_append_space (GTK_TOOLBAR (toolbar));
@@ -7713,7 +7705,7 @@ tutorial).</para>
"Icons and text in toolbar",
"Private",
iconw,
GTK_SIGNAL_FUNC (radio_event),
G_CALLBACK (radio_event),
toolbar);
gtk_toolbar_append_space (GTK_TOOLBAR (toolbar));
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (both_button), TRUE);
@@ -7734,7 +7726,7 @@ between them).</para>
"Toolbar with or without tips",
"Private",
iconw,
GTK_SIGNAL_FUNC (toggle_event),
G_CALLBACK (toggle_event),
toolbar);
gtk_toolbar_append_space (GTK_TOOLBAR (toolbar));
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (tooltips_button), TRUE);
@@ -15073,10 +15065,10 @@ gtk_dial_set_adjustment (GtkDial *dial,
g_object_ref (GTK_OBJECT (dial-&gt;adjustment));
g_signal_connect (GTK_OBJECT (adjustment), "changed",
GTK_SIGNAL_FUNC (gtk_dial_adjustment_changed),
G_CALLBACK (gtk_dial_adjustment_changed),
(gpointer) dial);
g_signal_connect (GTK_OBJECT (adjustment), "value_changed",
GTK_SIGNAL_FUNC (gtk_dial_adjustment_value_changed),
G_CALLBACK (gtk_dial_adjustment_value_changed),
(gpointer) dial);
dial-&gt;old_value = adjustment-&gt;value;
+1 -1
View File
@@ -160,7 +160,7 @@ static void calendar_set_flags( CalendarData *calendar )
options = options + (1 << i);
}
if (calendar->window)
gtk_calendar_display_options (GTK_CALENDAR (calendar->window), options);
gtk_calendar_set_display_options (GTK_CALENDAR (calendar->window), options);
}
static void calendar_toggle_flag( GtkWidget *toggle,
+2 -2
View File
@@ -97,7 +97,7 @@ gint main( gint argc,
/* Attach to the "delete" and "destroy" events so we can exit */
g_signal_connect (GTK_OBJECT (window), "delete_event",
GTK_SIGNAL_FUNC (destroy_window), (gpointer) window);
G_CALLBACK (destroy_window), (gpointer) window);
/* Create drawingarea, set size and catch button events */
@@ -113,7 +113,7 @@ gint main( gint argc,
gtk_widget_set_events (drawingarea, GDK_BUTTON_PRESS_MASK);
g_signal_connect (GTK_OBJECT (drawingarea), "event",
GTK_SIGNAL_FUNC (area_event), (gpointer) drawingarea);
G_CALLBACK (area_event), (gpointer) drawingarea);
/* Add drawingarea to window, then show them both */
+9 -9
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 =
@@ -84,6 +84,7 @@ gdk_public_h_sources = \
gdkinput.h \
gdkkeys.h \
gdkkeysyms.h \
gdkkeysyms-compat.h \
gdkpango.h \
gdkpixbuf.h \
gdkpixmap.h \
@@ -155,10 +156,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)
@@ -175,13 +172,13 @@ libgdk_win32_3_0_la_LDFLAGS = -Wl,win32/rc/gdk-win32-res.o -export-symbols $(src
if HAVE_INTROSPECTION
introspection_files = \
$(gdk_public_h_sources) \
$(filter-out gdkkeysyms-compat.h, $(gdk_public_h_sources)) \
$(gdk_c_sources) \
gdkenumtypes.c \
gdkenumtypes.h
Gdk-3.0.gir: $(gdktargetlib) Makefile
Gdk_3_0_gir_SCANNERFLAGS = --strip-prefix=Gdk
Gdk_3_0_gir_SCANNERFLAGS = --warn-all
Gdk_3_0_gir_INCLUDES = Gio-2.0 GdkPixbuf-2.0 Pango-1.0 cairo-1.0
Gdk_3_0_gir_LIBS = $(gdktargetlib)
Gdk_3_0_gir_FILES = $(introspection_files)
@@ -229,12 +226,15 @@ x11_introspection_files = \
x11/gdkx.h
GdkX11-3.0.gir: $(gdktargetlib) Gdk-3.0.gir Makefile
GdkX11_3_0_gir_SCANNERFLAGS = --strip-prefix=gdk_x11
GdkX11_3_0_gir_SCANNERFLAGS = --warn-all --strip-prefix=Gdk
GdkX11_3_0_gir_INCLUDES = Gio-2.0 Gdk-3.0 GdkPixbuf-2.0 Pango-1.0 xlib-2.0
GdkX11_3_0_gir_LIBS = $(gdktargetlib)
GdkX11_3_0_gir_FILES = $(x11_introspection_files)
GdkX11_3_0_gir_CFLAGS = $(INCLUDES) -L$(top_builddir)/gdk
INTROSPECTION_GIRS += GdkX11-3.0.gir
introspection_files += $(filter-out x11/gdkx.h, $(x11_introspection_files))
endif # USE_X11
girdir = $(datadir)/gir-1.0
@@ -286,7 +286,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)
-28
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.
-57
View File
@@ -1,57 +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 \
gdkgeometry-directfb.c \
gdkglobals-directfb.c \
gdkim-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
-106
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.
-56
View File
@@ -1,56 +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
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
@@ -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)
{
}
-463
View File
@@ -1,463 +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;
}
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++;
}
-546
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;
}
-82
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__ */
-540
View File
@@ -1,540 +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_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;
}
-59
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 */
-634
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;
}
-626
View File
@@ -1,626 +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 <assert.h>
#include <string.h>
#include "gdkdirectfb.h"
#include "gdkprivate-directfb.h"
#include "../../gdk-pixbuf/gdk-pixbuf-private.h"
#include "gdkinternals.h"
#include "cairo-directfb.h"
#include <direct/debug.h>
#include <direct/messages.h>
/*
* There can be multiple domains in one file and one domain (same same) in multiple files.
*/
D_DEBUG_DOMAIN( GDKDFB_Drawable, "GDKDFB/Drawable", "GDK DirectFB Drawable" );
D_DEBUG_DOMAIN( GDKDFB_DrawClip, "GDKDFB/DrawClip", "GDK DirectFB Drawable Clip Region" );
/* From DirectFB's <gfx/generix/duffs_device.h> */
#define DUFF_1() \
case 1:\
SET_PIXEL( D[0], S[0] );
#define DUFF_2() \
case 3:\
SET_PIXEL( D[2], S[2] );\
case 2:\
SET_PIXEL( D[1], S[1] );\
DUFF_1()
#define DUFF_3() \
case 7:\
SET_PIXEL( D[6], S[6] );\
case 6:\
SET_PIXEL( D[5], S[5] );\
case 5:\
SET_PIXEL( D[4], S[4] );\
case 4:\
SET_PIXEL( D[3], S[3] );\
DUFF_2()
#define DUFF_4() \
case 15:\
SET_PIXEL( D[14], S[14] );\
case 14:\
SET_PIXEL( D[13], S[13] );\
case 13:\
SET_PIXEL( D[12], S[12] );\
case 12:\
SET_PIXEL( D[11], S[11] );\
case 11:\
SET_PIXEL( D[10], S[10] );\
case 10:\
SET_PIXEL( D[9], S[9] );\
case 9:\
SET_PIXEL( D[8], S[8] );\
case 8:\
SET_PIXEL( D[7], S[7] );\
DUFF_3()
#define SET_PIXEL_DUFFS_DEVICE_N( D, S, w, n ) \
do {\
while (w) {\
register int l = w & ((1 << n) - 1);\
switch (l) {\
default:\
l = (1 << n);\
SET_PIXEL( D[(1 << n)-1], S[(1 << n)-1] );\
DUFF_##n()\
}\
D += l;\
S += l;\
w -= l;\
}\
} while(0)
static GdkScreen * gdk_directfb_get_screen (GdkDrawable *drawable);
static void gdk_drawable_impl_directfb_class_init (GdkDrawableImplDirectFBClass *klass);
static cairo_surface_t *gdk_directfb_ref_cairo_surface (GdkDrawable *drawable);
static gboolean accelerated_alpha_blending = FALSE;
static gpointer parent_class = NULL;
static const cairo_user_data_key_t gdk_directfb_cairo_key;
/**********************************************************
* DirectFB specific implementations of generic functions *
**********************************************************/
static void
gdk_directfb_set_colormap (GdkDrawable *drawable,
GdkColormap *colormap)
{
GdkDrawableImplDirectFB *impl;
impl = GDK_DRAWABLE_IMPL_DIRECTFB (drawable);
D_DEBUG_AT( GDKDFB_Drawable, "%s( %p, %p ) <- old %p\n", G_STRFUNC, drawable, colormap, impl->colormap );
if (impl->colormap == colormap)
return;
if (impl->colormap)
g_object_unref (impl->colormap);
impl->colormap = colormap;
if (colormap)
g_object_ref (colormap);
}
static GdkColormap*
gdk_directfb_get_colormap (GdkDrawable *drawable)
{
GdkColormap *retval;
retval = GDK_DRAWABLE_IMPL_DIRECTFB (drawable)->colormap;
if (!retval) {
retval = gdk_colormap_get_system ();
gdk_directfb_set_colormap(drawable,retval);
}
return retval;
}
static gint
gdk_directfb_get_depth (GdkDrawable *drawable)
{
GdkDrawableImplDirectFB *impl = GDK_DRAWABLE_IMPL_DIRECTFB (drawable);
return DFB_BITS_PER_PIXEL (impl->format);
}
static void
gdk_directfb_get_size (GdkDrawable *drawable,
gint *width,
gint *height)
{
GdkDrawableImplDirectFB *impl;
impl = GDK_DRAWABLE_IMPL_DIRECTFB (drawable);
if (width)
*width = impl->width;
if (height)
*height = impl->height;
}
static GdkVisual*
gdk_directfb_get_visual (GdkDrawable *drawable)
{
return gdk_visual_get_system ();
}
/* Calculates the real clipping region for a drawable, taking into account
* other windows and the gc clip region.
*/
void
gdk_directfb_clip_region (GdkDrawable *drawable,
GdkGC *gc,
GdkRectangle *draw_rect,
cairo_region_t *ret_clip)
{
GdkDrawableImplDirectFB *private;
GdkRectangle rect;
g_return_if_fail (GDK_IS_DRAWABLE (drawable));
g_return_if_fail (GDK_IS_DRAWABLE_IMPL_DIRECTFB (drawable));
g_return_if_fail (ret_clip != NULL);
D_DEBUG_AT( GDKDFB_DrawClip, "%s( %p, %p, %p )\n", G_STRFUNC, drawable, gc, draw_rect );
private = GDK_DRAWABLE_IMPL_DIRECTFB (drawable);
if (!draw_rect)
{
rect.x = 0;
rect.y = 0;
rect.width = private->width;
rect.height = private->height;
draw_rect = &rect;
}
D_DEBUG_AT( GDKDFB_DrawClip, " -> draw rectangle == %4d,%4d - %4dx%4d =\n",
draw_rect->x, draw_rect->y, draw_rect->width, draw_rect->height );
temp_region_init_rectangle( ret_clip, draw_rect );
if (private->buffered) {
D_DEBUG_AT( GDKDFB_DrawClip, " -> buffered region > %4d,%4d - %4dx%4d < (%ld boxes)\n",
GDKDFB_RECTANGLE_VALS_FROM_BOX( &private->paint_region.extents ),
private->paint_region.numRects );
cairo_region_intersect (ret_clip, &private->paint_region);
}
if (gc)
{
GdkGCDirectFB *gc_private = GDK_GC_DIRECTFB (gc);
cairo_region_t *region = &gc_private->clip_region;
if (region->numRects)
{
D_DEBUG_AT( GDKDFB_DrawClip, " -> clipping region > %4d,%4d - %4dx%4d < (%ld boxes)\n",
GDKDFB_RECTANGLE_VALS_FROM_BOX( &region->extents ), region->numRects );
if (gc->clip_x_origin || gc->clip_y_origin)
{
cairo_region_translate (ret_clip, -gc->clip_x_origin, -gc->clip_y_origin);
cairo_region_intersect (ret_clip, region);
cairo_region_translate (ret_clip, gc->clip_x_origin, gc->clip_y_origin);
}
else
{
cairo_region_intersect (ret_clip, region);
}
}
if (gc_private->values_mask & GDK_GC_SUBWINDOW &&
gc_private->values.subwindow_mode == GDK_INCLUDE_INFERIORS)
return;
}
if (private->buffered) {
D_DEBUG_AT( GDKDFB_DrawClip, " => returning clip >> %4d,%4d - %4dx%4d << (%ld boxes)\n",
GDKDFB_RECTANGLE_VALS_FROM_BOX( &ret_clip->extents ), ret_clip->numRects );
return;
}
if (GDK_IS_WINDOW (private->wrapper) &&
GDK_WINDOW_IS_MAPPED (private->wrapper) &&
!GDK_WINDOW_OBJECT (private->wrapper)->input_only)
{
GList *cur;
cairo_region_t temp;
temp.numRects = 1;
temp.rects = &temp.extents;
temp.size = 1;
for (cur = GDK_WINDOW_OBJECT (private->wrapper)->children;
cur;
cur = cur->next)
{
GdkWindowObject *cur_private;
GdkDrawableImplDirectFB *cur_impl;
cur_private = GDK_WINDOW_OBJECT (cur->data);
if (!GDK_WINDOW_IS_MAPPED (cur_private) || cur_private->input_only)
continue;
cur_impl = GDK_DRAWABLE_IMPL_DIRECTFB (cur_private->impl);
temp.extents.x1 = cur_private->x;
temp.extents.y1 = cur_private->y;
temp.extents.x2 = cur_private->x + cur_impl->width;
temp.extents.y2 = cur_private->y + cur_impl->height;
D_DEBUG_AT( GDKDFB_DrawClip, " -> clipping child [ %4d,%4d - %4dx%4d ] (%ld boxes)\n",
GDKDFB_RECTANGLE_VALS_FROM_BOX( &temp.extents ), temp.numRects );
cairo_region_subtract (ret_clip, &temp);
}
}
D_DEBUG_AT( GDKDFB_DrawClip, " => returning clip >> %4d,%4d - %4dx%4d << (%ld boxes)\n",
GDKDFB_RECTANGLE_VALS_FROM_BOX( &ret_clip->extents ), ret_clip->numRects );
}
/* Drawing
*/
static inline void
gdk_directfb_set_color (GdkDrawableImplDirectFB *impl,
GdkColor *color,
guchar alpha)
{
if (DFB_PIXELFORMAT_IS_INDEXED (impl->format))
{
impl->surface->SetColorIndex (impl->surface, color->pixel);
}
else
{
impl->surface->SetColor (impl->surface,
color->red >> 8,
color->green >> 8,
color->blue >> 8,
alpha);
}
}
static gboolean
gdk_directfb_setup_for_drawing (GdkDrawableImplDirectFB *impl,
GdkGCDirectFB *gc_private)
{
DFBSurfaceDrawingFlags flags = DSDRAW_NOFX;
GdkColor color = { 0, 0, 0, 0 };
guchar alpha = 0xFF;
if (!impl->surface)
return FALSE;
if (gc_private && gc_private->values_mask & GDK_GC_FOREGROUND)
color = gc_private->values.foreground;
if (gc_private && gc_private->values_mask & GDK_GC_FUNCTION)
{
switch (gc_private->values.function)
{
case GDK_COPY:
flags = DSDRAW_NOFX;
break;
case GDK_INVERT:
color.red = color.green = color.blue = 0xFFFF;
alpha = 0x0;
flags = DSDRAW_XOR;
break;
case GDK_XOR:
alpha = 0x0;
flags = DSDRAW_XOR;
break;
case GDK_CLEAR:
color.red = color.green = color.blue = 0x0;
flags = DSDRAW_NOFX;
break;
case GDK_NOOP:
return FALSE;
case GDK_SET:
color.red = color.green = color.blue = 0xFFFF;
flags = DSDRAW_NOFX;
break;
default:
g_message ("unsupported GC function %d",
gc_private->values.function);
flags = DSDRAW_NOFX;
break;
}
}
gdk_directfb_set_color (impl, &color, alpha);
impl->surface->SetDrawingFlags (impl->surface, flags);
return TRUE;
}
static inline void
convert_rgba_pixbuf_to_image (guint32 *src,
guint src_pitch,
guint32 *dest,
guint dest_pitch,
guint width,
guint height)
{
guint i;
while (height--)
{
for (i = 0; i < width; i++)
{
guint32 pixel = GUINT32_FROM_BE (src[i]);
dest[i] = (pixel >> 8) | (pixel << 24);
}
src += src_pitch;
dest += dest_pitch;
}
}
static inline void
convert_rgb_pixbuf_to_image (guchar *src,
guint src_pitch,
guint32 *dest,
guint dest_pitch,
guint width,
guint height)
{
guint i;
guchar *s;
while (height--)
{
s = src;
for (i = 0; i < width; i++, s += 3)
dest[i] = 0xFF000000 | (s[0] << 16) | (s[1] << 8) | s[2];
src += src_pitch;
dest += dest_pitch;
}
}
/*
* Object stuff
*/
static inline const char *
drawable_impl_type_name( GObject *object )
{
if (GDK_IS_PIXMAP (object))
return "PIXMAP";
if (GDK_IS_WINDOW (object))
return "WINDOW";
if (GDK_IS_DRAWABLE_IMPL_DIRECTFB (object))
return "DRAWABLE";
return "unknown";
}
static void
gdk_drawable_impl_directfb_finalize (GObject *object)
{
GdkDrawableImplDirectFB *impl;
impl = GDK_DRAWABLE_IMPL_DIRECTFB (object);
D_DEBUG_AT( GDKDFB_Drawable, "%s( %p ) <- %dx%d (%s at %4d,%4d)\n", G_STRFUNC,
object, impl->width, impl->height,
drawable_impl_type_name( object ),
impl->abs_x, impl->abs_y );
gdk_directfb_set_colormap (GDK_DRAWABLE (object), NULL);
if( impl->cairo_surface ) {
cairo_surface_finish(impl->cairo_surface);
}
if( impl->surface )
impl->surface->Release (impl->surface);
G_OBJECT_CLASS (parent_class)->finalize (object);
}
static void
gdk_drawable_impl_directfb_class_init (GdkDrawableImplDirectFBClass *klass)
{
GdkDrawableClass *drawable_class = GDK_DRAWABLE_CLASS (klass);
GObjectClass *object_class = G_OBJECT_CLASS (klass);
parent_class = g_type_class_peek_parent (klass);
object_class->finalize = gdk_drawable_impl_directfb_finalize;
drawable_class->create_gc = _gdk_directfb_gc_new;
drawable_class->ref_cairo_surface = gdk_directfb_ref_cairo_surface;
drawable_class->set_colormap = gdk_directfb_set_colormap;
drawable_class->get_colormap = gdk_directfb_get_colormap;
drawable_class->get_depth = gdk_directfb_get_depth;
drawable_class->get_visual = gdk_directfb_get_visual;
drawable_class->get_size = gdk_directfb_get_size;
drawable_class->get_screen = gdk_directfb_get_screen;
real_draw_pixbuf = drawable_class->draw_pixbuf;
drawable_class->draw_pixbuf = gdk_directfb_draw_pixbuf;
/* check for hardware-accelerated alpha-blending */
{
DFBGraphicsDeviceDescription desc;
_gdk_display->directfb->GetDeviceDescription ( _gdk_display->directfb, &desc);
accelerated_alpha_blending =
((desc.acceleration_mask & DFXL_BLIT) &&
(desc.blitting_flags & DSBLIT_BLEND_ALPHACHANNEL));
}
}
GType
gdk_drawable_impl_directfb_get_type (void)
{
static GType object_type = 0;
if (!object_type)
{
const GTypeInfo object_info =
{
sizeof (GdkDrawableImplDirectFBClass),
(GBaseInitFunc) NULL,
(GBaseFinalizeFunc) NULL,
(GClassInitFunc) gdk_drawable_impl_directfb_class_init,
NULL, /* class_finalize */
NULL, /* class_data */
sizeof (GdkDrawableImplDirectFB),
0, /* n_preallocs */
(GInstanceInitFunc) NULL,
};
object_type = g_type_register_static (GDK_TYPE_DRAWABLE,
"GdkDrawableImplDirectFB",
&object_info, 0);
}
return object_type;
}
static GdkScreen * gdk_directfb_get_screen (GdkDrawable *drawable){
return gdk_screen_get_default();
}
static void
gdk_directfb_cairo_surface_destroy (void *data)
{
GdkDrawableImplDirectFB *impl = data;
impl->cairo_surface = NULL;
}
void
_gdk_windowing_set_cairo_surface_size (cairo_surface_t *surface,
int width,
int height)
{
}
cairo_surface_t *
_gdk_windowing_create_cairo_surface (GdkDrawable *drawable,
int width,
int height)
{
GdkDrawableImplDirectFB *impl;
IDirectFB *dfb;
cairo_surface_t *ret;
impl = GDK_DRAWABLE_IMPL_DIRECTFB (drawable);
dfb = GDK_DISPLAY_DFB (gdk_drawable_get_display (drawable))->directfb;
ret = cairo_directfb_surface_create (dfb, impl->surface);
cairo_surface_set_user_data (ret,
&gdk_directfb_cairo_key, drawable,
gdk_directfb_cairo_surface_destroy);
return ret;
}
static cairo_surface_t *
gdk_directfb_ref_cairo_surface (GdkDrawable *drawable)
{
GdkDrawableImplDirectFB *impl;
IDirectFB *dfb;
g_return_val_if_fail (GDK_IS_DRAWABLE (drawable), NULL);
g_return_val_if_fail (GDK_IS_DRAWABLE_IMPL_DIRECTFB (drawable), NULL);
impl = GDK_DRAWABLE_IMPL_DIRECTFB (drawable);
dfb = GDK_DISPLAY_DFB(gdk_drawable_get_display(drawable))->directfb;
if (!impl->cairo_surface) {
IDirectFBSurface *surface;
g_assert (impl->surface != NULL);
#if defined(CAIRO_VERSION) && CAIRO_VERSION >= CAIRO_VERSION_ENCODE(1,5,5)
impl->surface->GetSubSurface (impl->surface, NULL, &surface);
#else
surface = impl->surface;
#endif
if (surface) {
impl->cairo_surface = cairo_directfb_surface_create (dfb, surface);
if (impl->cairo_surface) {
cairo_surface_set_user_data (impl->cairo_surface,
&gdk_directfb_cairo_key, drawable,
gdk_directfb_cairo_surface_destroy);
}
#if defined(CAIRO_VERSION) && CAIRO_VERSION >= CAIRO_VERSION_ENCODE(1,5,5)
surface->Release (surface);
#endif
}
} else {
cairo_surface_reference (impl->cairo_surface);
}
g_assert (impl->cairo_surface != NULL);
return impl->cairo_surface;
}
-963
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)
{
}
-254
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);
}
-58
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;
-60
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);
}
-327
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;
}
-143
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
-417
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;
}
-232
View File
@@ -1,232 +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_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);
}
-381
View File
@@ -1,381 +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;
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__ */
-397
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;
}
}
-248
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;
}
-494
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;
}
}
-104
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;
}
-263
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;
}
-493
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
-69
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;
}
-924
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};
+11 -6
View File
@@ -63,6 +63,11 @@ static int gdk_initialized = 0; /* 1 if the library is initialized,
static gchar *gdk_progclass = NULL;
static GMutex *gdk_threads_mutex = NULL; /* Global GDK lock */
static GCallback gdk_threads_lock = NULL;
static GCallback gdk_threads_unlock = NULL;
#ifdef G_ENABLE_DEBUG
static const GDebugKey gdk_debug_keys[] = {
{"events", GDK_DEBUG_EVENTS},
@@ -71,9 +76,7 @@ static const GDebugKey gdk_debug_keys[] = {
{"xim", GDK_DEBUG_XIM},
{"nograbs", GDK_DEBUG_NOGRABS},
{"colormap", GDK_DEBUG_COLORMAP},
{"gc", GDK_DEBUG_GC},
{"pixmap", GDK_DEBUG_PIXMAP},
{"image", GDK_DEBUG_IMAGE},
{"input", GDK_DEBUG_INPUT},
{"cursor", GDK_DEBUG_CURSOR},
{"multihead", GDK_DEBUG_MULTIHEAD},
@@ -159,10 +162,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 }
@@ -384,13 +387,15 @@ gdk_init (int *argc, char ***argv)
void
gdk_threads_enter (void)
{
GDK_THREADS_ENTER ();
if (gdk_threads_lock)
(*gdk_threads_lock) ();
}
void
gdk_threads_leave (void)
{
GDK_THREADS_LEAVE ();
if (gdk_threads_unlock)
(*gdk_threads_unlock) ();
}
static void
+8 -22
View File
@@ -43,6 +43,7 @@
#include <gdk/gdkevents.h>
#include <gdk/gdkinput.h>
#include <gdk/gdkkeys.h>
#include <gdk/gdkkeysyms.h>
#include <gdk/gdkpango.h>
#include <gdk/gdkpixbuf.h>
#include <gdk/gdkpixmap.h>
@@ -80,8 +81,11 @@ void gdk_set_program_class (const char *program_class);
/* Push and pop error handlers for X errors
*/
void gdk_error_trap_push (void);
gint gdk_error_trap_pop (void);
void gdk_error_trap_push (void);
/* warn unused because you could use pop_ignored otherwise */
G_GNUC_WARN_UNUSED_RESULT gint gdk_error_trap_pop (void);
void gdk_error_trap_pop_ignored (void);
gchar* gdk_get_display (void);
G_CONST_RETURN gchar* gdk_get_display_arg_name (void);
@@ -151,13 +155,6 @@ void gdk_notify_startup_complete_with_id (const gchar* startup_id);
/* Threading
*/
#if !defined (GDK_DISABLE_DEPRECATED) || defined (GDK_COMPILATION)
GDKVAR GMutex *gdk_threads_mutex; /* private */
#endif
GDKVAR GCallback gdk_threads_lock;
GDKVAR GCallback gdk_threads_unlock;
void gdk_threads_enter (void);
void gdk_threads_leave (void);
void gdk_threads_init (void);
@@ -187,19 +184,8 @@ guint gdk_threads_add_timeout_seconds (guint interval,
GSourceFunc function,
gpointer data);
#ifdef G_THREADS_ENABLED
# define GDK_THREADS_ENTER() G_STMT_START { \
if (gdk_threads_lock) \
(*gdk_threads_lock) (); \
} G_STMT_END
# define GDK_THREADS_LEAVE() G_STMT_START { \
if (gdk_threads_unlock) \
(*gdk_threads_unlock) (); \
} G_STMT_END
#else /* !G_THREADS_ENABLED */
# define GDK_THREADS_ENTER()
# define GDK_THREADS_LEAVE()
#endif /* !G_THREADS_ENABLED */
#define GDK_THREADS_ENTER() gdk_threads_enter()
#define GDK_THREADS_LEAVE() gdk_threads_leave()
G_END_DECLS
+5 -38
View File
@@ -109,8 +109,9 @@ gdk_device_manager_xi_get_type
#if IN_HEADER(__GDK_H__)
#if IN_FILE(__GDK_MAIN_X11_C__)
gdk_error_trap_pop
gdk_error_trap_push
gdk_error_trap_pop
gdk_error_trap_pop_ignored
gdk_get_display
#endif
#endif
@@ -587,7 +588,6 @@ gdk_window_get_geometry
gdk_window_get_modal_hint
gdk_window_get_origin
gdk_window_get_root_coords
gdk_window_get_deskrelative_origin
gdk_window_set_support_multidevice
gdk_window_get_support_multidevice
gdk_window_has_native
@@ -776,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
@@ -1005,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
@@ -1053,6 +1029,9 @@ gdk_x11_lookup_xdisplay
gdk_x11_display_broadcast_startup_message
gdk_x11_display_get_startup_notification_id
gdk_x11_register_standard_event_type
gdk_x11_display_error_trap_push
gdk_x11_display_error_trap_pop
gdk_x11_display_error_trap_pop_ignored
#endif
#if IN_FILE(__GDK_DRAWABLE_X11_C__)
@@ -1116,15 +1095,3 @@ gdk_app_launch_context_set_icon_name
gdk_window_impl_get_type G_GNUC_CONST
#endif
#endif
#ifdef INCLUDE_VARIABLES
gdk_threads_mutex
gdk_threads_lock
gdk_threads_unlock
#endif
#ifdef GDK_WINDOWING_X11
#ifdef INCLUDE_VARIABLES
gdk_display
#endif
#endif
+3 -11
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:
+3 -11
View File
@@ -30,17 +30,9 @@
#include "gdkinternals.h"
GType
gdk_cursor_get_type (void)
{
static GType our_type = 0;
if (our_type == 0)
our_type = g_boxed_type_register_static (g_intern_static_string ("GdkCursor"),
(GBoxedCopyFunc)gdk_cursor_ref,
(GBoxedFreeFunc)gdk_cursor_unref);
return our_type;
}
G_DEFINE_BOXED_TYPE (GdkCursor, gdk_cursor,
gdk_cursor_ref,
gdk_cursor_unref)
/**
* gdk_cursor_ref:
+8 -7
View File
@@ -95,7 +95,7 @@ gdk_device_class_init (GdkDeviceClass *klass)
PROP_DISPLAY,
g_param_spec_object ("display",
P_("Device Display"),
P_("Display to which the device belongs to"),
P_("Display which the device belongs to"),
GDK_TYPE_DISPLAY,
G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY |
G_PARAM_STATIC_STRINGS));
@@ -110,7 +110,7 @@ gdk_device_class_init (GdkDeviceClass *klass)
PROP_DEVICE_MANAGER,
g_param_spec_object ("device-manager",
P_("Device manager"),
P_("Device manager to which the device belongs to"),
P_("Device manager which the device belongs to"),
GDK_TYPE_DEVICE_MANAGER,
G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY |
G_PARAM_STATIC_STRINGS));
@@ -148,7 +148,7 @@ gdk_device_class_init (GdkDeviceClass *klass)
/**
* GdkDevice:associated-device:
*
* Associated pointer or keyboard to this device, if any. Devices of type #GDK_DEVICE_TYPE_MASTER
* Associated pointer or keyboard with this device, if any. Devices of type #GDK_DEVICE_TYPE_MASTER
* always come in keyboard/pointer pairs. Other device types will have a %NULL associated device.
*
* Since: 3.0
@@ -157,7 +157,7 @@ gdk_device_class_init (GdkDeviceClass *klass)
PROP_ASSOCIATED_DEVICE,
g_param_spec_object ("associated-device",
P_("Associated device"),
P_("Associated pointer or keyboard to this device"),
P_("Associated pointer or keyboard with this device"),
GDK_TYPE_DEVICE,
G_PARAM_READABLE | G_PARAM_STATIC_STRINGS));
/**
@@ -202,7 +202,7 @@ gdk_device_class_init (GdkDeviceClass *klass)
g_object_class_install_property (object_class,
PROP_HAS_CURSOR,
g_param_spec_boolean ("has-cursor",
P_("Whether the device has cursor"),
P_("Whether the device has a cursor"),
P_("Whether there is a visible cursor following device motion"),
FALSE,
G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY |
@@ -766,7 +766,7 @@ _gdk_device_set_associated_device (GdkDevice *device,
GdkDevicePrivate *priv;
g_return_if_fail (GDK_IS_DEVICE (device));
g_return_if_fail (GDK_IS_DEVICE (associated));
g_return_if_fail (associated == NULL || GDK_IS_DEVICE (associated));
priv = device->priv;
@@ -830,7 +830,8 @@ gdk_device_get_n_axes (GdkDevice *device)
* Returns a #GList of #GdkAtom<!-- -->s, containing the labels for
* the axes that @device currently has.
*
* Returns: A #GList of #GdkAtom<!-- -->s, free with g_list_free().
* Returns: (transfer container) (element-type GdkAtom):
* A #GList of #GdkAtom<!-- -->s, free with g_list_free().
*
* Since: 3.0
**/
+10 -4
View File
@@ -278,7 +278,7 @@ gdk_display_dispose (GObject *object)
_gdk_displays = g_slist_remove (_gdk_displays, object);
if (gdk_display_get_default() == display)
if (gdk_display_get_default () == display)
{
if (_gdk_displays)
gdk_display_manager_set_default_display (gdk_display_manager_get(),
@@ -289,7 +289,13 @@ gdk_display_dispose (GObject *object)
}
if (device_manager)
g_signal_handlers_disconnect_by_func (device_manager, device_removed_cb, object);
{
/* this is to make it drop devices which may require using the X
* display and therefore can't be cleaned up in finalize.
* It will also disconnect device_removed_cb
*/
g_object_run_dispose (G_OBJECT (display->device_manager));
}
G_OBJECT_CLASS (gdk_display_parent_class)->dispose (object);
}
@@ -623,7 +629,7 @@ gdk_event_send_clientmessage_toall (GdkEvent *event)
* Return value: the core pointer device; this is owned by the
* display and should not be freed.
*
* Deprecated: 3.0: Use gdk_display_get_client_pointer() instead, or
* Deprecated: 3.0: Use gdk_device_manager_get_client_pointer() instead, or
* gdk_event_get_device() if a #GdkEvent with pointer device
* information is available.
**/
@@ -644,7 +650,7 @@ gdk_device_get_core_pointer (void)
*
* Since: 2.2
*
* Deprecated: 3.0: Use gdk_display_get_client_pointer() instead, or
* Deprecated: 3.0: Use gdk_device_manager_get_client_pointer() instead, or
* gdk_event_get_device() if a #GdkEvent with device
* information is available.
**/
+1 -1
View File
@@ -99,7 +99,7 @@ gdk_drag_get_protocol (GdkNativeWindow xid,
*
* Retrieves the list of targets of the context.
*
* Return value: a #GList of targets
* Return value: (transfer none) (element-type GdkAtom): a #GList of targets
*
* Since: 2.22
**/
+9 -15
View File
@@ -540,7 +540,8 @@ gdk_event_free (GdkEvent *event)
case GDK_DRAG_STATUS:
case GDK_DROP_START:
case GDK_DROP_FINISHED:
g_object_unref (event->dnd.context);
if (event->dnd.context != NULL)
g_object_unref (event->dnd.context);
break;
case GDK_BUTTON_PRESS:
@@ -972,7 +973,7 @@ gdk_event_set_device (GdkEvent *event,
* If the event contains a "device" field, this function will return
* it, else it will return %NULL.
*
* Returns: a #GdkDevice, or %NULL.
* Returns: (transfer none): a #GdkDevice, or %NULL.
*
* Since: 3.0
**/
@@ -1033,13 +1034,15 @@ gdk_event_get_device (const GdkEvent *event)
{
GdkDisplay *display;
GdkDevice *core_pointer;
GdkDeviceManager *device_manager;
g_warning ("Event with type %d not holding a GdkDevice. "
"It is most likely synthesized outside Gdk/GTK+\n",
event->type);
display = gdk_drawable_get_display (event->any.window);
core_pointer = gdk_display_get_core_pointer (display);
device_manager = gdk_display_get_device_manager (display);
core_pointer = gdk_device_manager_get_client_pointer (device_manager);
if (event->type == GDK_KEY_PRESS ||
event->type == GDK_KEY_RELEASE)
@@ -1445,7 +1448,6 @@ gdk_synthesize_window_state (GdkWindow *window,
switch (((GdkWindowObject*) window)->window_type)
{
case GDK_WINDOW_TOPLEVEL:
case GDK_WINDOW_DIALOG:
case GDK_WINDOW_TEMP: /* ? */
gdk_display_put_event (gdk_drawable_get_display (window), &temp_event);
break;
@@ -1512,17 +1514,9 @@ gdk_display_set_double_click_distance (GdkDisplay *display,
display->double_click_distance = distance;
}
GType
gdk_event_get_type (void)
{
static GType our_type = 0;
if (our_type == 0)
our_type = g_boxed_type_register_static (g_intern_static_string ("GdkEvent"),
(GBoxedCopyFunc)gdk_event_copy,
(GBoxedFreeFunc)gdk_event_free);
return our_type;
}
G_DEFINE_BOXED_TYPE (GdkEvent, gdk_event,
gdk_event_copy,
gdk_event_free)
/**
* gdk_setting_get:
-6
View File
@@ -33,8 +33,6 @@
guint _gdk_debug_flags = 0;
gint _gdk_error_code = 0;
gint _gdk_error_warnings = TRUE;
GList *_gdk_default_filters = NULL;
gchar *_gdk_display_name = NULL;
gint _gdk_screen_number = -1;
@@ -43,7 +41,3 @@ gboolean _gdk_native_windows = FALSE;
gboolean _gdk_enable_multidevice = FALSE;
GSList *_gdk_displays = NULL;
GMutex *gdk_threads_mutex = NULL; /* Global GDK lock */
GCallback gdk_threads_lock = NULL;
GCallback gdk_threads_unlock = NULL;

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