Compare commits
1 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 2a3c167dbe |
@@ -40,7 +40,7 @@ test: test-cwd test-recurse
|
||||
# test-cwd: run tests in cwd
|
||||
test-cwd: ${TEST_PROGS}
|
||||
@$(SKIP_GDKTARGET) || test -z "${TEST_PROGS}" || { \
|
||||
$(XVFB_START) && { set -e; $(TESTS_ENVIRONMENT) G_TEST_SRCDIR="${abs_srcdir}" G_TEST_BUILDDIR="${abs_builddir}" ${GTESTER} --verbose ${TEST_PROGS}; }; \
|
||||
$(XVFB_START) && { set -e; $(TESTS_ENVIRONMENT) G_TEST_SRCDIR="${abs_strcdir}" G_TEST_BUILDDIR="${abs_builddir}" ${GTESTER} --verbose ${TEST_PROGS}; }; \
|
||||
}
|
||||
# test-recurse: run tests in subdirs
|
||||
test-recurse:
|
||||
|
||||
@@ -1,372 +1,3 @@
|
||||
Overview of Changes in GTK+ 3.11.0 to 3.11.1
|
||||
============================================
|
||||
|
||||
* Theming:
|
||||
- A number of containers have been changed to draw
|
||||
backgrounds and borders. By default these are fully
|
||||
transparent, so nothing should change:
|
||||
GtkBox GtkFixed GtkGrid GtkEventBox
|
||||
- Link colors are not rendered using the :visited and :link
|
||||
states instead of the link-color and visited-link-color
|
||||
style properties
|
||||
|
||||
* Broadway:
|
||||
- Use client-side decorations
|
||||
- Implement window movement, raise/lower
|
||||
- Use rolling hashes for optimizing scrolling
|
||||
- Use click-to-focus
|
||||
- Support touch events
|
||||
- Support IPad on-screen keyboard
|
||||
|
||||
* GtkFileChooser:
|
||||
- Respect local-only in the places sidebar
|
||||
- Filter out duplicate application shortcuts
|
||||
- Show unmounted bookmarks
|
||||
|
||||
* GtkProgressBar:
|
||||
- Activity mode is now using a tick callback to move the block
|
||||
smoothly
|
||||
|
||||
* GtkWindow:
|
||||
- Fix size allocation for the fallback menubar
|
||||
- Improve application menu fallback if we have client-side
|
||||
decorations or a header bar
|
||||
|
||||
* GtkBuilder:
|
||||
- No longer requires every object to have an id
|
||||
|
||||
* Bugs fixed:
|
||||
577642 Selected Printer Does Not Stick Between Sessions
|
||||
635499 gtk_entry_completion_set_text_column doesn't remove old...
|
||||
668598 Printing to PDF should register the generated file with...
|
||||
679019 Popup menu misplaced in dual monitor
|
||||
693227 Incorrect size allocation with overflow
|
||||
699574 gtk_selection_owner_set() breaks mouse wheel scrolling
|
||||
700419 Trigger toggle maximize on double click in menubar/menu...
|
||||
702392 motion_compression hurts precision for drawing
|
||||
703784 Epiphany crash during displaying printing dialog
|
||||
705176 Reordering columns in GtkTreeView freezes mutter
|
||||
709629 Use :link and :visited for link colors
|
||||
710238 Fix the margin in RTL
|
||||
710533 GtkBuilder can no longer construct GtkEntryCompletions ...
|
||||
710909 Buttons are cut in some windows
|
||||
710987 g_return_if_fail used even if function requires return value
|
||||
711110 GDK_HINT_MAX_SIZE ignored on Win32
|
||||
711158 gtktextattributes: Use an anonymous union instead of arch-...
|
||||
711255 GtkListBox: Expand the placeholder
|
||||
711324 Some more patches to make more containers honor background...
|
||||
711354 Doc: some GtkPrintSettings symbols are missing
|
||||
711494 GtkStack: add a signal telling when transition is done
|
||||
711545 gtkpixelcache: Possibly ignoring queued redraw
|
||||
711548 GtkPlacesSidebar doesn't show unmounted bookmarks
|
||||
711553 gdk/win32: remove extra allocation for \r removal
|
||||
711574 GtkPlacesSidebar is missing "local-only" flag
|
||||
711611 GtkStack: Use new-style property installation/notification
|
||||
711636 Duplicated 'Music' and 'Videos' from favorites on ...
|
||||
712164 GtkMenuTracker: set action namespace correctly
|
||||
712302 GtkPlacesSideBar showing "Desktop" or not shouldn't be...
|
||||
712553 GtkBuilder: Make IDs optional
|
||||
|
||||
* Translation updates:
|
||||
Arabic
|
||||
Brazilian Portuguese
|
||||
British English
|
||||
French
|
||||
Greek
|
||||
Polish
|
||||
Spanish
|
||||
|
||||
|
||||
Overview of Changes in GTK+ 3.10 to 3.11.0
|
||||
==========================================
|
||||
|
||||
* New notebook tab styling: GtkNotebook now offers a way
|
||||
for themes to opt out of the tab rendering, with the
|
||||
'has-tab-gap' style property. The Adwaita theme is using
|
||||
this to achieve a more modern tab appearance.
|
||||
|
||||
* GtkFlowBox: A container that its children in a reflowing
|
||||
grid, which can be oriented horizontally or vertically.
|
||||
It is similar to GtkListBox in that the children can
|
||||
be sorted and filtered, and by requiring a dedicated child
|
||||
widget type, GtkFlowBoxChild. It is similar to GtkTreeView
|
||||
in that is supports a full set of selection modes, including
|
||||
rubberband selection.
|
||||
|
||||
* GtkStack: children can now indicate that they require
|
||||
attention by setting the needs-attention child property.
|
||||
|
||||
* Broadway now requires binary array buffers and modern WebSocket
|
||||
protocol support
|
||||
|
||||
* Autoscrolling in range widgets has been improved to work more
|
||||
reliably in maximized windows.
|
||||
|
||||
* GtkSpinner has been changed to render in in a limited set of
|
||||
sizes.
|
||||
|
||||
* GtkApplication now stores and handles accelerators for GActions
|
||||
itself.
|
||||
|
||||
* GtkIconTheme now falls back to the gnome icontheme to fix
|
||||
problems with the availability of symbolic icons in other
|
||||
icon themes.
|
||||
|
||||
* GTK+ respects the deprecated gtk-button-images and gtk-menu-images
|
||||
settings again.
|
||||
|
||||
* Bugs fixed:
|
||||
168530 gtk_accel_map_load: wasteful extra stat call.
|
||||
341146 reorder lines in configure.in for a better display
|
||||
467720 Useless use of const qualifier
|
||||
586107 gtkprintbackendpapi.c does not compile on Solaris 10
|
||||
643914 Area under tabs need its own style class
|
||||
651224 null pointer dereferenced due to multiple bugs in gtk...
|
||||
681484 GtkAboutDialog has extra space when gtk_widget_show_a...
|
||||
691163 GtkNotebook unable to style active tab
|
||||
693586 Erroneous focus claims resulting from gtk_notebook_se...
|
||||
697031 gtk_notebook_draw's type doesn't match GtkWidget::draw
|
||||
698730 tooltip: Fix possible wrong placement
|
||||
702196 Unfinished frame being presented
|
||||
703062 GtkTreeViewColumn returns negative size request on em...
|
||||
703603 Remove GtkWidget opacity-group hack in 3.12
|
||||
707132 gtkwindow: Allow removing titlebar all together
|
||||
707187 GtkStack: Add more transition types
|
||||
707524 CSD windows "shake" when they go backdrop
|
||||
707920 notebook tab style improvements
|
||||
708019 Invisible characters at the end of a TextView within...
|
||||
708024 Accessibility being initialized in the wrong place
|
||||
708163 all symbolic icons are missing when using icon theme...
|
||||
708414 entrycompletion: set the GtkWindow as attached to th...
|
||||
708423 current line highlighting not working anymore in Gtk...
|
||||
708547 search provider crashes: gnome-contacts-3.9.90-1.fc2...
|
||||
708583 StyleContext: removing or adding a provider doesn't ...
|
||||
708584 GtkTextView: add a virtual function create_buffer()
|
||||
708787 GtkStatusbar text is mangled
|
||||
709049 gtk_widget_destroy() on a GtkHeaderBar tries to gtk_...
|
||||
709212 Configure fails if I don't have wayland dependency
|
||||
709215 Rounded-corners on CSD apps dont flatten when snapped
|
||||
709264 Fix memory leaks in icons handling
|
||||
709323 properly check titlebox visibility
|
||||
709420 Rulers hardly visible in dark themed page setup tab
|
||||
709522 GtkFileChooser sidebar is not populated since 742a2f11
|
||||
709613 GtkStack: Warn when setting a child visible which is...
|
||||
709621 gdkevents.h: Mention _get_source_device()
|
||||
709687 listbox: Fix keynav_failed() parameter in move_cursor()
|
||||
709697 Fix a warning in builg gtk+ with clang
|
||||
709745 GtkSearchBar example problems
|
||||
709854 Wayland: Reliable crash when hovering over items wit...
|
||||
709939 monitor reconfiguration while GtkOffscreenWindows ex...
|
||||
709967 Double free in gtkicontheme.c
|
||||
710073 Assertion failure because _gtk_icon_info_load_symbol...
|
||||
710096 gtk3.10 doesn't work correctly when used from a dyna...
|
||||
710134 GtkToolButton possibly being empty
|
||||
710141 gtk_shell_interface exported in libgdk
|
||||
710389 Don't set WM_TAKE_FOCUS if accept_focus is FALSE
|
||||
710651 all: Add names to timeouts
|
||||
710666 Frame clock related bug fixes
|
||||
|
||||
* Translations:
|
||||
Afrikaans
|
||||
Arabic
|
||||
Basque
|
||||
Catalan
|
||||
Catalan (Valcencian)
|
||||
Danish
|
||||
Dutch
|
||||
German
|
||||
Hungarian
|
||||
Indonesian
|
||||
Latvian
|
||||
Russian
|
||||
Slovenian
|
||||
Spanish
|
||||
Traditional Chinese
|
||||
|
||||
|
||||
Overview of Changes in GTK+ 3.9.14 to 3.9.16
|
||||
============================================
|
||||
|
||||
* Bug fixes:
|
||||
339539 Ctrl-C, Ctrl-V changes tags
|
||||
513812 Optimize gdk_cairo_set_source_pixbuf() alpha multiplication loop
|
||||
696756 gdk_device_get_source : assertion `GDK_IS_DEVICE(source)` failed
|
||||
702034 color_value_parse() memory leak
|
||||
702423 CellRendererPixbuf regression: Stock icons with rtl/ltr varia...
|
||||
706269 Clarify GtkBox, GtkHBox, and GtkVBox documentation
|
||||
706345 GtkExpander's click-and-drag behavior should match that of Gt...
|
||||
706708 GtkHeaderBar doesn't respect titlebar button layout setting
|
||||
707129 wayland: support application menus
|
||||
707244 pixelcache: gtktextview pixelcache does not invalidate textma...
|
||||
707328 Segmentation fault when running on Wayland compositor
|
||||
707445 ghost cursor when mouse hovers over an image file in a tab
|
||||
707488 Typo in error message in gtkfilechooserdefault.c
|
||||
707519 Missing introspection annotations
|
||||
707659 orca becomes non-responsive when doing read line on Unbound
|
||||
707704 Prefer Wayland to X11
|
||||
707778 The redesigned "Universal Access" and "Date & Time" panels ca...
|
||||
707786 Collapsed Gtk combo boxes no longer emit accessible selection...
|
||||
707844 No way to get window field a GdkEvent from Gjs
|
||||
707872 GtkSwitch shouldn't have a default name
|
||||
707915 Accessible object for GtkListBoxRow should have list_item role
|
||||
707926 GtkSwitch shouldn't have a default accessible description
|
||||
707981 GtkHeaderBar needs a better accessible role
|
||||
708012 Wayland dependency inaccurate
|
||||
708067 Headerbar 'Previous' and 'Next' buttons are not keyboard navi...
|
||||
708076 Doc: small fixes in GtkTextView
|
||||
708128 listbox keynav gets stuck at insensitive rows
|
||||
708150 GtkWidget: Add gtk_widget_remove_action_group()?
|
||||
|
||||
* Translation updates:
|
||||
Belarusian
|
||||
Brazilian Portuguese
|
||||
Czech
|
||||
Danish
|
||||
Finnish
|
||||
French
|
||||
Galician
|
||||
Hebrew
|
||||
Hungarian
|
||||
Indonesian
|
||||
Italian
|
||||
Japanese
|
||||
Korean
|
||||
Latvian
|
||||
Lithuanian
|
||||
Norwegian bokmål
|
||||
Polish
|
||||
Punjabi
|
||||
Russian
|
||||
Slovak
|
||||
Slovenian
|
||||
Spanish
|
||||
Tajik
|
||||
Thai
|
||||
Traditional Chinese
|
||||
|
||||
|
||||
Overview of Changes in GTK+ 3.9.12 to 3.9.14
|
||||
============================================
|
||||
|
||||
* GtkLabel can now ellipsize just the last line,
|
||||
ellipsized in multi-line labels.
|
||||
|
||||
* Bugs fixed:
|
||||
680953 set_item_width / text wrapping doesn't work in iconview...
|
||||
700428 Default input method should be chosen based on the inpu...
|
||||
701125 port scrolling to GtkPixelCache
|
||||
704278 Possible crash when destroying a tick callback
|
||||
705980 Update Win32 code so that GTK+ will build and run
|
||||
706323 HeaderBar window menus
|
||||
706448 Shortcut <ALT> + O in Save As Dialog is not Unique
|
||||
706451 Path bar - pushed buttons have an erroneous bold weight
|
||||
706493 fix some memory leaks
|
||||
706529 CSD fixes for mutter/gnome-shell
|
||||
706563 Un-deprecate gtk-entry-password-hint-timeout
|
||||
706592 csd: some fixes for the titlebar
|
||||
706722 path bar looks broken when the window is to small to fit...
|
||||
706728 pixelcache: allow specifying extra size and cairo_conten...
|
||||
706740 a typo in gtk_icon_view_key_release()
|
||||
706756 GtkAssistant behaviour changed and now throws 'Page flow...
|
||||
706778 GtkMessageDialog contains translatable space
|
||||
706802 Missing docs for GTK_PRINT_SETTINGS_OUTPUT_DIR and GTK_P...
|
||||
706870 serial number jump bigger than 1000 warnings
|
||||
706922 Set the opaque region when using CSD
|
||||
706929 HeaderBar padding - account for double bottom button border
|
||||
706938 revealer: clamp minimum size to natural one
|
||||
707051 Do not hardcode title and subtititle style
|
||||
707201 Needs glib 2.37.5
|
||||
|
||||
* Translation updates:
|
||||
Brazilian Portuguese
|
||||
Czech
|
||||
Galician
|
||||
Irish
|
||||
Italian
|
||||
Kazakh
|
||||
Lithuanian
|
||||
Norwegian bokmål
|
||||
Polish
|
||||
Punjabi
|
||||
Scottish Gaelic
|
||||
Slovenian
|
||||
Tajik
|
||||
|
||||
|
||||
Overview of Changes in GTK+ 3.9.10 to 3.9.12
|
||||
============================================
|
||||
|
||||
* GtkInfoBar now uses a GtkRevealer internally to slide in place.
|
||||
It is no longer necessary to do that manually.
|
||||
|
||||
* GtkHeaderBar can now add a window close button
|
||||
|
||||
* The fine adjustment mode for scrolling has been revamped to be
|
||||
easier discoverable, and visual feedback and autoscrolling has
|
||||
been added.
|
||||
|
||||
* GtkIconTheme now supports 2x scaled icons for hi-dpi displays.
|
||||
|
||||
* The Wayland and X11 clipboard implementations can now coexist
|
||||
|
||||
* Bugs fixed:
|
||||
448637 Convert comment in gtkmenushell.c into docs
|
||||
672220 GtkFileChooserButton dialog stretched, when user has a really...
|
||||
674108 Hard crash due to wrong NSAutoreleasePool stacking
|
||||
680926 generic type fallback logic is broken for -symbolic
|
||||
688738 GtkMenuButton problem with mnemonics / accelerators
|
||||
692548 Quartz: Cursor doesn't reset when the mouse leaves a toplevel...
|
||||
694831 GtkEntry provides no visual feedback when editable=FALSE
|
||||
697127 gedit context menu uses fixed-width font
|
||||
697399 GtkEntry: Add a "tabs" property for setting a PangoTabArray...
|
||||
700029 GdkEvent type not accessible from Javascript
|
||||
701571 1ad25dfb causes NSApp to not notice NSWindow destruction
|
||||
702144 Make gdkwin32.h a pure include-only header
|
||||
702971 GtkHeaderBar - pick up window controls from the system settings
|
||||
704173 Don't use UNIX-specific printer objects on non-UNIX
|
||||
704334 add revealer to infobar
|
||||
704703 fine adjustments are difficult with scrollbars
|
||||
705068 Update the GDK and GTK on Win32 to not use deprecated APIs
|
||||
705181 Annoying beep on arrow keys when using IME on MacOS
|
||||
705182 Reset Cocoa IME state when immodule is reset
|
||||
705215 Minimum required cairo version should be 1.12 since 83c5e354b
|
||||
705320 gtkicontheme: check for GdkPixbuf first
|
||||
705372 gtk_image_menu_item_new_from_stock deprecation warning point...
|
||||
705443 Fix image effects
|
||||
705498 build and enable wayland backend by default
|
||||
705524 searchbar: ignore GDK_KEY_Menu in handle_event()
|
||||
705529 GtkTextView: improve documentation
|
||||
705558 [listbox] convenience methods to prepend and insert at index
|
||||
705601 headerbar: some improvements
|
||||
705605 Improve the spring-back animation for drag and drop
|
||||
705624 paned: minus the size by the handle for the for_child1 compu...
|
||||
705640 GtkWindow incorrectly requires a default screen
|
||||
705672 Inconsistent deprecations. GtkComboBox and GtkMenu.
|
||||
705692 Segmentation fault on horizontal slider
|
||||
705750 Quartz input method doesn't work correctly for Chinese characters
|
||||
705765 gtkwindow: Export our custom frame extents
|
||||
705809 Middle click on HeaderBar (as tiitelbar) isn't moved to the...
|
||||
705918 Add gtk_button_new_from_icon_name
|
||||
706014 Searchbar entry lacks an accessible name
|
||||
706045 Set GtkBox as titlebar of the window - the background of the box...
|
||||
706152 g_object_notify called with NULL priv->focus_widget
|
||||
706220 Add the "text-button" style to button created with gtk_button_ne...
|
||||
706028 The pathbar in GTKFilechooser don't stick together
|
||||
706335 doc: Fix typos
|
||||
|
||||
* Updated translations:
|
||||
Arabic
|
||||
Czech
|
||||
Galician
|
||||
Hebrew
|
||||
Hungarian
|
||||
Lithuanian
|
||||
Norwegian bokmål
|
||||
Spanish
|
||||
Tajik
|
||||
Traditional Chinese
|
||||
|
||||
|
||||
Overview of Changes in GTK+ 3.9.8 to 3.9.10
|
||||
===========================================
|
||||
|
||||
|
||||
@@ -73,15 +73,6 @@ Patches should be in unified diff form. (The -up option to GNU diff)
|
||||
Even better are git-formatted patches. (Use git format-patch)
|
||||
|
||||
|
||||
Release notes for 3.12
|
||||
======================
|
||||
|
||||
* GtkWidget had a hack where if opacity is 0.999 we set up an opacity
|
||||
group when rendering the widget. This is no longer needed in 3.10,
|
||||
and GtkStack doesn't use it anymore. It has been removed in 3.12.
|
||||
GdStack is using it, so applications should be ported from GdStack
|
||||
to GtkStack in 3.12.
|
||||
|
||||
Release notes for 3.10
|
||||
======================
|
||||
|
||||
@@ -106,25 +97,6 @@ Release notes for 3.10
|
||||
to just the insensitive and backdrop states. This mostly affects
|
||||
theming.
|
||||
|
||||
* The way widget drawing happens has changed. Earlier versions handled
|
||||
one expose event per GdkWindow, each with a separate cairo_t. Now we
|
||||
only handle the expose event on the toplevel and reuse the same
|
||||
cairo_t (with the right translation and clipping) for the entire
|
||||
widget hierarchy, recursing down via the GtkWidget::draw signal.
|
||||
Having all rendering in the same call tree allows effects like
|
||||
opacity and offscreen rendering of entire widget sub-hierarchies.
|
||||
Generally this should not require any changes in widgets, but
|
||||
code looking at e.g. the current expose event may see different
|
||||
behavior than before.
|
||||
|
||||
* The Gtk+ scrolling implementation has changed. gdk_window_scroll()
|
||||
and gdk_window_move_region() no longer copy the region on the
|
||||
window, but rather invalidate the entire scrolled region. This is
|
||||
slightly slower, but allowed us to implement a offscreen surface
|
||||
scrolling method which better fits modern hardware. Most scrolling
|
||||
widgets in Gtk+ have been converted to use this model for scrolling,
|
||||
but external widgets implementing scrolling using GdkWindow may see
|
||||
some slowdown.
|
||||
|
||||
Release notes for 3.8
|
||||
=====================
|
||||
|
||||
@@ -72,8 +72,6 @@ echo python %BASEDIR%\bin\g-ir-scanner --verbose -I..\.. -I..\..\gdk ^^>> gtk_gi
|
||||
echo -I%BASEDIR%\include\glib-2.0 -I%BASEDIR%\lib\glib-2.0\include ^^>> gtk_gir.bat
|
||||
echo -I%BASEDIR%\include\pango-1.0 -I%BASEDIR%\include\atk-1.0 ^^>> gtk_gir.bat
|
||||
echo -I%BASEDIR%\include\gdk-pixbuf-2.0 -I%BASEDIR%\include ^^>> gtk_gir.bat
|
||||
if "%PLAT%" == "x64" echo -D__int64=long long ^^>> gtk_gir.bat
|
||||
if "%PLAT%" == "Win32" echo -Dtime_t=long ^^>> gtk_gir.bat
|
||||
echo --namespace=Gdk --nsversion=3.0 ^^>> gtk_gir.bat
|
||||
echo --include=Gio-2.0 --include=GdkPixbuf-2.0 ^^>> gtk_gir.bat
|
||||
echo --include=Pango-1.0 --include=cairo-1.0 ^^>> gtk_gir.bat
|
||||
@@ -113,8 +111,7 @@ echo --no-libtool --library=gtk-3-vs%VSVER% ^^>> gtk_gir.bat
|
||||
echo --reparse-validate --add-include-path=%BASEDIR%\share\gir-1.0 --add-include-path=. ^^>> gtk_gir.bat
|
||||
echo --pkg-export gtk+-3.0 --warn-all --c-include="gtk/gtkx.h" ^^>> gtk_gir.bat
|
||||
echo -I..\.. -DG_LOG_DOMAIN=\"Gtk\" -DGTK_LIBDIR=\"/dummy/lib\" ^^>> gtk_gir.bat
|
||||
if "%PLAT%" == "x64" echo -D__int64=long long ^^>> gtk_gir.bat
|
||||
if "%PLAT%" == "Win32" echo -Dtime_t=long ^^>> gtk_gir.bat
|
||||
echo -Dtime_t=long ^^>> gtk_gir.bat
|
||||
echo -DGTK_DATADIR=\"/dummy/share\" -DGTK_DATA_PREFIX=\"/dummy\" ^^>> gtk_gir.bat
|
||||
echo -DGTK_SYSCONFDIR=\"/dummy/etc\" -DGTK_VERSION=\"3.6.2\" ^^>> gtk_gir.bat
|
||||
echo -DGTK_BINARY_VERSION=\"3.0.0\" -DGTK_HOST=\"i686-pc-vs%VSVER%\" ^^>> gtk_gir.bat
|
||||
|
||||
@@ -36,7 +36,6 @@ EXTRA_DIST += \
|
||||
gtk-install-headers-data.props \
|
||||
gtk-version-paths.props \
|
||||
gtkprebuild-broadway.props \
|
||||
gtkprebuild.props \
|
||||
gtk-copy-gdk-broadway.props
|
||||
gtkprebuild.props
|
||||
|
||||
-include $(top_srcdir)/git.mk
|
||||
|
||||
@@ -15,9 +15,17 @@
|
||||
</Filter>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="..\crypt\crypt3.c"><Filter>Sources</Filter></ClCompile>
|
||||
<ClCompile Include="..\..\..\gdk\broadway\broadwayd.c"><Filter>Sources</Filter></ClCompile>
|
||||
<ClCompile Include="..\..\..\gdk\broadway\broadway-output.c"><Filter>Sources</Filter></ClCompile>
|
||||
<ClCompile Include="..\..\..\gdk\broadway\broadway-server.c"><Filter>Sources</Filter></ClCompile>
|
||||
<ClCompile Include="..\crypt\crypt3.c">
|
||||
<Filter>Sources</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\gdk\broadway\broadwayd.c">
|
||||
<Filter>Sources</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\gdk\broadway\broadway-output.c">
|
||||
<Filter>Sources</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\gdk\broadway\broadway-server.c">
|
||||
<Filter>Sources</Filter>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
</Project>
|
||||
@@ -15,7 +15,11 @@
|
||||
</Filter>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="..\..\..\libgail-util\gailmisc.c"><Filter>Sources</Filter></ClCompile>
|
||||
<ClCompile Include="..\..\..\libgail-util\gailtextutil.c"><Filter>Sources</Filter></ClCompile>
|
||||
<ClCompile Include="..\..\..\libgail-util\gailmisc.c">
|
||||
<Filter>Sources</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\libgail-util\gailtextutil.c">
|
||||
<Filter>Sources</Filter>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
</Project>
|
||||
@@ -15,20 +15,50 @@
|
||||
</Filter>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="..\..\..\gdk\broadway\gdkcursor-broadway.c"><Filter>Source Files</Filter></ClCompile>
|
||||
<ClCompile Include="..\..\..\gdk\broadway\gdkdevice-broadway.c"><Filter>Source Files</Filter></ClCompile>
|
||||
<ClCompile Include="..\..\..\gdk\broadway\gdkdevicemanager-broadway.c"><Filter>Source Files</Filter></ClCompile>
|
||||
<ClCompile Include="..\..\..\gdk\broadway\gdkdisplay-broadway.c"><Filter>Source Files</Filter></ClCompile>
|
||||
<ClCompile Include="..\..\..\gdk\broadway\gdkdnd-broadway.c"><Filter>Source Files</Filter></ClCompile>
|
||||
<ClCompile Include="..\..\..\gdk\broadway\gdkeventsource.c"><Filter>Source Files</Filter></ClCompile>
|
||||
<ClCompile Include="..\..\..\gdk\broadway\gdkglobals-broadway.c"><Filter>Source Files</Filter></ClCompile>
|
||||
<ClCompile Include="..\..\..\gdk\broadway\gdkkeys-broadway.c"><Filter>Source Files</Filter></ClCompile>
|
||||
<ClCompile Include="..\..\..\gdk\broadway\gdkproperty-broadway.c"><Filter>Source Files</Filter></ClCompile>
|
||||
<ClCompile Include="..\..\..\gdk\broadway\gdkscreen-broadway.c"><Filter>Source Files</Filter></ClCompile>
|
||||
<ClCompile Include="..\..\..\gdk\broadway\gdkselection-broadway.c"><Filter>Source Files</Filter></ClCompile>
|
||||
<ClCompile Include="..\..\..\gdk\broadway\gdktestutils-broadway.c"><Filter>Source Files</Filter></ClCompile>
|
||||
<ClCompile Include="..\..\..\gdk\broadway\gdkvisual-broadway.c"><Filter>Source Files</Filter></ClCompile>
|
||||
<ClCompile Include="..\..\..\gdk\broadway\gdkwindow-broadway.c"><Filter>Source Files</Filter></ClCompile>
|
||||
<ClCompile Include="..\..\..\gdk\broadway\gdkbroadway-server.c"><Filter>Source Files</Filter></ClCompile>
|
||||
<ClCompile Include="..\..\..\gdk\broadway\gdkcursor-broadway.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\gdk\broadway\gdkdevice-broadway.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\gdk\broadway\gdkdevicemanager-broadway.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\gdk\broadway\gdkdisplay-broadway.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\gdk\broadway\gdkdnd-broadway.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\gdk\broadway\gdkeventsource.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\gdk\broadway\gdkglobals-broadway.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\gdk\broadway\gdkkeys-broadway.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\gdk\broadway\gdkproperty-broadway.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\gdk\broadway\gdkscreen-broadway.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\gdk\broadway\gdkselection-broadway.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\gdk\broadway\gdktestutils-broadway.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\gdk\broadway\gdkvisual-broadway.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\gdk\broadway\gdkwindow-broadway.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\gdk\broadway\gdkbroadway-server.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
</Project>
|
||||
@@ -15,26 +15,68 @@
|
||||
</Filter>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="..\..\..\gdk\win32\gdkcursor-win32.c"><Filter>Source Files</Filter></ClCompile>
|
||||
<ClCompile Include="..\..\..\gdk\win32\gdkdevice-virtual.c"><Filter>Source Files</Filter></ClCompile>
|
||||
<ClCompile Include="..\..\..\gdk\win32\gdkdevice-win32.c"><Filter>Source Files</Filter></ClCompile>
|
||||
<ClCompile Include="..\..\..\gdk\win32\gdkdevice-wintab.c"><Filter>Source Files</Filter></ClCompile>
|
||||
<ClCompile Include="..\..\..\gdk\win32\gdkdevicemanager-win32.c"><Filter>Source Files</Filter></ClCompile>
|
||||
<ClCompile Include="..\..\..\gdk\win32\gdkdisplay-win32.c"><Filter>Source Files</Filter></ClCompile>
|
||||
<ClCompile Include="..\..\..\gdk\win32\gdkdnd-win32.c"><Filter>Source Files</Filter></ClCompile>
|
||||
<ClCompile Include="..\..\..\gdk\win32\gdkevents-win32.c"><Filter>Source Files</Filter></ClCompile>
|
||||
<ClCompile Include="..\..\..\gdk\win32\gdkgeometry-win32.c"><Filter>Source Files</Filter></ClCompile>
|
||||
<ClCompile Include="..\..\..\gdk\win32\gdkglobals-win32.c"><Filter>Source Files</Filter></ClCompile>
|
||||
<ClCompile Include="..\..\..\gdk\win32\gdkinput.c"><Filter>Source Files</Filter></ClCompile>
|
||||
<ClCompile Include="..\..\..\gdk\win32\gdkkeys-win32.c"><Filter>Source Files</Filter></ClCompile>
|
||||
<ClCompile Include="..\..\..\gdk\win32\gdkmain-win32.c"><Filter>Source Files</Filter></ClCompile>
|
||||
<ClCompile Include="..\..\..\gdk\win32\gdkproperty-win32.c"><Filter>Source Files</Filter></ClCompile>
|
||||
<ClCompile Include="..\..\..\gdk\win32\gdkscreen-win32.c"><Filter>Source Files</Filter></ClCompile>
|
||||
<ClCompile Include="..\..\..\gdk\win32\gdkselection-win32.c"><Filter>Source Files</Filter></ClCompile>
|
||||
<ClCompile Include="..\..\..\gdk\win32\gdktestutils-win32.c"><Filter>Source Files</Filter></ClCompile>
|
||||
<ClCompile Include="..\..\..\gdk\win32\gdkvisual-win32.c"><Filter>Source Files</Filter></ClCompile>
|
||||
<ClCompile Include="..\..\..\gdk\win32\gdkdisplaymanager-win32.c"><Filter>Source Files</Filter></ClCompile>
|
||||
<ClCompile Include="..\..\..\gdk\win32\gdkwin32id.c"><Filter>Source Files</Filter></ClCompile>
|
||||
<ClCompile Include="..\..\..\gdk\win32\gdkwindow-win32.c"><Filter>Source Files</Filter></ClCompile>
|
||||
<ClCompile Include="..\..\..\gdk\win32\gdkcursor-win32.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\gdk\win32\gdkdevice-virtual.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\gdk\win32\gdkdevice-win32.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\gdk\win32\gdkdevice-wintab.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\gdk\win32\gdkdevicemanager-win32.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\gdk\win32\gdkdisplay-win32.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\gdk\win32\gdkdnd-win32.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\gdk\win32\gdkevents-win32.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\gdk\win32\gdkgeometry-win32.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\gdk\win32\gdkglobals-win32.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\gdk\win32\gdkinput.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\gdk\win32\gdkkeys-win32.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\gdk\win32\gdkmain-win32.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\gdk\win32\gdkproperty-win32.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\gdk\win32\gdkscreen-win32.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\gdk\win32\gdkselection-win32.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\gdk\win32\gdktestutils-win32.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\gdk\win32\gdkvisual-win32.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\gdk\win32\gdkdisplaymanager-win32.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\gdk\win32\gdkwin32id.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\gdk\win32\gdkwindow-win32.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
</Project>
|
||||
@@ -110,22 +110,18 @@
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release_Broadway|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" />
|
||||
<Import Project="gtk-copy-gdk-broadway.props" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug_Broadway|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" />
|
||||
<Import Project="gtk-copy-gdk-broadway.props" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release_Broadway|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" />
|
||||
<Import Project="gtk-copy-gdk-broadway.props" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug_Broadway|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" />
|
||||
<Import Project="gtk-copy-gdk-broadway.props" />
|
||||
</ImportGroup>
|
||||
<PropertyGroup Label="UserMacros" />
|
||||
<PropertyGroup>
|
||||
|
||||
@@ -1,44 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup>
|
||||
<_PropertySheetDisplayName>gtkcopygdkbroadwayprops</_PropertySheetDisplayName>
|
||||
</PropertyGroup>
|
||||
<ItemDefinitionGroup>
|
||||
<PostBuildEvent>
|
||||
<Command>
|
||||
if "$(Configuration)" == "Release" goto END
|
||||
|
||||
if "$(Configuration)" == "Debug" goto END
|
||||
|
||||
if "$(Configuration)" == "Release_Broadway" goto DoRelease
|
||||
|
||||
if "$(Configuration)" == "Debug_Broadway" goto DoDebug
|
||||
|
||||
|
||||
:DoRelease
|
||||
|
||||
mkdir .\Release\$(Platform)\bin
|
||||
|
||||
copy /b $(Configuration)\$(Platform)\bin\$(GtkDllPrefix)gdk$(GtkDllSuffix).dll .\Release\$(Platform)\bin\
|
||||
|
||||
copy /b $(Configuration)\$(Platform)\bin\gdk-$(ApiVersion).lib .\Release\$(Platform)\bin\
|
||||
|
||||
goto END
|
||||
|
||||
|
||||
:DoDebug
|
||||
|
||||
mkdir .\Debug\$(Platform)\bin
|
||||
|
||||
copy /b $(Configuration)\$(Platform)\bin\$(GtkDllPrefix)gdk$(GtkDllSuffix).dll .\Debug\$(Platform)\bin\
|
||||
|
||||
copy /b $(Configuration)\$(Platform)\bin\gdk-$(ApiVersion).lib .\Debug\$(Platform)\bin\
|
||||
|
||||
goto END
|
||||
|
||||
|
||||
:END
|
||||
</Command>
|
||||
</PostBuildEvent>
|
||||
</ItemDefinitionGroup>
|
||||
</Project>
|
||||
@@ -2,7 +2,6 @@
|
||||
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ImportGroup Label="PropertySheets">
|
||||
<Import Project="gtk-version-paths.props" />
|
||||
<Import Project="gtk-build-defines.props" />
|
||||
</ImportGroup>
|
||||
<PropertyGroup Label="UserMacros">
|
||||
<DoGenGir>
|
||||
|
||||
@@ -26,16 +26,16 @@ goto DONE_BIN
|
||||
|
||||
:DO_BROADWAY_BIN
|
||||
|
||||
copy $(Configuration)\$(Platform)\bin\$(GtkDllPrefix)gdk$(GtkDllSuffix).dll $(CopyDir)\bin
|
||||
copy $(Configuration)\$(Platform)\bin\gdk-3-vs*.dll $(CopyDir)\bin
|
||||
|
||||
copy $(Configuration)\$(Platform)\bin\gdk-$(ApiVersion).lib $(CopyDir)\lib
|
||||
|
||||
copy $(Configuration)\$(Platform)\bin\broadwayd.exe $(CopyDir)\bin
|
||||
|
||||
|
||||
if "$(Configuration)" == "Release_Broadway" copy .\Release\$(Platform)\bin\$(GtkDllPrefix)gtk$(GtkDllSuffix).dll $(CopyDir)\bin
|
||||
if "$(Configuration)" == "Release_Broadway" copy .\Release\$(Platform)\bin\gtk-3-vs*.dll $(CopyDir)\bin
|
||||
|
||||
if "$(Configuration)" == "Release_Broadway" copy .\Release\$(Platform)\bin\$(GtkDllPrefix)gailutil$(GtkDllSuffix).dll $(CopyDir)\bin
|
||||
if "$(Configuration)" == "Release_Broadway" copy .\Release\$(Platform)\bin\gailutil-3-vs*.dll $(CopyDir)\bin
|
||||
|
||||
if "$(Configuration)" == "Release_Broadway" copy .\Release\$(Platform)\bin\gtk-$(ApiVersion).lib $(CopyDir)\lib
|
||||
|
||||
@@ -44,9 +44,9 @@ if "$(Configuration)" == "Release_Broadway" copy .\Release\$(Platform)\bin\gailu
|
||||
if "$(Configuration)" == "Release_Broadway" copy .\Release\$(Platform)\bin\*.exe $(CopyDir)\bin
|
||||
|
||||
|
||||
if "$(Configuration)" == "Debug_Broadway" copy .\Debug\$(Platform)\bin\$(GtkDllPrefix)gtk$(GtkDllSuffix).dll $(CopyDir)\bin
|
||||
if "$(Configuration)" == "Debug_Broadway" copy .\Debug\$(Platform)\bin\gtk-3-vs*.dll $(CopyDir)\bin
|
||||
|
||||
if "$(Configuration)" == "Debug_Broadway" copy .\Debug\$(Platform)\bin\$(GtkDllPrefix)gailutil$(GtkDllSuffix).dll $(CopyDir)\bin
|
||||
if "$(Configuration)" == "Debug_Broadway" copy .\Debug\$(Platform)\bin\gailutil-3-vs*.dll $(CopyDir)\bin
|
||||
|
||||
if "$(Configuration)" == "Debug_Broadway" copy .\Debug\$(Platform)\bin\gtk-$(ApiVersion).lib $(CopyDir)\lib
|
||||
|
||||
|
||||
@@ -87,8 +87,6 @@ copy ..\..\..\gdk\win32\gdkwin32dnd.h $(CopyDir)\include\gtk-$(ApiVersion)\gdk\w
|
||||
|
||||
copy ..\..\..\gdk\win32\gdkwin32keys.h $(CopyDir)\include\gtk-$(ApiVersion)\gdk\win32
|
||||
|
||||
copy ..\..\..\gdk\win32\gdkwin32misc.h $(CopyDir)\include\gtk-$(ApiVersion)\gdk\win32
|
||||
|
||||
copy ..\..\..\gdk\win32\gdkwin32screen.h $(CopyDir)\include\gtk-$(ApiVersion)\gdk\win32
|
||||
|
||||
copy ..\..\..\gdk\win32\gdkwin32window.h $(CopyDir)\include\gtk-$(ApiVersion)\gdk\win32
|
||||
@@ -247,8 +245,6 @@ copy ..\..\..\gtk\gtkfilefilter.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk
|
||||
|
||||
copy ..\..\..\gtk\gtkfixed.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk
|
||||
|
||||
copy ..\..\..\gtk\gtkflowbox.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk
|
||||
|
||||
copy ..\..\..\gtk\gtkfontbutton.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk
|
||||
|
||||
copy ..\..\..\gtk\gtkfontchooser.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk
|
||||
@@ -601,10 +597,6 @@ copy ..\..\..\gtk\a11y\gtkentryaccessible.h $(CopyDir)\include\gtk-$(ApiVersion)
|
||||
|
||||
copy ..\..\..\gtk\a11y\gtkexpanderaccessible.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk\a11y
|
||||
|
||||
copy ..\..\..\gtk\a11y\gtkflowboxaccessible.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk\a11y
|
||||
|
||||
copy ..\..\..\gtk\a11y\gtkflowboxchildaccessible.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk\a11y
|
||||
|
||||
copy ..\..\..\gtk\a11y\gtkframeaccessible.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk\a11y
|
||||
|
||||
copy ..\..\..\gtk\a11y\gtkiconviewaccessible.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk\a11y
|
||||
@@ -621,8 +613,6 @@ copy ..\..\..\gtk\a11y\gtklinkbuttonaccessible.h $(CopyDir)\include\gtk-$(ApiVer
|
||||
|
||||
copy ..\..\..\gtk\a11y\gtklistboxaccessible.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk\a11y
|
||||
|
||||
copy ..\..\..\gtk\a11y\gtklistboxrowaccessible.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk\a11y
|
||||
|
||||
copy ..\..\..\gtk\a11y\gtklockbuttonaccessible.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk\a11y
|
||||
|
||||
copy ..\..\..\gtk\a11y\gtkmenuaccessible.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk\a11y
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
<WholeProgramOptimization>false</WholeProgramOptimization>
|
||||
<PlatformToolset>v100</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
|
||||
@@ -38,7 +38,7 @@
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
<WholeProgramOptimization>false</WholeProgramOptimization>
|
||||
<PlatformToolset>v100</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
|
||||
@@ -105,7 +105,7 @@
|
||||
<Link>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<SubSystem>Console</SubSystem>
|
||||
<OptimizeReferences>false</OptimizeReferences>
|
||||
<OptimizeReferences>true</OptimizeReferences>
|
||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||
<TargetMachine>MachineX86</TargetMachine>
|
||||
</Link>
|
||||
@@ -149,7 +149,7 @@
|
||||
<Link>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<SubSystem>Console</SubSystem>
|
||||
<OptimizeReferences>false</OptimizeReferences>
|
||||
<OptimizeReferences>true</OptimizeReferences>
|
||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||
<TargetMachine>MachineX64</TargetMachine>
|
||||
</Link>
|
||||
|
||||
@@ -15,7 +15,11 @@
|
||||
</Filter>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="..\..\..\demos\gtk-demo\application-standalone.c"><Filter>Sources</Filter></ClCompile>
|
||||
<ClCompile Include="..\..\..\demos\gtk-demo\demo_resources.c"><Filter>Sources</Filter></ClCompile>
|
||||
<ClCompile Include="..\..\..\demos\gtk-demo\application-standalone.c">
|
||||
<Filter>Sources</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\demos\gtk-demo\demo_resources.c">
|
||||
<Filter>Sources</Filter>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
</Project>
|
||||
@@ -27,7 +27,7 @@
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
<WholeProgramOptimization>false</WholeProgramOptimization>
|
||||
<PlatformToolset>v100</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
|
||||
@@ -38,7 +38,7 @@
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
<WholeProgramOptimization>false</WholeProgramOptimization>
|
||||
<PlatformToolset>v100</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
|
||||
@@ -136,7 +136,7 @@
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<SubSystem>Console</SubSystem>
|
||||
<FunctionLevelLinking>false</FunctionLevelLinking>
|
||||
<OptimizeReferences>false</OptimizeReferences>
|
||||
<OptimizeReferences>true</OptimizeReferences>
|
||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||
<RandomizedBaseAddress>false</RandomizedBaseAddress>
|
||||
<DataExecutionPrevention>
|
||||
@@ -160,7 +160,7 @@
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<SubSystem>Console</SubSystem>
|
||||
<FunctionLevelLinking>false</FunctionLevelLinking>
|
||||
<OptimizeReferences>false</OptimizeReferences>
|
||||
<OptimizeReferences>true</OptimizeReferences>
|
||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||
<RandomizedBaseAddress>false</RandomizedBaseAddress>
|
||||
<DataExecutionPrevention>
|
||||
@@ -189,7 +189,6 @@
|
||||
<ClCompile Include="..\..\..\demos\gtk-demo\entry_buffer.c" />
|
||||
<ClCompile Include="..\..\..\demos\gtk-demo\entry_completion.c" />
|
||||
<ClCompile Include="..\..\..\demos\gtk-demo\expander.c" />
|
||||
<ClCompile Include="..\..\..\demos\gtk-demo\flowbox.c" />
|
||||
<ClCompile Include="..\..\..\demos\gtk-demo\hypertext.c" />
|
||||
<ClCompile Include="..\..\..\demos\gtk-demo\iconview.c" />
|
||||
<ClCompile Include="..\..\..\demos\gtk-demo\iconview_edit.c" />
|
||||
|
||||
@@ -11,56 +11,155 @@
|
||||
</Filter>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="..\..\..\demos\gtk-demo\application.c"><Filter>Source Files</Filter></ClCompile>
|
||||
<ClCompile Include="..\..\..\demos\gtk-demo\assistant.c"><Filter>Source Files</Filter></ClCompile>
|
||||
<ClCompile Include="..\..\..\demos\gtk-demo\builder.c"><Filter>Source Files</Filter></ClCompile>
|
||||
<ClCompile Include="..\..\..\demos\gtk-demo\button_box.c"><Filter>Source Files</Filter></ClCompile>
|
||||
<ClCompile Include="..\..\..\demos\gtk-demo\changedisplay.c"><Filter>Source Files</Filter></ClCompile>
|
||||
<ClCompile Include="..\..\..\demos\gtk-demo\clipboard.c"><Filter>Source Files</Filter></ClCompile>
|
||||
<ClCompile Include="..\..\..\demos\gtk-demo\colorsel.c"><Filter>Source Files</Filter></ClCompile>
|
||||
<ClCompile Include="..\..\..\demos\gtk-demo\combobox.c"><Filter>Source Files</Filter></ClCompile>
|
||||
<ClCompile Include="..\..\..\demos\gtk-demo\css_accordion.c"><Filter>Source Files</Filter></ClCompile>
|
||||
<ClCompile Include="..\..\..\demos\gtk-demo\css_basics.c"><Filter>Source Files</Filter></ClCompile>
|
||||
<ClCompile Include="..\..\..\demos\gtk-demo\css_multiplebgs.c"><Filter>Source Files</Filter></ClCompile>
|
||||
<ClCompile Include="..\..\..\demos\gtk-demo\css_pixbufs.c"><Filter>Source Files</Filter></ClCompile>
|
||||
<ClCompile Include="..\..\..\demos\gtk-demo\css_shadows.c"><Filter>Source Files</Filter></ClCompile>
|
||||
<ClCompile Include="..\..\..\demos\gtk-demo\demo_resources.c"><Filter>Source Files</Filter></ClCompile>
|
||||
<ClCompile Include="..\..\..\demos\gtk-demo\dialog.c"><Filter>Source Files</Filter></ClCompile>
|
||||
<ClCompile Include="..\..\..\demos\gtk-demo\drawingarea.c"><Filter>Source Files</Filter></ClCompile>
|
||||
<ClCompile Include="..\..\..\demos\gtk-demo\editable_cells.c"><Filter>Source Files</Filter></ClCompile>
|
||||
<ClCompile Include="..\..\..\demos\gtk-demo\entry_buffer.c"><Filter>Source Files</Filter></ClCompile>
|
||||
<ClCompile Include="..\..\..\demos\gtk-demo\entry_completion.c"><Filter>Source Files</Filter></ClCompile>
|
||||
<ClCompile Include="..\..\..\demos\gtk-demo\expander.c"><Filter>Source Files</Filter></ClCompile>
|
||||
<ClCompile Include="..\..\..\demos\gtk-demo\flowbox.c"><Filter>Source Files</Filter></ClCompile>
|
||||
<ClCompile Include="..\..\..\demos\gtk-demo\hypertext.c"><Filter>Source Files</Filter></ClCompile>
|
||||
<ClCompile Include="..\..\..\demos\gtk-demo\iconview.c"><Filter>Source Files</Filter></ClCompile>
|
||||
<ClCompile Include="..\..\..\demos\gtk-demo\iconview_edit.c"><Filter>Source Files</Filter></ClCompile>
|
||||
<ClCompile Include="..\..\..\demos\gtk-demo\images.c"><Filter>Source Files</Filter></ClCompile>
|
||||
<ClCompile Include="..\..\..\demos\gtk-demo\infobar.c"><Filter>Source Files</Filter></ClCompile>
|
||||
<ClCompile Include="..\..\..\demos\gtk-demo\links.c"><Filter>Source Files</Filter></ClCompile>
|
||||
<ClCompile Include="..\..\..\demos\gtk-demo\listbox.c"><Filter>Source Files</Filter></ClCompile>
|
||||
<ClCompile Include="..\..\..\demos\gtk-demo\list_store.c"><Filter>Source Files</Filter></ClCompile>
|
||||
<ClCompile Include="..\..\..\demos\gtk-demo\main.c"><Filter>Source Files</Filter></ClCompile>
|
||||
<ClCompile Include="..\..\..\demos\gtk-demo\menus.c"><Filter>Source Files</Filter></ClCompile>
|
||||
<ClCompile Include="..\..\..\demos\gtk-demo\offscreen_window.c"><Filter>Source Files</Filter></ClCompile>
|
||||
<ClCompile Include="..\..\..\demos\gtk-demo\offscreen_window2.c"><Filter>Source Files</Filter></ClCompile>
|
||||
<ClCompile Include="..\..\..\demos\gtk-demo\overlay.c"><Filter>Source Files</Filter></ClCompile>
|
||||
<ClCompile Include="..\..\..\demos\gtk-demo\panes.c"><Filter>Source Files</Filter></ClCompile>
|
||||
<ClCompile Include="..\..\..\demos\gtk-demo\pickers.c"><Filter>Source Files</Filter></ClCompile>
|
||||
<ClCompile Include="..\..\..\demos\gtk-demo\pixbufs.c"><Filter>Source Files</Filter></ClCompile>
|
||||
<ClCompile Include="..\..\..\demos\gtk-demo\printing.c"><Filter>Source Files</Filter></ClCompile>
|
||||
<ClCompile Include="..\..\..\demos\gtk-demo\revealer.c"><Filter>Source Files</Filter></ClCompile>
|
||||
<ClCompile Include="..\..\..\demos\gtk-demo\rotated_text.c"><Filter>Source Files</Filter></ClCompile>
|
||||
<ClCompile Include="..\..\..\demos\gtk-demo\search_entry.c"><Filter>Source Files</Filter></ClCompile>
|
||||
<ClCompile Include="..\..\..\demos\gtk-demo\search_entry2.c"><Filter>Source Files</Filter></ClCompile>
|
||||
<ClCompile Include="..\..\..\demos\gtk-demo\sizegroup.c"><Filter>Source Files</Filter></ClCompile>
|
||||
<ClCompile Include="..\..\..\demos\gtk-demo\spinner.c"><Filter>Source Files</Filter></ClCompile>
|
||||
<ClCompile Include="..\..\..\demos\gtk-demo\stack.c"><Filter>Source Files</Filter></ClCompile>
|
||||
<ClCompile Include="..\..\..\demos\gtk-demo\textscroll.c"><Filter>Source Files</Filter></ClCompile>
|
||||
<ClCompile Include="..\..\..\demos\gtk-demo\textview.c"><Filter>Source Files</Filter></ClCompile>
|
||||
<ClCompile Include="..\..\..\demos\gtk-demo\theming_style_classes.c"><Filter>Source Files</Filter></ClCompile>
|
||||
<ClCompile Include="..\..\..\demos\gtk-demo\toolpalette.c"><Filter>Source Files</Filter></ClCompile>
|
||||
<ClCompile Include="..\..\..\demos\gtk-demo\transparent.c"><Filter>Source Files</Filter></ClCompile>
|
||||
<ClCompile Include="..\..\..\demos\gtk-demo\tree_store.c"><Filter>Source Files</Filter></ClCompile>
|
||||
<ClCompile Include="..\..\..\demos\gtk-demo\application.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\demos\gtk-demo\assistant.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\demos\gtk-demo\builder.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\demos\gtk-demo\button_box.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\demos\gtk-demo\changedisplay.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\demos\gtk-demo\clipboard.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\demos\gtk-demo\colorsel.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\demos\gtk-demo\combobox.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\demos\gtk-demo\css_accordion.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\demos\gtk-demo\css_basics.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\demos\gtk-demo\css_multiplebgs.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\demos\gtk-demo\css_pixbufs.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\demos\gtk-demo\css_shadows.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\demos\gtk-demo\demo_resources.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\demos\gtk-demo\dialog.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\demos\gtk-demo\drawingarea.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\demos\gtk-demo\editable_cells.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\demos\gtk-demo\entry_buffer.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\demos\gtk-demo\entry_completion.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\demos\gtk-demo\expander.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\demos\gtk-demo\hypertext.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\demos\gtk-demo\iconview.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\demos\gtk-demo\iconview_edit.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\demos\gtk-demo\images.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\demos\gtk-demo\infobar.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\demos\gtk-demo\links.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\demos\gtk-demo\listbox.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\demos\gtk-demo\list_store.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\demos\gtk-demo\main.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\demos\gtk-demo\menus.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\demos\gtk-demo\offscreen_window.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\demos\gtk-demo\offscreen_window2.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\demos\gtk-demo\overlay.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\demos\gtk-demo\panes.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\demos\gtk-demo\pickers.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\demos\gtk-demo\pixbufs.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\demos\gtk-demo\printing.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\demos\gtk-demo\revealer.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\demos\gtk-demo\rotated_text.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\demos\gtk-demo\search_entry.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\demos\gtk-demo\search_entry2.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\demos\gtk-demo\sizegroup.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\demos\gtk-demo\spinner.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\demos\gtk-demo\stack.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\demos\gtk-demo\textscroll.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\demos\gtk-demo\textview.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\demos\gtk-demo\theming_style_classes.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\demos\gtk-demo\toolpalette.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\demos\gtk-demo\transparent.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\demos\gtk-demo\tree_store.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
</Project>
|
||||
@@ -23,10 +23,6 @@ if exist ..\..\..\MSVC_Release_Broadway del ..\..\..\MSVC_Release_Broadway
|
||||
|
||||
if exist ..\..\..\MSVC_Debug_Broadway del ..\..\..\MSVC_Debug_Broadway
|
||||
|
||||
if exist $(Configuration)\$(Platform)\bin\$(GtkDllPrefix)gdk$(GtkDllSuffix).dll del $(Configuration)\$(Platform)\bin\$(GtkDllPrefix)gdk$(GtkDllSuffix).dll
|
||||
|
||||
if exist $(Configuration)\$(Platform)\bin\gdk-$(ApiVersion).lib del $(Configuration)\$(Platform)\bin\gdk-$(ApiVersion).lib
|
||||
|
||||
if "$(Configuration)" == "Release" del ..\..\..\MSVC_Debug
|
||||
|
||||
if "$(Configuration)" == "Debug" del ..\..\..\MSVC_Release
|
||||
|
||||
@@ -91,49 +91,41 @@
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
<Import Project="gtk-install-headers-data.props" />
|
||||
<Import Project="gtk-install-bin.props" />
|
||||
<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-install-headers-data.props" />
|
||||
<Import Project="gtk-install-bin.props" />
|
||||
<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-install-headers-data.props" />
|
||||
<Import Project="gtk-install-bin.props" />
|
||||
<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-install-headers-data.props" />
|
||||
<Import Project="gtk-install-bin.props" />
|
||||
<Import Project="gtk-build-defines.props" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release_Broadway|Win32'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
<Import Project="gtk-install-headers-data.props" />
|
||||
<Import Project="gtk-install-bin.props" />
|
||||
<Import Project="gtk-build-defines.props" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug_Broadway|Win32'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
<Import Project="gtk-install-headers-data.props" />
|
||||
<Import Project="gtk-install-bin.props" />
|
||||
<Import Project="gtk-build-defines.props" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release_Broadway|x64'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
<Import Project="gtk-install-headers-data.props" />
|
||||
<Import Project="gtk-install-bin.props" />
|
||||
<Import Project="gtk-build-defines.props" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug_Broadway|x64'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
<Import Project="gtk-install-headers-data.props" />
|
||||
<Import Project="gtk-install-bin.props" />
|
||||
<Import Project="gtk-build-defines.props" />
|
||||
</ImportGroup>
|
||||
<PropertyGroup Label="UserMacros" />
|
||||
<PropertyGroup>
|
||||
|
||||
@@ -24,7 +24,6 @@ EXTRA_DIST += \
|
||||
gtk-install-headers-data.vsprops \
|
||||
gtk-version-paths.vsprops \
|
||||
gtkprebuild.vsprops \
|
||||
gtkprebuild-broadway.vsprops \
|
||||
gtk-copy-gdk-broadway.vsprops
|
||||
gtkprebuild-broadway.vsprops
|
||||
|
||||
-include $(top_srcdir)/git.mk
|
||||
|
||||
@@ -53,7 +53,7 @@
|
||||
</Configuration>
|
||||
<Configuration
|
||||
Name="Debug_Broadway|Win32"
|
||||
InheritedPropertySheets=".\gtk-build-defines.vsprops;.\gtk-copy-gdk-broadway.vsprops"
|
||||
InheritedPropertySheets=".\gtk-build-defines.vsprops"
|
||||
ConfigurationType="2"
|
||||
CharacterSet="2"
|
||||
>
|
||||
@@ -117,7 +117,7 @@
|
||||
</Configuration>
|
||||
<Configuration
|
||||
Name="Release_Broadway|Win32"
|
||||
InheritedPropertySheets=".\gtk-build-defines.vsprops;.\gtk-copy-gdk-broadway.vsprops"
|
||||
InheritedPropertySheets=".\gtk-build-defines.vsprops"
|
||||
ConfigurationType="2"
|
||||
CharacterSet="2"
|
||||
WholeProgramOptimization="1"
|
||||
@@ -181,7 +181,7 @@
|
||||
</Configuration>
|
||||
<Configuration
|
||||
Name="Debug_Broadway|x64"
|
||||
InheritedPropertySheets=".\gtk-build-defines.vsprops;.\gtk-copy-gdk-broadway.vsprops"
|
||||
InheritedPropertySheets=".\gtk-build-defines.vsprops"
|
||||
ConfigurationType="2"
|
||||
CharacterSet="2"
|
||||
>
|
||||
|
||||
@@ -1,30 +0,0 @@
|
||||
<?xml version="1.0" encoding="Windows-1252"?>
|
||||
<VisualStudioPropertySheet
|
||||
ProjectType="Visual C++"
|
||||
Version="8.00"
|
||||
Name="gtkcopygdkbroadwayprops"
|
||||
>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"
|
||||
CommandLine="
|
||||
if "$(ConfigurationName)" == "Release" goto END

|
||||
if "$(ConfigurationName)" == "Debug" goto END

|
||||
if "$(ConfigurationName)" == "Release_Broadway" goto DoRelease

|
||||
if "$(ConfigurationName)" == "Debug_Broadway" goto DoDebug

|
||||
|
||||
:DoRelease

|
||||
mkdir .\Release\$(PlatformName)\bin

|
||||
copy /b $(ConfigurationName)\$(PlatformName)\bin\$(GtkDllPrefix)gdk$(GtkDllSuffix).dll .\Release\$(PlatformName)\bin\

|
||||
copy /b $(ConfigurationName)\$(PlatformName)\bin\gdk-$(ApiVersion).lib .\Release\$(PlatformName)\bin\

|
||||
goto END

|
||||
|
||||
:DoDebug

|
||||
mkdir .\Debug\$(PlatformName)\bin

|
||||
copy /b $(ConfigurationName)\$(PlatformName)\bin\$(GtkDllPrefix)gdk$(GtkDllSuffix).dll .\Debug\$(PlatformName)\bin\

|
||||
copy /b $(ConfigurationName)\$(PlatformName)\bin\gdk-$(ApiVersion).lib .\Debug\$(PlatformName)\bin\

|
||||
goto END

|
||||
|
||||
:END

|
||||
"
|
||||
/>
|
||||
</VisualStudioPropertySheet>
|
||||
@@ -3,7 +3,7 @@
|
||||
ProjectType="Visual C++"
|
||||
Version="8.00"
|
||||
Name="gtkinstallbinprops"
|
||||
InheritedPropertySheets=".\gtk-version-paths.vsprops;.\gtk-build-defines.vsprops"
|
||||
InheritedPropertySheets=".\gtk-version-paths.vsprops"
|
||||
>
|
||||
<UserMacro
|
||||
Name="DoGenGir"
|
||||
|
||||
@@ -20,18 +20,18 @@ copy $(ConfigurationName)\$(PlatformName)\bin\*.exe $(CopyDir)\bin

|
||||
goto DONE_BIN

|
||||
|
||||
:DO_BROADWAY_BIN

|
||||
copy $(ConfigurationName)\$(PlatformName)\bin\$(GtkDllPrefix)gdk$(GtkDllSuffix).dll $(CopyDir)\bin

|
||||
copy $(ConfigurationName)\$(PlatformName)\bin\gdk-3-vs*.dll $(CopyDir)\bin

|
||||
copy $(ConfigurationName)\$(PlatformName)\bin\gdk-$(ApiVersion).lib $(CopyDir)\lib

|
||||
copy $(ConfigurationName)\$(PlatformName)\bin\broadwayd.exe $(CopyDir)\bin

|
||||
|
||||
if "$(ConfigurationName)" == "Release_Broadway" copy .\Release\$(PlatformName)\bin\$(GtkDllPrefix)gtk$(GtkDllSuffix).dll $(CopyDir)\bin

|
||||
if "$(ConfigurationName)" == "Release_Broadway" copy .\Release\$(PlatformName)\bin\$(GtkDllPrefix)gailutil$(GtkDllSuffix).dll $(CopyDir)\bin

|
||||
if "$(ConfigurationName)" == "Release_Broadway" copy .\Release\$(PlatformName)\bin\gtk-$(ApiVersion).lib $(CopyDir)\lib

|
||||
if "$(ConfigurationName)" == "Release_Broadway" copy .\Release\$(PlatformName)\bin\gailutil-$(ApiVersion).lib $(CopyDir)\lib

|
||||
if "$(ConfigurationName)" == "Release_Broadway" copy .\Release\$(PlatformName)\bin\gtk-3-*.dll $(CopyDir)\bin

|
||||
if "$(ConfigurationName)" == "Release_Broadway" copy .\Release\$(PlatformName)\bin\gailutil-3-*.dll $(CopyDir)\bin

|
||||
if "$(ConfigurationName)" == "Release_Broadway" copy .\Release\$(PlatformName)\bin\gtk*-$(ApiVersion).lib $(CopyDir)\lib

|
||||
if "$(ConfigurationName)" == "Release_Broadway" copy .\Release\$(PlatformName)\bin\gailutil*-$(ApiVersion).lib $(CopyDir)\lib

|
||||
if "$(ConfigurationName)" == "Release_Broadway" copy .\Release\$(PlatformName)\bin\*.exe $(CopyDir)\bin

|
||||
|
||||
if "$(ConfigurationName)" == "Debug_Broadway" copy .\Debug\$(PlatformName)\bin\$(GtkDllPrefix)gtk$(GtkDllSuffix).dll $(CopyDir)\bin

|
||||
if "$(ConfigurationName)" == "Debug_Broadway" copy .\Debug\$(PlatformName)\bin\$(GtkDllPrefix)gailutil$(GtkDllSuffix).dll $(CopyDir)\bin

|
||||
if "$(ConfigurationName)" == "Debug_Broadway" copy .\Debug\$(PlatformName)\bin\gtk-3-.dll $(CopyDir)\bin

|
||||
if "$(ConfigurationName)" == "Debug_Broadway" copy .\Debug\$(PlatformName)\bin\gailutil-3-.dll $(CopyDir)\bin

|
||||
if "$(ConfigurationName)" == "Debug_Broadway" copy .\Debug\$(PlatformName)\bin\gtk-$(ApiVersion).lib $(CopyDir)\lib

|
||||
if "$(ConfigurationName)" == "Debug_Broadway" copy .\Debug\$(PlatformName)\bin\gailutil-$(ApiVersion).lib $(CopyDir)\lib

|
||||
if "$(ConfigurationName)" == "Debug_Broadway" copy .\Debug\$(PlatformName)\bin\*.exe $(CopyDir)\bin

|
||||
|
||||
@@ -50,7 +50,6 @@ copy ..\..\..\gdk\win32\gdkwin32display.h $(CopyDir)\include\gtk-$(ApiVersion)\g
|
||||
copy ..\..\..\gdk\win32\gdkwin32displaymanager.h $(CopyDir)\include\gtk-$(ApiVersion)\gdk\win32

|
||||
copy ..\..\..\gdk\win32\gdkwin32dnd.h $(CopyDir)\include\gtk-$(ApiVersion)\gdk\win32

|
||||
copy ..\..\..\gdk\win32\gdkwin32keys.h $(CopyDir)\include\gtk-$(ApiVersion)\gdk\win32

|
||||
copy ..\..\..\gdk\win32\gdkwin32misc.h $(CopyDir)\include\gtk-$(ApiVersion)\gdk\win32

|
||||
copy ..\..\..\gdk\win32\gdkwin32screen.h $(CopyDir)\include\gtk-$(ApiVersion)\gdk\win32

|
||||
copy ..\..\..\gdk\win32\gdkwin32window.h $(CopyDir)\include\gtk-$(ApiVersion)\gdk\win32

|
||||
|
||||
@@ -131,7 +130,6 @@ copy ..\..\..\gtk\gtkfilechooserdialog.h $(CopyDir)\include\gtk-$(ApiVersion)\gt
|
||||
copy ..\..\..\gtk\gtkfilechooserwidget.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk

|
||||
copy ..\..\..\gtk\gtkfilefilter.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk

|
||||
copy ..\..\..\gtk\gtkfixed.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk

|
||||
copy ..\..\..\gtk\gtkflowbox.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk

|
||||
copy ..\..\..\gtk\gtkfontbutton.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk

|
||||
copy ..\..\..\gtk\gtkfontchooser.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk

|
||||
copy ..\..\..\gtk\gtkfontchooserdialog.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk

|
||||
@@ -310,8 +308,6 @@ copy ..\..\..\gtk\a11y\gtkcontaineraccessible.h $(CopyDir)\include\gtk-$(ApiVers
|
||||
copy ..\..\..\gtk\a11y\gtkcontainercellaccessible.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk\a11y

|
||||
copy ..\..\..\gtk\a11y\gtkentryaccessible.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk\a11y

|
||||
copy ..\..\..\gtk\a11y\gtkexpanderaccessible.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk\a11y

|
||||
copy ..\..\..\gtk\a11y\gtkflowboxaccessible.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk\a11y

|
||||
copy ..\..\..\gtk\a11y\gtkflowboxchildaccessible.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk\a11y

|
||||
copy ..\..\..\gtk\a11y\gtkframeaccessible.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk\a11y

|
||||
copy ..\..\..\gtk\a11y\gtkiconviewaccessible.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk\a11y

|
||||
copy ..\..\..\gtk\a11y\gtkimageaccessible.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk\a11y

|
||||
@@ -320,7 +316,6 @@ copy ..\..\..\gtk\a11y\gtklabelaccessible.h $(CopyDir)\include\gtk-$(ApiVersion)
|
||||
copy ..\..\..\gtk\a11y\gtklevelbaraccessible.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk\a11y

|
||||
copy ..\..\..\gtk\a11y\gtklinkbuttonaccessible.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk\a11y

|
||||
copy ..\..\..\gtk\a11y\gtklistboxaccessible.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk\a11y

|
||||
copy ..\..\..\gtk\a11y\gtklistboxrowaccessible.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk\a11y

|
||||
copy ..\..\..\gtk\a11y\gtklockbuttonaccessible.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk\a11y

|
||||
copy ..\..\..\gtk\a11y\gtkmenuaccessible.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk\a11y

|
||||
copy ..\..\..\gtk\a11y\gtkmenuitemaccessible.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk\a11y

|
||||
|
||||
@@ -52,7 +52,7 @@
|
||||
InheritedPropertySheets=".\gtk-build-defines.vsprops"
|
||||
ConfigurationType="1"
|
||||
CharacterSet="2"
|
||||
WholeProgramOptimization="1"
|
||||
WholeProgramOptimization="0"
|
||||
>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"
|
||||
@@ -73,7 +73,7 @@
|
||||
LinkIncremental="1"
|
||||
GenerateDebugInformation="true"
|
||||
SubSystem="1"
|
||||
OptimizeReferences="1"
|
||||
OptimizeReferences="2"
|
||||
EnableCOMDATFolding="2"
|
||||
TargetMachine="1"
|
||||
/>
|
||||
@@ -112,7 +112,7 @@
|
||||
InheritedPropertySheets=".\gtk-build-defines.vsprops"
|
||||
ConfigurationType="1"
|
||||
CharacterSet="2"
|
||||
WholeProgramOptimization="1"
|
||||
WholeProgramOptimization="0"
|
||||
>
|
||||
<Tool
|
||||
Name="VCMIDLTool"
|
||||
@@ -134,7 +134,7 @@
|
||||
LinkIncremental="1"
|
||||
GenerateDebugInformation="true"
|
||||
SubSystem="1"
|
||||
OptimizeReferences="1"
|
||||
OptimizeReferences="2"
|
||||
EnableCOMDATFolding="2"
|
||||
TargetMachine="17"
|
||||
/>
|
||||
|
||||
@@ -90,7 +90,7 @@
|
||||
ConfigurationType="1"
|
||||
InheritedPropertySheets=".\gtk-build-defines.vsprops"
|
||||
CharacterSet="2"
|
||||
WholeProgramOptimization="1"
|
||||
WholeProgramOptimization="0"
|
||||
>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"
|
||||
@@ -111,7 +111,7 @@
|
||||
LinkIncremental="1"
|
||||
GenerateDebugInformation="true"
|
||||
SubSystem="1"
|
||||
OptimizeReferences="1"
|
||||
OptimizeReferences="2"
|
||||
EnableCOMDATFolding="2"
|
||||
RandomizedBaseAddress="1"
|
||||
DataExecutionPrevention="0"
|
||||
@@ -123,7 +123,7 @@
|
||||
ConfigurationType="1"
|
||||
InheritedPropertySheets=".\gtk-build-defines.vsprops"
|
||||
CharacterSet="2"
|
||||
WholeProgramOptimization="1"
|
||||
WholeProgramOptimization="0"
|
||||
>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"
|
||||
@@ -144,7 +144,7 @@
|
||||
LinkIncremental="1"
|
||||
GenerateDebugInformation="true"
|
||||
SubSystem="1"
|
||||
OptimizeReferences="1"
|
||||
OptimizeReferences="2"
|
||||
EnableCOMDATFolding="2"
|
||||
RandomizedBaseAddress="1"
|
||||
DataExecutionPrevention="0"
|
||||
@@ -180,7 +180,6 @@
|
||||
<File RelativePath="..\..\..\demos\gtk-demo\entry_buffer.c" />
|
||||
<File RelativePath="..\..\..\demos\gtk-demo\entry_completion.c" />
|
||||
<File RelativePath="..\..\..\demos\gtk-demo\expander.c" />
|
||||
<File RelativePath="..\..\..\demos\gtk-demo\flowbox.c" />
|
||||
<File RelativePath="..\..\..\demos\gtk-demo\hypertext.c" />
|
||||
<File RelativePath="..\..\..\demos\gtk-demo\iconview.c" />
|
||||
<File RelativePath="..\..\..\demos\gtk-demo\iconview_edit.c" />
|
||||
|
||||
@@ -16,8 +16,6 @@ if exist ..\..\..\gdk\gdkconfig.h del ..\..\..\gdk\gdkconfig.h

|
||||
if exist ..\..\..\GDK_BROADWAY_BUILD del ..\..\..\GDK_BROADWAY_BUILD

|
||||
if exist ..\..\..\MSVC_Release_Broadway del ..\..\..\MSVC_Release_Broadway

|
||||
if exist ..\..\..\MSVC_Debug_Broadway del ..\..\..\MSVC_Debug_Broadway

|
||||
if exist $(ConfigurationName)\$(PlatformName)\bin\$(GtkDllPrefix)gdk$(GtkDllSuffix).dll del $(ConfigurationName)\$(PlatformName)\bin\$(GtkDllPrefix)gdk$(GtkDllSuffix).dll

|
||||
if exist $(ConfigurationName)\$(PlatformName)\bin\gdk-$(ApiVersion).lib del $(ConfigurationName)\$(PlatformName)\bin\gdk-$(ApiVersion).lib

|
||||
if "$(ConfigurationName)" == "Release" del ..\..\..\MSVC_Debug

|
||||
if "$(ConfigurationName)" == "Debug" del ..\..\..\MSVC_Release

|
||||
copy ..\..\..\gdk\gdkconfig.h.win32 ..\..\..\gdk\gdkconfig.h

|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
Name="Debug|Win32"
|
||||
OutputDirectory="$(GlibEtcInstallRoot)"
|
||||
ConfigurationType="10"
|
||||
InheritedPropertySheets=".\gtk-install-headers-data.vsprops;.\gtk-install-bin.vsprops;.\gtk-build-defines.vsprops"
|
||||
InheritedPropertySheets=".\gtk-install-headers-data.vsprops;.\gtk-install-bin.vsprops"
|
||||
CharacterSet="2"
|
||||
DeleteExtensionsOnClean=""
|
||||
>
|
||||
@@ -31,12 +31,21 @@
|
||||
Name="VCPreBuildEventTool"
|
||||
CommandLine="$(GtkDoInstallBin)$(GtkDoInstall)"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"
|
||||
/>
|
||||
</Configuration>
|
||||
<Configuration
|
||||
Name="Debug|x64"
|
||||
OutputDirectory="$(GlibEtcInstallRoot)"
|
||||
ConfigurationType="10"
|
||||
InheritedPropertySheets=".\gtk-install-headers-data.vsprops;.\gtk-install-bin.vsprops;.\gtk-build-defines.vsprops"
|
||||
InheritedPropertySheets=".\gtk-install-headers-data.vsprops;.\gtk-install-bin.vsprops"
|
||||
CharacterSet="2"
|
||||
DeleteExtensionsOnClean=""
|
||||
>
|
||||
@@ -44,13 +53,22 @@
|
||||
Name="VCPreBuildEventTool"
|
||||
CommandLine="$(GtkDoInstallBin)$(GtkDoInstall)"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"
|
||||
/>
|
||||
</Configuration>
|
||||
<Configuration
|
||||
Name="Debug_Broadway|Win32"
|
||||
OutputDirectory="$(GlibEtcInstallRoot)"
|
||||
IntermediateDirectory="$(ConfigurationName)"
|
||||
ConfigurationType="10"
|
||||
InheritedPropertySheets=".\gtk-install-headers-data.vsprops;.\gtk-install-bin.vsprops;.\gtk-build-defines.vsprops"
|
||||
InheritedPropertySheets=".\gtk-install-headers-data.vsprops;.\gtk-install-bin.vsprops"
|
||||
CharacterSet="2"
|
||||
DeleteExtensionsOnClean=""
|
||||
>
|
||||
@@ -58,12 +76,21 @@
|
||||
Name="VCPreBuildEventTool"
|
||||
CommandLine="$(GtkDoInstallBin)$(GtkDoInstall)$(GtkDoInstallBroadwayHeaders)"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"
|
||||
/>
|
||||
</Configuration>
|
||||
<Configuration
|
||||
Name="Debug_Broadway|x64"
|
||||
OutputDirectory="$(GlibEtcInstallRoot)"
|
||||
ConfigurationType="10"
|
||||
InheritedPropertySheets=".\gtk-install-headers-data.vsprops;.\gtk-install-bin.vsprops;.\gtk-build-defines.vsprops"
|
||||
InheritedPropertySheets=".\gtk-install-headers-data.vsprops;.\gtk-install-bin.vsprops"
|
||||
CharacterSet="2"
|
||||
DeleteExtensionsOnClean=""
|
||||
>
|
||||
@@ -71,13 +98,22 @@
|
||||
Name="VCPreBuildEventTool"
|
||||
CommandLine="$(GtkDoInstallBin)$(GtkDoInstall)$(GtkDoInstallBroadwayHeaders)"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"
|
||||
/>
|
||||
</Configuration>
|
||||
<Configuration
|
||||
Name="Release|Win32"
|
||||
OutputDirectory="$(GlibEtcInstallRoot)"
|
||||
IntermediateDirectory="$(ConfigurationName)"
|
||||
ConfigurationType="10"
|
||||
InheritedPropertySheets=".\gtk-install-headers-data.vsprops;.\gtk-install-bin.vsprops;.\gtk-build-defines.vsprops"
|
||||
InheritedPropertySheets=".\gtk-install-headers-data.vsprops;.\gtk-install-bin.vsprops"
|
||||
CharacterSet="2"
|
||||
DeleteExtensionsOnClean=""
|
||||
WholeProgramOptimization="1"
|
||||
@@ -86,12 +122,21 @@
|
||||
Name="VCPreBuildEventTool"
|
||||
CommandLine="$(GtkDoInstallBin)$(GtkDoInstall)"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"
|
||||
/>
|
||||
</Configuration>
|
||||
<Configuration
|
||||
Name="Release|x64"
|
||||
OutputDirectory="$(GlibEtcInstallRoot)"
|
||||
ConfigurationType="10"
|
||||
InheritedPropertySheets=".\gtk-install-headers-data.vsprops;.\gtk-install-bin.vsprops;.\gtk-build-defines.vsprops"
|
||||
InheritedPropertySheets=".\gtk-install-headers-data.vsprops;.\gtk-install-bin.vsprops"
|
||||
CharacterSet="2"
|
||||
DeleteExtensionsOnClean=""
|
||||
WholeProgramOptimization="1"
|
||||
@@ -100,13 +145,22 @@
|
||||
Name="VCPreBuildEventTool"
|
||||
CommandLine="$(GtkDoInstallBin)$(GtkDoInstall)"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"
|
||||
/>
|
||||
</Configuration>
|
||||
<Configuration
|
||||
Name="Release_Broadway|Win32"
|
||||
OutputDirectory="$(GlibEtcInstallRoot)"
|
||||
IntermediateDirectory="$(ConfigurationName)"
|
||||
ConfigurationType="10"
|
||||
InheritedPropertySheets=".\gtk-install-headers-data.vsprops;.\gtk-install-bin.vsprops;.\gtk-build-defines.vsprops"
|
||||
InheritedPropertySheets=".\gtk-install-headers-data.vsprops;.\gtk-install-bin.vsprops"
|
||||
CharacterSet="2"
|
||||
DeleteExtensionsOnClean=""
|
||||
WholeProgramOptimization="1"
|
||||
@@ -115,12 +169,21 @@
|
||||
Name="VCPreBuildEventTool"
|
||||
CommandLine="$(GtkDoInstallBin)$(GtkDoInstall)$(GtkDoInstallBroadwayHeaders)"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"
|
||||
/>
|
||||
</Configuration>
|
||||
<Configuration
|
||||
Name="Release_Broadway|x64"
|
||||
OutputDirectory="$(GlibEtcInstallRoot)"
|
||||
ConfigurationType="10"
|
||||
InheritedPropertySheets=".\gtk-install-headers-data.vsprops;.\gtk-install-bin.vsprops;.\gtk-build-defines.vsprops"
|
||||
InheritedPropertySheets=".\gtk-install-headers-data.vsprops;.\gtk-install-bin.vsprops"
|
||||
CharacterSet="2"
|
||||
DeleteExtensionsOnClean=""
|
||||
WholeProgramOptimization="1"
|
||||
@@ -129,6 +192,15 @@
|
||||
Name="VCPreBuildEventTool"
|
||||
CommandLine="$(GtkDoInstallBin)$(GtkDoInstall)$(GtkDoInstallBroadwayHeaders)"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"
|
||||
/>
|
||||
</Configuration>
|
||||
</Configurations>
|
||||
<References>
|
||||
|
||||
@@ -23,9 +23,6 @@
|
||||
/* Define to 1 if you have the `bind_textdomain_codeset' function. */
|
||||
#define HAVE_BIND_TEXTDOMAIN_CODESET 1
|
||||
|
||||
/* Define to 1 if you have the `cairo_surface_set_device_scale' function. */
|
||||
/* #undef HAVE_CAIRO_SURFACE_SET_DEVICE_SCALE */
|
||||
|
||||
/* define if we have colord */
|
||||
/* #undef HAVE_COLORD */
|
||||
|
||||
@@ -171,9 +168,6 @@
|
||||
/* Define to 1 if you have the <string.h> header file. */
|
||||
#define HAVE_STRING_H 1
|
||||
|
||||
/* Define to 1 if you have the <sys/mman.h> header file. */
|
||||
/* #undef HAVE_SYS_MMAN_H */
|
||||
|
||||
/* Define to 1 if you have the <sys/param.h> header file. */
|
||||
/* #undef HAVE_SYS_PARAM_H */
|
||||
|
||||
@@ -296,20 +290,11 @@
|
||||
/* Define to 1 if the X Window System is missing or not being used. */
|
||||
/* #undef X_DISPLAY_MISSING */
|
||||
|
||||
/* Enable large inode numbers on Mac OS X 10.5. */
|
||||
#ifndef _DARWIN_USE_64_BIT_INODE
|
||||
/* # define _DARWIN_USE_64_BIT_INODE 1 */
|
||||
#endif
|
||||
|
||||
/* Number of bits in a file offset, on hosts where this is settable. */
|
||||
/* #undef _FILE_OFFSET_BITS */
|
||||
|
||||
/* defines how to decorate public symbols while building */
|
||||
#ifdef _MSC_VER
|
||||
#define _GDK_EXTERN __declspec (dllexport) extern
|
||||
#else
|
||||
#define _GDK_EXTERN __attribute__((visibility("default"))) __declspec (dllexport) extern
|
||||
#endif
|
||||
#define _GDK_EXTERN __declspec (dllexport)
|
||||
|
||||
/* Define for large files, on AIX-style hosts. */
|
||||
/* #undef _LARGE_FILES */
|
||||
|
||||
@@ -9,8 +9,8 @@
|
||||
# set GTK_BINARY_AGE and GTK_INTERFACE_AGE to 0.
|
||||
|
||||
m4_define([gtk_major_version], [3])
|
||||
m4_define([gtk_minor_version], [11])
|
||||
m4_define([gtk_micro_version], [2])
|
||||
m4_define([gtk_minor_version], [9])
|
||||
m4_define([gtk_micro_version], [11])
|
||||
m4_define([gtk_interface_age], [0])
|
||||
m4_define([gtk_binary_age],
|
||||
[m4_eval(100 * gtk_minor_version + gtk_micro_version)])
|
||||
@@ -41,7 +41,7 @@ AC_CANONICAL_HOST
|
||||
m4_define([gtk_binary_version], [3.0.0])
|
||||
|
||||
# required versions of other packages
|
||||
m4_define([glib_required_version], [2.39.0])
|
||||
m4_define([glib_required_version], [2.37.3])
|
||||
m4_define([pango_required_version], [1.32.4])
|
||||
m4_define([atk_required_version], [2.7.5])
|
||||
m4_define([cairo_required_version], [1.12.0])
|
||||
@@ -314,7 +314,6 @@ if test -z "$backend_set"; then
|
||||
enable_win32_backend=yes
|
||||
else
|
||||
enable_x11_backend=yes
|
||||
enable_wayland_backend=maybe
|
||||
fi
|
||||
fi
|
||||
|
||||
@@ -332,7 +331,6 @@ GDK_EXTRA_CFLAGS=
|
||||
GDK_WINDOWING=
|
||||
PANGO_PACKAGES="pango pangocairo"
|
||||
|
||||
ENABLE_ON_X11='%'
|
||||
if test "$enable_x11_backend" = "yes"; then
|
||||
# GDK calls the xlib backend "x11," cairo calls it "xlib." Other
|
||||
# backend names are identical.
|
||||
@@ -344,9 +342,7 @@ if test "$enable_x11_backend" = "yes"; then
|
||||
backend_immodules="$backend_immodules,xim"
|
||||
GDK_WINDOWING="$GDK_WINDOWING
|
||||
#define GDK_WINDOWING_X11"
|
||||
ENABLE_ON_X11=''
|
||||
fi
|
||||
AC_SUBST(ENABLE_ON_X11)
|
||||
|
||||
if test "$enable_win32_backend" = "yes"; then
|
||||
cairo_backends="$cairo_backends cairo-win32"
|
||||
@@ -386,8 +382,7 @@ AC_SUBST(DISABLE_ON_QUARTZ)
|
||||
if test "x$enable_broadway_backend" = xyes; then
|
||||
GDK_BACKENDS="$GDK_BACKENDS broadway"
|
||||
cairo_backends="$cairo_backends cairo"
|
||||
backend_immodules="$backend_immodules,broadway"
|
||||
if test "$host_os" != "mingw*|windows*|winnt"; then
|
||||
if test "$os_unix" = "yes"; then
|
||||
have_gio_unix=yes
|
||||
fi
|
||||
GDK_WINDOWING="$GDK_WINDOWING
|
||||
@@ -398,38 +393,21 @@ else
|
||||
AM_CONDITIONAL(USE_BROADWAY, false)
|
||||
fi
|
||||
|
||||
PKG_PROG_PKG_CONFIG
|
||||
|
||||
WAYLAND_DEPENDENCIES="wayland-client >= 1.2.0 xkbcommon >= 0.2.0 wayland-cursor"
|
||||
if test "$enable_wayland_backend" = "maybe" ; then
|
||||
AC_PATH_PROG([WAYLAND_SCANNER],[wayland-scanner],[no])
|
||||
PKG_CHECK_EXISTS($WAYLAND_DEPENDENCIES, [have_wayland_deps=yes], [have_wayland_deps=no])
|
||||
AC_MSG_CHECKING([for WAYLAND_DEPENDENCIES])
|
||||
if test "$WAYLAND_SCANNER" = "no" -o "$have_wayland_deps" = "no" ; then
|
||||
enable_wayland_backend=no
|
||||
else
|
||||
enable_wayland_backend=yes
|
||||
fi
|
||||
AC_MSG_RESULT($enable_wayland_backend)
|
||||
fi
|
||||
|
||||
if test "$enable_wayland_backend" = "yes"; then
|
||||
DISABLE_ON_WAYLAND=''
|
||||
if test "x$enable_wayland_backend" = "xyes"; then
|
||||
# For the cairo image backend
|
||||
cairo_backends="$cairo_backends cairo"
|
||||
GDK_BACKENDS="$GDK_BACKENDS wayland"
|
||||
have_gio_unix=yes
|
||||
GDK_WINDOWING="$GDK_WINDOWING
|
||||
#define GDK_WINDOWING_WAYLAND"
|
||||
WAYLAND_PACKAGES="$WAYLAND_DEPENDENCIES"
|
||||
AC_PATH_PROG([WAYLAND_SCANNER],[wayland-scanner],[no])
|
||||
AS_IF([test "x$WAYLAND_SCANNER" = "xno"],
|
||||
AC_MSG_ERROR([Could not find wayland-scanner in your PATH, required for parsing wayland extension protocols]))
|
||||
AC_SUBST([WAYLAND_SCANNER])
|
||||
|
||||
DISABLE_ON_WAYLAND='%'
|
||||
WAYLAND_PACKAGES="wayland-client >= 1.1.90 xkbcommon >= 0.2.0 wayland-cursor"
|
||||
AM_CONDITIONAL(USE_WAYLAND, true)
|
||||
else
|
||||
AM_CONDITIONAL(USE_WAYLAND, false)
|
||||
fi
|
||||
AC_SUBST(DISABLE_ON_WAYLAND)
|
||||
|
||||
# strip leading space
|
||||
GDK_BACKENDS=${GDK_BACKENDS#* }
|
||||
@@ -542,7 +520,7 @@ AC_ARG_ENABLE(explicit-deps,
|
||||
[use explicit dependencies in .pc files [default=auto]])],,
|
||||
[enable_explicit_deps=auto])
|
||||
|
||||
AC_MSG_CHECKING([whether to write dependencies into .pc files])
|
||||
AC_MSG_CHECKING([Whether to write dependencies into .pc files])
|
||||
case $enable_explicit_deps in
|
||||
auto)
|
||||
export SED
|
||||
@@ -889,7 +867,6 @@ AM_CONDITIONAL(INCLUDE_IM_INUKTITUT, [test x"$INCLUDE_inuktitut" = xyes])
|
||||
AM_CONDITIONAL(INCLUDE_IM_IPA, [test x"$INCLUDE_ipa" = xyes])
|
||||
AM_CONDITIONAL(INCLUDE_IM_MULTIPRESS, [test x"$INCLUDE_multipress" = xyes])
|
||||
AM_CONDITIONAL(INCLUDE_IM_QUARTZ, [test x"$INCLUDE_quartz" = xyes])
|
||||
AM_CONDITIONAL(INCLUDE_IM_BROADWAY, [test x"$INCLUDE_broadway" = xyes])
|
||||
AM_CONDITIONAL(INCLUDE_IM_THAI, [test x"$INCLUDE_thai" = xyes])
|
||||
AM_CONDITIONAL(INCLUDE_IM_TI_ER, [test x"$INCLUDE_ti_er" = xyes])
|
||||
AM_CONDITIONAL(INCLUDE_IM_TI_ET, [test x"$INCLUDE_ti_et" = xyes])
|
||||
@@ -1100,6 +1077,7 @@ if test "x$enable_x11_backend" = xyes; then
|
||||
case "$host" in
|
||||
*-*-solaris*)
|
||||
# Check for solaris
|
||||
AC_MSG_CHECKING(for Xinerama support on Solaris)
|
||||
|
||||
have_solaris_xinerama=false
|
||||
AC_CHECK_FUNC(XineramaGetInfo,
|
||||
@@ -1107,8 +1085,6 @@ if test "x$enable_x11_backend" = xyes; then
|
||||
[have_solaris_xinerama=true], :,
|
||||
[#include <X11/Xlib.h>])])
|
||||
|
||||
AC_MSG_CHECKING(for Xinerama support on Solaris)
|
||||
|
||||
if $have_solaris_xinerama ; then
|
||||
X_EXTENSIONS="$X_EXTENSIONS Xinerama"
|
||||
AC_DEFINE(HAVE_SOLARIS_XINERAMA, 1,
|
||||
@@ -1829,7 +1805,6 @@ examples/application6/Makefile
|
||||
examples/application7/Makefile
|
||||
examples/application8/Makefile
|
||||
examples/application9/Makefile
|
||||
examples/application10/Makefile
|
||||
tests/Makefile
|
||||
tests/visuals/Makefile
|
||||
testsuite/Makefile
|
||||
|
||||
@@ -30,7 +30,6 @@ demos = \
|
||||
infobar.c \
|
||||
links.c \
|
||||
listbox.c \
|
||||
flowbox.c \
|
||||
list_store.c \
|
||||
menus.c \
|
||||
offscreen_window.c \
|
||||
@@ -73,9 +72,6 @@ LDADDS = \
|
||||
|
||||
bin_PROGRAMS = gtk3-demo gtk3-demo-application
|
||||
|
||||
desktopdir = $(datadir)/applications
|
||||
dist_desktop_DATA = gtk3-demo.desktop
|
||||
|
||||
BUILT_SOURCES = demos.h demo_resources.c
|
||||
|
||||
EXTRA_DIST += \
|
||||
@@ -134,6 +130,9 @@ RESOURCES= $(demos) \
|
||||
gnome-gmush.png \
|
||||
gnome-gsame.png \
|
||||
gnu-keys.png \
|
||||
gtk-logo-24.png \
|
||||
gtk-logo-48.png \
|
||||
gtk-logo-old.png \
|
||||
messages.txt \
|
||||
css_accordion.css \
|
||||
css_basics.css \
|
||||
@@ -143,35 +142,6 @@ RESOURCES= $(demos) \
|
||||
cssview.css \
|
||||
reset.css
|
||||
|
||||
iconthemedir = $(datadir)/icons/hicolor
|
||||
|
||||
appsicon16dir = $(iconthemedir)/16x16/apps
|
||||
appsicon22dir = $(iconthemedir)/22x22/apps
|
||||
appsicon24dir = $(iconthemedir)/24x24/apps
|
||||
appsicon32dir = $(iconthemedir)/32x32/apps
|
||||
appsicon48dir = $(iconthemedir)/48x48/apps
|
||||
appsicon256dir = $(iconthemedir)/256x256/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
|
||||
|
||||
update_icon_cache = gtk-update-icon-cache --ignore-theme-index --force
|
||||
|
||||
install-data-hook: install-update-icon-cache
|
||||
uninstall-hook: uninstall-update-icon-cache
|
||||
|
||||
install-update-icon-cache:
|
||||
$(AM_V_at)$(POST_INSTALL)
|
||||
test -n "$(DESTDIR)" || $(update_icon_cache) "$(iconthemedir)"
|
||||
|
||||
uninstall-update-icon-cache:
|
||||
$(AM_V_at)$(POST_UNINSTALL)
|
||||
test -n "$(DESTDIR)" || $(update_icon_cache) "$(iconthemedir)"
|
||||
|
||||
DISTCLEANFILES = demos.h
|
||||
|
||||
-include $(top_srcdir)/git.mk
|
||||
|
||||
@@ -95,6 +95,7 @@ activate_about (GSimpleAction *action,
|
||||
gpointer user_data)
|
||||
{
|
||||
GtkWidget *window = user_data;
|
||||
GdkPixbuf *pixbuf;
|
||||
|
||||
const gchar *authors[] = {
|
||||
"Peter Mattis",
|
||||
@@ -112,6 +113,8 @@ activate_about (GSimpleAction *action,
|
||||
NULL
|
||||
};
|
||||
|
||||
pixbuf = gdk_pixbuf_new_from_resource ("/application/gtk-logo-48.png", NULL);
|
||||
|
||||
gtk_show_about_dialog (GTK_WINDOW (window),
|
||||
"program-name", "GTK+ Code Demos",
|
||||
"version", g_strdup_printf ("%s,\nRunning against GTK+ %d.%d.%d",
|
||||
@@ -119,15 +122,16 @@ activate_about (GSimpleAction *action,
|
||||
gtk_get_major_version (),
|
||||
gtk_get_minor_version (),
|
||||
gtk_get_micro_version ()),
|
||||
"copyright", "(C) 1997-2013 The GTK+ Team",
|
||||
"copyright", "(C) 1997-2009 The GTK+ Team",
|
||||
"license-type", GTK_LICENSE_LGPL_2_1,
|
||||
"website", "http://www.gtk.org",
|
||||
"comments", "Program to demonstrate GTK+ functions.",
|
||||
"authors", authors,
|
||||
"documenters", documentors,
|
||||
"logo-icon-name", "gtk3-demo",
|
||||
"logo", pixbuf,
|
||||
"title", "About GTK+ Code Demos",
|
||||
NULL);
|
||||
g_object_unref (pixbuf);
|
||||
}
|
||||
|
||||
static void
|
||||
|
||||
|
Before Width: | Height: | Size: 874 B |
|
Before Width: | Height: | Size: 1.3 KiB |
|
Before Width: | Height: | Size: 1.3 KiB |
|
Before Width: | Height: | Size: 18 KiB |
|
Before Width: | Height: | Size: 1.7 KiB |
|
Before Width: | Height: | Size: 2.6 KiB |
|
Before Width: | Height: | Size: 41 KiB |
|
Before Width: | Height: | Size: 101 KiB |
@@ -1,6 +1,11 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<gresources>
|
||||
<gresource prefix="/">
|
||||
<file>gtk-logo-old.png</file>
|
||||
</gresource>
|
||||
<gresource prefix="/application">
|
||||
<file preprocess="to-pixdata">gtk-logo-24.png</file>
|
||||
<file preprocess="to-pixdata">gtk-logo-48.png</file>
|
||||
<file>application.ui</file>
|
||||
<file>menus.ui</file>
|
||||
</gresource>
|
||||
@@ -57,6 +62,7 @@
|
||||
<gresource prefix="/images">
|
||||
<file>alphatest.png</file>
|
||||
<file>floppybuddy.gif</file>
|
||||
<file>gtk-logo-old.png</file>
|
||||
</gresource>
|
||||
<gresource prefix="/pixbufs">
|
||||
<file>apple-red.png</file>
|
||||
@@ -89,7 +95,6 @@
|
||||
<file>entry_buffer.c</file>
|
||||
<file>entry_completion.c</file>
|
||||
<file>expander.c</file>
|
||||
<file>flowbox.c</file>
|
||||
<file>hypertext.c</file>
|
||||
<file>iconview.c</file>
|
||||
<file>iconview_edit.c</file>
|
||||
@@ -122,10 +127,12 @@
|
||||
</gresource>
|
||||
<gresource prefix="/textview">
|
||||
<file>floppybuddy.gif</file>
|
||||
<file>gtk-logo-old.png</file>
|
||||
</gresource>
|
||||
<gresource prefix="/listbox">
|
||||
<file>listbox.ui</file>
|
||||
<file>messages.txt</file>
|
||||
<file>gtk-logo-48.png</file>
|
||||
<file>apple-red.png</file>
|
||||
</gresource>
|
||||
</gresources>
|
||||
|
||||
@@ -1,743 +0,0 @@
|
||||
/* Flow Box
|
||||
*
|
||||
* GtkFlowBox allows flexible and responsive grids which reflow
|
||||
* as needed and support sorting and filtering.
|
||||
*
|
||||
* The children of a GtkFlowBox are regular widgets
|
||||
*/
|
||||
|
||||
#include <gtk/gtk.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
static GtkWidget *window = NULL;
|
||||
|
||||
static GtkWidget *
|
||||
color_swatch_new (const gchar *color)
|
||||
{
|
||||
GtkWidget *button, *area;
|
||||
GdkRGBA rgba;
|
||||
|
||||
gdk_rgba_parse (&rgba, color);
|
||||
|
||||
button = gtk_button_new ();
|
||||
area = gtk_drawing_area_new ();
|
||||
gtk_widget_set_size_request (area, 24, 24);
|
||||
gtk_widget_override_background_color (area, 0, &rgba);
|
||||
gtk_container_add (GTK_CONTAINER (button), area);
|
||||
gtk_widget_show_all (button);
|
||||
|
||||
return button;
|
||||
}
|
||||
|
||||
GtkWidget *
|
||||
do_flowbox (GtkWidget *do_widget)
|
||||
{
|
||||
GtkWidget *scrolled, *flowbox;
|
||||
const gchar *colors[] = {
|
||||
"AliceBlue",
|
||||
"AntiqueWhite",
|
||||
"AntiqueWhite1",
|
||||
"AntiqueWhite2",
|
||||
"AntiqueWhite3",
|
||||
"AntiqueWhite4",
|
||||
"aqua",
|
||||
"aquamarine",
|
||||
"aquamarine1",
|
||||
"aquamarine2",
|
||||
"aquamarine3",
|
||||
"aquamarine4",
|
||||
"azure",
|
||||
"azure1",
|
||||
"azure2",
|
||||
"azure3",
|
||||
"azure4",
|
||||
"beige",
|
||||
"bisque",
|
||||
"bisque1",
|
||||
"bisque2",
|
||||
"bisque3",
|
||||
"bisque4",
|
||||
"black",
|
||||
"BlanchedAlmond",
|
||||
"blue",
|
||||
"blue1",
|
||||
"blue2",
|
||||
"blue3",
|
||||
"blue4",
|
||||
"BlueViolet",
|
||||
"brown",
|
||||
"brown1",
|
||||
"brown2",
|
||||
"brown3",
|
||||
"brown4",
|
||||
"burlywood",
|
||||
"burlywood1",
|
||||
"burlywood2",
|
||||
"burlywood3",
|
||||
"burlywood4",
|
||||
"CadetBlue",
|
||||
"CadetBlue1",
|
||||
"CadetBlue2",
|
||||
"CadetBlue3",
|
||||
"CadetBlue4",
|
||||
"chartreuse",
|
||||
"chartreuse1",
|
||||
"chartreuse2",
|
||||
"chartreuse3",
|
||||
"chartreuse4",
|
||||
"chocolate",
|
||||
"chocolate1",
|
||||
"chocolate2",
|
||||
"chocolate3",
|
||||
"chocolate4",
|
||||
"coral",
|
||||
"coral1",
|
||||
"coral2",
|
||||
"coral3",
|
||||
"coral4",
|
||||
"CornflowerBlue",
|
||||
"cornsilk",
|
||||
"cornsilk1",
|
||||
"cornsilk2",
|
||||
"cornsilk3",
|
||||
"cornsilk4",
|
||||
"crimson",
|
||||
"cyan",
|
||||
"cyan1",
|
||||
"cyan2",
|
||||
"cyan3",
|
||||
"cyan4",
|
||||
"DarkBlue",
|
||||
"DarkCyan",
|
||||
"DarkGoldenrod",
|
||||
"DarkGoldenrod1",
|
||||
"DarkGoldenrod2",
|
||||
"DarkGoldenrod3",
|
||||
"DarkGoldenrod4",
|
||||
"DarkGray",
|
||||
"DarkGreen",
|
||||
"DarkGrey",
|
||||
"DarkKhaki",
|
||||
"DarkMagenta",
|
||||
"DarkOliveGreen",
|
||||
"DarkOliveGreen1",
|
||||
"DarkOliveGreen2",
|
||||
"DarkOliveGreen3",
|
||||
"DarkOliveGreen4",
|
||||
"DarkOrange",
|
||||
"DarkOrange1",
|
||||
"DarkOrange2",
|
||||
"DarkOrange3",
|
||||
"DarkOrange4",
|
||||
"DarkOrchid",
|
||||
"DarkOrchid1",
|
||||
"DarkOrchid2",
|
||||
"DarkOrchid3",
|
||||
"DarkOrchid4",
|
||||
"DarkRed",
|
||||
"DarkSalmon",
|
||||
"DarkSeaGreen",
|
||||
"DarkSeaGreen1",
|
||||
"DarkSeaGreen2",
|
||||
"DarkSeaGreen3",
|
||||
"DarkSeaGreen4",
|
||||
"DarkSlateBlue",
|
||||
"DarkSlateGray",
|
||||
"DarkSlateGray1",
|
||||
"DarkSlateGray2",
|
||||
"DarkSlateGray3",
|
||||
"DarkSlateGray4",
|
||||
"DarkSlateGrey",
|
||||
"DarkTurquoise",
|
||||
"DarkViolet",
|
||||
"DeepPink",
|
||||
"DeepPink1",
|
||||
"DeepPink2",
|
||||
"DeepPink3",
|
||||
"DeepPink4",
|
||||
"DeepSkyBlue",
|
||||
"DeepSkyBlue1",
|
||||
"DeepSkyBlue2",
|
||||
"DeepSkyBlue3",
|
||||
"DeepSkyBlue4",
|
||||
"DimGray",
|
||||
"DimGrey",
|
||||
"DodgerBlue",
|
||||
"DodgerBlue1",
|
||||
"DodgerBlue2",
|
||||
"DodgerBlue3",
|
||||
"DodgerBlue4",
|
||||
"firebrick",
|
||||
"firebrick1",
|
||||
"firebrick2",
|
||||
"firebrick3",
|
||||
"firebrick4",
|
||||
"FloralWhite",
|
||||
"ForestGreen",
|
||||
"fuchsia",
|
||||
"gainsboro",
|
||||
"GhostWhite",
|
||||
"gold",
|
||||
"gold1",
|
||||
"gold2",
|
||||
"gold3",
|
||||
"gold4",
|
||||
"goldenrod",
|
||||
"goldenrod1",
|
||||
"goldenrod2",
|
||||
"goldenrod3",
|
||||
"goldenrod4",
|
||||
"gray",
|
||||
"gray0",
|
||||
"gray1",
|
||||
"gray10",
|
||||
"gray100",
|
||||
"gray11",
|
||||
"gray12",
|
||||
"gray13",
|
||||
"gray14",
|
||||
"gray15",
|
||||
"gray16",
|
||||
"gray17",
|
||||
"gray18",
|
||||
"gray19",
|
||||
"gray2",
|
||||
"gray20",
|
||||
"gray21",
|
||||
"gray22",
|
||||
"gray23",
|
||||
"gray24",
|
||||
"gray25",
|
||||
"gray26",
|
||||
"gray27",
|
||||
"gray28",
|
||||
"gray29",
|
||||
"gray3",
|
||||
"gray30",
|
||||
"gray31",
|
||||
"gray32",
|
||||
"gray33",
|
||||
"gray34",
|
||||
"gray35",
|
||||
"gray36",
|
||||
"gray37",
|
||||
"gray38",
|
||||
"gray39",
|
||||
"gray4",
|
||||
"gray40",
|
||||
"gray41",
|
||||
"gray42",
|
||||
"gray43",
|
||||
"gray44",
|
||||
"gray45",
|
||||
"gray46",
|
||||
"gray47",
|
||||
"gray48",
|
||||
"gray49",
|
||||
"gray5",
|
||||
"gray50",
|
||||
"gray51",
|
||||
"gray52",
|
||||
"gray53",
|
||||
"gray54",
|
||||
"gray55",
|
||||
"gray56",
|
||||
"gray57",
|
||||
"gray58",
|
||||
"gray59",
|
||||
"gray6",
|
||||
"gray60",
|
||||
"gray61",
|
||||
"gray62",
|
||||
"gray63",
|
||||
"gray64",
|
||||
"gray65",
|
||||
"gray66",
|
||||
"gray67",
|
||||
"gray68",
|
||||
"gray69",
|
||||
"gray7",
|
||||
"gray70",
|
||||
"gray71",
|
||||
"gray72",
|
||||
"gray73",
|
||||
"gray74",
|
||||
"gray75",
|
||||
"gray76",
|
||||
"gray77",
|
||||
"gray78",
|
||||
"gray79",
|
||||
"gray8",
|
||||
"gray80",
|
||||
"gray81",
|
||||
"gray82",
|
||||
"gray83",
|
||||
"gray84",
|
||||
"gray85",
|
||||
"gray86",
|
||||
"gray87",
|
||||
"gray88",
|
||||
"gray89",
|
||||
"gray9",
|
||||
"gray90",
|
||||
"gray91",
|
||||
"gray92",
|
||||
"gray93",
|
||||
"gray94",
|
||||
"gray95",
|
||||
"gray96",
|
||||
"gray97",
|
||||
"gray98",
|
||||
"gray99",
|
||||
"green",
|
||||
"green1",
|
||||
"green2",
|
||||
"green3",
|
||||
"green4",
|
||||
"GreenYellow",
|
||||
"grey",
|
||||
"grey0",
|
||||
"grey1",
|
||||
"grey10",
|
||||
"grey100",
|
||||
"grey11",
|
||||
"grey12",
|
||||
"grey13",
|
||||
"grey14",
|
||||
"grey15",
|
||||
"grey16",
|
||||
"grey17",
|
||||
"grey18",
|
||||
"grey19",
|
||||
"grey2",
|
||||
"grey20",
|
||||
"grey21",
|
||||
"grey22",
|
||||
"grey23",
|
||||
"grey24",
|
||||
"grey25",
|
||||
"grey26",
|
||||
"grey27",
|
||||
"grey28",
|
||||
"grey29",
|
||||
"grey3",
|
||||
"grey30",
|
||||
"grey31",
|
||||
"grey32",
|
||||
"grey33",
|
||||
"grey34",
|
||||
"grey35",
|
||||
"grey36",
|
||||
"grey37",
|
||||
"grey38",
|
||||
"grey39",
|
||||
"grey4",
|
||||
"grey40",
|
||||
"grey41",
|
||||
"grey42",
|
||||
"grey43",
|
||||
"grey44",
|
||||
"grey45",
|
||||
"grey46",
|
||||
"grey47",
|
||||
"grey48",
|
||||
"grey49",
|
||||
"grey5",
|
||||
"grey50",
|
||||
"grey51",
|
||||
"grey52",
|
||||
"grey53",
|
||||
"grey54",
|
||||
"grey55",
|
||||
"grey56",
|
||||
"grey57",
|
||||
"grey58",
|
||||
"grey59",
|
||||
"grey6",
|
||||
"grey60",
|
||||
"grey61",
|
||||
"grey62",
|
||||
"grey63",
|
||||
"grey64",
|
||||
"grey65",
|
||||
"grey66",
|
||||
"grey67",
|
||||
"grey68",
|
||||
"grey69",
|
||||
"grey7",
|
||||
"grey70",
|
||||
"grey71",
|
||||
"grey72",
|
||||
"grey73",
|
||||
"grey74",
|
||||
"grey75",
|
||||
"grey76",
|
||||
"grey77",
|
||||
"grey78",
|
||||
"grey79",
|
||||
"grey8",
|
||||
"grey80",
|
||||
"grey81",
|
||||
"grey82",
|
||||
"grey83",
|
||||
"grey84",
|
||||
"grey85",
|
||||
"grey86",
|
||||
"grey87",
|
||||
"grey88",
|
||||
"grey89",
|
||||
"grey9",
|
||||
"grey90",
|
||||
"grey91",
|
||||
"grey92",
|
||||
"grey93",
|
||||
"grey94",
|
||||
"grey95",
|
||||
"grey96",
|
||||
"grey97",
|
||||
"grey98",
|
||||
"grey99",
|
||||
"honeydew",
|
||||
"honeydew1",
|
||||
"honeydew2",
|
||||
"honeydew3",
|
||||
"honeydew4",
|
||||
"HotPink",
|
||||
"HotPink1",
|
||||
"HotPink2",
|
||||
"HotPink3",
|
||||
"HotPink4",
|
||||
"IndianRed",
|
||||
"IndianRed1",
|
||||
"IndianRed2",
|
||||
"IndianRed3",
|
||||
"IndianRed4",
|
||||
"indigo",
|
||||
"ivory",
|
||||
"ivory1",
|
||||
"ivory2",
|
||||
"ivory3",
|
||||
"ivory4",
|
||||
"khaki",
|
||||
"khaki1",
|
||||
"khaki2",
|
||||
"khaki3",
|
||||
"khaki4",
|
||||
"lavender",
|
||||
"LavenderBlush",
|
||||
"LavenderBlush1",
|
||||
"LavenderBlush2",
|
||||
"LavenderBlush3",
|
||||
"LavenderBlush4",
|
||||
"LawnGreen",
|
||||
"LemonChiffon",
|
||||
"LemonChiffon1",
|
||||
"LemonChiffon2",
|
||||
"LemonChiffon3",
|
||||
"LemonChiffon4",
|
||||
"LightBlue",
|
||||
"LightBlue1",
|
||||
"LightBlue2",
|
||||
"LightBlue3",
|
||||
"LightBlue4",
|
||||
"LightCoral",
|
||||
"LightCyan",
|
||||
"LightCyan1",
|
||||
"LightCyan2",
|
||||
"LightCyan3",
|
||||
"LightCyan4",
|
||||
"LightGoldenrod",
|
||||
"LightGoldenrod1",
|
||||
"LightGoldenrod2",
|
||||
"LightGoldenrod3",
|
||||
"LightGoldenrod4",
|
||||
"LightGoldenrodYellow",
|
||||
"LightGray",
|
||||
"LightGreen",
|
||||
"LightGrey",
|
||||
"LightPink",
|
||||
"LightPink1",
|
||||
"LightPink2",
|
||||
"LightPink3",
|
||||
"LightPink4",
|
||||
"LightSalmon",
|
||||
"LightSalmon1",
|
||||
"LightSalmon2",
|
||||
"LightSalmon3",
|
||||
"LightSalmon4",
|
||||
"LightSeaGreen",
|
||||
"LightSkyBlue",
|
||||
"LightSkyBlue1",
|
||||
"LightSkyBlue2",
|
||||
"LightSkyBlue3",
|
||||
"LightSkyBlue4",
|
||||
"LightSlateBlue",
|
||||
"LightSlateGray",
|
||||
"LightSlateGrey",
|
||||
"LightSteelBlue",
|
||||
"LightSteelBlue1",
|
||||
"LightSteelBlue2",
|
||||
"LightSteelBlue3",
|
||||
"LightSteelBlue4",
|
||||
"LightYellow",
|
||||
"LightYellow1",
|
||||
"LightYellow2",
|
||||
"LightYellow3",
|
||||
"LightYellow4",
|
||||
"lime",
|
||||
"LimeGreen",
|
||||
"linen",
|
||||
"magenta",
|
||||
"magenta1",
|
||||
"magenta2",
|
||||
"magenta3",
|
||||
"magenta4",
|
||||
"maroon",
|
||||
"maroon1",
|
||||
"maroon2",
|
||||
"maroon3",
|
||||
"maroon4",
|
||||
"MediumAquamarine",
|
||||
"MediumBlue",
|
||||
"MediumOrchid",
|
||||
"MediumOrchid1",
|
||||
"MediumOrchid2",
|
||||
"MediumOrchid3",
|
||||
"MediumOrchid4",
|
||||
"MediumPurple",
|
||||
"MediumPurple1",
|
||||
"MediumPurple2",
|
||||
"MediumPurple3",
|
||||
"MediumPurple4",
|
||||
"MediumSeaGreen",
|
||||
"MediumSlateBlue",
|
||||
"MediumSpringGreen",
|
||||
"MediumTurquoise",
|
||||
"MediumVioletRed",
|
||||
"MidnightBlue",
|
||||
"MintCream",
|
||||
"MistyRose",
|
||||
"MistyRose1",
|
||||
"MistyRose2",
|
||||
"MistyRose3",
|
||||
"MistyRose4",
|
||||
"moccasin",
|
||||
"NavajoWhite",
|
||||
"NavajoWhite1",
|
||||
"NavajoWhite2",
|
||||
"NavajoWhite3",
|
||||
"NavajoWhite4",
|
||||
"navy",
|
||||
"NavyBlue",
|
||||
"OldLace",
|
||||
"olive",
|
||||
"OliveDrab",
|
||||
"OliveDrab1",
|
||||
"OliveDrab2",
|
||||
"OliveDrab3",
|
||||
"OliveDrab4",
|
||||
"orange",
|
||||
"orange1",
|
||||
"orange2",
|
||||
"orange3",
|
||||
"orange4",
|
||||
"OrangeRed",
|
||||
"OrangeRed1",
|
||||
"OrangeRed2",
|
||||
"OrangeRed3",
|
||||
"OrangeRed4",
|
||||
"orchid",
|
||||
"orchid1",
|
||||
"orchid2",
|
||||
"orchid3",
|
||||
"orchid4",
|
||||
"PaleGoldenrod",
|
||||
"PaleGreen",
|
||||
"PaleGreen1",
|
||||
"PaleGreen2",
|
||||
"PaleGreen3",
|
||||
"PaleGreen4",
|
||||
"PaleTurquoise",
|
||||
"PaleTurquoise1",
|
||||
"PaleTurquoise2",
|
||||
"PaleTurquoise3",
|
||||
"PaleTurquoise4",
|
||||
"PaleVioletRed",
|
||||
"PaleVioletRed1",
|
||||
"PaleVioletRed2",
|
||||
"PaleVioletRed3",
|
||||
"PaleVioletRed4",
|
||||
"PapayaWhip",
|
||||
"PeachPuff",
|
||||
"PeachPuff1",
|
||||
"PeachPuff2",
|
||||
"PeachPuff3",
|
||||
"PeachPuff4",
|
||||
"peru",
|
||||
"pink",
|
||||
"pink1",
|
||||
"pink2",
|
||||
"pink3",
|
||||
"pink4",
|
||||
"plum",
|
||||
"plum1",
|
||||
"plum2",
|
||||
"plum3",
|
||||
"plum4",
|
||||
"PowderBlue",
|
||||
"purple",
|
||||
"purple1",
|
||||
"purple2",
|
||||
"purple3",
|
||||
"purple4",
|
||||
"red",
|
||||
"red1",
|
||||
"red2",
|
||||
"red3",
|
||||
"red4",
|
||||
"RosyBrown",
|
||||
"RosyBrown1",
|
||||
"RosyBrown2",
|
||||
"RosyBrown3",
|
||||
"RosyBrown4",
|
||||
"RoyalBlue",
|
||||
"RoyalBlue1",
|
||||
"RoyalBlue2",
|
||||
"RoyalBlue3",
|
||||
"RoyalBlue4",
|
||||
"SaddleBrown",
|
||||
"salmon",
|
||||
"salmon1",
|
||||
"salmon2",
|
||||
"salmon3",
|
||||
"salmon4",
|
||||
"SandyBrown",
|
||||
"SeaGreen",
|
||||
"SeaGreen1",
|
||||
"SeaGreen2",
|
||||
"SeaGreen3",
|
||||
"SeaGreen4",
|
||||
"seashell",
|
||||
"seashell1",
|
||||
"seashell2",
|
||||
"seashell3",
|
||||
"seashell4",
|
||||
"sienna",
|
||||
"sienna1",
|
||||
"sienna2",
|
||||
"sienna3",
|
||||
"sienna4",
|
||||
"silver",
|
||||
"SkyBlue",
|
||||
"SkyBlue1",
|
||||
"SkyBlue2",
|
||||
"SkyBlue3",
|
||||
"SkyBlue4",
|
||||
"SlateBlue",
|
||||
"SlateBlue1",
|
||||
"SlateBlue2",
|
||||
"SlateBlue3",
|
||||
"SlateBlue4",
|
||||
"SlateGray",
|
||||
"SlateGray1",
|
||||
"SlateGray2",
|
||||
"SlateGray3",
|
||||
"SlateGray4",
|
||||
"SlateGrey",
|
||||
"snow",
|
||||
"snow1",
|
||||
"snow2",
|
||||
"snow3",
|
||||
"snow4",
|
||||
"SpringGreen",
|
||||
"SpringGreen1",
|
||||
"SpringGreen2",
|
||||
"SpringGreen3",
|
||||
"SpringGreen4",
|
||||
"SteelBlue",
|
||||
"SteelBlue1",
|
||||
"SteelBlue2",
|
||||
"SteelBlue3",
|
||||
"SteelBlue4",
|
||||
"tan",
|
||||
"tan1",
|
||||
"tan2",
|
||||
"tan3",
|
||||
"tan4",
|
||||
"teal",
|
||||
"thistle",
|
||||
"thistle1",
|
||||
"thistle2",
|
||||
"thistle3",
|
||||
"thistle4",
|
||||
"tomato",
|
||||
"tomato1",
|
||||
"tomato2",
|
||||
"tomato3",
|
||||
"tomato4",
|
||||
"turquoise",
|
||||
"turquoise1",
|
||||
"turquoise2",
|
||||
"turquoise3",
|
||||
"turquoise4",
|
||||
"violet",
|
||||
"VioletRed",
|
||||
"VioletRed1",
|
||||
"VioletRed2",
|
||||
"VioletRed3",
|
||||
"VioletRed4",
|
||||
"wheat",
|
||||
"wheat1",
|
||||
"wheat2",
|
||||
"wheat3",
|
||||
"wheat4",
|
||||
"white",
|
||||
"WhiteSmoke",
|
||||
"yellow",
|
||||
"yellow1",
|
||||
"yellow2",
|
||||
"yellow3",
|
||||
"yellow4",
|
||||
"YellowGreen",
|
||||
NULL
|
||||
};
|
||||
gint i;
|
||||
|
||||
if (!window)
|
||||
{
|
||||
window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
|
||||
gtk_window_set_screen (GTK_WINDOW (window),
|
||||
gtk_widget_get_screen (do_widget));
|
||||
gtk_window_set_title (GTK_WINDOW (window), "Flow Box");
|
||||
gtk_window_set_default_size (GTK_WINDOW (window), 400, 600);
|
||||
|
||||
g_signal_connect (window, "destroy",
|
||||
G_CALLBACK (gtk_widget_destroyed),
|
||||
&window);
|
||||
|
||||
scrolled = gtk_scrolled_window_new (NULL, NULL);
|
||||
gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (scrolled), GTK_POLICY_NEVER, GTK_POLICY_AUTOMATIC);
|
||||
flowbox = gtk_flow_box_new ();
|
||||
gtk_widget_set_valign (flowbox, GTK_ALIGN_START);
|
||||
gtk_flow_box_set_max_children_per_line (GTK_FLOW_BOX (flowbox), 30);
|
||||
gtk_flow_box_set_selection_mode (GTK_FLOW_BOX (flowbox), GTK_SELECTION_NONE);
|
||||
|
||||
gtk_container_add (GTK_CONTAINER (scrolled), flowbox);
|
||||
gtk_container_add (GTK_CONTAINER (window), scrolled);
|
||||
|
||||
for (i = 0; colors[i]; i++)
|
||||
{
|
||||
gtk_container_add (GTK_CONTAINER (flowbox), color_swatch_new (colors[i]));
|
||||
}
|
||||
|
||||
gtk_widget_show_all (scrolled);
|
||||
}
|
||||
|
||||
if (!gtk_widget_get_visible (window))
|
||||
gtk_widget_show (window);
|
||||
else
|
||||
gtk_widget_destroy (window);
|
||||
|
||||
return window;
|
||||
}
|
||||
|
After Width: | Height: | Size: 674 B |
|
After Width: | Height: | Size: 2.3 KiB |
|
After Width: | Height: | Size: 5.8 KiB |
@@ -1,10 +0,0 @@
|
||||
[Desktop Entry]
|
||||
Name=GTK+ Demo
|
||||
Comment=GTK+ code examples and demonstrations
|
||||
Exec=gtk3-demo
|
||||
Icon=gtk3-demo
|
||||
Terminal=false
|
||||
Type=Application
|
||||
StartupNotify=true
|
||||
Categories=GTK;
|
||||
NoDisplay=true
|
||||
@@ -329,6 +329,7 @@ do_images (GtkWidget *do_widget)
|
||||
GtkWidget *image;
|
||||
GtkWidget *label;
|
||||
GtkWidget *button;
|
||||
GdkPixbuf *pixbuf;
|
||||
GIcon *gicon;
|
||||
|
||||
if (!window)
|
||||
@@ -360,7 +361,11 @@ do_images (GtkWidget *do_widget)
|
||||
gtk_widget_set_valign (frame, GTK_ALIGN_CENTER);
|
||||
gtk_box_pack_start (GTK_BOX (vbox), frame, FALSE, FALSE, 0);
|
||||
|
||||
image = gtk_image_new_from_icon_name ("gtk3-demo", GTK_ICON_SIZE_DIALOG);
|
||||
pixbuf = gdk_pixbuf_new_from_resource ("/images/gtk-logo-old.png", NULL);
|
||||
/* The image loading must work, we ensure that the resources are valid. */
|
||||
g_assert (pixbuf);
|
||||
|
||||
image = gtk_image_new_from_pixbuf (pixbuf);
|
||||
|
||||
gtk_container_add (GTK_CONTAINER (frame), image);
|
||||
|
||||
|
||||
@@ -9,6 +9,7 @@
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
static GdkPixbuf *avatar_pixbuf_gtk;
|
||||
static GdkPixbuf *avatar_pixbuf_other;
|
||||
static GtkWidget *window = NULL;
|
||||
|
||||
@@ -182,7 +183,7 @@ gtk_message_row_update (GtkMessageRow *row)
|
||||
gtk_button_set_label (GTK_BUTTON (priv->resent_by_button), priv->message->resent_by);
|
||||
|
||||
if (strcmp (priv->message->sender_nick, "@GTKtoolkit") == 0)
|
||||
gtk_image_set_from_icon_name (priv->avatar_image, "gtk3-demo", GTK_ICON_SIZE_DND);
|
||||
gtk_image_set_from_pixbuf (priv->avatar_image, avatar_pixbuf_gtk);
|
||||
else
|
||||
gtk_image_set_from_pixbuf (priv->avatar_image, avatar_pixbuf_other);
|
||||
|
||||
@@ -316,12 +317,13 @@ do_listbox (GtkWidget *do_widget)
|
||||
|
||||
if (!window)
|
||||
{
|
||||
avatar_pixbuf_gtk = gdk_pixbuf_new_from_resource_at_scale ("/listbox/gtk-logo-48.png", 32, 32, FALSE, NULL);
|
||||
avatar_pixbuf_other = gdk_pixbuf_new_from_resource_at_scale ("/listbox/apple-red.png", 32, 32, FALSE, NULL);
|
||||
|
||||
window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
|
||||
gtk_window_set_screen (GTK_WINDOW (window),
|
||||
gtk_widget_get_screen (do_widget));
|
||||
gtk_window_set_title (GTK_WINDOW (window), "List Box");
|
||||
gtk_window_set_title (GTK_WINDOW (window), "ListBox");
|
||||
gtk_window_set_default_size (GTK_WINDOW (window),
|
||||
400, 600);
|
||||
|
||||
|
||||
@@ -38,8 +38,8 @@
|
||||
<property name="valign">start</property>
|
||||
<property name="margin_top">8</property>
|
||||
<property name="margin_bottom">8</property>
|
||||
<property name="margin_start">8</property>
|
||||
<property name="margin_end">8</property>
|
||||
<property name="margin_left">8</property>
|
||||
<property name="margin_right">8</property>
|
||||
<property name="icon-name">image-missing</property>
|
||||
</object>
|
||||
<packing>
|
||||
|
||||
@@ -882,6 +882,20 @@ create_tree (void)
|
||||
return box;
|
||||
}
|
||||
|
||||
static void
|
||||
setup_default_icon (void)
|
||||
{
|
||||
GdkPixbuf *pixbuf;
|
||||
|
||||
pixbuf = gdk_pixbuf_new_from_resource ("/gtk-logo-old.png", NULL);
|
||||
/* We load a resource, so we can guarantee that loading it is successful */
|
||||
g_assert (pixbuf);
|
||||
|
||||
gtk_window_set_default_icon (pixbuf);
|
||||
|
||||
g_object_unref (pixbuf);
|
||||
}
|
||||
|
||||
int
|
||||
main (int argc, char **argv)
|
||||
{
|
||||
@@ -901,7 +915,7 @@ main (int argc, char **argv)
|
||||
|
||||
gtk_init (&argc, &argv);
|
||||
|
||||
gtk_window_set_default_icon_name ("gtk3-demo");
|
||||
setup_default_icon ();
|
||||
|
||||
window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
|
||||
gtk_window_set_title (GTK_WINDOW (window), "GTK+ Code Demos");
|
||||
@@ -916,7 +930,6 @@ main (int argc, char **argv)
|
||||
|
||||
notebook = gtk_notebook_new ();
|
||||
gtk_notebook_set_scrollable (GTK_NOTEBOOK (notebook), TRUE);
|
||||
gtk_notebook_popup_enable (GTK_NOTEBOOK (notebook));
|
||||
gtk_box_pack_start (GTK_BOX (hbox), notebook, TRUE, TRUE, 0);
|
||||
|
||||
gtk_notebook_append_page (GTK_NOTEBOOK (notebook),
|
||||
|
||||
@@ -51,8 +51,8 @@ do_overlay (GtkWidget *do_widget)
|
||||
gtk_widget_set_halign (label, GTK_ALIGN_END);
|
||||
gtk_widget_set_valign (label, GTK_ALIGN_END);
|
||||
gtk_overlay_add_overlay (GTK_OVERLAY (overlay), label);
|
||||
gtk_widget_set_margin_start (label, 20);
|
||||
gtk_widget_set_margin_end (label, 20);
|
||||
gtk_widget_set_margin_left (label, 20);
|
||||
gtk_widget_set_margin_right (label, 20);
|
||||
gtk_widget_set_margin_top (label, 5);
|
||||
gtk_widget_set_margin_bottom (label, 5);
|
||||
|
||||
@@ -65,8 +65,8 @@ do_overlay (GtkWidget *do_widget)
|
||||
gtk_widget_set_halign (label, GTK_ALIGN_START);
|
||||
gtk_widget_set_valign (label, GTK_ALIGN_END);
|
||||
gtk_overlay_add_overlay (GTK_OVERLAY (overlay), label);
|
||||
gtk_widget_set_margin_start (label, 20);
|
||||
gtk_widget_set_margin_end (label, 20);
|
||||
gtk_widget_set_margin_left (label, 20);
|
||||
gtk_widget_set_margin_right (label, 20);
|
||||
gtk_widget_set_margin_top (label, 5);
|
||||
gtk_widget_set_margin_bottom (label, 5);
|
||||
|
||||
@@ -79,8 +79,8 @@ do_overlay (GtkWidget *do_widget)
|
||||
gtk_widget_set_halign (label, GTK_ALIGN_END);
|
||||
gtk_widget_set_valign (label, GTK_ALIGN_START);
|
||||
gtk_overlay_add_overlay (GTK_OVERLAY (overlay), label);
|
||||
gtk_widget_set_margin_start (label, 20);
|
||||
gtk_widget_set_margin_end (label, 20);
|
||||
gtk_widget_set_margin_left (label, 20);
|
||||
gtk_widget_set_margin_right (label, 20);
|
||||
gtk_widget_set_margin_top (label, 5);
|
||||
gtk_widget_set_margin_bottom (label, 5);
|
||||
|
||||
@@ -93,8 +93,8 @@ do_overlay (GtkWidget *do_widget)
|
||||
gtk_widget_set_halign (label, GTK_ALIGN_START);
|
||||
gtk_widget_set_valign (label, GTK_ALIGN_START);
|
||||
gtk_overlay_add_overlay (GTK_OVERLAY (overlay), label);
|
||||
gtk_widget_set_margin_start (label, 20);
|
||||
gtk_widget_set_margin_end (label, 20);
|
||||
gtk_widget_set_margin_left (label, 20);
|
||||
gtk_widget_set_margin_right (label, 20);
|
||||
gtk_widget_set_margin_top (label, 5);
|
||||
gtk_widget_set_margin_bottom (label, 5);
|
||||
|
||||
@@ -107,8 +107,8 @@ do_overlay (GtkWidget *do_widget)
|
||||
gtk_widget_set_halign (label, GTK_ALIGN_END);
|
||||
gtk_widget_set_valign (label, GTK_ALIGN_CENTER);
|
||||
gtk_overlay_add_overlay (GTK_OVERLAY (overlay), label);
|
||||
gtk_widget_set_margin_start (label, 20);
|
||||
gtk_widget_set_margin_end (label, 20);
|
||||
gtk_widget_set_margin_left (label, 20);
|
||||
gtk_widget_set_margin_right (label, 20);
|
||||
gtk_widget_set_margin_top (label, 5);
|
||||
gtk_widget_set_margin_bottom (label, 5);
|
||||
|
||||
@@ -121,8 +121,8 @@ do_overlay (GtkWidget *do_widget)
|
||||
gtk_widget_set_halign (label, GTK_ALIGN_START);
|
||||
gtk_widget_set_valign (label, GTK_ALIGN_CENTER);
|
||||
gtk_overlay_add_overlay (GTK_OVERLAY (overlay), label);
|
||||
gtk_widget_set_margin_start (label, 20);
|
||||
gtk_widget_set_margin_end (label, 20);
|
||||
gtk_widget_set_margin_left (label, 20);
|
||||
gtk_widget_set_margin_right (label, 20);
|
||||
gtk_widget_set_margin_top (label, 5);
|
||||
gtk_widget_set_margin_bottom (label, 5);
|
||||
|
||||
@@ -135,8 +135,8 @@ do_overlay (GtkWidget *do_widget)
|
||||
gtk_widget_set_halign (label, GTK_ALIGN_CENTER);
|
||||
gtk_widget_set_valign (label, GTK_ALIGN_START);
|
||||
gtk_overlay_add_overlay (GTK_OVERLAY (overlay), label);
|
||||
gtk_widget_set_margin_start (label, 20);
|
||||
gtk_widget_set_margin_end (label, 20);
|
||||
gtk_widget_set_margin_left (label, 20);
|
||||
gtk_widget_set_margin_right (label, 20);
|
||||
gtk_widget_set_margin_top (label, 5);
|
||||
gtk_widget_set_margin_bottom (label, 5);
|
||||
|
||||
@@ -149,8 +149,8 @@ do_overlay (GtkWidget *do_widget)
|
||||
gtk_widget_set_halign (label, GTK_ALIGN_CENTER);
|
||||
gtk_widget_set_valign (label, GTK_ALIGN_END);
|
||||
gtk_overlay_add_overlay (GTK_OVERLAY (overlay), label);
|
||||
gtk_widget_set_margin_start (label, 10);
|
||||
gtk_widget_set_margin_end (label, 10);
|
||||
gtk_widget_set_margin_left (label, 10);
|
||||
gtk_widget_set_margin_right (label, 10);
|
||||
gtk_widget_set_margin_top (label, 5);
|
||||
gtk_widget_set_margin_bottom (label, 5);
|
||||
|
||||
|
||||
@@ -32,7 +32,7 @@
|
||||
<property name="can_focus">False</property>
|
||||
<property name="margin-top">20</property>
|
||||
<property name="margin-bottom">20</property>
|
||||
<property name="icon-name">gtk3-demo</property>
|
||||
<property name="resource">/application/gtk-logo-48.png</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="name">page1</property>
|
||||
|
||||
@@ -129,16 +129,15 @@ insert_text (GtkTextBuffer *buffer)
|
||||
GtkTextIter iter;
|
||||
GtkTextIter start, end;
|
||||
GdkPixbuf *pixbuf;
|
||||
GtkIconTheme *icon_theme;
|
||||
GdkPixbuf *scaled;
|
||||
|
||||
icon_theme = gtk_icon_theme_get_default ();
|
||||
pixbuf = gtk_icon_theme_load_icon (icon_theme,
|
||||
"gtk3-demo",
|
||||
32,
|
||||
GTK_ICON_LOOKUP_GENERIC_FALLBACK,
|
||||
NULL);
|
||||
pixbuf = gdk_pixbuf_new_from_resource ("/textview/gtk-logo-old.png", NULL);
|
||||
g_assert (pixbuf);
|
||||
|
||||
scaled = gdk_pixbuf_scale_simple (pixbuf, 32, 32, GDK_INTERP_BILINEAR);
|
||||
g_object_unref (pixbuf);
|
||||
pixbuf = scaled;
|
||||
|
||||
/* get start of buffer; each insertion will revalidate the
|
||||
* iterator to point to just after the inserted text.
|
||||
*/
|
||||
|
||||
@@ -21,7 +21,6 @@ struct _CanvasItem
|
||||
gdouble x, y;
|
||||
};
|
||||
|
||||
static gboolean drag_data_requested_for_drop = FALSE;
|
||||
static CanvasItem *drop_item = NULL;
|
||||
static GList *canvas_items = NULL;
|
||||
|
||||
@@ -274,7 +273,6 @@ interactive_canvas_drag_motion (GtkWidget *widget,
|
||||
if (!target)
|
||||
return FALSE;
|
||||
|
||||
drag_data_requested_for_drop = FALSE;
|
||||
gtk_drag_get_data (widget, context, target, time);
|
||||
}
|
||||
|
||||
@@ -296,7 +294,6 @@ interactive_canvas_drag_data_received (GtkWidget *widget,
|
||||
|
||||
GtkWidget *palette = gtk_drag_get_source_widget (context);
|
||||
GtkWidget *tool_item = NULL;
|
||||
CanvasItem *item;
|
||||
|
||||
while (palette && !GTK_IS_TOOL_PALETTE (palette))
|
||||
palette = gtk_widget_get_parent (palette);
|
||||
@@ -305,36 +302,16 @@ interactive_canvas_drag_data_received (GtkWidget *widget,
|
||||
tool_item = gtk_tool_palette_get_drag_item (GTK_TOOL_PALETTE (palette),
|
||||
selection);
|
||||
|
||||
/* create a canvas item when a tool button was found */
|
||||
/* create a drop indicator when a tool button was found */
|
||||
|
||||
g_assert (NULL == drop_item);
|
||||
|
||||
if (!GTK_IS_TOOL_ITEM (tool_item))
|
||||
return;
|
||||
|
||||
if (drop_item)
|
||||
if (GTK_IS_TOOL_ITEM (tool_item))
|
||||
{
|
||||
canvas_item_free (drop_item);
|
||||
drop_item = NULL;
|
||||
}
|
||||
|
||||
item = canvas_item_new (widget, GTK_TOOL_BUTTON (tool_item), x, y);
|
||||
|
||||
/* Either create a new item or just create a preview item,
|
||||
depending on why the drag data was requested. */
|
||||
if(drag_data_requested_for_drop)
|
||||
{
|
||||
canvas_items = g_list_append (canvas_items, item);
|
||||
drop_item = NULL;
|
||||
|
||||
gtk_drag_finish (context, TRUE, FALSE, time);
|
||||
} else
|
||||
{
|
||||
drop_item = item;
|
||||
drop_item = canvas_item_new (widget, GTK_TOOL_BUTTON (tool_item), x, y);
|
||||
gdk_drag_status (context, GDK_ACTION_COPY, time);
|
||||
gtk_widget_queue_draw (widget);
|
||||
}
|
||||
|
||||
gtk_widget_queue_draw (widget);
|
||||
}
|
||||
|
||||
static gboolean
|
||||
@@ -345,19 +322,29 @@ interactive_canvas_drag_drop (GtkWidget *widget,
|
||||
guint time,
|
||||
gpointer data)
|
||||
{
|
||||
GdkAtom target = gtk_drag_dest_find_target (widget, context, NULL);
|
||||
if (drop_item)
|
||||
{
|
||||
/* turn the drop indicator into a real canvas item */
|
||||
|
||||
if (!target)
|
||||
return FALSE;
|
||||
drop_item->x = x;
|
||||
drop_item->y = y;
|
||||
|
||||
drag_data_requested_for_drop = TRUE;
|
||||
gtk_drag_get_data (widget, context, target, time);
|
||||
canvas_items = g_list_append (canvas_items, drop_item);
|
||||
drop_item = NULL;
|
||||
|
||||
/* signal the item was accepted and redraw */
|
||||
|
||||
gtk_drag_finish (context, TRUE, FALSE, time);
|
||||
gtk_widget_queue_draw (widget);
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
static void
|
||||
interactive_canvas_drag_leave (gpointer data)
|
||||
static gboolean
|
||||
interactive_canvas_real_drag_leave (gpointer data)
|
||||
{
|
||||
if (drop_item)
|
||||
{
|
||||
@@ -366,9 +353,20 @@ interactive_canvas_drag_leave (gpointer data)
|
||||
canvas_item_free (drop_item);
|
||||
drop_item = NULL;
|
||||
|
||||
if (widget)
|
||||
gtk_widget_queue_draw (widget);
|
||||
gtk_widget_queue_draw (widget);
|
||||
}
|
||||
|
||||
return G_SOURCE_REMOVE;
|
||||
}
|
||||
|
||||
static void
|
||||
interactive_canvas_drag_leave (GtkWidget *widget,
|
||||
GdkDragContext *context,
|
||||
guint time,
|
||||
gpointer data)
|
||||
{
|
||||
/* defer cleanup until a potential "drag-drop" signal was received */
|
||||
g_idle_add (interactive_canvas_real_drag_leave, widget);
|
||||
}
|
||||
|
||||
static void
|
||||
@@ -600,7 +598,7 @@ do_toolpalette (GtkWidget *do_widget)
|
||||
"signal::draw", canvas_draw, NULL,
|
||||
"signal::drag-motion", interactive_canvas_drag_motion, NULL,
|
||||
"signal::drag-data-received", interactive_canvas_drag_data_received, NULL,
|
||||
"signal::drag-leave", interactive_canvas_drag_leave, contents,
|
||||
"signal::drag-leave", interactive_canvas_drag_leave, NULL,
|
||||
"signal::drag-drop", interactive_canvas_drag_drop, NULL,
|
||||
NULL);
|
||||
|
||||
@@ -650,8 +648,6 @@ load_icon_items (GtkToolPalette *palette)
|
||||
gchar *context = l->data;
|
||||
GList *icon_names;
|
||||
GList *ll;
|
||||
const guint max_icons = 10;
|
||||
guint icons_count = 0;
|
||||
|
||||
GtkWidget *group = gtk_tool_item_group_new (context);
|
||||
gtk_container_add (GTK_CONTAINER (palette), group);
|
||||
@@ -671,11 +667,6 @@ load_icon_items (GtkToolPalette *palette)
|
||||
gtk_tool_button_set_icon_name (GTK_TOOL_BUTTON (item), id);
|
||||
gtk_tool_item_set_tooltip_text (GTK_TOOL_ITEM (item), id);
|
||||
gtk_tool_item_group_insert (GTK_TOOL_ITEM_GROUP (group), item, -1);
|
||||
|
||||
/* Prevent us having an insane number of icons: */
|
||||
++icons_count;
|
||||
if(icons_count >= max_icons)
|
||||
break;
|
||||
}
|
||||
|
||||
g_list_free_full (icon_names, g_free);
|
||||
|
||||
@@ -2,9 +2,6 @@ include $(top_srcdir)/Makefile.decl
|
||||
|
||||
bin_PROGRAMS = gtk3-widget-factory
|
||||
|
||||
desktopdir = $(datadir)/applications
|
||||
dist_desktop_DATA = gtk3-widget-factory.desktop
|
||||
|
||||
gtk3_widget_factory_SOURCES = \
|
||||
widget-factory.c \
|
||||
widget_factory_resources.c
|
||||
@@ -28,38 +25,9 @@ gtk3_widget_factory_LDADD = \
|
||||
widget_factory_resources.c: widget-factory.gresource.xml $(shell $(GLIB_COMPILE_RESOURCES) --sourcedir=$(srcdir) --generate-dependencies $(srcdir)/widget-factory.gresource.xml)
|
||||
$(AM_V_GEN) $(GLIB_COMPILE_RESOURCES) --target=$@ --sourcedir=$(srcdir) --generate-source $<
|
||||
|
||||
|
||||
iconthemedir = $(datadir)/icons/hicolor
|
||||
|
||||
appsicon16dir = $(iconthemedir)/16x16/apps
|
||||
appsicon22dir = $(iconthemedir)/22x22/apps
|
||||
appsicon24dir = $(iconthemedir)/24x24/apps
|
||||
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
|
||||
|
||||
update_icon_cache = gtk-update-icon-cache --ignore-theme-index --force
|
||||
|
||||
install-data-hook: install-update-icon-cache
|
||||
uninstall-hook: uninstall-update-icon-cache
|
||||
|
||||
install-update-icon-cache:
|
||||
$(AM_V_at)$(POST_INSTALL)
|
||||
test -n "$(DESTDIR)" || $(update_icon_cache) "$(iconthemedir)"
|
||||
|
||||
uninstall-update-icon-cache:
|
||||
$(AM_V_at)$(POST_UNINSTALL)
|
||||
test -n "$(DESTDIR)" || $(update_icon_cache) "$(iconthemedir)"
|
||||
|
||||
EXTRA_DIST += \
|
||||
widget-factory.ui \
|
||||
widget-factory.gresource.xml
|
||||
widget-factory.gresource.xml \
|
||||
gtk-logo-256.png
|
||||
|
||||
-include $(top_srcdir)/git.mk
|
||||
|
||||
|
Before Width: | Height: | Size: 550 B |
|
Before Width: | Height: | Size: 685 B |
|
Before Width: | Height: | Size: 750 B |
|
Before Width: | Height: | Size: 11 KiB |
|
Before Width: | Height: | Size: 963 B |
|
Before Width: | Height: | Size: 1.2 KiB |
|
Before Width: | Height: | Size: 24 KiB |
|
Before Width: | Height: | Size: 180 KiB |
|
After Width: | Height: | Size: 10 KiB |
@@ -1,10 +0,0 @@
|
||||
[Desktop Entry]
|
||||
Name=Widget Factory
|
||||
Comment=A showcase for GTK+ widgets, designed for testing themes.
|
||||
Exec=gtk3-widget-factory
|
||||
Icon=gtk3-widget-factory
|
||||
Terminal=false
|
||||
Type=Application
|
||||
StartupNotify=true
|
||||
Categories=GTK;
|
||||
NoDisplay=true
|
||||
@@ -24,80 +24,58 @@
|
||||
#include <gtk/gtk.h>
|
||||
|
||||
static void
|
||||
activate_toggle (GSimpleAction *action,
|
||||
GVariant *parameter,
|
||||
gpointer user_data)
|
||||
dark_toggled (GtkCheckMenuItem *item, gpointer data)
|
||||
{
|
||||
GVariant *state;
|
||||
gboolean dark;
|
||||
|
||||
state = g_action_get_state (G_ACTION (action));
|
||||
g_action_change_state (G_ACTION (action), g_variant_new_boolean (!g_variant_get_boolean (state)));
|
||||
g_variant_unref (state);
|
||||
}
|
||||
|
||||
static void
|
||||
change_theme_state (GSimpleAction *action,
|
||||
GVariant *state,
|
||||
gpointer user_data)
|
||||
{
|
||||
GtkSettings *settings = gtk_settings_get_default ();
|
||||
|
||||
g_object_set (G_OBJECT (settings),
|
||||
"gtk-application-prefer-dark-theme",
|
||||
g_variant_get_boolean (state),
|
||||
dark = gtk_check_menu_item_get_active (item);
|
||||
g_object_set (gtk_settings_get_default (),
|
||||
"gtk-application-prefer-dark-theme", dark,
|
||||
NULL);
|
||||
|
||||
g_simple_action_set_state (action, state);
|
||||
}
|
||||
|
||||
static void
|
||||
activate_about (GSimpleAction *action,
|
||||
GVariant *parameter,
|
||||
gpointer user_data)
|
||||
show_about (GtkMenuItem *item, GtkWidget *window)
|
||||
{
|
||||
GtkApplication *app = user_data;
|
||||
GdkPixbuf *pixbuf;
|
||||
const gchar *authors[] = {
|
||||
"Andrea Cimitan",
|
||||
"Cosimo Cecchi",
|
||||
NULL
|
||||
};
|
||||
|
||||
gtk_show_about_dialog (GTK_WINDOW (gtk_application_get_active_window (app)),
|
||||
pixbuf = gdk_pixbuf_new_from_resource ("/logos/gtk-logo-256.png", NULL);
|
||||
|
||||
gtk_show_about_dialog (GTK_WINDOW (window),
|
||||
"program-name", "GTK+ Widget Factory",
|
||||
"version", g_strdup_printf ("%s,\nRunning against GTK+ %d.%d.%d",
|
||||
PACKAGE_VERSION,
|
||||
gtk_get_major_version (),
|
||||
gtk_get_minor_version (),
|
||||
gtk_get_micro_version ()),
|
||||
"copyright", "(C) 1997-2013 The GTK+ Team",
|
||||
"copyright", "(C) 1997-2009 The GTK+ Team",
|
||||
"license-type", GTK_LICENSE_LGPL_2_1,
|
||||
"website", "http://www.gtk.org",
|
||||
"comments", "Program to demonstrate GTK+ themes and widgets",
|
||||
"authors", authors,
|
||||
"logo-icon-name", "gtk3-widget-factory",
|
||||
"logo", pixbuf,
|
||||
"title", "About GTK+ Widget Factory",
|
||||
NULL);
|
||||
|
||||
g_object_unref (pixbuf);
|
||||
}
|
||||
|
||||
static void
|
||||
activate_quit (GSimpleAction *action,
|
||||
GVariant *parameter,
|
||||
gpointer user_data)
|
||||
on_page_toggled (GtkToggleButton *button,
|
||||
GtkNotebook *pages)
|
||||
{
|
||||
GtkApplication *app = user_data;
|
||||
GtkWidget *win;
|
||||
GList *list, *next;
|
||||
gint page;
|
||||
|
||||
list = gtk_application_get_windows (app);
|
||||
while (list)
|
||||
{
|
||||
win = list->data;
|
||||
next = list->next;
|
||||
if (!gtk_toggle_button_get_active (button))
|
||||
return;
|
||||
|
||||
gtk_widget_destroy (GTK_WIDGET (win));
|
||||
|
||||
list = next;
|
||||
}
|
||||
page = GPOINTER_TO_INT (g_object_get_data (G_OBJECT (button), "page"));
|
||||
gtk_notebook_set_current_page (pages, page);
|
||||
}
|
||||
|
||||
static void
|
||||
@@ -129,115 +107,55 @@ dismiss (GtkWidget *button)
|
||||
gtk_revealer_set_reveal_child (GTK_REVEALER (w), FALSE);
|
||||
}
|
||||
|
||||
static gint pulse_time = 250;
|
||||
static guint pulse_id = 0;
|
||||
|
||||
static gboolean
|
||||
pulse_it (GtkWidget *widget)
|
||||
{
|
||||
gtk_progress_bar_pulse (GTK_PROGRESS_BAR (widget));
|
||||
|
||||
pulse_id = g_timeout_add (pulse_time, (GSourceFunc)pulse_it, widget);
|
||||
|
||||
return G_SOURCE_REMOVE;
|
||||
}
|
||||
|
||||
static void
|
||||
update_pulse_time (GtkAdjustment *adjustment, GtkWidget *widget)
|
||||
{
|
||||
gdouble value;
|
||||
|
||||
value = gtk_adjustment_get_value (adjustment);
|
||||
|
||||
/* vary between 50 and 450 */
|
||||
pulse_time = 50 + 4 * value;
|
||||
|
||||
if (value == 100 && pulse_id != 0)
|
||||
{
|
||||
g_source_remove (pulse_id);
|
||||
pulse_id = 0;
|
||||
}
|
||||
else if (value < 100 && pulse_id == 0)
|
||||
{
|
||||
pulse_id = g_timeout_add (pulse_time, (GSourceFunc)pulse_it, widget);
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
startup (GApplication *app)
|
||||
{
|
||||
GtkBuilder *builder;
|
||||
GMenuModel *appmenu;
|
||||
|
||||
builder = gtk_builder_new ();
|
||||
gtk_builder_add_from_resource (builder, "/ui/widget-factory.ui", NULL);
|
||||
|
||||
appmenu = (GMenuModel *)gtk_builder_get_object (builder, "appmenu");
|
||||
|
||||
gtk_application_set_app_menu (GTK_APPLICATION (app), appmenu);
|
||||
|
||||
g_object_unref (builder);
|
||||
}
|
||||
|
||||
static void
|
||||
activate (GApplication *app)
|
||||
{
|
||||
GtkBuilder *builder;
|
||||
GtkWindow *window;
|
||||
GtkWidget *widget;
|
||||
GtkAdjustment *adj;
|
||||
static GActionEntry win_entries[] = {
|
||||
{ "dark", activate_toggle, NULL, "false", change_theme_state }
|
||||
};
|
||||
|
||||
builder = gtk_builder_new ();
|
||||
gtk_builder_add_from_resource (builder, "/ui/widget-factory.ui", NULL);
|
||||
|
||||
window = (GtkWindow *)gtk_builder_get_object (builder, "window");
|
||||
gtk_application_add_window (GTK_APPLICATION (app), window);
|
||||
g_action_map_add_action_entries (G_ACTION_MAP (window),
|
||||
win_entries, G_N_ELEMENTS (win_entries),
|
||||
window);
|
||||
|
||||
widget = (GtkWidget *)gtk_builder_get_object (builder, "progressbar3");
|
||||
pulse_id = g_timeout_add (250, (GSourceFunc)pulse_it, widget);
|
||||
g_signal_connect (gtk_builder_get_object (builder, "adjustment1"),
|
||||
"value-changed",
|
||||
G_CALLBACK (update_pulse_time), widget);
|
||||
|
||||
widget = (GtkWidget *)gtk_builder_get_object (builder, "page2dismiss");
|
||||
g_signal_connect (widget, "clicked", G_CALLBACK (dismiss), NULL);
|
||||
|
||||
widget = (GtkWidget *)gtk_builder_get_object (builder, "page2note");
|
||||
adj = (GtkAdjustment *) gtk_builder_get_object (builder, "adjustment2");
|
||||
g_signal_connect (adj, "value-changed", G_CALLBACK (spin_value_changed), widget);
|
||||
|
||||
gtk_widget_show_all (GTK_WIDGET (window));
|
||||
|
||||
g_object_unref (builder);
|
||||
}
|
||||
|
||||
int
|
||||
main (int argc, char *argv[])
|
||||
{
|
||||
GtkApplication *app;
|
||||
static GActionEntry app_entries[] = {
|
||||
{ "about", activate_about, NULL, NULL, NULL },
|
||||
{ "quit", activate_quit, NULL, NULL, NULL },
|
||||
};
|
||||
GtkBuilder *builder;
|
||||
GtkWidget *window;
|
||||
GtkWidget *widget;
|
||||
GtkWidget *notebook;
|
||||
gboolean dark = FALSE;
|
||||
GtkAdjustment *adj;
|
||||
|
||||
gtk_init (&argc, &argv);
|
||||
|
||||
app = gtk_application_new ("org.gtk.WidgetFactory", 0);
|
||||
if (argc > 1 && (g_strcmp0 (argv[1], "--dark") == 0))
|
||||
dark = TRUE;
|
||||
|
||||
g_action_map_add_action_entries (G_ACTION_MAP (app),
|
||||
app_entries, G_N_ELEMENTS (app_entries),
|
||||
app);
|
||||
builder = gtk_builder_new ();
|
||||
gtk_builder_add_from_resource (builder, "/ui/widget-factory.ui", NULL);
|
||||
|
||||
g_signal_connect (app, "startup", G_CALLBACK (startup), NULL);
|
||||
g_signal_connect (app, "activate", G_CALLBACK (activate), NULL);
|
||||
window = GTK_WIDGET (gtk_builder_get_object (builder, "window"));
|
||||
gtk_builder_connect_signals (builder, NULL);
|
||||
|
||||
g_application_run (G_APPLICATION (app), argc, argv);
|
||||
widget = (GtkWidget*) gtk_builder_get_object (builder, "darkmenuitem");
|
||||
g_signal_connect (widget, "toggled", G_CALLBACK (dark_toggled), NULL);
|
||||
gtk_check_menu_item_set_active (GTK_CHECK_MENU_ITEM (widget), dark);
|
||||
|
||||
notebook = (GtkWidget*) gtk_builder_get_object (builder, "toplevel_notebook");
|
||||
widget = (GtkWidget*) gtk_builder_get_object (builder, "togglepage1");
|
||||
g_object_set_data (G_OBJECT (widget), "page", GINT_TO_POINTER (0));
|
||||
g_signal_connect (widget, "toggled", G_CALLBACK (on_page_toggled), notebook);
|
||||
|
||||
widget = (GtkWidget*) gtk_builder_get_object (builder, "togglepage2");
|
||||
g_object_set_data (G_OBJECT (widget), "page", GINT_TO_POINTER (1));
|
||||
g_signal_connect (widget, "toggled", G_CALLBACK (on_page_toggled), notebook);
|
||||
|
||||
widget = (GtkWidget*) gtk_builder_get_object (builder, "aboutmenuitem");
|
||||
g_signal_connect (widget, "activate", G_CALLBACK (show_about), window);
|
||||
|
||||
widget = (GtkWidget*) gtk_builder_get_object (builder, "page2dismiss");
|
||||
g_signal_connect (widget, "clicked", G_CALLBACK (dismiss), NULL);
|
||||
|
||||
widget = (GtkWidget*) gtk_builder_get_object (builder, "page2note");
|
||||
adj = (GtkAdjustment *) gtk_builder_get_object (builder, "adjustment2");
|
||||
g_signal_connect (adj, "value-changed",
|
||||
G_CALLBACK (spin_value_changed), widget);
|
||||
|
||||
g_object_unref (G_OBJECT (builder));
|
||||
|
||||
gtk_widget_show (window);
|
||||
gtk_main ();
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -1,5 +1,8 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<gresources>
|
||||
<gresource prefix="/logos">
|
||||
<file>gtk-logo-256.png</file>
|
||||
</gresource>
|
||||
<gresource prefix="/ui">
|
||||
<file preprocess="xml-stripblanks">widget-factory.ui</file>
|
||||
</gresource>
|
||||
|
||||
@@ -1,29 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<interface>
|
||||
<!-- interface-requires gtk+ 3.0 -->
|
||||
<menu id="appmenu">
|
||||
<section>
|
||||
<item>
|
||||
<attribute name="label" translatable="yes">About</attribute>
|
||||
<attribute name="action">app.about</attribute>
|
||||
</item>
|
||||
</section>
|
||||
<section>
|
||||
<item>
|
||||
<attribute name="label" translatable="yes">_Quit</attribute>
|
||||
<attribute name="action">app.quit</attribute>
|
||||
<attribute name="accel"><Primary>q</attribute>
|
||||
</item>
|
||||
</section>
|
||||
</menu>
|
||||
<menu id='gear_menu'>
|
||||
<section>
|
||||
<item>
|
||||
<attribute name='label' translatable='yes'>Dark Theme</attribute>
|
||||
<attribute name='action'>win.dark</attribute>
|
||||
</item>
|
||||
</section>
|
||||
</menu>
|
||||
<object class="GtkAdjustment" id="adjustment1">
|
||||
<property name="upper">100</property>
|
||||
<property name="value">50</property>
|
||||
@@ -95,70 +72,515 @@ Suspendisse feugiat quam quis dolor accumsan cursus. </property>
|
||||
Spanish
|
||||
Uyghur</property>
|
||||
</object>
|
||||
<object class="GtkApplicationWindow" id="window">
|
||||
<object class="GtkAccelGroup" id="accelgroup1"/>
|
||||
<object class="GtkWindow" id="window">
|
||||
<property name="can_focus">False</property>
|
||||
<property name="title">GTK+ Widget Factory</property>
|
||||
<signal name="destroy" handler="gtk_main_quit" swapped="no"/>
|
||||
<signal name="delete-event" handler="gtk_false" swapped="no"/>
|
||||
<child type="titlebar">
|
||||
<object class="GtkHeaderBar" id="headerbar1">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="show-close-button">True</property>
|
||||
<child type="title">
|
||||
<object class="GtkStackSwitcher" id="stack_switcher">
|
||||
<property name="visible">True</property>
|
||||
<property name="stack">toplevel_stack</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkMenuButton" id="gear_menu_button">
|
||||
<property name="visible">True</property>
|
||||
<property name="valign">center</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="menu_model">gear_menu</property>
|
||||
<style>
|
||||
<class name="image-button"/>
|
||||
</style>
|
||||
<child>
|
||||
<object class="GtkImage" id="gear_image">
|
||||
<property name="visible">True</property>
|
||||
<property name="icon_size">1</property>
|
||||
<property name="icon_name">emblem-system-symbolic</property>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="pack_type">end</property>
|
||||
</packing>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkBox" id="box1">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="orientation">vertical</property>
|
||||
<property name="border-width">10</property>
|
||||
<child>
|
||||
<object class="GtkStack" id="toplevel_stack">
|
||||
<object class="GtkMenuBar" id="menubar1">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<child>
|
||||
<object class="GtkMenuItem" id="menuitem1">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="use_action_appearance">False</property>
|
||||
<property name="label" translatable="yes">_File</property>
|
||||
<property name="use_underline">True</property>
|
||||
<child type="submenu">
|
||||
<object class="GtkMenu" id="menu1">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<child>
|
||||
<object class="GtkMenuItem" id="menuitem101">
|
||||
<property name="label" translatable="yes">_New</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="use_action_appearance">False</property>
|
||||
<property name="use_underline">True</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkMenuItem" id="menuitem102">
|
||||
<property name="label" translatable="yes">_Open</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="use_action_appearance">False</property>
|
||||
<property name="use_underline">True</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkMenuItem" id="menuitem103">
|
||||
<property name="label" translatable="yes">_Save</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="use_action_appearance">False</property>
|
||||
<property name="use_underline">True</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkMenuItem" id="menuitem104">
|
||||
<property name="label" translatable="yes">Save _As</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="use_action_appearance">False</property>
|
||||
<property name="use_underline">True</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkSeparatorMenuItem" id="separatormenuitem1">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="use_action_appearance">False</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkMenuItem" id="menuitem105">
|
||||
<property name="label" translatable="yes">_Quit</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="use_action_appearance">False</property>
|
||||
<property name="use_underline">True</property>
|
||||
<signal name="activate" handler="gtk_main_quit" swapped="no"/>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkMenuItem" id="menuitem2">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="use_action_appearance">False</property>
|
||||
<property name="label" translatable="yes">_Edit</property>
|
||||
<property name="use_underline">True</property>
|
||||
<child type="submenu">
|
||||
<object class="GtkMenu" id="menu2">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<child>
|
||||
<object class="GtkMenuItem" id="menuitem106">
|
||||
<property name="label" translatable="yes">Cu_t</property>
|
||||
<property name="accel_group">accelgroup1</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="use_action_appearance">False</property>
|
||||
<property name="use_underline">True</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkMenuItem" id="menuitem107">
|
||||
<property name="label" translatable="yes">_Copy</property>
|
||||
<property name="accel_group">accelgroup1</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="use_action_appearance">False</property>
|
||||
<property name="use_underline">True</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkMenuItem" id="menuitem108">
|
||||
<property name="label" translatable="yes">_Paste</property>
|
||||
<property name="accel_group">accelgroup1</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="use_action_appearance">False</property>
|
||||
<property name="use_underline">True</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkMenuItem" id="menuitem109">
|
||||
<property name="label" translatable="yes">_Delete</property>
|
||||
<property name="accel_group">accelgroup1</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="use_action_appearance">False</property>
|
||||
<property name="use_underline">True</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkImageMenuItem" id="togglesmenuitem">
|
||||
<property name="label">Checks & Radios</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="use_action_appearance">False</property>
|
||||
<property name="use_underline">True</property>
|
||||
<property name="use_stock">False</property>
|
||||
<child type="submenu">
|
||||
<object class="GtkMenu" id="togglessubmenu">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<child>
|
||||
<object class="GtkCheckMenuItem" id="checkmenuitem1">
|
||||
<property name="label">_Check</property>
|
||||
<property name="active">True</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="sensitive">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="use_action_appearance">False</property>
|
||||
<property name="use_underline">True</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkCheckMenuItem" id="checkmenuitem2">
|
||||
<property name="label">_Check</property>
|
||||
<property name="active">True</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="sensitive">False</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="use_action_appearance">False</property>
|
||||
<property name="use_underline">True</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkCheckMenuItem" id="checkmenuitem3">
|
||||
<property name="label">_Check</property>
|
||||
<property name="active">False</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="inconsistent">True</property>
|
||||
<property name="sensitive">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="use_action_appearance">False</property>
|
||||
<property name="use_underline">True</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkCheckMenuItem" id="checkmenuitem4">
|
||||
<property name="label">_Check</property>
|
||||
<property name="active">False</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="sensitive">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="use_action_appearance">False</property>
|
||||
<property name="use_underline">True</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkCheckMenuItem" id="checkmenuitem5">
|
||||
<property name="label">_Check</property>
|
||||
<property name="active">False</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="sensitive">False</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="use_action_appearance">False</property>
|
||||
<property name="use_underline">True</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkCheckMenuItem" id="checkmenuitem6">
|
||||
<property name="label">_Check</property>
|
||||
<property name="active">False</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="inconsistent">True</property>
|
||||
<property name="sensitive">False</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="use_action_appearance">False</property>
|
||||
<property name="use_underline">True</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkSeparatorMenuItem" id="separatormenuitem">
|
||||
<property name="visible">True</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkRadioMenuItem" id="radiomenuitem1">
|
||||
<property name="label">_Radio</property>
|
||||
<property name="active">True</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="sensitive">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="use_action_appearance">False</property>
|
||||
<property name="use_underline">True</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkRadioMenuItem" id="radiomenuitem2">
|
||||
<property name="label">_Radio</property>
|
||||
<property name="active">True</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="sensitive">False</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="use_action_appearance">False</property>
|
||||
<property name="use_underline">True</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkRadioMenuItem" id="radiomenuitem3">
|
||||
<property name="label">_Radio</property>
|
||||
<property name="active">False</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="inconsistent">True</property>
|
||||
<property name="sensitive">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="use_action_appearance">False</property>
|
||||
<property name="use_underline">True</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkRadioMenuItem" id="radiomenuitem4">
|
||||
<property name="label">_Radio</property>
|
||||
<property name="active">False</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="sensitive">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="use_action_appearance">False</property>
|
||||
<property name="use_underline">True</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkRadioMenuItem" id="radiomenuitem5">
|
||||
<property name="label">_Radio</property>
|
||||
<property name="active">False</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="sensitive">False</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="use_action_appearance">False</property>
|
||||
<property name="use_underline">True</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkRadioMenuItem" id="radiomenuitem6">
|
||||
<property name="label">_Radio</property>
|
||||
<property name="active">False</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="inconsistent">True</property>
|
||||
<property name="sensitive">False</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="use_action_appearance">False</property>
|
||||
<property name="use_underline">True</property>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkMenuItem" id="menuitem3">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="use_action_appearance">False</property>
|
||||
<property name="label" translatable="yes">_View</property>
|
||||
<property name="use_underline">True</property>
|
||||
<child type="submenu">
|
||||
<object class="GtkMenu" id="view-menu">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<child>
|
||||
<object class="GtkCheckMenuItem" id="darkmenuitem">
|
||||
<property name="label">_Dark theme</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="use_action_appearance">False</property>
|
||||
<property name="use_underline">True</property>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkMenuItem" id="menuitem4">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="use_action_appearance">False</property>
|
||||
<property name="label" translatable="yes">_Help</property>
|
||||
<property name="use_underline">True</property>
|
||||
<child type="submenu">
|
||||
<object class="GtkMenu" id="menu3">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<child>
|
||||
<object class="GtkMenuItem" id="aboutmenuitem">
|
||||
<property name="label" translatable="yes">_About</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="use_action_appearance">False</property>
|
||||
<property name="use_underline">True</property>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="position">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkToolbar" id="toolbar1">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<style>
|
||||
<class name="primary-toolbar"/>
|
||||
</style>
|
||||
<child>
|
||||
<object class="GtkToolButton" id="toolbutton2">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="use_action_appearance">False</property>
|
||||
<property name="label" translatable="yes">_Save</property>
|
||||
<property name="use_underline">True</property>
|
||||
<property name="icon-name">document-save</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="homogeneous">True</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkToolButton" id="toolbutton1">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="use_action_appearance">False</property>
|
||||
<property name="label" translatable="yes">Open</property>
|
||||
<property name="use_underline">True</property>
|
||||
<property name="icon-name">document-open</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="homogeneous">True</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkSeparatorToolItem" id="toolbutton3">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="use_action_appearance">False</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="homogeneous">True</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkToolButton" id="toolbutton4">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="use_action_appearance">False</property>
|
||||
<property name="label" translatable="yes">Find</property>
|
||||
<property name="use_underline">True</property>
|
||||
<property name="icon_name">edit-find</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="homogeneous">True</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkToolItem" id="toolbutton4a">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="use_action_appearance">False</property>
|
||||
<style>
|
||||
<class name="raised"/>
|
||||
</style>
|
||||
<child>
|
||||
<object class="GtkBox" id="extrabox2">
|
||||
<property name="visible">True</property>
|
||||
<property name="orientation">horizontal</property>
|
||||
<property name="homogeneous">True</property>
|
||||
<property name="halign">center</property>
|
||||
<property name="hexpand">True</property>
|
||||
<style>
|
||||
<class name="linked"/>
|
||||
</style>
|
||||
<child>
|
||||
<object class="GtkRadioButton" id="togglepage1">
|
||||
<property name="visible">True</property>
|
||||
<property name="label">Page 1</property>
|
||||
<property name="draw-indicator">False</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkRadioButton" id="togglepage2">
|
||||
<property name="visible">True</property>
|
||||
<property name="label">Page 2</property>
|
||||
<property name="draw-indicator">False</property>
|
||||
<property name="group">togglepage1</property>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">True</property>
|
||||
<property name="homogeneous">True</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkToolItem" id="toolbutton5">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="use_action_appearance">False</property>
|
||||
<child>
|
||||
<placeholder/>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="homogeneous">True</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkToolItem" id="toolbutton6">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="use_action_appearance">False</property>
|
||||
<child>
|
||||
<object class="GtkSearchEntry" id="entry3">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="invisible_char">•</property>
|
||||
<property name="placeholder-text" translatable="yes">search...</property>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
</packing>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="position">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkNotebook" id="toplevel_notebook">
|
||||
<property name="visible">True</property>
|
||||
<property name="show-tabs">False</property>
|
||||
<child>
|
||||
<object class="GtkBox" id="page1">
|
||||
<property name="visible">True</property>
|
||||
<property name="orientation">vertical</property>
|
||||
<property name="spacing">10</property>
|
||||
<child>
|
||||
<object class="GtkBox" id="box2">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="spacing">10</property>
|
||||
<property name="spacing">6</property>
|
||||
<child>
|
||||
<object class="GtkBox" id="box3">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="orientation">vertical</property>
|
||||
<property name="spacing">10</property>
|
||||
<property name="spacing">4</property>
|
||||
<child>
|
||||
<object class="GtkComboBoxText" id="comboboxtext1">
|
||||
<property name="visible">True</property>
|
||||
@@ -296,9 +718,7 @@ Suspendisse feugiat quam quis dolor accumsan cursus. </property>
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="row_homogeneous">True</property>
|
||||
<property name="column_homogeneous">False</property>
|
||||
<property name="column_spacing">18</property>
|
||||
<property name="row_spacing">6</property>
|
||||
<property name="column_homogeneous">True</property>
|
||||
<child>
|
||||
<object class="GtkCheckButton" id="checkbutton1">
|
||||
<property name="label" translatable="yes">checkbutton</property>
|
||||
@@ -525,6 +945,30 @@ Suspendisse feugiat quam quis dolor accumsan cursus. </property>
|
||||
<property name="height">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkSwitch" id="switch1">
|
||||
<property name="visible">True</property>
|
||||
<property name="sensitive">True</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left_attach">0</property>
|
||||
<property name="top_attach">6</property>
|
||||
<property name="width">1</property>
|
||||
<property name="height">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkSwitch" id="switch2">
|
||||
<property name="visible">True</property>
|
||||
<property name="sensitive">False</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left_attach">1</property>
|
||||
<property name="top_attach">6</property>
|
||||
<property name="width">1</property>
|
||||
<property name="height">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkSpinner" id="spinner1">
|
||||
<property name="visible">True</property>
|
||||
@@ -588,6 +1032,7 @@ Suspendisse feugiat quam quis dolor accumsan cursus. </property>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">False</property>
|
||||
<property name="padding">4</property>
|
||||
<property name="position">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
@@ -605,10 +1050,11 @@ Suspendisse feugiat quam quis dolor accumsan cursus. </property>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkBox" id="box19">
|
||||
<property name="width_request">110</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="orientation">vertical</property>
|
||||
<property name="spacing">6</property>
|
||||
<property name="spacing">4</property>
|
||||
<child>
|
||||
<object class="GtkToggleButton" id="togglebutton1">
|
||||
<property name="label" translatable="yes">togglebutton</property>
|
||||
@@ -747,15 +1193,10 @@ Suspendisse feugiat quam quis dolor accumsan cursus. </property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkLinkButton" id="linkbutton1">
|
||||
<property name="label" translatable="yes">link button</property>
|
||||
<object class="GtkLevelBar" id="levelbar1">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="receives_default">True</property>
|
||||
<property name="has_tooltip">True</property>
|
||||
<property name="use_action_appearance">False</property>
|
||||
<property name="relief">none</property>
|
||||
<property name="uri">http://www.gtk.org</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="value">0.6</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
@@ -764,9 +1205,13 @@ Suspendisse feugiat quam quis dolor accumsan cursus. </property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkSwitch" id="switch1">
|
||||
<object class="GtkLevelBar" id="levelbar2">
|
||||
<property name="visible">True</property>
|
||||
<property name="sensitive">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="min-value">0</property>
|
||||
<property name="max-value">5</property>
|
||||
<property name="value">2</property>
|
||||
<property name="mode">1</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
@@ -774,17 +1219,6 @@ Suspendisse feugiat quam quis dolor accumsan cursus. </property>
|
||||
<property name="position">10</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkSwitch" id="switch2">
|
||||
<property name="visible">True</property>
|
||||
<property name="sensitive">False</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="position">11</property>
|
||||
</packing>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
@@ -809,13 +1243,14 @@ Suspendisse feugiat quam quis dolor accumsan cursus. </property>
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="orientation">vertical</property>
|
||||
<property name="spacing">6</property>
|
||||
<property name="spacing">4</property>
|
||||
<child>
|
||||
<object class="GtkBox" id="box21">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="orientation">vertical</property>
|
||||
<property name="spacing">6</property>
|
||||
<property name="spacing">8</property>
|
||||
<property name="homogeneous">True</property>
|
||||
<child>
|
||||
<object class="GtkProgressBar" id="progressbar1">
|
||||
<property name="visible">True</property>
|
||||
@@ -841,46 +1276,6 @@ Suspendisse feugiat quam quis dolor accumsan cursus. </property>
|
||||
<property name="position">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkProgressBar" id="progressbar3">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="fraction">0.5</property>
|
||||
<property name="show_text">True</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">False</property>
|
||||
<property name="position">2</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkLevelBar" id="levelbar1">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="value">0.6</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="position">10</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkLevelBar" id="levelbar2">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="min-value">0</property>
|
||||
<property name="max-value">5</property>
|
||||
<property name="value">2</property>
|
||||
<property name="mode">1</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="position">11</property>
|
||||
</packing>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
@@ -954,7 +1349,7 @@ Suspendisse feugiat quam quis dolor accumsan cursus. </property>
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="vexpand">True</property>
|
||||
<property name="spacing">6</property>
|
||||
<property name="spacing">4</property>
|
||||
<child>
|
||||
<object class="GtkProgressBar" id="progressbar5">
|
||||
<property name="visible">True</property>
|
||||
@@ -994,7 +1389,7 @@ Suspendisse feugiat quam quis dolor accumsan cursus. </property>
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="vexpand">True</property>
|
||||
<property name="spacing">6</property>
|
||||
<property name="spacing">4</property>
|
||||
<child>
|
||||
<object class="GtkScale" id="scale3">
|
||||
<property name="height_request">100</property>
|
||||
@@ -1049,6 +1444,29 @@ Suspendisse feugiat quam quis dolor accumsan cursus. </property>
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="orientation">vertical</property>
|
||||
<child>
|
||||
<object class="GtkHandleBox" id="handlebox1">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<child>
|
||||
<object class="GtkLinkButton" id="linkbutton1">
|
||||
<property name="label" translatable="yes">link button</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="receives_default">True</property>
|
||||
<property name="has_tooltip">True</property>
|
||||
<property name="use_action_appearance">False</property>
|
||||
<property name="relief">none</property>
|
||||
<property name="uri">http://www.gtk.org</property>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="position">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkExpander" id="expander1">
|
||||
<property name="visible">True</property>
|
||||
@@ -1058,7 +1476,6 @@ Suspendisse feugiat quam quis dolor accumsan cursus. </property>
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="shadow_type">in</property>
|
||||
<property name="hscrollbar_policy">never</property>
|
||||
<child>
|
||||
<object class="GtkViewport" id="viewport1">
|
||||
<property name="visible">True</property>
|
||||
@@ -1067,8 +1484,6 @@ Suspendisse feugiat quam quis dolor accumsan cursus. </property>
|
||||
<object class="GtkLabel" id="label20">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="wrap">True</property>
|
||||
<property name="wrap_mode">word</property>
|
||||
<property name="label" translatable="yes">Lorem ipsum dolor sit amet, consectetur adipiscing elit.
|
||||
Nullam fringilla, est ut feugiat ultrices, elit lacus ultricies nibh, id commodo tortor nisi id elit.
|
||||
Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos.
|
||||
@@ -1112,7 +1527,7 @@ Suspendisse feugiat quam quis dolor accumsan cursus. </property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="fill">False</property>
|
||||
<property name="position">4</property>
|
||||
</packing>
|
||||
</child>
|
||||
@@ -1134,7 +1549,6 @@ Suspendisse feugiat quam quis dolor accumsan cursus. </property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="orientation">vertical</property>
|
||||
<property name="homogeneous">True</property>
|
||||
<property name="spacing">6</property>
|
||||
<child>
|
||||
<object class="GtkFrame" id="frame1">
|
||||
<property name="visible">True</property>
|
||||
@@ -1282,7 +1696,7 @@ Suspendisse feugiat quam quis dolor accumsan cursus. </property>
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="orientation">vertical</property>
|
||||
<property name="spacing">6</property>
|
||||
<property name="spacing">4</property>
|
||||
<child>
|
||||
<object class="GtkScrolledWindow" id="scrolledwindow1">
|
||||
<property name="width_request">150</property>
|
||||
@@ -1360,13 +1774,11 @@ Suspendisse feugiat quam quis dolor accumsan cursus. </property>
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="shadow_type">in</property>
|
||||
<property name="hscrollbar_policy">never</property>
|
||||
<child>
|
||||
<object class="GtkTextView" id="textview1">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="buffer">textbuffer1</property>
|
||||
<property name="wrap_mode">2</property>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
@@ -1380,6 +1792,7 @@ Suspendisse feugiat quam quis dolor accumsan cursus. </property>
|
||||
<packing>
|
||||
<property name="expand">True</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="padding">6</property>
|
||||
<property name="position">8</property>
|
||||
</packing>
|
||||
</child>
|
||||
@@ -1387,6 +1800,7 @@ Suspendisse feugiat quam quis dolor accumsan cursus. </property>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="padding">10</property>
|
||||
<property name="position">2</property>
|
||||
</packing>
|
||||
</child>
|
||||
@@ -1405,6 +1819,9 @@ Suspendisse feugiat quam quis dolor accumsan cursus. </property>
|
||||
<object class="GtkBox" id="box5">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="margin_left">5</property>
|
||||
<property name="margin_right">5</property>
|
||||
<property name="margin_bottom">5</property>
|
||||
<property name="spacing">10</property>
|
||||
<property name="homogeneous">True</property>
|
||||
<child>
|
||||
@@ -1734,10 +2151,6 @@ Suspendisse feugiat quam quis dolor accumsan cursus. </property>
|
||||
</packing>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="name">page1</property>
|
||||
<property name="title" translatable="yes">Page 1</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkOverlay" id="page2">
|
||||
@@ -1756,8 +2169,8 @@ Suspendisse feugiat quam quis dolor accumsan cursus. </property>
|
||||
<property name="visible">True</property>
|
||||
<property name="margin-top">10</property>
|
||||
<property name="margin-bottom">10</property>
|
||||
<property name="margin-start">10</property>
|
||||
<property name="margin-end">10</property>
|
||||
<property name="margin-left">10</property>
|
||||
<property name="margin-right">10</property>
|
||||
<property name="spacing">20</property>
|
||||
<child>
|
||||
<object class="GtkLabel" id="page2note">
|
||||
@@ -1796,7 +2209,7 @@ Suspendisse feugiat quam quis dolor accumsan cursus. </property>
|
||||
<object class="GtkBox" id="page2box1">
|
||||
<property name="visible">True</property>
|
||||
<property name="orientation">horizontal</property>
|
||||
<property name="spacing">6</property>
|
||||
<property name="spacing">4</property>
|
||||
<child>
|
||||
<object class="GtkSpinButton" id="verticalspin1">
|
||||
<property name="visible">True</property>
|
||||
@@ -1860,7 +2273,6 @@ Suspendisse feugiat quam quis dolor accumsan cursus. </property>
|
||||
<object class="GtkScrolledWindow" id="swo">
|
||||
<property name="visible">True</property>
|
||||
<property name="shadow-type">none</property>
|
||||
<property name="hscrollbar_policy">never</property>
|
||||
<child>
|
||||
<object class="GtkTextView" id="tvo">
|
||||
<property name="visible">True</property>
|
||||
@@ -1878,8 +2290,7 @@ Suspendisse feugiat quam quis dolor accumsan cursus. </property>
|
||||
<child>
|
||||
<object class="GtkImage" id="imageo">
|
||||
<property name="visible">True</property>
|
||||
<property name="icon-name">gtk3-widget-factory</property>
|
||||
<property name="pixel-size">256</property>
|
||||
<property name="resource">/logos/gtk-logo-256.png</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="name">page2</property>
|
||||
@@ -1898,14 +2309,24 @@ Suspendisse feugiat quam quis dolor accumsan cursus. </property>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="name">page2</property>
|
||||
<property name="title" translatable="yes">Page 2</property>
|
||||
</packing>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkStatusbar" id="statusbar1">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="position">5</property>
|
||||
</packing>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
<accel-groups>
|
||||
<group name="accelgroup1"/>
|
||||
</accel-groups>
|
||||
</object>
|
||||
</interface>
|
||||
|
||||
@@ -80,10 +80,6 @@
|
||||
<title>Index of new symbols in 3.10</title>
|
||||
<xi:include href="xml/api-index-3.10.xml"><xi:fallback /></xi:include>
|
||||
</index>
|
||||
<index id="api-index-3-12" role="3.12">
|
||||
<title>Index of new symbols in 3.12</title>
|
||||
<xi:include href="xml/api-index-3.12.xml"><xi:fallback /></xi:include>
|
||||
</index>
|
||||
|
||||
<xi:include href="xml/annotation-glossary.xml"><xi:fallback /></xi:include>
|
||||
|
||||
|
||||
@@ -387,7 +387,6 @@ gdk_window_begin_move_drag_for_device
|
||||
gdk_window_constrain_size
|
||||
gdk_window_beep
|
||||
gdk_window_get_scale_factor
|
||||
gdk_window_set_opaque_region
|
||||
|
||||
<SUBSECTION>
|
||||
gdk_window_get_clip_region
|
||||
@@ -491,8 +490,6 @@ gdk_window_get_device_events
|
||||
gdk_window_set_device_events
|
||||
gdk_window_get_source_events
|
||||
gdk_window_set_source_events
|
||||
gdk_window_get_event_compression
|
||||
gdk_window_set_event_compression
|
||||
|
||||
<SUBSECTION>
|
||||
gdk_offscreen_window_get_surface
|
||||
@@ -811,8 +808,6 @@ gdk_event_get_scroll_direction
|
||||
gdk_event_get_scroll_deltas
|
||||
gdk_event_get_state
|
||||
gdk_event_get_time
|
||||
gdk_event_get_window
|
||||
gdk_event_get_event_type
|
||||
GdkEventSequence
|
||||
gdk_event_get_event_sequence
|
||||
gdk_event_request_motions
|
||||
@@ -902,12 +897,10 @@ GdkCursor
|
||||
GdkCursorType
|
||||
gdk_cursor_new
|
||||
gdk_cursor_new_from_pixbuf
|
||||
gdk_cursor_new_from_surface
|
||||
gdk_cursor_new_from_name
|
||||
gdk_cursor_new_for_display
|
||||
gdk_cursor_get_display
|
||||
gdk_cursor_get_image
|
||||
gdk_cursor_get_surface
|
||||
gdk_cursor_get_cursor_type
|
||||
gdk_cursor_ref
|
||||
gdk_cursor_unref
|
||||
@@ -994,7 +987,6 @@ gdk_x11_display_error_trap_push
|
||||
gdk_x11_display_error_trap_pop
|
||||
gdk_x11_display_error_trap_pop_ignored
|
||||
gdk_x11_display_set_cursor_theme
|
||||
gdk_x11_display_set_window_scale
|
||||
gdk_x11_register_standard_event_type
|
||||
gdk_x11_screen_get_screen_number
|
||||
gdk_x11_screen_get_xscreen
|
||||
@@ -1002,8 +994,6 @@ gdk_x11_screen_get_window_manager_name
|
||||
gdk_x11_screen_get_monitor_output
|
||||
gdk_x11_screen_lookup_visual
|
||||
gdk_x11_screen_supports_net_wm_hint
|
||||
gdk_x11_screen_get_number_of_desktops
|
||||
gdk_x11_screen_get_current_desktop
|
||||
gdk_x11_window_foreign_new_for_display
|
||||
gdk_x11_window_lookup_for_display
|
||||
gdk_x11_window_get_xid
|
||||
@@ -1011,11 +1001,7 @@ gdk_x11_window_set_hide_titlebar_when_maximized
|
||||
gdk_x11_window_set_theme_variant
|
||||
gdk_x11_window_set_user_time
|
||||
gdk_x11_window_move_to_current_desktop
|
||||
gdk_x11_window_move_to_desktop
|
||||
gdk_x11_window_get_desktop
|
||||
gdk_x11_window_set_utf8_property
|
||||
gdk_x11_window_set_frame_extents
|
||||
gdk_x11_window_set_frame_sync_enabled
|
||||
gdk_x11_get_default_root_xwindow
|
||||
gdk_x11_get_default_screen
|
||||
gdk_x11_get_default_xdisplay
|
||||
|
||||
@@ -421,9 +421,7 @@ HTML_IMAGES = \
|
||||
$(srcdir)/images/getting-started-app7.png \
|
||||
$(srcdir)/images/getting-started-app8.png \
|
||||
$(srcdir)/images/getting-started-app9.png \
|
||||
$(srcdir)/images/getting-started-app10.png \
|
||||
$(srcdir)/images/exampleapp.png \
|
||||
$(srcdir)/images/flow-box.png
|
||||
$(srcdir)/images/exampleapp.png
|
||||
|
||||
# Extra options to supply to gtkdoc-fixref
|
||||
FIXXREF_OPTIONS=--extra-dir=../gdk/html \
|
||||
|
||||
@@ -30,172 +30,77 @@
|
||||
background color of all widgets with the same method.
|
||||
</para>
|
||||
|
||||
<refsect2 id="drawing model windows">
|
||||
<title>Windows and events</title>
|
||||
<para>
|
||||
Programs that run in a windowing system generally create
|
||||
rectangular regions in the screen called
|
||||
<firstterm>windows</firstterm>. Traditional windowing systems
|
||||
do not automatically save the graphical content of windows, and
|
||||
instead ask client programs to repaint those windows whenever it
|
||||
is needed. For example, if a window that is stacked below other
|
||||
windows gets raised to the top, then a client program has to
|
||||
repaint the area that was previously obscured. When the
|
||||
windowing system asks a client program to redraw part of a
|
||||
window, it sends an <firstterm>exposure event</firstterm> to the
|
||||
program for that window.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
Here, "windows" means "rectangular regions with automatic
|
||||
clipping", instead of "toplevel application windows". Most
|
||||
windowing systems support nested windows, where the contents of
|
||||
child windows get clipped by the boundaries of their parents.
|
||||
Although GTK+ and GDK in particular may run on a windowing
|
||||
system with no such notion of nested windows, GDK presents the
|
||||
illusion of being under such a system. A toplevel window may
|
||||
contain many subwindows and sub-subwindows, for example, one for
|
||||
the menu bar, one for the document area, one for each scrollbar,
|
||||
and one for the status bar. In addition, controls that receive
|
||||
user input, such as clickable buttons, are likely to have their
|
||||
own subwindows as well.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
Generally, the drawing cycle begins when GTK+ receives an
|
||||
exposure event from the underlying windowing system: if the
|
||||
user drags a window over another one, the windowing system will
|
||||
tell the underlying window that it needs to repaint itself. The
|
||||
drawing cycle can also be initiated when a widget itself decides
|
||||
that it needs to update its display. For example, when the user
|
||||
types a character in a <link
|
||||
linkend="GtkEntry"><classname>GtkEntry</classname></link>
|
||||
widget, the entry asks GTK+ to queue a redraw operation for
|
||||
itself.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
The following sections describe how GTK+ decides which widgets
|
||||
need to be repainted, and how widgets work internally in terms
|
||||
of the resources they use from the windowing system.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
A <link linkend="GdkWindow"><classname>GdkWindow</classname></link>
|
||||
represents a window from the underlying windowing system on which GTK+
|
||||
is running. For example, on X11 it corresponds to a
|
||||
<type>Window</type>; on Win32, it corresponds to a <type>HANDLE</type>.
|
||||
The windowing system generates events for these windows. The GDK
|
||||
interface to the windowing system translates such native events into
|
||||
<link linkend="GdkEvent"><structname>GdkEvent</structname></link>
|
||||
structures and sends them on to the GTK layer. In turn, the GTK layer
|
||||
finds the widget that corresponds to a particular
|
||||
<classname>GdkWindow</classname> and emits the corresponding event
|
||||
signals on that widget.
|
||||
</para>
|
||||
|
||||
<refsect2 id="emission of the draw event">
|
||||
<title>Emission of the draw event</title>
|
||||
|
||||
<para>
|
||||
Programs that run in a windowing system generally create
|
||||
rectangular regions in the screen called
|
||||
<firstterm>windows</firstterm>. Traditional windowing systems
|
||||
do not automatically save the graphical content of windows, and
|
||||
instead ask client programs to repaint those windows whenever it
|
||||
is needed. For example, if a window that is stacked below other
|
||||
windows gets raised to the top, then a client program has to
|
||||
repaint the area that was previously obscured. When the
|
||||
windowing system asks a client program to redraw part of a
|
||||
window, it sends an <firstterm>exposure event</firstterm> to the
|
||||
program for that window.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
Here, "windows" means "rectangular regions with automatic
|
||||
clipping", instead of "toplevel application windows". Most
|
||||
windowing systems support nested windows, where the contents of
|
||||
child windows get clipped by the boundaries of their parents.
|
||||
Although GTK+ and GDK in particular may run on a windowing
|
||||
system with no such notion of nested windows, GDK presents the
|
||||
illusion of being under such a system. A toplevel window may
|
||||
contain many subwindows and sub-subwindows, for example, one for
|
||||
the menu bar, one for the document area, one for each scrollbar,
|
||||
and one for the status bar. In addition, controls that receive
|
||||
user input, such as clickable buttons, are likely to have their
|
||||
own subwindows as well.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
In practice, most windows in modern GTK+ application are client-side
|
||||
constructs. Only few windows (in particular toplevel windows) are
|
||||
<emphasis>native</emphasis>, which means that they represent a
|
||||
window from the underlying windowing system on which GTK+ is running.
|
||||
For example, on X11 it corresponds to a <type>Window</type>; on Win32,
|
||||
it corresponds to a <type>HANDLE</type>.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
Generally, the drawing cycle begins when GTK+ receives an
|
||||
exposure event from the underlying windowing system: if the
|
||||
user drags a window over another one, the windowing system will
|
||||
tell the underlying window that it needs to repaint itself. The
|
||||
drawing cycle can also be initiated when a widget itself decides
|
||||
that it needs to update its display. For example, when the user
|
||||
types a character in a <link
|
||||
linkend="GtkEntry"><classname>GtkEntry</classname></link>
|
||||
widget, the entry asks GTK+ to queue a redraw operation for
|
||||
itself.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
The windowing system generates events for native windows. The GDK
|
||||
interface to the windowing system translates such native events into
|
||||
<link linkend="GdkEvent"><structname>GdkEvent</structname></link>
|
||||
structures and sends them on to the GTK layer. In turn, the GTK layer
|
||||
finds the widget that corresponds to a particular
|
||||
<classname>GdkWindow</classname> and emits the corresponding event
|
||||
signals on that widget.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
The following sections describe how GTK+ decides which widgets
|
||||
need to be repainted in response to such events, and how widgets
|
||||
work internally in terms of the resources they use from the
|
||||
windowing system.
|
||||
</para>
|
||||
</refsect2>
|
||||
|
||||
<refsect2 id="frameclock">
|
||||
<title>The frame clock</title>
|
||||
|
||||
<para>
|
||||
All GTK+ applications are mainloop-driven, which means that most
|
||||
of the time the app is idle inside a loop that just waits for
|
||||
something to happen and then calls out to the right place when
|
||||
it does. On top of this GTK+ has a frame clock that gives a
|
||||
“pulse” to the application. This clock beats at a steady rate,
|
||||
which is tied to the framerate of the output (this is synced to
|
||||
the monitor via the window manager/compositor). The clock has
|
||||
several phases:
|
||||
<itemizedlist>
|
||||
<listitem><para>Events</para></listitem>
|
||||
<listitem><para>Update</para></listitem>
|
||||
<listitem><para>Layout</para></listitem>
|
||||
<listitem><para>Paint</para></listitem>
|
||||
</itemizedlist>
|
||||
The phases happens in this order and we will always run each
|
||||
phase through before going back to the start.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
The Events phase is a long stretch of time between each
|
||||
redraw where we get input events from the user and other events
|
||||
(like e.g. network I/O). Some events, like mouse motion are
|
||||
compressed so that we only get a single mouse motion event per
|
||||
clock cycle.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
Once the Events phase is over we pause all external events and
|
||||
run the redraw loop. First is the Update phase, where all
|
||||
animations are run to calculate the new state based on the
|
||||
estimated time the next frame will be visible (available via
|
||||
the frame clock). This often involves geometry changes which
|
||||
drives the next phase, Layout. If there are any changes in
|
||||
widget size requirements we calculate a new layout for the
|
||||
widget hierarchy (i.e. we assign sizes and positions). Then
|
||||
we go to the Paint phase where we redraw the regions of the
|
||||
window that need redrawing.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
If nothing requires the Update/Layout/Paint phases we will
|
||||
stay in the Events phase forever, as we don’t want to redraw
|
||||
if nothing changes. Each phase can request further processing
|
||||
in the following phases (e.g. the Update phase will cause there
|
||||
to be layout work, and layout changes cause repaints).
|
||||
</para>
|
||||
|
||||
<para>
|
||||
There are multiple ways to drive the clock, at the lowest level
|
||||
you can request a particular phase with
|
||||
gdk_frame_clock_request_phase() which will schedule a clock beat
|
||||
as needed so that it eventually reaches the requested phase.
|
||||
However, in practice most things happen at higher levels:
|
||||
<itemizedlist>
|
||||
<listitem><para>
|
||||
If you are doing an animation, you can use
|
||||
gtk_widget_add_tick_callback() which will cause a regular
|
||||
beating of the clock with a callback in the Update phase
|
||||
until you stop the tick.
|
||||
</para></listitem>
|
||||
<listitem><para>
|
||||
If some state changes that causes the size of your widget
|
||||
to change you call gtk_widget_queue_resize() which will
|
||||
request a Layout phase and mark your widget as needing
|
||||
relayout.
|
||||
</para></listitem>
|
||||
<listitem><para>
|
||||
If some state changes so you need to redraw some area of
|
||||
your widget you use the normal gtk_widget_queue_draw()
|
||||
set of functions. These will request a Paint phase and
|
||||
mark the region as needing redraw.
|
||||
</para></listitem>
|
||||
</itemizedlist>
|
||||
There are also a lot of implicit triggers of these from the
|
||||
CSS layer (which does animations, resizes and repaints as needed).
|
||||
</para>
|
||||
</refsect2>
|
||||
|
||||
<refsect2 id="hierarchical-drawing">
|
||||
<title>Hierarchical drawing</title>
|
||||
|
||||
<para>
|
||||
During the Paint phase we will send a single expose event to
|
||||
the toplevel window. The event handler will create a cairo
|
||||
context for the window and emit a GtkWidget::draw() signal
|
||||
on it, which will propagate down the entire widget hierarchy
|
||||
in back-to-front order, using the clipping and transform of
|
||||
the cairo context. This lets each widget draw its content at
|
||||
the right place and time, correctly handling things like
|
||||
partial transparencies and overlapping widgets.
|
||||
When the program needs to redraw a region of a
|
||||
<classname>GdkWindow</classname>, generates an event of
|
||||
type <link
|
||||
linkend="GDK_EVENT_EXPOSE"><constant>GDK_EVENT_EXPOSE</constant></link>
|
||||
for that window, specifying the region to redraw in the process.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
@@ -206,55 +111,218 @@
|
||||
</para>
|
||||
|
||||
<para>
|
||||
Normally, there is only a single cairo context which is used in
|
||||
the entire repaint, rather than one per GdkWindow. This means you
|
||||
have to respect (and not reset) existing clip and transformations
|
||||
set on it.
|
||||
When the GTK+ widget layer receives the event, it finds the widget that
|
||||
corresponds to the window, and causes it to render itself using the
|
||||
widget's #GtkWidget::draw signal. For this purpose it creates a
|
||||
<link linkend="#cairo_t">cairo context</link>. It then clips the context
|
||||
to the area that needs to be drawn. This makes sure that the minimal
|
||||
amount of work is done if only a small part of the widget needs to be
|
||||
repainted. After translating the context so that its (0, 0) coordinate
|
||||
corresponds to the top left corner of the widget, it effectively calls
|
||||
the widget's <function>gtk_widget_draw</function> function.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
Most widgets, including those that create their own GdkWindows have
|
||||
a transparent background, so they draw on top of whatever widgets
|
||||
are below them. This was not the case in GTK+ 2 where the theme set
|
||||
the background of most widgets to the default background color. (In
|
||||
fact, transparent GdkWindows used to be impossible.)
|
||||
</para>
|
||||
|
||||
<para>
|
||||
The whole rendering hierarchy is captured in the call stack, rather
|
||||
than having multiple separate draw emissions, so you can use effects
|
||||
like e.g. cairo_push/pop_group() which will affect all the widgets
|
||||
below you in the hierarchy. This makes it possible to have e.g.
|
||||
partially transparent containers.
|
||||
<function>gtk_widget_draw</function> takes care of drawing the widget
|
||||
to the cairo context. It first checks that the widget actually needs to
|
||||
be drawn. Widgets might for example be empty or outside of the cairo
|
||||
context's clipped area, which would make drawing them not do anything.
|
||||
Usually they will need to be drawn. In this case, the context will be
|
||||
clipped to the widget's allocated size and the
|
||||
<link linkend="GtkWidget::draw">draw signal</link> will be emitted on
|
||||
the widget which will finally draw the widget.
|
||||
</para>
|
||||
</refsect2>
|
||||
|
||||
<refsect2 id="scrolling drawing model">
|
||||
<title>Scrolling</title>
|
||||
<refsect2 id="window-no-window-widgets">
|
||||
<title>Window and no-window widgets</title>
|
||||
|
||||
<para>
|
||||
Traditionally, GTK+ has used self-copy operations to implement
|
||||
scrolling with native windows. With transparent backgrounds, this
|
||||
no longer works. Instead, we just mark the entire affected area for
|
||||
repainting when these operations are used. This allows (partially)
|
||||
transparent backgrounds, and it also more closely models modern
|
||||
hardware where self-copy operations are problematic (they break the
|
||||
rendering pipeline).
|
||||
In principle, each widget could have a
|
||||
<classname>GdkWindow</classname> of its own. With such a
|
||||
scheme, the drawing cycle would be trivial: when GDK notifies
|
||||
the GTK layer about an exposure event for a
|
||||
<classname>GdkWindow</classname>, the GTK layer would simply
|
||||
emit the #GtkWidget::draw signal for that widget. The signal
|
||||
handler would subsequently repaint the widget. No further
|
||||
work would be necessary; the windowing system would generate
|
||||
exposure events for each window that needs it, and then each
|
||||
corresponding widget would draw itself in turn.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
Since the above causes some overhead, we introduce a caching mechanism.
|
||||
Containers that scroll a lot (GtkViewport, GtkTextView, GtkTreeView,
|
||||
etc) allocate an offscreen image during scrolling and render their
|
||||
children to it (which is possible since drawing is fully hierarchical).
|
||||
The offscreen image is a bit larger than the visible area, so most of
|
||||
the time when scrolling it just needs to draw the offscreen in a
|
||||
different position. This matches contemporary graphics hardware much
|
||||
better, as well as allowing efficient transparent backgrounds.
|
||||
In order for this to work such containers need to detect when child
|
||||
widgets are redrawn so that it can update the offscreen. This can be
|
||||
done with the new gdk_window_set_invalidate_handler() function.
|
||||
However, in practice it is convenient to have widgets which do
|
||||
not have a <classname>GdkWindow</classname> of their own, but
|
||||
rather share the one from their parent widget. Such widgets
|
||||
have called <function>gtk_widget_set_has_window</function> to
|
||||
disable it; this can be tested easily with the <link
|
||||
linkend="gtk-widget-get-has-window"><function>gtk_widget_get_has_window()</function></link>
|
||||
function. As such, these are called <firstterm>no-window
|
||||
widgets</firstterm>.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
No-window widgets are useful for various reasons:
|
||||
</para>
|
||||
|
||||
<itemizedlist>
|
||||
<listitem>
|
||||
<para>
|
||||
Some widgets may want the parent's background to show through, even
|
||||
when they draw on parts of it. For example, consider a theme that
|
||||
uses textured backgrounds, such as gradients or repeating
|
||||
patterns. If each widget had its own window, and in turn its own
|
||||
gradient background, labels would look bad because there would be a
|
||||
visible break with respect to their surroundings. <xref
|
||||
linkend="figure-windowed-label"/> shows this undesirable effect.
|
||||
</para>
|
||||
|
||||
<figure id="figure-windowed-label">
|
||||
<title>Windowed label vs. no-window label</title>
|
||||
|
||||
<graphic fileref="figure-windowed-label.png" format="png"/>
|
||||
</figure>
|
||||
</listitem>
|
||||
|
||||
<listitem>
|
||||
<para>
|
||||
Reducing the number of windows creates less traffic between GTK+ and
|
||||
the underlying windowing system, especially when getting events.
|
||||
</para>
|
||||
</listitem>
|
||||
</itemizedlist>
|
||||
|
||||
<para>
|
||||
On the other hand, widgets that would benefit from having a "hard"
|
||||
clipping region may find it more convenient to create their own
|
||||
windows. Also, widgets which want to receive events resulting from
|
||||
user interaction may find it convenient to use windows of their own as
|
||||
well. Widgets may have more than one window if they want to
|
||||
define different regions for capturing events.
|
||||
</para>
|
||||
</refsect2>
|
||||
|
||||
<refsect2 id="hierarchical-drawing">
|
||||
<title>Hierarchical drawing</title>
|
||||
|
||||
<para>
|
||||
When the GTK layer receives an exposure event from GDK, it
|
||||
finds the widget that corresponds to the window which received
|
||||
the event. By definition, this corresponds to a widget that
|
||||
has the <constant>GTK_NO_WINDOW</constant> flag turned
|
||||
<emphasis>off</emphasis> (otherwise, the widget wouldn't own
|
||||
the window!). First this widget paints its background, and
|
||||
then, if it is a container widget, it tells each of its
|
||||
<constant>GTK_NO_WINDOW</constant> children to paint
|
||||
themselves. This process is applied recursively for all the
|
||||
<constant>GTK_NO_WINDOW</constant> descendants of the original
|
||||
widget.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
Note that this process does not get propagated to widgets
|
||||
which have windows of their own, that is, to widgets which
|
||||
have the <constant>GTK_NO_WINDOW</constant> flag turned off.
|
||||
If such widgets require redrawing, then the windowing system
|
||||
will already have sent exposure events to their corresponding
|
||||
windows. As such, there is no need to
|
||||
<firstterm>propagate</firstterm> the exposure to them on the
|
||||
GTK+ side.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
<xref
|
||||
linkend="figure-hierarchical-drawing"/> shows how a simple toplevel window would
|
||||
paint itself when it contains only <constant>GTK_NO_WINDOW</constant> descendants:
|
||||
|
||||
<orderedlist>
|
||||
<listitem>
|
||||
<para>
|
||||
The outermost, thick rectangle is a toplevel <link
|
||||
linkend="GtkWindow"><classname>GtkWindow</classname></link>,
|
||||
which is not a <constant>GTK_NO_WINDOW</constant> widget —
|
||||
as such, it does receive its exposure event as it comes from GDK.
|
||||
First the <classname>GtkWindow</classname> would paint its own
|
||||
background. Then, it would ask its only child to paint itself,
|
||||
numbered 2.
|
||||
</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>
|
||||
The dotted rectangle represents a <link
|
||||
linkend="GtkVBox"><classname>GtkVBox</classname></link>, which
|
||||
has been made the sole child of the
|
||||
<classname>GtkWindow</classname>. Boxes are just layout
|
||||
containers that do not paint anything by themselves, so this
|
||||
<classname>GtkVBox</classname> would draw nothing, but rather ask
|
||||
its children to draw themselves. The children are numbered 3 and
|
||||
6.
|
||||
</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>
|
||||
The thin rectangle is a <link
|
||||
linkend="GtkFrame"><classname>GtkFrame</classname></link>,
|
||||
which has two children: a label for the frame, numbered 4, and
|
||||
another label inside, numbered 5. First the frame would draw its
|
||||
own beveled box, then ask the frame label and its internal child to
|
||||
draw themselves.
|
||||
</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>
|
||||
The frame label has no children, so it just draws its text: "Frame Label".
|
||||
</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>
|
||||
The internal label has no children, so it just draws its text: "This
|
||||
is some text inside the frame!".
|
||||
</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>
|
||||
The dotted rectangle represents a <link
|
||||
linkend="GtkHBox"><classname>GtkHBox</classname></link>. Again,
|
||||
this does not draw anything by itself, but rather asks its children
|
||||
to draw themselves. The children are numbered 7 and 9.
|
||||
</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>
|
||||
The thin rectangle is a <link
|
||||
linkend="GtkButton"><classname>GtkButton</classname></link> with
|
||||
a single child, numbered 8. First the button would draw its
|
||||
beveled box, and then it would ask its child to draw itself.
|
||||
</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>
|
||||
This is a text label which has no children, so it just draws its
|
||||
own text: "Cancel".
|
||||
</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>
|
||||
Similar to number 7, this is a button with a single child, numbered
|
||||
10. First the button would draw its beveled box, and then it would
|
||||
ask its child to draw itself.
|
||||
</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>
|
||||
Similar to number 8, this is a text label which has no children,
|
||||
so it just draws its own text: "OK".
|
||||
</para>
|
||||
</listitem>
|
||||
</orderedlist>
|
||||
</para>
|
||||
|
||||
<figure id="figure-hierarchical-drawing">
|
||||
<title>Hierarchical drawing order</title>
|
||||
|
||||
<graphic fileref="figure-hierarchical-drawing.png" format="png"/>
|
||||
</figure>
|
||||
</refsect2>
|
||||
|
||||
</refsect1>
|
||||
@@ -262,6 +330,16 @@
|
||||
<refsect1 id="double-buffering">
|
||||
<title>Double buffering</title>
|
||||
|
||||
<para>
|
||||
When the GTK layer receives an exposure event from GDK, it first finds
|
||||
the <literal>!<constant>GTK_NO_WINDOW</constant></literal> widget that
|
||||
corresponds to the event's window. Then, it emits the
|
||||
#GtkWidget::draw signal for that
|
||||
widget. As described above, that widget will first draw its background,
|
||||
and then ask each of its <constant>GTK_NO_WINDOW</constant> children to
|
||||
draw themselves.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
If each of the drawing calls made by each subwidget's
|
||||
<literal>draw</literal> handler were sent directly to the
|
||||
@@ -274,6 +352,26 @@
|
||||
when all drawing operations are done.
|
||||
</para>
|
||||
|
||||
<!-- FIXME: figure with a timeline of non-double-buffered and
|
||||
double-buffered paints:
|
||||
|
||||
onscreen:
|
||||
[garbage]
|
||||
[background]
|
||||
[button-frame]
|
||||
[icon]
|
||||
[label]
|
||||
|
||||
|
||||
onscreen: offscreen:
|
||||
[garbage]
|
||||
[background]
|
||||
[button-frame]
|
||||
[icon]
|
||||
[label]
|
||||
[final result]
|
||||
-->
|
||||
|
||||
<para>
|
||||
Two basic functions in GDK form the core of the double-buffering
|
||||
mechanism: <link
|
||||
@@ -298,11 +396,14 @@
|
||||
</para>
|
||||
|
||||
<para>
|
||||
To make this easier, GTK+ normally calls
|
||||
<function>gdk_window_begin_paint_region()</function>
|
||||
before emitting the #GtkWidget::draw signal, and
|
||||
To make this easier, most GTK+ widgets have the
|
||||
<constant>GTK_DOUBLE_BUFFERED</constant> <link
|
||||
linkend="GtkWidgetFlags">widget flag</link> turned on by
|
||||
default. When GTK+ encounters such a widget, it automatically
|
||||
calls <function>gdk_window_begin_paint_region()</function>
|
||||
before emitting the #GtkWidget::draw signal for the widget, and
|
||||
then it calls <function>gdk_window_end_paint()</function>
|
||||
after the signal has been emitted. This is convenient for
|
||||
after the signal has been emitted. This is convenient for
|
||||
most widgets, as they do not need to worry about creating
|
||||
their own temporary drawing buffers or about calling those
|
||||
functions.
|
||||
@@ -310,12 +411,10 @@
|
||||
|
||||
<para>
|
||||
However, some widgets may prefer to disable this kind of
|
||||
automatic double buffering and do things on their own.
|
||||
To do this, call the
|
||||
<function>gtk_widget_set_double_buffered()</function>
|
||||
function in your widget's constructor. Double buffering
|
||||
can only be turned off for widgets that have a native
|
||||
window.
|
||||
automatic double buffering and do things on their own. To do
|
||||
this, call the
|
||||
<function>gtk_widget_set_double_buffered()</function> function
|
||||
in your widget's constructor.
|
||||
</para>
|
||||
|
||||
<example id="disabling-double-buffering">
|
||||
|
||||
@@ -959,7 +959,7 @@ example_app_window_init (ExampleAppWindow *win)
|
||||
<ulink url="https://git.gnome.org/browse/gtk+/tree/examples/application9/exampleappwin.c">full source</ulink>
|
||||
if you are interested in the details.</para>
|
||||
|
||||
<para>This brings our example application to this appearance:</para>
|
||||
<para>This brings our example application to its final appearance:</para>
|
||||
|
||||
<informalfigure>
|
||||
<mediaobject>
|
||||
@@ -969,35 +969,5 @@ example_app_window_init (ExampleAppWindow *win)
|
||||
</mediaobject>
|
||||
</informalfigure>
|
||||
</section>
|
||||
<section>
|
||||
<title>Header bar</title>
|
||||
|
||||
<para>Our application already uses a GtkHeaderBar, but so far it
|
||||
still gets a 'normal' window titlebar on top of that. This is a
|
||||
bit redundant, and we will now tell GTK+ to use the header bar
|
||||
as replacement for the titlebar. To do so, we move it around to
|
||||
be a direct child of the window, and set its type to be titlebar.</para>
|
||||
|
||||
<informalexample>
|
||||
<programlisting><xi:include href="../../../../examples/application10/window.ui" parse="text"><xi:fallback>FIXME: MISSING XINCLUDE CONTENT</xi:fallback></xi:include></programlisting>
|
||||
</informalexample>
|
||||
|
||||
<para>A small extra refinement that we have added here is to allow
|
||||
the header bar to provide a fallback application menu, by setting
|
||||
the show-fallback-app-menu property to TRUE. Here is how the
|
||||
application now looks, if this fallback is used.</para>
|
||||
|
||||
<informalfigure>
|
||||
<mediaobject>
|
||||
<imageobject>
|
||||
<imagedata fileref="getting-started-app10.png" format="PNG"/>
|
||||
</imageobject>
|
||||
</mediaobject>
|
||||
</informalfigure>
|
||||
|
||||
<para>If we set up the window icon for our window, the menu button
|
||||
will use that instead of the generic placeholder icon you see
|
||||
here.</para>
|
||||
</section>
|
||||
</section>
|
||||
</chapter>
|
||||
|
||||
@@ -72,7 +72,6 @@
|
||||
<xi:include href="xml/gtkgrid.xml" />
|
||||
<xi:include href="xml/gtkrevealer.xml" />
|
||||
<xi:include href="xml/gtklistbox.xml" />
|
||||
<xi:include href="xml/gtkflowbox.xml" />
|
||||
<xi:include href="xml/gtkstack.xml" />
|
||||
<xi:include href="xml/gtkstackswitcher.xml" />
|
||||
<xi:include href="xml/gtkheaderbar.xml" />
|
||||
@@ -428,10 +427,6 @@
|
||||
<title>Index of new symbols in 3.10</title>
|
||||
<xi:include href="xml/api-index-3.10.xml"><xi:fallback /></xi:include>
|
||||
</index>
|
||||
<index id="api-index-3-12" role="3.12">
|
||||
<title>Index of new symbols in 3.12</title>
|
||||
<xi:include href="xml/api-index-3.12.xml"><xi:fallback /></xi:include>
|
||||
</index>
|
||||
|
||||
<xi:include href="xml/annotation-glossary.xml"><xi:fallback /></xi:include>
|
||||
|
||||
|
||||
@@ -510,8 +510,6 @@ GtkListBoxSortFunc
|
||||
GtkListBoxUpdateHeaderFunc
|
||||
|
||||
gtk_list_box_new
|
||||
gtk_list_box_prepend
|
||||
gtk_list_box_insert
|
||||
gtk_list_box_select_row
|
||||
gtk_list_box_get_selected_row
|
||||
|
||||
@@ -604,8 +602,6 @@ gtk_builder_add_callback_symbols
|
||||
gtk_builder_lookup_callback_symbol
|
||||
gtk_builder_set_translation_domain
|
||||
gtk_builder_get_translation_domain
|
||||
gtk_builder_set_application
|
||||
gtk_builder_get_application
|
||||
gtk_builder_get_type_from_name
|
||||
gtk_builder_value_from_string
|
||||
gtk_builder_value_from_string_type
|
||||
@@ -638,7 +634,6 @@ GtkButton
|
||||
gtk_button_new
|
||||
gtk_button_new_with_label
|
||||
gtk_button_new_with_mnemonic
|
||||
gtk_button_new_from_icon_name
|
||||
gtk_button_new_from_stock
|
||||
gtk_button_pressed
|
||||
gtk_button_released
|
||||
@@ -1141,8 +1136,6 @@ gtk_entry_get_progress_pulse_step
|
||||
gtk_entry_progress_pulse
|
||||
gtk_entry_im_context_filter_keypress
|
||||
gtk_entry_reset_im_context
|
||||
gtk_entry_get_tabs
|
||||
gtk_entry_set_tabs
|
||||
GtkEntryIconPosition
|
||||
gtk_entry_set_icon_from_pixbuf
|
||||
gtk_entry_set_icon_from_stock
|
||||
@@ -2057,7 +2050,6 @@ gtk_label_set_width_chars
|
||||
gtk_label_set_max_width_chars
|
||||
gtk_label_set_line_wrap
|
||||
gtk_label_set_line_wrap_mode
|
||||
gtk_label_set_lines
|
||||
gtk_label_get_layout_offsets
|
||||
gtk_label_get_mnemonic_keyval
|
||||
gtk_label_get_selectable
|
||||
@@ -2076,7 +2068,6 @@ gtk_label_get_label
|
||||
gtk_label_get_layout
|
||||
gtk_label_get_line_wrap
|
||||
gtk_label_get_line_wrap_mode
|
||||
gtk_label_get_lines
|
||||
gtk_label_get_mnemonic_widget
|
||||
gtk_label_get_selection_bounds
|
||||
gtk_label_get_use_markup
|
||||
@@ -3706,6 +3697,7 @@ gtk_text_mark_get_type
|
||||
<FILE>gtktexttag</FILE>
|
||||
<TITLE>GtkTextTag</TITLE>
|
||||
GtkTextTag
|
||||
GtkWrapMode
|
||||
gtk_text_tag_new
|
||||
gtk_text_tag_get_priority
|
||||
gtk_text_tag_set_priority
|
||||
@@ -3758,7 +3750,6 @@ gtk_text_tag_table_get_type
|
||||
<TITLE>GtkTextView</TITLE>
|
||||
GtkTextView
|
||||
GtkTextWindowType
|
||||
GtkWrapMode
|
||||
gtk_text_view_new
|
||||
gtk_text_view_new_with_buffer
|
||||
gtk_text_view_set_buffer
|
||||
@@ -5284,7 +5275,6 @@ gtk_widget_queue_draw
|
||||
gtk_widget_queue_resize
|
||||
gtk_widget_queue_resize_no_redraw
|
||||
gtk_widget_get_frame_clock
|
||||
gtk_widget_get_scale_factor
|
||||
GtkTickCallback
|
||||
gtk_widget_add_tick_callback
|
||||
gtk_widget_remove_tick_callback
|
||||
@@ -5502,10 +5492,6 @@ gtk_widget_get_margin_left
|
||||
gtk_widget_set_margin_left
|
||||
gtk_widget_get_margin_right
|
||||
gtk_widget_set_margin_right
|
||||
gtk_widget_get_margin_start
|
||||
gtk_widget_set_margin_start
|
||||
gtk_widget_get_margin_end
|
||||
gtk_widget_set_margin_end
|
||||
gtk_widget_get_margin_top
|
||||
gtk_widget_set_margin_top
|
||||
gtk_widget_get_margin_bottom
|
||||
@@ -5955,7 +5941,6 @@ GTK_STYLE_CLASS_OSD
|
||||
GTK_STYLE_CLASS_LEVEL_BAR
|
||||
GTK_STYLE_CLASS_CURSOR_HANDLE
|
||||
GTK_STYLE_CLASS_INSERTION_CURSOR
|
||||
GTK_STYLE_CLASS_TITLEBAR
|
||||
GTK_STYLE_REGION_COLUMN
|
||||
GTK_STYLE_REGION_COLUMN_HEADER
|
||||
GTK_STYLE_REGION_ROW
|
||||
@@ -6416,7 +6401,6 @@ gtk_drag_highlight
|
||||
gtk_drag_unhighlight
|
||||
<SUBSECTION Source Side>
|
||||
gtk_drag_begin
|
||||
gtk_drag_begin_with_coordinates
|
||||
gtk_drag_set_icon_widget
|
||||
gtk_drag_set_icon_pixbuf
|
||||
gtk_drag_set_icon_stock
|
||||
@@ -6644,7 +6628,6 @@ gtk_icon_theme_lookup_icon_for_scale
|
||||
gtk_icon_theme_choose_icon
|
||||
gtk_icon_theme_choose_icon_for_scale
|
||||
gtk_icon_theme_lookup_by_gicon
|
||||
gtk_icon_theme_lookup_by_gicon_for_scale
|
||||
gtk_icon_theme_load_icon
|
||||
gtk_icon_theme_load_icon_for_scale
|
||||
gtk_icon_theme_load_surface
|
||||
@@ -6714,7 +6697,6 @@ gtk_icon_set_new_from_pixbuf
|
||||
gtk_icon_set_ref
|
||||
gtk_icon_set_render_icon
|
||||
gtk_icon_set_render_icon_pixbuf
|
||||
gtk_icon_set_render_icon_surface
|
||||
gtk_icon_set_unref
|
||||
gtk_icon_size_lookup
|
||||
gtk_icon_size_lookup_for_settings
|
||||
@@ -7021,8 +7003,6 @@ gtk_print_settings_set_finishings
|
||||
GTK_PRINT_SETTINGS_OUTPUT_BIN
|
||||
gtk_print_settings_get_output_bin
|
||||
gtk_print_settings_set_output_bin
|
||||
GTK_PRINT_SETTINGS_OUTPUT_DIR
|
||||
GTK_PRINT_SETTINGS_OUTPUT_BASENAME
|
||||
GTK_PRINT_SETTINGS_OUTPUT_FILE_FORMAT
|
||||
GTK_PRINT_SETTINGS_OUTPUT_URI
|
||||
GTK_PRINT_SETTINGS_WIN32_DRIVER_EXTRA
|
||||
@@ -7338,10 +7318,6 @@ gtk_application_set_menubar
|
||||
gtk_application_add_accelerator
|
||||
gtk_application_remove_accelerator
|
||||
|
||||
gtk_application_list_action_descriptions
|
||||
gtk_application_get_accels_for_action
|
||||
gtk_application_set_accels_for_action
|
||||
|
||||
<SUBSECTION Standard>
|
||||
GtkApplicationClass
|
||||
GTK_TYPE_APPLICATION
|
||||
@@ -7693,8 +7669,6 @@ gtk_header_bar_pack_start
|
||||
gtk_header_bar_pack_end
|
||||
gtk_header_bar_set_show_close_button
|
||||
gtk_header_bar_get_show_close_button
|
||||
gtk_header_bar_set_show_fallback_app_menu
|
||||
gtk_header_bar_get_show_fallback_app_menu
|
||||
|
||||
<SUBSECTION Standard>
|
||||
GTK_TYPE_HEADER_BAR
|
||||
@@ -7727,7 +7701,6 @@ gtk_stack_get_transition_duration
|
||||
GtkStackTransitionType
|
||||
gtk_stack_set_transition_type
|
||||
gtk_stack_get_transition_type
|
||||
gtk_stack_get_transition_running
|
||||
</SECTION>
|
||||
|
||||
<SECTION>
|
||||
@@ -7753,52 +7726,3 @@ GtkRevealerTransitionType
|
||||
gtk_revealer_get_transition_type
|
||||
gtk_revealer_set_transition_type
|
||||
</SECTION>
|
||||
|
||||
<SECTION>
|
||||
<FILE>gtkflowbox</FILE>
|
||||
<TITLE>GtkFlowBox</TITLE>
|
||||
GtkFlowBox
|
||||
gtk_flow_box_new
|
||||
gtk_flow_box_insert
|
||||
gtk_flow_box_get_child_at_index
|
||||
gtk_flow_box_set_hadjustment
|
||||
gtk_flow_box_set_vadjustment
|
||||
|
||||
gtk_flow_box_set_homogeneous
|
||||
gtk_flow_box_get_homogeneous
|
||||
gtk_flow_box_set_row_spacing
|
||||
gtk_flow_box_get_row_spacing
|
||||
gtk_flow_box_set_column_spacing
|
||||
gtk_flow_box_get_column_spacing
|
||||
gtk_flow_box_set_min_children_per_line
|
||||
gtk_flow_box_get_min_children_per_line
|
||||
gtk_flow_box_set_max_children_per_line
|
||||
gtk_flow_box_get_max_children_per_line
|
||||
gtk_flow_box_set_activate_on_single_click
|
||||
gtk_flow_box_get_activate_on_single_click
|
||||
|
||||
GtkFlowBoxForeachFunc
|
||||
gtk_flow_box_selected_foreach
|
||||
gtk_flow_box_get_selected_children
|
||||
gtk_flow_box_select_child
|
||||
gtk_flow_box_unselect_child
|
||||
gtk_flow_box_select_all
|
||||
gtk_flow_box_unselect_all
|
||||
gtk_flow_box_set_selection_mode
|
||||
gtk_flow_box_get_selection_mode
|
||||
|
||||
GtkFlowBoxFilterFunc
|
||||
gtk_flow_box_set_filter_func
|
||||
gtk_flow_box_invalidate_filter
|
||||
|
||||
GtkFlowBoxSortFunc
|
||||
gtk_flow_box_set_sort_func
|
||||
gtk_flow_box_invalidate_sort
|
||||
|
||||
<SUBSECTION GtkFlowBoxChild>
|
||||
GtkFlowBoxChild
|
||||
gtk_flow_box_child_new
|
||||
gtk_flow_box_child_get_index
|
||||
gtk_flow_box_child_is_selected
|
||||
gtk_flow_box_child_changed
|
||||
</SECTION>
|
||||
|
||||
@@ -70,8 +70,6 @@ gtk_file_chooser_get_type
|
||||
gtk_file_chooser_widget_get_type
|
||||
gtk_file_filter_get_type
|
||||
gtk_fixed_get_type
|
||||
gtk_flow_box_get_type
|
||||
gtk_flow_box_child_get_type
|
||||
gtk_font_button_get_type
|
||||
gtk_font_chooser_get_type
|
||||
gtk_font_chooser_dialog_get_type
|
||||
@@ -125,7 +123,7 @@ gtk_page_setup_get_type
|
||||
gtk_paned_get_type
|
||||
gtk_paper_size_get_type
|
||||
gtk_places_sidebar_get_type
|
||||
@ENABLE_ON_X11@gtk_plug_get_type
|
||||
@DISABLE_ON_W32@@DISABLE_ON_QUARTZ@@DISABLE_ON_WAYLAND@gtk_plug_get_type
|
||||
@DISABLE_ON_W32@gtk_printer_get_type
|
||||
gtk_print_context_get_type
|
||||
@DISABLE_ON_W32@gtk_print_job_get_type
|
||||
@@ -159,7 +157,7 @@ gtk_separator_menu_item_get_type
|
||||
gtk_separator_tool_item_get_type
|
||||
gtk_settings_get_type
|
||||
gtk_size_group_get_type
|
||||
@ENABLE_ON_X11@gtk_socket_get_type
|
||||
@DISABLE_ON_W32@@DISABLE_ON_QUARTZ@@DISABLE_ON_WAYLAND@gtk_socket_get_type
|
||||
gtk_spin_button_get_type
|
||||
gtk_spinner_get_type
|
||||
gtk_stack_get_type
|
||||
|
||||
|
Before Width: | Height: | Size: 6.2 KiB |
|
Before Width: | Height: | Size: 100 KiB |
@@ -314,16 +314,6 @@ additional environment variables.
|
||||
</para>
|
||||
</formalpara>
|
||||
|
||||
<formalpara>
|
||||
<title><envar>GTK_THEME</envar></title>
|
||||
|
||||
<para>
|
||||
If set, makes GTK+ use the named theme instead of the theme
|
||||
that is specified by the gtk-theme-name setting. This is intended
|
||||
mainly for easy debugging of theme issues.
|
||||
</para>
|
||||
</formalpara>
|
||||
|
||||
<para>
|
||||
The following environment variables are used by GdkPixbuf, GDK or
|
||||
Pango, not by GTK+ itself, but we list them here for completeness
|
||||
|
||||
@@ -126,9 +126,6 @@
|
||||
<link linkend="GtkListBox">
|
||||
<inlinegraphic fileref="list-box.png" format="PNG"></inlinegraphic>
|
||||
</link>
|
||||
<link linkend="GtkFlowBox">
|
||||
<inlinegraphic fileref="flow-box.png" format="PNG"></inlinegraphic>
|
||||
</link>
|
||||
<link linkend="GtkStack">
|
||||
<inlinegraphic fileref="stack.png" format="PNG"></inlinegraphic>
|
||||
</link>
|
||||
|
||||
@@ -26,8 +26,6 @@ endif
|
||||
doc_shooter_DEPENDENCIES = $(DEPS)
|
||||
doc_shooter_LDADD = $(LDADDS)
|
||||
doc_shooter_SOURCES= \
|
||||
shadow.c \
|
||||
shadow.h \
|
||||
shooter.c \
|
||||
widgets.c \
|
||||
widgets.h
|
||||
|
||||
@@ -1,149 +0,0 @@
|
||||
#include "shadow.h"
|
||||
#include <math.h>
|
||||
|
||||
#define BLUR_RADIUS 5
|
||||
#define SHADOW_OFFSET (BLUR_RADIUS * 4 / 5)
|
||||
#define SHADOW_OPACITY 0.75
|
||||
|
||||
typedef struct {
|
||||
int size;
|
||||
double *data;
|
||||
} ConvFilter;
|
||||
|
||||
static double
|
||||
gaussian (double x, double y, double r)
|
||||
{
|
||||
return ((1 / (2 * M_PI * r)) *
|
||||
exp ((- (x * x + y * y)) / (2 * r * r)));
|
||||
}
|
||||
|
||||
static ConvFilter *
|
||||
create_blur_filter (int radius)
|
||||
{
|
||||
ConvFilter *filter;
|
||||
int x, y;
|
||||
double sum;
|
||||
|
||||
filter = g_new0 (ConvFilter, 1);
|
||||
filter->size = radius * 2 + 1;
|
||||
filter->data = g_new (double, filter->size * filter->size);
|
||||
|
||||
sum = 0.0;
|
||||
|
||||
for (y = 0 ; y < filter->size; y++)
|
||||
{
|
||||
for (x = 0 ; x < filter->size; x++)
|
||||
{
|
||||
sum += filter->data[y * filter->size + x] = gaussian (x - (filter->size >> 1),
|
||||
y - (filter->size >> 1),
|
||||
radius);
|
||||
}
|
||||
}
|
||||
|
||||
for (y = 0; y < filter->size; y++)
|
||||
{
|
||||
for (x = 0; x < filter->size; x++)
|
||||
{
|
||||
filter->data[y * filter->size + x] /= sum;
|
||||
}
|
||||
}
|
||||
|
||||
return filter;
|
||||
|
||||
}
|
||||
|
||||
static GdkPixbuf *
|
||||
create_shadow (GdkPixbuf *src)
|
||||
{
|
||||
int x, y, i, j;
|
||||
int width, height;
|
||||
GdkPixbuf *dest;
|
||||
static ConvFilter *filter = NULL;
|
||||
int src_rowstride, dest_rowstride;
|
||||
int src_bpp, dest_bpp;
|
||||
|
||||
guchar *src_pixels, *dest_pixels;
|
||||
|
||||
if (!filter)
|
||||
filter = create_blur_filter (BLUR_RADIUS);
|
||||
|
||||
width = gdk_pixbuf_get_width (src) + BLUR_RADIUS * 2 + SHADOW_OFFSET;
|
||||
height = gdk_pixbuf_get_height (src) + BLUR_RADIUS * 2 + SHADOW_OFFSET;
|
||||
|
||||
dest = gdk_pixbuf_new (gdk_pixbuf_get_colorspace (src),
|
||||
gdk_pixbuf_get_has_alpha (src),
|
||||
gdk_pixbuf_get_bits_per_sample (src),
|
||||
width, height);
|
||||
gdk_pixbuf_fill (dest, 0);
|
||||
src_pixels = gdk_pixbuf_get_pixels (src);
|
||||
src_rowstride = gdk_pixbuf_get_rowstride (src);
|
||||
src_bpp = gdk_pixbuf_get_has_alpha (src) ? 4 : 3;
|
||||
|
||||
dest_pixels = gdk_pixbuf_get_pixels (dest);
|
||||
dest_rowstride = gdk_pixbuf_get_rowstride (dest);
|
||||
dest_bpp = gdk_pixbuf_get_has_alpha (dest) ? 4 : 3;
|
||||
|
||||
for (y = 0; y < height; y++)
|
||||
{
|
||||
for (x = 0; x < width; x++)
|
||||
{
|
||||
int sumr = 0, sumg = 0, sumb = 0, suma = 0;
|
||||
|
||||
for (i = 0; i < filter->size; i++)
|
||||
{
|
||||
for (j = 0; j < filter->size; j++)
|
||||
{
|
||||
int src_x, src_y;
|
||||
|
||||
src_y = -(BLUR_RADIUS + SHADOW_OFFSET) + y - (filter->size >> 1) + i;
|
||||
src_x = -(BLUR_RADIUS + SHADOW_OFFSET) + x - (filter->size >> 1) + j;
|
||||
|
||||
if (src_y < 0 || src_y > gdk_pixbuf_get_height (src) ||
|
||||
src_x < 0 || src_x > gdk_pixbuf_get_width (src))
|
||||
continue;
|
||||
|
||||
sumr += src_pixels [src_y * src_rowstride +
|
||||
src_x * src_bpp + 0] *
|
||||
filter->data [i * filter->size + j];
|
||||
sumg += src_pixels [src_y * src_rowstride +
|
||||
src_x * src_bpp + 1] *
|
||||
filter->data [i * filter->size + j];
|
||||
|
||||
sumb += src_pixels [src_y * src_rowstride +
|
||||
src_x * src_bpp + 2] *
|
||||
filter->data [i * filter->size + j];
|
||||
|
||||
if (src_bpp == 4)
|
||||
suma += src_pixels [src_y * src_rowstride +
|
||||
src_x * src_bpp + 3] *
|
||||
filter->data [i * filter->size + j];
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
if (dest_bpp == 4)
|
||||
dest_pixels [y * dest_rowstride +
|
||||
x * dest_bpp + 3] = suma * SHADOW_OPACITY;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
return dest;
|
||||
}
|
||||
|
||||
GdkPixbuf *
|
||||
create_shadowed_pixbuf (GdkPixbuf *src)
|
||||
{
|
||||
GdkPixbuf *dest;
|
||||
|
||||
dest = create_shadow (src);
|
||||
|
||||
gdk_pixbuf_composite (src, dest,
|
||||
BLUR_RADIUS, BLUR_RADIUS,
|
||||
gdk_pixbuf_get_width (src),
|
||||
gdk_pixbuf_get_height (src),
|
||||
BLUR_RADIUS, BLUR_RADIUS, 1.0, 1.0,
|
||||
GDK_INTERP_NEAREST, 255);
|
||||
return dest;
|
||||
}
|
||||
@@ -1,8 +0,0 @@
|
||||
#ifndef __SHADOW_H__
|
||||
#define __SHADOW_H__
|
||||
|
||||
#include <gdk-pixbuf/gdk-pixbuf.h>
|
||||
|
||||
GdkPixbuf *create_shadowed_pixbuf (GdkPixbuf *src);
|
||||
|
||||
#endif /* __SHADOW_H__ */
|
||||
@@ -1,184 +1,101 @@
|
||||
#include <gdk/gdk.h>
|
||||
|
||||
#include <gtk/gtk.h>
|
||||
#include <gdkx.h>
|
||||
#include <stdio.h>
|
||||
#include <errno.h>
|
||||
#include <sys/wait.h>
|
||||
#include <unistd.h>
|
||||
#include <X11/extensions/shape.h>
|
||||
|
||||
#include <gdk-pixbuf/gdk-pixbuf.h>
|
||||
#include <sys/types.h>
|
||||
#include <sys/stat.h>
|
||||
#include <sys/wait.h>
|
||||
#include <signal.h>
|
||||
#include <unistd.h>
|
||||
#include <stdlib.h>
|
||||
#include <fcntl.h>
|
||||
#include <errno.h>
|
||||
#include <locale.h>
|
||||
#include "widgets.h"
|
||||
#include "shadow.h"
|
||||
|
||||
#define MAXIMUM_WM_REPARENTING_DEPTH 4
|
||||
#ifndef _
|
||||
#define _(x) (x)
|
||||
#endif
|
||||
typedef enum {
|
||||
SNAPSHOT_WINDOW,
|
||||
SNAPSHOT_DRAW
|
||||
} SnapshotMode;
|
||||
|
||||
static Window
|
||||
find_toplevel_window (Window xid)
|
||||
static gboolean
|
||||
quit_when_idle (gpointer loop)
|
||||
{
|
||||
Window root, parent, *children;
|
||||
guint nchildren;
|
||||
g_main_loop_quit (loop);
|
||||
|
||||
do
|
||||
{
|
||||
if (XQueryTree (GDK_DISPLAY_XDISPLAY (gdk_display_get_default ()), xid, &root,
|
||||
&parent, &children, &nchildren) == 0)
|
||||
{
|
||||
g_warning ("Couldn't find window manager window");
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (root == parent)
|
||||
return xid;
|
||||
|
||||
xid = parent;
|
||||
}
|
||||
while (TRUE);
|
||||
return G_SOURCE_REMOVE;
|
||||
}
|
||||
|
||||
static GdkPixbuf *
|
||||
add_border_to_shot (GdkPixbuf *pixbuf)
|
||||
static void
|
||||
check_for_draw (GdkEvent *event, gpointer loop)
|
||||
{
|
||||
GdkPixbuf *retval;
|
||||
if (event->type == GDK_EXPOSE)
|
||||
{
|
||||
g_idle_add (quit_when_idle, loop);
|
||||
gdk_event_handler_set ((GdkEventFunc) gtk_main_do_event, NULL, NULL);
|
||||
}
|
||||
|
||||
retval = gdk_pixbuf_new (GDK_COLORSPACE_RGB, TRUE, 8,
|
||||
gdk_pixbuf_get_width (pixbuf) + 2,
|
||||
gdk_pixbuf_get_height (pixbuf) + 2);
|
||||
|
||||
/* Fill with solid black */
|
||||
gdk_pixbuf_fill (retval, 0xFF);
|
||||
gdk_pixbuf_copy_area (pixbuf,
|
||||
0, 0,
|
||||
gdk_pixbuf_get_width (pixbuf),
|
||||
gdk_pixbuf_get_height (pixbuf),
|
||||
retval, 1, 1);
|
||||
|
||||
return retval;
|
||||
gtk_main_do_event (event);
|
||||
}
|
||||
|
||||
static GdkPixbuf *
|
||||
remove_shaped_area (GdkPixbuf *pixbuf,
|
||||
Window window)
|
||||
static cairo_surface_t *
|
||||
snapshot_widget (GtkWidget *widget, SnapshotMode mode)
|
||||
{
|
||||
GdkPixbuf *retval;
|
||||
XRectangle *rectangles;
|
||||
int rectangle_count, rectangle_order;
|
||||
int i;
|
||||
cairo_surface_t *surface;
|
||||
cairo_pattern_t *bg;
|
||||
GMainLoop *loop;
|
||||
cairo_t *cr;
|
||||
|
||||
retval = gdk_pixbuf_new (GDK_COLORSPACE_RGB, TRUE, 8,
|
||||
gdk_pixbuf_get_width (pixbuf),
|
||||
gdk_pixbuf_get_height (pixbuf));
|
||||
|
||||
gdk_pixbuf_fill (retval, 0);
|
||||
rectangles = XShapeGetRectangles (GDK_DISPLAY_XDISPLAY (gdk_display_get_default ()), window,
|
||||
ShapeBounding, &rectangle_count, &rectangle_order);
|
||||
g_assert (gtk_widget_get_realized (widget));
|
||||
|
||||
for (i = 0; i < rectangle_count; i++)
|
||||
surface = gdk_window_create_similar_surface (gtk_widget_get_window (widget),
|
||||
CAIRO_CONTENT_COLOR,
|
||||
gtk_widget_get_allocated_width (widget),
|
||||
gtk_widget_get_allocated_height (widget));
|
||||
|
||||
loop = g_main_loop_new (NULL, FALSE);
|
||||
/* We wait until the widget is drawn for the first time.
|
||||
* We can not wait for a GtkWidget::draw event, because that might not
|
||||
* happen if the window is fully obscured by windowed child widgets.
|
||||
* Alternatively, we could wait for an expose event on widget's window.
|
||||
* Both of these are rather hairy, not sure what's best. */
|
||||
gdk_event_handler_set (check_for_draw, loop, NULL);
|
||||
g_main_loop_run (loop);
|
||||
|
||||
cr = cairo_create (surface);
|
||||
|
||||
switch (mode)
|
||||
{
|
||||
int y, x;
|
||||
|
||||
for (y = rectangles[i].y; y < rectangles[i].y + rectangles[i].height; y++)
|
||||
{
|
||||
guchar *src_pixels, *dest_pixels;
|
||||
|
||||
src_pixels = gdk_pixbuf_get_pixels (pixbuf) +
|
||||
y * gdk_pixbuf_get_rowstride (pixbuf) +
|
||||
rectangles[i].x * (gdk_pixbuf_get_has_alpha (pixbuf) ? 4 : 3);
|
||||
dest_pixels = gdk_pixbuf_get_pixels (retval) +
|
||||
y * gdk_pixbuf_get_rowstride (retval) +
|
||||
rectangles[i].x * 4;
|
||||
|
||||
for (x = rectangles[i].x; x < rectangles[i].x + rectangles[i].width; x++)
|
||||
{
|
||||
*dest_pixels++ = *src_pixels ++;
|
||||
*dest_pixels++ = *src_pixels ++;
|
||||
*dest_pixels++ = *src_pixels ++;
|
||||
*dest_pixels++ = 255;
|
||||
|
||||
if (gdk_pixbuf_get_has_alpha (pixbuf))
|
||||
src_pixels++;
|
||||
}
|
||||
}
|
||||
case SNAPSHOT_WINDOW:
|
||||
{
|
||||
GdkWindow *window = gtk_widget_get_window (widget);
|
||||
if (gdk_window_get_window_type (window) == GDK_WINDOW_TOPLEVEL ||
|
||||
gdk_window_get_window_type (window) == GDK_WINDOW_FOREIGN)
|
||||
{
|
||||
/* give the WM/server some time to sync. They need it.
|
||||
* Also, do use popups instead of toplevls in your tests
|
||||
* whenever you can. */
|
||||
gdk_display_sync (gdk_window_get_display (window));
|
||||
g_timeout_add (500, quit_when_idle, loop);
|
||||
g_main_loop_run (loop);
|
||||
}
|
||||
gdk_cairo_set_source_window (cr, window, 0, 0);
|
||||
cairo_paint (cr);
|
||||
}
|
||||
break;
|
||||
case SNAPSHOT_DRAW:
|
||||
bg = gdk_window_get_background_pattern (gtk_widget_get_window (widget));
|
||||
if (bg)
|
||||
{
|
||||
cairo_set_source (cr, bg);
|
||||
cairo_paint (cr);
|
||||
}
|
||||
gtk_widget_draw (widget, cr);
|
||||
break;
|
||||
default:
|
||||
g_assert_not_reached();
|
||||
break;
|
||||
}
|
||||
|
||||
return retval;
|
||||
}
|
||||
cairo_destroy (cr);
|
||||
g_main_loop_unref (loop);
|
||||
gtk_widget_destroy (widget);
|
||||
|
||||
static GdkPixbuf *
|
||||
take_window_shot (Window child,
|
||||
gboolean include_decoration)
|
||||
{
|
||||
GdkWindow *window;
|
||||
Window xid;
|
||||
gint x_orig, y_orig;
|
||||
gint x = 0, y = 0;
|
||||
gint width, height;
|
||||
|
||||
GdkPixbuf *tmp, *tmp2;
|
||||
GdkPixbuf *retval;
|
||||
|
||||
if (include_decoration)
|
||||
xid = find_toplevel_window (child);
|
||||
else
|
||||
xid = child;
|
||||
|
||||
window = gdk_x11_window_foreign_new_for_display (gdk_display_get_default (), xid);
|
||||
|
||||
width = gdk_window_get_width (window);
|
||||
height = gdk_window_get_height (window);
|
||||
gdk_window_get_origin (window, &x_orig, &y_orig);
|
||||
|
||||
if (x_orig < 0)
|
||||
{
|
||||
x = - x_orig;
|
||||
width = width + x_orig;
|
||||
x_orig = 0;
|
||||
}
|
||||
|
||||
if (y_orig < 0)
|
||||
{
|
||||
y = - y_orig;
|
||||
height = height + y_orig;
|
||||
y_orig = 0;
|
||||
}
|
||||
|
||||
if (x_orig + width > gdk_screen_width ())
|
||||
width = gdk_screen_width () - x_orig;
|
||||
|
||||
if (y_orig + height > gdk_screen_height ())
|
||||
height = gdk_screen_height () - y_orig;
|
||||
|
||||
tmp = gdk_pixbuf_get_from_window (window,
|
||||
x, y, width, height);
|
||||
|
||||
if (include_decoration)
|
||||
tmp2 = remove_shaped_area (tmp, xid);
|
||||
else
|
||||
tmp2 = add_border_to_shot (tmp);
|
||||
|
||||
retval = create_shadowed_pixbuf (tmp2);
|
||||
g_object_unref (tmp);
|
||||
g_object_unref (tmp2);
|
||||
|
||||
return retval;
|
||||
return surface;
|
||||
}
|
||||
|
||||
int main (int argc, char **argv)
|
||||
{
|
||||
GList *toplevels;
|
||||
GdkPixbuf *screenshot = NULL;
|
||||
GList *node;
|
||||
|
||||
/* If there's no DISPLAY, we silently error out. We don't want to break
|
||||
@@ -190,42 +107,20 @@ int main (int argc, char **argv)
|
||||
|
||||
for (node = toplevels; node; node = g_list_next (node))
|
||||
{
|
||||
GtkAllocation allocation;
|
||||
GdkWindow *window;
|
||||
WidgetInfo *info;
|
||||
XID id;
|
||||
char *filename;
|
||||
cairo_surface_t *surface;
|
||||
|
||||
info = node->data;
|
||||
|
||||
gtk_widget_show (info->window);
|
||||
|
||||
window = gtk_widget_get_window (info->window);
|
||||
gtk_widget_get_allocation (info->window, &allocation);
|
||||
|
||||
gtk_widget_show_now (info->window);
|
||||
gtk_widget_queue_draw_area (info->window,
|
||||
allocation.x, allocation.y,
|
||||
allocation.width, allocation.height);
|
||||
gdk_window_process_updates (window, TRUE);
|
||||
|
||||
while (gtk_events_pending ())
|
||||
{
|
||||
gtk_main_iteration ();
|
||||
}
|
||||
sleep (1);
|
||||
|
||||
while (gtk_events_pending ())
|
||||
{
|
||||
gtk_main_iteration ();
|
||||
}
|
||||
|
||||
id = gdk_x11_window_get_xid (window);
|
||||
screenshot = take_window_shot (id, info->include_decorations);
|
||||
surface = snapshot_widget (info->window,
|
||||
info->include_decorations ? SNAPSHOT_WINDOW : SNAPSHOT_DRAW);
|
||||
filename = g_strdup_printf ("./%s.png", info->name);
|
||||
gdk_pixbuf_save (screenshot, filename, "png", NULL, NULL);
|
||||
g_free(filename);
|
||||
gtk_widget_hide (info->window);
|
||||
g_assert (cairo_surface_write_to_png (surface, filename) == CAIRO_STATUS_SUCCESS);
|
||||
g_free (filename);
|
||||
cairo_surface_destroy (surface);
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
||||
@@ -1430,56 +1430,12 @@ create_list_box (void)
|
||||
return info;
|
||||
}
|
||||
|
||||
static WidgetInfo *
|
||||
create_flow_box (void)
|
||||
{
|
||||
GtkWidget *widget;
|
||||
GtkWidget *box;
|
||||
GtkWidget *vbox;
|
||||
GtkWidget *child;
|
||||
GtkWidget *button;
|
||||
WidgetInfo *info;
|
||||
|
||||
widget = gtk_frame_new (NULL);
|
||||
gtk_frame_set_shadow_type (GTK_FRAME (widget), GTK_SHADOW_IN);
|
||||
|
||||
box = gtk_flow_box_new ();
|
||||
gtk_flow_box_set_min_children_per_line (GTK_FLOW_BOX (box), 2);
|
||||
gtk_flow_box_set_max_children_per_line (GTK_FLOW_BOX (box), 2);
|
||||
gtk_flow_box_set_selection_mode (GTK_FLOW_BOX (box), GTK_SELECTION_BROWSE);
|
||||
button = gtk_label_new ("Child One");
|
||||
gtk_container_add (GTK_CONTAINER (box), button);
|
||||
button = gtk_button_new_with_label ("Child Two");
|
||||
gtk_container_add (GTK_CONTAINER (box), button);
|
||||
child = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 6);
|
||||
gtk_container_add (GTK_CONTAINER (child), gtk_label_new ("Child Three"));
|
||||
button = gtk_check_button_new ();
|
||||
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (button), TRUE);
|
||||
gtk_container_add (GTK_CONTAINER (child), button);
|
||||
gtk_container_add (GTK_CONTAINER (box), child);
|
||||
gtk_flow_box_select_child (GTK_FLOW_BOX (box),
|
||||
GTK_FLOW_BOX_CHILD (gtk_widget_get_parent (child)));
|
||||
|
||||
gtk_container_add (GTK_CONTAINER (widget), box);
|
||||
|
||||
vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
|
||||
|
||||
gtk_box_pack_start (GTK_BOX (vbox), widget, FALSE, FALSE, 0);
|
||||
gtk_box_pack_start (GTK_BOX (vbox), gtk_label_new ("Flow Box"),
|
||||
FALSE, FALSE, 0);
|
||||
info = new_widget_info ("flow-box", vbox, ASIS);
|
||||
info->no_focus = FALSE;
|
||||
|
||||
return info;
|
||||
}
|
||||
|
||||
GList *
|
||||
get_all_widgets (void)
|
||||
{
|
||||
GList *retval = NULL;
|
||||
|
||||
retval = g_list_prepend (retval, create_list_box());
|
||||
retval = g_list_prepend (retval, create_flow_box());
|
||||
retval = g_list_prepend (retval, create_headerbar ());
|
||||
retval = g_list_prepend (retval, create_placessidebar ());
|
||||
retval = g_list_prepend (retval, create_stack ());
|
||||
|
||||
@@ -1,8 +1,7 @@
|
||||
SUBDIRS = \
|
||||
application1 application2 application3 \
|
||||
application4 application5 application6 \
|
||||
application7 application8 application9 \
|
||||
application10
|
||||
application7 application8 application9
|
||||
|
||||
AM_CPPFLAGS = \
|
||||
-I$(top_srcdir) \
|
||||
@@ -27,8 +26,7 @@ noinst_PROGRAMS = \
|
||||
action-namespace \
|
||||
grid-packing \
|
||||
drawing \
|
||||
builder \
|
||||
search-bar
|
||||
builder
|
||||
|
||||
EXTRA_DIST = builder.ui
|
||||
|
||||
|
||||
@@ -83,7 +83,8 @@ activate (GApplication *app,
|
||||
win = gtk_application_window_new (GTK_APPLICATION (app));
|
||||
|
||||
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);
|
||||
g_simple_action_group_add_entries (doc_actions, doc_entries,
|
||||
G_N_ELEMENTS (doc_entries), win);
|
||||
|
||||
g_action_map_add_action_entries (G_ACTION_MAP (win), win_entries,
|
||||
G_N_ELEMENTS (win_entries), win);
|
||||
|
||||
@@ -17,5 +17,3 @@ exampleapp_SOURCES = \
|
||||
main.c \
|
||||
exampleapp.c exampleapp.h \
|
||||
exampleappwin.c exampleappwin.h
|
||||
|
||||
-include $(top_srcdir)/git.mk
|
||||
|
||||
@@ -1,50 +0,0 @@
|
||||
AM_CPPFLAGS = \
|
||||
-I$(top_srcdir) \
|
||||
-I$(top_srcdir)/gdk \
|
||||
-I$(top_builddir)/gdk \
|
||||
$(GTK_DEBUG_FLAGS) \
|
||||
$(GTK_DEP_CFLAGS)
|
||||
|
||||
LDADD = \
|
||||
$(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 \
|
||||
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 = \
|
||||
org.gtk.exampleapp.gschema.xml
|
||||
|
||||
@GSETTINGS_RULES@
|
||||
|
||||
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 \
|
||||
org.gtk.exampleapp.gschema.xml
|
||||
|
||||
CLEANFILES = \
|
||||
gschemas.compiled
|
||||
|
||||
-include $(top_srcdir)/git.mk
|
||||
@@ -1,19 +0,0 @@
|
||||
<?xml version="1.0"?>
|
||||
<interface>
|
||||
<!-- interface-requires gtk+ 3.0 -->
|
||||
<menu id="appmenu">
|
||||
<section>
|
||||
<item>
|
||||
<attribute name="label" translatable="yes">_Preferences</attribute>
|
||||
<attribute name="action">app.preferences</attribute>
|
||||
</item>
|
||||
</section>
|
||||
<section>
|
||||
<item>
|
||||
<attribute name="label" translatable="yes">_Quit</attribute>
|
||||
<attribute name="action">app.quit</attribute>
|
||||
<attribute name="accel"><![CDATA[<Ctrl>Q]]></attribute>
|
||||
</item>
|
||||
</section>
|
||||
</menu>
|
||||
</interface>
|
||||
@@ -1,115 +0,0 @@
|
||||
#include <gtk/gtk.h>
|
||||
|
||||
#include "exampleapp.h"
|
||||
#include "exampleappwin.h"
|
||||
#include "exampleappprefs.h"
|
||||
|
||||
struct _ExampleApp
|
||||
{
|
||||
GtkApplication parent;
|
||||
};
|
||||
|
||||
struct _ExampleAppClass
|
||||
{
|
||||
GtkApplicationClass parent_class;
|
||||
};
|
||||
|
||||
G_DEFINE_TYPE(ExampleApp, example_app, GTK_TYPE_APPLICATION);
|
||||
|
||||
static void
|
||||
example_app_init (ExampleApp *app)
|
||||
{
|
||||
}
|
||||
|
||||
static void
|
||||
preferences_activated (GSimpleAction *action,
|
||||
GVariant *parameter,
|
||||
gpointer app)
|
||||
{
|
||||
ExampleAppPrefs *prefs;
|
||||
GtkWindow *win;
|
||||
|
||||
win = gtk_application_get_active_window (GTK_APPLICATION (app));
|
||||
prefs = example_app_prefs_new (EXAMPLE_APP_WINDOW (win));
|
||||
gtk_window_present (GTK_WINDOW (prefs));
|
||||
}
|
||||
|
||||
static void
|
||||
quit_activated (GSimpleAction *action,
|
||||
GVariant *parameter,
|
||||
gpointer app)
|
||||
{
|
||||
g_application_quit (G_APPLICATION (app));
|
||||
}
|
||||
|
||||
static GActionEntry app_entries[] =
|
||||
{
|
||||
{ "preferences", preferences_activated, NULL, NULL, NULL },
|
||||
{ "quit", quit_activated, NULL, NULL, NULL }
|
||||
};
|
||||
|
||||
static void
|
||||
example_app_startup (GApplication *app)
|
||||
{
|
||||
GtkBuilder *builder;
|
||||
GMenuModel *app_menu;
|
||||
|
||||
G_APPLICATION_CLASS (example_app_parent_class)->startup (app);
|
||||
|
||||
g_action_map_add_action_entries (G_ACTION_MAP (app),
|
||||
app_entries, G_N_ELEMENTS (app_entries),
|
||||
app);
|
||||
|
||||
builder = gtk_builder_new_from_resource ("/org/gtk/exampleapp/app-menu.ui");
|
||||
app_menu = G_MENU_MODEL (gtk_builder_get_object (builder, "appmenu"));
|
||||
gtk_application_set_app_menu (GTK_APPLICATION (app), app_menu);
|
||||
g_object_unref (builder);
|
||||
}
|
||||
|
||||
static void
|
||||
example_app_activate (GApplication *app)
|
||||
{
|
||||
ExampleAppWindow *win;
|
||||
|
||||
win = example_app_window_new (EXAMPLE_APP (app));
|
||||
gtk_window_present (GTK_WINDOW (win));
|
||||
}
|
||||
|
||||
static void
|
||||
example_app_open (GApplication *app,
|
||||
GFile **files,
|
||||
gint n_files,
|
||||
const gchar *hint)
|
||||
{
|
||||
GList *windows;
|
||||
ExampleAppWindow *win;
|
||||
int i;
|
||||
|
||||
windows = gtk_application_get_windows (GTK_APPLICATION (app));
|
||||
if (windows)
|
||||
win = EXAMPLE_APP_WINDOW (windows->data);
|
||||
else
|
||||
win = example_app_window_new (EXAMPLE_APP (app));
|
||||
|
||||
for (i = 0; i < n_files; i++)
|
||||
example_app_window_open (win, files[i]);
|
||||
|
||||
gtk_window_present (GTK_WINDOW (win));
|
||||
}
|
||||
|
||||
static void
|
||||
example_app_class_init (ExampleAppClass *class)
|
||||
{
|
||||
G_APPLICATION_CLASS (class)->startup = example_app_startup;
|
||||
G_APPLICATION_CLASS (class)->activate = example_app_activate;
|
||||
G_APPLICATION_CLASS (class)->open = example_app_open;
|
||||
}
|
||||
|
||||
ExampleApp *
|
||||
example_app_new (void)
|
||||
{
|
||||
return g_object_new (EXAMPLE_APP_TYPE,
|
||||
"application-id", "org.gtk.exampleapp",
|
||||
"flags", G_APPLICATION_HANDLES_OPEN,
|
||||
NULL);
|
||||
}
|
||||
@@ -1,9 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<gresources>
|
||||
<gresource prefix="/org/gtk/exampleapp">
|
||||
<file preprocess="xml-stripblanks">window.ui</file>
|
||||
<file preprocess="xml-stripblanks">app-menu.ui</file>
|
||||
<file preprocess="xml-stripblanks">gears-menu.ui</file>
|
||||
<file preprocess="xml-stripblanks">prefs.ui</file>
|
||||
</gresource>
|
||||
</gresources>
|
||||
@@ -1,19 +0,0 @@
|
||||
#ifndef __EXAMPLEAPP_H
|
||||
#define __EXAMPLEAPP_H
|
||||
|
||||
#include <gtk/gtk.h>
|
||||
|
||||
|
||||
#define EXAMPLE_APP_TYPE (example_app_get_type ())
|
||||
#define EXAMPLE_APP(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), EXAMPLE_APP_TYPE, ExampleApp))
|
||||
|
||||
|
||||
typedef struct _ExampleApp ExampleApp;
|
||||
typedef struct _ExampleAppClass ExampleAppClass;
|
||||
|
||||
|
||||
GType example_app_get_type (void);
|
||||
ExampleApp *example_app_new (void);
|
||||
|
||||
|
||||
#endif /* __EXAMPLEAPP_H */
|
||||
@@ -1,79 +0,0 @@
|
||||
#include <gtk/gtk.h>
|
||||
|
||||
#include "exampleapp.h"
|
||||
#include "exampleappwin.h"
|
||||
#include "exampleappprefs.h"
|
||||
|
||||
struct _ExampleAppPrefs
|
||||
{
|
||||
GtkDialog parent;
|
||||
};
|
||||
|
||||
struct _ExampleAppPrefsClass
|
||||
{
|
||||
GtkDialogClass parent_class;
|
||||
};
|
||||
|
||||
typedef struct _ExampleAppPrefsPrivate ExampleAppPrefsPrivate;
|
||||
|
||||
struct _ExampleAppPrefsPrivate
|
||||
{
|
||||
GSettings *settings;
|
||||
GtkWidget *font;
|
||||
GtkWidget *transition;
|
||||
};
|
||||
|
||||
G_DEFINE_TYPE_WITH_PRIVATE(ExampleAppPrefs, example_app_prefs, GTK_TYPE_DIALOG)
|
||||
|
||||
static void
|
||||
preferences_closed (GtkWidget *button)
|
||||
{
|
||||
gtk_widget_destroy (gtk_widget_get_toplevel (button));
|
||||
}
|
||||
|
||||
static void
|
||||
example_app_prefs_init (ExampleAppPrefs *prefs)
|
||||
{
|
||||
ExampleAppPrefsPrivate *priv;
|
||||
|
||||
priv = example_app_prefs_get_instance_private (prefs);
|
||||
gtk_widget_init_template (GTK_WIDGET (prefs));
|
||||
priv->settings = g_settings_new ("org.gtk.exampleapp");
|
||||
|
||||
g_settings_bind (priv->settings, "font",
|
||||
priv->font, "font",
|
||||
G_SETTINGS_BIND_DEFAULT);
|
||||
g_settings_bind (priv->settings, "transition",
|
||||
priv->transition, "active-id",
|
||||
G_SETTINGS_BIND_DEFAULT);
|
||||
}
|
||||
|
||||
static void
|
||||
example_app_prefs_dispose (GObject *object)
|
||||
{
|
||||
ExampleAppPrefsPrivate *priv;
|
||||
|
||||
priv = example_app_prefs_get_instance_private (EXAMPLE_APP_PREFS (object));
|
||||
g_clear_object (&priv->settings);
|
||||
|
||||
G_OBJECT_CLASS (example_app_prefs_parent_class)->dispose (object);
|
||||
}
|
||||
|
||||
static void
|
||||
example_app_prefs_class_init (ExampleAppPrefsClass *class)
|
||||
{
|
||||
G_OBJECT_CLASS (class)->dispose = example_app_prefs_dispose;
|
||||
|
||||
gtk_widget_class_set_template_from_resource (GTK_WIDGET_CLASS (class),
|
||||
"/org/gtk/exampleapp/prefs.ui");
|
||||
gtk_widget_class_bind_template_child_private (GTK_WIDGET_CLASS (class), ExampleAppPrefs, font);
|
||||
gtk_widget_class_bind_template_child_private (GTK_WIDGET_CLASS (class), ExampleAppPrefs, transition);
|
||||
|
||||
gtk_widget_class_bind_template_callback (GTK_WIDGET_CLASS (class), preferences_closed);
|
||||
}
|
||||
|
||||
ExampleAppPrefs *
|
||||
example_app_prefs_new (ExampleAppWindow *win)
|
||||
{
|
||||
return g_object_new (EXAMPLE_APP_PREFS_TYPE, "transient-for", win, NULL);
|
||||
}
|
||||
@@ -1,20 +0,0 @@
|
||||
#ifndef __EXAMPLEAPPPREFS_H
|
||||
#define __EXAMPLEAPPPREFS_H
|
||||
|
||||
#include <gtk/gtk.h>
|
||||
#include "exampleappwin.h"
|
||||
|
||||
|
||||
#define EXAMPLE_APP_PREFS_TYPE (example_app_prefs_get_type ())
|
||||
#define EXAMPLE_APP_PREFS(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), EXAMPLE_APP_PREFS_TYPE, ExampleAppPrefs))
|
||||
|
||||
|
||||
typedef struct _ExampleAppPrefs ExampleAppPrefs;
|
||||
typedef struct _ExampleAppPrefsClass ExampleAppPrefsClass;
|
||||
|
||||
|
||||
GType example_app_prefs_get_type (void);
|
||||
ExampleAppPrefs *example_app_prefs_new (ExampleAppWindow *win);
|
||||
|
||||
|
||||
#endif /* __EXAMPLEAPPPREFS_H */
|
||||
@@ -1,340 +0,0 @@
|
||||
#include "exampleapp.h"
|
||||
#include "exampleappwin.h"
|
||||
#include <gtk/gtk.h>
|
||||
|
||||
struct _ExampleAppWindow
|
||||
{
|
||||
GtkApplicationWindow parent;
|
||||
};
|
||||
|
||||
struct _ExampleAppWindowClass
|
||||
{
|
||||
GtkApplicationWindowClass parent_class;
|
||||
};
|
||||
|
||||
typedef struct _ExampleAppWindowPrivate ExampleAppWindowPrivate;
|
||||
|
||||
struct _ExampleAppWindowPrivate
|
||||
{
|
||||
GSettings *settings;
|
||||
GtkWidget *stack;
|
||||
GtkWidget *search;
|
||||
GtkWidget *searchbar;
|
||||
GtkWidget *searchentry;
|
||||
GtkWidget *gears;
|
||||
GtkWidget *sidebar;
|
||||
GtkWidget *words;
|
||||
GtkWidget *lines;
|
||||
GtkWidget *lines_label;
|
||||
};
|
||||
|
||||
G_DEFINE_TYPE_WITH_PRIVATE(ExampleAppWindow, example_app_window, GTK_TYPE_APPLICATION_WINDOW);
|
||||
|
||||
static void
|
||||
search_text_changed (GtkEntry *entry)
|
||||
{
|
||||
ExampleAppWindow *win;
|
||||
ExampleAppWindowPrivate *priv;
|
||||
const gchar *text;
|
||||
GtkWidget *tab;
|
||||
GtkWidget *view;
|
||||
GtkTextBuffer *buffer;
|
||||
GtkTextIter start, match_start, match_end;
|
||||
|
||||
text = gtk_entry_get_text (entry);
|
||||
|
||||
if (text[0] == '\0')
|
||||
return;
|
||||
|
||||
win = EXAMPLE_APP_WINDOW (gtk_widget_get_toplevel (GTK_WIDGET (entry)));
|
||||
priv = example_app_window_get_instance_private (win);
|
||||
|
||||
tab = gtk_stack_get_visible_child (GTK_STACK (priv->stack));
|
||||
view = gtk_bin_get_child (GTK_BIN (tab));
|
||||
buffer = gtk_text_view_get_buffer (GTK_TEXT_VIEW (view));
|
||||
|
||||
/* Very simple-minded search implementation */
|
||||
gtk_text_buffer_get_start_iter (buffer, &start);
|
||||
if (gtk_text_iter_forward_search (&start, text, GTK_TEXT_SEARCH_CASE_INSENSITIVE,
|
||||
&match_start, &match_end, NULL))
|
||||
{
|
||||
gtk_text_buffer_select_range (buffer, &match_start, &match_end);
|
||||
gtk_text_view_scroll_to_iter (GTK_TEXT_VIEW (view), &match_start,
|
||||
0.0, FALSE, 0.0, 0.0);
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
find_word (GtkButton *button,
|
||||
ExampleAppWindow *win)
|
||||
{
|
||||
ExampleAppWindowPrivate *priv;
|
||||
const gchar *word;
|
||||
|
||||
priv = example_app_window_get_instance_private (win);
|
||||
|
||||
word = gtk_button_get_label (button);
|
||||
gtk_entry_set_text (GTK_ENTRY (priv->searchentry), word);
|
||||
}
|
||||
|
||||
static void
|
||||
update_words (ExampleAppWindow *win)
|
||||
{
|
||||
ExampleAppWindowPrivate *priv;
|
||||
GHashTable *strings;
|
||||
GHashTableIter iter;
|
||||
GtkWidget *tab, *view, *row;
|
||||
GtkTextBuffer *buffer;
|
||||
GtkTextIter start, end;
|
||||
GList *children, *l;
|
||||
gchar *word, *key;
|
||||
|
||||
priv = example_app_window_get_instance_private (win);
|
||||
|
||||
tab = gtk_stack_get_visible_child (GTK_STACK (priv->stack));
|
||||
|
||||
if (tab == NULL)
|
||||
return;
|
||||
|
||||
view = gtk_bin_get_child (GTK_BIN (tab));
|
||||
buffer = gtk_text_view_get_buffer (GTK_TEXT_VIEW (view));
|
||||
|
||||
strings = g_hash_table_new_full (g_str_hash, g_str_equal, g_free, NULL);
|
||||
|
||||
gtk_text_buffer_get_start_iter (buffer, &start);
|
||||
while (!gtk_text_iter_is_end (&start))
|
||||
{
|
||||
while (!gtk_text_iter_starts_word (&start))
|
||||
{
|
||||
if (!gtk_text_iter_forward_char (&start))
|
||||
goto done;
|
||||
}
|
||||
end = start;
|
||||
if (!gtk_text_iter_forward_word_end (&end))
|
||||
goto done;
|
||||
word = gtk_text_buffer_get_text (buffer, &start, &end, FALSE);
|
||||
g_hash_table_add (strings, g_utf8_strdown (word, -1));
|
||||
g_free (word);
|
||||
start = end;
|
||||
}
|
||||
|
||||
done:
|
||||
children = gtk_container_get_children (GTK_CONTAINER (priv->words));
|
||||
for (l = children; l; l = l->next)
|
||||
gtk_container_remove (GTK_CONTAINER (priv->words), GTK_WIDGET (l->data));
|
||||
g_list_free (children);
|
||||
|
||||
g_hash_table_iter_init (&iter, strings);
|
||||
while (g_hash_table_iter_next (&iter, (gpointer *)&key, NULL))
|
||||
{
|
||||
row = gtk_button_new_with_label (key);
|
||||
g_signal_connect (row, "clicked",
|
||||
G_CALLBACK (find_word), win);
|
||||
gtk_widget_show (row);
|
||||
gtk_container_add (GTK_CONTAINER (priv->words), row);
|
||||
}
|
||||
|
||||
g_hash_table_unref (strings);
|
||||
}
|
||||
|
||||
static void
|
||||
update_lines (ExampleAppWindow *win)
|
||||
{
|
||||
ExampleAppWindowPrivate *priv;
|
||||
GtkWidget *tab, *view;
|
||||
GtkTextBuffer *buffer;
|
||||
GtkTextIter iter;
|
||||
int count;
|
||||
gchar *lines;
|
||||
|
||||
priv = example_app_window_get_instance_private (win);
|
||||
|
||||
tab = gtk_stack_get_visible_child (GTK_STACK (priv->stack));
|
||||
|
||||
if (tab == NULL)
|
||||
return;
|
||||
|
||||
view = gtk_bin_get_child (GTK_BIN (tab));
|
||||
buffer = gtk_text_view_get_buffer (GTK_TEXT_VIEW (view));
|
||||
|
||||
count = 0;
|
||||
|
||||
gtk_text_buffer_get_start_iter (buffer, &iter);
|
||||
while (!gtk_text_iter_is_end (&iter))
|
||||
{
|
||||
count++;
|
||||
if (!gtk_text_iter_forward_line (&iter))
|
||||
break;
|
||||
}
|
||||
|
||||
lines = g_strdup_printf ("%d", count);
|
||||
gtk_label_set_text (GTK_LABEL (priv->lines), lines);
|
||||
g_free (lines);
|
||||
}
|
||||
|
||||
static void
|
||||
visible_child_changed (GObject *stack,
|
||||
GParamSpec *pspec)
|
||||
{
|
||||
ExampleAppWindow *win;
|
||||
ExampleAppWindowPrivate *priv;
|
||||
|
||||
if (gtk_widget_in_destruction (GTK_WIDGET (stack)))
|
||||
return;
|
||||
|
||||
win = EXAMPLE_APP_WINDOW (gtk_widget_get_toplevel (GTK_WIDGET (stack)));
|
||||
priv = example_app_window_get_instance_private (win);
|
||||
gtk_search_bar_set_search_mode (GTK_SEARCH_BAR (priv->searchbar), FALSE);
|
||||
update_words (win);
|
||||
update_lines (win);
|
||||
}
|
||||
|
||||
static void
|
||||
words_changed (GObject *sidebar,
|
||||
GParamSpec *pspec,
|
||||
ExampleAppWindow *win)
|
||||
{
|
||||
update_words (win);
|
||||
}
|
||||
|
||||
static void
|
||||
example_app_window_init (ExampleAppWindow *win)
|
||||
{
|
||||
ExampleAppWindowPrivate *priv;
|
||||
GtkBuilder *builder;
|
||||
GMenuModel *menu;
|
||||
GAction *action;
|
||||
|
||||
priv = example_app_window_get_instance_private (win);
|
||||
gtk_widget_init_template (GTK_WIDGET (win));
|
||||
priv->settings = g_settings_new ("org.gtk.exampleapp");
|
||||
|
||||
g_settings_bind (priv->settings, "transition",
|
||||
priv->stack, "transition-type",
|
||||
G_SETTINGS_BIND_DEFAULT);
|
||||
|
||||
g_settings_bind (priv->settings, "show-words",
|
||||
priv->sidebar, "reveal-child",
|
||||
G_SETTINGS_BIND_DEFAULT);
|
||||
|
||||
g_object_bind_property (priv->search, "active",
|
||||
priv->searchbar, "search-mode-enabled",
|
||||
G_BINDING_BIDIRECTIONAL);
|
||||
|
||||
g_signal_connect (priv->sidebar, "notify::reveal-child",
|
||||
G_CALLBACK (words_changed), win);
|
||||
|
||||
builder = gtk_builder_new_from_resource ("/org/gtk/exampleapp/gears-menu.ui");
|
||||
menu = G_MENU_MODEL (gtk_builder_get_object (builder, "menu"));
|
||||
gtk_menu_button_set_menu_model (GTK_MENU_BUTTON (priv->gears), menu);
|
||||
g_object_unref (builder);
|
||||
|
||||
action = g_settings_create_action (priv->settings, "show-words");
|
||||
g_action_map_add_action (G_ACTION_MAP (win), action);
|
||||
g_object_unref (action);
|
||||
|
||||
action = (GAction*) g_property_action_new ("show-lines", priv->lines, "visible");
|
||||
g_action_map_add_action (G_ACTION_MAP (win), action);
|
||||
g_object_unref (action);
|
||||
|
||||
g_object_bind_property (priv->lines, "visible",
|
||||
priv->lines_label, "visible",
|
||||
G_BINDING_DEFAULT);
|
||||
|
||||
g_object_set (gtk_settings_get_default (), "gtk-shell-shows-app-menu", FALSE, NULL);
|
||||
gtk_application_window_set_show_menubar (GTK_APPLICATION_WINDOW (win), TRUE);
|
||||
}
|
||||
|
||||
static void
|
||||
example_app_window_dispose (GObject *object)
|
||||
{
|
||||
ExampleAppWindow *win;
|
||||
ExampleAppWindowPrivate *priv;
|
||||
|
||||
win = EXAMPLE_APP_WINDOW (object);
|
||||
priv = example_app_window_get_instance_private (win);
|
||||
|
||||
g_clear_object (&priv->settings);
|
||||
|
||||
G_OBJECT_CLASS (example_app_window_parent_class)->dispose (object);
|
||||
}
|
||||
|
||||
static void
|
||||
example_app_window_class_init (ExampleAppWindowClass *class)
|
||||
{
|
||||
G_OBJECT_CLASS (class)->dispose = example_app_window_dispose;
|
||||
|
||||
gtk_widget_class_set_template_from_resource (GTK_WIDGET_CLASS (class),
|
||||
"/org/gtk/exampleapp/window.ui");
|
||||
|
||||
gtk_widget_class_bind_template_child_private (GTK_WIDGET_CLASS (class), ExampleAppWindow, stack);
|
||||
gtk_widget_class_bind_template_child_private (GTK_WIDGET_CLASS (class), ExampleAppWindow, search);
|
||||
gtk_widget_class_bind_template_child_private (GTK_WIDGET_CLASS (class), ExampleAppWindow, searchbar);
|
||||
gtk_widget_class_bind_template_child_private (GTK_WIDGET_CLASS (class), ExampleAppWindow, searchentry);
|
||||
gtk_widget_class_bind_template_child_private (GTK_WIDGET_CLASS (class), ExampleAppWindow, gears);
|
||||
gtk_widget_class_bind_template_child_private (GTK_WIDGET_CLASS (class), ExampleAppWindow, words);
|
||||
gtk_widget_class_bind_template_child_private (GTK_WIDGET_CLASS (class), ExampleAppWindow, sidebar);
|
||||
gtk_widget_class_bind_template_child_private (GTK_WIDGET_CLASS (class), ExampleAppWindow, lines);
|
||||
gtk_widget_class_bind_template_child_private (GTK_WIDGET_CLASS (class), ExampleAppWindow, lines_label);
|
||||
|
||||
gtk_widget_class_bind_template_callback (GTK_WIDGET_CLASS (class), search_text_changed);
|
||||
gtk_widget_class_bind_template_callback (GTK_WIDGET_CLASS (class), visible_child_changed);
|
||||
}
|
||||
|
||||
ExampleAppWindow *
|
||||
example_app_window_new (ExampleApp *app)
|
||||
{
|
||||
return g_object_new (EXAMPLE_APP_WINDOW_TYPE, "application", app, NULL);
|
||||
}
|
||||
|
||||
void
|
||||
example_app_window_open (ExampleAppWindow *win,
|
||||
GFile *file)
|
||||
{
|
||||
ExampleAppWindowPrivate *priv;
|
||||
gchar *basename;
|
||||
GtkWidget *scrolled, *view;
|
||||
gchar *contents;
|
||||
gsize length;
|
||||
GtkTextBuffer *buffer;
|
||||
GtkTextTag *tag;
|
||||
GtkTextIter start_iter, end_iter;
|
||||
|
||||
priv = example_app_window_get_instance_private (win);
|
||||
basename = g_file_get_basename (file);
|
||||
|
||||
scrolled = gtk_scrolled_window_new (NULL, NULL);
|
||||
gtk_widget_show (scrolled);
|
||||
gtk_widget_set_hexpand (scrolled, TRUE);
|
||||
gtk_widget_set_vexpand (scrolled, TRUE);
|
||||
view = gtk_text_view_new ();
|
||||
gtk_text_view_set_editable (GTK_TEXT_VIEW (view), FALSE);
|
||||
gtk_text_view_set_cursor_visible (GTK_TEXT_VIEW (view), FALSE);
|
||||
gtk_widget_show (view);
|
||||
gtk_container_add (GTK_CONTAINER (scrolled), view);
|
||||
gtk_stack_add_titled (GTK_STACK (priv->stack), scrolled, basename, basename);
|
||||
|
||||
buffer = gtk_text_view_get_buffer (GTK_TEXT_VIEW (view));
|
||||
|
||||
if (g_file_load_contents (file, NULL, &contents, &length, NULL, NULL))
|
||||
{
|
||||
gtk_text_buffer_set_text (buffer, contents, length);
|
||||
g_free (contents);
|
||||
}
|
||||
|
||||
tag = gtk_text_buffer_create_tag (buffer, NULL, NULL);
|
||||
g_settings_bind (priv->settings, "font",
|
||||
tag, "font",
|
||||
G_SETTINGS_BIND_DEFAULT);
|
||||
|
||||
gtk_text_buffer_get_start_iter (buffer, &start_iter);
|
||||
gtk_text_buffer_get_end_iter (buffer, &end_iter);
|
||||
gtk_text_buffer_apply_tag (buffer, tag, &start_iter, &end_iter);
|
||||
|
||||
g_free (basename);
|
||||
|
||||
gtk_widget_set_sensitive (priv->search, TRUE);
|
||||
|
||||
update_words (win);
|
||||
update_lines (win);
|
||||
}
|
||||
@@ -1,22 +0,0 @@
|
||||
#ifndef __EXAMPLEAPPWIN_H
|
||||
#define __EXAMPLEAPPWIN_H
|
||||
|
||||
#include <gtk/gtk.h>
|
||||
#include "exampleapp.h"
|
||||
|
||||
|
||||
#define EXAMPLE_APP_WINDOW_TYPE (example_app_window_get_type ())
|
||||
#define EXAMPLE_APP_WINDOW(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), EXAMPLE_APP_WINDOW_TYPE, ExampleAppWindow))
|
||||
|
||||
|
||||
typedef struct _ExampleAppWindow ExampleAppWindow;
|
||||
typedef struct _ExampleAppWindowClass ExampleAppWindowClass;
|
||||
|
||||
|
||||
GType example_app_window_get_type (void);
|
||||
ExampleAppWindow *example_app_window_new (ExampleApp *app);
|
||||
void example_app_window_open (ExampleAppWindow *win,
|
||||
GFile *file);
|
||||
|
||||
|
||||
#endif /* __EXAMPLEAPPWIN_H */
|
||||
@@ -1,16 +0,0 @@
|
||||
<?xml version="1.0"?>
|
||||
<interface>
|
||||
<!-- interface-requires gtk+ 3.0 -->
|
||||
<menu id="menu">
|
||||
<section>
|
||||
<item>
|
||||
<attribute name="label" translatable="yes">_Words</attribute>
|
||||
<attribute name="action">win.show-words</attribute>
|
||||
</item>
|
||||
<item>
|
||||
<attribute name="label" translatable="yes">_Lines</attribute>
|
||||
<attribute name="action">win.show-lines</attribute>
|
||||
</item>
|
||||
</section>
|
||||
</menu>
|
||||
</interface>
|
||||