Compare commits
39 Commits
2.18.2
...
resolution
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
923bf3c625 | ||
|
|
d36604ae41 | ||
|
|
48d73e164e | ||
|
|
b1277f32de | ||
|
|
ffd12347be | ||
|
|
fc2b45cb50 | ||
|
|
79c9a7ec5e | ||
|
|
b89a059967 | ||
|
|
fc72a20782 | ||
|
|
6748d421b6 | ||
|
|
87a46136b3 | ||
|
|
47c00c7ad4 | ||
|
|
ce4382e444 | ||
|
|
74f03f97b1 | ||
|
|
c0c10b993a | ||
|
|
127e8d8a1b | ||
|
|
9816a939b7 | ||
|
|
1b5b4812b9 | ||
|
|
b20c7555fe | ||
|
|
33ff8e3488 | ||
|
|
b2a5e870df | ||
|
|
42efae2d47 | ||
|
|
6919f989f7 | ||
|
|
82e9821dd8 | ||
|
|
1113402c7b | ||
|
|
2d2a6d2bf4 | ||
|
|
6fb824a0b3 | ||
|
|
26ae475590 | ||
|
|
3b35e523fd | ||
|
|
6c6f1b3dcd | ||
|
|
30c5e6fe7a | ||
|
|
fda93a2977 | ||
|
|
151e5c58a8 | ||
|
|
32baa433b7 | ||
|
|
b00d7d6585 | ||
|
|
954890278f | ||
|
|
c07c77a489 | ||
|
|
85641efa08 | ||
|
|
c43a02ba55 |
508
NEWS
508
NEWS
@@ -1,511 +1,3 @@
|
||||
Overview of Changes from GTK+ 2.18.1 to 2.18.2
|
||||
==============================================
|
||||
|
||||
* GTK+ now ignores SIGPIPE in gtk_init(). Previously
|
||||
this was done deep in the lpr printbackend.
|
||||
|
||||
* Fix compilation of the DirectFB backend.
|
||||
|
||||
* Bugs fixed:
|
||||
597386 Cannot click buttons more than once...
|
||||
588059 sometimes notification icons are not visible with csw
|
||||
|
||||
* Updated translations:
|
||||
Italian
|
||||
Japanese
|
||||
Serbian
|
||||
|
||||
|
||||
Overview of Changes from GTK+ 2.18.0 to 2.18.1
|
||||
==============================================
|
||||
|
||||
* Client-side Windows:
|
||||
- Fix a problem with the F-Spot screensaver
|
||||
- Request native events that are necessary for grab emulation
|
||||
- Fixes for input device and extended input event handling
|
||||
- Allow up to 255 buttons in extended input events
|
||||
|
||||
* OS X:
|
||||
- Improve handling of multi-monitor setups
|
||||
- Basic DND works
|
||||
- Other improvements
|
||||
|
||||
* Filechooser:
|
||||
- Support Tracker 0.7 in the search code
|
||||
|
||||
* Bugs fixed:
|
||||
596423 Landscape pages are the wrong way around
|
||||
588449 DnD doesn't work on GDK/Quartz
|
||||
596080 Mention "gtk-tooltip" in gtk_widget_set_tooltip_window
|
||||
596580 Blank rows in entry autocompletion
|
||||
588649 extended input events sent to widgets that didn't...
|
||||
596081 Update tracker support for version 0.7
|
||||
596345 clicking empty space in backgrounds...
|
||||
596494 New property "cursor" in 2.18's GdkWindow with wrong...
|
||||
596012 popup menu position is horribly off on gdk quartz...
|
||||
596250 Gdkcursor-quartz.c doesn't implement GDK_BLANK_CURSOR
|
||||
586207 Printing dialog with a CUPS printer connected...
|
||||
|
||||
* Translation updates:
|
||||
Assamese
|
||||
British English
|
||||
Czech
|
||||
Estonian
|
||||
French
|
||||
Galician
|
||||
German
|
||||
Hungarian
|
||||
Slovenian
|
||||
Spanish
|
||||
Swedish
|
||||
|
||||
|
||||
Overview of Changes from GTK+ 2.17.11 to 2.18.0
|
||||
===============================================
|
||||
|
||||
* Add GtkTreeModelFilter testsuite and fix multiple bugs
|
||||
|
||||
* Client-side windows:
|
||||
- Fix issues around recursion and gdk_window_process_updates
|
||||
- Fix issues with grabs and cursors
|
||||
- Handle window hierarchy and geometry changes in expose handlers
|
||||
- New function, gdk_window_flush, that may be needed in certain
|
||||
situations
|
||||
- Automatically flush windows when doing non-double-buffered exposes
|
||||
|
||||
* Quartz backend:
|
||||
- Fix various 'stuck UI' issues
|
||||
- Fix the size of the root window
|
||||
|
||||
* Bugs fixed:
|
||||
588455 run application broken when setting background color...
|
||||
346800 Rework sort/filter models to use indices to parents
|
||||
593678 select "Manage Custom Sizes" from print dialog hangs gedit
|
||||
594652 gtk printer dialog does not understand boolean printer options
|
||||
594668 Add new Xorg keysyms
|
||||
591583 Padre (a wxPerl+Gtk IDE) hangs when editing Perl code...
|
||||
594600 Windows only allows 64-character system-tray tooltips
|
||||
594679 Fix warning in testwindows.c
|
||||
594880 Drawing issues in ExoIconView
|
||||
593507 AbiWord's main drawing area not exposed properly
|
||||
594913 is_composited race ...
|
||||
594738 Windows often do not respond to events on dual-head
|
||||
503776 crash when trying to print to non-existent lpr printer
|
||||
595599 Don't focus unmapped radio buttons
|
||||
595790 Segfault in gtkiconfactory.c on NULL GError
|
||||
588649 extended input events sent to widgets that didn't...
|
||||
550939 GtkFileChooser listbox does not refresh selection
|
||||
|
||||
* New deprecation:
|
||||
gdk_event_get_graphics_exposes has been deprecated
|
||||
|
||||
* Updated translations:
|
||||
Afrikaans
|
||||
Assamese
|
||||
Bengali India
|
||||
Brazilian Portuguese
|
||||
British English
|
||||
Catalan
|
||||
Danish
|
||||
Dutch
|
||||
German
|
||||
Greek
|
||||
Gujarati
|
||||
Hindi
|
||||
Italian
|
||||
Japanese
|
||||
Lithuanian
|
||||
Maithili
|
||||
Malayalam
|
||||
Marathi
|
||||
Norwegian bokmål
|
||||
Oriya
|
||||
Polish
|
||||
Romanian
|
||||
Simplified Chinese
|
||||
Slovenian
|
||||
Traditional Chinese
|
||||
Ukrainian
|
||||
|
||||
|
||||
Overview of Changes from GTK+ 2.17.10 to 2.17.11
|
||||
================================================
|
||||
|
||||
* Client-side windows:
|
||||
- Add gdk_cairo_reset_clip that lets you get back the original
|
||||
drawable clip
|
||||
- Add gdk_window_restack to more conveniently restack child windows
|
||||
- Add gdk_window_is_destroyed as a replacement for GDK_WINDOW_DESTROYED
|
||||
- Deprecated GDK_WINDOW_OBJECT and GdkWindowObject
|
||||
|
||||
* GSEAL:
|
||||
- Add gtk_widget_set_receives_default and gtk_widget_get_receives_default
|
||||
accessors for GTK_RECEIVES_DEFAULT
|
||||
|
||||
* GtkTreeView:
|
||||
- Correctly propagate insensitive state to cell renderers
|
||||
|
||||
* GtkTextView:
|
||||
- Merge a number of scrolling-related fixes from Maemo
|
||||
|
||||
* Bugs fixed:
|
||||
564160 gtk_combo_box_entry_set_text_column too restrictive
|
||||
593868 gtk_im_multicontext_set_client_window recreate a new slave...
|
||||
593644 gdk_x11_screen_get_window_manager_name should not cache...
|
||||
594178 gdk-pixbuf-query-loaders segfault in write_loader_info
|
||||
567124 proposal to delay doing something related to immodule...
|
||||
588788 GTK+ compilation should work with automake1.10
|
||||
584638 Build of gtkupdateiconcache without NLS breaks
|
||||
593788 misprint in the returning value of gdk_selection_property_get
|
||||
593606 Missing include in gtk/gtkcellrendereraccel.c
|
||||
593877 Undefined symbols while compilation
|
||||
|
||||
* Translation updates:
|
||||
French
|
||||
Hebrew
|
||||
Hungarian
|
||||
Norwegian bokmål
|
||||
|
||||
|
||||
Overview of Changes from GTK+ 2.17.9 to 2.17.10
|
||||
===============================================
|
||||
|
||||
* Client-side windows:
|
||||
- Regression fixes continue
|
||||
- Multiple clipping issues have been fixed
|
||||
- gdk_window_beep() works again
|
||||
- gtk-demo now has a few offscreen window demos
|
||||
|
||||
* GSEAL:
|
||||
- Several more getters and setters have been added:
|
||||
gtk_widget_is_toplevel(), gtk_widget_is_drawable(), gtk_widget_set_window()
|
||||
|
||||
* Bugs fixed:
|
||||
592752 aisleriot card drag start makes card appear behind...
|
||||
592901 Crash in JPEG pixbuf loader instead of error
|
||||
592263 redraw problem in text view
|
||||
593011 Cannot move applet with middle click
|
||||
592624 BadAccess from gdk_window_x11_set_events
|
||||
592606 Activate the default button in a respose-request callback
|
||||
593249 emacs and acroread don't work properly
|
||||
592883 Spin cell rendererer problem with double click
|
||||
588199 GtkTreeView rendering glitch while using a default...
|
||||
543310 set_enable_tree_lines doesn't work when a cellrenderer...
|
||||
589636 csw broke DND from panel menus
|
||||
593595 broken clip handling in GtkLabel
|
||||
590921 NULL should not be a valid return value for gdk_window_new()
|
||||
590861 cups_printer_create_cairo_surface() sets a fallback resolution...
|
||||
544724 delete new line requires two keystrokes
|
||||
593001 Emit 'update-custom-widget' on page setup change
|
||||
593317 gtkwindow leaks startup ID
|
||||
593080 mem leak
|
||||
593481 GtkEntryCompletion action-activated signal is emitted...
|
||||
593135 gtk_entry_set_icon_from_pixbuf only works one time
|
||||
593012 configure doesn't handle --enable-{cups,papi} correctly
|
||||
592862 There is a misprint on the returning value of gdk_pixmap_lookup()
|
||||
586466 GtkPrintOperation printing fails if it is the only event source
|
||||
434318 printer detail acquisition needs events
|
||||
593712 configure fails to to check properly for cups...
|
||||
|
||||
* Translation updates:
|
||||
Asturian
|
||||
Basque
|
||||
Bengali India
|
||||
Czech
|
||||
Finnish
|
||||
Hindi
|
||||
Kannada
|
||||
Oriya
|
||||
Polish
|
||||
Serbian
|
||||
Tamil
|
||||
Telugu
|
||||
|
||||
|
||||
Overview of Changes from GTK+ 2.17.8 to 2.17.9
|
||||
==============================================
|
||||
|
||||
* Client-side windows:
|
||||
- Add a compatibility mode that falls back to always using native windows,
|
||||
triggered by the GDK_NATIVE_WINDOWS environment variable
|
||||
|
||||
* Bugs fixed:
|
||||
589367 gedit crashed with SIGSEGV in IA__g_list_last()
|
||||
478519 GtkTooltip segfaults on NULL gdk-display-current-tooltip.
|
||||
592461 preserve errno and use g_strerror
|
||||
592403 crash when close the second terminal...
|
||||
591549 Default printer in a network
|
||||
526149 GtkCellRendererAccel editing conflicts with mnemonics
|
||||
528283 Problems when using PageUp & PageDown to navigate Playlists pane
|
||||
|
||||
* Updated translations:
|
||||
Bengali
|
||||
Brazilian Portuguese
|
||||
Breton
|
||||
Bulgarian
|
||||
Catalan
|
||||
Estonian
|
||||
Galician
|
||||
Irish
|
||||
Korean
|
||||
Norwegian bokmål
|
||||
Portuguese
|
||||
Punjabi
|
||||
Spanish
|
||||
Swedish
|
||||
Thai
|
||||
|
||||
|
||||
Overview of Changes from GTK+ 2.17.7 to 2.17.8
|
||||
==============================================
|
||||
|
||||
* Client-side windows:
|
||||
- various fixes to expose handling
|
||||
- fix memory leaks
|
||||
|
||||
* Minor API additions:
|
||||
- New setter as part of the GSEAL effort: gtk_widget_set_allocation
|
||||
|
||||
* Bugs fixed:
|
||||
585211 Add accessor function for GtkWidget->allocation
|
||||
588437 gtk 2.17.3 causes dragging in firefox bookmarks sidebar t...
|
||||
589367 gedit crashed with SIGSEGV in IA__g_list_last()
|
||||
589877 Client side windows leak gdk regions
|
||||
590959 Set child_has_focus flag properly
|
||||
591432 There is incomplete information on the returning value of...
|
||||
591434 firefox-3.5 crashed with SIGSEGV in _gdk_window_process_u...
|
||||
591526 Accelerator keys with <super> modifier also triggered by ...
|
||||
591751 bad memory access with duplicated id
|
||||
591998 Support silent build rules with automake 1.11
|
||||
592003 Shift+click should always modify selection
|
||||
|
||||
* Updated translations:
|
||||
Brazilian
|
||||
Bulgarian
|
||||
Irish
|
||||
Swedish
|
||||
|
||||
|
||||
Overview of Changes from GTK+ 2.17.6 to 2.17.7
|
||||
==============================================
|
||||
|
||||
* Client-side windows: a number of regressions related to embedding
|
||||
have been fixed
|
||||
|
||||
* Printing: The file backend supports SVG output
|
||||
|
||||
* Minor API additions:
|
||||
- GtkIconView gained an icon-padding property that can be used to fine-tune
|
||||
how much space each column needs
|
||||
- GtkTreeViewColumn grew a sort-column-id property that can be used to set
|
||||
up sort columns in GtkBuilder files
|
||||
- GdkWindow gained a cursor property and associated getter
|
||||
- GtkFileChooser has a create-folders property to allow disabling the
|
||||
"New Folder" button
|
||||
- gtk_print_operation_get_n_pages_to_print: returns the number of pages
|
||||
that are being printed
|
||||
- New getters and setters as part of the GSEAL effort:
|
||||
gtk_widget_get_allocation, gtk_widget_get_visible, gtk_widget_set_visible
|
||||
|
||||
* Bugs fixed:
|
||||
589336 Add GtkTreeViewColumn:sort-column-id property
|
||||
534462 Disable interactive search in the file chooser's shortcuts pane
|
||||
161489 n the file chooser, let the left/right arrow keys switch focus...
|
||||
514260 Better filtering for "Recently Used" files
|
||||
509650 ATK_STATE_SHOWING state is not set properly on menu items
|
||||
586374 code does not follow documentation (-> carshes when using...
|
||||
590442 csw broke gvim x11 embedding
|
||||
498010 gtk_tree_view_set_cursor fails if model!=NULL
|
||||
555109 Synthesized crossing events should have proper coordinates
|
||||
570516 Can't disable folder creation
|
||||
573321 additional check in gtk_tree_model_filter_convert_child_i...
|
||||
576601 Double clicking prints to the wrong printer
|
||||
586100 ITEM_PADDING breaks vertical icon views
|
||||
588438 awn uses 100% cpu with gtk+ 2.17.3 (csw)
|
||||
589732 behavior change of gdk_window_get_type_hint
|
||||
589745 Apply message in GtkAssistant
|
||||
590084 print to FILE with multiple pages per sheet has bad results
|
||||
590086 configure.in is broken on non-X platforms
|
||||
590309 Default cover pages for CUPS printers incorrectly set
|
||||
590448 [win32] build fails because gdk-pixbuf manges a path
|
||||
590959 Set child_has_focus flag properly
|
||||
591288 compat problem with draw_drawable being NULL
|
||||
539377 Unnecessary warnings when GtkTreeView is not realized.
|
||||
546005 priv->tree is not created for unrealized (I think) treeview
|
||||
564695 Pressing enter key in print to file "Name" box does not p...
|
||||
591218 Remove some unused variables
|
||||
357655 "Print to SVG file" for GtkPrintOperation
|
||||
591462 gdk_window_set_cursor doesn't work on the root window
|
||||
|
||||
* Updated translations:
|
||||
Basque
|
||||
Brazilian Portuguese
|
||||
Breton
|
||||
Estonian
|
||||
Galician
|
||||
Hebrew
|
||||
Norwegian bokmål
|
||||
Spanish
|
||||
Swedish
|
||||
|
||||
|
||||
Overview of Changes from GTK+ 2.17.5 to 2.17.6
|
||||
==============================================
|
||||
|
||||
* Client-side windows:
|
||||
- Several optimizations, such as client-side tracking of
|
||||
viewable windows
|
||||
- Clipping for drawing pixbufs on windows has been fixed
|
||||
- Rendering to large subwindows has been fixed
|
||||
|
||||
* Changes that are relevant for translators:
|
||||
- Markup has been removed from several strings
|
||||
|
||||
* Bugs fixed:
|
||||
588398 Leak with testgtk::preview_(color|gray) and more
|
||||
588943 set correct selection before emitting cursor-changed...
|
||||
588076 Gnumeric fonts stopped working on upgrading gtk+ 2.17.2 -...
|
||||
574674 GtkMenuItem gets Selected and Focused states when SelectC...
|
||||
582674 Menu item and menu accessibles retain "showing" state aft...
|
||||
588553 [csw] gdk_draw_pixbuf doesnt draw outside expose events s...
|
||||
588897 Strange include x11/gdkx.h
|
||||
588958 Typo in startup-id window property
|
||||
589035 Context needed for a propoer translation
|
||||
589275 [csw] Trying to destroy NULL regions
|
||||
588964 Remove markup from translatable string in gtkfilechooserd...
|
||||
587337 Suggest to use Glade instead gtk-builder-convert script
|
||||
|
||||
* Updated translations:
|
||||
Estonian
|
||||
French
|
||||
Spanish
|
||||
Swedish
|
||||
Thai
|
||||
|
||||
|
||||
Overview of Changes from GTK+ 2.17.4 to 2.17.5
|
||||
==============================================
|
||||
|
||||
* Client-side windows:
|
||||
- Quite a few fixes have happened for the win32 and directfb backends
|
||||
|
||||
* GSEAL:
|
||||
- Accessors have been added for sealed members in GtkCellRenderer and
|
||||
GtkWidget
|
||||
|
||||
* Changes that are relevant for distributors:
|
||||
- The jpeg2000 pixbuf loader is now optional. Pass --with-libjasper
|
||||
to configure to build it
|
||||
|
||||
* Bugs fixed
|
||||
588373 Menus broken by client-side-windows
|
||||
588379 testgtk::panes does not change the cursor on mouse over
|
||||
588388 shape rendering is back
|
||||
588461 gtk_editable_get_chars() behaviour change in 2.17.4
|
||||
588666 Incorrect clamping of max_length
|
||||
588665 insert-text signal is not emitted
|
||||
588395 Crash when opening a GtkBuilder file
|
||||
524066 Mandatory jpeg2000?
|
||||
527583 GtkAssistant should set buttons as default widget
|
||||
588694 Missing % in C code
|
||||
588484 Iconview DnD fails when Destination is empty
|
||||
583522 Trivial error in GtkBuilder migration documentation
|
||||
150951 collapsed save dialog needs to indicate filesystem...
|
||||
|
||||
* Updated translations:
|
||||
Brazilian Portuguese
|
||||
Norwegian bokmål
|
||||
Spanish
|
||||
Traditional Chinese
|
||||
|
||||
|
||||
Overview of Changes from GTK+ 2.17.3 to 2.17.4
|
||||
==============================================
|
||||
|
||||
* GtkEntry now has model-view separation, with GtkEntryBuffer.
|
||||
One intended use case for this is to support 'secure memory'
|
||||
for password entries.
|
||||
|
||||
* The print dialog can now optionally include the page setup
|
||||
controls, avoiding the need for a separate page setup dialog
|
||||
in many applications.
|
||||
|
||||
* Coloring of visited links in GtkLabel can now be turned off, with
|
||||
the ::track-visited-links property.
|
||||
|
||||
* Support for clipmasks in gdk_draw_pixbuf now works, this will
|
||||
introduce visual changes in code that uses clipmasks when drawing
|
||||
pixbufs. However, since this never worked that is unlikely to happen.
|
||||
Old code using gdk_pixbuf_render_threshold_alpha masks when rendering
|
||||
pixbufs will now produce truncated results at the edges.
|
||||
|
||||
* A number of regressions from the client-side window merge have
|
||||
been fixed.
|
||||
|
||||
* The directfb GDK backend has been fixed to build with csw.
|
||||
|
||||
* Bugs fixed:
|
||||
569393 gtk calendar localization YM note is wrong
|
||||
587559 Popup closes immediately
|
||||
551409 Print dialog should include page size and orientation
|
||||
588115 gvim clipboard broken
|
||||
|
||||
* Updated translations:
|
||||
Dutch
|
||||
Estonian
|
||||
Spanish
|
||||
Ukrainian
|
||||
Vietnamese
|
||||
|
||||
|
||||
Overview of Changes from GTK+ 2.17.2 to 2.17.3
|
||||
==============================================
|
||||
|
||||
* GtkFileChooser:
|
||||
- Shows the size column by default now
|
||||
|
||||
* GtkStatusIcon:
|
||||
- Has a title property, which can be used by ATs when they
|
||||
read status icons
|
||||
|
||||
* GtkInfoBar:
|
||||
- The default theme now includes color definitions for infobars
|
||||
- The ::use-tooltip-style style property has been removed
|
||||
|
||||
* GtkMountOperation now supports interaction during unmount operations.
|
||||
|
||||
* The client-side windows branch has been merged; GDK now maintains
|
||||
its own window hierarchy client-side, and only uses X windows where
|
||||
unavoidable. Some of the benefits of this change are
|
||||
- Reduced flicker
|
||||
- The ability to do transformed and animated rendering of widgets
|
||||
- Easier embedding of GTK+ widgets e.g. into Clutter scene graphs
|
||||
This is a fundamental change to the way GDK works, so watch out for
|
||||
regressions.
|
||||
|
||||
* Bugs fixed:
|
||||
586315 Crash in GTK+ 2.14 when calling gtk.FileChooser.list_shor...
|
||||
461944 pressing the volume icon in full screen shuts down the sound
|
||||
490724 iconview item's height would be changed event with same m...
|
||||
564063 regression: Left margin in popup menus
|
||||
582025 Accelerators fail for submenus
|
||||
585626 Setting widget tooltip hammers X11 server on any TCP/IP X...
|
||||
585802 Add API to make GtkStatusIcon accessible with a name
|
||||
585858 right-click Add-to-Booksmarks is sometimes greyed out
|
||||
586330 GtkButton ignores user_underline when an image is set
|
||||
318807 Offscreen windows and window redirection
|
||||
587716 GtkInfoBar broken on resize
|
||||
587485 GMountOperation::show-processes support
|
||||
|
||||
* Updated translations
|
||||
Brazilian Portuguese
|
||||
Estonian
|
||||
Hebrew
|
||||
Spanish
|
||||
Swedish
|
||||
Vietnamese
|
||||
|
||||
|
||||
Overview of Changes from GTK+ 2.17.1 to 2.17.2
|
||||
==============================================
|
||||
|
||||
|
||||
21
README.in
21
README.in
@@ -34,21 +34,6 @@ Release notes for 2.18
|
||||
old custom_widget. Custom_widget does not get destroyed when the
|
||||
tooltip goes away.
|
||||
|
||||
* JPEG2000 support is no longer enabled by default. It must be
|
||||
explicitly turned on, by passing --with-libjasper to configure.
|
||||
|
||||
* GDK has been reworked to implement 'client-side windows'. This offers
|
||||
exciting new possibilities, such as transformed, offscreen rendering,
|
||||
but it breaks some long-standing assumptions that applications may
|
||||
have about GDK windows. Setting the environment variable
|
||||
GDK_NATIVE_WINDOWS makes GDK create a native X11 window for each
|
||||
GDK window, which might make problematic applications work better.
|
||||
|
||||
* GTK+ calls signal (SIGPIPE, SIG_IGN) during initialization, to ignore
|
||||
SIGPIPE signals, since these are almost never wanted in graphical
|
||||
applications. If you do need to handle SIGPIPE for some reason, reset
|
||||
the handler after gtk_init(), but notice that other libraries (e.g.
|
||||
libdbus or gvfs) might do similar things.
|
||||
|
||||
Release notes for 2.16
|
||||
======================
|
||||
@@ -442,4 +427,8 @@ report.
|
||||
Otherwise, enter a new bug report that describes the patch, and attach
|
||||
the patch to that bug report.
|
||||
|
||||
Patches should be in unified diff form. (The -up option to GNU diff.)
|
||||
Bug reports containing patches should include the PATCH keyword in their
|
||||
keyword fields. If the patch adds to or changes the GTK+ programming
|
||||
interface, the API keyword should also be included.
|
||||
|
||||
Patches should be in unified diff form. (The -u option to GNU diff.)
|
||||
|
||||
301
README.win32
301
README.win32
@@ -1,184 +1,117 @@
|
||||
The Win32 backend in GTK+ is not as stable or correct as the X11 one.
|
||||
|
||||
For prebuilt runtime and developer packages see
|
||||
http://ftp.gnome.org/pub/gnome/binaries/win32/
|
||||
|
||||
Building GTK+ on Win32
|
||||
======================
|
||||
|
||||
First you obviously need developer packages for the compile-time
|
||||
dependencies: Pango, atk, glib, gettext-runtime, libiconv, libpng,
|
||||
zlib, libtiff at least. See
|
||||
http://ftp.gnome.org/pub/gnome/binaries/win32/dependencies .
|
||||
|
||||
After installing the dependencies, there are two ways to build GTK+
|
||||
for win32.
|
||||
|
||||
1) GNU tools, ./configure && make install
|
||||
-----------------------------------------
|
||||
|
||||
This requires you have mingw and MSYS.
|
||||
|
||||
Use the configure script, and the resulting Makefiles (which use
|
||||
libtool and gcc to do the compilation). I use this myself, but it can
|
||||
be hard to setup correctly.
|
||||
|
||||
The full script I run to build GTK+ 2.16 unpacked from a source
|
||||
distribution is as below. This is from bulding GTK+ 2.16.5. I don't
|
||||
use any script like this to build the development branch, as I don't
|
||||
distribute any binaries from development branches.
|
||||
|
||||
# This is a shell script that calls functions and scripts from
|
||||
# tml@iki.fi's personal work envíronment. It is not expected to be
|
||||
# usable unmodified by others, and is included only for reference.
|
||||
|
||||
MOD=gtk+
|
||||
VER=2.16.5
|
||||
REV=1
|
||||
ARCH=win32
|
||||
|
||||
THIS=${MOD}_${VER}-${REV}_${ARCH}
|
||||
|
||||
RUNZIP=${MOD}_${VER}-${REV}_${ARCH}.zip
|
||||
DEVZIP=${MOD}-dev_${VER}-${REV}_${ARCH}.zip
|
||||
|
||||
HEX=`echo $THIS | md5sum | cut -d' ' -f1`
|
||||
TARGET=c:/devel/target/$HEX
|
||||
|
||||
usedev
|
||||
usemsvs6
|
||||
|
||||
(
|
||||
|
||||
set -x
|
||||
|
||||
DEPS=`latest --arch=${ARCH} glib atk cairo pango libpng zlib libtiff jpeg`
|
||||
PROXY_LIBINTL=`latest --arch=${ARCH} proxy-libintl`
|
||||
|
||||
PKG_CONFIG_PATH=
|
||||
for D in $DEPS; do
|
||||
PATH=/devel/dist/${ARCH}/$D/bin:$PATH
|
||||
[ -d /devel/dist/${ARCH}/$D/lib/pkgconfig ] && PKG_CONFIG_PATH=/devel/dist/${ARCH}/$D/lib/pkgconfig:$PKG_CONFIG_PATH
|
||||
done
|
||||
|
||||
LIBPNG=`latest --arch=${ARCH} libpng`
|
||||
ZLIB=`latest --arch=${ARCH} zlib`
|
||||
LIBTIFF=`latest --arch=${ARCH} libtiff`
|
||||
JPEG=`latest --arch=${ARCH} jpeg`
|
||||
|
||||
patch -p0 <<'EOF'
|
||||
EOF
|
||||
|
||||
lt_cv_deplibs_check_method='pass_all' \
|
||||
CC='gcc -mtune=pentium3 -mthreads' \
|
||||
CPPFLAGS="-I/devel/dist/${ARCH}/${LIBPNG}/include \
|
||||
-I/devel/dist/${ARCH}/${ZLIB}/include \
|
||||
-I/devel/dist/${ARCH}/${LIBTIFF}/include \
|
||||
-I/devel/dist/${ARCH}/${JPEG}/include \
|
||||
-I/devel/dist/${ARCH}/${PROXY_LIBINTL}/include" \
|
||||
LDFLAGS="-L/devel/dist/${ARCH}/${LIBPNG}/lib \
|
||||
-L/devel/dist/${ARCH}/${ZLIB}/lib \
|
||||
-L/devel/dist/${ARCH}/${LIBTIFF}/lib \
|
||||
-L/devel/dist/${ARCH}/${JPEG}/lib \
|
||||
-L/devel/dist/${ARCH}/${PROXY_LIBINTL}/lib -Wl,--exclude-libs=libintl.a \
|
||||
-Wl,--enable-auto-image-base" \
|
||||
LIBS=-lintl \
|
||||
CFLAGS=-O2 \
|
||||
./configure \
|
||||
--with-gdktarget=win32 \
|
||||
--disable-gdiplus \
|
||||
--with-included-immodules \
|
||||
--without-libjasper \
|
||||
--enable-debug=yes \
|
||||
--enable-explicit-deps=no \
|
||||
--disable-gtk-doc \
|
||||
--disable-static \
|
||||
--prefix=$TARGET &&
|
||||
|
||||
libtoolcacheize &&
|
||||
rm gtk/gtk.def &&
|
||||
(PATH="$PWD/gdk-pixbuf/.libs:/devel/target/$HEX/bin:$PATH" make -j3 install || (rm .libtool-cache* && PATH="/devel/target/$HEX/bin:$PATH" make -j3 install)) &&
|
||||
|
||||
PATH="/devel/target/$HEX/bin:$PATH" gdk-pixbuf-query-loaders >/devel/target/$HEX/etc/gtk-2.0/gdk-pixbuf.loaders &&
|
||||
|
||||
grep -v -E 'Automatically generated|Created by|LoaderDir =' <$TARGET/etc/gtk-2.0/gdk-pixbuf.loaders >$TARGET/etc/gtk-2.0/gdk-pixbuf.loaders.temp &&
|
||||
mv $TARGET/etc/gtk-2.0/gdk-pixbuf.loaders.temp $TARGET/etc/gtk-2.0/gdk-pixbuf.loaders &&
|
||||
grep -v -E 'Automatically generated|Created by|ModulesPath =' <$TARGET/etc/gtk-2.0/gtk.immodules >$TARGET/etc/gtk-2.0/gtk.immodules.temp &&
|
||||
mv $TARGET/etc/gtk-2.0/gtk.immodules.temp $TARGET/etc/gtk-2.0/gtk.immodules &&
|
||||
|
||||
./gtk-zip.sh &&
|
||||
|
||||
mv /tmp/${MOD}-${VER}.zip /tmp/$RUNZIP &&
|
||||
mv /tmp/${MOD}-dev-${VER}.zip /tmp/$DEVZIP
|
||||
|
||||
) 2>&1 | tee /devel/src/tml/packaging/$THIS.log
|
||||
|
||||
(cd /devel && zip /tmp/$DEVZIP src/tml/packaging/$THIS.{sh,log}) &&
|
||||
manifestify /tmp/$RUNZIP /tmp/$DEVZIP
|
||||
|
||||
You should not just copy the above blindly. There are some things in
|
||||
the script that are very specific to *my* build setup on *my* current
|
||||
machine. For instance the "latest" command, the "usedev" and
|
||||
"usemsvs6" shell functions, the /devel/dist folder. The above script
|
||||
is really just meant for reference, to give an idea. You really need
|
||||
to understand what things like PKG_CONFIG_PATH are and set them up
|
||||
properly after installing the dependencies before building GTK+.
|
||||
|
||||
As you see above, after running configure, one can just say "make
|
||||
install", like on Unix. A post-build fix is needed, running
|
||||
gdk-pixbuf-query-loaders once more to get a correct gdk-pixbuf.loaders
|
||||
file.
|
||||
|
||||
For a 64-bit build you need to remove the gtk/gtk.def file and let it
|
||||
be regenerated by the makefilery. This is because the 64-bit GTK dll
|
||||
has a slightly different list of exported function names. This is on
|
||||
purpose and not a bug. The API is the same at the source level, and
|
||||
the same #defines of some function names to actually have a _utf8
|
||||
suffix is used (just to keep the header simpler). But the
|
||||
corresponding non-suffixed function to maintain ABI stability are not
|
||||
needed in the 64-bit case (because there are no older EXEs around that
|
||||
would require such for ABI stability).
|
||||
|
||||
|
||||
2) Microsoft's tools
|
||||
--------------------
|
||||
|
||||
Use the Microsoft compiler, cl and Make, nmake. Say nmake -f
|
||||
makefile.msc in gdk and gtk. Be prepared to manually edit various
|
||||
makefile.msc files, and the makefile snippets in build/win32.
|
||||
|
||||
Alternative 1 also generates Microsoft import libraries (.lib), if you
|
||||
have lib.exe available. It might also work for cross-compilation from
|
||||
Unix.
|
||||
|
||||
I use method 1 myself. Hans Breuer has been taking care of the MSVC
|
||||
makefiles. At times, we disagree a bit about various issues, and for
|
||||
instance the makefile.msc files might not produce identically named
|
||||
DLLs and import libraries as the "autoconfiscated" makefiles and
|
||||
libtool do. If this bothers you, you will have to fix the makefiles.
|
||||
|
||||
Using GTK+ on Win32
|
||||
===================
|
||||
|
||||
To use GTK+ on Win32, you also need either one of the above mentioned
|
||||
compilers. Other compilers might work, but don't count on it. Look for
|
||||
prebuilt developer packages (DLLs, import libraries, headers) on the
|
||||
above website.
|
||||
|
||||
Multi-threaded use of GTK+ on Win32
|
||||
===================================
|
||||
|
||||
Multi-threaded GTK+ programs might work on Windows in special simple
|
||||
cases, but not in general. Sorry. If you have all GTK+ and GDK calls
|
||||
in the same thread, it might work. Otherwise, probably not at
|
||||
all. Possible ways to fix this are being investigated.
|
||||
|
||||
Wintab
|
||||
======
|
||||
|
||||
The tablet support uses the Wintab API. The Wintab development kit is
|
||||
no longer required. The wintab.h header file is bundled with GTK+
|
||||
sources. Unfortunately it seems that only Wacom tablets come with
|
||||
support for the Wintab API nowadays.
|
||||
|
||||
--Tor Lillqvist <tml@iki.fi>, <tml@novell.com>
|
||||
The Win32 backend in GTK+ is not as stable or correct as the X11 one.
|
||||
|
||||
For prebuilt runtime and developer packages see
|
||||
http://ftp.gnome.org/pub/gnome/binaries/win32/
|
||||
|
||||
Building GTK+ on Win32
|
||||
======================
|
||||
|
||||
First you obviously need developer packages for the compile-time
|
||||
dependencies: Pango, atk, glib, gettext-runtime, libiconv, libpng,
|
||||
zlib, libtiff at least. See
|
||||
http://ftp.gnome.org/pub/gnome/binaries/win32/dependencies .
|
||||
|
||||
After installing the dependencies, there are two ways to build GTK+
|
||||
for win32.
|
||||
|
||||
1) GNU tools, ./configure && make install
|
||||
-----------------------------------------
|
||||
|
||||
This requires you have mingw and MSYS.
|
||||
|
||||
Use the configure script, and the resulting Makefiles (which use
|
||||
libtool and gcc to do the compilation). I use this myself, but it can
|
||||
be hard to setup correctly.
|
||||
|
||||
The full script I run to build GTK+ 2.10 unpacked from a source
|
||||
distribution is as below. This is from bulding GTK+ 2.10.9, slightly
|
||||
edited to make it match this 2.11 development branch. Actually I don't
|
||||
use any script like this to build the development branch, as I don't
|
||||
distribute any binaries from development branches.
|
||||
|
||||
MOD=gtk+
|
||||
VER=2.10.9
|
||||
THIS=$MOD-$VER
|
||||
HEX=`echo $THIS | md5sum | cut -d' ' -f1`
|
||||
TARGET=c:/devel/target/$HEX
|
||||
DEPS="`/devel/src/tml/latest.sh glib atk cairo pango`"
|
||||
sed -e 's/need_relink=yes/need_relink=no # no way --tml/' <ltmain.sh >ltmain.temp && mv ltmain.temp ltmain.sh
|
||||
usedev
|
||||
usemsvs6
|
||||
MY_PKG_CONFIG_PATH=""
|
||||
for D in $DEPS; do
|
||||
PATH=/devel/dist/$D/bin:$PATH
|
||||
MY_PKG_CONFIG_PATH=/devel/dist/$D/lib/pkgconfig:$MY_PKG_CONFIG_PATH
|
||||
done
|
||||
PKG_CONFIG_PATH=$MY_PKG_CONFIG_PATH:$PKG_CONFIG_PATH CC='gcc -mtune=pentium3 -mthreads' CPPFLAGS='-I/opt/gnu/include -I/opt/gnuwin32/include -I/opt/misc/include' LDFLAGS='-L/opt/gnu/lib -L/opt/gnuwin32/lib -L/opt/misc/lib -Wl,--enable-auto-image-base' LIBS=-lintl CFLAGS=-O2 ./configure --with-gdktarget=win32 --enable-debug=yes --disable-gtk-doc --disable-static --prefix=$TARGET &&
|
||||
libtoolcacheize &&
|
||||
unset MY_PKG_CONFIG_PATH &&
|
||||
PATH=/devel/target/$HEX/bin:.libs:$PATH make install &&
|
||||
(cd $TARGET/bin; strip --strip-unneeded *.dll *.exe) &&
|
||||
(cd $TARGET/lib/gtk-2.0/2.10.0/loaders; strip --strip-unneeded *.dll) &&
|
||||
(cd $TARGET/lib/gtk-2.0/2.10.0/immodules; strip --strip-unneeded *.dll) &&
|
||||
(cd $TARGET/lib/gtk-2.0/2.10.0/engines; strip --strip-unneeded *.dll) &&
|
||||
PATH=$TARGET/bin:$PATH gdk-pixbuf-query-loaders >$TARGET/etc/gtk-2.0/gdk-pixbuf.loaders &&
|
||||
grep -v -E 'Automatically generated|Created by|LoaderDir =' <$TARGET/etc/gtk-2.0/gdk-pixbuf.loaders >$TARGET/etc/gtk-2.0/gdk-pixbuf.loaders.temp &&
|
||||
mv $TARGET/etc/gtk-2.0/gdk-pixbuf.loaders.temp $TARGET/etc/gtk-2.0/gdk-pixbuf.loaders &&
|
||||
grep -v -E 'Automatically generated|Created by|ModulesPath =' <$TARGET/etc/gtk-2.0/gtk.immodules >$TARGET/etc/gtk-2.0/gtk.immodules.temp &&
|
||||
mv $TARGET/etc/gtk-2.0/gtk.immodules.temp $TARGET/etc/gtk-2.0/gtk.immodules &&
|
||||
./gtk-zip.sh &&
|
||||
(cd /devel/src/tml && zip /tmp/$MOD-dev-$VER.zip make/$THIS.make) &&
|
||||
manifestify /tmp/$MOD*-$VER.zip
|
||||
|
||||
You should not just copy the above blindly. There are some things in
|
||||
the script that are very specific to *my* build setup on *my* current
|
||||
machine. For instance the "latest.sh" script, the "usedev" and
|
||||
"usemsvs6" shell functions, the /devel/dist folder. The above script
|
||||
is really just meant for reference, to give an idea. You really need
|
||||
to understand what things like PKG_CONFIG_PATH are and set them up
|
||||
properly after installing the dependencies before building GTK+.
|
||||
|
||||
As you see above, after running configure, one can just say "make
|
||||
install", like on Unix. A post-build fix is needed, running
|
||||
gdk-pixbuf-query-loaders once more to get a correct gdk-pixbuf.loaders
|
||||
file.
|
||||
|
||||
2) Microsoft's tools
|
||||
--------------------
|
||||
|
||||
Use the Microsoft compiler, cl and Make, nmake. Say nmake -f
|
||||
makefile.msc in gdk and gtk. Be prepared to manually edit various
|
||||
makefile.msc files, and the makefile snippets in build/win32.
|
||||
|
||||
Alternative 1 also generates Microsoft import libraries (.lib), if you
|
||||
have lib.exe available. It might also work for cross-compilation from
|
||||
Unix.
|
||||
|
||||
I use method 1 myself. Hans Breuer has been taking care of the MSVC
|
||||
makefiles. At times, we disagree a bit about various issues, and for
|
||||
instance the makefile.msc files might not produce identically named
|
||||
DLLs and import libraries as the "autoconfiscated" makefiles and
|
||||
libtool do. If this bothers you, you will have to fix the makefiles.
|
||||
|
||||
Using GTK+ on Win32
|
||||
===================
|
||||
|
||||
To use GTK+ on Win32, you also need either one of the above mentioned
|
||||
compilers. Other compilers might work, but don't count on it. Look for
|
||||
prebuilt developer packages (DLLs, import libraries, headers) on the
|
||||
above website.
|
||||
|
||||
Multi-threaded use of GTK+ on Win32
|
||||
===================================
|
||||
|
||||
Multi-threaded GTK+ programs might work on Windows in special simple
|
||||
cases, but not in general. Sorry. If you have all GTK+ and GDK calls
|
||||
in the same thread, it might work. Otherwise, probably not at
|
||||
all. Possible ways to fix this are being investigated.
|
||||
|
||||
Wintab
|
||||
======
|
||||
|
||||
The tablet support uses the Wintab API. The Wintab development kit is
|
||||
no longer required. The wintab.h header file is bundled with GTK+
|
||||
sources. Unfortunately it seems that only Wacom tablets come with
|
||||
support for the Wintab API nowadays.
|
||||
|
||||
--Tor Lillqvist <tml@iki.fi>, <tml@novell.com>
|
||||
|
||||
17
autogen.sh
17
autogen.sh
@@ -14,10 +14,7 @@ DIE=0
|
||||
|
||||
have_libtool=false
|
||||
if libtoolize --version < /dev/null > /dev/null 2>&1 ; then
|
||||
libtool_version=`libtoolize --version |
|
||||
head -1 |
|
||||
sed -e 's/^\(.*\)([^)]*)\(.*\)$/\1\2/g' \
|
||||
-e 's/^[^0-9]*\([0-9.][0-9.]*\).*/\1/'`
|
||||
libtool_version=`libtoolize --version | sed 's/^[^0-9]*\([0-9.][0-9.]*\).*/\1/'`
|
||||
case $libtool_version in
|
||||
1.4*|1.5*|2.2*)
|
||||
have_libtool=true
|
||||
@@ -48,24 +45,16 @@ fi
|
||||
DIE=1
|
||||
}
|
||||
|
||||
if automake-1.11 --version < /dev/null > /dev/null 2>&1 ; then
|
||||
AUTOMAKE=automake-1.11
|
||||
ACLOCAL=aclocal-1.11
|
||||
else if automake-1.10 --version < /dev/null > /dev/null 2>&1 ; then
|
||||
AUTOMAKE=automake-1.10
|
||||
ACLOCAL=aclocal-1.10
|
||||
else if automake-1.7 --version < /dev/null > /dev/null 2>&1 ; then
|
||||
if automake-1.7 --version < /dev/null > /dev/null 2>&1 ; then
|
||||
AUTOMAKE=automake-1.7
|
||||
ACLOCAL=aclocal-1.7
|
||||
else
|
||||
echo
|
||||
echo "You must have automake 1.7.x, 1,10.x or 1.11.x installed to compile $PROJECT."
|
||||
echo "You must have automake 1.7.x installed to compile $PROJECT."
|
||||
echo "Install the appropriate package for your distribution,"
|
||||
echo "or get the source tarball at http://ftp.gnu.org/gnu/automake/"
|
||||
DIE=1
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
if test "$DIE" -eq 1; then
|
||||
exit 1
|
||||
|
||||
@@ -269,11 +269,7 @@
|
||||
/* #undef USE_MEDIALIB25 */
|
||||
|
||||
/* Define to 1 if XXM is available and should be used */
|
||||
#ifndef _MSC_VER
|
||||
# define USE_MMX 1
|
||||
#else
|
||||
# undef USE_MMX
|
||||
#endif
|
||||
#define USE_MMX 1
|
||||
|
||||
/* Define to 1 if no XInput should be used */
|
||||
/* #undef XINPUT_NONE */
|
||||
|
||||
101
configure.in
101
configure.in
@@ -11,9 +11,9 @@ AC_PREREQ(2.54)
|
||||
# set GTK_BINARY_AGE and GTK_INTERFACE_AGE to 0.
|
||||
|
||||
m4_define([gtk_major_version], [2])
|
||||
m4_define([gtk_minor_version], [18])
|
||||
m4_define([gtk_micro_version], [2])
|
||||
m4_define([gtk_interface_age], [2])
|
||||
m4_define([gtk_minor_version], [17])
|
||||
m4_define([gtk_micro_version], [3])
|
||||
m4_define([gtk_interface_age], [0])
|
||||
m4_define([gtk_binary_age],
|
||||
[m4_eval(100 * gtk_minor_version + gtk_micro_version)])
|
||||
m4_define([gtk_version],
|
||||
@@ -31,7 +31,7 @@ m4_define([gtk_api_version], [2.0])
|
||||
m4_define([gtk_binary_version], [2.10.0])
|
||||
|
||||
# required versions of other packages
|
||||
m4_define([glib_required_version], [2.21.3])
|
||||
m4_define([glib_required_version], [2.19.7])
|
||||
m4_define([pango_required_version], [1.20])
|
||||
m4_define([atk_required_version], [1.13.0])
|
||||
m4_define([cairo_required_version], [1.6])
|
||||
@@ -49,11 +49,6 @@ cflags_set=${CFLAGS+set}
|
||||
AM_INIT_AUTOMAKE(no-define)
|
||||
AM_CONFIG_HEADER(config.h)
|
||||
|
||||
# Support silent build rules, requires at least automake-1.11. Enable
|
||||
# by either passing --enable-silent-rules to configure or passing V=0
|
||||
# to make
|
||||
m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([no])])
|
||||
|
||||
#
|
||||
# For each of the libraries we build, we define the following
|
||||
|
||||
@@ -307,7 +302,6 @@ AM_SANITY_CHECK
|
||||
# Checks for programs.
|
||||
AC_ISC_POSIX
|
||||
AM_PROG_CC_STDC
|
||||
AM_PROG_CC_C_O
|
||||
AC_PROG_INSTALL
|
||||
AC_PROG_MAKE_SET
|
||||
|
||||
@@ -831,13 +825,12 @@ AC_ARG_WITH(libtiff,
|
||||
[AC_HELP_STRING([--without-libtiff],
|
||||
[disable TIFF loader for gdk-pixbuf])])
|
||||
AC_ARG_WITH(libjasper,
|
||||
[AC_HELP_STRING([--with-libjasper],
|
||||
[enable JPEG2000 loader for gdk-pixbuf])])
|
||||
[AC_HELP_STRING([--without-libjasper],
|
||||
[disable JPEG2000 loader for gdk-pixbuf])])
|
||||
|
||||
AC_ARG_ENABLE(gdiplus,
|
||||
[AC_HELP_STRING([--enable-gdiplus],
|
||||
[enble GDI+ loaders for gdk-pixbuf (currently known to be broken)])],,
|
||||
[enable_gdiplus=no])
|
||||
[AC_HELP_STRING([--disable-gdiplus],
|
||||
[disable GDI+ loaders for gdk-pixbuf])])
|
||||
|
||||
AM_CONDITIONAL(BUILD_GDIPLUS_LOADERS, [ test x$os_win32 = xyes && test x$enable_gdiplus != xno ])
|
||||
|
||||
@@ -947,11 +940,11 @@ dnl Test for libpng
|
||||
fi
|
||||
|
||||
dnl Test for libjasper
|
||||
if test x$with_libjasper = xyes && test -z "$LIBJASPER"; then
|
||||
if test x$with_libjasper != xno && test -z "$LIBJASPER"; then
|
||||
AC_CHECK_LIB(jasper, jas_init, LIBJASPER=-ljasper, [], -ljpeg)
|
||||
fi
|
||||
|
||||
if test x$with_libjasper = xyes && test -z "$LIBJASPER"; then
|
||||
if test x$with_libjasper != xno && test -z "$LIBJASPER"; then
|
||||
AC_MSG_ERROR([
|
||||
*** Checks for JPEG2000 loader failed. You can build without it by passing
|
||||
*** --without-libjasper to configure])
|
||||
@@ -1324,6 +1317,7 @@ GDK_PIXBUF_XLIB_PACKAGES=
|
||||
GDK_PIXBUF_XLIB_EXTRA_CFLAGS=
|
||||
GDK_PIXBUF_XLIB_EXTRA_LIBS=
|
||||
|
||||
X_PACKAGES=fontconfig
|
||||
GDK_EXTRA_LIBS="$GDK_WLIBS"
|
||||
GDK_EXTRA_CFLAGS=
|
||||
|
||||
@@ -1332,8 +1326,6 @@ GTK_DEP_PACKAGES_FOR_X=
|
||||
GTK_DEP_LIBS_FOR_X=
|
||||
|
||||
if test "x$gdktarget" = "xx11"; then
|
||||
X_PACKAGES=fontconfig
|
||||
|
||||
#
|
||||
# We use fontconfig very peripherally when decoding the default
|
||||
# settings.
|
||||
@@ -1634,8 +1626,6 @@ if test "x$gdktarget" = "xx11"; then
|
||||
|
||||
AM_CONDITIONAL(USE_X11, true)
|
||||
else
|
||||
XPACKAGES=
|
||||
|
||||
AM_CONDITIONAL(XINPUT_XFREE, false)
|
||||
AM_CONDITIONAL(USE_X11, false)
|
||||
AM_CONDITIONAL(HAVE_X11R6, false)
|
||||
@@ -1842,19 +1832,10 @@ AC_ARG_ENABLE(cups,
|
||||
[disable cups print backend])],,
|
||||
[enable_cups=auto])
|
||||
|
||||
if test "x$enable_cups" = "xno"; then
|
||||
AM_CONDITIONAL(HAVE_CUPS, false)
|
||||
else
|
||||
if test "x$enable_cups" = "xauto"
|
||||
then
|
||||
AC_PATH_PROG(CUPS_CONFIG, cups-config, no)
|
||||
if test "x$CUPS_CONFIG" = "xno"; then
|
||||
if test "x$enable_cups" = "xauto"; then
|
||||
AM_CONDITIONAL(HAVE_CUPS, false)
|
||||
else
|
||||
AC_MSG_ERROR([
|
||||
*** cups not found.
|
||||
])
|
||||
fi
|
||||
else
|
||||
if test "x$CUPS_CONFIG" != "xno"; then
|
||||
CUPS_CFLAGS=`$CUPS_CONFIG --cflags | sed 's/-O[0-9]*//' | sed 's/-m[^\t]*//g'`
|
||||
CUPS_LIBS=`$CUPS_CONFIG --libs`
|
||||
|
||||
@@ -1874,24 +1855,26 @@ else
|
||||
AC_SUBST(CUPS_LIBS)
|
||||
|
||||
AC_CHECK_HEADER(cups/cups.h,,AC_MSG_ERROR([[*** Sorry, cups-config present but cups/cups.h missing.]]))
|
||||
|
||||
AM_CONDITIONAL(HAVE_CUPS, true)
|
||||
|
||||
gtk_save_cflags="$CFLAGS"
|
||||
CFLAGS="$CUPS_CFLAGS"
|
||||
AC_TRY_COMPILE([#include <cups/http.h>],
|
||||
[http_t http; char *s = http.authstring;],
|
||||
[AC_DEFINE(HAVE_HTTP_AUTHSTRING, [],
|
||||
[Define if cups http_t authstring field is accessible])],)
|
||||
CFLAGS="$gtk_save_cflags"
|
||||
|
||||
AC_SUBST(HAVE_HTTP_AUTHSTRING)
|
||||
|
||||
gtk_save_libs="$LIBS"
|
||||
LIBS="$CUPS_LIBS"
|
||||
AC_CHECK_FUNCS(httpGetAuthString)
|
||||
LIBS="$gtk_save_libs"
|
||||
fi
|
||||
AM_CONDITIONAL(HAVE_CUPS, test "x$CUPS_CONFIG" != "xno")
|
||||
|
||||
gtk_save_cflags="$CFLAGS"
|
||||
CFLAGS="$CUPS_CFLAGS"
|
||||
AC_TRY_COMPILE([#include <cups/http.h>],
|
||||
[http_t http; char *s = http.authstring;],
|
||||
[AC_DEFINE(HAVE_HTTP_AUTHSTRING, [],
|
||||
[Define if cups http_t authstring field is accessible])],)
|
||||
CFLAGS="$gtk_save_cflags"
|
||||
|
||||
AC_SUBST(HAVE_HTTP_AUTHSTRING)
|
||||
|
||||
gtk_save_libs="$LIBS"
|
||||
LIBS="$CUPS_LIBS"
|
||||
AC_CHECK_FUNCS(httpGetAuthString)
|
||||
LIBS="$gtk_save_libs"
|
||||
|
||||
else
|
||||
AM_CONDITIONAL(HAVE_CUPS, false)
|
||||
fi
|
||||
|
||||
# Checks to see if we should compile with PAPI backend for GTK+
|
||||
@@ -1902,27 +1885,23 @@ AC_ARG_ENABLE(papi,
|
||||
[disable papi print backend])],,
|
||||
[enable_papi=auto])
|
||||
|
||||
if test "x$enable_papi" = "xno"; then
|
||||
AM_CONDITIONAL(HAVE_PAPI, false)
|
||||
else
|
||||
if test "x$enable_papi" = "xauto"
|
||||
then
|
||||
AC_MSG_CHECKING(libpapi)
|
||||
AC_CHECK_LIB(papi, papiServiceCreate, have_papi=yes, have_papi=no)
|
||||
if test $have_papi = yes; then
|
||||
AC_DEFINE([HAVE_PAPI], [], [Define to 1 if libpapi available])
|
||||
fi
|
||||
AM_CONDITIONAL(HAVE_PAPI, test $have_papi = yes)
|
||||
if test "x$enable_papi" = "xyes" -a "x$have_papi" = "xno"; then
|
||||
AC_MSG_ERROR([
|
||||
*** papi not found.
|
||||
])
|
||||
fi
|
||||
else
|
||||
AM_CONDITIONAL(HAVE_PAPI, false)
|
||||
fi
|
||||
|
||||
AM_CONDITIONAL(HAVE_PAPI_CUPS, test "x$have_papi" = "xyes" -a "x$CUPS_CONFIG" != "xno")
|
||||
AM_CONDITIONAL(HAVE_PAPI_CUPS, test $have_papi = yes && test "x$CUPS_CONFIG" != "xno")
|
||||
|
||||
gtk_save_cppflags="$CPPFLAGS"
|
||||
CPPFLAGS="$CPPFLAGS $GTK_DEP_CFLAGS $GDK_DEP_CFLAGS"
|
||||
|
||||
CPPFLAGS="$CPPFLAGS $GTK_DEP_CFLAGS"
|
||||
|
||||
AC_CHECK_HEADER(cairo-pdf.h,,AC_MSG_ERROR([
|
||||
*** Can't find cairo-pdf.h. You must build Cairo with the pdf
|
||||
*** backend enabled.]))
|
||||
|
||||
@@ -17,23 +17,20 @@ demos = \
|
||||
dialog.c \
|
||||
drawingarea.c \
|
||||
editable_cells.c \
|
||||
entry_buffer.c \
|
||||
entry_completion.c \
|
||||
expander.c \
|
||||
hypertext.c \
|
||||
iconview.c \
|
||||
iconview_edit.c \
|
||||
images.c \
|
||||
infobar.c \
|
||||
links.c \
|
||||
links.c \
|
||||
list_store.c \
|
||||
menus.c \
|
||||
offscreen_window.c \
|
||||
offscreen_window2.c \
|
||||
panes.c \
|
||||
pickers.c \
|
||||
pixbufs.c \
|
||||
printing.c \
|
||||
resolution_independence.c \
|
||||
rotated_text.c \
|
||||
search_entry.c \
|
||||
sizegroup.c \
|
||||
|
||||
@@ -553,7 +553,8 @@ do_appwindow (GtkWidget *do_widget)
|
||||
0, 0);
|
||||
|
||||
gtk_window_set_default_size (GTK_WINDOW (window),
|
||||
200, 200);
|
||||
GTK_SIZE_ONE_TWELFTH_EM (200),
|
||||
GTK_SIZE_ONE_TWELFTH_EM (200));
|
||||
|
||||
contents = gtk_text_view_new ();
|
||||
gtk_widget_grab_focus (contents);
|
||||
|
||||
@@ -58,14 +58,32 @@ on_entry_changed (GtkWidget *widget, gpointer data)
|
||||
gtk_assistant_set_page_complete (assistant, current_page, FALSE);
|
||||
}
|
||||
|
||||
static void
|
||||
on_unit_changed (GtkWidget *assistant,
|
||||
gpointer user_data)
|
||||
{
|
||||
int n;
|
||||
GdkPixbuf *pixbuf;
|
||||
GtkWidget *page;
|
||||
|
||||
/* update icons on all pages */
|
||||
for (n = 0; n < 3; n++)
|
||||
{
|
||||
page = gtk_assistant_get_nth_page (GTK_ASSISTANT (assistant), n);
|
||||
pixbuf = gtk_widget_render_icon (assistant, GTK_STOCK_DIALOG_INFO, GTK_ICON_SIZE_DIALOG, NULL);
|
||||
gtk_assistant_set_page_header_image (GTK_ASSISTANT (assistant), page, pixbuf);
|
||||
g_object_unref (pixbuf);
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
create_page1 (GtkWidget *assistant)
|
||||
{
|
||||
GtkWidget *box, *label, *entry;
|
||||
GdkPixbuf *pixbuf;
|
||||
|
||||
box = gtk_hbox_new (FALSE, 12);
|
||||
gtk_container_set_border_width (GTK_CONTAINER (box), 12);
|
||||
box = gtk_hbox_new (FALSE, GTK_SIZE_ONE_TWELFTH_EM (10));
|
||||
gtk_container_set_border_width (GTK_CONTAINER (box), GTK_SIZE_ONE_TWELFTH_EM (10));
|
||||
|
||||
label = gtk_label_new ("You must fill out this entry to continue:");
|
||||
gtk_box_pack_start (GTK_BOX (box), label, FALSE, FALSE, 0);
|
||||
@@ -91,8 +109,8 @@ create_page2 (GtkWidget *assistant)
|
||||
GtkWidget *box, *checkbutton;
|
||||
GdkPixbuf *pixbuf;
|
||||
|
||||
box = gtk_vbox_new (12, FALSE);
|
||||
gtk_container_set_border_width (GTK_CONTAINER (box), 12);
|
||||
box = gtk_vbox_new (FALSE, GTK_SIZE_ONE_TWELFTH_EM (10));
|
||||
gtk_container_set_border_width (GTK_CONTAINER (box), GTK_SIZE_ONE_TWELFTH_EM (10));
|
||||
|
||||
checkbutton = gtk_check_button_new_with_label ("This is optional data, you may continue "
|
||||
"even if you do not check this");
|
||||
@@ -134,7 +152,7 @@ do_assistant (GtkWidget *do_widget)
|
||||
{
|
||||
assistant = gtk_assistant_new ();
|
||||
|
||||
gtk_window_set_default_size (GTK_WINDOW (assistant), -1, 300);
|
||||
gtk_window_set_default_size (GTK_WINDOW (assistant), -1, GTK_SIZE_ONE_TWELFTH_EM (300));
|
||||
|
||||
gtk_window_set_screen (GTK_WINDOW (assistant),
|
||||
gtk_widget_get_screen (do_widget));
|
||||
@@ -151,6 +169,10 @@ do_assistant (GtkWidget *do_widget)
|
||||
G_CALLBACK (on_assistant_apply), NULL);
|
||||
g_signal_connect (G_OBJECT (assistant), "prepare",
|
||||
G_CALLBACK (on_assistant_prepare), NULL);
|
||||
|
||||
/* need to reset the header pixbufs to correct size when the units change */
|
||||
g_signal_connect (G_OBJECT (assistant), "unit-changed",
|
||||
G_CALLBACK (on_unit_changed), NULL);
|
||||
}
|
||||
|
||||
if (!GTK_WIDGET_VISIBLE (assistant))
|
||||
|
||||
@@ -6,10 +6,10 @@
|
||||
#include <gtk/gtk.h>
|
||||
|
||||
static GtkWidget *
|
||||
create_bbox (gint horizontal,
|
||||
char *title,
|
||||
gint spacing,
|
||||
gint layout)
|
||||
create_bbox (gint horizontal,
|
||||
char *title,
|
||||
GtkSize spacing,
|
||||
gint layout)
|
||||
{
|
||||
GtkWidget *frame;
|
||||
GtkWidget *bbox;
|
||||
@@ -22,7 +22,7 @@ create_bbox (gint horizontal,
|
||||
else
|
||||
bbox = gtk_vbutton_box_new ();
|
||||
|
||||
gtk_container_set_border_width (GTK_CONTAINER (bbox), 5);
|
||||
gtk_container_set_border_width (GTK_CONTAINER (bbox), GTK_SIZE_ONE_TWELFTH_EM (5));
|
||||
gtk_container_add (GTK_CONTAINER (frame), bbox);
|
||||
|
||||
gtk_button_box_set_layout (GTK_BUTTON_BOX (bbox), layout);
|
||||
@@ -61,56 +61,56 @@ do_button_box (GtkWidget *do_widget)
|
||||
G_CALLBACK (gtk_widget_destroyed),
|
||||
&window);
|
||||
|
||||
gtk_container_set_border_width (GTK_CONTAINER (window), 10);
|
||||
gtk_container_set_border_width (GTK_CONTAINER (window), GTK_SIZE_ONE_TWELFTH_EM (10));
|
||||
|
||||
main_vbox = gtk_vbox_new (FALSE, 0);
|
||||
gtk_container_add (GTK_CONTAINER (window), main_vbox);
|
||||
|
||||
frame_horz = gtk_frame_new ("Horizontal Button Boxes");
|
||||
gtk_box_pack_start (GTK_BOX (main_vbox), frame_horz, TRUE, TRUE, 10);
|
||||
gtk_box_pack_start (GTK_BOX (main_vbox), frame_horz, TRUE, TRUE, GTK_SIZE_ONE_TWELFTH_EM (10));
|
||||
|
||||
vbox = gtk_vbox_new (FALSE, 0);
|
||||
gtk_container_set_border_width (GTK_CONTAINER (vbox), 10);
|
||||
gtk_container_set_border_width (GTK_CONTAINER (vbox), GTK_SIZE_ONE_TWELFTH_EM (10));
|
||||
gtk_container_add (GTK_CONTAINER (frame_horz), vbox);
|
||||
|
||||
gtk_box_pack_start (GTK_BOX (vbox),
|
||||
create_bbox (TRUE, "Spread", 40, GTK_BUTTONBOX_SPREAD),
|
||||
create_bbox (TRUE, "Spread", GTK_SIZE_ONE_TWELFTH_EM (40), GTK_BUTTONBOX_SPREAD),
|
||||
TRUE, TRUE, 0);
|
||||
|
||||
gtk_box_pack_start (GTK_BOX (vbox),
|
||||
create_bbox (TRUE, "Edge", 40, GTK_BUTTONBOX_EDGE),
|
||||
TRUE, TRUE, 5);
|
||||
create_bbox (TRUE, "Edge", GTK_SIZE_ONE_TWELFTH_EM (40), GTK_BUTTONBOX_EDGE),
|
||||
TRUE, TRUE, GTK_SIZE_ONE_TWELFTH_EM (5));
|
||||
|
||||
gtk_box_pack_start (GTK_BOX (vbox),
|
||||
create_bbox (TRUE, "Start", 40, GTK_BUTTONBOX_START),
|
||||
TRUE, TRUE, 5);
|
||||
create_bbox (TRUE, "Start", GTK_SIZE_ONE_TWELFTH_EM (40), GTK_BUTTONBOX_START),
|
||||
TRUE, TRUE, GTK_SIZE_ONE_TWELFTH_EM (5));
|
||||
|
||||
gtk_box_pack_start (GTK_BOX (vbox),
|
||||
create_bbox (TRUE, "End", 40, GTK_BUTTONBOX_END),
|
||||
TRUE, TRUE, 5);
|
||||
create_bbox (TRUE, "End", GTK_SIZE_ONE_TWELFTH_EM (40), GTK_BUTTONBOX_END),
|
||||
TRUE, TRUE, GTK_SIZE_ONE_TWELFTH_EM (5));
|
||||
|
||||
frame_vert = gtk_frame_new ("Vertical Button Boxes");
|
||||
gtk_box_pack_start (GTK_BOX (main_vbox), frame_vert, TRUE, TRUE, 10);
|
||||
gtk_box_pack_start (GTK_BOX (main_vbox), frame_vert, TRUE, TRUE, GTK_SIZE_ONE_TWELFTH_EM (10));
|
||||
|
||||
hbox = gtk_hbox_new (FALSE, 0);
|
||||
gtk_container_set_border_width (GTK_CONTAINER (hbox), 10);
|
||||
gtk_container_set_border_width (GTK_CONTAINER (hbox), GTK_SIZE_ONE_TWELFTH_EM (10));
|
||||
gtk_container_add (GTK_CONTAINER (frame_vert), hbox);
|
||||
|
||||
gtk_box_pack_start (GTK_BOX (hbox),
|
||||
create_bbox (FALSE, "Spread", 30, GTK_BUTTONBOX_SPREAD),
|
||||
create_bbox (FALSE, "Spread", GTK_SIZE_ONE_TWELFTH_EM (30), GTK_BUTTONBOX_SPREAD),
|
||||
TRUE, TRUE, 0);
|
||||
|
||||
gtk_box_pack_start (GTK_BOX (hbox),
|
||||
create_bbox (FALSE, "Edge", 30, GTK_BUTTONBOX_EDGE),
|
||||
TRUE, TRUE, 5);
|
||||
create_bbox (FALSE, "Edge", GTK_SIZE_ONE_TWELFTH_EM (30), GTK_BUTTONBOX_EDGE),
|
||||
TRUE, TRUE, GTK_SIZE_ONE_TWELFTH_EM (5));
|
||||
|
||||
gtk_box_pack_start (GTK_BOX (hbox),
|
||||
create_bbox (FALSE, "Start", 30, GTK_BUTTONBOX_START),
|
||||
TRUE, TRUE, 5);
|
||||
create_bbox (FALSE, "Start", GTK_SIZE_ONE_TWELFTH_EM (30), GTK_BUTTONBOX_START),
|
||||
TRUE, TRUE, GTK_SIZE_ONE_TWELFTH_EM (5));
|
||||
|
||||
gtk_box_pack_start (GTK_BOX (hbox),
|
||||
create_bbox (FALSE, "End", 30, GTK_BUTTONBOX_END),
|
||||
TRUE, TRUE, 5);
|
||||
create_bbox (FALSE, "End", GTK_SIZE_ONE_TWELFTH_EM (30), GTK_BUTTONBOX_END),
|
||||
TRUE, TRUE, GTK_SIZE_ONE_TWELFTH_EM (5));
|
||||
}
|
||||
|
||||
if (!GTK_WIDGET_VISIBLE (window))
|
||||
|
||||
@@ -354,8 +354,8 @@ create_frame (ChangeDisplayInfo *info,
|
||||
|
||||
*frame = gtk_frame_new (title);
|
||||
|
||||
hbox = gtk_hbox_new (FALSE, 8);
|
||||
gtk_container_set_border_width (GTK_CONTAINER (hbox), 8);
|
||||
hbox = gtk_hbox_new (FALSE, GTK_SIZE_ONE_TWELFTH_EM (8));
|
||||
gtk_container_set_border_width (GTK_CONTAINER (hbox), GTK_SIZE_ONE_TWELFTH_EM (8));
|
||||
gtk_container_add (GTK_CONTAINER (*frame), hbox);
|
||||
|
||||
scrollwin = gtk_scrolled_window_new (NULL, NULL);
|
||||
@@ -372,7 +372,7 @@ create_frame (ChangeDisplayInfo *info,
|
||||
selection = gtk_tree_view_get_selection (GTK_TREE_VIEW (*tree_view));
|
||||
gtk_tree_selection_set_mode (selection, GTK_SELECTION_BROWSE);
|
||||
|
||||
*button_vbox = gtk_vbox_new (FALSE, 5);
|
||||
*button_vbox = gtk_vbox_new (FALSE, GTK_SIZE_ONE_TWELFTH_EM (5));
|
||||
gtk_box_pack_start (GTK_BOX (hbox), *button_vbox, FALSE, FALSE, 0);
|
||||
|
||||
if (!info->size_group)
|
||||
@@ -611,15 +611,15 @@ do_changedisplay (GtkWidget *do_widget)
|
||||
"Change", GTK_RESPONSE_OK,
|
||||
NULL);
|
||||
|
||||
gtk_window_set_default_size (GTK_WINDOW (info->window), 300, 400);
|
||||
gtk_window_set_default_size (GTK_WINDOW (info->window), GTK_SIZE_ONE_TWELFTH_EM (300), GTK_SIZE_ONE_TWELFTH_EM (400));
|
||||
|
||||
g_signal_connect (info->window, "response",
|
||||
G_CALLBACK (response_cb), info);
|
||||
g_signal_connect (info->window, "destroy",
|
||||
G_CALLBACK (destroy_cb), &info);
|
||||
|
||||
vbox = gtk_vbox_new (FALSE, 5);
|
||||
gtk_container_set_border_width (GTK_CONTAINER (vbox), 8);
|
||||
vbox = gtk_vbox_new (FALSE, GTK_SIZE_ONE_TWELFTH_EM (5));
|
||||
gtk_container_set_border_width (GTK_CONTAINER (vbox), GTK_SIZE_ONE_TWELFTH_EM (8));
|
||||
|
||||
gtk_box_pack_start (GTK_BOX (GTK_DIALOG (info->window)->vbox), vbox,
|
||||
TRUE, TRUE, 0);
|
||||
|
||||
@@ -203,15 +203,11 @@ do_clipboard (GtkWidget *do_widget)
|
||||
GtkClipboard *clipboard;
|
||||
|
||||
window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
|
||||
gtk_window_set_screen (GTK_WINDOW (window),
|
||||
gtk_widget_get_screen (do_widget));
|
||||
gtk_window_set_title (GTK_WINDOW (window), "Clipboard demo");
|
||||
|
||||
g_signal_connect (window, "destroy",
|
||||
G_CALLBACK (gtk_widget_destroyed), &window);
|
||||
|
||||
vbox = gtk_vbox_new (FALSE, 0);
|
||||
gtk_container_set_border_width (GTK_CONTAINER (vbox), 8);
|
||||
gtk_container_set_border_width (GTK_CONTAINER (vbox), GTK_SIZE_ONE_TWELFTH_EM (8));
|
||||
|
||||
gtk_container_add (GTK_CONTAINER (window), vbox);
|
||||
|
||||
@@ -219,8 +215,8 @@ do_clipboard (GtkWidget *do_widget)
|
||||
|
||||
gtk_box_pack_start (GTK_BOX (vbox), label, FALSE, FALSE, 0);
|
||||
|
||||
hbox = gtk_hbox_new (FALSE, 4);
|
||||
gtk_container_set_border_width (GTK_CONTAINER (hbox), 8);
|
||||
hbox = gtk_hbox_new (FALSE, GTK_SIZE_ONE_TWELFTH_EM (4));
|
||||
gtk_container_set_border_width (GTK_CONTAINER (hbox), GTK_SIZE_ONE_TWELFTH_EM (8));
|
||||
gtk_box_pack_start (GTK_BOX (vbox), hbox, FALSE, FALSE, 0);
|
||||
|
||||
/* Create the first entry */
|
||||
@@ -236,8 +232,8 @@ do_clipboard (GtkWidget *do_widget)
|
||||
label = gtk_label_new ("\"Paste\" will paste the text from the clipboard to the entry");
|
||||
gtk_box_pack_start (GTK_BOX (vbox), label, FALSE, FALSE, 0);
|
||||
|
||||
hbox = gtk_hbox_new (FALSE, 4);
|
||||
gtk_container_set_border_width (GTK_CONTAINER (hbox), 8);
|
||||
hbox = gtk_hbox_new (FALSE, GTK_SIZE_ONE_TWELFTH_EM (4));
|
||||
gtk_container_set_border_width (GTK_CONTAINER (hbox), GTK_SIZE_ONE_TWELFTH_EM (8));
|
||||
gtk_box_pack_start (GTK_BOX (vbox), hbox, FALSE, FALSE, 0);
|
||||
|
||||
/* Create the second entry */
|
||||
@@ -253,8 +249,8 @@ do_clipboard (GtkWidget *do_widget)
|
||||
label = gtk_label_new ("Images can be transferred via the clipboard, too");
|
||||
gtk_box_pack_start (GTK_BOX (vbox), label, FALSE, FALSE, 0);
|
||||
|
||||
hbox = gtk_hbox_new (FALSE, 4);
|
||||
gtk_container_set_border_width (GTK_CONTAINER (hbox), 8);
|
||||
hbox = gtk_hbox_new (FALSE, GTK_SIZE_ONE_TWELFTH_EM (4));
|
||||
gtk_container_set_border_width (GTK_CONTAINER (hbox), GTK_SIZE_ONE_TWELFTH_EM (8));
|
||||
gtk_box_pack_start (GTK_BOX (vbox), hbox, FALSE, FALSE, 0);
|
||||
|
||||
/* Create the first image */
|
||||
|
||||
@@ -87,10 +87,10 @@ do_colorsel (GtkWidget *do_widget)
|
||||
g_signal_connect (window, "destroy",
|
||||
G_CALLBACK (gtk_widget_destroyed), &window);
|
||||
|
||||
gtk_container_set_border_width (GTK_CONTAINER (window), 8);
|
||||
gtk_container_set_border_width (GTK_CONTAINER (window), GTK_SIZE_ONE_TWELFTH_EM (8));
|
||||
|
||||
vbox = gtk_vbox_new (FALSE, 8);
|
||||
gtk_container_set_border_width (GTK_CONTAINER (vbox), 8);
|
||||
vbox = gtk_vbox_new (FALSE, GTK_SIZE_ONE_TWELFTH_EM (8));
|
||||
gtk_container_set_border_width (GTK_CONTAINER (vbox), GTK_SIZE_ONE_TWELFTH_EM (8));
|
||||
gtk_container_add (GTK_CONTAINER (window), vbox);
|
||||
|
||||
/*
|
||||
@@ -108,7 +108,7 @@ do_colorsel (GtkWidget *do_widget)
|
||||
G_CALLBACK (expose_event_callback), NULL);
|
||||
|
||||
/* set a minimum size */
|
||||
gtk_widget_set_size_request (da, 200, 200);
|
||||
gtk_widget_set_size_request (da, GTK_SIZE_ONE_TWELFTH_EM (200), GTK_SIZE_ONE_TWELFTH_EM (200));
|
||||
/* set the color */
|
||||
gtk_widget_modify_bg (da, GTK_STATE_NORMAL, &color);
|
||||
|
||||
|
||||
@@ -11,8 +11,10 @@
|
||||
|
||||
enum
|
||||
{
|
||||
PIXBUF_COL,
|
||||
TEXT_COL
|
||||
STOCK_ID_COL,
|
||||
TEXT_COL,
|
||||
|
||||
NUM_COLUMNS,
|
||||
};
|
||||
|
||||
static gchar *
|
||||
@@ -50,7 +52,6 @@ create_stock_icon_store (void)
|
||||
};
|
||||
|
||||
GtkStockItem item;
|
||||
GdkPixbuf *pixbuf;
|
||||
GtkWidget *cellview;
|
||||
GtkTreeIter iter;
|
||||
GtkListStore *store;
|
||||
@@ -59,29 +60,25 @@ create_stock_icon_store (void)
|
||||
|
||||
cellview = gtk_cell_view_new ();
|
||||
|
||||
store = gtk_list_store_new (2, GDK_TYPE_PIXBUF, G_TYPE_STRING);
|
||||
store = gtk_list_store_new (NUM_COLUMNS, G_TYPE_STRING, G_TYPE_STRING);
|
||||
|
||||
for (i = 0; i < G_N_ELEMENTS (stock_id); i++)
|
||||
{
|
||||
if (stock_id[i])
|
||||
{
|
||||
pixbuf = gtk_widget_render_icon (cellview, stock_id[i],
|
||||
GTK_ICON_SIZE_BUTTON, NULL);
|
||||
gtk_stock_lookup (stock_id[i], &item);
|
||||
gtk_stock_lookup (stock_id[i], &item);
|
||||
label = strip_underscore (item.label);
|
||||
gtk_list_store_append (store, &iter);
|
||||
gtk_list_store_set (store, &iter,
|
||||
PIXBUF_COL, pixbuf,
|
||||
STOCK_ID_COL, stock_id[i],
|
||||
TEXT_COL, label,
|
||||
-1);
|
||||
g_object_unref (pixbuf);
|
||||
g_free (label);
|
||||
}
|
||||
else
|
||||
{
|
||||
gtk_list_store_append (store, &iter);
|
||||
gtk_list_store_set (store, &iter,
|
||||
PIXBUF_COL, NULL,
|
||||
TEXT_COL, "separator",
|
||||
-1);
|
||||
}
|
||||
@@ -343,9 +340,9 @@ do_combobox (GtkWidget *do_widget)
|
||||
G_CALLBACK (gtk_widget_destroyed),
|
||||
&window);
|
||||
|
||||
gtk_container_set_border_width (GTK_CONTAINER (window), 10);
|
||||
gtk_container_set_border_width (GTK_CONTAINER (window), GTK_SIZE_ONE_TWELFTH_EM (10));
|
||||
|
||||
vbox = gtk_vbox_new (FALSE, 2);
|
||||
vbox = gtk_vbox_new (FALSE, GTK_SIZE_ONE_TWELFTH_EM (2));
|
||||
gtk_container_add (GTK_CONTAINER (window), vbox);
|
||||
|
||||
/* A combobox demonstrating cell renderers, separators and
|
||||
@@ -355,7 +352,7 @@ do_combobox (GtkWidget *do_widget)
|
||||
gtk_box_pack_start (GTK_BOX (vbox), frame, FALSE, FALSE, 0);
|
||||
|
||||
box = gtk_vbox_new (FALSE, 0);
|
||||
gtk_container_set_border_width (GTK_CONTAINER (box), 5);
|
||||
gtk_container_set_border_width (GTK_CONTAINER (box), GTK_SIZE_ONE_TWELFTH_EM (5));
|
||||
gtk_container_add (GTK_CONTAINER (frame), box);
|
||||
|
||||
model = create_stock_icon_store ();
|
||||
@@ -366,7 +363,7 @@ do_combobox (GtkWidget *do_widget)
|
||||
renderer = gtk_cell_renderer_pixbuf_new ();
|
||||
gtk_cell_layout_pack_start (GTK_CELL_LAYOUT (combo), renderer, FALSE);
|
||||
gtk_cell_layout_set_attributes (GTK_CELL_LAYOUT (combo), renderer,
|
||||
"pixbuf", PIXBUF_COL,
|
||||
"stock-id", STOCK_ID_COL,
|
||||
NULL);
|
||||
|
||||
gtk_cell_layout_set_cell_data_func (GTK_CELL_LAYOUT (combo),
|
||||
@@ -396,7 +393,7 @@ do_combobox (GtkWidget *do_widget)
|
||||
gtk_box_pack_start (GTK_BOX (vbox), frame, FALSE, FALSE, 0);
|
||||
|
||||
box = gtk_vbox_new (FALSE, 0);
|
||||
gtk_container_set_border_width (GTK_CONTAINER (box), 5);
|
||||
gtk_container_set_border_width (GTK_CONTAINER (box), GTK_SIZE_ONE_TWELFTH_EM (5));
|
||||
gtk_container_add (GTK_CONTAINER (frame), box);
|
||||
|
||||
model = create_capital_store ();
|
||||
@@ -425,7 +422,7 @@ do_combobox (GtkWidget *do_widget)
|
||||
gtk_box_pack_start (GTK_BOX (vbox), frame, FALSE, FALSE, 0);
|
||||
|
||||
box = gtk_vbox_new (FALSE, 0);
|
||||
gtk_container_set_border_width (GTK_CONTAINER (box), 5);
|
||||
gtk_container_set_border_width (GTK_CONTAINER (box), GTK_SIZE_ONE_TWELFTH_EM (5));
|
||||
gtk_container_add (GTK_CONTAINER (frame), box);
|
||||
|
||||
combo = gtk_combo_box_entry_new_text ();
|
||||
|
||||
@@ -148,8 +148,9 @@
|
||||
</accessibility>
|
||||
</object>
|
||||
<object class="GtkWindow" id="window1">
|
||||
<property name="default_height">250</property>
|
||||
<property name="default_width">440</property>
|
||||
<!-- 100 mm = 10 cm ~= 4 inches -->
|
||||
<property name="default_height">100 mm</property>
|
||||
<property name="default_width">36.6667em</property>
|
||||
<property name="title">GtkBuilder demo</property>
|
||||
<child>
|
||||
<object class="GtkVBox" id="vbox1">
|
||||
|
||||
@@ -51,16 +51,16 @@ interactive_dialog_clicked (GtkButton *button,
|
||||
GTK_RESPONSE_CANCEL,
|
||||
NULL);
|
||||
|
||||
hbox = gtk_hbox_new (FALSE, 8);
|
||||
gtk_container_set_border_width (GTK_CONTAINER (hbox), 8);
|
||||
hbox = gtk_hbox_new (FALSE, GTK_SIZE_ONE_TWELFTH_EM (8));
|
||||
gtk_container_set_border_width (GTK_CONTAINER (hbox), GTK_SIZE_ONE_TWELFTH_EM (8));
|
||||
gtk_box_pack_start (GTK_BOX (GTK_DIALOG (dialog)->vbox), hbox, FALSE, FALSE, 0);
|
||||
|
||||
stock = gtk_image_new_from_stock (GTK_STOCK_DIALOG_QUESTION, GTK_ICON_SIZE_DIALOG);
|
||||
gtk_box_pack_start (GTK_BOX (hbox), stock, FALSE, FALSE, 0);
|
||||
|
||||
table = gtk_table_new (2, 2, FALSE);
|
||||
gtk_table_set_row_spacings (GTK_TABLE (table), 4);
|
||||
gtk_table_set_col_spacings (GTK_TABLE (table), 4);
|
||||
gtk_table_set_row_spacings (GTK_TABLE (table), GTK_SIZE_ONE_TWELFTH_EM (4));
|
||||
gtk_table_set_col_spacings (GTK_TABLE (table), GTK_SIZE_ONE_TWELFTH_EM (4));
|
||||
gtk_box_pack_start (GTK_BOX (hbox), table, TRUE, TRUE, 0);
|
||||
label = gtk_label_new_with_mnemonic ("_Entry 1");
|
||||
gtk_table_attach_defaults (GTK_TABLE (table),
|
||||
@@ -112,17 +112,17 @@ do_dialog (GtkWidget *do_widget)
|
||||
gtk_window_set_title (GTK_WINDOW (window), "Dialogs");
|
||||
|
||||
g_signal_connect (window, "destroy", G_CALLBACK (gtk_widget_destroyed), &window);
|
||||
gtk_container_set_border_width (GTK_CONTAINER (window), 8);
|
||||
gtk_container_set_border_width (GTK_CONTAINER (window), GTK_SIZE_ONE_TWELFTH_EM (8));
|
||||
|
||||
frame = gtk_frame_new ("Dialogs");
|
||||
gtk_container_add (GTK_CONTAINER (window), frame);
|
||||
|
||||
vbox = gtk_vbox_new (FALSE, 8);
|
||||
gtk_container_set_border_width (GTK_CONTAINER (vbox), 8);
|
||||
vbox = gtk_vbox_new (FALSE, GTK_SIZE_ONE_TWELFTH_EM (8));
|
||||
gtk_container_set_border_width (GTK_CONTAINER (vbox), GTK_SIZE_ONE_TWELFTH_EM (8));
|
||||
gtk_container_add (GTK_CONTAINER (frame), vbox);
|
||||
|
||||
/* Standard message dialog */
|
||||
hbox = gtk_hbox_new (FALSE, 8);
|
||||
hbox = gtk_hbox_new (FALSE, GTK_SIZE_ONE_TWELFTH_EM (8));
|
||||
gtk_box_pack_start (GTK_BOX (vbox), hbox, FALSE, FALSE, 0);
|
||||
button = gtk_button_new_with_mnemonic ("_Message Dialog");
|
||||
g_signal_connect (button, "clicked",
|
||||
@@ -132,7 +132,7 @@ do_dialog (GtkWidget *do_widget)
|
||||
gtk_box_pack_start (GTK_BOX (vbox), gtk_hseparator_new (), FALSE, FALSE, 0);
|
||||
|
||||
/* Interactive dialog*/
|
||||
hbox = gtk_hbox_new (FALSE, 8);
|
||||
hbox = gtk_hbox_new (FALSE, GTK_SIZE_ONE_TWELFTH_EM (8));
|
||||
gtk_box_pack_start (GTK_BOX (vbox), hbox, FALSE, FALSE, 0);
|
||||
vbox2 = gtk_vbox_new (FALSE, 0);
|
||||
|
||||
@@ -143,8 +143,8 @@ do_dialog (GtkWidget *do_widget)
|
||||
gtk_box_pack_start (GTK_BOX (vbox2), button, FALSE, FALSE, 0);
|
||||
|
||||
table = gtk_table_new (2, 2, FALSE);
|
||||
gtk_table_set_row_spacings (GTK_TABLE (table), 4);
|
||||
gtk_table_set_col_spacings (GTK_TABLE (table), 4);
|
||||
gtk_table_set_row_spacings (GTK_TABLE (table), GTK_SIZE_ONE_TWELFTH_EM (4));
|
||||
gtk_table_set_col_spacings (GTK_TABLE (table), GTK_SIZE_ONE_TWELFTH_EM (4));
|
||||
gtk_box_pack_start (GTK_BOX (hbox), table, FALSE, FALSE, 0);
|
||||
|
||||
label = gtk_label_new_with_mnemonic ("_Entry 1");
|
||||
|
||||
@@ -245,10 +245,10 @@ do_drawingarea (GtkWidget *do_widget)
|
||||
|
||||
g_signal_connect (window, "destroy", G_CALLBACK (close_window), NULL);
|
||||
|
||||
gtk_container_set_border_width (GTK_CONTAINER (window), 8);
|
||||
gtk_container_set_border_width (GTK_CONTAINER (window), GTK_SIZE_ONE_TWELFTH_EM (8));
|
||||
|
||||
vbox = gtk_vbox_new (FALSE, 8);
|
||||
gtk_container_set_border_width (GTK_CONTAINER (vbox), 8);
|
||||
vbox = gtk_vbox_new (FALSE, GTK_SIZE_ONE_TWELFTH_EM (8));
|
||||
gtk_container_set_border_width (GTK_CONTAINER (vbox), GTK_SIZE_ONE_TWELFTH_EM (8));
|
||||
gtk_container_add (GTK_CONTAINER (window), vbox);
|
||||
|
||||
/*
|
||||
@@ -266,7 +266,7 @@ do_drawingarea (GtkWidget *do_widget)
|
||||
|
||||
da = gtk_drawing_area_new ();
|
||||
/* set a minimum size */
|
||||
gtk_widget_set_size_request (da, 100, 100);
|
||||
gtk_widget_set_size_request (da, GTK_SIZE_ONE_TWELFTH_EM (100), GTK_SIZE_ONE_TWELFTH_EM (100));
|
||||
|
||||
gtk_container_add (GTK_CONTAINER (frame), da);
|
||||
|
||||
@@ -288,7 +288,7 @@ do_drawingarea (GtkWidget *do_widget)
|
||||
|
||||
da = gtk_drawing_area_new ();
|
||||
/* set a minimum size */
|
||||
gtk_widget_set_size_request (da, 100, 100);
|
||||
gtk_widget_set_size_request (da, GTK_SIZE_ONE_TWELFTH_EM (100), GTK_SIZE_ONE_TWELFTH_EM (100));
|
||||
|
||||
gtk_container_add (GTK_CONTAINER (frame), da);
|
||||
|
||||
|
||||
@@ -328,11 +328,11 @@ do_editable_cells (GtkWidget *do_widget)
|
||||
gtk_window_set_screen (GTK_WINDOW (window),
|
||||
gtk_widget_get_screen (do_widget));
|
||||
gtk_window_set_title (GTK_WINDOW (window), "Shopping list");
|
||||
gtk_container_set_border_width (GTK_CONTAINER (window), 5);
|
||||
gtk_container_set_border_width (GTK_CONTAINER (window), GTK_SIZE_ONE_TWELFTH_EM (5));
|
||||
g_signal_connect (window, "destroy",
|
||||
G_CALLBACK (gtk_widget_destroyed), &window);
|
||||
|
||||
vbox = gtk_vbox_new (FALSE, 5);
|
||||
vbox = gtk_vbox_new (FALSE, GTK_SIZE_ONE_TWELFTH_EM (5));
|
||||
gtk_container_add (GTK_CONTAINER (window), vbox);
|
||||
|
||||
gtk_box_pack_start (GTK_BOX (vbox),
|
||||
@@ -365,7 +365,7 @@ do_editable_cells (GtkWidget *do_widget)
|
||||
gtk_container_add (GTK_CONTAINER (sw), treeview);
|
||||
|
||||
/* some buttons */
|
||||
hbox = gtk_hbox_new (TRUE, 4);
|
||||
hbox = gtk_hbox_new (TRUE, GTK_SIZE_ONE_TWELFTH_EM (4));
|
||||
gtk_box_pack_start (GTK_BOX (vbox), hbox, FALSE, FALSE, 0);
|
||||
|
||||
button = gtk_button_new_with_label ("Add item");
|
||||
@@ -378,7 +378,7 @@ do_editable_cells (GtkWidget *do_widget)
|
||||
G_CALLBACK (remove_item), treeview);
|
||||
gtk_box_pack_start (GTK_BOX (hbox), button, TRUE, TRUE, 0);
|
||||
|
||||
gtk_window_set_default_size (GTK_WINDOW (window), 320, 200);
|
||||
gtk_window_set_default_size (GTK_WINDOW (window), GTK_SIZE_ONE_TWELFTH_EM (320), GTK_SIZE_ONE_TWELFTH_EM (200));
|
||||
}
|
||||
|
||||
if (!GTK_WIDGET_VISIBLE (window))
|
||||
|
||||
@@ -1,65 +0,0 @@
|
||||
/* Entry/Entry Buffer
|
||||
*
|
||||
* GtkEntryBuffer provides the text content in a GtkEntry.
|
||||
*
|
||||
*/
|
||||
|
||||
#include <gtk/gtk.h>
|
||||
|
||||
static GtkWidget *window = NULL;
|
||||
|
||||
GtkWidget *
|
||||
do_entry_buffer (GtkWidget *do_widget)
|
||||
{
|
||||
GtkWidget *vbox;
|
||||
GtkWidget *label;
|
||||
GtkWidget *entry;
|
||||
GtkEntryBuffer *buffer;
|
||||
|
||||
if (!window)
|
||||
{
|
||||
window = gtk_dialog_new_with_buttons ("GtkEntryBuffer",
|
||||
GTK_WINDOW (do_widget),
|
||||
0,
|
||||
GTK_STOCK_CLOSE,
|
||||
GTK_RESPONSE_NONE,
|
||||
NULL);
|
||||
gtk_window_set_resizable (GTK_WINDOW (window), FALSE);
|
||||
|
||||
g_signal_connect (window, "response",
|
||||
G_CALLBACK (gtk_widget_destroy), NULL);
|
||||
g_signal_connect (window, "destroy",
|
||||
G_CALLBACK (gtk_widget_destroyed), &window);
|
||||
|
||||
vbox = gtk_vbox_new (FALSE, 5);
|
||||
gtk_box_pack_start (GTK_BOX (GTK_DIALOG (window)->vbox), vbox, TRUE, TRUE, 0);
|
||||
gtk_container_set_border_width (GTK_CONTAINER (vbox), 5);
|
||||
|
||||
label = gtk_label_new (NULL);
|
||||
gtk_label_set_markup (GTK_LABEL (label), "Entries share a buffer. Typing in one is reflected in the other.");
|
||||
gtk_box_pack_start (GTK_BOX (vbox), label, FALSE, FALSE, 0);
|
||||
|
||||
/* Create a buffer */
|
||||
buffer = gtk_entry_buffer_new (NULL, 0);
|
||||
|
||||
/* Create our first entry */
|
||||
entry = gtk_entry_new_with_buffer (buffer);
|
||||
gtk_box_pack_start (GTK_BOX (vbox), entry, FALSE, FALSE, 0);
|
||||
|
||||
/* Create the second entry */
|
||||
entry = gtk_entry_new_with_buffer (buffer);
|
||||
gtk_entry_set_visibility (GTK_ENTRY (entry), FALSE);
|
||||
gtk_box_pack_start (GTK_BOX (vbox), entry, FALSE, FALSE, 0);
|
||||
|
||||
g_object_unref (buffer);
|
||||
}
|
||||
|
||||
if (!GTK_WIDGET_VISIBLE (window))
|
||||
gtk_widget_show_all (window);
|
||||
else
|
||||
gtk_widget_destroy (window);
|
||||
|
||||
return window;
|
||||
}
|
||||
|
||||
|
||||
@@ -58,9 +58,9 @@ do_entry_completion (GtkWidget *do_widget)
|
||||
g_signal_connect (window, "destroy",
|
||||
G_CALLBACK (gtk_widget_destroyed), &window);
|
||||
|
||||
vbox = gtk_vbox_new (FALSE, 5);
|
||||
vbox = gtk_vbox_new (FALSE, GTK_SIZE_ONE_TWELFTH_EM (5));
|
||||
gtk_box_pack_start (GTK_BOX (GTK_DIALOG (window)->vbox), vbox, TRUE, TRUE, 0);
|
||||
gtk_container_set_border_width (GTK_CONTAINER (vbox), 5);
|
||||
gtk_container_set_border_width (GTK_CONTAINER (vbox), GTK_SIZE_ONE_TWELFTH_EM (5));
|
||||
|
||||
label = gtk_label_new (NULL);
|
||||
gtk_label_set_markup (GTK_LABEL (label), "Completion demo, try writing <b>total</b> or <b>gnome</b> for example.");
|
||||
|
||||
@@ -32,9 +32,9 @@ do_expander (GtkWidget *do_widget)
|
||||
g_signal_connect (window, "destroy",
|
||||
G_CALLBACK (gtk_widget_destroyed), &window);
|
||||
|
||||
vbox = gtk_vbox_new (FALSE, 5);
|
||||
vbox = gtk_vbox_new (FALSE, GTK_SIZE_ONE_TWELFTH_EM (5));
|
||||
gtk_box_pack_start (GTK_BOX (GTK_DIALOG (window)->vbox), vbox, TRUE, TRUE, 0);
|
||||
gtk_container_set_border_width (GTK_CONTAINER (vbox), 5);
|
||||
gtk_container_set_border_width (GTK_CONTAINER (vbox), GTK_SIZE_ONE_TWELFTH_EM (5));
|
||||
|
||||
label = gtk_label_new ("Expander demo. Click on the triangle for details.");
|
||||
gtk_box_pack_start (GTK_BOX (vbox), label, FALSE, FALSE, 0);
|
||||
|
||||
@@ -267,7 +267,7 @@ do_hypertext (GtkWidget *do_widget)
|
||||
gtk_window_set_screen (GTK_WINDOW (window),
|
||||
gtk_widget_get_screen (do_widget));
|
||||
gtk_window_set_default_size (GTK_WINDOW (window),
|
||||
450, 450);
|
||||
GTK_SIZE_ONE_TWELFTH_EM (450), GTK_SIZE_ONE_TWELFTH_EM (450));
|
||||
|
||||
g_signal_connect (window, "destroy",
|
||||
G_CALLBACK (gtk_widget_destroyed), &window);
|
||||
|
||||
@@ -263,7 +263,7 @@ do_iconview (GtkWidget *do_widget)
|
||||
GError *error;
|
||||
|
||||
window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
|
||||
gtk_window_set_default_size (GTK_WINDOW (window), 650, 400);
|
||||
gtk_window_set_default_size (GTK_WINDOW (window), GTK_SIZE_ONE_TWELFTH_EM (650), GTK_SIZE_ONE_TWELFTH_EM (400));
|
||||
|
||||
gtk_window_set_screen (GTK_WINDOW (window),
|
||||
gtk_widget_get_screen (do_widget));
|
||||
|
||||
@@ -332,10 +332,10 @@ do_images (GtkWidget *do_widget)
|
||||
g_signal_connect (window, "destroy",
|
||||
G_CALLBACK (cleanup_callback), NULL);
|
||||
|
||||
gtk_container_set_border_width (GTK_CONTAINER (window), 8);
|
||||
gtk_container_set_border_width (GTK_CONTAINER (window), GTK_SIZE_ONE_TWELFTH_EM (8));
|
||||
|
||||
vbox = gtk_vbox_new (FALSE, 8);
|
||||
gtk_container_set_border_width (GTK_CONTAINER (vbox), 8);
|
||||
vbox = gtk_vbox_new (FALSE, GTK_SIZE_ONE_TWELFTH_EM (8));
|
||||
gtk_container_set_border_width (GTK_CONTAINER (vbox), GTK_SIZE_ONE_TWELFTH_EM (8));
|
||||
gtk_container_add (GTK_CONTAINER (window), vbox);
|
||||
|
||||
label = gtk_label_new (NULL);
|
||||
|
||||
@@ -1,104 +0,0 @@
|
||||
/* Info bar
|
||||
*
|
||||
* Info bar widgets are used to report important messages to the user.
|
||||
*/
|
||||
|
||||
#include <gtk/gtk.h>
|
||||
|
||||
static GtkWidget *window = NULL;
|
||||
|
||||
static void
|
||||
on_bar_response (GtkInfoBar *info_bar,
|
||||
gint response_id,
|
||||
gpointer user_data)
|
||||
{
|
||||
GtkWidget *dialog;
|
||||
|
||||
dialog = gtk_message_dialog_new (GTK_WINDOW (window),
|
||||
GTK_DIALOG_MODAL | GTK_DIALOG_DESTROY_WITH_PARENT,
|
||||
GTK_MESSAGE_INFO,
|
||||
GTK_BUTTONS_OK,
|
||||
"You clicked a button on an info bar");
|
||||
gtk_message_dialog_format_secondary_text (GTK_MESSAGE_DIALOG (dialog),
|
||||
"Your response has id %d", response_id);
|
||||
gtk_dialog_run (GTK_DIALOG (dialog));
|
||||
gtk_widget_destroy (dialog);
|
||||
}
|
||||
|
||||
GtkWidget *
|
||||
do_infobar (GtkWidget *do_widget)
|
||||
{
|
||||
GtkWidget *frame;
|
||||
GtkWidget *bar;
|
||||
GtkWidget *vbox;
|
||||
GtkWidget *vbox2;
|
||||
GtkWidget *label;
|
||||
|
||||
if (!window)
|
||||
{
|
||||
window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
|
||||
gtk_window_set_screen (GTK_WINDOW (window),
|
||||
gtk_widget_get_screen (do_widget));
|
||||
gtk_window_set_title (GTK_WINDOW (window), "Info Bars");
|
||||
|
||||
g_signal_connect (window, "destroy", G_CALLBACK (gtk_widget_destroyed), &window);
|
||||
gtk_container_set_border_width (GTK_CONTAINER (window), 8);
|
||||
|
||||
vbox = gtk_vbox_new (FALSE, 0);
|
||||
gtk_container_add (GTK_CONTAINER (window), vbox);
|
||||
|
||||
bar = gtk_info_bar_new ();
|
||||
gtk_box_pack_start (GTK_BOX (vbox), bar, FALSE, FALSE, 0);
|
||||
gtk_info_bar_set_message_type (GTK_INFO_BAR (bar), GTK_MESSAGE_INFO);
|
||||
label = gtk_label_new ("This is an info bar with message type GTK_MESSAGE_INFO");
|
||||
gtk_box_pack_start (GTK_BOX (gtk_info_bar_get_content_area (GTK_INFO_BAR (bar))), label, FALSE, FALSE, 0);
|
||||
|
||||
bar = gtk_info_bar_new ();
|
||||
gtk_box_pack_start (GTK_BOX (vbox), bar, FALSE, FALSE, 0);
|
||||
gtk_info_bar_set_message_type (GTK_INFO_BAR (bar), GTK_MESSAGE_WARNING);
|
||||
label = gtk_label_new ("This is an info bar with message type GTK_MESSAGE_WARNING");
|
||||
gtk_box_pack_start (GTK_BOX (gtk_info_bar_get_content_area (GTK_INFO_BAR (bar))), label, FALSE, FALSE, 0);
|
||||
|
||||
bar = gtk_info_bar_new_with_buttons (GTK_STOCK_OK, GTK_RESPONSE_OK, NULL);
|
||||
g_signal_connect (bar, "response", G_CALLBACK (on_bar_response), window);
|
||||
gtk_box_pack_start (GTK_BOX (vbox), bar, FALSE, FALSE, 0);
|
||||
gtk_info_bar_set_message_type (GTK_INFO_BAR (bar), GTK_MESSAGE_QUESTION);
|
||||
label = gtk_label_new ("This is an info bar with message type GTK_MESSAGE_QUESTION");
|
||||
gtk_box_pack_start (GTK_BOX (gtk_info_bar_get_content_area (GTK_INFO_BAR (bar))), label, FALSE, FALSE, 0);
|
||||
|
||||
bar = gtk_info_bar_new ();
|
||||
gtk_box_pack_start (GTK_BOX (vbox), bar, FALSE, FALSE, 0);
|
||||
gtk_info_bar_set_message_type (GTK_INFO_BAR (bar), GTK_MESSAGE_ERROR);
|
||||
label = gtk_label_new ("This is an info bar with message type GTK_MESSAGE_ERROR");
|
||||
gtk_box_pack_start (GTK_BOX (gtk_info_bar_get_content_area (GTK_INFO_BAR (bar))), label, FALSE, FALSE, 0);
|
||||
|
||||
bar = gtk_info_bar_new ();
|
||||
gtk_box_pack_start (GTK_BOX (vbox), bar, FALSE, FALSE, 0);
|
||||
gtk_info_bar_set_message_type (GTK_INFO_BAR (bar), GTK_MESSAGE_OTHER);
|
||||
label = gtk_label_new ("This is an info bar with message type GTK_MESSAGE_OTHER");
|
||||
gtk_box_pack_start (GTK_BOX (gtk_info_bar_get_content_area (GTK_INFO_BAR (bar))), label, FALSE, FALSE, 0);
|
||||
|
||||
frame = gtk_frame_new ("Info bars");
|
||||
gtk_box_pack_start (GTK_BOX (vbox), frame, FALSE, FALSE, 8);
|
||||
|
||||
vbox2 = gtk_vbox_new (FALSE, 8);
|
||||
gtk_container_set_border_width (GTK_CONTAINER (vbox2), 8);
|
||||
gtk_container_add (GTK_CONTAINER (frame), vbox2);
|
||||
|
||||
/* Standard message dialog */
|
||||
label = gtk_label_new ("An example of different info bars");
|
||||
gtk_box_pack_start (GTK_BOX (vbox2), label, FALSE, FALSE, 0);
|
||||
}
|
||||
|
||||
if (!GTK_WIDGET_VISIBLE (window))
|
||||
{
|
||||
gtk_widget_show_all (window);
|
||||
}
|
||||
else
|
||||
{
|
||||
gtk_widget_destroy (window);
|
||||
window = NULL;
|
||||
}
|
||||
|
||||
return window;
|
||||
}
|
||||
@@ -43,11 +43,11 @@ activate_link (GtkWidget *label,
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
static GtkWidget *window = NULL;
|
||||
|
||||
GtkWidget *
|
||||
do_links (GtkWidget *do_widget)
|
||||
{
|
||||
static GtkWidget *window = NULL;
|
||||
GtkWidget *box;
|
||||
GtkWidget *label;
|
||||
|
||||
if (!window)
|
||||
@@ -55,10 +55,11 @@ do_links (GtkWidget *do_widget)
|
||||
window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
|
||||
gtk_window_set_screen (GTK_WINDOW (window),
|
||||
gtk_widget_get_screen (do_widget));
|
||||
gtk_window_set_title (GTK_WINDOW (window), "Links");
|
||||
gtk_container_set_border_width (GTK_CONTAINER (window), 12);
|
||||
g_signal_connect (window, "destroy",
|
||||
G_CALLBACK (gtk_widget_destroyed), &window);
|
||||
G_CALLBACK(gtk_widget_destroyed), &window);
|
||||
g_signal_connect (window, "delete-event",
|
||||
G_CALLBACK (gtk_true), NULL);
|
||||
|
||||
label = gtk_label_new ("Some <a href=\"http://en.wikipedia.org/wiki/Text\""
|
||||
"title=\"plain text\">text</a> may be marked up\n"
|
||||
|
||||
@@ -173,9 +173,9 @@ do_list_store (GtkWidget *do_widget)
|
||||
|
||||
g_signal_connect (window, "destroy",
|
||||
G_CALLBACK (gtk_widget_destroyed), &window);
|
||||
gtk_container_set_border_width (GTK_CONTAINER (window), 8);
|
||||
gtk_container_set_border_width (GTK_CONTAINER (window), GTK_SIZE_ONE_TWELFTH_EM (8));
|
||||
|
||||
vbox = gtk_vbox_new (FALSE, 8);
|
||||
vbox = gtk_vbox_new (FALSE, GTK_SIZE_ONE_TWELFTH_EM (8));
|
||||
gtk_container_add (GTK_CONTAINER (window), vbox);
|
||||
|
||||
label = gtk_label_new ("This is the bug list (note: not based on real data, it would be nice to have a nice ODBC interface to bugzilla or so, though).");
|
||||
@@ -206,7 +206,7 @@ do_list_store (GtkWidget *do_widget)
|
||||
add_columns (GTK_TREE_VIEW (treeview));
|
||||
|
||||
/* finish & show */
|
||||
gtk_window_set_default_size (GTK_WINDOW (window), 280, 250);
|
||||
gtk_window_set_default_size (GTK_WINDOW (window), GTK_SIZE_ONE_TWELFTH_EM (280), GTK_SIZE_ONE_TWELFTH_EM (250));
|
||||
}
|
||||
|
||||
if (!GTK_WIDGET_VISIBLE (window))
|
||||
|
||||
@@ -764,9 +764,9 @@ create_text (GtkTextBuffer **buffer,
|
||||
gtk_text_view_set_wrap_mode (GTK_TEXT_VIEW (text_view),
|
||||
GTK_WRAP_WORD);
|
||||
gtk_text_view_set_pixels_above_lines (GTK_TEXT_VIEW (text_view),
|
||||
2);
|
||||
GTK_SIZE_ONE_TWELFTH_EM (2));
|
||||
gtk_text_view_set_pixels_below_lines (GTK_TEXT_VIEW (text_view),
|
||||
2);
|
||||
GTK_SIZE_ONE_TWELFTH_EM (2));
|
||||
}
|
||||
|
||||
return scrolled_window;
|
||||
@@ -792,7 +792,7 @@ create_tree (void)
|
||||
|
||||
gtk_tree_selection_set_mode (GTK_TREE_SELECTION (selection),
|
||||
GTK_SELECTION_BROWSE);
|
||||
gtk_widget_set_size_request (tree_view, 200, -1);
|
||||
gtk_widget_set_size_request (tree_view, GTK_SIZE_ONE_TWELFTH_EM (200), -1);
|
||||
|
||||
/* this code only supports 1 level of children. If we
|
||||
* want more we probably have to use a recursing function.
|
||||
@@ -946,6 +946,7 @@ main (int argc, char **argv)
|
||||
}
|
||||
/* -- End of hack -- */
|
||||
|
||||
gtk_enable_resolution_independence ();
|
||||
gtk_init (&argc, &argv);
|
||||
|
||||
setup_default_icon ();
|
||||
@@ -969,7 +970,7 @@ main (int argc, char **argv)
|
||||
gtk_label_new_with_mnemonic ("_Info"));
|
||||
|
||||
tag = gtk_text_buffer_create_tag (info_buffer, "title",
|
||||
"font", "Sans 18",
|
||||
"scale", PANGO_SCALE_XX_LARGE,
|
||||
NULL);
|
||||
g_object_unref (info_buffer);
|
||||
|
||||
@@ -999,9 +1000,9 @@ main (int argc, char **argv)
|
||||
"weight", PANGO_WEIGHT_BOLD,
|
||||
"foreground", "DarkGoldenrod4",
|
||||
NULL);
|
||||
g_object_unref (source_buffer);
|
||||
g_object_unref (source_buffer);
|
||||
|
||||
gtk_window_set_default_size (GTK_WINDOW (window), 600, 400);
|
||||
gtk_window_set_default_size (GTK_WINDOW (window), GTK_SIZE_ONE_TWELFTH_EM (600), GTK_SIZE_ONE_TWELFTH_EM (400));
|
||||
gtk_widget_show_all (window);
|
||||
|
||||
|
||||
|
||||
@@ -2,10 +2,10 @@
|
||||
*
|
||||
* There are several widgets involved in displaying menus. The
|
||||
* GtkMenuBar widget is a menu bar, which normally appears horizontally
|
||||
* at the top of an application, but can also be layed out vertically.
|
||||
* The GtkMenu widget is the actual menu that pops up. Both GtkMenuBar
|
||||
* and GtkMenu are subclasses of GtkMenuShell; a GtkMenuShell contains
|
||||
* menu items (GtkMenuItem). Each menu item contains text and/or images
|
||||
* at the top of an application, but can also be layed out vertically.
|
||||
* The GtkMenu widget is the actual menu that pops up. Both GtkMenuBar
|
||||
* and GtkMenu are subclasses of GtkMenuShell; a GtkMenuShell contains
|
||||
* menu items (GtkMenuItem). Each menu item contains text and/or images
|
||||
* and can be selected by the user.
|
||||
*
|
||||
* There are several kinds of menu item, including plain GtkMenuItem,
|
||||
@@ -22,6 +22,7 @@
|
||||
* GtkUIManager provides a higher-level interface for creating menu bars
|
||||
* and menus; while you can construct menus manually, most people don't
|
||||
* do that. There's a separate demo for GtkUIManager.
|
||||
*
|
||||
*/
|
||||
|
||||
#include <gtk/gtk.h>
|
||||
@@ -117,35 +118,37 @@ change_orientation (GtkWidget *button,
|
||||
}
|
||||
}
|
||||
|
||||
static GtkWidget *window = NULL;
|
||||
|
||||
GtkWidget *
|
||||
do_menus (GtkWidget *do_widget)
|
||||
{
|
||||
static GtkWidget *window = NULL;
|
||||
GtkWidget *box;
|
||||
GtkWidget *box1;
|
||||
GtkWidget *box2;
|
||||
GtkWidget *button;
|
||||
|
||||
|
||||
if (!window)
|
||||
{
|
||||
GtkWidget *menubar;
|
||||
GtkWidget *menu;
|
||||
GtkWidget *menuitem;
|
||||
GtkAccelGroup *accel_group;
|
||||
|
||||
|
||||
window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
|
||||
gtk_window_set_screen (GTK_WINDOW (window),
|
||||
gtk_widget_get_screen (do_widget));
|
||||
gtk_window_set_title (GTK_WINDOW (window), "Menus");
|
||||
g_signal_connect (window, "destroy",
|
||||
G_CALLBACK(gtk_widget_destroyed), &window);
|
||||
|
||||
g_signal_connect (window, "delete-event",
|
||||
G_CALLBACK (gtk_true), NULL);
|
||||
|
||||
accel_group = gtk_accel_group_new ();
|
||||
gtk_window_add_accel_group (GTK_WINDOW (window), accel_group);
|
||||
|
||||
gtk_window_set_title (GTK_WINDOW (window), "menus");
|
||||
gtk_container_set_border_width (GTK_CONTAINER (window), 0);
|
||||
|
||||
|
||||
|
||||
box = gtk_hbox_new (FALSE, 0);
|
||||
gtk_container_add (GTK_CONTAINER (window), box);
|
||||
gtk_widget_show (box);
|
||||
@@ -153,18 +156,18 @@ do_menus (GtkWidget *do_widget)
|
||||
box1 = gtk_vbox_new (FALSE, 0);
|
||||
gtk_container_add (GTK_CONTAINER (box), box1);
|
||||
gtk_widget_show (box1);
|
||||
|
||||
|
||||
menubar = gtk_menu_bar_new ();
|
||||
gtk_box_pack_start (GTK_BOX (box1), menubar, FALSE, TRUE, 0);
|
||||
gtk_widget_show (menubar);
|
||||
|
||||
|
||||
menu = create_menu (2, TRUE);
|
||||
|
||||
|
||||
menuitem = gtk_menu_item_new_with_label ("test\nline2");
|
||||
gtk_menu_item_set_submenu (GTK_MENU_ITEM (menuitem), menu);
|
||||
gtk_menu_shell_append (GTK_MENU_SHELL (menubar), menuitem);
|
||||
gtk_widget_show (menuitem);
|
||||
|
||||
|
||||
menuitem = gtk_menu_item_new_with_label ("foo");
|
||||
gtk_menu_item_set_submenu (GTK_MENU_ITEM (menuitem), create_menu (3, TRUE));
|
||||
gtk_menu_shell_append (GTK_MENU_SHELL (menubar), menuitem);
|
||||
@@ -175,9 +178,9 @@ do_menus (GtkWidget *do_widget)
|
||||
gtk_menu_item_set_right_justified (GTK_MENU_ITEM (menuitem), TRUE);
|
||||
gtk_menu_shell_append (GTK_MENU_SHELL (menubar), menuitem);
|
||||
gtk_widget_show (menuitem);
|
||||
|
||||
box2 = gtk_vbox_new (FALSE, 10);
|
||||
gtk_container_set_border_width (GTK_CONTAINER (box2), 10);
|
||||
|
||||
box2 = gtk_vbox_new (FALSE, GTK_SIZE_ONE_TWELFTH_EM (10));
|
||||
gtk_container_set_border_width (GTK_CONTAINER (box2), GTK_SIZE_ONE_TWELFTH_EM (10));
|
||||
gtk_box_pack_start (GTK_BOX (box1), box2, FALSE, TRUE, 0);
|
||||
gtk_widget_show (box2);
|
||||
|
||||
|
||||
@@ -1,579 +0,0 @@
|
||||
/* Offscreen windows/Rotated button
|
||||
*
|
||||
* Offscreen windows can be used to transform parts of a widget
|
||||
* hierarchy. Note that the rotated button is fully functional.
|
||||
*/
|
||||
#include <math.h>
|
||||
#include <gtk/gtk.h>
|
||||
|
||||
#define GTK_TYPE_ROTATED_BIN (gtk_rotated_bin_get_type ())
|
||||
#define GTK_ROTATED_BIN(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GTK_TYPE_ROTATED_BIN, GtkRotatedBin))
|
||||
#define GTK_ROTATED_BIN_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GTK_TYPE_ROTATED_BIN, GtkRotatedBinClass))
|
||||
#define GTK_IS_ROTATED_BIN(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GTK_TYPE_ROTATED_BIN))
|
||||
#define GTK_IS_ROTATED_BIN_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GTK_TYPE_ROTATED_BIN))
|
||||
#define GTK_ROTATED_BIN_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GTK_TYPE_ROTATED_BIN, GtkRotatedBinClass))
|
||||
|
||||
typedef struct _GtkRotatedBin GtkRotatedBin;
|
||||
typedef struct _GtkRotatedBinClass GtkRotatedBinClass;
|
||||
|
||||
struct _GtkRotatedBin
|
||||
{
|
||||
GtkContainer container;
|
||||
|
||||
GtkWidget *child;
|
||||
GdkWindow *offscreen_window;
|
||||
gdouble angle;
|
||||
};
|
||||
|
||||
struct _GtkRotatedBinClass
|
||||
{
|
||||
GtkContainerClass parent_class;
|
||||
};
|
||||
|
||||
GType gtk_rotated_bin_get_type (void) G_GNUC_CONST;
|
||||
GtkWidget* gtk_rotated_bin_new (void);
|
||||
void gtk_rotated_bin_set_angle (GtkRotatedBin *bin,
|
||||
gdouble angle);
|
||||
|
||||
/*** implementation ***/
|
||||
|
||||
static void gtk_rotated_bin_realize (GtkWidget *widget);
|
||||
static void gtk_rotated_bin_unrealize (GtkWidget *widget);
|
||||
static void gtk_rotated_bin_size_request (GtkWidget *widget,
|
||||
GtkRequisition *requisition);
|
||||
static void gtk_rotated_bin_size_allocate (GtkWidget *widget,
|
||||
GtkAllocation *allocation);
|
||||
static gboolean gtk_rotated_bin_damage (GtkWidget *widget,
|
||||
GdkEventExpose *event);
|
||||
static gboolean gtk_rotated_bin_expose (GtkWidget *widget,
|
||||
GdkEventExpose *offscreen);
|
||||
|
||||
static void gtk_rotated_bin_add (GtkContainer *container,
|
||||
GtkWidget *child);
|
||||
static void gtk_rotated_bin_remove (GtkContainer *container,
|
||||
GtkWidget *widget);
|
||||
static void gtk_rotated_bin_forall (GtkContainer *container,
|
||||
gboolean include_internals,
|
||||
GtkCallback callback,
|
||||
gpointer callback_data);
|
||||
static GType gtk_rotated_bin_child_type (GtkContainer *container);
|
||||
|
||||
G_DEFINE_TYPE (GtkRotatedBin, gtk_rotated_bin, GTK_TYPE_CONTAINER);
|
||||
|
||||
static void
|
||||
to_child (GtkRotatedBin *bin,
|
||||
double widget_x,
|
||||
double widget_y,
|
||||
double *x_out,
|
||||
double *y_out)
|
||||
{
|
||||
GtkAllocation child_area;
|
||||
double x, y, xr, yr;
|
||||
double c, s;
|
||||
double w, h;
|
||||
|
||||
s = sin (bin->angle);
|
||||
c = cos (bin->angle);
|
||||
child_area = bin->child->allocation;
|
||||
|
||||
w = c * child_area.width + s * child_area.height;
|
||||
h = s * child_area.width + c * child_area.height;
|
||||
|
||||
x = widget_x;
|
||||
y = widget_y;
|
||||
|
||||
x -= (w - child_area.width) / 2;
|
||||
y -= (h - child_area.height) / 2;
|
||||
|
||||
x -= child_area.width / 2;
|
||||
y -= child_area.height / 2;
|
||||
|
||||
xr = x * c + y * s;
|
||||
yr = y * c - x * s;
|
||||
x = xr;
|
||||
y = yr;
|
||||
|
||||
x += child_area.width / 2;
|
||||
y += child_area.height / 2;
|
||||
|
||||
*x_out = x;
|
||||
*y_out = y;
|
||||
}
|
||||
|
||||
static void
|
||||
to_parent (GtkRotatedBin *bin,
|
||||
double offscreen_x,
|
||||
double offscreen_y,
|
||||
double *x_out,
|
||||
double *y_out)
|
||||
{
|
||||
GtkAllocation child_area;
|
||||
double x, y, xr, yr;
|
||||
double c, s;
|
||||
double w, h;
|
||||
|
||||
s = sin (bin->angle);
|
||||
c = cos (bin->angle);
|
||||
child_area = bin->child->allocation;
|
||||
|
||||
w = c * child_area.width + s * child_area.height;
|
||||
h = s * child_area.width + c * child_area.height;
|
||||
|
||||
x = offscreen_x;
|
||||
y = offscreen_y;
|
||||
|
||||
x -= child_area.width / 2;
|
||||
y -= child_area.height / 2;
|
||||
|
||||
xr = x * c - y * s;
|
||||
yr = x * s + y * c;
|
||||
x = xr;
|
||||
y = yr;
|
||||
|
||||
x += child_area.width / 2;
|
||||
y += child_area.height / 2;
|
||||
|
||||
x -= (w - child_area.width) / 2;
|
||||
y -= (h - child_area.height) / 2;
|
||||
|
||||
*x_out = x;
|
||||
*y_out = y;
|
||||
}
|
||||
|
||||
static void
|
||||
gtk_rotated_bin_class_init (GtkRotatedBinClass *klass)
|
||||
{
|
||||
GtkWidgetClass *widget_class = GTK_WIDGET_CLASS (klass);
|
||||
GtkContainerClass *container_class = GTK_CONTAINER_CLASS (klass);
|
||||
|
||||
widget_class->realize = gtk_rotated_bin_realize;
|
||||
widget_class->unrealize = gtk_rotated_bin_unrealize;
|
||||
widget_class->size_request = gtk_rotated_bin_size_request;
|
||||
widget_class->size_allocate = gtk_rotated_bin_size_allocate;
|
||||
widget_class->expose_event = gtk_rotated_bin_expose;
|
||||
|
||||
g_signal_override_class_closure (g_signal_lookup ("damage-event", GTK_TYPE_WIDGET),
|
||||
GTK_TYPE_ROTATED_BIN,
|
||||
g_cclosure_new (G_CALLBACK (gtk_rotated_bin_damage),
|
||||
NULL, NULL));
|
||||
|
||||
container_class->add = gtk_rotated_bin_add;
|
||||
container_class->remove = gtk_rotated_bin_remove;
|
||||
container_class->forall = gtk_rotated_bin_forall;
|
||||
container_class->child_type = gtk_rotated_bin_child_type;
|
||||
}
|
||||
|
||||
static void
|
||||
gtk_rotated_bin_init (GtkRotatedBin *bin)
|
||||
{
|
||||
GTK_WIDGET_UNSET_FLAGS (bin, GTK_NO_WINDOW);
|
||||
}
|
||||
|
||||
GtkWidget *
|
||||
gtk_rotated_bin_new (void)
|
||||
{
|
||||
return g_object_new (GTK_TYPE_ROTATED_BIN, NULL);
|
||||
}
|
||||
|
||||
static GdkWindow *
|
||||
pick_offscreen_child (GdkWindow *offscreen_window,
|
||||
double widget_x,
|
||||
double widget_y,
|
||||
GtkRotatedBin *bin)
|
||||
{
|
||||
GtkAllocation child_area;
|
||||
double x, y;
|
||||
|
||||
if (bin->child && GTK_WIDGET_VISIBLE (bin->child))
|
||||
{
|
||||
to_child (bin, widget_x, widget_y, &x, &y);
|
||||
|
||||
child_area = bin->child->allocation;
|
||||
|
||||
if (x >= 0 && x < child_area.width &&
|
||||
y >= 0 && y < child_area.height)
|
||||
return bin->offscreen_window;
|
||||
}
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
static void
|
||||
offscreen_window_to_parent (GdkWindow *offscreen_window,
|
||||
double offscreen_x,
|
||||
double offscreen_y,
|
||||
double *parent_x,
|
||||
double *parent_y,
|
||||
GtkRotatedBin *bin)
|
||||
{
|
||||
to_parent (bin, offscreen_x, offscreen_y, parent_x, parent_y);
|
||||
}
|
||||
|
||||
static void
|
||||
offscreen_window_from_parent (GdkWindow *window,
|
||||
double parent_x,
|
||||
double parent_y,
|
||||
double *offscreen_x,
|
||||
double *offscreen_y,
|
||||
GtkRotatedBin *bin)
|
||||
{
|
||||
to_child (bin, parent_x, parent_y, offscreen_x, offscreen_y);
|
||||
}
|
||||
|
||||
static void
|
||||
gtk_rotated_bin_realize (GtkWidget *widget)
|
||||
{
|
||||
GtkRotatedBin *bin = GTK_ROTATED_BIN (widget);
|
||||
GdkWindowAttr attributes;
|
||||
gint attributes_mask;
|
||||
gint border_width;
|
||||
GtkRequisition child_requisition;
|
||||
|
||||
GTK_WIDGET_SET_FLAGS (widget, GTK_REALIZED);
|
||||
|
||||
border_width = GTK_CONTAINER (widget)->border_width;
|
||||
|
||||
attributes.x = widget->allocation.x + border_width;
|
||||
attributes.y = widget->allocation.y + border_width;
|
||||
attributes.width = widget->allocation.width - 2 * border_width;
|
||||
attributes.height = widget->allocation.height - 2 * border_width;
|
||||
attributes.window_type = GDK_WINDOW_CHILD;
|
||||
attributes.event_mask = gtk_widget_get_events (widget)
|
||||
| GDK_EXPOSURE_MASK
|
||||
| GDK_POINTER_MOTION_MASK
|
||||
| GDK_BUTTON_PRESS_MASK
|
||||
| GDK_BUTTON_RELEASE_MASK
|
||||
| GDK_SCROLL_MASK
|
||||
| GDK_ENTER_NOTIFY_MASK
|
||||
| GDK_LEAVE_NOTIFY_MASK;
|
||||
|
||||
attributes.visual = gtk_widget_get_visual (widget);
|
||||
attributes.colormap = gtk_widget_get_colormap (widget);
|
||||
attributes.wclass = GDK_INPUT_OUTPUT;
|
||||
|
||||
attributes_mask = GDK_WA_X | GDK_WA_Y | GDK_WA_VISUAL | GDK_WA_COLORMAP;
|
||||
|
||||
widget->window = gdk_window_new (gtk_widget_get_parent_window (widget),
|
||||
&attributes, attributes_mask);
|
||||
gdk_window_set_user_data (widget->window, widget);
|
||||
g_signal_connect (widget->window, "pick-embedded-child",
|
||||
G_CALLBACK (pick_offscreen_child), bin);
|
||||
|
||||
attributes.window_type = GDK_WINDOW_OFFSCREEN;
|
||||
|
||||
child_requisition.width = child_requisition.height = 0;
|
||||
if (bin->child && GTK_WIDGET_VISIBLE (bin->child))
|
||||
{
|
||||
attributes.width = bin->child->allocation.width;
|
||||
attributes.height = bin->child->allocation.height;
|
||||
}
|
||||
bin->offscreen_window = gdk_window_new (gtk_widget_get_root_window (widget),
|
||||
&attributes, attributes_mask);
|
||||
gdk_window_set_user_data (bin->offscreen_window, widget);
|
||||
if (bin->child)
|
||||
gtk_widget_set_parent_window (bin->child, bin->offscreen_window);
|
||||
gdk_offscreen_window_set_embedder (bin->offscreen_window, widget->window);
|
||||
g_signal_connect (bin->offscreen_window, "to-embedder",
|
||||
G_CALLBACK (offscreen_window_to_parent), bin);
|
||||
g_signal_connect (bin->offscreen_window, "from-embedder",
|
||||
G_CALLBACK (offscreen_window_from_parent), bin);
|
||||
|
||||
widget->style = gtk_style_attach (widget->style, widget->window);
|
||||
|
||||
gtk_style_set_background (widget->style, widget->window, GTK_STATE_NORMAL);
|
||||
gtk_style_set_background (widget->style, bin->offscreen_window, GTK_STATE_NORMAL);
|
||||
gdk_window_show (bin->offscreen_window);
|
||||
}
|
||||
|
||||
static void
|
||||
gtk_rotated_bin_unrealize (GtkWidget *widget)
|
||||
{
|
||||
GtkRotatedBin *bin = GTK_ROTATED_BIN (widget);
|
||||
|
||||
gdk_window_set_user_data (bin->offscreen_window, NULL);
|
||||
gdk_window_destroy (bin->offscreen_window);
|
||||
bin->offscreen_window = NULL;
|
||||
|
||||
GTK_WIDGET_CLASS (gtk_rotated_bin_parent_class)->unrealize (widget);
|
||||
}
|
||||
|
||||
static GType
|
||||
gtk_rotated_bin_child_type (GtkContainer *container)
|
||||
{
|
||||
GtkRotatedBin *bin = GTK_ROTATED_BIN (container);
|
||||
|
||||
if (bin->child)
|
||||
return G_TYPE_NONE;
|
||||
|
||||
return GTK_TYPE_WIDGET;
|
||||
}
|
||||
|
||||
static void
|
||||
gtk_rotated_bin_add (GtkContainer *container,
|
||||
GtkWidget *widget)
|
||||
{
|
||||
GtkRotatedBin *bin = GTK_ROTATED_BIN (container);
|
||||
|
||||
if (!bin->child)
|
||||
{
|
||||
gtk_widget_set_parent_window (widget, bin->offscreen_window);
|
||||
gtk_widget_set_parent (widget, GTK_WIDGET (bin));
|
||||
bin->child = widget;
|
||||
}
|
||||
else
|
||||
g_warning ("GtkRotatedBin cannot have more than one child\n");
|
||||
}
|
||||
|
||||
static void
|
||||
gtk_rotated_bin_remove (GtkContainer *container,
|
||||
GtkWidget *widget)
|
||||
{
|
||||
GtkRotatedBin *bin = GTK_ROTATED_BIN (container);
|
||||
gboolean was_visible;
|
||||
|
||||
was_visible = GTK_WIDGET_VISIBLE (widget);
|
||||
|
||||
if (bin->child == widget)
|
||||
{
|
||||
gtk_widget_unparent (widget);
|
||||
|
||||
bin->child = NULL;
|
||||
|
||||
if (was_visible && GTK_WIDGET_VISIBLE (container))
|
||||
gtk_widget_queue_resize (GTK_WIDGET (container));
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
gtk_rotated_bin_forall (GtkContainer *container,
|
||||
gboolean include_internals,
|
||||
GtkCallback callback,
|
||||
gpointer callback_data)
|
||||
{
|
||||
GtkRotatedBin *bin = GTK_ROTATED_BIN (container);
|
||||
|
||||
g_return_if_fail (callback != NULL);
|
||||
|
||||
if (bin->child)
|
||||
(*callback) (bin->child, callback_data);
|
||||
}
|
||||
|
||||
void
|
||||
gtk_rotated_bin_set_angle (GtkRotatedBin *bin,
|
||||
gdouble angle)
|
||||
{
|
||||
g_return_if_fail (GTK_IS_ROTATED_BIN (bin));
|
||||
|
||||
bin->angle = angle;
|
||||
gtk_widget_queue_resize (GTK_WIDGET (bin));
|
||||
|
||||
gdk_window_geometry_changed (bin->offscreen_window);
|
||||
}
|
||||
|
||||
static void
|
||||
gtk_rotated_bin_size_request (GtkWidget *widget,
|
||||
GtkRequisition *requisition)
|
||||
{
|
||||
GtkRotatedBin *bin = GTK_ROTATED_BIN (widget);
|
||||
GtkRequisition child_requisition;
|
||||
double s, c;
|
||||
double w, h;
|
||||
|
||||
child_requisition.width = 0;
|
||||
child_requisition.height = 0;
|
||||
|
||||
if (bin->child && GTK_WIDGET_VISIBLE (bin->child))
|
||||
gtk_widget_size_request (bin->child, &child_requisition);
|
||||
|
||||
s = sin (bin->angle);
|
||||
c = cos (bin->angle);
|
||||
w = c * child_requisition.width + s * child_requisition.height;
|
||||
h = s * child_requisition.width + c * child_requisition.height;
|
||||
|
||||
requisition->width = GTK_CONTAINER (widget)->border_width * 2 + w;
|
||||
requisition->height = GTK_CONTAINER (widget)->border_width * 2 + h;
|
||||
}
|
||||
|
||||
static void
|
||||
gtk_rotated_bin_size_allocate (GtkWidget *widget,
|
||||
GtkAllocation *allocation)
|
||||
{
|
||||
GtkRotatedBin *bin = GTK_ROTATED_BIN (widget);
|
||||
gint border_width;
|
||||
gint w, h;
|
||||
gdouble s, c;
|
||||
|
||||
widget->allocation = *allocation;
|
||||
|
||||
border_width = GTK_CONTAINER (widget)->border_width;
|
||||
|
||||
w = allocation->width - border_width * 2;
|
||||
h = allocation->height - border_width * 2;
|
||||
|
||||
if (GTK_WIDGET_REALIZED (widget))
|
||||
gdk_window_move_resize (widget->window,
|
||||
allocation->x + border_width,
|
||||
allocation->y + border_width,
|
||||
w, h);
|
||||
|
||||
if (bin->child && GTK_WIDGET_VISIBLE (bin->child))
|
||||
{
|
||||
GtkRequisition child_requisition;
|
||||
GtkAllocation child_allocation;
|
||||
|
||||
s = sin (bin->angle);
|
||||
c = cos (bin->angle);
|
||||
|
||||
gtk_widget_get_child_requisition (bin->child, &child_requisition);
|
||||
child_allocation.x = 0;
|
||||
child_allocation.y = 0;
|
||||
child_allocation.height = child_requisition.height;
|
||||
if (c == 0.0)
|
||||
child_allocation.width = h / s;
|
||||
else if (s == 0.0)
|
||||
child_allocation.width = w / c;
|
||||
else
|
||||
child_allocation.width = MIN ((w - s * child_allocation.height) / c,
|
||||
(h - c * child_allocation.height) / s);
|
||||
|
||||
if (GTK_WIDGET_REALIZED (widget))
|
||||
gdk_window_move_resize (bin->offscreen_window,
|
||||
child_allocation.x,
|
||||
child_allocation.y,
|
||||
child_allocation.width,
|
||||
child_allocation.height);
|
||||
|
||||
child_allocation.x = child_allocation.y = 0;
|
||||
gtk_widget_size_allocate (bin->child, &child_allocation);
|
||||
}
|
||||
}
|
||||
|
||||
static gboolean
|
||||
gtk_rotated_bin_damage (GtkWidget *widget,
|
||||
GdkEventExpose *event)
|
||||
{
|
||||
gdk_window_invalidate_rect (widget->window, NULL, FALSE);
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
static gboolean
|
||||
gtk_rotated_bin_expose (GtkWidget *widget,
|
||||
GdkEventExpose *event)
|
||||
{
|
||||
GtkRotatedBin *bin = GTK_ROTATED_BIN (widget);
|
||||
gint width, height;
|
||||
gdouble s, c;
|
||||
gdouble w, h;
|
||||
|
||||
if (GTK_WIDGET_DRAWABLE (widget))
|
||||
{
|
||||
if (event->window == widget->window)
|
||||
{
|
||||
GdkPixmap *pixmap;
|
||||
GtkAllocation child_area;
|
||||
cairo_t *cr;
|
||||
|
||||
if (bin->child && GTK_WIDGET_VISIBLE (bin->child))
|
||||
{
|
||||
pixmap = gdk_offscreen_window_get_pixmap (bin->offscreen_window);
|
||||
child_area = bin->child->allocation;
|
||||
|
||||
cr = gdk_cairo_create (widget->window);
|
||||
|
||||
/* transform */
|
||||
s = sin (bin->angle);
|
||||
c = cos (bin->angle);
|
||||
w = c * child_area.width + s * child_area.height;
|
||||
h = s * child_area.width + c * child_area.height;
|
||||
|
||||
cairo_translate (cr, (w - child_area.width) / 2, (h - child_area.height) / 2);
|
||||
cairo_translate (cr, child_area.width / 2, child_area.height / 2);
|
||||
cairo_rotate (cr, bin->angle);
|
||||
cairo_translate (cr, -child_area.width / 2, -child_area.height / 2);
|
||||
|
||||
/* clip */
|
||||
gdk_drawable_get_size (pixmap, &width, &height);
|
||||
cairo_rectangle (cr, 0, 0, width, height);
|
||||
cairo_clip (cr);
|
||||
/* paint */
|
||||
gdk_cairo_set_source_pixmap (cr, pixmap, 0, 0);
|
||||
cairo_paint (cr);
|
||||
|
||||
cairo_destroy (cr);
|
||||
}
|
||||
}
|
||||
else if (event->window == bin->offscreen_window)
|
||||
{
|
||||
gtk_paint_flat_box (widget->style, event->window,
|
||||
GTK_STATE_NORMAL, GTK_SHADOW_NONE,
|
||||
&event->area, widget, "blah",
|
||||
0, 0, -1, -1);
|
||||
|
||||
if (bin->child)
|
||||
gtk_container_propagate_expose (GTK_CONTAINER (widget),
|
||||
bin->child,
|
||||
event);
|
||||
}
|
||||
}
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
/*** ***/
|
||||
|
||||
static void
|
||||
scale_changed (GtkRange *range,
|
||||
GtkRotatedBin *bin)
|
||||
{
|
||||
gtk_rotated_bin_set_angle (bin, gtk_range_get_value (range));
|
||||
}
|
||||
|
||||
static GtkWidget *window = NULL;
|
||||
|
||||
GtkWidget *
|
||||
do_offscreen_window (GtkWidget *do_widget)
|
||||
{
|
||||
if (!window)
|
||||
{
|
||||
GtkWidget *bin, *vbox, *scale, *button;
|
||||
GdkColor black;
|
||||
|
||||
window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
|
||||
gtk_window_set_screen (GTK_WINDOW (window),
|
||||
gtk_widget_get_screen (do_widget));
|
||||
gtk_window_set_title (GTK_WINDOW (window), "Rotated widget");
|
||||
|
||||
g_signal_connect (window, "destroy",
|
||||
G_CALLBACK (gtk_widget_destroyed), &window);
|
||||
|
||||
gdk_color_parse ("black", &black);
|
||||
gtk_widget_modify_bg (window, GTK_STATE_NORMAL, &black);
|
||||
gtk_container_set_border_width (GTK_CONTAINER (window), 10);
|
||||
|
||||
vbox = gtk_vbox_new (0, FALSE);
|
||||
scale = gtk_hscale_new_with_range (0, G_PI/2, 0.01);
|
||||
gtk_scale_set_draw_value (GTK_SCALE (scale), FALSE);
|
||||
|
||||
button = gtk_button_new_with_label ("A Button");
|
||||
bin = gtk_rotated_bin_new ();
|
||||
|
||||
g_signal_connect (scale, "value-changed", G_CALLBACK (scale_changed), bin);
|
||||
|
||||
gtk_container_add (GTK_CONTAINER (window), vbox);
|
||||
gtk_box_pack_start (GTK_BOX (vbox), scale, FALSE, FALSE, 0);
|
||||
gtk_box_pack_start (GTK_BOX (vbox), bin, TRUE, TRUE, 0);
|
||||
gtk_container_add (GTK_CONTAINER (bin), button);
|
||||
}
|
||||
|
||||
if (!GTK_WIDGET_VISIBLE (window))
|
||||
gtk_widget_show_all (window);
|
||||
else
|
||||
{
|
||||
gtk_widget_destroy (window);
|
||||
window = NULL;
|
||||
}
|
||||
|
||||
return window;
|
||||
}
|
||||
|
||||
@@ -1,500 +0,0 @@
|
||||
/* Offscreen windows/Effects
|
||||
*
|
||||
* Offscreen windows can be used to render elements multiple times to achieve
|
||||
* various effects.
|
||||
*/
|
||||
#include <gtk/gtk.h>
|
||||
|
||||
#define GTK_TYPE_MIRROR_BIN (gtk_mirror_bin_get_type ())
|
||||
#define GTK_MIRROR_BIN(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GTK_TYPE_MIRROR_BIN, GtkMirrorBin))
|
||||
#define GTK_MIRROR_BIN_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GTK_TYPE_MIRROR_BIN, GtkMirrorBinClass))
|
||||
#define GTK_IS_MIRROR_BIN(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GTK_TYPE_MIRROR_BIN))
|
||||
#define GTK_IS_MIRROR_BIN_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GTK_TYPE_MIRROR_BIN))
|
||||
#define GTK_MIRROR_BIN_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GTK_TYPE_MIRROR_BIN, GtkMirrorBinClass))
|
||||
|
||||
typedef struct _GtkMirrorBin GtkMirrorBin;
|
||||
typedef struct _GtkMirrorBinClass GtkMirrorBinClass;
|
||||
|
||||
struct _GtkMirrorBin
|
||||
{
|
||||
GtkContainer container;
|
||||
|
||||
GtkWidget *child;
|
||||
GdkWindow *offscreen_window;
|
||||
};
|
||||
|
||||
struct _GtkMirrorBinClass
|
||||
{
|
||||
GtkContainerClass parent_class;
|
||||
};
|
||||
|
||||
GType gtk_mirror_bin_get_type (void) G_GNUC_CONST;
|
||||
GtkWidget* gtk_mirror_bin_new (void);
|
||||
|
||||
/*** implementation ***/
|
||||
|
||||
static void gtk_mirror_bin_realize (GtkWidget *widget);
|
||||
static void gtk_mirror_bin_unrealize (GtkWidget *widget);
|
||||
static void gtk_mirror_bin_size_request (GtkWidget *widget,
|
||||
GtkRequisition *requisition);
|
||||
static void gtk_mirror_bin_size_allocate (GtkWidget *widget,
|
||||
GtkAllocation *allocation);
|
||||
static gboolean gtk_mirror_bin_damage (GtkWidget *widget,
|
||||
GdkEventExpose *event);
|
||||
static gboolean gtk_mirror_bin_expose (GtkWidget *widget,
|
||||
GdkEventExpose *offscreen);
|
||||
|
||||
static void gtk_mirror_bin_add (GtkContainer *container,
|
||||
GtkWidget *child);
|
||||
static void gtk_mirror_bin_remove (GtkContainer *container,
|
||||
GtkWidget *widget);
|
||||
static void gtk_mirror_bin_forall (GtkContainer *container,
|
||||
gboolean include_internals,
|
||||
GtkCallback callback,
|
||||
gpointer callback_data);
|
||||
static GType gtk_mirror_bin_child_type (GtkContainer *container);
|
||||
|
||||
G_DEFINE_TYPE (GtkMirrorBin, gtk_mirror_bin, GTK_TYPE_CONTAINER);
|
||||
|
||||
static void
|
||||
to_child (GtkMirrorBin *bin,
|
||||
double widget_x,
|
||||
double widget_y,
|
||||
double *x_out,
|
||||
double *y_out)
|
||||
{
|
||||
*x_out = widget_x;
|
||||
*y_out = widget_y;
|
||||
}
|
||||
|
||||
static void
|
||||
to_parent (GtkMirrorBin *bin,
|
||||
double offscreen_x,
|
||||
double offscreen_y,
|
||||
double *x_out,
|
||||
double *y_out)
|
||||
{
|
||||
*x_out = offscreen_x;
|
||||
*y_out = offscreen_y;
|
||||
}
|
||||
|
||||
static void
|
||||
gtk_mirror_bin_class_init (GtkMirrorBinClass *klass)
|
||||
{
|
||||
GtkWidgetClass *widget_class = GTK_WIDGET_CLASS (klass);
|
||||
GtkContainerClass *container_class = GTK_CONTAINER_CLASS (klass);
|
||||
|
||||
widget_class->realize = gtk_mirror_bin_realize;
|
||||
widget_class->unrealize = gtk_mirror_bin_unrealize;
|
||||
widget_class->size_request = gtk_mirror_bin_size_request;
|
||||
widget_class->size_allocate = gtk_mirror_bin_size_allocate;
|
||||
widget_class->expose_event = gtk_mirror_bin_expose;
|
||||
|
||||
g_signal_override_class_closure (g_signal_lookup ("damage-event", GTK_TYPE_WIDGET),
|
||||
GTK_TYPE_MIRROR_BIN,
|
||||
g_cclosure_new (G_CALLBACK (gtk_mirror_bin_damage),
|
||||
NULL, NULL));
|
||||
|
||||
container_class->add = gtk_mirror_bin_add;
|
||||
container_class->remove = gtk_mirror_bin_remove;
|
||||
container_class->forall = gtk_mirror_bin_forall;
|
||||
container_class->child_type = gtk_mirror_bin_child_type;
|
||||
}
|
||||
|
||||
static void
|
||||
gtk_mirror_bin_init (GtkMirrorBin *bin)
|
||||
{
|
||||
GTK_WIDGET_UNSET_FLAGS (bin, GTK_NO_WINDOW);
|
||||
}
|
||||
|
||||
GtkWidget *
|
||||
gtk_mirror_bin_new (void)
|
||||
{
|
||||
return g_object_new (GTK_TYPE_MIRROR_BIN, NULL);
|
||||
}
|
||||
|
||||
static GdkWindow *
|
||||
pick_offscreen_child (GdkWindow *offscreen_window,
|
||||
double widget_x,
|
||||
double widget_y,
|
||||
GtkMirrorBin *bin)
|
||||
{
|
||||
GtkAllocation child_area;
|
||||
double x, y;
|
||||
|
||||
if (bin->child && GTK_WIDGET_VISIBLE (bin->child))
|
||||
{
|
||||
to_child (bin, widget_x, widget_y, &x, &y);
|
||||
|
||||
child_area = bin->child->allocation;
|
||||
|
||||
if (x >= 0 && x < child_area.width &&
|
||||
y >= 0 && y < child_area.height)
|
||||
return bin->offscreen_window;
|
||||
}
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
static void
|
||||
offscreen_window_to_parent (GdkWindow *offscreen_window,
|
||||
double offscreen_x,
|
||||
double offscreen_y,
|
||||
double *parent_x,
|
||||
double *parent_y,
|
||||
GtkMirrorBin *bin)
|
||||
{
|
||||
to_parent (bin, offscreen_x, offscreen_y, parent_x, parent_y);
|
||||
}
|
||||
|
||||
static void
|
||||
offscreen_window_from_parent (GdkWindow *window,
|
||||
double parent_x,
|
||||
double parent_y,
|
||||
double *offscreen_x,
|
||||
double *offscreen_y,
|
||||
GtkMirrorBin *bin)
|
||||
{
|
||||
to_child (bin, parent_x, parent_y, offscreen_x, offscreen_y);
|
||||
}
|
||||
|
||||
static void
|
||||
gtk_mirror_bin_realize (GtkWidget *widget)
|
||||
{
|
||||
GtkMirrorBin *bin = GTK_MIRROR_BIN (widget);
|
||||
GdkWindowAttr attributes;
|
||||
gint attributes_mask;
|
||||
gint border_width;
|
||||
GtkRequisition child_requisition;
|
||||
|
||||
GTK_WIDGET_SET_FLAGS (widget, GTK_REALIZED);
|
||||
|
||||
border_width = GTK_CONTAINER (widget)->border_width;
|
||||
|
||||
attributes.x = widget->allocation.x + border_width;
|
||||
attributes.y = widget->allocation.y + border_width;
|
||||
attributes.width = widget->allocation.width - 2 * border_width;
|
||||
attributes.height = widget->allocation.height - 2 * border_width;
|
||||
attributes.window_type = GDK_WINDOW_CHILD;
|
||||
attributes.event_mask = gtk_widget_get_events (widget)
|
||||
| GDK_EXPOSURE_MASK
|
||||
| GDK_POINTER_MOTION_MASK
|
||||
| GDK_BUTTON_PRESS_MASK
|
||||
| GDK_BUTTON_RELEASE_MASK
|
||||
| GDK_SCROLL_MASK
|
||||
| GDK_ENTER_NOTIFY_MASK
|
||||
| GDK_LEAVE_NOTIFY_MASK;
|
||||
|
||||
attributes.visual = gtk_widget_get_visual (widget);
|
||||
attributes.colormap = gtk_widget_get_colormap (widget);
|
||||
attributes.wclass = GDK_INPUT_OUTPUT;
|
||||
|
||||
attributes_mask = GDK_WA_X | GDK_WA_Y | GDK_WA_VISUAL | GDK_WA_COLORMAP;
|
||||
|
||||
widget->window = gdk_window_new (gtk_widget_get_parent_window (widget),
|
||||
&attributes, attributes_mask);
|
||||
gdk_window_set_user_data (widget->window, widget);
|
||||
g_signal_connect (widget->window, "pick-embedded-child",
|
||||
G_CALLBACK (pick_offscreen_child), bin);
|
||||
|
||||
attributes.window_type = GDK_WINDOW_OFFSCREEN;
|
||||
|
||||
child_requisition.width = child_requisition.height = 0;
|
||||
if (bin->child && GTK_WIDGET_VISIBLE (bin->child))
|
||||
{
|
||||
attributes.width = bin->child->allocation.width;
|
||||
attributes.height = bin->child->allocation.height;
|
||||
}
|
||||
bin->offscreen_window = gdk_window_new (gtk_widget_get_root_window (widget),
|
||||
&attributes, attributes_mask);
|
||||
gdk_window_set_user_data (bin->offscreen_window, widget);
|
||||
if (bin->child)
|
||||
gtk_widget_set_parent_window (bin->child, bin->offscreen_window);
|
||||
gdk_offscreen_window_set_embedder (bin->offscreen_window, widget->window);
|
||||
g_signal_connect (bin->offscreen_window, "to-embedder",
|
||||
G_CALLBACK (offscreen_window_to_parent), bin);
|
||||
g_signal_connect (bin->offscreen_window, "from-embedder",
|
||||
G_CALLBACK (offscreen_window_from_parent), bin);
|
||||
|
||||
widget->style = gtk_style_attach (widget->style, widget->window);
|
||||
|
||||
gtk_style_set_background (widget->style, widget->window, GTK_STATE_NORMAL);
|
||||
gtk_style_set_background (widget->style, bin->offscreen_window, GTK_STATE_NORMAL);
|
||||
gdk_window_show (bin->offscreen_window);
|
||||
}
|
||||
|
||||
static void
|
||||
gtk_mirror_bin_unrealize (GtkWidget *widget)
|
||||
{
|
||||
GtkMirrorBin *bin = GTK_MIRROR_BIN (widget);
|
||||
|
||||
gdk_window_set_user_data (bin->offscreen_window, NULL);
|
||||
gdk_window_destroy (bin->offscreen_window);
|
||||
bin->offscreen_window = NULL;
|
||||
|
||||
GTK_WIDGET_CLASS (gtk_mirror_bin_parent_class)->unrealize (widget);
|
||||
}
|
||||
|
||||
static GType
|
||||
gtk_mirror_bin_child_type (GtkContainer *container)
|
||||
{
|
||||
GtkMirrorBin *bin = GTK_MIRROR_BIN (container);
|
||||
|
||||
if (bin->child)
|
||||
return G_TYPE_NONE;
|
||||
|
||||
return GTK_TYPE_WIDGET;
|
||||
}
|
||||
|
||||
static void
|
||||
gtk_mirror_bin_add (GtkContainer *container,
|
||||
GtkWidget *widget)
|
||||
{
|
||||
GtkMirrorBin *bin = GTK_MIRROR_BIN (container);
|
||||
|
||||
if (!bin->child)
|
||||
{
|
||||
gtk_widget_set_parent_window (widget, bin->offscreen_window);
|
||||
gtk_widget_set_parent (widget, GTK_WIDGET (bin));
|
||||
bin->child = widget;
|
||||
}
|
||||
else
|
||||
g_warning ("GtkMirrorBin cannot have more than one child\n");
|
||||
}
|
||||
|
||||
static void
|
||||
gtk_mirror_bin_remove (GtkContainer *container,
|
||||
GtkWidget *widget)
|
||||
{
|
||||
GtkMirrorBin *bin = GTK_MIRROR_BIN (container);
|
||||
gboolean was_visible;
|
||||
|
||||
was_visible = GTK_WIDGET_VISIBLE (widget);
|
||||
|
||||
if (bin->child == widget)
|
||||
{
|
||||
gtk_widget_unparent (widget);
|
||||
|
||||
bin->child = NULL;
|
||||
|
||||
if (was_visible && GTK_WIDGET_VISIBLE (container))
|
||||
gtk_widget_queue_resize (GTK_WIDGET (container));
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
gtk_mirror_bin_forall (GtkContainer *container,
|
||||
gboolean include_internals,
|
||||
GtkCallback callback,
|
||||
gpointer callback_data)
|
||||
{
|
||||
GtkMirrorBin *bin = GTK_MIRROR_BIN (container);
|
||||
|
||||
g_return_if_fail (callback != NULL);
|
||||
|
||||
if (bin->child)
|
||||
(*callback) (bin->child, callback_data);
|
||||
}
|
||||
|
||||
static void
|
||||
gtk_mirror_bin_size_request (GtkWidget *widget,
|
||||
GtkRequisition *requisition)
|
||||
{
|
||||
GtkMirrorBin *bin = GTK_MIRROR_BIN (widget);
|
||||
GtkRequisition child_requisition;
|
||||
|
||||
child_requisition.width = 0;
|
||||
child_requisition.height = 0;
|
||||
|
||||
if (bin->child && GTK_WIDGET_VISIBLE (bin->child))
|
||||
gtk_widget_size_request (bin->child, &child_requisition);
|
||||
|
||||
requisition->width = GTK_CONTAINER (widget)->border_width * 2 + child_requisition.width + 10;
|
||||
requisition->height = GTK_CONTAINER (widget)->border_width * 2 + child_requisition.height * 2 + 10;
|
||||
}
|
||||
|
||||
static void
|
||||
gtk_mirror_bin_size_allocate (GtkWidget *widget,
|
||||
GtkAllocation *allocation)
|
||||
{
|
||||
GtkMirrorBin *bin = GTK_MIRROR_BIN (widget);
|
||||
gint border_width;
|
||||
gint w, h;
|
||||
widget->allocation = *allocation;
|
||||
|
||||
border_width = GTK_CONTAINER (widget)->border_width;
|
||||
|
||||
w = allocation->width - border_width * 2;
|
||||
h = allocation->height - border_width * 2;
|
||||
|
||||
if (GTK_WIDGET_REALIZED (widget))
|
||||
gdk_window_move_resize (widget->window,
|
||||
allocation->x + border_width,
|
||||
allocation->y + border_width,
|
||||
w, h);
|
||||
|
||||
if (bin->child && GTK_WIDGET_VISIBLE (bin->child))
|
||||
{
|
||||
GtkRequisition child_requisition;
|
||||
GtkAllocation child_allocation;
|
||||
|
||||
gtk_widget_get_child_requisition (bin->child, &child_requisition);
|
||||
child_allocation.x = 0;
|
||||
child_allocation.y = 0;
|
||||
child_allocation.height = child_requisition.height;
|
||||
child_allocation.width = child_requisition.width;
|
||||
|
||||
if (GTK_WIDGET_REALIZED (widget))
|
||||
gdk_window_move_resize (bin->offscreen_window,
|
||||
allocation->x + border_width,
|
||||
allocation->y + border_width,
|
||||
child_allocation.width, child_allocation.height);
|
||||
gtk_widget_size_allocate (bin->child, &child_allocation);
|
||||
}
|
||||
}
|
||||
|
||||
static gboolean
|
||||
gtk_mirror_bin_damage (GtkWidget *widget,
|
||||
GdkEventExpose *event)
|
||||
{
|
||||
gdk_window_invalidate_rect (widget->window, NULL, FALSE);
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
static gboolean
|
||||
gtk_mirror_bin_expose (GtkWidget *widget,
|
||||
GdkEventExpose *event)
|
||||
{
|
||||
GtkMirrorBin *bin = GTK_MIRROR_BIN (widget);
|
||||
gint width, height;
|
||||
|
||||
if (GTK_WIDGET_DRAWABLE (widget))
|
||||
{
|
||||
if (event->window == widget->window)
|
||||
{
|
||||
GdkPixmap *pixmap;
|
||||
cairo_t *cr;
|
||||
cairo_matrix_t matrix;
|
||||
cairo_pattern_t *mask;
|
||||
|
||||
if (bin->child && GTK_WIDGET_VISIBLE (bin->child))
|
||||
{
|
||||
pixmap = gdk_offscreen_window_get_pixmap (bin->offscreen_window);
|
||||
gdk_drawable_get_size (pixmap, &width, &height);
|
||||
|
||||
cr = gdk_cairo_create (widget->window);
|
||||
|
||||
cairo_save (cr);
|
||||
|
||||
cairo_rectangle (cr, 0, 0, width, height);
|
||||
cairo_clip (cr);
|
||||
|
||||
/* paint the offscreen child */
|
||||
gdk_cairo_set_source_pixmap (cr, pixmap, 0, 0);
|
||||
cairo_paint (cr);
|
||||
|
||||
cairo_restore (cr);
|
||||
|
||||
cairo_matrix_init (&matrix, 1.0, 0.0, 0.3, 1.0, 0.0, 0.0);
|
||||
cairo_matrix_scale (&matrix, 1.0, -1.0);
|
||||
cairo_matrix_translate (&matrix, -10, - 3 * height - 10);
|
||||
cairo_transform (cr, &matrix);
|
||||
|
||||
cairo_rectangle (cr, 0, height, width, height);
|
||||
cairo_clip (cr);
|
||||
|
||||
gdk_cairo_set_source_pixmap (cr, pixmap, 0, height);
|
||||
|
||||
/* create linear gradient as mask-pattern to fade out the source */
|
||||
mask = cairo_pattern_create_linear (0.0, height, 0.0, 2*height);
|
||||
cairo_pattern_add_color_stop_rgba (mask, 0.0, 0.0, 0.0, 0.0, 0.0);
|
||||
cairo_pattern_add_color_stop_rgba (mask, 0.25, 0.0, 0.0, 0.0, 0.01);
|
||||
cairo_pattern_add_color_stop_rgba (mask, 0.5, 0.0, 0.0, 0.0, 0.25);
|
||||
cairo_pattern_add_color_stop_rgba (mask, 0.75, 0.0, 0.0, 0.0, 0.5);
|
||||
cairo_pattern_add_color_stop_rgba (mask, 1.0, 0.0, 0.0, 0.0, 1.0);
|
||||
|
||||
/* paint the reflection */
|
||||
cairo_mask (cr, mask);
|
||||
|
||||
cairo_pattern_destroy (mask);
|
||||
cairo_destroy (cr);
|
||||
}
|
||||
}
|
||||
else if (event->window == bin->offscreen_window)
|
||||
{
|
||||
gtk_paint_flat_box (widget->style, event->window,
|
||||
GTK_STATE_NORMAL, GTK_SHADOW_NONE,
|
||||
&event->area, widget, "blah",
|
||||
0, 0, -1, -1);
|
||||
|
||||
if (bin->child)
|
||||
gtk_container_propagate_expose (GTK_CONTAINER (widget),
|
||||
bin->child,
|
||||
event);
|
||||
}
|
||||
}
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
/*** ***/
|
||||
|
||||
static GtkWidget *window = NULL;
|
||||
|
||||
GtkWidget *
|
||||
do_offscreen_window2 (GtkWidget *do_widget)
|
||||
{
|
||||
if (!window)
|
||||
{
|
||||
GtkWidget *bin, *vbox;
|
||||
GtkWidget *hbox, *entry, *applybutton, *backbutton;
|
||||
GtkSizeGroup *group;
|
||||
|
||||
window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
|
||||
gtk_window_set_screen (GTK_WINDOW (window),
|
||||
gtk_widget_get_screen (do_widget));
|
||||
gtk_window_set_title (GTK_WINDOW (window), "Effects");
|
||||
|
||||
g_signal_connect (window, "destroy",
|
||||
G_CALLBACK (gtk_widget_destroyed), &window);
|
||||
|
||||
gtk_container_set_border_width (GTK_CONTAINER (window), 10);
|
||||
|
||||
vbox = gtk_vbox_new (0, FALSE);
|
||||
|
||||
bin = gtk_mirror_bin_new ();
|
||||
|
||||
group = gtk_size_group_new (GTK_SIZE_GROUP_VERTICAL);
|
||||
|
||||
hbox = gtk_hbox_new (FALSE, 6);
|
||||
backbutton = gtk_button_new ();
|
||||
gtk_container_add (GTK_CONTAINER (backbutton),
|
||||
gtk_image_new_from_stock (GTK_STOCK_GO_BACK, 4));
|
||||
gtk_size_group_add_widget (group, backbutton);
|
||||
entry = gtk_entry_new ();
|
||||
gtk_size_group_add_widget (group, entry);
|
||||
applybutton = gtk_button_new ();
|
||||
gtk_size_group_add_widget (group, applybutton);
|
||||
gtk_container_add (GTK_CONTAINER (applybutton),
|
||||
gtk_image_new_from_stock (GTK_STOCK_APPLY, 4));
|
||||
|
||||
gtk_container_add (GTK_CONTAINER (window), vbox);
|
||||
gtk_box_pack_start (GTK_BOX (vbox), bin, TRUE, TRUE, 0);
|
||||
gtk_container_add (GTK_CONTAINER (bin), hbox);
|
||||
gtk_box_pack_start (GTK_BOX (hbox), backbutton, FALSE, FALSE, 0);
|
||||
gtk_box_pack_start (GTK_BOX (hbox), entry, TRUE, TRUE, 0);
|
||||
gtk_box_pack_start (GTK_BOX (hbox), applybutton, FALSE, FALSE, 0);
|
||||
}
|
||||
|
||||
if (!GTK_WIDGET_VISIBLE (window))
|
||||
gtk_widget_show_all (window);
|
||||
else
|
||||
{
|
||||
gtk_widget_destroy (window);
|
||||
window = NULL;
|
||||
}
|
||||
|
||||
return window;
|
||||
}
|
||||
|
||||
@@ -65,7 +65,7 @@ create_pane_options (GtkPaned *paned,
|
||||
GtkWidget *check_button;
|
||||
|
||||
frame = gtk_frame_new (frame_label);
|
||||
gtk_container_set_border_width (GTK_CONTAINER (frame), 4);
|
||||
gtk_container_set_border_width (GTK_CONTAINER (frame), GTK_SIZE_ONE_TWELFTH_EM (4));
|
||||
|
||||
table = gtk_table_new (3, 2, TRUE);
|
||||
gtk_container_add (GTK_CONTAINER (frame), table);
|
||||
@@ -138,14 +138,14 @@ do_panes (GtkWidget *do_widget)
|
||||
|
||||
vpaned = gtk_vpaned_new ();
|
||||
gtk_box_pack_start (GTK_BOX (vbox), vpaned, TRUE, TRUE, 0);
|
||||
gtk_container_set_border_width (GTK_CONTAINER(vpaned), 5);
|
||||
gtk_container_set_border_width (GTK_CONTAINER(vpaned), GTK_SIZE_ONE_TWELFTH_EM (5));
|
||||
|
||||
hpaned = gtk_hpaned_new ();
|
||||
gtk_paned_add1 (GTK_PANED (vpaned), hpaned);
|
||||
|
||||
frame = gtk_frame_new (NULL);
|
||||
gtk_frame_set_shadow_type (GTK_FRAME(frame), GTK_SHADOW_IN);
|
||||
gtk_widget_set_size_request (frame, 60, 60);
|
||||
gtk_widget_set_size_request (frame, GTK_SIZE_ONE_TWELFTH_EM (60), GTK_SIZE_ONE_TWELFTH_EM (60));
|
||||
gtk_paned_add1 (GTK_PANED (hpaned), frame);
|
||||
|
||||
button = gtk_button_new_with_mnemonic ("_Hi there");
|
||||
@@ -153,12 +153,12 @@ do_panes (GtkWidget *do_widget)
|
||||
|
||||
frame = gtk_frame_new (NULL);
|
||||
gtk_frame_set_shadow_type (GTK_FRAME(frame), GTK_SHADOW_IN);
|
||||
gtk_widget_set_size_request (frame, 80, 60);
|
||||
gtk_widget_set_size_request (frame, GTK_SIZE_ONE_TWELFTH_EM (80), GTK_SIZE_ONE_TWELFTH_EM (60));
|
||||
gtk_paned_add2 (GTK_PANED (hpaned), frame);
|
||||
|
||||
frame = gtk_frame_new (NULL);
|
||||
gtk_frame_set_shadow_type (GTK_FRAME(frame), GTK_SHADOW_IN);
|
||||
gtk_widget_set_size_request (frame, 60, 80);
|
||||
gtk_widget_set_size_request (frame, GTK_SIZE_ONE_TWELFTH_EM (60), GTK_SIZE_ONE_TWELFTH_EM (80));
|
||||
gtk_paned_add2 (GTK_PANED (vpaned), frame);
|
||||
|
||||
/* Now create toggle buttons to control sizing */
|
||||
|
||||
@@ -18,19 +18,20 @@ do_pickers (GtkWidget *do_widget)
|
||||
gtk_window_set_screen (GTK_WINDOW (window),
|
||||
gtk_widget_get_screen (do_widget));
|
||||
gtk_window_set_title (GTK_WINDOW (window), "Pickers");
|
||||
gtk_window_set_resizable (GTK_WINDOW (window), FALSE);
|
||||
|
||||
g_signal_connect (window, "destroy",
|
||||
G_CALLBACK (gtk_widget_destroyed),
|
||||
&window);
|
||||
|
||||
gtk_container_set_border_width (GTK_CONTAINER (window), 10);
|
||||
gtk_container_set_border_width (GTK_CONTAINER (window), GTK_SIZE_ONE_TWELFTH_EM (10));
|
||||
|
||||
table = gtk_table_new (4, 2, FALSE);
|
||||
gtk_table_set_col_spacing (GTK_TABLE (table), 0, 10);
|
||||
gtk_table_set_row_spacings (GTK_TABLE (table), 3);
|
||||
gtk_table_set_col_spacing (GTK_TABLE (table), 0, GTK_SIZE_ONE_TWELFTH_EM (10));
|
||||
gtk_table_set_row_spacings (GTK_TABLE (table), GTK_SIZE_ONE_TWELFTH_EM (3));
|
||||
gtk_container_add (GTK_CONTAINER (window), table);
|
||||
|
||||
gtk_container_set_border_width (GTK_CONTAINER (table), 10);
|
||||
gtk_container_set_border_width (GTK_CONTAINER (table), GTK_SIZE_ONE_TWELFTH_EM (10));
|
||||
|
||||
label = gtk_label_new ("Color:");
|
||||
gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5);
|
||||
|
||||
@@ -13,19 +13,19 @@
|
||||
#define HEADER_HEIGHT (10*72/25.4)
|
||||
#define HEADER_GAP (3*72/25.4)
|
||||
|
||||
typedef struct
|
||||
typedef struct
|
||||
{
|
||||
gchar *filename;
|
||||
gdouble font_size;
|
||||
|
||||
gint lines_per_page;
|
||||
gint lines_per_page;
|
||||
gchar **lines;
|
||||
gint num_lines;
|
||||
gint num_pages;
|
||||
} PrintData;
|
||||
|
||||
static void
|
||||
begin_print (GtkPrintOperation *operation,
|
||||
begin_print (GtkPrintOperation *operation,
|
||||
GtkPrintContext *context,
|
||||
gpointer user_data)
|
||||
{
|
||||
@@ -35,9 +35,9 @@ begin_print (GtkPrintOperation *operation,
|
||||
double height;
|
||||
|
||||
height = gtk_print_context_get_height (context) - HEADER_HEIGHT - HEADER_GAP;
|
||||
|
||||
|
||||
data->lines_per_page = floor (height / data->font_size);
|
||||
|
||||
|
||||
g_file_get_contents (data->filename, &contents, NULL, NULL);
|
||||
|
||||
data->lines = g_strsplit (contents, "\n", 0);
|
||||
@@ -46,7 +46,7 @@ begin_print (GtkPrintOperation *operation,
|
||||
i = 0;
|
||||
while (data->lines[i] != NULL)
|
||||
i++;
|
||||
|
||||
|
||||
data->num_lines = i;
|
||||
data->num_pages = (data->num_lines - 1) / data->lines_per_page + 1;
|
||||
|
||||
@@ -72,10 +72,10 @@ draw_page (GtkPrintOperation *operation,
|
||||
width = gtk_print_context_get_width (context);
|
||||
|
||||
cairo_rectangle (cr, 0, 0, width, HEADER_HEIGHT);
|
||||
|
||||
|
||||
cairo_set_source_rgb (cr, 0.8, 0.8, 0.8);
|
||||
cairo_fill_preserve (cr);
|
||||
|
||||
|
||||
cairo_set_source_rgb (cr, 0, 0, 0);
|
||||
cairo_set_line_width (cr, 1);
|
||||
cairo_stroke (cr);
|
||||
@@ -107,19 +107,19 @@ draw_page (GtkPrintOperation *operation,
|
||||
pango_layout_get_pixel_size (layout, &text_width, &text_height);
|
||||
cairo_move_to (cr, width - text_width - 4, (HEADER_HEIGHT - text_height) / 2);
|
||||
pango_cairo_show_layout (cr, layout);
|
||||
|
||||
|
||||
g_object_unref (layout);
|
||||
|
||||
|
||||
layout = gtk_print_context_create_pango_layout (context);
|
||||
|
||||
|
||||
desc = pango_font_description_from_string ("monospace");
|
||||
pango_font_description_set_size (desc, data->font_size * PANGO_SCALE);
|
||||
pango_layout_set_font_description (layout, desc);
|
||||
pango_font_description_free (desc);
|
||||
|
||||
|
||||
cairo_move_to (cr, 0, HEADER_HEIGHT + HEADER_GAP);
|
||||
line = page_nr * data->lines_per_page;
|
||||
for (i = 0; i < data->lines_per_page && line < data->num_lines; i++)
|
||||
for (i = 0; i < data->lines_per_page && line < data->num_lines; i++)
|
||||
{
|
||||
pango_layout_set_text (layout, data->lines[line], -1);
|
||||
pango_cairo_show_layout (cr, layout);
|
||||
@@ -131,7 +131,7 @@ draw_page (GtkPrintOperation *operation,
|
||||
}
|
||||
|
||||
static void
|
||||
end_print (GtkPrintOperation *operation,
|
||||
end_print (GtkPrintOperation *operation,
|
||||
GtkPrintContext *context,
|
||||
gpointer user_data)
|
||||
{
|
||||
@@ -147,9 +147,7 @@ GtkWidget *
|
||||
do_printing (GtkWidget *do_widget)
|
||||
{
|
||||
GtkPrintOperation *operation;
|
||||
GtkPrintSettings *settings;
|
||||
PrintData *data;
|
||||
gchar *uri, *dir, *ext;
|
||||
GError *error = NULL;
|
||||
|
||||
operation = gtk_print_operation_new ();
|
||||
@@ -157,55 +155,37 @@ do_printing (GtkWidget *do_widget)
|
||||
data->filename = demo_find_file ("printing.c", NULL);
|
||||
data->font_size = 12.0;
|
||||
|
||||
g_signal_connect (G_OBJECT (operation), "begin-print",
|
||||
g_signal_connect (G_OBJECT (operation), "begin-print",
|
||||
G_CALLBACK (begin_print), data);
|
||||
g_signal_connect (G_OBJECT (operation), "draw-page",
|
||||
g_signal_connect (G_OBJECT (operation), "draw-page",
|
||||
G_CALLBACK (draw_page), data);
|
||||
g_signal_connect (G_OBJECT (operation), "end-print",
|
||||
g_signal_connect (G_OBJECT (operation), "end-print",
|
||||
G_CALLBACK (end_print), data);
|
||||
|
||||
gtk_print_operation_set_use_full_page (operation, FALSE);
|
||||
gtk_print_operation_set_unit (operation, GTK_UNIT_POINTS);
|
||||
gtk_print_operation_set_embed_page_setup (operation, TRUE);
|
||||
|
||||
settings = gtk_print_settings_new ();
|
||||
dir = g_get_user_special_dir (G_USER_DIRECTORY_DOCUMENTS);
|
||||
if (dir == NULL)
|
||||
dir = g_get_home_dir ();
|
||||
if (g_strcmp0 (gtk_print_settings_get (settings, GTK_PRINT_SETTINGS_OUTPUT_FILE_FORMAT), "ps") == 0)
|
||||
ext = ".ps";
|
||||
else if (g_strcmp0 (gtk_print_settings_get (settings, GTK_PRINT_SETTINGS_OUTPUT_FILE_FORMAT), "svg") == 0)
|
||||
ext = ".svg";
|
||||
else
|
||||
ext = ".pdf";
|
||||
|
||||
uri = g_strconcat ("file://", dir, "/", "gtk-demo", ext, NULL);
|
||||
gtk_print_settings_set (settings, GTK_PRINT_SETTINGS_OUTPUT_URI, uri);
|
||||
gtk_print_operation_set_print_settings (operation, settings);
|
||||
|
||||
gtk_print_operation_run (operation, GTK_PRINT_OPERATION_ACTION_PRINT_DIALOG, GTK_WINDOW (do_widget), &error);
|
||||
|
||||
g_object_unref (operation);
|
||||
g_object_unref (settings);
|
||||
g_free (uri);
|
||||
|
||||
if (error)
|
||||
{
|
||||
GtkWidget *dialog;
|
||||
|
||||
|
||||
dialog = gtk_message_dialog_new (GTK_WINDOW (do_widget),
|
||||
GTK_DIALOG_DESTROY_WITH_PARENT,
|
||||
GTK_MESSAGE_ERROR,
|
||||
GTK_BUTTONS_CLOSE,
|
||||
"%s", error->message);
|
||||
g_error_free (error);
|
||||
|
||||
|
||||
g_signal_connect (dialog, "response",
|
||||
G_CALLBACK (gtk_widget_destroy), NULL);
|
||||
|
||||
gtk_widget_show (dialog);
|
||||
|
||||
gtk_widget_show (dialog);
|
||||
}
|
||||
|
||||
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
239
demos/gtk-demo/resolution_independence.c
Normal file
239
demos/gtk-demo/resolution_independence.c
Normal file
@@ -0,0 +1,239 @@
|
||||
/* Resolution Independence
|
||||
*
|
||||
* This demonstates resolution independence features available since
|
||||
* version 2.14 of GTK+. Use the slider to change the effective DPI
|
||||
* per monitor. Note that the changes will only affect windows from
|
||||
* this process.
|
||||
*/
|
||||
#include <gtk/gtk.h>
|
||||
#include "config.h"
|
||||
#include "demo-common.h"
|
||||
|
||||
static GtkWidget *window = NULL;
|
||||
static GtkWindowGroup *window_group = NULL;
|
||||
static GtkWidget *hscale;
|
||||
static GtkWidget *label;
|
||||
static GtkWidget *button;
|
||||
static gdouble button_dpi;
|
||||
|
||||
#define INCHES_TO_MM 25.4
|
||||
|
||||
#define MIN_DPI 24.0
|
||||
#define MAX_DPI 480.0
|
||||
#define STEP_DPI 1.0
|
||||
|
||||
static void
|
||||
update (void)
|
||||
{
|
||||
GdkScreen *screen;
|
||||
gint monitor_num;
|
||||
char *plug_name;
|
||||
char *s;
|
||||
gdouble dpi;
|
||||
char *font_name;
|
||||
GtkSettings *settings;
|
||||
int width_mm;
|
||||
int height_mm;
|
||||
GdkRectangle geometry;
|
||||
|
||||
plug_name = NULL;
|
||||
font_name = NULL;
|
||||
width_mm = -1;
|
||||
height_mm = -1;
|
||||
geometry.x = -1;
|
||||
geometry.y = -1;
|
||||
geometry.width = -1;
|
||||
geometry.height = -1;
|
||||
|
||||
screen = gtk_window_get_screen (GTK_WINDOW (window));
|
||||
monitor_num = gtk_widget_get_monitor_num (window);
|
||||
if (screen != NULL && monitor_num >= 0)
|
||||
{
|
||||
plug_name = gdk_screen_get_monitor_plug_name (screen, monitor_num);
|
||||
width_mm = gdk_screen_get_monitor_width_mm (screen, monitor_num);
|
||||
height_mm = gdk_screen_get_monitor_height_mm (screen, monitor_num);
|
||||
gdk_screen_get_monitor_geometry (screen, monitor_num, &geometry);
|
||||
}
|
||||
if (screen != NULL)
|
||||
settings = gtk_settings_get_for_screen (screen);
|
||||
else
|
||||
settings = gtk_settings_get_default ();
|
||||
g_object_get (settings, "gtk-font-name", &font_name, NULL);
|
||||
|
||||
s = g_strdup_printf ("Monitor %d (%s) @ %dx%d+%d+%d\n"
|
||||
"%d mm x %d mm\n"
|
||||
"DPI: %.1f x %.1f\n"
|
||||
"Font \"%s\"\n"
|
||||
"1 em -> %g pixels\n"
|
||||
"1 mm -> %g pixels",
|
||||
monitor_num,
|
||||
plug_name != NULL ? plug_name : "unknown name",
|
||||
geometry.width, geometry.height, geometry.x, geometry.y,
|
||||
width_mm, height_mm,
|
||||
INCHES_TO_MM * geometry.width / width_mm,
|
||||
INCHES_TO_MM * geometry.height / height_mm,
|
||||
font_name,
|
||||
gtk_size_to_pixel_double (screen, monitor_num, gtk_size_em (1.0)),
|
||||
gtk_size_to_pixel_double (screen, monitor_num, gtk_size_mm (1.0)));
|
||||
gtk_label_set_text (GTK_LABEL (label), s);
|
||||
g_free (s);
|
||||
|
||||
button_dpi = MIN (INCHES_TO_MM * geometry.width / width_mm,
|
||||
INCHES_TO_MM * geometry.height / height_mm);
|
||||
s = g_strdup_printf ("Set DPI to %.1f", button_dpi);
|
||||
gtk_button_set_label (GTK_BUTTON (button), s);
|
||||
g_free (s);
|
||||
|
||||
dpi = -1;
|
||||
if (screen != NULL)
|
||||
{
|
||||
dpi = gdk_screen_get_resolution_for_monitor (screen, monitor_num);
|
||||
gtk_range_set_value (GTK_RANGE (hscale), dpi);
|
||||
}
|
||||
|
||||
g_free (plug_name);
|
||||
g_free (font_name);
|
||||
}
|
||||
|
||||
static void
|
||||
window_mapped (GtkWidget *widget, gpointer user_data)
|
||||
{
|
||||
update ();
|
||||
}
|
||||
|
||||
static void
|
||||
unit_changed (GtkWidget *widget, gpointer user_data)
|
||||
{
|
||||
update ();
|
||||
}
|
||||
|
||||
static void
|
||||
monitor_num_notify (GtkWindow *window, GParamSpec *psec, gpointer user_data)
|
||||
{
|
||||
g_debug ("notify::monitor-num");
|
||||
update ();
|
||||
}
|
||||
|
||||
static void
|
||||
update_value (void)
|
||||
{
|
||||
gdouble slider_value;
|
||||
|
||||
slider_value = gtk_range_get_value (GTK_RANGE (hscale));
|
||||
if (slider_value >= MIN_DPI && slider_value <= MAX_DPI)
|
||||
{
|
||||
GdkScreen *screen;
|
||||
gint monitor_num;
|
||||
|
||||
screen = gtk_window_get_screen (GTK_WINDOW (window));
|
||||
monitor_num = gtk_widget_get_monitor_num (window);
|
||||
if (screen != NULL && monitor_num >= 0)
|
||||
{
|
||||
gdk_screen_set_resolution_for_monitor (screen, monitor_num, slider_value);
|
||||
g_signal_emit_by_name (screen, "monitors-changed");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static gboolean is_pressed = FALSE;
|
||||
|
||||
static gboolean
|
||||
hscale_button_press_event (GtkWidget *widget, GdkEventButton *event, gpointer user_data)
|
||||
{
|
||||
is_pressed = TRUE;
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
static gboolean
|
||||
hscale_button_release_event (GtkWidget *widget, GdkEventButton *event, gpointer user_data)
|
||||
{
|
||||
is_pressed = FALSE;
|
||||
update_value ();
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
static void
|
||||
hscale_value_changed (GtkRange *range, gpointer user_data)
|
||||
{
|
||||
if (!is_pressed)
|
||||
update_value ();
|
||||
}
|
||||
|
||||
static char *
|
||||
hscale_format_value (GtkScale *scale, gdouble value, gpointer user_data)
|
||||
{
|
||||
return g_strdup_printf ("%g DPI", value);
|
||||
}
|
||||
|
||||
static void
|
||||
dpi_button_clicked (GtkButton *button, gpointer user_data)
|
||||
{
|
||||
gtk_range_set_value (GTK_RANGE (hscale), button_dpi);
|
||||
}
|
||||
|
||||
GtkWidget *
|
||||
do_resolution_independence (GtkWidget *do_widget)
|
||||
{
|
||||
GtkWidget *vbox;
|
||||
|
||||
if (window != NULL)
|
||||
goto have_window;
|
||||
|
||||
window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
|
||||
gtk_window_set_screen (GTK_WINDOW (window), gtk_widget_get_screen (do_widget));
|
||||
gtk_window_set_title (GTK_WINDOW (window), "Resolution Independence");
|
||||
gtk_window_set_icon_name (GTK_WINDOW (window), "gtk-fullscreen");
|
||||
|
||||
g_signal_connect (G_OBJECT (window), "map", G_CALLBACK (window_mapped), NULL);
|
||||
g_signal_connect (G_OBJECT (window), "notify::monitor-num", G_CALLBACK (monitor_num_notify), NULL);
|
||||
g_signal_connect (G_OBJECT (window), "unit-changed", G_CALLBACK (unit_changed), NULL);
|
||||
|
||||
g_signal_connect (window, "destroy",
|
||||
G_CALLBACK (gtk_widget_destroyed),
|
||||
&window);
|
||||
|
||||
vbox = gtk_vbox_new (FALSE, gtk_size_em (1));
|
||||
|
||||
label = gtk_label_new (NULL);
|
||||
gtk_label_set_justify (GTK_LABEL (label), GTK_JUSTIFY_CENTER);
|
||||
gtk_box_pack_start (GTK_BOX (vbox), label, FALSE, FALSE, 0);
|
||||
|
||||
hscale = gtk_hscale_new_with_range (MIN_DPI, MAX_DPI, STEP_DPI);
|
||||
gtk_box_pack_start (GTK_BOX (vbox), hscale, FALSE, FALSE, 0);
|
||||
|
||||
g_signal_connect (G_OBJECT (hscale), "value-changed", G_CALLBACK (hscale_value_changed), NULL);
|
||||
g_signal_connect (G_OBJECT (hscale), "button-press-event", G_CALLBACK (hscale_button_press_event), NULL);
|
||||
g_signal_connect (G_OBJECT (hscale), "button-release-event", G_CALLBACK (hscale_button_release_event), NULL);
|
||||
g_signal_connect (G_OBJECT (hscale), "format-value", G_CALLBACK (hscale_format_value), NULL);
|
||||
|
||||
gtk_container_add (GTK_CONTAINER (window), vbox);
|
||||
gtk_container_set_border_width (GTK_CONTAINER (window), gtk_size_em (1));
|
||||
gtk_widget_set_size_request (window, GTK_SIZE_ONE_TWELFTH_EM (500), -1);
|
||||
gtk_window_set_resizable (GTK_WINDOW (window), FALSE);
|
||||
|
||||
button = gtk_button_new ();
|
||||
g_signal_connect (G_OBJECT (button), "clicked", G_CALLBACK (dpi_button_clicked), NULL);
|
||||
gtk_box_pack_start (GTK_BOX (vbox), button, FALSE, FALSE, 0);
|
||||
|
||||
/* avoid dialogs (e.g. printing) grabbing focus from us */
|
||||
if (window_group == NULL)
|
||||
window_group = gtk_window_group_new ();
|
||||
gtk_window_group_add_window (window_group, GTK_WINDOW (window));
|
||||
|
||||
/* make sure we're on top */
|
||||
gtk_window_set_keep_above (GTK_WINDOW (window), TRUE);
|
||||
|
||||
have_window:
|
||||
|
||||
if (!GTK_WIDGET_VISIBLE (window))
|
||||
{
|
||||
gtk_widget_show_all (window);
|
||||
}
|
||||
else
|
||||
{
|
||||
gtk_widget_destroy (window);
|
||||
window = NULL;
|
||||
}
|
||||
|
||||
return window;
|
||||
}
|
||||
@@ -189,7 +189,8 @@ do_rotated_text (GtkWidget *do_widget)
|
||||
gtk_window_set_screen (GTK_WINDOW (window),
|
||||
gtk_widget_get_screen (do_widget));
|
||||
gtk_window_set_title (GTK_WINDOW (window), "Rotated Text");
|
||||
gtk_window_set_default_size (GTK_WINDOW (window), 4 * RADIUS, 2 * RADIUS);
|
||||
gtk_window_set_default_size (GTK_WINDOW (window),
|
||||
gtk_size_em ((4 * RADIUS)), gtk_size_em ((4 * RADIUS)));
|
||||
g_signal_connect (window, "destroy", G_CALLBACK (gtk_widget_destroyed), &window);
|
||||
|
||||
box = gtk_hbox_new (TRUE, 0);
|
||||
@@ -207,19 +208,18 @@ do_rotated_text (GtkWidget *do_widget)
|
||||
G_CALLBACK (rotated_text_expose_event), NULL);
|
||||
|
||||
/* And a label */
|
||||
|
||||
label = gtk_label_new (text);
|
||||
gtk_container_add (GTK_CONTAINER (box), label);
|
||||
|
||||
gtk_label_set_angle (GTK_LABEL (label), 45);
|
||||
gtk_label_set_angle (label, 45);
|
||||
|
||||
/* Set up fancy stuff on the label */
|
||||
layout = gtk_label_get_layout (GTK_LABEL (label));
|
||||
layout = gtk_label_get_layout (label);
|
||||
pango_cairo_context_set_shape_renderer (pango_layout_get_context (layout),
|
||||
fancy_shape_renderer,
|
||||
NULL, NULL);
|
||||
attrs = create_fancy_attr_list_for_layout (layout);
|
||||
gtk_label_set_attributes (GTK_LABEL (label), attrs);
|
||||
gtk_label_set_attributes (label, attrs);
|
||||
pango_attr_list_unref (attrs);
|
||||
}
|
||||
|
||||
|
||||
@@ -115,9 +115,9 @@ do_sizegroup (GtkWidget *do_widget)
|
||||
g_signal_connect (window, "destroy",
|
||||
G_CALLBACK (gtk_widget_destroyed), &window);
|
||||
|
||||
vbox = gtk_vbox_new (FALSE, 5);
|
||||
vbox = gtk_vbox_new (FALSE, GTK_SIZE_ONE_TWELFTH_EM (5));
|
||||
gtk_box_pack_start (GTK_BOX (GTK_DIALOG (window)->vbox), vbox, TRUE, TRUE, 0);
|
||||
gtk_container_set_border_width (GTK_CONTAINER (vbox), 5);
|
||||
gtk_container_set_border_width (GTK_CONTAINER (vbox), GTK_SIZE_ONE_TWELFTH_EM (5));
|
||||
|
||||
size_group = gtk_size_group_new (GTK_SIZE_GROUP_HORIZONTAL);
|
||||
|
||||
@@ -127,9 +127,9 @@ do_sizegroup (GtkWidget *do_widget)
|
||||
gtk_box_pack_start (GTK_BOX (vbox), frame, TRUE, TRUE, 0);
|
||||
|
||||
table = gtk_table_new (2, 2, FALSE);
|
||||
gtk_container_set_border_width (GTK_CONTAINER (table), 5);
|
||||
gtk_table_set_row_spacings (GTK_TABLE (table), 5);
|
||||
gtk_table_set_col_spacings (GTK_TABLE (table), 10);
|
||||
gtk_container_set_border_width (GTK_CONTAINER (table), GTK_SIZE_ONE_TWELFTH_EM (5));
|
||||
gtk_table_set_row_spacings (GTK_TABLE (table), GTK_SIZE_ONE_TWELFTH_EM (5));
|
||||
gtk_table_set_col_spacings (GTK_TABLE (table), GTK_SIZE_ONE_TWELFTH_EM (10));
|
||||
gtk_container_add (GTK_CONTAINER (frame), table);
|
||||
|
||||
add_row (GTK_TABLE (table), 0, size_group, "_Foreground", color_options);
|
||||
@@ -141,9 +141,9 @@ do_sizegroup (GtkWidget *do_widget)
|
||||
gtk_box_pack_start (GTK_BOX (vbox), frame, FALSE, FALSE, 0);
|
||||
|
||||
table = gtk_table_new (2, 2, FALSE);
|
||||
gtk_container_set_border_width (GTK_CONTAINER (table), 5);
|
||||
gtk_table_set_row_spacings (GTK_TABLE (table), 5);
|
||||
gtk_table_set_col_spacings (GTK_TABLE (table), 10);
|
||||
gtk_container_set_border_width (GTK_CONTAINER (table), GTK_SIZE_ONE_TWELFTH_EM (5));
|
||||
gtk_table_set_row_spacings (GTK_TABLE (table), GTK_SIZE_ONE_TWELFTH_EM (5));
|
||||
gtk_table_set_col_spacings (GTK_TABLE (table), GTK_SIZE_ONE_TWELFTH_EM (10));
|
||||
gtk_container_add (GTK_CONTAINER (frame), table);
|
||||
|
||||
add_row (GTK_TABLE (table), 0, size_group, "_Dashing", dash_options);
|
||||
|
||||
@@ -420,12 +420,12 @@ do_stock_browser (GtkWidget *do_widget)
|
||||
gtk_window_set_screen (GTK_WINDOW (window),
|
||||
gtk_widget_get_screen (do_widget));
|
||||
gtk_window_set_title (GTK_WINDOW (window), "Stock Icons and Items");
|
||||
gtk_window_set_default_size (GTK_WINDOW (window), -1, 500);
|
||||
gtk_window_set_default_size (GTK_WINDOW (window), -1, GTK_SIZE_ONE_TWELFTH_EM (500));
|
||||
|
||||
g_signal_connect (window, "destroy", G_CALLBACK (gtk_widget_destroyed), &window);
|
||||
gtk_container_set_border_width (GTK_CONTAINER (window), 8);
|
||||
gtk_container_set_border_width (GTK_CONTAINER (window), GTK_SIZE_ONE_TWELFTH_EM (8));
|
||||
|
||||
hbox = gtk_hbox_new (FALSE, 8);
|
||||
hbox = gtk_hbox_new (FALSE, GTK_SIZE_ONE_TWELFTH_EM (8));
|
||||
gtk_container_add (GTK_CONTAINER (window), hbox);
|
||||
|
||||
sw = gtk_scrolled_window_new (NULL, NULL);
|
||||
@@ -494,8 +494,8 @@ do_stock_browser (GtkWidget *do_widget)
|
||||
frame = gtk_frame_new ("Selected Item");
|
||||
gtk_container_add (GTK_CONTAINER (align), frame);
|
||||
|
||||
vbox = gtk_vbox_new (FALSE, 8);
|
||||
gtk_container_set_border_width (GTK_CONTAINER (vbox), 4);
|
||||
vbox = gtk_vbox_new (FALSE, GTK_SIZE_ONE_TWELFTH_EM (8));
|
||||
gtk_container_set_border_width (GTK_CONTAINER (vbox), GTK_SIZE_ONE_TWELFTH_EM (4));
|
||||
gtk_container_add (GTK_CONTAINER (frame), vbox);
|
||||
|
||||
display = g_new (StockItemDisplay, 1);
|
||||
|
||||
@@ -182,9 +182,9 @@ do_textscroll (GtkWidget *do_widget)
|
||||
window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
|
||||
g_signal_connect (window, "destroy",
|
||||
G_CALLBACK (gtk_widget_destroyed), &window);
|
||||
gtk_window_set_default_size (GTK_WINDOW (window), 600, 400);
|
||||
gtk_window_set_default_size (GTK_WINDOW (window), GTK_SIZE_ONE_TWELFTH_EM (600), GTK_SIZE_ONE_TWELFTH_EM (400));
|
||||
|
||||
hbox = gtk_hbox_new (TRUE, 6);
|
||||
hbox = gtk_hbox_new (TRUE, GTK_SIZE_ONE_TWELFTH_EM (6));
|
||||
gtk_container_add (GTK_CONTAINER (window), hbox);
|
||||
|
||||
create_text_view (hbox, TRUE);
|
||||
|
||||
@@ -114,7 +114,7 @@ create_tags (GtkTextBuffer *buffer)
|
||||
"justification", GTK_JUSTIFY_RIGHT, NULL);
|
||||
|
||||
gtk_text_buffer_create_tag (buffer, "wide_margins",
|
||||
"left_margin", 50, "right_margin", 50,
|
||||
"left_margin", GTK_SIZE_ONE_TWELFTH_EM (50), "right_margin", GTK_SIZE_ONE_TWELFTH_EM (50),
|
||||
NULL);
|
||||
|
||||
gtk_text_buffer_create_tag (buffer, "strikethrough",
|
||||
@@ -139,9 +139,9 @@ create_tags (GtkTextBuffer *buffer)
|
||||
gtk_text_buffer_create_tag (buffer, "rtl_quote",
|
||||
"wrap_mode", GTK_WRAP_WORD,
|
||||
"direction", GTK_TEXT_DIR_RTL,
|
||||
"indent", 30,
|
||||
"left_margin", 20,
|
||||
"right_margin", 20,
|
||||
"indent", GTK_SIZE_ONE_TWELFTH_EM (30),
|
||||
"left_margin", GTK_SIZE_ONE_TWELFTH_EM (20),
|
||||
"right_margin", GTK_SIZE_ONE_TWELFTH_EM (20),
|
||||
NULL);
|
||||
}
|
||||
|
||||
@@ -173,7 +173,10 @@ insert_text (GtkTextBuffer *buffer)
|
||||
exit (1);
|
||||
}
|
||||
|
||||
scaled = gdk_pixbuf_scale_simple (pixbuf, 32, 32, GDK_INTERP_BILINEAR);
|
||||
scaled = gdk_pixbuf_scale_simple (pixbuf,
|
||||
gtk_size_to_pixel (NULL, 0, GTK_SIZE_ONE_TWELFTH_EM (32)),
|
||||
gtk_size_to_pixel (NULL, 0, GTK_SIZE_ONE_TWELFTH_EM (32)),
|
||||
GDK_INTERP_BILINEAR);
|
||||
g_object_unref (pixbuf);
|
||||
pixbuf = scaled;
|
||||
|
||||
@@ -409,7 +412,7 @@ attach_widgets (GtkTextView *text_view)
|
||||
{
|
||||
widget = gtk_hscale_new (NULL);
|
||||
gtk_range_set_range (GTK_RANGE (widget), 0, 100);
|
||||
gtk_widget_set_size_request (widget, 70, -1);
|
||||
gtk_widget_set_size_request (widget, GTK_SIZE_ONE_TWELFTH_EM (70), -1);
|
||||
}
|
||||
else if (i == 3)
|
||||
{
|
||||
@@ -454,7 +457,7 @@ do_textview (GtkWidget *do_widget)
|
||||
gtk_window_set_screen (GTK_WINDOW (window),
|
||||
gtk_widget_get_screen (do_widget));
|
||||
gtk_window_set_default_size (GTK_WINDOW (window),
|
||||
450, 450);
|
||||
GTK_SIZE_ONE_TWELFTH_EM (450), GTK_SIZE_ONE_TWELFTH_EM (450));
|
||||
|
||||
g_signal_connect (window, "destroy",
|
||||
G_CALLBACK (gtk_widget_destroyed), &window);
|
||||
@@ -463,7 +466,7 @@ do_textview (GtkWidget *do_widget)
|
||||
gtk_container_set_border_width (GTK_CONTAINER (window), 0);
|
||||
|
||||
vpaned = gtk_vpaned_new ();
|
||||
gtk_container_set_border_width (GTK_CONTAINER(vpaned), 5);
|
||||
gtk_container_set_border_width (GTK_CONTAINER(vpaned), GTK_SIZE_ONE_TWELFTH_EM (5));
|
||||
gtk_container_add (GTK_CONTAINER (window), vpaned);
|
||||
|
||||
/* For convenience, we just use the autocreated buffer from
|
||||
@@ -534,7 +537,7 @@ recursive_attach_view (int depth,
|
||||
gtk_widget_modify_bg (event_box, GTK_STATE_NORMAL, &color);
|
||||
|
||||
align = gtk_alignment_new (0.5, 0.5, 1.0, 1.0);
|
||||
gtk_container_set_border_width (GTK_CONTAINER (align), 1);
|
||||
gtk_container_set_border_width (GTK_CONTAINER (align), GTK_SIZE_ONE_TWELFTH_EM (1));
|
||||
|
||||
gtk_container_add (GTK_CONTAINER (event_box), align);
|
||||
gtk_container_add (GTK_CONTAINER (align), child_view);
|
||||
@@ -590,7 +593,7 @@ easter_egg_callback (GtkWidget *button,
|
||||
window_ptr = &window;
|
||||
g_object_add_weak_pointer (G_OBJECT (window), window_ptr);
|
||||
|
||||
gtk_window_set_default_size (GTK_WINDOW (window), 300, 400);
|
||||
gtk_window_set_default_size (GTK_WINDOW (window), GTK_SIZE_ONE_TWELFTH_EM (300), GTK_SIZE_ONE_TWELFTH_EM (400));
|
||||
|
||||
gtk_widget_show_all (window);
|
||||
}
|
||||
|
||||
@@ -291,7 +291,7 @@ add_columns (GtkTreeView *treeview)
|
||||
column = gtk_tree_view_get_column (GTK_TREE_VIEW (treeview), col_offset - 1);
|
||||
gtk_tree_view_column_set_sizing (GTK_TREE_VIEW_COLUMN (column),
|
||||
GTK_TREE_VIEW_COLUMN_FIXED);
|
||||
gtk_tree_view_column_set_fixed_width (GTK_TREE_VIEW_COLUMN (column), 50);
|
||||
gtk_tree_view_column_set_fixed_width (GTK_TREE_VIEW_COLUMN (column), GTK_SIZE_ONE_TWELFTH_EM (50));
|
||||
gtk_tree_view_column_set_clickable (GTK_TREE_VIEW_COLUMN (column), TRUE);
|
||||
|
||||
/* havoc column */
|
||||
@@ -313,7 +313,7 @@ add_columns (GtkTreeView *treeview)
|
||||
column = gtk_tree_view_get_column (GTK_TREE_VIEW (treeview), col_offset - 1);
|
||||
gtk_tree_view_column_set_sizing (GTK_TREE_VIEW_COLUMN (column),
|
||||
GTK_TREE_VIEW_COLUMN_FIXED);
|
||||
gtk_tree_view_column_set_fixed_width (GTK_TREE_VIEW_COLUMN (column), 50);
|
||||
gtk_tree_view_column_set_fixed_width (GTK_TREE_VIEW_COLUMN (column), GTK_SIZE_ONE_TWELFTH_EM (50));
|
||||
gtk_tree_view_column_set_clickable (GTK_TREE_VIEW_COLUMN (column), TRUE);
|
||||
|
||||
/* tim column */
|
||||
@@ -336,7 +336,7 @@ add_columns (GtkTreeView *treeview)
|
||||
column = gtk_tree_view_get_column (GTK_TREE_VIEW (treeview), col_offset - 1);
|
||||
gtk_tree_view_column_set_sizing (GTK_TREE_VIEW_COLUMN (column),
|
||||
GTK_TREE_VIEW_COLUMN_FIXED);
|
||||
gtk_tree_view_column_set_fixed_width (GTK_TREE_VIEW_COLUMN (column), 50);
|
||||
gtk_tree_view_column_set_fixed_width (GTK_TREE_VIEW_COLUMN (column), GTK_SIZE_ONE_TWELFTH_EM (50));
|
||||
gtk_tree_view_column_set_clickable (GTK_TREE_VIEW_COLUMN (column), TRUE);
|
||||
|
||||
/* owen column */
|
||||
@@ -358,7 +358,7 @@ add_columns (GtkTreeView *treeview)
|
||||
column = gtk_tree_view_get_column (GTK_TREE_VIEW (treeview), col_offset - 1);
|
||||
gtk_tree_view_column_set_sizing (GTK_TREE_VIEW_COLUMN (column),
|
||||
GTK_TREE_VIEW_COLUMN_FIXED);
|
||||
gtk_tree_view_column_set_fixed_width (GTK_TREE_VIEW_COLUMN (column), 50);
|
||||
gtk_tree_view_column_set_fixed_width (GTK_TREE_VIEW_COLUMN (column), GTK_SIZE_ONE_TWELFTH_EM (50));
|
||||
gtk_tree_view_column_set_clickable (GTK_TREE_VIEW_COLUMN (column), TRUE);
|
||||
|
||||
/* dave column */
|
||||
@@ -380,7 +380,7 @@ add_columns (GtkTreeView *treeview)
|
||||
column = gtk_tree_view_get_column (GTK_TREE_VIEW (treeview), col_offset - 1);
|
||||
gtk_tree_view_column_set_sizing (GTK_TREE_VIEW_COLUMN (column),
|
||||
GTK_TREE_VIEW_COLUMN_FIXED);
|
||||
gtk_tree_view_column_set_fixed_width (GTK_TREE_VIEW_COLUMN (column), 50);
|
||||
gtk_tree_view_column_set_fixed_width (GTK_TREE_VIEW_COLUMN (column), GTK_SIZE_ONE_TWELFTH_EM (50));
|
||||
gtk_tree_view_column_set_clickable (GTK_TREE_VIEW_COLUMN (column), TRUE);
|
||||
}
|
||||
|
||||
@@ -402,8 +402,8 @@ do_tree_store (GtkWidget *do_widget)
|
||||
g_signal_connect (window, "destroy",
|
||||
G_CALLBACK (gtk_widget_destroyed), &window);
|
||||
|
||||
vbox = gtk_vbox_new (FALSE, 8);
|
||||
gtk_container_set_border_width (GTK_CONTAINER (vbox), 8);
|
||||
vbox = gtk_vbox_new (FALSE, GTK_SIZE_ONE_TWELFTH_EM (8));
|
||||
gtk_container_set_border_width (GTK_CONTAINER (vbox), GTK_SIZE_ONE_TWELFTH_EM (8));
|
||||
gtk_container_add (GTK_CONTAINER (window), vbox);
|
||||
|
||||
gtk_box_pack_start (GTK_BOX (vbox),
|
||||
@@ -435,7 +435,7 @@ do_tree_store (GtkWidget *do_widget)
|
||||
/* expand all rows after the treeview widget has been realized */
|
||||
g_signal_connect (treeview, "realize",
|
||||
G_CALLBACK (gtk_tree_view_expand_all), NULL);
|
||||
gtk_window_set_default_size (GTK_WINDOW (window), 650, 400);
|
||||
gtk_window_set_default_size (GTK_WINDOW (window), GTK_SIZE_ONE_TWELFTH_EM (50), GTK_SIZE_ONE_TWELFTH_EM (400));
|
||||
}
|
||||
|
||||
if (!GTK_WIDGET_VISIBLE (window))
|
||||
|
||||
@@ -204,7 +204,7 @@ do_ui_manager (GtkWidget *do_widget)
|
||||
FALSE, FALSE, 0);
|
||||
|
||||
label = gtk_label_new ("Type\n<alt>\nto start");
|
||||
gtk_widget_set_size_request (label, 200, 200);
|
||||
gtk_widget_set_size_request (label, GTK_SIZE_ONE_TWELFTH_EM (200), GTK_SIZE_ONE_TWELFTH_EM (200));
|
||||
gtk_misc_set_alignment (GTK_MISC (label), 0.5, 0.5);
|
||||
gtk_box_pack_start (GTK_BOX (box1), label, TRUE, TRUE, 0);
|
||||
|
||||
@@ -213,8 +213,8 @@ do_ui_manager (GtkWidget *do_widget)
|
||||
gtk_box_pack_start (GTK_BOX (box1), separator, FALSE, TRUE, 0);
|
||||
|
||||
|
||||
box2 = gtk_vbox_new (FALSE, 10);
|
||||
gtk_container_set_border_width (GTK_CONTAINER (box2), 10);
|
||||
box2 = gtk_vbox_new (FALSE, GTK_SIZE_ONE_TWELFTH_EM (10));
|
||||
gtk_container_set_border_width (GTK_CONTAINER (box2), GTK_SIZE_ONE_TWELFTH_EM (10));
|
||||
gtk_box_pack_start (GTK_BOX (box1), box2, FALSE, TRUE, 0);
|
||||
|
||||
button = gtk_button_new_with_label ("close");
|
||||
|
||||
@@ -103,9 +103,5 @@
|
||||
<index id="api-index-2-16" role="2.16">
|
||||
<title>Index of new symbols in 2.16</title>
|
||||
<xi:include href="xml/api-index-2.16.xml"><xi:fallback /></xi:include>
|
||||
</index>
|
||||
<index id="api-index-2-18" role="2.18">
|
||||
<title>Index of new symbols in 2.18</title>
|
||||
<xi:include href="xml/api-index-2.18.xml"><xi:fallback /></xi:include>
|
||||
</index>
|
||||
</book>
|
||||
|
||||
@@ -225,8 +225,12 @@ gdk_screen_broadcast_client_message
|
||||
gdk_screen_get_setting
|
||||
gdk_screen_get_font_options
|
||||
gdk_screen_set_font_options
|
||||
gdk_screen_get_font_options_for_monitor
|
||||
gdk_screen_set_font_options_for_monitor
|
||||
gdk_screen_get_resolution
|
||||
gdk_screen_set_resolution
|
||||
gdk_screen_get_resolution_for_monitor
|
||||
gdk_screen_set_resolution_for_monitor
|
||||
gdk_screen_get_active_window
|
||||
gdk_screen_get_window_stack
|
||||
<SUBSECTION Spawning>
|
||||
@@ -640,7 +644,6 @@ gdk_window_at_pointer
|
||||
gdk_window_show
|
||||
gdk_window_show_unraised
|
||||
gdk_window_hide
|
||||
gdk_window_is_destroyed
|
||||
gdk_window_is_visible
|
||||
gdk_window_is_viewable
|
||||
gdk_window_get_state
|
||||
@@ -662,8 +665,6 @@ gdk_window_resize
|
||||
gdk_window_move_resize
|
||||
gdk_window_scroll
|
||||
gdk_window_move_region
|
||||
gdk_window_flush
|
||||
gdk_window_ensure_native
|
||||
gdk_window_reparent
|
||||
gdk_window_clear
|
||||
gdk_window_clear_area
|
||||
@@ -671,7 +672,6 @@ gdk_window_clear_area_e
|
||||
gdk_window_copy_area
|
||||
gdk_window_raise
|
||||
gdk_window_lower
|
||||
gdk_window_restack
|
||||
gdk_window_focus
|
||||
gdk_window_register_dnd
|
||||
gdk_window_begin_resize_drag
|
||||
@@ -723,7 +723,6 @@ gdk_window_set_background
|
||||
gdk_window_set_back_pixmap
|
||||
GDK_PARENT_RELATIVE
|
||||
gdk_window_set_cursor
|
||||
gdk_window_get_cursor
|
||||
gdk_window_set_colormap
|
||||
gdk_window_get_user_data
|
||||
gdk_window_get_geometry
|
||||
@@ -744,7 +743,6 @@ gdk_window_get_colormap
|
||||
gdk_window_get_type
|
||||
gdk_window_get_origin
|
||||
gdk_window_get_deskrelative_origin
|
||||
gdk_window_get_root_coords
|
||||
gdk_window_get_pointer
|
||||
GdkModifierType
|
||||
gdk_window_get_parent
|
||||
@@ -773,10 +771,6 @@ GdkPointerHooks
|
||||
gdk_set_pointer_hooks
|
||||
|
||||
<SUBSECTION>
|
||||
gdk_offscreen_window_get_pixmap
|
||||
gdk_offscreen_window_set_embedder
|
||||
gdk_offscreen_window_get_embedder
|
||||
gdk_window_geometry_changed
|
||||
gdk_window_redirect_to_drawable
|
||||
gdk_window_remove_redirection
|
||||
|
||||
@@ -884,6 +878,7 @@ gdk_pango_renderer_set_stipple
|
||||
gdk_pango_renderer_set_override_color
|
||||
gdk_pango_context_get
|
||||
gdk_pango_context_get_for_screen
|
||||
gdk_pango_context_get_for_screen_for_monitor
|
||||
gdk_pango_context_set_colormap
|
||||
GdkPangoAttrEmbossed
|
||||
GdkPangoAttrEmbossColor
|
||||
@@ -915,7 +910,6 @@ gdk_cairo_set_source_pixbuf
|
||||
gdk_cairo_set_source_pixmap
|
||||
gdk_cairo_rectangle
|
||||
gdk_cairo_region
|
||||
gdk_cairo_reset_clip
|
||||
</SECTION>
|
||||
|
||||
<SECTION>
|
||||
@@ -942,7 +936,6 @@ gdk_region_get_clipbox
|
||||
gdk_region_get_rectangles
|
||||
gdk_region_empty
|
||||
gdk_region_equal
|
||||
gdk_region_rect_equal
|
||||
gdk_region_point_in
|
||||
gdk_region_rect_in
|
||||
GdkOverlapType
|
||||
|
||||
@@ -85,12 +85,3 @@ Cairo paths and to use pixbufs as sources for drawing operations.
|
||||
@region:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_cairo_reset_clip ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@cr:
|
||||
@drawable:
|
||||
|
||||
|
||||
|
||||
@@ -94,7 +94,6 @@ for the possible window states
|
||||
was added in 2.8.
|
||||
@GDK_DAMAGE: the content of the window has been changed. This event type
|
||||
was added in 2.14.
|
||||
@GDK_EVENT_LAST: marks the end of the GdkEventType enumeration. Added in 2.18
|
||||
|
||||
<!-- ##### ENUM GdkEventMask ##### -->
|
||||
<para>
|
||||
|
||||
@@ -15,11 +15,6 @@ header file. <filename><gdk/gdkkeysyms.h></filename> is not included in <f
|
||||
it must be included independently, because the file is quite large.
|
||||
</para>
|
||||
<para>
|
||||
Key values are regularly updated from the upstream X.org X11 implementation,
|
||||
so new values are added regularly. They will be prefixed with GDK_ rather than
|
||||
XF86XK_ or XK_ (for older symbols).
|
||||
</para>
|
||||
<para>
|
||||
Key values can be converted into a string representation using
|
||||
gdk_keyval_name(). The reverse function, converting a string to a key value,
|
||||
is provided by gdk_keyval_from_name().
|
||||
|
||||
@@ -175,16 +175,6 @@ included in the region, while areas overlapped an even number of times are not.
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_region_rect_equal ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@region:
|
||||
@rectangle:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_region_point_in ##### -->
|
||||
<para>
|
||||
|
||||
|
||||
@@ -8,18 +8,10 @@ Onscreen display areas in the target window system
|
||||
<para>
|
||||
A #GdkWindow is a rectangular region on the screen. It's a low-level object,
|
||||
used to implement high-level objects such as #GtkWidget and #GtkWindow on the
|
||||
GTK+ level. A #GtkWindow is a toplevel window, the thing a user might think of
|
||||
as a "window" with a titlebar and so on; a #GtkWindow may contain many #GdkWindow.
|
||||
GTK+ level. A #GtkWindow is a toplevel window, the thing a user might think of
|
||||
as a "window" with a titlebar and so on; a #GtkWindow may contain many #GdkWindow.
|
||||
For example, each #GtkButton has a #GdkWindow associated with it.
|
||||
</para>
|
||||
<refsect2 id="COMPOSITED-WINDOWS"><title>Composited Windows</title>
|
||||
<para>
|
||||
Normally, the windowing system takes care of rendering the contents of a child
|
||||
window onto its parent window. This mechanism can be intercepted by calling
|
||||
gdk_window_set_composited() on the child window. For a
|
||||
<firstterm>composited</firstterm> window it is the responsibility of the
|
||||
application to render the window contents at the right spot.
|
||||
</para>
|
||||
<example id="composited-window-example"><title>Composited windows</title>
|
||||
<programlisting><![CDATA[
|
||||
#include <gtk/gtk.h>
|
||||
@@ -62,7 +54,7 @@ transparent_expose (GtkWidget *widget,
|
||||
* this handler is called after the red has been drawn. If it was
|
||||
* called before then GTK would just blindly paint over our work.
|
||||
*
|
||||
* Note: if the child window has children, then you need a cairo 1.6
|
||||
* Note: if the child window has children, then you need a cairo 1.16
|
||||
* feature to make this work correctly.
|
||||
*/
|
||||
static gboolean
|
||||
@@ -161,10 +153,10 @@ main (int argc, char **argv)
|
||||
]]>
|
||||
</programlisting></example>
|
||||
<para>
|
||||
In the example <xref linkend="composited-window-example"/>, a button is
|
||||
placed inside of an event box inside of a window. The event box is
|
||||
set as composited and therefore is no longer automatically drawn to
|
||||
the screen.
|
||||
In the example <xref linkend="composited-window-example"/>, a button is
|
||||
placed inside of an event box inside of a window. The event box is
|
||||
set as composited and therefore is no longer automatically drawn to
|
||||
the screen.
|
||||
</para>
|
||||
<para>
|
||||
When the contents of the event box change, an expose event is
|
||||
@@ -176,31 +168,8 @@ that it wishes.
|
||||
<para>
|
||||
In our case, we merge the contents with a 50% transparency. We
|
||||
also set the background colour of the window to red. The effect is
|
||||
that the background shows through the button.
|
||||
that the background shows through the button.
|
||||
</para>
|
||||
</refsect2>
|
||||
<refsect2 id="OFFSCREEN-WINDOWS"><title>Offscreen Windows</title>
|
||||
<para>
|
||||
Offscreen windows are more general than composited windows, since they
|
||||
allow not only to modify the rendering of the child window onto its parent,
|
||||
but also to apply coordinate transformations.
|
||||
</para>
|
||||
<para>
|
||||
To integrate an offscreen window into a window hierarchy, one has to call
|
||||
gdk_window_set_embedder() and handle a number of signals. The
|
||||
gdk_offscreen_window_set_embedder() and handle a number of signals. The
|
||||
#GdkWindow::pick-embedded-child signal on the embedder window is used to
|
||||
select an offscreen child at given coordinates, and the #GdkWindow::to-embedder
|
||||
and #GdkWindow::from-embedder signals on the offscreen window are used to
|
||||
translate coordinates between the embedder and the offscreen window.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
For rendering an offscreen window onto its embedder, the contents of the
|
||||
offscreen window are available as a pixmap, via
|
||||
gdk_offscreen_window_get_pixmap().
|
||||
</para>
|
||||
</refsect2>
|
||||
|
||||
<!-- ##### SECTION See_Also ##### -->
|
||||
<para>
|
||||
@@ -220,43 +189,6 @@ these types.
|
||||
</para>
|
||||
|
||||
|
||||
<!-- ##### SIGNAL GdkWindow::from-embedder ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@gdkwindow: the object which received the signal.
|
||||
@arg1:
|
||||
@arg2:
|
||||
@arg3:
|
||||
@arg4:
|
||||
|
||||
<!-- ##### SIGNAL GdkWindow::pick-embedded-child ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@gdkwindow: the object which received the signal.
|
||||
@arg1:
|
||||
@arg2:
|
||||
@Returns:
|
||||
|
||||
<!-- ##### SIGNAL GdkWindow::to-embedder ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@gdkwindow: the object which received the signal.
|
||||
@arg1:
|
||||
@arg2:
|
||||
@arg3:
|
||||
@arg4:
|
||||
|
||||
<!-- ##### ARG GdkWindow:cursor ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### ENUM GdkWindowType ##### -->
|
||||
<para>
|
||||
Describes the kind of window.
|
||||
@@ -268,7 +200,6 @@ Describes the kind of window.
|
||||
@GDK_WINDOW_DIALOG: useless/deprecated compatibility type
|
||||
@GDK_WINDOW_TEMP: override redirect temporary window (used to implement #GtkMenu)
|
||||
@GDK_WINDOW_FOREIGN: foreign window (see gdk_window_foreign_new())
|
||||
@GDK_WINDOW_OFFSCREEN: offscreen window (see <xref linkend="OFFSCREEN-WINDOWS"/>). Since 2.18
|
||||
|
||||
<!-- ##### ENUM GdkWindowClass ##### -->
|
||||
<para>
|
||||
@@ -566,15 +497,6 @@ Deprecated equivalent of g_object_unref()
|
||||
@window:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_window_is_destroyed ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@window:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_window_is_visible ##### -->
|
||||
<para>
|
||||
|
||||
@@ -763,23 +685,6 @@ Deprecated equivalent of g_object_unref()
|
||||
@dy:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_window_flush ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@window:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_window_ensure_native ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@window:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_window_reparent ##### -->
|
||||
<para>
|
||||
|
||||
@@ -859,16 +764,6 @@ Deprecated equivalent to gdk_draw_drawable(), see that function for docs
|
||||
@window:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_window_restack ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@window:
|
||||
@sibling:
|
||||
@above:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_window_focus ##### -->
|
||||
<para>
|
||||
|
||||
@@ -1305,15 +1200,6 @@ window.
|
||||
@cursor:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_window_get_cursor ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@window:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### MACRO gdk_window_set_colormap ##### -->
|
||||
<para>
|
||||
Deprecated equivalent to gdk_drawable_set_colormap()
|
||||
@@ -1498,18 +1384,6 @@ Deprecated equivalent of gdk_drawable_get_type().
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_window_get_root_coords ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@window:
|
||||
@x:
|
||||
@y:
|
||||
@root_x:
|
||||
@root_y:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_window_get_pointer ##### -->
|
||||
<para>
|
||||
|
||||
@@ -1785,39 +1659,12 @@ Applications should never have any reason to use this facility
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_offscreen_window_get_pixmap ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@window:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_offscreen_window_set_embedder ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@window:
|
||||
@embedder:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_offscreen_window_get_embedder ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@window:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_window_geometry_changed ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@window:
|
||||
<!--
|
||||
Local variables:
|
||||
mode: sgml
|
||||
sgml-parent-document: ("../gdk-docs.sgml" "book" "refsect2" "")
|
||||
End:
|
||||
-->
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_window_redirect_to_drawable ##### -->
|
||||
@@ -1843,11 +1690,3 @@ Applications should never have any reason to use this facility
|
||||
@window:
|
||||
|
||||
|
||||
<!--
|
||||
Local variables:
|
||||
mode: sgml
|
||||
sgml-parent-document: ("../gdk-docs.sgml" "book" "refsect2" "")
|
||||
End:
|
||||
-->
|
||||
|
||||
|
||||
|
||||
@@ -129,7 +129,6 @@ content_files = \
|
||||
drawing-model.xml \
|
||||
glossary.xml \
|
||||
migrating-checklist.sgml \
|
||||
migrating-ClientSideWindows.sgml \
|
||||
migrating-GtkAboutDialog.sgml \
|
||||
migrating-GtkAction.sgml \
|
||||
migrating-GtkAssistant.sgml \
|
||||
@@ -160,7 +159,6 @@ expand_content_files = \
|
||||
drawing-model.xml \
|
||||
glossary.xml \
|
||||
migrating-checklist.sgml \
|
||||
migrating-ClientSideWindows.sgml \
|
||||
migrating-GtkAction.sgml \
|
||||
migrating-GtkComboBox.sgml \
|
||||
migrating-GtkEntry-icons.sgml \
|
||||
@@ -170,7 +168,6 @@ expand_content_files = \
|
||||
migrating-GtkColorButton.sgml \
|
||||
migrating-GtkAssistant.sgml \
|
||||
migrating-GtkRecentChooser.sgml \
|
||||
migrating-GtkLabel-links.sgml \
|
||||
migrating-GtkLinkButton.sgml \
|
||||
migrating-GtkBuilder.sgml \
|
||||
migrating-GtkTooltip.sgml \
|
||||
@@ -348,7 +345,10 @@ HTML_IMAGES = \
|
||||
$(srcdir)/images/layout-rlbt.png \
|
||||
$(srcdir)/images/layout-rltb.png \
|
||||
$(srcdir)/images/layout-tblr.png \
|
||||
$(srcdir)/images/layout-tbrl.png
|
||||
$(srcdir)/images/layout-tbrl.png \
|
||||
$(srcdir)/images/gtk-ri-file-chooser-size-6.png \
|
||||
$(srcdir)/images/gtk-ri-file-chooser-size-12.png \
|
||||
$(srcdir)/images/gtk-ri-file-chooser-size-24.png
|
||||
|
||||
# Extra options to supply to gtkdoc-fixref
|
||||
FIXXREF_OPTIONS=--extra-dir=../gdk-pixbuf/html --extra-dir=../gdk/html \
|
||||
|
||||
@@ -126,6 +126,7 @@ that is, GUI components such as #GtkButton or #GtkTextView.
|
||||
<xi:include href="xml/gtktypeutils.xml" />
|
||||
<xi:include href="xml/gtktesting.xml" />
|
||||
<xi:include href="xml/filesystem.xml" />
|
||||
<xi:include href="xml/gtksize.xml" />
|
||||
</part>
|
||||
|
||||
<part id="gtkobjects">
|
||||
@@ -177,7 +178,6 @@ that is, GUI components such as #GtkButton or #GtkTextView.
|
||||
<chapter id="NumericEntry">
|
||||
<title>Numeric/Text Data Entry</title>
|
||||
<xi:include href="xml/gtkentry.xml" />
|
||||
<xi:include href="xml/gtkentrybuffer.xml" />
|
||||
<xi:include href="xml/gtkentrycompletion.xml" />
|
||||
<xi:include href="xml/gtkhscale.xml" />
|
||||
<xi:include href="xml/gtkvscale.xml" />
|
||||
@@ -435,7 +435,6 @@ that is, GUI components such as #GtkButton or #GtkTextView.
|
||||
<xi:include href="xml/migrating-GtkTooltip.sgml" />
|
||||
<xi:include href="xml/migrating-GtkEntry-icons.sgml" />
|
||||
<xi:include href="xml/migrating-GtkLabel-links.sgml" />
|
||||
<xi:include href="xml/migrating-ClientSideWindows.sgml" />
|
||||
</part>
|
||||
|
||||
<part>
|
||||
|
||||
@@ -328,6 +328,7 @@ GtkAlignment
|
||||
gtk_alignment_new
|
||||
gtk_alignment_set
|
||||
gtk_alignment_get_padding
|
||||
gtk_alignment_get_padding_unit
|
||||
gtk_alignment_set_padding
|
||||
<SUBSECTION Standard>
|
||||
GTK_ALIGNMENT
|
||||
@@ -471,9 +472,11 @@ gtk_box_pack_end_defaults
|
||||
gtk_box_get_homogeneous
|
||||
gtk_box_set_homogeneous
|
||||
gtk_box_get_spacing
|
||||
gtk_box_get_spacing_unit
|
||||
gtk_box_set_spacing
|
||||
gtk_box_reorder_child
|
||||
gtk_box_query_child_packing
|
||||
gtk_box_query_child_packing_unit
|
||||
gtk_box_set_child_packing
|
||||
<SUBSECTION Standard>
|
||||
GTK_BOX
|
||||
@@ -1033,6 +1036,7 @@ gtk_container_unset_focus_chain
|
||||
gtk_container_class_find_child_property
|
||||
gtk_container_class_install_child_property
|
||||
gtk_container_class_list_child_properties
|
||||
gtk_container_get_border_width_unit
|
||||
<SUBSECTION Standard>
|
||||
GTK_CONTAINER
|
||||
GTK_IS_CONTAINER
|
||||
@@ -1268,10 +1272,7 @@ gtk_old_editable_get_type
|
||||
<TITLE>GtkEntry</TITLE>
|
||||
GtkEntry
|
||||
gtk_entry_new
|
||||
gtk_entry_new_with_buffer
|
||||
gtk_entry_new_with_max_length
|
||||
gtk_entry_get_buffer
|
||||
gtk_entry_set_buffer
|
||||
gtk_entry_set_text
|
||||
gtk_entry_append_text
|
||||
gtk_entry_prepend_text
|
||||
@@ -1345,34 +1346,6 @@ GTK_ENTRY_GET_CLASS
|
||||
gtk_entry_get_type
|
||||
</SECTION>
|
||||
|
||||
<SECTION>
|
||||
<FILE>gtkentrybuffer</FILE>
|
||||
<TITLE>GtkEntryBuffer</TITLE>
|
||||
GtkEntryBuffer
|
||||
gtk_entry_buffer_new
|
||||
gtk_entry_buffer_get_text
|
||||
gtk_entry_buffer_set_text
|
||||
gtk_entry_buffer_get_bytes
|
||||
gtk_entry_buffer_get_length
|
||||
gtk_entry_buffer_get_max_length
|
||||
gtk_entry_buffer_set_max_length
|
||||
gtk_entry_buffer_insert_text
|
||||
gtk_entry_buffer_delete_text
|
||||
gtk_entry_buffer_emit_deleted_text
|
||||
gtk_entry_buffer_emit_inserted_text
|
||||
|
||||
<SUBSECTION Standard>
|
||||
GTK_ENTRY_BUFFER
|
||||
GTK_IS_ENTRY_BUFFER
|
||||
GTK_TYPE_ENTRY_BUFFER
|
||||
GTK_ENTRY_BUFFER_CLASS
|
||||
GTK_IS_ENTRY_BUFFER_CLASS
|
||||
GTK_ENTRY_BUFFER_GET_CLASS
|
||||
GTK_ENTRY_BUFFER_MAX_SIZE
|
||||
<SUBSECTION Private>
|
||||
gtk_entry_buffer_get_type
|
||||
</SECTION>
|
||||
|
||||
<SECTION>
|
||||
<FILE>gtkentrycompletion</FILE>
|
||||
<TITLE>GtkEntryCompletion</TITLE>
|
||||
@@ -1445,6 +1418,7 @@ gtk_expander_set_expanded
|
||||
gtk_expander_get_expanded
|
||||
gtk_expander_set_spacing
|
||||
gtk_expander_get_spacing
|
||||
gtk_expander_get_spacing_unit
|
||||
gtk_expander_set_label
|
||||
gtk_expander_get_label
|
||||
gtk_expander_set_use_underline
|
||||
@@ -1483,8 +1457,6 @@ gtk_file_chooser_set_show_hidden
|
||||
gtk_file_chooser_get_show_hidden
|
||||
gtk_file_chooser_set_do_overwrite_confirmation
|
||||
gtk_file_chooser_get_do_overwrite_confirmation
|
||||
gtk_file_chooser_set_create_folders
|
||||
gtk_file_chooser_get_create_folders
|
||||
gtk_file_chooser_set_current_name
|
||||
gtk_file_chooser_get_filename
|
||||
gtk_file_chooser_set_filename
|
||||
@@ -1964,16 +1936,19 @@ gtk_icon_view_set_columns
|
||||
gtk_icon_view_get_columns
|
||||
gtk_icon_view_set_item_width
|
||||
gtk_icon_view_get_item_width
|
||||
gtk_icon_view_get_item_width_unit
|
||||
gtk_icon_view_set_spacing
|
||||
gtk_icon_view_get_spacing
|
||||
gtk_icon_view_get_spacing_unit
|
||||
gtk_icon_view_set_row_spacing
|
||||
gtk_icon_view_get_row_spacing
|
||||
gtk_icon_view_get_row_spacing_unit
|
||||
gtk_icon_view_set_column_spacing
|
||||
gtk_icon_view_get_column_spacing
|
||||
gtk_icon_view_get_column_spacing_unit
|
||||
gtk_icon_view_set_margin
|
||||
gtk_icon_view_get_margin
|
||||
gtk_icon_view_set_item_padding
|
||||
gtk_icon_view_get_item_padding
|
||||
gtk_icon_view_get_margin_unit
|
||||
gtk_icon_view_select_path
|
||||
gtk_icon_view_unselect_path
|
||||
gtk_icon_view_path_is_selected
|
||||
@@ -2051,6 +2026,7 @@ gtk_image_set
|
||||
gtk_image_get
|
||||
gtk_image_set_pixel_size
|
||||
gtk_image_get_pixel_size
|
||||
gtk_image_get_pixel_size_unit
|
||||
<SUBSECTION Standard>
|
||||
GTK_IMAGE
|
||||
GTK_IS_IMAGE
|
||||
@@ -2310,8 +2286,6 @@ gtk_label_set_use_underline
|
||||
gtk_label_set_single_line_mode
|
||||
gtk_label_set_angle
|
||||
gtk_label_get_current_uri
|
||||
gtk_label_set_track_visited_links
|
||||
gtk_label_get_track_visited_links
|
||||
<SUBSECTION Standard>
|
||||
GTK_LABEL
|
||||
GTK_IS_LABEL
|
||||
@@ -2457,8 +2431,6 @@ gtk_menu_get_title
|
||||
gtk_menu_set_monitor
|
||||
gtk_menu_get_monitor
|
||||
gtk_menu_get_tearoff_state
|
||||
gtk_menu_set_reserve_toggle_size
|
||||
gtk_menu_get_reserve_toggle_size
|
||||
<SUBSECTION>
|
||||
gtk_menu_popdown
|
||||
gtk_menu_reposition
|
||||
@@ -2666,6 +2638,7 @@ gtk_misc_set_alignment
|
||||
gtk_misc_set_padding
|
||||
gtk_misc_get_alignment
|
||||
gtk_misc_get_padding
|
||||
gtk_misc_get_padding_unit
|
||||
<SUBSECTION Standard>
|
||||
GTK_MISC
|
||||
GTK_IS_MISC
|
||||
@@ -3074,8 +3047,6 @@ gtk_range_set_lower_stepper_sensitivity
|
||||
gtk_range_get_lower_stepper_sensitivity
|
||||
gtk_range_set_upper_stepper_sensitivity
|
||||
gtk_range_get_upper_stepper_sensitivity
|
||||
gtk_range_get_flippable
|
||||
gtk_range_set_flippable
|
||||
<SUBSECTION Standard>
|
||||
GTK_RANGE
|
||||
GTK_IS_RANGE
|
||||
@@ -3636,8 +3607,6 @@ gtk_status_icon_set_tooltip_markup
|
||||
gtk_status_icon_get_tooltip_markup
|
||||
gtk_status_icon_set_has_tooltip
|
||||
gtk_status_icon_get_has_tooltip
|
||||
gtk_status_icon_set_title
|
||||
gtk_status_icon_get_title
|
||||
gtk_status_icon_set_visible
|
||||
gtk_status_icon_get_visible
|
||||
gtk_status_icon_set_blinking
|
||||
@@ -3673,10 +3642,14 @@ gtk_table_set_row_spacings
|
||||
gtk_table_set_col_spacings
|
||||
gtk_table_set_homogeneous
|
||||
gtk_table_get_default_row_spacing
|
||||
gtk_table_get_default_row_spacing_unit
|
||||
gtk_table_get_homogeneous
|
||||
gtk_table_get_row_spacing
|
||||
gtk_table_get_row_spacing_unit
|
||||
gtk_table_get_col_spacing
|
||||
gtk_table_get_col_spacing_unit
|
||||
gtk_table_get_default_col_spacing
|
||||
gtk_table_get_default_col_spacing_unit
|
||||
<SUBSECTION Standard>
|
||||
GTK_TABLE
|
||||
GTK_IS_TABLE
|
||||
@@ -4056,18 +4029,24 @@ gtk_text_view_set_overwrite
|
||||
gtk_text_view_get_overwrite
|
||||
gtk_text_view_set_pixels_above_lines
|
||||
gtk_text_view_get_pixels_above_lines
|
||||
gtk_text_view_get_pixels_above_lines_unit
|
||||
gtk_text_view_set_pixels_below_lines
|
||||
gtk_text_view_get_pixels_below_lines
|
||||
gtk_text_view_get_pixels_below_lines_unit
|
||||
gtk_text_view_set_pixels_inside_wrap
|
||||
gtk_text_view_get_pixels_inside_wrap
|
||||
gtk_text_view_get_pixels_inside_wrap_unit
|
||||
gtk_text_view_set_justification
|
||||
gtk_text_view_get_justification
|
||||
gtk_text_view_set_left_margin
|
||||
gtk_text_view_get_left_margin
|
||||
gtk_text_view_get_left_margin_unit
|
||||
gtk_text_view_set_right_margin
|
||||
gtk_text_view_get_right_margin
|
||||
gtk_text_view_get_right_margin_unit
|
||||
gtk_text_view_set_indent
|
||||
gtk_text_view_get_indent
|
||||
gtk_text_view_get_indent_unit
|
||||
gtk_text_view_set_tabs
|
||||
gtk_text_view_get_tabs
|
||||
gtk_text_view_set_accepts_tab
|
||||
@@ -4792,6 +4771,7 @@ gtk_tree_view_column_set_cell_data_func
|
||||
gtk_tree_view_column_clear_attributes
|
||||
gtk_tree_view_column_set_spacing
|
||||
gtk_tree_view_column_get_spacing
|
||||
gtk_tree_view_column_get_spacing_unit
|
||||
gtk_tree_view_column_set_visible
|
||||
gtk_tree_view_column_get_visible
|
||||
gtk_tree_view_column_set_resizable
|
||||
@@ -4800,11 +4780,14 @@ gtk_tree_view_column_set_sizing
|
||||
gtk_tree_view_column_get_sizing
|
||||
gtk_tree_view_column_get_width
|
||||
gtk_tree_view_column_get_fixed_width
|
||||
gtk_tree_view_column_get_fixed_width_unit
|
||||
gtk_tree_view_column_set_fixed_width
|
||||
gtk_tree_view_column_set_min_width
|
||||
gtk_tree_view_column_get_min_width
|
||||
gtk_tree_view_column_get_min_width_unit
|
||||
gtk_tree_view_column_set_max_width
|
||||
gtk_tree_view_column_get_max_width
|
||||
gtk_tree_view_column_get_max_width_unit
|
||||
gtk_tree_view_column_clicked
|
||||
gtk_tree_view_column_set_title
|
||||
gtk_tree_view_column_get_title
|
||||
@@ -4853,6 +4836,7 @@ GtkTreeViewMappingFunc
|
||||
GtkTreeViewSearchEqualFunc
|
||||
gtk_tree_view_new
|
||||
gtk_tree_view_get_level_indentation
|
||||
gtk_tree_view_get_level_indentation_unit
|
||||
gtk_tree_view_get_show_expanders
|
||||
gtk_tree_view_set_level_indentation
|
||||
gtk_tree_view_set_show_expanders
|
||||
@@ -5027,21 +5011,17 @@ GtkCellRendererMode
|
||||
GtkCellRenderer
|
||||
GtkCellRendererClass
|
||||
gtk_cell_renderer_get_size
|
||||
gtk_cell_renderer_get_size_unit
|
||||
gtk_cell_renderer_render
|
||||
gtk_cell_renderer_activate
|
||||
gtk_cell_renderer_start_editing
|
||||
gtk_cell_renderer_editing_canceled
|
||||
gtk_cell_renderer_stop_editing
|
||||
gtk_cell_renderer_get_fixed_size
|
||||
gtk_cell_renderer_get_fixed_size_unit
|
||||
gtk_cell_renderer_set_fixed_size
|
||||
gtk_cell_renderer_get_visible
|
||||
gtk_cell_renderer_set_visible
|
||||
gtk_cell_renderer_get_sensitive
|
||||
gtk_cell_renderer_set_sensitive
|
||||
gtk_cell_renderer_get_alignment
|
||||
gtk_cell_renderer_set_alignment
|
||||
gtk_cell_renderer_get_padding
|
||||
gtk_cell_renderer_set_padding
|
||||
gtk_cell_renderer_get_tree_view_column
|
||||
gtk_cell_renderer_get_tree_view
|
||||
|
||||
<SUBSECTION Standard>
|
||||
GTK_CELL_RENDERER
|
||||
@@ -5147,9 +5127,6 @@ gtk_cell_renderer_toggle_get_radio
|
||||
gtk_cell_renderer_toggle_set_radio
|
||||
gtk_cell_renderer_toggle_get_active
|
||||
gtk_cell_renderer_toggle_set_active
|
||||
gtk_cell_renderer_toggle_get_activatable
|
||||
gtk_cell_renderer_toggle_set_activatable
|
||||
|
||||
<SUBSECTION Standard>
|
||||
GTK_CELL_RENDERER_TOGGLE
|
||||
GTK_IS_CELL_RENDERER_TOGGLE
|
||||
@@ -5579,30 +5556,15 @@ gtk_widget_set_has_tooltip
|
||||
gtk_widget_trigger_tooltip_query
|
||||
gtk_widget_get_snapshot
|
||||
gtk_widget_get_window
|
||||
gtk_widget_get_allocation
|
||||
gtk_widget_set_allocation
|
||||
gtk_widget_get_app_paintable
|
||||
gtk_widget_get_can_default
|
||||
gtk_widget_set_can_default
|
||||
gtk_widget_get_can_focus
|
||||
gtk_widget_set_can_focus
|
||||
gtk_widget_get_double_buffered
|
||||
gtk_widget_get_has_window
|
||||
gtk_widget_set_has_window
|
||||
gtk_widget_get_sensitive
|
||||
gtk_widget_is_sensitive
|
||||
gtk_widget_get_state
|
||||
gtk_widget_get_visible
|
||||
gtk_widget_set_visible
|
||||
gtk_widget_has_default
|
||||
gtk_widget_has_focus
|
||||
gtk_widget_has_grab
|
||||
gtk_widget_is_drawable
|
||||
gtk_widget_is_toplevel
|
||||
gtk_widget_set_window
|
||||
gtk_widget_set_receives_default
|
||||
gtk_widget_get_receives_default
|
||||
|
||||
gtk_widget_get_monitor_num
|
||||
gtk_widget_get_size_request_unit
|
||||
gtk_widget_size_to_pixel
|
||||
gtk_widget_size_to_pixel_double
|
||||
gtk_widget_style_get_property_unit
|
||||
gtk_widget_style_get_unit_valist
|
||||
gtk_widget_style_get_unit
|
||||
gtk_widget_get_unit_valist
|
||||
gtk_widget_get_unit
|
||||
<SUBSECTION>
|
||||
gtk_requisition_copy
|
||||
gtk_requisition_free
|
||||
@@ -5689,6 +5651,7 @@ gtk_window_get_deletable
|
||||
gtk_window_get_default_icon_list
|
||||
gtk_window_get_default_icon_name
|
||||
gtk_window_get_default_size
|
||||
gtk_window_get_default_size_unit
|
||||
gtk_window_get_destroy_with_parent
|
||||
gtk_window_get_frame_dimensions
|
||||
gtk_window_get_has_frame
|
||||
@@ -5724,6 +5687,7 @@ gtk_window_set_icon_name
|
||||
gtk_window_set_auto_startup_notification
|
||||
gtk_window_get_opacity
|
||||
gtk_window_set_opacity
|
||||
gtk_window_get_monitor_num
|
||||
<SUBSECTION Standard>
|
||||
GTK_WINDOW
|
||||
GTK_IS_WINDOW
|
||||
@@ -5892,6 +5856,9 @@ gtk_style_set_font
|
||||
gtk_style_get_style_property
|
||||
gtk_style_get_valist
|
||||
gtk_style_get
|
||||
gtk_style_get_style_property_unit
|
||||
gtk_style_get_unit_valist
|
||||
gtk_style_get_unit
|
||||
gtk_draw_hline
|
||||
gtk_draw_vline
|
||||
gtk_draw_shadow
|
||||
@@ -6568,7 +6535,10 @@ gtk_icon_set_ref
|
||||
gtk_icon_set_render_icon
|
||||
gtk_icon_set_unref
|
||||
gtk_icon_size_lookup
|
||||
gtk_icon_size_lookup_unit
|
||||
gtk_icon_size_lookup_for_settings
|
||||
gtk_icon_size_lookup_for_settings_for_monitor
|
||||
gtk_icon_size_lookup_for_settings_unit
|
||||
gtk_icon_size_register
|
||||
gtk_icon_size_register_alias
|
||||
gtk_icon_size_from_name
|
||||
@@ -6628,7 +6598,6 @@ gtk_print_operation_set_print_settings
|
||||
gtk_print_operation_get_print_settings
|
||||
gtk_print_operation_set_job_name
|
||||
gtk_print_operation_set_n_pages
|
||||
gtk_print_operation_get_n_pages_to_print
|
||||
gtk_print_operation_set_current_page
|
||||
gtk_print_operation_set_use_full_page
|
||||
gtk_print_operation_set_unit
|
||||
@@ -6647,8 +6616,6 @@ gtk_print_operation_set_support_selection
|
||||
gtk_print_operation_get_support_selection
|
||||
gtk_print_operation_set_has_selection
|
||||
gtk_print_operation_get_has_selection
|
||||
gtk_print_operation_set_embed_page_setup
|
||||
gtk_print_operation_get_embed_page_setup
|
||||
gtk_print_run_page_setup_dialog
|
||||
GtkPageSetupDoneFunc
|
||||
gtk_print_run_page_setup_dialog_async
|
||||
@@ -6697,9 +6664,6 @@ gtk_print_unix_dialog_set_support_selection
|
||||
gtk_print_unix_dialog_get_support_selection
|
||||
gtk_print_unix_dialog_set_has_selection
|
||||
gtk_print_unix_dialog_get_has_selection
|
||||
gtk_print_unix_dialog_set_embed_page_setup
|
||||
gtk_print_unix_dialog_get_embed_page_setup
|
||||
gtk_print_unix_dialog_get_page_setup_set
|
||||
GtkPrintCapabilities
|
||||
gtk_print_unix_dialog_set_manual_capabilities
|
||||
gtk_print_unix_dialog_get_manual_capabilities
|
||||
@@ -7120,3 +7084,31 @@ GTK_TYPE_ORIENTABLE
|
||||
<SUBSECTION Private>
|
||||
gtk_orientable_get_type
|
||||
</SECTION>
|
||||
|
||||
<SECTION>
|
||||
<TITLE>Units</TITLE>
|
||||
<FILE>gtksize</FILE>
|
||||
GtkSize
|
||||
GtkUSize
|
||||
GtkSizeUnit
|
||||
gtk_size_em
|
||||
gtk_size_mm
|
||||
gtk_size_get_em
|
||||
gtk_size_get_mm
|
||||
GTK_SIZE_ONE_TWELFTH_EM
|
||||
GTK_SIZE_MAXPIXEL
|
||||
GTK_SIZE_MINPIXEL
|
||||
gtk_size_get_unit
|
||||
gtk_size_to_pixel
|
||||
gtk_size_to_pixel_double
|
||||
gtk_size_to_string
|
||||
gtk_param_spec_size
|
||||
gtk_value_set_size
|
||||
gtk_value_get_size
|
||||
gtk_value_size_skip_conversion
|
||||
gtk_param_spec_usize
|
||||
gtk_value_set_usize
|
||||
gtk_value_get_usize
|
||||
gtk_value_usize_skip_conversion
|
||||
gtk_enable_resolution_independence
|
||||
</SECTION>
|
||||
|
||||
@@ -48,7 +48,6 @@ gtk_curve_get_type
|
||||
gtk_dialog_get_type
|
||||
gtk_drawing_area_get_type
|
||||
gtk_editable_get_type
|
||||
gtk_entry_buffer_get_type
|
||||
gtk_entry_completion_get_type
|
||||
gtk_entry_get_type
|
||||
gtk_event_box_get_type
|
||||
|
||||
BIN
docs/reference/gtk/images/gtk-ri-file-chooser-size-12.png
Normal file
BIN
docs/reference/gtk/images/gtk-ri-file-chooser-size-12.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 60 KiB |
BIN
docs/reference/gtk/images/gtk-ri-file-chooser-size-24.png
Normal file
BIN
docs/reference/gtk/images/gtk-ri-file-chooser-size-24.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 135 KiB |
BIN
docs/reference/gtk/images/gtk-ri-file-chooser-size-6.png
Normal file
BIN
docs/reference/gtk/images/gtk-ri-file-chooser-size-6.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 26 KiB |
@@ -1,70 +0,0 @@
|
||||
<?xml version="1.0"?>
|
||||
<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN"
|
||||
"http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd" [
|
||||
]>
|
||||
<chapter id="gtk-migrating-ClientSideWindows">
|
||||
|
||||
<title>Migrating to client-side windows</title>
|
||||
|
||||
<para>
|
||||
In version 2.18, GDK has been changed to use client-side windows. This
|
||||
means that there is no longer a 1-1 correspondence between #GdkWindows
|
||||
and windows in the underlying window system. In particular, it is no
|
||||
longer correct to assume that each window has an associated XID.
|
||||
Code that makes this assumption can sometimes be fixed by calling
|
||||
gdk_window_ensure_native() on the windows in question.
|
||||
Calling gdk_x11_drawable_get_xid() (or GDK_WINDOW_XID()) from the
|
||||
X11-specific API on a non-native window will explicitly call
|
||||
gdk_window_ensure_native(), so old code using this will continue to
|
||||
work. A small gotcha is that the GDK_WINDOW_XID() call is no longer a
|
||||
trivial accessor for the XID of the window, and thus must not be called
|
||||
from another thread without taking locking precautions.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
GDK looks for the <envar>GDK_NATIVE_WINDOWS</envar> environment variable
|
||||
and makes all windows native if it is set. It also tries to be more
|
||||
compatible with the way prior versions worked in some other ways.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
Some applications assume that they can just operate on the X windows
|
||||
corresponding to their GDK windows without ever telling GDK. One
|
||||
example that we've seen is changing the child window stacking order
|
||||
using XRestackWindows(). Fixing this properly requires to fix the code
|
||||
to use GDK functions to achieve whatever it is trying to achieve.
|
||||
To make this easier in the case of stacking order changes, we've added
|
||||
a gdk_window_restack() function.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
One change that can cause problems for some applications is that GDK
|
||||
is more aggressive about optimizing away expose events. Code that does
|
||||
more than just repainting exposed areas in response to expose events
|
||||
may be affected by this.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
Problems can also occur when using cairo for drawing. One thing that can
|
||||
go wrong is clip handling. If you ever need to reset the clip region on
|
||||
a cairo_t (i.e. use cairo_reset_clip()), you have to to use
|
||||
gdk_cairo_reset_clip() instead. The reason for this is that the cairo_reset_clip() call will remove the initial clip region that limits your drawing to
|
||||
the client-side window at hand, so you will end up drawing over stuff
|
||||
outside the window. You also need to use gdk_cairo_reset_clip() if you
|
||||
use a cairo_t that was not allocated in a double-buffered expose handler
|
||||
and keep it in use after window hierarchy changes (resizing, moving,
|
||||
stacking order changes). The easiest fix for this kind of problem is to
|
||||
simply create a new cairo context for each expose event.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
Due to a weird API in XClearArea the gdk_window_clear_area() call handled
|
||||
a specified width or height of zero to mean "to end of window" for
|
||||
non-double-buffered drawing. This has been changed to be consistent with
|
||||
the docs and what happens in the double-buffered case. All code in GTK+
|
||||
that relied on this has been fixed, but it is possible (although unlikely)
|
||||
that third party applications rely on this. If you need to do this, just
|
||||
implement it yourself using gdk_drawable_get_size().
|
||||
</para>
|
||||
|
||||
</chapter>
|
||||
@@ -13,18 +13,21 @@
|
||||
</para>
|
||||
|
||||
<para>
|
||||
A good way to start a migration from libglade to GtkBuilder is using
|
||||
<application>glade3</application> to convert your .glade file.
|
||||
If your code uses the @root parameter of glade_xml_new(),
|
||||
you can use gtk_builder_add_objects_from_file() to construct only certain
|
||||
A good way to start a migration from libglade to GtkBuilder is
|
||||
to run the <link linkend="gtk-builder-convert">gtk-builder-convert</link>
|
||||
utility on your glade file, and inspect the resulting output.
|
||||
If your code uses the @root parameter of glade_xml_new(), you
|
||||
may want to split your glade file into multiple GtkBuilder files
|
||||
by using the <option>--root</option> option of
|
||||
<application>gtk-builder-convert</application>. Alternatively, you
|
||||
can use gtk_builder_add_objects_from_file() to construct only certain
|
||||
objects from a GtkBuilder file.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
Alternatively, GTK+ also offers the
|
||||
<link linkend="gtk-builder-convert">gtk-builder-convert</link> script you can use
|
||||
to do the conversion; in which case you should be careful to inspect the output
|
||||
and make sure you didn't lose any data.
|
||||
Alternatively, you can open the glade file with
|
||||
<application>glade3</application> and then save it in GtkBuilder
|
||||
format. This is supported by glade3 since version 3.6.
|
||||
</para>
|
||||
|
||||
<table pgwide="1" frame="topbot">
|
||||
@@ -50,7 +53,7 @@ GError* error = NULL;
|
||||
GtkBuilder* builder = gtk_builder_new (<!-- -->);
|
||||
if (!gtk_builder_add_from_file (builder, FILE, &error))
|
||||
{
|
||||
g_warning ("Couldn't load builder file: %s", error->message);
|
||||
g_warning ("Couldn't load builder file: %amp;s", error->message);
|
||||
g_error_free (error);
|
||||
}
|
||||
</screen>
|
||||
|
||||
@@ -7,10 +7,10 @@
|
||||
<title>Migrating from SexyIconEntry to GtkEntry</title>
|
||||
|
||||
<para>
|
||||
GTK+ 2.16 supports showing icons inside a #GtkEntry, similar to
|
||||
SexyIconEntry. Porting from SexyIconEntry to GtkEntry is relatively
|
||||
straightforward. The main difference between the two APIs is that
|
||||
SexyIconEntry uses #GtkImage widgets in a somewhat awkward way as
|
||||
GTK+ 2.16 supports showing icons inside a #GtkEntry, similar to
|
||||
SexyIconEntry. Porting from SexyIconEntry to GtkEntry is relatively
|
||||
straightforward. The main difference between the two APIs is that
|
||||
SexyIconEntry uses #GtkImage widgets in a somewhat awkward way as
|
||||
storage vehicles for icons, while GtkEntry allows to specify icons
|
||||
via pixbufs, stock ids, icon names or #GIcons. So, if your code uses
|
||||
e.g.:
|
||||
@@ -130,7 +130,7 @@ text_changed_cb (GtkEntry *entry,
|
||||
gtk_entry_set_icon_from_stock (GTK_ENTRY (entry),
|
||||
GTK_ENTRY_ICON_SECONDARY,
|
||||
GTK_STOCK_CLEAR);
|
||||
g_signal_connect (entry, "icon-press",
|
||||
g_signal_connect (entry, "icon-pressed",
|
||||
G_CALLBACK (icon_pressed_cb), NULL);
|
||||
g_signal_connect (entry, "notify::text",
|
||||
G_CALLBACK (text_changed_cb), find_button);
|
||||
|
||||
@@ -130,7 +130,7 @@
|
||||
<structname>GtkIconView</structname>:
|
||||
<itemizedlist>
|
||||
<listitem><para>
|
||||
<type>GnomeIconListMode</type> is replaced by the
|
||||
<typename>GnomeIconListMode</typename> is replaced by the
|
||||
<link linkend="GtkIconView--orientation">orientation</link>
|
||||
property of <structname>GtkIconView</structname>
|
||||
</para></listitem>
|
||||
|
||||
@@ -341,16 +341,6 @@ nevertheless.
|
||||
</para>
|
||||
</formalpara>
|
||||
|
||||
<formalpara>
|
||||
<title><envar>GDK_NATIVE_WINDOWS</envar></title>
|
||||
|
||||
<para>
|
||||
If set, GDK creates all windows as native windows. This can help
|
||||
applications that make assumptions about 1-1 correspondence between
|
||||
GDK windows and X11 windows.
|
||||
</para>
|
||||
</formalpara>
|
||||
|
||||
<formalpara>
|
||||
<title><envar>XDG_DATA_HOME</envar>, <envar>XDG_DATA_DIRS</envar></title>
|
||||
|
||||
|
||||
@@ -1033,25 +1033,6 @@ You may not attach these to signals created with the
|
||||
</para>
|
||||
|
||||
|
||||
<!-- ##### STRUCT GtkEntryBufferClass ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@parent_class:
|
||||
@inserted_text:
|
||||
@deleted_text:
|
||||
@get_text:
|
||||
@get_length:
|
||||
@insert_text:
|
||||
@delete_text:
|
||||
@_gtk_reserved0:
|
||||
@_gtk_reserved1:
|
||||
@_gtk_reserved2:
|
||||
@_gtk_reserved3:
|
||||
@_gtk_reserved4:
|
||||
@_gtk_reserved5:
|
||||
|
||||
<!-- ##### ARG GtkFileChooser:file-system ##### -->
|
||||
<para>
|
||||
|
||||
@@ -3885,6 +3866,14 @@ fundamental type.
|
||||
@group_cycling:
|
||||
@Returns:
|
||||
|
||||
<!-- ##### FUNCTION gtk_widget_get_allocation ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@widget:
|
||||
@Returns:
|
||||
|
||||
<!-- ##### FUNCTION gtk_widget_get_usize ##### -->
|
||||
<para>
|
||||
|
||||
|
||||
@@ -282,79 +282,3 @@ it cannot be individually modified.
|
||||
@height:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_cell_renderer_get_visible ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@cell:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_cell_renderer_set_visible ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@cell:
|
||||
@visible:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_cell_renderer_get_sensitive ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@cell:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_cell_renderer_set_sensitive ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@cell:
|
||||
@sensitive:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_cell_renderer_get_alignment ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@cell:
|
||||
@xalign:
|
||||
@yalign:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_cell_renderer_set_alignment ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@cell:
|
||||
@xalign:
|
||||
@yalign:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_cell_renderer_get_padding ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@cell:
|
||||
@xpad:
|
||||
@ypad:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_cell_renderer_set_padding ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@cell:
|
||||
@xpad:
|
||||
@ypad:
|
||||
|
||||
|
||||
|
||||
@@ -103,21 +103,3 @@ property. When activated, it emits the toggled signal.
|
||||
@setting:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_cell_renderer_toggle_get_activatable ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@toggle:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_cell_renderer_toggle_set_activatable ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@toggle:
|
||||
@setting:
|
||||
|
||||
|
||||
|
||||
@@ -173,11 +173,6 @@ The #GtkEntry-struct struct contains only private data.
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### ARG GtkEntry:buffer ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### ARG GtkEntry:caps-lock-warning ##### -->
|
||||
<para>
|
||||
|
||||
@@ -406,15 +401,6 @@ The #GtkEntry-struct struct contains only private data.
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_entry_new_with_buffer ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@buffer:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_entry_new_with_max_length ##### -->
|
||||
<para>
|
||||
</para>
|
||||
@@ -423,24 +409,6 @@ The #GtkEntry-struct struct contains only private data.
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_entry_get_buffer ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@entry:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_entry_set_buffer ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@entry:
|
||||
@buffer:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_entry_set_text ##### -->
|
||||
<para>
|
||||
|
||||
|
||||
@@ -1,168 +0,0 @@
|
||||
<!-- ##### SECTION Title ##### -->
|
||||
GtkEntryBuffer
|
||||
|
||||
<!-- ##### SECTION Short_Description ##### -->
|
||||
|
||||
|
||||
<!-- ##### SECTION Long_Description ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### SECTION See_Also ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### SECTION Stability_Level ##### -->
|
||||
|
||||
|
||||
<!-- ##### STRUCT GtkEntryBuffer ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
|
||||
<!-- ##### SIGNAL GtkEntryBuffer::deleted-text ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@entrybuffer: the object which received the signal.
|
||||
@arg1:
|
||||
@arg2:
|
||||
|
||||
<!-- ##### SIGNAL GtkEntryBuffer::inserted-text ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@entrybuffer: the object which received the signal.
|
||||
@arg1:
|
||||
@arg2:
|
||||
@arg3:
|
||||
|
||||
<!-- ##### ARG GtkEntryBuffer:length ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### ARG GtkEntryBuffer:max-length ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### ARG GtkEntryBuffer:text ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### FUNCTION gtk_entry_buffer_new ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@initial_chars:
|
||||
@n_initial_chars:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_entry_buffer_get_text ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@buffer:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_entry_buffer_set_text ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@buffer:
|
||||
@chars:
|
||||
@n_chars:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_entry_buffer_get_bytes ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@buffer:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_entry_buffer_get_length ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@buffer:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_entry_buffer_get_max_length ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@buffer:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_entry_buffer_set_max_length ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@buffer:
|
||||
@max_length:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_entry_buffer_insert_text ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@buffer:
|
||||
@position:
|
||||
@chars:
|
||||
@n_chars:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_entry_buffer_delete_text ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@buffer:
|
||||
@position:
|
||||
@n_chars:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_entry_buffer_emit_deleted_text ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@buffer:
|
||||
@position:
|
||||
@n_chars:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_entry_buffer_emit_inserted_text ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@buffer:
|
||||
@position:
|
||||
@chars:
|
||||
@n_chars:
|
||||
|
||||
|
||||
@@ -677,11 +677,6 @@ gtk_widget_destroy (chooser);
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### ARG GtkFileChooser:create-folders ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### ARG GtkFileChooser:do-overwrite-confirmation ##### -->
|
||||
<para>
|
||||
|
||||
@@ -880,24 +875,6 @@ gtk_widget_destroy (chooser);
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_file_chooser_set_create_folders ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@chooser:
|
||||
@create_folders:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_file_chooser_get_create_folders ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@chooser:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_file_chooser_set_current_name ##### -->
|
||||
<para>
|
||||
|
||||
|
||||
@@ -109,11 +109,6 @@ private fields and should not be directly accessed.
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### ARG GtkIconView:item-padding ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### ARG GtkIconView:item-width ##### -->
|
||||
<para>
|
||||
|
||||
@@ -496,24 +491,6 @@ selected rows. It will be called on every selected row in the view.
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_icon_view_set_item_padding ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@icon_view:
|
||||
@item_padding:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_icon_view_get_item_padding ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@icon_view:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_icon_view_select_path ##### -->
|
||||
<para>
|
||||
|
||||
|
||||
@@ -196,7 +196,7 @@ functions), but they will all return %NULL values.
|
||||
@GTK_IMAGE_ANIMATION: the widget contains a #GdkPixbufAnimation
|
||||
@GTK_IMAGE_ICON_NAME: the widget contains a named icon.
|
||||
This image type was added in GTK+ 2.6
|
||||
@GTK_IMAGE_GICON: the widget contains a #GIcon.
|
||||
@GTK_IMAGE_GICON: the widgte contains a #GIcon.
|
||||
This image type was added in GTK+ 2.14
|
||||
|
||||
<!-- ##### FUNCTION gtk_image_get_icon_set ##### -->
|
||||
|
||||
@@ -301,11 +301,6 @@ described below.
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### ARG GtkLabel:track-visited-links ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### ARG GtkLabel:use-markup ##### -->
|
||||
<para>
|
||||
|
||||
@@ -751,21 +746,3 @@ Sets the text within the GtkLabel widget.
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_label_set_track_visited_links ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@label:
|
||||
@track_links:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_label_get_track_visited_links ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@label:
|
||||
@Returns:
|
||||
|
||||
|
||||
|
||||
@@ -119,11 +119,6 @@ should be accessed using the functions below.
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### ARG GtkMenu:reserve-toggle-size ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### ARG GtkMenu:tearoff-state ##### -->
|
||||
<para>
|
||||
|
||||
@@ -359,24 +354,6 @@ See gtk_menu_set_accel_group().
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_menu_set_reserve_toggle_size ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@menu:
|
||||
@reserve_toggle_size:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_menu_get_reserve_toggle_size ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@menu:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_menu_popdown ##### -->
|
||||
<para>
|
||||
Removes the menu from the screen.
|
||||
|
||||
@@ -19,21 +19,19 @@ A GtkToolItem containing a button with an additional dropdown menu
|
||||
|
||||
<!-- ##### SECTION See_Also ##### -->
|
||||
<para>
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term>#GtkToolbar</term>
|
||||
<listitem><para>The toolbar widget</para></listitem>
|
||||
<term>#GtkToolButton</term>
|
||||
<listitem>
|
||||
<para>
|
||||
The parent class of #GtkMenuToolButton. The properties
|
||||
"label_widget", "label", "icon_widget", and "stock_id" on
|
||||
#GtkToolButton determine the label and icon used on
|
||||
#GtkMenuToolButton<!-- -->s.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
<varlistentry>
|
||||
<term>#GtkToolbar</term>
|
||||
<listitem><para>The toolbar widget</para></listitem>
|
||||
<term>#GtkToolButton</term>
|
||||
<listitem>
|
||||
<para>
|
||||
The parent class of #GtkMenuToolButton. The properties
|
||||
"label_widget", "label", "icon_widget", and "stock_id" on
|
||||
#GtkToolButton determine the label and icon used on
|
||||
#GtkMenuToolButton<!-- -->s.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</para>
|
||||
|
||||
<!-- ##### SECTION Stability_Level ##### -->
|
||||
|
||||
@@ -208,11 +208,6 @@ Printing support was added in GTK+ 2.10.
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### ARG GtkPrintOperation:embed-page-setup ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### ARG GtkPrintOperation:export-filename ##### -->
|
||||
<para>
|
||||
|
||||
@@ -233,11 +228,6 @@ Printing support was added in GTK+ 2.10.
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### ARG GtkPrintOperation:n-pages-to-print ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### ARG GtkPrintOperation:print-settings ##### -->
|
||||
<para>
|
||||
|
||||
@@ -424,15 +414,6 @@ The #GQuark used for #GtkPrintError errors.
|
||||
@n_pages:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_print_operation_get_n_pages_to_print ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@op:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_print_operation_set_current_page ##### -->
|
||||
<para>
|
||||
|
||||
@@ -595,24 +576,6 @@ The #GQuark used for #GtkPrintError errors.
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_print_operation_set_embed_page_setup ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@op:
|
||||
@embed:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_print_operation_get_embed_page_setup ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@op:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_print_run_page_setup_dialog ##### -->
|
||||
<para>
|
||||
|
||||
|
||||
@@ -90,11 +90,6 @@ The GtkPrintUnixDialog implementation of the GtkBuildable interface exposes its
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### ARG GtkPrintUnixDialog:embed-page-setup ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### ARG GtkPrintUnixDialog:has-selection ##### -->
|
||||
<para>
|
||||
|
||||
@@ -244,33 +239,6 @@ The GtkPrintUnixDialog implementation of the GtkBuildable interface exposes its
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_print_unix_dialog_set_embed_page_setup ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@dialog:
|
||||
@embed:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_print_unix_dialog_get_embed_page_setup ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@dialog:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_print_unix_dialog_get_page_setup_set ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@dialog:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### ENUM GtkPrintCapabilities ##### -->
|
||||
<para>
|
||||
An enum for specifying which features the print dialog should offer.
|
||||
@@ -288,7 +256,7 @@ formats are supported.
|
||||
the printer in PDF format
|
||||
@GTK_PRINT_CAPABILITY_GENERATE_PS: The program will send the document to
|
||||
the printer in Postscript format
|
||||
@GTK_PRINT_CAPABILITY_PREVIEW: Print dialog will offer a preview
|
||||
@GTK_PRINT_CAPABILITY_PREVIEW: Print dialog will offer a previe
|
||||
@GTK_PRINT_CAPABILITY_NUMBER_UP: Print dialog will offer printing multiple
|
||||
pages per sheet. Since 2.12
|
||||
@GTK_PRINT_CAPABILITY_NUMBER_UP_LAYOUT: Print dialog will allow to rearrange
|
||||
|
||||
@@ -346,21 +346,3 @@ at the end of range widgets.
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_range_get_flippable ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@range:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_range_set_flippable ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@range:
|
||||
@flippable:
|
||||
|
||||
|
||||
|
||||
@@ -23,7 +23,7 @@ realized at least once. The following example demonstrates a way to do this:
|
||||
<informalexample><programlisting>
|
||||
gtk_init (&argc, &argv);
|
||||
|
||||
/* make sure the type is realized */
|
||||
/* make sure the type is realized &ast/
|
||||
g_type_class_unref (g_type_class_ref (GTK_TYPE_IMAGE_MENU_ITEM));
|
||||
|
||||
g_object_set (gtk_settings_get_default (), "gtk-menu-images", FALSE, NULL);
|
||||
|
||||
229
docs/reference/gtk/tmpl/gtksize.sgml
Normal file
229
docs/reference/gtk/tmpl/gtksize.sgml
Normal file
@@ -0,0 +1,229 @@
|
||||
<!-- ##### SECTION Title ##### -->
|
||||
Units
|
||||
|
||||
<!-- ##### SECTION Short_Description ##### -->
|
||||
|
||||
|
||||
<!-- ##### SECTION Long_Description ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### SECTION See_Also ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### SECTION Stability_Level ##### -->
|
||||
|
||||
|
||||
<!-- ##### TYPEDEF GtkSize ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
|
||||
<!-- ##### TYPEDEF GtkUSize ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
|
||||
<!-- ##### ENUM GtkSizeUnit ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@GTK_SIZE_UNIT_PIXEL:
|
||||
@GTK_SIZE_UNIT_EM:
|
||||
@GTK_SIZE_UNIT_MM:
|
||||
|
||||
<!-- ##### FUNCTION gtk_size_em ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@em:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_size_mm ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@mm:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_size_get_em ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@size:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_size_get_mm ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@size:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### MACRO GTK_SIZE_ONE_TWELFTH_EM ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@value:
|
||||
|
||||
|
||||
<!-- ##### MACRO GTK_SIZE_MAXPIXEL ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
|
||||
|
||||
<!-- ##### MACRO GTK_SIZE_MINPIXEL ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_size_get_unit ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@size:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_size_to_pixel ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@screen:
|
||||
@monitor_num:
|
||||
@size:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_size_to_pixel_double ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@screen:
|
||||
@monitor_num:
|
||||
@size:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_size_to_string ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@size:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_param_spec_size ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@name:
|
||||
@nick:
|
||||
@blurb:
|
||||
@minimum:
|
||||
@maximum:
|
||||
@default_value:
|
||||
@flags:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_value_set_size ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@value:
|
||||
@v_size:
|
||||
@widget:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_value_get_size ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@value:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_value_size_skip_conversion ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@value:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_param_spec_usize ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@name:
|
||||
@nick:
|
||||
@blurb:
|
||||
@minimum:
|
||||
@maximum:
|
||||
@default_value:
|
||||
@flags:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_value_set_usize ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@value:
|
||||
@v_size:
|
||||
@widget:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_value_get_usize ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@value:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_value_usize_skip_conversion ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@value:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_enable_resolution_independence ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
|
||||
|
||||
@@ -172,11 +172,6 @@ on Win32 doesn't allow to embed arbitrary widgets.
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### ARG GtkStatusIcon:title ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### ARG GtkStatusIcon:tooltip-markup ##### -->
|
||||
<para>
|
||||
|
||||
@@ -425,24 +420,6 @@ on Win32 doesn't allow to embed arbitrary widgets.
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_status_icon_set_title ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@status_icon:
|
||||
@title:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_status_icon_get_title ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@status_icon:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_status_icon_set_visible ##### -->
|
||||
<para>
|
||||
|
||||
|
||||
@@ -19,27 +19,25 @@ A GtkToolItem containing a toggle button
|
||||
<!-- ##### SECTION See_Also ##### -->
|
||||
|
||||
<para>
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term>#GtkToolbar</term>
|
||||
<listitem><para>The toolbar widget</para></listitem>
|
||||
<term>#GtkToolButton</term>
|
||||
<listitem>
|
||||
<para>
|
||||
The parent class of #GtkToggleToolButton. The properties
|
||||
"label_widget", "label", "icon_widget", and "stock_id" on
|
||||
#GtkToolButton determine the label and icon used on
|
||||
#GtkToggleToolButton<!-- -->s.
|
||||
</para>
|
||||
</listitem>
|
||||
<term>#GtkSeparatorToolItem</term>
|
||||
<listitem>
|
||||
<para>A subclass of #GtkToolItem that separates groups of
|
||||
items on a toolbar.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
<varlistentry>
|
||||
<term>#GtkToolbar</term>
|
||||
<listitem><para>The toolbar widget</para></listitem>
|
||||
<term>#GtkToolButton</term>
|
||||
<listitem>
|
||||
<para>
|
||||
The parent class of #GtkToggleToolButton. The properties
|
||||
"label_widget", "label", "icon_widget", and "stock_id" on
|
||||
#GtkToolButton determine the label and icon used on
|
||||
#GtkToggleToolButton<!-- -->s.
|
||||
</para>
|
||||
</listitem>
|
||||
<term>#GtkSeparatorToolItem</term>
|
||||
<listitem>
|
||||
<para>A subclass of #GtkToolItem that separates groups of
|
||||
items on a toolbar.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</para>
|
||||
|
||||
<!-- ##### SECTION Stability_Level ##### -->
|
||||
|
||||
@@ -12,6 +12,23 @@ GtkToolItem
|
||||
<!-- ##### SECTION See_Also ##### -->
|
||||
<para>
|
||||
|
||||
<varlistentry>
|
||||
<term>#GtkToolbar</term>
|
||||
<listitem><para>The toolbar widget</para></listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term>#GtkToolButton</term>
|
||||
<listitem><para>A subclass of #GtkToolItem that displays buttons on
|
||||
the toolbar</para></listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term>#GtkSeparatorToolItem</term>
|
||||
<listitem><para>A subclass of #GtkToolItem that separates groups of
|
||||
items on a toolbar</para></listitem>
|
||||
</varlistentry>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### SECTION Stability_Level ##### -->
|
||||
|
||||
@@ -112,11 +112,6 @@ calling gtk_tree_view_column_set_cell_data_func()
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### ARG GtkTreeViewColumn:sort-column-id ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### ARG GtkTreeViewColumn:sort-indicator ##### -->
|
||||
<para>
|
||||
|
||||
|
||||
@@ -693,11 +693,6 @@ internal child "accessible" of a <structname>GtkWidget</structname>.
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### ARG GtkWidget:double-buffered ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### ARG GtkWidget:events ##### -->
|
||||
<para>
|
||||
|
||||
@@ -2641,213 +2636,6 @@ This function is deprecated; it does nothing.
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_widget_get_allocation ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@widget:
|
||||
@allocation:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_widget_set_allocation ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@widget:
|
||||
@allocation:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_widget_get_app_paintable ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@widget:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_widget_get_can_default ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@widget:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_widget_set_can_default ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@widget:
|
||||
@can_default:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_widget_get_can_focus ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@widget:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_widget_set_can_focus ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@widget:
|
||||
@can_focus:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_widget_get_double_buffered ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@widget:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_widget_get_has_window ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@widget:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_widget_set_has_window ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@widget:
|
||||
@has_window:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_widget_get_sensitive ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@widget:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_widget_is_sensitive ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@widget:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_widget_get_state ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@widget:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_widget_get_visible ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@widget:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_widget_set_visible ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@widget:
|
||||
@visible:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_widget_has_default ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@widget:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_widget_has_focus ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@widget:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_widget_has_grab ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@widget:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_widget_is_drawable ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@widget:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_widget_is_toplevel ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@widget:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_widget_set_window ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@widget:
|
||||
@window:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_widget_set_receives_default ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@widget:
|
||||
@receives_default:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_widget_get_receives_default ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@widget:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_requisition_copy ##### -->
|
||||
<para>
|
||||
|
||||
|
||||
@@ -37,14 +37,14 @@ source code release of GTK+. For binary distributions, please check with
|
||||
your vendor.</para>
|
||||
|
||||
<para>A copy is available online for reference at <ulink
|
||||
url="http://www.gtk.org/documentation.html#Tutorials">http://www.gtk.org/documentation.html#Tutorials</ulink>. You can also find other GTK+ tutorials there.</para>
|
||||
url="http://www.gtk.org/tutorial/">http://www.gtk.org/tutorial</ulink>.</para>
|
||||
|
||||
<para>A packaged version of this tutorial is available from
|
||||
<para>A packaged verion of this tutorial is available from
|
||||
<ulink url="ftp://ftp.gtk.org/pub/gtk/tutorial/">
|
||||
ftp://ftp.gtk.org/pub/gtk/tutorial</ulink> which contains the tutorial in
|
||||
various different formats. This package is primary for those people wanting
|
||||
to have the tutorial available for offline reference and for printing. Note
|
||||
that the packaged version may be older than the online version.</para>
|
||||
various different formats. This
|
||||
package is primary for those people wanting to have the tutorial
|
||||
available for offline reference and for printing.</para>
|
||||
|
||||
</chapter>
|
||||
|
||||
|
||||
@@ -277,13 +277,6 @@ correct_prefix (gchar **path)
|
||||
if (strncmp (*path, GTK_PREFIX "/", strlen (GTK_PREFIX "/")) == 0 ||
|
||||
strncmp (*path, GTK_PREFIX "\\", strlen (GTK_PREFIX "\\")) == 0)
|
||||
{
|
||||
gchar *tem = NULL;
|
||||
if (strlen(*path) > 5 && strncmp (*path - 5, ".libs", 5) == 0)
|
||||
{
|
||||
/* We are being run from inside the build tree, and shouldn't mess about. */
|
||||
return;
|
||||
}
|
||||
|
||||
/* This is an entry put there by gdk-pixbuf-query-loaders on the
|
||||
* packager's system. On Windows a prebuilt GTK+ package can be
|
||||
* installed in a random location. The gdk-pixbuf.loaders file
|
||||
@@ -291,7 +284,7 @@ correct_prefix (gchar **path)
|
||||
* builder's machine. Replace the build-time prefix with the
|
||||
* installation prefix on this machine.
|
||||
*/
|
||||
tem = *path;
|
||||
gchar *tem = *path;
|
||||
*path = g_strconcat (get_toplevel (), tem + strlen (GTK_PREFIX), NULL);
|
||||
g_free (tem);
|
||||
}
|
||||
@@ -2459,7 +2452,7 @@ gchar *
|
||||
gdk_pixbuf_format_get_description (GdkPixbufFormat *format)
|
||||
{
|
||||
gchar *domain;
|
||||
const gchar *description;
|
||||
gchar *description;
|
||||
g_return_val_if_fail (format != NULL, NULL);
|
||||
|
||||
if (format->domain != NULL)
|
||||
|
||||
@@ -353,6 +353,7 @@ gdip_buffer_to_bitmap (const gchar *buffer, size_t size, GError **error)
|
||||
if (!hg)
|
||||
return NULL;
|
||||
|
||||
IStream_SetSize (stream, *(ULARGE_INTEGER *)&size64);
|
||||
hr = CreateStreamOnHGlobal (hg, FALSE, (LPSTREAM *)&stream);
|
||||
|
||||
if (!SUCCEEDED (hr)) {
|
||||
@@ -360,9 +361,7 @@ gdip_buffer_to_bitmap (const gchar *buffer, size_t size, GError **error)
|
||||
GlobalFree (hg);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
IStream_SetSize (stream, *(ULARGE_INTEGER *)&size64);
|
||||
|
||||
|
||||
status = GdipCreateBitmapFromStream (stream, &bitmap);
|
||||
|
||||
if (Ok != status)
|
||||
|
||||
@@ -220,7 +220,7 @@ gif_read (GifContext *context, guchar *buffer, size_t len)
|
||||
G_FILE_ERROR,
|
||||
g_file_error_from_errno (save_errno),
|
||||
_("Failure reading GIF: %s"),
|
||||
g_strerror (save_errno));
|
||||
strerror (save_errno));
|
||||
}
|
||||
|
||||
#ifdef IO_GIFDEBUG
|
||||
|
||||
@@ -468,6 +468,7 @@ gdk_pixbuf__jpeg_image_load (FILE *f, GError **error)
|
||||
cinfo.err = jpeg_std_error (&jerr.pub);
|
||||
jerr.pub.error_exit = fatal_error_handler;
|
||||
jerr.pub.output_message = output_message_handler;
|
||||
|
||||
jerr.error = error;
|
||||
|
||||
if (sigsetjmp (jerr.setjmp_buffer, 1)) {
|
||||
@@ -1189,11 +1190,11 @@ real_save_jpeg (GdkPixbuf *pixbuf,
|
||||
}
|
||||
|
||||
/* set up error handling */
|
||||
cinfo.err = jpeg_std_error (&(jerr.pub));
|
||||
jerr.pub.error_exit = fatal_error_handler;
|
||||
jerr.pub.output_message = output_message_handler;
|
||||
jerr.error = error;
|
||||
|
||||
cinfo.err = jpeg_std_error (&(jerr.pub));
|
||||
if (sigsetjmp (jerr.setjmp_buffer, 1)) {
|
||||
jpeg_destroy_compress (&cinfo);
|
||||
g_free (buf);
|
||||
|
||||
@@ -596,7 +596,7 @@ pixbuf_create_from_xpm (const gchar * (*get_buf) (enum buf_op op, gpointer handl
|
||||
if ((!buffer) || (strlen (buffer) < wbytes))
|
||||
continue;
|
||||
|
||||
for (n = 0, xcnt = 0; n < wbytes; n += cpp, xcnt++) {
|
||||
for (n = 0, cnt = 0, xcnt = 0; n < wbytes; n += cpp, xcnt++) {
|
||||
strncpy (pixel_str, &buffer[n], cpp);
|
||||
pixel_str[cpp] = 0;
|
||||
|
||||
|
||||
@@ -15,12 +15,11 @@ GDK_PIXBUF_VER = 2.0
|
||||
# but not yet -DINCLUDE_png
|
||||
##USEGDIP=1
|
||||
# to get _working_ include modules we need respective defines ...
|
||||
#
|
||||
BUILT_IN_FORMATS = \
|
||||
!IFDEF USEGDIP
|
||||
-DINCLUDE_gdiplus \
|
||||
!ELSE
|
||||
-DINCLUDE_bmp -DINCLUDE_gif -DINCLUDE_ico -DINCLUDE_jpeg -DINCLUDE_tiff \
|
||||
-DINCLUDE_bmp -DINCLUDE_gif -DINCLUDE_ico -DINCLUDE_jpeg -DINCLUDE_tiff \
|
||||
!ENDIF
|
||||
-DINCLUDE_png \
|
||||
-DINCLUDE_xpm -DINCLUDE_wbmp \
|
||||
|
||||
@@ -119,20 +119,17 @@ loader_sanity_check (const char *path, GdkPixbufFormat *info, GdkPixbufModule *v
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void
|
||||
static void
|
||||
write_loader_info (const char *path, GdkPixbufFormat *info)
|
||||
{
|
||||
const GdkPixbufModulePattern *pattern;
|
||||
char **mime;
|
||||
char **ext;
|
||||
char **mime;
|
||||
char **ext;
|
||||
|
||||
g_printf("\"%s\"\n", path);
|
||||
g_printf ("\"%s\" %u \"%s\" \"%s\" \"%s\"\n",
|
||||
info->name,
|
||||
info->flags,
|
||||
info->domain ? info->domain : GETTEXT_PACKAGE,
|
||||
info->description,
|
||||
info->license ? info->license : "");
|
||||
g_printf ("\"%s\" %u \"%s\" \"%s\" \"%s\"\n",
|
||||
info->name, info->flags,
|
||||
info->domain ? info->domain : GETTEXT_PACKAGE, info->description, info->license);
|
||||
for (mime = info->mime_types; *mime; mime++) {
|
||||
g_printf ("\"%s\" ", *mime);
|
||||
}
|
||||
|
||||
@@ -120,7 +120,6 @@ gdk_c_sources = \
|
||||
gdkintl.h \
|
||||
gdkkeys.c \
|
||||
gdkkeyuni.c \
|
||||
gdkoffscreenwindow.c \
|
||||
gdkpango.c \
|
||||
gdkpixbuf-drawable.c \
|
||||
gdkpixbuf-render.c \
|
||||
@@ -152,10 +151,10 @@ gdk_built_sources = \
|
||||
gdkincludedir = $(includedir)/gtk-2.0/gdk
|
||||
gdkinclude_HEADERS = $(gdk_public_h_sources) $(gdk_built_public_sources)
|
||||
|
||||
# gdkmarshalers.c is not here because it is currently an empty file
|
||||
common_sources = \
|
||||
$(gdk_c_sources) \
|
||||
gdkenumtypes.c \
|
||||
gdkmarshalers.c \
|
||||
gdkmarshalers.h
|
||||
|
||||
libgdk_directfb_2_0_la_SOURCES = $(common_sources)
|
||||
@@ -269,11 +268,11 @@ gdkenumtypes.c: @REBUILD@ $(gdk_public_h_sources) gdkenumtypes.c.template
|
||||
# Marshaller generation
|
||||
#
|
||||
gdkmarshalers.h: @REBUILD@ gdkmarshalers.list
|
||||
$(GLIB_GENMARSHAL) --prefix=_gdk_marshal $(srcdir)/gdkmarshalers.list --header > gdkmarshalers-h.tmp \
|
||||
$(GLIB_GENMARSHAL) --prefix=gdk_marshal $(srcdir)/gdkmarshalers.list --header > gdkmarshalers-h.tmp \
|
||||
&& mv gdkmarshalers-h.tmp gdkmarshalers.h \
|
||||
|| ( rm -f gdkmarshalers-h.tmp && exit 1)
|
||||
gdkmarshalers.c: @REBUILD@ gdkmarshalers.list
|
||||
(echo "#include \"gdkalias.h\""; $(GLIB_GENMARSHAL) --prefix=_gdk_marshal $(srcdir)/gdkmarshalers.list --body) > gdkmarshalers-c.tmp \
|
||||
(echo "#include \"gdkalias.h\""; $(GLIB_GENMARSHAL) --prefix=gdk_marshal $(srcdir)/gdkmarshalers.list --body) > gdkmarshalers-c.tmp \
|
||||
&& mv gdkmarshalers-c.tmp gdkmarshalers.c \
|
||||
|| ( rm -f gdkmarshalers-c.tmp && exit 1 )
|
||||
|
||||
|
||||
@@ -68,14 +68,12 @@ extern gboolean gdk_directfb_monochrome_fonts;
|
||||
void gdk_directfb_window_set_opacity (GdkWindow *window,
|
||||
guchar opacity);
|
||||
|
||||
#ifndef GDK_DISABLE_DEPRECATED
|
||||
GdkWindow * gdk_directfb_window_new (GdkWindow *parent,
|
||||
GdkWindowAttr *attributes,
|
||||
gint attributes_mask,
|
||||
DFBWindowCapabilities window_caps,
|
||||
DFBWindowOptions window_options,
|
||||
DFBSurfaceCapabilities surface_caps);
|
||||
#endif /* GDK_DISABLE_DEPRECATED */
|
||||
|
||||
GdkVisual * gdk_directfb_visual_by_format (DFBSurfacePixelFormat pixel_format);
|
||||
|
||||
|
||||
@@ -57,8 +57,9 @@ const GOptionEntry _gdk_windowing_args[] =
|
||||
{ NULL}
|
||||
};
|
||||
|
||||
/* Main entry point for gdk in 2.6 args are parsed
|
||||
*/
|
||||
/**
|
||||
Main entry point for gdk in 2.6 args are parsed
|
||||
**/
|
||||
GdkDisplay * gdk_display_open (const gchar *display_name)
|
||||
{
|
||||
IDirectFB *directfb;
|
||||
@@ -377,18 +378,16 @@ gdk_directfb_pointer_ungrab (guint32 time,
|
||||
g_object_unref (old_grab_window);
|
||||
}
|
||||
|
||||
void
|
||||
gdk_display_pointer_ungrab (GdkDisplay *display,
|
||||
guint32 time)
|
||||
gint
|
||||
gdk_display_pointer_is_grabbed (GdkDisplay *display)
|
||||
{
|
||||
GdkPointerGrabInfo *grab = _gdk_display_get_last_pointer_grab (display);
|
||||
return _gdk_directfb_pointer_grab_window != NULL;
|
||||
}
|
||||
|
||||
if (grab)
|
||||
{
|
||||
grab->serial_end = 0;
|
||||
}
|
||||
|
||||
_gdk_display_pointer_grab_update (display, 0);
|
||||
void
|
||||
gdk_display_pointer_ungrab (GdkDisplay *display,guint32 time)
|
||||
{
|
||||
gdk_directfb_pointer_ungrab (time, _gdk_directfb_pointer_implicit_grab);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -1600,32 +1600,6 @@ gdk_directfb_cairo_surface_destroy (void *data)
|
||||
impl->cairo_surface = NULL;
|
||||
}
|
||||
|
||||
void
|
||||
_gdk_windowing_set_cairo_surface_size (cairo_surface_t *surface,
|
||||
int width,
|
||||
int height)
|
||||
{
|
||||
}
|
||||
|
||||
cairo_surface_t *
|
||||
_gdk_windowing_create_cairo_surface (GdkDrawable *drawable,
|
||||
int width,
|
||||
int height)
|
||||
{
|
||||
GdkDrawableImplDirectFB *impl;
|
||||
IDirectFB *dfb;
|
||||
cairo_surface_t *ret;
|
||||
|
||||
impl = GDK_DRAWABLE_IMPL_DIRECTFB (drawable);
|
||||
dfb = GDK_DISPLAY_DFB (gdk_drawable_get_display (drawable))->directfb;
|
||||
|
||||
ret = cairo_directfb_surface_create (dfb, impl->surface);
|
||||
cairo_surface_set_user_data (ret,
|
||||
&gdk_directfb_cairo_key, drawable,
|
||||
gdk_directfb_cairo_surface_destroy);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
static cairo_surface_t *
|
||||
gdk_directfb_ref_cairo_surface (GdkDrawable *drawable)
|
||||
|
||||
@@ -351,8 +351,7 @@ gc_unset_clip_mask (GdkGC *gc)
|
||||
|
||||
void
|
||||
_gdk_windowing_gc_set_clip_region (GdkGC *gc,
|
||||
const GdkRegion *region,
|
||||
gboolean reset_origin)
|
||||
const GdkRegion *region)
|
||||
{
|
||||
GdkGCDirectFB *data;
|
||||
|
||||
@@ -368,13 +367,10 @@ _gdk_windowing_gc_set_clip_region (GdkGC *gc,
|
||||
else
|
||||
temp_region_reset (&data->clip_region);
|
||||
|
||||
if (reset_origin)
|
||||
{
|
||||
gc->clip_x_origin = 0;
|
||||
gc->clip_y_origin = 0;
|
||||
data->values.clip_x_origin = 0;
|
||||
data->values.clip_y_origin = 0;
|
||||
}
|
||||
gc->clip_x_origin = 0;
|
||||
gc->clip_y_origin = 0;
|
||||
data->values.clip_x_origin = 0;
|
||||
data->values.clip_y_origin = 0;
|
||||
|
||||
gc_unset_clip_mask (gc);
|
||||
}
|
||||
|
||||
@@ -37,6 +37,7 @@ extern GdkModifierType _gdk_directfb_modifiers;
|
||||
extern int _gdk_directfb_mouse_x, _gdk_directfb_mouse_y;
|
||||
|
||||
typedef struct _GdkAxisInfo GdkAxisInfo;
|
||||
typedef struct _GdkInputWindow GdkInputWindow;
|
||||
|
||||
/* information about a device axis */
|
||||
struct _GdkAxisInfo
|
||||
|
||||
@@ -59,8 +59,9 @@
|
||||
void
|
||||
_gdk_windowing_init (void)
|
||||
{
|
||||
/* Not that usable called before parse_args
|
||||
*/
|
||||
/**
|
||||
Not that usable called before parse_args
|
||||
**/
|
||||
}
|
||||
|
||||
void
|
||||
@@ -369,15 +370,76 @@ gdk_error_trap_pop (void)
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* gdk_pointer_grab_info_libgtk_only:
|
||||
* @grab_window: location to store current grab window
|
||||
* @owner_events: location to store boolean indicating whether
|
||||
* the @owner_events flag to gdk_pointer_grab() was %TRUE.
|
||||
*
|
||||
* Determines information about the current pointer grab.
|
||||
* This is not public API and must not be used by applications.
|
||||
*
|
||||
* Return value: %TRUE if this application currently has the
|
||||
* pointer grabbed.
|
||||
**/
|
||||
gboolean
|
||||
gdk_pointer_grab_info_libgtk_only (GdkDisplay *display,GdkWindow **grab_window,
|
||||
gboolean *owner_events)
|
||||
{
|
||||
if (_gdk_directfb_pointer_grab_window)
|
||||
{
|
||||
if (grab_window)
|
||||
*grab_window = (GdkWindow *)_gdk_directfb_pointer_grab_window;
|
||||
if (owner_events)
|
||||
*owner_events = _gdk_directfb_pointer_grab_owner_events;
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
/**
|
||||
* gdk_keyboard_grab_info_libgtk_only:
|
||||
* @grab_window: location to store current grab window
|
||||
* @owner_events: location to store boolean indicating whether
|
||||
* the @owner_events flag to gdk_keyboard_grab() was %TRUE.
|
||||
*
|
||||
* Determines information about the current keyboard grab.
|
||||
* This is not public API and must not be used by applications.
|
||||
*
|
||||
* Return value: %TRUE if this application currently has the
|
||||
* keyboard grabbed.
|
||||
**/
|
||||
gboolean
|
||||
gdk_keyboard_grab_info_libgtk_only (GdkDisplay *display,GdkWindow **grab_window,
|
||||
gboolean *owner_events)
|
||||
{
|
||||
if (_gdk_directfb_keyboard_grab_window)
|
||||
{
|
||||
if (grab_window)
|
||||
*grab_window = (GdkWindow *) _gdk_directfb_keyboard_grab_window;
|
||||
if (owner_events)
|
||||
*owner_events = _gdk_directfb_keyboard_grab_owner_events;
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
||||
GdkGrabStatus
|
||||
gdk_keyboard_grab (GdkWindow *window,
|
||||
gint owner_events,
|
||||
guint32 time)
|
||||
{
|
||||
return gdk_directfb_keyboard_grab (gdk_display_get_default(),
|
||||
window,
|
||||
owner_events,
|
||||
time);
|
||||
return gdk_directfb_keyboard_grab(gdk_display_get_default(),
|
||||
window,
|
||||
owner_events,
|
||||
time);
|
||||
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -405,25 +467,35 @@ gdk_keyboard_grab (GdkWindow *window,
|
||||
|
||||
|
||||
GdkGrabStatus
|
||||
_gdk_windowing_pointer_grab (GdkWindow *window,
|
||||
GdkWindow *native,
|
||||
gboolean owner_events,
|
||||
GdkEventMask event_mask,
|
||||
GdkWindow *confine_to,
|
||||
GdkCursor *cursor,
|
||||
guint32 time)
|
||||
gdk_display_pointer_grab (GdkDisplay *display,GdkWindow *window,
|
||||
gint owner_events,
|
||||
GdkEventMask event_mask,
|
||||
GdkWindow *confine_to,
|
||||
GdkCursor *cursor,
|
||||
guint32 time)
|
||||
{
|
||||
g_return_val_if_fail (GDK_IS_WINDOW (window), 0);
|
||||
g_return_val_if_fail (confine_to == NULL || GDK_IS_WINDOW (confine_to), 0);
|
||||
|
||||
_gdk_display_add_pointer_grab (_gdk_display,
|
||||
window,
|
||||
native,
|
||||
owner_events,
|
||||
event_mask,
|
||||
confine_to,
|
||||
cursor,
|
||||
time);
|
||||
return gdk_directfb_pointer_grab (window,
|
||||
owner_events,
|
||||
event_mask,
|
||||
confine_to,
|
||||
cursor,
|
||||
time,
|
||||
FALSE);
|
||||
}
|
||||
|
||||
GdkGrabStatus
|
||||
gdk_pointer_grab (GdkWindow * window,
|
||||
gint owner_events,
|
||||
GdkEventMask event_mask,
|
||||
GdkWindow * confine_to,
|
||||
GdkCursor * cursor,
|
||||
guint32 time)
|
||||
{
|
||||
return gdk_directfb_pointer_grab(window, owner_events,event_mask,
|
||||
confine_to,cursor,time,FALSE);
|
||||
}
|
||||
|
||||
#define __GDK_MAIN_X11_C__
|
||||
|
||||
@@ -114,10 +114,10 @@ gdk_pixmap_impl_directfb_finalize (GObject *object)
|
||||
}
|
||||
|
||||
GdkPixmap*
|
||||
_gdk_pixmap_new (GdkDrawable *drawable,
|
||||
gint width,
|
||||
gint height,
|
||||
gint depth)
|
||||
gdk_pixmap_new (GdkDrawable *drawable,
|
||||
gint width,
|
||||
gint height,
|
||||
gint depth)
|
||||
{
|
||||
DFBSurfacePixelFormat format;
|
||||
IDirectFBSurface *surface;
|
||||
@@ -196,10 +196,10 @@ _gdk_pixmap_new (GdkDrawable *drawable,
|
||||
}
|
||||
|
||||
GdkPixmap *
|
||||
_gdk_bitmap_create_from_data (GdkDrawable *drawable,
|
||||
const gchar *data,
|
||||
gint width,
|
||||
gint height)
|
||||
gdk_bitmap_create_from_data (GdkDrawable *drawable,
|
||||
const gchar *data,
|
||||
gint width,
|
||||
gint height)
|
||||
{
|
||||
GdkPixmap *pixmap;
|
||||
|
||||
@@ -249,13 +249,13 @@ _gdk_bitmap_create_from_data (GdkDrawable *drawable,
|
||||
}
|
||||
|
||||
GdkPixmap*
|
||||
_gdk_pixmap_create_from_data (GdkDrawable *drawable,
|
||||
const gchar *data,
|
||||
gint width,
|
||||
gint height,
|
||||
gint depth,
|
||||
const GdkColor *fg,
|
||||
const GdkColor *bg)
|
||||
gdk_pixmap_create_from_data (GdkDrawable *drawable,
|
||||
const gchar *data,
|
||||
gint width,
|
||||
gint height,
|
||||
gint depth,
|
||||
const GdkColor *fg,
|
||||
const GdkColor *bg)
|
||||
{
|
||||
GdkPixmap *pixmap;
|
||||
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -206,14 +206,6 @@ gdk_pre_parse_libgtk_only (void)
|
||||
}
|
||||
#endif /* G_ENABLE_DEBUG */
|
||||
|
||||
if (getenv ("GDK_NATIVE_WINDOWS"))
|
||||
{
|
||||
_gdk_native_windows = TRUE;
|
||||
/* Ensure that this is not propagated
|
||||
to spawned applications */
|
||||
g_unsetenv ("GDK_NATIVE_WINDOWS");
|
||||
}
|
||||
|
||||
g_type_init ();
|
||||
|
||||
/* Do any setup particular to the windowing system
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user