Compare commits

...

555 Commits

Author SHA1 Message Date
Matthias Clasen
09ed01e8a7 3.8.8 2013-11-26 20:47:50 -05:00
Marek Kasik
9feda1c92c printing: Fix memory leak when listing Avahi printers
Return values of g_variant_get_child_value() were not unreffed
correctly together with one value returned by g_variant_get().
Use g_variant_get_data() instead of copying each byte separately.

https://bugzilla.gnome.org/show_bug.cgi?id=712799
2013-11-26 14:23:44 +01:00
Carlos Garnacho
0f02cd2bcb x11: Unset GdkX11DeviceXI2 scroll valuators on device change
Scroll valuators were being just appended again and again, leading
to 1) a growing memory issue anytime a device changed 2) the first
scroll valuators to stay permanent on the application lifetime, as
the first stored valuators would always match.

https://bugzilla.gnome.org/show_bug.cgi?id=705203
2013-11-25 17:54:07 +01:00
Carlos Garnacho
a20e7634b6 x11: keep track of the screen pixel size by calculating the bounding box of monitors
This is so we always have the latest information given by XRandR (or other), and not
rely on Core protocol information that might not have been updated yet.

This is specially visible when a monitor is connected (less frequent) or disconnected
(much more frequent), callbacks on GdkScreen::monitors-changed that call
gdk_screen_get_width/height() could get the screen size previous to the monitor
rearrangement.

So in order to fix this, keep track of the latest monitors information, and calculate
the bounding box in order to know the screen size.

https://bugzilla.gnome.org/show_bug.cgi?id=715029
2013-11-25 17:44:16 +01:00
Matthias Clasen
e8b69526c2 3.8.7 2013-11-20 20:06:16 -05:00
Matthias Clasen
c66f194d05 Don't distribute gdbus-generated sources
These are supposed to be regenerated at build time,
to avoid dependencies on the dist-systems glib version.
2013-11-20 20:06:11 -05:00
Matthias Clasen
c55784626a treeview: fix dragging of columns in mutter
Don't recurse the mainloop in _gtk_tree_view_column_start_drag().
It doesn't serve any discernible purpose, and recursing the
mainloop from the flush-events phas of the frame clock breaks
frame synchronization with mutter.

https://bugzilla.gnome.org/show_bug.cgi?id=705176
2013-11-20 19:28:18 -05:00
Carlos Garcia Campos
29d6eec09a gtkprintbackendfile: Check the GtkPrintSettings passed to file_printer_get_options is not NULL before using it
https://bugzilla.gnome.org/show_bug.cgi?id=703784
2013-11-20 19:27:48 -05:00
Chenthill Palanisamy
a2420a40da Do not reset the waiting_for_printer on status change
* gtk/gtkprintunixdialog.c (printer_status_cb): Do not reset the
waiting_for_printer on status change as the default printer might
get added later.

https://bugzilla.gnome.org/show_bug.cgi?id=577642
2013-11-20 19:27:31 -05:00
Matthias Clasen
7e0434cfcd Make treeview cursor handling a bit more robust
Clearing the model in a GtkTreeSelection::changed handler was
crashing. While it is not a 100% kosher thing to do, lets be
more robust here.
2013-11-20 19:27:17 -05:00
Carlos Garnacho
d95b84c0ea combobox: Set GDK_SCROLL_MASK on the eventbox in appears-as-list mode
This is so the scroll wheel works in both modes, and there's no behavioral
change depending on a style property.

https://bugzilla.gnome.org/show_bug.cgi?id=702663
2013-11-20 13:26:06 +01:00
Carlos Garnacho
81b7c4e40b gdk: Ignore crossings generated by passive grabs when resetting scroll axes
Passive grabs may take pointer focus out of the application, even though
the pointer didn't leave the window, but those events still trigger resetting
of the scroll axes. This is most visible with compiz, and possibly other
reparenting WMs, where passive grabs happen on the WM-managed window that
is a parent of the application toplevel.

As it is not possible to have scrolling happening on the timespan a passive
grab takes action, it is entirely safe for GTK+ to assume none happened if
it gets a crossing event of that nature.

https://bugzilla.gnome.org/show_bug.cgi?id=699574#c33
2013-11-19 00:15:29 +01:00
Carlos Garnacho
198ad4df90 gdk: be more selective resetting scroll events
It's been reported in several applications that scrolling feels jerky
since commit cc7b3985b3.

Investigation reported that the combination of passive 4-7 button grabs
on the toplevel and the presence of native subwindows might trigger
too often crossing events from the child window to the toplevel and
back as scroll "buttons" trigger the passive grab. Those crossing events
would reset the scroll valuators rendering scrolling from jerky on
touchpads (where there's intermediate smooth events between the emulated
button ones) to ineffective on regular mouse wheels (where the crossing
event would reset the valuators right before the single smooth scroll
event we get is delivered)

So, only reset scroll valuators when the pointer enters the toplevel
(we only care about this when the pointer is on the window after it's
been possibly scrolling somewhere else), and it doesn't come from an
inferior.

The situations where this happened varied though, the native subwindow
could be one created explicitly by the application, or created indirectly
through gdk_window_ensure_native(). The latter was mainly the case for
evolution (through gtk_selection_set_owner()) and any GtkScrolledWindow
under the oxygen-gtk3 theme (through gdk_window_set_composited())

https://bugzilla.gnome.org/show_bug.cgi?id=699574
2013-11-19 00:15:18 +01:00
Matthias Clasen
cf962321e8 GtkAboutDialog: Fix a corner case of link highlighting
GtkAboutDialog highlights emails written as <...> and
urls written as http://... . gnome-terminal manages to
put <http://...> into its license text, which sadly
confuses the parser into running evolution on http://...

Fix things up far enough that <http://...> is now
recognized as url, and only the part inside the <> is
underlined (for email addresses, we include the <> in
the underline).
2013-11-15 17:06:15 -05:00
Sebastien Bacher
4b880d50f1 Clean incorrect "_" use in the french translation
https://bugzilla.gnome.org/show_bug.cgi?id=712213
2013-11-13 16:34:12 +01:00
Lars Uebernickel
37675d8227 GtkModelMenu: don't leak submenus
gtk_container_remove_child() is not enough to break the reference cycle
between the removed menu item and the submenu that is attached to it.
Use gtk_widget_destroy() instead.

https://bugzilla.gnome.org/show_bug.cgi?id=710754
2013-10-25 10:03:00 -04:00
Bastien Nocera
d4c049059f GtkScrolledWindow: Disconnect from frame clock properly
The tick callback IDs from GtkWidget aren't timeouts, so
use the correct function to disconnect from them.

Spotted by Benjamin Otte <otte@redhat.com>

https://bugzilla.gnome.org/show_bug.cgi?id=710666
2013-10-23 15:24:37 +02:00
Bastien Nocera
2ca82e6ddf GtkWidget: Avoid lingering clock frame updates
For some widgets, like GtkTreeView, which setup a clock frame
update during realize, it was possible to call
gdk_frame_clock_begin_updating() twice, but only ever disconnecting
from it once. This happens because the realized flag is set at an
unpredictable time by the GtkWidget's realize implementation.

Keep the signal handler ID from us connecting to the "update" signal
to avoid connecting to it twice.

This fixes high wake-up count from any application using GtkTreeView,
even idle ones.

https://bugzilla.gnome.org/show_bug.cgi?id=710666
2013-10-23 15:24:32 +02:00
Matthias Clasen
2898b2bbd8 Bump version 2013-10-16 21:32:05 -04:00
Matthias Clasen
a411d6b199 3.8.6 2013-10-16 20:34:12 -04:00
Olivier Brunel
4c691ac8f8 tooltip: Fix possible wrong placement
When showing a tooltip on the edge of a monitor, the tooltip could be wrongly
placed and be shown going from one monitor to the next.

This happened because the current_window wasn't set visible, and when it wasn't
the returned allocated size would be 1, hence wrong calculations.

Signed-off-by: Olivier Brunel <jjk@jjacky.com>

https://bugzilla.gnome.org/show_bug.cgi?id=698730
2013-10-16 19:54:20 -04:00
Yosef Or Boczko
16be72eb13 Fix a warning
The PangoWrapMode enum has identical layout to GtkWrapMode,
but using the two interchangably causes (justified) compiler
warnings.

https://bugzilla.gnome.org/show_bug.cgi?id=709697
2013-10-16 19:54:06 -04:00
Matthias Clasen
4c796df901 Set an error when loading a GtkIconInfo fails
Failure to do so leads to assertion failures.
https://bugzilla.gnome.org/show_bug.cgi?id=710073
2013-10-16 19:53:33 -04:00
Matthias Clasen
fc4263535b Fix a crash in icon handling
The load_error was freed in two places.
Fix based on a patch in
https://bugzilla.gnome.org/show_bug.cgi?id=709967
2013-10-16 19:52:41 -04:00
Matthias Clasen
13a56fb3a2 Bump version 2013-10-10 20:16:12 -04:00
Matthias Clasen
5135522de6 3.8.5 2013-10-10 19:55:43 -04:00
Timothy Arceri
caadbdf630 Remove unused function
https://bugzilla.gnome.org/show_bug.cgi?id=586107
Signed-off-by: Timothy Arceri <t_arceri@yahoo.com.au>
2013-10-10 17:58:52 -04:00
Timothy Arceri
f6f23149a2 Remove a bunch of unused variables.
https://bugzilla.gnome.org/show_bug.cgi?id=586107
Signed-off-by: Timothy Arceri <t_arceri@yahoo.com.au>
2013-10-10 17:58:37 -04:00
Timothy Arceri
0bddd31389 Dont set enum to NULL fixes build issues on Solaris 10
https://bugzilla.gnome.org/show_bug.cgi?id=586107
Signed-off-by: Timothy Arceri <t_arceri@yahoo.com.au>
2013-10-10 17:58:31 -04:00
Timothy Arceri
4de2154368 Reorder message in configure.ac to display result on the same line
https://bugzilla.gnome.org/show_bug.cgi?id=341146

Signed-off-by: Timothy Arceri <t_arceri@yahoo.com.au>
2013-10-10 17:58:18 -04:00
William Jon McCann
84a651caf1 Fix typo in gtk-win32-base.css 2013-10-10 17:57:59 -04:00
Cosimo Cecchi
80aca3be77 entrycompletion: set the GtkWindow as attached to the GtkEntry
This way themes can easily select that window to apply custom styles.

https://bugzilla.gnome.org/show_bug.cgi?id=708414
2013-10-10 17:56:50 -04:00
Cosimo Cecchi
ce69a803a7 icontheme: use g_file_load_contents() for symbolic icons
When loading a symbolic icon, g_file_get_contents() is currently used
with the icon pathname, to load its SVG data. This won't work when the
icon is not a local file, for instance when a symbolic icon is loaded
from a GFileIcon with a GResource path.
Fortunately GtkIconInfo already holds a GFile, so we can just use
g_file_load_contents() to load the data instead.

https://bugzilla.gnome.org/show_bug.cgi?id=709056
2013-10-10 17:56:41 -04:00
Ryan Lortie
5e556d778a GtkTreeViewColumn: start padding at 0
If we start with a padding of -1 then it can leak out of the size
allocation request for the column when the treeview is empty.  The
GtkTreeView will then collect these -1 values and add them together,
returning -n where 'n' is the number of columns.

This is usually not a problem because treeviews tend to be used with a
scrollbar and the width of the scrollbar will be added to this number
bringing it into positive territory again.  On Ubuntu, with overlay
scrollbars, this is not the case, however.

https://bugzilla.gnome.org/show_bug.cgi?id=703062
2013-10-10 17:55:28 -04:00
Philip Chimento
5b2e44fd44 Don't activate GtkExpander if mouse dragged away
Previously, when you clicked and held the button down on a
GtkExpander's label or disclosure triangle, then moved the mouse
away and released the button, the expander would still activate.
This brings the behavior in line with the more generally expected
behavior, as exhibited by GtkButton for example.

https://bugzilla.gnome.org/show_bug.cgi?id=706345
2013-10-10 17:53:43 -04:00
Matthias Clasen
124e43d078 Clarify GtkH/VBox documentation
Make it clearer that GtkBox still has uses.

https://bugzilla.gnome.org/show_bug.cgi?id=706269
2013-10-10 17:53:28 -04:00
Murray Cumming
2f66920b54 GtkWidget: Improve drag-leave and drag-data-received docs.
* gtk/gtkwidget.c: drag-leave signal: Document that it is called before
      drag-drop.
      drag-data-received signal: Document that it is up to the application
      to know why the data was requested (e.g. drag motion or drop).
    * demos/gtk-demo/toolpalette.c: interactive_canvas_drag_drop():
      Do not transform the drop_item created in the drag-motion handler.
      Instead caused drag-data-received to be called, remembering why,
      and create a new item there.
      interactive_canvas_drag_leave(): Remove the idle-handler hack,
      now that we do not need to keep the drag-motion drop_item alive until
      the drop.

I noticed that this patch was sitting in bug #605611 from 2009
though it had been approved. I do not remember much about why I
created it.
2013-10-10 17:52:34 -04:00
Carlos Garcia Campos
41ba15bbf2 gdkdisplay-x11: Do not pass a NULL source device to _gdk_display_device_grab_update
Pass the master device instead if the last slave is NULL. This is
unlikely to happen in most of the cases, but can happen when running
unit tests where there's no pointer interaction to update the last
slave.

https://bugzilla.gnome.org/show_bug.cgi?id=696756
2013-10-10 17:52:20 -04:00
Sébastien Wilmet
1e80b89c9c Improve doc of gtk_text_buffer_paste_clipboard()
It didn't explain the behavior when there is a non-empty buffer
selection.

https://bugzilla.gnome.org/show_bug.cgi?id=339539
2013-10-10 17:51:54 -04:00
Sébastien Wilmet
28baa6de5a textbuffer: add unit tests for the clipboard
It tests gtk_text_buffer_paste_clipboard(),
gtk_text_buffer_copy_clipboard() and gtk_text_buffer_cut_clipboard() in
various situations, including when GtkTextTags are applied to the
selection.

The last test didn't pass.

https://bugzilla.gnome.org/show_bug.cgi?id=339539
2013-10-10 17:51:46 -04:00
Sébastien Wilmet
a50151e0df textbuffer: fix selection replacement when pasting
It is more logical to first delete the selection and then pasting the
text. When the selection and the text contain tags, the new behavior is
more natural.

A segfault in paste_from_buffer() is also avoided. The segfault occurs when
the text to paste is deleted because it is the selection.

https://bugzilla.gnome.org/show_bug.cgi?id=339539
2013-10-10 17:51:34 -04:00
Alejandro Piñeiro
fe45e8c048 a11y: Remove default description from GtkSwitch
https://bugzilla.gnome.org/show_bug.cgi?id=707926
2013-10-10 17:50:23 -04:00
Alejandro Piñeiro
bb1d313dfe a11y: not using default name for switch
A proper name or label is required. In the same way, if the
widget is labelled, ATs uses to expose both the label and the
name, making the final output not really user-friendly.

https://bugzilla.gnome.org/show_bug.cgi?id=707872
2013-10-10 17:50:03 -04:00
Behdad Esfahbod
f68ad7b45a [gdkcairo] Fix color premultiplication
https://bugzilla.gnome.org/show_bug.cgi?id=513812
2013-10-10 17:45:57 -04:00
Jasper St. Pierre
d16b9f99eb gdkframeclockidle: Add explicit fallthrough markers
So people reading the code don't get confused.
2013-10-10 17:44:57 -04:00
Mike Gorse
b4e4e211a6 a11y: Check whether a widget is mapped before querying its parent
Call gtk_widget_get_mapped() in a couple of places before looking at the
widget's parent, since it might be set to a widget that has been
finalized, causing an invalid read.
2013-10-10 17:44:27 -04:00
Bastien Nocera
0764f75dee icon-theme: Fix 2 memory leaks in GtkIconInfo
https://bugzilla.gnome.org/show_bug.cgi?id=709264
2013-10-02 17:18:29 +02:00
Bastien Nocera
ad29977bf7 icon-theme: Use g_clear_* helpers in finalize
https://bugzilla.gnome.org/show_bug.cgi?id=709264
2013-10-02 17:18:11 +02:00
Piotr Drąg
0f661e1458 Import po-properties/gd.po from master
You can't have po/gd.po without po-properties/gd.po, because it
breaks the build.
2013-09-23 00:38:05 +02:00
GunChleoc
9000fa1f81 Added Scottish Gaelic translation 2013-09-20 12:01:05 -06:00
Matej Urbančič
2553ab21ee Updated Slovenian translation 2013-09-01 20:17:28 +02:00
Matej Urbančič
ce9680fab3 Updated Slovenian translation 2013-08-31 09:07:11 +02:00
Matej Urbančič
86f17b3a17 Updated Slovenian translation 2013-08-30 22:10:41 +02:00
Matthias Clasen
f09b01dd19 bump version 2013-08-30 10:08:16 -04:00
Matthias Clasen
a1b4c09901 Remove unintentional use of GLib 2.37 apis 2013-08-30 09:32:59 -04:00
Matthias Clasen
1351ad0e62 Bump version 2013-08-30 09:01:12 -04:00
Matthias Clasen
125263713b 3.8.3 2013-08-30 08:37:55 -04:00
Matthias Clasen
03058dd76a Fix make check 2013-08-30 08:14:59 -04:00
Carlos Garcia Campos
be41057a74 iconview: Respect the fixed item width when adjusting the wrap width
Restore the code the way it was in GTK2.

https://bugzilla.gnome.org/show_bug.cgi?id=680953
2013-08-30 07:10:17 -04:00
Matthias Clasen
876d5f0748 Fix keyboard activation of menu buttons
Keyboard activation relies on the menu not being visible,
so ensure that it isn't when the menu is attached.

Problem tracked down by Vincent Le Garrec,
https://bugzilla.gnome.org/show_bug.cgi?id=688738
2013-08-30 07:10:17 -04:00
Stef Walter
6279b6125a window: Some protection against nested set_focus() calls
Since set_focus() can triger events, have a check to make
sure state is still valid before firing is-focus signal.

https://bugzilla.gnome.org/show_bug.cgi?id=706152
2013-08-30 07:10:17 -04:00
Matthias Clasen
ad5889690a Make symbolic icons work with the current rsvg
The rsvg loader now restricts what external files it will
allow to load from an svg. Thus our xinclude trick doesn't work
anymore. To work around that, embed the payload in a  data: uri.
This is somewhat ugly, but the best we could come up with.
2013-08-30 07:10:17 -04:00
Matthias Clasen
785cba1e7b GtkSpinButton: disconnect signals in the accessible
Just as for GtkRangeAccessible, we were not even trying to disconnect
the signal handler from the adjustment. The same fix works here:
override the widget_set and widget_unset vfuncs.

https://bugzilla.gnome.org/show_bug.cgi?id=705692
2013-08-30 07:10:17 -04:00
Matthias Clasen
b355a88456 GtkRange: disconnect signals in the accessible
We were only disconnecting the signal in finalize, when
the widget was already unset. Instead, override the widget_set
and widget_unset vfuncs of GtkAccessible, and keep a reference
to the adjustment.

https://bugzilla.gnome.org/show_bug.cgi?id=705692
2013-08-30 07:10:17 -04:00
Matt Barnes
463d12cfcd GtkApplication: Do not assert sm_proxy != NULL in inhibit functions
Applications have no way of finding out if a session manager proxy was
successfully created in gtk_application_startup_session_dbus(), so it's not
appropriate for certain public GtkApplication functions to be asserting the
presence of a session manager proxy as if it were a programmer error.

This affects:

   gtk_application_inhibit()
   gtk_application_is_inhibited()

If sm_proxy is NULL, the function should just return silently.

In the case of gtk_application_uninhibit(), the application should only be
calling this if it obtained a valid cookie, which implies the presence of a
session manager proxy.  I noted that with a comment.

https://bugzilla.gnome.org/show_bug.cgi?id=701365
2013-08-30 07:10:17 -04:00
Matthias Clasen
727182f0f9 Avoid integer overflow
Use g_malloc_n in gdk_cairo_set_source_pixbuf when allocating
a large block of memory, to avoid integer overflow.

Pointed out by Bert Massop in
https://bugzilla.gnome.org/show_bug.cgi?id=703220
2013-08-30 07:10:17 -04:00
Matthias Clasen
3d5e50daa2 GdkScreenX11: Dispose visuals
If we let them hold onto their X resources until finalize,
it is too late.
2013-08-30 07:10:17 -04:00
Matthias Clasen
a27d2413aa GdkVisualX11: Add a dispose implementation
We need to be able to drop X resources before finalization.
2013-08-30 07:10:17 -04:00
Matthias Clasen
b613e3a1e0 GdkDeviceManagerXI2: chain up in constructed
Dispose does chain up, and the parent class' dispose expects
that the object has been fully constructed.
2013-08-30 07:10:17 -04:00
William Jon McCann
641a0ad8a8 Add missing allow-none annotations 2013-08-30 07:10:16 -04:00
John Lindgren
72b0bcbad5 Optimize gdk_x11_screen_supports_net_wm_hint()
Move the call to gdk_x11_atom_to_xatom_for_display() outside of the
search loop in gdk_x11_screen_supports_net_wm_hint().  In my test case
(running Audacious for about a minute), this reduced the total number of
hash table lookups performed from 370,000 to 230,000.

https://bugzilla.gnome.org/show_bug.cgi?id=702913
2013-08-30 07:10:16 -04:00
Jonh Wendell
d7798950ed GtkEntry: ellipsize placeholder text
The placeholder string is truncated when there's no
room for it in entry's width.

So, by ellipsizing it, the user can notice the text
was truncated so that they can workaround that by,
for example, maximizing the window.

https://bugzilla.gnome.org/show_bug.cgi?id=702763
2013-08-30 07:10:16 -04:00
Benjamin Otte
287464a64a cssimage: Add forgotten line
That line was already missing in the initial commit it seems.
2013-08-30 07:10:16 -04:00
Matthias Clasen
1add0e3f2a Fix anonymous assistants
GtkAssistant supports not showing the sidebar with the page
titles (if the page have no titles). Unfortunately, we were
hiding the sidebar in this case, but still rendering the frame
behind it, leading to a broken appearance.
2013-08-30 07:10:16 -04:00
Ek Kato
aaf32faedc Fix missing return from quartz_filter_keypress
(cherry picked from commit 0ae728e242)
2013-08-29 14:12:52 -07:00
Ek Kato
f2e7bce43a Bug 705750 Quartz input method doesn't work correctly for Chinese characters
Modified from original for Gtk3.

(cherry picked from commit bc35d5d166bcc4ec8ac074b792cc88f4f98c282e)
2013-08-16 11:18:11 -07:00
Cody Russell
e6dc6382c7 Fix a crasher that was introduced by 9ca802161e
due to preedit_str being initialized as an empty string rather than NULL.
2013-08-15 15:11:11 -05:00
Michael Hutchison
7e4ce73751 Bug 705182 Reset Cocoa IME state when immodule is reset
Commits the pre-edit string on receipt of focus_out and reset
commands.
Patch refinements by Cody Russell <bratsche@gnome.org> and
Ek Kato <ek.kato@gmail.com>

(cherry picked from commit e8b6b806250c1f958c33920c60ed41ab88016767)
2013-08-15 10:00:46 -07:00
Ek Kato
4ded4549f1 Bug 705181 Annoying beep on arrow keys
Original patch was a bit excessive, just needed to not forward the command.

(cherry picked from commit 40c429c2cb)
2013-08-13 11:35:22 -07:00
John Ralls
daee40abef Bug 701571 NSApp doesn't notice NSWindow destruction
Part 1 of the fix; part 2 awaits Glib developer approval (see
https://bugzilla.gnome.org/show_bug.cgi?id=704374) and is more
correctly associated with
https://bugzilla.gnome.org/show_bug.cgi?id=674108

(cherry picked from commit ccc30ea91966d0ec048a20530c892dfcace96b2b)
2013-08-10 14:22:01 -07:00
Daniel Sabo
db71def54a Reset cursor when mouse leaves a toplevel window.
Fixes https://bugzilla.gnome.org/show_bug.cgi?id=692548
2013-08-08 09:39:28 -05:00
Ryan Lortie
1e93ed9630 gtkicontheme: check for GdkPixbuf first
We checked for G_IS_LOADABLE_ICON() before GDK_IS_PIXBUF().

Since we made GdkPixbuf implement GLoadableIcon, the special case for
pixbufs is never used, and the much much slower GLoadableIcon path is
taken instead.  Move the GdkPixbuf one to be first to fix that.

https://bugzilla.gnome.org/show_bug.cgi?id=705320
2013-08-02 15:05:06 +02:00
Michael Hutchinson
205c4288a4 Bug 705181: Fix annoying beeping introduced by Mac IME
NSTextInputClient should not chain unhandled commands to super

(cherry picked from commit 91bcca6f39)
2013-07-30 17:28:10 -07:00
Matthias Clasen
3c58485a7f X11: Fix the cut-off for too large windows
We can only handle 2^15-1 pixels, not 2^16-1.
Pointed out by Morten Welinder.

https://bugzilla.gnome.org/show_bug.cgi?id=698758
2013-07-29 20:53:55 -04:00
Ek Kato
8a98feef19 Bug 701332 - Patch for minor glitch in NSTextInput
(cherry picked from commit 43ed68aa33)
2013-07-27 14:28:23 -07:00
Takuro Ashie
4249d6e931 imquartz: Fallback to slave IM context if no NSEvent exists.
When an application translates a key event and drop its native event
before passing to imquartz, it can't recognize the NSEvent. On this
case imquartz doesn't emit any signals such as "commit" signal so
that the application doesn't insert any text. To avoid no response,
at least imquartz should fallback to slave GtkIMContextSimple.

https://bugzilla.gnome.org/show_bug.cgi?id=694273#c27
(cherry picked from commit c064e18894)
2013-07-27 14:28:12 -07:00
Owen W. Taylor
e061305d61 Disable frame sync for GtkPlug
Plug windows weren't redrawing properly because the embedded
window was expecting to get messages for each frame from the
compositor, but the compositor doesn't know about embedded
windows. Simply disable frame sync for GtkPlug's GdkWindow -
extending XEMBED to handle frame sync isn't interesting
at this point.

A new API gdk_x11_window_set_frame_sync_enabled() is added
to allow this to be done.

https://bugzilla.gnome.org/show_bug.cgi?id=701613
2013-07-22 18:38:27 -04:00
Jehan
81f06e1749 gtkdialog - more informative warning when ordering unexisting response_id
(cherry picked from commit 0e4d9b7793)
2013-07-21 21:46:01 +09:00
Carlos Garnacho
c65c217741 quartz: Fix call to missing symbol
This patch can be considered a leftover of commit 12ffae5,
replace the no longer existing function with the GDK function
meant to replace it.

This was noticeable on regular clipboard operations in quartz
Cherry-picked from 7ffcd85.
2013-07-02 11:38:07 -07:00
Emilio Pozuelo Monfort
bd3f7f0619 menushell: don't activate a menu entry when opening a big menu
If a menu is opened and it doesn't fit entirely below or above
the menu bar, gtk+ will place it on top. The button release will
then activate the popup item that happens to appear under the
cursor. Avoid this by ignoring release events if they originated
in the parent menu bar and the duration of the press was too short.

https://bugzilla.gnome.org/show_bug.cgi?id=703069
2013-06-27 20:20:24 +02:00
Federico Mena Quintero
22ca91ffae GtkFileChooserButton: Also emit 'file-set' when changing the selection through the combo box
https://bugzilla.gnome.org/show_bug.cgi?id=696498
2013-06-21 19:17:35 -05:00
Federico Mena Quintero
5aae1eadb7 GtkFileChooserEntry: don't inline-complete if the entry doesn't have the focus
When the file chooser changes directories, it tells the GtkFileChooserEntry to
change its base folder (i.e. the folder from which relative pathnames are resolved).
GtkFileChooserEntry then starts loading a GtkFileSystemModel asynchronously.
In the finished_loading_cb(), however, it would always ask the GtkEntryCompletion
to insert the completion prefix, since that finished_loading_cb() is what is also used
while the user is typing *in the entry*.

But when the entry doesn't have the focus (e.g. the user changed directories by double-clicking
on the file list in the file chooser), there's no reason to insert completions at all.

https://bugzilla.gnome.org/show_bug.cgi?id=672271
Signed-off-by: Federico Mena Quintero <federico@gnome.org>
2013-06-21 19:05:35 -05:00
Michael Natterer
f04fe99deb quartz: remove check for keymap changes from update_keymap()
The function is now only called when the keymap has actually
changed. bug #698183.
(cherry picked from commit e5e17cf361)
2013-06-20 17:29:26 +02:00
Michael Natterer
7b08ca94cc quartz: update the keymap only if the input method changed
and not on each keystroke, which for some IMs apparently caused a full
update on each keystroke, not just a check for changes. Patch from
Takuro Ashie, bug #698183.

(cherry picked from commit bbe3554fa9)
2013-06-20 17:10:06 +02:00
Alexander Larsson
4932d44b9e IconTheme: Move changed emission to an idle
By delaying the emission to an idle we avoid a lot of tricky
reentrancy issues. For instance, a normal gtk_icon_theme_choose_icon()
call could in very rare cases (when a user updated an icon theme) emit
a signal which could affect the icon currently being looked up.  This
kind of reentrancy is very hard to test against, especially when it is
so rare, so we're better of avoiding it.

There is no real value to get the change signal directly anyway. All
it can do is affect which icon is rendered the next frame, and we will
handle the queued emission before rendering. Not to mention that icon
theme change detection is polled anyway, so it is already delayed.

https://bugzilla.gnome.org/show_bug.cgi?id=694755
(cherry picked from commit 159cccfe7b)
2013-06-19 11:16:27 +02:00
Alexander Larsson
b4244b734e IconTheme: Clear caches when reloading theme
When we're reloading the theme in ensure_valid_themes (due to noticing
that a theme dir has changed) we need to also clear the icon cache
as it will not be valid for the new theme.

We already do this in do_theme_change(), but ensure_valid_themes()
was missing this.

https://bugzilla.gnome.org/show_bug.cgi?id=702598
(cherry picked from commit 1ee36713fe)
2013-06-19 10:15:15 +02:00
Alexander Larsson
b489d20ac4 IconCache: Keep a ref on the GtkIconData
The icon data in GttkIconInfo->data is currently owned by the
IconThemeDir->icon_data hashtable. However, on e.g. a theme change
blow_themes() destroys the dirs and thus the data, meaning any
outstanding GtkIconInfo points to stale data.

We solve this by adding a refcount to GtkIconData and reffing it
from GtkIconInfo.

https://bugzilla.gnome.org/show_bug.cgi?id=702598
(cherry picked from commit 280d606cd4)
2013-06-19 10:15:13 +02:00
Michael Natterer
044e34b34f quartz: move dialogs to the same window level as utility windows
window_type_hint_to_level(): applied patch from Paul Davis which moves
dialogs to NSFloatingWindowLevel. This is not quite the perfect
solution, but it's a pragmatic fix that makes apps which have both
window types much more usable, and prevents dialog from disappearing
under an application's main window.
(cherry picked from commit 59d49e1566)
2013-06-06 15:49:55 +02:00
Marek Kasik
8dee19fca8 printing: Show correct status of a job
"job-state" is IPP_TAG_ENUM not IPP_TAG_INTEGER.
2013-06-06 11:10:49 +02:00
YunQiang Su
30782e26a9 fix a typo in zh_CN translation 2013-06-06 11:02:29 +08:00
Scott Moreau
f9dd457b25 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>

Cherry picked to fix: https://bugzilla.gnome.org/show_bug.cgi?id=701341
2013-05-31 15:26:16 +01:00
Chun-wei Fan
29f453b975 Update Visual Studio 2010 Property Sheets
Remove quotes that aren't really needed
2013-05-31 13:10:39 +08:00
Benjamin Otte
18190f6dba window: Call size_allocate() to allocate a size
Don't call gtk_container_resize_children().

https://bugzilla.gnome.org/show_bug.cgi?id=700185
2013-05-30 20:05:05 +02:00
Rafael Ferreira
eadbb077a5 Updated Braziliana Portuguese translation for Gtk-UI 2013-05-30 05:01:10 -03:00
Xavier Claessens
074585b3e3 GtkMenuItem: Take padding into account to position submenu arrow
Since commit a69619edbc, it not
possible anymore for the style to add space between the border
and the arrow.

https://bugzilla.gnome.org/show_bug.cgi?id=700779
2013-05-29 14:55:27 +02:00
Colin Walters
a3864ac49f modules/input: Only build quartz module if we're targeting quartz
Otherwise the build is broken on GNU/Linux and Win32.
2013-05-21 18:44:05 -07:00
Rafael Ferreira
e77f16e54c Updated Brazilian Portuguese translation 2013-05-21 02:28:45 -03:00
John Ralls
948767960f Bug 667759 - gtkdnd-quartz.c is missing annotations for introspection
Work around this by introspecting gtkclipboard.c and gtkdnd.c instead
of the quartz alternatives.

Note that this is temporary: The implementation of GdkSelection
will make the quartz alternatives unnecessary. See bug 571582.
2013-05-20 15:45:27 -07:00
John Ralls
5753f69b68 Bug 691921 - GTK+ built on Leopard references [NSMenu removellItems]
Test it with respondsToSelector, and if it isn't available delete the
items one at a time.
2013-05-20 15:20:29 -07:00
E. K. Kato
5680244e8f Bug 694273 - Patch to support NSTextInputClient in text widgets
Provides an input module for native OSX input methods.
Based on a patch by Hiroyuki Yamamoto
(http://www.sraoss.jp/sylpheed/sylpheed/macosx/gtk+-2.24.0-macosx-textinputclient_ja-test1.patch).
Adjustments for Gtk3 by Matthew Francis <gnomebugs@newsheffield.co.uk>
2013-05-20 11:04:05 -07:00
Bastien Nocera
eb899ebbf8 GtkSwitch: Don't handle events from extra mouse buttons
Also use GDK_EVENT_{STOP,PROPAGATE} to make return
values clearer.

https://bugzilla.gnome.org/show_bug.cgi?id=696640
2013-05-18 14:51:07 +02:00
Bastien Nocera
2b91f5de30 GtkButton: Don't suppress unhandled mouse events
Mouse events that we do not handle should bubble up to the parent
widget, so they can be handled there, instead of disappearing inside
the button. Also use GDK_EVENT_{STOP,PROPAGATE} to make return
values clearer.

https://bugzilla.gnome.org/show_bug.cgi?id=696640
2013-05-18 14:51:01 +02:00
Matthias Clasen
828f9eb1e7 Bump version 2013-05-13 08:02:13 -04:00
Matthias Clasen
231d6c209f 3.8.2 2013-05-13 06:24:44 -04:00
Kjartan Maraas
662e718631 Updated Norwegian bokmål translation 2013-05-13 11:16:22 +02:00
Kjartan Maraas
0fee20071c Updated Norwegian bokmål translation 2013-05-13 09:38:51 +02:00
Bastien Nocera
2f1d718e13 Fix accels added after the window was shown not working
GtkApplicationWindow would only update its list of captured accels
when realizing the window. This meant that keyboard shortcuts added
after the window was realised (for example, added by plugins) would
be non-functional.

Solve this by updating our accels every time the accel map changes,
not only when realizing the window.

https://bugzilla.gnome.org/show_bug.cgi?id=700079
2013-05-13 08:57:37 +02:00
Matthias Clasen
650da1e6b0 Improve sensitivity handling in filechooser context menu
Items that act on the selection should not be sensitive if the
selection is empty. This was already the case for the 'Copy file
location' item, but not for the 'Add bookmark' and 'Visit file'
items.
https://bugzilla.gnome.org/show_bug.cgi?id=699104
2013-05-12 23:10:15 -04:00
Carlos Garnacho
8ae3bae9a9 Find tooltip/dnd widget running through container children in inverse order
Usually, educated GtkContainers' forall() implementation returns children
in an order that's safe for the default draw() implementation in GtkContainer.
So for widgets with some stacking notions (eg. GtkOverlay),
_gtk_widget_find_at_coords() needs to recurse within containers in reverse
order so it finds the topmost widget.

As this function is used in both tooltips and DnD code, this improves behavior
of "floating" widgets wrt those two. This could for example be seen in the
"Transparent" GTK+ demo, where dropping text on the entry results on the text
going to the textview.

https://bugzilla.gnome.org/show_bug.cgi?id=699239
2013-05-12 22:55:09 -04:00
Sébastien Wilmet
8368b12b61 Doc: various small fixes
https://bugzilla.gnome.org/show_bug.cgi?id=700007
2013-05-12 22:54:45 -04:00
Sébastien Wilmet
fecd632e57 gtktextchild: replace hard-coded values by a macro
The macro already exists, so it's better to use it.

https://bugzilla.gnome.org/show_bug.cgi?id=700007
2013-05-12 22:54:33 -04:00
Tristan Van Berkom
945e5bd859 GtkComboBoxText: Improved GtkBuildable documentation.
Also removed a bogus FIXME comment which might have been true
a long time ago. Clarification: the "domain" attribute specified
in the builder script overrides any domain previously set with
gtk_builder_set_translation_domain(), so the translation of items
here is perfectly correct and does not need to be fixed.
2013-05-12 22:54:21 -04:00
Yuri Myasoedov
16f3b2f5c8 Updated Russian translation 2013-05-12 12:45:51 +04:00
Matthias Clasen
c3852404e6 GtkWindow: default size is only for initial map
Bring back need_default_size. We need it to preserve this
documented behavior:

The default size of a window only affects the first time a window is
shown; if a window is hidden and re-shown, it will remember the size
it had prior to hiding, rather than using the default size.

With this patch, all of the window sizing tests in
gtk/tests/window pass again.
2013-05-11 18:45:27 -04:00
Matthias Clasen
6bf7af2a46 Add more window-size related tests 2013-05-10 13:53:31 -04:00
Matthias Clasen
0c1fd574b0 Remove gtk_widget_size_allocate from gtk_menu_popup_for_device
GtkMenu calls gtk_widget_size_allocate on its GtkWindow during
gtk_menu_popup_for_device if the menu has not been realised. This can cause the
allocation of the GtkWindow and the size of the GdkWindow to become out of sync
because a top level GtkWindow does not attempt to re-size the GdkWindow when
its allocation is set.
https://bugzilla.gnome.org/show_bug.cgi?id=695120
2013-05-09 13:03:42 -04:00
Ryan Lortie
6ff37b070b GtkCheckMenuItem: remove an unused boolean field
always_show_toggle was always set to TRUE in _init() and never changed
from anywhere else.  Remove it and remove the if() statements based on
it.

https://bugzilla.gnome.org/show_bug.cgi?id=699929
2013-05-09 13:03:34 -04:00
Matthias Clasen
5f9c83da83 Fix a typo
Pointed out in bug
https://bugzilla.gnome.org/show_bug.cgi?id=698051
2013-05-09 13:03:28 -04:00
Marek Kasik
7e86d69854 printing: Don't crash when printer-state-message not provided
Check whether "printer-state-message" was returned before its
usage.

https://bugzilla.gnome.org/show_bug.cgi?id=699750
2013-05-09 15:15:21 +02:00
Matthias Clasen
52decc32fe Add window sizing tests
These are copied from master
2013-05-08 10:22:15 -04:00
Matthias Clasen
bb8254877b Make key themes work again
This was inadvertedly broken in commit
44ba5d253f.
Thanks to Matthew Francis for tracking this down and providing
a fix in https://bugzilla.gnome.org/show_bug.cgi?id=699901
2013-05-08 10:22:15 -04:00
Jiro Matsuzawa
1a3ec8e98d l10n: Update Japanese translation 2013-05-08 21:01:13 +09:00
Jiro Matsuzawa
f35fb0c661 l10n: Update Japanese translation
Merge the latest pot.
2013-05-08 20:59:25 +09:00
Hib Eris
4380ce8495 Revert "Don't build gtk-launch when gio-unix is not available"
The gtk-launch tool can be build without gio-unix (although it
will not really do much without an alternative implementation for
g_desktop_app_info).

So there is no need to not build gtk-launch anymore.

This reverts commit 9a1235bf0d.

https://bugzilla.gnome.org/show_bug.cgi?id=682824
2013-05-01 07:44:53 +02:00
Milo Casagrande
5b74700608 [l10n] Updated Italian translation. 2013-04-30 19:22:12 +02:00
Milo Casagrande
c00b2ead83 [l10n] Updated Italian translation. 2013-04-29 23:00:27 +02:00
Žygimantas Beručka
ca01f7c042 Updated Lithuanian translation 2013-04-28 13:24:23 +03:00
Mario Blättermann
cc9928065b Updated German translation 2013-04-27 22:30:55 +02:00
Rafael Ferreira
f7ecc91327 Updated Brazilian Portuguese translation 2013-04-23 05:09:46 -03:00
Rafael Ferreira
0ce7854a3c Updated Brazilian translation for UI and PO-Prop. 2013-04-22 04:58:51 -03:00
Tristan Van Berkom
fc9c5228d3 Revert "gtkbin: Remove the silliest code on earth"
This reverts commit f4438a1ffc.

The calculation of the delta between parent and child widget
is required in order to automate height-for-width and width-for-height
requests for various GtkBin widgets.

GtkButton, GtkCheckButton, GtkRadioButton, etc, all have different
requests for space around the content which can not be satisfied
with a simple calculation of GtkContainer border-width.
2013-04-22 15:20:33 +09:00
P. F. Chimento
87869d1442 doc: Documented icon-shadow CSS property
The docs say that text-shadow applies a drop shadow to both text
and icons, but icons need to use the icon-shadow property.

https://bugzilla.gnome.org/show_bug.cgi?id=698181
2013-04-19 10:32:45 -04:00
Matthias Clasen
f833d84be1 Fix mouse interaction in combo cell renderer
Pass the event on when calling gtk_cell_editable_start_editing.
https://bugzilla.gnome.org/show_bug.cgi?id=504901
2013-04-19 10:32:38 -04:00
Matthias Clasen
0c9946631a 3.8.1 2013-04-15 13:43:16 -04:00
Carlos Garnacho
8e56a80972 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-15 11:01:43 +02:00
Alban Browaeys
c6a4065c5a print: disconnect source_changed_handler on printeroptionwidget finalize
Printing a web page without window.print (which still segfault),
that is Ctrl+P is fixed (does not attempt to execute the
source_changed_handler on a printeroptionwidget that has been
destroyed) by disconnecting this handler in the printeroptionwidget
finalize.

https://bugzilla.gnome.org/show_bug.cgi?id=696622
2013-04-14 20:20:49 -04:00
Volker Sobek
03b60f94c0 gtk-demo: Fix typo
https://bugzilla.gnome.org/show_bug.cgi?id=675649
2013-04-14 09:04:39 -04:00
Carlos Garcia Campos
9de7b8af49 gtkprintjob: release the surface and backend before the output io channel
If the GtkPrintJob is freed too early when the surface has been created
but the job hasn't been sent to the printer, it's possible that the
file print backend tries to write to the io chaneel when it is already
closed. This produces runtime critical warnings:

GLib-CRITICAL **: g_io_channel_write_chars: assertion `channel->is_writeable' failed

https://bugzilla.gnome.org/show_bug.cgi?id=685420
2013-04-14 12:20:43 +02:00
Carlos Garcia Campos
b81117479b gtkprintbackendfile: Fix infinite loop in _cairo_write()
It can happen if the io channel has been closed. In that case
g_io_channel_write_chars() returns early because of a g_return macro
that checks if the io channel is writable. When returning from g_return
macros, the bytes written output parameter is not updated and the error
is not filled, so the error is not detected and the written variable is
used uninitialized. We should check the return value of
g_io_channel_write_chars() to break the loop.

https://bugzilla.gnome.org/show_bug.cgi?id=685419
2013-04-14 12:20:36 +02:00
ammonkey
fff0358261 fix mem leak in gtk_drag_set_icon_surface, destroy pattern
https://bugzilla.gnome.org/show_bug.cgi?id=681446
2013-04-13 20:07:51 -04:00
Matthias Clasen
e08c1f5849 Precache more atoms
Add a few more entries to the list of precached atoms.
2013-04-13 20:07:42 -04:00
Matthias Clasen
7106f426bb Revert "Use natural size to set adjustment ranges"
This reverts commit 666d10ec76.

This change severely broke any treeviews without horizontal
scrollbars. Basically, ellipsization never kicks in, and instead
the treeview content just extends outside the visible area,
rendering it inaccessible. This broke e.g. the control-center
keyboard shortcuts panel, the gnome-disks device list, etc etc.
2013-04-13 16:26:34 -04:00
Dušan Kazik
86392ca3d6 Updated slovak translation 2013-04-12 21:26:29 +02:00
Nik Kalach
0077c2ac5a [l10n] Update Interlingua translation 2013-04-09 16:51:25 +02:00
Benjamin Otte
6fad3b1b0d 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:23:36 +02:00
Benjamin Otte
d9a6214725 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:23:31 +02:00
Benjamin Otte
b708fc4c14 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:23:27 +02:00
Benjamin Otte
e64e81bcf4 docs: Fix Since tag for frame clock functions 2013-04-09 12:23:21 +02:00
Benjamin Otte
38b62e4660 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-09 12:23:15 +02:00
Benjamin Otte
d0699235bf 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-09 12:23:08 +02:00
Bruce Cowan
a7dae64d59 Updated British English translation 2013-04-06 17:13:34 +01:00
Aron Xu
8c42e760bf Update Simplified Chinese translation 2013-04-06 22:27:33 +08:00
Wylmer Wang
e3c46cd253 Update Simplified Chinese translation 2013-04-06 22:19:15 +08:00
Gheyret Kenji
bf28168d42 Updated Uyghur translation
Signed-off-by: Gheyret Kenji <gheyret@gmail.com>
2013-04-06 18:21:55 +09:00
Shankar Prasad
78f02cc5b6 Updated kn translations 2013-04-06 00:24:14 +05:30
Shankar Prasad
afadd23d0a Updated kn translations 2013-04-05 21:14:42 +05:30
Shankar Prasad
51a0f35d83 Updated kn translations 2013-04-05 21:14:42 +05:30
Alexander Larsson
e9848b7db4 broadway: Unsure we clear the grab on window hide 2013-04-05 17:06:47 +02:00
Alexander Larsson
ee4c1ded51 broadway: Fix warning
Don't pass NULL source_device in grab/ungrab events
2013-04-05 17:06:47 +02:00
Shankar Prasad
2e6697b588 Updated kn translations 2013-04-05 19:22:07 +05:30
Shankar Prasad
49c9db74b4 Updated kn translations 2013-04-05 17:51:00 +05:30
Balázs Úr
0ba7d68d50 Updated Hungarian translation 2013-04-04 21:53:17 +02:00
Alexander Larsson
0104f5c1bd 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:41:02 +02:00
Alexander Larsson
db98346844 broadway: Ensure we allocate shm surface space early
This is nicer then getting random sigbus later
2013-04-03 15:58:05 +02:00
Alexander Larsson
2c552820dc 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:57:58 +02:00
Alexander Larsson
4d24c714c0 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:57:52 +02:00
Kjartan Maraas
ed548bac49 Updated Norwegian bokmål translation 2013-04-03 11:54:20 +02:00
Cosimo Cecchi
66b0b287f1 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 16:52:09 -04:00
Cosimo Cecchi
4a8203abff 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 16:52:09 -04:00
Cosimo Cecchi
1b3f5d39a2 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 16:52:09 -04:00
Cosimo Cecchi
a101e85931 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 16:52:08 -04:00
Wojciech Szczęsny
f08c27542b Updated Polish translation 2013-04-02 16:05:11 +02:00
Alexander Larsson
cdc93acb25 broadway: Use wss: on https: uris 2013-04-01 17:29:43 +02:00
Ville-Pekka Vainio
255511a44b Finnish translation update by Jiri Grönroos 2013-03-31 20:17:23 +03:00
Carles Ferrando
d150a9f887 [l10n] Updated Catalan (Valencian) translation 2013-03-31 17:03:50 +02:00
Carles Ferrando
c0e374dbbd [l10n] Updated Catalan (Valencian) translation 2013-03-30 16:23:25 +01:00
Pau Iranzo
6238ed3c97 [l10n] Update Catalan translation 2013-03-30 16:22:56 +01:00
Matej Urbančič
7caa7aa6aa Updated Slovenian translation 2013-03-30 11:33:21 +01:00
Matej Urbančič
05137833af Updated Slovenian translation 2013-03-30 11:17:13 +01:00
Matej Urbančič
5240cc79db Updated Slovenian translation 2013-03-30 11:12:18 +01:00
Matej Urbančič
e292243e9a Updated Slovenian translation 2013-03-30 11:06:20 +01:00
Matej Urbančič
72abb9ea1e Updated Slovenian translation 2013-03-30 10:57:41 +01:00
Matej Urbančič
9244c8e74a Updated Slovenian translation 2013-03-30 10:55:18 +01:00
Matej Urbančič
f93f666446 Updated Slovenian translation 2013-03-30 09:42:45 +01:00
Andika Triwidada
f7bbbd51bf Updated Indonesian translation; minor fixes on source references 2013-03-30 13:03:41 +07:00
Alexander Larsson
03bb44ae2f 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:10:27 +01:00
Alexander Larsson
468daefa21 broadway: Move surface open to server
This way we can cache the last opened surface
2013-03-29 14:10:27 +01:00
Alexander Larsson
4e997cda73 broadway: Make chrome work again 2013-03-29 14:10:27 +01:00
Alexander Larsson
1045dca148 broadway: Add support for password authentication 2013-03-29 14:10:27 +01:00
Alexander Larsson
f713111232 broadway: Limit window resize based on window geometry 2013-03-29 14:10:26 +01:00
Alexander Larsson
f741a4b64f 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:10:26 +01:00
Alexander Larsson
859d502095 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:10:26 +01:00
Alexander Larsson
4400c21523 broadway: Clean up moveresize code 2013-03-29 14:10:26 +01:00
Alexander Larsson
83c9d0df8b broadway: Remove leftover cruft that caused resize to fail
getTransientToplevel() doesn't exist anymore so this broke.
2013-03-29 14:10:26 +01:00
Alexander Larsson
365612cfda broadway: Fix mouse position typo 2013-03-29 14:10:26 +01:00
Benjamin Otte
ff4c3bc5a8 reftests: Add a reftest for color resolving errors
This checks the fixes in the last two commits.
2013-03-29 00:30:36 +01:00
Benjamin Otte
818c590671 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-29 00:30:36 +01:00
Benjamin Otte
450f9c6d1d 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-29 00:30:36 +01:00
Andika Triwidada
5ddc5e6b62 Updated Indonesian translation of po-properties 2013-03-28 21:07:30 +07:00
Kristian Rietveld
12ffae5b1b quartz: move atom/pasteboard type conversions functions to GDK
(cherry picked from commit 6f607fc8b4)
2013-03-28 13:43:38 +01:00
Alexander Larsson
e495d318cb 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:25:54 +01:00
Alexander Larsson
b54f277a9b 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:05:15 +01:00
Alexander Larsson
8c02e290c4 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 11:53:40 +01:00
Alexander Larsson
6ca15267c9 gdkwindow: Add alpha_bg to window debug print 2013-03-27 11:42:44 +01:00
Marek Černocký
496e2a486e Updated Czech translatio 2013-03-26 23:05:34 +01:00
Matej Urbančič
2636a091c8 Updated Slovenian translation 2013-03-26 22:27:41 +01:00
Inaki Larranaga Murgoitio
3342732846 Updated Basque language 2013-03-26 11:20:35 +01:00
Inaki Larranaga Murgoitio
2335d11356 Updated Basque language 2013-03-26 11:09:12 +01:00
Chun-wei Fan
9c94e48420 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 17:00:11 +08:00
Ani Peter
95f3fcadb9 Completed for Malayalam 2013-03-26 10:50:13 +05:30
Chun-wei Fan
97c7586fdb 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:56:32 +08:00
Matthias Clasen
ec823e4c93 Bump version 2013-03-25 18:32:00 -04:00
Matthias Clasen
c8bac063a2 3.8.0 2013-03-25 16:58:53 -04:00
Daniel Korostil
0fac7578ce Added uk translation 2013-03-25 22:43:15 +02:00
Matej Urbančič
1da101c202 Updated Slovenian translation 2013-03-25 20:51:53 +01:00
Mario Blättermann
6d08a67297 [l10n] Updated German translation 2013-03-25 19:28:35 +01:00
A S Alam
fff0ed307d Punjabi: Translation updated (aalam) 2013-03-25 22:58:45 +05:30
Carlos Garcia Campos
73c6f82f5d 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:59:06 +01:00
Krishnababu Krothapalli
2f555ca155 Updated Telugu Translations 2013-03-25 19:22:17 +05:30
Carlos Garcia Campos
42650a2a3f 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:42:21 +01:00
Alexandre Franke
5442023b80 Update French translation 2013-03-25 12:00:26 +01:00
Shantha kumar
ac31a0c29d Tamil Translations Updated 2013-03-25 15:27:34 +05:30
Shantha kumar
7353b052b0 Tamil Translations Updated 2013-03-25 15:26:41 +05:30
Sweta Kothari
b7456e253d Updated gujarati file 2013-03-25 14:08:14 +05:30
Rajesh Ranjan
a74fc2fdf1 hindi translation by chandan kumar 2013-03-25 12:59:10 +05:30
Rajesh Ranjan
94ffe17f74 hindi translation by chandan kumar 2013-03-25 12:25:41 +05:30
Matthias Clasen
6297fc28f3 broadway: Don't use deprecated gdk_cursor_ref 2013-03-24 20:27:14 -04:00
Sébastien Wilmet
8301f4258f 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 20:26:42 -04:00
Tarnyko
58889736f6 win32: Bring back spinner animation
Define the spinner animation in css.
https://bugzilla.gnome.org/show_bug.cgi?id=696202
2013-03-24 20:26:29 -04:00
Marc-André Lureau
e3e8783c98 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-24 20:26:17 -04:00
Tarnyko
dc6cb1d2f1 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-24 20:26:01 -04:00
Vadim Godunko
71250a7b74 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-24 20:25:50 -04:00
Tristan Van Berkom
4a57841c74 GtkBuilder: Fixed documentation
The documentation was referring to an <external-object> tag
which we never implemented
2013-03-24 20:25:36 -04:00
Matthias Clasen
e2648b8794 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-24 20:24:48 -04:00
Luca Ferretti
d2a32d3309 [l10n] updated Italian translation 2013-03-24 21:00:19 +01:00
Petr Kovar
13f29d1666 Update Czech translation 2013-03-24 19:19:07 +01:00
Fran Diéguez
4ff5920876 Updated Galician translations 2013-03-24 18:56:12 +01:00
Mario Blättermann
7e006543ba [l10n] Updated German translation 2013-03-24 12:52:43 +01:00
Jorge Pérez Pérez
4a9fae23b3 Updated Aragonese translation 2013-03-23 22:20:15 +01:00
John Lindgren
9a7affbd69 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:41:09 +01:00
Yuri Myasoedov
a2179cd9af Updated Russia translation 2013-03-23 20:03:18 +04:00
Cosimo Cecchi
bbd6669ce5 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:28:27 -04:00
Chao-Hsiung Liao
93d503d5d9 Updated Traditional Chinese translation(Hong Kong and Taiwan) 2013-03-22 21:16:15 +08:00
Kalev Lember
5ca69b319a win32: link with -lwinmm
... to resolve the timeBeginPeriod() / timeEndPeriod() symbols after
commit 5dbf814f0c.
2013-03-21 22:58:50 +01:00
Baurzhan Muftakhidinov
cfa20539f7 Updated Kazakh translation. 2013-03-22 00:22:37 +06:00
Fran Diéguez
75c8fe77fe Updated Galician translations 2013-03-21 19:17:35 +01:00
Gabor Kelemen
8bcd4c4ed5 Updated Hungarian translation 2013-03-21 00:31:21 +01:00
Balázs Úr
d3752c4c2f Updated Hungarian translation 2013-03-20 22:14:41 +01:00
ManojKumar Giri
15fc151bd7 Updated Odia Translation. 2013-03-20 19:35:42 +05:30
ManojKumar Giri
9fa2406687 Updated Odia Translation. 2013-03-20 19:29:45 +05:30
Alexander Larsson
2743e96721 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.
(cherry picked from commit 76e466197a)
2013-03-20 14:05:30 +01:00
Chun-wei Fan
4d95403144 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:09:55 +08:00
Chao-Hsiung Liao
97cd5809ef Updated Traditional Chinese translation(Hong Kong and Taiwan) 2013-03-20 19:07:34 +08:00
Chun-wei Fan
cd1cab2a9f 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:43:40 +08:00
Arash Mousavi
3aa42a83b1 L10N: Updated Persian Translation 2013-03-20 10:14:30 +03:30
Sandeep Sheshrao Shedmake
5da225b425 Updated Marathi Translations 2013-03-20 09:48:03 +05:30
Gil Forcada
adf6875d54 [l10n] Updated Catalan translation 2013-03-19 23:15:40 +01:00
Matthias Clasen
2764eb8518 Post-release version bump 2013-03-18 22:30:36 -04:00
Matthias Clasen
22b4ac28a1 3.7.14 2013-03-18 22:20:22 -04:00
Мирослав Николић
e7b83db34c Updated Serbian translation 2013-03-18 20:50:56 +01:00
Мирослав Николић
3ca01303c0 Updated Serbian translation 2013-03-18 20:50:05 +01:00
Мирослав Николић
ff8005a73b Updated Serbian translation 2013-03-18 20:33:22 +01:00
Alexander Larsson
824a7c35f1 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:39:22 +01:00
Alexander Larsson
248854d1ac broadway: Ensure broadway request members are 32bit aligned 2013-03-18 16:39:21 +01:00
Christian Persch
e314029326 gtk: gtk_init_with_args allows NULL for parameter_string 2013-03-18 14:13:53 +01:00
Daniel Mustieles
addb269740 Updated Spanish translation 2013-03-18 13:08:31 +01:00
Rūdolfs Mazurs
814da3da2b Updated Latvian translation 2013-03-18 13:45:51 +02:00
Fran Diéguez
2126796de1 Updated Galician translations 2013-03-17 23:26:13 +01:00
Matthias Clasen
980968c65a 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 17:12:15 -04:00
Alban Browaeys
c8b3d2318a 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:13:23 -04:00
Sébastien Wilmet
cf09b40961 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:11:03 -04:00
Ihar Hrachyshka
2f84f2d0b3 Updated Belarusian translation. 2013-03-17 15:52:46 +03:00
Ask H. Larsen
646efb936e Updated Danish translation of the properties 2013-03-17 08:39:45 +01:00
Ask H. Larsen
50082cd220 Updated Danish translation 2013-03-17 08:15:38 +01:00
Martin Srebotnjak
94500e03e2 Updated Slovenian translation 2013-03-16 09:54:06 +01:00
Martin Srebotnjak
547df506f2 Updated Slovenian translation 2013-03-16 09:47:25 +01:00
Benjamin Otte
79f527b223 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:09:50 +01:00
Claude Paroz
ac06a672b0 Updated po-properties French translation 2013-03-15 23:29:26 +01:00
Duarte Loreto
f48255f484 Updated Portuguese translation 2013-03-15 21:22:15 +00:00
Duarte Loreto
628a794ade Updated Portuguese translation 2013-03-15 21:17:12 +00:00
Duarte Loreto
44f05f6546 Updated Portuguese translation 2013-03-15 21:10:42 +00:00
Aurimas Černius
2b9ee49e73 Updated Lithuanian properties translation 2013-03-15 23:03:59 +02:00
Aurimas Černius
488da31fe2 Updated Lithuanian translation 2013-03-15 22:52:51 +02:00
Benjamin Otte
74e8ed196b reftests: Add reftest for separator fixes
Reftest for 549893c7d1.

Includes a workaround for a grid bug which should be removed once
GtkGrid is fixed.
2013-03-15 19:11:41 +01:00
Benjamin Otte
549893c7d1 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 19:11:23 +01:00
Daniel Mustieles
f15021b7d0 Updated Spanish translation 2013-03-15 13:32:38 +01:00
Martin Srebotnjak
2dfeb3b7ac Updated Slovenian translation 2013-03-15 11:49:39 +01:00
Martin Srebotnjak
f83b794ce8 Updated Slovenian translation 2013-03-15 11:47:18 +01:00
Nilamdyuti Goswami
f545a2b2c6 Assamese translation updated for gnome 3.8 2013-03-15 15:10:10 +05:30
Nilamdyuti Goswami
e0deb74845 Assamese translation updated for gnome 3.8 2013-03-15 14:50:13 +05:30
Matthias Clasen
2e9567afb7 Minor doc cleanup
Remove widget references from interface docs.

https://bugzilla.gnome.org/show_bug.cgi?id=695874
2013-03-14 20:38:10 -04:00
John Lindgren
53d5eef846 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-14 20:36:58 -04:00
Benjamin Otte
e299469e18 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 01:02:26 +01:00
Martin Srebotnjak
db496ca88d Updated Slovenian translation 2013-03-14 23:21:36 +01:00
Nilamdyuti Goswami
3e510cbd1b Assamese translation updated for gnome 3.8 2013-03-14 22:32:56 +05:30
Bastien Nocera
fcc6f9adff 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:44:37 +01:00
Andika Triwidada
e565ef5055 Updated Indonesian translation 2013-03-14 17:55:03 +07:00
Daniel Mustieles
5b5608c1e3 Updated Spanish translation 2013-03-13 17:13:28 +01:00
Changwoo Ryu
d79db12faa Updated Korean translation 2013-03-13 23:55:02 +09:00
Marek Kasik
67c08d7c1d 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.

https://bugzilla.gnome.org/show_bug.cgi?id=695715
2013-03-13 15:35:35 +01:00
Marek Kasik
f7676ba9ed 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:26:37 +01:00
Marek Kasik
ddd6471d14 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:56 +01:00
Dimitris Spingos
857c01028a Updated Greek translation 2013-03-13 15:19:19 +02:00
Gheyret Kenji
6b45f3e1c4 Updated Uyghur translation
Signed-off-by: Gheyret Kenji <gheyret@gmail.com>
2013-03-13 20:52:17 +09:00
Marek Kasik
16c9f37b18 printing: Show Avahi printers on IPv6 network
Create correct URIs for printers on IPv6 networks.
2013-03-13 10:56:24 +01:00
Fran Diéguez
be65eb8850 Updated Galician translations 2013-03-13 10:26:18 +01:00
Chun-wei Fan
75a19fdf18 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:14:05 +08:00
Chun-wei Fan
46e7d8530c 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:13:54 +08: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
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
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
391 changed files with 88139 additions and 57133 deletions

307
NEWS
View File

@@ -1,3 +1,310 @@
Overview of Changes in GTK+ 3.8.8
=================================
* Bugs fixed:
705203 Natural scroll doesn't work immediately
712799 Memory leak when listing Avahi printers
715029 Ensure GdkScreen::monitors-changed gets emitted...
Overview of Changes in GTK+ 3.8.7
=================================
* Bugs fixed:
577642 Selected Printer Does Not Stick Between Sessions
699574 gtk_selection_owner_set() breaks mouse wheel scrolling
702663 GtkComboBox::appears-as-list does not respect scrolling
703784 Epiphany crash during displaying printing dialog
705176 Reordering columns in GtkTreeView freezes mutter
710666 Frame clock related bug fixes
710754 GtkModelMenu: don't leak submenus
712213 Nautilus "connect to server" dialog has an incorrect "_"...
Overview of Changes in GTK+ 3.8.6
=================================
* Bugs fixed:
698730 tooltip: Fix possible wrong placement
709697 Fix a warning in builg gtk+ with clang
709967 Double free in gtkicontheme.c
710073 Assertion failure because _gtk_icon_info_load...
Overview of Changes in GTK+ 3.8.5
=================================
* Bugs fixed:
339539 Ctrl-C, Ctrl-V changes tags
341146 reorder lines in configure.in for a better display
513812 Optimize gdk_cairo_set_source_pixbuf() alpha multipli...
586107 gtkprintbackendpapi.c does not compile on Solaris 10
696756 x11: gdk_device_get_source : assertion `GDK_IS_DEVICE...
703062 GtkTreeViewColumn returns negative size request on em...
706269 Clarify GtkBox, GtkHBox, and GtkVBox documentation
706345 GtkExpander's click-and-drag behavior should match th...
707872 GtkSwitch shouldn't have a default name
707926 GtkSwitch shouldn't have a default accessible description
708414 entrycompletion: set the GtkWindow as attached to the...
709056 icontheme: use g_file_load_contents() for symbolic icons
709264 Fix memory leaks in icons handling
* Translation updates:
Scottish Gaelic
Slovenian
Overview of Changes in GTK+ 3.8.3
=================================
* Bugs fixed:
667759 gtkdnd-quartz.c is missing annotations for introspection
672271 File chooser seems over-enthusiastic about using subdir...
674108 Hard crash due to wrong NSAutoreleasePool stacking
680953 set_item_width / text wrapping doesn't work in iconview...
688738 GtkMenuButton problem with mnemonics / accelerators
691921 GTK+ (quartz) built on Mac OS X 10.5 references [NSMenu...
692548 Quartz: Cursor doesn't reset when the mouse leaves a to...
694273 Patch to support NSTextInputClient in text widgets
694755 When clicking Activities, sometimes gnome-shell crashes.
696498 can't set download folder
696640 GtkButton: Don't suppress unhandled mouse events
698183 Text input is too slow and some keys are broken after c...
698758 Wrong limit for "Native Windows wider or taller than 65...
700185 GtkWindow: problem with child widget visibility
700779 gtk_menu_item_draw puts the arrow too close to the border
701332 Patch for minor glitch in NSTextInput
701341 Windows only paint once in Weston 1.1
701365 Do not assert sm_proxy != NULL in GtkApplication inhibi...
701613 XEmbed doesn't work with frame-synced GTK/Mutter
702598 Invalid read of size 4 in gtk_icon_info_get_embedded_rect
702763 ellipsize placeholder text
702913 Reduce hash table lookups in gdk_x11_screen_supports_ne...
703069 Opening a big menu activates some menu entry
703220 Memory allocation integer overflow in gdk_cairo_set_sou...
705181 Annoying beep on arrow keys when using IME on MacOS
705182 Reset Cocoa IME state when immodule is reset
705320 gtkicontheme: check for GdkPixbuf first
705692 Segmentation fault on horizontal slider
705750 Quartz input method doesn't work correctly for Chinese...
706152 g_object_notify called with NULL priv->focus_widget
* Translation updates:
Brazilian Portuguese
Traditional Chinese
Overview of Changes in GTK+ 3.8.2
=================================
* Bugs fixed:
504901 GtkCellRendererCombo requires click-and-hold
695120 GtkMenu and GdkWindow sizes can get out of sync
698051 Typo in documentation comment
698181 Document icon-shadow CSS property
699104 when nothing is selected, Add to Bookmarks is enabled...
699239 Choose DnD/tooltip widget better on GtkOverlay and ot...
699750 Print dialog crashes when printer does not provide pr...
699901 GTK CSS keybinding broken
699929 GtkCheckMenuItem: remove an unused boolean field
700007 Various small improvements
700079 Fix accels added after the window was shown not working
Translation updates:
Brazilian Portuguese
German
Italian
Japanese
Lithuanian
Norwegian bokmål
Russian
Overview of Changes in GTK+ 3.8.1
=================================
* Broadway backend improvements:
- Ensure window sizes are synched right
- Sync surface updates with paint clock
- Add support for password authentication
- Reuse surfaces passed to server
* CSS improvements:
- Add cycle detection to color resolving
* Bug fixes
675649 gtk-demo: Fix typo
681446 gtkdnd memory leak
685419 gtkprintbackendfile: Infinite loop in _cairo_write()
685420 Critical warnings when GtkPrintJob is released too early
690275 scrolling on other windows is applied when coming back...
696370 GtkOverlay doesn't work on top of GtkClutterEmbed
696622 gtk option printer widget segfault in epiphany
696623 GtkOverlay with a revealer produces warnings setting a...
696882 GtkWindow changes size after hide/show cycle
697144 Popup menu mnemonics fixes
697263 Impossible to set window transparency on 3.8
697427 Unreferencing GtkStatusIcon object causes abort
* Translation updates
Basque
British English
Catalan (Valencian)
Czech
Finnish
Hungarian
Indonesian
Interlingua
Kannada
Malayalam
Norwegian bokmål
Polish
Simplified Chinese
Slovak
Slovenian
Overview of Changes in GTK+ 3.8.0
=================================
* Bug fixes
674759 GtkLabel: wrong value of "mnemonic-keyval" when...
695493 testgtk: issues with the color selection example
696051 vertical grid lines in rtl mode
696171 GtkAssistant highlighted font unreadable
696202 Add GtkSpinner animation back to Win32 theme
696232 win32: do not crash on invalid utf8 conversion
696405 appchooserbutton: filter out applications not...
696546 Fix a crash in gtk_print_backend_cups_finalize()
696553 Fix a crash in avahi_create_browsers()
Use natural size to set treeview adjustments
* Translation updates
Aragonese
Czech
French
Galician
German
Gujarati
Hindi
Hungarian
Italian
Kazakh
Marathi
Odia
Persian
Punjabi
Russian
Slovenian
Tamil
Traditional Chinese
Ukrainian
Overview of Changes in GTK+ 3.7.14
==================================
* A lot of filechooser button fixes
* Bugs fixed:
586367 In local_only mode, file chooser should return native...
671939 crash on exit
674759 GtkLabel: wrong value of "mnemonic-keyval" when "use-...
691040 selection is reported incorrectly in file chooser button
694339 Fix build of GTK+ on Windows
695200 Switching apps while a combobox open makes the parent...
695278 Avoid passing a NULL title to setTitle
695304 GtkTextView: don't popdown a bubble if we don't have one
695312 Initial 'text' set in the non-numeric-only GtkSpinBut...
695375 GtkEntryAccessible: also handle entry icon tooltip NU...
695391 wayland documentation section id is "gtk-osx"
695473 treeview: fix a critical warning
695482 Universal Access panel appears jumbled and horrible a...
695682 Cannot build docs for wayland-only build
695714 Getting of printer info can hang
695715 Use DBus calls instead of Avahi API
695772 Different appearance of menus within Audacious
695783 GtkApplication: Allow passing windows on non-X11 targets
695874 GtkFontChooser docs
695948 GtkFontButton sets wrong show-preview-entry
* Translation updates:
Arabic
Assamese
Belarusian
Brazilian Portuguese
Catalan
Danish
Finnish
French
Galician
German
Greek
Indonesian
Kazakh
Lithuanian
Korean
Polish
Portuguese
Punjabi
Serbian
Slovenian
Spanish
Uyghur
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
==================================

View File

@@ -4,4 +4,8 @@ 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,27 +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

@@ -90,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>
@@ -114,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>
@@ -136,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>
@@ -161,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

@@ -86,12 +86,12 @@
<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>
@@ -106,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>
@@ -131,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>
@@ -151,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

@@ -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

@@ -91,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>
@@ -113,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>
@@ -136,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>
@@ -158,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>
@@ -204,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,7 +27,7 @@
<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">
@@ -38,7 +38,7 @@
<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">
@@ -135,6 +135,7 @@
<AdditionalDependencies>%(AdditionalDependencies)</AdditionalDependencies>
<GenerateDebugInformation>true</GenerateDebugInformation>
<SubSystem>Console</SubSystem>
<FunctionLevelLinking>false</FunctionLevelLinking>
<OptimizeReferences>true</OptimizeReferences>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<RandomizedBaseAddress>false</RandomizedBaseAddress>
@@ -158,6 +159,7 @@
<AdditionalDependencies>%(AdditionalDependencies)</AdditionalDependencies>
<GenerateDebugInformation>true</GenerateDebugInformation>
<SubSystem>Console</SubSystem>
<FunctionLevelLinking>false</FunctionLevelLinking>
<OptimizeReferences>true</OptimizeReferences>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<RandomizedBaseAddress>false</RandomizedBaseAddress>
@@ -211,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" />
@@ -120,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

@@ -113,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,18 +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

@@ -42,13 +42,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="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,356 +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\gtkx.h $(CopyDir)\include\gtk-$(GtkApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtk-a11y.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\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\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\gtkgradient.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\gtksymboliccolor.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\gtk-$(GtkApiVersion)\a11y&#x0D;&#x0A;
mkdir $(CopyDir)\include\gtk-$(ApiVersion)\gtk\a11y&#x0D;&#x0A;
copy ..\..\..\gtk\a11y\gtkarrowaccessible.h $(CopyDir)\include\gtk-$(GtkApiVersion)\gtk\a11y&#x0D;&#x0A;
copy ..\..\..\gtk\a11y\gtkbooleancellaccessible.h $(CopyDir)\include\gtk-$(GtkApiVersion)\gtk\a11y&#x0D;&#x0A;
copy ..\..\..\gtk\a11y\gtkbuttonaccessible.h $(CopyDir)\include\gtk-$(GtkApiVersion)\gtk\a11y&#x0D;&#x0A;
copy ..\..\..\gtk\a11y\gtkcellaccessible.h $(CopyDir)\include\gtk-$(GtkApiVersion)\gtk\a11y&#x0D;&#x0A;
copy ..\..\..\gtk\a11y\gtkcellaccessibleparent.h $(CopyDir)\include\gtk-$(GtkApiVersion)\gtk\a11y&#x0D;&#x0A;
copy ..\..\..\gtk\a11y\gtkcheckmenuitemaccessible.h $(CopyDir)\include\gtk-$(GtkApiVersion)\gtk\a11y&#x0D;&#x0A;
copy ..\..\..\gtk\a11y\gtkcomboboxaccessible.h $(CopyDir)\include\gtk-$(GtkApiVersion)\gtk\a11y&#x0D;&#x0A;
copy ..\..\..\gtk\a11y\gtkcontaineraccessible.h $(CopyDir)\include\gtk-$(GtkApiVersion)\gtk\a11y&#x0D;&#x0A;
copy ..\..\..\gtk\a11y\gtkcontainercellaccessible.h $(CopyDir)\include\gtk-$(GtkApiVersion)\gtk\a11y&#x0D;&#x0A;
copy ..\..\..\gtk\a11y\gtkentryaccessible.h $(CopyDir)\include\gtk-$(GtkApiVersion)\gtk\a11y&#x0D;&#x0A;
copy ..\..\..\gtk\a11y\gtkexpanderaccessible.h $(CopyDir)\include\gtk-$(GtkApiVersion)\gtk\a11y&#x0D;&#x0A;
copy ..\..\..\gtk\a11y\gtkframeaccessible.h $(CopyDir)\include\gtk-$(GtkApiVersion)\gtk\a11y&#x0D;&#x0A;
copy ..\..\..\gtk\a11y\gtkiconviewaccessible.h $(CopyDir)\include\gtk-$(GtkApiVersion)\gtk\a11y&#x0D;&#x0A;
copy ..\..\..\gtk\a11y\gtkimageaccessible.h $(CopyDir)\include\gtk-$(GtkApiVersion)\gtk\a11y&#x0D;&#x0A;
copy ..\..\..\gtk\a11y\gtkimagecellaccessible.h $(CopyDir)\include\gtk-$(GtkApiVersion)\gtk\a11y&#x0D;&#x0A;
copy ..\..\..\gtk\a11y\gtklabelaccessible.h $(CopyDir)\include\gtk-$(GtkApiVersion)\gtk\a11y&#x0D;&#x0A;
copy ..\..\..\gtk\a11y\gtklinkbuttonaccessible.h $(CopyDir)\include\gtk-$(GtkApiVersion)\gtk\a11y&#x0D;&#x0A;
copy ..\..\..\gtk\a11y\gtklockbuttonaccessible.h $(CopyDir)\include\gtk-$(GtkApiVersion)\gtk\a11y&#x0D;&#x0A;
copy ..\..\..\gtk\a11y\gtkmenuaccessible.h $(CopyDir)\include\gtk-$(GtkApiVersion)\gtk\a11y&#x0D;&#x0A;
copy ..\..\..\gtk\a11y\gtkmenuitemaccessible.h $(CopyDir)\include\gtk-$(GtkApiVersion)\gtk\a11y&#x0D;&#x0A;
copy ..\..\..\gtk\a11y\gtkmenushellaccessible.h $(CopyDir)\include\gtk-$(GtkApiVersion)\gtk\a11y&#x0D;&#x0A;
copy ..\..\..\gtk\a11y\gtknotebookaccessible.h $(CopyDir)\include\gtk-$(GtkApiVersion)\gtk\a11y&#x0D;&#x0A;
copy ..\..\..\gtk\a11y\gtknotebookpageaccessible.h $(CopyDir)\include\gtk-$(GtkApiVersion)\gtk\a11y&#x0D;&#x0A;
copy ..\..\..\gtk\a11y\gtkpanedaccessible.h $(CopyDir)\include\gtk-$(GtkApiVersion)\gtk\a11y&#x0D;&#x0A;
copy ..\..\..\gtk\a11y\gtkprogressbaraccessible.h $(CopyDir)\include\gtk-$(GtkApiVersion)\gtk\a11y&#x0D;&#x0A;
copy ..\..\..\gtk\a11y\gtkradiobuttonaccessible.h $(CopyDir)\include\gtk-$(GtkApiVersion)\gtk\a11y&#x0D;&#x0A;
copy ..\..\..\gtk\a11y\gtkradiomenuitemaccessible.h $(CopyDir)\include\gtk-$(GtkApiVersion)\gtk\a11y&#x0D;&#x0A;
copy ..\..\..\gtk\a11y\gtkrangeaccessible.h $(CopyDir)\include\gtk-$(GtkApiVersion)\gtk\a11y&#x0D;&#x0A;
copy ..\..\..\gtk\a11y\gtkrenderercellaccessible.h $(CopyDir)\include\gtk-$(GtkApiVersion)\gtk\a11y&#x0D;&#x0A;
copy ..\..\..\gtk\a11y\gtkscaleaccessible.h $(CopyDir)\include\gtk-$(GtkApiVersion)\gtk\a11y&#x0D;&#x0A;
copy ..\..\..\gtk\a11y\gtkscalebuttonaccessible.h $(CopyDir)\include\gtk-$(GtkApiVersion)\gtk\a11y&#x0D;&#x0A;
copy ..\..\..\gtk\a11y\gtkscrolledwindowaccessible.h $(CopyDir)\include\gtk-$(GtkApiVersion)\gtk\a11y&#x0D;&#x0A;
copy ..\..\..\gtk\a11y\gtkspinbuttonaccessible.h $(CopyDir)\include\gtk-$(GtkApiVersion)\gtk\a11y&#x0D;&#x0A;
copy ..\..\..\gtk\a11y\gtkspinneraccessible.h $(CopyDir)\include\gtk-$(GtkApiVersion)\gtk\a11y&#x0D;&#x0A;
copy ..\..\..\gtk\a11y\gtkstatusbaraccessible.h $(CopyDir)\include\gtk-$(GtkApiVersion)\gtk\a11y&#x0D;&#x0A;
copy ..\..\..\gtk\a11y\gtkswitchaccessible.h $(CopyDir)\include\gtk-$(GtkApiVersion)\gtk\a11y&#x0D;&#x0A;
copy ..\..\..\gtk\a11y\gtktextcellaccessible.h $(CopyDir)\include\gtk-$(GtkApiVersion)\gtk\a11y&#x0D;&#x0A;
copy ..\..\..\gtk\a11y\gtktextviewaccessible.h $(CopyDir)\include\gtk-$(GtkApiVersion)\gtk\a11y&#x0D;&#x0A;
copy ..\..\..\gtk\a11y\gtktogglebuttonaccessible.h $(CopyDir)\include\gtk-$(GtkApiVersion)\gtk\a11y&#x0D;&#x0A;
copy ..\..\..\gtk\a11y\gtktoplevelaccessible.h $(CopyDir)\include\gtk-$(GtkApiVersion)\gtk\a11y&#x0D;&#x0A;
copy ..\..\..\gtk\a11y\gtktreeviewaccessible.h $(CopyDir)\include\gtk-$(GtkApiVersion)\gtk\a11y&#x0D;&#x0A;
copy ..\..\..\gtk\a11y\gtkwidgetaccessible.h $(CopyDir)\include\gtk-$(GtkApiVersion)\gtk\a11y&#x0D;&#x0A;
copy ..\..\..\gtk\a11y\gtkwindowaccessible.h $(CopyDir)\include\gtk-$(GtkApiVersion)\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-$(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\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;"
@@ -435,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

@@ -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

@@ -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

@@ -9,9 +9,9 @@
# 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], [10])
m4_define([gtk_interface_age], [0])
m4_define([gtk_minor_version], [8])
m4_define([gtk_micro_version], [8])
m4_define([gtk_interface_age], [8])
m4_define([gtk_binary_age],
[m4_eval(100 * gtk_minor_version + gtk_micro_version)])
m4_define([gtk_version],
@@ -350,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
@@ -361,6 +361,7 @@ DISABLE_ON_QUARTZ=''
if test "x$enable_quartz_backend" = xyes; then
cairo_backends="$cairo_backends cairo-quartz"
GDK_BACKENDS="$GDK_BACKENDS quartz"
backend_immodules="$backend_immodules,quartz"
GDK_WINDOWING="$GDK_WINDOWING
#define GDK_WINDOWING_QUARTZ"
GDK_EXTRA_LIBS="$GDK_EXTRA_LIBS -framework Cocoa"
@@ -390,6 +391,7 @@ else
AM_CONDITIONAL(USE_BROADWAY, false)
fi
DISABLE_ON_WAYLAND=''
if test "x$enable_wayland_backend" = "xyes"; then
# For the cairo image backend
cairo_backends="$cairo_backends cairo"
@@ -397,11 +399,13 @@ if test "x$enable_wayland_backend" = "xyes"; then
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"
AM_CONDITIONAL(USE_WAYLAND, true)
else
AM_CONDITIONAL(USE_WAYLAND, false)
fi
AC_SUBST(DISABLE_ON_WAYLAND)
# strip leading space
GDK_BACKENDS=${GDK_BACKENDS#* }
@@ -872,6 +876,7 @@ AM_CONDITIONAL(INCLUDE_IM_IME, [test x"$INCLUDE_ime" = xyes])
AM_CONDITIONAL(INCLUDE_IM_INUKTITUT, [test x"$INCLUDE_inuktitut" = xyes])
AM_CONDITIONAL(INCLUDE_IM_IPA, [test x"$INCLUDE_ipa" = xyes])
AM_CONDITIONAL(INCLUDE_IM_MULTIPRESS, [test x"$INCLUDE_multipress" = xyes])
AM_CONDITIONAL(INCLUDE_IM_QUARTZ, [test x"$INCLUDE_quartz" = xyes])
AM_CONDITIONAL(INCLUDE_IM_THAI, [test x"$INCLUDE_thai" = xyes])
AM_CONDITIONAL(INCLUDE_IM_TI_ER, [test x"$INCLUDE_ti_er" = xyes])
AM_CONDITIONAL(INCLUDE_IM_TI_ET, [test x"$INCLUDE_ti_et" = xyes])
@@ -1082,7 +1087,6 @@ if test "x$enable_x11_backend" = xyes; then
case "$host" in
*-*-solaris*)
# Check for solaris
AC_MSG_CHECKING(for Xinerama support on Solaris)
have_solaris_xinerama=false
AC_CHECK_FUNC(XineramaGetInfo,
@@ -1090,6 +1094,8 @@ if test "x$enable_x11_backend" = xyes; then
[have_solaris_xinerama=true], :,
[#include <X11/Xlib.h>])])
AC_MSG_CHECKING(for Xinerama support on Solaris)
if $have_solaris_xinerama ; then
X_EXTENSIONS="$X_EXTENSIONS Xinerama"
AC_DEFINE(HAVE_SOLARIS_XINERAMA, 1,
@@ -1239,7 +1245,6 @@ 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
@@ -1421,7 +1426,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)

View File

@@ -9,8 +9,8 @@
#include "demos.h"
static GtkTextBuffer *info_buffer;
static GtkTextBuffer *source_buffer;
static GtkWidget *info_view;
static GtkWidget *source_view;
static gchar *current_file = NULL;
@@ -353,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;
@@ -398,13 +398,12 @@ 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 *demoname)
{
GtkTextBuffer *buffer = NULL;
gchar *resource_dir, *resource_name, *content_type;
gchar *resource_dir, *resource_name, *content_type, *content_mime;
gchar **resources;
GBytes *bytes;
GtkWidget *widget, *label;
@@ -428,24 +427,33 @@ add_data_tab (const gchar *demoname)
g_bytes_get_data (bytes, NULL),
g_bytes_get_size (bytes),
NULL);
content_mime = g_content_type_get_mime_type (content_type);
/* 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_type, "image/png") ||
g_content_type_is_a (content_type, "image/gif") ||
g_content_type_is_a (content_type, "image/jpeg"))
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_type, "text/plain"))
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"))
{
widget = create_text (&buffer, FALSE);
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_type);
g_warning ("Don't know how to display resource '%s' of type '%s'\n", resource_name, content_mime);
widget = NULL;
}
@@ -454,6 +462,7 @@ add_data_tab (const gchar *demoname)
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);
@@ -476,6 +485,7 @@ void
load_file (const gchar *demoname,
const gchar *filename)
{
GtkTextBuffer *info_buffer, *source_buffer;
GtkTextIter start, end;
char *resource_filename;
GError *err = NULL;
@@ -495,11 +505,34 @@ load_file (const gchar *demoname,
g_free (current_file);
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);
resource_filename = g_strconcat ("/sources/", filename, NULL);
bytes = g_resources_lookup_data (resource_filename, 0, &err);
@@ -629,9 +662,14 @@ load_file (const gchar *demoname,
}
}
fontify ();
fontify (source_buffer);
g_strfreev (lines);
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
@@ -699,8 +737,8 @@ selection_cb (GtkTreeSelection *selection,
}
static GtkWidget *
create_text (GtkTextBuffer **buffer,
gboolean is_source)
create_text (GtkWidget **view,
gboolean is_source)
{
GtkWidget *scrolled_window;
GtkWidget *text_view;
@@ -713,11 +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);
@@ -899,43 +935,13 @@ main (int argc, char **argv)
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",
"pixels-below-lines", 10,
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);

View File

@@ -16,8 +16,6 @@
#include <gtk/gtk.h>
#include <math.h>
#define FRAME_DELAY 50
#define BACKGROUND_NAME "/pixbufs/background.jpg"
static const char *image_names[] = {
@@ -88,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;
@@ -104,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;
@@ -159,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)
{
@@ -188,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;
@@ -224,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

@@ -85,7 +85,7 @@ scroll_to_bottom (GtkTextView *textview)
gtk_text_iter_set_line_offset (&iter, 0);
/* and place the mark at iter. the mark will stay there after we
* insert some text at the end because it has right gravity.
* insert some text at the end because it has left gravity.
*/
mark = gtk_text_buffer_get_mark (buffer, "scroll");
gtk_text_buffer_move_mark (buffer, mark, &iter);

View File

@@ -22,6 +22,7 @@ struct _CanvasItem
gdouble x, y;
};
static gboolean drag_data_requested_for_drop = FALSE;
static CanvasItem *drop_item = NULL;
static GList *canvas_items = NULL;
@@ -266,6 +267,7 @@ interactive_canvas_drag_motion (GtkWidget *widget,
if (!target)
return FALSE;
drag_data_requested_for_drop = FALSE;
gtk_drag_get_data (widget, context, target, time);
}
@@ -295,16 +297,36 @@ interactive_canvas_drag_data_received (GtkWidget *widget,
tool_item = gtk_tool_palette_get_drag_item (GTK_TOOL_PALETTE (palette),
selection);
/* create a drop indicator when a tool button was found */
/* create a canvas item when a tool button was found */
g_assert (NULL == drop_item);
if (GTK_IS_TOOL_ITEM (tool_item))
if (!GTK_IS_TOOL_ITEM (tool_item))
return;
if (drop_item)
{
drop_item = canvas_item_new (widget, GTK_TOOL_BUTTON (tool_item), x, y);
gdk_drag_status (context, GDK_ACTION_COPY, time);
gtk_widget_queue_draw (widget);
canvas_item_free (drop_item);
drop_item = NULL;
}
CanvasItem *item = canvas_item_new (widget, GTK_TOOL_BUTTON (tool_item), x, y);
/* Either create a new item or just create a preview item,
depending on why the drag data was requested. */
if(drag_data_requested_for_drop)
{
canvas_items = g_list_append (canvas_items, item);
drop_item = NULL;
gtk_drag_finish (context, TRUE, FALSE, time);
} else
{
drop_item = item;
gdk_drag_status (context, GDK_ACTION_COPY, time);
}
gtk_widget_queue_draw (widget);
}
static gboolean
@@ -315,29 +337,19 @@ interactive_canvas_drag_drop (GtkWidget *widget,
guint time,
gpointer data)
{
if (drop_item)
{
/* turn the drop indicator into a real canvas item */
GdkAtom target = gtk_drag_dest_find_target (widget, context, NULL);
drop_item->x = x;
drop_item->y = y;
if (!target)
return FALSE;
canvas_items = g_list_append (canvas_items, drop_item);
drop_item = NULL;
/* signal the item was accepted and redraw */
gtk_drag_finish (context, TRUE, FALSE, time);
gtk_widget_queue_draw (widget);
return TRUE;
}
drag_data_requested_for_drop = TRUE;
gtk_drag_get_data (widget, context, target, time);
return FALSE;
}
static gboolean
interactive_canvas_real_drag_leave (gpointer data)
static void
interactive_canvas_drag_leave (gpointer data)
{
if (drop_item)
{
@@ -346,20 +358,9 @@ interactive_canvas_real_drag_leave (gpointer data)
canvas_item_free (drop_item);
drop_item = NULL;
gtk_widget_queue_draw (widget);
if (widget)
gtk_widget_queue_draw (widget);
}
return G_SOURCE_REMOVE;
}
static void
interactive_canvas_drag_leave (GtkWidget *widget,
GdkDragContext *context,
guint time,
gpointer data)
{
/* defer cleanup until a potential "drag-drop" signal was received */
g_idle_add (interactive_canvas_real_drag_leave, widget);
}
static void
@@ -591,7 +592,7 @@ do_toolpalette (GtkWidget *do_widget)
"signal::draw", canvas_draw, NULL,
"signal::drag-motion", interactive_canvas_drag_motion, NULL,
"signal::drag-data-received", interactive_canvas_drag_data_received, NULL,
"signal::drag-leave", interactive_canvas_drag_leave, NULL,
"signal::drag-leave", interactive_canvas_drag_leave, contents,
"signal::drag-drop", interactive_canvas_drag_drop, NULL,
NULL);

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

@@ -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" />
@@ -69,6 +71,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

@@ -404,6 +404,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
@@ -988,6 +989,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
@@ -1154,3 +1156,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

@@ -54,6 +54,15 @@ Start your applications like this:
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>

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

@@ -4742,6 +4742,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
@@ -5151,6 +5152,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
@@ -5809,6 +5814,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
@@ -5850,6 +5856,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>
@@ -6493,8 +6500,6 @@ 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_style_async
gtk_icon_info_load_symbolic_for_style_finish
gtk_icon_info_load_symbolic_for_context
gtk_icon_info_load_symbolic_for_context_async
gtk_icon_info_load_symbolic_for_context_finish

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

@@ -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

@@ -236,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

@@ -83,7 +83,7 @@ broadwayd_SOURCES = \
broadway-output.h \
broadway-output.c
broadwayd_LDADD = $(GDK_DEP_LIBS) -lrt
broadwayd_LDADD = $(GDK_DEP_LIBS) -lrt -lcrypt
MAINTAINERCLEANFILES = $(broadway_built_sources)
EXTRA_DIST += $(broadway_built_sources)

View File

@@ -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 *
@@ -471,6 +478,24 @@ 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)
{

View File

@@ -23,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,
@@ -31,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,

View File

@@ -36,6 +36,9 @@ typedef enum {
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 {
@@ -160,7 +163,7 @@ typedef struct {
typedef struct {
BroadwayRequestBase base;
guint32 id;
char name[34];
char name[36];
guint32 width;
guint32 height;
} BroadwayRequestUpdate;

View File

@@ -2,6 +2,8 @@
#include "broadway-output.h"
#define _XOPEN_SOURCE /* for crypt */
#include <glib.h>
#include <glib/gprintf.h>
#include "gdktypes.h"
@@ -9,6 +11,10 @@
#include <string.h>
#include <errno.h>
#include <unistd.h>
#include <crypt.h>
#include <sys/mman.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <sys/types.h>
#include <sys/socket.h>
#include <netinet/in.h>
@@ -19,6 +25,7 @@ typedef struct BroadwayWindow BroadwayWindow;
struct _BroadwayServer {
GObject parent_instance;
char *password;
char *address;
int port;
GSocketService *service;
@@ -69,6 +76,7 @@ typedef struct HttpRequest {
struct BroadwayInput {
BroadwayServer *server;
BroadwayOutput *output;
GSocketConnection *connection;
GByteArray *buffer;
GSource *source;
@@ -76,6 +84,7 @@ struct BroadwayInput {
gint64 time_base;
gboolean proto_v7_plus;
gboolean binary;
gboolean active;
};
struct BroadwayWindow {
@@ -90,6 +99,9 @@ struct BroadwayWindow {
gint32 transient_for;
cairo_surface_t *last_surface;
char *cached_surface_name;
cairo_surface_t *cached_surface;
};
static void broadway_server_resync_windows (BroadwayServer *server);
@@ -100,6 +112,8 @@ static void
broadway_server_init (BroadwayServer *server)
{
BroadwayWindow *root;
char *passwd_file;
char *password, *p;
server->service = g_socket_service_new ();
server->pointer_grab_window_id = -1;
@@ -108,6 +122,22 @@ broadway_server_init (BroadwayServer *server)
server->id_ht = g_hash_table_new (NULL, NULL);
server->id_counter = 0;
passwd_file = g_build_filename (g_get_user_config_dir (),
"broadway.passwd", NULL);
if (g_file_get_contents (passwd_file,
&password, NULL, NULL))
{
p = strchr (password, '\n');
if (p)
*p = 0;
g_strstrip (password);
if (strlen (password) > 3)
server->password = password;
else
g_free (password);
}
root = g_new0 (BroadwayWindow, 1);
root->id = server->id_counter++;
root->width = 1024;
@@ -139,7 +169,7 @@ broadway_server_class_init (BroadwayServerClass * class)
object_class->finalize = broadway_server_finalize;
}
static void start_output (HttpRequest *request, gboolean proto_v7_plus, gboolean binary);
static void start (BroadwayInput *input);
static void
http_request_free (HttpRequest *request)
@@ -349,6 +379,14 @@ update_future_pointer_info (BroadwayServer *server, BroadwayInputPointerMsg *dat
server->future_mouse_in_toplevel = data->mouse_window_id;
}
static gboolean
verify_password (BroadwayServer *server, const char *password)
{
char *hash;
hash = crypt (password, server->password);
return strcmp (hash, server->password) == 0;
}
static void
parse_input_message (BroadwayInput *input, const char *message)
{
@@ -357,6 +395,22 @@ parse_input_message (BroadwayInput *input, const char *message)
char *p;
gint64 time_;
if (!input->active)
{
/* The input has not been activated yet, handle auth/start */
if (message[0] != 'l' ||
!verify_password (server, message+1))
{
broadway_output_request_auth (input->output);
broadway_output_flush (input->output);
}
else
start (input);
return;
}
memset (&msg, 0, sizeof (msg));
p = (char *)message;
@@ -570,7 +624,7 @@ parse_input (BroadwayInput *input)
}
break;
case BROADWAY_WS_CNX_PING:
broadway_output_pong (server->output);
broadway_output_pong (input->output);
break;
case BROADWAY_WS_CNX_PONG:
break; /* we never send pings, but tolerate pongs */
@@ -596,7 +650,8 @@ parse_input (BroadwayInput *input)
if (buf[0] != 0)
{
server->input = NULL;
if (server->input == input)
server->input = NULL;
broadway_input_free (input);
return;
}
@@ -613,7 +668,8 @@ parse_input (BroadwayInput *input)
if (len > 0 && buf[0] != 0)
{
server->input = NULL;
if (server->input == input)
server->input = NULL;
broadway_input_free (input);
break;
}
@@ -640,19 +696,16 @@ queue_process_input_at_idle (BroadwayServer *server)
}
static void
broadway_server_read_all_input_nonblocking (BroadwayServer *server)
broadway_server_read_all_input_nonblocking (BroadwayInput *input)
{
GInputStream *in;
gssize res;
guint8 buffer[1024];
GError *error;
BroadwayInput *input;
if (server->input == NULL)
if (input == NULL)
return;
input = server->input;
in = g_io_stream_get_input_stream (G_IO_STREAM (input->connection));
error = NULL;
@@ -668,7 +721,8 @@ broadway_server_read_all_input_nonblocking (BroadwayServer *server)
return;
}
server->input = NULL;
if (input->server->input == input)
input->server->input = NULL;
broadway_input_free (input);
if (res < 0)
{
@@ -686,7 +740,7 @@ broadway_server_read_all_input_nonblocking (BroadwayServer *server)
static void
broadway_server_consume_all_input (BroadwayServer *server)
{
broadway_server_read_all_input_nonblocking (server);
broadway_server_read_all_input_nonblocking (server->input);
/* Since we're parsing input but not processing the resulting messages
we might not get a readable callback on the stream, so queue an idle to
@@ -701,9 +755,10 @@ input_data_cb (GObject *stream,
{
BroadwayServer *server = input->server;
broadway_server_read_all_input_nonblocking (server);
broadway_server_read_all_input_nonblocking (input);
process_input_messages (server);
if (input->active)
process_input_messages (server);
return TRUE;
}
@@ -878,15 +933,14 @@ start_input (HttpRequest *request, gboolean binary)
gsize len;
GChecksum *checksum;
char *origin, *host;
BroadwayServer *server;
BroadwayInput *input;
const void *data_buffer;
gsize data_buffer_size;
GInputStream *in;
char *key_v7;
gboolean proto_v7_plus;
server = request->server;
GSocket *socket;
int flag = 1;
#ifdef DEBUG_WEBSOCKETS
g_print ("incoming request:\n%s\n", request->request->str);
@@ -1033,15 +1087,11 @@ start_input (HttpRequest *request, gboolean binary)
proto_v7_plus = FALSE;
}
if (server->input != NULL)
{
broadway_input_free (server->input);
server->input = NULL;
}
socket = g_socket_connection_get_socket (request->connection);
setsockopt (g_socket_get_fd (socket), IPPROTO_TCP,
TCP_NODELAY, (char *) &flag, sizeof(int));
input = g_new0 (BroadwayInput, 1);
input->server = request->server;
input->connection = g_object_ref (request->connection);
input->proto_v7_plus = proto_v7_plus;
@@ -1051,9 +1101,9 @@ start_input (HttpRequest *request, gboolean binary)
input->buffer = g_byte_array_sized_new (data_buffer_size);
g_byte_array_append (input->buffer, data_buffer, data_buffer_size);
server->input = input;
start_output (request, proto_v7_plus, binary);
input->output =
broadway_output_new (g_io_stream_get_output_stream (G_IO_STREAM (request->connection)),
0, proto_v7_plus, binary);
/* This will free and close the data input stream, but we got all the buffered content already */
http_request_free (request);
@@ -1063,35 +1113,53 @@ start_input (HttpRequest *request, gboolean binary)
g_source_set_callback (input->source, (GSourceFunc)input_data_cb, input, NULL);
g_source_attach (input->source, NULL);
if (input->server->password)
{
broadway_output_request_auth (input->output);
broadway_output_flush (input->output);
}
else
start (input);
/* Process any data in the pipe already */
parse_input (input);
process_input_messages (server);
g_strfreev (lines);
}
static void
start_output (HttpRequest *request, gboolean proto_v7_plus, gboolean binary)
start (BroadwayInput *input)
{
GSocket *socket;
BroadwayServer *server;
int flag = 1;
socket = g_socket_connection_get_socket (request->connection);
setsockopt(g_socket_get_fd (socket), IPPROTO_TCP,
TCP_NODELAY, (char *) &flag, sizeof(int));
input->active = TRUE;
server = BROADWAY_SERVER (request->server);
server = BROADWAY_SERVER (input->server);
if (server->output)
{
broadway_output_disconnected (server->output);
broadway_output_flush (server->output);
}
if (server->input != NULL)
{
broadway_input_free (server->input);
server->input = NULL;
}
server->input = input;
if (server->output)
{
server->saved_serial = broadway_output_get_next_serial (server->output);
broadway_output_free (server->output);
}
server->output = input->output;
server->output =
broadway_output_new (g_io_stream_get_output_stream (G_IO_STREAM (request->connection)),
server->saved_serial, proto_v7_plus, binary);
broadway_output_set_next_serial (server->output, server->saved_serial);
broadway_output_auth_ok (server->output);
broadway_output_flush (server->output);
broadway_server_resync_windows (server);
@@ -1099,6 +1167,8 @@ start_output (HttpRequest *request, gboolean proto_v7_plus, gboolean binary)
broadway_output_grab_pointer (server->output,
server->pointer_grab_window_id,
server->pointer_grab_owner_events);
process_input_messages (server);
}
static void
@@ -1349,6 +1419,12 @@ broadway_server_destroy_window (BroadwayServer *server,
server->toplevels = g_list_remove (server->toplevels, window);
g_hash_table_remove (server->id_ht,
GINT_TO_POINTER (id));
if (window->cached_surface_name != NULL)
g_free (window->cached_surface_name);
if (window->cached_surface != NULL)
cairo_surface_destroy (window->cached_surface);
g_free (window);
}
}
@@ -1583,6 +1659,11 @@ broadway_server_window_update (BroadwayServer *server,
window->width,
window->height);
g_assert (window->width == cairo_image_surface_get_width (window->last_surface));
g_assert (window->width == cairo_image_surface_get_width (surface));
g_assert (window->height == cairo_image_surface_get_height (window->last_surface));
g_assert (window->height == cairo_image_surface_get_height (surface));
if (server->output != NULL)
{
if (window->last_synced)
@@ -1739,6 +1820,86 @@ broadway_server_ungrab_pointer (BroadwayServer *server,
return serial;
}
static const cairo_user_data_key_t shm_cairo_key;
typedef struct {
void *data;
gsize data_size;
} ShmSurfaceData;
static void
shm_data_unmap (void *_data)
{
ShmSurfaceData *data = _data;
munmap (data->data, data->data_size);
g_free (data);
}
cairo_surface_t *
broadway_server_open_surface (BroadwayServer *server,
guint32 id,
char *name,
int width,
int height)
{
BroadwayWindow *window;
ShmSurfaceData *data;
cairo_surface_t *surface;
gsize size;
void *ptr;
int fd;
window = g_hash_table_lookup (server->id_ht,
GINT_TO_POINTER (id));
if (window == NULL)
return NULL;
if (window->cached_surface_name != NULL &&
strcmp (name, window->cached_surface_name) == 0)
return cairo_surface_reference (window->cached_surface);
size = width * height * sizeof (guint32);
fd = shm_open(name, O_RDONLY, 0600);
if (fd == -1)
{
perror ("Failed to shm_open");
return NULL;
}
ptr = mmap(0, size, PROT_READ, MAP_SHARED, fd, 0);
(void) close(fd);
shm_unlink (name);
if (ptr == NULL)
return NULL;
data = g_new0 (ShmSurfaceData, 1);
data->data = ptr;
data->data_size = size;
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, &shm_cairo_key,
data, shm_data_unmap);
if (window->cached_surface_name != NULL)
g_free (window->cached_surface_name);
window->cached_surface_name = g_strdup (name);
if (window->cached_surface != NULL)
cairo_surface_destroy (window->cached_surface);
window->cached_surface = cairo_surface_reference (surface);
return surface;
}
guint32
broadway_server_new_window (BroadwayServer *server,
int x,

View File

@@ -78,5 +78,10 @@ gboolean broadway_server_window_move_resize (BroadwayServer *
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

@@ -225,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;
@@ -496,12 +478,6 @@ function cmdMoveResizeSurface(id, has_pos, x, y, has_size, w, h)
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;
@@ -543,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();
@@ -742,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;
};
@@ -2590,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;
@@ -2631,6 +2626,47 @@ 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();
@@ -2639,7 +2675,7 @@ function connect()
var params = query_string[1].split("&");
}
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";
@@ -2652,23 +2688,13 @@ function connect()
ws.onopen = function() {
inputSocket = ws;
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]);
};
ws.onclose = function() {
if (inputSocket != null)
alert ("disconnected");
inputSocket = null;
};
ws.onmessage = function(event) {
handleMessage(event.data);
};
setupDocument(document);
}

View File

@@ -140,62 +140,6 @@ region_from_rects (BroadwayRect *rects, int n_rects)
return region;
}
static const cairo_user_data_key_t shm_cairo_key;
typedef struct {
void *data;
gsize data_size;
} ShmSurfaceData;
static void
shm_data_unmap (void *_data)
{
ShmSurfaceData *data = _data;
munmap (data->data, data->data_size);
g_free (data);
}
cairo_surface_t *
open_surface (char *name, int width, int height)
{
ShmSurfaceData *data;
cairo_surface_t *surface;
gsize size;
void *ptr;
int fd;
size = width * height * sizeof (guint32);
fd = shm_open(name, O_RDONLY, 0600);
if (fd == -1)
{
perror ("Failed to shm_open");
return NULL;
}
ptr = mmap(0, size, PROT_READ, MAP_SHARED, fd, 0);
(void) close(fd);
if (ptr == NULL)
return NULL;
data = g_new0 (ShmSurfaceData, 1);
data->data = ptr;
data->data_size = size;
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, &shm_cairo_key,
data, shm_data_unmap);
return surface;
}
void
add_client_serial_mapping (BroadwayClient *client,
guint32 client_serial,
@@ -337,9 +281,11 @@ client_handle_request (BroadwayClient *client,
cairo_region_destroy (area);
break;
case BROADWAY_REQUEST_UPDATE:
surface = open_surface (request->update.name,
request->update.width,
request->update.height);
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,
@@ -409,7 +355,6 @@ client_fill_cb (GObject *source_object,
guint32 size;
gsize count, remaining;
guint8 *buffer;
BroadwayRequest request;
buffer = (guint8 *)g_buffered_input_stream_peek_buffer (client->in, &count);
@@ -417,14 +362,10 @@ client_fill_cb (GObject *source_object,
while (remaining >= sizeof (guint32))
{
memcpy (&size, buffer, sizeof (guint32));
if (size <= remaining)
{
g_assert (size >= sizeof (BroadwayRequestBase));
g_assert (size <= sizeof (BroadwayRequest));
memcpy (&request, buffer, size);
client_handle_request (client, &request);
client_handle_request (client, (BroadwayRequest *)buffer);
remaining -= size;
buffer += size;

View File

@@ -506,7 +506,7 @@ make_valid_fs_char (char c)
{
char chars[] = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ01234567890";
return chars[c % sizeof (chars)];
return chars[c % (sizeof (chars) - 1)];
}
/* name must have at least space for 34 bytes */
@@ -550,7 +550,7 @@ create_random_shm (char *name)
static const cairo_user_data_key_t gdk_broadway_shm_cairo_key;
typedef struct {
char name[34];
char name[36];
void *data;
gsize data_size;
} BroadwayShmSurfaceData;
@@ -582,6 +582,13 @@ _gdk_broadway_server_create_surface (int width,
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);
@@ -610,7 +617,7 @@ _gdk_broadway_server_window_update (GdkBroadwayServer *server,
g_assert (data != NULL);
msg.id = id;
memcpy (msg.name, data->name, 34);
memcpy (msg.name, data->name, 36);
msg.width = cairo_image_surface_get_width (surface);
msg.height = cairo_image_surface_get_height (surface);

View File

@@ -157,7 +157,7 @@ gdk_broadway_device_query_state (GdkDevice *device,
GdkBroadwayDisplay *broadway_display;
GdkScreen *screen;
gint32 device_root_x, device_root_y;
gint32 mouse_toplevel_id;
guint32 mouse_toplevel_id;
GdkWindow *mouse_toplevel;
guint32 mask32;
@@ -181,14 +181,14 @@ gdk_broadway_device_query_state (GdkDevice *device,
&device_root_x,
&device_root_y,
&mask32);
mouse_toplevel = g_hash_table_lookup (broadway_display->id_ht, GINT_TO_POINTER (mouse_toplevel_id));
mouse_toplevel = g_hash_table_lookup (broadway_display->id_ht, GUINT_TO_POINTER (mouse_toplevel_id));
if (root_x)
*root_x = device_root_x;
if (root_y)
*root_y = device_root_y;
if (win_x)
*win_x = device_root_y - toplevel->x;
*win_x = device_root_x - toplevel->x;
if (win_y)
*win_y = device_root_y - toplevel->y;
if (mask)
@@ -211,6 +211,29 @@ gdk_broadway_device_query_state (GdkDevice *device,
return;
}
void
_gdk_broadway_window_grab_check_unmap (GdkWindow *window,
gulong serial)
{
GdkDisplay *display = gdk_window_get_display (window);
GdkDeviceManager *device_manager;
GList *devices, *d;
device_manager = gdk_display_get_device_manager (display);
/* Get all devices */
devices = gdk_device_manager_list_devices (device_manager, GDK_DEVICE_TYPE_MASTER);
devices = g_list_concat (devices, gdk_device_manager_list_devices (device_manager, GDK_DEVICE_TYPE_SLAVE));
devices = g_list_concat (devices, gdk_device_manager_list_devices (device_manager, GDK_DEVICE_TYPE_FLOATING));
/* End all grabs on the newly hidden window */
for (d = devices; d; d = d->next)
_gdk_display_end_device_grab (display, d->data, serial, window, TRUE);
g_list_free (devices);
}
void
_gdk_broadway_window_grab_check_destroy (GdkWindow *window)
{

View File

@@ -66,6 +66,8 @@ struct _GdkBroadwayDisplay
GdkWindow *active_offscreen_window;
GdkBroadwayServer *server;
gpointer move_resize_data;
};
struct _GdkBroadwayDisplayClass

View File

@@ -61,7 +61,11 @@ gdk_event_source_prepare (GSource *source,
gdk_threads_enter ();
*timeout = -1;
retval = (_gdk_event_queue_find_first (display) != NULL);
if (display->event_pause_count > 0)
retval = FALSE;
else
retval = (_gdk_event_queue_find_first (display) != NULL);
gdk_threads_leave ();
@@ -76,7 +80,9 @@ gdk_event_source_check (GSource *source)
gdk_threads_enter ();
if (event_source->event_poll_fd.revents & G_IO_IN)
if (event_source->display->event_pause_count > 0)
retval = FALSE;
else if (event_source->event_poll_fd.revents & G_IO_IN)
retval = (_gdk_event_queue_find_first (event_source->display) != NULL);
else
retval = FALSE;
@@ -241,7 +247,7 @@ _gdk_broadway_events_got_input (BroadwayInputMsg *message)
break;
case BROADWAY_EVENT_GRAB_NOTIFY:
case BROADWAY_EVENT_UNGRAB_NOTIFY:
_gdk_display_device_grab_update (display, display->core_pointer, NULL, message->base.serial);
_gdk_display_device_grab_update (display, display->core_pointer, display->core_pointer, message->base.serial);
break;
case BROADWAY_EVENT_CONFIGURE_NOTIFY:
@@ -250,10 +256,6 @@ _gdk_broadway_events_got_input (BroadwayInputMsg *message)
{
window->x = message->configure_notify.x;
window->y = message->configure_notify.y;
window->width = message->configure_notify.width;
window->height = message->configure_notify.height;
_gdk_window_update_size (window);
_gdk_broadway_window_resize_surface (window);
event = gdk_event_new (GDK_CONFIGURE);
event->configure.window = g_object_ref (window);

View File

@@ -92,6 +92,8 @@ gboolean _gdk_broadway_moveresize_configure_done (GdkDisplay *display,
void _gdk_broadway_selection_window_destroyed (GdkWindow *window);
void _gdk_broadway_window_grab_check_destroy (GdkWindow *window);
void _gdk_broadway_window_grab_check_unmap (GdkWindow *window,
gulong serial);
void _gdk_keymap_keys_changed (GdkDisplay *display);
gint _gdk_broadway_get_group_for_state (GdkDisplay *display,

View File

@@ -83,18 +83,16 @@ G_DEFINE_TYPE (GdkWindowImplBroadway,
gdk_window_impl_broadway,
GDK_TYPE_WINDOW_IMPL)
static guint dirty_flush_id = 0;
static gboolean
dirty_flush_idle (gpointer data)
static void
update_dirty_windows_and_sync (void)
{
GList *l;
GdkBroadwayDisplay *display;
dirty_flush_id = 0;
gboolean updated_surface;
display = GDK_BROADWAY_DISPLAY (gdk_display_get_default ());
updated_surface = FALSE;
for (l = display->toplevels; l != NULL; l = l->next)
{
GdkWindowImplBroadway *impl = l->data;
@@ -102,6 +100,7 @@ dirty_flush_idle (gpointer data)
if (impl->dirty)
{
impl->dirty = FALSE;
updated_surface = TRUE;
_gdk_broadway_server_window_update (display->server,
impl->id,
impl->surface);
@@ -110,16 +109,32 @@ dirty_flush_idle (gpointer data)
/* We sync here to ensure all references to the impl->surface memory
is done, as we may later paint new data in them. */
gdk_display_sync (GDK_DISPLAY (display));
if (updated_surface)
gdk_display_sync (GDK_DISPLAY (display));
else
gdk_display_flush (GDK_DISPLAY (display));
}
static guint flush_id = 0;
static gboolean
flush_idle (gpointer data)
{
flush_id = 0;
gdk_display_flush (gdk_display_get_default ());
return FALSE;
}
/* We need to flush in an idle rather than AFTER_PAINT, as the clock
is frozen during e.g. window resizes so the paint will not happen
and the window resize request is never flushed. */
static void
queue_dirty_flush (GdkBroadwayDisplay *display)
queue_flush (GdkWindow *window)
{
if (dirty_flush_id == 0)
dirty_flush_id = gdk_threads_add_idle (dirty_flush_idle, NULL);
if (flush_id == 0)
flush_id = gdk_threads_add_idle (flush_idle, NULL);
}
static void
@@ -197,6 +212,25 @@ _gdk_broadway_screen_init_root_window (GdkScreen * screen)
_gdk_window_update_size (broadway_screen->root_window);
}
static void
on_frame_clock_after_paint (GdkFrameClock *clock,
GdkWindow *window)
{
update_dirty_windows_and_sync ();
}
static void
connect_frame_clock (GdkWindow *window)
{
if (WINDOW_IS_TOPLEVEL (window))
{
GdkFrameClock *frame_clock = gdk_window_get_frame_clock (window);
g_signal_connect (frame_clock, "after-paint",
G_CALLBACK (on_frame_clock_after_paint), window);
}
}
void
_gdk_broadway_display_create_window_impl (GdkDisplay *display,
GdkWindow *window,
@@ -229,22 +263,21 @@ _gdk_broadway_display_create_window_impl (GdkDisplay *display,
g_assert (GDK_WINDOW_TYPE (window->parent) == GDK_WINDOW_ROOT);
broadway_display->toplevels = g_list_prepend (broadway_display->toplevels, impl);
connect_frame_clock (window);
}
void
_gdk_broadway_window_resize_surface (GdkWindow *window)
{
GdkWindowImplBroadway *impl = GDK_WINDOW_IMPL_BROADWAY (window->impl);
cairo_surface_t *old;
if (impl->surface)
{
old = impl->surface;
cairo_surface_destroy (impl->surface);
impl->surface = _gdk_broadway_server_create_surface (gdk_window_get_width (impl->wrapper),
gdk_window_get_height (impl->wrapper));
cairo_surface_destroy (old);
}
if (impl->ref_surface)
@@ -384,7 +417,7 @@ gdk_window_broadway_show (GdkWindow *window, gboolean already_mapped)
broadway_display = GDK_BROADWAY_DISPLAY (gdk_window_get_display (window));
if (_gdk_broadway_server_window_show (broadway_display->server, impl->id))
queue_dirty_flush (broadway_display);
queue_flush (window);
}
@@ -404,8 +437,12 @@ gdk_window_broadway_hide (GdkWindow *window)
_gdk_make_event (GDK_WINDOW (window), GDK_UNMAP, NULL, FALSE);
broadway_display = GDK_BROADWAY_DISPLAY (gdk_window_get_display (window));
_gdk_broadway_window_grab_check_unmap (window,
_gdk_broadway_server_get_next_serial (broadway_display->server));
if (_gdk_broadway_server_window_hide (broadway_display->server, impl->id))
queue_dirty_flush (broadway_display);
queue_flush (window);
_gdk_window_clear_update_area (window);
}
@@ -460,7 +497,7 @@ gdk_window_broadway_move_resize (GdkWindow *window,
with_move,
x, y,
window->width, window->height);
queue_dirty_flush (broadway_display);
queue_flush (window);
if (size_changed)
window->resize_count++;
}
@@ -545,6 +582,12 @@ gdk_broadway_window_set_geometry_hints (GdkWindow *window,
const GdkGeometry *geometry,
GdkWindowHints geom_mask)
{
GdkWindowImplBroadway *impl;
impl = GDK_WINDOW_IMPL_BROADWAY (window->impl);
impl->geometry_hints = *geometry;
impl->geometry_hints_mask = geom_mask;
}
static void
@@ -610,7 +653,7 @@ gdk_window_broadway_set_device_cursor (GdkWindow *window,
{
_gdk_broadway_cursor_update_theme (cursor);
g_hash_table_replace (impl->device_cursor,
device, gdk_cursor_ref (cursor));
device, g_object_ref (cursor));
}
if (!GDK_WINDOW_DESTROYED (window))
@@ -992,6 +1035,8 @@ struct _MoveResizeData
gint moveresize_orig_width;
gint moveresize_orig_height;
long moveresize_process_time;
GdkWindowHints moveresize_geom_mask;
GdkGeometry moveresize_geometry;
BroadwayInputMsg *moveresize_pending_event;
};
@@ -999,20 +1044,19 @@ static MoveResizeData *
get_move_resize_data (GdkDisplay *display,
gboolean create)
{
GdkBroadwayDisplay *broadway_display;
MoveResizeData *mv_resize;
static GQuark move_resize_quark = 0;
if (!move_resize_quark)
move_resize_quark = g_quark_from_static_string ("gdk-window-moveresize");
broadway_display = GDK_BROADWAY_DISPLAY (display);
mv_resize = g_object_get_qdata (G_OBJECT (display), move_resize_quark);
mv_resize = broadway_display->move_resize_data;
if (!mv_resize && create)
{
mv_resize = g_new0 (MoveResizeData, 1);
mv_resize->display = display;
g_object_set_qdata (G_OBJECT (display), move_resize_quark, mv_resize);
broadway_display->move_resize_data = mv_resize;
}
return mv_resize;
@@ -1081,6 +1125,13 @@ update_pos (MoveResizeData *mv_resize,
w = MAX (w, 1);
h = MAX (h, 1);
if (mv_resize->moveresize_geom_mask)
{
gdk_window_constrain_size (&mv_resize->moveresize_geometry,
mv_resize->moveresize_geom_mask,
w, h, &w, &h);
}
gdk_window_move_resize (mv_resize->moveresize_window, x, y, w, h);
}
else
@@ -1135,7 +1186,7 @@ _gdk_broadway_moveresize_handle_event (GdkDisplay *display,
switch (event->base.type)
{
case 'm':
case BROADWAY_EVENT_POINTER_MOVE:
if (mv_resize->moveresize_window->resize_count > 0)
{
if (mv_resize->moveresize_pending_event)
@@ -1163,7 +1214,7 @@ _gdk_broadway_moveresize_handle_event (GdkDisplay *display,
finish_drag (mv_resize);
break;
case 'B':
case BROADWAY_EVENT_BUTTON_RELEASE:
update_pos (mv_resize,
event->pointer.root_x,
event->pointer.root_y);
@@ -1243,6 +1294,71 @@ create_moveresize_window (MoveResizeData *mv_resize,
mv_resize->moveresize_process_time = 0;
}
static void
calculate_unmoving_origin (MoveResizeData *mv_resize)
{
GdkRectangle rect;
gint width, height;
if (mv_resize->moveresize_geom_mask & GDK_HINT_WIN_GRAVITY &&
mv_resize->moveresize_geometry.win_gravity == GDK_GRAVITY_STATIC)
{
gdk_window_get_origin (mv_resize->moveresize_window,
&mv_resize->moveresize_orig_x,
&mv_resize->moveresize_orig_y);
}
else
{
gdk_window_get_frame_extents (mv_resize->moveresize_window, &rect);
gdk_window_get_geometry (mv_resize->moveresize_window,
NULL, NULL, &width, &height);
switch (mv_resize->moveresize_geometry.win_gravity)
{
case GDK_GRAVITY_NORTH_WEST:
mv_resize->moveresize_orig_x = rect.x;
mv_resize->moveresize_orig_y = rect.y;
break;
case GDK_GRAVITY_NORTH:
mv_resize->moveresize_orig_x = rect.x + rect.width / 2 - width / 2;
mv_resize->moveresize_orig_y = rect.y;
break;
case GDK_GRAVITY_NORTH_EAST:
mv_resize->moveresize_orig_x = rect.x + rect.width - width;
mv_resize->moveresize_orig_y = rect.y;
break;
case GDK_GRAVITY_WEST:
mv_resize->moveresize_orig_x = rect.x;
mv_resize->moveresize_orig_y = rect.y + rect.height / 2 - height / 2;
break;
case GDK_GRAVITY_CENTER:
mv_resize->moveresize_orig_x = rect.x + rect.width / 2 - width / 2;
mv_resize->moveresize_orig_y = rect.y + rect.height / 2 - height / 2;
break;
case GDK_GRAVITY_EAST:
mv_resize->moveresize_orig_x = rect.x + rect.width - width;
mv_resize->moveresize_orig_y = rect.y + rect.height / 2 - height / 2;
break;
case GDK_GRAVITY_SOUTH_WEST:
mv_resize->moveresize_orig_x = rect.x;
mv_resize->moveresize_orig_y = rect.y + rect.height - height;
break;
case GDK_GRAVITY_SOUTH:
mv_resize->moveresize_orig_x = rect.x + rect.width / 2 - width / 2;
mv_resize->moveresize_orig_y = rect.y + rect.height - height;
break;
case GDK_GRAVITY_SOUTH_EAST:
mv_resize->moveresize_orig_x = rect.x + rect.width - width;
mv_resize->moveresize_orig_y = rect.y + rect.height - height;
break;
default:
mv_resize->moveresize_orig_x = rect.x;
mv_resize->moveresize_orig_y = rect.y;
break;
}
}
}
static void
gdk_broadway_window_begin_resize_drag (GdkWindow *window,
GdkWindowEdge edge,
@@ -1252,16 +1368,15 @@ gdk_broadway_window_begin_resize_drag (GdkWindow *window,
gint root_y,
guint32 timestamp)
{
GdkBroadwayDisplay *broadway_display;
MoveResizeData *mv_resize;
GdkWindowImplBroadway *impl;
impl = GDK_WINDOW_IMPL_BROADWAY (window->impl);
if (GDK_WINDOW_DESTROYED (window) ||
!WINDOW_IS_TOPLEVEL_OR_FOREIGN (window))
return;
/* We need a connection to be able to get mouse events, if not, punt */
broadway_display = GDK_BROADWAY_DISPLAY (gdk_window_get_display (window));
mv_resize = get_move_resize_data (GDK_WINDOW_DISPLAY (window), TRUE);
mv_resize->is_resize = TRUE;
@@ -1271,12 +1386,14 @@ gdk_broadway_window_begin_resize_drag (GdkWindow *window,
mv_resize->moveresize_y = root_y;
mv_resize->moveresize_window = g_object_ref (window);
gdk_window_get_origin (mv_resize->moveresize_window,
&mv_resize->moveresize_orig_x,
&mv_resize->moveresize_orig_y);
mv_resize->moveresize_orig_width = gdk_window_get_width (window);
mv_resize->moveresize_orig_height = gdk_window_get_height (window);
mv_resize->moveresize_geom_mask = impl->geometry_hints_mask;
mv_resize->moveresize_geometry = impl->geometry_hints;
calculate_unmoving_origin (mv_resize);
create_moveresize_window (mv_resize, timestamp);
}
@@ -1332,7 +1449,6 @@ gdk_broadway_window_process_updates_recurse (GdkWindow *window,
impl = GDK_WINDOW_IMPL_BROADWAY (window->impl);
impl->dirty = TRUE;
queue_dirty_flush (GDK_BROADWAY_DISPLAY (gdk_window_get_display (window)));
}
void
@@ -1398,7 +1514,7 @@ _gdk_broadway_window_translate (GdkWindow *window,
if (_gdk_broadway_server_window_translate (broadway_display->server,
impl->id,
area, dx, dy))
queue_dirty_flush (broadway_display);
queue_flush (window);
}
}

View File

@@ -64,6 +64,9 @@ struct _GdkWindowImplBroadway
gint8 toplevel_window_type;
gboolean dirty;
gboolean last_synced;
GdkGeometry geometry_hints;
GdkWindowHints geometry_hints_mask;
};
struct _GdkWindowImplBroadwayClass

View File

@@ -42,3 +42,15 @@ isinf (double x)
return (!_finite (x) && !_isnan (x));
}
#endif
/* Workaround for round() for non-GCC/non-C99 compilers */
#ifndef HAVE_ROUND
static inline double
round (double x)
{
if (x >= 0)
return floor (x + 0.5);
else
return ceil (x - 0.5);
}
#endif

View File

@@ -139,7 +139,8 @@ static const GDebugKey gdk_debug_keys[] = {
{"xinerama", GDK_DEBUG_XINERAMA},
{"draw", GDK_DEBUG_DRAW},
{"eventloop", GDK_DEBUG_EVENTLOOP},
{"frames", GDK_DEBUG_FRAMES}
{"frames", GDK_DEBUG_FRAMES},
{"settings", GDK_DEBUG_SETTINGS}
};
static gboolean

View File

@@ -40,6 +40,8 @@
#include <gdk/gdkdnd.h>
#include <gdk/gdkenumtypes.h>
#include <gdk/gdkevents.h>
#include <gdk/gdkframeclock.h>
#include <gdk/gdkframetimings.h>
#include <gdk/gdkkeys.h>
#include <gdk/gdkkeysyms.h>
#include <gdk/gdkmain.h>

View File

@@ -610,6 +610,7 @@ gdk_x11_window_set_theme_variant
gdk_x11_window_set_hide_titlebar_when_maximized
gdk_x11_window_set_user_time
gdk_x11_window_set_utf8_property
gdk_x11_window_set_frame_sync_enabled
gdk_x11_xatom_to_atom
gdk_x11_xatom_to_atom_for_display
#endif

View File

@@ -213,7 +213,7 @@ gdk_cairo_set_source_pixbuf (cairo_t *cr,
format = CAIRO_FORMAT_ARGB32;
cairo_stride = cairo_format_stride_for_width (format, width);
cairo_pixels = g_malloc (height * cairo_stride);
cairo_pixels = g_malloc_n (height, cairo_stride);
surface = cairo_image_surface_create_for_data ((unsigned char *)cairo_pixels,
format,
width, height, cairo_stride);
@@ -250,7 +250,7 @@ gdk_cairo_set_source_pixbuf (cairo_t *cr,
guchar *end = p + 4 * width;
guint t1,t2,t3;
#define MULT(d,c,a,t) G_STMT_START { t = c * a + 0x7f; d = ((t >> 8) + t) >> 8; } G_STMT_END
#define MULT(d,c,a,t) G_STMT_START { t = c * a + 0x80; d = ((t >> 8) + t) >> 8; } G_STMT_END
while (p < end)
{

View File

@@ -330,7 +330,7 @@ gdk_device_manager_list_devices (GdkDeviceManager *device_manager,
* for this application. In X11, window managers may change this depending on the interaction
* pattern under the presence of several pointers.
*
* You should use this function sheldomly, only in code that isn't triggered by a #GdkEvent
* You should use this function seldomly, only in code that isn't triggered by a #GdkEvent
* and there aren't other means to get a meaningful #GdkDevice to operate on.
*
* Returns: (transfer none): The client pointer. This memory is

View File

@@ -30,7 +30,7 @@
#include "gdkinternals.h"
/**
* SECTION:frameclock
* SECTION:gdkframeclock
* @Short_description: Frame clock syncs painting to a window or display
* @Title: Frame clock
*
@@ -52,10 +52,10 @@
* sense for the synchronization being implemented, the clock will
* process a frame and emit signals for each phase that has been
* requested. (See the signals of the #GdkFrameClock class for
* documentation of the phases. GDK_FRAME_CLOCK_PHASE_UPDATE and the
* ::update signal are most interesting for application writers, and
* are used to update the animations, using the frame time given by
* gdk_frame_clock_get_frame_time().
* documentation of the phases. %GDK_FRAME_CLOCK_PHASE_UPDATE and the
* #GdkFrameClock::update signal are most interesting for application
* writers, and are used to update the animations, using the frame time
* given by gdk_frame_clock_get_frame_time().
*
* The frame time is reported in microseconds and generally in the same
* timescale as g_get_monotonic_time(), however, it is not the same
@@ -65,8 +65,8 @@
* are called at a "similar" time get the same value. This means that
* if different animations are timed by looking at the difference in
* time between an initial value from gdk_frame_clock_get_frame_time()
* and the value inside the ::update signal of the clock, they will
* stay exactly synchronized.
* and the value inside the #GdkFrameClock::update signal of the clock,
* they will stay exactly synchronized.
*/
G_DEFINE_ABSTRACT_TYPE (GdkFrameClock, gdk_frame_clock, G_TYPE_OBJECT)
@@ -174,7 +174,7 @@ gdk_frame_clock_class_init (GdkFrameClockClass *klass)
* This signal is emitted as the second step of toolkit and
* application processing of the frame. Any work to update
* sizes and positions of application elements should be
* performed. GTK normally handles this internally.
* performed. GTK+ normally handles this internally.
*/
signals[LAYOUT] =
g_signal_new (g_intern_static_string ("layout"),
@@ -192,8 +192,8 @@ gdk_frame_clock_class_init (GdkFrameClockClass *klass)
* This signal is emitted as the third step of toolkit and
* application processing of the frame. The frame is
* repainted. GDK normally handles this internally and
* produce expose events, which are turned into GTK
* GtkWidget::draw signals.
* produces expose events, which are turned into GTK+
* #GtkWidget::draw signals.
*/
signals[PAINT] =
g_signal_new (g_intern_static_string ("paint"),
@@ -280,11 +280,12 @@ gdk_frame_clock_get_frame_time (GdkFrameClock *frame_clock)
/**
* gdk_frame_clock_request_phase:
* @frame_clock: a #GdkFrameClock
* @phase: the phase that is requested
*
* Asks the frame clock to run a particular phase. The signal
* corresponding the requested phase will be emitted the next
* time the frame clock processes. Multiple calls to
* gdk_frame_clock_request_phase() will be combined togethe
* gdk_frame_clock_request_phase() will be combined together
* and only one frame processed. If you are displaying animated
* content and want to continually request the
* %GDK_FRAME_CLOCK_PHASE_UPDATE phase for a period of time,

View File

@@ -58,7 +58,7 @@ typedef struct _GdkFrameClockClass GdkFrameClockClass;
* @GDK_FRAME_CLOCK_PHASE_AFTER_PAINT: corresponds to GdkFrameClock::after-paint. Should not be handled by applications.
*
* #GdkFrameClockPhase is used to represent the different paint clock
* phases that can be requested. The element of the enumeration
* phases that can be requested. The elements of the enumeration
* correspond to the signals of #GdkPaintClock.
*
* Since: 3.8

View File

@@ -35,7 +35,7 @@
#include <windows.h>
#endif
#define FRAME_INTERVAL 16667 // microseconds
#define FRAME_INTERVAL 16667 /* microseconds */
struct _GdkFrameClockIdlePrivate
{
@@ -247,7 +247,8 @@ maybe_start_idle (GdkFrameClockIdle *clock_idle)
(GDestroyNotify) g_object_unref);
}
if (priv->paint_idle_id == 0 && RUN_PAINT_IDLE (priv))
if (!priv->in_paint_idle &&
priv->paint_idle_id == 0 && RUN_PAINT_IDLE (priv))
{
priv->paint_idle_id = gdk_threads_add_timeout_full (GDK_PRIORITY_REDRAW,
min_interval,
@@ -364,11 +365,13 @@ gdk_frame_clock_paint_idle (void *data)
/* We always emit ::before-paint and ::after-paint if
* any of the intermediate phases are requested and
* they don't get repeated if you freeze/thaw while
* in them. */
* in them.
*/
priv->requested &= ~GDK_FRAME_CLOCK_PHASE_BEFORE_PAINT;
g_signal_emit_by_name (G_OBJECT (clock), "before-paint");
priv->phase = GDK_FRAME_CLOCK_PHASE_UPDATE;
}
/* fallthrough */
case GDK_FRAME_CLOCK_PHASE_UPDATE:
if (priv->freeze_count == 0)
{
@@ -379,6 +382,7 @@ gdk_frame_clock_paint_idle (void *data)
g_signal_emit_by_name (G_OBJECT (clock), "update");
}
}
/* fallthrough */
case GDK_FRAME_CLOCK_PHASE_LAYOUT:
if (priv->freeze_count == 0)
{
@@ -398,6 +402,7 @@ gdk_frame_clock_paint_idle (void *data)
g_signal_emit_by_name (G_OBJECT (clock), "layout");
}
}
/* fallthrough */
case GDK_FRAME_CLOCK_PHASE_PAINT:
if (priv->freeze_count == 0)
{
@@ -417,6 +422,7 @@ gdk_frame_clock_paint_idle (void *data)
g_signal_emit_by_name (G_OBJECT (clock), "paint");
}
}
/* fallthrough */
case GDK_FRAME_CLOCK_PHASE_AFTER_PAINT:
if (priv->freeze_count == 0)
{
@@ -431,6 +437,7 @@ gdk_frame_clock_paint_idle (void *data)
timings->frame_end_time = g_get_monotonic_time ();
#endif /* G_ENABLE_DEBUG */
}
/* fallthrough */
case GDK_FRAME_CLOCK_PHASE_RESUME_EVENTS:
;
}
@@ -439,7 +446,7 @@ gdk_frame_clock_paint_idle (void *data)
#ifdef G_ENABLE_DEBUG
if ((_gdk_debug_flags & GDK_DEBUG_FRAMES) != 0)
{
if (timings->complete)
if (timings && timings->complete)
_gdk_frame_clock_debug_print_timings (clock, timings);
}
#endif /* G_ENABLE_DEBUG */
@@ -546,7 +553,8 @@ gdk_frame_clock_idle_thaw (GdkFrameClock *clock)
maybe_start_idle (clock_idle);
/* If nothing is requested so we didn't start an idle, we need
* to skip to the end of the state chain, since the idle won't
* run and do it for us. */
* run and do it for us.
*/
if (priv->paint_idle_id == 0)
priv->phase = GDK_FRAME_CLOCK_PHASE_NONE;

View File

@@ -20,7 +20,7 @@
#include "gdkframeclockprivate.h"
/**
* SECTION:frametimings
* SECTION:gdkframetimings
* @Short_description: Object holding timing information for a single frame
* @Title: Frame timings
*
@@ -106,7 +106,7 @@ gdk_frame_timings_get_frame_counter (GdkFrameTimings *timings)
}
/**
* gdk_frame_timings_complete:
* gdk_frame_timings_get_complete:
* @timings: a #GdkFrameTimings
*
* The timing information in a #GdkFrameTimings is filled in

View File

@@ -83,7 +83,8 @@ typedef enum {
GDK_DEBUG_XINERAMA = 1 << 8,
GDK_DEBUG_DRAW = 1 << 9,
GDK_DEBUG_EVENTLOOP = 1 << 10,
GDK_DEBUG_FRAMES = 1 << 11
GDK_DEBUG_FRAMES = 1 << 11,
GDK_DEBUG_SETTINGS = 1 << 12
} GdkDebugFlag;
typedef enum {

View File

@@ -42,6 +42,9 @@
#include <math.h>
/* for the use of round() */
#include "fallback-c89.c"
#undef DEBUG_WINDOW_PRINTING
@@ -271,9 +274,10 @@ print_region (cairo_region_t *region)
}
else
{
int i;
cairo_region_get_extents (region, &r);
g_string_append_printf (s, "extent: %dx%d @%d,%d, details: ", r.width, r.height, r.x, r.y);
for (int i = 0; i < num; i++)
for (i = 0; i < num; i++)
{
g_string_append_printf (s, "[%dx%d @%d,%d]", r.width, r.height, r.x, r.y);
if (i != num -1)
@@ -936,19 +940,26 @@ static void
apply_clip_as_shape (GdkWindow *window)
{
GdkRectangle r;
cairo_region_t *region;
r.x = r.y = 0;
r.width = window->width;
r.height = window->height;
region = cairo_region_copy (window->clip_region);
if (window->layered_region)
cairo_region_subtract (region, window->layered_region);
/* We only apply the clip region if would differ
from the actual clip region implied by the size
of the window. This is to avoid unneccessarily
adding meaningless shapes to all native subwindows */
if (!region_rect_equal (window->clip_region, &r))
apply_shape (window, window->clip_region);
if (!region_rect_equal (region, &r))
apply_shape (window, region);
else
apply_shape (window, NULL);
cairo_region_destroy (region);
}
static void
@@ -9991,6 +10002,13 @@ gdk_window_print (GdkWindow *window,
g_print (" abs[%d,%d]",
window->abs_x, window->abs_y);
if (window->alpha != 255)
g_print (" alpha[%d]",
window->alpha);
if (window->has_alpha_background)
g_print (" alpha_bg");
s = print_region (window->clip_region);
g_print (" clipbox[%s]", s);

View File

@@ -1,6 +1,7 @@
/* GdkQuartzView.m
*
* Copyright (C) 2005-2007 Imendio AB
* Copyright (C) 2011 Hiroyuki Yamamoto
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
@@ -23,18 +24,541 @@
@implementation GdkQuartzView
-(id)initWithFrame: (NSRect)frameRect
{
if ((self = [super initWithFrame: frameRect]))
{
markedRange = NSMakeRange (NSNotFound, 0);
selectedRange = NSMakeRange (NSNotFound, 0);
}
return self;
}
-(BOOL)acceptsFirstResponder
{
GDK_NOTE (EVENTS, g_print ("acceptsFirstResponder\n"));
return YES;
}
-(BOOL)becomeFirstResponder
{
GDK_NOTE (EVENTS, g_print ("becomeFirstResponder\n"));
return YES;
}
-(BOOL)resignFirstResponder
{
GDK_NOTE (EVENTS, g_print ("resignFirstResponder\n"));
return YES;
}
-(void) keyDown: (NSEvent *) theEvent
{
GDK_NOTE (EVENTS, g_print ("keyDown\n"));
[self interpretKeyEvents: [NSArray arrayWithObject: theEvent]];
}
-(void)flagsChanged: (NSEvent *) theEvent
{
}
-(NSUInteger)characterIndexForPoint: (NSPoint)aPoint
{
GDK_NOTE (EVENTS, g_print ("characterIndexForPoint\n"));
return 0;
}
-(NSRect)firstRectForCharacterRange: (NSRange)aRange actualRange: (NSRangePointer)actualRange
{
GDK_NOTE (EVENTS, g_print ("firstRectForCharacterRange\n"));
gint ns_x, ns_y;
GdkRectangle *rect;
rect = g_object_get_data (G_OBJECT (gdk_window), GIC_CURSOR_RECT);
if (rect)
{
_gdk_quartz_window_gdk_xy_to_xy (rect->x, rect->y + rect->height,
&ns_x, &ns_y);
return NSMakeRect (ns_x, ns_y, rect->width, rect->height);
}
else
{
return NSMakeRect (0, 0, 0, 0);
}
}
-(NSArray *)validAttributesForMarkedText
{
GDK_NOTE (EVENTS, g_print ("validAttributesForMarkedText\n"));
return [NSArray arrayWithObjects: NSUnderlineStyleAttributeName, nil];
}
-(NSAttributedString *)attributedSubstringForProposedRange: (NSRange)aRange actualRange: (NSRangePointer)actualRange
{
GDK_NOTE (EVENTS, g_print ("attributedSubstringForProposedRange\n"));
return nil;
}
-(BOOL)hasMarkedText
{
GDK_NOTE (EVENTS, g_print ("hasMarkedText\n"));
return markedRange.location != NSNotFound && markedRange.length != 0;
}
-(NSRange)markedRange
{
GDK_NOTE (EVENTS, g_print ("markedRange\n"));
return markedRange;
}
-(NSRange)selectedRange
{
GDK_NOTE (EVENTS, g_print ("selectedRange\n"));
return selectedRange;
}
-(void)unmarkText
{
GDK_NOTE (EVENTS, g_print ("unmarkText\n"));
gchar *prev_str;
markedRange = selectedRange = NSMakeRange (NSNotFound, 0);
prev_str = g_object_get_data (G_OBJECT (gdk_window), TIC_MARKED_TEXT);
if (prev_str)
g_free (prev_str);
g_object_set_data (G_OBJECT (gdk_window), TIC_MARKED_TEXT, NULL);
}
-(void)setMarkedText: (id)aString selectedRange: (NSRange)newSelection replacementRange: (NSRange)replacementRange
{
GDK_NOTE (EVENTS, g_print ("setMarkedText\n"));
const char *str;
gchar *prev_str;
if (replacementRange.location == NSNotFound)
{
markedRange = NSMakeRange (newSelection.location, [aString length]);
selectedRange = NSMakeRange (newSelection.location, newSelection.length);
}
else {
markedRange = NSMakeRange (replacementRange.location, [aString length]);
selectedRange = NSMakeRange (replacementRange.location + newSelection.location, newSelection.length);
}
if ([aString isKindOfClass: [NSAttributedString class]])
{
str = [[aString string] UTF8String];
}
else {
str = [aString UTF8String];
}
prev_str = g_object_get_data (G_OBJECT (gdk_window), TIC_MARKED_TEXT);
if (prev_str)
g_free (prev_str);
g_object_set_data (G_OBJECT (gdk_window), TIC_MARKED_TEXT, g_strdup (str));
g_object_set_data (G_OBJECT (gdk_window), TIC_SELECTED_POS,
GUINT_TO_POINTER (selectedRange.location));
g_object_set_data (G_OBJECT (gdk_window), TIC_SELECTED_LEN,
GUINT_TO_POINTER (selectedRange.length));
GDK_NOTE (EVENTS, g_print ("setMarkedText: set %s (%p, nsview %p): %s\n",
TIC_MARKED_TEXT, gdk_window, self,
str ? str : "(empty)"));
/* handle text input changes by mouse events */
if (!GPOINTER_TO_UINT (g_object_get_data (G_OBJECT (gdk_window),
TIC_IN_KEY_DOWN)))
{
_gdk_quartz_synthesize_null_key_event(gdk_window);
}
}
-(void)doCommandBySelector: (SEL)aSelector
{
GDK_NOTE (EVENTS, g_print ("doCommandBySelector\n"));
if ([self respondsToSelector: aSelector])
[self performSelector: aSelector];
}
-(void)insertText: (id)aString replacementRange: (NSRange)replacementRange
{
GDK_NOTE (EVENTS, g_print ("insertText\n"));
const char *str;
NSString *string;
gchar *prev_str;
if ([self hasMarkedText])
[self unmarkText];
if ([aString isKindOfClass: [NSAttributedString class]])
string = [aString string];
else
string = aString;
NSCharacterSet *ctrlChars = [NSCharacterSet controlCharacterSet];
NSCharacterSet *wsnlChars = [NSCharacterSet whitespaceAndNewlineCharacterSet];
if ([string rangeOfCharacterFromSet:ctrlChars].length &&
[string rangeOfCharacterFromSet:wsnlChars].length == 0)
{
/* discard invalid text input with Chinese input methods */
str = "";
[self unmarkText];
NSInputManager *currentInputManager = [NSInputManager currentInputManager];
[currentInputManager markedTextAbandoned:self];
}
else
{
str = [string UTF8String];
}
prev_str = g_object_get_data (G_OBJECT (gdk_window), TIC_INSERT_TEXT);
if (prev_str)
g_free (prev_str);
g_object_set_data (G_OBJECT (gdk_window), TIC_INSERT_TEXT, g_strdup (str));
GDK_NOTE (EVENTS, g_print ("insertText: set %s (%p, nsview %p): %s\n",
TIC_INSERT_TEXT, gdk_window, self,
str ? str : "(empty)"));
g_object_set_data (G_OBJECT (gdk_window), GIC_FILTER_KEY,
GUINT_TO_POINTER (GIC_FILTER_FILTERED));
/* handle text input changes by mouse events */
if (!GPOINTER_TO_UINT (g_object_get_data (G_OBJECT (gdk_window),
TIC_IN_KEY_DOWN)))
{
_gdk_quartz_synthesize_null_key_event(gdk_window);
}
}
-(void)deleteBackward: (id)sender
{
GDK_NOTE (EVENTS, g_print ("deleteBackward\n"));
g_object_set_data (G_OBJECT (gdk_window), GIC_FILTER_KEY,
GUINT_TO_POINTER (GIC_FILTER_PASSTHRU));
}
-(void)deleteForward: (id)sender
{
GDK_NOTE (EVENTS, g_print ("deleteForward\n"));
g_object_set_data (G_OBJECT (gdk_window), GIC_FILTER_KEY,
GUINT_TO_POINTER (GIC_FILTER_PASSTHRU));
}
-(void)deleteToBeginningOfLine: (id)sender
{
GDK_NOTE (EVENTS, g_print ("deleteToBeginningOfLine\n"));
g_object_set_data (G_OBJECT (gdk_window), GIC_FILTER_KEY,
GUINT_TO_POINTER (GIC_FILTER_PASSTHRU));
}
-(void)deleteToEndOfLine: (id)sender
{
GDK_NOTE (EVENTS, g_print ("deleteToEndOfLine\n"));
g_object_set_data (G_OBJECT (gdk_window), GIC_FILTER_KEY,
GUINT_TO_POINTER (GIC_FILTER_PASSTHRU));
}
-(void)deleteWordBackward: (id)sender
{
GDK_NOTE (EVENTS, g_print ("deleteWordBackward\n"));
g_object_set_data (G_OBJECT (gdk_window), GIC_FILTER_KEY,
GUINT_TO_POINTER (GIC_FILTER_PASSTHRU));
}
-(void)deleteWordForward: (id)sender
{
GDK_NOTE (EVENTS, g_print ("deleteWordForward\n"));
g_object_set_data (G_OBJECT (gdk_window), GIC_FILTER_KEY,
GUINT_TO_POINTER (GIC_FILTER_PASSTHRU));
}
-(void)insertBacktab: (id)sender
{
GDK_NOTE (EVENTS, g_print ("insertBacktab\n"));
g_object_set_data (G_OBJECT (gdk_window), GIC_FILTER_KEY,
GUINT_TO_POINTER (GIC_FILTER_PASSTHRU));
}
-(void)insertNewline: (id)sender
{
GDK_NOTE (EVENTS, g_print ("insertNewline\n"));
g_object_set_data (G_OBJECT (gdk_window), GIC_FILTER_KEY, GUINT_TO_POINTER (GIC_FILTER_PASSTHRU));
}
-(void)insertTab: (id)sender
{
GDK_NOTE (EVENTS, g_print ("insertTab\n"));
g_object_set_data (G_OBJECT (gdk_window), GIC_FILTER_KEY,
GUINT_TO_POINTER (GIC_FILTER_PASSTHRU));
}
-(void)moveBackward: (id)sender
{
GDK_NOTE (EVENTS, g_print ("moveBackward\n"));
g_object_set_data (G_OBJECT (gdk_window), GIC_FILTER_KEY,
GUINT_TO_POINTER (GIC_FILTER_PASSTHRU));
}
-(void)moveBackwardAndModifySelection: (id)sender
{
GDK_NOTE (EVENTS, g_print ("moveBackwardAndModifySelection\n"));
g_object_set_data (G_OBJECT (gdk_window), GIC_FILTER_KEY,
GUINT_TO_POINTER (GIC_FILTER_PASSTHRU));
}
-(void)moveDown: (id)sender
{
GDK_NOTE (EVENTS, g_print ("moveDown\n"));
g_object_set_data (G_OBJECT (gdk_window), GIC_FILTER_KEY,
GUINT_TO_POINTER (GIC_FILTER_PASSTHRU));
}
-(void)moveDownAndModifySelection: (id)sender
{
GDK_NOTE (EVENTS, g_print ("moveDownAndModifySelection\n"));
g_object_set_data (G_OBJECT (gdk_window), GIC_FILTER_KEY,
GUINT_TO_POINTER (GIC_FILTER_PASSTHRU));
}
-(void)moveForward: (id)sender
{
GDK_NOTE (EVENTS, g_print ("moveForward\n"));
g_object_set_data (G_OBJECT (gdk_window), GIC_FILTER_KEY,
GUINT_TO_POINTER (GIC_FILTER_PASSTHRU));
}
-(void)moveForwardAndModifySelection: (id)sender
{
GDK_NOTE (EVENTS, g_print ("moveForwardAndModifySelection\n"));
g_object_set_data (G_OBJECT (gdk_window), GIC_FILTER_KEY,
GUINT_TO_POINTER (GIC_FILTER_PASSTHRU));
}
-(void)moveLeft: (id)sender
{
GDK_NOTE (EVENTS, g_print ("moveLeft\n"));
g_object_set_data (G_OBJECT (gdk_window), GIC_FILTER_KEY,
GUINT_TO_POINTER (GIC_FILTER_PASSTHRU));
}
-(void)moveLeftAndModifySelection: (id)sender
{
GDK_NOTE (EVENTS, g_print ("moveLeftAndModifySelection\n"));
g_object_set_data (G_OBJECT (gdk_window), GIC_FILTER_KEY,
GUINT_TO_POINTER (GIC_FILTER_PASSTHRU));
}
-(void)moveRight: (id)sender
{
GDK_NOTE (EVENTS, g_print ("moveRight\n"));
g_object_set_data (G_OBJECT (gdk_window), GIC_FILTER_KEY,
GUINT_TO_POINTER (GIC_FILTER_PASSTHRU));
}
-(void)moveRightAndModifySelection: (id)sender
{
GDK_NOTE (EVENTS, g_print ("moveRightAndModifySelection\n"));
g_object_set_data (G_OBJECT (gdk_window), GIC_FILTER_KEY,
GUINT_TO_POINTER (GIC_FILTER_PASSTHRU));
}
-(void)moveToBeginningOfDocument: (id)sender
{
GDK_NOTE (EVENTS, g_print ("moveToBeginningOfDocument\n"));
g_object_set_data (G_OBJECT (gdk_window), GIC_FILTER_KEY,
GUINT_TO_POINTER (GIC_FILTER_PASSTHRU));
}
-(void)moveToBeginningOfDocumentAndModifySelection: (id)sender
{
GDK_NOTE (EVENTS, g_print ("moveToBeginningOfDocumentAndModifySelection\n"));
g_object_set_data (G_OBJECT (gdk_window), GIC_FILTER_KEY,
GUINT_TO_POINTER (GIC_FILTER_PASSTHRU));
}
-(void)moveToBeginningOfLine: (id)sender
{
GDK_NOTE (EVENTS, g_print ("moveToBeginningOfLine\n"));
g_object_set_data (G_OBJECT (gdk_window), GIC_FILTER_KEY,
GUINT_TO_POINTER (GIC_FILTER_PASSTHRU));
}
-(void)moveToBeginningOfLineAndModifySelection: (id)sender
{
GDK_NOTE (EVENTS, g_print ("moveToBeginningOfLineAndModifySelection\n"));
g_object_set_data (G_OBJECT (gdk_window), GIC_FILTER_KEY,
GUINT_TO_POINTER (GIC_FILTER_PASSTHRU));
}
-(void)moveToEndOfDocument: (id)sender
{
GDK_NOTE (EVENTS, g_print ("moveToEndOfDocument\n"));
g_object_set_data (G_OBJECT (gdk_window), GIC_FILTER_KEY,
GUINT_TO_POINTER (GIC_FILTER_PASSTHRU));
}
-(void)moveToEndOfDocumentAndModifySelection: (id)sender
{
GDK_NOTE (EVENTS, g_print ("moveToEndOfDocumentAndModifySelection\n"));
g_object_set_data (G_OBJECT (gdk_window), GIC_FILTER_KEY,
GUINT_TO_POINTER (GIC_FILTER_PASSTHRU));
}
-(void)moveToEndOfLine: (id)sender
{
GDK_NOTE (EVENTS, g_print ("moveToEndOfLine\n"));
g_object_set_data (G_OBJECT (gdk_window), GIC_FILTER_KEY,
GUINT_TO_POINTER (GIC_FILTER_PASSTHRU));
}
-(void)moveToEndOfLineAndModifySelection: (id)sender
{
GDK_NOTE (EVENTS, g_print ("moveToEndOfLineAndModifySelection\n"));
g_object_set_data (G_OBJECT (gdk_window), GIC_FILTER_KEY,
GUINT_TO_POINTER (GIC_FILTER_PASSTHRU));
}
-(void)moveUp: (id)sender
{
GDK_NOTE (EVENTS, g_print ("moveUp\n"));
g_object_set_data (G_OBJECT (gdk_window), GIC_FILTER_KEY,
GUINT_TO_POINTER (GIC_FILTER_PASSTHRU));
}
-(void)moveUpAndModifySelection: (id)sender
{
GDK_NOTE (EVENTS, g_print ("moveUpAndModifySelection\n"));
g_object_set_data (G_OBJECT (gdk_window), GIC_FILTER_KEY,
GUINT_TO_POINTER (GIC_FILTER_PASSTHRU));
}
-(void)moveWordBackward: (id)sender
{
GDK_NOTE (EVENTS, g_print ("moveWordBackward\n"));
g_object_set_data (G_OBJECT (gdk_window), GIC_FILTER_KEY,
GUINT_TO_POINTER (GIC_FILTER_PASSTHRU));
}
-(void)moveWordBackwardAndModifySelection: (id)sender
{
GDK_NOTE (EVENTS, g_print ("moveWordBackwardAndModifySelection\n"));
g_object_set_data (G_OBJECT (gdk_window), GIC_FILTER_KEY,
GUINT_TO_POINTER (GIC_FILTER_PASSTHRU));
}
-(void)moveWordForward: (id)sender
{
GDK_NOTE (EVENTS, g_print ("moveWordForward\n"));
g_object_set_data (G_OBJECT (gdk_window), GIC_FILTER_KEY,
GUINT_TO_POINTER (GIC_FILTER_PASSTHRU));
}
-(void)moveWordForwardAndModifySelection: (id)sender
{
GDK_NOTE (EVENTS, g_print ("moveWordForwardAndModifySelection\n"));
g_object_set_data (G_OBJECT (gdk_window), GIC_FILTER_KEY,
GUINT_TO_POINTER (GIC_FILTER_PASSTHRU));
}
-(void)moveWordLeft: (id)sender
{
GDK_NOTE (EVENTS, g_print ("moveWordLeft\n"));
g_object_set_data (G_OBJECT (gdk_window), GIC_FILTER_KEY,
GUINT_TO_POINTER (GIC_FILTER_PASSTHRU));
}
-(void)moveWordLeftAndModifySelection: (id)sender
{
GDK_NOTE (EVENTS, g_print ("moveWordLeftAndModifySelection\n"));
g_object_set_data (G_OBJECT (gdk_window), GIC_FILTER_KEY,
GUINT_TO_POINTER (GIC_FILTER_PASSTHRU));
}
-(void)moveWordRight: (id)sender
{
GDK_NOTE (EVENTS, g_print ("moveWordRight\n"));
g_object_set_data (G_OBJECT (gdk_window), GIC_FILTER_KEY,
GUINT_TO_POINTER (GIC_FILTER_PASSTHRU));
}
-(void)moveWordRightAndModifySelection: (id)sender
{
GDK_NOTE (EVENTS, g_print ("moveWordRightAndModifySelection\n"));
g_object_set_data (G_OBJECT (gdk_window), GIC_FILTER_KEY,
GUINT_TO_POINTER (GIC_FILTER_PASSTHRU));
}
-(void)pageDown: (id)sender
{
GDK_NOTE (EVENTS, g_print ("pageDown\n"));
g_object_set_data (G_OBJECT (gdk_window), GIC_FILTER_KEY,
GUINT_TO_POINTER (GIC_FILTER_PASSTHRU));
}
-(void)pageDownAndModifySelection: (id)sender
{
GDK_NOTE (EVENTS, g_print ("pageDownAndModifySelection\n"));
g_object_set_data (G_OBJECT (gdk_window), GIC_FILTER_KEY,
GUINT_TO_POINTER (GIC_FILTER_PASSTHRU));
}
-(void)pageUp: (id)sender
{
GDK_NOTE (EVENTS, g_print ("pageUp\n"));
g_object_set_data (G_OBJECT (gdk_window), GIC_FILTER_KEY,
GUINT_TO_POINTER (GIC_FILTER_PASSTHRU));
}
-(void)pageUpAndModifySelection: (id)sender
{
GDK_NOTE (EVENTS, g_print ("pageUpAndModifySelection\n"));
g_object_set_data (G_OBJECT (gdk_window), GIC_FILTER_KEY,
GUINT_TO_POINTER (GIC_FILTER_PASSTHRU));
}
-(void)selectAll: (id)sender
{
GDK_NOTE (EVENTS, g_print ("selectAll\n"));
g_object_set_data (G_OBJECT (gdk_window), GIC_FILTER_KEY,
GUINT_TO_POINTER (GIC_FILTER_PASSTHRU));
}
-(void)selectLine: (id)sender
{
GDK_NOTE (EVENTS, g_print ("selectLine\n"));
g_object_set_data (G_OBJECT (gdk_window), GIC_FILTER_KEY,
GUINT_TO_POINTER (GIC_FILTER_PASSTHRU));
}
-(void)selectWord: (id)sender
{
GDK_NOTE (EVENTS, g_print ("selectWord\n"));
g_object_set_data (G_OBJECT (gdk_window), GIC_FILTER_KEY,
GUINT_TO_POINTER (GIC_FILTER_PASSTHRU));
}
-(void)noop: (id)sender
{
GDK_NOTE (EVENTS, g_print ("noop\n"));
}
/* --------------------------------------------------------------- */
-(void)dealloc
{
if (trackingRect)
{
[self removeTrackingRect:trackingRect];
[self removeTrackingRect: trackingRect];
trackingRect = 0;
}
[super dealloc];
}
-(void)setGdkWindow:(GdkWindow *)window
-(void)setGdkWindow: (GdkWindow *)window
{
gdk_window = window;
}
@@ -60,10 +584,11 @@
return YES;
/* A view is opaque if its GdkWindow doesn't have the RGBA visual */
return gdk_window_get_visual (gdk_window) != gdk_screen_get_rgba_visual (_gdk_screen);
return gdk_window_get_visual (gdk_window) !=
gdk_screen_get_rgba_visual (_gdk_screen);
}
-(void)drawRect:(NSRect)rect
-(void)drawRect: (NSRect)rect
{
GdkRectangle gdk_rect;
GdkWindowImplQuartz *impl = GDK_WINDOW_IMPL_QUARTZ (gdk_window->impl);
@@ -75,7 +600,7 @@
if (GDK_WINDOW_DESTROYED (gdk_window))
return;
if (!(gdk_window->event_mask & GDK_EXPOSURE_MASK))
if (! (gdk_window->event_mask & GDK_EXPOSURE_MASK))
return;
if (NSEqualRects (rect, NSZeroRect))
@@ -93,7 +618,7 @@
[NSGraphicsContext saveGraphicsState];
[[NSColor windowBackgroundColor] setFill];
[NSBezierPath fillRect:rect];
[NSBezierPath fillRect: rect];
[NSGraphicsContext restoreGraphicsState];
@@ -107,9 +632,9 @@
impl->needs_display_region = NULL;
}
[self getRectsBeingDrawn:&drawn_rects count:&count];
[self getRectsBeingDrawn: &drawn_rects count: &count];
region = cairo_region_create ();
for (i = 0; i < count; i++)
{
gdk_rect.x = drawn_rects[i].origin.x;
@@ -133,7 +658,7 @@
}
}
-(void)setNeedsInvalidateShadow:(BOOL)invalidate
-(void)setNeedsInvalidateShadow: (BOOL)invalidate
{
needsInvalidateShadow = invalidate;
}
@@ -151,7 +676,7 @@
if (trackingRect)
{
[self removeTrackingRect:trackingRect];
[self removeTrackingRect: trackingRect];
trackingRect = 0;
}
@@ -163,32 +688,32 @@
*/
rect = [self bounds];
trackingRect = [self addTrackingRect:rect
owner:self
userData:nil
assumeInside:NO];
trackingRect = [self addTrackingRect: rect
owner: self
userData: nil
assumeInside: NO];
}
-(void)viewDidMoveToWindow
{
if (![self window]) /* We are destroyed already */
return;
return;
[self updateTrackingRect];
}
-(void)viewWillMoveToWindow:(NSWindow *)newWindow
-(void)viewWillMoveToWindow: (NSWindow *)newWindow
{
if (newWindow == nil && trackingRect)
{
[self removeTrackingRect:trackingRect];
[self removeTrackingRect: trackingRect];
trackingRect = 0;
}
}
-(void)setFrame:(NSRect)frame
-(void)setFrame: (NSRect)frame
{
[super setFrame:frame];
[super setFrame: frame];
if ([self window])
[self updateTrackingRect];

View File

@@ -17,17 +17,33 @@
*/
#import <AppKit/AppKit.h>
#include "gdkwindow.h"
#include "gdk/gdk.h"
@interface GdkQuartzView : NSView {
/* Text Input Client */
#define TIC_MARKED_TEXT "tic-marked-text"
#define TIC_SELECTED_POS "tic-selected-pos"
#define TIC_SELECTED_LEN "tic-selected-len"
#define TIC_INSERT_TEXT "tic-insert-text"
#define TIC_IN_KEY_DOWN "tic-in-key-down"
/* GtkIMContext */
#define GIC_CURSOR_RECT "gic-cursor-rect"
#define GIC_FILTER_KEY "gic-filter-key"
#define GIC_FILTER_PASSTHRU 0
#define GIC_FILTER_FILTERED 1
@interface GdkQuartzView : NSView <NSTextInputClient>
{
GdkWindow *gdk_window;
NSTrackingRectTag trackingRect;
BOOL needsInvalidateShadow;
NSRange markedRange;
NSRange selectedRange;
}
-(void)setGdkWindow:(GdkWindow *)window;
-(GdkWindow *)gdkWindow;
-(NSTrackingRectTag)trackingRect;
-(void)setNeedsInvalidateShadow:(BOOL)invalidate;
- (void)setGdkWindow: (GdkWindow *)window;
- (GdkWindow *)gdkWindow;
- (NSTrackingRectTag)trackingRect;
- (void)setNeedsInvalidateShadow: (BOOL)invalidate;
@end

View File

@@ -7,6 +7,7 @@
#include <unistd.h>
#include "gdkprivate-quartz.h"
#include <gdk/gdkdisplayprivate.h>
/*
* This file implementations integration between the GLib main loop and
@@ -617,11 +618,39 @@ gdk_event_prepare (GSource *source,
gboolean retval;
gdk_threads_enter ();
/* The prepare stage is the stage before the main loop starts polling
* and dispatching events. The autorelease poll is drained here for
* the preceding main loop iteration or, in case of the first iteration,
* for the operations carried out between event loop initialization and
* this first iteration.
*
* The autorelease poll must only be drained when the following conditions
* apply:
* - We are at the base CFRunLoop level (indicated by current_loop_level),
* - We are at the base g_main_loop level (indicated by
* g_main_depth())
* - We are at the base poll_func level (indicated by getting events).
*
* Messing with the autorelease pool at any level of nesting can cause access
* to deallocated memory because autorelease_pool is static and releasing a
* pool will cause all pools allocated inside of it to be released as well.
*/
if (current_loop_level == 0 && g_main_depth() == 0 && getting_events == 0)
{
if (autorelease_pool)
[autorelease_pool drain];
autorelease_pool = [[NSAutoreleasePool alloc] init];
}
*timeout = -1;
retval = (_gdk_event_queue_find_first (_gdk_display) != NULL ||
_gdk_quartz_event_loop_check_pending ());
if (_gdk_display->event_pause_count > 0)
retval = FALSE;
else
retval = (_gdk_event_queue_find_first (_gdk_display) != NULL ||
_gdk_quartz_event_loop_check_pending ());
gdk_threads_leave ();
@@ -635,8 +664,11 @@ gdk_event_check (GSource *source)
gdk_threads_enter ();
retval = (_gdk_event_queue_find_first (_gdk_display) != NULL ||
_gdk_quartz_event_loop_check_pending ());
if (_gdk_display->event_pause_count > 0)
retval = FALSE;
else
retval = (_gdk_event_queue_find_first (_gdk_display) != NULL ||
_gdk_quartz_event_loop_check_pending ());
gdk_threads_leave ();
@@ -652,21 +684,6 @@ gdk_event_dispatch (GSource *source,
gdk_threads_enter ();
/* Refresh the autorelease pool if we're at the base CFRunLoop level
* (indicated by current_loop_level) and the base g_main_loop level
* (indicated by g_main_depth()). Messing with the autorelease pool at
* any level of nesting can cause access to deallocated memory because
* autorelease_pool is static and releasing a pool will cause all pools
* allocated inside of it to be released as well.
*/
if (current_loop_level == 0 && g_main_depth() == 0)
{
if (autorelease_pool)
[autorelease_pool drain];
autorelease_pool = [[NSAutoreleasePool alloc] init];
}
_gdk_quartz_display_queue_events (_gdk_display);
event = _gdk_event_unqueue (_gdk_display);

View File

@@ -1156,6 +1156,24 @@ synthesize_crossing_event (GdkWindow *window,
return FALSE;
}
void
_gdk_quartz_synthesize_null_key_event (GdkWindow *window)
{
GdkEvent *event;
GdkQuartzDeviceManagerCore *device_manager;
event = gdk_event_new (GDK_KEY_PRESS);
event->any.type = GDK_KEY_PRESS;
event->key.window = window;
event->key.state = 0;
event->key.hardware_keycode = 0;
event->key.group = 0;
event->key.keyval = GDK_KEY_VoidSymbol;
device_manager = GDK_QUARTZ_DEVICE_MANAGER_CORE (_gdk_display->device_manager);
gdk_event_set_device (event, device_manager->core_keyboard);
append_event(event, FALSE);
}
GdkModifierType
_gdk_quartz_events_get_current_keyboard_modifiers (void)
{
@@ -1494,8 +1512,11 @@ gdk_event_translate (GdkEvent *event,
}
break;
case NSMouseEntered:
case NSMouseExited:
if (WINDOW_IS_TOPLEVEL (window))
[[NSCursor arrowCursor] set];
/* fall through */
case NSMouseEntered:
return_val = synthesize_crossing_event (window, event, nsevent, x, y, x_root, y_root);
break;

View File

@@ -82,17 +82,6 @@ _gdk_quartz_display_get_keymap (GdkDisplay *display)
return default_keymap;
}
/* Note: we could check only if building against the 10.5 SDK instead, but
* that would make non-xml layouts not work in 32-bit which would be a quite
* bad regression. This way, old unsupported layouts will just not work in
* 64-bit.
*/
#ifdef __LP64__
static TISInputSourceRef current_layout = NULL;
#else
static KeyboardLayoutRef current_layout = NULL;
#endif
/* This is a table of all keyvals. Each keycode gets KEYVALS_PER_KEYCODE entries.
* TThere is 1 keyval per modifier (Nothing, Shift, Alt, Shift+Alt);
*/
@@ -267,10 +256,17 @@ const static struct {
};
static void
maybe_update_keymap (void)
update_keymap (void)
{
const void *chr_data = NULL;
guint *p;
int i;
/* Note: we could check only if building against the 10.5 SDK instead, but
* that would make non-xml layouts not work in 32-bit which would be a quite
* bad regression. This way, old unsupported layouts will just not work in
* 64-bit.
*/
#ifdef __LP64__
TISInputSourceRef new_layout = TISCopyCurrentKeyboardLayoutInputSource ();
CFDataRef layout_data_ref;
@@ -282,228 +278,221 @@ maybe_update_keymap (void)
KLGetCurrentKeyboardLayout (&new_layout);
#endif
if (new_layout != current_layout)
{
guint *p;
int i;
g_free (keyval_array);
keyval_array = g_new0 (guint, NUM_KEYCODES * KEYVALS_PER_KEYCODE);
g_free (keyval_array);
keyval_array = g_new0 (guint, NUM_KEYCODES * KEYVALS_PER_KEYCODE);
#ifdef __LP64__
layout_data_ref = (CFDataRef) TISGetInputSourceProperty
(new_layout, kTISPropertyUnicodeKeyLayoutData);
layout_data_ref = (CFDataRef) TISGetInputSourceProperty
(new_layout, kTISPropertyUnicodeKeyLayoutData);
if (layout_data_ref)
chr_data = CFDataGetBytePtr (layout_data_ref);
if (layout_data_ref)
chr_data = CFDataGetBytePtr (layout_data_ref);
if (chr_data == NULL)
{
g_error ("cannot get keyboard layout data");
return;
}
#else
/* Get the layout kind */
KLGetKeyboardLayoutProperty (new_layout, kKLKind, (const void **)&layout_kind);
/* 8-bit-only keyabord layout */
if (layout_kind == kKLKCHRKind)
{
/* Get chr data */
KLGetKeyboardLayoutProperty (new_layout, kKLKCHRData, (const void **)&chr_data);
for (i = 0; i < NUM_KEYCODES; i++)
{
int j;
UInt32 modifiers[] = {0, shiftKey, optionKey, shiftKey | optionKey};
p = keyval_array + i * KEYVALS_PER_KEYCODE;
for (j = 0; j < KEYVALS_PER_KEYCODE; j++)
{
UInt32 c, state = 0;
UInt16 key_code;
UniChar uc;
key_code = modifiers[j] | i;
c = KeyTranslate (chr_data, key_code, &state);
if (state != 0)
{
UInt32 state2 = 0;
c = KeyTranslate (chr_data, key_code | 128, &state2);
}
if (c != 0 && c != 0x10)
{
int k;
gboolean found = FALSE;
/* FIXME: some keyboard layouts (e.g. Russian) use
* a different 8-bit character set. We should
* check for this. Not a serious problem, because
* most (all?) of these layouts also have a
* uchr version.
*/
uc = macroman2ucs (c);
for (k = 0; k < G_N_ELEMENTS (special_ucs_table); k++)
{
if (special_ucs_table[k].ucs_value == uc)
{
p[j] = special_ucs_table[k].keyval;
found = TRUE;
break;
}
}
/* Special-case shift-tab since GTK+ expects
* GDK_KEY_ISO_Left_Tab for that.
*/
if (found && p[j] == GDK_KEY_Tab && modifiers[j] == shiftKey)
p[j] = GDK_KEY_ISO_Left_Tab;
if (!found)
p[j] = gdk_unicode_to_keyval (uc);
}
}
if (p[3] == p[2])
p[3] = 0;
if (p[2] == p[1])
p[2] = 0;
if (p[1] == p[0])
p[1] = 0;
if (p[0] == p[2] &&
p[1] == p[3])
p[2] = p[3] = 0;
}
}
/* unicode keyboard layout */
else if (layout_kind == kKLKCHRuchrKind || layout_kind == kKLuchrKind)
{
/* Get chr data */
KLGetKeyboardLayoutProperty (new_layout, kKLuchrData, (const void **)&chr_data);
#endif
for (i = 0; i < NUM_KEYCODES; i++)
{
int j;
UInt32 modifiers[] = {0, shiftKey, optionKey, shiftKey | optionKey};
UniChar chars[4];
UniCharCount nChars;
p = keyval_array + i * KEYVALS_PER_KEYCODE;
for (j = 0; j < KEYVALS_PER_KEYCODE; j++)
{
UInt32 state = 0;
OSStatus err;
UInt16 key_code;
UniChar uc;
key_code = modifiers[j] | i;
err = UCKeyTranslate (chr_data, i, kUCKeyActionDisplay,
(modifiers[j] >> 8) & 0xFF,
LMGetKbdType(),
0,
&state, 4, &nChars, chars);
/* FIXME: Theoretically, we can get multiple UTF-16 values;
* we should convert them to proper unicode and figure
* out whether there are really keyboard layouts that
* give us more than one character for one keypress. */
if (err == noErr && nChars == 1)
{
int k;
gboolean found = FALSE;
/* A few <Shift><Option>keys return two
* characters, the first of which is U+00a0,
* which isn't interesting; so we return the
* second. More sophisticated handling is the
* job of a GtkIMContext.
*
* If state isn't zero, it means that it's a
* dead key of some sort. Some of those are
* enumerated in the special_ucs_table with the
* high nibble set to f to push it into the
* private use range. Here we do the same.
*/
if (state != 0)
chars[nChars - 1] |= 0xf000;
uc = chars[nChars - 1];
for (k = 0; k < G_N_ELEMENTS (special_ucs_table); k++)
{
if (special_ucs_table[k].ucs_value == uc)
{
p[j] = special_ucs_table[k].keyval;
found = TRUE;
break;
}
}
/* Special-case shift-tab since GTK+ expects
* GDK_KEY_ISO_Left_Tab for that.
*/
if (found && p[j] == GDK_KEY_Tab && modifiers[j] == shiftKey)
p[j] = GDK_KEY_ISO_Left_Tab;
if (!found)
p[j] = gdk_unicode_to_keyval (uc);
}
}
if (p[3] == p[2])
p[3] = 0;
if (p[2] == p[1])
p[2] = 0;
if (p[1] == p[0])
p[1] = 0;
if (p[0] == p[2] &&
p[1] == p[3])
p[2] = p[3] = 0;
}
#ifndef __LP64__
}
else
{
g_error ("unknown type of keyboard layout (neither KCHR nor uchr)"
" - not supported right now");
}
#endif
for (i = 0; i < G_N_ELEMENTS (modifier_keys); i++)
{
p = keyval_array + modifier_keys[i].keycode * KEYVALS_PER_KEYCODE;
if (p[0] == 0 && p[1] == 0 &&
p[2] == 0 && p[3] == 0)
p[0] = modifier_keys[i].keyval;
}
for (i = 0; i < G_N_ELEMENTS (function_keys); i++)
{
p = keyval_array + function_keys[i].keycode * KEYVALS_PER_KEYCODE;
p[0] = function_keys[i].keyval;
p[1] = p[2] = p[3] = 0;
}
for (i = 0; i < G_N_ELEMENTS (known_numeric_keys); i++)
{
p = keyval_array + known_numeric_keys[i].keycode * KEYVALS_PER_KEYCODE;
if (p[0] == known_numeric_keys[i].normal_keyval)
p[0] = known_numeric_keys[i].keypad_keyval;
}
if (current_layout)
g_signal_emit_by_name (default_keymap, "keys_changed");
current_layout = new_layout;
if (chr_data == NULL)
{
g_error ("cannot get keyboard layout data");
return;
}
#else
/* Get the layout kind */
KLGetKeyboardLayoutProperty (new_layout, kKLKind, (const void **)&layout_kind);
/* 8-bit-only keyabord layout */
if (layout_kind == kKLKCHRKind)
{
/* Get chr data */
KLGetKeyboardLayoutProperty (new_layout, kKLKCHRData, (const void **)&chr_data);
for (i = 0; i < NUM_KEYCODES; i++)
{
int j;
UInt32 modifiers[] = {0, shiftKey, optionKey, shiftKey | optionKey};
p = keyval_array + i * KEYVALS_PER_KEYCODE;
for (j = 0; j < KEYVALS_PER_KEYCODE; j++)
{
UInt32 c, state = 0;
UInt16 key_code;
UniChar uc;
key_code = modifiers[j] | i;
c = KeyTranslate (chr_data, key_code, &state);
if (state != 0)
{
UInt32 state2 = 0;
c = KeyTranslate (chr_data, key_code | 128, &state2);
}
if (c != 0 && c != 0x10)
{
int k;
gboolean found = FALSE;
/* FIXME: some keyboard layouts (e.g. Russian) use a
* different 8-bit character set. We should check
* for this. Not a serious problem, because most
* (all?) of these layouts also have a uchr version.
*/
uc = macroman2ucs (c);
for (k = 0; k < G_N_ELEMENTS (special_ucs_table); k++)
{
if (special_ucs_table[k].ucs_value == uc)
{
p[j] = special_ucs_table[k].keyval;
found = TRUE;
break;
}
}
/* Special-case shift-tab since GTK+ expects
* GDK_KEY_ISO_Left_Tab for that.
*/
if (found && p[j] == GDK_KEY_Tab && modifiers[j] == shiftKey)
p[j] = GDK_KEY_ISO_Left_Tab;
if (!found)
p[j] = gdk_unicode_to_keyval (uc);
}
}
if (p[3] == p[2])
p[3] = 0;
if (p[2] == p[1])
p[2] = 0;
if (p[1] == p[0])
p[1] = 0;
if (p[0] == p[2] &&
p[1] == p[3])
p[2] = p[3] = 0;
}
}
/* unicode keyboard layout */
else if (layout_kind == kKLKCHRuchrKind || layout_kind == kKLuchrKind)
{
/* Get chr data */
KLGetKeyboardLayoutProperty (new_layout, kKLuchrData, (const void **)&chr_data);
#endif
for (i = 0; i < NUM_KEYCODES; i++)
{
int j;
UInt32 modifiers[] = {0, shiftKey, optionKey, shiftKey | optionKey};
UniChar chars[4];
UniCharCount nChars;
p = keyval_array + i * KEYVALS_PER_KEYCODE;
for (j = 0; j < KEYVALS_PER_KEYCODE; j++)
{
UInt32 state = 0;
OSStatus err;
UInt16 key_code;
UniChar uc;
key_code = modifiers[j] | i;
err = UCKeyTranslate (chr_data, i, kUCKeyActionDisplay,
(modifiers[j] >> 8) & 0xFF,
LMGetKbdType(),
0,
&state, 4, &nChars, chars);
/* FIXME: Theoretically, we can get multiple UTF-16
* values; we should convert them to proper unicode and
* figure out whether there are really keyboard layouts
* that give us more than one character for one
* keypress.
*/
if (err == noErr && nChars == 1)
{
int k;
gboolean found = FALSE;
/* A few <Shift><Option>keys return two characters,
* the first of which is U+00a0, which isn't
* interesting; so we return the second. More
* sophisticated handling is the job of a
* GtkIMContext.
*
* If state isn't zero, it means that it's a dead
* key of some sort. Some of those are enumerated in
* the special_ucs_table with the high nibble set to
* f to push it into the private use range. Here we
* do the same.
*/
if (state != 0)
chars[nChars - 1] |= 0xf000;
uc = chars[nChars - 1];
for (k = 0; k < G_N_ELEMENTS (special_ucs_table); k++)
{
if (special_ucs_table[k].ucs_value == uc)
{
p[j] = special_ucs_table[k].keyval;
found = TRUE;
break;
}
}
/* Special-case shift-tab since GTK+ expects
* GDK_KEY_ISO_Left_Tab for that.
*/
if (found && p[j] == GDK_KEY_Tab && modifiers[j] == shiftKey)
p[j] = GDK_KEY_ISO_Left_Tab;
if (!found)
p[j] = gdk_unicode_to_keyval (uc);
}
}
if (p[3] == p[2])
p[3] = 0;
if (p[2] == p[1])
p[2] = 0;
if (p[1] == p[0])
p[1] = 0;
if (p[0] == p[2] &&
p[1] == p[3])
p[2] = p[3] = 0;
}
#ifndef __LP64__
}
else
{
g_error ("unknown type of keyboard layout (neither KCHR nor uchr)"
" - not supported right now");
}
#endif
for (i = 0; i < G_N_ELEMENTS (modifier_keys); i++)
{
p = keyval_array + modifier_keys[i].keycode * KEYVALS_PER_KEYCODE;
if (p[0] == 0 && p[1] == 0 &&
p[2] == 0 && p[3] == 0)
p[0] = modifier_keys[i].keyval;
}
for (i = 0; i < G_N_ELEMENTS (function_keys); i++)
{
p = keyval_array + function_keys[i].keycode * KEYVALS_PER_KEYCODE;
p[0] = function_keys[i].keyval;
p[1] = p[2] = p[3] = 0;
}
for (i = 0; i < G_N_ELEMENTS (known_numeric_keys); i++)
{
p = keyval_array + known_numeric_keys[i].keycode * KEYVALS_PER_KEYCODE;
if (p[0] == known_numeric_keys[i].normal_keyval)
p[0] = known_numeric_keys[i].keypad_keyval;
}
g_signal_emit_by_name (default_keymap, "keys-changed");
}
static PangoDirection
@@ -542,8 +531,6 @@ gdk_quartz_keymap_get_entries_for_keyval (GdkKeymap *keymap,
GArray *keys_array;
int i;
maybe_update_keymap ();
*n_keys = 0;
keys_array = g_array_new (FALSE, FALSE, sizeof (GdkKeymapKey));
@@ -579,8 +566,6 @@ gdk_quartz_keymap_get_entries_for_keycode (GdkKeymap *keymap,
int i;
guint *p;
maybe_update_keymap ();
*n_entries = 0;
if (hardware_keycode > NUM_KEYCODES)
@@ -689,8 +674,6 @@ gdk_quartz_keymap_translate_keyboard_state (GdkKeymap *keymap,
GdkModifierType bit;
guint tmp_modifiers = 0;
maybe_update_keymap ();
if (keyval)
*keyval = 0;
if (effective_group)
@@ -835,14 +818,36 @@ _gdk_quartz_keys_is_modifier (guint keycode)
return FALSE;
}
static void
input_sources_changed_notification (CFNotificationCenterRef center,
void *observer,
CFStringRef name,
const void *object,
CFDictionaryRef userInfo)
{
update_keymap ();
}
static void
gdk_quartz_keymap_init (GdkQuartzKeymap *keymap)
{
update_keymap ();
CFNotificationCenterAddObserver (CFNotificationCenterGetDistributedCenter (),
keymap,
input_sources_changed_notification,
CFSTR ("AppleSelectedInputSourcesChangedNotification"),
NULL,
CFNotificationSuspensionBehaviorDeliverImmediately);
}
static void
gdk_quartz_keymap_finalize (GObject *object)
{
CFNotificationCenterRemoveObserver (CFNotificationCenterGetDistributedCenter (),
object,
CFSTR ("AppleSelectedInputSourcesChangedNotification"),
NULL);
G_OBJECT_CLASS (gdk_quartz_keymap_parent_class)->finalize (object);
}

View File

@@ -74,6 +74,7 @@ void _gdk_quartz_event_loop_release_event (NSEvent *event);
/* Keys */
GdkEventType _gdk_quartz_keys_event_type (NSEvent *event);
gboolean _gdk_quartz_keys_is_modifier (guint keycode);
void _gdk_quartz_synthesize_null_key_event (GdkWindow *window);
/* Drag and Drop */
void _gdk_quartz_window_register_dnd (GdkWindow *window);

View File

@@ -55,6 +55,10 @@ typedef enum
GdkOSXVersion gdk_quartz_osx_version (void);
GdkAtom gdk_quartz_pasteboard_type_to_atom_libgtk_only (NSString *type);
NSString *gdk_quartz_target_to_pasteboard_type_libgtk_only (const gchar *target);
NSString *gdk_quartz_atom_to_pasteboard_type_libgtk_only (GdkAtom atom);
G_END_DECLS
#define __GDKQUARTZ_H_INSIDE__

View File

@@ -22,6 +22,7 @@
#include "gdkselection.h"
#include "gdkproperty.h"
#include "gdkquartz.h"
gboolean
_gdk_quartz_display_set_selection_owner (GdkDisplay *display,
@@ -171,3 +172,42 @@ _gdk_quartz_display_text_property_to_utf8_list (GdkDisplay *display,
}
}
GdkAtom
gdk_quartz_pasteboard_type_to_atom_libgtk_only (NSString *type)
{
if ([type isEqualToString:NSStringPboardType])
return gdk_atom_intern_static_string ("UTF8_STRING");
else if ([type isEqualToString:NSTIFFPboardType])
return gdk_atom_intern_static_string ("image/tiff");
else if ([type isEqualToString:NSColorPboardType])
return gdk_atom_intern_static_string ("application/x-color");
else if ([type isEqualToString:NSURLPboardType])
return gdk_atom_intern_static_string ("text/uri-list");
else
return gdk_atom_intern ([type UTF8String], FALSE);
}
NSString *
gdk_quartz_target_to_pasteboard_type_libgtk_only (const char *target)
{
if (strcmp (target, "UTF8_STRING") == 0)
return NSStringPboardType;
else if (strcmp (target, "image/tiff") == 0)
return NSTIFFPboardType;
else if (strcmp (target, "application/x-color") == 0)
return NSColorPboardType;
else if (strcmp (target, "text/uri-list") == 0)
return NSURLPboardType;
else
return [NSString stringWithUTF8String:target];
}
NSString *
gdk_quartz_atom_to_pasteboard_type_libgtk_only (GdkAtom atom)
{
gchar *target = gdk_atom_name (atom);
NSString *ret = gdk_quartz_target_to_pasteboard_type_libgtk_only (target);
g_free (target);
return ret;
}

View File

@@ -2338,14 +2338,18 @@ window_type_hint_to_level (GdkWindowTypeHint hint)
return NSTornOffMenuWindowLevel;
case GDK_WINDOW_TYPE_HINT_DOCK:
return NSFloatingWindowLevel; /* NSDockWindowLevel is deprecated, and not replaced */
case GDK_WINDOW_TYPE_HINT_UTILITY:
case GDK_WINDOW_TYPE_HINT_DIALOG: /* Dialog window */
return NSFloatingWindowLevel;
case GDK_WINDOW_TYPE_HINT_NORMAL: /* Normal toplevel window */
case GDK_WINDOW_TYPE_HINT_DIALOG: /* Dialog window */
case GDK_WINDOW_TYPE_HINT_TOOLBAR: /* Window used to implement toolbars */
case GDK_WINDOW_TYPE_HINT_DESKTOP: /* N/A */
break;
return NSNormalWindowLevel;
case GDK_WINDOW_TYPE_HINT_DESKTOP:
return kCGDesktopWindowLevelKey; /* doesn't map to any real Cocoa model */
default:
break;
@@ -2642,9 +2646,11 @@ gdk_quartz_window_set_decorations (GdkWindow *window,
* NSTitledWindowMask. This behaved extremely oddly when
* conditionalized upon that and since it has no side effects (i.e.
* if NSTitledWindowMask is not requested, the title will not be
* displayed) just do it unconditionally.
* displayed) just do it unconditionally. We also must null check
* 'title' before setting it to avoid crashing.
*/
[impl->toplevel setTitle:title];
if (title)
[impl->toplevel setTitle:title];
}
else
{
@@ -2664,7 +2670,8 @@ gdk_quartz_window_set_decorations (GdkWindow *window,
screen:screen];
[impl->toplevel setHasShadow: window_type_hint_to_shadow (impl->type_hint)];
[impl->toplevel setLevel: window_type_hint_to_level (impl->type_hint)];
[impl->toplevel setTitle:title];
if (title)
[impl->toplevel setTitle:title];
[impl->toplevel setBackgroundColor:bg];
[impl->toplevel setHidesOnDeactivate: window_type_hint_to_hides_on_deactivate (impl->type_hint)];
[impl->toplevel setContentView:old_view];

View File

@@ -37,6 +37,9 @@ gdk_event_source_prepare(GSource *base, gint *timeout)
*timeout = -1;
if (source->display->event_pause_count > 0)
return FALSE;
/* We have to add/remove the GPollFD if we want to update our
* poll event mask dynamically. Instead, let's just flush all
* write on idle instead, which is what this amounts to. */
@@ -57,6 +60,9 @@ gdk_event_source_check(GSource *base)
if (source->pfd.revents & (G_IO_ERR | G_IO_HUP))
g_error ("Lost connection to wayland compositor");
if (source->display->event_pause_count > 0)
return FALSE;
return _gdk_event_queue_find_first (source->display) != NULL ||
source->pfd.revents;
}

View File

@@ -324,13 +324,6 @@ gdk_wayland_window_attach_image (GdkWindow *window)
if (GDK_WINDOW_DESTROYED (window))
return;
/* The "drawn to" Cairo surface is the same as the Cairo surface from which
* we are driving the buffer for the Wayland surface. Therefore we don't
* need to do anything here
*/
if (impl->server_surface == impl->cairo_surface)
return;
/* The wayland surface is attached to a buffer that is from the old "drawn
* to" surface. Unref the surface and restore the state.
*/
@@ -1319,6 +1312,9 @@ gdk_wayland_window_fullscreen (GdkWindow *window)
WL_SHELL_SURFACE_FULLSCREEN_METHOD_DEFAULT,
0,
NULL);
gdk_synthesize_window_state (window, 0, GDK_WINDOW_STATE_FULLSCREEN);
impl->fullscreen = TRUE;
}
@@ -1334,8 +1330,11 @@ gdk_wayland_window_unfullscreen (GdkWindow *window)
return;
wl_shell_surface_set_toplevel (impl->shell_surface);
gdk_synthesize_window_state (window, GDK_WINDOW_STATE_FULLSCREEN, 0);
gdk_wayland_window_configure (window, impl->saved_width, impl->saved_height,
0);
impl->fullscreen = FALSE;
}

View File

@@ -3330,9 +3330,12 @@ gdk_event_prepare (GSource *source,
*timeout = -1;
retval = (_gdk_event_queue_find_first (_gdk_display) != NULL ||
(modal_win32_dialog == NULL &&
GetQueueStatus (QS_ALLINPUT) != 0));
if (_gdk_display->event_pause_count > 0)
retval = FALSE;
else
retval = (_gdk_event_queue_find_first (_gdk_display) != NULL ||
(modal_win32_dialog == NULL &&
GetQueueStatus (QS_ALLINPUT) != 0));
gdk_threads_leave ();
@@ -3346,16 +3349,14 @@ gdk_event_check (GSource *source)
gdk_threads_enter ();
if (event_poll_fd.revents & G_IO_IN)
{
retval = (_gdk_event_queue_find_first (_gdk_display) != NULL ||
(modal_win32_dialog == NULL &&
GetQueueStatus (QS_ALLINPUT) != 0));
}
if (_gdk_display->event_pause_count > 0)
retval = FALSE;
else if (event_poll_fd.revents & G_IO_IN)
retval = (_gdk_event_queue_find_first (_gdk_display) != NULL ||
(modal_win32_dialog == NULL &&
GetQueueStatus (QS_ALLINPUT) != 0));
else
{
retval = FALSE;
}
retval = FALSE;
gdk_threads_leave ();

View File

@@ -147,9 +147,10 @@ _gdk_win32_window_change_property (GdkWindow *window,
{
HGLOBAL hdata;
gint i, size;
guchar *ucptr, *buf = NULL;
guchar *ucptr;
wchar_t *wcptr, *p;
glong wclen;
GError *err = NULL;
g_return_if_fail (window != NULL);
g_return_if_fail (GDK_IS_WINDOW (window));
@@ -193,7 +194,13 @@ _gdk_win32_window_change_property (GdkWindow *window,
return;
}
wcptr = g_utf8_to_utf16 ((char *) data, nelements, NULL, &wclen, NULL);
wcptr = g_utf8_to_utf16 ((char *) data, nelements, NULL, &wclen, &err);
if (err != NULL)
{
g_warning ("Failed to convert utf8: %s", err->message);
g_clear_error (&err);
return;
}
wclen++; /* Terminating 0 */
size = wclen * 2;
@@ -206,7 +213,7 @@ _gdk_win32_window_change_property (GdkWindow *window,
WIN32_API_FAILED ("GlobalAlloc");
if (!CloseClipboard ())
WIN32_API_FAILED ("CloseClipboard");
g_free (buf);
g_free (wcptr);
return;
}

View File

@@ -53,9 +53,7 @@ libgdk_x11_la_SOURCES = \
gdkx.h \
gdkprivate-x11.h \
xsettings-client.h \
xsettings-client.c \
xsettings-common.h \
xsettings-common.c
xsettings-client.c
libgdkinclude_HEADERS = \
gdkx.h

View File

@@ -859,6 +859,14 @@ _gdk_device_xi2_reset_scroll_valuators (GdkX11DeviceXI2 *device)
}
}
void
_gdk_device_xi2_unset_scroll_valuators (GdkX11DeviceXI2 *device)
{
if (device->scroll_valuators->len > 0)
g_array_remove_range (device->scroll_valuators, 0,
device->scroll_valuators->len);
}
gint
_gdk_x11_device_xi2_get_id (GdkX11DeviceXI2 *device)
{

View File

@@ -59,10 +59,6 @@ G_DEFINE_TYPE_WITH_CODE (GdkX11DeviceManagerXI2, gdk_x11_device_manager_xi2, GDK
G_IMPLEMENT_INTERFACE (GDK_TYPE_EVENT_TRANSLATOR,
gdk_x11_device_manager_xi2_event_translator_init))
#define HAS_FOCUS(toplevel) ((toplevel)->has_focus || (toplevel)->has_pointer_focus)
static void gdk_x11_device_manager_xi2_constructed (GObject *object);
static void gdk_x11_device_manager_xi2_dispose (GObject *object);
static void gdk_x11_device_manager_xi2_set_property (GObject *object,
@@ -495,6 +491,8 @@ gdk_x11_device_manager_xi2_constructed (GObject *object)
XIEventMask event_mask;
unsigned char mask[2] = { 0 };
G_OBJECT_CLASS (gdk_x11_device_manager_xi2_parent_class)->constructed (object);
device_manager = GDK_X11_DEVICE_MANAGER_XI2 (object);
display = gdk_device_manager_get_display (GDK_DEVICE_MANAGER (object));
xdisplay = GDK_DISPLAY_XDISPLAY (display);
@@ -767,6 +765,7 @@ handle_device_changed (GdkX11DeviceManagerXI2 *device_manager,
if (device)
{
_gdk_device_reset_axes (device);
_gdk_device_xi2_unset_scroll_valuators ((GdkX11DeviceXI2 *) device);
translate_device_classes (display, device, ev->classes, ev->num_classes);
g_signal_emit_by_name (G_OBJECT (device), "changed");
@@ -1559,7 +1558,25 @@ gdk_x11_device_manager_xi2_translate_event (GdkEventTranslator *translator,
source_device = g_hash_table_lookup (device_manager->id_table,
GUINT_TO_POINTER (xev->sourceid));
gdk_event_set_source_device (event, source_device);
_gdk_device_xi2_reset_scroll_valuators (GDK_X11_DEVICE_XI2 (source_device));
if (ev->evtype == XI_Enter &&
xev->detail != XINotifyInferior && xev->mode != XINotifyPassiveUngrab &&
gdk_window_get_window_type (window) == GDK_WINDOW_TOPLEVEL)
{
if (gdk_device_get_device_type (source_device) != GDK_DEVICE_TYPE_MASTER)
_gdk_device_xi2_reset_scroll_valuators (GDK_X11_DEVICE_XI2 (source_device));
else
{
GList *slaves, *l;
slaves = gdk_device_list_slave_devices (source_device);
for (l = slaves; l; l = l->next)
_gdk_device_xi2_reset_scroll_valuators (GDK_X11_DEVICE_XI2 (l->data));
g_list_free (slaves);
}
}
event->crossing.mode = translate_crossing_mode (xev->mode);
event->crossing.detail = translate_notify_type (xev->detail);

View File

@@ -140,6 +140,7 @@ static const char *const precache_atoms[] = {
"_NET_WM_STATE_ABOVE",
"_NET_WM_STATE_BELOW",
"_NET_WM_STATE_FULLSCREEN",
"_NET_WM_STATE_HIDDEN",
"_NET_WM_STATE_MODAL",
"_NET_WM_STATE_MAXIMIZED_VERT",
"_NET_WM_STATE_MAXIMIZED_HORZ",
@@ -149,8 +150,17 @@ static const char *const precache_atoms[] = {
"_NET_WM_SYNC_REQUEST",
"_NET_WM_SYNC_REQUEST_COUNTER",
"_NET_WM_WINDOW_TYPE",
"_NET_WM_WINDOW_TYPE_COMBO",
"_NET_WM_WINDOW_TYPE_DIALOG",
"_NET_WM_WINDOW_TYPE_DND",
"_NET_WM_WINDOW_TYPE_DROPDOWN_MENU",
"_NET_WM_WINDOW_TYPE_MENU",
"_NET_WM_WINDOW_TYPE_NORMAL",
"_NET_WM_WINDOW_TYPE_POPUP_MENU",
"_NET_WM_WINDOW_TYPE_TOOLTIP",
"_NET_WM_WINDOW_TYPE_UTILITY",
"_NET_WM_USER_TIME",
"_NET_WM_USER_TIME_WINDOW",
"_NET_VIRTUAL_ROOTS",
"GDK_SELECTION",
"_NET_WM_STATE_FOCUSED"
@@ -1394,7 +1404,7 @@ _gdk_x11_display_open (const gchar *display_name)
* structures in places
*/
for (i = 0; i < ScreenCount (display_x11->xdisplay); i++)
_gdk_x11_screen_init_events (display_x11->screens[i]);
_gdk_x11_xsettings_init (GDK_X11_SCREEN (display_x11->screens[i]));
/*set the default screen */
display_x11->default_screen = display_x11->screens[DefaultScreen (display_x11->xdisplay)];
@@ -1731,7 +1741,8 @@ device_grab_update_callback (GdkDisplay *display,
pointer_info = _gdk_display_get_pointer_info (display, device);
_gdk_display_device_grab_update (display, device,
pointer_info->last_slave, serial);
pointer_info->last_slave ? pointer_info->last_slave : device,
serial);
}
#define XSERVER_TIME_IS_LATER(time1, time2) \

View File

@@ -230,6 +230,8 @@ guint _gdk_x11_device_xi2_translate_state (XIModifierState *mods_state,
XIButtonState *buttons_state,
XIGroupState *group_state);
gint _gdk_x11_device_xi2_get_id (GdkX11DeviceXI2 *device);
void _gdk_device_xi2_unset_scroll_valuators (GdkX11DeviceXI2 *device);
GdkDevice * _gdk_x11_device_manager_xi2_lookup (GdkX11DeviceManagerXI2 *device_manager_xi2,
gint device_id);
@@ -297,6 +299,10 @@ void _gdk_x11_precache_atoms (GdkDisplay *display,
const gchar * const *atom_names,
gint n_atoms);
Atom _gdk_x11_get_xatom_for_display_printf (GdkDisplay *display,
const gchar *format,
...) G_GNUC_PRINTF (2, 3);
GdkFilterReturn
_gdk_x11_dnd_filter (GdkXEvent *xev,
GdkEvent *event,
@@ -304,7 +310,6 @@ _gdk_x11_dnd_filter (GdkXEvent *xev,
void _gdk_x11_screen_init_root_window (GdkScreen *screen);
void _gdk_x11_screen_init_visuals (GdkScreen *screen);
void _gdk_x11_screen_init_events (GdkScreen *screen);
void _gdk_x11_cursor_update_theme (GdkCursor *cursor);
void _gdk_x11_cursor_display_finalize (GdkDisplay *display);

View File

@@ -461,6 +461,26 @@ gdk_x11_get_xatom_by_name_for_display (GdkDisplay *display,
gdk_atom_intern (atom_name, FALSE));
}
Atom
_gdk_x11_get_xatom_for_display_printf (GdkDisplay *display,
const gchar *format,
...)
{
va_list args;
char *atom_name;
Atom atom;
va_start (args, format);
atom_name = g_strdup_vprintf (format, args);
va_end (args);
atom = gdk_x11_get_xatom_by_name_for_display (display, atom_name);
g_free (atom_name);
return atom;
}
/**
* gdk_x11_get_xatom_by_name:
* @atom_name: a string

View File

@@ -24,6 +24,7 @@
#include "gdkscreen-x11.h"
#include "gdkdisplay-x11.h"
#include "gdkprivate-x11.h"
#include "xsettings-client.h"
#include <glib.h>
@@ -47,8 +48,6 @@
#include <X11/extensions/Xfixes.h>
#endif
#include "gdksettings.c"
static void gdk_x11_screen_dispose (GObject *object);
static void gdk_x11_screen_finalize (GObject *object);
static void init_randr_support (GdkScreen *screen);
@@ -97,13 +96,13 @@ gdk_x11_screen_get_display (GdkScreen *screen)
static gint
gdk_x11_screen_get_width (GdkScreen *screen)
{
return WidthOfScreen (GDK_X11_SCREEN (screen)->xscreen);
return GDK_X11_SCREEN (screen)->width;
}
static gint
gdk_x11_screen_get_height (GdkScreen *screen)
{
return HeightOfScreen (GDK_X11_SCREEN (screen)->xscreen);
return GDK_X11_SCREEN (screen)->height;
}
static gint
@@ -130,18 +129,6 @@ gdk_x11_screen_get_root_window (GdkScreen *screen)
return GDK_X11_SCREEN (screen)->root_window;
}
static void
_gdk_x11_screen_events_uninit (GdkScreen *screen)
{
GdkX11Screen *x11_screen = GDK_X11_SCREEN (screen);
if (x11_screen->xsettings_client)
{
xsettings_client_destroy (x11_screen->xsettings_client);
x11_screen->xsettings_client = NULL;
}
}
static void
gdk_x11_screen_dispose (GObject *object)
{
@@ -157,11 +144,14 @@ gdk_x11_screen_dispose (GObject *object)
}
}
_gdk_x11_screen_events_uninit (GDK_SCREEN (object));
_gdk_x11_xsettings_finish (x11_screen);
if (x11_screen->root_window)
_gdk_window_destroy (x11_screen->root_window, TRUE);
for (i = 0; i < x11_screen->nvisuals; i++)
g_object_run_dispose (G_OBJECT (x11_screen->visuals[i]));
G_OBJECT_CLASS (gdk_x11_screen_parent_class)->dispose (object);
x11_screen->xdisplay = NULL;
@@ -298,7 +288,7 @@ get_current_desktop (GdkScreen *screen)
&data_return);
if (type == XA_CARDINAL && format == 32 && n_items > 0)
workspace = (int) data_return[0];
workspace = ((long *) data_return)[0];
if (data_return)
XFree (data_return);
@@ -436,27 +426,23 @@ gdk_x11_screen_get_screen_number (GdkScreen *screen)
return GDK_X11_SCREEN (screen)->screen_num;
}
static Atom
get_cm_atom (GdkX11Screen *x11_screen)
{
return _gdk_x11_get_xatom_for_display_printf (x11_screen->display, "_NET_WM_CM_S%d", x11_screen->screen_num);
}
static gboolean
check_is_composited (GdkDisplay *display,
GdkX11Screen *x11_screen)
{
Atom xselection = gdk_x11_atom_to_xatom_for_display (display, x11_screen->cm_selection_atom);
Window xwindow;
xwindow = XGetSelectionOwner (GDK_DISPLAY_XDISPLAY (display), xselection);
xwindow = XGetSelectionOwner (GDK_DISPLAY_XDISPLAY (display), get_cm_atom (x11_screen));
return xwindow != None;
}
static GdkAtom
make_cm_atom (int screen_number)
{
gchar *name = g_strdup_printf ("_NET_WM_CM_S%d", screen_number);
GdkAtom atom = gdk_atom_intern (name, FALSE);
g_free (name);
return atom;
}
static void
init_monitor_geometry (GdkX11Monitor *monitor,
int x, int y, int width, int height)
@@ -909,8 +895,8 @@ _gdk_x11_screen_get_edge_monitors (GdkScreen *screen,
gint *right)
{
GdkX11Screen *x11_screen = GDK_X11_SCREEN (screen);
gint top_most_pos = HeightOfScreen (GDK_X11_SCREEN (screen)->xscreen);
gint left_most_pos = WidthOfScreen (GDK_X11_SCREEN (screen)->xscreen);
gint top_most_pos = x11_screen->height;
gint left_most_pos = x11_screen->width;
gint bottom_most_pos = 0;
gint right_most_pos = 0;
gint monitor_num;
@@ -1039,6 +1025,30 @@ init_multihead (GdkScreen *screen)
HeightOfScreen (x11_screen->xscreen));
}
static void
update_bounding_box (GdkScreen *screen)
{
GdkX11Screen *x11_screen = GDK_X11_SCREEN (screen);
gint i, x1, y1, x2, y2;
x1 = y1 = G_MAXINT;
x2 = y2 = G_MININT;
for (i = 0; i < x11_screen->n_monitors; i++)
{
GdkX11Monitor *monitor;
monitor = &x11_screen->monitors[i];
x1 = MIN (x1, monitor->geometry.x);
y1 = MIN (y1, monitor->geometry.y);
x2 = MAX (x2, monitor->geometry.x + monitor->geometry.width);
y2 = MAX (y2, monitor->geometry.y + monitor->geometry.height);
}
x11_screen->width = x2 - x1;
x11_screen->height = y2 - y1;
}
GdkScreen *
_gdk_x11_screen_new (GdkDisplay *display,
gint screen_number)
@@ -1064,7 +1074,8 @@ _gdk_x11_screen_new (GdkDisplay *display,
_gdk_x11_screen_init_visuals (screen);
_gdk_x11_screen_init_root_window (screen);
update_bounding_box (screen);
return screen;
}
@@ -1078,9 +1089,8 @@ _gdk_x11_screen_setup (GdkScreen *screen)
{
GdkX11Screen *x11_screen = GDK_X11_SCREEN (screen);
x11_screen->cm_selection_atom = make_cm_atom (x11_screen->screen_num);
gdk_display_request_selection_notification (x11_screen->display,
x11_screen->cm_selection_atom);
gdk_x11_xatom_to_atom_for_display (x11_screen->display, get_cm_atom (x11_screen)));
x11_screen->is_composited = check_is_composited (x11_screen->display, x11_screen);
}
@@ -1097,6 +1107,7 @@ init_randr_support (GdkScreen *screen)
{
GdkX11Screen *x11_screen = GDK_X11_SCREEN (screen);
/* NB: This is also needed for XSettings, so don't remove. */
XSelectInput (GDK_SCREEN_XDISPLAY (screen),
x11_screen->xroot_window,
StructureNotifyMask);
@@ -1136,11 +1147,13 @@ process_monitors_change (GdkScreen *screen)
x11_screen->monitors, x11_screen->n_monitors) ||
x11_screen->primary_monitor != primary_monitor;
free_monitors (monitors, n_monitors);
if (changed)
g_signal_emit_by_name (screen, "monitors-changed");
{
update_bounding_box (screen);
g_signal_emit_by_name (screen, "monitors-changed");
}
}
void
@@ -1195,10 +1208,8 @@ _gdk_x11_screen_process_owner_change (GdkScreen *screen,
#ifdef HAVE_XFIXES
XFixesSelectionNotifyEvent *selection_event = (XFixesSelectionNotifyEvent *)event;
GdkX11Screen *x11_screen = GDK_X11_SCREEN (screen);
Atom xcm_selection_atom = gdk_x11_atom_to_xatom_for_display (x11_screen->display,
x11_screen->cm_selection_atom);
if (selection_event->selection == xcm_selection_atom)
if (selection_event->selection == get_cm_atom (x11_screen))
{
gboolean composited = selection_event->owner != None;
@@ -1329,97 +1340,35 @@ gdk_x11_screen_get_window_stack (GdkScreen *screen)
return ret;
}
static gboolean
check_transform (const gchar *xsettings_name,
GType src_type,
GType dest_type)
{
if (!g_value_type_transformable (src_type, dest_type))
{
g_warning ("Cannot transform xsetting %s of type %s to type %s\n",
xsettings_name,
g_type_name (src_type),
g_type_name (dest_type));
return FALSE;
}
else
return TRUE;
}
static gboolean
gdk_x11_screen_get_setting (GdkScreen *screen,
const gchar *name,
GValue *value)
{
GdkX11Screen *x11_screen = GDK_X11_SCREEN (screen);
const char *xsettings_name = NULL;
XSettingsResult result;
XSettingsSetting *setting = NULL;
gboolean success = FALSE;
GValue tmp_val = G_VALUE_INIT;
const GValue *setting;
xsettings_name = gdk_to_xsettings_name (name);
if (!xsettings_name)
if (x11_screen->xsettings == NULL)
goto out;
setting = g_hash_table_lookup (x11_screen->xsettings, name);
if (setting == NULL)
goto out;
result = xsettings_client_get_setting (x11_screen->xsettings_client,
xsettings_name, &setting);
if (result != XSETTINGS_SUCCESS)
goto out;
switch (setting->type)
if (!g_value_type_transformable (G_VALUE_TYPE (setting), G_VALUE_TYPE (value)))
{
case XSETTINGS_TYPE_INT:
if (check_transform (xsettings_name, G_TYPE_INT, G_VALUE_TYPE (value)))
{
g_value_init (&tmp_val, G_TYPE_INT);
g_value_set_int (&tmp_val, setting->data.v_int);
g_value_transform (&tmp_val, value);
success = TRUE;
}
break;
case XSETTINGS_TYPE_STRING:
if (check_transform (xsettings_name, G_TYPE_STRING, G_VALUE_TYPE (value)))
{
g_value_init (&tmp_val, G_TYPE_STRING);
g_value_set_string (&tmp_val, setting->data.v_string);
g_value_transform (&tmp_val, value);
success = TRUE;
}
break;
case XSETTINGS_TYPE_COLOR:
if (!check_transform (xsettings_name, GDK_TYPE_RGBA, G_VALUE_TYPE (value)))
{
GdkRGBA rgba;
g_value_init (&tmp_val, GDK_TYPE_RGBA);
rgba.red = setting->data.v_color.red / 65535.0;
rgba.green = setting->data.v_color.green / 65535.0;
rgba.blue = setting->data.v_color.blue / 65535.0;
rgba.alpha = setting->data.v_color.alpha / 65535.0;
g_value_set_boxed (&tmp_val, &rgba);
g_value_transform (&tmp_val, value);
success = TRUE;
}
break;
g_warning ("Cannot transform xsetting %s of type %s to type %s\n",
name,
g_type_name (G_VALUE_TYPE (setting)),
g_type_name (G_VALUE_TYPE (value)));
goto out;
}
g_value_unset (&tmp_val);
g_value_transform (setting, value);
return TRUE;
out:
if (setting)
xsettings_setting_free (setting);
if (success)
return TRUE;
else
return _gdk_x11_get_xft_setting (screen, name, value);
return _gdk_x11_get_xft_setting (screen, name, value);
}
static void
@@ -1551,6 +1500,7 @@ gdk_x11_screen_supports_net_wm_hint (GdkScreen *screen,
GdkX11Screen *x11_screen;
NetWmSupportedAtoms *supported_atoms;
GdkDisplay *display;
Atom atom;
g_return_val_if_fail (GDK_IS_SCREEN (screen), FALSE);
@@ -1602,150 +1552,17 @@ gdk_x11_screen_supports_net_wm_hint (GdkScreen *screen,
if (supported_atoms->atoms == NULL)
return FALSE;
i = 0;
while (i < supported_atoms->n_atoms)
{
if (supported_atoms->atoms[i] == gdk_x11_atom_to_xatom_for_display (display, property))
return TRUE;
atom = gdk_x11_atom_to_xatom_for_display (display, property);
++i;
for (i = 0; i < supported_atoms->n_atoms; i++)
{
if (supported_atoms->atoms[i] == atom)
return TRUE;
}
return FALSE;
}
static void
refcounted_grab_server (Display *xdisplay)
{
GdkDisplay *display = gdk_x11_lookup_xdisplay (xdisplay);
gdk_x11_display_grab (display);
}
static void
refcounted_ungrab_server (Display *xdisplay)
{
GdkDisplay *display = gdk_x11_lookup_xdisplay (xdisplay);
gdk_x11_display_ungrab (display);
}
static GdkFilterReturn
gdk_xsettings_client_event_filter (GdkXEvent *xevent,
GdkEvent *event,
gpointer data)
{
GdkX11Screen *screen = data;
if (xsettings_client_process_event (screen->xsettings_client, (XEvent *)xevent))
return GDK_FILTER_REMOVE;
else
return GDK_FILTER_CONTINUE;
}
static Bool
gdk_xsettings_watch_cb (Window window,
Bool is_start,
long mask,
void *cb_data)
{
GdkWindow *gdkwin;
GdkScreen *screen = cb_data;
gdkwin = gdk_x11_window_lookup_for_display (gdk_screen_get_display (screen), window);
if (is_start)
{
if (gdkwin)
g_object_ref (gdkwin);
else
{
gdkwin = gdk_x11_window_foreign_new_for_display (gdk_screen_get_display (screen), window);
/* gdk_window_foreign_new_for_display() can fail and return NULL if the
* window has already been destroyed.
*/
if (!gdkwin)
return False;
}
gdk_window_add_filter (gdkwin, gdk_xsettings_client_event_filter, screen);
}
else
{
if (!gdkwin)
{
/* gdkwin should not be NULL here, since if starting the watch succeeded
* we have a reference on the window. It might mean that the caller didn't
* remove the watch when it got a DestroyNotify event. Or maybe the
* caller ignored the return value when starting the watch failed.
*/
g_warning ("gdk_xsettings_watch_cb(): Couldn't find window to unwatch");
return False;
}
gdk_window_remove_filter (gdkwin, gdk_xsettings_client_event_filter, screen);
g_object_unref (gdkwin);
}
return True;
}
static void
gdk_xsettings_notify_cb (const char *name,
XSettingsAction action,
XSettingsSetting *setting,
void *data)
{
GdkEvent new_event;
GdkScreen *screen = data;
GdkX11Screen *x11_screen = data;
if (x11_screen->xsettings_in_init)
return;
new_event.type = GDK_SETTING;
new_event.setting.window = gdk_screen_get_root_window (screen);
new_event.setting.send_event = FALSE;
new_event.setting.name = (char*) gdk_from_xsettings_name (name);
if (!new_event.setting.name)
return;
switch (action)
{
case XSETTINGS_ACTION_NEW:
new_event.setting.action = GDK_SETTING_ACTION_NEW;
break;
case XSETTINGS_ACTION_CHANGED:
new_event.setting.action = GDK_SETTING_ACTION_CHANGED;
break;
case XSETTINGS_ACTION_DELETED:
new_event.setting.action = GDK_SETTING_ACTION_DELETED;
break;
}
gdk_event_put (&new_event);
}
void
_gdk_x11_screen_init_events (GdkScreen *screen)
{
GdkX11Screen *x11_screen = GDK_X11_SCREEN (screen);
/* Keep a flag to avoid extra notifies that we don't need
*/
x11_screen->xsettings_in_init = TRUE;
x11_screen->xsettings_client = xsettings_client_new_with_grab_funcs (x11_screen->xdisplay,
x11_screen->screen_num,
gdk_xsettings_notify_cb,
gdk_xsettings_watch_cb,
screen,
refcounted_grab_server,
refcounted_ungrab_server);
x11_screen->xsettings_in_init = FALSE;
}
/**
* gdk_x11_screen_get_window_manager_name:
* @screen: (type GdkX11Screen): a #GdkScreen

View File

@@ -25,7 +25,6 @@
#include "gdkscreenprivate.h"
#include "gdkx11screen.h"
#include "gdkvisual.h"
#include "xsettings-client.h"
#include <X11/X.h>
#include <X11/Xlib.h>
@@ -48,6 +47,9 @@ struct _GdkX11Screen
GdkX11Monitor *monitors;
gint primary_monitor;
gint width;
gint height;
/* Xft resources for the display, used for default values for
* the Xft/ XSETTINGS
*/
@@ -56,11 +58,15 @@ struct _GdkX11Screen
gint xft_dpi;
/* Window manager */
GdkAtom cm_selection_atom;
long last_wmspec_check_time;
Window wmspec_check_window;
char *window_manager_name;
/* X Settings */
GdkWindow *xsettings_manager_window;
Atom xsettings_selection_atom;
GHashTable *xsettings; /* string of GDK settings name => GValue */
/* TRUE if wmspec_check_window has changed since last
* fetch of _NET_SUPPORTED
*/
@@ -69,7 +75,6 @@ struct _GdkX11Screen
* fetch of window manager name
*/
guint need_refetch_wm_name : 1;
guint xsettings_in_init : 1;
guint is_composited : 1;
guint xft_init : 1; /* Whether we've intialized these values yet */
guint xft_antialias : 1;
@@ -86,9 +91,6 @@ struct _GdkX11Screen
GHashTable *visual_hash;
GdkVisual *rgba_visual;
/* X settings */
XSettingsClient *xsettings_client;
/* cache for window->translate vfunc */
GC subwindow_gcs[32];

View File

@@ -97,20 +97,3 @@ gdk_from_xsettings_name (const char *xname)
return g_hash_table_lookup (hash, xname);
}
static const char *
gdk_to_xsettings_name (const char *gdkname)
{
static GHashTable *hash = NULL;
guint i;
if (G_UNLIKELY (hash == NULL))
{
hash = g_hash_table_new (g_str_hash, g_str_equal);
for (i = 0; i < G_N_ELEMENTS (gdk_settings_map); i++)
g_hash_table_insert (hash, (gpointer)gdk_settings_map[i].gdkname,
(gpointer)gdk_settings_map[i].xname);
}
return g_hash_table_lookup (hash, gdkname);
}

View File

@@ -87,12 +87,28 @@ gdk_x11_visual_finalize (GObject *object)
G_OBJECT_CLASS (gdk_x11_visual_parent_class)->finalize (object);
}
static void
gdk_x11_visual_dispose (GObject *object)
{
GdkVisual *visual = (GdkVisual *)object;
GdkX11Visual *x11_visual = (GdkX11Visual *)object;
if (x11_visual->colormap != None)
{
XFreeColormap (GDK_SCREEN_XDISPLAY (visual->screen), x11_visual->colormap);
x11_visual->colormap = None;
}
G_OBJECT_CLASS (gdk_x11_visual_parent_class)->dispose (object);
}
static void
gdk_x11_visual_class_init (GdkX11VisualClass *class)
{
GObjectClass *object_class = G_OBJECT_CLASS (class);
object_class->finalize = gdk_x11_visual_finalize;
object_class->dispose = gdk_x11_visual_dispose;
}
void

View File

@@ -157,6 +157,7 @@ gdk_window_impl_x11_init (GdkWindowImplX11 *impl)
impl->toplevel_window_type = -1;
impl->device_cursor = g_hash_table_new_full (NULL, NULL,
NULL, g_object_unref);
impl->frame_sync_enabled = TRUE;
}
GdkToplevelX11 *
@@ -403,7 +404,8 @@ gdk_x11_window_end_frame (GdkWindow *window)
impl->toplevel->extended_update_counter,
impl->toplevel->current_counter_value);
if (gdk_x11_screen_supports_net_wm_hint (gdk_window_get_screen (window),
if (impl->frame_sync_enabled &&
gdk_x11_screen_supports_net_wm_hint (gdk_window_get_screen (window),
gdk_atom_intern_static_string ("_NET_WM_FRAME_DRAWN")))
{
impl->toplevel->frame_pending = TRUE;
@@ -1077,15 +1079,15 @@ _gdk_x11_display_create_window_impl (GdkDisplay *display,
class = InputOnly;
}
if (window->width > 65535 ||
window->height > 65535)
if (window->width > 32767 ||
window->height > 32767)
{
g_warning ("Native Windows wider or taller than 65535 pixels are not supported");
g_warning ("Native Windows wider or taller than 32767 pixels are not supported");
if (window->width > 65535)
window->width = 65535;
if (window->height > 65535)
window->height = 65535;
if (window->width > 32767)
window->width = 32767;
if (window->height > 32767)
window->height = 32767;
}
impl->xid = XCreateWindow (xdisplay, xparent,
@@ -5306,6 +5308,37 @@ gdk_x11_window_get_xid (GdkWindow *window)
return GDK_WINDOW_IMPL_X11 (window->impl)->xid;
}
/**
* gdk_x11_window_set_frame_sync_enabled:
* @window: (type GdkX11Window): a native #GdkWindow
* @frame_sync_enabled: whether frame-synchronization should be enabled
*
* This function can be used to disable frame synchronization for a window.
* Normally frame synchronziation will be enabled or disabled based on whether
* the system has a compositor that supports frame synchronization, but if
* the window is not directly managed by the window manager, then frame
* synchronziation may need to be disabled. This is the case for a window
* embedded via the XEMBED protocol.
*
* Since: 3.8
*/
void
gdk_x11_window_set_frame_sync_enabled (GdkWindow *window,
gboolean frame_sync_enabled)
{
/* Try to ensure the window has a native window */
if (!_gdk_window_has_impl (window))
gdk_window_ensure_native (window);
if (!GDK_WINDOW_IS_X11 (window))
{
g_warning (G_STRLOC " drawable is not a native X11 window");
return;
}
GDK_WINDOW_IMPL_X11 (window->impl)->frame_sync_enabled = FALSE;
}
static void
gdk_window_impl_x11_class_init (GdkWindowImplX11Class *klass)
{

View File

@@ -73,6 +73,7 @@ struct _GdkWindowImplX11
* unset during resizing and scaling */
guint override_redirect : 1;
guint frame_clock_connected : 1;
guint frame_sync_enabled : 1;
cairo_surface_t *cairo_surface;
@@ -172,6 +173,8 @@ GType gdk_window_impl_x11_get_type (void);
void gdk_x11_window_set_user_time (GdkWindow *window,
guint32 timestamp);
void gdk_x11_window_set_frame_sync_enabled (GdkWindow *window,
gboolean frame_sync_enabled);
GdkToplevelX11 *_gdk_x11_window_get_toplevel (GdkWindow *window);
void _gdk_x11_window_tmp_unset_bg (GdkWindow *window,

View File

@@ -55,6 +55,7 @@ GType gdk_x11_window_get_type (void);
Window gdk_x11_window_get_xid (GdkWindow *window);
void gdk_x11_window_set_user_time (GdkWindow *window,
guint32 timestamp);
GDK_AVAILABLE_IN_3_4
void gdk_x11_window_set_utf8_property (GdkWindow *window,
const gchar *name,
const gchar *value);
@@ -66,6 +67,10 @@ void gdk_x11_window_set_hide_titlebar_when_maximized (GdkWindow *window,
gboolean hide_titlebar_when_maximized);
void gdk_x11_window_move_to_current_desktop (GdkWindow *window);
GDK_AVAILABLE_IN_3_8
void gdk_x11_window_set_frame_sync_enabled (GdkWindow *window,
gboolean frame_sync_enabled);
/**
* GDK_WINDOW_XDISPLAY:
* @win: a #GdkWindow.

View File

@@ -25,58 +25,102 @@
#include "xsettings-client.h"
#include <limits.h>
#include <stdio.h>
#include <stdlib.h>
#include <gdk/x11/gdkx11display.h>
#include <gdk/x11/gdkx11property.h>
#include <gdk/x11/gdkx11screen.h>
#include <gdk/x11/gdkx11window.h>
#include <gdk/x11/gdkprivate-x11.h>
#include <gdk/x11/gdkscreen-x11.h>
#include <gdkinternals.h>
#include <string.h>
#include <X11/Xlib.h>
#include <X11/Xmd.h> /* For CARD16 */
struct _XSettingsClient
#include "gdksettings.c"
/* Types of settings possible. Enum values correspond to
* protocol values.
*/
typedef enum
{
Display *display;
int screen;
XSettingsNotifyFunc notify;
XSettingsWatchFunc watch;
void *cb_data;
XSETTINGS_TYPE_INT = 0,
XSETTINGS_TYPE_STRING = 1,
XSETTINGS_TYPE_COLOR = 2
} XSettingsType;
XSettingsGrabFunc grab;
XSettingsGrabFunc ungrab;
typedef struct _XSettingsBuffer XSettingsBuffer;
Window manager_window;
Atom manager_atom;
Atom selection_atom;
Atom xsettings_atom;
XSettingsList *settings;
struct _XSettingsBuffer
{
char byte_order;
size_t len;
unsigned char *data;
unsigned char *pos;
};
static void
notify_changes (XSettingsClient *client,
XSettingsList *old_list)
gdk_xsettings_notify (GdkX11Screen *x11_screen,
const char *name,
GdkSettingAction action)
{
GdkEvent new_event;
new_event.type = GDK_SETTING;
new_event.setting.window = gdk_screen_get_root_window (GDK_SCREEN (x11_screen));
new_event.setting.send_event = FALSE;
new_event.setting.action = action;
new_event.setting.name = (char*) name;
gdk_event_put (&new_event);
}
static gboolean
value_equal (const GValue *value_a,
const GValue *value_b)
{
if (G_VALUE_TYPE (value_a) != G_VALUE_TYPE (value_b))
return FALSE;
switch (G_VALUE_TYPE (value_a))
{
case G_TYPE_INT:
return g_value_get_int (value_a) == g_value_get_int (value_b);
case XSETTINGS_TYPE_COLOR:
return gdk_rgba_equal (g_value_get_boxed (value_a), g_value_get_boxed (value_b));
case G_TYPE_STRING:
return g_str_equal (g_value_get_string (value_a), g_value_get_string (value_b));
default:
g_warning ("unable to compare values of type %s", g_type_name (G_VALUE_TYPE (value_a)));
return FALSE;
}
}
static void
notify_changes (GdkX11Screen *x11_screen,
GHashTable *old_list)
{
GHashTableIter iter;
XSettingsSetting *setting, *old_setting;
GValue *setting, *old_setting;
const char *name;
if (!client->notify)
return;
if (client->settings != NULL)
if (x11_screen->xsettings != NULL)
{
g_hash_table_iter_init (&iter, client->settings);
while (g_hash_table_iter_next (&iter, NULL, (gpointer*) &setting))
g_hash_table_iter_init (&iter, x11_screen->xsettings);
while (g_hash_table_iter_next (&iter, (gpointer *) &name, (gpointer*) &setting))
{
old_setting = xsettings_list_lookup (old_list, setting->name);
old_setting = old_list ? g_hash_table_lookup (old_list, name) : NULL;
if (old_setting == NULL)
client->notify (setting->name, XSETTINGS_ACTION_NEW, setting, client->cb_data);
else if (!xsettings_setting_equal (setting, old_setting))
client->notify (setting->name, XSETTINGS_ACTION_CHANGED, setting, client->cb_data);
gdk_xsettings_notify (x11_screen, name, GDK_SETTING_ACTION_NEW);
else if (!value_equal (setting, old_setting))
gdk_xsettings_notify (x11_screen, name, GDK_SETTING_ACTION_CHANGED);
/* remove setting from old_list */
if (old_setting != NULL)
g_hash_table_remove (old_list, setting->name);
g_hash_table_remove (old_list, name);
}
}
@@ -84,270 +128,275 @@ notify_changes (XSettingsClient *client,
{
/* old_list now contains only deleted settings */
g_hash_table_iter_init (&iter, old_list);
while (g_hash_table_iter_next (&iter, NULL, (gpointer*) &old_setting))
client->notify (old_setting->name, XSETTINGS_ACTION_DELETED, NULL, client->cb_data);
while (g_hash_table_iter_next (&iter, (gpointer *) &name, (gpointer*) &old_setting))
gdk_xsettings_notify (x11_screen, name, GDK_SETTING_ACTION_DELETED);
}
}
static int
ignore_errors (Display *display, XErrorEvent *event)
{
return True;
}
static char local_byte_order = '\0';
#define BYTES_LEFT(buffer) ((buffer)->data + (buffer)->len - (buffer)->pos)
static XSettingsResult
#define return_if_fail_bytes(buffer, n_bytes) G_STMT_START{ \
if (BYTES_LEFT (buffer) < (n_bytes)) \
{ \
g_warning ("Invalid XSETTINGS property (read off end: Expected %u bytes, only %ld left", \
(n_bytes), BYTES_LEFT (buffer)); \
return FALSE; \
} \
}G_STMT_END
static gboolean
fetch_card16 (XSettingsBuffer *buffer,
CARD16 *result)
{
CARD16 x;
if (BYTES_LEFT (buffer) < 2)
return XSETTINGS_ACCESS;
return_if_fail_bytes (buffer, 2);
x = *(CARD16 *)buffer->pos;
buffer->pos += 2;
if (buffer->byte_order == local_byte_order)
*result = x;
if (buffer->byte_order == MSBFirst)
*result = GUINT16_FROM_BE (x);
else
*result = (x << 8) | (x >> 8);
*result = GUINT16_FROM_LE (x);
return XSETTINGS_SUCCESS;
return TRUE;
}
static XSettingsResult
static gboolean
fetch_ushort (XSettingsBuffer *buffer,
unsigned short *result)
{
CARD16 x;
XSettingsResult r;
gboolean r;
r = fetch_card16 (buffer, &x);
if (r == XSETTINGS_SUCCESS)
if (r)
*result = x;
return r;
}
static XSettingsResult
static gboolean
fetch_card32 (XSettingsBuffer *buffer,
CARD32 *result)
{
CARD32 x;
if (BYTES_LEFT (buffer) < 4)
return XSETTINGS_ACCESS;
return_if_fail_bytes (buffer, 4);
x = *(CARD32 *)buffer->pos;
buffer->pos += 4;
if (buffer->byte_order == local_byte_order)
*result = x;
if (buffer->byte_order == MSBFirst)
*result = GUINT32_FROM_BE (x);
else
*result = (x << 24) | ((x & 0xff00) << 8) | ((x & 0xff0000) >> 8) | (x >> 24);
*result = GUINT32_FROM_LE (x);
return XSETTINGS_SUCCESS;
return TRUE;
}
static XSettingsResult
static gboolean
fetch_card8 (XSettingsBuffer *buffer,
CARD8 *result)
{
if (BYTES_LEFT (buffer) < 1)
return XSETTINGS_ACCESS;
return_if_fail_bytes (buffer, 1);
*result = *(CARD8 *)buffer->pos;
buffer->pos += 1;
return XSETTINGS_SUCCESS;
return TRUE;
}
#define XSETTINGS_PAD(n,m) ((n + m - 1) & (~(m-1)))
static XSettingsList *
static gboolean
fetch_string (XSettingsBuffer *buffer,
guint length,
char **result)
{
guint pad_len;
pad_len = XSETTINGS_PAD (length, 4);
if (pad_len < length) /* guard against overflow */
{
g_warning ("Invalid XSETTINGS property (overflow in string length)");
return FALSE;
}
return_if_fail_bytes (buffer, pad_len);
*result = g_strndup ((char *) buffer->pos, length);
buffer->pos += pad_len;
return TRUE;
}
static void
free_value (gpointer data)
{
GValue *value = data;
g_value_unset (value);
g_free (value);
}
static GHashTable *
parse_settings (unsigned char *data,
size_t len)
{
XSettingsBuffer buffer;
XSettingsResult result = XSETTINGS_SUCCESS;
XSettingsList *settings = NULL;
GHashTable *settings = NULL;
CARD32 serial;
CARD32 n_entries;
CARD32 i;
XSettingsSetting *setting = NULL;
GValue *value = NULL;
char *x_name = NULL;
const char *gdk_name;
local_byte_order = xsettings_byte_order ();
buffer.pos = buffer.data = data;
buffer.len = len;
result = fetch_card8 (&buffer, (unsigned char *)&buffer.byte_order);
if (!fetch_card8 (&buffer, (unsigned char *)&buffer.byte_order))
goto out;
if (buffer.byte_order != MSBFirst &&
buffer.byte_order != LSBFirst)
{
fprintf (stderr, "Invalid byte order in XSETTINGS property\n");
result = XSETTINGS_FAILED;
g_warning ("Invalid XSETTINGS property (unknown byte order %u)", buffer.byte_order);
goto out;
}
buffer.pos += 3;
result = fetch_card32 (&buffer, &serial);
if (result != XSETTINGS_SUCCESS)
if (!fetch_card32 (&buffer, &serial) ||
!fetch_card32 (&buffer, &n_entries))
goto out;
result = fetch_card32 (&buffer, &n_entries);
if (result != XSETTINGS_SUCCESS)
goto out;
GDK_NOTE(SETTINGS, g_print("reading %u settings (serial %u byte order %u)\n", n_entries, serial, buffer.byte_order));
for (i = 0; i < n_entries; i++)
{
CARD8 type;
CARD16 name_len;
CARD32 v_int;
size_t pad_len;
result = fetch_card8 (&buffer, &type);
if (result != XSETTINGS_SUCCESS)
if (!fetch_card8 (&buffer, &type))
goto out;
buffer.pos += 1;
result = fetch_card16 (&buffer, &name_len);
if (result != XSETTINGS_SUCCESS)
if (!fetch_card16 (&buffer, &name_len))
goto out;
pad_len = XSETTINGS_PAD(name_len, 4);
if (BYTES_LEFT (&buffer) < pad_len)
{
result = XSETTINGS_ACCESS;
goto out;
}
setting = malloc (sizeof *setting);
if (!setting)
{
result = XSETTINGS_NO_MEM;
goto out;
}
setting->type = XSETTINGS_TYPE_INT; /* No allocated memory */
setting->name = malloc (name_len + 1);
if (!setting->name)
{
result = XSETTINGS_NO_MEM;
goto out;
}
memcpy (setting->name, buffer.pos, name_len);
setting->name[name_len] = '\0';
buffer.pos += pad_len;
result = fetch_card32 (&buffer, &v_int);
if (result != XSETTINGS_SUCCESS)
if (!fetch_string (&buffer, name_len, &x_name) ||
/* last change serial (we ignore it) */
!fetch_card32 (&buffer, &v_int))
goto out;
setting->last_change_serial = v_int;
switch (type)
{
case XSETTINGS_TYPE_INT:
result = fetch_card32 (&buffer, &v_int);
if (result != XSETTINGS_SUCCESS)
if (!fetch_card32 (&buffer, &v_int))
goto out;
setting->data.v_int = (INT32)v_int;
value = g_new0 (GValue, 1);
g_value_init (value, G_TYPE_INT);
g_value_set_int (value, (gint32) v_int);
GDK_NOTE(SETTINGS, g_print(" %s = %d\n", x_name, (gint32) v_int));
break;
case XSETTINGS_TYPE_STRING:
result = fetch_card32 (&buffer, &v_int);
if (result != XSETTINGS_SUCCESS)
goto out;
{
char *s;
pad_len = XSETTINGS_PAD (v_int, 4);
if (v_int + 1 == 0 || /* Guard against wrap-around */
BYTES_LEFT (&buffer) < pad_len)
{
result = XSETTINGS_ACCESS;
goto out;
}
setting->data.v_string = malloc (v_int + 1);
if (!setting->data.v_string)
{
result = XSETTINGS_NO_MEM;
goto out;
}
memcpy (setting->data.v_string, buffer.pos, v_int);
setting->data.v_string[v_int] = '\0';
buffer.pos += pad_len;
if (!fetch_card32 (&buffer, &v_int) ||
!fetch_string (&buffer, v_int, &s))
goto out;
value = g_new0 (GValue, 1);
g_value_init (value, G_TYPE_STRING);
g_value_take_string (value, s);
GDK_NOTE(SETTINGS, g_print(" %s = \"%s\"\n", x_name, s));
}
break;
case XSETTINGS_TYPE_COLOR:
result = fetch_ushort (&buffer, &setting->data.v_color.red);
if (result != XSETTINGS_SUCCESS)
goto out;
result = fetch_ushort (&buffer, &setting->data.v_color.green);
if (result != XSETTINGS_SUCCESS)
goto out;
result = fetch_ushort (&buffer, &setting->data.v_color.blue);
if (result != XSETTINGS_SUCCESS)
goto out;
result = fetch_ushort (&buffer, &setting->data.v_color.alpha);
if (result != XSETTINGS_SUCCESS)
goto out;
{
unsigned short red, green, blue, alpha;
GdkRGBA rgba;
if (!fetch_ushort (&buffer, &red) ||
!fetch_ushort (&buffer, &green) ||
!fetch_ushort (&buffer, &blue) ||
!fetch_ushort (&buffer, &alpha))
goto out;
rgba.red = red / 65535.0;
rgba.green = green / 65535.0;
rgba.blue = blue / 65535.0;
rgba.alpha = alpha / 65535.0;
value = g_new0 (GValue, 1);
g_value_init (value, G_TYPE_STRING);
g_value_set_boxed (value, &rgba);
GDK_NOTE(SETTINGS, g_print(" %s = #%02X%02X%02X%02X\n", x_name, alpha,red, green, blue));
}
break;
default:
/* Quietly ignore unknown types */
GDK_NOTE(SETTINGS, g_print(" %s = ignored (unknown type %u)\n", x_name, type));
break;
}
setting->type = type;
gdk_name = gdk_from_xsettings_name (x_name);
g_free (x_name);
x_name = NULL;
result = xsettings_list_insert (&settings, setting);
if (result != XSETTINGS_SUCCESS)
goto out;
if (gdk_name == NULL)
{
GDK_NOTE(SETTINGS, g_print(" ==> unknown to GTK\n"));
}
else
{
GDK_NOTE(SETTINGS, g_print(" ==> storing as '%s'\n", gdk_name));
setting = NULL;
}
if (settings == NULL)
settings = g_hash_table_new_full (g_str_hash, g_str_equal,
NULL,
free_value);
out:
if (g_hash_table_lookup (settings, gdk_name) != NULL)
{
g_warning ("Invalid XSETTINGS property (Duplicate entry for '%s')", gdk_name);
goto out;
}
if (result != XSETTINGS_SUCCESS)
{
switch (result)
{
case XSETTINGS_NO_MEM:
fprintf(stderr, "Out of memory reading XSETTINGS property\n");
break;
case XSETTINGS_ACCESS:
fprintf(stderr, "Invalid XSETTINGS property (read off end)\n");
break;
case XSETTINGS_DUPLICATE_ENTRY:
fprintf (stderr, "Duplicate XSETTINGS entry for '%s'\n", setting->name);
case XSETTINGS_FAILED:
case XSETTINGS_SUCCESS:
case XSETTINGS_NO_ENTRY:
break;
}
if (setting)
xsettings_setting_free (setting);
xsettings_list_free (settings);
settings = NULL;
g_hash_table_insert (settings, (gpointer) gdk_name, value);
}
value = NULL;
}
return settings;
out:
if (value)
free_value (value);
if (settings)
g_hash_table_unref (settings);
g_free (x_name);
return NULL;
}
static void
read_settings (XSettingsClient *client)
read_settings (GdkX11Screen *x11_screen,
gboolean do_notify)
{
Atom type;
int format;
@@ -356,234 +405,169 @@ read_settings (XSettingsClient *client)
unsigned char *data;
int result;
int (*old_handler) (Display *, XErrorEvent *);
XSettingsList *old_list = client->settings;
GHashTable *old_list = x11_screen->xsettings;
client->settings = NULL;
x11_screen->xsettings = NULL;
if (client->manager_window)
if (x11_screen->xsettings_manager_window)
{
old_handler = XSetErrorHandler (ignore_errors);
result = XGetWindowProperty (client->display, client->manager_window,
client->xsettings_atom, 0, LONG_MAX,
False, client->xsettings_atom,
GdkDisplay *display = x11_screen->display;
Atom xsettings_atom = gdk_x11_get_xatom_by_name_for_display (display, "_XSETTINGS_SETTINGS");
gdk_x11_display_error_trap_push (display);
result = XGetWindowProperty (gdk_x11_display_get_xdisplay (display),
gdk_x11_window_get_xid (x11_screen->xsettings_manager_window),
xsettings_atom, 0, LONG_MAX,
False, xsettings_atom,
&type, &format, &n_items, &bytes_after, &data);
XSetErrorHandler (old_handler);
gdk_x11_display_error_trap_pop_ignored (display);
if (result == Success && type != None)
{
if (type != client->xsettings_atom)
if (type != xsettings_atom)
{
fprintf (stderr, "Invalid type for XSETTINGS property");
g_warning ("Invalid type for XSETTINGS property: %s", gdk_x11_get_xatom_name_for_display (display, type));
}
else if (format != 8)
{
fprintf (stderr, "Invalid format for XSETTINGS property %d", format);
g_warning ("Invalid format for XSETTINGS property: %d", format);
}
else
client->settings = parse_settings (data, n_items);
x11_screen->xsettings = parse_settings (data, n_items);
XFree (data);
}
}
notify_changes (client, old_list);
xsettings_list_free (old_list);
if (do_notify)
notify_changes (x11_screen, old_list);
if (old_list)
g_hash_table_unref (old_list);
}
static void
add_events (Display *display,
Window window,
long mask)
static Atom
get_selection_atom (GdkX11Screen *x11_screen)
{
XWindowAttributes attr;
XGetWindowAttributes (display, window, &attr);
XSelectInput (display, window, attr.your_event_mask | mask);
return _gdk_x11_get_xatom_for_display_printf (x11_screen->display, "_XSETTINGS_S%d", x11_screen->screen_num);
}
static GdkFilterReturn
gdk_xsettings_manager_window_filter (GdkXEvent *xevent,
GdkEvent *event,
gpointer data);
static void
check_manager_window (XSettingsClient *client)
check_manager_window (GdkX11Screen *x11_screen,
gboolean notify_changes)
{
if (client->manager_window && client->watch)
client->watch (client->manager_window, False, 0, client->cb_data);
GdkDisplay *display;
Display *xdisplay;
Window manager_window_xid;
if (client->grab)
client->grab (client->display);
else
XGrabServer (client->display);
display = x11_screen->display;
xdisplay = gdk_x11_display_get_xdisplay (display);
client->manager_window = XGetSelectionOwner (client->display,
client->selection_atom);
if (client->manager_window)
XSelectInput (client->display, client->manager_window,
PropertyChangeMask | StructureNotifyMask);
if (client->ungrab)
client->ungrab (client->display);
else
XUngrabServer (client->display);
XFlush (client->display);
if (client->manager_window && client->watch)
if (x11_screen->xsettings_manager_window)
{
if (!client->watch (client->manager_window, True,
PropertyChangeMask | StructureNotifyMask,
client->cb_data))
{
/* Inability to watch the window probably means that it was destroyed
* after we ungrabbed
*/
client->manager_window = None;
return;
}
gdk_window_remove_filter (x11_screen->xsettings_manager_window, gdk_xsettings_manager_window_filter, x11_screen);
g_object_unref (x11_screen->xsettings_manager_window);
}
gdk_x11_display_grab (display);
manager_window_xid = XGetSelectionOwner (xdisplay, get_selection_atom (x11_screen));
x11_screen->xsettings_manager_window = gdk_x11_window_foreign_new_for_display (display,
manager_window_xid);
/* XXX: Can't use gdk_window_set_events() here because the first call to this
* function happens too early in gdk_init() */
if (x11_screen->xsettings_manager_window)
XSelectInput (xdisplay,
gdk_x11_window_get_xid (x11_screen->xsettings_manager_window),
PropertyChangeMask | StructureNotifyMask);
gdk_x11_display_ungrab (display);
gdk_display_flush (display);
if (x11_screen->xsettings_manager_window)
{
gdk_window_add_filter (x11_screen->xsettings_manager_window, gdk_xsettings_manager_window_filter, x11_screen);
}
read_settings (client);
read_settings (x11_screen, notify_changes);
}
XSettingsClient *
xsettings_client_new (Display *display,
int screen,
XSettingsNotifyFunc notify,
XSettingsWatchFunc watch,
void *cb_data)
static GdkFilterReturn
gdk_xsettings_root_window_filter (GdkXEvent *xevent,
GdkEvent *event,
gpointer data)
{
return xsettings_client_new_with_grab_funcs (display, screen, notify, watch, cb_data,
NULL, NULL);
}
GdkX11Screen *x11_screen = data;
GdkDisplay *display = x11_screen->display;
XEvent *xev = xevent;
XSettingsClient *
xsettings_client_new_with_grab_funcs (Display *display,
int screen,
XSettingsNotifyFunc notify,
XSettingsWatchFunc watch,
void *cb_data,
XSettingsGrabFunc grab,
XSettingsGrabFunc ungrab)
{
XSettingsClient *client;
char buffer[256];
char *atom_names[3];
Atom atoms[3];
client = malloc (sizeof *client);
if (!client)
return NULL;
client->display = display;
client->screen = screen;
client->notify = notify;
client->watch = watch;
client->cb_data = cb_data;
client->grab = grab;
client->ungrab = ungrab;
client->manager_window = None;
client->settings = NULL;
sprintf(buffer, "_XSETTINGS_S%d", screen);
atom_names[0] = buffer;
atom_names[1] = "_XSETTINGS_SETTINGS";
atom_names[2] = "MANAGER";
XInternAtoms (display, atom_names, 3, False, atoms);
client->selection_atom = atoms[0];
client->xsettings_atom = atoms[1];
client->manager_atom = atoms[2];
/* Select on StructureNotify so we get MANAGER events
*/
add_events (display, RootWindow (display, screen), StructureNotifyMask);
if (client->watch)
client->watch (RootWindow (display, screen), True, StructureNotifyMask,
client->cb_data);
check_manager_window (client);
return client;
}
void
xsettings_client_set_grab_func (XSettingsClient *client,
XSettingsGrabFunc grab)
{
client->grab = grab;
}
void
xsettings_client_set_ungrab_func (XSettingsClient *client,
XSettingsGrabFunc ungrab)
{
client->ungrab = ungrab;
}
void
xsettings_client_destroy (XSettingsClient *client)
{
if (client->watch)
client->watch (RootWindow (client->display, client->screen),
False, 0, client->cb_data);
if (client->manager_window && client->watch)
client->watch (client->manager_window, False, 0, client->cb_data);
xsettings_list_free (client->settings);
free (client);
}
XSettingsResult
xsettings_client_get_setting (XSettingsClient *client,
const char *name,
XSettingsSetting **setting)
{
XSettingsSetting *search = xsettings_list_lookup (client->settings, name);
if (search)
{
*setting = xsettings_setting_copy (search);
return *setting ? XSETTINGS_SUCCESS : XSETTINGS_NO_MEM;
}
else
return XSETTINGS_NO_ENTRY;
}
Bool
xsettings_client_process_event (XSettingsClient *client,
XEvent *xev)
{
/* The checks here will not unlikely cause us to reread
* the properties from the manager window a number of
* times when the manager changes from A->B. But manager changes
* are going to be pretty rare.
*/
if (xev->xany.window == RootWindow (client->display, client->screen))
if (xev->xany.type == ClientMessage &&
xev->xclient.message_type == gdk_x11_get_xatom_by_name_for_display (display, "MANAGER") &&
xev->xclient.data.l[1] == get_selection_atom (x11_screen))
{
if (xev->xany.type == ClientMessage &&
xev->xclient.message_type == client->manager_atom &&
xev->xclient.data.l[1] == client->selection_atom)
{
check_manager_window (client);
return True;
}
}
else if (xev->xany.window == client->manager_window)
{
if (xev->xany.type == DestroyNotify)
{
check_manager_window (client);
/* let GDK do its cleanup */
return False;
}
else if (xev->xany.type == PropertyNotify)
{
read_settings (client);
return True;
}
check_manager_window (x11_screen, TRUE);
return GDK_FILTER_REMOVE;
}
return False;
return GDK_FILTER_CONTINUE;
}
static GdkFilterReturn
gdk_xsettings_manager_window_filter (GdkXEvent *xevent,
GdkEvent *event,
gpointer data)
{
GdkX11Screen *x11_screen = data;
XEvent *xev = xevent;
if (xev->xany.type == DestroyNotify)
{
check_manager_window (x11_screen, TRUE);
/* let GDK do its cleanup */
return GDK_FILTER_CONTINUE;
}
else if (xev->xany.type == PropertyNotify)
{
read_settings (x11_screen, TRUE);
return GDK_FILTER_REMOVE;
}
return GDK_FILTER_CONTINUE;;
}
void
_gdk_x11_xsettings_init (GdkX11Screen *x11_screen)
{
gdk_window_add_filter (gdk_screen_get_root_window (GDK_SCREEN (x11_screen)), gdk_xsettings_root_window_filter, x11_screen);
check_manager_window (x11_screen, FALSE);
}
void
_gdk_x11_xsettings_finish (GdkX11Screen *x11_screen)
{
gdk_window_remove_filter (gdk_screen_get_root_window (GDK_SCREEN (x11_screen)), gdk_xsettings_root_window_filter, x11_screen);
if (x11_screen->xsettings_manager_window)
{
gdk_window_remove_filter (x11_screen->xsettings_manager_window, gdk_xsettings_manager_window_filter, x11_screen);
g_object_unref (x11_screen->xsettings_manager_window);
x11_screen->xsettings_manager_window = NULL;
}
if (x11_screen->xsettings)
{
g_hash_table_unref (x11_screen->xsettings);
x11_screen->xsettings = NULL;
}
}

View File

@@ -23,57 +23,9 @@
#ifndef XSETTINGS_CLIENT_H
#define XSETTINGS_CLIENT_H
#include <X11/Xlib.h>
#include "xsettings-common.h"
#include <gdk/x11/gdkx11screen.h>
#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */
typedef struct _XSettingsClient XSettingsClient;
typedef enum
{
XSETTINGS_ACTION_NEW,
XSETTINGS_ACTION_CHANGED,
XSETTINGS_ACTION_DELETED
} XSettingsAction;
typedef void (*XSettingsNotifyFunc) (const char *name,
XSettingsAction action,
XSettingsSetting *setting,
void *cb_data);
typedef Bool (*XSettingsWatchFunc) (Window window,
Bool is_start,
long mask,
void *cb_data);
typedef void (*XSettingsGrabFunc) (Display *display);
XSettingsClient *xsettings_client_new (Display *display,
int screen,
XSettingsNotifyFunc notify,
XSettingsWatchFunc watch,
void *cb_data);
XSettingsClient *xsettings_client_new_with_grab_funcs (Display *display,
int screen,
XSettingsNotifyFunc notify,
XSettingsWatchFunc watch,
void *cb_data,
XSettingsGrabFunc grab,
XSettingsGrabFunc ungrab);
void xsettings_client_set_grab_func (XSettingsClient *client,
XSettingsGrabFunc grab);
void xsettings_client_set_ungrab_func (XSettingsClient *client,
XSettingsGrabFunc ungrab);
void xsettings_client_destroy (XSettingsClient *client);
Bool xsettings_client_process_event (XSettingsClient *client,
XEvent *xev);
XSettingsResult xsettings_client_get_setting (XSettingsClient *client,
const char *name,
XSettingsSetting **setting);
#ifdef __cplusplus
}
#endif /* __cplusplus */
void _gdk_x11_xsettings_init (GdkX11Screen *x11_screen);
void _gdk_x11_xsettings_finish (GdkX11Screen *x11_screen);
#endif /* XSETTINGS_CLIENT_H */

View File

@@ -1,158 +0,0 @@
/*
* Copyright © 2001 Red Hat, Inc.
*
* Permission to use, copy, modify, distribute, and sell this software and its
* documentation for any purpose is hereby granted without fee, provided that
* the above copyright notice appear in all copies and that both that
* copyright notice and this permission notice appear in supporting
* documentation, and that the name of Red Hat not be used in advertising or
* publicity pertaining to distribution of the software without specific,
* written prior permission. Red Hat makes no representations about the
* suitability of this software for any purpose. It is provided "as is"
* without express or implied warranty.
*
* RED HAT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL RED HAT
* BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION
* OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
* CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*
* Author: Owen Taylor, Red Hat, Inc.
*/
#include "config.h"
#include "xsettings-common.h"
#include "string.h"
#include "stdlib.h"
#include <X11/Xlib.h>
#include <X11/Xmd.h> /* For CARD32 */
XSettingsSetting *
xsettings_setting_copy (XSettingsSetting *setting)
{
XSettingsSetting *result;
size_t str_len;
result = malloc (sizeof *result);
if (!result)
return NULL;
str_len = strlen (setting->name);
result->name = malloc (str_len + 1);
if (!result->name)
goto err;
memcpy (result->name, setting->name, str_len + 1);
result->type = setting->type;
switch (setting->type)
{
case XSETTINGS_TYPE_INT:
result->data.v_int = setting->data.v_int;
break;
case XSETTINGS_TYPE_COLOR:
result->data.v_color = setting->data.v_color;
break;
case XSETTINGS_TYPE_STRING:
str_len = strlen (setting->data.v_string);
result->data.v_string = malloc (str_len + 1);
if (!result->data.v_string)
goto err;
memcpy (result->data.v_string, setting->data.v_string, str_len + 1);
break;
}
result->last_change_serial = setting->last_change_serial;
return result;
err:
if (result->name)
free (result->name);
free (result);
return NULL;
}
int
xsettings_setting_equal (XSettingsSetting *setting_a,
XSettingsSetting *setting_b)
{
if (setting_a->type != setting_b->type)
return 0;
if (strcmp (setting_a->name, setting_b->name) != 0)
return 0;
switch (setting_a->type)
{
case XSETTINGS_TYPE_INT:
return setting_a->data.v_int == setting_b->data.v_int;
case XSETTINGS_TYPE_COLOR:
return (setting_a->data.v_color.red == setting_b->data.v_color.red &&
setting_a->data.v_color.green == setting_b->data.v_color.green &&
setting_a->data.v_color.blue == setting_b->data.v_color.blue &&
setting_a->data.v_color.alpha == setting_b->data.v_color.alpha);
case XSETTINGS_TYPE_STRING:
return strcmp (setting_a->data.v_string, setting_b->data.v_string) == 0;
}
return 0;
}
void
xsettings_setting_free (XSettingsSetting *setting)
{
if (setting->type == XSETTINGS_TYPE_STRING)
free (setting->data.v_string);
if (setting->name)
free (setting->name);
free (setting);
}
void
xsettings_list_free (XSettingsList *list)
{
if (list != NULL)
g_hash_table_destroy (list);
}
XSettingsResult
xsettings_list_insert (XSettingsList **list,
XSettingsSetting *setting)
{
if (*list == NULL)
*list = g_hash_table_new_full (g_str_hash, g_str_equal, NULL,
(GDestroyNotify) xsettings_setting_free);
if (g_hash_table_lookup (*list, setting->name) != NULL)
return XSETTINGS_DUPLICATE_ENTRY;
g_hash_table_insert (*list, setting->name, setting);
return XSETTINGS_SUCCESS;
}
XSettingsSetting *
xsettings_list_lookup (XSettingsList *list,
const char *name)
{
if (list == NULL)
return NULL;
return g_hash_table_lookup (list, name);
}
char
xsettings_byte_order (void)
{
CARD32 myint = 0x01020304;
return (*(char *)&myint == 1) ? MSBFirst : LSBFirst;
}

View File

@@ -1,122 +0,0 @@
/*
* Copyright © 2001 Red Hat, Inc.
*
* Permission to use, copy, modify, distribute, and sell this software and its
* documentation for any purpose is hereby granted without fee, provided that
* the above copyright notice appear in all copies and that both that
* copyright notice and this permission notice appear in supporting
* documentation, and that the name of Red Hat not be used in advertising or
* publicity pertaining to distribution of the software without specific,
* written prior permission. Red Hat makes no representations about the
* suitability of this software for any purpose. It is provided "as is"
* without express or implied warranty.
*
* RED HAT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL RED HAT
* BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION
* OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
* CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*
* Author: Owen Taylor, Red Hat, Inc.
*/
#ifndef XSETTINGS_COMMON_H
#define XSETTINGS_COMMON_H
#include <glib.h>
#include <sys/types.h>
#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */
/* Renames for GDK inclusion */
#define xsettings_byte_order _gdk_x11_xsettings_byte_order
#define xsettings_client_destroy _gdk_x11_xsettings_client_destroy
#define xsettings_client_get_setting _gdk_x11_xsettings_client_get_setting
#define xsettings_client_new _gdk_x11_xsettings_client_new
#define xsettings_client_new_with_grab_funcs _gdk_x11_xsettings_client_new_with_grab_funcs
#define xsettings_client_set_grab_func _gdk_x11_xsettings_client_set_grab_func
#define xsettings_client_set_ungrab_func _gdk_x11_xsettings_client_set_ungrab_func
#define xsettings_client_process_event _gdk_x11_xsettings_client_process_event
#define xsettings_list_free _gdk_x11_xsettings_list_free
#define xsettings_list_insert _gdk_x11_xsettings_list_insert
#define xsettings_list_lookup _gdk_x11_xsettings_list_lookup
#define xsettings_setting_copy _gdk_x11_xsettings_setting_copy
#define xsettings_setting_equal _gdk_x11_xsettings_setting_equal
#define xsettings_setting_free _gdk_x11_xsettings_setting_free
typedef GHashTable XSettingsList;
typedef struct _XSettingsBuffer XSettingsBuffer;
typedef struct _XSettingsColor XSettingsColor;
typedef struct _XSettingsSetting XSettingsSetting;
/* Types of settings possible. Enum values correspond to
* protocol values.
*/
typedef enum
{
XSETTINGS_TYPE_INT = 0,
XSETTINGS_TYPE_STRING = 1,
XSETTINGS_TYPE_COLOR = 2
} XSettingsType;
typedef enum
{
XSETTINGS_SUCCESS,
XSETTINGS_NO_MEM,
XSETTINGS_ACCESS,
XSETTINGS_FAILED,
XSETTINGS_NO_ENTRY,
XSETTINGS_DUPLICATE_ENTRY
} XSettingsResult;
struct _XSettingsBuffer
{
char byte_order;
size_t len;
unsigned char *data;
unsigned char *pos;
};
struct _XSettingsColor
{
unsigned short red, green, blue, alpha;
};
struct _XSettingsSetting
{
char *name;
XSettingsType type;
union {
int v_int;
char *v_string;
XSettingsColor v_color;
} data;
unsigned long last_change_serial;
};
XSettingsSetting *xsettings_setting_copy (XSettingsSetting *setting);
void xsettings_setting_free (XSettingsSetting *setting);
int xsettings_setting_equal (XSettingsSetting *setting_a,
XSettingsSetting *setting_b);
void xsettings_list_free (XSettingsList *list);
XSettingsResult xsettings_list_insert (XSettingsList **list,
XSettingsSetting *setting);
XSettingsSetting *xsettings_list_lookup (XSettingsList *list,
const char *name);
char xsettings_byte_order (void);
#define XSETTINGS_PAD(n,m) ((n + m - 1) & (~(m-1)))
#ifdef __cplusplus
}
#endif /* __cplusplus */
#endif /* XSETTINGS_COMMON_H */

View File

@@ -422,6 +422,7 @@ gtk_private_h_sources = \
gtkbitmaskprivateimpl.h \
gtkborderimageprivate.h \
gtkboxprivate.h \
gtkbubblewindowprivate.h \
gtkbuilderprivate.h \
gtkbuttonprivate.h \
gtkcairoblurprivate.h \
@@ -621,6 +622,7 @@ gtk_base_c_sources = \
gtkborder.c \
gtkborderimage.c \
gtkbox.c \
gtkbubblewindow.c \
gtkbuildable.c \
gtkbuilder.c \
gtkbuilderparser.c \
@@ -882,6 +884,7 @@ gtk_base_c_sources = \
$(gtk_clipboard_dnd_c_sources) \
$(gtk_appchooser_impl_c_sources)
nodist_gtk_c_sources =
gtk_c_sources = $(gtk_base_c_sources)
gtk_all_c_sources = $(gtk_base_c_sources)
@@ -894,6 +897,9 @@ $(gtk_dbus_built_sources) : Makefile.am gtkdbusinterfaces.xml
--generate-c-code gtkdbusgenerated \
$(srcdir)/gtkdbusinterfaces.xml
nodist_gtk_c_sources += $(gtk_dbus_built_sources)
gtk_all_c_sources += $(gtk_dbus_built_sources)
gtk_os_unix_c_sources = \
gtkcustompaperunixdialog.c \
gtkpagesetupunixdialog.c \
@@ -905,8 +911,7 @@ gtk_os_unix_c_sources = \
gtkprintoperation-unix.c \
gtkprintunixdialog.c \
gtkprintbackend.c \
gtksearchenginetracker.c \
$(gtk_dbus_built_sources)
gtksearchenginetracker.c
gtk_all_c_sources += $(gtk_os_unix_c_sources)
if OS_UNIX
gtk_private_h_sources += \
@@ -918,8 +923,6 @@ gtk_private_h_sources += \
gtkprinteroptionwidget.h \
gtksearchenginetracker.h
gtk_c_sources += $(gtk_os_unix_c_sources)
else
gtk_c_sources += $(gtk_dbus_built_sources)
endif
gtk_os_win32_c_sources = \
@@ -1023,14 +1026,12 @@ gtk_built_public_sources = \
# built headers that don't get installed
gtk_built_private_headers = \
gtkdbusgenerated.h \
gtkresources.h \
gtkmarshalers.h \
gtkbuiltincache.h \
gtkprivatetypebuiltins.h
gtk_built_sources = \
gtkdbusgenerated.c \
gtkresources.c \
gtktypebuiltins.c \
gtktypefuncs.c \
@@ -1067,6 +1068,7 @@ gtk_extra_sources = \
#
MAINTAINERCLEANFILES = \
$(gtk_built_sources) \
$(gtk_dbus_built_sources) \
$(stamp_files) \
$(GENERATED_ICONS) \
stock-icons/icon-theme.cache
@@ -1096,7 +1098,10 @@ DND_CURSORS = \
gen_sources = xgen-gdef xgen-gtbh xgen-gtic xgen-gmh xgen-gmc xgen-gmlh xgen-gmlc xgen-gtfsrc.c xgen-gtf
CLEANFILES = $(gen_sources)
BUILT_SOURCES = $(gtk_built_sources) stamp-icons
BUILT_SOURCES = \
$(gtk_built_sources) \
$(gtk_dbus_built_sources) \
stamp-icons
# all autogenerated files need to be generated in the srcdir,
# so old versions get remade and are not confused with newer
@@ -1173,6 +1178,7 @@ deprecatedinclude_HEADERS= $(deprecated_h_sources)
gtkunixprintincludedir = $(includedir)/gtk-3.0/unix-print/gtk
gtkunixprintinclude_HEADERS = $(gtk_unix_print_public_h_sources)
nodist_libgtk_3_la_SOURCES = $(nodist_gtk_c_sources)
libgtk_3_la_SOURCES = $(gtk_c_sources)
libgtk_3_la_LDFLAGS = $(libtool_opts)
libgtk_3_la_LIBADD = $(libadd)
@@ -1263,13 +1269,24 @@ LDADDS = \
$(GTK_DEP_LIBS)
if HAVE_INTROSPECTION
# The Quartz clipboard and dnd files aren't annotated for
# introspection. Rather than copy the annotations over from the
# regular files, exclude the quartz ones:
introspection_files = \
$(filter-out %private.h gtktextdisplay.h gtktextlayout.h, $(gtkinclude_HEADERS) $(deprecatedinclude_HEADERS)) \
$(gtk_base_c_sources) \
$(filter-out gtkclipboard-quartz.c gtkdnd-quartz.c, \
$(gtk_base_c_sources)) \
gtkprintoperation-unix.c \
gtktypebuiltins.h \
gtktypebuiltins.c
# And include the regular ones:
if USE_QUARTZ
introspection_files += \
gtkclipboard.c \
gtkdnd.c
endif
if USE_X11
introspection_files += \
gtksocket.c \
@@ -1306,7 +1323,9 @@ endif
#
# Installed tools
#
bin_PROGRAMS = gtk-query-immodules-3.0
bin_PROGRAMS = \
gtk-query-immodules-3.0 \
gtk-launch
if BUILD_ICON_CACHE
bin_PROGRAMS += gtk-update-icon-cache
@@ -1353,11 +1372,8 @@ gtk_update_icon_cache_LDADD = $(GDK_PIXBUF_LIBS)
gtk_update_icon_cache_SOURCES = updateiconcache.c
endif
if HAVE_GIO_UNIX
bin_PROGRAMS += gtk-launch
gtk_launch_LDADD = $(LDADDS)
gtk_launch_SOURCES = gtk-launch.c
endif
.PHONY: files test test-debug

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