Compare commits

...

1353 Commits

Author SHA1 Message Date
Federico Mena Quintero
0ba4952eb1 Fix compilation
Signed-off-by: Federico Mena Quintero <federico@gnome.org>
2013-04-15 18:30:10 -05:00
Tristan Van Berkom
74f5c44efc Load the file chooser's widgets from the .ui file
This is Tristan's *excellent* work, minus the old code for the shortcuts bar - that is all done
in GtkPlacesSidebar now.

The UI gets loaded from a Glade resource; most of the old code to create the UI by hand is gone.

There is still code for save_widgets_create(); this needs to be moved into the UI file, but it
is not a big deal.

gtk_file_chooser_default_init() calls a new post_process_ui() that takes care of all the things
that cannot be done directly in Glade.
2013-04-12 20:42:24 -05:00
Federico Mena Quintero
6fc6e9d8f7 Add .ui file for GtkFileChooserDefault 2013-04-12 19:58:16 -05:00
Federico Mena Quintero
7f1ef86476 For now, add GtkPlacesSidebar to the Glade catalog for private widgets
Although GtkPlacesSidebar is a public widget, we can't have that in Glade's general catalog
as this branch is not merged into GTK+ proper yet.  We'll move the widget to Glade's
catalog when this is done.
2013-04-12 19:57:35 -05:00
Federico Mena Quintero
b7fbed8bc0 INCOMPLETE COMMIT: re-instate Tristan's patch to gtkfilechooserdefault 2013-04-12 12:29:40 -05:00
Federico Mena Quintero
4d4904ed8a Move all of GtkFileChooserDefault's fields into a private structure
I love Emacs macros, by the way.
2013-04-11 22:44:19 -05:00
Federico Mena Quintero
b0eed8680c Move GtkFileChooserDefault to gtkfilechooserdefault.c
We will move all the fields to a private structure next.
2013-04-11 21:44:21 -05:00
Federico Mena Quintero
e2c9797994 Move GtkFileChooserWidgetPrivate to gtkfilechooserwidget.c
In addition, remove the unused "file_system" field from that
structure.
2013-04-11 20:51:09 -05:00
Federico Mena Quintero
70fce923bc Move GtkFileChooserDialogPrivate into gtkfilechooserdialog.c
We'll take private structures out of gtkfilechooserprivate.h and move
them to the appropriate place.
2013-04-11 20:46:47 -05:00
Federico Mena Quintero
456c318f6e Remove unused #define 2013-04-11 20:42:43 -05:00
Federico Mena Quintero
9a3bc21dc9 Don't include gtkfilechooserprivate.h from the file chooser's tests
We will make that file a fully private header; the tests have no
business poking inside the file chooser's internals at this point.
2013-04-11 20:40:05 -05:00
Federico Mena Quintero
d3985dec1d GtkPlacesSidebar: Hold a reference to the sidebar while a D-Bus proxy is being created
The creation is async, and the sidebar could be destroyed while the D-Bus proxy is being created.

Signed-off-by: Federico Mena Quintero <federico@gnome.org>
2013-04-11 20:04:53 -05:00
Federico Mena Quintero
5b827c53e5 Merge branch 'places-sidebar' into master
This lands the GtkPlacesSidebar widget.  It is used in
GtkFileChooserDefault, and it can also be used by third-party
applications.
2013-04-11 19:45:12 -05:00
Federico Mena Quintero
21083978f0 Revert "GtkFileChooserDefault: Define children with a GtkBuilder template"
Having the changes for composite widget templates makes it impossible
to merge the places-sidebar branch.  So, we will merge that branch,
and *then* apply the changes for composite templates.

This reverts commit bf909f5615.
2013-04-11 16:47:38 -05:00
David King
b0121ed0a1 xi2: Improve pointer emulation debug reporting
Reporting "true" or "false" is nicer than the value of the flag.

https://bugzilla.gnome.org/show_bug.cgi?id=697795
2013-04-11 15:56:13 +01:00
Alexander Larsson
645f6435e5 gdkwindow: Handle updates created by outstanding moves in same update
If gdk_window_flush_outstanding_moves() creates new update area
we handle this directly in the same draw to avoid flashing.

This mainly affects win32 as X11 does its exposes from moves async.
However, its important for win32 since ScrollDC seems to sometimes
invalidate (and not copy) unexected regions.

http://bugzilla.gnome.org/show_bug.cgi?674051
2013-04-11 12:15:30 +02:00
Alexander Larsson
1884271f03 win32: Report ScrollDC update region directly
Rather than set the window update region and repaint this region
when we get a WM_PAINT we just directly add it to the update
region. No need to roundtrip via win32.

This lets us also make sure we do this drawing in the same update
cycle. This seems especially important on Win7, because ScrollDC
seems to act kind of weird there, not using bitblt in areas where
it seemingly could, which makes scrolling look really flashy.

http://bugzilla.gnome.org/show_bug-cgi?id=674051
2013-04-11 12:12:35 +02:00
Alexander Larsson
9011a79ed2 Make gdk_flush_outstanding_moves "reentrant"
If do_move_region_bits_on_impl causes updates they will propely
be moved by the outstanding moves we have not yet flushed.
2013-04-11 11:35:17 +02:00
Alexander Larsson
5ac3edf77f Update gtk.symbols
This fixes win32 build
2013-04-11 11:25:26 +02:00
Alexander Larsson
8c61659225 win32: Fix build
Need to take ".exe" into account for file dependencies on win32.
2013-04-11 11:25:26 +02:00
Alexander Larsson
781ad5a1bc win32: Make build with latest gdkdisplay changes 2013-04-11 11:25:25 +02:00
Carlos Garnacho
cc7b3985b3 xi2: Reset scroll valuators on synthesized crossing events
On crossing events resulting from moving windows (eg. workspace switch),
deviceid equals sourceid, so make those reset scroll valuators on all
slave devices to avoid misleading jumps in scroll events

Fixes https://bugzilla.gnome.org/show_bug.cgi?id=690275
2013-04-10 20:18:09 +02:00
Matthias Clasen
c402e89299 csd: Use symbolic icons for window buttons
With symbolic icons, we can recolor the icons as needed, and we
can use icon shadows, etc.
2013-04-10 06:13:26 -04:00
Matthias Clasen
e2ec223cd7 Don't free a list that has not been initialized 2013-04-09 21:18:05 -04:00
Chris Cummins
6deff39f74 wayland: Use more explicit out parameter names
Prevent confusion between positional values and hotspot values.

Signed-off-by: Rob Bradford <rob@linux.intel.com>
2013-04-09 12:52:56 +01:00
Chris Cummins
e707eadaf2 Update GtkCssProvider box-shadow documentation
Non-inset box-shadows are no longer ignored by the GTK+ theming engine,
outset shadows are supported.

Signed-off-by: Rob Bradford <rob@linux.intel.com>
2013-04-09 12:52:52 +01:00
Chris Cummins
f478f16dba cds: enable outset shadows
Adds conditional code paths to GdkCssShadowValue for painting outset
shadows, and allows shadows to be applied in two passes (first outset
then inset). This can be used to draw csd shadows in outer window
borders.

https://bugzilla.gnome.org/show_bug.cgi?id=695998
Signed-off-by: Rob Bradford <rob@linux.intel.com>
2013-04-09 12:52:47 +01:00
Rob Bradford
b37d83e988 wayland: don't leave root window values uninitialised
Under Wayland we don't know the absolute position of the device but there are
some API calls that expect to get an root window position. Previously we were
not assigning any value to these out parameters potentially leaving the values
undefined.

This change returns the current surface relative position of the device.
2013-04-09 12:52:16 +01:00
Carlos Garnacho
7ffcd85d13 quartz: Fix call to missing symbol
This patch can be considered a leftover of commit 6f607fc8b4 ,
replace the no longer existing function with the GDK function
meant to replace it.

This was noticeable on regular clipboard operations in quartz
2013-04-09 12:38:46 +02:00
Benjamin Otte
c4dc0e8e40 window: Remember current size
Don't just look at previously remembered sizes, also look at the current
size.
This is useful for cases where the window was resized by the user or WM
and not by the application itself.

https://bugzilla.gnome.org/show_bug.cgi?id=696882
2013-04-09 12:09:12 +02:00
Benjamin Otte
70dbb14f89 window: Split out a function
We don't want to remember sizes in the not resizable case. Also a
function named "guess_default_size" should not look at previous sizes,
it should guess.
2013-04-09 12:09:12 +02:00
Benjamin Otte
33f1210f72 window: Remove an unused function.
Luckily, we don't need to support an implementation of a minimal WM for
linux-fb anymore (which is what this function was added for).
2013-04-09 12:09:12 +02:00
Benjamin Otte
72290fb538 docs: Fix Since tag for frame clock functions 2013-04-09 12:09:11 +02:00
Matthias Clasen
96982347b3 wayland: Clean up gdkwayland.h
Make this an include-only header
2013-04-08 22:32:50 -04:00
Benjamin Otte
21f11eb0e6 window: restore size after hide/show properly
Old code assumed the size was stored in widget.allocation. This is no
longer true as the allocation is cleared upon hide. However, we store
the last configure request, and that one tracks the last size, so we can
just use that number.

Sometimes things are so easy - once you figure them out...

https://bugzilla.gnome.org/show_bug.cgi?id=696882
2013-04-08 16:34:19 +02:00
Benjamin Otte
b662e96e7e plug: Don't unregister windows that were never registered
Fixes warnings when trying to unregister the socket window. The socket
window is foreign, so we shouldn't register it in the first place.

https://bugzilla.gnome.org/show_bug.cgi?id=697427
2013-04-08 16:34:19 +02:00
Colin Walters
5e7df8bf14 build: Fix srcdir != builddir 2013-04-08 10:16:58 -04:00
Matthias Clasen
d90ddf85f6 Extract strings from .ui files without intltool 2013-04-08 21:19:29 +09:00
Tristan Van Berkom
92a8c76b31 GtkVolumeButton: Define children with a GtkBuilder template 2013-04-08 21:19:29 +09:00
Tristan Van Berkom
36bacc4674 GtkFontButton: Define children with a GtkBuilder template 2013-04-08 21:19:29 +09:00
Tristan Van Berkom
4c81151a20 GtkFileChooserButton: Define children with a GtkBuilder template 2013-04-08 21:19:29 +09:00
Tristan Van Berkom
42f53ab58e GtkPathBar: Define children with a GtkBuilder template 2013-04-08 21:19:29 +09:00
Tristan Van Berkom
0f3ef7eea6 GtkColorEditor: Define children with a GtkBuilder template 2013-04-08 21:19:29 +09:00
Tristan Van Berkom
65080c6755 GtkColorPlane: Added construct-only properties to setup the adjustments.
This allows basic construction of this private type in GtkBuilder script,
so it can be used in the GtkColorEditor UI.
2013-04-08 21:19:29 +09:00
Tristan Van Berkom
9accb95b9f GtkPrintUnixDialog: Define children with a GtkBuilder template 2013-04-08 21:19:29 +09:00
Tristan Van Berkom
0f16d7c6d5 GtkPageSetupUnixDialog: Define children with a GtkBuilder template 2013-04-08 21:19:29 +09:00
Tristan Van Berkom
a58412027f GtkRecentChooserDefault: Define children with a GtkBuilder template 2013-04-08 21:19:29 +09:00
Tristan Van Berkom
6f8162a2e1 GtkFontChooserDialog: Define children with a GtkBuilder template 2013-04-08 21:19:29 +09:00
Tristan Van Berkom
21391027c4 GtkFontChooserWidget: Define children with a GtkBuilder template 2013-04-08 21:19:28 +09:00
Tristan Van Berkom
b537e1badd GtkFileChooserDialog: Define children with a GtkBuilder template 2013-04-08 21:19:28 +09:00
Tristan Van Berkom
bf909f5615 GtkFileChooserDefault: Define children with a GtkBuilder template 2013-04-08 21:19:28 +09:00
Tristan Van Berkom
09b44d7ab5 GtkColorChooserDialog: Define children with a GtkBuilder template 2013-04-08 21:19:28 +09:00
Tristan Van Berkom
d50516ebd7 GtkAppChooserDialog: Define children with a GtkBuilder template 2013-04-08 21:19:28 +09:00
Tristan Van Berkom
ae690479a0 GtkAppChooserWidget: Define children with a GtkBuilder template 2013-04-08 21:19:28 +09:00
Tristan Van Berkom
c6aa7cc92d GtkStatusbar: Define children with a GtkBuilder template 2013-04-08 21:19:28 +09:00
Tristan Van Berkom
b9fd422aca GtkScaleButton: Define children with a GtkBuilder template 2013-04-08 21:19:28 +09:00
Tristan Van Berkom
90cd240c6d GtkAssistant: Define children with a GtkBuilder template 2013-04-08 21:19:28 +09:00
Tristan Van Berkom
3c39c388c9 GtkLockButton: Define children with a GtkBuilder template 2013-04-08 21:19:28 +09:00
Tristan Van Berkom
67a2cdb303 GtkAboutDialog: Define children with a GtkBuilder template 2013-04-08 21:19:28 +09:00
Tristan Van Berkom
56167944e5 GtkInfoBar: Define children with a GtkBuilder template 2013-04-08 21:19:28 +09:00
Tristan Van Berkom
671871b43e GtkMessageDialog: Define children with a GtkBuilder template 2013-04-08 21:19:27 +09:00
Tristan Van Berkom
33f6195d0e GtkDialog: Define children with a GtkBuilder template
As the first composite widget in GTK+, this patch also
adds some Makefile mechanics to list the ui files as
dependencies of the global GTK+ resources, and adds the
initial test case where composite classes should be tested.
2013-04-08 21:19:27 +09:00
Tristan Van Berkom
a41c628a3b Added directory with Glade catalog
This catalog can be used to work with GTK+'s private widget types,
this patch exposes a private function gtk_glade_catalog_init() which
Glade will use for the sole purpose of initializing some private widget
types in GTK+ that are referenced from various GTK+ composite widget
xml files.
2013-04-08 21:19:27 +09:00
Tristan Van Berkom
3b7fc8cdc9 Add Composite Child machinery and APIs to GtkWidget
This commit implements the needed machinery for GtkWidget
to build it's composite content from GtkBuilder XML and
adds the following API:

  o gtk_widget_init_template()

    An api to be called in instance initializers of any
    GtkWidget subclass that uses template XML to build it's components.

  o gtk_widget_class_set_template()

    API to associate GtkBuilder XML to a given GtkWidget subclass

  o gtk_widget_class_automate_child()

    API to declare an object built by GtkBuilder to be associated
    with an instance structure offset and automatically set.

 o gtk_widget_get_automated_child()

   API for bindings to fetch a child declared to be automated by
   gtk_widget_class_automate_child(), for the case where bindings
   do not generate GObjects under the hood and cannot use structure
   offsets to resolve composite object pointers.

 o gtk_widget_class_declare_callback[s]()

   Declare static functions to be used in signal callbacks from
   a given class's template XML

 o gtk_widget_class_set_connect_func()

   API for bindings to override the signal connection machinery
   for a given GtkWidget derived class.
2013-04-08 21:19:27 +09:00
Tristan Van Berkom
64b87824c7 GtkBuilder: Allow G_PARAM_CONSTRUCT properties to be set on internal children.
This patch allows properties of type G_PARAM_CONSTRUCT to be set
on internal children or explicitly constructed objects (built
with <constructor>) while previously, G_PARAM_CONSTRUCT properties
being set on already constructed objects would result in an misinformed
warning that "construct-only properties cannot be set".

G_PARAM_CONSTRUCT_ONLY properties are still refused as parameters
to already constructed children.
2013-04-08 21:19:27 +09:00
Tristan Van Berkom
b7da0d21f8 GtkBuilder: Add private _gtk_builder_extend_with_template()
This adds the definition of the <template> tag with some documentation
on the variant of the format.

_gtk_builder_extend_with_template() is to be used while GtkContainer
builds from composite templates. A couple of error codes are also added
to handle a few new possible failure cases.

DTD Files gtkbuilder.rnc and gtkbuilder.rng have been updated to include
the new <template> tag and it's attributes.
2013-04-08 21:19:27 +09:00
Tristan Van Berkom
82583640a2 GtkBuilder: Added api to allow private signal callbacks
In preperation for composite objects, for better encapsulation
the following APIs are added to allow handling of signals declared
in the XML with callbacks declared statically.

  o gtk_builder_add_callback_symbol[s]()

    Adds a symbol to the internal symbol hash

  o gtk_builder_lookup_symbol()

    Looks up a symbol, exposed in case added symbols are used
    in conjunction with gtk_builder_connect_signals_full()

The default implementation of gtk_builder_connect_signals() now
does not have a strong requirement on GModule (or a strong requirement
on symbols being declared in the global namespace). Instead GModule
is used as a fallback in the case that symbols are not declared
explicitly.
2013-04-08 21:19:27 +09:00
Tristan Van Berkom
4ec6d6006e Work around access to global resources without calling gtk_init()
Some utilities such as GIR and gtk-doc, initialize class vtables without
initializing GTK+, with composite templates accessing resources this
causes a hand full of unneeded warnings.

The workaround for now is the use a private function _gtk_ensure_resources()
which is both called while initializing GTK+, and at the beginning of
gtk_widget_class_set_template_from_resource() (the private function
ensures that the resource will only ever be registered GOnce).
2013-04-08 21:19:27 +09:00
Tristan Van Berkom
c6ab515735 Deprecate gtk_widget_push_composite_child & friends
Deprecate gtk_widget_push_composite_child, gtk_widget_pop_composite_child,
gtk_widget_set_composite_name, gtk_widget_get_composite_name.

This API is just bloat and was never useful, this patch deprecates
it and removes all internal calls to the composite child APIs
2013-04-08 21:19:27 +09:00
Tristan Van Berkom
38dc4733c0 GtkScale: Properly chain up in GtkBuildableIface->custom_finished()
This was causing <style> markup to be ignored when specified
on GtkScale types.
2013-04-08 21:18:47 +09:00
Matthias Clasen
6629e839d0 wayland: Implement gdk_keymap_get_modifier_state 2013-04-06 21:16:38 -04:00
Matthias Clasen
e47689d9ea csd: Implement hide-titlebar-when-maximized 2013-04-06 17:24:29 -04:00
Matthias Clasen
acf56b6cb3 wayland: Fix gdk_keymap_translate_keyboard_state
I was confusing indices and masks here, which made the modifier
translation go wrong. With this commit, accelerators work.
2013-04-06 17:03:27 -04:00
Bruce Cowan
905e4a58bd Updated British English translation 2013-04-06 17:14:06 +01:00
Matthias Clasen
1b2711cde2 wayland: Implement gdk_keymap_translate_keyboard_state 2013-04-06 10:48:57 -04:00
Matthias Clasen
eb9ab7aad4 wayland: Fix up key event translation
The is_modifier field is supposed to be set if the key
would act as a modifier, not if any modifiers are currently
active. To fix this, introduce a private
_gdk_wayland_keymap_key_is_modifier function.

At the same time, make the hardware_keycode field in key
events actually contain the hardware keycode, not a copy
of the keyval.
2013-04-06 10:48:57 -04:00
Matthias Clasen
c659f892ff trivial whitespace fix 2013-04-06 10:48:56 -04:00
Matthias Clasen
720ca63c5d wayland: Return NULL as the keyval name for 0
This is what the X11 backend does, and it makes the "NoSymbol"
disappear from menuitems that don't have an accelerator.
2013-04-06 10:48:56 -04:00
Aron Xu
94fe6cf870 Update Simplified Chinese translation 2013-04-06 22:30:15 +08:00
Wylmer Wang
44f2946408 Update Simplified Chinese translation 2013-04-06 22:18:38 +08:00
Tristan Van Berkom
909e82a2a6 GtkRecentChooserMenu: avoid accessing a NULL action
When the GtkActivatable sets the related action, the activatable
properties are sync'ed. In this case the null check is important
to avoid updating from a NULL action.
2013-04-06 18:46:20 +09:00
Tristan Van Berkom
fbb9447785 gtk_recent_chooser_set_filter: Allow NULL value to unset the filter.
While GtkRecentChooser implementations accept for the "filter" property
to unset the current filter, the API fires an unneeded assertion.

This patch removes the assertion.
2013-04-06 18:06:51 +09:00
Benjamin Otte
8687fbc15e reftests: Add a test for window default size
https://bugzilla.gnome.org/show_bug.cgi?id=697275
2013-04-06 10:47:55 +02:00
Benjamin Otte
70a0d1a32d tests: Remove multiscreen code from teststusicon 2013-04-06 10:47:55 +02:00
Benjamin Otte
4b75077ccd tests: Remove testmultiscreen example
There aren't multiple screens anymore, so no need to test that.

Multiple displays can be tested with gtk-demo and testgtk.
2013-04-06 10:47:55 +02:00
Benjamin Otte
06bd9200cd testgtk: Get rid of screen part in display & screen test 2013-04-06 10:47:55 +02:00
Benjamin Otte
ae2208cd5d gdk: Deprecate gdk_display_get_n_screens() 2013-04-06 10:47:55 +02:00
Benjamin Otte
f8b017faa8 x11: Simplify code for single-screen case 2013-04-06 10:47:55 +02:00
Benjamin Otte
b315868663 gtk: Simplify code for reduced screen count 2013-04-06 10:47:55 +02:00
Benjamin Otte
e255cf15fb icontheme: Remove unused function 2013-04-06 10:47:55 +02:00
Benjamin Otte
f2263afb19 gtk-demo: Remove multiscreen support
There's only one screen per display, so no need to let users select from
a list of that 1 screen.
2013-04-06 10:47:55 +02:00
Tristan Van Berkom
6a90c48ea6 GdkOffscreenWindow: Implement gdk_window_get_frame_extents()
This avoids crashes in gtk_window_get_position() whenever the GdkWindow
is offscreen.
2013-04-06 17:16:09 +09:00
Thomas Hindoe Paaboel Andersen
4e1c9f16a0 reftests/Makefile.am: remove whitespace following trailing backslash 2013-04-05 23:10:32 +02:00
Shankar Prasad
4bc720dea3 Updated kn translations 2013-04-06 00:25:09 +05:30
Alexander Larsson
9a79c3d643 broadway: Unsure we clear the grab on window hide 2013-04-05 17:07:04 +02:00
Alexander Larsson
a6a768437d broadway: Fix warning
Don't pass NULL source_device in grab/ungrab events
2013-04-05 17:07:03 +02:00
Shankar Prasad
10beebd2ab Updated kn translations 2013-04-05 19:20:14 +05:30
Tristan Van Berkom
c771a8a3a6 objects-finalize test: Blacklist gdk_pixbuf_simple_anim_iter_get_type() 2013-04-05 21:11:13 +09:00
Matthias Clasen
cdcc804730 wayland: Implement more keymap functions
This commit implements gdk_keymap_get_entries_for_keyval
and gdk_keymap_lookup_key.
2013-04-05 07:23:00 -04:00
Matthias Clasen
be1e57db1f wayland: Implement gdk_keymap_get_entries_for_keycode 2013-04-05 07:23:00 -04:00
Tristan Van Berkom
33b9865651 Added test case to assert all object types finalize properly.
The test case uses a weak ref to assert objects can finalize,
and then spins the main loop shortly after finalizing to assert
that the finalized object did not leak GSources into the main context
causing latent crashes.
2013-04-05 20:14:38 +09:00
Matthias Clasen
086789d015 wayland: Always initialize directions
I forgot to initialize directionm in gdk_wayland_keymap_new,
leading to crash.
2013-04-04 21:14:53 -04:00
Cosimo Cecchi
eff4be5673 build: bump required GLib version to 2.37.0 2013-04-04 17:17:34 -04:00
Balázs Úr
3d2bf3a530 Updated Hungarian translation 2013-04-04 21:49:01 +02:00
Cosimo Cecchi
de6eca952a bloatpad: add a test for GApplication's busy state
https://bugzilla.gnome.org/show_bug.cgi?id=672018
2013-04-04 13:17:12 -04:00
Alexander Larsson
a2c65d47b0 Fix gtk_window_set_opacity()
We *do* want to call gdk_window_set_opacity() on toplevels, because
this particular case does work.

https://bugzilla.gnome.org/show_bug.cgi?id=697263
2013-04-04 15:42:02 +02:00
Matthias Clasen
246f32a58d wayland: Emit ::direction-changed when appropriate
We always emit direction-changed when we get a new keymap, but
for state changes, we compare old and new direction and only
emit the signal when the direction actually changes.
2013-04-03 23:52:52 -04:00
Matthias Clasen
2f8f1ef485 wayland: Implement keymap direction
This is very similar to the X11 implementation.
2013-04-03 23:45:54 -04:00
Pavel Vasin
5d9c07a061 wayland: display: Fix memory leak
https://bugzilla.gnome.org/show_bug.cgi?id=696767
2013-04-03 19:20:57 -04:00
Pavel Vasin
edbb522f1f GtkHeaderBar: Fix memory leak
https://bugzilla.gnome.org/show_bug.cgi?id=696767
2013-04-03 19:20:54 -04:00
Sébastien Wilmet
14c9023a05 GtkWindow: fix notify of :attached-to
https://bugzilla.gnome.org/show_bug.cgi?id=697200
2013-04-03 19:32:21 +02:00
Alexander Larsson
8084e6e468 broadway: Ensure we allocate shm surface space early
This is nicer then getting random sigbus later
2013-04-03 15:58:42 +02:00
Alexander Larsson
c340dfeaf8 Broadway: Fix shm names
We were sometimes getting zero chars in the name, making them
shorter, due to an off-by-zero in the size.
2013-04-03 15:58:41 +02:00
Alexander Larsson
b7a1561fef broadway: destroy old surface before creating new one
We were not using the old one anyway, and this may in some cases
use less memory (although in most cases the server has a ref to the
surface anyway).
2013-04-03 15:58:40 +02:00
Cosimo Cecchi
a60ddd9a02 window: don't schedule a display of mnemonics if window has no modifier
When the window has no mnemonics modifier set, as in the case of a
GtkMenu, never schedule a display of mnemonics on focus-in.

Previously, for those windows, the GdkModifierType mask fetched from the
device would typically have been zero, leading to the

mnemonic_modifier == (mask & gtk_accelerator_get_default_mod_mask ())

check to succeed, so we would always trigger a display for popup menus.

https://bugzilla.gnome.org/show_bug.cgi?id=697144
2013-04-02 17:39:44 -04:00
Cosimo Cecchi
cfb1e56561 window: refactor a function
Instead of having maybe_set_mnemonics_visible(), separate the checks
from the actual scheduling of mnemonics display.

https://bugzilla.gnome.org/show_bug.cgi?id=697144
2013-04-02 17:39:43 -04:00
Cosimo Cecchi
58209e1138 window: rename functions dealing with mnemonic delayed display
Don't mention "auto mnemonics", since those methods are purely about
scheduling a delayed display, and that makes understanding the code a
bit harder.

https://bugzilla.gnome.org/show_bug.cgi?id=697144
2013-04-02 17:39:42 -04:00
Cosimo Cecchi
68b437eea2 window: reset timeout source id before setting property
gtk_window_set_mnemonics_visible() will try to g_source_remove() it
otherwise, which seems harmless, but conceptually wrong.

https://bugzilla.gnome.org/show_bug.cgi?id=697144
2013-04-02 17:39:39 -04:00
Wojciech Szczęsny
05cb110e0b Updated Polish translation 2013-04-02 16:05:33 +02:00
Rob Bradford
000ed99f3d gdkdisplay: Warn if asked for a non-zero screen not a zero screen
Following on from a6b29d73 this commit correctly warn if you try and use
deprecated multiple screen behaviour.
2013-04-02 12:04:22 +01:00
Benjamin Otte
e69e609bd7 style: Add missing deprecation markers
Some functions in gtkstyle.h were overlooked when we added the
GDK_DEPRECATED macros.

Also add IGNORE_DEPRECATIONS to the few remaining callers of those
functions.
2013-04-02 11:45:45 +02:00
Benjamin Otte
f47f94be42 window: Remove call to gtk_widget_reset_rc_styles()
First of all, that call is deprecated. Second, we don't have RC styles
anymore. Third, what that function does today is invalidate style
contexts, but that happens automatically when setting the screen on the
style context later.

So this function is completely unnecessary.
2013-04-02 11:45:44 +02:00
Benjamin Otte
a55f1f4e95 broadway: Mark deprecated function call
... to avoid gcc warning us. Ideally, we'd not call a deprecated
function here, but I'm lazy.
2013-04-02 11:45:44 +02:00
Benjamin Otte
dc132a9895 broadway: Don't use deprecated API 2013-04-02 11:45:44 +02:00
Benjamin Otte
225dec6940 celrendererspinner: Don't use deprecated API 2013-04-02 11:45:44 +02:00
Benjamin Otte
231520af8f widget: Get rid of deprecation warnings 2013-04-02 11:45:44 +02:00
Benjamin Otte
d80dedf46e testsensitive: Remove deprecated part 2013-04-02 11:45:44 +02:00
Benjamin Otte
a6b29d73d7 gdkdisplay: Remove get_screen() and get_n_screens() vfuncs 2013-04-02 11:45:44 +02:00
Matthias Clasen
88d59448ea Mention display:screen change in release notes 2013-04-01 23:05:51 -04:00
Ryan Lortie
45a94ccc88 tests: improve gtkmenu testcase
Don't just create a menushell and populate it with random data -- verify that
the resulting menu layout is actually correct.

This is introduced in a separate commit because the old code was failing this
part of the test.

https://bugzilla.gnome.org/show_bug.cgi?id=696468
2013-04-01 16:45:20 -04:00
Ryan Lortie
5617b58420 Introduce GtkMenuTracker
GtkMenuTracker folds a nested structure of sections in a GMenuModel into
a single linear menu, which it expresses to its user by means of 'insert
item at position' and 'remove item at position' callbacks.

The logic for where to insert separators and how to handle action
namespaces is contained within the tracker, removing the need to have
this logic duplicated in the 3 or 4 places that consume GMenuModel.

In comparison with the previous code, the tracker no longer completely
destroys and rebuilds menus every time a single change occurs.  As a
result, the new gtkmenu testcase now runs in approximately 3 seconds
instead of ~60 before.

https://bugzilla.gnome.org/show_bug.cgi?id=696468
2013-04-01 16:45:19 -04:00
Ryan Lortie
e250e52175 tests: add a test for gtk_menu_shell_bind()
Borrow the RandomMenu code from the GLib testsuite and hook it up to
gtk_menu_shell_bind().

https://bugzilla.gnome.org/show_bug.cgi?id=696468
2013-04-01 16:45:19 -04:00
Sébastien Wilmet
d599985a41 gtktextattributes: move comment above relevant struct
https://bugzilla.gnome.org/show_bug.cgi?id=697048
2013-04-01 21:12:49 +02:00
Sébastien Wilmet
a5f52afd38 GtkTextTagTable: simplify a bit the code
https://bugzilla.gnome.org/show_bug.cgi?id=697048
2013-04-01 21:12:49 +02:00
Sébastien Wilmet
97dfcc1073 GtkTextView: remove some dead code
https://bugzilla.gnome.org/show_bug.cgi?id=697048
2013-04-01 21:12:49 +02:00
Sébastien Wilmet
6f990fa7e4 gtktextattributes: explain what is "pg_bg"
I didn't know what "pg" stands for.

https://bugzilla.gnome.org/show_bug.cgi?id=697048
2013-04-01 21:12:49 +02:00
Sébastien Wilmet
3a8f70dd1e gtktextattributes: include the right headers
Some function prototypes in gtktexttagprivate.h are implemented in
gtktextattributes.c.

https://bugzilla.gnome.org/show_bug.cgi?id=697048
2013-04-01 21:12:49 +02:00
Sébastien Wilmet
fd84704d94 gtktexttypes: remove inline_byte_begins_utf8_char()
The function was used only in gtk_text_byte_begins_utf8_char().

https://bugzilla.gnome.org/show_bug.cgi?id=697048
2013-04-01 21:12:49 +02:00
Sébastien Wilmet
94f96cb2f9 Doc: fix dead link in the text widget overview
https://bugzilla.gnome.org/show_bug.cgi?id=697048
2013-04-01 21:12:49 +02:00
Sébastien Wilmet
090081ec23 Doc: move the GtkTextAttributes struct
It's more logical to have the GtkTextAttributes and GtkTextAppearance
structs together. And it creates a separation between gtk_text_tag and
gtk_text_attributes functions.

https://bugzilla.gnome.org/show_bug.cgi?id=697048
2013-04-01 21:12:49 +02:00
Alexander Larsson
40c3062d33 broadway: Use wss: on https: uris 2013-04-01 17:44:33 +02:00
Benjamin Otte
f73bf26df0 Deprecate gdk_get_display() 2013-04-01 14:20:47 +02:00
Benjamin Otte
cb2c47597e gdk: Shuffle code around
Make implementation, header and documentation be at the correct place.
2013-04-01 14:20:46 +02:00
Benjamin Otte
47a8c2f733 x11: Make display:screen relation 1:1
Only ever open the default screen.

If apps need support for multiple screens, they need to
gdk_display_open() them manually.
2013-04-01 14:20:46 +02:00
Benjamin Otte
e76cb9daca wayland: Remove unused variable 2013-04-01 14:20:46 +02:00
Matthias Clasen
28fab2eea2 Remove an unused filed in GdkWindowImplWayland
The unused toplevel_window_type field was copied over from
the X backend.
2013-03-31 22:46:31 -04:00
Matthias Clasen
cb4cf67a95 Remove an unused field in GdkWindowX11
The toplevel_window_type field was only ever set to -1, and
never used. The actual, used toplevel_window_type field lives
in GdkWindow.
2013-03-31 22:44:59 -04:00
Ville-Pekka Vainio
17c402c030 Finnish translation update by Jiri Grönroos 2013-03-31 20:27:56 +03:00
Carles Ferrando
07b035a8cc [l10n] Updated Catalan (Valencian) translation 2013-03-31 17:03:03 +02:00
Kristian Høgsberg
4252ac6d6c wayland: Set a wayland-client log handler to print errors we get 2013-03-30 14:20:00 -04:00
Kristian Høgsberg
8886c63a4e wayland: Don't error out on G_IO_HUP until we've read G_IO_IN data
We can get G_IO_HUP and G_IO_IN at the same time, if the compositor writes
data to us and then closes our connection.  Make sure that we dispatch events
always if we have G_IO_IN and then error out if we get G_IO_HUP after that.
2013-03-30 14:20:00 -04:00
Carles Ferrando
50097d5baa [l10n] Updated Catalan (Valencian) translation 2013-03-30 16:24:03 +01:00
Pau Iranzo
9f058ee9cb [l10n] Update Catalan translation 2013-03-30 16:23:35 +01:00
Matej Urbančič
8847f4851c Updated Slovenian translation 2013-03-30 11:13:50 +01:00
Matej Urbančič
b732f7ffe8 Updated Slovenian translation 2013-03-30 11:09:59 +01:00
Matej Urbančič
8229a29280 Updated Slovenian translation 2013-03-30 11:07:17 +01:00
Matej Urbančič
a9ccb18b41 Updated Slovenian translation 2013-03-30 09:47:45 +01:00
Alexander Larsson
e9b8b5c1f0 broadway: Reuse surfaces passed to server
This way we don't have to reopen all the time for pure updates,
and we can immediately unlink the shm file to avoid "leaking" them
on improper shutdown.
2013-03-29 14:09:47 +01:00
Alexander Larsson
c6baa9bc25 broadway: Move surface open to server
This way we can cache the last opened surface
2013-03-29 14:09:47 +01:00
Alexander Larsson
6ef8589a51 broadway: Make chrome work again 2013-03-29 14:09:47 +01:00
Alexander Larsson
8289f4cdc9 broadway: Add support for password authentication 2013-03-29 14:09:47 +01:00
Alexander Larsson
1148a375e5 broadway: Limit window resize based on window geometry 2013-03-29 14:09:47 +01:00
Alexander Larsson
71b4557210 broadway: Sync surface updates with paint clock
We now only update surface data after we have painted. Before we painted
in an idle, which meant we might send black data some times if we e.g.
resized the window and had not painted yet. Also, it means we're updating
less often to the daemon, saving resources.

We still have to queue a flush in the idle for non-draw operations,
otherwise e.g. resize of a toplevel will never be flushed if the clock
is frozen (e.g. during toplevel resize).
2013-03-29 14:09:47 +01:00
Alexander Larsson
a20cb3dd25 broadway: Ensure window sizes are synched right
We don't want to update the window size on configure event, only
the position, as the size is client side controlled. We were
updating to an old size during resizes which causes us to send
surfaces of the wrong size to the daemon.
2013-03-29 14:09:46 +01:00
Alexander Larsson
19e683e62a broadway: Clean up moveresize code 2013-03-29 14:09:46 +01:00
Alexander Larsson
0129876ed3 broadway: Remove leftover cruft that caused resize to fail
getTransientToplevel() doesn't exist anymore so this broke.
2013-03-29 14:09:46 +01:00
Alexander Larsson
e9906138e5 broadway: Fix mouse position typo 2013-03-29 14:09:46 +01:00
Benjamin Otte
0a82b79012 reftests: Add a reftest for color resolving errors
This checks the fixes in the last two commits.
2013-03-28 23:18:59 +01:00
Benjamin Otte
cbee390148 cssvalue: At cycle detection to color resolving
The following CSS would infloop:

@define-color self @self

as it would infinitely lookup the color named "self" and try to resolve
it. This patch adds detection of such cycles to the resolve function by
keeping a list of currently resolving colors in the cycle_list variable.
2013-03-28 23:18:59 +01:00
Benjamin Otte
c25d8e3aea cssvalue: Handle named colors not resolving
If a named color references a nonexistant named color, we didn't catch
that error and ended up crashing on a NULL-dereference.
This crashed Boxes, because its CSS referenced values from the theme
that didn't exist in any theme.
2013-03-28 23:18:59 +01:00
Benjamin Otte
dded6a0673 menuitem: Remove old themeing enhancement
CSS doesn't allow themeing parents based on the state of their children,
so this code just causes extra redraws today.
2013-03-28 23:18:59 +01:00
Benjamin Otte
d20ac0acf9 menushell: Remove unused header 2013-03-28 23:18:58 +01:00
Benjamin Otte
436af3fcb5 menu: Move enum declaration to correct header
That enum is used in GtkMenuShellClass, so put it there.
2013-03-28 23:18:58 +01:00
Benjamin Otte
030c65f299 tearoffmenuitem: Use public API, don't poke GtkMenuPrivate 2013-03-28 23:18:58 +01:00
Chris Cummins
b8ed3e9ef5 wayland: Implement animatable cursors
Cursor animations are handled on a per-device basis, with
GdkWaylandDevice updating the pointer surface for each frame.

https://bugzilla.gnome.org/show_bug.cgi?id=696429
2013-03-28 10:33:57 -04:00
Chris Cummins
4801977d80 wayland: Do not free wayland cursor buffers
The cursor buffer is only non-null when a cursor is created from pixbuf,
so it is not necessary to keep track of whether to free this buffer on
finalize.
2013-03-28 10:33:57 -04:00
Chris Cummins
c022cbae0d wayland: Differentiate wayland and pixbuf cursors
By keeping a pointer to the wl_cursor struct in GdkWaylandCursor, it is
no longer necessary to duplicate cursor data (width, height, hotspots,
etc.) between wl_cursor and GdkWaylandCursor.
2013-03-28 10:33:57 -04:00
Andika Triwidada
5fa97f70b4 Updated Indonesian translation of po-properties 2013-03-28 21:05:50 +07:00
Alexander Larsson
7df7e092b9 GtkOverlay: Respect overlay child min size
Never allocate an overlayed child less than its minimum request.
If the minimum doesn't fit we will gracefully clip via the
widget window.

https://bugzilla.gnome.org/show_bug.cgi?id=696623
2013-03-28 13:32:09 +01:00
Alexander Larsson
785a916267 GtkOverlay: Don't allocate child except in size_allocate
We were calling gtk_overlay_child_allocate() both in realize
and in add as we wanted to create and position the child windows
for the widgets. However, this call also actually called
gtk_widget_size_allocate() on the child, which it shouldn't. In some
cases the overlay is realized before being allocated, and thus it
will allocate the child at 0x0 which is an invalid size for it to be in.
In particular, if the child has margins set this will result in negative
allocations and warnings.

This fix splits out the allocation computation so that
gtk_overlay_create_child_window can use it without callers
having to call gtk_overlay_child_allocate() to move the windows.

https://bugzilla.gnome.org/show_bug.cgi?id=696623
2013-03-28 13:32:06 +01:00
Kristian Rietveld
6f607fc8b4 quartz: move atom/pasteboard type conversions functions to GDK
(cherry picked from commit a269c2f8d2)
2013-03-28 13:10:38 +01:00
Jan Arne Petersen
40c5d37340 docs: Add wayland documentation to Gdk reference 2013-03-27 21:04:05 +01:00
Kristian Høgsberg
abfa4bf0aa wayland: Use the wl_display_sync() request to track pending init roundtrips
Instead of maintaining the init refcount in regular event handlers that can
fire in case of hotplug or mode changes, use a dedicated sync callback
to wait for roundtrips.
2013-03-27 13:44:33 -04:00
Kristian Høgsberg
fc713dffb3 wayland: Pass most recent button press serial to set_popup_surface 2013-03-27 13:39:58 -04:00
Alexander Larsson
9cc64579c2 gdkwindow: Apply layered areas to the shape for native windows
If a window is overlapped by a layered (i.e. partially transparent)
window then that region will not disappear from the native window clip
region. This lets us handle compositing multiple layers of windows.

For native subwindows this doesn't really work. For them we apply the
clip region as a shape to the native window which lets us have client
side windows overlapping the native window. However, with the addition
of the layered stuff the "overlapped-by-alpha-csw" part got broken, as
this area is not removed from the clip region of the native window.

We fix this by also removing the layered area when applying the shape.
This means alpha and alpha backgrounds don't work over native windows,
but there is not much to do about that.

https://bugzilla.gnome.org/show_bug.cgi?id=696370
2013-03-27 12:02:27 +01:00
Alexander Larsson
6374873dcb gdkwindow: Add alpha_bg to window debug print 2013-03-27 12:02:25 +01:00
Matthias Clasen
93efaa5ebe Fix GtkApplicationWindow menubar placement
Since the menubar is part of the content, we need to give
it the content_window as parent window, to make things
work again.
https://bugzilla.gnome.org/show_bug.cgi?id=696561
2013-03-27 00:23:19 -04:00
Matthias Clasen
bdfd0d4638 Don't return FALSE from a non-boolean function
https://bugzilla.gnome.org/show_bug.cgi?id=696608
2013-03-26 23:30:10 -04:00
Matthias Clasen
4987728d7a wayland: Handle seat removal
Also, emit ::device-added and ::device-removed signals
as devices appear and disappear.
2013-03-26 22:57:46 -04:00
Matthias Clasen
28c865b4e2 wayland: Make monitor removal work
The global_removal argument is the _name_ of the object.
We were comparing it to the _object id_ of the object.
To fix this, store the name at the time the object is bound.
2013-03-26 22:16:15 -04:00
Matthias Clasen
ca09a600c3 wayland: Also emit monitors-changed when monitors are unplugged 2013-03-26 21:53:41 -04:00
Matthias Clasen
27e517a445 wayland: Also emit size-changed when appropriate
We need to be a bit more careful when updating the screen
size - the code that was there would not do the right thing
if e.g. the width of one monitor was reduced.
2013-03-26 21:47:49 -04:00
Matthias Clasen
0489fcffbe wayland: Emit monitors-changed when monitors change 2013-03-26 21:37:21 -04:00
Matthias Clasen
93e5d83a9d Don't decrement the init_ref_count towards -infinity
Once we are at zero, initialization is done.
2013-03-26 21:27:21 -04:00
Matthias Clasen
7069f6a251 Pimp up testheaderbar some more 2013-03-26 20:46:30 -04:00
Marek Černocký
119190959c Updated Czech translatio 2013-03-26 23:06:55 +01:00
Kristian Høgsberg
abe7dc6bb4 wayland: Set screen size to bounding box of all outputs
Don't hardcode 8192x8192.  We don't get this info from wayland, so we
compute it as we receive information about the available wl_outputs.

https://bugzilla.gnome.org/show_bug.cgi?id=692871
2013-03-26 17:32:15 -04:00
Kristian Høgsberg
a9e980e578 wayland: Roundtrip until we've receive initial input and output configuration
We use a ref-count mechanism to track whether parts of the init sequence
still needs round trips to receive remaining initial state.  Typically
we need a couple of roundtrips total to get the global list, then the
input and output configurations, but with the ref-count we avoid making
global assumptions like that.

https://bugzilla.gnome.org/show_bug.cgi?id=696340
2013-03-26 14:42:16 -04:00
Chun-wei Fan
b1aa23f4bd Bug 695895: Fix gtk3-demo on Windows
In commit 4e41577b, we are using g_content_type_is_a() to determine how
to display the demo resources in the right pane of the gtk3-demo program.

Use g_content_type_get_mime_type(), so that we can obtain the mime
type of the demo resources on all platforms, as g_content_type_guess()
returns a platform-specific string, as
https://developer.gnome.org/gio/2.35/gio-GContentType.html states.

As .ui files and .css files are normally registered with a different mime
type string on Windows, check for those strings as well.

This will ensure the demo resources can be properly displayed on Windows
as well.
2013-03-26 16:59:16 +08:00
Chun-wei Fan
be2c1ac316 Fix Visual Studio property sheets
The creation of the folder for the "installation" of a11y headers is wrong,
so fix that.
2013-03-26 11:58:33 +08:00
Daniel Korostil
78f2a3acc8 Added uk translation 2013-03-25 22:39:47 +02:00
Mario Blättermann
4c1bab777d [l10n] Updated German translation 2013-03-25 19:29:37 +01:00
Carlos Garcia Campos
5701681df4 gtkprintbackendcups: Fix a crash in avahi_create_browsers()
In avahi_request_printer_list() a new connection to the DBus system bus
is started asynchronously, but it's not cancellable and it's not taking
any reference of the GtkPrintBackendCups. This means that when the
callback is called, the object might have been destroyed already. We can
just pass the cancellable created and check for the cancelled error in
the callback before trying to use the GtkPrintBackendCups. The code to
cancel avahi operations and to unsibscribe from the DBus signals has
been moved from finalize to dispose to make sure it happens as soon as
possible.

https://bugzilla.gnome.org/show_bug.cgi?id=696553
2013-03-25 14:58:03 +01:00
Carlos Garcia Campos
b29cd63c38 gtkprintbackendcups: Fix a crash in gtk_print_backend_cups_finalize()
If GtkPrintBackendCups is finalized and cups_get_printer_list hasn't
been called, g_object_unref is called for the GDBusConnection pointer
that is NULL. Use g_clear_object() instead.

https://bugzilla.gnome.org/show_bug.cgi?id=696546
2013-03-25 14:40:50 +01:00
Alexandre Franke
54c137d1ea Update French translation 2013-03-25 12:07:06 +01:00
Shantha kumar
01bbf60a6b Tamil Translations Updated 2013-03-25 15:18:45 +05:30
Shantha kumar
f7b0cfdc10 Tamil Translations Updated 2013-03-25 15:18:30 +05:30
Ani Peter
05ea936f97 Completed for Malayalam 2013-03-25 14:03:52 +05:30
Matthias Clasen
920ee770ea wayland: Add toolbar settings 2013-03-24 20:21:50 -04:00
Luca Ferretti
613eab94cf [l10n] updated Italian translation 2013-03-24 20:57:35 +01:00
Jan Arne Petersen
8d884bb4fb wayland: Add support for custom surfaces
Allow to set a GdkWindow to use a custom surface instead of a
wl_shell_surface. It allows to register the surface as a custom type
with some Wayland interface.

https://bugzilla.gnome.org/show_bug.cgi?id=695861
2013-03-24 14:31:51 -04:00
Matthias Clasen
38eab78904 broadway: Don't use deprecated gdk_cursor_ref 2013-03-24 14:22:38 -04:00
Sébastien Wilmet
6cb2816c45 GtkWidget: add missing deprecation marks
https://bugzilla.gnome.org/show_bug.cgi?id=696138
2013-03-24 14:22:38 -04:00
Petr Kovar
f69236a6ba Update Czech translation 2013-03-24 19:19:45 +01:00
Sébastien Wilmet
30788062f7 GtkLabel: fix underlining of mnemonics
The underscore was shown in front of the mnemonic instead of underlining
it (e.g., _Save).

Thanks to Lars Uebernickel.

https://bugzilla.gnome.org/show_bug.cgi?id=674759
2013-03-24 15:07:40 +01:00
Ask H. Larsen
c2202e1a31 Updated Danish translation 2013-03-24 14:50:40 +01:00
Mario Blättermann
132fbe5602 [l10n] Updated German translation 2013-03-24 12:53:30 +01:00
Matthias Clasen
d1ad324d3d csd: Reparent the content
This lets us avoid problems with cursor changes.
2013-03-24 01:15:33 -04:00
Matthias Clasen
65cd2a59c3 Make gtk_init_check work as expected
When no GDK backend can be initialized (either because
GDK_BACKEND has been set to the wrong value, or the backends
are simply not included), the expectation is that gtk_init_check
should return FALSE, not error out.
This commit makes it so, by using gdk_display_manager_peek
instead of gdk_display_manager_get in code paths that are used
during initialization.
2013-03-23 19:41:39 -04:00
Matthias Clasen
48d8af85d0 Make gdk_display_open_default_libgtk_only more robust
Make this function return NULL if GDK could not be
initialized. We check this by seeing if there is a
display manager singleton.
2013-03-23 19:40:16 -04:00
Matthias Clasen
c5d7871eda Add gdk_display_manager_peek
Instead of failing with an error if no GDK backend is found like
gdk_display_manager_get(), the new peek function silently returns
NULL.
2013-03-23 19:39:58 -04:00
Matthias Clasen
97ebaee0e2 wayland: Remove a few unused variables 2013-03-23 18:31:20 -04:00
Matthias Clasen
9182eacadf wayland: Don't recreated keymaps on layout change
The GDK model for keymaps expects the keymap object to stay
around and emit a ::keys-changed signal. So, do that. This
should make layout changes work, but it remains untested since
weston does not support layout changes at runtime.

At the same time, plug a memory leak where GdkWaylandKeymap
forgot to free its xkb objects in finalize.
https://bugzilla.gnome.org/show_bug.cgi?id=696339
2013-03-23 18:04:15 -04:00
Tarnyko
0f59ff4550 win32: Bring back spinner animation
Define the spinner animation in css.
https://bugzilla.gnome.org/show_bug.cgi?id=696202
2013-03-23 17:42:55 -04:00
Matthias Clasen
c6d95a7bdc wayland: remove an unused variable 2013-03-23 17:29:28 -04:00
Matthias Clasen
a70acc03c5 wayland: Respect keymap repeat information
xkb has a function to tell us whether a key should be repeated
or not. Lets use that information.
2013-03-23 17:29:28 -04:00
Jorge Pérez Pérez
d22bdc8c0b Updated Aragonese translation 2013-03-23 22:19:11 +01:00
Colin Walters
4f0e9cbf81 gtktoolpalette: Only call gdk_atom_intern when we're constructed
Otherwise we end up trying to instantiate a display manager in
class_init which breaks introspection scanning.

https://bugzilla.gnome.org/show_bug.cgi?id=696457
2013-03-23 17:07:15 -04:00
Colin Walters
d6b4e84957 gdkkeys: Avoid instantiating a display manager if none exists
For introspection scanning which ends up calling class_init() which in
turn calls into the keybindings code, we can just use the fallback
keyval conversion code.

https://bugzilla.gnome.org/show_bug.cgi?id=696457
2013-03-23 17:07:15 -04:00
Marc-André Lureau
564b4e667a win32: do not crash on invalid utf8 conversion
g_utf8_to_utf16() is not guaranteed to succeed. Check the error
and return if it failed.

https://bugzilla.gnome.org/show_bug.cgi?id=696232
2013-03-23 15:50:09 -04:00
Tarnyko
7ffaab3f91 win32: Improve GtkAssistant theming
The highlighted color chosen for GtkAssistant header font
(deep blue) makes it hardly readable is most cases. Switch
to light gray.
https://bugzilla.gnome.org/show_bug.cgi?id=696171
2013-03-23 15:47:39 -04:00
Matthias Clasen
7c8c242e7e Expand testgrid to cover row/column removal 2013-03-23 15:43:38 -04:00
Matthias Clasen
cc86a7bb7e Add gtk_grid_remove_{row,column}
It is sometimes convenient to deal with entire rows or
columns at a time.
https://bugzilla.gnome.org/show_bug.cgi?id=695994
2013-03-23 15:43:37 -04:00
John Lindgren
666d10ec76 Use natural size to set adjustment ranges
This is an (unintentional) side effect of my changes to GtkTreeView's
get_preferred_size() implementation.  It seems odd to me that
GtkTreeView directly determines its own size when inside a
GtkScrolledWindow, but since it does, it should be using its natural
size, not its minimum size.
2013-03-23 19:49:03 +01:00
Vadim Godunko
55012318a6 Fix drawing of grid lines in RTL
The vertical grid lines were not properly positions in
RTL locales.
https://bugzilla.gnome.org/show_bug.cgi?id=696051
2013-03-23 14:01:35 -04:00
Matthias Clasen
d2c8b65fd9 wayland: Pick up more settings
With this commit, we pick up xft settings from GSettings
as well. Among other things, this makes the Large Text
setting work. Still to do: pick up fontconfig changes without
having all clients use up inotify watches for all font
directories.
2013-03-23 13:02:09 -04:00
Yuri Myasoedov
76dabc8551 Updated Russia translation 2013-03-23 20:04:57 +04:00
Tristan Van Berkom
1a088d3aba GtkBuilder: Fixed documentation
The documentation was referring to an <external-object> tag
which we never implemented
2013-03-23 20:44:12 +09:00
Matthias Clasen
ce7c6d58c2 Add gdk_set_allowed_backends
This new function allows programmatic control over the
GDK backends that will be used at runtime.
2013-03-23 00:48:26 -04:00
Matthias Clasen
832c698776 Implement GInitable in GdkBroadwayDisplayManager
Add GInitable implementation and fail the initialisation if it is not
possible to set up a broadway server.
2013-03-23 00:48:25 -04:00
Matthias Clasen
bfcf9e471d Implement GInitable in GdkX11DisplayManager
Add GInitable implementation and fail the initialisation if it is not
possible to connect to the display server.
2013-03-23 00:48:25 -04:00
Thomas Wood
09d0d32af0 wayland: implement GInitable and check the connection to the display server
Add GInitable implementation and fail the initialisation if it is not
possible to connect to the display server.

https://bugzilla.gnome.org/show_bug.cgi?id=694465
2013-03-22 22:25:32 -04:00
Thomas Wood
3a9de35a6c gdk: Implement GInitable on GdkDisplayManager
Add GInitable interface with a default implementation that always
succeeds. This allows backends to override the GInitable implementation
and add their own checks to determine if the backend can be loaded.  If
a backend cannot be loaded, GDK can attempt to load the next available
backend.

Since backends may need to read any relevant options (such as the
display flag) to determine if they can be created successfully, this
patch also removes calls that attempt to create the display manager
before the options have been parsed.

https://bugzilla.gnome.org/show_bug.cgi?id=694465
2013-03-22 22:23:39 -04:00
Matthias Clasen
75f4f7a471 Update cursor theme on wayland
Call the new new api from gtksettings.c when it changes, just
as we do for X11.
https://bugzilla.gnome.org/show_bug.cgi?id=696428
2013-03-22 20:33:47 -04:00
Matthias Clasen
c61956c592 wayland: Implement cursor theme changing
Add gdk_wayland_display_set_cursor_theme and implement it.
2013-03-22 20:30:51 -04:00
Matthias Clasen
8caf1ae7fd wayland: Respect cursor size setting
Respect the cursor size setting when loading the cursor theme.
2013-03-22 19:32:39 -04:00
Matthias Clasen
3278fb9990 wayland: Add cursor-size setting
This will be picked up by cursor themes soon.
2013-03-22 19:27:36 -04:00
Matthias Clasen
37843faea9 wayland: Avoid segfault when cursors are freed
The check for GDK_CURSOR_IS_PIXMAP was ineffective, since _all_
cursors have this type, from the looks of it. Instead, store
buffer ownership information separately.
2013-03-22 19:09:20 -04:00
Matthias Clasen
cc70ac104d wayland: Emit GdkKeymap::state-changed when appropriate
This makes the caps lock warning in password entries work.
2013-03-22 18:34:44 -04:00
Matthias Clasen
1ea760fbc9 wayland: Make key repeat configurable
These might be candidates for a future settings interface; until
then, we use GSettings directly. Note again that we are careful
to avoid a dependency on GNOME schemas.
2013-03-22 18:26:33 -04:00
Matthias Clasen
659ae5172f wayland: Factor out key repeat parameters
This is in preparation for picking these values up from
existing configuration.
2013-03-22 18:09:23 -04:00
Matthias Clasen
9846a37ee3 wayland: Drop an unused variable
The keymap member in GdkWaylandDisplay is not used at all,
so drop it.
2013-03-22 17:53:28 -04:00
Matthias Clasen
6c191b939d wayland: Fix key repeat
Key repeat under X is not affected by modifiers. And on some systems
(e.g my Thinkpad), NumLock is permanently on, rendering key repeat
nonfunctional. This commit changes the Wayland backend to do
key repeat regardless of modifiers.
http://bugzilla.gnome.org/show_bug.cgi?id=695497
2013-03-22 17:43:50 -04:00
Cosimo Cecchi
5568dcb53c appchooserbutton: filter out applications not supposed to be visible
Ensure NoDisplay=true applications don't end up in the list populated by
GtkAppChooserButton.

https://bugzilla.gnome.org/show_bug.cgi?id=696405
2013-03-22 15:27:41 -04:00
Rajesh Ranjan
70cfac0e9a hindi translation 2013-03-22 15:01:16 +05:30
Matthias Clasen
69f12b1090 Don't react to clicks in content
This breaks way too many things, and we explicitly trigger
drags from menubars and toolbars, where we want it.
2013-03-21 18:07:21 -04:00
Matthias Clasen
02a0759c5d csd: Make link activation work reliably
The label code was just letting some button press events bubble
up, which caused misbehaviour with the window dragging code.
https://bugzilla.gnome.org/show_bug.cgi?id=695506
2013-03-21 18:07:21 -04:00
Matthias Clasen
6eaa5ffa8a csd: Allow moving maximized windows
This make the nice 'snap off' feature of gnome-shell work
with client-side decorations. weston moves the maximized window
around, which is less ideal...
2013-03-21 18:07:21 -04:00
Thomas Hindoe Paaboel Andersen
c5145421af wayland: complete cursor_for_pixbuf
Finishes the implementation for loading cursors from pixbufs.

Gnome bug #696223
2013-03-21 18:00:23 -04:00
Kalev Lember
a2cd9983c3 win32: link with -lwinmm
... to resolve the timeBeginPeriod() / timeEndPeriod() symbols after
commit 5dbf814f0c.
2013-03-21 22:55:46 +01:00
Cosimo Cecchi
8fd9575ab6 window: don't add the background style class when drawing CSD elements
We already set it in init, so this is just redundant.
The additional window-content style class here is needed so that we can
distinguish between the full X window background and the background for
the actual window contents.
2013-03-21 16:32:00 -04:00
Cosimo Cecchi
4bcaadac51 window: add a "client-decorated" style class when the window is so
The theme might want to apply some specific theming to a client
decorated toplevel window, so add a style class for that.
2013-03-21 16:31:14 -04:00
Fran Diéguez
2d13802f62 Updated galician translations 2013-03-21 20:30:29 +01:00
Baurzhan Muftakhidinov
fc949e43de Updated Kazakh translation. 2013-03-22 00:24:25 +06:00
Kristian Høgsberg
a80998127c wayland: Clear current cusor on leave so we always set it on enter
Commit 0d9d808217 fixed the hotspot issue,
but commit f2cc52fddd then optimized away
cursor changes a little too aggressively.  We always need to set the
cursor on enter.  Make sure we clear the current cursor on leave so we
don't think it's already set on the next enter.

https://bugzilla.gnome.org/show_bug.cgi?id=695512
2013-03-21 08:54:42 -04:00
Matthias Clasen
5f48934943 Wayland: Read settings out of GSettings directly
Until we figure out where we want to go with settings under
Wayland, this makes GTK+ applications a lot easier to deal
with under Wayland.

Note that we are careful to deal with the absence of schemas,
so this does not introduce a dependency on GNOME settings.
2013-03-21 07:15:59 -04:00
Mario Blättermann
6a690211f6 [l10n] Updated German translation 2013-03-21 09:20:34 +01:00
Matthias Clasen
329f7af159 Fix DND
The removal of the Motif DND code accidentally changed the
value of the TARGET_DELETE enumeration value, breaking DND
pretty badly.
2013-03-21 00:00:19 -04:00
Matthias Clasen
2bc313c624 GtkColorChooserDialog: make alternative button order work
The alternative button order that we set did not actually
work, since the ok button did not have a response id.
Partial fix for
https://bugzilla.gnome.org/show_bug.cgi?id=695493
2013-03-21 00:00:19 -04:00
Kristian Høgsberg
f2cc52fddd wayland: Only set cursor when it changes 2013-03-20 22:59:06 -04:00
Kristian Høgsberg
62eb5d0358 wayland: Add a cursor cache
We avoid creating a new GdkCursor object every time
_gdk_wayland_display_get_cursor_for_name/type() is called.
2013-03-20 22:56:50 -04:00
Kristian Høgsberg
0d9d808217 wayland: Use the pointer enter serial when setting cursor surface
wl_pointer.set_cursor is rejected if the serial number doesn't match
the enter serial number for the wl_pointer.  We passed the right serial
number when setting the cursor surface in response to the enter event.
Later set_cursor requests fail, but we can still attach new buffers to
our cursor surface, which is why the cursor changed, but the hotspot
didn't update.  Clicking in the decoration results in a leave/enter pair
which triggers wl_pointer.set_cursor with the right serial. That's why
clicking the decoration sets the right cursor.

https://bugzilla.gnome.org/show_bug.cgi?id=695512
2013-03-20 22:56:43 -04:00
Matthias Clasen
98801b07b4 GtkColorChooser: Fix selection of colors
Prevent the new window dragging code from interfering with
selection of colors on button release, by handling button
presses we care about instead of letting them bubble up to
the window.
Partial fix for
https://bugzilla.gnome.org/show_bug.cgi?id=695493
2013-03-20 22:21:16 -04:00
Matthias Clasen
26d3fc311b wayland: Keep hotspot when changing cursors
We need to pass the delta between the old and new hotspot
when attaching the new cursor surface, to keep the hotspot
at the same position. We can't deal with this in the compositor,
since the set_cursor call already overwrites the old hotspot,
so the information is lost by the time the attach happens.
Unfortunately, we can't query the initial hotspot from
the compositor, so the first cursor change will make the
hotspot jump.
https://bugzilla.gnome.org/show_bug.cgi?id=695512
2013-03-20 22:21:15 -04:00
Gabor Kelemen
92e0132d38 Updated Hungarian translation 2013-03-21 00:32:51 +01:00
Matthias Clasen
da2a102adb GtkWindow: clean up button event handling
We were not translating event coordinates to the toplevel
window, thus the regions we determined were not right.
We were also not respecting the maximized state, and we
were unnecessarily refusing to handle events when not decorated.
https://bugzilla.gnome.org/show_bug.cgi?id=696197
2013-03-20 18:21:12 -04:00
Balázs Úr
13092b3f3b Updated Hungarian translation 2013-03-20 22:10:37 +01:00
ManojKumar Giri
b846805c29 Updated Odia Translation. 2013-03-20 19:28:12 +05:30
Alexander Larsson
76e466197a GtkWidget: Handle style updates before realize
If the style changes before we're realized we will delay the
style-updated signal until realize. However, we then lose
the changes bitmap. This means that gtk_widget_real_style_updated()
must treat a NULL change as "everything changed" and queue a resize.
2013-03-20 13:56:16 +01:00
Chun-wei Fan
b20fde048f Update Visual Studio Proprerty Sheets
Stop installing the gtk3-demo data files as they are now built into the
gtk3-demo program using GResources.
2013-03-20 19:08:19 +08:00
Chun-wei Fan
9103dbb81d Fix introspection building for Visual Studio builds
Apparently time_t is used in gtkrecentmanager.h, which is a special type
that could not be recognized when Gtk-3.0.gir is built.  Judging from the
ast.py from the gobject-introspection package, we can define time_t as
long, and this will allow pygobject to load the Gtk module from
gi.repository.
2013-03-20 17:42:15 +08:00
Nilamdyuti Goswami
4b2243c8af Assamese translation updated 2013-03-20 13:22:00 +05:30
Arash Mousavi
1d5afb8613 L10N: Updated Persian Translation 2013-03-20 10:13:17 +03:30
Matthias Clasen
33d409d9fd Add an example for subtitles in header bars 2013-03-19 22:08:13 -04:00
Matthias Clasen
3731a2bd90 GtkHeaderBar: Add subtitle support
As seen in GdHeaderBar.
2013-03-19 22:07:26 -04:00
Matthias Clasen
d42c2c3f19 GtkHeaderBar: Survive toggling custom / non-custom titles
The code was always adding a label widget as a child, but
then skipping over it in forall if a custom_title was present.
This confuses internal logic of GTK+ which assumes that it
can iterate over the entire widget hierarchy with forall,
to maintain state. Fix this by destroying the label when
a custom_title is set, and recreating it as needed.
2013-03-19 20:52:54 -04:00
Matthias Clasen
2648ba45c6 test custom titles more thoroughly
This adds a way to toggle between custom and non-custom titles
in testheaderbar, which is currently broken.
2013-03-19 20:51:43 -04:00
Matthias Clasen
3289b3efbf GtkHeaderBar: Don't leak
Should have a finalize function, if there's strings to free.
Also avoid some pointless extra ref on custom title widgets.
2013-03-19 20:35:28 -04:00
Gil Forcada
2f9726b4a4 [l10n] Updated Catalan translation 2013-03-19 23:16:04 +01:00
Rob Bradford
1b15b9e1bc wayland: Preserve dimensions separately for fullscreen / maximised case
Use separate fields for saving the window dimensions prior to fullscreening
and maximisation. Then use those fields to restore the window dimensions from.
2013-03-19 19:52:49 +00:00
Rob Bradford
8cdbee7fd2 window: Use update_window_buttons to hide title on fullscreen
The function update_window_buttons shows or hides the title header after it
has finished updating the visibility of the various buttons. Unfortunately
this
conflicted with the hiding of the title done when going fullscreen.

This solves the problem and fixes the rendering of fullscreen applications by
using update_window_buttons to control the visibility of the box in the
fullscreen case.
2013-03-19 19:48:35 +00:00
Scott Moreau
1be7f3dee9 wayland: Implement gdk_window_[un]maximize
This allows the buttons in the decorations to maximise the window.

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

Signed-off-by: Rob Bradford <rob@linux.intel.com>
2013-03-18 15:51:39 +00:00
Alexander Larsson
8fb60cda19 broadway: Fix assert failure
Requests are not limited in size by BroadwayRequest, as
BroadwayRequestTranslation can be of variable size. No need
to copy the request anymore though, because requests are aligned
now.
2013-03-18 16:41:05 +01:00
Alexander Larsson
99cc5758b1 broadway: Ensure broadway request members are 32bit aligned 2013-03-18 16:41:02 +01:00
Christian Persch
953253f685 gtk: gtk_init_with_args allows NULL for parameter_string 2013-03-18 14:12:12 +01:00
Matthias Clasen
c4dc3a779a Revert "GtkHeaderBar: Allow window dragging"
This reverts commit 30a1a79322.

This turns out to be unnecessary when you can set the titlebar
on the window and let GtkWindow handle the events. As a benefit,
we get the window menu on custom titlebars for free.
2013-03-18 08:50:23 -04:00
Matthias Clasen
55969a8a0c Use gtk_window_set_titlebar in testheaderbar
This demonstrates how custom titlebars work both with
and without csd.
2013-03-18 08:50:22 -04:00
Matthias Clasen
30d0542309 Add documentation for gtk_window_set_titlebar 2013-03-18 08:50:22 -04:00
Matthias Clasen
4afbaf699f Add gtk_window_set_titlebar
A new function that sets a custom titlebar on a GtkWindow.
With client-side decorations, the custom titlebar simply
replaces the one that GtkWindow would otherwise create itself.
With traditional decorations, we tell the window manager
to just decorate the window with a border. This works ok
at least with metacity and mutter.
2013-03-18 08:50:22 -04:00
Matthias Clasen
105c808d0a Small cleanup in gtk_window_draw
Get the allocation once, at the beginning.
2013-03-18 08:50:22 -04:00
Matthias Clasen
4a2c3bbf3c window: Don't draw titlebar background
GtkHeaderBar can do its own drawing, no need to do this
in gtk_window_draw.
2013-03-18 08:50:22 -04:00
Matthias Clasen
e29c25cd1b Trivial whitespace fix 2013-03-18 08:50:22 -04:00
Matthias Clasen
63f0f03a73 Add forgotten check
We don't want to create titlebar widgets if the window
is not decorated anyway.
2013-03-18 08:50:21 -04:00
Scott Moreau
0d2c461720 wayland: Always attach buffer before committing
With recent changes in attach semantics, we always need to attach before
committing. Without this changes to the window contents to not get reflected
in the content of the surface.

Signed-off-by: Rob Bradford <rob@linux.intel.com>
2013-03-18 12:01:55 +00:00
Scott Moreau
50cde3658a wayland: Remove unneeded semicolons
Signed-off-by: Rob Bradford <rob@linux.intel.com>
2013-03-18 12:01:55 +00:00
Scott Moreau
d8507a3a83 wayland: Remove unused wayland-egl header
This was left over from the work done in commit: d4a9863

Signed-off-by: Rob Bradford <rob@linux.intel.com>
2013-03-18 12:01:55 +00:00
Scott Moreau
89b1947631 wayland: Set title on shell surfaces to window title
We currently use this information to display the title
string in the window list of the desktop shell.

Signed-off-by: Rob Bradford <rob@linux.intel.com>
2013-03-18 12:01:55 +00:00
Rūdolfs Mazurs
5149ea7c66 Updated Latvian translation 2013-03-18 13:49:04 +02:00
Nilamdyuti Goswami
9dbf0512c8 Assamese translation updated 2013-03-18 16:15:12 +05:30
Nilamdyuti Goswami
6252ee2753 Assamese translation updated 2013-03-18 16:09:34 +05:30
Chun-wei Fan
83f94ed1b9 Fix Visual Studio Debug configs
The debug builds must link to the Debug version of the CRT, otherwise
trouble will arise from mixing different CRTs into the resulting binary.
2013-03-18 17:14:33 +08:00
Matthias Clasen
bec5798180 Fix a typo 2013-03-18 01:20:08 -04:00
Matthias Clasen
4fd67b8c62 Add a headerbar test
Add a testcase for GtkHeaderBar that shows how it can be used
without client-side decorations.
2013-03-18 01:03:39 -04:00
Matthias Clasen
30a1a79322 GtkHeaderBar: Allow window dragging
We use the same window-dragging style property here to enable
this as for menubars and toolbars.
2013-03-18 01:02:19 -04:00
Matthias Clasen
2fe07c9068 Fix double accounting of border width
For csd, we were subtracting the border width one too many
times from the child height, causing clipped off content e.g.
in the 'Properties' window in testgtk.
2013-03-17 19:01:25 -04:00
Matthias Clasen
75a1e8251e Allocate the titlebar height according to width 2013-03-17 19:01:25 -04:00
Matthias Clasen
68b9bafd1d Add some visible border to the default csd 2013-03-17 19:01:25 -04:00
Matthias Clasen
cfc0118f6f Replace GLE reference
Recommending gtkparasite is more useful nowadays.
2013-03-17 19:01:25 -04:00
Fran Diéguez
ba1152df01 Updated galician translations 2013-03-17 23:22:29 +01:00
Matthias Clasen
df96b0239f GtkFontButton: default show-preview-entry to TRUE
This is what the property declaration says, after all.
https://bugzilla.gnome.org/show_bug.cgi?id=695948
2013-03-17 16:24:34 -04:00
Alban Browaeys
da961b7ab8 GtkEntryAccessible: also handle entry icon tooltip NULL in notify_gtk.
To clear the tooltip one is to set the tooltip to NULL. Though
the GtkEntryAccessible expect this tooltip to not be NULL in
gtk_entry_accessible_notify_gtk (already handling this case
 in its _init).

Fixes:
** (epiphany:23914): CRITICAL **: atk_object_set_description: assertion
`description != NULL' failed
when epiphany g_object_set the entry icon tooltip to NULL (clear the
tooltip) in its find bar.

https://bugzilla.gnome.org/show_bug.cgi?id=695375
2013-03-17 16:12:52 -04:00
Sébastien Wilmet
8e65fa1b43 GtkLabel: fix mnemonic-keyval when use-markup is true
To extract the mnemonic key value, the string must contain the
underscore. But when the "gtk-auto-mnemonics" setting is true and when
the Alt key is not pressed, the underscore must not be displayed. The
problem was that the 'new_str' variable was used for both purposes:
extract the text to display, and extract the accelerator character.

When the underscore must not be visible, the underscores were removed
from the 'new_str' variable before extracting the accelerator character.

Now there are two strings, one for each purpose.

https://bugzilla.gnome.org/show_bug.cgi?id=674759
2013-03-17 16:10:10 -04:00
Piotr Drąg
d310ea4d90 Updated POTFILES.in 2013-03-17 17:47:32 +01:00
Rob Bradford
37509621bd css: Add style entries for client side decorations to default CSS 2013-03-17 12:19:51 -04:00
Matthias Clasen
a41f7e4741 window: Render inner and outer border separately
This lets themes render a window frame in the inner border,
and a shadow or nothing in the outer border.
2013-03-17 12:19:50 -04:00
Matthias Clasen
70ccfb0efc window: Split the border into inner and outer
For now, nothing changes, we're using the sum of inner and
outer border everywhere.

In the future, we will make the inner border the visible
window frame, and the outer border the shadow/resize border.
2013-03-17 12:19:50 -04:00
Matthias Clasen
41aad21693 window: Hide the border when maximized
Dragging windows from the border is not useful when maximized.
2013-03-17 12:19:50 -04:00
Matthias Clasen
003d9f4225 window: Add a window menu to the titlebar
The menu is triggered by right-click on the titlebar
or with the menu key.
2013-03-17 12:19:50 -04:00
Matthias Clasen
bf03c85e43 window: Allow resizing by clicking on the border
We also change cursors to indicate what interactions
are possible in various window regions.
Double clicking on the titlebar maximizes the window.
2013-03-17 12:19:50 -04:00
Matthias Clasen
037b1435ae window: Allow theme control over window buttons
Add a style property to control the presence and order of
window buttons. We allow buttons at the left and right side,
they can be specified like this: icon,close:minimize,maximize.

Also, change the default button layout back to have just a close
button on the right, use icons in buttons, and set style classes
on the buttons, to allow better theming.
2013-03-17 12:19:50 -04:00
Matthias Clasen
7d71f8888d Add icons for frame buttons
Add window-minimize, window-maximize, window-restore and window-delete
icons to the builtin icon theme. These will be used for icons in
the window buttons, and the expectation is that the icon theme
will provide icons matching the desired decoration style.

window-delete is used instead of window-close, since window-close
is also used for GTK_STOCK_CLOSE, and the two may require different
styles when used inside the application vs in the window frame.
2013-03-17 12:19:50 -04:00
Matthias Clasen
93c345e49f window: Hide frame buttons when appropriate
Hide the close button if the window is not deletable, hide the
maximize button if the window is not resizable, and hide all
buttons if the window is a dialog.

Update buttons when the window state changes.
2013-03-17 12:19:49 -04:00
Matthias Clasen
d05d08a2f3 window: Use same title fallback mechanism as X backend
This looks at the application name or program name and uses that
as the title if gtk_window_set_title has not been called.
2013-03-17 12:19:49 -04:00
Matthias Clasen
b141121ef6 window: Add support for enabling client decorations on non-Wayland
Client side decorations can be enabled on non-Wayland platforms by
setting the GTK_CSD="1" environment variable.

We must ensure we have a GdkVisual that has an alpha channel since
the decorations rely on transparency. If we cannot get a visual with
an alpha channel then we do not enable client side decorations.
2013-03-17 12:19:49 -04:00
Rob Bradford
f17b7136dd window: Hide the decorations on fullscreen
This is expected behaviour for fullscreen windows.
2013-03-17 12:19:31 -04:00
Rob Bradford
4618e0dcc7 window: Don't set a background pattern/colour when client decorated
Otherwise we'll potentially get some background sticking through our rounded
corners in our decorations. The actual background will get drawn as part of
the decoration drawing.
2013-03-17 12:13:35 -04:00
Kristian Høgsberg
6a8362111e window: Add initial support for client-side decorations under Wayland
This change comprises four main parts:
 * the creation of the widgets that form the decorations,
 * implementation of get_preferred_height/width, and the for_width/for_height
   variants,
 * taking the decorations into account when allocating,
 * and drawing the decorations themselves.

Kristian did the bulk of the original work on this but any bugs are almost
certainly mine through the many refactorings and rebasings.
2013-03-17 12:13:35 -04:00
Matthias Clasen
3f9455301e Add GtkHeaderBar
This widget has been developed as GdHeaderBar in libgd.
The copy here has been renamed and changed to use GTK+
internals.
2013-03-17 12:12:53 -04:00
Rob Bradford
55a98da4d4 window: Allow _gtk_window_set_allocation to return a modified allocation
Update the documentation and users of this function to handle
the future case that that we have some internal decorations to the window and
useable allocation is thus smaller.

By having a separate out parameter there is no need to have an in/out function
and allows for greater robustness.

The current implementation simply returns the allocation provided.
2013-03-17 11:28:26 -04:00
Matthias Clasen
026d47d909 Add an index for 3.10 api additions 2013-03-17 11:27:53 -04:00
Matthias Clasen
2ca30bf8e8 Define 3.10 version macros 2013-03-17 11:27:53 -04:00
Matthias Clasen
3bc8b2dea4 Bump version to 3.9.0
Needed so that GDK_AVAILABLE_IN_3_10 works.
2013-03-17 11:27:53 -04:00
Ihar Hrachyshka
cd7200fb05 Updated Belarusian translation. 2013-03-17 15:53:08 +03:00
Guido Günther
ece672ab0b gdk_{pointer,keyboard}_grab are deprecated
so mention the non deprecated gdk_device_grab as well
2013-03-17 11:58:21 +01:00
Ask H. Larsen
795e90efcb Updated Danish translation of the properties 2013-03-17 08:37:56 +01:00
Ask H. Larsen
28d288abd2 Updated Danish translation 2013-03-17 08:14:27 +01:00
Sébastien Wilmet
66dfab0b0a Small API doc fixes
For gtk_text_iter_get_char(), due to the "Returns" at the beginning of
the description, the description was not visible. So the first sentence
has been reworded.
2013-03-16 22:18:50 +01:00
Matthias Clasen
5e1a06d1b1 GtkGrid: Tweak size allocation
If there are rows that contain only spanning children,
our algorithm was unnecessarily distributing extra space
to the other rows, even if they contain only non-expanding
children.

We improve the behaviour by treating rows containing only
spanning children as expanding.
2013-03-15 23:38:30 -04:00
Matthias Clasen
e43956141b Add another grid sizing reftest
This test exercises spanning children such that there are
rows which contain only spanning cells.
2013-03-15 23:38:22 -04:00
Benjamin Otte
f9f6c4fa49 stylecontext: Do invalidation on first resize container
... instead of taking the last one we find. This is necessary as
attached widgets (mostly menus) can be attached to an invisible widget,
but we still want to invalidate styles for them.

https://bugzilla.gnome.org/show_bug.cgi?id=695772
2013-03-16 00:06:55 +01:00
Claude Paroz
69eb272e63 Updated po-properties French translation
Forward-port from gtk-3-8 branch.
2013-03-15 23:30:29 +01:00
Christian Persch
af0007d0d8 docs: Typo fix 2013-03-15 18:51:11 +01:00
Benjamin Otte
2ba15221c0 reftests: Add reftest for separator fixes
Reftest for 61c4425161be3146c0c753a766f35442549bfe72.

Includes a workaround for a grid bug which should be removed once
GtkGrid is fixed.
2013-03-15 18:18:40 +01:00
Benjamin Otte
bda5987335 separator: Don't use padding and borders wrongly
Borders for size requests and padding for drawing? Really?

Removed them, as that is the least invasive fix shortly before a
release.
2013-03-15 18:18:40 +01:00
Matthias Clasen
5da58aa71d wayland: Rename GdkDeviceManagerCore to GdkWaylandDeviceManager
The 'core' naming is just an artifact of having several generations
of input extensions in X11, no need to propagate that into other
backends.
2013-03-15 09:19:35 -04:00
Matthias Clasen
469373a1f9 Include config.h in gdkenumtypes.c.template
At the same time, drop the GDK_ENABLE_BROKEN define.
Nothing broken in GDK broken anymore :-)
2013-03-15 09:19:35 -04:00
Fran Diéguez
10a8fe9ebf Updated Galician translations
Conflicts:
	po/gl.po
2013-03-15 11:13:29 +01:00
Nilamdyuti Goswami
7497cdef08 Assamese translation updated for gnome 3.8 2013-03-15 15:12:09 +05:30
Nilamdyuti Goswami
469368c3e8 Assamese translation updated for gnome 3.8 2013-03-15 15:01:04 +05:30
Matthias Clasen
a731cd1ef6 Minor doc cleanup
Remove widget references from interface docs.

https://bugzilla.gnome.org/show_bug.cgi?id=695874
2013-03-14 20:29:00 -04:00
Benjamin Otte
feb64f40b0 a11y: Emit text-changed signals directly
When setting new text on the label, the text-changed::delete signal
needs to be emitted before deleting the text (so that atk-bridge can
query the old text) while the text-changed::insert event needs to happen
afterwards (for the same reason). The old code using the notify signal
was only emitted after changing the text.
2013-03-15 00:58:29 +01:00
Bastien Nocera
ee44ed75ca GtkApplication: Allow passing windows on non-X11 targets
It's not the application's fault that we don't do anything
with the passed GtkWindow on non-X11, so don't try to get an XID
on non-X11.

https://bugzilla.gnome.org/show_bug.cgi?id=695783
2013-03-14 17:48:20 +01:00
Andika Triwidada
64397962e8 Updated Indonesian translation 2013-03-14 18:22:04 +07:00
Changwoo Ryu
370c759e65 Updated Korean translation 2013-03-13 23:55:21 +09:00
Marek Kasik
05901bdbbd printing: Use DBus calls instead of Avahi API
Converts usage of Avahi API to DBus calls. This change allows
us to remove dependency on avahi-gobject and avoids of possible
circular dependency.
Lists printers if Gtk+ is compiled with CUPS 1.6 or newer.
2013-03-13 15:33:56 +01:00
Marek Kasik
a727117acf printing: Remove usage of GError in connection test
Really remove usage of error in previous commit.

Related to
https://bugzilla.gnome.org/show_bug.cgi?id=695714
2013-03-13 15:25:45 +01:00
Marek Kasik
7529b95fab printing: Don't hang when getting info for Avahi printer
Asynchronously create testing connection to address returned
by GaServiceResolver. Don't request info for such printer if
the connection fails.

https://bugzilla.gnome.org/show_bug.cgi?id=695714
2013-03-13 14:59:10 +01:00
Matthias Clasen
7dd2539e1b Add a missing runtime check
The cursor theme and size settting code was ifdefed to only
be compiled with the X11 backend, but it didn't check for
running under X at runtime. Fix that.
http://bugzilla.gnome.org/695495
2013-03-13 06:04:58 -04:00
Marek Kasik
36d2324891 printing: Show Avahi printers on IPv6 network
Create correct URIs for printers on IPv6 networks.
2013-03-13 10:54:44 +01:00
Chun-wei Fan
b9e189150b gdk/gdkwindow.c, gtk/gtkwidget.c: Include fallback-c89.c
Both of them started to make use of round(), a C99 function.  So, include
fallback-c89.c to provide a fallback implementation for round() for
compilers that don't have round()

https://bugzilla.gnome.org/show_bug.cgi?id=694339
2013-03-13 13:22:48 +08:00
Chun-wei Fan
9b7c7ae614 gdk/fallback-c89.c: Add fallback for round()
This is essentially done by simply copying from gtk/fallback-c89.c

https://bugzilla.gnome.org/show_bug.cgi?id=694339
2013-03-13 13:22:46 +08:00
John Lindgren
5e2c232145 treeview: Don't emit cursor-changed in destruction
This is a workaround until we have a good idea on how we want to handle
signal disconnection before/during/after dispose and destroy vfunc
calls.

https://bugzilla.gnome.org/show_bug.cgi?id=671939
2013-03-13 02:06:29 +01:00
Benjamin Otte
b7aa15f505 reftests: Add animation loading test
XPM files weren't loaded properly.

https://bugzilla.gnome.org/show_bug.cgi?id=695228
2013-03-13 02:06:29 +01:00
Matthias Clasen
0cc688aa92 Drop the Motif DND protocol
The implementation is not working and unused, since XDND is the
de-facto standard under X nowadays.

https://bugzilla.gnome.org/show_bug.cgi?id=695476
2013-03-12 20:03:19 -04:00
Federico Mena Quintero
563eb60666 filechooserbutton: Duh, remove all the timeouts after tests
Otherwise tests may start failing if they start after an old timeout triggers.

Signed-off-by: Federico Mena Quintero <federico@gnome.org>
2013-03-12 14:31:48 -06:00
Federico Mena Quintero
d84f5ae17e filechooserbutton: Add a description string to assertions about emitted signals
On failed tests, this lets us more easily see see which assertion failed.

Signed-off-by: Federico Mena Quintero <federico@gnome.org>
2013-03-12 14:31:48 -06:00
Federico Mena Quintero
aaedf5a352 filechooserbutton: Give proper names to the SELECT_FOLDER tests with cancelled dialog
Signed-off-by: Federico Mena Quintero <federico@gnome.org>
2013-03-12 14:31:48 -06:00
Federico Mena Quintero
79695ee64d filechooserbutton: Don't duplicate tests for GTK_RESPONSE_DELETE_EVENT
Instead, re-run tests made for GTK_RESPONSE_CANCEL with the delete-event response.

Signed-off-by: Federico Mena Quintero <federico@gnome.org>
2013-03-12 14:31:48 -06:00
Federico Mena Quintero
3b2182e711 filechooserbutton: Do not propagate state from the dialog unless it is active
Change of plans to match the tests from the previous commit.

The state of the underlying dialog is never reflected by GtkFileChooserButton's API,
as the dialog is a transient thing.  The file chooser button only updates its state from the dialog,
and reflects the dialog's state, when the dialog has been confirmed and dismissed by the user.

Signed-off-by: Federico Mena Quintero <federico@gnome.org>
2013-03-12 14:31:48 -06:00
Federico Mena Quintero
1865b9a111 filechooserbutton: whitespace fixes 2013-03-12 14:31:47 -06:00
Federico Mena Quintero
f5217289ca filechooserbutton: For the open-dialog-cancel-* tests, add a real nomenclature and test all the combinations
We used to have numeric names, which are a pain to maintain when new tests are added.
Now we have a real nomenclature (see the comment at the beginning of the open-dialog-cancel-* tests),
which lets us see easily if we have tested all the combinations.

Also, added all the combinations that were missing and removed redundant tests.
Not all the tests pass currently.

Signed-off-by: Federico Mena Quintero <federico@gnome.org>
2013-03-12 14:31:47 -06:00
Federico Mena Quintero
2cfc56ced8 filechooserbutton: Update the button's state only on programmatic changes to the filechooser's state
The idea is that the button will only update its state of the selection and current folder
when changes to those are done either by the calling program (with the filechooser's API)
or when the user actually confirms and dismisses the underlying GtkFileChooserDialog.

If the user makes changes to the dialog but has not dismissed it yet, those changes
will not be reflected in the button (as one would expect).

This commit also makes sure the current-folder-changed and selection-changed signals
are emitted at the right times.

Signed-off-by: Federico Mena Quintero <federico@gnome.org>
2013-03-12 14:31:47 -06:00
Federico Mena Quintero
fa4878979e filechooserbutton: Emit 'selection-changed' when changing the selection programmatically
We only emitted that signal when the selection changed through the underlying GtkFileChooserDialog.

To do this when the dialog is not active and the selection is changed by the calling program
(instead of by the user), we need to wait until the GtkFileChooserButton's UI has been updated
via an async callback from GIO.  So, we keep track of whether an entry point into the
button's API caused a programmatic change in the selection.

Signed-off-by: Federico Mena Quintero <federico@gnome.org>
2013-03-12 14:31:47 -06:00
Federico Mena Quintero
a8c4d0935b filechooserbutton: For tests, wait for signals instead of just sleeping
This should let tests complete faster.  Also, this will let us test
that the correct signals are actually being emitted.

The tests now fail, as the signals are not being emitted when they
should.

Signed-off-by: Federico Mena Quintero <federico@gnome.org>
2013-03-12 14:31:47 -06:00
Federico Mena Quintero
1247a842a2 filechooserbutton: whitespace fixes 2013-03-12 14:31:47 -06:00
Changwoo Ryu
084bdcc8d0 Updated Korean translation 2013-03-13 05:14:03 +09:00
Carl-Anton Ingmarsson
5d011386a6 label: Fix memleak
Caused by recent refactoring in e09957a47d
2013-03-12 20:23:09 +01:00
Gil Forcada
25fb64f983 [l10n] Updated Catalan translation 2013-03-12 19:51:17 +01:00
Benjamin Otte
fb170239c7 stylecontext: If we force invalidate, invalidate all properties
We only FORCE_INVALIDATE when something weird changes that the CSS
machinery can't detect. But now that our style_updated functions skip
recomputations when some properties don't change we want to make sure
these recomputations are still run. So we just claim all properties
changed.

http://bugzilla.gnome.org/show_bug.cgi?id=695482
2013-03-12 12:46:37 +01:00
Benjamin Otte
e09957a47d label: refactor code
If text didn't change, don't change it.

And if that sentence made no sense, that might explain why I refactored.
2013-03-12 12:46:37 +01:00
Aleksander Morgado
24fa277329 combobox: popdown the combobox when on 'grab-broken-event'
And also explicitly remove pointer/keyboard grabs from the display.

Whenever the grab is reported lost, we should popdown the combobox, so that the
GDK_WINDOW_TEMP window is hidden and removed from the toplevel, as done with
the menu for example.

Leaving the GDK_WINDOW_TEMP window open when re-activating the application
triggers several issues in the win32 backend, due to restacking windows of the
non-toplevel group into the toplevel group:

https://bugzilla.gnome.org/show_bug.cgi?id=695200
2013-03-12 07:23:17 -04:00
Bastien Nocera
d1de6c322b docs: Disable GtkPlug/GtkSocket docs on Wayland
As those two types do not exist in the Wayland backend,
and the docs build would fail.

https://bugzilla.gnome.org/show_bug.cgi?id=695682
2013-03-12 07:20:18 -04:00
Federico Mena Quintero
1c796018d1 filechooserbutton: During unselect_all(), update the widgets in all situations
Not just if we thought we had a selection.

Signed-off-by: Federico Mena Quintero <federico@gnome.org>
2013-03-11 18:16:29 -06:00
Federico Mena Quintero
3a86af43fa filechooserbutton: Add tests for unselect_all()
These all pass except one.
2013-03-11 18:16:29 -06:00
Federico Mena Quintero
f2d6def72e filechooserbutton: HACK: Set a reasonable size for the dialog in the tests' second iteration
Something is causing the GtkFileChooserDialog to be resized really small on the second time it is run
during each test for GtkFileChooserButton.  So as a temporary hack we set it to 500x500 pixels on
the second run, so the size allocation code doesn't bomb on us.
2013-03-11 18:16:29 -06:00
Federico Mena Quintero
cade42d509 gtkfilechooserbutton: In tests, allow the possibility of doing unselect_all 2013-03-11 18:16:29 -06:00
Federico Mena Quintero
45ad8a06ad filechooserbutton: When the combo box changes, set the *file*, not the current folder
The currently-selected file *is* the selection even in SELECT_FOLDER mode.  Do not confuse this
with the current folder.

Signed-off-by: Federico Mena Quintero <federico@gnome.org>
2013-03-11 18:16:29 -06:00
A S Alam
1135958e98 Punjabi: Translation updated (aalam) 2013-03-11 19:56:55 +05:30
Мирослав Николић
4042575d77 Updated Serbian translation 2013-03-11 11:34:40 +01:00
Mario Blättermann
5d745834b1 [l10n] Updated German translation 2013-03-11 08:48:10 +01:00
Mario Blättermann
1801219c33 [l10n] Updated German translation 2013-03-11 08:46:58 +01:00
Andika Triwidada
0d1fe867d8 Updated Indonesian translation of po-properties 2013-03-11 12:47:31 +07:00
Andika Triwidada
648a505954 Updated Indonesian translation 2013-03-11 12:07:24 +07:00
Sébastien Wilmet
b2e8820ed9 Fix typo reqired -> required 2013-03-10 17:22:26 +01:00
Enrico Nicoletto
ac52f6ab23 Updated Brazilian Portuguese translation 2013-03-09 20:52:10 -03:00
Enrico Nicoletto
b6b7732912 Updated Brazilian Portuguese translation
Conflicts:
	po-properties/pt_BR.po
2013-03-09 20:23:37 -03:00
Enrico Nicoletto
89dd77f722 Updated Brazilian Portuguese translation 2013-03-09 19:20:22 -03:00
Cosimo Cecchi
fd51c8f5e9 treeview: fix a critical warning
gtk_tree_view_column_unset_tree_view() resets column->priv->tree_view to
NULL.
The function is called when a column is removed, but later from the same
function we would call _gtk_tree_view_column_unrealize_button(), which
expects column->priv->tree_view to be != NULL, causing these critical
warnings

Gtk-CRITICAL **: gtk_widget_unregister_window: assertion
`GTK_IS_WIDGET (widget)' failed

This commit moves the call to unset the tree view after the button is
unrealized.

https://bugzilla.gnome.org/show_bug.cgi?id=695473
2013-03-08 20:20:28 -05:00
Evan Nemerson
15ddeac195 docs: change id for Wayland section to not conflict with OS X
https://bugzilla.gnome.org/show_bug.cgi?id=695391
2013-03-08 20:17:06 -05:00
Matthias Clasen
1f8286004f Avoid a warning under Wayland
Just having an ifdef is not enough, we need to check the type
of the window at runtime.
2013-03-08 19:49:00 -05:00
Piotr Drąg
8822b07292 Updated Polish translation 2013-03-08 20:38:32 +01:00
Piotr Drąg
7afdd70e2f Updated POTFILES.in 2013-03-08 20:32:48 +01:00
Federico Mena Quintero
f076b6bb02 filechooserbutton: Update the combo box even after the dialog is cancelled
We assumed that we didn't have to update the combo box if the dialog got cancelled,
as it should simply retain its previous contents.  But this assumption doesn't work
as the dialog is brought up with the 'Other...' item - we don't want the
combo box to keep showing 'Other...' if the dialog is cancelled.

The test from the previous commit now passes.

Signed-off-by: Federico Mena Quintero <federico@gnome.org>
2013-03-08 12:43:21 -06:00
Federico Mena Quintero
e4c2ef108c filechooserbutton: New test for opening the Other item in the combo box and then canceling the dialog
There is this bug:

1. Start with a file chooser button in SELECT_FOLDER mode, and select a folder from the combo box.

2. Click on the button's combo box, select 'Other...'

3. You get the file chooser dialog. Cancel the dialog.

4. The file chooser button's combo box still shows 'Other...' instead of
   showing the selection from (1).

This is a test to ensure that the original selection is restored.
The test fails right now.

Signed-off-by: Federico Mena Quintero <federico@gnome.org>
2013-03-08 12:37:21 -06:00
Matthias Clasen
1ddfc3a985 Fix the build
This was broken in commit 5bbbc47a4c
2013-03-08 06:26:34 -05:00
Aleksander Morgado
5bbbc47a4c spinbutton: don't override initial text in non-numeric-only spin buttons
https://bugzilla.gnome.org/show_bug.cgi?id=695312
2013-03-08 11:23:11 +01:00
Federico Mena Quintero
67f5e595a7 filechooserbutton: Don't show the (None) item when the combo box is popped up
This is surprisingly tricky, since the (None) item *has* to be a visible item while
the combo box is *not* popped up, so that it can show its contents.  But the item
has to be *not* visible when the combo box is popped up.

Also, update the whole button's selection, not just the underlying dialog's, when
the combo box changes its selection - based on a patch by Paul Davis in
https://bugzilla.gnome.org/show_bug.cgi?id=691040#c20

Signed-off-by: Federico Mena Quintero <federico@gnome.org>
2013-03-07 20:45:58 -06:00
Federico Mena Quintero
1074aa0c49 filechooserbutton: In SELECT_FOLDER, when the selection is empty, show (None) in the combo box
We do this by adding a new row type, ROW_TYPE_EMPTY_SELECTION.

Signed-off-by: Federico Mena Quintero <federico@gnome.org>
2013-03-07 20:45:58 -06:00
Federico Mena Quintero
bbf915118b filechooserbutton: Update the button/combo at construction time
This way the internal labels will show the correct selection even if nothing
has been selected programmatically.

Signed-off-by: Federico Mena Quintero <federico@gnome.org>
2013-03-07 20:45:58 -06:00
Federico Mena Quintero
32aa7f0582 filechooserbutton: Update the button/combo whenever the selection is changed programmatically
We didn't change it when the file chooser button's dialog was inactive, and so
the actual file chooser button would not visually reflect the current selection.

Signed-off-by: Federico Mena Quintero <federico@gnome.org>
2013-03-07 20:45:58 -06:00
Federico Mena Quintero
cc75ebec15 filechooserbutton: Test that the expected filename is shown
We do some gymnastics to pull the string out of the GtkButton or the GtkComboBox that is
being used in GtkFileChooserButton to show the current selection when the dialog
is inactive - namely, we look for the subwidget with the correct ATK role, and pull its
accessible name.

Currently the test fails; this is https://bugzilla.gnome.org/show_bug.cgi?id=691040#c18

Signed-off-by: Federico Mena Quintero <federico@gnome.org>
2013-03-07 20:45:58 -06:00
Federico Mena Quintero
8a17cad2e5 Don't mention gtk_set_locale() in docs; this function does not exist 2013-03-07 20:45:57 -06:00
Ville-Pekka Vainio
203a1f2cd1 Finnish translation update by Jiri Grönroos 2013-03-07 21:09:45 +02:00
Rafael Ferreira
0435b14e12 Updated Brazilian Portuguese translation 2013-03-07 11:19:48 -03:00
Baurzhan Muftakhidinov
1de4db9f4f Updated Kazakh translation. 2013-03-07 20:14:30 +06:00
Ihar Hrachyshka
e0c9e2f577 Updated Belarusian translation. 2013-03-07 17:13:44 +03:00
Rafael Ferreira
4edec553af Updated Brazilian Portuguese translation 2013-03-07 10:42:05 -03:00
Khaled Hosny
2488113386 Update Arabic translation 2013-03-07 11:45:27 +02:00
Rico Tzschichholz
4054d531c3 printing: Fix build with -Werror=format-security 2013-03-06 22:26:21 +01:00
Giovanni Campagna
ca2368dba9 GtkTextView: don't popdown a bubble if we don't have one
This causes a segfault.

https://bugzilla.gnome.org/show_bug.cgi?id=695304
2013-03-06 17:08:48 +01:00
Bastien Nocera
ea043cab57 GtkEntry: Sanity check the end_pos value in _get_display_text() 2013-03-06 15:50:31 +01:00
Bastien Nocera
32825a66ac GtkLabelAccessible: Sanity check _get_text() input values 2013-03-06 15:50:30 +01:00
Chun-wei Fan
bb4cff8ecf gdk/win32/gdkevents-win32.c: Fix build
The variable "display" is not defined, causing the build to fail.
Judging from the code, it seems that it should be _gdk_display instead.

https://bugzilla.gnome.org/show_bug.cgi?id=694339
2013-03-06 22:19:57 +08:00
Alan McGovern
e28b10d56f quartz: Null check title before setting it
This avoids a crash in objective-c.

https://bugzilla.gnome.org/show_bug.cgi?id=695278
2013-03-06 12:37:44 +01:00
Chun-wei Fan
b0ccdae753 Update Visual Studio Solution Files
Integrate the utility projects to build the introspection files into the
main solution files, so that one can build the introspection files from the
IDE.  This is not built by default, so one can build the introspection
files if he/she chooses to do so.
2013-03-06 13:14:02 +08:00
Chun-wei Fan
801a7ca17f Visual Studio Builds: Support Building Introspection Files
Add Windows .bat and Python script to call g-ir-scanner to build
introspection files for Visual Studio builds.  This will read from the
autotools files using Python REGEX functionality to determine the headers
and sources for g-ir-scanner to process, so the autotools files will not
need to be updated except to distribute the necessary files.  Thils will
also enable one to build introspection files on Windows without using a
BASH-style shell such as MSYS.

Also add an utility Visual Studio project to call the Windows .bat to
build the introspection files for GTK+/GDK, for convenience.
2013-03-06 13:12:01 +08:00
Timothy Arceri
4c93bea051 po: Remove fuzzy tag for confirmed translations 2013-03-05 17:42:35 -06:00
Federico Mena Quintero
a89d420270 filechooser: Use _gtk_file_has_native_path() throughout when testing for local_only
In the case of checking for local_only, g_file_is_native() is not useful, since it
will return FALSE for something in a FUSE mount.

Signed-off-by: Federico Mena Quintero <federico@gnome.org>
2013-03-05 17:17:42 -06:00
Federico Mena Quintero
d484721b5c filechooser: Also convert get_uris() to returning native paths
It was only being done in gtk_file_chooser_get_uri().

Signed-off-by: Federico Mena Quintero <federico@gnome.org>
2013-03-05 17:17:42 -06:00
Federico Mena Quintero
56bcb1933f filechooser: Rename _gtk_file_is_path_not_local() to _gtk_file_has_native_path()
Negatives in names of boolean functions are confusing.

Signed-off-by: Federico Mena Quintero <federico@gnome.org>
2013-03-05 17:17:42 -06:00
Timothy Arceri
cf216d780c filechooser: Show FUSE mounted locations in shortcuts
Since FUSE locations can be handled safely by applications show these mounted locations regardless of whether gtk_file_chooser_set_local_only()
is set to TRUE

https://bugzilla.gnome.org/show_bug.cgi?id=586367
2013-03-05 17:17:42 -06:00
Matthias Clasen
9a1c54d580 Post-release bump 2013-03-05 17:07:21 -05:00
Matthias Clasen
07bf19d512 3.7.12 2013-03-05 17:03:04 -05:00
Cosimo Cecchi
e54f8f4c62 GtkBubbleWindow: use OSD style class 2013-03-05 16:48:02 -05:00
Cosimo Cecchi
3c8e1c92a8 GtkBubbleWindow: rework how drawing is done
Use gtk_render_frame_gap(), refactoring the code fetching coordinates to
be usable by it. This allows for rounded corners in the window shape.
2013-03-05 16:48:01 -05:00
Cosimo Cecchi
6f1476edd3 GtkBubbleWindow: allocate CSS borders and paddings 2013-03-05 16:48:01 -05:00
Matthias Clasen
e1edc998a2 Rename property to be more neutral
Don't put toolbar in the name of the property - we may use
a different container down the road, and then this name
would be misleading.
2013-03-05 16:48:01 -05:00
Matthias Clasen
3c04597306 Really keep GtkBubbleWindow private
_-prefix the symbols to keep them from leaking out.
Also, un-doc-commentize the sources.
2013-03-05 16:48:01 -05:00
Matthias Clasen
7c2a752b37 Small documentation tweak 2013-03-05 16:48:01 -05:00
Matthias Clasen
190dcfe050 Popdown the bubble window when text view is scrolled 2013-03-05 16:48:01 -05:00
Matthias Clasen
88623b98a7 Allow to populate bubbles with extra content
We do this by making the ::populate-popup signals a little more
flexible. They used to just accept a GtkMenu as argument, now
they can take a menu or a toolbar. To not break the expectations
of existing callbacks, we only emit ::populate-popup with a toolbar
if the :populate-toolbar property is TRUE.
2013-03-05 16:48:00 -05:00
Matthias Clasen
f1f3a033e5 Drop GtkSelectionWindow
It is no longer used.
2013-03-05 16:48:00 -05:00
Matthias Clasen
bb3c56abe2 Do without GtkSelectionWindow
Just populate a toolbar directly, in GtkEntry and GtkTextView.
2013-03-05 16:48:00 -05:00
Matthias Clasen
a8ea64dbb1 Fix a typo 2013-03-05 16:48:00 -05:00
Carlos Garnacho
ceeed09d07 Made GtkBubble/SelectionWindow private at the moment 2013-03-05 16:48:00 -05:00
Carlos Garnacho
0ba92bc26d Use gdk_threads_add_timeout to popup the selection window
Second granularity may bite us back there
2013-03-05 16:47:59 -05:00
Matthias Clasen
9f41970832 Fix includes
gtkbubblewindow.h was including gtk.h, which in turn included
gtkselectionwindow.h, leading to build failure.
2013-03-05 16:47:59 -05:00
Carlos Garnacho
51ecaa062d Don't allow individual #includes for GtkBubble/SelectionWindow 2013-03-05 16:47:59 -05:00
Carlos Garnacho
a960230a20 GtkBubbleWindow: Use style border color to stroke the bubble shape
This improves themeability a bit, corners are still square though...
2013-03-05 16:47:59 -05:00
Carlos Garnacho
320613c439 textview: Use GtkSelectionWindow for touch text selection
This enables touch devices to manipulate the text selection
2013-03-05 16:47:59 -05:00
Carlos Garnacho
6767541ead entry: Use GtkSelectionWindow for touch text selection
This enables touch devices to manipulate the text selection
2013-03-05 16:47:59 -05:00
Carlos Garnacho
7260e0570c Add GtkSelectionWindow
This is a helper object to provide context-dependent content
edition apt for touch devices.
2013-03-05 16:47:58 -05:00
Carlos Garnacho
51be6b88db Add GtkBubbleWindow
This popup window widget can be used for touch friendly context
menus that point to a concrete area.
2013-03-05 16:47:58 -05:00
Carlos Garnacho
a97178af65 texthandle: Set a bigger input shape, covering the line height
Now, even if the handles being rendered are small, the handle touch
input shape will be as wide as the visible part of the rendered asset, and
high enough to cover both the handle and the height of the line where
the selection bound is.

Also, make handles have the same virtual distance to the line top/bottom
when a drag starts, so the handle doesn't jump to another line after a
too short threshold.
2013-03-05 16:47:58 -05:00
Carlos Garnacho
17d3775555 Ensure the insertion handle stays on fake events (eg from IM)
Don't set handles mode to none if the event has send_event set.
For consistency with GtkEntry, also make GtkTextView keep the
handle mode on buffer changes.
2013-03-05 16:47:58 -05:00
Carlos Garnacho
d97861bd8b texthandles: Keep state internally to avoid X overhead
Handles now do sync X calls less often. As visibility state
is kept, it now can move+resize+show handles at once instead
of in separated steps.
2013-03-05 16:47:58 -05:00
Marek Černocký
bfbb96605f Updated Czech translation 2013-03-05 15:11:59 +01:00
Marek Černocký
28f53fdc3d Updated Czech translation 2013-03-05 15:07:06 +01:00
Benjamin Otte
dc331ccb17 entrycompletion: Don't reconnect signals all the time
We block signal handlers areound GtkEntry signal emission and if those
signals get used to call functions on the completion that cause a
reconnection of the signals, then the reconnected signals will not be
blocked anymore (so they might get emitted?) and unblocking the old
signal id will later cause warnings.

Fixes spurious warnings in gtk/tests/filechooser tests.
2013-03-05 13:09:10 +01:00
Benjamin Otte
173317e9ce a11y: Emit active-descendants-changed when focus changes
This fixes the a11y/tree-relationships testcase.

The emission was lost in refactoring in commit
76670734f4
2013-03-05 11:56:56 +01:00
Theppitak Karoonboonyanan
147043ee21 Updated Thai translation 2013-03-05 16:02:19 +07:00
Rafael Ferreira
e413d0da8e Updated Brazilian Portuguese translation 2013-03-05 00:49:11 -03:00
Rafael Ferreira
7b62c79475 Updated Brazilian Portuguese translation proofread by Enrico Nicoletto 2013-03-05 00:00:29 -03:00
Ross Lagerwall
942c63d82b x11: Remove unused macro
https://bugzilla.gnome.org/show_bug.cgi?id=694395
2013-03-04 21:09:06 -05:00
Alban Browaeys
aa08f4d8f5 bin: initialize out variables to zero for get_preferred_ functions.
Fixes case of child not visible then minimum_width/heigth natural_width
/heigth not initialized. Thus caller gets a random value.

https://bugzilla.gnome.org/show_bug.cgi?id=695131
2013-03-04 20:04:05 -05:00
Aleksander Morgado
d98b4fd0b4 clipboard: remove dead code
When setting contents of the clipboard and ownership or user data changes, we
end up calling clipboard_unset() to fully cleanup the previous clipboard state.
This call will itself call clear_func() for the previous user_data, and always
reset both 'get_func' and 'clear_func' to NULL.

So it's actually not possible to have 'get_func' being non-NULL once we have
called clipboard_unset(), so just remove that condition check and the code
inside.

https://bugzilla.gnome.org/show_bug.cgi?id=694924
2013-03-04 19:37:38 -05:00
Michael Hofmann
670e532a6b GtkColorChooserWidget: deselect swatch before removing palettes
When adding custom palettes, set the current swatch to NULL if the
palette it is on is going to be removed.

https://bugzilla.gnome.org/show_bug.cgi?id=693995
2013-03-04 18:32:00 -05:00
Will Thompson
c6fbdb67f3 gtkenums: correct various documentation typos 2013-03-04 22:49:43 +00:00
Will Thompson
507bf6e5cf docs: correct various spelling and grammar errors
I noticed a few cases of "wether", and while fixing them noticed a few
"its" which should be "it's". It all went downhill from there.
2013-03-04 22:48:22 +00:00
Giovanni Campagna
9d81b69e06 GtkIconTheme: fix regression from 0db32f0632
icon_info_dup() is now called also for GtkIconInfos that already have
a pixbuf, so we must make sure that we correctly carry that from
the original icon_info to the copy.
2013-03-04 21:34:23 +01:00
Piotr Drąg
77b03a8dce Updated Polish translation 2013-03-04 21:12:54 +01:00
Cosimo Cecchi
944fa635ae appchooserdialog: remove redundant checks
This is checked by GIO for us now.
Also, it's generally just a bad idea spawning error dialogs from inside
a library on top of other dialogs: lesson learned.

https://bugzilla.gnome.org/show_bug.cgi?id=675333
2013-03-04 14:41:21 -05:00
Giovanni Campagna
0db32f0632 GtkIconTheme: fix failed assertion when asynchrnously loading emblemed icons
If you tried to lookup an icon that was not emblemed, and then looked up
an emblemed icon with the same base, we would override the iconinfo adding
the emblems inline. Later, when the icon finished rendering, inside
gtk_icon_info_load_icon_finish, we would copy the result from the duplicate
(which did not include the emblem infos), but the icon would still fail the
assertion, because emblems infos are present but emblem_applied is false
(they were not requested in the first place!).
Solve this by avoiding the overwrite on a cached iconinfo, and instead duplicate
the iconinfo before adding the emblems. It is expected that another layer
of caching (such as StTextureCache in gnome-shell) will take care of avoiding
multiple rendering of the same icon+emblem combination.

https://bugzilla.gnome.org/show_bug.cgi?id=694968
2013-03-04 16:28:00 +01:00
Marek Kasik
8075181033 printing: Mark texts for translation correctly
Use _() instead of N_() for printer states. Mark connection
string "; " for translation so it is correctly handled for
right to left languages.
2013-03-04 14:35:24 +01:00
Marek Kasik
4ba83ab573 printing: Remove unnecessary break
Remove the first space when connecting multiple printer states
together.

Related to
https://bugzilla.gnome.org/show_bug.cgi?id=688956
2013-03-04 14:34:21 +01:00
Marek Kasik
eed9e72e83 printing: List Avahi printers
Show printers advertised by avahi on local network. CUPS
backend now looks for _ipps._tcp and _ipp._tcp services
offered by avahi. If it finds such a service (printer)
it requests its attributes through IPP_GET_PRINTER_ATTRIBUTES
ipp request and adds it to the list of printers. Such printer
behaves like a remote printer then.
If an avahi printer is a default printer then it is considered
default by the backend only if there is no local or remote
default printer.
This functionality is enabled when building Gtk+ with CUPS 1.6
or later because it replaces browsing protocol removed in CUPS 1.6.

https://bugzilla.gnome.org/show_bug.cgi?id=688956
2013-03-04 14:30:49 +01:00
Rafael Ferreira
bfb327deda Updated Brazilian Portuguese translation 2013-03-04 00:48:20 -03:00
William Jon McCann
cb27c4b08c Place the search icon in the primary slot of the entry
Instead of using the secondary slot for both clear and search. This
Makes it possible to use the search icon for actions regardless of
whether text has been entered, makes it possible to use the primary
icon to indicate search status, allows us to indicate the purpose
of the entry even if text has been already entered.

https://bugzilla.gnome.org/show_bug.cgi?id=694990
2013-03-03 11:16:09 -05:00
Aurimas Černius
7667d16626 Updated Lithuanian properties translation 2013-03-02 23:25:58 +02:00
Nguyễn Thái Ngọc Duy
7be1123a36 Updated Vietnamese translation 2013-03-02 10:03:33 +07:00
Nguyễn Thái Ngọc Duy
4bf12e4d4e po/vi: import from Damned Lies 2013-03-02 09:49:31 +07:00
Matthias Clasen
b1fad0f478 Fix make check 2013-03-01 19:27:10 -05:00
Matthias Clasen
9d36dbb44b Revert "Fix gtkprintbackendcups crash"
This reverts commit 54ffc982e9.

I've undone the GList behaviour change instead.
2013-03-01 19:13:30 -05:00
Cosimo Cecchi
50065b7ba0 treeview: center expander allocated space
This patch centers the expander in the extra space allocated by the
horizontal-separator style property.

https://bugzilla.gnome.org/show_bug.cgi?id=650424
2013-03-01 13:55:05 -05:00
Cosimo Cecchi
d0895d6c0f treeview: properly calculate the treeview expander size
It should be expander-size + horizontal-separator / 2. Rework code
calculating the render position of the arrow to account for the larger
size.

https://bugzilla.gnome.org/show_bug.cgi?id=650424
2013-03-01 13:55:05 -05:00
Cosimo Cecchi
32bd10bf74 treeview: remove extra padding handling
We'll replace this with a proper calculation.

https://bugzilla.gnome.org/show_bug.cgi?id=650424
2013-03-01 13:55:05 -05:00
John Ralls
54ffc982e9 Fix gtkprintbackendcups crash
From trying to call g_list_delete_link with a NULL node or
removed_printer_checklist.
2013-03-01 10:14:59 -08:00
Benjamin Otte
c7cf937789 broadway: pointer targets differ in signedness 2013-03-01 16:25:14 +01:00
Benjamin Otte
9d55b3c6fd broadway: variable 'broadway_display' set but not used 2013-03-01 16:25:14 +01:00
Chao-Hsiung Liao
dfb619eede Updated Traditional Chinese translation(Hong Kong and Taiwan) 2013-03-01 22:33:07 +08:00
Alexander Larsson
c4539df2f2 Re-fix opacity group handling
The last change fixed the windowed widget case but broke
opacity group handling for windowed child widgets. This fixes
up the code by making sure we norender_children in when there
is an opacity group.

This also cleans up the comments about how this works to something
that is hopefully more understandable.
2013-03-01 14:56:30 +01:00
Alexander Larsson
8ee578468d gdkwindow: Update window debug dump code
This makes it build without warning and also dumps alpha
2013-03-01 14:55:54 +01:00
Alexander Larsson
b5ee44b419 TextView: Properly render background
We always need to render the background, as the window
background is not always set (i.e. during gtk_widget_draw()) or
when its partially visible.

https://bugzilla.gnome.org/show_bug.cgi?id=694925
2013-03-01 12:50:20 +01:00
Мирослав Николић
86d3f793cd Updated Serbian translation 2013-03-01 11:39:42 +01:00
Sweta Kothari
36f65ce291 Updated gujarati file 2013-03-01 12:49:00 +05:30
John Ralls
afe8ce2ef7 Fix broken quartz build from df3e19b
It's _gdk_display, not display
2013-02-28 12:34:33 -08:00
keyring
e45f463723 Update Simplified Chinese translation 2013-02-28 21:08:27 +08:00
Matthias Clasen
02e9152738 Fix DND with frame sync
Mutter magically ignores override-redirect windows with geometry
-100-100+1+1, and this breaks the frame synchronization between
gtk+ and mutter. For now, we avoid the issue by simply giving
the window a different geometry.
https://bugzilla.gnome.org/show_bug.cgi?id=694217
2013-02-28 07:48:06 -05:00
Matthias Clasen
4bb90a7443 Remove GTK_SELECTION_MODE_EXTENDED from the docs
It does not exist anymore as an enum value.
2013-02-28 07:48:06 -05:00
Federico Mena Quintero
0ae26b94f2 Remove a NULL-GError that is no longer useful
Signed-off-by: Federico Mena Quintero <federico@gnome.org>
2013-02-27 18:12:20 -06:00
Cosimo Cecchi
d434a9103c range: don't draw origin when the slider is invisible
When the range of the GtkRange is zero (i.e. the upper and lower bounds
of the adjustment have the same value), don't use an origin to draw the
trough, as the slider will also be hidden, and the juncture between the
two sections of the trough will be visible.
2013-02-27 17:20:59 -05:00
Federico Mena Quintero
63b9598b51 Don't use inout ints in the drag-action-requested signal
It's not friendly to bindings, and we didn't need an inout parameter anyway.
We use a simple return value from the signal handler now.

Signed-off-by: Federico Mena Quintero <federico@gnome.org>
2013-02-27 14:39:39 -06:00
Federico Mena Quintero
bc38811645 Remove a couple of FIXMEs 2013-02-27 14:17:10 -06:00
Federico Mena Quintero
a7213e3ccf Disallow drops on the recent:/// item
Signed-off-by: Federico Mena Quintero <federico@gnome.org>
2013-02-27 14:04:33 -06:00
Federico Mena Quintero
3363974c09 Remove temporary debugging code
Signed-off-by: Federico Mena Quintero <federico@gnome.org>
2013-02-27 14:04:23 -06:00
Federico Mena Quintero
0d95705bd5 GtkTreeView: Add some CSS for the 'dnd' style class so drawing the drag-dest-row works
The default CSS didn't have anything for GtkTreeView's 'dnd' style class.  So,
the call to gtk_render_frame() to draw the highlight frame for the drag-dest-row
was getting a border-width of 0, and nothing was drawn as a result.

Now we just copy the default from Adwaita, but make the border-radius 0, to make it
square like the rest of the Raleigh theme...
2013-02-27 13:51:19 -06:00
Federico Mena Quintero
6d94f8a56c Don't allow drops in unmounted volumes
Unmounted volumes don't have a URI yet, so we can use that to distinguish them
from within the DnD code.

Signed-off-by: Federico Mena Quintero <federico@gnome.org>
2013-02-27 12:16:31 -06:00
Federico Mena Quintero
dbf98bcfeb Properly indicate when new bookmarks are being dropped between other bookmarks
We weren't handling the drag-URIs-as-bookmarks case in drag_motion_callback().

Signed-off-by: Federico Mena Quintero <federico@gnome.org>
2013-02-27 12:08:16 -06:00
Federico Mena Quintero
a46976fb79 Merge branch 'origin/master' into places-sidebar 2013-02-27 10:29:35 -06:00
Alexander Larsson
bbfc8f9a9b Fix opacity group hack
We can't norender the main window for a windowed widget as we then
never get any expose events.
2013-02-27 12:59:19 +01:00
Priit Laes
98b37191eb [l10n] Updated Estonian translation 2013-02-27 10:25:42 +02:00
Chun-wei Fan
ed5649a44b Fix gtk3-demo Visual Studio projects
Since we are linking in the resource items by the source, we need to
disable WholeProgramOptimization so that the resource stuff does get linked
into the demo binaries, so that they can be loaded properly.

Also make sure that gtk3-demo-application is also built with the multibyte
character set, like the rest.

This should fix bug 694342, at least for Visual Studio builds.
2013-02-27 12:33:42 +08:00
Geoff Reedy
c6eddaafed GdkScreen: get a long X property correctly
https://bugzilla.gnome.org/show_bug.cgi?id=691426
Signed-off-by: Federico Mena Quintero <federico@gnome.org>
2013-02-26 17:58:21 -06:00
Aurimas Černius
560597da05 Updated Lithuanian UI translation 2013-02-26 23:00:46 +02:00
Thomas Wood
e97262489c gdk: prevent NULL pointer access when debugging is enabled
If no updates, redraws, or repaints have been scheduled for this frame,
we will skip immediately to RESUME_EVENTS, and no GdkFrameTimings will
be created.

https://bugzilla.gnome.org/show_bug.cgi?id=694732
2013-02-26 15:27:53 +00:00
Benjamin Otte
ce0675f1fb a11y: Emit text-changed signals when the text-buffer changes 2013-02-26 16:17:33 +01:00
Benjamin Otte
46ef9a83bb gtk-demo: Create new textbuffers for new source/info texts
This is so we can prepare these buffers without them being set on the
widgets yet and only gtk_text_view_set_buffer() them afterwards. And
this in turn gets rid of all the a11y events we were needlessly
emitting.

https://bugzilla.gnome.org/show_bug.cgi?id=694406
2013-02-26 15:56:51 +01:00
Aleksander Morgado
399ffbb230 win32: fix possible memleak if GlobalAlloc() fails
Also remove the unused 'buf' variable.

https://bugzilla.gnome.org/show_bug.cgi?id=694742
2013-02-26 15:13:32 +01:00
Daniel Mustieles
5e4e724a8e Updated Spanish translation 2013-02-26 14:49:47 +01:00
A S Alam
3edf7678bd Punjabi: Translation updated (aalam) 2013-02-26 06:52:45 +05:30
A S Alam
1819cf02a9 Punjabi: Translation updated (aalam) 2013-02-26 06:52:38 +05:30
Benjamin Otte
16e902d20a API: Export gtk_cell_renderer_class_set_accessible_type()
This function is necessary to implement cell renderer accessibility
support.
2013-02-25 21:42:31 +01:00
Daniel Mustieles
4bd7102358 Updated Spanish translation 2013-02-25 18:00:07 +01:00
Dimitris Spingos
b1320b52c0 Updated Greek translation 2013-02-25 15:54:17 +02:00
Matthias Clasen
b234025410 Some more documentation fixes
Make frame-clock-related symbols show up in the gtk docs.
2013-02-25 11:30:00 +01:00
Matthias Clasen
4fa8029906 Fix a few more doc issues 2013-02-25 10:57:34 +01:00
Matthias Clasen
6fd897bb10 Add available marker to gdk_x11_window_set_utf8_property 2013-02-25 10:54:33 +01:00
Matthias Clasen
282e7c390e Add another forgotten symbol 2013-02-25 10:54:33 +01:00
Matthias Clasen
9294585cd6 Add index for new api additions
The index for 3.8 api additions was missing up to now.
2013-02-25 10:54:32 +01:00
Matthias Clasen
82928c2a2a Pedantic fixes
Remove a C99 comment, and line up comment formatting.
2013-02-25 10:54:32 +01:00
Matthias Clasen
67635e9177 Include GdkFrameClock in the docs
Make GdkFrameClock and GdkFrameTimings show up in the docs.
A couple of minor doc fixes are also included.
2013-02-25 10:54:32 +01:00
Matthias Clasen
d7184d6500 Include public headers in gdk.h
gdkframeclock.h and gdkframetimings.h were not directly included
in gdk.h. They should.
2013-02-25 10:54:32 +01:00
Dimitris Spingos
5d19e13269 Updated Greek translation po 2013-02-25 11:06:59 +02:00
Dimitris Spingos
76ab40c195 Updated Greek translation 2013-02-25 10:56:48 +02:00
Matej Urbančič
e58bba74ce Updated Slovenian translation 2013-02-24 21:22:16 +01:00
Dimitris Spingos
14374751de Updated Greek translation 2013-02-24 10:07:19 +02:00
Cosimo Cecchi
61344219d4 Revert "box: Don't special-case RTL hbox child positions anymore"
This reverts commit 6f86e57c4f.

https://bugzilla.gnome.org/show_bug.cgi?id=694451
2013-02-23 14:53:24 -05:00
Cosimo Cecchi
a07f767ed4 Revert "toolbar: Don't special-case RTL toolbar child positions anymore"
This reverts commit 821a675013.

https://bugzilla.gnome.org/show_bug.cgi?id=694451
2013-02-23 14:53:23 -05:00
Cosimo Cecchi
894f84c623 Revert "combobox: Don't special-case RTL child positions anymore"
This reverts commit cf712c462d.

https://bugzilla.gnome.org/show_bug.cgi?id=694451
2013-02-23 14:53:23 -05:00
Marek Černocký
f4e5d98d1f Updated Czech translation 2013-02-22 22:06:03 +01:00
Marek Černocký
72d3e7b9f3 Updated Czech translation 2013-02-22 21:48:59 +01:00
A S Alam
67d557b53f Punjabi: Translation updated (aalam) 2013-02-22 08:49:11 +00:00
A S Alam
d85d3a5a96 Punjabi: Translation updated (aalam) 2013-02-22 08:49:05 +00:00
Chun-wei Fan
f50ce1f7aa Re-organize Visual Studio property sheets a bit
-Use ApiVersion instead of GtkApiVersion for consistency's sake across
 the board
-Add placeholder directives in the property sheets for building
 introspection files using .bat files directly from the Visual Studio IDE.
2013-02-22 13:13:54 +08:00
Chun-wei Fan
89338dff4e Add Visual Studio project for gtk3-demo-application
This is used by the "Application Class" demo... so this should be built
as well especially as we are getting gspawn-win{32|64}-helper.exe fixed
on Visual Studio 2005 (and later) builds.
2013-02-22 13:09:50 +08:00
Federico Mena Quintero
1708ae3f1a filechooserbutton: Don't ever use gtk_file_chooser_get_files()
The file chooser button only supports single-selection modes, so
switch the code to a simpler gtk_file_chooser_get_file() to avoid
dealing with GSLists of a single file.

Signed-off-by: Federico Mena Quintero <federico@gnome.org>
2013-02-21 18:52:39 -06:00
Federico Mena Quintero
a41b73fbc7 GtkWidget::draw() - Document how to get the dirty region
Signed-off-by: Federico Mena Quintero <federico@gnome.org>
2013-02-21 18:48:13 -06:00
Руслан Ижбулатов
8e80fd1ab9 Make sure icon cache has /-separated subdirs only (v2 - use g_build_path)
https://bugzilla.gnome.org/show_bug.cgi?id=692955
2013-02-21 19:42:46 +01:00
Owen W. Taylor
983e266fad Convert pixbuf animation demo (both copies) to GdkFrameClock
Use the frame clock instead of a 50ms timeout to animate the
spinning pixbufs.

https://bugzilla.gnome.org/show_bug.cgi?id=694302
2013-02-21 09:59:58 -05:00
Owen W. Taylor
df3e19b449 Broadway/Quartz/Win32: make event source prepare()/check() note paused status
When events are paused, we should not return TRUE from prepare() or check().
GTK+ handles this for events that are already in the GTK+ queue, but
we also need suppress checks for events that are in the system queue - if we
return TRUE indicating that there are events in the system queue, then we'll
call dispatch(), and do nothing. The event source will spin, and will never
run the other phases of the paint clock.

(Broadway doesn't have a window system queue separate from the GDK event queue,
but we write the function the same way for consistency.)

https://bugzilla.gnome.org/show_bug.cgi?id=694274
2013-02-21 09:59:58 -05:00
Thomas Wood
00a107cc4c wayland: don't attempt to unqueue events when events are paused
When events are paused, we should not return TRUE from prepare() or check().
GTK+ handles this for events that are already in the GTK+ queue, but
we also need suppress checks for events that are in the system queue - if we
return TRUE indicating that there are events in the system queue, then we'll
call dispatch(), and do nothing. The event source will spin, and will never
run the other phases of the paint clock.

https://bugzilla.gnome.org/show_bug.cgi?id=694274
2013-02-21 09:59:58 -05:00
Yuri Myasoedov
919a5e3e24 Updated Russian translation 2013-02-21 16:13:56 +04:00
Chun-wei Fan
d861779b69 Redo Completion of Visual Studio projects for gtka11y
Update the Visual Studio projects for gtka11y and the completion of the
projects that go along with it.  This have been distcheck'ed on my Ubuntu
12.04 system.
2013-02-21 15:48:04 +08:00
Chun-wei Fan
f6f2bfdca2 Fix gtk-demo projects
There isn't a custom CSS demo anymore, so remove that from the projects
2013-02-21 15:30:41 +08:00
Chun-wei Fan
332a7c9c6e Update GDK Visual Studio projects
Link to winmm.lib as well, as we are now using timeEndPeriod() and
timeBeginPeriod() since commit 5dbf814f (win32: Request higher
precision timers during animations).
2013-02-21 15:14:25 +08:00
Federico Mena Quintero
77154f295f filechooserbutton: In tests, sleep after opening the dialog
This may ensure that the dialog is actually done initializing.  We need to kill this
sleeping business and really use signals, sigh...

Signed-off-by: Federico Mena Quintero <federico@gnome.org>
2013-02-20 20:13:07 -06:00
Federico Mena Quintero
158d74d257 filechooserbutton: Don't emit file-set signal when the change is not the result of a user action
We only emit that signal when the user confirms the button's internal GtkFileChooserDialog,
or when he drags-and-drops stuff into the button.

Signed-off-by: Federico Mena Quintero <federico@gnome.org>
2013-02-20 20:13:03 -06:00
Federico Mena Quintero
cefcafc508 filechooserbutton: In the tests, run through the dialog more than one time
This ensures that data maintained by the button while the dialog opens/closes remains consistent.

Signed-off-by: Federico Mena Quintero <federico@gnome.org>
2013-02-20 20:12:52 -06:00
Federico Mena Quintero
ac5cc19836 filechooserbutton: Add tests for cancelling the dialog via closing it (delete-event), instead of by simulating the Cancel button (response cancel)
Signed-off-by: Federico Mena Quintero <federico@gnome.org>
2013-02-20 20:09:13 -06:00
Federico Mena Quintero
2deb41fe63 filechooser: When stopping/clearing BROWSE model, really ensure that we end up in LOAD_EMPTY state
Previously we could end up in a situation where browse_list_model==NULL, and yet load_state==LOAD_FINISHED.
This is not a valid state.  So, when we get rid of the list model, really ensure that we end up
in LOAD_EMPTY so nothing assumes that there is a valid list model around.

Signed-off-by: Federico Mena Quintero <federico@gnome.org>
2013-02-20 20:09:08 -06:00
Federico Mena Quintero
039cc929ad filechooser: Tighten up some assertions when actually selecting files in the treeview
The model must be fully loaded, and it must be inserted in the treeview.

Signed-off-by: Federico Mena Quintero <federico@gnome.org>
2013-02-20 20:09:02 -06:00
Tristan Van Berkom
0f67bd7cfe GtkUIManager Buildable implementation: Fixing leaked reference count
Committing this on behalf of Milan Crha, bug: 694162
2013-02-20 18:17:14 +09:00
Benjamin Otte
76670734f4 a11y: Only emit expandable/expanded for expander column
We don't want to emit state changes for all the cells in a row, just for
the cell in the expander column. It's the only one that reports EXPANDED
or EXPANDABLE states, after all.

Also, contains refactoring of the affected functions for all the special
cases.

https://bugzilla.gnome.org/show_bug.cgi?id=694059
2013-02-20 02:44:33 +01:00
Benjamin Steinwender
73cee58d23 Updated German translation 2013-02-20 00:12:17 +01:00
Benjamin Otte
7b4c49a95f a11y: Fix copy-paste error in state flag notification
We weren't checking the removed flag but the added flag for removal
emissions, so what would happen for every state change notification was:
- on state-added, both an "added" and a "removed" event were emitted
- on state-removed, nothing

https://bugzilla.gnome.org/show_bug.cgi?id=694059
2013-02-19 23:25:12 +01:00
Alexander Larsson
3c690c52ba Avoid loop in paint update cycle
Commit 1db87c897f accidentally removed
a check for !in_paint_idle in maybe_start_idle which causes us
to create a paint loop whenever something requests a phase
inside the paint_idle.
2013-02-19 21:12:48 +01:00
Benjamin Otte
de08716526 x11: Handle case where xsettings are NULL 2013-02-19 19:55:02 +01:00
Benjamin Otte
0ed47e1bb7 x11: Fix introspection build
File removal in bb4953f3e8 wasn't checked
in here.
2013-02-19 15:38:08 +01:00
Benjamin Otte
3166588033 tests: #ifdef out unused functions
... that are only used in that ifdef.
2013-02-19 14:44:49 +01:00
Benjamin Otte
588513fc9a x11: Get rid of XSettingsClient object
Instead, store its variables in the GdkX11Screen.
2013-02-19 14:33:39 +01:00
Benjamin Otte
609723b3c1 tests: Add a test for loading images from file
Strictly, this belongs in gdk-pixbuf, but GtkImage should have this
working, too.

https://bugzilla.gnome.org/show_bug.cgi?id=694148
2013-02-19 14:33:39 +01:00
Benjamin Otte
3eef3290ad x11: Use _gdk_x11_get_xatom_for_display_printf()
instead of keeping the atom around all the time
2013-02-19 14:33:39 +01:00
Benjamin Otte
13eeb6ca33 x11: Introduce _gdk_x11_get_xatom_for_display_printf()
and use it instead of caching the atom in the GdkScreenX11.
2013-02-19 14:33:39 +01:00
Benjamin Otte
b2043511ee x11: Don't keep an "in_init" variable
Instead, track the init state with a boolean argument.
2013-02-19 14:33:39 +01:00
Benjamin Otte
200d6fe664 x11: Clean up xsettings header
- Don't use defines for renames
- Move enum into only source file using it
2013-02-19 14:33:38 +01:00
Benjamin Otte
e1efe3269c x11: Get rid of XSettingsSetting
Use GValue throughout instead.
2013-02-19 14:33:38 +01:00
Benjamin Otte
84679ba78b x11: Remove extra variable
Use a getter instead.
2013-02-19 14:33:38 +01:00
Benjamin Otte
78ce2563be x11: Split xsettings event filter into 2 functions
One for each type of window we watch.
2013-02-19 14:33:38 +01:00
Benjamin Otte
f6d6e932de x11: Make stored xsettings window a GdkWindow 2013-02-19 14:33:38 +01:00
Benjamin Otte
5507954e04 x11: Split function into two
Instead of a boolean is_start, have a start and an end function.
2013-02-19 14:33:38 +01:00
Benjamin Otte
8028a5b24a x11: Use gdk_display_flush() 2013-02-19 14:33:38 +01:00
Benjamin Otte
c91843edea x11: Get selection atom useing GDK functions
Don't call XInternAtoms ourselves.
2013-02-19 14:33:38 +01:00
Benjamin Otte
8596142336 x11: Warning improvements to xsettings code
... and using g_warning() instead of fprintf()
2013-02-19 14:33:37 +01:00
Benjamin Otte
01be4ce166 x11: Use usual Atom handling in xsettings code 2013-02-19 14:33:37 +01:00
Benjamin Otte
ed38dbe28f x11: Consolidate root window event setting in one place
No need to duplicate things in xsettings code.
2013-02-19 14:33:37 +01:00
Benjamin Otte
9ed7e883f2 x11: Remove unused argument 2013-02-19 14:33:37 +01:00
Benjamin Otte
edf19ab7b4 x11: Store GDK name in xsettings hash table
The X name is only used while reading the property, so no need to keep
it.
2013-02-19 14:33:37 +01:00
Benjamin Otte
afa3d611d6 x11: Remove XSettingsAction type
Use GdkSettingAction instead.
2013-02-19 14:33:37 +01:00
Benjamin Otte
a4f11fa4f5 x11: Make xsettings callbacks code go away
It's the same callbacks every time, so just move them into the source
file.
2013-02-19 14:33:37 +01:00
Benjamin Otte
c3607fd551 x11: Don't store name in XSettingsSetting anymore
This is in preparation to switching XSettingsSetting to GValue
2013-02-19 14:33:36 +01:00
Benjamin Otte
30a4150c8e x11: Use boolean instead of enum for errors in xsettings code 2013-02-19 14:33:36 +01:00
Benjamin Otte
23b039c8cd x11: Move error reporting to where the error happens
Also, use g_warning() instead of fprintf().
2013-02-19 14:33:36 +01:00
Benjamin Otte
b36b89151e x11: Move length checking into return_if_fail() macro 2013-02-19 14:33:36 +01:00
Benjamin Otte
e3206b9de4 x11: Use GDK error trapping code 2013-02-19 14:33:36 +01:00
Benjamin Otte
c84e303fb5 x11: Split out xsettings string reading code 2013-02-19 14:33:36 +01:00
Benjamin Otte
2b83062fc6 x11: Clean up xsettings header
Move private struct definitions into source file, remove unneeded C++
guards.
2013-02-19 14:33:36 +01:00
Benjamin Otte
0c58cb744c x11: Add debugging output for xsettings code 2013-02-19 14:33:36 +01:00
Benjamin Otte
8857766b5a gdk: Add a debug category for settings 2013-02-19 14:33:36 +01:00
Benjamin Otte
08a6f554c3 x11: Use glib malloc funcs for XSettings 2013-02-19 14:32:41 +01:00
Benjamin Otte
7800e68b73 x11: Call grab functions directly
... instead of going via vfuncs.
2013-02-19 14:32:41 +01:00
Benjamin Otte
eb4792128f x11: Pass the GdkScreen to the XSettingsClient 2013-02-19 14:32:41 +01:00
Benjamin Otte
bb4953f3e8 x11: Fold xsettings-common.[ch] into xsettings-client.[ch] 2013-02-19 14:32:41 +01:00
Benjamin Otte
63f0797e70 x11: Return XSetting without copying 2013-02-19 14:32:41 +01:00
Benjamin Otte
1f95eddbda x11: Don't store last change serial
It's unused anyway
2013-02-19 14:32:41 +01:00
Benjamin Otte
8fa1b2bb9d xsettings: Remove XSettingsList type
Use GHashTable throughout
2013-02-19 14:32:41 +01:00
Benjamin Otte
d7ea5b5266 xsettings: Use glib byte order functions 2013-02-19 14:32:40 +01:00
Benjamin Otte
c1a4a1da10 xsettings: Remove unused function
Remove xsettings_client_new() and rename
xsettings_client_new_with_grab_funcs() to xsettings_client_new()
2013-02-19 14:32:40 +01:00
Rob Bradford
fe5146d8f2 window: Fix compiler warning when not building for X11
The callback function gtk_window_on_theme_variant_changed is only used on the
X11 backend (where GtkSettings is used for the settings information.)

Fixes: https://bugzilla.gnome.org/show_bug.cgi?id=674207
2013-02-19 13:11:30 +00:00
Rob Bradford
2145907cfe wayland: Synthesize fullscreen window state change 2013-02-19 13:11:12 +00:00
Cosimo Cecchi
2516574832 release: post-release version bump 2013-02-18 20:50:32 -05:00
Cosimo Cecchi
aca17b6028 3.7.10 2013-02-18 20:12:01 -05:00
Cosimo Cecchi
8e192f86cb release: update NEWS for 3.7.10 2013-02-18 20:11:45 -05:00
Cosimo Cecchi
4abbb698a7 docs: add some missing methods 2013-02-18 20:10:01 -05:00
Cosimo Cecchi
7d4976b46e docs: add some missing gtk-doc blocks and Since tags for new API 2013-02-18 20:10:01 -05:00
Cosimo Cecchi
4c130ac904 tests: workarounds to keep treeview scrolling tests running
We can't safely examine allocations synchronously using
gtk_main_iteration(), as there might be not enough time for a new paint
clock tick to have expired and the allocation set on the widget.
Work this around adding g_usleep() calls before processing pending
mainloop events.
2013-02-18 19:39:12 -05:00
Torsten Schönfeld
afc57cabf0 GtkViewport: annotate the adjustment args of the constructor
NULL is accepted here, so add (allow-none).

https://bugzilla.gnome.org/show_bug.cgi?id=694022
2013-02-18 19:39:12 -05:00
jjacky
e916568781 Fix #673243: accelerators not visible on GtkRadioMenu
Also fixes a bug in set_property handler, where setting group to NULL would
cause a warning.

Signed-off-by: jjacky <i.am.jack.mail@gmail.com>
2013-02-18 19:38:48 -05:00
Thomas Wood
fbc0572068 wayland: attempt to determine the possible parent surface for popups
Use the surface beneath the device that created the grab as the transient
parent for the popup surfaces.

https://bugzilla.gnome.org/show_bug.cgi?id=693913
2013-02-18 19:38:21 -05:00
Thomas Wood
ec43a1f72a wayland: look further through the hierarchy for the surface with the grab
https://bugzilla.gnome.org/show_bug.cgi?id=693912
2013-02-18 19:38:21 -05:00
Cosimo Cecchi
018a425562 immodule: fix a GCC warning 2013-02-18 19:38:21 -05:00
Owen W. Taylor
b61198cfcb GdkWindow: don't leak the newly created frame clock 2013-02-18 15:25:52 -05:00
Owen W. Taylor
3e81854351 gtk_widget_on_frame_clock_update: ref the widget
Handle a widget being destroyed while in a tick callback by
referencing the widget while dispatching tick callbacks.
2013-02-18 15:25:51 -05:00
Мирослав Николић
e6b5608f43 Updated Serbian translation 2013-02-18 19:15:01 +01:00
Bastien Nocera
3c8a4126a8 GtkAccelLabel: Don't show "+" if there's no more keys to add
With the following code:
    #define INVALID_CHAR GDK_KEY_VoidSymbol - 1
    gtk_accelerator_get_label (INVALID_CHAR, GDK_SHIFT_MASK | GDK_CONTROL_MASK);
we would get this label:
    Shift+Ctrl+
instead of this label:
    Shift+Ctrl

https://bugzilla.gnome.org/show_bug.cgi?id=694075
2013-02-18 18:00:44 +01:00
Alexander Larsson
5dbf814f0c win32: Request higher precision timers during animations
The default windows timer resolution is 16msec, which is too little
for fluent animations (say at 60Hz). So, while a paint clock is
active we temporarily raise the timer resolution to 1 msec.
2013-02-18 17:14:25 +01:00
Owen W. Taylor
1db87c897f Add gdk_frame_clock_begin/end_updating()
Add an API to start or stop continually updating the frame clock.
This is a slight convenience for applcations and avoids the problem
of getting one more frame run after an animation stops, but the
primary motivation for this is because it looks like we might have
to use timeBeginPeriod()/timeEndPeriod() on Windows to get reasonably
accurate timing, and for that we'll need to know if there is an
animation running.

https://bugzilla.gnome.org/show_bug.cgi?id=693934
2013-02-18 17:14:24 +01:00
Shushi KUROSE
1da329b2bd [l10n] Update Japanese translation 2013-02-18 23:36:53 +09:00
Jiro Matsuzawa
3740ebf866 [l10n] Update Japanese translation
Merge the latest pot.
2013-02-18 23:32:29 +09:00
Alexander Larsson
ead64bfedd Remove unnecessary copy of GdkFrameClockIdlePrivate 2013-02-18 11:24:03 +01:00
Alexander Larsson
38ada3b61b win32: Fix build
gdkwindown-win32.c included windows.h directly rather than via gdkwin32.h
which broke the build for me at least. Instead rely on it being included in
gdkwin32.h and things work right.
2013-02-18 11:20:40 +01:00
Alexander Larsson
7319a0f237 GtkEntry: Fix text handle painting
We only draw the main entry on should_draw (widget->window), because
otherwise we also draw it on the GtkTextHandle widgets.

This is necessary due to the recent change for that to not return
TRUE and swallow the rest of the drawing operation.
2013-02-18 09:38:11 +01:00
Alexander Larsson
c6bbfc8e3d Add a few missing gtk_widget_unregister_window calls
This was causing warnings on widget unparent like:

Gdk-CRITICAL **: gdk_window_has_native: assertion `GDK_IS_WINDOW (window)' failed

Becasue the window was not properly removed from the lists on unrealize.
2013-02-18 09:35:58 +01:00
Marek Černocký
a9cf3995a6 Updated Czech translation 2013-02-17 20:06:53 +01:00
Piotr Drąg
7938e1f1cb Updated Polish translation 2013-02-17 19:48:15 +01:00
Owen W. Taylor
69d42639b2 GdkWindowX11: the root window is not a toplevel
The macros we had for checking for toplevel windows were passing
through the root window, which was not intentional and meant that
for the root window WINDOW_IS_TOPLEVEL() returned TRUE but
window->impl->toplevel was NULL, causing gdk_window_create_cairo_surface()
to crash.
2013-02-16 11:56:17 -05:00
Paolo Borelli
bae84bdf23 [entry] unregister icon windows 2013-02-16 16:28:45 +01:00
Owen W. Taylor
d203f63641 GdkFrameClockIdle: remove timeouts in dispose
When a frame clock is disposed, remove active timeouts; also get
rid of the last traces of an unused GTimer.
2013-02-15 22:28:52 -05:00
Owen W. Taylor
ecddf94f43 GtkScrolledWindow: use gtk_widget_add_tick_callback()
This is slightly simpler and more robust than direct use of
GdkFrameClock.
2013-02-15 22:28:46 -05:00
Changwoo Ryu
658e7c4535 immodule: Fix context ID lookup on module with multiple contexts
https://bugzilla.gnome.org/show_bug.cgi?id=690247
2013-02-16 10:04:47 +09:00
Jasper St. Pierre
0fe08d43b5 Update gtk.symbols 2013-02-15 19:50:13 -05:00
Jasper St. Pierre
61f6463b96 Update gdk.symbols 2013-02-15 19:48:56 -05:00
Jasper St. Pierre
b777a16b06 gdkframeclockidle: Don't expose sleep_source source funcs 2013-02-15 19:48:56 -05:00
Jasper St. Pierre
caa1721658 gtkplug: Remove a no-op func 2013-02-15 19:48:56 -05:00
Jasper St. Pierre
367364a8e1 Fix deprecations for GtkIconInfo 2013-02-15 19:48:56 -05:00
Jasper St. Pierre
489a10f488 gtkicontheme: Mark copy/free compat symbols as skip 2013-02-15 19:48:56 -05:00
Jasper St. Pierre
bf7804db64 gdkframeclock: Fix doc comments 2013-02-15 19:33:10 -05:00
William Jon McCann
8e96488bb2 Don't crash if inhibit is called with an unrealized window 2013-02-15 16:56:06 -05:00
Aurimas Černius
8f276d4b65 Updated Lithuanian translation 2013-02-15 21:52:54 +02:00
Baurzhan Muftakhidinov
8bfea4bdaf Updated Kazakh translation. 2013-02-15 20:53:49 +06:00
Alexander Larsson
bbb981fd1a Fix gtk_widget_add_tick_callback sometimes not working
We clear GtkTickCallbackInfo on creation to ensure all fields start
as 0. Before we sometimes ended up with destroyed being 1
so the tick was never called.
2013-02-15 15:46:33 +01:00
Alexander Larsson
c6c33c5cd7 Fix up s/gtk_frame_clock/gdk_frame_clock/ in docs 2013-02-15 14:02:02 +01:00
Alexander Larsson
19784959e0 Fix GtkIconInfo docs
gtk_icon_info_copy and gtk_icon_info_free are deprecated for
the corresponding GObject methods.

We set correct transfer markup for the GtkIconInfo returning methods
to fix the introspection of them.

gtk_icon_info_load_symbolic_for_context_async had the wrong method
name in its documentation block.
2013-02-15 11:07:51 +01:00
Carles Ferrando
233b0385fa [l10n] Updated Catalan (Valencian) translation 2013-02-15 01:30:17 +01:00
Gil Forcada
3856fbb0dc [l10n] Updated Catalan translation 2013-02-15 01:30:07 +01:00
Cosimo Cecchi
e2f76f0c2e Fix a typo in the README 2013-02-14 18:23:47 -05:00
Owen W. Taylor
ce835dee74 GtkContainer: fix disconnection from frame clock
We need to disconnect the frame clock when we unrealize (at which
point the old clock is still alive) not in destroy(). Since there
is no common unrealize for containers, trigger this from GtkWidget.
2013-02-14 17:19:53 -05:00
Owen W. Taylor
7bb07317f3 GtkTickCallback: document use of G_SOURCE_CONTINUE/REMOVE for return value
Document that G_SOURCE_CONTINUE and G_SOURCE_REMOVE are the preferred
return values from a tick callback.
2013-02-14 17:19:53 -05:00
Owen W. Taylor
e2705544ab Don't compress motion events for different devices
A switch of device may be significant for an application, so don't
compress motion events if they are for different devices. This simple
handling isn't sufficient if we have competing event streams from
two different pointer events, but we don't expect this case to be
common.
2013-02-14 17:19:53 -05:00
Owen W. Taylor
ff935c5738 Ignore window manager protocol messages for destroyed windows
If we get, for example, a _NET_WM_FRAME_DRAWN or _NET_WM_PING
message on a destroyed window, then we should just ignore it.
2013-02-14 17:19:53 -05:00
Owen W. Taylor
6e986afbae Small documentation fixes for frame synchronization
Found by Benjamin Otte
2013-02-14 17:19:53 -05:00
Owen W. Taylor
4c9749ee9e gdk_frame_clock_get_frame_time(): use gint64 for time 2013-02-14 17:19:53 -05:00
Owen W. Taylor
63a36aa434 Merge with Merge GdkFrameHistory into GdkFrameClock 2013-02-14 17:19:53 -05:00
Owen W. Taylor
815ef1bcc0 GdkFrameClock: update documentation 2013-02-14 17:19:53 -05:00
Owen W. Taylor
c37de57f14 GdkFrameTimings: add documentation 2013-02-14 17:19:52 -05:00
Owen W. Taylor
bb11195ec0 GdkFrameClock: Clean up the public API
* remove gdk_frame_clock_get_frame_time_val(); a convenience
  function that would rarely be used.
* remove gdk_frame_clock_get_requested() and
  ::frame-requested signal; while we might want to eventually
   be able to track the requested phases for a clock, we don't
  have a current use case.
* Make gdk_frame_clock_freeze/thaw() private: they are only
  used within GTK+ and have complex semantics.
* Remove gdk_frame_clock_get_last_complete(). Another convenience
  function that I don't have a current use case for.
* Rename:
  gdk_frame_clock_get_start() => gdk_frame_clock_get_history_start()
  gdk_frame_clocK_get_current_frame_timings() => gdk_frame_clock_get_timings()
2013-02-14 17:19:52 -05:00
Owen W. Taylor
d5edf9c072 GdkFrameTimings: strip down to a minimal public API
Since we're not exporting the ability to create your own frame
clock for now, remove the setters for GdkFrameTimings fields.
Also remove all setters and getters for fields that are more
about implementation than about quantities that are meaningful
to the applcation and just access the fields directly within
GDK.
2013-02-14 17:19:52 -05:00
Owen W. Taylor
515e5f74aa Merge GdkFrameHistory into GdkFrameClock
Now that GdkFrameClock is a  class, not interface, there's no real advantage
to splitting the frame history into an aggregate object, so directly
merge it into GdkFrameClock.
2013-02-14 17:19:52 -05:00
Owen W. Taylor
5f2d1654a5 Change GdkFrameClock from an interface to a class
It's unlikely that anyone will want to have, say, a GtkWidget that
also acts as a GdkFrameClock, so an abstract base class is as
flexible as making GdkFrameClock an interface, but has advantages:

 - If we decide to never make implementing your own frame clock
   possible, we can remove the virtualization.
 - We can put functionality like history into the base class.
 - Avoids the oddity of a interface without a public interface
   VTable, which may cause problems for language bindings.
2013-02-14 17:19:52 -05:00
Owen W. Taylor
be22b9fbb9 GdkWindow: make the frame clock an inherent property of the window
Instead of making the frame clock a settable property of a window, make
toplevel windows inherently have a frame clock when created (getting
rid of the default frame clock.) We need to create or destroy frame
clocks when reparenting a window to be a toplevel, or to not be a
toplevel, but otherwise the frame clock for a window is immutable.
2013-02-14 17:19:52 -05:00
Owen W. Taylor
449e8c8856 Add gtk_widget_add_tick_callback(), remove GtkTimeline, etc.
Add a very simple GtkWidget function for an "tick" callback, which
is connected to the ::update signal of GdkFrameClock.

Remove:

 - GtkTimeline. The consensus is that it is too complex.
 - GdkPaintClockTarget. In the rare cases where tick callbacks
    aren't sufficient, it's possible to track the
    paint clock with ::realize/::unrealize/::hierarchy-changed.

GtkTimeline is kept using ::update directly to allow using a GtkTimeline
with a paint clock but no widget.
2013-02-14 17:19:52 -05:00
Owen W. Taylor
06c4598fc5 GdkX11DeviceManagerXI2: handle focus events not on a known window
If we get a focus event for a X window we don't recognize, just
ignore it and avoid a g-critical when
_gdk_device_manager_core_handle_focus() is called with a NULL window.
2013-02-14 17:19:51 -05:00
Owen W. Taylor
645b5f398d Reimplement _NET_WM_SYNC_REQUEST inside X11 backend
Deprecate gdk_window_enable_synchronized_configure() and
gdk_window_configure_done() and make them no-ops. Implement the
handling of _NET_WM_SYNC_REQUEST in terms of the frame cycle -
we know that all processing will be finished in the next frame
cycle after the ConfigureNotify is received.
2013-02-14 17:19:51 -05:00
Owen W. Taylor
8865ebcc80 Fix up for newer draft of wm-spec
* 64-bit quantities are consistently ordered low-32-bits / high-32-bits
* data.l[4] in _NET_WM_SYNC_REQUEST indicates which counter to update
2013-02-14 17:19:51 -05:00
Owen W. Taylor
40fa28de3d video-timer: add simple example of PLL-style clock adjustment
The first version of the video-timer simply played back the video
according to the wall clock, and showed each frame at the neareste
presentatin time. But an alternative strategy for playing back
video is that if the frame-rate is an integer-divisor of the
display refresh rate, or very close to that, is to change the playback
speed to complete avoid frame drops and changes in latency.
(This would require resampling audio if present.)

Demonstrate this technique by adding a --pll option to the
video-timer demo.

https://bugzilla.gnome.org/show_bug.cgi?id=685460
2013-02-14 17:19:51 -05:00
Owen W. Taylor
e77a96a0ea video-timer: add a test case for display at a constant frame rate
Add a test case that simulates the timing operaton that goes on
when showing a constant frame rate stream like a video - each
frame is shown at the VBlank interval that is closest to when it
would ideally be timed.

https://bugzilla.gnome.org/show_bug.cgi?id=685460
2013-02-14 17:19:51 -05:00
Owen W. Taylor
fb44ea8a85 Add gdk_frame_timings_get_predicted_presentation_time()
For an operation like synchronizing audio to video playback, we need to
be able to predict the time that a frame will be presented. The details
of this depend on the windowing system, so make the backend predict
a presentation time for ::begin-frame and set it on the GdkFrameTimings.

The timing algorithm of GdkFrameClockIdle is adjusted to give predictable
presentation times for frames that are not throttled by the windowing
system.

Helper functions:

 gdk_frame_clock_get_current_frame_timings()
 gdk_frame_clock_get_refresh_info()

are added for operations that would otherwise be needed multiple times
in different locations.

https://bugzilla.gnome.org/show_bug.cgi?id=685460
2013-02-14 17:19:51 -05:00
Owen W. Taylor
8855bf052d Add GDK_DEBUG=frames
Add a debug option to print out detailed statistics about each frame drawn.

https://bugzilla.gnome.org/show_bug.cgi?id=685460
2013-02-14 17:19:51 -05:00
Owen W. Taylor
9690567d50 animated-resizing: enhance output
Show the average and standard deviation of the latency in addition to
the frame rate. Add options to print the output in machine-readable form,
and to control the frequency and total number of statistics that will be
output.

https://bugzilla.gnome.org/show_bug.cgi?id=685460
2013-02-14 17:19:51 -05:00
Owen W. Taylor
574301d34d animated-resizing: make circle size a #define
Clean up the code with a #define for circle size. This also allows
determining we're throttled by number-of-requests or number-of-pixels.

https://bugzilla.gnome.org/show_bug.cgi?id=685460
2013-02-14 17:19:50 -05:00
Owen W. Taylor
0def26ecf1 GdkWindowX11: Communicate gdk_frame_timings_get_slept_before() to the compositor
We want the compositor to do different things for frames where
"slept before" is TRUE. Communicate to the compositor that
frame is a no-delay frame (slept_before=FALSE) by ending the frame
by increasing the counter value by 1, and that the frame is a
normal frame (slept_before=TRUE) by increasing the counter value
by 3.

https://bugzilla.gnome.org/show_bug.cgi?id=685460
2013-02-14 17:19:50 -05:00
Owen W. Taylor
58b5811d03 Add gdk_frame_timings_get/set_slept_before()
Add functions that tell us whether the main loop slept before we drew
a frame. Blocking with the frame clock frozen doesn't count as sleeping.
We'll use this to advertise to the compositor whether we
are drawing as fast as possible (and it should do the same) or timing
frames carefully (and it should do the same.)

https://bugzilla.gnome.org/show_bug.cgi?id=685460
2013-02-14 17:19:50 -05:00
Owen W. Taylor
dc6dedab4d GdkFrameClockIdle: don't start the tiemout/idle when in a frame
Don't start the idle if we're in the middle of painting a frame -
this will prevent us from getting the timing right when starting
the idle after the frame.

https://bugzilla.gnome.org/show_bug.cgi?id=685460
2013-02-14 17:19:50 -05:00
Owen W. Taylor
15ee04c66f Add GdkFrameHistory and GdkFrameTimings, handle _NET_WM_FRAME_TIMINGS
In order to be able to track statistics about how well we are drawing,
and in order to be able to do sophisticated things with frame timing
like predicting per-frame latencies and synchronizing audio with video,
we need to be able to track exactly when previous frames were drawn
to the screen.

Information about each frame is stored in a new GdkFrameTimings object.
A new GdkFrameHistory object is added which keeps a queue of recent
GdkFrameTimings (this is added to avoid further complicating the
implementation of GdkFrameClock.)

https://bugzilla.gnome.org/show_bug.cgi?id=685460
2013-02-14 17:19:50 -05:00
Owen W. Taylor
d761df7e0c GdkWindowX11: Only start a frame when we emit damage
Instead of communicating the start of a frame to the window manager
as soon as we begin a frame, start a frame only when we know we've
actually created damage to the contents of a window.

(This uses cairo_set_mime_data() as a notification mechanism - a
clever suggestion from Uli Schlachter.)

The advantage of this is that we aren't forcing the compositor to
do a frame cycle and send _NET_WM_FRAME_DRAWN - depending on how the
compositor is structured that might either cause it to do extra
work or it might send _NET_WM_FRAME_DRAWN early and upset frame
timing.

https://bugzilla.gnome.org/show_bug.cgi?id=685460
2013-02-14 17:19:50 -05:00
Owen W. Taylor
e4aa9f05ae GdkDisplay: handle multiple calls to _gdk_display_pause_events()
Since events can be paused independently for each window during processing,
make _gdk_display_pause_events() count how many times it is called
and only unpause when unpause_events() is called the same number of
times.

https://bugzilla.gnome.org/show_bug.cgi?id=685460
2013-02-14 17:19:50 -05:00
Owen W. Taylor
d446dda920 gdk_display_get_event: don't unqueue events from the windowing system when paused
Unqueuing events from the windowing system when paused could result
in weird reordering if event filters resulted in application-visible
behavior. Since we now resume events when the frame clock is frozen,
we now no longer count on low-level event handling running while
event handling is paused.

https://bugzilla.gnome.org/show_bug.cgi?id=685460
2013-02-14 17:19:50 -05:00
Owen W. Taylor
3cef97f10d GdkFrameClock: Reverse order of resume-events and afterpaint
Keeping events paused after the end of a frame put us in a
weird state where we had to process and queue events - so that
we would get the message from the compositor - but not deliver
them. Instead resume events before ending the frame.

https://bugzilla.gnome.org/show_bug.cgi?id=685460
2013-02-14 17:19:49 -05:00
Owen W. Taylor
a69285da08 Compress motion synchronized with the paint cycle
When we have pending motion events, instead of delivering them
directly, request the new FLUSH_EVENTS phase of the frame clock.
This allows us to compress repeated motion events sent to the
same window.

In the FLUSH_EVENTS phase, which occur at priority GDK_PRIORITY_EVENTS + 1,
we deliver any pending motion events then turn off event delivery
until the end of the next frame. Turning off event delivery means
that we'll reliably paint the compressed motion events even if more
have arrived.

Add a motion-compression test case which demonstrates behavior when
an application takes too long handle motion events. It is unusable
without this patch but behaves fine with the patch.

https://bugzilla.gnome.org/show_bug.cgi?id=685460
2013-02-14 17:19:49 -05:00
Owen W. Taylor
05386b44e0 GtkScrolledWindow: use GdkFrameClock for kinetic scrolling
Use GdkFrameClock when animating scrolling via touch, rather
than a timeout.

https://bugzilla.gnome.org/show_bug.cgi?id=685460
2013-02-14 17:19:49 -05:00
Owen W. Taylor
623803c1fe Add a test of an animated resizing window
Add a test of a window with an animated size and contents. The
test accepts load factor command line argument to see how things
work as the drawing of the content requires more GPU resources.

https://bugzilla.gnome.org/show_bug.cgi?id=685460
2013-02-14 17:19:49 -05:00
Owen W. Taylor
672100b822 GtkTimeline: Wrap around the progress correctly when looping
When we have a looping animation for something like an angle,
we need to make sure that the distance we go past 1.0 becomes
the starting distance for the next frame. This prevents a
stutter at the loop position.

https://bugzilla.gnome.org/show_bug.cgi?id=685460
2013-02-14 17:19:49 -05:00
Owen W. Taylor
215d029c83 GtkTimeline: introspection fixes, add :progress-type property
Fix up introspection information for GtkTimeline, install the
header has a public heaer, and add the property for :progress-type.

https://bugzilla.gnome.org/show_bug.cgi?id=685460
2013-02-14 17:19:49 -05:00
Owen W. Taylor
314dadca82 Hook GtkTimeline up to GdkFrameClock
Use GdkFrameClock for the timing of GtkTimeline. This require the
user to provide either a GtkWidget or a GdkFrameClock when creating
the timeline. The default constructor now takes a GtkWidget. If you
want to create a GdkFrameClock without a widget, you need to use
g_object_new() and pass in a GdkFrameClock and GdkScreen.

https://bugzilla.gnome.org/show_bug.cgi?id=685460
2013-02-14 17:19:49 -05:00
Owen W. Taylor
cbce5bcd0b GtkTimeline: remove settable FPS
The frames-per-second for an animation should be controlled by how
fast we can process frames and the the frame-rate of the display; it's not
a meaningful app-settable property.

https://bugzilla.gnome.org/show_bug.cgi?id=685460
2013-02-14 17:19:49 -05:00
Owen W. Taylor
db89b600e0 Add back GtkTimeline
Add back the GtkTimeline code that previously made private and
then removed. It will be hooked up to GdkFrameClock. This commit
purely adds the old code back.

https://bugzilla.gnome.org/show_bug.cgi?id=685460
2013-02-14 17:19:49 -05:00
Owen W. Taylor
344a69880a Add an UPDATE phase and GdkFrameClockTarget, use for GtkStyleContext
Switch GtkStyleContext to using GdkFrameClock. To do this, add a new
UPDATE phase to GdkFrameClock.

Add a GdkFrameClockTarget interface with a single set_clock() method,
and use this to deal with the fact that GtkWidget only has a frame
clock when realized.

https://bugzilla.gnome.org/show_bug.cgi?id=685460
2013-02-14 17:19:48 -05:00
Owen W. Taylor
7dfa412188 GdkFrameClockIdle: add throttling to 60fps
If the backend is throttling paints, then the frame clock will be
frozen at the end of the frame. If not, then we need to add throttling,
so wait until 16ms after the start of the frame before beginning the
next frame.

https://bugzilla.gnome.org/show_bug.cgi?id=685460
2013-02-14 17:19:48 -05:00
Owen W. Taylor
6557a775df GdkWindowX11: start off with an odd frame-counter value
By starting with an odd frame counter value, we make the mapping
and initial paint of the window an atomic operation, avoiding
any visual artifacts from an unpainted window.

Possible improvement: start the frame when doing gdk_window_show(),
so that the same improvement occurs for windows that were previously
shown and are being mapped again.

https://bugzilla.gnome.org/show_bug.cgi?id=685460
2013-02-14 17:19:48 -05:00
Owen W. Taylor
355e305c16 Freeze the update counter for unmapped windows
When a window is unmapped, freeze its frame clock. This avoids doing
unnecessary work, but also means that we won't block waiting for
_NET_WM_FRAME_DRAWN messages that will never be received since the
frame ended while the window was withdrawn.

https://bugzilla.gnome.org/show_bug.cgi?id=685460
2013-02-14 17:19:48 -05:00
Owen W. Taylor
8a6895fe52 Use _NET_WM_FRAME_DRAWN to synchronize frame drawing
As part of the extended _NET_WM_SYNC_REQUEST_COUNTER protocol,
we get a _NET_WM_FRAME_DRAWN message for each frame we draw. Use this
to synchronize the updates we are doing with the compositing manager's
drawing, and ultimately with with display refresh.

We now set the sync request counters on all windows, including
override-redirect windows, since it is also useful to do synchronized,
atomic updates for such windows.

https://bugzilla.gnome.org/show_bug.cgi?id=685460
2013-02-14 17:19:48 -05:00
Owen W. Taylor
69f457426a Switch to an extended form of _NET_WM_SYNC_REQUEST_COUNTER
By exporting two XSync counters on a toplevel window, we subscribe
to an extended form of the _NET_WM_SYNC_REQUEST_COUNTER protocol,
where the window manager can initiate an atomic frame, as previously,
but the application can also do so by incrementing the new counter to
an odd value, and then to an even value to finish the frame.

See:
https://mail.gnome.org/archives/wm-spec-list/2011-October/msg00006.html

The support for 64-bit integers that GLib requires is used to
simplify the logic.

https://bugzilla.gnome.org/show_bug.cgi?id=685460
2013-02-14 17:19:48 -05:00
Owen W. Taylor
1824796bfb GdkFrameClock: add freeze/thaw
Add the ability to freeze a frame clock, which pauses its operation,
then thaw it again later to resume.

Initially this is used to implement freezing updates when we are
waiting for ConfigureNotify in response to changing the size of
a toplevel.

We need a per-window clock for this to work properly, so add that
for the X11 backend.

https://bugzilla.gnome.org/show_bug.cgi?id=685460
2013-02-14 17:19:48 -05:00
Owen W. Taylor
c4545cc5d4 GdkFrameClock: Make the phase explicit when requesting the frame
Instead of having gdk_frame_clock_request_frame() have
gdk_frame_clock_request_phase() where we can say what phase we need.
This allows us to know if we get a frame-request during layout whether
it's just a request for drawing from the layout, or whether another
layout phase is needed.

https://bugzilla.gnome.org/show_bug.cgi?id=685460
2013-02-14 17:19:48 -05:00
Owen W. Taylor
7753883add Use GdkFrameClock for relayout
Add a ::layout signal to GdkFrameClock and use it instead of an idle
handler to drive the restyling and relayout of containers.

https://bugzilla.gnome.org/show_bug.cgi?id=685460
2013-02-14 17:19:47 -05:00
Owen W. Taylor
77bac0d6ae Add GdkFrameClock
Add an object GdkFrameClock that we associate with a GdkWindow.
This tracks when the window needs to be repainted, and will also
be used for other operations in the future like relayout and
updating animations.

Based on a patch from Havoc Pennington:

 https://mail.gnome.org/archives/gtk-devel-list/2010-October/msg00004.html

https://bugzilla.gnome.org/show_bug.cgi?id=685460
2013-02-14 17:19:47 -05:00
Owen W. Taylor
001f960a43 GdkDisplayX11: Don't use substructure events in internal accounting
We may receive events because SubstructureNotifyMask has been selected
for the root window. (Most likely, this would occur because GTK+
is being used inside a window manager like Metacity or Mutter.)
This can confuse various types of internal accounting, so detect
such events and comprehensively ignore them for GDK's internal
purposes. We still need to generate GDK events for these cases
because you can select for substructure events with
GDK_SUBSTRUCTURE_MASK.

https://bugzilla.gnome.org/show_bug.cgi?id=685460
2013-02-14 17:19:47 -05:00
Alexander Larsson
e89a2f0bfd gtk3-demo: Fix up resource handling
We're not loading css files via resouce uris, as we want
to support editing, so we need to use absolute references
to any included resources.
2013-02-14 23:01:19 +01:00
Alexander Larsson
cb68f52270 Add new GtkIconInfo calls to the reference docs 2013-02-14 22:54:39 +01:00
Alexander Larsson
b8af079258 Update README.in for the GtkIconInfo type change 2013-02-14 22:52:49 +01:00
Alexander Larsson
f35ad7ab8b GtkIconTheme: Add async versions of symbolic icon loaders
https://bugzilla.gnome.org/show_bug.cgi?id=693802
2013-02-14 22:10:15 +01:00
Alexander Larsson
23d5c41603 GtkIconTheme Don't leak pixbuf in symbolic icon cache
We need to unref the pixbuf we just put in the cache, because
symbolic_pixbuf_cache_new takes a ref.

https://bugzilla.gnome.org/show_bug.cgi?id=693802
2013-02-14 22:10:15 +01:00
Alexander Larsson
7690846c3f Add gtk_icon_info_load_icon_async
This lets you asynchronously load icons. We need this for gnome-shell
to replace its current non-threadsafe use of GtkIconTheme.

https://bugzilla.gnome.org/show_bug.cgi?id=693802
2013-02-14 22:10:09 +01:00
Alexander Larsson
e2d0846386 Make GtkIconInfo a GObject
This is necessary in order to have async operations on it.
All the old copy/free functions keeps working, and g_boxed_copy on a GObject
also works, so this should be mostly compatible, but techncally its a minor
ABI break since the GType changes fundamental type. Changes like this has
happened before though, like with GVariant becomming its own fundamental
type.

https://bugzilla.gnome.org/show_bug.cgi?id=693802
2013-02-14 22:07:25 +01:00
Anish A
32c6c672d1 Revert "Updated Malayalam Localization"
This reverts commit bff9de1adc.
2013-02-14 23:10:04 +04:00
Anish A
bff9de1adc Updated Malayalam Localization 2013-02-14 23:08:33 +04:00
Rob Bradford
4e1d999940 wayland: Add support for output device removal
Since we only receive an object id for the removed object we must try and
remove that from the list of devices based on that id.
2013-02-14 13:28:07 +00:00
Rob Bradford
fab808f92c wayland: Add basic multiple output support
Store the wl_output pointer within the the GdkWaylandMonitor structure.
2013-02-14 13:02:27 +00:00
Federico Mena Quintero
936045e82b Merge branch 'master' into places-sidebar
Conflicts:
	docs/reference/gtk/gtk-docs.sgml
	gtk/gtkfilechooserdefault.c
	gtk/org.gtk.Settings.FileChooser.gschema.xml
2013-02-13 20:37:36 -06:00
Federico Mena Quintero
e16ade9836 filechooserbutton: Add tests for SELECT_FOLDER mode with the dialog active
Signed-off-by: Federico Mena Quintero <federico@gnome.org>
2013-02-13 18:01:39 -06:00
Federico Mena Quintero
22e5e77232 filechooser: Oops, cancel a file operation that was missing
In addition, remove a list of pending_cancellables that was no longer being used.

Signed-off-by: Federico Mena Quintero <federico@gnome.org>
2013-02-13 18:01:39 -06:00
Federico Mena Quintero
69d844fbbb filechooserbutton: Add a battery of tests for GtkFileChooserButton
These are generic tests that can test the button in all of its modes,
instead of hand-written tests for each combination.

Some tests fail currently.

Signed-off-by: Federico Mena Quintero <federico@gnome.org>
2013-02-13 18:01:39 -06:00
Federico Mena Quintero
c8403f697e filechooserbutton: In SELECT_FOLDER mode, consider an empty selection to mean current_folder
If the user didn't explicitly select anything, BUT the file chooser button has
a current_folder set, do the same as what GtkFileChooserDefault would do:
return the current folder as the selection.

This makes the tests in tests/filechooser pass!

Signed-off-by: Federico Mena Quintero <federico@gnome.org>
2013-02-13 18:01:39 -06:00
Federico Mena Quintero
90a034d800 filechooserbutton: Keep track of the current_folder while the dialog is inactive
This is analogous to keeping the selection while the dialog is inactive.

Signed-off-by: Federico Mena Quintero <federico@gnome.org>
2013-02-13 18:01:39 -06:00
Federico Mena Quintero
8d6ef3b865 filechooser: Fix cast 2013-02-13 18:01:39 -06:00
Federico Mena Quintero
936a7f62a5 filechooserbutton: Remove unused function prototypes 2013-02-13 18:01:39 -06:00
Federico Mena Quintero
cf921c353b filechooserbutton: Restore to an empty previous selection properly
If no file was originally selected in the GtkFileChooserButton, then its
internal dialog is brought up and cancelled, then we need to restore the
selection back to none.  GtkFileChooser, though, doesn't like to
select a NULL file, so call _unselect_all() in that condition.

Signed-off-by: Federico Mena Quintero <federico@gnome.org>
2013-02-13 18:01:39 -06:00
Federico Mena Quintero
e65cf0b70d filechooserbutton: Add test for setting/getting the current folder; currently fails
Signed-off-by: Federico Mena Quintero <federico@gnome.org>
2013-02-13 18:01:39 -06:00
Federico Mena Quintero
8f6fea1384 filechooserbutton: Fix preserving the selection after cancelling the dialog
The button's underlying file chooser dialog should not be used to store the file selection
while the dialog is unmapped.  Instead, the file chooser button now stores the
selection itself.

Signed-off-by: Federico Mena Quintero <federico@gnome.org>
2013-02-13 18:01:39 -06:00
Federico Mena Quintero
7e2c467e64 filechooser: Remove some unused code
Signed-off-by: Federico Mena Quintero <federico@gnome.org>
2013-02-13 18:01:39 -06:00
Federico Mena Quintero
cef1465e88 filechooserbutton: Simplify the code to preserve the selection while the dialog is running
It used to fetch a possibly multiple selection from the GtkFileChooserDialog, and then
pick just the first item from the selection list.  But since GtkFileChooserButton
operates in single-selection mode only, it can simply use gtk_file_chooser_get_file()
instead.

Also, the right way to reset the selection for GTK_FILE_CHOOSER_ACTION_SELECT_FOLDER
is with gtk_file_chooser_select_file(), not with _set_current_folder_file().

Signed-off-by: Federico Mena Quintero <federico@gnome.org>
2013-02-13 18:01:39 -06:00
Federico Mena Quintero
7df00df6b6 filechooserbutton: Don't set a starting folder in the underlying dialog
Let the dialog decide by itself.
2013-02-13 18:01:39 -06:00
Federico Mena Quintero
ed9797a1fd filechooser: Test canceling the dialog inside a GtkFileChooserButton
Signed-off-by: Federico Mena Quintero <federico@gnome.org>
2013-02-13 18:01:39 -06:00
Federico Mena Quintero
8eee5ebb1a filechooser: Add a couple of tests for GtkFileChooserButton; they fail now
Signed-off-by: Federico Mena Quintero <federico@gnome.org>
2013-02-13 18:01:39 -06:00
Federico Mena Quintero
40c57d9b58 filechooser: Do tests with g_assert_cmpstr(), not g_assert(passed)
This lets us see exactly what failed, instead of just seeing a boolean error value.

Signed-off-by: Federico Mena Quintero <federico@gnome.org>
2013-02-13 18:01:39 -06:00
Federico Mena Quintero
ff4bf0c895 filechooser: Move some of the tests to GTestDataFunc
This code came from a home-grown testing mechanism, which didn't aggregate tests
into a test suite; it just ran them one by one.  Here we move some of that machinery
to GTestDataFunc for more flexibility in running tests.

Signed-off-by: Federico Mena Quintero <federico@gnome.org>
2013-02-13 18:01:39 -06:00
Federico Mena Quintero
ba63578e62 filechooser: Get the filechooser tests to build
Some are ifdef-ed out with BROKEN_TESTS, but at least the tests will compile for now.
2013-02-13 18:01:39 -06:00
Juan Pablo Ugarte
3472edb38d Added scroll and touch events to GtkToolPalette 2013-02-13 19:39:45 -03:00
Cosimo Cecchi
880391cded filechooser: follow the gtk-recent-files-enabled GtkSetting
Avoid showing the Recent files entry if the setting is FALSE.

https://bugzilla.gnome.org/show_bug.cgi?id=693709
2013-02-13 12:06:43 -05:00
Cosimo Cecchi
382c5f63b0 recentmanager: follow gtk-recent-files-enabled GtkSetting
https://bugzilla.gnome.org/show_bug.cgi?id=693724
2013-02-13 12:06:43 -05:00
Cosimo Cecchi
c896adc9e9 settings: add a gtk-recent-files-enabled GtkSetting
Backed by an XSetting, so g-s-d can set it according to the GSettings
value.

https://bugzilla.gnome.org/show_bug.cgi?id=693724
2013-02-13 12:06:43 -05:00
Jan Arne Petersen
ff2a387154 wayland: Handle wl_output in GdkWaylandScreen
Expose information about outputs in GdkScreen (gdk_screen_get_n_monitors
and gdk_screen_get_monitor_*).
2013-02-13 15:52:05 +00:00
Alexander Larsson
8b9254c8a7 Add opacity_group hack
This adds a way to get the gtk_widget_set_opacity liike behaviour
of retargeting GdkWindows and exposing every child in ::draw, without
actually having an alpha. This is needed if you're doing more complex things
such as cross fading of widgets.

We do this as a hack by using opacity values that round to 255 yet not
really 1.0 in order to avoid having some magical API call for this
mainly internal call.

https://bugzilla.gnome.org/show_bug.cgi?id=687842
2013-02-12 17:02:53 +01:00
Thomas Wood
bfd7137ffb wayland: skip pointer and keyboard events without a surface
Pointer and keyboard events can be received after the surface has been
destroyed, in which case the surface will be NULL.

https://bugzilla.gnome.org/show_bug.cgi?id=693338
2013-02-12 15:30:56 +00:00
Thomas Wood
8568d66a73 gdkwindow: don't use last_slave for the source device if it is NULL
Some backends do not have slave devices, which means last_slave may be
NULL. Use the current device as the source device if last_slave is NULL
when synthesizing a crossing event.

https://bugzilla.gnome.org/show_bug.cgi?id=692411
2013-02-12 15:30:56 +00:00
Thomas Wood
a8862727c9 wayland: set the "transient inactive" flag on tooltip surfaces
This prevents the tooltip surfaces from taking the focus away from the
parent surface.

https://bugzilla.gnome.org/show_bug.cgi?id=693313
2013-02-12 15:30:56 +00:00
Thomas Wood
8d5d9c50b1 tooltip: set the transient parent when using the Wayland backend
Set the transient parent window on tooltips so that they can be
positioned correctly when using the Wayland backend.

https://bugzilla.gnome.org/show_bug.cgi?id=693313
2013-02-12 15:30:56 +00:00
Khaled Hosny
134230ed91 Update Arabic translations 2013-02-12 17:27:38 +02:00
Simon Feltman
283c974680 gtkcellrenderertext: Sink floating entry before using as signal argument
Sink the GtkEntry assigned to the private structure of GtkCellRendererText
before signals containing it as an argument are sent out. This keeps
language bindings from sinking the reference and then destroying the entry
when the signal closure is finished.

https://bugzilla.gnome.org/show_bug.cgi?id=693400
2013-02-11 17:46:33 -08:00
Matthias Clasen
154a144cf6 Remove remnants of localization from gtk-demo
gtk-demo isn't localized at this point.
https://bugzilla.gnome.org/show_bug.cgi?id=681578
2013-02-11 16:52:37 -05:00
Alexander Larsson
7319f2934f Clean up the opacity handling
This cleans up the internals but doesn't really change the behaviour.

https://bugzilla.gnome.org/show_bug.cgi?id=687842
2013-02-11 20:38:59 +01:00
Adel Gadllah
0b1f8a5c4b Fix compiler warnings
Remove two unused variables.
2013-02-11 11:40:15 +01:00
Matthias Clasen
ba1f2ae3fc Mention the de-facto standard filename extension
GtkBuilder files are commonly named .ui - mention that in the
docs.
https://bugzilla.gnome.org/show_bug.cgi?id=590325
2013-02-11 00:57:39 -05:00
Matthias Clasen
0795237bb2 Plug a few memory leaks
The accessibles for icon view items were not properly freed
in all cases.
https://bugzilla.gnome.org/show_bug.cgi?id=683311
2013-02-11 00:42:28 -05:00
Matthias Clasen
2379445c1d Correct the documentation for how to set accessible names
The example in the GtkWidget docs was referring to a nonexisting
AtkObject::name property. The correct property name is
accessible-name.
2013-02-10 15:47:14 -05:00
Matthias Clasen
fbb1ee02bc Add a test for setting accessible name from gtkbuilder
This is wrongly documented in the GtkWidget docs.
2013-02-10 15:47:08 -05:00
Aurimas Černius
fc27f0737e Updated Lithuanian translation 2013-02-09 22:06:50 +02:00
Anish A
417e88819b Revert "Updated Malayalam Localization"
This reverts commit 434f07944b.
2013-02-08 21:37:35 +04:00
Anish A
434f07944b Updated Malayalam Localization 2013-02-08 21:34:21 +04:00
Rico Tzschichholz
4fe1effb36 Revert "Visual C++: Update gtka11y projects completion"
This broke 'make dist' on linux.

This reverts commit ecf2a9471b.
2013-02-08 18:29:22 +01:00
Rico Tzschichholz
656cc63c75 Revert "Drop things that break distcheck"
This reverts commit 2204f12083.
2013-02-08 18:29:13 +01:00
Alexander Larsson
97c235405d css: Add opacity reftest
https://bugzilla.gnome.org/show_bug.cgi?id=687842
2013-02-07 11:12:21 +01:00
Alexander Larsson
366b4db791 css: Support opacity
https://bugzilla.gnome.org/show_bug.cgi?id=687842
2013-02-07 11:11:38 +01:00
Alexander Larsson
7d21ec23f6 Add singleton for css number 1.0
This will be nice as this is will be the default for opacity.

https://bugzilla.gnome.org/show_bug.cgi?id=687842
2013-02-07 11:11:38 +01:00
Alexander Larsson
ebb84e8d19 TextHandle: Don't draw handles if not visible
When calling gtk_widget_draw() on the entry gtk_cairo_should_draw_window()
will return TRUE for all windows. This is used when rendering a widget to
somewhere other than the screen, and its now used for transparent widgets.
This caused the texthandle to always draw itself and terminate the draw
handler for the entry.

Instead we now only draw the markers when really visible, plus we return
FALSE to avoid stopping the entry drawing.

https://bugzilla.gnome.org/show_bug.cgi?id=687842
2013-02-07 11:11:38 +01:00
Alexander Larsson
b57a2c8341 Add widget transparency test to testgtk
https://bugzilla.gnome.org/show_bug.cgi?id=687842
2013-02-07 11:11:38 +01:00
Alexander Larsson
fa8b71450c Add gtk_widget_get/set_opacity
This adds gtk_widget_get/set_opacity, as well as a GtkWidget.opacity
property. Additionally it deprectates gtk_window_get/set_opacity and
removes the GtkWindow.opacity property (in preference for the new
identical inherited property from GtkWidget, which should be ABI/API
compat).

The implementation is using the new gdk_window_set_opacity child
window support for windowed widgets, and cairo_push/pop_group()
bracketing in gtk_widget_draw() for non-window widgets.

https://bugzilla.gnome.org/show_bug.cgi?id=687842
2013-02-07 11:11:37 +01:00
Alexander Larsson
3d4cd4db3e Add gtk_widget_(un)register_window
This replaces the previously hardcoded calls to gdk_window_set_user_data,
and also lets us track which windows are a part of a widget. Old code
should continue working as is, but new features that require the
windows may not work perfectly.

We need this for the transparent widget support to work, as we need
to specially mark the windows of child widgets.

https://bugzilla.gnome.org/show_bug.cgi?id=687842
2013-02-07 11:11:37 +01:00
Alexander Larsson
4d3c77f920 gdkwindow: Allow gdk_window_set_opacity on non-native children
We now store the current opacity for all windows. For native windows
we just call into the native implementation whenever the opacity changes.
However, for non-native windows we implement opacity by pushing a
second implicit paint that "stacks" on the existing one, acting as
an opacity group while rendering the window and its children.

This works well in general, although any native child windows will of
course not be opaque. However, there is no way to implement
implicit paint flushing (i.e. draw the currently drawn double buffer
to the window in order to allow direct drawing to the window).
We can't flush in the stacked implicit paint case because there
is no way to get the right drawing behaviour when drawing directly
to the window. We *must* draw to the opacity group to get the right
behaviour.

We currently flush if:
* A widget disables double buffering
* You call move/resize/scroll a window and it has non-native children
  during the expose handler

In case this happens we warn and flush the outermost group, so there may
be drawing errors.

https://bugzilla.gnome.org/show_bug.cgi?id=687842
2013-02-07 11:11:37 +01:00
Alexander Larsson
ada6d81247 gdkwindow: Store the implicit paint in a list
This changes nothing, but lets us later have multiple
implicit paints

https://bugzilla.gnome.org/show_bug.cgi?id=687842
2013-02-07 11:11:37 +01:00
Rob Bradford
f6383ebf9e wayland: React to G_IO_ERR and G_IO_HUP on the wayland socket
Fixes: https://bugzilla.gnome.org/show_bug.cgi?id=692728
2013-02-06 18:08:58 +00:00
Thomas Wood
2935b97b31 wayland: remove debug message
https://bugzilla.gnome.org/show_bug.cgi?id=693253
2013-02-06 16:56:44 +00:00
Thomas Wood
6657479c72 wayland: avoid returning NULL when getting a cursor
https://bugzilla.gnome.org/show_bug.cgi?id=693257
2013-02-06 16:56:44 +00:00
Thomas Wood
4f6d535626 wayland: use the GdkCursorType enum information to lookup the cursor name
Use the enum information to generate the cursor name rather than using a
lookup table.

https://bugzilla.gnome.org/show_bug.cgi?id=693256
2013-02-06 16:56:44 +00:00
Thomas Wood
69ac91b4b3 wayland: fix the direction of scrolling
Fix the direction of scrolling and convert the delta values into the
expected range.

https://bugzilla.gnome.org/show_bug.cgi?id=693251
2013-02-06 16:56:43 +00:00
Marc-André Lureau
1568204159 Fix a small typo s/parater/parameter 2013-02-06 17:26:15 +01:00
Rob Bradford
03d405e484 gdkwindow: Do not rely on a previous slave device when updating grab
_gdk_display_device_grab_update does not support passing in NULL for the
source device. If we don't have a slave device (saved in the pointer info)
then do not try and use that NULL pointer for the source_device.

This bug appeared in the Wayland backend where we (currently) only have master
devices exposed and as such no slave device is ever saved.

Fixes: https://bugzilla.gnome.org/show_bug.cgi?id=692411
2013-02-06 14:17:46 +00:00
Federico Mena Quintero
04dbec4191 Allow dropping URIs as bookmarks between existing bookmarks
The before-drop machinery was already in place; here we implement the actual
dropping.

Signed-off-by: Federico Mena Quintero <federico@gnome.org>
2013-02-05 14:44:58 -06:00
Rob Bradford
898d577675 build: Bump atk dependency to 2.7.5
The following patch added a dependency on a new API first available in that
release:

commit 92f0c5c384
Author: Mike Gorse <mgorse@suse.com>
Date:   Mon Dec 3 16:07:23 2012 -0600

    Add accessibility for GtkLevelBar and value test
2013-02-05 18:36:48 +00:00
Rob Bradford
b43d36d43d wayland: Use g_value_set_static to avoid string copies 2013-02-05 18:28:43 +00:00
Rob Bradford
93c3fec125 wayland: Pull the cursor theme name out from the setting for it
This avoids us using the default theme and allows us to use a wider range of
cursors.
2013-02-05 13:25:20 +00:00
Rob Bradford
69e9ecf90a wayland: Advertise the cursor theme through GtkSettings as Adwaita
... as per the way we advertise a GTK theme to use.
2013-02-05 13:25:20 +00:00
Piotr Drąg
a34d27d3ea Updated POTFILES.in 2013-02-04 22:12:57 +01:00
Matthias Clasen
5a8675686f post-release bump 2013-02-04 14:52:14 -05:00
Matthias Clasen
4e04319d7c 3.7.8 2013-02-04 14:14:08 -05:00
Matthias Clasen
2204f12083 Drop things that break distcheck 2013-02-04 14:14:07 -05:00
Luca Ferretti
bdb66189fc [l10n] Updated Italian translation. 2013-02-04 18:39:36 +01:00
Matthias Clasen
cb539841a4 Update expected output again
pickers.ui is just too sensitive to environment, and the … in
the output doesn't help.
2013-02-04 10:50:24 -05:00
Matthias Clasen
b166a6bb0e Avoid deprecation warnings in a11y tests
We are testing the deprecated GtkTable here.
2013-02-04 09:27:28 -05:00
Matthias Clasen
5ee054c42e More updates 2013-02-04 08:58:03 -05:00
Matthias Clasen
67a18b7cf9 Fix an sed accident
This broke our css parser tests. Yay for tests !
2013-02-04 08:33:58 -05:00
Chao-Hsiung Liao
dd28fd8a10 Updated Traditional Chinese translation(Hong Kong and Taiwan) 2013-02-04 20:28:51 +08:00
Matthias Clasen
0162e92aba Update a11y test results to match
Range widgets have lost their action. Update expected output.
2013-02-04 01:03:37 -05:00
Matthias Clasen
2ae8a27b4a Remove a no-op AtkAction from GtkRange
The "activate" action here did not do anything.
It is possible we actually want to have some actions here,
like "step-up", "step-down", "page-up", "page-down", etc.
For now, just remove the AtkAction implementation.
https://bugzilla.gnome.org/show_bug.cgi?id=553334
2013-02-04 00:59:14 -05:00
Matthias Clasen
f8050c90fa Update a11y test results to match
The newly added descriptions show up in the accessible
information dumps.
2013-02-04 00:57:46 -05:00
Matthias Clasen
935d458fa1 Improve AtkAction implementations
Implement get_localized_name, and also translate the strings
returned by get_description.
https://bugzilla.gnome.org/show_bug.cgi?id=525226
2013-02-04 00:57:46 -05:00
Matthias Clasen
b396e37b96 Update a11y test results to match
The new way of setting the icons in GtkMessageDialog changes
the accessible dump output slightly.
2013-02-04 00:57:44 -05:00
Matthias Clasen
594b752080 Prefer symbolic icons in message dialogs
Based on a patch in
https://bugzilla.gnome.org/show_bug.cgi?id=680048
2013-02-03 17:58:23 -05:00
William Jon McCann
b08c15d986 Prefer symbolic icons for the default message dialog image
The icon does not need high resolution or color to indicate the type
of message and the color can detract from the important part of the message.

https://bugzilla.gnome.org/show_bug.cgi?id=680048
2013-02-03 17:43:47 -05:00
Matthias Clasen
9bb25c7f95 Clarify docs of GtkTextTag -set properties a bit
https://bugzilla.gnome.org/show_bug.cgi?id=687825
2013-02-03 17:22:48 -05:00
Matthias Clasen
1e85e0f017 a11y: Set up popup-for relation between entry and completion
This may address
https://bugzilla.gnome.org/show_bug.cgi?id=658148
2013-02-03 16:32:21 -05:00
Matthias Clasen
a1de67f438 Reinstate old-style deprecation guards for wholly-deprecated files 2013-02-03 15:51:05 -05:00
Matthias Clasen
edd1c66041 Make GtkTextView deal better with !can_focus
This was pointed out in
https://bugzilla.gnome.org/show_bug.cgi?id=693050
2013-02-03 15:44:41 -05:00
Matthias Clasen
001f3219e0 More updates 2013-02-03 15:23:48 -05:00
Matthias Clasen
377997f704 Make GtkStatusIcon survive on Broadway
Make the X11 GtkStatusIcon implementation deal with
multiple backends.

https://bugzilla.gnome.org/show_bug.cgi?id=693066
2013-02-02 20:42:28 -05:00
Cosimo Cecchi
8099f864c3 scrolled-window: fix an incorrect gtk-doc comment 2013-02-02 14:08:14 +01:00
Yaron Shahrabani
bed3193e13 Updated Hebrew translation. 2013-02-02 15:05:57 +02:00
Matthias Clasen
d559ed0ce9 Don't build native tools when not cross-compiling
This was my local native build to fail.
2013-02-01 23:53:59 -05:00
Matthias Clasen
717c28e12d Revert "Don't use AC_CANONICAL_TARGET"
This reverts commit cd98eb15cb.

It turns out that we just started using AX_PROG_CC_FOR_BUILD, which
for some reason requires AC_CANONICAL_TARGET. That seems wrong to
me, but for now, lets just keep using it.
2013-02-01 23:36:00 -05:00
Erik van Pienbroek
9a1235bf0d Don't build gtk-launch when gio-unix is not available
https://bugzilla.gnome.org/show_bug.cgi?id=682824
2013-02-01 23:08:03 -05:00
Jan Arne Petersen
e335a3fd31 wayland: Add global_remove handler
Do not crash on wl_registry.global_remove events anymore.

https://bugzilla.gnome.org/show_bug.cgi?id=692899
2013-02-01 23:04:16 -05:00
Jan Arne Petersen
e437016a65 wayland: Make GdkWaylandDevice public
Rename GdkDeviceCore to GdkWaylandDevice and export it properly in a
header file. Add public accessors for wl_seat, wl_pointer and
wl_keyboard.

https://bugzilla.gnome.org/show_bug.cgi?id=692823
2013-02-01 23:03:17 -05:00
Jan Arne Petersen
363eea659c wayland: Rename GdkWaylandDevice
Rename GdkWaylandDevice to GdkWaylandDeviceData so that GdkDeviceCore
can be renamed to GdkWaylandDevice.

https://bugzilla.gnome.org/show_bug.cgi?id=692823
2013-02-01 23:03:15 -05:00
Jan Arne Petersen
ac3a50bfe6 wayland: Remove unused, commented out code
https://bugzilla.gnome.org/show_bug.cgi?id=692823
2013-02-01 23:03:12 -05:00
Erik van Pienbroek
3493814ead Only build native-update-icon-cache when no external update-icon-cache binary was found
https://bugzilla.gnome.org/show_bug.cgi?id=692637
2013-02-01 23:01:40 -05:00
Erik van Pienbroek
cd98eb15cb Don't use AC_CANONICAL_TARGET
This autoconf macro should only be used for building compilers
(or compiler tools) for a specific target. The current effect of
it in GTK3 is that it causes various executables like gtk3-demo
to be prefixed with $target- when the --target configure flag
is set or when cross-compiling. When cross-compiling GTK3 on
Linux for the Win32 target this causes the gtk3-demo binary
to be named i686-w64-mingw32-gtk3-demo.exe instead of just
gtk3-demo.exe (like it was before commit 53083ea7b4)

https://bugzilla.gnome.org/show_bug.cgi?id=692638
2013-02-01 22:59:49 -05:00
Cosimo Cecchi
ad70142d2c scrolledwindow: deprecate gtk_scrolled_window_add_with_viewport()
https://bugzilla.gnome.org/show_bug.cgi?id=693015
2013-02-01 22:58:55 -05:00
Cosimo Cecchi
ce869921ab Don't use gtk_scrolled_window_add_with_viewport() in tests
https://bugzilla.gnome.org/show_bug.cgi?id=693015
2013-02-01 22:58:55 -05:00
Cosimo Cecchi
7c1c7cb728 Don't use gtk_scrolled_window_add_with_viewport() internally
Just use gtk_container_add() instead.

https://bugzilla.gnome.org/show_bug.cgi?id=693015
2013-02-01 22:58:54 -05:00
Cosimo Cecchi
9efa28591c scrolledwindow: make gtk_scrolled_window_add() smart
There's really no reason why we shouldn't automatically create a
GtkViewport when the widget added to GtkScrolledWindow is not a
GtkScrollable, instead of just printing a g_warning.
Copy the viewport special case into the scrolled window implementation
of gtk_container_add().

https://bugzilla.gnome.org/show_bug.cgi?id=693015
2013-02-01 22:58:53 -05:00
Matthias Clasen
5f41eb74a5 Fix a few parameter mismatches in the symbols 2013-02-01 22:54:21 -05:00
Matthias Clasen
48777cb656 Make new state flags show up in the docs 2013-02-01 22:54:21 -05:00
Matthias Clasen
3aa43f0f17 Add new symbols 2013-02-01 22:54:20 -05:00
Matthias Clasen
261ef5b383 Add new symbols to docs 2013-02-01 22:54:20 -05:00
Matthias Clasen
fae1da8ec9 Include gtklevelbaraccessible.h in gtk-a11y.h 2013-02-01 22:54:20 -05:00
Matthias Clasen
09dc62050f Add new fullscreen symbols 2013-02-01 22:54:19 -05:00
Gheyret Kenji
96708eb8ad Updated Uyghur translation
Signed-off-by: Gheyret Kenji <gheyret@gmail.com>
2013-02-02 12:15:17 +09:00
Matthias Clasen
ab71224021 Use consistent capitalization of demo titles 2013-02-01 21:59:09 -05:00
Matthias Clasen
5271ea34d1 Avoid perl warnings
Apparently, defined is not cool anymore.
2013-02-01 21:58:34 -05:00
Matthias Clasen
e975f10c7f Make the text look a bit nicer
Add a margin around the text, and some space between the title
and the body of the info tab.
2013-02-01 21:56:25 -05:00
Matthias Clasen
ee6e7d6433 Set the notebook to be scrollable
The pixbufs example has just too many files..
2013-02-01 21:46:07 -05:00
Matthias Clasen
f9b79f2095 Updates for 3.7.8 2013-02-01 21:38:40 -05:00
Matthias Clasen
d1f9adad08 Revert "Forgotten file"
This reverts commit 1d72682332.
2013-02-01 20:17:53 -05:00
Matthias Clasen
cf1eecca6b Don't strip whitespace from ui files
That turns them into gibberish when we show them in the ui.
2013-02-01 20:17:13 -05:00
Benjamin Otte
e6b3cbe7d2 cssimage: Only load image data when needed
Saves ~6MB of memory per application in the Adwaita I am using - at
least until the app starts using all the images in the theme, because
the code doesn't discard images yet once they were loaded.

https://bugzilla.gnome.org/show_bug.cgi?id=692934
2013-02-02 01:44:17 +01:00
Benjamin Otte
b2e1b1124f cssimage: Add a getter
This will be needed in the next commit.

https://bugzilla.gnome.org/show_bug.cgi?id=692934
2013-02-02 01:44:13 +01:00
Benjamin Otte
e3cd958e36 cssimage: Return the loaded image from compute()
This way, we don't keep the indirection when actually rendering the
image.

https://bugzilla.gnome.org/show_bug.cgi?id=692934
2013-02-02 01:43:37 +01:00
Benjamin Otte
18ca907c4c css: Split out GtkCssImageSurface
This is essentially a GtkCssImage for a cairo_surface_t and is a pretty
much straight up copy of GtkCssImageUrl. But we want to implement lazy
loading and animations, so GtkCssImageUrl is going to gain new
features...

https://bugzilla.gnome.org/show_bug.cgi?id=692934
2013-02-02 01:43:30 +01:00
Benjamin Otte
6348ded15d cssimage: Store the URI we're loaded from
I'd like to use it when printing the value, but I haven't found a way to
do that sanely yet, as I'd need to be able to print relative paths for
make check to work (otherwise the srcdir would blow things up). And we
use a GString to output to, so there's no way to attach a base dir to
that.

If anyone has an idea how to achieve that, poke me. Having the real
filename in debug prints sounds like a very good idea to me.

https://bugzilla.gnome.org/show_bug.cgi?id=692934
2013-02-02 01:42:48 +01:00
Benjamin Otte
5607a2125f gtk-demo: Fix geniclude.pl.in to not look for extra files
This was supposed to be fixed in
0866772819 but I fixed the generated
geninclude.pl. Oops.
2013-02-02 01:42:45 +01:00
Benjamin Otte
bc473257c7 gtk-demo: Replace logo with a transparent one
That way, we don't have to make it transparent in all the demos.
2013-02-01 21:57:40 +01:00
Benjamin Otte
b3d1121d78 gtk-demo: Move resources into the tests they belong
This also gets rid of the nasty @import("resource:///...") lines in the
css files.
2013-02-01 21:57:40 +01:00
Benjamin Otte
ba24f39d95 gtk-demo: Remove custom CSS demo
Custom CSS is something that we don't want to advertise as there are too
many pitfalls for using it correctly. So remove the demo for it.
2013-02-01 21:57:40 +01:00
Benjamin Otte
80fc684dd8 gtk-demo: Remove file lists from demo data
We can get it from parsing resources now, so no need to manually add
them.
2013-02-01 21:57:40 +01:00
Benjamin Otte
4e41577b46 gtk-demo: Display all resources on the right side
This way, people know what stuff we are loading.

And instead of listing all the files in the top (and forgetting things),
we just take them from the resources list.
2013-02-01 21:57:39 +01:00
Christian Kirbach
dcba7afd35 Updated German translation 2013-02-01 21:27:28 +01:00
Mike Gorse
92f0c5c384 Add accessibility for GtkLevelBar and value test 2013-02-01 11:44:15 -06:00
Benjamin Otte
f44eec0f6b gtk-demo: Stop installing files
As everything is handled via resources now, there's no need to install
the files anymore.
2013-02-01 17:44:13 +01:00
Benjamin Otte
ad69528bde gtk-demo: Remove demo_find_file() function
It's not used anymore. With it, the demo-common.h header is not needed
anymore and is removed, too (and all the needless includes).
2013-02-01 17:44:13 +01:00
Benjamin Otte
a6bf34e292 scrolledwindow: Use local variables
This (a) makes the code look nicer, and (b) works for non-scrollables
2013-02-01 17:42:45 +01:00
Benjamin Otte
75937d925c gtk-demo: Load icon from resource 2013-02-01 17:42:45 +01:00
Benjamin Otte
0866772819 gtk-demo: Display extra files from resources 2013-02-01 17:42:45 +01:00
Benjamin Otte
73e203b290 xxx: Add source files 2013-02-01 17:42:45 +01:00
Benjamin Otte
aaab99bb4d gtk-demo: Don't use subfolders for resources
This confuses the notebook that is displaying them.
2013-02-01 17:42:45 +01:00
Benjamin Otte
7acf6296f4 gtk-demo: Don't use aliases for filenames
This is necessary so the files displayed in the left notebook match the
files referenced in the source code.
2013-02-01 17:42:45 +01:00
Benjamin Otte
159dabd0a5 gtk-demo: Port pixbufs example to resources 2013-02-01 17:42:45 +01:00
Benjamin Otte
68ee7c6848 gtk-demo: Port textview example to resources 2013-02-01 17:42:45 +01:00
Benjamin Otte
d1c642d1f5 image: Make gtk_image_new_from_resource() load animations
Requires new gdk-pixbuf APIs to load animations from resources.
2013-02-01 17:42:44 +01:00
Benjamin Otte
a4749d4f3a gtk-demo: Port images example to resources 2013-02-01 17:42:44 +01:00
Benjamin Otte
32903fc753 gtk-demo: Port images example to GInputStream 2013-02-01 17:42:44 +01:00
Benjamin Otte
8bdfd35d9c gtk-demo: Port iconview example to use resources 2013-02-01 17:42:44 +01:00
Benjamin Otte
cf6a40830c gtk-demo: Port appwindow example to resources 2013-02-01 17:42:44 +01:00
Benjamin Otte
4f93194039 gtk-demo: Port builder example to resources 2013-02-01 17:42:44 +01:00
Benjamin Otte
704fc3724f gtk-demo: Make printing example use resources 2013-02-01 17:42:44 +01:00
Benjamin Otte
39d198cd5a gtk-demo: Load sources from resources 2013-02-01 17:42:43 +01:00
Benjamin Otte
a0e68bec52 gtk-demo: Load the demo files using g_file_get_contents()
... instead of massaging a FILE* with flockfile() and ungetc().
2013-02-01 17:42:43 +01:00
Benjamin Otte
05abba3acb gtk-demo: Include the source files as resources 2013-02-01 17:42:43 +01:00
Wouter Bolsterlee
c4ccfa6009 Updated Dutch translation 2013-02-01 16:47:03 +01:00
Cosimo Cecchi
eacdaf28a6 tree-view: add back gtk_style_context_set_background()
Commit ddceddaa84 removed the call to
gtk_style_context_set_background() in favour of always rendering it with
gtk_render_background() during the draw vfunc.
This has the side effect of making the backing window always
transparent, which blocks GTK from applying some optimizations during
the paint cycle. The result is that, especially in clutter-gtk
applications, scrolling performance gets really bad.

This commit partially reverts ddceddaa84
and changes the code so that both gtk_style_context_set_background() and
gtk_render_background() are called
2013-02-01 11:27:32 +01:00
Cosimo Cecchi
c4183405fe icon-view: add back gtk_style_context_set_background()
Commit da09447914 removed the call to
gtk_style_context_set_background() in favour of always rendering it with
gtk_render_background() during the draw vfunc.
This has the side effect of making the backing window always
transparent, which blocks GTK from applying some optimizations during
the paint cycle. The result is that, especially in clutter-gtk
applications, scrolling performance gets really bad.

This commit partially reverts da09447914
and changes the code so that both gtk_style_context_set_background() and
gtk_render_background() are called.
2013-02-01 11:27:14 +01:00
Torsten Schönfeld
843e5f9cb3 treednd: Remove (out) annotation for GtkSelectionData arg
gtk_tree_drag_source_drag_data_get's GtkSelectionData argument should not be
marked as (out) because:

a) GtkSelectionData is semi-private (it's declared in gtkselectionprivate.h),
and thus gobject-introspection has no knowledge of its fields or its size.
There is thus no way for language bindings to allocate GtkSelectionData.

b) Even if it was possible for language bindings to allocate GtkSelectionData,
a zeroed-out instance thus created would not be usable with
gtk_tree_drag_source_drag_data_get.  As far as I can tell, you need to
initialize its "target" member to the GdkAtom of "GTK_TREE_MODEL_ROW".
Language bindings have no way of knowing this, of course.

https://bugzilla.gnome.org/show_bug.cgi?id=692844
2013-01-31 21:36:37 +01:00
Piotr Drąg
5f1c792567 Updated Polish translation 2013-01-31 19:50:54 +01:00
Inaki Larranaga Murgoitio
2ec28c5c6f Updated Basque language 2013-01-31 12:25:49 +01:00
Daiki Ueno
7a9553cfb5 textlayout: respect preedit color attribute
gtk_text_renderer_prepare_run now checks appearance.rgba, rather than
appearance.{fg_color,bg_color}.

https://bugzilla.gnome.org/show_bug.cgi?id=692766
2013-01-31 11:22:06 +09:00
Rob Bradford
a687cbaae8 wayland: Implement gdk_window_fullscreen & gdk_window_unfullscreen 2013-01-29 18:42:44 +00:00
Alexander Larsson
9d659d8a77 Remove accidental commit that broke gtk3-demo
A piece of test code accidentally snuck into a commit that
made gtk3-demo not find its data files, this patch just
reverts that change.
2013-01-29 11:55:05 +01:00
Federico Mena Quintero
46acb933cd Remove the accept-uri-drops property
Signed-off-by: Federico Mena Quintero <federico@gnome.org>
2013-01-29 01:16:09 -06:00
Federico Mena Quintero
fafec940b3 Redo the logic for computing drop positions
Instead of having an accept_uri_drops flag, we'll always advertise as accepting URI drops.
However, we'll see if the caller actually handles the drag-action-requested signal.  If it
does, we'll indeed allow performing file operations when URIs are dropped.  Otherwise,
we'll only allow creating bookmarks from dragged URIs.

Dragging URIs directly into a places item will cause the sidebar to check if the caller
allows file operations.  Dragging URIs between places items will cause the sidebar
to create bookmarks for those URIs instead.

Signed-off-by: Federico Mena Quintero <federico@gnome.org>
2013-01-29 01:14:10 -06:00
Federico Mena Quintero
2a35574067 Whitespace cleanups 2013-01-29 01:02:57 -06:00
Jasper St. Pierre
002ac992d1 gdkdevicemanager-x11: Request XI2.3
Since XIQueryVersion, the bad API that it is, enforces the version from
the first client that requests it, for clients to be able to use the new
features in XI2.3, we need to ensure that we pass XIQueryVersion 2.3 as
the version that we support. We know that GTK+ won't be confused by the
new features.

https://bugzilla.gnome.org/show_bug.cgi?id=692467
2013-01-28 12:53:39 -05:00
Jasper St. Pierre
e340049eb8 gdkdevicemanager-x11: Always request XI2.2
The X server should fill in the minor version that it supports in the
case where it only supports the older version, so we can safely always
pass a higher version number than is potentially supported by the
server.

libXi was designed to be stable in the case where it doesn't recognize
requests or events/replies, so this should still work in a case where
we have new versions of the X server, and GTK+, but an old version of
libXi, at least for however well that setup should work.

https://bugzilla.gnome.org/show_bug.cgi?id=692467
2013-01-28 12:45:01 -05:00
Jasper St. Pierre
99828efa50 migrating-2to3: Add more words about GtkObject
Talk about replacing the various function calls of GtkObject with
GObject or GtkWidget calls.
2013-01-28 12:45:01 -05:00
Jasper St. Pierre
2397521d29 migrating-2to3: Add more words about GSEAL_ENABLE issues
As requested by Linus Torvalds, the wording here is a bit terse.
Explain more about how to fix the errors one encounters when using
GSEAL_ENABLE.

https://bugzilla.gnome.org/show_bug.cgi?id=692659
2013-01-28 12:45:01 -05:00
Matej Urbančič
142cc90927 Updated Slovenian translation 2013-01-28 15:58:53 +01:00
Matej Urbančič
f35075bccf Updated Slovenian translation 2013-01-27 22:36:03 +01:00
Matej Urbančič
68e89da010 Updated Slovenian translation 2013-01-27 22:32:07 +01:00
Rico Tzschichholz
22bad6a240 wayland: Add missing reference to gdkwaylandwindow.h
Missing bit of 01c0dd9182
2013-01-27 16:32:44 +01:00
John Lindgren
ce6b77c25b XSettingsList is now a typedef for GHashTable.
https://bugzilla.gnome.org/show_bug.cgi?id=692605
2013-01-27 01:08:25 +01:00
John Lindgren
885b43dd3a Use hash-based conversions for XSETTINGS names.
https://bugzilla.gnome.org/show_bug.cgi?id=692605
2013-01-27 01:08:25 +01:00
Matej Urbančič
63d87cac44 Updated Slovenian translation 2013-01-26 22:46:29 +01:00
Benjamin Otte
e26031e0c7 filechooser: Move saving geometry to where it belongs
Move it from the filechooserwidget to the filechooserdialog unmap
function. It was previously only working for filechooserdialogs, too.
2013-01-26 21:04:55 +01:00
Benjamin Otte
c83a7a13e1 filechooser: Move settings key defines into header
... so we can read/write those keys from different source files.
2013-01-26 21:04:55 +01:00
Benjamin Otte
af176efc0f widget: Another place to relax the visibility requirement
See commit 154204e891 for details
2013-01-26 21:04:55 +01:00
Matej Urbančič
d579b412d4 Updated Slovenian translation 2013-01-26 20:09:38 +01:00
Federico Mena Quintero
4bff4b025b Reset the treeview drag dest row if the drop is not possible
This keeps the drop indicator line from 'sticking' if you drag a bookmark above
the Bookmarks heading.

Signed-off-by: Federico Mena Quintero <federico@gnome.org>
2013-01-25 18:01:42 -06:00
Daniel Martinez
18938b7fcf Added Aragonese to LINGUAS file 2013-01-25 17:55:43 +01:00
Jorge Pérez Pérez
19af1f2682 Added Aragonese UI translation 2013-01-25 17:53:05 +01:00
Nilamdyuti Goswami
bce43b3dae Assamese translation updated 2013-01-25 18:23:58 +05:30
Olivier Fourdan
7d9751130c tests: add a test for fullscreen mode
https://bugzilla.gnome.org/show_bug.cgi?id=691856
2013-01-25 13:16:57 +01:00
Olivier Fourdan
dac6a76ef2 x11: implement gdk_window_apply_fullscreen_mode()
for the X11 backend using the EWMH mechanism
_NET_WM_FULLSCREEN_MONITORS.

https://bugzilla.gnome.org/show_bug.cgi?id=691856
2013-01-25 13:16:57 +01:00
Olivier Fourdan
54dc823d67 gdk: add gdk_window_set_fullscreen_mode()
and gdk_window_get_fullscreen_mode() API to allow
applications to specify if a fullscreen window should
span across all monitors in a multi-monitor setup or
remain on the current monitor where the window is
placed.

Fullscreen mode can be either GDK_FULLSCREEN_ON_ALL_MONITORS
or GDK_FULLSCREEN_ON_CURRENT_MONITOR.

https://bugzilla.gnome.org/show_bug.cgi?id=691856
2013-01-25 13:16:56 +01:00
Federico Mena Quintero
f3fb51e96b Remove TODO items that are done 2013-01-24 18:46:07 -06:00
Federico Mena Quintero
e57de53108 GtkFileChooser: Remove the last remains of the last_folder_uri logic
This is akin to commit cfb09e5654 in the gtk-2-24 branch;
the last_folder_uri is no longer being used for anything meaningful, so we
remove it altogether.

Signed-off-by: Federico Mena Quintero <federico@gnome.org>
2013-01-24 18:07:03 -06:00
Matthias Clasen
2d479ee5cc Forgotten file 2013-01-24 17:54:41 -05:00
Jasper St. Pierre
cca05d1dc8 Add git.mk to more places 2013-01-24 17:47:34 -05:00
Jasper St. Pierre
d2919c1c89 Update git.mk 2013-01-24 17:47:34 -05:00
Jasper St. Pierre
86f024ba0d gtkimage: Add GtkImage::resource property
This is designed for GtkBuilder scenarios:

    <object class="GtkImage" id="blah">
        <property name="resource">/org/myapp/blah.png</property>
    </object>

https://bugzilla.gnome.org/show_bug.cgi?id=692481
2013-01-24 17:47:34 -05:00
Gabor Kelemen
c1aeab0859 Updated Hungarian translation 2013-01-24 23:22:28 +01:00
Daniel Mustieles
e2b60f2997 Updated Spanish translation 2013-01-24 16:31:58 +01:00
Benjamin Otte
154204e891 widget: Allow invisible toplevels to do sizing operations
This is a quickfix to keep things working.

It turns out GtkWindow assumes it can do sizing operations while not
being visible, or while in the process of show()ing/hide()ing itself.
And commit b495ce54 broke these operations.

Figuring this properly requires some more thinking and restructuring on
my part, so for now we relax the requirement of visiblility enough for
these things to start working again.
2013-01-24 14:28:58 +01:00
Benjamin Otte
78d91aaf9b filechooser: Attach GSettings object to GtkSettings
... instead of keeping one per GtkFileChooserDefault. This allows using
it in other places, too.
2013-01-24 14:28:58 +01:00
Benjamin Otte
b112a85395 filechooser: Use macros
Thanks for not letting me catch that place when I was greeping...
2013-01-24 14:28:57 +01:00
Matthias Clasen
a38309474d Make formatting of configure options consistent
Some options had double [], which can be avoided by
judicious use of opt="plain" attributes.
2013-01-24 06:31:07 -05:00
Matthias Clasen
cbb719822a Add some more Broadway documentation
Among other things, introduce a broadwayd man page.
2013-01-24 06:24:07 -05:00
Jan Arne Petersen
01c0dd9182 wayland: Make GdkWaylandWindow public
Allows to access Wayland specific window information like wl_surface and
wl_shell_surface.

Add gdk_wayland_window_get_wl_surface for getting the Wayland wl_surface
and gdk_wayland_window_get_wl_shell_surface for getting the Wayland
wl_shell_surface.
2013-01-23 22:26:27 +01:00
Jan Arne Petersen
2b9f0b4817 wayland: Make GdkWaylandDisplay public
Allows to access Wayland specific display information like wl_display
etc.

Add gdk_wayland_display_get_wl_display for getting the Wayland
wl_display.
2013-01-23 22:26:27 +01:00
Matthias Clasen
db986ddc4f color chooser: give GSettings schema a path
The code is always instantiating this schema at a fixed location, so why
is it relocatable?

Add a path so that it shows up properly in dconf-editor, and from the
gsettings commandline tool.
2013-01-23 07:48:26 -05:00
Ryan Lortie
dc8b67de92 file chooser: give GSettings schema a path
The code is always instantiating this schema at a fixed location, so why
is it relocatable?

Add a path so that it shows up properly in dconf-editor, and from the
gsettings commandline tool.

https://bugzilla.gnome.org/show_bug.cgi?id=692163
2013-01-23 07:46:05 -05:00
Chun-wei Fan
9bdc970f8d gtk/gtktreeview: Avoid a C99ism
Declare a variable at the top of the block
2013-01-23 14:49:50 +08:00
Chun-wei Fan
131a68259e Visual C++ property sheets: Update "install" phase
Now that some headers were introduced/deprecated, and that the a11y APIs
became public, install the headers as needed.
2013-01-23 14:41:23 +08:00
Chun-wei Fan
879367ca43 Update config.h.win32.in
Make its preconfigured entries match the ones asked in config.h.in
2013-01-23 14:14:05 +08:00
Chun-wei Fan
82e12cbf24 Visual C++ 2010 solution: cosmetics
...for consistency reasons and ease when we provide build support for
Visual Studio 2012
2013-01-23 14:06:14 +08:00
Chun-wei Fan
dd3ff6187f Prepare Visual Studio 2010 projects for Visual Studio 2012
This adds a PlatformToolset tag in the project configs so that we can
provide support for Visual Studio 2012 with relative ease as the format
of the VS 2012 projects are only slightly different from their VS 2010
counterparts.

We can then use a script like the one used in GLib[1] to copy the VS2010
projects and replace the necessary tags to create the VS2012 projects.
This also cleans up the projects and property sheets, as there were some
unwanted/unneeded entries in them.

[1]: http://git.gnome.org/browse/glib/commit/?id=76cecf061b377d30e5422cdddb1fb9d19c52421d
2013-01-23 14:03:30 +08:00
Chun-wei Fan
ecf2a9471b Visual C++: Update gtka11y projects completion
-Rename the "libgail" projects to gtka11y, for consistency with the
 autotools builds
-Update the projects completion in gtk/a11y/Makefile.am, as the sources are
 now listed under $(libgtka11y_la_SOURCES) instead of $(libgail_la_SOURCES)
2013-01-23 13:56:11 +08:00
Enrico Nicoletto
8c5762bbf0 Updated Brazilian Portuguese translation 2013-01-23 00:21:48 -02:00
Enrico Nicoletto
91b17c269d Updated Brazilian Portuguese translation 2013-01-23 00:21:31 -02:00
Rob Bradford
2d676f32b1 wayland: Handle the keymap being needed before we know about seats
In the Wayland backend implementation for gdk_display_get_keymap we enumerate
the known devices and look for an core keyboard device. These device objects
are created when we receive the capabilities for the seat. The seat
capabilities may be received after a request for the keymap so we handle this
by creating a temporary keymap which we then free later when we have the real
one.
2013-01-22 19:12:29 +00:00
Piotr Drąg
c752cfe6a5 Updated Polish translation 2013-01-22 16:28:21 +01:00
Federico Mena Quintero
fc9489f381 Use GFile in the DnD signals instead of URIs
The rest of the public API works in terms of GFile, so remove this last remnant
of passing URIs around.

Signed-off-by: Federico Mena Quintero <federico@gnome.org>
2013-01-21 17:59:44 -06:00
Cosimo Cecchi
2d820defef applicationwindow: fix mem leak
In the error path, code is leaking a ref to a GVariant.

https://bugzilla.gnome.org/show_bug.cgi?id=692203
2013-01-21 18:47:34 -05:00
Cosimo Cecchi
a8f3465181 Add some missing annotations 2013-01-21 18:23:25 -05:00
Cosimo Cecchi
21a07a5760 Add GObject properties and C getters 2013-01-21 18:21:00 -05:00
Cosimo Cecchi
742a2f11a9 Remove useless style_set override 2013-01-21 18:04:14 -05:00
Cosimo Cecchi
f5b91b9176 Update TODO 2013-01-21 17:49:58 -05:00
Cosimo Cecchi
f59a618db9 Apply custom names to XDG dirs if possible
And make it possible to rename them
2013-01-21 17:49:01 -05:00
Cosimo Cecchi
03f220e4c2 Don't add built-in bookmarks twice 2013-01-21 17:49:01 -05:00
Cosimo Cecchi
35a56ba987 Add API to GtkBookmarksManager for built-in bookmarks
I.e. those that are added automatically from XDG dirs.
2013-01-21 17:32:02 -05:00
Cosimo Cecchi
aafd97be83 Mark a function as static 2013-01-21 17:12:48 -05:00
Cosimo Cecchi
7fa38fd6fb Use g_clear_object() 2013-01-21 17:07:12 -05:00
Cosimo Cecchi
a97a5d3049 Don't unconditionally unref potentially NULL objects
We already have != NULL checks here, so fold the unrefs inside.
2013-01-21 17:06:42 -05:00
Cosimo Cecchi
0523b2f719 Avoid an useless ref/unref
The GMount will be kept alive by the async operation itself.
2013-01-21 17:00:50 -05:00
Cosimo Cecchi
ceb631b60f Fix a FIXME about using symbolic icons
Use g_file_info_get_symbolic_icon() for it.
2013-01-21 16:57:27 -05:00
Cosimo Cecchi
2cf8970f91 Sync from Nautilus commit 463e8d1b1922474e4cf591a3029ea813804bd3e7
make sure to always notify when unmounting
2013-01-21 16:48:52 -05:00
Cosimo Cecchi
eea192adaa Sync from Nautilus commit 480b1daf8814063f348d0f75082353a2f6a3eab3
cancel the hostnamed proxy creation on dispose
2013-01-21 16:38:23 -05:00
Federico Mena Quintero
7d30e601de GtkFileChooserDefault: Don't use Backspace anymore to to to the parent folder
This is for consistency with Nautilus.

https://bugzilla.gnome.org/show_bug.cgi?id=692188
Signed-off-by: Federico Mena Quintero <federico@gnome.org>
2013-01-21 13:33:43 -06:00
Matthias Clasen
b12d7dfcd6 Plug two memory leak
g_resources_lookup_data returns a GBytes that must be unreffed.
2013-01-20 23:11:24 -05:00
Kouhei Sutou
a9ba4488bd Add missing $(EXEEXT) for gtk-query-immodules-3.0
https://bugzilla.gnome.org/show_bug.cgi?id=692076
2013-01-20 22:24:34 -05:00
Kouhei Sutou
ce15472955 Add missing $(EXEEXT)
https://bugzilla.gnome.org/show_bug.cgi?id=692073
2013-01-20 22:23:20 -05:00
Matthias Clasen
88ed5af5e4 Use g_signal_connect_object for adjustments in GtkSpinButtonAccessible
An instance of GtkAdjustment may be used by another instance after
the spin button widget is destroyed. In that case, the function
gtk_spin_button_accessible_value_changed() will be called with an
invalid argument. This situation is often caused when one use
GtkCellRendererSpin widget. To avoid invalid call of the function,
the signal handler for the "value-changed" signal should be disconnected
when the spin-button widget is destroyed.
Using g_signal_connect_object achieves just that.
https://bugzilla.gnome.org/show_bug.cgi?id=691592
2013-01-20 22:16:47 -05:00
Cole Robinson
cbce906228 widget: Add annotation (allow-none) for set_tooltip_text
https://bugzilla.gnome.org/show_bug.cgi?id=691639
2013-01-20 22:03:49 -05:00
William Jon McCann
c7169e119e Add optional single click activation mode for icon view
https://bugzilla.gnome.org/show_bug.cgi?id=345023
2013-01-20 16:49:30 -05:00
William Jon McCann
a84f244dc0 Add a simple test for activate on single click
https://bugzilla.gnome.org/show_bug.cgi?id=345023
2013-01-20 16:49:30 -05:00
William Jon McCann
dcc412c88e Add an optional single click activation mode to treeview
https://bugzilla.gnome.org/show_bug.cgi?id=345023
2013-01-20 16:49:30 -05:00
Piotr Drąg
85d1dbcc0a Updated POTFILES.skip 2013-01-20 21:39:39 +01:00
Daniel Mustieles
5845b269b5 Updated Spanish translation 2013-01-20 21:13:14 +01:00
Benjamin Otte
96d4eb5411 reftests: Add a reftest for width-chars not shrinking the allocation
width-chars and max-width chars should (and do) only change the
requested sizes, not the allocated size of the label.

This came out of an IRC discussion, so no bug.
2013-01-20 20:25:58 +01:00
Daniel Mustieles
d887c54172 Updated Spanish translation 2013-01-20 12:05:50 +01:00
Мирослав Николић
7614bf3ced Updated Serbian translation 2013-01-19 11:32:13 +01:00
Мирослав Николић
e5ff670475 Updated Serbian translation 2013-01-19 11:24:38 +01:00
Piotr Drąg
36b090d0c0 Updated POTFILES.skip 2013-01-19 04:40:10 +01:00
Federico Mena Quintero
26a5391caa Add some missing docs for GtkPlacesSidebar
Signed-off-by: Federico Mena Quintero <federico@gnome.org>
2013-01-18 20:05:00 -06:00
Federico Mena Quintero
223a30d1b9 Add GtkPlacesSidebar to the gtk-doc machinery 2013-01-18 17:52:10 -06:00
Federico Mena Quintero
52d07c9148 Add toplevel docs for the sidebar
Signed-off-by: Federico Mena Quintero <federico@gnome.org>
2013-01-18 17:18:25 -06:00
Bastien Nocera
ed3eaf6e50 gdk: Fix typo in gdkkeysyms-update.pl
s/Authos/Author
2013-01-18 17:26:28 +01:00
Rob Bradford
d4a9863e19 wayland: Drop code to use cairo-gl for rendering
The APIs that this code relied upon were removed in Wayland 1.0 and as such
this code has been broken since then.
2013-01-18 08:56:47 +00:00
Rob Bradford
46cc2d825e wayland: Drop build configuration support for cairo-gl
The underlying code uses API that is no longer available with 1.0. This
optional, off by default build mode hasn't worked since the release of
Wayland 1.0.
2013-01-18 08:56:47 +00:00
John Lindgren
bb10561450 More or less revert 91949934 which broke the regression test for bug #111500.
https://bugzilla.gnome.org/show_bug.cgi?id=691842
2013-01-18 01:30:16 +01:00
Duarte Loreto
f8f5ba3353 Updated Portuguese translation and converted to New Spelling (Novo AO) 2013-01-17 23:18:26 +00:00
Duarte Loreto
ba1e27d13a Updated Portuguese translation and converted to New Spelling (Novo AO) 2013-01-17 23:14:26 +00:00
Benjamin Otte
e84ed710a2 window: allocation x/y is 0,0
This was incorrect in 97ba4b1b8e.
2013-01-17 20:56:31 +01:00
Sébastien Wilmet
2c3b9a89a9 iconhelper: small code simplification
https://bugzilla.gnome.org/show_bug.cgi?id=687025
2013-01-17 16:21:18 +01:00
Kristian Rietveld
1d410ec960 quartz: retain content view when switching over toplevel.
(cherry picked from commit 184407309f)
2013-01-17 14:45:33 +01:00
Kristian Rietveld
ce7d29aa89 quartz: Make sure the old toplevel is closed on recreation
(cherry picked from commit 30deba453a)
2013-01-17 14:45:07 +01:00
Kristian Rietveld
b4b42ba54d quartz: make sure all old properties are set on the new toplevel
Apply patch by Paul Davies; part of bug 669808.
(cherry picked from commit a8008b796f)
2013-01-17 14:43:15 +01:00
Kristian Rietveld
5162751f6c quartz: ensure window being (un)fullscreened is visible
Patch by Paul Davis; part of bug 669808.
(cherry picked from commit 62f1d871b7)
2013-01-17 14:40:30 +01:00
Michael Natterer
c1e0317824 quartz: merge the clipboard storing code from gtk-2-24 2013-01-17 13:16:02 +01:00
John Lindgren
11e78d9d9f docs: Update docs for recent treeviewcolumn changes 2013-01-17 02:24:15 +01:00
Benjamin Otte
104be175fc docs: Don't mark up numbers 2013-01-17 02:12:44 +01:00
Benjamin Otte
bef1a5d720 reftests: Add reftest for latest warning fix 2013-01-17 00:45:33 +01:00
Carl-Anton Ingmarsson
b5887bd26e treeviewcolumn: always hide button widget if the header is not shown
Fixes the following warning from appearing:
Gtk-WARNING **: GtkTreeView 0xb44010 is mapped but visible child
GtkButton 0xad9320 is not mapped
2013-01-17 00:45:33 +01:00
Carlos Garnacho
3210cd6511 gdk: strengthen touch crossing event synthesizing on programmatical crossings
There are cases where crossing events aren't generated by input devices themselves
but rather through programmatical means (windows being moved/hidden/destroyed while
the pointer is on top).

Those events come from X as sourceid=deviceid, and GDK does its deal at lessening
this by setting a meaningful source device on such events, although this caused
some confusion on the mechanism to block/synthesize touch crossing events that
could possibly cause bogus enter events on the new window below the pointer.

Fixes https://bugzilla.gnome.org/show_bug.cgi?id=691572
2013-01-15 17:48:56 +01:00
Benjamin Otte
a763738f15 cssvalue: Remove NULL check
The value cannot ever be NULL here.
2013-01-15 15:33:53 +01:00
Benjamin Otte
301e22121a cssvalue: Move value initialization
Makes it easier to track places where tha value is not initialized.
2013-01-15 15:31:59 +01:00
Benjamin Otte
b60478bb49 cssvalue: Fix return_if_fail() calls... 2013-01-15 15:29:23 +01:00
Benjamin Otte
993e3f715f cssvalue: Remove useless call 2013-01-15 15:24:04 +01:00
John Lindgren
0050d469b5 Better resize of expandable columns
Since 16195ad the “expand” property is always set to FALSE when a
column is resized.  This commit takes a different approach and enables
“expand” whenever the column is wide enough.  An appropriate
“fixed-width” (so that the desired width is achieved after expanding) is
calculated using equations that are explained in the code.

https://bugzilla.gnome.org/show_bug.cgi?id=691751
2013-01-15 14:41:30 +01:00
John Lindgren
6d53c2339f Use minimum/natural size semantics
Rewrites gtk_tree_view_column_request_width() and
gtk_tree_view_size_allocate_columns() to respect the minimum and natural
sizes that are already being returned by
gtk_cell_area_context_get_preferred_width().

The convoluted logic explained (not!) by this comment has been removed:
“Only update the expand value if the width of the widget has changed, or
the number of expand columns has changed, or if there are no expand
columns, or if we didn't have an size-allocation yet after the last
validated node.”  This logic seems to have been a workaround for the
“jumping” behavior fixed in 16195ad and is no longer necessary.

https://bugzilla.gnome.org/show_bug.cgi?id=691751
2013-01-15 14:41:20 +01:00
John Lindgren
9b6661a0bf Minor refactoring
No functional change, only moves a self-contained block of code out of
size_allocate_columns() to its own function.

https://bugzilla.gnome.org/show_bug.cgi?id=691751
2013-01-15 14:40:40 +01:00
John Lindgren
16195adc92 Use fixed width for resizing
Removes the hidden “resized-width” and “use-resized-width” properties
from GtkTreeViewColumn and instead uses the “fixed-width” property to
serve the same purpose.  “fixed-width”, if set, will now override the
auto-sized width (-1 is now a legal value meaning “not set”).

Additional “cleanups” in this commit:

1. When the user resizes the column the “expand” property is now also
set to FALSE, in order to prevent the column from suddenly jumping to a
different width when the window is resized.

2. The code that translated mouse movement to column sizes has been
simplified:
the change in column width is now calculated directly from the distance
the mouse cursor has traveled.  Weird behavior that might have happened
previously if the position of the column changed during resizing, is now
prevented.

3. There was some lengthy logic handling the keyboard shortcuts used to
resize treeview columns, which would call gtk_widget_error_bell() once
the minimum or maximum width was reached.  Instead of rewriting these
checks I simply set the “fixed-width” property to what was requested,
relying on the fact that it is already clamped between the minimum and
maximum width during size allocation.
I will greatly surprised if anyone notices the missing error bell.

https://bugzilla.gnome.org/show_bug.cgi?id=691751
2013-01-15 14:40:40 +01:00
John Lindgren
d0e0e48942 Kill gtk_tree_view_size_request
Splits up size_request() so that the height calculations are only done
when get_preferred_height() is called and the width calculations are
only done when get_preferred_width() is called.  Since
get_preferred_width() does not change the treeview->priv->width value,
treeview->priv->prev_width will always be equal to it and can therefore
be removed.  The only place where prev_width was used is a block in
gtk_tree_view_size_allocate().  This block seems to be adjusting the
horizontal scrollbar to account for treeview->priv->width having been
changed in size_request() and should no longer be necessary.  A similar
block immediately above it seems to already account for the width change
in size_allocate().

https://bugzilla.gnome.org/show_bug.cgi?id=691751
2013-01-15 14:40:40 +01:00
John Lindgren
9194993453 Remove extraneous size request
After “validation” (i.e., background size calculations) of some cells,
size_request() was called here to update the internally cached size of
the treeview.  Apparently not updating the sizes leads to some kind of
“inconsistency” that messes with top_row_to_dy().  In the GTK3 model for
size allocation, things are more complicated.  The treeview can’t just
go ahead and calculate its own size any more; instead it reports both a
“minimum” and a “natural” size, and it doesn’t know what size it will
actually get until size_allocate().  It may be necessary to update
top_row_to_dy() to deal with not knowing the exact size.

https://bugzilla.gnome.org/show_bug.cgi?id=691751
2013-01-15 14:40:40 +01:00
Matthias Clasen
199ecc1202 Bump version 2013-01-15 00:37:23 -05:00
Matthias Clasen
940971bd2b 3.7.6 2013-01-15 00:04:07 -05:00
Matthias Clasen
2adf1a4966 Ignore more private headers when generating docs 2013-01-15 00:03:58 -05:00
Matthias Clasen
8d81b1a4cd Don't run gtkdoc-check in make check
It fails for dubious reasons that should not cause make check
to fail, such as a few undocumented symbols.
2013-01-15 00:03:58 -05:00
Matthias Clasen
065f9529ce Remove a no-longer existing symbol 2013-01-15 00:03:58 -05:00
Matthias Clasen
cdaa6e036e Update expected output of a11y tests
The output for GtkAboutDialog changed as a result of the
Homepage -> Website string change.
2013-01-14 23:12:36 -05:00
Matthias Clasen
af805e9cb6 Remove some non-warranted checks from builder tests
These tests were making assumptions about the properties of
cell renderers outside of rendering, which we don't give any
guarantees for.
2013-01-14 23:09:40 -05:00
Benjamin Otte
cba4156ef6 scrolledwindow: Use child-visible instead of visible for scrollbars
We want to reserve space for the size of the scrollbars even when they
are not visible. And because toggling visibile to off now returns 0 for
size requests, this won't work anymore.
2013-01-14 18:13:10 +01:00
Benjamin Otte
97ba4b1b8e window: Don't use set_allocation() to store cached values
The window size can be queried on widget->window directly, no need to
store it in widget->allocation.
This change is necessary because gtk_widget_set_allcation() is now
checking invariants that assume it's called from insize
gtk_widget_size_allocate() and that wasn;t the case here.
2013-01-14 18:13:10 +01:00
Cosimo Cecchi
aa77cd6501 range: don't trim the trough rectange by the trough margin
Commit e32da246a8 made GtkRange's trough
respect the CSS margin property, but it also trimmed the box in which
the trough reacts to click events by the margin.
We still want to catch events in that area instead, and just make sure
the margin is applied when drawing (which was already implemented by
that commit).

This commit reverts the parts of
e32da246a8 that didn't involve drawing,
fixing the bug.

https://bugzilla.gnome.org/show_bug.cgi?id=691677
2013-01-14 10:20:43 -05:00
Gabor Kelemen
376e8d568e Updated Hungarian translation 2013-01-14 11:42:57 +01:00
Kjartan Maraas
e946cc52b6 Updated Norwegian bokmål translation 2013-01-14 11:18:30 +01:00
Theppitak Karoonboonyanan
8a1c1d16f6 Updated Thai translation 2013-01-14 14:25:34 +07:00
Benjamin Otte
f260affbb8 a11y: Implement get_name() instead of setting variables
This avoids a later free of this const value.
2013-01-14 00:01:44 +01:00
Benjamin Otte
1205e3b043 x11: unconst-cast result of g_get_prgname()
X doesn't like const...
2013-01-13 23:47:39 +01:00
Fran Diéguez
ced451b09a Updated Galician translations 2013-01-13 17:30:54 +01:00
Matthias Clasen
fff4c8e841 Documentation fixes
The documentation for GtkMenuButton was still referring to a
"menu" properties in several places, though it has been renamed
to "popup".
2013-01-13 08:27:20 -05:00
Matthias Clasen
974f8dfc71 Typo fix 2013-01-13 08:27:20 -05:00
Matej Urbančič
a4db4d1f88 Updated Slovenian translation 2013-01-13 11:54:16 +01:00
Duarte Loreto
a2dc30ca8b Updated Portuguese translation and converted to New Spelling (Novo AO) 2013-01-13 00:26:44 +00:00
Duarte Loreto
bc675d46f1 Updated Portuguese translation and converted to New Spelling (Novo AO) 2013-01-13 00:03:44 +00:00
Geoff Reedy
2fcbe3a9b4 x11: add missing checks that a hint is supported
Before acting on any hint that is set by the window manager we must
first check that the hint is supported by the current window manager.
Checking that a property has a value is insufficient as it may have
been set by a previous window manager which did support the hint.

https://bugzilla.gnome.org/show_bug.cgi?id=691515
2013-01-12 18:38:37 -05:00
Gheyret Kenji
246438812a Updated Uyghur translation
Signed-off-by: Gheyret Kenji <gheyret@gmail.com>
2013-01-12 15:32:50 +09:00
Alexander Shopov
88b247f0ba Updated Bulgarian translation 2013-01-12 07:11:25 +02:00
Alexander Shopov
213b82e87e Updated Bulgarian translation 2013-01-12 07:08:02 +02:00
Federico Mena Quintero
4cad0db95a Add docstrings for the signals
Signed-off-by: Federico Mena Quintero <federico@gnome.org>
2013-01-11 17:55:36 -06:00
Nilamdyuti Goswami
1aabfbaae8 Assamese translation updated 2013-01-11 21:29:02 +05:30
Federico Mena Quintero
306dcd3956 Add missing docstrings to public functions 2013-01-10 20:07:27 -06:00
Federico Mena Quintero
8a4e96f8cd Oops, removed unused icon field 2013-01-10 19:37:24 -06:00
Federico Mena Quintero
da2e081786 Make the set_location()/get_location() API consistent
We used to have set_current_location() and get_selected_location(), with confusing
semantics.  Now they are symmetric, with the exception that if set_location() is
called with a location that is not shown in the sidebar, then it will both clear
the selection in the list and make get_selection() return NULL.

Signed-off-by: Federico Mena Quintero <federico@gnome.org>
2013-01-10 18:12:15 -06:00
Alexander Larsson
ada20f475d broadway: Make /dev/shm names nicer 2013-01-10 23:59:23 +01:00
Federico Mena Quintero
0b4183234b New API, gtk_places_sidebar_set_open_flags()
This lets us handle the 'Open in new tab' and 'Open in new window' menu items
on our own, and allows callers to have less code to deal with each mode.

Signed-off-by: Federico Mena Quintero <federico@gnome.org>
2013-01-10 16:19:03 -06:00
Alexander Larsson
da8ff82df5 broadway: Make Sec-WebSocket-Origin optional
Sometimes we get no Origin in the request
2013-01-10 22:50:03 +01:00
Federico Mena Quintero
439a770efa Use GtkTrashMonitor instead of an API to set the trash state
This lets us remove two entry points, gtk_places_sidebar_set_show_trash(),
and gtk_places_sidebar_set_trash_is_full().

Signed-off-by: Federico Mena Quintero <federico@gnome.org>
2013-01-10 15:06:01 -06:00
Alexander Larsson
2e76e5a543 broadway: Allow binding http server to an ip 2013-01-10 21:38:39 +01:00
Federico Mena Quintero
ee261203cb Add a GtkTrashMonitor private API
This is analogous to NautilusTrashMonitor in that it just monitors trash:///
and is able to return the appropriate icon for the trash's current state.

Later we may want to move this utility object into GIO or something.

Signed-off-by: Federico Mena Quintero <federico@gnome.org>
2013-01-10 14:36:27 -06:00
Ross Burton
53083ea7b4 build: support cross-compilation by natively building gtk-update-icon-cache
When cross-compiling, instead of depending on a natively built GTK+ (which means
building Glib, ATK, Pango, gdk-pixbuf, libX11...) for gtk-update-icon-cache,
find the host compiler and gdk-pixbuf, and build another gtk-update-icon-cache
with that.

This uses AX_PROG_CC_FOR_BUILD from autostars to find the host compiler, and
assumes that you'd set PKG_CONFIG_FOR_BUILD to a host pkg-config binary.

https://bugzilla.gnome.org/show_bug.cgi?id=691301
2013-01-10 15:00:32 +00:00
Alexander Larsson
befde1f7de broadway: Remove leftover typedef 2013-01-10 16:00:43 +01:00
Alexander Larsson
b39cfb304a broadway: We need gio-unix for the unix domain sockets 2013-01-10 16:00:13 +01:00
Kjartan Maraas
e8f5bf0b30 Updated Norwegian bokmål translation 2013-01-10 13:42:44 +01:00
William Jon McCann
e8224d138d Use Website instead of Homepage
https://bugzilla.gnome.org/show_bug.cgi?id=691375
2013-01-08 19:45:20 -05:00
Federico Mena Quintero
ff041608ec Remove to-do items for Nautilus; they are done now 2013-01-08 16:34:15 -06:00
Alexander Larsson
5708e2bc2c broadway: Update TODO 2013-01-08 18:05:06 +01:00
Alexander Larsson
d5812de2e6 broadway: Send window size to new clients
Tell all new clients about the current (last sent) window size.
2013-01-08 18:05:06 +01:00
Alexander Larsson
35c295da89 broadway: Don't allow dragging windows above top of window
This is highly confusing and makes it impossible to get the windows
back.
2013-01-08 18:05:06 +01:00
Alexander Larsson
8e686357c4 broadway: Move window position ownership to browser
With this we always roundtrip position change to the webbrowser.
This avoids conflicts when things change from both directions (app and user).

Also, we fake configure evens when there is no web client to ensure
apps get the events.
2013-01-08 18:05:06 +01:00
Alexander Larsson
4d7b822059 broadway: Make the InputMessage type a uint32
That way we don't get any holes in the structs.
2013-01-08 18:05:06 +01:00
Alexander Larsson
f72d1a8d2b broadway: Fix gdk_broadway_server_wait_for_reply
We didn't properly queue an idle to handle the read messages so they
were never serviced in some situations.
2013-01-08 18:05:06 +01:00
Alexander Larsson
6f910e5e02 broadway: Clean up broadwayd event sending code
Use the right size and put the client serial in the right place.
2013-01-08 18:05:06 +01:00
Alexander Larsson
c83d35d1df broadway: Rewrite serials for clients
This seems right, but atm it breaks grabs.
2013-01-08 18:05:06 +01:00
Alexander Larsson
71e7912940 broadway: Remove last_serial from BroadwayReplyBase
This is not used anyway.
2013-01-08 18:05:05 +01:00
Benjamin Otte
ad723bd9a9 widget: Remove leftover debug statement
Seems we didn't hit this very often. :)
2013-01-08 16:10:30 +01:00
Benjamin Otte
b495ce5446 widget: Give some meaning to "visible"
GtkWidget::visible is required for the widget to:
- have a preferred size other than 0/0
- have a size allocated
- return other values than { -1, -1, 1, 1 } from get_allocation()

This is an experimental patch aiming to make concepts and behaviors
inside GTK more concreate. GtkWidget::visible is now essentially what
CSS does for "display: none".

Note that if you want the effect of CSS's "visibility: hidden", you'll
have to use a GtkNotebook with an empty page as the concept of reserving
space but not drawing anything isn't supported natively in GTK.
2013-01-08 14:56:02 +01:00
Benjamin Otte
9be7e3e2d8 treeviewcolumn: Show button if we're visible
Previously, we were happily working with a hidden button.
2013-01-08 14:55:41 +01:00
Benjamin Otte
da100207b3 sizerequest: Make invisible widgets return a 0x0 size. 2013-01-08 12:26:04 +01:00
Benjamin Otte
33e690a9ad tests: Don't use unicode escapes
Otherwise gcc complains that GTK isn't C99.
2013-01-08 12:24:32 +01:00
Benjamin Otte
b867970bf4 tests: return 0; from main()
So that gcc stops complaining.
2013-01-08 12:23:52 +01:00
Nicola Fontana
cd67593c9f configure.ac: fix autoreconf with automake-1.13 2013-01-07 15:28:25 +00:00
Javier Jardón
5509bf2872 docs: Use gtk-doc-check in make check 2013-01-07 15:26:03 +00:00
Kjartan Maraas
212a21026f Updated Norwegian bokmål translation 2013-01-07 11:09:13 +01:00
Benjamin Otte
8a644e4f16 stylecontext: Make font hack not crash
It's a lot uglier now, but it shouldn't crash anymore.

We must update the font description for animations, but we can't free it
on query, because some paths call gtk_style_context_get_font() twice in
a row without stopping the use of the first call. So us just creating a
new font description all the time and unreffing the old one is not a
good idea. So we just mere the new one into the old one.

https://bugzilla.gnome.org/show_bug.cgi?id=691186
2013-01-07 01:11:42 +01:00
Baurzhan Muftakhidinov
15129ae170 Updated Kazakh translation 2013-01-05 20:59:45 +06:00
Murray Cumming
7114e63cee iconhelper: treat the empty string as a NULL stock-id
https://bugzilla.gnome.org/show_bug.cgi?id=687025
2013-01-04 17:21:11 +01:00
Andrew Potter
00795e8d05 GtkApplication: properly unexport x11 menus
https://bugzilla.gnome.org/show_bug.cgi?id=688362
2013-01-04 15:50:10 +01:00
Fabian Henze
7ace438166 Fix the annotations of gtk_color_chooser_get_rgba()
https://bugzilla.gnome.org/show_bug.cgi?id=687633
2013-01-04 15:42:39 +01:00
Volker Sobek
d2c6a6bdfe docs: fix typo in gtkbuildable
https://bugzilla.gnome.org/show_bug.cgi?id=690305
2013-01-04 15:36:32 +01:00
Tristan Brindle
f48e9b1d20 Add missing annotation for gtk_combo_box_text_get_active_text()
https://bugzilla.gnome.org/show_bug.cgi?id=688140
2013-01-04 15:30:46 +01:00
Rūdolfs Mazurs
5474259dea Updated Latvian translation 2012-12-30 15:49:29 +02:00
Baurzhan Muftakhidinov
fa1dc252df Updated Kazakh translation 2012-12-29 23:41:57 +06:00
Balázs Úr
c50bcf5891 Updated Hungarian translation 2012-12-29 16:24:29 +01:00
Benjamin Otte
6b9b925add widget: Fix initial state flags for RTL 2012-12-29 02:33:14 +01:00
Benjamin Otte
3e979d911b widget: Fix state propagation code
Previously, with STATE_FLAGS_REPLACE we would unset _all_ the state
flags on children, not just the ones that do propagate. This caused the
RTL/LTR flags to get lost.
2012-12-29 02:24:27 +01:00
Benjamin Otte
b068b18c78 menu: Huh?
What was that code supposed to achieve? Why are we unsetting flags that
might be useful?
2012-12-29 02:07:09 +01:00
Benjamin Otte
cc986fdc1c widget: Remove underscore prefix from static function 2012-12-29 02:06:51 +01:00
Benjamin Otte
b39bb4400e progressbar: Store activity position as percentage
... instead of in absolute pixels.
2012-12-29 01:00:15 +01:00
Benjamin Otte
02b440b466 progressbar: Remove activity_step from private struct
It's only used locally, so use a local variable
2012-12-29 01:00:15 +01:00
Khaled Hosny
6a229fe50a Typo 2012-12-28 20:32:40 +02:00
Matthias Clasen
5adecf183b Move single-include guards inside include guards
gcc has optimizations for include guards that only work
if they are outermost in the the header.
https://bugzilla.gnome.org/show_bug.cgi?id=689810
2012-12-28 09:57:56 -05:00
Arash Mousavi
4d4b6a8658 l10n: Updated Persian translation 2012-12-28 12:05:42 +03:30
Alexander Larsson
ec45d2f8c7 broadway: Handle NULL surface in update
This happen if nothing has been drawn yet.
2012-12-27 22:56:04 +01:00
Alexander Larsson
e00bc73de8 broadway: Rename gdkbroadway-server-client.c to gdkbroadway-server.c 2012-12-27 22:56:04 +01:00
Alexander Larsson
6410a43b76 broadway: Make resize grip work again 2012-12-27 22:56:04 +01:00
Alexander Larsson
aac4a027eb broadway: Stop default mouse button handling
This makes it not possible to select the canvas objects, etc.
2012-12-27 22:56:04 +01:00
Alexander Larsson
9555478b9e broadway: Add TODO.broadway 2012-12-27 22:56:04 +01:00
Alexander Larsson
f84df03513 broadway: Move broadwayd to bin 2012-12-27 22:56:04 +01:00
Alexander Larsson
63b6c07fe0 broadway: During pointer grabs, send pointer events only to one client 2012-12-27 22:56:04 +01:00
Alexander Larsson
75ee72f2ac broadway: Make daemon side server "gdk independent". 2012-12-27 22:56:04 +01:00
Alexander Larsson
3558e655b4 broadway: Proper handling of http port and display nr 2012-12-27 22:56:04 +01:00
Alexander Larsson
59830a9001 broadway: Collect and document some TODOs 2012-12-27 22:56:04 +01:00
Alexander Larsson
329372a343 broadway: Track windows for client and kill on client exit 2012-12-27 22:56:04 +01:00
Alexander Larsson
5ee8b69418 broadway: Rename gdkbroadway-server.c to broadway-server.c
This way the broadway-*.c namespace is for the daemon and gdk* for the
gdk lib.
2012-12-27 22:56:03 +01:00
Alexander Larsson
8b9ccf4ee9 broadway: rename broadway-server to broadwayd
The "server" part is too confusing, there are to many servers around.
2012-12-27 22:56:03 +01:00
Alexander Larsson
e801d06229 broadway: Drop libbroadway.la
This is not needed anymore, its just used by the server.
2012-12-27 22:56:03 +01:00
Alexander Larsson
20b79b06ee broadway: rename broadway.[ch] to broadway-output.[ch] 2012-12-27 22:56:03 +01:00
Alexander Larsson
3005f1b844 broadway: disconnect in idle when needed
This makes the ownership cleaner
2012-12-27 22:56:03 +01:00
Alexander Larsson
fc96ef51d7 broadway: Initial version of separate broadway server
This kinda works but is very rudimentary
2012-12-27 22:56:03 +01:00
Alexander Larsson
4addb2108e broadway: Add OPs top protocol 2012-12-27 22:56:03 +01:00
Alexander Larsson
9aa36d8d0d broadway: Add enum for even types 2012-12-27 22:56:03 +01:00
Alexander Larsson
95a0c055da broadway: Break out broadway protocol in its own header 2012-12-27 22:56:03 +01:00
Matthias Clasen
58e96f6cbd docs: Restart a Deprecated section
We've accumulated enough wholly-deprecated objects again
that it makes sense to move them to their own section.
2012-12-27 12:38:43 -05:00
Matthias Clasen
6bc2a2da48 Another trivial sorting fix 2012-12-27 12:15:05 -05:00
Matthias Clasen
38963870eb Rename gtkcolorswatchaccessible.h
Call it gtkcolorswatchaccessibleprivate.h. This matches what we're
doing for non-public widget headers in gtk/.
2012-12-27 12:11:12 -05:00
Matthias Clasen
12f9b81b1e Drop separate scrollbar accessible implementation
It didn't really add anything to the range accessible implementation.
2012-12-27 12:06:23 -05:00
Matthias Clasen
9e9824a0a1 Add a test for deriving accessible implementations
This is a trivial example. Just check that we can derive
from GtkButtonAccessible, and have a GtkButton subclass
use the derived accessible implementation.
2012-12-27 12:06:22 -05:00
Matthias Clasen
d198ea6296 Install gtk-a11y.h
We add a separate gtk-a11y.h single-include header for
them. This header will work much the same as gtkx.h. It
will be installed in /usr/include/gtk-3.0/gtk, but you
have to include it separately.
2012-12-27 12:05:03 -05:00
Matthias Clasen
5fa4232404 Install a11y headers
We install the headers for the a11y implementations in
/usr/include/gtk-3.0/gtk/a11y/.
2012-12-27 12:05:02 -05:00
Matthias Clasen
c3577c66e5 Add single-include guards to a11y headers
More preparation for installing these headers.
2012-12-27 12:05:02 -05:00
Matthias Clasen
07a00d5939 Fix inter-header includes
Since we are going to install these headers soon, we need
to make their mutual includes work in the installed location
as well. Also, avoid including individual gtk headers, to
avoid trouble with single-include guards.
2012-12-27 12:04:01 -05:00
Matthias Clasen
d2944ce633 More gail removal
Rename GailMisc to GtkMiscImpl.
2012-12-27 11:27:46 -05:00
Matthias Clasen
4cd806ff0c Rename and clean up gailutil 2012-12-27 11:27:45 -05:00
Matthias Clasen
651241b685 Some renaming
Move gail.h to gtkaccessibility.h, and libgail to libgtka11y.
2012-12-27 11:27:45 -05:00
Matthias Clasen
221ac71278 Cosmetics
Replace GAIL in top comments by 'GTK+ - accessibility implementations'.
2012-12-27 11:27:44 -05:00
Matthias Clasen
e4b5e94eb9 Make accessible implementations public
This commit exposes the get_type() functions and standard
headers for accessible implementations. This makes it possible
to derive from the GTK accessible implementations without
GType magic tricks. This is necessary, because we require the
a11y type hierarchy to be parallel to the widget type hierarchy.
So, if you derive a widget and need to adjust its a11y implementation,
you have to be able to derive its accessible implementation.

This commit probably exposes more than is absolutely necessary,
it also exposes accessibles of widgets that are unlikely candidates
for deriving from.
2012-12-27 11:23:22 -05:00
Matthias Clasen
853b5e5fa2 Trivial sorting fix 2012-12-27 01:50:54 -05:00
Fran Diéguez
20c12b0570 Updated Galician translations 2012-12-24 21:55:07 +01:00
Paolo Borelli
70a5718b15 Paint GtkFrame background correctly when there is a label 2012-12-23 16:35:55 +01:00
Kjartan Maraas
4f2da634f1 Updated Norwegian bokmål translation 2012-12-22 20:52:49 +01:00
Benjamin Otte
308971cc2e roundedbox: Fix copy-paste error
y coordinates don't care about the right value, they want bottom.
2012-12-21 19:47:40 +01:00
Benjamin Otte
a70e85702f testgtk: Remove GtkAlignment usage from progressbar test
We can use gtk_widget_set_[hv]align here.
2012-12-21 19:47:40 +01:00
Cosimo Cecchi
81fa183b79 aboutdialog: ensure the credits page uses the "view" style class
Since not every theme renders a background for a GtkViewport (and
Adwaita master doesn't), ensure the grid+viewport we use to emulate a
text view here uses the "view" style class.
2012-12-21 17:55:26 +01:00
Kjartan Maraas
cd5fdc1e74 Updated Norwegian bokmål translation 2012-12-21 16:12:10 +01:00
Paolo Borelli
751a330ad8 Paint GtkFrame background
It already paints the css border, so let's make it also honor css
background. This is needed to have a box of a different color around
some widgets (e.g. latest gnome-clocks design)
2012-12-21 13:53:02 +01:00
Aurimas Černius
3dfce49032 Updated Lithuanian translation 2012-12-20 23:07:08 +02:00
Alexander Larsson
dfbabfbd6d broadway: Use SOURCE operator when scrolling 2012-12-20 00:00:16 +01:00
Alexander Larsson
9e65be6c48 broadway: Allow reconnecting to a broadway page 2012-12-20 00:00:16 +01:00
Alexander Larsson
54714cb228 broadway: Fix possible access-after-free
We need to calculate the buf pointer after the realloc.
2012-12-20 00:00:16 +01:00
Alexander Larsson
9c3cd49abd broadway: Remove separate browser windows hack
This never really worked well, we need to be able to fully handle
sizes from the client.
2012-12-20 00:00:16 +01:00
Alexander Larsson
0a808bea54 broadway: Separate out the server parts
This (shouldn't) change any behaviour, but it moves the
webserver parts to a separate file, making the broadway display file
smaller and preparing for later separating out the server to its own
process.
2012-12-20 00:00:16 +01:00
Shantha kumar
3824376afc Tamil translation updated 2012-12-19 13:22:27 +05:30
Shantha kumar
05240be589 Tamil translation updated 2012-12-19 13:22:27 +05:30
Benjamin Otte
cf712c462d combobox: Don't special-case RTL child positions anymore
If you want to get rounded corners on an hbox, instead of
  :first-child {
    border-top-left-radius: 5px;
    border-bottom-left-radius: 5px;
  }
  :last-child {
    border-top-right-radius: 5px;
    border-bottom-right-radius: 5px;
  }
you now need to write:
  :first-child, :last-child:dir(rtl) {
    border-top-left-radius: 5px;
    border-bottom-left-radius: 5px;
  }
  :last-child, :first-child:dir(rtl)
  {
    border-top-right-radius: 5px;
    border-bottom-right-radius: 5px;
  }
2012-12-18 18:25:42 +01:00
Benjamin Otte
821a675013 toolbar: Don't special-case RTL toolbar child positions anymore
If you want to get rounded corners on an hbox, instead of
  :first-child {
    border-top-left-radius: 5px;
    border-bottom-left-radius: 5px;
  }
  :last-child {
    border-top-right-radius: 5px;
    border-bottom-right-radius: 5px;
  }
you now need to write:
  :first-child, :last-child:dir(rtl) {
    border-top-left-radius: 5px;
    border-bottom-left-radius: 5px;
  }
  :last-child, :first-child:dir(rtl)
  {
    border-top-right-radius: 5px;
    border-bottom-right-radius: 5px;
  }
2012-12-18 18:25:42 +01:00
Benjamin Otte
6f86e57c4f box: Don't special-case RTL hbox child positions anymore
If you want to get rounded corners on an hbox, instead of
  :first-child {
    border-top-left-radius: 5px;
    border-bottom-left-radius: 5px;
  }
  :last-child {
    border-top-right-radius: 5px;
    border-bottom-right-radius: 5px;
  }
you now need to write:
  :first-child, :last-child:dir(rtl) {
    border-top-left-radius: 5px;
    border-bottom-left-radius: 5px;
  }
  :last-child, :first-child:dir(rtl) {
    border-top-right-radius: 5px;
    border-bottom-right-radius: 5px;
  }
2012-12-18 18:25:42 +01:00
Benjamin Otte
52768ee6ec stylecontext: Deprecate direction property
...  and the functions implementing it. Also deprecate the direction
getter on GtkThemingEngine.
2012-12-18 18:25:42 +01:00
Benjamin Otte
a73cc55e02 stylecontext: Use state flags for direction
... instead of using a custom direction member.

And with that, GtkWidget doesn't need to call
gtk_style_context_set_direction() anymore.
2012-12-18 18:25:42 +01:00
Benjamin Otte
1bf3de223a widget: Set state flags for direction 2012-12-18 18:25:42 +01:00
Benjamin Otte
f239edaf9c css: Parse and print the new state flags 2012-12-18 18:25:41 +01:00
Benjamin Otte
26186c74c6 API: Add state flags for RTL and LTR
See http://www.whatwg.org/specs/web-apps/current-work/#pseudo-classes
for the rationale.
2012-12-18 18:25:41 +01:00
Mattias Põldaru
94b65032a2 [l10n] Updated Estonian translation 2012-12-18 15:56:10 +02:00
Matej Urbančič
a612956ed5 Updated Slovenian translation 2012-12-18 08:50:17 +01:00
Matthias Clasen
8e4228bf12 bump version 2012-12-18 00:43:14 -05:00
Matthias Clasen
eecb9607a5 3.7.4 2012-12-18 00:37:25 -05:00
Matthias Clasen
33e5866b6f Update results for Unicode ellises 2012-12-18 00:14:53 -05:00
Matthias Clasen
b85ae11e0e Update for some changes to selectable/selected state handling
Since this is no longer implemented automatically in atk, some
accessibles, such as menus, loose their selectable state.
2012-12-18 00:02:09 -05:00
Matthias Clasen
f229945dab NotebookPageAccessible: Implement selectable/selected states
The automatic handling for this was removed from atk, so
we need to do it ourselves here.
2012-12-17 23:59:23 -05:00
Matthias Clasen
5bee1a994f GtkMenuItemAccessible: implement selectable/selected states
The automatic handling for this was removed in atk, so
we need to do it ourselves now.
2012-12-17 23:58:24 -05:00
Matthias Clasen
df1d331713 update_type_references: Deal with type_refs_ht being NULL
This can apparently happen, and it was breaking make check
on my system, by causing it to throw  a critical out of
g_hash_table_iter_init from here.
2012-12-17 22:45:08 -05:00
Matthias Clasen
e9aeb2fbca docs: Add an index for 3.8 api additions 2012-12-17 22:19:59 -05:00
Matthias Clasen
099a2b04a2 Fix up gtk_builder_expose_object addition
It needs an AVAILABLE_IN annotation in the header, and it
needs to be added to the symbols list.
2012-12-17 22:19:46 -05:00
Federico Mena Quintero
8dd233dfac New public function to get the selected location from menu item callbacks
Signed-off-by: Federico Mena Quintero <federico@gnome.org>
2012-12-17 20:05:23 -06:00
Michael Natterer
597dc649e1 quartz: make setting_same_owner member of GtkClipboardOwner @public
to fix the build, thanks to parafin for the patch.
(cherry picked from commit e3e055f855)
2012-12-17 22:22:21 +01:00
Benjamin Otte
5e12aafacd stylecontext: Fix gtk_style_context_set_background()
This function is just a sophisitcated optimization.

If we know the GDK window's background will be opaque, we mark it as
opaque. This is so GDK can do all the optimizations it does for opaque
windows and be fast.

This is mainly used when scrolling.

The previous code didn't get this right, in particular it didn't enforce
a transparent background when it knew the background was not opaque.
2012-12-17 17:47:20 +01:00
Benjamin Otte
4cfd1f51c0 gdk: API: constify argument
gdk_window_set_background_rgba() should take a const RGBA.
2012-12-17 17:21:07 +01:00
Benjamin Otte
f770e9ac1e menushell: Remove unused variable
Introduced in 531d0dc32a. Welcome to the
club of people not using -Werror Stéphane.
2012-12-17 17:21:07 +01:00
Stéphane Démurget
531d0dc32a gtkmenushell: Fix an endless loop on focus cycle
This is a simple fallout from sealing gtkmenushell, which only appears
when F10 or Shift-F10 is used in a submenu.

https://bugzilla.gnome.org/show_bug.cgi?id=690266
2012-12-17 16:02:54 +01:00
Nilamdyuti Goswami
ebf9b9a0e7 Assamese translation updated 2012-12-17 15:00:40 +05:30
Christian Kirbach
4e60107c30 Updated German translation (bug 690302) 2012-12-17 01:45:16 +01:00
Piotr Drąg
6e85a64cf6 Updated Polish translation 2012-12-16 03:37:09 +01:00
Federico Mena Quintero
bfa1f4ac0b Emit the populate-popup signal so the caller can spice things up
Also, we factor out the process of getting the selected item's info out of
the liststore.

Signed-off-by: Federico Mena Quintero <federico@gnome.org>
2012-12-14 21:44:50 -06:00
Federico Mena Quintero
d0d02357e0 Remove the Properties menu item
Signed-off-by: Federico Mena Quintero <federico@gnome.org>
2012-12-14 18:15:49 -06:00
Federico Mena Quintero
335ce0edc6 Remove the Empty Trash menu item
Signed-off-by: Federico Mena Quintero <federico@gnome.org>
2012-12-14 18:08:50 -06:00
Federico Mena Quintero
55927f273d Remove the multiple-tab/windows-supported APIs
We'll have the caller do these instead via the populate-popup signal.

Signed-off-by: Federico Mena Quintero <federico@gnome.org>
2012-12-14 18:04:30 -06:00
Federico Mena Quintero
fc01ce0756 Rebuild the popup menu every time it is used
We'll need to rebuild it every time for the populate-popup signal.

Signed-off-by: Federico Mena Quintero <federico@gnome.org>
2012-12-14 17:56:53 -06:00
Federico Mena Quintero
e00498fcd8 New signal populate-popup
Instead of conditionally creating contextual menu items like 'Show file properties',
we'll instead let the caller populate the popup menu, as is done for GtkEntry.

Signed-off-by: Federico Mena Quintero <federico@gnome.org>
2012-12-14 11:57:49 -06:00
Michael Natterer
343f1706bd gtk: fix scrolling in modal dialogs when event_widget is insensitive
When checking for modal grabs in gtk_main_do_event(), forward
GDK_SCROLL events to event_widget, even if it is insensitive.
2012-12-14 15:53:29 +01:00
Cosimo Cecchi
17a3325b2d cssstyleproperty: remove unused variable 2012-12-13 21:54:50 -05:00
Cosimo Cecchi
3782cf77c3 a11y: fix uninitialized variables compiler warning
The code path where we update the tooltip text property doesn't set
the state and value variables, and so doesn't need to call
notify_state_change().
Return early, and move the if block at the beginning of the function for
clarity.
2012-12-13 21:52:51 -05:00
Jasper St. Pierre
9dc4c5ce73 xi2: Abort early if we don't have a proper GDK window
This can happen in mutter or other applications that use GDK filters
but don't actually create GDK windows for everything they get events
for.

https://bugzilla.gnome.org/show_bug.cgi?id=689401
2012-12-13 10:51:38 -05:00
Alexander Larsson
444a92d6d8 IconHelper: Avoid warnings for non-existing stock ids
There are some registred stock ids like gtk-discards that have no icons,
and you could also pass a non-registred stock id. Both of these means
gtk_style_context_lookup_icon_set returns NULL, which causes
a critical in gtk_icon_set_render_icon_pixbuf.

We avoid this by just making these render as EMPTY.
2012-12-13 10:11:00 +01:00
Chun-wei Fan
656ec39c29 Bug 668239 - texts disappear when notebook switch page at zh_CN locate
In gtkimcontextime.c, use gdk_win32_window_get_impl_hwnd() to get to
the impl's existing native window instead of GDK_WINDOW_HWND() which
implicitly ensures a native window for the widget itself. This seems
to work around whatever GDK problem with native subwindows and fixes
the bug.

This is based on Michael Natterer's fix for gtk-2-24.
2012-12-13 11:03:56 +08:00
Alexander Larsson
0cb714fe62 Use GTK_RESIZE_PARENT resize_mode for GtkViewport
We used to use GTK_RESIZE_QUEUE, but that is problematic for e.g
a GtkScrolledWindow with NEVER scroll policies, as size changes
in ancestors will never get propagated to the scrolled window, causing
it to not have the correct size.

This is a slight performance hit, but in practice its not bound to be
problematic. In typical UIs there is only a single "large" GtkScrolledWindow
visible at a time, so a size requeust propagating out of such a window
will only hit the smaller amount of widgetry outside the scrolled window,
and additionally all such widgets will have their size request caches
still valid.

https://bugzilla.gnome.org/show_bug.cgi?id=690099
2012-12-12 15:03:24 +01:00
Yaron Shahrabani
4594e0fd34 Updated Hebrew translation. 2012-12-12 11:24:50 +02:00
Matthias Clasen
ea479e6bb9 Trivial whitespace fix 2012-12-11 21:30:40 -05:00
Federico Mena Quintero
42d239f6d5 Remove gtk_places_sidebar_set_show_cwd(), implement that in the file chooser
This removes more idiosyncratic API from the sidebar.

Signed-off-by: Federico Mena Quintero <federico@gnome.org>
2012-12-11 15:52:17 -06:00
Federico Mena Quintero
c4f40a92ca Remove the GError from the shortcut-related functions
See https://bugzilla.gnome.org/show_bug.cgi?id=650363#c8 and the next comment; this
argument just makes the API harder to use without real benefit.

Signed-off-by: Federico Mena Quintero <federico@gnome.org>
2012-12-11 15:29:11 -06:00
Federico Mena Quintero
72ce506cfc Rename signal location-selected to open-location
Signed-off-by: Federico Mena Quintero <federico@gnome.org>
2012-12-11 12:09:13 -06:00
Alexander Larsson
1c05915f51 overlay: Fix child window position/size on realize
We don't get an automatic queue resize on realize anymore, which
was papering over this bug where we did not set the child window
size/position at realize time.
2012-12-11 15:41:50 +01:00
John Ralls
796ae50064 Fix compilation on MacOSX Tiger
NSInteger isn't defined until MacOSX Leopard, so in the 3 files that
use it, include ../gdk/quartz/gdkquartz.h which provides a typedef when
needed.
2012-12-10 16:51:31 -08:00
Federico Mena Quintero
e4d5e66d44 Remove another to-do 2012-12-10 17:28:07 -06:00
Federico Mena Quintero
9124766d7b Implement the Search keyboard shortcut
We still lack a button to activate Search, like in Nautilus, but that will come later.

And with this, the last REMOVE_FOR_PLACES_SIDEBAR is gone!

Signed-off-by: Federico Mena Quintero <federico@gnome.org>
2012-12-10 17:26:53 -06:00
Federico Mena Quintero
bd28aad834 Remove unused code 2012-12-10 17:16:36 -06:00
Federico Mena Quintero
c1c1823634 Go back to our machinery for Recent files instead of reading recent:/// as-is
Reading recent:/// as-is is probably fine for OPEN mode.  But for SAVE mode, we want to present
a list of recent directories.  So, we go back to our old machinery for now; in the future
we'll probably just use recent:/// and extract the list of recent directories from there.

This also fixes showing the Recent item as highlighted when the file chooser starts up.

Signed-off-by: Federico Mena Quintero <federico@gnome.org>
2012-12-10 17:14:12 -06:00
Federico Mena Quintero
016dd28a9f Remove an obsolete function 2012-12-10 16:05:18 -06:00
Federico Mena Quintero
c26293eacd Implement the Alt-number quick bookmark shortcuts
Signed-off-by: Federico Mena Quintero <federico@gnome.org>
2012-12-10 16:00:42 -06:00
Federico Mena Quintero
8b0aea9f3d Implement the Desktop keyboard shortcut
Signed-off-by: Federico Mena Quintero <federico@gnome.org>
2012-12-10 14:45:18 -06:00
Federico Mena Quintero
e6ba6e7e06 Implement the Home keyboard shortcut
Signed-off-by: Federico Mena Quintero <federico@gnome.org>
2012-12-10 14:23:06 -06:00
Federico Mena Quintero
f3beff7556 Implement the 'Add to bookmarks' command as before
Signed-off-by: Federico Mena Quintero <federico@gnome.org>
2012-12-10 14:18:00 -06:00
Federico Mena Quintero
0dca40e851 Remove an obsolete function 2012-12-10 14:09:40 -06:00
Federico Mena Quintero
976672ad4b Implement the application-side shortcuts in GtkFileChooserDefault
Signed-off-by: Federico Mena Quintero <federico@gnome.org>
2012-12-10 14:06:07 -06:00
Juan Pablo Ugarte
a3e4fa3809 Added new function gtk_builder_expose_object() based on the original work by
Marco Diego Aurélio Mesquita on bug #447972
2012-12-10 14:53:53 -03:00
Alexander Larsson
d8fae21b1c css: Avoid looking up the GtkCssStyleProperty class a lot
Instead of constantly looking up the class we just stash it away in
class_init.
2012-12-10 14:49:51 +01:00
Alexander Larsson
a1ee2b7b82 css: Speed up name matching
We use the new g_type_get_type_registration_serial() so that we can
cache and properly invalidate the result of g_type_from_name().

This bumps the glib requirement to 2.35.3 to get the new function.

https://bugzilla.gnome.org/show_bug.cgi?id=689847
2012-12-10 12:57:10 +01:00
Alexander Larsson
089eafb468 css: Clean up tree_match implementations
A bunch of repeated code is broken out into the helper
gtk_css_selector_tree_match_previous().
2012-12-10 12:28:44 +01:00
Alexander Larsson
eb4667b6e1 css: Do get_change directly on the tree without matching first
Rather than first collecting matches and then getting the change
for them we do the change collection directly on the tree. This
is about twice as fast.
2012-12-10 12:11:02 +01:00
Alexander Larsson
03c626bb15 css: Factor out some of the position matching code 2012-12-10 12:11:02 +01:00
Mario Sanchez Prada
57e1e0de94 Add missing NULL-check in GtkEntryAccessible
Only call to atk_object_set_name if gtk_entry_get_icon_name() is not NULL.

https://bugzilla.gnome.org/show_bug.cgi?id=689923
2012-12-09 11:52:11 +01:00
Daniel Mustieles
fb312af979 Updated Spanish translation 2012-12-08 19:50:40 +01:00
Federico Mena Quintero
e4c70bb691 New machinery to add application-specific shortcuts
The file chooser needs them for gtk_file_chooser_add_shortcut_folder() and friends.

Signed-off-by: Federico Mena Quintero <federico@gnome.org>
2012-12-07 13:42:39 -06:00
Colin Walters
549a0af12b Fix build by un-translating org.gtk.Settings.FileChooser
At the moment, gtk+ doesn't depend on intltool, which is the program
that knows how to translate schemas.  Attempting to translate them
causes a build failure, so for now, let's leave them in en_US.

https://bugzilla.gnome.org/show_bug.cgi?id=689584
2012-12-07 14:05:58 -05:00
Timothy Arceri
f1532993eb Add summary and description to "show-hidden" key
https://bugzilla.gnome.org/show_bug.cgi?id=689584
2012-12-07 11:57:45 -06:00
Cosimo Cecchi
26ea8e710a scale: render scale mark lines with separator style class
So that the theme can distinguish them from the mark text.
2012-12-07 11:41:03 -05:00
Cosimo Cecchi
b855e91f7a build: fix some GCC warnings 2012-12-07 11:35:06 -05:00
Michael Natterer
9d31a04d12 quartz: fix crash in the recent clipboard "fix", and really fix it
We must not release the GtkClipboardOwner in pasteboardChangedOwner
becaue we don't own a reference to ourselves (NSPasteboard does).
Instead, release the owner right after setting it, transferring
ownership to NSPasteboard

Also, fix repeated setting of the same owner by keeping the
owner around in GtkCLipboard, and re-use it if "user_data"
doesn't change. To avoid clipboard_unset()ting our own contents
in the process, add an ugly "setting_same_owner" boolean to
GtkClipboardOwner, set it during re-setting the same owner,
and avoid calling clipboard_unset() from pasteboardChangedOwner
if it's TRUE.
(cherry picked from commit 4a8df7a33c)
2012-12-07 12:30:15 +01:00
Jasper St. Pierre
34318b9163 gtkcssselector: Fix build
destroy vs. free strikes again
2012-12-06 17:48:15 -05:00
Jasper St. Pierre
736ccb6ce1 gtkcssselector: Don't leak the hash table
We should probably free the memory we allocate. Sounds like a winning
strategy.
2012-12-06 17:39:09 -05:00
Alexander Larsson
4ca293e006 treeview: Don't invalidate whole tree unless needed
We currently invalidate the whole tree every time the style state
changes in the tree view. The primary reason for this is to catch
default font changes as that may affect text cell renderers. But
cell renderers could *potentially* also read other style properties
(although that seems weird and unlikely).

We handle this by invalidating only when some state that affects sizes
is changed. This includes all the font properties.
2012-12-06 22:28:11 +01:00
Alexander Larsson
fd964ca178 textview: Only clear the layout in style_update if the font actually changes 2012-12-06 21:16:19 +01:00
Alexander Larsson
6dfee46cdb css: Add _gtk_css_style_property_affects_font
This checks if a style_update affects the font.
2012-12-06 21:14:02 +01:00
Alexander Larsson
e6de45964d entry: No need to reset layouts on style_updated
With pango handling changes to the PangoLayout there now is no
style changes that can affect the layout for the entry, so we don't
have to reset the layout whenever the style is updated.
2012-12-06 19:54:05 +01:00
Alexander Larsson
bf35c2f044 GtkLabel: Rely on the new pango support for context change tracking
Now that Pango tracks changes to the context automatically there is
no need to do it manually in e.g. style-updated or direction-changed,
in fact the only case we have to care about is when we re-create
the PangoContext due to a screen change, so we only have to clear
the layouts in GtkLabel in screen-changed.

This means we're not clearing all the layouts whenever the state changes,
which happens to every widget when the window is unfocused, which helps
performance a lot.

https://bugzilla.gnome.org/show_bug.cgi?id=340066
2012-12-06 19:54:05 +01:00
Alexander Larsson
53e08b58aa Require new pango with automatic tracking of PangoContext changes
Pango 1.32.4 has a feature where any PangoLayout automatically handles
the case where a PangoContext is changed. We want to rely on this to
avoid having to clear layouts too often, so we make this a hard dep.
2012-12-06 19:54:05 +01:00
Federico Mena Quintero
19001bafaa One less to-do
Signed-off-by: Federico Mena Quintero <federico@gnome.org>
2012-12-06 12:11:30 -06:00
Benjamin Otte
9ae9649188 stylecontext: Deprecate gtk_style_context_get_font()
This is for a very simple reason: The getter is returning a const value
and the font isn't const anymore. So we need to store the font
description somewhere but we can't reuse it as it's changing all the
time (yay animations, yay inherited values). Sucks.

So keep the hack in here but deprecate the function.
2012-12-06 02:57:19 +01:00
Benjamin Otte
82a6106920 switch: Remove hack to change text size
The same effect can now be achieved via
  .switch { font-size: smaller; }
so there is no need to hardcode things.
2012-12-06 02:57:18 +01:00
Benjamin Otte
1b1f4da5c7 gtk: Query font size directly
... instead of calling gtk_style_context_get_font() and then
pango_font_description_get_size().
2012-12-06 02:57:18 +01:00
Benjamin Otte
055b5d83d5 gtk: Use gtk_style_context_get()
... instead of soon-to-be-deprecated gtk_style_context_get_font().
2012-12-06 02:57:18 +01:00
Benjamin Otte
7747910b9d gtk: Use context's font
Instead of using gtk_style_context_get_font() in
pango_context_get_metrics(), use pango_context_get_font_description().
The context contains the font description we are about to use after all.
2012-12-06 02:57:18 +01:00
Benjamin Otte
a405c9917c tests: Don't call to-be-deprecated function 2012-12-06 02:57:18 +01:00
Benjamin Otte
fbbb66ae7d aboutdialog: Add text tag to get small text
This is to get rid of gtk_widget_override_font() and
gtk_style_context_get_font().

FIXME: This should probably be done by the theme somehow?
2012-12-06 02:57:18 +01:00
Benjamin Otte
732e89e4f3 stylecontext: Always recompute font
This is necessary  because values in a GtkCssComputedValues can change
now. So if the font-size is inherited or animated, the cached value will
be outdated.

Fixes the fontchooser preview not updating.
2012-12-06 02:57:18 +01:00
Federico Mena Quintero
1681cf9b16 Remove the old shortcuts pane code from GtkFileChooserDefault
Oh, the giant void.
I stare into it
and it makes me afraid
that I've screwed up.

But I know I haven't.
Because any remaining bugs
will be yours to fix.

Not mine.

Signed-off-by: Federico Mena Quintero <federico@gnome.org>
2012-12-05 18:09:44 -06:00
Federico Mena Quintero
eecda25d64 Allow not setting a changed callback on GtkBookmarksManager 2012-12-05 18:03:54 -06:00
Federico Mena Quintero
489000ba9a Remove obsolete comment 2012-12-05 17:44:49 -06:00
Federico Mena Quintero
35866c8ac6 Sync from Nautilus commit bde2536ee72672c4cd58af7cbb3cf42a42962c21
Use ellipsis character instead of dots
2012-12-05 17:44:14 -06:00
Federico Mena Quintero
1bd5eeabb2 Sync from nautilus commit b2e8339d9f49770db0f6a523c8bf77b11d7eace3
Simplify setting eject icon

Signed-off-by: Federico Mena Quintero <federico@gnome.org>
2012-12-05 16:56:15 -06:00
Federico Mena Quintero
e7d6e788e3 Sync from nautilus commit 0177dd24a5f7f9f5302745a865eb970a35faa78c 2012-12-05 16:51:32 -06:00
Federico Mena Quintero
221095d287 Add list of pending things in GtkPlacesSidebar 2012-12-05 16:51:15 -06:00
Daniel Mustieles
f79cd24937 Updated Spanish translation 2012-12-05 20:10:39 +01:00
Daniel Mustieles
6e2dec0344 Updated Spanish translation 2012-12-05 20:10:27 +01:00
Jasper St. Pierre
7ee5e7af70 treemodelfilter: Make the constructor binding friendly
This means reffing the root in the set property implementation,
rather than in the constructor. We don't need to unref the root
on set, as it's a CONSTRUCT_ONLY property.

https://bugzilla.gnome.org/show_bug.cgi?id=680065
2012-12-05 13:43:19 -05:00
Aleksander Morgado
a61b359498 GdkBroadwayDisplay: include proper port number in error trace 2012-12-05 11:23:35 +01:00
Aleksander Morgado
4dabc8ba84 GdkBroadwayDisplay: initialize GError before using it 2012-12-05 11:23:28 +01:00
Federico Mena Quintero
6fcf8a78ef Remove comments on things that Nautilus no longer needs to do 2012-12-04 18:25:44 -06:00
Federico Mena Quintero
be492a206f Use the right signal id
Signed-off-by: Federico Mena Quintero <federico@gnome.org>
2012-12-04 18:18:32 -06:00
Federico Mena Quintero
686814e0e6 Removed unneeded signal initiated-unmount
Signed-off-by: Federico Mena Quintero <federico@gnome.org>
2012-12-04 18:09:38 -06:00
Federico Mena Quintero
d257cd0270 Oops, forgot to commit this header file.
Signed-off-by: Federico Mena Quintero <federico@gnome.org>
2012-12-04 18:08:52 -06:00
Federico Mena Quintero
b22e553095 Oops, signals returning an int must be G_SIGNAL_RUN_LAST
Signed-off-by: Federico Mena Quintero <federico@gnome.org>
2012-12-04 17:37:45 -06:00
Federico Mena Quintero
56331a4c43 Port code to add a bookmark for a volume
Signed-off-by: Federico Mena Quintero <federico@gnome.org>
2012-12-04 16:16:49 -06:00
Alexander Larsson
cd016ef8e3 Revert "Don't queue resize for hidden widgets without a size group"
This seems to break redraw of the middle pane in glade.

This reverts commit faaae520c9.
2012-12-04 21:30:04 +01:00
Alexander Larsson
d3377e9d7a Don't unnecessarily queue resize in GtkWindow.style_updated
GtkWindow always queues a resize on style updates if there is
a grip, because it may have been the grip size style properties
that changed. However, even if it *were*, and it likely wasn't
that would not affect the windows size request, so no need
to queue a resize.
2012-12-04 21:24:24 +01:00
Alexander Larsson
faaae520c9 Don't queue resize for hidden widgets without a size group
queue_resize basically tells the parent widget that it may need
to pick a different size/layout. However, for a hidden child widget
that should never be needed. It may be that the widget is in a
sizegroup that has ignore_hidden == FALSE though, so it may
affect the size group calculations.

However, if a widget is not visible and not in a size group then
its safe to avoid the resize, as the widget will be resized on
becoming visible anyway.

This avoids a lot of size allocation for hidden things like menus
and tooltips.
2012-12-04 20:16:44 +01:00
Alexander Larsson
47714f55ee css: Avoid queue_resize in _gtk_widget_style_context_invalidated
We've already emitted style_updated, and the handler for that queues
a resize if necessary.
2012-12-04 20:16:44 +01:00
Alexander Larsson
c3e9112f7f css: Avoid allocations in gtk_css_value_array_compute
Almost all array computations lead to no changes (99% in nautilus)
so we avoid the upfront allocation and delay it until we know its
needed. This drops the allocate/free from the profile.
2012-12-04 20:16:44 +01:00
Alexander Larsson
7ec33e63c0 css: Start array allocation with a better size
All computed values will compute all normal properties at least, so
we might as well allocate these upfront, which leads to a lot less
reallocations.
2012-12-04 20:16:44 +01:00
Alexander Larsson
afc1a143a4 css: Use internal return_if_fail in some commonly called code
These are internal apis, and any external issues should have been
caught by checks at public API points. We use the internal checks
here because these checks show up in a non-neglible way on profiles.
2012-12-04 20:16:44 +01:00
Alexander Larsson
5833b8495e Add internal versions of g_return_[val_]_if_fail
These are only enabled on debug=yes, so not by default
in released tarballs.
2012-12-04 20:16:44 +01:00
Rico Tzschichholz
b4767ea9da po: Fix xgettext failing on unicode strings
It is needed to use -from-code=utf-8 to override the ASCII default

Caused by ceb866dfe6
2012-12-04 20:06:19 +01:00
Benjamin Otte
85d8f3c51e reftests: Fix wrong name in test
Typo in d8306aaeb3
2012-12-04 20:02:36 +01:00
Federico Mena Quintero
10b22e0ee2 New API to set whether URI drops are accepted
The file chooser will not accept dropping URIs in a shortcut item.  However, Nautilus will,
to perform normal DnD for files.

Signed-off-by: Federico Mena Quintero <federico@gnome.org>
2012-12-04 12:57:48 -06:00
Alexander Larsson
c1e9d46c64 css: Return 0 as change for the GtkSettingsStyleProvider 2012-12-04 19:56:18 +01:00
Federico Mena Quintero
4fe86f1d10 Emit drag-perform-drop when we need the caller to do the drop action
Signed-off-by: Federico Mena Quintero <federico@gnome.org>
2012-12-04 12:52:44 -06:00
Federico Mena Quintero
221ea9d4c5 New signal drag-perform-drop
The caller is supposed to take action with the specified URIs.

Signed-off-by: Federico Mena Quintero <federico@gnome.org>
2012-12-04 12:44:46 -06:00
Federico Mena Quintero
f46b26d245 New signal drag-action-ask
We'll ask the caller to present a popup menu (or whatever) with the possible drag actions.

Signed-off-by: Federico Mena Quintero <federico@gnome.org>
2012-12-03 18:15:41 -06:00
Federico Mena Quintero
a5184c2eb1 Emit drag-action-requested and feed the result to gdk_drag_status()
Signed-off-by: Federico Mena Quintero <federico@gnome.org>
2012-12-03 17:37:11 -06:00
Federico Mena Quintero
0a2f9b7313 New signal drag-action-requested
We'll use this signal to ask the caller about what drag action to indicate
when something is being hovered on an item in the places sidebar.

Signed-off-by: Federico Mena Quintero <federico@gnome.org>
2012-12-03 17:32:10 -06:00
Federico Mena Quintero
08334f5258 Free URI lists
Signed-off-by: Federico Mena Quintero <federico@gnome.org>
2012-12-03 16:45:25 -06:00
Federico Mena Quintero
0a0eee816a Rename function for clarity
build_selection_list() -> build_uri_list()

Signed-off-by: Federico Mena Quintero <federico@gnome.org>
2012-12-03 16:41:02 -06:00
Federico Mena Quintero
e09b568b68 Remove the menu items to select recent-files or CWD
Per the gtk-devel meeting on 2012/11/29, we'll not have a UI in the file chooser dialog
to select between those modes.  Instead, we'll show that key in gtweaktool.

Signed-off-by: Federico Mena Quintero <federico@gnome.org>
2012-11-30 11:08:08 -06:00
Federico Mena Quintero
c16654bb75 Ahem, read radio menu items like I knew how to do it
Signed-off-by: Federico Mena Quintero <federico@gnome.org>
2012-11-26 20:43:23 -06:00
Federico Mena Quintero
bd9532d23f Restore the originally-selected location when dynamically updating the bookmarks
Signed-off-by: Federico Mena Quintero <federico@gnome.org>
2012-11-24 11:18:23 -06:00
Federico Mena Quintero
637bd8f2b8 Oops, actually update the internal location of the places sidebar prior to notifying the caller
This is so that the sidebar will already know the URI of the location it is showing.  When
the caller asks the sidebar to change back to the same location, the call will be idempotent.

Signed-off-by: Federico Mena Quintero <federico@gnome.org>
2012-11-24 10:59:48 -06:00
Federico Mena Quintero
b706e1b76b Highlight the currently-viewed location in the places sidebar
Signed-off-by: Federico Mena Quintero <federico@gnome.org>
2012-11-24 10:41:40 -06:00
Federico Mena Quintero
e0b30d013e Turn gtk_places_sidebar_set_current_uri() into _set_current_location()
To be consistent with the ::location-selected signal, which emits a GFile, we now also use a GFile
instead of a string URI in the inbound API.

Signed-off-by: Federico Mena Quintero <federico@gnome.org>
2012-11-24 10:41:11 -06:00
Federico Mena Quintero
fc6bfcddde Actually switch to recent:/// in its key shortcut handler
Signed-off-by: Federico Mena Quintero <federico@gnome.org>
2012-11-23 13:24:55 -06:00
Federico Mena Quintero
f623329e95 Allow switching to recent:/// even though GIO thinks it is not a native file
That URI is not a native file, and so it would not show up if local_only=TRUE.
Add a special case for it so that recent:/// can always be visited.

Signed-off-by: Federico Mena Quintero <federico@gnome.org>
2012-11-23 12:53:41 -06:00
Federico Mena Quintero
791bd3cec2 Update the widgets until all of them have been created
Signed-off-by: Federico Mena Quintero <federico@gnome.org>
2012-11-21 13:16:44 -06:00
Federico Mena Quintero
fe6814061d Add menu items to the places sidebar to configure the startup mode
Signed-off-by: Federico Mena Quintero <federico@gnome.org>
2012-11-21 13:16:43 -06:00
Federico Mena Quintero
e6b9ad404f Switch to Recent Files or $CWD at startup
Signed-off-by: Federico Mena Quintero <federico@gnome.org>
2012-11-21 13:16:43 -06:00
Federico Mena Quintero
043cac11f3 Add a new org.gtk.SettingsFileChooser startup-mode settings key
It has two possible values, 'recent' and 'cwd'.  We will use these to determine
whether to set the default starting mode, if a folder has not been pre-set,
to showing the Recent Files list or the current working directory.

Signed-off-by: Federico Mena Quintero <federico@gnome.org>
2012-11-21 13:16:41 -06:00
Federico Mena Quintero
ec9bdc6397 New way to show in the sidebar
Signed-off-by: Federico Mena Quintero <federico@gnome.org>
2012-11-20 20:04:20 -06:00
Federico Mena Quintero
5741b0e661 Note about missing empty-trash functionality when unmounting a volume.
Signed-off-by: Federico Mena Quintero <federico@gnome.org>
2012-10-29 18:57:24 -06:00
Federico Mena Quintero
26a29c7877 Fix code to unmount volumes
Signed-off-by: Federico Mena Quintero <federico@gnome.org>
2012-10-29 18:53:41 -06:00
Federico Mena Quintero
de5f5b7cef Copy code from Nautilus to mount volumes
Instead of having a nested-callback scheme (to preserve internal API compatibility),
we use a direct callback from g_volume_mount().

Signed-off-by: Federico Mena Quintero <federico@gnome.org>
2012-10-29 14:28:12 -06:00
Federico Mena Quintero
18f3c4d94c Set GTK_STYLE_CLASS_SIDEBAR on the sidebar
Signed-off-by: Federico Mena Quintero <federico@gnome.org>
2012-10-29 12:40:42 -06:00
Federico Mena Quintero
84f218aaac Remove some more comments on things that Nautilus needs to do
Signed-off-by: Federico Mena Quintero <federico@gnome.org>
2012-10-26 18:53:09 -05:00
Federico Mena Quintero
a4cd479021 Remove some notes on things that Nautilus should do but already does
Signed-off-by: Federico Mena Quintero <federico@gnome.org>
2012-10-26 13:05:56 -05:00
Federico Mena Quintero
cdefdcb4ba Add a show-file-properties signal for Nautilus to use
Signed-off-by: Federico Mena Quintero <federico@gnome.org>
2012-10-22 18:21:17 -05:00
Federico Mena Quintero
e97869a69c Note on more things that Nautilus needs to do 2012-10-22 17:53:32 -05:00
Federico Mena Quintero
61a9a46bce Present error dialogs from the places sidebar 2012-10-22 17:52:27 -05:00
Federico Mena Quintero
d02f884d22 Oops, reorder the bookmarks list correctly
Signed-off-by: Federico Mena Quintero <federico@gnome.org>
2012-10-20 14:09:34 -05:00
Federico Mena Quintero
948a7be7f7 Enable code to reorder bookmarks by dragging 2012-10-20 14:00:50 -05:00
Federico Mena Quintero
eb40a6cc68 Sync from Nautilus commit b72d57b038e50172fac2fafdc6c26660378aab34
No changes (except a whitespace fix), for we already had a copy of
special_directory_get_gicon().
2012-10-20 13:34:23 -05:00
Federico Mena Quintero
2af5ce906e Add comment about missing way to get symbolic icons for bookmarks
Nautilus got the ability to do that in commit 0ed400b9c1692e42498bff3c10780073ec137f63.
Maybe we should just copy that code to here later.
2012-10-19 12:26:40 -05:00
Cosimo Cecchi
dc40569628 Sync from Nautilus: bookmark: remove unused GIcon argument to nautilus_bookmark_new()
We always pass NULL these days.
This is from nautilus commit 7aad4a33814e6e7fae5e762882db43452a575a83
2012-10-19 12:14:21 -05:00
William Jon McCann
03119a2b5d Sync from Nautilus - Fix leaks
https://bugzilla.gnome.org/show_bug.cgi?id=683769
This is from nautilus commit a755aa27c636561a1ab41066484cf9bcc97667f9
2012-10-19 12:12:19 -05:00
Federico Mena Quintero
1dfd0e8c9b Merge master into places-sidebar to keep up with development 2012-10-19 11:35:22 -05:00
Federico Mena Quintero
4de4d6a6a7 Use symbolic icons
Signed-off-by: Federico Mena Quintero <federico@gnome.org>
2012-09-11 16:05:29 -05:00
Federico Mena Quintero
ddefb8622c I guess I can call myself a coauthor of this now
Signed-off-by: Federico Mena Quintero <federico@gnome.org>
2012-09-11 15:45:56 -05:00
Federico Mena Quintero
e3d12e8295 Add machinery for Nautilus to set up the trash state
We add a method to say whether the trash is full/empty (to use the appropriate icon),
and a signal that the sidebar can use to request that the trash be emptied when
the user selects 'Empty trash' from the context menu.

Signed-off-by: Federico Mena Quintero <federico@gnome.org>
2012-09-11 15:44:29 -05:00
Federico Mena Quintero
6868e0e239 Remove unused field
Signed-off-by: Federico Mena Quintero <federico@gnome.org>
2012-09-11 15:21:58 -05:00
Federico Mena Quintero
6ed2217eda Implement bookmark reordering, at least the core
The drag-and-drop part is missing; that still needs de-nautilus-ifying.

Signed-off-by: Federico Mena Quintero <federico@gnome.org>
2012-09-11 15:17:03 -05:00
Federico Mena Quintero
8b1eb6db99 Factor out code to find a bookmark in the list of bookmarks
Signed-off-by: Federico Mena Quintero <federico@gnome.org>
2012-09-11 15:02:01 -05:00
Federico Mena Quintero
caf659e791 Add set_show_properties and set_show_trash APIs
Currently they default to false.  This also fixes warnings with uninitialized widgets
in bookmarks_check_popup_sensitivity().

Signed-off-by: Federico Mena Quintero <federico@gnome.org>
2012-09-11 14:33:47 -05:00
Federico Mena Quintero
992602e106 Make renaming bookmarks work
Signed-off-by: Federico Mena Quintero <federico@gnome.org>
2012-09-10 15:03:13 -05:00
Federico Mena Quintero
865e8d3aa4 Make removing bookmarks work
Signed-off-by: Federico Mena Quintero <federico@gnome.org>
2012-09-10 14:43:30 -05:00
Federico Mena Quintero
f05874a1f0 If a bookmark doesn't have an explicit label, use the display name of the file
We query the file info for display name and icon synchronously.  If it becomes a problem,
we'll make it async, more in line with NautilusBookmark.

Signed-off-by: Federico Mena Quintero <federico@gnome.org>
2012-09-07 14:36:05 -05:00
Federico Mena Quintero
86c3274579 Connect to location-selected on the places sidebar, and actually switch folders\!
Signed-off-by: Federico Mena Quintero <federico@gnome.org>
2012-09-07 14:35:56 -05:00
Federico Mena Quintero
a7ea37f55d Sync with NautilusPlacesSidebar
This syncs the code up to commit 4b6abf644b from Nautilus.
This only refers to nautilus-places-sidebar.[ch].

Signed-off-by: Federico Mena Quintero <federico@gnome.org>
2012-09-07 11:11:20 -05:00
Federico Mena Quintero
abdef8aca0 Use the correct GTK_TYPE_PLACES_OPEN_MODE instead of a generic enum type
Signed-off-by: Federico Mena Quintero <federico@gnome.org>
2012-09-05 20:13:25 -05:00
Federico Mena Quintero
4fe3cd8f1e Create the places sidebar instead of the old custom treeview
Signed-off-by: Federico Mena Quintero <federico@gnome.org>
2012-09-05 19:48:16 -05:00
Federico Mena Quintero
2e9f9d2dc5 Fix compilation 2012-09-03 21:30:38 -05:00
Federico Mena Quintero
e49edba462 Add missing includes 2012-09-03 21:30:38 -05:00
Federico Mena Quintero
86c784e277 Fix compilation 2012-09-03 21:30:23 -05:00
Federico Mena Quintero
2aec19e907 #if out another bunch of stuff, to make the fucking thing compile 2012-09-03 20:56:18 -05:00
Federico Mena Quintero
c242e88a37 #if out a few things 2012-09-03 20:55:59 -05:00
Federico Mena Quintero
19ef71897d Add gtkplacessidebar.[ch] to Makefile.am and fix compilation errors
Signed-off-by: Federico Mena Quintero <federico@gnome.org>

Conflicts:
	gtk/Makefile.am
2012-09-03 20:55:52 -05:00
Federico Mena Quintero
4f9b06da56 Add a bunch of '#if DO_NOT_COMPILE' to remove nautilus-isms temporarily
This is just so that I can start compiling this file and testing it.

Signed-off-by: Federico Mena Quintero <federico@gnome.org>
2012-09-03 20:54:49 -05:00
Federico Mena Quintero
b31b7e3ed4 Remove stale code to deal with preferences
Signed-off-by: Federico Mena Quintero <federico@gnome.org>
2012-09-03 20:54:44 -05:00
Federico Mena Quintero
5661b7b991 Don't leak the bookmarks when enumerating them
Signed-off-by: Federico Mena Quintero <federico@gnome.org>
2012-09-03 20:54:40 -05:00
Federico Mena Quintero
8f786e0b12 Insert bookmarks during drag-and-drop operations
Signed-off-by: Federico Mena Quintero <federico@gnome.org>
2012-09-03 20:54:37 -05:00
Federico Mena Quintero
9de31fc317 Replacement for nautilus_get_desktop_directory()
Signed-off-by: Federico Mena Quintero <federico@gnome.org>
2012-09-03 20:54:32 -05:00
Federico Mena Quintero
2aaf82cb24 Replacement for eel_pop_up_context_menu()
Signed-off-by: Federico Mena Quintero <federico@gnome.org>
2012-09-03 20:54:28 -05:00
Federico Mena Quintero
92e1b8e31f Replace eel_gtk_menu_append_separator()
Signed-off-by: Federico Mena Quintero <federico@gnome.org>
2012-09-03 20:54:24 -05:00
Federico Mena Quintero
cbd3c6ca12 Replace eel_create_spotlight_pixbuf()
We use the normal gtk_style_context_set_state() machinery to set a
prelighted state.  Hopefully even symbolic icons will be rendered
prelighted properly.

Signed-off-by: Federico Mena Quintero <federico@gnome.org>
2012-09-03 20:54:19 -05:00
Federico Mena Quintero
f404eb41b5 Get icons for user-special directories
Signed-off-by: Federico Mena Quintero <federico@gnome.org>
2012-09-03 20:54:15 -05:00
Federico Mena Quintero
c942ed77d2 Use the correct icon for trash
Signed-off-by: Federico Mena Quintero <federico@gnome.org>
2012-09-03 20:54:11 -05:00
Federico Mena Quintero
3e26fda89b Replace an icon name with a macro
Signed-off-by: Federico Mena Quintero <federico@gnome.org>
2012-09-03 20:54:07 -05:00
Federico Mena Quintero
06a9d19f9a Don't use gtk_icon_theme_get_default(); use the screen-specific theme
Signed-off-by: Federico Mena Quintero <federico@gnome.org>
2012-09-03 20:54:03 -05:00
Federico Mena Quintero
76ec7fb005 Replacement for the NautilusIconInfo machinery
Signed-off-by: Federico Mena Quintero <federico@gnome.org>
2012-09-03 20:53:57 -05:00
Federico Mena Quintero
4759365590 New signal show-error-message
We need to ask the caller to pop up error messages for us, so it can do
it with its own conventions:  pick the right transient window, use a status
bar rather than a dialog, etc.

Signed-off-by: Federico Mena Quintero <federico@gnome.org>
2012-09-03 20:53:53 -05:00
Federico Mena Quintero
a4ac2d5958 Replacement for eel_gtk_tree_view_set_activate_on_single_click()
Signed-off-by: Federico Mena Quintero <federico@gnome.org>
2012-09-03 20:53:49 -05:00
Federico Mena Quintero
28f44a3b71 Function to set whether to show the Desktop item
It sucks to have this as an app-settable option.  Maybe we should
make this a standard GSetting thing and be done with it.

Signed-off-by: Federico Mena Quintero <federico@gnome.org>
2012-09-03 20:53:44 -05:00
Federico Mena Quintero
7be881982f Add functions to say whether multiple tabs/windows are supported
The file chooser will leave these off by default; file managers
like Nautilus will turn them on.

These control whether the places sidebar shows 'open in new tab' and similar
items in its context menu.

Signed-off-by: Federico Mena Quintero <federico@gnome.org>
2012-09-03 20:53:38 -05:00
Federico Mena Quintero
01020ccc81 Replace an icon-size macro from Nautilus 2012-09-03 20:53:33 -05:00
Federico Mena Quintero
f68609f6fe Use macros for themed icon names
Signed-off-by: Federico Mena Quintero <federico@gnome.org>
2012-09-03 20:53:29 -05:00
Federico Mena Quintero
d027b2d3b1 Tentatively accept any drags of URI lists
Don't try to decide if the URIs are acceptable / not duplicates; the
idea is to let the user bookmark whatever he pleases.

Signed-off-by: Federico Mena Quintero <federico@gnome.org>
2012-09-03 20:53:22 -05:00
Federico Mena Quintero
0f2f7ae5ee Use our own function to compute icon sizes
Signed-off-by: Federico Mena Quintero <federico@gnome.org>
2012-09-03 20:53:18 -05:00
Federico Mena Quintero
644d8e4b64 Replace nautilus_window_set_initiated_unmount() with an initiated-unmount signal
This signal just carries a boolean initiated_unmount argument, which
is meant to say True when the unmount/eject starts, and False when
the operation finishes.

We may want to rename all of this to unmount_started / stopped, etc.
I don't know if the caller needs to know about the mount_op in question,
or if it can be inferred from what the caller knows to be the current
shown location on the GtkPlacesSidebar.

Signed-off-by: Federico Mena Quintero <federico@gnome.org>
2012-09-03 20:53:11 -05:00
Federico Mena Quintero
acccb10fd7 Remove the use of NautilusWindow
Now we just need to see if we need to replace calls to
nautilus_window_set_initiated_unmount() with a signal.

Signed-off-by: Federico Mena Quintero <federico@gnome.org>
2012-09-03 20:53:07 -05:00
Federico Mena Quintero
6287ee4e8f Remove the last use of nautilus_window_slot_get_current_uri()
This is just sidebar->uri, the current URI in the sidebar.

Signed-off-by: Federico Mena Quintero <federico@gnome.org>
2012-09-03 20:53:01 -05:00
Federico Mena Quintero
c2a922bfcb Replacement for nautilus_get_home_directory_uri()
Signed-off-by: Federico Mena Quintero <federico@gnome.org>
2012-09-03 20:52:55 -05:00
Federico Mena Quintero
0bc1be008c Make the main update_places() use GtkBookmarksManager
There are still some missing pieces to get the bookmark's icon,
and *maybe* to cull the list of bookmarks based on some criteria.

Signed-off-by: Federico Mena Quintero <federico@gnome.org>
2012-09-03 20:52:51 -05:00
Federico Mena Quintero
0be8218608 Create the bookmarks manager from the places sidebar
Signed-off-by: Federico Mena Quintero <federico@gnome.org>
2012-09-03 20:52:46 -05:00
Federico Mena Quintero
b8b6d592e6 Cancel and disconnect from the bookmarks monitor when done
Signed-off-by: Federico Mena Quintero <federico@gnome.org>
2012-09-03 20:52:40 -05:00
Federico Mena Quintero
36969380b3 Read the legacy bookmarks file
Signed-off-by: Federico Mena Quintero <federico@gnome.org>
2012-09-03 20:52:27 -05:00
Federico Mena Quintero
163beca279 Remove the bookmarking bits from GtkFileSystem
Signed-off-by: Federico Mena Quintero <federico@gnome.org>

Conflicts:
	gtk/gtkfilesystem.c
2012-09-03 20:51:58 -05:00
Federico Mena Quintero
06bfe5bd43 Make GtkFileChooserButton use GtkBookmarksManager
It's unfortunate that now we have two instances of the bookmarks manager
for each GtkFileChooserButton; one for the button itself and one for the
underlying GtkFileChooserDefault.  We may refactor that in the future.

Signed-off-by: Federico Mena Quintero <federico@gnome.org>
2012-09-03 20:42:36 -05:00
Federico Mena Quintero
60f8411998 Make gtk_places_sidebar_set_current_uri() handle NULL URIs to unselect all
Signed-off-by: Federico Mena Quintero <federico@gnome.org>
2012-09-03 20:42:31 -05:00
Federico Mena Quintero
30c2fc3dc0 Make GtkFileChooserDefault use GtkBookmarksManager
It no longer uses GtkFileSystem to deal with bookmarks.

Signed-off-by: Federico Mena Quintero <federico@gnome.org>
2012-09-03 20:42:26 -05:00
Federico Mena Quintero
d0196e99e1 Split out a GtkBookmarksManager from gtkfilesystem.[ch]
We had the bookmarks machinery in GtkFileSystem for historical reasons.
Now, we'll keep this separately.  This will allow us to make the
bookmarks machinery public if needed in the future.

Signed-off-by: Federico Mena Quintero <federico@gnome.org>

Conflicts:
	gtk/Makefile.am
2012-09-03 20:42:04 -05:00
Federico Mena Quintero
91b3ad95c6 Rename NautilusShortcutsModelFilter to ShortcutsModelFilter
It's unfortunate that we need a filter model to do the DnD stuff...

Signed-off-by: Federico Mena Quintero <federico@gnome.org>
2012-09-03 20:39:02 -05:00
Federico Mena Quintero
f2d46f3991 New 'location-selected' signal
Instead of directly calling the Nautilus machinery to open locations
in tabs or windows, we emit a signal which the caller must handle.

Signed-off-by: Federico Mena Quintero <federico@gnome.org>
2012-09-03 20:38:59 -05:00
Federico Mena Quintero
5d1620f0c0 Add a GtkPlacesOpenMode enum to say how a shortcut should be opened
Nautilus lets you open things in the same tab, in a new tab, or in
a new window.  We will expose these semantics through an enum, as
part of an 'open' signal.

Signed-off-by: Federico Mena Quintero <federico@gnome.org>
2012-09-03 20:38:55 -05:00
Federico Mena Quintero
4284d74b3f Remove the 'nautilus' prefix from some constants
Signed-off-by: Federico Mena Quintero <federico@gnome.org>
2012-09-03 20:38:51 -05:00
Federico Mena Quintero
1093e1433e Add gtk_places_sidebar_set_current_uri()
And remove the code that updated the current URI automatically based
on a NautilusWindow.

Signed-off-by: Federico Mena Quintero <federico@gnome.org>
2012-09-03 20:38:42 -05:00
Federico Mena Quintero
554bb2e18a Connect to the volume monitor at the time of its creation
Signed-off-by: Federico Mena Quintero <federico@gnome.org>
2012-09-03 20:38:38 -05:00
Federico Mena Quintero
f7312ce63c Don't take a NautilusWindow argument in gtk_places_sidebar_new()
We will move the window-related initialization to ::map() or to a constructor.

Signed-off-by: Federico Mena Quintero <federico@gnome.org>
2012-09-03 20:38:34 -05:00
Federico Mena Quintero
4484d750f5 Update the top comment in gtkplacessidebar.c
Signed-off-by: Federico Mena Quintero <federico@gnome.org>
2012-09-03 20:38:28 -05:00
Federico Mena Quintero
2f9964f48c Remove unused structs
Signed-off-by: Federico Mena Quintero <federico@gnome.org>
2012-09-03 20:38:24 -05:00
Federico Mena Quintero
c64d6b0c5a Export GtkPlacesSidebar and the Class types, for subclassing
Signed-off-by: Federico Mena Quintero <federico@gnome.org>
2012-09-03 20:38:20 -05:00
Federico Mena Quintero
f8fea85f9b Remove Nautilus includes
Signed-off-by: Federico Mena Quintero <federico@gnome.org>
2012-09-03 20:38:15 -05:00
Federico Mena Quintero
660bef2ec2 Replace 'NautilusPlacesSidebar' with 'GtkPlacesSidebar'
Function names are of course of the form gtk_places_sidebar_*() now.

Signed-off-by: Federico Mena Quintero <federico@gnome.org>
2012-09-03 20:38:11 -05:00
Federico Mena Quintero
d2050e5812 Copy nautilus-places-sidebar.[ch] as gtkplacessidebar.[ch] 2012-09-03 20:38:03 -05:00
1062 changed files with 131931 additions and 86809 deletions

295
NEWS
View File

@@ -1,3 +1,298 @@
Overview of Changes in GTK+ 3.7.12
==================================
* We now support touch friendly popups on entries and text views
in place of context menus, on touch devices
* The print dialog now shows printers that are discovered
using avahi, if configured with --enable-avahi-browsing
* Bugs fixed:
650424 treeview: expander is not easily themable
674207 window: Compiler warning when not building on X11
675333 Cannot forget association in Open With dialog: program...
688956 Print dialog needs to support Bonjour broadcasting of ...
691426 get_current_desktop does not interpret property data c...
692955 GtkIconCache fails to load non-builtin icons
693995 GkColorChooserWidget crashes in select_swatch if palet...
694059 GtkTreeView accessible object:state-changed-expanded e...
694162 Memory leaks due to extra ref in gtk_ui_manager_builda...
694217 drag&drop half-broken items get stuck while dragging
694274 wayland: don't attempt to unqueue events when events a...
694302 Convert pixbuf animation demo (both copies) to GdkFram...
694395 Remove unused code
694406 Excessive amount of accessible text events when changi...
694451 Containers shouldn't special case RTL positions
694732 gdk: prevent NULL pointer access when debugging is ena...
694742 Fix possible memory leak when GlobalAlloc() fails
694924 Dead code in GtkClipboard
694925 non-expose based draw() doesn't render window background
694968 GtkIconTheme: fix failed assertion when asynchrnously ...
694990 use primary icon slot for search icon
695131 gtkbin: initialize minimum and natural size to zero fo...
Translation updates:
Brazilian Portuguese
Czech
Estonian
German
Greek
Gujarati
Lithuanian
Polish
Punjabi
Russian
Serbian
Simplified Chinese
Slovenian
Spanish
Traditional Chinese
Vietnamese
Overview of Changes in GTK+ 3.7.10
==================================
* We now support the Window Manager frame synchronization protocol draft (when
running under a WM that supports it). This means applications will throttle
their drawing cycle to what the compositor is drawing, and the compositor
will never render half-updated windows, for seamless resizing and improved
smoothness in drawing.
See https://mail.gnome.org/archives/wm-spec-list/2013-January/msg00000.html
and the articles at http://blog.fishsoup.net/ for more details.
* We now support setting an opacity to any GtkWidget, not just toplevels:
gtk_window_set_opacity has been deprecated in favor of gtk_widget_set_opacity.
* GtkIconTheme gained asynchronous loaders for GtkIconInfo objects
* GtkIconInfo has changed from being a boxed type to a GObject. This
is technically an ABI change, but basically all existing code
will keep working if its used as a boxed type, and its not
possible to instantiate GtkIconInfos outside Gtk, so this is not
expected to be a big problem.
* Bugs fixed:
590325 gtkbuilder needs a public policy about extension name
673243 GtkRadioMenuItem accelerators no longer appear
681578 gtk-demo: demo.ui is outdated
683311 Leak in GtkIconViewAccessible
685460 Add frame synchronization to GTK+
687842 Support partially transparent widgets
690247 multiple context in a immodule can't be selected
692411 Slave device tracking goes wrong when there are no GDK_DEVICE_TYPE_SLAVE
692728 wayland evet source doesn't handle poll err/hup
693251 wayland: fix the direction of scrolling
693253 wayland: remove debug message
693256 wayland: use the GdkCursorType enum information to lookup the cursor name
693257 wayland: avoid returning NULL when getting a cursor
693313 Improve tooltip support
693338 wayland: skip pointer and keyboard events without a surface
693400 gtkcellrenderertext: Sink floating entry before using as signal argument
693709 Hide recently used if it is turned off in the control center
693724 Add a gtk-recent-files-enabled GtkSetting
693802 Add async GtkIconInfo loaders
693912 wayland: look further through the hierarchy for the surface with the grab
693913 wayland: attempt to determine the possible parent surface for popups
693934 Add gdk_frame_clock_begin/end_updating()
694022 GtkViewport: annotate the adjustment args of the constructor
694075 GtkAccelLabel: Don't show "+" if there's no more keys to add
Added scroll and touch events to GtkToolPalette
* Translation updates:
Arabic
Catalan
Catalan (Valencian)
Czech
Japanese
Kazakh
Lithuanian
Malayalam
Polish
Serbian
Overview of Changes in GTK+ 3.7.8
=================================
* GtkTreeView and GtkIconView allow single-click activation
* GtkImage can be set from a resource
* GdkWaylandDisplay is now public
* gdk_window_set_fullscreen_mode: new function to let windows
be fullscreened across multiple monitors
* Bugs fixed:
345023 Single-click in treeview and iconview
687025 iconhelper: Treat empty string as NULL stock-id
691572 Touch: strengthen synthesized touch crossing events ...
691592 the signal handler "gtk_spin_button_accessible_value...
691639 introspection: gtk_widget_set_tooltip_text accepts NULL
691751 Better column resizing for GtkTreeView
691842 /TreeView/scrolling/specific/bug-111500 fails since ...
691856 Add support for _NET_WM_FULLSCREEN_MONITORS
692163 file chooser: give GSettings schema a path
692188 Backspace should not be used for navigation
692203 applicationwindow: fix mem leak
692467 x11: Add "support" for XI2.3
692481 gtkimage: Add GtkImage::resource property
692605 Optimize gdk_x11_screen_get_setting()
692659 migrating-2to3: Add more words about GSEAL_ENABLE is...
692766 textlayout: respect preedit color attribute
692844 Incorrect (out) annotation on gtk_tree_drag_source_d...
692934 Defer cairo surface creation for image URLs in CSS t...
682824 Don't build gtk-launch when gio-unix is not available
692637 Only build native-update-icon-cache when no external...
692823 GdkDeviceCore should be public as GdkWaylandDevice
692899 global_remove handler is missing
693015 Deprecate gtk_scrolled_window_add_with_viewport()
693066 GTK notification code attempts to create an X notifi...
525226 All actions' names and descriptions should be transl...
553334 gailrange exposes an action which does nothing
658148 The pop-up window in a GtkEntryCompletion lacks an a...
680048 Prefer symbolic icons for the default message dialog...
687825 weight-set in GtkCellRendererText not working
693050 GtkTextView focus handler doesn't honor can-focus pr...
* Translation updates:
Aragonese
Assamese
Basque
Brazilian Portuguese
Dutch
German
Hebrew
Hungarian
Polish
Portuguese
Serbian
Slovenian
Spanish
Uyghur
Overview of Changes in GTK+ 3.7.6
=================================
* We now use state flags for text direction: GTK_STATE_FLAG_LTR/RTL.
gtk_style_context_set_direction() has been deprecated.
* We install headers for accessible implementations of GTK+ widgets.
This makes it possible to implement accessibility for third-party
widgets by subclassing the proper GTK+ implementation. To do this,
include gtk/gtk-a11y.h.
* Invisible widgets now return a size of 0x0. This is an experimental
change that makes GtkWidget::visible essentially behave the same way
that "display: none" does in CSS. If you want the effect of CSS's
"visibility: hidden", you can use a GtkNotebook with an empty page.
* GtkFrame now draws a background.
* The Broadway backend now installs a separate server: broadwayd.
* Bug fixes:
687025 iconhelper: Treat empty string as NULL stock-id
687633 gtk_color_chooser_get_rgba: wrong annotations, broke bind...
688140 Add missing annotation for gtk_combo_box_text_get_active_...
688362 GtkApplication: Fix memory leak
689810 Include guard optimization
690305 Typo in SECTION:gtkbuildable : (thier -> their)
691186 Gtk+ 3.6.3 crashes when opening printing dialog: segfault...
691301 Better support for cross-compiling
691515 Insufficient checks for EWMH support
691677 Gtk Scale (slider) does not react in clicks outside the c...
* Translation updates:
Assamese
Bulgarian
Estonian
Galician
Hungarian
Kazakh
Latvian
Lithuanian
Norwegian bokmål
Persian
Portuguese
Slovenian
Tamil
Thai
Uyghur
Overview of Changes in GTK+ 3.7.4
=================================
* GtkBuilder now lets you refer to external objects from a ui
file if the objects have been exported with the new function
gtk_builder_expose_object()
* Font handling has been improved:
- The default font is no longer handled like a custom style sheet
that overrides everything, but as the initial value. This is the
same behavior as in web browsers.
- It is now possible to set font-family and font-size like other
CSS properties, and relative font sizes are supported. Font
sizes in CSS can be specified as numbers or with keywords
like xx-small, medium, smaller, larger,...
* GTK+ now uses proper Unicode ellipses in strings.
* The releases includes several noticable performance improvements:
- Size allocation has been optimized, by avoiding excessive
resizing in various situations.
- The performance of size groups has been improved.
- Text rendering in GtkLabel and other widgets has been optimized
to avoid excessive recreation of Pango layouts.
- Icon loading overhead was reduced by caching of GtkIconInfo.
- The CSS is now keeping a tree of selectors to speed up matchinh.
* Deprecations and removals:
- Custom CSS properties have been deprecated
- Support for color schemes has been removed
- gtk_style_provider_get_style, gtk_style_provider_get_icon_factory
- GtkGradient and GtkSymbolicColor
- All the padding style properties in menus
* Bugs closed:
132333 Can't add a palette to the dialog of a color button
371034 Doc for gtk_file_chooser_get_filename: Is the resulting path...
447972 Add a way to specify user_data sent to signals
548793 funny pattern for iterating GtkTreeModel
595615 Use proper ellipses
626499 GtkClipboard unnotified on change of OS X pasteboard owner
668239 texts disappear when notebook switch page at zh_CN locate!
677339 GTK+ 3 documentation wrong about GtkWidget scroll-event signal
680065 treemodelfilter: Make the constructor binding friendly
687065 InstallableOptions is not filtered in cups backend
687816 GtkTreeView does not draw correctly since commit aaedc7b6
688710 [PATCH] Splash screens shouldn't stay on top of all applicat...
688744 Don't use gtk_style_context_set_background() to render icon/...
688884 Typo in gtk_tree_view_set_tooltip_column documentation
689012 "Copy file's location" menu item in file chooser dialog uses...
689047 Obtain the recent files max age setting from xsettings
689081 No caching of icons
689168 Deprecate some menu style properties
689401 xi2: Abort early if we don't have a proper GDK window
689584 Add summary and description to "show-hidden" key
689847 Add fast repeated typename -> GType resolver
689923 Missing null-check in GtkEntryAccessible
690099 GtkScrolledWindow with NEVER policy don't resize with children
690266 Freeze with F10/Shift-F10 on submenus
* Translation updates:
Assamese
British English
Dutch
German
Hebrew
Polish
Slovenian
Spanish
Overview of Changes in GTK+ 3.7.2
=================================

View File

@@ -69,9 +69,27 @@ to that bug report.
Otherwise, enter a new bug report that describes the patch,
and attach the patch to that bug report.
Patches should be in unified diff form. (The -up option to GNU diff.)
Patches should be in unified diff form. (The -up option to GNU diff)
Even better are git-formatted patches. (Use git format-patch)
Release notes for 3.10
======================
* GDK has been changed to allow only a single screen per display.
Only the X11 backend had multiple screens before, and multi-screen
setups (not multi-monitor!) are very rare nowadays. If you really
need multiple X screens, open them as separate displays.
Release notes for 3.8
=====================
* GtkIconInfo has changed from being a boxed type to a GObject. This
is technically an ABI change, but basically all existing code
will keep working if its used as a boxed type, and its not
possible to instantiate GtkIconInfos outside Gtk, so this is not
expected to be a big problem.
Release notes for 3.6
=====================

View File

@@ -2,3 +2,5 @@ include $(top_srcdir)/Makefile.decl
SUBDIRS = \
win32
-include $(top_srcdir)/git.mk

View File

@@ -3,3 +3,9 @@ include $(top_srcdir)/Makefile.decl
SUBDIRS = \
vs9 \
vs10
EXTRA_DIST += \
gen-file-list-gtk.py \
gengir_gtk.bat
-include $(top_srcdir)/git.mk

View File

@@ -0,0 +1,140 @@
#!/usr/bin/python
# vim: encoding=utf-8
# Generate the file lists for processing with g-ir-scanner
import os
import sys
import re
import string
import subprocess
import optparse
def gen_gdk_filelist(srcroot, subdir, dest):
vars = read_vars_from_AM(os.path.join(srcroot, subdir, 'Makefile.am'),
vars = {},
conds = {},
filters = ['gdk_public_h_sources', 'gdk_c_sources'])
vars['gdk_enums'] = 'gdkenumtypes.c gdkenumtypes.h'
files = vars['gdk_public_h_sources'].split() + \
vars['gdk_c_sources'].split() + \
vars['gdk_enums'].split()
sources = [i for i in files if (i != 'gdkkeysyms-compat.h')]
with open(dest, 'w') as d:
for i in sources:
d.write(srcroot + '\\' + subdir + '\\' + i.replace('/', '\\') + '\n')
def gen_filelist_gtk(srcroot, subdir, dest):
vars = read_vars_from_AM(os.path.join(srcroot, 'gtk', 'Makefile.am'),
vars = {},
conds = {'USE_WIN32':True},
filters = ['gtkinclude_HEADERS',
'deprecatedinclude_HEADERS',
'gtk_base_c_sources'])
vars['gtk_other_src'] = 'gtkprintoperation-win32.c gtktypebuiltins.h gtktypebuiltins.c'
files = vars['gtkinclude_HEADERS'].split() + \
vars['deprecatedinclude_HEADERS'].split() + \
vars['gtk_base_c_sources'].split() + \
vars['gtk_other_src'].split()
sources = [i for i in files if not (i.endswith('private.h')) and i != 'gtktextdisplay.h' and i != 'gtktextlayout.h']
with open(dest, 'w') as d:
for i in sources:
d.write(srcroot + '\\' + subdir + '\\' + i.replace('/', '\\') + '\n')
def read_vars_from_AM(path, vars = {}, conds = {}, filters = None):
'''
path: path to the Makefile.am
vars: predefined variables
conds: condition variables for Makefile
filters: if None, all variables defined are returned,
otherwise, it is a list contains that variables should be returned
'''
cur_vars = vars.copy()
RE_AM_VAR_REF = re.compile(r'\$\((\w+?)\)')
RE_AM_VAR = re.compile(r'^\s*(\w+)\s*=(.*)$')
RE_AM_INCLUDE = re.compile(r'^\s*include\s+(\w+)')
RE_AM_CONTINUING = re.compile(r'\\\s*$')
RE_AM_IF = re.compile(r'^\s*if\s+(\w+)')
RE_AM_ELSE = re.compile(r'^\s*else')
RE_AM_ENDIF = re.compile(r'^\s*endif')
def am_eval(cont):
return RE_AM_VAR_REF.sub(lambda x: cur_vars.get(x.group(1), ''), cont)
with open(path, 'r') as f:
contents = f.readlines()
#combine continuing lines
i = 0
ncont = []
while i < len(contents):
line = contents[i]
if RE_AM_CONTINUING.search(line):
line = RE_AM_CONTINUING.sub('', line)
j = i + 1
while j < len(contents) and RE_AM_CONTINUING.search(contents[j]):
line += RE_AM_CONTINUING.sub('', contents[j])
j += 1
else:
if j < len(contents):
line += contents[j]
i = j
else:
i += 1
ncont.append(line)
#include, var define, var evaluation
i = -1
skip = False
oldskip = []
while i < len(ncont) - 1:
i += 1
line = ncont[i]
mo = RE_AM_IF.search(line)
if mo:
oldskip.append(skip)
skip = False if mo.group(1) in conds and conds[mo.group(1)] \
else True
continue
mo = RE_AM_ELSE.search(line)
if mo:
skip = not skip
continue
mo = RE_AM_ENDIF.search(line)
if mo:
if oldskip:
skip = oldskip.pop()
continue
if not skip:
mo = RE_AM_INCLUDE.search(line)
if mo:
cur_vars.update(read_vars_from_AM(am_eval(mo.group(1)), cur_vars, conds, None))
continue
mo = RE_AM_VAR.search(line)
if mo:
cur_vars[mo.group(1)] = am_eval(mo.group(2).strip())
continue
#filter:
if filters != None:
ret = {}
for i in filters:
ret[i] = cur_vars.get(i, '')
return ret
else:
return cur_vars
def main(argv):
srcroot = '..\\..'
subdir_gdk = 'gdk'
subdir_gtk = 'gtk'
gen_gdk_filelist(srcroot, subdir_gdk, 'gdk_list')
gen_filelist_gtk(srcroot, subdir_gtk, 'gtk_list')
return 0
if __name__ == '__main__':
sys.exit(main(sys.argv))

177
build/win32/gengir_gtk.bat Normal file
View File

@@ -0,0 +1,177 @@
@echo off
setlocal EnableDelayedExpansion
rem Needed environmental variables:
rem PLAT: Windows platform-Win32 (i.e. x86) or x64 (i.e. x86-64)
rem CONF: Configuration Type, Release or Debug
rem VSVER: Visual C++ version used [9, 10 or 11]
rem BASEDIR: Where the dependent libraries/headers are located
rem PKG_CONFIG_PATH: Where the GLib/ATK/Pango/GDK-Pixbuf and their dependent pkg-config .pc files can be found
rem MINGWDIR: Installation path of MINGW GCC, so gcc.exe can be found in %MINGWDIR%\bin.
rem Note that the Python executable/installation and all the runtime dependencies of the
rem library/libraries need to be in your PATH or %BASEBIN%\bin.
rem Check the environemental variables...
if /i "%PLAT%" == "Win32" goto PLAT_OK
if /i "%PLAT%" == "x64" goto PLAT_OK
if /i "%PLAT%" == "x86" (
set PLAT=Win32
goto PLAT_OK
)
if /i "%PLAT%" == "x86-64" (
set PLAT=x64
goto PLAT_OK
)
goto ERR_PLAT
:PLAT_OK
if "%VSVER%" == "9" goto VSVER_OK
if "%VSVER%" == "10" goto VSVER_OK
if "%VSVER%" == "11" goto VSVER_OK
goto ERR_VSVER
:VSVER_OK
if /i "%CONF%" == "Release" goto CONF_OK
if /i "%CONF%" == "Debug" goto CONF_OK
goto ERR_CONF
:CONF_OK
if "%BASEDIR%" == "" goto ERR_BASEDIR
if not exist %BASEDIR% goto ERR_BASEDIR
if "%PKG_CONFIG_PATH%" == "" goto ERR_PKGCONFIG
if not exist %PKG_CONFIG_PATH%\gobject-2.0.pc goto ERR_PKGCONFIG
if "%MINGWDIR%" == "" goto ERR_MINGWDIR
if not exist %MINGWDIR%\bin\gcc.exe goto ERR_MINGWDIR
set CC=cl
set BINDIR=%CD%\vs%VSVER%\%CONF%\%PLAT%\bin
set INCLUDE=%BASEDIR%\include\glib-2.0;%BASEDIR%\lib\glib-2.0\include;%INCLUDE%
set LIB=%BINDIR%;%BASEDIR%\lib;%LIB%
set PATH=%BINDIR%;%BASEDIR%\bin;%PATH%;%MINGWDIR%\bin
set PYTHONPATH=%BASEDIR%\lib\gobject-introspection;%BINDIR%
echo Creating filelist files for generating GDK3/GTK3 .gir's...
call python gen-file-list-gtk.py
echo Setup .bat for generating GDK3/GTK3 .gir's...
rem ===============================================================================
rem Begin setup of gtk_gir.bat to create Gdk-3.0.gir
rem (The ^^ is necessary to span the command to multiple lines on Windows cmd.exe!)
rem ===============================================================================
echo echo Generating Gdk-3.0.gir...> gtk_gir.bat
echo @echo off>> gtk_gir.bat
echo.>> gtk_gir.bat
rem ===============================================================
rem Setup the command line flags to g-ir-scanner for Gdk-3.0.gir...
rem ===============================================================
echo python %BASEDIR%\bin\g-ir-scanner --verbose -I..\.. -I..\..\gdk ^^>> gtk_gir.bat
echo -I%BASEDIR%\include\glib-2.0 -I%BASEDIR%\lib\glib-2.0\include ^^>> gtk_gir.bat
echo -I%BASEDIR%\include\pango-1.0 -I%BASEDIR%\include\atk-1.0 ^^>> gtk_gir.bat
echo -I%BASEDIR%\include\gdk-pixbuf-2.0 -I%BASEDIR%\include ^^>> gtk_gir.bat
echo --namespace=Gdk --nsversion=3.0 ^^>> gtk_gir.bat
echo --include=Gio-2.0 --include=GdkPixbuf-2.0 ^^>> gtk_gir.bat
echo --include=Pango-1.0 --include=cairo-1.0 ^^>> gtk_gir.bat
echo --no-libtool --library=gdk-3-vs%VSVER% ^^>> gtk_gir.bat
echo --reparse-validate --add-include-path=%BASEDIR%\share\gir-1.0 --add-include-path=. ^^>> gtk_gir.bat
echo --pkg-export gdk-3.0 --warn-all --c-include="gdk/gdk.h" ^^>> gtk_gir.bat
echo -I..\.. -DG_LOG_DOMAIN=\"Gdk\" -DGDK_COMPILATION ^^>> gtk_gir.bat
echo --filelist=gdk_list ^^>> gtk_gir.bat
echo -o Gdk-3.0.gir>> gtk_gir.bat
echo.>> gtk_gir.bat
echo Completed setup of .bat for generating Gdk-3.0.gir.
echo.>> gtk_gir.bat
rem =================================================
rem Finish setup of gtk_gir.bat to create Gtk-3.0.gir
rem =================================================
rem ===============================================================================
rem Begin setup of gtk_gir.bat to create Gtk-3.0.gir
rem (The ^^ is necessary to span the command to multiple lines on Windows cmd.exe!)
rem ===============================================================================
echo echo Generating Gtk-3.0.gir...>> gtk_gir.bat
echo.>> gtk_gir.bat
rem ===============================================================
rem Setup the command line flags to g-ir-scanner for Gtk-3.0.gir...
rem ===============================================================
echo python %BASEDIR%\bin\g-ir-scanner --verbose -I..\.. -I..\..\gtk -I..\..\gdk ^^>> gtk_gir.bat
echo -I%BASEDIR%\include\glib-2.0 -I%BASEDIR%\lib\glib-2.0\include ^^>> gtk_gir.bat
echo -I%BASEDIR%\include\pango-1.0 -I%BASEDIR%\include\atk-1.0 ^^>> gtk_gir.bat
echo -I%BASEDIR%\include\gdk-pixbuf-2.0 -I%BASEDIR%\include ^^>> gtk_gir.bat
echo --namespace=Gtk --nsversion=3.0 ^^>> gtk_gir.bat
echo --include=Atk-1.0 ^^>> gtk_gir.bat
echo --include-uninstalled=./Gdk-3.0.gir ^^>> gtk_gir.bat
echo --no-libtool --library=gtk-3-vs%VSVER% ^^>> gtk_gir.bat
echo --reparse-validate --add-include-path=%BASEDIR%\share\gir-1.0 --add-include-path=. ^^>> gtk_gir.bat
echo --pkg-export gtk+-3.0 --warn-all --c-include="gtk/gtkx.h" ^^>> gtk_gir.bat
echo -I..\.. -DG_LOG_DOMAIN=\"Gtk\" -DGTK_LIBDIR=\"/dummy/lib\" ^^>> gtk_gir.bat
echo -Dtime_t=long ^^>> gtk_gir.bat
echo -DGTK_DATADIR=\"/dummy/share\" -DGTK_DATA_PREFIX=\"/dummy\" ^^>> gtk_gir.bat
echo -DGTK_SYSCONFDIR=\"/dummy/etc\" -DGTK_VERSION=\"3.6.2\" ^^>> gtk_gir.bat
echo -DGTK_BINARY_VERSION=\"3.0.0\" -DGTK_HOST=\"i686-pc-vs%VSVER%\" ^^>> gtk_gir.bat
echo -DGTK_COMPILATION -DGTK_PRINT_BACKENDS=\"file\" ^^>> gtk_gir.bat
echo -DGTK_PRINT_PREVIEW_COMMAND=\"undefined-gtk-print-preview-command\" ^^>> gtk_gir.bat
echo -DGTK_FILE_SYSTEM_ENABLE_UNSUPPORTED -DGTK_PRINT_BACKEND_ENABLE_UNSUPPORTED ^^>> gtk_gir.bat
echo -DINCLUDE_IM_am_et -DINCLUDE_IM_cedilla -DINCLUDE_IM_cyrillic_translit ^^>> gtk_gir.bat
echo -DINCLUDE_IM_ime -DINCLUDE_IM_inuktitut -DINCLUDE_IM_ipa ^^>> gtk_gir.bat
echo -DINCLUDE_IM_multipress -DINCLUDE_IM_thai -DINCLUDE_IM_ti_er ^^>> gtk_gir.bat
echo -DINCLUDE_IM_ti_et -DINCLUDE_IM_viqr --filelist=gtk_list ^^>> gtk_gir.bat
echo -o Gtk-3.0.gir>> gtk_gir.bat
echo.>> gtk_gir.bat
echo Completed setup of .bat for generating Gtk-3.0.gir.
echo.>> gtk_gir.bat
rem =================================================
rem Finish setup of gtk_gir.bat to create Gtk-3.0.gir
rem =================================================
rem =======================
rem Now generate the .gir's
rem =======================
CALL gtk_gir.bat
rem Clean up the .bat/filelists for generating the .gir files...
del gtk_gir.bat
del gdk_list
del gtk_list
rem Now compile the generated .gir files
%BASEDIR%\bin\g-ir-compiler --includedir=. --debug --verbose Gdk-3.0.gir -o Gdk-3.0.typelib
%BASEDIR%\bin\g-ir-compiler --includedir=. --debug --verbose Gtk-3.0.gir -o Gtk-3.0.typelib
rem Copy the generated .girs and .typelibs to their appropriate places
mkdir ..\..\build\win32\vs%VSVER%\%CONF%\%PLAT%\share\gir-1.0
move /y *.gir %BASEDIR%\share\gir-1.0\
mkdir ..\..\build\win32\vs%VSVER%\%CONF%\%PLAT%\lib\girepository-1.0
move /y *.typelib %BASEDIR%\lib\girepository-1.0\
goto DONE
:ERR_PLAT
echo You need to specify a valid Platform [set PLAT=Win32 or PLAT=x64]
goto DONE
:ERR_VSVER
echo You need to specify your Visual Studio version [set VSVER=9 or VSVER=10 or VSVER=11]
goto DONE
:ERR_CONF
echo You need to specify a valid Configuration [set CONF=Release or CONF=Debug]
goto DONE
:ERR_BASEDIR
echo You need to specify a valid BASEDIR.
goto DONE
:ERR_PKGCONFIG
echo You need to specify a valid PKG_CONFIG_PATH
goto DONE
:ERR_MINGWDIR
echo You need to specify a valid MINGWDIR, where a valid gcc installation can be found.
goto DONE
:DONE

View File

@@ -1,25 +1,30 @@
include $(top_srcdir)/Makefile.decl
EXTRA_DIST += \
README.txt \
gtk+.sln \
gtk+.props \
gdk-win32.vcxproj \
gdk-win32.vcxproj.filters \
gdk.vcxproj \
gdk.vcxprojin \
gdk.vcxproj.filters \
gdk.vcxproj.filtersin \
gtk.vcxproj \
gtk.vcxprojin \
gtk.vcxproj.filters \
gtk.vcxproj.filtersin \
gtk3-demo.vcxproj \
gtk3-demo.vcxproj.filters \
libgail.vcxproj \
libgail.vcxproj.filters \
libgail.vcxprojin \
libgail.vcxproj.filtersin \
gailutil.vcxproj \
gailutil.vcxproj.filters \
EXTRA_DIST += \
README.txt \
gtk+.sln \
gtk+.props \
gdk-win32.vcxproj \
gdk-win32.vcxproj.filters \
gdk.vcxproj \
gdk.vcxprojin \
gdk.vcxproj.filters \
gdk.vcxproj.filtersin \
gtk.vcxproj \
gtk.vcxprojin \
gtk.vcxproj.filters \
gtk.vcxproj.filtersin \
gtk3-demo.vcxproj \
gtk3-demo.vcxproj.filters \
gtk3-demo-application.vcxproj \
gtk3-demo-application.vcxproj.filters \
gtka11y.vcxproj \
gtka11y.vcxproj.filters \
gtka11y.vcxprojin \
gtka11y.vcxproj.filtersin \
gailutil.vcxproj \
gailutil.vcxproj.filters \
gengir.vcxproj \
install.vcxproj
-include $(top_srcdir)/git.mk

View File

@@ -28,19 +28,23 @@
<ConfigurationType>DynamicLibrary</ConfigurationType>
<CharacterSet>MultiByte</CharacterSet>
<WholeProgramOptimization>true</WholeProgramOptimization>
<PlatformToolset>v100</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<CharacterSet>MultiByte</CharacterSet>
<PlatformToolset>v100</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<CharacterSet>MultiByte</CharacterSet>
<WholeProgramOptimization>true</WholeProgramOptimization>
<WholeProgramOptimization>true</WholeProgramOptimization>
<PlatformToolset>v100</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<CharacterSet>MultiByte</CharacterSet>
<PlatformToolset>v100</PlatformToolset>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
@@ -86,7 +90,7 @@
<OutputFile>$(OutDir)$(GtkDllPrefix)$(ProjectName)$(GtkDllSuffix).dll</OutputFile>
<GenerateDebugInformation>true</GenerateDebugInformation>
<ModuleDefinitionFile>..\..\..\libgail-util\gailutil.def</ModuleDefinitionFile>
<ImportLibrary>$(TargetDir)$(ProjectName)-$(GtkApiVersion).lib</ImportLibrary>
<ImportLibrary>$(TargetDir)$(ProjectName)-$(ApiVersion).lib</ImportLibrary>
<SubSystem>Windows</SubSystem>
<TargetMachine>MachineX86</TargetMachine>
</Link>
@@ -110,7 +114,7 @@
<ModuleDefinitionFile>..\..\..\libgail-util\gailutil.def</ModuleDefinitionFile>
<GenerateDebugInformation>true</GenerateDebugInformation>
<SubSystem>Windows</SubSystem>
<ImportLibrary>$(TargetDir)$(ProjectName)-$(GtkApiVersion).lib</ImportLibrary>
<ImportLibrary>$(TargetDir)$(ProjectName)-$(ApiVersion).lib</ImportLibrary>
<TargetMachine>MachineX64</TargetMachine>
</Link>
</ItemDefinitionGroup>
@@ -132,7 +136,7 @@
<OutputFile>$(OutDir)$(GtkDllPrefix)$(ProjectName)$(GtkDllSuffix).dll</OutputFile>
<GenerateDebugInformation>true</GenerateDebugInformation>
<ModuleDefinitionFile>..\..\..\libgail-util\gailutil.def</ModuleDefinitionFile>
<ImportLibrary>$(TargetDir)$(ProjectName)-$(GtkApiVersion).lib</ImportLibrary>
<ImportLibrary>$(TargetDir)$(ProjectName)-$(ApiVersion).lib</ImportLibrary>
<SubSystem>Windows</SubSystem>
<OptimizeReferences>true</OptimizeReferences>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
@@ -157,7 +161,7 @@
<SubSystem>Windows</SubSystem>
<OptimizeReferences>true</OptimizeReferences>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<ImportLibrary>$(TargetDir)$(ProjectName)-$(GtkApiVersion).lib</ImportLibrary>
<ImportLibrary>$(TargetDir)$(ProjectName)-$(ApiVersion).lib</ImportLibrary>
<TargetMachine>MachineX64</TargetMachine>
</Link>
</ItemDefinitionGroup>

View File

@@ -28,19 +28,23 @@
<ConfigurationType>StaticLibrary</ConfigurationType>
<CharacterSet>MultiByte</CharacterSet>
<WholeProgramOptimization>true</WholeProgramOptimization>
<PlatformToolset>v100</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<CharacterSet>MultiByte</CharacterSet>
<PlatformToolset>v100</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<CharacterSet>MultiByte</CharacterSet>
<WholeProgramOptimization>true</WholeProgramOptimization>
<PlatformToolset>v100</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<CharacterSet>MultiByte</CharacterSet>
<PlatformToolset>v100</PlatformToolset>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
@@ -71,7 +75,7 @@
<PreprocessorDefinitions>_DEBUG;G_ENABLE_DEBUG;$(GdkDefines);INSIDE_GDK_WIN32;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<MinimalRebuild>true</MinimalRebuild>
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
<PrecompiledHeader>
</PrecompiledHeader>
<WarningLevel>Level3</WarningLevel>

View File

@@ -28,19 +28,23 @@
<ConfigurationType>DynamicLibrary</ConfigurationType>
<CharacterSet>MultiByte</CharacterSet>
<WholeProgramOptimization>true</WholeProgramOptimization>
<PlatformToolset>v100</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<CharacterSet>MultiByte</CharacterSet>
<PlatformToolset>v100</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<CharacterSet>MultiByte</CharacterSet>
<WholeProgramOptimization>true</WholeProgramOptimization>
<PlatformToolset>v100</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<CharacterSet>MultiByte</CharacterSet>
<PlatformToolset>v100</PlatformToolset>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
@@ -75,19 +79,19 @@
<PreprocessorDefinitions>_DEBUG;G_ENABLE_DEBUG;$(GdkDefines);%(PreprocessorDefinitions)</PreprocessorDefinitions>
<MinimalRebuild>true</MinimalRebuild>
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
<PrecompiledHeader>
</PrecompiledHeader>
<WarningLevel>Level3</WarningLevel>
<DebugInformationFormat>EditAndContinue</DebugInformationFormat>
</ClCompile>
<Link>
<AdditionalDependencies>imm32.lib;%(AdditionalDependencies)</AdditionalDependencies>
<AdditionalDependencies>imm32.lib;winmm.lib;%(AdditionalDependencies)</AdditionalDependencies>
<OutputFile>$(OutDir)$(GtkDllPrefix)$(ProjectName)$(GtkDllSuffix).dll</OutputFile>
<ModuleDefinitionFile>$(IntDir)gdk.def</ModuleDefinitionFile>
<GenerateDebugInformation>true</GenerateDebugInformation>
<SubSystem>Windows</SubSystem>
<ImportLibrary>$(TargetDir)$(ProjectName)-$(GtkApiVersion).lib</ImportLibrary>
<ImportLibrary>$(TargetDir)$(ProjectName)-$(ApiVersion).lib</ImportLibrary>
<TargetMachine>MachineX86</TargetMachine>
</Link>
</ItemDefinitionGroup>
@@ -102,14 +106,14 @@
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
</ClCompile>
<Link>
<AdditionalDependencies>imm32.lib;%(AdditionalDependencies)</AdditionalDependencies>
<AdditionalDependencies>imm32.lib;winmm.lib;%(AdditionalDependencies)</AdditionalDependencies>
<OutputFile>$(OutDir)$(GtkDllPrefix)$(ProjectName)$(GtkDllSuffix).dll</OutputFile>
<ModuleDefinitionFile>$(IntDir)gdk.def</ModuleDefinitionFile>
<GenerateDebugInformation>true</GenerateDebugInformation>
<SubSystem>Windows</SubSystem>
<OptimizeReferences>true</OptimizeReferences>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<ImportLibrary>$(TargetDir)$(ProjectName)-$(GtkApiVersion).lib</ImportLibrary>
<ImportLibrary>$(TargetDir)$(ProjectName)-$(ApiVersion).lib</ImportLibrary>
<TargetMachine>MachineX86</TargetMachine>
</Link>
</ItemDefinitionGroup>
@@ -127,12 +131,12 @@
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
</ClCompile>
<Link>
<AdditionalDependencies>imm32.lib;%(AdditionalDependencies)</AdditionalDependencies>
<AdditionalDependencies>imm32.lib;winmm.lib;%(AdditionalDependencies)</AdditionalDependencies>
<OutputFile>$(OutDir)$(GtkDllPrefix)$(ProjectName)$(GtkDllSuffix).dll</OutputFile>
<ModuleDefinitionFile>$(IntDir)gdk.def</ModuleDefinitionFile>
<GenerateDebugInformation>true</GenerateDebugInformation>
<SubSystem>Windows</SubSystem>
<ImportLibrary>$(TargetDir)$(ProjectName)-$(GtkApiVersion).lib</ImportLibrary>
<ImportLibrary>$(TargetDir)$(ProjectName)-$(ApiVersion).lib</ImportLibrary>
<TargetMachine>MachineX64</TargetMachine>
</Link>
</ItemDefinitionGroup>
@@ -147,14 +151,14 @@
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
</ClCompile>
<Link>
<AdditionalDependencies>imm32.lib;%(AdditionalDependencies)</AdditionalDependencies>
<AdditionalDependencies>imm32.lib;winmm.lib;%(AdditionalDependencies)</AdditionalDependencies>
<OutputFile>$(OutDir)$(GtkDllPrefix)$(ProjectName)$(GtkDllSuffix).dll</OutputFile>
<ModuleDefinitionFile>$(IntDir)gdk.def</ModuleDefinitionFile>
<GenerateDebugInformation>true</GenerateDebugInformation>
<SubSystem>Windows</SubSystem>
<OptimizeReferences>true</OptimizeReferences>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<ImportLibrary>$(TargetDir)$(ProjectName)-$(GtkApiVersion).lib</ImportLibrary>
<ImportLibrary>$(TargetDir)$(ProjectName)-$(ApiVersion).lib</ImportLibrary>
<TargetMachine>MachineX64</TargetMachine>
</Link>
</ItemDefinitionGroup>

View File

@@ -0,0 +1,108 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|Win32">
<Configuration>Debug</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Debug|x64">
<Configuration>Debug</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|Win32">
<Configuration>Release</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|x64">
<Configuration>Release</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
</ItemGroup>
<PropertyGroup Label="Globals">
<ProjectGuid>{2093D218-190E-4194-9421-3BA7CBF33B15}</ProjectGuid>
<RootNamespace>gengir</RootNamespace>
<Keyword>Win32Proj</Keyword>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>Utility</ConfigurationType>
<CharacterSet>MultiByte</CharacterSet>
<WholeProgramOptimization>true</WholeProgramOptimization>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>Utility</ConfigurationType>
<CharacterSet>MultiByte</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
<ConfigurationType>Utility</ConfigurationType>
<CharacterSet>MultiByte</CharacterSet>
<WholeProgramOptimization>true</WholeProgramOptimization>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
<ConfigurationType>Utility</ConfigurationType>
<CharacterSet>MultiByte</CharacterSet>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="gtk+.props" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="gtk+.props" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="gtk+.props" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="gtk+.props" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup>
<OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(GlibEtcInstallRoot)\</OutDir>
<ExtensionsToDeleteOnClean Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
<OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(GlibEtcInstallRoot)\</OutDir>
<ExtensionsToDeleteOnClean Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
<OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(GlibEtcInstallRoot)\</OutDir>
<ExtensionsToDeleteOnClean Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
<OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(GlibEtcInstallRoot)\</OutDir>
<ExtensionsToDeleteOnClean Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<PreBuildEvent>
<Command>$(DoGenGir)</Command>
</PreBuildEvent>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<PreBuildEvent>
<Command>$(DoGenGir)</Command>
</PreBuildEvent>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<PreBuildEvent>
<Command>$(DoGenGir)</Command>
</PreBuildEvent>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<PreBuildEvent>
<Command>$(DoGenGir)</Command>
</PreBuildEvent>
</ItemDefinitionGroup>
<ItemGroup>
<ProjectReference Include="gdk.vcxproj">
<Project>{fc5aadb5-95cd-4bf0-ba8b-0c16fe7073f7}</Project>
<ReferenceOutputAssembly>false</ReferenceOutputAssembly>
</ProjectReference>
<ProjectReference Include="gtk.vcxproj">
<Project>{fc5aadb5-95cd-4bf0-ba8b-0c16fe7073f5}</Project>
<ReferenceOutputAssembly>false</ReferenceOutputAssembly>
</ProjectReference>
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
</Project>

File diff suppressed because it is too large Load Diff

View File

@@ -1,5 +1,5 @@
Microsoft Visual Studio Solution File, Format Version 11.00
# Visual C++ Express 2010
# Visual Studio 2010
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "gdk-win32", "gdk-win32.vcxproj", "{FC5AADB5-95CD-4BF0-BA8B-0C16FE7073FA}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "gdk", "gdk.vcxproj", "{FC5AADB5-95CD-4BF0-BA8B-0C16FE7073F7}"
@@ -8,12 +8,16 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "gtk", "gtk.vcxproj", "{FC5A
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "gtk3-demo", "gtk3-demo.vcxproj", "{FC5AADB5-95CD-4BF0-BA8B-0C16FE7073FC}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libgail", "libgail.vcxproj", "{F756B0DB-40A1-4E9F-BE1F-8F02CB86EA46}"
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "gtk3-demo-application", "gtk3-demo-application.vcxproj", "{3281202A-CD26-4C67-B892-EB34BDBC612F}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "gtka11y", "gtka11y.vcxproj", "{F756B0DB-40A1-4E9F-BE1F-8F02CB86EA46}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "gailutil", "gailutil.vcxproj", "{29E3E814-1BA3-4AD7-A3A7-3669CB80A942}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "install", "install.vcxproj", "{FC5AADB5-95CD-4BF0-BA8B-0C16FE7073FB}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "gengir", "gengir.vcxproj", "{2093D218-190E-4194-9421-3BA7CBF33B15}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Win32 = Debug|Win32
@@ -78,6 +82,18 @@ Global
{FC5AADB5-95CD-4BF0-BA8B-0C16FE7073FB}.Release|Win32.Build.0 = Release|Win32
{FC5AADB5-95CD-4BF0-BA8B-0C16FE7073FB}.Release|x64.ActiveCfg = Release|x64
{FC5AADB5-95CD-4BF0-BA8B-0C16FE7073FB}.Release|x64.Build.0 = Release|x64
{3281202A-CD26-4C67-B892-EB34BDBC612F}.Debug|Win32.ActiveCfg = Debug|Win32
{3281202A-CD26-4C67-B892-EB34BDBC612F}.Debug|Win32.Build.0 = Debug|Win32
{3281202A-CD26-4C67-B892-EB34BDBC612F}.Debug|x64.ActiveCfg = Debug|x64
{3281202A-CD26-4C67-B892-EB34BDBC612F}.Debug|x64.Build.0 = Debug|x64
{3281202A-CD26-4C67-B892-EB34BDBC612F}.Release|Win32.ActiveCfg = Release|Win32
{3281202A-CD26-4C67-B892-EB34BDBC612F}.Release|Win32.Build.0 = Release|Win32
{3281202A-CD26-4C67-B892-EB34BDBC612F}.Release|x64.ActiveCfg = Release|x64
{3281202A-CD26-4C67-B892-EB34BDBC612F}.Release|x64.Build.0 = Release|x64
{2093D218-190E-4194-9421-3BA7CBF33B15}.Debug|Win32.ActiveCfg = Debug|Win32
{2093D218-190E-4194-9421-3BA7CBF33B15}.Debug|x64.ActiveCfg = Debug|x64
{2093D218-190E-4194-9421-3BA7CBF33B15}.Release|Win32.ActiveCfg = Release|Win32
{2093D218-190E-4194-9421-3BA7CBF33B15}.Release|x64.ActiveCfg = Release|x64
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE

View File

@@ -29,18 +29,22 @@
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<CharacterSet>MultiByte</CharacterSet>
<PlatformToolset>v100</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<CharacterSet>MultiByte</CharacterSet>
<PlatformToolset>v100</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<CharacterSet>MultiByte</CharacterSet>
<PlatformToolset>v100</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<CharacterSet>MultiByte</CharacterSet>
<PlatformToolset>v100</PlatformToolset>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
@@ -75,7 +79,7 @@
<PreprocessorDefinitions>_DEBUG;G_ENABLE_DEBUG;$(GtkDefines);%(PreprocessorDefinitions)</PreprocessorDefinitions>
<MinimalRebuild>true</MinimalRebuild>
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
<PrecompiledHeader>
</PrecompiledHeader>
<WarningLevel>Level3</WarningLevel>
@@ -87,7 +91,7 @@
<ModuleDefinitionFile>$(IntDir)gtk.def</ModuleDefinitionFile>
<GenerateDebugInformation>true</GenerateDebugInformation>
<SubSystem>Windows</SubSystem>
<ImportLibrary>$(TargetDir)$(ProjectName)-$(GtkApiVersion).lib</ImportLibrary>
<ImportLibrary>$(TargetDir)$(ProjectName)-$(ApiVersion).lib</ImportLibrary>
<TargetMachine>MachineX86</TargetMachine>
</Link>
</ItemDefinitionGroup>
@@ -109,7 +113,7 @@
<SubSystem>Windows</SubSystem>
<OptimizeReferences>true</OptimizeReferences>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<ImportLibrary>$(TargetDir)$(ProjectName)-$(GtkApiVersion).lib</ImportLibrary>
<ImportLibrary>$(TargetDir)$(ProjectName)-$(ApiVersion).lib</ImportLibrary>
<TargetMachine>MachineX86</TargetMachine>
</Link>
</ItemDefinitionGroup>
@@ -132,7 +136,7 @@
<ModuleDefinitionFile>$(IntDir)gtk.def</ModuleDefinitionFile>
<GenerateDebugInformation>true</GenerateDebugInformation>
<SubSystem>Windows</SubSystem>
<ImportLibrary>$(TargetDir)$(ProjectName)-$(GtkApiVersion).lib</ImportLibrary>
<ImportLibrary>$(TargetDir)$(ProjectName)-$(ApiVersion).lib</ImportLibrary>
<TargetMachine>MachineX64</TargetMachine>
</Link>
</ItemDefinitionGroup>
@@ -154,7 +158,7 @@
<SubSystem>Windows</SubSystem>
<OptimizeReferences>true</OptimizeReferences>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<ImportLibrary>$(TargetDir)$(ProjectName)-$(GtkApiVersion).lib</ImportLibrary>
<ImportLibrary>$(TargetDir)$(ProjectName)-$(ApiVersion).lib</ImportLibrary>
<TargetMachine>MachineX64</TargetMachine>
</Link>
</ItemDefinitionGroup>
@@ -200,7 +204,7 @@
<Project>{fc5aadb5-95cd-4bf0-ba8b-0c16fe7073f7}</Project>
<ReferenceOutputAssembly>false</ReferenceOutputAssembly>
</ProjectReference>
<ProjectReference Include="libgail.vcxproj">
<ProjectReference Include="gtka11y.vcxproj">
<Project>{f756b0db-40a1-4e9f-be1f-8f02cb86ea46}</Project>
<ReferenceOutputAssembly>false</ReferenceOutputAssembly>
</ProjectReference>

View File

@@ -0,0 +1,170 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|Win32">
<Configuration>Debug</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Debug|x64">
<Configuration>Debug</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|Win32">
<Configuration>Release</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|x64">
<Configuration>Release</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
</ItemGroup>
<PropertyGroup Label="Globals">
<ProjectGuid>{3281202A-CD26-4C67-B892-EB34BDBC612F}</ProjectGuid>
<RootNamespace>gtk3demoapplication</RootNamespace>
<Keyword>Win32Proj</Keyword>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<CharacterSet>MultiByte</CharacterSet>
<WholeProgramOptimization>false</WholeProgramOptimization>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<CharacterSet>MultiByte</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<CharacterSet>MultiByte</CharacterSet>
<WholeProgramOptimization>false</WholeProgramOptimization>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<CharacterSet>MultiByte</CharacterSet>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="gtk+.props" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="gtk+.props" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="gtk+.props" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="gtk+.props" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup>
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</LinkIncremental>
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</LinkIncremental>
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</LinkIncremental>
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<ClCompile>
<Optimization>Disabled</Optimization>
<PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<MinimalRebuild>true</MinimalRebuild>
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
<PrecompiledHeader>
</PrecompiledHeader>
<WarningLevel>Level3</WarningLevel>
<DebugInformationFormat>EditAndContinue</DebugInformationFormat>
</ClCompile>
<Link>
<GenerateDebugInformation>true</GenerateDebugInformation>
<SubSystem>Console</SubSystem>
<TargetMachine>MachineX86</TargetMachine>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<ClCompile>
<Optimization>MaxSpeed</Optimization>
<IntrinsicFunctions>true</IntrinsicFunctions>
<PreprocessorDefinitions>%(PreprocessorDefinitions)</PreprocessorDefinitions>
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
<FunctionLevelLinking>false</FunctionLevelLinking>
<PrecompiledHeader>
</PrecompiledHeader>
<WarningLevel>Level3</WarningLevel>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
</ClCompile>
<Link>
<GenerateDebugInformation>true</GenerateDebugInformation>
<SubSystem>Console</SubSystem>
<OptimizeReferences>true</OptimizeReferences>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<TargetMachine>MachineX86</TargetMachine>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<Midl>
<TargetEnvironment>X64</TargetEnvironment>
</Midl>
<ClCompile>
<Optimization>Disabled</Optimization>
<PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<MinimalRebuild>true</MinimalRebuild>
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
<PrecompiledHeader>
</PrecompiledHeader>
<WarningLevel>Level3</WarningLevel>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
</ClCompile>
<Link>
<GenerateDebugInformation>true</GenerateDebugInformation>
<SubSystem>Console</SubSystem>
<TargetMachine>MachineX64</TargetMachine>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<Midl>
<TargetEnvironment>X64</TargetEnvironment>
</Midl>
<ClCompile>
<Optimization>MaxSpeed</Optimization>
<IntrinsicFunctions>true</IntrinsicFunctions>
<PreprocessorDefinitions>%(PreprocessorDefinitions)</PreprocessorDefinitions>
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
<FunctionLevelLinking>false</FunctionLevelLinking>
<PrecompiledHeader>
</PrecompiledHeader>
<WarningLevel>Level3</WarningLevel>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
</ClCompile>
<Link>
<GenerateDebugInformation>true</GenerateDebugInformation>
<SubSystem>Console</SubSystem>
<OptimizeReferences>true</OptimizeReferences>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<TargetMachine>MachineX64</TargetMachine>
</Link>
</ItemDefinitionGroup>
<ItemGroup>
<ClCompile Include="..\..\..\demos\gtk-demo\application-standalone.c" />
<ClCompile Include="..\..\..\demos\gtk-demo\demo_resources.c" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="gdk.vcxproj">
<Project>{fc5aadb5-95cd-4bf0-ba8b-0c16fe7073f7}</Project>
<ReferenceOutputAssembly>false</ReferenceOutputAssembly>
</ProjectReference>
<ProjectReference Include="gtk.vcxproj">
<Project>{fc5aadb5-95cd-4bf0-ba8b-0c16fe7073f5}</Project>
<ReferenceOutputAssembly>false</ReferenceOutputAssembly>
</ProjectReference>
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
</Project>

View File

@@ -0,0 +1,25 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<Filter Include="Sources">
<UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
<Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
</Filter>
<Filter Include="Headers">
<UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
<Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions>
</Filter>
<Filter Include="Resource Files">
<UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
<Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav</Extensions>
</Filter>
</ItemGroup>
<ItemGroup>
<ClCompile Include="..\..\..\demos\gtk-demo\application-standalone.c">
<Filter>Sources</Filter>
</ClCompile>
<ClCompile Include="..\..\..\demos\gtk-demo\demo_resources.c">
<Filter>Sources</Filter>
</ClCompile>
</ItemGroup>
</Project>

View File

@@ -27,20 +27,24 @@
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<CharacterSet>MultiByte</CharacterSet>
<WholeProgramOptimization>true</WholeProgramOptimization>
<WholeProgramOptimization>false</WholeProgramOptimization>
<PlatformToolset>v100</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<CharacterSet>MultiByte</CharacterSet>
<PlatformToolset>v100</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<CharacterSet>MultiByte</CharacterSet>
<WholeProgramOptimization>true</WholeProgramOptimization>
<WholeProgramOptimization>false</WholeProgramOptimization>
<PlatformToolset>v100</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<CharacterSet>MultiByte</CharacterSet>
<PlatformToolset>v100</PlatformToolset>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
@@ -63,7 +67,6 @@
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup>
<_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</LinkIncremental>
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</LinkIncremental>
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>
@@ -76,7 +79,7 @@
<PreprocessorDefinitions>_DEBUG;$(GtkPrefixDefine);%(PreprocessorDefinitions)</PreprocessorDefinitions>
<MinimalRebuild>true</MinimalRebuild>
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
<PrecompiledHeader>
</PrecompiledHeader>
<WarningLevel>Level3</WarningLevel>
@@ -132,6 +135,7 @@
<AdditionalDependencies>%(AdditionalDependencies)</AdditionalDependencies>
<GenerateDebugInformation>true</GenerateDebugInformation>
<SubSystem>Console</SubSystem>
<FunctionLevelLinking>false</FunctionLevelLinking>
<OptimizeReferences>true</OptimizeReferences>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<RandomizedBaseAddress>false</RandomizedBaseAddress>
@@ -155,6 +159,7 @@
<AdditionalDependencies>%(AdditionalDependencies)</AdditionalDependencies>
<GenerateDebugInformation>true</GenerateDebugInformation>
<SubSystem>Console</SubSystem>
<FunctionLevelLinking>false</FunctionLevelLinking>
<OptimizeReferences>true</OptimizeReferences>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<RandomizedBaseAddress>false</RandomizedBaseAddress>
@@ -208,7 +213,6 @@
<ClCompile Include="..\..\..\demos\gtk-demo\stock_browser.c" />
<ClCompile Include="..\..\..\demos\gtk-demo\textscroll.c" />
<ClCompile Include="..\..\..\demos\gtk-demo\textview.c" />
<ClCompile Include="..\..\..\demos\gtk-demo\theming_custom_css.c" />
<ClCompile Include="..\..\..\demos\gtk-demo\theming_style_classes.c" />
<ClCompile Include="..\..\..\demos\gtk-demo\toolpalette.c" />
<ClCompile Include="..\..\..\demos\gtk-demo\transparent.c" />

View File

@@ -143,9 +143,6 @@
<ClCompile Include="..\..\..\demos\gtk-demo\textview.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\..\..\demos\gtk-demo\theming_custom_css.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\..\..\demos\gtk-demo\theming_style_classes.c">
<Filter>Source Files</Filter>
</ClCompile>

View File

@@ -15,6 +15,6 @@
</Filter>
</ItemGroup>
<ItemGroup>
#include "libgail.vs10.sourcefiles.filters"
#include "gtka11y.vs10.sourcefiles.filters"
</ItemGroup>
</Project>
</Project>

View File

@@ -20,7 +20,7 @@
</ItemGroup>
<PropertyGroup Label="Globals">
<ProjectGuid>{F756B0DB-40A1-4E9F-BE1F-8F02CB86EA46}</ProjectGuid>
<RootNamespace>libgail</RootNamespace>
<RootNamespace>gtka11y</RootNamespace>
<Keyword>Win32Proj</Keyword>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
@@ -28,19 +28,23 @@
<ConfigurationType>StaticLibrary</ConfigurationType>
<CharacterSet>MultiByte</CharacterSet>
<WholeProgramOptimization>true</WholeProgramOptimization>
<PlatformToolset>v100</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<CharacterSet>MultiByte</CharacterSet>
<PlatformToolset>v100</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<CharacterSet>MultiByte</CharacterSet>
<WholeProgramOptimization>true</WholeProgramOptimization>
<PlatformToolset>v100</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<CharacterSet>MultiByte</CharacterSet>
<PlatformToolset>v100</PlatformToolset>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
@@ -62,9 +66,6 @@
<Import Project="gtk+.props" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup>
<_ProjectFileVersion>10.0.40219.1</_ProjectFileVersion>
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<ClCompile>
<Optimization>Disabled</Optimization>
@@ -119,9 +120,9 @@
</ClCompile>
</ItemDefinitionGroup>
<ItemGroup>
#include "libgail.vs10.sourcefiles"
#include "gtka11y.vs10.sourcefiles"
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
</Project>
</Project>

View File

@@ -28,19 +28,23 @@
<ConfigurationType>Utility</ConfigurationType>
<CharacterSet>MultiByte</CharacterSet>
<WholeProgramOptimization>true</WholeProgramOptimization>
<PlatformToolset>v100</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>Utility</ConfigurationType>
<CharacterSet>MultiByte</CharacterSet>
<PlatformToolset>v100</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
<ConfigurationType>Utility</ConfigurationType>
<CharacterSet>MultiByte</CharacterSet>
<WholeProgramOptimization>true</WholeProgramOptimization>
<PlatformToolset>v100</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
<ConfigurationType>Utility</ConfigurationType>
<CharacterSet>MultiByte</CharacterSet>
<PlatformToolset>v100</PlatformToolset>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
@@ -109,6 +113,10 @@
<Project>{29e3e814-1ba3-4ad7-a3a7-3669cb80a942}</Project>
<ReferenceOutputAssembly>false</ReferenceOutputAssembly>
</ProjectReference>
<ProjectReference Include="gtk-demo-application.vcxproj">
<Project>{3281202a-cd26-4c67-b892-eb34bdbc612f}</Project>
<ReferenceOutputAssembly>false</ReferenceOutputAssembly>
</ProjectReference>
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">

View File

@@ -1,16 +1,20 @@
include $(top_srcdir)/Makefile.decl
EXTRA_DIST += \
README.txt \
gtk+.sln \
gtk+.vsprops \
gdk-win32.vcproj \
gdk.vcproj \
gdk.vcprojin \
gtk.vcproj \
gtk.vcprojin \
gtk3-demo.vcproj \
libgail.vcproj \
libgail.vcprojin \
gailutil.vcproj \
EXTRA_DIST += \
README.txt \
gtk+.sln \
gtk+.vsprops \
gdk-win32.vcproj \
gdk.vcproj \
gdk.vcprojin \
gtk.vcproj \
gtk.vcprojin \
gtk3-demo.vcproj \
gtk3-demo-application.vcproj \
gtka11y.vcproj \
gtka11y.vcprojin \
gailutil.vcproj \
gengir.vcproj \
install.vcproj
-include $(top_srcdir)/git.mk

View File

@@ -47,7 +47,7 @@
OutputFile="$(OutDir)\$(GtkDllPrefix)$(ProjectName)$(GtkDllSuffix).dll"
GenerateDebugInformation="true"
ModuleDefinitionFile="..\..\..\libgail-util\gailutil.def"
ImportLibrary="$(TargetDir)$(ProjectName)-$(GtkApiVersion).lib"
ImportLibrary="$(TargetDir)$(ProjectName)-$(ApiVersion).lib"
SubSystem="2"
TargetMachine="1"
/>
@@ -81,7 +81,7 @@
ModuleDefinitionFile="..\..\..\libgail-util\gailutil.def"
GenerateDebugInformation="true"
SubSystem="2"
ImportLibrary="$(TargetDir)$(ProjectName)-$(GtkApiVersion).lib"
ImportLibrary="$(TargetDir)$(ProjectName)-$(ApiVersion).lib"
TargetMachine="17"
/>
</Configuration>
@@ -114,7 +114,7 @@
OutputFile="$(OutDir)\$(GtkDllPrefix)$(ProjectName)$(GtkDllSuffix).dll"
GenerateDebugInformation="true"
ModuleDefinitionFile="..\..\..\libgail-util\gailutil.def"
ImportLibrary="$(TargetDir)$(ProjectName)-$(GtkApiVersion).lib"
ImportLibrary="$(TargetDir)$(ProjectName)-$(ApiVersion).lib"
SubSystem="2"
OptimizeReferences="2"
EnableCOMDATFolding="2"
@@ -150,7 +150,7 @@
SubSystem="2"
OptimizeReferences="2"
EnableCOMDATFolding="2"
ImportLibrary="$(TargetDir)$(ProjectName)-$(GtkApiVersion).lib"
ImportLibrary="$(TargetDir)$(ProjectName)-$(ApiVersion).lib"
TargetMachine="17"
/>
</Configuration>

View File

@@ -35,7 +35,7 @@
PreprocessorDefinitions="_DEBUG;G_ENABLE_DEBUG;$(GdkDefines);INSIDE_GDK_WIN32"
MinimalRebuild="true"
BasicRuntimeChecks="3"
RuntimeLibrary="2"
RuntimeLibrary="3"
UsePrecompiledHeader="0"
WarningLevel="3"
DebugInformationFormat="4"

View File

@@ -35,20 +35,20 @@
PreprocessorDefinitions="_DEBUG;G_ENABLE_DEBUG;$(GdkDefines)"
MinimalRebuild="true"
BasicRuntimeChecks="3"
RuntimeLibrary="2"
RuntimeLibrary="3"
UsePrecompiledHeader="0"
WarningLevel="3"
DebugInformationFormat="4"
/>
<Tool
Name="VCLinkerTool"
AdditionalDependencies="imm32.lib"
AdditionalDependencies="imm32.lib winmm.lib"
OutputFile="$(OutDir)\$(GtkDllPrefix)$(ProjectName)$(GtkDllSuffix).dll"
LinkIncremental="1"
ModuleDefinitionFile="$(IntDir)\gdk.def"
GenerateDebugInformation="true"
SubSystem="2"
ImportLibrary="$(TargetDir)$(ProjectName)-$(GtkApiVersion).lib"
ImportLibrary="$(TargetDir)$(ProjectName)-$(ApiVersion).lib"
TargetMachine="1"
/>
</Configuration>
@@ -73,7 +73,7 @@
/>
<Tool
Name="VCLinkerTool"
AdditionalDependencies="imm32.lib"
AdditionalDependencies="imm32.lib winmm.lib"
OutputFile="$(OutDir)\$(GtkDllPrefix)$(ProjectName)$(GtkDllSuffix).dll"
LinkIncremental="1"
ModuleDefinitionFile="$(IntDir)\gdk.def"
@@ -81,7 +81,7 @@
SubSystem="2"
OptimizeReferences="2"
EnableCOMDATFolding="2"
ImportLibrary="$(TargetDir)$(ProjectName)-$(GtkApiVersion).lib"
ImportLibrary="$(TargetDir)$(ProjectName)-$(ApiVersion).lib"
TargetMachine="1"
/>
</Configuration>
@@ -108,13 +108,13 @@
/>
<Tool
Name="VCLinkerTool"
AdditionalDependencies="imm32.lib"
AdditionalDependencies="imm32.lib winmm.lib"
OutputFile="$(OutDir)\$(GtkDllPrefix)$(ProjectName)$(GtkDllSuffix).dll"
LinkIncremental="1"
ModuleDefinitionFile="$(IntDir)\gdk.def"
GenerateDebugInformation="true"
SubSystem="2"
ImportLibrary="$(TargetDir)$(ProjectName)-$(GtkApiVersion).lib"
ImportLibrary="$(TargetDir)$(ProjectName)-$(ApiVersion).lib"
TargetMachine="17"
/>
</Configuration>
@@ -139,7 +139,7 @@
/>
<Tool
Name="VCLinkerTool"
AdditionalDependencies="imm32.lib"
AdditionalDependencies="imm32.lib winmm.lib"
OutputFile="$(OutDir)\$(GtkDllPrefix)$(ProjectName)$(GtkDllSuffix).dll"
LinkIncremental="1"
ModuleDefinitionFile="$(IntDir)\gdk.def"
@@ -147,7 +147,7 @@
SubSystem="2"
OptimizeReferences="2"
EnableCOMDATFolding="2"
ImportLibrary="$(TargetDir)$(ProjectName)-$(GtkApiVersion).lib"
ImportLibrary="$(TargetDir)$(ProjectName)-$(ApiVersion).lib"
TargetMachine="17"
/>
</Configuration>

View File

@@ -0,0 +1,77 @@
<?xml version="1.0" encoding="Windows-1252"?>
<VisualStudioProject
ProjectType="Visual C++"
Version="9.00"
Name="gengir"
ProjectGUID="{2093D218-190E-4194-9421-3BA7CBF33B15}"
RootNamespace="gengir"
Keyword="Win32Proj"
TargetFrameworkVersion="131072"
>
<Platforms>
<Platform
Name="Win32"
/>
<Platform
Name="x64"
/>
</Platforms>
<ToolFiles>
</ToolFiles>
<Configurations>
<Configuration
Name="Debug|Win32"
InheritedPropertySheets=".\gtk+.vsprops"
OutputDirectory="$(GlibEtcInstallRoot)"
ConfigurationType="10"
CharacterSet="2"
DeleteExtensionsOnClean=""
>
<Tool
Name="VCPreBuildEventTool"
CommandLine="$(DoGenGir)"
/>
</Configuration>
<Configuration
Name="Debug|x64"
InheritedPropertySheets=".\gtk+.vsprops"
OutputDirectory="$(GlibEtcInstallRoot)"
ConfigurationType="10"
CharacterSet="2"
DeleteExtensionsOnClean=""
>
<Tool
Name="VCPreBuildEventTool"
CommandLine="$(DoGenGir)"
/>
</Configuration>
<Configuration
Name="Release|Win32"
InheritedPropertySheets=".\gtk+.vsprops"
OutputDirectory="$(GlibEtcInstallRoot)"
ConfigurationType="10"
CharacterSet="2"
WholeProgramOptimization="1"
DeleteExtensionsOnClean=""
>
<Tool
Name="VCPreBuildEventTool"
CommandLine="$(DoGenGir)"
/>
</Configuration>
<Configuration
Name="Release|x64"
InheritedPropertySheets=".\gtk+.vsprops"
OutputDirectory="$(GlibEtcInstallRoot)"
ConfigurationType="10"
CharacterSet="2"
WholeProgramOptimization="1"
DeleteExtensionsOnClean=""
>
<Tool
Name="VCPreBuildEventTool"
CommandLine="$(DoGenGir)"
/>
</Configuration>
</Configurations>
</VisualStudioProject>

View File

@@ -19,7 +19,13 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "gtk3-demo", "gtk3-demo.vcpr
{FC5AADB5-95CD-4BF0-BA8B-0C16FE7073F5} = {FC5AADB5-95CD-4BF0-BA8B-0C16FE7073F5}
EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libgail", "libgail.vcproj", "{F756B0DB-40A1-4E9F-BE1F-8F02CB86EA46}"
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "gtk3-demo-application", "gtk3-demo-application.vcproj", "{3281202A-CD26-4C67-B892-EB34BDBC612F}"
ProjectSection(ProjectDependencies) = postProject
{FC5AADB5-95CD-4BF0-BA8B-0C16FE7073F7} = {FC5AADB5-95CD-4BF0-BA8B-0C16FE7073F7}
{FC5AADB5-95CD-4BF0-BA8B-0C16FE7073F5} = {FC5AADB5-95CD-4BF0-BA8B-0C16FE7073F5}
EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "gtka11y", "gtka11y.vcproj", "{F756B0DB-40A1-4E9F-BE1F-8F02CB86EA46}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "gailutil", "gailutil.vcproj", "{29E3E814-1BA3-4AD7-A3A7-3669CB80A942}"
ProjectSection(ProjectDependencies) = postProject
@@ -33,6 +39,13 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "install", "install.vcproj",
{FC5AADB5-95CD-4BF0-BA8B-0C16FE7073F5} = {FC5AADB5-95CD-4BF0-BA8B-0C16FE7073F5}
{FC5AADB5-95CD-4BF0-BA8B-0C16FE7073FC} = {FC5AADB5-95CD-4BF0-BA8B-0C16FE7073FC}
{29E3E814-1BA3-4AD7-A3A7-3669CB80A942} = {29E3E814-1BA3-4AD7-A3A7-3669CB80A942}
{3281202A-CD26-4C67-B892-EB34BDBC612F} = {3281202A-CD26-4C67-B892-EB34BDBC612F}
EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "gengir", "gengir.vcproj", "{2093D218-190E-4194-9421-3BA7CBF33B15}"
ProjectSection(ProjectDependencies) = postProject
{FC5AADB5-95CD-4BF0-BA8B-0C16FE7073F7} = {FC5AADB5-95CD-4BF0-BA8B-0C16FE7073F7}
{FC5AADB5-95CD-4BF0-BA8B-0C16FE7073F5} = {FC5AADB5-95CD-4BF0-BA8B-0C16FE7073F5}
EndProjectSection
EndProject
Global
@@ -99,6 +112,18 @@ Global
{29E3E814-1BA3-4AD7-A3A7-3669CB80A942}.Release|Win32.Build.0 = Release|Win32
{29E3E814-1BA3-4AD7-A3A7-3669CB80A942}.Release|x64.ActiveCfg = Release|x64
{29E3E814-1BA3-4AD7-A3A7-3669CB80A942}.Release|x64.Build.0 = Release|x64
{3281202A-CD26-4C67-B892-EB34BDBC612F}.Debug|Win32.ActiveCfg = Debug|Win32
{3281202A-CD26-4C67-B892-EB34BDBC612F}.Debug|Win32.Build.0 = Debug|Win32
{3281202A-CD26-4C67-B892-EB34BDBC612F}.Debug|x64.ActiveCfg = Debug|x64
{3281202A-CD26-4C67-B892-EB34BDBC612F}.Debug|x64.Build.0 = Debug|x64
{3281202A-CD26-4C67-B892-EB34BDBC612F}.Release|Win32.ActiveCfg = Release|Win32
{3281202A-CD26-4C67-B892-EB34BDBC612F}.Release|Win32.Build.0 = Release|Win32
{3281202A-CD26-4C67-B892-EB34BDBC612F}.Release|x64.ActiveCfg = Release|x64
{3281202A-CD26-4C67-B892-EB34BDBC612F}.Release|x64.Build.0 = Release|x64
{2093D218-190E-4194-9421-3BA7CBF33B15}.Debug|Win32.ActiveCfg = Debug|Win32
{2093D218-190E-4194-9421-3BA7CBF33B15}.Debug|x64.ActiveCfg = Debug|x64
{2093D218-190E-4194-9421-3BA7CBF33B15}.Release|Win32.ActiveCfg = Release|Win32
{2093D218-190E-4194-9421-3BA7CBF33B15}.Release|x64.ActiveCfg = Release|x64
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE

View File

@@ -27,16 +27,24 @@ copy ..\..\..\config.h.win32 ..\..\..\config.h&#x0D;&#x0A;
copy ..\..\..\gdk\gdkconfig.h.win32 ..\..\..\gdk\gdkconfig.h&#x0D;&#x0A;
"
/>
<UserMacro
Name="VSVer"
Value="9"
/>
<UserMacro
Name="GlibEtcInstallRoot"
Value="..\..\..\..\vs9\$(PlatformName)"
Value="..\..\..\..\vs$(VSVer)\$(PlatformName)"
/>
<UserMacro
Name="GlibEtcInstallRootFromBuildWin32"
Value="..\..\..\vs$(VSVer)\$(PlatformName)"
/>
<UserMacro
Name="CopyDir"
Value="$(GlibEtcInstallRoot)"
/>
<UserMacro
Name="GtkApiVersion"
Name="ApiVersion"
Value="3.0"
/>
<UserMacro
@@ -61,7 +69,7 @@ copy ..\..\..\gdk\gdkconfig.h.win32 ..\..\..\gdk\gdkconfig.h&#x0D;&#x0A;
/>
<UserMacro
Name="GtkDefines"
Value="GTK_COMPILATION;G_LOG_DOMAIN=\&quot;Gtk\&quot;;GTK_HOST=\&quot;i686-pc-vs9\&quot;;GTK_PRINT_BACKENDS=\&quot;file\&quot;;GTK_PRINT_PREVIEW_COMMAND=\&quot;undefined-gtk-print-preview-command\&quot;;$(GtkIncludedImmodulesDefines);GTK_LIBDIR=\&quot;$(GtkDummyPrefix)/lib\&quot;;GTK_DATADIR=\&quot;$(GtkDummyPrefix)/share\&quot;GTK_DATA_PREFIX=\&quot;$(GtkDummyPrefix)\&quot;;GTK_SYSCONFDIR=\&quot;$(GtkDummyPrefix)/etc\&quot;;MULTIPRESS_CONFDIR=\&quot;$(GtkDummyPrefix)/etc/gtk-$(GtkApiVersion)\&quot;;MULTIPRESS_LOCALEDIR=\&quot;$(GtkDummyPrefix)/share/locale\&quot;;GTK_VERSION=\&quot;$(GtkVersion)/etc\&quot;;GTK_BINARY_VERSION=\&quot;$(GtkBinaryVersion)/etc\&quot;;GDK_DISABLE_DEPRECATED"
Value="GTK_COMPILATION;G_LOG_DOMAIN=\&quot;Gtk\&quot;;GTK_HOST=\&quot;i686-pc-vs$(VSVer)\&quot;;GTK_PRINT_BACKENDS=\&quot;file\&quot;;GTK_PRINT_PREVIEW_COMMAND=\&quot;undefined-gtk-print-preview-command\&quot;;$(GtkIncludedImmodulesDefines);GTK_LIBDIR=\&quot;$(GtkDummyPrefix)/lib\&quot;;GTK_DATADIR=\&quot;$(GtkDummyPrefix)/share\&quot;GTK_DATA_PREFIX=\&quot;$(GtkDummyPrefix)\&quot;;GTK_SYSCONFDIR=\&quot;$(GtkDummyPrefix)/etc\&quot;;MULTIPRESS_CONFDIR=\&quot;$(GtkDummyPrefix)/etc/gtk-$(ApiVersion)\&quot;;MULTIPRESS_LOCALEDIR=\&quot;$(GtkDummyPrefix)/share/locale\&quot;;GTK_VERSION=\&quot;$(GtkVersion)/etc\&quot;;GTK_BINARY_VERSION=\&quot;$(GtkBinaryVersion)/etc\&quot;;GDK_DISABLE_DEPRECATED"
/>
<UserMacro
Name="GtkDoInstall"
@@ -71,308 +79,364 @@ mkdir $(CopyDir)\bin&#x0D;&#x0A;
copy $(ConfigurationName)\$(PlatformName)\bin\*.dll $(CopyDir)\bin&#x0D;&#x0A;
copy $(ConfigurationName)\$(PlatformName)\bin\*.exe $(CopyDir)\bin&#x0D;&#x0A;
mkdir $(CopyDir)\share\gtk-$(GtkApiVersion)\demo&#x0D;&#x0A;
copy ..\..\..\demos\gtk-demo\*.c $(CopyDir)\share\gtk-$(GtkApiVersion)\demo&#x0D;&#x0A;
copy ..\..\..\demos\gtk-demo\*.css $(CopyDir)\share\gtk-$(GtkApiVersion)\demo&#x0D;&#x0A;
copy ..\..\..\demos\gtk-demo\*.h $(CopyDir)\share\gtk-$(GtkApiVersion)\demo&#x0D;&#x0A;
copy ..\..\..\demos\gtk-demo\*.ui $(CopyDir)\share\gtk-$(GtkApiVersion)\demo&#x0D;&#x0A;
copy ..\..\..\demos\gtk-demo\*.jpg $(CopyDir)\share\gtk-$(GtkApiVersion)\demo&#x0D;&#x0A;
copy ..\..\..\demos\gtk-demo\*.png $(CopyDir)\share\gtk-$(GtkApiVersion)\demo&#x0D;&#x0A;
copy ..\..\..\demos\gtk-demo\*.gif $(CopyDir)\share\gtk-$(GtkApiVersion)\demo&#x0D;&#x0A;
mkdir $(CopyDir)\lib&#x0D;&#x0A;
copy $(ConfigurationName)\$(PlatformName)\bin\*-$(GtkApiVersion).lib $(CopyDir)\lib&#x0D;&#x0A;
copy $(ConfigurationName)\$(PlatformName)\bin\*-$(ApiVersion).lib $(CopyDir)\lib&#x0D;&#x0A;
mkdir $(CopyDir)\include\gtk-$(GtkApiVersion)\gdk&#x0D;&#x0A;
copy ..\..\..\gdk\gdk.h $(CopyDir)\include\gtk-$(GtkApiVersion)\gdk&#x0D;&#x0A;
copy ..\..\..\gdk\gdkapplaunchcontext.h $(CopyDir)\include\gtk-$(GtkApiVersion)\gdk&#x0D;&#x0A;
copy ..\..\..\gdk\gdkcairo.h $(CopyDir)\include\gtk-$(GtkApiVersion)\gdk&#x0D;&#x0A;
copy ..\..\..\gdk\gdkcolor.h $(CopyDir)\include\gtk-$(GtkApiVersion)\gdk&#x0D;&#x0A;
copy ..\..\..\gdk\gdkcursor.h $(CopyDir)\include\gtk-$(GtkApiVersion)\gdk&#x0D;&#x0A;
copy ..\..\..\gdk\gdkdevice.h $(CopyDir)\include\gtk-$(GtkApiVersion)\gdk&#x0D;&#x0A;
copy ..\..\..\gdk\gdkdevicemanager.h $(CopyDir)\include\gtk-$(GtkApiVersion)\gdk&#x0D;&#x0A;
copy ..\..\..\gdk\gdkdisplay.h $(CopyDir)\include\gtk-$(GtkApiVersion)\gdk&#x0D;&#x0A;
copy ..\..\..\gdk\gdkdisplaymanager.h $(CopyDir)\include\gtk-$(GtkApiVersion)\gdk&#x0D;&#x0A;
copy ..\..\..\gdk\gdkdnd.h $(CopyDir)\include\gtk-$(GtkApiVersion)\gdk&#x0D;&#x0A;
copy ..\..\..\gdk\gdkenumtypes.h $(CopyDir)\include\gtk-$(GtkApiVersion)\gdk&#x0D;&#x0A;
copy ..\..\..\gdk\gdkevents.h $(CopyDir)\include\gtk-$(GtkApiVersion)\gdk&#x0D;&#x0A;
copy ..\..\..\gdk\gdkkeys.h $(CopyDir)\include\gtk-$(GtkApiVersion)\gdk&#x0D;&#x0A;
copy ..\..\..\gdk\gdkkeysyms.h $(CopyDir)\include\gtk-$(GtkApiVersion)\gdk&#x0D;&#x0A;
copy ..\..\..\gdk\gdkmain.h $(CopyDir)\include\gtk-$(GtkApiVersion)\gdk&#x0D;&#x0A;
copy ..\..\..\gdk\gdkpango.h $(CopyDir)\include\gtk-$(GtkApiVersion)\gdk&#x0D;&#x0A;
copy ..\..\..\gdk\gdkpixbuf.h $(CopyDir)\include\gtk-$(GtkApiVersion)\gdk&#x0D;&#x0A;
copy ..\..\..\gdk\gdkprivate.h $(CopyDir)\include\gtk-$(GtkApiVersion)\gdk&#x0D;&#x0A;
copy ..\..\..\gdk\gdkproperty.h $(CopyDir)\include\gtk-$(GtkApiVersion)\gdk&#x0D;&#x0A;
copy ..\..\..\gdk\gdkrectangle.h $(CopyDir)\include\gtk-$(GtkApiVersion)\gdk&#x0D;&#x0A;
copy ..\..\..\gdk\gdkrgba.h $(CopyDir)\include\gtk-$(GtkApiVersion)\gdk&#x0D;&#x0A;
copy ..\..\..\gdk\gdkscreen.h $(CopyDir)\include\gtk-$(GtkApiVersion)\gdk&#x0D;&#x0A;
copy ..\..\..\gdk\gdkselection.h $(CopyDir)\include\gtk-$(GtkApiVersion)\gdk&#x0D;&#x0A;
copy ..\..\..\gdk\gdktestutils.h $(CopyDir)\include\gtk-$(GtkApiVersion)\gdk&#x0D;&#x0A;
copy ..\..\..\gdk\gdkthreads.h $(CopyDir)\include\gtk-$(GtkApiVersion)\gdk&#x0D;&#x0A;
copy ..\..\..\gdk\gdktypes.h $(CopyDir)\include\gtk-$(GtkApiVersion)\gdk&#x0D;&#x0A;
copy ..\..\..\gdk\gdkversionmacros.h $(CopyDir)\include\gtk-$(GtkApiVersion)\gdk&#x0D;&#x0A;
copy ..\..\..\gdk\gdkvisual.h $(CopyDir)\include\gtk-$(GtkApiVersion)\gdk&#x0D;&#x0A;
copy ..\..\..\gdk\win32\gdkwin32.h $(CopyDir)\include\gtk-$(GtkApiVersion)\gdk&#x0D;&#x0A;
copy ..\..\..\gdk\gdkwindow.h $(CopyDir)\include\gtk-$(GtkApiVersion)\gdk&#x0D;&#x0A;
mkdir $(CopyDir)\include\gtk-$(ApiVersion)\gdk&#x0D;&#x0A;
copy ..\..\..\gdk\gdk.h $(CopyDir)\include\gtk-$(ApiVersion)\gdk&#x0D;&#x0A;
copy ..\..\..\gdk\gdkapplaunchcontext.h $(CopyDir)\include\gtk-$(ApiVersion)\gdk&#x0D;&#x0A;
copy ..\..\..\gdk\gdkcairo.h $(CopyDir)\include\gtk-$(ApiVersion)\gdk&#x0D;&#x0A;
copy ..\..\..\gdk\gdkcolor.h $(CopyDir)\include\gtk-$(ApiVersion)\gdk&#x0D;&#x0A;
copy ..\..\..\gdk\gdkcursor.h $(CopyDir)\include\gtk-$(ApiVersion)\gdk&#x0D;&#x0A;
copy ..\..\..\gdk\gdkdevice.h $(CopyDir)\include\gtk-$(ApiVersion)\gdk&#x0D;&#x0A;
copy ..\..\..\gdk\gdkdevicemanager.h $(CopyDir)\include\gtk-$(ApiVersion)\gdk&#x0D;&#x0A;
copy ..\..\..\gdk\gdkdisplay.h $(CopyDir)\include\gtk-$(ApiVersion)\gdk&#x0D;&#x0A;
copy ..\..\..\gdk\gdkdisplaymanager.h $(CopyDir)\include\gtk-$(ApiVersion)\gdk&#x0D;&#x0A;
copy ..\..\..\gdk\gdkdnd.h $(CopyDir)\include\gtk-$(ApiVersion)\gdk&#x0D;&#x0A;
copy ..\..\..\gdk\gdkenumtypes.h $(CopyDir)\include\gtk-$(ApiVersion)\gdk&#x0D;&#x0A;
copy ..\..\..\gdk\gdkevents.h $(CopyDir)\include\gtk-$(ApiVersion)\gdk&#x0D;&#x0A;
copy ..\..\..\gdk\gdkframeclock.h $(CopyDir)\include\gtk-$(ApiVersion)\gdk&#x0D;&#x0A;
copy ..\..\..\gdk\gdkframetimings.h $(CopyDir)\include\gtk-$(ApiVersion)\gdk&#x0D;&#x0A;
copy ..\..\..\gdk\gdkkeys.h $(CopyDir)\include\gtk-$(ApiVersion)\gdk&#x0D;&#x0A;
copy ..\..\..\gdk\gdkkeysyms.h $(CopyDir)\include\gtk-$(ApiVersion)\gdk&#x0D;&#x0A;
copy ..\..\..\gdk\gdkmain.h $(CopyDir)\include\gtk-$(ApiVersion)\gdk&#x0D;&#x0A;
copy ..\..\..\gdk\gdkpango.h $(CopyDir)\include\gtk-$(ApiVersion)\gdk&#x0D;&#x0A;
copy ..\..\..\gdk\gdkpixbuf.h $(CopyDir)\include\gtk-$(ApiVersion)\gdk&#x0D;&#x0A;
copy ..\..\..\gdk\gdkprivate.h $(CopyDir)\include\gtk-$(ApiVersion)\gdk&#x0D;&#x0A;
copy ..\..\..\gdk\gdkproperty.h $(CopyDir)\include\gtk-$(ApiVersion)\gdk&#x0D;&#x0A;
copy ..\..\..\gdk\gdkrectangle.h $(CopyDir)\include\gtk-$(ApiVersion)\gdk&#x0D;&#x0A;
copy ..\..\..\gdk\gdkrgba.h $(CopyDir)\include\gtk-$(ApiVersion)\gdk&#x0D;&#x0A;
copy ..\..\..\gdk\gdkscreen.h $(CopyDir)\include\gtk-$(ApiVersion)\gdk&#x0D;&#x0A;
copy ..\..\..\gdk\gdkselection.h $(CopyDir)\include\gtk-$(ApiVersion)\gdk&#x0D;&#x0A;
copy ..\..\..\gdk\gdktestutils.h $(CopyDir)\include\gtk-$(ApiVersion)\gdk&#x0D;&#x0A;
copy ..\..\..\gdk\gdkthreads.h $(CopyDir)\include\gtk-$(ApiVersion)\gdk&#x0D;&#x0A;
copy ..\..\..\gdk\gdktypes.h $(CopyDir)\include\gtk-$(ApiVersion)\gdk&#x0D;&#x0A;
copy ..\..\..\gdk\gdkversionmacros.h $(CopyDir)\include\gtk-$(ApiVersion)\gdk&#x0D;&#x0A;
copy ..\..\..\gdk\gdkvisual.h $(CopyDir)\include\gtk-$(ApiVersion)\gdk&#x0D;&#x0A;
copy ..\..\..\gdk\win32\gdkwin32.h $(CopyDir)\include\gtk-$(ApiVersion)\gdk&#x0D;&#x0A;
copy ..\..\..\gdk\gdkwindow.h $(CopyDir)\include\gtk-$(ApiVersion)\gdk&#x0D;&#x0A;
mkdir $(CopyDir)\include\gtk-$(GtkApiVersion)\gdk\win32&#x0D;&#x0A;
copy ..\..\..\gdk\win32\gdkwin32cursor.h $(CopyDir)\include\gtk-$(GtkApiVersion)\gdk\win32&#x0D;&#x0A;
copy ..\..\..\gdk\win32\gdkwin32display.h $(CopyDir)\include\gtk-$(GtkApiVersion)\gdk\win32&#x0D;&#x0A;
copy ..\..\..\gdk\win32\gdkwin32displaymanager.h $(CopyDir)\include\gtk-$(GtkApiVersion)\gdk\win32&#x0D;&#x0A;
copy ..\..\..\gdk\win32\gdkwin32dnd.h $(CopyDir)\include\gtk-$(GtkApiVersion)\gdk\win32&#x0D;&#x0A;
copy ..\..\..\gdk\win32\gdkwin32keys.h $(CopyDir)\include\gtk-$(GtkApiVersion)\gdk\win32&#x0D;&#x0A;
copy ..\..\..\gdk\win32\gdkwin32screen.h $(CopyDir)\include\gtk-$(GtkApiVersion)\gdk\win32&#x0D;&#x0A;
copy ..\..\..\gdk\win32\gdkwin32window.h $(CopyDir)\include\gtk-$(GtkApiVersion)\gdk\win32&#x0D;&#x0A;
mkdir $(CopyDir)\include\gtk-$(ApiVersion)\gdk\win32&#x0D;&#x0A;
copy ..\..\..\gdk\win32\gdkwin32cursor.h $(CopyDir)\include\gtk-$(ApiVersion)\gdk\win32&#x0D;&#x0A;
copy ..\..\..\gdk\win32\gdkwin32display.h $(CopyDir)\include\gtk-$(ApiVersion)\gdk\win32&#x0D;&#x0A;
copy ..\..\..\gdk\win32\gdkwin32displaymanager.h $(CopyDir)\include\gtk-$(ApiVersion)\gdk\win32&#x0D;&#x0A;
copy ..\..\..\gdk\win32\gdkwin32dnd.h $(CopyDir)\include\gtk-$(ApiVersion)\gdk\win32&#x0D;&#x0A;
copy ..\..\..\gdk\win32\gdkwin32keys.h $(CopyDir)\include\gtk-$(ApiVersion)\gdk\win32&#x0D;&#x0A;
copy ..\..\..\gdk\win32\gdkwin32screen.h $(CopyDir)\include\gtk-$(ApiVersion)\gdk\win32&#x0D;&#x0A;
copy ..\..\..\gdk\win32\gdkwin32window.h $(CopyDir)\include\gtk-$(ApiVersion)\gdk\win32&#x0D;&#x0A;
mkdir $(CopyDir)\include\gtk-$(GtkApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtk.h $(CopyDir)\include\gtk-$(GtkApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtkaboutdialog.h $(CopyDir)\include\gtk-$(GtkApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtkaccelgroup.h $(CopyDir)\include\gtk-$(GtkApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtkaccelgroupprivate.h $(CopyDir)\include\gtk-$(GtkApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtkaccellabel.h $(CopyDir)\include\gtk-$(GtkApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtkaccelmap.h $(CopyDir)\include\gtk-$(GtkApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtkaccessible.h $(CopyDir)\include\gtk-$(GtkApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtkaction.h $(CopyDir)\include\gtk-$(GtkApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtkactiongroup.h $(CopyDir)\include\gtk-$(GtkApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtkactionable.h $(CopyDir)\include\gtk-$(GtkApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtkactivatable.h $(CopyDir)\include\gtk-$(GtkApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtkadjustment.h $(CopyDir)\include\gtk-$(GtkApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtkalignment.h $(CopyDir)\include\gtk-$(GtkApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtkappchooser.h $(CopyDir)\include\gtk-$(GtkApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtkappchooserbutton.h $(CopyDir)\include\gtk-$(GtkApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtkappchooserdialog.h $(CopyDir)\include\gtk-$(GtkApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtkappchooserwidget.h $(CopyDir)\include\gtk-$(GtkApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtkapplication.h $(CopyDir)\include\gtk-$(GtkApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtkapplicationwindow.h $(CopyDir)\include\gtk-$(GtkApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtkarrow.h $(CopyDir)\include\gtk-$(GtkApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtkaspectframe.h $(CopyDir)\include\gtk-$(GtkApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtkassistant.h $(CopyDir)\include\gtk-$(GtkApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtkbbox.h $(CopyDir)\include\gtk-$(GtkApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtkbin.h $(CopyDir)\include\gtk-$(GtkApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtkbindings.h $(CopyDir)\include\gtk-$(GtkApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtkbox.h $(CopyDir)\include\gtk-$(GtkApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtkborder.h $(CopyDir)\include\gtk-$(GtkApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtkbuildable.h $(CopyDir)\include\gtk-$(GtkApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtkbuilder.h $(CopyDir)\include\gtk-$(GtkApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtkbutton.h $(CopyDir)\include\gtk-$(GtkApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtkcalendar.h $(CopyDir)\include\gtk-$(GtkApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtkcellarea.h $(CopyDir)\include\gtk-$(GtkApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtkcellareabox.h $(CopyDir)\include\gtk-$(GtkApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtkcellareacontext.h $(CopyDir)\include\gtk-$(GtkApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtkcelleditable.h $(CopyDir)\include\gtk-$(GtkApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtkcelllayout.h $(CopyDir)\include\gtk-$(GtkApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtkcellrenderer.h $(CopyDir)\include\gtk-$(GtkApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtkcellrendereraccel.h $(CopyDir)\include\gtk-$(GtkApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtkcellrenderercombo.h $(CopyDir)\include\gtk-$(GtkApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtkcellrendererpixbuf.h $(CopyDir)\include\gtk-$(GtkApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtkcellrendererprogress.h $(CopyDir)\include\gtk-$(GtkApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtkcellrendererspin.h $(CopyDir)\include\gtk-$(GtkApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtkcellrendererspinner.h $(CopyDir)\include\gtk-$(GtkApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtkcellrenderertext.h $(CopyDir)\include\gtk-$(GtkApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtkcellrenderertoggle.h $(CopyDir)\include\gtk-$(GtkApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtkcellview.h $(CopyDir)\include\gtk-$(GtkApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtkcheckbutton.h $(CopyDir)\include\gtk-$(GtkApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtkcheckmenuitem.h $(CopyDir)\include\gtk-$(GtkApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtkclipboard.h $(CopyDir)\include\gtk-$(GtkApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtkcolorbutton.h $(CopyDir)\include\gtk-$(GtkApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtkcolorchooser.h $(CopyDir)\include\gtk-$(GtkApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtkcolorchooserwidget.h $(CopyDir)\include\gtk-$(GtkApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtkcolorchooserdialog.h $(CopyDir)\include\gtk-$(GtkApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtkcolorutils.h $(CopyDir)\include\gtk-$(GtkApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtkcombobox.h $(CopyDir)\include\gtk-$(GtkApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtkcomboboxtext.h $(CopyDir)\include\gtk-$(GtkApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtkcontainer.h $(CopyDir)\include\gtk-$(GtkApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtkcssprovider.h $(CopyDir)\include\gtk-$(GtkApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtkcsssection.h $(CopyDir)\include\gtk-$(GtkApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtkdebug.h $(CopyDir)\include\gtk-$(GtkApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtkdialog.h $(CopyDir)\include\gtk-$(GtkApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtkdnd.h $(CopyDir)\include\gtk-$(GtkApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtkdrawingarea.h $(CopyDir)\include\gtk-$(GtkApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtkeditable.h $(CopyDir)\include\gtk-$(GtkApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtkentry.h $(CopyDir)\include\gtk-$(GtkApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtkentrybuffer.h $(CopyDir)\include\gtk-$(GtkApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtkentrycompletion.h $(CopyDir)\include\gtk-$(GtkApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtkenums.h $(CopyDir)\include\gtk-$(GtkApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtkeventbox.h $(CopyDir)\include\gtk-$(GtkApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtkexpander.h $(CopyDir)\include\gtk-$(GtkApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtkfilechooser.h $(CopyDir)\include\gtk-$(GtkApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtkfilechooserbutton.h $(CopyDir)\include\gtk-$(GtkApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtkfilechooserdialog.h $(CopyDir)\include\gtk-$(GtkApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtkfilechooserwidget.h $(CopyDir)\include\gtk-$(GtkApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtkfilefilter.h $(CopyDir)\include\gtk-$(GtkApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtkfixed.h $(CopyDir)\include\gtk-$(GtkApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtkfontbutton.h $(CopyDir)\include\gtk-$(GtkApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtkfontchooser.h $(CopyDir)\include\gtk-$(GtkApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtkfontchooserdialog.h $(CopyDir)\include\gtk-$(GtkApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtkfontchooserwidget.h $(CopyDir)\include\gtk-$(GtkApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtkframe.h $(CopyDir)\include\gtk-$(GtkApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtkgradient.h $(CopyDir)\include\gtk-$(GtkApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtkgrid.h $(CopyDir)\include\gtk-$(GtkApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtkiconfactory.h $(CopyDir)\include\gtk-$(GtkApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtkicontheme.h $(CopyDir)\include\gtk-$(GtkApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtkiconview.h $(CopyDir)\include\gtk-$(GtkApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtkimage.h $(CopyDir)\include\gtk-$(GtkApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtkimagemenuitem.h $(CopyDir)\include\gtk-$(GtkApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtkimcontext.h $(CopyDir)\include\gtk-$(GtkApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtkimcontextinfo.h $(CopyDir)\include\gtk-$(GtkApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtkimcontextsimple.h $(CopyDir)\include\gtk-$(GtkApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtkimmodule.h $(CopyDir)\include\gtk-$(GtkApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtkimmulticontext.h $(CopyDir)\include\gtk-$(GtkApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtkinfobar.h $(CopyDir)\include\gtk-$(GtkApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtkinvisible.h $(CopyDir)\include\gtk-$(GtkApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtklabel.h $(CopyDir)\include\gtk-$(GtkApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtklayout.h $(CopyDir)\include\gtk-$(GtkApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtklevelbar.h $(CopyDir)\include\gtk-$(GtkApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtklinkbutton.h $(CopyDir)\include\gtk-$(GtkApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtkliststore.h $(CopyDir)\include\gtk-$(GtkApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtklockbutton.h $(CopyDir)\include\gtk-$(GtkApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtkmain.h $(CopyDir)\include\gtk-$(GtkApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtkmenu.h $(CopyDir)\include\gtk-$(GtkApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtkmenubar.h $(CopyDir)\include\gtk-$(GtkApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtkmenubutton.h $(CopyDir)\include\gtk-$(GtkApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtkmenuitem.h $(CopyDir)\include\gtk-$(GtkApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtkmenushell.h $(CopyDir)\include\gtk-$(GtkApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtkmenutoolbutton.h $(CopyDir)\include\gtk-$(GtkApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtkmessagedialog.h $(CopyDir)\include\gtk-$(GtkApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtkmisc.h $(CopyDir)\include\gtk-$(GtkApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtkmodules.h $(CopyDir)\include\gtk-$(GtkApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtkmountoperation.h $(CopyDir)\include\gtk-$(GtkApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtknotebook.h $(CopyDir)\include\gtk-$(GtkApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtknumerableicon.h $(CopyDir)\include\gtk-$(GtkApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtkoffscreenwindow.h $(CopyDir)\include\gtk-$(GtkApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtkorientable.h $(CopyDir)\include\gtk-$(GtkApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtkoverlay.h $(CopyDir)\include\gtk-$(GtkApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtkpagesetup.h $(CopyDir)\include\gtk-$(GtkApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtkpaned.h $(CopyDir)\include\gtk-$(GtkApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtkpapersize.h $(CopyDir)\include\gtk-$(GtkApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtkplug.h $(CopyDir)\include\gtk-$(GtkApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtkprintcontext.h $(CopyDir)\include\gtk-$(GtkApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtkprintoperation.h $(CopyDir)\include\gtk-$(GtkApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtkprintoperationpreview.h $(CopyDir)\include\gtk-$(GtkApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtkprintsettings.h $(CopyDir)\include\gtk-$(GtkApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtkprivate.h $(CopyDir)\include\gtk-$(GtkApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtkprivatetypebuiltins.h $(CopyDir)\include\gtk-$(GtkApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtkprogressbar.h $(CopyDir)\include\gtk-$(GtkApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtkradioaction.h $(CopyDir)\include\gtk-$(GtkApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtkradiobutton.h $(CopyDir)\include\gtk-$(GtkApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtkradiomenuitem.h $(CopyDir)\include\gtk-$(GtkApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtkradiotoolbutton.h $(CopyDir)\include\gtk-$(GtkApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtkrange.h $(CopyDir)\include\gtk-$(GtkApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtkrecentaction.h $(CopyDir)\include\gtk-$(GtkApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtkrecentchooser.h $(CopyDir)\include\gtk-$(GtkApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtkrecentchooserdialog.h $(CopyDir)\include\gtk-$(GtkApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtkrecentchoosermenu.h $(CopyDir)\include\gtk-$(GtkApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtkrecentchooserwidget.h $(CopyDir)\include\gtk-$(GtkApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtkrecentfilter.h $(CopyDir)\include\gtk-$(GtkApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtkrecentmanager.h $(CopyDir)\include\gtk-$(GtkApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtkscale.h $(CopyDir)\include\gtk-$(GtkApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtkscalebutton.h $(CopyDir)\include\gtk-$(GtkApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtkscrollable.h $(CopyDir)\include\gtk-$(GtkApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtkscrollbar.h $(CopyDir)\include\gtk-$(GtkApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtkscrolledwindow.h $(CopyDir)\include\gtk-$(GtkApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtksearchentry.h $(CopyDir)\include\gtk-$(GtkApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtkselection.h $(CopyDir)\include\gtk-$(GtkApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtkseparator.h $(CopyDir)\include\gtk-$(GtkApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtkseparatormenuitem.h $(CopyDir)\include\gtk-$(GtkApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtkseparatortoolitem.h $(CopyDir)\include\gtk-$(GtkApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtksettings.h $(CopyDir)\include\gtk-$(GtkApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtkshow.h $(CopyDir)\include\gtk-$(GtkApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtksizegroup.h $(CopyDir)\include\gtk-$(GtkApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtksizerequest.h $(CopyDir)\include\gtk-$(GtkApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtksocket.h $(CopyDir)\include\gtk-$(GtkApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtkspinbutton.h $(CopyDir)\include\gtk-$(GtkApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtkspinner.h $(CopyDir)\include\gtk-$(GtkApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtkstatusbar.h $(CopyDir)\include\gtk-$(GtkApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtkstatusicon.h $(CopyDir)\include\gtk-$(GtkApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtkstock.h $(CopyDir)\include\gtk-$(GtkApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtkstylecontext.h $(CopyDir)\include\gtk-$(GtkApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtkstyleproperties.h $(CopyDir)\include\gtk-$(GtkApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtkstyleprovider.h $(CopyDir)\include\gtk-$(GtkApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtkswitch.h $(CopyDir)\include\gtk-$(GtkApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtksymboliccolor.h $(CopyDir)\include\gtk-$(GtkApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtktestutils.h $(CopyDir)\include\gtk-$(GtkApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtktextattributes.h $(CopyDir)\include\gtk-$(GtkApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtktextbuffer.h $(CopyDir)\include\gtk-$(GtkApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtktextbufferrichtext.h $(CopyDir)\include\gtk-$(GtkApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtktextchild.h $(CopyDir)\include\gtk-$(GtkApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtktextdisplay.h $(CopyDir)\include\gtk-$(GtkApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtktextiter.h $(CopyDir)\include\gtk-$(GtkApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtktextlayout.h $(CopyDir)\include\gtk-$(GtkApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtktextmark.h $(CopyDir)\include\gtk-$(GtkApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtktexttag.h $(CopyDir)\include\gtk-$(GtkApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtktexttagtable.h $(CopyDir)\include\gtk-$(GtkApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtktextview.h $(CopyDir)\include\gtk-$(GtkApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtkthemingengine.h $(CopyDir)\include\gtk-$(GtkApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtktoggleaction.h $(CopyDir)\include\gtk-$(GtkApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtktogglebutton.h $(CopyDir)\include\gtk-$(GtkApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtktoggletoolbutton.h $(CopyDir)\include\gtk-$(GtkApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtktoolbar.h $(CopyDir)\include\gtk-$(GtkApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtktoolbutton.h $(CopyDir)\include\gtk-$(GtkApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtktoolitem.h $(CopyDir)\include\gtk-$(GtkApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtktoolitemgroup.h $(CopyDir)\include\gtk-$(GtkApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtktoolpalette.h $(CopyDir)\include\gtk-$(GtkApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtktoolshell.h $(CopyDir)\include\gtk-$(GtkApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtktooltip.h $(CopyDir)\include\gtk-$(GtkApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtktreednd.h $(CopyDir)\include\gtk-$(GtkApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtktreemodel.h $(CopyDir)\include\gtk-$(GtkApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtktreemodelfilter.h $(CopyDir)\include\gtk-$(GtkApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtktreemodelsort.h $(CopyDir)\include\gtk-$(GtkApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtktreeselection.h $(CopyDir)\include\gtk-$(GtkApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtktreesortable.h $(CopyDir)\include\gtk-$(GtkApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtktreestore.h $(CopyDir)\include\gtk-$(GtkApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtktreeview.h $(CopyDir)\include\gtk-$(GtkApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtktreeviewcolumn.h $(CopyDir)\include\gtk-$(GtkApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtktypebuiltins.h $(CopyDir)\include\gtk-$(GtkApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtktypes.h $(CopyDir)\include\gtk-$(GtkApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtkuimanager.h $(CopyDir)\include\gtk-$(GtkApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtkversion.h $(CopyDir)\include\gtk-$(GtkApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtkviewport.h $(CopyDir)\include\gtk-$(GtkApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtkvolumebutton.h $(CopyDir)\include\gtk-$(GtkApiVersion)\gtk&#x0D;&#x0A;;
copy ..\..\..\gtk\gtkwidget.h $(CopyDir)\include\gtk-$(GtkApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtkwidgetpath.h $(CopyDir)\include\gtk-$(GtkApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtkwindow.h $(CopyDir)\include\gtk-$(GtkApiVersion)\gtk&#x0D;&#x0A;
mkdir $(CopyDir)\include\gtk-$(ApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtk.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtkx.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtk-a11y.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtkaboutdialog.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtkaccelgroup.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtkaccelgroupprivate.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtkaccellabel.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtkaccelmap.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtkaccessible.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtkaction.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtkactiongroup.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtkactionable.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtkactivatable.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtkadjustment.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtkalignment.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtkappchooser.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtkappchooserbutton.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtkappchooserdialog.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtkappchooserwidget.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtkapplication.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtkapplicationwindow.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtkarrow.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtkaspectframe.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtkassistant.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtkbbox.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtkbin.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtkbindings.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtkbox.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtkborder.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtkbuildable.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtkbuilder.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtkbutton.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtkcalendar.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtkcellarea.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtkcellareabox.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtkcellareacontext.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtkcelleditable.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtkcelllayout.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtkcellrenderer.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtkcellrendereraccel.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtkcellrenderercombo.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtkcellrendererpixbuf.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtkcellrendererprogress.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtkcellrendererspin.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtkcellrendererspinner.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtkcellrenderertext.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtkcellrenderertoggle.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtkcellview.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtkcheckbutton.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtkcheckmenuitem.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtkclipboard.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtkcolorbutton.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtkcolorchooser.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtkcolorchooserwidget.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtkcolorchooserdialog.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtkcolorutils.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtkcombobox.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtkcomboboxtext.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtkcontainer.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtkcssprovider.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtkcsssection.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtkdebug.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtkdialog.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtkdnd.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtkdrawingarea.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtkeditable.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtkentry.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtkentrybuffer.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtkentrycompletion.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtkenums.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtkeventbox.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtkexpander.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtkfilechooser.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtkfilechooserbutton.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtkfilechooserdialog.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtkfilechooserwidget.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtkfilefilter.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtkfixed.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtkfontbutton.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtkfontchooser.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtkfontchooserdialog.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtkfontchooserwidget.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtkframe.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtkgrid.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtkiconfactory.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtkicontheme.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtkiconview.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtkimage.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtkimagemenuitem.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtkimcontext.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtkimcontextinfo.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtkimcontextsimple.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtkimmodule.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtkimmulticontext.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtkinfobar.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtkinvisible.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtklabel.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtklayout.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtklevelbar.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtklinkbutton.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtkliststore.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtklockbutton.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtkmain.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtkmenu.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtkmenubar.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtkmenubutton.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtkmenuitem.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtkmenushell.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtkmenutoolbutton.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtkmessagedialog.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtkmisc.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtkmodules.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtkmountoperation.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtknotebook.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtknumerableicon.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtkoffscreenwindow.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtkorientable.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtkoverlay.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtkpagesetup.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtkpaned.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtkpapersize.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtkplug.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtkprintcontext.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtkprintoperation.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtkprintoperationpreview.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtkprintsettings.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtkprivate.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtkprivatetypebuiltins.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtkprogressbar.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtkradioaction.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtkradiobutton.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtkradiomenuitem.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtkradiotoolbutton.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtkrange.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtkrecentaction.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtkrecentchooser.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtkrecentchooserdialog.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtkrecentchoosermenu.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtkrecentchooserwidget.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtkrecentfilter.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtkrecentmanager.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtkscale.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtkscalebutton.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtkscrollable.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtkscrollbar.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtkscrolledwindow.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtksearchentry.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtkselection.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtkseparator.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtkseparatormenuitem.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtkseparatortoolitem.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtksettings.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtkshow.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtksizegroup.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtksizerequest.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtksocket.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtkspinbutton.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtkspinner.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtkstatusbar.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtkstatusicon.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtkstock.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtkstylecontext.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtkstyleproperties.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtkstyleprovider.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtkswitch.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtktestutils.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtktextattributes.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtktextbuffer.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtktextbufferrichtext.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtktextchild.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtktextdisplay.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtktextiter.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtktextlayout.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtktextmark.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtktexttag.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtktexttagtable.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtktextview.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtkthemingengine.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtktoggleaction.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtktogglebutton.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtktoggletoolbutton.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtktoolbar.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtktoolbutton.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtktoolitem.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtktoolitemgroup.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtktoolpalette.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtktoolshell.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtktooltip.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtktreednd.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtktreemodel.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtktreemodelfilter.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtktreemodelsort.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtktreeselection.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtktreesortable.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtktreestore.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtktreeview.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtktreeviewcolumn.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtktypebuiltins.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtktypes.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtkuimanager.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtkversion.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtkviewport.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtkvolumebutton.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk&#x0D;&#x0A;;
copy ..\..\..\gtk\gtkwidget.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtkwidgetpath.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtkwindow.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk&#x0D;&#x0A;
mkdir $(CopyDir)\include\gtk-$(GtkApiVersion)\gtk\deprecated&#x0D;&#x0A;
mkdir $(CopyDir)\include\gtk-$(ApiVersion)\gtk\deprecated&#x0D;&#x0A;
copy ..\..\..\gtk\deprecated\gtkcolorsel.h $(CopyDir)\include\gtk-$(GtkApiVersion)\gtk\deprecated&#x0D;&#x0A;
copy ..\..\..\gtk\deprecated\gtkcolorseldialog.h $(CopyDir)\include\gtk-$(GtkApiVersion)\gtk\deprecated&#x0D;&#x0A;
copy ..\..\..\gtk\deprecated\gtkfontsel.h $(CopyDir)\include\gtk-$(GtkApiVersion)\gtk\deprecated&#x0D;&#x0A;
copy ..\..\..\gtk\deprecated\gtkhandlebox.h $(CopyDir)\include\gtk-$(GtkApiVersion)\gtk\deprecated&#x0D;&#x0A;
copy ..\..\..\gtk\deprecated\gtkhbbox.h $(CopyDir)\include\gtk-$(GtkApiVersion)\gtk\deprecated&#x0D;&#x0A;
copy ..\..\..\gtk\deprecated\gtkhbox.h $(CopyDir)\include\gtk-$(GtkApiVersion)\gtk\deprecated&#x0D;&#x0A;
copy ..\..\..\gtk\deprecated\gtkhpaned.h $(CopyDir)\include\gtk-$(GtkApiVersion)\gtk\deprecated&#x0D;&#x0A;
copy ..\..\..\gtk\deprecated\gtkhscale.h $(CopyDir)\include\gtk-$(GtkApiVersion)\gtk\deprecated&#x0D;&#x0A;
copy ..\..\..\gtk\deprecated\gtkhsv.h $(CopyDir)\include\gtk-$(GtkApiVersion)\gtk\deprecated&#x0D;&#x0A;
copy ..\..\..\gtk\deprecated\gtkhscrollbar.h $(CopyDir)\include\gtk-$(GtkApiVersion)\gtk\deprecated&#x0D;&#x0A;
copy ..\..\..\gtk\deprecated\gtkhseparator.h $(CopyDir)\include\gtk-$(GtkApiVersion)\gtk\deprecated&#x0D;&#x0A;
copy ..\..\..\gtk\deprecated\gtkrc.h $(CopyDir)\include\gtk-$(GtkApiVersion)\gtk\deprecated&#x0D;&#x0A;
copy ..\..\..\gtk\deprecated\gtkstyle.h $(CopyDir)\include\gtk-$(GtkApiVersion)\gtk\deprecated&#x0D;&#x0A;
copy ..\..\..\gtk\deprecated\gtktable.h $(CopyDir)\include\gtk-$(GtkApiVersion)\gtk\deprecated&#x0D;&#x0A;
copy ..\..\..\gtk\deprecated\gtktearoffmenuitem.h $(CopyDir)\include\gtk-$(GtkApiVersion)\gtk\deprecated&#x0D;&#x0A;
copy ..\..\..\gtk\deprecated\gtkvbbox.h $(CopyDir)\include\gtk-$(GtkApiVersion)\gtk\deprecated&#x0D;&#x0A;
copy ..\..\..\gtk\deprecated\gtkvbox.h $(CopyDir)\include\gtk-$(GtkApiVersion)\gtk\deprecated&#x0D;&#x0A;
copy ..\..\..\gtk\deprecated\gtkvscale.h $(CopyDir)\include\gtk-$(GtkApiVersion)\gtk\deprecated&#x0D;&#x0A;
copy ..\..\..\gtk\deprecated\gtkvscrollbar.h $(CopyDir)\include\gtk-$(GtkApiVersion)\gtk\deprecated&#x0D;&#x0A;
copy ..\..\..\gtk\deprecated\gtkvseparator.h $(CopyDir)\include\gtk-$(GtkApiVersion)\gtk\deprecated&#x0D;&#x0A;
copy ..\..\..\gtk\deprecated\gtkvpaned.h $(CopyDir)\include\gtk-$(GtkApiVersion)\gtk\deprecated&#x0D;&#x0A;
copy ..\..\..\gtk\deprecated\gtkcolorsel.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk\deprecated&#x0D;&#x0A;
copy ..\..\..\gtk\deprecated\gtkcolorseldialog.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk\deprecated&#x0D;&#x0A;
copy ..\..\..\gtk\deprecated\gtkfontsel.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk\deprecated&#x0D;&#x0A;
copy ..\..\..\gtk\deprecated\gtkgradient.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk\deprecated&#x0D;&#x0A;
copy ..\..\..\gtk\deprecated\gtkhandlebox.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk\deprecated&#x0D;&#x0A;
copy ..\..\..\gtk\deprecated\gtkhbbox.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk\deprecated&#x0D;&#x0A;
copy ..\..\..\gtk\deprecated\gtkhbox.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk\deprecated&#x0D;&#x0A;
copy ..\..\..\gtk\deprecated\gtkhpaned.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk\deprecated&#x0D;&#x0A;
copy ..\..\..\gtk\deprecated\gtkhscale.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk\deprecated&#x0D;&#x0A;
copy ..\..\..\gtk\deprecated\gtkhsv.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk\deprecated&#x0D;&#x0A;
copy ..\..\..\gtk\deprecated\gtkhscrollbar.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk\deprecated&#x0D;&#x0A;
copy ..\..\..\gtk\deprecated\gtkhseparator.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk\deprecated&#x0D;&#x0A;
copy ..\..\..\gtk\deprecated\gtkrc.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk\deprecated&#x0D;&#x0A;
copy ..\..\..\gtk\deprecated\gtkstyle.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk\deprecated&#x0D;&#x0A;
copy ..\..\..\gtk\deprecated\gtksymboliccolor.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk\deprecated&#x0D;&#x0A;
copy ..\..\..\gtk\deprecated\gtktable.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk\deprecated&#x0D;&#x0A;
copy ..\..\..\gtk\deprecated\gtktearoffmenuitem.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk\deprecated&#x0D;&#x0A;
copy ..\..\..\gtk\deprecated\gtkvbbox.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk\deprecated&#x0D;&#x0A;
copy ..\..\..\gtk\deprecated\gtkvbox.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk\deprecated&#x0D;&#x0A;
copy ..\..\..\gtk\deprecated\gtkvscale.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk\deprecated&#x0D;&#x0A;
copy ..\..\..\gtk\deprecated\gtkvscrollbar.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk\deprecated&#x0D;&#x0A;
copy ..\..\..\gtk\deprecated\gtkvseparator.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk\deprecated&#x0D;&#x0A;
copy ..\..\..\gtk\deprecated\gtkvpaned.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk\deprecated&#x0D;&#x0A;
mkdir $(CopyDir)\include\gail-$(GtkApiVersion)\libgail-util&#x0D;&#x0A;
copy ..\..\..\libgail-util\gail-util.h $(CopyDir)\include\gail-$(GtkApiVersion)\libgail-util&#x0D;&#x0A;
copy ..\..\..\libgail-util\gailmisc.h $(CopyDir)\include\gail-$(GtkApiVersion)\libgail-util&#x0D;&#x0A;
copy ..\..\..\libgail-util\gailtextutil.h $(CopyDir)\include\gail-$(GtkApiVersion)\libgail-util&#x0D;&#x0A;
mkdir $(CopyDir)\include\gtk-$(ApiVersion)\gtk\a11y&#x0D;&#x0A;
copy ..\..\..\gtk\a11y\gtkarrowaccessible.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk\a11y&#x0D;&#x0A;
copy ..\..\..\gtk\a11y\gtkbooleancellaccessible.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk\a11y&#x0D;&#x0A;
copy ..\..\..\gtk\a11y\gtkbuttonaccessible.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk\a11y&#x0D;&#x0A;
copy ..\..\..\gtk\a11y\gtkcellaccessible.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk\a11y&#x0D;&#x0A;
copy ..\..\..\gtk\a11y\gtkcellaccessibleparent.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk\a11y&#x0D;&#x0A;
copy ..\..\..\gtk\a11y\gtkcheckmenuitemaccessible.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk\a11y&#x0D;&#x0A;
copy ..\..\..\gtk\a11y\gtkcomboboxaccessible.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk\a11y&#x0D;&#x0A;
copy ..\..\..\gtk\a11y\gtkcontaineraccessible.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk\a11y&#x0D;&#x0A;
copy ..\..\..\gtk\a11y\gtkcontainercellaccessible.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk\a11y&#x0D;&#x0A;
copy ..\..\..\gtk\a11y\gtkentryaccessible.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk\a11y&#x0D;&#x0A;
copy ..\..\..\gtk\a11y\gtkexpanderaccessible.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk\a11y&#x0D;&#x0A;
copy ..\..\..\gtk\a11y\gtkframeaccessible.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk\a11y&#x0D;&#x0A;
copy ..\..\..\gtk\a11y\gtkiconviewaccessible.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk\a11y&#x0D;&#x0A;
copy ..\..\..\gtk\a11y\gtkimageaccessible.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk\a11y&#x0D;&#x0A;
copy ..\..\..\gtk\a11y\gtkimagecellaccessible.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk\a11y&#x0D;&#x0A;
copy ..\..\..\gtk\a11y\gtklabelaccessible.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk\a11y&#x0D;&#x0A;
copy ..\..\..\gtk\a11y\gtklevelbaraccessible.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk\a11y&#x0D;&#x0A;
copy ..\..\..\gtk\a11y\gtklinkbuttonaccessible.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk\a11y&#x0D;&#x0A;
copy ..\..\..\gtk\a11y\gtklockbuttonaccessible.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk\a11y&#x0D;&#x0A;
copy ..\..\..\gtk\a11y\gtkmenuaccessible.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk\a11y&#x0D;&#x0A;
copy ..\..\..\gtk\a11y\gtkmenuitemaccessible.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk\a11y&#x0D;&#x0A;
copy ..\..\..\gtk\a11y\gtkmenushellaccessible.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk\a11y&#x0D;&#x0A;
copy ..\..\..\gtk\a11y\gtknotebookaccessible.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk\a11y&#x0D;&#x0A;
copy ..\..\..\gtk\a11y\gtknotebookpageaccessible.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk\a11y&#x0D;&#x0A;
copy ..\..\..\gtk\a11y\gtkpanedaccessible.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk\a11y&#x0D;&#x0A;
copy ..\..\..\gtk\a11y\gtkprogressbaraccessible.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk\a11y&#x0D;&#x0A;
copy ..\..\..\gtk\a11y\gtkradiobuttonaccessible.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk\a11y&#x0D;&#x0A;
copy ..\..\..\gtk\a11y\gtkradiomenuitemaccessible.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk\a11y&#x0D;&#x0A;
copy ..\..\..\gtk\a11y\gtkrangeaccessible.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk\a11y&#x0D;&#x0A;
copy ..\..\..\gtk\a11y\gtkrenderercellaccessible.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk\a11y&#x0D;&#x0A;
copy ..\..\..\gtk\a11y\gtkscaleaccessible.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk\a11y&#x0D;&#x0A;
copy ..\..\..\gtk\a11y\gtkscalebuttonaccessible.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk\a11y&#x0D;&#x0A;
copy ..\..\..\gtk\a11y\gtkscrolledwindowaccessible.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk\a11y&#x0D;&#x0A;
copy ..\..\..\gtk\a11y\gtkspinbuttonaccessible.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk\a11y&#x0D;&#x0A;
copy ..\..\..\gtk\a11y\gtkspinneraccessible.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk\a11y&#x0D;&#x0A;
copy ..\..\..\gtk\a11y\gtkstatusbaraccessible.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk\a11y&#x0D;&#x0A;
copy ..\..\..\gtk\a11y\gtkswitchaccessible.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk\a11y&#x0D;&#x0A;
copy ..\..\..\gtk\a11y\gtktextcellaccessible.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk\a11y&#x0D;&#x0A;
copy ..\..\..\gtk\a11y\gtktextviewaccessible.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk\a11y&#x0D;&#x0A;
copy ..\..\..\gtk\a11y\gtktogglebuttonaccessible.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk\a11y&#x0D;&#x0A;
copy ..\..\..\gtk\a11y\gtktoplevelaccessible.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk\a11y&#x0D;&#x0A;
copy ..\..\..\gtk\a11y\gtktreeviewaccessible.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk\a11y&#x0D;&#x0A;
copy ..\..\..\gtk\a11y\gtkwidgetaccessible.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk\a11y&#x0D;&#x0A;
copy ..\..\..\gtk\a11y\gtkwindowaccessible.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk\a11y&#x0D;&#x0A;
mkdir $(CopyDir)\include\gail-$(ApiVersion)\libgail-util&#x0D;&#x0A;
copy ..\..\..\libgail-util\gail-util.h $(CopyDir)\include\gail-$(ApiVersion)\libgail-util&#x0D;&#x0A;
copy ..\..\..\libgail-util\gailmisc.h $(CopyDir)\include\gail-$(ApiVersion)\libgail-util&#x0D;&#x0A;
copy ..\..\..\libgail-util\gailtextutil.h $(CopyDir)\include\gail-$(ApiVersion)\libgail-util&#x0D;&#x0A;
copy ..\..\..\gdk\gdkconfig.h $(CopyDir)\include\gtk-3.0\gdk&#x0D;&#x0A;
copy $(ConfigurationName)\$(PlatformName)\bin\*-$(GtkApiVersion).lib $(CopyDir)\lib&#x0D;&#x0A;
copy $(ConfigurationName)\$(PlatformName)\bin\*-$(ApiVersion).lib $(CopyDir)\lib&#x0D;&#x0A;
mkdir $(CopyDir)\share\glib-2.0\schemas&#x0D;&#x0A;
copy ..\..\..\gtk\org.gtk.Settings.FileChooser.gschema.xml $(CopyDir)\share\glib-2.0\schemas&#x0D;&#x0A;
copy ..\..\..\gtk\org.gtk.Settings.ColorChooser.gschema.xml $(CopyDir)\share\glib-2.0\schemas&#x0D;&#x0A;
copy ..\..\..\demos\gtk-demo\org.gtk.Demo.gschema.xml $(CopyDir)\share\glib-2.0\schemas&#x0D;&#x0A;
echo &quot;Compiling gsettings XML Files...&quot;&#x0D;&#x0A;
$(CopyDir)\bin\glib-compile-schemas.exe $(CopyDir)\share\glib-2.0\schemas&#x0D;&#x0A;
"
/>
<UserMacro
Name="DoGenGir"
Value="
set VSVER=$(VSVer)&#x0D;&#x0A;
set CONF=$(ConfigurationName)&#x0D;&#x0A;
set PLAT=$(PlatformName)&#x0D;&#x0A;
set BASEDIR=$(GlibEtcInstallRootFromBuildWin32)&#x0D;&#x0A;
cd ..&#x0D;&#x0A;
call gengir_gtk.bat&#x0D;&#x0A;
cd vs$(VSVer)&#x0D;&#x0A;
"
/>
<UserMacro
Name="GtkGenerateGdkDef"
Value="echo EXPORTS &gt;&quot;$(IntDir)\gdk.def&quot; &amp;&amp; cl /EP -DGDK_WINDOWING_WIN32 -DALL_FILES -DG_GNUC_CONST= ..\..\..\gdk\gdk.symbols &gt;&gt;&quot;$(IntDir)\gdk.def&quot;"
@@ -387,24 +451,24 @@ $(CopyDir)\bin\glib-compile-schemas.exe $(CopyDir)\share\glib-2.0\schemas&#x0D;&
/>
<UserMacro
Name="GtkLibtoolCompatibleDllSuffix"
Value="-$(GtkApiVersion)-0"
Value="-$(ApiVersion)-0"
/>
<UserMacro
Name="GtkSeparateVS9DllPrefix"
Name="GtkSeparateVSDllPrefix"
Value=""
/>
<UserMacro
Name="GtkSeparateVS9DllSuffix"
Value="-3-vs9"
Name="GtkSeparateVSDllSuffix"
Value="-3-vs$(VSVer)"
/>
<!-- Change these two to GtkLibtoolCompatibleDllPrefix and
GtkLibtoolCompatibleDllSuffix if that is what you want -->
<UserMacro
Name="GtkDllPrefix"
Value="$(GtkSeparateVS9DllPrefix)"
Value="$(GtkSeparateVSDllPrefix)"
/>
<UserMacro
Name="GtkDllSuffix"
Value="$(GtkSeparateVS9DllSuffix)"
Value="$(GtkSeparateVSDllSuffix)"
/>
</VisualStudioPropertySheet>

View File

@@ -35,7 +35,7 @@
PreprocessorDefinitions="_DEBUG;G_ENABLE_DEBUG;$(GtkDefines)"
MinimalRebuild="true"
BasicRuntimeChecks="3"
RuntimeLibrary="2"
RuntimeLibrary="3"
UsePrecompiledHeader="0"
WarningLevel="3"
DebugInformationFormat="4"
@@ -48,7 +48,7 @@
ModuleDefinitionFile="$(IntDir)\gtk.def"
GenerateDebugInformation="true"
SubSystem="2"
ImportLibrary="$(TargetDir)$(ProjectName)-$(GtkApiVersion).lib"
ImportLibrary="$(TargetDir)$(ProjectName)-$(ApiVersion).lib"
TargetMachine="1"
/>
</Configuration>
@@ -81,7 +81,7 @@
SubSystem="2"
OptimizeReferences="2"
EnableCOMDATFolding="2"
ImportLibrary="$(TargetDir)$(ProjectName)-$(GtkApiVersion).lib"
ImportLibrary="$(TargetDir)$(ProjectName)-$(ApiVersion).lib"
TargetMachine="1"
/>
</Configuration>
@@ -114,7 +114,7 @@
ModuleDefinitionFile="$(IntDir)\gtk.def"
GenerateDebugInformation="true"
SubSystem="2"
ImportLibrary="$(TargetDir)$(ProjectName)-$(GtkApiVersion).lib"
ImportLibrary="$(TargetDir)$(ProjectName)-$(ApiVersion).lib"
TargetMachine="17"
/>
</Configuration>
@@ -147,7 +147,7 @@
SubSystem="2"
OptimizeReferences="2"
EnableCOMDATFolding="2"
ImportLibrary="$(TargetDir)$(ProjectName)-$(GtkApiVersion).lib"
ImportLibrary="$(TargetDir)$(ProjectName)-$(ApiVersion).lib"
TargetMachine="17"
/>
</Configuration>

View File

@@ -0,0 +1,169 @@
<?xml version="1.0" encoding="Windows-1252"?>
<VisualStudioProject
ProjectType="Visual C++"
Version="9.00"
Name="gtk3-demo-application"
ProjectGUID="{3281202A-CD26-4C67-B892-EB34BDBC612F}"
RootNamespace="gtk3demoapplication"
Keyword="Win32Proj"
TargetFrameworkVersion="196613"
>
<Platforms>
<Platform
Name="Win32"
/>
<Platform
Name="x64"
/>
</Platforms>
<ToolFiles>
</ToolFiles>
<Configurations>
<Configuration
Name="Debug|Win32"
InheritedPropertySheets=".\gtk+.vsprops"
ConfigurationType="1"
CharacterSet="2"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCLCompilerTool"
Optimization="0"
PreprocessorDefinitions="_DEBUG"
MinimalRebuild="true"
BasicRuntimeChecks="3"
RuntimeLibrary="3"
UsePrecompiledHeader="0"
WarningLevel="3"
DebugInformationFormat="4"
/>
<Tool
Name="VCLinkerTool"
LinkIncremental="2"
GenerateDebugInformation="true"
SubSystem="1"
TargetMachine="1"
/>
</Configuration>
<Configuration
Name="Release|Win32"
InheritedPropertySheets=".\gtk+.vsprops"
ConfigurationType="1"
CharacterSet="2"
WholeProgramOptimization="0"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCLCompilerTool"
Optimization="2"
EnableIntrinsicFunctions="true"
PreprocessorDefinitions=""
RuntimeLibrary="2"
EnableFunctionLevelLinking="true"
UsePrecompiledHeader="0"
WarningLevel="3"
DebugInformationFormat="3"
/>
<Tool
Name="VCLinkerTool"
LinkIncremental="1"
GenerateDebugInformation="true"
SubSystem="1"
OptimizeReferences="2"
EnableCOMDATFolding="2"
TargetMachine="1"
/>
</Configuration>
<Configuration
Name="Debug|x64"
InheritedPropertySheets=".\gtk+.vsprops"
ConfigurationType="1"
CharacterSet="2"
>
<Tool
Name="VCMIDLTool"
TargetEnvironment="3"
/>
<Tool
Name="VCCLCompilerTool"
Optimization="0"
PreprocessorDefinitions="_DEBUG"
MinimalRebuild="true"
BasicRuntimeChecks="3"
RuntimeLibrary="3"
UsePrecompiledHeader="0"
WarningLevel="3"
DebugInformationFormat="3"
/>
<Tool
Name="VCLinkerTool"
LinkIncremental="2"
GenerateDebugInformation="true"
SubSystem="1"
TargetMachine="17"
/>
</Configuration>
<Configuration
Name="Release|x64"
InheritedPropertySheets=".\gtk+.vsprops"
ConfigurationType="1"
CharacterSet="2"
WholeProgramOptimization="0"
>
<Tool
Name="VCMIDLTool"
TargetEnvironment="3"
/>
<Tool
Name="VCCLCompilerTool"
Optimization="2"
EnableIntrinsicFunctions="true"
PreprocessorDefinitions=""
RuntimeLibrary="2"
EnableFunctionLevelLinking="true"
UsePrecompiledHeader="0"
WarningLevel="3"
DebugInformationFormat="3"
/>
<Tool
Name="VCLinkerTool"
LinkIncremental="1"
GenerateDebugInformation="true"
SubSystem="1"
OptimizeReferences="2"
EnableCOMDATFolding="2"
TargetMachine="17"
/>
</Configuration>
</Configurations>
<References>
</References>
<Files>
<Filter
Name="Sources"
Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
>
</Filter>
<File RelativePath="..\..\..\demos\gtk-demo\application-standalone.c" />
<File RelativePath="..\..\..\demos\gtk-demo\demo_resources.c" />
<Filter
Name="Headers"
Filter="h;hpp;hxx;hm;inl;inc;xsd"
UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
>
</Filter>
<Filter
Name="Resource Files"
Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav"
UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"
>
</Filter>
</Files>
<Globals>
</Globals>
</VisualStudioProject>

View File

@@ -35,7 +35,7 @@
PreprocessorDefinitions="_DEBUG;$(GtkPrefixDefine)"
MinimalRebuild="true"
BasicRuntimeChecks="3"
RuntimeLibrary="2"
RuntimeLibrary="3"
UsePrecompiledHeader="0"
WarningLevel="3"
DebugInformationFormat="4"
@@ -90,7 +90,7 @@
ConfigurationType="1"
InheritedPropertySheets=".\gtk+.vsprops"
CharacterSet="2"
WholeProgramOptimization="1"
WholeProgramOptimization="0"
>
<Tool
Name="VCPreBuildEventTool"
@@ -123,7 +123,7 @@
ConfigurationType="1"
InheritedPropertySheets=".\gtk+.vsprops"
CharacterSet="2"
WholeProgramOptimization="1"
WholeProgramOptimization="0"
>
<Tool
Name="VCPreBuildEventTool"
@@ -204,7 +204,6 @@
<File RelativePath="..\..\..\demos\gtk-demo\stock_browser.c" />
<File RelativePath="..\..\..\demos\gtk-demo\textscroll.c" />
<File RelativePath="..\..\..\demos\gtk-demo\textview.c" />
<File RelativePath="..\..\..\demos\gtk-demo\theming_custom_css.c" />
<File RelativePath="..\..\..\demos\gtk-demo\theming_style_classes.c" />
<File RelativePath="..\..\..\demos\gtk-demo\toolpalette.c" />
<File RelativePath="..\..\..\demos\gtk-demo\transparent.c" />

View File

@@ -2,9 +2,9 @@
<VisualStudioProject
ProjectType="Visual C++"
Version="9.00"
Name="libgail"
Name="gtka11y"
ProjectGUID="{F756B0DB-40A1-4E9F-BE1F-8F02CB86EA46}"
RootNamespace="libgail"
RootNamespace="gtka11y"
Keyword="Win32Proj"
TargetFrameworkVersion="196613"
>
@@ -115,7 +115,7 @@
Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
>
#include "libgail.sourcefiles"
#include "gtka11y.sourcefiles"
</Filter>
<Filter
Name="Headers"

View File

@@ -8,12 +8,12 @@
/* define to enable packagekit */
/* #undef ENABLE_PACKAGEKIT */
/* Whether to use EGL in Wayland backend */
/* #undef GDK_WAYLAND_USE_EGL */
/* The prefix for our gettext translation domains. */
#define GETTEXT_PACKAGE "@GETTEXT_PACKAGE@"
/* Disable deprecation warnings from glib */
/* #undef GLIB_DISABLE_DEPRECATION_WARNINGS */
/* Define if debugging is enabled */
#define GTK_COMPILED_WITH_DEBUGGING "yes"
@@ -50,15 +50,9 @@
/* Define to 1 if you have the <dlfcn.h> header file. */
/* #undef HAVE_DLFCN_H */
/* Define to 1 if you have the `flockfile' function. */
/* #undef HAVE_FLOCKFILE */
/* Define to 1 if you have the <ftw.h> header file. */
/* #undef HAVE_FTW_H */
/* Define to 1 if you have the `getc_unlocked' function. */
/* #undef HAVE_GETC_UNLOCKED */
/* Define to 1 if you have the `getpagesize' function. */
#ifndef _MSC_VER
#define HAVE_GETPAGESIZE 1
@@ -296,11 +290,6 @@
/* Define to 1 if the X Window System is missing or not being used. */
/* #undef X_DISPLAY_MISSING */
/* Enable large inode numbers on Mac OS X 10.5. */
#ifndef _DARWIN_USE_64_BIT_INODE
# define _DARWIN_USE_64_BIT_INODE 1
#endif
/* Number of bits in a file offset, on hosts where this is settable. */
/* #undef _FILE_OFFSET_BITS */

View File

@@ -9,8 +9,8 @@
# set GTK_BINARY_AGE and GTK_INTERFACE_AGE to 0.
m4_define([gtk_major_version], [3])
m4_define([gtk_minor_version], [7])
m4_define([gtk_micro_version], [3])
m4_define([gtk_minor_version], [9])
m4_define([gtk_micro_version], [0])
m4_define([gtk_interface_age], [0])
m4_define([gtk_binary_age],
[m4_eval(100 * gtk_minor_version + gtk_micro_version)])
@@ -24,11 +24,14 @@ AC_INIT([gtk+], [gtk_version],
[http://bugzilla.gnome.org/enter_bug.cgi?product=gtk%2B],
[gtk+])
AC_CONFIG_HEADER([config.h])
AC_CONFIG_HEADERS([config.h])
AC_CONFIG_SRCDIR([gdk/gdktypes.h])
AC_CONFIG_MACRO_DIR([m4])
AC_CONFIG_AUX_DIR([build-aux])
AC_CANONICAL_HOST
AC_CANONICAL_TARGET
# Define a string for the earliest version that this release has
# backwards binary compatibility with for all interfaces a module
# might. Unless we add module-only API with lower stability
@@ -39,11 +42,11 @@ AC_CONFIG_AUX_DIR([build-aux])
m4_define([gtk_binary_version], [3.0.0])
# required versions of other packages
m4_define([glib_required_version], [2.35.0])
m4_define([pango_required_version], [1.30.0])
m4_define([atk_required_version], [2.5.3])
m4_define([glib_required_version], [2.37.0])
m4_define([pango_required_version], [1.32.4])
m4_define([atk_required_version], [2.7.5])
m4_define([cairo_required_version], [1.10.0])
m4_define([gdk_pixbuf_required_version], [2.26.0])
m4_define([gdk_pixbuf_required_version], [2.27.1])
m4_define([introspection_required_version], [1.32.0])
GLIB_REQUIRED_VERSION=glib_required_version
PANGO_REQUIRED_VERSION=pango_required_version
@@ -123,8 +126,8 @@ AC_SUBST([GAIL_LT_CURRENT_MINUS_AGE],[gail_lt_current_minus_age])
# Checks for programs.
AC_PROG_CC
AX_PROG_CC_FOR_BUILD
AC_PROG_CC_C_O
AC_PROG_CC_STDC
AC_PROG_MKDIR_P
AC_PROG_INSTALL
AC_PROG_MAKE_SET
@@ -135,8 +138,6 @@ AC_SUBST(GETTEXT_PACKAGE)
AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE, "$GETTEXT_PACKAGE",
[The prefix for our gettext translation domains.])
AC_CANONICAL_HOST
MATH_LIB=-lm
AC_MSG_CHECKING([for native Win32])
LIB_EXE_MACHINE_FLAG=X86
@@ -321,12 +322,6 @@ AC_ARG_ENABLE(quartz-relocation,
[enable bundle-based relocation functions])],
[quartz_relocation=yes])
AC_ARG_ENABLE(wayland-cairo-gl,
AS_HELP_STRING([--enable-wayland-cairo-gl],
[enable the use of Cairo GL in the Wayland backend]),
[enable_wayland_cairo_gl=yes])
cairo_backends=
backend_immodules=
have_gio_unix=no
@@ -355,7 +350,7 @@ if test "$enable_win32_backend" = "yes"; then
backend_immodules="$backend_immodules,ime"
GDK_WINDOWING="$GDK_WINDOWING
#define GDK_WINDOWING_WIN32"
GDK_EXTRA_LIBS="$GDK_EXTRA_LIBS -lgdi32 -limm32 -lshell32 -lole32 -Wl,-luuid"
GDK_EXTRA_LIBS="$GDK_EXTRA_LIBS -lgdi32 -limm32 -lshell32 -lole32 -Wl,-luuid -lwinmm"
AM_CONDITIONAL(USE_WIN32, true)
PANGO_PACKAGES="pangowin32 pangocairo"
else
@@ -386,6 +381,7 @@ AC_SUBST(DISABLE_ON_QUARTZ)
if test "x$enable_broadway_backend" = xyes; then
GDK_BACKENDS="$GDK_BACKENDS broadway"
cairo_backends="$cairo_backends cairo"
have_gio_unix=yes
GDK_WINDOWING="$GDK_WINDOWING
#define GDK_WINDOWING_BROADWAY"
GDK_EXTRA_LIBS="$GDK_EXTRA_LIBS -lz"
@@ -394,27 +390,21 @@ else
AM_CONDITIONAL(USE_BROADWAY, false)
fi
DISABLE_ON_WAYLAND=''
if test "x$enable_wayland_backend" = "xyes"; then
if test "x$enable_wayland_cairo_gl" = "xyes"; then
# Wayland can use cairo-gl
cairo_backends="$cairo_backends cairo-gl"
AC_DEFINE(GDK_WAYLAND_USE_EGL, [1], [Whether to use EGL in Wayland backend])
else
# For the cairo image backend
cairo_backends="$cairo_backends cairo"
fi
# For the cairo image backend
cairo_backends="$cairo_backends cairo"
GDK_BACKENDS="$GDK_BACKENDS wayland"
have_gio_unix=yes
GDK_WINDOWING="$GDK_WINDOWING
#define GDK_WINDOWING_WAYLAND"
DISABLE_ON_WAYLAND='%'
WAYLAND_PACKAGES="wayland-client >= 1.0.0 xkbcommon >= 0.2.0 wayland-cursor"
if test "x$enable_wayland_cairo_gl" = "xyes"; then
WAYLAND_PACKAGES="$WAYLAND_PACKAGES wayland-egl egl"
fi
AM_CONDITIONAL(USE_WAYLAND, true)
else
AM_CONDITIONAL(USE_WAYLAND, false)
fi
AC_SUBST(DISABLE_ON_WAYLAND)
# strip leading space
GDK_BACKENDS=${GDK_BACKENDS#* }
@@ -573,7 +563,7 @@ if test "x$enable_rebuilds" = "xyes" && \
fi
AC_SUBST(REBUILD)
AC_CHECK_FUNCS(lstat mkstemp flockfile getc_unlocked)
AC_CHECK_FUNCS(lstat mkstemp)
AC_CHECK_FUNCS(localtime_r)
# _NL_TIME_FIRST_WEEKDAY is an enum and not a define
@@ -905,14 +895,32 @@ dnl Look for a host system's gdk-pixbuf-csource if we are cross-compiling
AM_CONDITIONAL(CROSS_COMPILING, test $cross_compiling = yes)
if test "x$cross_compiling" = xyes || test "x$enable_gtk2_dependency" = xyes; then
AC_PATH_PROG(GTK_UPDATE_ICON_CACHE, gtk-update-icon-cache, no)
if test x$GTK_UPDATE_ICON_CACHE = xno; then
REBUILD_PNGS=#
fi
fi
AS_IF([test "x$enable_gtk2_dependency" = xyes],
[AC_PATH_PROG(GTK_UPDATE_ICON_CACHE, gtk-update-icon-cache, no)
if test x$GTK_UPDATE_ICON_CACHE = xno; then
REBUILD_PNGS=#
fi],
AM_CONDITIONAL(USE_EXTERNAL_ICON_CACHE, [test "x$cross_compiling" = xyes || test "x$enable_gtk2_dependency" = xyes])
[test "x$cross_compiling" = xyes],
[# If no GTK+2 dependency and cross compiling, we need to find a host gdk-pixbuf.
# pkg.m4 blocks all variable starting with PKG, so allow this one
m4_pattern_allow([PKG_CONFIG_FOR_BUILD])
AS_IF([test x$PKG_CONFIG_FOR_BUILD = x],
[AC_MSG_ERROR([You must define PKG_CONFIG_FOR_BUILD when cross compiling])])
AC_MSG_CHECKING([for native gdk-pixbuf])
AS_IF([AC_RUN_LOG([$PKG_CONFIG_FOR_BUILD --exists --print-errors gdk-pixbuf-2.0])],
[AC_MSG_RESULT([yes])],
[AC_MSG_ERROR([native gdk-pixbuf not found])])
NATIVE_GDKPIXBUF_CFLAGS=`$PKG_CONFIG_FOR_BUILD --cflags gdk-pixbuf-2.0`
NATIVE_GDKPIXBUF_LIBS=`$PKG_CONFIG_FOR_BUILD --libs gdk-pixbuf-2.0`
AC_SUBST(NATIVE_GDKPIXBUF_CFLAGS)
AC_SUBST(NATIVE_GDKPIXBUF_LIBS)]
)
AM_CONDITIONAL(USE_EXTERNAL_ICON_CACHE, [test "x$enable_gtk2_dependency" = xyes])
AC_PATH_PROG(GDK_PIXBUF_CSOURCE, gdk-pixbuf-csource, no)
@@ -1234,6 +1242,7 @@ if test "$have_gio_unix" = "yes"; then
else
GDK_GIO_PACKAGE=gio-2.0
fi
AM_CONDITIONAL(HAVE_GIO_UNIX, test "$have_gio_unix" = "yes")
# Check for Pango flags
@@ -1415,7 +1424,7 @@ else
$CUPS_API_MAJOR -eq 1 -a $CUPS_API_MINOR -ge 6; then
AC_DEFINE(HAVE_CUPS_API_1_6, 1,
[Define to 1 if CUPS 1.6 API is available])
have_cups_api_1_6=yes
fi
AC_SUBST(CUPS_API_MAJOR)
@@ -1787,6 +1796,7 @@ gtk/makefile.msc
gtk/gtkversion.h
gtk/gtk-win32.rc
gtk/a11y/Makefile
gtk/native/Makefile
gtk/tests/Makefile
libgail-util/Makefile
modules/Makefile

View File

@@ -1,8 +1,6 @@
## Makefile.am for gtk+/demos
include $(top_srcdir)/Makefile.decl
democodedir=$(datadir)/gtk-$(GTK_API_VERSION)/demo
## These should be in the order you want them to appear in the
## demo app, which means alphabetized by demo title, not filename
demos = \
@@ -49,14 +47,12 @@ demos = \
textview.c \
textscroll.c \
theming_style_classes.c \
theming_custom_css.c \
toolpalette.c \
transparent.c \
tree_store.c \
ui_manager.c
AM_CPPFLAGS = \
-DDEMOCODEDIR="\"$(democodedir)\"" \
-I$(top_srcdir) \
-I$(top_builddir)/gdk \
-DGDK_DISABLE_DEPRECATED \
@@ -79,7 +75,6 @@ BUILT_SOURCES = demos.h demo_resources.c
EXTRA_DIST += \
$(IMAGEFILES) \
demo.ui \
demo.gresource.xml \
$(RESOURCES) \
org.gtk.Demo.gschema.xml
@@ -94,7 +89,6 @@ demos.h: @REBUILD@ $(demos) geninclude.pl
gtk3_demo_SOURCES = \
$(demos) \
demo-common.h \
demo_resources.c \
main.c \
demos.h
@@ -112,41 +106,35 @@ gtk3_demo_application_LDADD = $(LDADDS)
demo_resources.c: demo.gresource.xml $(RESOURCES)
$(AM_V_GEN) $(GLIB_COMPILE_RESOURCES) --target=$@ --sourcedir=$(srcdir) --generate-source $(srcdir)/demo.gresource.xml
RESOURCES= application.ui \
RESOURCES= $(demos) \
application.ui \
demo.ui \
menus.ui \
theming.ui \
alphatest.png \
apple-red.png \
background.jpg \
floppybuddy.gif \
gnome-applets.png \
gnome-calendar.png \
gnome-foot.png \
gnome-fs-directory.png \
gnome-fs-regular.png \
gnome-gimp.png \
gnome-gmush.png \
gnome-gsame.png \
gnu-keys.png \
gtk-logo-24.png \
gtk-logo-48.png \
gtk-logo-old.png \
css_accordion.css \
css_basics.css \
css_multiplebgs.css \
css_pixbufs.css \
css_shadows.css \
cssview.css \
fancy.css \
reset.css
IMAGEFILES= alphatest.png \
apple-red.png \
background.jpg \
floppybuddy.gif \
gnome-applets.png \
gnome-calendar.png \
gnome-fs-directory.png \
gnome-fs-regular.png \
gnome-foot.png \
gnome-gimp.png \
gnome-gmush.png \
gnome-gsame.png \
gnu-keys.png \
gtk-logo-rgb.gif
democode_DATA = \
$(demos) \
$(IMAGEFILES) \
$(RESOURCES) \
demo.ui
DISTCLEANFILES = demos.h
-include $(top_srcdir)/git.mk

View File

@@ -1,4 +1,4 @@
/* Application class :: menus.ui application.ui
/* Application class
*
* Demonstrates a simple application.
*
@@ -113,7 +113,7 @@ activate_about (GSimpleAction *action,
NULL
};
pixbuf = gdk_pixbuf_new_from_resource ("/application/logos/gtk-logo-48.png", NULL);
pixbuf = gdk_pixbuf_new_from_resource ("/application/gtk-logo-48.png", NULL);
gtk_show_about_dialog (GTK_WINDOW (window),
"program-name", "GTK+ Code Demos",
@@ -177,7 +177,7 @@ register_stock_icons (void)
factory = gtk_icon_factory_new ();
gtk_icon_factory_add_default (factory);
pixbuf = gdk_pixbuf_new_from_resource ("/application/logos/gtk-logo-24.png", NULL);
pixbuf = gdk_pixbuf_new_from_resource ("/application/gtk-logo-24.png", NULL);
icon_set = gtk_icon_set_new_from_pixbuf (pixbuf);
gtk_icon_factory_add (factory, "demo-gtk-logo", icon_set);
@@ -295,7 +295,7 @@ startup (GApplication *app)
GMenuModel *menubar;
builder = gtk_builder_new ();
gtk_builder_add_from_resource (builder, "/application/ui/menus.ui", NULL);
gtk_builder_add_from_resource (builder, "/application/menus.ui", NULL);
appmenu = (GMenuModel *)gtk_builder_get_object (builder, "appmenu");
menubar = (GMenuModel *)gtk_builder_get_object (builder, "menubar");
@@ -331,7 +331,7 @@ activate (GApplication *app)
window);
builder = gtk_builder_new ();
gtk_builder_add_from_resource (builder, "/application/ui/application.ui", NULL);
gtk_builder_add_from_resource (builder, "/application/application.ui", NULL);
grid = (GtkWidget *)gtk_builder_get_object (builder, "grid");
contents = (GtkWidget *)gtk_builder_get_object (builder, "contents");

View File

@@ -7,7 +7,6 @@
#include <gtk/gtk.h>
#include "config.h"
#include "demo-common.h"
static GtkWidget *window = NULL;
static GtkWidget *infobar = NULL;
@@ -81,8 +80,7 @@ static void
about_cb (GtkAction *action,
GtkWidget *window)
{
GdkPixbuf *pixbuf, *transparent;
gchar *filename;
GdkPixbuf *pixbuf;
const gchar *authors[] = {
"Peter Mattis",
@@ -100,16 +98,9 @@ about_cb (GtkAction *action,
NULL
};
pixbuf = NULL;
transparent = NULL;
filename = demo_find_file ("gtk-logo-rgb.gif", NULL);
if (filename)
{
pixbuf = gdk_pixbuf_new_from_file (filename, NULL);
g_free (filename);
transparent = gdk_pixbuf_add_alpha (pixbuf, TRUE, 0xff, 0xff, 0xff);
g_object_unref (pixbuf);
}
pixbuf = gdk_pixbuf_new_from_resource ("/appwindow/gtk-logo-old.png", NULL);
/* We asser the existence of the pixbuf as we load it from a custom resource. */
g_assert (pixbuf);
gtk_show_about_dialog (GTK_WINDOW (window),
"program-name", "GTK+ Code Demos",
@@ -124,11 +115,11 @@ about_cb (GtkAction *action,
"comments", "Program to demonstrate GTK+ functions.",
"authors", authors,
"documenters", documentors,
"logo", transparent,
"logo", pixbuf,
"title", "About GTK+ Code Demos",
NULL);
g_object_unref (transparent);
g_object_unref (pixbuf);
}
typedef struct
@@ -309,7 +300,7 @@ register_stock_icons (void)
{
GdkPixbuf *pixbuf;
GtkIconFactory *factory;
char *filename;
GtkIconSet *icon_set;
static GtkStockItem items[] = {
{ "demo-gtk-logo",
@@ -326,35 +317,14 @@ register_stock_icons (void)
factory = gtk_icon_factory_new ();
gtk_icon_factory_add_default (factory);
/* demo_find_file() looks in the current directory first,
* so you can run gtk-demo without installing GTK, then looks
* in the location where the file is installed.
*/
pixbuf = NULL;
filename = demo_find_file ("gtk-logo-rgb.gif", NULL);
if (filename)
{
pixbuf = gdk_pixbuf_new_from_file (filename, NULL);
g_free (filename);
}
pixbuf = gdk_pixbuf_new_from_resource ("/appwindow/gtk-logo-old.png", NULL);
/* We assert the existence of the pixbuf as we load it from a custom resource. */
g_assert (pixbuf);
/* Register icon to accompany stock item */
if (pixbuf != NULL)
{
GtkIconSet *icon_set;
GdkPixbuf *transparent;
/* The gtk-logo-rgb icon has a white background, make it transparent */
transparent = gdk_pixbuf_add_alpha (pixbuf, TRUE, 0xff, 0xff, 0xff);
icon_set = gtk_icon_set_new_from_pixbuf (transparent);
gtk_icon_factory_add (factory, "demo-gtk-logo", icon_set);
gtk_icon_set_unref (icon_set);
g_object_unref (pixbuf);
g_object_unref (transparent);
}
else
g_warning ("failed to load GTK logo for toolbar");
icon_set = gtk_icon_set_new_from_pixbuf (pixbuf);
gtk_icon_factory_add (factory, "demo-gtk-logo", icon_set);
gtk_icon_set_unref (icon_set);
g_object_unref (pixbuf);
/* Drop our reference to the factory, GTK will hold a reference. */
g_object_unref (factory);

View File

@@ -6,7 +6,6 @@
*/
#include <gtk/gtk.h>
#include "demo-common.h"
static GtkWidget *assistant = NULL;
static GtkWidget *progress_bar = NULL;

View File

@@ -1,10 +1,9 @@
/* Builder :: demo.ui
/* Builder
*
* Demonstrates an interface loaded from a XML description.
*/
#include <gtk/gtk.h>
#include "demo-common.h"
static GtkBuilder *builder;
@@ -38,14 +37,11 @@ do_builder (GtkWidget *do_widget)
{
static GtkWidget *window = NULL;
GError *err = NULL;
gchar *filename;
if (!window)
{
builder = gtk_builder_new ();
filename = demo_find_file ("demo.ui", NULL);
gtk_builder_add_from_file (builder, filename, &err);
g_free (filename);
gtk_builder_add_from_resource (builder, "/builder/demo.ui", &err);
if (err)
{
g_error ("ERROR: %s\n", err->message);

View File

@@ -1,24 +1,23 @@
/* Change Display
*
* Demonstrates migrating a window between different displays and
* screens. A display is a mouse and keyboard with some number of
* associated monitors. A screen is a set of monitors grouped
* into a single physical work area. The neat thing about having
* multiple displays is that they can be on a completely separate
* Demonstrates migrating a window between different displays.
* A display is a mouse and keyboard with some number of
* associated monitors. The neat thing about having multiple
* displays is that they can be on a completely separate
* computers, as long as there is a network connection to the
* computer where the application is running.
*
* Only some of the windowing systems where GTK+ runs have the
* concept of multiple displays and screens. (The X Window System
* is the main example.) Other windowing systems can only
* handle one keyboard and mouse, and combine all monitors into
* a single screen.
* concept of multiple displays. (The X Window System is the
* main example.) Other windowing systems can only handle one
* keyboard and mouse, and combine all monitors into
* a single display.
*
* This is a moderately complex example, and demonstrates:
*
* - Tracking the currently open displays and screens
* - Tracking the currently open displays
*
* - Changing the screen for a window
* - Changing the display for a window
*
* - Letting the user choose a window by clicking on it
*
@@ -31,7 +30,6 @@
#undef GDK_DISABLE_DEPRECATED
#include <gtk/gtk.h>
#include "demo-common.h"
/* The ChangeDisplayInfo structure corresponds to a toplevel window and
* holds pointers to widgets inside the toplevel window along with other
@@ -46,11 +44,8 @@ struct _ChangeDisplayInfo
GtkSizeGroup *size_group;
GtkTreeModel *display_model;
GtkTreeModel *screen_model;
GtkTreeSelection *screen_selection;
GdkDisplay *current_display;
GdkScreen *current_screen;
};
/* These enumerations provide symbolic names for the columns
@@ -178,40 +173,11 @@ query_change_display (ChangeDisplayInfo *info)
"to move to the new screen");
if (toplevel)
gtk_window_set_screen (GTK_WINDOW (toplevel), info->current_screen);
gtk_window_set_screen (GTK_WINDOW (toplevel), gdk_display_get_screen (info->current_display, 0));
else
gdk_display_beep (gdk_screen_get_display (screen));
}
/* Fills in the screen list based on the current display
*/
static void
fill_screens (ChangeDisplayInfo *info)
{
gtk_list_store_clear (GTK_LIST_STORE (info->screen_model));
if (info->current_display)
{
gint n_screens = gdk_display_get_n_screens (info->current_display);
gint i;
for (i = 0; i < n_screens; i++)
{
GdkScreen *screen = gdk_display_get_screen (info->current_display, i);
GtkTreeIter iter;
gtk_list_store_append (GTK_LIST_STORE (info->screen_model), &iter);
gtk_list_store_set (GTK_LIST_STORE (info->screen_model), &iter,
SCREEN_COLUMN_NUMBER, i,
SCREEN_COLUMN_SCREEN, screen,
-1);
if (i == 0)
gtk_tree_selection_select_iter (info->screen_selection, &iter);
}
}
}
/* Called when the user clicks on a button in our dialog or
* closes the dialog through the window manager. Unless the
* "Change" button was clicked, we destroy the dialog.
@@ -321,28 +287,6 @@ display_changed_cb (GtkTreeSelection *selection,
-1);
else
info->current_display = NULL;
fill_screens (info);
}
/* Called when the selected row in the sceen list changes.
* Updates info->current_screen.
*/
static void
screen_changed_cb (GtkTreeSelection *selection,
ChangeDisplayInfo *info)
{
GtkTreeModel *model;
GtkTreeIter iter;
if (info->current_screen)
g_object_unref (info->current_screen);
if (gtk_tree_selection_get_selected (selection, &model, &iter))
gtk_tree_model_get (model, &iter,
SCREEN_COLUMN_SCREEN, &info->current_screen,
-1);
else
info->current_screen = NULL;
}
/* This function is used both for creating the "Display" and
@@ -447,37 +391,6 @@ create_display_frame (ChangeDisplayInfo *info)
return frame;
}
/* Creates the "Screen" frame in the main window.
*/
GtkWidget *
create_screen_frame (ChangeDisplayInfo *info)
{
GtkWidget *frame;
GtkWidget *tree_view;
GtkWidget *button_vbox;
GtkTreeViewColumn *column;
create_frame (info, "Screen", &frame, &tree_view, &button_vbox);
info->screen_model = (GtkTreeModel *)gtk_list_store_new (SCREEN_NUM_COLUMNS,
G_TYPE_INT,
GDK_TYPE_SCREEN);
gtk_tree_view_set_model (GTK_TREE_VIEW (tree_view), info->screen_model);
column = gtk_tree_view_column_new_with_attributes ("Number",
gtk_cell_renderer_text_new (),
"text", SCREEN_COLUMN_NUMBER,
NULL);
gtk_tree_view_append_column (GTK_TREE_VIEW (tree_view), column);
info->screen_selection = gtk_tree_view_get_selection (GTK_TREE_VIEW (tree_view));
g_signal_connect (info->screen_selection, "changed",
G_CALLBACK (screen_changed_cb), info);
return frame;
}
/* Called when one of the currently open displays is closed.
* Remove it from our list of displays.
*/
@@ -581,12 +494,9 @@ destroy_info (ChangeDisplayInfo *info)
g_object_unref (info->size_group);
g_object_unref (info->display_model);
g_object_unref (info->screen_model);
if (info->current_display)
g_object_unref (info->current_display);
if (info->current_screen)
g_object_unref (info->current_screen);
g_free (info);
}
@@ -638,9 +548,6 @@ do_changedisplay (GtkWidget *do_widget)
frame = create_display_frame (info);
gtk_box_pack_start (GTK_BOX (vbox), frame, TRUE, TRUE, 0);
frame = create_screen_frame (info);
gtk_box_pack_start (GTK_BOX (vbox), frame, TRUE, TRUE, 0);
initialize_displays (info);
gtk_widget_show_all (info->window);

View File

@@ -1,4 +1,4 @@
/* CSS Theming/CSS Accordion :: css_accordion.css
/* CSS Theming/CSS Accordion
*
* A simple accordion demo written using CSS transitions and multiple backgrounds
*
@@ -57,7 +57,7 @@ do_css_accordion (GtkWidget *do_widget)
gtk_container_add (GTK_CONTAINER (container), child);
provider = GTK_STYLE_PROVIDER (gtk_css_provider_new ());
bytes = g_resources_lookup_data ("/css_accordion/gtk.css", 0, NULL);
bytes = g_resources_lookup_data ("/css_accordion/css_accordion.css", 0, NULL);
data = g_bytes_get_data (bytes, &data_size);
gtk_css_provider_load_from_data (GTK_CSS_PROVIDER (provider), (gchar *)data, data_size, NULL);

View File

@@ -1,4 +1,4 @@
@import url("resource:///reset.css");
@import url("resource://css_accordion/reset.css");
* {
transition-property: color, background-color, border-color, background-image, padding, border-width;

View File

@@ -1,4 +1,4 @@
/* CSS Theming/CSS Basics :: css_basics.css
/* CSS Theming/CSS Basics
*
* Gtk themes are written using CSS. Every widget is build of multiple items
* that you can style very similarly to a regular website.
@@ -98,7 +98,7 @@ do_css_basics (GtkWidget *do_widget)
G_CALLBACK (css_text_changed),
provider);
bytes = g_resources_lookup_data ("/css_basics/gtk.css", 0, NULL);
bytes = g_resources_lookup_data ("/css_basics/css_basics.css", 0, NULL);
gtk_text_buffer_set_text (text, g_bytes_get_data (bytes, NULL), g_bytes_get_size (bytes));
g_bytes_unref (bytes);

View File

@@ -6,7 +6,7 @@
/* This CSS resets all properties to their defaults values
* and overrides all user settings and the theme in use */
@import url("resource:///reset.css");
@import url("resource://css_basics/reset.css");
/* Set a very futuristic style by default */
* {

View File

@@ -1,4 +1,4 @@
/* CSS Theming/Multiple Backgrounds :: css_multiplebgs.css cssview.css
/* CSS Theming/Multiple Backgrounds
*
* Gtk themes are written using CSS. Every widget is build of multiple items
* that you can style very similarly to a regular website.
@@ -147,7 +147,7 @@ do_css_multiplebgs (GtkWidget *do_widget)
G_CALLBACK (css_text_changed),
provider);
bytes = g_resources_lookup_data ("/css_multiplebgs/gtk.css", 0, NULL);
bytes = g_resources_lookup_data ("/css_multiplebgs/css_multiplebgs.css", 0, NULL);
gtk_text_buffer_set_text (text, g_bytes_get_data (bytes, NULL), g_bytes_get_size (bytes));
g_bytes_unref (bytes);

View File

@@ -6,8 +6,8 @@
/* This CSS resets all properties to their defaults values
* and overrides all user settings and the theme in use */
@import url("resource:///reset.css");
@import url("resource:///cssview.css");
@import url("resource://css_multiplebgs/reset.css");
@import url("resource://css_multiplebgs/cssview.css");
#canvas {
transition-property: background-color, background-image;

View File

@@ -1,7 +1,7 @@
/* CSS Theming/Animated backgrounds
/* CSS Theming/Animated Backgrounds
*
* This demo is done in honour of the Pixbufs demo further down. It is done exclusively
* with CSS as the background of the window.
* This demo is done in honour of the Pixbufs demo further down.
* It is done exclusively with CSS as the background of the window.
*/
#include <gtk/gtk.h>
@@ -106,6 +106,7 @@ do_css_pixbufs (GtkWidget *do_widget)
bytes = g_resources_lookup_data ("/css_pixbufs/gtk.css", 0, NULL);
gtk_text_buffer_set_text (text, g_bytes_get_data (bytes, NULL), g_bytes_get_size (bytes));
g_bytes_unref (bytes);
g_signal_connect (provider,
"parsing-error",

View File

@@ -6,8 +6,8 @@
/* This CSS resets all properties to their defaults values
* and overrides all user settings and the theme in use */
@import url("resource:///reset.css");
@import url("resource:///cssview.css");
@import url("resource://css_pixbufs/reset.css");
@import url("resource://css_pixbufs/cssview.css");
@keyframes move-the-image {
0% { background-position: 50.00% 75.00%, 67.68% 67.68%, 75.00% 50.00%, 67.68% 32.32%, 50.00% 25.00%, 32.32% 32.32%, 25.00% 50.00%, 32.32% 67.68%, 0% 0%; }
@@ -51,15 +51,15 @@
}
GtkWindow {
background-image: url("resource:///css_pixbufs/apple-red.png"),
url("resource:///css_pixbufs/gnome-applets.png"),
url("resource:///css_pixbufs/gnome-calendar.png"),
url("resource:///css_pixbufs/gnome-foot.png"),
url("resource:///css_pixbufs/gnome-gmush.png"),
url("resource:///css_pixbufs/gnome-gimp.png"),
url("resource:///css_pixbufs/gnome-gsame.png"),
url("resource:///css_pixbufs/gnu-keys.png"),
url("resource:///css_pixbufs/background.jpg");
background-image: url("resource://css_pixbufs/apple-red.png"),
url("resource://css_pixbufs/gnome-applets.png"),
url("resource://css_pixbufs/gnome-calendar.png"),
url("resource://css_pixbufs/gnome-foot.png"),
url("resource://css_pixbufs/gnome-gmush.png"),
url("resource://css_pixbufs/gnome-gimp.png"),
url("resource://css_pixbufs/gnome-gsame.png"),
url("resource://css_pixbufs/gnu-keys.png"),
url("resource://css_pixbufs/background.jpg");
background-position: 50.00% 75.00%, 67.68% 67.68%, 75.00% 50.00%, 67.68% 32.32%, 50.00% 25.00%, 32.32% 32.32%, 25.00% 50.00%, 32.32% 67.68%, 0% 0%;
background-repeat: no-repeat, no-repeat, no-repeat, no-repeat, no-repeat, no-repeat, no-repeat, no-repeat, repeat;
animation: move-the-image infinite linear 3s, size-the-image infinite alternate ease-in-out 0.75s;

View File

@@ -126,6 +126,7 @@ do_css_shadows (GtkWidget *do_widget)
bytes = g_resources_lookup_data ("/css_shadows/gtk.css", 0, NULL);
gtk_text_buffer_set_text (text, g_bytes_get_data (bytes, NULL), g_bytes_get_size (bytes));
g_bytes_unref (bytes);
g_signal_connect (provider,
"parsing-error",

View File

@@ -6,8 +6,8 @@
/* This CSS resets all properties to their defaults values
* and overrides all user settings and the theme in use */
@import url("resource:///reset.css");
@import url("resource:///cssview.css");
@import url("resource://css_shadows/reset.css");
@import url("resource://css_shadows/cssview.css");
/* Get a nice background for the window */
.background {

View File

@@ -1,11 +0,0 @@
#ifndef __DEMO_COMMON_H__
#define __DEMO_COMMON_H__
G_BEGIN_DECLS
gchar *demo_find_file (const gchar *base,
GError **err);
G_END_DECLS
#endif /* __DEMO_COMMON_H__ */

View File

@@ -1,35 +1,41 @@
<?xml version="1.0" encoding="UTF-8"?>
<gresources>
<gresource prefix="/application/logos">
<gresource prefix="/">
<file>gtk-logo-old.png</file>
</gresource>
<gresource prefix="/application">
<file preprocess="to-pixdata">gtk-logo-24.png</file>
<file preprocess="to-pixdata">gtk-logo-48.png</file>
<file>application.ui</file>
<file>menus.ui</file>
</gresource>
<gresource prefix="/application/ui">
<file preprocess="xml-stripblanks">application.ui</file>
<file preprocess="xml-stripblanks">menus.ui</file>
<gresource prefix="/appwindow">
<file preprocess="to-pixdata">gtk-logo-old.png</file>
</gresource>
<gresource prefix="/">
<gresource prefix="/builder">
<file>demo.ui</file>
</gresource>
<gresource prefix="/css_accordion">
<file>css_accordion.css</file>
<file>reset.css</file>
</gresource>
<gresource prefix="/css_basics">
<file>css_basics.css</file>
<file>reset.css</file>
</gresource>
<gresource prefix="/css_multiplebgs">
<file>css_multiplebgs.css</file>
<file>brick.png</file>
<file>cssview.css</file>
<file>reset.css</file>
</gresource>
<gresource prefix="/css_accordion">
<file alias="gtk.css">css_accordion.css</file>
</gresource>
<gresource prefix="/css_basics">
<file alias="gtk.css">css_basics.css</file>
</gresource>
<gresource prefix="/css_multiplebgs">
<file alias="gtk.css">css_multiplebgs.css</file>
<file>brick.png</file>
</gresource>
<gresource prefix="/theming_custom_css">
<file alias="gtk.css">fancy.css</file>
</gresource>
<gresource prefix="/theming_style_classes">
<file preprocess="xml-stripblanks">theming.ui</file>
<file>theming.ui</file>
</gresource>
<gresource prefix="/css_pixbufs">
<file alias="gtk.css">css_pixbufs.css</file>
<file>cssview.css</file>
<file>reset.css</file>
<file>background.jpg</file>
<file>apple-red.png</file>
<file>gnome-applets.png</file>
@@ -42,5 +48,80 @@
</gresource>
<gresource prefix="/css_shadows">
<file alias="gtk.css">css_shadows.css</file>
<file>cssview.css</file>
<file>reset.css</file>
</gresource>
<gresource prefix="/iconview">
<file preprocess="to-pixdata">gnome-fs-directory.png</file>
<file preprocess="to-pixdata">gnome-fs-regular.png</file>
</gresource>
<gresource prefix="/images">
<file>alphatest.png</file>
<file>floppybuddy.gif</file>
<file>gtk-logo-old.png</file>
</gresource>
<gresource prefix="/pixbufs">
<file>apple-red.png</file>
<file>background.jpg</file>
<file>gnome-applets.png</file>
<file>gnome-calendar.png</file>
<file>gnome-foot.png</file>
<file>gnome-gmush.png</file>
<file>gnome-gimp.png</file>
<file>gnome-gsame.png</file>
<file>gnu-keys.png</file>
</gresource>
<gresource prefix="/sources">
<file>application.c</file>
<file>appwindow.c</file>
<file>assistant.c</file>
<file>builder.c</file>
<file>button_box.c</file>
<file>changedisplay.c</file>
<file>clipboard.c</file>
<file>colorsel.c</file>
<file>combobox.c</file>
<file>css_accordion.c</file>
<file>css_basics.c</file>
<file>css_multiplebgs.c</file>
<file>css_pixbufs.c</file>
<file>css_shadows.c</file>
<file>dialog.c</file>
<file>drawingarea.c</file>
<file>editable_cells.c</file>
<file>entry_buffer.c</file>
<file>entry_completion.c</file>
<file>expander.c</file>
<file>hypertext.c</file>
<file>iconview.c</file>
<file>iconview_edit.c</file>
<file>images.c</file>
<file>infobar.c</file>
<file>links.c</file>
<file>list_store.c</file>
<file>menus.c</file>
<file>offscreen_window.c</file>
<file>offscreen_window2.c</file>
<file>overlay.c</file>
<file>panes.c</file>
<file>pickers.c</file>
<file>pixbufs.c</file>
<file>printing.c</file>
<file>rotated_text.c</file>
<file>search_entry.c</file>
<file>sizegroup.c</file>
<file>spinner.c</file>
<file>stock_browser.c</file>
<file>textview.c</file>
<file>textscroll.c</file>
<file>theming_style_classes.c</file>
<file>toolpalette.c</file>
<file>transparent.c</file>
<file>tree_store.c</file>
<file>ui_manager.c</file>
</gresource>
<gresource prefix="/textview">
<file>floppybuddy.gif</file>
<file>gtk-logo-old.png</file>
</gresource>
</gresources>

View File

@@ -1,5 +1,5 @@
<?xml version="1.0" standalone="no"?> <!--*- mode: xml -*-->
<interface domain="gtk20">
<interface>
<object class="GtkListStore" id="liststore1">
<columns>
<column type="gchararray"/>

View File

@@ -1,65 +0,0 @@
GtkButton#fancy {
transition: none;
background-image: linear-gradient(to bottom,
alpha(white, 0.7),
alpha(white, 0) 30%),
linear-gradient(to top,
alpha(#babdb6, 0.4),
alpha(#babdb6, 0) 50%),
linear-gradient(135deg,
#eeeeec,
white 20%,
#d3d7cf,
white 80%,
#babdb6);
color: #3465a4;
font-weight: bold;
text-shadow: 0 1px white;
}
GtkButton#fancy:hover {
transition: all 250ms linear;
background-image: linear-gradient(to bottom,
alpha(white, 1),
alpha(white, 0)),
linear-gradient(135deg,
#eeeeec 10%,
white 40%,
#d3d7cf,
white 70%,
#babdb6);
color: #204a87;
}
GtkButton#fancy:active,
GtkButton#fancy:active:hover {
transition: none;
background-image: linear-gradient(to bottom,
alpha(#555753, 0.5),
alpha(#babdb6, 0.3)),
linear-gradient(135deg,
#eeeeec,
white 20%,
#d3d7cf,
white 80%,
#babdb6);
color: white;
text-shadow: 0 1px black;
}
GtkButton#fancy:backdrop,
GtkButton#fancy:backdrop:hover {
transition: none;
background-image: linear-gradient(135deg,
alpha(#eeeeec, 0.5) 10%,
alpha(white, 0.5) 40%,
alpha(#d3d7cf, 0.5),
alpha(white, 0.5) 70%,
alpha(#babdb6, 0.5));
color: #babdb6;
}
GtkButton#fancy * {
/* Yeah this should be inherited by default */
color: inherit;
}

View File

@@ -24,20 +24,13 @@ for $file (@ARGV) {
open INFO_FILE, $file or die "Cannot open '$file'\n";
$title = <INFO_FILE>;
$title =~ s@^\s*/\*\s*@@;
$extra = "";
if ($title =~ /^(.*)::(.*)$/) {
$title = $1;
$extra = " $2";
}
$title =~ s@\s*$@@;
$extra =~ s@^\s*@@;
$extra =~ s@\s*$@@;
close INFO_FILE;
print "GtkWidget *do_$basename (GtkWidget *do_widget);\n";
push @demos, {"name" => $basename, "title" => $title, "file" => "$file $extra",
push @demos, {"name" => $basename, "title" => $title, "file" => $file,
"func" => "do_$basename"};
}
@@ -48,7 +41,7 @@ foreach $href (@demos) {
my $do_next = 0;
# parent detected
if (defined @parents) {
if (@parents) {
foreach $foo (@parents) {
if ($foo eq $parent_name) {
$do_next = 1;
@@ -62,7 +55,7 @@ foreach $href (@demos) {
push @parents, $parent_name;
$tmp = (defined @child_arrays)?($#child_arrays + 1):0;
$tmp = (@child_arrays)?($#child_arrays + 1):0;
push @child_arrays, "child$tmp";
push @demos, {"name" => "NULL", "title" => $parent_name, "file" => "NULL",
@@ -70,7 +63,7 @@ foreach $href (@demos) {
}
}
if (defined @parents) {
if (@parents) {
$i = 0;
for ($i = 0; $i <= $#parents; $i++) {
$first = 1;
@@ -81,7 +74,7 @@ if (defined @parents) {
for ($j = 0; $j <= $#demos; $j++) {
$href = $demos[$j];
if (!defined $demos[$j]) {
if (!$demos[$j]) {
next;
}
@@ -113,7 +106,7 @@ if (defined @parents) {
} @demos_old;
# sort the child arrays
if (defined @child_arrays) {
if (@child_arrays) {
for ($i = 0; $i <= $#child_arrays; $i++) {
@foo_old = @{$child_arrays[$i]};
@@ -141,7 +134,7 @@ foreach $href (@demos) {
print ", \n";
}
if (defined @parents) {
if (@parents) {
for ($i = 0; $i <= $#parents; $i++) {
if ($parents[$i] eq $href->{title}) {

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.3 KiB

View File

@@ -7,12 +7,11 @@
#include <gtk/gtk.h>
#include <string.h>
#include "demo-common.h"
static GtkWidget *window = NULL;
#define FOLDER_NAME "gnome-fs-directory.png"
#define FILE_NAME "gnome-fs-regular.png"
#define FOLDER_NAME "/iconview/gnome-fs-directory.png"
#define FILE_NAME "/iconview/gnome-fs-regular.png"
enum
{
@@ -29,36 +28,18 @@ gchar *parent;
GtkToolItem *up_button;
/* Loads the images for the demo and returns whether the operation succeeded */
static gboolean
load_pixbufs (GError **error)
static void
load_pixbufs (void)
{
char *filename;
if (file_pixbuf)
return TRUE; /* already loaded earlier */
return; /* already loaded earlier */
/* demo_find_file() looks in the current directory first,
* so you can run gtk-demo without installing GTK, then looks
* in the location where the file is installed.
*/
filename = demo_find_file (FILE_NAME, error);
if (!filename)
return FALSE; /* note that "error" was filled in and returned */
file_pixbuf = gdk_pixbuf_new_from_resource (FILE_NAME, NULL);
/* resources must load successfully */
g_assert (file_pixbuf);
file_pixbuf = gdk_pixbuf_new_from_file (filename, error);
g_free (filename);
if (!file_pixbuf)
return FALSE; /* Note that "error" was filled with a GError */
filename = demo_find_file (FOLDER_NAME, error);
if (!filename)
return FALSE; /* note that "error" was filled in and returned */
folder_pixbuf = gdk_pixbuf_new_from_file (filename, error);
g_free (filename);
return TRUE;
folder_pixbuf = gdk_pixbuf_new_from_resource (FOLDER_NAME, NULL);
g_assert (folder_pixbuf);
}
static void
@@ -261,7 +242,12 @@ do_iconview (GtkWidget *do_widget)
{
if (!window)
{
GError *error;
GtkWidget *sw;
GtkWidget *icon_view;
GtkListStore *store;
GtkWidget *vbox;
GtkWidget *tool_bar;
GtkToolItem *home_button;
window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
gtk_window_set_default_size (GTK_WINDOW (window), 650, 400);
@@ -273,90 +259,63 @@ do_iconview (GtkWidget *do_widget)
g_signal_connect (window, "destroy",
G_CALLBACK (close_window), NULL);
error = NULL;
if (!load_pixbufs (&error))
{
GtkWidget *dialog;
load_pixbufs ();
dialog = gtk_message_dialog_new (GTK_WINDOW (window),
GTK_DIALOG_DESTROY_WITH_PARENT,
GTK_MESSAGE_ERROR,
GTK_BUTTONS_CLOSE,
"Failed to load an image: %s",
error->message);
vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
gtk_container_add (GTK_CONTAINER (window), vbox);
g_error_free (error);
tool_bar = gtk_toolbar_new ();
gtk_box_pack_start (GTK_BOX (vbox), tool_bar, FALSE, FALSE, 0);
g_signal_connect (dialog, "response",
G_CALLBACK (gtk_widget_destroy), NULL);
up_button = gtk_tool_button_new_from_stock (GTK_STOCK_GO_UP);
gtk_tool_item_set_is_important (up_button, TRUE);
gtk_widget_set_sensitive (GTK_WIDGET (up_button), FALSE);
gtk_toolbar_insert (GTK_TOOLBAR (tool_bar), up_button, -1);
gtk_widget_show (dialog);
}
else
{
GtkWidget *sw;
GtkWidget *icon_view;
GtkListStore *store;
GtkWidget *vbox;
GtkWidget *tool_bar;
GtkToolItem *home_button;
vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
gtk_container_add (GTK_CONTAINER (window), vbox);
tool_bar = gtk_toolbar_new ();
gtk_box_pack_start (GTK_BOX (vbox), tool_bar, FALSE, FALSE, 0);
up_button = gtk_tool_button_new_from_stock (GTK_STOCK_GO_UP);
gtk_tool_item_set_is_important (up_button, TRUE);
gtk_widget_set_sensitive (GTK_WIDGET (up_button), FALSE);
gtk_toolbar_insert (GTK_TOOLBAR (tool_bar), up_button, -1);
home_button = gtk_tool_button_new_from_stock (GTK_STOCK_HOME);
gtk_tool_item_set_is_important (home_button, TRUE);
gtk_toolbar_insert (GTK_TOOLBAR (tool_bar), home_button, -1);
home_button = gtk_tool_button_new_from_stock (GTK_STOCK_HOME);
gtk_tool_item_set_is_important (home_button, TRUE);
gtk_toolbar_insert (GTK_TOOLBAR (tool_bar), home_button, -1);
sw = gtk_scrolled_window_new (NULL, NULL);
gtk_scrolled_window_set_shadow_type (GTK_SCROLLED_WINDOW (sw),
GTK_SHADOW_ETCHED_IN);
gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (sw),
GTK_POLICY_AUTOMATIC,
GTK_POLICY_AUTOMATIC);
sw = gtk_scrolled_window_new (NULL, NULL);
gtk_scrolled_window_set_shadow_type (GTK_SCROLLED_WINDOW (sw),
GTK_SHADOW_ETCHED_IN);
gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (sw),
GTK_POLICY_AUTOMATIC,
GTK_POLICY_AUTOMATIC);
gtk_box_pack_start (GTK_BOX (vbox), sw, TRUE, TRUE, 0);
gtk_box_pack_start (GTK_BOX (vbox), sw, TRUE, TRUE, 0);
/* Create the store and fill it with the contents of '/' */
parent = g_strdup ("/");
store = create_store ();
fill_store (store);
/* Create the store and fill it with the contents of '/' */
parent = g_strdup ("/");
store = create_store ();
fill_store (store);
icon_view = gtk_icon_view_new_with_model (GTK_TREE_MODEL (store));
gtk_icon_view_set_selection_mode (GTK_ICON_VIEW (icon_view),
GTK_SELECTION_MULTIPLE);
g_object_unref (store);
icon_view = gtk_icon_view_new_with_model (GTK_TREE_MODEL (store));
gtk_icon_view_set_selection_mode (GTK_ICON_VIEW (icon_view),
GTK_SELECTION_MULTIPLE);
g_object_unref (store);
/* Connect to the "clicked" signal of the "Up" tool button */
g_signal_connect (up_button, "clicked",
G_CALLBACK (up_clicked), store);
/* Connect to the "clicked" signal of the "Up" tool button */
g_signal_connect (up_button, "clicked",
G_CALLBACK (up_clicked), store);
/* Connect to the "clicked" signal of the "Home" tool button */
g_signal_connect (home_button, "clicked",
G_CALLBACK (home_clicked), store);
/* Connect to the "clicked" signal of the "Home" tool button */
g_signal_connect (home_button, "clicked",
G_CALLBACK (home_clicked), store);
/* We now set which model columns that correspond to the text
* and pixbuf of each item
*/
gtk_icon_view_set_text_column (GTK_ICON_VIEW (icon_view), COL_DISPLAY_NAME);
gtk_icon_view_set_pixbuf_column (GTK_ICON_VIEW (icon_view), COL_PIXBUF);
/* We now set which model columns that correspond to the text
* and pixbuf of each item
*/
gtk_icon_view_set_text_column (GTK_ICON_VIEW (icon_view), COL_DISPLAY_NAME);
gtk_icon_view_set_pixbuf_column (GTK_ICON_VIEW (icon_view), COL_PIXBUF);
/* Connect to the "item-activated" signal */
g_signal_connect (icon_view, "item-activated",
G_CALLBACK (item_activated), store);
gtk_container_add (GTK_CONTAINER (sw), icon_view);
/* Connect to the "item-activated" signal */
g_signal_connect (icon_view, "item-activated",
G_CALLBACK (item_activated), store);
gtk_container_add (GTK_CONTAINER (sw), icon_view);
gtk_widget_grab_focus (icon_view);
}
gtk_widget_grab_focus (icon_view);
}
if (!gtk_widget_get_visible (window))

View File

@@ -7,7 +7,6 @@
#include <gtk/gtk.h>
#include <string.h>
#include "demo-common.h"
static GtkWidget *window = NULL;

View File

@@ -16,12 +16,11 @@
#include <glib/gstdio.h>
#include <stdio.h>
#include <errno.h>
#include "demo-common.h"
static GtkWidget *window = NULL;
static GdkPixbufLoader *pixbuf_loader = NULL;
static guint load_timeout = 0;
static FILE* image_stream = NULL;
static GInputStream * image_stream = NULL;
static void
progressive_prepared_callback (GdkPixbufLoader *loader,
@@ -79,13 +78,13 @@ progressive_timeout (gpointer data)
if (image_stream)
{
size_t bytes_read;
gssize bytes_read;
guchar buf[256];
GError *error = NULL;
bytes_read = fread (buf, 1, 256, image_stream);
bytes_read = g_input_stream_read (image_stream, buf, 256, NULL, &error);
if (ferror (image_stream))
if (bytes_read < 0)
{
GtkWidget *dialog;
@@ -94,12 +93,13 @@ progressive_timeout (gpointer data)
GTK_MESSAGE_ERROR,
GTK_BUTTONS_CLOSE,
"Failure reading image file 'alphatest.png': %s",
g_strerror (errno));
error->message);
g_error_free (error);
g_signal_connect (dialog, "response",
G_CALLBACK (gtk_widget_destroy), NULL);
fclose (image_stream);
g_object_unref (image_stream);
image_stream = NULL;
gtk_widget_show (dialog);
@@ -127,7 +127,7 @@ progressive_timeout (gpointer data)
g_signal_connect (dialog, "response",
G_CALLBACK (gtk_widget_destroy), NULL);
fclose (image_stream);
g_object_unref (image_stream);
image_stream = NULL;
gtk_widget_show (dialog);
@@ -137,9 +137,42 @@ progressive_timeout (gpointer data)
return FALSE; /* uninstall the timeout */
}
if (feof (image_stream))
if (bytes_read == 0)
{
fclose (image_stream);
/* Errors can happen on close, e.g. if the image
* file was truncated we'll know on close that
* it was incomplete.
*/
error = NULL;
if (!g_input_stream_close (image_stream, NULL, &error))
{
GtkWidget *dialog;
dialog = gtk_message_dialog_new (GTK_WINDOW (window),
GTK_DIALOG_DESTROY_WITH_PARENT,
GTK_MESSAGE_ERROR,
GTK_BUTTONS_CLOSE,
"Failed to load image: %s",
error->message);
g_error_free (error);
g_signal_connect (dialog, "response",
G_CALLBACK (gtk_widget_destroy), NULL);
gtk_widget_show (dialog);
g_object_unref (image_stream);
image_stream = NULL;
g_object_unref (pixbuf_loader);
pixbuf_loader = NULL;
load_timeout = 0;
return FALSE; /* uninstall the timeout */
}
g_object_unref (image_stream);
image_stream = NULL;
/* Errors can happen on close, e.g. if the image
@@ -180,29 +213,9 @@ progressive_timeout (gpointer data)
}
else
{
gchar *filename;
gchar *error_message = NULL;
GError *error = NULL;
/* demo_find_file() looks in the current directory first,
* so you can run gtk-demo without installing GTK, then looks
* in the location where the file is installed.
*/
filename = demo_find_file ("alphatest.png", &error);
if (error)
{
error_message = g_strdup (error->message);
g_error_free (error);
}
else
{
image_stream = g_fopen (filename, "rb");
g_free (filename);
if (!image_stream)
error_message = g_strdup_printf ("Unable to open image file 'alphatest.png': %s",
g_strerror (errno));
}
image_stream = g_resources_open_stream ("/images/alphatest.png", 0, &error);
if (image_stream == NULL)
{
@@ -212,8 +225,8 @@ progressive_timeout (gpointer data)
GTK_DIALOG_DESTROY_WITH_PARENT,
GTK_MESSAGE_ERROR,
GTK_BUTTONS_CLOSE,
"%s", error_message);
g_free (error_message);
"%s", error->message);
g_error_free (error);
g_signal_connect (dialog, "response",
G_CALLBACK (gtk_widget_destroy), NULL);
@@ -229,7 +242,6 @@ progressive_timeout (gpointer data)
{
gdk_pixbuf_loader_close (pixbuf_loader, NULL);
g_object_unref (pixbuf_loader);
pixbuf_loader = NULL;
}
pixbuf_loader = gdk_pixbuf_loader_new ();
@@ -278,8 +290,10 @@ cleanup_callback (GObject *object,
}
if (image_stream)
fclose (image_stream);
image_stream = NULL;
{
g_object_unref (image_stream);
image_stream = NULL;
}
}
static void
@@ -317,8 +331,6 @@ do_images (GtkWidget *do_widget)
GtkWidget *button;
GdkPixbuf *pixbuf;
GIcon *gicon;
GError *error = NULL;
char *filename;
if (!window)
{
@@ -349,41 +361,9 @@ do_images (GtkWidget *do_widget)
gtk_widget_set_valign (frame, GTK_ALIGN_CENTER);
gtk_box_pack_start (GTK_BOX (vbox), frame, FALSE, FALSE, 0);
/* demo_find_file() looks in the current directory first,
* so you can run gtk-demo without installing GTK, then looks
* in the location where the file is installed.
*/
pixbuf = NULL;
filename = demo_find_file ("gtk-logo-rgb.gif", &error);
if (filename)
{
pixbuf = gdk_pixbuf_new_from_file (filename, &error);
g_free (filename);
}
if (error)
{
/* This code shows off error handling. You can just use
* gtk_image_new_from_file() instead if you don't want to report
* errors to the user. If the file doesn't load when using
* gtk_image_new_from_file(), a "missing image" icon will
* be displayed instead.
*/
GtkWidget *dialog;
dialog = gtk_message_dialog_new (GTK_WINDOW (window),
GTK_DIALOG_DESTROY_WITH_PARENT,
GTK_MESSAGE_ERROR,
GTK_BUTTONS_CLOSE,
"Unable to open image file 'gtk-logo-rgb.gif': %s",
error->message);
g_error_free (error);
g_signal_connect (dialog, "response",
G_CALLBACK (gtk_widget_destroy), NULL);
gtk_widget_show (dialog);
}
pixbuf = gdk_pixbuf_new_from_resource ("/images/gtk-logo-old.png", NULL);
/* The image loading must work, we ensure that the resources are valid. */
g_assert (pixbuf);
image = gtk_image_new_from_pixbuf (pixbuf);
@@ -403,9 +383,7 @@ do_images (GtkWidget *do_widget)
gtk_widget_set_valign (frame, GTK_ALIGN_CENTER);
gtk_box_pack_start (GTK_BOX (vbox), frame, FALSE, FALSE, 0);
filename = demo_find_file ("floppybuddy.gif", NULL);
image = gtk_image_new_from_file (filename);
g_free (filename);
image = gtk_image_new_from_resource ("/images/floppybuddy.gif");
gtk_container_add (GTK_CONTAINER (frame), image);
@@ -427,8 +405,8 @@ do_images (GtkWidget *do_widget)
gtk_container_add (GTK_CONTAINER (frame), image);
/* Progressive */
/* Progressive */
label = gtk_label_new (NULL);
gtk_label_set_markup (GTK_LABEL (label),

View File

@@ -9,14 +9,15 @@
#include "demos.h"
static GtkTextBuffer *info_buffer;
static GtkTextBuffer *source_buffer;
static GtkWidget *info_view;
static GtkWidget *source_view;
static gchar *current_file = NULL;
static GtkWidget *notebook;
enum {
NAME_COLUMN,
TITLE_COLUMN,
FILENAME_COLUMN,
FUNC_COLUMN,
@@ -31,65 +32,6 @@ struct _CallbackData
GtkTreePath *path;
};
#ifdef G_OS_WIN32
#undef DEMOCODEDIR
static char *
get_democodedir (void)
{
static char *result = NULL;
if (result == NULL)
{
result = g_win32_get_package_installation_directory_of_module (NULL);
if (result == NULL)
result = "unknown-location";
result = g_strconcat (result, "\\share\\gtk-3.0\\demo", NULL);
}
return result;
}
#define DEMOCODEDIR get_democodedir ()
#endif
/**
* demo_find_file:
* @base: base filename
* @err: location to store error, or %NULL.
*
* Looks for @base first in the current directory, then in the
* location GTK+ where it will be installed on make install,
* returns the first file found.
*
* Return value: the filename, if found or %NULL
*/
gchar *
demo_find_file (const char *base,
GError **err)
{
g_return_val_if_fail (err == NULL || *err == NULL, NULL);
if (g_file_test ("gtk-logo-rgb.gif", G_FILE_TEST_EXISTS) &&
g_file_test (base, G_FILE_TEST_EXISTS))
return g_strdup (base);
else
{
char *filename = g_build_filename (DEMOCODEDIR, base, NULL);
if (!g_file_test (filename, G_FILE_TEST_EXISTS))
{
g_set_error (err, G_FILE_ERROR, G_FILE_ERROR_NOENT,
"Cannot find demo data file \"%s\"", base);
g_free (filename);
return NULL;
}
return filename;
}
}
static void
window_closed_cb (GtkWidget *window, gpointer data)
{
@@ -110,65 +52,6 @@ window_closed_cb (GtkWidget *window, gpointer data)
g_free (cbdata);
}
gboolean
read_line (FILE *stream, GString *str)
{
int n_read = 0;
#ifdef HAVE_FLOCKFILE
flockfile (stream);
#endif
g_string_truncate (str, 0);
while (1)
{
int c;
#ifdef HAVE_FLOCKFILE
c = getc_unlocked (stream);
#else
c = getc (stream);
#endif
if (c == EOF)
goto done;
else
n_read++;
switch (c)
{
case '\r':
case '\n':
{
#ifdef HAVE_FLOCKFILE
int next_c = getc_unlocked (stream);
#else
int next_c = getc (stream);
#endif
if (!(next_c == EOF ||
(c == '\r' && next_c == '\n') ||
(c == '\n' && next_c == '\r')))
ungetc (next_c, stream);
goto done;
}
default:
g_string_append_c (str, c);
}
}
done:
#ifdef HAVE_FLOCKFILE
funlockfile (stream);
#endif
return n_read > 0;
}
/* Stupid syntax highlighting.
*
* No regex was used in the making of this highlighting.
@@ -470,7 +353,7 @@ parse_chars (gchar *text,
/* While not as cool as c-mode, this will do as a quick attempt at highlighting */
static void
fontify (void)
fontify (GtkTextBuffer *source_buffer)
{
GtkTextIter start_iter, next_iter, tmp_iter;
gint state;
@@ -515,36 +398,78 @@ fontify (void)
}
}
static GtkWidget *create_text (GtkTextBuffer **buffer, gboolean is_source);
static GtkWidget *create_text (GtkWidget **text_view, gboolean is_source);
static void
add_data_tab (const gchar *filename)
add_data_tab (const gchar *demoname)
{
GtkTextBuffer *buffer = NULL;
gchar *full_filename;
GError *err = NULL;
gchar *text;
gchar *resource_dir, *resource_name, *content_type, *content_mime;
gchar **resources;
GBytes *bytes;
GtkWidget *widget, *label;
guint i;
full_filename = demo_find_file (filename, &err);
if (!full_filename ||
!g_file_get_contents (full_filename, &text, NULL, &err))
resource_dir = g_strconcat ("/", demoname, NULL);
resources = g_resources_enumerate_children (resource_dir, 0, NULL);
if (resources == NULL)
{
g_warning ("%s", err->message);
g_error_free (err);
g_free (resource_dir);
return;
}
widget = create_text (&buffer, FALSE);
gtk_widget_show_all (widget);
label = gtk_label_new (filename);
gtk_widget_show (label);
gtk_notebook_append_page (GTK_NOTEBOOK (notebook), widget, label);
for (i = 0; resources[i]; i++)
{
resource_name = g_strconcat (resource_dir, "/", resources[i], NULL);
bytes = g_resources_lookup_data (resource_name, 0, NULL);
g_assert (bytes);
gtk_text_buffer_set_text (buffer, text, -1);
content_type = g_content_type_guess (resource_name,
g_bytes_get_data (bytes, NULL),
g_bytes_get_size (bytes),
NULL);
content_mime = g_content_type_get_mime_type (content_type);
g_free (full_filename);
g_free (text);
/* In theory we should look at all the mime types gdk-pixbuf supports
* and go from there, but we know what file types we've added.
*/
if (g_content_type_is_a (content_mime, "image/png") ||
g_content_type_is_a (content_mime, "image/gif") ||
g_content_type_is_a (content_mime, "image/jpeg"))
{
widget = gtk_image_new_from_resource (resource_name);
}
else if (g_content_type_is_a (content_mime, "text/plain") ||
g_content_type_is_a (content_mime, "application/x-ext-ui") ||
g_content_type_is_a (content_mime, "text/css"))
{
GtkTextBuffer *buffer;
GtkWidget *textview;
widget = create_text (&textview, FALSE);
buffer = gtk_text_buffer_new (NULL);
gtk_text_buffer_set_text (buffer, g_bytes_get_data (bytes, NULL), g_bytes_get_size (bytes));
gtk_text_view_set_buffer (GTK_TEXT_VIEW (textview), buffer);
}
else
{
g_warning ("Don't know how to display resource '%s' of type '%s'\n", resource_name, content_mime);
widget = NULL;
}
gtk_widget_show_all (widget);
label = gtk_label_new (resources[i]);
gtk_widget_show (label);
gtk_notebook_append_page (GTK_NOTEBOOK (notebook), widget, label);
g_free (content_mime);
g_free (content_type);
g_free (resource_name);
g_bytes_unref (bytes);
}
g_strfreev (resources);
g_free (resource_dir);
}
static void
@@ -557,64 +482,83 @@ remove_data_tabs (void)
}
void
load_file (const gchar *filename)
load_file (const gchar *demoname,
const gchar *filename)
{
FILE *file;
GtkTextBuffer *info_buffer, *source_buffer;
GtkTextIter start, end;
char *full_filename;
char *resource_filename;
GError *err = NULL;
GString *buffer = g_string_new (NULL);
int state = 0;
gboolean in_para = 0;
gchar **names;
gchar **lines;
GBytes *bytes;
gint i;
if (!g_strcmp0 (current_file, filename))
return;
remove_data_tabs ();
names = g_strsplit (filename, " ", -1);
for (i = 1; names[i]; i++) {
if (strlen (names[i]) > 0)
add_data_tab (names[i]);
}
if (current_file && !strcmp (current_file, names[0]))
goto out;
add_data_tab (demoname);
g_free (current_file);
current_file = g_strdup (names[0]);
current_file = g_strdup (filename);
gtk_text_buffer_get_bounds (info_buffer, &start, &end);
gtk_text_buffer_delete (info_buffer, &start, &end);
info_buffer = gtk_text_buffer_new (NULL);
gtk_text_buffer_create_tag (info_buffer, "title",
"font", "Sans 18",
"pixels-below-lines", 10,
NULL);
gtk_text_buffer_get_bounds (source_buffer, &start, &end);
gtk_text_buffer_delete (source_buffer, &start, &end);
source_buffer = gtk_text_buffer_new (NULL);
gtk_text_buffer_create_tag (source_buffer, "comment",
"foreground", "DodgerBlue",
NULL);
gtk_text_buffer_create_tag (source_buffer, "type",
"foreground", "ForestGreen",
NULL);
gtk_text_buffer_create_tag (source_buffer, "string",
"foreground", "RosyBrown",
"weight", PANGO_WEIGHT_BOLD,
NULL);
gtk_text_buffer_create_tag (source_buffer, "control",
"foreground", "purple",
NULL);
gtk_text_buffer_create_tag (source_buffer, "preprocessor",
"style", PANGO_STYLE_OBLIQUE,
"foreground", "burlywood4",
NULL);
gtk_text_buffer_create_tag (source_buffer, "function",
"weight", PANGO_WEIGHT_BOLD,
"foreground", "DarkGoldenrod4",
NULL);
full_filename = demo_find_file (names[0], &err);
if (!full_filename)
resource_filename = g_strconcat ("/sources/", filename, NULL);
bytes = g_resources_lookup_data (resource_filename, 0, &err);
g_free (resource_filename);
if (bytes == NULL)
{
g_warning ("%s", err->message);
g_warning ("Cannot open source for %s: %s\n", filename, err->message);
g_error_free (err);
goto out;
return;
}
file = g_fopen (full_filename, "r");
if (!file)
g_warning ("Cannot open %s: %s\n", full_filename, g_strerror (errno));
g_free (full_filename);
if (!file)
goto out;
lines = g_strsplit (g_bytes_get_data (bytes, NULL), "\n", -1);
g_bytes_unref (bytes);
gtk_text_buffer_get_iter_at_offset (info_buffer, &start, 0);
while (read_line (file, buffer))
for (i = 0; lines[i] != NULL; i++)
{
gchar *p = buffer->str;
gchar *p;
gchar *q;
gchar *r;
/* Make sure \r is stripped at the end for the poor windows people */
lines[i] = g_strchomp (lines[i]);
p = lines[i];
switch (state)
{
case 0:
@@ -703,7 +647,7 @@ load_file (const gchar *filename)
p++;
if (*p)
{
p = buffer->str;
p = lines[i];
state++;
/* Fall through */
}
@@ -718,14 +662,14 @@ load_file (const gchar *filename)
}
}
fclose (file);
fontify (source_buffer);
fontify ();
g_strfreev (lines);
out:
g_string_free (buffer, TRUE);
g_strfreev (names);
gtk_text_view_set_buffer (GTK_TEXT_VIEW (info_view), info_buffer);
g_object_unref (info_buffer);
gtk_text_view_set_buffer (GTK_TEXT_VIEW (source_view), source_buffer);
g_object_unref (source_buffer);
}
void
@@ -775,22 +719,26 @@ selection_cb (GtkTreeSelection *selection,
GtkTreeModel *model)
{
GtkTreeIter iter;
GValue value = G_VALUE_INIT;
char *name, *filename;
if (! gtk_tree_selection_get_selected (selection, NULL, &iter))
return;
gtk_tree_model_get_value (model, &iter,
FILENAME_COLUMN,
&value);
if (g_value_get_string (&value))
load_file (g_value_get_string (&value));
g_value_unset (&value);
gtk_tree_model_get (model, &iter,
NAME_COLUMN, &name,
FILENAME_COLUMN, &filename,
-1);
if (filename)
load_file (name, filename);
g_free (name);
g_free (filename);
}
static GtkWidget *
create_text (GtkTextBuffer **buffer,
gboolean is_source)
create_text (GtkWidget **view,
gboolean is_source)
{
GtkWidget *scrolled_window;
GtkWidget *text_view;
@@ -803,10 +751,9 @@ create_text (GtkTextBuffer **buffer,
gtk_scrolled_window_set_shadow_type (GTK_SCROLLED_WINDOW (scrolled_window),
GTK_SHADOW_IN);
text_view = gtk_text_view_new ();
*view = text_view = gtk_text_view_new ();
g_object_set (text_view, "margin", 20, NULL);
*buffer = gtk_text_buffer_new (NULL);
gtk_text_view_set_buffer (GTK_TEXT_VIEW (text_view), *buffer);
gtk_text_view_set_editable (GTK_TEXT_VIEW (text_view), FALSE);
gtk_text_view_set_cursor_visible (GTK_TEXT_VIEW (text_view), FALSE);
@@ -848,7 +795,7 @@ create_tree (void)
Demo *d = gtk_demos;
model = gtk_tree_store_new (NUM_COLUMNS, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_POINTER, G_TYPE_INT);
model = gtk_tree_store_new (NUM_COLUMNS, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_POINTER, G_TYPE_INT);
tree_view = gtk_tree_view_new ();
gtk_tree_view_set_model (GTK_TREE_VIEW (tree_view), GTK_TREE_MODEL (model));
selection = gtk_tree_view_get_selection (GTK_TREE_VIEW (tree_view));
@@ -868,6 +815,7 @@ create_tree (void)
gtk_tree_store_set (GTK_TREE_STORE (model),
&iter,
NAME_COLUMN, d->name,
TITLE_COLUMN, d->title,
FILENAME_COLUMN, d->filename,
FUNC_COLUMN, d->func,
@@ -887,6 +835,7 @@ create_tree (void)
gtk_tree_store_set (GTK_TREE_STORE (model),
&child_iter,
NAME_COLUMN, children->name,
TITLE_COLUMN, children->title,
FILENAME_COLUMN, children->filename,
FUNC_COLUMN, children->func,
@@ -939,53 +888,14 @@ static void
setup_default_icon (void)
{
GdkPixbuf *pixbuf;
char *filename;
GError *err;
err = NULL;
pixbuf = gdk_pixbuf_new_from_resource ("/gtk-logo-old.png", NULL);
/* We load a resource, so we can guarantee that loading it is successful */
g_assert (pixbuf);
pixbuf = NULL;
filename = demo_find_file ("gtk-logo-rgb.gif", &err);
if (filename)
{
pixbuf = gdk_pixbuf_new_from_file (filename, &err);
g_free (filename);
}
/* Ignoring this error (passing NULL instead of &err above)
* would probably be reasonable for most apps. We're just
* showing off.
*/
if (err)
{
GtkWidget *dialog;
dialog = gtk_message_dialog_new (NULL, 0,
GTK_MESSAGE_ERROR,
GTK_BUTTONS_CLOSE,
"Failed to read icon file: %s",
err->message);
g_error_free (err);
g_signal_connect (dialog, "response",
G_CALLBACK (gtk_widget_destroy), NULL);
}
if (pixbuf)
{
GList *list;
GdkPixbuf *transparent;
/* The gtk-logo-rgb icon has a white background, make it transparent */
transparent = gdk_pixbuf_add_alpha (pixbuf, TRUE, 0xff, 0xff, 0xff);
list = NULL;
list = g_list_append (list, transparent);
gtk_window_set_default_icon_list (list);
g_list_free (list);
g_object_unref (pixbuf);
g_object_unref (transparent);
}
gtk_window_set_default_icon (pixbuf);
g_object_unref (pixbuf);
}
int
@@ -1021,49 +931,21 @@ main (int argc, char **argv)
gtk_box_pack_start (GTK_BOX (hbox), tree, FALSE, FALSE, 0);
notebook = gtk_notebook_new ();
gtk_notebook_set_scrollable (GTK_NOTEBOOK (notebook), TRUE);
gtk_box_pack_start (GTK_BOX (hbox), notebook, TRUE, TRUE, 0);
gtk_notebook_append_page (GTK_NOTEBOOK (notebook),
create_text (&info_buffer, FALSE),
create_text (&info_view, FALSE),
gtk_label_new_with_mnemonic ("_Info"));
gtk_text_buffer_create_tag (info_buffer, "title",
"font", "Sans 18",
NULL);
g_object_unref (info_buffer);
gtk_notebook_append_page (GTK_NOTEBOOK (notebook),
create_text (&source_buffer, TRUE),
create_text (&source_view, TRUE),
gtk_label_new_with_mnemonic ("_Source"));
gtk_text_buffer_create_tag (source_buffer, "comment",
"foreground", "DodgerBlue",
NULL);
gtk_text_buffer_create_tag (source_buffer, "type",
"foreground", "ForestGreen",
NULL);
gtk_text_buffer_create_tag (source_buffer, "string",
"foreground", "RosyBrown",
"weight", PANGO_WEIGHT_BOLD,
NULL);
gtk_text_buffer_create_tag (source_buffer, "control",
"foreground", "purple",
NULL);
gtk_text_buffer_create_tag (source_buffer, "preprocessor",
"style", PANGO_STYLE_OBLIQUE,
"foreground", "burlywood4",
NULL);
gtk_text_buffer_create_tag (source_buffer, "function",
"weight", PANGO_WEIGHT_BOLD,
"foreground", "DarkGoldenrod4",
NULL);
g_object_unref (source_buffer);
gtk_window_set_default_size (GTK_WINDOW (window), 600, 400);
gtk_widget_show_all (window);
load_file (gtk_demos[0].filename);
load_file (gtk_demos[0].name, gtk_demos[0].filename);
gtk_main ();

View File

@@ -16,21 +16,17 @@
#include <gtk/gtk.h>
#include <math.h>
#include "demo-common.h"
#define FRAME_DELAY 50
#define BACKGROUND_NAME "background.jpg"
#define BACKGROUND_NAME "/pixbufs/background.jpg"
static const char *image_names[] = {
"apple-red.png",
"gnome-applets.png",
"gnome-calendar.png",
"gnome-foot.png",
"gnome-gmush.png",
"gnome-gimp.png",
"gnome-gsame.png",
"gnu-keys.png"
"/pixbufs/apple-red.png",
"/pixbufs/gnome-applets.png",
"/pixbufs/gnome-calendar.png",
"/pixbufs/gnome-foot.png",
"/pixbufs/gnome-gmush.png",
"/pixbufs/gnome-gimp.png",
"/pixbufs/gnome-gsame.png",
"/pixbufs/gnu-keys.png"
};
#define N_IMAGES G_N_ELEMENTS (image_names)
@@ -56,22 +52,11 @@ static gboolean
load_pixbufs (GError **error)
{
gint i;
char *filename;
if (background)
return TRUE; /* already loaded earlier */
/* demo_find_file() looks in the current directory first,
* so you can run gtk-demo without installing GTK, then looks
* in the location where the file is installed.
*/
filename = demo_find_file (BACKGROUND_NAME, error);
if (!filename)
return FALSE; /* note that "error" was filled in and returned */
background = gdk_pixbuf_new_from_file (filename, error);
g_free (filename);
background = gdk_pixbuf_new_from_resource (BACKGROUND_NAME, error);
if (!background)
return FALSE; /* Note that "error" was filled with a GError */
@@ -80,12 +65,7 @@ load_pixbufs (GError **error)
for (i = 0; i < N_IMAGES; i++)
{
filename = demo_find_file (image_names[i], error);
if (!filename)
return FALSE; /* Note that "error" was filled with a GError */
images[i] = gdk_pixbuf_new_from_file (filename, error);
g_free (filename);
images[i] = gdk_pixbuf_new_from_resource (image_names[i], error);
if (!images[i])
return FALSE; /* Note that "error" was filled with a GError */
@@ -106,14 +86,17 @@ draw_cb (GtkWidget *widget,
return TRUE;
}
#define CYCLE_LEN 60
#define CYCLE_TIME 3000000 /* 3 seconds */
static int frame_num;
static gint64 start_time;
/* Timeout handler to regenerate the frame */
static gint
timeout (gpointer data)
/* Handler to regenerate the frame */
static gboolean
on_tick (GtkWidget *widget,
GdkFrameClock *frame_clock,
gpointer data)
{
gint64 current_time;
double f;
int i;
double xmid, ymid;
@@ -122,7 +105,11 @@ timeout (gpointer data)
gdk_pixbuf_copy_area (background, 0, 0, back_width, back_height,
frame, 0, 0);
f = (double) (frame_num % CYCLE_LEN) / CYCLE_LEN;
if (start_time == 0)
start_time = gdk_frame_clock_get_frame_time (frame_clock);
current_time = gdk_frame_clock_get_frame_time (frame_clock);
f = ((current_time - start_time) % CYCLE_TIME) / (double)CYCLE_TIME;
xmid = back_width / 2.0;
ymid = back_height / 2.0;
@@ -177,20 +164,9 @@ timeout (gpointer data)
gtk_widget_queue_draw (da);
frame_num++;
return G_SOURCE_CONTINUE;
}
static guint timeout_id;
static void
cleanup_callback (GObject *object,
gpointer data)
{
g_source_remove (timeout_id);
timeout_id = 0;
}
GtkWidget *
do_pixbufs (GtkWidget *do_widget)
{
@@ -206,8 +182,6 @@ do_pixbufs (GtkWidget *do_widget)
g_signal_connect (window, "destroy",
G_CALLBACK (gtk_widget_destroyed), &window);
g_signal_connect (window, "destroy",
G_CALLBACK (cleanup_callback), NULL);
error = NULL;
@@ -242,7 +216,7 @@ do_pixbufs (GtkWidget *do_widget)
gtk_container_add (GTK_CONTAINER (window), da);
timeout_id = g_timeout_add (FRAME_DELAY, timeout, NULL);
gtk_widget_add_tick_callback (da, on_tick, NULL, NULL);
}
}

View File

@@ -7,7 +7,6 @@
#include <math.h>
#include <gtk/gtk.h>
#include "demo-common.h"
/* In points */
#define HEADER_HEIGHT (10*72/25.4)
@@ -15,7 +14,7 @@
typedef struct
{
gchar *filename;
gchar *resourcename;
gdouble font_size;
gint lines_per_page;
@@ -30,7 +29,7 @@ begin_print (GtkPrintOperation *operation,
gpointer user_data)
{
PrintData *data = (PrintData *)user_data;
char *contents;
GBytes *bytes;
int i;
double height;
@@ -38,10 +37,10 @@ begin_print (GtkPrintOperation *operation,
data->lines_per_page = floor (height / data->font_size);
g_file_get_contents (data->filename, &contents, NULL, NULL);
bytes = g_resources_lookup_data (data->resourcename, 0, NULL);
data->lines = g_strsplit (contents, "\n", 0);
g_free (contents);
data->lines = g_strsplit (g_bytes_get_data (bytes, NULL), "\n", 0);
g_bytes_unref (bytes);
i = 0;
while (data->lines[i] != NULL)
@@ -86,7 +85,7 @@ draw_page (GtkPrintOperation *operation,
pango_layout_set_font_description (layout, desc);
pango_font_description_free (desc);
pango_layout_set_text (layout, data->filename, -1);
pango_layout_set_text (layout, data->resourcename, -1);
pango_layout_get_pixel_size (layout, &text_width, &text_height);
if (text_width > width)
@@ -137,7 +136,7 @@ end_print (GtkPrintOperation *operation,
{
PrintData *data = (PrintData *)user_data;
g_free (data->filename);
g_free (data->resourcename);
g_strfreev (data->lines);
g_free (data);
}
@@ -153,7 +152,7 @@ do_printing (GtkWidget *do_widget)
operation = gtk_print_operation_new ();
data = g_new0 (PrintData, 1);
data->filename = demo_find_file ("printing.c", NULL);
data->resourcename = g_strdup ("/sources/printing.c");
data->font_size = 12.0;
g_signal_connect (G_OBJECT (operation), "begin-print",

View File

@@ -6,7 +6,6 @@
*/
#include <gtk/gtk.h>
#include "demo-common.h"
/* Scroll to the end of the buffer.
*/

View File

@@ -10,8 +10,6 @@
#include <gtk/gtk.h>
#include <stdlib.h> /* for exit() */
#include "demo-common.h"
static void easter_egg_callback (GtkWidget *button, gpointer data);
static void
@@ -132,25 +130,9 @@ insert_text (GtkTextBuffer *buffer)
GtkTextIter start, end;
GdkPixbuf *pixbuf;
GdkPixbuf *scaled;
char *filename;
/* demo_find_file() looks in the current directory first,
* so you can run gtk-demo without installing GTK, then looks
* in the location where the file is installed.
*/
pixbuf = NULL;
filename = demo_find_file ("gtk-logo-rgb.gif", NULL);
if (filename)
{
pixbuf = gdk_pixbuf_new_from_file (filename, NULL);
g_free (filename);
}
if (pixbuf == NULL)
{
g_printerr ("Failed to load image file gtk-logo-rgb.gif\n");
exit (1);
}
pixbuf = gdk_pixbuf_new_from_resource ("/textview/gtk-logo-old.png", NULL);
g_assert (pixbuf);
scaled = gdk_pixbuf_scale_simple (pixbuf, 32, 32, GDK_INTERP_BILINEAR);
g_object_unref (pixbuf);
@@ -453,9 +435,7 @@ attach_widgets (GtkTextView *text_view)
}
else if (i == 3)
{
gchar *filename = demo_find_file ("floppybuddy.gif", NULL);
widget = gtk_image_new_from_file (filename);
g_free (filename);
widget = gtk_image_new_from_resource ("/textview/floppybuddy.gif");
}
else if (i == 4)
{

View File

@@ -1,66 +0,0 @@
/* CSS Theming/Custom CSS :: fancy.css
*
* GTK+ uses CSS for theming. If required, applications can
* install their own custom CSS style provider to achieve
* special effects.
*
* Doing this has the downside that your application will no
* longer react to the users theme preferences, so this should
* be used sparingly.
*/
#include <gtk/gtk.h>
#include "demo-common.h"
static GtkWidget *window = NULL;
GtkWidget *
do_theming_custom_css (GtkWidget *do_widget)
{
GtkWidget *box;
GtkWidget *button;
GtkCssProvider *provider;
GBytes *bytes;
if (!window)
{
window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
gtk_window_set_screen (GTK_WINDOW (window),
gtk_widget_get_screen (do_widget));
gtk_window_set_title (GTK_WINDOW (window), "Custom CSS");
gtk_container_set_border_width (GTK_CONTAINER (window), 18);
g_signal_connect (window, "destroy",
G_CALLBACK (gtk_widget_destroyed), &window);
box = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 6);
gtk_container_add (GTK_CONTAINER (window), box);
button = gtk_button_new_with_label ("Plain");
gtk_box_pack_start (GTK_BOX (box), button, TRUE, TRUE, 0);
button = gtk_button_new_with_label ("Fancy");
gtk_box_pack_start (GTK_BOX (box), button, TRUE, TRUE, 0);
gtk_widget_set_name (button, "fancy");
provider = gtk_css_provider_new ();
bytes = g_resources_lookup_data ("/theming_custom_css/gtk.css", 0, NULL);
gtk_css_provider_load_from_data (provider, g_bytes_get_data (bytes, NULL),
g_bytes_get_size (bytes), NULL);
gtk_style_context_add_provider_for_screen (gtk_widget_get_screen (do_widget),
GTK_STYLE_PROVIDER (provider),
GTK_STYLE_PROVIDER_PRIORITY_APPLICATION);
g_object_unref (provider);
g_bytes_unref (bytes);
gtk_widget_show_all (box);
}
if (!gtk_widget_get_visible (window))
{
gtk_widget_show (window);
}
else
{
gtk_widget_destroy (window);
window = NULL;
}
return window;
}

View File

@@ -1,4 +1,4 @@
/* CSS Theming/Style Classes :: theming.ui
/* CSS Theming/Style Classes
*
* GTK+ uses CSS for theming. Style classes can be associated
* with widgets to inform the theme about intended rendering.
@@ -9,7 +9,6 @@
*/
#include <gtk/gtk.h>
#include "demo-common.h"
static GtkWidget *window = NULL;

View File

@@ -7,7 +7,6 @@
#include <string.h>
#include <gtk/gtk.h>
#include "config.h"
#include "demo-common.h"
static GtkWidget *window = NULL;
@@ -576,8 +575,7 @@ do_toolpalette (GtkWidget *do_widget)
gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (contents_scroller),
GTK_POLICY_AUTOMATIC,
GTK_POLICY_ALWAYS);
gtk_scrolled_window_add_with_viewport (GTK_SCROLLED_WINDOW (contents_scroller),
contents);
gtk_container_add (GTK_CONTAINER (contents_scroller), contents);
gtk_container_set_border_width (GTK_CONTAINER (contents_scroller), 6);
gtk_notebook_append_page (GTK_NOTEBOOK (notebook),
@@ -607,8 +605,7 @@ do_toolpalette (GtkWidget *do_widget)
gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (contents_scroller),
GTK_POLICY_AUTOMATIC,
GTK_POLICY_ALWAYS);
gtk_scrolled_window_add_with_viewport (GTK_SCROLLED_WINDOW (contents_scroller),
contents);
gtk_container_add (GTK_CONTAINER (contents_scroller), contents);
gtk_container_set_border_width (GTK_CONTAINER (contents_scroller), 6);
gtk_notebook_append_page (GTK_NOTEBOOK (notebook), contents_scroller,

View File

@@ -25,8 +25,6 @@
#define FRAME_DELAY 50
#define BACKGROUND_NAME "background.jpg"
static const char *image_names[] = {
@@ -93,14 +91,17 @@ draw_cb (GtkWidget *widget, cairo_t *cr, gpointer data)
return TRUE;
}
#define CYCLE_LEN 60
#define CYCLE_TIME 3000000 /* 3 seconds */
static int frame_num;
static gint64 start_time;
/* Timeout handler to regenerate the frame */
static gint
timeout (gpointer data)
/* Handler to regenerate the frame */
static gboolean
on_tick (GtkWidget *widget,
GdkFrameClock *frame_clock,
gpointer data)
{
gint64 current_time;
double f;
int i;
double xmid, ymid;
@@ -109,7 +110,11 @@ timeout (gpointer data)
gdk_pixbuf_copy_area (background, 0, 0, back_width, back_height,
frame, 0, 0);
f = (double) (frame_num % CYCLE_LEN) / CYCLE_LEN;
if (start_time == 0)
start_time = gdk_frame_clock_get_frame_time (frame_clock);
current_time = gdk_frame_clock_get_frame_time (frame_clock);
f = ((current_time - start_time) % CYCLE_TIME) / (double)CYCLE_TIME;
xmid = back_width / 2.0;
ymid = back_height / 2.0;
@@ -163,19 +168,13 @@ timeout (gpointer data)
gtk_widget_queue_draw (da);
frame_num++;
return TRUE;
return G_SOURCE_CONTINUE;
}
static guint timeout_id;
/* Destroy handler for the window */
static void
destroy_cb (GObject *object, gpointer data)
{
g_source_remove (timeout_id);
timeout_id = 0;
gtk_main_quit ();
}
@@ -208,7 +207,7 @@ main (int argc, char **argv)
gtk_container_add (GTK_CONTAINER (window), da);
timeout_id = gdk_threads_add_timeout (FRAME_DELAY, timeout, NULL);
gtk_widget_add_tick_callback (da, on_tick, NULL, NULL);
gtk_widget_show_all (window);
gtk_main ();

View File

@@ -29,3 +29,5 @@ EXTRA_DIST += \
widget-factory.ui \
widget-factory.gresource.xml \
gtk-logo-256.png
-include $(top_srcdir)/git.mk

View File

@@ -147,4 +147,11 @@ include $(top_srcdir)/gtk-doc.make
# Other files to distribute
EXTRA_DIST += version.xml.in
if ENABLE_GTK_DOC
TESTS_ENVIRONMENT = cd $(srcdir) && \
DOC_MODULE=$(DOC_MODULE) DOC_MAIN_SGML_FILE=$(DOC_MAIN_SGML_FILE) \
SRCDIR=$(abs_srcdir) BUILDDIR=$(abs_builddir)
#TESTS = $(GTKDOC_CHECK)
endif
-include $(top_srcdir)/git.mk

View File

@@ -31,6 +31,8 @@
<xi:include href="xml/visuals.xml" />
<xi:include href="xml/cursors.xml" />
<xi:include href="xml/windows.xml" />
<xi:include href="xml/gdkframeclock.xml" />
<xi:include href="xml/gdkframetimings.xml" />
<xi:include href="xml/events.xml" />
<xi:include href="xml/event_structs.xml" />
<xi:include href="xml/keys.xml" />
@@ -41,6 +43,7 @@
<xi:include href="xml/pango_interaction.xml" />
<xi:include href="xml/cairo_interaction.xml" />
<xi:include href="xml/x_interaction.xml" />
<xi:include href="xml/wayland_interaction.xml" />
<xi:include href="xml/gdkapplaunchcontext.xml" />
<xi:include href="xml/gdktestutils.xml" />
</reference>
@@ -69,6 +72,10 @@
<title>Index of new symbols in 3.6</title>
<xi:include href="xml/api-index-3.6.xml"><xi:fallback /></xi:include>
</index>
<index id="api-index-3-8" role="3.8">
<title>Index of new symbols in 3.8</title>
<xi:include href="xml/api-index-3.8.xml"><xi:fallback /></xi:include>
</index>
<xi:include href="xml/annotation-glossary.xml"><xi:fallback /></xi:include>

View File

@@ -10,6 +10,7 @@ gdk_parse_args
gdk_get_display_arg_name
gdk_notify_startup_complete
gdk_notify_startup_complete_with_id
gdk_set_allowed_backends
<SUBSECTION>
gdk_get_program_class
@@ -51,6 +52,7 @@ gdk_error_trap_pop_ignored
GDK_WINDOWING_X11
GDK_WINDOWING_WIN32
GDK_WINDOWING_QUARTZ
GDK_WINDOWING_WAYLAND
<SUBSECTION>
GDK_VERSION_3_0
@@ -170,6 +172,7 @@ GdkDisplayClass
<TITLE>GdkDisplayManager</TITLE>
GdkDisplayManager
gdk_display_manager_get
gdk_display_manager_peek
gdk_display_manager_get_default_display
gdk_display_manager_set_default_display
gdk_display_manager_list_displays
@@ -355,6 +358,9 @@ gdk_window_maximize
gdk_window_unmaximize
gdk_window_fullscreen
gdk_window_unfullscreen
GdkFullscreenMode
gdk_window_get_fullscreen_mode
gdk_window_set_fullscreen_mode
gdk_window_set_keep_above
gdk_window_set_keep_below
gdk_window_set_opacity
@@ -401,6 +407,7 @@ gdk_window_process_updates
gdk_window_set_debug_updates
gdk_window_enable_synchronized_configure
gdk_window_configure_finished
gdk_window_get_frame_clock
<SUBSECTION>
gdk_window_set_user_data
@@ -517,6 +524,7 @@ GdkWindowRedirect
gdk_window_impl_get_type
gdk_window_freeze_toplevel_updates_libgtk_only
gdk_window_thaw_toplevel_updates_libgtk_only
gdk_fullscreen_mode_get_type
</SECTION>
<SECTION>
@@ -984,6 +992,7 @@ gdk_x11_window_set_hide_titlebar_when_maximized
gdk_x11_window_set_theme_variant
gdk_x11_window_set_user_time
gdk_x11_window_move_to_current_desktop
gdk_x11_window_set_utf8_property
gdk_x11_get_default_root_xwindow
gdk_x11_get_default_screen
gdk_x11_get_default_xdisplay
@@ -1120,6 +1129,54 @@ gdk_x11_window_get_type
gdk_window_impl_x11_get_type
</SECTION>
<SECTION>
<INCLUDE>gdk/gdkwayland.h</INCLUDE>
<TITLE>Wayland Interaction</TITLE>
<FILE>wayland_interaction</FILE>
gdk_wayland_device_get_wl_keyboard
gdk_wayland_device_get_wl_pointer
gdk_wayland_device_get_wl_seat
gdk_wayland_display_get_wl_compositor
gdk_wayland_display_get_wl_display
gdk_wayland_display_get_wl_shell
gdk_wayland_window_get_wl_shell_surface
gdk_wayland_window_get_wl_surface
gdk_wayland_window_set_use_custom_surface
<SUBSECTION Standard>
GDK_TYPE_WAYLAND_DEVICE
GDK_WAYLAND_DEVICE
GDK_WAYLAND_DEVICE_CLASS
GDK_WAYLAND_DEVICE_GET_CLASS
GDK_IS_WAYLAND_DEVICE
GDK_IS_WAYLAND_DEVICE_CLASS
GDK_TYPE_WAYLAND_DISPLAY
GDK_WAYLAND_DISPLAY
GDK_WAYLAND_DISPLAY_CLASS
GDK_WAYLAND_DISPLAY_GET_CLASS
GDK_IS_WAYLAND_DISPLAY
GDK_IS_WAYLAND_DISPLAY_CLASS
GDK_TYPE_WAYLAND_DISPLAY_MANAGER
GDK_WAYLAND_DISPLAY_MANAGER
GDK_WAYLAND_DISPLAY_MANAGER_CLASS
GDK_WAYLAND_DISPLAY_MANAGER_GET_CLASS
GDK_IS_WAYLAND_DISPLAY_MANAGER
GDK_IS_WAYLAND_DISPLAY_MANAGER_CLASS
GDK_TYPE_WAYLAND_WINDOW
GDK_WAYLAND_WINDOW
GDK_WAYLAND_WINDOW_CLASS
GDK_WAYLAND_WINDOW_GET_CLASS
GDK_IS_WAYLAND_WINDOW
GDK_IS_WAYLAND_WINDOW_CLASS
<SUBSECTION Private>
gdk_wayland_device_get_type
gdk_wayland_display_get_type
gdk_wayland_display_manager_get_type
gdk_wayland_window_get_type
</SECTION>
<SECTION>
<TITLE>Application launching</TITLE>
<FILE>gdkapplaunchcontext</FILE>
@@ -1150,3 +1207,38 @@ gdk_test_render_sync
gdk_test_simulate_button
gdk_test_simulate_key
</SECTION>
<SECTION>
<TITLE>GdkFrameClock</TITLE>
<FILE>gdkframeclock</FILE>
GdkFrameClock
gdk_frame_clock_get_frame_time
GdkFrameClockPhase
gdk_frame_clock_request_phase
gdk_frame_clock_begin_updating
gdk_frame_clock_end_updating
gdk_frame_clock_get_frame_counter
gdk_frame_clock_get_history_start
gdk_frame_clock_get_timings
gdk_frame_clock_get_current_timings
gdk_frame_clock_get_refresh_info
<SUBSECTION Private>
GdkFrameClockPrivate
gdk_frame_clock_get_type
</SECTION>
<SECTION>
<TITLE>GdkFrameTimings</TITLE>
<FILE>gdkframetimings</FILE>
GdkFrameTimings
gdk_frame_timings_ref
gdk_frame_timings_unref
gdk_frame_timings_get_frame_counter
gdk_frame_timings_get_complete
gdk_frame_timings_get_frame_time
gdk_frame_timings_get_presentation_time
gdk_frame_timings_get_refresh_interval
gdk_frame_timings_get_predicted_presentation_time
<SUBSECTION Private>
gdk_frame_get_type
</SECTION>

View File

@@ -21,10 +21,20 @@ CFILE_GLOB=$(top_srcdir)/gtk/*.c
# Header files to ignore when scanning
IGNORE_HFILES= \
fnmatch.h \
gactionmuxer.h \
gactionobserver.h \
gactionobservable.h \
gtk9slice.h \
gtkanimationdescription.h \
gtkdebug.h \
gtkactionhelper.h \
gtkapplicationprivate.h \
gtkbuilderprivate.h \
gtkcolorchooserprivate.h \
gtkcoloreditorprivate.h \
gtkcolorplaneprivate.h \
gtkcolorscaleprivate.h \
gtkcolorswatchprivate.h \
gtkdndcursors.h \
gtkentryprivate.h \
gtkfilechooserdefault.h \
@@ -45,6 +55,8 @@ IGNORE_HFILES= \
gtkmarshal.h \
gtkmenuprivate.h \
gtkmnemonichash.h \
gtkmodelmenu.h \
gtkmodelmenuitem.h \
gtkpathbar.h \
gtkplugprivate.h \
gtkprintbackend.h \
@@ -142,6 +154,7 @@ content_files = \
gtk-query-immodules-3.0.xml \
gtk-update-icon-cache.xml \
gtk-launch.xml \
broadwayd.xml \
visual_index.xml \
getting_started.xml \
overview.xml
@@ -415,7 +428,8 @@ EXTRA_DIST += version.xml.in gtk3.types.in
man_MANS = \
gtk-query-immodules-3.0.1 \
gtk-update-icon-cache.1 \
gtk-launch.1
gtk-launch.1 \
broadwayd.1
if ENABLE_MAN
@@ -449,6 +463,13 @@ MAINTAINERCLEANFILES = $(man_MANS) $(BUILT_SOURCES)
EXTRA_DIST += $(man_MANS)
if ENABLE_GTK_DOC
TESTS_ENVIRONMENT = cd $(srcdir) && \
DOC_MODULE=$(DOC_MODULE) DOC_MAIN_SGML_FILE=$(DOC_MAIN_SGML_FILE) \
SRCDIR=$(abs_srcdir) BUILDDIR=$(abs_builddir)
#TESTS = $(GTKDOC_CHECK)
endif
dist-hook-local: dist-local-check-mans-enabled all-local
gtk-docs-clean: clean

View File

@@ -4,25 +4,25 @@
]>
<refentry id="gtk-broadway">
<refmeta>
<refentrytitle>Using GTK+ with HTML5</refentrytitle>
<refentrytitle>Using GTK+ with Broadway</refentrytitle>
<manvolnum>3</manvolnum>
<refmiscinfo>GTK Library</refmiscinfo>
</refmeta>
<refnamediv>
<refname>Using GTK+ with HTML5</refname>
<refname>Using GTK+ with Broadway</refname>
<refpurpose>
HTML-specific aspects of using GTK+
</refpurpose>
</refnamediv>
<refsect1>
<title>Using GTK+ with HTML5</title>
<title>Using GTK+ with Broadway</title>
<para>
The GDK Broadway backend provides support for displaying GTK+
applications using HTML5 and Web sockets. To run your application
in this way, select the Broadway backend by setting
applications in a web browser, using HTML5 and web sockets. To run
your application in this way, select the Broadway backend by setting
<literal>GDK_BACKEND=broadway</literal>. Then you can make
your application appear in a web browser by pointing it at
<literal>http://127.0.0.1:8080</literal>. Note that you need
@@ -35,6 +35,37 @@ the <envar>BROADWAY_DISPLAY</envar> environment variable to the
port that you want to use.
</para>
<para>
It is also possible to use multiple GTK+ applications in the same
web browser window, by using the Broadway server,
<command>broadwayd</command>, that ships with GTK+.
To use broadwayd, start it like this:
<programlisting>
broadwayd :5
</programlisting>
Then point your web browser at <literal>http://127.0.0.1:8084</literal>.
Start your applications like this:
<programlisting>
BROADWAY_DISPLAY=:5 gtk3-demo
</programlisting>
</para>
<refsect2 id="broadway-envar">
<title>Broadway-specific environment variables</title>
</refsect2>
<formalpara>
<title><envar>BROADWAY_DISPLAY</envar></title>
<para>
Specifies the Broadway display number. The default display is 1.
The display number determines the port to use when connecting
to a Broadway application via the following formula:
<programlisting>
<replaceable>port</replaceable> = 8080 + (<replaceable>display</replaceable> - 1)
</programlisting>
</para>
</formalpara>
</refsect1>
</refentry>

View File

@@ -0,0 +1,86 @@
<?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="broadwayd">
<refentryinfo>
<title>broadwayd</title>
<productname>GTK+</productname>
<authorgroup>
<author>
<contrib>Developer</contrib>
<firstname>Alexander</firstname>
<surname>Larsson</surname>
</author>
</authorgroup>
</refentryinfo>
<refmeta>
<refentrytitle>broadwayd</refentrytitle>
<manvolnum>1</manvolnum>
<refmiscinfo class="manual">User Commands</refmiscinfo>
</refmeta>
<refnamediv>
<refname>broadwayd</refname>
<refpurpose>Broadway display server</refpurpose>
</refnamediv>
<refsynopsisdiv>
<cmdsynopsis>
<command>broadwayd</command>
<arg choice="opt">--port <replaceable>PORT</replaceable></arg>
<arg choice="opt">--address <replaceable>ADDRESS</replaceable></arg>
<arg choice="opt"><replaceable>:DISPLAY</replaceable></arg>
</cmdsynopsis>
</refsynopsisdiv>
<refsect1><title>Description</title>
<para>
<command>broadwayd</command> is a display server for the Broadway
GDK backend. It allows multiple GTK+ applications to display their
windows in the same web browser, by connecting to broadwayd.
</para>
<para>
When using broadwayd, specify the display number to use, prefixed
with a colon, similar to X. The default display number is 1.
<programlisting>
broadwayd :5
</programlisting>
Then point your web browser at <literal>http://127.0.0.1:8084</literal>.
Start your applications like this:
<programlisting>
BROADWAY_DISPLAY=:5 gtk3-demo
</programlisting>
You can add password protection for your session by creating a file in
<filename>$XDG_CONFIG_HOME/broadway.passwd</filename> or <filename>$HOME/.config/broadway.passwd</filename>
with a crypt(3) style password hash.
A simple way to generate it is with openssl:
<programlisting>
openssl passwd -1 > ~/.config/broadway.passwd
</programlisting>
</para>
</refsect1>
<refsect1><title>Options</title>
<variablelist>
<varlistentry>
<term>--port</term>
<listitem><para>Use <replaceable>PORT</replaceable> as the HTTP
port, instead of the default 8080 + (<replaceable>DISPLAY</replaceable> - 1).
</para></listitem>
</varlistentry>
<varlistentry>
<term>--address</term>
<listitem><para>Use <replaceable>ADDRESS</replaceable> as the HTTP
address, instead of the default <literal>http://127.0.0.1:<replaceable>PORT</replaceable></literal>.
</para></listitem>
</varlistentry>
</variablelist>
</refsect1>
</refentry>

View File

@@ -317,8 +317,8 @@ How to compile GTK+ itself
<command>configure</command>
<sbr/>
<group>
<arg>--disable-modules</arg>
<arg>--enable-modules</arg>
<arg choice="plain">--disable-modules</arg>
<arg choice="plain">--enable-modules</arg>
</group>
<sbr/>
<group>
@@ -326,65 +326,81 @@ How to compile GTK+ itself
</group>
<sbr/>
<group>
<arg>--enable-debug=[no/minimum/yes]</arg>
<arg choice="plain">--enable-debug=[no/minimum/yes]</arg>
</group>
<sbr/>
<group>
<arg>--disable-Bsymbolic</arg>
<arg>--enable-Bsymbolic</arg>
<arg choice="plain">--disable-Bsymbolic</arg>
<arg choice="plain">--enable-Bsymbolic</arg>
</group>
<sbr/>
<group>
<arg>--disable-xkb</arg>
<arg>--enable-xkb</arg>
<arg choice="plain">--disable-xkb</arg>
<arg choice="plain">--enable-xkb</arg>
</group>
<sbr/>
<group>
<arg>--disable-xinerama</arg>
<arg>--enable-xinerama</arg>
<arg choice="plain">--disable-xinerama</arg>
<arg choice="plain">--enable-xinerama</arg>
</group>
<sbr/>
<group>
<arg>--disable-gtk-doc</arg>
<arg>--enable-gtk-doc</arg>
<arg choice="plain">--disable-gtk-doc</arg>
<arg choice="plain">--enable-gtk-doc</arg>
</group>
<sbr/>
<group>
<arg>--disable-cups</arg>
<arg>--enable-cups</arg>
<arg choice="plain">--disable-cups</arg>
<arg choice="plain">--enable-cups</arg>
</group>
<sbr/>
<group>
<arg>--disable-papi</arg>
<arg>--enable-papi</arg>
<arg choice="plain">--disable-papi</arg>
<arg choice="plain">--enable-papi</arg>
</group>
<sbr/>
<group>
<arg>--enable-xinput</arg>
<arg>--disable-xinput</arg>
<arg choice="plain">--enable-xinput</arg>
<arg choice="plain">--disable-xinput</arg>
</group>
<sbr/>
<group>
<arg>--enable-packagekit</arg>
<arg>--disable-packagekit</arg>
<arg choice="plain">--enable-packagekit</arg>
<arg choice="plain">--disable-packagekit</arg>
</group>
<sbr/>
<group>
<arg>--enable-x11-backend</arg>
<arg>--disable-x11-backend</arg>
<arg>--enable-win32-backend</arg>
<arg>--disable-win32-backend</arg>
<arg>--enable-quartz-backend</arg>
<arg>--disable-quartz-backend</arg>
<arg choice="plain">--enable-x11-backend</arg>
<arg choice="plain">--disable-x11-backend</arg>
</group>
<sbr/>
<group>
<arg>--enable-introspection=[no/auto/yes]</arg>
<arg choice="plain">--enable-win32-backend</arg>
<arg choice="plain">--disable-win32-backend</arg>
</group>
<sbr/>
<group>
<arg>--enable-gtk2-dependency</arg>
<arg>--disable-gtk2-dependency</arg>
<arg choice="plain">--enable-quartz-backend</arg>
<arg choice="plain">--disable-quartz-backend</arg>
</group>
<sbr/>
<group>
<arg choice="plain">--enable-broadway-backend</arg>
<arg choice="plain">--disable-broadway-backend</arg>
</group>
<sbr/>
<group>
<arg choice="plain">--enable-wayland-backend</arg>
<arg choice="plain">--disable-wayland-backend</arg>
</group>
<sbr/>
<group>
<arg choice="plain">--enable-introspection=[no/auto/yes]</arg>
</group>
<sbr/>
<group>
<arg choice="plain">--enable-gtk2-dependency</arg>
<arg choice="plain">--disable-gtk2-dependency</arg>
</group>
</cmdsynopsis>
</para>
@@ -571,7 +587,11 @@ How to compile GTK+ itself
<systemitem>--enable-win32-backend</systemitem>,
<systemitem>--disable-win32-backend</systemitem>,
<systemitem>--enable-quartz-backend</systemitem>,
and <systemitem>--disable-quartz-backend</systemitem></title>
<systemitem>--disable-quartz-backend</systemitem>,
<systemitem>--enable-broadway-backend</systemitem>,
<systemitem>--disable-broadway-backend</systemitem>,
<systemitem>--enable-wayland-backend</systemitem>, and
<systemitem>--disable-wayland-backend</systemitem></title>
<para>
Enables specific backends for GDK. If none of these options

View File

@@ -67,7 +67,7 @@ this range will trigger compiler warnings.
Here is how you would compile hello.c if you want to allow it
to use symbols that were not deprecated in 3.2:
<programlisting>
$ cc -DGDK_VERSION_MIN_REQIRED=GDK_VERSION_3_2 `pkg-config --cflags --libs gtk+-3.0` hello.c -o hello
$ cc -DGDK_VERSION_MIN_REQUIRED=GDK_VERSION_3_2 `pkg-config --cflags --libs gtk+-3.0` hello.c -o hello
</programlisting>
</para>

View File

@@ -61,13 +61,9 @@
<xi:include href="xml/gtkstyleproperties.xml" />
<xi:include href="xml/gtkthemingengine.xml" />
<xi:include href="xml/gtkwidgetpath.xml" />
<xi:include href="xml/gtksymboliccolor.xml" />
<xi:include href="xml/gtkgradient.xml" />
<xi:include href="xml/gtkicontheme.xml" />
<xi:include href="xml/gtkiconfactory.xml" />
<xi:include href="xml/gtknumerableicon.xml" />
<xi:include href="xml/gtkrc.xml" />
<xi:include href="xml/gtkstyle.xml" />
</part>
<part id="gtkobjects">
@@ -128,8 +124,6 @@
<xi:include href="xml/gtkentrybuffer.xml" />
<xi:include href="xml/gtkentrycompletion.xml" />
<xi:include href="xml/gtkscale.xml" />
<xi:include href="xml/gtkhscale.xml" />
<xi:include href="xml/gtkvscale.xml" />
<xi:include href="xml/gtkspinbutton.xml" />
<xi:include href="xml/gtksearchentry.xml" />
<xi:include href="xml/gtkeditable.xml" />
@@ -188,7 +182,6 @@
<xi:include href="xml/gtkradiomenuitem.xml" />
<xi:include href="xml/gtkcheckmenuitem.xml" />
<xi:include href="xml/gtkseparatormenuitem.xml" />
<xi:include href="xml/gtktearoffmenuitem.xml" />
<xi:include href="xml/gtktoolshell.xml" />
<xi:include href="xml/gtktoolbar.xml" />
<xi:include href="xml/gtktoolitem.xml" />
@@ -218,9 +211,6 @@
<xi:include href="xml/gtkcolorbutton.xml" />
<xi:include href="xml/gtkcolorchooserwidget.xml" />
<xi:include href="xml/gtkcolorchooserdialog.xml" />
<xi:include href="xml/gtkcolorsel.xml" />
<xi:include href="xml/gtkcolorseldlg.xml" />
<xi:include href="xml/gtkhsv.xml" />
<xi:include href="xml/gtkfilechooser.xml" />
<xi:include href="xml/gtkfilechooserbutton.xml" />
<xi:include href="xml/gtkfilechooserdialog.xml" />
@@ -230,8 +220,7 @@
<xi:include href="xml/gtkfontbutton.xml" />
<xi:include href="xml/gtkfontchooserwidget.xml" />
<xi:include href="xml/gtkfontchooserdialog.xml" />
<xi:include href="xml/gtkfontsel.xml" />
<xi:include href="xml/gtkfontseldlg.xml" />
<xi:include href="xml/gtkplacessidebar.xml" />
</chapter>
<chapter id="LayoutContainers">
@@ -240,20 +229,14 @@
<xi:include href="xml/gtkalignment.xml" />
<xi:include href="xml/gtkaspectframe.xml" />
<xi:include href="xml/gtkbox.xml" />
<xi:include href="xml/gtkhbox.xml" />
<xi:include href="xml/gtkvbox.xml" />
<xi:include href="xml/gtkbbox.xml" />
<xi:include href="xml/gtkhbbox.xml" />
<xi:include href="xml/gtkvbbox.xml" />
<xi:include href="xml/gtkfixed.xml" />
<xi:include href="xml/gtkpaned.xml" />
<xi:include href="xml/gtkhpaned.xml" />
<xi:include href="xml/gtkvpaned.xml" />
<xi:include href="xml/gtklayout.xml" />
<xi:include href="xml/gtknotebook.xml" />
<xi:include href="xml/gtktable.xml" />
<xi:include href="xml/gtkexpander.xml" />
<xi:include href="xml/gtkoverlay.xml" />
<xi:include href="xml/gtkheaderbar.xml" />
<xi:include href="xml/gtkorientable.xml" />
</chapter>
@@ -261,15 +244,11 @@
<title>Ornaments</title>
<xi:include href="xml/gtkframe.xml" />
<xi:include href="xml/gtkseparator.xml" />
<xi:include href="xml/gtkhseparator.xml" />
<xi:include href="xml/gtkvseparator.xml" />
</chapter>
<chapter id="ScrollingWidgets">
<title>Scrolling</title>
<xi:include href="xml/gtkscrollbar.xml" />
<xi:include href="xml/gtkhscrollbar.xml" />
<xi:include href="xml/gtkvscrollbar.xml" />
<xi:include href="xml/gtkscrolledwindow.xml" />
<xi:include href="xml/gtkscrollable.xml" />
</chapter>
@@ -350,6 +329,34 @@
<xi:include href="xml/gtkapplicationwindow.xml" />
<xi:include href="xml/gtkactionable.xml" />
</chapter>
<chapter id="DeprecatedObjects">
<title>Deprecated</title>
<xi:include href="xml/gtksymboliccolor.xml" />
<xi:include href="xml/gtkgradient.xml" />
<xi:include href="xml/gtkrc.xml" />
<xi:include href="xml/gtkstyle.xml" />
<xi:include href="xml/gtkhscale.xml" />
<xi:include href="xml/gtkvscale.xml" />
<xi:include href="xml/gtktearoffmenuitem.xml" />
<xi:include href="xml/gtkcolorsel.xml" />
<xi:include href="xml/gtkcolorseldlg.xml" />
<xi:include href="xml/gtkhsv.xml" />
<xi:include href="xml/gtkfontsel.xml" />
<xi:include href="xml/gtkfontseldlg.xml" />
<xi:include href="xml/gtkhbox.xml" />
<xi:include href="xml/gtkvbox.xml" />
<xi:include href="xml/gtkhbbox.xml" />
<xi:include href="xml/gtkvbbox.xml" />
<xi:include href="xml/gtkhpaned.xml" />
<xi:include href="xml/gtkvpaned.xml" />
<xi:include href="xml/gtktable.xml" />
<xi:include href="xml/gtkhseparator.xml" />
<xi:include href="xml/gtkvseparator.xml" />
<xi:include href="xml/gtkhscrollbar.xml" />
<xi:include href="xml/gtkvscrollbar.xml" />
</chapter>
</part>
<part id="migrating">
@@ -378,6 +385,7 @@
<xi:include href="gtk-query-immodules-3.0.xml" />
<xi:include href="gtk-update-icon-cache.xml" />
<xi:include href="gtk-launch.xml" />
<xi:include href="broadwayd.xml" />
</part>
<xi:include href="glossary.xml" />
@@ -406,6 +414,14 @@
<title>Index of new symbols in 3.6</title>
<xi:include href="xml/api-index-3.6.xml"><xi:fallback /></xi:include>
</index>
<index id="api-index-3-8" role="3.8">
<title>Index of new symbols in 3.8</title>
<xi:include href="xml/api-index-3.8.xml"><xi:fallback /></xi:include>
</index>
<index id="api-index-3-10" role="3.10">
<title>Index of new symbols in 3.10</title>
<xi:include href="xml/api-index-3.10.xml"><xi:fallback /></xi:include>
</index>
<xi:include href="xml/annotation-glossary.xml"><xi:fallback /></xi:include>

View File

@@ -536,8 +536,12 @@ gtk_builder_add_objects_from_string
gtk_builder_add_objects_from_resource
gtk_builder_get_object
gtk_builder_get_objects
gtk_builder_expose_object
gtk_builder_connect_signals
gtk_builder_connect_signals_full
gtk_builder_add_callback_symbol
gtk_builder_add_callback_symbols
gtk_builder_lookup_callback_symbol
gtk_builder_set_translation_domain
gtk_builder_get_translation_domain
gtk_builder_get_type_from_name
@@ -1755,6 +1759,8 @@ gtk_icon_view_set_margin
gtk_icon_view_get_margin
gtk_icon_view_set_item_padding
gtk_icon_view_get_item_padding
gtk_icon_view_set_activate_on_single_click
gtk_icon_view_get_activate_on_single_click
gtk_icon_view_get_cell_rect
gtk_icon_view_select_path
gtk_icon_view_unselect_path
@@ -2477,6 +2483,32 @@ GTK_PANED_GET_CLASS
gtk_paned_get_type
</SECTION>
<SECTION>
<FILE>gtkplacessidebar</FILE>
<TITLE>GtkPlacesSidebar</FILE>
GtkPlacesSidebar
GtkPlacesOpenFlags
gtk_places_sidebar_new
gtk_places_sidebar_set_open_flags
gtk_places_sidebar_set_location
gtk_places_sidebar_get_location
gtk_places_sidebar_set_show_desktop
gtk_places_sidebar_set_accept_uri_drops
gtk_places_sidebar_add_shortcut
gtk_places_sidebar_remove_shortcut
gtk_places_sidebar_list_shortcuts
gtk_places_sidebar_get_nth_bookmark
<SUBSECTION Standard>
GTK_PLACES_SIDEBAR
GTK_IS_PLACES_SIDEBAR
GTK_TYPE_PLACES_SIDEBAR
GTK_PLACES_SIDEBAR_CLASS
GTK_IS_PLACES_SIDEBAR_CLASS
GTK_PLACES_SIDEBAR_GET_CLASS
<SUBSECTION Private>
gtk_places_sidebar_get_type
</SECTION>
<SECTION>
<FILE>gtkplug</FILE>
<TITLE>GtkPlug</TITLE>
@@ -3573,11 +3605,11 @@ gtk_text_mark_get_type
<TITLE>GtkTextTag</TITLE>
GtkTextTag
GtkWrapMode
GtkTextAttributes
gtk_text_tag_new
gtk_text_tag_get_priority
gtk_text_tag_set_priority
gtk_text_tag_event
GtkTextAttributes
GtkTextAppearance
gtk_text_attributes_new
gtk_text_attributes_copy
@@ -4455,6 +4487,8 @@ gtk_tree_view_get_headers_clickable
gtk_tree_view_set_headers_clickable
gtk_tree_view_set_rules_hint
gtk_tree_view_get_rules_hint
gtk_tree_view_set_activate_on_single_click
gtk_tree_view_get_activate_on_single_click
gtk_tree_view_append_column
gtk_tree_view_remove_column
gtk_tree_view_insert_column
@@ -4737,6 +4771,7 @@ GtkCellRendererState
GtkCellRendererMode
GtkCellRenderer
GtkCellRendererClass
gtk_cell_renderer_class_set_accessible_type
gtk_cell_renderer_get_aligned_area
gtk_cell_renderer_get_size
gtk_cell_renderer_render
@@ -5146,6 +5181,10 @@ gtk_widget_draw
gtk_widget_queue_draw
gtk_widget_queue_resize
gtk_widget_queue_resize_no_redraw
gtk_widget_get_frame_clock
GtkTickCallback
gtk_widget_add_tick_callback
gtk_widget_remove_tick_callback
gtk_widget_size_request
gtk_widget_get_child_requisition
gtk_widget_size_allocate
@@ -5273,6 +5312,8 @@ gtk_widget_get_has_tooltip
gtk_widget_set_has_tooltip
gtk_widget_trigger_tooltip_query
gtk_widget_get_window
gtk_widget_register_window
gtk_widget_unregister_window
gtk_cairo_should_draw_window
gtk_cairo_transform_to_window
gtk_widget_get_allocated_width
@@ -5316,6 +5357,11 @@ gtk_widget_get_requisition
gtk_widget_device_is_shadowed
gtk_widget_get_modifier_mask
gtk_widget_insert_action_group
gtk_widget_add_tick_callback
gtk_widget_remove_tick_callback
gtk_widget_get_frame_clock
gtk_widget_get_opacity
gtk_widget_set_opacity
<SUBSECTION>
gtk_widget_get_path
@@ -5365,6 +5411,18 @@ gtk_widget_set_vexpand_set
gtk_widget_queue_compute_expand
gtk_widget_compute_expand
<SUBSECTION Templates>
gtk_widget_init_template
gtk_widget_class_set_template
gtk_widget_class_set_template_from_resource
gtk_widget_get_automated_child
gtk_widget_class_bind_child
gtk_widget_class_bind_child_internal
gtk_widget_class_automate_child
gtk_widget_class_bind_callback
gtk_widget_class_declare_callback
gtk_widget_class_set_connect_func
<SUBSECTION Standard>
GTK_WIDGET
GTK_IS_WIDGET
@@ -5496,6 +5554,7 @@ gtk_window_get_resize_grip_area
gtk_window_get_application
gtk_window_set_application
gtk_window_set_has_user_ref_count
gtk_window_set_titlebar
<SUBSECTION Standard>
GTK_WINDOW
@@ -5797,6 +5856,7 @@ gtk_style_context_get_parent
gtk_style_context_get_path
gtk_style_context_get_property
gtk_style_context_get_screen
gtk_style_context_get_frame_clock
gtk_style_context_get_state
gtk_style_context_get_style
gtk_style_context_get_style_property
@@ -5838,6 +5898,7 @@ gtk_style_context_remove_region
gtk_style_context_has_region
gtk_style_context_list_regions
gtk_style_context_set_screen
gtk_style_context_set_frame_clock
gtk_style_context_set_state
<SUBSECTION>
@@ -6475,9 +6536,15 @@ gtk_icon_info_get_base_size
gtk_icon_info_get_filename
gtk_icon_info_get_builtin_pixbuf
gtk_icon_info_load_icon
gtk_icon_info_load_icon_async
gtk_icon_info_load_icon_finish
gtk_icon_info_load_symbolic
gtk_icon_info_load_symbolic_async
gtk_icon_info_load_symbolic_finish
gtk_icon_info_load_symbolic_for_style
gtk_icon_info_load_symbolic_for_context
gtk_icon_info_load_symbolic_for_context_async
gtk_icon_info_load_symbolic_for_context_finish
gtk_icon_info_set_raw_coordinates
gtk_icon_info_get_embedded_rect
gtk_icon_info_get_attach_points
@@ -7212,6 +7279,8 @@ gtk_grid_attach_next_to
gtk_grid_get_child_at
gtk_grid_insert_row
gtk_grid_insert_column
gtk_grid_remove_row
gtk_grid_remove_column
gtk_grid_insert_next_to
gtk_grid_set_row_homogeneous
gtk_grid_get_row_homogeneous
@@ -7469,3 +7538,29 @@ GTK_COLOR_CHOOSER_DIALOG_GET_CLASS
GtkColorChooserDialogPrivate
gtk_color_chooser_dialog_get_type
</SECTION>
<SECTION>
<FILE>gtkheaderbar</FILE>
<TITLE>GtkHeaderBar</TITLE>
GtkHeaderBar
gtk_header_bar_new
gtk_header_bar_set_title
gtk_header_bar_get_title
gtk_header_bar_set_subtitle
gtk_header_bar_get_subtitle
gtk_header_bar_set_custom_title
gtk_header_bar_get_custom_title
gtk_header_bar_pack_start
gtk_header_bar_pack_end
<SUBSECTION Standard>
GTK_TYPE_HEADER_BAR
GTK_HEADER_BAR
GTK_HEADER_BAR_CLASS
GTK_IS_HEADER_BAR
GTK_IS_HEADER_BAR_CLASS
GTK_HEADER_BAR_GET_CLASS
<SUBSECTION Private>
gtk_header_bar_get_type
</SECTION>

View File

@@ -119,7 +119,7 @@ gtk_page_setup_get_type
@DISABLE_ON_W32@gtk_page_setup_unix_dialog_get_type
gtk_paned_get_type
gtk_paper_size_get_type
@DISABLE_ON_W32@@DISABLE_ON_QUARTZ@gtk_plug_get_type
@DISABLE_ON_W32@@DISABLE_ON_QUARTZ@@DISABLE_ON_WAYLAND@gtk_plug_get_type
@DISABLE_ON_W32@gtk_printer_get_type
gtk_print_context_get_type
@DISABLE_ON_W32@gtk_print_job_get_type
@@ -151,7 +151,7 @@ gtk_separator_menu_item_get_type
gtk_separator_tool_item_get_type
gtk_settings_get_type
gtk_size_group_get_type
@DISABLE_ON_W32@@DISABLE_ON_QUARTZ@gtk_socket_get_type
@DISABLE_ON_W32@@DISABLE_ON_QUARTZ@@DISABLE_ON_WAYLAND@gtk_socket_get_type
gtk_spin_button_get_type
gtk_spinner_get_type
gtk_statusbar_get_type

View File

@@ -119,6 +119,46 @@
make CFLAGS+="-DGSEAL_ENABLE"
</programlisting>
</para>
<para>
While it may be painful to convert, this helps us keep API and ABI
compatibility when we change internal interfaces. As a quick example,
when adding GSEAL_ENABLE, if you see an error like:
<programlisting>
error: 'GtkToggleButton' has no member named 'active'
</programlisting>
this means that you are accessing the public structure of
GtkToggleButton directly, perhaps with some code like:
<informalexample><programlisting>
static void
on_toggled (GtkToggleButton *button)
{
if (button->active)
frob_active ();
else
frob_inactive ();
}
</programlisting></informalexample>
</para>
<para>
In most cases, this can easily be replaced with the correct accessor
method. The main rule is that if you have code like the above which
accesses the "active" field of a "GtkToggleButton", then the accessor
method becomes "gtk_toggle_button_get_active":
<informalexample><programlisting>
static void
on_toggled (GtkToggleButton *button)
{
if (gtk_toggle_button_get_active (button))
frob_active ();
else
frob_inactive ();
}
</programlisting></informalexample>
</para>
<para>
In the case of setting field members directly, there's usually
a corresponding setter method.
</para>
</section>
<section>
@@ -1131,6 +1171,15 @@ gtk_arrow_draw (GtkWidget *widget,
from GtkObject and makes use of the destroy functionality, you have
to implement ::destroy yourself.
</para>
<para>
If your program used functions like gtk_object_get or gtk_object_set,
these can be replaced directly with g_object_get or g_object_set. In
fact, most every gtk_object_* function can be replaced with the
corresponding g_object_ function, even in GTK+ 2 code. The one exception
to this rule is gtk_object_destroy, which can be replaced with
gtk_widget_destroy, again in both GTK+ 2 and GTK+ 3.
</para>
</section>
<section>

View File

@@ -126,7 +126,7 @@ variables like <envar>LANG</envar>, <envar>PATH</envar>, <envar>HOME</envar>
or <envar>DISPLAY</envar>; mostly to determine paths to look for certain
files. The <link linkend="x11-envar">X11</link>,
<link linkend="win32-envar">Windows</link> and
<link linkend="fb-envar">Framebuffer</link> GDK backends use some
<link linkend="broadway-envar">Broadway</link> GDK backends use some
additional environment variables.
</para>
@@ -452,28 +452,22 @@ nevertheless.
<varlistentry>
<term>broadway</term>
<listitem><para>Selects the HTML5 backend.</para></listitem>
<listitem><para>Selects the Broadway backend for display in web browsers</para></listitem>
</varlistentry>
<varlistentry>
<term>wayland</term>
<listitem><para>Selects the Wayland backend for connecting to Wayland display servers.</para></listitem>
<listitem><para>Selects the Wayland backend for connecting to Wayland display servers</para></listitem>
</varlistentry>
</variablelist>
Since 3.10, this environment variable can contain a comma-separated list
of backend names, which are tried in order. The list may also contain
a *, which means: try all remaining backends.
For more information about selecting backends, see the gdk_display_manager_get() function.
</para>
</formalpara>
<formalpara>
<title><envar>GDK_SYNCHRONIZE</envar></title>
<para>
If set, GDK makes all X requests synchronously. This is a useful
option for debugging, but it will slow down the performance considerably.
</para>
</formalpara>
<formalpara>
<title><envar>XDG_DATA_HOME</envar>, <envar>XDG_DATA_DIRS</envar></title>

View File

@@ -153,7 +153,7 @@ You can change the default attributes for a given #GtkTextView, and you can
apply tags that change the attributes for a region of text. For text features
that come from the theme &mdash; such as font and foreground color &mdash; use
standard #GtkWidget functions such as gtk_widget_modify_font() or
gtk_widget_override_text(). For other attributes there are dedicated methods on
gtk_widget_override_color(). For other attributes there are dedicated methods on
#GtkTextView such as gtk_text_view_set_tabs().
<informalexample><programlisting>

View File

@@ -2,7 +2,7 @@
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN"
"http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd" [
]>
<refentry id="gtk-osx">
<refentry id="gtk-wayland">
<refmeta>
<refentrytitle>Using GTK+ with Wayland</refentrytitle>
<manvolnum>3</manvolnum>

View File

@@ -56,6 +56,33 @@ in the <envar>DISPLAY</envar> environment variable.
</refsect2>
<refsect2 id="x11-envar">
<title>X11-specific environment variables</title>
<para>
The X11 GDK backend can be influenced with some additional environment variables.
</para>
<formalpara>
<title><envar>GDK_SYNCHRONIZE</envar></title>
<para>
If set, GDK makes all X requests synchronously. This is a useful
option for debugging, but it will slow down the performance considerably.
</para>
</formalpara>
<formalpara>
<title><envar>GDK_CORE_DEVICE_EVENTS</envar></title>
<para>
If set, GDK makes does not use the XInput extension, and only reacts
to core X input events.
</para>
</formalpara>
</refsect2>
</refsect1>
<refsect1 id="gtk-X11-arch">

View File

@@ -1024,8 +1024,7 @@ create_scrolledwindow (void)
scrolledwin = gtk_scrolled_window_new (NULL, NULL);
label = gtk_label_new ("Scrolled Window");
gtk_scrolled_window_add_with_viewport (GTK_SCROLLED_WINDOW (scrolledwin),
label);
gtk_container_add (GTK_CONTAINER (scrolledwin), label);
return new_widget_info ("scrolledwindow", scrolledwin, MEDIUM);
}

View File

@@ -61,3 +61,5 @@ noinst_PROGRAMS = \
builder
EXTRA_DIST = builder.ui
-include $(top_srcdir)/git.mk

View File

@@ -34,6 +34,29 @@ change_fullscreen_state (GSimpleAction *action,
g_simple_action_set_state (action, state);
}
static void
change_busy_state (GSimpleAction *action,
GVariant *state,
gpointer user_data)
{
GtkWindow *window = user_data;
GApplication *application = G_APPLICATION (gtk_window_get_application (window));
/* do this twice to test multiple busy counter increases */
if (g_variant_get_boolean (state))
{
g_application_mark_busy (application);
g_application_mark_busy (application);
}
else
{
g_application_unmark_busy (application);
g_application_unmark_busy (application);
}
g_simple_action_set_state (action, state);
}
static void
change_justify_state (GSimpleAction *action,
GVariant *state,
@@ -94,6 +117,7 @@ static GActionEntry win_entries[] = {
{ "copy", window_copy, NULL, NULL, NULL },
{ "paste", window_paste, NULL, NULL, NULL },
{ "fullscreen", activate_toggle, NULL, "false", change_fullscreen_state },
{ "busy", activate_toggle, NULL, "false", change_busy_state },
{ "justify", activate_radio, "s", "'left'", change_justify_state }
};
@@ -356,6 +380,10 @@ bloat_pad_startup (GApplication *application)
" <attribute name='action'>win.fullscreen</attribute>"
" <attribute name='accel'>F11</attribute>"
" </item>"
" <item>"
" <attribute name='label' translatable='yes'>_Look Busy</attribute>"
" <attribute name='action'>win.busy</attribute>"
" </item>"
" </section>"
" </submenu>"
" <submenu id='time-menu'>"

View File

@@ -75,11 +75,13 @@ gdk_public_h_sources = \
gdkdisplaymanager.h \
gdkdnd.h \
gdkevents.h \
gdkframetimings.h \
gdkkeys.h \
gdkkeysyms.h \
gdkkeysyms-compat.h \
gdkmain.h \
gdkpango.h \
gdkframeclock.h \
gdkpixbuf.h \
gdkprivate.h \
gdkproperty.h \
@@ -101,6 +103,8 @@ gdk_private_headers = \
gdkdisplaymanagerprivate.h \
gdkdisplayprivate.h \
gdkdndprivate.h \
gdkframeclockidle.h \
gdkframeclockprivate.h \
gdkscreenprivate.h \
gdkinternals.h \
gdkintl.h \
@@ -121,10 +125,13 @@ gdk_c_sources = \
gdkdisplaymanager.c \
gdkdnd.c \
gdkevents.c \
gdkframetimings.c \
gdkglobals.c \
gdkkeys.c \
gdkkeyuni.c \
gdkoffscreenwindow.c \
gdkframeclock.c \
gdkframeclockidle.c \
gdkpango.c \
gdkpixbuf-drawable.c \
gdkrectangle.c \
@@ -204,7 +211,6 @@ INTROSPECTION_GIRS += Gdk-3.0.gir
if USE_X11
x11_introspection_files = \
x11/checksettings.c \
x11/gdkapplaunchcontext-x11.c \
x11/gdkasync.c \
x11/gdkcursor-x11.c \
@@ -230,7 +236,6 @@ x11_introspection_files = \
x11/gdkxftdefaults.c \
x11/gdkxid.c \
x11/xsettings-client.c \
x11/xsettings-common.c \
x11/gdkx.h \
x11/gdkx11cursor.h \
x11/gdkx11display.h \

View File

@@ -15,7 +15,9 @@ AM_CPPFLAGS = \
LDADDS = $(GDK_DEP_LIBS)
noinst_LTLIBRARIES = libbroadway.la libgdk-broadway.la
noinst_LTLIBRARIES = libgdk-broadway.la
bin_PROGRAMS = broadwayd
libgdkinclude_HEADERS = \
gdkbroadway.h
@@ -26,10 +28,6 @@ libgdkbroadwayinclude_HEADERS = \
gdkbroadwaycursor.h \
gdkbroadwayvisual.h
libbroadway_la_SOURCES = \
broadway.h \
broadway.c
clienthtml.h: client.html
$(PERL) $(srcdir)/toarray.pl $(srcdir)/client.html client_html > $@
@@ -73,9 +71,19 @@ libgdk_broadway_la_SOURCES = \
gdkvisual-broadway.c \
gdkwindow-broadway.c \
gdkwindow-broadway.h \
gdkprivate-broadway.h
gdkprivate-broadway.h \
gdkbroadway-server.h \
gdkbroadway-server.c
libgdk_broadway_la_LIBADD = libbroadway.la
broadwayd_SOURCES = \
broadway-protocol.h \
broadwayd.c \
broadway-server.h \
broadway-server.c \
broadway-output.h \
broadway-output.c
broadwayd_LDADD = $(GDK_DEP_LIBS) -lrt -lcrypt
MAINTAINERCLEANFILES = $(broadway_built_sources)
EXTRA_DIST += $(broadway_built_sources)

View File

@@ -0,0 +1,11 @@
Cache surfaces that are opened via shm_open inbetween updates.
Handle implicit grabs when in broadway-server.c
keyboard focus handling
Add resize handling to js WM
Support window titles
_gdk_broadway_server_has_client is always FALSE, so resize don't work
Send reset events on client disconnect (button up, normal state. Maybe grab state reset?)
rgba suport
shift-select in gedit doesn't work
backdrop mode
clean up /dev/shm on abrupt client exit

View File

@@ -5,7 +5,7 @@
#include <errno.h>
#include <cairo.h>
#include "broadway.h"
#include "broadway-output.h"
/************************************************************************
* Base64 functions *
@@ -317,6 +317,13 @@ broadway_output_get_next_serial (BroadwayOutput *output)
return output->serial;
}
void
broadway_output_set_next_serial (BroadwayOutput *output,
guint32 serial)
{
output->serial = serial;
}
/************************************************************************
* Core rendering operations *
@@ -351,12 +358,12 @@ static void
append_uint16 (BroadwayOutput *output, guint32 v)
{
gsize old_len = output->buf->len;
guint8 *buf;
if (output->binary)
{
guint8 *buf = (guint8 *)output->buf->str + old_len;
g_string_set_size (output->buf, old_len + 2);
buf = (guint8 *)output->buf->str + old_len;
buf[0] = (v >> 0) & 0xff;
buf[1] = (v >> 8) & 0xff;
}
@@ -371,12 +378,12 @@ static void
append_uint32 (BroadwayOutput *output, guint32 v)
{
gsize old_len = output->buf->len;
guint8 *buf;
if (output->binary)
{
guint8 *buf = (guint8 *)output->buf->str + old_len;
g_string_set_size (output->buf, old_len + 4);
buf = (guint8 *)output->buf->str + old_len;
buf[0] = (v >> 0) & 0xff;
buf[1] = (v >> 8) & 0xff;
buf[2] = (v >> 16) & 0xff;
@@ -422,7 +429,7 @@ broadway_output_copy_rectangles (BroadwayOutput *output, int id,
{
int i;
write_header (output, 'b');
write_header (output, BROADWAY_OP_COPY_RECTANGLES);
append_uint16 (output, id);
append_uint16 (output, n_rects);
for (i = 0; i < n_rects; i++)
@@ -441,7 +448,7 @@ broadway_output_grab_pointer (BroadwayOutput *output,
int id,
gboolean owner_event)
{
write_header (output, 'g');
write_header (output, BROADWAY_OP_GRAB_POINTER);
append_uint16 (output, id);
append_bool (output, owner_event);
}
@@ -452,7 +459,7 @@ broadway_output_ungrab_pointer (BroadwayOutput *output)
guint32 serial;
serial = output->serial;
write_header (output, 'u');
write_header (output, BROADWAY_OP_UNGRAB_POINTER);
return serial;
}
@@ -462,7 +469,7 @@ broadway_output_new_surface(BroadwayOutput *output,
int id, int x, int y, int w, int h,
gboolean is_temp)
{
write_header (output, 's');
write_header (output, BROADWAY_OP_NEW_SURFACE);
append_uint16 (output, id);
append_uint16 (output, x);
append_uint16 (output, y);
@@ -471,24 +478,42 @@ broadway_output_new_surface(BroadwayOutput *output,
append_bool (output, is_temp);
}
void
broadway_output_request_auth (BroadwayOutput *output)
{
write_header (output, BROADWAY_OP_REQUEST_AUTH);
}
void
broadway_output_auth_ok (BroadwayOutput *output)
{
write_header (output, BROADWAY_OP_AUTH_OK);
}
void
broadway_output_disconnected (BroadwayOutput *output)
{
write_header (output, BROADWAY_OP_DISCONNECTED);
}
void
broadway_output_show_surface(BroadwayOutput *output, int id)
{
write_header (output, 'S');
write_header (output, BROADWAY_OP_SHOW_SURFACE);
append_uint16 (output, id);
}
void
broadway_output_hide_surface(BroadwayOutput *output, int id)
{
write_header (output, 'H');
write_header (output, BROADWAY_OP_HIDE_SURFACE);
append_uint16 (output, id);
}
void
broadway_output_destroy_surface(BroadwayOutput *output, int id)
{
write_header (output, 'd');
write_header (output, BROADWAY_OP_DESTROY_SURFACE);
append_uint16 (output, id);
}
@@ -508,7 +533,7 @@ broadway_output_move_resize_surface (BroadwayOutput *output,
if (!has_pos && !has_size)
return;
write_header (output, 'm');
write_header (output, BROADWAY_OP_MOVE_RESIZE);
val = (!!has_pos) | ((!!has_size) << 1);
append_uint16 (output, id);
append_flags (output, val);
@@ -529,7 +554,7 @@ broadway_output_set_transient_for (BroadwayOutput *output,
int id,
int parent_id)
{
write_header (output, 'p');
write_header (output, BROADWAY_OP_SET_TRANSIENT_FOR);
append_uint16 (output, id);
append_uint16 (output, parent_id);
}
@@ -541,7 +566,7 @@ broadway_output_put_rgb (BroadwayOutput *output, int id, int x, int y,
{
gsize size_start, image_start, len;
write_header (output, 'i');
write_header (output, BROADWAY_OP_PUT_RGB);
append_uint16 (output, id);
append_uint16 (output, x);
@@ -798,7 +823,7 @@ broadway_output_put_rgba (BroadwayOutput *output, int id, int x, int y,
{
guint8 *subdata;
write_header (output, 'i');
write_header (output, BROADWAY_OP_PUT_RGB);
append_uint16 (output, id);
append_uint16 (output, x + rects[i].x1);
append_uint16 (output, y + rects[i].y1);
@@ -830,6 +855,6 @@ void
broadway_output_surface_flush (BroadwayOutput *output,
int id)
{
write_header (output, 'f');
write_header (output, BROADWAY_OP_FLUSH);
append_uint16 (output, id);
}

View File

@@ -1,13 +1,12 @@
#ifndef __BROADWAY_H__
#define __BROADWAY_H__
#include <glib.h>
#include <gio/gio.h>
#include "broadway-protocol.h"
typedef struct BroadwayOutput BroadwayOutput;
typedef struct {
int x, y;
int width, height;
} BroadwayRect;
typedef enum {
BROADWAY_WS_CONTINUATION = 0,
BROADWAY_WS_TEXT = 1,
@@ -24,6 +23,8 @@ BroadwayOutput *broadway_output_new (GOutputStream *out,
void broadway_output_free (BroadwayOutput *output);
int broadway_output_flush (BroadwayOutput *output);
int broadway_output_has_error (BroadwayOutput *output);
void broadway_output_set_next_serial (BroadwayOutput *output,
guint32 serial);
guint32 broadway_output_get_next_serial (BroadwayOutput *output);
void broadway_output_new_surface (BroadwayOutput *output,
int id,
@@ -32,6 +33,9 @@ void broadway_output_new_surface (BroadwayOutput *output,
int w,
int h,
gboolean is_temp);
void broadway_output_request_auth (BroadwayOutput *output);
void broadway_output_auth_ok (BroadwayOutput *output);
void broadway_output_disconnected (BroadwayOutput *output);
void broadway_output_show_surface (BroadwayOutput *output,
int id);
void broadway_output_hide_surface (BroadwayOutput *output,
@@ -78,3 +82,5 @@ void broadway_output_grab_pointer (BroadwayOutput *output,
gboolean owner_event);
guint32 broadway_output_ungrab_pointer (BroadwayOutput *output);
void broadway_output_pong (BroadwayOutput *output);
#endif /* __BROADWAY_H__ */

View File

@@ -0,0 +1,267 @@
#ifndef __BROADWAY_PROTOCOL_H__
#define __BROADWAY_PROTOCOL_H__
#include <glib.h>
typedef struct {
gint32 x, y;
gint32 width, height;
} BroadwayRect;
typedef enum {
BROADWAY_EVENT_ENTER = 'e',
BROADWAY_EVENT_LEAVE = 'l',
BROADWAY_EVENT_POINTER_MOVE = 'm',
BROADWAY_EVENT_BUTTON_PRESS = 'b',
BROADWAY_EVENT_BUTTON_RELEASE = 'B',
BROADWAY_EVENT_SCROLL = 's',
BROADWAY_EVENT_KEY_PRESS = 'k',
BROADWAY_EVENT_KEY_RELEASE = 'K',
BROADWAY_EVENT_GRAB_NOTIFY = 'g',
BROADWAY_EVENT_UNGRAB_NOTIFY = 'u',
BROADWAY_EVENT_CONFIGURE_NOTIFY = 'w',
BROADWAY_EVENT_DELETE_NOTIFY = 'W',
BROADWAY_EVENT_SCREEN_SIZE_CHANGED = 'd'
} BroadwayEventType;
typedef enum {
BROADWAY_OP_COPY_RECTANGLES = 'b',
BROADWAY_OP_GRAB_POINTER = 'g',
BROADWAY_OP_UNGRAB_POINTER = 'u',
BROADWAY_OP_NEW_SURFACE = 's',
BROADWAY_OP_SHOW_SURFACE = 'S',
BROADWAY_OP_HIDE_SURFACE = 'H',
BROADWAY_OP_DESTROY_SURFACE = 'd',
BROADWAY_OP_MOVE_RESIZE = 'm',
BROADWAY_OP_SET_TRANSIENT_FOR = 'p',
BROADWAY_OP_PUT_RGB = 'i',
BROADWAY_OP_FLUSH = 'f',
BROADWAY_OP_REQUEST_AUTH = 'l',
BROADWAY_OP_AUTH_OK = 'L',
BROADWAY_OP_DISCONNECTED = 'D',
} BroadwayOpType;
typedef struct {
guint32 type;
guint32 serial;
guint64 time;
} BroadwayInputBaseMsg;
typedef struct {
BroadwayInputBaseMsg base;
guint32 mouse_window_id; /* The real window, not taking grabs into account */
guint32 event_window_id;
gint32 root_x;
gint32 root_y;
gint32 win_x;
gint32 win_y;
guint32 state;
} BroadwayInputPointerMsg;
typedef struct {
BroadwayInputPointerMsg pointer;
guint32 mode;
} BroadwayInputCrossingMsg;
typedef struct {
BroadwayInputPointerMsg pointer;
guint32 button;
} BroadwayInputButtonMsg;
typedef struct {
BroadwayInputPointerMsg pointer;
gint32 dir;
} BroadwayInputScrollMsg;
typedef struct {
BroadwayInputBaseMsg base;
guint32 mouse_window_id; /* The real window, not taking grabs into account */
guint32 state;
gint32 key;
} BroadwayInputKeyMsg;
typedef struct {
BroadwayInputBaseMsg base;
gint32 res;
} BroadwayInputGrabReply;
typedef struct {
BroadwayInputBaseMsg base;
gint32 id;
gint32 x;
gint32 y;
gint32 width;
gint32 height;
} BroadwayInputConfigureNotify;
typedef struct {
BroadwayInputBaseMsg base;
guint32 width;
guint32 height;
} BroadwayInputScreenResizeNotify;
typedef struct {
BroadwayInputBaseMsg base;
gint32 id;
} BroadwayInputDeleteNotify;
typedef union {
BroadwayInputBaseMsg base;
BroadwayInputPointerMsg pointer;
BroadwayInputCrossingMsg crossing;
BroadwayInputButtonMsg button;
BroadwayInputScrollMsg scroll;
BroadwayInputKeyMsg key;
BroadwayInputGrabReply grab_reply;
BroadwayInputConfigureNotify configure_notify;
BroadwayInputDeleteNotify delete_notify;
BroadwayInputScreenResizeNotify screen_resize_notify;
} BroadwayInputMsg;
typedef enum {
BROADWAY_REQUEST_NEW_WINDOW,
BROADWAY_REQUEST_FLUSH,
BROADWAY_REQUEST_SYNC,
BROADWAY_REQUEST_QUERY_MOUSE,
BROADWAY_REQUEST_DESTROY_WINDOW,
BROADWAY_REQUEST_SHOW_WINDOW,
BROADWAY_REQUEST_HIDE_WINDOW,
BROADWAY_REQUEST_SET_TRANSIENT_FOR,
BROADWAY_REQUEST_TRANSLATE,
BROADWAY_REQUEST_UPDATE,
BROADWAY_REQUEST_MOVE_RESIZE,
BROADWAY_REQUEST_GRAB_POINTER,
BROADWAY_REQUEST_UNGRAB_POINTER
} BroadwayRequestType;
typedef struct {
guint32 size;
guint32 serial;
guint32 type;
} BroadwayRequestBase, BroadwayRequestFlush, BroadwayRequestSync, BroadwayRequestQueryMouse;
typedef struct {
BroadwayRequestBase base;
guint32 id;
} BroadwayRequestDestroyWindow, BroadwayRequestShowWindow, BroadwayRequestHideWindow;
typedef struct {
BroadwayRequestBase base;
guint32 id;
guint32 parent;
} BroadwayRequestSetTransientFor;
typedef struct {
BroadwayRequestBase base;
guint32 id;
gint32 dx;
gint32 dy;
guint32 n_rects;
BroadwayRect rects[1];
} BroadwayRequestTranslate;
typedef struct {
BroadwayRequestBase base;
guint32 id;
char name[36];
guint32 width;
guint32 height;
} BroadwayRequestUpdate;
typedef struct {
BroadwayRequestBase base;
guint32 id;
guint32 owner_events;
guint32 event_mask;
guint32 time_;
} BroadwayRequestGrabPointer;
typedef struct {
BroadwayRequestBase base;
guint32 time_;
} BroadwayRequestUngrabPointer;
typedef struct {
BroadwayRequestBase base;
gint32 x;
gint32 y;
guint32 width;
guint32 height;
guint32 is_temp;
} BroadwayRequestNewWindow;
typedef struct {
BroadwayRequestBase base;
guint32 id;
guint32 with_move;
gint32 x;
gint32 y;
guint32 width;
guint32 height;
} BroadwayRequestMoveResize;
typedef union {
BroadwayRequestBase base;
BroadwayRequestNewWindow new_window;
BroadwayRequestFlush flush;
BroadwayRequestSync sync;
BroadwayRequestQueryMouse query_mouse;
BroadwayRequestDestroyWindow destroy_window;
BroadwayRequestShowWindow show_window;
BroadwayRequestHideWindow hide_window;
BroadwayRequestSetTransientFor set_transient_for;
BroadwayRequestUpdate update;
BroadwayRequestMoveResize move_resize;
BroadwayRequestGrabPointer grab_pointer;
BroadwayRequestUngrabPointer ungrab_pointer;
BroadwayRequestTranslate translate;
} BroadwayRequest;
typedef enum {
BROADWAY_REPLY_EVENT,
BROADWAY_REPLY_SYNC,
BROADWAY_REPLY_QUERY_MOUSE,
BROADWAY_REPLY_NEW_WINDOW,
BROADWAY_REPLY_GRAB_POINTER,
BROADWAY_REPLY_UNGRAB_POINTER
} BroadwayReplyType;
typedef struct {
guint32 size;
guint32 in_reply_to;
guint32 type;
} BroadwayReplyBase, BroadwayReplySync;
typedef struct {
BroadwayReplyBase base;
guint32 id;
} BroadwayReplyNewWindow;
typedef struct {
BroadwayReplyBase base;
guint32 status;
} BroadwayReplyGrabPointer, BroadwayReplyUngrabPointer;
typedef struct {
BroadwayReplyBase base;
guint32 toplevel;
gint32 root_x;
gint32 root_y;
guint32 mask;
} BroadwayReplyQueryMouse;
typedef struct {
BroadwayReplyBase base;
BroadwayInputMsg msg;
} BroadwayReplyEvent;
typedef union {
BroadwayReplyBase base;
BroadwayReplyEvent event;
BroadwayReplyQueryMouse query_mouse;
BroadwayReplyNewWindow new_window;
BroadwayReplyGrabPointer grab_pointer;
BroadwayReplyUngrabPointer ungrab_pointer;
} BroadwayReply;
#endif /* __BROADWAY_PROTOCOL_H__ */

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,87 @@
#ifndef __BROADWAY_SERVER__
#define __BROADWAY_SERVER__
#include "broadway-protocol.h"
#include <glib-object.h>
#include <cairo.h>
void broadway_events_got_input (BroadwayInputMsg *message,
gint32 client_id);
typedef struct _BroadwayServer BroadwayServer;
typedef struct _BroadwayServerClass BroadwayServerClass;
#define BROADWAY_TYPE_SERVER (broadway_server_get_type())
#define BROADWAY_SERVER(object) (G_TYPE_CHECK_INSTANCE_CAST ((object), BROADWAY_TYPE_SERVER, BroadwayServer))
#define BROADWAY_SERVER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), BROADWAY_TYPE_SERVER, BroadwayServerClass))
#define BROADWAY_IS_SERVER(object) (G_TYPE_CHECK_INSTANCE_TYPE ((object), BROADWAY_TYPE_SERVER))
#define BROADWAY_IS_SERVER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), BROADWAY_TYPE_SERVER))
#define BROADWAY_SERVER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), BROADWAY_TYPE_SERVER, BroadwayServerClass))
BroadwayServer *broadway_server_new (char *address,
int port,
GError **error);
gboolean broadway_server_has_client (BroadwayServer *server);
void broadway_server_flush (BroadwayServer *server);
void broadway_server_sync (BroadwayServer *server);
void broadway_server_get_screen_size (BroadwayServer *server,
guint32 *width,
guint32 *height);
guint32 broadway_server_get_next_serial (BroadwayServer *server);
guint32 broadway_server_get_last_seen_time (BroadwayServer *server);
gboolean broadway_server_lookahead_event (BroadwayServer *server,
const char *types);
void broadway_server_query_mouse (BroadwayServer *server,
guint32 *toplevel,
gint32 *root_x,
gint32 *root_y,
guint32 *mask);
guint32 broadway_server_grab_pointer (BroadwayServer *server,
gint client_id,
gint id,
gboolean owner_events,
guint32 event_mask,
guint32 time_);
guint32 broadway_server_ungrab_pointer (BroadwayServer *server,
guint32 time_);
gint32 broadway_server_get_mouse_toplevel (BroadwayServer *server);
guint32 broadway_server_new_window (BroadwayServer *server,
int x,
int y,
int width,
int height,
gboolean is_temp);
void broadway_server_destroy_window (BroadwayServer *server,
gint id);
gboolean broadway_server_window_show (BroadwayServer *server,
gint id);
gboolean broadway_server_window_hide (BroadwayServer *server,
gint id);
void broadway_server_window_set_transient_for (BroadwayServer *server,
gint id,
gint parent);
gboolean broadway_server_window_translate (BroadwayServer *server,
gint id,
cairo_region_t *area,
gint dx,
gint dy);
cairo_surface_t * broadway_server_create_surface (int width,
int height);
void broadway_server_window_update (BroadwayServer *server,
gint id,
cairo_surface_t *surface);
gboolean broadway_server_window_move_resize (BroadwayServer *server,
gint id,
gboolean with_move,
int x,
int y,
int width,
int height);
cairo_surface_t * broadway_server_open_surface (BroadwayServer *server,
guint32 id,
char *name,
int width,
int height);
#endif /* __BROADWAY_SERVER__ */

View File

@@ -132,18 +132,6 @@ function createXHR()
return null;
}
/* This resizes the window so the *inner* size is the specified size */
function resizeBrowserWindow(window, w, h) {
var innerW = window.innerWidth;
var innerH = window.innerHeight;
var outerW = window.outerWidth;
var outerH = window.outerHeight;
window.resizeTo(w + outerW - innerW,
h + outerH - innerH);
}
function resizeCanvas(canvas, w, h)
{
/* Canvas resize clears the data, so we need to save it first */
@@ -163,8 +151,6 @@ function resizeCanvas(canvas, w, h)
context.drawImage(tmpCanvas, 0, 0, tmpCanvas.width, tmpCanvas.height);
}
var useToplevelWindows = false;
var toplevelWindows = [];
var grab = new Object();
grab.window = null;
grab.ownerEvents = false;
@@ -239,34 +225,16 @@ function flushSurface(surface)
context.save();
context.beginPath();
var minx;
var miny;
var maxx;
var maxy;
for (var j = 0; j < cmd.rects.length; j++) {
var rect = cmd.rects[j];
context.rect(rect.x, rect.y, rect.w, rect.h);
if (j == 0) {
minx = rect.x;
miny = rect.y;
maxx = rect.x + rect.w;
maxy = rect.y + rect.h;
} else {
if (rect.x < minx)
minx = rect.x;
if (rect.y < miny)
miny = rect.y;
if (rect.x + rect.w > maxx)
maxx = rect.x + rect.w;
if (rect.y + rect.h > maxy)
maxy = rect.y + rect.h;
}
}
context.clip();
context.globalCompositeOperation = "copy";
context.drawImage(context.canvas,
minx - cmd.dx, miny - cmd.dy, maxx - minx, maxy - miny,
minx, miny, maxx - minx, maxy - miny);
// This seems to break chrome when src overlaps dest
// But source-over should be fine for rgb surfaces anyway
//context.globalCompositeOperation = "copy";
context.drawImage(surface.canvas,
cmd.dx, cmd.dy);
context.restore();
break;
@@ -276,121 +244,11 @@ function flushSurface(surface)
}
}
function ensureSurfaceInDocument(surface, doc)
{
if (surface.document != doc) {
var oldCanvas = surface.canvas;
var canvas = doc.importNode(oldCanvas, false);
doc.body.appendChild(canvas);
canvas.surface = surface;
oldCanvas.parentNode.removeChild(oldCanvas);
surface.canvas = canvas;
if (surface.toplevelElement == oldCanvas)
surface.toplevelElement = canvas;
surface.document = doc;
}
}
function sendConfigureNotify(surface)
{
sendInput("w", [surface.id, surface.x, surface.y, surface.width, surface.height]);
}
var windowGeometryTimeout = null;
function updateBrowserWindowGeometry(win, alwaysSendConfigure) {
if (win.closed)
return;
var surface = win.surface;
var innerW = win.innerWidth;
var innerH = win.innerHeight;
var x = surface.x;
var y = surface.y;
if (win.mozInnerScreenX != undefined) {
x = win.mozInnerScreenX;
y = win.mozInnerScreenY;
} else if (win.screenTop != undefined) {
x = win.screenTop;
y = win.screenLeft;
} else {
alert("No implementation to get window position");
}
if (alwaysSendConfigure || x != surface.x || y != surface.y ||
innerW != surface.width || innerH != surface.height) {
var oldX = surface.x;
var oldY = surface.y;
surface.x = x;
surface.y = y;
if (surface.width != innerW || surface.height != innerH)
resizeCanvas(surface.canvas, innerW, innerH);
surface.width = innerW;
surface.height = innerH;
sendConfigureNotify(surface);
for (id in surfaces) {
var childSurface = surfaces[id];
var transientToplevel = getTransientToplevel(childSurface);
if (transientToplevel != null && transientToplevel == surface) {
childSurface.x += surface.x - oldX;
childSurface.y += surface.y - oldY;
sendConfigureNotify(childSurface);
}
}
}
}
function browserWindowClosed(win) {
var surface = win.surface;
sendInput ("W", [surface.id]);
for (id in surfaces) {
var childSurface = surfaces[id];
var transientToplevel = getTransientToplevel(childSurface);
if (transientToplevel != null && transientToplevel == surface) {
sendInput ("W", [childSurface.id]);
}
}
}
function registerWindow(win)
{
toplevelWindows.push(win);
win.onresize = function(ev) { updateBrowserWindowGeometry(ev.target, false); };
if (!windowGeometryTimeout)
windowGeometryTimeout = setInterval(function () {
for (var i = 0; i < toplevelWindows.length; i++)
updateBrowserWindowGeometry(toplevelWindows[i], false);
}, 2000);
win.onunload = function(ev) { browserWindowClosed(ev.target.defaultView); };
}
function unregisterWindow(win)
{
var i = toplevelWindows.indexOf(win);
if (i >= 0)
toplevelWindows.splice(i, 1);
if (windowGeometryTimeout && toplevelWindows.length == 0) {
clearInterval(windowGeometryTimeout);
windowGeometryTimeout = null;
}
}
function getTransientToplevel(surface)
{
while (surface && surface.transientParent != 0) {
surface = surfaces[surface.transientParent];
if (surface && surface.window)
return surface;
}
return null;
}
function getStyle(el, styleProp)
{
if (el.currentStyle) {
@@ -440,8 +298,6 @@ function cmdCreateSurface(id, x, y, width, height, isTemp)
surface.drawQueue = [];
surface.transientParent = 0;
surface.visible = false;
surface.window = null;
surface.document = document;
surface.frame = null;
var canvas = document.createElement("canvas");
@@ -451,7 +307,7 @@ function cmdCreateSurface(id, x, y, width, height, isTemp)
surface.canvas = canvas;
var toplevelElement;
if (useToplevelWindows || isTemp) {
if (isTemp) {
toplevelElement = canvas;
document.body.appendChild(canvas);
} else {
@@ -476,10 +332,6 @@ function cmdCreateSurface(id, x, y, width, height, isTemp)
toplevelElement = frame;
document.body.appendChild(frame);
surface.x = 100 + positionIndex * 10;
surface.y = 100 + positionIndex * 10;
positionIndex = (positionIndex + 1) % 20;
}
surface.toplevelElement = toplevelElement;
@@ -511,42 +363,10 @@ function cmdShowSurface(id)
var xOffset = surface.x;
var yOffset = surface.y;
if (useToplevelWindows) {
var doc = document;
if (!surface.isTemp) {
var options =
'width='+surface.width+',height='+surface.height+
',location=no,menubar=no,scrollbars=no,toolbar=no';
if (surface.positioned)
options = options +
',left='+surface.x+',top='+surface.y+',screenX='+surface.x+',screenY='+surface.y;
var win = window.open('','_blank', options);
win.surface = surface;
registerWindow(win);
doc = win.document;
doc.open();
doc.write("<body></body>");
setupDocument(doc);
surface.window = win;
xOffset = 0;
yOffset = 0;
} else {
var transientToplevel = getTransientToplevel(surface);
if (transientToplevel) {
doc = transientToplevel.window.document;
xOffset = surface.x - transientToplevel.x;
yOffset = surface.y - transientToplevel.y;
}
}
ensureSurfaceInDocument(surface, doc);
} else {
if (surface.frame) {
var offset = getFrameOffset(surface);
xOffset -= offset.x;
yOffset -= offset.y;
}
if (surface.frame) {
var offset = getFrameOffset(surface);
xOffset -= offset.x;
yOffset -= offset.y;
}
surface.toplevelElement.style["left"] = xOffset + "px";
@@ -554,9 +374,6 @@ function cmdShowSurface(id)
surface.toplevelElement.style["visibility"] = "visible";
restackWindows();
if (surface.window)
updateBrowserWindowGeometry(surface.window, false);
}
function cmdHideSurface(id)
@@ -573,15 +390,6 @@ function cmdHideSurface(id)
var element = surface.toplevelElement;
element.style["visibility"] = "hidden";
// Import the canvas into the main document
ensureSurfaceInDocument(surface, document);
if (surface.window) {
unregisterWindow(surface.window);
surface.window.close();
surface.window = null;
}
}
function cmdSetTransientFor(id, parentId)
@@ -666,45 +474,24 @@ function cmdMoveResizeSurface(id, has_pos, x, y, has_size, w, h)
resizeCanvas(surface.canvas, w, h);
if (surface.visible) {
if (surface.window) {
/* TODO: This moves the outer frame position, we really want the inner position.
* However this isn't *strictly* invalid, as any WM could have done whatever it
* wanted with the positioning of the window.
*/
if (has_pos)
surface.window.moveTo(surface.x, surface.y);
if (has_size)
resizeBrowserWindow(surface.window, w, h);
} else {
if (has_pos) {
var xOffset = surface.x;
var yOffset = surface.y;
if (has_pos) {
var xOffset = surface.x;
var yOffset = surface.y;
var transientToplevel = getTransientToplevel(surface);
if (transientToplevel) {
xOffset = surface.x - transientToplevel.x;
yOffset = surface.y - transientToplevel.y;
}
var element = surface.canvas;
if (surface.frame) {
element = surface.frame;
var offset = getFrameOffset(surface);
xOffset -= offset.x;
yOffset -= offset.y;
}
element.style["left"] = xOffset + "px";
element.style["top"] = yOffset + "px";
var element = surface.canvas;
if (surface.frame) {
element = surface.frame;
var offset = getFrameOffset(surface);
xOffset -= offset.x;
yOffset -= offset.y;
}
element.style["left"] = xOffset + "px";
element.style["top"] = yOffset + "px";
}
}
if (surface.window) {
updateBrowserWindowGeometry(surface.window, true);
} else {
sendConfigureNotify(surface);
}
sendConfigureNotify(surface);
}
function cmdFlushSurface(id)
@@ -732,6 +519,21 @@ function handleCommands(cmd)
var command = cmd.get_char();
lastSerial = cmd.get_32();
switch (command) {
case 'l':
login ();
break;
case 'L':
if (loginDiv != null)
loginDiv.parentNode.removeChild(loginDiv);
start ();
break;
case 'D':
alert ("disconnected");
inputSocket = null;
break;
case 's': // create new surface
id = cmd.get_16();
x = cmd.get_16s();
@@ -931,8 +733,12 @@ BinCommands.prototype.get_32 = function() {
};
BinCommands.prototype.get_image_url = function() {
var size = this.get_32();
var png_blob = new Blob ([this.arraybuffer.slice (this.pos, this.pos + size)], {type:"image/png"});
var url = URL.createObjectURL(png_blob, {oneTimeOnly: true});
var png_blob = new Blob ([new Uint8Array (this.arraybuffer, this.pos, size)], {type:"image/png"});
var url;
if (window.webkitURL)
url = window.webkitURL.createObjectURL(png_blob);
else
url = window.URL.createObjectURL(png_blob, {oneTimeOnly: true});
this.pos = this.pos + size;
return url;
};
@@ -985,13 +791,8 @@ function getPositionsFromAbsCoord(absX, absY, relativeId) {
function getPositionsFromEvent(ev, relativeId) {
var absX, absY;
if (useToplevelWindows) {
absX = ev.screenX;
absY = ev.screenY;
} else {
absX = ev.pageX;
absY = ev.pageY;
}
absX = ev.pageX;
absY = ev.pageY;
var res = getPositionsFromAbsCoord(absX, absY, relativeId);
lastX = res.rootX;
@@ -1020,10 +821,6 @@ function updateForEvent(ev) {
lastState |= GDK_MOD1_MASK;
lastTimeStamp = ev.timeStamp;
if (ev.target.surface && ev.target.surface.window) {
var win = ev.target.surface.window;
updateBrowserWindowGeometry(win, false);
}
}
function onMouseMove (ev) {
@@ -1036,6 +833,8 @@ function onMouseMove (ev) {
surface.x += dx;
surface.y += dy;
var offset = getFrameOffset(surface);
if (surface.y < offset.y)
surface.y = offset.y;
localGrab.frame.style["left"] = (surface.x - offset.x) + "px";
localGrab.frame.style["top"] = (surface.y - offset.y) + "px";
sendConfigureNotify(surface);
@@ -1141,7 +940,7 @@ function onMouseDown (ev) {
localGrab.lastX = ev.pageX;
localGrab.lastY = ev.pageY;
moveToTop(localGrab.frame.frameFor);
return;
return false;
}
if (id == 0 && ev.target.closeFor) { /* mouse click on frame */
@@ -1153,13 +952,14 @@ function onMouseDown (ev) {
localGrab.button = ev.target;
localGrab.lastX = ev.pageX;
localGrab.lastY = ev.pageY;
return;
return false;
}
var pos = getPositionsFromEvent(ev, id);
if (grab.window == null)
doGrab (id, false, true);
sendInput ("b", [realWindowWithMouse, id, pos.rootX, pos.rootY, pos.winX, pos.winY, lastState, button]);
return false;
}
function onMouseUp (ev) {
@@ -1189,13 +989,15 @@ function onMouseUp (ev) {
sendInput ("W", [localGrab.surface.id]);
}
localGrab = null;
return;
return false;
}
sendInput ("B", [realWindowWithMouse, id, pos.rootX, pos.rootY, pos.winX, pos.winY, lastState, button]);
if (grab.window != null && grab.implicit)
doUngrab();
return false;
}
/* Some of the keyboard handling code is from noVNC and
@@ -2671,7 +2473,7 @@ function handleKeyDown(e) {
// browser behaviors or it has no corresponding keyPress
// event, then send it immediately
if (!ignoreKeyEvent(ev))
sendInput("k", [keysym, lastState]);
sendInput("k", [realWindowWithMouse, keysym, lastState]);
suppress = true;
}
@@ -2716,7 +2518,7 @@ function handleKeyPress(e) {
// Send the translated keysym
if (keysym > 0)
sendInput ("k", [keysym, lastState]);
sendInput ("k", [realWindowWithMouse, keysym, lastState]);
// Stop keypress events just in case
return cancelEvent(ev);
@@ -2735,7 +2537,7 @@ function handleKeyUp(e) {
}
if (keysym > 0)
sendInput ("K", [keysym, lastState]);
sendInput ("K", [realWindowWithMouse, keysym, lastState]);
return cancelEvent(ev);
}
@@ -2783,7 +2585,7 @@ function onMouseWheel(ev)
var id = getSurfaceId(ev);
var pos = getPositionsFromEvent(ev, id);
var offset = ev.detail ? ev.detail : ev.wheelDelta;
var offset = ev.detail ? ev.detail : -ev.wheelDelta;
var dir = 0;
if (offset > 0)
dir = 1;
@@ -2824,17 +2626,56 @@ function newWS(loc) {
return ws;
}
function start()
{
setupDocument(document);
var w, h;
w = window.innerWidth;
h = window.innerHeight;
window.onresize = function(ev) {
var w, h;
w = window.innerWidth;
h = window.innerHeight;
sendInput ("d", [w, h]);
};
sendInput ("d", [w, h]);
}
var loginDiv = null;
function login()
{
if (loginDiv == null) {
var div = document.createElement('div');
document.body.appendChild(div);
div.innerHTML = "Please enter password<br>";
div.style.marginTop = "40px";
div.style.textAlign = "center";
var input = document.createElement("input");
input.setAttribute("type", "password");
div.appendChild(input);
input.focus ();
input.onkeyup = function(e) {
if (e.keyCode === 13 && input.value != "") {
inputSocket.send ("l" + input.value);
}
}
loginDiv = div;
} else {
alert ("Wrong password");
}
}
function connect()
{
var url = window.location.toString();
var query_string = url.split("?");
if (query_string.length > 1) {
var params = query_string[1].split("&");
if (params[0].indexOf("toplevel") != -1)
useToplevelWindows = true;
}
var loc = window.location.toString().replace("http:", "ws:");
var loc = window.location.toString().replace("http:", "ws:").replace("https:", "wss:");
loc = loc.substr(0, loc.lastIndexOf('/')) + "/socket";
var supports_binary = newWS (loc + "-test").binaryType == "blob";
@@ -2847,32 +2688,13 @@ function connect()
ws.onopen = function() {
inputSocket = ws;
var w, h;
if (useToplevelWindows) {
w = window.screen.width;
h = window.screen.height;
} else {
w = window.innerWidth;
h = window.innerHeight;
window.onresize = function(ev) {
var w, h;
w = window.innerWidth;
h = window.innerHeight;
sendInput ("d", [w, h]);
};
}
sendInput ("d", [w, h]);
};
ws.onclose = function() {
if (inputSocket != null)
alert ("disconnected");
inputSocket = null;
};
ws.onmessage = function(event) {
handleMessage(event.data);
};
setupDocument(document);
window.onunload = function (ev) {
for (var i = 0; i < toplevelWindows.length; i++)
toplevelWindows[i].close();
};
}

577
gdk/broadway/broadwayd.c Normal file
View File

@@ -0,0 +1,577 @@
#include "config.h"
#include <string.h>
#include <sys/mman.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <stdlib.h>
#include <stdio.h>
#include <glib.h>
#include <gio/gio.h>
#include <gio/gunixsocketaddress.h>
#include "broadway-server.h"
BroadwayServer *server;
GList *clients;
static guint32 client_id_count = 1;
/* Serials:
*
* Broadway tracks serials for all clients primarily to get the right behaviour wrt
* grabs. Each request the client sends gets an increasing per-client serial number, starting
* at 1. Thus, the client can now when a mouse event is seen whether the mouse event was
* sent before or after the server saw the grab request from the client (as this affects how
* the event is handled).
*
* There is only a single stream of increasing serials sent from the daemon to the web browser
* though, called "daemon serials", so we need to map back from the daemon serials to the client
* serials when we send an event to a client. So, each client keeps track of the mappings
* between its serials and daemon serials for any outstanding requests.
*
* There is some additional complexity in that there may be multiple consecutive web browser
* sessions, so we need to keep track of the last daemon serial used inbetween each web client
* connection so that the daemon serials can be strictly increasing.
*/
typedef struct {
guint32 client_serial;
guint32 daemon_serial;
} BroadwaySerialMapping;
typedef struct {
guint32 id;
GSocketConnection *connection;
GBufferedInputStream *in;
GSList *serial_mappings;
GList *windows;
guint disconnect_idle;
} BroadwayClient;
static void
client_free (BroadwayClient *client)
{
g_assert (client->windows == NULL);
g_assert (client->disconnect_idle == 0);
clients = g_list_remove (clients, client);
g_object_unref (client->connection);
g_object_unref (client->in);
g_slist_free_full (client->serial_mappings, g_free);
g_free (client);
}
static void
client_disconnected (BroadwayClient *client)
{
GList *l;
if (client->disconnect_idle != 0)
{
g_source_remove (client->disconnect_idle);
client->disconnect_idle = 0;
}
for (l = client->windows; l != NULL; l = l->next)
broadway_server_destroy_window (server,
GPOINTER_TO_UINT (l->data));
g_list_free (client->windows);
client->windows = NULL;
broadway_server_flush (server);
client_free (client);
}
static gboolean
disconnect_idle_cb (BroadwayClient *client)
{
client->disconnect_idle = 0;
client_disconnected (client);
return G_SOURCE_REMOVE;
}
static void
client_disconnect_in_idle (BroadwayClient *client)
{
if (client->disconnect_idle == 0)
client->disconnect_idle =
g_idle_add_full (G_PRIORITY_DEFAULT, (GSourceFunc)disconnect_idle_cb, client, NULL);
}
static void
send_reply (BroadwayClient *client,
BroadwayRequest *request,
BroadwayReply *reply,
gsize size,
guint32 type)
{
GOutputStream *output;
reply->base.size = size;
reply->base.in_reply_to = request ? request->base.serial : 0;
reply->base.type = type;
output = g_io_stream_get_output_stream (G_IO_STREAM (client->connection));
if (!g_output_stream_write_all (output, reply, size, NULL, NULL, NULL))
{
g_printerr ("can't write to client");
client_disconnect_in_idle (client);
}
}
static cairo_region_t *
region_from_rects (BroadwayRect *rects, int n_rects)
{
cairo_region_t *region;
cairo_rectangle_int_t *cairo_rects;
int i;
cairo_rects = g_new (cairo_rectangle_int_t, n_rects);
for (i = 0; i < n_rects; i++)
{
cairo_rects[i].x = rects[i].x;
cairo_rects[i].y = rects[i].y;
cairo_rects[i].width = rects[i].width;
cairo_rects[i].height = rects[i].height;
}
region = cairo_region_create_rectangles (cairo_rects, n_rects);
g_free (cairo_rects);
return region;
}
void
add_client_serial_mapping (BroadwayClient *client,
guint32 client_serial,
guint32 daemon_serial)
{
BroadwaySerialMapping *map;
GSList *last;
last = g_slist_last (client->serial_mappings);
if (last != NULL)
{
map = last->data;
/* If we have no web client, don't grow forever */
if (map->daemon_serial == daemon_serial)
{
map->client_serial = client_serial;
return;
}
}
map = g_new0 (BroadwaySerialMapping, 1);
map->client_serial = client_serial;
map->daemon_serial = daemon_serial;
client->serial_mappings = g_slist_append (client->serial_mappings, map);
}
/* Returns the latest seen client serial at the time we sent
a daemon request to the browser with a specific daemon serial */
guint32
get_client_serial (BroadwayClient *client, guint32 daemon_serial)
{
BroadwaySerialMapping *map;
GSList *l, *found;
guint32 client_serial = 0;
found = NULL;
for (l = client->serial_mappings; l != NULL; l = l->next)
{
map = l->data;
if (map->daemon_serial <= daemon_serial)
{
found = l;
client_serial = map->client_serial;
}
else
break;
}
/* Remove mappings before the found one, they will never more be used */
while (found != NULL &&
client->serial_mappings != found)
{
g_free (client->serial_mappings->data);
client->serial_mappings =
g_slist_delete_link (client->serial_mappings, client->serial_mappings);
}
return client_serial;
}
static void
client_handle_request (BroadwayClient *client,
BroadwayRequest *request)
{
BroadwayReplyNewWindow reply_new_window;
BroadwayReplySync reply_sync;
BroadwayReplyQueryMouse reply_query_mouse;
BroadwayReplyGrabPointer reply_grab_pointer;
BroadwayReplyUngrabPointer reply_ungrab_pointer;
cairo_region_t *area;
cairo_surface_t *surface;
guint32 before_serial, now_serial;
before_serial = broadway_server_get_next_serial (server);
switch (request->base.type)
{
case BROADWAY_REQUEST_NEW_WINDOW:
reply_new_window.id =
broadway_server_new_window (server,
request->new_window.x,
request->new_window.y,
request->new_window.width,
request->new_window.height,
request->new_window.is_temp);
client->windows =
g_list_prepend (client->windows,
GUINT_TO_POINTER (reply_new_window.id));
send_reply (client, request, (BroadwayReply *)&reply_new_window, sizeof (reply_new_window),
BROADWAY_REPLY_NEW_WINDOW);
break;
case BROADWAY_REQUEST_FLUSH:
broadway_server_flush (server);
break;
case BROADWAY_REQUEST_SYNC:
broadway_server_flush (server);
send_reply (client, request, (BroadwayReply *)&reply_sync, sizeof (reply_sync),
BROADWAY_REPLY_SYNC);
break;
case BROADWAY_REQUEST_QUERY_MOUSE:
broadway_server_query_mouse (server,
&reply_query_mouse.toplevel,
&reply_query_mouse.root_x,
&reply_query_mouse.root_y,
&reply_query_mouse.mask);
send_reply (client, request, (BroadwayReply *)&reply_query_mouse, sizeof (reply_query_mouse),
BROADWAY_REPLY_QUERY_MOUSE);
break;
case BROADWAY_REQUEST_DESTROY_WINDOW:
client->windows =
g_list_remove (client->windows,
GUINT_TO_POINTER (request->destroy_window.id));
broadway_server_destroy_window (server, request->destroy_window.id);
break;
case BROADWAY_REQUEST_SHOW_WINDOW:
broadway_server_window_show (server, request->show_window.id);
break;
case BROADWAY_REQUEST_HIDE_WINDOW:
broadway_server_window_hide (server, request->hide_window.id);
break;
case BROADWAY_REQUEST_SET_TRANSIENT_FOR:
broadway_server_window_set_transient_for (server,
request->set_transient_for.id,
request->set_transient_for.parent);
break;
case BROADWAY_REQUEST_TRANSLATE:
area = region_from_rects (request->translate.rects,
request->translate.n_rects);
broadway_server_window_translate (server,
request->translate.id,
area,
request->translate.dx,
request->translate.dy);
cairo_region_destroy (area);
break;
case BROADWAY_REQUEST_UPDATE:
surface = broadway_server_open_surface (server,
request->update.id,
request->update.name,
request->update.width,
request->update.height);
if (surface != NULL)
{
broadway_server_window_update (server,
request->update.id,
surface);
cairo_surface_destroy (surface);
}
break;
case BROADWAY_REQUEST_MOVE_RESIZE:
broadway_server_window_move_resize (server,
request->move_resize.id,
request->move_resize.with_move,
request->move_resize.x,
request->move_resize.y,
request->move_resize.width,
request->move_resize.height);
break;
case BROADWAY_REQUEST_GRAB_POINTER:
reply_grab_pointer.status =
broadway_server_grab_pointer (server,
client->id,
request->grab_pointer.id,
request->grab_pointer.owner_events,
request->grab_pointer.event_mask,
request->grab_pointer.time_);
send_reply (client, request, (BroadwayReply *)&reply_grab_pointer, sizeof (reply_grab_pointer),
BROADWAY_REPLY_GRAB_POINTER);
break;
case BROADWAY_REQUEST_UNGRAB_POINTER:
reply_ungrab_pointer.status =
broadway_server_ungrab_pointer (server,
request->ungrab_pointer.time_);
send_reply (client, request, (BroadwayReply *)&reply_ungrab_pointer, sizeof (reply_ungrab_pointer),
BROADWAY_REPLY_UNGRAB_POINTER);
break;
default:
g_warning ("Unknown request of type %d\n", request->base.type);
}
now_serial = broadway_server_get_next_serial (server);
/* If we sent a new output request, map that this client serial to that, otherwise
update old mapping for previously sent daemon serial */
if (now_serial != before_serial)
add_client_serial_mapping (client,
request->base.serial,
before_serial);
else
add_client_serial_mapping (client,
request->base.serial,
before_serial - 1);
}
static void
client_fill_cb (GObject *source_object,
GAsyncResult *result,
gpointer user_data)
{
BroadwayClient *client = user_data;
gssize res;
res = g_buffered_input_stream_fill_finish (client->in, result, NULL);
if (res > 0)
{
guint32 size;
gsize count, remaining;
guint8 *buffer;
buffer = (guint8 *)g_buffered_input_stream_peek_buffer (client->in, &count);
remaining = count;
while (remaining >= sizeof (guint32))
{
memcpy (&size, buffer, sizeof (guint32));
if (size <= remaining)
{
client_handle_request (client, (BroadwayRequest *)buffer);
remaining -= size;
buffer += size;
}
}
/* This is guaranteed not to block */
g_input_stream_skip (G_INPUT_STREAM (client->in), count - remaining, NULL, NULL);
g_buffered_input_stream_fill_async (client->in,
4*1024,
0,
NULL,
client_fill_cb, client);
}
else
{
client_disconnected (client);
}
}
static gboolean
incoming_client (GSocketService *service,
GSocketConnection *connection,
GObject *source_object)
{
BroadwayClient *client;
GInputStream *input;
BroadwayInputMsg ev = { {0} };
client = g_new0 (BroadwayClient, 1);
client->id = client_id_count++;
client->connection = g_object_ref (connection);
input = g_io_stream_get_input_stream (G_IO_STREAM (client->connection));
client->in = (GBufferedInputStream *)g_buffered_input_stream_new (input);
clients = g_list_prepend (clients, client);
g_buffered_input_stream_fill_async (client->in,
4*1024,
0,
NULL,
client_fill_cb, client);
/* Send initial resize notify */
ev.base.type = BROADWAY_EVENT_SCREEN_SIZE_CHANGED;
ev.base.serial = broadway_server_get_next_serial (server) - 1;
ev.base.time = broadway_server_get_last_seen_time (server);
broadway_server_get_screen_size (server,
&ev.screen_resize_notify.width,
&ev.screen_resize_notify.height);
broadway_events_got_input (&ev,
client->id);
return TRUE;
}
int
main (int argc, char *argv[])
{
GError *error = NULL;
GOptionContext *context;
GMainLoop *loop;
GSocketAddress *address;
GSocketService *listener;
char *path, *base;
char *http_address = NULL;
int http_port = 0;
int display = 1;
const GOptionEntry entries[] = {
{ "port", 'p', 0, G_OPTION_ARG_INT, &http_port, "Httpd port", "PORT" },
{ "address", 'a', 0, G_OPTION_ARG_STRING, &http_address, "Ip address to bind to ", "ADDRESS" },
{ NULL }
};
context = g_option_context_new ("[:DISPLAY] - broadway display daemon");
g_option_context_add_main_entries (context, entries, GETTEXT_PACKAGE);
if (!g_option_context_parse (context, &argc, &argv, &error))
{
g_printerr ("option parsing failed: %s\n", error->message);
exit (1);
}
if (argc > 1)
{
if (*argv[1] != ':')
{
g_printerr ("Usage broadwayd [:DISPLAY]\n");
exit (1);
}
display = strtol(argv[1]+1, NULL, 10);
if (display == 0)
{
g_printerr ("Failed to parse display num %s\n", argv[1]);
exit (1);
}
}
if (http_port == 0)
http_port = 8080 + (display - 1);
server = broadway_server_new (http_address, http_port, &error);
if (server == NULL)
{
g_printerr ("%s\n", error->message);
return 1;
}
base = g_strdup_printf ("broadway%d.socket", display);
path = g_build_filename (g_get_user_runtime_dir (), base, NULL);
g_free (base);
g_print ("Listening on %s\n", path);
address = g_unix_socket_address_new_with_type (path, -1,
G_UNIX_SOCKET_ADDRESS_ABSTRACT);
g_free (path);
listener = g_socket_service_new ();
if (!g_socket_listener_add_address (G_SOCKET_LISTENER (listener),
address,
G_SOCKET_TYPE_STREAM,
G_SOCKET_PROTOCOL_DEFAULT,
G_OBJECT (server),
NULL,
&error))
{
g_printerr ("Can't listen: %s\n", error->message);
return 1;
}
g_object_unref (address);
g_signal_connect (listener, "incoming", G_CALLBACK (incoming_client), NULL);
g_socket_service_start (G_SOCKET_SERVICE (listener));
loop = g_main_loop_new (NULL, FALSE);
g_main_loop_run (loop);
return 0;
}
static gsize
get_event_size (int type)
{
switch (type)
{
case BROADWAY_EVENT_ENTER:
case BROADWAY_EVENT_LEAVE:
return sizeof (BroadwayInputCrossingMsg);
case BROADWAY_EVENT_POINTER_MOVE:
return sizeof (BroadwayInputPointerMsg);
case BROADWAY_EVENT_BUTTON_PRESS:
case BROADWAY_EVENT_BUTTON_RELEASE:
return sizeof (BroadwayInputButtonMsg);
case BROADWAY_EVENT_SCROLL:
return sizeof (BroadwayInputScrollMsg);
case BROADWAY_EVENT_KEY_PRESS:
case BROADWAY_EVENT_KEY_RELEASE:
return sizeof (BroadwayInputKeyMsg);
case BROADWAY_EVENT_GRAB_NOTIFY:
case BROADWAY_EVENT_UNGRAB_NOTIFY:
return sizeof (BroadwayInputGrabReply);
case BROADWAY_EVENT_CONFIGURE_NOTIFY:
return sizeof (BroadwayInputConfigureNotify);
case BROADWAY_EVENT_DELETE_NOTIFY:
return sizeof (BroadwayInputDeleteNotify);
case BROADWAY_EVENT_SCREEN_SIZE_CHANGED:
return sizeof (BroadwayInputScreenResizeNotify);
default:
g_assert_not_reached ();
}
return 0;
}
void
broadway_events_got_input (BroadwayInputMsg *message,
gint32 client_id)
{
GList *l;
BroadwayReplyEvent reply_event;
gsize size;
guint32 daemon_serial;
size = get_event_size (message->base.type);
g_assert (sizeof (BroadwayReplyBase) + size <= sizeof (BroadwayReplyEvent));
memset (&reply_event, 0, sizeof (BroadwayReplyEvent));
daemon_serial = message->base.serial;
memcpy (&reply_event.msg, message, size);
for (l = clients; l != NULL; l = l->next)
{
BroadwayClient *client = l->data;
if (client_id == -1 ||
client->id == client_id)
{
reply_event.msg.base.serial = get_client_serial (client, daemon_serial);
send_reply (client, NULL, (BroadwayReply *)&reply_event,
G_STRUCT_OFFSET (BroadwayReplyEvent, msg) + size,
BROADWAY_REPLY_EVENT);
}
}
}

View File

@@ -0,0 +1,702 @@
#include <sys/mman.h>
#include <sys/stat.h>
#include <fcntl.h>
#include "gdkbroadway-server.h"
#include "gdkprivate-broadway.h"
#include <glib.h>
#include <glib/gprintf.h>
#include <gio/gunixsocketaddress.h>
#include <stdlib.h>
#include <string.h>
#include <errno.h>
#include <unistd.h>
#include <sys/types.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <netinet/tcp.h>
typedef struct BroadwayInput BroadwayInput;
struct _GdkBroadwayServer {
GObject parent_instance;
guint32 next_serial;
GSocketConnection *connection;
guint32 recv_buffer_size;
guint8 recv_buffer[1024];
guint process_input_idle;
GList *incomming;
};
struct _GdkBroadwayServerClass
{
GObjectClass parent_class;
};
static gboolean input_available_cb (gpointer stream, gpointer user_data);
G_DEFINE_TYPE (GdkBroadwayServer, gdk_broadway_server, G_TYPE_OBJECT)
static void
gdk_broadway_server_init (GdkBroadwayServer *server)
{
server->next_serial = 1;
}
static void
gdk_broadway_server_finalize (GObject *object)
{
G_OBJECT_CLASS (gdk_broadway_server_parent_class)->finalize (object);
}
static void
gdk_broadway_server_class_init (GdkBroadwayServerClass * class)
{
GObjectClass *object_class = G_OBJECT_CLASS (class);
object_class->finalize = gdk_broadway_server_finalize;
}
gboolean
_gdk_broadway_server_lookahead_event (GdkBroadwayServer *server,
const char *types)
{
return FALSE;
}
gulong
_gdk_broadway_server_get_next_serial (GdkBroadwayServer *server)
{
return (gulong)server->next_serial;
}
GdkBroadwayServer *
_gdk_broadway_server_new (int port, GError **error)
{
GdkBroadwayServer *server;
char *basename;
GSocketClient *client;
GSocketConnection *connection;
GSocketAddress *address;
GPollableInputStream *pollable;
GInputStream *in;
GSource *source;
char *path;
basename = g_strdup_printf ("broadway%d.socket", port);
path = g_build_filename (g_get_user_runtime_dir (), basename, NULL);
g_free (basename);
address = g_unix_socket_address_new_with_type (path, -1,
G_UNIX_SOCKET_ADDRESS_ABSTRACT);
g_free (path);
client = g_socket_client_new ();
error = NULL;
connection = g_socket_client_connect (client, G_SOCKET_CONNECTABLE (address), NULL, error);
g_object_unref (address);
g_object_unref (client);
if (connection == NULL)
return NULL;
server = g_object_new (GDK_TYPE_BROADWAY_SERVER, NULL);
server->connection = connection;
in = g_io_stream_get_input_stream (G_IO_STREAM (server->connection));
pollable = G_POLLABLE_INPUT_STREAM (in);
source = g_pollable_input_stream_create_source (pollable, NULL);
g_source_attach (source, NULL);
g_source_set_callback (source, (GSourceFunc)input_available_cb, server, NULL);
return server;
}
guint32
_gdk_broadway_server_get_last_seen_time (GdkBroadwayServer *server)
{
return 0;
}
static guint32
gdk_broadway_server_send_message_with_size (GdkBroadwayServer *server, BroadwayRequestBase *base,
gsize size, guint32 type)
{
GOutputStream *out;
gsize written;
base->size = size;
base->type = type;
base->serial = server->next_serial++;
out = g_io_stream_get_output_stream (G_IO_STREAM (server->connection));
if (!g_output_stream_write_all (out, base, size, &written, NULL, NULL))
{
g_printerr ("Unable to write to server\n");
exit (1);
}
g_assert (written == size);
return base->serial;
}
#define gdk_broadway_server_send_message(_server, _msg, _type) \
gdk_broadway_server_send_message_with_size(_server, (BroadwayRequestBase *)&_msg, sizeof (_msg), _type)
static void
parse_all_input (GdkBroadwayServer *server)
{
guint8 *p, *end;
guint32 size;
BroadwayReply *reply;
p = server->recv_buffer;
end = p + server->recv_buffer_size;
while (p + sizeof (guint32) <= end)
{
memcpy (&size, p, sizeof (guint32));
if (p + size > end)
break;
reply = g_memdup (p, size);
p += size;
server->incomming = g_list_append (server->incomming, reply);
}
if (p < end)
memmove (server->recv_buffer, p, end - p);
server->recv_buffer_size = end - p;
}
static void
read_some_input_blocking (GdkBroadwayServer *server)
{
GInputStream *in;
gssize res;
in = g_io_stream_get_input_stream (G_IO_STREAM (server->connection));
g_assert (server->recv_buffer_size < sizeof (server->recv_buffer));
res = g_input_stream_read (in, &server->recv_buffer[server->recv_buffer_size],
sizeof (server->recv_buffer) - server->recv_buffer_size,
NULL, NULL);
if (res <= 0)
{
g_printerr ("Unable to read from broadway server\n");
exit (1);
}
server->recv_buffer_size += res;
}
static void
read_some_input_nonblocking (GdkBroadwayServer *server)
{
GInputStream *in;
GPollableInputStream *pollable;
gssize res;
GError *error;
in = g_io_stream_get_input_stream (G_IO_STREAM (server->connection));
pollable = G_POLLABLE_INPUT_STREAM (in);
g_assert (server->recv_buffer_size < sizeof (server->recv_buffer));
error = NULL;
res = g_pollable_input_stream_read_nonblocking (pollable, &server->recv_buffer[server->recv_buffer_size],
sizeof (server->recv_buffer) - server->recv_buffer_size,
NULL, &error);
if (res < 0 && g_error_matches (error, G_IO_ERROR, G_IO_ERROR_WOULD_BLOCK))
{
g_error_free (error);
res = 0;
}
else if (res <= 0)
{
g_printerr ("Unable to read from broadway server: %s\n", error ? error->message : "eof");
exit (1);
}
server->recv_buffer_size += res;
}
static BroadwayReply *
find_response_by_serial (GdkBroadwayServer *server, guint32 serial)
{
GList *l;
for (l = server->incomming; l != NULL; l = l->next)
{
BroadwayReply *reply = l->data;
if (reply->base.in_reply_to == serial)
return reply;
}
return NULL;
}
static void
process_input_messages (GdkBroadwayServer *server)
{
BroadwayReply *reply;
if (server->process_input_idle != 0)
{
g_source_remove (server->process_input_idle);
server->process_input_idle = 0;
}
while (server->incomming)
{
reply = server->incomming->data;
server->incomming =
g_list_delete_link (server->incomming,
server->incomming);
if (reply->base.type == BROADWAY_REPLY_EVENT)
_gdk_broadway_events_got_input (&reply->event.msg);
else
g_warning ("Unhandled reply type %d\n", reply->base.type);
g_free (reply);
}
}
static gboolean
process_input_idle_cb (GdkBroadwayServer *server)
{
server->process_input_idle = 0;
process_input_messages (server);
return G_SOURCE_REMOVE;
}
static void
queue_process_input_at_idle (GdkBroadwayServer *server)
{
if (server->process_input_idle == 0)
server->process_input_idle =
g_idle_add_full (G_PRIORITY_DEFAULT, (GSourceFunc)process_input_idle_cb, server, NULL);
}
static gboolean
input_available_cb (gpointer stream, gpointer user_data)
{
GdkBroadwayServer *server = user_data;
read_some_input_nonblocking (server);
parse_all_input (server);
process_input_messages (server);
return G_SOURCE_CONTINUE;
}
static BroadwayReply *
gdk_broadway_server_wait_for_reply (GdkBroadwayServer *server,
guint32 serial)
{
BroadwayReply *reply;
while (TRUE)
{
reply = find_response_by_serial (server, serial);
if (reply)
{
server->incomming = g_list_remove (server->incomming, reply);
break;
}
read_some_input_blocking (server);
parse_all_input (server);
}
queue_process_input_at_idle (server);
return reply;
}
void
_gdk_broadway_server_flush (GdkBroadwayServer *server)
{
BroadwayRequestFlush msg;
gdk_broadway_server_send_message(server, msg, BROADWAY_REQUEST_FLUSH);
}
void
_gdk_broadway_server_sync (GdkBroadwayServer *server)
{
BroadwayRequestSync msg;
guint32 serial;
BroadwayReply *reply;
serial = gdk_broadway_server_send_message (server, msg,
BROADWAY_REQUEST_SYNC);
reply = gdk_broadway_server_wait_for_reply (server, serial);
g_assert (reply->base.type == BROADWAY_REPLY_SYNC);
g_free (reply);
return;
}
void
_gdk_broadway_server_query_mouse (GdkBroadwayServer *server,
guint32 *toplevel,
gint32 *root_x,
gint32 *root_y,
guint32 *mask)
{
BroadwayRequestQueryMouse msg;
guint32 serial;
BroadwayReply *reply;
serial = gdk_broadway_server_send_message (server, msg,
BROADWAY_REQUEST_QUERY_MOUSE);
reply = gdk_broadway_server_wait_for_reply (server, serial);
g_assert (reply->base.type == BROADWAY_REPLY_QUERY_MOUSE);
if (toplevel)
*toplevel = reply->query_mouse.toplevel;
if (root_x)
*root_x = reply->query_mouse.root_x;
if (root_y)
*root_y = reply->query_mouse.root_y;
if (mask)
*mask = reply->query_mouse.mask;
g_free (reply);
}
guint32
_gdk_broadway_server_new_window (GdkBroadwayServer *server,
int x,
int y,
int width,
int height,
gboolean is_temp)
{
BroadwayRequestNewWindow msg;
guint32 serial, id;
BroadwayReply *reply;
msg.x = x;
msg.y = y;
msg.width = width;
msg.height = height;
msg.is_temp = is_temp;
serial = gdk_broadway_server_send_message (server, msg,
BROADWAY_REQUEST_NEW_WINDOW);
reply = gdk_broadway_server_wait_for_reply (server, serial);
g_assert (reply->base.type == BROADWAY_REPLY_NEW_WINDOW);
id = reply->new_window.id;
g_free (reply);
return id;
}
void
_gdk_broadway_server_destroy_window (GdkBroadwayServer *server,
gint id)
{
BroadwayRequestDestroyWindow msg;
msg.id = id;
gdk_broadway_server_send_message (server, msg,
BROADWAY_REQUEST_DESTROY_WINDOW);
}
gboolean
_gdk_broadway_server_window_show (GdkBroadwayServer *server,
gint id)
{
BroadwayRequestShowWindow msg;
msg.id = id;
gdk_broadway_server_send_message (server, msg,
BROADWAY_REQUEST_SHOW_WINDOW);
return TRUE;
}
gboolean
_gdk_broadway_server_window_hide (GdkBroadwayServer *server,
gint id)
{
BroadwayRequestHideWindow msg;
msg.id = id;
gdk_broadway_server_send_message (server, msg,
BROADWAY_REQUEST_HIDE_WINDOW);
return TRUE;
}
void
_gdk_broadway_server_window_set_transient_for (GdkBroadwayServer *server,
gint id, gint parent)
{
BroadwayRequestSetTransientFor msg;
msg.id = id;
msg.parent = parent;
gdk_broadway_server_send_message (server, msg,
BROADWAY_REQUEST_SET_TRANSIENT_FOR);
}
gboolean
_gdk_broadway_server_window_translate (GdkBroadwayServer *server,
gint id,
cairo_region_t *area,
gint dx,
gint dy)
{
BroadwayRequestTranslate *msg;
cairo_rectangle_int_t rect;
int i, n_rects;
gsize msg_size;
n_rects = cairo_region_num_rectangles (area);
msg_size = sizeof (BroadwayRequestTranslate) + (n_rects-1) * sizeof (BroadwayRect);
msg = g_malloc (msg_size);
msg->id = id;
msg->dx = dx;
msg->dy = dy;
msg->n_rects = n_rects;
for (i = 0; i < n_rects; i++)
{
cairo_region_get_rectangle (area, i, &rect);
msg->rects[i].x = rect.x;
msg->rects[i].y = rect.y;
msg->rects[i].width = rect.width;
msg->rects[i].height = rect.height;
}
gdk_broadway_server_send_message_with_size (server, (BroadwayRequestBase *)msg, msg_size,
BROADWAY_REQUEST_TRANSLATE);
g_free (msg);
return TRUE;
}
static char
make_valid_fs_char (char c)
{
char chars[] = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ01234567890";
return chars[c % (sizeof (chars) - 1)];
}
/* name must have at least space for 34 bytes */
static int
create_random_shm (char *name)
{
guint32 r;
int i, o, fd;
while (TRUE)
{
o = 0;
name[o++] = '/';
name[o++] = 'b';
name[o++] = 'd';
name[o++] = 'w';
name[o++] = '-';
for (i = 0; i < 32/4 - 1; i++)
{
r = g_random_int ();
name[o++] = make_valid_fs_char ((r >> 0) & 0xff);
name[o++] = make_valid_fs_char ((r >> 8) & 0xff);
name[o++] = make_valid_fs_char ((r >> 16) & 0xff);
name[o++] = make_valid_fs_char ((r >> 24) & 0xff);
}
name[o++] = 0;
fd = shm_open(name, O_RDWR|O_CREAT|O_EXCL, 0600);
if (fd >= 0)
return fd;
if (errno != EEXIST)
{
g_printerr ("Unable to allocate shared mem for window");
exit (1);
}
}
}
static const cairo_user_data_key_t gdk_broadway_shm_cairo_key;
typedef struct {
char name[36];
void *data;
gsize data_size;
} BroadwayShmSurfaceData;
static void
shm_data_destroy (void *_data)
{
BroadwayShmSurfaceData *data = _data;
munmap (data->data, data->data_size);
shm_unlink (data->name);
g_free (data);
}
cairo_surface_t *
_gdk_broadway_server_create_surface (int width,
int height)
{
BroadwayShmSurfaceData *data;
cairo_surface_t *surface;
int res;
int fd;
data = g_new (BroadwayShmSurfaceData, 1);
data->data_size = width * height * sizeof (guint32);
fd = create_random_shm (data->name);
res = ftruncate (fd, data->data_size);
g_assert (res != -1);
res = posix_fallocate (fd, 0, data->data_size);
if (res != 0)
{
shm_unlink (data->name);
g_error ("Not enough shared memory for window surface");
}
data->data = mmap(0, data->data_size, PROT_READ|PROT_WRITE, MAP_SHARED, fd, 0);
(void) close(fd);
surface = cairo_image_surface_create_for_data ((guchar *)data->data,
CAIRO_FORMAT_RGB24, width, height, width * sizeof (guint32));
g_assert (surface != NULL);
cairo_surface_set_user_data (surface, &gdk_broadway_shm_cairo_key,
data, shm_data_destroy);
return surface;
}
void
_gdk_broadway_server_window_update (GdkBroadwayServer *server,
gint id,
cairo_surface_t *surface)
{
BroadwayRequestUpdate msg;
BroadwayShmSurfaceData *data;
if (surface == NULL)
return;
data = cairo_surface_get_user_data (surface, &gdk_broadway_shm_cairo_key);
g_assert (data != NULL);
msg.id = id;
memcpy (msg.name, data->name, 36);
msg.width = cairo_image_surface_get_width (surface);
msg.height = cairo_image_surface_get_height (surface);
gdk_broadway_server_send_message (server, msg,
BROADWAY_REQUEST_UPDATE);
}
gboolean
_gdk_broadway_server_window_move_resize (GdkBroadwayServer *server,
gint id,
gboolean with_move,
int x,
int y,
int width,
int height)
{
BroadwayRequestMoveResize msg;
msg.id = id;
msg.with_move = with_move;
msg.x = x;
msg.y = y;
msg.width = width;
msg.height = height;
gdk_broadway_server_send_message (server, msg,
BROADWAY_REQUEST_MOVE_RESIZE);
return TRUE;
}
GdkGrabStatus
_gdk_broadway_server_grab_pointer (GdkBroadwayServer *server,
gint id,
gboolean owner_events,
guint32 event_mask,
guint32 time_)
{
BroadwayRequestGrabPointer msg;
guint32 serial, status;
BroadwayReply *reply;
msg.id = id;
msg.owner_events = owner_events;
msg.event_mask = event_mask;
msg.time_ = time_;
serial = gdk_broadway_server_send_message (server, msg,
BROADWAY_REQUEST_GRAB_POINTER);
reply = gdk_broadway_server_wait_for_reply (server, serial);
g_assert (reply->base.type == BROADWAY_REPLY_GRAB_POINTER);
status = reply->grab_pointer.status;
g_free (reply);
return status;
}
guint32
_gdk_broadway_server_ungrab_pointer (GdkBroadwayServer *server,
guint32 time_)
{
BroadwayRequestUngrabPointer msg;
guint32 serial, status;
BroadwayReply *reply;
msg.time_ = time_;
serial = gdk_broadway_server_send_message (server, msg,
BROADWAY_REQUEST_UNGRAB_POINTER);
reply = gdk_broadway_server_wait_for_reply (server, serial);
g_assert (reply->base.type == BROADWAY_REPLY_UNGRAB_POINTER);
status = reply->ungrab_pointer.status;
g_free (reply);
return status;
}

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