Compare commits

...

219 Commits

Author SHA1 Message Date
Matthias Clasen
d405a5bbe3 Minimize use of style properties in themes
Change the default values of style properties where possible to
avoid having to specify these in Adwaita and HighContrast.
2014-12-08 17:32:05 -05:00
Matthias Clasen
eed1831caf Trivial off-by-one fix
We have a tenth example.
2014-12-08 17:30:35 -05:00
Matthias Clasen
6c7e5039c7 Drop a few unneeded ifs
It does not hurt to pass NULL to g_list_free().
2014-12-08 17:30:35 -05:00
Muhammet Kara
5047d503f3 Updated Turkish translation 2014-12-08 19:38:02 +00:00
Muhammet Kara
2a13869236 Updated Turkish translation 2014-12-08 19:20:34 +00:00
Matthias Clasen
64fd964703 GtkWidget: Don't return FALSE as a pointer
Pointed out in https://bugzilla.gnome.org/show_bug.cgi?id=741251
2014-12-08 09:16:24 -05:00
Matthias Clasen
a3e37abb38 GtkPlacesSidebar: Don't return FALSE as a pointer
Pointed out in https://bugzilla.gnome.org/show_bug.cgi?id=741250
2014-12-08 09:15:07 -05:00
Matthias Clasen
a3fbf29f17 GtkMenuTracker: Don't return FALSE as a pointer
Pointed out in https://bugzilla.gnome.org/show_bug.cgi?id=741249
2014-12-08 09:13:57 -05:00
Matthias Clasen
8c3f04e754 GtkEntry: Refresh when activity ends
We need to queue a redraw when pulse mode is ended by
setting a fraction. Noticed in gtk3-demo's search entry demo.
2014-12-08 06:39:56 -05:00
Kjell Ahlstedt
5d3aa54a8a docs: Explain 'icon theme context' better in gtkicontheme.c
Add links from gtk_icon_theme_list_contexts() to
gtk_icon_theme_list_icons(), and from there to the Icon Theme
Specification and the Icon Naming Specification.

https://bugzilla.gnome.org/show_bug.cgi?id=461249
2014-12-07 23:35:31 -05:00
Matthias Clasen
f74a75ae7e Handle KP keys in copy/paste keybindings
We currently handle KP variants of some keys, but not consistenly.

https://bugzilla.gnome.org/show_bug.cgi?id=364566
2014-12-07 23:28:52 -05:00
Phillip Wood
6b26464fbb Editable cells demo: Add new row at cursor
Adding rows to the bottom of the list is confusing as you cannot see
them if the window is small so it is not apparent that anything has
happened. Fix this by adding the new row immediately below the current
row and set the cursor on the new row so it is ready to be edited.

https://bugzilla.gnome.org/show_bug.cgi?id=721939
2014-12-07 18:53:30 -05:00
Matthias Clasen
06745bc0aa Add a note to the ::destroy docs
Clarify that ::destroy is not suitable for saving widget state.

https://bugzilla.gnome.org/show_bug.cgi?id=710793
2014-12-07 18:12:46 -05:00
Trần Ngọc Quân
3276bae057 Updated Vietnamese translation
Signed-off-by: Trần Ngọc Quân <vnwildman@gmail.com>
2014-12-07 15:06:11 +07:00
Emmanuele Bassi
c55c18c23e examples: Fix clean rule in stand alone Makefiles
Remove all the built files, including the exampleapp binary.
2014-12-06 13:30:24 +00:00
Emmanuele Bassi
f718bc9bc9 examples: Add stand alone Makefile for application10
Missed out on the last application examples.
2014-12-06 13:25:01 +00:00
Ankita Patil
a4e827e4bf GtkEntry: Added gtk_entry_grab_focus_without_selection()
Providing a way to focus an entry without selecting its contents.

https://bugzilla.gnome.org/show_bug.cgi?id=735838
2014-12-05 23:17:25 -05:00
Matthias Clasen
45bed11272 GtkTextTag: Add two missing property set cases
These were overlooked when adding ::fallback and ::letter-spacing
recently.
2014-12-05 21:24:43 -05:00
Matthias Clasen
e1716611bd Update docs
Document new fields in GtkTextAttributes, remove redundant comments.
2014-12-05 20:10:11 -05:00
Matthias Clasen
888304b172 Minor documentation fixes 2014-12-05 20:10:07 -05:00
Matthias Clasen
28497075c7 Raleigh: Fix css for active notebook tabs
This was not kept up-to-date when we changed notebootk
tab rendering.

https://bugzilla.gnome.org/show_bug.cgi?id=741185
2014-12-05 19:30:35 -05:00
Carlos Soriano
0504328bd8 gtkscale: Draw smaller marks
As a design request, use smaller marks.

https://bugzilla.gnome.org/show_bug.cgi?id=741117
2014-12-05 13:23:05 +01:00
Carlos Soriano
eec9a74304 widget-factory: Add a discontinuous GtkScale with marks
So designers can tweak the marks and developers can see how a
discontinuos scale is implemented.

https://bugzilla.gnome.org/show_bug.cgi?id=741117
2014-12-05 13:23:05 +01:00
Matthias Clasen
042117b7bf Add epoxy to GTK_PRIVATE_PACKAGES
We are using epoxy api in GtkGLArea, so we need to link against it.

https://bugzilla.gnome.org/show_bug.cgi?id=740162
2014-12-04 23:28:33 -05:00
Matthias Clasen
39c0ba59bc places sidebar: Fix the sort function
When returning 1 for a pair (a,b), a sort function must
return -1 for the pair (b,a), otherwise things can go
badly.

https://bugzilla.gnome.org/show_bug.cgi?id=739729
2014-12-04 22:26:14 -05:00
Debarshi Ray
8718e9296e file-chooser: Don't wait for ENTER to initiate search
Most of the core GNOME applications (eg., gnome-control-center,
gnome-documents, and nautilus) start searching as soon as the text
changes, and don't wait for the user to hit ENTER. It would be nice to
follow the same pattern.

https://bugzilla.gnome.org/show_bug.cgi?id=739977
2014-12-04 21:59:52 -05:00
Matthias Clasen
3d4bcf55a5 Allow inserting Pango markup in text buffers
This has been a very long-standing feature request.

https://bugzilla.gnome.org/show_bug.cgi?id=59390
2014-12-04 00:09:44 -05:00
Matthias Clasen
d184088cae GtkTextView: Add fallback and letter-spacing support
Add support for the Pango attributes controlling font fallback
and letter spacing to GtkTextTag.

https://bugzilla.gnome.org/show_bug.cgi?id=740954
2014-12-04 00:09:44 -05:00
Piotr Drąg
d0b7ccc2c5 Updated POTFILES.skip 2014-12-03 15:31:23 +01:00
Jakub Steiner
66dfdc3cc2 HC: use child istead of descendant selectors for linking
Since widgets subelements are now both widget childs and widget
classes, say .spinbutton.button and .spinbutton .button,
the linking logic needs to be adapted to be stricter with
child selectors. This fixes vertically linked spinbuttons.
2014-12-03 11:42:06 +01:00
Jakub Steiner
88a12fe777 HC: sidebars and vertical toolbars with borders
- the assumption for vertical toolbar being on the left is perhaps
  a little daring, but...

https://bugzilla.gnome.org/show_bug.cgi?id=740859
2014-12-03 11:37:21 +01:00
Lapo Calamandrei
825ef99e17 Adwaita: use child istead of descendant selectors for linking
Since widgets subelements are now both widget childs and widget
classes, say .spinbutton.button and .spinbutton .button, the linking
logic needs to be adapted to be stricter with child selectors.
This fixes vertically linked spinbuttons.
2014-12-03 11:34:15 +01:00
Chun-wei Fan
fbe4f94519 test/gtkgears.c: Fix Builds on Systems Without M_PI
Use G_PI in place of M_PI to fix the build on compilers that do not have
M_PI defined.

https://bugzilla.gnome.org/show_bug.cgi?id=740795
2014-12-03 17:10:37 +08:00
Trinh Anh Ngoc
7717b0d556 Add separator
https://bugzilla.gnome.org/show_bug.cgi?id=741027
2014-12-02 23:15:19 -05:00
Trinh Anh Ngoc
01c941b046 Remove icon view window shadow
https://bugzilla.gnome.org/show_bug.cgi?id=741027
2014-12-02 23:15:19 -05:00
Matthias Clasen
b6383f1507 Reshuffle some docs 2014-12-02 21:00:24 -05:00
Matthias Clasen
5438e53f5c Use resources for icons
This fixes icons after the recent directory reshuffling, and
is just the right thing to do, since these icons are in resources
anyway.
2014-12-02 21:00:24 -05:00
Matthias Clasen
6f10ed2711 Improve action-namespace example
This needs to have some space around the button for the popover
to show up.
2014-12-02 21:00:24 -05:00
Emmanuele Bassi
37a1e6cacb docs: Mention the standalone Makefile for examples
And point to the README file.

https://bugzilla.gnome.org/show_bug.cgi?id=741041
2014-12-02 19:30:33 +00:00
Emmanuele Bassi
92f6771564 docs: Add a README to the examples directory
https://bugzilla.gnome.org/show_bug.cgi?id=741041
2014-12-02 19:23:50 +00:00
Emmanuele Bassi
3b2cf140a2 Add standalone Makefile for the examples
We want to allow people to build the examples easily, without
necessarily requiring them to build the whole of GTK+.

https://bugzilla.gnome.org/show_bug.cgi?id=741041
2014-12-02 19:23:50 +00:00
Carlos Garnacho
ccdcff9456 popover: make smarter wrt previous focus widget lifetime
If the previous focus widget is unmapped (eg. hidden, scheduled for
destruction, etc), make the popover forget about it and grant focus
back to the window itself.
2014-12-02 15:49:23 +01:00
Marco Trevisan (Treviño)
af2ac29faf gdkgl: pass the correct number of quads to gdk_gl_texture_quads
And call it only if that's the case
2014-12-02 14:59:47 +01:00
Matthias Clasen
cb3393f001 css: Avoid excessive shadow rendering
The shadow rendering code had code to exit early if we determine
that the shadow is entirely clipped away. Unfortunately, the check
based on cairo clip extents fails for any clip regions that are
more complicated than axis-aligned rectangles, and we are using
a hollow rounded rectangle here. So, instead, do the check manually,
using the just-introduced API in GtkRoundedBox.
2014-12-02 08:29:24 -05:00
Matthias Clasen
73e6a05e38 Add clipping apis to GtkRoundedBox
This adds two functions for checking whether an axis-aligned
rectangle is completely outside or inside of a rounded box.
These are not trying to be exact, but fast.
2014-12-02 08:26:36 -05:00
Jasper St. Pierre
579c7f80a0 gtkwidget: Fix a typo preventing the CSD input shape from applying
We were setting "csd-shade" but reading from "csd-region".
2014-12-01 18:01:49 -08:00
Chun-wei Fan
8ec72dd2b1 Visual Studio Build: Update GTK DLL Build Flags
As the print preview command is moved into the sources, don't define it in
the preprocessor definitions.  However, define the
GTK_PRINT_BACKEND_ENABLE_UNSUPPORTED in the preprocessor definitions, to
make the build in-line with the autotools builds.
2014-12-02 09:26:35 +08:00
Matias De Lellis
bd71849e26 GtkPlacesSidebar: Fix Home and Desktop on Windows.
We were concatenating "file://" to the result of g_get_user_special_dir() to build
a URI, but this is not enough on Windows.  Use g_filename_to_uri() instead.

See https://bugzilla.gnome.org/show_bug.cgi?id=739453
2014-12-01 14:57:32 -06:00
Jakub Steiner
c1c68b409c HC: clean up borders for buttons & entries
https://bugzilla.gnome.org/show_bug.cgi?id=740860
2014-12-01 20:35:58 +01:00
Jakub Steiner
3eaaf12c04 HC: vertical linked buttons,entries & combos
https://bugzilla.gnome.org/show_bug.cgi?id=740860
2014-12-01 20:35:58 +01:00
Jakub Steiner
cf7851b948 HC: wide separator styling
https://bugzilla.gnome.org/show_bug.cgi?id=740862
2014-12-01 20:35:58 +01:00
Jakub Steiner
5e71a49d5a HC theme: more contrasty separators
https://bugzilla.gnome.org/show_bug.cgi?id=740863
2014-12-01 20:35:58 +01:00
Jakub Steiner
fb4073a60a HC theme: implement scroll overshoot
https://bugzilla.gnome.org/show_bug.cgi?id=740876
2014-12-01 20:35:58 +01:00
Rui Matos
e629aba1a2 Drop remaining traces of GTK_UPDATE_ICON_CACHE build variable
Commit 655c75cab7 removed the need for
this variable but left a couple of uses in. Drop them.
2014-12-01 18:32:56 +01:00
Marco Trevisan (Treviño)
cf64f8a76a mir: don't initialize the display if the required pixel formats aren't available 2014-12-01 18:05:30 +01:00
Matthias Clasen
83d8f9b929 Update release notes
Mention that --enable-gtk2-dependency is gone.
2014-12-01 10:32:37 -05:00
Benjamin Otte
4d7369d1a8 inspector: Properly update flashing hilight
Previously, the inspector would not change the hilight while the
previous hilight was still flashing.
This is inconvenient while arrowing through the object selection
treeview though where you want the currently selected row to hilight
when arrowing quickly.
2014-12-01 15:43:43 +01:00
Marek Kasik
0b2bded110 printing: Don't crop dimensions of layout preview
Enlarge area for drawing of layout preview in the print dialog
so that it can embody landscape preview with dimensions.

https://bugzilla.gnome.org/show_bug.cgi?id=730232
2014-12-01 11:21:27 +01:00
Lapo Calamandrei
e355eff2bc Adwaita: scss cosmetic fixes 2014-12-01 10:14:47 +01:00
Lapo Calamandrei
5e503c54c2 Adwaita: GtkTreeView tree lines fix
See https://bugzilla.gnome.org/show_bug.cgi?id=740904 for details.
2014-12-01 10:06:33 +01:00
Matthias Clasen
32e8c39ffd Move print preview command to gtksettings.c
Having this in the source seems more appropriate.
2014-11-30 23:43:52 -05:00
Matthias Clasen
9e1187135e Move print backend list to configure.ac
We already juggle the print backends here, might as well
produce the list.
2014-11-30 23:43:52 -05:00
Matthias Clasen
eee5947365 Rearrange Makefile some more
Move the introspection parts all together, drop several unused
variables and targets.
2014-11-30 23:43:52 -05:00
Matthias Clasen
908bb6955e Drop a few more leftovers
The GTK_FILE_SYSTEM_ENABLE_UNSUPPORTED define is not used anymore,
and we don't install a gtk.css file for Raleigh, so no need to
uninstall one either.
2014-11-30 23:43:52 -05:00
Matthias Clasen
655c75cab7 Drop gtk-update-icon-cache complications
gtk-update-icon-cache is no longer used at build time, so a lot
of the complicated machinery we have around that (conditional
build, cross build, etc) are no longer required.
2014-11-30 23:43:52 -05:00
Chun-wei Fan
79e916f6af MSVC Builds: Finish Removal of the gtk-inspector Projects
The files for build of GtkInspector have been intergrated into the build of
the main GTK+ DLL, and the Visual Studio project templates for those have
been removed as well.  Make that removal complete by removing from the
solution files references to it and make the 'gtk' project not to depend on
the gtk-inspector project.
2014-12-01 12:06:28 +08:00
Benjamin Otte
7b6c68adc6 testsuite: Fix test that was committed in a broken state
1) Use font-size instead of color
This makes it easier to compare reference and test because the values
don't change.

2) Actually sort the reference properly
This unbreaks the test.
2014-12-01 04:05:44 +01:00
Matthias Clasen
de2e3c2c2e Fix distcheck
Using an absolute path with subdir-objects failed in distcheck.
2014-11-30 20:53:07 -05:00
Matthias Clasen
60dc478739 Fix ChangeLog generation
missing is no longer in the toplevel directory.
Also, clean up some file lists.
2014-11-30 19:59:10 -05:00
Matthias Clasen
0438df6d14 Quiet a rule 2014-11-30 19:58:34 -05:00
Matthias Clasen
c5f2f86ff9 Drop an unused function 2014-11-30 19:58:08 -05:00
Matthias Clasen
603b49814f Generate README and INSTALL from configure 2014-11-30 19:24:07 -05:00
Matthias Clasen
09e6fab1c9 Cosmetic formatting fixes 2014-11-30 19:23:24 -05:00
Matthias Clasen
75dab1662c Add missing docs
Document GtkSwitch::state_set.
2014-11-30 19:22:51 -05:00
Matthias Clasen
645664f20d Use subdir-objects for docs/tools 2014-11-30 19:22:00 -05:00
Matthias Clasen
4b9029c4cc Cosmetic fixes 2014-11-30 19:07:52 -05:00
Matthias Clasen
13b5e0b6e6 Drop vs build stuff for inspector
Now that the inspector sources are built as part of gtk/, this should
no longer be needed.
2014-11-30 19:05:09 -05:00
Matthias Clasen
f97780c574 Don't use escapes in echo strings
This forces us to fight with echo non-portability. Instead,
just use ' instead of \".
2014-11-30 17:25:43 -05:00
Matthias Clasen
bbb3f6a2db quartz: Copy annotations
Better than juggling introspection sources in the Makefile.
2014-11-30 17:20:38 -05:00
Matthias Clasen
bae4450698 Quiet some make rules 2014-11-30 17:18:54 -05:00
Matthias Clasen
09f83fff52 Use subdir-objects in gtk/ 2014-11-30 16:11:56 -05:00
Matthias Clasen
383d5b137b inspector: Build nonrecursively 2014-11-30 16:11:56 -05:00
Matthias Clasen
25d9412c7e Split subdirectory file lists off
This moves a little closer to a proper nonrecursive setup, and
makes the gtk Makefile.am less monstrous.
2014-11-30 16:11:56 -05:00
Matthias Clasen
93776ef88d List formatting cleanup
Always put sublists first.
2014-11-30 16:11:56 -05:00
Matthias Clasen
11cf6763a3 Drop a nonexisting variable 2014-11-30 16:11:56 -05:00
Matthias Clasen
188424cb7c Drop redundant include 2014-11-30 16:11:56 -05:00
Matthias Clasen
6e65f4235d Drop an unused variable
This is another leftover from when we were doing export checks.
2014-11-30 16:11:55 -05:00
Matthias Clasen
e4335c62a1 Drop the extra resources/ subdirectory
This subdirectory gets in the way when integrating the inspector
build more fully with GTK+, and does not really add anything.
Just move everything one level up.
2014-11-30 16:11:55 -05:00
Cosimo Cecchi
94f412622e GtkPlacesSidebar: add support for unmount notifications
Now that we can use GNotification from here, send a notification when
umounting from GtkPlacesSidebar.

https://bugzilla.gnome.org/show_bug.cgi?id=740896
2014-11-30 09:59:54 -08:00
Matthias Clasen
5bf640d344 widget-factory: Add a treeview separator row
Suggested in https://bugzilla.gnome.org/show_bug.cgi?id=740851
2014-11-29 18:49:46 -05:00
Matthias Clasen
afe0d5ff00 HighContrast: in app notification padding
Copied the Adwaita treatment from
e5d34372c4

https://bugzilla.gnome.org/show_bug.cgi?id=740857
2014-11-29 17:06:52 -05:00
Lapo Calamandrei
d314625754 HighContrast: scale slider fix and cleanup
Set GtkScale margins on the .trough component so the .slider
doesn't inherit them vanishing.
Remove a bunch trailing white spaces in the process.
2014-11-29 18:46:06 +01:00
Lapo Calamandrei
57171ad7e6 Adwaita: set scale with marks trough margin where it belongs to 2014-11-29 18:21:12 +01:00
Matthias Clasen
f85093a136 Beautify example Makefiles a bit 2014-11-29 00:26:52 -05:00
Matthias Clasen
6bf9d13041 GtkModelMenuItem: put some space between icon and label
This makes the bloatpad icons menu look slightly less odd.
2014-11-29 00:01:49 -05:00
Matthias Clasen
380ca9bc56 Make include order consistent in example applications
Pointed out in
https://bugzilla.gnome.org/show_bug.cgi?id=740537
2014-11-28 23:57:16 -05:00
Benjamin Otte
4c33645a7a range: Implement :hover for the whole widget 2014-11-29 03:42:29 +01:00
Benjamin Otte
116cc53105 range: Handle redraws inside update_mouse_location
This way, we can do finer-grained invalidation. Plus, we get to not
duplicate all the queue_draw() calls.
2014-11-29 03:42:29 +01:00
Benjamin Otte
95dc96901e range: Properly queue draws when doing a drag
The dragged area needs to be marked as :active during the drag.
2014-11-29 03:42:29 +01:00
Benjamin Otte
b8c0cfb663 range: Remove unused variable
The variable was TRUE from the beginning and only ever set to TRUE.
2014-11-29 03:42:28 +01:00
Benjamin Otte
4b92654b29 range: No need to update mouse location when starting a drag
The mouse position doesn't change here. Plus, all callers have just
updated it anyway.
2014-11-29 03:42:28 +01:00
Benjamin Otte
87c564ecf3 range: Only call needed functions from adjustment changes
No need to recalc the whole range when all that changed was the slider.
2014-11-29 03:42:28 +01:00
Benjamin Otte
f3b40ff55f range: Implement gtk_range_calc_stepper_sensitivity() properly 2014-11-29 03:42:28 +01:00
Benjamin Otte
f63fe9b760 range: Implement gtk_range_calc_slider() properly 2014-11-29 03:42:28 +01:00
Benjamin Otte
040c31a32c range: Refactor a function
This is in preparation for more places that want to
queue_draw_location().
2014-11-29 03:42:28 +01:00
Benjamin Otte
909d0caa6b range: Introduce finer-grained invalidation
The invalidation doesn't do anything yet, it just clears up what
actually needs recalculation.
2014-11-29 03:42:28 +01:00
Benjamin Otte
1c9fdc1f1f range: Changing the min slider size requires a resize 2014-11-29 03:42:28 +01:00
Benjamin Otte
c80c7f7792 range: No need to frce a recalc
A resize will already trigger a recalc, so no need to explicitly trigger
it.
2014-11-29 03:42:28 +01:00
Benjamin Otte
7ecdaaacb2 widget: Clarify some corner cases
I checked Cairo source code (actually pixman, as Cairo just passes
through) to make sure that the behavior stays identical: negative values
cause an error message from pixman, zero is allowed. Both return an
empty region which gtk_widget_queue_draw_region() would then proceed to
ignore.
2014-11-29 03:42:28 +01:00
Jasper St. Pierre
641d4c4e3d Fix build 2014-11-28 14:03:57 -08:00
Jakub Steiner
53e07d3c0f Provide symbolic variants of app icons
Install symbolic variants of the app icons for gtk3-demo and
gtk3-widget-factory. These are necessary for the HighContrast theme.

https://bugzilla.gnome.org/show_bug.cgi?id=740447
2014-11-28 16:08:56 -05:00
Matthias Clasen
c304f2ea68 docs: Add a missing word 2014-11-28 14:25:42 -05:00
Matthias Clasen
2679f889a5 Drop an unused variable 2014-11-28 14:25:42 -05:00
Lapo Calamandrei
6962dcffac Adwaita: GtkTreeView insensitive state style.
See https://bugzilla.gnome.org/show_bug.cgi?id=740770.
2014-11-28 17:03:53 +01:00
Matthias Clasen
d3c96f9f17 inspector: Simplify some code 2014-11-27 23:21:42 -05:00
Yosef Or Boczko
bb5574c0bd GtkStackSwitcher: Make the buttons fill vertically
It fix some cases with different height for the buttons,
like with Hebrew character.

https://bugzilla.gnome.org/show_bug.cgi?id=740642
2014-11-27 23:21:35 -05:00
Matthias Clasen
e26fddc544 Avoid a critical
gtk_window_get_focus can return NULL, deal with it.

https://bugzilla.gnome.org/show_bug.cgi?id=740812
2014-11-27 18:24:12 -05:00
Matthias Clasen
8753ef6129 Render shadows for half-tiled windows
Without this, side-by-side half-tiled windows are hard to discern.

https://bugzilla.gnome.org/show_bug.cgi?id=708857
2014-11-27 18:24:12 -05:00
Josef Andersson
f875daeb6d Updated Swedish translation 2014-11-27 22:01:44 +00:00
Marco Trevisan (Treviño)
b8925253b6 mir: clear screen, keymap and event source when disposing dpy 2014-11-27 19:25:55 +01:00
Marek Kasik
059fc5d3d9 printing: Fix build with CUPS older than 1.6
Define missing functions ippFirstAttribute(), ippNextAttribute()
and macro ippGetCollection(). These were added in CUPS 1.6.

https://bugzilla.gnome.org/show_bug.cgi?id=740358
2014-11-27 17:07:33 +01:00
Leo Wolf
c85c3510e7 printing: Fix origin for scaled, rotated pages
The calls to cairo_translate in
_gtk_print_context_rotate_according_to_orientation,
_gtk_print_context_reverse_according_to_orientation and
_gtk_print_context_translate_into_margin assume an unscaled context.
These functions should therefore be called before scaling the context,
otherwise the origin does not always end up in the top left corner.

https://bugzilla.gnome.org/show_bug.cgi?id=740742
2014-11-27 12:21:27 +01:00
Matthias Clasen
732af31424 x11: Handle obsolete selection requests without crashing
The ICCCM says:

If the specified property is None , the requestor is an obsolete client.
Owners are encouraged to support these clients by using the specified
target atom as the property name to be used for the reply.

Lets do that, instead of crashing.

https://bugzilla.gnome.org/show_bug.cgi?id=740613
2014-11-26 22:27:49 -05:00
Jasper St. Pierre
e3bf31886a gtkentry: Optimize GtkStyleContext usage 2014-11-26 18:10:55 -08:00
Jasper St. Pierre
59629fa9e2 gtklabel: Optimize GtkStyleContext usage 2014-11-26 18:10:55 -08:00
Jasper St. Pierre
9c7a5f5efa gtkstylecontext: Optimize GtkStyleContext usage 2014-11-26 18:10:55 -08:00
Jasper St. Pierre
50c4fdbacd gtktextdisplay: Optimize GtkStyleContext usage 2014-11-26 18:10:55 -08:00
Jasper St. Pierre
fe8f6f60dc gdkdisplay-x11: Don't do extra work when simply moving the window
We shouldn't bother recalculating all the visible regions and wiping
away the old updating areas if we're simply dragging the window around.
2014-11-26 17:14:53 -08:00
Matthias Clasen
80dbb4186a GtkSpinButton: Use the proper state
Use the style contexts current state when querying it.
2014-11-26 18:38:43 -05:00
Carlos Garnacho
50076ed95b popover: Send key events only to the focus widget
gtk_window_propagate_key_event() will run unstopped from the focus widget up to the
popover if GDK_EVENT_PROPAGATE was returned along the chain, resulting in infinite
recursion. This could be just triggered by pressing some modifier key on an entry...
2014-11-26 15:30:52 +01:00
Sebastien Lafargue
05893dd5a9 textbtree: Remove unneeded check 2014-11-26 13:53:57 +01:00
Benjamin Otte
11233678d9 range: Remove unnecessary argument
It's always the same value passed in, so just use that value directly.
2014-11-26 13:53:57 +01:00
Benjamin Otte
230aa99967 range: Query slider position instead of updating it
We're updating it later in the function, there's no need to do it here.
2014-11-26 13:53:57 +01:00
Benjamin Otte
7193043f7d gtkrange: Fix copy/paste error
When factoring out a function in
b88584e7ba I forgot to adapt these values.
2014-11-26 13:53:57 +01:00
Benjamin Otte
98da1ddfe2 range: Setting stepper visibility requires a restyle 2014-11-26 13:53:57 +01:00
Benjamin Otte
9b970d5f22 entry: Use correct state when computing icon padding 2014-11-26 13:53:57 +01:00
Emmanuele Bassi
cbb2938587 Freeze file system model during editing
If a file system event arrives while GtkFileChooserWidget is asking the
user to edit the name of a newly created folder, the file system model
will drop the row with the editable cell, and the user will have to
start from scratch.

This makes creating new directories impossible inside a directory with a
file currently being downloaded, for instance, and it's really unhelpful
to the user because the editable row simply disappears.

We already have a mechanism in place to freeze the file system model, so
we can reuse it between the add_editable() and the remove_editable()
calls.

https://bugzilla.gnome.org/show_bug.cgi?id=729927
2014-11-25 23:03:27 -05:00
Andre Heinecke
d9786d74db Remove overzealous validity check for secrets
We directly get the length of the secret from the g_variant
   and use it in a following g_strndup which ensures that the
   resulting string is terminated.

   This fixes reading secrets which were stored by system-config-printer.

https://bugzilla.gnome.org/show_bug.cgi?id=740612
2014-11-25 22:51:45 -05:00
Joanmarie Diggs
246c172e1e GtkButtonAccessible: Stop emitting state-change signals for ATK_STATE_ARMED
ATK_STATE_ARMED is now deprecated. There is no replacement.

https://bugzilla.gnome.org/show_bug.cgi?id=740438
2014-11-25 22:33:27 -05:00
Emmanuele Bassi
605f2efa73 docs: Fix annotation for GtkCssProviderError
https://bugzilla.gnome.org/show_bug.cgi?id=740374
2014-11-25 22:15:24 -05:00
Jasper St. Pierre
a78b18c565 Revert part of "gtknotebook: Optimize GtkStyleContext usage"
This reverts part of commit c71e213134.
This part was unfinished and was pushed simply to avoid the warnings.
2014-11-25 11:21:21 -08:00
Jasper St. Pierre
eba317228f gtkstylecontext: Add an optional warning when misusing GtkStyleContext
This allows someone to quickly debug more performance issues with
G_DEBUG=fatal-warnings.
2014-11-25 11:07:31 -08:00
Jasper St. Pierre
d21dc0d91c gtkcellarea: Optimize GtkStyleContext usage
This is a bit bizarre, but the cell renderer can apply different
flags from the actual style context, and we should use those instead
of the widget flags.
2014-11-25 11:05:57 -08:00
Jasper St. Pierre
c71e213134 gtknotebook: Optimize GtkStyleContext usage 2014-11-25 11:05:49 -08:00
Jasper St. Pierre
2cd835c076 gtkwindow: Optimize GtkStyleContext usage 2014-11-25 11:05:36 -08:00
Jasper St. Pierre
90f94de615 deprecated/gtkstyle: Optimize GtkStyleContext usage
Even though this is deprecated, it's still initialized for every
screen at startup, so let's minimize the cost.
2014-11-25 11:05:04 -08:00
Jasper St. Pierre
442fd63ea6 gtkentry: Pass the correct set of state flags to gtk_style_context_get*
This eliminates a lot of overhead in the CSS engine recalculating
cached CSS rules, and is overall the correct thing to do.
2014-11-25 11:04:36 -08:00
Jasper St. Pierre
0c09d44509 gtkwidget: Remove unnecessary code in get_state_flags
Any time has_focus is called, we will call gtk_widget_update_state_flags
which will assign the state flags properly.
2014-11-25 11:04:36 -08:00
Benjamin Otte
06952d807a testsuite: Add a bunch of parsing tests for :not() 2014-11-25 19:33:18 +01:00
Benjamin Otte
965da578c4 cssselector: Add none selector
We apparently didn't yet parse :not(*), so write a selector for this.
2014-11-25 19:31:23 +01:00
Benjamin Otte
8a3a617475 cssselector: Add initial support for :not()
:not() works for names, ids, classes and pseudoclasses based on states.

It does not yet work for positional pseudoclasses (like :last-child or
:even) as there is region madness going on with those.
2014-11-25 19:31:13 +01:00
Benjamin Otte
fd1eb92508 cssselector: Macroify simple selectors
This is in preparation for the next commits.
2014-11-25 19:19:12 +01:00
Benjamin Otte
c0123ae20e range: Don't duplicate work
The adjustment value being equal is checked by
gtk_adjustment_set_value() and the necessity of calc_layout() is handled
by the value_changed signal handler.
2014-11-25 19:19:12 +01:00
Benjamin Otte
06150aa517 range: Don't invalidate layout when computing marks
We now have a function to compute a slider position. Use that one
instead.
2014-11-25 19:19:12 +01:00
Benjamin Otte
b88584e7ba range: Split out a function
The position of a slider for a given value is something we care a
lot about and jump through hoops to get. See next commit for example.
2014-11-25 19:19:12 +01:00
Benjamin Otte
daabd0436f range: Remove 2 variables
Instead, compute their value on-demand.
2014-11-25 19:19:12 +01:00
Benjamin Otte
447a439145 range: Remove unused variable 2014-11-25 19:19:12 +01:00
Benjamin Otte
79712f843c scale: Always be flippable
GtkRange only flips horizontal ranges, so there's no need to unset it
for vertical scales.

Also, set_flippable() is a cute name.
2014-11-25 19:19:12 +01:00
Benjamin Otte
addcb7137e range: Simplify defines
- Delete unused defines
- Don't have 2 defines that are multiplied later
2014-11-25 19:19:12 +01:00
Benjamin Otte
51f5433170 range: Deprecate detail strings in class struct
... and stop setting them.
2014-11-25 19:19:12 +01:00
Benjamin Otte
0d1395d07f range: Remove unused detail quarks 2014-11-25 19:19:11 +01:00
Benjamin Otte
e7f2239cbb range: Remove unused variable 2014-11-25 19:19:11 +01:00
Matthias Clasen
4634fd81ba inspector: Make close buttons in search bars have no relief
Make our home-grown searchbar lookalike look more alike.
2014-11-25 08:42:26 -05:00
Carlos Garnacho
dde77704ed popover: Forward key events to focus widget while visible/modal
This is the expected behavior while the popover keeps the grab, leaving
this up to the toplevel implementation gives place to key handlers
connected there to handle the event otherwise, and maybe redirect key
events somewhere else.
2014-11-25 14:08:34 +01:00
Matthias Clasen
f71831c780 GtkStack: silently ignore visible-child-name set to NULL
This can happen when loading empty stacks in glade.
2014-11-25 00:14:47 -05:00
Matthias Clasen
bef9d05812 inspector: minor cleanup 2014-11-24 20:36:00 -05:00
Ray Strode
3a5d15358e testsuite: add hide-titlebar-when-maximized test for GtkWindow
This commit adds a test that checks whether or not
hide-titlebar-when-maximized can be set before the window is
realized.

https://bugzilla.gnome.org/show_bug.cgi?id=740287
2014-11-24 12:52:25 -05:00
Matthias Clasen
c1ca7986ee Make scale=2 work again
There was a leftover HAVE_CAIRO_SURFACE_SET_DEVICE_SCALE ifdef
that broke things, now that we don't use this define anymore.
2014-11-24 10:02:54 -05:00
Chun-wei Fan
16e863ce65 gdkgl.c: Avoid GCCism in Pointer Arithmetic
NULL-plus-something could be seen by the compiler to attempt to do
arithmetic with void *, which is a GCCism.  Instead, do the math normally
and cast the results as a void *.

https://bugzilla.gnome.org/show_bug.cgi?id=740605
2014-11-24 22:57:25 +08:00
Matthias Clasen
c7f3b93d99 Keep gtk_window_set_hide_titlebar_when_maximized working
This broke in 510c2cdfb6.

https://bugzilla.gnome.org/show_bug.cgi?id=740287
2014-11-24 06:49:19 -05:00
Matthias Clasen
8d6d73e8d9 Bump version 2014-11-23 20:34:26 -05:00
Matthias Clasen
c64bfa5751 3.15.2 2014-11-23 19:44:01 -05:00
Matthias Clasen
464536b460 Add missing api to the docs 2014-11-23 19:44:01 -05:00
Matthias Clasen
d0d41dfeba GtkModelButton: Add docs 2014-11-23 19:44:01 -05:00
Matthias Clasen
7d35351c7a Update expected results 2014-11-23 18:53:06 -05:00
Matthias Clasen
a09ff50a1d notify test: Exclude a few new properties
The button properties don't make sense on GtkModelButton (indicating
that GtkModelButton should really not be a GtkButton subclass).
2014-11-23 18:30:13 -05:00
Matthias Clasen
f95fb6f893 GtkGLArea: avoid extraneous property notifications 2014-11-23 18:30:13 -05:00
Matthias Clasen
ff4f918a69 GtkModelButton: specify the proper default values
Caught by the defaultvalue test: ::text starts out as "", and
::iconic should be FALSE by default.
2014-11-23 18:30:13 -05:00
Carlos Garnacho
44c412ecc7 wayland: Pass shadow width to the compositor
Use xdg_surface_set_window_geometry() to tell the compositor about the
shadow widths, this makes some gnome-shell/mutter features (edge resistance,
frames around windows in the overview, side maximization, ...) work alright
with GTK+.

In order to add this, some other places in gdkwindow-wayland had to gain
some knowledge about margins:

- xdg_surface_configure() now syncs the shadow after applying the state,
  and gdk_wayland_window_set_shadow_width() possibly reconfigures the
  window in order to preserve window geometry. This is necessary to keep
  shadows in sync with state/geometry changes, as this does not happen
  all at once.
- xdg_popups relative to an xdg_surface are shown relative to buffer
  coordinates, so the left/top margins must be added there.

https://bugzilla.gnome.org/show_bug.cgi?id=736742
2014-11-23 13:11:08 +01:00
Matthias Clasen
6b95810aae inspector: Show object title in menu tab 2014-11-22 21:38:47 -05:00
Matthias Clasen
a7ba57f751 inspector: Add menu models to the tree
Add both the appmenu and the menubar models as children of the
application, if they exist.
2014-11-22 21:38:47 -05:00
Matthias Clasen
0a37493384 inspector: Show object title in size groups tab 2014-11-22 21:38:47 -05:00
Matthias Clasen
d09f66579b inspector: Show object title in data tab 2014-11-22 21:38:47 -05:00
Matthias Clasen
af12993c4b inspector: Show object title on the style property list
As with the property list, this replaces the search bar by
a stack containing a search entry.
2014-11-22 21:38:47 -05:00
Matthias Clasen
f38081a4a5 inspector: Show object title on selector tab 2014-11-22 21:38:47 -05:00
Matthias Clasen
38c3600d8b inspector: Show object title in actions tab 2014-11-22 21:38:47 -05:00
Matthias Clasen
d2aad06513 inspector: Show object title in hierarchy tab 2014-11-22 21:38:47 -05:00
Matthias Clasen
85380f22f3 inspector: Show object title in the classes tab 2014-11-22 21:38:47 -05:00
Matthias Clasen
fe5f9c560b inspector: Show object title in the css tab 2014-11-22 21:38:47 -05:00
Matthias Clasen
c2326aa5cf inspector: Show object title in the gestures tab 2014-11-22 21:38:47 -05:00
Matthias Clasen
9e3d0651e1 inspector: Show object title in the signals tab 2014-11-22 21:38:47 -05:00
Matthias Clasen
7a1c5845ef inspector: Show object title in the properties tab
Replace the search bar with a search entry in a stack to make
this work without unseemly height changes.
2014-11-22 21:38:47 -05:00
Matthias Clasen
2ea3171ff9 inspector: Show object title in the misc tab 2014-11-22 21:38:47 -05:00
Matthias Clasen
5b7233f136 inspector: Store object title on object 2014-11-22 21:38:46 -05:00
Matthias Clasen
84463b78e5 inspector: Drop an unused argument 2014-11-22 21:38:46 -05:00
Matthias Clasen
9fb2d6a6b9 inspector: Trivial typo fix 2014-11-22 21:38:46 -05:00
Matthias Clasen
72a501fe15 GtkGLArea: Formatting fixes 2014-11-22 21:38:46 -05:00
Jasper St. Pierre
10a7a89311 gdkinternals: Document our drawing and painting process better 2014-11-22 11:46:53 -08:00
Jasper St. Pierre
c01e37a9a5 gdkgl: Texture quads in one giant draw call
This requires us to use GL_TRIANGLES and six verts per quad instead
of four, which makes me think it might not be worth it on
well-optimized GL drivers. However, from talking to some driver
developers about it, the GL_TRIANGLES should be faster, since this
means that there's one giant contiguous buffer instead of many small
buffers.

If we were really rendering a lot of quads, I'd use an element buffer
and GL_PRIMITIVE_RESTART, but we're really not ever rendering that
many quads, and the setup cost for that would just be too annoying.
2014-11-22 10:34:47 -08:00
Jasper St. Pierre
6ffba866a6 gdkgl: Use one VBO for both position and uv attributes 2014-11-22 10:17:43 -08:00
Jasper St. Pierre
37ad6e1147 gdkgl: Texture many quads at once for performance reasons
This isn't fully performant yet. To be fully performant, we'd need to
do everything in one giant buffer.
2014-11-22 10:13:58 -08:00
Jasper St. Pierre
7312c01f62 gdkglcontext-x11: Make sure to enable the scissor test 2014-11-22 10:01:51 -08:00
Jasper St. Pierre
37697f1817 gdkgl: Use a GdkTexturedQuad struct to paint quads
We'll soon have a new function that paints multiple quads.
2014-11-22 09:40:10 -08:00
Jasper St. Pierre
28846536cb gdkgl: Clean up program-manipulating code
Abstract the program ID and locations into a "program struct" which
we then use.
2014-11-22 09:29:27 -08:00
Jasper St. Pierre
3f0c84f7ad gdkwindow: Clean up whitespace slightly
This has been bothering me for a while.
2014-11-22 08:12:22 -08:00
Jasper St. Pierre
8976e84ded gdkwindow: Don't pass the region to the impl when beginning a paint
It's unused. At the same time, rename "begin_paint_region" to
"begin_paint". This will help us clean up how GDK painting works
in the future to allow more creative use of double-buffering.
2014-11-22 08:08:34 -08:00
Jasper St. Pierre
ec2925a5bf quartz: Don't bother storing the paint_clip_region
It's unused.
2014-11-22 08:07:28 -08:00
Marco Trevisan (Treviño)
1730bb0e81 mir: initialize surface name with program name 2014-11-21 04:46:47 +01:00
Josef Andersson
5a0d1a79c5 Updated Swedish translation 2014-11-20 20:55:11 +00:00
Piotr Drąg
6fa4aef811 Updated POTFILES.in 2014-11-20 16:46:38 +01:00
Alexander Larsson
442adf6359 GL: Fix typo in gdk_gl_texture_from_surface
Got a sign wrong in commit 800c712738
2014-11-20 15:37:40 +01:00
Chun-wei Fan
4744058832 Visual Studio Builds: Fix gdkconfig.h Generation
...for Broadway builds, as it was producing a wrongly-named check file for
that configuration, so that a clean would not be correctly performed and
subsequently affected rebuilds.
2014-11-20 22:35:05 +08:00
Alexander Larsson
cf94da2ca1 GdkGLContext: Remove unused update vfunc
The update virtual function for GdkGLContext is unused and is a
leftover from a previous GL approach. Just remove it.

https://bugzilla.gnome.org/show_bug.cgi?id=739750
2014-11-20 12:38:04 +01:00
Alexander Larsson
800c712738 GL: Fix GL Y coordinate flipping to use unscaled window height
This is needed in the edge case where the X11 backend rounded the actual
size, and the GL flipping really needs the correct window height to
do proper Y coordinate flipping.

https://bugzilla.gnome.org/show_bug.cgi?id=739750
2014-11-20 12:38:04 +01:00
Alexander Larsson
1eb3b34bce Add gdk_window_get_unscaled_size
This is required for the X backend GL integration. If the
window has a height that is not a multiple of the window scale
we can't properly do the y coordinate flipping that GL needs.
Other backends can ignore this and use the default implementation.

https://bugzilla.gnome.org/show_bug.cgi?id=739750
2014-11-20 12:38:04 +01:00
Alexander Larsson
788478dff9 x11: Return the exact pixel coverage in get_frame_extents
Rather than just rounding down the position *and* the size separately
we correctly calculate a rectangle in scaled window coords that fully
covers the real window size. This really only makes a difference
when the window size/position isn't a multiple of the window scale.

https://bugzilla.gnome.org/show_bug.cgi?id=739750
2014-11-20 12:38:04 +01:00
Owen W. Taylor
bd643e0e1a x11: Keep track of the exact size in X pixels of windows
Keep track of the exact size of X windows in underlying pixels; we
generally use the scaled size instead, but to properly handle the GL
viewport for windows that aren't a multiple of window_scale,
we need to know the real size.

https://bugzilla.gnome.org/show_bug.cgi?id=739750
2014-11-20 12:38:04 +01:00
Owen W. Taylor
608c25453b x11: round the scaled size *up* when we get a ConfigureNotify
Although we specify a resize increment to try and get a size that is
a multiple of the window scale, maximization typically wins
over the resize increment, so the window might be odd sized.

Round *up* in this case, rather than down, since it's better to
truncate a line or two at the bottom and right of the window rather
than have a line or two that we don't know what to do with.

https://bugzilla.gnome.org/show_bug.cgi?id=739750
2014-11-20 10:19:27 +01:00
Marco Trevisan (Treviño)
f5d96f7110 mir: use proper naming for mir window type checking macro 2014-11-20 05:51:12 +01:00
684 changed files with 21099 additions and 13096 deletions

View File

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

View File

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

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

View File

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

View File

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

View File

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

View File

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

View File

@@ -33,7 +33,7 @@ echo $(Configuration) &gt; ..\..\..\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) &gt; ..\..\..\MSVC_$(Configuration)
echo $(Configuration) &gt; ..\..\..\MSVC_$(Configuration)_Broadway
:DONE_GDKCONFIG_H
</GenGdkConfigHBroadway>

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@@ -40,6 +40,6 @@
/>
<UserMacro
Name="GtkDefines"
Value="GTK_COMPILATION;G_LOG_DOMAIN=\&quot;Gtk\&quot;;GTK_HOST=\&quot;i686-pc-vs$(VSVer)\&quot;;GTK_PRINT_BACKENDS=\&quot;file\&quot;;GTK_PRINT_PREVIEW_COMMAND=\&quot;undefined-gtk-print-preview-command\&quot;;$(GtkIncludedImmodulesDefines);GTK_LIBDIR=\&quot;$(GtkDummyPrefix)/lib\&quot;;GTK_DATADIR=\&quot;$(GtkDummyPrefix)/share\&quot;GTK_DATA_PREFIX=\&quot;$(GtkDummyPrefix)\&quot;;GTK_SYSCONFDIR=\&quot;$(GtkDummyPrefix)/etc\&quot;;MULTIPRESS_CONFDIR=\&quot;$(GtkDummyPrefix)/etc/gtk-$(ApiVersion)\&quot;;MULTIPRESS_LOCALEDIR=\&quot;$(GtkDummyPrefix)/share/locale\&quot;;GTK_VERSION=\&quot;$(GtkVersion)/etc\&quot;;GTK_BINARY_VERSION=\&quot;$(GtkBinaryVersion)/etc\&quot;;GDK_DISABLE_DEPRECATED;ISOLATION_AWARE_ENABLED"
Value="GTK_COMPILATION;G_LOG_DOMAIN=\&quot;Gtk\&quot;;GTK_HOST=\&quot;i686-pc-vs$(VSVer)\&quot;;GTK_PRINT_BACKENDS=\&quot;file\&quot;;GTK_PRINT_BACKEND_ENABLE_UNSUPPORTED;$(GtkIncludedImmodulesDefines);GTK_LIBDIR=\&quot;$(GtkDummyPrefix)/lib\&quot;;GTK_DATADIR=\&quot;$(GtkDummyPrefix)/share\&quot;GTK_DATA_PREFIX=\&quot;$(GtkDummyPrefix)\&quot;;GTK_SYSCONFDIR=\&quot;$(GtkDummyPrefix)/etc\&quot;;MULTIPRESS_CONFDIR=\&quot;$(GtkDummyPrefix)/etc/gtk-$(ApiVersion)\&quot;;MULTIPRESS_LOCALEDIR=\&quot;$(GtkDummyPrefix)/share/locale\&quot;;GTK_VERSION=\&quot;$(GtkVersion)/etc\&quot;;GTK_BINARY_VERSION=\&quot;$(GtkBinaryVersion)/etc\&quot;;GDK_DISABLE_DEPRECATED;ISOLATION_AWARE_ENABLED"
/>
</VisualStudioPropertySheet>

View File

@@ -36,7 +36,7 @@ echo $(ConfigurationName) &gt; ..\..\..\MSVC_$(ConfigurationName)&#x0D;&#x0A;
<UserMacro
Name="GenGdkConfigHBroadway"
Value="
if exist ..\..\..\MSVC_$(ConfigurationName) goto DONE_GDKCONFIG_H&#x0D;&#x0A;
if exist ..\..\..\MSVC_$(ConfigurationName)_Broadway goto DONE_GDKCONFIG_H&#x0D;&#x0A;
if exist ..\..\..\gdk\gdkconfig.h del ..\..\..\gdk\gdkconfig.h&#x0D;&#x0A;
if exist ..\..\..\GDK_WIN32ONLY_BUILD del ..\..\..\GDK_WIN32ONLY_BUILD&#x0D;&#x0A;
@@ -50,7 +50,7 @@ if &quot;$(ConfigurationName)&quot; == &quot;Debug_Broadway&quot; del ..\..\..\M
copy ..\..\..\gdk\gdkconfig.h.win32_broadway ..\..\..\gdk\gdkconfig.h&#x0D;&#x0A;
copy ..\..\..\gdk\gdkconfig.h.win32_broadway ..\..\..\GDK_BROADWAY_BUILD&#x0D;&#x0A;
echo $(ConfigurationName) &gt; ..\..\..\MSVC_$(ConfigurationName)&#x0D;&#x0A;
echo $(ConfigurationName) &gt; ..\..\..\MSVC_$(ConfigurationName)_Broadway&#x0D;&#x0A;
:DONE_GDKCONFIG_H&#x0D;&#x0A;
"
/>

View File

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

View File

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

View File

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 324 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 437 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 465 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 581 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 854 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.4 KiB

View 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

View File

@@ -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, &current, path);
gtk_tree_path_free (path);
/* Set the data for the new row */
gtk_list_store_insert_after (GTK_LIST_STORE (model), &iter, &current);
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");

View File

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

View File

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 237 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 332 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 336 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 369 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 495 B

View 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

View File

@@ -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"));

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View 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

View File

@@ -1,6 +1,7 @@
#include <gtk/gtk.h>
#include "exampleapp.h"
#include "exampleappwin.h"
#include <gtk/gtk.h>
struct _ExampleAppWindow
{

View File

@@ -1,5 +1,6 @@
#include <gtk/gtk.h>
#include <exampleapp.h>
#include "exampleapp.h"
int
main (int argc, char *argv[])

View File

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

View 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

View File

@@ -1,6 +1,7 @@
#include <gtk/gtk.h>
#include "exampleapp.h"
#include "exampleappwin.h"
#include <gtk/gtk.h>
struct _ExampleAppWindow
{

View File

@@ -1,5 +1,6 @@
#include <gtk/gtk.h>
#include <exampleapp.h>
#include "exampleapp.h"
int
main (int argc, char *argv[])

View File

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

View 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

View File

@@ -1,6 +1,7 @@
#include <gtk/gtk.h>
#include "exampleapp.h"
#include "exampleappwin.h"
#include <gtk/gtk.h>
struct _ExampleAppWindow
{

View File

@@ -1,5 +1,6 @@
#include <gtk/gtk.h>
#include <exampleapp.h>
#include "exampleapp.h"
int
main (int argc, char *argv[])

View File

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

View 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

View File

@@ -1,6 +1,7 @@
#include <gtk/gtk.h>
#include "exampleapp.h"
#include "exampleappwin.h"
#include <gtk/gtk.h>
struct _ExampleAppWindow
{

View File

@@ -1,5 +1,6 @@
#include <gtk/gtk.h>
#include <exampleapp.h>
#include "exampleapp.h"
int
main (int argc, char *argv[])

View File

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

View 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

View File

@@ -1,6 +1,7 @@
#include <gtk/gtk.h>
#include "exampleapp.h"
#include "exampleappwin.h"
#include <gtk/gtk.h>
struct _ExampleAppWindow
{

View File

@@ -1,5 +1,6 @@
#include <gtk/gtk.h>
#include <exampleapp.h>
#include "exampleapp.h"
int
main (int argc, char *argv[])

View File

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

View 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

View File

@@ -1,6 +1,7 @@
#include <gtk/gtk.h>
#include "exampleapp.h"
#include "exampleappwin.h"
#include <gtk/gtk.h>
struct _ExampleAppWindow
{

View File

@@ -1,5 +1,6 @@
#include <gtk/gtk.h>
#include <exampleapp.h>
#include "exampleapp.h"
int
main (int argc, char *argv[])

View File

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

View 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

View File

@@ -1,6 +1,7 @@
#include <gtk/gtk.h>
#include "exampleapp.h"
#include "exampleappwin.h"
#include <gtk/gtk.h>
struct ExampleAppWindow
{

View File

@@ -1,5 +1,6 @@
#include <gtk/gtk.h>
#include <exampleapp.h>
#include "exampleapp.h"
int
main (int argc, char *argv[])

View File

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

View 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

View File

@@ -1,6 +1,7 @@
#include <gtk/gtk.h>
#include "exampleapp.h"
#include "exampleappwin.h"
#include <gtk/gtk.h>
struct _ExampleAppWindow
{

View File

@@ -1,5 +1,6 @@
#include <gtk/gtk.h>
#include <exampleapp.h>
#include "exampleapp.h"
int
main (int argc, char *argv[])

View File

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

View 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

View File

@@ -1,6 +1,7 @@
#include <gtk/gtk.h>
#include "exampleapp.h"
#include "exampleappwin.h"
#include <gtk/gtk.h>
struct _ExampleAppWindow
{

View File

@@ -1,5 +1,6 @@
#include <gtk/gtk.h>
#include <exampleapp.h>
#include "exampleapp.h"
int
main (int argc, char *argv[])

View File

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

View 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

View File

@@ -1,6 +1,7 @@
#include <gtk/gtk.h>
#include "exampleapp.h"
#include "exampleappwin.h"
#include <gtk/gtk.h>
struct _ExampleAppWindow
{

View File

@@ -1,5 +1,6 @@
#include <gtk/gtk.h>
#include <exampleapp.h>
#include "exampleapp.h"
int
main (int argc, char *argv[])

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

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