Commit Graph

52766 Commits

Author SHA1 Message Date
Chun-wei Fan
b9a3d3ef05 MSVC Projects: Build widget factory demo
Build the widget factory demo in the Visual Studio projects, and install
the icon files that it needs.
2022-05-31 15:32:44 +08:00
Chun-wei Fan
e7efafcae7 MSVC Projects: Generate widget factory GResource sources
Add rules in the helper NMake Makefiles to generate the GResource
sources for gtk3-widget-factory.  This prepares for us to add project
files to build that demo program.
2022-05-31 15:32:31 +08:00
Chun-wei Fan
3c3b7e183a build: Don't generate icon browser MSVC project
The source listing is not likely to change for this one, so clean up the
build files a bit, and make the gtk3-icon-browser MSVC project a
complete one instead of a template.
2022-05-31 15:32:13 +08:00
Chun-wei Fan
67a3208d58 build: Do not generate gtk3-demo-application MSVC project
Clean up build files a bit, as there is not much point using a
'dist-hook' to generate the Visual Studio project file for this program.
2022-05-31 15:32:13 +08:00
Chun-wei Fan
6f7e3cb3f6 MSVC projects: Generate demo sources in IntDir
This is to reduce the pollution in the souce directories.  Update the
include paths accordingly.
2022-05-31 15:32:13 +08:00
Chun-wei Fan
b58ba13a9e win32/generate-msvc.mak: Split up rule to regenerate demos.h.win32
This way, we can re-use items when we want to support generating project
files from the templates, such as building with project files directly
from a GIT checkout, or when we add sources and want to quickly add them
into the project files.
2022-05-31 15:32:13 +08:00
Chun-wei Fan
3292e9d67b MSVC Projects: Rename Makefile variable
Use VS1X instead of VS10 in the variable names in the NMake Makefiles,
since the VS2010 MSBuild Visual Studio project files really apply to all Visual
Studio versions at or after VS2010.

Also use variable substitution here to ease future maintenance.
2022-05-31 15:32:13 +08:00
Chun-wei Fan
c8db9e1690 Merge branch 'msvcproj-nmake-robust' into 'gtk-3-24'
MSVC projects: Make helper NMake Makefiles more robust and faster

See merge request GNOME/gtk!4780
2022-05-31 07:28:16 +00:00
Chun-wei Fan
8d4c2708a0 Visual Studio projects: Speed up build
...for the sources and header generating phase, so that we can reduce
the number of times that we generate the source file lists that we need.
2022-05-31 14:56:31 +08:00
Chun-wei Fan
1f5bfb40ff Merge branch 'msvcproj-py3-req' into 'gtk-3-24'
Visual Studio projects: Make it clear that Python 3.x is now recommended

See merge request GNOME/gtk!4779
2022-05-31 06:28:43 +00:00
Chun-wei Fan
896a420da4 README.win32: Mention the possibility of using Python-2.7.x
It is probably still possible with older GLib and GObject-Introspection
versions, but it is certainly not recommended with the advent of Meson.

One will not be able to re-generate demos.h.win32 (for
enabling/disabling the Font Features Demo) with Python 2.7.x-Python 3.x
or PERL must be used.
2022-05-31 14:13:23 +08:00
Chun-wei Fan
86270ec423 MSVC projects: Make helper NMake Makefiles more robust
Append the detected Visual Studio version and target arch to the various
NMake Makefile snippets we generate on the fly, so that if multiple
items access the helper NMake Makefiles at the same time, we will be
much less prone to trouble.

This is not 100% fool-proof, but should make things much more robust when
attempting to build via different Visual Studio versions and configs at
the same time.
2022-05-31 10:46:36 +08:00
Chun-wei Fan
a61ed05e32 Visual Studio projects: Make it clear Python 3.x is now required
The scripts that are used during the build to generate the sources now
do require Python 3.x to work, so make this clear to people.

In the Visual Studio projects, update the default Python installation to
correspond with Python 3.7.x or later, which is the lowest supported
version series of Python at this point.
2022-05-31 10:46:10 +08:00
Matthias Clasen
2152e76ec4 Merge branch 'gtk-3-24-fix-gimp' into 'gtk-3-24'
macos: Fix to offscreen window selections in Gimp 2.99

See merge request GNOME/gtk!4305
2022-05-27 21:26:51 +00:00
Lukas Oberhuber
16ded6835c macos: Fix to offscreen window selections in Gimp 2.99 2022-05-27 21:26:50 +00:00
Matthias Clasen
75d3095a6b Merge branch 'wayland-cursor-size' into 'gtk-3-24'
wayland/cursor: Sanity check cursor image size

See merge request GNOME/gtk!4381
2022-05-27 11:02:22 +00:00
Emmanuele Bassi
1cf58407be Merge branch 'dont-dist-gresource-srcs' into 'gtk-3-24'
Don't dist some generated sources

See merge request GNOME/gtk!4738
2022-05-25 13:22:23 +00:00
Luca Bacci
02b40fd64d Merge branch 'msvcproj-nmake-install' into 'gtk-3-24'
Cleanup Visual Studio project files a bit

See merge request GNOME/gtk!4734
2022-05-25 08:23:58 +00:00
Matthias Clasen
eb4d736a4d Merge branch 'quartz-redraw-pixbuf' into 'gtk-3-24'
quartz: Use CALayer to back GdkQuartzView

See merge request GNOME/gtk!4728
2022-05-21 13:15:21 +00:00
John Ralls
b94ed34f9c [quartz] Manage implementation surface lifetime.
To prevent leaking cairo surfaces while persisting the parts that
don't need to be redrawn.
2022-05-19 17:02:55 -07:00
John Ralls
df94d0168d Use a CVPixelBuffer instead of a CGImage. 2022-05-19 16:58:39 -07:00
John Ralls
be60902805 Draw window to image_surface and apply to CALayer. 2022-05-19 16:52:59 -07:00
John Ralls
2d3eb0c6a7 [quartz] Draw needs_display_region if available 2022-05-19 16:46:35 -07:00
John Ralls
8182c978db quartz: add CVDisplayLink based frame clock
This uses CVDisplayLink to drive the GdkFrameClock. A GdkWindow
can register a frame callback to thaw their frame clock as necessary
based on the next notification from CVDisplayLink.

CVDisplayLink notifies us on a high-priority thread. We use the same
NSEventas gdkeventloop-quartz.c to wakeup the main loop. This is done
so that we don’t pathologically wake up the select thread to then
continue notifying the main loop.

We use an embedded GList node in the GdkWindowImplQuartz so that we
can avoid allocating any lists or arrays for pending frame callbacks.
Compare this to the same design in GdkWindow for children.
2022-05-19 16:29:01 -07:00
Chun-wei Fan
ff847c43ad Drop win32/Makefile.msvc-introspection
We no longer use the autotools 'dist-hook' to generate the items that we
need to build introspection with the Visual Studio projects, so drop the
autotools files and bits that we had to support this.  So, for
introspection on Visual Studio via the project files, it is purely via
NMake at this point.
2022-05-19 11:33:25 +08:00
Chun-wei Fan
fe548537f9 build: Write introspection rules directly in NMake Makefiles
By doing so, we can drop the autotools rules that we use to generate the
file lists and rules for building introspection via NMake Makefiles for
Visual Studio builds via the project files.
2022-05-19 11:22:12 +08:00
Chun-wei Fan
c05d21c9af gtk: Build: Prefix deprecated source listings
...with gtk_, so that they are distinguished from other names and is
more clear to people.
2022-05-19 10:58:01 +08:00
Chun-wei Fan
574bd57f72 gtk-sources.inc: Split base sources in two parts
Otherwise, NMake will choke when creating a filelist from it.  This
U1095 error is nasty! :|
2022-05-19 10:58:01 +08:00
Chun-wei Fan
7c2e4fa3b2 gdk: Move source listings to gdk-sources.inc
We want to share those listings with other non-autools build systems.
2022-05-19 10:57:55 +08:00
Chun-wei Fan
f324c650a7 gdk/: Rename gdk-pub-headers.h to gdk-sources.inc
We want to make the sources listings for libgdk shared as well.
2022-05-19 09:41:48 +08:00
Chun-wei Fan
6e193eb141 win32/vs10/*.vcxproj: Consolidate project configs
Like what was done in the *.vcxprojin templates, consolidate project configs
that are repetitive, and use the 'Condition=' directive to distinguish between
configuration and/or target platform differences.
2022-05-19 09:41:48 +08:00
Chun-wei Fan
3bd1ed8c31 win32/vs10/*.vcxprojin: Consolidate project configs
We can use MSBuild "Condition" items to consolidate the configs, so that we can
clean up the project files a bit.
2022-05-19 09:41:48 +08:00
Chun-wei Fan
4c2cd5910f Visual Studio projects: Make property sheets shared
...for Visual Studio 2010 and later, since we used to copy them and
merely update the value of $(VSVer) during 'make dist' as needed.

Instead of doing that, move the property sheets for Visual Studio 2010,
which is the base version that we use, into a directory of its own, and
make the Visual Studio 2010~2022 projects look for them in that
directory, and set VSVer according to the toolset version identified by
each of the project files.

The ARM64-specific property sheet needed for VS2017 and the VS2008
property sheets will remain as they are.
2022-05-19 09:41:48 +08:00
Chun-wei Fan
ac25eeb34a Visual Studio projects: Drop another property sheet
We can again use MSBuild trickery to do what was done in the dropped
property sheet.

Unfortunately, like the last commit, I couldn't figure out a way do to
something similar in the VS2008 project files... :|
2022-05-19 09:41:48 +08:00
Chun-wei Fan
c50cd6f95c Visual Studio projects: Drop unneeded property sheet
We can use MSBuild trickery to do what the property sheet intends to
cover
2022-05-19 09:41:48 +08:00
Chun-wei Fan
f4811ea1f1 build: Drop gtk3-install.[vsprops|props]
They are not used anymore, and are removed at this point.
2022-05-19 09:41:48 +08:00
Chun-wei Fan
455686a57f Visual Studio Projects: Use NMake Makefile to copy build results
... and so stop using gtk3-install.[vsprops|props], and remove that
property sheet from the dist and dist the NMake Makefile for the
purpose.

Also remove win32/vs10/gtk3-install.vcxproj.filters as well, as it is
no longer needed.

We will remove the gtk3-install.[vsprops|[props][.in] in a subsequent
commit.
2022-05-19 09:41:48 +08:00
Chun-wei Fan
3b5b8bbebe win32/: Add install-msvc.mak
This is an NMake Makefile that will replace the property sheets in the
Visual Studio project files so that we can call it from the project
files to "install" the binaries and introspection files that were built,
along with the header files and other data files, which aims to be
easier to maintain for the current approach.

This will also be expanded upon to optionally build the translation
files and make the installed files more in-line with what are done in
the Meson build files, where there could be compatibility problems with
older Visual Studio toolchains.
2022-05-19 09:41:48 +08:00
Chun-wei Fan
331090c148 win32/create-lists-msvc.mak: Pull in the newly-split source listings
We are going to use them to help us to use an NMake Makefile to copy the
built files and headers in our "install" directory.
2022-05-19 09:41:48 +08:00
Chun-wei Fan
8477c0e765 win32/create-lists-msvc.mak: Clean up a bit
We now have the theme CSS source listings in gtk/gtk-sources.inc, so
make use of it.  No need to repeat items from there.
2022-05-19 09:41:48 +08:00
Chun-wei Fan
ea3b599d7f libgail-util: Split out sources listings
We want to share the listings with other non-autotools build systems.
2022-05-19 09:41:48 +08:00
Chun-wei Fan
aa83f9fb42 gtk/Makefile.am: Split out more items
... to gtk-sources.inc, since we will want to share the items in the lists that
were split out.
2022-05-19 09:41:48 +08:00
Chun-wei Fan
e21a578cb1 gtk: Rename gtk-mkenums-headers.mak to gtk-sources.inc
We want to reuse more sources listings in other non-autotools build
systems.
2022-05-19 09:41:48 +08:00
Chun-wei Fan
def4b6c95f gdk/broadway: Split out sources listing
This way, we can reuse these lists in other non-autotools Makefile-based
build systems.
2022-05-19 09:41:47 +08:00
Chun-wei Fan
cb494e0ad8 gdk/win32: Split out sources listing
This way, we can reuse this list in other non-autotools Makefile-based
build systems.
2022-05-19 09:41:47 +08:00
Matthias Clasen
4e3a3f0553 3.24.34 2022-05-18 14:52:03 -04:00
Chun-wei Fan
0264e2d6a6 demos: Fix distcheck
Make sure that we remove the files generated by glib-compile-resources
during distclean.
2022-05-18 17:48:16 +08:00
Chun-wei Fan
bac9ff22f5 gtk/Makefile.am: Fix distcheck
Apparently distcheck expects the generated gtk.gresource.xml to be
there.
2022-05-18 15:32:21 +08:00
Chun-wei Fan
dc9d60fc9a win32: Update Visual Studio projects
This is a follow-up commit so that the generated GResources sources for
the demos are included in the project files.

As a result, don't include demo_resources.c when regenerating
gtk3-demo.vc[x]proj for toggling on or off the font features demo, as it
would have been there.
2022-05-17 23:50:24 +08:00
Chun-wei Fan
472c40fd3f demos: Don't dist the generated GResource sources
The Visual Studio projects have support for generating these, especially
that the encoded string that result from them may become too big for the
Visual Studio compiler to handle (such as for gtk3-demo) and we are normally
supposed to generate the GResources sources for all builds, as the
generated code depends on the compiler being used).
2022-05-17 18:44:58 +08:00