Compare commits
1 Commits
3.21.3
...
wip/matthi
Author | SHA1 | Date | |
---|---|---|---|
|
8de65c5aca |
@@ -22,7 +22,6 @@ EXTRA_DIST += \
|
||||
sanitize-la.sh \
|
||||
po/README.translators \
|
||||
po/po2tbl.sed.in \
|
||||
build-aux/config.rpath \
|
||||
make-pot
|
||||
|
||||
MAINTAINERCLEANFILES = \
|
||||
@@ -96,7 +95,7 @@ ChangeLog:
|
||||
uninstall-local:
|
||||
rm -f $(DESTDIR)$(pkgconfigdir)/gtk+-3.0.pc
|
||||
|
||||
AM_DISTCHECK_CONFIGURE_FLAGS = \
|
||||
DISTCHECK_CONFIGURE_FLAGS = \
|
||||
--enable-gtk-doc \
|
||||
--disable-doc-cross-references \
|
||||
--enable-man \
|
||||
@@ -111,6 +110,7 @@ GITIGNOREFILES = \
|
||||
po-properties/*.gmo \
|
||||
po-properties/*.mo \
|
||||
po-properties/POTFILES \
|
||||
po-properties/stamp-it
|
||||
po-properties/stamp-it \
|
||||
po-properties/.intltool-merge-cache
|
||||
|
||||
-include $(top_srcdir)/git.mk
|
||||
|
807
NEWS
807
NEWS
@@ -1,807 +1,3 @@
|
||||
Overview of Changes in GTK+ 3.21.3
|
||||
==================================
|
||||
|
||||
* GtkStack now has its own accessible implementation which only
|
||||
shows the currently visible child
|
||||
|
||||
* The GtkSizeGroup::ignore-hidden property has been documented as
|
||||
not working.
|
||||
|
||||
* GDK_SOURCE_TRACKPOINT has been added to the GdkInputSource enumeration
|
||||
to allow special-casing this kind of input device
|
||||
|
||||
* Wayland:
|
||||
- Use separate devices to differentiate between various sources of
|
||||
scroll events
|
||||
- Fall back to using shm_open if memfds are unavailable
|
||||
|
||||
* Styling of text in GtkScale and GtkProgressBar can now be influenced
|
||||
by the proper CSS nodes
|
||||
|
||||
* GtkScrolledWindow has new max-content-width/height properties to
|
||||
control its size
|
||||
|
||||
* GtkFileChooser search has been fixed to work with trackers FTS5 syntax
|
||||
|
||||
* Bugs fixed:
|
||||
79229 GtkScale with a big number of digits and value pos set to...
|
||||
118959 GtkScale value '-0'
|
||||
556254 Test properties of type GObject in the 'object' test
|
||||
578626 Vertical Scale Widget sometimes not allocating enough room...
|
||||
674215 [patch] regression with updating tooltips
|
||||
708148 gtk_tree_view_get_path_at_pos mistakenly identifies column...
|
||||
710471 Make gtk_scrolled_window_remove() smart
|
||||
742281 GtkScrolledWindow should have max-content-height and max-c...
|
||||
745622 Selected text not highlighted in GtkInfoBar
|
||||
751409 gtk_style_context_add_provider() does not propagate to chi...
|
||||
753202 change cursor for click scrolling
|
||||
764203 Default background color for the 'textview border' node
|
||||
765410 Scrollbar does not update since 3.20
|
||||
765595 Modal popover does not close when focus leaves it
|
||||
766341 Do not rely on memfd as it requires a fairly recent kernel
|
||||
766372 Scale omits value in various size calculations, causing in...
|
||||
766569 Better size requisition for GTK_SCROLL_NATURAL children
|
||||
766675 Add appropriate frame drawing API to GdkWindow
|
||||
766860 tiled (snapped, half-maximized) windows in Wayland aren't ...
|
||||
766878 placesview: Do not mark icon name as translatable
|
||||
767052 Wayland: Iconifying a modal dialog makes the app unusable
|
||||
767058 GtkInfoBar: right-click/context menu all white
|
||||
767093 wayland: Provide information about scroll devices
|
||||
767100 Add an input source type for trackpoints
|
||||
767108 Separators not correctly placed in GtkPopover
|
||||
767238 Fix long standing regression in min-content-width/min-conte...
|
||||
767241 wayland: Long window titles crash clients
|
||||
767310 High-contrast theme doesn't show focus rectangle in default...
|
||||
767312 gtk_widget_path_append_for_widget() misses classes unless g...
|
||||
767468 Popover over a treeview cellrenderer is hidden immediately ...
|
||||
767705 GtkActionHelper: Change a message to a warning
|
||||
767766 CUPS 2.X detected incorrectly by configure
|
||||
767795 Warning when the "accelerator" property of GtkShortcutsShor...
|
||||
|
||||
|
||||
Translation updates:
|
||||
Thai
|
||||
Catalan
|
||||
Occitan
|
||||
Spanish
|
||||
Scottish Gaelic
|
||||
Brazilian Portuguese
|
||||
|
||||
|
||||
Overview of Changes in GTK+ 3.21.2
|
||||
==================================
|
||||
|
||||
* GTK+ is now using upstream gettext instead of the GLib wrappers.
|
||||
This adds a requirement for the fairly recent gettext 0.19.7 release
|
||||
|
||||
* GDK has a new GdkMonitor api that offers richer information about
|
||||
connected outputs
|
||||
|
||||
* Bugs fixed:
|
||||
373745 Do not use AM_GLIB_DEFINE_LOCALEDIR(GTK_LOCALEDIR) and use gettext...
|
||||
682080 Gtk:ERROR:gtktoolbar.c:2271:logical_to_physical: assertion failed:...
|
||||
747206 gtktextview: note on how to get line spacing between two paragraphs
|
||||
756570 gtkplacesview no longer provides guidance on address formats
|
||||
759037 GtkInfoBar: documentation not updated wrt background colors and me...
|
||||
763852 gdk/wayland: event source is not multi-thread aware
|
||||
764395 nautilus crashed on double clicking 'other locations'
|
||||
765471 CellRendererText shows edit entry in a wrong position for small cells
|
||||
765579 wayland: cache frequently accessed GtkSettings in wayland screen
|
||||
765676 gtk_paned_set_position doesn't work as advertised
|
||||
765700 GtkPaned use causes "How does the code know the size to allocate?"
|
||||
765742 GtkRedioButton and GtkCheckButton doesn't aligned right to left la...
|
||||
765790 W32: configure does not tell which cairo version to use
|
||||
765793 configure script failure (cairo_win32_surface_create_with_format i...
|
||||
765858 file chooser generates a warning about a network path
|
||||
765907 [Wayland] Reversed scrolling GDK_SCROLL_UP/GDK_SCROLL_DOWN in Wayl...
|
||||
765922 GtkScale labels extend past edge of widget and overlap neighboring...
|
||||
765924 Improve external drives detection
|
||||
765939 [Wayland] very slow scrolling in GtkMenu using the touchpad
|
||||
765966 settings: fix initial value for gtk-font-name
|
||||
765973 GtkRevealer need to always send "child-revealed" signal at end of ...
|
||||
765981 fts warning from tracker when searching for files with "-" in name
|
||||
766049 wayland: use g_signal_handler_disconnect()
|
||||
766120 Scale draw_value() align changed from centre/right (H/V) to left, ...
|
||||
766166 key bindings in gtk.css are ignored
|
||||
766175 Translation of quotes may misinterpreted by GTK sidebar
|
||||
766207 Fix build on pre-C99 compilers
|
||||
766233 Crash when server does not support XI2
|
||||
766314 Spurious leave-notify event after touch up
|
||||
766323 GTKPopover gives warnings if visible when reparented
|
||||
766336 Crash when selecting rows with rubberbanding
|
||||
766405 Stack shows incorrect frame in widget factory on wayland
|
||||
766440 Scale slider button has stopped discerning & rendering appropriate...
|
||||
766442 Broken drag & drop between windows
|
||||
766458 widget: fix GtkLabelAccessible NULL links.
|
||||
766530 scrolledwindow: Fix typo in get_preferred_height calculation
|
||||
766566 Wayland: gdk_screen_get_monitor_at_window() unreliable under Wayland
|
||||
766569 Better size requisition for GTK_SCROLL_NATURAL children
|
||||
766642 Switches in HeaderBars Are Badly Integrated
|
||||
766643 Frozen windows when unmapped with pending configure event
|
||||
766737 stack: Only map children when necessary
|
||||
766782 OpenGL in broadway leads to segmentation fault
|
||||
767848 crash in the window test
|
||||
|
||||
* Translation updates:
|
||||
Arabic
|
||||
Brazilian Portuguese
|
||||
German
|
||||
Hungarian
|
||||
Kazakh
|
||||
Lithuanian
|
||||
Norwegian bokmål
|
||||
Occitan
|
||||
Portuguese
|
||||
Scottish Gaelic
|
||||
Slovak
|
||||
Spanish
|
||||
Swedish
|
||||
|
||||
|
||||
Overview of Changes in GTK+ 3.21.1
|
||||
==================================
|
||||
|
||||
* The GNU Affero General Public License has been added to the list of
|
||||
predefined licenses in GtkAboutDialog
|
||||
|
||||
* GtkShortcutWindow can now follow changes to accelerators
|
||||
|
||||
* GdkSeat and GdkDevice gained API for device tools, to support drawing tablets
|
||||
|
||||
* GtkInspector can now slow down (or speed up) animations. This functionality
|
||||
is also available via the GTK_SLOWDOWN environment variable
|
||||
|
||||
* GdkGLContext can now be instructed to use GLES
|
||||
|
||||
* CSS:
|
||||
- Inconsistencies in font size handling have been fixed
|
||||
- The font shorthand is now parsed according to the CSS spec
|
||||
|
||||
* Windows:
|
||||
- Clipboard handling has been optimized
|
||||
- The CSD implementation has been improved
|
||||
|
||||
* Wayland:
|
||||
- We print more debug information about pixel formats, outputs, etc
|
||||
- The unstable tablet protocol is now supported
|
||||
- Virtual modifier handling has been improved
|
||||
- Reduce jitter in keyboard repeat
|
||||
- Fix problems with multiple display connections
|
||||
|
||||
* Bugs fixed:
|
||||
573380 gtk_tree_model_iter_parent() fails if the same iterator is used...
|
||||
620065 Several problems related to recent files
|
||||
693077 GtkRecentManager doesn't send "changed" when file is deleted
|
||||
730821 RFE: add gtk_clipboard_get_selection()
|
||||
743746 Add GLES 2.0 (and/or 3.0) profile
|
||||
749405 GtkMenuSectionBox doesn't remove submenus when parent item is r...
|
||||
761651 glade previewer is resizing windows until it crashes gnome-shell
|
||||
763013 GDK W32: AeroSnap doesn't work on CSD windows
|
||||
763600 trashmonitor: change trash monitoring process
|
||||
763627 menu-traditional puts popover beneath the text editor widget
|
||||
763768 Wrong margin used for the sidebar separator
|
||||
763783 GDK W32: Erase hidden layered windows before showing them
|
||||
763850 Add License GTK_LICENSE_AGPL_3_0 to GtkLicense enum
|
||||
763851 GDK W32: show_window_menu() is not implemented
|
||||
763907 GDK W32: Clipboard handling is not tight enough
|
||||
763913 GDK W32: Not all relevant debug info is printed for events
|
||||
764022 (totem:4131): Gtk-WARNING **: Negative content width -200 (alloc...
|
||||
764060 opening a second nautilus while a delete operation is in progres...
|
||||
764170 [HighContrastInverse] “suqqested-action” is white on lightgrey
|
||||
764174 Configuration dialog is too small
|
||||
764203 Default background color for the 'textview border' node
|
||||
764204 Primary and secondary carets/cursors not distinguishable by default
|
||||
764210 Strange Background Color on Emacs
|
||||
764261 gtkplacesviewrow: untranslated "%s / %s available"
|
||||
764321 window: Fix gtk_window_set_geometry_hints documentation
|
||||
764374 Busy loop while "Displays" page is active
|
||||
764376 UI glitch when entering keyboard shortcut
|
||||
764378 gtk3-demo won't run without hicolor-icon-theme
|
||||
764424 `Super` keybindings trigger without Super, on Wayland
|
||||
764585 Fix "format not a string literal" errors
|
||||
764664 Segfault when initializing WINTAB pressure-sensitive tablets (Wa...
|
||||
764686 build failure after "make distclean"
|
||||
764710 GtkListBox row CSS nodes do not reflect visual order
|
||||
764712 Build failure for Quartz backend in master branch due to gtkdnd-...
|
||||
764835 broadway: fix documentation, correct display port details
|
||||
764845 GDK: gdk_window_reparent creates circular reference in 'children...
|
||||
764846 Code improvements in GtkApplication
|
||||
764863 GtkTrayIcon: fix uninitialised variable
|
||||
764879 Extract GtkApplicationAccels private class from GtkApplication
|
||||
764925 Fix trivial typo in GtkWidget
|
||||
764975 GTKShortcutWindow runtime changes to accelerator not reflected i...
|
||||
764996 GDK: Incorrect window size when creating window with position sp...
|
||||
765038 Adwaita & decorations
|
||||
765065 Wayland: Hover state stuck after mouse leaving the toplevel
|
||||
765066 GtkColorChooser looks like it can select multiple colors
|
||||
765100 GDK: gdk_window_reparent does not position/size a reparented win...
|
||||
765118 W32: gtk-builder-tool botches output encoding
|
||||
765122 Duplicate/missing string in gtkprintbackendcups
|
||||
765195 Visual Studio builds: Update how introspection is done
|
||||
765213 info bars nearly unreadable in backdrop state because of gray fo...
|
||||
765238 gtktexthandle should avoid connecting to GtkWidget::draw
|
||||
765259 Save Windows scancode inside GdkEvent
|
||||
765261 listbox: Page up/Down don't do anything with large rows
|
||||
765270 wayland: Leave existing mods on map_virtual_modifiers
|
||||
765284 debug: reduce runtime overhead in debug builds
|
||||
765486 builtinicon: avoid calculating font-metrics in vast majority of ...
|
||||
765493 kineticscrolling: avoid stutter at tail of kinetic deceleration
|
||||
765496 Clean up gtklabel.c a bit
|
||||
765567 wayland: avoid jitter in keyboard repeat
|
||||
756570 gtkplacesview no longer provides guidance on address formats
|
||||
765474 Wayland: Dialogs without transient parent crash the inspector
|
||||
765565 Wayland: Inspector GtkLabel drag'n'drop crashes client
|
||||
765576 gtk+ leaks and hangs
|
||||
765577 gdk/dnd: Add missing signal parameter documentation
|
||||
765632 typo in GTK_STYLE_CLASS_LIST_ROW docs
|
||||
765640 pixelcache: reuse existing timeout source when possible
|
||||
765644 Widget sizing problems with GtkProgressBar
|
||||
|
||||
* Translation updates:
|
||||
Bulgarian
|
||||
Catalan
|
||||
Esperanto
|
||||
German
|
||||
Greek
|
||||
Hungarian
|
||||
Italian
|
||||
Lithuanian
|
||||
Persian
|
||||
Polish
|
||||
Scottish Gaelic
|
||||
Spanish
|
||||
Thai
|
||||
Traditional Chinese
|
||||
|
||||
|
||||
Overview of Changes in GTK+ 3.20.1
|
||||
==================================
|
||||
|
||||
* Active GtkSwitch widgets now use the :checked state, to match GtkToggleButton
|
||||
|
||||
* Bugs fixed:
|
||||
641354 Look for themes in XDG folders
|
||||
763350 drawing performance worse than X
|
||||
763604 The search button of a GtkShortcutsWindow should have the image-button...
|
||||
763659 DND Drop on root with Pixbuf leaves image behind
|
||||
763731 Return GTK_PRINT_OPERATION_RESULT_ERROR even if error == NULL
|
||||
763741 Wavy/squiggly underline not properly removed
|
||||
763758 Do not use fixed values for widgets size in foreign drawing demo
|
||||
763779 [PATCH] quartz: fix pixelated image surfaces in retina/hidpi mode
|
||||
763802 [HighContrastInverse] the “ON” text of a GtkSwitch should be black (on...
|
||||
763804 [HighContrastInverse] menuitem:hover colors
|
||||
763808 .dnd styleclass still used
|
||||
763859 gdkdevice-wayland.c cleanups
|
||||
763900 stack: fix warnings during GtkStack size_allocate
|
||||
764118 Glitches in menu scroll arrow rendering
|
||||
|
||||
* Translation updates:
|
||||
Basque
|
||||
Bulgarian
|
||||
Danish
|
||||
Galician
|
||||
Greek
|
||||
Russian
|
||||
Slovak
|
||||
Slovenian
|
||||
Spanish
|
||||
Swedish
|
||||
|
||||
|
||||
Overview of Changes in GTK+ 3.20.0
|
||||
==================================
|
||||
|
||||
* Themes:
|
||||
- The HighContrast theme has been brought back up to par with Adwaita
|
||||
- Adwaita has received detail fixes for many widgets
|
||||
- Adwaita now transitions to backdrop
|
||||
|
||||
* Some recently publicized static analysis findings have been fixed
|
||||
|
||||
* Bugs fixed:
|
||||
746490 [HighContrast] insensitive ToggleButtons are rendered similarly ac...
|
||||
763609 [HighContrast] model-generated menu-like popovers are unthemed
|
||||
763610 [HighContrast] GtkSearchEntry’s “search” icon needs left&right pad...
|
||||
763612 [HighContrast] “:selected .circular” should be visible
|
||||
763613 [HighContrast] GtkScale is unreadable
|
||||
763696 [HighContrast] spinbuttons broken
|
||||
763706 [HighContrast] linked horizontal dropboxes broken
|
||||
763707 [HighContrast] active and hover states for radios and checkboxes b...
|
||||
763774 [HighContrast] GtkPlacesSidebar row need more top&bottom padding
|
||||
763775 [HighContrast] the “enter server adress” entry in GtkPlacesView ha...
|
||||
763777 [HighContrast] GtkMenuBar needs a bottom box-shadow
|
||||
763781 [HighContrast] .app-notification border { border:none; }
|
||||
763797 [HighContrast] scrollbars invisible (whity on white)
|
||||
763823 [HighContrast] dnd on a vertical spinbutton does a weird resizing
|
||||
763846 [HighContrast] spinbuttons in osd look bad
|
||||
763955 treeview: inline editing shows old text as background
|
||||
763796 excessive Gtk-WARNING **: State 0 for EMailShellSidebar doesn't ma...
|
||||
763835 W32: Layered windows don't become minimized
|
||||
763749 Nautilus desktop window is too small with gtk 3.19
|
||||
|
||||
* Translation updates
|
||||
Brazilian Portuguese
|
||||
Czech
|
||||
Danish
|
||||
Finnish
|
||||
Hungarian
|
||||
Italian
|
||||
Kazakh
|
||||
Korean
|
||||
Latvian
|
||||
Serbian
|
||||
Serbian Latin
|
||||
Swedish
|
||||
Ukrainian
|
||||
|
||||
|
||||
Overview of Changes in GTK+ 3.19.12
|
||||
===================================
|
||||
|
||||
* GTK+ now respects default size even for windows that are not resizable
|
||||
|
||||
* GtkScale and GtkScrollbar have received multiple fixes for fallout from
|
||||
the gadget port
|
||||
|
||||
* GtkStackSwitcher will now switch pages when hovered during drag-and-drop
|
||||
|
||||
* Inspector:
|
||||
- The per-object CSS editor has been dropped; the global one is sufficient
|
||||
- The sidebar has been replaced by a combo box
|
||||
- Add a Show Layout option to the Visual tab
|
||||
- CSS node tree and style properties are now on the same page
|
||||
- The frame clock is shown in the Miscellaneous page
|
||||
- Isolate the inspector from visual debugging effects
|
||||
- Numerous smaller UI improvements
|
||||
|
||||
* Themes:
|
||||
- Windows theme: handle spin buttons and switches
|
||||
- Adwaita: Fixes for scales, combo boxes, info bars, action bars, radio and
|
||||
check buttons, side bars, etc
|
||||
- Adwaita has gained a new style of drop target highlighting
|
||||
|
||||
* Wayland:
|
||||
- Synchronize key repeat with server
|
||||
- Add a bell request to gtk_shell and use it to implement gdk_window_beep
|
||||
- Add a focus request to gtk_shell and use it to implement gtk_window_present
|
||||
- Dropping tabs to create new windows is now supported
|
||||
|
||||
* Windows:
|
||||
- Use a custom drag-resize implementation
|
||||
- Use layered windows
|
||||
- Provide workarea information
|
||||
|
||||
* OS X:
|
||||
- Native zoom and rotate gestures are now supported
|
||||
|
||||
* Bug fixes:
|
||||
583780 gtk_toggle_button_set_mode() documentation should suggest when it is...
|
||||
699891 Support for Primary keybinding in builder XML
|
||||
720950 Default double-click interval should be increased
|
||||
748872 W32: Use layered windows
|
||||
756450 GTK file chooser completion dropdown sets cursor in wrong position
|
||||
757942 Input event (e. g. typing on keyboard) is sent repeatedly during hig...
|
||||
759899 W32: CSD is not enabled by default
|
||||
760276 Quartz does not support GtkGesture Zoom and Rotate (NSEventTypeMagni...
|
||||
761629 W32: WM window drag-resizing code does not work well with GTK
|
||||
762397 GtkToolButton needs left & right padding and margin
|
||||
762811 Adwaita: nonsquare image buttons
|
||||
762820 Remove "core_pointer" from the GdkDisplay struct
|
||||
762891 gdk: remove the display->list_devices vfunc
|
||||
762902 GDK W32: Newly-opened windows (such as popups) have unthemed cursor
|
||||
762907 gnome-shell crashes after undocking
|
||||
762945 Wrong allignemet in some places
|
||||
762974 GtkWindow: gtk_window_set_default_size() does not work with fixed si...
|
||||
762996 Revealer doesn't reveal the entire width of a ListBox that has Revea...
|
||||
763001 implement beeping
|
||||
763012 GDK W32: No gdk_win32_screen_get_monitor_workarea()
|
||||
763017 tooltip text is not shown
|
||||
763023 Segfault in init_randr15()
|
||||
763080 Layered Window crashes GDKGLWin32
|
||||
763103 gtk-launch: add hack to close up dbus-daemon race
|
||||
763216 GtkTextView's top-margin/bottom-margin don't work with non-scrolling...
|
||||
763285 gdkwindow/Win32: Make update_style_bits() available across the GDK-W...
|
||||
763287 GDK-Win32: GL area does not redraw on resize
|
||||
763298 wayland: connection flooded when dragging
|
||||
763351 [wayland] high cpu usage on open popover
|
||||
763380 colorscale input popup difficult to use with a pointer
|
||||
763387 Make window creation hooks in tab DnD work on wayland
|
||||
763628 W32: Shortcuts window is gtk3-demo misplaced on multidisplay desktop
|
||||
763650 window: stop stomping on resize-mode set by external API
|
||||
|
||||
* Translation updates:
|
||||
Brazilian Portuguese
|
||||
Catalan
|
||||
Czech
|
||||
Finnish
|
||||
French
|
||||
Galician
|
||||
German
|
||||
Greek
|
||||
Hebrew
|
||||
Hungarian
|
||||
Japanese
|
||||
Kazakh
|
||||
Korean
|
||||
Lithuanian
|
||||
Polish
|
||||
Russian
|
||||
Serbian
|
||||
Slovak
|
||||
Slovenian
|
||||
Spanish
|
||||
Swedish
|
||||
|
||||
|
||||
Overview of Changes in GTK+ 3.19.11
|
||||
===================================
|
||||
|
||||
* GtkRange, GtkScale and GtkScrollbar have been ported to use gadgets
|
||||
|
||||
* Themes:
|
||||
- Windows theme improvements
|
||||
|
||||
* Inspector:
|
||||
- Show input device information
|
||||
- Update monitor information when it changes
|
||||
|
||||
* Wayland:
|
||||
- Implement primary selection (using a private protocol
|
||||
with mutter for now)
|
||||
|
||||
* Bugs fixed:
|
||||
756751 Keypad decimal point patch prevents entry of comma in german keypad...
|
||||
760482 GtkFrame cuts off bottom 2 pixels of child
|
||||
761767 gcc6: Don't return bool from a const gchar* function
|
||||
762123 Frame Layouting issue in Quadrapassel
|
||||
762561 Implement primary selection protocol
|
||||
762593 Solid separator in gnome-tweak-tool header bar
|
||||
762614 Commit 51af704 gadget: Be careful in geometry calculations breaks v...
|
||||
762629 GDK W32: Wrong MINMAXINFO calculation
|
||||
762677 gtkplacessidebar: avoid irresponsible UI while trashing
|
||||
762713 [Wayland] GDK doesn't remember unmaximized or unfullscreen size
|
||||
762720 Moving Epiphany tabs with keyboard shortcuts visually broken
|
||||
762755 Epiphany, Eye of GNOME crash when run in gdkwindow-wayland.c buffer...
|
||||
762820 Remove "core_pointer" from the GdkDisplay struct
|
||||
762887 yelp crashes most of the time on startup with gtk+ 3.19.10
|
||||
762891 gdk: remove the display->list_devices vfunc
|
||||
761156 Setting a popover 'relative_to' a widget on an offscreen window cra...
|
||||
761686 GtkTreeView theming problems
|
||||
762468 wayland: Switching between fullscreen and unfullscreen too fast may...
|
||||
|
||||
* Translation updates:
|
||||
Brazilian Portuguese
|
||||
Catalan
|
||||
French
|
||||
Galician
|
||||
Hungarian
|
||||
Occitan
|
||||
Polish
|
||||
Swedish
|
||||
|
||||
|
||||
Overview of Changes in GTK+ 3.19.10
|
||||
===================================
|
||||
|
||||
* GTK+ will now list included backends when seeing the
|
||||
environment variable GDK_BACKEND=help
|
||||
|
||||
* Themes
|
||||
- Windows theme improvements
|
||||
- Adwaita cleanups
|
||||
|
||||
* Wayland
|
||||
- Implement startup notification
|
||||
|
||||
* Bugs fixed:
|
||||
309300 Adjust the key binding for setting the spin box's value to the min...
|
||||
723659 touchpad: please do not interpret tap and click as double-click
|
||||
754743 Middle click on "Other Locations" doesn't open a new tab
|
||||
756659 Nautilus's Connect to server wont honor remote path
|
||||
760714 GtkWindow: CSS node documentation is not clear
|
||||
761431 Document overlay help action name
|
||||
761432 Document that GtkApplication loads menus from gtk/menus-common.ui
|
||||
761760 Welcome graphic and heading is misaligned
|
||||
762258 wayland: gtk3 apps segfault with plasma-wayland/kwin_wayland
|
||||
762315 Assistant pages have no padding which looks weird
|
||||
762319 issues with randr 1.5
|
||||
762392 gtk_drag_source_set_icon_name with empty string puts widget in bad...
|
||||
|
||||
* Translation updates:
|
||||
Brazilian Portuguese
|
||||
Catalan
|
||||
Chinese (Taiwan)
|
||||
Galician
|
||||
German
|
||||
Polish
|
||||
Punjabi
|
||||
Serbian
|
||||
Slovak
|
||||
Spanish
|
||||
Swedish
|
||||
Thai
|
||||
|
||||
|
||||
Overview of Changes in GTK+ 3.19.9
|
||||
==================================
|
||||
|
||||
* gtk-builder-tool can now preview .ui files with custom CSS
|
||||
|
||||
* gtk3-demo now demonstrates saving window sizes in the application
|
||||
example, and has many more widgets in the foreign drawing example.
|
||||
|
||||
* CSS changes:
|
||||
- the rem unit is now supported
|
||||
- calc() expressions are supported, too
|
||||
|
||||
* Themes:
|
||||
- Many fixes to Adwaita
|
||||
- The Windows theme is now included on all platforms
|
||||
|
||||
* Windows
|
||||
- The Classic and XP themes have been dropped
|
||||
- The remaining theme is being fixed to work with CSS nodes
|
||||
- React to theme changes
|
||||
|
||||
* Quartz:
|
||||
- Fix image retrieval from the clipboard
|
||||
|
||||
* Wayland:
|
||||
- Fix a significant buffer leak
|
||||
|
||||
* Bugs fixed:
|
||||
677329 Missing focus-in events
|
||||
698652 Aero-snapped windows in Win7 or 8 gets restored to previous size...
|
||||
754990 Missing (out) annotation for gdk_rgba_parse
|
||||
759657 GtkSeparator can segfault from CSS settings
|
||||
760996 background in notebooks (and other places?) now white
|
||||
761209 FileChooser crashes when invoked from FileChooserButton
|
||||
761309 Background missing for empty treeview
|
||||
761312 memory leak
|
||||
761332 Creating a GtkStyleContext crashes
|
||||
761339 [PATCH] skip gtk_widget_path_iter_add_qclass from g-ir-scanner
|
||||
761363 Unlabeled GtkCheckButton does not respect valign
|
||||
761381 gtk_settings_reset_property does not always reset to correct value
|
||||
761402 GtkRange doesn't reset in_drag flag correctly
|
||||
761428 GtkLevelBar no longer expands vertically
|
||||
761474 x11: Scaling factor is applied twice on screen work area
|
||||
761476 Set _GTK_THEME_VARIANT property also for light theme variant
|
||||
761484 Spinbuttons in headerbars are way too tall
|
||||
761552 Warnings in filechooser when typing-to-search in Recent
|
||||
761571 Opaque region incorrectly calculated for fullscreen windows
|
||||
761686 GtkTreeView theming problems
|
||||
761716 Notebook scroll arrows appear to be sensitive always
|
||||
761757 Crash in GtkFileChooserWidget
|
||||
761775 gtkmagnifier: Avoid a crash if the inspected widget is finalized
|
||||
761778 GtkShortcutsWindow - key labels are grey, not vertically centered
|
||||
761791 Places sidebar: row height is too low
|
||||
761792 Connect to server bar is too tall (and has a big fat connect butt...
|
||||
761826 double negative in drag drop documentation for drag-motion confus...
|
||||
761828 add a menu demo to foreigndrawing
|
||||
761829 undefined reference to `gdk_mir_display_get_type'
|
||||
761838 Editing widgets may be drawn off the visible area if the column i...
|
||||
761900 gtk-demo: add spinbutton and menubar foreign drawing examples
|
||||
761903 gtk3-demo: paned widget can be moved by resizing
|
||||
761954 Tab detach no longer works
|
||||
762021 GtkPaned propagates draw to NULL child
|
||||
762032 Titlebars of windows have become unacceptably large in 3.19.x
|
||||
762036 Extra widgets sizing messed up
|
||||
762067 Adwaita: half maximized unfocused window has rounded corners
|
||||
762080 gtk-demo: add combobox, menu separator and menu check/radio examp...
|
||||
753351 notifications about removable devices being safe to remove stay a...
|
||||
762120 Black content when using testfilechooser auto completer
|
||||
762165 Add translation contexts
|
||||
|
||||
* Translation updates:
|
||||
Brazilian Portuguese
|
||||
Chinese (Taiwan)
|
||||
French
|
||||
German
|
||||
Hungarian
|
||||
Kazakh
|
||||
Polish
|
||||
Slovak
|
||||
Spanish
|
||||
Swedish
|
||||
|
||||
|
||||
Overview of Changes in GTK+ 3.19.8
|
||||
==================================
|
||||
|
||||
* GtkEntry:
|
||||
- Complete gadget conversion for entries and spin buttons
|
||||
- Add a visual hint for scrolling ('undershoot')
|
||||
|
||||
* GtkStack:
|
||||
- Turn into a no-window widget
|
||||
|
||||
* CSS changes:
|
||||
- Allow loading svg imges
|
||||
- Fix baseline handling
|
||||
- -gtk-recolor() works properly with hi-dpi now
|
||||
- image() can be used in CSS now
|
||||
|
||||
* Themes:
|
||||
- new radio / check implementation
|
||||
|
||||
* Tools:
|
||||
- gtk-builder-tool can now preview .ui files
|
||||
|
||||
* Bugs fixed:
|
||||
464528 gdk_rectangle_union() and gdk_rectangle_intersect() should ign...
|
||||
608865 The default value of the property 'max-position' should be 214...
|
||||
688524 Expose gtk-primary-button-warps-slider as an X setting
|
||||
690791 gtkwindow only sends startup notification once
|
||||
727294 Gtk SpinButton Size Greater than Screen Width
|
||||
754868 visual anomaly in gtk path bar
|
||||
754990 Missing (out) annotation for gdk_rgba_parse
|
||||
760522 gtk_misc_set_padding not used for size req
|
||||
760714 GtkWindow: CSS node documentation is not clear
|
||||
760754 gedit crashes detaching a tab
|
||||
760881 file can't be saved if executable attribute is not set
|
||||
760891 GtkTreeView Cannot expand/collapse rows by mouse
|
||||
760897 A few clean ups to the shm handling code
|
||||
760933 Make it possible to query the CSS opacity with gtk_style_conte...
|
||||
760942 gitg drawing code broken
|
||||
760967 notebook gadget allocation issue
|
||||
761005 GtkColorChooser: make set_rgba work in editor mode
|
||||
761095 wayland: use shm_open instead of open in tmpdir
|
||||
761128 Selected text in password entry not drawn correctly
|
||||
761254 GtkDialog exposes public action_box internal child
|
||||
761026 File chooser: Make Escape close the dialog
|
||||
761318 css: Support the image() notation
|
||||
|
||||
* Translation updates:
|
||||
German
|
||||
Hungarian
|
||||
|
||||
|
||||
Overview of Changes in GTK+ 3.19.7
|
||||
==================================
|
||||
|
||||
* GtkNotebook:
|
||||
- Has been converted to use gadgets
|
||||
- Style properties have been deprecated
|
||||
|
||||
* GtkTextView:
|
||||
- Offers (some) control over cursor blinking
|
||||
|
||||
* CSS changes:
|
||||
- Fix rendering of asymmetric borders
|
||||
- Add CSS names to more widgets
|
||||
- Support recoloring icons with -gtk-recolor
|
||||
|
||||
* Themes:
|
||||
- Many Adwaita fixes
|
||||
|
||||
* GTK+ widget drawing scalability has been improved (for containers
|
||||
with many children, like large list boxes or flow boxes).
|
||||
|
||||
* Drag-and-Drop has been rearchitected to move the input handling into
|
||||
GDK, where different backends can handle it according to their needs
|
||||
and capabilities. The new, 'managed' DND is currently implemented
|
||||
for X11 and Wayland.
|
||||
|
||||
* Wayland:
|
||||
- Support kinetic scrolling, using the new events in version 5 of the
|
||||
wl_pointer interface
|
||||
- Suppport DND actions and drag cancellation that were added in version
|
||||
3 of the wl_data_offer interface
|
||||
|
||||
* Bugs fixed:
|
||||
722727 Widget state CSS pseudoclasses should work with adjacent selectors
|
||||
722937 problem rendering asymmetric borders with dotted style
|
||||
748327 W32: GDK can be hypothetically stuck in time
|
||||
756729 No kinetic scrolling on Wayland
|
||||
757503 Selected text is white on white (invisible) - Evo / GTK+ 3.19.1
|
||||
759785 GdkSeat: Suspected errors in documentation
|
||||
759898 W32: There's a gap between tooltip window and its shadow
|
||||
760350 Cast the return value of g_array_free to void* before casting to...
|
||||
760388 MS lib files cannot be generated (with patch)
|
||||
760416 broadwayd --help shows translated characters as question marks o...
|
||||
760427 Adwaita: Separators in popovers shouldn't always have margins
|
||||
760445 regression: openQA no longer able to press ctrl-alt-del to get t...
|
||||
760509 GdkWindow positions/sizes include css margins
|
||||
760524 linked comboboxes change size when clicked
|
||||
760525 Labels in dialog buttons misaligned
|
||||
760528 GtkFrame child should start below the label widget
|
||||
760536 ship a mini icon theme for recolarable symbolic icon assets
|
||||
760572 Inspector highlights "random" widgets
|
||||
760596 epiphany middle click on link opens an invisible tab
|
||||
760615 GTK FTBFS with MinGW-w64
|
||||
760640 Crash in gtk_notebook_set_show_tabs when closing Epiphany
|
||||
760663 Some labels on RTL in some menus dosn't shown
|
||||
760668 box gadget: Implement cross-axis alignment
|
||||
760680 Emitting "shutdown" signal twice leads to a crash
|
||||
760748 GtkTextView should allow hooks for reseting blink time
|
||||
760754 gedit crashes detaching a tab
|
||||
756729 No kinetic scrolling on Wayland
|
||||
760370 GDK-ify drag and drop
|
||||
|
||||
* Translation updates:
|
||||
Brazilian Portuguese
|
||||
Finnish
|
||||
Japanese
|
||||
Slovak
|
||||
|
||||
|
||||
Overview of Changes in GTK+ 3.19.6
|
||||
==================================
|
||||
|
||||
* CSS changes:
|
||||
- CSS margins, border and padding are more consistently supported
|
||||
- More widgets support min-width and min-height
|
||||
- More style properties have been superseded by CSS properties
|
||||
- Pseudo state names have been aligned with what CSS uses:
|
||||
:disabled instead of :insensitive, :indeterminate instead of
|
||||
:inconsistent and :drop(active) instead of :dnd. The old names
|
||||
still work
|
||||
- GTK+ specific CSS properties have been prefixed with -gtk-.
|
||||
The old names still work
|
||||
- The CSS syntax for Radial gradients is now supported
|
||||
- CSS documentation has been rewritten and expanded
|
||||
|
||||
* Themes:
|
||||
- GTK+ now includes a HighContrastInverse theme which is a dark
|
||||
variant of the HighContrast theme
|
||||
|
||||
* Inspector:
|
||||
- The inspector can now highlight widgets that are causing resizes,
|
||||
which can be helpful in tracking down allocation loops
|
||||
|
||||
* Wayland:
|
||||
- Prefer subsurfaces for temporary windows when possible, to fix
|
||||
placement issues
|
||||
- Improve handling of dialogs without transient parent
|
||||
- Force a grab cursor while a popup is shown
|
||||
|
||||
* Bugs fixed:
|
||||
728344 Collate setting in Print Dialog does not override PPD setting...
|
||||
753520 Gtk potentially misses nullable in 166 functions
|
||||
756618 GtkWindow CSD: gtk_window_resize() also includes client side ...
|
||||
757147 gdk_pixbuf_get_from_window() doesn't honor device scale
|
||||
757411 Reference GtkIconSize in argument/return documentation
|
||||
759161 wayland: dialog stacking without parents (RFC)
|
||||
759299 wayland: possible infinite loop in gdkwindow-wayland
|
||||
759541 shortcuts: Make sure that hidden shortcuts stay hidden
|
||||
759567 Treeview column header buttons are jumpy
|
||||
759586 Add a way to highlight resizing widgets
|
||||
759607 gtkdnd-quartz: fix gtk_drag_begin_internal
|
||||
759664 Buttonbox broken in chess promotion dialog
|
||||
759668 Drawing failures with GTK+ master
|
||||
759670 GtkPaned doesn't react to mouse dragging in some cases
|
||||
759705 Sidebar broken in GNOME Disks
|
||||
759738 wayland: use a subsurface for GDK_WINDOW_TEMP if attached to ...
|
||||
759764 gtkinspector crashes app when selecting 'cancel' on initial p...
|
||||
759768 gtkinspector crashes app on termination, when selecting 'canc...
|
||||
759771 GdkSeat: Missing G_BEGIN_DECLS and G_END_DECLS
|
||||
759857 Signal name should not be translated
|
||||
759905 Popover: Invisible to events when we set transparent backgrounds
|
||||
759917 GtkStatusIcon: avoid criticals
|
||||
760018 Separator Tool Items with draw=false still get drawn
|
||||
760082 GtkBinding: Use correct CSS key in examples
|
||||
760097 GtkShortcutsWindow: Gestures not shown correctly in search re...
|
||||
760141 New gdk_cursor_new_from_name() fallback breaks behavior expec...
|
||||
760148 Duplication of word in document
|
||||
760169 GtkColorButton sensitive and insensitive appearances are bare...
|
||||
760188 GDK's X11 backend leaks SyncCounters
|
||||
760202 gtkbuilder: Install gettext ITS files
|
||||
760213 wayland: gdk_seat_grab() set cursor not resilient
|
||||
760238 Improve function documentation for gtk_css_provider_load_from...
|
||||
760314 gtkimcontextime.c: Silence gtk_style_context_set_state() warn...
|
||||
|
||||
* Translation updates:
|
||||
Brazilian Portuguese
|
||||
Czech
|
||||
German
|
||||
Hebrew
|
||||
Indonesian
|
||||
Norwegian bokmål
|
||||
Portuguese
|
||||
Slovak
|
||||
Spanish
|
||||
|
||||
|
||||
Overview of Changes in GTK+ 3.19.5
|
||||
==================================
|
||||
|
||||
@@ -941,8 +137,7 @@ Overview of Changes in GTK+ 3.19.3
|
||||
758407 Could not send the search request \ GDBus.Error:org.freedesktop.Tr...
|
||||
758442 gtk_style_context_save() destroys style information
|
||||
|
||||
|
||||
Overview of Changes in GTK+ 3.19.2
|
||||
* Translation updates:
|
||||
==================================
|
||||
|
||||
* Most widgets have been ported to CSS nodes. The element names and
|
||||
|
255
README.in
255
README.in
@@ -53,7 +53,7 @@ In the bug report please include:
|
||||
of software that can be downloaded.
|
||||
|
||||
* If the bug was a crash, the exact text that was printed out
|
||||
when the crash occurred.
|
||||
when the crash occured.
|
||||
|
||||
* Further information such as stack traces may be useful, but
|
||||
is not necessary.
|
||||
@@ -72,11 +72,254 @@ and attach the patch to that bug report.
|
||||
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.20
|
||||
======================
|
||||
|
||||
Release notes
|
||||
=============
|
||||
* The GtkFileChooser interface pre-requisite changed from GtkWidget
|
||||
to GObject, allowing non-widget implementations of this interface.
|
||||
This is a minor change in ABI, as apps are no longer guaranteed
|
||||
that a GtkFileChooser interface also supports all GtkWidget methods.
|
||||
However, all previously existing objects still derive from GtkWidget,
|
||||
so no existing code should break.
|
||||
|
||||
Release notes for releases of GTK+ 3.x are part of the migration
|
||||
guide in the GTK+ documentation. See
|
||||
Release notes for 3.18
|
||||
======================
|
||||
|
||||
https://developer.gnome.org/gtk3/unstable/gtk-migrating-2-to-3.html
|
||||
* The GtkListBox model support that was introduced in 3.16 has been
|
||||
changed to no longer call gtk_widget_show_all on rows created by
|
||||
the create_widget_func. You need to manage the visibility of child
|
||||
widgets yourself in your create_widget_func.
|
||||
|
||||
* The alpha component of foreground colors that are applied to
|
||||
GtkCellRendererText is no longer ignored. If you don't want your
|
||||
text to be translucent, use opaque colors.
|
||||
|
||||
Release notes for 3.16
|
||||
======================
|
||||
|
||||
* GTK+ now includes an OpenGL rendering widget. To support GL on various
|
||||
platforms, GTK+ uses libepoxy.
|
||||
|
||||
* GTK+ no longer uses gtk-update-icon-cache during its build. The
|
||||
--enable-gtk2-dependency configure option has been removed.
|
||||
|
||||
* The introspection annotations for the x and y parameters of
|
||||
GtkMenuPositionFunc have been corrected from 'out' to 'inout'.
|
||||
If you are using such a function from language-bindings, this
|
||||
may require adjustments.
|
||||
|
||||
* The lookup order for actions that are activated via keyboard
|
||||
accelerators has been changed to start at the currently focused
|
||||
widget. If your application is making use fo nested action groups
|
||||
via gtk_widget_insert_action_group, you may want to check that
|
||||
this change does not upset your accelerators.
|
||||
|
||||
* The GtkScrollable interface has gained a new vfunc, get_border,
|
||||
that is used to position overshoot and undershoot indications that
|
||||
are drawn over the content by GtkScrolledWindow. Unless your scrollable
|
||||
has non-scrolling parts similar to treeview headers, there is no need
|
||||
to implement this vfunc.
|
||||
|
||||
* The GtkSearchEntry widget has gained a number of new signals that
|
||||
are emitted when certain key sequences are seen. In particular, it
|
||||
now handles the Escape key and emits ::stop-search. Applications that
|
||||
expect to handle Escape themselves will need to be updated.
|
||||
|
||||
Release notes for 3.14
|
||||
======================
|
||||
|
||||
* A new state, GTK_STATE_FLAG_CHECKED, has been added for checked states
|
||||
of radio and check buttons and menuitems. Applications that are using
|
||||
GTK+ styles without widgets will need adjustments.
|
||||
|
||||
* Adwaita is now the default theme on all platforms.
|
||||
|
||||
* The icon theme code has become a little pickier about sizes and is not
|
||||
automatically scaling icons beyond the limits defined in the icon theme
|
||||
unless explicitly asked to do so with GTK_ICON_LOOKUP_FORCE_SIZE.
|
||||
|
||||
* GTK+ now includes an interactive debugger which can be activated with
|
||||
the keyboard shortcuts Ctrl-Shift-d or Ctrl-Shift-i. If these shortcuts
|
||||
interfere with application keybindings, they can be disabled with the
|
||||
setting org.gtk.Settings.Debug.enable-inspector-keybinding.
|
||||
|
||||
* Most widgets have been ported to use the new gesture framework internally
|
||||
for event handling. Traditional event handlers in derived widgets are still
|
||||
being called.
|
||||
|
||||
* Using GTK+ under X11 without the X Render extension has been observed
|
||||
to be problematic. This combination is using code paths in cairo and
|
||||
graphics drivers which are rarely tested and likely buggy.
|
||||
|
||||
* GtkTextView is now using a pixel-cache internally, and is drawing
|
||||
a background underneath the text. This can cause problems for applications
|
||||
which assumed that they could draw things below and above the text
|
||||
by chaining up in the ::draw implementation of their GtkTextView subclass.
|
||||
As a short-term workaround, you can make the application apply a
|
||||
custom theme to the text view with a transparent background. For
|
||||
a proper fix, use the new ::draw_layer vfunc.
|
||||
|
||||
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.
|
||||
|
||||
* GtkHeaderBar in 3.10 was not ordering its pack-end children in
|
||||
the right way. This has been fixed in 3.12. Applications which
|
||||
pack multiple widgets at the end of a headerbar will have to
|
||||
be updated.
|
||||
|
||||
* gtk_text_view_add_child_in_window has changed behaviour a bit.
|
||||
It now always positions the child in buffer coordinates, where
|
||||
it used to inconsistently scroll with the buffer but then go
|
||||
reposition to a window-relative position on redraw.
|
||||
|
||||
* A number of container widgets have been made more compliant with
|
||||
the uniform CSS rendering model by making them render backgrounds
|
||||
and borders. This may require some adjustments in applications that
|
||||
were making assumptions about containers never rendering backgrounds.
|
||||
|
||||
Release notes for 3.10
|
||||
======================
|
||||
|
||||
* GDK has been changed to allow only a single screen per display.
|
||||
Only the X11 backend had multiple screens before, and multi-screen
|
||||
setups (not multi-monitor!) are very rare nowadays. If you really
|
||||
need multiple X screens, open them as separate displays.
|
||||
|
||||
* The behavior of GtkBox::expand has been changed to never propagate
|
||||
up. Previously, this was happening inconsistently. If you want the
|
||||
expand to propagate, use the GtkWidget h/v expand properties.
|
||||
If you experience sizing problems with widgets in ported code,
|
||||
carefully check the expand and fill flags of your boxes.
|
||||
|
||||
* GtkBin no longer provides default implementations for
|
||||
get_height_for_width, subclasses now have to provide their own
|
||||
implementation if they need height-for-width functionality.
|
||||
|
||||
* Widget state propagation has been changed. Historically, all of
|
||||
active, prelight, selected, insensitive, inconsistent and backdrop
|
||||
have been propagated to children. This has now been restricted
|
||||
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
|
||||
=====================
|
||||
|
||||
* GtkIconInfo has changed from being a boxed type to a GObject. This
|
||||
is technically an ABI change, but basically all existing code
|
||||
will keep working if its used as a boxed type, and its not
|
||||
possible to instantiate GtkIconInfos outside Gtk, so this is not
|
||||
expected to be a big problem.
|
||||
|
||||
Release notes for 3.6
|
||||
=====================
|
||||
|
||||
* The accessibility bridge code that exports accessible objects
|
||||
on the bus is now used by default; atk-bridge has been converted
|
||||
into a library that GTK+ links against. To void the linking,
|
||||
pass --without-atk-bridge when configuring GTK+.
|
||||
|
||||
* GDK threading support has been deprecated. It is recommended to
|
||||
use g_idle_add(), g_main_context_invoke() and similar funtions
|
||||
to make all GTK+ calls from the main thread.
|
||||
|
||||
* GTK+ now follows the XDG Base Directory specification for
|
||||
user configuration and data files. In detail,
|
||||
* $XDG_CONFIG_HOME/gtk-3.0/custom-papers is the new location
|
||||
for $HOME/.gtk-custom-papers
|
||||
* $XDG_CONFIG_HOME/gtk-3.0/bookmarks is the new location
|
||||
for $HOME/.gtk-bookmarks
|
||||
* $XDG_DATA_HOME/themes is preferred over $HOME/.themes
|
||||
* $XDG_DATA_HOME/icons is preferred over $HOME/.icons.
|
||||
Existing files from the old location will still be read
|
||||
if the new location does not exist.
|
||||
|
||||
* $HOME/.gtk-3.0 is no longer in the default module load path.
|
||||
If you want to load modules from there, add it to the GTK_PATH
|
||||
environment variable.
|
||||
|
||||
Release notes for 3.4
|
||||
=====================
|
||||
|
||||
* Scroll events have been separated from button events, and smooth
|
||||
scrolling has been added with a separate event mask. Widgets now
|
||||
need to have either GDK_SCROLL_MASK or GDK_SMOOTH_SCROLL_MASK in
|
||||
their event mask to receive scroll events. In addition, the
|
||||
GdkScrollDirection enumeration has gained a new member,
|
||||
GDK_SCROLL_SMOOTH, so switch statements will have to be amended
|
||||
to cover this case.
|
||||
|
||||
* GTK+ now uses <Primary> instead of <Control> in keyboard accelerators,
|
||||
for improved cross-platform handling. This should not affect
|
||||
applications, unless they parse or create these accelerator
|
||||
manually.
|
||||
|
||||
* The tacit assumption that the Alt key corresponds to the MOD1
|
||||
modifier under X11 is now a hard requirement.
|
||||
|
||||
* The beagle search backend for the file chooser has been dropped.
|
||||
Tracker is the only supported search backend on Linux now.
|
||||
|
||||
* GtkNotebook has been changed to destroy its action widgets when
|
||||
it gets destroyed itself. If your application is using action
|
||||
widgets in notebooks, you may have to adjust your code to take
|
||||
this into account.
|
||||
|
||||
* GtkApplication no longer uses the gtk mainloop wrappers, so
|
||||
it is no longer possible to use gtk_main_quit() to stop it.
|
||||
|
||||
* The -uninstalled variants of the pkg-config files have been dropped.
|
||||
|
||||
* Excessive dependencies have been culled from Requires: lines
|
||||
in .pc files. Dependent modules may have to declare dependencies
|
||||
that there were getting 'for free' in the past.
|
||||
|
||||
Release notes for 3.2
|
||||
=====================
|
||||
|
||||
* The accessible implementations for GTK+ widgets have been integrated
|
||||
into libgtk itself, and the gail module does not exist anymore. This
|
||||
change should not affect applications very much.
|
||||
|
||||
Release notes for 3.0
|
||||
=====================
|
||||
|
||||
* GTK+ 3 is a major new version of GTK+, which is parallel installable
|
||||
with GTK+ 2.x. For information about porting applications from GTK+ 2.x
|
||||
to GTK+ 3, see the file:
|
||||
|
||||
docs/reference/gtk/html/migrating.html
|
||||
|
||||
Or online at:
|
||||
|
||||
http://library.gnome.org/devel/gtk/3.0/migrating.html
|
||||
|
||||
* Note that the library sonames in this release have been changed from
|
||||
libgtk-3.0 and libgdk-3.0 to libgtk-3 and libgdk-3, to prevent the
|
||||
library versions from going backwards, compared to the 2.90/91/99
|
||||
releases. Applications will have to be recompiled.
|
||||
|
@@ -1,5 +1,14 @@
|
||||
include $(top_srcdir)/Makefile.decl
|
||||
|
||||
SUBDIRS = win32
|
||||
SUBDIRS = \
|
||||
win32
|
||||
|
||||
EXTRA_DIST += \
|
||||
msvcfiles.py \
|
||||
gen-file-list-gtk.py \
|
||||
detectenv_msvc.mak \
|
||||
introspection-msvc.mak \
|
||||
gtk-introspection-msvc.mak.in \
|
||||
gtk-introspection-msvc.mak
|
||||
|
||||
-include $(top_srcdir)/git.mk
|
||||
|
@@ -1,125 +0,0 @@
|
||||
# Author: Fan, Chun-wei
|
||||
# Common autotools file for constructing the g-ir-scanner and
|
||||
# g-ir-compiler command lines for Visual Studio builds.
|
||||
|
||||
# This is copied from $(srcroot)/build from the gobject-introspection
|
||||
# project, which may be included in projects that support both
|
||||
# Visual Studio builds and introspection.
|
||||
|
||||
# * Input variables:
|
||||
#
|
||||
# MSVC_INTROSPECT_GIRS - List of .gir's that should be built
|
||||
# in the NMake Makefiles
|
||||
#
|
||||
# * Simple tutorial
|
||||
#
|
||||
# Add this to Makefile.am where your library/program is built:
|
||||
# (Either YourLib_1_0_gir_MSVC_LIBS or YourLib_1_0_gir_MSVC_PROGRAM
|
||||
# is required unless --headers-only is specified in
|
||||
# YourLib_1_0_gir__MSVC_SCANNERFLAGS)
|
||||
#
|
||||
# include $(top_srcdir)/build/Makefile.msvc-introspection
|
||||
# MSVC_INTROSPECT_GIRS = YourLib-1.0.gir
|
||||
# YourLib_1_0_gir_NAMESPACE = YourLib # This is optional
|
||||
# YourLib_1_0_gir_VERSION = 1.0 # This is optional
|
||||
# YourLib_1_0_gir_MSVC_LIBS = yourlib-1.0
|
||||
# YourLib_1_0_gir_MSVC_FILES = $(libyourlib_1_0_SOURCES)
|
||||
# YourLib_1_0_gir_MSVC_PROGRAM = YourProgram
|
||||
# YourLib_1_0_gir_MSVC_PACKAGES = (Dependent .pc files)
|
||||
# YourLib_1_0_gir_MSVC_INCLUDE_GIRS = (Dependent external .gir's)
|
||||
# YourLiv_1_0_gir_MSVC_EXPORT_PACKAGES = (Packages exported by this .gir)
|
||||
|
||||
# Private functions
|
||||
|
||||
## Transform the MSVC project filename (no filename extensions) to something which can reference through a variable
|
||||
## without automake/make complaining, eg Gtk-2.0 -> Gtk_2_0
|
||||
_gir_name=$(subst /,_,$(subst -,_,$(subst .,_,$(1))))
|
||||
|
||||
# Namespace and Version is either fetched from the gir filename
|
||||
# or the _NAMESPACE/_VERSION variable combo
|
||||
_gir_namespace_msvc = $(or $($(_gir_name)_NAMESPACE),$(firstword $(subst -, ,$(notdir $(1)))))
|
||||
_gir_version_msvc = $(or $($(_gir_name)_VERSION),$(lastword $(subst -, ,$(1:.gir=))))
|
||||
_typelib_basename_msvc = $(_gir_namespace_msvc)'-'$(_gir_version_msvc)
|
||||
|
||||
# _PROGRAM is an optional variable which needs its own --program argument
|
||||
_gir_program_msvc = $(if $($(_gir_name)_MSVC_PROGRAM),--program=$($(_gir_name)_MSVC_PROGRAM))
|
||||
|
||||
# Deduce the sub-folder from $(srcroot) where the sources reside in
|
||||
_gir_source_path_raw_msvc:=$(subst $(abs_top_srcdir),,$(abs_srcdir))
|
||||
_gir_source_path_msvc=$(subst /,\\,$(_gir_source_path_raw_msvc))
|
||||
_gir_source_subdir_int_msvc=$(subst \\\\,\\,\\$(_gir_source_path_msvc)\\)
|
||||
_gir_source_subdir_msvc=$(subst \\.\\,\\,$(_gir_source_subdir_int_msvc))
|
||||
|
||||
_gir_files_raw_msvc=$(subst /,\\,$($(_gir_name)_MSVC_FILES))
|
||||
_gir_files_msvc=$(subst $(srcdir)\\,,$(subst $(builddir)\\,,$(subst $(top_builddir)\\$(_gir_source_path_msvc)\\,\\,$(_gir_files_raw_msvc))))
|
||||
|
||||
# Create a list of items for:
|
||||
# - Libraries
|
||||
# - Packages
|
||||
# - GIRs to include
|
||||
# - packages to export
|
||||
|
||||
_gir_libraries_msvc = $(foreach lib,$($(_gir_name)_MSVC_LIBS),--library=$(lib))
|
||||
_gir_packages_msvc = $(foreach pkg,$($(_gir_name)_MSVC_PACKAGES),--pkg=$(pkg))
|
||||
_gir_includes_msvc = $(foreach include,$($(_gir_name)_MSVC_INCLUDE_GIRS),--include=$(include))
|
||||
_gir_export_packages_msvc = $(foreach pkg,$($(_gir_name)_MSVC_EXPORT_PACKAGES),--pkg-export=$(pkg))
|
||||
|
||||
#
|
||||
# Create NMake Makefile Sections for Building Introspection files
|
||||
# from autotools files
|
||||
# $(1) - File Name of the .gir that is to be generated
|
||||
#
|
||||
|
||||
define gir-nmake-builder
|
||||
|
||||
# Basic sanity check, to make sure required variables are set
|
||||
$(if $($(_gir_name)_MSVC_FILES),,$(error Need to define $(_gir_name)_MSVC_FILES))
|
||||
$(if $(or $(findstring --header-only,$($(_gir_name)_MSVC_SCANNERFLAGS)),
|
||||
$($(_gir_name)_MSVC_LIBS),
|
||||
$($(_gir_name)_MSVC_PROGRAM)),,
|
||||
$(error Need to define $(_gir_name)_MSVC_LIBS or $(_gir_name)_MSVC_PROGRAM))
|
||||
|
||||
$(top_builddir)/build/win32/$(_gir_name)_list:
|
||||
for F in $(_gir_files_msvc); do \
|
||||
case $$$$F in \
|
||||
*.c|*.cpp|*.cc|*.cxx|*.h|*.hpp|*.hh|*.hxx) \
|
||||
echo '..\..'$(_gir_source_subdir_msvc)$$$$F >>$(top_builddir)/build/win32/$(_gir_name)_list \
|
||||
;; \
|
||||
esac; \
|
||||
done
|
||||
|
||||
$(top_builddir)/build/win32/$(1).msvc.introspect:
|
||||
-$(RM) $(top_builddir)/build/win32/$(1).msvc.introspect
|
||||
|
||||
# Assemble the Command to Run g-ir-scanner
|
||||
echo $(1)': '$(_gir_name)'_list '$($(_gir_name)_MSVC_GIR_DEPS)>>$(top_builddir)/build/win32/$(1).msvc.introspect
|
||||
echo ' @-echo Generating $$$$@...'>>$(top_builddir)/build/win32/$(1).msvc.introspect
|
||||
echo ' $$$$(PYTHON) $$$$(G_IR_SCANNER) \'>>$(top_builddir)/build/win32/$(1).msvc.introspect
|
||||
echo ' --verbose -no-libtool \'>>$(top_builddir)/build/win32/$(1).msvc.introspect
|
||||
echo ' --namespace='$(_gir_namespace_msvc)' \'>>$(top_builddir)/build/win32/$(1).msvc.introspect
|
||||
echo ' --nsversion='$(_gir_version_msvc)' \'>>$(top_builddir)/build/win32/$(1).msvc.introspect
|
||||
echo ' '$(_gir_packages_msvc)' \'>>$(top_builddir)/build/win32/$(1).msvc.introspect
|
||||
echo ' '$(_gir_libraries_msvc)' \'>>$(top_builddir)/build/win32/$(1).msvc.introspect
|
||||
echo ' '$(_gir_program_msvc)' \'>>$(top_builddir)/build/win32/$(1).msvc.introspect
|
||||
echo ' --add-include-path=$$$$(G_IR_INCLUDEDIR) \'>>$(top_builddir)/build/win32/$(1).msvc.introspect
|
||||
echo ' '$(_gir_includes_msvc)' \'>>$(top_builddir)/build/win32/$(1).msvc.introspect
|
||||
echo ' '$(_gir_export_packages_msvc)' \'>>$(top_builddir)/build/win32/$(1).msvc.introspect
|
||||
echo ' --cflags-begin \'>>$(top_builddir)/build/win32/$(1).msvc.introspect
|
||||
echo ' '$($(_gir_name)_MSVC_CFLAGS)' \'>>$(top_builddir)/build/win32/$(1).msvc.introspect
|
||||
echo ' --cflags-end \'>>$(top_builddir)/build/win32/$(1).msvc.introspect
|
||||
echo ' '$($(_gir_name)_MSVC_SCANNERFLAGS)' \'>>$(top_builddir)/build/win32/$(1).msvc.introspect
|
||||
echo ' --filelist='$(_gir_name)'_list \'>>$(top_builddir)/build/win32/$(1).msvc.introspect
|
||||
echo ' -o $$$$@'>>$(top_builddir)/build/win32/$(1).msvc.introspect
|
||||
echo '' >>$(top_builddir)/build/win32/$(1).msvc.introspect
|
||||
|
||||
# Finally Assemble the Command to Compile the generated .gir
|
||||
echo '$(_typelib_basename_msvc).typelib: '$(_typelib_basename_msvc)'.gir'>>$(top_builddir)/build/win32/$(1).msvc.introspect
|
||||
echo ' @-echo Compiling $$$$@...'>>$(top_builddir)/build/win32/$(1).msvc.introspect
|
||||
echo ' $$$$(G_IR_COMPILER) \'>>$(top_builddir)/build/win32/$(1).msvc.introspect
|
||||
echo ' --includedir=. --debug --verbose \'>>$(top_builddir)/build/win32/$(1).msvc.introspect
|
||||
echo ' '$(1)' \'>>$(top_builddir)/build/win32/$(1).msvc.introspect
|
||||
echo ' -o $$$$@'>>$(top_builddir)/build/win32/$(1).msvc.introspect
|
||||
echo '' >>$(top_builddir)/build/win32/$(1).msvc.introspect
|
||||
endef
|
||||
|
||||
$(foreach gir,$(MSVC_INTROSPECT_GIRS),$(eval $(call gir-nmake-builder,$(gir))))
|
@@ -1,8 +1,3 @@
|
||||
# Common NMake Makefile module for checking the build environment
|
||||
# This can be copied from $(glib_srcroot)\build\win32 for GNOME items
|
||||
# that support MSVC builds and introspection under MSVC, and can be used
|
||||
# for building test programs as well.
|
||||
|
||||
# Check to see we are configured to build with MSVC (MSDEVDIR, MSVCDIR or
|
||||
# VCINSTALLDIR) or with the MS Platform SDK (MSSDK or WindowsSDKDir)
|
||||
!if !defined(VCINSTALLDIR) && !defined(WINDOWSSDKDIR)
|
||||
@@ -40,8 +35,6 @@ VSVER = 10
|
||||
VSVER = 11
|
||||
!elseif $(VCVERSION) > 1799 && $(VCVERSION) < 1900
|
||||
VSVER = 12
|
||||
!elseif $(VCVERSION) > 1899 && $(VCVERSION) < 2000
|
||||
VSVER = 14
|
||||
!else
|
||||
VSVER = 0
|
||||
!endif
|
||||
@@ -49,24 +42,20 @@ VSVER = 0
|
||||
!if "$(VSVER)" == "0"
|
||||
MSG = ^
|
||||
This NMake Makefile set supports Visual Studio^
|
||||
9 (2008) through 14 (2015). Your Visual Studio^
|
||||
9 (2008) through 12 (2013). Your Visual Studio^
|
||||
version is not supported.
|
||||
!error $(MSG)
|
||||
!endif
|
||||
|
||||
VALID_CFGSET = FALSE
|
||||
!if "$(CFG)" == "release" || "$(CFG)" == "debug" || "$(CFG)" == "Release" || "$(CFG)" == "Debug"
|
||||
!if "$(CFG)" == "release" || "$(CFG)" == "debug"
|
||||
VALID_CFGSET = TRUE
|
||||
!endif
|
||||
|
||||
# We want debugging symbols logged for all builds,
|
||||
# using .pdb files for release builds
|
||||
CFLAGS_BASE = /Zi
|
||||
|
||||
!if "$(CFG)" == "release" || "$(CFG)" == "Release"
|
||||
CFLAGS_ADD = /MD /O2 $(CFLAGS_BASE)
|
||||
!if "$(CFG)" == "release"
|
||||
CFLAGS_ADD = /MD /O2
|
||||
!else
|
||||
CFLAGS_ADD = /MDd /Od $(CFLAGS_BASE)
|
||||
CFLAGS_ADD = /MDd /Od /Zi
|
||||
!endif
|
||||
|
||||
!if "$(PLAT)" == "x64"
|
100
build/gen-file-list-gtk.py
Normal file
100
build/gen-file-list-gtk.py
Normal file
@@ -0,0 +1,100 @@
|
||||
#!/usr/bin/python
|
||||
# vim: encoding=utf-8
|
||||
# Generate the file lists for processing with g-ir-scanner
|
||||
import os
|
||||
import sys
|
||||
import re
|
||||
import string
|
||||
import subprocess
|
||||
import optparse
|
||||
|
||||
from msvcfiles import read_vars_from_AM
|
||||
|
||||
def gen_gdk_filelist(srcroot, subdir, dest):
|
||||
vars = read_vars_from_AM(os.path.join(srcroot, subdir, 'Makefile.am'),
|
||||
vars = {},
|
||||
conds = {},
|
||||
filters = ['gdk_h_sources', 'gdk_c_sources'])
|
||||
|
||||
vars['gdk_enums'] = 'gdkenumtypes.c gdkenumtypes.h'
|
||||
|
||||
files = vars['gdk_h_sources'].split() + \
|
||||
vars['gdk_c_sources'].split() + \
|
||||
vars['gdk_enums'].split()
|
||||
|
||||
sources = [i for i in files if (i != 'gdkkeysyms-compat.h')]
|
||||
|
||||
with open(dest, 'w') as d:
|
||||
for i in sources:
|
||||
d.write(srcroot + '\\' + subdir + '\\' + i.replace('/', '\\') + '\n')
|
||||
|
||||
def gen_gdkwin32_filelist(srcroot, subdir, dest):
|
||||
vars = read_vars_from_AM(os.path.join(srcroot, subdir, 'Makefile.am'),
|
||||
vars = {},
|
||||
conds = {'HAVE_INTROSPECTION': True,
|
||||
'OS_WIN32': True},
|
||||
filters = ['w32_introspection_files'])
|
||||
|
||||
files = vars['w32_introspection_files'].split()
|
||||
|
||||
with open(dest, 'w') as d:
|
||||
for i in files:
|
||||
d.write(srcroot + '\\' + subdir + '\\' + i.replace('/', '\\') + '\n')
|
||||
|
||||
def gen_gtk_filelist(srcroot, subdir, dest):
|
||||
vars = read_vars_from_AM(os.path.join(srcroot, 'gtk', 'Makefile.am'),
|
||||
vars = {},
|
||||
conds = {'USE_WIN32': True,
|
||||
'USE_QUARTZ': False,
|
||||
'USE_X11': False,
|
||||
'USE_EXTERNAL_ICON_CACHE': False},
|
||||
filters = ['gtkinclude_HEADERS',
|
||||
'a11yinclude_HEADERS',
|
||||
'deprecatedinclude_HEADERS',
|
||||
'gtk_base_c_sources',
|
||||
'gtk_clipboard_dnd_c_sources'])
|
||||
|
||||
vars_depr = read_vars_from_AM(os.path.join(srcroot, 'gtk', 'deprecated', 'Makefile.inc'),
|
||||
vars = {},
|
||||
conds = {},
|
||||
filters = ['deprecated_h_sources',
|
||||
'deprecated_c_sources'])
|
||||
|
||||
vars_a11y = read_vars_from_AM(os.path.join(srcroot, 'gtk', 'a11y', 'Makefile.inc'),
|
||||
vars = {},
|
||||
conds = {},
|
||||
filters = ['a11y_h_sources',
|
||||
'a11y_c_sources'])
|
||||
|
||||
vars['gtk_other_src'] = 'gtkprintoperation-win32.c gtktypebuiltins.h gtktypebuiltins.c'
|
||||
|
||||
files = vars['gtkinclude_HEADERS'].split() + \
|
||||
vars_a11y['a11y_h_sources'].split() + \
|
||||
vars_depr['deprecated_h_sources'].split() + \
|
||||
vars['gtk_base_c_sources'].split() + \
|
||||
vars_a11y['a11y_c_sources'].split() + \
|
||||
vars_depr['deprecated_c_sources'].split() + \
|
||||
vars['gtk_other_src'].split()
|
||||
|
||||
sources = [i for i in files \
|
||||
if not (i.endswith('private.h')) \
|
||||
and i != 'gtktextdisplay.h' \
|
||||
and i != 'gtktextlayout.h' \
|
||||
and i != 'gtkx.h']
|
||||
|
||||
with open(dest, 'w') as d:
|
||||
for i in sources:
|
||||
d.write(srcroot + '\\' + subdir + '\\' + i.replace('/', '\\') + '\n')
|
||||
|
||||
def main(argv):
|
||||
srcroot = '..'
|
||||
subdir_gdk = 'gdk'
|
||||
subdir_gtk = 'gtk'
|
||||
|
||||
gen_gdk_filelist(srcroot, subdir_gdk, 'gdk_list')
|
||||
gen_gdkwin32_filelist(srcroot, subdir_gdk, 'gdkwin32_list')
|
||||
gen_gtk_filelist(srcroot, subdir_gtk, 'gtk_list')
|
||||
return 0
|
||||
|
||||
if __name__ == '__main__':
|
||||
sys.exit(main(sys.argv))
|
101
build/gtk-introspection-msvc.mak.in
Normal file
101
build/gtk-introspection-msvc.mak.in
Normal file
@@ -0,0 +1,101 @@
|
||||
# NMake Makefile to build Introspection Files for GTK+
|
||||
|
||||
!include detectenv_msvc.mak
|
||||
|
||||
APIVERSION = 3.0
|
||||
|
||||
CHECK_PACKAGE = gdk-pixbuf-2.0 atk pangocairo gio-2.0
|
||||
|
||||
built_install_girs = Gdk-$(APIVERSION).gir GdkWin32-$(APIVERSION).gir Gtk-$(APIVERSION).gir
|
||||
built_install_typelibs = Gdk-$(APIVERSION).typelib GdkWin32-$(APIVERSION).typelib Gtk-$(APIVERSION).typelib
|
||||
|
||||
!include introspection-msvc.mak
|
||||
|
||||
!if "$(BUILD_INTROSPECTION)" == "TRUE"
|
||||
all: setgirbuildnev $(built_install_girs) $(built_install_typelibs)
|
||||
|
||||
gdk_list gdkwin32_list gtk_list:
|
||||
@-echo Generating Filelist to Introspect for GDK/GTK...
|
||||
$(PYTHON2) gen-file-list-gtk.py
|
||||
|
||||
setgirbuildnev:
|
||||
@set CC=$(CC)
|
||||
@set PYTHONPATH=$(BASEDIR)\lib\gobject-introspection
|
||||
@set PATH=win32\vs$(VSVER)\$(CFG)\$(PLAT)\bin;$(BASEDIR)\bin;$(PATH)
|
||||
@set PKG_CONFIG_PATH=$(PKG_CONFIG_PATH)
|
||||
@set LIB=win32\vs$(VSVER)\$(CFG)\$(PLAT)\bin;$(LIB)
|
||||
|
||||
Gdk-$(APIVERSION).gir: gdk_list
|
||||
@-echo Generating Gdk-$(APIVERSION).gir...
|
||||
$(PYTHON2) $(G_IR_SCANNER) --verbose -I.. -I..\gdk \
|
||||
-I$(BASEDIR)\include\glib-2.0 -I$(BASEDIR)\lib\glib-2.0\include \
|
||||
-I$(BASEDIR)\include\pango-1.0 -I$(BASEDIR)\include\atk-1.0 \
|
||||
-I$(BASEDIR)\include\gdk-pixbuf-2.0 -I$(BASEDIR)\include \
|
||||
--namespace=Gdk --nsversion=3.0 \
|
||||
--include=Gio-2.0 --include=GdkPixbuf-2.0 \
|
||||
--include=Pango-1.0 --include=cairo-1.0 \
|
||||
--no-libtool --library=gdk-3.0 \
|
||||
--reparse-validate --add-include-path=$(G_IR_INCLUDEDIR) --add-include-path=. \
|
||||
--pkg-export gdk-3.0 --warn-all --c-include="gdk/gdk.h" \
|
||||
-DG_LOG_DOMAIN=\"Gdk\" -DGDK_COMPILATION \
|
||||
--filelist=gdk_list -o $@
|
||||
|
||||
GdkWin32-$(APIVERSION).gir: gdkwin32_list
|
||||
@-echo Generating GdkWin32-$(APIVERSION).gir...
|
||||
$(PYTHON2) $(G_IR_SCANNER) --verbose -I.. -I..\gdk \
|
||||
-I$(BASEDIR)\include\glib-2.0 -I$(BASEDIR)\lib\glib-2.0\include \
|
||||
-I$(BASEDIR)\include\pango-1.0 -I$(BASEDIR)\include\atk-1.0 \
|
||||
-I$(BASEDIR)\include\gdk-pixbuf-2.0 -I$(BASEDIR)\include \
|
||||
--namespace=GdkWin32 --nsversion=3.0 \
|
||||
--include=Gio-2.0 --include=GdkPixbuf-2.0 \
|
||||
--include=Pango-1.0 --include-uninstalled=./Gdk-$(APIVERSION).gir \
|
||||
--no-libtool --library=gdk-3.0 \
|
||||
--reparse-validate --add-include-path=$(G_IR_INCLUDEDIR) --add-include-path=. \
|
||||
--pkg-export gdk-win32-3.0 --warn-all --c-include="gdk/gdkwin32.h" \
|
||||
-DG_LOG_DOMAIN=\"Gdk\" -DGDK_COMPILATION \
|
||||
--filelist=gdkwin32_list -o $@
|
||||
|
||||
Gtk-$(APIVERSION).gir: gtk_list
|
||||
$(PYTHON2) $(G_IR_SCANNER) --verbose -I.. -I..\gtk -I..\gdk \
|
||||
-I$(BASEDIR)\include\glib-2.0 -I$(BASEDIR)\lib\glib-2.0\include \
|
||||
-I$(BASEDIR)\include\pango-1.0 -I$(BASEDIR)\include\atk-1.0 \
|
||||
-I$(BASEDIR)\include\gdk-pixbuf-2.0 -I$(BASEDIR)\include \
|
||||
--namespace=Gtk --nsversion=3.0 \
|
||||
--include=Atk-1.0 \
|
||||
--include-uninstalled=./Gdk-$(APIVERSION).gir \
|
||||
--no-libtool --library=gtk-3.0 --library=gdk-3.0 \
|
||||
--reparse-validate --add-include-path=$(G_IR_INCLUDEDIR) --add-include-path=. \
|
||||
--pkg-export gtk+-3.0 --warn-all --c-include="gtk/gtkx.h" \
|
||||
-DG_LOG_DOMAIN=\"Gtk\" -DGTK_LIBDIR=\"/dummy/lib\" \
|
||||
-DGTK_DATADIR=\"/dummy/share\" -DGTK_DATA_PREFIX=\"/dummy\" \
|
||||
-DGTK_SYSCONFDIR=\"/dummy/etc\" -DGTK_VERSION=\"@GTK_VERSION@\" \
|
||||
-DGTK_BINARY_VERSION=\"3.0.0\" -DGTK_HOST=\"i686-pc-vs$(VSVER)\" \
|
||||
-DGTK_COMPILATION -DGTK_PRINT_BACKENDS=\"file\" \
|
||||
-DGTK_PRINT_PREVIEW_COMMAND=\"undefined-gtk-print-preview-command\" \
|
||||
-DGTK_FILE_SYSTEM_ENABLE_UNSUPPORTED -DGTK_PRINT_BACKEND_ENABLE_UNSUPPORTED \
|
||||
-DINCLUDE_IM_am_et -DINCLUDE_IM_cedilla -DINCLUDE_IM_cyrillic_translit \
|
||||
-DINCLUDE_IM_ime -DINCLUDE_IM_inuktitut -DINCLUDE_IM_ipa \
|
||||
-DINCLUDE_IM_multipress -DINCLUDE_IM_thai -DINCLUDE_IM_ti_er \
|
||||
-DINCLUDE_IM_ti_et -DINCLUDE_IM_viqr --filelist=gtk_list \
|
||||
-o $@
|
||||
|
||||
$(built_install_typelibs): $(built_install_girs)
|
||||
@-echo Compiling $*.typelib...
|
||||
@-$(G_IR_COMPILER) --includedir=. --debug --verbose $*.gir -o $@
|
||||
|
||||
install-introspection: setgirbuildnev $(built_install_girs) $(built_install_typelibs)
|
||||
@-copy *.gir $(G_IR_INCLUDEDIR)
|
||||
@-copy /b *.typelib $(G_IR_TYPELIBDIR)
|
||||
|
||||
!else
|
||||
all:
|
||||
@-echo $(ERROR_MSG)
|
||||
!endif
|
||||
|
||||
clean:
|
||||
@-del /f/q *.typelib
|
||||
@-del /f/q *.gir
|
||||
@-del /f/q gtk_list
|
||||
@-del /f/q gdkwin32_list
|
||||
@-del /f/q gdk_list
|
||||
@-del /f/q *.pyc
|
65
build/introspection-msvc.mak
Normal file
65
build/introspection-msvc.mak
Normal file
@@ -0,0 +1,65 @@
|
||||
# Common Utility NMake Makefile Template
|
||||
# Used to Generate Introspection files for various Projects
|
||||
|
||||
# Can Override with env vars as needed
|
||||
# You will need to have built gobject-introspection for this to work.
|
||||
# Change or pass in or set the following to suit your environment
|
||||
|
||||
BASEDIR = ..\..\vs$(VSVER)\$(PLAT)
|
||||
GIR_SUBDIR = share\gir-1.0
|
||||
GIR_TYPELIBDIR = lib\girepository-1.0
|
||||
G_IR_SCANNER = $(BASEDIR)\bin\g-ir-scanner
|
||||
G_IR_COMPILER = $(BASEDIR)\bin\g-ir-compiler.exe
|
||||
G_IR_INCLUDEDIR = $(BASEDIR)\$(GIR_SUBDIR)
|
||||
G_IR_TYPELIBDIR = $(BASEDIR)\$(GIR_TYPELIBDIR)
|
||||
|
||||
# Note: The PYTHON2 must be a Python 2.6.x or 2.7.x Interpretor!
|
||||
# Either having python.exe from Python 2.6.x/2.7.x in your PATH will work
|
||||
# or passing in PYTHON2=<full path to your Python 2.6.x/2.7.x interpretor> will do
|
||||
|
||||
# This is required, and gobject-introspection needs to be built
|
||||
# before this can be successfully run.
|
||||
PYTHON2=python
|
||||
|
||||
# Don't change anything following this line!
|
||||
VALID_PKG_CONFIG_PATH = FALSE
|
||||
VALID_GCC_INSTPATH = FALSE
|
||||
|
||||
MSG_INVALID_PKGCONFIG = You must set or specifiy a valid PKG_CONFIG_PATH
|
||||
MSG_INVALID_CFG = You need to specify or set CFG to be release or debug to use this Makefile to build the Introspection Files
|
||||
|
||||
ERROR_MSG =
|
||||
|
||||
BUILD_INTROSPECTION = TRUE
|
||||
|
||||
!if ![pkg-config --print-errors --errors-to-stdout $(CHECK_PACKAGE) > pkgconfig.x] \
|
||||
&& ![setlocal] \
|
||||
&& ![set file="pkgconfig.x"] \
|
||||
&& ![FOR %A IN (%file%) DO @echo PKG_CHECK_SIZE=%~zA > pkgconfig.chksize] \
|
||||
&& ![del $(ERRNUL) /q/f pkgconfig.x]
|
||||
!endif
|
||||
|
||||
!include pkgconfig.chksize
|
||||
!if "$(PKG_CHECK_SIZE)" == "0"
|
||||
VALID_PKG_CONFIG_PATH = TRUE
|
||||
!else
|
||||
VALID_PKG_CONFIG_PATH = FALSE
|
||||
!endif
|
||||
|
||||
!if ![del $(ERRNUL) /q/f pkgconfig.chksize]
|
||||
!endif
|
||||
|
||||
VALID_CFGSET = FALSE
|
||||
!if "$(CFG)" == "release" || "$(CFG)" == "debug"
|
||||
VALID_CFGSET = TRUE
|
||||
!endif
|
||||
|
||||
!if "$(VALID_PKG_CONFIG_PATH)" != "TRUE"
|
||||
BUILD_INTROSPECTION = FALSE
|
||||
ERROR_MSG = $(MSG_INVALID_PKGCONFIG)
|
||||
!endif
|
||||
|
||||
!if "$(VALID_CFGSET)" != "TRUE"
|
||||
BUILD_INTROSPECTION = FALSE
|
||||
ERROR_MSG = $(MSG_INVALID_CFG)
|
||||
!endif
|
261
build/msvcfiles.py
Normal file
261
build/msvcfiles.py
Normal file
@@ -0,0 +1,261 @@
|
||||
#!/usr/bin/python
|
||||
# vim: encoding=utf-8
|
||||
#expand *.in files
|
||||
import os
|
||||
import sys
|
||||
import re
|
||||
import optparse
|
||||
|
||||
def parent_dir(path):
|
||||
if not os.path.isabs(path):
|
||||
path = os.path.abspath(path)
|
||||
if os.path.isfile(path):
|
||||
path = os.path.dirname(path)
|
||||
return os.path.split(path)[0]
|
||||
|
||||
def check_output_type (btype):
|
||||
print_bad_type = False
|
||||
output_type = -1
|
||||
if (btype is None):
|
||||
output_type = -1
|
||||
print_bad_type = False
|
||||
elif (btype == "vs9"):
|
||||
output_type = 1
|
||||
elif (btype == "vs10"):
|
||||
output_type = 2
|
||||
elif (btype == "nmake-exe"):
|
||||
output_type = 3
|
||||
else:
|
||||
output_type = -1
|
||||
print_bad_type = True
|
||||
if (output_type == -1):
|
||||
if (print_bad_type is True):
|
||||
print ("The entered output build file type '%s' is not valid" % btype)
|
||||
else:
|
||||
print ("Output build file type is not specified.\nUse -t <type> to specify the output build file type.")
|
||||
print ("Valid output build file types are: nmake-exe, vs9 , vs10")
|
||||
return output_type
|
||||
|
||||
def read_vars_from_AM(path, vars = {}, conds = {}, filters = None):
|
||||
'''
|
||||
path: path to the Makefile.am
|
||||
vars: predefined variables
|
||||
conds: condition variables for Makefile
|
||||
filters: if None, all variables defined are returned,
|
||||
otherwise, it is a list contains that variables should be returned
|
||||
'''
|
||||
cur_vars = vars.copy()
|
||||
RE_AM_VAR_REF = re.compile(r'\$\((\w+?)\)')
|
||||
RE_AM_VAR = re.compile(r'^\s*(\w+)\s*=(.*)$')
|
||||
RE_AM_INCLUDE = re.compile(r'^\s*include\s+(\w+)')
|
||||
RE_AM_VAR_ADD = re.compile(r'^\s*(\w+)\s*\+=(.*)$')
|
||||
RE_AM_CONTINUING = re.compile(r'\\\s*$')
|
||||
RE_AM_IF = re.compile(r'^\s*if\s+(\w+)')
|
||||
RE_AM_IFNOT = re.compile(r'^\s*if\s!+(\w+)')
|
||||
RE_AM_ELSE = re.compile(r'^\s*else')
|
||||
RE_AM_ENDIF = re.compile(r'^\s*endif')
|
||||
def am_eval(cont):
|
||||
return RE_AM_VAR_REF.sub(lambda x: cur_vars.get(x.group(1), ''), cont)
|
||||
with open(path, 'r') as f:
|
||||
contents = f.readlines()
|
||||
#combine continuing lines
|
||||
i = 0
|
||||
ncont = []
|
||||
while i < len(contents):
|
||||
line = contents[i]
|
||||
if RE_AM_CONTINUING.search(line):
|
||||
line = RE_AM_CONTINUING.sub('', line)
|
||||
j = i + 1
|
||||
while j < len(contents) and RE_AM_CONTINUING.search(contents[j]):
|
||||
line += RE_AM_CONTINUING.sub('', contents[j])
|
||||
j += 1
|
||||
else:
|
||||
if j < len(contents):
|
||||
line += contents[j]
|
||||
i = j
|
||||
else:
|
||||
i += 1
|
||||
ncont.append(line)
|
||||
|
||||
#include, var define, var evaluation
|
||||
i = -1
|
||||
skip = False
|
||||
oldskip = []
|
||||
while i < len(ncont) - 1:
|
||||
i += 1
|
||||
line = ncont[i]
|
||||
mo = RE_AM_IF.search(line)
|
||||
if mo:
|
||||
oldskip.append(skip)
|
||||
skip = False if mo.group(1) in conds and conds[mo.group(1)] \
|
||||
else True
|
||||
continue
|
||||
mo = RE_AM_IFNOT.search(line)
|
||||
if mo:
|
||||
oldskip.append(skip)
|
||||
skip = False if mo.group(1) not in conds and conds[mo.group(1)] \
|
||||
else True
|
||||
continue
|
||||
mo = RE_AM_ELSE.search(line)
|
||||
if mo:
|
||||
skip = not skip
|
||||
continue
|
||||
mo = RE_AM_ENDIF.search(line)
|
||||
if mo:
|
||||
if oldskip:
|
||||
skip = oldskip.pop()
|
||||
continue
|
||||
if not skip:
|
||||
mo = RE_AM_INCLUDE.search(line)
|
||||
if mo:
|
||||
cur_vars.update(read_vars_from_AM(am_eval(mo.group(1)), cur_vars, conds, None))
|
||||
continue
|
||||
mo = RE_AM_VAR.search(line)
|
||||
if mo:
|
||||
cur_vars[mo.group(1)] = am_eval(mo.group(2).strip())
|
||||
continue
|
||||
mo = RE_AM_VAR_ADD.search(line)
|
||||
if mo:
|
||||
try:
|
||||
cur_vars[mo.group(1)] += ' '
|
||||
except KeyError:
|
||||
cur_vars[mo.group(1)] = ''
|
||||
cur_vars[mo.group(1)] += am_eval(mo.group(2).strip())
|
||||
continue
|
||||
|
||||
#filter:
|
||||
if filters != None:
|
||||
ret = {}
|
||||
for i in filters:
|
||||
ret[i] = cur_vars.get(i, '')
|
||||
return ret
|
||||
else:
|
||||
return cur_vars
|
||||
|
||||
def process_include(src, dest, includes):
|
||||
RE_INCLUDE = re.compile(r'^\s*#include\s+"(.*)"')
|
||||
with open(src, 'r') as s:
|
||||
with open(dest, 'w') as d:
|
||||
for i in s:
|
||||
mo = RE_INCLUDE.search(i)
|
||||
if mo:
|
||||
target = ''
|
||||
for j in includes:
|
||||
#print "searching in ", j
|
||||
if mo.group(1) in os.listdir(j):
|
||||
target = os.path.join(j, mo.group(1))
|
||||
break
|
||||
if not target:
|
||||
raise Exception("Couldn't find include file %s" % mo.group(1))
|
||||
else:
|
||||
with open(target, 'r') as t:
|
||||
for inc in t.readlines():
|
||||
d.write(inc)
|
||||
else:
|
||||
d.write(i)
|
||||
|
||||
#Generate the source files listing that is used
|
||||
def generate_src_list (srcroot, srcdir, filters_src, filter_conds, filter_c, mk_am_file):
|
||||
mkfile = ''
|
||||
if mk_am_file is None or mk_am_file == '':
|
||||
mkfile = 'Makefile.am'
|
||||
else:
|
||||
mkfile = mk_am_file
|
||||
vars = read_vars_from_AM(os.path.join(srcdir, mkfile),
|
||||
vars = {'top_srcdir': srcroot},
|
||||
conds = filter_conds,
|
||||
filters = filters_src)
|
||||
files = []
|
||||
for src_filters_item in filters_src:
|
||||
files += vars[src_filters_item].split()
|
||||
if filter_c is True:
|
||||
sources = [i for i in files if i.endswith('.c') ]
|
||||
return sources
|
||||
else:
|
||||
return files
|
||||
|
||||
# Generate the Visual Studio 2008 Project Files from the templates
|
||||
def gen_vs9_project (projname, srcroot, srcdir_name, sources_list):
|
||||
vs_file_list_dir = os.path.join (srcroot, 'build', 'win32')
|
||||
|
||||
with open (os.path.join (vs_file_list_dir,
|
||||
projname + '.sourcefiles'), 'w') as vs9srclist:
|
||||
for i in sources_list:
|
||||
vs9srclist.write ('\t\t\t<File RelativePath="..\\..\\..\\' + srcdir_name + '\\' + i.replace('/', '\\') + '" />\n')
|
||||
|
||||
process_include (os.path.join(srcroot, 'build', 'win32', 'vs9', projname + '.vcprojin'),
|
||||
os.path.join(srcroot, 'build', 'win32', 'vs9', projname + '.vcproj'),
|
||||
includes = [vs_file_list_dir])
|
||||
|
||||
os.unlink(os.path.join(srcroot, 'build', 'win32', projname + '.sourcefiles'))
|
||||
|
||||
# Generate the Visual Studio 2010 Project Files from the templates
|
||||
def gen_vs10_project (projname, srcroot, srcdir_name, sources_list):
|
||||
vs_file_list_dir = os.path.join (srcroot, 'build', 'win32')
|
||||
|
||||
with open (os.path.join (vs_file_list_dir,
|
||||
projname + '.vs10.sourcefiles'), 'w') as vs10srclist:
|
||||
for j in sources_list:
|
||||
vs10srclist.write (' <ClCompile Include="..\\..\\..\\' + srcdir_name + '\\' + j.replace('/', '\\') + '" />\n')
|
||||
|
||||
with open (os.path.join (vs_file_list_dir,
|
||||
projname + '.vs10.sourcefiles.filters'), 'w') as vs10srclist_filter:
|
||||
for k in sources_list:
|
||||
vs10srclist_filter.write (' <ClCompile Include="..\\..\\..\\' + srcdir_name + '\\' + k.replace('/', '\\') + '"><Filter>Source Files</Filter></ClCompile>\n')
|
||||
|
||||
process_include (os.path.join(srcroot, 'build', 'win32', 'vs10', projname + '.vcxprojin'),
|
||||
os.path.join(srcroot, 'build', 'win32', 'vs10', projname + '.vcxproj'),
|
||||
includes = [vs_file_list_dir])
|
||||
process_include (os.path.join(srcroot, 'build', 'win32', 'vs10', projname + '.vcxproj.filtersin'),
|
||||
os.path.join(srcroot, 'build', 'win32', 'vs10', projname + '.vcxproj.filters'),
|
||||
includes = [vs_file_list_dir])
|
||||
|
||||
os.unlink(os.path.join(srcroot, 'build', 'win32', projname + '.vs10.sourcefiles'))
|
||||
os.unlink(os.path.join(srcroot, 'build', 'win32', projname + '.vs10.sourcefiles.filters'))
|
||||
|
||||
def gen_vs_inst_list (projname, srcroot, srcdirs, inst_lists, destdir_names, isVS9):
|
||||
vs_file_list_dir = os.path.join (srcroot, 'build', 'win32')
|
||||
vsver = ''
|
||||
vsprops_line_ending = ''
|
||||
vsprops_file_ext = ''
|
||||
if isVS9 is True:
|
||||
vsver = '9'
|
||||
vsprops_line_ending = '
\n'
|
||||
vsprops_file_ext = '.vsprops'
|
||||
else:
|
||||
vsver = '10'
|
||||
vsprops_line_ending = '\n\n'
|
||||
vsprops_file_ext = '.props'
|
||||
|
||||
with open (os.path.join (vs_file_list_dir,
|
||||
projname + '.vs' + vsver + 'instfiles'), 'w') as vsinstlist:
|
||||
|
||||
for file_list, srcdir, dir_name in zip (inst_lists, srcdirs, destdir_names):
|
||||
for i in file_list:
|
||||
vsinstlist.write ('copy ..\\..\\..\\' +
|
||||
srcdir + '\\' +
|
||||
i.replace ('/', '\\') +
|
||||
' $(CopyDir)\\' +
|
||||
dir_name +
|
||||
vsprops_line_ending)
|
||||
process_include (os.path.join(srcroot, 'build', 'win32', 'vs' + vsver, projname + '-install' + vsprops_file_ext + 'in'),
|
||||
os.path.join(srcroot, 'build', 'win32', 'vs' + vsver, projname + '-install' + vsprops_file_ext),
|
||||
includes = [vs_file_list_dir])
|
||||
|
||||
os.unlink(os.path.join (vs_file_list_dir, projname + '.vs' + vsver + 'instfiles'))
|
||||
|
||||
def generate_nmake_makefiles(srcroot, srcdir, base_name, makefile_name, progs_list):
|
||||
file_list_dir = os.path.join (srcroot, 'build', 'win32')
|
||||
|
||||
with open (os.path.join (file_list_dir,
|
||||
base_name + '_progs'), 'w') as proglist:
|
||||
for i in progs_list:
|
||||
proglist.write ('\t' + i + '$(EXEEXT)\t\\\n')
|
||||
|
||||
|
||||
process_include (os.path.join(srcdir, makefile_name + 'in'),
|
||||
os.path.join(srcdir, makefile_name),
|
||||
includes = [file_list_dir])
|
||||
|
||||
os.unlink(os.path.join (file_list_dir, base_name + '_progs'))
|
||||
|
@@ -1,45 +1,13 @@
|
||||
include $(top_srcdir)/Makefile.decl
|
||||
|
||||
if HAVE_INTROSPECTION
|
||||
GENERATED_ITEMS = \
|
||||
introspection.body.mak \
|
||||
Gdk_3_0_gir_list \
|
||||
GdkWin32_3_0_gir_list \
|
||||
Gtk_3_0_gir_list
|
||||
|
||||
MSVC_INTROSPECTION_INTERMEDIATE_FILES = Gdk-3.0.gir.msvc.introspect GdkWin32-3.0.gir.msvc.introspect Gtk-3.0.gir.msvc.introspect
|
||||
|
||||
introspection.body.mak: $(MSVC_INTROSPECTION_INTERMEDIATE_FILES)
|
||||
-$(RM) introspection.body.mak
|
||||
for F in `ls *.msvc.introspect`; do \
|
||||
case $$F in \
|
||||
*) cat $(top_builddir)/build/win32/$$F >>introspection.body.mak \
|
||||
;; \
|
||||
esac; \
|
||||
done
|
||||
$(RM) $(MSVC_INTROSPECTION_INTERMEDIATE_FILES)
|
||||
|
||||
DISTCLEANFILES = $(GENERATED_ITEMS)
|
||||
|
||||
else
|
||||
GENERATED_ITEMS =
|
||||
DISTCLEANFILES =
|
||||
endif
|
||||
|
||||
SUBDIRS = \
|
||||
crypt \
|
||||
vs9 \
|
||||
vs10 \
|
||||
vs11 \
|
||||
vs12 \
|
||||
vs14
|
||||
|
||||
EXTRA_DIST += \
|
||||
detectenv-msvc.mak \
|
||||
introspection-msvc.mak \
|
||||
gtk-introspection-msvc.mak \
|
||||
replace.py \
|
||||
pc_base.py \
|
||||
gtkpc.py \
|
||||
$(GENERATED_ITEMS)
|
||||
EXTRA_DIST += process-in-win32.py
|
||||
|
||||
-include $(top_srcdir)/git.mk
|
||||
|
7
build/win32/crypt/Makefile.am
Normal file
7
build/win32/crypt/Makefile.am
Normal file
@@ -0,0 +1,7 @@
|
||||
include $(top_srcdir)/Makefile.decl
|
||||
|
||||
EXTRA_DIST += \
|
||||
crypt.h \
|
||||
crypt3.c
|
||||
|
||||
-include $(top_srcdir)/git.mk
|
32
build/win32/crypt/crypt.h
Normal file
32
build/win32/crypt/crypt.h
Normal file
@@ -0,0 +1,32 @@
|
||||
/**************************************************************************
|
||||
* Unix-like crypt(3) Algorithm for Password Encryption
|
||||
*
|
||||
* File : crypt3.h
|
||||
* Purpose : Provides crypt(3) prototypes to ANSI C compilers
|
||||
* without a need for the crypt library.
|
||||
* Author : Fan, Chun-wei
|
||||
* Date : June 24, 2013
|
||||
*
|
||||
* I am releasing the source that I have provided into public
|
||||
* domain without any restrictions, warranties, or copyright
|
||||
* claims of my own.
|
||||
*
|
||||
***************************************************************************/
|
||||
|
||||
#ifndef __ANSI_CRYPT_H__
|
||||
#define __ANSI_CRYPT_H__
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C"
|
||||
{
|
||||
#endif
|
||||
|
||||
void encrypt (char *block, int edflag);
|
||||
void setkey (char *key);
|
||||
char* crypt (const char *key, const char *salt);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* __ANSI_CRYPT_H__ */
|
460
build/win32/crypt/crypt3.c
Normal file
460
build/win32/crypt/crypt3.c
Normal file
@@ -0,0 +1,460 @@
|
||||
/**************************************************************************
|
||||
* Unix-like crypt(3) Algorithm for Password Encryption
|
||||
*
|
||||
* File : crypt3.c
|
||||
* Purpose : Provides crypt(3) functionality to ANSI C compilers
|
||||
* without a need for the crypt library.
|
||||
* Author : Michael Dipperstein
|
||||
* Date : November 3, 1998
|
||||
*
|
||||
***************************************************************************
|
||||
* The source in this file is heavily borrowed from the crypt3.c file
|
||||
* found on several ftp sites on the Internet. The original source
|
||||
* claimed to be BSD, but was not distributed with any BSD license or
|
||||
* copyright claims. I am releasing the source that I have provided into
|
||||
* public domain without any restrictions, warranties, or copyright
|
||||
* claims of my own.
|
||||
*
|
||||
* The code below has been cleaned and compiles correctly under, gcc,
|
||||
* lcc, and Borland's bcc C compilers. A bug involving the left and
|
||||
* right halves of the encrypted data block in the widely published
|
||||
* crypt3.c source has been fixed by this version. All implicit register
|
||||
* declarations have been removed, because they generated suboptimal code.
|
||||
* All constant data has been explicitly declared as const and all
|
||||
* declarations have been given a minimal scope, because I'm paranoid.
|
||||
*
|
||||
* Caution: crypt() returns a pointer to static data. I left it this way
|
||||
* to maintain backward compatibility. The downside is that
|
||||
* successive calls will cause previous results to be lost.
|
||||
* This can easily be changed with only minor modifications to
|
||||
* the function crypt().
|
||||
**************************************************************************/
|
||||
|
||||
/* Initial permutation */
|
||||
static const char IP[] =
|
||||
{
|
||||
58, 50, 42, 34, 26, 18, 10, 2,
|
||||
60, 52, 44, 36, 28, 20, 12, 4,
|
||||
62, 54, 46, 38, 30, 22, 14, 6,
|
||||
64, 56, 48, 40, 32, 24, 16, 8,
|
||||
57, 49, 41, 33, 25, 17, 9, 1,
|
||||
59, 51, 43, 35, 27, 19, 11, 3,
|
||||
61, 53, 45, 37, 29, 21, 13, 5,
|
||||
63, 55, 47, 39, 31, 23, 15, 7,
|
||||
};
|
||||
|
||||
/* Final permutation, FP = IP^(-1) */
|
||||
static const char FP[] = {
|
||||
40, 8, 48, 16, 56, 24, 64, 32,
|
||||
39, 7, 47, 15, 55, 23, 63, 31,
|
||||
38, 6, 46, 14, 54, 22, 62, 30,
|
||||
37, 5, 45, 13, 53, 21, 61, 29,
|
||||
36, 4, 44, 12, 52, 20, 60, 28,
|
||||
35, 3, 43, 11, 51, 19, 59, 27,
|
||||
34, 2, 42, 10, 50, 18, 58, 26,
|
||||
33, 1, 41, 9, 49, 17, 57, 25,
|
||||
};
|
||||
|
||||
/**************************************************************************
|
||||
* Permuted-choice 1 from the key bits to yield C and D.
|
||||
* Note that bits 8,16... are left out:
|
||||
* They are intended for a parity check.
|
||||
**************************************************************************/
|
||||
static const char PC1_C[] =
|
||||
{
|
||||
57, 49, 41, 33, 25, 17, 9,
|
||||
1, 58, 50, 42, 34, 26, 18,
|
||||
10, 2, 59, 51, 43, 35, 27,
|
||||
19, 11, 3, 60, 52, 44, 36,
|
||||
};
|
||||
|
||||
static const char PC1_D[] =
|
||||
{
|
||||
63, 55, 47, 39, 31, 23, 15,
|
||||
7, 62, 54, 46, 38, 30, 22,
|
||||
14, 6, 61, 53, 45, 37, 29,
|
||||
21, 13, 5, 28, 20, 12, 4,
|
||||
};
|
||||
|
||||
/* Sequence of shifts used for the key schedule. */
|
||||
static const char shifts[] =
|
||||
{1, 1, 2, 2, 2, 2, 2, 2, 1, 2, 2, 2, 2, 2, 2, 1};
|
||||
|
||||
/**************************************************************************
|
||||
* Permuted-choice 2, to pick out the bits from the CD array that generate
|
||||
* the key schedule.
|
||||
**************************************************************************/
|
||||
static const char PC2_C[] =
|
||||
{
|
||||
14, 17, 11, 24, 1, 5,
|
||||
3, 28, 15, 6, 21, 10,
|
||||
23, 19, 12, 4, 26, 8,
|
||||
16, 7, 27, 20, 13, 2,
|
||||
};
|
||||
|
||||
static const char PC2_D[] =
|
||||
{
|
||||
41, 52, 31, 37, 47, 55,
|
||||
30, 40, 51, 45, 33, 48,
|
||||
44, 49, 39, 56, 34, 53,
|
||||
46, 42, 50, 36, 29, 32,
|
||||
};
|
||||
|
||||
/* The C and D arrays used to calculate the key schedule. */
|
||||
static char C[28];
|
||||
static char D[28];
|
||||
|
||||
/* The key schedule. Generated from the key. */
|
||||
static char KS[16][48];
|
||||
|
||||
/* The E bit-selection table. */
|
||||
static char E[48];
|
||||
static const char e2[] =
|
||||
{
|
||||
32, 1, 2, 3, 4, 5,
|
||||
4, 5, 6, 7, 8, 9,
|
||||
8, 9, 10, 11, 12, 13,
|
||||
12, 13, 14, 15, 16, 17,
|
||||
16, 17, 18, 19, 20, 21,
|
||||
20, 21, 22, 23, 24, 25,
|
||||
24, 25, 26, 27, 28, 29,
|
||||
28, 29, 30, 31, 32, 1,
|
||||
};
|
||||
|
||||
/**************************************************************************
|
||||
* Function: setkey
|
||||
*
|
||||
* Description: Set up the key schedule from the encryption key.
|
||||
*
|
||||
* Inputs: char *key
|
||||
* pointer to 64 character array. Each character represents a
|
||||
* bit in the key.
|
||||
*
|
||||
* Returns: none
|
||||
**************************************************************************/
|
||||
void setkey(char *key)
|
||||
{
|
||||
int i, j, k, temp;
|
||||
|
||||
/**********************************************************************
|
||||
* First, generate C and D by permuting the key. The low order bit of
|
||||
* each 8-bit char is not used, so C and D are only 28 bits apiece.
|
||||
**********************************************************************/
|
||||
for(i = 0; i < 28; i++)
|
||||
{
|
||||
C[i] = key[PC1_C[i] - 1];
|
||||
D[i] = key[PC1_D[i] - 1];
|
||||
}
|
||||
|
||||
/**********************************************************************
|
||||
* To generate Ki, rotate C and D according to schedule and pick up a
|
||||
* permutation using PC2.
|
||||
**********************************************************************/
|
||||
for(i = 0; i < 16; i++)
|
||||
{
|
||||
/* rotate */
|
||||
for(k = 0; k < shifts[i]; k++)
|
||||
{
|
||||
temp = C[0];
|
||||
|
||||
for(j = 0; j < 28 - 1; j++)
|
||||
C[j] = C[j+1];
|
||||
|
||||
C[27] = temp;
|
||||
temp = D[0];
|
||||
for(j = 0; j < 28 - 1; j++)
|
||||
D[j] = D[j+1];
|
||||
|
||||
D[27] = temp;
|
||||
}
|
||||
|
||||
/* get Ki. Note C and D are concatenated */
|
||||
for(j = 0; j < 24; j++)
|
||||
{
|
||||
KS[i][j] = C[PC2_C[j] - 1];
|
||||
KS[i][j + 24] = D[PC2_D[j] - 28 -1];
|
||||
}
|
||||
}
|
||||
|
||||
/* load E with the initial E bit selections */
|
||||
for(i=0; i < 48; i++)
|
||||
E[i] = e2[i];
|
||||
}
|
||||
|
||||
/**************************************************************************
|
||||
* The 8 selection functions. For some reason, they give a 0-origin
|
||||
* index, unlike everything else.
|
||||
**************************************************************************/
|
||||
|
||||
static const char S[8][64] =
|
||||
{
|
||||
{
|
||||
14, 4, 13, 1, 2, 15, 11, 8, 3, 10, 6, 12, 5, 9, 0, 7,
|
||||
0, 15, 7, 4, 14, 2, 13, 1, 10, 6, 12, 11, 9, 5, 3, 8,
|
||||
4, 1, 14, 8, 13, 6, 2, 11, 15, 12, 9, 7, 3, 10, 5, 0,
|
||||
15, 12, 8, 2, 4, 9, 1, 7, 5, 11, 3, 14, 10, 0, 6, 13
|
||||
},
|
||||
|
||||
{
|
||||
15, 1, 8, 14, 6, 11, 3, 4, 9, 7, 2, 13, 12, 0, 5, 10,
|
||||
3, 13, 4, 7, 15, 2, 8, 14, 12, 0, 1, 10, 6, 9, 11, 5,
|
||||
0, 14, 7, 11, 10, 4, 13, 1, 5, 8, 12, 6, 9, 3, 2, 15,
|
||||
13, 8, 10, 1, 3, 15, 4, 2, 11, 6, 7, 12, 0, 5, 14, 9
|
||||
},
|
||||
|
||||
{
|
||||
10, 0, 9, 14, 6, 3, 15, 5, 1, 13, 12, 7, 11, 4, 2, 8,
|
||||
13, 7, 0, 9, 3, 4, 6, 10, 2, 8, 5, 14, 12, 11, 15, 1,
|
||||
13, 6, 4, 9, 8, 15, 3, 0, 11, 1, 2, 12, 5, 10, 14, 7,
|
||||
1, 10, 13, 0, 6, 9, 8, 7, 4, 15, 14, 3, 11, 5, 2, 12
|
||||
},
|
||||
|
||||
{
|
||||
7, 13, 14, 3, 0, 6, 9, 10, 1, 2, 8, 5, 11, 12, 4, 15,
|
||||
13, 8, 11, 5, 6, 15, 0, 3, 4, 7, 2, 12, 1, 10, 14, 9,
|
||||
10, 6, 9, 0, 12, 11, 7, 13, 15, 1, 3, 14, 5, 2, 8, 4,
|
||||
3, 15, 0, 6, 10, 1, 13, 8, 9, 4, 5, 11, 12, 7, 2, 14
|
||||
},
|
||||
|
||||
{
|
||||
2, 12, 4, 1, 7, 10, 11, 6, 8, 5, 3, 15, 13, 0, 14, 9,
|
||||
14, 11, 2, 12, 4, 7, 13, 1, 5, 0, 15, 10, 3, 9, 8, 6,
|
||||
4, 2, 1, 11, 10, 13, 7, 8, 15, 9, 12, 5, 6, 3, 0, 14,
|
||||
11, 8, 12, 7, 1, 14, 2, 13, 6, 15, 0, 9, 10, 4, 5, 3
|
||||
},
|
||||
|
||||
{
|
||||
12, 1, 10, 15, 9, 2, 6, 8, 0, 13, 3, 4, 14, 7, 5, 11,
|
||||
10, 15, 4, 2, 7, 12, 9, 5, 6, 1, 13, 14, 0, 11, 3, 8,
|
||||
9, 14, 15, 5, 2, 8, 12, 3, 7, 0, 4, 10, 1, 13, 11, 6,
|
||||
4, 3, 2, 12, 9, 5, 15, 10, 11, 14, 1, 7, 6, 0, 8, 13
|
||||
},
|
||||
|
||||
{
|
||||
4, 11, 2, 14, 15, 0, 8, 13, 3, 12, 9, 7, 5, 10, 6, 1,
|
||||
13, 0, 11, 7, 4, 9, 1, 10, 14, 3, 5, 12, 2, 15, 8, 6,
|
||||
1, 4, 11, 13, 12, 3, 7, 14, 10, 15, 6, 8, 0, 5, 9, 2,
|
||||
6, 11, 13, 8, 1, 4, 10, 7, 9, 5, 0, 15, 14, 2, 3, 12
|
||||
},
|
||||
|
||||
{
|
||||
13, 2, 8, 4, 6, 15, 11, 1, 10, 9, 3, 14, 5, 0, 12, 7,
|
||||
1, 15, 13, 8, 10, 3, 7, 4, 12, 5, 6, 11, 0, 14, 9, 2,
|
||||
7, 11, 4, 1, 9, 12, 14, 2, 0, 6, 10, 13, 15, 3, 5, 8,
|
||||
2, 1, 14, 7, 4, 10, 8, 13, 15, 12, 9, 0, 3, 5, 6, 11
|
||||
}
|
||||
};
|
||||
|
||||
/**************************************************************************
|
||||
* P is a permutation on the selected combination of the current L and key.
|
||||
**************************************************************************/
|
||||
static const char P[] =
|
||||
{
|
||||
16, 7, 20, 21,
|
||||
29, 12, 28, 17,
|
||||
1, 15, 23, 26,
|
||||
5, 18, 31, 10,
|
||||
2, 8, 24, 14,
|
||||
32, 27, 3, 9,
|
||||
19, 13, 30, 6,
|
||||
22, 11, 4, 25,
|
||||
};
|
||||
|
||||
/* The combination of the key and the input, before selection. */
|
||||
static char preS[48];
|
||||
|
||||
/**************************************************************************
|
||||
* Function: encrypt
|
||||
*
|
||||
* Description: Uses DES to encrypt a 64 bit block of data. Requires
|
||||
* setkey to be invoked with the encryption key before it may
|
||||
* be used. The results of the encryption are stored in block.
|
||||
*
|
||||
* Inputs: char *block
|
||||
* pointer to 64 character array. Each character represents a
|
||||
* bit in the data block.
|
||||
*
|
||||
* Returns: none
|
||||
**************************************************************************/
|
||||
void encrypt(char *block)
|
||||
{
|
||||
int i, ii, temp, j, k;
|
||||
|
||||
char left[32], right[32]; /* block in two halves */
|
||||
char old[32];
|
||||
char f[32];
|
||||
|
||||
/* First, permute the bits in the input */
|
||||
for(j = 0; j < 32; j++)
|
||||
left[j] = block[IP[j] - 1];
|
||||
|
||||
for(;j < 64; j++)
|
||||
right[j - 32] = block[IP[j] - 1];
|
||||
|
||||
/* Perform an encryption operation 16 times. */
|
||||
for(ii= 0; ii < 16; ii++)
|
||||
{
|
||||
i = ii;
|
||||
/* Save the right array, which will be the new left. */
|
||||
for(j = 0; j < 32; j++)
|
||||
old[j] = right[j];
|
||||
|
||||
/******************************************************************
|
||||
* Expand right to 48 bits using the E selector and
|
||||
* exclusive-or with the current key bits.
|
||||
******************************************************************/
|
||||
for(j =0 ; j < 48; j++)
|
||||
preS[j] = right[E[j] - 1] ^ KS[i][j];
|
||||
|
||||
/******************************************************************
|
||||
* The pre-select bits are now considered in 8 groups of 6 bits ea.
|
||||
* The 8 selection functions map these 6-bit quantities into 4-bit
|
||||
* quantities and the results are permuted to make an f(R, K).
|
||||
* The indexing into the selection functions is peculiar;
|
||||
* it could be simplified by rewriting the tables.
|
||||
******************************************************************/
|
||||
for(j = 0; j < 8; j++)
|
||||
{
|
||||
temp = 6 * j;
|
||||
k = S[j][(preS[temp + 0] << 5) +
|
||||
(preS[temp + 1] << 3) +
|
||||
(preS[temp + 2] << 2) +
|
||||
(preS[temp + 3] << 1) +
|
||||
(preS[temp + 4] << 0) +
|
||||
(preS[temp + 5] << 4)];
|
||||
|
||||
temp = 4 * j;
|
||||
|
||||
f[temp + 0] = (k >> 3) & 01;
|
||||
f[temp + 1] = (k >> 2) & 01;
|
||||
f[temp + 2] = (k >> 1) & 01;
|
||||
f[temp + 3] = (k >> 0) & 01;
|
||||
}
|
||||
|
||||
/******************************************************************
|
||||
* The new right is left ^ f(R, K).
|
||||
* The f here has to be permuted first, though.
|
||||
******************************************************************/
|
||||
for(j = 0; j < 32; j++)
|
||||
right[j] = left[j] ^ f[P[j] - 1];
|
||||
|
||||
/* Finally, the new left (the original right) is copied back. */
|
||||
for(j = 0; j < 32; j++)
|
||||
left[j] = old[j];
|
||||
}
|
||||
|
||||
/* The output left and right are reversed. */
|
||||
for(j = 0; j < 32; j++)
|
||||
{
|
||||
temp = left[j];
|
||||
left[j] = right[j];
|
||||
right[j] = temp;
|
||||
}
|
||||
|
||||
/* The final output gets the inverse permutation of the very original. */
|
||||
for(j = 0; j < 64; j++)
|
||||
{
|
||||
i = FP[j];
|
||||
if (i < 33)
|
||||
block[j] = left[FP[j] - 1];
|
||||
else
|
||||
block[j] = right[FP[j] - 33];
|
||||
}
|
||||
}
|
||||
|
||||
/**************************************************************************
|
||||
* Function: crypt
|
||||
*
|
||||
* Description: Clone of Unix crypt(3) function.
|
||||
*
|
||||
* Inputs: char *pw
|
||||
* pointer to 8 character encryption key (user password)
|
||||
* char *salt
|
||||
* pointer to 2 character salt used to modify the DES results.
|
||||
*
|
||||
* Returns: Pointer to static array containing the salt concatenated
|
||||
* on to the encrypted results. Same as stored in passwd file.
|
||||
**************************************************************************/
|
||||
char *crypt(char *pw, char *salt)
|
||||
{
|
||||
int i, j, temp;
|
||||
char c,
|
||||
block[66]; /* 1st store key, then results */
|
||||
static char iobuf[16]; /* encrypted results */
|
||||
|
||||
for(i = 0; i < 66; i++)
|
||||
block[i] = 0;
|
||||
|
||||
/* break pw into 64 bits */
|
||||
for(i = 0, c = *pw; c && (i < 64); i++)
|
||||
{
|
||||
for(j = 0; j < 7; j++, i++)
|
||||
block[i] = (c >> (6 - j)) & 01;
|
||||
pw++;
|
||||
c = *pw;
|
||||
}
|
||||
|
||||
/* set key based on pw */
|
||||
setkey(block);
|
||||
|
||||
for(i = 0; i < 66; i++)
|
||||
block[i] = 0;
|
||||
|
||||
for(i = 0; i < 2; i++)
|
||||
{
|
||||
/* store salt at beginning of results */
|
||||
c = *salt++;
|
||||
iobuf[i] = c;
|
||||
|
||||
if(c > 'Z')
|
||||
c -= 6;
|
||||
|
||||
if(c > '9')
|
||||
c -= 7;
|
||||
|
||||
c -= '.';
|
||||
|
||||
/* use salt to effect the E-bit selection */
|
||||
for(j = 0; j < 6; j++)
|
||||
{
|
||||
if((c >> j) & 01)
|
||||
{
|
||||
temp = E[6 * i + j];
|
||||
E[6 * i +j] = E[6 * i + j + 24];
|
||||
E[6 * i + j + 24] = temp;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* call DES encryption 25 times using pw as key and initial data = 0 */
|
||||
for(i = 0; i < 25; i++)
|
||||
encrypt(block);
|
||||
|
||||
/* format encrypted block for standard crypt(3) output */
|
||||
for(i=0; i < 11; i++)
|
||||
{
|
||||
c = 0;
|
||||
for(j = 0; j < 6; j++)
|
||||
{
|
||||
c <<= 1;
|
||||
c |= block[6 * i + j];
|
||||
}
|
||||
|
||||
c += '.';
|
||||
if(c > '9')
|
||||
c += 7;
|
||||
|
||||
if(c > 'Z')
|
||||
c += 6;
|
||||
|
||||
iobuf[i + 2] = c;
|
||||
}
|
||||
|
||||
iobuf[i + 2] = '\0';
|
||||
|
||||
/* prevent premature NULL terminator */
|
||||
if(iobuf[1] == '\0')
|
||||
iobuf[1] = iobuf[0];
|
||||
|
||||
return(iobuf);
|
||||
}
|
@@ -1,43 +0,0 @@
|
||||
# NMake Makefile to build Introspection Files for GTK+
|
||||
|
||||
!include detectenv-msvc.mak
|
||||
|
||||
APIVERSION = 3.0
|
||||
|
||||
CHECK_PACKAGE = gdk-pixbuf-2.0 atk pangocairo gio-2.0
|
||||
|
||||
built_install_girs = Gdk-$(APIVERSION).gir GdkWin32-$(APIVERSION).gir Gtk-$(APIVERSION).gir
|
||||
built_install_typelibs = Gdk-$(APIVERSION).typelib GdkWin32-$(APIVERSION).typelib Gtk-$(APIVERSION).typelib
|
||||
|
||||
!include introspection-msvc.mak
|
||||
|
||||
!if "$(BUILD_INTROSPECTION)" == "TRUE"
|
||||
|
||||
!if "$(PLAT)" == "x64"
|
||||
AT_PLAT=x86_64
|
||||
!else
|
||||
AT_PLAT=i686
|
||||
!endif
|
||||
|
||||
all: setgirbuildenv $(built_install_girs) $(built_install_typelibs)
|
||||
|
||||
setgirbuildenv:
|
||||
@set PYTHONPATH=$(PREFIX)\lib\gobject-introspection
|
||||
@set PATH=vs$(VSVER)\$(CFG)\$(PLAT)\bin;$(PREFIX)\bin;$(PATH)
|
||||
@set PKG_CONFIG_PATH=$(PKG_CONFIG_PATH)
|
||||
@set LIB=vs$(VSVER)\$(CFG)\$(PLAT)\bin;$(LIB)
|
||||
|
||||
!include introspection.body.mak
|
||||
|
||||
install-introspection: all
|
||||
@-copy *.gir $(G_IR_INCLUDEDIR)
|
||||
@-copy /b *.typelib $(G_IR_TYPELIBDIR)
|
||||
|
||||
!else
|
||||
all:
|
||||
@-echo $(ERROR_MSG)
|
||||
!endif
|
||||
|
||||
clean:
|
||||
@-del /f/q *.typelib
|
||||
@-del /f/q *.gir
|
@@ -1,97 +0,0 @@
|
||||
#!/usr/bin/python
|
||||
#
|
||||
# Utility script to generate .pc files for GTK+
|
||||
# for Visual Studio builds, to be used for
|
||||
# building introspection files
|
||||
|
||||
# Author: Fan, Chun-wei
|
||||
# Date: April 26, 2016
|
||||
|
||||
import os
|
||||
import sys
|
||||
import argparse
|
||||
|
||||
from replace import replace_multi, replace
|
||||
from pc_base import BasePCItems
|
||||
|
||||
def main(argv):
|
||||
base_pc = BasePCItems()
|
||||
|
||||
gdk_parser = argparse.ArgumentParser(description='Setup basic .pc file info')
|
||||
gdk_parser.add_argument('--broadway',
|
||||
action='store_const',
|
||||
const=1,
|
||||
help='GDK with Broadway backend')
|
||||
gdk_parser.add_argument('--host',
|
||||
required=True,
|
||||
help='Build type')
|
||||
base_pc.setup(argv, gdk_parser)
|
||||
|
||||
atk_min_ver = '2.15.1'
|
||||
cairo_min_ver = '1.14.0'
|
||||
gdk_pixbuf_min_ver = '2.30.0'
|
||||
gdk_win32_sys_libs = '-lgdi32 -limm32 -lshell32 -lole32 -Wl,-luuid -lwinmm -ldwmapi'
|
||||
glib_min_ver = '2.45.8'
|
||||
|
||||
cairo_backends = 'cairo-win32'
|
||||
gdk_backends = 'win32'
|
||||
gio_package = 'gio-2.0 >= ' + glib_min_ver
|
||||
broadway_extra_libs = ''
|
||||
|
||||
gdk_args = gdk_parser.parse_args()
|
||||
if getattr(gdk_args, 'broadway', None) is 1:
|
||||
# On Visual Studio, we link to zlib1.lib
|
||||
broadway_extra_libs = '-lzlib1'
|
||||
gdk_backends += ' broadway'
|
||||
cairo_backends += ' cairo'
|
||||
|
||||
pkg_replace_items = {'@GTK_API_VERSION@': '3.0',
|
||||
'@GDK_BACKENDS@': gdk_backends}
|
||||
|
||||
pkg_required_packages = 'gdk-pixbuf >= ' + gdk_pixbuf_min_ver + ' ' + \
|
||||
'cairo >= ' + cairo_min_ver + ' ' + \
|
||||
'cairo-gobject >= ' + cairo_min_ver
|
||||
|
||||
gdk_pc_replace_items = {'@GDK_PACKAGES@': gio_package + ' ' + \
|
||||
'pangowin32 pangocairo' + ' ' + \
|
||||
pkg_required_packages,
|
||||
'@GDK_PRIVATE_PACKAGES@': gio_package + ' ' + cairo_backends,
|
||||
'@GDK_EXTRA_LIBS@': gdk_win32_sys_libs + broadway_extra_libs,
|
||||
'@GDK_EXTRA_CFLAGS@': '',
|
||||
'gdk-3': 'gdk-3.0'}
|
||||
|
||||
gtk_pc_replace_items = {'@host@': gdk_args.host,
|
||||
'@GTK_BINARY_VERSION@': '3.0.0',
|
||||
'@GTK_PACKAGES@': 'atk >= ' + atk_min_ver + ' ' + \
|
||||
pkg_required_packages + ' ' + \
|
||||
gio_package,
|
||||
'@GTK_PRIVATE_PACKAGES@': 'atk',
|
||||
'@GTK_EXTRA_CFLAGS@': '',
|
||||
'@GTK_EXTRA_LIBS@': '',
|
||||
'@GTK_EXTRA_CFLAGS@': '',
|
||||
'gtk-3': 'gtk-3.0'}
|
||||
|
||||
gail_pc_replace_items = {'gailutil-3': 'gailutil-3.0'}
|
||||
|
||||
pkg_replace_items.update(base_pc.base_replace_items)
|
||||
gdk_pc_replace_items.update(pkg_replace_items)
|
||||
gtk_pc_replace_items.update(pkg_replace_items)
|
||||
gail_pc_replace_items.update(base_pc.base_replace_items)
|
||||
|
||||
# Generate gdk-3.0.pc
|
||||
replace_multi(base_pc.top_srcdir + '/gdk-3.0.pc.in',
|
||||
base_pc.srcdir + '/gdk-3.0.pc',
|
||||
gdk_pc_replace_items)
|
||||
|
||||
# Generate gtk+-3.0.pc
|
||||
replace_multi(base_pc.top_srcdir + '/gtk+-3.0.pc.in',
|
||||
base_pc.srcdir + '/gtk+-3.0.pc',
|
||||
gtk_pc_replace_items)
|
||||
|
||||
# Generate gail-3.0.pc
|
||||
replace_multi(base_pc.top_srcdir + '/gail-3.0.pc.in',
|
||||
base_pc.srcdir + '/gail-3.0.pc',
|
||||
gail_pc_replace_items)
|
||||
|
||||
if __name__ == '__main__':
|
||||
sys.exit(main(sys.argv))
|
@@ -1,94 +0,0 @@
|
||||
# Common NMake Makefile module for checking the build environment is sane
|
||||
# for building introspection files under MSVC/NMake.
|
||||
# This can be copied from $(gi_srcroot)\build\win32 for GNOME items
|
||||
# that support MSVC builds and introspection under MSVC.
|
||||
|
||||
# Can override with env vars as needed
|
||||
# You will need to have built gobject-introspection for this to work.
|
||||
# Change or pass in or set the following to suit your environment
|
||||
|
||||
!if "$(PREFIX)" == ""
|
||||
PREFIX = ..\..\..\vs$(VSVER)\$(PLAT)
|
||||
!endif
|
||||
|
||||
!if ![setlocal] && \
|
||||
![set PFX=$(PREFIX)] && \
|
||||
![for %P in (%PFX%) do @echo PREFIX_FULL=%~dpnfP > pfx.x]
|
||||
!endif
|
||||
!include pfx.x
|
||||
|
||||
!if "$(PKG_CONFIG_PATH)" == ""
|
||||
PKG_CONFIG_PATH=$(PREFIX_FULL)\lib\pkgconfig
|
||||
!else
|
||||
PKG_CONFIG_PATH=$(PREFIX_FULL)\lib\pkgconfig;$(PKG_CONFIG_PATH)
|
||||
!endif
|
||||
|
||||
!if ![del $(ERRNUL) /q/f pfx.x]
|
||||
!endif
|
||||
|
||||
# Note: The PYTHON must be the Python release series that was used to build
|
||||
# the GObject-introspection scanner Python module!
|
||||
# Either having python.exe your PATH will work or passing in
|
||||
# PYTHON=<full path to your Python interpretor> will do
|
||||
|
||||
# This is required, and gobject-introspection needs to be built
|
||||
# before this can be successfully run.
|
||||
!if "$(PYTHON)" == ""
|
||||
PYTHON=python
|
||||
!endif
|
||||
|
||||
# Path to the pkg-config tool, if not already in the PATH
|
||||
!if "$(PKG_CONFIG)" == ""
|
||||
PKG_CONFIG=pkg-config
|
||||
!endif
|
||||
|
||||
# Don't change anything following this line!
|
||||
|
||||
GIR_SUBDIR = share\gir-1.0
|
||||
GIR_TYPELIBDIR = lib\girepository-1.0
|
||||
G_IR_SCANNER = $(PREFIX)\bin\g-ir-scanner
|
||||
G_IR_COMPILER = $(PREFIX)\bin\g-ir-compiler.exe
|
||||
G_IR_INCLUDEDIR = $(PREFIX)\$(GIR_SUBDIR)
|
||||
G_IR_TYPELIBDIR = $(PREFIX)\$(GIR_TYPELIBDIR)
|
||||
|
||||
VALID_PKG_CONFIG_PATH = FALSE
|
||||
|
||||
MSG_INVALID_PKGCONFIG = You must set or specifiy a valid PKG_CONFIG_PATH
|
||||
MSG_INVALID_CFG = You need to specify or set CFG to be release or debug to use this Makefile to build the Introspection Files
|
||||
|
||||
ERROR_MSG =
|
||||
|
||||
BUILD_INTROSPECTION = TRUE
|
||||
|
||||
!if ![set PKG_CONFIG_PATH=$(PKG_CONFIG_PATH)] \
|
||||
&& ![$(PKG_CONFIG) --print-errors --errors-to-stdout $(CHECK_PACKAGE) > pkgconfig.x] \
|
||||
&& ![setlocal] \
|
||||
&& ![set file="pkgconfig.x"] \
|
||||
&& ![FOR %A IN (%file%) DO @echo PKG_CHECK_SIZE=%~zA > pkgconfig.chksize] \
|
||||
&& ![del $(ERRNUL) /q/f pkgconfig.x]
|
||||
!endif
|
||||
|
||||
!include pkgconfig.chksize
|
||||
!if "$(PKG_CHECK_SIZE)" == "0"
|
||||
VALID_PKG_CONFIG_PATH = TRUE
|
||||
!else
|
||||
VALID_PKG_CONFIG_PATH = FALSE
|
||||
!endif
|
||||
|
||||
!if ![del $(ERRNUL) /q/f pkgconfig.chksize]
|
||||
!endif
|
||||
|
||||
VALID_CFGSET = FALSE
|
||||
!if "$(CFG)" == "release" || "$(CFG)" == "debug" || "$(CFG)" == "Release" || "$(CFG)" == "Debug"
|
||||
VALID_CFGSET = TRUE
|
||||
!endif
|
||||
|
||||
!if "$(VALID_PKG_CONFIG_PATH)" != "TRUE"
|
||||
BUILD_INTROSPECTION = FALSE
|
||||
ERROR_MSG = $(MSG_INVALID_PKGCONFIG)
|
||||
!endif
|
||||
|
||||
!if "$(VALID_CFGSET)" != "TRUE"
|
||||
BUILD_INTROSPECTION = FALSE
|
||||
ERROR_MSG = $(MSG_INVALID_CFG)
|
||||
!endif
|
@@ -1,108 +0,0 @@
|
||||
#!/usr/bin/python
|
||||
#
|
||||
# Simple utility script to generate the basic info
|
||||
# needed in a .pc (pkg-config) file, used especially
|
||||
# for introspection purposes
|
||||
|
||||
# This can be used in various projects where
|
||||
# there is the need to generate .pc files,
|
||||
# and is copied from GLib's $(srcroot)/build/win32
|
||||
|
||||
# Author: Fan, Chun-wei
|
||||
# Date: March 10, 2016
|
||||
|
||||
import os
|
||||
import sys
|
||||
import argparse
|
||||
|
||||
class BasePCItems:
|
||||
def __init__(self):
|
||||
self.base_replace_items = {}
|
||||
self.exec_prefix = ''
|
||||
self.includedir = ''
|
||||
self.libdir = ''
|
||||
self.prefix = ''
|
||||
self.srcdir = os.path.dirname(__file__)
|
||||
self.top_srcdir = self.srcdir + '\\..\\..'
|
||||
self.version = ''
|
||||
|
||||
def setup(self, argv, parser=None):
|
||||
if parser is None:
|
||||
parser = argparse.ArgumentParser(description='Setup basic .pc file info')
|
||||
parser.add_argument('--prefix', help='prefix of the installed library',
|
||||
required=True)
|
||||
parser.add_argument('--exec-prefix',
|
||||
help='prefix of the installed programs, \
|
||||
if different from the prefix')
|
||||
parser.add_argument('--includedir',
|
||||
help='includedir of the installed library, \
|
||||
if different from ${prefix}/include')
|
||||
parser.add_argument('--libdir',
|
||||
help='libdir of the installed library, \
|
||||
if different from ${prefix}/lib')
|
||||
parser.add_argument('--version', help='Version of the package',
|
||||
required=True)
|
||||
args = parser.parse_args()
|
||||
|
||||
self.version = args.version
|
||||
|
||||
# check whether the prefix and exec_prefix are valid
|
||||
if not os.path.exists(args.prefix):
|
||||
raise SystemExit('Specified prefix \'%s\' is invalid' % args.prefix)
|
||||
|
||||
# check and setup the exec_prefix
|
||||
if getattr(args, 'exec_prefix', None) is None:
|
||||
input_exec_prefix = args.prefix
|
||||
else:
|
||||
input_exec_prefix = args.exec_prefix
|
||||
if not os.path.exists(input_exec_prefix):
|
||||
raise SystemExit('Specified exec-prefix \'%s\' is invalid' %
|
||||
input_exec_prefix)
|
||||
|
||||
|
||||
# check and setup the includedir
|
||||
if getattr(args, 'includedir', None) is None:
|
||||
self.includedir = '${prefix}/include'
|
||||
else:
|
||||
if args.includedir.startswith('${prefix}'):
|
||||
includedir_use_shorthand = True
|
||||
input_includedir = args.prefix + args.includedir[len('${prefix}'):]
|
||||
else:
|
||||
includedir_use_shorthand = False
|
||||
input_includedir = args.includedir
|
||||
if not os.path.exists(input_includedir):
|
||||
raise SystemExit('Specified includedir \'%s\' is invalid' %
|
||||
args.includedir)
|
||||
if includedir_use_shorthand is True:
|
||||
self.includedir = args.includedir.replace('\\','/')
|
||||
else:
|
||||
self.includedir = os.path.abspath(input_includedir).replace('\\','/')
|
||||
|
||||
# check and setup the libdir
|
||||
if getattr(args, 'libdir', None) is None:
|
||||
self.libdir = '${prefix}/lib'
|
||||
else:
|
||||
if args.libdir.startswith('${prefix}'):
|
||||
libdir_use_shorthand = True
|
||||
input_libdir = args.prefix + args.libdir[len('${prefix}'):]
|
||||
else:
|
||||
libdir_use_shorthand = False
|
||||
input_libdir = args.libdir
|
||||
if not os.path.exists(input_libdir):
|
||||
raise SystemExit('Specified libdir \'%s\' is invalid' %
|
||||
args.libdir)
|
||||
if libdir_use_shorthand is True:
|
||||
self.libdir = args.libdir.replace('\\','/')
|
||||
else:
|
||||
self.libdir = os.path.abspath(input_libdir).replace('\\','/')
|
||||
|
||||
# use absolute paths for prefix and exec_prefix
|
||||
self.prefix = os.path.abspath(args.prefix).replace('\\','/')
|
||||
self.exec_prefix = os.path.abspath(input_exec_prefix).replace('\\','/')
|
||||
|
||||
# setup dictionary for replacing items in *.pc.in
|
||||
self.base_replace_items.update({'@VERSION@': self.version})
|
||||
self.base_replace_items.update({'@prefix@': self.prefix})
|
||||
self.base_replace_items.update({'@exec_prefix@': self.exec_prefix})
|
||||
self.base_replace_items.update({'@libdir@': self.libdir})
|
||||
self.base_replace_items.update({'@includedir@': self.includedir})
|
109
build/win32/process-in-win32.py
Normal file
109
build/win32/process-in-win32.py
Normal file
@@ -0,0 +1,109 @@
|
||||
#!/usr/bin/python
|
||||
# vim: encoding=utf-8
|
||||
# expand Windows-specific *.in files
|
||||
# for Visual Studio Builds
|
||||
|
||||
import os
|
||||
import sys
|
||||
import re
|
||||
import string
|
||||
import argparse
|
||||
|
||||
|
||||
def open_compat(src, mode):
|
||||
if (sys.version_info.major < 3):
|
||||
return open(src, mode)
|
||||
else:
|
||||
return open(src, mode, encoding='utf-8', errors='surrogateescape')
|
||||
|
||||
def get_version(srcroot):
|
||||
ver = {}
|
||||
RE_VERSION = re.compile(r'^m4_define\(\[(gtk_\w+)\],\s*\[(\d+)\]\)')
|
||||
RE_FLOAT_VERSION = re.compile(r'^m4_define\(\[(gtk_\w+)\],\s*\[(\d+\.\d*)\]\)')
|
||||
with open(os.path.join(srcroot, 'configure.ac'), 'r') as ac:
|
||||
for i in ac:
|
||||
mo = RE_VERSION.search(i)
|
||||
if mo:
|
||||
ver[mo.group(1).upper()] = int(mo.group(2))
|
||||
mo = RE_FLOAT_VERSION.search(i)
|
||||
if mo:
|
||||
ver[mo.group(1).upper()] = float(mo.group(2))
|
||||
|
||||
ver['GTK_BINARY_AGE'] = 100 * ver['GTK_MINOR_VERSION'] + ver['GTK_MICRO_VERSION']
|
||||
ver['GTK_VERSION'] = '%d.%d.%d' % (ver['GTK_MAJOR_VERSION'],
|
||||
ver['GTK_MINOR_VERSION'],
|
||||
ver['GTK_MICRO_VERSION'])
|
||||
ver['LT_RELEASE'] = '%d.%d' % (ver['GTK_MAJOR_VERSION'], ver['GTK_MINOR_VERSION'])
|
||||
ver['LT_CURRENT'] = 100 * \
|
||||
ver['GTK_MINOR_VERSION'] + \
|
||||
ver['GTK_MICRO_VERSION'] - \
|
||||
ver['GTK_INTERFACE_AGE']
|
||||
ver['LT_REVISION'] = ver['GTK_INTERFACE_AGE']
|
||||
ver['LT_AGE'] = ver['GTK_BINARY_AGE'] - ver['GTK_INTERFACE_AGE']
|
||||
ver['LT_CURRENT_MINUS_AGE'] = ver['LT_CURRENT'] - ver['LT_AGE']
|
||||
return ver
|
||||
|
||||
def process_in(src, dest, vars):
|
||||
RE_VARS = re.compile(r'@(\w+?)@')
|
||||
|
||||
with open_compat(src, 'r') as s:
|
||||
with open_compat(dest, 'w') as d:
|
||||
for i in s:
|
||||
i = RE_VARS.sub(lambda x: str(vars[x.group(1)]), i)
|
||||
d.write(i)
|
||||
|
||||
def get_srcroot():
|
||||
if not os.path.isabs(__file__):
|
||||
path = os.path.abspath(__file__)
|
||||
else:
|
||||
path = __file__
|
||||
dirname = os.path.dirname(path)
|
||||
return os.path.abspath(os.path.join(dirname, '..', '..'))
|
||||
|
||||
def main(argv):
|
||||
prog_desc = 'Create Various autogenerated Win32-specific Source Files'
|
||||
parser = argparse.ArgumentParser(description=prog_desc)
|
||||
parser.add_argument('--gtkwin32rc', dest='gtkwin32rc', action='store_const',
|
||||
const=1,
|
||||
help='Generate gtk-win32.rc')
|
||||
|
||||
parser.add_argument('--gtk3manifest', dest='gtk3manifest', action='store_const',
|
||||
const=1,
|
||||
help='Generate libgtk3.manifest')
|
||||
|
||||
args = parser.parse_args()
|
||||
no_args = True
|
||||
|
||||
if args.gtkwin32rc is not None:
|
||||
srcroot = get_srcroot()
|
||||
|
||||
ver = get_version(srcroot)
|
||||
|
||||
target = os.path.join(srcroot, 'gtk', 'gtk-win32.rc')
|
||||
process_in(os.path.join(srcroot, 'gtk', 'gtk-win32.rc.in'),
|
||||
target + '.intermediate',
|
||||
ver)
|
||||
fp_r = open_compat(target + '.intermediate', 'r')
|
||||
lines = fp_r.readlines()
|
||||
fp_r.close()
|
||||
fp_w = open_compat(target, 'w')
|
||||
fp_w.writelines([item for item in lines[:-1]])
|
||||
|
||||
fp_w.close()
|
||||
os.unlink(target + '.intermediate')
|
||||
|
||||
no_args = False
|
||||
|
||||
if args.gtk3manifest is not None:
|
||||
manifest = {}
|
||||
manifest['EXE_MANIFEST_ARCHITECTURE'] = '*'
|
||||
process_in(os.path.join(srcroot, 'gtk', 'libgtk3.manifest.in'),
|
||||
os.path.join(srcroot, 'gtk', 'libgtk3.manifest'),
|
||||
manifest)
|
||||
no_args = False
|
||||
|
||||
if no_args is True:
|
||||
raise SystemExit('Action argument required. Please see %s --help for details.' % __file__)
|
||||
|
||||
if __name__ == '__main__':
|
||||
sys.exit(main(sys.argv))
|
@@ -1,109 +0,0 @@
|
||||
#!/usr/bin/python
|
||||
#
|
||||
# Simple utility script to manipulate
|
||||
# certain types of strings in a file
|
||||
|
||||
# This can be used in various projects where
|
||||
# there is the need to replace strings in files,
|
||||
# and is copied from GLib's $(srcroot)/build/win32
|
||||
|
||||
# Author: Fan, Chun-wei
|
||||
# Date: September 03, 2014
|
||||
|
||||
import os
|
||||
import sys
|
||||
import re
|
||||
import string
|
||||
import argparse
|
||||
|
||||
valid_actions = ['remove-prefix',
|
||||
'replace-var',
|
||||
'replace-str',
|
||||
'remove-str']
|
||||
|
||||
def replace_multi(src, dest, replace_items):
|
||||
with open(src, 'r') as s:
|
||||
with open(dest, 'w') as d:
|
||||
for line in s:
|
||||
replace_dict = dict((re.escape(key), value) \
|
||||
for key, value in replace_items.items())
|
||||
replace_pattern = re.compile("|".join(replace_dict.keys()))
|
||||
d.write(replace_pattern.sub(lambda m: \
|
||||
replace_dict[re.escape(m.group(0))], line))
|
||||
|
||||
def replace(src, dest, instring, outstring):
|
||||
replace_item = {instring: outstring}
|
||||
replace_multi(src, dest, replace_item)
|
||||
|
||||
def check_required_args(args, params):
|
||||
for param in params:
|
||||
if getattr(args, param, None) is None:
|
||||
raise SystemExit('%s: error: --%s argument is required' % (__file__, param))
|
||||
|
||||
def warn_ignored_args(args, params):
|
||||
for param in params:
|
||||
if getattr(args, param, None) is not None:
|
||||
print('%s: warning: --%s argument is ignored' % (__file__, param))
|
||||
|
||||
def main(argv):
|
||||
|
||||
parser = argparse.ArgumentParser(description='Process strings in a file.')
|
||||
parser.add_argument('-a',
|
||||
'--action',
|
||||
help='Action to carry out. Can be one of:\n'
|
||||
'remove-prefix\n'
|
||||
'replace-var\n'
|
||||
'replace-str\n'
|
||||
'remove-str',
|
||||
choices=valid_actions)
|
||||
parser.add_argument('-i', '--input', help='Input file')
|
||||
parser.add_argument('-o', '--output', help='Output file')
|
||||
parser.add_argument('--instring', help='String to replace or remove')
|
||||
parser.add_argument('--var', help='Autotools variable name to replace')
|
||||
parser.add_argument('--outstring',
|
||||
help='New String to replace specified string or variable')
|
||||
parser.add_argument('--removeprefix', help='Prefix of string to remove')
|
||||
|
||||
args = parser.parse_args()
|
||||
|
||||
input_string = ''
|
||||
output_string = ''
|
||||
|
||||
# We must have action, input, output for all operations
|
||||
check_required_args(args, ['action','input','output'])
|
||||
|
||||
# Build the arguments by the operation that is to be done,
|
||||
# to be fed into replace()
|
||||
|
||||
# Get rid of prefixes from a string
|
||||
if args.action == 'remove-prefix':
|
||||
check_required_args(args, ['instring','removeprefix'])
|
||||
warn_ignored_args(args, ['outstring','var'])
|
||||
input_string = args.removeprefix + args.instring
|
||||
output_string = args.instring
|
||||
|
||||
# Replace an m4-style variable (those surrounded by @...@)
|
||||
if args.action == 'replace-var':
|
||||
check_required_args(args, ['var','outstring'])
|
||||
warn_ignored_args(args, ['instring','removeprefix'])
|
||||
input_string = '@' + args.var + '@'
|
||||
output_string = args.outstring
|
||||
|
||||
# Replace a string
|
||||
if args.action == 'replace-str':
|
||||
check_required_args(args, ['instring','outstring'])
|
||||
warn_ignored_args(args, ['var','removeprefix'])
|
||||
input_string = args.instring
|
||||
output_string = args.outstring
|
||||
|
||||
# Remove a string
|
||||
if args.action == 'remove-str':
|
||||
check_required_args(args, ['instring'])
|
||||
warn_ignored_args(args, ['var','outstring','removeprefix'])
|
||||
input_string = args.instring
|
||||
output_string = ''
|
||||
|
||||
replace(args.input, args.output, input_string, output_string)
|
||||
|
||||
if __name__ == '__main__':
|
||||
sys.exit(main(sys.argv))
|
@@ -33,7 +33,6 @@ EXTRA_DIST += \
|
||||
README.txt \
|
||||
gtk+.sln \
|
||||
gtk3-prebuild.vcxproj \
|
||||
gtk3-prebuild.vcxproj.filters \
|
||||
gdk3-win32.vcxprojin \
|
||||
gdk3-win32.vcxproj.filtersin \
|
||||
gdk3-broadway.vcxprojin \
|
||||
@@ -61,7 +60,6 @@ EXTRA_DIST += \
|
||||
gailutil-3.vcxprojin \
|
||||
gailutil-3.vcxproj.filtersin \
|
||||
gtk3-install.vcxproj \
|
||||
gtk3-install.vcxproj.filters \
|
||||
gtk3-build-defines.props \
|
||||
gtk3-copy-gdk-broadway.props \
|
||||
gtk3-gen-srcs.props \
|
||||
|
@@ -1,4 +1,4 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup Label="ProjectConfigurations">
|
||||
<ProjectConfiguration Include="Debug|Win32">
|
||||
@@ -144,7 +144,7 @@
|
||||
<DebugInformationFormat>EditAndContinue</DebugInformationFormat>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<AdditionalDependencies>$(GdkAdditionalLibs);%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<AdditionalDependencies>imm32.lib;winmm.lib;dwmapi.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<OutputFile>$(OutDir)$(GtkDllPrefix)$(ProjectName)$(GtkDllSuffix).dll</OutputFile>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<ProgramDatabaseFile>$(OutDir)$(GtkDllPrefix)$(ProjectName)$(GtkDllSuffix).pdb</ProgramDatabaseFile>
|
||||
@@ -167,7 +167,7 @@
|
||||
<DebugInformationFormat>EditAndContinue</DebugInformationFormat>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<AdditionalDependencies>$(GdkAdditionalLibs);$(GdkBroadwayAdditionalLibs);%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<AdditionalDependencies>imm32.lib;winmm.lib;ws2_32.lib;dwmapi.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<OutputFile>$(OutDir)$(GtkDllPrefix)$(ProjectName)$(GtkDllSuffix).dll</OutputFile>
|
||||
<ImportLibrary>$(TargetDir)$(ProjectName).0.lib</ImportLibrary>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
@@ -187,7 +187,7 @@
|
||||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<AdditionalDependencies>$(GdkAdditionalLibs);%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<AdditionalDependencies>imm32.lib;winmm.lib;dwmapi.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<OutputFile>$(OutDir)$(GtkDllPrefix)$(ProjectName)$(GtkDllSuffix).dll</OutputFile>
|
||||
<ImportLibrary>$(TargetDir)$(ProjectName).0.lib</ImportLibrary>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
@@ -209,7 +209,7 @@
|
||||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<AdditionalDependencies>$(GdkAdditionalLibs);$(GdkBroadwayAdditionalLibs);%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<AdditionalDependencies>imm32.lib;winmm.lib;ws2_32.lib;dwmapi.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<OutputFile>$(OutDir)$(GtkDllPrefix)$(ProjectName)$(GtkDllSuffix).dll</OutputFile>
|
||||
<ImportLibrary>$(TargetDir)$(ProjectName).0.lib</ImportLibrary>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
@@ -234,7 +234,7 @@
|
||||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<AdditionalDependencies>$(GdkAdditionalLibs);%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<AdditionalDependencies>imm32.lib;winmm.lib;dwmapi.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<OutputFile>$(OutDir)$(GtkDllPrefix)$(ProjectName)$(GtkDllSuffix).dll</OutputFile>
|
||||
<ImportLibrary>$(TargetDir)$(ProjectName).0.lib</ImportLibrary>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
@@ -257,7 +257,7 @@
|
||||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<AdditionalDependencies>$(GdkAdditionalLibs);$(GdkBroadwayAdditionalLibs);%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<AdditionalDependencies>imm32.lib;winmm.lib;ws2_32.lib;dwmapi.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<OutputFile>$(OutDir)$(GtkDllPrefix)$(ProjectName)$(GtkDllSuffix).dll</OutputFile>
|
||||
<ImportLibrary>$(TargetDir)$(ProjectName).0.lib</ImportLibrary>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
@@ -277,7 +277,7 @@
|
||||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<AdditionalDependencies>$(GdkAdditionalLibs);%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<AdditionalDependencies>imm32.lib;winmm.lib;dwmapi.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<OutputFile>$(OutDir)$(GtkDllPrefix)$(ProjectName)$(GtkDllSuffix).dll</OutputFile>
|
||||
<ImportLibrary>$(TargetDir)$(ProjectName).0.lib</ImportLibrary>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
@@ -299,7 +299,7 @@
|
||||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<AdditionalDependencies>$(GdkAdditionalLibs);$(GdkBroadwayAdditionalLibs);%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<AdditionalDependencies>imm32.lib;winmm.lib;ws2_32.lib;dwmapi.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<OutputFile>$(OutDir)$(GtkDllPrefix)$(ProjectName)$(GtkDllSuffix).dll</OutputFile>
|
||||
<ImportLibrary>$(TargetDir)$(ProjectName).0.lib</ImportLibrary>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
|
@@ -19,8 +19,7 @@
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<CustomBuild Include="..\..\..\gtk\gtkdbusinterfaces.xml"><Filter>Resource Files</Filter></CustomBuild>
|
||||
<CustomBuild Include="..\..\..\gtk\gtk-win32.rc.body"><Filter>Resource Files</Filter></CustomBuild>
|
||||
<CustomBuild Include="..\..\..\gtk\libgtk3.manifest.in"><Filter>Resource Files</Filter></CustomBuild>
|
||||
<CustomBuild Include="..\..\..\gtk\gtk-win32.rc.in"><Filter>Resource Files</Filter></CustomBuild>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
#include "gtk-3.vs10.sourcefiles.filters"
|
||||
|
@@ -1,4 +1,4 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup Label="ProjectConfigurations">
|
||||
<ProjectConfiguration Include="Debug|Win32">
|
||||
@@ -86,7 +86,7 @@
|
||||
<DebugInformationFormat>EditAndContinue</DebugInformationFormat>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<AdditionalDependencies>$(GtkAdditionalLibs);%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<AdditionalDependencies>atk-1.0.lib;pangowin32-1.0.lib;imm32.lib;winspool.lib;comctl32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<OutputFile>$(OutDir)$(GtkDllPrefix)$(ProjectName)$(GtkDllSuffix).dll</OutputFile>
|
||||
<ImportLibrary>$(TargetDir)$(ProjectName).0.lib</ImportLibrary>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
@@ -106,7 +106,7 @@
|
||||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<AdditionalDependencies>$(GtkAdditionalLibs);%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<AdditionalDependencies>atk-1.0.lib;pangowin32-1.0.lib;imm32.lib;winspool.lib;comctl32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<OutputFile>$(OutDir)$(GtkDllPrefix)$(ProjectName)$(GtkDllSuffix).dll</OutputFile>
|
||||
<ImportLibrary>$(TargetDir)$(ProjectName).0.lib</ImportLibrary>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
@@ -131,7 +131,7 @@
|
||||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<AdditionalDependencies>$(GtkAdditionalLibs);%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<AdditionalDependencies>atk-1.0.lib;pangowin32-1.0.lib;imm32.lib;winspool.lib;comctl32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<OutputFile>$(OutDir)$(GtkDllPrefix)$(ProjectName)$(GtkDllSuffix).dll</OutputFile>
|
||||
<ImportLibrary>$(TargetDir)$(ProjectName).0.lib</ImportLibrary>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
@@ -151,7 +151,7 @@
|
||||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<AdditionalDependencies>$(GtkAdditionalLibs);%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<AdditionalDependencies>atk-1.0.lib;pangowin32-1.0.lib;imm32.lib;winspool.lib;comctl32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<OutputFile>$(OutDir)$(GtkDllPrefix)$(ProjectName)$(GtkDllSuffix).dll</OutputFile>
|
||||
<ImportLibrary>$(TargetDir)$(ProjectName).0.lib</ImportLibrary>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
@@ -168,42 +168,28 @@
|
||||
<Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(GenerateGtkDbusBuiltSources)</Command>
|
||||
<Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\..\..\gtk\gtkdbusgenerated.c;..\..\..\gtk\gtkdbusgenerated.h;%(Outputs)</Outputs>
|
||||
<Message Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Generating GTK+ DBus Sources...</Message>
|
||||
<Command Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(GenerateGtkDbusBuiltSourcesX64)</Command>
|
||||
<Command Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(GenerateGtkDbusBuiltSources)</Command>
|
||||
<Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">..\..\..\gtk\gtkdbusgenerated.c;..\..\..\gtk\gtkdbusgenerated.h;%(Outputs)</Outputs>
|
||||
<Message Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Generating GTK+ DBus Sources...</Message>
|
||||
<Command Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(GenerateGtkDbusBuiltSources)</Command>
|
||||
<Outputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">..\..\..\gtk\gtkdbusgenerated.c;..\..\..\gtk\gtkdbusgenerated.h;%(Outputs)</Outputs>
|
||||
<Message Condition="'$(Configuration)|$(Platform)'=='Release|x64'">Generating GTK+ DBus Sources...</Message>
|
||||
<Command Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(GenerateGtkDbusBuiltSourcesX64)</Command>
|
||||
<Command Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(GenerateGtkDbusBuiltSources)</Command>
|
||||
<Outputs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">..\..\..\gtk\gtkdbusgenerated.c;..\..\..\gtk\gtkdbusgenerated.h;%(Outputs)</Outputs>
|
||||
</CustomBuild>
|
||||
<CustomBuild Include="..\..\..\gtk\gtk-win32.rc.body">
|
||||
<Message Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Copying GTK+ Win32 Version Resource...</Message>
|
||||
<Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(CopyGtkWin32RC)</Command>
|
||||
<Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\..\..\gtk\gtk-win32.rc;%(Outputs)</Outputs>
|
||||
<Message Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Copying GTK+ Win32 Version Resource...</Message>
|
||||
<Command Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(CopyGtkWin32RC)</Command>
|
||||
<Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">..\..\..\gtk\gtk-win32.rc;%(Outputs)</Outputs>
|
||||
<Message Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Copying GTK+ Win32 Version Resource...</Message>
|
||||
<Command Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(CopyGtkWin32RC)</Command>
|
||||
<Outputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">..\..\..\gtk\gtk-win32.rc;%(Outputs)</Outputs>
|
||||
<Message Condition="'$(Configuration)|$(Platform)'=='Release|x64'">Copying GTK+ Win32 Version Resource...</Message>
|
||||
<Command Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(CopyGtkWin32RC)</Command>
|
||||
<Outputs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">..\..\..\gtk\gtk-win32.rc;%(Outputs)</Outputs>
|
||||
</CustomBuild>
|
||||
<CustomBuild Include="..\..\..\gtk\libgtk3.manifest.in">
|
||||
<Message Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Generating GTK+ Win32 Manifest...</Message>
|
||||
<Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(GenerateGtkWin32Manifest)</Command>
|
||||
<Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\..\..\gtk\libgtk3.manifest;%(Outputs)</Outputs>
|
||||
<Message Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Generating GTK+ Win32 Manifest...</Message>
|
||||
<Command Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(GenerateGtkWin32Manifest)</Command>
|
||||
<Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">..\..\..\gtk\libgtk3.manifest;%(Outputs)</Outputs>
|
||||
<Message Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Generating GTK+ Win32 Manifest...</Message>
|
||||
<Command Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(GenerateGtkWin32Manifest)</Command>
|
||||
<Outputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">..\..\..\gtk\libgtk3.manifest;%(Outputs)</Outputs>
|
||||
<Message Condition="'$(Configuration)|$(Platform)'=='Release|x64'">Generating GTK+ Win32 Manifest...</Message>
|
||||
<Command Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(GenerateGtkWin32Manifest)</Command>
|
||||
<Outputs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">..\..\..\gtk\libgtk3.manifest;%(Outputs)</Outputs>
|
||||
<CustomBuild Include="..\..\..\gtk\gtk-win32.rc.in">
|
||||
<Message Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Generating GTK+ Win32 Version Resource...</Message>
|
||||
<Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(GenerateGtkWin32RC)</Command>
|
||||
<Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\..\..\gtk\gtk-win32.rc;..\..\..\gtk\libgtk3.manifest;%(Outputs)</Outputs>
|
||||
<Message Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Generating GTK+ Win32 Version Resource...</Message>
|
||||
<Command Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(GenerateGtkWin32RC)</Command>
|
||||
<Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">..\..\..\gtk\gtk-win32.rc;..\..\..\gtk\libgtk3.manifest;%(Outputs)</Outputs>
|
||||
<Message Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Generating GTK+ Win32 Version Resource...</Message>
|
||||
<Command Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(GenerateGtkWin32RC)</Command>
|
||||
<Outputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">..\..\..\gtk\gtk-win32.rc;..\..\..\gtk\libgtk3.manifest;%(Outputs)</Outputs>
|
||||
<Message Condition="'$(Configuration)|$(Platform)'=='Release|x64'">Generating GTK+ Win32 Version Resource...</Message>
|
||||
<Command Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(GenerateGtkWin32RC)</Command>
|
||||
<Outputs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">..\..\..\gtk\gtk-win32.rc;..\..\..\gtk\libgtk3.manifest;%(Outputs)</Outputs>
|
||||
</CustomBuild>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
|
@@ -1,4 +1,4 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ImportGroup Label="PropertySheets">
|
||||
<Import Project="gtk3-version-paths.props" />
|
||||
@@ -10,10 +10,6 @@
|
||||
<GdkDefines>GDK_COMPILATION;G_LOG_DOMAIN="Gdk"</GdkDefines>
|
||||
<GtkIncludedImmodulesDefines>INCLUDE_IM_am_et;INCLUDE_IM_cedilla;INCLUDE_IM_cyrillic_translit;INCLUDE_IM_ime;INCLUDE_IM_inuktitut;INCLUDE_IM_ipa;INCLUDE_IM_multipress;INCLUDE_IM_thai;INCLUDE_IM_ti_er;INCLUDE_IM_ti_et;INCLUDE_IM_viqr</GtkIncludedImmodulesDefines>
|
||||
<GtkDefines>GTK_COMPILATION;G_LOG_DOMAIN="Gtk";GTK_HOST="i686-pc-vs$(VSVer)";GTK_PRINT_BACKENDS="file";GTK_PRINT_BACKEND_ENABLE_UNSUPPORTED;$(GtkIncludedImmodulesDefines);GTK_LIBDIR="$(GtkDummyPrefix)/lib";GTK_DATADIR="$(GtkDummyPrefix)/share";GTK_DATA_PREFIX="$(GtkDummyPrefix)";GTK_SYSCONFDIR="$(GtkDummyPrefix)/etc";MULTIPRESS_CONFDIR="$(GtkDummyPrefix)/etc/gtk-$(ApiVersion)";MULTIPRESS_LOCALEDIR="$(GtkDummyPrefix)/share/locale";GTK_VERSION="$(GtkVersion)/etc";GTK_BINARY_VERSION="$(GtkBinaryVersion)/etc";GDK_DISABLE_DEPRECATED;ISOLATION_AWARE_ENABLED</GtkDefines>
|
||||
<GtkGdkCommonLibs>imm32.lib</GtkGdkCommonLibs>
|
||||
<GdkAdditionalLibs>winmm.lib;dwmapi.lib;setupapi.lib;$(GtkGdkCommonLibs)</GdkAdditionalLibs>
|
||||
<GdkBroadwayAdditionalLibs>ws2_32.lib</GdkBroadwayAdditionalLibs>
|
||||
<GtkAdditionalLibs>atk-1.0.lib;pangowin32-1.0.lib;winspool.lib;comctl32.lib;$(GtkGdkCommonLibs)</GtkAdditionalLibs>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<_PropertySheetDisplayName>gtk3builddefinesprops</_PropertySheetDisplayName>
|
||||
@@ -22,13 +18,13 @@
|
||||
</PropertyGroup>
|
||||
<ItemDefinitionGroup>
|
||||
<ClCompile>
|
||||
<AdditionalIncludeDirectories>..\..\..;$(GlibEtcInstallRoot)\include\gdk-pixbuf-2.0;$(GlibEtcInstallRoot)\include\pango-1.0;$(GlibEtcInstallRoot)\include\atk-1.0;$(GlibEtcInstallRoot)\include\cairo;$(GlibEtcInstallRoot)\include\gio-win32-2.0;$(GlibEtcInstallRoot)\include\glib-2.0;$(GlibEtcInstallRoot)\lib\glib-2.0\include;$(GlibEtcInstallRoot)\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>HAVE_CONFIG_H;G_DISABLE_SINGLE_INCLUDES;ATK_DISABLE_SINGLE_INCLUDES;GDK_PIXBUF_DISABLE_SINGLE_INCLUDES;GTK_DISABLE_SINGLE_INCLUDES;_USE_MATH_DEFINES;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<AdditionalIncludeDirectories>..\..\..;$(GlibEtcInstallRoot)\lib\glib-2.0\include;$(GlibEtcInstallRoot)\include\glib-2.0;$(GlibEtcInstallRoot)\include;$(GlibEtcInstallRoot)\include\cairo;$(GlibEtcInstallRoot)\include\atk-1.0;$(GlibEtcInstallRoot)\include\pango-1.0;$(GlibEtcInstallRoot)\include\gdk-pixbuf-2.0;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>HAVE_CONFIG_H;G_DISABLE_SINGLE_INCLUDES;ATK_DISABLE_SINGLE_INCLUDES;GDK_PIXBUF_DISABLE_SINGLE_INCLUDES;GTK_DISABLE_SINGLE_INCLUDES;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<ForcedIncludeFiles>msvc_recommended_pragmas.h;%(ForcedIncludeFiles)</ForcedIncludeFiles>
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
<AdditionalOptions>/d2Zi+ %(AdditionalOptions)</AdditionalOptions>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<Link>
|
||||
<AdditionalDependencies>pangocairo-1.0.lib;cairo.lib;cairo-gobject.lib;pango-1.0.lib;gdk_pixbuf-2.0.lib;gio-2.0.lib;gmodule-2.0.lib;gobject-2.0.lib;glib-2.0.lib;intl.lib;epoxy.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<AdditionalLibraryDirectories>$(GlibEtcInstallRoot)\lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||
</Link>
|
||||
@@ -52,17 +48,5 @@
|
||||
<BuildMacro Include="GtkDefines">
|
||||
<Value>$(GtkDefines)</Value>
|
||||
</BuildMacro>
|
||||
<BuildMacro Include="GtkGdkCommonLibs">
|
||||
<Value>$(GtkGdkCommonLibs)</Value>
|
||||
</BuildMacro>
|
||||
<BuildMacro Include="GdkAdditionalLibs">
|
||||
<Value>$(GdkAdditionalLibs)</Value>
|
||||
</BuildMacro>
|
||||
<BuildMacro Include="GdkBroadwayAdditionalLibs">
|
||||
<Value>$(GdkBroadwayAdditionalLibs)</Value>
|
||||
</BuildMacro>
|
||||
<BuildMacro Include="GtkAdditionalLibs">
|
||||
<Value>$(GtkAdditionalLibs)</Value>
|
||||
</BuildMacro>
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
|
@@ -4,19 +4,30 @@
|
||||
<Import Project="gtk3-build-defines.props" />
|
||||
</ImportGroup>
|
||||
<PropertyGroup Label="UserMacros">
|
||||
<GenConfigH>copy ..\..\..\config.h.win32 ..\..\..\config.h</GenConfigH>
|
||||
<GenConfigH>
|
||||
copy ..\..\..\config.h.win32 ..\..\..\config.h
|
||||
</GenConfigH>
|
||||
<GenGdkConfigHWin32>
|
||||
if exist ..\..\..\MSVC_$(Configuration) goto DONE_GDKCONFIG_H
|
||||
|
||||
if exist ..\..\..\gdk\gdkconfig.h del ..\..\..\gdk\gdkconfig.h
|
||||
|
||||
if exist ..\..\..\GDK_BROADWAY_BUILD del ..\..\..\GDK_BROADWAY_BUILD
|
||||
|
||||
if exist ..\..\..\MSVC_$(Configuration)_Broadway del ..\..\..\MSVC_$(Configuration)_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
|
||||
|
||||
copy ..\..\..\gdk\gdkconfig.h.win32 ..\..\..\gdk\gdkconfig.h
|
||||
|
||||
copy ..\..\..\gdk\gdkconfig.h.win32 ..\..\..\GDK_WIN32ONLY_BUILD
|
||||
|
||||
echo $(Configuration) > ..\..\..\MSVC_$(Configuration)
|
||||
|
||||
:DONE_GDKCONFIG_H
|
||||
@@ -24,25 +35,36 @@ echo $(Configuration) > ..\..\..\MSVC_$(Configuration)
|
||||
<GenGdkConfigHBroadway>
|
||||
if exist ..\..\..\MSVC_$(Configuration)_Broadway goto DONE_GDKCONFIG_H
|
||||
|
||||
|
||||
if exist ..\..\..\gdk\gdkconfig.h del ..\..\..\gdk\gdkconfig.h
|
||||
|
||||
if exist ..\..\..\GDK_WIN32ONLY_BUILD del ..\..\..\GDK_WIN32ONLY_BUILD
|
||||
|
||||
if exist ..\..\..\MSVC_Release del ..\..\..\MSVC_Release
|
||||
|
||||
if exist ..\..\..\MSVC_Debug del ..\..\..\MSVC_Debug
|
||||
|
||||
|
||||
if "$(Configuration)" == "Release_Broadway" del ..\..\..\MSVC_Debug_Broadway
|
||||
|
||||
if "$(Configuration)" == "Debug_Broadway" del ..\..\..\MSVC_Release_Broadway
|
||||
|
||||
copy ..\..\..\gdk\gdkconfig.h.win32_broadway ..\..\..\gdk\gdkconfig.h
|
||||
|
||||
copy ..\..\..\gdk\gdkconfig.h.win32_broadway ..\..\..\GDK_BROADWAY_BUILD
|
||||
|
||||
echo $(Configuration) > ..\..\..\MSVC_$(Configuration)_Broadway
|
||||
|
||||
:DONE_GDKCONFIG_H
|
||||
</GenGdkConfigHBroadway>
|
||||
<GDbusCodeGenCmd>$(GlibEtcInstallRoot)\bin\gdbus-codegen --interface-prefix org.Gtk. --c-namespace _Gtk --generate-c-code gtkdbusgenerated ./gtkdbusinterfaces.xml</GDbusCodeGenCmd>
|
||||
<GenerateGtkDbusBuiltSources>cd ..\..\..\gtk & $(PythonPath)\python $(GDbusCodeGenCmd) & cd $(SolutionDir)</GenerateGtkDbusBuiltSources>
|
||||
<GenerateGtkDbusBuiltSourcesX64>cd ..\..\..\gtk & $(PythonPathX64)\python $(GDbusCodeGenCmd) & cd $(SolutionDir)</GenerateGtkDbusBuiltSourcesX64>
|
||||
<CopyGtkWin32RC>copy ..\..\..\gtk\gtk-win32.rc.body ..\..\..\gtk\gtk-win32.rc</CopyGtkWin32RC>
|
||||
<GenerateGtkWin32Manifest>$(PythonPath)\python ..\replace.py --action=replace-var --input=..\..\..\gtk\libgtk3.manifest.in --output=..\..\..\gtk\libgtk3.manifest --var=EXE_MANIFEST_ARCHITECTURE --outstring=*</GenerateGtkWin32Manifest>
|
||||
<GenerateGtkDbusBuiltSources>
|
||||
cd ..\..\..\gtk
|
||||
|
||||
$(PythonPath)\python $(GlibEtcInstallRoot)\bin\gdbus-codegen --interface-prefix org.Gtk. --c-namespace _Gtk --generate-c-code gtkdbusgenerated ./gtkdbusinterfaces.xml
|
||||
|
||||
cd $(SolutionDir)
|
||||
</GenerateGtkDbusBuiltSources>
|
||||
<GenerateGtkWin32RC>$(PythonPath)\python ..\process-in-win32.py --gtkwin32rc --gtk3manifest</GenerateGtkWin32RC>
|
||||
<CopyDemosH>copy ..\..\..\demos\gtk-demo\demos.h.win32 ..\..\..\demos\gtk-demo\demos.h</CopyDemosH>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
@@ -58,20 +80,11 @@ echo $(Configuration) > ..\..\..\MSVC_$(Configuration)_Broadway
|
||||
<BuildMacro Include="GenGdkConfigHBroadway">
|
||||
<Value>$(GenGdkConfigHBroadway)</Value>
|
||||
</BuildMacro>
|
||||
<BuildMacro Include="GDbusCodeGenCmd">
|
||||
<Value>$(GDbusCodeGenCmd)</Value>
|
||||
</BuildMacro>
|
||||
<BuildMacro Include="GenerateGtkDbusBuiltSources">
|
||||
<Value>$(GenerateGtkDbusBuiltSources)</Value>
|
||||
</BuildMacro>
|
||||
<BuildMacro Include="GenerateGtkDbusBuiltSourcesX64">
|
||||
<Value>$(GenerateGtkDbusBuiltSourcesX64)</Value>
|
||||
</BuildMacro>
|
||||
<BuildMacro Include="CopyGtkWin32RC">
|
||||
<Value>$(CopyGtkWin32RC)</Value>
|
||||
</BuildMacro>
|
||||
<BuildMacro Include="GenerateGtkWin32Manifest">
|
||||
<Value>$(GenerateGtkWin32Manifest)</Value>
|
||||
<BuildMacro Include="GenerateGtkWin32RC">
|
||||
<Value>$(GenerateGtkWin32RC)</Value>
|
||||
</BuildMacro>
|
||||
<BuildMacro Include="CopyDemosH">
|
||||
<Value>$(CopyDemosH)</Value>
|
||||
|
@@ -5,9 +5,12 @@
|
||||
</ImportGroup>
|
||||
<PropertyGroup Label="UserMacros">
|
||||
<BinDir>$(SolutionDir)$(Configuration)\$(Platform)\bin</BinDir>
|
||||
<InstalledDlls>$(BinDir)\$(GtkDllPrefix)gdk(GtkDllSuffix).dll;$(BinDir)\$(GtkDllPrefix)gtk(GtkDllSuffix).dll;$(BinDir)\$(GtkDllPrefix)gailutil(GtkDllSuffix).dll</InstalledDlls>
|
||||
<InstalledBins>$(BinDir)\gtk3-demo.exe;$(BinDir)\gtk3-demo-application.exe;$(BinDir)\gtk3-icon-browser.exe;$(BinDir)\gtk-encode-symbolic-svg.exe</InstalledBins>
|
||||
<InstalledBroadwayBins>$(BinDir)\broadwayd.exe</InstalledBroadwayBins>
|
||||
<GtkDoInstallBin>
|
||||
mkdir $(CopyDir)\bin
|
||||
mkdir $(CopyDir)\lib\pkgconfig
|
||||
mkdir $(CopyDir)\lib
|
||||
|
||||
copy "$(BinDir)\$(GtkDllPrefix)gdk-3$(GtkDllSuffix).dll" $(CopyDir)\bin
|
||||
copy "$(BinDir)\$(GtkDllPrefix)gdk-3$(GtkDllSuffix).pdb" $(CopyDir)\bin
|
||||
@@ -90,10 +93,6 @@ copy .\Debug\$(Platform)\bin\gtk-builder-tool.exe $(CopyDir)\bin
|
||||
copy .\Debug\$(Platform)\bin\gtk-builder-tool.pdb $(CopyDir)\bin
|
||||
|
||||
:DONE_BIN
|
||||
|
||||
copy ..\gdk-3.0.pc $(CopyDir)\lib\pkgconfig
|
||||
copy "..\gtk+-3.0.pc" $(CopyDir)\lib\pkgconfig
|
||||
copy ..\gail-3.0.pc $(CopyDir)\lib\pkgconfig
|
||||
</GtkDoInstallBin>
|
||||
<GtkDoInstall>
|
||||
echo off
|
||||
@@ -127,22 +126,18 @@ copy ..\..\..\gtk\org.gtk.Settings.FileChooser.gschema.xml $(CopyDir)\share\glib
|
||||
copy ..\..\..\gtk\org.gtk.Settings.ColorChooser.gschema.xml $(CopyDir)\share\glib-2.0\schemas
|
||||
copy ..\..\..\gtk\org.gtk.Settings.Debug.gschema.xml $(CopyDir)\share\glib-2.0\schemas
|
||||
copy ..\..\..\demos\gtk-demo\org.gtk.Demo.gschema.xml $(CopyDir)\share\glib-2.0\schemas
|
||||
|
||||
echo "Compiling gsettings XML Files..."
|
||||
$(GlibEtcInstallRoot)\bin\glib-compile-schemas.exe $(CopyDir)\share\glib-2.0\schemas
|
||||
|
||||
echo "Generating icon cache......"
|
||||
$(CopyDir)\bin\gtk-update-icon-cache.exe --ignore-theme-index --force "$(CopyDir)\share\icons\hicolor"
|
||||
</GtkDoInstall>
|
||||
<GtkDoInstallBroadwayHeaders>
|
||||
copy ..\..\..\gdk\broadway\gdkbroadway.h $(CopyDir)\include\gtk-$(ApiVersion)\gdk
|
||||
mkdir $(CopyDir)\include\gtk-$(ApiVersion)\gdk\broadway
|
||||
#include "gdk3-broadway.vs10.headers"
|
||||
</GtkDoInstallBroadwayHeaders>
|
||||
<GtkPostInstall>
|
||||
echo "Compiling gsettings XML Files..."
|
||||
$(GlibEtcInstallRoot)\bin\glib-compile-schemas.exe $(CopyDir)\share\glib-2.0\schemas
|
||||
|
||||
echo "Generating icon cache......"
|
||||
$(CopyDir)\bin\gtk-update-icon-cache.exe --ignore-theme-index --force "$(CopyDir)\share\icons\hicolor"
|
||||
</GtkPostInstall>
|
||||
<GenerateGtkPC>$(PythonPath)\python ..\gtkpc.py --prefix=$(CopyDir) --version=$(GtkVersion) --host=i686-pc-vs$(VSVer)</GenerateGtkPC>
|
||||
<GenerateGtkPCX64>$(PythonPathX64)\python ..\gtkpc.py --prefix=$(CopyDir) --version=$(GtkVersion) --host=x86_64-pc-vs$(VSVer)</GenerateGtkPCX64>
|
||||
<GtkPCFiles>..\gdk-3.0.pc;..\gtk+-3.0.pc;..\gail-3.0.pc</GtkPCFiles>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<_PropertySheetDisplayName>gtk3installsprops</_PropertySheetDisplayName>
|
||||
@@ -169,17 +164,5 @@ $(CopyDir)\bin\gtk-update-icon-cache.exe --ignore-theme-index --force "$(CopyDir
|
||||
<BuildMacro Include="GtkDoInstallBroadwayHeaders">
|
||||
<Value>$(GtkDoInstallBroadwayHeaders)</Value>
|
||||
</BuildMacro>
|
||||
<BuildMacro Include="GtkPostInstall">
|
||||
<Value>$(GtkPostInstall)</Value>
|
||||
</BuildMacro>
|
||||
<BuildMacro Include="GenerateGtkPC">
|
||||
<Value>$(GenerateGtkPC)</Value>
|
||||
</BuildMacro>
|
||||
<BuildMacro Include="GenerateGtkPCX64">
|
||||
<Value>$(GenerateGtkPCX64)</Value>
|
||||
</BuildMacro>
|
||||
<BuildMacro Include="GtkPCFiles">
|
||||
<Value>$(GtkPCFiles)</Value>
|
||||
</BuildMacro>
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
|
@@ -157,63 +157,29 @@
|
||||
<ItemGroup>
|
||||
<CustomBuild Include="..\..\..\config.h.win32">
|
||||
<Message Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Installing Build Results...</Message>
|
||||
<AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(GtkPCFiles)</AdditionalInputs>
|
||||
<Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(GtkDoInstallBin)$(GtkDoInstall)$(GtkPostInstall)</Command>
|
||||
<Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">blah;%(Outputs)</Outputs>
|
||||
<Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(GtkDoInstallBin)$(GtkDoInstall)</Command>
|
||||
<Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(InstalledDlls);$(InstalledBins);%(Outputs)</Outputs>
|
||||
<Message Condition="'$(Configuration)|$(Platform)'=='Debug_Broadway|Win32'">Installing Build Results...</Message>
|
||||
<AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Debug_Broadway|Win32'">$(GtkPCFiles)</AdditionalInputs>
|
||||
<Command Condition="'$(Configuration)|$(Platform)'=='Debug_Broadway|Win32'">$(GtkDoInstallBin)$(GtkDoInstall)$(GtkDoInstallBroadwayHeaders)$(GtkPostInstall)</Command>
|
||||
<Outputs Condition="'$(Configuration)|$(Platform)'=='Debug_Broadway|Win32'">blah;%(Outputs)</Outputs>
|
||||
<Command Condition="'$(Configuration)|$(Platform)'=='Debug_Broadway|Win32'">$(GtkDoInstallBin)$(GtkDoInstall)$(GtkDoInstallBroadwayHeaders)</Command>
|
||||
<Outputs Condition="'$(Configuration)|$(Platform)'=='Debug_Broadway|Win32'">$(InstalledDlls);$(InstalledBins);$(InstalledBroadwayBins);%(Outputs)</Outputs>
|
||||
<Message Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Installing Build Results...</Message>
|
||||
<AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(GtkPCFiles)</AdditionalInputs>
|
||||
<Command Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(GtkDoInstallBin)$(GtkDoInstall)$(GtkPostInstall)</Command>
|
||||
<Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">blah;%(Outputs)</Outputs>
|
||||
<Command Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(GtkDoInstallBin)$(GtkDoInstall)</Command>
|
||||
<Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(InstalledDlls);$(InstalledBins);%(Outputs)</Outputs>
|
||||
<Message Condition="'$(Configuration)|$(Platform)'=='Debug_Broadway|x64'">Installing Build Results...</Message>
|
||||
<AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Debug_Broadway|x64'">$(GtkPCFiles)</AdditionalInputs>
|
||||
<Command Condition="'$(Configuration)|$(Platform)'=='Debug_Broadway|x64'">$(GtkDoInstallBin)$(GtkDoInstall)$(GtkDoInstallBroadwayHeaders)$(GtkPostInstall)</Command>
|
||||
<Outputs Condition="'$(Configuration)|$(Platform)'=='Debug_Broadway|x64'">blah;%(Outputs)</Outputs>
|
||||
<Command Condition="'$(Configuration)|$(Platform)'=='Debug_Broadway|x64'">$(GtkDoInstallBin)$(GtkDoInstall)$(GtkDoInstallBroadwayHeaders)</Command>
|
||||
<Outputs Condition="'$(Configuration)|$(Platform)'=='Debug_Broadway|x64'">$(InstalledDlls);$(InstalledBins);$(InstalledBroadwayBins);%(Outputs)</Outputs>
|
||||
<Message Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Installing Build Results...</Message>
|
||||
<AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(GtkPCFiles)</AdditionalInputs>
|
||||
<Command Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(GtkDoInstallBin)$(GtkDoInstall)$(GtkPostInstall)</Command>
|
||||
<Outputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">blah;%(Outputs)</Outputs>
|
||||
<Command Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(GtkDoInstallBin)$(GtkDoInstall)</Command>
|
||||
<Outputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(InstalledDlls);$(InstalledBins);%(Outputs)</Outputs>
|
||||
<Message Condition="'$(Configuration)|$(Platform)'=='Release_Broadway|Win32'">Installing Build Results...</Message>
|
||||
<AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Release_Broadway|Win32'">$(GtkPCFiles)</AdditionalInputs>
|
||||
<Command Condition="'$(Configuration)|$(Platform)'=='Release_Broadway|Win32'">$(GtkDoInstallBin)$(GtkDoInstall)$(GtkDoInstallBroadwayHeaders)$(GtkPostInstall)</Command>
|
||||
<Outputs Condition="'$(Configuration)|$(Platform)'=='Release_Broadway|Win32'">blah;%(Outputs)</Outputs>
|
||||
<Command Condition="'$(Configuration)|$(Platform)'=='Release_Broadway|Win32'">$(GtkDoInstallBin)$(GtkDoInstall)$(GtkDoInstallBroadwayHeaders)</Command>
|
||||
<Outputs Condition="'$(Configuration)|$(Platform)'=='Release_Broadway|Win32'">$(InstalledDlls);$(InstalledBins);$(InstalledBroadwayBins);%(Outputs)</Outputs>
|
||||
<Message Condition="'$(Configuration)|$(Platform)'=='Release|x64'">Installing Build Results...</Message>
|
||||
<AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(GtkPCFiles)</AdditionalInputs>
|
||||
<Command Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(GtkDoInstallBin)$(GtkDoInstall)$(GtkPostInstall)</Command>
|
||||
<Outputs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">blah;%(Outputs)</Outputs>
|
||||
<Command Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(GtkDoInstallBin)$(GtkDoInstall)</Command>
|
||||
<Outputs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(InstalledDlls);$(InstalledBins);%(Outputs)</Outputs>
|
||||
<Message Condition="'$(Configuration)|$(Platform)'=='Release_Broadway|x64'">Installing Build Results...</Message>
|
||||
<AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Release_Broadway|x64'">$(GtkPCFiles)</AdditionalInputs>
|
||||
<Command Condition="'$(Configuration)|$(Platform)'=='Release_Broadway|x64'">$(GtkDoInstallBin)$(GtkDoInstall)$(GtkDoInstallBroadwayHeaders)$(GtkPostInstall)</Command>
|
||||
<Outputs Condition="'$(Configuration)|$(Platform)'=='Release_Broadway|x64'">blah;%(Outputs)</Outputs>
|
||||
</CustomBuild>
|
||||
<CustomBuild Include="..\gtkpc.py">
|
||||
<Message Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Generating .pc files...</Message>
|
||||
<Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(GenerateGtkPC)</Command>
|
||||
<Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(GtkPCFiles);%(Outputs)</Outputs>
|
||||
<Message Condition="'$(Configuration)|$(Platform)'=='Debug_Broadway|Win32'">Generating .pc files...</Message>
|
||||
<Command Condition="'$(Configuration)|$(Platform)'=='Debug_Broadway|Win32'">$(GenerateGtkPC) --broadway</Command>
|
||||
<Outputs Condition="'$(Configuration)|$(Platform)'=='Debug_Broadway|Win32'">$(GtkPCFiles);%(Outputs)</Outputs>
|
||||
<Message Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Generating .pc files...</Message>
|
||||
<Command Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(GenerateGtkPCX64)</Command>
|
||||
<Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(GtkPCFiles);%(Outputs)</Outputs>
|
||||
<Message Condition="'$(Configuration)|$(Platform)'=='Debug_Broadway|x64'">Generating .pc files...</Message>
|
||||
<Command Condition="'$(Configuration)|$(Platform)'=='Debug_Broadway|x64'">$(GenerateGtkPCX64) --broadway</Command>
|
||||
<Outputs Condition="'$(Configuration)|$(Platform)'=='Debug_Broadway|x64'">$(GtkPCFiles);%(Outputs)</Outputs>
|
||||
<Message Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Generating .pc files...</Message>
|
||||
<Command Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(GenerateGtkPC)</Command>
|
||||
<Outputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(GtkPCFiles);%(Outputs)</Outputs>
|
||||
<Message Condition="'$(Configuration)|$(Platform)'=='Release_Broadway|Win32'">Generating .pc files...</Message>
|
||||
<Command Condition="'$(Configuration)|$(Platform)'=='Release_Broadway|Win32'">$(GenerateGtkPC) --broadway</Command>
|
||||
<Outputs Condition="'$(Configuration)|$(Platform)'=='Release_Broadway|Win32'">$(GtkPCFiles);%(Outputs)</Outputs>
|
||||
<Message Condition="'$(Configuration)|$(Platform)'=='Release|x64'">Generating .pc files...</Message>
|
||||
<Command Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(GenerateGtkPCX64)</Command>
|
||||
<Outputs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(GtkPCFiles);%(Outputs)</Outputs>
|
||||
<Message Condition="'$(Configuration)|$(Platform)'=='Release_Broadway|x64'">Generating .pc files...</Message>
|
||||
<Command Condition="'$(Configuration)|$(Platform)'=='Release_Broadway|x64'">$(GenerateGtkPCX64) --broadway</Command>
|
||||
<Outputs Condition="'$(Configuration)|$(Platform)'=='Release_Broadway|x64'">$(GtkPCFiles);%(Outputs)</Outputs>
|
||||
<Command Condition="'$(Configuration)|$(Platform)'=='Release_Broadway|x64'">$(GtkDoInstallBin)$(GtkDoInstall)$(GtkDoInstallBroadwayHeaders)</Command>
|
||||
<Outputs Condition="'$(Configuration)|$(Platform)'=='Release_Broadway|x64'">$(InstalledDlls);$(InstalledBins);$(InstalledBroadwayBins);%(Outputs)</Outputs>
|
||||
</CustomBuild>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
|
@@ -1,13 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup>
|
||||
<Filter Include="Resource Files">
|
||||
<UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
|
||||
<Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav</Extensions>
|
||||
</Filter>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<CustomBuild Include="..\..\..\config.h.win32"><Filter>Resource Files</Filter></CustomBuild>
|
||||
<CustomBuild Include="..\gtkpc.py"><Filter>Resource Files</Filter></CustomBuild>
|
||||
</ItemGroup>
|
||||
</Project>
|
@@ -1,15 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup>
|
||||
<Filter Include="Resource Files">
|
||||
<UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
|
||||
<Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav</Extensions>
|
||||
</Filter>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<CustomBuild Include="..\..\..\config.h.win32"><Filter>Resource Files</Filter></CustomBuild>
|
||||
<CustomBuild Include="..\..\..\gdk\gdkconfig.h.win32"><Filter>Resource Files</Filter></CustomBuild>
|
||||
<CustomBuild Include="..\..\..\gdk\gdkconfig.h.win32_broadway"><Filter>Resource Files</Filter></CustomBuild>
|
||||
<CustomBuild Include="..\..\..\demos\gtk-demo\demos.h.win32"><Filter>Resource Files</Filter></CustomBuild>
|
||||
</ItemGroup>
|
||||
</Project>
|
@@ -12,8 +12,7 @@
|
||||
<GtkSeparateVSDllSuffix>-vs$(VSVer)</GtkSeparateVSDllSuffix>
|
||||
<GtkDllPrefix>$(GtkSeparateVSDllPrefix)</GtkDllPrefix>
|
||||
<GtkDllSuffix>$(GtkSeparateVSDllSuffix)</GtkDllSuffix>
|
||||
<PythonPath>c:\python34</PythonPath>
|
||||
<PythonPathX64>$(PythonPath).x64</PythonPathX64>
|
||||
<PythonPath>c:\python27</PythonPath>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<_PropertySheetDisplayName>gtk3versionpathsprops</_PropertySheetDisplayName>
|
||||
@@ -55,8 +54,5 @@
|
||||
<BuildMacro Include="PythonPath">
|
||||
<Value>$(PythonPath)</Value>
|
||||
</BuildMacro>
|
||||
<BuildMacro Include="PythonPathX64">
|
||||
<Value>$(PythonPathX64)</Value>
|
||||
</BuildMacro>
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
|
@@ -4,7 +4,6 @@ EXTRA_DIST += \
|
||||
README.txt \
|
||||
gtk+.sln \
|
||||
gtk3-prebuild.vcxproj \
|
||||
gtk3-prebuild.vcxproj.filters \
|
||||
gdk3-win32.vcxproj \
|
||||
gdk3-win32.vcxproj.filters \
|
||||
gdk-3.vcxproj \
|
||||
@@ -28,7 +27,6 @@ EXTRA_DIST += \
|
||||
gailutil-3.vcxproj \
|
||||
gailutil-3.vcxproj.filters \
|
||||
gtk3-install.vcxproj \
|
||||
gtk3-install.vcxproj.filters \
|
||||
broadwayd.vcxproj \
|
||||
broadwayd.vcxproj.filters \
|
||||
gdk3-broadway.vcxproj \
|
||||
|
@@ -4,7 +4,6 @@ EXTRA_DIST += \
|
||||
README.txt \
|
||||
gtk+.sln \
|
||||
gtk3-prebuild.vcxproj \
|
||||
gtk3-prebuild.vcxproj.filters \
|
||||
gdk3-win32.vcxproj \
|
||||
gdk3-win32.vcxproj.filters \
|
||||
gdk-3.vcxproj \
|
||||
@@ -28,7 +27,6 @@ EXTRA_DIST += \
|
||||
gailutil-3.vcxproj \
|
||||
gailutil-3.vcxproj.filters \
|
||||
gtk3-install.vcxproj \
|
||||
gtk3-install.vcxproj.filters \
|
||||
broadwayd.vcxproj \
|
||||
broadwayd.vcxproj.filters \
|
||||
gdk3-broadway.vcxproj \
|
||||
|
@@ -4,7 +4,6 @@ EXTRA_DIST += \
|
||||
README.txt \
|
||||
gtk+.sln \
|
||||
gtk3-prebuild.vcxproj \
|
||||
gtk3-prebuild.vcxproj.filters \
|
||||
gdk3-win32.vcxproj \
|
||||
gdk3-win32.vcxproj.filters \
|
||||
gdk-3.vcxproj \
|
||||
@@ -28,7 +27,6 @@ EXTRA_DIST += \
|
||||
gailutil-3.vcxproj \
|
||||
gailutil-3.vcxproj.filters \
|
||||
gtk3-install.vcxproj \
|
||||
gtk3-install.vcxproj.filters \
|
||||
broadwayd.vcxproj \
|
||||
broadwayd.vcxproj.filters \
|
||||
gdk3-broadway.vcxproj \
|
||||
|
@@ -42,7 +42,7 @@
|
||||
/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalDependencies="$(GdkAdditionalLibs)"
|
||||
AdditionalDependencies="imm32.lib winmm.lib dwmapi.lib"
|
||||
OutputFile="$(OutDir)\$(GtkDllPrefix)$(ProjectName)$(GtkDllSuffix).dll"
|
||||
LinkIncremental="1"
|
||||
GenerateDebugInformation="true"
|
||||
@@ -74,7 +74,7 @@
|
||||
/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalDependencies="$(GdkAdditionalLibs) $(GdkBroadwayAdditionalLibs)"
|
||||
AdditionalDependencies="imm32.lib winmm.lib ws2_32.lib dwmapi.lib"
|
||||
OutputFile="$(OutDir)\$(GtkDllPrefix)$(ProjectName)$(GtkDllSuffix).dll"
|
||||
LinkIncremental="1"
|
||||
GenerateDebugInformation="true"
|
||||
@@ -104,7 +104,7 @@
|
||||
/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalDependencies="$(GdkAdditionalLibs)"
|
||||
AdditionalDependencies="imm32.lib winmm.lib dwmapi.lib"
|
||||
OutputFile="$(OutDir)\$(GtkDllPrefix)$(ProjectName)$(GtkDllSuffix).dll"
|
||||
LinkIncremental="1"
|
||||
GenerateDebugInformation="true"
|
||||
@@ -136,7 +136,7 @@
|
||||
/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalDependencies="$(GdkAdditionalLibs) $(GdkBroadwayAdditionalLibs)"
|
||||
AdditionalDependencies="imm32.lib winmm.lib ws2_32.lib dwmapi.lib"
|
||||
OutputFile="$(OutDir)\$(GtkDllPrefix)$(ProjectName)$(GtkDllSuffix).dll"
|
||||
LinkIncremental="1"
|
||||
GenerateDebugInformation="true"
|
||||
@@ -170,7 +170,7 @@
|
||||
/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalDependencies="$(GdkAdditionalLibs)"
|
||||
AdditionalDependencies="imm32.lib winmm.lib dwmapi.lib"
|
||||
OutputFile="$(OutDir)\$(GtkDllPrefix)$(ProjectName)$(GtkDllSuffix).dll"
|
||||
LinkIncremental="1"
|
||||
GenerateDebugInformation="true"
|
||||
@@ -202,7 +202,7 @@
|
||||
/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalDependencies="$(GdkAdditionalLibs) $(GdkBroadwayAdditionalLibs)"
|
||||
AdditionalDependencies="imm32.lib winmm.lib ws2_32.lib dwmapi.lib"
|
||||
OutputFile="$(OutDir)\$(GtkDllPrefix)$(ProjectName)$(GtkDllSuffix).dll"
|
||||
LinkIncremental="1"
|
||||
GenerateDebugInformation="true"
|
||||
@@ -232,7 +232,7 @@
|
||||
/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalDependencies="$(GdkAdditionalLibs)"
|
||||
AdditionalDependencies="imm32.lib winmm.lib dwmapi.lib"
|
||||
OutputFile="$(OutDir)\$(GtkDllPrefix)$(ProjectName)$(GtkDllSuffix).dll"
|
||||
LinkIncremental="1"
|
||||
GenerateDebugInformation="true"
|
||||
@@ -264,7 +264,7 @@
|
||||
/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalDependencies="$(GdkAdditionalLibs) $(GdkBroadwayAdditionalLibs)"
|
||||
AdditionalDependencies="imm32.lib winmm.lib ws2_32.lib dwmapi.lib"
|
||||
OutputFile="$(OutDir)\$(GtkDllPrefix)$(ProjectName)$(GtkDllSuffix).dll"
|
||||
LinkIncremental="1"
|
||||
GenerateDebugInformation="true"
|
||||
|
@@ -42,7 +42,7 @@
|
||||
/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalDependencies="$(GtkAdditionalLibs)"
|
||||
AdditionalDependencies="atk-1.0.lib pangowin32-1.0.lib imm32.lib winspool.lib comctl32.lib"
|
||||
OutputFile="$(OutDir)\$(GtkDllPrefix)$(ProjectName)$(GtkDllSuffix).dll"
|
||||
LinkIncremental="1"
|
||||
GenerateDebugInformation="true"
|
||||
@@ -72,7 +72,7 @@
|
||||
/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalDependencies="$(GtkAdditionalLibs)"
|
||||
AdditionalDependencies="atk-1.0.lib pangowin32-1.0.lib imm32.lib winspool.lib comctl32.lib"
|
||||
OutputFile="$(OutDir)\$(GtkDllPrefix)$(ProjectName)$(GtkDllSuffix).dll"
|
||||
LinkIncremental="1"
|
||||
GenerateDebugInformation="true"
|
||||
@@ -106,7 +106,7 @@
|
||||
/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalDependencies="$(GtkAdditionalLibs)"
|
||||
AdditionalDependencies="atk-1.0.lib pangowin32-1.0.lib imm32.lib winspool.lib comctl32.lib"
|
||||
OutputFile="$(OutDir)\$(GtkDllPrefix)$(ProjectName)$(GtkDllSuffix).dll"
|
||||
LinkIncremental="1"
|
||||
GenerateDebugInformation="true"
|
||||
@@ -136,7 +136,7 @@
|
||||
/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalDependencies="$(GtkAdditionalLibs)"
|
||||
AdditionalDependencies="atk-1.0.lib pangowin32-1.0.lib imm32.lib winspool.lib comctl32.lib"
|
||||
OutputFile="$(OutDir)\$(GtkDllPrefix)$(ProjectName)$(GtkDllSuffix).dll"
|
||||
LinkIncremental="1"
|
||||
GenerateDebugInformation="true"
|
||||
@@ -180,75 +180,45 @@
|
||||
<FileConfiguration Name="Debug|x64">
|
||||
<Tool Name="VCCustomBuildTool"
|
||||
Description="Generating GTK+ DBus Sources..."
|
||||
CommandLine="$(GenerateGtkDbusBuiltSourcesX64)"
|
||||
CommandLine="$(GenerateGtkDbusBuiltSources)"
|
||||
Outputs="..\..\..\gtk\gtkdbusgenerated.c;..\..\..\gtk\gtkdbusgenerated.h"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration Name="Release|x64">
|
||||
<Tool Name="VCCustomBuildTool"
|
||||
Description="Generating GTK+ DBus Sources..."
|
||||
CommandLine="$(GenerateGtkDbusBuiltSourcesX64)"
|
||||
CommandLine="$(GenerateGtkDbusBuiltSources)"
|
||||
Outputs="..\..\..\gtk\gtkdbusgenerated.c;..\..\..\gtk\gtkdbusgenerated.h"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
</File>
|
||||
<File RelativePath="..\..\..\gtk\gtk-win32.rc.body">
|
||||
<File RelativePath="..\..\..\gtk\gtk-win32.rc.in">
|
||||
<FileConfiguration Name="Debug|Win32">
|
||||
<Tool Name="VCCustomBuildTool"
|
||||
Description="Copying GTK+ Win32 Version Resource..."
|
||||
CommandLine="$(CopyGtkWin32RC)"
|
||||
Outputs="..\..\..\gtk\gtk-win32.rc"
|
||||
Description="Generating GTK+ Win32 Version Resource..."
|
||||
CommandLine="$(GenerateGtkWin32RC)"
|
||||
Outputs="..\..\..\gtk\gtk-win32.rc;..\..\..\gtk\libgtk3.manifest"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration Name="Release|Win32">
|
||||
<Tool Name="VCCustomBuildTool"
|
||||
Description="Copying GTK+ Win32 Version Resource..."
|
||||
CommandLine="$(CopyGtkWin32RC)"
|
||||
Outputs="..\..\..\gtk\gtk-win32.rc"
|
||||
Description="Generating GTK+ Win32 Version Resource..."
|
||||
CommandLine="$(GenerateGtkWin32RC)"
|
||||
Outputs="..\..\..\gtk\gtk-win32.rc;..\..\..\gtk\libgtk3.manifest"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration Name="Debug|x64">
|
||||
<Tool Name="VCCustomBuildTool"
|
||||
Description="Copying GTK+ Win32 Version Resource..."
|
||||
CommandLine="$(CopyGtkWin32RC)"
|
||||
Outputs="..\..\..\gtk\gtk-win32.rc"
|
||||
Description="Generating GTK+ Win32 Version Resource..."
|
||||
CommandLine="$(GenerateGtkWin32RC)"
|
||||
Outputs="..\..\..\gtk\gtk-win32.rc;..\..\..\gtk\libgtk3.manifest"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration Name="Release|x64">
|
||||
<Tool Name="VCCustomBuildTool"
|
||||
Description="Copying GTK+ Win32 Version Resource..."
|
||||
CommandLine="$(CopyGtkWin32RC)"
|
||||
Outputs="..\..\..\gtk\gtk-win32.rc"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
</File>
|
||||
<File RelativePath="..\..\..\gtk\libgtk3.manifest.in">
|
||||
<FileConfiguration Name="Debug|Win32">
|
||||
<Tool Name="VCCustomBuildTool"
|
||||
Description="Generating GTK+ Win32 Manifest..."
|
||||
CommandLine="$(GenerateGtkWin32Manifest)"
|
||||
Outputs="..\..\..\gtk\libgtk3.manifest"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration Name="Release|Win32">
|
||||
<Tool Name="VCCustomBuildTool"
|
||||
Description="Generating GTK+ Win32 Manifest..."
|
||||
CommandLine="$(GenerateGtkWin32Manifest)"
|
||||
Outputs="..\..\..\gtk\libgtk3.manifest"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration Name="Debug|x64">
|
||||
<Tool Name="VCCustomBuildTool"
|
||||
Description="Generating GTK+ Win32 Manifest..."
|
||||
CommandLine="$(GenerateGtkWin32Manifest)"
|
||||
Outputs="..\..\..\gtk\libgtk3.manifest"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration Name="Release|x64">
|
||||
<Tool Name="VCCustomBuildTool"
|
||||
Description="Generating GTK+ Win32 Manifest..."
|
||||
CommandLine="$(GenerateGtkWin32Manifest)"
|
||||
Outputs="..\..\..\gtk\libgtk3.manifest"
|
||||
Description="Generating GTK+ Win32 Version Resource..."
|
||||
CommandLine="$(GenerateGtkWin32RC)"
|
||||
Outputs="..\..\..\gtk\gtk-win32.rc;..\..\..\gtk\libgtk3.manifest"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
</File>
|
||||
|
@@ -9,8 +9,8 @@
|
||||
>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
AdditionalIncludeDirectories="..\..\..;$(GlibEtcInstallRoot)\include\gdk-pixbuf-2.0;$(GlibEtcInstallRoot)\include\pango-1.0;$(GlibEtcInstallRoot)\include\atk-1.0;$(GlibEtcInstallRoot)\include\cairo;$(GlibEtcInstallRoot)\include\gio-win32-2.0;$(GlibEtcInstallRoot)\include\glib-2.0;$(GlibEtcInstallRoot)\lib\glib-2.0\include;$(GlibEtcInstallRoot)\include"
|
||||
PreprocessorDefinitions="HAVE_CONFIG_H;G_DISABLE_SINGLE_INCLUDES;ATK_DISABLE_SINGLE_INCLUDES;GDK_PIXBUF_DISABLE_SINGLE_INCLUDES;GTK_DISABLE_SINGLE_INCLUDES;_USE_MATH_DEFINES"
|
||||
AdditionalIncludeDirectories="..\..\..;$(GlibEtcInstallRoot)\lib\glib-2.0\include;$(GlibEtcInstallRoot)\include\glib-2.0;$(GlibEtcInstallRoot)\include;$(GlibEtcInstallRoot)\include\cairo;$(GlibEtcInstallRoot)\include\atk-1.0;$(GlibEtcInstallRoot)\include\pango-1.0;$(GlibEtcInstallRoot)\include\gdk-pixbuf-2.0"
|
||||
PreprocessorDefinitions="HAVE_CONFIG_H;G_DISABLE_SINGLE_INCLUDES;ATK_DISABLE_SINGLE_INCLUDES;GDK_PIXBUF_DISABLE_SINGLE_INCLUDES;GTK_DISABLE_SINGLE_INCLUDES"
|
||||
ForcedIncludeFiles="msvc_recommended_pragmas.h"
|
||||
AdditionalOptions="/MP"
|
||||
/>
|
||||
@@ -43,20 +43,4 @@
|
||||
Name="GtkDefines"
|
||||
Value="GTK_COMPILATION;G_LOG_DOMAIN=\"Gtk\";GTK_HOST=\"i686-pc-vs$(VSVer)\";GTK_PRINT_BACKENDS=\"file\";GTK_PRINT_BACKEND_ENABLE_UNSUPPORTED;$(GtkIncludedImmodulesDefines);GTK_LIBDIR=\"$(GtkDummyPrefix)/lib\";GTK_DATADIR=\"$(GtkDummyPrefix)/share\"GTK_DATA_PREFIX=\"$(GtkDummyPrefix)\";GTK_SYSCONFDIR=\"$(GtkDummyPrefix)/etc\";MULTIPRESS_CONFDIR=\"$(GtkDummyPrefix)/etc/gtk-$(ApiVersion)\";MULTIPRESS_LOCALEDIR=\"$(GtkDummyPrefix)/share/locale\";GTK_VERSION=\"$(GtkVersion)/etc\";GTK_BINARY_VERSION=\"$(GtkBinaryVersion)/etc\";GDK_DISABLE_DEPRECATED;ISOLATION_AWARE_ENABLED"
|
||||
/>
|
||||
<UserMacro
|
||||
Name="GtkGdkCommonLibs"
|
||||
Value="imm32.lib"
|
||||
/>
|
||||
<UserMacro
|
||||
Name="GdkBroadwayAdditionalLibs"
|
||||
Value="ws2_32.lib"
|
||||
/>
|
||||
<UserMacro
|
||||
Name="GdkAdditionalLibs"
|
||||
Value="winmm.lib dwmapi.lib setupapi.lib $(GtkGdkCommonLibs)"
|
||||
/>
|
||||
<UserMacro
|
||||
Name="GtkAdditionalLibs"
|
||||
Value="atk-1.0.lib pangowin32-1.0.lib winspool.lib comctl32.lib $(GtkGdkCommonLibs)"
|
||||
/>
|
||||
</VisualStudioPropertySheet>
|
||||
|
@@ -54,25 +54,17 @@ echo $(ConfigurationName) > ..\..\..\MSVC_$(ConfigurationName)_Broadway
|
||||
:DONE_GDKCONFIG_H

|
||||
"
|
||||
/>
|
||||
<UserMacro
|
||||
Name="GDbusCodeGenCmd"
|
||||
Value="$(GlibEtcInstallRoot)\bin\gdbus-codegen --interface-prefix org.Gtk. --c-namespace _Gtk --generate-c-code gtkdbusgenerated ./gtkdbusinterfaces.xml"
|
||||
/>
|
||||
<UserMacro
|
||||
Name="GenerateGtkDbusBuiltSources"
|
||||
Value="cd ..\..\..\gtk & $(PythonPath)\python $(GDbusCodeGenCmd) & cd $(SolutionDir)"
|
||||
Value="
|
||||
cd ..\..\..\gtk

|
||||
$(PythonPath)\python $(GlibEtcInstallRoot)\bin\gdbus-codegen --interface-prefix org.Gtk. --c-namespace _Gtk --generate-c-code gtkdbusgenerated ./gtkdbusinterfaces.xml

|
||||
cd $(SolutionDir)

|
||||
"
|
||||
/>
|
||||
<UserMacro
|
||||
Name="GenerateGtkDbusBuiltSourcesX64"
|
||||
Value="cd ..\..\..\gtk & $(PythonPathX64)\python $(GDbusCodeGenCmd) & cd $(SolutionDir)"
|
||||
/>
|
||||
<UserMacro
|
||||
Name="CopyGtkWin32RC"
|
||||
Value="copy ..\..\..\gtk\gtk-win32.rc.body ..\..\..\gtk\gtk-win32.rc"
|
||||
/>
|
||||
<UserMacro
|
||||
Name="GenerateGtkWin32Manifest"
|
||||
Value="$(PythonPath)\python ..\replace.py --action=replace-var --input=..\..\..\gtk\libgtk3.manifest.in --output=..\..\..\gtk\libgtk3.manifest --var=EXE_MANIFEST_ARCHITECTURE --outstring=*"
|
||||
Name="GenerateGtkWin32RC"
|
||||
Value="$(PythonPath)\python ..\process-in-win32.py --gtkwin32rc --gtk3manifest"
|
||||
/>
|
||||
<UserMacro
|
||||
Name="CopyDemosH"
|
||||
|
@@ -28,8 +28,8 @@
|
||||
DeleteExtensionsOnClean=""
|
||||
>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"
|
||||
CommandLine="$(GtkDoInstallBin)$(GtkDoInstall)$(GtkPostInstall)"
|
||||
Name="VCPreBuildEventTool"
|
||||
CommandLine="$(GtkDoInstallBin)$(GtkDoInstall)"
|
||||
/>
|
||||
</Configuration>
|
||||
<Configuration
|
||||
@@ -41,8 +41,8 @@
|
||||
DeleteExtensionsOnClean=""
|
||||
>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"
|
||||
CommandLine="$(GtkDoInstallBin)$(GtkDoInstall)$(GtkPostInstall)"
|
||||
Name="VCPreBuildEventTool"
|
||||
CommandLine="$(GtkDoInstallBin)$(GtkDoInstall)"
|
||||
/>
|
||||
</Configuration>
|
||||
<Configuration
|
||||
@@ -55,8 +55,8 @@
|
||||
DeleteExtensionsOnClean=""
|
||||
>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"
|
||||
CommandLine="$(GtkDoInstallBin)$(GtkDoInstall)$(GtkDoInstallBroadwayHeaders)$(GtkPostInstall)"
|
||||
Name="VCPreBuildEventTool"
|
||||
CommandLine="$(GtkDoInstallBin)$(GtkDoInstall)$(GtkDoInstallBroadwayHeaders)"
|
||||
/>
|
||||
</Configuration>
|
||||
<Configuration
|
||||
@@ -68,8 +68,8 @@
|
||||
DeleteExtensionsOnClean=""
|
||||
>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"
|
||||
CommandLine="$(GtkDoInstallBin)$(GtkDoInstall)$(GtkDoInstallBroadwayHeaders)$(GtkPostInstall)"
|
||||
Name="VCPreBuildEventTool"
|
||||
CommandLine="$(GtkDoInstallBin)$(GtkDoInstall)$(GtkDoInstallBroadwayHeaders)"
|
||||
/>
|
||||
</Configuration>
|
||||
<Configuration
|
||||
@@ -83,8 +83,8 @@
|
||||
WholeProgramOptimization="1"
|
||||
>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"
|
||||
CommandLine="$(GtkDoInstallBin)$(GtkDoInstall)$(GtkPostInstall)"
|
||||
Name="VCPreBuildEventTool"
|
||||
CommandLine="$(GtkDoInstallBin)$(GtkDoInstall)"
|
||||
/>
|
||||
</Configuration>
|
||||
<Configuration
|
||||
@@ -97,8 +97,8 @@
|
||||
WholeProgramOptimization="1"
|
||||
>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"
|
||||
CommandLine="$(GtkDoInstallBin)$(GtkDoInstall)$(GtkPostInstall)"
|
||||
Name="VCPreBuildEventTool"
|
||||
CommandLine="$(GtkDoInstallBin)$(GtkDoInstall)"
|
||||
/>
|
||||
</Configuration>
|
||||
<Configuration
|
||||
@@ -112,8 +112,8 @@
|
||||
WholeProgramOptimization="1"
|
||||
>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"
|
||||
CommandLine="$(GtkDoInstallBin)$(GtkDoInstall)$(GtkDoInstallBroadwayHeaders)$(GtkPostInstall)"
|
||||
Name="VCPreBuildEventTool"
|
||||
CommandLine="$(GtkDoInstallBin)$(GtkDoInstall)$(GtkDoInstallBroadwayHeaders)"
|
||||
/>
|
||||
</Configuration>
|
||||
<Configuration
|
||||
@@ -126,78 +126,14 @@
|
||||
WholeProgramOptimization="1"
|
||||
>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"
|
||||
CommandLine="$(GtkDoInstallBin)$(GtkDoInstall)$(GtkDoInstallBroadwayHeaders)$(GtkPostInstall)"
|
||||
Name="VCPreBuildEventTool"
|
||||
CommandLine="$(GtkDoInstallBin)$(GtkDoInstall)$(GtkDoInstallBroadwayHeaders)"
|
||||
/>
|
||||
</Configuration>
|
||||
</Configurations>
|
||||
<References>
|
||||
</References>
|
||||
<Files>
|
||||
<Filter
|
||||
Name="Resource Files"
|
||||
Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx"
|
||||
UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"
|
||||
>
|
||||
<File RelativePath="..\..\..\gtkpc.py">
|
||||
<FileConfiguration Name="Debug|Win32">
|
||||
<Tool Name="VCCustomBuildTool"
|
||||
Description="Generating .pc files..."
|
||||
CommandLine="$(GenerateGtkPC)"
|
||||
Outputs="..\gdk-3.0.pc;..\gtk+-3.0.pc;..\gail-3.0.pc"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration Name="Release|Win32">
|
||||
<Tool Name="VCCustomBuildTool"
|
||||
Description="Generating .pc files..."
|
||||
CommandLine="$(GenerateGtkPC)"
|
||||
Outputs="..\gdk-3.0.pc;..\gtk+-3.0.pc;..\gail-3.0.pc"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration Name="Debug|x64">
|
||||
<Tool Name="VCCustomBuildTool"
|
||||
Description="Generating .pc files..."
|
||||
CommandLine="$(GenerateGtkPCX64)"
|
||||
Outputs="..\gdk-3.0.pc;..\gtk+-3.0.pc;..\gail-3.0.pc"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration Name="Release|x64">
|
||||
<Tool Name="VCCustomBuildTool"
|
||||
Description="Generating .pc files..."
|
||||
CommandLine="$(GenerateGtkPCX64)"
|
||||
Outputs="..\gdk-3.0.pc;..\gtk+-3.0.pc;..\gail-3.0.pc"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration Name="Debug_Broadway|Win32">
|
||||
<Tool Name="VCCustomBuildTool"
|
||||
Description="Generating .pc files..."
|
||||
CommandLine="$(GenerateGtkPC) --broadway"
|
||||
Outputs="..\gdk-3.0.pc;..\gtk+-3.0.pc;..\gail-3.0.pc"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration Name="Release_Broadway|Win32">
|
||||
<Tool Name="VCCustomBuildTool"
|
||||
Description="Generating .pc files..."
|
||||
CommandLine="$(GenerateGtkPC) --broadway"
|
||||
Outputs="..\gdk-3.0.pc;..\gtk+-3.0.pc;..\gail-3.0.pc"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration Name="Debug_Broadway|x64">
|
||||
<Tool Name="VCCustomBuildTool"
|
||||
Description="Generating .pc files..."
|
||||
CommandLine="$(GenerateGtkPCX64) --broadway"
|
||||
Outputs="..\gdk-3.0.pc;..\gtk+-3.0.pc;..\gail-3.0.pc"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration Name="Release_Broadway|x64">
|
||||
<Tool Name="VCCustomBuildTool"
|
||||
Description="Generating .pc files..."
|
||||
CommandLine="$(GenerateGtkPCX64) --broadway"
|
||||
Outputs="..\gdk-3.0.pc;..\gtk+-3.0.pc;..\gail-3.0.pc"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
</File>
|
||||
</Filter>
|
||||
</Files>
|
||||
<Globals>
|
||||
</Globals>
|
||||
|
@@ -1,15 +1,15 @@
|
||||
<?xml version="1.0" encoding="Windows-1252"?>
|
||||
<VisualStudioPropertySheet
|
||||
ProjectType="Visual C++"
|
||||
Version="8.00"
|
||||
Name="gtkinstallprops"
|
||||
InheritedPropertySheets=".\gtk3-build-defines.vsprops"
|
||||
>
|
||||
<UserMacro
|
||||
Name="GtkDoInstallBin"
|
||||
Value="
|
||||
ProjectType="Visual C++"
|
||||
Version="8.00"
|
||||
Name="gtkinstallprops"
|
||||
InheritedPropertySheets=".\gtk3-build-defines.vsprops"
|
||||
>
|
||||
<UserMacro
|
||||
Name="GtkDoInstallBin"
|
||||
Value="
|
||||
mkdir $(CopyDir)\bin

|
||||
mkdir $(CopyDir)\lib\pkgconfig

|
||||
mkdir $(CopyDir)\lib

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

|
||||
copy $(ConfigurationName)\$(PlatformName)\bin\$(GtkDllPrefix)gdk-3$(GtkDllSuffix).pdb $(CopyDir)\bin

|
||||
@@ -90,15 +90,11 @@ copy .\Debug\$(PlatformName)\bin\gtk-query-settings.pdb $(CopyDir)\bin
�
|
||||
copy .\Debug\$(PlatformName)\bin\gtk-builder-tool.exe $(CopyDir)\bin

|
||||
copy .\Debug\$(PlatformName)\bin\gtk-builder-tool.pdb $(CopyDir)\bin

|
||||
:DONE_BIN

|
||||
|
||||
copy ..\gdk-3.0.pc $(CopyDir)\lib\pkgconfig

|
||||
copy "..\gtk+-3.0.pc" $(CopyDir)\lib\pkgconfig

|
||||
copy ..\gail-3.0.pc $(CopyDir)\lib\pkgconfig

|
||||
"
|
||||
/>
|
||||
<UserMacro
|
||||
Name="GtkDoInstall"
|
||||
Value="
|
||||
"
|
||||
/>
|
||||
<UserMacro
|
||||
Name="GtkDoInstall"
|
||||
Value="
|
||||
echo off

|
||||
mkdir $(CopyDir)\include\gtk-$(ApiVersion)\gdk\win32

|
||||
mkdir $(CopyDir)\include\gtk-$(ApiVersion)\gdk\deprecated

|
||||
@@ -132,32 +128,20 @@ copy ..\..\..\gtk\org.gtk.Settings.FileChooser.gschema.xml $(CopyDir)\share\glib
|
||||
copy ..\..\..\gtk\org.gtk.Settings.ColorChooser.gschema.xml $(CopyDir)\share\glib-2.0\schemas

|
||||
copy ..\..\..\gtk\org.gtk.Settings.Debug.gschema.xml $(CopyDir)\share\glib-2.0\schemas

|
||||
copy ..\..\..\demos\gtk-demo\org.gtk.Demo.gschema.xml $(CopyDir)\share\glib-2.0\schemas

|
||||
"
|
||||
/>
|
||||
<UserMacro
|
||||
Name="GtkPostInstall"
|
||||
Value="
|
||||
|
||||
echo "Compiling gsettings XML Files..."

|
||||
$(GlibEtcInstallRoot)\bin\glib-compile-schemas.exe $(CopyDir)\share\glib-2.0\schemas

|
||||
|
||||
echo "Generating icon cache..."

|
||||
$(CopyDir)\bin\gtk-update-icon-cache.exe --ignore-theme-index --force "$(CopyDir)\share\icons\hicolor"
|
||||
"
|
||||
/>
|
||||
<UserMacro
|
||||
Name="GtkDoInstallBroadwayHeaders"
|
||||
Value="
|
||||
"
|
||||
/>
|
||||
<UserMacro
|
||||
Name="GtkDoInstallBroadwayHeaders"
|
||||
Value="
|
||||
copy ..\..\..\gdk\broadway\gdkbroadway.h $(CopyDir)\include\gtk-$(ApiVersion)\gdk

|
||||
mkdir $(CopyDir)\include\gtk-$(ApiVersion)\gdk\broadway

|
||||
#include "gdk3-broadway.headers"
|
||||
"
|
||||
/>
|
||||
<UserMacro
|
||||
Name="GenerateGtkPC"
|
||||
Value="$(PythonPath)\python ..\gtkpc.py --prefix=$(CopyDir) --version=$(GtkVersion) --host=i686-pc-vs$(VSVer)"
|
||||
/>
|
||||
<UserMacro
|
||||
Name="GenerateGtkPCX64"
|
||||
Value="$(PythonPathX64)\python ..\gtkpc.py --prefix=$(CopyDir) --version=$(GtkVersion) --host=x86_64-pc-vs$(VSVer)"
|
||||
/>
|
||||
/>
|
||||
</VisualStudioPropertySheet>
|
||||
|
@@ -54,8 +54,4 @@
|
||||
Name="PythonPath"
|
||||
Value="c:\python27"
|
||||
/>
|
||||
<UserMacro
|
||||
Name="PythonPathX64"
|
||||
Value="$(PythonPath).x64"
|
||||
/>
|
||||
</VisualStudioPropertySheet>
|
||||
|
@@ -50,14 +50,6 @@
|
||||
/* Define to 1 if you have the <dlfcn.h> header file. */
|
||||
/* #undef HAVE_DLFCN_H */
|
||||
|
||||
/* Define to 1 if you have the `exp2' function. */
|
||||
#if !defined (_MSC_VER) || (_MSC_VER >= 1800)
|
||||
#define HAVE_EXP2 1
|
||||
#endif
|
||||
|
||||
/* Define to 1 if you have the `flockfile' function. */
|
||||
#undef HAVE_FLOCKFILE
|
||||
|
||||
/* Define to 1 if you have the <ftw.h> header file. */
|
||||
/* #undef HAVE_FTW_H */
|
||||
|
||||
@@ -110,11 +102,6 @@
|
||||
/* Define to 1 if you have the `localtime_r' function. */
|
||||
/* #undef HAVE_LOCALTIME_R */
|
||||
|
||||
/* Define to 1 if you have the `log2' function. */
|
||||
#if !defined (_MSC_VER) || (_MSC_VER >= 1800)
|
||||
#define HAVE_LOG2 1
|
||||
#endif
|
||||
|
||||
/* Define to 1 if you have the `lstat' function. */
|
||||
/* #undef HAVE_LSTAT */
|
||||
|
||||
@@ -243,9 +230,6 @@
|
||||
/* Have the SYNC extension library */
|
||||
/* #undef HAVE_XSYNC */
|
||||
|
||||
/* Define to 1 if you have the `_lock_file' function. */
|
||||
#define HAVE__LOCK_FILE
|
||||
|
||||
/* Define if _NL_MEASUREMENT_MEASUREMENT is available */
|
||||
/* #undef HAVE__NL_MEASUREMENT_MEASUREMENT */
|
||||
|
||||
@@ -320,7 +304,7 @@
|
||||
/* 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 */
|
||||
/* defines how to decorate public symbols while building */
|
||||
#ifdef _MSC_VER
|
||||
#define _GDK_EXTERN __declspec (dllexport) extern
|
||||
#else
|
||||
|
148
configure.ac
148
configure.ac
@@ -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], [21])
|
||||
m4_define([gtk_micro_version], [3])
|
||||
m4_define([gtk_minor_version], [19])
|
||||
m4_define([gtk_micro_version], [5])
|
||||
m4_define([gtk_interface_age], [0])
|
||||
m4_define([gtk_binary_age],
|
||||
[m4_eval(100 * gtk_minor_version + gtk_micro_version)])
|
||||
@@ -42,8 +42,8 @@ m4_define([gtk_binary_version], [3.0.0])
|
||||
|
||||
# required versions of other packages
|
||||
m4_define([glib_required_major], [2])
|
||||
m4_define([glib_required_minor], [49])
|
||||
m4_define([glib_required_micro], [1])
|
||||
m4_define([glib_required_minor], [45])
|
||||
m4_define([glib_required_micro], [8])
|
||||
m4_define([glib_required_version],
|
||||
[glib_required_major.glib_required_minor.glib_required_micro])
|
||||
m4_define([glib_min_required_minor],
|
||||
@@ -59,8 +59,8 @@ m4_define([atk_required_version], [2.15.1])
|
||||
m4_define([cairo_required_version], [1.14.0])
|
||||
m4_define([gdk_pixbuf_required_version], [2.30.0])
|
||||
m4_define([introspection_required_version], [1.39.0])
|
||||
m4_define([wayland_required_version], [1.9.91])
|
||||
m4_define([wayland_protocols_required_version], [1.3])
|
||||
m4_define([wayland_required_version], [1.5.91])
|
||||
m4_define([wayland_protocols_required_version], [1.0])
|
||||
m4_define([mirclient_required_version], [0.11.0])
|
||||
m4_define([mircookie_required_version], [0.17.0])
|
||||
m4_define([epoxy_required_version], [1.0])
|
||||
@@ -161,10 +161,6 @@ AC_PROG_MKDIR_P
|
||||
AC_PROG_INSTALL
|
||||
AC_PROG_MAKE_SET
|
||||
|
||||
# i18n stuff
|
||||
AM_GNU_GETTEXT([external])
|
||||
AM_GNU_GETTEXT_VERSION([0.19.7])
|
||||
|
||||
GETTEXT_PACKAGE=gtk30
|
||||
AC_SUBST(GETTEXT_PACKAGE)
|
||||
AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE, "$GETTEXT_PACKAGE",
|
||||
@@ -389,7 +385,7 @@ if test "$enable_win32_backend" = "yes"; then
|
||||
backend_immodules="$backend_immodules,ime"
|
||||
GDK_WINDOWING="$GDK_WINDOWING
|
||||
#define GDK_WINDOWING_WIN32"
|
||||
GDK_EXTRA_LIBS="$GDK_EXTRA_LIBS -lgdi32 -limm32 -lshell32 -lole32 -Wl,-luuid -lwinmm -ldwmapi -lsetupapi -lcfgmgr32"
|
||||
GDK_EXTRA_LIBS="$GDK_EXTRA_LIBS -lgdi32 -limm32 -lshell32 -lole32 -Wl,-luuid -lwinmm -ldwmapi"
|
||||
AM_CONDITIONAL(USE_WIN32, true)
|
||||
PANGO_PACKAGES="pangowin32 pangocairo"
|
||||
else
|
||||
@@ -417,7 +413,7 @@ AC_SUBST(DISABLE_ON_QUARTZ)
|
||||
AC_CHECK_LIB([rt], [shm_open], [SHM_LIBS="-lrt"], [SHM_LIBS=""])
|
||||
AC_SUBST(SHM_LIBS)
|
||||
|
||||
AC_CHECK_FUNCS(posix_fallocate flockfile _lock_file)
|
||||
AC_CHECK_FUNCS(posix_fallocate)
|
||||
|
||||
if test "x$enable_broadway_backend" = xyes; then
|
||||
GDK_BACKENDS="$GDK_BACKENDS broadway"
|
||||
@@ -584,22 +580,19 @@ PKG_CHECK_MODULES(BASE_DEPENDENCIES,
|
||||
|
||||
PKG_CHECK_MODULES(CAIRO_BACKEND, [$cairo_backends])
|
||||
|
||||
# Remove this check once cairo_required_version reaches at least 1.16.0
|
||||
AS_CASE([$host_os],
|
||||
[mingw*],
|
||||
[
|
||||
# Remove this check once cairo_required_version reaches at least 1.14.4
|
||||
case $host_os in
|
||||
mingw*)
|
||||
PKG_CHECK_MODULES(CAIRO, [cairo >= cairo_required_version])
|
||||
gtk_save_LIBS="$LIBS"
|
||||
LIBS="$CAIRO_LIBS $LIBS"
|
||||
AC_CHECK_LIB([cairo], [cairo_win32_surface_create_with_format],
|
||||
[AC_MSG_RESULT([found])],
|
||||
[AC_MSG_ERROR(
|
||||
[cairo_win32_surface_create_with_format is not found in cairo library
|
||||
You need a cairo snapshot 1.15.x or 1.16.x release or newer])])
|
||||
LIBS="$gtk_save_LIBS"
|
||||
],
|
||||
[]
|
||||
)
|
||||
You need cairo version newer than 2015-04-14])])
|
||||
;;
|
||||
*)
|
||||
;;
|
||||
esac
|
||||
|
||||
|
||||
PKG_CHECK_MODULES(GMODULE, [gmodule-2.0])
|
||||
@@ -689,7 +682,46 @@ if test "$gtk_ok" = "yes"; then
|
||||
[Define if _NL_PAPER_WIDTH is available])
|
||||
fi
|
||||
|
||||
# i18n stuff
|
||||
ALL_LINGUAS="`grep -v '^#' "$srcdir/po/LINGUAS" | tr '\n' ' '`"
|
||||
AM_GLIB_GNU_GETTEXT
|
||||
|
||||
AC_MSG_CHECKING([whether xgettext supports ui files])
|
||||
if $ac_cv_path_XGETTEXT --output=- --color=no --language=Glade $srcdir/gtk/ui/gtkfilechooserwidget.ui > /dev/null 2>&1; then
|
||||
AC_MSG_RESULT([yes])
|
||||
else
|
||||
AC_MSG_RESULT([no])
|
||||
AC_MSG_ERROR([GNU gettext 0.18.3 or newer is required])
|
||||
fi
|
||||
|
||||
LIBS="$LIBS $INTLLIBS"
|
||||
AC_CONFIG_COMMANDS([po-properties],
|
||||
[[case "$CONFIG_FILES" in *po-properties/Makefile.in*)
|
||||
sed -e "/POTFILES =/r po-properties/POTFILES" po-properties/Makefile.in > po-properties/Makefile
|
||||
esac]],
|
||||
[[]])
|
||||
|
||||
dnl Snippet below is copied from AM_GLIB_GNU_GETTEXT to generate a first
|
||||
dnl po-properties/POTFILES during configure; see GNOME #573515.
|
||||
dnl
|
||||
dnl Generate list of files to be processed by xgettext which will
|
||||
dnl be included in po-properties/Makefile.
|
||||
test -d po-properties || mkdir po-properties
|
||||
if test "x$srcdir" != "x."; then
|
||||
if test "x`echo $srcdir | sed 's@/.*@@'`" = "x"; then
|
||||
popropsrcprefix="$srcdir/"
|
||||
else
|
||||
popropsrcprefix="../$srcdir/"
|
||||
fi
|
||||
else
|
||||
popropsrcprefix="../"
|
||||
fi
|
||||
rm -f po-properties/POTFILES
|
||||
sed -e "/^#/d" -e "/^\$/d" -e "s,.*, $popropsrcprefix& \\\\," -e "\$s/\(.*\) \\\\/\1/" \
|
||||
< $srcdir/po-properties/POTFILES.in > po-properties/POTFILES
|
||||
dnl (End of adapted AM_GLIB_GNU_GETTEXT snippet.)
|
||||
|
||||
AM_GLIB_DEFINE_LOCALEDIR(GTK_LOCALEDIR)
|
||||
|
||||
dnl The DU4 header files don't provide library prototypes unless
|
||||
dnl -std1 is given to the native cc.
|
||||
@@ -724,54 +756,6 @@ case $host in
|
||||
;;
|
||||
esac
|
||||
|
||||
AS_CASE([$host_os],
|
||||
[mingw*],
|
||||
[
|
||||
AC_CHECK_SIZEOF(
|
||||
[DISPLAYCONFIG_VIDEO_OUTPUT_TECHNOLOGY],
|
||||
[],
|
||||
[
|
||||
#define _WIN32_WINNT 0x601
|
||||
#include <windows.h>
|
||||
]
|
||||
)
|
||||
AS_IF(
|
||||
[test x$ac_cv_sizeof_DISPLAYCONFIG_VIDEO_OUTPUT_TECHNOLOGY = x4],
|
||||
[AC_MSG_RESULT([DISPLAYCONFIG_VIDEO_OUTPUT_TECHNOLOGY is OK])],
|
||||
[test x$ac_cv_sizeof_DISPLAYCONFIG_VIDEO_OUTPUT_TECHNOLOGY = x0],
|
||||
[AC_MSG_ERROR([DISPLAYCONFIG_VIDEO_OUTPUT_TECHNOLOGY is unavailable])],
|
||||
[AC_MSG_RESULT([DISPLAYCONFIG_VIDEO_OUTPUT_TECHNOLOGY is not OK])]
|
||||
)
|
||||
AC_MSG_CHECKING([for SetupDiGetDevicePropertyW])
|
||||
gtk_save_LIBS="$LIBS"
|
||||
LIBS="-lsetupapi $LIBS"
|
||||
AC_TRY_LINK(
|
||||
[
|
||||
#define _WIN32_WINNT 0x0600
|
||||
#include <windows.h>
|
||||
#include <devpropdef.h>
|
||||
#include <setupapi.h>
|
||||
],
|
||||
[return SetupDiGetDevicePropertyW(NULL, NULL, NULL, NULL, NULL, 0, NULL, 0);],
|
||||
[have_SetupDiGetDevicePropertyW=yes],
|
||||
[have_SetupDiGetDevicePropertyW=no]
|
||||
)
|
||||
AS_IF(
|
||||
[test x$have_SetupDiGetDevicePropertyW = xyes],
|
||||
[
|
||||
AC_DEFINE(
|
||||
[HAVE_SETUP_DI_GET_DEVICE_PROPERTY_W],
|
||||
[1],
|
||||
[Define to 1 if SetupDiGetDevicePropertyW() is available]
|
||||
)
|
||||
]
|
||||
)
|
||||
AC_MSG_RESULT([$have_SetupDiGetDevicePropertyW])
|
||||
LIBS="$gtk_save_LIBS"
|
||||
],
|
||||
[]
|
||||
)
|
||||
|
||||
AC_SUBST(MATH_LIB)
|
||||
#
|
||||
# see bug 162979
|
||||
@@ -810,9 +794,6 @@ LIBS="$LIBS $GLIB_LIBS"
|
||||
AC_CHECK_FUNCS(bind_textdomain_codeset)
|
||||
LIBS=$gtk_save_LIBS
|
||||
|
||||
AC_CHECK_HEADERS(linux/memfd.h,
|
||||
AC_DEFINE(HAVE_LINUX_MEMFD_H, 1,
|
||||
[Define to 1 if memfd.h is available]))
|
||||
AC_CHECK_HEADERS(sys/mman.h,
|
||||
AC_DEFINE(HAVE_SYS_MMAN_H, 1,
|
||||
[Define to 1 if mman.h is available]))
|
||||
@@ -865,7 +846,7 @@ AC_TYPE_UID_T
|
||||
|
||||
# Check for round(), rint(), isnan(), isinf() and nearbyint()
|
||||
AC_CHECK_LIB(m,round,,)
|
||||
AC_CHECK_FUNCS(round rint nearbyint sincos exp2 log2)
|
||||
AC_CHECK_FUNCS(round rint nearbyint sincos)
|
||||
AC_CHECK_DECLS([isnan, isinf], [], [], [[#include <math.h>]])
|
||||
|
||||
# Checks for gdkspawn
|
||||
@@ -1491,7 +1472,7 @@ else
|
||||
CUPS_API_MAJOR=`echo $ECHO_N $CUPS_API_VERSION | awk -F. '{print $1}'`
|
||||
CUPS_API_MINOR=`echo $ECHO_N $CUPS_API_VERSION | awk -F. '{print $2}'`
|
||||
|
||||
if test $CUPS_API_MAJOR -lt 1 -o \
|
||||
if test $CUPS_API_MAJOR -gt 1 -o \
|
||||
$CUPS_API_MAJOR -eq 1 -a $CUPS_API_MINOR -lt 2; then
|
||||
AC_MSG_ERROR([CUPS >= 1.2 not found])
|
||||
fi
|
||||
@@ -1709,15 +1690,6 @@ if test "$have_colord" = "yes"; then
|
||||
fi
|
||||
AM_CONDITIONAL(HAVE_COLORD, test "x$have_colord" = "xyes")
|
||||
|
||||
##################################################
|
||||
# Check for harfbuzz and pangoft2
|
||||
##################################################
|
||||
|
||||
PKG_CHECK_MODULES(FONTDEMO, harfbuzz >= 0.9 pangoft2, build_font_demo=yes, build_font_demo=no)
|
||||
AC_SUBST(FONTDEMO_CFLAGS)
|
||||
AC_SUBST(FONTDEMO_LIBS)
|
||||
AM_CONDITIONAL(BUILD_FONT_DEMO, [ test "x$build_font_demo" = xyes ])
|
||||
|
||||
##################################################
|
||||
# Checks for gtk-doc and docbook-tools
|
||||
##################################################
|
||||
@@ -1922,8 +1894,6 @@ testsuite/a11y/Makefile
|
||||
testsuite/a11y/state/Makefile
|
||||
testsuite/css/Makefile
|
||||
testsuite/css/parser/Makefile
|
||||
testsuite/css/nodes/Makefile
|
||||
testsuite/css/style/Makefile
|
||||
testsuite/gdk/Makefile
|
||||
testsuite/gtk/Makefile
|
||||
testsuite/reftests/Makefile
|
||||
@@ -1939,7 +1909,9 @@ docs/reference/libgail-util/Makefile
|
||||
docs/reference/libgail-util/version.xml
|
||||
docs/tools/Makefile
|
||||
build/Makefile
|
||||
build/gtk-introspection-msvc.mak
|
||||
build/win32/Makefile
|
||||
build/win32/crypt/Makefile
|
||||
build/win32/vs9/Makefile
|
||||
build/win32/vs9/gtk3-version-paths.vsprops
|
||||
build/win32/vs10/Makefile
|
||||
@@ -1960,7 +1932,7 @@ gdk/gdkversionmacros.h
|
||||
gtk/Makefile
|
||||
gtk/makefile.msc
|
||||
gtk/gtkversion.h
|
||||
gtk/gtk-win32.rc.body
|
||||
gtk/gtk-win32.rc
|
||||
gtk/libgtk3.manifest
|
||||
libgail-util/Makefile
|
||||
modules/Makefile
|
||||
|
@@ -4,7 +4,7 @@ include $(top_srcdir)/Makefile.decl
|
||||
## These should be in the order you want them to appear in the
|
||||
## demo app, which means alphabetized by demo title, not filename
|
||||
demos_base = \
|
||||
application_demo.c \
|
||||
application.c \
|
||||
assistant.c \
|
||||
builder.c \
|
||||
button_box.c \
|
||||
@@ -26,7 +26,7 @@ demos_base = \
|
||||
event_axes.c \
|
||||
expander.c \
|
||||
filtermodel.c \
|
||||
foreigndrawing.c \
|
||||
font_features.c \
|
||||
gestures.c \
|
||||
glarea.c \
|
||||
headerbar.c \
|
||||
@@ -70,18 +70,12 @@ demos_base = \
|
||||
transparent.c \
|
||||
tree_store.c
|
||||
|
||||
demos_opt =
|
||||
|
||||
if BUILD_FONT_DEMO
|
||||
demos_opt += font_features.c
|
||||
endif
|
||||
|
||||
if OS_UNIX
|
||||
demos_opt += pagesetup.c
|
||||
demos = $(demos_base) pagesetup.c
|
||||
else
|
||||
demos = $(demos_base)
|
||||
endif
|
||||
|
||||
demos = $(demos_base) $(demos_opt)
|
||||
|
||||
AM_CPPFLAGS = \
|
||||
-I$(top_srcdir) \
|
||||
-I$(top_builddir)/gdk \
|
||||
@@ -100,11 +94,6 @@ LDADDS = \
|
||||
$(GDK_DEP_LIBS) \
|
||||
-lm
|
||||
|
||||
if BUILD_FONT_DEMO
|
||||
AM_CPPFLAGS += $(FONTDEMO_CFLAGS)
|
||||
LDADDS += $(FONTDEMO_LIBS)
|
||||
endif
|
||||
|
||||
bin_PROGRAMS = gtk3-demo gtk3-demo-application
|
||||
|
||||
desktopdir = $(datadir)/applications
|
||||
@@ -143,7 +132,7 @@ gtk3_demo_LDADD = $(LDADDS)
|
||||
gtk3_demo_LDFLAGS = -export-dynamic
|
||||
|
||||
gtk3_demo_application_SOURCES = \
|
||||
application.c \
|
||||
application-standalone.c \
|
||||
demo_resources.c
|
||||
|
||||
gtk3_demo_application_LDADD = $(LDADDS)
|
||||
@@ -187,7 +176,7 @@ uninstall-update-icon-cache:
|
||||
MSVCPROJS = gtk3-demo gtk3-demo-application
|
||||
|
||||
gtk3_demo_FILES = $(gtk3_demo_SOURCES)
|
||||
gtk3_demo_EXCLUDES = font_features.c|pagesetup.c
|
||||
gtk3_demo_EXCLUDES = pagesetup.c
|
||||
|
||||
gtk3_demo_application_FILES = $(gtk3_demo_application_SOURCES)
|
||||
gtk3_demo_application_EXCLUDES = dummy
|
||||
|
3
demos/gtk-demo/application-standalone.c
Normal file
3
demos/gtk-demo/application-standalone.c
Normal file
@@ -0,0 +1,3 @@
|
||||
#define STANDALONE
|
||||
|
||||
#include "application.c"
|
@@ -1,31 +1,17 @@
|
||||
/* Application Class
|
||||
*
|
||||
* Demonstrates a simple application.
|
||||
*
|
||||
* This examples uses GtkApplication, GtkApplicationWindow, GtkBuilder
|
||||
* as well as GMenu and GResource. Due to the way GtkApplication is structured,
|
||||
* it is run as a separate process.
|
||||
*/
|
||||
|
||||
#include "config.h"
|
||||
|
||||
#include <gtk/gtk.h>
|
||||
|
||||
typedef GtkApplication DemoApplication;
|
||||
typedef GtkApplicationClass DemoApplicationClass;
|
||||
|
||||
G_DEFINE_TYPE (DemoApplication, demo_application, GTK_TYPE_APPLICATION)
|
||||
|
||||
typedef struct {
|
||||
GtkApplicationWindow parent_instance;
|
||||
|
||||
GtkWidget *message;
|
||||
GtkWidget *infobar;
|
||||
GtkWidget *status;
|
||||
GtkWidget *menutool;
|
||||
GMenuModel *toolmenu;
|
||||
GtkTextBuffer *buffer;
|
||||
|
||||
int width;
|
||||
int height;
|
||||
gboolean maximized;
|
||||
gboolean fullscreen;
|
||||
} DemoApplicationWindow;
|
||||
typedef GtkApplicationWindowClass DemoApplicationWindowClass;
|
||||
|
||||
G_DEFINE_TYPE (DemoApplicationWindow, demo_application_window, GTK_TYPE_APPLICATION_WINDOW)
|
||||
#ifdef STANDALONE
|
||||
|
||||
static void create_window (GApplication *app, const char *contents);
|
||||
|
||||
@@ -53,9 +39,10 @@ show_action_dialog (GSimpleAction *action)
|
||||
static void
|
||||
show_action_infobar (GSimpleAction *action,
|
||||
GVariant *parameter,
|
||||
gpointer data)
|
||||
gpointer window)
|
||||
{
|
||||
DemoApplicationWindow *window = data;
|
||||
GtkWidget *infobar;
|
||||
GtkWidget *message;
|
||||
gchar *text;
|
||||
const gchar *name;
|
||||
const gchar *value;
|
||||
@@ -63,25 +50,27 @@ show_action_infobar (GSimpleAction *action,
|
||||
name = g_action_get_name (G_ACTION (action));
|
||||
value = g_variant_get_string (parameter, NULL);
|
||||
|
||||
message = g_object_get_data (G_OBJECT (window), "message");
|
||||
infobar = g_object_get_data (G_OBJECT (window), "infobar");
|
||||
text = g_strdup_printf ("You activated radio action: \"%s\".\n"
|
||||
"Current value: %s", name, value);
|
||||
gtk_label_set_text (GTK_LABEL (window->message), text);
|
||||
gtk_widget_show (window->infobar);
|
||||
gtk_label_set_text (GTK_LABEL (message), text);
|
||||
gtk_widget_show (infobar);
|
||||
g_free (text);
|
||||
}
|
||||
|
||||
static void
|
||||
activate_action (GSimpleAction *action,
|
||||
GVariant *parameter,
|
||||
gpointer user_data)
|
||||
activate_action (GSimpleAction *action,
|
||||
GVariant *parameter,
|
||||
gpointer user_data)
|
||||
{
|
||||
show_action_dialog (action);
|
||||
}
|
||||
|
||||
static void
|
||||
activate_new (GSimpleAction *action,
|
||||
GVariant *parameter,
|
||||
gpointer user_data)
|
||||
activate_new (GSimpleAction *action,
|
||||
GVariant *parameter,
|
||||
gpointer user_data)
|
||||
{
|
||||
GApplication *app = user_data;
|
||||
|
||||
@@ -90,8 +79,8 @@ activate_new (GSimpleAction *action,
|
||||
|
||||
static void
|
||||
open_response_cb (GtkNativeDialog *dialog,
|
||||
gint response_id,
|
||||
gpointer user_data)
|
||||
gint response_id,
|
||||
gpointer user_data)
|
||||
{
|
||||
GtkFileChooserNative *native = user_data;
|
||||
GApplication *app = g_object_get_data (G_OBJECT (native), "app");
|
||||
@@ -130,9 +119,9 @@ open_response_cb (GtkNativeDialog *dialog,
|
||||
|
||||
|
||||
static void
|
||||
activate_open (GSimpleAction *action,
|
||||
GVariant *parameter,
|
||||
gpointer user_data)
|
||||
activate_open (GSimpleAction *action,
|
||||
GVariant *parameter,
|
||||
gpointer user_data)
|
||||
{
|
||||
GApplication *app = user_data;
|
||||
GtkFileChooserNative *native;
|
||||
@@ -239,8 +228,8 @@ activate_quit (GSimpleAction *action,
|
||||
}
|
||||
|
||||
static void
|
||||
update_statusbar (GtkTextBuffer *buffer,
|
||||
DemoApplicationWindow *window)
|
||||
update_statusbar (GtkTextBuffer *buffer,
|
||||
GtkStatusbar *statusbar)
|
||||
{
|
||||
gchar *msg;
|
||||
gint row, col;
|
||||
@@ -248,7 +237,7 @@ update_statusbar (GtkTextBuffer *buffer,
|
||||
GtkTextIter iter;
|
||||
|
||||
/* clear any previous message, underflow is allowed */
|
||||
gtk_statusbar_pop (GTK_STATUSBAR (window->status), 0);
|
||||
gtk_statusbar_pop (statusbar, 0);
|
||||
|
||||
count = gtk_text_buffer_get_char_count (buffer);
|
||||
|
||||
@@ -262,18 +251,18 @@ update_statusbar (GtkTextBuffer *buffer,
|
||||
msg = g_strdup_printf ("Cursor at row %d column %d - %d chars in document",
|
||||
row, col, count);
|
||||
|
||||
gtk_statusbar_push (GTK_STATUSBAR (window->status), 0, msg);
|
||||
gtk_statusbar_push (statusbar, 0, msg);
|
||||
|
||||
g_free (msg);
|
||||
}
|
||||
|
||||
static void
|
||||
mark_set_callback (GtkTextBuffer *buffer,
|
||||
const GtkTextIter *new_location,
|
||||
GtkTextMark *mark,
|
||||
DemoApplicationWindow *window)
|
||||
mark_set_callback (GtkTextBuffer *buffer,
|
||||
const GtkTextIter *new_location,
|
||||
GtkTextMark *mark,
|
||||
gpointer data)
|
||||
{
|
||||
update_statusbar (buffer, window);
|
||||
update_statusbar (buffer, GTK_STATUSBAR (data));
|
||||
}
|
||||
|
||||
static void
|
||||
@@ -331,9 +320,9 @@ static GActionEntry win_entries[] = {
|
||||
};
|
||||
|
||||
static void
|
||||
clicked_cb (GtkWidget *widget, DemoApplicationWindow *window)
|
||||
clicked_cb (GtkWidget *widget, GtkWidget *info)
|
||||
{
|
||||
gtk_widget_hide (window->infobar);
|
||||
gtk_widget_hide (info);
|
||||
}
|
||||
|
||||
static void
|
||||
@@ -343,10 +332,8 @@ startup (GApplication *app)
|
||||
GMenuModel *appmenu;
|
||||
GMenuModel *menubar;
|
||||
|
||||
G_APPLICATION_CLASS (demo_application_parent_class)->startup (app);
|
||||
|
||||
builder = gtk_builder_new ();
|
||||
gtk_builder_add_from_resource (builder, "/application_demo/menus.ui", NULL);
|
||||
gtk_builder_add_from_resource (builder, "/application/menus.ui", NULL);
|
||||
|
||||
appmenu = (GMenuModel *)gtk_builder_get_object (builder, "appmenu");
|
||||
menubar = (GMenuModel *)gtk_builder_get_object (builder, "menubar");
|
||||
@@ -359,17 +346,66 @@ startup (GApplication *app)
|
||||
|
||||
static void
|
||||
create_window (GApplication *app,
|
||||
const char *content)
|
||||
const char *content_text)
|
||||
{
|
||||
DemoApplicationWindow *window;
|
||||
GtkBuilder *builder;
|
||||
GtkWidget *window;
|
||||
GtkWidget *grid;
|
||||
GtkWidget *contents;
|
||||
GtkWidget *status;
|
||||
GtkWidget *message;
|
||||
GtkWidget *button;
|
||||
GtkWidget *infobar;
|
||||
GtkWidget *menutool;
|
||||
GMenuModel *toolmenu;
|
||||
GtkTextBuffer *buffer;
|
||||
|
||||
window = (DemoApplicationWindow *)g_object_new (demo_application_window_get_type (),
|
||||
"application", app,
|
||||
NULL);
|
||||
if (content)
|
||||
gtk_text_buffer_set_text (window->buffer, content, -1);
|
||||
window = gtk_application_window_new (GTK_APPLICATION (app));
|
||||
gtk_window_set_title (GTK_WINDOW (window), "Application Class");
|
||||
gtk_window_set_icon_name (GTK_WINDOW (window), "document-open");
|
||||
gtk_window_set_default_size (GTK_WINDOW (window), 200, 200);
|
||||
|
||||
gtk_window_present (GTK_WINDOW (window));
|
||||
g_action_map_add_action_entries (G_ACTION_MAP (window),
|
||||
win_entries, G_N_ELEMENTS (win_entries),
|
||||
window);
|
||||
|
||||
builder = gtk_builder_new ();
|
||||
gtk_builder_add_from_resource (builder, "/application/application.ui", NULL);
|
||||
|
||||
grid = (GtkWidget *)gtk_builder_get_object (builder, "grid");
|
||||
contents = (GtkWidget *)gtk_builder_get_object (builder, "contents");
|
||||
status = (GtkWidget *)gtk_builder_get_object (builder, "status");
|
||||
message = (GtkWidget *)gtk_builder_get_object (builder, "message");
|
||||
button = (GtkWidget *)gtk_builder_get_object (builder, "button");
|
||||
infobar = (GtkWidget *)gtk_builder_get_object (builder, "infobar");
|
||||
menutool = (GtkWidget *)gtk_builder_get_object (builder, "menutool");
|
||||
toolmenu = (GMenuModel *)gtk_builder_get_object (builder, "toolmenu");
|
||||
|
||||
g_object_set_data (G_OBJECT (window), "message", message);
|
||||
g_object_set_data (G_OBJECT (window), "infobar", infobar);
|
||||
|
||||
gtk_container_add (GTK_CONTAINER (window), grid);
|
||||
|
||||
gtk_menu_tool_button_set_menu (GTK_MENU_TOOL_BUTTON (menutool),
|
||||
gtk_menu_new_from_model (toolmenu));
|
||||
|
||||
gtk_widget_grab_focus (contents);
|
||||
g_signal_connect (button, "clicked", G_CALLBACK (clicked_cb), infobar);
|
||||
|
||||
/* Show text widget info in the statusbar */
|
||||
buffer = gtk_text_view_get_buffer (GTK_TEXT_VIEW (contents));
|
||||
if (content_text)
|
||||
gtk_text_buffer_set_text (buffer, content_text, -1);
|
||||
g_signal_connect_object (buffer, "changed",
|
||||
G_CALLBACK (update_statusbar), status, 0);
|
||||
g_signal_connect_object (buffer, "mark-set",
|
||||
G_CALLBACK (mark_set_callback), status, 0);
|
||||
|
||||
update_statusbar (buffer, GTK_STATUSBAR (status));
|
||||
|
||||
gtk_widget_show_all (window);
|
||||
|
||||
g_object_unref (builder);
|
||||
}
|
||||
|
||||
static void
|
||||
@@ -378,12 +414,16 @@ activate (GApplication *app)
|
||||
create_window (app, NULL);
|
||||
}
|
||||
|
||||
static void
|
||||
demo_application_init (DemoApplication *app)
|
||||
int
|
||||
main (int argc, char *argv[])
|
||||
{
|
||||
GtkApplication *app;
|
||||
GSettings *settings;
|
||||
GAction *action;
|
||||
|
||||
gtk_init (NULL, NULL);
|
||||
|
||||
app = gtk_application_new ("org.gtk.Demo2", 0);
|
||||
settings = g_settings_new ("org.gtk.Demo");
|
||||
|
||||
g_action_map_add_action_entries (G_ACTION_MAP (app),
|
||||
@@ -394,151 +434,97 @@ demo_application_init (DemoApplication *app)
|
||||
|
||||
g_action_map_add_action (G_ACTION_MAP (app), action);
|
||||
|
||||
g_object_unref (settings);
|
||||
g_signal_connect (app, "startup", G_CALLBACK (startup), NULL);
|
||||
g_signal_connect (app, "activate", G_CALLBACK (activate), NULL);
|
||||
|
||||
g_application_run (G_APPLICATION (app), 0, NULL);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
#else /* !STANDALONE */
|
||||
|
||||
static gboolean name_seen;
|
||||
static GtkWidget *placeholder;
|
||||
|
||||
static void
|
||||
on_name_appeared (GDBusConnection *connection,
|
||||
const gchar *name,
|
||||
const gchar *name_owner,
|
||||
gpointer user_data)
|
||||
{
|
||||
name_seen = TRUE;
|
||||
}
|
||||
|
||||
static void
|
||||
demo_application_class_init (DemoApplicationClass *class)
|
||||
on_name_vanished (GDBusConnection *connection,
|
||||
const gchar *name,
|
||||
gpointer user_data)
|
||||
{
|
||||
GApplicationClass *app_class = G_APPLICATION_CLASS (class);
|
||||
if (!name_seen)
|
||||
return;
|
||||
|
||||
app_class->startup = startup;
|
||||
app_class->activate = activate;
|
||||
if (placeholder)
|
||||
{
|
||||
gtk_widget_destroy (placeholder);
|
||||
g_object_unref (placeholder);
|
||||
placeholder = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
demo_application_window_store_state (DemoApplicationWindow *win)
|
||||
{
|
||||
GSettings *settings;
|
||||
#ifdef G_OS_WIN32
|
||||
#define APP_EXTENSION ".exe"
|
||||
#else
|
||||
#define APP_EXTENSION
|
||||
#endif
|
||||
|
||||
settings = g_settings_new ("org.gtk.Demo");
|
||||
g_settings_set (settings, "window-size", "(ii)", win->width, win->height);
|
||||
g_settings_set_boolean (settings, "maximized", win->maximized);
|
||||
g_settings_set_boolean (settings, "fullscreen", win->fullscreen);
|
||||
g_object_unref (settings);
|
||||
GtkWidget *
|
||||
do_application (GtkWidget *toplevel)
|
||||
{
|
||||
static guint watch = 0;
|
||||
|
||||
if (watch == 0)
|
||||
watch = g_bus_watch_name (G_BUS_TYPE_SESSION,
|
||||
"org.gtk.Demo2",
|
||||
0,
|
||||
on_name_appeared,
|
||||
on_name_vanished,
|
||||
NULL, NULL);
|
||||
|
||||
if (placeholder == NULL)
|
||||
{
|
||||
const gchar *command;
|
||||
GError *error = NULL;
|
||||
|
||||
if (g_file_test ("./gtk3-demo-application" APP_EXTENSION, G_FILE_TEST_IS_EXECUTABLE))
|
||||
command = "./gtk3-demo-application" APP_EXTENSION;
|
||||
else
|
||||
command = "gtk3-demo-application";
|
||||
|
||||
if (!g_spawn_command_line_async (command, &error))
|
||||
{
|
||||
g_warning ("%s", error->message);
|
||||
g_error_free (error);
|
||||
}
|
||||
|
||||
placeholder = gtk_label_new ("");
|
||||
g_object_ref_sink (placeholder);
|
||||
}
|
||||
else
|
||||
{
|
||||
g_dbus_connection_call_sync (g_bus_get_sync (G_BUS_TYPE_SESSION, NULL, NULL),
|
||||
"org.gtk.Demo2",
|
||||
"/org/gtk/Demo2",
|
||||
"org.gtk.Actions",
|
||||
"Activate",
|
||||
g_variant_new ("(sava{sv})", "quit", NULL, NULL),
|
||||
NULL,
|
||||
0,
|
||||
G_MAXINT,
|
||||
NULL, NULL);
|
||||
}
|
||||
|
||||
return placeholder;
|
||||
}
|
||||
|
||||
static void
|
||||
demo_application_window_load_state (DemoApplicationWindow *win)
|
||||
{
|
||||
GSettings *settings;
|
||||
|
||||
settings = g_settings_new ("org.gtk.Demo");
|
||||
g_settings_get (settings, "window-size", "(ii)", &win->width, &win->height);
|
||||
win->maximized = g_settings_get_boolean (settings, "maximized");
|
||||
win->fullscreen = g_settings_get_boolean (settings, "fullscreen");
|
||||
g_object_unref (settings);
|
||||
}
|
||||
|
||||
static void
|
||||
demo_application_window_init (DemoApplicationWindow *window)
|
||||
{
|
||||
GtkWidget *menu;
|
||||
|
||||
window->width = -1;
|
||||
window->height = -1;
|
||||
window->maximized = FALSE;
|
||||
window->fullscreen = FALSE;
|
||||
|
||||
gtk_widget_init_template (GTK_WIDGET (window));
|
||||
|
||||
menu = gtk_menu_new_from_model (window->toolmenu);
|
||||
gtk_menu_tool_button_set_menu (GTK_MENU_TOOL_BUTTON (window->menutool), menu);
|
||||
|
||||
g_action_map_add_action_entries (G_ACTION_MAP (window),
|
||||
win_entries, G_N_ELEMENTS (win_entries),
|
||||
window);
|
||||
}
|
||||
|
||||
static void
|
||||
demo_application_window_constructed (GObject *object)
|
||||
{
|
||||
DemoApplicationWindow *window = (DemoApplicationWindow *)object;
|
||||
|
||||
demo_application_window_load_state (window);
|
||||
|
||||
gtk_window_set_default_size (GTK_WINDOW (window), window->width, window->height);
|
||||
|
||||
if (window->maximized)
|
||||
gtk_window_maximize (GTK_WINDOW (window));
|
||||
|
||||
if (window->fullscreen)
|
||||
gtk_window_fullscreen (GTK_WINDOW (window));
|
||||
|
||||
G_OBJECT_CLASS (demo_application_window_parent_class)->constructed (object);
|
||||
}
|
||||
|
||||
static void
|
||||
demo_application_window_size_allocate (GtkWidget *widget,
|
||||
GtkAllocation *allocation)
|
||||
{
|
||||
DemoApplicationWindow *window = (DemoApplicationWindow *)widget;
|
||||
|
||||
GTK_WIDGET_CLASS (demo_application_window_parent_class)->size_allocate (widget, allocation);
|
||||
|
||||
if (!window->maximized && !window->fullscreen)
|
||||
gtk_window_get_size (GTK_WINDOW (window), &window->width, &window->height);
|
||||
}
|
||||
|
||||
static gboolean
|
||||
demo_application_window_state_event (GtkWidget *widget,
|
||||
GdkEventWindowState *event)
|
||||
{
|
||||
DemoApplicationWindow *window = (DemoApplicationWindow *)widget;
|
||||
gboolean res = GDK_EVENT_PROPAGATE;
|
||||
|
||||
if (GTK_WIDGET_CLASS (demo_application_window_parent_class)->window_state_event)
|
||||
res = GTK_WIDGET_CLASS (demo_application_window_parent_class)->window_state_event (widget, event);
|
||||
|
||||
window->maximized = (event->new_window_state & GDK_WINDOW_STATE_MAXIMIZED) != 0;
|
||||
window->fullscreen = (event->new_window_state & GDK_WINDOW_STATE_FULLSCREEN) != 0;
|
||||
|
||||
return res;
|
||||
}
|
||||
|
||||
static void
|
||||
demo_application_window_destroy (GtkWidget *widget)
|
||||
{
|
||||
DemoApplicationWindow *window = (DemoApplicationWindow *)widget;
|
||||
|
||||
demo_application_window_store_state (window);
|
||||
|
||||
GTK_WIDGET_CLASS (demo_application_window_parent_class)->destroy (widget);
|
||||
}
|
||||
|
||||
static void
|
||||
demo_application_window_class_init (DemoApplicationWindowClass *class)
|
||||
{
|
||||
GObjectClass *object_class = G_OBJECT_CLASS (class);
|
||||
GtkWidgetClass *widget_class = GTK_WIDGET_CLASS (class);
|
||||
|
||||
object_class->constructed = demo_application_window_constructed;
|
||||
|
||||
widget_class->size_allocate = demo_application_window_size_allocate;
|
||||
widget_class->window_state_event = demo_application_window_state_event;
|
||||
widget_class->destroy = demo_application_window_destroy;
|
||||
|
||||
gtk_widget_class_set_template_from_resource (widget_class, "/application_demo/application.ui");
|
||||
gtk_widget_class_bind_template_child (widget_class, DemoApplicationWindow, message);
|
||||
gtk_widget_class_bind_template_child (widget_class, DemoApplicationWindow, infobar);
|
||||
gtk_widget_class_bind_template_child (widget_class, DemoApplicationWindow, status);
|
||||
gtk_widget_class_bind_template_child (widget_class, DemoApplicationWindow, buffer);
|
||||
gtk_widget_class_bind_template_child (widget_class, DemoApplicationWindow, menutool);
|
||||
gtk_widget_class_bind_template_child (widget_class, DemoApplicationWindow, toolmenu);
|
||||
gtk_widget_class_bind_template_callback (widget_class, clicked_cb);
|
||||
gtk_widget_class_bind_template_callback (widget_class, update_statusbar);
|
||||
gtk_widget_class_bind_template_callback (widget_class, mark_set_callback);
|
||||
}
|
||||
|
||||
int
|
||||
main (int argc, char *argv[])
|
||||
{
|
||||
GtkApplication *app;
|
||||
|
||||
app = GTK_APPLICATION (g_object_new (demo_application_get_type (),
|
||||
"application-id", "org.gtk.Demo2",
|
||||
"flags", G_APPLICATION_HANDLES_OPEN,
|
||||
NULL));
|
||||
|
||||
return g_application_run (G_APPLICATION (app), 0, NULL);
|
||||
}
|
||||
#endif
|
||||
|
@@ -1,123 +1,100 @@
|
||||
<?xml version="1.0"?>
|
||||
<interface>
|
||||
<template class="DemoApplicationWindow" parent="GtkApplicationWindow">
|
||||
<property name="title" translatable="yes">Application Class</property>
|
||||
<property name="default-width">200</property>
|
||||
<property name="default-height">200</property>
|
||||
<property name="icon-name">document-open</property>
|
||||
<object class="GtkGrid" id="grid">
|
||||
<child>
|
||||
<object class="GtkGrid">
|
||||
<property name="visible">1</property>
|
||||
<object class="GtkToolbar" id="toolbar">
|
||||
<property name="hexpand">1</property>
|
||||
<style>
|
||||
<class name="primary-toolbar"/>
|
||||
</style>
|
||||
<child>
|
||||
<object class="GtkToolbar">
|
||||
<property name="visible">1</property>
|
||||
<property name="hexpand">1</property>
|
||||
<style>
|
||||
<class name="primary-toolbar"/>
|
||||
</style>
|
||||
<child>
|
||||
<object class="GtkMenuToolButton" id="menutool">
|
||||
<property name="visible">1</property>
|
||||
<property name="icon-name">document-open</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkToolButton">
|
||||
<property name="visible">1</property>
|
||||
<property name="icon-name">application-exit</property>
|
||||
<property name="action-name">app.quit</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkSeparatorToolItem">
|
||||
<property name="visible">1</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkToolButton">
|
||||
<property name="visible">1</property>
|
||||
<property name="icon-name">applications-other</property>
|
||||
<property name="action-name">win.logo</property>
|
||||
</object>
|
||||
</child>
|
||||
<object class="GtkMenuToolButton" id="menutool">
|
||||
<property name="icon-name">document-open</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left-attach">0</property>
|
||||
<property name="top-attach">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkInfoBar" id="infobar">
|
||||
<property name="no-show-all">1</property>
|
||||
<property name="hexpand">1</property>
|
||||
<child internal-child="content_area">
|
||||
<object class="GtkBox" id="content_area">
|
||||
<child>
|
||||
<object class="GtkLabel" id="message">
|
||||
<property name="visible">1</property>
|
||||
<property name="hexpand">1</property>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
<child internal-child="action_area">
|
||||
<object class="GtkBox">
|
||||
<child>
|
||||
<object class="GtkButton">
|
||||
<property name="visible">1</property>
|
||||
<property name="valign">center</property>
|
||||
<property name="label" translatable="yes">_OK</property>
|
||||
<property name="use_underline">1</property>
|
||||
<signal name="clicked" handler="clicked_cb"/>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
<object class="GtkToolButton" id="quit">
|
||||
<property name="icon-name">application-exit</property>
|
||||
<property name="action-name">app.quit</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left-attach">0</property>
|
||||
<property name="top-attach">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkScrolledWindow">
|
||||
<property name="visible">1</property>
|
||||
<property name="shadow-type">in</property>
|
||||
<child>
|
||||
<object class="GtkTextView">
|
||||
<property name="visible">1</property>
|
||||
<property name="hexpand">1</property>
|
||||
<property name="vexpand">1</property>
|
||||
<property name="buffer">buffer</property>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left-attach">0</property>
|
||||
<property name="top-attach">2</property>
|
||||
</packing>
|
||||
<object class="GtkSeparatorToolItem" id="sep"/>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkStatusbar" id="status">
|
||||
<property name="hexpand">1</property>
|
||||
<property name="visible">1</property>
|
||||
<object class="GtkToolButton" id="logo">
|
||||
<property name="icon-name">applications-other</property>
|
||||
<property name="action-name">win.logo</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left-attach">0</property>
|
||||
<property name="top-attach">3</property>
|
||||
</packing>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left-attach">0</property>
|
||||
<property name="top-attach">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
</template>
|
||||
<child>
|
||||
<object class="GtkInfoBar" id="infobar">
|
||||
<property name="no-show-all">1</property>
|
||||
<property name="hexpand">1</property>
|
||||
<child internal-child="content_area">
|
||||
<object class="GtkBox" id="content_area">
|
||||
<child>
|
||||
<object class="GtkLabel" id="message">
|
||||
<property name="visible">1</property>
|
||||
<property name="hexpand">1</property>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
<child internal-child="action_area">
|
||||
<object class="GtkBox" id="action_area">
|
||||
<child>
|
||||
<object class="GtkButton" id="button">
|
||||
<property name="visible">1</property>
|
||||
<property name="valign">center</property>
|
||||
<property name="label" translatable="yes">_OK</property>
|
||||
<property name="use_underline">1</property>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left-attach">0</property>
|
||||
<property name="top-attach">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkScrolledWindow" id="sw">
|
||||
<property name="shadow-type">in</property>
|
||||
<child>
|
||||
<object class="GtkTextView" id="contents">
|
||||
<property name="hexpand">1</property>
|
||||
<property name="vexpand">1</property>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left-attach">0</property>
|
||||
<property name="top-attach">2</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkStatusbar" id="status">
|
||||
<property name="hexpand">1</property>
|
||||
<property name="visible">1</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left-attach">0</property>
|
||||
<property name="top-attach">3</property>
|
||||
</packing>
|
||||
</child>
|
||||
</object>
|
||||
<menu id="toolmenu">
|
||||
<item>
|
||||
<attribute name="label">File1</attribute>
|
||||
<attribute name="action">win.file1</attribute>
|
||||
</item>
|
||||
</menu>
|
||||
<object class="GtkTextBuffer" id="buffer">
|
||||
<signal name="changed" handler="update_statusbar"/>
|
||||
<signal name="mark-set" handler="mark_set_callback"/>
|
||||
</object>
|
||||
</interface>
|
||||
|
@@ -1,95 +0,0 @@
|
||||
/* Application Class
|
||||
*
|
||||
* Demonstrates a simple application.
|
||||
*
|
||||
* This example uses GtkApplication, GtkApplicationWindow, GtkBuilder
|
||||
* as well as GMenu and GResource. Due to the way GtkApplication is structured,
|
||||
* it is run as a separate process.
|
||||
*/
|
||||
|
||||
#include "config.h"
|
||||
|
||||
#include <gtk/gtk.h>
|
||||
|
||||
static gboolean name_seen;
|
||||
static GtkWidget *placeholder;
|
||||
|
||||
static void
|
||||
on_name_appeared (GDBusConnection *connection,
|
||||
const gchar *name,
|
||||
const gchar *name_owner,
|
||||
gpointer user_data)
|
||||
{
|
||||
name_seen = TRUE;
|
||||
}
|
||||
|
||||
static void
|
||||
on_name_vanished (GDBusConnection *connection,
|
||||
const gchar *name,
|
||||
gpointer user_data)
|
||||
{
|
||||
if (!name_seen)
|
||||
return;
|
||||
|
||||
if (placeholder)
|
||||
{
|
||||
gtk_widget_destroy (placeholder);
|
||||
g_object_unref (placeholder);
|
||||
placeholder = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef G_OS_WIN32
|
||||
#define APP_EXTENSION ".exe"
|
||||
#else
|
||||
#define APP_EXTENSION
|
||||
#endif
|
||||
|
||||
GtkWidget *
|
||||
do_application_demo (GtkWidget *toplevel)
|
||||
{
|
||||
static guint watch = 0;
|
||||
|
||||
if (watch == 0)
|
||||
watch = g_bus_watch_name (G_BUS_TYPE_SESSION,
|
||||
"org.gtk.Demo2",
|
||||
0,
|
||||
on_name_appeared,
|
||||
on_name_vanished,
|
||||
NULL, NULL);
|
||||
|
||||
if (placeholder == NULL)
|
||||
{
|
||||
const gchar *command;
|
||||
GError *error = NULL;
|
||||
|
||||
if (g_file_test ("./gtk3-demo-application" APP_EXTENSION, G_FILE_TEST_IS_EXECUTABLE))
|
||||
command = "./gtk3-demo-application" APP_EXTENSION;
|
||||
else
|
||||
command = "gtk3-demo-application";
|
||||
|
||||
if (!g_spawn_command_line_async (command, &error))
|
||||
{
|
||||
g_warning ("%s", error->message);
|
||||
g_error_free (error);
|
||||
}
|
||||
|
||||
placeholder = gtk_label_new ("");
|
||||
g_object_ref_sink (placeholder);
|
||||
}
|
||||
else
|
||||
{
|
||||
g_dbus_connection_call_sync (g_bus_get_sync (G_BUS_TYPE_SESSION, NULL, NULL),
|
||||
"org.gtk.Demo2",
|
||||
"/org/gtk/Demo2",
|
||||
"org.gtk.Actions",
|
||||
"Activate",
|
||||
g_variant_new ("(sava{sv})", "quit", NULL, NULL),
|
||||
NULL,
|
||||
0,
|
||||
G_MAXINT,
|
||||
NULL, NULL);
|
||||
}
|
||||
|
||||
return placeholder;
|
||||
}
|
@@ -1,19 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<interface>
|
||||
<!-- interface-requires gtk+ 3.10 -->
|
||||
<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>
|
||||
</interface>
|
@@ -108,7 +108,6 @@ query_for_toplevel (GdkScreen *screen,
|
||||
GtkWidget *popup, *label, *frame;
|
||||
GdkCursor *cursor;
|
||||
GtkWidget *toplevel = NULL;
|
||||
GdkDevice *device;
|
||||
|
||||
popup = gtk_window_new (GTK_WINDOW_POPUP);
|
||||
gtk_window_set_screen (GTK_WINDOW (popup), screen);
|
||||
@@ -125,12 +124,14 @@ query_for_toplevel (GdkScreen *screen,
|
||||
|
||||
gtk_widget_show_all (popup);
|
||||
cursor = gdk_cursor_new_from_name (display, "crosshair");
|
||||
device = gtk_get_current_event_device ();
|
||||
|
||||
if (gdk_seat_grab (gdk_device_get_seat (device),
|
||||
gtk_widget_get_window (popup),
|
||||
GDK_SEAT_CAPABILITY_ALL_POINTING,
|
||||
FALSE, cursor, NULL, NULL, NULL) == GDK_GRAB_SUCCESS)
|
||||
if (gdk_device_grab (gtk_get_current_event_device (),
|
||||
gtk_widget_get_window (popup),
|
||||
GDK_OWNERSHIP_NONE,
|
||||
FALSE,
|
||||
GDK_BUTTON_RELEASE_MASK,
|
||||
cursor,
|
||||
GDK_CURRENT_TIME) == GDK_GRAB_SUCCESS)
|
||||
{
|
||||
gboolean clicked = FALSE;
|
||||
|
||||
|
@@ -36,10 +36,13 @@ create_icon_store (void)
|
||||
N_("Open")
|
||||
};
|
||||
|
||||
GtkWidget *cellview;
|
||||
GtkTreeIter iter;
|
||||
GtkListStore *store;
|
||||
gint i;
|
||||
|
||||
cellview = gtk_cell_view_new ();
|
||||
|
||||
store = gtk_list_store_new (2, G_TYPE_STRING, G_TYPE_STRING);
|
||||
|
||||
for (i = 0; i < G_N_ELEMENTS (icon_names); i++)
|
||||
@@ -62,6 +65,8 @@ create_icon_store (void)
|
||||
}
|
||||
}
|
||||
|
||||
gtk_widget_destroy (cellview);
|
||||
|
||||
return GTK_TREE_MODEL (store);
|
||||
}
|
||||
|
||||
|
Binary file not shown.
Before Width: | Height: | Size: 1.5 KiB |
@@ -1,4 +1,4 @@
|
||||
/* Theming/CSS Accordion
|
||||
/* CSS Theming/CSS Accordion
|
||||
*
|
||||
* A simple accordion demo written using CSS transitions and multiple backgrounds
|
||||
*
|
||||
|
@@ -4,7 +4,7 @@
|
||||
transition-property: color, background-color, border-color, background-image, padding, border-width;
|
||||
transition-duration: 1s;
|
||||
|
||||
font: 20px Cantarell;
|
||||
font: Cantarell 20px;
|
||||
}
|
||||
|
||||
window {
|
||||
|
@@ -1,4 +1,4 @@
|
||||
/* Theming/CSS Basics
|
||||
/* CSS Theming/CSS Basics
|
||||
*
|
||||
* Gtk themes are written using CSS. Every widget is build of multiple items
|
||||
* that you can style very similarly to a regular website.
|
||||
|
@@ -1,4 +1,4 @@
|
||||
/* Theming/Multiple Backgrounds
|
||||
/* CSS Theming/Multiple Backgrounds
|
||||
*
|
||||
* Gtk themes are written using CSS. Every widget is build of multiple items
|
||||
* that you can style very similarly to a regular website.
|
||||
|
@@ -1,4 +1,4 @@
|
||||
/* Theming/Animated Backgrounds
|
||||
/* CSS Theming/Animated Backgrounds
|
||||
*
|
||||
* This demo is done in honour of the Pixbufs demo further down.
|
||||
* It is done exclusively with CSS as the background of the window.
|
||||
|
@@ -1,4 +1,4 @@
|
||||
/* Theming/Shadows
|
||||
/* CSS Theming/Shadows
|
||||
*
|
||||
* This demo shows how to use CSS shadows.
|
||||
*/
|
||||
|
@@ -29,7 +29,7 @@ button {
|
||||
|
||||
button:hover {
|
||||
text-shadow: 3px 3px 5px alpha(black, 0.75);
|
||||
-gtk-icon-shadow: 3px 3px 5px alpha(black, 0.75);
|
||||
icon-shadow: 3px 3px 5px alpha(black, 0.75);
|
||||
box-shadow: 3px 3px 5px alpha(black, 0.5) inset;
|
||||
border: solid 1px alpha(black, 0.75);
|
||||
}
|
||||
@@ -37,7 +37,7 @@ button:hover {
|
||||
button:active {
|
||||
padding: 11px 9px 9px 11px;
|
||||
text-shadow: 1px 1px 2.5px alpha(black, 0.6);
|
||||
-gtk-icon-shadow: 1px 1px 2.5px alpha(black, 0.6);
|
||||
icon-shadow: 1px 1px 2.5px alpha(black, 0.6);
|
||||
}
|
||||
|
||||
|
||||
|
@@ -1,7 +1,7 @@
|
||||
/* Make the text editor has a nice style */
|
||||
.view {
|
||||
color: #2e3436;
|
||||
font-family: Monospace;
|
||||
font: Monospace;
|
||||
background-color: alpha(white, 0.30);
|
||||
}
|
||||
|
||||
@@ -10,12 +10,12 @@
|
||||
background-color: #4a90d9;
|
||||
}
|
||||
|
||||
scrollbar trough,
|
||||
.scrollbar.trough,
|
||||
.scrollbars-junction {
|
||||
background-color: alpha(white, 0.80);
|
||||
}
|
||||
|
||||
scrollbar slider {
|
||||
.scrollbar.slider {
|
||||
border-width: 3px;
|
||||
border-style: solid;
|
||||
border-radius: 10px;
|
||||
@@ -24,11 +24,11 @@ scrollbar slider {
|
||||
background-color: #999;
|
||||
}
|
||||
|
||||
scrollbar slider:hover {
|
||||
.scrollbar.slider:prelight {
|
||||
background-color: #555;
|
||||
}
|
||||
|
||||
paned separator {
|
||||
.pane-separator {
|
||||
background-color: alpha(white, 0.80);
|
||||
background-image: linear-gradient(transparent, transparent 1px, #999 1px, #999 4px, transparent 4px);
|
||||
background-size: 40px auto;
|
||||
@@ -36,6 +36,6 @@ paned separator {
|
||||
background-position: center;
|
||||
}
|
||||
|
||||
paned separator:hover {
|
||||
.pane-separator:prelight {
|
||||
background-image: linear-gradient(transparent, transparent 1px, #555 1px, #555 4px, transparent 4px);
|
||||
}
|
||||
|
@@ -2,10 +2,8 @@
|
||||
<gresources>
|
||||
<gresource prefix="/ui">
|
||||
<file preprocess="xml-stripblanks">main.ui</file>
|
||||
<file preprocess="xml-stripblanks">appmenu.ui</file>
|
||||
</gresource>
|
||||
<gresource prefix="/application_demo">
|
||||
<file>application.c</file>
|
||||
<gresource prefix="/application">
|
||||
<file>application.ui</file>
|
||||
<file>menus.ui</file>
|
||||
</gresource>
|
||||
@@ -54,7 +52,6 @@
|
||||
<file>all_scroll_cursor.png</file>
|
||||
<file>cell_cursor.png</file>
|
||||
<file>col_resize_cursor.png</file>
|
||||
<file>context_menu_cursor.png</file>
|
||||
<file>copy_cursor.png</file>
|
||||
<file>crosshair_cursor.png</file>
|
||||
<file>default_cursor.png</file>
|
||||
@@ -120,7 +117,7 @@
|
||||
<file>gnu-keys.png</file>
|
||||
</gresource>
|
||||
<gresource prefix="/sources">
|
||||
<file>application_demo.c</file>
|
||||
<file>application.c</file>
|
||||
<file>assistant.c</file>
|
||||
<file>builder.c</file>
|
||||
<file>button_box.c</file>
|
||||
@@ -143,7 +140,6 @@
|
||||
<file>expander.c</file>
|
||||
<file>filtermodel.c</file>
|
||||
<file>flowbox.c</file>
|
||||
<file>foreigndrawing.c</file>
|
||||
<file>font_features.c</file>
|
||||
<file>gestures.c</file>
|
||||
<file>glarea.c</file>
|
||||
@@ -200,12 +196,10 @@
|
||||
<file>popover.ui</file>
|
||||
</gresource>
|
||||
<gresource prefix="/glarea">
|
||||
<file>glarea-gl.fs.glsl</file>
|
||||
<file>glarea-gl.vs.glsl</file>
|
||||
<file>glarea-gles.fs.glsl</file>
|
||||
<file>glarea-gles.vs.glsl</file>
|
||||
<file>glarea-fragment.glsl</file>
|
||||
<file>glarea-vertex.glsl</file>
|
||||
</gresource>
|
||||
<gresource prefix="/font_features">
|
||||
<gresource prefix="/font-features">
|
||||
<file>font-features.ui</file>
|
||||
</gresource>
|
||||
<gresource prefix="/spinbutton">
|
||||
|
@@ -78,7 +78,6 @@
|
||||
<property name="visible">1</property>
|
||||
<property name="label" translatable="yes">Save _As</property>
|
||||
<property name="use-underline">1</property>
|
||||
<accelerator key="s" modifiers="primary | shift-mask" signal="activate"/>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
|
@@ -24,15 +24,14 @@
|
||||
|
||||
typedef struct {
|
||||
GdkDevice *last_source;
|
||||
GdkDeviceTool *last_tool;
|
||||
gdouble *axes;
|
||||
GHashTable *axes; /* axis label atom -> value */
|
||||
GdkRGBA color;
|
||||
gdouble x;
|
||||
gdouble y;
|
||||
} AxesInfo;
|
||||
|
||||
typedef struct {
|
||||
GHashTable *pointer_info; /* GdkDevice -> AxesInfo */
|
||||
AxesInfo *pointer_info;
|
||||
GHashTable *touch_info; /* GdkEventSequence -> AxesInfo */
|
||||
} EventData;
|
||||
|
||||
@@ -60,22 +59,51 @@ axes_info_new (void)
|
||||
|
||||
info = g_new0 (AxesInfo, 1);
|
||||
gdk_rgba_parse (&info->color, colors[cur_color]);
|
||||
info->axes = g_hash_table_new_full (NULL, NULL, NULL,
|
||||
(GDestroyNotify) g_free);
|
||||
|
||||
cur_color = (cur_color + 1) % G_N_ELEMENTS (colors);
|
||||
|
||||
return info;
|
||||
}
|
||||
|
||||
static void
|
||||
axes_info_free (AxesInfo *info)
|
||||
{
|
||||
g_hash_table_destroy (info->axes);
|
||||
g_free (info);
|
||||
}
|
||||
|
||||
static gboolean
|
||||
axes_info_lookup (AxesInfo *info,
|
||||
const gchar *axis_label,
|
||||
gdouble *value)
|
||||
{
|
||||
gdouble *val;
|
||||
GdkAtom atom;
|
||||
|
||||
atom = gdk_atom_intern (axis_label, FALSE);
|
||||
|
||||
if (atom == GDK_NONE)
|
||||
return FALSE;
|
||||
|
||||
val = g_hash_table_lookup (info->axes, GDK_ATOM_TO_POINTER (atom));
|
||||
|
||||
if (!val)
|
||||
return FALSE;
|
||||
|
||||
*value = *val;
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
static EventData *
|
||||
event_data_new (void)
|
||||
{
|
||||
EventData *data;
|
||||
|
||||
data = g_new0 (EventData, 1);
|
||||
data->pointer_info = g_hash_table_new_full (NULL, NULL, NULL,
|
||||
(GDestroyNotify) g_free);
|
||||
data->touch_info = g_hash_table_new_full (NULL, NULL, NULL,
|
||||
(GDestroyNotify) g_free);
|
||||
(GDestroyNotify) axes_info_free);
|
||||
|
||||
return data;
|
||||
}
|
||||
@@ -83,7 +111,8 @@ event_data_new (void)
|
||||
static void
|
||||
event_data_free (EventData *data)
|
||||
{
|
||||
g_hash_table_destroy (data->pointer_info);
|
||||
if (data->pointer_info)
|
||||
axes_info_free (data->pointer_info);
|
||||
g_hash_table_destroy (data->touch_info);
|
||||
g_free (data);
|
||||
}
|
||||
@@ -94,36 +123,32 @@ update_axes_from_event (GdkEvent *event,
|
||||
{
|
||||
GdkDevice *device, *source_device;
|
||||
GdkEventSequence *sequence;
|
||||
GdkDeviceTool *tool;
|
||||
gdouble x, y;
|
||||
gdouble x, y, value;
|
||||
GList *l, *axes;
|
||||
AxesInfo *info;
|
||||
|
||||
device = gdk_event_get_device (event);
|
||||
source_device = gdk_event_get_source_device (event);
|
||||
sequence = gdk_event_get_event_sequence (event);
|
||||
tool = gdk_event_get_device_tool (event);
|
||||
|
||||
if (event->type == GDK_TOUCH_END ||
|
||||
event->type == GDK_TOUCH_CANCEL)
|
||||
if (event->type == GDK_TOUCH_END)
|
||||
{
|
||||
g_hash_table_remove (data->touch_info, sequence);
|
||||
return;
|
||||
}
|
||||
else if (event->type == GDK_LEAVE_NOTIFY)
|
||||
{
|
||||
g_hash_table_remove (data->pointer_info, device);
|
||||
if (data->pointer_info)
|
||||
axes_info_free (data->pointer_info);
|
||||
data->pointer_info = NULL;
|
||||
return;
|
||||
}
|
||||
|
||||
if (!sequence)
|
||||
{
|
||||
info = g_hash_table_lookup (data->pointer_info, device);
|
||||
|
||||
if (!info)
|
||||
{
|
||||
info = axes_info_new ();
|
||||
g_hash_table_insert (data->pointer_info, device, info);
|
||||
}
|
||||
if (!data->pointer_info)
|
||||
data->pointer_info = axes_info_new ();
|
||||
info = data->pointer_info;
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -137,31 +162,41 @@ update_axes_from_event (GdkEvent *event,
|
||||
}
|
||||
|
||||
if (info->last_source != source_device)
|
||||
info->last_source = source_device;
|
||||
|
||||
if (info->last_tool != tool)
|
||||
info->last_tool = tool;
|
||||
|
||||
g_clear_pointer (&info->axes, g_free);
|
||||
{
|
||||
g_hash_table_remove_all (info->axes);
|
||||
info->last_source = source_device;
|
||||
}
|
||||
|
||||
if (event->type == GDK_TOUCH_BEGIN ||
|
||||
event->type == GDK_TOUCH_UPDATE)
|
||||
event->type == GDK_TOUCH_UPDATE ||
|
||||
event->type == GDK_MOTION_NOTIFY ||
|
||||
event->type == GDK_BUTTON_PRESS ||
|
||||
event->type == GDK_BUTTON_RELEASE)
|
||||
{
|
||||
axes = gdk_device_list_axes (device);
|
||||
|
||||
if (sequence && event->touch.emulating_pointer)
|
||||
g_hash_table_remove (data->pointer_info, device);
|
||||
}
|
||||
if (event->type == GDK_MOTION_NOTIFY)
|
||||
{
|
||||
info->axes =
|
||||
g_memdup (event->motion.axes,
|
||||
sizeof (gdouble) * gdk_device_get_n_axes (source_device));
|
||||
}
|
||||
else if (event->type == GDK_BUTTON_PRESS ||
|
||||
event->type == GDK_BUTTON_RELEASE)
|
||||
{
|
||||
info->axes =
|
||||
g_memdup (event->button.axes,
|
||||
sizeof (gdouble) * gdk_device_get_n_axes (source_device));
|
||||
{
|
||||
if (data->pointer_info)
|
||||
axes_info_free (data->pointer_info);
|
||||
data->pointer_info = NULL;
|
||||
}
|
||||
|
||||
for (l = axes; l; l = l->next)
|
||||
{
|
||||
gdouble *ptr;
|
||||
|
||||
/* All those event types are compatible wrt axes position in the struct */
|
||||
if (!gdk_device_get_axis_value (device, event->motion.axes,
|
||||
l->data, &value))
|
||||
continue;
|
||||
|
||||
ptr = g_new0 (gdouble, 1);
|
||||
*ptr = value;
|
||||
g_hash_table_insert (info->axes, GDK_ATOM_TO_POINTER (l->data), ptr);
|
||||
}
|
||||
|
||||
g_list_free (axes);
|
||||
}
|
||||
|
||||
if (gdk_event_get_coords (event, &x, &y))
|
||||
@@ -206,8 +241,7 @@ draw_axes_info (cairo_t *cr,
|
||||
AxesInfo *info,
|
||||
GtkAllocation *allocation)
|
||||
{
|
||||
gdouble pressure, tilt_x, tilt_y, distance, wheel, rotation, slider;
|
||||
GdkAxisFlags axes = gdk_device_get_axes (info->last_source);
|
||||
gdouble pressure, tilt_x, tilt_y, wheel;
|
||||
|
||||
cairo_save (cr);
|
||||
|
||||
@@ -222,19 +256,10 @@ draw_axes_info (cairo_t *cr,
|
||||
|
||||
cairo_translate (cr, info->x, info->y);
|
||||
|
||||
if (!info->axes)
|
||||
{
|
||||
cairo_restore (cr);
|
||||
return;
|
||||
}
|
||||
|
||||
if (axes & GDK_AXIS_FLAG_PRESSURE)
|
||||
if (axes_info_lookup (info, "Abs Pressure", &pressure))
|
||||
{
|
||||
cairo_pattern_t *pattern;
|
||||
|
||||
gdk_device_get_axis (info->last_source, info->axes, GDK_AXIS_PRESSURE,
|
||||
&pressure);
|
||||
|
||||
pattern = cairo_pattern_create_radial (0, 0, 0, 0, 0, 100);
|
||||
cairo_pattern_add_color_stop_rgba (pattern, pressure, 1, 0, 0, pressure);
|
||||
cairo_pattern_add_color_stop_rgba (pattern, 1, 0, 0, 1, 0);
|
||||
@@ -247,49 +272,12 @@ draw_axes_info (cairo_t *cr,
|
||||
cairo_pattern_destroy (pattern);
|
||||
}
|
||||
|
||||
if (axes & GDK_AXIS_FLAG_XTILT &&
|
||||
axes & GDK_AXIS_FLAG_YTILT)
|
||||
if (axes_info_lookup (info, "Abs Tilt X", &tilt_x) &&
|
||||
axes_info_lookup (info, "Abs Tilt Y", &tilt_y))
|
||||
render_arrow (cr, tilt_x * 100, tilt_y * 100, "Tilt");
|
||||
|
||||
if (axes_info_lookup (info, "Abs Wheel", &wheel))
|
||||
{
|
||||
gdk_device_get_axis (info->last_source, info->axes, GDK_AXIS_XTILT,
|
||||
&tilt_x);
|
||||
gdk_device_get_axis (info->last_source, info->axes, GDK_AXIS_YTILT,
|
||||
&tilt_y);
|
||||
|
||||
render_arrow (cr, tilt_x * 100, tilt_y * 100, "Tilt");
|
||||
}
|
||||
|
||||
if (axes & GDK_AXIS_FLAG_DISTANCE)
|
||||
{
|
||||
double dashes[] = { 5.0, 5.0 };
|
||||
cairo_text_extents_t extents;
|
||||
|
||||
gdk_device_get_axis (info->last_source, info->axes, GDK_AXIS_DISTANCE,
|
||||
&distance);
|
||||
|
||||
cairo_save (cr);
|
||||
|
||||
cairo_move_to (cr, distance * 100, 0);
|
||||
|
||||
cairo_set_source_rgb (cr, 0.0, 0.0, 0.0);
|
||||
cairo_set_dash (cr, dashes, 2, 0.0);
|
||||
cairo_arc (cr, 0, 0, distance * 100, 0, 2 * G_PI);
|
||||
cairo_stroke (cr);
|
||||
|
||||
cairo_move_to (cr, 0, -distance * 100);
|
||||
cairo_text_extents (cr, "Distance", &extents);
|
||||
cairo_rel_move_to (cr, -extents.width / 2, 0);
|
||||
cairo_show_text (cr, "Distance");
|
||||
|
||||
cairo_move_to (cr, 0, 0);
|
||||
|
||||
cairo_restore (cr);
|
||||
}
|
||||
|
||||
if (axes & GDK_AXIS_FLAG_WHEEL)
|
||||
{
|
||||
gdk_device_get_axis (info->last_source, info->axes, GDK_AXIS_WHEEL,
|
||||
&wheel);
|
||||
|
||||
cairo_save (cr);
|
||||
cairo_set_line_width (cr, 10);
|
||||
cairo_set_source_rgba (cr, 0, 0, 0, 0.5);
|
||||
@@ -300,88 +288,9 @@ draw_axes_info (cairo_t *cr,
|
||||
cairo_restore (cr);
|
||||
}
|
||||
|
||||
if (axes & GDK_AXIS_FLAG_ROTATION)
|
||||
{
|
||||
gdk_device_get_axis (info->last_source, info->axes, GDK_AXIS_ROTATION,
|
||||
&rotation);
|
||||
rotation *= 2 * G_PI;
|
||||
|
||||
cairo_save (cr);
|
||||
cairo_rotate (cr, - G_PI / 2);
|
||||
cairo_set_line_cap (cr, CAIRO_LINE_CAP_ROUND);
|
||||
cairo_set_line_width (cr, 5);
|
||||
|
||||
cairo_new_sub_path (cr);
|
||||
cairo_arc (cr, 0, 0, 100, 0, rotation);
|
||||
cairo_stroke (cr);
|
||||
cairo_restore (cr);
|
||||
}
|
||||
|
||||
if (axes & GDK_AXIS_FLAG_SLIDER)
|
||||
{
|
||||
cairo_pattern_t *pattern, *mask;
|
||||
|
||||
gdk_device_get_axis (info->last_source, info->axes, GDK_AXIS_SLIDER,
|
||||
&slider);
|
||||
|
||||
cairo_save (cr);
|
||||
|
||||
cairo_move_to (cr, 0, -10);
|
||||
cairo_rel_line_to (cr, 0, -50);
|
||||
cairo_rel_line_to (cr, 10, 0);
|
||||
cairo_rel_line_to (cr, -5, 50);
|
||||
cairo_close_path (cr);
|
||||
|
||||
cairo_clip_preserve (cr);
|
||||
|
||||
pattern = cairo_pattern_create_linear (0, -10, 0, -60);
|
||||
cairo_pattern_add_color_stop_rgb (pattern, 0, 0, 1, 0);
|
||||
cairo_pattern_add_color_stop_rgb (pattern, 1, 1, 0, 0);
|
||||
cairo_set_source (cr, pattern);
|
||||
cairo_pattern_destroy (pattern);
|
||||
|
||||
mask = cairo_pattern_create_linear (0, -10, 0, -60);
|
||||
cairo_pattern_add_color_stop_rgba (mask, 0, 0, 0, 0, 1);
|
||||
cairo_pattern_add_color_stop_rgba (mask, slider, 0, 0, 0, 1);
|
||||
cairo_pattern_add_color_stop_rgba (mask, slider, 0, 0, 0, 0);
|
||||
cairo_pattern_add_color_stop_rgba (mask, 1, 0, 0, 0, 0);
|
||||
cairo_mask (cr, mask);
|
||||
cairo_pattern_destroy (mask);
|
||||
|
||||
cairo_set_source_rgb (cr, 0, 0, 0);
|
||||
cairo_stroke (cr);
|
||||
|
||||
cairo_restore (cr);
|
||||
}
|
||||
|
||||
cairo_restore (cr);
|
||||
}
|
||||
|
||||
static const gchar *
|
||||
tool_type_to_string (GdkDeviceToolType tool_type)
|
||||
{
|
||||
switch (tool_type)
|
||||
{
|
||||
case GDK_DEVICE_TOOL_TYPE_PEN:
|
||||
return "Pen";
|
||||
case GDK_DEVICE_TOOL_TYPE_ERASER:
|
||||
return "Eraser";
|
||||
case GDK_DEVICE_TOOL_TYPE_BRUSH:
|
||||
return "Brush";
|
||||
case GDK_DEVICE_TOOL_TYPE_PENCIL:
|
||||
return "Pencil";
|
||||
case GDK_DEVICE_TOOL_TYPE_AIRBRUSH:
|
||||
return "Airbrush";
|
||||
case GDK_DEVICE_TOOL_TYPE_MOUSE:
|
||||
return "Mouse";
|
||||
case GDK_DEVICE_TOOL_TYPE_LENS:
|
||||
return "Lens cursor";
|
||||
case GDK_DEVICE_TOOL_TYPE_UNKNOWN:
|
||||
default:
|
||||
return "Unknown";
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
draw_device_info (GtkWidget *widget,
|
||||
cairo_t *cr,
|
||||
@@ -403,19 +312,6 @@ draw_device_info (GtkWidget *widget,
|
||||
g_string_append_printf (string, "\nSequence: %d",
|
||||
GPOINTER_TO_UINT (sequence));
|
||||
|
||||
if (info->last_tool)
|
||||
{
|
||||
const gchar *tool_type;
|
||||
guint64 serial;
|
||||
|
||||
tool_type = tool_type_to_string (gdk_device_tool_get_tool_type (info->last_tool));
|
||||
serial = gdk_device_tool_get_serial (info->last_tool);
|
||||
g_string_append_printf (string, "\nTool: %s", tool_type);
|
||||
|
||||
if (serial != 0)
|
||||
g_string_append_printf (string, ", Serial: %lx", serial);
|
||||
}
|
||||
|
||||
cairo_move_to (cr, 10, *y);
|
||||
layout = gtk_widget_create_pango_layout (widget, string->str);
|
||||
pango_cairo_show_layout (cr, layout);
|
||||
@@ -444,7 +340,7 @@ draw_cb (GtkWidget *widget,
|
||||
{
|
||||
EventData *data = user_data;
|
||||
GtkAllocation allocation;
|
||||
AxesInfo *info;
|
||||
AxesInfo *touch_info;
|
||||
GHashTableIter iter;
|
||||
gpointer key, value;
|
||||
gint y = 0;
|
||||
@@ -452,37 +348,27 @@ draw_cb (GtkWidget *widget,
|
||||
gtk_widget_get_allocation (widget, &allocation);
|
||||
|
||||
/* Draw Abs info */
|
||||
g_hash_table_iter_init (&iter, data->pointer_info);
|
||||
|
||||
while (g_hash_table_iter_next (&iter, NULL, &value))
|
||||
{
|
||||
info = value;
|
||||
draw_axes_info (cr, info, &allocation);
|
||||
}
|
||||
if (data->pointer_info)
|
||||
draw_axes_info (cr, data->pointer_info, &allocation);
|
||||
|
||||
g_hash_table_iter_init (&iter, data->touch_info);
|
||||
|
||||
while (g_hash_table_iter_next (&iter, NULL, &value))
|
||||
{
|
||||
info = value;
|
||||
draw_axes_info (cr, info, &allocation);
|
||||
touch_info = value;
|
||||
draw_axes_info (cr, touch_info, &allocation);
|
||||
}
|
||||
|
||||
/* Draw name, color legend and misc data */
|
||||
g_hash_table_iter_init (&iter, data->pointer_info);
|
||||
|
||||
while (g_hash_table_iter_next (&iter, NULL, &value))
|
||||
{
|
||||
info = value;
|
||||
draw_device_info (widget, cr, NULL, &y, info);
|
||||
}
|
||||
if (data->pointer_info)
|
||||
draw_device_info (widget, cr, NULL, &y, data->pointer_info);
|
||||
|
||||
g_hash_table_iter_init (&iter, data->touch_info);
|
||||
|
||||
while (g_hash_table_iter_next (&iter, &key, &value))
|
||||
{
|
||||
info = value;
|
||||
draw_device_info (widget, cr, key, &y, info);
|
||||
touch_info = value;
|
||||
draw_device_info (widget, cr, key, &y, touch_info);
|
||||
}
|
||||
|
||||
return FALSE;
|
||||
@@ -506,14 +392,11 @@ do_event_axes (GtkWidget *toplevel)
|
||||
|
||||
box = gtk_event_box_new ();
|
||||
gtk_container_add (GTK_CONTAINER (window), box);
|
||||
gtk_widget_set_support_multidevice (box, TRUE);
|
||||
gtk_widget_add_events (box,
|
||||
GDK_POINTER_MOTION_MASK |
|
||||
GDK_BUTTON_PRESS_MASK |
|
||||
GDK_BUTTON_RELEASE_MASK |
|
||||
GDK_SMOOTH_SCROLL_MASK |
|
||||
GDK_ENTER_NOTIFY_MASK |
|
||||
GDK_LEAVE_NOTIFY_MASK |
|
||||
GDK_TOUCH_MASK);
|
||||
|
||||
event_data = event_data_new ();
|
||||
|
@@ -6,7 +6,6 @@
|
||||
*/
|
||||
|
||||
#include <gtk/gtk.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
enum {
|
||||
WIDTH_COLUMN,
|
||||
@@ -84,28 +83,6 @@ visible_func (GtkTreeModel *model,
|
||||
return width < 10;
|
||||
}
|
||||
|
||||
static void
|
||||
cell_edited (GtkCellRendererSpin *cell,
|
||||
const char *path_string,
|
||||
const char *new_text,
|
||||
GtkListStore *store)
|
||||
{
|
||||
int val;
|
||||
GtkTreePath *path;
|
||||
GtkTreeIter iter;
|
||||
int column;
|
||||
|
||||
path = gtk_tree_path_new_from_string (path_string);
|
||||
gtk_tree_model_get_iter (GTK_TREE_MODEL (store), &iter, path);
|
||||
gtk_tree_path_free (path);
|
||||
|
||||
column = GPOINTER_TO_INT (g_object_get_data (G_OBJECT (cell), "column"));
|
||||
|
||||
val = atoi (new_text);
|
||||
|
||||
gtk_list_store_set (store, &iter, column, val, -1);
|
||||
}
|
||||
|
||||
GtkWidget *
|
||||
do_filtermodel (GtkWidget *do_widget)
|
||||
{
|
||||
@@ -129,21 +106,15 @@ do_filtermodel (GtkWidget *do_widget)
|
||||
g_signal_connect (window, "destroy",
|
||||
G_CALLBACK (gtk_widget_destroyed), &window);
|
||||
|
||||
store = (GtkListStore*)gtk_builder_get_object (builder, "liststore1");
|
||||
|
||||
column = (GtkTreeViewColumn*)gtk_builder_get_object (builder, "treeviewcolumn1");
|
||||
cell = (GtkCellRenderer*)gtk_builder_get_object (builder, "cellrenderertext1");
|
||||
gtk_tree_view_column_set_cell_data_func (column, cell,
|
||||
format_number, GINT_TO_POINTER (WIDTH_COLUMN), NULL);
|
||||
g_object_set_data (G_OBJECT (cell), "column", GINT_TO_POINTER (WIDTH_COLUMN));
|
||||
g_signal_connect (cell, "edited", G_CALLBACK (cell_edited), store);
|
||||
|
||||
column = (GtkTreeViewColumn*)gtk_builder_get_object (builder, "treeviewcolumn2");
|
||||
cell = (GtkCellRenderer*)gtk_builder_get_object (builder, "cellrenderertext2");
|
||||
gtk_tree_view_column_set_cell_data_func (column, cell,
|
||||
format_number, GINT_TO_POINTER (HEIGHT_COLUMN), NULL);
|
||||
g_object_set_data (G_OBJECT (cell), "column", GINT_TO_POINTER (HEIGHT_COLUMN));
|
||||
g_signal_connect (cell, "edited", G_CALLBACK (cell_edited), store);
|
||||
|
||||
column = (GtkTreeViewColumn*)gtk_builder_get_object (builder, "treeviewcolumn3");
|
||||
cell = (GtkCellRenderer*)gtk_builder_get_object (builder, "cellrenderertext3");
|
||||
@@ -164,6 +135,7 @@ do_filtermodel (GtkWidget *do_widget)
|
||||
cell = (GtkCellRenderer*)gtk_builder_get_object (builder, "cellrendererpixbuf1");
|
||||
gtk_tree_view_column_add_attribute (column, cell, "visible", SQUARE_COLUMN);
|
||||
|
||||
store = (GtkListStore*)gtk_builder_get_object (builder, "liststore1");
|
||||
tree = (GtkWidget*)gtk_builder_get_object (builder, "treeview2");
|
||||
|
||||
types[WIDTH_COLUMN] = G_TYPE_INT;
|
||||
|
@@ -24,12 +24,6 @@
|
||||
</row>
|
||||
</data>
|
||||
</object>
|
||||
<object class="GtkAdjustment" id="adj">
|
||||
<property name="lower">5</property>
|
||||
<property name="upper">50</property>
|
||||
<property name="step-increment">1</property>
|
||||
<property name="page-increment">5</property>
|
||||
</object>
|
||||
<object class="GtkWindow" id="window1">
|
||||
<property name="title" translatable="yes">Filter Model</property>
|
||||
<child>
|
||||
@@ -69,10 +63,7 @@
|
||||
<object class="GtkTreeViewColumn" id="treeviewcolumn1">
|
||||
<property name="title" translatable="yes">Width</property>
|
||||
<child>
|
||||
<object class="GtkCellRendererSpin" id="cellrenderertext1">
|
||||
<property name="editable">1</property>
|
||||
<property name="adjustment">adj</property>
|
||||
</object>
|
||||
<object class="GtkCellRendererText" id="cellrenderertext1"/>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
@@ -80,10 +71,7 @@
|
||||
<object class="GtkTreeViewColumn" id="treeviewcolumn2">
|
||||
<property name="title" translatable="yes">Height</property>
|
||||
<child>
|
||||
<object class="GtkCellRendererSpin" id="cellrenderertext2">
|
||||
<property name="editable">1</property>
|
||||
<property name="adjustment">adj</property>
|
||||
</object>
|
||||
<object class="GtkCellRendererText" id="cellrenderertext2"/>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
|
File diff suppressed because it is too large
Load Diff
@@ -1,23 +1,15 @@
|
||||
/* Pango/Font Features
|
||||
*
|
||||
* This example demonstrates support for OpenType font features with
|
||||
* Pango attributes. The attributes can be used manually or via Pango
|
||||
* markup.
|
||||
*
|
||||
* It can also be used to explore available features in OpenType fonts
|
||||
* and their effect.
|
||||
* This demonstrates support for OpenType font features with
|
||||
* Pango attributes. The attributes can be used manually or
|
||||
* via Pango markup.
|
||||
*/
|
||||
|
||||
#include <gtk/gtk.h>
|
||||
#include <pango/pangofc-font.h>
|
||||
#include <hb.h>
|
||||
#include <hb-ot.h>
|
||||
#include <hb-ft.h>
|
||||
|
||||
static GtkWidget *label;
|
||||
static GtkWidget *settings;
|
||||
static GtkWidget *font;
|
||||
static GtkWidget *script_lang;
|
||||
static GtkWidget *resetbutton;
|
||||
static GtkWidget *numcasedefault;
|
||||
static GtkWidget *numspacedefault;
|
||||
@@ -25,19 +17,10 @@ static GtkWidget *fractiondefault;
|
||||
static GtkWidget *stack;
|
||||
static GtkWidget *entry;
|
||||
|
||||
#define num_features 40
|
||||
|
||||
static GtkWidget *toggle[num_features];
|
||||
static GtkWidget *icon[num_features];
|
||||
static const char *feature_names[num_features] = {
|
||||
"kern", "liga", "dlig", "hlig", "clig", "smcp", "c2sc", "pcap", "c2pc", "unic",
|
||||
"cpsp", "case", "lnum", "onum", "pnum", "tnum", "frac", "afrc", "zero", "nalt",
|
||||
"sinf", "swsh", "cswh", "locl", "calt", "hist", "salt", "titl", "rand", "subs",
|
||||
"sups", "init", "medi", "fina", "isol", "ss01", "ss02", "ss03", "ss04", "ss05"
|
||||
};
|
||||
static GtkWidget *toggle[24];
|
||||
|
||||
static void
|
||||
update_display (void)
|
||||
update (void)
|
||||
{
|
||||
GString *s;
|
||||
char *font_desc;
|
||||
@@ -45,10 +28,6 @@ update_display (void)
|
||||
const char *text;
|
||||
gboolean has_feature;
|
||||
int i;
|
||||
hb_tag_t lang_tag;
|
||||
GtkTreeModel *model;
|
||||
GtkTreeIter iter;
|
||||
const char *lang;
|
||||
|
||||
text = gtk_entry_get_text (GTK_ENTRY (entry));
|
||||
|
||||
@@ -57,7 +36,7 @@ update_display (void)
|
||||
s = g_string_new ("");
|
||||
|
||||
has_feature = FALSE;
|
||||
for (i = 0; i < num_features; i++)
|
||||
for (i = 0; i < 24; i++)
|
||||
{
|
||||
if (!gtk_widget_is_sensitive (toggle[i]))
|
||||
continue;
|
||||
@@ -90,24 +69,8 @@ update_display (void)
|
||||
|
||||
gtk_label_set_text (GTK_LABEL (settings), font_settings);
|
||||
|
||||
|
||||
if (gtk_combo_box_get_active_iter (GTK_COMBO_BOX (script_lang), &iter))
|
||||
{
|
||||
model = gtk_combo_box_get_model (GTK_COMBO_BOX (script_lang));
|
||||
gtk_tree_model_get (model, &iter,
|
||||
3, &lang_tag,
|
||||
-1);
|
||||
|
||||
lang = hb_language_to_string (hb_ot_tag_to_language (lang_tag));
|
||||
}
|
||||
else
|
||||
lang = NULL;
|
||||
|
||||
s = g_string_new ("");
|
||||
g_string_append_printf (s, "<span font_desc='%s' font_features='%s'", font_desc, font_settings);
|
||||
if (lang)
|
||||
g_string_append_printf (s, " lang='%s'", lang);
|
||||
g_string_append_printf (s, ">%s</span>", text);
|
||||
g_string_append_printf (s, "<span font_desc='%s' font_features='%s'>%s</span>", font_desc, font_settings, text);
|
||||
|
||||
gtk_label_set_markup (GTK_LABEL (label), s->str);
|
||||
|
||||
@@ -117,315 +80,15 @@ update_display (void)
|
||||
g_free (font_settings);
|
||||
}
|
||||
|
||||
static PangoFont *
|
||||
get_pango_font (void)
|
||||
{
|
||||
PangoFontDescription *desc;
|
||||
PangoContext *context;
|
||||
PangoFontMap *map;
|
||||
|
||||
desc = gtk_font_chooser_get_font_desc (GTK_FONT_CHOOSER (font));
|
||||
context = gtk_widget_get_pango_context (font);
|
||||
map = pango_context_get_font_map (context);
|
||||
|
||||
return pango_font_map_load_font (map, context, desc);
|
||||
}
|
||||
|
||||
static struct { const char *name; hb_script_t script; } script_names[] = {
|
||||
{ "Common", HB_SCRIPT_COMMON },
|
||||
{ "Inherited", HB_SCRIPT_INHERITED },
|
||||
{ "Unknown", HB_SCRIPT_UNKNOWN },
|
||||
{ "Arabic", HB_SCRIPT_ARABIC },
|
||||
{ "Armenian", HB_SCRIPT_ARMENIAN },
|
||||
{ "Bengali", HB_SCRIPT_BENGALI },
|
||||
{ "Cyrillic", HB_SCRIPT_CYRILLIC },
|
||||
{ "Devanagari", HB_SCRIPT_DEVANAGARI },
|
||||
{ "Georgian", HB_SCRIPT_GEORGIAN },
|
||||
{ "Greek", HB_SCRIPT_GREEK },
|
||||
{ "Gujarati", HB_SCRIPT_GUJARATI },
|
||||
{ "Gurmukhi", HB_SCRIPT_GURMUKHI },
|
||||
{ "Hangul", HB_SCRIPT_HANGUL },
|
||||
{ "Han", HB_SCRIPT_HAN },
|
||||
{ "Hebrew", HB_SCRIPT_HEBREW },
|
||||
{ "Hiragana", HB_SCRIPT_HIRAGANA },
|
||||
{ "Kannada", HB_SCRIPT_KANNADA },
|
||||
{ "Katakana", HB_SCRIPT_KATAKANA },
|
||||
{ "Lao", HB_SCRIPT_LAO },
|
||||
{ "Latin", HB_SCRIPT_LATIN },
|
||||
{ "Malayalam", HB_SCRIPT_MALAYALAM },
|
||||
{ "Oriya", HB_SCRIPT_ORIYA },
|
||||
{ "Tamil", HB_SCRIPT_TAMIL },
|
||||
{ "Telugu", HB_SCRIPT_TELUGU },
|
||||
{ "Thai", HB_SCRIPT_THAI },
|
||||
{ "Tibetan", HB_SCRIPT_TIBETAN },
|
||||
{ "Bopomofo", HB_SCRIPT_BOPOMOFO }
|
||||
/* FIXME: complete */
|
||||
};
|
||||
|
||||
static struct { const char *name; hb_tag_t tag; } language_names[] = {
|
||||
{ "Arabic", HB_TAG ('A','R','A',' ') },
|
||||
{ "Romanian", HB_TAG ('R','O','M',' ') },
|
||||
{ "Skolt Sami", HB_TAG ('S','K','S',' ') },
|
||||
{ "Northern Sami", HB_TAG ('N','S','M',' ') },
|
||||
{ "Kildin Sami", HB_TAG ('K','S','M',' ') },
|
||||
{ "Moldavian", HB_TAG ('M','O','L',' ') },
|
||||
{ "Turkish", HB_TAG ('T','R','K',' ') },
|
||||
{ "Azerbaijani", HB_TAG ('A','Z','E',' ') },
|
||||
{ "Crimean Tatar", HB_TAG ('C','R','T',' ') },
|
||||
{ "Serbian", HB_TAG ('S','R','B',' ') },
|
||||
{ "German", HB_TAG ('D','E','U',' ') }
|
||||
/* FIXME: complete */
|
||||
};
|
||||
|
||||
typedef struct {
|
||||
hb_tag_t script_tag;
|
||||
hb_tag_t lang_tag;
|
||||
unsigned int script_index;
|
||||
unsigned int lang_index;
|
||||
} TagPair;
|
||||
|
||||
static guint
|
||||
tag_pair_hash (gconstpointer data)
|
||||
{
|
||||
const TagPair *pair = data;
|
||||
|
||||
return pair->script_tag + pair->lang_tag;
|
||||
}
|
||||
|
||||
static gboolean
|
||||
tag_pair_equal (gconstpointer a, gconstpointer b)
|
||||
{
|
||||
const TagPair *pair_a = a;
|
||||
const TagPair *pair_b = b;
|
||||
|
||||
return pair_a->script_tag == pair_b->script_tag && pair_a->lang_tag == pair_b->lang_tag;
|
||||
}
|
||||
|
||||
static void
|
||||
update_script_combo (void)
|
||||
{
|
||||
GtkListStore *store;
|
||||
hb_font_t *hb_font;
|
||||
gint i, j, k, l;
|
||||
FT_Face ft_face;
|
||||
PangoFont *pango_font;
|
||||
GHashTable *tags;
|
||||
GHashTableIter iter;
|
||||
TagPair *pair;
|
||||
|
||||
store = gtk_list_store_new (4, G_TYPE_STRING, G_TYPE_UINT, G_TYPE_UINT, G_TYPE_UINT);
|
||||
|
||||
pango_font = get_pango_font ();
|
||||
ft_face = pango_fc_font_lock_face (PANGO_FC_FONT (pango_font)),
|
||||
hb_font = hb_ft_font_create (ft_face, NULL);
|
||||
|
||||
tags = g_hash_table_new_full (tag_pair_hash, tag_pair_equal, g_free, NULL);
|
||||
|
||||
pair = g_new (TagPair, 1);
|
||||
pair->script_tag = HB_OT_TAG_DEFAULT_SCRIPT;
|
||||
pair->lang_tag = HB_OT_TAG_DEFAULT_LANGUAGE;
|
||||
g_hash_table_insert (tags, pair, g_strdup ("Default"));
|
||||
|
||||
if (hb_font)
|
||||
{
|
||||
hb_tag_t tables[2] = { HB_OT_TAG_GSUB, HB_OT_TAG_GPOS };
|
||||
hb_face_t *hb_face;
|
||||
|
||||
hb_face = hb_font_get_face (hb_font);
|
||||
|
||||
for (i= 0; i < 2; i++)
|
||||
{
|
||||
hb_tag_t scripts[80];
|
||||
unsigned int script_count = G_N_ELEMENTS (scripts);
|
||||
|
||||
hb_ot_layout_table_get_script_tags (hb_face, tables[i], 0, &script_count, scripts);
|
||||
for (j = 0; j < script_count; j++)
|
||||
{
|
||||
hb_tag_t languages[80];
|
||||
unsigned int language_count = G_N_ELEMENTS (languages);
|
||||
|
||||
pair = g_new (TagPair, 1);
|
||||
pair->script_tag = scripts[j];
|
||||
pair->lang_tag = HB_OT_TAG_DEFAULT_LANGUAGE;
|
||||
pair->script_index = j;
|
||||
pair->lang_index = HB_OT_LAYOUT_DEFAULT_LANGUAGE_INDEX;
|
||||
g_hash_table_add (tags, pair);
|
||||
|
||||
hb_ot_layout_script_get_language_tags (hb_face, tables[i], j, 0, &language_count, languages);
|
||||
for (k = 0; k < language_count; k++)
|
||||
{
|
||||
pair = g_new (TagPair, 1);
|
||||
pair->script_tag = scripts[j];
|
||||
pair->lang_tag = languages[k];
|
||||
pair->script_index = j;
|
||||
pair->lang_index = k;
|
||||
g_hash_table_add (tags, pair);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
hb_face_destroy (hb_face);
|
||||
}
|
||||
|
||||
pango_fc_font_unlock_face (PANGO_FC_FONT (pango_font));
|
||||
g_object_unref (pango_font);
|
||||
|
||||
g_hash_table_iter_init (&iter, tags);
|
||||
while (g_hash_table_iter_next (&iter, (gpointer *)&pair, NULL))
|
||||
{
|
||||
const char *scriptname;
|
||||
char scriptbuf[5];
|
||||
const char *langname;
|
||||
char langbuf[5];
|
||||
char *name;
|
||||
|
||||
if (pair->script_tag == HB_OT_TAG_DEFAULT_SCRIPT)
|
||||
scriptname = "Default";
|
||||
else if (pair->script_tag == HB_TAG ('m','a','t','h'))
|
||||
scriptname = "Math";
|
||||
else
|
||||
{
|
||||
hb_script_t script;
|
||||
|
||||
hb_tag_to_string (pair->script_tag, scriptbuf);
|
||||
scriptbuf[4] = 0;
|
||||
scriptname = scriptbuf;
|
||||
|
||||
script = hb_script_from_iso15924_tag (pair->script_tag);
|
||||
for (k = 0; k < G_N_ELEMENTS (script_names); k++)
|
||||
{
|
||||
if (script == script_names[k].script)
|
||||
{
|
||||
scriptname = script_names[k].name;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (pair->lang_tag == HB_OT_TAG_DEFAULT_LANGUAGE)
|
||||
langname = "Default";
|
||||
else
|
||||
{
|
||||
hb_tag_to_string (pair->lang_tag, langbuf);
|
||||
langbuf[4] = 0;
|
||||
langname = langbuf;
|
||||
|
||||
for (l = 0; l < G_N_ELEMENTS (language_names); l++)
|
||||
{
|
||||
if (pair->lang_tag == language_names[l].tag)
|
||||
{
|
||||
langname = language_names[l].name;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
name = g_strdup_printf ("%s - %s", scriptname, langname);
|
||||
|
||||
gtk_list_store_insert_with_values (store, NULL, -1,
|
||||
0, name,
|
||||
1, pair->script_index,
|
||||
2, pair->lang_index,
|
||||
3, pair->lang_tag,
|
||||
-1);
|
||||
|
||||
g_free (name);
|
||||
}
|
||||
|
||||
g_hash_table_destroy (tags);
|
||||
|
||||
gtk_combo_box_set_model (GTK_COMBO_BOX (script_lang), GTK_TREE_MODEL (store));
|
||||
gtk_combo_box_set_active (GTK_COMBO_BOX (script_lang), 0);
|
||||
}
|
||||
|
||||
static void
|
||||
update_features (void)
|
||||
{
|
||||
gint i, j, k;
|
||||
GtkTreeModel *model;
|
||||
GtkTreeIter iter;
|
||||
guint script_index, lang_index;
|
||||
PangoFont *pango_font;
|
||||
FT_Face ft_face;
|
||||
hb_font_t *hb_font;
|
||||
|
||||
for (i = 0; i < num_features; i++)
|
||||
gtk_widget_set_opacity (icon[i], 0);
|
||||
|
||||
/* set feature presence checks from the font features */
|
||||
|
||||
if (!gtk_combo_box_get_active_iter (GTK_COMBO_BOX (script_lang), &iter))
|
||||
return;
|
||||
|
||||
model = gtk_combo_box_get_model (GTK_COMBO_BOX (script_lang));
|
||||
gtk_tree_model_get (model, &iter,
|
||||
1, &script_index,
|
||||
2, &lang_index,
|
||||
-1);
|
||||
|
||||
pango_font = get_pango_font ();
|
||||
ft_face = pango_fc_font_lock_face (PANGO_FC_FONT (pango_font)),
|
||||
hb_font = hb_ft_font_create (ft_face, NULL);
|
||||
|
||||
if (hb_font)
|
||||
{
|
||||
hb_tag_t tables[2] = { HB_OT_TAG_GSUB, HB_OT_TAG_GPOS };
|
||||
hb_face_t *hb_face;
|
||||
|
||||
hb_face = hb_font_get_face (hb_font);
|
||||
|
||||
for (i = 0; i < 2; i++)
|
||||
{
|
||||
hb_tag_t features[80];
|
||||
unsigned int count = G_N_ELEMENTS(features);
|
||||
|
||||
hb_ot_layout_language_get_feature_tags (hb_face,
|
||||
tables[i],
|
||||
script_index,
|
||||
lang_index,
|
||||
0,
|
||||
&count,
|
||||
features);
|
||||
|
||||
for (j = 0; j < count; j++)
|
||||
{
|
||||
for (k = 0; k < num_features; k++)
|
||||
{
|
||||
if (hb_tag_from_string (feature_names[k], -1) == features[j])
|
||||
gtk_widget_set_opacity (icon[k], 0.5);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
hb_face_destroy (hb_face);
|
||||
}
|
||||
|
||||
pango_fc_font_unlock_face (PANGO_FC_FONT (pango_font));
|
||||
g_object_unref (pango_font);
|
||||
}
|
||||
|
||||
static void
|
||||
font_changed (void)
|
||||
{
|
||||
update_script_combo ();
|
||||
}
|
||||
|
||||
static void
|
||||
script_changed (void)
|
||||
{
|
||||
update_features ();
|
||||
update_display ();
|
||||
}
|
||||
|
||||
static void
|
||||
reset_features (void)
|
||||
reset (void)
|
||||
{
|
||||
int i;
|
||||
|
||||
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (numcasedefault), TRUE);
|
||||
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (numspacedefault), TRUE);
|
||||
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (fractiondefault), TRUE);
|
||||
for (i = 0; i < num_features; i++)
|
||||
for (i = 0; i < 24; i++)
|
||||
{
|
||||
if (!GTK_IS_RADIO_BUTTON (toggle[i]))
|
||||
{
|
||||
@@ -450,7 +113,7 @@ switch_to_label (void)
|
||||
g_free (text);
|
||||
text = NULL;
|
||||
gtk_stack_set_visible_child_name (GTK_STACK (stack), "label");
|
||||
update_display ();
|
||||
update ();
|
||||
}
|
||||
|
||||
static gboolean
|
||||
@@ -476,12 +139,10 @@ do_font_features (GtkWidget *do_widget)
|
||||
GtkBuilder *builder;
|
||||
int i;
|
||||
|
||||
builder = gtk_builder_new_from_resource ("/font_features/font-features.ui");
|
||||
builder = gtk_builder_new_from_resource ("/font-features/font-features.ui");
|
||||
|
||||
gtk_builder_add_callback_symbol (builder, "update_display", update_display);
|
||||
gtk_builder_add_callback_symbol (builder, "font_changed", font_changed);
|
||||
gtk_builder_add_callback_symbol (builder, "script_changed", script_changed);
|
||||
gtk_builder_add_callback_symbol (builder, "reset", reset_features);
|
||||
gtk_builder_add_callback_symbol (builder, "update", update);
|
||||
gtk_builder_add_callback_symbol (builder, "reset", reset);
|
||||
gtk_builder_add_callback_symbol (builder, "switch_to_entry", switch_to_entry);
|
||||
gtk_builder_add_callback_symbol (builder, "switch_to_label", switch_to_label);
|
||||
gtk_builder_add_callback_symbol (builder, "entry_key_press", G_CALLBACK (entry_key_press));
|
||||
@@ -492,24 +153,39 @@ do_font_features (GtkWidget *do_widget)
|
||||
settings = GTK_WIDGET (gtk_builder_get_object (builder, "settings"));
|
||||
resetbutton = GTK_WIDGET (gtk_builder_get_object (builder, "reset"));
|
||||
font = GTK_WIDGET (gtk_builder_get_object (builder, "font"));
|
||||
script_lang = GTK_WIDGET (gtk_builder_get_object (builder, "script_lang"));
|
||||
numcasedefault = GTK_WIDGET (gtk_builder_get_object (builder, "numcasedefault"));
|
||||
numspacedefault = GTK_WIDGET (gtk_builder_get_object (builder, "numspacedefault"));
|
||||
fractiondefault = GTK_WIDGET (gtk_builder_get_object (builder, "fractiondefault"));
|
||||
stack = GTK_WIDGET (gtk_builder_get_object (builder, "stack"));
|
||||
entry = GTK_WIDGET (gtk_builder_get_object (builder, "entry"));
|
||||
|
||||
for (i = 0; i < num_features; i++)
|
||||
{
|
||||
char *iname;
|
||||
i = 0;
|
||||
toggle[i++] = GTK_WIDGET (gtk_builder_get_object (builder, "kern"));
|
||||
toggle[i++] = GTK_WIDGET (gtk_builder_get_object (builder, "liga"));
|
||||
toggle[i++] = GTK_WIDGET (gtk_builder_get_object (builder, "dlig"));
|
||||
toggle[i++] = GTK_WIDGET (gtk_builder_get_object (builder, "hlig"));
|
||||
toggle[i++] = GTK_WIDGET (gtk_builder_get_object (builder, "clig"));
|
||||
toggle[i++] = GTK_WIDGET (gtk_builder_get_object (builder, "smcp"));
|
||||
toggle[i++] = GTK_WIDGET (gtk_builder_get_object (builder, "c2sc"));
|
||||
toggle[i++] = GTK_WIDGET (gtk_builder_get_object (builder, "lnum"));
|
||||
toggle[i++] = GTK_WIDGET (gtk_builder_get_object (builder, "onum"));
|
||||
toggle[i++] = GTK_WIDGET (gtk_builder_get_object (builder, "pnum"));
|
||||
toggle[i++] = GTK_WIDGET (gtk_builder_get_object (builder, "tnum"));
|
||||
toggle[i++] = GTK_WIDGET (gtk_builder_get_object (builder, "frac"));
|
||||
toggle[i++] = GTK_WIDGET (gtk_builder_get_object (builder, "afrc"));
|
||||
toggle[i++] = GTK_WIDGET (gtk_builder_get_object (builder, "zero"));
|
||||
toggle[i++] = GTK_WIDGET (gtk_builder_get_object (builder, "nalt"));
|
||||
toggle[i++] = GTK_WIDGET (gtk_builder_get_object (builder, "swsh"));
|
||||
toggle[i++] = GTK_WIDGET (gtk_builder_get_object (builder, "calt"));
|
||||
toggle[i++] = GTK_WIDGET (gtk_builder_get_object (builder, "hist"));
|
||||
toggle[i++] = GTK_WIDGET (gtk_builder_get_object (builder, "salt"));
|
||||
toggle[i++] = GTK_WIDGET (gtk_builder_get_object (builder, "ss01"));
|
||||
toggle[i++] = GTK_WIDGET (gtk_builder_get_object (builder, "ss02"));
|
||||
toggle[i++] = GTK_WIDGET (gtk_builder_get_object (builder, "ss03"));
|
||||
toggle[i++] = GTK_WIDGET (gtk_builder_get_object (builder, "ss04"));
|
||||
toggle[i++] = GTK_WIDGET (gtk_builder_get_object (builder, "ss05"));
|
||||
|
||||
toggle[i] = GTK_WIDGET (gtk_builder_get_object (builder, feature_names[i]));
|
||||
iname = g_strconcat (feature_names[i], "_pres", NULL);
|
||||
icon[i] = GTK_WIDGET (gtk_builder_get_object (builder, iname));
|
||||
g_free (iname);
|
||||
}
|
||||
|
||||
font_changed ();
|
||||
update ();
|
||||
|
||||
g_signal_connect (window, "destroy",
|
||||
G_CALLBACK (gtk_widget_destroyed), &window);
|
||||
|
@@ -1,986 +0,0 @@
|
||||
/* Foreign drawing
|
||||
*
|
||||
* Many applications can't use GTK+ widgets, for a variety of reasons,
|
||||
* but still want their user interface to appear integrated with the
|
||||
* rest of the desktop, and follow GTK+ themes. This demo shows how to
|
||||
* use GtkStyleContext and the gtk_render_ APIs to achieve this.
|
||||
*
|
||||
* Note that this is a very simple, non-interactive example.
|
||||
*/
|
||||
|
||||
#include <gtk/gtk.h>
|
||||
#include <string.h>
|
||||
|
||||
static void
|
||||
append_element (GtkWidgetPath *path,
|
||||
const char *selector)
|
||||
{
|
||||
static const struct {
|
||||
const char *name;
|
||||
GtkStateFlags state_flag;
|
||||
} pseudo_classes[] = {
|
||||
{ "active", GTK_STATE_FLAG_ACTIVE },
|
||||
{ "hover", GTK_STATE_FLAG_PRELIGHT },
|
||||
{ "selected", GTK_STATE_FLAG_SELECTED },
|
||||
{ "disabled", GTK_STATE_FLAG_INSENSITIVE },
|
||||
{ "indeterminate", GTK_STATE_FLAG_INCONSISTENT },
|
||||
{ "focus", GTK_STATE_FLAG_FOCUSED },
|
||||
{ "backdrop", GTK_STATE_FLAG_BACKDROP },
|
||||
{ "dir(ltr)", GTK_STATE_FLAG_DIR_LTR },
|
||||
{ "dir(rtl)", GTK_STATE_FLAG_DIR_RTL },
|
||||
{ "link", GTK_STATE_FLAG_LINK },
|
||||
{ "visited", GTK_STATE_FLAG_VISITED },
|
||||
{ "checked", GTK_STATE_FLAG_CHECKED },
|
||||
{ "drop(active)", GTK_STATE_FLAG_DROP_ACTIVE }
|
||||
};
|
||||
const char *next;
|
||||
char *name;
|
||||
char type;
|
||||
guint i;
|
||||
|
||||
next = strpbrk (selector, "#.:");
|
||||
if (next == NULL)
|
||||
next = selector + strlen (selector);
|
||||
|
||||
name = g_strndup (selector, next - selector);
|
||||
if (g_ascii_isupper (selector[0]))
|
||||
{
|
||||
GType gtype;
|
||||
gtype = g_type_from_name (name);
|
||||
if (gtype == G_TYPE_INVALID)
|
||||
{
|
||||
g_critical ("Unknown type name `%s'", name);
|
||||
g_free (name);
|
||||
return;
|
||||
}
|
||||
gtk_widget_path_append_type (path, gtype);
|
||||
}
|
||||
else
|
||||
{
|
||||
/* Omit type, we're using name */
|
||||
gtk_widget_path_append_type (path, G_TYPE_NONE);
|
||||
gtk_widget_path_iter_set_object_name (path, -1, name);
|
||||
}
|
||||
g_free (name);
|
||||
|
||||
while (*next != '\0')
|
||||
{
|
||||
type = *next;
|
||||
selector = next + 1;
|
||||
next = strpbrk (selector, "#.:");
|
||||
if (next == NULL)
|
||||
next = selector + strlen (selector);
|
||||
name = g_strndup (selector, next - selector);
|
||||
|
||||
switch (type)
|
||||
{
|
||||
case '#':
|
||||
gtk_widget_path_iter_set_name (path, -1, name);
|
||||
break;
|
||||
|
||||
case '.':
|
||||
gtk_widget_path_iter_add_class (path, -1, name);
|
||||
break;
|
||||
|
||||
case ':':
|
||||
for (i = 0; i < G_N_ELEMENTS (pseudo_classes); i++)
|
||||
{
|
||||
if (g_str_equal (pseudo_classes[i].name, name))
|
||||
{
|
||||
gtk_widget_path_iter_set_state (path,
|
||||
-1,
|
||||
gtk_widget_path_iter_get_state (path, -1)
|
||||
| pseudo_classes[i].state_flag);
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (i == G_N_ELEMENTS (pseudo_classes))
|
||||
g_critical ("Unknown pseudo-class :%s", name);
|
||||
break;
|
||||
|
||||
default:
|
||||
g_assert_not_reached ();
|
||||
break;
|
||||
}
|
||||
|
||||
g_free (name);
|
||||
}
|
||||
}
|
||||
|
||||
static GtkStyleContext *
|
||||
create_context_for_path (GtkWidgetPath *path,
|
||||
GtkStyleContext *parent)
|
||||
{
|
||||
GtkStyleContext *context;
|
||||
|
||||
context = gtk_style_context_new ();
|
||||
gtk_style_context_set_path (context, path);
|
||||
gtk_style_context_set_parent (context, parent);
|
||||
/* Unfortunately, we have to explicitly set the state again here
|
||||
* for it to take effect
|
||||
*/
|
||||
gtk_style_context_set_state (context, gtk_widget_path_iter_get_state (path, -1));
|
||||
gtk_widget_path_unref (path);
|
||||
|
||||
return context;
|
||||
}
|
||||
|
||||
static GtkStyleContext *
|
||||
get_style (GtkStyleContext *parent,
|
||||
const char *selector)
|
||||
{
|
||||
GtkWidgetPath *path;
|
||||
|
||||
if (parent)
|
||||
path = gtk_widget_path_copy (gtk_style_context_get_path (parent));
|
||||
else
|
||||
path = gtk_widget_path_new ();
|
||||
|
||||
append_element (path, selector);
|
||||
|
||||
return create_context_for_path (path, parent);
|
||||
}
|
||||
|
||||
static GtkStyleContext *
|
||||
get_style_with_siblings (GtkStyleContext *parent,
|
||||
const char *selector,
|
||||
const char **siblings,
|
||||
gint position)
|
||||
{
|
||||
GtkWidgetPath *path, *siblings_path;
|
||||
guint i;
|
||||
|
||||
if (parent)
|
||||
path = gtk_widget_path_copy (gtk_style_context_get_path (parent));
|
||||
else
|
||||
path = gtk_widget_path_new ();
|
||||
|
||||
siblings_path = gtk_widget_path_new ();
|
||||
for (i = 0; siblings[i]; i++)
|
||||
append_element (siblings_path, siblings[i]);
|
||||
|
||||
gtk_widget_path_append_with_siblings (path, siblings_path, position);
|
||||
gtk_widget_path_unref (siblings_path);
|
||||
|
||||
return create_context_for_path (path, parent);
|
||||
}
|
||||
|
||||
static void
|
||||
draw_style_common (GtkStyleContext *context,
|
||||
cairo_t *cr,
|
||||
gint x,
|
||||
gint y,
|
||||
gint width,
|
||||
gint height,
|
||||
gint *contents_x,
|
||||
gint *contents_y,
|
||||
gint *contents_width,
|
||||
gint *contents_height)
|
||||
{
|
||||
GtkBorder margin, border, padding;
|
||||
int min_width, min_height;
|
||||
|
||||
gtk_style_context_get_margin (context, gtk_style_context_get_state (context), &margin);
|
||||
gtk_style_context_get_border (context, gtk_style_context_get_state (context), &border);
|
||||
gtk_style_context_get_padding (context, gtk_style_context_get_state (context), &padding);
|
||||
|
||||
gtk_style_context_get (context, gtk_style_context_get_state (context),
|
||||
"min-width", &min_width,
|
||||
"min-height", &min_height,
|
||||
NULL);
|
||||
x += margin.left;
|
||||
y += margin.top;
|
||||
width -= margin.left + margin.right;
|
||||
height -= margin.top + margin.bottom;
|
||||
|
||||
width = MAX (width, min_width);
|
||||
height = MAX (height, min_height);
|
||||
|
||||
gtk_render_background (context, cr, x, y, width, height);
|
||||
gtk_render_frame (context, cr, x, y, width, height);
|
||||
|
||||
if (contents_x)
|
||||
*contents_x = x + border.left + padding.left;
|
||||
if (contents_y)
|
||||
*contents_y = y + border.top + padding.top;
|
||||
if (contents_width)
|
||||
*contents_width = width - border.left - border.right - padding.left - padding.right;
|
||||
if (contents_height)
|
||||
*contents_height = height - border.top - border.bottom - padding.top - padding.bottom;
|
||||
}
|
||||
|
||||
static void
|
||||
query_size (GtkStyleContext *context,
|
||||
gint *width,
|
||||
gint *height)
|
||||
{
|
||||
GtkBorder margin, border, padding;
|
||||
int min_width, min_height;
|
||||
|
||||
gtk_style_context_get_margin (context, gtk_style_context_get_state (context), &margin);
|
||||
gtk_style_context_get_border (context, gtk_style_context_get_state (context), &border);
|
||||
gtk_style_context_get_padding (context, gtk_style_context_get_state (context), &padding);
|
||||
|
||||
gtk_style_context_get (context, gtk_style_context_get_state (context),
|
||||
"min-width", &min_width,
|
||||
"min-height", &min_height,
|
||||
NULL);
|
||||
|
||||
min_width += margin.left + margin.right + border.left + border.right + padding.left + padding.right;
|
||||
min_height += margin.top + margin.bottom + border.top + border.bottom + padding.top + padding.bottom;
|
||||
|
||||
if (width)
|
||||
*width = MAX (*width, min_width);
|
||||
if (height)
|
||||
*height = MAX (*height, min_height);
|
||||
}
|
||||
|
||||
static void
|
||||
draw_menu (GtkWidget *widget,
|
||||
cairo_t *cr,
|
||||
gint x,
|
||||
gint y,
|
||||
gint width,
|
||||
gint *height)
|
||||
{
|
||||
GtkStyleContext *menu_context;
|
||||
GtkStyleContext *menuitem_context;
|
||||
GtkStyleContext *hovermenuitem_context;
|
||||
GtkStyleContext *hoveredarrowmenuitem_context;
|
||||
GtkStyleContext *arrowmenuitem_context;
|
||||
GtkStyleContext *checkmenuitem_context;
|
||||
GtkStyleContext *disabledarrowmenuitem_context;
|
||||
GtkStyleContext *disabledcheckmenuitem_context;
|
||||
GtkStyleContext *radiomenuitem_context;
|
||||
GtkStyleContext *disablemenuitem_context;
|
||||
GtkStyleContext *disabledradiomenuitem_context;
|
||||
GtkStyleContext *separatormenuitem_context;
|
||||
gint menuitem1_height, menuitem2_height, menuitem3_height, menuitem4_height, menuitem5_height;
|
||||
gint contents_x, contents_y, contents_width, contents_height;
|
||||
gint menu_x, menu_y, menu_width, menu_height;
|
||||
gint arrow_width, arrow_height, arrow_size;
|
||||
gint toggle_x, toggle_y, toggle_width, toggle_height;
|
||||
|
||||
/* This information is taken from the GtkMenu docs, see "CSS nodes" */
|
||||
menu_context = get_style (gtk_widget_get_style_context(widget), "menu");
|
||||
hovermenuitem_context = get_style (menu_context, "menuitem:hover");
|
||||
hoveredarrowmenuitem_context = get_style (hovermenuitem_context, "arrow.right:dir(ltr)");
|
||||
menuitem_context = get_style (menu_context, "menuitem");
|
||||
arrowmenuitem_context = get_style (menuitem_context, "arrow:dir(rtl)");
|
||||
disablemenuitem_context = get_style (menu_context, "menuitem:disabled");
|
||||
disabledarrowmenuitem_context = get_style (disablemenuitem_context, "arrow:dir(rtl)");
|
||||
checkmenuitem_context = get_style (menuitem_context, "check:checked");
|
||||
disabledcheckmenuitem_context = get_style (disablemenuitem_context, "check");
|
||||
separatormenuitem_context = get_style (menu_context, "separator:disabled");
|
||||
radiomenuitem_context = get_style (menuitem_context, "radio:checked");
|
||||
disabledradiomenuitem_context = get_style (disablemenuitem_context, "radio");
|
||||
|
||||
*height = 0;
|
||||
query_size (menu_context, NULL, height);
|
||||
menuitem1_height = 0;
|
||||
query_size (hovermenuitem_context, NULL, &menuitem1_height);
|
||||
query_size (hoveredarrowmenuitem_context, NULL, &menuitem1_height);
|
||||
*height += menuitem1_height;
|
||||
menuitem2_height = 0;
|
||||
query_size (menu_context, NULL, &menuitem5_height);
|
||||
query_size (menuitem_context, NULL, &menuitem2_height);
|
||||
query_size (arrowmenuitem_context, NULL, &menuitem2_height);
|
||||
query_size (disabledarrowmenuitem_context, NULL, &menuitem2_height);
|
||||
*height += menuitem2_height;
|
||||
menuitem3_height = 0;
|
||||
query_size (menu_context, NULL, &menuitem5_height);
|
||||
query_size (menuitem_context, NULL, &menuitem3_height);
|
||||
query_size (checkmenuitem_context, NULL, &menuitem3_height);
|
||||
query_size (disabledcheckmenuitem_context, NULL, &menuitem3_height);
|
||||
*height += menuitem3_height;
|
||||
menuitem4_height = 0;
|
||||
query_size (menu_context, NULL, &menuitem5_height);
|
||||
query_size (separatormenuitem_context, NULL, &menuitem4_height);
|
||||
*height += menuitem4_height;
|
||||
menuitem5_height = 0;
|
||||
query_size (menu_context, NULL, &menuitem5_height);
|
||||
query_size (menuitem_context, NULL, &menuitem5_height);
|
||||
query_size (radiomenuitem_context, NULL, &menuitem5_height);
|
||||
query_size (disabledradiomenuitem_context, NULL, &menuitem5_height);
|
||||
*height += menuitem5_height;
|
||||
|
||||
draw_style_common (menu_context, cr, x, y, width, *height,
|
||||
&menu_x, &menu_y, &menu_width, &menu_height);
|
||||
|
||||
/* Hovered with right arrow */
|
||||
gtk_style_context_get (hoveredarrowmenuitem_context, gtk_style_context_get_state (hoveredarrowmenuitem_context),
|
||||
"min-width", &arrow_width, "min-height", &arrow_height, NULL);
|
||||
arrow_size = MIN (arrow_width, arrow_height);
|
||||
draw_style_common (hovermenuitem_context, cr, menu_x, menu_y, menu_width, menuitem1_height,
|
||||
&contents_x, &contents_y, &contents_width, &contents_height);
|
||||
gtk_render_arrow (hoveredarrowmenuitem_context, cr, G_PI / 2,
|
||||
contents_x + contents_width - arrow_size,
|
||||
contents_y + (contents_height - arrow_size) / 2, arrow_size);
|
||||
|
||||
/* Left arrow sensitive, and right arrow insensitive */
|
||||
draw_style_common (menuitem_context, cr, menu_x, menu_y + menuitem1_height, menu_width, menuitem2_height,
|
||||
&contents_x, &contents_y, &contents_width, &contents_height);
|
||||
gtk_style_context_get (arrowmenuitem_context, gtk_style_context_get_state (arrowmenuitem_context),
|
||||
"min-width", &arrow_width, "min-height", &arrow_height, NULL);
|
||||
arrow_size = MIN (arrow_width, arrow_height);
|
||||
gtk_render_arrow (arrowmenuitem_context, cr, G_PI / 2,
|
||||
contents_x,
|
||||
contents_y + (contents_height - arrow_size) / 2, arrow_size);
|
||||
gtk_style_context_get (disabledarrowmenuitem_context, gtk_style_context_get_state (disabledarrowmenuitem_context),
|
||||
"min-width", &arrow_width, "min-height", &arrow_height, NULL);
|
||||
arrow_size = MIN (arrow_width, arrow_height);
|
||||
gtk_render_arrow (disabledarrowmenuitem_context, cr, G_PI / 2,
|
||||
contents_x + contents_width - arrow_size,
|
||||
contents_y + (contents_height - arrow_size) / 2, arrow_size);
|
||||
|
||||
|
||||
/* Left check enabled, sensitive, and right check unchecked, insensitive */
|
||||
draw_style_common (menuitem_context, cr, menu_x, menu_y + menuitem1_height + menuitem2_height, menu_width, menuitem3_height,
|
||||
&contents_x, &contents_y, &contents_width, &contents_height);
|
||||
gtk_style_context_get (checkmenuitem_context, gtk_style_context_get_state (checkmenuitem_context),
|
||||
"min-width", &toggle_width, "min-height", &toggle_height, NULL);
|
||||
draw_style_common (checkmenuitem_context, cr,
|
||||
contents_x,
|
||||
contents_y,
|
||||
toggle_width, toggle_height,
|
||||
&toggle_x, &toggle_y, &toggle_width, &toggle_height);
|
||||
gtk_render_check (checkmenuitem_context, cr, toggle_x, toggle_y, toggle_width, toggle_height);
|
||||
gtk_style_context_get (disabledcheckmenuitem_context, gtk_style_context_get_state (disabledcheckmenuitem_context),
|
||||
"min-width", &toggle_width, "min-height", &toggle_height, NULL);
|
||||
draw_style_common (disabledcheckmenuitem_context, cr,
|
||||
contents_x + contents_width - toggle_width,
|
||||
contents_y,
|
||||
toggle_width, toggle_height,
|
||||
&toggle_x, &toggle_y, &toggle_width, &toggle_height);
|
||||
gtk_render_check (disabledcheckmenuitem_context, cr, toggle_x, toggle_y, toggle_width, toggle_height);
|
||||
|
||||
/* Separator */
|
||||
draw_style_common (separatormenuitem_context, cr, menu_x, menu_y + menuitem1_height + menuitem2_height + menuitem3_height,
|
||||
menu_width, menuitem4_height,
|
||||
NULL, NULL, NULL, NULL);
|
||||
|
||||
/* Left check enabled, sensitive, and right check unchecked, insensitive */
|
||||
draw_style_common (menuitem_context, cr, menu_x, menu_y + menuitem1_height + menuitem2_height + menuitem3_height + menuitem4_height,
|
||||
menu_width, menuitem5_height,
|
||||
&contents_x, &contents_y, &contents_width, &contents_height);
|
||||
gtk_style_context_get (radiomenuitem_context, gtk_style_context_get_state (radiomenuitem_context),
|
||||
"min-width", &toggle_width, "min-height", &toggle_height, NULL);
|
||||
draw_style_common (radiomenuitem_context, cr,
|
||||
contents_x,
|
||||
contents_y,
|
||||
toggle_width, toggle_height,
|
||||
&toggle_x, &toggle_y, &toggle_width, &toggle_height);
|
||||
gtk_render_check (radiomenuitem_context, cr, toggle_x, toggle_y, toggle_width, toggle_height);
|
||||
gtk_style_context_get (disabledradiomenuitem_context, gtk_style_context_get_state (disabledradiomenuitem_context),
|
||||
"min-width", &toggle_width, "min-height", &toggle_height, NULL);
|
||||
draw_style_common (disabledradiomenuitem_context, cr,
|
||||
contents_x + contents_width - toggle_width,
|
||||
contents_y,
|
||||
toggle_width, toggle_height,
|
||||
&toggle_x, &toggle_y, &toggle_width, &toggle_height);
|
||||
gtk_render_check (disabledradiomenuitem_context, cr, toggle_x, toggle_y, toggle_width, toggle_height);
|
||||
|
||||
g_object_unref (menu_context);
|
||||
g_object_unref (menuitem_context);
|
||||
g_object_unref (hovermenuitem_context);
|
||||
g_object_unref (hoveredarrowmenuitem_context);
|
||||
g_object_unref (arrowmenuitem_context);
|
||||
g_object_unref (checkmenuitem_context);
|
||||
g_object_unref (disabledarrowmenuitem_context);
|
||||
g_object_unref (disabledcheckmenuitem_context);
|
||||
g_object_unref (radiomenuitem_context);
|
||||
g_object_unref (disablemenuitem_context);
|
||||
g_object_unref (disabledradiomenuitem_context);
|
||||
g_object_unref (separatormenuitem_context);
|
||||
}
|
||||
|
||||
static void
|
||||
draw_menubar (GtkWidget *widget,
|
||||
cairo_t *cr,
|
||||
gint x,
|
||||
gint y,
|
||||
gint width,
|
||||
gint *height)
|
||||
{
|
||||
GtkStyleContext *frame_context;
|
||||
GtkStyleContext *border_context;
|
||||
GtkStyleContext *menubar_context;
|
||||
GtkStyleContext *hovered_menuitem_context;
|
||||
GtkStyleContext *menuitem_context;
|
||||
gint contents_x, contents_y, contents_width, contents_height;
|
||||
gint item_width;
|
||||
|
||||
/* Menubar background is the same color as our base background, so use a frame */
|
||||
frame_context = get_style (NULL, "frame");
|
||||
border_context = get_style (frame_context, "border");
|
||||
|
||||
/* This information is taken from the GtkMenuBar docs, see "CSS nodes" */
|
||||
menubar_context = get_style (NULL, "menubar");
|
||||
hovered_menuitem_context = get_style (menubar_context, "menuitem:hover");
|
||||
menuitem_context = get_style (menubar_context, "menuitem");
|
||||
|
||||
*height = 0;
|
||||
query_size (frame_context, NULL, height);
|
||||
query_size (border_context, NULL, height);
|
||||
query_size (menubar_context, NULL, height);
|
||||
query_size (hovered_menuitem_context, NULL, height);
|
||||
query_size (menuitem_context, NULL, height);
|
||||
|
||||
draw_style_common (frame_context, cr, x, y, width, *height,
|
||||
NULL, NULL, NULL, NULL);
|
||||
draw_style_common (border_context, cr, x, y, width, *height,
|
||||
&contents_x, &contents_y, &contents_width, &contents_height);
|
||||
draw_style_common (menubar_context, cr, contents_x, contents_y, contents_width, contents_height,
|
||||
NULL, NULL, NULL, NULL);
|
||||
item_width = contents_width / 3;
|
||||
draw_style_common (hovered_menuitem_context, cr, contents_x, contents_y, item_width, contents_height,
|
||||
NULL, NULL, NULL, NULL);
|
||||
draw_style_common (menuitem_context, cr, contents_x + item_width * 2, contents_y, item_width, contents_height,
|
||||
NULL, NULL, NULL, NULL);
|
||||
|
||||
g_object_unref (menuitem_context);
|
||||
g_object_unref (hovered_menuitem_context);
|
||||
g_object_unref (menubar_context);
|
||||
g_object_unref (border_context);
|
||||
g_object_unref (frame_context);
|
||||
}
|
||||
|
||||
static void
|
||||
draw_notebook (GtkWidget *widget,
|
||||
cairo_t *cr,
|
||||
gint x,
|
||||
gint y,
|
||||
gint width,
|
||||
gint height)
|
||||
{
|
||||
GtkStyleContext *notebook_context;
|
||||
GtkStyleContext *header_context;
|
||||
GtkStyleContext *tabs_context;
|
||||
GtkStyleContext *tab1_context, *tab2_context;
|
||||
GtkStyleContext *stack_context;
|
||||
gint header_height;
|
||||
gint contents_x, contents_y, contents_width, contents_height;
|
||||
|
||||
/* This information is taken from the GtkNotebook docs, see "CSS nodes" */
|
||||
notebook_context = get_style (NULL, "notebook.frame");
|
||||
header_context = get_style (notebook_context, "header.top");
|
||||
tabs_context = get_style (header_context, "tabs");
|
||||
tab1_context = get_style (tabs_context, "tab:checked");
|
||||
tab2_context = get_style (tabs_context, "tab:hover");
|
||||
stack_context = get_style (notebook_context, "stack");
|
||||
|
||||
header_height = 0;
|
||||
query_size (notebook_context, NULL, &header_height);
|
||||
query_size (header_context, NULL, &header_height);
|
||||
query_size (tabs_context, NULL, &header_height);
|
||||
query_size (tab1_context, NULL, &header_height);
|
||||
query_size (tab2_context, NULL, &header_height);
|
||||
|
||||
draw_style_common (notebook_context, cr, x, y, width, height, NULL, NULL, NULL, NULL);
|
||||
draw_style_common (header_context, cr, x, y, width, header_height, NULL, NULL, NULL, NULL);
|
||||
draw_style_common (tabs_context, cr, x, y, width, header_height, NULL, NULL, NULL, NULL);
|
||||
draw_style_common (tab1_context, cr, x, y, width / 2, header_height,
|
||||
&contents_x, &contents_y, &contents_width, &contents_height);
|
||||
draw_style_common (tab2_context, cr, x + width / 2, y, width / 2, header_height,
|
||||
NULL, NULL, NULL, NULL);
|
||||
draw_style_common (stack_context, cr, x, y + header_height, width,height - header_height,
|
||||
NULL, NULL, NULL, NULL);
|
||||
|
||||
g_object_unref (stack_context);
|
||||
g_object_unref (tabs_context);
|
||||
g_object_unref (tab1_context);
|
||||
g_object_unref (tab2_context);
|
||||
g_object_unref (header_context);
|
||||
g_object_unref (notebook_context);
|
||||
}
|
||||
|
||||
static void
|
||||
draw_horizontal_scrollbar (GtkWidget *widget,
|
||||
cairo_t *cr,
|
||||
gint x,
|
||||
gint y,
|
||||
gint width,
|
||||
gint position,
|
||||
GtkStateFlags state,
|
||||
gint *height)
|
||||
{
|
||||
GtkStyleContext *scrollbar_context;
|
||||
GtkStyleContext *contents_context;
|
||||
GtkStyleContext *trough_context;
|
||||
GtkStyleContext *slider_context;
|
||||
gint slider_width;
|
||||
|
||||
/* This information is taken from the GtkScrollbar docs, see "CSS nodes" */
|
||||
scrollbar_context = get_style (NULL, "scrollbar.horizontal.bottom");
|
||||
contents_context = get_style (scrollbar_context, "contents");
|
||||
trough_context = get_style (contents_context, "trough");
|
||||
slider_context = get_style (trough_context, "slider");
|
||||
|
||||
gtk_style_context_set_state (scrollbar_context, state);
|
||||
gtk_style_context_set_state (contents_context, state);
|
||||
gtk_style_context_set_state (trough_context, state);
|
||||
gtk_style_context_set_state (slider_context, state);
|
||||
|
||||
*height = 0;
|
||||
query_size (scrollbar_context, NULL, height);
|
||||
query_size (contents_context, NULL, height);
|
||||
query_size (trough_context, NULL, height);
|
||||
query_size (slider_context, NULL, height);
|
||||
|
||||
gtk_style_context_get (slider_context, gtk_style_context_get_state (slider_context),
|
||||
"min-width", &slider_width, NULL);
|
||||
|
||||
draw_style_common (scrollbar_context, cr, x, y, width, *height, NULL, NULL, NULL, NULL);
|
||||
draw_style_common (contents_context, cr, x, y, width, *height, NULL, NULL, NULL, NULL);
|
||||
draw_style_common (trough_context, cr, x, y, width, *height, NULL, NULL, NULL, NULL);
|
||||
draw_style_common (slider_context, cr, x + position, y, slider_width, *height, NULL, NULL, NULL, NULL);
|
||||
|
||||
g_object_unref (slider_context);
|
||||
g_object_unref (trough_context);
|
||||
g_object_unref (contents_context);
|
||||
g_object_unref (scrollbar_context);
|
||||
}
|
||||
|
||||
static void
|
||||
draw_text (GtkWidget *widget,
|
||||
cairo_t *cr,
|
||||
gint x,
|
||||
gint y,
|
||||
gint width,
|
||||
gint height,
|
||||
const gchar *text,
|
||||
GtkStateFlags state)
|
||||
{
|
||||
GtkStyleContext *label_context;
|
||||
GtkStyleContext *selection_context;
|
||||
GtkStyleContext *context;
|
||||
PangoLayout *layout;
|
||||
|
||||
/* This information is taken from the GtkLabel docs, see "CSS nodes" */
|
||||
label_context = get_style (NULL, "label.view");
|
||||
selection_context = get_style (label_context, "selection");
|
||||
|
||||
gtk_style_context_set_state (label_context, state);
|
||||
|
||||
if (state & GTK_STATE_FLAG_SELECTED)
|
||||
context = selection_context;
|
||||
else
|
||||
context = label_context;
|
||||
|
||||
layout = gtk_widget_create_pango_layout (widget, text);
|
||||
|
||||
gtk_render_background (context, cr, x, y, width, height);
|
||||
gtk_render_frame (context, cr, x, y, width, height);
|
||||
gtk_render_layout (context, cr, x, y, layout);
|
||||
|
||||
g_object_unref (layout);
|
||||
|
||||
g_object_unref (selection_context);
|
||||
g_object_unref (label_context);
|
||||
}
|
||||
|
||||
static void
|
||||
draw_check (GtkWidget *widget,
|
||||
cairo_t *cr,
|
||||
gint x,
|
||||
gint y,
|
||||
GtkStateFlags state,
|
||||
gint *width,
|
||||
gint *height)
|
||||
{
|
||||
GtkStyleContext *button_context;
|
||||
GtkStyleContext *check_context;
|
||||
gint contents_x, contents_y, contents_width, contents_height;
|
||||
|
||||
/* This information is taken from the GtkCheckButton docs, see "CSS nodes" */
|
||||
button_context = get_style (NULL, "checkbutton");
|
||||
check_context = get_style (button_context, "check");
|
||||
|
||||
gtk_style_context_set_state (check_context, state);
|
||||
|
||||
*width = *height = 0;
|
||||
query_size (button_context, width, height);
|
||||
query_size (check_context, width, height);
|
||||
|
||||
draw_style_common (button_context, cr, x, y, *width, *height, NULL, NULL, NULL, NULL);
|
||||
draw_style_common (check_context, cr, x, y, *width, *height,
|
||||
&contents_x, &contents_y, &contents_width, &contents_height);
|
||||
gtk_render_check (check_context, cr, contents_x, contents_y, contents_width, contents_height);
|
||||
|
||||
g_object_unref (check_context);
|
||||
g_object_unref (button_context);
|
||||
|
||||
}
|
||||
|
||||
static void
|
||||
draw_radio (GtkWidget *widget,
|
||||
cairo_t *cr,
|
||||
gint x,
|
||||
gint y,
|
||||
GtkStateFlags state,
|
||||
gint *width,
|
||||
gint *height)
|
||||
{
|
||||
GtkStyleContext *button_context;
|
||||
GtkStyleContext *check_context;
|
||||
gint contents_x, contents_y, contents_width, contents_height;
|
||||
|
||||
/* This information is taken from the GtkRadioButton docs, see "CSS nodes" */
|
||||
button_context = get_style (NULL, "radiobutton");
|
||||
check_context = get_style (button_context, "radio");
|
||||
|
||||
gtk_style_context_set_state (check_context, state);
|
||||
|
||||
*width = *height = 0;
|
||||
query_size (button_context, width, height);
|
||||
query_size (check_context, width, height);
|
||||
|
||||
draw_style_common (button_context, cr, x, y, *width, *height, NULL, NULL, NULL, NULL);
|
||||
draw_style_common (check_context, cr, x, y, *width, *height,
|
||||
&contents_x, &contents_y, &contents_width, &contents_height);
|
||||
gtk_render_check (check_context, cr, contents_x, contents_y, contents_width, contents_height);
|
||||
|
||||
g_object_unref (check_context);
|
||||
g_object_unref (button_context);
|
||||
|
||||
}
|
||||
|
||||
static void
|
||||
draw_progress (GtkWidget *widget,
|
||||
cairo_t *cr,
|
||||
gint x,
|
||||
gint y,
|
||||
gint width,
|
||||
gint position,
|
||||
gint *height)
|
||||
{
|
||||
GtkStyleContext *bar_context;
|
||||
GtkStyleContext *trough_context;
|
||||
GtkStyleContext *progress_context;
|
||||
|
||||
/* This information is taken from the GtkProgressBar docs, see "CSS nodes" */
|
||||
bar_context = get_style (NULL, "progressbar.horizontal");
|
||||
trough_context = get_style (bar_context, "trough");
|
||||
progress_context = get_style (trough_context, "progress.left");
|
||||
|
||||
*height = 0;
|
||||
query_size (bar_context, NULL, height);
|
||||
query_size (trough_context, NULL, height);
|
||||
query_size (progress_context, NULL, height);
|
||||
|
||||
draw_style_common (bar_context, cr, x, y, width, *height, NULL, NULL, NULL, NULL);
|
||||
draw_style_common (trough_context, cr, x, y, width, *height, NULL, NULL, NULL, NULL);
|
||||
draw_style_common (progress_context, cr, x, y, position, *height, NULL, NULL, NULL, NULL);
|
||||
|
||||
g_object_unref (progress_context);
|
||||
g_object_unref (trough_context);
|
||||
g_object_unref (bar_context);
|
||||
}
|
||||
|
||||
static void
|
||||
draw_scale (GtkWidget *widget,
|
||||
cairo_t *cr,
|
||||
gint x,
|
||||
gint y,
|
||||
gint width,
|
||||
gint position,
|
||||
gint *height)
|
||||
{
|
||||
GtkStyleContext *scale_context;
|
||||
GtkStyleContext *contents_context;
|
||||
GtkStyleContext *trough_context;
|
||||
GtkStyleContext *slider_context;
|
||||
GtkStyleContext *highlight_context;
|
||||
gint contents_x, contents_y, contents_width, contents_height;
|
||||
gint trough_height, slider_height;
|
||||
|
||||
scale_context = get_style (NULL, "scale.horizontal");
|
||||
contents_context = get_style (scale_context, "contents");
|
||||
trough_context = get_style (contents_context, "trough");
|
||||
slider_context = get_style (trough_context, "slider");
|
||||
highlight_context = get_style (trough_context, "highlight.top");
|
||||
|
||||
*height = 0;
|
||||
query_size (scale_context, NULL, height);
|
||||
query_size (contents_context, NULL, height);
|
||||
query_size (trough_context, NULL, height);
|
||||
query_size (slider_context, NULL, height);
|
||||
query_size (highlight_context, NULL, height);
|
||||
|
||||
draw_style_common (scale_context, cr, x, y, width, *height,
|
||||
&contents_x, &contents_y, &contents_width, &contents_height);
|
||||
draw_style_common (contents_context, cr, contents_x, contents_y, contents_width, contents_height,
|
||||
&contents_x, &contents_y, &contents_width, &contents_height);
|
||||
/* Scale trough defines its size querying slider and highlight */
|
||||
trough_height = 0;
|
||||
query_size (trough_context, NULL, &trough_height);
|
||||
slider_height = 0;
|
||||
query_size (slider_context, NULL, &slider_height);
|
||||
query_size (highlight_context, NULL, &slider_height);
|
||||
trough_height += slider_height;
|
||||
draw_style_common (trough_context, cr, contents_x, contents_y, contents_width, trough_height,
|
||||
&contents_x, &contents_y, &contents_width, &contents_height);
|
||||
draw_style_common (highlight_context, cr, contents_x, contents_y,
|
||||
contents_width / 2, contents_height,
|
||||
NULL, NULL, NULL, NULL);
|
||||
draw_style_common (slider_context, cr, contents_x + position, contents_y, contents_height, contents_height,
|
||||
NULL, NULL, NULL, NULL);
|
||||
|
||||
g_object_unref (scale_context);
|
||||
g_object_unref (contents_context);
|
||||
g_object_unref (trough_context);
|
||||
g_object_unref (slider_context);
|
||||
g_object_unref (highlight_context);
|
||||
}
|
||||
|
||||
static void
|
||||
draw_combobox (GtkWidget *widget,
|
||||
cairo_t *cr,
|
||||
gint x,
|
||||
gint y,
|
||||
gint width,
|
||||
gboolean has_entry,
|
||||
gint *height)
|
||||
{
|
||||
GtkStyleContext *combo_context;
|
||||
GtkStyleContext *box_context;
|
||||
GtkStyleContext *button_context;
|
||||
GtkStyleContext *button_box_context;
|
||||
GtkStyleContext *entry_context;
|
||||
GtkStyleContext *arrow_context;
|
||||
gint contents_x, contents_y, contents_width, contents_height;
|
||||
gint button_width;
|
||||
gint arrow_width, arrow_height, arrow_size;
|
||||
|
||||
/* This information is taken from the GtkComboBox docs, see "CSS nodes" */
|
||||
combo_context = get_style (NULL, "combobox:focus");
|
||||
box_context = get_style (combo_context, "box.horizontal.linked");
|
||||
if (has_entry)
|
||||
{
|
||||
const char *siblings[3] = { "entry.combo:focus", "button.combo" , NULL };
|
||||
|
||||
entry_context = get_style_with_siblings (box_context, "entry.combo:focus", siblings, 0);
|
||||
button_context = get_style_with_siblings (box_context, "button.combo", siblings, 1);
|
||||
}
|
||||
else
|
||||
{
|
||||
const char *siblings[2] = { "button.combo" , NULL };
|
||||
|
||||
button_context = get_style_with_siblings (box_context, "button.combo", siblings, 0);
|
||||
}
|
||||
button_box_context = get_style (button_context, "box.horizontal");
|
||||
arrow_context = get_style (button_box_context, "arrow");
|
||||
|
||||
*height = 0;
|
||||
query_size (combo_context, NULL, height);
|
||||
query_size (box_context, NULL, height);
|
||||
if (has_entry)
|
||||
query_size (entry_context, NULL, height);
|
||||
query_size (button_context, NULL, height);
|
||||
query_size (button_box_context, NULL, height);
|
||||
query_size (arrow_context, NULL, height);
|
||||
|
||||
gtk_style_context_get (arrow_context, gtk_style_context_get_state (arrow_context),
|
||||
"min-width", &arrow_width, "min-height", &arrow_height, NULL);
|
||||
arrow_size = MIN (arrow_width, arrow_height);
|
||||
|
||||
draw_style_common (combo_context, cr, x, y, width, *height, NULL, NULL, NULL, NULL);
|
||||
draw_style_common (box_context, cr, x, y, width, *height, NULL, NULL, NULL, NULL);
|
||||
if (has_entry)
|
||||
{
|
||||
button_width = *height;
|
||||
draw_style_common (entry_context, cr, x, y, width - button_width, *height, NULL, NULL, NULL, NULL);
|
||||
draw_style_common (button_context, cr, x + width - button_width, y, button_width, *height,
|
||||
&contents_x, &contents_y, &contents_width, &contents_height);
|
||||
}
|
||||
else
|
||||
{
|
||||
button_width = width;
|
||||
draw_style_common (button_context, cr, x, y, width, *height,
|
||||
&contents_x, &contents_y, &contents_width, &contents_height);
|
||||
}
|
||||
|
||||
draw_style_common (button_box_context, cr, contents_x, contents_y, contents_width, contents_height,
|
||||
NULL, NULL, NULL, NULL);
|
||||
draw_style_common (arrow_context, cr, contents_x, contents_y, contents_width, contents_height,
|
||||
NULL, NULL, NULL, NULL);
|
||||
gtk_render_arrow (arrow_context, cr, G_PI / 2,
|
||||
contents_x + contents_width - arrow_size,
|
||||
contents_y + (contents_height - arrow_size) / 2, arrow_size);
|
||||
|
||||
g_object_unref (arrow_context);
|
||||
if (has_entry)
|
||||
g_object_unref (entry_context);
|
||||
g_object_unref (button_context);
|
||||
g_object_unref (combo_context);
|
||||
}
|
||||
|
||||
static void
|
||||
draw_spinbutton (GtkWidget *widget,
|
||||
cairo_t *cr,
|
||||
gint x,
|
||||
gint y,
|
||||
gint width,
|
||||
gint *height)
|
||||
{
|
||||
GtkStyleContext *spin_context;
|
||||
GtkStyleContext *entry_context;
|
||||
GtkStyleContext *up_context;
|
||||
GtkStyleContext *down_context;
|
||||
GtkIconTheme *icon_theme;
|
||||
GtkIconInfo *icon_info;
|
||||
GdkPixbuf *pixbuf;
|
||||
gint icon_width, icon_height, icon_size;
|
||||
gint button_width;
|
||||
gint contents_x, contents_y, contents_width, contents_height;
|
||||
|
||||
/* This information is taken from the GtkSpinButton docs, see "CSS nodes" */
|
||||
spin_context = get_style (NULL, "spinbutton.horizontal:focus");
|
||||
entry_context = get_style (NULL, "entry:focus");
|
||||
up_context = get_style (spin_context, "button.up:focus:active");
|
||||
down_context = get_style (spin_context, "button.down:focus");
|
||||
|
||||
*height = 0;
|
||||
query_size (spin_context, NULL, height);
|
||||
query_size (entry_context, NULL, height);
|
||||
query_size (up_context, NULL, height);
|
||||
query_size (down_context, NULL, height);
|
||||
button_width = *height;
|
||||
|
||||
draw_style_common (spin_context, cr, x, y, width, *height, NULL, NULL, NULL, NULL);
|
||||
draw_style_common (entry_context, cr, x, y, width, *height, NULL, NULL, NULL, NULL);
|
||||
|
||||
icon_theme = gtk_icon_theme_get_for_screen (gtk_widget_get_screen (widget));
|
||||
|
||||
gtk_style_context_get (up_context, gtk_style_context_get_state (up_context),
|
||||
"min-width", &icon_width, "min-height", &icon_height, NULL);
|
||||
icon_size = MIN (icon_width, icon_height);
|
||||
icon_info = gtk_icon_theme_lookup_icon (icon_theme, "list-add-symbolic", icon_size, 0);
|
||||
pixbuf = gtk_icon_info_load_symbolic_for_context (icon_info, up_context, NULL, NULL);
|
||||
g_object_unref (icon_info);
|
||||
draw_style_common (up_context, cr, x + width - button_width, y, button_width, *height,
|
||||
&contents_x, &contents_y, &contents_width, &contents_height);
|
||||
gtk_render_icon (up_context, cr, pixbuf, contents_x, contents_y + (contents_height - icon_size) / 2);
|
||||
g_object_unref (pixbuf);
|
||||
|
||||
|
||||
gtk_style_context_get (down_context, gtk_style_context_get_state (down_context),
|
||||
"min-width", &icon_width, "min-height", &icon_height, NULL);
|
||||
icon_size = MIN (icon_width, icon_height);
|
||||
icon_info = gtk_icon_theme_lookup_icon (icon_theme, "list-remove-symbolic", icon_size, 0);
|
||||
pixbuf = gtk_icon_info_load_symbolic_for_context (icon_info, down_context, NULL, NULL);
|
||||
g_object_unref (icon_info);
|
||||
draw_style_common (down_context, cr, x + width - 2 * button_width, y, button_width, *height,
|
||||
&contents_x, &contents_y, &contents_width, &contents_height);
|
||||
gtk_render_icon (down_context, cr, pixbuf, contents_x, contents_y + (contents_height - icon_size) / 2);
|
||||
g_object_unref (pixbuf);
|
||||
|
||||
g_object_unref (down_context);
|
||||
g_object_unref (up_context);
|
||||
g_object_unref (entry_context);
|
||||
g_object_unref (spin_context);
|
||||
}
|
||||
|
||||
static gboolean
|
||||
draw_cb (GtkWidget *widget,
|
||||
cairo_t *cr)
|
||||
{
|
||||
gint panewidth, width, height;
|
||||
gint x, y;
|
||||
|
||||
width = gtk_widget_get_allocated_width (widget);
|
||||
panewidth = width / 2;
|
||||
height = gtk_widget_get_allocated_height (widget);
|
||||
|
||||
cairo_rectangle (cr, 0, 0, width, height);
|
||||
cairo_set_source_rgb (cr, 0.9, 0.9, 0.9);
|
||||
cairo_fill (cr);
|
||||
|
||||
x = y = 10;
|
||||
draw_horizontal_scrollbar (widget, cr, x, y, panewidth - 20, 30, GTK_STATE_FLAG_NORMAL, &height);
|
||||
y += height + 8;
|
||||
draw_horizontal_scrollbar (widget, cr, x, y, panewidth - 20, 40, GTK_STATE_FLAG_PRELIGHT, &height);
|
||||
y += height + 8;
|
||||
draw_horizontal_scrollbar (widget, cr, x, y, panewidth - 20, 50, GTK_STATE_FLAG_ACTIVE|GTK_STATE_FLAG_PRELIGHT, &height);
|
||||
|
||||
y += height + 8;
|
||||
draw_text (widget, cr, x, y, panewidth - 20, 20, "Not selected", GTK_STATE_FLAG_NORMAL);
|
||||
y += 20 + 10;
|
||||
draw_text (widget, cr, x, y, panewidth - 20, 20, "Selected", GTK_STATE_FLAG_SELECTED);
|
||||
|
||||
x = 10;
|
||||
y += 20 + 10;
|
||||
draw_check (widget, cr, x, y, GTK_STATE_FLAG_NORMAL, &width, &height);
|
||||
x += width + 10;
|
||||
draw_check (widget, cr, x, y, GTK_STATE_FLAG_CHECKED, &width, &height);
|
||||
x += width + 10;
|
||||
draw_radio (widget, cr, x, y, GTK_STATE_FLAG_NORMAL, &width, &height);
|
||||
x += width + 10;
|
||||
draw_radio (widget, cr, x, y, GTK_STATE_FLAG_CHECKED, &width, &height);
|
||||
x = 10;
|
||||
|
||||
y += height + 10;
|
||||
draw_progress (widget, cr, x, y, panewidth - 20, 50, &height);
|
||||
|
||||
y += height + 10;
|
||||
draw_scale (widget, cr, x, y, panewidth - 20, 75, &height);
|
||||
|
||||
y += height + 20;
|
||||
draw_notebook (widget, cr, x, y, panewidth - 20, 160);
|
||||
|
||||
/* Second column */
|
||||
x += panewidth;
|
||||
y = 10;
|
||||
draw_menu (widget, cr, x, y, panewidth - 20, &height);
|
||||
|
||||
y += height + 10;
|
||||
draw_menubar (widget, cr, x, y, panewidth - 20, &height);
|
||||
|
||||
y += height + 20;
|
||||
draw_spinbutton (widget, cr, x, y, panewidth - 20, &height);
|
||||
|
||||
y += height + 30;
|
||||
draw_combobox (widget, cr, x, y, panewidth - 20, FALSE, &height);
|
||||
|
||||
y += height + 10;
|
||||
draw_combobox (widget, cr, 10 + panewidth, y, panewidth - 20, TRUE, &height);
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
GtkWidget *
|
||||
do_foreigndrawing (GtkWidget *do_widget)
|
||||
{
|
||||
static GtkWidget *window = NULL;
|
||||
|
||||
if (!window)
|
||||
{
|
||||
GtkWidget *box;
|
||||
GtkWidget *da;
|
||||
|
||||
window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
|
||||
gtk_window_set_title (GTK_WINDOW (window), "Foreign drawing");
|
||||
gtk_window_set_screen (GTK_WINDOW (window),
|
||||
gtk_widget_get_screen (do_widget));
|
||||
g_signal_connect (window, "destroy",
|
||||
G_CALLBACK (gtk_widget_destroyed), &window);
|
||||
|
||||
box = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 10);
|
||||
gtk_container_add (GTK_CONTAINER (window), box);
|
||||
da = gtk_drawing_area_new ();
|
||||
gtk_widget_set_size_request (da, 400, 400);
|
||||
gtk_widget_set_hexpand (da, TRUE);
|
||||
gtk_widget_set_vexpand (da, TRUE);
|
||||
gtk_widget_set_app_paintable (da, TRUE);
|
||||
gtk_container_add (GTK_CONTAINER (box), da);
|
||||
|
||||
g_signal_connect (da, "draw", G_CALLBACK (draw_cb), NULL);
|
||||
}
|
||||
|
||||
if (!gtk_widget_get_visible (window))
|
||||
gtk_widget_show_all (window);
|
||||
else
|
||||
gtk_widget_destroy (window);
|
||||
|
||||
return window;
|
||||
}
|
@@ -1,7 +0,0 @@
|
||||
precision highp float;
|
||||
|
||||
void main() {
|
||||
float lerpVal = gl_FragCoord.y / 500.0f;
|
||||
|
||||
gl_FragColor = mix(vec4(1.0f, 0.85f, 0.35f, 1.0f), vec4(0.2f, 0.2f, 0.2f, 1.0f), lerpVal);
|
||||
}
|
@@ -1,7 +0,0 @@
|
||||
attribute vec4 position;
|
||||
|
||||
uniform mat4 mvp;
|
||||
|
||||
void main() {
|
||||
gl_Position = mvp * position;
|
||||
}
|
@@ -77,7 +77,7 @@ create_shader (int type,
|
||||
buffer = g_malloc (log_len + 1);
|
||||
glGetShaderInfoLog (shader, log_len, NULL, buffer);
|
||||
|
||||
g_warning ("Compile failure in %s shader:\n%s",
|
||||
g_warning ("Compile failure in %s shader:\n%s\n",
|
||||
type == GL_VERTEX_SHADER ? "vertex" : "fragment",
|
||||
buffer);
|
||||
|
||||
@@ -93,9 +93,7 @@ create_shader (int type,
|
||||
|
||||
/* Initialize the shaders and link them into a program */
|
||||
static void
|
||||
init_shaders (const char *vertex_path,
|
||||
const char *fragment_path,
|
||||
GLuint *program_out,
|
||||
init_shaders (GLuint *program_out,
|
||||
GLuint *mvp_out)
|
||||
{
|
||||
GLuint vertex, fragment;
|
||||
@@ -104,7 +102,7 @@ init_shaders (const char *vertex_path,
|
||||
int status;
|
||||
GBytes *source;
|
||||
|
||||
source = g_resources_lookup_data (vertex_path, 0, NULL);
|
||||
source = g_resources_lookup_data ("/glarea/glarea-vertex.glsl", 0, NULL);
|
||||
vertex = create_shader (GL_VERTEX_SHADER, g_bytes_get_data (source, NULL));
|
||||
g_bytes_unref (source);
|
||||
|
||||
@@ -114,7 +112,7 @@ init_shaders (const char *vertex_path,
|
||||
return;
|
||||
}
|
||||
|
||||
source = g_resources_lookup_data (fragment_path, 0, NULL);
|
||||
source = g_resources_lookup_data ("/glarea/glarea-fragment.glsl", 0, NULL);
|
||||
fragment = create_shader (GL_FRAGMENT_SHADER, g_bytes_get_data (source, NULL));
|
||||
g_bytes_unref (source);
|
||||
|
||||
@@ -142,7 +140,7 @@ init_shaders (const char *vertex_path,
|
||||
buffer = g_malloc (log_len + 1);
|
||||
glGetProgramInfoLog (program, log_len, NULL, buffer);
|
||||
|
||||
g_warning ("Linking failure:\n%s", buffer);
|
||||
g_warning ("Linking failure:\n%s\n", buffer);
|
||||
|
||||
g_free (buffer);
|
||||
|
||||
@@ -220,29 +218,13 @@ static GLuint mvp_location;
|
||||
static void
|
||||
realize (GtkWidget *widget)
|
||||
{
|
||||
const char *vertex_path, *fragment_path;
|
||||
GdkGLContext *context;
|
||||
|
||||
gtk_gl_area_make_current (GTK_GL_AREA (widget));
|
||||
|
||||
if (gtk_gl_area_get_error (GTK_GL_AREA (widget)) != NULL)
|
||||
return;
|
||||
|
||||
context = gtk_gl_area_get_context (GTK_GL_AREA (widget));
|
||||
|
||||
if (gdk_gl_context_get_use_es (context))
|
||||
{
|
||||
vertex_path = "/glarea/glarea-gles.vs.glsl";
|
||||
fragment_path = "/glarea/glarea-gles.fs.glsl";
|
||||
}
|
||||
else
|
||||
{
|
||||
vertex_path = "/glarea/glarea-gl.vs.glsl";
|
||||
fragment_path = "/glarea/glarea-gl.fs.glsl";
|
||||
}
|
||||
|
||||
init_buffers (&position_buffer, NULL);
|
||||
init_shaders (vertex_path, fragment_path, &program, &mvp_location);
|
||||
init_shaders (&program, &mvp_location);
|
||||
}
|
||||
|
||||
/* We should tear down the state when unrealizing */
|
||||
|
@@ -44,7 +44,7 @@ show_page (GtkTextBuffer *buffer,
|
||||
if (page == 1)
|
||||
{
|
||||
gtk_text_buffer_insert (buffer, &iter, "Some text to show that simple ", -1);
|
||||
insert_link (buffer, &iter, "hyper text", 3);
|
||||
insert_link (buffer, &iter, "hypertext", 3);
|
||||
gtk_text_buffer_insert (buffer, &iter, " can easily be realized with ", -1);
|
||||
insert_link (buffer, &iter, "tags", 2);
|
||||
gtk_text_buffer_insert (buffer, &iter, ".", -1);
|
||||
@@ -173,8 +173,9 @@ event_after (GtkWidget *text_view,
|
||||
GTK_TEXT_WINDOW_WIDGET,
|
||||
ex, ey, &x, &y);
|
||||
|
||||
if (gtk_text_view_get_iter_at_location (GTK_TEXT_VIEW (text_view), &iter, x, y))
|
||||
follow_if_link (text_view, &iter);
|
||||
gtk_text_view_get_iter_at_location (GTK_TEXT_VIEW (text_view), &iter, x, y);
|
||||
|
||||
follow_if_link (text_view, &iter);
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
@@ -196,19 +197,18 @@ set_cursor_if_appropriate (GtkTextView *text_view,
|
||||
GtkTextIter iter;
|
||||
gboolean hovering = FALSE;
|
||||
|
||||
if (gtk_text_view_get_iter_at_location (text_view, &iter, x, y))
|
||||
{
|
||||
tags = gtk_text_iter_get_tags (&iter);
|
||||
for (tagp = tags; tagp != NULL; tagp = tagp->next)
|
||||
{
|
||||
GtkTextTag *tag = tagp->data;
|
||||
gint page = GPOINTER_TO_INT (g_object_get_data (G_OBJECT (tag), "page"));
|
||||
gtk_text_view_get_iter_at_location (text_view, &iter, x, y);
|
||||
|
||||
if (page != 0)
|
||||
{
|
||||
hovering = TRUE;
|
||||
break;
|
||||
}
|
||||
tags = gtk_text_iter_get_tags (&iter);
|
||||
for (tagp = tags; tagp != NULL; tagp = tagp->next)
|
||||
{
|
||||
GtkTextTag *tag = tagp->data;
|
||||
gint page = GPOINTER_TO_INT (g_object_get_data (G_OBJECT (tag), "page"));
|
||||
|
||||
if (page != 0)
|
||||
{
|
||||
hovering = TRUE;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -272,8 +272,6 @@ do_hypertext (GtkWidget *do_widget)
|
||||
|
||||
view = gtk_text_view_new ();
|
||||
gtk_text_view_set_wrap_mode (GTK_TEXT_VIEW (view), GTK_WRAP_WORD);
|
||||
gtk_text_view_set_left_margin (GTK_TEXT_VIEW (view), 20);
|
||||
gtk_text_view_set_right_margin (GTK_TEXT_VIEW (view), 20);
|
||||
g_signal_connect (view, "key-press-event",
|
||||
G_CALLBACK (key_press_event), NULL);
|
||||
g_signal_connect (view, "event-after",
|
||||
|
@@ -470,31 +470,6 @@ fontify (GtkTextBuffer *source_buffer)
|
||||
gchar *start_ptr, *end_ptr;
|
||||
gchar *tag;
|
||||
|
||||
gtk_text_buffer_create_tag (source_buffer, "source",
|
||||
"font", "monospace",
|
||||
NULL);
|
||||
gtk_text_buffer_create_tag (source_buffer, "comment",
|
||||
"foreground", "DodgerBlue",
|
||||
NULL);
|
||||
gtk_text_buffer_create_tag (source_buffer, "type",
|
||||
"foreground", "ForestGreen",
|
||||
NULL);
|
||||
gtk_text_buffer_create_tag (source_buffer, "string",
|
||||
"foreground", "RosyBrown",
|
||||
"weight", PANGO_WEIGHT_BOLD,
|
||||
NULL);
|
||||
gtk_text_buffer_create_tag (source_buffer, "control",
|
||||
"foreground", "purple",
|
||||
NULL);
|
||||
gtk_text_buffer_create_tag (source_buffer, "preprocessor",
|
||||
"style", PANGO_STYLE_OBLIQUE,
|
||||
"foreground", "burlywood4",
|
||||
NULL);
|
||||
gtk_text_buffer_create_tag (source_buffer, "function",
|
||||
"weight", PANGO_WEIGHT_BOLD,
|
||||
"foreground", "DarkGoldenrod4",
|
||||
NULL);
|
||||
|
||||
gtk_text_buffer_get_bounds (source_buffer, &start_iter, &tmp_iter);
|
||||
gtk_text_buffer_apply_tag_by_name (source_buffer, "source", &start_iter, &tmp_iter);
|
||||
|
||||
@@ -581,13 +556,11 @@ add_data_tab (const gchar *demoname)
|
||||
widget = create_text (&textview, FALSE);
|
||||
buffer = gtk_text_buffer_new (NULL);
|
||||
gtk_text_buffer_set_text (buffer, g_bytes_get_data (bytes, NULL), g_bytes_get_size (bytes));
|
||||
if (g_str_has_suffix (resource_name, ".c"))
|
||||
fontify (buffer);
|
||||
gtk_text_view_set_buffer (GTK_TEXT_VIEW (textview), buffer);
|
||||
}
|
||||
else
|
||||
{
|
||||
g_warning ("Don't know how to display resource '%s'", resource_name);
|
||||
g_warning ("Don't know how to display resource '%s'\n", resource_name);
|
||||
widget = NULL;
|
||||
}
|
||||
|
||||
@@ -650,6 +623,30 @@ load_file (const gchar *demoname,
|
||||
NULL);
|
||||
|
||||
source_buffer = gtk_text_buffer_new (NULL);
|
||||
gtk_text_buffer_create_tag (source_buffer, "source",
|
||||
"font", "monospace",
|
||||
NULL);
|
||||
gtk_text_buffer_create_tag (source_buffer, "comment",
|
||||
"foreground", "DodgerBlue",
|
||||
NULL);
|
||||
gtk_text_buffer_create_tag (source_buffer, "type",
|
||||
"foreground", "ForestGreen",
|
||||
NULL);
|
||||
gtk_text_buffer_create_tag (source_buffer, "string",
|
||||
"foreground", "RosyBrown",
|
||||
"weight", PANGO_WEIGHT_BOLD,
|
||||
NULL);
|
||||
gtk_text_buffer_create_tag (source_buffer, "control",
|
||||
"foreground", "purple",
|
||||
NULL);
|
||||
gtk_text_buffer_create_tag (source_buffer, "preprocessor",
|
||||
"style", PANGO_STYLE_OBLIQUE,
|
||||
"foreground", "burlywood4",
|
||||
NULL);
|
||||
gtk_text_buffer_create_tag (source_buffer, "function",
|
||||
"weight", PANGO_WEIGHT_BOLD,
|
||||
"foreground", "DarkGoldenrod4",
|
||||
NULL);
|
||||
|
||||
resource_filename = g_strconcat ("/sources/", filename, NULL);
|
||||
bytes = g_resources_lookup_data (resource_filename, 0, &err);
|
||||
@@ -657,7 +654,7 @@ load_file (const gchar *demoname,
|
||||
|
||||
if (bytes == NULL)
|
||||
{
|
||||
g_warning ("Cannot open source for %s: %s", filename, err->message);
|
||||
g_warning ("Cannot open source for %s: %s\n", filename, err->message);
|
||||
g_error_free (err);
|
||||
return;
|
||||
}
|
||||
@@ -920,7 +917,7 @@ startup (GApplication *app)
|
||||
gchar *ids[] = { "appmenu", NULL };
|
||||
|
||||
builder = gtk_builder_new ();
|
||||
gtk_builder_add_objects_from_resource (builder, "/ui/appmenu.ui", ids, NULL);
|
||||
gtk_builder_add_objects_from_resource (builder, "/ui/main.ui", ids, NULL);
|
||||
|
||||
appmenu = (GMenuModel *)gtk_builder_get_object (builder, "appmenu");
|
||||
|
||||
|
@@ -1,6 +1,21 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<interface>
|
||||
<!-- interface-requires gtk+ 3.10 -->
|
||||
<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>
|
||||
<object class="GtkTreeStore" id="treestore">
|
||||
<columns>
|
||||
<!-- column-name NAME -->
|
||||
@@ -26,7 +41,7 @@
|
||||
<property name="visible">1</property>
|
||||
<property name="show-close-button">1</property>
|
||||
<child>
|
||||
<object class="GtkButton">
|
||||
<object class="GtkButton" id="run_button">
|
||||
<property name="visible">1</property>
|
||||
<property name="valign">center</property>
|
||||
<property name="can_focus">1</property>
|
||||
@@ -35,7 +50,7 @@
|
||||
<class name="text-button"/>
|
||||
</style>
|
||||
<child>
|
||||
<object class="GtkLabel">
|
||||
<object class="GtkLabel" id="run_label">
|
||||
<property name="visible">1</property>
|
||||
<property name="label" translatable="yes">Run</property>
|
||||
</object>
|
||||
@@ -45,13 +60,13 @@
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkBox">
|
||||
<object class="GtkBox" id="box1">
|
||||
<property name="visible">1</property>
|
||||
<child>
|
||||
<object class="GtkFrame">
|
||||
<property name="visible">1</property>
|
||||
<child>
|
||||
<object class="GtkScrolledWindow">
|
||||
<object class="GtkScrolledWindow" id="scrolledwindow">
|
||||
<property name="width_request">120</property>
|
||||
<property name="visible">1</property>
|
||||
<property name="can_focus">1</property>
|
||||
@@ -69,19 +84,15 @@
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkTreeViewColumn">
|
||||
<object class="GtkTreeViewColumn" id="treeviewcolumn1">
|
||||
<property name="title" translatable="yes">column</property>
|
||||
<child>
|
||||
<object class="GtkCellRendererText"/>
|
||||
<object class="GtkCellRendererText" id="cellrenderertext1"/>
|
||||
<attributes>
|
||||
<attribute name="style">4</attribute>
|
||||
<attribute name="text">1</attribute>
|
||||
</attributes>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkCellRendererText">
|
||||
<property name="text"> </property>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
@@ -98,7 +109,7 @@
|
||||
<property name="enable_popup">1</property>
|
||||
<property name="show_border">0</property>
|
||||
<child>
|
||||
<object class="GtkScrolledWindow">
|
||||
<object class="GtkScrolledWindow" id="scrolledwindow1">
|
||||
<property name="visible">1</property>
|
||||
<property name="can_focus">1</property>
|
||||
<child>
|
||||
@@ -122,7 +133,7 @@
|
||||
</packing>
|
||||
</child>
|
||||
<child type="tab">
|
||||
<object class="GtkLabel">
|
||||
<object class="GtkLabel" id="label1">
|
||||
<property name="visible">1</property>
|
||||
<property name="label" translatable="yes">_Info</property>
|
||||
<property name="use_underline">1</property>
|
||||
@@ -155,7 +166,7 @@
|
||||
</packing>
|
||||
</child>
|
||||
<child type="tab">
|
||||
<object class="GtkLabel">
|
||||
<object class="GtkLabel" id="label2">
|
||||
<property name="visible">1</property>
|
||||
<property name="label" translatable="yes">Source</property>
|
||||
</object>
|
||||
|
@@ -8,35 +8,6 @@
|
||||
|
||||
#include <gtk/gtk.h>
|
||||
|
||||
static GtkWidget *stack;
|
||||
static GtkWidget *view;
|
||||
static GtkWidget *view2;
|
||||
|
||||
static void
|
||||
source_toggled (GtkToggleButton *button)
|
||||
{
|
||||
if (gtk_toggle_button_get_active (button))
|
||||
gtk_stack_set_visible_child_name (GTK_STACK (stack), "source");
|
||||
else
|
||||
{
|
||||
GtkTextBuffer *buffer;
|
||||
GtkTextIter start, end;
|
||||
gchar *markup;
|
||||
|
||||
buffer = gtk_text_view_get_buffer (GTK_TEXT_VIEW (view2));
|
||||
gtk_text_buffer_get_bounds (buffer, &start, &end);
|
||||
markup = gtk_text_buffer_get_text (buffer, &start, &end, FALSE);
|
||||
|
||||
buffer = gtk_text_view_get_buffer (GTK_TEXT_VIEW (view));
|
||||
gtk_text_buffer_get_bounds (buffer, &start, &end);
|
||||
gtk_text_buffer_delete (buffer, &start, &end);
|
||||
gtk_text_buffer_insert_markup (buffer, &start, markup, -1);
|
||||
g_free (markup);
|
||||
|
||||
gtk_stack_set_visible_child_name (GTK_STACK (stack), "formatted");
|
||||
}
|
||||
}
|
||||
|
||||
GtkWidget *
|
||||
do_markup (GtkWidget *do_widget)
|
||||
{
|
||||
@@ -44,13 +15,12 @@ do_markup (GtkWidget *do_widget)
|
||||
|
||||
if (!window)
|
||||
{
|
||||
GtkWidget *view;
|
||||
GtkWidget *sw;
|
||||
GtkTextBuffer *buffer;
|
||||
GtkTextIter iter;
|
||||
GBytes *bytes;
|
||||
const gchar *markup;
|
||||
GtkWidget *header;
|
||||
GtkWidget *show_source;
|
||||
|
||||
window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
|
||||
gtk_window_set_screen (GTK_WINDOW (window),
|
||||
@@ -59,50 +29,19 @@ do_markup (GtkWidget *do_widget)
|
||||
g_signal_connect (window, "destroy",
|
||||
G_CALLBACK (gtk_widget_destroyed), &window);
|
||||
|
||||
stack = gtk_stack_new ();
|
||||
gtk_widget_show (stack);
|
||||
gtk_container_add (GTK_CONTAINER (window), stack);
|
||||
|
||||
show_source = gtk_check_button_new_with_label ("Source");
|
||||
gtk_widget_set_valign (show_source, GTK_ALIGN_CENTER);
|
||||
g_signal_connect (show_source, "toggled", G_CALLBACK (source_toggled), stack);
|
||||
|
||||
header = gtk_header_bar_new ();
|
||||
gtk_header_bar_set_show_close_button (GTK_HEADER_BAR (header), TRUE);
|
||||
gtk_header_bar_pack_start (GTK_HEADER_BAR (header), show_source);
|
||||
gtk_widget_show_all (header);
|
||||
gtk_window_set_titlebar (GTK_WINDOW (window), header);
|
||||
|
||||
gtk_window_set_title (GTK_WINDOW (window), "Markup");
|
||||
|
||||
view = gtk_text_view_new ();
|
||||
gtk_text_view_set_editable (GTK_TEXT_VIEW (view), FALSE);
|
||||
gtk_text_view_set_wrap_mode (GTK_TEXT_VIEW (view), GTK_WRAP_WORD);
|
||||
gtk_text_view_set_left_margin (GTK_TEXT_VIEW (view), 10);
|
||||
gtk_text_view_set_right_margin (GTK_TEXT_VIEW (view), 10);
|
||||
|
||||
sw = gtk_scrolled_window_new (NULL, NULL);
|
||||
gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (sw),
|
||||
GTK_POLICY_AUTOMATIC,
|
||||
GTK_POLICY_NEVER,
|
||||
GTK_POLICY_AUTOMATIC);
|
||||
gtk_container_add (GTK_CONTAINER (window), sw);
|
||||
gtk_container_add (GTK_CONTAINER (sw), view);
|
||||
gtk_widget_show_all (sw);
|
||||
|
||||
gtk_stack_add_named (GTK_STACK (stack), sw, "formatted");
|
||||
|
||||
view2 = gtk_text_view_new ();
|
||||
gtk_text_view_set_wrap_mode (GTK_TEXT_VIEW (view2), GTK_WRAP_WORD);
|
||||
gtk_text_view_set_left_margin (GTK_TEXT_VIEW (view2), 10);
|
||||
gtk_text_view_set_right_margin (GTK_TEXT_VIEW (view2), 10);
|
||||
|
||||
sw = gtk_scrolled_window_new (NULL, NULL);
|
||||
gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (sw),
|
||||
GTK_POLICY_AUTOMATIC,
|
||||
GTK_POLICY_AUTOMATIC);
|
||||
gtk_container_add (GTK_CONTAINER (sw), view2);
|
||||
gtk_widget_show_all (sw);
|
||||
|
||||
gtk_stack_add_named (GTK_STACK (stack), sw, "source");
|
||||
|
||||
bytes = g_resources_lookup_data ("/markup/markup.txt", 0, NULL);
|
||||
markup = (const gchar *)g_bytes_get_data (bytes, NULL);
|
||||
@@ -111,13 +50,9 @@ do_markup (GtkWidget *do_widget)
|
||||
gtk_text_buffer_get_start_iter (buffer, &iter);
|
||||
gtk_text_buffer_insert_markup (buffer, &iter, markup, -1);
|
||||
|
||||
buffer = gtk_text_view_get_buffer (GTK_TEXT_VIEW (view2));
|
||||
gtk_text_buffer_get_start_iter (buffer, &iter);
|
||||
gtk_text_buffer_insert (buffer, &iter, markup, -1);
|
||||
|
||||
g_bytes_unref (bytes);
|
||||
|
||||
gtk_widget_show (stack);
|
||||
gtk_widget_show_all (sw);
|
||||
}
|
||||
|
||||
if (!gtk_widget_get_visible (window))
|
||||
|
@@ -1,9 +1,9 @@
|
||||
|
||||
Text sizes: <span size="xx-small">tiny</span> <span size="x-small">very small</span> <span size="small">small</span> <span size="medium">normal</span> <span size="large">large</span> <span size="x-large">very large</span> <span size="xx-large">huge</span>
|
||||
|
||||
Text <span color="gray">c<span color="green">o</span>l<span color="tomato">o</span>rs</span> and <span background="pink">backgrounds</span>
|
||||
Text <span color="gray">c<span color="green">o</span>l<span color="tomato">o</span>rs</span>
|
||||
|
||||
Colorful <span underline="low" underline-color="blue"><span underline="double" underline-color="red">under</span>lines</span> and <span background="pink"><span underline="error">mo</span><span underline="error" underline-color="green">re</span></span>
|
||||
Colorful <span underline="low" underline-color="blue"><span underline="double" underline-color="red">under</span>lines</span>
|
||||
|
||||
Colorful <span strikethrough="true" strikethrough-color="magenta">strikethroughs</span>
|
||||
|
||||
|
@@ -66,7 +66,6 @@
|
||||
<object class="GtkModelButton">
|
||||
<property name="visible">1</property>
|
||||
<property name="action-name">win.color</property>
|
||||
<property name="action-target">'red'</property>
|
||||
<property name="text">Red</property>
|
||||
<property name="inverted">1</property>
|
||||
</object>
|
||||
@@ -75,7 +74,6 @@
|
||||
<object class="GtkModelButton">
|
||||
<property name="visible">1</property>
|
||||
<property name="action-name">win.color</property>
|
||||
<property name="action-target">'green'</property>
|
||||
<property name="text">Green</property>
|
||||
<property name="inverted">1</property>
|
||||
</object>
|
||||
@@ -84,7 +82,6 @@
|
||||
<object class="GtkModelButton">
|
||||
<property name="visible">1</property>
|
||||
<property name="action-name">win.color</property>
|
||||
<property name="action-target">'blue'</property>
|
||||
<property name="text">Blue</property>
|
||||
<property name="inverted">1</property>
|
||||
</object>
|
||||
|
Binary file not shown.
Before Width: | Height: | Size: 1.3 KiB After Width: | Height: | Size: 1.1 KiB |
@@ -328,7 +328,7 @@ gtk_rotated_bin_add (GtkContainer *container,
|
||||
bin->child = widget;
|
||||
}
|
||||
else
|
||||
g_warning ("GtkRotatedBin cannot have more than one child");
|
||||
g_warning ("GtkRotatedBin cannot have more than one child\n");
|
||||
}
|
||||
|
||||
static void
|
||||
|
@@ -267,7 +267,7 @@ gtk_mirror_bin_add (GtkContainer *container,
|
||||
bin->child = widget;
|
||||
}
|
||||
else
|
||||
g_warning ("GtkMirrorBin cannot have more than one child");
|
||||
g_warning ("GtkMirrorBin cannot have more than one child\n");
|
||||
}
|
||||
|
||||
static void
|
||||
@@ -345,7 +345,7 @@ gtk_mirror_bin_get_preferred_height (GtkWidget *widget,
|
||||
|
||||
gtk_mirror_bin_size_request (widget, &requisition);
|
||||
|
||||
*minimum = *natural = requisition.height;
|
||||
*minimum = *natural = requisition.width;
|
||||
}
|
||||
|
||||
static void
|
||||
|
@@ -12,15 +12,6 @@
|
||||
<key name='color' enum='org.gtk.Demo.Color'>
|
||||
<default>'red'</default>
|
||||
</key>
|
||||
<key name='window-size' type='(ii)'>
|
||||
<default>(-1, -1)</default>
|
||||
</key>
|
||||
<key name='maximized' type='b'>
|
||||
<default>false</default>
|
||||
</key>
|
||||
<key name='fullscreen' type='b'>
|
||||
<default>false</default>
|
||||
</key>
|
||||
</schema>
|
||||
|
||||
</schemalist>
|
||||
|
@@ -51,6 +51,9 @@ create_complex_popover (GtkWidget *parent,
|
||||
popover = create_popover (parent, content, GTK_POS_BOTTOM);
|
||||
g_object_unref (content);
|
||||
|
||||
gtk_widget_set_size_request (popover, 200, -1);
|
||||
gtk_widget_set_vexpand (popover, TRUE);
|
||||
|
||||
gtk_widget_set_margin_start (popover, 10);
|
||||
gtk_widget_set_margin_end (popover, 10);
|
||||
gtk_widget_set_margin_bottom (popover, 10);
|
||||
|
@@ -59,7 +59,6 @@
|
||||
<property name="visible">1</property>
|
||||
<property name="can_focus">1</property>
|
||||
<property name="shadow_type">in</property>
|
||||
<property name="max-content-height">100</property>
|
||||
<child>
|
||||
<object class="GtkTreeView" id="treeview1">
|
||||
<property name="visible">1</property>
|
||||
|
@@ -7,5 +7,60 @@
|
||||
*/
|
||||
|
||||
* {
|
||||
all: unset;
|
||||
color: inherit;
|
||||
font-size: inherit;
|
||||
background-color: initial;
|
||||
font-family: inherit;
|
||||
font-style: inherit;
|
||||
font-variant: inherit;
|
||||
font-weight: inherit;
|
||||
text-shadow: inherit;
|
||||
icon-shadow: inherit;
|
||||
box-shadow: initial;
|
||||
margin-top: initial;
|
||||
margin-left: initial;
|
||||
margin-bottom: initial;
|
||||
margin-right: initial;
|
||||
padding-top: initial;
|
||||
padding-left: initial;
|
||||
padding-bottom: initial;
|
||||
padding-right: initial;
|
||||
border-top-style: initial;
|
||||
border-top-width: initial;
|
||||
border-left-style: initial;
|
||||
border-left-width: initial;
|
||||
border-bottom-style: initial;
|
||||
border-bottom-width: initial;
|
||||
border-right-style: initial;
|
||||
border-right-width: initial;
|
||||
border-top-left-radius: initial;
|
||||
border-top-right-radius: initial;
|
||||
border-bottom-right-radius: initial;
|
||||
border-bottom-left-radius: initial;
|
||||
outline-style: initial;
|
||||
outline-width: initial;
|
||||
outline-offset: initial;
|
||||
background-clip: initial;
|
||||
background-origin: initial;
|
||||
background-size: initial;
|
||||
background-position: initial;
|
||||
border-top-color: initial;
|
||||
border-right-color: initial;
|
||||
border-bottom-color: initial;
|
||||
border-left-color: initial;
|
||||
outline-color: initial;
|
||||
background-repeat: initial;
|
||||
background-image: initial;
|
||||
border-image-source: initial;
|
||||
border-image-repeat: initial;
|
||||
border-image-slice: initial;
|
||||
border-image-width: initial;
|
||||
transition-property: initial;
|
||||
transition-duration: initial;
|
||||
transition-timing-function: initial;
|
||||
transition-delay: initial;
|
||||
engine: initial;
|
||||
gtk-key-bindings: initial;
|
||||
|
||||
-GtkNotebook-initial-gap: 0;
|
||||
}
|
||||
|
@@ -12,13 +12,10 @@ static guint timeout = 0;
|
||||
static void
|
||||
change_direction (GtkRevealer *revealer)
|
||||
{
|
||||
if (gtk_widget_get_mapped (GTK_WIDGET (revealer)))
|
||||
{
|
||||
gboolean revealed;
|
||||
gboolean revealed;
|
||||
|
||||
revealed = gtk_revealer_get_child_revealed (revealer);
|
||||
gtk_revealer_set_reveal_child (revealer, !revealed);
|
||||
}
|
||||
revealed = gtk_revealer_get_child_revealed (revealer);
|
||||
gtk_revealer_set_reveal_child (revealer, !revealed);
|
||||
}
|
||||
|
||||
static gboolean
|
||||
|
@@ -43,11 +43,8 @@ static gboolean
|
||||
finish_search (GtkButton *button)
|
||||
{
|
||||
show_find_button ();
|
||||
if (search_progress_id)
|
||||
{
|
||||
g_source_remove (search_progress_id);
|
||||
search_progress_id = 0;
|
||||
}
|
||||
g_source_remove (search_progress_id);
|
||||
search_progress_id = 0;
|
||||
return G_SOURCE_REMOVE;
|
||||
}
|
||||
|
||||
@@ -74,11 +71,7 @@ static void
|
||||
stop_search (GtkButton *button,
|
||||
gpointer data)
|
||||
{
|
||||
if (finish_search_id)
|
||||
{
|
||||
g_source_remove (finish_search_id);
|
||||
finish_search_id = 0;
|
||||
}
|
||||
g_source_remove (finish_search_id);
|
||||
finish_search (button);
|
||||
}
|
||||
|
||||
|
@@ -4,10 +4,10 @@
|
||||
<object class="GtkWindow" id="window1">
|
||||
<property name="title" translatable="yes">Stack</property>
|
||||
<child>
|
||||
<object class="GtkGrid">
|
||||
<object class="GtkGrid" id="grid1">
|
||||
<property name="visible">1</property>
|
||||
<child>
|
||||
<object class="GtkStackSwitcher">
|
||||
<object class="GtkStackSwitcher" id="switcher">
|
||||
<property name="visible">1</property>
|
||||
<property name="stack">stack</property>
|
||||
<property name="halign">center</property>
|
||||
@@ -23,7 +23,7 @@
|
||||
<property name="can_focus">1</property>
|
||||
<property name="transition-type">crossfade</property>
|
||||
<child>
|
||||
<object class="GtkImage">
|
||||
<object class="GtkImage" id="image1">
|
||||
<property name="visible">1</property>
|
||||
<property name="margin-top">20</property>
|
||||
<property name="margin-bottom">20</property>
|
||||
@@ -35,7 +35,7 @@
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkCheckButton">
|
||||
<object class="GtkCheckButton" id="checkbutton1">
|
||||
<property name="label" translatable="yes">Page 2</property>
|
||||
<property name="visible">1</property>
|
||||
<property name="can_focus">1</property>
|
||||
@@ -49,7 +49,7 @@
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkSpinner">
|
||||
<object class="GtkSpinner" id="spinner1">
|
||||
<property name="visible">1</property>
|
||||
<property name="halign">center</property>
|
||||
<property name="valign">center</property>
|
||||
|
@@ -1,10 +1,10 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<interface>
|
||||
<object class="GtkGrid" id="grid">
|
||||
<property name="row-spacing">10</property>
|
||||
<property name="row-spacing">6</property>
|
||||
<property name="orientation">vertical</property>
|
||||
<child>
|
||||
<object class="GtkToolbar">
|
||||
<object class="GtkToolbar" id="toolbar1">
|
||||
<property name="visible">1</property>
|
||||
<property name="hexpand">1</property>
|
||||
<property name="show-arrow">0</property>
|
||||
@@ -12,7 +12,7 @@
|
||||
<class name="primary-toolbar"/>
|
||||
</style>
|
||||
<child>
|
||||
<object class="GtkToggleToolButton">
|
||||
<object class="GtkToggleToolButton" id="toolbutton1">
|
||||
<property name="use_action_appearance">0</property>
|
||||
<property name="visible">1</property>
|
||||
<property name="use_action_appearance">0</property>
|
||||
@@ -26,7 +26,7 @@
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkToggleToolButton">
|
||||
<object class="GtkToggleToolButton" id="toolbutton2">
|
||||
<property name="use_action_appearance">0</property>
|
||||
<property name="visible">1</property>
|
||||
<property name="use_action_appearance">0</property>
|
||||
@@ -41,7 +41,7 @@
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkToggleToolButton">
|
||||
<object class="GtkToggleToolButton" id="toolbutton3">
|
||||
<property name="use_action_appearance">0</property>
|
||||
<property name="visible">1</property>
|
||||
<property name="sensitive">0</property>
|
||||
@@ -55,7 +55,7 @@
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkToggleToolButton">
|
||||
<object class="GtkToggleToolButton" id="toolbutton5">
|
||||
<property name="use_action_appearance">0</property>
|
||||
<property name="visible">1</property>
|
||||
<property name="label" translatable="yes">Raised</property>
|
||||
@@ -71,7 +71,7 @@
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkToggleToolButton">
|
||||
<object class="GtkToggleToolButton" id="toolbutton6">
|
||||
<property name="use_action_appearance">0</property>
|
||||
<property name="visible">1</property>
|
||||
<property name="label" translatable="yes">Raised Active</property>
|
||||
@@ -88,7 +88,7 @@
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkToggleToolButton">
|
||||
<object class="GtkToggleToolButton" id="toolbutton4">
|
||||
<property name="use_action_appearance">0</property>
|
||||
<property name="visible">1</property>
|
||||
<property name="sensitive">0</property>
|
||||
@@ -103,7 +103,7 @@
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkToolItem">
|
||||
<object class="GtkToolItem" id="toolitementry">
|
||||
<property name="use_action_appearance">0</property>
|
||||
<property name="visible">1</property>
|
||||
<child>
|
||||
@@ -118,7 +118,7 @@
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkToolItem">
|
||||
<object class="GtkToolItem" id="toolitemswitch">
|
||||
<property name="use_action_appearance">0</property>
|
||||
<property name="visible">1</property>
|
||||
<child>
|
||||
@@ -132,7 +132,7 @@
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkBox">
|
||||
<object class="GtkBox" id="box1">
|
||||
<property name="visible">1</property>
|
||||
<property name="valign">center</property>
|
||||
<property name="halign">center</property>
|
||||
@@ -140,7 +140,7 @@
|
||||
<class name="linked"/>
|
||||
</style>
|
||||
<child>
|
||||
<object class="GtkButton">
|
||||
<object class="GtkButton" id="button1">
|
||||
<property name="label" translatable="yes">Hi, I am a button</property>
|
||||
<property name="use_action_appearance">0</property>
|
||||
<property name="visible">1</property>
|
||||
@@ -150,8 +150,8 @@
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkButton">
|
||||
<property name="label" translatable="yes">And I'm another button</property>
|
||||
<object class="GtkButton" id="button2">
|
||||
<property name="label" translatable="yes">And I'm another button</property>
|
||||
<property name="use_action_appearance">0</property>
|
||||
<property name="visible">1</property>
|
||||
<property name="can_focus">1</property>
|
||||
@@ -163,7 +163,7 @@
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkButton">
|
||||
<object class="GtkButton" id="button3">
|
||||
<property name="label" translatable="yes">This is a button party!</property>
|
||||
<property name="use_action_appearance">0</property>
|
||||
<property name="visible">1</property>
|
||||
@@ -178,16 +178,15 @@
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkToolbar">
|
||||
<object class="GtkToolbar" id="itoolbar1">
|
||||
<property name="visible">1</property>
|
||||
<property name="hexpand">1</property>
|
||||
<property name="icon_size">1</property>
|
||||
<property name="toolbar-style">icons</property>
|
||||
<style>
|
||||
<class name="inline-toolbar"/>
|
||||
</style>
|
||||
<child>
|
||||
<object class="GtkToggleToolButton">
|
||||
<object class="GtkToggleToolButton" id="itoolbutton1">
|
||||
<property name="use_action_appearance">0</property>
|
||||
<property name="visible">1</property>
|
||||
<property name="use_action_appearance">0</property>
|
||||
@@ -200,7 +199,7 @@
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkToggleToolButton">
|
||||
<object class="GtkToggleToolButton" id="itoolbutton2">
|
||||
<property name="use_action_appearance">0</property>
|
||||
<property name="visible">1</property>
|
||||
<property name="use_action_appearance">0</property>
|
||||
@@ -213,7 +212,7 @@
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkToggleToolButton">
|
||||
<object class="GtkToggleToolButton" id="itoolbutton3">
|
||||
<property name="use_action_appearance">0</property>
|
||||
<property name="visible">1</property>
|
||||
<property name="use_action_appearance">0</property>
|
||||
@@ -227,7 +226,7 @@
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkToggleToolButton">
|
||||
<object class="GtkToggleToolButton" id="itoolbutton4">
|
||||
<property name="use_action_appearance">0</property>
|
||||
<property name="visible">1</property>
|
||||
<property name="use_action_appearance">0</property>
|
||||
@@ -241,7 +240,7 @@
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkToggleToolButton">
|
||||
<object class="GtkToggleToolButton" id="itoolbutton5">
|
||||
<property name="use_action_appearance">0</property>
|
||||
<property name="visible">1</property>
|
||||
<property name="sensitive">0</property>
|
||||
@@ -255,7 +254,7 @@
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkToggleToolButton">
|
||||
<object class="GtkToggleToolButton" id="itoolbutton6">
|
||||
<property name="use_action_appearance">0</property>
|
||||
<property name="visible">1</property>
|
||||
<property name="sensitive">0</property>
|
||||
@@ -271,40 +270,5 @@
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkBox">
|
||||
<property name="visible">1</property>
|
||||
<property name="spacing">10</property>
|
||||
<property name="orientation">horizontal</property>
|
||||
<child>
|
||||
<object class="GtkButton">
|
||||
<property name="visible">1</property>
|
||||
<property name="label">Plain</property>
|
||||
<property name="halign">end</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkButton">
|
||||
<property name="visible">1</property>
|
||||
<property name="label">Destructive</property>
|
||||
<style>
|
||||
<class name="destructive-action"/>
|
||||
</style>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkButton">
|
||||
<property name="visible">1</property>
|
||||
<property name="label">Suggested</property>
|
||||
<style>
|
||||
<class name="suggested-action"/>
|
||||
</style>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</interface>
|
||||
|
@@ -1,4 +1,4 @@
|
||||
/* Theming/Style Classes
|
||||
/* CSS Theming/Style Classes
|
||||
*
|
||||
* GTK+ uses CSS for theming. Style classes can be associated
|
||||
* with widgets to inform the theme about intended rendering.
|
||||
@@ -24,7 +24,6 @@ do_theming_style_classes (GtkWidget *do_widget)
|
||||
gtk_window_set_screen (GTK_WINDOW (window),
|
||||
gtk_widget_get_screen (do_widget));
|
||||
gtk_window_set_title (GTK_WINDOW (window), "Style Classes");
|
||||
gtk_window_set_resizable (GTK_WINDOW (window), FALSE);
|
||||
gtk_container_set_border_width (GTK_CONTAINER (window), 12);
|
||||
g_signal_connect (window, "destroy",
|
||||
G_CALLBACK (gtk_widget_destroyed), &window);
|
||||
|
@@ -31,7 +31,7 @@ resources.c: iconbrowser.gresource.xml $(shell $(GLIB_COMPILE_RESOURCES) --sourc
|
||||
--target=$@ --sourcedir=$(srcdir) --generate-source
|
||||
|
||||
EXTRA_DIST = \
|
||||
menus.ui \
|
||||
app-menu.ui \
|
||||
iconbrowser.gresource.xml \
|
||||
window.ui
|
||||
|
||||
|
@@ -1,7 +1,7 @@
|
||||
<?xml version="1.0"?>
|
||||
<interface>
|
||||
<!-- interface-requires gtk+ 3.0 -->
|
||||
<menu id="app-menu">
|
||||
<menu id="appmenu">
|
||||
<section>
|
||||
<item>
|
||||
<attribute name="label" translatable="yes">_Quit</attribute>
|
@@ -1,7 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<gresources>
|
||||
<gresource prefix="/org/gtk/iconbrowser/gtk">
|
||||
<gresource prefix="/org/gtk/iconbrowser">
|
||||
<file preprocess="xml-stripblanks">window.ui</file>
|
||||
<file preprocess="xml-stripblanks">menus.ui</file>
|
||||
<file preprocess="xml-stripblanks">app-menu.ui</file>
|
||||
</gresource>
|
||||
</gresources>
|
||||
|
@@ -36,6 +36,8 @@ static GActionEntry app_entries[] =
|
||||
static void
|
||||
icon_browser_app_startup (GApplication *app)
|
||||
{
|
||||
GtkBuilder *builder;
|
||||
GMenuModel *app_menu;
|
||||
const gchar *quit_accels[2] = { "<Ctrl>Q", NULL };
|
||||
|
||||
G_APPLICATION_CLASS (icon_browser_app_parent_class)->startup (app);
|
||||
@@ -46,6 +48,11 @@ icon_browser_app_startup (GApplication *app)
|
||||
gtk_application_set_accels_for_action (GTK_APPLICATION (app),
|
||||
"app.quit",
|
||||
quit_accels);
|
||||
|
||||
builder = gtk_builder_new_from_resource ("/org/gtk/iconbrowser/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
|
||||
|
@@ -840,7 +840,7 @@ icon_browser_window_class_init (IconBrowserWindowClass *class)
|
||||
g_type_ensure (ICON_STORE_TYPE);
|
||||
|
||||
gtk_widget_class_set_template_from_resource (GTK_WIDGET_CLASS (class),
|
||||
"/org/gtk/iconbrowser/gtk/window.ui");
|
||||
"/org/gtk/iconbrowser/window.ui");
|
||||
|
||||
gtk_widget_class_bind_template_child (GTK_WIDGET_CLASS (class), IconBrowserWindow, context_list);
|
||||
gtk_widget_class_bind_template_child (GTK_WIDGET_CLASS (class), IconBrowserWindow, filter_model);
|
||||
|
@@ -38,25 +38,6 @@ change_theme_state (GSimpleAction *action,
|
||||
g_simple_action_set_state (action, state);
|
||||
}
|
||||
|
||||
static GtkWidget *page_stack;
|
||||
|
||||
static void
|
||||
change_transition_state (GSimpleAction *action,
|
||||
GVariant *state,
|
||||
gpointer user_data)
|
||||
{
|
||||
GtkStackTransitionType transition;
|
||||
|
||||
if (g_variant_get_boolean (state))
|
||||
transition = GTK_STACK_TRANSITION_TYPE_SLIDE_LEFT_RIGHT;
|
||||
else
|
||||
transition = GTK_STACK_TRANSITION_TYPE_NONE;
|
||||
|
||||
gtk_stack_set_transition_type (GTK_STACK (page_stack), transition);
|
||||
|
||||
g_simple_action_set_state (action, state);
|
||||
}
|
||||
|
||||
static gboolean
|
||||
get_idle (gpointer data)
|
||||
{
|
||||
@@ -805,39 +786,10 @@ overshot (GtkScrolledWindow *sw, GtkPositionType pos, GtkWidget *widget)
|
||||
row = gtk_widget_get_parent (row);
|
||||
gtk_list_box_row_set_activatable (GTK_LIST_BOX_ROW (row), FALSE);
|
||||
g_object_set_data (G_OBJECT (widget), color, row);
|
||||
g_object_set_data (G_OBJECT (row), "color", (gpointer)color);
|
||||
}
|
||||
|
||||
static void
|
||||
rgba_changed (GtkColorChooser *chooser, GParamSpec *pspec, GtkListBox *box)
|
||||
{
|
||||
gtk_list_box_select_row (box, NULL);
|
||||
}
|
||||
|
||||
static void
|
||||
set_color (GtkListBox *box, GtkListBoxRow *row, GtkColorChooser *chooser)
|
||||
{
|
||||
const char *color;
|
||||
GdkRGBA rgba;
|
||||
|
||||
if (!row)
|
||||
return;
|
||||
|
||||
color = (const char *)g_object_get_data (G_OBJECT (row), "color");
|
||||
|
||||
if (!color)
|
||||
return;
|
||||
|
||||
if (gdk_rgba_parse (&rgba, color))
|
||||
{
|
||||
g_signal_handlers_block_by_func (chooser, rgba_changed, box);
|
||||
gtk_color_chooser_set_rgba (chooser, &rgba);
|
||||
g_signal_handlers_unblock_by_func (chooser, rgba_changed, box);
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
populate_colors (GtkWidget *widget, GtkWidget *chooser)
|
||||
populate_colors (GtkWidget *widget)
|
||||
{
|
||||
struct { const gchar *name; const gchar *color; const gchar *title; } colors[] = {
|
||||
{ "2.5", "#C8828C", "Red" },
|
||||
@@ -915,13 +867,10 @@ populate_colors (GtkWidget *widget, GtkWidget *chooser)
|
||||
gtk_list_box_insert (GTK_LIST_BOX (widget), row, -1);
|
||||
row = gtk_widget_get_parent (row);
|
||||
gtk_list_box_row_set_activatable (GTK_LIST_BOX_ROW (row), FALSE);
|
||||
g_object_set_data (G_OBJECT (row), "color", (gpointer)colors[i].color);
|
||||
if (colors[i].title)
|
||||
g_object_set_data (G_OBJECT (row), "title", (gpointer)colors[i].title);
|
||||
}
|
||||
|
||||
g_signal_connect (widget, "row-selected", G_CALLBACK (set_color), chooser);
|
||||
|
||||
gtk_list_box_invalidate_headers (GTK_LIST_BOX (widget));
|
||||
|
||||
sw = gtk_widget_get_ancestor (widget, GTK_TYPE_SCROLLED_WINDOW);
|
||||
@@ -1507,130 +1456,6 @@ g_test_permission_class_init (GTestPermissionClass *class)
|
||||
permission_class->release_finish = release_finish;
|
||||
}
|
||||
|
||||
static int icon_sizes[5];
|
||||
|
||||
static void
|
||||
register_icon_sizes (void)
|
||||
{
|
||||
static gboolean registered;
|
||||
|
||||
if (registered)
|
||||
return;
|
||||
|
||||
registered = TRUE;
|
||||
|
||||
G_GNUC_BEGIN_IGNORE_DEPRECATIONS
|
||||
icon_sizes[0] = gtk_icon_size_register ("a", 16, 16);
|
||||
icon_sizes[1] = gtk_icon_size_register ("b", 24, 24);
|
||||
icon_sizes[2] = gtk_icon_size_register ("c", 32, 32);
|
||||
icon_sizes[3] = gtk_icon_size_register ("d", 48, 48);
|
||||
icon_sizes[4] = gtk_icon_size_register ("e", 64, 64);
|
||||
G_GNUC_END_IGNORE_DEPRECATIONS
|
||||
}
|
||||
|
||||
static int
|
||||
find_icon_size (GtkIconSize size)
|
||||
{
|
||||
gint w, h, w2, h2;
|
||||
gint i;
|
||||
|
||||
G_GNUC_BEGIN_IGNORE_DEPRECATIONS
|
||||
gtk_icon_size_lookup (size, &w, &h);
|
||||
for (i = 0; i < G_N_ELEMENTS (icon_sizes); i++)
|
||||
{
|
||||
gtk_icon_size_lookup (icon_sizes[i], &w2, &h2);
|
||||
if (w == w2)
|
||||
return i;
|
||||
}
|
||||
G_GNUC_END_IGNORE_DEPRECATIONS
|
||||
|
||||
return 2;
|
||||
}
|
||||
|
||||
static void
|
||||
update_buttons (GtkWidget *iv, int pos)
|
||||
{
|
||||
GtkWidget *button;
|
||||
|
||||
button = GTK_WIDGET (g_object_get_data (G_OBJECT (iv), "increase_button"));
|
||||
gtk_widget_set_sensitive (button, pos + 1 < G_N_ELEMENTS (icon_sizes));
|
||||
button = GTK_WIDGET (g_object_get_data (G_OBJECT (iv), "decrease_button"));
|
||||
gtk_widget_set_sensitive (button, pos > 0);
|
||||
}
|
||||
|
||||
static void
|
||||
increase_icon_size (GtkWidget *iv)
|
||||
{
|
||||
GList *cells;
|
||||
GtkCellRendererPixbuf *cell;
|
||||
GtkIconSize size;
|
||||
int i;
|
||||
|
||||
cells = gtk_cell_layout_get_cells (GTK_CELL_LAYOUT (iv));
|
||||
cell = cells->data;
|
||||
g_list_free (cells);
|
||||
|
||||
g_object_get (cell, "stock-size", &size, NULL);
|
||||
|
||||
i = find_icon_size (size);
|
||||
i = CLAMP (i + 1, 0, G_N_ELEMENTS (icon_sizes) - 1);
|
||||
size = icon_sizes[i];
|
||||
|
||||
g_object_set (cell, "stock-size", size, NULL);
|
||||
|
||||
update_buttons (iv, i);
|
||||
|
||||
gtk_widget_queue_resize (iv);
|
||||
}
|
||||
|
||||
static void
|
||||
decrease_icon_size (GtkWidget *iv)
|
||||
{
|
||||
GList *cells;
|
||||
GtkCellRendererPixbuf *cell;
|
||||
GtkIconSize size;
|
||||
int i;
|
||||
|
||||
cells = gtk_cell_layout_get_cells (GTK_CELL_LAYOUT (iv));
|
||||
cell = cells->data;
|
||||
g_list_free (cells);
|
||||
|
||||
g_object_get (cell, "stock-size", &size, NULL);
|
||||
|
||||
i = find_icon_size (size);
|
||||
i = CLAMP (i - 1, 0, G_N_ELEMENTS (icon_sizes) - 1);
|
||||
size = icon_sizes[i];
|
||||
|
||||
g_object_set (cell, "stock-size", size, NULL);
|
||||
|
||||
update_buttons (iv, i);
|
||||
|
||||
gtk_widget_queue_resize (iv);
|
||||
}
|
||||
|
||||
static void
|
||||
reset_icon_size (GtkWidget *iv)
|
||||
{
|
||||
GList *cells;
|
||||
GtkCellRendererPixbuf *cell;
|
||||
|
||||
cells = gtk_cell_layout_get_cells (GTK_CELL_LAYOUT (iv));
|
||||
cell = cells->data;
|
||||
g_list_free (cells);
|
||||
|
||||
g_object_set (cell, "stock-size", icon_sizes[2], NULL);
|
||||
|
||||
update_buttons (iv, 2);
|
||||
|
||||
gtk_widget_queue_resize (iv);
|
||||
}
|
||||
|
||||
static gchar *
|
||||
scale_format_value (GtkScale *scale, gdouble value)
|
||||
{
|
||||
return g_strdup (" ");
|
||||
}
|
||||
|
||||
static void
|
||||
activate (GApplication *app)
|
||||
{
|
||||
@@ -1646,7 +1471,6 @@ activate (GApplication *app)
|
||||
GtkCssProvider *provider;
|
||||
static GActionEntry win_entries[] = {
|
||||
{ "dark", NULL, NULL, "false", change_theme_state },
|
||||
{ "transition", NULL, NULL, "false", change_transition_state },
|
||||
{ "search", activate_search, NULL, NULL, NULL },
|
||||
{ "delete", activate_delete, NULL, NULL, NULL },
|
||||
{ "busy", get_busy, NULL, NULL, NULL },
|
||||
@@ -1674,7 +1498,6 @@ activate (GApplication *app)
|
||||
GAction *action;
|
||||
|
||||
g_type_ensure (my_text_view_get_type ());
|
||||
register_icon_sizes ();
|
||||
|
||||
provider = gtk_css_provider_new ();
|
||||
gtk_css_provider_load_from_resource (provider, "/org/gtk/WidgetFactory/widget-factory.css");
|
||||
@@ -1693,10 +1516,6 @@ activate (GApplication *app)
|
||||
gtk_builder_add_callback_symbol (builder, "on_range_to_changed", (GCallback)on_range_to_changed);
|
||||
gtk_builder_add_callback_symbol (builder, "osd_frame_button_press", (GCallback)osd_frame_button_press);
|
||||
gtk_builder_add_callback_symbol (builder, "tab_close_cb", (GCallback)tab_close_cb);
|
||||
gtk_builder_add_callback_symbol (builder, "increase_icon_size", (GCallback)increase_icon_size);
|
||||
gtk_builder_add_callback_symbol (builder, "decrease_icon_size", (GCallback)decrease_icon_size);
|
||||
gtk_builder_add_callback_symbol (builder, "reset_icon_size", (GCallback)reset_icon_size);
|
||||
gtk_builder_add_callback_symbol (builder, "scale_format_value", (GCallback)scale_format_value);
|
||||
|
||||
gtk_builder_connect_signals (builder, NULL);
|
||||
|
||||
@@ -1784,8 +1603,6 @@ activate (GApplication *app)
|
||||
g_signal_connect (stack, "notify::visible-child-name", G_CALLBACK (page_changed_cb), NULL);
|
||||
page_changed_cb (stack, NULL, NULL);
|
||||
|
||||
page_stack = stack;
|
||||
|
||||
dialog = (GtkWidget *)gtk_builder_get_object (builder, "preference_dialog");
|
||||
g_signal_connect (dialog, "response", G_CALLBACK (close_dialog), NULL);
|
||||
widget = (GtkWidget *)gtk_builder_get_object (builder, "preference_dialog_button");
|
||||
@@ -1809,11 +1626,7 @@ activate (GApplication *app)
|
||||
gtk_tree_view_set_row_separator_func (GTK_TREE_VIEW (widget), row_separator_func, NULL, NULL);
|
||||
gtk_tree_view_expand_all (GTK_TREE_VIEW (widget));
|
||||
|
||||
widget = GTK_WIDGET (gtk_builder_get_object (builder, "munsell"));
|
||||
widget2 = GTK_WIDGET (gtk_builder_get_object (builder, "cchooser"));
|
||||
|
||||
populate_colors (widget, widget2);
|
||||
g_signal_connect (widget2, "notify::rgba", G_CALLBACK (rgba_changed), widget);
|
||||
populate_colors ((GtkWidget *)gtk_builder_get_object (builder, "munsell"));
|
||||
|
||||
widget = (GtkWidget *)gtk_builder_get_object (builder, "page_combo");
|
||||
gtk_combo_box_set_row_separator_func (GTK_COMBO_BOX (widget), page_combo_separator_func, NULL, NULL);
|
||||
@@ -1897,12 +1710,6 @@ activate (GApplication *app)
|
||||
gtk_lock_button_set_permission (GTK_LOCK_BUTTON (widget2), permission);
|
||||
g_object_unref (permission);
|
||||
|
||||
widget = (GtkWidget *)gtk_builder_get_object (builder, "iconview1");
|
||||
widget2 = (GtkWidget *)gtk_builder_get_object (builder, "increase_button");
|
||||
g_object_set_data (G_OBJECT (widget), "increase_button", widget2);
|
||||
widget2 = (GtkWidget *)gtk_builder_get_object (builder, "decrease_button");
|
||||
g_object_set_data (G_OBJECT (widget), "decrease_button", widget2);
|
||||
|
||||
gtk_widget_show_all (GTK_WIDGET (window));
|
||||
|
||||
g_object_unref (builder);
|
||||
|
@@ -1,6 +1,6 @@
|
||||
.circular-button {
|
||||
border-radius: 20px;
|
||||
-gtk-outline-radius: 20px;
|
||||
outline-radius: 20px;
|
||||
}
|
||||
|
||||
.small-button {
|
||||
|
@@ -11,10 +11,6 @@
|
||||
<attribute name="label" translatable="yes">Dark Theme</attribute>
|
||||
<attribute name="action">win.dark</attribute>
|
||||
</item>
|
||||
<item>
|
||||
<attribute name="label" translatable="yes">Slide Pages</attribute>
|
||||
<attribute name="action">win.transition</attribute>
|
||||
</item>
|
||||
</section>
|
||||
</menu>
|
||||
<menu id="dinner_menu">
|
||||
@@ -132,8 +128,6 @@
|
||||
<column type="gchararray"/>
|
||||
<!-- column-name Nick -->
|
||||
<column type="gchararray"/>
|
||||
<!-- column-name isRadio -->
|
||||
<column type="gboolean"/>
|
||||
</columns>
|
||||
<data>
|
||||
<row>
|
||||
@@ -141,28 +135,18 @@
|
||||
<col id="1">emblem-default-symbolic</col>
|
||||
<col id="2" translatable="yes">Andrea</col>
|
||||
<col id="3" translatable="yes">Cimi</col>
|
||||
<col id="4">False</col>
|
||||
</row>
|
||||
<row>
|
||||
<col id="0">False</col>
|
||||
<col id="1">emblem-important-symbolic</col>
|
||||
<col id="2" translatable="yes">Otto</col>
|
||||
<col id="3" translatable="yes">chaotic</col>
|
||||
<col id="4">False</col>
|
||||
</row>
|
||||
<row>
|
||||
<col id="0">True</col>
|
||||
<col id="1">weather-clear-night-symbolic</col>
|
||||
<col id="2" translatable="yes">Orville</col>
|
||||
<col id="3" translatable="yes">Redenbacher</col>
|
||||
<col id="4">False</col>
|
||||
</row>
|
||||
<row>
|
||||
<col id="0">True</col>
|
||||
<col id="1">face-monkey-symbolic</col>
|
||||
<col id="2" translatable="yes">Benjamin</col>
|
||||
<col id="3" translatable="yes">Company</col>
|
||||
<col id="4">True</col>
|
||||
</row>
|
||||
</data>
|
||||
</object>
|
||||
@@ -436,7 +420,6 @@ Suspendisse feugiat quam quis dolor accumsan cursus.</property>
|
||||
<child>
|
||||
<object class="GtkStack" id="toplevel_stack">
|
||||
<property name="visible">1</property>
|
||||
<property name="transition-duration">1000</property>
|
||||
<child>
|
||||
<object class="GtkBox" id="page1">
|
||||
<property name="visible">1</property>
|
||||
@@ -635,8 +618,6 @@ Suspendisse feugiat quam quis dolor accumsan cursus.</property>
|
||||
<property name="visible">1</property>
|
||||
<property name="can_focus">1</property>
|
||||
<property name="invisible_char">•</property>
|
||||
<property name="width-chars">2</property>
|
||||
<property name="max-width-chars">2</property>
|
||||
<property name="adjustment">adjustment2</property>
|
||||
</object>
|
||||
<packing>
|
||||
@@ -650,8 +631,6 @@ Suspendisse feugiat quam quis dolor accumsan cursus.</property>
|
||||
<property name="can_focus">1</property>
|
||||
<property name="invisible_char">•</property>
|
||||
<property name="sensitive">0</property>
|
||||
<property name="width-chars">2</property>
|
||||
<property name="max-width-chars">2</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="fill">0</property>
|
||||
@@ -1115,11 +1094,6 @@ Suspendisse feugiat quam quis dolor accumsan cursus.</property>
|
||||
<property name="max-value">5</property>
|
||||
<property name="value">2</property>
|
||||
<property name="mode">1</property>
|
||||
<offsets>
|
||||
<offset name="low" value="1"/>
|
||||
<offset name="high" value="4"/>
|
||||
<offset name="full" value="5"/>
|
||||
</offsets>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="position">11</property>
|
||||
@@ -1241,7 +1215,7 @@ Suspendisse feugiat quam quis dolor accumsan cursus.</property>
|
||||
<property name="adjustment">adjustment1</property>
|
||||
<property name="restrict_to_fill_level">0</property>
|
||||
<property name="fill_level">75</property>
|
||||
<property name="draw_value">1</property>
|
||||
<property name="draw_value">0</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
@@ -1254,8 +1228,7 @@ Suspendisse feugiat quam quis dolor accumsan cursus.</property>
|
||||
<property name="adjustment">adjustment1</property>
|
||||
<property name="restrict_to_fill_level">0</property>
|
||||
<property name="fill_level">75</property>
|
||||
<property name="draw_value">1</property>
|
||||
<signal name="format-value" handler="scale_format_value"/>
|
||||
<property name="draw_value">0</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="position">1</property>
|
||||
@@ -1386,7 +1359,6 @@ Suspendisse feugiat quam quis dolor accumsan cursus.</property>
|
||||
<property name="can_focus">1</property>
|
||||
<property name="vscrollbar_policy">always</property>
|
||||
<property name="shadow_type">in</property>
|
||||
<property name="max_content_width">100</property>
|
||||
<child>
|
||||
<object class="GtkTreeView" id="treeview1">
|
||||
<property name="visible">1</property>
|
||||
@@ -1404,7 +1376,6 @@ Suspendisse feugiat quam quis dolor accumsan cursus.</property>
|
||||
<object class="GtkCellRendererToggle" id="cellrenderertoggle1"/>
|
||||
<attributes>
|
||||
<attribute name="active">0</attribute>
|
||||
<attribute name="radio">4</attribute>
|
||||
</attributes>
|
||||
</child>
|
||||
</object>
|
||||
@@ -1467,8 +1438,6 @@ Suspendisse feugiat quam quis dolor accumsan cursus.</property>
|
||||
<property name="visible">1</property>
|
||||
<property name="can_focus">1</property>
|
||||
<property name="shadow_type">in</property>
|
||||
<property name="max_content_width">100</property>
|
||||
<property name="max_content_height">100</property>
|
||||
<child>
|
||||
<object class="GtkTextView" id="textview1">
|
||||
<property name="visible">1</property>
|
||||
@@ -2760,65 +2729,23 @@ microphone-sensitivity-medium-symbolic</property>
|
||||
<property name="can_focus">1</property>
|
||||
<property name="expanded">1</property>
|
||||
<child>
|
||||
<object class="GtkBox">
|
||||
<object class="GtkScrolledWindow" id="scrolledwindow3">
|
||||
<property name="visible">1</property>
|
||||
<property name="orientation">vertical</property>
|
||||
<property name="can_focus">1</property>
|
||||
<property name="shadow_type">in</property>
|
||||
<property name="margin-top">6</property>
|
||||
<property name="height_request">226</property>
|
||||
<child>
|
||||
<object class="GtkScrolledWindow" id="scrolledwindow3">
|
||||
<object class="GtkIconView" id="iconview1">
|
||||
<property name="visible">1</property>
|
||||
<property name="can_focus">1</property>
|
||||
<property name="shadow_type">in</property>
|
||||
<property name="margin-top">6</property>
|
||||
<property name="max-content-width">100</property>
|
||||
<property name="selection_mode">multiple</property>
|
||||
<property name="model">iconsmodel</property>
|
||||
<child>
|
||||
<object class="GtkIconView" id="iconview1">
|
||||
<property name="visible">1</property>
|
||||
<property name="can_focus">1</property>
|
||||
<property name="selection_mode">multiple</property>
|
||||
<property name="model">iconsmodel</property>
|
||||
<child>
|
||||
<object class="GtkCellRendererPixbuf" id="iconviewcell">
|
||||
<property name="stock-size">5</property>
|
||||
</object>
|
||||
<attributes>
|
||||
<attribute name="icon-name">0</attribute>
|
||||
</attributes>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkToolbar">
|
||||
<property name="visible">1</property>
|
||||
<property name="icon-size">1</property>
|
||||
<property name="toolbar-style">icons</property>
|
||||
<style>
|
||||
<class name="inline-toolbar"/>
|
||||
</style>
|
||||
<child>
|
||||
<object class="GtkToolButton" id="decrease_button">
|
||||
<property name="visible">1</property>
|
||||
<property name="icon-name">zoom-out-symbolic</property>
|
||||
<property name="label">Remove item</property>
|
||||
<signal name="clicked" handler="decrease_icon_size" object="iconview1" swapped="yes"/>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkToolButton" id="increase_button">
|
||||
<property name="visible">1</property>
|
||||
<property name="icon-name">zoom-in-symbolic</property>
|
||||
<property name="label">Add item</property>
|
||||
<signal name="clicked" handler="increase_icon_size" object="iconview1" swapped="yes"/>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkToolButton" id="reset_button">
|
||||
<property name="visible">1</property>
|
||||
<property name="icon-name">zoom-original-symbolic</property>
|
||||
<property name="label">Refresh</property>
|
||||
<signal name="clicked" handler="reset_icon_size" object="iconview1" swapped="yes"/>
|
||||
</object>
|
||||
<object class="GtkCellRendererPixbuf" id="iconviewcell"/>
|
||||
<attributes>
|
||||
<attribute name="icon-name">0</attribute>
|
||||
</attributes>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
@@ -3758,8 +3685,7 @@ microphone-sensitivity-medium-symbolic</property>
|
||||
</child>
|
||||
<style>
|
||||
<class name="image-button"/>
|
||||
<class name="circular"/>
|
||||
<class name="flat"/>
|
||||
<class name="sidebar-button"/>
|
||||
</style>
|
||||
</object>
|
||||
</child>
|
||||
@@ -3838,9 +3764,10 @@ microphone-sensitivity-medium-symbolic</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkColorChooserWidget" id="cchooser">
|
||||
<object class="GtkSpinner">
|
||||
<property name="visible">1</property>
|
||||
<property name="show-editor">1</property>
|
||||
<property name="active">1</property>
|
||||
<property name="expand">1</property>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
@@ -4130,10 +4057,8 @@ bad things might happen.</property>
|
||||
<property name="valign">start</property>
|
||||
<property name="visible">1</property>
|
||||
<property name="shadow-type">in</property>
|
||||
<property name="hscrollbar-policy">never</property>
|
||||
<property name="min-content-height">70</property>
|
||||
<property name="max-content-height">120</property>
|
||||
<property name="min-content-width">100</property>
|
||||
<property name="max-content-width">100</property>
|
||||
<child>
|
||||
<object class="GtkTextView" id="open_popover_textview">
|
||||
<property name="visible">1</property>
|
||||
|
@@ -26,27 +26,12 @@ IGNORE_HFILES= \
|
||||
gdkkeysyms.h \
|
||||
gdkinternals.h \
|
||||
gdkprivate.h \
|
||||
gdk-private.h \
|
||||
gdkapplaunchcontextprivate.h \
|
||||
gdkcursorprivate.h \
|
||||
gdkdevicemanagerprivate.h \
|
||||
gdkdeviceprivate.h \
|
||||
gdkdisplaymanagerprivate.h \
|
||||
gdkdisplayprivate.h \
|
||||
gdkdndprivate.h \
|
||||
gdkframeclockprivate.h \
|
||||
gdkglcontextprivate.h \
|
||||
gdkkeysprivate.h \
|
||||
gdkscreenprivate.h \
|
||||
gdkseatdefaultprivate.h \
|
||||
gdkseatprivate.h \
|
||||
gdkvisualprivate.h \
|
||||
gdk*private.h \
|
||||
keyname-table.h \
|
||||
wayland/xdg-shell-client-protocol.h \
|
||||
win32 \
|
||||
x11 \
|
||||
quartz \
|
||||
broadway \
|
||||
wayland
|
||||
quartz
|
||||
|
||||
# Extra files to add when scanning
|
||||
EXTRA_HFILES= \
|
||||
@@ -162,7 +147,6 @@ HTML_IMAGES = \
|
||||
images/grabbing_cursor.png \
|
||||
images/grab_cursor.png \
|
||||
images/hand_cursor.png \
|
||||
images/context_menu_cursor.png \
|
||||
images/help_cursor.png \
|
||||
images/move_cursor.png \
|
||||
images/ne_resize_cursor.png \
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user