Compare commits

..

1 Commits

Author SHA1 Message Date
Carlos Soriano 4c64df1245 test revealer 2018-08-03 17:28:01 +02:00
294 changed files with 23401 additions and 63029 deletions
+5 -12
View File
@@ -3,6 +3,11 @@ image: registry.gitlab.gnome.org/gnome/gtk/gtk-3-24:v1
stages:
- build
before_script:
- mkdir -p _ccache
- export CCACHE_BASEDIR=${PWD}
- export CCACHE_DIR=${PWD}/_ccache
cache:
paths:
- _ccache/
@@ -11,15 +16,3 @@ build:
stage: build
script:
- bash -x ./.gitlab-ci/test-docker.sh
msys2-mingw32:
when: manual
variables:
MSYSTEM: "MINGW32"
CHERE_INVOKING: "yes"
stage: build
tags:
- win32
script:
- C:\msys64\usr\bin\pacman --noconfirm -Syyuu
- C:\msys64\usr\bin\bash -lc "bash -x ./.gitlab-ci/test-msys2.sh"
-4
View File
@@ -2,9 +2,5 @@
set -e
mkdir -p _ccache
export CCACHE_BASEDIR="$(pwd)"
export CCACHE_DIR="${CCACHE_BASEDIR}/_ccache"
./autogen.sh
make -j8
-45
View File
@@ -1,45 +0,0 @@
#!/bin/bash
set -e
if [[ "$MSYSTEM" == "MINGW32" ]]; then
export MSYS2_ARCH="i686"
else
export MSYS2_ARCH="x86_64"
fi
# Update everything
pacman --noconfirm -Suy
# Install the required packages
pacman --noconfirm -S --needed \
base-devel \
git \
mingw-w64-$MSYS2_ARCH-toolchain \
mingw-w64-$MSYS2_ARCH-ccache \
mingw-w64-$MSYS2_ARCH-pkg-config \
mingw-w64-$MSYS2_ARCH-gobject-introspection \
mingw-w64-$MSYS2_ARCH-adwaita-icon-theme \
mingw-w64-$MSYS2_ARCH-atk \
mingw-w64-$MSYS2_ARCH-cairo \
mingw-w64-$MSYS2_ARCH-gdk-pixbuf2 \
mingw-w64-$MSYS2_ARCH-glib2 \
mingw-w64-$MSYS2_ARCH-json-glib \
mingw-w64-$MSYS2_ARCH-libepoxy \
mingw-w64-$MSYS2_ARCH-pango \
mingw-w64-$MSYS2_ARCH-shared-mime-info \
mingw-w64-$MSYS2_ARCH-gtk-doc
mkdir -p _ccache
export CCACHE_BASEDIR="$(pwd)"
export CCACHE_DIR="${CCACHE_BASEDIR}/_ccache"
export CC="ccache gcc"
# Build
ccache --zero-stats
ccache --show-stats
./autogen.sh
make -j4
ccache --show-stats
-193
View File
@@ -1,196 +1,3 @@
Overview of Changes in GTK+ 3.24.4
==================================
* Support gtk_file_chooser_set_filter in GtkFileChooserNative
* Bugs fixed:
wayland: Fix long combobox positioning
about dialog: Activate all links in the same way
switch: Add fallbacks for symbols
spinbutton: Fix background color
* Translation updates:
Africaans
Overview of Changes in GTK+ 3.24.3
==================================
* Bugs fixed:
wayland: Respect length limits in text protocol
wayland: Support key themes
wayland: Fix hi-dpi cursor scaling
quartz: Make point-to-pixel conversions work on all versions
quartz: Re-add support for hidpi scaling
quartz: Fix search engine integration
win32: Fix ime change hangling
placessidebar: Insert drops in the right place
x11: Fix problems gdk_x11_get_parent_relative
x11: Fix Wacom tool types
icons: Recolor polygons as well in symbolic icons
switch: Use Unicode symbols for I/O instead of translations
* Translation updates:
Japanese
Overview of Changes in GTK+ 3.24.2
==================================
* new api: gdk_x11_display_get_parent_relative pattern
* wayland: Use the settings portal when sandboxed
* Bugs fixed:
widget-factory: Move app menu contents to primary menu
Make dashed border-style work correctly
gtkstack: fix null pointer dereference
GDK W32: Support switching input modules at runtime
Tooltip: Fix the used cursor size if 0 in Settings
quartz: Fix crash when realizing GtkOffscreenWindow
win32 dnd: Fix setting icon on drag-begin
Fix race in GtkPlug window creation
widget-factory: Add Keyboard Shortcuts menu item
quartz: do not cache the screen in the gdkmonitor
Trash in side bar sometimes contains a home icon
wayland: Avoid crashes inside wl_proxy_marshal
gtkimcontextime.c: Fix Korean input
entry: Handle no-window events in gtk_entry_event
Tooltip: Fix the used cursor size if 0 in Setting
Notebook: Ensure menu_label updates with tab_label
Adwaita: Improve headerbar theming
win32: Make scroll behavior similar to Linux
fix symbolic icon rendering with new librsvg
emoji selector: force Emoji presentation
a11y: fix a crash under wayland
* Translation updates:
- Africaans
- Basque
- Brazilian Portuguese
- Chinese (Taiwan)
- Esperanto
- Lithuanian
- Slovak
- Slovenian
- Spanish
- Turkish
Overview of Changes in GTK+ 3.24.1
==================================
* Adwaita:
- Improvements to headerbar styling
* Wayland:
- Fix handling of preedit text
* Windows:
- Implement smooth scrolling
* Fix critical warnings on shutdown
* Translation updates:
- Czech
- Friulian
- Russian
- Spanish
Overview of Changes in GTK+ 3.24.0
==================================
* GtkApplication can now track screensaver state
* Translation updates:
- Brazilian Portuguese
- Croatian
- Czech
- Danish
- French
- Galician
- German
- Greek
- Hungarian
- Indonesian
- Italian
- Latvian
- Lithuanian
- Polish
- Swedish
- Turkish
Overview of Changes in GTK+ 3.23.3
==================================
* Deprecate a few APIs that are gone in GTK+ 4:
- focus chains in GtkContainer
- stepper sensitivity in GtkRange
* Allow picking colors under kwin
* Bug fixes:
#404 window: Fallback to CSD titlebar in focus-chain
#770 scrolledwindow: Fix horizontal decleration
#1263 win32: Implement smooth scrolling
#134 #432 #574 #579 #878
tooltip: Position using move-to-rect
#844 wayland: avoid idempotent wl_subsurface_set_position
#2393 Fix a typo
#125 combobox: Fix a critical warning
!290 fontchooser: Add missing build flags
!172 filechooser: Don't show private recent items
* Translation updates:
- Brazilian Portuguese
- British English
- Catalan
- Chinese (Taiwan)
- French
- German
- Indonesian
- Italian
- Kazakh
- Korean
- Lithuanian
- Polish
- Turkish
Overview of Changes in GTK+ 3.23.2
==================================
* Emoji chooser improvements
- Try harder to avoid fallback rendering
- Avoid hex boxes
- Use icons for sections
* Color chooser improvements
- Allow picking colors from the screen again. The current
implementation can use either the screnshot portal or
a recent gnome-shell API
* GtkPlacesSidebar now shows a spinner during mount operations
* Wayland
- Support both gtk-text-input and text-input-unstable-v3 as
input protocol
* Bug fixes:
#628 TextView: spaces acting as non-breaking whitespace...
!248 win32: Correct handling of transient state changes
!272 Replace gtk_text_input with text_input_unstable_v3 support
* Translation updates:
- German
- Lithuanian
- Polish
- Spanish
- Turkish
Overview of Changes in GTK+ 3.23.1
==================================
+2 -5
View File
@@ -156,14 +156,11 @@ Use the Microsoft compiler, cl and Make, nmake. Say nmake -f
makefile.msc in gdk and gtk. Be prepared to manually edit various
makefile.msc files, and the makefile snippets in build/win32.
There are also VS 2008~2017 solution and project files to build GTK+, which
There are also VS 2008/2010 solution and project files to build GTK+, which
are maintained by Chun-wei Fan. They should build GTK+ out of the box,
provided that the afore-mentioned dependencies are installed. They will
build GDK with the Win32 backend, GTK+ itself (with GAIL/a11y built in),
the GAIL-Util library and the gtk-demo program. Please also refer to the
README file(s) that reside in build/win32 on how to enable additional features
that are not enabled by default, such as EGL support via libANGLE, which
emulate the GL/EGL calls using Direct3D 9/11.
the GAIL-Util library and the gtk-demo program.
Please refer to the following GNOME Live! page for a more detailed ouline
on the process of building the GTK+ stack and its dependencies with Visual
+6 -8
View File
@@ -79,7 +79,7 @@ $(if $(or $(findstring --header-only,$($(_gir_name)_MSVC_SCANNERFLAGS)),
$($(_gir_name)_MSVC_PROGRAM)),,
$(error Need to define $(_gir_name)_MSVC_LIBS or $(_gir_name)_MSVC_PROGRAM))
$(top_builddir)/build/win32/$(_gir_name)_list: Makefile
$(top_builddir)/build/win32/$(_gir_name)_list:
for F in $(_gir_files_msvc); do \
case $$$$F in \
*.c|*.cpp|*.cc|*.cxx|*.h|*.hpp|*.hh|*.hxx) \
@@ -88,11 +88,11 @@ $(top_builddir)/build/win32/$(_gir_name)_list: Makefile
esac; \
done
$(top_builddir)/build/win32/$(1).msvc.introspect: Makefile
$(top_builddir)/build/win32/$(1).msvc.introspect:
-$(RM) $(top_builddir)/build/win32/$(1).msvc.introspect
# Assemble the Command to Run g-ir-scanner
echo 'vs$$$$(VSVER)\$$$$(CFG)\$$$$(PLAT)\bin\'$(1)': '$(_gir_name)'_list '$($(_gir_name)_MSVC_GIR_DEPS)>>$(top_builddir)/build/win32/$(1).msvc.introspect
echo $(1)': '$(_gir_name)'_list '$($(_gir_name)_MSVC_GIR_DEPS)>>$(top_builddir)/build/win32/$(1).msvc.introspect
echo ' @-echo Generating $$$$@...'>>$(top_builddir)/build/win32/$(1).msvc.introspect
echo ' $$$$(PYTHON) $$$$(G_IR_SCANNER) \'>>$(top_builddir)/build/win32/$(1).msvc.introspect
echo ' --verbose -no-libtool \'>>$(top_builddir)/build/win32/$(1).msvc.introspect
@@ -101,7 +101,6 @@ $(top_builddir)/build/win32/$(1).msvc.introspect: Makefile
echo ' '$(_gir_packages_msvc)' \'>>$(top_builddir)/build/win32/$(1).msvc.introspect
echo ' '$(_gir_libraries_msvc)' \'>>$(top_builddir)/build/win32/$(1).msvc.introspect
echo ' '$(_gir_program_msvc)' \'>>$(top_builddir)/build/win32/$(1).msvc.introspect
echo ' --add-include-path=./vs$$$$(VSVER)/$$$$(CFG)/$$$$(PLAT)/bin \'>>$(top_builddir)/build/win32/$(1).msvc.introspect
echo ' --add-include-path=$$$$(G_IR_INCLUDEDIR) \'>>$(top_builddir)/build/win32/$(1).msvc.introspect
echo ' '$(_gir_includes_msvc)' \'>>$(top_builddir)/build/win32/$(1).msvc.introspect
echo ' '$(_gir_export_packages_msvc)' \'>>$(top_builddir)/build/win32/$(1).msvc.introspect
@@ -110,16 +109,15 @@ $(top_builddir)/build/win32/$(1).msvc.introspect: Makefile
echo ' --cflags-end \'>>$(top_builddir)/build/win32/$(1).msvc.introspect
echo ' '$($(_gir_name)_MSVC_SCANNERFLAGS)' \'>>$(top_builddir)/build/win32/$(1).msvc.introspect
echo ' --filelist='$(_gir_name)'_list \'>>$(top_builddir)/build/win32/$(1).msvc.introspect
echo ' -L.\vs$$$$(VSVER)\$$$$(CFG)\$$$$(PLAT)\bin \'>>$(top_builddir)/build/win32/$(1).msvc.introspect
echo ' -o $$$$@'>>$(top_builddir)/build/win32/$(1).msvc.introspect
echo '' >>$(top_builddir)/build/win32/$(1).msvc.introspect
# Finally Assemble the Command to Compile the generated .gir
echo 'vs$$$$(VSVER)\$$$$(CFG)\$$$$(PLAT)\bin\$(_typelib_basename_msvc).typelib: vs$$$$(VSVER)\$$$$(CFG)\$$$$(PLAT)\bin\'$(_typelib_basename_msvc)'.gir'>>$(top_builddir)/build/win32/$(1).msvc.introspect
echo '$(_typelib_basename_msvc).typelib: '$(_typelib_basename_msvc)'.gir'>>$(top_builddir)/build/win32/$(1).msvc.introspect
echo ' @-echo Compiling $$$$@...'>>$(top_builddir)/build/win32/$(1).msvc.introspect
echo ' $$$$(G_IR_COMPILER) \'>>$(top_builddir)/build/win32/$(1).msvc.introspect
echo ' --includedir=$$$$(@D:\=/) --debug --verbose \'>>$(top_builddir)/build/win32/$(1).msvc.introspect
echo ' $$$$(@R:\=/).gir \'>>$(top_builddir)/build/win32/$(1).msvc.introspect
echo ' --includedir=. --debug --verbose \'>>$(top_builddir)/build/win32/$(1).msvc.introspect
echo ' '$(1)' \'>>$(top_builddir)/build/win32/$(1).msvc.introspect
echo ' -o $$$$@'>>$(top_builddir)/build/win32/$(1).msvc.introspect
echo '' >>$(top_builddir)/build/win32/$(1).msvc.introspect
endef
+6 -13
View File
@@ -6,15 +6,8 @@ APIVERSION = 3.0
CHECK_PACKAGE = gdk-pixbuf-2.0 atk pangocairo gio-2.0
built_install_girs = \
vs$(VSVER)\$(CFG)\$(PLAT)\bin\Gdk-$(APIVERSION).gir \
vs$(VSVER)\$(CFG)\$(PLAT)\bin\GdkWin32-$(APIVERSION).gir \
vs$(VSVER)\$(CFG)\$(PLAT)\bin\Gtk-$(APIVERSION).gir
built_install_typelibs = \
vs$(VSVER)\$(CFG)\$(PLAT)\bin\Gdk-$(APIVERSION).typelib \
vs$(VSVER)\$(CFG)\$(PLAT)\bin\GdkWin32-$(APIVERSION).typelib \
vs$(VSVER)\$(CFG)\$(PLAT)\bin\Gtk-$(APIVERSION).typelib
built_install_girs = Gdk-$(APIVERSION).gir GdkWin32-$(APIVERSION).gir Gtk-$(APIVERSION).gir
built_install_typelibs = Gdk-$(APIVERSION).typelib GdkWin32-$(APIVERSION).typelib Gtk-$(APIVERSION).typelib
!include introspection-msvc.mak
@@ -37,8 +30,8 @@ setgirbuildenv:
!include introspection.body.mak
install-introspection: all
@-copy vs$(VSVER)\$(CFG)\$(PLAT)\bin\*.gir "$(G_IR_INCLUDEDIR)"
@-copy /b vs$(VSVER)\$(CFG)\$(PLAT)\bin\*.typelib "$(G_IR_TYPELIBDIR)"
@-copy *.gir "$(G_IR_INCLUDEDIR)"
@-copy /b *.typelib "$(G_IR_TYPELIBDIR)"
!else
all:
@@ -46,5 +39,5 @@ all:
!endif
clean:
@-del /f/q vs$(VSVER)\$(CFG)\$(PLAT)\bin\*.typelib
@-del /f/q vs$(VSVER)\$(CFG)\$(PLAT)\bin\*.gir
@-del /f/q *.typelib
@-del /f/q *.gir
+3 -3
View File
@@ -10,14 +10,14 @@
<GdkDefines>GDK_COMPILATION;G_LOG_DOMAIN="Gdk"</GdkDefines>
<GtkIncludedImmodulesDefines>INCLUDE_IM_am_et;INCLUDE_IM_cedilla;INCLUDE_IM_cyrillic_translit;INCLUDE_IM_ime;INCLUDE_IM_inuktitut;INCLUDE_IM_ipa;INCLUDE_IM_multipress;INCLUDE_IM_thai;INCLUDE_IM_ti_er;INCLUDE_IM_ti_et;INCLUDE_IM_viqr</GtkIncludedImmodulesDefines>
<GtkDefines>GTK_COMPILATION;G_LOG_DOMAIN="Gtk";GTK_HOST="i686-pc-vs$(VSVer)";GTK_PRINT_BACKENDS="file";GTK_PRINT_BACKEND_ENABLE_UNSUPPORTED;$(GtkIncludedImmodulesDefines);GTK_LIBDIR="$(GtkDummyPrefix)/lib";GTK_DATADIR="$(GtkDummyPrefix)/share";GTK_DATA_PREFIX="$(GtkDummyPrefix)";GTK_SYSCONFDIR="$(GtkDummyPrefix)/etc";MULTIPRESS_CONFDIR="$(GtkDummyPrefix)/etc/gtk-$(ApiVersion)";MULTIPRESS_LOCALEDIR="$(GtkDummyPrefix)/share/locale";GTK_VERSION="$(GtkVersion)/etc";GTK_BINARY_VERSION="$(GtkBinaryVersion)/etc";GDK_DISABLE_DEPRECATED;ISOLATION_AWARE_ENABLED</GtkDefines>
<GtkGdkCommonLibs>pangowin32-1.0.lib;imm32.lib</GtkGdkCommonLibs>
<GtkGdkCommonLibs>imm32.lib</GtkGdkCommonLibs>
<GdkAdditionalLibs>winmm.lib;dwmapi.lib;setupapi.lib;$(GtkGdkCommonLibs)</GdkAdditionalLibs>
<GdkBroadwayAdditionalLibs>ws2_32.lib</GdkBroadwayAdditionalLibs>
<GtkAdditionalLibs>atk-1.0.lib;winspool.lib;comctl32.lib;$(GtkGdkCommonLibs)</GtkAdditionalLibs>
<GtkAdditionalLibs>atk-1.0.lib;pangowin32-1.0.lib;winspool.lib;comctl32.lib;$(GtkGdkCommonLibs)</GtkAdditionalLibs>
<GtkIntrospectNMakeCmd>cd ..
set VCInstallDir=$(VCInstallDir)
nmake -f gtk-introspection-msvc.mak CFG=$(Configuration) PREFIX=$(GlibEtcInstallRoot)</GtkIntrospectNMakeCmd>
<GtkIntrospectBuiltFiles>$(BinDir)\Gtk-3.0.gir;$(BinDir)\Gtk-3.0.typelib</GtkIntrospectBuiltFiles>
<GtkIntrospectBuiltFiles>$(SolutionDir)\..\Gtk-3.0.gir;$(SolutionDir)\..\Gtk-3.0.typelib</GtkIntrospectBuiltFiles>
</PropertyGroup>
<PropertyGroup>
<_PropertySheetDisplayName>gtk3builddefinesprops</_PropertySheetDisplayName>
+534
View File
@@ -0,0 +1,534 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ImportGroup Label="PropertySheets">
<Import Project="gtk3-build-defines.props" />
</ImportGroup>
<PropertyGroup Label="UserMacros">
<BinDir>$(SolutionDir)$(Configuration)\$(Platform)\bin</BinDir>
<GtkDoInstallBin>
mkdir $(CopyDir)\bin
mkdir $(CopyDir)\lib\pkgconfig
copy "$(BinDir)\$(GtkDllPrefix)gdk-3$(GtkDllSuffix).dll" $(CopyDir)\bin
copy "$(BinDir)\$(GtkDllPrefix)gdk-3$(GtkDllSuffix).pdb" $(CopyDir)\bin
copy "$(BinDir)\gdk-$(ApiVersion).lib" $(CopyDir)\lib
if "$(Configuration)" == "Release_Broadway" goto DO_BROADWAY_BIN
if "$(Configuration)" == "Debug_Broadway" goto DO_BROADWAY_BIN
copy "$(BinDir)\$(GtkDllPrefix)gtk-3$(GtkDllSuffix).dll" $(CopyDir)\bin
copy "$(BinDir)\$(GtkDllPrefix)gtk-3$(GtkDllSuffix).pdb" $(CopyDir)\bin
copy "$(BinDir)\$(GtkDllPrefix)gailutil-3$(GtkDllSuffix).dll" $(CopyDir)\bin
copy "$(BinDir)\$(GtkDllPrefix)gailutil-3$(GtkDllSuffix).pdb" $(CopyDir)\bin
copy "$(BinDir)\gtk-$(ApiVersion).lib" $(CopyDir)\lib
copy "$(BinDir)\gailutil-$(ApiVersion).lib" $(CopyDir)\lib
copy "$(BinDir)\gtk3-demo.exe" $(CopyDir)\bin
copy "$(BinDir)\gtk3-demo.pdb" $(CopyDir)\bin
copy "$(BinDir)\gtk3-demo-application.exe" $(CopyDir)\bin
copy "$(BinDir)\gtk3-demo-application.pdb" $(CopyDir)\bin
copy "$(BinDir)\gtk3-icon-browser.exe" $(CopyDir)\bin
copy "$(BinDir)\gtk3-icon-browser.pdb" $(CopyDir)\bin
copy "$(BinDir)\gtk-encode-symbolic-svg.exe" $(CopyDir)\bin
copy "$(BinDir)\gtk-encode-symbolic-svg.pdb" $(CopyDir)\bin
copy "$(BinDir)\gtk-update-icon-cache.exe" $(CopyDir)\bin
copy "$(BinDir)\gtk-update-icon-cache.pdb" $(CopyDir)\bin
copy "$(BinDir)\gtk-query-settings.exe" $(CopyDir)\bin
copy "$(BinDir)\gtk-query-settings.pdb" $(CopyDir)\bin
copy "$(BinDir)\gtk-builder-tool.exe" $(CopyDir)\bin
copy "$(BinDir)\gtk-builder-tool.pdb" $(CopyDir)\bin
goto DONE_BIN
:DO_BROADWAY_BIN
copy "$(BinDir)\broadwayd.exe" $(CopyDir)\bin
copy "$(BinDir)\broadwayd.pdb" $(CopyDir)\bin
if "$(Configuration)" == "Release_Broadway" goto DO_BROADWAY_RELEASE
if "$(Configuration)" == "Debug_Broadway" goto DO_BROADWAY_DEBUG
:DO_BROADWAY_RELEASE
copy .\Release\$(Platform)\bin\$(GtkDllPrefix)gtk-3$(GtkDllSuffix).dll $(CopyDir)\bin
copy .\Release\$(Platform)\bin\$(GtkDllPrefix)gtk-3$(GtkDllSuffix).pdb $(CopyDir)\bin
copy .\Release\$(Platform)\bin\$(GtkDllPrefix)gailutil-3$(GtkDllSuffix).dll $(CopyDir)\bin
copy .\Release\$(Platform)\bin\$(GtkDllPrefix)gailutil-3$(GtkDllSuffix).pdb $(CopyDir)\bin
copy .\Release\$(Platform)\bin\gtk-$(ApiVersion).lib $(CopyDir)\lib
copy .\Release\$(Platform)\bin\gailutil-$(ApiVersion).lib $(CopyDir)\lib
copy .\Release\$(Platform)\bin\gtk3-demo.exe $(CopyDir)\bin
copy .\Release\$(Platform)\bin\gtk3-demo.pdb $(CopyDir)\bin
copy .\Release\$(Platform)\bin\gtk3-demo-application.exe $(CopyDir)\bin
copy .\Release\$(Platform)\bin\gtk3-demo-application.pdb $(CopyDir)\bin
copy .\Release\$(Platform)\bin\gtk3-icon-browser.exe $(CopyDir)\bin
copy .\Release\$(Platform)\bin\gtk3-icon-browser.pdb $(CopyDir)\bin
copy .\Release\$(Platform)\bin\gtk-encode-symbolic-svg.exe $(CopyDir)\bin
copy .\Release\$(Platform)\bin\gtk-encode-symbolic-svg.pdb $(CopyDir)\bin
copy .\Release\$(Platform)\bin\gtk-update-icon-cache.exe $(CopyDir)\bin
copy .\Release\$(Platform)\bin\gtk-update-icon-cache.pdb $(CopyDir)\bin
copy .\Release\$(Platform)\bin\gtk-query-settings.exe $(CopyDir)\bin
copy .\Release\$(Platform)\bin\gtk-query-settings.pdb $(CopyDir)\bin
copy .\Release\$(Platform)\bin\gtk-builder-tool.exe $(CopyDir)\bin
copy .\Release\$(Platform)\bin\gtk-builder-tool.pdb $(CopyDir)\bin
goto DONE_BIN
:DO_BROADWAY_DEBUG
copy .\Debug\$(Platform)\bin\$(GtkDllPrefix)gtk-3$(GtkDllSuffix).dll $(CopyDir)\bin
copy .\Debug\$(Platform)\bin\$(GtkDllPrefix)gtk-3$(GtkDllSuffix).pdb $(CopyDir)\bin
copy .\Debug\$(Platform)\bin\$(GtkDllPrefix)gailutil-3$(GtkDllSuffix).dll $(CopyDir)\bin
copy .\Debug\$(Platform)\bin\$(GtkDllPrefix)gailutil-3$(GtkDllSuffix).pdb $(CopyDir)\bin
copy .\Debug\$(Platform)\bin\gtk-$(ApiVersion).lib $(CopyDir)\lib
copy .\Debug\$(Platform)\bin\gailutil-$(ApiVersion).lib $(CopyDir)\lib
copy .\Debug\$(Platform)\bin\gtk3-demo.exe $(CopyDir)\bin
copy .\Debug\$(Platform)\bin\gtk3-demo.pdb $(CopyDir)\bin
copy .\Debug\$(Platform)\bin\gtk3-demo-application.exe $(CopyDir)\bin
copy .\Debug\$(Platform)\bin\gtk3-demo-application.pdb $(CopyDir)\bin
copy .\Debug\$(Platform)\bin\gtk3-icon-browser.exe $(CopyDir)\bin
copy .\Debug\$(Platform)\bin\gtk3-icon-browser.pdb $(CopyDir)\bin
copy .\Debug\$(Platform)\bin\gtk-encode-symbolic-svg.exe $(CopyDir)\bin
copy .\Debug\$(Platform)\bin\gtk-encode-symbolic-svg.pdb $(CopyDir)\bin
copy .\Debug\$(Platform)\bin\gtk-update-icon-cache.exe $(CopyDir)\bin
copy .\Debug\$(Platform)\bin\gtk-update-icon-cache.pdb $(CopyDir)\bin
copy .\Debug\$(Platform)\bin\gtk-query-settings.exe $(CopyDir)\bin
copy .\Debug\$(Platform)\bin\gtk-query-settings.pdb $(CopyDir)\bin
copy .\Debug\$(Platform)\bin\gtk-builder-tool.exe $(CopyDir)\bin
copy .\Debug\$(Platform)\bin\gtk-builder-tool.pdb $(CopyDir)\bin
:DONE_BIN
copy ..\gdk-3.0.pc $(CopyDir)\lib\pkgconfig
copy ..\gdk-3.0.pc $(CopyDir)\lib\pkgconfig\gdk-win32-3.0.pc
copy "..\gtk+-3.0.pc" $(CopyDir)\lib\pkgconfig
copy "..\gtk+-3.0.pc" "$(CopyDir)\lib\pkgconfig\gtk+-3.0.pc"
copy ..\gail-3.0.pc $(CopyDir)\lib\pkgconfig
</GtkDoInstallBin>
<GtkDoInstall>
echo off
mkdir $(CopyDir)\include\gtk-$(ApiVersion)\gdk\win32
mkdir $(CopyDir)\include\gtk-$(ApiVersion)\gdk\deprecated
copy ..\..\..\gdk\win32\gdkwin32.h $(CopyDir)\include\gtk-$(ApiVersion)\gdk
copy ..\..\..\gdk\gdk.h $(CopyDir)\include\gtk-3.0\gdk\gdk.h
copy ..\..\..\gdk\gdk-autocleanup.h $(CopyDir)\include\gtk-3.0\gdk\gdk-autocleanup.h
copy ..\..\..\gdk\gdkapplaunchcontext.h $(CopyDir)\include\gtk-3.0\gdk\gdkapplaunchcontext.h
copy ..\..\..\gdk\gdkcairo.h $(CopyDir)\include\gtk-3.0\gdk\gdkcairo.h
copy ..\..\..\gdk\gdkcursor.h $(CopyDir)\include\gtk-3.0\gdk\gdkcursor.h
copy ..\..\..\gdk\gdkdevice.h $(CopyDir)\include\gtk-3.0\gdk\gdkdevice.h
copy ..\..\..\gdk\gdkdevicepad.h $(CopyDir)\include\gtk-3.0\gdk\gdkdevicepad.h
copy ..\..\..\gdk\gdkdevicetool.h $(CopyDir)\include\gtk-3.0\gdk\gdkdevicetool.h
copy ..\..\..\gdk\gdkdevicemanager.h $(CopyDir)\include\gtk-3.0\gdk\gdkdevicemanager.h
copy ..\..\..\gdk\gdkdisplay.h $(CopyDir)\include\gtk-3.0\gdk\gdkdisplay.h
copy ..\..\..\gdk\gdkdisplaymanager.h $(CopyDir)\include\gtk-3.0\gdk\gdkdisplaymanager.h
copy ..\..\..\gdk\gdkdnd.h $(CopyDir)\include\gtk-3.0\gdk\gdkdnd.h
copy ..\..\..\gdk\gdkdrawingcontext.h $(CopyDir)\include\gtk-3.0\gdk\gdkdrawingcontext.h
copy ..\..\..\gdk\gdkevents.h $(CopyDir)\include\gtk-3.0\gdk\gdkevents.h
copy ..\..\..\gdk\gdkframetimings.h $(CopyDir)\include\gtk-3.0\gdk\gdkframetimings.h
copy ..\..\..\gdk\gdkglcontext.h $(CopyDir)\include\gtk-3.0\gdk\gdkglcontext.h
copy ..\..\..\gdk\gdkkeys.h $(CopyDir)\include\gtk-3.0\gdk\gdkkeys.h
copy ..\..\..\gdk\gdkkeysyms.h $(CopyDir)\include\gtk-3.0\gdk\gdkkeysyms.h
copy ..\..\..\gdk\gdkkeysyms-compat.h $(CopyDir)\include\gtk-3.0\gdk\gdkkeysyms-compat.h
copy ..\..\..\gdk\gdkmain.h $(CopyDir)\include\gtk-3.0\gdk\gdkmain.h
copy ..\..\..\gdk\gdkmonitor.h $(CopyDir)\include\gtk-3.0\gdk\gdkmonitor.h
copy ..\..\..\gdk\gdkpango.h $(CopyDir)\include\gtk-3.0\gdk\gdkpango.h
copy ..\..\..\gdk\gdkframeclock.h $(CopyDir)\include\gtk-3.0\gdk\gdkframeclock.h
copy ..\..\..\gdk\gdkpixbuf.h $(CopyDir)\include\gtk-3.0\gdk\gdkpixbuf.h
copy ..\..\..\gdk\gdkprivate.h $(CopyDir)\include\gtk-3.0\gdk\gdkprivate.h
copy ..\..\..\gdk\gdkproperty.h $(CopyDir)\include\gtk-3.0\gdk\gdkproperty.h
copy ..\..\..\gdk\gdkrectangle.h $(CopyDir)\include\gtk-3.0\gdk\gdkrectangle.h
copy ..\..\..\gdk\gdkrgba.h $(CopyDir)\include\gtk-3.0\gdk\gdkrgba.h
copy ..\..\..\gdk\gdkscreen.h $(CopyDir)\include\gtk-3.0\gdk\gdkscreen.h
copy ..\..\..\gdk\gdkseat.h $(CopyDir)\include\gtk-3.0\gdk\gdkseat.h
copy ..\..\..\gdk\gdkselection.h $(CopyDir)\include\gtk-3.0\gdk\gdkselection.h
copy ..\..\..\gdk\gdktestutils.h $(CopyDir)\include\gtk-3.0\gdk\gdktestutils.h
copy ..\..\..\gdk\gdkthreads.h $(CopyDir)\include\gtk-3.0\gdk\gdkthreads.h
copy ..\..\..\gdk\gdktypes.h $(CopyDir)\include\gtk-3.0\gdk\gdktypes.h
copy ..\..\..\gdk\gdkvisual.h $(CopyDir)\include\gtk-3.0\gdk\gdkvisual.h
copy ..\..\..\gdk\gdkwindow.h $(CopyDir)\include\gtk-3.0\gdk\gdkwindow.h
copy ..\..\..\gdk\deprecated\gdkcolor.h $(CopyDir)\include\gtk-3.0\gdk\deprecated\gdkcolor.h
copy ..\..\..\gdk\gdkconfig.h $(CopyDir)\include\gtk-3.0\gdk\gdkconfig.h
copy ..\..\..\gdk\gdkenumtypes.h $(CopyDir)\include\gtk-3.0\gdk\gdkenumtypes.h
copy ..\..\..\gdk\gdkversionmacros.h $(CopyDir)\include\gtk-3.0\gdk\gdkversionmacros.h
copy ..\..\..\gdk\win32\gdkwin32cursor.h $(CopyDir)\include\gtk-3.0\gdk\win32\gdkwin32cursor.h
copy ..\..\..\gdk\win32\gdkwin32display.h $(CopyDir)\include\gtk-3.0\gdk\win32\gdkwin32display.h
copy ..\..\..\gdk\win32\gdkwin32displaymanager.h $(CopyDir)\include\gtk-3.0\gdk\win32\gdkwin32displaymanager.h
copy ..\..\..\gdk\win32\gdkwin32dnd.h $(CopyDir)\include\gtk-3.0\gdk\win32\gdkwin32dnd.h
copy ..\..\..\gdk\win32\gdkwin32glcontext.h $(CopyDir)\include\gtk-3.0\gdk\win32\gdkwin32glcontext.h
copy ..\..\..\gdk\win32\gdkwin32keys.h $(CopyDir)\include\gtk-3.0\gdk\win32\gdkwin32keys.h
copy ..\..\..\gdk\win32\gdkwin32misc.h $(CopyDir)\include\gtk-3.0\gdk\win32\gdkwin32misc.h
copy ..\..\..\gdk\win32\gdkwin32monitor.h $(CopyDir)\include\gtk-3.0\gdk\win32\gdkwin32monitor.h
copy ..\..\..\gdk\win32\gdkwin32screen.h $(CopyDir)\include\gtk-3.0\gdk\win32\gdkwin32screen.h
copy ..\..\..\gdk\win32\gdkwin32window.h $(CopyDir)\include\gtk-3.0\gdk\win32\gdkwin32window.h
mkdir $(CopyDir)\include\gtk-$(ApiVersion)\gtk\a11y
mkdir $(CopyDir)\include\gtk-$(ApiVersion)\gtk\deprecated
copy ..\..\..\gtk\gtk.h $(CopyDir)\include\gtk-3.0\gtk\gtk.h
copy ..\..\..\gtk\gtk-autocleanups.h $(CopyDir)\include\gtk-3.0\gtk\gtk-autocleanups.h
copy ..\..\..\gtk\gtkx.h $(CopyDir)\include\gtk-3.0\gtk\gtkx.h
copy ..\..\..\gtk\gtkx-autocleanups.h $(CopyDir)\include\gtk-3.0\gtk\gtkx-autocleanups.h
copy ..\..\..\gtk\gtk-a11y.h $(CopyDir)\include\gtk-3.0\gtk\gtk-a11y.h
copy ..\..\..\gtk\gtkaboutdialog.h $(CopyDir)\include\gtk-3.0\gtk\gtkaboutdialog.h
copy ..\..\..\gtk\gtkaccelgroup.h $(CopyDir)\include\gtk-3.0\gtk\gtkaccelgroup.h
copy ..\..\..\gtk\gtkaccellabel.h $(CopyDir)\include\gtk-3.0\gtk\gtkaccellabel.h
copy ..\..\..\gtk\gtkaccelmap.h $(CopyDir)\include\gtk-3.0\gtk\gtkaccelmap.h
copy ..\..\..\gtk\gtkaccessible.h $(CopyDir)\include\gtk-3.0\gtk\gtkaccessible.h
copy ..\..\..\gtk\gtkactionable.h $(CopyDir)\include\gtk-3.0\gtk\gtkactionable.h
copy ..\..\..\gtk\gtkactionbar.h $(CopyDir)\include\gtk-3.0\gtk\gtkactionbar.h
copy ..\..\..\gtk\gtkadjustment.h $(CopyDir)\include\gtk-3.0\gtk\gtkadjustment.h
copy ..\..\..\gtk\gtkappchooser.h $(CopyDir)\include\gtk-3.0\gtk\gtkappchooser.h
copy ..\..\..\gtk\gtkappchooserbutton.h $(CopyDir)\include\gtk-3.0\gtk\gtkappchooserbutton.h
copy ..\..\..\gtk\gtkappchooserdialog.h $(CopyDir)\include\gtk-3.0\gtk\gtkappchooserdialog.h
copy ..\..\..\gtk\gtkappchooserwidget.h $(CopyDir)\include\gtk-3.0\gtk\gtkappchooserwidget.h
copy ..\..\..\gtk\gtkapplication.h $(CopyDir)\include\gtk-3.0\gtk\gtkapplication.h
copy ..\..\..\gtk\gtkapplicationwindow.h $(CopyDir)\include\gtk-3.0\gtk\gtkapplicationwindow.h
copy ..\..\..\gtk\gtkaspectframe.h $(CopyDir)\include\gtk-3.0\gtk\gtkaspectframe.h
copy ..\..\..\gtk\gtkassistant.h $(CopyDir)\include\gtk-3.0\gtk\gtkassistant.h
copy ..\..\..\gtk\gtkbbox.h $(CopyDir)\include\gtk-3.0\gtk\gtkbbox.h
copy ..\..\..\gtk\gtkbin.h $(CopyDir)\include\gtk-3.0\gtk\gtkbin.h
copy ..\..\..\gtk\gtkbindings.h $(CopyDir)\include\gtk-3.0\gtk\gtkbindings.h
copy ..\..\..\gtk\gtkborder.h $(CopyDir)\include\gtk-3.0\gtk\gtkborder.h
copy ..\..\..\gtk\gtkbox.h $(CopyDir)\include\gtk-3.0\gtk\gtkbox.h
copy ..\..\..\gtk\gtkbuilder.h $(CopyDir)\include\gtk-3.0\gtk\gtkbuilder.h
copy ..\..\..\gtk\gtkbuildable.h $(CopyDir)\include\gtk-3.0\gtk\gtkbuildable.h
copy ..\..\..\gtk\gtkbutton.h $(CopyDir)\include\gtk-3.0\gtk\gtkbutton.h
copy ..\..\..\gtk\gtkcalendar.h $(CopyDir)\include\gtk-3.0\gtk\gtkcalendar.h
copy ..\..\..\gtk\gtkcellarea.h $(CopyDir)\include\gtk-3.0\gtk\gtkcellarea.h
copy ..\..\..\gtk\gtkcellareacontext.h $(CopyDir)\include\gtk-3.0\gtk\gtkcellareacontext.h
copy ..\..\..\gtk\gtkcellareabox.h $(CopyDir)\include\gtk-3.0\gtk\gtkcellareabox.h
copy ..\..\..\gtk\gtkcelleditable.h $(CopyDir)\include\gtk-3.0\gtk\gtkcelleditable.h
copy ..\..\..\gtk\gtkcelllayout.h $(CopyDir)\include\gtk-3.0\gtk\gtkcelllayout.h
copy ..\..\..\gtk\gtkcellrenderer.h $(CopyDir)\include\gtk-3.0\gtk\gtkcellrenderer.h
copy ..\..\..\gtk\gtkcellrendereraccel.h $(CopyDir)\include\gtk-3.0\gtk\gtkcellrendereraccel.h
copy ..\..\..\gtk\gtkcellrenderercombo.h $(CopyDir)\include\gtk-3.0\gtk\gtkcellrenderercombo.h
copy ..\..\..\gtk\gtkcellrendererpixbuf.h $(CopyDir)\include\gtk-3.0\gtk\gtkcellrendererpixbuf.h
copy ..\..\..\gtk\gtkcellrendererprogress.h $(CopyDir)\include\gtk-3.0\gtk\gtkcellrendererprogress.h
copy ..\..\..\gtk\gtkcellrendererspin.h $(CopyDir)\include\gtk-3.0\gtk\gtkcellrendererspin.h
copy ..\..\..\gtk\gtkcellrendererspinner.h $(CopyDir)\include\gtk-3.0\gtk\gtkcellrendererspinner.h
copy ..\..\..\gtk\gtkcellrenderertext.h $(CopyDir)\include\gtk-3.0\gtk\gtkcellrenderertext.h
copy ..\..\..\gtk\gtkcellrenderertoggle.h $(CopyDir)\include\gtk-3.0\gtk\gtkcellrenderertoggle.h
copy ..\..\..\gtk\gtkcellview.h $(CopyDir)\include\gtk-3.0\gtk\gtkcellview.h
copy ..\..\..\gtk\gtkcheckbutton.h $(CopyDir)\include\gtk-3.0\gtk\gtkcheckbutton.h
copy ..\..\..\gtk\gtkcheckmenuitem.h $(CopyDir)\include\gtk-3.0\gtk\gtkcheckmenuitem.h
copy ..\..\..\gtk\gtkclipboard.h $(CopyDir)\include\gtk-3.0\gtk\gtkclipboard.h
copy ..\..\..\gtk\gtkcolorbutton.h $(CopyDir)\include\gtk-3.0\gtk\gtkcolorbutton.h
copy ..\..\..\gtk\gtkcolorchooser.h $(CopyDir)\include\gtk-3.0\gtk\gtkcolorchooser.h
copy ..\..\..\gtk\gtkcolorchooserwidget.h $(CopyDir)\include\gtk-3.0\gtk\gtkcolorchooserwidget.h
copy ..\..\..\gtk\gtkcolorchooserdialog.h $(CopyDir)\include\gtk-3.0\gtk\gtkcolorchooserdialog.h
copy ..\..\..\gtk\gtkcolorutils.h $(CopyDir)\include\gtk-3.0\gtk\gtkcolorutils.h
copy ..\..\..\gtk\gtkcombobox.h $(CopyDir)\include\gtk-3.0\gtk\gtkcombobox.h
copy ..\..\..\gtk\gtkcomboboxtext.h $(CopyDir)\include\gtk-3.0\gtk\gtkcomboboxtext.h
copy ..\..\..\gtk\gtkcontainer.h $(CopyDir)\include\gtk-3.0\gtk\gtkcontainer.h
copy ..\..\..\gtk\gtkcssprovider.h $(CopyDir)\include\gtk-3.0\gtk\gtkcssprovider.h
copy ..\..\..\gtk\gtkcsssection.h $(CopyDir)\include\gtk-3.0\gtk\gtkcsssection.h
copy ..\..\..\gtk\gtkdebug.h $(CopyDir)\include\gtk-3.0\gtk\gtkdebug.h
copy ..\..\..\gtk\gtkdialog.h $(CopyDir)\include\gtk-3.0\gtk\gtkdialog.h
copy ..\..\..\gtk\gtkdnd.h $(CopyDir)\include\gtk-3.0\gtk\gtkdnd.h
copy ..\..\..\gtk\gtkdragdest.h $(CopyDir)\include\gtk-3.0\gtk\gtkdragdest.h
copy ..\..\..\gtk\gtkdragsource.h $(CopyDir)\include\gtk-3.0\gtk\gtkdragsource.h
copy ..\..\..\gtk\gtkdrawingarea.h $(CopyDir)\include\gtk-3.0\gtk\gtkdrawingarea.h
copy ..\..\..\gtk\gtkeditable.h $(CopyDir)\include\gtk-3.0\gtk\gtkeditable.h
copy ..\..\..\gtk\gtkentry.h $(CopyDir)\include\gtk-3.0\gtk\gtkentry.h
copy ..\..\..\gtk\gtkentrybuffer.h $(CopyDir)\include\gtk-3.0\gtk\gtkentrybuffer.h
copy ..\..\..\gtk\gtkentrycompletion.h $(CopyDir)\include\gtk-3.0\gtk\gtkentrycompletion.h
copy ..\..\..\gtk\gtkenums.h $(CopyDir)\include\gtk-3.0\gtk\gtkenums.h
copy ..\..\..\gtk\gtkeventbox.h $(CopyDir)\include\gtk-3.0\gtk\gtkeventbox.h
copy ..\..\..\gtk\gtkeventcontroller.h $(CopyDir)\include\gtk-3.0\gtk\gtkeventcontroller.h
copy ..\..\..\gtk\gtkexpander.h $(CopyDir)\include\gtk-3.0\gtk\gtkexpander.h
copy ..\..\..\gtk\gtkfilechooser.h $(CopyDir)\include\gtk-3.0\gtk\gtkfilechooser.h
copy ..\..\..\gtk\gtkfilechooserbutton.h $(CopyDir)\include\gtk-3.0\gtk\gtkfilechooserbutton.h
copy ..\..\..\gtk\gtkfilechooserdialog.h $(CopyDir)\include\gtk-3.0\gtk\gtkfilechooserdialog.h
copy ..\..\..\gtk\gtkfilechoosernative.h $(CopyDir)\include\gtk-3.0\gtk\gtkfilechoosernative.h
copy ..\..\..\gtk\gtkfilechooserwidget.h $(CopyDir)\include\gtk-3.0\gtk\gtkfilechooserwidget.h
copy ..\..\..\gtk\gtkfilefilter.h $(CopyDir)\include\gtk-3.0\gtk\gtkfilefilter.h
copy ..\..\..\gtk\gtkfixed.h $(CopyDir)\include\gtk-3.0\gtk\gtkfixed.h
copy ..\..\..\gtk\gtkflowbox.h $(CopyDir)\include\gtk-3.0\gtk\gtkflowbox.h
copy ..\..\..\gtk\gtkfontbutton.h $(CopyDir)\include\gtk-3.0\gtk\gtkfontbutton.h
copy ..\..\..\gtk\gtkfontchooser.h $(CopyDir)\include\gtk-3.0\gtk\gtkfontchooser.h
copy ..\..\..\gtk\gtkfontchooserdialog.h $(CopyDir)\include\gtk-3.0\gtk\gtkfontchooserdialog.h
copy ..\..\..\gtk\gtkfontchooserwidget.h $(CopyDir)\include\gtk-3.0\gtk\gtkfontchooserwidget.h
copy ..\..\..\gtk\gtkframe.h $(CopyDir)\include\gtk-3.0\gtk\gtkframe.h
copy ..\..\..\gtk\gtkgesture.h $(CopyDir)\include\gtk-3.0\gtk\gtkgesture.h
copy ..\..\..\gtk\gtkgesturedrag.h $(CopyDir)\include\gtk-3.0\gtk\gtkgesturedrag.h
copy ..\..\..\gtk\gtkgesturelongpress.h $(CopyDir)\include\gtk-3.0\gtk\gtkgesturelongpress.h
copy ..\..\..\gtk\gtkgesturemultipress.h $(CopyDir)\include\gtk-3.0\gtk\gtkgesturemultipress.h
copy ..\..\..\gtk\gtkgesturepan.h $(CopyDir)\include\gtk-3.0\gtk\gtkgesturepan.h
copy ..\..\..\gtk\gtkgesturerotate.h $(CopyDir)\include\gtk-3.0\gtk\gtkgesturerotate.h
copy ..\..\..\gtk\gtkgesturesingle.h $(CopyDir)\include\gtk-3.0\gtk\gtkgesturesingle.h
copy ..\..\..\gtk\gtkgestureswipe.h $(CopyDir)\include\gtk-3.0\gtk\gtkgestureswipe.h
copy ..\..\..\gtk\gtkgesturezoom.h $(CopyDir)\include\gtk-3.0\gtk\gtkgesturezoom.h
copy ..\..\..\gtk\gtkglarea.h $(CopyDir)\include\gtk-3.0\gtk\gtkglarea.h
copy ..\..\..\gtk\gtkgrid.h $(CopyDir)\include\gtk-3.0\gtk\gtkgrid.h
copy ..\..\..\gtk\gtkheaderbar.h $(CopyDir)\include\gtk-3.0\gtk\gtkheaderbar.h
copy ..\..\..\gtk\gtkicontheme.h $(CopyDir)\include\gtk-3.0\gtk\gtkicontheme.h
copy ..\..\..\gtk\gtkiconview.h $(CopyDir)\include\gtk-3.0\gtk\gtkiconview.h
copy ..\..\..\gtk\gtkimage.h $(CopyDir)\include\gtk-3.0\gtk\gtkimage.h
copy ..\..\..\gtk\gtkimcontext.h $(CopyDir)\include\gtk-3.0\gtk\gtkimcontext.h
copy ..\..\..\gtk\gtkimcontextinfo.h $(CopyDir)\include\gtk-3.0\gtk\gtkimcontextinfo.h
copy ..\..\..\gtk\gtkimcontextsimple.h $(CopyDir)\include\gtk-3.0\gtk\gtkimcontextsimple.h
copy ..\..\..\gtk\gtkimmodule.h $(CopyDir)\include\gtk-3.0\gtk\gtkimmodule.h
copy ..\..\..\gtk\gtkimmulticontext.h $(CopyDir)\include\gtk-3.0\gtk\gtkimmulticontext.h
copy ..\..\..\gtk\gtkinfobar.h $(CopyDir)\include\gtk-3.0\gtk\gtkinfobar.h
copy ..\..\..\gtk\gtkinvisible.h $(CopyDir)\include\gtk-3.0\gtk\gtkinvisible.h
copy ..\..\..\gtk\gtklabel.h $(CopyDir)\include\gtk-3.0\gtk\gtklabel.h
copy ..\..\..\gtk\gtklayout.h $(CopyDir)\include\gtk-3.0\gtk\gtklayout.h
copy ..\..\..\gtk\gtklevelbar.h $(CopyDir)\include\gtk-3.0\gtk\gtklevelbar.h
copy ..\..\..\gtk\gtklinkbutton.h $(CopyDir)\include\gtk-3.0\gtk\gtklinkbutton.h
copy ..\..\..\gtk\gtklistbox.h $(CopyDir)\include\gtk-3.0\gtk\gtklistbox.h
copy ..\..\..\gtk\gtkliststore.h $(CopyDir)\include\gtk-3.0\gtk\gtkliststore.h
copy ..\..\..\gtk\gtklockbutton.h $(CopyDir)\include\gtk-3.0\gtk\gtklockbutton.h
copy ..\..\..\gtk\gtkmain.h $(CopyDir)\include\gtk-3.0\gtk\gtkmain.h
copy ..\..\..\gtk\gtkmenu.h $(CopyDir)\include\gtk-3.0\gtk\gtkmenu.h
copy ..\..\..\gtk\gtkmenubar.h $(CopyDir)\include\gtk-3.0\gtk\gtkmenubar.h
copy ..\..\..\gtk\gtkmenubutton.h $(CopyDir)\include\gtk-3.0\gtk\gtkmenubutton.h
copy ..\..\..\gtk\gtkmenuitem.h $(CopyDir)\include\gtk-3.0\gtk\gtkmenuitem.h
copy ..\..\..\gtk\gtkmenushell.h $(CopyDir)\include\gtk-3.0\gtk\gtkmenushell.h
copy ..\..\..\gtk\gtkmenutoolbutton.h $(CopyDir)\include\gtk-3.0\gtk\gtkmenutoolbutton.h
copy ..\..\..\gtk\gtkmessagedialog.h $(CopyDir)\include\gtk-3.0\gtk\gtkmessagedialog.h
copy ..\..\..\gtk\gtkmodelbutton.h $(CopyDir)\include\gtk-3.0\gtk\gtkmodelbutton.h
copy ..\..\..\gtk\gtkmodules.h $(CopyDir)\include\gtk-3.0\gtk\gtkmodules.h
copy ..\..\..\gtk\gtkmountoperation.h $(CopyDir)\include\gtk-3.0\gtk\gtkmountoperation.h
copy ..\..\..\gtk\gtknativedialog.h $(CopyDir)\include\gtk-3.0\gtk\gtknativedialog.h
copy ..\..\..\gtk\gtknotebook.h $(CopyDir)\include\gtk-3.0\gtk\gtknotebook.h
copy ..\..\..\gtk\gtkoffscreenwindow.h $(CopyDir)\include\gtk-3.0\gtk\gtkoffscreenwindow.h
copy ..\..\..\gtk\gtkorientable.h $(CopyDir)\include\gtk-3.0\gtk\gtkorientable.h
copy ..\..\..\gtk\gtkoverlay.h $(CopyDir)\include\gtk-3.0\gtk\gtkoverlay.h
copy ..\..\..\gtk\gtkpadcontroller.h $(CopyDir)\include\gtk-3.0\gtk\gtkpadcontroller.h
copy ..\..\..\gtk\gtkpagesetup.h $(CopyDir)\include\gtk-3.0\gtk\gtkpagesetup.h
copy ..\..\..\gtk\gtkpaned.h $(CopyDir)\include\gtk-3.0\gtk\gtkpaned.h
copy ..\..\..\gtk\gtkpapersize.h $(CopyDir)\include\gtk-3.0\gtk\gtkpapersize.h
copy ..\..\..\gtk\gtkplacessidebar.h $(CopyDir)\include\gtk-3.0\gtk\gtkplacessidebar.h
copy ..\..\..\gtk\gtkplug.h $(CopyDir)\include\gtk-3.0\gtk\gtkplug.h
copy ..\..\..\gtk\gtkpopover.h $(CopyDir)\include\gtk-3.0\gtk\gtkpopover.h
copy ..\..\..\gtk\gtkpopovermenu.h $(CopyDir)\include\gtk-3.0\gtk\gtkpopovermenu.h
copy ..\..\..\gtk\gtkprintcontext.h $(CopyDir)\include\gtk-3.0\gtk\gtkprintcontext.h
copy ..\..\..\gtk\gtkprintoperation.h $(CopyDir)\include\gtk-3.0\gtk\gtkprintoperation.h
copy ..\..\..\gtk\gtkprintoperationpreview.h $(CopyDir)\include\gtk-3.0\gtk\gtkprintoperationpreview.h
copy ..\..\..\gtk\gtkprintsettings.h $(CopyDir)\include\gtk-3.0\gtk\gtkprintsettings.h
copy ..\..\..\gtk\gtkprogressbar.h $(CopyDir)\include\gtk-3.0\gtk\gtkprogressbar.h
copy ..\..\..\gtk\gtkradiobutton.h $(CopyDir)\include\gtk-3.0\gtk\gtkradiobutton.h
copy ..\..\..\gtk\gtkradiomenuitem.h $(CopyDir)\include\gtk-3.0\gtk\gtkradiomenuitem.h
copy ..\..\..\gtk\gtkradiotoolbutton.h $(CopyDir)\include\gtk-3.0\gtk\gtkradiotoolbutton.h
copy ..\..\..\gtk\gtkrange.h $(CopyDir)\include\gtk-3.0\gtk\gtkrange.h
copy ..\..\..\gtk\gtkrecentchooser.h $(CopyDir)\include\gtk-3.0\gtk\gtkrecentchooser.h
copy ..\..\..\gtk\gtkrecentchooserdialog.h $(CopyDir)\include\gtk-3.0\gtk\gtkrecentchooserdialog.h
copy ..\..\..\gtk\gtkrecentchoosermenu.h $(CopyDir)\include\gtk-3.0\gtk\gtkrecentchoosermenu.h
copy ..\..\..\gtk\gtkrecentchooserwidget.h $(CopyDir)\include\gtk-3.0\gtk\gtkrecentchooserwidget.h
copy ..\..\..\gtk\gtkrecentfilter.h $(CopyDir)\include\gtk-3.0\gtk\gtkrecentfilter.h
copy ..\..\..\gtk\gtkrecentmanager.h $(CopyDir)\include\gtk-3.0\gtk\gtkrecentmanager.h
copy ..\..\..\gtk\gtkrender.h $(CopyDir)\include\gtk-3.0\gtk\gtkrender.h
copy ..\..\..\gtk\gtkrevealer.h $(CopyDir)\include\gtk-3.0\gtk\gtkrevealer.h
copy ..\..\..\gtk\gtkscale.h $(CopyDir)\include\gtk-3.0\gtk\gtkscale.h
copy ..\..\..\gtk\gtkscalebutton.h $(CopyDir)\include\gtk-3.0\gtk\gtkscalebutton.h
copy ..\..\..\gtk\gtkscrollable.h $(CopyDir)\include\gtk-3.0\gtk\gtkscrollable.h
copy ..\..\..\gtk\gtkscrollbar.h $(CopyDir)\include\gtk-3.0\gtk\gtkscrollbar.h
copy ..\..\..\gtk\gtkscrolledwindow.h $(CopyDir)\include\gtk-3.0\gtk\gtkscrolledwindow.h
copy ..\..\..\gtk\gtksearchbar.h $(CopyDir)\include\gtk-3.0\gtk\gtksearchbar.h
copy ..\..\..\gtk\gtksearchentry.h $(CopyDir)\include\gtk-3.0\gtk\gtksearchentry.h
copy ..\..\..\gtk\gtkselection.h $(CopyDir)\include\gtk-3.0\gtk\gtkselection.h
copy ..\..\..\gtk\gtkseparator.h $(CopyDir)\include\gtk-3.0\gtk\gtkseparator.h
copy ..\..\..\gtk\gtkseparatormenuitem.h $(CopyDir)\include\gtk-3.0\gtk\gtkseparatormenuitem.h
copy ..\..\..\gtk\gtkseparatortoolitem.h $(CopyDir)\include\gtk-3.0\gtk\gtkseparatortoolitem.h
copy ..\..\..\gtk\gtksettings.h $(CopyDir)\include\gtk-3.0\gtk\gtksettings.h
copy ..\..\..\gtk\gtkshortcutlabel.h $(CopyDir)\include\gtk-3.0\gtk\gtkshortcutlabel.h
copy ..\..\..\gtk\gtkshortcutsgroup.h $(CopyDir)\include\gtk-3.0\gtk\gtkshortcutsgroup.h
copy ..\..\..\gtk\gtkshortcutssection.h $(CopyDir)\include\gtk-3.0\gtk\gtkshortcutssection.h
copy ..\..\..\gtk\gtkshortcutsshortcut.h $(CopyDir)\include\gtk-3.0\gtk\gtkshortcutsshortcut.h
copy ..\..\..\gtk\gtkshortcutswindow.h $(CopyDir)\include\gtk-3.0\gtk\gtkshortcutswindow.h
copy ..\..\..\gtk\gtkshow.h $(CopyDir)\include\gtk-3.0\gtk\gtkshow.h
copy ..\..\..\gtk\gtkstacksidebar.h $(CopyDir)\include\gtk-3.0\gtk\gtkstacksidebar.h
copy ..\..\..\gtk\gtksizegroup.h $(CopyDir)\include\gtk-3.0\gtk\gtksizegroup.h
copy ..\..\..\gtk\gtksizerequest.h $(CopyDir)\include\gtk-3.0\gtk\gtksizerequest.h
copy ..\..\..\gtk\gtksocket.h $(CopyDir)\include\gtk-3.0\gtk\gtksocket.h
copy ..\..\..\gtk\gtkspinbutton.h $(CopyDir)\include\gtk-3.0\gtk\gtkspinbutton.h
copy ..\..\..\gtk\gtkspinner.h $(CopyDir)\include\gtk-3.0\gtk\gtkspinner.h
copy ..\..\..\gtk\gtkstack.h $(CopyDir)\include\gtk-3.0\gtk\gtkstack.h
copy ..\..\..\gtk\gtkstackswitcher.h $(CopyDir)\include\gtk-3.0\gtk\gtkstackswitcher.h
copy ..\..\..\gtk\gtkstatusbar.h $(CopyDir)\include\gtk-3.0\gtk\gtkstatusbar.h
copy ..\..\..\gtk\gtkstylecontext.h $(CopyDir)\include\gtk-3.0\gtk\gtkstylecontext.h
copy ..\..\..\gtk\gtkstyleprovider.h $(CopyDir)\include\gtk-3.0\gtk\gtkstyleprovider.h
copy ..\..\..\gtk\gtkswitch.h $(CopyDir)\include\gtk-3.0\gtk\gtkswitch.h
copy ..\..\..\gtk\gtktestutils.h $(CopyDir)\include\gtk-3.0\gtk\gtktestutils.h
copy ..\..\..\gtk\gtktextattributes.h $(CopyDir)\include\gtk-3.0\gtk\gtktextattributes.h
copy ..\..\..\gtk\gtktextbuffer.h $(CopyDir)\include\gtk-3.0\gtk\gtktextbuffer.h
copy ..\..\..\gtk\gtktextbufferrichtext.h $(CopyDir)\include\gtk-3.0\gtk\gtktextbufferrichtext.h
copy ..\..\..\gtk\gtktextchild.h $(CopyDir)\include\gtk-3.0\gtk\gtktextchild.h
copy ..\..\..\gtk\gtktextdisplay.h $(CopyDir)\include\gtk-3.0\gtk\gtktextdisplay.h
copy ..\..\..\gtk\gtktextiter.h $(CopyDir)\include\gtk-3.0\gtk\gtktextiter.h
copy ..\..\..\gtk\gtktextmark.h $(CopyDir)\include\gtk-3.0\gtk\gtktextmark.h
copy ..\..\..\gtk\gtktexttag.h $(CopyDir)\include\gtk-3.0\gtk\gtktexttag.h
copy ..\..\..\gtk\gtktexttagtable.h $(CopyDir)\include\gtk-3.0\gtk\gtktexttagtable.h
copy ..\..\..\gtk\gtktextview.h $(CopyDir)\include\gtk-3.0\gtk\gtktextview.h
copy ..\..\..\gtk\gtktogglebutton.h $(CopyDir)\include\gtk-3.0\gtk\gtktogglebutton.h
copy ..\..\..\gtk\gtktoggletoolbutton.h $(CopyDir)\include\gtk-3.0\gtk\gtktoggletoolbutton.h
copy ..\..\..\gtk\gtktoolbar.h $(CopyDir)\include\gtk-3.0\gtk\gtktoolbar.h
copy ..\..\..\gtk\gtktoolbutton.h $(CopyDir)\include\gtk-3.0\gtk\gtktoolbutton.h
copy ..\..\..\gtk\gtktoolitem.h $(CopyDir)\include\gtk-3.0\gtk\gtktoolitem.h
copy ..\..\..\gtk\gtktoolitemgroup.h $(CopyDir)\include\gtk-3.0\gtk\gtktoolitemgroup.h
copy ..\..\..\gtk\gtktoolpalette.h $(CopyDir)\include\gtk-3.0\gtk\gtktoolpalette.h
copy ..\..\..\gtk\gtktoolshell.h $(CopyDir)\include\gtk-3.0\gtk\gtktoolshell.h
copy ..\..\..\gtk\gtktooltip.h $(CopyDir)\include\gtk-3.0\gtk\gtktooltip.h
copy ..\..\..\gtk\gtktreednd.h $(CopyDir)\include\gtk-3.0\gtk\gtktreednd.h
copy ..\..\..\gtk\gtktreemodel.h $(CopyDir)\include\gtk-3.0\gtk\gtktreemodel.h
copy ..\..\..\gtk\gtktreemodelfilter.h $(CopyDir)\include\gtk-3.0\gtk\gtktreemodelfilter.h
copy ..\..\..\gtk\gtktreemodelsort.h $(CopyDir)\include\gtk-3.0\gtk\gtktreemodelsort.h
copy ..\..\..\gtk\gtktreeselection.h $(CopyDir)\include\gtk-3.0\gtk\gtktreeselection.h
copy ..\..\..\gtk\gtktreesortable.h $(CopyDir)\include\gtk-3.0\gtk\gtktreesortable.h
copy ..\..\..\gtk\gtktreestore.h $(CopyDir)\include\gtk-3.0\gtk\gtktreestore.h
copy ..\..\..\gtk\gtktreeview.h $(CopyDir)\include\gtk-3.0\gtk\gtktreeview.h
copy ..\..\..\gtk\gtktreeviewcolumn.h $(CopyDir)\include\gtk-3.0\gtk\gtktreeviewcolumn.h
copy ..\..\..\gtk\gtktypes.h $(CopyDir)\include\gtk-3.0\gtk\gtktypes.h
copy ..\..\..\gtk\gtkviewport.h $(CopyDir)\include\gtk-3.0\gtk\gtkviewport.h
copy ..\..\..\gtk\gtkvolumebutton.h $(CopyDir)\include\gtk-3.0\gtk\gtkvolumebutton.h
copy ..\..\..\gtk\gtkwidget.h $(CopyDir)\include\gtk-3.0\gtk\gtkwidget.h
copy ..\..\..\gtk\gtkwidgetpath.h $(CopyDir)\include\gtk-3.0\gtk\gtkwidgetpath.h
copy ..\..\..\gtk\gtkwindow.h $(CopyDir)\include\gtk-3.0\gtk\gtkwindow.h
copy ..\..\..\gtk\gtkwindowgroup.h $(CopyDir)\include\gtk-3.0\gtk\gtkwindowgroup.h
copy ..\..\..\gtk\gtktextlayout.h $(CopyDir)\include\gtk-3.0\gtk\gtktextlayout.h
copy ..\..\..\gtk\gtktypebuiltins.h $(CopyDir)\include\gtk-3.0\gtk\gtktypebuiltins.h
copy ..\..\..\gtk\gtkversion.h $(CopyDir)\include\gtk-3.0\gtk\gtkversion.h
copy ..\..\..\gtk\a11y\gtk-a11y-autocleanups.h $(CopyDir)\include\gtk-3.0\gtk\a11y\gtk-a11y-autocleanups.h
copy ..\..\..\gtk\a11y\gtkarrowaccessible.h $(CopyDir)\include\gtk-3.0\gtk\a11y\gtkarrowaccessible.h
copy ..\..\..\gtk\a11y\gtkbooleancellaccessible.h $(CopyDir)\include\gtk-3.0\gtk\a11y\gtkbooleancellaccessible.h
copy ..\..\..\gtk\a11y\gtkbuttonaccessible.h $(CopyDir)\include\gtk-3.0\gtk\a11y\gtkbuttonaccessible.h
copy ..\..\..\gtk\a11y\gtkcellaccessible.h $(CopyDir)\include\gtk-3.0\gtk\a11y\gtkcellaccessible.h
copy ..\..\..\gtk\a11y\gtkcellaccessibleparent.h $(CopyDir)\include\gtk-3.0\gtk\a11y\gtkcellaccessibleparent.h
copy ..\..\..\gtk\a11y\gtkcheckmenuitemaccessible.h $(CopyDir)\include\gtk-3.0\gtk\a11y\gtkcheckmenuitemaccessible.h
copy ..\..\..\gtk\a11y\gtkcomboboxaccessible.h $(CopyDir)\include\gtk-3.0\gtk\a11y\gtkcomboboxaccessible.h
copy ..\..\..\gtk\a11y\gtkcontaineraccessible.h $(CopyDir)\include\gtk-3.0\gtk\a11y\gtkcontaineraccessible.h
copy ..\..\..\gtk\a11y\gtkcontainercellaccessible.h $(CopyDir)\include\gtk-3.0\gtk\a11y\gtkcontainercellaccessible.h
copy ..\..\..\gtk\a11y\gtkentryaccessible.h $(CopyDir)\include\gtk-3.0\gtk\a11y\gtkentryaccessible.h
copy ..\..\..\gtk\a11y\gtkexpanderaccessible.h $(CopyDir)\include\gtk-3.0\gtk\a11y\gtkexpanderaccessible.h
copy ..\..\..\gtk\a11y\gtkflowboxaccessible.h $(CopyDir)\include\gtk-3.0\gtk\a11y\gtkflowboxaccessible.h
copy ..\..\..\gtk\a11y\gtkflowboxchildaccessible.h $(CopyDir)\include\gtk-3.0\gtk\a11y\gtkflowboxchildaccessible.h
copy ..\..\..\gtk\a11y\gtkframeaccessible.h $(CopyDir)\include\gtk-3.0\gtk\a11y\gtkframeaccessible.h
copy ..\..\..\gtk\a11y\gtkiconviewaccessible.h $(CopyDir)\include\gtk-3.0\gtk\a11y\gtkiconviewaccessible.h
copy ..\..\..\gtk\a11y\gtkimageaccessible.h $(CopyDir)\include\gtk-3.0\gtk\a11y\gtkimageaccessible.h
copy ..\..\..\gtk\a11y\gtkimagecellaccessible.h $(CopyDir)\include\gtk-3.0\gtk\a11y\gtkimagecellaccessible.h
copy ..\..\..\gtk\a11y\gtklabelaccessible.h $(CopyDir)\include\gtk-3.0\gtk\a11y\gtklabelaccessible.h
copy ..\..\..\gtk\a11y\gtklevelbaraccessible.h $(CopyDir)\include\gtk-3.0\gtk\a11y\gtklevelbaraccessible.h
copy ..\..\..\gtk\a11y\gtklinkbuttonaccessible.h $(CopyDir)\include\gtk-3.0\gtk\a11y\gtklinkbuttonaccessible.h
copy ..\..\..\gtk\a11y\gtklistboxaccessible.h $(CopyDir)\include\gtk-3.0\gtk\a11y\gtklistboxaccessible.h
copy ..\..\..\gtk\a11y\gtklistboxrowaccessible.h $(CopyDir)\include\gtk-3.0\gtk\a11y\gtklistboxrowaccessible.h
copy ..\..\..\gtk\a11y\gtklockbuttonaccessible.h $(CopyDir)\include\gtk-3.0\gtk\a11y\gtklockbuttonaccessible.h
copy ..\..\..\gtk\a11y\gtkmenuaccessible.h $(CopyDir)\include\gtk-3.0\gtk\a11y\gtkmenuaccessible.h
copy ..\..\..\gtk\a11y\gtkmenubuttonaccessible.h $(CopyDir)\include\gtk-3.0\gtk\a11y\gtkmenubuttonaccessible.h
copy ..\..\..\gtk\a11y\gtkmenuitemaccessible.h $(CopyDir)\include\gtk-3.0\gtk\a11y\gtkmenuitemaccessible.h
copy ..\..\..\gtk\a11y\gtkmenushellaccessible.h $(CopyDir)\include\gtk-3.0\gtk\a11y\gtkmenushellaccessible.h
copy ..\..\..\gtk\a11y\gtknotebookaccessible.h $(CopyDir)\include\gtk-3.0\gtk\a11y\gtknotebookaccessible.h
copy ..\..\..\gtk\a11y\gtknotebookpageaccessible.h $(CopyDir)\include\gtk-3.0\gtk\a11y\gtknotebookpageaccessible.h
copy ..\..\..\gtk\a11y\gtkpanedaccessible.h $(CopyDir)\include\gtk-3.0\gtk\a11y\gtkpanedaccessible.h
copy ..\..\..\gtk\a11y\gtkpopoveraccessible.h $(CopyDir)\include\gtk-3.0\gtk\a11y\gtkpopoveraccessible.h
copy ..\..\..\gtk\a11y\gtkprogressbaraccessible.h $(CopyDir)\include\gtk-3.0\gtk\a11y\gtkprogressbaraccessible.h
copy ..\..\..\gtk\a11y\gtkradiobuttonaccessible.h $(CopyDir)\include\gtk-3.0\gtk\a11y\gtkradiobuttonaccessible.h
copy ..\..\..\gtk\a11y\gtkradiomenuitemaccessible.h $(CopyDir)\include\gtk-3.0\gtk\a11y\gtkradiomenuitemaccessible.h
copy ..\..\..\gtk\a11y\gtkrangeaccessible.h $(CopyDir)\include\gtk-3.0\gtk\a11y\gtkrangeaccessible.h
copy ..\..\..\gtk\a11y\gtkrenderercellaccessible.h $(CopyDir)\include\gtk-3.0\gtk\a11y\gtkrenderercellaccessible.h
copy ..\..\..\gtk\a11y\gtkscaleaccessible.h $(CopyDir)\include\gtk-3.0\gtk\a11y\gtkscaleaccessible.h
copy ..\..\..\gtk\a11y\gtkscalebuttonaccessible.h $(CopyDir)\include\gtk-3.0\gtk\a11y\gtkscalebuttonaccessible.h
copy ..\..\..\gtk\a11y\gtkscrolledwindowaccessible.h $(CopyDir)\include\gtk-3.0\gtk\a11y\gtkscrolledwindowaccessible.h
copy ..\..\..\gtk\a11y\gtkspinbuttonaccessible.h $(CopyDir)\include\gtk-3.0\gtk\a11y\gtkspinbuttonaccessible.h
copy ..\..\..\gtk\a11y\gtkspinneraccessible.h $(CopyDir)\include\gtk-3.0\gtk\a11y\gtkspinneraccessible.h
copy ..\..\..\gtk\a11y\gtkstatusbaraccessible.h $(CopyDir)\include\gtk-3.0\gtk\a11y\gtkstatusbaraccessible.h
copy ..\..\..\gtk\a11y\gtkstackaccessible.h $(CopyDir)\include\gtk-3.0\gtk\a11y\gtkstackaccessible.h
copy ..\..\..\gtk\a11y\gtkswitchaccessible.h $(CopyDir)\include\gtk-3.0\gtk\a11y\gtkswitchaccessible.h
copy ..\..\..\gtk\a11y\gtktextcellaccessible.h $(CopyDir)\include\gtk-3.0\gtk\a11y\gtktextcellaccessible.h
copy ..\..\..\gtk\a11y\gtktextviewaccessible.h $(CopyDir)\include\gtk-3.0\gtk\a11y\gtktextviewaccessible.h
copy ..\..\..\gtk\a11y\gtktogglebuttonaccessible.h $(CopyDir)\include\gtk-3.0\gtk\a11y\gtktogglebuttonaccessible.h
copy ..\..\..\gtk\a11y\gtktoplevelaccessible.h $(CopyDir)\include\gtk-3.0\gtk\a11y\gtktoplevelaccessible.h
copy ..\..\..\gtk\a11y\gtktreeviewaccessible.h $(CopyDir)\include\gtk-3.0\gtk\a11y\gtktreeviewaccessible.h
copy ..\..\..\gtk\a11y\gtkwidgetaccessible.h $(CopyDir)\include\gtk-3.0\gtk\a11y\gtkwidgetaccessible.h
copy ..\..\..\gtk\a11y\gtkwindowaccessible.h $(CopyDir)\include\gtk-3.0\gtk\a11y\gtkwindowaccessible.h
copy ..\..\..\gtk\deprecated\gtkactivatable.h $(CopyDir)\include\gtk-3.0\gtk\deprecated\gtkactivatable.h
copy ..\..\..\gtk\deprecated\gtkaction.h $(CopyDir)\include\gtk-3.0\gtk\deprecated\gtkaction.h
copy ..\..\..\gtk\deprecated\gtkactiongroup.h $(CopyDir)\include\gtk-3.0\gtk\deprecated\gtkactiongroup.h
copy ..\..\..\gtk\deprecated\gtkalignment.h $(CopyDir)\include\gtk-3.0\gtk\deprecated\gtkalignment.h
copy ..\..\..\gtk\deprecated\gtkarrow.h $(CopyDir)\include\gtk-3.0\gtk\deprecated\gtkarrow.h
copy ..\..\..\gtk\deprecated\gtkcolorsel.h $(CopyDir)\include\gtk-3.0\gtk\deprecated\gtkcolorsel.h
copy ..\..\..\gtk\deprecated\gtkcolorseldialog.h $(CopyDir)\include\gtk-3.0\gtk\deprecated\gtkcolorseldialog.h
copy ..\..\..\gtk\deprecated\gtkfontsel.h $(CopyDir)\include\gtk-3.0\gtk\deprecated\gtkfontsel.h
copy ..\..\..\gtk\deprecated\gtkgradient.h $(CopyDir)\include\gtk-3.0\gtk\deprecated\gtkgradient.h
copy ..\..\..\gtk\deprecated\gtkhandlebox.h $(CopyDir)\include\gtk-3.0\gtk\deprecated\gtkhandlebox.h
copy ..\..\..\gtk\deprecated\gtkhbbox.h $(CopyDir)\include\gtk-3.0\gtk\deprecated\gtkhbbox.h
copy ..\..\..\gtk\deprecated\gtkhbox.h $(CopyDir)\include\gtk-3.0\gtk\deprecated\gtkhbox.h
copy ..\..\..\gtk\deprecated\gtkhpaned.h $(CopyDir)\include\gtk-3.0\gtk\deprecated\gtkhpaned.h
copy ..\..\..\gtk\deprecated\gtkhscale.h $(CopyDir)\include\gtk-3.0\gtk\deprecated\gtkhscale.h
copy ..\..\..\gtk\deprecated\gtkhscrollbar.h $(CopyDir)\include\gtk-3.0\gtk\deprecated\gtkhscrollbar.h
copy ..\..\..\gtk\deprecated\gtkhseparator.h $(CopyDir)\include\gtk-3.0\gtk\deprecated\gtkhseparator.h
copy ..\..\..\gtk\deprecated\gtkhsv.h $(CopyDir)\include\gtk-3.0\gtk\deprecated\gtkhsv.h
copy ..\..\..\gtk\deprecated\gtkiconfactory.h $(CopyDir)\include\gtk-3.0\gtk\deprecated\gtkiconfactory.h
copy ..\..\..\gtk\deprecated\gtkimagemenuitem.h $(CopyDir)\include\gtk-3.0\gtk\deprecated\gtkimagemenuitem.h
copy ..\..\..\gtk\deprecated\gtkmisc.h $(CopyDir)\include\gtk-3.0\gtk\deprecated\gtkmisc.h
copy ..\..\..\gtk\deprecated\gtknumerableicon.h $(CopyDir)\include\gtk-3.0\gtk\deprecated\gtknumerableicon.h
copy ..\..\..\gtk\deprecated\gtkradioaction.h $(CopyDir)\include\gtk-3.0\gtk\deprecated\gtkradioaction.h
copy ..\..\..\gtk\deprecated\gtkrc.h $(CopyDir)\include\gtk-3.0\gtk\deprecated\gtkrc.h
copy ..\..\..\gtk\deprecated\gtkrecentaction.h $(CopyDir)\include\gtk-3.0\gtk\deprecated\gtkrecentaction.h
copy ..\..\..\gtk\deprecated\gtkstatusicon.h $(CopyDir)\include\gtk-3.0\gtk\deprecated\gtkstatusicon.h
copy ..\..\..\gtk\deprecated\gtkstock.h $(CopyDir)\include\gtk-3.0\gtk\deprecated\gtkstock.h
copy ..\..\..\gtk\deprecated\gtkstyle.h $(CopyDir)\include\gtk-3.0\gtk\deprecated\gtkstyle.h
copy ..\..\..\gtk\deprecated\gtkstyleproperties.h $(CopyDir)\include\gtk-3.0\gtk\deprecated\gtkstyleproperties.h
copy ..\..\..\gtk\deprecated\gtksymboliccolor.h $(CopyDir)\include\gtk-3.0\gtk\deprecated\gtksymboliccolor.h
copy ..\..\..\gtk\deprecated\gtktable.h $(CopyDir)\include\gtk-3.0\gtk\deprecated\gtktable.h
copy ..\..\..\gtk\deprecated\gtktearoffmenuitem.h $(CopyDir)\include\gtk-3.0\gtk\deprecated\gtktearoffmenuitem.h
copy ..\..\..\gtk\deprecated\gtkthemingengine.h $(CopyDir)\include\gtk-3.0\gtk\deprecated\gtkthemingengine.h
copy ..\..\..\gtk\deprecated\gtktoggleaction.h $(CopyDir)\include\gtk-3.0\gtk\deprecated\gtktoggleaction.h
copy ..\..\..\gtk\deprecated\gtkuimanager.h $(CopyDir)\include\gtk-3.0\gtk\deprecated\gtkuimanager.h
copy ..\..\..\gtk\deprecated\gtkvbbox.h $(CopyDir)\include\gtk-3.0\gtk\deprecated\gtkvbbox.h
copy ..\..\..\gtk\deprecated\gtkvbox.h $(CopyDir)\include\gtk-3.0\gtk\deprecated\gtkvbox.h
copy ..\..\..\gtk\deprecated\gtkvscale.h $(CopyDir)\include\gtk-3.0\gtk\deprecated\gtkvscale.h
copy ..\..\..\gtk\deprecated\gtkvscrollbar.h $(CopyDir)\include\gtk-3.0\gtk\deprecated\gtkvscrollbar.h
copy ..\..\..\gtk\deprecated\gtkvseparator.h $(CopyDir)\include\gtk-3.0\gtk\deprecated\gtkvseparator.h
copy ..\..\..\gtk\deprecated\gtkvpaned.h $(CopyDir)\include\gtk-3.0\gtk\deprecated\gtkvpaned.h
mkdir $(CopyDir)\include\gail-$(ApiVersion)\libgail-util
copy ..\..\..\libgail-util\gailmisc.h $(CopyDir)\include\gail-3.0\libgail-util\gailmisc.h
copy ..\..\..\libgail-util\gailtextutil.h $(CopyDir)\include\gail-3.0\libgail-util\gailtextutil.h
copy ..\..\..\libgail-util\gail-util.h $(CopyDir)\include\gail-3.0\libgail-util\gail-util.h
for &#37;&#37;s in (16 22 24 32 48 256) do ((mkdir $(CopyDir)\share\icons\hicolor\&#37;&#37;sx&#37;&#37;s\apps) &amp; (copy /b ..\..\..\demos\gtk-demo\data\&#37;&#37;sx&#37;&#37;s\gtk3-demo.png $(CopyDir)\share\icons\hicolor\&#37;&#37;sx&#37;&#37;s\apps))
mkdir $(CopyDir)\share\glib-2.0\schemas
copy ..\..\..\gtk\org.gtk.Settings.ColorChooser.gschema.xml $(CopyDir)\share\glib-2.0\schemas
copy ..\..\..\gtk\org.gtk.Settings.Debug.gschema.xml $(CopyDir)\share\glib-2.0\schemas
copy ..\..\..\gtk\org.gtk.Settings.EmojiChooser.gschema.xml $(CopyDir)\share\glib-2.0\schemas
copy ..\..\..\gtk\org.gtk.Settings.FileChooser.gschema.xml $(CopyDir)\share\glib-2.0\schemas
copy ..\..\..\demos\gtk-demo\org.gtk.Demo.gschema.xml $(CopyDir)\share\glib-2.0\schemas
</GtkDoInstall>
<GtkDoInstallBroadwayHeaders>
copy ..\..\..\gdk\broadway\gdkbroadway.h $(CopyDir)\include\gtk-$(ApiVersion)\gdk
mkdir $(CopyDir)\include\gtk-$(ApiVersion)\gdk\broadway
copy ..\..\..\gdk\broadway\gdkbroadwaydisplay.h $(CopyDir)\include\gtk-3.0\gdk\broadway\gdkbroadwaydisplay.h
copy ..\..\..\gdk\broadway\gdkbroadwaywindow.h $(CopyDir)\include\gtk-3.0\gdk\broadway\gdkbroadwaywindow.h
copy ..\..\..\gdk\broadway\gdkbroadwaycursor.h $(CopyDir)\include\gtk-3.0\gdk\broadway\gdkbroadwaycursor.h
copy ..\..\..\gdk\broadway\gdkbroadwaymonitor.h $(CopyDir)\include\gtk-3.0\gdk\broadway\gdkbroadwaymonitor.h
copy ..\..\..\gdk\broadway\gdkbroadwayvisual.h $(CopyDir)\include\gtk-3.0\gdk\broadway\gdkbroadwayvisual.h
</GtkDoInstallBroadwayHeaders>
<GtkPostInstall>
echo "Compiling gsettings XML Files..."
$(GlibEtcInstallRoot)\bin\glib-compile-schemas.exe $(CopyDir)\share\glib-2.0\schemas
echo "Generating icon cache......"
$(CopyDir)\bin\gtk-update-icon-cache.exe --ignore-theme-index --force "$(CopyDir)\share\icons\hicolor"
</GtkPostInstall>
<GenerateGtkPC>$(PythonDir)\python ..\gtkpc.py --prefix=$(CopyDir) --version=$(GtkVersion) --host=i686-pc-vs$(VSVer)</GenerateGtkPC>
<GenerateGtkPCX64>$(PythonDir)\python ..\gtkpc.py --prefix=$(CopyDir) --version=$(GtkVersion) --host=x86_64-pc-vs$(VSVer)</GenerateGtkPCX64>
<GtkPCFiles>..\gdk-3.0.pc;..\gtk+-3.0.pc;..\gail-3.0.pc</GtkPCFiles>
</PropertyGroup>
<PropertyGroup>
<_PropertySheetDisplayName>gtk3installsprops</_PropertySheetDisplayName>
</PropertyGroup>
<ItemGroup>
<BuildMacro Include="BinDir">
<Value>$(BinDir)</Value>
</BuildMacro>
<BuildMacro Include="InstalledDlls">
<Value>$(InstalledDlls)</Value>
</BuildMacro>
<BuildMacro Include="InstalledBins">
<Value>$(InstalledBins)</Value>
</BuildMacro>
<BuildMacro Include="InstalledBroadwayBins">
<Value>$(InstalledBroadwayBins)</Value>
</BuildMacro>
<BuildMacro Include="GtkDoInstallBin">
<Value>$(GtkDoInstallBin)</Value>
</BuildMacro>
<BuildMacro Include="GtkDoInstall">
<Value>$(GtkDoInstall)</Value>
</BuildMacro>
<BuildMacro Include="GtkDoInstallBroadwayHeaders">
<Value>$(GtkDoInstallBroadwayHeaders)</Value>
</BuildMacro>
<BuildMacro Include="GtkPostInstall">
<Value>$(GtkPostInstall)</Value>
</BuildMacro>
<BuildMacro Include="GenerateGtkPC">
<Value>$(GenerateGtkPC)</Value>
</BuildMacro>
<BuildMacro Include="GenerateGtkPCX64">
<Value>$(GenerateGtkPCX64)</Value>
</BuildMacro>
<BuildMacro Include="GtkPCFiles">
<Value>$(GtkPCFiles)</Value>
</BuildMacro>
</ItemGroup>
</Project>
-20
View File
@@ -7,9 +7,7 @@
<BinDir>$(SolutionDir)$(Configuration)\$(Platform)\bin</BinDir>
<GtkDoInstallBin>
mkdir $(CopyDir)\bin
mkdir $(CopyDir)\share\gir-1.0
mkdir $(CopyDir)\lib\pkgconfig
mkdir $(CopyDir)\lib\girepository-1.0
copy "$(BinDir)\$(GtkDllPrefix)gdk-3$(GtkDllSuffix).dll" $(CopyDir)\bin
copy "$(BinDir)\$(GtkDllPrefix)gdk-3$(GtkDllSuffix).pdb" $(CopyDir)\bin
@@ -37,12 +35,6 @@ copy "$(BinDir)\gtk-query-settings.exe" $(CopyDir)\bin
copy "$(BinDir)\gtk-query-settings.pdb" $(CopyDir)\bin
copy "$(BinDir)\gtk-builder-tool.exe" $(CopyDir)\bin
copy "$(BinDir)\gtk-builder-tool.pdb" $(CopyDir)\bin
if exist $(BinDir)\Gdk-3.0.gir copy "$(BinDir)\Gdk-3.0.gir" $(CopyDir)\share\gir-1.0
if exist $(BinDir)\GdkWin32-3.0.gir copy "$(BinDir)\GdkWin32-3.0.gir" $(CopyDir)\share\gir-1.0
if exist $(BinDir)\Gtk-3.0.gir copy "$(BinDir)\Gtk-3.0.gir" $(CopyDir)\share\gir-1.0
if exist $(BinDir)\Gdk-3.0.typelib copy "$(BinDir)\Gdk-3.0.typelib" $(CopyDir)\lib\girepository-1.0
if exist $(BinDir)\GdkWin32-3.0.typelib copy "$(BinDir)\GdkWin32-3.0.typelib" $(CopyDir)\lib\girepository-1.0
if exist $(BinDir)\Gtk-3.0.typelib copy "$(BinDir)\Gtk-3.0.typelib" $(CopyDir)\lib\girepository-1.0
goto DONE_BIN
:DO_BROADWAY_BIN
@@ -72,12 +64,6 @@ copy .\Release\$(Platform)\bin\gtk-query-settings.exe $(CopyDir)\bin
copy .\Release\$(Platform)\bin\gtk-query-settings.pdb $(CopyDir)\bin
copy .\Release\$(Platform)\bin\gtk-builder-tool.exe $(CopyDir)\bin
copy .\Release\$(Platform)\bin\gtk-builder-tool.pdb $(CopyDir)\bin
if exist .\Release\$(Platform)\bin\Gdk-3.0.gir copy .\Release\$(Platform)\bin\Gdk-3.0.gir $(CopyDir)\share\gir-1.0
if exist .\Release\$(Platform)\bin\GdkWin32-3.0.gir copy .\Release\$(Platform)\bin\GdkWin32-3.0.gir $(CopyDir)\share\gir-1.0
if exist .\Release\$(Platform)\bin\Gtk-3.0.gir copy .\Release\$(Platform)\bin\Gtk-3.0.gir $(CopyDir)\share\gir-1.0
if exist .\Release\$(Platform)\bin\Gdk-3.0.typelib copy .\Release\$(Platform)\bin\Gdk-3.0.typelib $(CopyDir)\lib\girepository-1.0
if exist .\Release\$(Platform)\bin\GdkWin32-3.0.typelib copy .\Release\$(Platform)\bin\GdkWin32-3.0.typelib $(CopyDir)\lib\girepository-1.0
if exist .\Release\$(Platform)\bin\Gtk-3.0.typelib copy .\Release\$(Platform)\bin\Gtk-3.0.typelib $(CopyDir)\lib\girepository-1.0
goto DONE_BIN
@@ -102,12 +88,6 @@ copy .\Debug\$(Platform)\bin\gtk-query-settings.exe $(CopyDir)\bin
copy .\Debug\$(Platform)\bin\gtk-query-settings.pdb $(CopyDir)\bin
copy .\Debug\$(Platform)\bin\gtk-builder-tool.exe $(CopyDir)\bin
copy .\Debug\$(Platform)\bin\gtk-builder-tool.pdb $(CopyDir)\bin
if exist .\Debug\$(Platform)\bin\Gdk-3.0.gir copy .\Debug\$(Platform)\bin\Gdk-3.0.gir $(CopyDir)\share\gir-1.0
if exist .\Debug\$(Platform)\bin\GdkWin32-3.0.gir copy .\Debug\$(Platform)\bin\GdkWin32-3.0.gir $(CopyDir)\share\gir-1.0
if exist .\Debug\$(Platform)\bin\Gtk-3.0.gir copy .\Debug\$(Platform)\bin\Gtk-3.0.gir $(CopyDir)\share\gir-1.0
if exist .\Debug\$(Platform)\bin\Gdk-3.0.typelib copy .\Debug\$(Platform)\bin\Gdk-3.0.typelib $(CopyDir)\lib\girepository-1.0
if exist .\Debug\$(Platform)\bin\GdkWin32-3.0.typelib copy .\Debug\$(Platform)\bin\GdkWin32-3.0.typelib $(CopyDir)\lib\girepository-1.0
if exist .\Debug\$(Platform)\bin\Gtk-3.0.typelib copy .\Debug\$(Platform)\bin\Gtk-3.0.typelib $(CopyDir)\lib\girepository-1.0
:DONE_BIN
+102 -106
View File
@@ -1,107 +1,103 @@
<?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="Release|Win32">
<Configuration>Release</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Debug|x64">
<Configuration>Debug</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|x64">
<Configuration>Release</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
</ItemGroup>
<PropertyGroup Label="Globals">
<ProjectGuid>{A8092C4E-0A21-4B1D-AC82-16764E418D1F}</ProjectGuid>
<RootNamespace>gtk3introspect</RootNamespace>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>Makefile</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<CharacterSet>MultiByte</CharacterSet>
<PlatformToolset>v100</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>Makefile</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>MultiByte</CharacterSet>
<PlatformToolset>v100</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
<ConfigurationType>Makefile</ConfigurationType>
<CharacterSet>MultiByte</CharacterSet>
<PlatformToolset>v100</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
<ConfigurationType>Makefile</ConfigurationType>
<CharacterSet>MultiByte</CharacterSet>
<WholeProgramOptimization>true</WholeProgramOptimization>
<PlatformToolset>v100</PlatformToolset>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="gtk3-build-defines.props" />
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="gtk3-build-defines.props" />
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="gtk3-build-defines.props" />
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="gtk3-build-defines.props" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<NMakeBuildCommandLine>$(GtkIntrospectNMakeCmd) $(IntrospectPythonParam)</NMakeBuildCommandLine>
<NMakeReBuildCommandLine>$(GtkIntrospectNMakeCmd) $(IntrospectPythonParam) clean all</NMakeReBuildCommandLine>
<NMakeCleanCommandLine>$(GtkIntrospectNMakeCmd) $(IntrospectPythonParam) clean</NMakeCleanCommandLine>
<NMakeOutput>$(GtkIntrospectBuiltFiles)</NMakeOutput>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<NMakeBuildCommandLine>$(GtkIntrospectNMakeCmd) $(IntrospectPythonParam)</NMakeBuildCommandLine>
<NMakeReBuildCommandLine>$(GtkIntrospectNMakeCmd) $(IntrospectPythonParam) clean all</NMakeReBuildCommandLine>
<NMakeCleanCommandLine>$(GtkIntrospectNMakeCmd) $(IntrospectPythonParam) clean</NMakeCleanCommandLine>
<NMakeOutput>$(GtkIntrospectBuiltFiles)</NMakeOutput>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<NMakeBuildCommandLine>$(GtkIntrospectNMakeCmd) $(IntrospectPythonParam)</NMakeBuildCommandLine>
<NMakeReBuildCommandLine>$(GtkIntrospectNMakeCmd) $(IntrospectPythonParam) clean all</NMakeReBuildCommandLine>
<NMakeCleanCommandLine>$(GtkIntrospectNMakeCmd) $(IntrospectPythonParam) clean</NMakeCleanCommandLine>
<NMakeOutput>$(GtkIntrospectBuiltFiles)</NMakeOutput>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<NMakeBuildCommandLine>$(GtkIntrospectNMakeCmd) $(IntrospectPythonParam)</NMakeBuildCommandLine>
<NMakeReBuildCommandLine>$(GtkIntrospectNMakeCmd) $(IntrospectPythonParam) clean all</NMakeReBuildCommandLine>
<NMakeCleanCommandLine>$(GtkIntrospectNMakeCmd) $(IntrospectPythonParam) clean</NMakeCleanCommandLine>
<NMakeOutput>$(GtkIntrospectBuiltFiles)</NMakeOutput>
</PropertyGroup>
<ItemGroup>
<ProjectReference Include="gdk-3.vcxproj">
<Project>{5ae8f5ce-9103-4951-aede-ea2f3b573be8}</Project>
<ReferenceOutputAssembly>false</ReferenceOutputAssembly>
</ProjectReference>
<ProjectReference Include="gtk-3.vcxproj">
<Project>{95a4b53d-2773-4406-a2c1-8fd2840bbad8}</Project>
<ReferenceOutputAssembly>false</ReferenceOutputAssembly>
</ProjectReference>
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
<?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="Release|Win32">
<Configuration>Release</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Debug|x64">
<Configuration>Debug</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|x64">
<Configuration>Release</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
</ItemGroup>
<PropertyGroup Label="Globals">
<ProjectGuid>{A8092C4E-0A21-4B1D-AC82-16764E418D1F}</ProjectGuid>
<RootNamespace>gtk3introspect</RootNamespace>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>Makefile</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<CharacterSet>MultiByte</CharacterSet>
<PlatformToolset>v100</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>Makefile</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>MultiByte</CharacterSet>
<PlatformToolset>v100</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
<ConfigurationType>Makefile</ConfigurationType>
<CharacterSet>MultiByte</CharacterSet>
<PlatformToolset>v100</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
<ConfigurationType>Makefile</ConfigurationType>
<CharacterSet>MultiByte</CharacterSet>
<WholeProgramOptimization>true</WholeProgramOptimization>
<PlatformToolset>v100</PlatformToolset>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="gtk3-build-defines.props" />
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="gtk3-build-defines.props" />
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="gtk3-build-defines.props" />
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="gtk3-build-defines.props" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<NMakeBuildCommandLine>$(GtkIntrospectNMakeCmd) $(IntrospectPythonParam) install-introspection</NMakeBuildCommandLine>
<NMakeReBuildCommandLine>$(GtkIntrospectNMakeCmd) $(IntrospectPythonParam) clean install-introspection</NMakeReBuildCommandLine>
<NMakeCleanCommandLine>$(GtkIntrospectNMakeCmd) $(IntrospectPythonParam) clean</NMakeCleanCommandLine>
<NMakeOutput>$(GtkIntrospectBuiltFiles)</NMakeOutput>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<NMakeBuildCommandLine>$(GtkIntrospectNMakeCmd) $(IntrospectPythonParam) install-introspection</NMakeBuildCommandLine>
<NMakeReBuildCommandLine>$(GtkIntrospectNMakeCmd) $(IntrospectPythonParam) clean install-introspection</NMakeReBuildCommandLine>
<NMakeCleanCommandLine>$(GtkIntrospectNMakeCmd) $(IntrospectPythonParam) clean</NMakeCleanCommandLine>
<NMakeOutput>$(GtkIntrospectBuiltFiles)</NMakeOutput>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<NMakeBuildCommandLine>$(GtkIntrospectNMakeCmd) $(IntrospectPythonParam) install-introspection</NMakeBuildCommandLine>
<NMakeReBuildCommandLine>$(GtkIntrospectNMakeCmd) $(IntrospectPythonParam) clean install-introspection</NMakeReBuildCommandLine>
<NMakeCleanCommandLine>$(GtkIntrospectNMakeCmd) $(IntrospectPythonParam) clean</NMakeCleanCommandLine>
<NMakeOutput>$(GtkIntrospectBuiltFiles)</NMakeOutput>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<NMakeBuildCommandLine>$(GtkIntrospectNMakeCmd) $(IntrospectPythonParam) install-introspection</NMakeBuildCommandLine>
<NMakeReBuildCommandLine>$(GtkIntrospectNMakeCmd) $(IntrospectPythonParam) clean install-introspection</NMakeReBuildCommandLine>
<NMakeCleanCommandLine>$(GtkIntrospectNMakeCmd) $(IntrospectPythonParam) clean</NMakeCleanCommandLine>
<NMakeOutput>$(GtkIntrospectBuiltFiles)</NMakeOutput>
</PropertyGroup>
<ItemGroup>
<ProjectReference Include="gtk3-install.vcxproj">
<Project>{23bbf35f-78af-4e8c-983f-7b90448cd7df}</Project>
<ReferenceOutputAssembly>false</ReferenceOutputAssembly>
</ProjectReference>
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
</Project>
+1 -2
View File
@@ -91,8 +91,7 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "gtk3-install", "gtk3-instal
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "gtk3-introspect", "gtk3-introspect.vcproj", "{A8092C4E-0A21-4B1D-AC82-16764E418D1F}"
ProjectSection(ProjectDependencies) = postProject
{5AE8F5CE-9103-4951-AEDE-EA2F3B573BE8} = {5AE8F5CE-9103-4951-AEDE-EA2F3B573BE8}
{95A4B53D-2773-4406-A2C1-8FD2840BBAD8} = {95A4B53D-2773-4406-A2C1-8FD2840BBAD8}
{23BBF35F-78AF-4E8C-983F-7B90448CD7DF} = {23BBF35F-78AF-4E8C-983F-7B90448CD7DF}
EndProjectSection
EndProject
Global
+3 -3
View File
@@ -45,7 +45,7 @@
/>
<UserMacro
Name="GtkGdkCommonLibs"
Value="pangowin32-1.0.lib imm32.lib"
Value="imm32.lib"
/>
<UserMacro
Name="GdkBroadwayAdditionalLibs"
@@ -57,7 +57,7 @@
/>
<UserMacro
Name="GtkAdditionalLibs"
Value="atk-1.0.lib winspool.lib comctl32.lib $(GtkGdkCommonLibs)"
Value="atk-1.0.lib pangowin32-1.0.lib winspool.lib comctl32.lib $(GtkGdkCommonLibs)"
/>
<UserMacro
Name="GtkIntrospectNMakeCmd"
@@ -65,6 +65,6 @@
/>
<UserMacro
Name="GtkIntrospectBuiltFiles"
Value="$(SolutionDir)\$(ConfigurationName)\$(PlatformName)\bin\Gtk-3.0.gir;$(SolutionDir)\$(ConfigurationName)\$(PlatformName)\bin\Gtk-3.0.typelib;$(SolutionDir)\$(ConfigurationName)\$(PlatformName)\bin\GdkWin32-3.0.gir;$(SolutionDir)\$(ConfigurationName)\$(PlatformName)\bin\GdkWin32-3.0.typelib;$(SolutionDir)\$(ConfigurationName)\$(PlatformName)\bin\Gdk-3.0.gir;$(SolutionDir)\$(ConfigurationName)\$(PlatformName)\bin\Gdk-3.0.typelib"
Value="$(SolutionDir)\..\Gtk-3.0.gir;$(SolutionDir)\..\Gtk-3.0.typelib;$(SolutionDir)\..\GdkWin32-3.0.gir;$(SolutionDir)\..\GdkWin32-3.0.typelib;$(SolutionDir)\..\Gdk-3.0.gir;$(SolutionDir)\..\Gdk-3.0.typelib"
/>
</VisualStudioPropertySheet>
-20
View File
@@ -9,9 +9,7 @@
Name="GtkDoInstallBin"
Value="
mkdir $(CopyDir)\bin&#x0D;&#x0A;
mkdir $(CopyDir)\share\gir-1.0&#x0D;&#x0A;
mkdir $(CopyDir)\lib\pkgconfig&#x0D;&#x0A;
mkdir $(CopyDir)\lib\girepository-1.0&#x0D;&#x0A;
copy $(ConfigurationName)\$(PlatformName)\bin\$(GtkDllPrefix)gdk-3$(GtkDllSuffix).dll $(CopyDir)\bin&#x0D;&#x0A;
copy $(ConfigurationName)\$(PlatformName)\bin\$(GtkDllPrefix)gdk-3$(GtkDllSuffix).pdb $(CopyDir)\bin&#x0D;&#x0A;
@@ -39,12 +37,6 @@ copy $(ConfigurationName)\$(PlatformName)\bin\gtk-query-settings.exe $(CopyDir)\
copy $(ConfigurationName)\$(PlatformName)\bin\gtk-query-settings.pdb $(CopyDir)\bin&#x0D;&#x0A;
copy $(ConfigurationName)\$(PlatformName)\bin\gtk-builder-tool.exe $(CopyDir)\bin&#x0D;&#x0A;
copy $(ConfigurationName)\$(PlatformName)\bin\gtk-builder-tool.pdb $(CopyDir)\bin&#x0D;&#x0A;
if exist $(ConfigurationName)\$(PlatformName)\bin\Gdk-3.0.gir copy $(ConfigurationName)\$(PlatformName)\bin\Gdk-3.0.gir $(CopyDir)\share\gir-1.0&#x0D;&#x0A;
if exist $(ConfigurationName)\$(PlatformName)\bin\GdkWin32-3.0.gir copy $(ConfigurationName)\$(PlatformName)\bin\GdkWin32-3.0.gir $(CopyDir)\share\gir-1.0&#x0D;&#x0A;
if exist $(ConfigurationName)\$(PlatformName)\bin\Gtk-3.0.gir copy $(ConfigurationName)\$(PlatformName)\bin\Gtk-3.0.gir $(CopyDir)\share\gir-1.0&#x0D;&#x0A;
if exist $(ConfigurationName)\$(PlatformName)\bin\Gdk-3.0.typelib copy $(ConfigurationName)\$(PlatformName)\bin\Gdk-3.0.typelib $(CopyDir)\lib\girepository-1.0&#x0D;&#x0A;
if exist $(ConfigurationName)\$(PlatformName)\bin\GdkWin32-3.0.typelib copy $(ConfigurationName)\$(PlatformName)\bin\GdkWin32-3.0.typelib $(CopyDir)\lib\girepository-1.0&#x0D;&#x0A;
if exist $(ConfigurationName)\$(PlatformName)\bin\Gtk-3.0.typelib copy $(ConfigurationName)\$(PlatformName)\bin\Gtk-3.0.typelib $(CopyDir)\lib\girepository-1.0&#x0D;&#x0A;
goto DONE_BIN&#x0D;&#x0A;
:DO_BROADWAY_BIN&#x0D;&#x0A;
@@ -74,12 +66,6 @@ copy .\Release\$(PlatformName)\bin\gtk-query-settings.exe $(CopyDir)\bin&#x0D;&#
copy .\Release\$(PlatformName)\bin\gtk-query-settings.pdb $(CopyDir)\bin&#x0D;&#x0A;
copy .\Release\$(PlatformName)\bin\gtk-builder-tool.exe $(CopyDir)\bin&#x0D;&#x0A;
copy .\Release\$(PlatformName)\bin\gtk-builder-tool.pdb $(CopyDir)\bin&#x0D;&#x0A;
if exist .\Release\$(PlatformName)\bin\Gdk-3.0.gir copy .\Release\$(PlatformName)\bin\Gdk-3.0.gir $(CopyDir)\share\gir-1.0&#x0D;&#x0A;
if exist .\Release\$(PlatformName)\bin\GdkWin32-3.0.gir copy .\Release\$(PlatformName)\bin\GdkWin32-3.0.gir $(CopyDir)\share\gir-1.0&#x0D;&#x0A;
if exist .\Release\$(PlatformName)\bin\Gtk-3.0.gir copy .\Release\$(PlatformName)\bin\Gtk-3.0.gir $(CopyDir)\share\gir-1.0&#x0D;&#x0A;
if exist .\Release\$(PlatformName)\bin\Gdk-3.0.typelib copy .\Release\$(PlatformName)\bin\Gdk-3.0.typelib $(CopyDir)\lib\girepository-1.0&#x0D;&#x0A;
if exist .\Release\$(PlatformName)\bin\GdkWin32-3.0.typelib copy .\Release\$(PlatformName)\bin\GdkWin32-3.0.typelib $(CopyDir)\lib\girepository-1.0&#x0D;&#x0A;
if exist .\Release\$(PlatformName)\bin\Gtk-3.0.typelib copy .\Release\$(PlatformName)\bin\Gtk-3.0.typelib $(CopyDir)\lib\girepository-1.0&#x0D;&#x0A;
goto DONE_BIN&#x0D;&#x0A;
:DO_BROADWAY_DEBUG&#x0D;&#x0A;
@@ -103,12 +89,6 @@ copy .\Debug\$(PlatformName)\bin\gtk-query-settings.exe $(CopyDir)\bin&#x0D;&#x0
copy .\Debug\$(PlatformName)\bin\gtk-query-settings.pdb $(CopyDir)\bin&#x0D;&#x0A;
copy .\Debug\$(PlatformName)\bin\gtk-builder-tool.exe $(CopyDir)\bin&#x0D;&#x0A;
copy .\Debug\$(PlatformName)\bin\gtk-builder-tool.pdb $(CopyDir)\bin&#x0D;&#x0A;
if exist .\Debug\$(PlatformName)\bin\Gdk-3.0.gir copy .\Debug\$(PlatformName)\bin\Gdk-3.0.gir $(CopyDir)\share\gir-1.0&#x0D;&#x0A;
if exist .\Debug\$(PlatformName)\bin\GdkWin32-3.0.gir copy .\Debug\$(PlatformName)\bin\GdkWin32-3.0.gir $(CopyDir)\share\gir-1.0&#x0D;&#x0A;
if exist .\Debug\$(PlatformName)\bin\Gtk-3.0.gir copy .\Debug\$(PlatformName)\bin\Gtk-3.0.gir $(CopyDir)\share\gir-1.0&#x0D;&#x0A;
if exist .\Debug\$(PlatformName)\bin\Gdk-3.0.typelib copy .\Debug\$(PlatformName)\bin\Gdk-3.0.typelib $(CopyDir)\lib\girepository-1.0&#x0D;&#x0A;
if exist .\Debug\$(PlatformName)\bin\GdkWin32-3.0.typelib copy .\Debug\$(PlatformName)\bin\GdkWin32-3.0.typelib $(CopyDir)\lib\girepository-1.0&#x0D;&#x0A;
if exist .\Debug\$(PlatformName)\bin\Gtk-3.0.typelib copy .\Debug\$(PlatformName)\bin\Gtk-3.0.typelib $(CopyDir)\lib\girepository-1.0&#x0D;&#x0A;
:DONE_BIN&#x0D;&#x0A;
copy ..\gdk-3.0.pc $(CopyDir)\lib\pkgconfig&#x0D;&#x0A;
+76 -76
View File
@@ -1,76 +1,76 @@
<?xml version="1.0" encoding="Windows-1252"?>
<VisualStudioProject
ProjectType="Visual C++"
Version="9.00"
Name="gtk3-introspect"
ProjectGUID="{A8092C4E-0A21-4B1D-AC82-16764E418D1F}"
Keyword="MakeFileProj"
TargetFrameworkVersion="196613"
>
<Platforms>
<Platform
Name="Win32"
/>
<Platform
Name="x64"
/>
</Platforms>
<ToolFiles>
</ToolFiles>
<Configurations>
<Configuration
Name="Debug|Win32"
ConfigurationType="0"
InheritedPropertySheets=".\gtk3-build-defines.vsprops"
>
<Tool
Name="VCNMakeTool"
BuildCommandLine="$(GtkIntrospectNMakeCmd) $(IntrospectPythonParam)"
ReBuildCommandLine="$(GtkIntrospectNMakeCmd) $(IntrospectPythonParam) clean all"
CleanCommandLine="$(GtkIntrospectNMakeCmd) $(IntrospectPythonParam) clean"
Output="$(GtkIntrospectBuiltFiles)"
/>
</Configuration>
<Configuration
Name="Debug|x64"
ConfigurationType="0"
InheritedPropertySheets=".\gtk3-build-defines.vsprops"
>
<Tool
Name="VCNMakeTool"
BuildCommandLine="$(GtkIntrospectNMakeCmd) $(IntrospectPythonParamX64)"
ReBuildCommandLine="$(GtkIntrospectNMakeCmd) $(IntrospectPythonParamX64) clean all"
CleanCommandLine="$(GtkIntrospectNMakeCmd) $(IntrospectPythonParamX64) clean"
Output="$(GtkIntrospectBuiltFiles)"
/>
</Configuration>
<Configuration
Name="Release|Win32"
ConfigurationType="0"
InheritedPropertySheets=".\gtk3-build-defines.vsprops"
CharacterSet="2"
DeleteExtensionsOnClean=""
>
<Tool
Name="VCNMakeTool"
BuildCommandLine="$(GtkIntrospectNMakeCmd) $(IntrospectPythonParam)"
ReBuildCommandLine="$(GtkIntrospectNMakeCmd) $(IntrospectPythonParam) clean all"
CleanCommandLine="$(GtkIntrospectNMakeCmd) $(IntrospectPythonParam) clean"
Output="$(GtkIntrospectBuiltFiles)"
/>
</Configuration>
<Configuration
Name="Release|x64"
ConfigurationType="0"
InheritedPropertySheets=".\gtk3-build-defines.vsprops"
>
<Tool
Name="VCNMakeTool"
BuildCommandLine="$(GtkIntrospectNMakeCmd) $(IntrospectPythonParamX64)"
ReBuildCommandLine="$(GtkIntrospectNMakeCmd) $(IntrospectPythonParamX64) clean all"
CleanCommandLine="$(GtkIntrospectNMakeCmd) $(IntrospectPythonParamX64) clean"
Output="$(GtkIntrospectBuiltFiles)"
/>
</Configuration>
</Configurations>
</VisualStudioProject>
<?xml version="1.0" encoding="Windows-1252"?>
<VisualStudioProject
ProjectType="Visual C++"
Version="9.00"
Name="gtk3-introspect"
ProjectGUID="{A8092C4E-0A21-4B1D-AC82-16764E418D1F}"
Keyword="MakeFileProj"
TargetFrameworkVersion="196613"
>
<Platforms>
<Platform
Name="Win32"
/>
<Platform
Name="x64"
/>
</Platforms>
<ToolFiles>
</ToolFiles>
<Configurations>
<Configuration
Name="Debug|Win32"
ConfigurationType="0"
InheritedPropertySheets=".\gtk3-build-defines.vsprops"
>
<Tool
Name="VCNMakeTool"
BuildCommandLine="$(GtkIntrospectNMakeCmd) $(IntrospectPythonParam) install-introspection"
ReBuildCommandLine="$(GtkIntrospectNMakeCmd) $(IntrospectPythonParam) clean install-introspection"
CleanCommandLine="$(GtkIntrospectNMakeCmd) $(IntrospectPythonParam) clean"
Output="$(GtkIntrospectBuiltFiles)"
/>
</Configuration>
<Configuration
Name="Debug|x64"
ConfigurationType="0"
InheritedPropertySheets=".\gtk3-build-defines.vsprops"
>
<Tool
Name="VCNMakeTool"
BuildCommandLine="$(GtkIntrospectNMakeCmd) $(IntrospectPythonParamX64) install-introspection"
ReBuildCommandLine="$(GtkIntrospectNMakeCmd) $(IntrospectPythonParamX64) clean install-introspection"
CleanCommandLine="$(GtkIntrospectNMakeCmd) $(IntrospectPythonParamX64) clean"
Output="$(GtkIntrospectBuiltFiles)"
/>
</Configuration>
<Configuration
Name="Release|Win32"
ConfigurationType="0"
InheritedPropertySheets=".\gtk3-build-defines.vsprops"
CharacterSet="2"
DeleteExtensionsOnClean=""
>
<Tool
Name="VCNMakeTool"
BuildCommandLine="$(GtkIntrospectNMakeCmd) $(IntrospectPythonParam) install-introspection"
ReBuildCommandLine="$(GtkIntrospectNMakeCmd) $(IntrospectPythonParam) clean install-introspection"
CleanCommandLine="$(GtkIntrospectNMakeCmd) $(IntrospectPythonParam) clean"
Output="$(GtkIntrospectBuiltFiles)"
/>
</Configuration>
<Configuration
Name="Release|x64"
ConfigurationType="0"
InheritedPropertySheets=".\gtk3-build-defines.vsprops"
>
<Tool
Name="VCNMakeTool"
BuildCommandLine="$(GtkIntrospectNMakeCmd) $(IntrospectPythonParamX64) install-introspection"
ReBuildCommandLine="$(GtkIntrospectNMakeCmd) $(IntrospectPythonParamX64) clean install-introspection"
CleanCommandLine="$(GtkIntrospectNMakeCmd) $(IntrospectPythonParamX64) clean"
Output="$(GtkIntrospectBuiltFiles)"
/>
</Configuration>
</Configurations>
</VisualStudioProject>
-5
View File
@@ -209,11 +209,6 @@
/* Define to 1 if you have the <sys/types.h> header file. */
#define HAVE_SYS_TYPES_H 1
/* Define to 1 if trunc() is available */
#if !defined (_MSC_VER) || (_MSC_VER >= 1800)
# define HAVE_TRUNC 1
#endif
/* Define to 1 if you have the <unistd.h> header file. */
#ifndef _MSC_VER
#define HAVE_UNISTD_H 1
+19 -23
View File
@@ -9,8 +9,8 @@
# set GTK_BINARY_AGE and GTK_INTERFACE_AGE to 0.
m4_define([gtk_major_version], [3])
m4_define([gtk_minor_version], [24])
m4_define([gtk_micro_version], [4])
m4_define([gtk_minor_version], [23])
m4_define([gtk_micro_version], [1])
m4_define([gtk_interface_age], [0])
m4_define([gtk_binary_age],
[m4_eval(100 * gtk_minor_version + gtk_micro_version)])
@@ -42,7 +42,7 @@ m4_define([gtk_binary_version], [3.0.0])
# required versions of other packages
m4_define([glib_required_major], [2])
m4_define([glib_required_minor], [53])
m4_define([glib_required_minor], [49])
m4_define([glib_required_micro], [4])
m4_define([glib_required_version],
[glib_required_major.glib_required_minor.glib_required_micro])
@@ -409,7 +409,7 @@ if test "x$enable_quartz_backend" = xyes; then
backend_immodules="$backend_immodules,quartz"
GDK_WINDOWING="$GDK_WINDOWING
#define GDK_WINDOWING_QUARTZ"
GDK_EXTRA_LIBS="$GDK_EXTRA_LIBS -Wl,-framework,Cocoa"
GDK_EXTRA_LIBS="$GDK_EXTRA_LIBS -framework Cocoa"
DISABLE_ON_QUARTZ='%'
AM_CONDITIONAL(USE_QUARTZ, true)
if test "x$quartz_relocation" = xyes; then
@@ -876,10 +876,9 @@ AC_CHECK_FUNCS(mallinfo)
AC_CHECK_FUNCS(getresuid)
AC_TYPE_UID_T
# Check for round(), rint(), isnan() and isinf()
# Check for log2(), exp2(), nearbyint() and trunc()
# Check for round(), rint(), isnan(), isinf() and nearbyint()
AC_CHECK_LIB(m,round,,)
AC_CHECK_FUNCS(round rint nearbyint sincos exp2 log2 trunc)
AC_CHECK_FUNCS(round rint nearbyint sincos exp2 log2)
AC_CHECK_DECLS([isnan, isinf], [], [], [[#include <math.h>]])
# Checks for gdkspawn
@@ -1427,22 +1426,6 @@ if test x"$os_win32" = xyes; then
GTK_EXTRA_CFLAGS="$msnative_struct"
fi
##################################################
# Check for harfbuzz and pangoft2
##################################################
PKG_CHECK_MODULES(GTK_FONT_CHOOSER_WIDGET,
harfbuzz >= 0.9 pangoft2,
build_font_demo=yes,
build_font_demo=no)
AM_CONDITIONAL(BUILD_FONT_DEMO, [ test "x$build_font_demo" = xyes ])
if test "x$build_font_demo" = xyes; then
AC_DEFINE([HAVE_HARFBUZZ], 1, [defines whether we have HarfBuzz])
AC_DEFINE([HAVE_PANGOFT], 1, [defines whether we have pangoft2])
GTK_DEP_CFLAGS="$GTK_DEP_CFLAGS $GTK_FONT_CHOOSER_WIDGET_CFLAGS"
GTK_DEP_LIBS="$GTK_DEP_LIBS $GTK_FONT_CHOOSER_WIDGET_LIBS"
fi
if $PKG_CONFIG --exists x11; then
X11_PREFIX="`$PKG_CONFIG --variable=prefix x11`"
elif test x"$prefix" != xNONE; then
@@ -1794,6 +1777,19 @@ if test "$have_colord" = "yes"; then
fi
AM_CONDITIONAL(HAVE_COLORD, test "x$have_colord" = "xyes")
##################################################
# Check for harfbuzz and pangoft2
##################################################
PKG_CHECK_MODULES(FONTDEMO, harfbuzz >= 0.9 pangoft2, build_font_demo=yes, build_font_demo=no)
AC_SUBST(FONTDEMO_CFLAGS)
AC_SUBST(FONTDEMO_LIBS)
AM_CONDITIONAL(BUILD_FONT_DEMO, [ test "x$build_font_demo" = xyes ])
if test "x$build_font_demo" = xyes; then
AC_DEFINE([HAVE_HARFBUZZ], 1, [defines whether we have HarfBuzz])
AC_DEFINE([HAVE_PANGOFT], 1, [defines whether we have pangoft2])
fi
##################################################
# Checks for gtk-doc and docbook-tools
##################################################
+5
View File
@@ -104,6 +104,11 @@ LDADDS = \
$(GDK_DEP_LIBS) \
-lm
if BUILD_FONT_DEMO
AM_CPPFLAGS += $(FONTDEMO_CFLAGS)
LDADDS += $(FONTDEMO_LIBS)
endif
bin_PROGRAMS = gtk3-demo gtk3-demo-application
desktopdir = $(datadir)/applications
+2 -2
View File
@@ -144,7 +144,7 @@ create_capital_store (void)
{ NULL, "Jackson" },
{ NULL, "Jefferson City" },
{ NULL, "Juneau" },
{ "K - O", NULL },
{ "K - O" },
{ NULL, "Lansing" },
{ NULL, "Lincoln" },
{ NULL, "Little Rock" },
@@ -154,7 +154,7 @@ create_capital_store (void)
{ NULL, "Nashville" },
{ NULL, "Oklahoma City" },
{ NULL, "Olympia" },
{ "P - S", NULL },
{ NULL, "P - S" },
{ NULL, "Phoenix" },
{ NULL, "Pierre" },
{ NULL, "Providence" },
-1
View File
@@ -50,7 +50,6 @@
<property name="can_focus">1</property>
<property name="receives_default">1</property>
<property name="font">Sans 12</property>
<property name="level">style|size|variations|features</property>
<signal name="font-set" handler="font_changed" swapped="no"/>
</object>
</child>
+7 -6
View File
@@ -762,14 +762,15 @@ load_file (const gchar *demoname,
/* Skipping blank lines */
while (g_ascii_isspace (*p))
p++;
if (!*p)
if (*p)
{
p = lines[i];
state++;
/* Fall through */
}
else
break;
p = lines[i];
state++;
/* Fall through */
case 3:
/* Reading program body */
gtk_text_buffer_insert (source_buffer, &start, p, -1);
+2 -4
View File
@@ -181,7 +181,6 @@ stylus_gesture_motion (GtkGestureStylus *gesture,
static void
drawing_area_init (DrawingArea *area)
{
const GdkRGBA draw_rgba = { 0, 0, 0, 1 };
gtk_event_box_set_visible_window (GTK_EVENT_BOX (area), TRUE);
area->stylus_gesture = gtk_gesture_stylus_new (GTK_WIDGET (area));
@@ -190,7 +189,7 @@ drawing_area_init (DrawingArea *area)
g_signal_connect (area->stylus_gesture, "motion",
G_CALLBACK (stylus_gesture_motion), area);
area->draw_color = draw_rgba;
area->draw_color = (GdkRGBA) { 0, 0, 0, 1 };
}
GtkWidget *
@@ -224,7 +223,6 @@ do_paint (GtkWidget *toplevel)
if (!window)
{
GtkWidget *draw_area, *headerbar, *colorbutton;
const GdkRGBA draw_rgba = { 0, 0, 0, 1 };
window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
@@ -239,7 +237,7 @@ do_paint (GtkWidget *toplevel)
g_signal_connect (colorbutton, "color-set",
G_CALLBACK (color_button_color_set), draw_area);
gtk_color_chooser_set_rgba (GTK_COLOR_CHOOSER (colorbutton),
&draw_rgba);
&(GdkRGBA) { 0, 0, 0, 1 });
gtk_header_bar_pack_end (GTK_HEADER_BAR (headerbar), colorbutton);
gtk_window_set_titlebar (GTK_WINDOW (window), headerbar);
+1
View File
@@ -63,6 +63,7 @@ uninstall-update-icon-cache:
EXTRA_DIST += \
widget-factory.ui \
widget-factory.css \
menus.ui \
help-overlay.ui \
widget-factory.gresource.xml \
data/source.svg \
+19
View File
@@ -0,0 +1,19 @@
<?xml version="1.0" encoding="UTF-8"?>
<interface>
<!-- interface-requires gtk+ 3.0 -->
<menu id="app-menu">
<section>
<item>
<attribute name="label" translatable="yes">About</attribute>
<attribute name="action">app.about</attribute>
</item>
</section>
<section>
<item>
<attribute name="label" translatable="yes">_Quit</attribute>
<attribute name="action">app.quit</attribute>
<attribute name="accel">&lt;Primary&gt;q</attribute>
</item>
</section>
</menu>
</interface>
@@ -6,6 +6,9 @@
<gresource prefix="/org/gtk/WidgetFactory">
<file>widget-factory.css</file>
</gresource>
<gresource prefix="/org/gtk/WidgetFactory/gtk">
<file preprocess="xml-stripblanks">menus.ui</file>
</gresource>
<gresource prefix="/org/gtk/WidgetFactory/gtk">
<file preprocess="xml-stripblanks">help-overlay.ui</file>
</gresource>
-10
View File
@@ -16,16 +16,6 @@
<attribute name="action">win.transition</attribute>
</item>
</section>
<section>
<item>
<attribute name="label" translatable="yes">_Keyboard Shortcuts</attribute>
<attribute name="action">win.show-help-overlay</attribute>
</item>
<item>
<attribute name="label" translatable="yes">_About Widget Factory</attribute>
<attribute name="action">app.about</attribute>
</item>
</section>
</menu>
<menu id="dinner_menu">
<section>
-1
View File
@@ -1124,7 +1124,6 @@ gdk_x11_get_default_screen
gdk_x11_get_default_xdisplay
gdk_x11_grab_server
gdk_x11_ungrab_server
gdk_x11_get_parent_relative_pattern
gdk_x11_cursor_get_xcursor
gdk_x11_cursor_get_xdisplay
gdk_x11_keymap_get_group_for_state
+2 -2
View File
@@ -34,12 +34,12 @@ EXTRA_DIST += \
gdkversionmacros.h.in
GDK_CFLAGS_DEFINES = \
-DG_LOG_DOMAIN=\"Gdk\" \
-DG_LOG_USE_STRUCTURED=1 \
-DGDK_COMPILATION
AM_CPPFLAGS = \
-DG_LOG_DOMAIN=\"Gdk\" \
$(GDK_CFLAGS_DEFINES) \
-I$(top_builddir) \
-I$(top_builddir)/gdk \
@@ -534,7 +534,7 @@ GdkWin32_3_0_gir_MSVC_CFLAGS = $(BASE_MSVC_GIR_CFLAGS)
GdkWin32_3_0_gir_MSVC_SCANNERFLAGS = \
--identifier-prefix=Gdk \
--c-include="gdk/gdkwin32.h" \
--include-uninstalled='./vs$$$$(VSVER)/$$$$(CFG)/$$$$(PLAT)/bin/Gdk-3.0.gir'
--include-uninstalled=./Gdk-3.0.gir
include $(top_srcdir)/build/Makefile.msvc-introspection
-1
View File
@@ -62,6 +62,5 @@ GDK_AVAILABLE_IN_ALL
GdkPrivateVTable * gdk__private__ (void);
gboolean gdk_running_in_sandbox (void);
gboolean gdk_should_use_portal (void);
#endif /* __GDK__PRIVATE_H__ */
+6 -19
View File
@@ -471,27 +471,14 @@ gdk_display_open_default (void)
gboolean
gdk_running_in_sandbox (void)
{
return g_file_test ("/.flatpak-info", G_FILE_TEST_EXISTS);
}
char *path;
gboolean ret;
gboolean
gdk_should_use_portal (void)
{
static const char *use_portal = NULL;
path = g_build_filename (g_get_user_runtime_dir (), "flatpak-info", NULL);
ret = g_file_test (path, G_FILE_TEST_EXISTS);
g_free (path);
if (G_UNLIKELY (use_portal == NULL))
{
if (gdk_running_in_sandbox ())
use_portal = "1";
else
{
use_portal = g_getenv ("GTK_USE_PORTAL");
if (!use_portal)
use_portal = "";
}
}
return use_portal[0] == '1';
return ret;
}
/**
+1 -1
View File
@@ -224,7 +224,7 @@ GType gdk_cursor_get_type (void) G_GNUC_CONST;
GDK_AVAILABLE_IN_ALL
GdkCursor* gdk_cursor_new_for_display (GdkDisplay *display,
GdkCursorType cursor_type);
GDK_DEPRECATED_IN_3_16_FOR(gdk_cursor_new_for_display)
GDK_DEPRECATED_IN_3_16
GdkCursor* gdk_cursor_new (GdkCursorType cursor_type);
GDK_AVAILABLE_IN_ALL
GdkCursor* gdk_cursor_new_from_pixbuf (GdkDisplay *display,
-10
View File
@@ -1257,11 +1257,6 @@ _gdk_display_has_touch_grab (GdkDisplay *display,
{
guint i;
g_return_val_if_fail (display, NULL);
if (!display->touch_implicit_grabs)
return NULL;
for (i = 0; i < display->touch_implicit_grabs->len; i++)
{
GdkTouchGrabInfo *info;
@@ -1323,11 +1318,6 @@ _gdk_display_check_grab_ownership (GdkDisplay *display,
GdkGrabOwnership higher_ownership, device_ownership;
gboolean device_is_keyboard;
g_return_val_if_fail (display, TRUE);
if (!display->device_grabs)
return TRUE; /* No hash table, no grabs. */
g_hash_table_iter_init (&iter, display->device_grabs);
higher_ownership = device_ownership = GDK_OWNERSHIP_NONE;
device_is_keyboard = (gdk_device_get_source (device) == GDK_SOURCE_KEYBOARD);
+1 -1
View File
@@ -62,7 +62,7 @@ G_BEGIN_DECLS
#define GDK_PRIORITY_EVENTS (G_PRIORITY_DEFAULT)
/**
* GDK_PRIORITY_REDRAW: (value 120)
* GDK_PRIORITY_REDRAW:
*
* This is the priority that the idle handler processing window updates
* is given in the
+8 -8
View File
@@ -149,7 +149,7 @@ parse_rgb_value (const gchar *str,
* - A RGBA color in the form “rgba(r,g,b,a)”
*
* Where “r”, “g”, “b” and “a” are respectively the red, green, blue and
* alpha color values. In the last two cases, “r”, “g”, and “b” are either integers
* alpha color values. In the last two cases, r g and b are either integers
* in the range 0 to 255 or percentage values in the range 0% to 100%, and
* a is a floating point value in the range 0 to 1.
*
@@ -333,18 +333,18 @@ gdk_rgba_equal (gconstpointer p1,
* @rgba: a #GdkRGBA
*
* Returns a textual specification of @rgba in the form
* `rgb(r,g,b)` or
* `rgba(r g,b,a)`,
* `rgb (r, g, b)` or
* `rgba (r, g, b, a)`,
* where “r”, “g”, “b” and “a” represent the red, green,
* blue and alpha values respectively. “r”, “g”, and “b” are
* represented as integers in the range 0 to 255, and “a”
* is represented as a floating point value in the range 0 to 1.
* blue and alpha values respectively. r, g, and b are
* represented as integers in the range 0 to 255, and a
* is represented as floating point value in the range 0 to 1.
*
* These string forms are string forms that are supported by
* These string forms are string forms those supported by
* the CSS3 colors module, and can be parsed by gdk_rgba_parse().
*
* Note that this string representation may lose some
* precision, since “r”, “g” and “b” are represented as 8-bit
* precision, since r, g and b are represented as 8-bit
* integers. If this is a concern, you should use a
* different representation.
*
+2 -3
View File
@@ -449,13 +449,12 @@ gdk_seat_tool_removed (GdkSeat *seat,
GdkDeviceTool *
gdk_seat_get_tool (GdkSeat *seat,
guint64 serial,
guint64 hw_id)
guint64 serial)
{
GdkSeatClass *seat_class;
g_return_val_if_fail (GDK_IS_SEAT (seat), NULL);
seat_class = GDK_SEAT_GET_CLASS (seat);
return seat_class->get_tool (seat, serial, hw_id);
return seat_class->get_tool (seat, serial);
}
+4 -4
View File
@@ -275,8 +275,7 @@ gdk_seat_default_get_slaves (GdkSeat *seat,
static GdkDeviceTool *
gdk_seat_default_get_tool (GdkSeat *seat,
guint64 serial,
guint64 hw_id)
guint64 serial)
{
GdkSeatDefaultPrivate *priv;
GdkDeviceTool *tool;
@@ -291,7 +290,7 @@ gdk_seat_default_get_tool (GdkSeat *seat,
{
tool = g_ptr_array_index (priv->tools, i);
if (tool->serial == serial && tool->hw_id == hw_id)
if (tool->serial == serial)
return tool;
}
@@ -437,7 +436,8 @@ gdk_seat_default_remove_tool (GdkSeatDefault *seat,
priv = gdk_seat_default_get_instance_private (seat);
if (tool != gdk_seat_get_tool (GDK_SEAT (seat), tool->serial, tool->hw_id))
if (tool != gdk_seat_get_tool (GDK_SEAT (seat),
gdk_device_tool_get_serial (tool)))
return;
g_signal_emit_by_name (seat, "tool-removed", tool);
+2 -4
View File
@@ -57,8 +57,7 @@ struct _GdkSeatClass
GdkSeatCapabilities capabilities);
GdkDeviceTool * (* get_tool) (GdkSeat *seat,
guint64 serial,
guint64 tool_id);
guint64 serial);
};
void gdk_seat_device_added (GdkSeat *seat,
@@ -73,7 +72,6 @@ void gdk_seat_tool_removed (GdkSeat *seat,
GdkDeviceTool *
gdk_seat_get_tool (GdkSeat *seat,
guint64 serial,
guint64 hw_id);
guint64 serial);
#endif /* __GDK_SEAT_PRIVATE_H__ */
+6 -5
View File
@@ -6442,9 +6442,8 @@ G_GNUC_END_IGNORE_DEPRECATIONS
*
* Sets the background of @window.
*
* A background of %NULL means that the window won't have any background. On the
* X11 backend it's also possible to inherit the background from the parent
* window using gdk_x11_get_parent_relative_pattern().
* A background of %NULL means that the window will inherit its
* background from its parent window.
*
* The windowing system will normally fill a window with its background
* when the window is obscured then exposed.
@@ -6479,10 +6478,12 @@ gdk_window_set_background_pattern (GdkWindow *window,
* gdk_window_get_background_pattern:
* @window: a window
*
* Gets the pattern used to clear the background on @window.
* Gets the pattern used to clear the background on @window. If @window
* does not have its own background and reuses the parent's, %NULL is
* returned and youll have to query it yourself.
*
* Returns: (nullable) (transfer none): The pattern to use for the
* background or %NULL if there is no background.
* background or %NULL to use the parents background.
*
* Since: 2.22
*
+20 -78
View File
@@ -120,13 +120,6 @@
inMove = YES;
}
#ifdef AVAILABLE_MAC_OS_X_VERSION_10_12_AND_LATER
#define NSLeftMouseUp NSEventTypeLeftMouseUp
#define NSLeftMouseDragged NSEventTypeLeftMouseDragged
#define NSMouseEntered NSEventTypeMouseEntered
#endif
-(void)sendEvent:(NSEvent *)event
{
switch ([event type])
@@ -196,6 +189,7 @@
GdkWindow *window = [[self contentView] gdkWindow];
GdkEvent *event;
GdkWindowImplQuartz *impl = GDK_WINDOW_IMPL_QUARTZ (window->impl);
gboolean maximized = gdk_window_get_state (window) & GDK_WINDOW_STATE_MAXIMIZED;
/* In case the window is changed when maximized remove the maximized state */
@@ -226,6 +220,7 @@
NSRect content_rect = [self contentRectForFrameRect:[self frame]];
GdkWindow *window = [[self contentView] gdkWindow];
GdkEvent *event;
GdkWindowImplQuartz *impl = GDK_WINDOW_IMPL_QUARTZ (window->impl);
gboolean maximized = gdk_window_get_state (window) & GDK_WINDOW_STATE_MAXIMIZED;
/* see same in windowDidMove */
@@ -261,15 +256,7 @@
[self checkSendEnterNotify];
}
-(id)initWithContentRect:(NSRect)contentRect
#if MAC_OS_X_VERSION_MIN_REQUIRED < 101200
styleMask:(NSUInteger)styleMask
#else
styleMask:(NSWindowStyleMask)styleMask
#endif
backing:(NSBackingStoreType)backingType
defer:(BOOL)flag
screen:(NSScreen *)screen
-(id)initWithContentRect:(NSRect)contentRect styleMask:(NSUInteger)styleMask backing:(NSBackingStoreType)backingType defer:(BOOL)flag screen:(NSScreen *)screen
{
self = [super initWithContentRect:contentRect
styleMask:styleMask
@@ -380,46 +367,6 @@
initialPositionKnown = NO;
}
- (NSPoint)convertPointToScreen:(NSPoint)point
{
#if MAC_OS_X_VERSION_MAX_ALLOWED >= 101400
if (gdk_quartz_osx_version () >= GDK_OSX_MOJAVE)
{
return [super convertPointToScreen: point];
}
#endif
if (gdk_quartz_osx_version () >= GDK_OSX_LION)
{
NSRect inrect = NSMakeRect (point.x, point.y, 0.0, 0.0);
NSRect outrect = [self convertRectToScreen: inrect];
return (NSPoint)((CGRect)outrect).origin;
}
#if MAC_OS_X_VERSION_MIN_REQUIRED < 1070
return [self convertBaseToScreen:point];
#endif
}
- (NSPoint)convertPointFromScreen:(NSPoint)point
{
#if MAC_OS_X_VERSION_MAX_ALLOWED >= 101400
if (gdk_quartz_osx_version () >= GDK_OSX_MOJAVE)
{
return [super convertPointFromScreen: point];
}
#endif
if (gdk_quartz_osx_version () >= GDK_OSX_LION)
{
NSRect inrect = NSMakeRect (point.x, point.y, 0.0, 0.0);
NSRect outrect = [self convertRectFromScreen: inrect];
return (NSPoint)((CGRect)outrect).origin;
}
#if MAC_OS_X_VERSION_MIN_REQUIRED < 1070
return [self convertScreenToBase:point];
#endif
}
- (BOOL)trackManualMove
{
GdkWindow *window = [[self contentView] gdkWindow];
@@ -432,7 +379,7 @@
if (!inManualMove)
return NO;
currentLocation = [self convertPointToScreen:[self mouseLocationOutsideOfEventStream]];
currentLocation = [self convertBaseToScreen:[self mouseLocationOutsideOfEventStream]];
newOrigin.x = currentLocation.x - initialMoveLocation.x;
newOrigin.y = currentLocation.y - initialMoveLocation.y;
@@ -463,7 +410,7 @@
inManualMove = YES;
initialMoveLocation = [self convertPointToScreen:[self mouseLocationOutsideOfEventStream]];
initialMoveLocation = [self convertBaseToScreen:[self mouseLocationOutsideOfEventStream]];
initialMoveLocation.x -= frame.origin.x;
initialMoveLocation.y -= frame.origin.y;
}
@@ -479,7 +426,8 @@
return NO;
inTrackManualResize = YES;
mouse_location = [self convertPointToScreen:[self mouseLocationOutsideOfEventStream]];
mouse_location = [self convertBaseToScreen:[self mouseLocationOutsideOfEventStream]];
mdx = initialResizeLocation.x - mouse_location.x;
mdy = initialResizeLocation.y - mouse_location.y;
@@ -564,7 +512,7 @@
resizeEdge = edge;
initialResizeFrame = [self frame];
initialResizeLocation = [self convertPointToScreen:[self mouseLocationOutsideOfEventStream]];
initialResizeLocation = [self convertBaseToScreen:[self mouseLocationOutsideOfEventStream]];
}
@@ -630,7 +578,7 @@ update_context_from_dragging_info (id <NSDraggingInfo> sender)
- (NSDragOperation)draggingEntered:(id <NSDraggingInfo>)sender
{
GdkSeat *seat = NULL;
GdkDeviceManager *device_manager;
GdkEvent *event;
GdkWindow *window;
@@ -644,8 +592,10 @@ update_context_from_dragging_info (id <NSDraggingInfo> sender)
current_context->display = gdk_window_get_display (window);
seat = gdk_display_get_default_seat (gdk_display_get_default ());
gdk_drag_context_set_device (current_context, gdk_seat_get_pointer (seat));
device_manager = gdk_display_get_device_manager (gdk_display_get_default ());
gdk_drag_context_set_device (current_context,
gdk_device_manager_get_client_pointer (device_manager));
event = gdk_event_new (GDK_DRAG_ENTER);
event->dnd.window = g_object_ref (window);
event->dnd.send_event = FALSE;
@@ -697,7 +647,7 @@ update_context_from_dragging_info (id <NSDraggingInfo> sender)
- (NSDragOperation)draggingUpdated:(id <NSDraggingInfo>)sender
{
NSPoint point = [sender draggingLocation];
NSPoint screen_point = [self convertPointToScreen:point];
NSPoint screen_point = [self convertBaseToScreen:point];
GdkEvent *event;
int gx, gy;
@@ -725,7 +675,7 @@ update_context_from_dragging_info (id <NSDraggingInfo> sender)
- (BOOL)performDragOperation:(id <NSDraggingInfo>)sender
{
NSPoint point = [sender draggingLocation];
NSPoint screen_point = [self convertPointToScreen:point];
NSPoint screen_point = [self convertBaseToScreen:point];
GdkEvent *event;
int gy, gx;
@@ -811,27 +761,17 @@ update_context_from_dragging_info (id <NSDraggingInfo> sender)
}
#ifdef AVAILABLE_MAC_OS_X_VERSION_10_7_AND_LATER
#if MAC_OS_X_VERSION_MIN_REQUIRED < 101200
typedef enum
{
GDK_QUARTZ_FULL_SCREEN_MASK = NSFullScreenWindowMask,
} GdkQuartzFullScreen;
#else
typedef enum
{
GDK_QUARTZ_FULL_SCREEN_MASK = NSWindowStyleMaskFullScreen,
} GdkQuartzFullScreen;
#endif
- (void)setStyleMask:(NSUInteger)styleMask
{
gboolean was_fullscreen;
gboolean is_fullscreen;
was_fullscreen = (([self styleMask] & GDK_QUARTZ_FULL_SCREEN_MASK) != 0);
was_fullscreen = (([self styleMask] & NSFullScreenWindowMask) != 0);
[super setStyleMask:styleMask];
is_fullscreen = (([self styleMask] & GDK_QUARTZ_FULL_SCREEN_MASK) != 0);
is_fullscreen = (([self styleMask] & NSFullScreenWindowMask) != 0);
if (was_fullscreen != is_fullscreen)
_gdk_quartz_window_update_fullscreen_state ([[self contentView] gdkWindow]);
@@ -860,6 +800,7 @@ typedef enum
{
NSRect screenFrame = [[self screen] visibleFrame];
GdkWindow *window = [[self contentView] gdkWindow];
GdkWindowImplQuartz *impl = GDK_WINDOW_IMPL_QUARTZ (window->impl);
gboolean maximized = gdk_window_get_state (window) & GDK_WINDOW_STATE_MAXIMIZED;
if (!maximized)
@@ -873,6 +814,7 @@ typedef enum
{
GdkWindow *window = [[self contentView] gdkWindow];
GdkWindowImplQuartz *impl = GDK_WINDOW_IMPL_QUARTZ (window->impl);
gboolean maximized = gdk_window_get_state (window) & GDK_WINDOW_STATE_MAXIMIZED;
if (maximized)
+1 -2
View File
@@ -53,8 +53,7 @@
#ifdef AVAILABLE_MAC_OS_X_VERSION_10_7_AND_LATER
-(void)setStyleMask:(NSUInteger)styleMask;
#endif
- (NSPoint)convertPointToScreen:(NSPoint)point;
- (NSPoint)convertPointFromScreen:(NSPoint)point;
@end
+3 -5
View File
@@ -17,7 +17,6 @@
* License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
#include <AvailabilityMacros.h>
#include "config.h"
#import "GdkQuartzView.h"
#include "gdkquartzwindow.h"
@@ -124,6 +123,7 @@
-(void)unmarkText
{
GDK_NOTE (EVENTS, g_message ("unmarkText"));
gchar *prev_str;
markedRange = selectedRange = NSMakeRange (NSNotFound, 0);
g_object_set_data_full (G_OBJECT (gdk_window), TIC_MARKED_TEXT, NULL, g_free);
@@ -133,6 +133,7 @@
{
GDK_NOTE (EVENTS, g_message ("setMarkedText"));
const char *str;
gchar *prev_str;
if (replacementRange.location == NSNotFound)
{
@@ -182,6 +183,7 @@
GDK_NOTE (EVENTS, g_message ("insertText"));
const char *str;
NSString *string;
gchar *prev_str;
if ([self hasMarkedText])
[self unmarkText];
@@ -199,12 +201,8 @@
/* discard invalid text input with Chinese input methods */
str = "";
[self unmarkText];
#if MAC_OS_X_VERSION_MIN_REQUIRED < 1060
NSInputManager *currentInputManager = [NSInputManager currentInputManager];
[currentInputManager markedTextAbandoned:self];
#else
[[NSTextInputContext currentInputContext] discardMarkedText];
#endif
}
else
{
+1 -1
View File
@@ -130,7 +130,7 @@ gdk_quartz_device_core_get_state (GdkDevice *device,
{
gint x_int, y_int;
gdk_window_get_device_position (window, device, &x_int, &y_int, mask);
gdk_window_get_pointer (window, &x_int, &y_int, mask);
if (axes)
{
@@ -22,7 +22,6 @@
#include <gdk/gdkdeviceprivate.h>
#include <gdk/gdkseatdefaultprivate.h>
#include <gdk/gdkdevicemanagerprivate.h>
#include <gdk/gdkdisplayprivate.h>
#include "gdkdevicemanager-core-quartz.h"
#include "gdkquartzdevice-core.h"
#include "gdkkeysyms.h"
+35 -218
View File
@@ -20,7 +20,6 @@
#include <gdk/gdk.h>
#include <gdk/gdkdisplayprivate.h>
#include <gdk/gdkmonitorprivate.h>
#include "gdkprivate-quartz.h"
#include "gdkquartzscreen.h"
@@ -30,18 +29,15 @@
#include "gdkscreen.h"
#include "gdkmonitorprivate.h"
#include "gdkdisplay-quartz.h"
#include "gdkmonitor-quartz.h"
static gint MONITORS_CHANGED = 0;
static void display_reconfiguration_callback (CGDirectDisplayID display,
CGDisplayChangeSummaryFlags flags,
void *data);
static GdkWindow *
gdk_quartz_display_get_default_group (GdkDisplay *display)
{
/* X11-only. */
g_return_val_if_fail (GDK_IS_DISPLAY (display), NULL);
/* FIXME: Implement */
return NULL;
}
@@ -114,49 +110,51 @@ gdk_quartz_display_beep (GdkDisplay *display)
static void
gdk_quartz_display_sync (GdkDisplay *display)
{
/* Not needed. */
/* Not supported. */
}
static void
gdk_quartz_display_flush (GdkDisplay *display)
{
/* Not needed. */
/* Not supported. */
}
static gboolean
gdk_quartz_display_supports_selection_notification (GdkDisplay *display)
{
g_return_val_if_fail (GDK_IS_DISPLAY (display), FALSE);
/* X11-only. */
/* FIXME: Implement */
return FALSE;
}
static gboolean
gdk_quartz_display_request_selection_notification (GdkDisplay *display,
GdkAtom selection)
{
/* X11-only. */
/* FIXME: Implement */
return FALSE;
}
static gboolean
gdk_quartz_display_supports_clipboard_persistence (GdkDisplay *display)
{
/* X11-only */
/* FIXME: Implement */
return FALSE;
}
static gboolean
gdk_quartz_display_supports_shapes (GdkDisplay *display)
{
/* Not needed, nothing ever calls this.*/
/* FIXME: Implement */
return FALSE;
}
static gboolean
gdk_quartz_display_supports_input_shapes (GdkDisplay *display)
{
/* Not needed, nothign ever calls this. */
/* FIXME: Implement */
return FALSE;
}
@@ -167,23 +165,20 @@ gdk_quartz_display_store_clipboard (GdkDisplay *display,
const GdkAtom *targets,
gint n_targets)
{
/* MacOS persists pasteboard items automatically, no application
* action is required.
*/
/* FIXME: Implement */
}
static gboolean
gdk_quartz_display_supports_composite (GdkDisplay *display)
{
/* X11-only. */
/* FIXME: Implement */
return FALSE;
}
static gulong
gdk_quartz_display_get_next_serial (GdkDisplay *display)
{
/* X11-only. */
return 0;
}
@@ -191,141 +186,26 @@ static void
gdk_quartz_display_notify_startup_complete (GdkDisplay *display,
const gchar *startup_id)
{
/* This should call finishLaunching, but doing so causes Quartz to throw
* "_createMenuRef called with existing principal MenuRef already"
* " associated with menu".
[NSApp finishLaunching];
*/
/* FIXME: Implement? */
}
static void
gdk_quartz_display_push_error_trap (GdkDisplay *display)
{
/* X11-only. */
}
static gint
gdk_quartz_display_pop_error_trap (GdkDisplay *display, gboolean ignore)
{
/* X11 only. */
return 0;
}
/* The display monitor list comprises all of the CGDisplays connected
to the system, some of which may not be drawable either because
they're asleep or are mirroring another monitor. The NSScreens
array contains only the monitors that are currently drawable and we
use the index of the screens array placing GdkNSViews, so we'll use
the same for determining the number of monitors and indexing them.
*/
int
get_active_displays (CGDirectDisplayID **screens)
{
unsigned int displays = 0;
CGGetActiveDisplayList (0, NULL, &displays);
if (screens)
{
*screens = g_new0 (CGDirectDisplayID, displays);
CGGetActiveDisplayList (displays, *screens, &displays);
}
return displays;
}
static void
configure_monitor (GdkMonitor *monitor)
{
GdkQuartzMonitor *quartz_monitor = GDK_QUARTZ_MONITOR (monitor);
CGSize disp_size = CGDisplayScreenSize (quartz_monitor->id);
gint width = (int)trunc (disp_size.width);
gint height = (int)trunc (disp_size.height);
CGRect disp_bounds = CGDisplayBounds (quartz_monitor->id);
GdkRectangle disp_geometry = {(int)trunc (disp_bounds.origin.x),
(int)trunc (disp_bounds.origin.y),
(int)trunc (disp_bounds.size.width),
(int)trunc (disp_bounds.size.height)};
CGDisplayModeRef mode = CGDisplayCopyDisplayMode (quartz_monitor->id);
gint refresh_rate = (int)trunc (CGDisplayModeGetRefreshRate (mode));
monitor->width_mm = width;
monitor->height_mm = height;
monitor->geometry = disp_geometry;
#if MAC_OS_X_VERSION_MAX_ALLOWED >= 1080
if (mode && gdk_quartz_osx_version () >= GDK_OSX_MOUNTAIN_LION)
{
monitor->scale_factor = CGDisplayModeGetPixelWidth (mode) / CGDisplayModeGetWidth (mode);
CGDisplayModeRelease (mode);
}
else
#endif
monitor->scale_factor = 1;
monitor->refresh_rate = refresh_rate;
monitor->subpixel_layout = GDK_SUBPIXEL_LAYOUT_UNKNOWN;
}
static void
display_reconfiguration_callback (CGDirectDisplayID cg_display,
CGDisplayChangeSummaryFlags flags,
void *data)
{
GdkQuartzDisplay *display = data;
GdkQuartzMonitor *monitor;
/* Ignore the begin configuration signal. */
if (flags & kCGDisplayBeginConfigurationFlag)
return;
if (flags & (kCGDisplayMovedFlag | kCGDisplayAddFlag | kCGDisplayEnabledFlag |
kCGDisplaySetMainFlag | kCGDisplayDesktopShapeChangedFlag |
kCGDisplayMirrorFlag | kCGDisplayUnMirrorFlag))
{
monitor = g_hash_table_lookup (display->monitors,
GINT_TO_POINTER (cg_display));
if (!monitor)
{
monitor = g_object_new (GDK_TYPE_QUARTZ_MONITOR,
"display", display, NULL);
monitor->id = cg_display;
g_hash_table_insert (display->monitors, GINT_TO_POINTER (monitor->id),
monitor);
gdk_display_monitor_added (GDK_DISPLAY (display),
GDK_MONITOR (monitor));
}
configure_monitor (GDK_MONITOR (monitor));
}
else if (flags & (kCGDisplayRemoveFlag | kCGDisplayDisabledFlag))
{
GdkMonitor *monitor = g_hash_table_lookup (display->monitors,
GINT_TO_POINTER (cg_display));
gdk_display_monitor_removed (GDK_DISPLAY (display),
GDK_MONITOR (monitor));
g_hash_table_remove (display->monitors, GINT_TO_POINTER (cg_display));
}
g_signal_emit (display, MONITORS_CHANGED, 0);
}
static int
gdk_quartz_display_get_n_monitors (GdkDisplay *display)
{
return get_active_displays (NULL);
GdkQuartzDisplay *quartz_display = GDK_QUARTZ_DISPLAY (display);
return quartz_display->monitors->len;
}
static GdkMonitor *
gdk_quartz_display_get_monitor (GdkDisplay *display,
int monitor_num)
{
GdkQuartzDisplay *quartz_display = GDK_QUARTZ_DISPLAY (display);
CGDirectDisplayID *screens = NULL;
int count = get_active_displays (&screens);
if (monitor_num >= 0 && monitor_num < count)
return g_hash_table_lookup (quartz_display->monitors,
GINT_TO_POINTER (screens[monitor_num]));
if (0 <= monitor_num || monitor_num < quartz_display->monitors->len)
return (GdkMonitor *)quartz_display->monitors->pdata[monitor_num];
return NULL;
}
@@ -334,23 +214,8 @@ static GdkMonitor *
gdk_quartz_display_get_primary_monitor (GdkDisplay *display)
{
GdkQuartzDisplay *quartz_display = GDK_QUARTZ_DISPLAY (display);
CGDirectDisplayID primary_id = CGMainDisplayID ();
return g_hash_table_lookup (quartz_display->monitors,
GINT_TO_POINTER (primary_id));
}
static GdkMonitor *
gdk_quartz_display_get_monitor_at_window (GdkDisplay *display,
GdkWindow *window)
{
GdkWindowImplQuartz *impl = GDK_WINDOW_IMPL_QUARTZ (window->impl);
NSWindow *nswindow = impl->toplevel;
NSScreen *screen = [nswindow screen];
CGDirectDisplayID id = [[[screen deviceDescription]
objectForKey: @"NSScreenNumber"] unsignedIntValue];
return g_hash_table_lookup (GDK_QUARTZ_DISPLAY (display)->monitors,
GINT_TO_POINTER (id));
return quartz_display->monitors->pdata[0];
}
G_DEFINE_TYPE (GdkQuartzDisplay, gdk_quartz_display, GDK_TYPE_DISPLAY)
@@ -358,26 +223,11 @@ G_DEFINE_TYPE (GdkQuartzDisplay, gdk_quartz_display, GDK_TYPE_DISPLAY)
static void
gdk_quartz_display_init (GdkQuartzDisplay *display)
{
uint32_t max_displays = 0, disp;
CGDirectDisplayID *displays;
GDK_QUARTZ_ALLOC_POOL;
CGGetActiveDisplayList (0, NULL, &max_displays);
display->monitors = g_hash_table_new_full (g_direct_hash, NULL,
NULL, g_object_unref);
displays = g_new0 (CGDirectDisplayID, max_displays);
CGGetActiveDisplayList (max_displays, displays, &max_displays);
for (disp = 0; disp < max_displays; ++disp)
{
GdkQuartzMonitor *monitor = g_object_new (GDK_TYPE_QUARTZ_MONITOR,
"display", display, NULL);
monitor->id = displays[disp];
g_hash_table_insert (display->monitors, GINT_TO_POINTER (monitor->id),
monitor);
configure_monitor (GDK_MONITOR (monitor));
}
CGDisplayRegisterReconfigurationCallback (display_reconfiguration_callback,
display);
g_signal_emit (display, MONITORS_CHANGED, 0);
display->monitors = g_ptr_array_new_with_free_func (g_object_unref);
GDK_QUARTZ_RELEASE_POOL;
}
static void
@@ -385,9 +235,7 @@ gdk_quartz_display_dispose (GObject *object)
{
GdkQuartzDisplay *display_quartz = GDK_QUARTZ_DISPLAY (object);
g_hash_table_destroy (display_quartz->monitors);
CGDisplayRemoveReconfigurationCallback (display_reconfiguration_callback,
display_quartz);
g_ptr_array_free (display_quartz->monitors, TRUE);
G_OBJECT_CLASS (gdk_quartz_display_parent_class)->dispose (object);
}
@@ -414,28 +262,24 @@ gdk_quartz_display_class_init (GdkQuartzDisplayClass *class)
display_class->beep = gdk_quartz_display_beep;
display_class->sync = gdk_quartz_display_sync;
display_class->flush = gdk_quartz_display_flush;
display_class->has_pending = _gdk_quartz_display_has_pending;
display_class->queue_events = _gdk_quartz_display_queue_events;
display_class->has_pending = _gdk_quartz_display_has_pending;
display_class->get_default_group = gdk_quartz_display_get_default_group;
display_class->supports_selection_notification = gdk_quartz_display_supports_selection_notification;
display_class->request_selection_notification = gdk_quartz_display_request_selection_notification;
display_class->supports_clipboard_persistence = gdk_quartz_display_supports_clipboard_persistence;
display_class->store_clipboard = gdk_quartz_display_store_clipboard;
display_class->supports_shapes = gdk_quartz_display_supports_shapes;
display_class->supports_input_shapes = gdk_quartz_display_supports_input_shapes;
display_class->supports_composite = gdk_quartz_display_supports_composite;
display_class->supports_cursor_alpha = _gdk_quartz_display_supports_cursor_alpha;
display_class->supports_cursor_color = _gdk_quartz_display_supports_cursor_color;
display_class->supports_clipboard_persistence = gdk_quartz_display_supports_clipboard_persistence;
display_class->store_clipboard = gdk_quartz_display_store_clipboard;
display_class->get_default_cursor_size = _gdk_quartz_display_get_default_cursor_size;
display_class->get_maximal_cursor_size = _gdk_quartz_display_get_maximal_cursor_size;
display_class->get_cursor_for_type = _gdk_quartz_display_get_cursor_for_type;
display_class->get_cursor_for_name = _gdk_quartz_display_get_cursor_for_name;
display_class->get_cursor_for_surface = _gdk_quartz_display_get_cursor_for_surface;
display_class->get_default_cursor_size = _gdk_quartz_display_get_default_cursor_size;
display_class->get_maximal_cursor_size = _gdk_quartz_display_get_maximal_cursor_size;
display_class->supports_cursor_alpha = _gdk_quartz_display_supports_cursor_alpha;
display_class->supports_cursor_color = _gdk_quartz_display_supports_cursor_color;
/* display_class->get_app_launch_context = NULL; Has default. */
display_class->before_process_all_updates = _gdk_quartz_display_before_process_all_updates;
display_class->after_process_all_updates = _gdk_quartz_display_after_process_all_updates;
display_class->get_next_serial = gdk_quartz_display_get_next_serial;
@@ -444,42 +288,15 @@ gdk_quartz_display_class_init (GdkQuartzDisplayClass *class)
display_class->event_data_free = _gdk_quartz_display_event_data_free;
display_class->create_window_impl = _gdk_quartz_display_create_window_impl;
display_class->get_keymap = _gdk_quartz_display_get_keymap;
display_class->push_error_trap = gdk_quartz_display_push_error_trap;
display_class->pop_error_trap = gdk_quartz_display_pop_error_trap;
display_class->get_selection_owner = _gdk_quartz_display_get_selection_owner;
display_class->set_selection_owner = _gdk_quartz_display_set_selection_owner;
display_class->send_selection_notify = NULL; /* Ignore. X11 stuff removed in master. */
display_class->get_selection_property = _gdk_quartz_display_get_selection_property;
display_class->convert_selection = _gdk_quartz_display_convert_selection;
display_class->text_property_to_utf8_list = _gdk_quartz_display_text_property_to_utf8_list;
display_class->utf8_to_string_target = _gdk_quartz_display_utf8_to_string_target;
/* display_class->get_default_seat; The parent class default works fine. */
display_class->get_n_monitors = gdk_quartz_display_get_n_monitors;
display_class->get_monitor = gdk_quartz_display_get_monitor;
display_class->get_primary_monitor = gdk_quartz_display_get_primary_monitor;
display_class->get_monitor_at_window = gdk_quartz_display_get_monitor_at_window;
/**
* GdkQuartzDisplay::monitors-changed:
* @display: The object on which the signal is emitted
*
* The ::monitors-changed signal is emitted whenever the arrangement
* of the monitors changes, either because of the addition or
* removal of a monitor or because of some other configuration
* change in System Preferences>Displays including a resolution
* change or a position change. Note that enabling or disabling
* mirroring will result in the addition or removal of the mirror
* monitor(s).
*/
MONITORS_CHANGED =
g_signal_new (g_intern_static_string ("monitors-changed"),
G_OBJECT_CLASS_TYPE (object_class),
G_SIGNAL_RUN_LAST | G_SIGNAL_NO_RECURSE | G_SIGNAL_NO_HOOKS,
0, NULL, NULL, NULL,
G_TYPE_NONE, 0, NULL);
ProcessSerialNumber psn = { 0, kCurrentProcess };
+123 -1
View File
@@ -32,7 +32,119 @@ G_BEGIN_DECLS
struct _GdkQuartzDisplay
{
GdkDisplay parent_instance;
GHashTable *monitors;
/*Display *xdisplay;
GdkScreen *screen;
GList *screens;
GSource *event_source;
gint grab_count;
*/
/* Visual infos for creating Windows */
/*int window_depth;
Visual *window_visual;
Colormap window_colormap;
*/
/* Keyboard related information */
/*gint xkb_event_type;
gboolean use_xkb;
*/
/* Whether we were able to turn on detectable-autorepeat using
* XkbSetDetectableAutorepeat. If FALSE, we'll fall back
* to checking the next event with XPending().
*/
/*gboolean have_xkb_autorepeat;
GdkKeymap *keymap;
guint keymap_serial;
gboolean have_xfixes;
gint xfixes_event_base;
gboolean have_xcomposite;
gboolean have_xdamage;
gint xdamage_event_base;
gboolean have_randr12;
gboolean have_randr13;
gboolean have_randr15;
gint xrandr_event_base;
*/
/* If the SECURITY extension is in place, whether this client holds
* a trusted authorization and so is allowed to make various requests
* (grabs, properties etc.) Otherwise always TRUE.
*/
/*gboolean trusted_client;
*/
/* drag and drop information */
/*GdkDragContext *current_dest_drag;
*/
/* Mapping to/from virtual atoms */
/*GHashTable *atom_from_virtual;
GHashTable *atom_to_virtual;
*/
/* Session Management leader window see ICCCM */
/*Window leader_window;
GdkWindow *leader_gdk_window;
gboolean leader_window_title_set;
*/
/* List of functions to go from extension event => X window */
/*GSList *event_types;
*/
/* X ID hashtable */
/*GHashTable *xid_ht;
*/
/* translation queue */
/*GQueue *translate_queue;
*/
/* input GdkWindow list */
/*GList *input_windows;
*/
GPtrArray *monitors;
/* Startup notification */
/*gchar *startup_notification_id;
*/
/* Time of most recent user interaction. */
/*gulong user_time;
*/
/* Sets of atoms for DND */
/*guint base_dnd_atoms_precached : 1;
guint xdnd_atoms_precached : 1;
guint motif_atoms_precached : 1;
guint use_sync : 1;
guint have_shapes : 1;
guint have_input_shapes : 1;
gint shape_event_base;
GSList *error_traps;
gint wm_moveresize_button;
*/
/* GLX information */
/*gint glx_version;
gint glx_error_base;
gint glx_event_base;
*/
/* Translation between X server time and system-local monotonic time */
/*gint64 server_time_query_time;
gint64 server_time_offset;
*/
/*guint server_time_is_monotonic_time : 1;
guint have_glx : 1;
*/
/* GLX extensions we check */
/*guint has_glx_swap_interval : 1;
guint has_glx_create_context : 1;
guint has_glx_texture_from_pixmap : 1;
guint has_glx_video_sync : 1;
guint has_glx_buffer_age : 1;
guint has_glx_sync_control : 1;
guint has_glx_multisample : 1;
guint has_glx_visual_rating : 1;
guint has_glx_create_es2_context : 1;*/
};
struct _GdkQuartzDisplayClass
@@ -108,6 +220,16 @@ gint _gdk_quartz_display_text_property_to_utf8_list (GdkDisplay *disp
gchar ***list);
gchar * _gdk_quartz_display_utf8_to_string_target (GdkDisplay *displayt,
const gchar *str);
/*
GdkScreen *_gdk_x11_display_screen_for_xrootwin (GdkDisplay *display,
Window xrootwin);
void _gdk_x11_display_error_event (GdkDisplay *display,
XErrorEvent *error);
GdkFilterReturn _gdk_wm_protocols_filter (GdkXEvent *xev,
GdkEvent *event,
gpointer data);
*/
G_END_DECLS
#endif /* __GDK_QUARTZ_DISPLAY__ */
+1
View File
@@ -55,6 +55,7 @@ static void
gdk_quartz_display_manager_class_init (GdkQuartzDisplayManagerClass *class)
{
GObjectClass *object_class = G_OBJECT_CLASS (class);
GdkDisplayManagerClass *manager_class = GDK_DISPLAY_MANAGER_CLASS (class);
object_class->finalize = gdk_quartz_display_manager_finalize;
}
+3 -15
View File
@@ -292,19 +292,13 @@ select_thread_func (void *arg)
}
}
#if MAC_OS_X_VERSION_MIN_REQUIRED < 101200
#define GDK_QUARTZ_APPLICATION_DEFINED NSApplicationDefined
#else
#define GDK_QUARTZ_APPLICATION_DEFINED NSEventTypeApplicationDefined
#endif
static void
got_fd_activity (void *info)
{
NSEvent *event;
/* Post a message so we'll break out of the message loop */
event = [NSEvent otherEventWithType: GDK_QUARTZ_APPLICATION_DEFINED
event = [NSEvent otherEventWithType: NSApplicationDefined
location: NSZeroPoint
modifierFlags: 0
timestamp: 0
@@ -720,12 +714,6 @@ static GSourceFuncs event_funcs = {
********* Our Poll Function *********
************************************************************/
#if MAC_OS_X_VERSION_MIN_REQUIRED < 101200
#define GDK_QUARTZ_EVENT_MASK_ANY NSAnyEventMask
#else
#define GDK_QUARTZ_EVENT_MASK_ANY NSEventMaskAny
#endif
static gint
poll_func (GPollFD *ufds,
guint nfds,
@@ -751,7 +739,7 @@ poll_func (GPollFD *ufds,
limit_date = [NSDate dateWithTimeIntervalSinceNow:timeout_/1000.0];
getting_events++;
event = [NSApp nextEventMatchingMask: GDK_QUARTZ_EVENT_MASK_ANY
event = [NSApp nextEventMatchingMask: NSAnyEventMask
untilDate: limit_date
inMode: NSDefaultRunLoopMode
dequeue: YES];
@@ -770,7 +758,7 @@ poll_func (GPollFD *ufds,
n_ready = select_thread_collect_poll (ufds, nfds);
if (event &&
[event type] == GDK_QUARTZ_APPLICATION_DEFINED &&
[event type] == NSApplicationDefined &&
[event subtype] == GDK_QUARTZ_EVENT_SUBTYPE_EVENTLOOP)
{
/* Just used to wake us up; if an event and a FD arrived at the same
+157 -138
View File
@@ -35,7 +35,6 @@
#include "gdkquartzdisplay.h"
#include "gdkprivate-quartz.h"
#include "gdkquartzdevicemanager-core.h"
#include "gdkquartzkeys.h"
#define GRIP_WIDTH 15
#define GRIP_HEIGHT 15
@@ -129,8 +128,27 @@ _gdk_quartz_display_has_pending (GdkDisplay *display)
void
_gdk_quartz_events_break_all_grabs (guint32 time)
{
GdkSeat *seat = gdk_display_get_default_seat (_gdk_display);
gdk_seat_ungrab (seat);
GList *list, *l;
GdkDeviceManager *device_manager;
device_manager = gdk_display_get_device_manager (_gdk_display);
list = gdk_device_manager_list_devices (device_manager,
GDK_DEVICE_TYPE_MASTER);
for (l = list; l; l = l->next)
{
GdkDeviceGrabInfo *grab;
grab = _gdk_display_get_last_device_grab (_gdk_display, l->data);
if (grab)
{
grab->serial_end = 0;
grab->implicit_ungrab = TRUE;
}
_gdk_display_device_grab_update (_gdk_display, l->data, NULL, 0);
}
g_list_free (list);
}
static void
@@ -271,15 +289,15 @@ get_keyboard_modifiers_from_ns_flags (NSUInteger nsflags)
{
GdkModifierType modifiers = 0;
if (nsflags & GDK_QUARTZ_ALPHA_SHIFT_KEY_MASK)
if (nsflags & NSAlphaShiftKeyMask)
modifiers |= GDK_LOCK_MASK;
if (nsflags & GDK_QUARTZ_SHIFT_KEY_MASK)
if (nsflags & NSShiftKeyMask)
modifiers |= GDK_SHIFT_MASK;
if (nsflags & GDK_QUARTZ_CONTROL_KEY_MASK)
if (nsflags & NSControlKeyMask)
modifiers |= GDK_CONTROL_MASK;
if (nsflags & GDK_QUARTZ_ALTERNATE_KEY_MASK)
if (nsflags & NSAlternateKeyMask)
modifiers |= GDK_MOD1_MASK;
if (nsflags & GDK_QUARTZ_COMMAND_KEY_MASK)
if (nsflags & NSCommandKeyMask)
modifiers |= GDK_MOD2_MASK;
return modifiers;
@@ -297,31 +315,31 @@ get_event_mask_from_ns_event (NSEvent *nsevent)
{
switch ([nsevent type])
{
case GDK_QUARTZ_LEFT_MOUSE_DOWN:
case GDK_QUARTZ_RIGHT_MOUSE_DOWN:
case GDK_QUARTZ_OTHER_MOUSE_DOWN:
case NSLeftMouseDown:
case NSRightMouseDown:
case NSOtherMouseDown:
return GDK_BUTTON_PRESS_MASK;
case GDK_QUARTZ_LEFT_MOUSE_UP:
case GDK_QUARTZ_RIGHT_MOUSE_UP:
case GDK_QUARTZ_OTHER_MOUSE_UP:
case NSLeftMouseUp:
case NSRightMouseUp:
case NSOtherMouseUp:
return GDK_BUTTON_RELEASE_MASK;
case GDK_QUARTZ_MOUSE_MOVED:
case NSMouseMoved:
return GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK;
case GDK_QUARTZ_SCROLL_WHEEL:
case NSScrollWheel:
/* Since applications that want button press events can get
* scroll events on X11 (since scroll wheel events are really
* button press events there), we need to use GDK_BUTTON_PRESS_MASK too.
*/
return GDK_SCROLL_MASK | GDK_BUTTON_PRESS_MASK;
case GDK_QUARTZ_LEFT_MOUSE_DRAGGED:
case NSLeftMouseDragged:
return (GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK |
GDK_BUTTON_MOTION_MASK | GDK_BUTTON1_MOTION_MASK |
GDK_BUTTON1_MASK);
case GDK_QUARTZ_RIGHT_MOUSE_DRAGGED:
case NSRightMouseDragged:
return (GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK |
GDK_BUTTON_MOTION_MASK | GDK_BUTTON3_MOTION_MASK |
GDK_BUTTON3_MASK);
case GDK_QUARTZ_OTHER_MOUSE_DRAGGED:
case NSOtherMouseDragged:
{
GdkEventMask mask;
@@ -338,9 +356,9 @@ get_event_mask_from_ns_event (NSEvent *nsevent)
case NSEventTypeMagnify:
case NSEventTypeRotate:
return GDK_TOUCHPAD_GESTURE_MASK;
case GDK_QUARTZ_KEY_DOWN:
case GDK_QUARTZ_KEY_UP:
case GDK_QUARTZ_FLAGS_CHANGED:
case NSKeyDown:
case NSKeyUp:
case NSFlagsChanged:
{
switch (_gdk_quartz_keys_event_type (nsevent))
{
@@ -356,10 +374,10 @@ get_event_mask_from_ns_event (NSEvent *nsevent)
}
break;
case GDK_QUARTZ_MOUSE_ENTERED:
case NSMouseEntered:
return GDK_ENTER_NOTIFY_MASK;
case GDK_QUARTZ_MOUSE_EXITED:
case NSMouseExited:
return GDK_LEAVE_NOTIFY_MASK;
default:
@@ -376,10 +394,12 @@ get_window_point_from_screen_point (GdkWindow *window,
gint *y)
{
NSPoint point;
GdkQuartzNSWindow *nswindow;
NSWindow *nswindow;
nswindow = ((GdkWindowImplQuartz *)window->impl)->toplevel;
point = [nswindow convertScreenToBase:screen_point];
nswindow = (GdkQuartzNSWindow*)(((GdkWindowImplQuartz *)window->impl)->toplevel);
point = [nswindow convertPointFromScreen:screen_point];
*x = point.x;
*y = window->height - point.y;
}
@@ -389,12 +409,10 @@ is_mouse_button_press_event (NSEventType type)
{
switch (type)
{
case GDK_QUARTZ_LEFT_MOUSE_DOWN:
case GDK_QUARTZ_RIGHT_MOUSE_DOWN:
case GDK_QUARTZ_OTHER_MOUSE_DOWN:
case NSLeftMouseDown:
case NSRightMouseDown:
case NSOtherMouseDown:
return TRUE;
default:
return FALSE;
}
return FALSE;
@@ -455,7 +473,8 @@ get_toplevel_from_ns_event (NSEvent *nsevent,
}
else
{
*screen_point = [(GdkQuartzNSWindow*)[nsevent window] convertPointToScreen:point];
*screen_point = [[nsevent window] convertBaseToScreen:point];
*x = point.x;
*y = toplevel->height - point.y;
}
@@ -483,15 +502,15 @@ create_focus_event (GdkWindow *window,
gboolean in)
{
GdkEvent *event;
GdkDisplay *display = gdk_window_get_display (window);
GdkSeat *seat = gdk_display_get_default_seat (display);
GdkQuartzDeviceManagerCore *device_manager;
event = gdk_event_new (GDK_FOCUS_CHANGE);
event->focus_change.window = window;
event->focus_change.in = in;
gdk_event_set_device (event, gdk_seat_get_keyboard (seat));
gdk_event_set_seat (event, seat);
device_manager = GDK_QUARTZ_DEVICE_MANAGER_CORE (_gdk_display->device_manager);
gdk_event_set_device (event, device_manager->core_keyboard);
gdk_event_set_seat (event, gdk_device_get_seat (device_manager->core_keyboard));
return event;
}
@@ -503,8 +522,7 @@ generate_motion_event (GdkWindow *window)
NSPoint screen_point;
GdkEvent *event;
gint x, y, x_root, y_root;
GdkDisplay *display = gdk_window_get_display (window);
GdkSeat *seat = gdk_display_get_default_seat (display);
GdkQuartzDeviceManagerCore *device_manager;
event = gdk_event_new (GDK_MOTION_NOTIFY);
event->any.window = NULL;
@@ -526,8 +544,9 @@ generate_motion_event (GdkWindow *window)
event->motion.state = _gdk_quartz_events_get_current_keyboard_modifiers () |
_gdk_quartz_events_get_current_mouse_modifiers ();
event->motion.is_hint = FALSE;
event->motion.device = gdk_seat_get_pointer (seat);
gdk_event_set_seat (event, seat);
device_manager = GDK_QUARTZ_DEVICE_MANAGER_CORE (_gdk_display->device_manager);
event->motion.device = device_manager->core_pointer;
gdk_event_set_seat (event, gdk_device_get_seat (device_manager->core_pointer));
append_event (event, TRUE);
}
@@ -604,9 +623,8 @@ find_toplevel_under_pointer (GdkDisplay *display,
{
GdkWindow *toplevel;
GdkPointerWindowInfo *info;
GdkSeat *seat = gdk_display_get_default_seat (display);
info = _gdk_display_get_pointer_info (display, gdk_seat_get_pointer (seat));
info = _gdk_display_get_pointer_info (display, GDK_QUARTZ_DEVICE_MANAGER_CORE (display->device_manager)->core_pointer);
toplevel = info->toplevel_under_pointer;
if (toplevel && WINDOW_IS_TOPLEVEL (toplevel))
get_window_point_from_screen_point (toplevel, screen_point, x, y);
@@ -633,20 +651,24 @@ find_toplevel_for_keyboard_event (NSEvent *nsevent)
GdkWindow *window;
GdkDisplay *display;
GdkQuartzView *view;
GdkSeat *seat;
GdkDeviceManager *device_manager;
view = (GdkQuartzView *)[[nsevent window] contentView];
window = [view gdkWindow];
display = gdk_window_get_display (window);
seat = gdk_display_get_default_seat (display);
list = gdk_seat_get_slaves (seat, GDK_SEAT_CAPABILITY_KEYBOARD);
device_manager = gdk_display_get_device_manager (display);
list = gdk_device_manager_list_devices (device_manager,
GDK_DEVICE_TYPE_MASTER);
for (l = list; l; l = l->next)
{
GdkDeviceGrabInfo *grab;
GdkDevice *device = l->data;
if (gdk_device_get_source(device) != GDK_SOURCE_KEYBOARD)
continue;
grab = _gdk_display_get_last_device_grab (display, device);
if (grab && grab->window && !grab->owner_events)
{
@@ -670,13 +692,11 @@ find_toplevel_for_mouse_event (NSEvent *nsevent,
GdkWindow *toplevel;
GdkDisplay *display;
GdkDeviceGrabInfo *grab;
GdkSeat *seat;
toplevel = get_toplevel_from_ns_event (nsevent, &screen_point, x, y);
display = gdk_window_get_display (toplevel);
seat = gdk_display_get_default_seat (_gdk_display);
event_type = [nsevent type];
/* From the docs for XGrabPointer:
@@ -689,7 +709,7 @@ find_toplevel_for_mouse_event (NSEvent *nsevent,
* events are discarded.
*/
grab = _gdk_display_get_last_device_grab (display,
gdk_seat_get_pointer (seat));
GDK_QUARTZ_DEVICE_MANAGER_CORE (display->device_manager)->core_pointer);
if (WINDOW_IS_TOPLEVEL (toplevel) && grab)
{
/* Implicit grabs do not go through XGrabPointer and thus the
@@ -746,7 +766,7 @@ find_toplevel_for_mouse_event (NSEvent *nsevent,
* gdk gets confused about getting e.g. button presses with no
* window (the title bar is not known to it).
*/
if (event_type != GDK_QUARTZ_MOUSE_MOVED)
if (event_type != NSMouseMoved)
if (*y < 0)
return NULL;
@@ -801,23 +821,23 @@ find_window_for_ns_event (NSEvent *nsevent,
switch (event_type)
{
case GDK_QUARTZ_LEFT_MOUSE_DOWN:
case GDK_QUARTZ_RIGHT_MOUSE_DOWN:
case GDK_QUARTZ_OTHER_MOUSE_DOWN:
case GDK_QUARTZ_LEFT_MOUSE_UP:
case GDK_QUARTZ_RIGHT_MOUSE_UP:
case GDK_QUARTZ_OTHER_MOUSE_UP:
case GDK_QUARTZ_MOUSE_MOVED:
case GDK_QUARTZ_SCROLL_WHEEL:
case GDK_QUARTZ_LEFT_MOUSE_DRAGGED:
case GDK_QUARTZ_RIGHT_MOUSE_DRAGGED:
case GDK_QUARTZ_OTHER_MOUSE_DRAGGED:
case NSLeftMouseDown:
case NSRightMouseDown:
case NSOtherMouseDown:
case NSLeftMouseUp:
case NSRightMouseUp:
case NSOtherMouseUp:
case NSMouseMoved:
case NSScrollWheel:
case NSLeftMouseDragged:
case NSRightMouseDragged:
case NSOtherMouseDragged:
case NSEventTypeMagnify:
case NSEventTypeRotate:
return find_toplevel_for_mouse_event (nsevent, x, y);
case GDK_QUARTZ_MOUSE_ENTERED:
case GDK_QUARTZ_MOUSE_EXITED:
case NSMouseEntered:
case NSMouseExited:
/* Only handle our own entered/exited events, not the ones for the
* titlebar buttons.
*/
@@ -826,9 +846,9 @@ find_window_for_ns_event (NSEvent *nsevent,
else
return NULL;
case GDK_QUARTZ_KEY_DOWN:
case GDK_QUARTZ_KEY_UP:
case GDK_QUARTZ_FLAGS_CHANGED:
case NSKeyDown:
case NSKeyUp:
case NSFlagsChanged:
return find_toplevel_for_keyboard_event (nsevent);
default:
@@ -851,7 +871,7 @@ fill_crossing_event (GdkWindow *toplevel,
GdkCrossingMode mode,
GdkNotifyType detail)
{
GdkSeat *seat = gdk_display_get_default_seat (_gdk_display);
GdkQuartzDeviceManagerCore *device_manager;
event->any.type = event_type;
event->crossing.window = toplevel;
@@ -866,8 +886,9 @@ fill_crossing_event (GdkWindow *toplevel,
event->crossing.state = get_keyboard_modifiers_from_ns_event (nsevent) |
_gdk_quartz_events_get_current_mouse_modifiers ();
gdk_event_set_device (event, gdk_seat_get_pointer (seat));
gdk_event_set_seat (event, seat);
device_manager = GDK_QUARTZ_DEVICE_MANAGER_CORE (_gdk_display->device_manager);
gdk_event_set_device (event, device_manager->core_pointer);
gdk_event_set_seat (event, gdk_device_get_seat (device_manager->core_pointer));
/* FIXME: Focus and button state? */
}
@@ -900,7 +921,9 @@ fill_pinch_event (GdkWindow *window,
FP_STATE_IDLE,
FP_STATE_UPDATE
} last_state = FP_STATE_IDLE;
GdkSeat *seat = gdk_display_get_default_seat (_gdk_display);
GdkQuartzDeviceManagerCore *device_manager;
device_manager = GDK_QUARTZ_DEVICE_MANAGER_CORE (_gdk_display->device_manager);
event->any.type = GDK_TOUCHPAD_PINCH;
event->touchpad_pinch.window = window;
@@ -913,7 +936,7 @@ fill_pinch_event (GdkWindow *window,
event->touchpad_pinch.n_fingers = 2;
event->touchpad_pinch.dx = 0.0;
event->touchpad_pinch.dy = 0.0;
gdk_event_set_device (event, gdk_seat_get_pointer (seat));
gdk_event_set_device (event, device_manager->core_pointer);
switch ([nsevent phase])
{
@@ -992,23 +1015,23 @@ fill_button_event (GdkWindow *window,
{
GdkEventType type;
gint state;
GdkSeat *seat = gdk_display_get_default_seat (_gdk_display);
GdkQuartzDeviceManagerCore *device_manager;
state = get_keyboard_modifiers_from_ns_event (nsevent) |
_gdk_quartz_events_get_current_mouse_modifiers ();
switch ([nsevent type])
{
case GDK_QUARTZ_LEFT_MOUSE_DOWN:
case GDK_QUARTZ_RIGHT_MOUSE_DOWN:
case GDK_QUARTZ_OTHER_MOUSE_DOWN:
case NSLeftMouseDown:
case NSRightMouseDown:
case NSOtherMouseDown:
type = GDK_BUTTON_PRESS;
state &= ~get_mouse_button_modifiers_from_ns_event (nsevent);
break;
case GDK_QUARTZ_LEFT_MOUSE_UP:
case GDK_QUARTZ_RIGHT_MOUSE_UP:
case GDK_QUARTZ_OTHER_MOUSE_UP:
case NSLeftMouseUp:
case NSRightMouseUp:
case NSOtherMouseUp:
type = GDK_BUTTON_RELEASE;
state |= get_mouse_button_modifiers_from_ns_event (nsevent);
break;
@@ -1027,9 +1050,9 @@ fill_button_event (GdkWindow *window,
/* FIXME event->axes */
event->button.state = state;
event->button.button = get_mouse_button_from_ns_event (nsevent);
event->button.device = gdk_seat_get_pointer (seat);
gdk_event_set_seat (event, seat);
device_manager = GDK_QUARTZ_DEVICE_MANAGER_CORE (_gdk_display->device_manager);
event->button.device = device_manager->core_pointer;
gdk_event_set_seat (event, gdk_device_get_seat (device_manager->core_pointer));
}
static void
@@ -1041,7 +1064,7 @@ fill_motion_event (GdkWindow *window,
gint x_root,
gint y_root)
{
GdkSeat *seat = gdk_display_get_default_seat (_gdk_display);
GdkQuartzDeviceManagerCore *device_manager;
event->any.type = GDK_MOTION_NOTIFY;
event->motion.window = window;
@@ -1054,8 +1077,9 @@ fill_motion_event (GdkWindow *window,
event->motion.state = get_keyboard_modifiers_from_ns_event (nsevent) |
_gdk_quartz_events_get_current_mouse_modifiers ();
event->motion.is_hint = FALSE;
event->motion.device = gdk_seat_get_pointer (seat);
gdk_event_set_seat (event, seat);
device_manager = GDK_QUARTZ_DEVICE_MANAGER_CORE (_gdk_display->device_manager);
event->motion.device = device_manager->core_pointer;
gdk_event_set_seat (event, gdk_device_get_seat (device_manager->core_pointer));
}
static void
@@ -1070,10 +1094,11 @@ fill_scroll_event (GdkWindow *window,
gdouble delta_y,
GdkScrollDirection direction)
{
GdkSeat *seat = gdk_display_get_default_seat (_gdk_display);
GdkQuartzDeviceManagerCore *device_manager;
NSPoint point;
point = [nsevent locationInWindow];
device_manager = GDK_QUARTZ_DEVICE_MANAGER_CORE (_gdk_display->device_manager);
event->any.type = GDK_SCROLL;
event->scroll.window = window;
@@ -1084,10 +1109,10 @@ fill_scroll_event (GdkWindow *window,
event->scroll.y_root = y_root;
event->scroll.state = get_keyboard_modifiers_from_ns_event (nsevent);
event->scroll.direction = direction;
event->scroll.device = gdk_seat_get_pointer (seat);
event->scroll.device = device_manager->core_pointer;
event->scroll.delta_x = delta_x;
event->scroll.delta_y = delta_y;
gdk_event_set_seat (event, seat);
gdk_event_set_seat (event, gdk_device_get_seat (device_manager->core_pointer));
}
static void
@@ -1097,7 +1122,7 @@ fill_key_event (GdkWindow *window,
GdkEventType type)
{
GdkEventPrivate *priv;
GdkSeat *seat = gdk_display_get_default_seat (_gdk_display);
GdkQuartzDeviceManagerCore *device_manager;
gchar buf[7];
gunichar c = 0;
@@ -1110,15 +1135,16 @@ fill_key_event (GdkWindow *window,
event->key.state = get_keyboard_modifiers_from_ns_event (nsevent);
event->key.hardware_keycode = [nsevent keyCode];
gdk_event_set_scancode (event, [nsevent keyCode]);
event->key.group = ([nsevent modifierFlags] & GDK_QUARTZ_ALTERNATE_KEY_MASK) ? 1 : 0;
event->key.group = ([nsevent modifierFlags] & NSAlternateKeyMask) ? 1 : 0;
event->key.keyval = GDK_KEY_VoidSymbol;
gdk_event_set_device (event, gdk_seat_get_keyboard (seat));
gdk_event_set_seat (event, seat);
device_manager = GDK_QUARTZ_DEVICE_MANAGER_CORE (_gdk_display->device_manager);
gdk_event_set_device (event, device_manager->core_keyboard);
gdk_event_set_seat (event, gdk_device_get_seat (device_manager->core_keyboard));
gdk_keymap_translate_keyboard_state (gdk_keymap_get_for_display (_gdk_display),
event->key.hardware_keycode,
event->key.state,
event->key.state,
event->key.group,
&event->key.keyval,
NULL, NULL, NULL);
@@ -1230,7 +1256,7 @@ synthesize_crossing_event (GdkWindow *window,
{
switch ([nsevent type])
{
case GDK_QUARTZ_MOUSE_ENTERED:
case NSMouseEntered:
/* Enter events are considered always to be from another toplevel
* window, this shouldn't negatively affect any app or gtk code,
* and is the only way to make GtkMenu work. EEK EEK EEK.
@@ -1246,7 +1272,7 @@ synthesize_crossing_event (GdkWindow *window,
GDK_NOTIFY_NONLINEAR);
return TRUE;
case GDK_QUARTZ_MOUSE_EXITED:
case NSMouseExited:
/* See above */
if (!(window->event_mask & GDK_LEAVE_NOTIFY_MASK))
return FALSE;
@@ -1270,7 +1296,7 @@ void
_gdk_quartz_synthesize_null_key_event (GdkWindow *window)
{
GdkEvent *event;
GdkSeat *seat = gdk_display_get_default_seat (_gdk_display);
GdkQuartzDeviceManagerCore *device_manager;
event = gdk_event_new (GDK_KEY_PRESS);
event->any.type = GDK_KEY_PRESS;
@@ -1279,9 +1305,9 @@ _gdk_quartz_synthesize_null_key_event (GdkWindow *window)
event->key.hardware_keycode = 0;
event->key.group = 0;
event->key.keyval = GDK_KEY_VoidSymbol;
gdk_event_set_device (event, gdk_seat_get_keyboard (seat));
gdk_event_set_seat (event, seat);
device_manager = GDK_QUARTZ_DEVICE_MANAGER_CORE (_gdk_display->device_manager);
gdk_event_set_device (event, device_manager->core_keyboard);
gdk_event_set_seat (event, gdk_device_get_seat (device_manager->core_keyboard));
append_event(event, FALSE);
}
@@ -1333,12 +1359,12 @@ test_resize (NSEvent *event, GdkWindow *toplevel, gint x, gint y)
GdkWindowImplQuartz *toplevel_impl;
gboolean lion;
/* Resizing from the resize indicator only begins if an GDK_QUARTZ_LEFT_MOUSE_BUTTON
/* Resizing from the resize indicator only begins if an NSLeftMouseButton
* event is received in the resizing area.
*/
toplevel_impl = (GdkWindowImplQuartz *)toplevel->impl;
if ([toplevel_impl->toplevel showsResizeIndicator])
if ([event type] == GDK_QUARTZ_LEFT_MOUSE_DOWN &&
if ([event type] == NSLeftMouseDown &&
[toplevel_impl->toplevel showsResizeIndicator])
{
NSRect frame;
@@ -1377,9 +1403,9 @@ test_resize (NSEvent *event, GdkWindow *toplevel, gint x, gint y)
*/
lion = gdk_quartz_osx_version () >= GDK_OSX_LION;
if (lion &&
([event type] == GDK_QUARTZ_LEFT_MOUSE_DOWN ||
[event type] == GDK_QUARTZ_RIGHT_MOUSE_DOWN ||
[event type] == GDK_QUARTZ_OTHER_MOUSE_DOWN))
([event type] == NSLeftMouseDown ||
[event type] == NSRightMouseDown ||
[event type] == NSOtherMouseDown))
{
if (x < GDK_LION_RESIZE ||
x > toplevel->width - GDK_LION_RESIZE ||
@@ -1390,14 +1416,6 @@ test_resize (NSEvent *event, GdkWindow *toplevel, gint x, gint y)
return FALSE;
}
#if MAC_OS_X_VERSION_MIN_REQUIRED < 101200
#define GDK_QUARTZ_APP_KIT_DEFINED NSAppKitDefined
#define GDK_QUARTZ_APPLICATION_DEACTIVATED NSApplicationDeactivatedEventType
#else
#define GDK_QUARTZ_APP_KIT_DEFINED NSEventTypeAppKitDefined
#define GDK_QUARTZ_APPLICATION_DEACTIVATED NSEventSubtypeApplicationDeactivated
#endif
static gboolean
gdk_event_translate (GdkEvent *event,
NSEvent *nsevent)
@@ -1413,9 +1431,9 @@ gdk_event_translate (GdkEvent *event,
* grabs when the application loses focus (gets deactivated).
*/
event_type = [nsevent type];
if (event_type == GDK_QUARTZ_APP_KIT_DEFINED)
if (event_type == NSAppKitDefined)
{
if ([nsevent subtype] == GDK_QUARTZ_APPLICATION_DEACTIVATED)
if ([nsevent subtype] == NSApplicationDeactivatedEventType)
_gdk_quartz_events_break_all_grabs (get_time_from_ns_event (nsevent));
/* This could potentially be used to break grabs when clicking
@@ -1451,7 +1469,7 @@ gdk_event_translate (GdkEvent *event,
{
GdkWindow *toplevel = NULL;
if (event_type == GDK_QUARTZ_MOUSE_MOVED)
if (event_type == NSMouseMoved)
{
/* Motion events received after clicking the menu bar do not have the
* window field set. Instead of giving up on the event immediately,
@@ -1522,9 +1540,9 @@ gdk_event_translate (GdkEvent *event,
* native apps). If the app is active, we focus the window and then handle
* the event, also to match native apps.
*/
if ((event_type == GDK_QUARTZ_RIGHT_MOUSE_DOWN ||
event_type == GDK_QUARTZ_OTHER_MOUSE_DOWN ||
event_type == GDK_QUARTZ_LEFT_MOUSE_DOWN))
if ((event_type == NSRightMouseDown ||
event_type == NSOtherMouseDown ||
event_type == NSLeftMouseDown))
{
GdkWindowImplQuartz *impl = GDK_WINDOW_IMPL_QUARTZ (window->impl);
@@ -1536,10 +1554,11 @@ gdk_event_translate (GdkEvent *event,
else if (![impl->toplevel isKeyWindow])
{
GdkDeviceGrabInfo *grab;
GdkSeat *seat = gdk_display_get_default_seat (_gdk_display);
grab = _gdk_display_get_last_device_grab (_gdk_display,
gdk_seat_get_pointer (seat));
GDK_QUARTZ_DEVICE_MANAGER_CORE (_gdk_display->device_manager)->core_pointer);
if (!grab)
[impl->toplevel makeKeyWindow];
}
}
@@ -1547,23 +1566,23 @@ gdk_event_translate (GdkEvent *event,
switch (event_type)
{
case GDK_QUARTZ_LEFT_MOUSE_DOWN:
case GDK_QUARTZ_RIGHT_MOUSE_DOWN:
case GDK_QUARTZ_OTHER_MOUSE_DOWN:
case GDK_QUARTZ_LEFT_MOUSE_UP:
case GDK_QUARTZ_RIGHT_MOUSE_UP:
case GDK_QUARTZ_OTHER_MOUSE_UP:
case NSLeftMouseDown:
case NSRightMouseDown:
case NSOtherMouseDown:
case NSLeftMouseUp:
case NSRightMouseUp:
case NSOtherMouseUp:
fill_button_event (window, event, nsevent, x, y, x_root, y_root);
break;
case GDK_QUARTZ_LEFT_MOUSE_DRAGGED:
case GDK_QUARTZ_RIGHT_MOUSE_DRAGGED:
case GDK_QUARTZ_OTHER_MOUSE_DRAGGED:
case GDK_QUARTZ_MOUSE_MOVED:
case NSLeftMouseDragged:
case NSRightMouseDragged:
case NSOtherMouseDragged:
case NSMouseMoved:
fill_motion_event (window, event, nsevent, x, y, x_root, y_root);
break;
case GDK_QUARTZ_SCROLL_WHEEL:
case NSScrollWheel:
{
GdkScrollDirection direction;
float dx;
@@ -1640,17 +1659,17 @@ gdk_event_translate (GdkEvent *event,
return_val = FALSE;
break;
#endif
case GDK_QUARTZ_MOUSE_EXITED:
case NSMouseExited:
if (WINDOW_IS_TOPLEVEL (window))
[[NSCursor arrowCursor] set];
/* fall through */
case GDK_QUARTZ_MOUSE_ENTERED:
case NSMouseEntered:
return_val = synthesize_crossing_event (window, event, nsevent, x, y, x_root, y_root);
break;
case GDK_QUARTZ_KEY_DOWN:
case GDK_QUARTZ_KEY_UP:
case GDK_QUARTZ_FLAGS_CHANGED:
case NSKeyDown:
case NSKeyUp:
case NSFlagsChanged:
{
GdkEventType type;
-7
View File
@@ -32,16 +32,9 @@ gdk_quartz_osx_version (void)
if (minor == GDK_OSX_UNSUPPORTED)
{
#if MAC_OS_X_VERSION_MIN_REQUIRED < 101000
OSErr err = Gestalt (gestaltSystemVersionMinor, (SInt32*)&minor);
g_return_val_if_fail (err == noErr, GDK_OSX_UNSUPPORTED);
#else
NSOperatingSystemVersion version;
version = [[NSProcessInfo processInfo] operatingSystemVersion];
minor = version.minorVersion;
#endif
}
if (minor < GDK_OSX_MIN)
+44 -12
View File
@@ -87,20 +87,52 @@ _gdk_quartz_display_get_keymap (GdkDisplay *display)
*/
static guint *keyval_array = NULL;
static inline UniChar
macroman2ucs (unsigned char c)
{
/* Precalculated table mapping MacRoman-128 to Unicode. Generated
by creating single element CFStringRefs then extracting the
first character. */
static const unsigned short table[128] = {
0xc4, 0xc5, 0xc7, 0xc9, 0xd1, 0xd6, 0xdc, 0xe1,
0xe0, 0xe2, 0xe4, 0xe3, 0xe5, 0xe7, 0xe9, 0xe8,
0xea, 0xeb, 0xed, 0xec, 0xee, 0xef, 0xf1, 0xf3,
0xf2, 0xf4, 0xf6, 0xf5, 0xfa, 0xf9, 0xfb, 0xfc,
0x2020, 0xb0, 0xa2, 0xa3, 0xa7, 0x2022, 0xb6, 0xdf,
0xae, 0xa9, 0x2122, 0xb4, 0xa8, 0x2260, 0xc6, 0xd8,
0x221e, 0xb1, 0x2264, 0x2265, 0xa5, 0xb5, 0x2202, 0x2211,
0x220f, 0x3c0, 0x222b, 0xaa, 0xba, 0x3a9, 0xe6, 0xf8,
0xbf, 0xa1, 0xac, 0x221a, 0x192, 0x2248, 0x2206, 0xab,
0xbb, 0x2026, 0xa0, 0xc0, 0xc3, 0xd5, 0x152, 0x153,
0x2013, 0x2014, 0x201c, 0x201d, 0x2018, 0x2019, 0xf7, 0x25ca,
0xff, 0x178, 0x2044, 0x20ac, 0x2039, 0x203a, 0xfb01, 0xfb02,
0x2021, 0xb7, 0x201a, 0x201e, 0x2030, 0xc2, 0xca, 0xc1,
0xcb, 0xc8, 0xcd, 0xce, 0xcf, 0xcc, 0xd3, 0xd4,
0xf8ff, 0xd2, 0xda, 0xdb, 0xd9, 0x131, 0x2c6, 0x2dc,
0xaf, 0x2d8, 0x2d9, 0x2da, 0xb8, 0x2dd, 0x2db, 0x2c7
};
if (c < 128)
return c;
else
return table[c - 128];
}
const static struct {
guint keycode;
guint keyval;
unsigned int modmask; /* So we can tell when a mod key is pressed/released */
} modifier_keys[] = {
{ 54, GDK_KEY_Meta_R, GDK_QUARTZ_COMMAND_KEY_MASK },
{ 55, GDK_KEY_Meta_L, GDK_QUARTZ_COMMAND_KEY_MASK },
{ 56, GDK_KEY_Shift_L, GDK_QUARTZ_SHIFT_KEY_MASK },
{ 57, GDK_KEY_Caps_Lock, GDK_QUARTZ_ALPHA_SHIFT_KEY_MASK },
{ 58, GDK_KEY_Alt_L, GDK_QUARTZ_ALTERNATE_KEY_MASK },
{ 59, GDK_KEY_Control_L, GDK_QUARTZ_CONTROL_KEY_MASK },
{ 60, GDK_KEY_Shift_R, GDK_QUARTZ_SHIFT_KEY_MASK },
{ 61, GDK_KEY_Alt_R, GDK_QUARTZ_ALTERNATE_KEY_MASK },
{ 62, GDK_KEY_Control_R, GDK_QUARTZ_CONTROL_KEY_MASK }
{ 54, GDK_KEY_Meta_R, NSCommandKeyMask },
{ 55, GDK_KEY_Meta_L, NSCommandKeyMask },
{ 56, GDK_KEY_Shift_L, NSShiftKeyMask },
{ 57, GDK_KEY_Caps_Lock, NSAlphaShiftKeyMask },
{ 58, GDK_KEY_Alt_L, NSAlternateKeyMask },
{ 59, GDK_KEY_Control_L, NSControlKeyMask },
{ 60, GDK_KEY_Shift_R, NSShiftKeyMask },
{ 61, GDK_KEY_Alt_R, NSAlternateKeyMask },
{ 62, GDK_KEY_Control_R, NSControlKeyMask }
};
const static struct {
@@ -751,11 +783,11 @@ _gdk_quartz_keys_event_type (NSEvent *event)
switch ([event type])
{
case GDK_QUARTZ_KEY_DOWN:
case NSKeyDown:
return GDK_KEY_PRESS;
case GDK_QUARTZ_KEY_UP:
case NSKeyUp:
return GDK_KEY_RELEASE;
case GDK_QUARTZ_FLAGS_CHANGED:
case NSFlagsChanged:
break;
default:
g_assert_not_reached ();
+5 -12
View File
@@ -35,19 +35,12 @@ gdk_quartz_monitor_get_workarea (GdkMonitor *monitor,
GDK_QUARTZ_ALLOC_POOL;
NSArray *array = [NSScreen screens];
if (quartz_monitor->monitor_num < [array count])
{
NSScreen *screen = [array objectAtIndex:quartz_monitor->monitor_num];
NSRect rect = [screen visibleFrame];
NSRect rect = [quartz_monitor->nsscreen visibleFrame];
dest->x = rect.origin.x - quartz_screen->min_x;
dest->y = quartz_screen->height - (rect.origin.y + rect.size.height) + quartz_screen->min_y;
dest->width = rect.size.width;
dest->height = rect.size.height;
}
else
*dest = monitor->geometry;
dest->x = rect.origin.x - quartz_screen->min_x;
dest->y = quartz_screen->height - (rect.origin.y + rect.size.height) + quartz_screen->min_y;
dest->width = rect.size.width;
dest->height = rect.size.height;
GDK_QUARTZ_RELEASE_POOL;
}
+3 -2
View File
@@ -29,8 +29,8 @@
struct _GdkQuartzMonitor
{
GdkMonitor parent;
gint monitor_num;
CGDirectDisplayID id;
NSScreen *nsscreen;
};
struct _GdkQuartzMonitorClass {
@@ -38,3 +38,4 @@ struct _GdkQuartzMonitorClass {
};
#endif
+20
View File
@@ -128,6 +128,26 @@ ensure_atom_tables (void)
}
}
static GdkAtom
intern_atom_internal (const gchar *atom_name, gboolean allocate)
{
gpointer result;
gchar *name;
g_return_val_if_fail (atom_name != NULL, GDK_NONE);
ensure_atom_tables ();
if (g_hash_table_lookup_extended (names_to_atoms, atom_name, NULL, &result))
return result;
result = GINT_TO_POINTER (atoms_to_names->len);
name = allocate ? g_strdup (atom_name) : (gchar *)atom_name;
g_hash_table_insert(names_to_atoms, name, result);
g_ptr_array_add(atoms_to_names, name);
return result;
}
void
_gdk_quartz_window_delete_property (GdkWindow *window,
GdkAtom property)
+1 -3
View File
@@ -53,9 +53,7 @@ typedef enum
GDK_OSX_YOSEMITE = 10,
GDK_OSX_EL_CAPITAN = 11,
GDK_OSX_SIERRA = 12,
GDK_OSX_HIGH_SIERRA = 13,
GDK_OSX_MOJAVE = 14,
GDK_OSX_CURRENT = 14,
GDK_OSX_CURRENT = 12,
GDK_OSX_NEW = 99
} GdkOSXVersion;
-73
View File
@@ -45,79 +45,6 @@ typedef struct _GdkQuartzKeymapClass GdkQuartzKeymapClass;
GDK_AVAILABLE_IN_ALL
GType gdk_quartz_keymap_get_type (void);
#if MAC_OS_X_VERSION_MIN_REQUIRED < 101200
typedef enum
{
GDK_QUARTZ_FLAGS_CHANGED = NSFlagsChanged,
GDK_QUARTZ_KEY_UP = NSKeyUp,
GDK_QUARTZ_KEY_DOWN = NSKeyDown,
GDK_QUARTZ_MOUSE_ENTERED = NSMouseEntered,
GDK_QUARTZ_MOUSE_EXITED = NSMouseExited,
GDK_QUARTZ_SCROLL_WHEEL = NSScrollWheel,
GDK_QUARTZ_MOUSE_MOVED = NSMouseMoved,
GDK_QUARTZ_OTHER_MOUSE_DRAGGED = NSOtherMouseDragged,
GDK_QUARTZ_RIGHT_MOUSE_DRAGGED = NSRightMouseDragged,
GDK_QUARTZ_LEFT_MOUSE_DRAGGED = NSLeftMouseDragged,
GDK_QUARTZ_OTHER_MOUSE_UP = NSOtherMouseUp,
GDK_QUARTZ_RIGHT_MOUSE_UP = NSRightMouseUp,
GDK_QUARTZ_LEFT_MOUSE_UP = NSLeftMouseUp,
GDK_QUARTZ_OTHER_MOUSE_DOWN = NSOtherMouseDown,
GDK_QUARTZ_RIGHT_MOUSE_DOWN = NSRightMouseDown,
GDK_QUARTZ_LEFT_MOUSE_DOWN = NSLeftMouseDown,
} GdkQuartzEventType;
typedef enum
{
GDK_QUARTZ_ALTERNATE_KEY_MASK = NSAlternateKeyMask,
GDK_QUARTZ_CONTROL_KEY_MASK = NSControlKeyMask,
GDK_QUARTZ_SHIFT_KEY_MASK = NSShiftKeyMask,
GDK_QUARTZ_ALPHA_SHIFT_KEY_MASK = NSAlphaShiftKeyMask,
GDK_QUARTZ_COMMAND_KEY_MASK = NSCommandKeyMask,
GDK_QUARTZ_ANY_EVENT_MASK = NSAnyEventMask,
} GdkQuartzEventModifierFlags;
typedef enum
{
GDK_QUARTZ_EVENT_MASK_ANY = NSAnyEventMask,
} GdkQuartzEventMask;
#else
typedef enum
{
GDK_QUARTZ_FLAGS_CHANGED = NSEventTypeFlagsChanged,
GDK_QUARTZ_KEY_UP = NSEventTypeKeyUp,
GDK_QUARTZ_KEY_DOWN = NSEventTypeKeyDown,
GDK_QUARTZ_MOUSE_ENTERED = NSEventTypeMouseEntered,
GDK_QUARTZ_MOUSE_EXITED = NSEventTypeMouseExited,
GDK_QUARTZ_SCROLL_WHEEL = NSEventTypeScrollWheel,
GDK_QUARTZ_MOUSE_MOVED = NSEventTypeMouseMoved,
GDK_QUARTZ_OTHER_MOUSE_DRAGGED = NSEventTypeOtherMouseDragged,
GDK_QUARTZ_RIGHT_MOUSE_DRAGGED = NSEventTypeRightMouseDragged,
GDK_QUARTZ_LEFT_MOUSE_DRAGGED = NSEventTypeLeftMouseDragged,
GDK_QUARTZ_OTHER_MOUSE_UP = NSEventTypeOtherMouseUp,
GDK_QUARTZ_RIGHT_MOUSE_UP = NSEventTypeRightMouseUp,
GDK_QUARTZ_LEFT_MOUSE_UP = NSEventTypeLeftMouseUp,
GDK_QUARTZ_OTHER_MOUSE_DOWN = NSEventTypeOtherMouseDown,
GDK_QUARTZ_RIGHT_MOUSE_DOWN = NSEventTypeRightMouseDown,
GDK_QUARTZ_LEFT_MOUSE_DOWN = NSEventTypeLeftMouseDown,
} GdkQuartzEventType;
typedef enum
{
GDK_QUARTZ_ALTERNATE_KEY_MASK = NSEventModifierFlagOption,
GDK_QUARTZ_CONTROL_KEY_MASK = NSEventModifierFlagControl,
GDK_QUARTZ_SHIFT_KEY_MASK = NSEventModifierFlagShift,
GDK_QUARTZ_ALPHA_SHIFT_KEY_MASK = NSEventModifierFlagCapsLock,
GDK_QUARTZ_COMMAND_KEY_MASK = NSEventModifierFlagCommand,
} GdkQuartzEventModifierFlags;
typedef enum
{
GDK_QUARTZ_EVENT_MASK_ANY = NSEventMaskAny,
} GdkQuartzEventMask;
#endif
G_END_DECLS
#endif /* __GDK_QUARTZ_KEYS_H__ */
+141 -24
View File
@@ -63,10 +63,12 @@
static void gdk_quartz_screen_dispose (GObject *object);
static void gdk_quartz_screen_finalize (GObject *object);
static void gdk_quartz_screen_calculate_layout (GdkQuartzScreen *screen);
static void gdk_quartz_screen_reconfigure (GdkQuartzDisplay *dispplay,
GdkQuartzScreen *screen);
static const double dpi = 72.0;
static void display_reconfiguration_callback (CGDirectDisplayID display,
CGDisplayChangeSummaryFlags flags,
void *userInfo);
static const double dpi = 96.0;
static gint get_mm_from_pixels (NSScreen *screen, int pixels);
G_DEFINE_TYPE (GdkQuartzScreen, gdk_quartz_screen, GDK_TYPE_SCREEN);
@@ -84,11 +86,13 @@ gdk_quartz_screen_init (GdkQuartzScreen *quartz_screen)
* pangocairo-coretext needs to default to that scaling factor.
*/
g_signal_connect (_gdk_display, "monitors-changed",
G_CALLBACK (gdk_quartz_screen_reconfigure), quartz_screen);
/* The first monitors-changed should have fired already. */
_gdk_screen_set_resolution (screen, dpi);
gdk_quartz_screen_calculate_layout (quartz_screen);
CGDisplayRegisterReconfigurationCallback (display_reconfiguration_callback,
screen);
quartz_screen->emit_monitors_changed = FALSE;
}
@@ -103,6 +107,9 @@ gdk_quartz_screen_dispose (GObject *object)
screen->screen_changed_id = 0;
}
CGDisplayRemoveReconfigurationCallback (display_reconfiguration_callback,
screen);
G_OBJECT_CLASS (gdk_quartz_screen_parent_class)->dispose (object);
}
@@ -120,42 +127,77 @@ gdk_quartz_screen_finalize (GObject *object)
static void
gdk_quartz_screen_calculate_layout (GdkQuartzScreen *screen)
{
int i, monitors;
NSArray *array;
int i;
int max_x, max_y;
GdkDisplay *display = gdk_screen_get_display (GDK_SCREEN (screen));
GdkQuartzDisplay *display_quartz = GDK_QUARTZ_DISPLAY (display);
g_ptr_array_free (display_quartz->monitors, TRUE);
display_quartz->monitors = g_ptr_array_new_with_free_func (g_object_unref);
GDK_QUARTZ_ALLOC_POOL;
array = [NSScreen screens];
screen->width = 0;
screen->height = 0;
screen->min_x = 0;
screen->min_y = 0;
max_x = max_y = 0;
screen->mm_width = 0;
screen->mm_height = 0;
/* We determine the minimum and maximum x and y coordinates
* covered by the monitors. From this we can deduce the width
* and height of the root screen.
*/
monitors = gdk_display_get_n_monitors (display);
for (i = 0; i < monitors; ++i)
for (i = 0; i < [array count]; i++)
{
GdkQuartzMonitor *monitor =
GDK_QUARTZ_MONITOR (gdk_display_get_monitor (display, i));
GdkRectangle rect;
GdkQuartzMonitor *monitor = g_object_new (GDK_TYPE_QUARTZ_MONITOR,
"display", display,
NULL);
g_ptr_array_add (display_quartz->monitors, monitor);
monitor->nsscreen = [array objectAtIndex:i];
gdk_monitor_get_geometry (GDK_MONITOR (monitor), &rect);
screen->min_x = MIN (screen->min_x, rect.x);
max_x = MAX (max_x, rect.x + rect.width);
NSRect rect = [[array objectAtIndex:i] frame];
screen->min_y = MIN (screen->min_y, rect.y);
max_y = MAX (max_y, rect.y + rect.height);
screen->min_x = MIN (screen->min_x, rect.origin.x);
max_x = MAX (max_x, rect.origin.x + rect.size.width);
screen->mm_height += GDK_MONITOR (monitor)->height_mm;
screen->mm_width += GDK_MONITOR (monitor)->width_mm;
screen->min_y = MIN (screen->min_y, rect.origin.y);
max_y = MAX (max_y, rect.origin.y + rect.size.height);
}
screen->width = max_x - screen->min_x;
screen->height = max_y - screen->min_y;
for (i = 0; i < [array count] ; i++)
{
NSScreen *nsscreen;
NSRect rect;
GdkMonitor *monitor;
monitor = GDK_MONITOR(display_quartz->monitors->pdata[i]);
nsscreen = [array objectAtIndex:i];
rect = [nsscreen frame];
monitor->geometry.x = rect.origin.x - screen->min_x;
monitor->geometry.y
= screen->height - (rect.origin.y + rect.size.height) + screen->min_y;
monitor->geometry.width = rect.size.width;
monitor->geometry.height = rect.size.height;
if (gdk_quartz_osx_version() >= GDK_OSX_LION)
monitor->scale_factor = [(id <ScaleFactor>) nsscreen backingScaleFactor];
else
monitor->scale_factor = 1;
monitor->width_mm = get_mm_from_pixels(nsscreen, monitor->geometry.width);
monitor->height_mm = get_mm_from_pixels(nsscreen, monitor->geometry.height);
monitor->refresh_rate = 0; // unknown
monitor->manufacturer = NULL; // unknown
monitor->model = NULL; // unknown
monitor->subpixel_layout = GDK_SUBPIXEL_LAYOUT_UNKNOWN; // unknown
}
GDK_QUARTZ_RELEASE_POOL;
}
void
@@ -194,7 +236,7 @@ _gdk_quartz_screen_update_window_sizes (GdkScreen *screen)
}
static void
gdk_quartz_screen_reconfigure (GdkQuartzDisplay *display, GdkQuartzScreen *screen)
process_display_reconfiguration (GdkQuartzScreen *screen)
{
int width, height;
@@ -216,6 +258,56 @@ gdk_quartz_screen_reconfigure (GdkQuartzDisplay *display, GdkQuartzScreen *scree
g_signal_emit_by_name (screen, "size-changed");
}
static gboolean
screen_changed_idle (gpointer data)
{
GdkQuartzScreen *screen = data;
process_display_reconfiguration (data);
screen->screen_changed_id = 0;
return FALSE;
}
static void
display_reconfiguration_callback (CGDirectDisplayID display,
CGDisplayChangeSummaryFlags flags,
void *userInfo)
{
GdkQuartzScreen *screen = userInfo;
if (flags & kCGDisplayBeginConfigurationFlag)
{
/* Ignore the begin configuration signal. */
return;
}
else
{
/* We save information about the changes, so we can emit
* ::monitors-changed when appropriate. This signal must be
* emitted when the number, size of position of one of the
* monitors changes.
*/
if (flags & kCGDisplayMovedFlag
|| flags & kCGDisplayAddFlag
|| flags & kCGDisplayRemoveFlag
|| flags & kCGDisplayEnabledFlag
|| flags & kCGDisplayDisabledFlag)
screen->emit_monitors_changed = TRUE;
/* At this point Cocoa does not know about the new screen data
* yet, so we delay our refresh into an idle handler.
*/
if (!screen->screen_changed_id)
{
screen->screen_changed_id = gdk_threads_add_idle (screen_changed_idle,
screen);
g_source_set_name_by_id (screen->screen_changed_id, "[gtk+] screen_changed_idle");
}
}
}
static GdkDisplay *
gdk_quartz_screen_get_display (GdkScreen *screen)
{
@@ -246,6 +338,13 @@ gdk_quartz_screen_get_height (GdkScreen *screen)
return GDK_QUARTZ_SCREEN (screen)->height;
}
static gint
get_mm_from_pixels (NSScreen *screen, int pixels)
{
const float mm_per_inch = 25.4;
return (pixels / dpi) * mm_per_inch;
}
static gchar *
gdk_quartz_screen_make_display_name (GdkScreen *screen)
{
@@ -270,16 +369,34 @@ gdk_quartz_screen_is_composited (GdkScreen *screen)
return TRUE;
}
static NSScreen *
get_nsscreen_for_monitor (gint monitor_num)
{
NSArray *array;
NSScreen *screen;
GDK_QUARTZ_ALLOC_POOL;
array = [NSScreen screens];
screen = [array objectAtIndex:monitor_num];
GDK_QUARTZ_RELEASE_POOL;
return screen;
}
static gint
gdk_quartz_screen_get_width_mm (GdkScreen *screen)
{
return GDK_QUARTZ_SCREEN (screen)->mm_width;
return get_mm_from_pixels (get_nsscreen_for_monitor (0),
GDK_QUARTZ_SCREEN (screen)->width);
}
static gint
gdk_quartz_screen_get_height_mm (GdkScreen *screen)
{
return GDK_QUARTZ_SCREEN (screen)->mm_height;
return get_mm_from_pixels (get_nsscreen_for_monitor (0),
GDK_QUARTZ_SCREEN (screen)->height);
}
static void
-2
View File
@@ -35,8 +35,6 @@ struct _GdkQuartzScreen
gint width;
gint height;
gint mm_width;
gint mm_height;
guint screen_changed_id;
+8 -20
View File
@@ -172,28 +172,16 @@ _gdk_quartz_display_text_property_to_utf8_list (GdkDisplay *display,
}
}
#if MAC_OS_X_VERSION_MIN_REQUIRED < 101400
#define GDK_QUARTZ_URL_PBOARD_TYPE NSURLPboardType
#define GDK_QUARTZ_COLOR_PBOARD_TYPE NSColorPboardType
#define GDK_QUARTZ_STRING_PBOARD_TYPE NSStringPboardType
#define GDK_QUARTZ_TIFF_PBOARD_TYPE NSTIFFPboardType
#else
#define GDK_QUARTZ_URL_PBOARD_TYPE NSPasteboardTypeURL
#define GDK_QUARTZ_COLOR_PBOARD_TYPE NSPasteboardTypeColor
#define GDK_QUARTZ_STRING_PBOARD_TYPE NSPasteboardTypeString
#define GDK_QUARTZ_TIFF_PBOARD_TYPE NSPasteboardTypeTIFF
#endif
GdkAtom
gdk_quartz_pasteboard_type_to_atom_libgtk_only (NSString *type)
{
if ([type isEqualToString:GDK_QUARTZ_STRING_PBOARD_TYPE])
if ([type isEqualToString:NSStringPboardType])
return gdk_atom_intern_static_string ("UTF8_STRING");
else if ([type isEqualToString:GDK_QUARTZ_TIFF_PBOARD_TYPE])
else if ([type isEqualToString:NSTIFFPboardType])
return gdk_atom_intern_static_string ("image/tiff");
else if ([type isEqualToString:GDK_QUARTZ_COLOR_PBOARD_TYPE])
else if ([type isEqualToString:NSColorPboardType])
return gdk_atom_intern_static_string ("application/x-color");
else if ([type isEqualToString:GDK_QUARTZ_URL_PBOARD_TYPE])
else if ([type isEqualToString:NSURLPboardType])
return gdk_atom_intern_static_string ("text/uri-list");
else
return gdk_atom_intern ([type UTF8String], FALSE);
@@ -203,13 +191,13 @@ NSString *
gdk_quartz_target_to_pasteboard_type_libgtk_only (const char *target)
{
if (strcmp (target, "UTF8_STRING") == 0)
return GDK_QUARTZ_STRING_PBOARD_TYPE;
return NSStringPboardType;
else if (strcmp (target, "image/tiff") == 0)
return GDK_QUARTZ_TIFF_PBOARD_TYPE;
return NSTIFFPboardType;
else if (strcmp (target, "application/x-color") == 0)
return GDK_QUARTZ_COLOR_PBOARD_TYPE;
return NSColorPboardType;
else if (strcmp (target, "text/uri-list") == 0)
return GDK_QUARTZ_URL_PBOARD_TYPE;
return NSURLPboardType;
else
return [NSString stringWithUTF8String:target];
}
+96 -95
View File
@@ -52,27 +52,6 @@ typedef struct
GdkWMDecoration decor;
} FullscreenSavedGeometry;
#if MAC_OS_X_VERSION_MIN_REQUIRED < 101200
typedef enum
{
GDK_QUARTZ_BORDERLESS_WINDOW = NSBorderlessWindowMask,
GDK_QUARTZ_CLOSABLE_WINDOW = NSClosableWindowMask,
GDK_QUARTZ_FULLSCREEN_WINDOW = NSFullScreenWindowMask,
GDK_QUARTZ_MINIATURIZABLE_WINDOW = NSMiniaturizableWindowMask,
GDK_QUARTZ_RESIZABLE_WINDOW = NSResizableWindowMask,
GDK_QUARTZ_TITLED_WINDOW = NSTitledWindowMask,
} GdkQuartzWindowMask;
#else
typedef enum
{
GDK_QUARTZ_BORDERLESS_WINDOW = NSWindowStyleMaskBorderless,
GDK_QUARTZ_CLOSABLE_WINDOW = NSWindowStyleMaskClosable,
GDK_QUARTZ_FULLSCREEN_WINDOW = NSWindowStyleMaskFullScreen,
GDK_QUARTZ_MINIATURIZABLE_WINDOW = NSWindowStyleMaskMiniaturizable,
GDK_QUARTZ_RESIZABLE_WINDOW = NSWindowStyleMaskResizable,
GDK_QUARTZ_TITLED_WINDOW = NSWindowStyleMaskTitled,
} GdkQuartzWindowMask;
#endif
#ifndef AVAILABLE_MAC_OS_X_VERSION_10_7_AND_LATER
static FullscreenSavedGeometry *get_fullscreen_geometry (GdkWindow *window);
@@ -141,7 +120,7 @@ static CGContextRef
gdk_window_impl_quartz_get_context (GdkWindowImplQuartz *window_impl,
gboolean antialias)
{
CGContextRef cg_context = NULL;
CGContextRef cg_context;
CGSize scale;
if (GDK_WINDOW_DESTROYED (window_impl->wrapper))
@@ -158,17 +137,8 @@ gdk_window_impl_quartz_get_context (GdkWindowImplQuartz *window_impl,
if (![window_impl->view lockFocusIfCanDraw])
return NULL;
}
#if MAC_OS_X_VERSION_MAX_ALLOWED < 101000
cg_context = [[NSGraphicsContext currentContext] graphicsPort];
#else
if (gdk_quartz_osx_version () < GDK_OSX_YOSEMITE)
cg_context = [[NSGraphicsContext currentContext] graphicsPort];
else
cg_context = [[NSGraphicsContext currentContext] CGContext];
#endif
if (!cg_context)
return NULL;
cg_context = [[NSGraphicsContext currentContext] graphicsPort];
CGContextSaveGState (cg_context);
CGContextSetAllowsAntialiasing (cg_context, antialias);
@@ -196,14 +166,58 @@ gdk_window_impl_quartz_release_context (GdkWindowImplQuartz *window_impl,
}
}
static void
check_grab_unmap (GdkWindow *window)
{
GList *list, *l;
GdkDisplay *display = gdk_window_get_display (window);
GdkDeviceManager *device_manager;
device_manager = gdk_display_get_device_manager (display);
list = gdk_device_manager_list_devices (device_manager,
GDK_DEVICE_TYPE_FLOATING);
for (l = list; l; l = l->next)
{
_gdk_display_end_device_grab (display, l->data, 0, window, TRUE);
}
g_list_free (list);
}
static void
check_grab_destroy (GdkWindow *window)
{
GList *list, *l;
GdkDisplay *display = gdk_window_get_display (window);
GdkDeviceManager *device_manager;
/* Make sure there is no lasting grab in this native window */
device_manager = gdk_display_get_device_manager (display);
list = gdk_device_manager_list_devices (device_manager,
GDK_DEVICE_TYPE_MASTER);
for (l = list; l; l = l->next)
{
GdkDeviceGrabInfo *grab;
grab = _gdk_display_get_last_device_grab (display, l->data);
if (grab && grab->native_window == window)
{
/* Serials are always 0 in quartz, but for clarity: */
grab->serial_end = grab->serial_start;
grab->implicit_ungrab = TRUE;
}
}
g_list_free (list);
}
static void
gdk_window_impl_quartz_finalize (GObject *object)
{
GdkWindowImplQuartz *impl = GDK_WINDOW_IMPL_QUARTZ (object);
GdkDisplay *display = gdk_window_get_display (impl->wrapper);
GdkSeat *seat = gdk_display_get_default_seat (display);
gdk_seat_ungrab (seat);
check_grab_destroy (GDK_WINDOW_IMPL_QUARTZ (object)->wrapper);
if (impl->transient_for)
g_object_unref (impl->transient_for);
@@ -221,14 +235,10 @@ gdk_window_impl_quartz_finalize (GObject *object)
*
* If drawable NULL, no flushing is done, only registering that a flush was
* done externally.
*
* Note: As of MacOS 10.14 NSWindow flushWindow is deprecated because
* Quartz has the ability to handle deferred drawing on its own.
*/
void
_gdk_quartz_window_flush (GdkWindowImplQuartz *window_impl)
{
#if MAC_OS_X_VERSION_MIN_REQUIRED < 101400
static struct timeval prev_tv;
static gint intervals[4];
static gint index;
@@ -254,7 +264,6 @@ _gdk_quartz_window_flush (GdkWindowImplQuartz *window_impl)
}
else
prev_tv = tv;
#endif
}
static cairo_user_data_key_t gdk_quartz_cairo_key;
@@ -288,15 +297,15 @@ gdk_quartz_create_cairo_surface (GdkWindowImplQuartz *impl,
cg_context = gdk_quartz_window_get_context (impl, TRUE);
if (!cg_context)
return NULL;
surface_data = g_new (GdkQuartzCairoSurfaceData, 1);
surface_data->window_impl = impl;
surface_data->cg_context = cg_context;
if (cg_context)
surface = cairo_quartz_surface_create_for_cg_context (cg_context,
width, height);
else
surface = cairo_quartz_surface_create(CAIRO_FORMAT_ARGB32, width, height);
surface = cairo_quartz_surface_create_for_cg_context (cg_context,
width, height);
cairo_surface_set_user_data (surface, &gdk_quartz_cairo_key,
surface_data,
@@ -385,7 +394,7 @@ _gdk_quartz_window_process_updates_recurse (GdkWindow *window,
toplevel_impl = (GdkWindowImplQuartz *)toplevel->impl;
nswindow = toplevel_impl->toplevel;
#if MAC_OS_X_VERSION_MIN_REQUIRED < 101400
/* In theory, we could skip the flush disabling, since we only
* have one NSView.
*/
@@ -395,7 +404,6 @@ _gdk_quartz_window_process_updates_recurse (GdkWindow *window,
[nswindow disableFlushWindow];
update_nswindows = g_slist_prepend (update_nswindows, nswindow);
}
#endif
}
}
@@ -419,12 +427,10 @@ _gdk_quartz_display_before_process_all_updates (GdkDisplay *display)
{
[NSAnimationContext endGrouping];
}
#if MAC_OS_X_VERSION_MIN_REQUIRED < 101100
else
{
NSDisableScreenUpdates ();
}
#endif
}
void
@@ -442,10 +448,9 @@ _gdk_quartz_display_after_process_all_updates (GdkDisplay *display)
[[nswindow contentView] displayIfNeeded];
_gdk_quartz_window_flush (NULL);
#if MAC_OS_X_VERSION_MIN_REQUIRED < 101400
[nswindow enableFlushWindow];
[nswindow flushWindow];
#endif
[nswindow release];
tmp_list = tmp_list->next;
@@ -459,12 +464,10 @@ _gdk_quartz_display_after_process_all_updates (GdkDisplay *display)
{
[NSAnimationContext beginGrouping];
}
#if MAC_OS_X_VERSION_MIN_REQUIRED < 101100
else
{
NSEnableScreenUpdates ();
}
#endif
}
static const gchar *
@@ -546,11 +549,7 @@ _gdk_quartz_window_debug_highlight (GdkWindow *window, gint number)
[debug_window[number] close];
debug_window[number] = [[NSWindow alloc] initWithContentRect:rect
#if MAC_OS_X_VERSION_MIN_REQUIRED < 101200
styleMask:(NSUInteger)GDK_QUARTZ_BORDERLESS_WINDOW
#else
styleMask:(NSWindowStyleMask)GDK_QUARTZ_BORDERLESS_WINDOW
#endif
styleMask:NSBorderlessWindowMask
backing:NSBackingStoreBuffered
defer:NO];
@@ -877,14 +876,14 @@ _gdk_quartz_display_create_window_impl (GdkDisplay *display,
((attributes_mask & GDK_WA_TYPE_HINT) &&
attributes->type_hint == GDK_WINDOW_TYPE_HINT_SPLASHSCREEN))
{
style_mask = GDK_QUARTZ_BORDERLESS_WINDOW;
style_mask = NSBorderlessWindowMask;
}
else
{
style_mask = (GDK_QUARTZ_TITLED_WINDOW |
GDK_QUARTZ_CLOSABLE_WINDOW |
GDK_QUARTZ_MINIATURIZABLE_WINDOW |
GDK_QUARTZ_RESIZABLE_WINDOW);
style_mask = (NSTitledWindowMask |
NSClosableWindowMask |
NSMiniaturizableWindowMask |
NSResizableWindowMask);
}
impl->toplevel = [[GdkQuartzNSWindow alloc] initWithContentRect:content_rect
@@ -1144,9 +1143,6 @@ void
gdk_window_quartz_hide (GdkWindow *window)
{
GdkWindowImplQuartz *impl;
GdkDisplay *display = gdk_window_get_display (window);
GdkSeat *seat = gdk_display_get_default_seat (display);
gdk_seat_ungrab (seat);
/* Make sure we're not stuck in fullscreen mode. */
#ifndef AVAILABLE_MAC_OS_X_VERSION_10_7_AND_LATER
@@ -1154,6 +1150,8 @@ gdk_window_quartz_hide (GdkWindow *window)
SetSystemUIMode (kUIModeNormal, 0);
#endif
check_grab_unmap (window);
_gdk_window_clear_update_area (window);
impl = GDK_WINDOW_IMPL_QUARTZ (window->impl);
@@ -1624,7 +1622,7 @@ gdk_window_quartz_get_geometry (GdkWindow *window,
* windows with borders and the root relative coordinates
* otherwise.
*/
if ([impl->toplevel styleMask] == GDK_QUARTZ_BORDERLESS_WINDOW)
if ([impl->toplevel styleMask] == NSBorderlessWindowMask)
{
_gdk_quartz_window_xy_to_gdk_xy (ns_rect.origin.x,
ns_rect.origin.y + ns_rect.size.height,
@@ -2351,14 +2349,13 @@ gdk_quartz_window_set_decorations (GdkWindow *window,
if (decorations == 0 || GDK_WINDOW_TYPE (window) == GDK_WINDOW_TEMP ||
impl->type_hint == GDK_WINDOW_TYPE_HINT_SPLASHSCREEN )
{
new_mask = GDK_QUARTZ_BORDERLESS_WINDOW;
new_mask = NSBorderlessWindowMask;
}
else
{
/* FIXME: Honor other GDK_DECOR_* flags. */
new_mask = (GDK_QUARTZ_TITLED_WINDOW | GDK_QUARTZ_CLOSABLE_WINDOW |
GDK_QUARTZ_MINIATURIZABLE_WINDOW |
GDK_QUARTZ_RESIZABLE_WINDOW);
new_mask = (NSTitledWindowMask | NSClosableWindowMask |
NSMiniaturizableWindowMask | NSResizableWindowMask);
}
GDK_QUARTZ_ALLOC_POOL;
@@ -2376,14 +2373,14 @@ gdk_quartz_window_set_decorations (GdkWindow *window,
/* Properly update the size of the window when the titlebar is
* added or removed.
*/
if (old_mask == GDK_QUARTZ_BORDERLESS_WINDOW &&
new_mask != GDK_QUARTZ_BORDERLESS_WINDOW)
if (old_mask == NSBorderlessWindowMask &&
new_mask != NSBorderlessWindowMask)
{
rect = [NSWindow frameRectForContentRect:rect styleMask:new_mask];
}
else if (old_mask != GDK_QUARTZ_BORDERLESS_WINDOW &&
new_mask == GDK_QUARTZ_BORDERLESS_WINDOW)
else if (old_mask != NSBorderlessWindowMask &&
new_mask == NSBorderlessWindowMask)
{
rect = [NSWindow contentRectForFrameRect:rect styleMask:old_mask];
}
@@ -2399,14 +2396,13 @@ gdk_quartz_window_set_decorations (GdkWindow *window,
[(id<CanSetStyleMask>)impl->toplevel setStyleMask:new_mask];
/* It appears that unsetting and then resetting
* GDK_QUARTZ_TITLED_WINDOW does not reset the title in the
* title bar as might be expected.
/* It appears that unsetting and then resetting NSTitledWindowMask
* does not reset the title in the title bar as might be expected.
*
* In theory we only need to set this if new_mask includes
* GDK_QUARTZ_TITLED_WINDOW. This behaved extremely oddly when
* NSTitledWindowMask. This behaved extremely oddly when
* conditionalized upon that and since it has no side effects (i.e.
* if GDK_QUARTZ_TITLED_WINDOW is not requested, the title will not be
* if NSTitledWindowMask is not requested, the title will not be
* displayed) just do it unconditionally. We also must null check
* 'title' before setting it to avoid crashing.
*/
@@ -2439,7 +2435,7 @@ gdk_quartz_window_set_decorations (GdkWindow *window,
[impl->toplevel setContentView:old_view];
}
if (new_mask == GDK_QUARTZ_BORDERLESS_WINDOW)
if (new_mask == NSBorderlessWindowMask)
{
[impl->toplevel setContentSize:rect.size];
[impl->toplevel setCollectionBehavior:NSWindowCollectionBehaviorFullScreenPrimary];
@@ -2474,7 +2470,7 @@ gdk_quartz_window_get_decorations (GdkWindow *window,
if (decorations)
{
/* Borderless is 0, so we can't check it as a bit being set. */
if ([impl->toplevel styleMask] == GDK_QUARTZ_BORDERLESS_WINDOW)
if ([impl->toplevel styleMask] == NSBorderlessWindowMask)
{
*decorations = 0;
}
@@ -2517,19 +2513,19 @@ gdk_quartz_window_set_functions (GdkWindow *window,
NSUInteger mask = [impl->toplevel styleMask];
if (min)
mask = mask | GDK_QUARTZ_MINIATURIZABLE_WINDOW;
mask = mask | NSMiniaturizableWindowMask;
else
mask = mask & ~GDK_QUARTZ_MINIATURIZABLE_WINDOW;
mask = mask & ~NSMiniaturizableWindowMask;
if (max)
mask = mask | GDK_QUARTZ_RESIZABLE_WINDOW;
mask = mask | NSResizableWindowMask;
else
mask = mask & ~GDK_QUARTZ_RESIZABLE_WINDOW;
mask = mask & ~NSResizableWindowMask;
if (close)
mask = mask | GDK_QUARTZ_CLOSABLE_WINDOW;
mask = mask | NSClosableWindowMask;
else
mask = mask & ~GDK_QUARTZ_CLOSABLE_WINDOW;
mask = mask & ~NSClosableWindowMask;
[impl->toplevel setStyleMask:mask];
}
@@ -2662,7 +2658,7 @@ window_is_fullscreen (GdkWindow *window)
{
GdkWindowImplQuartz *impl = GDK_WINDOW_IMPL_QUARTZ (window->impl);
return ([impl->toplevel styleMask] & GDK_QUARTZ_FULLSCREEN_WINDOW) != 0;
return ([impl->toplevel styleMask] & NSFullScreenWindowMask) != 0;
}
static void
@@ -2838,26 +2834,31 @@ gdk_quartz_window_set_keep_below (GdkWindow *window,
[impl->toplevel setLevel: level - (setting ? 1 : 0)];
}
/* X11 "feature" not useful in other backends. */
static GdkWindow *
gdk_quartz_window_get_group (GdkWindow *window)
{
g_return_val_if_fail (GDK_WINDOW_TYPE (window) != GDK_WINDOW_CHILD, NULL);
if (GDK_WINDOW_DESTROYED (window) ||
!WINDOW_IS_TOPLEVEL (window))
return NULL;
/* FIXME: Implement */
return NULL;
}
/* X11 "feature" not useful in other backends. */
static void
gdk_quartz_window_set_group (GdkWindow *window,
GdkWindow *leader)
{
/* FIXME: Implement */
}
static void
gdk_quartz_window_destroy_notify (GdkWindow *window)
{
GdkDisplay *display = gdk_window_get_display (window);
GdkSeat *seat = gdk_display_get_default_seat (display);
gdk_seat_ungrab (seat);
check_grab_destroy (window);
}
static void
@@ -3103,7 +3104,7 @@ gdk_root_window_impl_quartz_get_context (GdkWindowImplQuartz *window,
colorspace = CGColorSpaceCreateWithName (kCGColorSpaceGenericRGB);
cg_context = CGBitmapContextCreate (NULL,
1, 1, 8, 4, colorspace,
(CGBitmapInfo)kCGImageAlphaPremultipliedLast);
kCGImageAlphaPremultipliedLast);
CGColorSpaceRelease (colorspace);
return cg_context;
+1 -14
View File
@@ -35,20 +35,7 @@ gdk_wayland_app_launch_context_get_startup_notify_id (GAppLaunchContext *context
GAppInfo *info,
GList *files)
{
GdkWaylandDisplay *display;
gchar *id = NULL;
g_object_get (context, "display", &display, NULL);
if (display->gtk_shell_version >= 3)
{
id = g_uuid_string_random ();
gtk_shell1_notify_launch (display->gtk_shell, id);
}
g_object_unref (display);
return id;
return NULL;
}
static void
+19 -19
View File
@@ -336,43 +336,43 @@ _gdk_wayland_display_get_cursor_for_name_with_scale (GdkDisplay *display,
const gchar *name,
guint scale)
{
GdkWaylandCursor *wayland_cursor;
GdkWaylandCursor *private;
GdkWaylandDisplay *display_wayland = GDK_WAYLAND_DISPLAY (display);
g_return_val_if_fail (GDK_IS_DISPLAY (display), NULL);
wayland_cursor = g_hash_table_lookup (display_wayland->cursor_cache, name);
if (wayland_cursor && wayland_cursor->scale == scale)
return GDK_CURSOR (g_object_ref (wayland_cursor));
private = g_hash_table_lookup (display_wayland->cursor_cache, name);
if (private)
return GDK_CURSOR (g_object_ref (private));
wayland_cursor = g_object_new (GDK_TYPE_WAYLAND_CURSOR,
"cursor-type", GDK_CURSOR_IS_PIXMAP,
"display", display,
NULL);
private = g_object_new (GDK_TYPE_WAYLAND_CURSOR,
"cursor-type", GDK_CURSOR_IS_PIXMAP,
"display", display,
NULL);
/* Blank cursor case */
if (!name || g_str_equal (name, "none") || g_str_equal (name, "blank_cursor"))
{
wayland_cursor->name = g_strdup ("none");
wayland_cursor->scale = scale;
private->name = g_strdup ("none");
private->scale = scale;
return GDK_CURSOR (wayland_cursor);
return GDK_CURSOR (private);
}
wayland_cursor->name = g_strdup (name);
wayland_cursor->scale = scale;
private->name = g_strdup (name);
private->scale = scale;
if (!_gdk_wayland_cursor_update (display_wayland, wayland_cursor))
if (!_gdk_wayland_cursor_update (display_wayland, private))
{
g_object_unref (wayland_cursor);
g_object_unref (private);
return NULL;
}
/* Insert into cache. */
g_hash_table_replace (display_wayland->cursor_cache,
wayland_cursor->name,
g_object_ref (wayland_cursor));
return GDK_CURSOR (wayland_cursor);
g_hash_table_insert (display_wayland->cursor_cache,
private->name,
g_object_ref (private));
return GDK_CURSOR (private);
}
GdkCursor *
+1 -1
View File
@@ -83,7 +83,7 @@
#define MIN_SYSTEM_BELL_DELAY_MS 20
#define GTK_SHELL1_VERSION 3
#define GTK_SHELL1_VERSION 2
static void _gdk_wayland_display_load_cursor_theme (GdkWaylandDisplay *display_wayland);
+51 -331
View File
@@ -29,7 +29,6 @@
#include "gdkmonitor-wayland.h"
#include "gdkwayland.h"
#include "gdkprivate-wayland.h"
#include "gdk-private.h"
#include "wm-button-layout-translation.h"
@@ -72,7 +71,6 @@ struct _GdkWaylandScreen
GHashTable *settings;
GsdXftSettings xft_settings;
GsdExtSettings dbus_settings;
GDBusProxy *settings_portal;
GDBusProxy *dbus_proxy;
GCancellable *dbus_cancellable;
@@ -128,10 +126,7 @@ gdk_wayland_screen_finalize (GObject *object)
g_object_unref (screen_wayland->visual);
if (screen_wayland->settings)
g_hash_table_destroy (screen_wayland->settings);
g_clear_object (&screen_wayland->settings_portal);
g_hash_table_destroy (screen_wayland->settings);
g_free (screen_wayland->dbus_settings.modules);
@@ -243,19 +238,6 @@ typedef enum
GSD_FONT_ANTIALIASING_MODE_RGBA
} GsdFontAntialiasingMode;
static int
get_antialiasing (const char *s)
{
const char *names[] = { "none", "grayscale", "rgba" };
int i;
for (i = 0; i < G_N_ELEMENTS (names); i++)
if (strcmp (s, names[i]) == 0)
return i;
return 0;
}
typedef enum
{
GSD_FONT_HINTING_NONE,
@@ -264,19 +246,6 @@ typedef enum
GSD_FONT_HINTING_FULL
} GsdFontHinting;
static int
get_hinting (const char *s)
{
const char *names[] = { "none", "slight", "medium", "full" };
int i;
for (i = 0; i < G_N_ELEMENTS (names); i++)
if (strcmp (s, names[i]) == 0)
return i;
return 0;
}
typedef enum
{
GSD_FONT_RGBA_ORDER_RGBA,
@@ -286,19 +255,6 @@ typedef enum
GSD_FONT_RGBA_ORDER_VBGR
} GsdFontRgbaOrder;
static int
get_order (const char *s)
{
const char *names[] = { "rgba", "rgb", "bgr", "vrgb", "vbgr" };
int i;
for (i = 0; i < G_N_ELEMENTS (names); i++)
if (strcmp (s, names[i]) == 0)
return i;
return 0;
}
static gdouble
get_dpi_from_gsettings (GdkWaylandScreen *screen_wayland)
{
@@ -315,25 +271,6 @@ get_dpi_from_gsettings (GdkWaylandScreen *screen_wayland)
return 96.0 * factor;
}
/* When using the Settings portal, we cache the value in
* the fallback member, and we ignore the valid field
*/
typedef struct _TranslationEntry TranslationEntry;
struct _TranslationEntry {
gboolean valid;
const gchar *schema;
const gchar *key;
const gchar *setting;
GType type;
union {
const char *s;
gint i;
gboolean b;
} fallback;
};
static TranslationEntry * find_translation_entry_by_schema (const char *schema,
const char *key);
static void
update_xft_settings (GdkScreen *screen)
{
@@ -344,48 +281,25 @@ update_xft_settings (GdkScreen *screen)
GsdFontRgbaOrder order;
gboolean use_rgba = FALSE;
GsdXftSettings xft_settings;
double dpi;
if (screen_wayland->settings_portal)
settings = g_hash_table_lookup (screen_wayland->settings, "org.gnome.settings-daemon.plugins.xsettings");
if (settings)
{
TranslationEntry *entry;
entry = find_translation_entry_by_schema ("org.gnome.settings-daemon.plugins.xsettings", "antialiasing");
antialiasing = entry->fallback.i;
entry = find_translation_entry_by_schema ("org.gnome.settings-daemon.plugins.xsettings", "hinting");
hinting = entry->fallback.i;
entry = find_translation_entry_by_schema ("org.gnome.settings-daemon.plugins.xsettings", "rgba-order");
order = entry->fallback.i;
entry = find_translation_entry_by_schema ("org.gnome.desktop.interface", "text-scaling-factor");
dpi = 96.0 * entry->fallback.i / 65536.0 * 1024; /* Xft wants 1/1024th of an inch */
antialiasing = g_settings_get_enum (settings, "antialiasing");
hinting = g_settings_get_enum (settings, "hinting");
order = g_settings_get_enum (settings, "rgba-order");
}
else
{
settings = g_hash_table_lookup (screen_wayland->settings,
"org.gnome.settings-daemon.plugins.xsettings");
if (settings)
{
antialiasing = g_settings_get_enum (settings, "antialiasing");
hinting = g_settings_get_enum (settings, "hinting");
order = g_settings_get_enum (settings, "rgba-order");
}
else
{
antialiasing = GSD_FONT_ANTIALIASING_MODE_GRAYSCALE;
hinting = GSD_FONT_HINTING_MEDIUM;
order = GSD_FONT_RGBA_ORDER_RGB;
}
dpi = get_dpi_from_gsettings (screen_wayland) * 1024;
antialiasing = GSD_FONT_ANTIALIASING_MODE_GRAYSCALE;
hinting = GSD_FONT_HINTING_MEDIUM;
order = GSD_FONT_RGBA_ORDER_RGB;
}
xft_settings.antialias = (antialiasing != GSD_FONT_ANTIALIASING_MODE_NONE);
xft_settings.hinting = (hinting != GSD_FONT_HINTING_NONE);
xft_settings.dpi = dpi;
xft_settings.dpi = get_dpi_from_gsettings (screen_wayland) * 1024; /* Xft wants 1/1024ths of an inch */
xft_settings.rgba = "rgb";
xft_settings.hintstyle = "hintfull";
@@ -489,9 +403,22 @@ update_xft_settings (GdkScreen *screen)
#define WM_SETTINGS_SCHEMA "org.gnome.desktop.wm.preferences"
#define CLASSIC_WM_SETTINGS_SCHEMA "org.gnome.shell.extensions.classic-overrides"
typedef struct _TranslationEntry TranslationEntry;
struct _TranslationEntry {
gboolean valid;
const gchar *schema;
const gchar *key;
const gchar *setting;
GType type;
union {
const gchar *s;
gint i;
gboolean b;
} fallback;
};
static TranslationEntry translations[] = {
{ FALSE, "org.gnome.desktop.interface", "gtk-theme", "gtk-theme-name" , G_TYPE_STRING, { .s = "Adwaita" } },
{ FALSE, "org.gnome.desktop.interface", "gtk-key-theme", "gtk-key-theme-name" , G_TYPE_STRING, { .s = "Default" } },
{ FALSE, "org.gnome.desktop.interface", "icon-theme", "gtk-icon-theme-name", G_TYPE_STRING, { .s = "gnome" } },
{ FALSE, "org.gnome.desktop.interface", "cursor-theme", "gtk-cursor-theme-name", G_TYPE_STRING, { .s = "Adwaita" } },
{ FALSE, "org.gnome.desktop.interface", "cursor-size", "gtk-cursor-theme-size", G_TYPE_INT, { .i = 32 } },
@@ -519,39 +446,31 @@ static TranslationEntry translations[] = {
{ FALSE, "org.gnome.desktop.wm.preferences", "action-double-click-titlebar", "gtk-titlebar-double-click", G_TYPE_STRING, { .s = "toggle-maximize" } },
{ FALSE, "org.gnome.desktop.wm.preferences", "action-middle-click-titlebar", "gtk-titlebar-middle-click", G_TYPE_STRING, { .s = "none" } },
{ FALSE, "org.gnome.desktop.wm.preferences", "action-right-click-titlebar", "gtk-titlebar-right-click", G_TYPE_STRING, { .s = "menu" } },
{ FALSE, "org.gnome.desktop.a11y", "always-show-text-caret", "gtk-keynav-use-caret", G_TYPE_BOOLEAN, { .b = FALSE } },
{ FALSE, "org.gnome.fontconfig", "serial", "gtk-fontconfig-timestamp", G_TYPE_INT, { .i = 0 } }
{ FALSE, "org.gnome.desktop.a11y", "always-show-text-caret", "gtk-keynav-use-caret", G_TYPE_BOOLEAN, { .b = FALSE } }
};
static TranslationEntry *
find_translation_entry_by_schema (const char *schema,
const gchar *key)
find_translation_entry_by_key (GSettings *settings,
const gchar *key)
{
guint i;
gchar *schema;
g_object_get (settings, "schema", &schema, NULL);
for (i = 0; i < G_N_ELEMENTS (translations); i++)
{
if (g_str_equal (schema, translations[i].schema) &&
g_str_equal (key, translations[i].key))
return &translations[i];
{
g_free (schema);
return &translations[i];
}
}
return NULL;
}
static TranslationEntry *
find_translation_entry_by_key (GSettings *settings,
const char *key)
{
char *schema;
TranslationEntry *entry;
g_object_get (settings, "schema", &schema, NULL);
entry = find_translation_entry_by_schema (schema, key);
g_free (schema);
return entry;
return NULL;
}
static TranslationEntry *
@@ -586,78 +505,6 @@ settings_changed (GSettings *settings,
}
}
static void
apply_portal_setting (TranslationEntry *entry,
GVariant *value,
GdkScreen *screen)
{
switch (entry->type)
{
case G_TYPE_STRING:
entry->fallback.s = g_intern_string (g_variant_get_string (value, NULL));
break;
case G_TYPE_INT:
entry->fallback.i = g_variant_get_int32 (value);
break;
case G_TYPE_BOOLEAN:
entry->fallback.b = g_variant_get_boolean (value);
break;
case G_TYPE_NONE:
if (strcmp (entry->key, "antialiasing") == 0)
entry->fallback.i = get_antialiasing (g_variant_get_string (value, NULL));
else if (strcmp (entry->key, "hinting") == 0)
entry->fallback.i = get_hinting (g_variant_get_string (value, NULL));
else if (strcmp (entry->key, "rgba-order") == 0)
entry->fallback.i = get_order (g_variant_get_string (value, NULL));
else if (strcmp (entry->key, "text-scaling-factor") == 0)
entry->fallback.i = (int) (g_variant_get_double (value) * 65536.0);
update_xft_settings (screen);
break;
default:
break;
}
}
static void
settings_portal_changed (GDBusProxy *proxy,
const char *sender_name,
const char *signal_name,
GVariant *parameters,
GdkScreen *screen)
{
if (strcmp (signal_name, "SettingChanged") == 0)
{
const char *namespace;
const char *name;
GVariant *value;
TranslationEntry *entry;
g_variant_get (parameters, "(&s&sv)", &namespace, &name, &value);
entry = find_translation_entry_by_schema (namespace, name);
if (entry != NULL)
{
char *a = g_variant_print (value, FALSE);
g_debug ("Using changed portal setting %s %s: %s", namespace, name, a);
g_free (a);
apply_portal_setting (entry, value, screen);
notify_setting (screen, entry->setting);
}
else
g_debug ("Ignoring portal setting %s %s", namespace, name);
g_variant_unref (value);
}
}
static void fontconfig_dbus_proxy_open_cb (GObject *object,
GAsyncResult *result,
gpointer user_data);
#define PORTAL_BUS_NAME "org.freedesktop.portal.Desktop"
#define PORTAL_OBJECT_PATH "/org/freedesktop/portal/desktop"
#define PORTAL_SETTINGS_INTERFACE "org.freedesktop.portal.Settings"
static void
init_settings (GdkScreen *screen)
{
@@ -667,96 +514,6 @@ init_settings (GdkScreen *screen)
GSettings *settings;
gint i;
if (gdk_should_use_portal ())
{
GVariant *ret;
GError *error = NULL;
const char *schema;
GVariant *val;
GVariantIter *iter;
const char *patterns[] = { "org.gnome.*", NULL };
screen_wayland->settings_portal = g_dbus_proxy_new_for_bus_sync (G_BUS_TYPE_SESSION,
G_DBUS_PROXY_FLAGS_NONE,
NULL,
PORTAL_BUS_NAME,
PORTAL_OBJECT_PATH,
PORTAL_SETTINGS_INTERFACE,
NULL,
&error);
if (error)
{
g_warning ("Settings portal not found: %s", error->message);
g_error_free (error);
goto fallback;
}
ret = g_dbus_proxy_call_sync (screen_wayland->settings_portal,
"ReadAll",
g_variant_new ("(^as)", patterns),
G_DBUS_CALL_FLAGS_NONE,
G_MAXINT,
NULL,
&error);
if (error)
{
g_warning ("Failed to read portal settings: %s", error->message);
g_error_free (error);
g_clear_object (&screen_wayland->settings_portal);
goto fallback;
}
g_variant_get (ret, "(a{sa{sv}})", &iter);
while (g_variant_iter_loop (iter, "{s@a{sv}}", &schema, &val))
{
GVariantIter *iter2 = g_variant_iter_new (val);
const char *key;
GVariant *v;
while (g_variant_iter_loop (iter2, "{sv}", &key, &v))
{
TranslationEntry *entry = find_translation_entry_by_schema (schema, key);
if (entry)
{
char *a = g_variant_print (v, FALSE);
g_debug ("Using portal setting for %s %s: %s\n", schema, key, a);
g_free (a);
apply_portal_setting (entry, v, screen);
}
else
{
g_debug ("Ignoring portal setting for %s %s", schema, key);
}
}
g_variant_iter_free (iter2);
}
g_variant_iter_free (iter);
g_variant_unref (ret);
g_signal_connect (screen_wayland->settings_portal, "g-signal",
G_CALLBACK (settings_portal_changed), screen_wayland);
return;
fallback:
g_debug ("Failed to use Settings portal; falling back to gsettings");
}
screen_wayland->dbus_cancellable = g_cancellable_new ();
g_dbus_proxy_new_for_bus (G_BUS_TYPE_SESSION,
G_DBUS_PROXY_FLAGS_NONE,
NULL,
GTK_SETTINGS_DBUS_NAME,
GTK_SETTINGS_DBUS_PATH,
GTK_SETTINGS_DBUS_NAME,
screen_wayland->dbus_cancellable,
fontconfig_dbus_proxy_open_cb,
screen_wayland);
screen_wayland->settings = g_hash_table_new_full (g_str_hash, g_str_equal, NULL, g_object_unref);
source = g_settings_schema_source_get_default ();
@@ -824,44 +581,6 @@ set_value_from_entry (GdkScreen *screen,
GdkWaylandScreen *screen_wayland = GDK_WAYLAND_SCREEN (screen);
GSettings *settings;
if (screen_wayland->settings_portal)
{
switch (entry->type)
{
case G_TYPE_STRING:
g_value_set_string (value, entry->fallback.s);
break;
case G_TYPE_INT:
if (g_str_equal (entry->setting, "gtk-fontconfig-timestamp"))
g_value_set_uint (value, (guint)entry->fallback.i);
else
g_value_set_int (value, entry->fallback.i);
break;
case G_TYPE_BOOLEAN:
g_value_set_boolean (value, entry->fallback.b);
break;
case G_TYPE_NONE:
if (g_str_equal (entry->setting, "gtk-xft-antialias"))
g_value_set_int (value, screen_wayland->xft_settings.antialias);
else if (g_str_equal (entry->setting, "gtk-xft-hinting"))
g_value_set_int (value, screen_wayland->xft_settings.hinting);
else if (g_str_equal (entry->setting, "gtk-xft-hintstyle"))
g_value_set_static_string (value, screen_wayland->xft_settings.hintstyle);
else if (g_str_equal (entry->setting, "gtk-xft-rgba"))
g_value_set_static_string (value, screen_wayland->xft_settings.rgba);
else if (g_str_equal (entry->setting, "gtk-xft-dpi"))
g_value_set_int (value, screen_wayland->xft_settings.dpi);
else
g_assert_not_reached ();
break;
default:
g_assert_not_reached ();
break;
}
return;
}
settings = (GSettings *)g_hash_table_lookup (screen_wayland->settings, entry->schema);
switch (entry->type)
{
@@ -879,12 +598,9 @@ set_value_from_entry (GdkScreen *screen,
}
break;
case G_TYPE_INT:
if (g_str_equal (entry->setting, "gtk-fontconfig-timestamp"))
g_value_set_uint (value, screen_wayland->dbus_settings.fontconfig_timestamp);
else
g_value_set_int (value, settings && entry->valid
? g_settings_get_int (settings, entry->key)
: entry->fallback.i);
g_value_set_int (value, settings && entry->valid
? g_settings_get_int (settings, entry->key)
: entry->fallback.i);
break;
case G_TYPE_BOOLEAN:
g_value_set_boolean (value, settings && entry->valid
@@ -919,12 +635,6 @@ set_decoration_layout_from_entry (GdkScreen *screen,
GSettings *settings = NULL;
const char *session;
if (screen_wayland->settings_portal)
{
g_value_set_string (value, entry->fallback.s);
return;
}
/* Hack: until we get session-dependent defaults in GSettings,
* swap out the usual schema for the "classic" one when
* running in classic mode
@@ -973,8 +683,7 @@ gdk_wayland_screen_get_setting (GdkScreen *screen,
g_return_val_if_fail (GDK_IS_SCREEN (screen), FALSE);
if (wayland_screen->settings != NULL &&
g_hash_table_size (wayland_screen->settings) == 0)
if (g_settings_schema_source_get_default () == NULL)
return FALSE;
entry = find_translation_entry_by_setting (name);
@@ -1275,6 +984,17 @@ _gdk_wayland_screen_new (GdkDisplay *display)
screen_wayland->width,
screen_wayland->height);
screen_wayland->dbus_cancellable = g_cancellable_new ();
g_dbus_proxy_new_for_bus (G_BUS_TYPE_SESSION,
G_DBUS_PROXY_FLAGS_NONE,
NULL,
GTK_SETTINGS_DBUS_NAME,
GTK_SETTINGS_DBUS_PATH,
GTK_SETTINGS_DBUS_NAME,
screen_wayland->dbus_cancellable,
fontconfig_dbus_proxy_open_cb,
screen_wayland);
init_settings (screen);
return screen;
+20 -68
View File
@@ -140,7 +140,6 @@ struct _GdkWindowImplWayland
EGLSurface dummy_egl_surface;
unsigned int initial_configure_received : 1;
unsigned int configuring_popup : 1;
unsigned int mapped : 1;
unsigned int use_custom_surface : 1;
unsigned int pending_buffer_attached : 1;
@@ -159,9 +158,6 @@ struct _GdkWindowImplWayland
int pending_buffer_offset_x;
int pending_buffer_offset_y;
int subsurface_x;
int subsurface_y;
gchar *title;
struct {
@@ -933,9 +929,6 @@ gdk_window_impl_wayland_end_paint (GdkWindow *window)
cairo_rectangle_int_t rect;
int i, n;
if (!GDK_WINDOW_IS_MAPPED (window))
return;
if (impl->staging_cairo_surface &&
_gdk_wayland_is_shm_surface (impl->staging_cairo_surface) &&
!window->current_paint.use_gl &&
@@ -1089,18 +1082,12 @@ gdk_wayland_window_maybe_configure (GdkWindow *window,
is_xdg_popup = is_realized_popup (window);
is_visible = gdk_window_is_visible (window);
if (is_xdg_popup &&
is_visible &&
!impl->initial_configure_received &&
!impl->configuring_popup)
if (is_xdg_popup && is_visible && !impl->initial_configure_received)
gdk_window_hide (window);
gdk_wayland_window_configure (window, width, height, scale);
if (is_xdg_popup &&
is_visible &&
!impl->initial_configure_received &&
!impl->configuring_popup)
if (is_xdg_popup && is_visible && !impl->initial_configure_received)
gdk_window_show (window);
}
@@ -1433,22 +1420,6 @@ on_parent_surface_committed (GdkWindowImplWayland *parent_impl,
gdk_wayland_set_input_region_if_empty (window);
}
static void
gdk_wayland_window_set_subsurface_position (GdkWindow *window,
int x,
int y)
{
GdkWindowImplWayland *impl;
impl = GDK_WINDOW_IMPL_WAYLAND (window->impl);
wl_subsurface_set_position (impl->display_server.wl_subsurface, x, y);
impl->subsurface_x = x;
impl->subsurface_y = y;
gdk_window_request_transient_parent_commit (window);
}
static void
gdk_wayland_window_create_subsurface (GdkWindow *window)
{
@@ -1472,6 +1443,9 @@ gdk_wayland_window_create_subsurface (GdkWindow *window)
impl->display_server.wl_subsurface =
wl_subcompositor_get_subsurface (display_wayland->subcompositor,
impl->display_server.wl_surface, parent_impl->display_server.wl_surface);
wl_subsurface_set_position (impl->display_server.wl_subsurface,
window->x + window->abs_x,
window->y + window->abs_y);
/* In order to synchronize the initial position with the initial frame
* content, wait with making the subsurface desynchronized until after
@@ -1481,10 +1455,7 @@ gdk_wayland_window_create_subsurface (GdkWindow *window)
g_signal_connect_object (parent_impl, "committed",
G_CALLBACK (on_parent_surface_committed),
window, 0);
gdk_wayland_window_set_subsurface_position (window,
window->x + window->abs_x,
window->y + window->abs_y);
gdk_window_request_transient_parent_commit (window);
}
}
@@ -1906,8 +1877,6 @@ gdk_wayland_window_handle_configure_popup (GdkWindow *window,
&flipped_x,
&flipped_y);
impl->position_method = POSITION_METHOD_MOVE_TO_RECT;
g_signal_emit_by_name (window,
"moved-to-rect",
&flipped_rect,
@@ -2420,11 +2389,9 @@ calculate_moved_to_rect_result (GdkWindow *window,
window_width = width + window->shadow_left + window->shadow_right;
window_height = height + window->shadow_top + window->shadow_bottom;
impl->configuring_popup = TRUE;
gdk_window_move_resize (window,
window_x, window_y,
window_width, window_height);
impl->configuring_popup = FALSE;
calculate_popup_rect (window,
impl->pending_move_to_rect.rect_anchor,
@@ -2839,9 +2806,6 @@ should_map_as_popup (GdkWindow *window)
break;
}
if (impl->position_method == POSITION_METHOD_MOVE_TO_RECT)
return TRUE;
return FALSE;
}
@@ -3296,13 +3260,12 @@ gdk_window_wayland_move_resize (GdkWindow *window,
window->y = y;
impl->position_method = POSITION_METHOD_MOVE_RESIZE;
if (impl->display_server.wl_subsurface &&
(x + window->abs_x != impl->subsurface_x ||
y + window->abs_y != impl->subsurface_y))
if (impl->display_server.wl_subsurface)
{
gdk_wayland_window_set_subsurface_position (window,
x + window->abs_x,
y + window->abs_y);
wl_subsurface_set_position (impl->display_server.wl_subsurface,
window->x + window->abs_x,
window->y + window->abs_y);
gdk_window_request_transient_parent_commit (window);
}
}
}
@@ -3532,20 +3495,14 @@ gdk_wayland_window_focus (GdkWindow *window,
if (!impl->display_server.gtk_surface)
return;
/* We didn't have an event to fetch a time from, meaning we have nothing valid
* to send. This should rather be translated to a 'needs-attention' request or
* something.
*/
if (timestamp == GDK_CURRENT_TIME)
{
GdkWaylandDisplay *display_wayland =
GDK_WAYLAND_DISPLAY (gdk_window_get_display (window));
return;
if (display_wayland->gtk_shell_version >= 3)
{
gtk_surface1_request_focus (impl->display_server.gtk_surface,
display_wayland->startup_notification_id);
g_clear_pointer (&display_wayland->startup_notification_id, g_free);
}
}
else
gtk_surface1_present (impl->display_server.gtk_surface, timestamp);
gtk_surface1_present (impl->display_server.gtk_surface, timestamp);
}
static void
@@ -3842,7 +3799,6 @@ gdk_wayland_window_set_transient_for (GdkWindow *window,
GdkWaylandDisplay *display_wayland =
GDK_WAYLAND_DISPLAY (gdk_window_get_display (window));
GdkWindow *previous_parent;
gboolean was_subsurface = FALSE;
g_assert (parent == NULL ||
gdk_window_get_display (window) == gdk_window_get_display (parent));
@@ -3856,10 +3812,7 @@ gdk_wayland_window_set_transient_for (GdkWindow *window,
unset_transient_for_exported (window);
if (impl->display_server.wl_subsurface)
{
was_subsurface = TRUE;
unmap_subsurface (window);
}
unmap_subsurface (window);
previous_parent = impl->transient_for;
impl->transient_for = parent;
@@ -3872,10 +3825,9 @@ gdk_wayland_window_set_transient_for (GdkWindow *window,
display_wayland->orphan_dialogs =
g_list_remove (display_wayland->orphan_dialogs, window);
}
gdk_wayland_window_sync_parent (window, NULL);
if (was_subsurface && parent)
if (should_map_as_subsurface (window) &&
parent && gdk_window_is_visible (window))
gdk_wayland_window_create_subsurface (window);
}
+2 -12
View File
@@ -1,6 +1,6 @@
<protocol name="gtk">
<interface name="gtk_shell1" version="3">
<interface name="gtk_shell1" version="2">
<description summary="gtk specific extensions">
gtk_shell is a protocol extension providing additional features for
clients implementing it.
@@ -28,14 +28,9 @@
<request name="system_bell">
<arg name="surface" type="object" interface="gtk_surface1" allow-null="true"/>
</request>
<!-- Version 3 additions -->
<request name="notify_launch" since="3">
<arg name="startup_id" type="string"/>
</request>
</interface>
<interface name="gtk_surface1" version="3">
<interface name="gtk_surface1" version="2">
<request name="set_dbus_properties">
<arg name="application_id" type="string" allow-null="true"/>
<arg name="app_menu_path" type="string" allow-null="true"/>
@@ -77,11 +72,6 @@
<event name="configure_edges" since="2">
<arg name="constraints" type="array"/>
</event>
<!-- Version 3 additions -->
<request name="request_focus" since="3">
<arg name="startup_id" type="string" allow-null="true"/>
</request>
</interface>
</protocol>
+7 -48
View File
@@ -1930,7 +1930,7 @@ ensure_stacking_on_unminimize (MSG *msg)
g_print (" restacking %p above %p",
msg->hwnd, lowest_transient));
SetWindowPos (msg->hwnd, lowest_transient, 0, 0, 0, 0,
SWP_NOACTIVATE | SWP_NOMOVE | SWP_NOSIZE | SWP_NOOWNERZORDER);
SWP_NOACTIVATE | SWP_NOMOVE | SWP_NOSIZE);
}
}
@@ -2011,7 +2011,7 @@ ensure_stacking_on_activate_app (MSG *msg,
impl->transient_owner != NULL)
{
SetWindowPos (msg->hwnd, HWND_TOP, 0, 0, 0, 0,
SWP_NOACTIVATE | SWP_NOMOVE | SWP_NOSIZE | SWP_NOOWNERZORDER);
SWP_NOACTIVATE | SWP_NOMOVE | SWP_NOSIZE);
return;
}
@@ -2053,7 +2053,7 @@ ensure_stacking_on_activate_app (MSG *msg,
g_print (" restacking %p above %p",
msg->hwnd, rover));
SetWindowPos (msg->hwnd, rover, 0, 0, 0, 0,
SWP_NOACTIVATE | SWP_NOMOVE | SWP_NOSIZE | SWP_NOOWNERZORDER);
SWP_NOACTIVATE | SWP_NOMOVE | SWP_NOSIZE);
break;
}
}
@@ -2242,25 +2242,6 @@ _gdk_win32_window_fill_min_max_info (GdkWindow *window,
return TRUE;
}
static void
gdk_settings_notify (GdkWindow *window,
const char *name,
GdkSettingAction action)
{
GdkEvent *new_event;
if (!g_str_has_prefix (name, "gtk-"))
return;
new_event = gdk_event_new (GDK_SETTING);
new_event->setting.window = window;
new_event->setting.send_event = FALSE;
new_event->setting.action = action;
new_event->setting.name = g_strdup (name);
_gdk_win32_append_event (new_event);
}
#define GDK_ANY_BUTTON_MASK (GDK_BUTTON1_MASK | \
GDK_BUTTON2_MASK | \
GDK_BUTTON3_MASK | \
@@ -2475,7 +2456,6 @@ gdk_event_translate (MSG *msg,
(gulong) msg->wParam,
(gpointer) msg->lParam, _gdk_input_locale_is_ime ? " (IME)" : "",
_gdk_input_codepage));
gdk_settings_notify (window, "gtk-im-module", GDK_SETTING_ACTION_CHANGED);
break;
case WM_SYSKEYUP:
@@ -3091,20 +3071,13 @@ gdk_event_translate (MSG *msg,
event = gdk_event_new (GDK_SCROLL);
event->scroll.window = window;
event->scroll.direction = GDK_SCROLL_SMOOTH;
if (msg->message == WM_MOUSEWHEEL)
{
event->scroll.delta_y = (gdouble) GET_WHEEL_DELTA_WPARAM (msg->wParam) / (gdouble) WHEEL_DELTA;
}
event->scroll.direction = (((short) HIWORD (msg->wParam)) > 0) ?
GDK_SCROLL_UP : GDK_SCROLL_DOWN;
else if (msg->message == WM_MOUSEHWHEEL)
{
event->scroll.delta_x = (gdouble) GET_WHEEL_DELTA_WPARAM (msg->wParam) / (gdouble) WHEEL_DELTA;
}
/* Positive delta scrolls up, not down,
see API documentation for WM_MOUSEWHEEL message.
*/
event->scroll.delta_y *= -1.0;
event->scroll.direction = (((short) HIWORD (msg->wParam)) > 0) ?
GDK_SCROLL_RIGHT : GDK_SCROLL_LEFT;
event->scroll.time = _gdk_win32_get_next_tick (msg->time);
event->scroll.x = (gint16) point.x / impl->window_scale;
event->scroll.y = (gint16) point.y / impl->window_scale;
@@ -3114,20 +3087,6 @@ gdk_event_translate (MSG *msg,
gdk_event_set_device (event, device_manager_win32->core_pointer);
gdk_event_set_source_device (event, device_manager_win32->system_pointer);
gdk_event_set_seat (event, gdk_device_get_seat (device_manager_win32->core_pointer));
gdk_event_set_pointer_emulated (event, FALSE);
_gdk_win32_append_event (gdk_event_copy (event));
/* Append the discrete version too */
if (msg->message == WM_MOUSEWHEEL)
event->scroll.direction = (((short) HIWORD (msg->wParam)) > 0) ?
GDK_SCROLL_UP : GDK_SCROLL_DOWN;
else if (msg->message == WM_MOUSEHWHEEL)
event->scroll.direction = (((short) HIWORD (msg->wParam)) > 0) ?
GDK_SCROLL_RIGHT : GDK_SCROLL_LEFT;
event->scroll.delta_x = 0;
event->scroll.delta_y = 0;
gdk_event_set_pointer_emulated (event, TRUE);
_gdk_win32_append_event (event);
+48 -89
View File
@@ -27,7 +27,6 @@
#include <string.h>
#include <stdlib.h>
#include <glib/gprintf.h>
#include <pango/pangowin32.h>
#include "gdkscreen.h"
#include "gdkproperty.h"
@@ -240,32 +239,6 @@ _gdk_win32_window_delete_property (GdkWindow *window,
}
}
static gchar*
_get_system_font_name (HDC hdc)
{
NONCLIENTMETRICSW ncm;
PangoFontDescription *font_desc;
gchar *result, *font_desc_string;
int logpixelsy;
gint font_size;
ncm.cbSize = sizeof(NONCLIENTMETRICSW);
if (!SystemParametersInfoW (SPI_GETNONCLIENTMETRICS, ncm.cbSize, &ncm, 0))
return NULL;
logpixelsy = GetDeviceCaps (hdc, LOGPIXELSY);
font_desc = pango_win32_font_description_from_logfontw (&ncm.lfMessageFont);
font_desc_string = pango_font_description_to_string (font_desc);
pango_font_description_free (font_desc);
/* https://docs.microsoft.com/en-us/windows/desktop/api/wingdi/ns-wingdi-taglogfonta */
font_size = -MulDiv (ncm.lfMessageFont.lfHeight, 72, logpixelsy);
result = g_strdup_printf ("%s %d", font_desc_string, font_size);
g_free (font_desc_string);
return result;
}
/*
For reference, from gdk/x11/gdksettings.c:
@@ -360,75 +333,61 @@ _gdk_win32_screen_get_setting (GdkScreen *screen,
g_value_set_boolean (value, TRUE);
return TRUE;
}
else if (strcmp ("gtk-xft-hinting", name) == 0)
{
GDK_NOTE(MISC, g_print ("gdk_screen_get_setting(\"%s\") : 1\n", name));
g_value_set_int (value, 1);
return TRUE;
}
else if (strcmp ("gtk-xft-antialias", name) == 0)
{
GDK_NOTE(MISC, g_print ("gdk_screen_get_setting(\"%s\") : 1\n", name));
g_value_set_int (value, 1);
return TRUE;
}
else if (strcmp ("gtk-xft-hintstyle", name) == 0)
{
g_value_set_static_string (value, "hintfull");
GDK_NOTE(MISC, g_print ("gdk_screen_get_setting(\"%s\") : %s\n", name, g_value_get_string (value)));
return TRUE;
}
else if (strcmp ("gtk-xft-rgba", name) == 0)
{
unsigned int orientation = 0;
if (SystemParametersInfoW (SPI_GETFONTSMOOTHINGORIENTATION, 0, &orientation, 0))
{
if (orientation == FE_FONTSMOOTHINGORIENTATIONRGB)
g_value_set_static_string (value, "rgb");
else if (orientation == FE_FONTSMOOTHINGORIENTATIONBGR)
g_value_set_static_string (value, "bgr");
else
g_value_set_static_string (value, "none");
}
else
g_value_set_static_string (value, "none");
GDK_NOTE(MISC, g_print ("gdk_screen_get_setting(\"%s\") : %s\n", name, g_value_get_string (value)));
return TRUE;
}
else if (strcmp ("gtk-font-name", name) == 0)
{
gchar *font_name = _get_system_font_name (_gdk_display_hdc);
NONCLIENTMETRICS ncm;
CPINFOEX cpinfoex_default, cpinfoex_curr_thread;
OSVERSIONINFO info;
BOOL result_default, result_curr_thread;
if (font_name)
info.dwOSVersionInfoSize = sizeof (OSVERSIONINFO);
/* TODO: Fallback to using Pango on Windows 8 and later,
* as this method of handling gtk-font-name does not work
* well there, where garbled text will be displayed for texts
* that are not supported by the default menu font. Look for
* whether there is a better solution for this on Windows 8 and
* later
*/
if (!GetVersionEx (&info) ||
info.dwMajorVersion > 6 ||
(info.dwMajorVersion == 6 && info.dwMinorVersion >= 2))
return FALSE;
/* check whether the system default ANSI codepage matches the
* ANSI code page of the running thread. If so, continue, otherwise
* fall back to using Pango to handle gtk-font-name
*/
result_default = GetCPInfoEx (CP_ACP, 0, &cpinfoex_default);
result_curr_thread = GetCPInfoEx (CP_THREAD_ACP, 0, &cpinfoex_curr_thread);
if (!result_default ||
!result_curr_thread ||
cpinfoex_default.CodePage != cpinfoex_curr_thread.CodePage)
return FALSE;
ncm.cbSize = sizeof(NONCLIENTMETRICS);
if (SystemParametersInfo (SPI_GETNONCLIENTMETRICS, ncm.cbSize, &ncm, FALSE))
{
/* The pango font fallback list got fixed during 1.43, before that
* using anything but "Segoe UI" would lead to a poor glyph coverage */
if (pango_version_check (1, 43, 0) != NULL &&
g_ascii_strncasecmp (font_name, "Segoe UI", strlen ("Segoe UI")) != 0)
/* Pango finally uses GetDeviceCaps to scale, we use simple
* approximation here.
*/
int nHeight = (0 > ncm.lfMenuFont.lfHeight ? - 3 * ncm.lfMenuFont.lfHeight / 4 : 10);
if (OUT_STRING_PRECIS == ncm.lfMenuFont.lfOutPrecision)
GDK_NOTE(MISC, g_print("gdk_screen_get_setting(%s) : ignoring bitmap font '%s'\n",
name, ncm.lfMenuFont.lfFaceName));
else if (ncm.lfMenuFont.lfFaceName && strlen(ncm.lfMenuFont.lfFaceName) > 0 &&
/* Avoid issues like those described in bug #135098 */
g_utf8_validate (ncm.lfMenuFont.lfFaceName, -1, NULL))
{
g_free (font_name);
return FALSE;
char *s = g_strdup_printf ("%s %d", ncm.lfMenuFont.lfFaceName, nHeight);
GDK_NOTE(MISC, g_print("gdk_screen_get_setting(%s) : %s\n", name, s));
g_value_set_string (value, s);
g_free(s);
return TRUE;
}
GDK_NOTE(MISC, g_print("gdk_screen_get_setting(\"%s\") : %s\n", name, font_name));
g_value_take_string (value, font_name);
return TRUE;
}
else
{
g_warning ("gdk_screen_get_setting: Detecting the system font failed");
return FALSE;
}
}
else if (strcmp ("gtk-im-module", name) == 0)
{
if (_gdk_input_locale_is_ime)
g_value_set_string (value, "ime");
else
g_value_set_string (value, "");
return TRUE;
}
return FALSE;
+36
View File
@@ -490,6 +490,10 @@ gdk_win32_selection_init (GdkWin32Selection *win32_selection)
fmt.format = _gdk_cf_array_index (cfs, GDK_WIN32_CF_INDEX_PNG);
g_array_append_val (comp, fmt);
fmt.format = CF_DIB;
fmt.transmute = TRUE;
g_array_append_val (comp, fmt);
g_hash_table_replace (win32_selection->compatibility_formats, fmt.target, comp);
@@ -503,6 +507,13 @@ gdk_win32_selection_init (GdkWin32Selection *win32_selection)
fmt.format = _gdk_cf_array_index (cfs, GDK_WIN32_CF_INDEX_JFIF);
g_array_append_val (comp, fmt);
fmt.format = _gdk_cf_array_index (cfs, GDK_WIN32_CF_INDEX_PNG);
fmt.transmute = TRUE;
g_array_append_val (comp, fmt);
fmt.format = CF_DIB;
g_array_append_val (comp, fmt);
g_hash_table_replace (win32_selection->compatibility_formats, fmt.target, comp);
@@ -516,6 +527,13 @@ gdk_win32_selection_init (GdkWin32Selection *win32_selection)
fmt.format = _gdk_cf_array_index (cfs, GDK_WIN32_CF_INDEX_GIF);
g_array_append_val (comp, fmt);
fmt.format = _gdk_cf_array_index (cfs, GDK_WIN32_CF_INDEX_PNG);
fmt.transmute = TRUE;
g_array_append_val (comp, fmt);
fmt.format = CF_DIB;
g_array_append_val (comp, fmt);
g_hash_table_replace (win32_selection->compatibility_formats, fmt.target, comp);
@@ -588,6 +606,10 @@ gdk_win32_selection_init (GdkWin32Selection *win32_selection)
fmt.target = _gdk_atom_array_index (atoms, GDK_WIN32_ATOM_INDEX_IMAGE_PNG);
g_array_append_val (comp, fmt);
fmt.target = _gdk_atom_array_index (atoms, GDK_WIN32_ATOM_INDEX_IMAGE_BMP);
fmt.transmute = TRUE;
g_array_append_val (comp, fmt);
g_hash_table_replace (win32_selection->compatibility_targets, GINT_TO_POINTER (_gdk_cf_array_index (cfs, GDK_WIN32_CF_INDEX_PNG)), comp);
@@ -601,6 +623,13 @@ gdk_win32_selection_init (GdkWin32Selection *win32_selection)
fmt.target = _gdk_atom_array_index (atoms, GDK_WIN32_ATOM_INDEX_IMAGE_JPEG);
g_array_append_val (comp, fmt);
fmt.target = _gdk_atom_array_index (atoms, GDK_WIN32_ATOM_INDEX_IMAGE_PNG);
fmt.transmute = TRUE;
g_array_append_val (comp, fmt);
fmt.target = _gdk_atom_array_index (atoms, GDK_WIN32_ATOM_INDEX_IMAGE_BMP);
g_array_append_val (comp, fmt);
g_hash_table_replace (win32_selection->compatibility_targets, GINT_TO_POINTER (_gdk_cf_array_index (cfs, GDK_WIN32_CF_INDEX_JFIF)), comp);
@@ -614,6 +643,13 @@ gdk_win32_selection_init (GdkWin32Selection *win32_selection)
fmt.target = _gdk_atom_array_index (atoms, GDK_WIN32_ATOM_INDEX_IMAGE_GIF);
g_array_append_val (comp, fmt);
fmt.target = _gdk_atom_array_index (atoms, GDK_WIN32_ATOM_INDEX_IMAGE_PNG);
fmt.transmute = TRUE;
g_array_append_val (comp, fmt);
fmt.target = _gdk_atom_array_index (atoms, GDK_WIN32_ATOM_INDEX_IMAGE_BMP);
g_array_append_val (comp, fmt);
g_hash_table_replace (win32_selection->compatibility_targets, GINT_TO_POINTER (_gdk_cf_array_index (cfs, GDK_WIN32_CF_INDEX_GIF)), comp);
+30 -26
View File
@@ -1085,11 +1085,17 @@ gdk_win32_window_destroy (GdkWindow *window,
_gdk_remove_modal_window (window);
/* Remove all our transient children */
while (window_impl->transient_children != NULL)
tmp = window_impl->transient_children;
while (tmp != NULL)
{
GdkWindow *child = window_impl->transient_children->data;
gdk_window_set_transient_for (child, NULL);
GdkWindow *child = tmp->data;
GdkWindowImplWin32 *child_impl = GDK_WINDOW_IMPL_WIN32 (GDK_WINDOW (child)->impl);
child_impl->transient_owner = NULL;
tmp = tmp->next;
}
g_slist_free (window_impl->transient_children);
window_impl->transient_children = NULL;
#ifdef GDK_WIN32_ENABLE_EGL
display = GDK_WIN32_DISPLAY (gdk_window_get_display (window));
@@ -1474,7 +1480,7 @@ show_window_internal (GdkWindow *window,
API_CALL (SetWindowPos, (GDK_WINDOW_HWND (window),
(window->state & GDK_WINDOW_STATE_ABOVE)?HWND_TOPMOST:HWND_NOTOPMOST,
0, 0, 0, 0,
SWP_NOSIZE | SWP_NOMOVE | SWP_NOACTIVATE | SWP_NOOWNERZORDER));
SWP_NOSIZE | SWP_NOMOVE | SWP_NOACTIVATE));
}
}
@@ -1824,7 +1830,7 @@ gdk_win32_window_raise (GdkWindow *window)
if (GDK_WINDOW_TYPE (window) == GDK_WINDOW_TEMP)
API_CALL (SetWindowPos, (GDK_WINDOW_HWND (window), HWND_TOPMOST,
0, 0, 0, 0,
SWP_NOACTIVATE | SWP_NOMOVE | SWP_NOSIZE | SWP_NOOWNERZORDER));
SWP_NOACTIVATE | SWP_NOMOVE | SWP_NOSIZE));
else if (window->accept_focus)
/* Do not wrap this in an API_CALL macro as SetForegroundWindow might
* fail when for example dragging a window belonging to a different
@@ -1834,7 +1840,7 @@ gdk_win32_window_raise (GdkWindow *window)
else
API_CALL (SetWindowPos, (GDK_WINDOW_HWND (window), HWND_TOP,
0, 0, 0, 0,
SWP_NOACTIVATE | SWP_NOMOVE | SWP_NOSIZE | SWP_NOOWNERZORDER));
SWP_NOACTIVATE | SWP_NOMOVE | SWP_NOSIZE));
}
}
@@ -1851,7 +1857,7 @@ gdk_win32_window_lower (GdkWindow *window)
API_CALL (SetWindowPos, (GDK_WINDOW_HWND (window), HWND_BOTTOM,
0, 0, 0, 0,
SWP_NOACTIVATE | SWP_NOMOVE | SWP_NOSIZE | SWP_NOOWNERZORDER));
SWP_NOACTIVATE | SWP_NOMOVE | SWP_NOSIZE));
}
}
@@ -2121,29 +2127,27 @@ gdk_win32_window_set_transient_for (GdkWindow *window,
return;
}
if (window_impl->transient_owner == parent)
return;
if (GDK_IS_WINDOW (window_impl->transient_owner))
if (parent == NULL)
{
GdkWindowImplWin32 *trans_impl = GDK_WINDOW_IMPL_WIN32 (window_impl->transient_owner->impl);
item = g_slist_find (trans_impl->transient_children, window);
item->data = NULL;
trans_impl->transient_children = g_slist_delete_link (trans_impl->transient_children, item);
trans_impl->num_transients--;
if (!trans_impl->num_transients)
if (trans_impl->transient_children != NULL)
{
trans_impl->transient_children = NULL;
}
item = g_slist_find (trans_impl->transient_children, window);
item->data = NULL;
trans_impl->transient_children = g_slist_delete_link (trans_impl->transient_children, item);
trans_impl->num_transients--;
if (!trans_impl->num_transients)
{
trans_impl->transient_children = NULL;
}
}
g_object_unref (G_OBJECT (window_impl->transient_owner));
g_object_unref (G_OBJECT (window));
window_impl->transient_owner = NULL;
}
if (parent)
else
{
parent_impl = GDK_WINDOW_IMPL_WIN32 (parent->impl);
@@ -2910,7 +2914,7 @@ _gdk_win32_window_update_style_bits (GdkWindow *window)
rect.right += after.right - before.right;
rect.bottom += after.bottom - before.bottom;
flags = SWP_FRAMECHANGED | SWP_NOACTIVATE | SWP_NOREPOSITION | SWP_NOOWNERZORDER;
flags = SWP_FRAMECHANGED | SWP_NOACTIVATE | SWP_NOREPOSITION;
if (will_be_topmost && !was_topmost)
{
@@ -5353,7 +5357,7 @@ gdk_win32_window_fullscreen (GdkWindow *window)
API_CALL (SetWindowPos, (GDK_WINDOW_HWND (window), HWND_TOP,
x, y, width, height,
SWP_NOCOPYBITS | SWP_SHOWWINDOW | SWP_NOOWNERZORDER));
SWP_NOCOPYBITS | SWP_SHOWWINDOW));
}
}
@@ -5376,7 +5380,7 @@ gdk_win32_window_unfullscreen (GdkWindow *window)
API_CALL (SetWindowPos, (GDK_WINDOW_HWND (window), HWND_NOTOPMOST,
fi->r.left, fi->r.top,
fi->r.right - fi->r.left, fi->r.bottom - fi->r.top,
SWP_NOCOPYBITS | SWP_SHOWWINDOW | SWP_NOOWNERZORDER));
SWP_NOCOPYBITS | SWP_SHOWWINDOW));
g_object_set_data (G_OBJECT (window), "fullscreen-info", NULL);
g_free (fi);
@@ -5402,7 +5406,7 @@ gdk_win32_window_set_keep_above (GdkWindow *window,
API_CALL (SetWindowPos, (GDK_WINDOW_HWND (window),
setting ? HWND_TOPMOST : HWND_NOTOPMOST,
0, 0, 0, 0,
SWP_NOSIZE | SWP_NOMOVE | SWP_NOACTIVATE | SWP_NOOWNERZORDER));
SWP_NOSIZE | SWP_NOMOVE | SWP_NOACTIVATE));
}
gdk_synthesize_window_state (window,
@@ -5428,7 +5432,7 @@ gdk_win32_window_set_keep_below (GdkWindow *window,
API_CALL (SetWindowPos, (GDK_WINDOW_HWND (window),
setting ? HWND_BOTTOM : HWND_NOTOPMOST,
0, 0, 0, 0,
SWP_NOSIZE | SWP_NOMOVE | SWP_NOACTIVATE | SWP_NOOWNERZORDER));
SWP_NOSIZE | SWP_NOMOVE | SWP_NOACTIVATE));
}
gdk_synthesize_window_state (window,
+1 -1
View File
@@ -441,7 +441,7 @@ update_cursor (gpointer data,
/**
* gdk_x11_display_set_cursor_theme:
* @display: (type GdkX11Display): a #GdkDisplay
* @theme: (nullable): the name of the cursor theme to use, or %NULL to unset
* @theme: the name of the cursor theme to use, or %NULL to unset
* a previously set value
* @size: the cursor size to use, or 0 to keep the previous size
*
+4 -4
View File
@@ -29,8 +29,8 @@
#include "gdkkeysyms.h"
#define HAS_FOCUS(toplevel) \
((toplevel)->has_focus || (toplevel)->has_pointer_focus)
#define APPEARS_FOCUSED(toplevel) \
((toplevel)->has_focus || (toplevel)->has_focus_window || (toplevel)->has_pointer_focus)
static void gdk_x11_device_manager_core_finalize (GObject *object);
static void gdk_x11_device_manager_core_constructed (GObject *object);
@@ -842,7 +842,7 @@ _gdk_device_manager_core_handle_focus (GdkWindow *window,
if (toplevel->focus_window == original)
return;
had_focus = HAS_FOCUS (toplevel);
had_focus = APPEARS_FOCUSED (toplevel);
x11_screen = GDK_X11_SCREEN (gdk_window_get_screen (window));
switch (detail)
@@ -904,7 +904,7 @@ _gdk_device_manager_core_handle_focus (GdkWindow *window,
break;
}
if (HAS_FOCUS (toplevel) != had_focus)
if (APPEARS_FOCUSED (toplevel) != had_focus)
{
GdkEvent *event;
+4 -86
View File
@@ -38,23 +38,6 @@
#include <string.h>
static const char *wacom_type_atoms[] = {
"STYLUS",
"CURSOR",
"ERASER",
"PAD",
"TOUCH"
};
#define N_WACOM_TYPE_ATOMS G_N_ELEMENTS (wacom_type_atoms)
enum {
WACOM_TYPE_STYLUS,
WACOM_TYPE_CURSOR,
WACOM_TYPE_ERASER,
WACOM_TYPE_PAD,
WACOM_TYPE_TOUCH,
};
struct _GdkX11DeviceManagerXI2
{
GdkX11DeviceManagerCore parent_object;
@@ -1035,66 +1018,6 @@ device_get_tool_serial_and_id (GdkDevice *device,
return TRUE;
}
static GdkDeviceToolType
device_get_tool_type (GdkDevice *device)
{
GdkDisplay *display;
gulong nitems, bytes_after;
guint32 *data;
int rc, format;
Atom type;
Atom device_type;
Atom types[N_WACOM_TYPE_ATOMS];
GdkDeviceToolType tool_type = GDK_DEVICE_TOOL_TYPE_UNKNOWN;
display = gdk_device_get_display (device);
gdk_x11_display_error_trap_push (display);
rc = XIGetProperty (GDK_DISPLAY_XDISPLAY (display),
gdk_x11_device_get_id (device),
gdk_x11_get_xatom_by_name_for_display (display, "Wacom Tool Type"),
0, 1, False, XA_ATOM, &type, &format, &nitems, &bytes_after,
(guchar **) &data);
gdk_x11_display_error_trap_pop_ignored (display);
if (rc != Success)
return GDK_DEVICE_TOOL_TYPE_UNKNOWN;
if (type != XA_ATOM || format != 32 || nitems != 1)
{
XFree (data);
return GDK_DEVICE_TOOL_TYPE_UNKNOWN;
}
device_type = *data;
XFree (data);
if (device_type == 0)
return GDK_DEVICE_TOOL_TYPE_UNKNOWN;
gdk_x11_display_error_trap_push (display);
rc = XInternAtoms (GDK_DISPLAY_XDISPLAY (display),
(char **) wacom_type_atoms,
N_WACOM_TYPE_ATOMS,
False,
types);
gdk_x11_display_error_trap_pop_ignored (display);
if (rc == 0)
return GDK_DEVICE_TOOL_TYPE_UNKNOWN;
if (device_type == types[WACOM_TYPE_STYLUS])
tool_type = GDK_DEVICE_TOOL_TYPE_PEN;
else if (device_type == types[WACOM_TYPE_CURSOR])
tool_type = GDK_DEVICE_TOOL_TYPE_MOUSE;
else if (device_type == types[WACOM_TYPE_ERASER])
tool_type = GDK_DEVICE_TOOL_TYPE_ERASER;
else if (device_type == types[WACOM_TYPE_TOUCH])
tool_type = GDK_DEVICE_TOOL_TYPE_UNKNOWN;
return tool_type;
}
static void
handle_property_change (GdkX11DeviceManagerXI2 *device_manager,
XIPropertyEvent *ev)
@@ -1115,18 +1038,13 @@ handle_property_change (GdkX11DeviceManagerXI2 *device_manager,
device_get_tool_serial_and_id (device, &serial_id, &tool_id))
{
seat = gdk_device_get_seat (device);
tool = gdk_seat_get_tool (seat, serial_id, tool_id);
tool = gdk_seat_get_tool (seat, serial_id);
if (!tool && serial_id > 0)
{
GdkDeviceToolType tool_type;
tool_type = device_get_tool_type (device);
if (tool_type != GDK_DEVICE_TOOL_TYPE_UNKNOWN)
{
tool = gdk_device_tool_new (serial_id, tool_id, tool_type, 0);
gdk_seat_default_add_tool (GDK_SEAT_DEFAULT (seat), tool);
}
tool = gdk_device_tool_new (serial_id, tool_id,
GDK_DEVICE_TOOL_TYPE_UNKNOWN, 0);
gdk_seat_default_add_tool (GDK_SEAT_DEFAULT (seat), tool);
}
}
+3 -3
View File
@@ -1728,7 +1728,7 @@ _gdk_x11_display_open (const gchar *display_name)
if (!gdk_running_in_sandbox ())
{
/* if sandboxed, we're likely in a pid namespace and would only confuse the wm with this */
long pid = getpid ();
pid_t pid = getpid ();
XChangeProperty (display_x11->xdisplay,
display_x11->leader_window,
gdk_x11_get_xatom_by_name_for_display (display, "_NET_WM_PID"),
@@ -3006,8 +3006,8 @@ gdk_x11_display_error_trap_pop_ignored (GdkDisplay *display)
/**
* gdk_x11_set_sm_client_id:
* @sm_client_id: (nullable): the client id assigned by the session manager
* when the connection was opened, or %NULL to remove the property.
* @sm_client_id: the client id assigned by the session manager when the
* connection was opened, or %NULL to remove the property.
*
* Sets the `SM_CLIENT_ID` property on the applications leader window so that
* the window manager can save the applications state using the X11R6 ICCCM
+4 -4
View File
@@ -32,8 +32,8 @@ static gboolean gdk_event_source_dispatch (GSource *source,
gpointer user_data);
static void gdk_event_source_finalize (GSource *source);
#define HAS_FOCUS(toplevel) \
((toplevel)->has_focus || (toplevel)->has_pointer_focus)
#define APPEARS_FOCUSED(toplevel) \
((toplevel)->has_focus || (toplevel)->has_focus_window || (toplevel)->has_pointer_focus)
struct _GdkEventSource
{
@@ -148,10 +148,10 @@ handle_focus_change (GdkEventCrossing *event)
if (!event->focus || toplevel->has_focus_window)
return;
had_focus = HAS_FOCUS (toplevel);
had_focus = APPEARS_FOCUSED (toplevel);
toplevel->has_pointer_focus = focus_in;
if (HAS_FOCUS (toplevel) != had_focus)
if (APPEARS_FOCUSED (toplevel) != had_focus)
{
GdkEvent *focus_event;
-22
View File
@@ -465,25 +465,3 @@ gdk_x11_get_default_xdisplay (void)
{
return GDK_DISPLAY_XDISPLAY (gdk_display_get_default ());
}
/**
* gdk_x11_get_parent_relative_pattern:
*
* Used with gdk_window_set_background_pattern() to inherit background from
* parent window. Useful for imitating transparency when compositing is not
* available. Otherwise behaves like a transparent pattern.
*
* Since: 3.24.2
*
* Deprecated: 3.24: Don't use this function
**/
cairo_pattern_t *
gdk_x11_get_parent_relative_pattern (void)
{
static cairo_pattern_t *parent_relative_pattern = NULL;
if (G_UNLIKELY (parent_relative_pattern == NULL))
parent_relative_pattern = cairo_pattern_create_rgba (0.0, 0.0, 0.0, 0.0);
return parent_relative_pattern;
}
+1 -36
View File
@@ -935,7 +935,7 @@ setup_toplevel_window (GdkWindow *window,
if (!gdk_running_in_sandbox ())
{
/* if sandboxed, we're likely in a pid namespace and would only confuse the wm with this */
long pid = getpid ();
pid_t pid = getpid ();
XChangeProperty (xdisplay, xid,
gdk_x11_get_xatom_by_name_for_display (x11_screen->display, "_NET_WM_PID"),
XA_CARDINAL, 32,
@@ -1053,12 +1053,6 @@ _gdk_x11_display_create_window_impl (GdkDisplay *display,
impl->override_redirect = xattributes.override_redirect;
/* This event mask will be set near the end of the function, but to avoid some
* races, the window has to be created with this mask already.
*/
xattributes.event_mask = StructureNotifyMask | PropertyChangeMask;
xattributes_mask |= CWEventMask;
/* Sanity checks */
switch (window->window_type)
{
@@ -2985,7 +2979,6 @@ gdk_window_x11_set_background (GdkWindow *window,
double r, g, b, a;
cairo_surface_t *surface;
cairo_matrix_t matrix;
cairo_pattern_t *parent_relative_pattern;
if (GDK_WINDOW_DESTROYED (window))
return;
@@ -2997,34 +2990,6 @@ gdk_window_x11_set_background (GdkWindow *window,
return;
}
G_GNUC_BEGIN_IGNORE_DEPRECATIONS
parent_relative_pattern = gdk_x11_get_parent_relative_pattern ();
G_GNUC_END_IGNORE_DEPRECATIONS
if (pattern == parent_relative_pattern)
{
GdkWindow *parent;
/* X throws BadMatch if the parent has a different depth when
* using ParentRelative */
parent = gdk_window_get_parent (window);
if (parent != NULL && window->depth == parent->depth &&
cairo_pattern_status (pattern) == CAIRO_STATUS_SUCCESS)
{
XSetWindowBackgroundPixmap (GDK_WINDOW_XDISPLAY (window),
GDK_WINDOW_XID (window), ParentRelative);
return;
}
else
{
g_warning ("Can't set ParentRelative background for window %#lx, depth of parent doesn't match",
GDK_WINDOW_XID (window));
XSetWindowBackgroundPixmap (GDK_WINDOW_XDISPLAY (window),
GDK_WINDOW_XID (window), None);
return;
}
}
switch (cairo_pattern_get_type (pattern))
{
case CAIRO_PATTERN_TYPE_SOLID:
-3
View File
@@ -72,9 +72,6 @@ void gdk_x11_grab_server (void);
GDK_AVAILABLE_IN_ALL
void gdk_x11_ungrab_server (void);
GDK_DEPRECATED_IN_3_24
cairo_pattern_t *gdk_x11_get_parent_relative_pattern (void);
G_END_DECLS
#endif /* __GDK_X11_UTILS_H__ */
+3 -20
View File
@@ -3,6 +3,7 @@ AUTOMAKE_OPTIONS = subdir-objects
include $(top_srcdir)/Makefile.decl
GTK_BASE_CFLAGS_DEFINES = \
-DG_LOG_DOMAIN=\"Gtk\" \
-DG_LOG_USE_STRUCTURED=1 \
-DGTK_VERSION=\"$(GTK_VERSION)\" \
-DGTK_BINARY_VERSION=\"$(GTK_BINARY_VERSION)\" \
@@ -19,7 +20,6 @@ GTK_PLAT_CFLAGS_DEFINES = \
-DGTK_PRINT_BACKENDS=\"$(GTK_PRINT_BACKENDS)\"
AM_CPPFLAGS = \
-DG_LOG_DOMAIN=\"Gtk\" \
$(GTK_BASE_CFLAGS_DEFINES) \
$(GTK_PLAT_CFLAGS_DEFINES) \
-DX11_DATA_PREFIX=\"$(X11_PREFIX)\" \
@@ -398,10 +398,6 @@ gtk_private_h_sources = \
gtkclipboardprivate.h \
gtkcolorswatchprivate.h \
gtkcoloreditorprivate.h \
gtkcolorpickerprivate.h \
gtkcolorpickerkwinprivate.h \
gtkcolorpickerportalprivate.h \
gtkcolorpickershellprivate.h \
gtkcolorplaneprivate.h \
gtkcolorscaleprivate.h \
gtkcolorchooserprivate.h \
@@ -679,10 +675,6 @@ gtk_base_c_sources = \
gtkcolorchooserwidget.c \
gtkcolorchooserdialog.c \
gtkcoloreditor.c \
gtkcolorpicker.c \
gtkcolorpickerkwin.c \
gtkcolorpickerportal.c \
gtkcolorpickershell.c \
gtkcolorplane.c \
gtkcolorscale.c \
gtkcolorswatch.c \
@@ -1328,7 +1320,7 @@ gtk.gresource.xml: Makefile.am inspector/Makefile.inc
echo " <file preprocess='xml-stripblanks'>ui/$$n</file>" >> $@; \
done; \
for s in 16x16 22x22 24x24 32x32 48x48; do \
for c in actions status categories; do \
for c in actions status; do \
for f in $(srcdir)/icons/$$s/$$c/*.png; do \
test "$$f" = "$(srcdir)/icons/$$s/$$c/*.png" && continue; \
n=`basename $$f`; \
@@ -1336,15 +1328,6 @@ gtk.gresource.xml: Makefile.am inspector/Makefile.inc
done; \
done; \
done; \
for s in scalable; do \
for c in status; do \
for f in $(srcdir)/icons/$$s/$$c/*.svg; do \
test "$$f" = "$(srcdir)/icons/$$s/$$c/*.svg" && continue; \
n=`basename $$f`; \
echo " <file>icons/$$s/$$c/$$n</file>" >> $@; \
done; \
done; \
done; \
for f in $(srcdir)/inspector/*.ui; do \
n=`basename $$f`; \
echo " <file compressed='true' preprocess='xml-stripblanks'>inspector/$$n</file>" >> $@; \
@@ -1560,7 +1543,7 @@ Gtk_3_0_gir_MSVC_EXPORT_PACKAGES = $(Gtk_3_0_gir_EXPORT_PACKAGES)
Gtk_3_0_gir_MSVC_INCLUDE_GIRS = Atk-1.0
Gtk_3_0_gir_MSVC_LIBS = gtk-3.0 gdk-3.0
Gtk_3_0_gir_MSVC_CFLAGS = $(GTK_MSVC_GIR_CFLAGS)
Gtk_3_0_gir_MSVC_SCANNERFLAGS = --warn-all --include-uninstalled='./vs$$$$(VSVER)/$$$$(CFG)/$$$$(PLAT)/bin/Gdk-3.0.gir'
Gtk_3_0_gir_MSVC_SCANNERFLAGS = --warn-all --add-include-path=. --include-uninstalled=./Gdk-3.0.gir
include $(top_srcdir)/build/Makefile.msvc-introspection
+1 -87
View File
@@ -46,13 +46,11 @@ static const struct {
static GtkCellRendererState gtk_cell_accessible_get_state (GtkCellAccessible *cell);
static void atk_action_interface_init (AtkActionIface *iface);
static void atk_component_interface_init (AtkComponentIface *iface);
static void atk_table_cell_interface_init (AtkTableCellIface *iface);
G_DEFINE_TYPE_WITH_CODE (GtkCellAccessible, gtk_cell_accessible, GTK_TYPE_ACCESSIBLE,
G_ADD_PRIVATE (GtkCellAccessible)
G_IMPLEMENT_INTERFACE (ATK_TYPE_ACTION, atk_action_interface_init)
G_IMPLEMENT_INTERFACE (ATK_TYPE_COMPONENT, atk_component_interface_init)
G_IMPLEMENT_INTERFACE (ATK_TYPE_TABLE_CELL, atk_table_cell_interface_init))
G_IMPLEMENT_INTERFACE (ATK_TYPE_COMPONENT, atk_component_interface_init))
static gint
gtk_cell_accessible_get_index_in_parent (AtkObject *obj)
@@ -368,90 +366,6 @@ atk_component_interface_init (AtkComponentIface *iface)
iface->grab_focus = gtk_cell_accessible_grab_focus;
}
static int
gtk_cell_accessible_get_column_span (AtkTableCell *table_cell)
{
return 1;
}
static GPtrArray *
gtk_cell_accessible_get_column_header_cells (AtkTableCell *table_cell)
{
GtkCellAccessible *cell;
AtkObject *parent;
cell = GTK_CELL_ACCESSIBLE (table_cell);
parent = gtk_widget_get_accessible (gtk_accessible_get_widget (GTK_ACCESSIBLE (cell)));
return gtk_cell_accessible_parent_get_column_header_cells (GTK_CELL_ACCESSIBLE_PARENT (parent),
cell);
}
static gboolean
gtk_cell_accessible_get_position (AtkTableCell *table_cell,
gint *row,
gint *column)
{
GtkCellAccessible *cell;
AtkObject *parent;
cell = GTK_CELL_ACCESSIBLE (table_cell);
parent = gtk_widget_get_accessible (gtk_accessible_get_widget (GTK_ACCESSIBLE (cell)));
gtk_cell_accessible_parent_get_cell_position (GTK_CELL_ACCESSIBLE_PARENT (parent),
cell,
row, column);
return ((row && *row > 0) || (column && *column > 0));
}
static int
gtk_cell_accessible_get_row_span (AtkTableCell *table_cell)
{
return 1;
}
static GPtrArray *
gtk_cell_accessible_get_row_header_cells (AtkTableCell *table_cell)
{
GtkCellAccessible *cell;
AtkObject *parent;
cell = GTK_CELL_ACCESSIBLE (table_cell);
parent = gtk_widget_get_accessible (gtk_accessible_get_widget (GTK_ACCESSIBLE (cell)));
return gtk_cell_accessible_parent_get_row_header_cells (GTK_CELL_ACCESSIBLE_PARENT (parent),
cell);
}
static AtkObject *
gtk_cell_accessible_get_table (AtkTableCell *table_cell)
{
AtkObject *obj;
obj = ATK_OBJECT (table_cell);
do
{
AtkRole role;
obj = atk_object_get_parent (obj);
role = atk_object_get_role (obj);
if (role == ATK_ROLE_TABLE || role == ATK_ROLE_TREE_TABLE)
break;
}
while (obj);
return obj;
}
static void
atk_table_cell_interface_init (AtkTableCellIface *iface)
{
iface->get_column_span = gtk_cell_accessible_get_column_span;
iface->get_column_header_cells = gtk_cell_accessible_get_column_header_cells;
iface->get_position = gtk_cell_accessible_get_position;
iface->get_row_span = gtk_cell_accessible_get_row_span;
iface->get_row_header_cells = gtk_cell_accessible_get_row_header_cells;
iface->get_table = gtk_cell_accessible_get_table;
}
static GtkCellRendererState
gtk_cell_accessible_get_state (GtkCellAccessible *cell)
{
-66
View File
@@ -187,69 +187,3 @@ gtk_cell_accessible_parent_update_relationset (GtkCellAccessibleParent *parent,
if (iface->update_relationset)
(iface->update_relationset) (parent, cell, relationset);
}
void
gtk_cell_accessible_parent_get_cell_position (GtkCellAccessibleParent *parent,
GtkCellAccessible *cell,
gint *row,
gint *column)
{
GtkCellAccessibleParentIface *iface;
g_return_if_fail (GTK_IS_CELL_ACCESSIBLE_PARENT (parent));
g_return_if_fail (GTK_IS_CELL_ACCESSIBLE (cell));
iface = GTK_CELL_ACCESSIBLE_PARENT_GET_IFACE (parent);
if (iface->get_cell_position)
(iface->get_cell_position) (parent, cell, row, column);
else
{
if (row)
*row = -1;
if (column)
*column = -1;
}
}
/**
* gtk_cell_accessible_parent_get_column_header_cells:
* Returns: (transfer full) (element-type AtkObject)
*/
GPtrArray *
gtk_cell_accessible_parent_get_column_header_cells (GtkCellAccessibleParent *parent,
GtkCellAccessible *cell)
{
GtkCellAccessibleParentIface *iface;
g_return_val_if_fail (GTK_IS_CELL_ACCESSIBLE_PARENT (parent), NULL);
g_return_val_if_fail (GTK_IS_CELL_ACCESSIBLE (cell), NULL);
iface = GTK_CELL_ACCESSIBLE_PARENT_GET_IFACE (parent);
if (iface->get_column_header_cells)
return (iface->get_column_header_cells) (parent, cell);
else
return NULL;
}
/**
* gtk_cell_accessible_parent_get_row_header_cells:
* Returns: (transfer full) (element-type AtkObject)
*/
GPtrArray *
gtk_cell_accessible_parent_get_row_header_cells (GtkCellAccessibleParent *parent,
GtkCellAccessible *cell)
{
GtkCellAccessibleParentIface *iface;
g_return_val_if_fail (GTK_IS_CELL_ACCESSIBLE_PARENT (parent), NULL);
g_return_val_if_fail (GTK_IS_CELL_ACCESSIBLE (cell), NULL);
iface = GTK_CELL_ACCESSIBLE_PARENT_GET_IFACE (parent);
if (iface->get_row_header_cells)
return (iface->get_row_header_cells) (parent, cell);
else
return NULL;
}
-19
View File
@@ -75,14 +75,6 @@ struct _GtkCellAccessibleParentIface
void ( *update_relationset) (GtkCellAccessibleParent *parent,
GtkCellAccessible *cell,
AtkRelationSet *relationset);
void ( *get_cell_position) (GtkCellAccessibleParent *parent,
GtkCellAccessible *cell,
gint *row,
gint *column);
GPtrArray * ( *get_column_header_cells) (GtkCellAccessibleParent *parent,
GtkCellAccessible *cell);
GPtrArray * ( *get_row_header_cells) (GtkCellAccessibleParent *parent,
GtkCellAccessible *cell);
};
GDK_AVAILABLE_IN_ALL
@@ -123,17 +115,6 @@ GDK_AVAILABLE_IN_3_12
void gtk_cell_accessible_parent_update_relationset (GtkCellAccessibleParent *parent,
GtkCellAccessible *cell,
AtkRelationSet *relationset);
GDK_AVAILABLE_IN_ALL
void gtk_cell_accessible_parent_get_cell_position(GtkCellAccessibleParent *parent,
GtkCellAccessible *cell,
gint *row,
gint *column);
GPtrArray *gtk_cell_accessible_parent_get_column_header_cells (GtkCellAccessibleParent *parent,
GtkCellAccessible *cell);
GPtrArray *gtk_cell_accessible_parent_get_row_header_cells (GtkCellAccessibleParent *parent,
GtkCellAccessible *cell);
G_END_DECLS
+4 -57
View File
@@ -1174,12 +1174,11 @@ gtk_tree_view_accessible_grab_cell_focus (GtkCellAccessibleParent *parent,
if (gtk_widget_is_toplevel (toplevel))
{
#ifdef GDK_WINDOWING_X11
if (GDK_IS_X11_DISPLAY (gtk_widget_get_display (toplevel)))
gtk_window_present_with_time (GTK_WINDOW (toplevel),
gdk_x11_get_server_time (gtk_widget_get_window (widget)));
else
gtk_window_present_with_time (GTK_WINDOW (toplevel),
gdk_x11_get_server_time (gtk_widget_get_window (widget)));
#else
gtk_window_present (GTK_WINDOW (toplevel));
#endif
gtk_window_present (GTK_WINDOW (toplevel));
}
return TRUE;
@@ -1392,56 +1391,6 @@ gtk_tree_view_accessible_update_relationset (GtkCellAccessibleParent *parent,
}
}
static void
gtk_tree_view_accessible_get_cell_position (GtkCellAccessibleParent *parent,
GtkCellAccessible *cell,
gint *row,
gint *column)
{
GtkWidget *widget;
GtkTreeView *tree_view;
GtkTreeViewAccessibleCellInfo *cell_info;
GtkTreeViewAccessible *accessible;
widget = gtk_accessible_get_widget (GTK_ACCESSIBLE (parent));
if (widget == NULL)
return;
tree_view = GTK_TREE_VIEW (widget);
accessible = GTK_TREE_VIEW_ACCESSIBLE (parent);
cell_info = find_cell_info (accessible, cell);
if (!cell_info)
return;
if (row)
(*row) = _gtk_rbtree_node_get_index (cell_info->tree, cell_info->node);
if (column)
(*column) = get_column_number (tree_view, cell_info->cell_col_ref);
}
static GPtrArray *
gtk_tree_view_accessible_get_column_header_cells (GtkCellAccessibleParent *parent,
GtkCellAccessible *cell)
{
GtkWidget *widget;
GtkTreeViewAccessibleCellInfo *cell_info;
GtkTreeViewAccessible *accessible;
GPtrArray *array;
widget = gtk_accessible_get_widget (GTK_ACCESSIBLE (parent));
if (widget == NULL)
return NULL;
accessible = GTK_TREE_VIEW_ACCESSIBLE (parent);
cell_info = find_cell_info (accessible, cell);
if (!cell_info)
return NULL;
array = g_ptr_array_new_full (1, g_object_unref);
g_ptr_array_add (array, g_object_ref (get_header_from_column ( (cell_info->cell_col_ref))));
return array;
}
static void
gtk_cell_accessible_parent_interface_init (GtkCellAccessibleParentIface *iface)
{
@@ -1454,8 +1403,6 @@ gtk_cell_accessible_parent_interface_init (GtkCellAccessibleParentIface *iface)
iface->activate = gtk_tree_view_accessible_activate;
iface->edit = gtk_tree_view_accessible_edit;
iface->update_relationset = gtk_tree_view_accessible_update_relationset;
iface->get_cell_position = gtk_tree_view_accessible_get_cell_position;
iface->get_column_header_cells = gtk_tree_view_accessible_get_column_header_cells;
}
void
+4 -5
View File
@@ -642,12 +642,11 @@ gtk_widget_accessible_grab_focus (AtkComponent *component)
if (gtk_widget_is_toplevel (toplevel))
{
#ifdef GDK_WINDOWING_X11
if (GDK_IS_X11_DISPLAY (gtk_widget_get_display (toplevel)))
gtk_window_present_with_time (GTK_WINDOW (toplevel),
gdk_x11_get_server_time (gtk_widget_get_window (widget)));
else
gtk_window_present_with_time (GTK_WINDOW (toplevel),
gdk_x11_get_server_time (gtk_widget_get_window (widget)));
#else
gtk_window_present (GTK_WINDOW (toplevel));
#endif
gtk_window_present (GTK_WINDOW (toplevel));
}
return TRUE;
}
+1 -3
View File
@@ -1420,9 +1420,7 @@ gtk_status_icon_update_image (GtkStatusIcon *status_icon)
surface = gtk_icon_helper_load_surface (icon_helper, 1);
if (surface)
{
pixbuf = gdk_pixbuf_get_from_surface (surface, 0, 0,
cairo_image_surface_get_width (surface),
cairo_image_surface_get_height (surface));
pixbuf = gdk_pixbuf_get_from_surface (surface, 0, 0, round_size, round_size);
cairo_surface_destroy (surface);
}
else
+1 -2
View File
@@ -966,8 +966,7 @@ G_GNUC_BEGIN_IGNORE_DEPRECATIONS
else
{
/* Set a parent-relative background pixmap */
cairo_pattern_t *parent_relative = gdk_x11_get_parent_relative_pattern ();
gdk_window_set_background_pattern (window, parent_relative);
gdk_window_set_background_pattern (window, NULL);
}
G_GNUC_END_IGNORE_DEPRECATIONS
+2 -2
View File
@@ -79,7 +79,7 @@ load_symbolic_svg (char *file_data, gsize file_len,
svg_height = g_strdup_printf ("%d",gdk_pixbuf_get_height (pixbuf));
g_object_unref (pixbuf);
escaped_file_data = g_base64_encode ((guchar *) file_data, file_len);
escaped_file_data = g_markup_escape_text (file_data, file_len);
data = g_strconcat ("<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"no\"?>\n"
"<svg version=\"1.1\"\n"
@@ -101,7 +101,7 @@ load_symbolic_svg (char *file_data, gsize file_len,
" fill: ", css_success, " !important;\n"
" }\n"
" </style>\n"
" <xi:include href=\"data:text/xml;base64,", escaped_file_data, "\"/>\n"
" <xi:include href=\"data:text/xml,", escaped_file_data, "\"/>\n"
"</svg>",
NULL);
g_free (escaped_file_data);
-8
View File
@@ -106,11 +106,3 @@ exp2 (double x)
return pow (2.0, x);
}
#endif
#ifndef HAVE_TRUNC
static inline double
trunc (double x)
{
return (x > 0 ? floor (x) : ceil (x));
}
#endif
-1
View File
@@ -193,7 +193,6 @@ G_DEFINE_AUTOPTR_CLEANUP_FUNC(GtkViewport, g_object_unref)
G_DEFINE_AUTOPTR_CLEANUP_FUNC(GtkVolumeButton, g_object_unref)
G_DEFINE_AUTOPTR_CLEANUP_FUNC(GtkPaperSize, gtk_paper_size_free)
G_DEFINE_AUTOPTR_CLEANUP_FUNC(GtkRecentInfo, gtk_recent_info_unref)
G_DEFINE_AUTOPTR_CLEANUP_FUNC(GtkSelectionData, gtk_selection_data_free)
G_DEFINE_AUTOPTR_CLEANUP_FUNC(GtkTargetList, gtk_target_list_unref)
G_DEFINE_AUTOPTR_CLEANUP_FUNC(GtkTextAttributes, gtk_text_attributes_unref)
+1 -1
View File
@@ -152,7 +152,7 @@ gtk_actionable_get_action_target_value (GtkActionable *actionable)
/**
* gtk_actionable_set_action_target_value:
* @actionable: a #GtkActionable widget
* @target_value: (nullable): a #GVariant to set as the target value, or %NULL
* @target_value: a #GVariant to set as the target value, or %NULL
*
* Sets the target value of an actionable widget.
*
+2 -139
View File
@@ -24,7 +24,6 @@
#include "gtkapplicationprivate.h"
#include "gtksettings.h"
#include "gtkprivate.h"
G_DEFINE_TYPE (GtkApplicationImplDBus, gtk_application_impl_dbus, GTK_TYPE_APPLICATION_IMPL)
@@ -36,9 +35,6 @@ G_DEFINE_TYPE (GtkApplicationImplDBus, gtk_application_impl_dbus, GTK_TYPE_APPLI
#define XFCE_DBUS_OBJECT_PATH "/org/xfce/SessionManager"
#define XFCE_DBUS_INTERFACE "org.xfce.Session.Manager"
#define XFCE_DBUS_CLIENT_INTERFACE "org.xfce.Session.Client"
#define GNOME_SCREENSAVER_DBUS_NAME "org.gnome.ScreenSaver"
#define GNOME_SCREENSAVER_DBUS_OBJECT_PATH "/org/gnome/ScreenSaver"
#define GNOME_SCREENSAVER_DBUS_INTERFACE "org.gnome.ScreenSaver"
static void
unregister_client (GtkApplicationImplDBus *dbus)
@@ -175,63 +171,6 @@ stash_desktop_autostart_id (void)
g_unsetenv ("DESKTOP_AUTOSTART_ID");
}
static void
screensaver_signal_session (GDBusProxy *proxy,
const char *sender_name,
const char *signal_name,
GVariant *parameters,
GtkApplication *application)
{
gboolean active;
if (!g_str_equal (signal_name, "ActiveChanged"))
return;
g_variant_get (parameters, "(b)", &active);
gtk_application_set_screensaver_active (application, active);
}
static void
screensaver_signal_portal (GDBusConnection *connection,
const char *sender_name,
const char *object_path,
const char *interface_name,
const char *signal_name,
GVariant *parameters,
gpointer data)
{
GtkApplication *application = data;
gboolean active;
GVariant *state;
if (!g_str_equal (signal_name, "StateChanged"))
return;
g_variant_get (parameters, "(o@a{sv})", NULL, &state);
g_variant_lookup (state, "screensaver-active", "b", &active);
gtk_application_set_screensaver_active (application, active);
}
static void
create_monitor_cb (GObject *source,
GAsyncResult *result,
gpointer data)
{
GDBusProxy *proxy = G_DBUS_PROXY (source);
GError *error = NULL;
GVariant *ret = NULL;
ret = g_dbus_proxy_call_finish (proxy, result, &error);
if (ret == NULL)
{
g_warning ("Creating a portal monitor failed: %s", error->message);
g_error_free (error);
return;
}
g_variant_unref (ret);
}
static void
gtk_application_impl_dbus_startup (GtkApplicationImpl *impl,
gboolean register_session)
@@ -256,9 +195,6 @@ gtk_application_impl_dbus_startup (GtkApplicationImpl *impl,
dbus->object_path = g_application_get_dbus_object_path (G_APPLICATION (impl->application));
dbus->unique_name = g_dbus_connection_get_unique_name (dbus->session);
if (gtk_should_use_portal ())
goto out;
g_debug ("Connecting to session manager");
/* Try the GNOME session manager first */
@@ -300,27 +236,6 @@ gtk_application_impl_dbus_startup (GtkApplicationImpl *impl,
if (!register_session)
goto out;
dbus->ss_proxy = gtk_application_get_proxy_if_service_present (dbus->session,
G_DBUS_PROXY_FLAGS_DO_NOT_AUTO_START |
G_DBUS_PROXY_FLAGS_DO_NOT_LOAD_PROPERTIES |
G_DBUS_PROXY_FLAGS_NONE,
GNOME_SCREENSAVER_DBUS_NAME,
GNOME_SCREENSAVER_DBUS_OBJECT_PATH,
GNOME_SCREENSAVER_DBUS_INTERFACE,
&error);
if (error)
{
g_debug ("Failed to get the GNOME screensaver proxy: %s", error->message);
g_clear_error (&error);
g_clear_object (&dbus->ss_proxy);
}
if (dbus->ss_proxy)
{
g_signal_connect (dbus->ss_proxy, "g-signal",
G_CALLBACK (screensaver_signal_session), impl->application);
}
g_debug ("Registering client '%s' '%s'", dbus->application_id, client_id);
res = g_dbus_proxy_call_sync (dbus->sm_proxy,
@@ -421,7 +336,7 @@ gtk_application_impl_dbus_startup (GtkApplicationImpl *impl,
"gtk-shell-shows-menubar", FALSE,
NULL);
if (dbus->sm_proxy == NULL && dbus->session)
if (dbus->sm_proxy == NULL)
{
dbus->inhibit_proxy = gtk_application_get_proxy_if_service_present (dbus->session,
G_DBUS_PROXY_FLAGS_NONE,
@@ -433,43 +348,8 @@ gtk_application_impl_dbus_startup (GtkApplicationImpl *impl,
{
g_debug ("Failed to get an inhibit portal proxy: %s", error->message);
g_clear_error (&error);
goto end;
}
if (register_session)
{
char *token;
GVariantBuilder opt_builder;
/* Monitor screensaver state */
dbus->session_id = gtk_get_portal_session_path (dbus->session, &token);
dbus->state_changed_handler =
g_dbus_connection_signal_subscribe (dbus->session,
"org.freedesktop.portal.Desktop",
"org.freedesktop.portal.Inhibit",
"StateChanged",
"/org/freedesktop/portal/desktop",
NULL,
G_DBUS_SIGNAL_FLAGS_NO_MATCH_RULE,
screensaver_signal_portal,
impl->application,
NULL);
g_variant_builder_init (&opt_builder, G_VARIANT_TYPE_VARDICT);
g_variant_builder_add (&opt_builder, "{sv}",
"session_handle_token", g_variant_new_string (token));
g_dbus_proxy_call (dbus->inhibit_proxy,
"CreateMonitor",
g_variant_new ("(sa{sv})", "", &opt_builder),
G_DBUS_CALL_FLAGS_NONE,
G_MAXINT,
NULL,
create_monitor_cb, dbus);
g_free (token);
}
}
end:;
}
static void
@@ -630,7 +510,7 @@ gtk_application_impl_dbus_inhibit (GtkApplicationImpl *impl,
g_variant_new ("(s@usu)",
dbus->application_id,
window ? gtk_application_impl_dbus_get_window_system_id (dbus, window) : g_variant_new_uint32 (0),
reason ? reason : "",
reason,
flags),
G_DBUS_CALL_FLAGS_NONE,
G_MAXINT,
@@ -826,28 +706,11 @@ gtk_application_impl_dbus_finalize (GObject *object)
{
GtkApplicationImplDBus *dbus = (GtkApplicationImplDBus *) object;
if (dbus->session_id)
{
g_dbus_connection_call (dbus->session,
"org.freedesktop.portal.Desktop",
dbus->session_id,
"org.freedesktop.portal.Session",
"Close",
NULL, NULL, 0, -1, NULL, NULL, NULL);
g_free (dbus->session_id);
}
if (dbus->state_changed_handler)
g_dbus_connection_signal_unsubscribe (dbus->session,
dbus->state_changed_handler);
g_clear_object (&dbus->inhibit_proxy);
g_slist_free_full (dbus->inhibit_handles, inhibit_handle_free);
g_free (dbus->app_menu_path);
g_free (dbus->menubar_path);
g_clear_object (&dbus->sm_proxy);
g_clear_object (&dbus->ss_proxy);
G_OBJECT_CLASS (gtk_application_impl_dbus_parent_class)->finalize (object);
}
-37
View File
@@ -137,7 +137,6 @@ static guint gtk_application_signals[LAST_SIGNAL];
enum {
PROP_ZERO,
PROP_REGISTER_SESSION,
PROP_SCREENSAVER_ACTIVE,
PROP_APP_MENU,
PROP_MENUBAR,
PROP_ACTIVE_WINDOW,
@@ -158,7 +157,6 @@ struct _GtkApplicationPrivate
guint last_window_id;
gboolean register_session;
gboolean screensaver_active;
GtkActionMuxer *muxer;
GtkBuilder *menus_builder;
gchar *help_overlay_path;
@@ -523,10 +521,6 @@ gtk_application_get_property (GObject *object,
g_value_set_boolean (value, application->priv->register_session);
break;
case PROP_SCREENSAVER_ACTIVE:
g_value_set_boolean (value, application->priv->screensaver_active);
break;
case PROP_APP_MENU:
g_value_set_object (value, gtk_application_get_app_menu (application));
break;
@@ -658,24 +652,6 @@ gtk_application_class_init (GtkApplicationClass *class)
FALSE,
G_PARAM_READWRITE|G_PARAM_STATIC_STRINGS);
/**
* GtkApplication:screensaver-active:
*
* This property is %TRUE if GTK+ believes that the screensaver is
* currently active. GTK+ only tracks session state (including this)
* when #GtkApplication::register-session is set to %TRUE.
*
* Tracking the screensaver state is supported on Linux.
*
* Since: 3.24
*/
gtk_application_props[PROP_SCREENSAVER_ACTIVE] =
g_param_spec_boolean ("screensaver-active",
P_("Screensaver Active"),
P_("Whether the screensaver is active"),
FALSE,
G_PARAM_READABLE|G_PARAM_STATIC_STRINGS);
gtk_application_props[PROP_APP_MENU] =
g_param_spec_object ("app-menu",
P_("Application menu"),
@@ -1484,16 +1460,3 @@ gtk_application_get_menu_by_id (GtkApplication *application,
return G_MENU (object);
}
void
gtk_application_set_screensaver_active (GtkApplication *application,
gboolean active)
{
GtkApplicationPrivate *priv = gtk_application_get_instance_private (application);
if (priv->screensaver_active != active)
{
priv->screensaver_active = active;
g_object_notify (G_OBJECT (application), "screensaver-active");
}
}
-6
View File
@@ -45,9 +45,6 @@ void gtk_application_insert_action_group (GtkAppl
GtkApplicationAccels * gtk_application_get_application_accels (GtkApplication *application);
void gtk_application_set_screensaver_active (GtkApplication *application,
gboolean active);
#define GTK_TYPE_APPLICATION_IMPL (gtk_application_impl_get_type ())
#define GTK_APPLICATION_IMPL_CLASS(class) (G_TYPE_CHECK_CLASS_CAST ((class), \
GTK_TYPE_APPLICATION_IMPL, \
@@ -132,13 +129,10 @@ typedef struct
GDBusProxy *sm_proxy;
GDBusProxy *client_proxy;
gchar *client_path;
GDBusProxy *ss_proxy;
/* Portal support */
GDBusProxy *inhibit_proxy;
GSList *inhibit_handles;
guint state_changed_handler;
char * session_id;
} GtkApplicationImplDBus;
typedef struct
+18 -23
View File
@@ -24,15 +24,16 @@
/**
* SECTION:gtkbox
* @Short_description: A container for packing widgets in a single row or column
* @Short_description: A container box
* @Title: GtkBox
* @See_also: #GtkGrid
* @See_also: #GtkFrame, #GtkGrid, #GtkLayout
*
* The GtkBox widget arranges child widgets into a single row or column,
* depending upon the value of its #GtkOrientable:orientation property. Within
* the other dimension, all children are allocated the same size. Of course,
* the #GtkWidget:halign and #GtkWidget:valign properties can be used on
* the children to influence their allocation.
* The GtkBox widget organizes child widgets into a rectangular area.
*
* The rectangular area of a GtkBox is organized into either a single row
* or a single column of child widgets depending upon the orientation.
* Thus, all children of a GtkBox are allocated one dimension in common,
* which is the height of a row, or the width of a column.
*
* GtkBox uses a notion of packing. Packing refers
* to adding widgets with reference to a particular position in a
@@ -68,6 +69,9 @@
* fill and padding child properties.
* Use gtk_box_query_child_packing() to query these fields.
*
* Note that a single-row or single-column #GtkGrid provides exactly
* the same functionality as #GtkBox.
*
* # CSS nodes
*
* GtkBox uses a single CSS node with name box.
@@ -306,9 +310,9 @@ gtk_box_class_init (GtkBoxClass *class)
* but #GtkHBox, #GtkVBox and other subclasses use the old default
* of %TRUE.
*
* Note: The #GtkWidget:hexpand or #GtkWidget:vexpand properties are the
* preferred way to influence whether the child receives extra space, by
* setting the childs expand property corresponding to the boxs orientation.
* Note that the #GtkWidget:halign, #GtkWidget:valign, #GtkWidget:hexpand
* and #GtkWidget:vexpand properties are the preferred way to influence
* child size allocation in containers.
*
* In contrast to #GtkWidget:hexpand, the expand child property does
* not cause the box to expand itself.
@@ -323,12 +327,11 @@ gtk_box_class_init (GtkBoxClass *class)
/**
* GtkBox:fill:
*
* Whether the child should fill extra space or use it as padding.
* Whether the child should receive extra space when the parent grows.
*
* Note: The #GtkWidget:halign or #GtkWidget:valign properties are the
* preferred way to influence whether the child fills available space, by
* setting the childs align property corresponding to the boxs orientation
* to %GTK_ALIGN_FILL to fill, or to something else to refrain from filling.
* Note that the #GtkWidget:halign, #GtkWidget:valign, #GtkWidget:hexpand
* and #GtkWidget:vexpand properties are the preferred way to influence
* child size allocation in containers.
*/
child_props[CHILD_PROP_FILL] =
g_param_spec_boolean ("fill",
@@ -337,14 +340,6 @@ gtk_box_class_init (GtkBoxClass *class)
TRUE,
GTK_PARAM_READWRITE);
/**
* GtkBox:padding:
*
* Extra space to put between the child and its neighbors, in pixels.
*
* Note: The CSS padding properties are the preferred way to add space among
* widgets, by setting the paddings corresponding to the boxs orientation.
*/
child_props[CHILD_PROP_PADDING] =
g_param_spec_uint ("padding",
P_("Padding"),
+1
View File
@@ -881,6 +881,7 @@ GdkPixbuf *
gtk_clipboard_wait_for_image (GtkClipboard *clipboard)
{
GdkAtom target = gdk_atom_intern_static_string("image/tiff");
int i;
GtkSelectionData *data;
data = gtk_clipboard_wait_for_contents (clipboard, target);
-42
View File
@@ -24,9 +24,7 @@
#include "gtkcolorscaleprivate.h"
#include "gtkcolorswatchprivate.h"
#include "gtkcolorutils.h"
#include "gtkcolorpickerprivate.h"
#include "gtkgrid.h"
#include "gtkbutton.h"
#include "gtkintl.h"
#include "gtkorientable.h"
#include "gtkentry.h"
@@ -63,9 +61,6 @@ struct _GtkColorEditorPrivate
GtkAdjustment *v_adj;
GtkAdjustment *a_adj;
GtkWidget *picker_button;
GtkColorPicker *picker;
gint popup_position;
guint text_changed : 1;
@@ -358,36 +353,6 @@ popup_draw (GtkWidget *popup,
return FALSE;
}
static void
color_picked (GObject *source,
GAsyncResult *res,
gpointer data)
{
GtkColorPicker *picker = GTK_COLOR_PICKER (source);
GtkColorEditor *editor = data;
GError *error = NULL;
GdkRGBA *color;
color = gtk_color_picker_pick_finish (picker, res, &error);
if (color == NULL)
{
g_warning ("Picking color failed: %s", error->message);
g_error_free (error);
}
else
{
gtk_color_chooser_set_rgba (GTK_COLOR_CHOOSER (editor), color);
gdk_rgba_free (color);
}
}
static void
pick_color (GtkButton *button,
GtkColorEditor *editor)
{
gtk_color_picker_pick (editor->priv->picker, color_picked, editor);
}
static void
gtk_color_editor_init (GtkColorEditor *editor)
{
@@ -429,10 +394,6 @@ gtk_color_editor_init (GtkColorEditor *editor)
gtk_overlay_add_overlay (GTK_OVERLAY (editor->priv->overlay), editor->priv->a_popup);
gtk_style_context_remove_class (gtk_widget_get_style_context (editor->priv->swatch), "activatable");
editor->priv->picker = gtk_color_picker_new ();
if (editor->priv->picker == NULL)
gtk_widget_hide (editor->priv->picker_button);
}
static void
@@ -441,7 +402,6 @@ gtk_color_editor_dispose (GObject *object)
GtkColorEditor *editor = GTK_COLOR_EDITOR (object);
dismiss_current_popup (editor);
g_clear_object (&editor->priv->picker);
G_OBJECT_CLASS (gtk_color_editor_parent_class)->dispose (object);
}
@@ -544,7 +504,6 @@ gtk_color_editor_class_init (GtkColorEditorClass *class)
gtk_widget_class_bind_template_child_private (widget_class, GtkColorEditor, s_adj);
gtk_widget_class_bind_template_child_private (widget_class, GtkColorEditor, v_adj);
gtk_widget_class_bind_template_child_private (widget_class, GtkColorEditor, a_adj);
gtk_widget_class_bind_template_child_private (widget_class, GtkColorEditor, picker_button);
gtk_widget_class_bind_template_callback (widget_class, hsv_changed);
gtk_widget_class_bind_template_callback (widget_class, popup_draw);
@@ -555,7 +514,6 @@ gtk_color_editor_class_init (GtkColorEditorClass *class)
gtk_widget_class_bind_template_callback (widget_class, entry_apply);
gtk_widget_class_bind_template_callback (widget_class, entry_focus_out);
gtk_widget_class_bind_template_callback (widget_class, popup_edit);
gtk_widget_class_bind_template_callback (widget_class, pick_color);
}
static void
-69
View File
@@ -1,69 +0,0 @@
/* GTK - The GIMP Toolkit
* Copyright (C) 2018, Red Hat, Inc
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
#include "config.h"
#include "gtkcolorpickerprivate.h"
#include "gtkcolorpickerportalprivate.h"
#include "gtkcolorpickershellprivate.h"
#include "gtkcolorpickerkwinprivate.h"
#include <gio/gio.h>
G_DEFINE_INTERFACE_WITH_CODE (GtkColorPicker, gtk_color_picker, G_TYPE_OBJECT,
g_type_interface_add_prerequisite (g_define_type_id, G_TYPE_INITABLE);)
static void
gtk_color_picker_default_init (GtkColorPickerInterface *iface)
{
}
void
gtk_color_picker_pick (GtkColorPicker *picker,
GAsyncReadyCallback callback,
gpointer user_data)
{
GTK_COLOR_PICKER_GET_INTERFACE (picker)->pick (picker, callback, user_data);
}
GdkRGBA *
gtk_color_picker_pick_finish (GtkColorPicker *picker,
GAsyncResult *res,
GError **error)
{
return GTK_COLOR_PICKER_GET_INTERFACE (picker)->pick_finish (picker, res, error);
}
GtkColorPicker *
gtk_color_picker_new (void)
{
GtkColorPicker *picker;
picker = gtk_color_picker_portal_new ();
if (!picker)
picker = gtk_color_picker_shell_new ();
if (!picker)
picker = gtk_color_picker_kwin_new ();
if (!picker)
g_debug ("No suitable GtkColorPicker implementation");
else
g_debug ("Using %s for picking colors", G_OBJECT_TYPE_NAME (picker));
return picker;
}
-187
View File
@@ -1,187 +0,0 @@
/* GTK - The GIMP Toolkit
* Copyright (C) 2018, Red Hat, Inc
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
#include "config.h"
#include "gtkcolorpickerkwinprivate.h"
#include <gio/gio.h>
struct _GtkColorPickerKwin
{
GObject parent_instance;
GDBusProxy *kwin_proxy;
GTask *task;
};
struct _GtkColorPickerKwinClass
{
GObjectClass parent_class;
};
static GInitableIface *initable_parent_iface;
static void gtk_color_picker_kwin_initable_iface_init (GInitableIface *iface);
static void gtk_color_picker_kwin_iface_init (GtkColorPickerInterface *iface);
G_DEFINE_TYPE_WITH_CODE (GtkColorPickerKwin, gtk_color_picker_kwin, G_TYPE_OBJECT,
G_IMPLEMENT_INTERFACE (G_TYPE_INITABLE, gtk_color_picker_kwin_initable_iface_init)
G_IMPLEMENT_INTERFACE (GTK_TYPE_COLOR_PICKER, gtk_color_picker_kwin_iface_init))
static gboolean
gtk_color_picker_kwin_initable_init (GInitable *initable,
GCancellable *cancellable,
GError **error)
{
GtkColorPickerKwin *picker = GTK_COLOR_PICKER_KWIN (initable);
char *owner;
picker->kwin_proxy = g_dbus_proxy_new_for_bus_sync (G_BUS_TYPE_SESSION,
G_DBUS_PROXY_FLAGS_NONE,
NULL,
"org.kde.KWin",
"/ColorPicker",
"org.kde.kwin.ColorPicker",
NULL,
error);
if (picker->kwin_proxy == NULL)
{
g_debug ("Failed to create kwin colorpicker proxy");
return FALSE;
}
owner = g_dbus_proxy_get_name_owner (picker->kwin_proxy);
if (owner == NULL)
{
g_debug ("org.kde.kwin.ColorPicker not provided");
g_clear_object (&picker->kwin_proxy);
return FALSE;
}
g_free (owner);
return TRUE;
}
static void
gtk_color_picker_kwin_initable_iface_init (GInitableIface *iface)
{
initable_parent_iface = g_type_interface_peek_parent (iface);
iface->init = gtk_color_picker_kwin_initable_init;
}
static void
gtk_color_picker_kwin_init (GtkColorPickerKwin *picker)
{
}
static void
gtk_color_picker_kwin_finalize (GObject *object)
{
GtkColorPickerKwin *picker = GTK_COLOR_PICKER_KWIN (object);
g_clear_object (&picker->kwin_proxy);
G_OBJECT_CLASS (gtk_color_picker_kwin_parent_class)->finalize (object);
}
static void
gtk_color_picker_kwin_class_init (GtkColorPickerKwinClass *class)
{
GObjectClass *object_class = G_OBJECT_CLASS (class);
object_class->finalize = gtk_color_picker_kwin_finalize;
}
GtkColorPicker *
gtk_color_picker_kwin_new (void)
{
return GTK_COLOR_PICKER (g_initable_new (GTK_TYPE_COLOR_PICKER_KWIN, NULL, NULL, NULL));
}
static void
color_picked (GObject *source,
GAsyncResult *res,
gpointer data)
{
GtkColorPickerKwin *picker = GTK_COLOR_PICKER_KWIN (data);
GError *error = NULL;
GVariant *ret;
ret = g_dbus_proxy_call_finish (picker->kwin_proxy, res, &error);
if (ret == NULL)
{
g_task_return_error (picker->task, error);
}
else
{
GdkRGBA c;
guint32 color;
g_variant_get (ret, "(u)", &color);
c.blue = ( color & 0xff) / 255.0;
c.green = ((color >> 8) & 0xff) / 255.0;
c.red = ((color >> 16) & 0xff) / 255.0;
c.alpha = ((color >> 24) & 0xff) / 255.0;
g_task_return_pointer (picker->task, gdk_rgba_copy (&c), (GDestroyNotify)gdk_rgba_free);
g_variant_unref (ret);
}
g_clear_object (&picker->task);
}
static void
gtk_color_picker_kwin_pick (GtkColorPicker *cp,
GAsyncReadyCallback callback,
gpointer user_data)
{
GtkColorPickerKwin *picker = GTK_COLOR_PICKER_KWIN (cp);
if (picker->task)
return;
picker->task = g_task_new (picker, NULL, callback, user_data);
g_dbus_proxy_call (picker->kwin_proxy,
"pick",
NULL,
0,
-1,
NULL,
color_picked,
picker);
}
static GdkRGBA *
gtk_color_picker_kwin_pick_finish (GtkColorPicker *cp,
GAsyncResult *res,
GError **error)
{
g_return_val_if_fail (g_task_is_valid (res, cp), NULL);
return g_task_propagate_pointer (G_TASK (res), error);
}
static void
gtk_color_picker_kwin_iface_init (GtkColorPickerInterface *iface)
{
iface->pick = gtk_color_picker_kwin_pick;
iface->pick_finish = gtk_color_picker_kwin_pick_finish;
}
-41
View File
@@ -1,41 +0,0 @@
/*
* GTK - The GIMP Toolkit
* Copyright (C) 2018 Red Hat, Inc.
* All rights reserved.
*
* This Library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public License as
* published by the Free Software Foundation; either version 2 of the
* License, or (at your option) any later version.
*
* This Library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Library General Public License for more details.
*
* You should have received a copy of the GNU Library General Public
* License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef __GTK_COLOR_PICKER_KWIN_H__
#define __GTK_COLOR_PICKER_KWIN_H__
#if !defined (__GTK_H_INSIDE__) && !defined (GTK_COMPILATION)
#error "Only <gtk/gtk.h> can be included directly."
#endif
#include <gtk/gtkcolorpickerprivate.h>
G_BEGIN_DECLS
#define GTK_TYPE_COLOR_PICKER_KWIN gtk_color_picker_kwin_get_type ()
G_DECLARE_FINAL_TYPE (GtkColorPickerKwin, gtk_color_picker_kwin, GTK, COLOR_PICKER_KWIN, GObject)
GDK_AVAILABLE_IN_ALL
GtkColorPicker * gtk_color_picker_kwin_new (void);
G_END_DECLS
#endif /* __GTK_COLOR_PICKER_KWIN_H__ */
-235
View File
@@ -1,235 +0,0 @@
/* GTK - The GIMP Toolkit
* Copyright (C) 2018, Red Hat, Inc
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
#include "config.h"
#include "gtkcolorpickerportalprivate.h"
#include "gtkprivate.h"
#include <gio/gio.h>
struct _GtkColorPickerPortal
{
GObject parent_instance;
GDBusProxy *portal_proxy;
guint portal_signal_id;
GTask *task;
};
struct _GtkColorPickerPortalClass
{
GObjectClass parent_class;
};
static GInitableIface *initable_parent_iface;
static void gtk_color_picker_portal_initable_iface_init (GInitableIface *iface);
static void gtk_color_picker_portal_iface_init (GtkColorPickerInterface *iface);
G_DEFINE_TYPE_WITH_CODE (GtkColorPickerPortal, gtk_color_picker_portal, G_TYPE_OBJECT,
G_IMPLEMENT_INTERFACE (G_TYPE_INITABLE, gtk_color_picker_portal_initable_iface_init)
G_IMPLEMENT_INTERFACE (GTK_TYPE_COLOR_PICKER, gtk_color_picker_portal_iface_init))
static gboolean
gtk_color_picker_portal_initable_init (GInitable *initable,
GCancellable *cancellable,
GError **error)
{
GtkColorPickerPortal *picker = GTK_COLOR_PICKER_PORTAL (initable);
char *owner;
GVariant *ret;
guint version;
if (!gtk_should_use_portal ())
return FALSE;
picker->portal_proxy = g_dbus_proxy_new_for_bus_sync (G_BUS_TYPE_SESSION,
G_DBUS_PROXY_FLAGS_NONE,
NULL,
"org.freedesktop.portal.Desktop",
"/org/freedesktop/portal/desktop",
"org.freedesktop.portal.Screenshot",
NULL,
error);
if (picker->portal_proxy == NULL)
{
g_debug ("Failed to create screenshot portal proxy");
return FALSE;
}
owner = g_dbus_proxy_get_name_owner (picker->portal_proxy);
if (owner == NULL)
{
g_debug ("org.freedesktop.portal.Screenshot not provided");
g_clear_object (&picker->portal_proxy);
return FALSE;
}
g_free (owner);
ret = g_dbus_proxy_get_cached_property (picker->portal_proxy, "version");
g_variant_get (ret, "u", &version);
g_variant_unref (ret);
if (version != 2)
{
g_debug ("Screenshot portal version: %u", version);
g_clear_object (&picker->portal_proxy);
return FALSE;
}
return TRUE;
}
static void
gtk_color_picker_portal_initable_iface_init (GInitableIface *iface)
{
initable_parent_iface = g_type_interface_peek_parent (iface);
iface->init = gtk_color_picker_portal_initable_init;
}
static void
gtk_color_picker_portal_init (GtkColorPickerPortal *picker)
{
}
static void
gtk_color_picker_portal_finalize (GObject *object)
{
GtkColorPickerPortal *picker = GTK_COLOR_PICKER_PORTAL (object);
g_clear_object (&picker->portal_proxy);
G_OBJECT_CLASS (gtk_color_picker_portal_parent_class)->finalize (object);
}
static void
gtk_color_picker_portal_class_init (GtkColorPickerPortalClass *class)
{
GObjectClass *object_class = G_OBJECT_CLASS (class);
object_class->finalize = gtk_color_picker_portal_finalize;
}
GtkColorPicker *
gtk_color_picker_portal_new (void)
{
return GTK_COLOR_PICKER (g_initable_new (GTK_TYPE_COLOR_PICKER_PORTAL, NULL, NULL, NULL));
}
static void
portal_response_received (GDBusConnection *connection,
const char *sender_name,
const char *object_path,
const char *interface_name,
const char *signal_name,
GVariant *parameters,
gpointer user_data)
{
GtkColorPickerPortal *picker = user_data;
guint32 response;
GVariant *ret;
g_dbus_connection_signal_unsubscribe (connection, picker->portal_signal_id);
picker->portal_signal_id = 0;
g_variant_get (parameters, "(u@a{sv})", &response, &ret);
if (response == 0)
{
GdkRGBA c;
c.alpha = 1.0;
if (g_variant_lookup (ret, "color", "(ddd)", &c.red, &c.green, &c.blue))
g_task_return_pointer (picker->task, gdk_rgba_copy (&c), (GDestroyNotify)gdk_rgba_free);
else
g_task_return_new_error (picker->task,
G_IO_ERROR,
G_IO_ERROR_FAILED,
"No color received");
}
else
g_task_return_new_error (picker->task,
G_IO_ERROR,
G_IO_ERROR_FAILED,
"PickColor error");
g_variant_unref (ret);
g_clear_object (&picker->task);
}
static void
gtk_color_picker_portal_pick (GtkColorPicker *cp,
GAsyncReadyCallback callback,
gpointer user_data)
{
GtkColorPickerPortal *picker = GTK_COLOR_PICKER_PORTAL (cp);
GVariantBuilder options;
GDBusConnection *connection;
char *token;
char *handle;
if (picker->task)
return;
picker->task = g_task_new (picker, NULL, callback, user_data);
connection = g_dbus_proxy_get_connection (picker->portal_proxy);
handle = gtk_get_portal_request_path (connection, &token);
picker->portal_signal_id = g_dbus_connection_signal_subscribe (connection,
"org.freedesktop.portal.Desktop",
"org.freedesktop.portal.Request",
"Response",
handle,
NULL,
G_DBUS_SIGNAL_FLAGS_NO_MATCH_RULE,
portal_response_received,
picker,
NULL);
g_free (handle);
g_variant_builder_init (&options, G_VARIANT_TYPE_VARDICT);
g_variant_builder_add (&options, "{sv}", "handle_token", g_variant_new_string (token));
g_free (token);
g_dbus_proxy_call (picker->portal_proxy,
"PickColor",
g_variant_new ("(sa{sv})", "", &options),
0,
-1,
NULL,
NULL,
NULL);
}
static GdkRGBA *
gtk_color_picker_portal_pick_finish (GtkColorPicker *cp,
GAsyncResult *res,
GError **error)
{
g_return_val_if_fail (g_task_is_valid (res, cp), NULL);
return g_task_propagate_pointer (G_TASK (res), error);
}
static void
gtk_color_picker_portal_iface_init (GtkColorPickerInterface *iface)
{
iface->pick = gtk_color_picker_portal_pick;
iface->pick_finish = gtk_color_picker_portal_pick_finish;
}
-41
View File
@@ -1,41 +0,0 @@
/*
* GTK - The GIMP Toolkit
* Copyright (C) 2018 Red Hat, Inc.
* All rights reserved.
*
* This Library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public License as
* published by the Free Software Foundation; either version 2 of the
* License, or (at your option) any later version.
*
* This Library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Library General Public License for more details.
*
* You should have received a copy of the GNU Library General Public
* License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef __GTK_COLOR_PICKER_PORTAL_H__
#define __GTK_COLOR_PICKER_PORTAL_H__
#if !defined (__GTK_H_INSIDE__) && !defined (GTK_COMPILATION)
#error "Only <gtk/gtk.h> can be included directly."
#endif
#include <gtk/gtkcolorpickerprivate.h>
G_BEGIN_DECLS
#define GTK_TYPE_COLOR_PICKER_PORTAL gtk_color_picker_portal_get_type ()
G_DECLARE_FINAL_TYPE (GtkColorPickerPortal, gtk_color_picker_portal, GTK, COLOR_PICKER_PORTAL, GObject)
GDK_AVAILABLE_IN_ALL
GtkColorPicker * gtk_color_picker_portal_new (void);
G_END_DECLS
#endif /* __GTK_COLOR_PICKER_PORTAL_H__ */

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