Compare commits
219 Commits
wip/mir-as
...
wip/style-
Author | SHA1 | Date | |
---|---|---|---|
|
d405a5bbe3 | ||
|
eed1831caf | ||
|
6c7e5039c7 | ||
|
5047d503f3 | ||
|
2a13869236 | ||
|
64fd964703 | ||
|
a3e37abb38 | ||
|
a3fbf29f17 | ||
|
8c3f04e754 | ||
|
5d3aa54a8a | ||
|
f74a75ae7e | ||
|
6b26464fbb | ||
|
06745bc0aa | ||
|
3276bae057 | ||
|
c55c18c23e | ||
|
f718bc9bc9 | ||
|
a4e827e4bf | ||
|
45bed11272 | ||
|
e1716611bd | ||
|
888304b172 | ||
|
28497075c7 | ||
|
0504328bd8 | ||
|
eec9a74304 | ||
|
042117b7bf | ||
|
39c0ba59bc | ||
|
8718e9296e | ||
|
3d4bcf55a5 | ||
|
d184088cae | ||
|
d0b7ccc2c5 | ||
|
66dfdc3cc2 | ||
|
88a12fe777 | ||
|
825ef99e17 | ||
|
fbe4f94519 | ||
|
7717b0d556 | ||
|
01c941b046 | ||
|
b6383f1507 | ||
|
5438e53f5c | ||
|
6f10ed2711 | ||
|
37a1e6cacb | ||
|
92f6771564 | ||
|
3b2cf140a2 | ||
|
ccdcff9456 | ||
|
af2ac29faf | ||
|
cb3393f001 | ||
|
73e6a05e38 | ||
|
579c7f80a0 | ||
|
8ec72dd2b1 | ||
|
bd71849e26 | ||
|
c1c68b409c | ||
|
3eaaf12c04 | ||
|
cf7851b948 | ||
|
5e71a49d5a | ||
|
fb4073a60a | ||
|
e629aba1a2 | ||
|
cf64f8a76a | ||
|
83d8f9b929 | ||
|
4d7369d1a8 | ||
|
0b2bded110 | ||
|
e355eff2bc | ||
|
5e503c54c2 | ||
|
32e8c39ffd | ||
|
9e1187135e | ||
|
eee5947365 | ||
|
908bb6955e | ||
|
655c75cab7 | ||
|
79e916f6af | ||
|
7b6c68adc6 | ||
|
de2e3c2c2e | ||
|
60dc478739 | ||
|
0438df6d14 | ||
|
c5f2f86ff9 | ||
|
603b49814f | ||
|
09e6fab1c9 | ||
|
75dab1662c | ||
|
645664f20d | ||
|
4b9029c4cc | ||
|
13b5e0b6e6 | ||
|
f97780c574 | ||
|
bbb3f6a2db | ||
|
bae4450698 | ||
|
09f83fff52 | ||
|
383d5b137b | ||
|
25d9412c7e | ||
|
93776ef88d | ||
|
11cf6763a3 | ||
|
188424cb7c | ||
|
6e65f4235d | ||
|
e4335c62a1 | ||
|
94f412622e | ||
|
5bf640d344 | ||
|
afe0d5ff00 | ||
|
d314625754 | ||
|
57171ad7e6 | ||
|
f85093a136 | ||
|
6bf9d13041 | ||
|
380ca9bc56 | ||
|
4c33645a7a | ||
|
116cc53105 | ||
|
95dc96901e | ||
|
b8c0cfb663 | ||
|
4b92654b29 | ||
|
87c564ecf3 | ||
|
f3b40ff55f | ||
|
f63fe9b760 | ||
|
040c31a32c | ||
|
909d0caa6b | ||
|
1c9fdc1f1f | ||
|
c80c7f7792 | ||
|
7ecdaaacb2 | ||
|
641d4c4e3d | ||
|
53e07d3c0f | ||
|
c304f2ea68 | ||
|
2679f889a5 | ||
|
6962dcffac | ||
|
d3c96f9f17 | ||
|
bb5574c0bd | ||
|
e26fddc544 | ||
|
8753ef6129 | ||
|
f875daeb6d | ||
|
b8925253b6 | ||
|
059fc5d3d9 | ||
|
c85c3510e7 | ||
|
732af31424 | ||
|
e3bf31886a | ||
|
59629fa9e2 | ||
|
9c7a5f5efa | ||
|
50c4fdbacd | ||
|
fe8f6f60dc | ||
|
80dbb4186a | ||
|
50076ed95b | ||
|
05893dd5a9 | ||
|
11233678d9 | ||
|
230aa99967 | ||
|
7193043f7d | ||
|
98da1ddfe2 | ||
|
9b970d5f22 | ||
|
cbb2938587 | ||
|
d9786d74db | ||
|
246c172e1e | ||
|
605f2efa73 | ||
|
a78b18c565 | ||
|
eba317228f | ||
|
d21dc0d91c | ||
|
c71e213134 | ||
|
2cd835c076 | ||
|
90f94de615 | ||
|
442fd63ea6 | ||
|
0c09d44509 | ||
|
06952d807a | ||
|
965da578c4 | ||
|
8a3a617475 | ||
|
fd1eb92508 | ||
|
c0123ae20e | ||
|
06150aa517 | ||
|
b88584e7ba | ||
|
daabd0436f | ||
|
447a439145 | ||
|
79712f843c | ||
|
addcb7137e | ||
|
51f5433170 | ||
|
0d1395d07f | ||
|
e7f2239cbb | ||
|
4634fd81ba | ||
|
dde77704ed | ||
|
f71831c780 | ||
|
bef9d05812 | ||
|
3a5d15358e | ||
|
c1ca7986ee | ||
|
16e863ce65 | ||
|
c7f3b93d99 | ||
|
8d6d73e8d9 | ||
|
c64bfa5751 | ||
|
464536b460 | ||
|
d0d41dfeba | ||
|
7d35351c7a | ||
|
a09ff50a1d | ||
|
f95fb6f893 | ||
|
ff4f918a69 | ||
|
44c412ecc7 | ||
|
6b95810aae | ||
|
a7ba57f751 | ||
|
0a37493384 | ||
|
d09f66579b | ||
|
af12993c4b | ||
|
f38081a4a5 | ||
|
38c3600d8b | ||
|
d2aad06513 | ||
|
85380f22f3 | ||
|
fe5f9c560b | ||
|
c2326aa5cf | ||
|
9e3d0651e1 | ||
|
7a1c5845ef | ||
|
2ea3171ff9 | ||
|
5b7233f136 | ||
|
84463b78e5 | ||
|
9fb2d6a6b9 | ||
|
72a501fe15 | ||
|
10a7a89311 | ||
|
c01e37a9a5 | ||
|
6ffba866a6 | ||
|
37ad6e1147 | ||
|
7312c01f62 | ||
|
37697f1817 | ||
|
28846536cb | ||
|
3f0c84f7ad | ||
|
8976e84ded | ||
|
ec2925a5bf | ||
|
1730bb0e81 | ||
|
5a0d1a79c5 | ||
|
6fa4aef811 | ||
|
442adf6359 | ||
|
4744058832 | ||
|
cf94da2ca1 | ||
|
800c712738 | ||
|
1eb3b34bce | ||
|
788478dff9 | ||
|
bd643e0e1a | ||
|
608c25453b | ||
|
f5d96f7110 |
@@ -22,8 +22,8 @@ GTK+ requires the following packages:
|
||||
Simple install procedure
|
||||
========================
|
||||
|
||||
% tar xf gtk+-@GTK_VERSION@.tar.xz # unpack the sources
|
||||
% cd gtk+-@GTK_VERSION@ # change to the toplevel directory
|
||||
% tar xf gtk+-@GTK_VERSION@.tar.xz # unpack the sources
|
||||
% cd gtk+-@GTK_VERSION@ # change to the toplevel directory
|
||||
% ./configure # run the `configure' script
|
||||
% make # build GTK+
|
||||
[ Become root if necessary ]
|
||||
|
25
Makefile.am
@@ -9,11 +9,15 @@ ACLOCAL_AMFLAGS = -I m4 ${ACLOCAL_FLAGS}
|
||||
EXTRA_DIST += \
|
||||
autogen.sh \
|
||||
HACKING \
|
||||
README \
|
||||
README.in \
|
||||
INSTALL \
|
||||
INSTALL.in \
|
||||
NEWS.pre-1-0 \
|
||||
README.commits \
|
||||
README.commits \
|
||||
README.win32 \
|
||||
config.h.win32 \
|
||||
makefile.msc \
|
||||
makefile.msc \
|
||||
gtk-zip.sh.in \
|
||||
sanitize-la.sh \
|
||||
po/README.translators \
|
||||
@@ -26,8 +30,6 @@ MAINTAINERCLEANFILES = \
|
||||
$(srcdir)/m4/gtk-doc.m4 \
|
||||
$(srcdir)/INSTALL \
|
||||
$(srcdir)/README \
|
||||
$(srcdir)/omf.make \
|
||||
$(srcdir)/xmldocs.make \
|
||||
$(srcdir)/gtk-doc.make \
|
||||
$(srcdir)/ChangeLog
|
||||
|
||||
@@ -43,7 +45,6 @@ gdk-x11-3.0.pc gdk-win32-3.0.pc gdk-quartz-3.0.pc gdk-broadway-3.0.pc gdk-waylan
|
||||
|
||||
pkgconfigdir = $(libdir)/pkgconfig
|
||||
pkgconfig_DATA = gdk-3.0.pc gtk+-3.0.pc gail-3.0.pc
|
||||
|
||||
pkgconfig_DATA += ${GDK_BACKENDS:%=gtk+-%-3.0.pc}
|
||||
pkgconfig_DATA += ${GDK_BACKENDS:%=gdk-%-3.0.pc}
|
||||
|
||||
@@ -77,7 +78,7 @@ distclean-local:
|
||||
|
||||
ChangeLog:
|
||||
$(AM_V_GEN) if test -d "$(srcdir)/.git"; then \
|
||||
(GIT_DIR=$(top_srcdir)/.git ./missing --run git log GTK_2_16_0^^.. --stat) | fmt --split-only > $@.tmp \
|
||||
(GIT_DIR=$(top_srcdir)/.git $(top_builddir)/build-aux/missing git log GTK_2_16_0^^.. --stat) | fmt --split-only > $@.tmp \
|
||||
&& mv -f $@.tmp $@ \
|
||||
|| ($(RM) $@.tmp; \
|
||||
echo Failed to generate ChangeLog, your ChangeLog may be outdated >&2; \
|
||||
@@ -88,19 +89,11 @@ ChangeLog:
|
||||
echo A git checkout and git-log is required to generate this file >> $@); \
|
||||
fi
|
||||
|
||||
.PHONY: ChangeLog
|
||||
|
||||
uninstall-local:
|
||||
rm -f $(DESTDIR)$(pkgconfigdir)/gtk+-3.0.pc
|
||||
|
||||
dist-hook:
|
||||
if test -f $(srcdir)/INSTALL.in && test -f $(srcdir)/README.in ; then \
|
||||
CONFIG_FILES="INSTALL:$(srcdir)/INSTALL.in README:$(srcdir)/README.in" \
|
||||
CONFIG_HEADERS= \
|
||||
$(SHELL) config.status \
|
||||
&& cp INSTALL README $(distdir) ; \
|
||||
fi
|
||||
|
||||
.PHONY: ChangeLog
|
||||
|
||||
DISTCHECK_CONFIGURE_FLAGS = \
|
||||
--enable-gtk-doc \
|
||||
--disable-doc-cross-references \
|
||||
|
75
NEWS
@@ -1,3 +1,78 @@
|
||||
Overview of Changes in GTK+ 3.15.2
|
||||
==================================
|
||||
|
||||
* GtkPopoverMenu: A GtkPopover subclass that makes it easy
|
||||
to manually build menu-like popovers which can include
|
||||
arbitrary controls.
|
||||
|
||||
* GtkModelButton: A button widget that is optimized for
|
||||
use inside popovers with a GAction as 'model'.
|
||||
|
||||
* GL support:
|
||||
- Try harder to pick good visuals
|
||||
- Rework the way GL rendering is done in GtkGLArea
|
||||
- Support input events in GtkGLArea
|
||||
- Use shaders
|
||||
- The GDK_GL environment variable can be used for debugging
|
||||
|
||||
* Inspector:
|
||||
- Make picking widgets work in Wayland
|
||||
- Rework search in all pages
|
||||
- Improve space use
|
||||
- Support GL information and debug flags
|
||||
- Shield the inspector window from more debug settings
|
||||
- Hide empty tabs
|
||||
|
||||
* Theming:
|
||||
- Include the HighContrast theme
|
||||
- Add borders to menus in non-composited environments
|
||||
- Load themes from versioned directories like
|
||||
.../themes/Emerald/gtk-3-14/.
|
||||
|
||||
* Wayland:
|
||||
- Make window opacity work
|
||||
- Propagate clipboard owner changes
|
||||
|
||||
* Mir:
|
||||
- Improved event handling
|
||||
- Support cursors
|
||||
- Enable CSD
|
||||
- Better monitor support
|
||||
- Add OpenGL support
|
||||
|
||||
* Deprecations:
|
||||
- gdk_cursor_new
|
||||
- gdk_device_grab_info_libgtk_only
|
||||
- gdk_display_open_default_libgtk_only
|
||||
- gdk_add_option_entries_libgtk_only
|
||||
- gdk_pre_parse_libgtk_only
|
||||
|
||||
* Bugs fixed:
|
||||
687963 Extend warning "Icon '%s' not present in theme" to mention...
|
||||
734140 Gnome apps spam stderr with warnings if Gnome Session Manager...
|
||||
737891 mounting LUKS partition from nautilus takes very long
|
||||
738321 GtkMenu has unnecessary scroll buttons
|
||||
738648 gdk_window_get_content() causes creation/destruction of back...
|
||||
738670 GL Context on NVIDIA
|
||||
738800 Menu border missing in Adwaita when no compositor is running
|
||||
738887 "Cannot commit NULL buffer to xdg_surface" error too pervasive
|
||||
739474 radiobutton: don't consider hidden buttons in the group for focus
|
||||
739750 Fix handling of windows with sizes that aren't a multiple of...
|
||||
739781 Make global GDK libgtk_only functions more private
|
||||
739885 gtk3-3.14.5 - fail to link - undefined reference to `GTK_IS_PLUG'
|
||||
739977 Don't wait for ENTER to initiate search
|
||||
740011 overscroll overlay is opaque in unfocused mode sidebars
|
||||
740346 Mir backend needs support for GdkGLContext
|
||||
|
||||
* Translation updates:
|
||||
Greek
|
||||
Hebrew
|
||||
Kazakh
|
||||
Norwegian bokmål
|
||||
Spanish
|
||||
Swedish
|
||||
|
||||
|
||||
Overview of Changes in GTK+ 3.15.1
|
||||
==================================
|
||||
|
||||
|
@@ -79,6 +79,9 @@ Release notes for 3.16
|
||||
* GTK+ now includes an OpenGL rendering widget. To support GL on various
|
||||
platforms, GTK+ uses libepoxy.
|
||||
|
||||
* GTK+ no longer uses gtk-update-icon-cache during its build. The
|
||||
--enable-gtk2-dependency configure option has been removed.
|
||||
|
||||
Release notes for 3.14
|
||||
======================
|
||||
|
||||
|
@@ -22,10 +22,6 @@ EXTRA_DIST += \
|
||||
gtk3-demo-application.vcxproj.filters \
|
||||
gtk3-icon-browser.vcxproj \
|
||||
gtk3-icon-browser.vcxproj.filters \
|
||||
gtk-inspector.vcxproj \
|
||||
gtk-inspector.vcxprojin \
|
||||
gtk-inspector.vcxproj.filters \
|
||||
gtk-inspector.vcxproj.filtersin \
|
||||
gailutil.vcxproj \
|
||||
gailutil.vcxproj.filters \
|
||||
install.vcxproj \
|
||||
|
@@ -10,8 +10,6 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "broadwayd", "broadwayd.vcxp
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "gdk", "gdk.vcxproj", "{FC5AADB5-95CD-4BF0-BA8B-0C16FE7073F7}"
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "gtk-inspector", "gtk-inspector.vcxproj", "{FC5AADB5-95CD-4BF0-BA8B-0C16FE7073FD}"
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "gtk", "gtk.vcxproj", "{FC5AADB5-95CD-4BF0-BA8B-0C16FE7073F5}"
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "gtk3-demo", "gtk3-demo.vcxproj", "{FC5AADB5-95CD-4BF0-BA8B-0C16FE7073FC}"
|
||||
@@ -110,22 +108,6 @@ Global
|
||||
{FC5AADB5-95CD-4BF0-BA8B-0C16FE7073F7}.Release_Broadway|Win32.Build.0 = Release_Broadway|Win32
|
||||
{FC5AADB5-95CD-4BF0-BA8B-0C16FE7073F7}.Release_Broadway|x64.ActiveCfg = Release_Broadway|x64
|
||||
{FC5AADB5-95CD-4BF0-BA8B-0C16FE7073F7}.Release_Broadway|x64.Build.0 = Release_Broadway|x64
|
||||
{FC5AADB5-95CD-4BF0-BA8B-0C16FE7073FD}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{FC5AADB5-95CD-4BF0-BA8B-0C16FE7073FD}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{FC5AADB5-95CD-4BF0-BA8B-0C16FE7073FD}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{FC5AADB5-95CD-4BF0-BA8B-0C16FE7073FD}.Debug|x64.Build.0 = Debug|x64
|
||||
{FC5AADB5-95CD-4BF0-BA8B-0C16FE7073FD}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{FC5AADB5-95CD-4BF0-BA8B-0C16FE7073FD}.Release|Win32.Build.0 = Release|Win32
|
||||
{FC5AADB5-95CD-4BF0-BA8B-0C16FE7073FD}.Release|x64.ActiveCfg = Release|x64
|
||||
{FC5AADB5-95CD-4BF0-BA8B-0C16FE7073FD}.Release|x64.Build.0 = Release|x64
|
||||
{FC5AADB5-95CD-4BF0-BA8B-0C16FE7073FD}.Debug_Broadway|Win32.ActiveCfg = Debug|Win32
|
||||
{FC5AADB5-95CD-4BF0-BA8B-0C16FE7073FD}.Debug_Broadway|Win32.Build.0 = Debug|Win32
|
||||
{FC5AADB5-95CD-4BF0-BA8B-0C16FE7073FD}.Debug_Broadway|x64.ActiveCfg = Debug|x64
|
||||
{FC5AADB5-95CD-4BF0-BA8B-0C16FE7073FD}.Debug_Broadway|x64.Build.0 = Debug|x64
|
||||
{FC5AADB5-95CD-4BF0-BA8B-0C16FE7073FD}.Release_Broadway|Win32.ActiveCfg = Release|Win32
|
||||
{FC5AADB5-95CD-4BF0-BA8B-0C16FE7073FD}.Release_Broadway|Win32.Build.0 = Release|Win32
|
||||
{FC5AADB5-95CD-4BF0-BA8B-0C16FE7073FD}.Release_Broadway|x64.ActiveCfg = Release|x64
|
||||
{FC5AADB5-95CD-4BF0-BA8B-0C16FE7073FD}.Release_Broadway|x64.Build.0 = Release|x64
|
||||
{FC5AADB5-95CD-4BF0-BA8B-0C16FE7073F5}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{FC5AADB5-95CD-4BF0-BA8B-0C16FE7073F5}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{FC5AADB5-95CD-4BF0-BA8B-0C16FE7073F5}.Debug|x64.ActiveCfg = Debug|x64
|
||||
|
@@ -9,7 +9,7 @@
|
||||
<GtkPrefixDefine>GTK_PREFIX=\"$(GtkDummyPrefix)\"</GtkPrefixDefine>
|
||||
<GdkDefines>GDK_COMPILATION;G_LOG_DOMAIN="Gdk"</GdkDefines>
|
||||
<GtkIncludedImmodulesDefines>INCLUDE_IM_am_et;INCLUDE_IM_cedilla;INCLUDE_IM_cyrillic_translit;INCLUDE_IM_ime;INCLUDE_IM_inuktitut;INCLUDE_IM_ipa;INCLUDE_IM_multipress;INCLUDE_IM_thai;INCLUDE_IM_ti_er;INCLUDE_IM_ti_et;INCLUDE_IM_viqr</GtkIncludedImmodulesDefines>
|
||||
<GtkDefines>GTK_COMPILATION;G_LOG_DOMAIN="Gtk";GTK_HOST="i686-pc-vs$(VSVer)";GTK_PRINT_BACKENDS="file";GTK_PRINT_PREVIEW_COMMAND="undefined-gtk-print-preview-command";$(GtkIncludedImmodulesDefines);GTK_LIBDIR="$(GtkDummyPrefix)/lib";GTK_DATADIR="$(GtkDummyPrefix)/share";GTK_DATA_PREFIX="$(GtkDummyPrefix)";GTK_SYSCONFDIR="$(GtkDummyPrefix)/etc";MULTIPRESS_CONFDIR="$(GtkDummyPrefix)/etc/gtk-$(ApiVersion)";MULTIPRESS_LOCALEDIR="$(GtkDummyPrefix)/share/locale";GTK_VERSION="$(GtkVersion)/etc";GTK_BINARY_VERSION="$(GtkBinaryVersion)/etc";GDK_DISABLE_DEPRECATED;ISOLATION_AWARE_ENABLED</GtkDefines>
|
||||
<GtkDefines>GTK_COMPILATION;G_LOG_DOMAIN="Gtk";GTK_HOST="i686-pc-vs$(VSVer)";GTK_PRINT_BACKENDS="file";GTK_PRINT_BACKEND_ENABLE_UNSUPPORTED;$(GtkIncludedImmodulesDefines);GTK_LIBDIR="$(GtkDummyPrefix)/lib";GTK_DATADIR="$(GtkDummyPrefix)/share";GTK_DATA_PREFIX="$(GtkDummyPrefix)";GTK_SYSCONFDIR="$(GtkDummyPrefix)/etc";MULTIPRESS_CONFDIR="$(GtkDummyPrefix)/etc/gtk-$(ApiVersion)";MULTIPRESS_LOCALEDIR="$(GtkDummyPrefix)/share/locale";GTK_VERSION="$(GtkVersion)/etc";GTK_BINARY_VERSION="$(GtkBinaryVersion)/etc";GDK_DISABLE_DEPRECATED;ISOLATION_AWARE_ENABLED</GtkDefines>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<_PropertySheetDisplayName>gtkbuilddefinesprops</_PropertySheetDisplayName>
|
||||
|
@@ -33,7 +33,7 @@ echo $(Configuration) > ..\..\..\MSVC_$(Configuration)
|
||||
:DONE_GDKCONFIG_H
|
||||
</GenGdkConfigHWin32>
|
||||
<GenGdkConfigHBroadway>
|
||||
if exist ..\..\..\MSVC_$(Configuration) goto DONE_GDKCONFIG_H
|
||||
if exist ..\..\..\MSVC_$(Configuration)_Broadway goto DONE_GDKCONFIG_H
|
||||
|
||||
|
||||
if exist ..\..\..\gdk\gdkconfig.h del ..\..\..\gdk\gdkconfig.h
|
||||
@@ -53,7 +53,7 @@ copy ..\..\..\gdk\gdkconfig.h.win32_broadway ..\..\..\gdk\gdkconfig.h
|
||||
|
||||
copy ..\..\..\gdk\gdkconfig.h.win32_broadway ..\..\..\GDK_BROADWAY_BUILD
|
||||
|
||||
echo $(Configuration) > ..\..\..\MSVC_$(Configuration)
|
||||
echo $(Configuration) > ..\..\..\MSVC_$(Configuration)_Broadway
|
||||
|
||||
:DONE_GDKCONFIG_H
|
||||
</GenGdkConfigHBroadway>
|
||||
|
@@ -1,20 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup>
|
||||
<Filter Include="Header Files">
|
||||
<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</Extensions>
|
||||
</Filter>
|
||||
<Filter Include="Source Files">
|
||||
<UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
|
||||
<Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
|
||||
</Filter>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
#include "libgtk-inspector.vs10.sourcefiles.filters"
|
||||
</ItemGroup>
|
||||
</Project>
|
@@ -1,131 +0,0 @@
|
||||
<?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>{FC5AADB5-95CD-4BF0-BA8B-0C16FE7073FD}</ProjectGuid>
|
||||
<RootNamespace>gtkinspector</RootNamespace>
|
||||
<Keyword>Win32Proj</Keyword>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
|
||||
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
<PlatformToolset>v100</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
|
||||
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
<PlatformToolset>v100</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
|
||||
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
<PlatformToolset>v100</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
|
||||
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
<PlatformToolset>v100</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
||||
<ImportGroup Label="ExtensionSettings">
|
||||
</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-build-defines.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-build-defines.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-build-defines.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-build-defines.props" />
|
||||
</ImportGroup>
|
||||
<PropertyGroup Label="UserMacros" />
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<ClCompile>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<AdditionalIncludeDirectories>..\..\..\gtk;..\..\..\gdk;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>_DEBUG;G_ENABLE_DEBUG;$(GtkDefines);%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<MinimalRebuild>true</MinimalRebuild>
|
||||
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
|
||||
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
|
||||
<PrecompiledHeader>
|
||||
</PrecompiledHeader>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<DebugInformationFormat>EditAndContinue</DebugInformationFormat>
|
||||
</ClCompile>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<ClCompile>
|
||||
<AdditionalIncludeDirectories>..\..\..\gtk;..\..\..\gdk;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>$(GtkDefines);%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
|
||||
<PrecompiledHeader>
|
||||
</PrecompiledHeader>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||
</ClCompile>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<ClCompile>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<AdditionalIncludeDirectories>..\..\..\gtk;..\..\..\gdk;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>_DEBUG;G_ENABLE_DEBUG;$(GtkDefines);%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<MinimalRebuild>true</MinimalRebuild>
|
||||
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
|
||||
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
|
||||
<PrecompiledHeader>
|
||||
</PrecompiledHeader>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||
</ClCompile>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<ClCompile>
|
||||
<AdditionalIncludeDirectories>..\..\..\gtk;..\..\..\gdk;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>$(GtkDefines);%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
|
||||
<PrecompiledHeader>
|
||||
</PrecompiledHeader>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||
</ClCompile>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemGroup>
|
||||
#include "libgtk-inspector.vs10.sourcefiles"
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="gtk-prebuild.vcxproj">
|
||||
<Project>{fc5aadb5-95cd-4bf0-ba8b-0c16fe7073ff}</Project>
|
||||
<ReferenceOutputAssembly>false</ReferenceOutputAssembly>
|
||||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||
<ImportGroup Label="ExtensionTargets">
|
||||
</ImportGroup>
|
||||
</Project>
|
@@ -217,10 +217,6 @@
|
||||
<Project>{fc5aadb5-95cd-4bf0-ba8b-0c16fe7073f7}</Project>
|
||||
<ReferenceOutputAssembly>false</ReferenceOutputAssembly>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="gtk-inspector.vcxproj">
|
||||
<Project>{fc5aadb5-95cd-4bf0-ba8b-0c16fe7073fd}</Project>
|
||||
<ReferenceOutputAssembly>false</ReferenceOutputAssembly>
|
||||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||
<ImportGroup Label="ExtensionTargets">
|
||||
|
@@ -18,8 +18,6 @@ EXTRA_DIST += \
|
||||
gtk3-demo-application.vcxproj.filters \
|
||||
gtk3-icon-browser.vcxproj \
|
||||
gtk3-icon-browser.vcxproj.filters \
|
||||
gtk-inspector.vcxproj \
|
||||
gtk-inspector.vcxproj.filters \
|
||||
gailutil.vcxproj \
|
||||
gailutil.vcxproj.filters \
|
||||
install.vcxproj \
|
||||
|
@@ -18,8 +18,6 @@ EXTRA_DIST += \
|
||||
gtk3-demo-application.vcxproj.filters \
|
||||
gtk3-icon-browser.vcxproj \
|
||||
gtk3-icon-browser.vcxproj.filters \
|
||||
gtk-inspector.vcxproj \
|
||||
gtk-inspector.vcxproj.filters \
|
||||
gailutil.vcxproj \
|
||||
gailutil.vcxproj.filters \
|
||||
install.vcxproj \
|
||||
|
@@ -13,8 +13,6 @@ EXTRA_DIST += \
|
||||
gtk3-demo.vcproj \
|
||||
gtk3-demo-application.vcproj \
|
||||
gtk3-icon-browser.vcproj \
|
||||
gtk-inspector.vcproj \
|
||||
gtk-inspector.vcprojin \
|
||||
gailutil.vcproj \
|
||||
install.vcproj \
|
||||
broadwayd.vcproj \
|
||||
|
@@ -23,15 +23,9 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "gdk", "gdk.vcproj", "{FC5AA
|
||||
{FC5AADB5-95CD-4BF0-BA8B-0C16FE7073FE} = {FC5AADB5-95CD-4BF0-BA8B-0C16FE7073FE}
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "gtk-inspector", "gtk-inspector.vcproj", "{FC5AADB5-95CD-4BF0-BA8B-0C16FE7073FD}"
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
{FC5AADB5-95CD-4BF0-BA8B-0C16FE7073FF} = {FC5AADB5-95CD-4BF0-BA8B-0C16FE7073FF}
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "gtk", "gtk.vcproj", "{FC5AADB5-95CD-4BF0-BA8B-0C16FE7073F5}"
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
{FC5AADB5-95CD-4BF0-BA8B-0C16FE7073F7} = {FC5AADB5-95CD-4BF0-BA8B-0C16FE7073F7}
|
||||
{FC5AADB5-95CD-4BF0-BA8B-0C16FE7073FD} = {FC5AADB5-95CD-4BF0-BA8B-0C16FE7073FD}
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "gtk3-demo", "gtk3-demo.vcproj", "{FC5AADB5-95CD-4BF0-BA8B-0C16FE7073FC}"
|
||||
@@ -151,22 +145,6 @@ Global
|
||||
{FC5AADB5-95CD-4BF0-BA8B-0C16FE7073F7}.Release_Broadway|Win32.Build.0 = Release_Broadway|Win32
|
||||
{FC5AADB5-95CD-4BF0-BA8B-0C16FE7073F7}.Release_Broadway|x64.ActiveCfg = Release_Broadway|x64
|
||||
{FC5AADB5-95CD-4BF0-BA8B-0C16FE7073F7}.Release_Broadway|x64.Build.0 = Release_Broadway|x64
|
||||
{FC5AADB5-95CD-4BF0-BA8B-0C16FE7073FD}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{FC5AADB5-95CD-4BF0-BA8B-0C16FE7073FD}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{FC5AADB5-95CD-4BF0-BA8B-0C16FE7073FD}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{FC5AADB5-95CD-4BF0-BA8B-0C16FE7073FD}.Debug|x64.Build.0 = Debug|x64
|
||||
{FC5AADB5-95CD-4BF0-BA8B-0C16FE7073FD}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{FC5AADB5-95CD-4BF0-BA8B-0C16FE7073FD}.Release|Win32.Build.0 = Release|Win32
|
||||
{FC5AADB5-95CD-4BF0-BA8B-0C16FE7073FD}.Release|x64.ActiveCfg = Release|x64
|
||||
{FC5AADB5-95CD-4BF0-BA8B-0C16FE7073FD}.Release|x64.Build.0 = Release|x64
|
||||
{FC5AADB5-95CD-4BF0-BA8B-0C16FE7073FD}.Debug_Broadway|Win32.ActiveCfg = Debug|Win32
|
||||
{FC5AADB5-95CD-4BF0-BA8B-0C16FE7073FD}.Debug_Broadway|Win32.Build.0 = Debug|Win32
|
||||
{FC5AADB5-95CD-4BF0-BA8B-0C16FE7073FD}.Debug_Broadway|x64.ActiveCfg = Debug|x64
|
||||
{FC5AADB5-95CD-4BF0-BA8B-0C16FE7073FD}.Debug_Broadway|x64.Build.0 = Debug|x64
|
||||
{FC5AADB5-95CD-4BF0-BA8B-0C16FE7073FD}.Release_Broadway|Win32.ActiveCfg = Release|Win32
|
||||
{FC5AADB5-95CD-4BF0-BA8B-0C16FE7073FD}.Release_Broadway|Win32.Build.0 = Release|Win32
|
||||
{FC5AADB5-95CD-4BF0-BA8B-0C16FE7073FD}.Release_Broadway|x64.ActiveCfg = Release|x64
|
||||
{FC5AADB5-95CD-4BF0-BA8B-0C16FE7073FD}.Release_Broadway|x64.Build.0 = Release|x64
|
||||
{FC5AADB5-95CD-4BF0-BA8B-0C16FE7073F5}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{FC5AADB5-95CD-4BF0-BA8B-0C16FE7073F5}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{FC5AADB5-95CD-4BF0-BA8B-0C16FE7073F5}.Debug|x64.ActiveCfg = Debug|x64
|
||||
|
@@ -40,6 +40,6 @@
|
||||
/>
|
||||
<UserMacro
|
||||
Name="GtkDefines"
|
||||
Value="GTK_COMPILATION;G_LOG_DOMAIN=\"Gtk\";GTK_HOST=\"i686-pc-vs$(VSVer)\";GTK_PRINT_BACKENDS=\"file\";GTK_PRINT_PREVIEW_COMMAND=\"undefined-gtk-print-preview-command\";$(GtkIncludedImmodulesDefines);GTK_LIBDIR=\"$(GtkDummyPrefix)/lib\";GTK_DATADIR=\"$(GtkDummyPrefix)/share\"GTK_DATA_PREFIX=\"$(GtkDummyPrefix)\";GTK_SYSCONFDIR=\"$(GtkDummyPrefix)/etc\";MULTIPRESS_CONFDIR=\"$(GtkDummyPrefix)/etc/gtk-$(ApiVersion)\";MULTIPRESS_LOCALEDIR=\"$(GtkDummyPrefix)/share/locale\";GTK_VERSION=\"$(GtkVersion)/etc\";GTK_BINARY_VERSION=\"$(GtkBinaryVersion)/etc\";GDK_DISABLE_DEPRECATED;ISOLATION_AWARE_ENABLED"
|
||||
Value="GTK_COMPILATION;G_LOG_DOMAIN=\"Gtk\";GTK_HOST=\"i686-pc-vs$(VSVer)\";GTK_PRINT_BACKENDS=\"file\";GTK_PRINT_BACKEND_ENABLE_UNSUPPORTED;$(GtkIncludedImmodulesDefines);GTK_LIBDIR=\"$(GtkDummyPrefix)/lib\";GTK_DATADIR=\"$(GtkDummyPrefix)/share\"GTK_DATA_PREFIX=\"$(GtkDummyPrefix)\";GTK_SYSCONFDIR=\"$(GtkDummyPrefix)/etc\";MULTIPRESS_CONFDIR=\"$(GtkDummyPrefix)/etc/gtk-$(ApiVersion)\";MULTIPRESS_LOCALEDIR=\"$(GtkDummyPrefix)/share/locale\";GTK_VERSION=\"$(GtkVersion)/etc\";GTK_BINARY_VERSION=\"$(GtkBinaryVersion)/etc\";GDK_DISABLE_DEPRECATED;ISOLATION_AWARE_ENABLED"
|
||||
/>
|
||||
</VisualStudioPropertySheet>
|
||||
|
@@ -36,7 +36,7 @@ echo $(ConfigurationName) > ..\..\..\MSVC_$(ConfigurationName)

|
||||
<UserMacro
|
||||
Name="GenGdkConfigHBroadway"
|
||||
Value="
|
||||
if exist ..\..\..\MSVC_$(ConfigurationName) goto DONE_GDKCONFIG_H

|
||||
if exist ..\..\..\MSVC_$(ConfigurationName)_Broadway goto DONE_GDKCONFIG_H

|
||||
|
||||
if exist ..\..\..\gdk\gdkconfig.h del ..\..\..\gdk\gdkconfig.h

|
||||
if exist ..\..\..\GDK_WIN32ONLY_BUILD del ..\..\..\GDK_WIN32ONLY_BUILD

|
||||
@@ -50,7 +50,7 @@ if "$(ConfigurationName)" == "Debug_Broadway" del ..\..\..\M
|
||||
copy ..\..\..\gdk\gdkconfig.h.win32_broadway ..\..\..\gdk\gdkconfig.h

|
||||
copy ..\..\..\gdk\gdkconfig.h.win32_broadway ..\..\..\GDK_BROADWAY_BUILD

|
||||
|
||||
echo $(ConfigurationName) > ..\..\..\MSVC_$(ConfigurationName)

|
||||
echo $(ConfigurationName) > ..\..\..\MSVC_$(ConfigurationName)_Broadway

|
||||
:DONE_GDKCONFIG_H

|
||||
"
|
||||
/>
|
||||
|
@@ -1,130 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<VisualStudioProject
|
||||
ProjectType="Visual C++"
|
||||
Version="9.00"
|
||||
Name="gtk-inspector"
|
||||
ProjectGUID="{FC5AADB5-95CD-4BF0-BA8B-0C16FE7073FD}"
|
||||
RootNamespace="gtkinspector"
|
||||
Keyword="Win32Proj"
|
||||
TargetFrameworkVersion="0"
|
||||
>
|
||||
<Platforms>
|
||||
<Platform
|
||||
Name="Win32"
|
||||
/>
|
||||
<Platform
|
||||
Name="x64"
|
||||
/>
|
||||
</Platforms>
|
||||
<ToolFiles>
|
||||
</ToolFiles>
|
||||
<Configurations>
|
||||
<Configuration
|
||||
Name="Debug|Win32"
|
||||
InheritedPropertySheets=".\gtk-build-defines.vsprops"
|
||||
ConfigurationType="4"
|
||||
CharacterSet="2"
|
||||
>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
AdditionalIncludeDirectories="..\..\..\gdk;..\..\..\gtk"
|
||||
PreprocessorDefinitions="_DEBUG;G_ENABLE_DEBUG;$(GtkDefines)"
|
||||
MinimalRebuild="true"
|
||||
BasicRuntimeChecks="3"
|
||||
RuntimeLibrary="3"
|
||||
UsePrecompiledHeader="0"
|
||||
WarningLevel="3"
|
||||
DebugInformationFormat="4"
|
||||
/>
|
||||
</Configuration>
|
||||
<Configuration
|
||||
Name="Release|Win32"
|
||||
InheritedPropertySheets=".\gtk-build-defines.vsprops"
|
||||
ConfigurationType="4"
|
||||
CharacterSet="2"
|
||||
WholeProgramOptimization="1"
|
||||
>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
AdditionalIncludeDirectories="..\..\..\gdk;..\..\..\gtk"
|
||||
PreprocessorDefinitions="$(GtkDefines)"
|
||||
RuntimeLibrary="2"
|
||||
UsePrecompiledHeader="0"
|
||||
WarningLevel="3"
|
||||
DebugInformationFormat="3"
|
||||
/>
|
||||
</Configuration>
|
||||
<Configuration
|
||||
Name="Debug|x64"
|
||||
InheritedPropertySheets=".\gtk-build-defines.vsprops"
|
||||
ConfigurationType="4"
|
||||
CharacterSet="2"
|
||||
>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
AdditionalIncludeDirectories="..\..\..\gdk;..\..\..\gtk"
|
||||
PreprocessorDefinitions="_DEBUG;G_ENABLE_DEBUG;$(GtkDefines)"
|
||||
MinimalRebuild="true"
|
||||
BasicRuntimeChecks="3"
|
||||
RuntimeLibrary="3"
|
||||
UsePrecompiledHeader="0"
|
||||
WarningLevel="3"
|
||||
DebugInformationFormat="3"
|
||||
/>
|
||||
</Configuration>
|
||||
<Configuration
|
||||
Name="Release|x64"
|
||||
InheritedPropertySheets=".\gtk-build-defines.vsprops"
|
||||
ConfigurationType="4"
|
||||
CharacterSet="2"
|
||||
WholeProgramOptimization="1"
|
||||
>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
AdditionalIncludeDirectories="..\..\..\gdk;..\..\..\gtk"
|
||||
PreprocessorDefinitions="$(GtkDefines)"
|
||||
RuntimeLibrary="2"
|
||||
UsePrecompiledHeader="0"
|
||||
WarningLevel="3"
|
||||
DebugInformationFormat="3"
|
||||
/>
|
||||
</Configuration>
|
||||
</Configurations>
|
||||
<References>
|
||||
</References>
|
||||
<Files>
|
||||
<Filter
|
||||
Name="Header Files"
|
||||
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"
|
||||
UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"
|
||||
>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="Source Files"
|
||||
Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
|
||||
UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
|
||||
>
|
||||
#include "libgtk-inspector.sourcefiles"
|
||||
</Filter>
|
||||
</Files>
|
||||
</VisualStudioProject>
|
76
configure.ac
@@ -10,7 +10,7 @@
|
||||
|
||||
m4_define([gtk_major_version], [3])
|
||||
m4_define([gtk_minor_version], [15])
|
||||
m4_define([gtk_micro_version], [1])
|
||||
m4_define([gtk_micro_version], [2])
|
||||
m4_define([gtk_interface_age], [0])
|
||||
m4_define([gtk_binary_age],
|
||||
[m4_eval(100 * gtk_minor_version + gtk_micro_version)])
|
||||
@@ -279,13 +279,6 @@ AC_ARG_ENABLE(installed_tests,
|
||||
[enable_installed_tests=no])
|
||||
AM_CONDITIONAL(BUILDOPT_INSTALL_TESTS, test x$enable_installed_tests = xyes)
|
||||
|
||||
AC_ARG_ENABLE(gtk2-dependency,
|
||||
[AS_HELP_STRING([--enable-gtk2-dependency],
|
||||
[Do not build gtk-update-icon-cache and other shared tools])],,
|
||||
[enable_gtk2_dependency=no])
|
||||
|
||||
AM_CONDITIONAL(BUILD_ICON_CACHE, [test "x$enable_gtk2_dependency" = xno])
|
||||
|
||||
AC_ARG_ENABLE(xkb,
|
||||
[AS_HELP_STRING([--enable-xkb],
|
||||
[support XKB extension [default=maybe]])],,
|
||||
@@ -406,7 +399,6 @@ if test "x$enable_quartz_backend" = xyes; then
|
||||
# Pull in gio-unix for GDesktopAppInfo usage, see at least
|
||||
# gdkapplaunchcontext-x11.c
|
||||
have_gio_unix=yes
|
||||
|
||||
else
|
||||
AM_CONDITIONAL(USE_QUARTZ, false)
|
||||
fi
|
||||
@@ -965,44 +957,6 @@ dnl Look for a host system's gdk-pixbuf-csource if we are cross-compiling
|
||||
|
||||
AM_CONDITIONAL(CROSS_COMPILING, test $cross_compiling = yes)
|
||||
|
||||
AS_IF([test "x$enable_gtk2_dependency" = xyes],
|
||||
[AC_PATH_PROG(GTK_UPDATE_ICON_CACHE, gtk-update-icon-cache, no)
|
||||
if test x$GTK_UPDATE_ICON_CACHE = xno; then
|
||||
AC_MSG_ERROR([
|
||||
*** --enable-gtk2-dependency has been set but no existing
|
||||
*** `gtk-update-icon-cache` has been found in the path.])
|
||||
fi],
|
||||
|
||||
[test "x$cross_compiling" = xyes],
|
||||
[# If no GTK+2 dependency and cross compiling, we need to find a host gdk-pixbuf.
|
||||
# pkg.m4 blocks all variable starting with PKG, so allow this one
|
||||
m4_pattern_allow([PKG_CONFIG_FOR_BUILD])
|
||||
|
||||
AS_IF([test x$PKG_CONFIG_FOR_BUILD = x],
|
||||
[AC_MSG_ERROR([You must define PKG_CONFIG_FOR_BUILD when cross compiling])])
|
||||
|
||||
AC_MSG_CHECKING([for native gdk-pixbuf])
|
||||
AS_IF([AC_RUN_LOG([$PKG_CONFIG_FOR_BUILD --exists --print-errors gdk-pixbuf-2.0])],
|
||||
[AC_MSG_RESULT([yes])],
|
||||
[AC_MSG_ERROR([native gdk-pixbuf not found])])
|
||||
|
||||
NATIVE_GDKPIXBUF_CFLAGS=`$PKG_CONFIG_FOR_BUILD --cflags gdk-pixbuf-2.0`
|
||||
NATIVE_GDKPIXBUF_LIBS=`$PKG_CONFIG_FOR_BUILD --libs gdk-pixbuf-2.0`
|
||||
# This is the native gtk-update-icon-cache which will be used at
|
||||
# build time, NOT the one installed on the target host.
|
||||
GTK_UPDATE_ICON_CACHE="`cd $builddir && pwd`/gtk/native/native-update-icon-cache$BUILD_EXEEXT"
|
||||
AC_SUBST(NATIVE_GDKPIXBUF_CFLAGS)
|
||||
AC_SUBST(NATIVE_GDKPIXBUF_LIBS)
|
||||
AC_SUBST(GTK_UPDATE_ICON_CACHE)],
|
||||
|
||||
[# In native compiling case, the gtk-update-icon-cache installed
|
||||
# is the same as the one used during build.
|
||||
GTK_UPDATE_ICON_CACHE="\$(abs_top_builddir)/gtk/gtk-update-icon-cache$EXEEXT"
|
||||
AC_SUBST(GTK_UPDATE_ICON_CACHE)]
|
||||
)
|
||||
|
||||
AM_CONDITIONAL(USE_EXTERNAL_ICON_CACHE, [test "x$enable_gtk2_dependency" = xyes])
|
||||
|
||||
########################################
|
||||
# Windowing system checks
|
||||
########################################
|
||||
@@ -1384,7 +1338,7 @@ fi
|
||||
PKG_CHECK_MODULES(ATK, $ATK_PACKAGES)
|
||||
|
||||
GTK_PACKAGES="atk >= atk_required_version cairo >= cairo_required_version cairo-gobject >= cairo_required_version gdk-pixbuf-2.0 >= gdk_pixbuf_required_version gio-2.0 >= glib_required_version"
|
||||
GTK_PRIVATE_PACKAGES="$ATK_PACKAGES $WAYLAND_PACKAGES $MIR_PACKAGES"
|
||||
GTK_PRIVATE_PACKAGES="$ATK_PACKAGES $WAYLAND_PACKAGES $MIR_PACKAGES epoxy >= epoxy_required_version"
|
||||
if test "x$enable_x11_backend" = xyes; then
|
||||
GTK_PRIVATE_PACKAGES="$GTK_PRIVATE_PACKAGES pangoft2"
|
||||
fi
|
||||
@@ -1507,6 +1461,7 @@ else
|
||||
|
||||
PRINT_BACKENDS="$PRINT_BACKENDS cups"
|
||||
AM_CONDITIONAL(HAVE_CUPS, true)
|
||||
have_cups=yes
|
||||
|
||||
gtk_save_cflags="$CFLAGS"
|
||||
CFLAGS="$CUPS_CFLAGS"
|
||||
@@ -1566,8 +1521,9 @@ else
|
||||
PKG_CHECK_MODULES(JSON_GLIB, [json-glib-1.0], have_json_glib=yes, have_json_glib=no)
|
||||
if test "x$have_rest" = "xyes" -a "x$have_json_glib" = "xyes"; then
|
||||
PRINT_BACKENDS="$PRINT_BACKENDS cloudprint"
|
||||
have_cloudprint=yes
|
||||
fi
|
||||
AM_CONDITIONAL(HAVE_CLOUDPRINT, test "x$have_rest" = "xyes" -a "x$have_json_glib" = "xyes")
|
||||
AM_CONDITIONAL(HAVE_CLOUDPRINT, test "x$have_cloudprint" = "xyes")
|
||||
fi
|
||||
|
||||
if test "x$enable_cloudprint" = "xyes" -a "x$have_rest" = "xno"; then
|
||||
@@ -1582,8 +1538,6 @@ if test "x$enable_cloudprint" = "xyes" -a "x$have_json_glib" = "xno"; then
|
||||
])
|
||||
fi
|
||||
|
||||
AM_CONDITIONAL(HAVE_PAPI_CUPS, test "x$have_papi" = "xyes" -a "x$CUPS_CONFIG" != "xno")
|
||||
|
||||
gtk_save_cppflags="$CPPFLAGS"
|
||||
CPPFLAGS="$CPPFLAGS $GTK_DEP_CFLAGS $GDK_DEP_CFLAGS"
|
||||
|
||||
@@ -1603,7 +1557,6 @@ fi
|
||||
|
||||
CPPFLAGS="$gtk_save_cppflags"
|
||||
|
||||
|
||||
AC_ARG_ENABLE(test-print-backend,
|
||||
[AS_HELP_STRING([--enable-test-print-backend],
|
||||
[build test print backend])],,
|
||||
@@ -1617,6 +1570,21 @@ if test "$os_win32" = "yes"; then
|
||||
AC_CHECK_TYPES([IPrintDialogCallback],[],[],[[#include <windows.h>]])
|
||||
fi
|
||||
|
||||
GTK_PRINT_BACKENDS="file"
|
||||
if test "$have_papi" = "yes"; then
|
||||
GTK_PRINT_BACKENDS="$GTK_PRINT_BACKENDS,papi"
|
||||
fi
|
||||
if test "$have_cups" = "yes"; then
|
||||
GTK_PRINT_BACKENDS="$GTK_PRINT_BACKENDS,cups"
|
||||
fi
|
||||
if test "$have_papi" != "yes" -a "$have_cups" != "yes"; then
|
||||
GTK_PRINT_BACKENDS="$GTK_PRINT_BACKENDS,lpr"
|
||||
fi
|
||||
if test "$have_cloudprint" = "yes"; then
|
||||
GTK_PRINT_BACKENDS="$GTK_PRINT_BACKENDS,cloudprint"
|
||||
fi
|
||||
AC_SUBST(GTK_PRINT_BACKENDS)
|
||||
|
||||
################################################################
|
||||
# Strip -export-dynamic from the link lines of various libraries
|
||||
################################################################
|
||||
@@ -1869,6 +1837,8 @@ fi
|
||||
AC_SUBST(GTK_LINK_FLAGS)
|
||||
|
||||
AC_CONFIG_FILES([
|
||||
README
|
||||
INSTALL
|
||||
config.h.win32
|
||||
gtk-zip.sh
|
||||
Makefile
|
||||
@@ -1941,8 +1911,6 @@ gtk/makefile.msc
|
||||
gtk/gtkversion.h
|
||||
gtk/gtk-win32.rc
|
||||
gtk/libgtk3.manifest
|
||||
gtk/inspector/Makefile
|
||||
gtk/native/Makefile
|
||||
util/Makefile
|
||||
libgail-util/Makefile
|
||||
modules/Makefile
|
||||
|
@@ -72,10 +72,10 @@ DEPS = \
|
||||
$(top_builddir)/gtk/libgtk-3.la
|
||||
|
||||
LDADDS = \
|
||||
$(top_builddir)/gtk/libgtk-3.la \
|
||||
$(top_builddir)/gdk/libgdk-3.la \
|
||||
$(top_builddir)/gtk/libgtk-3.la \
|
||||
$(top_builddir)/gdk/libgdk-3.la \
|
||||
$(GTK_DEP_LIBS) \
|
||||
$(GDK_DEP_LIBS) \
|
||||
$(GDK_DEP_LIBS) \
|
||||
-lm
|
||||
|
||||
bin_PROGRAMS = gtk3-demo gtk3-demo-application
|
||||
@@ -86,7 +86,8 @@ dist_desktop_DATA = gtk3-demo.desktop
|
||||
BUILT_SOURCES = demos.h demo_resources.c
|
||||
|
||||
EXTRA_DIST += \
|
||||
$(IMAGEFILES) \
|
||||
data/source.svg \
|
||||
data/symbolic-source.svg \
|
||||
demo.gresource.xml \
|
||||
$(RESOURCES) \
|
||||
org.gtk.Demo.gschema.xml
|
||||
@@ -118,39 +119,40 @@ gtk3_demo_application_LDADD = $(LDADDS)
|
||||
demo_resources.c: demo.gresource.xml $(RESOURCES)
|
||||
$(AM_V_GEN) $(GLIB_COMPILE_RESOURCES) --target=$@ --sourcedir=$(srcdir) --generate-source $(srcdir)/demo.gresource.xml
|
||||
|
||||
RESOURCES= $(demos) \
|
||||
main.ui \
|
||||
application.ui \
|
||||
demo.ui \
|
||||
menus.ui \
|
||||
stack.ui \
|
||||
revealer.ui \
|
||||
theming.ui \
|
||||
listbox.ui \
|
||||
popover.ui \
|
||||
alphatest.png \
|
||||
apple-red.png \
|
||||
brick.png \
|
||||
brick2.png \
|
||||
background.jpg \
|
||||
floppybuddy.gif \
|
||||
gnome-applets.png \
|
||||
gnome-calendar.png \
|
||||
gnome-foot.png \
|
||||
gnome-fs-directory.png \
|
||||
gnome-fs-regular.png \
|
||||
gnome-gimp.png \
|
||||
gnome-gmush.png \
|
||||
gnome-gsame.png \
|
||||
gnu-keys.png \
|
||||
messages.txt \
|
||||
css_accordion.css \
|
||||
css_basics.css \
|
||||
css_multiplebgs.css \
|
||||
css_pixbufs.css \
|
||||
css_shadows.css \
|
||||
cssview.css \
|
||||
reset.css
|
||||
RESOURCES = \
|
||||
$(demos) \
|
||||
main.ui \
|
||||
application.ui \
|
||||
demo.ui \
|
||||
menus.ui \
|
||||
stack.ui \
|
||||
revealer.ui \
|
||||
theming.ui \
|
||||
listbox.ui \
|
||||
popover.ui \
|
||||
alphatest.png \
|
||||
apple-red.png \
|
||||
brick.png \
|
||||
brick2.png \
|
||||
background.jpg \
|
||||
floppybuddy.gif \
|
||||
gnome-applets.png \
|
||||
gnome-calendar.png \
|
||||
gnome-foot.png \
|
||||
gnome-fs-directory.png \
|
||||
gnome-fs-regular.png \
|
||||
gnome-gimp.png \
|
||||
gnome-gmush.png \
|
||||
gnome-gsame.png \
|
||||
gnu-keys.png \
|
||||
messages.txt \
|
||||
css_accordion.css \
|
||||
css_basics.css \
|
||||
css_multiplebgs.css \
|
||||
css_pixbufs.css \
|
||||
css_shadows.css \
|
||||
cssview.css \
|
||||
reset.css
|
||||
|
||||
iconthemedir = $(datadir)/icons/hicolor
|
||||
|
||||
@@ -160,15 +162,16 @@ appsicon24dir = $(iconthemedir)/24x24/apps
|
||||
appsicon32dir = $(iconthemedir)/32x32/apps
|
||||
appsicon48dir = $(iconthemedir)/48x48/apps
|
||||
appsicon256dir = $(iconthemedir)/256x256/apps
|
||||
appsiconscalabledir = $(iconthemedir)/scalable/apps
|
||||
|
||||
dist_appsicon16_DATA = data/16x16/gtk3-demo.png
|
||||
dist_appsicon22_DATA = data/22x22/gtk3-demo.png
|
||||
dist_appsicon24_DATA = data/24x24/gtk3-demo.png
|
||||
dist_appsicon32_DATA = data/32x32/gtk3-demo.png
|
||||
dist_appsicon48_DATA = data/48x48/gtk3-demo.png
|
||||
dist_appsicon256_DATA = data/256x256/gtk3-demo.png
|
||||
dist_appsicon16_DATA = data/16x16/gtk3-demo.png data/16x16/gtk3-demo-symbolic.symbolic.png
|
||||
dist_appsicon22_DATA = data/22x22/gtk3-demo.png data/22x22/gtk3-demo-symbolic.symbolic.png
|
||||
dist_appsicon24_DATA = data/24x24/gtk3-demo.png data/24x24/gtk3-demo-symbolic.symbolic.png
|
||||
dist_appsicon32_DATA = data/32x32/gtk3-demo.png data/32x32/gtk3-demo-symbolic.symbolic.png
|
||||
dist_appsicon48_DATA = data/48x48/gtk3-demo.png data/48x48/gtk3-demo-symbolic.symbolic.png
|
||||
dist_appsicon256_DATA = data/256x256/gtk3-demo.png data/256x256/gtk3-demo-symbolic.symbolic.png
|
||||
|
||||
update_icon_cache = $(GTK_UPDATE_ICON_CACHE) --ignore-theme-index --force
|
||||
update_icon_cache = gtk-update-icon-cache --ignore-theme-index --force
|
||||
|
||||
install-data-hook: install-update-icon-cache
|
||||
uninstall-hook: uninstall-update-icon-cache
|
||||
|
BIN
demos/gtk-demo/data/16x16/gtk3-demo-symbolic.symbolic.png
Normal file
After Width: | Height: | Size: 324 B |
BIN
demos/gtk-demo/data/22x22/gtk3-demo-symbolic.symbolic.png
Normal file
After Width: | Height: | Size: 437 B |
BIN
demos/gtk-demo/data/24x24/gtk3-demo-symbolic.symbolic.png
Normal file
After Width: | Height: | Size: 465 B |
BIN
demos/gtk-demo/data/256x256/gtk3-demo-symbolic.symbolic.png
Normal file
After Width: | Height: | Size: 3.8 KiB |
BIN
demos/gtk-demo/data/32x32/gtk3-demo-symbolic.symbolic.png
Normal file
After Width: | Height: | Size: 581 B |
BIN
demos/gtk-demo/data/48x48/gtk3-demo-symbolic.symbolic.png
Normal file
After Width: | Height: | Size: 854 B |
BIN
demos/gtk-demo/data/512x512/gtk3-demo-symbolic.symbolic.png
Normal file
After Width: | Height: | Size: 7.4 KiB |
29
demos/gtk-demo/data/symbolic-source.svg
Normal file
@@ -0,0 +1,29 @@
|
||||
<?xml version='1.0' encoding='UTF-8' standalone='no'?>
|
||||
<!-- Created with Inkscape (http://www.inkscape.org/) -->
|
||||
|
||||
<svg xmlns:cc='http://creativecommons.org/ns#' xmlns:dc='http://purl.org/dc/elements/1.1/' sodipodi:docname='gtk3-demo-symbolic.svg' height='16.000015' id='svg7384' xmlns:inkscape='http://www.inkscape.org/namespaces/inkscape' xmlns:osb='http://www.openswatchbook.org/uri/2009/osb' xmlns:rdf='http://www.w3.org/1999/02/22-rdf-syntax-ns#' xmlns:sodipodi='http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd' xmlns:svg='http://www.w3.org/2000/svg' inkscape:version='0.48.5 r10040' version='1.1' width='16' xmlns='http://www.w3.org/2000/svg'>
|
||||
<metadata id='metadata90'>
|
||||
<rdf:RDF>
|
||||
<cc:Work rdf:about=''>
|
||||
<dc:format>image/svg+xml</dc:format>
|
||||
<dc:type rdf:resource='http://purl.org/dc/dcmitype/StillImage'/>
|
||||
<dc:title>Gnome Symbolic Icon Theme</dc:title>
|
||||
</cc:Work>
|
||||
</rdf:RDF>
|
||||
</metadata>
|
||||
<sodipodi:namedview inkscape:bbox-paths='true' bordercolor='#666666' borderopacity='1' inkscape:current-layer='layer9' inkscape:cx='-12.5126' inkscape:cy='-0.73412416' gridtolerance='10' inkscape:guide-bbox='true' guidetolerance='10' id='namedview88' inkscape:object-nodes='false' inkscape:object-paths='false' objecttolerance='10' pagecolor='#555753' inkscape:pageopacity='1' inkscape:pageshadow='2' showborder='false' showgrid='false' showguides='true' inkscape:snap-bbox='true' inkscape:snap-bbox-midpoints='false' inkscape:snap-global='true' inkscape:snap-grids='true' inkscape:snap-nodes='true' inkscape:snap-others='false' inkscape:snap-to-guides='true' inkscape:window-height='1375' inkscape:window-maximized='1' inkscape:window-width='2560' inkscape:window-x='0' inkscape:window-y='27' inkscape:zoom='5.6568542'>
|
||||
<inkscape:grid empspacing='2' enabled='true' id='grid4866' originx='-182.99998px' originy='-251.99998px' snapvisiblegridlinesonly='true' spacingx='1px' spacingy='1px' type='xygrid' visible='true'/>
|
||||
</sodipodi:namedview>
|
||||
<title id='title9167'>Gnome Symbolic Icon Theme</title>
|
||||
<defs id='defs7386'>
|
||||
<linearGradient id='linearGradient7212' osb:paint='solid'>
|
||||
<stop id='stop7214' offset='0' style='stop-color:#000000;stop-opacity:1;'/>
|
||||
</linearGradient>
|
||||
</defs>
|
||||
<g inkscape:groupmode='layer' id='layer9' inkscape:label='apps' style='display:inline' transform='translate(-424.00018,35)'>
|
||||
|
||||
<rect height='8.0000048' id='rect7866' style='opacity:0.3;color:#000000;fill:#bebebe;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1.39999998;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:new' transform='matrix(0.83205029,0.5547002,0,1,0,0)' width='7.2111053' x='510.78668' y='-314.33347'/>
|
||||
<rect height='8.0000086' id='rect7868' style='opacity:0.5;color:#000000;fill:#bebebe;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1.39999998;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:new' transform='matrix(-0.86824295,0.49613928,0,1,0,0)' width='8.0622425' x='-505.61908' y='219.8575'/>
|
||||
<path inkscape:connector-curvature='0' d='m 431.53145,-28 -5.875,-3.65625 6.8125,-3.34375 6.03125,3 z' id='path7870' sodipodi:nodetypes='ccccc' style='color:#000000;fill:#bebebe;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1.39999998;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:new'/>
|
||||
</g>
|
||||
</svg>
|
After Width: | Height: | Size: 3.3 KiB |
@@ -142,8 +142,11 @@ static void
|
||||
add_item (GtkWidget *button, gpointer data)
|
||||
{
|
||||
Item foo;
|
||||
GtkTreeIter iter;
|
||||
GtkTreeModel *model = (GtkTreeModel *)data;
|
||||
GtkTreeIter current, iter;
|
||||
GtkTreePath *path;
|
||||
GtkTreeModel *model;
|
||||
GtkTreeViewColumn *column;
|
||||
GtkTreeView *treeview = (GtkTreeView *)data;
|
||||
|
||||
g_return_if_fail (articles != NULL);
|
||||
|
||||
@@ -152,12 +155,26 @@ add_item (GtkWidget *button, gpointer data)
|
||||
foo.yummy = 50;
|
||||
g_array_append_vals (articles, &foo, 1);
|
||||
|
||||
gtk_list_store_append (GTK_LIST_STORE (model), &iter);
|
||||
/* Insert a new row below the current one */
|
||||
gtk_tree_view_get_cursor (treeview, &path, NULL);
|
||||
model = gtk_tree_view_get_model (treeview);
|
||||
gtk_tree_model_get_iter (model, ¤t, path);
|
||||
gtk_tree_path_free (path);
|
||||
|
||||
/* Set the data for the new row */
|
||||
gtk_list_store_insert_after (GTK_LIST_STORE (model), &iter, ¤t);
|
||||
gtk_list_store_set (GTK_LIST_STORE (model), &iter,
|
||||
COLUMN_ITEM_NUMBER, foo.number,
|
||||
COLUMN_ITEM_PRODUCT, foo.product,
|
||||
COLUMN_ITEM_YUMMY, foo.yummy,
|
||||
-1);
|
||||
|
||||
/* Move focus to the new row */
|
||||
path = gtk_tree_model_get_path (model, &iter);
|
||||
column = gtk_tree_view_get_column (treeview, 0);
|
||||
gtk_tree_view_set_cursor (treeview, path, column, FALSE);
|
||||
|
||||
gtk_tree_path_free (path);
|
||||
}
|
||||
|
||||
static void
|
||||
@@ -368,7 +385,7 @@ do_editable_cells (GtkWidget *do_widget)
|
||||
|
||||
button = gtk_button_new_with_label ("Add item");
|
||||
g_signal_connect (button, "clicked",
|
||||
G_CALLBACK (add_item), items_model);
|
||||
G_CALLBACK (add_item), treeview);
|
||||
gtk_box_pack_start (GTK_BOX (hbox), button, TRUE, TRUE, 0);
|
||||
|
||||
button = gtk_button_new_with_label ("Remove item");
|
||||
|
@@ -77,6 +77,11 @@
|
||||
<signal name="selected-rows-changed" handler="selected_context_changed"/>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkVSeparator">
|
||||
<property name="visible">True</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkBox" id="content_box">
|
||||
<property name="visible">True</property>
|
||||
@@ -99,7 +104,6 @@
|
||||
<property name="expand">True</property>
|
||||
<property name="hscrollbar-policy">never</property>
|
||||
<property name="vscrollbar-policy">automatic</property>
|
||||
<property name="shadow-type">in</property>
|
||||
<child>
|
||||
<object class="GtkIconView" id="list">
|
||||
<property name="visible">True</property>
|
||||
|
@@ -5,23 +5,23 @@ bin_PROGRAMS = gtk3-widget-factory
|
||||
desktopdir = $(datadir)/applications
|
||||
dist_desktop_DATA = gtk3-widget-factory.desktop
|
||||
|
||||
gtk3_widget_factory_SOURCES = \
|
||||
widget-factory.c \
|
||||
gtk3_widget_factory_SOURCES = \
|
||||
widget-factory.c \
|
||||
widget_factory_resources.c
|
||||
|
||||
BUILT_SOURCES = \
|
||||
BUILT_SOURCES = \
|
||||
widget_factory_resources.c
|
||||
|
||||
gtk3_widget_factory_DEPENDENCIES = \
|
||||
gtk3_widget_factory_DEPENDENCIES = \
|
||||
$(top_builddir)/gtk/libgtk-3.la
|
||||
|
||||
gtk3_widget_factory_CPPFLAGS = \
|
||||
gtk3_widget_factory_CPPFLAGS = \
|
||||
-I$(top_srcdir) \
|
||||
$(GTK_DEBUG_FLAGS) \
|
||||
$(GTK_DEP_CFLAGS) \
|
||||
$(LIBCANBERRA_CFLAGS)
|
||||
|
||||
gtk3_widget_factory_LDADD = \
|
||||
gtk3_widget_factory_LDADD = \
|
||||
$(top_builddir)/gdk/libgdk-3.la \
|
||||
$(top_builddir)/gtk/libgtk-3.la \
|
||||
$(GTK_DEP_LIBS) \
|
||||
@@ -40,14 +40,14 @@ appsicon32dir = $(iconthemedir)/32x32/apps
|
||||
appsicon48dir = $(iconthemedir)/48x48/apps
|
||||
appsicon256dir = $(iconthemedir)/256x256/apps
|
||||
|
||||
dist_appsicon16_DATA = data/16x16/gtk3-widget-factory.png
|
||||
dist_appsicon22_DATA = data/22x22/gtk3-widget-factory.png
|
||||
dist_appsicon24_DATA = data/24x24/gtk3-widget-factory.png
|
||||
dist_appsicon32_DATA = data/32x32/gtk3-widget-factory.png
|
||||
dist_appsicon48_DATA = data/48x48/gtk3-widget-factory.png
|
||||
dist_appsicon256_DATA = data/256x256/gtk3-widget-factory.png
|
||||
dist_appsicon16_DATA = data/16x16/gtk3-widget-factory.png data/16x16/gtk3-widget-factory-symbolic.symbolic.png
|
||||
dist_appsicon22_DATA = data/22x22/gtk3-widget-factory.png data/22x22/gtk3-widget-factory-symbolic.symbolic.png
|
||||
dist_appsicon24_DATA = data/24x24/gtk3-widget-factory.png data/24x24/gtk3-widget-factory-symbolic.symbolic.png
|
||||
dist_appsicon32_DATA = data/32x32/gtk3-widget-factory.png data/32x32/gtk3-widget-factory-symbolic.symbolic.png
|
||||
dist_appsicon48_DATA = data/48x48/gtk3-widget-factory.png data/48x48/gtk3-widget-factory-symbolic.symbolic.png
|
||||
dist_appsicon256_DATA = data/256x256/gtk3-widget-factory.png data/256x256/gtk3-widget-factory-symbolic.symbolic.png
|
||||
|
||||
update_icon_cache = $(GTK_UPDATE_ICON_CACHE) --ignore-theme-index --force
|
||||
update_icon_cache = gtk-update-icon-cache --ignore-theme-index --force
|
||||
|
||||
install-data-hook: install-update-icon-cache
|
||||
uninstall-hook: uninstall-update-icon-cache
|
||||
@@ -60,9 +60,11 @@ uninstall-update-icon-cache:
|
||||
$(AM_V_at)$(POST_UNINSTALL)
|
||||
test -n "$(DESTDIR)" || $(update_icon_cache) "$(iconthemedir)"
|
||||
|
||||
EXTRA_DIST += \
|
||||
widget-factory.ui \
|
||||
menus.ui \
|
||||
widget-factory.gresource.xml
|
||||
EXTRA_DIST += \
|
||||
widget-factory.ui \
|
||||
menus.ui \
|
||||
widget-factory.gresource.xml \
|
||||
data/source.svg \
|
||||
data/symbolic-source.svg
|
||||
|
||||
-include $(top_srcdir)/git.mk
|
||||
|
After Width: | Height: | Size: 237 B |
After Width: | Height: | Size: 332 B |
After Width: | Height: | Size: 336 B |
After Width: | Height: | Size: 2.9 KiB |
After Width: | Height: | Size: 369 B |
After Width: | Height: | Size: 495 B |
32
demos/widget-factory/data/symbolic-source.svg
Normal file
@@ -0,0 +1,32 @@
|
||||
<?xml version='1.0' encoding='UTF-8' standalone='no'?>
|
||||
<!-- Created with Inkscape (http://www.inkscape.org/) -->
|
||||
|
||||
<svg xmlns:cc='http://creativecommons.org/ns#' xmlns:dc='http://purl.org/dc/elements/1.1/' sodipodi:docname='gtk3-widget-factory-symbolic.svg' height='16.03125' id='svg7384' xmlns:inkscape='http://www.inkscape.org/namespaces/inkscape' xmlns:osb='http://www.openswatchbook.org/uri/2009/osb' xmlns:rdf='http://www.w3.org/1999/02/22-rdf-syntax-ns#' xmlns:sodipodi='http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd' xmlns:svg='http://www.w3.org/2000/svg' inkscape:version='0.48.5 r10040' version='1.1' width='16' xmlns='http://www.w3.org/2000/svg'>
|
||||
<metadata id='metadata90'>
|
||||
<rdf:RDF>
|
||||
<cc:Work rdf:about=''>
|
||||
<dc:format>image/svg+xml</dc:format>
|
||||
<dc:type rdf:resource='http://purl.org/dc/dcmitype/StillImage'/>
|
||||
<dc:title>Gnome Symbolic Icon Theme</dc:title>
|
||||
</cc:Work>
|
||||
</rdf:RDF>
|
||||
</metadata>
|
||||
<sodipodi:namedview inkscape:bbox-paths='true' bordercolor='#666666' borderopacity='1' inkscape:current-layer='layer9' inkscape:cx='15.183262' inkscape:cy='0.30876' gridtolerance='10' inkscape:guide-bbox='true' guidetolerance='10' id='namedview88' inkscape:object-nodes='false' inkscape:object-paths='false' objecttolerance='10' pagecolor='#555753' inkscape:pageopacity='1' inkscape:pageshadow='2' showborder='false' showgrid='false' showguides='true' inkscape:snap-bbox='true' inkscape:snap-bbox-midpoints='false' inkscape:snap-global='true' inkscape:snap-grids='true' inkscape:snap-nodes='true' inkscape:snap-others='false' inkscape:snap-to-guides='true' inkscape:window-height='1375' inkscape:window-maximized='1' inkscape:window-width='2560' inkscape:window-x='0' inkscape:window-y='27' inkscape:zoom='16'>
|
||||
<inkscape:grid empspacing='2' enabled='true' id='grid4866' originx='-203px' originy='-251.96875px' snapvisiblegridlinesonly='true' spacingx='1px' spacingy='1px' type='xygrid' visible='true'/>
|
||||
</sodipodi:namedview>
|
||||
<title id='title9167'>Gnome Symbolic Icon Theme</title>
|
||||
<defs id='defs7386'>
|
||||
<linearGradient id='linearGradient7212' osb:paint='solid'>
|
||||
<stop id='stop7214' offset='0' style='stop-color:#000000;stop-opacity:1;'/>
|
||||
</linearGradient>
|
||||
</defs>
|
||||
<g inkscape:groupmode='layer' id='layer9' inkscape:label='apps' style='display:inline' transform='translate(-444.0002,35)'>
|
||||
|
||||
<path inkscape:connector-curvature='0' d='m 446.21875,-34 c -0.64785,0 -1.1875,0.539653 -1.1875,1.1875 l 0,4.625 c 0,0.647847 0.53965,1.1875 1.1875,1.1875 l 11.65625,0 c 0.64785,0 1.15625,-0.539653 1.15625,-1.1875 l 0,-4.625 c 0,-0.647847 -0.5084,-1.1875 -1.15625,-1.1875 l -11.65625,0 z m 0,1 11.65625,0 c 0.11114,0 0.15625,0.07636 0.15625,0.1875 l 0,4.625 c 0,0.111144 -0.0451,0.1875 -0.15625,0.1875 l -11.65625,0 c -0.11114,0 -0.1875,-0.07636 -0.1875,-0.1875 l 0,-4.625 c 0,-0.111144 0.0764,-0.1875 0.1875,-0.1875 z' id='rect7030' style='font-size:medium;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-indent:0;text-align:start;text-decoration:none;line-height:normal;letter-spacing:normal;word-spacing:normal;text-transform:none;direction:ltr;block-progression:tb;writing-mode:lr-tb;text-anchor:start;baseline-shift:baseline;color:#000000;fill:#bebebe;fill-opacity:1;stroke:none;stroke-width:1;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:new;font-family:Sans;-inkscape-font-specification:Sans'/>
|
||||
<path inkscape:connector-curvature='0' d='m 454.0002,-32 0,1 0,0.0312 1.53125,1.375 1.46875,-1.4062 0,-1 -0.75781,0 -0.73828,0.74609 L 454.77754,-32 z' id='path7800' sodipodi:nodetypes='cccccccccc' style='font-size:medium;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-indent:0;text-align:start;text-decoration:none;line-height:normal;letter-spacing:normal;word-spacing:normal;text-transform:none;direction:ltr;block-progression:tb;writing-mode:lr-tb;text-anchor:start;baseline-shift:baseline;color:#000000;fill:#bebebe;fill-opacity:1;stroke:none;stroke-width:1.39999998;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:new;font-family:Sans;-inkscape-font-specification:Sans'/>
|
||||
<path inkscape:connector-curvature='0' d='m 446.21875,-26 c -0.64785,0 -1.1875,0.539653 -1.1875,1.1875 l 0,4.65625 c 0,0.647847 0.53965,1.1875 1.1875,1.1875 l 11.65625,0 c 0.64785,0 1.15625,-0.539653 1.15625,-1.1875 l 0,-4.65625 c 0,-0.647847 -0.5084,-1.1875 -1.15625,-1.1875 l -11.65625,0 z m 0,1 11.65625,0 c 0.11114,0 0.15625,0.07636 0.15625,0.1875 l 0,4.65625 c 0,0.111144 -0.0451,0.1875 -0.15625,0.1875 l -11.65625,0 c -0.11114,0 -0.1875,-0.07636 -0.1875,-0.1875 l 0,-4.65625 c 0,-0.111144 0.0764,-0.1875 0.1875,-0.1875 z' id='rect7811' style='font-size:medium;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-indent:0;text-align:start;text-decoration:none;line-height:normal;letter-spacing:normal;word-spacing:normal;text-transform:none;direction:ltr;block-progression:tb;writing-mode:lr-tb;text-anchor:start;baseline-shift:baseline;color:#000000;fill:#bebebe;fill-opacity:1;stroke:none;stroke-width:1;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:new;font-family:Sans;-inkscape-font-specification:Sans'/>
|
||||
<rect height='2' id='rect7813' rx='0' ry='0' style='color:#000000;fill:#bebebe;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1.39999998;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:new' width='8' x='448.00021' y='-24'/>
|
||||
<rect height='1' id='rect7815' rx='0' ry='0' style='opacity:0.3;color:#000000;fill:#bebebe;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1.39999998;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:new' width='12.860504' x='445.53082' y='-29'/>
|
||||
<rect height='1' id='rect7817' rx='0' ry='0' style='opacity:0.3;color:#000000;fill:#bebebe;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1.39999998;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:new' width='12.860504' x='445.53085' y='-20.96875'/>
|
||||
</g>
|
||||
</svg>
|
After Width: | Height: | Size: 6.0 KiB |
@@ -547,6 +547,24 @@ populate_model (GtkTreeStore *store)
|
||||
gtk_tree_store_set (store, &iter,
|
||||
0, "Gisele of Aquitaine",
|
||||
-1);
|
||||
gtk_tree_store_append (store, &iter, NULL);
|
||||
gtk_tree_store_set (store, &iter, 3, TRUE, -1);
|
||||
gtk_tree_store_append (store, &iter, NULL);
|
||||
gtk_tree_store_set (store, &iter,
|
||||
0, "Attila the Hun",
|
||||
1, "ca. 390",
|
||||
2, "453",
|
||||
-1);
|
||||
}
|
||||
|
||||
static gboolean
|
||||
row_separator_func (GtkTreeModel *model, GtkTreeIter *iter, gpointer data)
|
||||
{
|
||||
gboolean is_sep;
|
||||
|
||||
gtk_tree_model_get (model, iter, 3, &is_sep, -1);
|
||||
|
||||
return is_sep;
|
||||
}
|
||||
|
||||
static void
|
||||
@@ -1235,6 +1253,7 @@ activate (GApplication *app)
|
||||
|
||||
widget = (GtkWidget *)gtk_builder_get_object (builder, "charletree");
|
||||
populate_model ((GtkTreeStore *)gtk_tree_view_get_model (GTK_TREE_VIEW (widget)));
|
||||
gtk_tree_view_set_row_separator_func (GTK_TREE_VIEW (widget), row_separator_func, NULL, NULL);
|
||||
gtk_tree_view_expand_all (GTK_TREE_VIEW (widget));
|
||||
|
||||
populate_colors ((GtkWidget *)gtk_builder_get_object (builder, "munsell"));
|
||||
|
@@ -94,6 +94,13 @@
|
||||
<property name="step_increment">1</property>
|
||||
<property name="page_increment">10</property>
|
||||
</object>
|
||||
<object class="GtkAdjustment" id="adjustment3">
|
||||
<property name="upper">4</property>
|
||||
<property name="lower">0</property>
|
||||
<property name="value">1</property>
|
||||
<property name="step_increment">1</property>
|
||||
<property name="page_increment">1</property>
|
||||
</object>
|
||||
<object class="GtkAdjustment" id="pg_adjustment">
|
||||
<property name="upper">99</property>
|
||||
<property name="lower">1</property>
|
||||
@@ -332,6 +339,7 @@ Suspendisse feugiat quam quis dolor accumsan cursus.</property>
|
||||
<column type="gchararray"/>
|
||||
<column type="gchararray"/>
|
||||
<column type="gchararray"/>
|
||||
<column type="gboolean"/>
|
||||
</columns>
|
||||
</object>
|
||||
<object class="GtkApplicationWindow" id="window">
|
||||
@@ -1259,6 +1267,29 @@ Suspendisse feugiat quam quis dolor accumsan cursus.</property>
|
||||
<property name="position">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkScale" id="scale5">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="draw_value">False</property>
|
||||
<property name="has_origin">False</property>
|
||||
<property name="round_digits">0</property>
|
||||
<property name="adjustment">adjustment3</property>
|
||||
<property name="restrict_to_fill_level">False</property>
|
||||
<marks>
|
||||
<mark value="0" position="bottom"/>
|
||||
<mark value="1" position="bottom"/>
|
||||
<mark value="2" position="bottom"/>
|
||||
<mark value="3" position="bottom"/>
|
||||
<mark value="4" position="bottom"/>
|
||||
</marks>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="position">2</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkBox" id="box25">
|
||||
<property name="visible">True</property>
|
||||
@@ -1356,7 +1387,7 @@ Suspendisse feugiat quam quis dolor accumsan cursus.</property>
|
||||
<packing>
|
||||
<property name="expand">True</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="position">2</property>
|
||||
<property name="position">3</property>
|
||||
</packing>
|
||||
</child>
|
||||
</object>
|
||||
|
@@ -1290,9 +1290,6 @@ gdk_gl_context_get_window
|
||||
gdk_gl_context_make_current
|
||||
gdk_gl_context_clear_current
|
||||
gdk_gl_context_get_current
|
||||
GDK_GL_ERROR
|
||||
GDK_TYPE_GL_ERROR
|
||||
GDK_TYPE_GL_PROFILE
|
||||
GdkGLProfile
|
||||
GdkGLError
|
||||
|
||||
@@ -1305,4 +1302,7 @@ GDK_GL_CONTEXT_GET_CLASS
|
||||
GDK_IS_GL_CONTEXT_CLASS
|
||||
gdk_gl_context_get_type
|
||||
gdk_gl_error_quark
|
||||
GDK_GL_ERROR
|
||||
GDK_TYPE_GL_ERROR
|
||||
GDK_TYPE_GL_PROFILE
|
||||
</SECTION>
|
||||
|
@@ -416,11 +416,6 @@ How to compile GTK+ itself
|
||||
<arg choice="plain">--enable-introspection=[no/auto/yes]</arg>
|
||||
</group>
|
||||
<sbr/>
|
||||
<group>
|
||||
<arg choice="plain">--enable-gtk2-dependency</arg>
|
||||
<arg choice="plain">--disable-gtk2-dependency</arg>
|
||||
</group>
|
||||
<sbr/>
|
||||
<group>
|
||||
<arg choice="plain">--enable-installed-tests</arg>
|
||||
<arg choice="plain">--disable-installed-tests</arg>
|
||||
@@ -637,19 +632,6 @@ How to compile GTK+ itself
|
||||
</para>
|
||||
</formalpara>
|
||||
|
||||
<formalpara>
|
||||
<title><systemitem>--enable-gtk2-dependency</systemitem> or
|
||||
<systemitem>--disable-gtk2-dependency</systemitem></title>
|
||||
|
||||
<para>
|
||||
Whether to rely on an exiting gtk-update-icon-cache utility
|
||||
instead of building our own. Distributions which are shipping
|
||||
both GTK+ 2.x and GTK+ 3 may want to use this option to
|
||||
avoid file conflicts between these packages.
|
||||
The default is to build gtk-update-icon-cache.
|
||||
</para>
|
||||
</formalpara>
|
||||
|
||||
<formalpara>
|
||||
<title><systemitem>--enable-installed-tests</systemitem> or
|
||||
<systemitem>--disable-installed-tests</systemitem></title>
|
||||
|
@@ -302,7 +302,10 @@
|
||||
|
||||
<para>The full, buildable sources for these examples can be found
|
||||
in the examples/ directory of the GTK+ source distribution, or
|
||||
<ulink url="https://git.gnome.org/browse/gtk+/tree/examples">online</ulink> in the GTK+ git repository.</para>
|
||||
<ulink url="https://git.gnome.org/browse/gtk+/tree/examples">online</ulink> in the GTK+ git repository.
|
||||
You can build each example separately by using make with the <filename>Makefile.example</filename>
|
||||
file. For more information, see the <filename>README</filename> included in the
|
||||
examples directory.</para>
|
||||
|
||||
<section>
|
||||
<title>A trivial application</title>
|
||||
|
@@ -1196,6 +1196,7 @@ gtk_entry_get_input_purpose
|
||||
GtkInputHints
|
||||
gtk_entry_set_input_hints
|
||||
gtk_entry_get_input_hints
|
||||
gtk_entry_grab_focus_without_selecting
|
||||
|
||||
<SUBSECTION Standard>
|
||||
GTK_ENTRY
|
||||
@@ -3560,6 +3561,7 @@ gtk_text_buffer_insert_range
|
||||
gtk_text_buffer_insert_range_interactive
|
||||
gtk_text_buffer_insert_with_tags
|
||||
gtk_text_buffer_insert_with_tags_by_name
|
||||
gtk_text_buffer_insert_markup
|
||||
gtk_text_buffer_delete
|
||||
gtk_text_buffer_delete_interactive
|
||||
gtk_text_buffer_backspace
|
||||
@@ -7954,6 +7956,8 @@ gtk_popover_set_position
|
||||
gtk_popover_get_position
|
||||
gtk_popover_set_modal
|
||||
gtk_popover_get_modal
|
||||
<SUBSECTION Private>
|
||||
gtk_popover_get_type
|
||||
</SECTION>
|
||||
|
||||
<SECTION>
|
||||
@@ -7962,6 +7966,8 @@ gtk_popover_get_modal
|
||||
GtkPopoverMenu
|
||||
gtk_popover_menu_new
|
||||
gtk_popover_menu_open_submenu
|
||||
<SUBSECTION Private>
|
||||
gtk_popover_menu_get_type
|
||||
</SECTION>
|
||||
|
||||
<SECTION>
|
||||
@@ -8224,12 +8230,21 @@ GtkGLArea
|
||||
GtkGLAreaClass
|
||||
gtk_gl_area_new
|
||||
gtk_gl_area_get_context
|
||||
gtk_gl_area_make_current
|
||||
gtk_gl_area_queue_render
|
||||
gtk_gl_area_set_error
|
||||
gtk_gl_area_get_error
|
||||
gtk_gl_area_set_profile
|
||||
gtk_gl_area_get_profile
|
||||
<SUBSECTION>
|
||||
gtk_gl_area_set_has_alpha
|
||||
gtk_gl_area_get_has_alpha
|
||||
gtk_gl_area_set_has_depth_buffer
|
||||
gtk_gl_area_get_has_depth_buffer
|
||||
gtk_gl_area_make_current
|
||||
gtk_gl_area_set_has_stencil_buffer
|
||||
gtk_gl_area_get_has_stencil_buffer
|
||||
gtk_gl_area_set_auto_render
|
||||
gtk_gl_area_get_auto_render
|
||||
<SUBSECTION Standard>
|
||||
GTK_TYPE_GL_AREA
|
||||
GTK_GL_AREA
|
||||
|
@@ -1,3 +1,5 @@
|
||||
AUTOMAKE_OPTIONS = subdir-objects
|
||||
|
||||
include $(top_srcdir)/Makefile.decl
|
||||
|
||||
AM_CPPFLAGS = \
|
||||
@@ -32,8 +34,8 @@ doc_shooter_SOURCES= \
|
||||
shooter.c \
|
||||
widgets.c \
|
||||
widgets.h \
|
||||
$(top_srcdir)/tests/gtkgears.c \
|
||||
$(top_srcdir)/tests/gtkgears.h
|
||||
../../tests/gtkgears.c \
|
||||
../../tests/gtkgears.h
|
||||
|
||||
clean-local:
|
||||
for file in *.png; do \
|
||||
|
12
examples/README
Normal file
@@ -0,0 +1,12 @@
|
||||
= Examples =
|
||||
|
||||
== Building the examples ==
|
||||
|
||||
The examples in this directory are built alongside the rest of GTK+.
|
||||
|
||||
The examples under the `application[1-10]` directories are also included in
|
||||
the GTK+ API reference documentation, and can be built independently, using
|
||||
the system libraries, by doing:
|
||||
|
||||
$ cd application1
|
||||
$ make -f Makefile.example
|
@@ -81,6 +81,7 @@ activate (GApplication *app,
|
||||
return;
|
||||
|
||||
win = gtk_application_window_new (GTK_APPLICATION (app));
|
||||
gtk_window_set_default_size (GTK_WINDOW (win), 200, 300);
|
||||
|
||||
doc_actions = g_simple_action_group_new ();
|
||||
g_action_map_add_action_entries (G_ACTION_MAP (doc_actions), doc_entries, G_N_ELEMENTS (doc_entries), win);
|
||||
@@ -110,7 +111,8 @@ activate (GApplication *app,
|
||||
gtk_button_set_label (GTK_BUTTON (button), "Menu");
|
||||
gtk_widget_insert_action_group (button, "doc", G_ACTION_GROUP (doc_actions));
|
||||
gtk_menu_button_set_menu_model (GTK_MENU_BUTTON (button), G_MENU_MODEL (button_menu));
|
||||
|
||||
gtk_widget_set_halign (GTK_WIDGET (button), GTK_ALIGN_CENTER);
|
||||
gtk_widget_set_valign (GTK_WIDGET (button), GTK_ALIGN_START);
|
||||
gtk_container_add (GTK_CONTAINER (win), button);
|
||||
gtk_container_set_border_width (GTK_CONTAINER (win), 12);
|
||||
gtk_widget_show_all (win);
|
||||
|
@@ -1,21 +1,20 @@
|
||||
AM_CPPFLAGS = \
|
||||
-I$(top_srcdir) \
|
||||
-I$(top_srcdir)/gdk \
|
||||
-I$(top_builddir)/gdk \
|
||||
$(GTK_DEBUG_FLAGS) \
|
||||
GTK_CFLAGS = \
|
||||
-I$(top_srcdir) \
|
||||
$(GTK_DEP_CFLAGS)
|
||||
|
||||
LDADD = \
|
||||
$(top_builddir)/gtk/libgtk-3.la \
|
||||
$(top_builddir)/gdk/libgdk-3.la \
|
||||
GTK_LIBS = \
|
||||
$(top_builddir)/gtk/libgtk-3.la \
|
||||
$(top_builddir)/gdk/libgdk-3.la \
|
||||
$(GTK_DEP_LIBS)
|
||||
|
||||
|
||||
noinst_PROGRAMS = exampleapp
|
||||
|
||||
exampleapp_SOURCES = \
|
||||
main.c \
|
||||
exampleapp.c exampleapp.h \
|
||||
exampleapp_CFLAGS = $(GTK_CFLAGS)
|
||||
exampleapp_LDADD = $(GTK_LIBS)
|
||||
exampleapp_SOURCES = \
|
||||
main.c \
|
||||
exampleapp.c exampleapp.h \
|
||||
exampleappwin.c exampleappwin.h
|
||||
|
||||
-include $(top_srcdir)/git.mk
|
||||
|
20
examples/application1/Makefile.example
Normal file
@@ -0,0 +1,20 @@
|
||||
CC = gcc
|
||||
PKGCONFIG = $(shell which pkg-config)
|
||||
CFLAGS = `$(PKGCONFIG) --cflags gtk+-3.0`
|
||||
LIBS = `$(PKGCONFIG) --libs gtk+-3.0`
|
||||
|
||||
SRC = main.c exampleapp.c exampleappwin.c
|
||||
|
||||
OBJS = $(SRC:.c=.o)
|
||||
|
||||
all: exampleapp
|
||||
|
||||
%.o: %.c
|
||||
$(CC) -c -o $(@F) $(CFLAGS) $<
|
||||
|
||||
exampleapp: $(OBJS)
|
||||
$(CC) -o $(@F) $(LIBS) $(OBJS)
|
||||
|
||||
clean:
|
||||
rm -f $(OBJS)
|
||||
rm -f exampleapp
|
@@ -1,6 +1,7 @@
|
||||
#include <gtk/gtk.h>
|
||||
|
||||
#include "exampleapp.h"
|
||||
#include "exampleappwin.h"
|
||||
#include <gtk/gtk.h>
|
||||
|
||||
struct _ExampleAppWindow
|
||||
{
|
||||
|
@@ -1,5 +1,6 @@
|
||||
#include <gtk/gtk.h>
|
||||
#include <exampleapp.h>
|
||||
|
||||
#include "exampleapp.h"
|
||||
|
||||
int
|
||||
main (int argc, char *argv[])
|
||||
|
@@ -1,34 +1,33 @@
|
||||
AM_CPPFLAGS = \
|
||||
-I$(top_srcdir) \
|
||||
-I$(top_srcdir)/gdk \
|
||||
-I$(top_builddir)/gdk \
|
||||
$(GTK_DEBUG_FLAGS) \
|
||||
GTK_CFLAGS = \
|
||||
-I$(top_srcdir) \
|
||||
$(GTK_DEP_CFLAGS)
|
||||
|
||||
LDADD = \
|
||||
$(top_builddir)/gtk/libgtk-3.la \
|
||||
$(top_builddir)/gdk/libgdk-3.la \
|
||||
GTK_LIBS = \
|
||||
$(top_builddir)/gtk/libgtk-3.la \
|
||||
$(top_builddir)/gdk/libgdk-3.la \
|
||||
$(GTK_DEP_LIBS)
|
||||
|
||||
|
||||
noinst_PROGRAMS = exampleapp
|
||||
|
||||
exampleapp_SOURCES = \
|
||||
main.c \
|
||||
exampleapp.c exampleapp.h \
|
||||
exampleappwin.c exampleappwin.h \
|
||||
exampleappprefs.c exampleappprefs.h \
|
||||
exampleapp_CFLAGS = $(GTK_CFLAGS)
|
||||
exampleapp_LDADD = $(GTK_LIBS)
|
||||
exampleapp_SOURCES = \
|
||||
main.c \
|
||||
exampleapp.c exampleapp.h \
|
||||
exampleappwin.c exampleappwin.h \
|
||||
exampleappprefs.c exampleappprefs.h \
|
||||
resources.c
|
||||
|
||||
BUILT_SOURCES = \
|
||||
resources.c \
|
||||
BUILT_SOURCES = \
|
||||
resources.c \
|
||||
gschemas.compiled
|
||||
|
||||
resources.c: exampleapp.gresource.xml $(shell $(GLIB_COMPILE_RESOURCES) --sourcedir=$(srcdir) --generate-dependencies $(srcdir)/exampleapp.gresource.xml)
|
||||
$(AM_V_GEN) $(GLIB_COMPILE_RESOURCES) $(srcdir)/exampleapp.gresource.xml \
|
||||
--target=$@ --sourcedir=$(srcdir) --generate-source
|
||||
|
||||
gsettings_SCHEMAS = \
|
||||
gsettings_SCHEMAS = \
|
||||
org.gtk.exampleapp.gschema.xml
|
||||
|
||||
@GSETTINGS_RULES@
|
||||
@@ -36,15 +35,15 @@ gsettings_SCHEMAS = \
|
||||
gschemas.compiled: org.gtk.exampleapp.gschema.xml
|
||||
$(GLIB_COMPILE_SCHEMAS) .
|
||||
|
||||
EXTRA_DIST = \
|
||||
window.ui \
|
||||
app-menu.ui \
|
||||
prefs.ui \
|
||||
gears-menu.ui \
|
||||
exampleapp.gresource.xml \
|
||||
EXTRA_DIST = \
|
||||
window.ui \
|
||||
app-menu.ui \
|
||||
prefs.ui \
|
||||
gears-menu.ui \
|
||||
exampleapp.gresource.xml \
|
||||
org.gtk.exampleapp.gschema.xml
|
||||
|
||||
CLEANFILES = \
|
||||
CLEANFILES = \
|
||||
gschemas.compiled
|
||||
|
||||
-include $(top_srcdir)/git.mk
|
||||
|
34
examples/application10/Makefile.example
Normal file
@@ -0,0 +1,34 @@
|
||||
CC = gcc
|
||||
PKGCONFIG = $(shell which pkg-config)
|
||||
CFLAGS = `$(PKGCONFIG) --cflags gtk+-3.0`
|
||||
LIBS = `$(PKGCONFIG) --libs gtk+-3.0`
|
||||
GLIB_COMPILE_RESOURCES = `$(PKGCONFIG) --variable=glib_compile_resources gio-2.0`
|
||||
GLIB_COMPILE_SCHEMAS = `$(PKGCONFIG) --variable=glib_compile_schemas gio-2.0`
|
||||
|
||||
SRC = resources.c exampleapp.c exampleappwin.c exampleappprefs.c main.c
|
||||
|
||||
OBJS = $(SRC:.c=.o)
|
||||
|
||||
all: exampleapp
|
||||
|
||||
org.gtk.exampleapp.gschema.valid: org.gtk.exampleapp.gschema.xml
|
||||
$(GLIB_COMPILE_SCHEMAS) --strict --dry-run --schema-file=$< && mkdir -p $(@D) && touch $@
|
||||
|
||||
gschemas.compiled: org.gtk.exampleapp.gschema.valid
|
||||
$(GLIB_COMPILE_SCHEMAS) .
|
||||
|
||||
resources.c: exampleapp.gresource.xml $(shell $(GLIB_COMPILE_RESOURCES) --sourcedir=. --generate-dependencies exampleapp.gresource.xml)
|
||||
$(GLIB_COMPILE_RESOURCES) exampleapp.gresource.xml --target=$@ --sourcedir=. --generate-source
|
||||
|
||||
%.o: %.c
|
||||
$(CC) -c -o $(@F) $(CFLAGS) $<
|
||||
|
||||
exampleapp: $(OBJS) gschemas.compiled
|
||||
$(CC) -o $(@F) $(LIBS) $(OBJS)
|
||||
|
||||
clean:
|
||||
rm -f org.gtk.exampleapp.gschema.valid
|
||||
rm -f gschemas.compiled
|
||||
rm -f resources.c
|
||||
rm -f $(OBJS)
|
||||
rm -f exampleapp
|
@@ -1,6 +1,7 @@
|
||||
#include <gtk/gtk.h>
|
||||
|
||||
#include "exampleapp.h"
|
||||
#include "exampleappwin.h"
|
||||
#include <gtk/gtk.h>
|
||||
|
||||
struct _ExampleAppWindow
|
||||
{
|
||||
|
@@ -1,5 +1,6 @@
|
||||
#include <gtk/gtk.h>
|
||||
#include <exampleapp.h>
|
||||
|
||||
#include "exampleapp.h"
|
||||
|
||||
int
|
||||
main (int argc, char *argv[])
|
||||
|
@@ -1,22 +1,21 @@
|
||||
AM_CPPFLAGS = \
|
||||
-I$(top_srcdir) \
|
||||
-I$(top_srcdir)/gdk \
|
||||
-I$(top_builddir)/gdk \
|
||||
$(GTK_DEBUG_FLAGS) \
|
||||
GTK_CFLAGS = \
|
||||
-I$(top_srcdir) \
|
||||
$(GTK_DEP_CFLAGS)
|
||||
|
||||
LDADD = \
|
||||
$(top_builddir)/gtk/libgtk-3.la \
|
||||
$(top_builddir)/gdk/libgdk-3.la \
|
||||
GTK_LIBS = \
|
||||
$(top_builddir)/gtk/libgtk-3.la \
|
||||
$(top_builddir)/gdk/libgdk-3.la \
|
||||
$(GTK_DEP_LIBS)
|
||||
|
||||
|
||||
noinst_PROGRAMS = exampleapp
|
||||
|
||||
exampleapp_SOURCES = \
|
||||
main.c \
|
||||
exampleapp.c exampleapp.h \
|
||||
exampleappwin.c exampleappwin.h \
|
||||
exampleapp_CFLAGS = $(GTK_CFLAGS)
|
||||
exampleapp_LDADD = $(GTK_LIBS)
|
||||
exampleapp_SOURCES = \
|
||||
main.c \
|
||||
exampleapp.c exampleapp.h \
|
||||
exampleappwin.c exampleappwin.h \
|
||||
resources.c
|
||||
|
||||
BUILT_SOURCES = resources.c
|
||||
@@ -25,8 +24,8 @@ resources.c: exampleapp.gresource.xml window.ui
|
||||
$(AM_V_GEN) $(GLIB_COMPILE_RESOURCES) $(srcdir)/exampleapp.gresource.xml \
|
||||
--target=$@ --sourcedir=$(srcdir) --generate-source
|
||||
|
||||
EXTRA_DIST = \
|
||||
window.ui \
|
||||
EXTRA_DIST = \
|
||||
window.ui \
|
||||
exampleapp.gresource.xml
|
||||
|
||||
-include $(top_srcdir)/git.mk
|
||||
|
25
examples/application2/Makefile.example
Normal file
@@ -0,0 +1,25 @@
|
||||
CC = gcc
|
||||
PKGCONFIG = $(shell which pkg-config)
|
||||
CFLAGS = `$(PKGCONFIG) --cflags gtk+-3.0`
|
||||
LIBS = `$(PKGCONFIG) --libs gtk+-3.0`
|
||||
GLIB_COMPILE_RESOURCES = `$(PKGCONFIG) --variable=glib_compile_resources gio-2.0`
|
||||
|
||||
SRC = resources.c exampleapp.c exampleappwin.c main.c
|
||||
|
||||
OBJS = $(SRC:.c=.o)
|
||||
|
||||
all: exampleapp
|
||||
|
||||
resources.c: exampleapp.gresource.xml window.ui
|
||||
$(GLIB_COMPILE_RESOURCES) exampleapp.gresource.xml --target=$@ --sourcedir=. --generate-source
|
||||
|
||||
%.o: %.c
|
||||
$(CC) -c -o $(@F) $(CFLAGS) $<
|
||||
|
||||
exampleapp: $(OBJS)
|
||||
$(CC) -o $(@F) $(LIBS) $(OBJS)
|
||||
|
||||
clean:
|
||||
rm -f resources.c
|
||||
rm -f $(OBJS)
|
||||
rm -f exampleapp
|
@@ -1,6 +1,7 @@
|
||||
#include <gtk/gtk.h>
|
||||
|
||||
#include "exampleapp.h"
|
||||
#include "exampleappwin.h"
|
||||
#include <gtk/gtk.h>
|
||||
|
||||
struct _ExampleAppWindow
|
||||
{
|
||||
|
@@ -1,5 +1,6 @@
|
||||
#include <gtk/gtk.h>
|
||||
#include <exampleapp.h>
|
||||
|
||||
#include "exampleapp.h"
|
||||
|
||||
int
|
||||
main (int argc, char *argv[])
|
||||
|
@@ -1,22 +1,21 @@
|
||||
AM_CPPFLAGS = \
|
||||
-I$(top_srcdir) \
|
||||
-I$(top_srcdir)/gdk \
|
||||
-I$(top_builddir)/gdk \
|
||||
$(GTK_DEBUG_FLAGS) \
|
||||
GTK_CFLAGS = \
|
||||
-I$(top_srcdir) \
|
||||
$(GTK_DEP_CFLAGS)
|
||||
|
||||
LDADD = \
|
||||
$(top_builddir)/gtk/libgtk-3.la \
|
||||
$(top_builddir)/gdk/libgdk-3.la \
|
||||
GTK_LIBS = \
|
||||
$(top_builddir)/gtk/libgtk-3.la \
|
||||
$(top_builddir)/gdk/libgdk-3.la \
|
||||
$(GTK_DEP_LIBS)
|
||||
|
||||
|
||||
noinst_PROGRAMS = exampleapp
|
||||
|
||||
exampleapp_SOURCES = \
|
||||
main.c \
|
||||
exampleapp.c exampleapp.h \
|
||||
exampleappwin.c exampleappwin.h \
|
||||
exampleapp_CFLAGS = $(GTK_CFLAGS)
|
||||
exampleapp_LDADD = $(GTK_LIBS)
|
||||
exampleapp_SOURCES = \
|
||||
main.c \
|
||||
exampleapp.c exampleapp.h \
|
||||
exampleappwin.c exampleappwin.h \
|
||||
resources.c
|
||||
|
||||
BUILT_SOURCES = resources.c
|
||||
@@ -25,8 +24,8 @@ resources.c: exampleapp.gresource.xml window.ui
|
||||
$(AM_V_GEN) $(GLIB_COMPILE_RESOURCES) $(srcdir)/exampleapp.gresource.xml \
|
||||
--target=$@ --sourcedir=$(srcdir) --generate-source
|
||||
|
||||
EXTRA_DIST = \
|
||||
window.ui \
|
||||
EXTRA_DIST = \
|
||||
window.ui \
|
||||
exampleapp.gresource.xml
|
||||
|
||||
-include $(top_srcdir)/git.mk
|
||||
|
25
examples/application3/Makefile.example
Normal file
@@ -0,0 +1,25 @@
|
||||
CC = gcc
|
||||
PKGCONFIG = $(shell which pkg-config)
|
||||
CFLAGS = `$(PKGCONFIG) --cflags gtk+-3.0`
|
||||
LIBS = `$(PKGCONFIG) --libs gtk+-3.0`
|
||||
GLIB_COMPILE_RESOURCES = `$(PKGCONFIG) --variable=glib_compile_resources gio-2.0`
|
||||
|
||||
SRC = resources.c exampleapp.c exampleappwin.c main.c
|
||||
|
||||
OBJS = $(SRC:.c=.o)
|
||||
|
||||
all: exampleapp
|
||||
|
||||
resources.c: exampleapp.gresource.xml window.ui
|
||||
$(GLIB_COMPILE_RESOURCES) exampleapp.gresource.xml --target=$@ --sourcedir=. --generate-source
|
||||
|
||||
%.o: %.c
|
||||
$(CC) -c -o $(@F) $(CFLAGS) $<
|
||||
|
||||
exampleapp: $(OBJS)
|
||||
$(CC) -o $(@F) $(LIBS) $(OBJS)
|
||||
|
||||
clean:
|
||||
rm -f resources.c
|
||||
rm -f $(OBJS)
|
||||
rm -f exampleapp
|
@@ -1,6 +1,7 @@
|
||||
#include <gtk/gtk.h>
|
||||
|
||||
#include "exampleapp.h"
|
||||
#include "exampleappwin.h"
|
||||
#include <gtk/gtk.h>
|
||||
|
||||
struct _ExampleAppWindow
|
||||
{
|
||||
|
@@ -1,5 +1,6 @@
|
||||
#include <gtk/gtk.h>
|
||||
#include <exampleapp.h>
|
||||
|
||||
#include "exampleapp.h"
|
||||
|
||||
int
|
||||
main (int argc, char *argv[])
|
||||
|
@@ -1,22 +1,21 @@
|
||||
AM_CPPFLAGS = \
|
||||
-I$(top_srcdir) \
|
||||
-I$(top_srcdir)/gdk \
|
||||
-I$(top_builddir)/gdk \
|
||||
$(GTK_DEBUG_FLAGS) \
|
||||
GTK_CFLAGS = \
|
||||
-I$(top_srcdir) \
|
||||
$(GTK_DEP_CFLAGS)
|
||||
|
||||
LDADD = \
|
||||
$(top_builddir)/gtk/libgtk-3.la \
|
||||
$(top_builddir)/gdk/libgdk-3.la \
|
||||
GTK_LIBS = \
|
||||
$(top_builddir)/gtk/libgtk-3.la \
|
||||
$(top_builddir)/gdk/libgdk-3.la \
|
||||
$(GTK_DEP_LIBS)
|
||||
|
||||
|
||||
noinst_PROGRAMS = exampleapp
|
||||
|
||||
exampleapp_SOURCES = \
|
||||
main.c \
|
||||
exampleapp.c exampleapp.h \
|
||||
exampleappwin.c exampleappwin.h \
|
||||
exampleapp_CFLAGS = $(GTK_CFLAGS)
|
||||
exampleapp_LDADD = $(GTK_LIBS)
|
||||
exampleapp_SOURCES = \
|
||||
main.c \
|
||||
exampleapp.c exampleapp.h \
|
||||
exampleappwin.c exampleappwin.h \
|
||||
resources.c
|
||||
|
||||
BUILT_SOURCES = resources.c
|
||||
@@ -25,9 +24,9 @@ resources.c: exampleapp.gresource.xml window.ui app-menu.ui
|
||||
$(AM_V_GEN) $(GLIB_COMPILE_RESOURCES) $(srcdir)/exampleapp.gresource.xml \
|
||||
--target=$@ --sourcedir=$(srcdir) --generate-source
|
||||
|
||||
EXTRA_DIST = \
|
||||
window.ui \
|
||||
app-menu.ui \
|
||||
EXTRA_DIST = \
|
||||
window.ui \
|
||||
app-menu.ui \
|
||||
exampleapp.gresource.xml
|
||||
|
||||
-include $(top_srcdir)/git.mk
|
||||
|
25
examples/application4/Makefile.example
Normal file
@@ -0,0 +1,25 @@
|
||||
CC = gcc
|
||||
PKGCONFIG = $(shell which pkg-config)
|
||||
CFLAGS = `$(PKGCONFIG) --cflags gtk+-3.0`
|
||||
LIBS = `$(PKGCONFIG) --libs gtk+-3.0`
|
||||
GLIB_COMPILE_RESOURCES = `$(PKGCONFIG) --variable=glib_compile_resources gio-2.0`
|
||||
|
||||
SRC = resources.c exampleapp.c exampleappwin.c main.c
|
||||
|
||||
OBJS = $(SRC:.c=.o)
|
||||
|
||||
all: exampleapp
|
||||
|
||||
resources.c: exampleapp.gresource.xml window.ui app-menu.ui
|
||||
$(GLIB_COMPILE_RESOURCES) exampleapp.gresource.xml --target=$@ --sourcedir=. --generate-source
|
||||
|
||||
%.o: %.c
|
||||
$(CC) -c -o $(@F) $(CFLAGS) $<
|
||||
|
||||
exampleapp: $(OBJS)
|
||||
$(CC) -o $(@F) $(LIBS) $(OBJS)
|
||||
|
||||
clean:
|
||||
rm -f resources.c
|
||||
rm -f $(OBJS)
|
||||
rm -f exampleapp
|
@@ -1,6 +1,7 @@
|
||||
#include <gtk/gtk.h>
|
||||
|
||||
#include "exampleapp.h"
|
||||
#include "exampleappwin.h"
|
||||
#include <gtk/gtk.h>
|
||||
|
||||
struct _ExampleAppWindow
|
||||
{
|
||||
|
@@ -1,5 +1,6 @@
|
||||
#include <gtk/gtk.h>
|
||||
#include <exampleapp.h>
|
||||
|
||||
#include "exampleapp.h"
|
||||
|
||||
int
|
||||
main (int argc, char *argv[])
|
||||
|
@@ -1,33 +1,32 @@
|
||||
AM_CPPFLAGS = \
|
||||
-I$(top_srcdir) \
|
||||
-I$(top_srcdir)/gdk \
|
||||
-I$(top_builddir)/gdk \
|
||||
$(GTK_DEBUG_FLAGS) \
|
||||
GTK_CFLAGS = \
|
||||
-I$(top_srcdir) \
|
||||
$(GTK_DEP_CFLAGS)
|
||||
|
||||
LDADD = \
|
||||
$(top_builddir)/gtk/libgtk-3.la \
|
||||
$(top_builddir)/gdk/libgdk-3.la \
|
||||
GTK_LIBS = \
|
||||
$(top_builddir)/gtk/libgtk-3.la \
|
||||
$(top_builddir)/gdk/libgdk-3.la \
|
||||
$(GTK_DEP_LIBS)
|
||||
|
||||
|
||||
noinst_PROGRAMS = exampleapp
|
||||
|
||||
exampleapp_SOURCES = \
|
||||
main.c \
|
||||
exampleapp.c exampleapp.h \
|
||||
exampleappwin.c exampleappwin.h \
|
||||
exampleapp_CFLAGS = $(GTK_CFLAGS)
|
||||
exampleapp_LDADD = $(GTK_LIBS)
|
||||
exampleapp_SOURCES = \
|
||||
main.c \
|
||||
exampleapp.c exampleapp.h \
|
||||
exampleappwin.c exampleappwin.h \
|
||||
resources.c
|
||||
|
||||
BUILT_SOURCES = \
|
||||
resources.c \
|
||||
BUILT_SOURCES = \
|
||||
resources.c \
|
||||
gschemas.compiled
|
||||
|
||||
resources.c: exampleapp.gresource.xml window.ui app-menu.ui
|
||||
$(AM_V_GEN) $(GLIB_COMPILE_RESOURCES) $(srcdir)/exampleapp.gresource.xml \
|
||||
--target=$@ --sourcedir=$(srcdir) --generate-source
|
||||
|
||||
gsettings_SCHEMAS = \
|
||||
gsettings_SCHEMAS = \
|
||||
org.gtk.exampleapp.gschema.xml
|
||||
|
||||
@GSETTINGS_RULES@
|
||||
@@ -35,13 +34,13 @@ gsettings_SCHEMAS = \
|
||||
gschemas.compiled: org.gtk.exampleapp.gschema.xml
|
||||
$(GLIB_COMPILE_SCHEMAS) .
|
||||
|
||||
EXTRA_DIST = \
|
||||
window.ui \
|
||||
app-menu.ui \
|
||||
exampleapp.gresource.xml \
|
||||
EXTRA_DIST = \
|
||||
window.ui \
|
||||
app-menu.ui \
|
||||
exampleapp.gresource.xml \
|
||||
org.gtk.exampleapp.gschema.xml
|
||||
|
||||
CLEANFILES = \
|
||||
CLEANFILES = \
|
||||
gschemas.compiled
|
||||
|
||||
-include $(top_srcdir)/git.mk
|
||||
|
34
examples/application5/Makefile.example
Normal file
@@ -0,0 +1,34 @@
|
||||
CC = gcc
|
||||
PKGCONFIG = $(shell which pkg-config)
|
||||
CFLAGS = `$(PKGCONFIG) --cflags gtk+-3.0`
|
||||
LIBS = `$(PKGCONFIG) --libs gtk+-3.0`
|
||||
GLIB_COMPILE_RESOURCES = `$(PKGCONFIG) --variable=glib_compile_resources gio-2.0`
|
||||
GLIB_COMPILE_SCHEMAS = `$(PKGCONFIG) --variable=glib_compile_schemas gio-2.0`
|
||||
|
||||
SRC = resources.c exampleapp.c exampleappwin.c main.c
|
||||
|
||||
OBJS = $(SRC:.c=.o)
|
||||
|
||||
all: exampleapp
|
||||
|
||||
org.gtk.exampleapp.gschema.valid: org.gtk.exampleapp.gschema.xml
|
||||
$(GLIB_COMPILE_SCHEMAS) --strict --dry-run --schema-file=$< && mkdir -p $(@D) && touch $@
|
||||
|
||||
gschemas.compiled: org.gtk.exampleapp.gschema.valid
|
||||
$(GLIB_COMPILE_SCHEMAS) .
|
||||
|
||||
resources.c: exampleapp.gresource.xml window.ui app-menu.ui
|
||||
$(GLIB_COMPILE_RESOURCES) exampleapp.gresource.xml --target=$@ --sourcedir=. --generate-source
|
||||
|
||||
%.o: %.c
|
||||
$(CC) -c -o $(@F) $(CFLAGS) $<
|
||||
|
||||
exampleapp: $(OBJS) gschemas.compiled
|
||||
$(CC) -o $(@F) $(LIBS) $(OBJS)
|
||||
|
||||
clean:
|
||||
rm -f org.gtk.exampleapp.gschema.valid
|
||||
rm -f gschemas.compiled
|
||||
rm -f resources.c
|
||||
rm -f $(OBJS)
|
||||
rm -f exampleapp
|
@@ -1,6 +1,7 @@
|
||||
#include <gtk/gtk.h>
|
||||
|
||||
#include "exampleapp.h"
|
||||
#include "exampleappwin.h"
|
||||
#include <gtk/gtk.h>
|
||||
|
||||
struct _ExampleAppWindow
|
||||
{
|
||||
|
@@ -1,5 +1,6 @@
|
||||
#include <gtk/gtk.h>
|
||||
#include <exampleapp.h>
|
||||
|
||||
#include "exampleapp.h"
|
||||
|
||||
int
|
||||
main (int argc, char *argv[])
|
||||
|
@@ -1,34 +1,33 @@
|
||||
AM_CPPFLAGS = \
|
||||
-I$(top_srcdir) \
|
||||
-I$(top_srcdir)/gdk \
|
||||
-I$(top_builddir)/gdk \
|
||||
$(GTK_DEBUG_FLAGS) \
|
||||
GTK_CFLAGS = \
|
||||
-I$(top_srcdir) \
|
||||
$(GTK_DEP_CFLAGS)
|
||||
|
||||
LDADD = \
|
||||
$(top_builddir)/gtk/libgtk-3.la \
|
||||
$(top_builddir)/gdk/libgdk-3.la \
|
||||
GTK_LIBS = \
|
||||
$(top_builddir)/gtk/libgtk-3.la \
|
||||
$(top_builddir)/gdk/libgdk-3.la \
|
||||
$(GTK_DEP_LIBS)
|
||||
|
||||
|
||||
noinst_PROGRAMS = exampleapp
|
||||
|
||||
exampleapp_SOURCES = \
|
||||
main.c \
|
||||
exampleapp.c exampleapp.h \
|
||||
exampleappwin.c exampleappwin.h \
|
||||
exampleappprefs.c exampleappprefs.h \
|
||||
exampleapp_CFLAGS = $(GTK_CFLAGS)
|
||||
exampleapp_LDADD = $(GTK_LIBS)
|
||||
exampleapp_SOURCES = \
|
||||
main.c \
|
||||
exampleapp.c exampleapp.h \
|
||||
exampleappwin.c exampleappwin.h \
|
||||
exampleappprefs.c exampleappprefs.h \
|
||||
resources.c
|
||||
|
||||
BUILT_SOURCES = \
|
||||
resources.c \
|
||||
BUILT_SOURCES = \
|
||||
resources.c \
|
||||
gschemas.compiled
|
||||
|
||||
resources.c: exampleapp.gresource.xml $(shell $(GLIB_COMPILE_RESOURCES) --sourcedir=$(srcdir) --generate-dependencies $(srcdir)/exampleapp.gresource.xml)
|
||||
$(AM_V_GEN) $(GLIB_COMPILE_RESOURCES) $(srcdir)/exampleapp.gresource.xml \
|
||||
--target=$@ --sourcedir=$(srcdir) --generate-source
|
||||
|
||||
gsettings_SCHEMAS = \
|
||||
gsettings_SCHEMAS = \
|
||||
org.gtk.exampleapp.gschema.xml
|
||||
|
||||
@GSETTINGS_RULES@
|
||||
@@ -36,14 +35,14 @@ gsettings_SCHEMAS = \
|
||||
gschemas.compiled: org.gtk.exampleapp.gschema.xml
|
||||
$(GLIB_COMPILE_SCHEMAS) .
|
||||
|
||||
EXTRA_DIST = \
|
||||
window.ui \
|
||||
app-menu.ui \
|
||||
prefs.ui \
|
||||
exampleapp.gresource.xml \
|
||||
EXTRA_DIST = \
|
||||
window.ui \
|
||||
app-menu.ui \
|
||||
prefs.ui \
|
||||
exampleapp.gresource.xml \
|
||||
org.gtk.exampleapp.gschema.xml
|
||||
|
||||
CLEANFILES = \
|
||||
CLEANFILES = \
|
||||
gschemas.compiled
|
||||
|
||||
-include $(top_srcdir)/git.mk
|
||||
|
34
examples/application6/Makefile.example
Normal file
@@ -0,0 +1,34 @@
|
||||
CC = gcc
|
||||
PKGCONFIG = $(shell which pkg-config)
|
||||
CFLAGS = `$(PKGCONFIG) --cflags gtk+-3.0`
|
||||
LIBS = `$(PKGCONFIG) --libs gtk+-3.0`
|
||||
GLIB_COMPILE_RESOURCES = `$(PKGCONFIG) --variable=glib_compile_resources gio-2.0`
|
||||
GLIB_COMPILE_SCHEMAS = `$(PKGCONFIG) --variable=glib_compile_schemas gio-2.0`
|
||||
|
||||
SRC = resources.c exampleapp.c exampleappwin.c exampleappprefs.c main.c
|
||||
|
||||
OBJS = $(SRC:.c=.o)
|
||||
|
||||
all: exampleapp
|
||||
|
||||
org.gtk.exampleapp.gschema.valid: org.gtk.exampleapp.gschema.xml
|
||||
$(GLIB_COMPILE_SCHEMAS) --strict --dry-run --schema-file=$< && mkdir -p $(@D) && touch $@
|
||||
|
||||
gschemas.compiled: org.gtk.exampleapp.gschema.valid
|
||||
$(GLIB_COMPILE_SCHEMAS) .
|
||||
|
||||
resources.c: exampleapp.gresource.xml window.ui app-menu.ui
|
||||
$(GLIB_COMPILE_RESOURCES) exampleapp.gresource.xml --target=$@ --sourcedir=. --generate-source
|
||||
|
||||
%.o: %.c
|
||||
$(CC) -c -o $(@F) $(CFLAGS) $<
|
||||
|
||||
exampleapp: $(OBJS) gschemas.compiled
|
||||
$(CC) -o $(@F) $(LIBS) $(OBJS)
|
||||
|
||||
clean:
|
||||
rm -f org.gtk.exampleapp.gschema.valid
|
||||
rm -f gschemas.compiled
|
||||
rm -f resources.c
|
||||
rm -f $(OBJS)
|
||||
rm -f exampleapp
|
@@ -1,6 +1,7 @@
|
||||
#include <gtk/gtk.h>
|
||||
|
||||
#include "exampleapp.h"
|
||||
#include "exampleappwin.h"
|
||||
#include <gtk/gtk.h>
|
||||
|
||||
struct ExampleAppWindow
|
||||
{
|
||||
|
@@ -1,5 +1,6 @@
|
||||
#include <gtk/gtk.h>
|
||||
#include <exampleapp.h>
|
||||
|
||||
#include "exampleapp.h"
|
||||
|
||||
int
|
||||
main (int argc, char *argv[])
|
||||
|
@@ -1,34 +1,33 @@
|
||||
AM_CPPFLAGS = \
|
||||
-I$(top_srcdir) \
|
||||
-I$(top_srcdir)/gdk \
|
||||
-I$(top_builddir)/gdk \
|
||||
$(GTK_DEBUG_FLAGS) \
|
||||
GTK_CFLAGS = \
|
||||
-I$(top_srcdir) \
|
||||
$(GTK_DEP_CFLAGS)
|
||||
|
||||
LDADD = \
|
||||
$(top_builddir)/gtk/libgtk-3.la \
|
||||
$(top_builddir)/gdk/libgdk-3.la \
|
||||
GTK_LIBS = \
|
||||
$(top_builddir)/gtk/libgtk-3.la \
|
||||
$(top_builddir)/gdk/libgdk-3.la \
|
||||
$(GTK_DEP_LIBS)
|
||||
|
||||
|
||||
noinst_PROGRAMS = exampleapp
|
||||
|
||||
exampleapp_SOURCES = \
|
||||
main.c \
|
||||
exampleapp.c exampleapp.h \
|
||||
exampleappwin.c exampleappwin.h \
|
||||
exampleappprefs.c exampleappprefs.h \
|
||||
exampleapp_CFLAGS = $(GTK_CFLAGS)
|
||||
exampleapp_LDADD = $(GTK_LIBS)
|
||||
exampleapp_SOURCES = \
|
||||
main.c \
|
||||
exampleapp.c exampleapp.h \
|
||||
exampleappwin.c exampleappwin.h \
|
||||
exampleappprefs.c exampleappprefs.h \
|
||||
resources.c
|
||||
|
||||
BUILT_SOURCES = \
|
||||
resources.c \
|
||||
BUILT_SOURCES = \
|
||||
resources.c \
|
||||
gschemas.compiled
|
||||
|
||||
resources.c: exampleapp.gresource.xml $(shell $(GLIB_COMPILE_RESOURCES) --sourcedir=$(srcdir) --generate-dependencies $(srcdir)/exampleapp.gresource.xml)
|
||||
$(AM_V_GEN) $(GLIB_COMPILE_RESOURCES) $(srcdir)/exampleapp.gresource.xml \
|
||||
--target=$@ --sourcedir=$(srcdir) --generate-source
|
||||
|
||||
gsettings_SCHEMAS = \
|
||||
gsettings_SCHEMAS = \
|
||||
org.gtk.exampleapp.gschema.xml
|
||||
|
||||
@GSETTINGS_RULES@
|
||||
@@ -36,14 +35,14 @@ gsettings_SCHEMAS = \
|
||||
gschemas.compiled: org.gtk.exampleapp.gschema.xml
|
||||
$(GLIB_COMPILE_SCHEMAS) .
|
||||
|
||||
EXTRA_DIST = \
|
||||
window.ui \
|
||||
app-menu.ui \
|
||||
prefs.ui \
|
||||
exampleapp.gresource.xml \
|
||||
EXTRA_DIST = \
|
||||
window.ui \
|
||||
app-menu.ui \
|
||||
prefs.ui \
|
||||
exampleapp.gresource.xml \
|
||||
org.gtk.exampleapp.gschema.xml
|
||||
|
||||
CLEANFILES = \
|
||||
CLEANFILES = \
|
||||
gschemas.compiled
|
||||
|
||||
-include $(top_srcdir)/git.mk
|
||||
|
34
examples/application7/Makefile.example
Normal file
@@ -0,0 +1,34 @@
|
||||
CC = gcc
|
||||
PKGCONFIG = $(shell which pkg-config)
|
||||
CFLAGS = `$(PKGCONFIG) --cflags gtk+-3.0`
|
||||
LIBS = `$(PKGCONFIG) --libs gtk+-3.0`
|
||||
GLIB_COMPILE_RESOURCES = `$(PKGCONFIG) --variable=glib_compile_resources gio-2.0`
|
||||
GLIB_COMPILE_SCHEMAS = `$(PKGCONFIG) --variable=glib_compile_schemas gio-2.0`
|
||||
|
||||
SRC = resources.c exampleapp.c exampleappwin.c exampleappprefs.c main.c
|
||||
|
||||
OBJS = $(SRC:.c=.o)
|
||||
|
||||
all: exampleapp
|
||||
|
||||
org.gtk.exampleapp.gschema.valid: org.gtk.exampleapp.gschema.xml
|
||||
$(GLIB_COMPILE_SCHEMAS) --strict --dry-run --schema-file=$< && mkdir -p $(@D) && touch $@
|
||||
|
||||
gschemas.compiled: org.gtk.exampleapp.gschema.valid
|
||||
$(GLIB_COMPILE_SCHEMAS) .
|
||||
|
||||
resources.c: exampleapp.gresource.xml $(shell $(GLIB_COMPILE_RESOURCES) --sourcedir=. --generate-dependencies exampleapp.gresource.xml)
|
||||
$(GLIB_COMPILE_RESOURCES) exampleapp.gresource.xml --target=$@ --sourcedir=. --generate-source
|
||||
|
||||
%.o: %.c
|
||||
$(CC) -c -o $(@F) $(CFLAGS) $<
|
||||
|
||||
exampleapp: $(OBJS) gschemas.compiled
|
||||
$(CC) -o $(@F) $(LIBS) $(OBJS)
|
||||
|
||||
clean:
|
||||
rm -f org.gtk.exampleapp.gschema.valid
|
||||
rm -f gschemas.compiled
|
||||
rm -f resources.c
|
||||
rm -f $(OBJS)
|
||||
rm -f exampleapp
|
@@ -1,6 +1,7 @@
|
||||
#include <gtk/gtk.h>
|
||||
|
||||
#include "exampleapp.h"
|
||||
#include "exampleappwin.h"
|
||||
#include <gtk/gtk.h>
|
||||
|
||||
struct _ExampleAppWindow
|
||||
{
|
||||
|
@@ -1,5 +1,6 @@
|
||||
#include <gtk/gtk.h>
|
||||
#include <exampleapp.h>
|
||||
|
||||
#include "exampleapp.h"
|
||||
|
||||
int
|
||||
main (int argc, char *argv[])
|
||||
|
@@ -1,34 +1,33 @@
|
||||
AM_CPPFLAGS = \
|
||||
-I$(top_srcdir) \
|
||||
-I$(top_srcdir)/gdk \
|
||||
-I$(top_builddir)/gdk \
|
||||
$(GTK_DEBUG_FLAGS) \
|
||||
GTK_CFLAGS = \
|
||||
-I$(top_srcdir) \
|
||||
$(GTK_DEP_CFLAGS)
|
||||
|
||||
LDADD = \
|
||||
$(top_builddir)/gtk/libgtk-3.la \
|
||||
$(top_builddir)/gdk/libgdk-3.la \
|
||||
GTK_LIBS = \
|
||||
$(top_builddir)/gtk/libgtk-3.la \
|
||||
$(top_builddir)/gdk/libgdk-3.la \
|
||||
$(GTK_DEP_LIBS)
|
||||
|
||||
|
||||
noinst_PROGRAMS = exampleapp
|
||||
|
||||
exampleapp_SOURCES = \
|
||||
main.c \
|
||||
exampleapp.c exampleapp.h \
|
||||
exampleappwin.c exampleappwin.h \
|
||||
exampleappprefs.c exampleappprefs.h \
|
||||
exampleapp_CFLAGS = $(GTK_CFLAGS)
|
||||
exampleapp_LDADD = $(GTK_LIBS)
|
||||
exampleapp_SOURCES = \
|
||||
main.c \
|
||||
exampleapp.c exampleapp.h \
|
||||
exampleappwin.c exampleappwin.h \
|
||||
exampleappprefs.c exampleappprefs.h \
|
||||
resources.c
|
||||
|
||||
BUILT_SOURCES = \
|
||||
resources.c \
|
||||
BUILT_SOURCES = \
|
||||
resources.c \
|
||||
gschemas.compiled
|
||||
|
||||
resources.c: exampleapp.gresource.xml $(shell $(GLIB_COMPILE_RESOURCES) --sourcedir=$(srcdir) --generate-dependencies $(srcdir)/exampleapp.gresource.xml)
|
||||
$(AM_V_GEN) $(GLIB_COMPILE_RESOURCES) $(srcdir)/exampleapp.gresource.xml \
|
||||
--target=$@ --sourcedir=$(srcdir) --generate-source
|
||||
|
||||
gsettings_SCHEMAS = \
|
||||
gsettings_SCHEMAS = \
|
||||
org.gtk.exampleapp.gschema.xml
|
||||
|
||||
@GSETTINGS_RULES@
|
||||
@@ -36,15 +35,15 @@ gsettings_SCHEMAS = \
|
||||
gschemas.compiled: org.gtk.exampleapp.gschema.xml
|
||||
$(GLIB_COMPILE_SCHEMAS) .
|
||||
|
||||
EXTRA_DIST = \
|
||||
window.ui \
|
||||
app-menu.ui \
|
||||
prefs.ui \
|
||||
gears-menu.ui \
|
||||
exampleapp.gresource.xml \
|
||||
EXTRA_DIST = \
|
||||
window.ui \
|
||||
app-menu.ui \
|
||||
prefs.ui \
|
||||
gears-menu.ui \
|
||||
exampleapp.gresource.xml \
|
||||
org.gtk.exampleapp.gschema.xml
|
||||
|
||||
CLEANFILES = \
|
||||
CLEANFILES = \
|
||||
gschemas.compiled
|
||||
|
||||
-include $(top_srcdir)/git.mk
|
||||
|
34
examples/application8/Makefile.example
Normal file
@@ -0,0 +1,34 @@
|
||||
CC = gcc
|
||||
PKGCONFIG = $(shell which pkg-config)
|
||||
CFLAGS = `$(PKGCONFIG) --cflags gtk+-3.0`
|
||||
LIBS = `$(PKGCONFIG) --libs gtk+-3.0`
|
||||
GLIB_COMPILE_RESOURCES = `$(PKGCONFIG) --variable=glib_compile_resources gio-2.0`
|
||||
GLIB_COMPILE_SCHEMAS = `$(PKGCONFIG) --variable=glib_compile_schemas gio-2.0`
|
||||
|
||||
SRC = resources.c exampleapp.c exampleappwin.c exampleappprefs.c main.c
|
||||
|
||||
OBJS = $(SRC:.c=.o)
|
||||
|
||||
all: exampleapp
|
||||
|
||||
org.gtk.exampleapp.gschema.valid: org.gtk.exampleapp.gschema.xml
|
||||
$(GLIB_COMPILE_SCHEMAS) --strict --dry-run --schema-file=$< && mkdir -p $(@D) && touch $@
|
||||
|
||||
gschemas.compiled: org.gtk.exampleapp.gschema.valid
|
||||
$(GLIB_COMPILE_SCHEMAS) .
|
||||
|
||||
resources.c: exampleapp.gresource.xml $(shell $(GLIB_COMPILE_RESOURCES) --sourcedir=. --generate-dependencies exampleapp.gresource.xml)
|
||||
$(GLIB_COMPILE_RESOURCES) exampleapp.gresource.xml --target=$@ --sourcedir=. --generate-source
|
||||
|
||||
%.o: %.c
|
||||
$(CC) -c -o $(@F) $(CFLAGS) $<
|
||||
|
||||
exampleapp: $(OBJS) gschemas.compiled
|
||||
$(CC) -o $(@F) $(LIBS) $(OBJS)
|
||||
|
||||
clean:
|
||||
rm -f org.gtk.exampleapp.gschema.valid
|
||||
rm -f gschemas.compiled
|
||||
rm -f resources.c
|
||||
rm -f $(OBJS)
|
||||
rm -f exampleapp
|
@@ -1,6 +1,7 @@
|
||||
#include <gtk/gtk.h>
|
||||
|
||||
#include "exampleapp.h"
|
||||
#include "exampleappwin.h"
|
||||
#include <gtk/gtk.h>
|
||||
|
||||
struct _ExampleAppWindow
|
||||
{
|
||||
|
@@ -1,5 +1,6 @@
|
||||
#include <gtk/gtk.h>
|
||||
#include <exampleapp.h>
|
||||
|
||||
#include "exampleapp.h"
|
||||
|
||||
int
|
||||
main (int argc, char *argv[])
|
||||
|
@@ -1,34 +1,33 @@
|
||||
AM_CPPFLAGS = \
|
||||
-I$(top_srcdir) \
|
||||
-I$(top_srcdir)/gdk \
|
||||
-I$(top_builddir)/gdk \
|
||||
$(GTK_DEBUG_FLAGS) \
|
||||
GTK_CFLAGS = \
|
||||
-I$(top_srcdir) \
|
||||
$(GTK_DEP_CFLAGS)
|
||||
|
||||
LDADD = \
|
||||
$(top_builddir)/gtk/libgtk-3.la \
|
||||
$(top_builddir)/gdk/libgdk-3.la \
|
||||
GTK_LIBS = \
|
||||
$(top_builddir)/gtk/libgtk-3.la \
|
||||
$(top_builddir)/gdk/libgdk-3.la \
|
||||
$(GTK_DEP_LIBS)
|
||||
|
||||
|
||||
noinst_PROGRAMS = exampleapp
|
||||
|
||||
exampleapp_SOURCES = \
|
||||
main.c \
|
||||
exampleapp.c exampleapp.h \
|
||||
exampleappwin.c exampleappwin.h \
|
||||
exampleappprefs.c exampleappprefs.h \
|
||||
exampleapp_CFLAGS = $(GTK_CFLAGS)
|
||||
exampleapp_LDADD = $(GTK_LIBS)
|
||||
exampleapp_SOURCES = \
|
||||
main.c \
|
||||
exampleapp.c exampleapp.h \
|
||||
exampleappwin.c exampleappwin.h \
|
||||
exampleappprefs.c exampleappprefs.h \
|
||||
resources.c
|
||||
|
||||
BUILT_SOURCES = \
|
||||
resources.c \
|
||||
BUILT_SOURCES = \
|
||||
resources.c \
|
||||
gschemas.compiled
|
||||
|
||||
resources.c: exampleapp.gresource.xml $(shell $(GLIB_COMPILE_RESOURCES) --sourcedir=$(srcdir) --generate-dependencies $(srcdir)/exampleapp.gresource.xml)
|
||||
$(AM_V_GEN) $(GLIB_COMPILE_RESOURCES) $(srcdir)/exampleapp.gresource.xml \
|
||||
--target=$@ --sourcedir=$(srcdir) --generate-source
|
||||
|
||||
gsettings_SCHEMAS = \
|
||||
gsettings_SCHEMAS = \
|
||||
org.gtk.exampleapp.gschema.xml
|
||||
|
||||
@GSETTINGS_RULES@
|
||||
@@ -36,15 +35,15 @@ gsettings_SCHEMAS = \
|
||||
gschemas.compiled: org.gtk.exampleapp.gschema.xml
|
||||
$(GLIB_COMPILE_SCHEMAS) .
|
||||
|
||||
EXTRA_DIST = \
|
||||
window.ui \
|
||||
app-menu.ui \
|
||||
prefs.ui \
|
||||
gears-menu.ui \
|
||||
exampleapp.gresource.xml \
|
||||
EXTRA_DIST = \
|
||||
window.ui \
|
||||
app-menu.ui \
|
||||
prefs.ui \
|
||||
gears-menu.ui \
|
||||
exampleapp.gresource.xml \
|
||||
org.gtk.exampleapp.gschema.xml
|
||||
|
||||
CLEANFILES = \
|
||||
CLEANFILES = \
|
||||
gschemas.compiled
|
||||
|
||||
-include $(top_srcdir)/git.mk
|
||||
|
34
examples/application9/Makefile.example
Normal file
@@ -0,0 +1,34 @@
|
||||
CC = gcc
|
||||
PKGCONFIG = $(shell which pkg-config)
|
||||
CFLAGS = `$(PKGCONFIG) --cflags gtk+-3.0`
|
||||
LIBS = `$(PKGCONFIG) --libs gtk+-3.0`
|
||||
GLIB_COMPILE_RESOURCES = `$(PKGCONFIG) --variable=glib_compile_resources gio-2.0`
|
||||
GLIB_COMPILE_SCHEMAS = `$(PKGCONFIG) --variable=glib_compile_schemas gio-2.0`
|
||||
|
||||
SRC = resources.c exampleapp.c exampleappwin.c exampleappprefs.c main.c
|
||||
|
||||
OBJS = $(SRC:.c=.o)
|
||||
|
||||
all: exampleapp
|
||||
|
||||
org.gtk.exampleapp.gschema.valid: org.gtk.exampleapp.gschema.xml
|
||||
$(GLIB_COMPILE_SCHEMAS) --strict --dry-run --schema-file=$< && mkdir -p $(@D) && touch $@
|
||||
|
||||
gschemas.compiled: org.gtk.exampleapp.gschema.valid
|
||||
$(GLIB_COMPILE_SCHEMAS) .
|
||||
|
||||
resources.c: exampleapp.gresource.xml $(shell $(GLIB_COMPILE_RESOURCES) --sourcedir=. --generate-dependencies exampleapp.gresource.xml)
|
||||
$(GLIB_COMPILE_RESOURCES) exampleapp.gresource.xml --target=$@ --sourcedir=. --generate-source
|
||||
|
||||
%.o: %.c
|
||||
$(CC) -c -o $(@F) $(CFLAGS) $<
|
||||
|
||||
exampleapp: $(OBJS) gschemas.compiled
|
||||
$(CC) -o $(@F) $(LIBS) $(OBJS)
|
||||
|
||||
clean:
|
||||
rm -f org.gtk.exampleapp.gschema.valid
|
||||
rm -f gschemas.compiled
|
||||
rm -f resources.c
|
||||
rm -f $(OBJS)
|
||||
rm -f exampleapp
|
@@ -1,6 +1,7 @@
|
||||
#include <gtk/gtk.h>
|
||||
|
||||
#include "exampleapp.h"
|
||||
#include "exampleappwin.h"
|
||||
#include <gtk/gtk.h>
|
||||
|
||||
struct _ExampleAppWindow
|
||||
{
|
||||
|
@@ -1,5 +1,6 @@
|
||||
#include <gtk/gtk.h>
|
||||
#include <exampleapp.h>
|
||||
|
||||
#include "exampleapp.h"
|
||||
|
||||
int
|
||||
main (int argc, char *argv[])
|
||||
|
@@ -257,6 +257,7 @@ new_window (GApplication *app,
|
||||
label = gtk_label_new ("Fullscreen:");
|
||||
gtk_container_add (GTK_CONTAINER (box), label);
|
||||
sw = gtk_switch_new ();
|
||||
gtk_widget_set_valign (sw, GTK_ALIGN_CENTER);
|
||||
gtk_actionable_set_action_name (GTK_ACTIONABLE (sw), "win.fullscreen");
|
||||
gtk_container_add (GTK_CONTAINER (box), sw);
|
||||
gtk_container_add (GTK_CONTAINER (toolbar), GTK_WIDGET (button));
|
||||
@@ -518,12 +519,11 @@ bloat_pad_startup (GApplication *application)
|
||||
GtkApplication *app = GTK_APPLICATION (application);
|
||||
GMenu *menu;
|
||||
GMenuItem *item;
|
||||
GBytes *bytes;
|
||||
GIcon *icon;
|
||||
GIcon *icon2;
|
||||
GEmblem *emblem;
|
||||
GFile *file;
|
||||
gchar *data;
|
||||
gsize size;
|
||||
gint i;
|
||||
struct {
|
||||
const gchar *action_and_target;
|
||||
@@ -548,7 +548,7 @@ bloat_pad_startup (GApplication *application)
|
||||
|
||||
menu = gtk_application_get_menu_by_id (GTK_APPLICATION (application), "icon-menu");
|
||||
|
||||
file = g_file_new_for_path (SRCDIR "/../../gtk/resources/icons/16x16/actions/gtk-select-color.png");
|
||||
file = g_file_new_for_uri ("resource:///org/gtk/libgtk/icons/16x16/actions/gtk-select-color.png");
|
||||
icon = g_file_icon_new (file);
|
||||
item = g_menu_item_new ("File Icon", NULL);
|
||||
g_menu_item_set_icon (item, icon);
|
||||
@@ -564,31 +564,28 @@ bloat_pad_startup (GApplication *application)
|
||||
g_object_unref (item);
|
||||
g_object_unref (icon);
|
||||
|
||||
if (g_file_get_contents (SRCDIR "/../../gtk/resources/icons/16x16/actions/gtk-select-font.png", &data, &size, NULL))
|
||||
{
|
||||
GBytes *bytes = g_bytes_new_take (data, size);
|
||||
icon = g_bytes_icon_new (bytes);
|
||||
item = g_menu_item_new ("Bytes Icon", NULL);
|
||||
g_menu_item_set_icon (item, icon);
|
||||
g_menu_append_item (menu, item);
|
||||
g_object_unref (item);
|
||||
g_object_unref (icon);
|
||||
g_bytes_unref (bytes);
|
||||
}
|
||||
bytes = g_resources_lookup_data ("/org/gtk/libgtk/icons/16x16/actions/gtk-select-font.png", 0, NULL);
|
||||
icon = g_bytes_icon_new (bytes);
|
||||
item = g_menu_item_new ("Bytes Icon", NULL);
|
||||
g_menu_item_set_icon (item, icon);
|
||||
g_menu_append_item (menu, item);
|
||||
g_object_unref (item);
|
||||
g_object_unref (icon);
|
||||
g_bytes_unref (bytes);
|
||||
|
||||
icon = G_ICON (gdk_pixbuf_new_from_file (SRCDIR "/../../gtk/resources/icons/16x16/actions/gtk-preferences.png", NULL));
|
||||
icon = G_ICON (gdk_pixbuf_new_from_resource ("/org/gtk/libgtk/icons/16x16/actions/gtk-preferences.png", NULL));
|
||||
item = g_menu_item_new ("Pixbuf", NULL);
|
||||
g_menu_item_set_icon (item, icon);
|
||||
g_menu_append_item (menu, item);
|
||||
g_object_unref (item);
|
||||
g_object_unref (icon);
|
||||
|
||||
file = g_file_new_for_path (SRCDIR "/../../gtk/resources/icons/16x16/actions/gtk-page-setup.png");
|
||||
file = g_file_new_for_uri ("resource:///org/gtk/libgtk/icons/16x16/actions/gtk-page-setup.png");
|
||||
icon = g_file_icon_new (file);
|
||||
emblem = g_emblem_new (icon);
|
||||
g_object_unref (icon);
|
||||
g_object_unref (file);
|
||||
file = g_file_new_for_path (SRCDIR "/../../gtk/resources/icons/16x16/actions/gtk-orientation-reverse-portrait.png");
|
||||
file = g_file_new_for_uri ("resource:///org/gtk/libgtk/icons/16x16/actions/gtk-orientation-reverse-portrait.png");
|
||||
icon2 = g_file_icon_new (file);
|
||||
icon = g_emblemed_icon_new (icon2, emblem);
|
||||
item = g_menu_item_new ("Emblemed Icon", NULL);
|
||||
|
@@ -429,8 +429,8 @@ gdkconfig.h: stamp-gc-h
|
||||
$(AM_V_GEN) if test -f gdkconfig.h; then :; \
|
||||
else rm -f stamp-gc-h; $(MAKE) stamp-gc-h; fi
|
||||
stamp-gc-h: $(top_builddir)/config.status
|
||||
$(AM_V_at) cd $(top_builddir) && $(SHELL) ./config.status gdk/gdkconfig.h
|
||||
echo timestamp > stamp-gc-h
|
||||
$(AM_V_at) cd $(top_builddir) && $(SHELL) ./config.status gdk/gdkconfig.h \
|
||||
&& echo timestamp > $(@F)
|
||||
|
||||
dist-hook: ../build/win32/vs9/gdk.vcproj ../build/win32/vs10/gdk.vcxproj ../build/win32/vs10/gdk.vcxproj.filters
|
||||
|
||||
|
@@ -31,12 +31,12 @@ libgdkbroadwayinclude_HEADERS = \
|
||||
gdkbroadwayvisual.h
|
||||
|
||||
clienthtml.h: client.html
|
||||
$(PERL) $(srcdir)/toarray.pl client_html $(srcdir)/client.html > $@
|
||||
$(AM_V_GEN) $(PERL) $(srcdir)/toarray.pl client_html $(srcdir)/client.html > $@
|
||||
|
||||
EXTRA_DIST += client.html
|
||||
|
||||
broadwayjs.h: broadway.js rawinflate.min.js
|
||||
$(PERL) $(srcdir)/toarray.pl broadway_js $(srcdir)/broadway.js $(srcdir)/rawinflate.min.js > $@
|
||||
$(AM_V_GEN) $(PERL) $(srcdir)/toarray.pl broadway_js $(srcdir)/broadway.js $(srcdir)/rawinflate.min.js > $@
|
||||
|
||||
EXTRA_DIST += broadway.js rawinflate.min.js
|
||||
|
||||
|
@@ -1733,7 +1733,7 @@ _gdk_device_window_at_position (GdkDevice *device,
|
||||
* gdk_device_get_last_event_window:
|
||||
* @device: a #GdkDevice, with a source other than %GDK_SOURCE_KEYBOARD
|
||||
*
|
||||
* Gets information about which window the given pointer device is in, based on
|
||||
* Gets information about which window the given pointer device is in, based on events
|
||||
* that have been received so far from the display server. If another application
|
||||
* has a pointer grab, or this application has a grab with owner_events = %FALSE,
|
||||
* %NULL may be returned even if the pointer is physically over one of this
|
||||
|
242
gdk/gdkgl.c
@@ -24,6 +24,7 @@
|
||||
|
||||
#include <epoxy/gl.h>
|
||||
#include <math.h>
|
||||
#include <string.h>
|
||||
|
||||
static cairo_user_data_key_t direct_key;
|
||||
|
||||
@@ -82,50 +83,53 @@ create_shader (int type, const char const *code)
|
||||
return shader;
|
||||
}
|
||||
|
||||
static guint
|
||||
make_program (const char const *vertex_shader_code, const char const *fragment_shader_code)
|
||||
static void
|
||||
make_program (GdkGLContextProgram *program,
|
||||
const char const *vertex_shader_code,
|
||||
const char const *fragment_shader_code)
|
||||
{
|
||||
guint program, vertex_shader, fragment_shader;
|
||||
guint vertex_shader, fragment_shader;
|
||||
int status;
|
||||
|
||||
vertex_shader = create_shader (GL_VERTEX_SHADER, vertex_shader_code);
|
||||
if (vertex_shader == 0)
|
||||
return 0;
|
||||
return;
|
||||
|
||||
fragment_shader = create_shader (GL_FRAGMENT_SHADER, fragment_shader_code);
|
||||
if (fragment_shader == 0)
|
||||
{
|
||||
glDeleteShader (vertex_shader);
|
||||
return 0;
|
||||
return;
|
||||
}
|
||||
|
||||
program = glCreateProgram ();
|
||||
glAttachShader (program, vertex_shader);
|
||||
glAttachShader (program, fragment_shader);
|
||||
program->program = glCreateProgram ();
|
||||
glAttachShader (program->program, vertex_shader);
|
||||
glAttachShader (program->program, fragment_shader);
|
||||
|
||||
glLinkProgram (program);
|
||||
glLinkProgram (program->program);
|
||||
|
||||
glDeleteShader (vertex_shader);
|
||||
glDeleteShader (fragment_shader);
|
||||
|
||||
glGetProgramiv (program, GL_LINK_STATUS, &status);
|
||||
glGetProgramiv (program->program, GL_LINK_STATUS, &status);
|
||||
if (status == GL_FALSE)
|
||||
{
|
||||
int log_len;
|
||||
char *buffer;
|
||||
|
||||
glGetProgramiv (program, GL_INFO_LOG_LENGTH, &log_len);
|
||||
glGetProgramiv (program->program, GL_INFO_LOG_LENGTH, &log_len);
|
||||
|
||||
buffer = g_malloc (log_len + 1);
|
||||
glGetProgramInfoLog (program, log_len, NULL, buffer);
|
||||
glGetProgramInfoLog (program->program, log_len, NULL, buffer);
|
||||
g_warning ("Linker failure: %s\n", buffer);
|
||||
g_free (buffer);
|
||||
|
||||
glDeleteProgram (program);
|
||||
return 0;
|
||||
glDeleteProgram (program->program);
|
||||
}
|
||||
|
||||
return program;
|
||||
program->position_location = glGetAttribLocation (program->program, "position");
|
||||
program->uv_location = glGetAttribLocation (program->program, "uv");
|
||||
program->map_location = glGetUniformLocation (program->program, "map");
|
||||
}
|
||||
|
||||
static void
|
||||
@@ -140,10 +144,7 @@ bind_vao (GdkGLContextPaintData *paint_data)
|
||||
}
|
||||
|
||||
static void
|
||||
use_texture_2d_program (GdkGLContextPaintData *paint_data,
|
||||
guint *position_location,
|
||||
guint *uv_location,
|
||||
guint *map_location)
|
||||
use_texture_2d_program (GdkGLContextPaintData *paint_data)
|
||||
{
|
||||
const char *vertex_shader_code =
|
||||
"#version 120\n"
|
||||
@@ -163,30 +164,18 @@ use_texture_2d_program (GdkGLContextPaintData *paint_data,
|
||||
" gl_FragColor = texture2D (map, vUv);\n"
|
||||
"}\n";
|
||||
|
||||
if (paint_data->texture_quad_program == 0)
|
||||
{
|
||||
paint_data->texture_quad_program = make_program (vertex_shader_code, fragment_shader_code);
|
||||
paint_data->texture_quad_program_position_location = glGetAttribLocation (paint_data->texture_quad_program, "position");
|
||||
paint_data->texture_quad_program_uv_location = glGetAttribLocation (paint_data->texture_quad_program, "uv");
|
||||
paint_data->texture_quad_program_map_location = glGetUniformLocation (paint_data->texture_quad_program, "map");
|
||||
}
|
||||
if (paint_data->texture_2d_quad_program.program == 0)
|
||||
make_program (&paint_data->texture_2d_quad_program, vertex_shader_code, fragment_shader_code);
|
||||
|
||||
if (paint_data->current_program != paint_data->texture_quad_program)
|
||||
if (paint_data->current_program != &paint_data->texture_2d_quad_program)
|
||||
{
|
||||
glUseProgram (paint_data->texture_quad_program);
|
||||
paint_data->current_program = paint_data->texture_quad_program;
|
||||
paint_data->current_program = &paint_data->texture_2d_quad_program;
|
||||
glUseProgram (paint_data->current_program->program);
|
||||
}
|
||||
|
||||
*position_location = paint_data->texture_quad_program_position_location;
|
||||
*uv_location = paint_data->texture_quad_program_uv_location;
|
||||
*map_location = paint_data->texture_quad_program_map_location;
|
||||
}
|
||||
|
||||
static void
|
||||
use_texture_rect_program (GdkGLContextPaintData *paint_data,
|
||||
guint *position_location,
|
||||
guint *uv_location,
|
||||
guint *map_location)
|
||||
use_texture_rect_program (GdkGLContextPaintData *paint_data)
|
||||
{
|
||||
const char *vertex_shader_code =
|
||||
"#version 120\n"
|
||||
@@ -206,83 +195,87 @@ use_texture_rect_program (GdkGLContextPaintData *paint_data,
|
||||
" gl_FragColor = texture2DRect (map, vUv);\n"
|
||||
"}\n";
|
||||
|
||||
if (paint_data->texture_quad_rect_program == 0)
|
||||
{
|
||||
paint_data->texture_quad_rect_program = make_program (vertex_shader_code, fragment_shader_code);
|
||||
paint_data->texture_quad_rect_program_position_location = glGetAttribLocation (paint_data->texture_quad_rect_program, "position");
|
||||
paint_data->texture_quad_rect_program_uv_location = glGetAttribLocation (paint_data->texture_quad_rect_program, "uv");
|
||||
paint_data->texture_quad_rect_program_map_location = glGetUniformLocation (paint_data->texture_quad_rect_program, "map");
|
||||
}
|
||||
if (paint_data->texture_rect_quad_program.program == 0)
|
||||
make_program (&paint_data->texture_rect_quad_program, vertex_shader_code, fragment_shader_code);
|
||||
|
||||
if (paint_data->current_program != paint_data->texture_quad_rect_program)
|
||||
if (paint_data->current_program != &paint_data->texture_rect_quad_program)
|
||||
{
|
||||
glUseProgram (paint_data->texture_quad_rect_program);
|
||||
paint_data->current_program = paint_data->texture_quad_rect_program;
|
||||
paint_data->current_program = &paint_data->texture_rect_quad_program;
|
||||
glUseProgram (paint_data->current_program->program);
|
||||
}
|
||||
|
||||
*position_location = paint_data->texture_quad_rect_program_position_location;
|
||||
*uv_location = paint_data->texture_quad_rect_program_uv_location;
|
||||
*map_location = paint_data->texture_quad_rect_program_map_location;
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
gdk_gl_texture_quad (GdkGLContext *paint_context,
|
||||
guint texture_target,
|
||||
float x1, float y1,
|
||||
float x2, float y2,
|
||||
float u1, float v1,
|
||||
float u2, float v2)
|
||||
gdk_gl_texture_quads (GdkGLContext *paint_context,
|
||||
guint texture_target,
|
||||
int n_quads,
|
||||
GdkTexturedQuad *quads)
|
||||
{
|
||||
GdkGLContextPaintData *paint_data = gdk_gl_context_get_paint_data (paint_context);
|
||||
GdkGLContextProgram *program;
|
||||
GdkWindow *window = gdk_gl_context_get_window (paint_context);
|
||||
int window_scale = gdk_window_get_scale_factor (window);
|
||||
float w = gdk_window_get_width (window) * window_scale;
|
||||
float h = gdk_window_get_height (window) * window_scale;
|
||||
float vertex_buffer_data[] = {
|
||||
(x2 * 2) / w - 1, (y1 * 2) / h - 1,
|
||||
(x2 * 2) / w - 1, (y2 * 2) / h - 1,
|
||||
(x1 * 2) / w - 1, (y2 * 2) / h - 1,
|
||||
(x1 * 2) / w - 1, (y1 * 2) / h - 1,
|
||||
};
|
||||
float uv_buffer_data[] = {
|
||||
u2, v1,
|
||||
u2, v2,
|
||||
u1, v2,
|
||||
u1, v1,
|
||||
};
|
||||
guint position_location, uv_location, map_location;
|
||||
int i;
|
||||
float *vertex_buffer_data;
|
||||
|
||||
bind_vao (paint_data);
|
||||
|
||||
if (paint_data->tmp_vertex_buffer == 0)
|
||||
glGenBuffers(1, &paint_data->tmp_vertex_buffer);
|
||||
|
||||
if (paint_data->tmp_uv_buffer == 0)
|
||||
glGenBuffers(1, &paint_data->tmp_uv_buffer);
|
||||
|
||||
if (texture_target == GL_TEXTURE_RECTANGLE_ARB)
|
||||
use_texture_rect_program (paint_data, &position_location, &uv_location, &map_location);
|
||||
use_texture_rect_program (paint_data);
|
||||
else
|
||||
use_texture_2d_program (paint_data, &position_location, &uv_location, &map_location);
|
||||
use_texture_2d_program (paint_data);
|
||||
|
||||
program = paint_data->current_program;
|
||||
|
||||
glActiveTexture (GL_TEXTURE0);
|
||||
glUniform1i(map_location, 0); /* Use texture unit 0 */
|
||||
glUniform1i(program->map_location, 0); /* Use texture unit 0 */
|
||||
|
||||
glEnableVertexAttribArray (0);
|
||||
glBindBuffer (GL_ARRAY_BUFFER, paint_data->tmp_vertex_buffer);
|
||||
glBufferData (GL_ARRAY_BUFFER, sizeof(vertex_buffer_data), vertex_buffer_data, GL_STREAM_DRAW);
|
||||
glVertexAttribPointer (position_location, 2, GL_FLOAT, GL_FALSE, 0, NULL);
|
||||
glEnableVertexAttribArray (1);
|
||||
glBindBuffer (GL_ARRAY_BUFFER, paint_data->tmp_uv_buffer);
|
||||
glBufferData (GL_ARRAY_BUFFER, sizeof(uv_buffer_data), uv_buffer_data, GL_STREAM_DRAW);
|
||||
glVertexAttribPointer (uv_location, 2, GL_FLOAT, GL_FALSE, 0, NULL);
|
||||
glDrawArrays (GL_TRIANGLE_FAN, 0, 4);
|
||||
glBindBuffer (GL_ARRAY_BUFFER, paint_data->tmp_vertex_buffer);
|
||||
|
||||
glVertexAttribPointer (program->position_location, 2, GL_FLOAT, GL_FALSE, sizeof(float) * 4, NULL);
|
||||
glVertexAttribPointer (program->uv_location, 2, GL_FLOAT, GL_FALSE, sizeof(float) * 4, (void *) (sizeof(float) * 2));
|
||||
|
||||
#define VERTEX_SIZE 4
|
||||
|
||||
#define QUAD_N_VERTICES 6
|
||||
|
||||
#define QUAD_SIZE (VERTEX_SIZE * QUAD_N_VERTICES)
|
||||
|
||||
vertex_buffer_data = g_new (float, n_quads * QUAD_SIZE);
|
||||
|
||||
for (i = 0; i < n_quads; i++)
|
||||
{
|
||||
GdkTexturedQuad *quad = &quads[i];
|
||||
float vertex_data[] = {
|
||||
(quad->x1 * 2) / w - 1, (quad->y1 * 2) / h - 1, quad->u1, quad->v1,
|
||||
(quad->x1 * 2) / w - 1, (quad->y2 * 2) / h - 1, quad->u1, quad->v2,
|
||||
(quad->x2 * 2) / w - 1, (quad->y1 * 2) / h - 1, quad->u2, quad->v1,
|
||||
|
||||
(quad->x2 * 2) / w - 1, (quad->y2 * 2) / h - 1, quad->u2, quad->v2,
|
||||
(quad->x1 * 2) / w - 1, (quad->y2 * 2) / h - 1, quad->u1, quad->v2,
|
||||
(quad->x2 * 2) / w - 1, (quad->y1 * 2) / h - 1, quad->u2, quad->v1,
|
||||
};
|
||||
|
||||
float *vertex = &vertex_buffer_data[i * QUAD_SIZE];
|
||||
memcpy (vertex, vertex_data, sizeof(vertex_data));
|
||||
}
|
||||
|
||||
glBufferData (GL_ARRAY_BUFFER, sizeof(float) * n_quads * QUAD_SIZE, vertex_buffer_data, GL_STREAM_DRAW);
|
||||
glDrawArrays (GL_TRIANGLES, 0, n_quads * QUAD_N_VERTICES);
|
||||
|
||||
g_free (vertex_buffer_data);
|
||||
|
||||
glDisableVertexAttribArray (0);
|
||||
glDisableVertexAttribArray (1);
|
||||
}
|
||||
|
||||
|
||||
/* x,y,width,height describes a rectangle in the gl render buffer
|
||||
coordinate space, and its top left corner is drawn at the current
|
||||
position according to the cairo translation. */
|
||||
@@ -401,7 +394,7 @@ gdk_cairo_draw_from_gl (cairo_t *cr,
|
||||
trivial_transform &&
|
||||
clip_region != NULL)
|
||||
{
|
||||
int window_height;
|
||||
int unscaled_window_height;
|
||||
int i;
|
||||
|
||||
/* Create a framebuffer with the source renderbuffer and
|
||||
@@ -417,10 +410,10 @@ gdk_cairo_draw_from_gl (cairo_t *cr,
|
||||
|
||||
glEnable (GL_SCISSOR_TEST);
|
||||
|
||||
window_height = gdk_window_get_height (impl_window);
|
||||
gdk_window_get_unscaled_size (impl_window, NULL, &unscaled_window_height);
|
||||
glDrawBuffer (GL_BACK);
|
||||
|
||||
#define FLIP_Y(_y) (window_height*window_scale - (_y))
|
||||
#define FLIP_Y(_y) (unscaled_window_height - (_y))
|
||||
|
||||
for (i = 0; i < cairo_region_num_rectangles (clip_region); i++)
|
||||
{
|
||||
@@ -481,10 +474,12 @@ gdk_cairo_draw_from_gl (cairo_t *cr,
|
||||
trivial_transform &&
|
||||
clip_region != NULL)
|
||||
{
|
||||
int window_height;
|
||||
int unscaled_window_height;
|
||||
GLint texture_width;
|
||||
GLint texture_height;
|
||||
int i;
|
||||
int i, n_rects, n_quads;
|
||||
GdkTexturedQuad *quads;
|
||||
cairo_rectangle_int_t clip_rect;
|
||||
|
||||
/* Translate to impl coords */
|
||||
cairo_region_translate (clip_region, dx, dy);
|
||||
@@ -526,13 +521,21 @@ gdk_cairo_draw_from_gl (cairo_t *cr,
|
||||
glEnable (GL_SCISSOR_TEST);
|
||||
glEnable (GL_TEXTURE_2D);
|
||||
|
||||
window_height = gdk_window_get_height (impl_window);
|
||||
gdk_window_get_unscaled_size (impl_window, NULL, &unscaled_window_height);
|
||||
|
||||
#define FLIP_Y(_y) (window_height*window_scale - (_y))
|
||||
#define FLIP_Y(_y) (unscaled_window_height - (_y))
|
||||
|
||||
for (i = 0; i < cairo_region_num_rectangles (clip_region); i++)
|
||||
cairo_region_get_extents (clip_region, &clip_rect);
|
||||
|
||||
glScissor (clip_rect.x, FLIP_Y (clip_rect.y + clip_rect.height),
|
||||
clip_rect.width, clip_rect.height);
|
||||
|
||||
n_quads = 0;
|
||||
n_rects = cairo_region_num_rectangles (clip_region);
|
||||
quads = g_new (GdkTexturedQuad, n_rects);
|
||||
for (i = 0; i < n_rects; i++)
|
||||
{
|
||||
cairo_rectangle_int_t clip_rect, dest;
|
||||
cairo_rectangle_int_t dest;
|
||||
|
||||
cairo_region_get_rectangle (clip_region, i, &clip_rect);
|
||||
|
||||
@@ -541,9 +544,6 @@ gdk_cairo_draw_from_gl (cairo_t *cr,
|
||||
clip_rect.width *= window_scale;
|
||||
clip_rect.height *= window_scale;
|
||||
|
||||
glScissor (clip_rect.x, FLIP_Y (clip_rect.y + clip_rect.height),
|
||||
clip_rect.width, clip_rect.height);
|
||||
|
||||
dest.x = dx * window_scale;
|
||||
dest.y = dy * window_scale;
|
||||
dest.width = width * window_scale / buffer_scale;
|
||||
@@ -553,13 +553,14 @@ gdk_cairo_draw_from_gl (cairo_t *cr,
|
||||
{
|
||||
int clipped_src_x = x + (dest.x - dx * window_scale);
|
||||
int clipped_src_y = y + (height - dest.height - (dest.y - dy * window_scale));
|
||||
GdkTexturedQuad quad = {
|
||||
dest.x, FLIP_Y(dest.y),
|
||||
dest.x + dest.width, FLIP_Y(dest.y + dest.height),
|
||||
clipped_src_x / (float)texture_width, (clipped_src_y + dest.height) / (float)texture_height,
|
||||
(clipped_src_x + dest.width) / (float)texture_width, clipped_src_y / (float)texture_height,
|
||||
};
|
||||
|
||||
gdk_gl_texture_quad (paint_context,
|
||||
GL_TEXTURE_2D,
|
||||
dest.x, FLIP_Y(dest.y),
|
||||
dest.x + dest.width, FLIP_Y(dest.y + dest.height),
|
||||
clipped_src_x / (float)texture_width, (clipped_src_y + dest.height) / (float)texture_height,
|
||||
(clipped_src_x + dest.width) / (float)texture_width, clipped_src_y / (float)texture_height);
|
||||
quads[n_quads++] = quad;
|
||||
|
||||
if (impl_window->current_paint.flushed_region)
|
||||
{
|
||||
@@ -578,11 +579,15 @@ gdk_cairo_draw_from_gl (cairo_t *cr,
|
||||
}
|
||||
}
|
||||
|
||||
if (n_quads > 0)
|
||||
gdk_gl_texture_quads (paint_context, GL_TEXTURE_2D, n_quads, quads);
|
||||
|
||||
g_free (quads);
|
||||
|
||||
if (alpha_size != 0)
|
||||
glDisable (GL_BLEND);
|
||||
|
||||
glDisable (GL_TEXTURE_2D);
|
||||
glDisable (GL_SCISSOR_TEST);
|
||||
|
||||
#undef FLIP_Y
|
||||
|
||||
@@ -652,13 +657,14 @@ gdk_gl_texture_from_surface (cairo_surface_t *surface,
|
||||
cairo_rectangle_int_t rect, e;
|
||||
int n_rects, i;
|
||||
GdkWindow *window;
|
||||
int window_height;
|
||||
int unscaled_window_height;
|
||||
unsigned int texture_id;
|
||||
int window_scale;
|
||||
double sx, sy;
|
||||
float umax, vmax;
|
||||
gboolean use_texture_rectangle;
|
||||
guint target;
|
||||
GdkTexturedQuad *quads;
|
||||
|
||||
paint_context = gdk_gl_context_get_current ();
|
||||
if ((_gdk_gl_flags & GDK_GL_SOFTWARE_DRAW_SURFACE) == 0 &&
|
||||
@@ -672,7 +678,7 @@ gdk_gl_texture_from_surface (cairo_surface_t *surface,
|
||||
|
||||
window = gdk_gl_context_get_window (paint_context);
|
||||
window_scale = gdk_window_get_scale_factor (window);
|
||||
window_height = gdk_window_get_height (window);
|
||||
gdk_window_get_unscaled_size (window, NULL, &unscaled_window_height);
|
||||
|
||||
sx = sy = 1;
|
||||
cairo_surface_get_device_scale (window->current_paint.surface, &sx, &sy);
|
||||
@@ -696,11 +702,13 @@ gdk_gl_texture_from_surface (cairo_surface_t *surface,
|
||||
glTexParameteri (target, GL_TEXTURE_MAG_FILTER, GL_NEAREST);
|
||||
|
||||
n_rects = cairo_region_num_rectangles (region);
|
||||
quads = g_new (GdkTexturedQuad, n_rects);
|
||||
|
||||
for (i = 0; i < n_rects; i++)
|
||||
{
|
||||
cairo_region_get_rectangle (region, i, &rect);
|
||||
|
||||
glScissor (rect.x * window_scale, (window_height - rect.y - rect.height) * window_scale,
|
||||
glScissor (rect.x * window_scale, unscaled_window_height - (rect.y + rect.height) * window_scale,
|
||||
rect.width * window_scale, rect.height * window_scale);
|
||||
|
||||
e = rect;
|
||||
@@ -720,7 +728,7 @@ gdk_gl_texture_from_surface (cairo_surface_t *surface,
|
||||
|
||||
cairo_surface_unmap_image (surface, image);
|
||||
|
||||
#define FLIP_Y(_y) (window_height - (_y))
|
||||
#define FLIP_Y(_y) (unscaled_window_height - (_y))
|
||||
|
||||
if (use_texture_rectangle)
|
||||
{
|
||||
@@ -733,13 +741,21 @@ gdk_gl_texture_from_surface (cairo_surface_t *surface,
|
||||
vmax = 1.0;
|
||||
}
|
||||
|
||||
gdk_gl_texture_quad (paint_context, target,
|
||||
rect.x * window_scale, FLIP_Y(rect.y) * window_scale,
|
||||
(rect.x + rect.width) * window_scale, FLIP_Y(rect.y + rect.height) * window_scale,
|
||||
0, 0,
|
||||
umax, vmax);
|
||||
{
|
||||
GdkTexturedQuad quad = {
|
||||
rect.x * window_scale, FLIP_Y(rect.y),
|
||||
(rect.x + rect.width) * window_scale, FLIP_Y((rect.y + rect.height) * window_scale),
|
||||
0, 0,
|
||||
umax, vmax,
|
||||
};
|
||||
|
||||
quads[i] = quad;
|
||||
}
|
||||
}
|
||||
|
||||
gdk_gl_texture_quads (paint_context, target, n_rects, quads);
|
||||
g_free (quads);
|
||||
|
||||
glDisable (GL_SCISSOR_TEST);
|
||||
glDisable (target);
|
||||
glDeleteTextures (1, &texture_id);
|
||||
|
@@ -40,7 +40,6 @@ struct _GdkGLContextClass
|
||||
{
|
||||
GObjectClass parent_class;
|
||||
|
||||
void (* update) (GdkGLContext *context);
|
||||
void (* end_frame) (GdkGLContext *context,
|
||||
cairo_region_t *painted,
|
||||
cairo_region_t *damage);
|
||||
@@ -49,20 +48,22 @@ struct _GdkGLContextClass
|
||||
cairo_region_t *region);
|
||||
};
|
||||
|
||||
typedef struct {
|
||||
guint program;
|
||||
guint position_location;
|
||||
guint uv_location;
|
||||
guint map_location;
|
||||
} GdkGLContextProgram;
|
||||
|
||||
typedef struct {
|
||||
guint vertex_array_object;
|
||||
guint tmp_framebuffer;
|
||||
guint tmp_vertex_buffer;
|
||||
guint tmp_uv_buffer;
|
||||
guint current_program;
|
||||
guint texture_quad_program;
|
||||
guint texture_quad_program_position_location;
|
||||
guint texture_quad_program_uv_location;
|
||||
guint texture_quad_program_map_location;
|
||||
guint texture_quad_rect_program;
|
||||
guint texture_quad_rect_program_position_location;
|
||||
guint texture_quad_rect_program_uv_location;
|
||||
guint texture_quad_rect_program_map_location;
|
||||
|
||||
GdkGLContextProgram texture_2d_quad_program;
|
||||
GdkGLContextProgram texture_rect_quad_program;
|
||||
|
||||
GdkGLContextProgram *current_program;
|
||||
} GdkGLContextPaintData;
|
||||
|
||||
GdkGLContextPaintData *gdk_gl_context_get_paint_data (GdkGLContext *context);
|
||||
|
@@ -216,15 +216,82 @@ struct _GdkWindow
|
||||
|
||||
cairo_pattern_t *background;
|
||||
|
||||
/* The paint logic here is a bit complex because of our intermingling of
|
||||
* cairo and GL. Let's first go over the cairo-alone case:
|
||||
*
|
||||
* 1) gdk_window_begin_paint_region() is called with an update region. If
|
||||
* the backend wants it, we redirect drawing to a temporary surface
|
||||
* sized the same as the update region and set `surface_needs_composite`
|
||||
* to TRUE. Otherwise, we paint directly onto the real server-side window.
|
||||
*
|
||||
* 2) Things paint with cairo using gdk_cairo_create().
|
||||
*
|
||||
* 3) When everything is painted, the user calls gdk_window_end_paint().
|
||||
* If there was a temporary surface, this is composited back onto the
|
||||
* real backing surface in the appropriate places.
|
||||
*
|
||||
* This is similar to double buffering, except we only have partial surfaces
|
||||
* of undefined contents, and instead of swapping between two buffers, we
|
||||
* create a new temporary buffer every time.
|
||||
*
|
||||
* When we add GL to the mix, we have this instead:
|
||||
*
|
||||
* 1) gdk_window_begin_paint_region() is called with an update region like
|
||||
* before. We always redirect cairo drawing to a temporary surface when
|
||||
* GL is enabled.
|
||||
*
|
||||
* 2) Things paint with cairo using gdk_cairo_create(). Whenever
|
||||
* something paints, it calls gdk_window_mark_paint_from_clip() to mark
|
||||
* which regions it has painted in software. We'll learn what this does
|
||||
* soon.
|
||||
*
|
||||
* 3) Something paints with GL and uses gdk_cairo_draw_from_gl() to
|
||||
* composite back into the scene. We paint this onto the backing
|
||||
* store for the window *immediately* by using GL, rather than
|
||||
* painting to the temporary surface, and keep track of the area that
|
||||
* we've painted in `flushed_region`.
|
||||
*
|
||||
* 4) Something paints using software again. It calls
|
||||
* gdk_window_mark_paint_from_clip(), which subtracts the region it
|
||||
* has painted from `flushed_region` and adds the region to
|
||||
* `needs_blended_region`.
|
||||
*
|
||||
* 5) Something paints using GL again, using gdk_cairo_draw_from_gl().
|
||||
* It paints directly to the backing store, removes the region it
|
||||
* painted from `needs_blended_region`, and adds to `flushed_region`.
|
||||
*
|
||||
* 6) gdk_window_end_paint() is called. It composites the temporary surface
|
||||
* back to the window, using GL, except it doesn't bother copying
|
||||
* `flushed_region`, and when it paints `needs_blended_region`, it also
|
||||
* turns on GL blending.
|
||||
*
|
||||
* That means that at any point in time, we have three regions:
|
||||
*
|
||||
* * `region` - This is the original invalidated region and is never
|
||||
* touched.
|
||||
*
|
||||
* * `flushed_region` - This is the portion of `region` that has GL
|
||||
* contents that have been painted directly to the window, and
|
||||
* doesn't have any cairo drawing painted over it.
|
||||
*
|
||||
* * `needs_blended_region` - This is the portion of `region` that
|
||||
* GL contents that have part cairo drawing painted over it.
|
||||
* gdk_window_end_paint() will draw this region using blending.
|
||||
*
|
||||
* `flushed_region` and `needs_blended_region` never intersect, and the
|
||||
* rest of `region` that isn't covered by either is the "opaque region",
|
||||
* which is any area of cairo drawing that didn't ever intersect with GL.
|
||||
* We can paint these from GL without turning on blending.
|
||||
**/
|
||||
|
||||
struct {
|
||||
cairo_region_t *region;
|
||||
/* The temporary surface that we're painting to. This will be composited
|
||||
* back into the window when we call end_paint. This is our poor-man's
|
||||
* way of doing double buffering. */
|
||||
cairo_surface_t *surface;
|
||||
|
||||
/* Areas of region that have been copied to the back buffer already */
|
||||
cairo_region_t *region;
|
||||
cairo_region_t *flushed_region;
|
||||
/* Areas of region that have been copied to the back buffer but
|
||||
needs furter blending of surface data. These two regions are
|
||||
always non-intersecting. */
|
||||
cairo_region_t *need_blend_region;
|
||||
|
||||
gboolean surface_needs_composite;
|
||||
@@ -350,12 +417,17 @@ gboolean _gdk_cairo_surface_extents (cairo_surface_t *surface,
|
||||
GdkRectangle *extents);
|
||||
void gdk_gl_texture_from_surface (cairo_surface_t *surface,
|
||||
cairo_region_t *region);
|
||||
void gdk_gl_texture_quad (GdkGLContext *paint_context,
|
||||
guint texture_target,
|
||||
float x1, float y1,
|
||||
float x2, float y2,
|
||||
float u1, float v1,
|
||||
float u2, float v2);
|
||||
|
||||
typedef struct {
|
||||
float x1, y1, x2, y2;
|
||||
float u1, v1, u2, v2;
|
||||
} GdkTexturedQuad;
|
||||
|
||||
void gdk_gl_texture_quads (GdkGLContext *paint_context,
|
||||
guint texture_target,
|
||||
int n_quads,
|
||||
GdkTexturedQuad *quads);
|
||||
|
||||
void gdk_cairo_surface_mark_as_direct (cairo_surface_t *surface,
|
||||
GdkWindow *window);
|
||||
cairo_region_t *gdk_cairo_region_from_clip (cairo_t *cr);
|
||||
@@ -375,7 +447,9 @@ void _gdk_window_update_size (GdkWindow *window);
|
||||
gboolean _gdk_window_update_viewable (GdkWindow *window);
|
||||
GdkGLContext * gdk_window_get_paint_gl_context (GdkWindow *window,
|
||||
GError **error);
|
||||
|
||||
void gdk_window_get_unscaled_size (GdkWindow *window,
|
||||
int *unscaled_width,
|
||||
int *unscaled_height);
|
||||
|
||||
void _gdk_window_process_updates_recurse (GdkWindow *window,
|
||||
cairo_region_t *expose_region);
|
||||
|
@@ -2891,8 +2891,8 @@ gdk_window_begin_paint_region (GdkWindow *window,
|
||||
impl_class = GDK_WINDOW_IMPL_GET_CLASS (window->impl);
|
||||
|
||||
needs_surface = TRUE;
|
||||
if (impl_class->begin_paint_region)
|
||||
needs_surface = impl_class->begin_paint_region (window, region);
|
||||
if (impl_class->begin_paint)
|
||||
needs_surface = impl_class->begin_paint (window);
|
||||
|
||||
window->current_paint.region = cairo_region_copy (region);
|
||||
cairo_region_intersect (window->current_paint.region, window->clip_region);
|
||||
@@ -3069,7 +3069,6 @@ gdk_window_end_paint (GdkWindow *window)
|
||||
if (impl_class->end_paint)
|
||||
impl_class->end_paint (window);
|
||||
|
||||
|
||||
if (window->current_paint.surface_needs_composite)
|
||||
{
|
||||
cairo_surface_t *surface;
|
||||
@@ -11045,6 +11044,37 @@ gdk_window_get_scale_factor (GdkWindow *window)
|
||||
return 1;
|
||||
}
|
||||
|
||||
/* Returns the *real* unscaled size, which may be a fractional size
|
||||
in window scale coordinates. We need this to properly handle GL
|
||||
coordinates which are y-flipped in the real coordinates. */
|
||||
void
|
||||
gdk_window_get_unscaled_size (GdkWindow *window,
|
||||
int *unscaled_width,
|
||||
int *unscaled_height)
|
||||
{
|
||||
GdkWindowImplClass *impl_class;
|
||||
gint scale;
|
||||
|
||||
g_return_if_fail (GDK_IS_WINDOW (window));
|
||||
|
||||
if (window->impl_window == window)
|
||||
{
|
||||
impl_class = GDK_WINDOW_IMPL_GET_CLASS (window->impl);
|
||||
|
||||
if (impl_class->get_unscaled_size)
|
||||
return impl_class->get_unscaled_size (window, unscaled_width, unscaled_height);
|
||||
}
|
||||
|
||||
scale = gdk_window_get_scale_factor (window);
|
||||
|
||||
if (unscaled_width)
|
||||
*unscaled_width = window->width * scale;
|
||||
|
||||
if (unscaled_height)
|
||||
*unscaled_height = window->height * scale;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* gdk_window_set_opaque_region:
|
||||
* @window: a top-level or non-native #GdkWindow
|
||||
|
@@ -106,8 +106,7 @@ struct _GdkWindowImplClass
|
||||
gdouble *x,
|
||||
gdouble *y,
|
||||
GdkModifierType *mask);
|
||||
gboolean (* begin_paint_region) (GdkWindow *window,
|
||||
const cairo_region_t *region);
|
||||
gboolean (* begin_paint) (GdkWindow *window);
|
||||
void (* end_paint) (GdkWindow *window);
|
||||
|
||||
cairo_region_t * (* get_shape) (GdkWindow *window);
|
||||
@@ -279,6 +278,9 @@ struct _GdkWindowImplClass
|
||||
GdkAtom property);
|
||||
|
||||
gint (* get_scale_factor) (GdkWindow *window);
|
||||
void (* get_unscaled_size) (GdkWindow *window,
|
||||
int *unscaled_width,
|
||||
int *unscaled_height);
|
||||
|
||||
void (* set_opaque_region) (GdkWindow *window,
|
||||
cairo_region_t *region);
|
||||
|
@@ -28,7 +28,7 @@
|
||||
#define GDK_MIR_IS_GL_CONTEXT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GDK_TYPE_MIR_GL_CONTEXT))
|
||||
|
||||
#define GDK_TYPE_MIR_WINDOW (gdk_mir_window_get_type ())
|
||||
#define GDK_IS_WINDOW_MIR(object) (G_TYPE_CHECK_INSTANCE_TYPE ((object), GDK_TYPE_MIR_WINDOW))
|
||||
#define GDK_IS_MIR_WINDOW(object) (G_TYPE_CHECK_INSTANCE_TYPE ((object), GDK_TYPE_MIR_WINDOW))
|
||||
|
||||
GDK_AVAILABLE_IN_3_10
|
||||
GType gdk_mir_display_get_type (void);
|
||||
|
@@ -62,7 +62,7 @@ typedef struct GdkMirDisplayClass
|
||||
GdkDisplayClass parent_class;
|
||||
} GdkMirDisplayClass;
|
||||
|
||||
static void initialize_pixel_formats (GdkMirDisplay *display);
|
||||
static void get_pixel_formats (MirConnection *, MirPixelFormat *sw, MirPixelFormat *hw);
|
||||
|
||||
/**
|
||||
* SECTION:mir_interaction
|
||||
@@ -104,6 +104,7 @@ GdkDisplay *
|
||||
_gdk_mir_display_open (const gchar *display_name)
|
||||
{
|
||||
MirConnection *connection;
|
||||
MirPixelFormat sw_pixel_format, hw_pixel_format;
|
||||
GdkMirDisplay *display;
|
||||
|
||||
g_printerr ("gdk_mir_display_open\n");
|
||||
@@ -111,6 +112,7 @@ _gdk_mir_display_open (const gchar *display_name)
|
||||
connection = mir_connect_sync (NULL, "GDK-Mir");
|
||||
if (!connection)
|
||||
return NULL;
|
||||
|
||||
if (!mir_connection_is_valid (connection))
|
||||
{
|
||||
g_printerr ("Failed to connect to Mir: %s\n", mir_connection_get_error_message (connection));
|
||||
@@ -118,12 +120,23 @@ _gdk_mir_display_open (const gchar *display_name)
|
||||
return NULL;
|
||||
}
|
||||
|
||||
get_pixel_formats (connection, &sw_pixel_format, &hw_pixel_format);
|
||||
|
||||
if (sw_pixel_format == mir_pixel_format_invalid ||
|
||||
hw_pixel_format == mir_pixel_format_invalid)
|
||||
{
|
||||
g_printerr ("Mir display does not support required pixel formats\n");
|
||||
mir_connection_release (connection);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
display = g_object_new (GDK_TYPE_MIR_DISPLAY, NULL);
|
||||
|
||||
display->connection = connection;
|
||||
GDK_DISPLAY (display)->device_manager = _gdk_mir_device_manager_new (GDK_DISPLAY (display));
|
||||
display->screen = _gdk_mir_screen_new (GDK_DISPLAY (display));
|
||||
initialize_pixel_formats (display);
|
||||
display->sw_pixel_format = sw_pixel_format;
|
||||
display->hw_pixel_format = hw_pixel_format;
|
||||
|
||||
g_signal_emit_by_name (display, "opened");
|
||||
|
||||
@@ -160,8 +173,9 @@ gdk_mir_display_dispose (GObject *object)
|
||||
{
|
||||
GdkMirDisplay *display = GDK_MIR_DISPLAY (object);
|
||||
|
||||
g_object_unref (display->screen);
|
||||
display->screen = NULL;
|
||||
g_clear_object (&display->screen);
|
||||
g_clear_object (&display->keymap);
|
||||
g_clear_pointer (&display->event_source, g_source_unref);
|
||||
|
||||
G_OBJECT_CLASS (gdk_mir_display_parent_class)->dispose (object);
|
||||
}
|
||||
@@ -500,41 +514,50 @@ gdk_mir_display_utf8_to_string_target (GdkDisplay *display,
|
||||
}
|
||||
|
||||
static void
|
||||
initialize_pixel_formats (GdkMirDisplay *display)
|
||||
get_pixel_formats (MirConnection *connection,
|
||||
MirPixelFormat *sw_pixel_format,
|
||||
MirPixelFormat *hw_pixel_format)
|
||||
{
|
||||
MirPixelFormat formats[mir_pixel_formats];
|
||||
unsigned int n_formats, i;
|
||||
|
||||
mir_connection_get_available_surface_formats (display->connection, formats,
|
||||
mir_connection_get_available_surface_formats (connection, formats,
|
||||
mir_pixel_formats, &n_formats);
|
||||
|
||||
display->sw_pixel_format = mir_pixel_format_invalid;
|
||||
display->hw_pixel_format = mir_pixel_format_invalid;
|
||||
|
||||
for (i = 0; i < n_formats; i++)
|
||||
if (sw_pixel_format)
|
||||
{
|
||||
switch (formats[i])
|
||||
{
|
||||
case mir_pixel_format_abgr_8888:
|
||||
case mir_pixel_format_xbgr_8888:
|
||||
case mir_pixel_format_argb_8888:
|
||||
case mir_pixel_format_xrgb_8888:
|
||||
display->hw_pixel_format = formats[i];
|
||||
break;
|
||||
default:
|
||||
continue;
|
||||
}
|
||||
*sw_pixel_format = mir_pixel_format_invalid;
|
||||
|
||||
if (display->hw_pixel_format != mir_pixel_format_invalid)
|
||||
break;
|
||||
for (i = 0; i < n_formats; i++)
|
||||
{
|
||||
if (formats[i] == mir_pixel_format_argb_8888)
|
||||
{
|
||||
*sw_pixel_format = formats[i];
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
for (i = 0; i < n_formats; i++)
|
||||
if (hw_pixel_format)
|
||||
{
|
||||
if (formats[i] == mir_pixel_format_argb_8888)
|
||||
*hw_pixel_format = mir_pixel_format_invalid;
|
||||
|
||||
for (i = 0; i < n_formats; i++)
|
||||
{
|
||||
display->sw_pixel_format = formats[i];
|
||||
break;
|
||||
switch (formats[i])
|
||||
{
|
||||
case mir_pixel_format_abgr_8888:
|
||||
case mir_pixel_format_xbgr_8888:
|
||||
case mir_pixel_format_argb_8888:
|
||||
case mir_pixel_format_xrgb_8888:
|
||||
*hw_pixel_format = formats[i];
|
||||
break;
|
||||
default:
|
||||
continue;
|
||||
}
|
||||
|
||||
if (*hw_pixel_format != mir_pixel_format_invalid)
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -26,24 +26,6 @@
|
||||
|
||||
G_DEFINE_TYPE (GdkMirGLContext, gdk_mir_gl_context, GDK_TYPE_GL_CONTEXT)
|
||||
|
||||
static void
|
||||
gdk_mir_gl_context_update (GdkGLContext *context)
|
||||
{
|
||||
GdkWindow *window = gdk_gl_context_get_window (context);
|
||||
int width, height;
|
||||
|
||||
gdk_gl_context_make_current (context);
|
||||
|
||||
width = gdk_window_get_width (window);
|
||||
height = gdk_window_get_height (window);
|
||||
|
||||
GDK_NOTE (OPENGL, g_print ("Updating GL viewport size to { %d, %d } for window %p (context: %p)\n",
|
||||
width, height,
|
||||
window, context));
|
||||
|
||||
glViewport (0, 0, width, height);
|
||||
}
|
||||
|
||||
static void
|
||||
gdk_mir_gl_context_end_frame (GdkGLContext *context,
|
||||
cairo_region_t *painted,
|
||||
@@ -114,7 +96,6 @@ gdk_mir_gl_context_class_init (GdkMirGLContextClass *klass)
|
||||
GdkGLContextClass *context_class = GDK_GL_CONTEXT_CLASS (klass);
|
||||
GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
|
||||
|
||||
context_class->update = gdk_mir_gl_context_update;
|
||||
context_class->end_frame = gdk_mir_gl_context_end_frame;
|
||||
gobject_class->dispose = gdk_mir_gl_context_dispose;
|
||||
}
|
||||
|
@@ -186,7 +186,7 @@ create_mir_surface (GdkDisplay *display,
|
||||
MirSurfaceParameters parameters;
|
||||
MirConnection *connection;
|
||||
|
||||
parameters.name = "GTK+ Mir";
|
||||
parameters.name = g_get_prgname ();
|
||||
parameters.width = width;
|
||||
parameters.height = height;
|
||||
parameters.pixel_format = _gdk_mir_display_get_pixel_format (display, buffer_usage);
|
||||
@@ -665,10 +665,9 @@ gdk_mir_window_impl_get_device_state (GdkWindow *window,
|
||||
}
|
||||
|
||||
static gboolean
|
||||
gdk_mir_window_impl_begin_paint_region (GdkWindow *window,
|
||||
const cairo_region_t *region)
|
||||
gdk_mir_window_impl_begin_paint (GdkWindow *window)
|
||||
{
|
||||
//g_printerr ("gdk_mir_window_impl_begin_paint_region window=%p\n", window);
|
||||
//g_printerr ("gdk_mir_window_impl_begin_paint window=%p\n", window);
|
||||
/* Indicate we are ready to be drawn onto directly? */
|
||||
return FALSE;
|
||||
}
|
||||
@@ -1524,7 +1523,7 @@ gdk_mir_window_get_mir_surface (GdkWindow *window)
|
||||
{
|
||||
GdkMirWindowImpl *impl;
|
||||
|
||||
g_return_val_if_fail (GDK_IS_WINDOW_MIR (window), NULL);
|
||||
g_return_val_if_fail (GDK_IS_MIR_WINDOW (window), NULL);
|
||||
|
||||
impl = GDK_MIR_WINDOW_IMPL (window->impl);
|
||||
|
||||
@@ -1557,7 +1556,7 @@ gdk_mir_window_impl_class_init (GdkMirWindowImplClass *klass)
|
||||
impl_class->get_geometry = gdk_mir_window_impl_get_geometry;
|
||||
impl_class->get_root_coords = gdk_mir_window_impl_get_root_coords;
|
||||
impl_class->get_device_state = gdk_mir_window_impl_get_device_state;
|
||||
impl_class->begin_paint_region = gdk_mir_window_impl_begin_paint_region;
|
||||
impl_class->begin_paint = gdk_mir_window_impl_begin_paint;
|
||||
impl_class->end_paint = gdk_mir_window_impl_end_paint;
|
||||
impl_class->get_shape = gdk_mir_window_impl_get_shape;
|
||||
impl_class->get_input_shape = gdk_mir_window_impl_get_input_shape;
|
||||
|