Merge branch 'origin/master' into places-sidebar

This commit is contained in:
Federico Mena Quintero 2013-02-27 10:29:35 -06:00
commit a46976fb79
159 changed files with 13822 additions and 7962 deletions

61
NEWS
View File

@ -1,3 +1,64 @@
Overview of Changes in GTK+ 3.7.10
==================================
* We now support the Window Manager frame synchronization protocol draft (when
running under a WM that supports it). This means applications will throttle
their drawing cycle to what the compositor is drawing, and the compositor
will never render half-updated windows, for seamless resizing and improved
smoothness in drawing.
See https://mail.gnome.org/archives/wm-spec-list/2013-January/msg00000.html
and the articles at http://blog.fishsoup.net/ for more details.
* We now support setting an opacity to any GtkWidget, not just toplevels:
gtk_window_set_opacity has been deprecated in favor of gtk_widget_set_opacity.
* GtkIconTheme gained asynchronous loaders for GtkIconInfo objects
* GtkIconInfo has changed from being a boxed type to a GObject. This
is technically an ABI change, but basically all existing code
will keep working if its used as a boxed type, and its not
possible to instantiate GtkIconInfos outside Gtk, so this is not
expected to be a big problem.
* Bugs fixed:
590325 gtkbuilder needs a public policy about extension name
673243 GtkRadioMenuItem accelerators no longer appear
681578 gtk-demo: demo.ui is outdated
683311 Leak in GtkIconViewAccessible
685460 Add frame synchronization to GTK+
687842 Support partially transparent widgets
690247 multiple context in a immodule can't be selected
692411 Slave device tracking goes wrong when there are no GDK_DEVICE_TYPE_SLAVE
692728 wayland evet source doesn't handle poll err/hup
693251 wayland: fix the direction of scrolling
693253 wayland: remove debug message
693256 wayland: use the GdkCursorType enum information to lookup the cursor name
693257 wayland: avoid returning NULL when getting a cursor
693313 Improve tooltip support
693338 wayland: skip pointer and keyboard events without a surface
693400 gtkcellrenderertext: Sink floating entry before using as signal argument
693709 Hide recently used if it is turned off in the control center
693724 Add a gtk-recent-files-enabled GtkSetting
693802 Add async GtkIconInfo loaders
693912 wayland: look further through the hierarchy for the surface with the grab
693913 wayland: attempt to determine the possible parent surface for popups
693934 Add gdk_frame_clock_begin/end_updating()
694022 GtkViewport: annotate the adjustment args of the constructor
694075 GtkAccelLabel: Don't show "+" if there's no more keys to add
Added scroll and touch events to GtkToolPalette
* Translation updates:
Arabic
Catalan
Catalan (Valencian)
Czech
Japanese
Kazakh
Lithuanian
Malayalam
Polish
Serbian
Overview of Changes in GTK+ 3.7.8
=================================

View File

@ -71,6 +71,14 @@ and attach the patch to that bug report.
Patches should be in unified diff form. (The -up option to GNU diff.)
Release notes for 3.8
=====================
* GtkIconInfo has changed from being a boxed type to a GObject. This
is technically an ABI change, but basically all existing code
will keep working if its used as a boxed type, and its not
possible to instantiate GtkIconInfos outside Gtk, so this is not
expected to be a big problem.
Release notes for 3.6
=====================

View File

@ -16,10 +16,12 @@ EXTRA_DIST += \
gtk.vcxproj.filtersin \
gtk3-demo.vcxproj \
gtk3-demo.vcxproj.filters \
libgail.vcxproj \
libgail.vcxproj.filters \
libgail.vcxprojin \
libgail.vcxproj.filtersin \
gtk3-demo-application.vcxproj \
gtk3-demo-application.vcxproj.filters \
gtka11y.vcxproj \
gtka11y.vcxproj.filters \
gtka11y.vcxprojin \
gtka11y.vcxproj.filtersin \
gailutil.vcxproj \
gailutil.vcxproj.filters \
install.vcxproj

View File

@ -90,7 +90,7 @@
<OutputFile>$(OutDir)$(GtkDllPrefix)$(ProjectName)$(GtkDllSuffix).dll</OutputFile>
<GenerateDebugInformation>true</GenerateDebugInformation>
<ModuleDefinitionFile>..\..\..\libgail-util\gailutil.def</ModuleDefinitionFile>
<ImportLibrary>$(TargetDir)$(ProjectName)-$(GtkApiVersion).lib</ImportLibrary>
<ImportLibrary>$(TargetDir)$(ProjectName)-$(ApiVersion).lib</ImportLibrary>
<SubSystem>Windows</SubSystem>
<TargetMachine>MachineX86</TargetMachine>
</Link>
@ -114,7 +114,7 @@
<ModuleDefinitionFile>..\..\..\libgail-util\gailutil.def</ModuleDefinitionFile>
<GenerateDebugInformation>true</GenerateDebugInformation>
<SubSystem>Windows</SubSystem>
<ImportLibrary>$(TargetDir)$(ProjectName)-$(GtkApiVersion).lib</ImportLibrary>
<ImportLibrary>$(TargetDir)$(ProjectName)-$(ApiVersion).lib</ImportLibrary>
<TargetMachine>MachineX64</TargetMachine>
</Link>
</ItemDefinitionGroup>
@ -136,7 +136,7 @@
<OutputFile>$(OutDir)$(GtkDllPrefix)$(ProjectName)$(GtkDllSuffix).dll</OutputFile>
<GenerateDebugInformation>true</GenerateDebugInformation>
<ModuleDefinitionFile>..\..\..\libgail-util\gailutil.def</ModuleDefinitionFile>
<ImportLibrary>$(TargetDir)$(ProjectName)-$(GtkApiVersion).lib</ImportLibrary>
<ImportLibrary>$(TargetDir)$(ProjectName)-$(ApiVersion).lib</ImportLibrary>
<SubSystem>Windows</SubSystem>
<OptimizeReferences>true</OptimizeReferences>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
@ -161,7 +161,7 @@
<SubSystem>Windows</SubSystem>
<OptimizeReferences>true</OptimizeReferences>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<ImportLibrary>$(TargetDir)$(ProjectName)-$(GtkApiVersion).lib</ImportLibrary>
<ImportLibrary>$(TargetDir)$(ProjectName)-$(ApiVersion).lib</ImportLibrary>
<TargetMachine>MachineX64</TargetMachine>
</Link>
</ItemDefinitionGroup>

View File

@ -86,12 +86,12 @@
<DebugInformationFormat>EditAndContinue</DebugInformationFormat>
</ClCompile>
<Link>
<AdditionalDependencies>imm32.lib;%(AdditionalDependencies)</AdditionalDependencies>
<AdditionalDependencies>imm32.lib;winmm.lib;%(AdditionalDependencies)</AdditionalDependencies>
<OutputFile>$(OutDir)$(GtkDllPrefix)$(ProjectName)$(GtkDllSuffix).dll</OutputFile>
<ModuleDefinitionFile>$(IntDir)gdk.def</ModuleDefinitionFile>
<GenerateDebugInformation>true</GenerateDebugInformation>
<SubSystem>Windows</SubSystem>
<ImportLibrary>$(TargetDir)$(ProjectName)-$(GtkApiVersion).lib</ImportLibrary>
<ImportLibrary>$(TargetDir)$(ProjectName)-$(ApiVersion).lib</ImportLibrary>
<TargetMachine>MachineX86</TargetMachine>
</Link>
</ItemDefinitionGroup>
@ -106,14 +106,14 @@
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
</ClCompile>
<Link>
<AdditionalDependencies>imm32.lib;%(AdditionalDependencies)</AdditionalDependencies>
<AdditionalDependencies>imm32.lib;winmm.lib;%(AdditionalDependencies)</AdditionalDependencies>
<OutputFile>$(OutDir)$(GtkDllPrefix)$(ProjectName)$(GtkDllSuffix).dll</OutputFile>
<ModuleDefinitionFile>$(IntDir)gdk.def</ModuleDefinitionFile>
<GenerateDebugInformation>true</GenerateDebugInformation>
<SubSystem>Windows</SubSystem>
<OptimizeReferences>true</OptimizeReferences>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<ImportLibrary>$(TargetDir)$(ProjectName)-$(GtkApiVersion).lib</ImportLibrary>
<ImportLibrary>$(TargetDir)$(ProjectName)-$(ApiVersion).lib</ImportLibrary>
<TargetMachine>MachineX86</TargetMachine>
</Link>
</ItemDefinitionGroup>
@ -131,12 +131,12 @@
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
</ClCompile>
<Link>
<AdditionalDependencies>imm32.lib;%(AdditionalDependencies)</AdditionalDependencies>
<AdditionalDependencies>imm32.lib;winmm.lib;%(AdditionalDependencies)</AdditionalDependencies>
<OutputFile>$(OutDir)$(GtkDllPrefix)$(ProjectName)$(GtkDllSuffix).dll</OutputFile>
<ModuleDefinitionFile>$(IntDir)gdk.def</ModuleDefinitionFile>
<GenerateDebugInformation>true</GenerateDebugInformation>
<SubSystem>Windows</SubSystem>
<ImportLibrary>$(TargetDir)$(ProjectName)-$(GtkApiVersion).lib</ImportLibrary>
<ImportLibrary>$(TargetDir)$(ProjectName)-$(ApiVersion).lib</ImportLibrary>
<TargetMachine>MachineX64</TargetMachine>
</Link>
</ItemDefinitionGroup>
@ -151,14 +151,14 @@
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
</ClCompile>
<Link>
<AdditionalDependencies>imm32.lib;%(AdditionalDependencies)</AdditionalDependencies>
<AdditionalDependencies>imm32.lib;winmm.lib;%(AdditionalDependencies)</AdditionalDependencies>
<OutputFile>$(OutDir)$(GtkDllPrefix)$(ProjectName)$(GtkDllSuffix).dll</OutputFile>
<ModuleDefinitionFile>$(IntDir)gdk.def</ModuleDefinitionFile>
<GenerateDebugInformation>true</GenerateDebugInformation>
<SubSystem>Windows</SubSystem>
<OptimizeReferences>true</OptimizeReferences>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<ImportLibrary>$(TargetDir)$(ProjectName)-$(GtkApiVersion).lib</ImportLibrary>
<ImportLibrary>$(TargetDir)$(ProjectName)-$(ApiVersion).lib</ImportLibrary>
<TargetMachine>MachineX64</TargetMachine>
</Link>
</ItemDefinitionGroup>

File diff suppressed because it is too large Load Diff

View File

@ -8,7 +8,9 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "gtk", "gtk.vcxproj", "{FC5A
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "gtk3-demo", "gtk3-demo.vcxproj", "{FC5AADB5-95CD-4BF0-BA8B-0C16FE7073FC}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libgail", "libgail.vcxproj", "{F756B0DB-40A1-4E9F-BE1F-8F02CB86EA46}"
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "gtk3-demo-application", "gtk3-demo-application.vcxproj", "{3281202A-CD26-4C67-B892-EB34BDBC612F}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "gtka11y", "gtka11y.vcxproj", "{F756B0DB-40A1-4E9F-BE1F-8F02CB86EA46}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "gailutil", "gailutil.vcxproj", "{29E3E814-1BA3-4AD7-A3A7-3669CB80A942}"
EndProject
@ -78,6 +80,14 @@ Global
{FC5AADB5-95CD-4BF0-BA8B-0C16FE7073FB}.Release|Win32.Build.0 = Release|Win32
{FC5AADB5-95CD-4BF0-BA8B-0C16FE7073FB}.Release|x64.ActiveCfg = Release|x64
{FC5AADB5-95CD-4BF0-BA8B-0C16FE7073FB}.Release|x64.Build.0 = Release|x64
{3281202A-CD26-4C67-B892-EB34BDBC612F}.Debug|Win32.ActiveCfg = Debug|Win32
{3281202A-CD26-4C67-B892-EB34BDBC612F}.Debug|Win32.Build.0 = Debug|Win32
{3281202A-CD26-4C67-B892-EB34BDBC612F}.Debug|x64.ActiveCfg = Debug|x64
{3281202A-CD26-4C67-B892-EB34BDBC612F}.Debug|x64.Build.0 = Debug|x64
{3281202A-CD26-4C67-B892-EB34BDBC612F}.Release|Win32.ActiveCfg = Release|Win32
{3281202A-CD26-4C67-B892-EB34BDBC612F}.Release|Win32.Build.0 = Release|Win32
{3281202A-CD26-4C67-B892-EB34BDBC612F}.Release|x64.ActiveCfg = Release|x64
{3281202A-CD26-4C67-B892-EB34BDBC612F}.Release|x64.Build.0 = Release|x64
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE

View File

@ -91,7 +91,7 @@
<ModuleDefinitionFile>$(IntDir)gtk.def</ModuleDefinitionFile>
<GenerateDebugInformation>true</GenerateDebugInformation>
<SubSystem>Windows</SubSystem>
<ImportLibrary>$(TargetDir)$(ProjectName)-$(GtkApiVersion).lib</ImportLibrary>
<ImportLibrary>$(TargetDir)$(ProjectName)-$(ApiVersion).lib</ImportLibrary>
<TargetMachine>MachineX86</TargetMachine>
</Link>
</ItemDefinitionGroup>
@ -113,7 +113,7 @@
<SubSystem>Windows</SubSystem>
<OptimizeReferences>true</OptimizeReferences>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<ImportLibrary>$(TargetDir)$(ProjectName)-$(GtkApiVersion).lib</ImportLibrary>
<ImportLibrary>$(TargetDir)$(ProjectName)-$(ApiVersion).lib</ImportLibrary>
<TargetMachine>MachineX86</TargetMachine>
</Link>
</ItemDefinitionGroup>
@ -136,7 +136,7 @@
<ModuleDefinitionFile>$(IntDir)gtk.def</ModuleDefinitionFile>
<GenerateDebugInformation>true</GenerateDebugInformation>
<SubSystem>Windows</SubSystem>
<ImportLibrary>$(TargetDir)$(ProjectName)-$(GtkApiVersion).lib</ImportLibrary>
<ImportLibrary>$(TargetDir)$(ProjectName)-$(ApiVersion).lib</ImportLibrary>
<TargetMachine>MachineX64</TargetMachine>
</Link>
</ItemDefinitionGroup>
@ -158,7 +158,7 @@
<SubSystem>Windows</SubSystem>
<OptimizeReferences>true</OptimizeReferences>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<ImportLibrary>$(TargetDir)$(ProjectName)-$(GtkApiVersion).lib</ImportLibrary>
<ImportLibrary>$(TargetDir)$(ProjectName)-$(ApiVersion).lib</ImportLibrary>
<TargetMachine>MachineX64</TargetMachine>
</Link>
</ItemDefinitionGroup>
@ -204,7 +204,7 @@
<Project>{fc5aadb5-95cd-4bf0-ba8b-0c16fe7073f7}</Project>
<ReferenceOutputAssembly>false</ReferenceOutputAssembly>
</ProjectReference>
<ProjectReference Include="libgail.vcxproj">
<ProjectReference Include="gtka11y.vcxproj">
<Project>{f756b0db-40a1-4e9f-be1f-8f02cb86ea46}</Project>
<ReferenceOutputAssembly>false</ReferenceOutputAssembly>
</ProjectReference>

View File

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

View File

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

View File

@ -27,7 +27,7 @@
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<CharacterSet>MultiByte</CharacterSet>
<WholeProgramOptimization>true</WholeProgramOptimization>
<WholeProgramOptimization>false</WholeProgramOptimization>
<PlatformToolset>v100</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
@ -38,7 +38,7 @@
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<CharacterSet>MultiByte</CharacterSet>
<WholeProgramOptimization>true</WholeProgramOptimization>
<WholeProgramOptimization>false</WholeProgramOptimization>
<PlatformToolset>v100</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
@ -135,6 +135,7 @@
<AdditionalDependencies>%(AdditionalDependencies)</AdditionalDependencies>
<GenerateDebugInformation>true</GenerateDebugInformation>
<SubSystem>Console</SubSystem>
<FunctionLevelLinking>false</FunctionLevelLinking>
<OptimizeReferences>true</OptimizeReferences>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<RandomizedBaseAddress>false</RandomizedBaseAddress>
@ -158,6 +159,7 @@
<AdditionalDependencies>%(AdditionalDependencies)</AdditionalDependencies>
<GenerateDebugInformation>true</GenerateDebugInformation>
<SubSystem>Console</SubSystem>
<FunctionLevelLinking>false</FunctionLevelLinking>
<OptimizeReferences>true</OptimizeReferences>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<RandomizedBaseAddress>false</RandomizedBaseAddress>
@ -211,7 +213,6 @@
<ClCompile Include="..\..\..\demos\gtk-demo\stock_browser.c" />
<ClCompile Include="..\..\..\demos\gtk-demo\textscroll.c" />
<ClCompile Include="..\..\..\demos\gtk-demo\textview.c" />
<ClCompile Include="..\..\..\demos\gtk-demo\theming_custom_css.c" />
<ClCompile Include="..\..\..\demos\gtk-demo\theming_style_classes.c" />
<ClCompile Include="..\..\..\demos\gtk-demo\toolpalette.c" />
<ClCompile Include="..\..\..\demos\gtk-demo\transparent.c" />

View File

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

View File

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

View File

@ -20,7 +20,7 @@
</ItemGroup>
<PropertyGroup Label="Globals">
<ProjectGuid>{F756B0DB-40A1-4E9F-BE1F-8F02CB86EA46}</ProjectGuid>
<RootNamespace>libgail</RootNamespace>
<RootNamespace>gtka11y</RootNamespace>
<Keyword>Win32Proj</Keyword>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
@ -120,9 +120,9 @@
</ClCompile>
</ItemDefinitionGroup>
<ItemGroup>
#include "libgail.vs10.sourcefiles"
#include "gtka11y.vs10.sourcefiles"
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
</Project>
</Project>

View File

@ -113,6 +113,10 @@
<Project>{29e3e814-1ba3-4ad7-a3a7-3669cb80a942}</Project>
<ReferenceOutputAssembly>false</ReferenceOutputAssembly>
</ProjectReference>
<ProjectReference Include="gtk-demo-application.vcxproj">
<Project>{3281202a-cd26-4c67-b892-eb34bdbc612f}</Project>
<ReferenceOutputAssembly>false</ReferenceOutputAssembly>
</ProjectReference>
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">

View File

@ -10,8 +10,9 @@ EXTRA_DIST += \
gtk.vcproj \
gtk.vcprojin \
gtk3-demo.vcproj \
libgail.vcproj \
libgail.vcprojin \
gtk3-demo-application.vcproj \
gtka11y.vcproj \
gtka11y.vcprojin \
gailutil.vcproj \
install.vcproj

View File

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

View File

@ -42,13 +42,13 @@
/>
<Tool
Name="VCLinkerTool"
AdditionalDependencies="imm32.lib"
AdditionalDependencies="imm32.lib winmm.lib"
OutputFile="$(OutDir)\$(GtkDllPrefix)$(ProjectName)$(GtkDllSuffix).dll"
LinkIncremental="1"
ModuleDefinitionFile="$(IntDir)\gdk.def"
GenerateDebugInformation="true"
SubSystem="2"
ImportLibrary="$(TargetDir)$(ProjectName)-$(GtkApiVersion).lib"
ImportLibrary="$(TargetDir)$(ProjectName)-$(ApiVersion).lib"
TargetMachine="1"
/>
</Configuration>
@ -73,7 +73,7 @@
/>
<Tool
Name="VCLinkerTool"
AdditionalDependencies="imm32.lib"
AdditionalDependencies="imm32.lib winmm.lib"
OutputFile="$(OutDir)\$(GtkDllPrefix)$(ProjectName)$(GtkDllSuffix).dll"
LinkIncremental="1"
ModuleDefinitionFile="$(IntDir)\gdk.def"
@ -81,7 +81,7 @@
SubSystem="2"
OptimizeReferences="2"
EnableCOMDATFolding="2"
ImportLibrary="$(TargetDir)$(ProjectName)-$(GtkApiVersion).lib"
ImportLibrary="$(TargetDir)$(ProjectName)-$(ApiVersion).lib"
TargetMachine="1"
/>
</Configuration>
@ -108,13 +108,13 @@
/>
<Tool
Name="VCLinkerTool"
AdditionalDependencies="imm32.lib"
AdditionalDependencies="imm32.lib winmm.lib"
OutputFile="$(OutDir)\$(GtkDllPrefix)$(ProjectName)$(GtkDllSuffix).dll"
LinkIncremental="1"
ModuleDefinitionFile="$(IntDir)\gdk.def"
GenerateDebugInformation="true"
SubSystem="2"
ImportLibrary="$(TargetDir)$(ProjectName)-$(GtkApiVersion).lib"
ImportLibrary="$(TargetDir)$(ProjectName)-$(ApiVersion).lib"
TargetMachine="17"
/>
</Configuration>
@ -139,7 +139,7 @@
/>
<Tool
Name="VCLinkerTool"
AdditionalDependencies="imm32.lib"
AdditionalDependencies="imm32.lib winmm.lib"
OutputFile="$(OutDir)\$(GtkDllPrefix)$(ProjectName)$(GtkDllSuffix).dll"
LinkIncremental="1"
ModuleDefinitionFile="$(IntDir)\gdk.def"
@ -147,7 +147,7 @@
SubSystem="2"
OptimizeReferences="2"
EnableCOMDATFolding="2"
ImportLibrary="$(TargetDir)$(ProjectName)-$(GtkApiVersion).lib"
ImportLibrary="$(TargetDir)$(ProjectName)-$(ApiVersion).lib"
TargetMachine="17"
/>
</Configuration>

View File

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

View File

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

View File

@ -48,7 +48,7 @@
ModuleDefinitionFile="$(IntDir)\gtk.def"
GenerateDebugInformation="true"
SubSystem="2"
ImportLibrary="$(TargetDir)$(ProjectName)-$(GtkApiVersion).lib"
ImportLibrary="$(TargetDir)$(ProjectName)-$(ApiVersion).lib"
TargetMachine="1"
/>
</Configuration>
@ -81,7 +81,7 @@
SubSystem="2"
OptimizeReferences="2"
EnableCOMDATFolding="2"
ImportLibrary="$(TargetDir)$(ProjectName)-$(GtkApiVersion).lib"
ImportLibrary="$(TargetDir)$(ProjectName)-$(ApiVersion).lib"
TargetMachine="1"
/>
</Configuration>
@ -114,7 +114,7 @@
ModuleDefinitionFile="$(IntDir)\gtk.def"
GenerateDebugInformation="true"
SubSystem="2"
ImportLibrary="$(TargetDir)$(ProjectName)-$(GtkApiVersion).lib"
ImportLibrary="$(TargetDir)$(ProjectName)-$(ApiVersion).lib"
TargetMachine="17"
/>
</Configuration>
@ -147,7 +147,7 @@
SubSystem="2"
OptimizeReferences="2"
EnableCOMDATFolding="2"
ImportLibrary="$(TargetDir)$(ProjectName)-$(GtkApiVersion).lib"
ImportLibrary="$(TargetDir)$(ProjectName)-$(ApiVersion).lib"
TargetMachine="17"
/>
</Configuration>

View File

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

View File

@ -90,7 +90,7 @@
ConfigurationType="1"
InheritedPropertySheets=".\gtk+.vsprops"
CharacterSet="2"
WholeProgramOptimization="1"
WholeProgramOptimization="0"
>
<Tool
Name="VCPreBuildEventTool"
@ -123,7 +123,7 @@
ConfigurationType="1"
InheritedPropertySheets=".\gtk+.vsprops"
CharacterSet="2"
WholeProgramOptimization="1"
WholeProgramOptimization="0"
>
<Tool
Name="VCPreBuildEventTool"
@ -204,7 +204,6 @@
<File RelativePath="..\..\..\demos\gtk-demo\stock_browser.c" />
<File RelativePath="..\..\..\demos\gtk-demo\textscroll.c" />
<File RelativePath="..\..\..\demos\gtk-demo\textview.c" />
<File RelativePath="..\..\..\demos\gtk-demo\theming_custom_css.c" />
<File RelativePath="..\..\..\demos\gtk-demo\theming_style_classes.c" />
<File RelativePath="..\..\..\demos\gtk-demo\toolpalette.c" />
<File RelativePath="..\..\..\demos\gtk-demo\transparent.c" />

View File

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

View File

@ -10,7 +10,7 @@
m4_define([gtk_major_version], [3])
m4_define([gtk_minor_version], [7])
m4_define([gtk_micro_version], [9])
m4_define([gtk_micro_version], [11])
m4_define([gtk_interface_age], [0])
m4_define([gtk_binary_age],
[m4_eval(100 * gtk_minor_version + gtk_micro_version)])

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -9,8 +9,8 @@
#include "demos.h"
static GtkTextBuffer *info_buffer;
static GtkTextBuffer *source_buffer;
static GtkWidget *info_view;
static GtkWidget *source_view;
static gchar *current_file = NULL;
@ -353,7 +353,7 @@ parse_chars (gchar *text,
/* While not as cool as c-mode, this will do as a quick attempt at highlighting */
static void
fontify (void)
fontify (GtkTextBuffer *source_buffer)
{
GtkTextIter start_iter, next_iter, tmp_iter;
gint state;
@ -398,12 +398,11 @@ fontify (void)
}
}
static GtkWidget *create_text (GtkTextBuffer **buffer, gboolean is_source);
static GtkWidget *create_text (GtkWidget **text_view, gboolean is_source);
static void
add_data_tab (const gchar *demoname)
{
GtkTextBuffer *buffer = NULL;
gchar *resource_dir, *resource_name, *content_type;
gchar **resources;
GBytes *bytes;
@ -440,8 +439,13 @@ add_data_tab (const gchar *demoname)
}
else if (g_content_type_is_a (content_type, "text/plain"))
{
widget = create_text (&buffer, FALSE);
GtkTextBuffer *buffer;
GtkWidget *textview;
widget = create_text (&textview, FALSE);
buffer = gtk_text_buffer_new (NULL);
gtk_text_buffer_set_text (buffer, g_bytes_get_data (bytes, NULL), g_bytes_get_size (bytes));
gtk_text_view_set_buffer (GTK_TEXT_VIEW (textview), buffer);
}
else
{
@ -476,6 +480,7 @@ void
load_file (const gchar *demoname,
const gchar *filename)
{
GtkTextBuffer *info_buffer, *source_buffer;
GtkTextIter start, end;
char *resource_filename;
GError *err = NULL;
@ -495,11 +500,34 @@ load_file (const gchar *demoname,
g_free (current_file);
current_file = g_strdup (filename);
gtk_text_buffer_get_bounds (info_buffer, &start, &end);
gtk_text_buffer_delete (info_buffer, &start, &end);
info_buffer = gtk_text_buffer_new (NULL);
gtk_text_buffer_create_tag (info_buffer, "title",
"font", "Sans 18",
"pixels-below-lines", 10,
NULL);
gtk_text_buffer_get_bounds (source_buffer, &start, &end);
gtk_text_buffer_delete (source_buffer, &start, &end);
source_buffer = gtk_text_buffer_new (NULL);
gtk_text_buffer_create_tag (source_buffer, "comment",
"foreground", "DodgerBlue",
NULL);
gtk_text_buffer_create_tag (source_buffer, "type",
"foreground", "ForestGreen",
NULL);
gtk_text_buffer_create_tag (source_buffer, "string",
"foreground", "RosyBrown",
"weight", PANGO_WEIGHT_BOLD,
NULL);
gtk_text_buffer_create_tag (source_buffer, "control",
"foreground", "purple",
NULL);
gtk_text_buffer_create_tag (source_buffer, "preprocessor",
"style", PANGO_STYLE_OBLIQUE,
"foreground", "burlywood4",
NULL);
gtk_text_buffer_create_tag (source_buffer, "function",
"weight", PANGO_WEIGHT_BOLD,
"foreground", "DarkGoldenrod4",
NULL);
resource_filename = g_strconcat ("/sources/", filename, NULL);
bytes = g_resources_lookup_data (resource_filename, 0, &err);
@ -629,9 +657,14 @@ load_file (const gchar *demoname,
}
}
fontify ();
fontify (source_buffer);
g_strfreev (lines);
gtk_text_view_set_buffer (GTK_TEXT_VIEW (info_view), info_buffer);
g_object_unref (info_buffer);
gtk_text_view_set_buffer (GTK_TEXT_VIEW (source_view), source_buffer);
g_object_unref (source_buffer);
}
void
@ -699,8 +732,8 @@ selection_cb (GtkTreeSelection *selection,
}
static GtkWidget *
create_text (GtkTextBuffer **buffer,
gboolean is_source)
create_text (GtkWidget **view,
gboolean is_source)
{
GtkWidget *scrolled_window;
GtkWidget *text_view;
@ -713,11 +746,9 @@ create_text (GtkTextBuffer **buffer,
gtk_scrolled_window_set_shadow_type (GTK_SCROLLED_WINDOW (scrolled_window),
GTK_SHADOW_IN);
text_view = gtk_text_view_new ();
*view = text_view = gtk_text_view_new ();
g_object_set (text_view, "margin", 20, NULL);
*buffer = gtk_text_buffer_new (NULL);
gtk_text_view_set_buffer (GTK_TEXT_VIEW (text_view), *buffer);
gtk_text_view_set_editable (GTK_TEXT_VIEW (text_view), FALSE);
gtk_text_view_set_cursor_visible (GTK_TEXT_VIEW (text_view), FALSE);
@ -899,43 +930,13 @@ main (int argc, char **argv)
gtk_box_pack_start (GTK_BOX (hbox), notebook, TRUE, TRUE, 0);
gtk_notebook_append_page (GTK_NOTEBOOK (notebook),
create_text (&info_buffer, FALSE),
create_text (&info_view, FALSE),
gtk_label_new_with_mnemonic ("_Info"));
gtk_text_buffer_create_tag (info_buffer, "title",
"font", "Sans 18",
"pixels-below-lines", 10,
NULL);
g_object_unref (info_buffer);
gtk_notebook_append_page (GTK_NOTEBOOK (notebook),
create_text (&source_buffer, TRUE),
create_text (&source_view, TRUE),
gtk_label_new_with_mnemonic ("_Source"));
gtk_text_buffer_create_tag (source_buffer, "comment",
"foreground", "DodgerBlue",
NULL);
gtk_text_buffer_create_tag (source_buffer, "type",
"foreground", "ForestGreen",
NULL);
gtk_text_buffer_create_tag (source_buffer, "string",
"foreground", "RosyBrown",
"weight", PANGO_WEIGHT_BOLD,
NULL);
gtk_text_buffer_create_tag (source_buffer, "control",
"foreground", "purple",
NULL);
gtk_text_buffer_create_tag (source_buffer, "preprocessor",
"style", PANGO_STYLE_OBLIQUE,
"foreground", "burlywood4",
NULL);
gtk_text_buffer_create_tag (source_buffer, "function",
"weight", PANGO_WEIGHT_BOLD,
"foreground", "DarkGoldenrod4",
NULL);
g_object_unref (source_buffer);
gtk_window_set_default_size (GTK_WINDOW (window), 600, 400);
gtk_widget_show_all (window);

View File

@ -16,8 +16,6 @@
#include <gtk/gtk.h>
#include <math.h>
#define FRAME_DELAY 50
#define BACKGROUND_NAME "/pixbufs/background.jpg"
static const char *image_names[] = {
@ -88,14 +86,17 @@ draw_cb (GtkWidget *widget,
return TRUE;
}
#define CYCLE_LEN 60
#define CYCLE_TIME 3000000 /* 3 seconds */
static int frame_num;
static gint64 start_time;
/* Timeout handler to regenerate the frame */
static gint
timeout (gpointer data)
/* Handler to regenerate the frame */
static gboolean
on_tick (GtkWidget *widget,
GdkFrameClock *frame_clock,
gpointer data)
{
gint64 current_time;
double f;
int i;
double xmid, ymid;
@ -104,7 +105,11 @@ timeout (gpointer data)
gdk_pixbuf_copy_area (background, 0, 0, back_width, back_height,
frame, 0, 0);
f = (double) (frame_num % CYCLE_LEN) / CYCLE_LEN;
if (start_time == 0)
start_time = gdk_frame_clock_get_frame_time (frame_clock);
current_time = gdk_frame_clock_get_frame_time (frame_clock);
f = ((current_time - start_time) % CYCLE_TIME) / (double)CYCLE_TIME;
xmid = back_width / 2.0;
ymid = back_height / 2.0;
@ -159,20 +164,9 @@ timeout (gpointer data)
gtk_widget_queue_draw (da);
frame_num++;
return G_SOURCE_CONTINUE;
}
static guint timeout_id;
static void
cleanup_callback (GObject *object,
gpointer data)
{
g_source_remove (timeout_id);
timeout_id = 0;
}
GtkWidget *
do_pixbufs (GtkWidget *do_widget)
{
@ -188,8 +182,6 @@ do_pixbufs (GtkWidget *do_widget)
g_signal_connect (window, "destroy",
G_CALLBACK (gtk_widget_destroyed), &window);
g_signal_connect (window, "destroy",
G_CALLBACK (cleanup_callback), NULL);
error = NULL;
@ -224,7 +216,7 @@ do_pixbufs (GtkWidget *do_widget)
gtk_container_add (GTK_CONTAINER (window), da);
timeout_id = g_timeout_add (FRAME_DELAY, timeout, NULL);
gtk_widget_add_tick_callback (da, on_tick, NULL, NULL);
}
}

View File

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

View File

@ -31,6 +31,8 @@
<xi:include href="xml/visuals.xml" />
<xi:include href="xml/cursors.xml" />
<xi:include href="xml/windows.xml" />
<xi:include href="xml/gdkframeclock.xml" />
<xi:include href="xml/gdkframetimings.xml" />
<xi:include href="xml/events.xml" />
<xi:include href="xml/event_structs.xml" />
<xi:include href="xml/keys.xml" />
@ -69,6 +71,10 @@
<title>Index of new symbols in 3.6</title>
<xi:include href="xml/api-index-3.6.xml"><xi:fallback /></xi:include>
</index>
<index id="api-index-3-8" role="3.8">
<title>Index of new symbols in 3.8</title>
<xi:include href="xml/api-index-3.8.xml"><xi:fallback /></xi:include>
</index>
<xi:include href="xml/annotation-glossary.xml"><xi:fallback /></xi:include>

View File

@ -404,6 +404,7 @@ gdk_window_process_updates
gdk_window_set_debug_updates
gdk_window_enable_synchronized_configure
gdk_window_configure_finished
gdk_window_get_frame_clock
<SUBSECTION>
gdk_window_set_user_data
@ -988,6 +989,7 @@ gdk_x11_window_set_hide_titlebar_when_maximized
gdk_x11_window_set_theme_variant
gdk_x11_window_set_user_time
gdk_x11_window_move_to_current_desktop
gdk_x11_window_set_utf8_property
gdk_x11_get_default_root_xwindow
gdk_x11_get_default_screen
gdk_x11_get_default_xdisplay
@ -1154,3 +1156,38 @@ gdk_test_render_sync
gdk_test_simulate_button
gdk_test_simulate_key
</SECTION>
<SECTION>
<TITLE>GdkFrameClock</TITLE>
<FILE>gdkframeclock</FILE>
GdkFrameClock
gdk_frame_clock_get_frame_time
GdkFrameClockPhase
gdk_frame_clock_request_phase
gdk_frame_clock_begin_updating
gdk_frame_clock_end_updating
gdk_frame_clock_get_frame_counter
gdk_frame_clock_get_history_start
gdk_frame_clock_get_timings
gdk_frame_clock_get_current_timings
gdk_frame_clock_get_refresh_info
<SUBSECTION Private>
GdkFrameClockPrivate
gdk_frame_clock_get_type
</SECTION>
<SECTION>
<TITLE>GdkFrameTimings</TITLE>
<FILE>gdkframetimings</FILE>
GdkFrameTimings
gdk_frame_timings_ref
gdk_frame_timings_unref
gdk_frame_timings_get_frame_counter
gdk_frame_timings_get_complete
gdk_frame_timings_get_frame_time
gdk_frame_timings_get_presentation_time
gdk_frame_timings_get_refresh_interval
gdk_frame_timings_get_predicted_presentation_time
<SUBSECTION Private>
gdk_frame_get_type
</SECTION>

View File

@ -4768,6 +4768,7 @@ GtkCellRendererState
GtkCellRendererMode
GtkCellRenderer
GtkCellRendererClass
gtk_cell_renderer_class_set_accessible_type
gtk_cell_renderer_get_aligned_area
gtk_cell_renderer_get_size
gtk_cell_renderer_render
@ -5177,6 +5178,10 @@ gtk_widget_draw
gtk_widget_queue_draw
gtk_widget_queue_resize
gtk_widget_queue_resize_no_redraw
gtk_widget_get_frame_clock
GtkTickCallback
gtk_widget_add_tick_callback
gtk_widget_remove_tick_callback
gtk_widget_size_request
gtk_widget_get_child_requisition
gtk_widget_size_allocate
@ -5304,6 +5309,8 @@ gtk_widget_get_has_tooltip
gtk_widget_set_has_tooltip
gtk_widget_trigger_tooltip_query
gtk_widget_get_window
gtk_widget_register_window
gtk_widget_unregister_window
gtk_cairo_should_draw_window
gtk_cairo_transform_to_window
gtk_widget_get_allocated_width
@ -5347,6 +5354,11 @@ gtk_widget_get_requisition
gtk_widget_device_is_shadowed
gtk_widget_get_modifier_mask
gtk_widget_insert_action_group
gtk_widget_add_tick_callback
gtk_widget_remove_tick_callback
gtk_widget_get_frame_clock
gtk_widget_get_opacity
gtk_widget_set_opacity
<SUBSECTION>
gtk_widget_get_path
@ -5828,6 +5840,7 @@ gtk_style_context_get_parent
gtk_style_context_get_path
gtk_style_context_get_property
gtk_style_context_get_screen
gtk_style_context_get_frame_clock
gtk_style_context_get_state
gtk_style_context_get_style
gtk_style_context_get_style_property
@ -5869,6 +5882,7 @@ gtk_style_context_remove_region
gtk_style_context_has_region
gtk_style_context_list_regions
gtk_style_context_set_screen
gtk_style_context_set_frame_clock
gtk_style_context_set_state
<SUBSECTION>
@ -6506,9 +6520,15 @@ gtk_icon_info_get_base_size
gtk_icon_info_get_filename
gtk_icon_info_get_builtin_pixbuf
gtk_icon_info_load_icon
gtk_icon_info_load_icon_async
gtk_icon_info_load_icon_finish
gtk_icon_info_load_symbolic
gtk_icon_info_load_symbolic_async
gtk_icon_info_load_symbolic_finish
gtk_icon_info_load_symbolic_for_style
gtk_icon_info_load_symbolic_for_context
gtk_icon_info_load_symbolic_for_context_async
gtk_icon_info_load_symbolic_for_context_finish
gtk_icon_info_set_raw_coordinates
gtk_icon_info_get_embedded_rect
gtk_icon_info_get_attach_points

View File

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

View File

@ -61,7 +61,11 @@ gdk_event_source_prepare (GSource *source,
gdk_threads_enter ();
*timeout = -1;
retval = (_gdk_event_queue_find_first (display) != NULL);
if (display->event_pause_count > 0)
retval = FALSE;
else
retval = (_gdk_event_queue_find_first (display) != NULL);
gdk_threads_leave ();
@ -76,7 +80,9 @@ gdk_event_source_check (GSource *source)
gdk_threads_enter ();
if (event_source->event_poll_fd.revents & G_IO_IN)
if (event_source->display->event_pause_count > 0)
retval = FALSE;
else if (event_source->event_poll_fd.revents & G_IO_IN)
retval = (_gdk_event_queue_find_first (event_source->display) != NULL);
else
retval = FALSE;

View File

@ -1294,20 +1294,6 @@ gdk_broadway_window_begin_move_drag (GdkWindow *window,
}
static void
gdk_broadway_window_enable_synchronized_configure (GdkWindow *window)
{
if (!GDK_IS_WINDOW_IMPL_BROADWAY (window->impl))
return;
}
static void
gdk_broadway_window_configure_finished (GdkWindow *window)
{
if (!WINDOW_IS_TOPLEVEL (window))
return;
}
static gboolean
gdk_broadway_window_beep (GdkWindow *window)
{
@ -1499,8 +1485,6 @@ gdk_window_impl_broadway_class_init (GdkWindowImplBroadwayClass *klass)
impl_class->set_functions = gdk_broadway_window_set_functions;
impl_class->begin_resize_drag = gdk_broadway_window_begin_resize_drag;
impl_class->begin_move_drag = gdk_broadway_window_begin_move_drag;
impl_class->enable_synchronized_configure = gdk_broadway_window_enable_synchronized_configure;
impl_class->configure_finished = gdk_broadway_window_configure_finished;
impl_class->set_opacity = gdk_broadway_window_set_opacity;
impl_class->set_composited = gdk_broadway_window_set_composited;
impl_class->destroy_notify = gdk_broadway_window_destroy_notify;

View File

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

View File

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

View File

@ -188,6 +188,27 @@ gdk_events_pending
gdk_event_type_get_type
gdk_filter_return_get_type
gdk_flush
gdk_frame_clock_begin_updating
gdk_frame_clock_end_updating
gdk_frame_clock_get_current_timings
gdk_frame_clock_get_frame_counter
gdk_frame_clock_get_frame_time
gdk_frame_clock_get_history_start
gdk_frame_clock_get_refresh_info
gdk_frame_clock_get_timings
gdk_frame_clock_get_type
gdk_frame_clock_idle_get_type
gdk_frame_clock_phase_get_type
gdk_frame_clock_request_phase
gdk_frame_timings_get_complete
gdk_frame_timings_get_frame_counter
gdk_frame_timings_get_frame_time
gdk_frame_timings_get_predicted_presentation_time
gdk_frame_timings_get_presentation_time
gdk_frame_timings_get_refresh_interval
gdk_frame_timings_get_type
gdk_frame_timings_ref
gdk_frame_timings_unref
gdk_fullscreen_mode_get_type
gdk_get_default_root_window
gdk_get_display
@ -410,6 +431,7 @@ gdk_window_get_effective_parent
gdk_window_get_effective_toplevel
gdk_window_get_events
gdk_window_get_focus_on_map
gdk_window_get_frame_clock
gdk_window_get_frame_extents
gdk_window_get_fullscreen_mode
gdk_window_get_geometry

View File

@ -307,7 +307,11 @@ gdk_display_get_event (GdkDisplay *display)
{
g_return_val_if_fail (GDK_IS_DISPLAY (display), NULL);
if (display->event_pause_count > 0)
return NULL;
GDK_DISPLAY_GET_CLASS (display)->queue_events (display);
return _gdk_event_unqueue (display);
}
@ -2003,6 +2007,38 @@ gdk_display_notify_startup_complete (GdkDisplay *display,
GDK_DISPLAY_GET_CLASS (display)->notify_startup_complete (display, startup_id);
}
void
_gdk_display_pause_events (GdkDisplay *display)
{
display->event_pause_count++;
}
void
_gdk_display_unpause_events (GdkDisplay *display)
{
g_return_if_fail (display->event_pause_count > 0);
display->event_pause_count--;
}
void
_gdk_display_flush_events (GdkDisplay *display)
{
display->flushing_events = TRUE;
while (TRUE)
{
GdkEvent *event = _gdk_event_unqueue (display);
if (event == NULL)
break;
_gdk_event_emit (event);
gdk_event_free (event);
}
display->flushing_events = FALSE;
}
void
_gdk_display_event_data_copy (GdkDisplay *display,
const GdkEvent *event,

View File

@ -113,7 +113,10 @@ struct _GdkDisplay
guint double_click_time; /* Maximum time between clicks in msecs */
GdkDevice *core_pointer; /* Core pointer device */
guint event_pause_count; /* How many times events are blocked */
guint closed : 1; /* Whether this display has been closed */
guint flushing_events : 1; /* Inside gdk_display_flush_events */
GArray *touch_implicit_grabs;
GHashTable *device_grabs;
@ -296,6 +299,9 @@ void _gdk_display_pointer_info_foreach (GdkDisplay *display
GdkDisplayPointerInfoForeach func,
gpointer user_data);
gulong _gdk_display_get_next_serial (GdkDisplay *display);
void _gdk_display_pause_events (GdkDisplay *display);
void _gdk_display_unpause_events (GdkDisplay *display);
void _gdk_display_flush_events (GdkDisplay *display);
void _gdk_display_event_data_copy (GdkDisplay *display,
const GdkEvent *event,
GdkEvent *new_event);

View File

@ -85,13 +85,27 @@ _gdk_event_emit (GdkEvent *event)
GList*
_gdk_event_queue_find_first (GdkDisplay *display)
{
GList *tmp_list = display->queued_events;
GList *tmp_list;
GList *pending_motion = NULL;
if (display->event_pause_count > 0)
return NULL;
tmp_list = display->queued_events;
while (tmp_list)
{
GdkEventPrivate *event = tmp_list->data;
if (!(event->flags & GDK_EVENT_PENDING))
return tmp_list;
if (event->flags & GDK_EVENT_PENDING)
continue;
if (pending_motion)
return pending_motion;
if (event->event.type == GDK_MOTION_NOTIFY && !display->flushing_events)
pending_motion = tmp_list;
else
return tmp_list;
tmp_list = g_list_next (tmp_list);
}
@ -248,6 +262,61 @@ _gdk_event_unqueue (GdkDisplay *display)
return event;
}
void
_gdk_event_queue_handle_motion_compression (GdkDisplay *display)
{
GList *tmp_list;
GList *pending_motions = NULL;
GdkWindow *pending_motion_window = NULL;
GdkDevice *pending_motion_device = NULL;
/* If the last N events in the event queue are motion notify
* events for the same window, drop all but the last */
tmp_list = display->queued_tail;
while (tmp_list)
{
GdkEventPrivate *event = tmp_list->data;
if (event->flags & GDK_EVENT_PENDING)
break;
if (event->event.type != GDK_MOTION_NOTIFY)
break;
if (pending_motion_window != NULL &&
pending_motion_window != event->event.motion.window)
break;
if (pending_motion_device != NULL &&
pending_motion_device != event->event.motion.device)
break;
pending_motion_window = event->event.motion.window;
pending_motion_device = event->event.motion.device;
pending_motions = tmp_list;
tmp_list = tmp_list->prev;
}
while (pending_motions && pending_motions->next != NULL)
{
GList *next = pending_motions->next;
display->queued_events = g_list_delete_link (display->queued_events,
pending_motions);
pending_motions = next;
}
if (pending_motions &&
pending_motions == display->queued_events &&
pending_motions == display->queued_tail)
{
GdkFrameClock *clock = gdk_window_get_frame_clock (pending_motion_window);
gdk_frame_clock_request_phase (clock, GDK_FRAME_CLOCK_PHASE_FLUSH_EVENTS);
}
}
/**
* gdk_event_handler_set:
* @func: the function to call to handle events from GDK.

606
gdk/gdkframeclock.c Normal file
View File

@ -0,0 +1,606 @@
/* GDK - The GIMP Drawing Kit
* Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
* Boston, MA 02111-1307, USA.
*/
/*
* Modified by the GTK+ Team and others 1997-2010. See the AUTHORS
* file for a list of people on the GTK+ Team. See the ChangeLog
* files for a list of changes. These files are distributed with
* GTK+ at ftp://ftp.gtk.org/pub/gtk/.
*/
#include "config.h"
#include "gdkframeclockprivate.h"
#include "gdkinternals.h"
/**
* SECTION:gdkframeclock
* @Short_description: Frame clock syncs painting to a window or display
* @Title: Frame clock
*
* A #GdkFrameClock tells the application when to update and repaint a
* window. This may be synced to the vertical refresh rate of the
* monitor, for example. Even when the frame clock uses a simple timer
* rather than a hardware-based vertical sync, the frame clock helps
* because it ensures everything paints at the same time (reducing the
* total number of frames). The frame clock can also automatically
* stop painting when it knows the frames will not be visible, or
* scale back animation framerates.
*
* #GdkFrameClock is designed to be compatible with an OpenGL-based
* implementation or with mozRequestAnimationFrame in Firefox,
* for example.
*
* A frame clock is idle until someone requests a frame with
* gdk_frame_clock_request_phase(). At some later point that makes
* sense for the synchronization being implemented, the clock will
* process a frame and emit signals for each phase that has been
* requested. (See the signals of the #GdkFrameClock class for
* documentation of the phases. %GDK_FRAME_CLOCK_PHASE_UPDATE and the
* #GdkFrameClock::update signal are most interesting for application
* writers, and are used to update the animations, using the frame time
* given by gdk_frame_clock_get_frame_time().
*
* The frame time is reported in microseconds and generally in the same
* timescale as g_get_monotonic_time(), however, it is not the same
* as g_get_monotonic_time(). The frame time does not advance during
* the time a frame is being painted, and outside of a frame, an attempt
* is made so that all calls to gdk_frame_clock_get_frame_time() that
* are called at a "similar" time get the same value. This means that
* if different animations are timed by looking at the difference in
* time between an initial value from gdk_frame_clock_get_frame_time()
* and the value inside the #GdkFrameClock::update signal of the clock,
* they will stay exactly synchronized.
*/
G_DEFINE_ABSTRACT_TYPE (GdkFrameClock, gdk_frame_clock, G_TYPE_OBJECT)
enum {
FLUSH_EVENTS,
BEFORE_PAINT,
UPDATE,
LAYOUT,
PAINT,
AFTER_PAINT,
RESUME_EVENTS,
LAST_SIGNAL
};
static guint signals[LAST_SIGNAL];
#define FRAME_HISTORY_MAX_LENGTH 16
struct _GdkFrameClockPrivate
{
gint64 frame_counter;
gint n_timings;
gint current;
GdkFrameTimings *timings[FRAME_HISTORY_MAX_LENGTH];
};
static void
gdk_frame_clock_finalize (GObject *object)
{
GdkFrameClockPrivate *priv = GDK_FRAME_CLOCK (object)->priv;
int i;
for (i = 0; i < FRAME_HISTORY_MAX_LENGTH; i++)
if (priv->timings[i] != 0)
gdk_frame_timings_unref (priv->timings[i]);
G_OBJECT_CLASS (gdk_frame_clock_parent_class)->finalize (object);
}
static void
gdk_frame_clock_class_init (GdkFrameClockClass *klass)
{
GObjectClass *gobject_class = (GObjectClass*) klass;
gobject_class->finalize = gdk_frame_clock_finalize;
/**
* GdkFrameClock::flush-events:
* @clock: the frame clock emitting the signal
*
* This signal is used to flush pending motion events that
* are being batched up and compressed together. Applications
* should not handle this signal.
*/
signals[FLUSH_EVENTS] =
g_signal_new (g_intern_static_string ("flush-events"),
GDK_TYPE_FRAME_CLOCK,
G_SIGNAL_RUN_LAST,
0,
NULL, NULL,
g_cclosure_marshal_VOID__VOID,
G_TYPE_NONE, 0);
/**
* GdkFrameClock::before-paint:
* @clock: the frame clock emitting the signal
*
* This signal begins processing of the frame. Applications
* should generally not handle this signal.
*/
signals[BEFORE_PAINT] =
g_signal_new (g_intern_static_string ("before-paint"),
GDK_TYPE_FRAME_CLOCK,
G_SIGNAL_RUN_LAST,
0,
NULL, NULL,
g_cclosure_marshal_VOID__VOID,
G_TYPE_NONE, 0);
/**
* GdkFrameClock::update:
* @clock: the frame clock emitting the signal
*
* This signal is emitted as the first step of toolkit and
* application processing of the frame. Animations should
* be updated using gdk_frame_clock_get_frame_time().
* Applications can connect directly to this signal, or
* use gtk_widget_add_tick_callback() as a more convenient
* interface.
*/
signals[UPDATE] =
g_signal_new (g_intern_static_string ("update"),
GDK_TYPE_FRAME_CLOCK,
G_SIGNAL_RUN_LAST,
0,
NULL, NULL,
g_cclosure_marshal_VOID__VOID,
G_TYPE_NONE, 0);
/**
* GdkFrameClock::layout:
* @clock: the frame clock emitting the signal
*
* This signal is emitted as the second step of toolkit and
* application processing of the frame. Any work to update
* sizes and positions of application elements should be
* performed. GTK+ normally handles this internally.
*/
signals[LAYOUT] =
g_signal_new (g_intern_static_string ("layout"),
GDK_TYPE_FRAME_CLOCK,
G_SIGNAL_RUN_LAST,
0,
NULL, NULL,
g_cclosure_marshal_VOID__VOID,
G_TYPE_NONE, 0);
/**
* GdkFrameClock::paint:
* @clock: the frame clock emitting the signal
*
* This signal is emitted as the third step of toolkit and
* application processing of the frame. The frame is
* repainted. GDK normally handles this internally and
* produces expose events, which are turned into GTK+
* #GtkWidget::draw signals.
*/
signals[PAINT] =
g_signal_new (g_intern_static_string ("paint"),
GDK_TYPE_FRAME_CLOCK,
G_SIGNAL_RUN_LAST,
0,
NULL, NULL,
g_cclosure_marshal_VOID__VOID,
G_TYPE_NONE, 0);
/**
* GdkFrameClock::after-paint:
* @clock: the frame clock emitting the signal
*
* This signal ends processing of the frame. Applications
* should generally not handle this signal.
*/
signals[AFTER_PAINT] =
g_signal_new (g_intern_static_string ("after-paint"),
GDK_TYPE_FRAME_CLOCK,
G_SIGNAL_RUN_LAST,
0,
NULL, NULL,
g_cclosure_marshal_VOID__VOID,
G_TYPE_NONE, 0);
/**
* GdkFrameClock::resume-events:
* @clock: the frame clock emitting the signal
*
* This signal is emitted after processing of the frame is
* finished, and is handled internally by GTK+ to resume normal
* event processing. Applications should not handle this signal.
*/
signals[RESUME_EVENTS] =
g_signal_new (g_intern_static_string ("resume-events"),
GDK_TYPE_FRAME_CLOCK,
G_SIGNAL_RUN_LAST,
0,
NULL, NULL,
g_cclosure_marshal_VOID__VOID,
G_TYPE_NONE, 0);
g_type_class_add_private (klass, sizeof (GdkFrameClockPrivate));
}
static void
gdk_frame_clock_init (GdkFrameClock *clock)
{
GdkFrameClockPrivate *priv;
clock->priv = G_TYPE_INSTANCE_GET_PRIVATE (clock,
GDK_TYPE_FRAME_CLOCK,
GdkFrameClockPrivate);
priv = clock->priv;
priv->frame_counter = -1;
priv->current = FRAME_HISTORY_MAX_LENGTH - 1;
}
/**
* gdk_frame_clock_get_frame_time:
* @frame_clock: a #GdkFrameClock
*
* Gets the time that should currently be used for animations. Inside
* the processing of a frame, it's the time used to compute the
* animation position of everything in a frame. Outside of a frame, it's
* the time of the conceptual "previous frame," which may be either
* the actual previous frame time, or if that's too old, an updated
* time.
*
* Since: 3.8
* Return value: a timestamp in microseconds, in the timescale of
* of g_get_monotonic_time().
*/
gint64
gdk_frame_clock_get_frame_time (GdkFrameClock *frame_clock)
{
g_return_val_if_fail (GDK_IS_FRAME_CLOCK (frame_clock), 0);
return GDK_FRAME_CLOCK_GET_CLASS (frame_clock)->get_frame_time (frame_clock);
}
/**
* gdk_frame_clock_request_phase:
* @frame_clock: a #GdkFrameClock
* @phase: the phase that is requested
*
* Asks the frame clock to run a particular phase. The signal
* corresponding the requested phase will be emitted the next
* time the frame clock processes. Multiple calls to
* gdk_frame_clock_request_phase() will be combined together
* and only one frame processed. If you are displaying animated
* content and want to continually request the
* %GDK_FRAME_CLOCK_PHASE_UPDATE phase for a period of time,
* you should use gdk_frame_clock_begin_updating() instead, since
* this allows GTK+ to adjust system parameters to get maximally
* smooth animations.
*
* Since: 3.8
*/
void
gdk_frame_clock_request_phase (GdkFrameClock *frame_clock,
GdkFrameClockPhase phase)
{
g_return_if_fail (GDK_IS_FRAME_CLOCK (frame_clock));
GDK_FRAME_CLOCK_GET_CLASS (frame_clock)->request_phase (frame_clock, phase);
}
/**
* gdk_frame_clock_begin_updating:
* @frame_clock: a #GdkFrameClock
*
* Starts updates for an animation. Until a matching call to
* gdk_frame_clock_end_updating() is made, the frame clock will continually
* request a new frame with the %GDK_FRAME_CLOCK_PHASE_UPDATE phase.
* This function may be called multiple times and frames will be
* requested until gdk_frame_clock_end_updating() is called the same
* number of times.
*
* Since: 3.8
*/
void
gdk_frame_clock_begin_updating (GdkFrameClock *frame_clock)
{
g_return_if_fail (GDK_IS_FRAME_CLOCK (frame_clock));
GDK_FRAME_CLOCK_GET_CLASS (frame_clock)->begin_updating (frame_clock);
}
/**
* gdk_frame_clock_end_updating:
* @frame_clock: a #GdkFrameClock
*
* Stops updates for an animation. See the documentation for
* gdk_frame_clock_begin_updating().
*
* Since: 3.8
*/
void
gdk_frame_clock_end_updating (GdkFrameClock *frame_clock)
{
g_return_if_fail (GDK_IS_FRAME_CLOCK (frame_clock));
GDK_FRAME_CLOCK_GET_CLASS (frame_clock)->end_updating (frame_clock);
}
void
_gdk_frame_clock_freeze (GdkFrameClock *clock)
{
g_return_if_fail (GDK_IS_FRAME_CLOCK (clock));
GDK_FRAME_CLOCK_GET_CLASS (clock)->freeze (clock);
}
void
_gdk_frame_clock_thaw (GdkFrameClock *clock)
{
g_return_if_fail (GDK_IS_FRAME_CLOCK (clock));
GDK_FRAME_CLOCK_GET_CLASS (clock)->thaw (clock);
}
/**
* gdk_frame_clock_get_frame_counter:
* @frame_clock: a #GdkFrameClock
*
* A #GdkFrameClock maintains a 64-bit counter that increments for
* each frame drawn.
*
* Returns: inside frame processing, the value of the frame counter
* for the current frame. Outside of frame processing, the frame
* counter for the last frame.
* Since: 3.8
*/
gint64
gdk_frame_clock_get_frame_counter (GdkFrameClock *frame_clock)
{
GdkFrameClockPrivate *priv;
g_return_val_if_fail (GDK_IS_FRAME_CLOCK (frame_clock), 0);
priv = frame_clock->priv;
return priv->frame_counter;
}
/**
* gdk_frame_clock_get_history_start:
* @frame_clock: a #GdkFrameClock
*
* #GdkFrameClock internally keeps a history of #GdkFrameTiming
* objects for recent frames that can be retrieved with
* gdk_frame_clock_get_timings(). The set of stored frames
* is the set from the counter values given by
* gdk_frame_clock_get_history_start() and
* gdk_frame_clock_get_frame_counter(), inclusive.
*
* Return value: the frame counter value for the oldest frame
* that is available in the internal frame history of the
* #GdkFrameClock.
* Since: 3.8
*/
gint64
gdk_frame_clock_get_history_start (GdkFrameClock *frame_clock)
{
GdkFrameClockPrivate *priv;
g_return_val_if_fail (GDK_IS_FRAME_CLOCK (frame_clock), 0);
priv = frame_clock->priv;
return priv->frame_counter + 1 - priv->n_timings;
}
void
_gdk_frame_clock_begin_frame (GdkFrameClock *frame_clock)
{
GdkFrameClockPrivate *priv;
g_return_if_fail (GDK_IS_FRAME_CLOCK (frame_clock));
priv = frame_clock->priv;
priv->frame_counter++;
priv->current = (priv->current + 1) % FRAME_HISTORY_MAX_LENGTH;
if (priv->n_timings < FRAME_HISTORY_MAX_LENGTH)
priv->n_timings++;
else
{
gdk_frame_timings_unref(priv->timings[priv->current]);
}
priv->timings[priv->current] = _gdk_frame_timings_new (priv->frame_counter);
}
/**
* gdk_frame_clock_get_timings:
* @frame_clock: a #GdkFrameClock
* @frame_counter: the frame counter value identifying the frame to
* be received.
*
* Retrieves a #GdkFrameTimings object holding timing information
* for the current frame or a recent frame. The #GdkFrameTimings
* object may not yet be complete: see gdk_frame_timings_get_complete().
*
* Return value: the #GdkFrameTimings object for the specified
* frame, or %NULL if it is not available. See
* gdk_frame_clock_get_history_start().
* Since: 3.8
*/
GdkFrameTimings *
gdk_frame_clock_get_timings (GdkFrameClock *frame_clock,
gint64 frame_counter)
{
GdkFrameClockPrivate *priv;
gint pos;
g_return_val_if_fail (GDK_IS_FRAME_CLOCK (frame_clock), NULL);
priv = frame_clock->priv;
if (frame_counter > priv->frame_counter)
return NULL;
if (frame_counter <= priv->frame_counter - priv->n_timings)
return NULL;
pos = (priv->current - (priv->frame_counter - frame_counter) + FRAME_HISTORY_MAX_LENGTH) % FRAME_HISTORY_MAX_LENGTH;
return priv->timings[pos];
}
/**
* gdk_frame_clock_get_current_timings:
* @frame_clock: a #GdkFrameClock
*
* Gets the frame timings for the current frame.
*
* Returns: the #GdkFrameTimings for the frame currently being
* processed, or even no frame is being processed, for the
* previous frame. Before any frames have been procesed,
* returns %NULL.
* Since: 3.8
*/
GdkFrameTimings *
gdk_frame_clock_get_current_timings (GdkFrameClock *frame_clock)
{
GdkFrameClockPrivate *priv;
g_return_val_if_fail (GDK_IS_FRAME_CLOCK (frame_clock), 0);
priv = frame_clock->priv;
return gdk_frame_clock_get_timings (frame_clock, priv->frame_counter);
}
#ifdef G_ENABLE_DEBUG
void
_gdk_frame_clock_debug_print_timings (GdkFrameClock *clock,
GdkFrameTimings *timings)
{
gint64 previous_frame_time = 0;
GdkFrameTimings *previous_timings = gdk_frame_clock_get_timings (clock,
timings->frame_counter - 1);
if (previous_timings != NULL)
previous_frame_time = previous_timings->frame_time;
g_print ("%5" G_GINT64_FORMAT ":", timings->frame_counter);
if (previous_frame_time != 0)
{
g_print (" interval=%-4.1f", (timings->frame_time - previous_frame_time) / 1000.);
g_print (timings->slept_before ? " (sleep)" : " ");
}
if (timings->layout_start_time != 0)
g_print (" layout_start=%-4.1f", (timings->layout_start_time - timings->frame_time) / 1000.);
if (timings->paint_start_time != 0)
g_print (" paint_start=%-4.1f", (timings->paint_start_time - timings->frame_time) / 1000.);
if (timings->frame_end_time != 0)
g_print (" frame_end=%-4.1f", (timings->frame_end_time - timings->frame_time) / 1000.);
if (timings->presentation_time != 0)
g_print (" present=%-4.1f", (timings->presentation_time - timings->frame_time) / 1000.);
if (timings->predicted_presentation_time != 0)
g_print (" predicted=%-4.1f", (timings->predicted_presentation_time - timings->frame_time) / 1000.);
if (timings->refresh_interval != 0)
g_print (" refresh_interval=%-4.1f", timings->refresh_interval / 1000.);
g_print ("\n");
}
#endif /* G_ENABLE_DEBUG */
#define DEFAULT_REFRESH_INTERVAL 16667 /* 16.7ms (1/60th second) */
#define MAX_HISTORY_AGE 150000 /* 150ms */
/**
* gdk_frame_clock_get_refresh_info:
* @frame_clock: a #GdkFrameClock
* @base_time: base time for determining a presentaton time
* @refresh_interval_return: a location to store the determined refresh
* interval, or %NULL. A default refresh interval of 1/60th of
* a second will be stored if no history is present.
* @presentation_time_return: a location to store the next
* candidate presentation time after the given base time.
* 0 will be will be stored if no history is present.
*
* Using the frame history stored in the frame clock, finds the last
* known presentation time and refresh interval, and assuming that
* presentation times are separated by the refresh interval,
* predicts a presentation time that is a multiple of the refresh
* interval after the last presentation time, and later than @base_time.
*
* Since: 3.8
*/
void
gdk_frame_clock_get_refresh_info (GdkFrameClock *frame_clock,
gint64 base_time,
gint64 *refresh_interval_return,
gint64 *presentation_time_return)
{
gint64 frame_counter;
g_return_if_fail (GDK_IS_FRAME_CLOCK (frame_clock));
frame_counter = gdk_frame_clock_get_frame_counter (frame_clock);
if (presentation_time_return)
*presentation_time_return = 0;
if (refresh_interval_return)
*refresh_interval_return = DEFAULT_REFRESH_INTERVAL;
while (TRUE)
{
GdkFrameTimings *timings = gdk_frame_clock_get_timings (frame_clock, frame_counter);
gint64 presentation_time;
gint64 refresh_interval;
if (timings == NULL)
return;
refresh_interval = timings->refresh_interval;
presentation_time = timings->presentation_time;
if (presentation_time != 0)
{
if (presentation_time > base_time - MAX_HISTORY_AGE &&
presentation_time_return)
{
if (refresh_interval == 0)
refresh_interval = DEFAULT_REFRESH_INTERVAL;
if (refresh_interval_return)
*refresh_interval_return = refresh_interval;
while (presentation_time < base_time)
presentation_time += refresh_interval;
if (presentation_time_return)
*presentation_time_return = presentation_time;
}
return;
}
frame_counter--;
}
}

111
gdk/gdkframeclock.h Normal file
View File

@ -0,0 +1,111 @@
/* GDK - The GIMP Drawing Kit
* Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
* Boston, MA 02111-1307, USA.
*/
/*
* Modified by the GTK+ Team and others 1997-2010. See the AUTHORS
* file for a list of people on the GTK+ Team. See the ChangeLog
* files for a list of changes. These files are distributed with
* GTK+ at ftp://ftp.gtk.org/pub/gtk/.
*/
#if !defined (__GDK_H_INSIDE__) && !defined (GDK_COMPILATION)
#error "Only <gdk/gdk.h> can be included directly."
#endif
#ifndef __GDK_FRAME_CLOCK_H__
#define __GDK_FRAME_CLOCK_H__
#include <gdk/gdkframetimings.h>
G_BEGIN_DECLS
#define GDK_TYPE_FRAME_CLOCK (gdk_frame_clock_get_type ())
#define GDK_FRAME_CLOCK(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GDK_TYPE_FRAME_CLOCK, GdkFrameClock))
#define GDK_FRAME_CLOCK_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GDK_TYPE_FRAME_CLOCK, GdkFrameClockClass))
#define GDK_IS_FRAME_CLOCK(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GDK_TYPE_FRAME_CLOCK))
#define GDK_IS_FRAME_CLOCK_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GDK_TYPE_FRAME_CLOCK))
#define GDK_FRAME_CLOCK_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GDK_TYPE_FRAME_CLOCK, GdkFrameClockClass))
typedef struct _GdkFrameClock GdkFrameClock;
typedef struct _GdkFrameClockPrivate GdkFrameClockPrivate;
typedef struct _GdkFrameClockClass GdkFrameClockClass;
/**
* GdkFrameClockPhase:
* @GDK_FRAME_CLOCK_PHASE_NONE: no phase
* @GDK_FRAME_CLOCK_PHASE_FLUSH_EVENTS: corresponds to GdkFrameClock::flush-events. Should not be handled by applications.
* @GDK_FRAME_CLOCK_PHASE_BEFORE_PAINT: corresponds to GdkFrameClock::before-paint. Should not be handled by applications.
* @GDK_FRAME_CLOCK_PHASE_UPDATE: corresponds to GdkFrameClock::update.
* @GDK_FRAME_CLOCK_PHASE_LAYOUT: corresponds to GdkFrameClock::layout.
* @GDK_FRAME_CLOCK_PHASE_PAINT: corresponds to GdkFrameClock::paint.
* @GDK_FRAME_CLOCK_PHASE_RESUME_EVENTS: corresponds to GdkFrameClock::resume-events. Should not be handled by applications.
* @GDK_FRAME_CLOCK_PHASE_AFTER_PAINT: corresponds to GdkFrameClock::after-paint. Should not be handled by applications.
*
* #GdkFrameClockPhase is used to represent the different paint clock
* phases that can be requested. The elements of the enumeration
* correspond to the signals of #GdkPaintClock.
*
* Since: 3.8
**/
typedef enum {
GDK_FRAME_CLOCK_PHASE_NONE = 0,
GDK_FRAME_CLOCK_PHASE_FLUSH_EVENTS = 1 << 0,
GDK_FRAME_CLOCK_PHASE_BEFORE_PAINT = 1 << 1,
GDK_FRAME_CLOCK_PHASE_UPDATE = 1 << 2,
GDK_FRAME_CLOCK_PHASE_LAYOUT = 1 << 3,
GDK_FRAME_CLOCK_PHASE_PAINT = 1 << 4,
GDK_FRAME_CLOCK_PHASE_RESUME_EVENTS = 1 << 5,
GDK_FRAME_CLOCK_PHASE_AFTER_PAINT = 1 << 6
} GdkFrameClockPhase;
GType gdk_frame_clock_get_type (void) G_GNUC_CONST;
GDK_AVAILABLE_IN_3_8
gint64 gdk_frame_clock_get_frame_time (GdkFrameClock *frame_clock);
GDK_AVAILABLE_IN_3_8
void gdk_frame_clock_request_phase (GdkFrameClock *frame_clock,
GdkFrameClockPhase phase);
GDK_AVAILABLE_IN_3_8
void gdk_frame_clock_begin_updating (GdkFrameClock *frame_clock);
GDK_AVAILABLE_IN_3_8
void gdk_frame_clock_end_updating (GdkFrameClock *frame_clock);
/* Frame history */
GDK_AVAILABLE_IN_3_8
gint64 gdk_frame_clock_get_frame_counter (GdkFrameClock *frame_clock);
GDK_AVAILABLE_IN_3_8
gint64 gdk_frame_clock_get_history_start (GdkFrameClock *frame_clock);
GDK_AVAILABLE_IN_3_8
GdkFrameTimings *gdk_frame_clock_get_timings (GdkFrameClock *frame_clock,
gint64 frame_counter);
GDK_AVAILABLE_IN_3_8
GdkFrameTimings *gdk_frame_clock_get_current_timings (GdkFrameClock *frame_clock);
GDK_AVAILABLE_IN_3_8
void gdk_frame_clock_get_refresh_info (GdkFrameClock *frame_clock,
gint64 base_time,
gint64 *refresh_interval_return,
gint64 *presentation_time_return);
G_END_DECLS
#endif /* __GDK_FRAME_CLOCK_H__ */

586
gdk/gdkframeclockidle.c Normal file
View File

@ -0,0 +1,586 @@
/* GDK - The GIMP Drawing Kit
* Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
* Boston, MA 02111-1307, USA.
*/
/*
* Modified by the GTK+ Team and others 1997-2010. See the AUTHORS
* file for a list of people on the GTK+ Team. See the ChangeLog
* files for a list of changes. These files are distributed with
* GTK+ at ftp://ftp.gtk.org/pub/gtk/.
*/
#include "config.h"
#include "gdkinternals.h"
#include "gdkframeclockprivate.h"
#include "gdkframeclockidle.h"
#include "gdk.h"
#ifdef G_OS_WIN32
#include <windows.h>
#endif
#define FRAME_INTERVAL 16667 /* microseconds */
struct _GdkFrameClockIdlePrivate
{
GTimer *timer;
/* timer_base is used to avoid ever going backward */
gint64 timer_base;
gint64 frame_time;
gint64 min_next_frame_time;
gint64 sleep_serial;
guint flush_idle_id;
guint paint_idle_id;
guint freeze_count;
guint updating_count;
GdkFrameClockPhase requested;
GdkFrameClockPhase phase;
guint in_paint_idle : 1;
#ifdef G_OS_WIN32
guint begin_period : 1;
#endif
};
static gboolean gdk_frame_clock_flush_idle (void *data);
static gboolean gdk_frame_clock_paint_idle (void *data);
G_DEFINE_TYPE (GdkFrameClockIdle, gdk_frame_clock_idle, GDK_TYPE_FRAME_CLOCK)
static gint64 sleep_serial;
static gint64 sleep_source_prepare_time;
static GSource *sleep_source;
static gboolean
sleep_source_prepare (GSource *source,
gint *timeout)
{
sleep_source_prepare_time = g_source_get_time (source);
*timeout = -1;
return FALSE;
}
static gboolean
sleep_source_check (GSource *source)
{
if (g_source_get_time (source) != sleep_source_prepare_time)
sleep_serial++;
return FALSE;
}
static gboolean
sleep_source_dispatch (GSource *source,
GSourceFunc callback,
gpointer user_data)
{
return TRUE;
}
static GSourceFuncs sleep_source_funcs = {
sleep_source_prepare,
sleep_source_check,
sleep_source_dispatch,
NULL /* finalize */
};
static gint64
get_sleep_serial (void)
{
if (sleep_source == NULL)
{
sleep_source = g_source_new (&sleep_source_funcs, sizeof (GSource));
g_source_set_priority (sleep_source, G_PRIORITY_HIGH);
g_source_attach (sleep_source, NULL);
g_source_unref (sleep_source);
}
return sleep_serial;
}
static void
gdk_frame_clock_idle_init (GdkFrameClockIdle *frame_clock_idle)
{
GdkFrameClockIdlePrivate *priv;
frame_clock_idle->priv = G_TYPE_INSTANCE_GET_PRIVATE (frame_clock_idle,
GDK_TYPE_FRAME_CLOCK_IDLE,
GdkFrameClockIdlePrivate);
priv = frame_clock_idle->priv;
priv->freeze_count = 0;
}
static void
gdk_frame_clock_idle_dispose (GObject *object)
{
GdkFrameClockIdlePrivate *priv = GDK_FRAME_CLOCK_IDLE (object)->priv;
if (priv->flush_idle_id != 0)
{
g_source_remove (priv->flush_idle_id);
priv->flush_idle_id = 0;
}
if (priv->paint_idle_id != 0)
{
g_source_remove (priv->paint_idle_id);
priv->paint_idle_id = 0;
}
#ifdef G_OS_WIN32
if (priv->begin_period)
{
timeEndPeriod(1);
priv->begin_period = FALSE;
}
#endif
G_OBJECT_CLASS (gdk_frame_clock_idle_parent_class)->dispose (object);
}
static gint64
compute_frame_time (GdkFrameClockIdle *idle)
{
GdkFrameClockIdlePrivate *priv = idle->priv;
gint64 computed_frame_time;
gint64 elapsed;
elapsed = g_get_monotonic_time () + priv->timer_base;
if (elapsed < priv->frame_time)
{
/* clock went backward. adapt to that by forevermore increasing
* timer_base. For now, assume we've gone forward in time 1ms.
*/
/* hmm. just fix GTimer? */
computed_frame_time = priv->frame_time + 1;
priv->timer_base += (priv->frame_time - elapsed) + 1;
}
else
{
computed_frame_time = elapsed;
}
return computed_frame_time;
}
static gint64
gdk_frame_clock_idle_get_frame_time (GdkFrameClock *clock)
{
GdkFrameClockIdlePrivate *priv = GDK_FRAME_CLOCK_IDLE (clock)->priv;
gint64 computed_frame_time;
/* can't change frame time during a paint */
if (priv->phase != GDK_FRAME_CLOCK_PHASE_NONE &&
priv->phase != GDK_FRAME_CLOCK_PHASE_FLUSH_EVENTS)
return priv->frame_time;
/* Outside a paint, pick something close to "now" */
computed_frame_time = compute_frame_time (GDK_FRAME_CLOCK_IDLE (clock));
/* 16ms is 60fps. We only update frame time that often because we'd
* like to try to keep animations on the same start times.
* get_frame_time() would normally be used outside of a paint to
* record an animation start time for example.
*/
if ((computed_frame_time - priv->frame_time) > FRAME_INTERVAL)
priv->frame_time = computed_frame_time;
return priv->frame_time;
}
#define RUN_FLUSH_IDLE(priv) \
((priv)->freeze_count == 0 && \
((priv)->requested & GDK_FRAME_CLOCK_PHASE_FLUSH_EVENTS) != 0)
/* The reason why we track updating_count separately here and don't
* just add GDK_FRAME_CLOCK_PHASE_UPDATE into ->request on every frame
* is so that we can avoid doing one more frame when an animation
* is cancelled.
*/
#define RUN_PAINT_IDLE(priv) \
((priv)->freeze_count == 0 && \
(((priv)->requested & ~GDK_FRAME_CLOCK_PHASE_FLUSH_EVENTS) != 0 || \
(priv)->updating_count > 0))
static void
maybe_start_idle (GdkFrameClockIdle *clock_idle)
{
GdkFrameClockIdlePrivate *priv = clock_idle->priv;
if (RUN_FLUSH_IDLE (priv) || RUN_PAINT_IDLE (priv))
{
guint min_interval = 0;
if (priv->min_next_frame_time != 0)
{
gint64 now = compute_frame_time (clock_idle);
gint64 min_interval_us = MAX (priv->min_next_frame_time, now) - now;
min_interval = (min_interval_us + 500) / 1000;
}
if (priv->flush_idle_id == 0 && RUN_FLUSH_IDLE (priv))
{
priv->flush_idle_id = gdk_threads_add_timeout_full (GDK_PRIORITY_EVENTS + 1,
min_interval,
gdk_frame_clock_flush_idle,
g_object_ref (clock_idle),
(GDestroyNotify) g_object_unref);
}
if (!priv->in_paint_idle &&
priv->paint_idle_id == 0 && RUN_PAINT_IDLE (priv))
{
priv->paint_idle_id = gdk_threads_add_timeout_full (GDK_PRIORITY_REDRAW,
min_interval,
gdk_frame_clock_paint_idle,
g_object_ref (clock_idle),
(GDestroyNotify) g_object_unref);
}
}
}
static void
maybe_stop_idle (GdkFrameClockIdle *clock_idle)
{
GdkFrameClockIdlePrivate *priv = clock_idle->priv;
if (priv->flush_idle_id != 0 && !RUN_FLUSH_IDLE (priv))
{
g_source_remove (priv->flush_idle_id);
priv->flush_idle_id = 0;
}
if (priv->paint_idle_id != 0 && !RUN_PAINT_IDLE (priv))
{
g_source_remove (priv->paint_idle_id);
priv->paint_idle_id = 0;
}
}
static gint64
compute_min_next_frame_time (GdkFrameClockIdle *clock_idle,
gint64 last_frame_time)
{
gint64 presentation_time;
gint64 refresh_interval;
gdk_frame_clock_get_refresh_info (GDK_FRAME_CLOCK (clock_idle),
last_frame_time,
&refresh_interval, &presentation_time);
if (presentation_time == 0)
return last_frame_time + refresh_interval;
else
return presentation_time + refresh_interval / 2;
}
static gboolean
gdk_frame_clock_flush_idle (void *data)
{
GdkFrameClock *clock = GDK_FRAME_CLOCK (data);
GdkFrameClockIdle *clock_idle = GDK_FRAME_CLOCK_IDLE (clock);
GdkFrameClockIdlePrivate *priv = clock_idle->priv;
priv->flush_idle_id = 0;
if (priv->phase != GDK_FRAME_CLOCK_PHASE_NONE)
return FALSE;
priv->phase = GDK_FRAME_CLOCK_PHASE_FLUSH_EVENTS;
priv->requested &= ~GDK_FRAME_CLOCK_PHASE_FLUSH_EVENTS;
g_signal_emit_by_name (G_OBJECT (clock), "flush-events");
if ((priv->requested & ~GDK_FRAME_CLOCK_PHASE_FLUSH_EVENTS) != 0 ||
priv->updating_count > 0)
priv->phase = GDK_FRAME_CLOCK_PHASE_BEFORE_PAINT;
else
priv->phase = GDK_FRAME_CLOCK_PHASE_NONE;
return FALSE;
}
static gboolean
gdk_frame_clock_paint_idle (void *data)
{
GdkFrameClock *clock = GDK_FRAME_CLOCK (data);
GdkFrameClockIdle *clock_idle = GDK_FRAME_CLOCK_IDLE (clock);
GdkFrameClockIdlePrivate *priv = clock_idle->priv;
gboolean skip_to_resume_events;
GdkFrameTimings *timings = NULL;
priv->paint_idle_id = 0;
priv->in_paint_idle = TRUE;
priv->min_next_frame_time = 0;
skip_to_resume_events =
(priv->requested & ~(GDK_FRAME_CLOCK_PHASE_FLUSH_EVENTS | GDK_FRAME_CLOCK_PHASE_RESUME_EVENTS)) == 0 &&
priv->updating_count == 0;
if (priv->phase > GDK_FRAME_CLOCK_PHASE_BEFORE_PAINT)
{
timings = gdk_frame_clock_get_current_timings (clock);
}
if (!skip_to_resume_events)
{
switch (priv->phase)
{
case GDK_FRAME_CLOCK_PHASE_FLUSH_EVENTS:
break;
case GDK_FRAME_CLOCK_PHASE_NONE:
case GDK_FRAME_CLOCK_PHASE_BEFORE_PAINT:
if (priv->freeze_count == 0)
{
priv->frame_time = compute_frame_time (clock_idle);
_gdk_frame_clock_begin_frame (clock);
timings = gdk_frame_clock_get_current_timings (clock);
timings->frame_time = priv->frame_time;
timings->slept_before = priv->sleep_serial != get_sleep_serial ();
priv->phase = GDK_FRAME_CLOCK_PHASE_BEFORE_PAINT;
/* We always emit ::before-paint and ::after-paint if
* any of the intermediate phases are requested and
* they don't get repeated if you freeze/thaw while
* in them.
*/
priv->requested &= ~GDK_FRAME_CLOCK_PHASE_BEFORE_PAINT;
g_signal_emit_by_name (G_OBJECT (clock), "before-paint");
priv->phase = GDK_FRAME_CLOCK_PHASE_UPDATE;
}
case GDK_FRAME_CLOCK_PHASE_UPDATE:
if (priv->freeze_count == 0)
{
if ((priv->requested & GDK_FRAME_CLOCK_PHASE_UPDATE) != 0 ||
priv->updating_count > 0)
{
priv->requested &= ~GDK_FRAME_CLOCK_PHASE_UPDATE;
g_signal_emit_by_name (G_OBJECT (clock), "update");
}
}
case GDK_FRAME_CLOCK_PHASE_LAYOUT:
if (priv->freeze_count == 0)
{
#ifdef G_ENABLE_DEBUG
if ((_gdk_debug_flags & GDK_DEBUG_FRAMES) != 0)
{
if (priv->phase != GDK_FRAME_CLOCK_PHASE_LAYOUT &&
(priv->requested & GDK_FRAME_CLOCK_PHASE_LAYOUT))
timings->layout_start_time = g_get_monotonic_time ();
}
#endif /* G_ENABLE_DEBUG */
priv->phase = GDK_FRAME_CLOCK_PHASE_LAYOUT;
if (priv->requested & GDK_FRAME_CLOCK_PHASE_LAYOUT)
{
priv->requested &= ~GDK_FRAME_CLOCK_PHASE_LAYOUT;
g_signal_emit_by_name (G_OBJECT (clock), "layout");
}
}
case GDK_FRAME_CLOCK_PHASE_PAINT:
if (priv->freeze_count == 0)
{
#ifdef G_ENABLE_DEBUG
if ((_gdk_debug_flags & GDK_DEBUG_FRAMES) != 0)
{
if (priv->phase != GDK_FRAME_CLOCK_PHASE_PAINT &&
(priv->requested & GDK_FRAME_CLOCK_PHASE_PAINT))
timings->paint_start_time = g_get_monotonic_time ();
}
#endif /* G_ENABLE_DEBUG */
priv->phase = GDK_FRAME_CLOCK_PHASE_PAINT;
if (priv->requested & GDK_FRAME_CLOCK_PHASE_PAINT)
{
priv->requested &= ~GDK_FRAME_CLOCK_PHASE_PAINT;
g_signal_emit_by_name (G_OBJECT (clock), "paint");
}
}
case GDK_FRAME_CLOCK_PHASE_AFTER_PAINT:
if (priv->freeze_count == 0)
{
priv->requested &= ~GDK_FRAME_CLOCK_PHASE_AFTER_PAINT;
g_signal_emit_by_name (G_OBJECT (clock), "after-paint");
/* the ::after-paint phase doesn't get repeated on freeze/thaw,
*/
priv->phase = GDK_FRAME_CLOCK_PHASE_NONE;
#ifdef G_ENABLE_DEBUG
if ((_gdk_debug_flags & GDK_DEBUG_FRAMES) != 0)
timings->frame_end_time = g_get_monotonic_time ();
#endif /* G_ENABLE_DEBUG */
}
case GDK_FRAME_CLOCK_PHASE_RESUME_EVENTS:
;
}
}
#ifdef G_ENABLE_DEBUG
if ((_gdk_debug_flags & GDK_DEBUG_FRAMES) != 0)
{
if (timings && timings->complete)
_gdk_frame_clock_debug_print_timings (clock, timings);
}
#endif /* G_ENABLE_DEBUG */
if (priv->requested & GDK_FRAME_CLOCK_PHASE_RESUME_EVENTS)
{
priv->requested &= ~GDK_FRAME_CLOCK_PHASE_RESUME_EVENTS;
g_signal_emit_by_name (G_OBJECT (clock), "resume-events");
}
if (priv->freeze_count == 0)
priv->phase = GDK_FRAME_CLOCK_PHASE_NONE;
priv->in_paint_idle = FALSE;
/* If there is throttling in the backend layer, then we'll do another
* update as soon as the backend unthrottles (if there is work to do),
* otherwise we need to figure when the next frame should be.
*/
if (priv->freeze_count == 0)
{
priv->min_next_frame_time = compute_min_next_frame_time (clock_idle,
priv->frame_time);
maybe_start_idle (clock_idle);
}
if (priv->freeze_count == 0)
priv->sleep_serial = get_sleep_serial ();
return FALSE;
}
static void
gdk_frame_clock_idle_request_phase (GdkFrameClock *clock,
GdkFrameClockPhase phase)
{
GdkFrameClockIdle *clock_idle = GDK_FRAME_CLOCK_IDLE (clock);
GdkFrameClockIdlePrivate *priv = clock_idle->priv;
priv->requested |= phase;
maybe_start_idle (clock_idle);
}
static void
gdk_frame_clock_idle_begin_updating (GdkFrameClock *clock)
{
GdkFrameClockIdle *clock_idle = GDK_FRAME_CLOCK_IDLE (clock);
GdkFrameClockIdlePrivate *priv = clock_idle->priv;
#ifdef G_OS_WIN32
/* We need a higher resolution timer while doing animations */
if (priv->updating_count == 0 && !priv->begin_period)
{
timeBeginPeriod(1);
priv->begin_period = TRUE;
}
#endif
priv->updating_count++;
maybe_start_idle (clock_idle);
}
static void
gdk_frame_clock_idle_end_updating (GdkFrameClock *clock)
{
GdkFrameClockIdle *clock_idle = GDK_FRAME_CLOCK_IDLE (clock);
GdkFrameClockIdlePrivate *priv = clock_idle->priv;
g_return_if_fail (priv->updating_count > 0);
priv->updating_count--;
maybe_stop_idle (clock_idle);
#ifdef G_OS_WIN32
if (priv->updating_count == 0 && priv->begin_period)
{
timeEndPeriod(1);
priv->begin_period = FALSE;
}
#endif
}
static void
gdk_frame_clock_idle_freeze (GdkFrameClock *clock)
{
GdkFrameClockIdle *clock_idle = GDK_FRAME_CLOCK_IDLE (clock);
GdkFrameClockIdlePrivate *priv = clock_idle->priv;
priv->freeze_count++;
maybe_stop_idle (clock_idle);
}
static void
gdk_frame_clock_idle_thaw (GdkFrameClock *clock)
{
GdkFrameClockIdle *clock_idle = GDK_FRAME_CLOCK_IDLE (clock);
GdkFrameClockIdlePrivate *priv = clock_idle->priv;
g_return_if_fail (priv->freeze_count > 0);
priv->freeze_count--;
if (priv->freeze_count == 0)
{
maybe_start_idle (clock_idle);
/* If nothing is requested so we didn't start an idle, we need
* to skip to the end of the state chain, since the idle won't
* run and do it for us.
*/
if (priv->paint_idle_id == 0)
priv->phase = GDK_FRAME_CLOCK_PHASE_NONE;
priv->sleep_serial = get_sleep_serial ();
}
}
static void
gdk_frame_clock_idle_class_init (GdkFrameClockIdleClass *klass)
{
GObjectClass *gobject_class = (GObjectClass*) klass;
GdkFrameClockClass *frame_clock_class = (GdkFrameClockClass *)klass;
gobject_class->dispose = gdk_frame_clock_idle_dispose;
frame_clock_class->get_frame_time = gdk_frame_clock_idle_get_frame_time;
frame_clock_class->request_phase = gdk_frame_clock_idle_request_phase;
frame_clock_class->begin_updating = gdk_frame_clock_idle_begin_updating;
frame_clock_class->end_updating = gdk_frame_clock_idle_end_updating;
frame_clock_class->freeze = gdk_frame_clock_idle_freeze;
frame_clock_class->thaw = gdk_frame_clock_idle_thaw;
g_type_class_add_private (klass, sizeof (GdkFrameClockIdlePrivate));
}
GdkFrameClock *
_gdk_frame_clock_idle_new (void)
{
GdkFrameClockIdle *clock;
clock = g_object_new (GDK_TYPE_FRAME_CLOCK_IDLE, NULL);
return GDK_FRAME_CLOCK (clock);
}

68
gdk/gdkframeclockidle.h Normal file
View File

@ -0,0 +1,68 @@
/* GDK - The GIMP Drawing Kit
* Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
* Boston, MA 02111-1307, USA.
*/
/*
* Modified by the GTK+ Team and others 1997-2010. See the AUTHORS
* file for a list of people on the GTK+ Team. See the ChangeLog
* files for a list of changes. These files are distributed with
* GTK+ at ftp://ftp.gtk.org/pub/gtk/.
*/
/* Uninstalled header, internal to GDK */
#ifndef __GDK_FRAME_CLOCK_IDLE_H__
#define __GDK_FRAME_CLOCK_IDLE_H__
#include "gdkframeclockprivate.h"
G_BEGIN_DECLS
#define GDK_TYPE_FRAME_CLOCK_IDLE (gdk_frame_clock_idle_get_type ())
#define GDK_FRAME_CLOCK_IDLE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GDK_TYPE_FRAME_CLOCK_IDLE, GdkFrameClockIdle))
#define GDK_FRAME_CLOCK_IDLE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GDK_TYPE_FRAME_CLOCK_IDLE, GdkFrameClockIdleClass))
#define GDK_IS_FRAME_CLOCK_IDLE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GDK_TYPE_FRAME_CLOCK_IDLE))
#define GDK_IS_FRAME_CLOCK_IDLE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GDK_TYPE_FRAME_CLOCK_IDLE))
#define GDK_FRAME_CLOCK_IDLE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GDK_TYPE_FRAME_CLOCK_IDLE, GdkFrameClockIdleClass))
typedef struct _GdkFrameClockIdle GdkFrameClockIdle;
typedef struct _GdkFrameClockIdlePrivate GdkFrameClockIdlePrivate;
typedef struct _GdkFrameClockIdleClass GdkFrameClockIdleClass;
struct _GdkFrameClockIdle
{
GdkFrameClock parent_instance;
/*< private >*/
GdkFrameClockIdlePrivate *priv;
};
struct _GdkFrameClockIdleClass
{
GdkFrameClockClass parent_class;
};
GType gdk_frame_clock_idle_get_type (void) G_GNUC_CONST;
void _gdk_frame_clock_idle_freeze_updates (GdkFrameClockIdle *clock_idle);
void _gdk_frame_clock_idle_thaw_updates (GdkFrameClockIdle *clock_idle);
G_END_DECLS
#endif /* __GDK_FRAME_CLOCK_IDLE_H__ */

101
gdk/gdkframeclockprivate.h Normal file
View File

@ -0,0 +1,101 @@
/* GDK - The GIMP Drawing Kit
* Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
* Boston, MA 02111-1307, USA.
*/
/*
* Modified by the GTK+ Team and others 1997-2010. See the AUTHORS
* file for a list of people on the GTK+ Team. See the ChangeLog
* files for a list of changes. These files are distributed with
* GTK+ at ftp://ftp.gtk.org/pub/gtk/.
*/
/* Uninstalled header, internal to GDK */
#ifndef __GDK_FRAME_CLOCK_PRIVATE_H__
#define __GDK_FRAME_CLOCK_PRIVATE_H__
#include <gdk/gdkframeclock.h>
G_BEGIN_DECLS
struct _GdkFrameClock
{
GObject parent_instance;
/*< private >*/
GdkFrameClockPrivate *priv;
};
struct _GdkFrameClockClass
{
GObjectClass parent_class;
gint64 (* get_frame_time) (GdkFrameClock *clock);
void (* request_phase) (GdkFrameClock *clock,
GdkFrameClockPhase phase);
void (* begin_updating) (GdkFrameClock *clock);
void (* end_updating) (GdkFrameClock *clock);
void (* freeze) (GdkFrameClock *clock);
void (* thaw) (GdkFrameClock *clock);
/* signals */
/* void (* flush_events) (GdkFrameClock *clock); */
/* void (* before_paint) (GdkFrameClock *clock); */
/* void (* update) (GdkFrameClock *clock); */
/* void (* layout) (GdkFrameClock *clock); */
/* void (* paint) (GdkFrameClock *clock); */
/* void (* after_paint) (GdkFrameClock *clock); */
/* void (* resume_events) (GdkFrameClock *clock); */
};
struct _GdkFrameTimings
{
guint ref_count;
gint64 frame_counter;
guint64 cookie;
gint64 frame_time;
gint64 drawn_time;
gint64 presentation_time;
gint64 refresh_interval;
gint64 predicted_presentation_time;
#ifdef G_ENABLE_DEBUG
gint64 layout_start_time;
gint64 paint_start_time;
gint64 frame_end_time;
#endif /* G_ENABLE_DEBUG */
guint complete : 1;
guint slept_before : 1;
};
void _gdk_frame_clock_freeze (GdkFrameClock *clock);
void _gdk_frame_clock_thaw (GdkFrameClock *clock);
void _gdk_frame_clock_begin_frame (GdkFrameClock *clock);
void _gdk_frame_clock_debug_print_timings (GdkFrameClock *clock,
GdkFrameTimings *timings);
GdkFrameTimings *_gdk_frame_timings_new (gint64 frame_counter);
G_END_DECLS
#endif /* __GDK_FRAME_CLOCK_PRIVATE_H__ */

219
gdk/gdkframetimings.c Normal file
View File

@ -0,0 +1,219 @@
/* GDK - The GIMP Drawing Kit
* Copyright (C) 2012 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 "gdkframeclockprivate.h"
/**
* SECTION:gdkframetimings
* @Short_description: Object holding timing information for a single frame
* @Title: Frame timings
*
* A #GdkFrameTimings object holds timing information for a single frame
* of the application's displays. To retrieve #GdkFrameTimings objects,
* use gdk_frame_clock_get_timings() or gdk_frame_clock_get_current_timings().
* The information in #GdkFrameTimings is useful for precise synchronization
* of video with the event or audio streams, and for measuring
* quality metrics for the application's display, such as latency and jitter.
*/
G_DEFINE_BOXED_TYPE (GdkFrameTimings, gdk_frame_timings,
gdk_frame_timings_ref,
gdk_frame_timings_unref)
GdkFrameTimings *
_gdk_frame_timings_new (gint64 frame_counter)
{
GdkFrameTimings *timings;
timings = g_slice_new0 (GdkFrameTimings);
timings->ref_count = 1;
timings->frame_counter = frame_counter;
return timings;
}
/**
* gdk_frame_timings_ref:
* @timings: a #GdkFrameTimings
*
* Increases the reference count of @timings.
*
* Returns: @timings
* Since: 3.8
*/
GdkFrameTimings *
gdk_frame_timings_ref (GdkFrameTimings *timings)
{
g_return_val_if_fail (timings != NULL, NULL);
timings->ref_count++;
return timings;
}
/**
* gdk_frame_timings_unref:
* @timings: a #GdkFrameTimings
*
* Decreases the reference count of @timings. If @timings
* is no longer referenced, it will be freed.
*
* Since: 3.8
*/
void
gdk_frame_timings_unref (GdkFrameTimings *timings)
{
g_return_if_fail (timings != NULL);
g_return_if_fail (timings->ref_count > 0);
timings->ref_count--;
if (timings->ref_count == 0)
{
g_slice_free (GdkFrameTimings, timings);
}
}
/**
* gdk_frame_timings_get_frame_counter:
* @timings: a #GdkFrameTimings
*
* Gets the frame counter value of the #GdkFrameClock when this
* this frame was drawn.
*
* Returns: the frame counter value for this frame
* Since: 3.8
*/
gint64
gdk_frame_timings_get_frame_counter (GdkFrameTimings *timings)
{
return timings->frame_counter;
}
/**
* gdk_frame_timings_get_complete:
* @timings: a #GdkFrameTimings
*
* The timing information in a #GdkFrameTimings is filled in
* incrementally as the frame as drawn and passed off to the
* window system for processing and display to the user. The
* accessor functions for #GdkFrameTimings can return 0 to
* indicate an unavailable value for two reasons: either because
* the information is not yet available, or because it isn't
* available at all. Once gdk_frame_timings_complete() returns
* %TRUE for a frame, you can be certain that no further values
* will become available and be stored in the #GdkFrameTimings.
*
* Returns: %TRUE if all information that will be available
* for the frame has been filled in.
* Since: 3.8
*/
gboolean
gdk_frame_timings_get_complete (GdkFrameTimings *timings)
{
g_return_val_if_fail (timings != NULL, FALSE);
return timings->complete;
}
/**
* gdk_frame_timings_get_frame_time:
* @timings: A #GdkFrameTimings
*
* Returns the frame time for the frame. This is the time value
* that is typically used to time animations for the frame. See
* gdk_frame_clock_get_frame_time().
*
* Returns: the frame time for the frame, in the timescale
* of g_get_monotonic_time()
*/
gint64
gdk_frame_timings_get_frame_time (GdkFrameTimings *timings)
{
g_return_val_if_fail (timings != NULL, 0);
return timings->frame_time;
}
/**
* gdk_frame_timings_get_presentation_time:
* @timings: a #GdkFrameTimings
*
* Reurns the presentation time. This is the time at which the frame
* became visible to the user.
*
* Returns: the time the frame was displayed to the user, in the
* timescale of g_get_monotonic_time(), or 0 if no presentation
* time is available. See gdk_frame_timings_get_complete()
* Since: 3.8
*/
gint64
gdk_frame_timings_get_presentation_time (GdkFrameTimings *timings)
{
g_return_val_if_fail (timings != NULL, 0);
return timings->presentation_time;
}
/**
* gdk_frame_timings_get_predicted_presentation_time:
* @timings: a #GdkFrameTimings
*
* Gets the predicted time at which this frame will be displayed. Although
* no predicted time may be available, if one is available, it will
* be available while the frame is being generated, in contrast to
* gdk_frame_timings_get_presentation_time(), which is only available
* after the frame has been presented. In general, if you are simply
* animating, you should use gdk_frame_clock_get_frame_time() rather
* than this function, but this function is useful for applications
* that want exact control over latency. For example, a movie player
* may want this information for Audio/Video synchronization.
*
* Returns: The predicted time at which the frame will be presented,
* in the timescale of g_get_monotonic_time(), or 0 if no predicted
* presentation time is available.
* Since: 3.8
*/
gint64
gdk_frame_timings_get_predicted_presentation_time (GdkFrameTimings *timings)
{
g_return_val_if_fail (timings != NULL, 0);
return timings->predicted_presentation_time;
}
/**
* gdk_frame_timings_get_refresh_interval:
* @timings: a #GdkFrameTimings
*
* Gets the natural interval between presentation times for
* the display that this frame was displayed on. Frame presentation
* usually happens during the "vertical blanking interval".
*
* Returns: the refresh interval of the display, in microseconds,
* or 0 if the refresh interval is not available.
* See gdk_frame_timings_get_complete().
* Since: 3.8
*/
gint64
gdk_frame_timings_get_refresh_interval (GdkFrameTimings *timings)
{
g_return_val_if_fail (timings != NULL, 0);
return timings->refresh_interval;
}

56
gdk/gdkframetimings.h Normal file
View File

@ -0,0 +1,56 @@
/* GDK - The GIMP Drawing Kit
* Copyright (C) 2012 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/>.
*/
#if !defined (__GDK_H_INSIDE__) && !defined (GDK_COMPILATION)
#error "Only <gdk/gdk.h> can be included directly."
#endif
#ifndef __GDK_FRAME_TIMINGS_H__
#define __GDK_FRAME_TIMINGS_H__
#include <glib-object.h>
#include <gdk/gdkversionmacros.h>
G_BEGIN_DECLS
typedef struct _GdkFrameTimings GdkFrameTimings;
GDK_AVAILABLE_IN_3_8
GType gdk_frame_timings_get_type (void) G_GNUC_CONST;
GDK_AVAILABLE_IN_3_8
GdkFrameTimings *gdk_frame_timings_ref (GdkFrameTimings *timings);
GDK_AVAILABLE_IN_3_8
void gdk_frame_timings_unref (GdkFrameTimings *timings);
GDK_AVAILABLE_IN_3_8
gint64 gdk_frame_timings_get_frame_counter (GdkFrameTimings *timings);
GDK_AVAILABLE_IN_3_8
gboolean gdk_frame_timings_get_complete (GdkFrameTimings *timings);
GDK_AVAILABLE_IN_3_8
gint64 gdk_frame_timings_get_frame_time (GdkFrameTimings *timings);
GDK_AVAILABLE_IN_3_8
gint64 gdk_frame_timings_get_presentation_time (GdkFrameTimings *timings);
GDK_AVAILABLE_IN_3_8
gint64 gdk_frame_timings_get_refresh_interval (GdkFrameTimings *timings);
GDK_AVAILABLE_IN_3_8
gint64 gdk_frame_timings_get_predicted_presentation_time (GdkFrameTimings *timings);
G_END_DECLS
#endif /* __GDK_FRAME_TIMINGS_H__ */

View File

@ -82,7 +82,9 @@ typedef enum {
GDK_DEBUG_MULTIHEAD = 1 << 7,
GDK_DEBUG_XINERAMA = 1 << 8,
GDK_DEBUG_DRAW = 1 << 9,
GDK_DEBUG_EVENTLOOP = 1 << 10
GDK_DEBUG_EVENTLOOP = 1 << 10,
GDK_DEBUG_FRAMES = 1 << 11,
GDK_DEBUG_SETTINGS = 1 << 12
} GdkDebugFlag;
typedef enum {
@ -265,6 +267,8 @@ struct _GdkWindow
gulong device_changed_handler_id;
guint num_offscreen_children;
GdkFrameClock *frame_clock; /* NULL to use from parent or default */
};
#define GDK_WINDOW_TYPE(d) (((GDK_WINDOW (d)))->window_type)
@ -298,6 +302,9 @@ GList* _gdk_event_queue_insert_after (GdkDisplay *display,
GList* _gdk_event_queue_insert_before(GdkDisplay *display,
GdkEvent *after_event,
GdkEvent *event);
void _gdk_event_queue_handle_motion_compression (GdkDisplay *display);
void _gdk_event_button_generate (GdkDisplay *display,
GdkEvent *event);
@ -423,7 +430,6 @@ cairo_surface_t * _gdk_offscreen_window_create_surface (GdkWindow *window,
gint width,
gint height);
G_END_DECLS
#endif /* __GDK_INTERNALS_H__ */

View File

@ -37,6 +37,7 @@
#include "gdkdeviceprivate.h"
#include "gdkvisualprivate.h"
#include "gdkmarshalers.h"
#include "gdkframeclockidle.h"
#include "gdkwindowimpl.h"
#include <math.h>
@ -238,6 +239,9 @@ static void gdk_window_invalidate_rect_full (GdkWindow *window,
static void _gdk_window_propagate_has_alpha_background (GdkWindow *window);
static cairo_surface_t *gdk_window_ref_impl_surface (GdkWindow *window);
static void gdk_window_set_frame_clock (GdkWindow *window,
GdkFrameClock *clock);
static guint signals[LAST_SIGNAL] = { 0 };
static gpointer parent_class = NULL;
@ -1465,6 +1469,13 @@ gdk_window_new (GdkWindow *parent,
if (window->parent)
window->parent->children = g_list_prepend (window->parent->children, window);
if (window->parent->window_type == GDK_WINDOW_ROOT)
{
GdkFrameClock *frame_clock = g_object_new (GDK_TYPE_FRAME_CLOCK_IDLE, NULL);
gdk_window_set_frame_clock (window, frame_clock);
g_object_unref (frame_clock);
}
native = FALSE;
if (window->parent->window_type == GDK_WINDOW_ROOT)
native = TRUE; /* Always use native windows for toplevels */
@ -1715,6 +1726,28 @@ gdk_window_reparent (GdkWindow *window,
}
}
/* If we changed the window type, we might have to set or
* unset the frame clock on the window
*/
if (GDK_WINDOW_TYPE (new_parent) == GDK_WINDOW_ROOT &&
GDK_WINDOW_TYPE (window) != GDK_WINDOW_FOREIGN)
{
if (window->frame_clock == NULL)
{
GdkFrameClock *frame_clock = g_object_new (GDK_TYPE_FRAME_CLOCK_IDLE, NULL);
gdk_window_set_frame_clock (window, frame_clock);
g_object_unref (frame_clock);
}
}
else
{
if (window->frame_clock != NULL)
{
g_object_run_dispose (G_OBJECT (window->frame_clock));
gdk_window_set_frame_clock (window, NULL);
}
}
/* We might have changed window type for a native windows, so we
need to change the event mask too. */
if (gdk_window_has_impl (window))
@ -2034,6 +2067,12 @@ _gdk_window_destroy_hierarchy (GdkWindow *window,
}
}
if (window->frame_clock)
{
g_object_run_dispose (G_OBJECT (window->frame_clock));
gdk_window_set_frame_clock (window, NULL);
}
gdk_window_free_paint_stack (window);
if (window->background)
@ -3778,7 +3817,6 @@ gdk_cairo_create (GdkWindow *window)
/* Code for dirty-region queueing
*/
static GSList *update_windows = NULL;
static guint update_idle = 0;
static gboolean debug_updates = FALSE;
static inline gboolean
@ -3877,14 +3915,6 @@ gdk_window_remove_update_window (GdkWindow *window)
update_windows = g_slist_remove (update_windows, window);
}
static gboolean
gdk_window_update_idle (gpointer data)
{
gdk_window_process_all_updates ();
return FALSE;
}
static gboolean
gdk_window_is_toplevel_frozen (GdkWindow *window)
{
@ -3898,16 +3928,20 @@ gdk_window_is_toplevel_frozen (GdkWindow *window)
static void
gdk_window_schedule_update (GdkWindow *window)
{
GdkFrameClock *frame_clock;
if (window &&
(window->update_freeze_count ||
gdk_window_is_toplevel_frozen (window)))
return;
if (!update_idle)
update_idle =
gdk_threads_add_idle_full (GDK_PRIORITY_REDRAW,
gdk_window_update_idle,
NULL, NULL);
/* If there's no frame clock (a foreign window), then the invalid
* region will just stick around unless gdk_window_process_updates()
* is called. */
frame_clock = gdk_window_get_frame_clock (window);
if (frame_clock)
gdk_frame_clock_request_phase (gdk_window_get_frame_clock (window),
GDK_FRAME_CLOCK_PHASE_PAINT);
}
void
@ -4250,18 +4284,13 @@ gdk_window_process_all_updates (void)
/* We can't do this now since that would recurse, so
delay it until after the recursion is done. */
got_recursive_update = TRUE;
update_idle = 0;
return;
}
in_process_all_updates = TRUE;
got_recursive_update = FALSE;
if (update_idle)
g_source_remove (update_idle);
update_windows = NULL;
update_idle = 0;
before_process_all_updates ();
@ -4296,31 +4325,20 @@ gdk_window_process_all_updates (void)
redraw now so that it eventually happens,
otherwise we could miss an update if nothing
else schedules an update. */
if (got_recursive_update && !update_idle)
update_idle =
gdk_threads_add_idle_full (GDK_PRIORITY_REDRAW,
gdk_window_update_idle,
NULL, NULL);
if (got_recursive_update)
gdk_window_schedule_update (NULL);
}
/**
* gdk_window_process_updates:
* @window: a #GdkWindow
* @update_children: whether to also process updates for child windows
*
* Sends one or more expose events to @window. The areas in each
* expose event will cover the entire update area for the window (see
* gdk_window_invalidate_region() for details). Normally GDK calls
* gdk_window_process_all_updates() on your behalf, so there's no
* need to call this function unless you want to force expose events
* to be delivered immediately and synchronously (vs. the usual
* case, where GDK delivers them in an idle handler). Occasionally
* this is useful to produce nicer scrolling behavior, for example.
*
**/
void
gdk_window_process_updates (GdkWindow *window,
gboolean update_children)
enum {
PROCESS_UPDATES_NO_RECURSE,
PROCESS_UPDATES_WITH_ALL_CHILDREN,
PROCESS_UPDATES_WITH_SAME_CLOCK_CHILDREN
};
static void
gdk_window_process_updates_with_mode (GdkWindow *window,
int recurse_mode)
{
GdkWindow *impl_window;
@ -4346,7 +4364,7 @@ gdk_window_process_updates (GdkWindow *window,
gdk_window_remove_update_window ((GdkWindow *)impl_window);
}
if (update_children)
if (recurse_mode != PROCESS_UPDATES_NO_RECURSE)
{
/* process updates in reverse stacking order so composition or
* painting over achieves the desired effect for offscreen windows
@ -4358,8 +4376,14 @@ gdk_window_process_updates (GdkWindow *window,
for (node = g_list_last (children); node; node = node->prev)
{
gdk_window_process_updates (node->data, TRUE);
g_object_unref (node->data);
GdkWindow *child = node->data;
if (recurse_mode == PROCESS_UPDATES_WITH_ALL_CHILDREN ||
(recurse_mode == PROCESS_UPDATES_WITH_SAME_CLOCK_CHILDREN &&
child->frame_clock == NULL))
{
gdk_window_process_updates (child, TRUE);
}
g_object_unref (child);
}
g_list_free (children);
@ -4368,6 +4392,33 @@ gdk_window_process_updates (GdkWindow *window,
g_object_unref (window);
}
/**
* gdk_window_process_updates:
* @window: a #GdkWindow
* @update_children: whether to also process updates for child windows
*
* Sends one or more expose events to @window. The areas in each
* expose event will cover the entire update area for the window (see
* gdk_window_invalidate_region() for details). Normally GDK calls
* gdk_window_process_all_updates() on your behalf, so there's no
* need to call this function unless you want to force expose events
* to be delivered immediately and synchronously (vs. the usual
* case, where GDK delivers them in an idle handler). Occasionally
* this is useful to produce nicer scrolling behavior, for example.
*
**/
void
gdk_window_process_updates (GdkWindow *window,
gboolean update_children)
{
g_return_if_fail (GDK_IS_WINDOW (window));
return gdk_window_process_updates_with_mode (window,
update_children ?
PROCESS_UPDATES_WITH_ALL_CHILDREN :
PROCESS_UPDATES_NO_RECURSE);
}
static void
gdk_window_invalidate_rect_full (GdkWindow *window,
const GdkRectangle *rect,
@ -4854,6 +4905,7 @@ gdk_window_freeze_toplevel_updates_libgtk_only (GdkWindow *window)
g_return_if_fail (window->window_type != GDK_WINDOW_CHILD);
window->update_and_descendants_freeze_count++;
_gdk_frame_clock_freeze (gdk_window_get_frame_clock (window));
}
/**
@ -4874,6 +4926,7 @@ gdk_window_thaw_toplevel_updates_libgtk_only (GdkWindow *window)
g_return_if_fail (window->update_and_descendants_freeze_count > 0);
window->update_and_descendants_freeze_count--;
_gdk_frame_clock_thaw (gdk_window_get_frame_clock (window));
gdk_window_schedule_update (window);
}
@ -9971,7 +10024,7 @@ _gdk_windowing_got_event (GdkDisplay *display,
{
GdkWindow *event_window;
gdouble x, y;
gboolean unlink_event;
gboolean unlink_event = FALSE;
GdkDeviceGrabInfo *button_release_grab;
GdkPointerWindowInfo *pointer_info = NULL;
GdkDevice *device, *source_device;
@ -10014,7 +10067,7 @@ _gdk_windowing_got_event (GdkDisplay *display,
event_window = event->any.window;
if (!event_window)
return;
goto out;
#ifdef DEBUG_WINDOW_PRINTING
if (event->type == GDK_KEY_PRESS &&
@ -10029,13 +10082,13 @@ _gdk_windowing_got_event (GdkDisplay *display,
{
event_window->native_visibility = event->visibility.state;
gdk_window_update_visibility_recursively (event_window, event_window);
return;
goto out;
}
if (!(is_button_type (event->type) ||
is_motion_type (event->type)) ||
event_window->window_type == GDK_WINDOW_ROOT)
return;
goto out;
is_toplevel = gdk_window_is_toplevel (event_window);
@ -10128,7 +10181,6 @@ _gdk_windowing_got_event (GdkDisplay *display,
_gdk_display_enable_motion_hints (display, device);
}
unlink_event = FALSE;
if (is_motion_type (event->type))
unlink_event = proxy_pointer_event (display, event, serial);
else if (is_button_type (event->type))
@ -10170,6 +10222,13 @@ _gdk_windowing_got_event (GdkDisplay *display,
g_list_free_1 (event_link);
gdk_event_free (event);
}
/* This does two things - first it sees if there are motions at the
* end of the queue that can be compressed. Second, if there is just
* a single motion that won't be dispatched because it is a compression
* candidate it queues up flushing the event queue.
*/
_gdk_event_queue_handle_motion_compression (display);
}
/**
@ -11142,44 +11201,28 @@ gdk_window_begin_move_drag (GdkWindow *window,
* gdk_window_enable_synchronized_configure:
* @window: a toplevel #GdkWindow
*
* Indicates that the application will cooperate with the window
* system in synchronizing the window repaint with the window
* manager during resizing operations. After an application calls
* this function, it must call gdk_window_configure_finished() every
* time it has finished all processing associated with a set of
* Configure events. Toplevel GTK+ windows automatically use this
* protocol.
*
* On X, calling this function makes @window participate in the
* _NET_WM_SYNC_REQUEST window manager protocol.
* Does nothing, present only for compatiblity.
*
* Since: 2.6
* Deprecated: 3.8: this function is no longer needed
**/
void
gdk_window_enable_synchronized_configure (GdkWindow *window)
{
GDK_WINDOW_IMPL_GET_CLASS (window->impl)->enable_synchronized_configure (window);
}
/**
* gdk_window_configure_finished:
* @window: a toplevel #GdkWindow
*
* Signal to the window system that the application has finished
* handling Configure events it has received. Window Managers can
* use this to better synchronize the frame repaint with the
* application. GTK+ applications will automatically call this
* function when appropriate.
*
* This function can only be called if gdk_window_enable_synchronized_configure()
* was called previously.
* Does nothing, present only for compatiblity.
*
* Since: 2.6
* Deprecated: 3.8: this function is no longer needed
**/
void
gdk_window_configure_finished (GdkWindow *window)
{
GDK_WINDOW_IMPL_GET_CLASS (window->impl)->configure_finished (window);
}
/**
@ -11535,3 +11578,113 @@ gdk_property_delete (GdkWindow *window,
{
GDK_WINDOW_IMPL_GET_CLASS (window->impl)->delete_property (window, property);
}
static void
gdk_window_flush_events (GdkFrameClock *clock,
void *data)
{
GdkWindow *window;
GdkDisplay *display;
window = GDK_WINDOW (data);
display = gdk_window_get_display (window);
_gdk_display_flush_events (display);
_gdk_display_pause_events (display);
gdk_frame_clock_request_phase (clock, GDK_FRAME_CLOCK_PHASE_RESUME_EVENTS);
}
static void
gdk_window_paint_on_clock (GdkFrameClock *clock,
void *data)
{
GdkWindow *window;
window = GDK_WINDOW (data);
/* Update window and any children on the same clock.
*/
gdk_window_process_updates_with_mode (window, PROCESS_UPDATES_WITH_SAME_CLOCK_CHILDREN);
}
static void
gdk_window_resume_events (GdkFrameClock *clock,
void *data)
{
GdkWindow *window;
GdkDisplay *display;
window = GDK_WINDOW (data);
display = gdk_window_get_display (window);
_gdk_display_unpause_events (display);
}
static void
gdk_window_set_frame_clock (GdkWindow *window,
GdkFrameClock *clock)
{
g_return_if_fail (GDK_IS_WINDOW (window));
g_return_if_fail (clock == NULL || GDK_IS_FRAME_CLOCK (clock));
g_return_if_fail (clock == NULL || gdk_window_is_toplevel (window));
if (clock == window->frame_clock)
return;
if (clock)
{
g_object_ref (clock);
g_signal_connect (G_OBJECT (clock),
"flush-events",
G_CALLBACK (gdk_window_flush_events),
window);
g_signal_connect (G_OBJECT (clock),
"paint",
G_CALLBACK (gdk_window_paint_on_clock),
window);
g_signal_connect (G_OBJECT (clock),
"resume-events",
G_CALLBACK (gdk_window_resume_events),
window);
}
if (window->frame_clock)
{
g_signal_handlers_disconnect_by_func (G_OBJECT (window->frame_clock),
G_CALLBACK (gdk_window_flush_events),
window);
g_signal_handlers_disconnect_by_func (G_OBJECT (window->frame_clock),
G_CALLBACK (gdk_window_paint_on_clock),
window);
g_signal_handlers_disconnect_by_func (G_OBJECT (window->frame_clock),
G_CALLBACK (gdk_window_resume_events),
window);
g_object_unref (window->frame_clock);
}
window->frame_clock = clock;
}
/**
* gdk_window_get_frame_clock:
* @window: window to get frame clock for
*
* Gets the frame clock for the window. The frame clock for a window
* never changes unless the window is reparented to a new toplevel
* window.
*
* Since: 3.8
* Return value: (transfer none): the frame clock
*/
GdkFrameClock*
gdk_window_get_frame_clock (GdkWindow *window)
{
GdkWindow *toplevel;
g_return_val_if_fail (GDK_IS_WINDOW (window), NULL);
toplevel = gdk_window_get_toplevel (window);
return toplevel->frame_clock;
}

View File

@ -32,6 +32,7 @@
#include <gdk/gdkversionmacros.h>
#include <gdk/gdktypes.h>
#include <gdk/gdkevents.h>
#include <gdk/gdkframeclock.h>
G_BEGIN_DECLS
@ -883,7 +884,9 @@ void gdk_window_constrain_size (GdkGeometry *geometry,
gint *new_width,
gint *new_height);
GDK_DEPRECATED_IN_3_8
void gdk_window_enable_synchronized_configure (GdkWindow *window);
GDK_DEPRECATED_IN_3_8
void gdk_window_configure_finished (GdkWindow *window);
GdkWindow *gdk_get_default_root_window (void);
@ -901,6 +904,10 @@ void gdk_window_set_support_multidevice (GdkWindow *window,
gboolean support_multidevice);
gboolean gdk_window_get_support_multidevice (GdkWindow *window);
/* Frame clock */
GDK_AVAILABLE_IN_3_8
GdkFrameClock* gdk_window_get_frame_clock (GdkWindow *window);
G_END_DECLS
#endif /* __GDK_WINDOW_H__ */

View File

@ -620,8 +620,11 @@ gdk_event_prepare (GSource *source,
*timeout = -1;
retval = (_gdk_event_queue_find_first (_gdk_display) != NULL ||
_gdk_quartz_event_loop_check_pending ());
if (display->event_pause_count > 0)
retval = FALSE;
else
retval = (_gdk_event_queue_find_first (_gdk_display) != NULL ||
_gdk_quartz_event_loop_check_pending ());
gdk_threads_leave ();
@ -635,8 +638,11 @@ gdk_event_check (GSource *source)
gdk_threads_enter ();
retval = (_gdk_event_queue_find_first (_gdk_display) != NULL ||
_gdk_quartz_event_loop_check_pending ());
if (display->event_pause_count > 0)
retval = FALSE;
else
retval = (_gdk_event_queue_find_first (_gdk_display) != NULL ||
_gdk_quartz_event_loop_check_pending ());
gdk_threads_leave ();

View File

@ -3002,16 +3002,6 @@ gdk_quartz_window_set_group (GdkWindow *window,
/* FIXME: Implement */
}
static void
gdk_quartz_window_enable_synchronized_configure (GdkWindow *window)
{
}
static void
gdk_quartz_window_configure_finished (GdkWindow *window)
{
}
static void
gdk_quartz_window_destroy_notify (GdkWindow *window)
{
@ -3129,8 +3119,6 @@ gdk_window_impl_quartz_class_init (GdkWindowImplQuartzClass *klass)
impl_class->set_functions = gdk_quartz_window_set_functions;
impl_class->begin_resize_drag = gdk_quartz_window_begin_resize_drag;
impl_class->begin_move_drag = gdk_quartz_window_begin_move_drag;
impl_class->enable_synchronized_configure = gdk_quartz_window_enable_synchronized_configure;
impl_class->configure_finished = gdk_quartz_window_configure_finished;
impl_class->set_opacity = gdk_quartz_window_set_opacity;
impl_class->destroy_notify = gdk_quartz_window_destroy_notify;
impl_class->register_dnd = _gdk_quartz_window_register_dnd;

View File

@ -261,6 +261,7 @@ gdk_wayland_device_grab (GdkDevice *device,
* compositor.
*/
_gdk_wayland_window_set_device_grabbed (window,
device,
wayland_device->wl_seat,
time_);
}
@ -292,6 +293,7 @@ gdk_wayland_device_ungrab (GdkDevice *device,
if (wayland_device->pointer_grab_window)
_gdk_wayland_window_set_device_grabbed (wayland_device->pointer_grab_window,
NULL,
NULL,
0);
}

View File

@ -95,6 +95,7 @@ gdk_registry_handle_global(void *data, struct wl_registry *registry, uint32_t id
GdkWaylandDisplay *display_wayland = data;
GdkDisplay *gdk_display = GDK_DISPLAY_OBJECT (data);
struct wl_seat *seat;
struct wl_output *output;
if (strcmp(interface, "wl_compositor") == 0) {
display_wayland->compositor =
@ -109,9 +110,9 @@ gdk_registry_handle_global(void *data, struct wl_registry *registry, uint32_t id
display_wayland->shell =
wl_registry_bind(display_wayland->wl_registry, id, &wl_shell_interface, 1);
} else if (strcmp(interface, "wl_output") == 0) {
display_wayland->output =
output =
wl_registry_bind(display_wayland->wl_registry, id, &wl_output_interface, 1);
_gdk_wayland_screen_add_output(display_wayland->screen, display_wayland->output);
_gdk_wayland_screen_add_output(display_wayland->screen, output);
} else if (strcmp(interface, "wl_seat") == 0) {
seat = wl_registry_bind(display_wayland->wl_registry, id, &wl_seat_interface, 1);
_gdk_wayland_device_manager_add_device (gdk_display->device_manager,
@ -124,9 +125,14 @@ gdk_registry_handle_global(void *data, struct wl_registry *registry, uint32_t id
}
static void
gdk_registry_handle_global_remove(void *data,
struct wl_registry *registry, uint32_t name)
gdk_registry_handle_global_remove(void *data,
struct wl_registry *registry,
uint32_t id)
{
GdkWaylandDisplay *display_wayland = data;
/* We don't know what this item is - try as an output */
_gdk_wayland_screen_remove_output_by_id (display_wayland->screen, id);
}
static const struct wl_registry_listener registry_listener = {

View File

@ -61,7 +61,6 @@ struct _GdkWaylandDisplay
struct wl_compositor *compositor;
struct wl_shm *shm;
struct wl_shell *shell;
struct wl_output *output;
struct wl_input_device *input_device;
struct wl_data_device_manager *data_device_manager;

View File

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

View File

@ -146,8 +146,8 @@ GdkWindow *_gdk_wayland_screen_create_root_window (GdkScreen *screen,
GdkScreen *_gdk_wayland_screen_new (GdkDisplay *display);
void _gdk_wayland_screen_add_output (GdkScreen *scren,
struct wl_output *output);
void _gdk_wayland_screen_remove_output (GdkScreen *screen,
struct wl_output *output);
void _gdk_wayland_screen_remove_output_by_id (GdkScreen *screen,
guint32 id);
void _gdk_wayland_display_manager_add_display (GdkDisplayManager *manager,
GdkDisplay *display);
@ -155,6 +155,7 @@ void _gdk_wayland_display_manager_remove_display (GdkDisplayManager *manager,
GdkDisplay *display);
void _gdk_wayland_window_set_device_grabbed (GdkWindow *window,
GdkDevice *device,
struct wl_seat *seat,
guint32 time_);

View File

@ -67,6 +67,7 @@ struct _GdkWaylandScreenClass
struct _GdkWaylandMonitor
{
struct wl_output *output;
GdkRectangle geometry;
int width_mm;
int height_mm;
@ -589,13 +590,27 @@ _gdk_wayland_screen_add_output (GdkScreen *screen,
GdkWaylandScreen *screen_wayland = GDK_WAYLAND_SCREEN (screen);
GdkWaylandMonitor *monitor = g_new0(GdkWaylandMonitor, 1);
monitor->output = output;
g_ptr_array_add(screen_wayland->monitors, monitor);
wl_output_add_listener(output, &output_listener, monitor);
}
void
_gdk_wayland_screen_remove_output (GdkScreen *screen,
struct wl_output *output)
_gdk_wayland_screen_remove_output_by_id (GdkScreen *screen,
guint32 id)
{
GdkWaylandScreen *screen_wayland = GDK_WAYLAND_SCREEN (screen);
int i;
for (i = 0; i < screen_wayland->monitors->len; i++)
{
GdkWaylandMonitor *monitor = screen_wayland->monitors->pdata[i];
if (wl_proxy_get_id ((struct wl_proxy *)monitor->output) == id)
{
g_ptr_array_remove (screen_wayland->monitors, monitor);
break;
}
}
}

View File

@ -130,6 +130,7 @@ struct _GdkWindowImplWayland
GdkGeometry geometry_hints;
GdkWindowHints geometry_mask;
GdkDevice *grab_device;
struct wl_seat *grab_input_seat;
guint32 grab_time;
@ -563,24 +564,51 @@ gdk_wayland_window_map (GdkWindow *window)
GdkWindowImplWayland *parent;
GdkWaylandDisplay *wayland_display =
GDK_WAYLAND_DISPLAY (gdk_window_get_display (window));
GdkWindow *transient_for;
if (!impl->mapped)
{
if (impl->transient_for)
/* Popup menus can appear without a transient parent, which means they
* cannot be positioned properly on Wayland. This attempts to guess the
* surface they should be positioned with by finding the surface beneath
* the device that created the grab for the popup window */
if (!impl->transient_for && impl->hint == GDK_WINDOW_TYPE_HINT_POPUP_MENU)
{
transient_for = gdk_device_get_window_at_position (impl->grab_device, NULL, NULL);
transient_for = gdk_window_get_toplevel (transient_for);
/* start the popup at the position of the device that holds the grab */
gdk_window_get_device_position (transient_for,
impl->grab_device,
&window->x, &window->y, NULL);
}
else
transient_for = impl->transient_for;
if (transient_for)
{
struct wl_seat *grab_input_seat = NULL;
GdkWindowImplWayland *tmp_impl;
parent = GDK_WINDOW_IMPL_WAYLAND (impl->transient_for->impl);
parent = GDK_WINDOW_IMPL_WAYLAND (transient_for->impl);
/* Use the device that was used for the grab as the device for
* the popup window setup - so this relies on GTK+ taking the
* grab before showing the popup window.
*/
if (impl->grab_input_seat)
grab_input_seat = impl->grab_input_seat;
grab_input_seat = impl->grab_input_seat;
if (!grab_input_seat)
grab_input_seat = parent->grab_input_seat;
tmp_impl = parent;
while (!grab_input_seat)
{
grab_input_seat = tmp_impl->grab_input_seat;
if (tmp_impl->transient_for)
tmp_impl = GDK_WINDOW_IMPL_WAYLAND (tmp_impl->transient_for->impl);
else
break;
}
if (grab_input_seat &&
(impl->hint == GDK_WINDOW_TYPE_HINT_POPUP_MENU ||
@ -1291,6 +1319,9 @@ gdk_wayland_window_fullscreen (GdkWindow *window)
WL_SHELL_SURFACE_FULLSCREEN_METHOD_DEFAULT,
0,
NULL);
gdk_synthesize_window_state (window, 0, GDK_WINDOW_STATE_FULLSCREEN);
impl->fullscreen = TRUE;
}
@ -1306,8 +1337,11 @@ gdk_wayland_window_unfullscreen (GdkWindow *window)
return;
wl_shell_surface_set_toplevel (impl->shell_surface);
gdk_synthesize_window_state (window, GDK_WINDOW_STATE_FULLSCREEN, 0);
gdk_wayland_window_configure (window, impl->saved_width, impl->saved_height,
0);
impl->fullscreen = FALSE;
}
@ -1468,21 +1502,6 @@ gdk_wayland_window_begin_move_drag (GdkWindow *window,
gdk_device_ungrab (device, timestamp);
}
static void
gdk_wayland_window_enable_synchronized_configure (GdkWindow *window)
{
}
static void
gdk_wayland_window_configure_finished (GdkWindow *window)
{
if (!WINDOW_IS_TOPLEVEL (window))
return;
if (!GDK_IS_WINDOW_IMPL_WAYLAND (window->impl))
return;
}
static void
gdk_wayland_window_set_opacity (GdkWindow *window,
gdouble opacity)
@ -1666,8 +1685,6 @@ _gdk_window_impl_wayland_class_init (GdkWindowImplWaylandClass *klass)
impl_class->set_functions = gdk_wayland_window_set_functions;
impl_class->begin_resize_drag = gdk_wayland_window_begin_resize_drag;
impl_class->begin_move_drag = gdk_wayland_window_begin_move_drag;
impl_class->enable_synchronized_configure = gdk_wayland_window_enable_synchronized_configure;
impl_class->configure_finished = gdk_wayland_window_configure_finished;
impl_class->set_opacity = gdk_wayland_window_set_opacity;
impl_class->set_composited = gdk_wayland_window_set_composited;
impl_class->destroy_notify = gdk_wayland_window_destroy_notify;
@ -1686,6 +1703,7 @@ _gdk_window_impl_wayland_class_init (GdkWindowImplWaylandClass *klass)
void
_gdk_wayland_window_set_device_grabbed (GdkWindow *window,
GdkDevice *device,
struct wl_seat *seat,
guint32 time_)
{
@ -1695,6 +1713,7 @@ _gdk_wayland_window_set_device_grabbed (GdkWindow *window,
impl = GDK_WINDOW_IMPL_WAYLAND (window->impl);
impl->grab_device = device;
impl->grab_input_seat = seat;
impl->grab_time = time_;
}

View File

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

View File

@ -147,7 +147,7 @@ _gdk_win32_window_change_property (GdkWindow *window,
{
HGLOBAL hdata;
gint i, size;
guchar *ucptr, *buf = NULL;
guchar *ucptr;
wchar_t *wcptr, *p;
glong wclen;
@ -206,7 +206,7 @@ _gdk_win32_window_change_property (GdkWindow *window,
WIN32_API_FAILED ("GlobalAlloc");
if (!CloseClipboard ())
WIN32_API_FAILED ("CloseClipboard");
g_free (buf);
g_free (wcptr);
return;
}

View File

@ -27,7 +27,6 @@
#include "config.h"
#include <stdlib.h>
#include <windows.h>
#include "gdk.h"
#include "gdkwindowimpl.h"
@ -3248,18 +3247,6 @@ gdk_win32_window_lookup_for_display (GdkDisplay *display,
return (GdkWindow*) gdk_win32_handle_table_lookup (anid);
}
static void
gdk_win32_window_enable_synchronized_configure (GdkWindow *window)
{
/* nothing - no window manager to cooperate with */
}
static void
gdk_win32_window_configure_finished (GdkWindow *window)
{
/* nothing - no window manager to cooperate with */
}
static void
gdk_win32_window_set_opacity (GdkWindow *window,
gdouble opacity)
@ -3618,8 +3605,6 @@ gdk_window_impl_win32_class_init (GdkWindowImplWin32Class *klass)
impl_class->begin_resize_drag = gdk_win32_window_begin_resize_drag;
impl_class->begin_move_drag = gdk_win32_window_begin_move_drag;
impl_class->enable_synchronized_configure = gdk_win32_window_enable_synchronized_configure;
impl_class->configure_finished = gdk_win32_window_configure_finished;
impl_class->set_opacity = gdk_win32_window_set_opacity;
//impl_class->set_composited = gdk_win32_window_set_composited;
impl_class->destroy_notify = gdk_win32_window_destroy_notify;

View File

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

View File

@ -1569,22 +1569,25 @@ gdk_x11_device_manager_xi2_translate_event (GdkEventTranslator *translator,
case XI_FocusIn:
case XI_FocusOut:
{
XIEnterEvent *xev = (XIEnterEvent *) ev;
GdkDevice *device, *source_device;
if (window)
{
XIEnterEvent *xev = (XIEnterEvent *) ev;
GdkDevice *device, *source_device;
device = g_hash_table_lookup (device_manager->id_table,
GINT_TO_POINTER (xev->deviceid));
device = g_hash_table_lookup (device_manager->id_table,
GINT_TO_POINTER (xev->deviceid));
source_device = g_hash_table_lookup (device_manager->id_table,
GUINT_TO_POINTER (xev->sourceid));
source_device = g_hash_table_lookup (device_manager->id_table,
GUINT_TO_POINTER (xev->sourceid));
_gdk_device_manager_core_handle_focus (window,
xev->event,
device,
source_device,
(ev->evtype == XI_FocusIn) ? TRUE : FALSE,
xev->detail,
xev->mode);
_gdk_device_manager_core_handle_focus (window,
xev->event,
device,
source_device,
(ev->evtype == XI_FocusIn) ? TRUE : FALSE,
xev->detail,
xev->mode);
}
return_val = FALSE;
}

View File

@ -26,6 +26,7 @@
#include "gdkdisplay.h"
#include "gdkeventsource.h"
#include "gdkeventtranslator.h"
#include "gdkframeclockprivate.h"
#include "gdkinternals.h"
#include "gdkscreen.h"
#include "gdkinternals.h"
@ -382,15 +383,11 @@ gdk_check_wm_state_changed (GdkWindow *window)
do_net_wm_state_changes (window);
}
static GdkWindow *
get_event_window (GdkEventTranslator *translator,
XEvent *xevent)
static Window
get_event_xwindow (XEvent *xevent)
{
GdkDisplay *display;
Window xwindow;
display = (GdkDisplay *) translator;
switch (xevent->type)
{
case DestroyNotify:
@ -405,11 +402,20 @@ get_event_window (GdkEventTranslator *translator,
case ConfigureNotify:
xwindow = xevent->xconfigure.window;
break;
case ReparentNotify:
xwindow = xevent->xreparent.window;
break;
case GravityNotify:
xwindow = xevent->xgravity.window;
break;
case CirculateNotify:
xwindow = xevent->xcirculate.window;
break;
default:
xwindow = xevent->xany.window;
}
return gdk_x11_window_lookup_for_display (display, xwindow);
return xwindow;
}
static gboolean
@ -418,7 +424,9 @@ gdk_x11_display_translate_event (GdkEventTranslator *translator,
GdkEvent *event,
XEvent *xevent)
{
Window xwindow;
GdkWindow *window;
gboolean is_substructure;
GdkWindowImplX11 *window_impl = NULL;
GdkScreen *screen = NULL;
GdkX11Screen *x11_screen = NULL;
@ -426,12 +434,20 @@ gdk_x11_display_translate_event (GdkEventTranslator *translator,
GdkX11Display *display_x11 = GDK_X11_DISPLAY (display);
gboolean return_val;
/* Find the GdkWindow that this event relates to.
* Basically this means substructure events
* are reported same as structure events
/* Find the GdkWindow that this event relates to. If that's
* not the same as the window that the event was sent to,
* we are getting an event from SubstructureNotifyMask.
* We ignore such events for internal operation, but we
* need to report them to the application because of
* GDK_SUBSTRUCTURE_MASK (which should be removed at next
* opportunity.) The most likely reason for getting these
* events is when we are used in the Metacity or Mutter
* window managers.
*/
window = get_event_window (translator, xevent);
xwindow = get_event_xwindow (xevent);
is_substructure = xwindow != xevent->xany.window;
window = gdk_x11_window_lookup_for_display (display, xwindow);
if (window)
{
/* We may receive events such as NoExpose/GraphicsExpose
@ -460,7 +476,7 @@ gdk_x11_display_translate_event (GdkEventTranslator *translator,
}
}
if (xevent->type == DestroyNotify)
if (xevent->type == DestroyNotify && !is_substructure)
{
int i, n;
@ -622,8 +638,7 @@ gdk_x11_display_translate_event (GdkEventTranslator *translator,
g_message ("destroy notify:\twindow: %ld",
xevent->xdestroywindow.window));
/* Ignore DestroyNotify from SubstructureNotifyMask */
if (xevent->xdestroywindow.window == xevent->xdestroywindow.event)
if (!is_substructure)
{
event->any.type = GDK_DESTROY;
event->any.window = window;
@ -646,27 +661,39 @@ gdk_x11_display_translate_event (GdkEventTranslator *translator,
event->any.type = GDK_UNMAP;
event->any.window = window;
/* If the WM supports the _NET_WM_STATE_HIDDEN hint, we do not want to
* interpret UnmapNotify events as implying iconic state.
* http://bugzilla.gnome.org/show_bug.cgi?id=590726.
*/
if (screen &&
!gdk_x11_screen_supports_net_wm_hint (screen,
gdk_atom_intern_static_string ("_NET_WM_STATE_HIDDEN")))
{
/* If we are shown (not withdrawn) and get an unmap, it means we were
* iconified in the X sense. If we are withdrawn, and get an unmap, it
* means we hid the window ourselves, so we will have already flipped
* the iconified bit off.
if (window && !is_substructure)
{
/* If the WM supports the _NET_WM_STATE_HIDDEN hint, we do not want to
* interpret UnmapNotify events as implying iconic state.
* http://bugzilla.gnome.org/show_bug.cgi?id=590726.
*/
if (window && GDK_WINDOW_IS_MAPPED (window))
gdk_synthesize_window_state (window,
0,
GDK_WINDOW_STATE_ICONIFIED);
}
if (screen &&
!gdk_x11_screen_supports_net_wm_hint (screen,
gdk_atom_intern_static_string ("_NET_WM_STATE_HIDDEN")))
{
/* If we are shown (not withdrawn) and get an unmap, it means we were
* iconified in the X sense. If we are withdrawn, and get an unmap, it
* means we hid the window ourselves, so we will have already flipped
* the iconified bit off.
*/
if (GDK_WINDOW_IS_MAPPED (window))
gdk_synthesize_window_state (window,
0,
GDK_WINDOW_STATE_ICONIFIED);
}
if (window)
_gdk_x11_window_grab_check_unmap (window, xevent->xany.serial);
if (window_impl->toplevel &&
window_impl->toplevel->frame_pending)
{
window_impl->toplevel->frame_pending = FALSE;
_gdk_frame_clock_thaw (gdk_window_get_frame_clock (event->any.window));
}
if (toplevel)
gdk_window_freeze_toplevel_updates_libgtk_only (window);
_gdk_x11_window_grab_check_unmap (window, xevent->xany.serial);
}
break;
@ -678,11 +705,17 @@ gdk_x11_display_translate_event (GdkEventTranslator *translator,
event->any.type = GDK_MAP;
event->any.window = window;
/* Unset iconified if it was set */
if (window && (window->state & GDK_WINDOW_STATE_ICONIFIED))
gdk_synthesize_window_state (window,
GDK_WINDOW_STATE_ICONIFIED,
0);
if (window && !is_substructure)
{
/* Unset iconified if it was set */
if (window->state & GDK_WINDOW_STATE_ICONIFIED)
gdk_synthesize_window_state (window,
GDK_WINDOW_STATE_ICONIFIED,
0);
if (toplevel)
gdk_window_thaw_toplevel_updates_libgtk_only (window);
}
break;
@ -728,10 +761,11 @@ gdk_x11_display_translate_event (GdkEventTranslator *translator,
}
#ifdef HAVE_XSYNC
if (toplevel && display_x11->use_sync && !XSyncValueIsZero (toplevel->pending_counter_value))
if (!is_substructure && toplevel && display_x11->use_sync && toplevel->pending_counter_value != 0)
{
toplevel->current_counter_value = toplevel->pending_counter_value;
XSyncIntToValue (&toplevel->pending_counter_value, 0);
toplevel->configure_counter_value = toplevel->pending_counter_value;
toplevel->configure_counter_value_is_extended = toplevel->pending_counter_value_is_extended;
toplevel->pending_counter_value = 0;
}
#endif
@ -773,21 +807,24 @@ gdk_x11_display_translate_event (GdkEventTranslator *translator,
event->configure.x = xevent->xconfigure.x;
event->configure.y = xevent->xconfigure.y;
}
window->x = event->configure.x;
window->y = event->configure.y;
window->width = xevent->xconfigure.width;
window->height = xevent->xconfigure.height;
if (!is_substructure)
{
window->x = event->configure.x;
window->y = event->configure.y;
window->width = xevent->xconfigure.width;
window->height = xevent->xconfigure.height;
_gdk_window_update_size (window);
_gdk_x11_window_update_size (GDK_WINDOW_IMPL_X11 (window->impl));
_gdk_window_update_size (window);
_gdk_x11_window_update_size (GDK_WINDOW_IMPL_X11 (window->impl));
if (window->resize_count >= 1)
{
window->resize_count -= 1;
if (window->resize_count >= 1)
{
window->resize_count -= 1;
if (window->resize_count == 0)
_gdk_x11_moveresize_configure_done (display, window);
}
if (window->resize_count == 0)
_gdk_x11_moveresize_configure_done (display, window);
}
}
}
break;
@ -1021,6 +1058,25 @@ gdk_x11_display_translate_event (GdkEventTranslator *translator,
return return_val;
}
static GdkFrameTimings *
find_frame_timings (GdkFrameClock *clock,
guint64 serial)
{
gint64 start_frame, end_frame, i;
start_frame = gdk_frame_clock_get_history_start (clock);
end_frame = gdk_frame_clock_get_frame_counter (clock);
for (i = end_frame; i >= start_frame; i--)
{
GdkFrameTimings *timings = gdk_frame_clock_get_timings (clock, i);
if (timings->cookie == serial)
return timings;
}
return NULL;
}
GdkFilterReturn
_gdk_wm_protocols_filter (GdkXEvent *xev,
GdkEvent *event,
@ -1031,7 +1087,7 @@ _gdk_wm_protocols_filter (GdkXEvent *xev,
GdkDisplay *display;
Atom atom;
if (!GDK_IS_X11_WINDOW (win))
if (!GDK_IS_X11_WINDOW (win) || GDK_WINDOW_DESTROYED (win))
return GDK_FILTER_CONTINUE;
if (xevent->type != ClientMessage)
@ -1039,6 +1095,82 @@ _gdk_wm_protocols_filter (GdkXEvent *xev,
display = GDK_WINDOW_DISPLAY (win);
/* This isn't actually WM_PROTOCOLS because that wouldn't leave enough space
* in the message for everything that gets stuffed in */
if (xevent->xclient.message_type == gdk_x11_get_xatom_by_name_for_display (display, "_NET_WM_FRAME_DRAWN"))
{
GdkWindowImplX11 *window_impl;
window_impl = GDK_WINDOW_IMPL_X11 (win->impl);
if (window_impl->toplevel)
{
guint32 d0 = xevent->xclient.data.l[0];
guint32 d1 = xevent->xclient.data.l[1];
guint32 d2 = xevent->xclient.data.l[2];
guint32 d3 = xevent->xclient.data.l[3];
guint64 serial = ((guint64)d1 << 32) | d0;
gint64 frame_drawn_time = ((guint64)d3 << 32) | d2;
gint64 refresh_interval, presentation_time;
GdkFrameClock *clock = gdk_window_get_frame_clock (win);
GdkFrameTimings *timings = find_frame_timings (clock, serial);
if (timings)
timings->drawn_time = frame_drawn_time;
if (window_impl->toplevel->frame_pending)
{
window_impl->toplevel->frame_pending = FALSE;
_gdk_frame_clock_thaw (clock);
}
gdk_frame_clock_get_refresh_info (clock,
frame_drawn_time,
&refresh_interval,
&presentation_time);
if (presentation_time != 0)
window_impl->toplevel->throttled_presentation_time = presentation_time + refresh_interval;
}
return GDK_FILTER_REMOVE;
}
if (xevent->xclient.message_type == gdk_x11_get_xatom_by_name_for_display (display, "_NET_WM_FRAME_TIMINGS"))
{
GdkWindowImplX11 *window_impl;
window_impl = GDK_WINDOW_IMPL_X11 (win->impl);
if (window_impl->toplevel)
{
guint32 d0 = xevent->xclient.data.l[0];
guint32 d1 = xevent->xclient.data.l[1];
guint32 d2 = xevent->xclient.data.l[2];
guint32 d3 = xevent->xclient.data.l[3];
guint64 serial = ((guint64)d1 << 32) | d0;
GdkFrameClock *clock = gdk_window_get_frame_clock (win);
GdkFrameTimings *timings = find_frame_timings (clock, serial);
if (timings)
{
gint32 presentation_time_offset = (gint32)d2;
gint32 refresh_interval = d3;
if (timings->drawn_time && presentation_time_offset)
timings->presentation_time = timings->drawn_time + presentation_time_offset;
if (refresh_interval)
timings->refresh_interval = refresh_interval;
timings->complete = TRUE;
#ifdef G_ENABLE_DEBUG
if ((_gdk_debug_flags & GDK_DEBUG_FRAMES) != 0)
_gdk_frame_clock_debug_print_timings (clock, timings);
#endif /* G_ENABLE_DEBUG */
}
}
}
if (xevent->xclient.message_type != gdk_x11_get_xatom_by_name_for_display (display, "WM_PROTOCOLS"))
return GDK_FILTER_CONTINUE;
@ -1066,7 +1198,7 @@ _gdk_wm_protocols_filter (GdkXEvent *xev,
}
else if (atom == gdk_x11_get_xatom_by_name_for_display (display, "WM_TAKE_FOCUS"))
{
GdkToplevelX11 *toplevel = _gdk_x11_window_get_toplevel (event->any.window);
GdkToplevelX11 *toplevel = _gdk_x11_window_get_toplevel (win);
/* There is no way of knowing reliably whether we are viewable;
* so trap errors asynchronously around the XSetInputFocus call
@ -1100,13 +1232,12 @@ _gdk_wm_protocols_filter (GdkXEvent *xev,
else if (atom == gdk_x11_get_xatom_by_name_for_display (display, "_NET_WM_SYNC_REQUEST") &&
GDK_X11_DISPLAY (display)->use_sync)
{
GdkToplevelX11 *toplevel = _gdk_x11_window_get_toplevel (event->any.window);
GdkToplevelX11 *toplevel = _gdk_x11_window_get_toplevel (win);
if (toplevel)
{
#ifdef HAVE_XSYNC
XSyncIntsToValue (&toplevel->pending_counter_value,
xevent->xclient.data.l[2],
xevent->xclient.data.l[3]);
toplevel->pending_counter_value = xevent->xclient.data.l[2] + ((gint64)xevent->xclient.data.l[3] << 32);
toplevel->pending_counter_value_is_extended = xevent->xclient.data.l[4] != 0;
#endif
}
return GDK_FILTER_REMOVE;
@ -1263,7 +1394,7 @@ _gdk_x11_display_open (const gchar *display_name)
* structures in places
*/
for (i = 0; i < ScreenCount (display_x11->xdisplay); i++)
_gdk_x11_screen_init_events (display_x11->screens[i]);
_gdk_x11_xsettings_init (GDK_X11_SCREEN (display_x11->screens[i]));
/*set the default screen */
display_x11->default_screen = display_x11->screens[DefaultScreen (display_x11->xdisplay)];

View File

@ -276,8 +276,12 @@ gdk_event_source_prepare (GSource *source,
gdk_threads_enter ();
*timeout = -1;
retval = (_gdk_event_queue_find_first (display) != NULL ||
gdk_check_xpending (display));
if (display->event_pause_count > 0)
retval = FALSE;
else
retval = (_gdk_event_queue_find_first (display) != NULL ||
gdk_check_xpending (display));
gdk_threads_leave ();
@ -292,7 +296,9 @@ gdk_event_source_check (GSource *source)
gdk_threads_enter ();
if (event_source->event_poll_fd.revents & G_IO_IN)
if (event_source->display->event_pause_count > 0)
retval = FALSE;
else if (event_source->event_poll_fd.revents & G_IO_IN)
retval = (_gdk_event_queue_find_first (event_source->display) != NULL ||
gdk_check_xpending (event_source->display));
else

View File

@ -297,6 +297,10 @@ void _gdk_x11_precache_atoms (GdkDisplay *display,
const gchar * const *atom_names,
gint n_atoms);
Atom _gdk_x11_get_xatom_for_display_printf (GdkDisplay *display,
const gchar *format,
...) G_GNUC_PRINTF (2, 3);
GdkFilterReturn
_gdk_x11_dnd_filter (GdkXEvent *xev,
GdkEvent *event,
@ -304,7 +308,6 @@ _gdk_x11_dnd_filter (GdkXEvent *xev,
void _gdk_x11_screen_init_root_window (GdkScreen *screen);
void _gdk_x11_screen_init_visuals (GdkScreen *screen);
void _gdk_x11_screen_init_events (GdkScreen *screen);
void _gdk_x11_cursor_update_theme (GdkCursor *cursor);
void _gdk_x11_cursor_display_finalize (GdkDisplay *display);

View File

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

View File

@ -24,6 +24,7 @@
#include "gdkscreen-x11.h"
#include "gdkdisplay-x11.h"
#include "gdkprivate-x11.h"
#include "xsettings-client.h"
#include <glib.h>
@ -47,8 +48,6 @@
#include <X11/extensions/Xfixes.h>
#endif
#include "gdksettings.c"
static void gdk_x11_screen_dispose (GObject *object);
static void gdk_x11_screen_finalize (GObject *object);
static void init_randr_support (GdkScreen *screen);
@ -130,18 +129,6 @@ gdk_x11_screen_get_root_window (GdkScreen *screen)
return GDK_X11_SCREEN (screen)->root_window;
}
static void
_gdk_x11_screen_events_uninit (GdkScreen *screen)
{
GdkX11Screen *x11_screen = GDK_X11_SCREEN (screen);
if (x11_screen->xsettings_client)
{
xsettings_client_destroy (x11_screen->xsettings_client);
x11_screen->xsettings_client = NULL;
}
}
static void
gdk_x11_screen_dispose (GObject *object)
{
@ -157,7 +144,7 @@ gdk_x11_screen_dispose (GObject *object)
}
}
_gdk_x11_screen_events_uninit (GDK_SCREEN (object));
_gdk_x11_xsettings_finish (x11_screen);
if (x11_screen->root_window)
_gdk_window_destroy (x11_screen->root_window, TRUE);
@ -298,7 +285,7 @@ get_current_desktop (GdkScreen *screen)
&data_return);
if (type == XA_CARDINAL && format == 32 && n_items > 0)
workspace = (int) data_return[0];
workspace = ((long *) data_return)[0];
if (data_return)
XFree (data_return);
@ -436,27 +423,23 @@ gdk_x11_screen_get_screen_number (GdkScreen *screen)
return GDK_X11_SCREEN (screen)->screen_num;
}
static Atom
get_cm_atom (GdkX11Screen *x11_screen)
{
return _gdk_x11_get_xatom_for_display_printf (x11_screen->display, "_NET_WM_CM_S%d", x11_screen->screen_num);
}
static gboolean
check_is_composited (GdkDisplay *display,
GdkX11Screen *x11_screen)
{
Atom xselection = gdk_x11_atom_to_xatom_for_display (display, x11_screen->cm_selection_atom);
Window xwindow;
xwindow = XGetSelectionOwner (GDK_DISPLAY_XDISPLAY (display), xselection);
xwindow = XGetSelectionOwner (GDK_DISPLAY_XDISPLAY (display), get_cm_atom (x11_screen));
return xwindow != None;
}
static GdkAtom
make_cm_atom (int screen_number)
{
gchar *name = g_strdup_printf ("_NET_WM_CM_S%d", screen_number);
GdkAtom atom = gdk_atom_intern (name, FALSE);
g_free (name);
return atom;
}
static void
init_monitor_geometry (GdkX11Monitor *monitor,
int x, int y, int width, int height)
@ -1078,9 +1061,8 @@ _gdk_x11_screen_setup (GdkScreen *screen)
{
GdkX11Screen *x11_screen = GDK_X11_SCREEN (screen);
x11_screen->cm_selection_atom = make_cm_atom (x11_screen->screen_num);
gdk_display_request_selection_notification (x11_screen->display,
x11_screen->cm_selection_atom);
gdk_x11_xatom_to_atom_for_display (x11_screen->display, get_cm_atom (x11_screen)));
x11_screen->is_composited = check_is_composited (x11_screen->display, x11_screen);
}
@ -1097,6 +1079,7 @@ init_randr_support (GdkScreen *screen)
{
GdkX11Screen *x11_screen = GDK_X11_SCREEN (screen);
/* NB: This is also needed for XSettings, so don't remove. */
XSelectInput (GDK_SCREEN_XDISPLAY (screen),
x11_screen->xroot_window,
StructureNotifyMask);
@ -1195,10 +1178,8 @@ _gdk_x11_screen_process_owner_change (GdkScreen *screen,
#ifdef HAVE_XFIXES
XFixesSelectionNotifyEvent *selection_event = (XFixesSelectionNotifyEvent *)event;
GdkX11Screen *x11_screen = GDK_X11_SCREEN (screen);
Atom xcm_selection_atom = gdk_x11_atom_to_xatom_for_display (x11_screen->display,
x11_screen->cm_selection_atom);
if (selection_event->selection == xcm_selection_atom)
if (selection_event->selection == get_cm_atom (x11_screen))
{
gboolean composited = selection_event->owner != None;
@ -1329,97 +1310,35 @@ gdk_x11_screen_get_window_stack (GdkScreen *screen)
return ret;
}
static gboolean
check_transform (const gchar *xsettings_name,
GType src_type,
GType dest_type)
{
if (!g_value_type_transformable (src_type, dest_type))
{
g_warning ("Cannot transform xsetting %s of type %s to type %s\n",
xsettings_name,
g_type_name (src_type),
g_type_name (dest_type));
return FALSE;
}
else
return TRUE;
}
static gboolean
gdk_x11_screen_get_setting (GdkScreen *screen,
const gchar *name,
GValue *value)
{
GdkX11Screen *x11_screen = GDK_X11_SCREEN (screen);
const char *xsettings_name = NULL;
XSettingsResult result;
XSettingsSetting *setting = NULL;
gboolean success = FALSE;
GValue tmp_val = G_VALUE_INIT;
const GValue *setting;
xsettings_name = gdk_to_xsettings_name (name);
if (!xsettings_name)
if (x11_screen->xsettings == NULL)
goto out;
setting = g_hash_table_lookup (x11_screen->xsettings, name);
if (setting == NULL)
goto out;
result = xsettings_client_get_setting (x11_screen->xsettings_client,
xsettings_name, &setting);
if (result != XSETTINGS_SUCCESS)
goto out;
switch (setting->type)
if (!g_value_type_transformable (G_VALUE_TYPE (setting), G_VALUE_TYPE (value)))
{
case XSETTINGS_TYPE_INT:
if (check_transform (xsettings_name, G_TYPE_INT, G_VALUE_TYPE (value)))
{
g_value_init (&tmp_val, G_TYPE_INT);
g_value_set_int (&tmp_val, setting->data.v_int);
g_value_transform (&tmp_val, value);
success = TRUE;
}
break;
case XSETTINGS_TYPE_STRING:
if (check_transform (xsettings_name, G_TYPE_STRING, G_VALUE_TYPE (value)))
{
g_value_init (&tmp_val, G_TYPE_STRING);
g_value_set_string (&tmp_val, setting->data.v_string);
g_value_transform (&tmp_val, value);
success = TRUE;
}
break;
case XSETTINGS_TYPE_COLOR:
if (!check_transform (xsettings_name, GDK_TYPE_RGBA, G_VALUE_TYPE (value)))
{
GdkRGBA rgba;
g_value_init (&tmp_val, GDK_TYPE_RGBA);
rgba.red = setting->data.v_color.red / 65535.0;
rgba.green = setting->data.v_color.green / 65535.0;
rgba.blue = setting->data.v_color.blue / 65535.0;
rgba.alpha = setting->data.v_color.alpha / 65535.0;
g_value_set_boxed (&tmp_val, &rgba);
g_value_transform (&tmp_val, value);
success = TRUE;
}
break;
g_warning ("Cannot transform xsetting %s of type %s to type %s\n",
name,
g_type_name (G_VALUE_TYPE (setting)),
g_type_name (G_VALUE_TYPE (value)));
goto out;
}
g_value_unset (&tmp_val);
g_value_transform (setting, value);
return TRUE;
out:
if (setting)
xsettings_setting_free (setting);
if (success)
return TRUE;
else
return _gdk_x11_get_xft_setting (screen, name, value);
return _gdk_x11_get_xft_setting (screen, name, value);
}
static void
@ -1614,138 +1533,6 @@ gdk_x11_screen_supports_net_wm_hint (GdkScreen *screen,
return FALSE;
}
static void
refcounted_grab_server (Display *xdisplay)
{
GdkDisplay *display = gdk_x11_lookup_xdisplay (xdisplay);
gdk_x11_display_grab (display);
}
static void
refcounted_ungrab_server (Display *xdisplay)
{
GdkDisplay *display = gdk_x11_lookup_xdisplay (xdisplay);
gdk_x11_display_ungrab (display);
}
static GdkFilterReturn
gdk_xsettings_client_event_filter (GdkXEvent *xevent,
GdkEvent *event,
gpointer data)
{
GdkX11Screen *screen = data;
if (xsettings_client_process_event (screen->xsettings_client, (XEvent *)xevent))
return GDK_FILTER_REMOVE;
else
return GDK_FILTER_CONTINUE;
}
static Bool
gdk_xsettings_watch_cb (Window window,
Bool is_start,
long mask,
void *cb_data)
{
GdkWindow *gdkwin;
GdkScreen *screen = cb_data;
gdkwin = gdk_x11_window_lookup_for_display (gdk_screen_get_display (screen), window);
if (is_start)
{
if (gdkwin)
g_object_ref (gdkwin);
else
{
gdkwin = gdk_x11_window_foreign_new_for_display (gdk_screen_get_display (screen), window);
/* gdk_window_foreign_new_for_display() can fail and return NULL if the
* window has already been destroyed.
*/
if (!gdkwin)
return False;
}
gdk_window_add_filter (gdkwin, gdk_xsettings_client_event_filter, screen);
}
else
{
if (!gdkwin)
{
/* gdkwin should not be NULL here, since if starting the watch succeeded
* we have a reference on the window. It might mean that the caller didn't
* remove the watch when it got a DestroyNotify event. Or maybe the
* caller ignored the return value when starting the watch failed.
*/
g_warning ("gdk_xsettings_watch_cb(): Couldn't find window to unwatch");
return False;
}
gdk_window_remove_filter (gdkwin, gdk_xsettings_client_event_filter, screen);
g_object_unref (gdkwin);
}
return True;
}
static void
gdk_xsettings_notify_cb (const char *name,
XSettingsAction action,
XSettingsSetting *setting,
void *data)
{
GdkEvent new_event;
GdkScreen *screen = data;
GdkX11Screen *x11_screen = data;
if (x11_screen->xsettings_in_init)
return;
new_event.type = GDK_SETTING;
new_event.setting.window = gdk_screen_get_root_window (screen);
new_event.setting.send_event = FALSE;
new_event.setting.name = (char*) gdk_from_xsettings_name (name);
if (!new_event.setting.name)
return;
switch (action)
{
case XSETTINGS_ACTION_NEW:
new_event.setting.action = GDK_SETTING_ACTION_NEW;
break;
case XSETTINGS_ACTION_CHANGED:
new_event.setting.action = GDK_SETTING_ACTION_CHANGED;
break;
case XSETTINGS_ACTION_DELETED:
new_event.setting.action = GDK_SETTING_ACTION_DELETED;
break;
}
gdk_event_put (&new_event);
}
void
_gdk_x11_screen_init_events (GdkScreen *screen)
{
GdkX11Screen *x11_screen = GDK_X11_SCREEN (screen);
/* Keep a flag to avoid extra notifies that we don't need
*/
x11_screen->xsettings_in_init = TRUE;
x11_screen->xsettings_client = xsettings_client_new_with_grab_funcs (x11_screen->xdisplay,
x11_screen->screen_num,
gdk_xsettings_notify_cb,
gdk_xsettings_watch_cb,
screen,
refcounted_grab_server,
refcounted_ungrab_server);
x11_screen->xsettings_in_init = FALSE;
}
/**
* gdk_x11_screen_get_window_manager_name:
* @screen: (type GdkX11Screen): a #GdkScreen

View File

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

View File

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

View File

@ -32,6 +32,7 @@
#include "gdkvisualprivate.h"
#include "gdkinternals.h"
#include "gdkdeviceprivate.h"
#include "gdkframeclockprivate.h"
#include "gdkasync.h"
#include "gdkeventsource.h"
#include "gdkdisplay-x11.h"
@ -110,14 +111,14 @@ static void gdk_window_x11_set_background (GdkWindow *window,
static void gdk_window_impl_x11_finalize (GObject *object);
#define WINDOW_IS_TOPLEVEL_OR_FOREIGN(window) \
(GDK_WINDOW_TYPE (window) != GDK_WINDOW_CHILD && \
GDK_WINDOW_TYPE (window) != GDK_WINDOW_OFFSCREEN)
#define WINDOW_IS_TOPLEVEL_OR_FOREIGN(window) \
(GDK_WINDOW_TYPE (window) == GDK_WINDOW_TOPLEVEL || \
GDK_WINDOW_TYPE (window) == GDK_WINDOW_TEMP || \
GDK_WINDOW_TYPE (window) == GDK_WINDOW_FOREIGN)
#define WINDOW_IS_TOPLEVEL(window) \
(GDK_WINDOW_TYPE (window) != GDK_WINDOW_CHILD && \
GDK_WINDOW_TYPE (window) != GDK_WINDOW_FOREIGN && \
GDK_WINDOW_TYPE (window) != GDK_WINDOW_OFFSCREEN)
#define WINDOW_IS_TOPLEVEL(window) \
(GDK_WINDOW_TYPE (window) == GDK_WINDOW_TOPLEVEL || \
GDK_WINDOW_TYPE (window) == GDK_WINDOW_TEMP)
/* Return whether time1 is considered later than time2 as far as xserver
* time is concerned. Accounts for wraparound.
@ -199,6 +200,234 @@ _gdk_x11_window_update_size (GdkWindowImplX11 *impl)
}
}
static void
set_sync_counter(Display *display,
XSyncCounter counter,
gint64 value)
{
XSyncValue sync_value;
XSyncIntsToValue(&sync_value,
value & G_GINT64_CONSTANT(0xFFFFFFFF),
value >> 32);
XSyncSetCounter(display, counter, sync_value);
}
static void
window_pre_damage (GdkWindow *window)
{
GdkWindow *toplevel_window = gdk_window_get_toplevel (window);
GdkWindowImplX11 *impl;
if (!toplevel_window || !WINDOW_IS_TOPLEVEL (toplevel_window))
return;
impl = GDK_WINDOW_IMPL_X11 (toplevel_window->impl);
if (impl->toplevel->in_frame &&
impl->toplevel->current_counter_value % 2 == 0)
{
impl->toplevel->current_counter_value += 1;
set_sync_counter(GDK_WINDOW_XDISPLAY (impl->wrapper),
impl->toplevel->extended_update_counter,
impl->toplevel->current_counter_value);
}
}
static void
on_surface_changed (void *data)
{
GdkWindow *window = data;
window_pre_damage (window);
}
/* We want to know when cairo drawing causes damage to the window,
* so we engage in the _NET_WM_FRAME_DRAWN protocol with the
* window only when there actually is drawing. To do that we use
* a technique (hack) suggested by Uli Schlachter - if we set
* a dummy "mime data" on the cairo surface (this facility is
* used to attach JPEG data to an imager), then cairo wil flush
* and remove the mime data before making any changes to the window.
*/
static void
hook_surface_changed (GdkWindow *window)
{
GdkWindowImplX11 *impl = GDK_WINDOW_IMPL_X11 (window->impl);
if (impl->cairo_surface)
cairo_surface_set_mime_data (impl->cairo_surface,
"x-gdk/change-notify",
(unsigned char *)"X",
1,
on_surface_changed,
window);
}
static void
unhook_surface_changed (GdkWindow *window)
{
GdkWindowImplX11 *impl = GDK_WINDOW_IMPL_X11 (window->impl);
if (impl->cairo_surface)
cairo_surface_set_mime_data (impl->cairo_surface,
"x-gdk/change-notify",
NULL, 0,
NULL, NULL);
}
static void
gdk_x11_window_predict_presentation_time (GdkWindow *window)
{
GdkWindowImplX11 *impl = GDK_WINDOW_IMPL_X11 (window->impl);
GdkFrameClock *clock;
GdkFrameTimings *timings;
gint64 presentation_time;
gint64 refresh_interval;
if (!WINDOW_IS_TOPLEVEL (window))
return;
clock = gdk_window_get_frame_clock (window);
timings = gdk_frame_clock_get_current_timings (clock);
gdk_frame_clock_get_refresh_info (clock,
timings->frame_time,
&refresh_interval, &presentation_time);
if (presentation_time != 0)
{
if (timings->slept_before)
{
presentation_time += refresh_interval;
}
else
{
if (presentation_time < timings->frame_time + refresh_interval / 2)
presentation_time += refresh_interval;
}
}
else
{
if (timings->slept_before)
presentation_time = timings->frame_time + refresh_interval + refresh_interval / 2;
else
presentation_time = timings->frame_time + refresh_interval;
}
if (presentation_time < impl->toplevel->throttled_presentation_time)
presentation_time = impl->toplevel->throttled_presentation_time;
timings->predicted_presentation_time = presentation_time;
}
static void
gdk_x11_window_begin_frame (GdkWindow *window)
{
GdkWindowImplX11 *impl;
g_return_if_fail (GDK_IS_WINDOW (window));
impl = GDK_WINDOW_IMPL_X11 (window->impl);
if (!WINDOW_IS_TOPLEVEL (window) ||
impl->toplevel->extended_update_counter == None)
return;
impl->toplevel->in_frame = TRUE;
if (impl->toplevel->configure_counter_value != 0 &&
impl->toplevel->configure_counter_value_is_extended)
{
impl->toplevel->current_counter_value = impl->toplevel->configure_counter_value;
if ((impl->toplevel->current_counter_value % 2) == 1)
impl->toplevel->current_counter_value += 1;
impl->toplevel->configure_counter_value = 0;
window_pre_damage (window);
}
else
{
hook_surface_changed (window);
}
}
static void
gdk_x11_window_end_frame (GdkWindow *window)
{
GdkFrameClock *clock;
GdkFrameTimings *timings;
GdkWindowImplX11 *impl;
g_return_if_fail (GDK_IS_WINDOW (window));
impl = GDK_WINDOW_IMPL_X11 (window->impl);
if (!WINDOW_IS_TOPLEVEL (window) ||
impl->toplevel->extended_update_counter == None ||
!impl->toplevel->in_frame)
return;
clock = gdk_window_get_frame_clock (window);
timings = gdk_frame_clock_get_current_timings (clock);
impl->toplevel->in_frame = FALSE;
if (impl->toplevel->current_counter_value % 2 == 1)
{
#ifdef G_ENABLE_DEBUG
if ((_gdk_debug_flags & GDK_DEBUG_FRAMES) != 0)
{
XImage *image = XGetImage (GDK_WINDOW_XDISPLAY (window),
GDK_WINDOW_XID (window),
0, 0, 1, 1,
(1 << 24) - 1,
ZPixmap);
XDestroyImage (image);
}
#endif /* G_ENABLE_DEBUG */
/* An increment of 3 means that the frame was not drawn as fast as possible,
* but rather at a particular time. This can trigger different handling from
* the compositor.
*/
if (timings->slept_before)
impl->toplevel->current_counter_value += 3;
else
impl->toplevel->current_counter_value += 1;
set_sync_counter(GDK_WINDOW_XDISPLAY (impl->wrapper),
impl->toplevel->extended_update_counter,
impl->toplevel->current_counter_value);
if (gdk_x11_screen_supports_net_wm_hint (gdk_window_get_screen (window),
gdk_atom_intern_static_string ("_NET_WM_FRAME_DRAWN")))
{
impl->toplevel->frame_pending = TRUE;
_gdk_frame_clock_freeze (gdk_window_get_frame_clock (window));
timings->cookie = impl->toplevel->current_counter_value;
}
}
unhook_surface_changed (window);
if (impl->toplevel->configure_counter_value != 0 &&
!impl->toplevel->configure_counter_value_is_extended)
{
set_sync_counter (GDK_WINDOW_XDISPLAY (window),
impl->toplevel->update_counter,
impl->toplevel->configure_counter_value);
impl->toplevel->configure_counter_value = 0;
}
if (!impl->toplevel->frame_pending)
timings->complete = TRUE;
}
/*****************************************************
* X11 specific implementations of generic functions *
*****************************************************/
@ -242,6 +471,9 @@ gdk_x11_ref_cairo_surface (GdkWindow *window)
if (impl->cairo_surface)
cairo_surface_set_user_data (impl->cairo_surface, &gdk_x11_cairo_key,
impl, gdk_x11_cairo_surface_destroy);
if (WINDOW_IS_TOPLEVEL (window) && impl->toplevel->in_frame)
hook_surface_changed (window);
}
else
cairo_surface_reference (impl->cairo_surface);
@ -261,6 +493,9 @@ gdk_window_impl_x11_finalize (GObject *object)
wrapper = impl->wrapper;
if (WINDOW_IS_TOPLEVEL (wrapper) && impl->toplevel->in_frame)
unhook_surface_changed (wrapper);
_gdk_x11_window_grab_check_destroy (wrapper);
if (!GDK_WINDOW_DESTROYED (wrapper))
@ -602,29 +837,32 @@ ensure_sync_counter (GdkWindow *window)
{
GdkDisplay *display = GDK_WINDOW_DISPLAY (window);
GdkToplevelX11 *toplevel = _gdk_x11_window_get_toplevel (window);
GdkWindowImplX11 *impl = GDK_WINDOW_IMPL_X11 (window->impl);
if (toplevel && impl->use_synchronized_configure &&
if (toplevel &&
toplevel->update_counter == None &&
GDK_X11_DISPLAY (display)->use_sync)
{
Display *xdisplay = GDK_DISPLAY_XDISPLAY (display);
XSyncValue value;
Atom atom;
XID counters[2];
XSyncIntToValue (&value, 0);
toplevel->update_counter = XSyncCreateCounter (xdisplay, value);
toplevel->extended_update_counter = XSyncCreateCounter (xdisplay, value);
atom = gdk_x11_get_xatom_by_name_for_display (display,
"_NET_WM_SYNC_REQUEST_COUNTER");
counters[0] = toplevel->update_counter;
counters[1] = toplevel->extended_update_counter;
XChangeProperty (xdisplay, GDK_WINDOW_XID (window),
atom, XA_CARDINAL,
32, PropModeReplace,
(guchar *)&toplevel->update_counter, 1);
(guchar *)counters, 2);
XSyncIntToValue (&toplevel->current_counter_value, 0);
toplevel->current_counter_value = 0;
}
}
#endif
@ -698,6 +936,44 @@ setup_toplevel_window (GdkWindow *window,
gdk_x11_window_set_user_time (window, GDK_X11_DISPLAY (x11_screen->display)->user_time);
ensure_sync_counter (window);
/* Start off in a frozen state - we'll finish this when we first paint */
gdk_x11_window_begin_frame (window);
}
static void
on_frame_clock_before_paint (GdkFrameClock *clock,
GdkWindow *window)
{
gdk_x11_window_predict_presentation_time (window);
gdk_x11_window_begin_frame (window);
}
static void
on_frame_clock_after_paint (GdkFrameClock *clock,
GdkWindow *window)
{
gdk_x11_window_end_frame (window);
}
static void
connect_frame_clock (GdkWindow *window)
{
GdkWindowImplX11 *impl;
impl = GDK_WINDOW_IMPL_X11 (window->impl);
if (WINDOW_IS_TOPLEVEL (window) && !impl->frame_clock_connected)
{
GdkFrameClock *frame_clock = gdk_window_get_frame_clock (window);
g_signal_connect (frame_clock, "before-paint",
G_CALLBACK (on_frame_clock_before_paint), window);
g_signal_connect (frame_clock, "after-paint",
G_CALLBACK (on_frame_clock_after_paint), window);
impl->frame_clock_connected = TRUE;
}
}
void
@ -856,6 +1132,11 @@ _gdk_x11_display_create_window_impl (GdkDisplay *display,
gdk_x11_event_source_select_events ((GdkEventSource *) display_x11->event_source,
GDK_WINDOW_XID (window), event_mask,
StructureNotifyMask | PropertyChangeMask);
connect_frame_clock (window);
if (GDK_WINDOW_TYPE (window) != GDK_WINDOW_CHILD)
gdk_window_freeze_toplevel_updates_libgtk_only (window);
}
static GdkEventMask
@ -1001,7 +1282,7 @@ gdk_toplevel_x11_free_contents (GdkDisplay *display,
toplevel->update_counter);
toplevel->update_counter = None;
XSyncIntToValue (&toplevel->current_counter_value, 0);
toplevel->current_counter_value = 0;
}
#endif
}
@ -1473,6 +1754,8 @@ window_x11_move (GdkWindow *window,
if (GDK_WINDOW_TYPE (window) == GDK_WINDOW_CHILD)
{
/* The window isn't actually damaged, but it's parent is */
window_pre_damage (window);
_gdk_x11_window_move_resize_child (window,
x, y,
window->width, window->height);
@ -1502,6 +1785,8 @@ window_x11_resize (GdkWindow *window,
if (height < 1)
height = 1;
window_pre_damage (window);
if (GDK_WINDOW_TYPE (window) == GDK_WINDOW_CHILD)
{
_gdk_x11_window_move_resize_child (window,
@ -1545,6 +1830,8 @@ window_x11_move_resize (GdkWindow *window,
if (height < 1)
height = 1;
window_pre_damage (window);
if (GDK_WINDOW_TYPE (window) == GDK_WINDOW_CHILD)
{
_gdk_x11_window_move_resize_child (window, x, y, width, height);
@ -1614,6 +1901,12 @@ gdk_window_x11_reparent (GdkWindow *window,
_gdk_x11_window_tmp_reset_parent_bg (window);
_gdk_x11_window_tmp_reset_bg (window, TRUE);
if (WINDOW_IS_TOPLEVEL (window))
connect_frame_clock (window);
else
/* old frame clock was disposed, our signal handlers removed */
impl->frame_clock_connected = FALSE;
if (GDK_WINDOW_TYPE (new_parent) == GDK_WINDOW_FOREIGN)
new_parent = gdk_screen_get_root_window (GDK_WINDOW_SCREEN (window));
@ -4817,59 +5110,6 @@ gdk_x11_window_begin_move_drag (GdkWindow *window,
emulate_move_drag (window, device, button, root_x, root_y, timestamp);
}
static void
gdk_x11_window_enable_synchronized_configure (GdkWindow *window)
{
GdkWindowImplX11 *impl;
if (!GDK_IS_WINDOW_IMPL_X11 (window->impl))
return;
impl = GDK_WINDOW_IMPL_X11 (window->impl);
if (!impl->use_synchronized_configure)
{
/* This basically means you want to do fancy X specific stuff, so
ensure we have a native window */
gdk_window_ensure_native (window);
impl->use_synchronized_configure = TRUE;
ensure_sync_counter (window);
}
}
static void
gdk_x11_window_configure_finished (GdkWindow *window)
{
GdkWindowImplX11 *impl;
if (!WINDOW_IS_TOPLEVEL (window))
return;
impl = GDK_WINDOW_IMPL_X11 (window->impl);
if (!impl->use_synchronized_configure)
return;
#ifdef HAVE_XSYNC
if (!GDK_WINDOW_DESTROYED (window))
{
GdkDisplay *display = GDK_WINDOW_DISPLAY (window);
GdkToplevelX11 *toplevel = _gdk_x11_window_get_toplevel (window);
if (toplevel && toplevel->update_counter != None &&
GDK_X11_DISPLAY (display)->use_sync &&
!XSyncValueIsZero (toplevel->current_counter_value))
{
XSyncSetCounter (GDK_WINDOW_XDISPLAY (window),
toplevel->update_counter,
toplevel->current_counter_value);
XSyncIntToValue (&toplevel->current_counter_value, 0);
}
}
#endif
}
static gboolean
gdk_x11_window_beep (GdkWindow *window)
{
@ -5141,8 +5381,6 @@ gdk_window_impl_x11_class_init (GdkWindowImplX11Class *klass)
impl_class->set_functions = gdk_x11_window_set_functions;
impl_class->begin_resize_drag = gdk_x11_window_begin_resize_drag;
impl_class->begin_move_drag = gdk_x11_window_begin_move_drag;
impl_class->enable_synchronized_configure = gdk_x11_window_enable_synchronized_configure;
impl_class->configure_finished = gdk_x11_window_configure_finished;
impl_class->set_opacity = gdk_x11_window_set_opacity;
impl_class->set_composited = gdk_x11_window_set_composited;
impl_class->destroy_notify = gdk_x11_window_destroy_notify;

View File

@ -72,7 +72,7 @@ struct _GdkWindowImplX11
guint no_bg : 1; /* Set when the window background is temporarily
* unset during resizing and scaling */
guint override_redirect : 1;
guint use_synchronized_configure : 1;
guint frame_clock_connected : 1;
cairo_surface_t *cairo_surface;
@ -126,7 +126,17 @@ struct _GdkToplevelX11
/* Set if the WM is presenting us as focused, i.e. with active decorations
*/
guint have_focused : 1;
guint in_frame : 1;
/* If we're expecting a response from the compositor after painting a frame */
guint frame_pending : 1;
/* Whether pending_counter_value/configure_counter_value are updates
* to the extended update counter */
guint pending_counter_value_is_extended : 1;
guint configure_counter_value_is_extended : 1;
gulong map_serial; /* Serial of last transition from unmapped */
cairo_surface_t *icon_pixmap;
@ -144,11 +154,17 @@ struct _GdkToplevelX11
#ifdef HAVE_XSYNC
XID update_counter;
XSyncValue pending_counter_value; /* latest _NET_WM_SYNC_REQUEST value received */
XSyncValue current_counter_value; /* Latest _NET_WM_SYNC_REQUEST value received
* where we have also seen the corresponding
* ConfigureNotify
*/
XID extended_update_counter;
gint64 pending_counter_value; /* latest _NET_WM_SYNC_REQUEST value received */
gint64 configure_counter_value; /* Latest _NET_WM_SYNC_REQUEST value received
* where we have also seen the corresponding
* ConfigureNotify
*/
gint64 current_counter_value;
/* After a _NET_WM_FRAME_DRAWN message, this is the soonest that we think
* frame after will be presented */
gint64 throttled_presentation_time;
#endif
};

View File

@ -55,6 +55,7 @@ GType gdk_x11_window_get_type (void);
Window gdk_x11_window_get_xid (GdkWindow *window);
void gdk_x11_window_set_user_time (GdkWindow *window,
guint32 timestamp);
GDK_AVAILABLE_IN_3_4
void gdk_x11_window_set_utf8_property (GdkWindow *window,
const gchar *name,
const gchar *value);

View File

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

View File

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

View File

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

View File

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

View File

@ -137,37 +137,37 @@ libgtka11y_la_LIBADD = \
libgtka11y_la_LDFLAGS = \
$(LDFLAGS)
dist-hook: ../../build/win32/vs9/libgail.vcproj ../../build/win32/vs10/libgail.vcxproj ../../build/win32/vs10/libgail.vcxproj.filters
dist-hook: $(top_builddir)/build/win32/vs9/gtka11y.vcproj $(top_builddir)/build/win32/vs10/gtka11y.vcxproj $(top_builddir)/build/win32/vs10/gtka11y.vcxproj.filters
../../build/win32/vs9/libgail.vcproj: ../../build/win32/vs9/libgail.vcprojin
for F in $(libgail_la_SOURCES); do \
$(top_builddir)/build/win32/vs9/gtka11y.vcproj: $(top_srcdir)/build/win32/vs9/gtka11y.vcprojin
for F in $(gtka11y_c_sources); do \
case $$F in \
*.c) echo ' <File RelativePath="..\..\..\gtk\a11y\'$$F'" />' \
;; \
esac; \
done >libgail.sourcefiles
$(CPP) -P - <$(top_srcdir)/build/win32/vs9/libgail.vcprojin >$@
rm libgail.sourcefiles
done >gtka11y.sourcefiles
$(CPP) -P - <$(top_srcdir)/build/win32/vs9/gtka11y.vcprojin >$@
rm gtka11y.sourcefiles
../../build/win32/vs10/libgail.vcxproj: ../../build/win32/vs10/libgail.vcxprojin
for F in $(libgail_la_SOURCES); do \
$(top_builddir)/build/win32/vs10/gtka11y.vcxproj: $(top_srcdir)/build/win32/vs10/gtka11y.vcxprojin
for F in $(gtka11y_c_sources); do \
case $$F in \
*.c) echo ' <ClCompile Include="..\..\..\gtk\a11y\'$$F'" />' \
;; \
esac; \
done >libgail.vs10.sourcefiles
$(CPP) -P - <$(top_srcdir)/build/win32/vs10/libgail.vcxprojin >$@
rm libgail.vs10.sourcefiles
done >gtka11y.vs10.sourcefiles
$(CPP) -P - <$(top_srcdir)/build/win32/vs10/gtka11y.vcxprojin >$@
rm gtka11y.vs10.sourcefiles
../../build/win32/vs10/libgail.vcxproj.filters: ../../build/win32/vs10/libgail.vcxproj.filtersin
for F in $(libgail_la_SOURCES); do \
$(top_builddir)/build/win32/vs10/gtka11y.vcxproj.filters: $(top_srcdir)/build/win32/vs10/gtka11y.vcxproj.filtersin
for F in $(gtka11y_c_sources); do \
case $$F in \
*.c) echo ' <ClCompile Include="..\..\..\gtk\a11y\'$$F'"><Filter>Source Files</Filter></ClCompile>' \
;; \
esac; \
done >libgail.vs10.sourcefiles.filters
$(CPP) -P - <$(top_srcdir)/build/win32/vs10/libgail.vcxproj.filtersin >$@
rm libgail.vs10.sourcefiles.filters
done >gtka11y.vs10.sourcefiles.filters
$(CPP) -P - <$(top_srcdir)/build/win32/vs10/gtka11y.vcxproj.filtersin >$@
rm gtka11y.vs10.sourcefiles.filters
-include $(top_srcdir)/git.mk

View File

@ -412,7 +412,7 @@ _gtk_cell_accessible_state_changed (GtkCellAccessible *cell,
atk_object_notify_state_change (object,
state_map[i].atk_state,
!state_map[i].invert);
if (added & state_map[i].renderer_state)
if (removed & state_map[i].renderer_state)
atk_object_notify_state_change (object,
state_map[i].atk_state,
state_map[i].invert);

View File

@ -117,6 +117,11 @@ gtk_text_view_accessible_change_buffer (GtkTextViewAccessible *accessible,
if (old_buffer)
{
g_signal_handlers_disconnect_matched (old_buffer, G_SIGNAL_MATCH_DATA, 0, 0, NULL, NULL, accessible);
g_signal_emit_by_name (accessible,
"text-changed::delete",
0,
gtk_text_buffer_get_char_count (old_buffer));
}
if (new_buffer)
@ -124,6 +129,11 @@ gtk_text_view_accessible_change_buffer (GtkTextViewAccessible *accessible,
g_signal_connect_after (new_buffer, "insert-text", G_CALLBACK (insert_text_cb), accessible);
g_signal_connect (new_buffer, "delete-range", G_CALLBACK (delete_range_cb), accessible);
g_signal_connect_after (new_buffer, "mark-set", G_CALLBACK (mark_set_cb), accessible);
g_signal_emit_by_name (accessible,
"text-changed::insert",
0,
gtk_text_buffer_get_char_count (new_buffer));
}
}

View File

@ -1896,6 +1896,7 @@ _gtk_tree_view_accessible_add_state (GtkTreeView *treeview,
GtkCellRendererState state)
{
GtkTreeViewAccessible *accessible;
GtkTreeViewColumn *single_column;
AtkObject *obj;
guint i;
@ -1907,36 +1908,38 @@ _gtk_tree_view_accessible_add_state (GtkTreeView *treeview,
if (state == GTK_CELL_RENDERER_FOCUSED)
{
GtkTreeViewColumn *focus_column;
focus_column = get_effective_focus_column (treeview, _gtk_tree_view_get_focus_column (treeview));
if (focus_column)
{
GtkCellAccessible *cell;
cell = peek_cell (accessible, tree, node, focus_column);
if (cell != NULL)
_gtk_cell_accessible_state_changed (cell, 0, state);
else
cell = create_cell (treeview, accessible, tree, node, focus_column);
g_signal_emit_by_name (accessible, "active-descendant-changed", cell);
}
return;
single_column = get_effective_focus_column (treeview, _gtk_tree_view_get_focus_column (treeview));
}
else if (state == GTK_CELL_RENDERER_EXPANDED ||
state == GTK_CELL_RENDERER_EXPANDABLE)
{
single_column = gtk_tree_view_get_expander_column (treeview);
}
else
single_column = NULL;
for (i = 0; i < gtk_tree_view_get_n_columns (treeview); i++)
if (single_column)
{
GtkCellAccessible *cell = peek_cell (accessible,
tree, node,
gtk_tree_view_get_column (treeview, i));
single_column);
if (cell == NULL)
continue;
if (cell != NULL)
_gtk_cell_accessible_state_changed (cell, state, 0);
}
else
{
for (i = 0; i < gtk_tree_view_get_n_columns (treeview); i++)
{
GtkCellAccessible *cell = peek_cell (accessible,
tree, node,
gtk_tree_view_get_column (treeview, i));
_gtk_cell_accessible_state_changed (cell, state, 0);
if (cell == NULL)
continue;
_gtk_cell_accessible_state_changed (cell, state, 0);
}
}
if (state == GTK_CELL_RENDERER_SELECTED)
@ -1950,6 +1953,7 @@ _gtk_tree_view_accessible_remove_state (GtkTreeView *treeview,
GtkCellRendererState state)
{
GtkTreeViewAccessible *accessible;
GtkTreeViewColumn *single_column;
AtkObject *obj;
guint i;
@ -1961,33 +1965,38 @@ _gtk_tree_view_accessible_remove_state (GtkTreeView *treeview,
if (state == GTK_CELL_RENDERER_FOCUSED)
{
GtkTreeViewColumn *focus_column;
focus_column = get_effective_focus_column (treeview, _gtk_tree_view_get_focus_column (treeview));
if (focus_column)
{
GtkCellAccessible *cell = peek_cell (accessible,
tree, node,
focus_column);
if (cell != NULL)
_gtk_cell_accessible_state_changed (cell, 0, state);
}
return;
single_column = get_effective_focus_column (treeview, _gtk_tree_view_get_focus_column (treeview));
}
else if (state == GTK_CELL_RENDERER_EXPANDED ||
state == GTK_CELL_RENDERER_EXPANDABLE)
{
single_column = gtk_tree_view_get_expander_column (treeview);
}
else
single_column = NULL;
for (i = 0; i < gtk_tree_view_get_n_columns (treeview); i++)
if (single_column)
{
GtkCellAccessible *cell = peek_cell (accessible,
tree, node,
gtk_tree_view_get_column (treeview, i));
single_column);
if (cell == NULL)
continue;
if (cell != NULL)
_gtk_cell_accessible_state_changed (cell, 0, state);
}
else
{
for (i = 0; i < gtk_tree_view_get_n_columns (treeview); i++)
{
GtkCellAccessible *cell = peek_cell (accessible,
tree, node,
gtk_tree_view_get_column (treeview, i));
_gtk_cell_accessible_state_changed (cell, 0, state);
if (cell == NULL)
continue;
_gtk_cell_accessible_state_changed (cell, 0, state);
}
}
if (state == GTK_CELL_RENDERER_SELECTED)

View File

@ -1255,8 +1255,14 @@ gtk_icon_info_get_embedded_rect
gtk_icon_info_get_filename
gtk_icon_info_get_type
gtk_icon_info_load_icon
gtk_icon_info_load_icon_async
gtk_icon_info_load_icon_finish
gtk_icon_info_load_symbolic
gtk_icon_info_load_symbolic_async
gtk_icon_info_load_symbolic_finish
gtk_icon_info_load_symbolic_for_context
gtk_icon_info_load_symbolic_for_context_async
gtk_icon_info_load_symbolic_for_context_finish
gtk_icon_info_load_symbolic_for_style
gtk_icon_info_new_for_pixbuf
gtk_icon_info_set_raw_coordinates
@ -2665,6 +2671,7 @@ gtk_style_context_get_border_color
gtk_style_context_get_color
gtk_style_context_get_direction
gtk_style_context_get_font
gtk_style_context_get_frame_clock
gtk_style_context_get_junction_sides
gtk_style_context_get_margin
gtk_style_context_get_padding
@ -2700,6 +2707,7 @@ gtk_style_context_save
gtk_style_context_scroll_animations
gtk_style_context_set_background
gtk_style_context_set_direction
gtk_style_context_set_frame_clock
gtk_style_context_set_junction_sides
gtk_style_context_set_parent
gtk_style_context_set_path
@ -3664,6 +3672,7 @@ gtk_widget_add_accelerator
gtk_widget_add_device_events
gtk_widget_add_events
gtk_widget_add_mnemonic_label
gtk_widget_add_tick_callback
gtk_widget_can_activate_accel
gtk_widget_child_focus
gtk_widget_child_notify
@ -3705,6 +3714,7 @@ gtk_widget_get_direction
gtk_widget_get_display
gtk_widget_get_double_buffered
gtk_widget_get_events
gtk_widget_get_frame_clock
gtk_widget_get_halign
gtk_widget_get_has_tooltip
gtk_widget_get_has_window
@ -3843,6 +3853,7 @@ gtk_widget_region_intersect
gtk_widget_register_window
gtk_widget_remove_accelerator
gtk_widget_remove_mnemonic_label
gtk_widget_remove_tick_callback
gtk_widget_render_icon
gtk_widget_render_icon_pixbuf
gtk_widget_reparent

View File

@ -836,12 +836,13 @@ _gtk_accel_label_class_get_accelerator_label (GtkAccelLabelClass *klass,
#endif
seen_mod = TRUE;
}
if (seen_mod)
g_string_append (gstring, klass->mod_separator);
ch = gdk_keyval_to_unicode (accelerator_key);
if (ch && ch < 0x80 && (g_unichar_isgraph (ch) || ch == ' '))
{
if (seen_mod)
g_string_append (gstring, klass->mod_separator);
switch (ch)
{
case ' ':
@ -862,6 +863,9 @@ _gtk_accel_label_class_get_accelerator_label (GtkAccelLabelClass *klass,
tmp = gdk_keyval_name (gdk_keyval_to_lower (accelerator_key));
if (tmp != NULL)
{
if (seen_mod)
g_string_append (gstring, klass->mod_separator);
if (tmp[0] != 0 && tmp[1] == 0)
g_string_append_c (gstring, g_ascii_toupper (tmp[0]));
else

View File

@ -1418,16 +1418,22 @@ gtk_application_inhibit (GtkApplication *application,
GVariant *res;
GError *error = NULL;
guint cookie;
guint xid;
guint xid = 0;
g_return_val_if_fail (GTK_IS_APPLICATION (application), 0);
g_return_val_if_fail (!g_application_get_is_remote (G_APPLICATION (application)), 0);
g_return_val_if_fail (application->priv->sm_proxy != NULL, 0);
if (window != NULL)
xid = GDK_WINDOW_XID (gtk_widget_get_window (GTK_WIDGET (window)));
else
xid = 0;
{
GdkWindow *gdkwindow;
gdkwindow = gtk_widget_get_window (GTK_WIDGET (window));
if (gdkwindow == NULL)
g_warning ("Inhibit called with an unrealized window");
else
xid = GDK_WINDOW_XID (gdkwindow);
}
res = g_dbus_proxy_call_sync (application->priv->sm_proxy,
"Inhibit",

View File

@ -151,6 +151,8 @@ static void gtk_box_size_allocate (GtkWidget *widget,
static void gtk_box_compute_expand (GtkWidget *widget,
gboolean *hexpand,
gboolean *vexpand);
static void gtk_box_direction_changed (GtkWidget *widget,
GtkTextDirection previous_direction);
static void gtk_box_set_property (GObject *object,
guint prop_id,
@ -220,6 +222,7 @@ gtk_box_class_init (GtkBoxClass *class)
widget_class->get_preferred_height_for_width = gtk_box_get_preferred_height_for_width;
widget_class->get_preferred_width_for_height = gtk_box_get_preferred_width_for_height;
widget_class->compute_expand = gtk_box_compute_expand;
widget_class->direction_changed = gtk_box_direction_changed;
container_class->add = gtk_box_add;
container_class->remove = gtk_box_remove;
@ -855,7 +858,9 @@ count_widget_position (GtkWidget *widget,
if (count->widget == widget)
count->found = TRUE;
else if (!count->found)
else if (count->found)
count->after++;
else
count->before++;
}
@ -877,7 +882,11 @@ gtk_box_get_visible_position (GtkBox *box,
if (!count.found)
return -1;
return count.before;
if (box->priv->orientation == GTK_ORIENTATION_HORIZONTAL &&
gtk_widget_get_direction (GTK_WIDGET (box)) == GTK_TEXT_DIR_RTL)
return count.after;
else
return count.before;
}
static GtkWidgetPath *
@ -886,9 +895,11 @@ gtk_box_get_path_for_child (GtkContainer *container,
{
GtkWidgetPath *path, *sibling_path;
GtkBox *box;
GtkBoxPrivate *private;
GList *list, *children;
box = GTK_BOX (container);
private = box->priv;
path = _gtk_widget_create_path (GTK_WIDGET (container));
@ -900,6 +911,9 @@ gtk_box_get_path_for_child (GtkContainer *container,
/* get_children works in visible order */
children = gtk_container_get_children (container);
if (private->orientation == GTK_ORIENTATION_HORIZONTAL &&
gtk_widget_get_direction (GTK_WIDGET (box)) == GTK_TEXT_DIR_RTL)
children = g_list_reverse (children);
for (list = children; list; list = list->next)
{
@ -940,6 +954,13 @@ gtk_box_invalidate_order (GtkBox *box)
NULL);
}
static void
gtk_box_direction_changed (GtkWidget *widget,
GtkTextDirection previous_direction)
{
gtk_box_invalidate_order (GTK_BOX (widget));
}
static void
box_child_visibility_notify_cb (GObject *obj,
GParamSpec *pspec,

View File

@ -429,7 +429,7 @@ gtk_cell_renderer_class_init (GtkCellRendererClass *class)
g_type_class_add_private (class, sizeof (GtkCellRendererPrivate));
_gtk_cell_renderer_class_set_accessible_type (class, GTK_TYPE_RENDERER_CELL_ACCESSIBLE);
gtk_cell_renderer_class_set_accessible_type (class, GTK_TYPE_RENDERER_CELL_ACCESSIBLE);
}
static void
@ -1781,8 +1781,8 @@ gtk_cell_renderer_get_state (GtkCellRenderer *cell,
return state;
}
/*
* _gtk_cell_renderer_class_set_accessible_type:
/**
* gtk_cell_renderer_class_set_accessible_type:
* @renderer_class: class to set the accessible type for
* @type: The object type that implements the accessible for @widget_class.
* The type must be a subtype of #GtkRendererCellAccessible
@ -1795,8 +1795,8 @@ gtk_cell_renderer_get_state (GtkCellRenderer *cell,
* renderers.
**/
void
_gtk_cell_renderer_class_set_accessible_type (GtkCellRendererClass *renderer_class,
GType type)
gtk_cell_renderer_class_set_accessible_type (GtkCellRendererClass *renderer_class,
GType type)
{
GtkCellRendererClassPrivate *priv;

View File

@ -269,7 +269,7 @@ GtkStateFlags gtk_cell_renderer_get_state (GtkCellRenderer *cell,
GtkWidget *widget,
GtkCellRendererState cell_state);
void _gtk_cell_renderer_class_set_accessible_type
void gtk_cell_renderer_class_set_accessible_type
(GtkCellRendererClass *renderer_class,
GType type);
GType _gtk_cell_renderer_get_accessible_type

View File

@ -251,7 +251,7 @@ gtk_cell_renderer_pixbuf_class_init (GtkCellRendererPixbufClass *class)
g_type_class_add_private (object_class, sizeof (GtkCellRendererPixbufPrivate));
_gtk_cell_renderer_class_set_accessible_type (cell_class, GTK_TYPE_IMAGE_CELL_ACCESSIBLE);
gtk_cell_renderer_class_set_accessible_type (cell_class, GTK_TYPE_IMAGE_CELL_ACCESSIBLE);
}
static void

View File

@ -731,7 +731,7 @@ gtk_cell_renderer_text_class_init (GtkCellRendererTextClass *class)
g_type_class_add_private (object_class, sizeof (GtkCellRendererTextPrivate));
_gtk_cell_renderer_class_set_accessible_type (cell_class, GTK_TYPE_TEXT_CELL_ACCESSIBLE);
gtk_cell_renderer_class_set_accessible_type (cell_class, GTK_TYPE_TEXT_CELL_ACCESSIBLE);
}
static void

View File

@ -196,7 +196,7 @@ gtk_cell_renderer_toggle_class_init (GtkCellRendererToggleClass *class)
g_type_class_add_private (object_class, sizeof (GtkCellRendererTogglePrivate));
_gtk_cell_renderer_class_set_accessible_type (cell_class, GTK_TYPE_BOOLEAN_CELL_ACCESSIBLE);
gtk_cell_renderer_class_set_accessible_type (cell_class, GTK_TYPE_BOOLEAN_CELL_ACCESSIBLE);
}
static void

View File

@ -228,7 +228,7 @@ swatch_draw (GtkWidget *widget,
g_object_unref (pixbuf);
}
gtk_icon_info_free (icon_info);
g_object_unref (icon_info);
}
cairo_restore (cr);

View File

@ -468,6 +468,8 @@ static void gtk_combo_box_get_preferred_height_for_width (GtkWidget *widg
gint *natural_size);
static GtkWidgetPath *gtk_combo_box_get_path_for_child (GtkContainer *container,
GtkWidget *child);
static void gtk_combo_box_direction_changed (GtkWidget *widget,
GtkTextDirection previous_direction);
G_DEFINE_TYPE_WITH_CODE (GtkComboBox, gtk_combo_box, GTK_TYPE_BIN,
G_IMPLEMENT_INTERFACE (GTK_TYPE_CELL_LAYOUT,
@ -508,6 +510,7 @@ gtk_combo_box_class_init (GtkComboBoxClass *klass)
widget_class->get_preferred_height_for_width = gtk_combo_box_get_preferred_height_for_width;
widget_class->get_preferred_width_for_height = gtk_combo_box_get_preferred_width_for_height;
widget_class->destroy = gtk_combo_box_destroy;
widget_class->direction_changed = gtk_combo_box_direction_changed;
object_class = (GObjectClass *)klass;
object_class->constructor = gtk_combo_box_constructor;
@ -1379,6 +1382,27 @@ gtk_combo_box_button_state_flags_changed (GtkWidget *widget,
gtk_widget_queue_draw (widget);
}
static void
gtk_combo_box_invalidate_order_foreach (GtkWidget *widget)
{
_gtk_widget_invalidate_style_context (widget, GTK_CSS_CHANGE_POSITION | GTK_CSS_CHANGE_SIBLING_POSITION);
}
static void
gtk_combo_box_invalidate_order (GtkComboBox *combo_box)
{
gtk_container_forall (GTK_CONTAINER (combo_box),
(GtkCallback) gtk_combo_box_invalidate_order_foreach,
NULL);
}
static void
gtk_combo_box_direction_changed (GtkWidget *widget,
GtkTextDirection previous_direction)
{
gtk_combo_box_invalidate_order (GTK_COMBO_BOX (widget));
}
static GtkWidgetPath *
gtk_combo_box_get_path_for_child (GtkContainer *container,
GtkWidget *child)
@ -1407,6 +1431,9 @@ gtk_combo_box_get_path_for_child (GtkContainer *container,
if (widget && gtk_widget_get_visible (widget))
visible_children = g_list_prepend (visible_children, widget);
if (gtk_widget_get_direction (GTK_WIDGET (container)) == GTK_TEXT_DIR_RTL)
visible_children = g_list_reverse (visible_children);
pos = 0;
for (l = visible_children; l; l = l->next)

View File

@ -236,6 +236,9 @@ struct _GtkContainerPrivate
{
GtkWidget *focus_child;
guint resize_handler;
GdkFrameClock *resize_clock;
guint border_width : 16;
guint has_focus_chain : 1;
@ -344,8 +347,6 @@ static const gchar vadjustment_key[] = "gtk-vadjustment";
static guint vadjustment_key_id = 0;
static const gchar hadjustment_key[] = "gtk-hadjustment";
static guint hadjustment_key_id = 0;
static GSList *container_resize_queue = NULL;
static GSList *container_restyle_queue = NULL;
static guint container_signals[LAST_SIGNAL] = { 0 };
static GtkWidgetClass *parent_class = NULL;
extern GParamSpecPool *_gtk_widget_child_property_pool;
@ -1357,11 +1358,9 @@ gtk_container_destroy (GtkWidget *widget)
if (priv->resize_pending)
_gtk_container_dequeue_resize_handler (container);
if (priv->restyle_pending)
{
container_restyle_queue = g_slist_remove (container_restyle_queue, container);
priv->restyle_pending = FALSE;
}
priv->restyle_pending = FALSE;
if (priv->focus_child)
{
@ -1553,7 +1552,6 @@ _gtk_container_dequeue_resize_handler (GtkContainer *container)
g_return_if_fail (GTK_IS_CONTAINER (container));
g_return_if_fail (container->priv->resize_pending);
container_resize_queue = g_slist_remove (container_resize_queue, container);
container->priv->resize_pending = FALSE;
}
@ -1630,12 +1628,10 @@ gtk_container_set_reallocate_redraws (GtkContainer *container,
container->priv->reallocate_redraws = needs_redraws ? TRUE : FALSE;
}
static gboolean
gtk_container_idle_sizer (gpointer data)
static void
gtk_container_idle_sizer (GdkFrameClock *clock,
GtkContainer *container)
{
GSList *slist;
gint64 current_time;
/* We validate the style contexts in a single loop before even trying
* to handle resizes instead of doing validations inline.
* This is mostly necessary for compatibility reasons with old code,
@ -1646,16 +1642,13 @@ gtk_container_idle_sizer (gpointer data)
* sane values. So the result of an invalid style context will never be
* a program crash, but only a wrong layout or rendering.
*/
current_time = g_get_monotonic_time ();
slist = container_restyle_queue;
container_restyle_queue = NULL;
while (slist)
if (container->priv->restyle_pending)
{
GSList *next = slist->next;
GtkContainer *container = slist->data;
GtkBitmask *empty;
gint64 current_time;
empty = _gtk_bitmask_new ();
current_time = g_get_monotonic_time ();
container->priv->restyle_pending = FALSE;
_gtk_style_context_validate (gtk_widget_get_style_context (GTK_WIDGET (container)),
@ -1663,8 +1656,6 @@ gtk_container_idle_sizer (gpointer data)
0,
empty);
g_slist_free_1 (slist);
slist = next;
_gtk_bitmask_free (empty);
}
@ -1674,35 +1665,52 @@ gtk_container_idle_sizer (gpointer data)
* than trying to explicitely work around them with some extra flags,
* since it doesn't cause any actual harm.
*/
while (container_resize_queue)
if (container->priv->resize_pending)
{
GtkContainer *container;
slist = container_resize_queue;
container_resize_queue = slist->next;
container = slist->data;
g_slist_free_1 (slist);
container->priv->resize_pending = FALSE;
gtk_container_check_resize (container);
}
gdk_window_process_all_updates ();
return container_resize_queue != NULL || container_restyle_queue != NULL;
if (!container->priv->restyle_pending && !container->priv->resize_pending)
{
_gtk_container_stop_idle_sizer (container);
}
else
{
gdk_frame_clock_request_phase (clock,
GDK_FRAME_CLOCK_PHASE_LAYOUT);
}
}
static void
gtk_container_start_idle_sizer (GtkContainer *container)
{
/* already started */
if (container_resize_queue != NULL ||
container_restyle_queue != NULL)
GdkFrameClock *clock;
if (container->priv->resize_handler != 0)
return;
gdk_threads_add_idle_full (GTK_PRIORITY_RESIZE,
gtk_container_idle_sizer,
NULL, NULL);
clock = gtk_widget_get_frame_clock (GTK_WIDGET (container));
if (clock == NULL)
return;
container->priv->resize_clock = clock;
container->priv->resize_handler = g_signal_connect (clock, "layout",
G_CALLBACK (gtk_container_idle_sizer), container);
gdk_frame_clock_request_phase (clock,
GDK_FRAME_CLOCK_PHASE_LAYOUT);
}
void
_gtk_container_stop_idle_sizer (GtkContainer *container)
{
if (container->priv->resize_handler == 0)
return;
g_signal_handler_disconnect (container->priv->resize_clock,
container->priv->resize_handler);
container->priv->resize_handler = 0;
container->priv->resize_clock = NULL;
}
static void
@ -1725,7 +1733,6 @@ gtk_container_queue_resize_handler (GtkContainer *container)
{
container->priv->resize_pending = TRUE;
gtk_container_start_idle_sizer (container);
container_resize_queue = g_slist_prepend (container_resize_queue, container);
}
break;
@ -1780,8 +1787,6 @@ _gtk_container_queue_restyle (GtkContainer *container)
return;
gtk_container_start_idle_sizer (container);
container_restyle_queue = g_slist_prepend (container_restyle_queue, container);
priv->restyle_pending = TRUE;
}
@ -1815,6 +1820,13 @@ _gtk_container_resize_invalidate (GtkContainer *container)
_gtk_container_queue_resize_internal (container, TRUE);
}
void
_gtk_container_maybe_start_idle_sizer (GtkContainer *container)
{
if (container->priv->restyle_pending || container->priv->resize_pending)
gtk_container_start_idle_sizer (container);
}
void
gtk_container_check_resize (GtkContainer *container)
{

View File

@ -39,6 +39,8 @@ GList * _gtk_container_focus_sort (GtkContainer *container,
GtkWidget *old_focus);
gboolean _gtk_container_get_reallocate_redraws (GtkContainer *container);
void _gtk_container_stop_idle_sizer (GtkContainer *container);
void _gtk_container_maybe_start_idle_sizer (GtkContainer *container);
G_END_DECLS

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