Compare commits
23 Commits
3.9.2
...
touch-sele
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
2992461c2a | ||
|
|
7f36b9665a | ||
|
|
314fdec2b2 | ||
|
|
39d1638997 | ||
|
|
5065f87560 | ||
|
|
d5607bc8df | ||
|
|
5799d6efa9 | ||
|
|
6b6f52faf8 | ||
|
|
c6eff1ad06 | ||
|
|
5b88fdd683 | ||
|
|
f9d25a040d | ||
|
|
9c30f6dd64 | ||
|
|
5495d477e2 | ||
|
|
18da48edf9 | ||
|
|
2de4b5bd7a | ||
|
|
463ef2ed50 | ||
|
|
d43bc5cdd8 | ||
|
|
879bfba4cc | ||
|
|
c487b5878e | ||
|
|
b1499832c0 | ||
|
|
fefb55c088 | ||
|
|
757386cc97 | ||
|
|
b952930639 |
@@ -1,7 +1,7 @@
|
||||
## Makefile.am for GTK+
|
||||
include $(top_srcdir)/Makefile.decl
|
||||
|
||||
SRC_SUBDIRS = gdk gtk libgail-util modules demos tests testsuite perf examples
|
||||
SRC_SUBDIRS = gdk gtk libgail-util modules demos tests perf examples
|
||||
SUBDIRS = po po-properties $(SRC_SUBDIRS) docs m4macros build
|
||||
|
||||
ACLOCAL_AMFLAGS = -I m4 ${ACLOCAL_FLAGS}
|
||||
|
||||
327
NEWS
@@ -1,330 +1,3 @@
|
||||
Overview of Changes in GTK+ 3.9.0 to 3.9.2
|
||||
==========================================
|
||||
|
||||
* The GDK initialization code has been refactored. GdkDisplayManager
|
||||
is no longer backend-specific.
|
||||
|
||||
* The symbol exporting functionality has been refactored. We no longer
|
||||
use .symbols files, and instead rely on explicit header annotations
|
||||
for every exported symbol. the abicheck scripts are no longer used.
|
||||
|
||||
* The GDK drawing and scrolling has been simplified. We no longer use
|
||||
XCopyArea for scrolling, instead an offscreen cache is used. There
|
||||
is a new debug flag, GTK_DEBUG=pixel-cache for this.
|
||||
|
||||
* Window sizing issues have been addressed.
|
||||
|
||||
* Implement height-for-width for GtkEventBox and GtkCheckButton
|
||||
|
||||
* Custom titlebars can now be set from GtkBuilder files
|
||||
|
||||
* Optionally install tests, when configured with --enable-installed-tests.
|
||||
To run these tests, gnome-desktop-testing-runner can be used.
|
||||
|
||||
* Native input methods are supported on OS X now.
|
||||
|
||||
699739
|
||||
699140
|
||||
699633
|
||||
699901
|
||||
699750
|
||||
698051
|
||||
699929
|
||||
695120
|
||||
700007
|
||||
700053
|
||||
700054
|
||||
699239
|
||||
699104
|
||||
698361
|
||||
700079
|
||||
698933
|
||||
700056
|
||||
699690
|
||||
700301
|
||||
699970
|
||||
696640
|
||||
700578
|
||||
700575
|
||||
700465
|
||||
700233
|
||||
699289
|
||||
694273
|
||||
691921
|
||||
667759
|
||||
700737
|
||||
561221
|
||||
700844
|
||||
700787
|
||||
628902
|
||||
700979
|
||||
360131
|
||||
591969
|
||||
700864
|
||||
696001
|
||||
|
||||
* Translation updates:
|
||||
Brazilian Portuguese
|
||||
English
|
||||
Hebrew
|
||||
Japanese
|
||||
Norwegian bokmål
|
||||
Russian
|
||||
Slovak
|
||||
Spanish
|
||||
Tajik
|
||||
|
||||
|
||||
Overview of Changes in GTK+ 3.7 to 3.9
|
||||
======================================
|
||||
|
||||
* GtkFileChooser:
|
||||
- Always show fuse-mounted locations in shortcuts
|
||||
- GtkFileChooserButton has received a lot of fixes and tests have
|
||||
been added for many of them
|
||||
|
||||
* GtkWindow:
|
||||
- Initial support for client-side decorations has been added. This
|
||||
is going to be used by default under Wayland. To try it with other
|
||||
backends, set the GTK_CSD=1 environment variable.
|
||||
- gtk_window_set_titlebar: A new function that can set a custom,
|
||||
client-side titlebar on toplevel windows.
|
||||
|
||||
* Wayland:
|
||||
- Use client-side decorations
|
||||
- Implement maximization
|
||||
- Improve cursor handling
|
||||
- Improve multi-monitor handling
|
||||
- Support most GtkSettings (for now by reading GSettings directly)
|
||||
- Complete the keymap implementation
|
||||
- Add support for custom surfaces
|
||||
- Implement animated cursors
|
||||
- Support the WAYLAND_SOCKET environment variable
|
||||
- Implement frame synchronizatio
|
||||
- Document Wayland-specific APIs
|
||||
|
||||
* Broadway:
|
||||
- Improve window size handling
|
||||
- Implement frame synchronization
|
||||
- Add support for password authentication
|
||||
|
||||
* New APIs, widgets, feature additions:
|
||||
- GtkHeaderBar is a new widget similar to a GtkBox, with the extra
|
||||
feature that it can center a child (typically a title), independent
|
||||
of the other content.
|
||||
- GtkPlacesSidebar is the sidebar widget in the file chooser, exported
|
||||
as a public widget - it will be shared with nautilus.
|
||||
- GtkStack is an alternative to GtkNotebook for showing one of several
|
||||
child widgets at a time. It supports animated transitions. Tabs are
|
||||
not built into this widgets, but instead provided by the separate
|
||||
GtkStackSwitcher widget.
|
||||
- GtkRevealer is a new new widget that can hide or show its child
|
||||
in an animated fashion.
|
||||
- GtkMenuTracker is a helper object that makes dealing with
|
||||
GMenuModels easier and more efficient.
|
||||
- gtk_grid_remove_row/column: New functions to remove whole rows
|
||||
or columns from a GtkGrid
|
||||
- Support for composite children has been added to GtkWidget. This
|
||||
allows to create complex widgets from GtkBuilder ui files. All
|
||||
complex GTK+ widgets have been converted to use this facility.
|
||||
- Baseline support was added to the GTK+ size allocation machinery.
|
||||
Widgets can now export the baseline of the text they contain,
|
||||
and containers can align their children wrt to their baselines.
|
||||
|
||||
|
||||
* Known problems, feature removals, compatibility caveats:
|
||||
- Handling of window size is currently in flux, and there are
|
||||
some known problems with sizes unintentionally changing
|
||||
- Support for the Motif DND protocol has been dropped
|
||||
- Client-side decorations still have some issues when drawing
|
||||
directly on toplevel windows or setting their background
|
||||
- Support for multiple screens per display has been removed. This
|
||||
was only ever supported on X11, and is an exceedingly rare setup
|
||||
nowadays. The display-screen relation is now 1:1, and we will do
|
||||
some more simplification of displaymanager/display/screen/monitor
|
||||
APIs.
|
||||
- gdk_window_get_display has been deprecated
|
||||
- gtk_widget_push_composite_child has been deprecated - this was
|
||||
used for anything
|
||||
- GtkSwitch has been changed to draw focus internally, instead of
|
||||
reserving space outside the switch for it. This may require some
|
||||
application adjustment where margins were tweaked to 'correct'
|
||||
the alignment of switches manually
|
||||
|
||||
* Printing:
|
||||
- Avoid blocking when looking for avahi printers
|
||||
- Don't link against avahi-gobject, use D-Bus directly
|
||||
|
||||
* Bugs fixed:
|
||||
504901 GtkCellRendererCombo requires click-and-hold
|
||||
586367 In local_only mode, file chooser should return native pa...
|
||||
671939 [regression] crash on exit
|
||||
672018 Need API to set global application state (busy, counters...
|
||||
674051 Scrolling zoom in view - incorrect image display
|
||||
674759 GtkLabel: wrong value of "mnemonic-keyval" when "use-mar...
|
||||
675571 (out) or (inout) annotation possibly missing for gtk_men...
|
||||
675649 gtk-demo: Fix typo
|
||||
680241 Instructions on how to build a GTK app won't work with r...
|
||||
681446 gtkdnd memory leak
|
||||
685419 gtkprintbackendfile: Infinite loop in _cairo_write()
|
||||
685420 Critical warnings when GtkPrintJob is released too early
|
||||
688820 GIcon is a bad interface
|
||||
688896 Add documentation for GtkWidget::show,hide,map,unmap,rea...
|
||||
690275 scrolling on other windows is applied when coming back (...
|
||||
691040 selection is reported incorrectly in file chooser button
|
||||
692871 Need to expose output information to make GdkScreen API ...
|
||||
694339 Fix build of GTK+ on Windows
|
||||
694465 Allow backends to fail during initialisation
|
||||
695200 Switching apps while a combobox open makes the parent wi...
|
||||
695228 GdkPixbuf:ERROR:gdk-pixbuf-animation.c:242:gdk_pixbuf_an...
|
||||
695278 Avoid passing a NULL title to setTitle
|
||||
695304 GtkTextView: don't popdown a bubble if we don't have one
|
||||
695312 Initial 'text' set in the non-numeric-only GtkSpinButton...
|
||||
695375 GtkEntryAccessible: also handle entry icon tooltip NULL ...
|
||||
695380 gtk_binding_entry_skip broken
|
||||
695391 wayland documentation section id is "gtk-osx"
|
||||
695473 treeview: fix a critical warning
|
||||
695476 Drop the Motif DND protocol
|
||||
695482 Universal Access panel appears jumbled and horrible afte...
|
||||
695493 testgtk: issues with the color selection example
|
||||
695495 testgtk: cursor example segfaults
|
||||
695497 testgtk: lack of key repeat
|
||||
695506 gtk-demo: link hovering unreliable
|
||||
695682 Cannot build docs for wayland-only build
|
||||
695714 Getting of printer info can hang
|
||||
695772 Different appearance of menus within Audacious
|
||||
695783 GtkApplication: Allow passing windows on non-X11 targets
|
||||
695861 Allow to use custom surfaces for GdkWindows in Wayland
|
||||
695874 GtkFontChooser docs
|
||||
695895 Fix the gtk3-demo demo program on Windows
|
||||
695945 implement minimize / maximize functionality
|
||||
695948 GtkFontButton sets wrong show-preview-entry
|
||||
695998 csd: enable shadows in the outer border
|
||||
696051 vertical grid lines in rtl mode
|
||||
696138 GtkWidget: some deprecation marks are missing
|
||||
696171 GtkAssistant highlighted font unreadable
|
||||
696202 Add GtkSpinner animation back to Win32 theme
|
||||
696232 win32: do not crash on invalid utf8 conversion
|
||||
696340 wayland: device list is populated async
|
||||
696370 GtkOverlay doesn't work on top of GtkClutterEmbed
|
||||
696429 wayland: Implement animated cursors
|
||||
696457 gnome-ostree build broken by 3a9de35a6cefddc09aaf000e523...
|
||||
696468 improve GMenuModel -> GtkMenu conversion
|
||||
696546 gtk_print_backend_cups_finalize() crashes if cups_get_pr...
|
||||
696553 Crash in avahi_create_browsers
|
||||
696561 GtkApplicationWindow rendering broken
|
||||
696608 css_image_value_parse: returning FALSE in pointer function
|
||||
696622 gtk option printer widget segfault in epiphany
|
||||
696623 GtkOverlay with a revealer produces warnings setting a m...
|
||||
696767 a pair of memory leaks
|
||||
696882 [regression] GtkWindow changes size after hide/show cycle
|
||||
697048 GtkTextView: small code improvements
|
||||
697144 Popup menu mnemonics fixes
|
||||
697196 gtk_notebook_set_tab_reorderable boolean handling
|
||||
697200 GtkWindow: notify::attached-to not emitted
|
||||
697263 Impossible to set window transparency on 3.8
|
||||
697275 gtk_window_set_default_size() doesn't work anymore
|
||||
697427 Unreferencing GtkStatusIcon object causes abort
|
||||
697673 Apps should connect only once when using Wayland
|
||||
697795 xi2: Improve pointer emulation debug reporting
|
||||
697886 dnd icon drawing broken on master
|
||||
697947 A lot of GTK+ apps fail to launch with error "desktop_she...
|
||||
698181 Document icon-shadow CSS property
|
||||
698433 Geometry management broken in GtkBin widgets
|
||||
698682 GtkSpinButton: don't constantly recreate style contexts f...
|
||||
698864 wayland: improve integration with GdkFrameClock
|
||||
699020 GtkImage: do not leak metrics in baseline align
|
||||
699225 typo: Modifed -> Modified
|
||||
|
||||
* Translation updates:
|
||||
Arabic
|
||||
Aragonese
|
||||
Assamese
|
||||
Belarusian
|
||||
Brazilian Portuguese
|
||||
British English
|
||||
Catalan
|
||||
Catalan (Valencian)
|
||||
Czech
|
||||
Danish
|
||||
Finnish
|
||||
French
|
||||
Galician
|
||||
German
|
||||
Greek
|
||||
Hindi
|
||||
Hungarian
|
||||
Indonesian
|
||||
Italian
|
||||
Kazakh
|
||||
Korean
|
||||
Latvian
|
||||
Malayalam
|
||||
Odia
|
||||
Persian
|
||||
Polish
|
||||
Punjabi
|
||||
Russian
|
||||
Serbian
|
||||
Simplified Chinese
|
||||
Slovenian
|
||||
Tajik
|
||||
Tamil
|
||||
Ukrainian
|
||||
|
||||
|
||||
Overview of Changes in GTK+ 3.7.12
|
||||
==================================
|
||||
|
||||
* We now support touch friendly popups on entries and text views
|
||||
in place of context menus, on touch devices
|
||||
|
||||
* The print dialog now shows printers that are discovered
|
||||
using avahi, if configured with --enable-avahi-browsing
|
||||
|
||||
* Bugs fixed:
|
||||
650424 treeview: expander is not easily themable
|
||||
674207 window: Compiler warning when not building on X11
|
||||
675333 Cannot forget association in Open With dialog: program...
|
||||
688956 Print dialog needs to support Bonjour broadcasting of ...
|
||||
691426 get_current_desktop does not interpret property data c...
|
||||
692955 GtkIconCache fails to load non-builtin icons
|
||||
693995 GkColorChooserWidget crashes in select_swatch if palet...
|
||||
694059 GtkTreeView accessible object:state-changed-expanded e...
|
||||
694162 Memory leaks due to extra ref in gtk_ui_manager_builda...
|
||||
694217 drag&drop half-broken – items get stuck while dragging
|
||||
694274 wayland: don't attempt to unqueue events when events a...
|
||||
694302 Convert pixbuf animation demo (both copies) to GdkFram...
|
||||
694395 Remove unused code
|
||||
694406 Excessive amount of accessible text events when changi...
|
||||
694451 Containers shouldn't special case RTL positions
|
||||
694732 gdk: prevent NULL pointer access when debugging is ena...
|
||||
694742 Fix possible memory leak when GlobalAlloc() fails
|
||||
694924 Dead code in GtkClipboard
|
||||
694925 non-expose based draw() doesn't render window background
|
||||
694968 GtkIconTheme: fix failed assertion when asynchrnously ...
|
||||
694990 use primary icon slot for search icon
|
||||
695131 gtkbin: initialize minimum and natural size to zero fo...
|
||||
|
||||
Translation updates:
|
||||
Brazilian Portuguese
|
||||
Czech
|
||||
Estonian
|
||||
German
|
||||
Greek
|
||||
Gujarati
|
||||
Lithuanian
|
||||
Polish
|
||||
Punjabi
|
||||
Russian
|
||||
Serbian
|
||||
Simplified Chinese
|
||||
Slovenian
|
||||
Spanish
|
||||
Traditional Chinese
|
||||
Vietnamese
|
||||
|
||||
|
||||
Overview of Changes in GTK+ 3.7.10
|
||||
==================================
|
||||
|
||||
|
||||
23
README.in
@@ -69,28 +69,7 @@ to that bug 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)
|
||||
Even better are git-formatted patches. (Use git format-patch)
|
||||
|
||||
|
||||
Release notes for 3.10
|
||||
======================
|
||||
|
||||
* GDK has been changed to allow only a single screen per display.
|
||||
Only the X11 backend had multiple screens before, and multi-screen
|
||||
setups (not multi-monitor!) are very rare nowadays. If you really
|
||||
need multiple X screens, open them as separate displays.
|
||||
|
||||
* The behavior of GtkBox::expand has been changed to never propagate
|
||||
up. Previously, this was happening inconsistently. If you want the
|
||||
expand to propagate, use the GtkWidget h/v expand properties.
|
||||
If you experience sizing problems with widgets in ported code,
|
||||
carefully check the expand and fill flags of your boxes.
|
||||
|
||||
* GtkBin no longer provides default implementations for
|
||||
get_height_for_width, subclasses now have to provide their own
|
||||
implementation if they need height-for-width functionality.
|
||||
|
||||
Patches should be in unified diff form. (The -up option to GNU diff.)
|
||||
|
||||
Release notes for 3.8
|
||||
=====================
|
||||
|
||||
@@ -4,8 +4,4 @@ SUBDIRS = \
|
||||
vs9 \
|
||||
vs10
|
||||
|
||||
EXTRA_DIST += \
|
||||
gen-file-list-gtk.py \
|
||||
gengir_gtk.bat
|
||||
|
||||
-include $(top_srcdir)/git.mk
|
||||
|
||||
@@ -1,140 +0,0 @@
|
||||
#!/usr/bin/python
|
||||
# vim: encoding=utf-8
|
||||
# Generate the file lists for processing with g-ir-scanner
|
||||
import os
|
||||
import sys
|
||||
import re
|
||||
import string
|
||||
import subprocess
|
||||
import optparse
|
||||
|
||||
def gen_gdk_filelist(srcroot, subdir, dest):
|
||||
vars = read_vars_from_AM(os.path.join(srcroot, subdir, 'Makefile.am'),
|
||||
vars = {},
|
||||
conds = {},
|
||||
filters = ['gdk_public_h_sources', 'gdk_c_sources'])
|
||||
|
||||
vars['gdk_enums'] = 'gdkenumtypes.c gdkenumtypes.h'
|
||||
|
||||
files = vars['gdk_public_h_sources'].split() + \
|
||||
vars['gdk_c_sources'].split() + \
|
||||
vars['gdk_enums'].split()
|
||||
|
||||
sources = [i for i in files if (i != 'gdkkeysyms-compat.h')]
|
||||
|
||||
with open(dest, 'w') as d:
|
||||
for i in sources:
|
||||
d.write(srcroot + '\\' + subdir + '\\' + i.replace('/', '\\') + '\n')
|
||||
|
||||
def gen_filelist_gtk(srcroot, subdir, dest):
|
||||
vars = read_vars_from_AM(os.path.join(srcroot, 'gtk', 'Makefile.am'),
|
||||
vars = {},
|
||||
conds = {'USE_WIN32':True},
|
||||
filters = ['gtkinclude_HEADERS',
|
||||
'deprecatedinclude_HEADERS',
|
||||
'gtk_base_c_sources'])
|
||||
|
||||
vars['gtk_other_src'] = 'gtkprintoperation-win32.c gtktypebuiltins.h gtktypebuiltins.c'
|
||||
|
||||
files = vars['gtkinclude_HEADERS'].split() + \
|
||||
vars['deprecatedinclude_HEADERS'].split() + \
|
||||
vars['gtk_base_c_sources'].split() + \
|
||||
vars['gtk_other_src'].split()
|
||||
|
||||
sources = [i for i in files if not (i.endswith('private.h')) and i != 'gtktextdisplay.h' and i != 'gtktextlayout.h']
|
||||
|
||||
with open(dest, 'w') as d:
|
||||
for i in sources:
|
||||
d.write(srcroot + '\\' + subdir + '\\' + i.replace('/', '\\') + '\n')
|
||||
|
||||
def read_vars_from_AM(path, vars = {}, conds = {}, filters = None):
|
||||
'''
|
||||
path: path to the Makefile.am
|
||||
vars: predefined variables
|
||||
conds: condition variables for Makefile
|
||||
filters: if None, all variables defined are returned,
|
||||
otherwise, it is a list contains that variables should be returned
|
||||
'''
|
||||
cur_vars = vars.copy()
|
||||
RE_AM_VAR_REF = re.compile(r'\$\((\w+?)\)')
|
||||
RE_AM_VAR = re.compile(r'^\s*(\w+)\s*=(.*)$')
|
||||
RE_AM_INCLUDE = re.compile(r'^\s*include\s+(\w+)')
|
||||
RE_AM_CONTINUING = re.compile(r'\\\s*$')
|
||||
RE_AM_IF = re.compile(r'^\s*if\s+(\w+)')
|
||||
RE_AM_ELSE = re.compile(r'^\s*else')
|
||||
RE_AM_ENDIF = re.compile(r'^\s*endif')
|
||||
def am_eval(cont):
|
||||
return RE_AM_VAR_REF.sub(lambda x: cur_vars.get(x.group(1), ''), cont)
|
||||
with open(path, 'r') as f:
|
||||
contents = f.readlines()
|
||||
#combine continuing lines
|
||||
i = 0
|
||||
ncont = []
|
||||
while i < len(contents):
|
||||
line = contents[i]
|
||||
if RE_AM_CONTINUING.search(line):
|
||||
line = RE_AM_CONTINUING.sub('', line)
|
||||
j = i + 1
|
||||
while j < len(contents) and RE_AM_CONTINUING.search(contents[j]):
|
||||
line += RE_AM_CONTINUING.sub('', contents[j])
|
||||
j += 1
|
||||
else:
|
||||
if j < len(contents):
|
||||
line += contents[j]
|
||||
i = j
|
||||
else:
|
||||
i += 1
|
||||
ncont.append(line)
|
||||
|
||||
#include, var define, var evaluation
|
||||
i = -1
|
||||
skip = False
|
||||
oldskip = []
|
||||
while i < len(ncont) - 1:
|
||||
i += 1
|
||||
line = ncont[i]
|
||||
mo = RE_AM_IF.search(line)
|
||||
if mo:
|
||||
oldskip.append(skip)
|
||||
skip = False if mo.group(1) in conds and conds[mo.group(1)] \
|
||||
else True
|
||||
continue
|
||||
mo = RE_AM_ELSE.search(line)
|
||||
if mo:
|
||||
skip = not skip
|
||||
continue
|
||||
mo = RE_AM_ENDIF.search(line)
|
||||
if mo:
|
||||
if oldskip:
|
||||
skip = oldskip.pop()
|
||||
continue
|
||||
if not skip:
|
||||
mo = RE_AM_INCLUDE.search(line)
|
||||
if mo:
|
||||
cur_vars.update(read_vars_from_AM(am_eval(mo.group(1)), cur_vars, conds, None))
|
||||
continue
|
||||
mo = RE_AM_VAR.search(line)
|
||||
if mo:
|
||||
cur_vars[mo.group(1)] = am_eval(mo.group(2).strip())
|
||||
continue
|
||||
|
||||
#filter:
|
||||
if filters != None:
|
||||
ret = {}
|
||||
for i in filters:
|
||||
ret[i] = cur_vars.get(i, '')
|
||||
return ret
|
||||
else:
|
||||
return cur_vars
|
||||
|
||||
def main(argv):
|
||||
srcroot = '..\\..'
|
||||
subdir_gdk = 'gdk'
|
||||
subdir_gtk = 'gtk'
|
||||
|
||||
gen_gdk_filelist(srcroot, subdir_gdk, 'gdk_list')
|
||||
gen_filelist_gtk(srcroot, subdir_gtk, 'gtk_list')
|
||||
return 0
|
||||
|
||||
if __name__ == '__main__':
|
||||
sys.exit(main(sys.argv))
|
||||
@@ -1,177 +0,0 @@
|
||||
@echo off
|
||||
|
||||
setlocal EnableDelayedExpansion
|
||||
|
||||
rem Needed environmental variables:
|
||||
rem PLAT: Windows platform-Win32 (i.e. x86) or x64 (i.e. x86-64)
|
||||
rem CONF: Configuration Type, Release or Debug
|
||||
rem VSVER: Visual C++ version used [9, 10 or 11]
|
||||
rem BASEDIR: Where the dependent libraries/headers are located
|
||||
rem PKG_CONFIG_PATH: Where the GLib/ATK/Pango/GDK-Pixbuf and their dependent pkg-config .pc files can be found
|
||||
rem MINGWDIR: Installation path of MINGW GCC, so gcc.exe can be found in %MINGWDIR%\bin.
|
||||
|
||||
rem Note that the Python executable/installation and all the runtime dependencies of the
|
||||
rem library/libraries need to be in your PATH or %BASEBIN%\bin.
|
||||
|
||||
rem Check the environemental variables...
|
||||
if /i "%PLAT%" == "Win32" goto PLAT_OK
|
||||
if /i "%PLAT%" == "x64" goto PLAT_OK
|
||||
if /i "%PLAT%" == "x86" (
|
||||
set PLAT=Win32
|
||||
goto PLAT_OK
|
||||
)
|
||||
if /i "%PLAT%" == "x86-64" (
|
||||
set PLAT=x64
|
||||
goto PLAT_OK
|
||||
)
|
||||
goto ERR_PLAT
|
||||
|
||||
:PLAT_OK
|
||||
if "%VSVER%" == "9" goto VSVER_OK
|
||||
if "%VSVER%" == "10" goto VSVER_OK
|
||||
if "%VSVER%" == "11" goto VSVER_OK
|
||||
goto ERR_VSVER
|
||||
:VSVER_OK
|
||||
if /i "%CONF%" == "Release" goto CONF_OK
|
||||
if /i "%CONF%" == "Debug" goto CONF_OK
|
||||
goto ERR_CONF
|
||||
:CONF_OK
|
||||
if "%BASEDIR%" == "" goto ERR_BASEDIR
|
||||
if not exist %BASEDIR% goto ERR_BASEDIR
|
||||
|
||||
if "%PKG_CONFIG_PATH%" == "" goto ERR_PKGCONFIG
|
||||
if not exist %PKG_CONFIG_PATH%\gobject-2.0.pc goto ERR_PKGCONFIG
|
||||
|
||||
if "%MINGWDIR%" == "" goto ERR_MINGWDIR
|
||||
if not exist %MINGWDIR%\bin\gcc.exe goto ERR_MINGWDIR
|
||||
|
||||
set CC=cl
|
||||
set BINDIR=%CD%\vs%VSVER%\%CONF%\%PLAT%\bin
|
||||
set INCLUDE=%BASEDIR%\include\glib-2.0;%BASEDIR%\lib\glib-2.0\include;%INCLUDE%
|
||||
set LIB=%BINDIR%;%BASEDIR%\lib;%LIB%
|
||||
set PATH=%BINDIR%;%BASEDIR%\bin;%PATH%;%MINGWDIR%\bin
|
||||
set PYTHONPATH=%BASEDIR%\lib\gobject-introspection;%BINDIR%
|
||||
|
||||
echo Creating filelist files for generating GDK3/GTK3 .gir's...
|
||||
call python gen-file-list-gtk.py
|
||||
|
||||
echo Setup .bat for generating GDK3/GTK3 .gir's...
|
||||
|
||||
rem ===============================================================================
|
||||
rem Begin setup of gtk_gir.bat to create Gdk-3.0.gir
|
||||
rem (The ^^ is necessary to span the command to multiple lines on Windows cmd.exe!)
|
||||
rem ===============================================================================
|
||||
|
||||
echo echo Generating Gdk-3.0.gir...> gtk_gir.bat
|
||||
echo @echo off>> gtk_gir.bat
|
||||
echo.>> gtk_gir.bat
|
||||
rem ===============================================================
|
||||
rem Setup the command line flags to g-ir-scanner for Gdk-3.0.gir...
|
||||
rem ===============================================================
|
||||
echo python %BASEDIR%\bin\g-ir-scanner --verbose -I..\.. -I..\..\gdk ^^>> gtk_gir.bat
|
||||
echo -I%BASEDIR%\include\glib-2.0 -I%BASEDIR%\lib\glib-2.0\include ^^>> gtk_gir.bat
|
||||
echo -I%BASEDIR%\include\pango-1.0 -I%BASEDIR%\include\atk-1.0 ^^>> gtk_gir.bat
|
||||
echo -I%BASEDIR%\include\gdk-pixbuf-2.0 -I%BASEDIR%\include ^^>> gtk_gir.bat
|
||||
echo --namespace=Gdk --nsversion=3.0 ^^>> gtk_gir.bat
|
||||
echo --include=Gio-2.0 --include=GdkPixbuf-2.0 ^^>> gtk_gir.bat
|
||||
echo --include=Pango-1.0 --include=cairo-1.0 ^^>> gtk_gir.bat
|
||||
echo --no-libtool --library=gdk-3-vs%VSVER% ^^>> gtk_gir.bat
|
||||
echo --reparse-validate --add-include-path=%BASEDIR%\share\gir-1.0 --add-include-path=. ^^>> gtk_gir.bat
|
||||
echo --pkg-export gdk-3.0 --warn-all --c-include="gdk/gdk.h" ^^>> gtk_gir.bat
|
||||
echo -I..\.. -DG_LOG_DOMAIN=\"Gdk\" -DGDK_COMPILATION ^^>> gtk_gir.bat
|
||||
echo --filelist=gdk_list ^^>> gtk_gir.bat
|
||||
echo -o Gdk-3.0.gir>> gtk_gir.bat
|
||||
echo.>> gtk_gir.bat
|
||||
|
||||
echo Completed setup of .bat for generating Gdk-3.0.gir.
|
||||
echo.>> gtk_gir.bat
|
||||
|
||||
rem =================================================
|
||||
rem Finish setup of gtk_gir.bat to create Gtk-3.0.gir
|
||||
rem =================================================
|
||||
|
||||
rem ===============================================================================
|
||||
rem Begin setup of gtk_gir.bat to create Gtk-3.0.gir
|
||||
rem (The ^^ is necessary to span the command to multiple lines on Windows cmd.exe!)
|
||||
rem ===============================================================================
|
||||
|
||||
echo echo Generating Gtk-3.0.gir...>> gtk_gir.bat
|
||||
echo.>> gtk_gir.bat
|
||||
rem ===============================================================
|
||||
rem Setup the command line flags to g-ir-scanner for Gtk-3.0.gir...
|
||||
rem ===============================================================
|
||||
echo python %BASEDIR%\bin\g-ir-scanner --verbose -I..\.. -I..\..\gtk -I..\..\gdk ^^>> gtk_gir.bat
|
||||
echo -I%BASEDIR%\include\glib-2.0 -I%BASEDIR%\lib\glib-2.0\include ^^>> gtk_gir.bat
|
||||
echo -I%BASEDIR%\include\pango-1.0 -I%BASEDIR%\include\atk-1.0 ^^>> gtk_gir.bat
|
||||
echo -I%BASEDIR%\include\gdk-pixbuf-2.0 -I%BASEDIR%\include ^^>> gtk_gir.bat
|
||||
echo --namespace=Gtk --nsversion=3.0 ^^>> gtk_gir.bat
|
||||
echo --include=Atk-1.0 ^^>> gtk_gir.bat
|
||||
echo --include-uninstalled=./Gdk-3.0.gir ^^>> gtk_gir.bat
|
||||
echo --no-libtool --library=gtk-3-vs%VSVER% ^^>> gtk_gir.bat
|
||||
echo --reparse-validate --add-include-path=%BASEDIR%\share\gir-1.0 --add-include-path=. ^^>> gtk_gir.bat
|
||||
echo --pkg-export gtk+-3.0 --warn-all --c-include="gtk/gtkx.h" ^^>> gtk_gir.bat
|
||||
echo -I..\.. -DG_LOG_DOMAIN=\"Gtk\" -DGTK_LIBDIR=\"/dummy/lib\" ^^>> gtk_gir.bat
|
||||
echo -Dtime_t=long ^^>> gtk_gir.bat
|
||||
echo -DGTK_DATADIR=\"/dummy/share\" -DGTK_DATA_PREFIX=\"/dummy\" ^^>> gtk_gir.bat
|
||||
echo -DGTK_SYSCONFDIR=\"/dummy/etc\" -DGTK_VERSION=\"3.6.2\" ^^>> gtk_gir.bat
|
||||
echo -DGTK_BINARY_VERSION=\"3.0.0\" -DGTK_HOST=\"i686-pc-vs%VSVER%\" ^^>> gtk_gir.bat
|
||||
echo -DGTK_COMPILATION -DGTK_PRINT_BACKENDS=\"file\" ^^>> gtk_gir.bat
|
||||
echo -DGTK_PRINT_PREVIEW_COMMAND=\"undefined-gtk-print-preview-command\" ^^>> gtk_gir.bat
|
||||
echo -DGTK_FILE_SYSTEM_ENABLE_UNSUPPORTED -DGTK_PRINT_BACKEND_ENABLE_UNSUPPORTED ^^>> gtk_gir.bat
|
||||
echo -DINCLUDE_IM_am_et -DINCLUDE_IM_cedilla -DINCLUDE_IM_cyrillic_translit ^^>> gtk_gir.bat
|
||||
echo -DINCLUDE_IM_ime -DINCLUDE_IM_inuktitut -DINCLUDE_IM_ipa ^^>> gtk_gir.bat
|
||||
echo -DINCLUDE_IM_multipress -DINCLUDE_IM_thai -DINCLUDE_IM_ti_er ^^>> gtk_gir.bat
|
||||
echo -DINCLUDE_IM_ti_et -DINCLUDE_IM_viqr --filelist=gtk_list ^^>> gtk_gir.bat
|
||||
echo -o Gtk-3.0.gir>> gtk_gir.bat
|
||||
echo.>> gtk_gir.bat
|
||||
|
||||
echo Completed setup of .bat for generating Gtk-3.0.gir.
|
||||
echo.>> gtk_gir.bat
|
||||
|
||||
rem =================================================
|
||||
rem Finish setup of gtk_gir.bat to create Gtk-3.0.gir
|
||||
rem =================================================
|
||||
|
||||
rem =======================
|
||||
rem Now generate the .gir's
|
||||
rem =======================
|
||||
CALL gtk_gir.bat
|
||||
|
||||
rem Clean up the .bat/filelists for generating the .gir files...
|
||||
del gtk_gir.bat
|
||||
del gdk_list
|
||||
del gtk_list
|
||||
|
||||
rem Now compile the generated .gir files
|
||||
%BASEDIR%\bin\g-ir-compiler --includedir=. --debug --verbose Gdk-3.0.gir -o Gdk-3.0.typelib
|
||||
%BASEDIR%\bin\g-ir-compiler --includedir=. --debug --verbose Gtk-3.0.gir -o Gtk-3.0.typelib
|
||||
rem Copy the generated .girs and .typelibs to their appropriate places
|
||||
|
||||
mkdir ..\..\build\win32\vs%VSVER%\%CONF%\%PLAT%\share\gir-1.0
|
||||
move /y *.gir %BASEDIR%\share\gir-1.0\
|
||||
|
||||
mkdir ..\..\build\win32\vs%VSVER%\%CONF%\%PLAT%\lib\girepository-1.0
|
||||
move /y *.typelib %BASEDIR%\lib\girepository-1.0\
|
||||
|
||||
goto DONE
|
||||
|
||||
:ERR_PLAT
|
||||
echo You need to specify a valid Platform [set PLAT=Win32 or PLAT=x64]
|
||||
goto DONE
|
||||
:ERR_VSVER
|
||||
echo You need to specify your Visual Studio version [set VSVER=9 or VSVER=10 or VSVER=11]
|
||||
goto DONE
|
||||
:ERR_CONF
|
||||
echo You need to specify a valid Configuration [set CONF=Release or CONF=Debug]
|
||||
goto DONE
|
||||
:ERR_BASEDIR
|
||||
echo You need to specify a valid BASEDIR.
|
||||
goto DONE
|
||||
:ERR_PKGCONFIG
|
||||
echo You need to specify a valid PKG_CONFIG_PATH
|
||||
goto DONE
|
||||
:ERR_MINGWDIR
|
||||
echo You need to specify a valid MINGWDIR, where a valid gcc installation can be found.
|
||||
goto DONE
|
||||
:DONE
|
||||
|
||||
@@ -1,30 +1,29 @@
|
||||
include $(top_srcdir)/Makefile.decl
|
||||
|
||||
EXTRA_DIST += \
|
||||
README.txt \
|
||||
gtk+.sln \
|
||||
gtk+.props \
|
||||
gdk-win32.vcxproj \
|
||||
gdk-win32.vcxproj.filters \
|
||||
gdk.vcxproj \
|
||||
gdk.vcxprojin \
|
||||
gdk.vcxproj.filters \
|
||||
gdk.vcxproj.filtersin \
|
||||
gtk.vcxproj \
|
||||
gtk.vcxprojin \
|
||||
gtk.vcxproj.filters \
|
||||
gtk.vcxproj.filtersin \
|
||||
gtk3-demo.vcxproj \
|
||||
gtk3-demo.vcxproj.filters \
|
||||
gtk3-demo-application.vcxproj \
|
||||
gtk3-demo-application.vcxproj.filters \
|
||||
gtka11y.vcxproj \
|
||||
gtka11y.vcxproj.filters \
|
||||
gtka11y.vcxprojin \
|
||||
gtka11y.vcxproj.filtersin \
|
||||
gailutil.vcxproj \
|
||||
gailutil.vcxproj.filters \
|
||||
gengir.vcxproj \
|
||||
EXTRA_DIST += \
|
||||
README.txt \
|
||||
gtk+.sln \
|
||||
gtk+.props \
|
||||
gdk-win32.vcxproj \
|
||||
gdk-win32.vcxproj.filters \
|
||||
gdk.vcxproj \
|
||||
gdk.vcxprojin \
|
||||
gdk.vcxproj.filters \
|
||||
gdk.vcxproj.filtersin \
|
||||
gtk.vcxproj \
|
||||
gtk.vcxprojin \
|
||||
gtk.vcxproj.filters \
|
||||
gtk.vcxproj.filtersin \
|
||||
gtk3-demo.vcxproj \
|
||||
gtk3-demo.vcxproj.filters \
|
||||
gtk3-demo-application.vcxproj \
|
||||
gtk3-demo-application.vcxproj.filters \
|
||||
gtka11y.vcxproj \
|
||||
gtka11y.vcxproj.filters \
|
||||
gtka11y.vcxprojin \
|
||||
gtka11y.vcxproj.filtersin \
|
||||
gailutil.vcxproj \
|
||||
gailutil.vcxproj.filters \
|
||||
install.vcxproj
|
||||
|
||||
-include $(top_srcdir)/git.mk
|
||||
|
||||
@@ -75,7 +75,7 @@
|
||||
<PreprocessorDefinitions>_DEBUG;G_ENABLE_DEBUG;$(GdkDefines);INSIDE_GDK_WIN32;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<MinimalRebuild>true</MinimalRebuild>
|
||||
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
|
||||
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
|
||||
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
|
||||
<PrecompiledHeader>
|
||||
</PrecompiledHeader>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
|
||||
@@ -79,7 +79,7 @@
|
||||
<PreprocessorDefinitions>_DEBUG;G_ENABLE_DEBUG;$(GdkDefines);%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<MinimalRebuild>true</MinimalRebuild>
|
||||
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
|
||||
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
|
||||
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
|
||||
<PrecompiledHeader>
|
||||
</PrecompiledHeader>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
|
||||
@@ -1,112 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup Label="ProjectConfigurations">
|
||||
<ProjectConfiguration Include="Debug|Win32">
|
||||
<Configuration>Debug</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Debug|x64">
|
||||
<Configuration>Debug</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release|Win32">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release|x64">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
</ItemGroup>
|
||||
<PropertyGroup Label="Globals">
|
||||
<ProjectGuid>{2093D218-190E-4194-9421-3BA7CBF33B15}</ProjectGuid>
|
||||
<RootNamespace>gengir</RootNamespace>
|
||||
<Keyword>Win32Proj</Keyword>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
|
||||
<ConfigurationType>Utility</ConfigurationType>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
<PlatformToolset>v100</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
|
||||
<ConfigurationType>Utility</ConfigurationType>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
<PlatformToolset>v100</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
|
||||
<ConfigurationType>Utility</ConfigurationType>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
<PlatformToolset>v100</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
|
||||
<ConfigurationType>Utility</ConfigurationType>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
<PlatformToolset>v100</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
||||
<ImportGroup Label="ExtensionSettings">
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
<Import Project="gtk+.props" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
<Import Project="gtk+.props" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
<Import Project="gtk+.props" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
<Import Project="gtk+.props" />
|
||||
</ImportGroup>
|
||||
<PropertyGroup Label="UserMacros" />
|
||||
<PropertyGroup>
|
||||
<OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(GlibEtcInstallRoot)\</OutDir>
|
||||
<ExtensionsToDeleteOnClean Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
|
||||
<OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(GlibEtcInstallRoot)\</OutDir>
|
||||
<ExtensionsToDeleteOnClean Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
|
||||
<OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(GlibEtcInstallRoot)\</OutDir>
|
||||
<ExtensionsToDeleteOnClean Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
|
||||
<OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(GlibEtcInstallRoot)\</OutDir>
|
||||
<ExtensionsToDeleteOnClean Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
|
||||
</PropertyGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<PreBuildEvent>
|
||||
<Command>$(DoGenGir)</Command>
|
||||
</PreBuildEvent>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<PreBuildEvent>
|
||||
<Command>$(DoGenGir)</Command>
|
||||
</PreBuildEvent>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<PreBuildEvent>
|
||||
<Command>$(DoGenGir)</Command>
|
||||
</PreBuildEvent>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<PreBuildEvent>
|
||||
<Command>$(DoGenGir)</Command>
|
||||
</PreBuildEvent>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="gdk.vcxproj">
|
||||
<Project>{fc5aadb5-95cd-4bf0-ba8b-0c16fe7073f7}</Project>
|
||||
<ReferenceOutputAssembly>false</ReferenceOutputAssembly>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="gtk.vcxproj">
|
||||
<Project>{fc5aadb5-95cd-4bf0-ba8b-0c16fe7073f5}</Project>
|
||||
<ReferenceOutputAssembly>false</ReferenceOutputAssembly>
|
||||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||
<ImportGroup Label="ExtensionTargets">
|
||||
</ImportGroup>
|
||||
</Project>
|
||||
@@ -23,6 +23,23 @@ copy $(Configuration)\$(Platform)\bin\*.dll $(CopyDir)\bin
|
||||
copy $(Configuration)\$(Platform)\bin\*.exe $(CopyDir)\bin
|
||||
|
||||
|
||||
mkdir $(CopyDir)\share\gtk-$(ApiVersion)\demo
|
||||
|
||||
copy ..\..\..\demos\gtk-demo\*.c $(CopyDir)\share\gtk-$(ApiVersion)\demo
|
||||
|
||||
copy ..\..\..\demos\gtk-demo\*.css $(CopyDir)\share\gtk-$(ApiVersion)\demo
|
||||
|
||||
copy ..\..\..\demos\gtk-demo\*.h $(CopyDir)\share\gtk-$(ApiVersion)\demo
|
||||
|
||||
copy ..\..\..\demos\gtk-demo\*.ui $(CopyDir)\share\gtk-$(ApiVersion)\demo
|
||||
|
||||
copy ..\..\..\demos\gtk-demo\*.jpg $(CopyDir)\share\gtk-$(ApiVersion)\demo
|
||||
|
||||
copy ..\..\..\demos\gtk-demo\*.png $(CopyDir)\share\gtk-$(ApiVersion)\demo
|
||||
|
||||
copy ..\..\..\demos\gtk-demo\*.gif $(CopyDir)\share\gtk-$(ApiVersion)\demo
|
||||
|
||||
|
||||
mkdir $(CopyDir)\lib
|
||||
|
||||
copy $(Configuration)\$(Platform)\bin\*-$(ApiVersion).lib $(CopyDir)\lib
|
||||
@@ -576,7 +593,7 @@ copy ..\..\..\gtk\deprecated\gtkvseparator.h $(CopyDir)\include\gtk-$(ApiVersion
|
||||
copy ..\..\..\gtk\deprecated\gtkvpaned.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk\deprecated
|
||||
|
||||
|
||||
mkdir $(CopyDir)\include\gtk-$(ApiVersion)\gtk\a11y
|
||||
mkdir $(CopyDir)\include\gtk-$(ApiVersion)\a11y
|
||||
|
||||
|
||||
copy ..\..\..\gtk\a11y\gtkarrowaccessible.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk\a11y
|
||||
|
||||
@@ -16,8 +16,6 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "gailutil", "gailutil.vcxpro
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "install", "install.vcxproj", "{FC5AADB5-95CD-4BF0-BA8B-0C16FE7073FB}"
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "gengir", "gengir.vcxproj", "{2093D218-190E-4194-9421-3BA7CBF33B15}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Win32 = Debug|Win32
|
||||
@@ -90,10 +88,6 @@ Global
|
||||
{3281202A-CD26-4C67-B892-EB34BDBC612F}.Release|Win32.Build.0 = Release|Win32
|
||||
{3281202A-CD26-4C67-B892-EB34BDBC612F}.Release|x64.ActiveCfg = Release|x64
|
||||
{3281202A-CD26-4C67-B892-EB34BDBC612F}.Release|x64.Build.0 = Release|x64
|
||||
{2093D218-190E-4194-9421-3BA7CBF33B15}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{2093D218-190E-4194-9421-3BA7CBF33B15}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{2093D218-190E-4194-9421-3BA7CBF33B15}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{2093D218-190E-4194-9421-3BA7CBF33B15}.Release|x64.ActiveCfg = Release|x64
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
|
||||
@@ -79,7 +79,7 @@
|
||||
<PreprocessorDefinitions>_DEBUG;G_ENABLE_DEBUG;$(GtkDefines);%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<MinimalRebuild>true</MinimalRebuild>
|
||||
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
|
||||
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
|
||||
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
|
||||
<PrecompiledHeader>
|
||||
</PrecompiledHeader>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
|
||||
@@ -28,23 +28,19 @@
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
<WholeProgramOptimization>false</WholeProgramOptimization>
|
||||
<PlatformToolset>v100</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
<PlatformToolset>v100</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
<WholeProgramOptimization>false</WholeProgramOptimization>
|
||||
<PlatformToolset>v100</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
<PlatformToolset>v100</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
||||
<ImportGroup Label="ExtensionSettings">
|
||||
|
||||
@@ -79,7 +79,7 @@
|
||||
<PreprocessorDefinitions>_DEBUG;$(GtkPrefixDefine);%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<MinimalRebuild>true</MinimalRebuild>
|
||||
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
|
||||
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
|
||||
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
|
||||
<PrecompiledHeader>
|
||||
</PrecompiledHeader>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
|
||||
@@ -1,20 +1,19 @@
|
||||
include $(top_srcdir)/Makefile.decl
|
||||
|
||||
EXTRA_DIST += \
|
||||
README.txt \
|
||||
gtk+.sln \
|
||||
gtk+.vsprops \
|
||||
gdk-win32.vcproj \
|
||||
gdk.vcproj \
|
||||
gdk.vcprojin \
|
||||
gtk.vcproj \
|
||||
gtk.vcprojin \
|
||||
gtk3-demo.vcproj \
|
||||
gtk3-demo-application.vcproj \
|
||||
gtka11y.vcproj \
|
||||
gtka11y.vcprojin \
|
||||
gailutil.vcproj \
|
||||
gengir.vcproj \
|
||||
EXTRA_DIST += \
|
||||
README.txt \
|
||||
gtk+.sln \
|
||||
gtk+.vsprops \
|
||||
gdk-win32.vcproj \
|
||||
gdk.vcproj \
|
||||
gdk.vcprojin \
|
||||
gtk.vcproj \
|
||||
gtk.vcprojin \
|
||||
gtk3-demo.vcproj \
|
||||
gtk3-demo-application.vcproj \
|
||||
gtka11y.vcproj \
|
||||
gtka11y.vcprojin \
|
||||
gailutil.vcproj \
|
||||
install.vcproj
|
||||
|
||||
-include $(top_srcdir)/git.mk
|
||||
|
||||
@@ -35,7 +35,7 @@
|
||||
PreprocessorDefinitions="_DEBUG;G_ENABLE_DEBUG;$(GdkDefines);INSIDE_GDK_WIN32"
|
||||
MinimalRebuild="true"
|
||||
BasicRuntimeChecks="3"
|
||||
RuntimeLibrary="3"
|
||||
RuntimeLibrary="2"
|
||||
UsePrecompiledHeader="0"
|
||||
WarningLevel="3"
|
||||
DebugInformationFormat="4"
|
||||
|
||||
@@ -35,7 +35,7 @@
|
||||
PreprocessorDefinitions="_DEBUG;G_ENABLE_DEBUG;$(GdkDefines)"
|
||||
MinimalRebuild="true"
|
||||
BasicRuntimeChecks="3"
|
||||
RuntimeLibrary="3"
|
||||
RuntimeLibrary="2"
|
||||
UsePrecompiledHeader="0"
|
||||
WarningLevel="3"
|
||||
DebugInformationFormat="4"
|
||||
|
||||
@@ -1,77 +0,0 @@
|
||||
<?xml version="1.0" encoding="Windows-1252"?>
|
||||
<VisualStudioProject
|
||||
ProjectType="Visual C++"
|
||||
Version="9.00"
|
||||
Name="gengir"
|
||||
ProjectGUID="{2093D218-190E-4194-9421-3BA7CBF33B15}"
|
||||
RootNamespace="gengir"
|
||||
Keyword="Win32Proj"
|
||||
TargetFrameworkVersion="131072"
|
||||
>
|
||||
<Platforms>
|
||||
<Platform
|
||||
Name="Win32"
|
||||
/>
|
||||
<Platform
|
||||
Name="x64"
|
||||
/>
|
||||
</Platforms>
|
||||
<ToolFiles>
|
||||
</ToolFiles>
|
||||
<Configurations>
|
||||
<Configuration
|
||||
Name="Debug|Win32"
|
||||
InheritedPropertySheets=".\gtk+.vsprops"
|
||||
OutputDirectory="$(GlibEtcInstallRoot)"
|
||||
ConfigurationType="10"
|
||||
CharacterSet="2"
|
||||
DeleteExtensionsOnClean=""
|
||||
>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"
|
||||
CommandLine="$(DoGenGir)"
|
||||
/>
|
||||
</Configuration>
|
||||
<Configuration
|
||||
Name="Debug|x64"
|
||||
InheritedPropertySheets=".\gtk+.vsprops"
|
||||
OutputDirectory="$(GlibEtcInstallRoot)"
|
||||
ConfigurationType="10"
|
||||
CharacterSet="2"
|
||||
DeleteExtensionsOnClean=""
|
||||
>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"
|
||||
CommandLine="$(DoGenGir)"
|
||||
/>
|
||||
</Configuration>
|
||||
<Configuration
|
||||
Name="Release|Win32"
|
||||
InheritedPropertySheets=".\gtk+.vsprops"
|
||||
OutputDirectory="$(GlibEtcInstallRoot)"
|
||||
ConfigurationType="10"
|
||||
CharacterSet="2"
|
||||
WholeProgramOptimization="1"
|
||||
DeleteExtensionsOnClean=""
|
||||
>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"
|
||||
CommandLine="$(DoGenGir)"
|
||||
/>
|
||||
</Configuration>
|
||||
<Configuration
|
||||
Name="Release|x64"
|
||||
InheritedPropertySheets=".\gtk+.vsprops"
|
||||
OutputDirectory="$(GlibEtcInstallRoot)"
|
||||
ConfigurationType="10"
|
||||
CharacterSet="2"
|
||||
WholeProgramOptimization="1"
|
||||
DeleteExtensionsOnClean=""
|
||||
>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"
|
||||
CommandLine="$(DoGenGir)"
|
||||
/>
|
||||
</Configuration>
|
||||
</Configurations>
|
||||
</VisualStudioProject>
|
||||
@@ -42,12 +42,6 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "install", "install.vcproj",
|
||||
{3281202A-CD26-4C67-B892-EB34BDBC612F} = {3281202A-CD26-4C67-B892-EB34BDBC612F}
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "gengir", "gengir.vcproj", "{2093D218-190E-4194-9421-3BA7CBF33B15}"
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
{FC5AADB5-95CD-4BF0-BA8B-0C16FE7073F7} = {FC5AADB5-95CD-4BF0-BA8B-0C16FE7073F7}
|
||||
{FC5AADB5-95CD-4BF0-BA8B-0C16FE7073F5} = {FC5AADB5-95CD-4BF0-BA8B-0C16FE7073F5}
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Win32 = Debug|Win32
|
||||
@@ -120,10 +114,6 @@ Global
|
||||
{3281202A-CD26-4C67-B892-EB34BDBC612F}.Release|Win32.Build.0 = Release|Win32
|
||||
{3281202A-CD26-4C67-B892-EB34BDBC612F}.Release|x64.ActiveCfg = Release|x64
|
||||
{3281202A-CD26-4C67-B892-EB34BDBC612F}.Release|x64.Build.0 = Release|x64
|
||||
{2093D218-190E-4194-9421-3BA7CBF33B15}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{2093D218-190E-4194-9421-3BA7CBF33B15}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{2093D218-190E-4194-9421-3BA7CBF33B15}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{2093D218-190E-4194-9421-3BA7CBF33B15}.Release|x64.ActiveCfg = Release|x64
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
|
||||
@@ -79,6 +79,16 @@ mkdir $(CopyDir)\bin

|
||||
copy $(ConfigurationName)\$(PlatformName)\bin\*.dll $(CopyDir)\bin

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

|
||||
|
||||
mkdir $(CopyDir)\share\gtk-$(ApiVersion)\demo

|
||||
|
||||
copy ..\..\..\demos\gtk-demo\*.c $(CopyDir)\share\gtk-$(ApiVersion)\demo

|
||||
copy ..\..\..\demos\gtk-demo\*.css $(CopyDir)\share\gtk-$(ApiVersion)\demo

|
||||
copy ..\..\..\demos\gtk-demo\*.h $(CopyDir)\share\gtk-$(ApiVersion)\demo

|
||||
copy ..\..\..\demos\gtk-demo\*.ui $(CopyDir)\share\gtk-$(ApiVersion)\demo

|
||||
copy ..\..\..\demos\gtk-demo\*.jpg $(CopyDir)\share\gtk-$(ApiVersion)\demo

|
||||
copy ..\..\..\demos\gtk-demo\*.png $(CopyDir)\share\gtk-$(ApiVersion)\demo

|
||||
copy ..\..\..\demos\gtk-demo\*.gif $(CopyDir)\share\gtk-$(ApiVersion)\demo

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

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

|
||||
|
||||
@@ -359,7 +369,7 @@ copy ..\..\..\gtk\deprecated\gtkvscrollbar.h $(CopyDir)\include\gtk-$(ApiVersion
|
||||
copy ..\..\..\gtk\deprecated\gtkvseparator.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk\deprecated

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

|
||||
|
||||
mkdir $(CopyDir)\include\gtk-$(ApiVersion)\gtk\a11y

|
||||
mkdir $(CopyDir)\include\gtk-$(ApiVersion)\a11y

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

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

|
||||
|
||||
@@ -35,7 +35,7 @@
|
||||
PreprocessorDefinitions="_DEBUG;G_ENABLE_DEBUG;$(GtkDefines)"
|
||||
MinimalRebuild="true"
|
||||
BasicRuntimeChecks="3"
|
||||
RuntimeLibrary="3"
|
||||
RuntimeLibrary="2"
|
||||
UsePrecompiledHeader="0"
|
||||
WarningLevel="3"
|
||||
DebugInformationFormat="4"
|
||||
|
||||
@@ -35,7 +35,7 @@
|
||||
PreprocessorDefinitions="_DEBUG;$(GtkPrefixDefine)"
|
||||
MinimalRebuild="true"
|
||||
BasicRuntimeChecks="3"
|
||||
RuntimeLibrary="3"
|
||||
RuntimeLibrary="2"
|
||||
UsePrecompiledHeader="0"
|
||||
WarningLevel="3"
|
||||
DebugInformationFormat="4"
|
||||
|
||||
98
configure.ac
@@ -9,8 +9,8 @@
|
||||
# set GTK_BINARY_AGE and GTK_INTERFACE_AGE to 0.
|
||||
|
||||
m4_define([gtk_major_version], [3])
|
||||
m4_define([gtk_minor_version], [9])
|
||||
m4_define([gtk_micro_version], [2])
|
||||
m4_define([gtk_minor_version], [7])
|
||||
m4_define([gtk_micro_version], [11])
|
||||
m4_define([gtk_interface_age], [0])
|
||||
m4_define([gtk_binary_age],
|
||||
[m4_eval(100 * gtk_minor_version + gtk_micro_version)])
|
||||
@@ -42,7 +42,7 @@ AC_CANONICAL_TARGET
|
||||
m4_define([gtk_binary_version], [3.0.0])
|
||||
|
||||
# required versions of other packages
|
||||
m4_define([glib_required_version], [2.37.0])
|
||||
m4_define([glib_required_version], [2.35.3])
|
||||
m4_define([pango_required_version], [1.32.4])
|
||||
m4_define([atk_required_version], [2.7.5])
|
||||
m4_define([cairo_required_version], [1.10.0])
|
||||
@@ -251,11 +251,10 @@ AC_ARG_ENABLE(debug,
|
||||
[turn on debugging @<:@default=debug_default@:>@])],,
|
||||
[enable_debug=debug_default])
|
||||
|
||||
AC_ARG_ENABLE(installed_tests,
|
||||
AS_HELP_STRING([--enable-installed-tests],
|
||||
[Install test programs (default: no)]),,
|
||||
[enable_installed_tests=no])
|
||||
AM_CONDITIONAL(BUILDOPT_INSTALL_TESTS, test x$enable_installed_tests = xyes)
|
||||
AC_ARG_ENABLE(rebuilds,
|
||||
[AS_HELP_STRING([--disable-rebuilds],
|
||||
[disable all source autogeneration rules])],,
|
||||
[enable_rebuilds=yes])
|
||||
|
||||
AC_ARG_ENABLE(gtk2-dependency,
|
||||
[AS_HELP_STRING([--enable-gtk2-dependency],
|
||||
@@ -351,7 +350,7 @@ if test "$enable_win32_backend" = "yes"; then
|
||||
backend_immodules="$backend_immodules,ime"
|
||||
GDK_WINDOWING="$GDK_WINDOWING
|
||||
#define GDK_WINDOWING_WIN32"
|
||||
GDK_EXTRA_LIBS="$GDK_EXTRA_LIBS -lgdi32 -limm32 -lshell32 -lole32 -Wl,-luuid -lwinmm"
|
||||
GDK_EXTRA_LIBS="$GDK_EXTRA_LIBS -lgdi32 -limm32 -lshell32 -lole32 -Wl,-luuid"
|
||||
AM_CONDITIONAL(USE_WIN32, true)
|
||||
PANGO_PACKAGES="pangowin32 pangocairo"
|
||||
else
|
||||
@@ -362,7 +361,6 @@ DISABLE_ON_QUARTZ=''
|
||||
if test "x$enable_quartz_backend" = xyes; then
|
||||
cairo_backends="$cairo_backends cairo-quartz"
|
||||
GDK_BACKENDS="$GDK_BACKENDS quartz"
|
||||
backend_immodules="$backend_immodules,quartz"
|
||||
GDK_WINDOWING="$GDK_WINDOWING
|
||||
#define GDK_WINDOWING_QUARTZ"
|
||||
GDK_EXTRA_LIBS="$GDK_EXTRA_LIBS -framework Cocoa"
|
||||
@@ -392,7 +390,6 @@ else
|
||||
AM_CONDITIONAL(USE_BROADWAY, false)
|
||||
fi
|
||||
|
||||
DISABLE_ON_WAYLAND=''
|
||||
if test "x$enable_wayland_backend" = "xyes"; then
|
||||
# For the cairo image backend
|
||||
cairo_backends="$cairo_backends cairo"
|
||||
@@ -400,13 +397,11 @@ if test "x$enable_wayland_backend" = "xyes"; then
|
||||
have_gio_unix=yes
|
||||
GDK_WINDOWING="$GDK_WINDOWING
|
||||
#define GDK_WINDOWING_WAYLAND"
|
||||
DISABLE_ON_WAYLAND='%'
|
||||
WAYLAND_PACKAGES="wayland-client >= 1.0.0 xkbcommon >= 0.2.0 wayland-cursor"
|
||||
AM_CONDITIONAL(USE_WAYLAND, true)
|
||||
else
|
||||
AM_CONDITIONAL(USE_WAYLAND, false)
|
||||
fi
|
||||
AC_SUBST(DISABLE_ON_WAYLAND)
|
||||
|
||||
# strip leading space
|
||||
GDK_BACKENDS=${GDK_BACKENDS#* }
|
||||
@@ -510,6 +505,16 @@ PKG_CHECK_MODULES(CAIRO_BACKEND, [$cairo_backends])
|
||||
|
||||
PKG_CHECK_MODULES(GMODULE, [gmodule-2.0])
|
||||
|
||||
if test "$os_win32" != yes; then
|
||||
# libtool option to control which symbols are exported
|
||||
# right now, symbols starting with _ are not exported
|
||||
LIBTOOL_EXPORT_OPTIONS='-export-symbols-regex "^[[^_]].*"'
|
||||
else
|
||||
# We currently use .def files on Windows (for gdk and gtk)
|
||||
LIBTOOL_EXPORT_OPTIONS=
|
||||
fi
|
||||
AC_SUBST(LIBTOOL_EXPORT_OPTIONS)
|
||||
|
||||
dnl ******************************************************
|
||||
dnl * See whether to include shared library dependencies *
|
||||
dnl ******************************************************
|
||||
@@ -544,6 +549,17 @@ AM_CONDITIONAL(DISABLE_EXPLICIT_DEPS, test $enable_explicit_deps = no)
|
||||
|
||||
AC_PATH_PROGS(PERL, perl5 perl)
|
||||
|
||||
# We would like indent, but don't require it.
|
||||
AC_CHECK_PROG(INDENT, indent, indent)
|
||||
|
||||
REBUILD=\#
|
||||
if test "x$enable_rebuilds" = "xyes" && \
|
||||
test -n "$PERL" && \
|
||||
$PERL -e 'exit !($] >= 5.002)' > /dev/null 2>&1 ; then
|
||||
REBUILD=
|
||||
fi
|
||||
AC_SUBST(REBUILD)
|
||||
|
||||
AC_CHECK_FUNCS(lstat mkstemp)
|
||||
AC_CHECK_FUNCS(localtime_r)
|
||||
|
||||
@@ -685,12 +701,6 @@ AM_PATH_GLIB_2_0(glib_required_version, :,
|
||||
*** GLIB is always available from ftp://ftp.gtk.org/pub/gtk/.]),
|
||||
gobject gmodule-no-export)
|
||||
|
||||
PKG_PROG_PKG_CONFIG_FOR_BUILD
|
||||
GLIB_CFLAGS_FOR_BUILD=`$PKG_CONFIG_FOR_BUILD --cflags glib-2.0 gobject-2.0 gmodule-no-export-2.0`
|
||||
GLIB_LIBS_FOR_BUILD=`$PKG_CONFIG_FOR_BUILD --libs glib-2.0 gobject-2.0 gmodule-no-export-2.0`
|
||||
AC_SUBST(GLIB_CFLAGS_FOR_BUILD)
|
||||
AC_SUBST(GLIB_LIBS_FOR_BUILD)
|
||||
|
||||
dnl Check for bind_textdomain_codeset, including -lintl if GLib brings it in.
|
||||
dnl
|
||||
gtk_save_LIBS=$LIBS
|
||||
@@ -862,7 +872,6 @@ AM_CONDITIONAL(INCLUDE_IM_IME, [test x"$INCLUDE_ime" = xyes])
|
||||
AM_CONDITIONAL(INCLUDE_IM_INUKTITUT, [test x"$INCLUDE_inuktitut" = xyes])
|
||||
AM_CONDITIONAL(INCLUDE_IM_IPA, [test x"$INCLUDE_ipa" = xyes])
|
||||
AM_CONDITIONAL(INCLUDE_IM_MULTIPRESS, [test x"$INCLUDE_multipress" = xyes])
|
||||
AM_CONDITIONAL(INCLUDE_IM_QUARTZ, [test x"$INCLUDE_quartz" = xyes])
|
||||
AM_CONDITIONAL(INCLUDE_IM_THAI, [test x"$INCLUDE_thai" = xyes])
|
||||
AM_CONDITIONAL(INCLUDE_IM_TI_ER, [test x"$INCLUDE_ti_er" = xyes])
|
||||
AM_CONDITIONAL(INCLUDE_IM_TI_ET, [test x"$INCLUDE_ti_et" = xyes])
|
||||
@@ -1230,6 +1239,7 @@ if test "$have_gio_unix" = "yes"; then
|
||||
else
|
||||
GDK_GIO_PACKAGE=gio-2.0
|
||||
fi
|
||||
AM_CONDITIONAL(HAVE_GIO_UNIX, test "$have_gio_unix" = "yes")
|
||||
|
||||
# Check for Pango flags
|
||||
|
||||
@@ -1411,7 +1421,7 @@ else
|
||||
$CUPS_API_MAJOR -eq 1 -a $CUPS_API_MINOR -ge 6; then
|
||||
AC_DEFINE(HAVE_CUPS_API_1_6, 1,
|
||||
[Define to 1 if CUPS 1.6 API is available])
|
||||
have_cups_api_1_6=yes
|
||||
|
||||
fi
|
||||
|
||||
AC_SUBST(CUPS_API_MAJOR)
|
||||
@@ -1661,39 +1671,6 @@ else
|
||||
AC_MSG_RESULT([no])
|
||||
fi
|
||||
|
||||
##################################################
|
||||
# Visibility handling
|
||||
##################################################
|
||||
|
||||
GDK_HIDDEN_VISIBILITY_CFLAGS=""
|
||||
case "$host" in
|
||||
*-*-mingw*)
|
||||
dnl on mingw32 we do -fvisibility=hidden and __declspec(dllexport)
|
||||
AC_DEFINE([_GDK_EXTERN], [__attribute__((visibility("default"))) __declspec(dllexport) extern],
|
||||
[defines how to decorate public symbols while building])
|
||||
CFLAGS="${CFLAGS} -fvisibility=hidden"
|
||||
;;
|
||||
*)
|
||||
dnl on other compilers, check if we can do -fvisibility=hidden
|
||||
SAVED_CFLAGS="${CFLAGS}"
|
||||
CFLAGS="-fvisibility=hidden"
|
||||
AC_MSG_CHECKING([for -fvisibility=hidden compiler flag])
|
||||
AC_TRY_COMPILE([], [int main (void) { return 0; }],
|
||||
AC_MSG_RESULT(yes)
|
||||
enable_fvisibility_hidden=yes,
|
||||
AC_MSG_RESULT(no)
|
||||
enable_fvisibility_hidden=no)
|
||||
CFLAGS="${SAVED_CFLAGS}"
|
||||
|
||||
AS_IF([test "${enable_fvisibility_hidden}" = "yes"], [
|
||||
AC_DEFINE([_GDK_EXTERN], [__attribute__((visibility("default"))) extern],
|
||||
[defines how to decorate public symbols while building])
|
||||
GDK_HIDDEN_VISIBILITY_CFLAGS="-fvisibility=hidden"
|
||||
])
|
||||
;;
|
||||
esac
|
||||
AC_SUBST(GDK_HIDDEN_VISIBILITY_CFLAGS)
|
||||
|
||||
##################################################
|
||||
# Output commands
|
||||
##################################################
|
||||
@@ -1782,14 +1759,11 @@ demos/pixbuf-demo/Makefile
|
||||
demos/widget-factory/Makefile
|
||||
examples/Makefile
|
||||
tests/Makefile
|
||||
tests/a11y/Makefile
|
||||
tests/css/Makefile
|
||||
tests/css/parser/Makefile
|
||||
tests/reftests/Makefile
|
||||
tests/visuals/Makefile
|
||||
testsuite/Makefile
|
||||
testsuite/a11y/Makefile
|
||||
testsuite/css/Makefile
|
||||
testsuite/css/parser/Makefile
|
||||
testsuite/gdk/Makefile
|
||||
testsuite/gtk/Makefile
|
||||
testsuite/reftests/Makefile
|
||||
docs/Makefile
|
||||
docs/reference/Makefile
|
||||
docs/reference/gdk/Makefile
|
||||
@@ -1812,6 +1786,7 @@ gdk/win32/rc/Makefile
|
||||
gdk/win32/rc/gdk.rc
|
||||
gdk/quartz/Makefile
|
||||
gdk/wayland/Makefile
|
||||
gdk/tests/Makefile
|
||||
gdk/gdkversionmacros.h
|
||||
gtk/Makefile
|
||||
gtk/makefile.msc
|
||||
@@ -1819,6 +1794,7 @@ gtk/gtkversion.h
|
||||
gtk/gtk-win32.rc
|
||||
gtk/a11y/Makefile
|
||||
gtk/native/Makefile
|
||||
gtk/tests/Makefile
|
||||
libgail-util/Makefile
|
||||
modules/Makefile
|
||||
modules/engines/Makefile
|
||||
|
||||
@@ -39,13 +39,10 @@ demos = \
|
||||
pickers.c \
|
||||
pixbufs.c \
|
||||
printing.c \
|
||||
revealer.c \
|
||||
rotated_text.c \
|
||||
search_entry.c \
|
||||
search_entry2.c \
|
||||
sizegroup.c \
|
||||
spinner.c \
|
||||
stack.c \
|
||||
stock_browser.c \
|
||||
textview.c \
|
||||
textscroll.c \
|
||||
@@ -87,8 +84,8 @@ gsettings_SCHEMAS = \
|
||||
|
||||
@GSETTINGS_RULES@
|
||||
|
||||
demos.h: $(demos) geninclude.pl
|
||||
$(AM_V_GEN) (here=`pwd` ; cd $(srcdir) && $(PERL) $$here/geninclude.pl $(demos)) > demos.h
|
||||
demos.h: @REBUILD@ $(demos) geninclude.pl
|
||||
$(AM_V_GEN) (here=`pwd` ; cd $(srcdir) && $(PERL) $$here/geninclude.pl $(demos)) > demos.h
|
||||
|
||||
gtk3_demo_SOURCES = \
|
||||
$(demos) \
|
||||
@@ -113,8 +110,6 @@ RESOURCES= $(demos) \
|
||||
application.ui \
|
||||
demo.ui \
|
||||
menus.ui \
|
||||
stack.ui \
|
||||
revealer.ui \
|
||||
theming.ui \
|
||||
alphatest.png \
|
||||
apple-red.png \
|
||||
|
||||
@@ -5,9 +5,8 @@
|
||||
* This example uses GtkUIManager and GtkActionGroup.
|
||||
*/
|
||||
|
||||
#include "config.h"
|
||||
|
||||
#include <gtk/gtk.h>
|
||||
#include "config.h"
|
||||
|
||||
static GtkWidget *window = NULL;
|
||||
static GtkWidget *infobar = NULL;
|
||||
|
||||
@@ -1,23 +1,24 @@
|
||||
/* Change Display
|
||||
*
|
||||
* Demonstrates migrating a window between different displays.
|
||||
* A display is a mouse and keyboard with some number of
|
||||
* associated monitors. The neat thing about having multiple
|
||||
* displays is that they can be on a completely separate
|
||||
* Demonstrates migrating a window between different displays and
|
||||
* screens. A display is a mouse and keyboard with some number of
|
||||
* associated monitors. A screen is a set of monitors grouped
|
||||
* into a single physical work area. The neat thing about having
|
||||
* multiple displays is that they can be on a completely separate
|
||||
* computers, as long as there is a network connection to the
|
||||
* computer where the application is running.
|
||||
*
|
||||
* Only some of the windowing systems where GTK+ runs have the
|
||||
* concept of multiple displays. (The X Window System is the
|
||||
* main example.) Other windowing systems can only handle one
|
||||
* keyboard and mouse, and combine all monitors into
|
||||
* a single display.
|
||||
* concept of multiple displays and screens. (The X Window System
|
||||
* is the main example.) Other windowing systems can only
|
||||
* handle one keyboard and mouse, and combine all monitors into
|
||||
* a single screen.
|
||||
*
|
||||
* This is a moderately complex example, and demonstrates:
|
||||
*
|
||||
* - Tracking the currently open displays
|
||||
* - Tracking the currently open displays and screens
|
||||
*
|
||||
* - Changing the display for a window
|
||||
* - Changing the screen for a window
|
||||
*
|
||||
* - Letting the user choose a window by clicking on it
|
||||
*
|
||||
@@ -44,8 +45,11 @@ struct _ChangeDisplayInfo
|
||||
GtkSizeGroup *size_group;
|
||||
|
||||
GtkTreeModel *display_model;
|
||||
GtkTreeModel *screen_model;
|
||||
GtkTreeSelection *screen_selection;
|
||||
|
||||
GdkDisplay *current_display;
|
||||
GdkScreen *current_screen;
|
||||
};
|
||||
|
||||
/* These enumerations provide symbolic names for the columns
|
||||
@@ -173,11 +177,40 @@ query_change_display (ChangeDisplayInfo *info)
|
||||
"to move to the new screen");
|
||||
|
||||
if (toplevel)
|
||||
gtk_window_set_screen (GTK_WINDOW (toplevel), gdk_display_get_screen (info->current_display, 0));
|
||||
gtk_window_set_screen (GTK_WINDOW (toplevel), info->current_screen);
|
||||
else
|
||||
gdk_display_beep (gdk_screen_get_display (screen));
|
||||
}
|
||||
|
||||
/* Fills in the screen list based on the current display
|
||||
*/
|
||||
static void
|
||||
fill_screens (ChangeDisplayInfo *info)
|
||||
{
|
||||
gtk_list_store_clear (GTK_LIST_STORE (info->screen_model));
|
||||
|
||||
if (info->current_display)
|
||||
{
|
||||
gint n_screens = gdk_display_get_n_screens (info->current_display);
|
||||
gint i;
|
||||
|
||||
for (i = 0; i < n_screens; i++)
|
||||
{
|
||||
GdkScreen *screen = gdk_display_get_screen (info->current_display, i);
|
||||
GtkTreeIter iter;
|
||||
|
||||
gtk_list_store_append (GTK_LIST_STORE (info->screen_model), &iter);
|
||||
gtk_list_store_set (GTK_LIST_STORE (info->screen_model), &iter,
|
||||
SCREEN_COLUMN_NUMBER, i,
|
||||
SCREEN_COLUMN_SCREEN, screen,
|
||||
-1);
|
||||
|
||||
if (i == 0)
|
||||
gtk_tree_selection_select_iter (info->screen_selection, &iter);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* Called when the user clicks on a button in our dialog or
|
||||
* closes the dialog through the window manager. Unless the
|
||||
* "Change" button was clicked, we destroy the dialog.
|
||||
@@ -287,6 +320,28 @@ display_changed_cb (GtkTreeSelection *selection,
|
||||
-1);
|
||||
else
|
||||
info->current_display = NULL;
|
||||
|
||||
fill_screens (info);
|
||||
}
|
||||
|
||||
/* Called when the selected row in the sceen list changes.
|
||||
* Updates info->current_screen.
|
||||
*/
|
||||
static void
|
||||
screen_changed_cb (GtkTreeSelection *selection,
|
||||
ChangeDisplayInfo *info)
|
||||
{
|
||||
GtkTreeModel *model;
|
||||
GtkTreeIter iter;
|
||||
|
||||
if (info->current_screen)
|
||||
g_object_unref (info->current_screen);
|
||||
if (gtk_tree_selection_get_selected (selection, &model, &iter))
|
||||
gtk_tree_model_get (model, &iter,
|
||||
SCREEN_COLUMN_SCREEN, &info->current_screen,
|
||||
-1);
|
||||
else
|
||||
info->current_screen = NULL;
|
||||
}
|
||||
|
||||
/* This function is used both for creating the "Display" and
|
||||
@@ -391,6 +446,37 @@ create_display_frame (ChangeDisplayInfo *info)
|
||||
return frame;
|
||||
}
|
||||
|
||||
/* Creates the "Screen" frame in the main window.
|
||||
*/
|
||||
GtkWidget *
|
||||
create_screen_frame (ChangeDisplayInfo *info)
|
||||
{
|
||||
GtkWidget *frame;
|
||||
GtkWidget *tree_view;
|
||||
GtkWidget *button_vbox;
|
||||
GtkTreeViewColumn *column;
|
||||
|
||||
create_frame (info, "Screen", &frame, &tree_view, &button_vbox);
|
||||
|
||||
info->screen_model = (GtkTreeModel *)gtk_list_store_new (SCREEN_NUM_COLUMNS,
|
||||
G_TYPE_INT,
|
||||
GDK_TYPE_SCREEN);
|
||||
|
||||
gtk_tree_view_set_model (GTK_TREE_VIEW (tree_view), info->screen_model);
|
||||
|
||||
column = gtk_tree_view_column_new_with_attributes ("Number",
|
||||
gtk_cell_renderer_text_new (),
|
||||
"text", SCREEN_COLUMN_NUMBER,
|
||||
NULL);
|
||||
gtk_tree_view_append_column (GTK_TREE_VIEW (tree_view), column);
|
||||
|
||||
info->screen_selection = gtk_tree_view_get_selection (GTK_TREE_VIEW (tree_view));
|
||||
g_signal_connect (info->screen_selection, "changed",
|
||||
G_CALLBACK (screen_changed_cb), info);
|
||||
|
||||
return frame;
|
||||
}
|
||||
|
||||
/* Called when one of the currently open displays is closed.
|
||||
* Remove it from our list of displays.
|
||||
*/
|
||||
@@ -494,9 +580,12 @@ destroy_info (ChangeDisplayInfo *info)
|
||||
|
||||
g_object_unref (info->size_group);
|
||||
g_object_unref (info->display_model);
|
||||
g_object_unref (info->screen_model);
|
||||
|
||||
if (info->current_display)
|
||||
g_object_unref (info->current_display);
|
||||
if (info->current_screen)
|
||||
g_object_unref (info->current_screen);
|
||||
|
||||
g_free (info);
|
||||
}
|
||||
@@ -548,6 +637,9 @@ do_changedisplay (GtkWidget *do_widget)
|
||||
frame = create_display_frame (info);
|
||||
gtk_box_pack_start (GTK_BOX (vbox), frame, TRUE, TRUE, 0);
|
||||
|
||||
frame = create_screen_frame (info);
|
||||
gtk_box_pack_start (GTK_BOX (vbox), frame, TRUE, TRUE, 0);
|
||||
|
||||
initialize_displays (info);
|
||||
|
||||
gtk_widget_show_all (info->window);
|
||||
|
||||
@@ -55,12 +55,6 @@
|
||||
<file preprocess="to-pixdata">gnome-fs-directory.png</file>
|
||||
<file preprocess="to-pixdata">gnome-fs-regular.png</file>
|
||||
</gresource>
|
||||
<gresource prefix="/stack">
|
||||
<file>stack.ui</file>
|
||||
</gresource>
|
||||
<gresource prefix="/revealer">
|
||||
<file>revealer.ui</file>
|
||||
</gresource>
|
||||
<gresource prefix="/images">
|
||||
<file>alphatest.png</file>
|
||||
<file>floppybuddy.gif</file>
|
||||
@@ -113,12 +107,9 @@
|
||||
<file>pickers.c</file>
|
||||
<file>pixbufs.c</file>
|
||||
<file>printing.c</file>
|
||||
<file>revealer.c</file>
|
||||
<file>rotated_text.c</file>
|
||||
<file>search_entry.c</file>
|
||||
<file>search_entry2.c</file>
|
||||
<file>sizegroup.c</file>
|
||||
<file>stack.c</file>
|
||||
<file>spinner.c</file>
|
||||
<file>stock_browser.c</file>
|
||||
<file>textview.c</file>
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
#include "config.h"
|
||||
#include <errno.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
@@ -402,7 +403,7 @@ static GtkWidget *create_text (GtkWidget **text_view, gboolean is_source);
|
||||
static void
|
||||
add_data_tab (const gchar *demoname)
|
||||
{
|
||||
gchar *resource_dir, *resource_name, *content_type, *content_mime;
|
||||
gchar *resource_dir, *resource_name, *content_type;
|
||||
gchar **resources;
|
||||
GBytes *bytes;
|
||||
GtkWidget *widget, *label;
|
||||
@@ -426,20 +427,17 @@ add_data_tab (const gchar *demoname)
|
||||
g_bytes_get_data (bytes, NULL),
|
||||
g_bytes_get_size (bytes),
|
||||
NULL);
|
||||
content_mime = g_content_type_get_mime_type (content_type);
|
||||
|
||||
/* In theory we should look at all the mime types gdk-pixbuf supports
|
||||
* and go from there, but we know what file types we've added.
|
||||
*/
|
||||
if (g_content_type_is_a (content_mime, "image/png") ||
|
||||
g_content_type_is_a (content_mime, "image/gif") ||
|
||||
g_content_type_is_a (content_mime, "image/jpeg"))
|
||||
if (g_content_type_is_a (content_type, "image/png") ||
|
||||
g_content_type_is_a (content_type, "image/gif") ||
|
||||
g_content_type_is_a (content_type, "image/jpeg"))
|
||||
{
|
||||
widget = gtk_image_new_from_resource (resource_name);
|
||||
}
|
||||
else if (g_content_type_is_a (content_mime, "text/plain") ||
|
||||
g_content_type_is_a (content_mime, "application/x-ext-ui") ||
|
||||
g_content_type_is_a (content_mime, "text/css"))
|
||||
else if (g_content_type_is_a (content_type, "text/plain"))
|
||||
{
|
||||
GtkTextBuffer *buffer;
|
||||
GtkWidget *textview;
|
||||
@@ -451,8 +449,7 @@ add_data_tab (const gchar *demoname)
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
g_warning ("Don't know how to display resource '%s' of type '%s'\n", resource_name, content_mime);
|
||||
g_warning ("Don't know how to display resource '%s' of type '%s'\n", resource_name, content_type);
|
||||
widget = NULL;
|
||||
}
|
||||
|
||||
@@ -461,7 +458,6 @@ add_data_tab (const gchar *demoname)
|
||||
gtk_widget_show (label);
|
||||
gtk_notebook_append_page (GTK_NOTEBOOK (notebook), widget, label);
|
||||
|
||||
g_free (content_mime);
|
||||
g_free (content_type);
|
||||
g_free (resource_name);
|
||||
g_bytes_unref (bytes);
|
||||
|
||||
@@ -1,85 +0,0 @@
|
||||
/* Revealer
|
||||
*
|
||||
* GtkRevealer is a container that animates showing and hiding
|
||||
* of its sole child with nice transitions.
|
||||
*/
|
||||
|
||||
#include <gtk/gtk.h>
|
||||
|
||||
static GtkBuilder *builder;
|
||||
static gint count = 0;
|
||||
|
||||
static void
|
||||
change_direction (GtkRevealer *revealer)
|
||||
{
|
||||
gboolean revealed;
|
||||
|
||||
revealed = gtk_revealer_get_child_revealed (revealer);
|
||||
gtk_revealer_set_reveal_child (revealer, !revealed);
|
||||
}
|
||||
|
||||
static gboolean
|
||||
reveal_one (gpointer data)
|
||||
{
|
||||
gchar *name;
|
||||
GtkRevealer *revealer;
|
||||
|
||||
name = g_strdup_printf ("revealer%d", count);
|
||||
revealer = (GtkRevealer *)gtk_builder_get_object (builder, name);
|
||||
|
||||
gtk_revealer_set_reveal_child (revealer, TRUE);
|
||||
|
||||
g_signal_connect (revealer, "notify::child-revealed",
|
||||
G_CALLBACK (change_direction), NULL);
|
||||
count++;
|
||||
|
||||
return count < 9;
|
||||
}
|
||||
|
||||
static void
|
||||
response_cb (GtkWidget *dialog,
|
||||
gint response_id,
|
||||
gpointer data)
|
||||
{
|
||||
gtk_widget_destroy (dialog);
|
||||
}
|
||||
|
||||
GtkWidget *
|
||||
do_revealer (GtkWidget *do_widget)
|
||||
{
|
||||
static GtkWidget *window = NULL;
|
||||
GError *err = NULL;
|
||||
|
||||
if (!window)
|
||||
{
|
||||
builder = gtk_builder_new ();
|
||||
gtk_builder_add_from_resource (builder, "/revealer/revealer.ui", &err);
|
||||
if (err)
|
||||
{
|
||||
g_error ("ERROR: %s\n", err->message);
|
||||
return NULL;
|
||||
}
|
||||
gtk_builder_connect_signals (builder, NULL);
|
||||
window = GTK_WIDGET (gtk_builder_get_object (builder, "dialog1"));
|
||||
gtk_window_set_screen (GTK_WINDOW (window),
|
||||
gtk_widget_get_screen (do_widget));
|
||||
g_signal_connect (window, "destroy",
|
||||
G_CALLBACK (gtk_widget_destroyed), &window);
|
||||
g_signal_connect (window, "response", G_CALLBACK (response_cb), NULL);
|
||||
}
|
||||
|
||||
if (!gtk_widget_get_visible (window))
|
||||
{
|
||||
count = 0;
|
||||
g_timeout_add (690, reveal_one, NULL);
|
||||
gtk_widget_show_all (window);
|
||||
}
|
||||
else
|
||||
{
|
||||
gtk_widget_destroy (window);
|
||||
window = NULL;
|
||||
}
|
||||
|
||||
|
||||
return window;
|
||||
}
|
||||
@@ -1,223 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<interface>
|
||||
<!-- interface-requires gtk+ 3.6 -->
|
||||
<object class="GtkDialog" id="dialog1">
|
||||
<property name="can_focus">False</property>
|
||||
<property name="border_width">5</property>
|
||||
<property name="type_hint">dialog</property>
|
||||
<property name="default_width">300</property>
|
||||
<property name="default_height">300</property>
|
||||
<property name="title">Revealer</property>
|
||||
<child internal-child="vbox">
|
||||
<object class="GtkBox" id="dialog-vbox1">
|
||||
<property name="can_focus">False</property>
|
||||
<property name="orientation">vertical</property>
|
||||
<property name="spacing">2</property>
|
||||
<child internal-child="action_area">
|
||||
<object class="GtkButtonBox" id="dialog-action_area1">
|
||||
<property name="can_focus">False</property>
|
||||
<property name="layout_style">end</property>
|
||||
<child>
|
||||
<object class="GtkButton" id="button1">
|
||||
<property name="label">gtk-close</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="receives_default">True</property>
|
||||
<property name="use_stock">True</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="position">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="pack_type">end</property>
|
||||
<property name="position">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkGrid" id="grid1">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="halign">center</property>
|
||||
<property name="valign">center</property>
|
||||
<child>
|
||||
<object class="GtkRevealer" id="revealer0">
|
||||
<property name="visible">True</property>
|
||||
<property name="transition-duration">2000</property>
|
||||
<property name="transition-type">crossfade</property>
|
||||
<child>
|
||||
<object class="GtkImage" id="image0">
|
||||
<property name="visible">True</property>
|
||||
<property name="icon-name">face-cool-symbolic</property>
|
||||
<property name="icon-size">6</property>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left-attach">2</property>
|
||||
<property name="top-attach">2</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkRevealer" id="revealer1">
|
||||
<property name="visible">True</property>
|
||||
<property name="transition-duration">2000</property>
|
||||
<property name="transition-type">slide-up</property>
|
||||
<child>
|
||||
<object class="GtkImage" id="image1">
|
||||
<property name="visible">True</property>
|
||||
<property name="icon-name">face-cool-symbolic</property>
|
||||
<property name="icon-size">6</property>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left-attach">2</property>
|
||||
<property name="top-attach">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkRevealer" id="revealer2">
|
||||
<property name="visible">True</property>
|
||||
<property name="transition-duration">2000</property>
|
||||
<property name="transition-type">slide-right</property>
|
||||
<child>
|
||||
<object class="GtkImage" id="image2">
|
||||
<property name="visible">True</property>
|
||||
<property name="icon-name">face-cool-symbolic</property>
|
||||
<property name="icon-size">6</property>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left-attach">3</property>
|
||||
<property name="top-attach">2</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkRevealer" id="revealer3">
|
||||
<property name="visible">True</property>
|
||||
<property name="transition-duration">2000</property>
|
||||
<property name="transition-type">slide-down</property>
|
||||
<child>
|
||||
<object class="GtkImage" id="image3">
|
||||
<property name="visible">True</property>
|
||||
<property name="icon-name">face-cool-symbolic</property>
|
||||
<property name="icon-size">6</property>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left-attach">2</property>
|
||||
<property name="top-attach">3</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkRevealer" id="revealer4">
|
||||
<property name="visible">True</property>
|
||||
<property name="transition-duration">2000</property>
|
||||
<property name="transition-type">slide-left</property>
|
||||
<child>
|
||||
<object class="GtkImage" id="image4">
|
||||
<property name="visible">True</property>
|
||||
<property name="icon-name">face-cool-symbolic</property>
|
||||
<property name="icon-size">6</property>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left-attach">1</property>
|
||||
<property name="top-attach">2</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkRevealer" id="revealer5">
|
||||
<property name="visible">True</property>
|
||||
<property name="transition-duration">2000</property>
|
||||
<property name="transition-type">slide-up</property>
|
||||
<child>
|
||||
<object class="GtkImage" id="image5">
|
||||
<property name="visible">True</property>
|
||||
<property name="icon-name">face-cool-symbolic</property>
|
||||
<property name="icon-size">6</property>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left-attach">2</property>
|
||||
<property name="top-attach">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkRevealer" id="revealer6">
|
||||
<property name="visible">True</property>
|
||||
<property name="transition-duration">2000</property>
|
||||
<property name="transition-type">slide-right</property>
|
||||
<child>
|
||||
<object class="GtkImage" id="image6">
|
||||
<property name="visible">True</property>
|
||||
<property name="icon-name">face-cool-symbolic</property>
|
||||
<property name="icon-size">6</property>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left-attach">4</property>
|
||||
<property name="top-attach">2</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkRevealer" id="revealer7">
|
||||
<property name="visible">True</property>
|
||||
<property name="transition-duration">2000</property>
|
||||
<property name="transition-type">slide-down</property>
|
||||
<child>
|
||||
<object class="GtkImage" id="image7">
|
||||
<property name="visible">True</property>
|
||||
<property name="icon-name">face-cool-symbolic</property>
|
||||
<property name="icon-size">6</property>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left-attach">2</property>
|
||||
<property name="top-attach">4</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkRevealer" id="revealer8">
|
||||
<property name="visible">True</property>
|
||||
<property name="transition-duration">2000</property>
|
||||
<property name="transition-type">slide-left</property>
|
||||
<child>
|
||||
<object class="GtkImage" id="image8">
|
||||
<property name="visible">True</property>
|
||||
<property name="icon-name">face-cool-symbolic</property>
|
||||
<property name="icon-size">6</property>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left-attach">0</property>
|
||||
<property name="top-attach">2</property>
|
||||
</packing>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="position">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
<action-widgets>
|
||||
<action-widget response="0">button1</action-widget>
|
||||
</action-widgets>
|
||||
</object>
|
||||
</interface>
|
||||
@@ -1,96 +0,0 @@
|
||||
/* Entry/Delayed Search Entry
|
||||
*
|
||||
* GtkSearchEntry sets up GtkEntries ready for search. Search entries
|
||||
* have their "changed" signal delayed and should be used
|
||||
* when the searched operation is slow such as loads of entries
|
||||
* to search, or online searches.
|
||||
*/
|
||||
|
||||
#include <gtk/gtk.h>
|
||||
|
||||
static GtkWidget *window = NULL;
|
||||
|
||||
static void
|
||||
search_entry_destroyed (GtkWidget *widget)
|
||||
{
|
||||
window = NULL;
|
||||
}
|
||||
|
||||
static void
|
||||
search_changed_cb (GtkSearchEntry *entry,
|
||||
GtkLabel *result_label)
|
||||
{
|
||||
const char *text;
|
||||
text = gtk_entry_get_text (GTK_ENTRY (entry));
|
||||
g_message ("search changed: %s", text);
|
||||
gtk_label_set_text (result_label, text ? text : "");
|
||||
}
|
||||
|
||||
GtkWidget *
|
||||
do_search_entry2 (GtkWidget *do_widget)
|
||||
{
|
||||
GtkWidget *content_area;
|
||||
GtkWidget *vbox;
|
||||
GtkWidget *hbox;
|
||||
GtkWidget *label;
|
||||
GtkWidget *entry;
|
||||
GtkWidget *button;
|
||||
|
||||
if (!window)
|
||||
{
|
||||
window = gtk_dialog_new_with_buttons ("Search Entry #2",
|
||||
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 (search_entry_destroyed), &window);
|
||||
|
||||
content_area = gtk_dialog_get_content_area (GTK_DIALOG (window));
|
||||
|
||||
vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 5);
|
||||
gtk_box_pack_start (GTK_BOX (content_area), 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), "Search entry demo #2");
|
||||
gtk_box_pack_start (GTK_BOX (vbox), label, FALSE, FALSE, 0);
|
||||
|
||||
/* Create our entry */
|
||||
entry = gtk_search_entry_new ();
|
||||
gtk_box_pack_start (GTK_BOX (vbox), entry, FALSE, FALSE, 0);
|
||||
|
||||
/* Result */
|
||||
hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 10);
|
||||
gtk_box_pack_start (GTK_BOX (vbox), hbox, TRUE, TRUE, 0);
|
||||
gtk_container_set_border_width (GTK_CONTAINER (hbox), 0);
|
||||
|
||||
label = gtk_label_new ("Result:");
|
||||
gtk_box_pack_start (GTK_BOX (hbox), label, TRUE, TRUE, 0);
|
||||
|
||||
label = gtk_label_new ("");
|
||||
gtk_box_pack_start (GTK_BOX (hbox), label, TRUE, TRUE, 0);
|
||||
|
||||
g_signal_connect (entry, "changed",
|
||||
G_CALLBACK (search_changed_cb), label);
|
||||
|
||||
/* Give the focus to the close button */
|
||||
button = gtk_dialog_get_widget_for_response (GTK_DIALOG (window), GTK_RESPONSE_NONE);
|
||||
gtk_widget_grab_focus (button);
|
||||
}
|
||||
|
||||
if (!gtk_widget_get_visible (window))
|
||||
gtk_widget_show_all (window);
|
||||
else
|
||||
{
|
||||
gtk_widget_destroy (window);
|
||||
window = NULL;
|
||||
}
|
||||
|
||||
return window;
|
||||
}
|
||||
@@ -1,48 +0,0 @@
|
||||
/* Stack
|
||||
*
|
||||
* GtkStack is a container that shows a single child at a time,
|
||||
* with nice transitions when the visible child changes.
|
||||
*
|
||||
* GtkStackSwitcher adds buttons to control which child is visible.
|
||||
*/
|
||||
|
||||
#include <gtk/gtk.h>
|
||||
|
||||
static GtkBuilder *builder;
|
||||
|
||||
GtkWidget *
|
||||
do_stack (GtkWidget *do_widget)
|
||||
{
|
||||
static GtkWidget *window = NULL;
|
||||
GError *err = NULL;
|
||||
|
||||
if (!window)
|
||||
{
|
||||
builder = gtk_builder_new ();
|
||||
gtk_builder_add_from_resource (builder, "/stack/stack.ui", &err);
|
||||
if (err)
|
||||
{
|
||||
g_error ("ERROR: %s\n", err->message);
|
||||
return NULL;
|
||||
}
|
||||
gtk_builder_connect_signals (builder, NULL);
|
||||
window = GTK_WIDGET (gtk_builder_get_object (builder, "window1"));
|
||||
gtk_window_set_screen (GTK_WINDOW (window),
|
||||
gtk_widget_get_screen (do_widget));
|
||||
g_signal_connect (window, "destroy",
|
||||
G_CALLBACK (gtk_widget_destroyed), &window);
|
||||
}
|
||||
|
||||
if (!gtk_widget_get_visible (window))
|
||||
{
|
||||
gtk_widget_show_all (window);
|
||||
}
|
||||
else
|
||||
{
|
||||
gtk_widget_destroy (window);
|
||||
window = NULL;
|
||||
}
|
||||
|
||||
|
||||
return window;
|
||||
}
|
||||
@@ -1,82 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<interface>
|
||||
<!-- interface-requires gtk+ 3.6 -->
|
||||
<object class="GtkWindow" id="window1">
|
||||
<property name="can_focus">False</property>
|
||||
<property name="title" translatable="yes">GtkStack</property>
|
||||
<child>
|
||||
<object class="GtkGrid" id="grid1">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<child>
|
||||
<object class="GtkStackSwitcher" id="switcher">
|
||||
<property name="visible">True</property>
|
||||
<property name="stack">stack</property>
|
||||
<property name="halign">center</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left_attach">0</property>
|
||||
<property name="top_attach">0</property>
|
||||
<property name="width">1</property>
|
||||
<property name="height">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkStack" id="stack">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="transition-type">crossfade</property>
|
||||
<child>
|
||||
<object class="GtkImage" id="image1">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="margin-top">20</property>
|
||||
<property name="margin-bottom">20</property>
|
||||
<property name="resource">/application/gtk-logo-48.png</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="name">page1</property>
|
||||
<property name="title" translatable="yes">Page 1</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkCheckButton" id="checkbutton1">
|
||||
<property name="label" translatable="yes">Page 2</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="receives_default">False</property>
|
||||
<property name="xalign">0</property>
|
||||
<property name="draw_indicator">True</property>
|
||||
<property name="halign">center</property>
|
||||
<property name="valign">center</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="name">page2</property>
|
||||
<property name="title" translatable="yes">Page 2</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkSpinner" id="spinner1">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="halign">center</property>
|
||||
<property name="valign">center</property>
|
||||
<property name="active">True</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="name">page3</property>
|
||||
<property name="icon-name">face-laugh-symbolic</property>
|
||||
</packing>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left_attach">0</property>
|
||||
<property name="top_attach">1</property>
|
||||
<property name="width">1</property>
|
||||
<property name="height">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</interface>
|
||||
@@ -85,7 +85,7 @@ scroll_to_bottom (GtkTextView *textview)
|
||||
gtk_text_iter_set_line_offset (&iter, 0);
|
||||
|
||||
/* and place the mark at iter. the mark will stay there after we
|
||||
* insert some text at the end because it has left gravity.
|
||||
* insert some text at the end because it has right gravity.
|
||||
*/
|
||||
mark = gtk_text_buffer_get_mark (buffer, "scroll");
|
||||
gtk_text_buffer_move_mark (buffer, mark, &iter);
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
|
||||
#include <string.h>
|
||||
#include <gtk/gtk.h>
|
||||
#include "config.h"
|
||||
|
||||
static GtkWidget *window = NULL;
|
||||
|
||||
|
||||
@@ -78,35 +78,6 @@ on_page_toggled (GtkToggleButton *button,
|
||||
gtk_notebook_set_current_page (pages, page);
|
||||
}
|
||||
|
||||
static void
|
||||
spin_value_changed (GtkAdjustment *adjustment, GtkWidget *label)
|
||||
{
|
||||
GtkWidget *w;
|
||||
gint v;
|
||||
gchar *text;
|
||||
|
||||
v = (int)gtk_adjustment_get_value (adjustment);
|
||||
|
||||
if ((v % 3) == 0)
|
||||
{
|
||||
text = g_strdup_printf ("%d is a multiple of 3", v);
|
||||
gtk_label_set_label (GTK_LABEL (label), text);
|
||||
g_free (text);
|
||||
}
|
||||
|
||||
w = gtk_widget_get_ancestor (label, GTK_TYPE_REVEALER);
|
||||
gtk_revealer_set_reveal_child (GTK_REVEALER (w), (v % 3) == 0);
|
||||
}
|
||||
|
||||
static void
|
||||
dismiss (GtkWidget *button)
|
||||
{
|
||||
GtkWidget *w;
|
||||
|
||||
w = gtk_widget_get_ancestor (button, GTK_TYPE_REVEALER);
|
||||
gtk_revealer_set_reveal_child (GTK_REVEALER (w), FALSE);
|
||||
}
|
||||
|
||||
int
|
||||
main (int argc, char *argv[])
|
||||
{
|
||||
@@ -115,7 +86,6 @@ main (int argc, char *argv[])
|
||||
GtkWidget *widget;
|
||||
GtkWidget *notebook;
|
||||
gboolean dark = FALSE;
|
||||
GtkAdjustment *adj;
|
||||
|
||||
gtk_init (&argc, &argv);
|
||||
|
||||
@@ -144,14 +114,6 @@ main (int argc, char *argv[])
|
||||
widget = (GtkWidget*) gtk_builder_get_object (builder, "aboutmenuitem");
|
||||
g_signal_connect (widget, "activate", G_CALLBACK (show_about), window);
|
||||
|
||||
widget = (GtkWidget*) gtk_builder_get_object (builder, "page2dismiss");
|
||||
g_signal_connect (widget, "clicked", G_CALLBACK (dismiss), NULL);
|
||||
|
||||
widget = (GtkWidget*) gtk_builder_get_object (builder, "page2note");
|
||||
adj = (GtkAdjustment *) gtk_builder_get_object (builder, "adjustment2");
|
||||
g_signal_connect (adj, "value-changed",
|
||||
G_CALLBACK (spin_value_changed), widget);
|
||||
|
||||
g_object_unref (G_OBJECT (builder));
|
||||
|
||||
gtk_widget_show (window);
|
||||
|
||||
@@ -54,23 +54,6 @@ Vestibulum in tortor diam, quis aliquet quam. Praesent ut justo neque, tempus ru
|
||||
Duis eu lectus quam. Vivamus eget metus a mauris molestie venenatis pulvinar eleifend nisi.
|
||||
Nulla facilisi. Pellentesque at dolor sit amet purus dapibus pulvinar molestie quis neque.
|
||||
Suspendisse feugiat quam quis dolor accumsan cursus. </property>
|
||||
</object>
|
||||
<object class="GtkTextBuffer" id="textbuffer2">
|
||||
<property name="text">* Translation updates:
|
||||
Aragonese
|
||||
Assamese
|
||||
Basque
|
||||
Brazilian Portuguese
|
||||
Dutch
|
||||
German
|
||||
Hebrew
|
||||
Hungarian
|
||||
Polish
|
||||
Portuguese
|
||||
Serbian
|
||||
Slovenian
|
||||
Spanish
|
||||
Uyghur</property>
|
||||
</object>
|
||||
<object class="GtkAccelGroup" id="accelgroup1"/>
|
||||
<object class="GtkWindow" id="window">
|
||||
@@ -2163,158 +2146,30 @@ Suspendisse feugiat quam quis dolor accumsan cursus. </property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkOverlay" id="page2">
|
||||
<object class="GtkBox" id="page2">
|
||||
<property name="visible">True</property>
|
||||
<child type="overlay">
|
||||
<object class="GtkRevealer" id="page2revealer">
|
||||
<property name="visible">True</property>
|
||||
<property name="halign">center</property>
|
||||
<property name="valign">start</property>
|
||||
<child>
|
||||
<object class="GtkFrame" id="page2frame">
|
||||
<property name="visible">True</property>
|
||||
<property name="margin-top">2</property>
|
||||
<child>
|
||||
<object class="GtkBox" id="page2box">
|
||||
<property name="visible">True</property>
|
||||
<property name="margin-top">10</property>
|
||||
<property name="margin-bottom">10</property>
|
||||
<property name="margin-left">10</property>
|
||||
<property name="margin-right">10</property>
|
||||
<property name="spacing">20</property>
|
||||
<child>
|
||||
<object class="GtkLabel" id="page2note">
|
||||
<property name="visible">True</property>
|
||||
<property name="hexpand">True</property>
|
||||
<property name="halign">start</property>
|
||||
<property name="label">NEWS!</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkButton" id="page2dismiss">
|
||||
<property name="visible">True</property>
|
||||
<child>
|
||||
<object class="GtkImage" id="page2dismissi">
|
||||
<property name="visible">True</property>
|
||||
<property name="icon-name">window-close-symbolic</property>
|
||||
<property name="icon-size">0</property>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
<property name="orientation">vertical</property>
|
||||
<property name="spacing">6</property>
|
||||
<property name="border-width">6</property>
|
||||
<child>
|
||||
<object class="GtkGrid" id="page2grid">
|
||||
<object class="GtkBox" id="page2box1">
|
||||
<property name="visible">True</property>
|
||||
<property name="column-homogeneous">True</property>
|
||||
<property name="row-spacing">6</property>
|
||||
<property name="column-spacing">6</property>
|
||||
<property name="border-width">6</property>
|
||||
<property name="orientation">horizontal</property>
|
||||
<property name="spacing">4</property>
|
||||
<child>
|
||||
<object class="GtkBox" id="page2box1">
|
||||
<object class="GtkSpinButton" id="verticalspin1">
|
||||
<property name="visible">True</property>
|
||||
<property name="orientation">horizontal</property>
|
||||
<property name="spacing">4</property>
|
||||
<child>
|
||||
<object class="GtkSpinButton" id="verticalspin1">
|
||||
<property name="visible">True</property>
|
||||
<property name="orientation">vertical</property>
|
||||
<property name="adjustment">adjustment2</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkSpinButton" id="verticalspin2">
|
||||
<property name="visible">True</property>
|
||||
<property name="sensitive">False</property>
|
||||
<property name="orientation">vertical</property>
|
||||
<property name="adjustment">adjustment1</property>
|
||||
</object>
|
||||
</child>
|
||||
<property name="orientation">vertical</property>
|
||||
<property name="adjustment">adjustment2</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left-attach">0</property>
|
||||
<property name="top-attach">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkLabel" id="filler1">
|
||||
<object class="GtkSpinButton" id="verticalspin2">
|
||||
<property name="visible">True</property>
|
||||
<property name="sensitive">False</property>
|
||||
<property name="orientation">vertical</property>
|
||||
<property name="adjustment">adjustment1</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left-attach">1</property>
|
||||
<property name="top-attach">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkLabel" id="filler2">
|
||||
<property name="visible">True</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left-attach">2</property>
|
||||
<property name="top-attach">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkStackSwitcher" id="switcher">
|
||||
<property name="visible">True</property>
|
||||
<property name="stack">stack</property>
|
||||
<property name="halign">center</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left-attach">0</property>
|
||||
<property name="top-attach">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkFrame" id="frame">
|
||||
<property name="visible">True</property>
|
||||
<property name="hexpand">False</property>
|
||||
<child>
|
||||
<object class="GtkStack" id="stack">
|
||||
<property name="visible">True</property>
|
||||
<property name="transition-type">crossfade</property>
|
||||
<property name="transition-duration">1000</property>
|
||||
<child>
|
||||
<object class="GtkScrolledWindow" id="swo">
|
||||
<property name="visible">True</property>
|
||||
<property name="shadow-type">none</property>
|
||||
<child>
|
||||
<object class="GtkTextView" id="tvo">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="buffer">textbuffer2</property>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="name">page1</property>
|
||||
<property name="icon-name">document-open-recent-symbolic</property>
|
||||
<property name="title">News</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkImage" id="imageo">
|
||||
<property name="visible">True</property>
|
||||
<property name="resource">/logos/gtk-logo-256.png</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="name">page2</property>
|
||||
<property name="icon-name">system-shutdown-symbolic</property>
|
||||
<property name="title">Logo</property>
|
||||
</packing>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left-attach">0</property>
|
||||
<property name="top-attach">2</property>
|
||||
</packing>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
|
||||
@@ -43,7 +43,6 @@
|
||||
<xi:include href="xml/pango_interaction.xml" />
|
||||
<xi:include href="xml/cairo_interaction.xml" />
|
||||
<xi:include href="xml/x_interaction.xml" />
|
||||
<xi:include href="xml/wayland_interaction.xml" />
|
||||
<xi:include href="xml/gdkapplaunchcontext.xml" />
|
||||
<xi:include href="xml/gdktestutils.xml" />
|
||||
</reference>
|
||||
@@ -76,10 +75,6 @@
|
||||
<title>Index of new symbols in 3.8</title>
|
||||
<xi:include href="xml/api-index-3.8.xml"><xi:fallback /></xi:include>
|
||||
</index>
|
||||
<index id="api-index-3-10" role="3.10">
|
||||
<title>Index of new symbols in 3.10</title>
|
||||
<xi:include href="xml/api-index-3.10.xml"><xi:fallback /></xi:include>
|
||||
</index>
|
||||
|
||||
<xi:include href="xml/annotation-glossary.xml"><xi:fallback /></xi:include>
|
||||
|
||||
|
||||
@@ -10,7 +10,6 @@ gdk_parse_args
|
||||
gdk_get_display_arg_name
|
||||
gdk_notify_startup_complete
|
||||
gdk_notify_startup_complete_with_id
|
||||
gdk_set_allowed_backends
|
||||
|
||||
<SUBSECTION>
|
||||
gdk_get_program_class
|
||||
@@ -52,7 +51,6 @@ gdk_error_trap_pop_ignored
|
||||
GDK_WINDOWING_X11
|
||||
GDK_WINDOWING_WIN32
|
||||
GDK_WINDOWING_QUARTZ
|
||||
GDK_WINDOWING_WAYLAND
|
||||
|
||||
<SUBSECTION>
|
||||
GDK_VERSION_3_0
|
||||
@@ -459,7 +457,6 @@ GdkModifierType
|
||||
gdk_window_get_parent
|
||||
gdk_window_get_toplevel
|
||||
gdk_window_get_children
|
||||
gdk_window_get_children_with_user_data
|
||||
gdk_window_peek_children
|
||||
gdk_window_get_events
|
||||
gdk_window_set_events
|
||||
@@ -1129,54 +1126,6 @@ gdk_x11_window_get_type
|
||||
gdk_window_impl_x11_get_type
|
||||
</SECTION>
|
||||
|
||||
<SECTION>
|
||||
<INCLUDE>gdk/gdkwayland.h</INCLUDE>
|
||||
<TITLE>Wayland Interaction</TITLE>
|
||||
<FILE>wayland_interaction</FILE>
|
||||
gdk_wayland_device_get_wl_keyboard
|
||||
gdk_wayland_device_get_wl_pointer
|
||||
gdk_wayland_device_get_wl_seat
|
||||
gdk_wayland_display_get_wl_compositor
|
||||
gdk_wayland_display_get_wl_display
|
||||
gdk_wayland_display_get_wl_shell
|
||||
gdk_wayland_window_get_wl_shell_surface
|
||||
gdk_wayland_window_get_wl_surface
|
||||
gdk_wayland_window_set_use_custom_surface
|
||||
|
||||
<SUBSECTION Standard>
|
||||
GDK_TYPE_WAYLAND_DEVICE
|
||||
GDK_WAYLAND_DEVICE
|
||||
GDK_WAYLAND_DEVICE_CLASS
|
||||
GDK_WAYLAND_DEVICE_GET_CLASS
|
||||
GDK_IS_WAYLAND_DEVICE
|
||||
GDK_IS_WAYLAND_DEVICE_CLASS
|
||||
GDK_TYPE_WAYLAND_DISPLAY
|
||||
GDK_WAYLAND_DISPLAY
|
||||
GDK_WAYLAND_DISPLAY_CLASS
|
||||
GDK_WAYLAND_DISPLAY_GET_CLASS
|
||||
GDK_IS_WAYLAND_DISPLAY
|
||||
GDK_IS_WAYLAND_DISPLAY_CLASS
|
||||
GDK_TYPE_WAYLAND_DISPLAY_MANAGER
|
||||
GDK_WAYLAND_DISPLAY_MANAGER
|
||||
GDK_WAYLAND_DISPLAY_MANAGER_CLASS
|
||||
GDK_WAYLAND_DISPLAY_MANAGER_GET_CLASS
|
||||
GDK_IS_WAYLAND_DISPLAY_MANAGER
|
||||
GDK_IS_WAYLAND_DISPLAY_MANAGER_CLASS
|
||||
GDK_TYPE_WAYLAND_WINDOW
|
||||
GDK_WAYLAND_WINDOW
|
||||
GDK_WAYLAND_WINDOW_CLASS
|
||||
GDK_WAYLAND_WINDOW_GET_CLASS
|
||||
GDK_IS_WAYLAND_WINDOW
|
||||
GDK_IS_WAYLAND_WINDOW_CLASS
|
||||
|
||||
<SUBSECTION Private>
|
||||
gdk_wayland_device_get_type
|
||||
gdk_wayland_display_get_type
|
||||
gdk_wayland_display_manager_get_type
|
||||
gdk_wayland_window_get_type
|
||||
|
||||
</SECTION>
|
||||
|
||||
<SECTION>
|
||||
<TITLE>Application launching</TITLE>
|
||||
<FILE>gdkapplaunchcontext</FILE>
|
||||
|
||||
@@ -21,9 +21,9 @@ CFILE_GLOB=$(top_srcdir)/gtk/*.c
|
||||
# Header files to ignore when scanning
|
||||
IGNORE_HFILES= \
|
||||
fnmatch.h \
|
||||
gtkactionmuxer.h \
|
||||
gtkactionobserver.h \
|
||||
gtkactionobservable.h \
|
||||
gactionmuxer.h \
|
||||
gactionobserver.h \
|
||||
gactionobservable.h \
|
||||
gtk9slice.h \
|
||||
gtkanimationdescription.h \
|
||||
gtkdebug.h \
|
||||
@@ -141,6 +141,7 @@ content_files = \
|
||||
migrating-smclient-GtkApplication.xml \
|
||||
migrating-GtkGrid.xml \
|
||||
migrating-GtkStyleContext.xml \
|
||||
objects_grouped.sgml \
|
||||
osx.sgml \
|
||||
broadway.xml \
|
||||
wayland.xml \
|
||||
@@ -300,7 +301,7 @@ HTML_IMAGES = \
|
||||
$(srcdir)/images/appchooserdialog.png \
|
||||
$(srcdir)/images/assistant.png \
|
||||
$(srcdir)/images/box-packing.png \
|
||||
$(srcdir)/images/box-expand.png \
|
||||
$(srcdir)/images/box-expand.png \
|
||||
$(srcdir)/images/button.png \
|
||||
$(srcdir)/images/check-button.png \
|
||||
$(srcdir)/images/color-button.png \
|
||||
@@ -308,8 +309,8 @@ HTML_IMAGES = \
|
||||
$(srcdir)/images/colorchooser.png \
|
||||
$(srcdir)/images/combo-box.png \
|
||||
$(srcdir)/images/combo-box-entry.png \
|
||||
$(srcdir)/images/combo-box-text.png \
|
||||
$(srcdir)/images/entry.png \
|
||||
$(srcdir)/images/search-entry.png \
|
||||
$(srcdir)/images/figure-hierarchical-drawing.png \
|
||||
$(srcdir)/images/figure-windowed-label.png \
|
||||
$(srcdir)/images/file-button.png \
|
||||
@@ -318,10 +319,8 @@ HTML_IMAGES = \
|
||||
$(srcdir)/images/fontsel.png \
|
||||
$(srcdir)/images/fontchooser.png \
|
||||
$(srcdir)/images/frame.png \
|
||||
$(srcdir)/images/headerbar.png \
|
||||
$(srcdir)/images/icon-view.png \
|
||||
$(srcdir)/images/image.png \
|
||||
$(srcdir)/images/info-bar.png \
|
||||
$(srcdir)/images/label.png \
|
||||
$(srcdir)/images/levelbar.png \
|
||||
$(srcdir)/images/link-button.png \
|
||||
@@ -338,20 +337,15 @@ HTML_IMAGES = \
|
||||
$(srcdir)/images/notebook.png \
|
||||
$(srcdir)/images/panes.png \
|
||||
$(srcdir)/images/pagesetupdialog.png \
|
||||
$(srcdir)/images/placessidebar.png \
|
||||
$(srcdir)/images/printdialog.png \
|
||||
$(srcdir)/images/progressbar.png \
|
||||
$(srcdir)/images/radio-group.png \
|
||||
$(srcdir)/images/recentchooserdialog.png \
|
||||
$(srcdir)/images/scales.png \
|
||||
$(srcdir)/images/scrollbar.png \
|
||||
$(srcdir)/images/scrolledwindow.png \
|
||||
$(srcdir)/images/search-entry.png \
|
||||
$(srcdir)/images/separator.png \
|
||||
$(srcdir)/images/spinbutton.png \
|
||||
$(srcdir)/images/spinner.png \
|
||||
$(srcdir)/images/stack.png \
|
||||
$(srcdir)/images/stackswitcher.png \
|
||||
$(srcdir)/images/statusbar.png \
|
||||
$(srcdir)/images/toggle-button.png \
|
||||
$(srcdir)/images/toolbar.png \
|
||||
|
||||
@@ -54,15 +54,6 @@ Start your applications like this:
|
||||
BROADWAY_DISPLAY=:5 gtk3-demo
|
||||
</programlisting>
|
||||
|
||||
You can add password protection for your session by creating a file in
|
||||
<filename>$XDG_CONFIG_HOME/broadway.passwd</filename> or <filename>$HOME/.config/broadway.passwd</filename>
|
||||
with a crypt(3) style password hash.
|
||||
|
||||
A simple way to generate it is with openssl:
|
||||
<programlisting>
|
||||
openssl passwd -1 > ~/.config/broadway.passwd
|
||||
</programlisting>
|
||||
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
|
||||
@@ -402,11 +402,6 @@ How to compile GTK+ itself
|
||||
<arg choice="plain">--enable-gtk2-dependency</arg>
|
||||
<arg choice="plain">--disable-gtk2-dependency</arg>
|
||||
</group>
|
||||
<sbr/>
|
||||
<group>
|
||||
<arg choice="plain">--enable-installed-tests</arg>
|
||||
<arg choice="plain">--disable-installed-tests</arg>
|
||||
</group>
|
||||
</cmdsynopsis>
|
||||
</para>
|
||||
|
||||
@@ -629,19 +624,6 @@ How to compile GTK+ itself
|
||||
The default is to build gtk-update-icon-cache.
|
||||
</para>
|
||||
</formalpara>
|
||||
|
||||
<formalpara>
|
||||
<title><systemitem>--enable-installed-tests</systemitem> or
|
||||
<systemitem>--disable-installed-tests</systemitem></title>
|
||||
|
||||
<para>
|
||||
Whether to install tests on the system. If enabled, tests
|
||||
and their data are installed in <filename>${libexecdir}/gtk+/installed-tests</filename>.
|
||||
Metadata for the tests is installed in <filename>${prefix}/share/installed-tests/gtk+</filename>.
|
||||
To run the installed tests, gnome-desktop-testing-runner
|
||||
can be used.
|
||||
</para>
|
||||
</formalpara>
|
||||
</refsect1>
|
||||
|
||||
</refentry>
|
||||
|
||||
@@ -42,7 +42,7 @@ feature of the shell. If you enclose a command in backticks
|
||||
substituted into the command line before execution. So to compile
|
||||
a GTK+ Hello, World, you would type the following:
|
||||
<programlisting>
|
||||
$ cc `pkg-config --cflags gtk+-3.0` hello.c -o hello `pkg-config --libs gtk+-3.0`
|
||||
$ cc `pkg-config --cflags --libs gtk+-3.0` hello.c -o hello
|
||||
</programlisting>
|
||||
</para>
|
||||
|
||||
@@ -67,7 +67,7 @@ this range will trigger compiler warnings.
|
||||
Here is how you would compile hello.c if you want to allow it
|
||||
to use symbols that were not deprecated in 3.2:
|
||||
<programlisting>
|
||||
$ cc `pkg-config --cflags gtk+-3.0` -DGDK_VERSION_MIN_REQIRED=GDK_VERSION_3_2 hello.c -o hello `pkg-config --libs gtk+-3.0`
|
||||
$ cc -DGDK_VERSION_MIN_REQIRED=GDK_VERSION_3_2 `pkg-config --cflags --libs gtk+-3.0` hello.c -o hello
|
||||
</programlisting>
|
||||
</para>
|
||||
|
||||
@@ -75,7 +75,7 @@ $ cc `pkg-config --cflags gtk+-3.0` -DGDK_VERSION_MIN_REQIRED=GDK_VERSION_3_2 he
|
||||
And here is how you would compile hello.c if you don't want
|
||||
it to use any symbols that were introduced after 3.4:
|
||||
<programlisting>
|
||||
$ cc `pkg-config --cflags gtk+-3.0` -DGDK_VERSION_MAX_ALLOWED=GDK_VERSION_3_4 hello.c -o hello `pkg-config --libs gtk+-3.0`
|
||||
$ cc -DGDK_VERSION_MAX_ALLOWED=GDK_VERSION_3_4 `pkg-config --cflags --libs gtk+-3.0` hello.c -o hello
|
||||
</programlisting>
|
||||
</para>
|
||||
|
||||
|
||||
@@ -220,7 +220,6 @@
|
||||
<xi:include href="xml/gtkfontbutton.xml" />
|
||||
<xi:include href="xml/gtkfontchooserwidget.xml" />
|
||||
<xi:include href="xml/gtkfontchooserdialog.xml" />
|
||||
<xi:include href="xml/gtkplacessidebar.xml" />
|
||||
</chapter>
|
||||
|
||||
<chapter id="LayoutContainers">
|
||||
@@ -234,12 +233,8 @@
|
||||
<xi:include href="xml/gtkpaned.xml" />
|
||||
<xi:include href="xml/gtklayout.xml" />
|
||||
<xi:include href="xml/gtknotebook.xml" />
|
||||
<xi:include href="xml/gtkstack.xml" />
|
||||
<xi:include href="xml/gtkstackswitcher.xml" />
|
||||
<xi:include href="xml/gtkexpander.xml" />
|
||||
<xi:include href="xml/gtkrevealer.xml" />
|
||||
<xi:include href="xml/gtkoverlay.xml" />
|
||||
<xi:include href="xml/gtkheaderbar.xml" />
|
||||
<xi:include href="xml/gtkorientable.xml" />
|
||||
</chapter>
|
||||
|
||||
@@ -421,10 +416,6 @@
|
||||
<title>Index of new symbols in 3.8</title>
|
||||
<xi:include href="xml/api-index-3.8.xml"><xi:fallback /></xi:include>
|
||||
</index>
|
||||
<index id="api-index-3-10" role="3.10">
|
||||
<title>Index of new symbols in 3.10</title>
|
||||
<xi:include href="xml/api-index-3.10.xml"><xi:fallback /></xi:include>
|
||||
</index>
|
||||
|
||||
<xi:include href="xml/annotation-glossary.xml"><xi:fallback /></xi:include>
|
||||
|
||||
|
||||
@@ -486,8 +486,6 @@ gtk_box_set_spacing
|
||||
gtk_box_reorder_child
|
||||
gtk_box_query_child_packing
|
||||
gtk_box_set_child_packing
|
||||
gtk_box_get_baseline_position
|
||||
gtk_box_set_baseline_position
|
||||
<SUBSECTION Standard>
|
||||
GTK_BOX
|
||||
GTK_IS_BOX
|
||||
@@ -541,9 +539,6 @@ gtk_builder_get_objects
|
||||
gtk_builder_expose_object
|
||||
gtk_builder_connect_signals
|
||||
gtk_builder_connect_signals_full
|
||||
gtk_builder_add_callback_symbol
|
||||
gtk_builder_add_callback_symbols
|
||||
gtk_builder_lookup_callback_symbol
|
||||
gtk_builder_set_translation_domain
|
||||
gtk_builder_get_translation_domain
|
||||
gtk_builder_get_type_from_name
|
||||
@@ -2485,35 +2480,6 @@ GTK_PANED_GET_CLASS
|
||||
gtk_paned_get_type
|
||||
</SECTION>
|
||||
|
||||
<SECTION>
|
||||
<FILE>gtkplacessidebar</FILE>
|
||||
<TITLE>GtkPlacesSidebar</TITLE>
|
||||
GtkPlacesSidebar
|
||||
GtkPlacesOpenFlags
|
||||
gtk_places_sidebar_new
|
||||
gtk_places_sidebar_set_open_flags
|
||||
gtk_places_sidebar_set_location
|
||||
gtk_places_sidebar_get_location
|
||||
gtk_places_sidebar_set_show_desktop
|
||||
gtk_places_sidebar_add_shortcut
|
||||
gtk_places_sidebar_remove_shortcut
|
||||
gtk_places_sidebar_list_shortcuts
|
||||
gtk_places_sidebar_get_nth_bookmark
|
||||
gtk_places_sidebar_get_open_flags
|
||||
gtk_places_sidebar_get_show_connect_to_server
|
||||
gtk_places_sidebar_get_show_desktop
|
||||
gtk_places_sidebar_set_show_connect_to_server
|
||||
<SUBSECTION Standard>
|
||||
GTK_PLACES_SIDEBAR
|
||||
GTK_IS_PLACES_SIDEBAR
|
||||
GTK_TYPE_PLACES_SIDEBAR
|
||||
GTK_PLACES_SIDEBAR_CLASS
|
||||
GTK_IS_PLACES_SIDEBAR_CLASS
|
||||
GTK_PLACES_SIDEBAR_GET_CLASS
|
||||
<SUBSECTION Private>
|
||||
gtk_places_sidebar_get_type
|
||||
</SECTION>
|
||||
|
||||
<SECTION>
|
||||
<FILE>gtkplug</FILE>
|
||||
<TITLE>GtkPlug</TITLE>
|
||||
@@ -3610,11 +3576,11 @@ gtk_text_mark_get_type
|
||||
<TITLE>GtkTextTag</TITLE>
|
||||
GtkTextTag
|
||||
GtkWrapMode
|
||||
GtkTextAttributes
|
||||
gtk_text_tag_new
|
||||
gtk_text_tag_get_priority
|
||||
gtk_text_tag_set_priority
|
||||
gtk_text_tag_event
|
||||
GtkTextAttributes
|
||||
GtkTextAppearance
|
||||
gtk_text_attributes_new
|
||||
gtk_text_attributes_copy
|
||||
@@ -5193,7 +5159,6 @@ gtk_widget_remove_tick_callback
|
||||
gtk_widget_size_request
|
||||
gtk_widget_get_child_requisition
|
||||
gtk_widget_size_allocate
|
||||
gtk_widget_size_allocate_with_baseline
|
||||
gtk_widget_add_accelerator
|
||||
gtk_widget_remove_accelerator
|
||||
gtk_widget_set_accel_path
|
||||
@@ -5326,7 +5291,6 @@ gtk_widget_get_allocated_width
|
||||
gtk_widget_get_allocated_height
|
||||
gtk_widget_get_allocation
|
||||
gtk_widget_set_allocation
|
||||
gtk_widget_get_allocated_baseline
|
||||
gtk_widget_get_app_paintable
|
||||
gtk_widget_get_can_default
|
||||
gtk_widget_set_can_default
|
||||
@@ -5387,7 +5351,6 @@ gtk_widget_get_preferred_height
|
||||
gtk_widget_get_preferred_width
|
||||
gtk_widget_get_preferred_height_for_width
|
||||
gtk_widget_get_preferred_width_for_height
|
||||
gtk_widget_get_preferred_height_and_baseline_for_width
|
||||
gtk_widget_get_request_mode
|
||||
gtk_widget_get_preferred_size
|
||||
gtk_distribute_natural_allocation
|
||||
@@ -5397,7 +5360,6 @@ GtkAlign
|
||||
gtk_widget_get_halign
|
||||
gtk_widget_set_halign
|
||||
gtk_widget_get_valign
|
||||
gtk_widget_get_valign_with_baseline
|
||||
gtk_widget_set_valign
|
||||
gtk_widget_get_margin_left
|
||||
gtk_widget_set_margin_left
|
||||
@@ -5420,18 +5382,6 @@ gtk_widget_set_vexpand_set
|
||||
gtk_widget_queue_compute_expand
|
||||
gtk_widget_compute_expand
|
||||
|
||||
<SUBSECTION Templates>
|
||||
gtk_widget_init_template
|
||||
gtk_widget_class_set_template
|
||||
gtk_widget_class_set_template_from_resource
|
||||
gtk_widget_get_automated_child
|
||||
gtk_widget_class_bind_child
|
||||
gtk_widget_class_bind_child_internal
|
||||
gtk_widget_class_automate_child
|
||||
gtk_widget_class_bind_callback
|
||||
gtk_widget_class_declare_callback
|
||||
gtk_widget_class_set_connect_func
|
||||
|
||||
<SUBSECTION Standard>
|
||||
GTK_WIDGET
|
||||
GTK_IS_WIDGET
|
||||
@@ -5563,7 +5513,6 @@ gtk_window_get_resize_grip_area
|
||||
gtk_window_get_application
|
||||
gtk_window_set_application
|
||||
gtk_window_set_has_user_ref_count
|
||||
gtk_window_set_titlebar
|
||||
|
||||
<SUBSECTION Standard>
|
||||
GTK_WINDOW
|
||||
@@ -7142,7 +7091,6 @@ gtk_test_text_get
|
||||
gtk_test_text_set
|
||||
gtk_test_widget_click
|
||||
gtk_test_widget_send_key
|
||||
gtk_test_widget_wait_for_draw
|
||||
</SECTION>
|
||||
|
||||
<SECTION>
|
||||
@@ -7289,8 +7237,6 @@ gtk_grid_attach_next_to
|
||||
gtk_grid_get_child_at
|
||||
gtk_grid_insert_row
|
||||
gtk_grid_insert_column
|
||||
gtk_grid_remove_row
|
||||
gtk_grid_remove_column
|
||||
gtk_grid_insert_next_to
|
||||
gtk_grid_set_row_homogeneous
|
||||
gtk_grid_get_row_homogeneous
|
||||
@@ -7300,10 +7246,6 @@ gtk_grid_set_column_homogeneous
|
||||
gtk_grid_get_column_homogeneous
|
||||
gtk_grid_set_column_spacing
|
||||
gtk_grid_get_column_spacing
|
||||
gtk_grid_get_baseline_row
|
||||
gtk_grid_set_baseline_row
|
||||
gtk_grid_get_row_baseline_position
|
||||
gtk_grid_set_row_baseline_position
|
||||
|
||||
<SUBSECTION Standard>
|
||||
GtkGridClass
|
||||
@@ -7552,74 +7494,3 @@ GTK_COLOR_CHOOSER_DIALOG_GET_CLASS
|
||||
GtkColorChooserDialogPrivate
|
||||
gtk_color_chooser_dialog_get_type
|
||||
</SECTION>
|
||||
|
||||
<SECTION>
|
||||
<FILE>gtkheaderbar</FILE>
|
||||
<TITLE>GtkHeaderBar</TITLE>
|
||||
GtkHeaderBar
|
||||
gtk_header_bar_new
|
||||
gtk_header_bar_set_title
|
||||
gtk_header_bar_get_title
|
||||
gtk_header_bar_set_subtitle
|
||||
gtk_header_bar_get_subtitle
|
||||
gtk_header_bar_set_custom_title
|
||||
gtk_header_bar_get_custom_title
|
||||
gtk_header_bar_pack_start
|
||||
gtk_header_bar_pack_end
|
||||
|
||||
<SUBSECTION Standard>
|
||||
GTK_TYPE_HEADER_BAR
|
||||
GTK_HEADER_BAR
|
||||
GTK_HEADER_BAR_CLASS
|
||||
GTK_IS_HEADER_BAR
|
||||
GTK_IS_HEADER_BAR_CLASS
|
||||
GTK_HEADER_BAR_GET_CLASS
|
||||
|
||||
<SUBSECTION Private>
|
||||
gtk_header_bar_get_type
|
||||
</SECTION>
|
||||
|
||||
<SECTION>
|
||||
<FILE>gtkstack</FILE>
|
||||
<TITLE>GtkStack</TITLE>
|
||||
GtkStack
|
||||
gtk_stack_new
|
||||
gtk_stack_add_named
|
||||
gtk_stack_add_titled
|
||||
gtk_stack_set_visible_child
|
||||
gtk_stack_get_visible_child
|
||||
gtk_stack_set_visible_child_name
|
||||
gtk_stack_get_visible_child_name
|
||||
gtk_stack_set_visible_child_full
|
||||
gtk_stack_set_homogeneous
|
||||
gtk_stack_get_homogeneous
|
||||
gtk_stack_set_transition_duration
|
||||
gtk_stack_get_transition_duration
|
||||
GtkStackTransitionType
|
||||
gtk_stack_set_transition_type
|
||||
gtk_stack_get_transition_type
|
||||
</SECTION>
|
||||
|
||||
<SECTION>
|
||||
<FILE>gtkstackswitcher</FILE>
|
||||
<TITLE>GtkStackSwitcher</TITLE>
|
||||
GtkStackSwitcher
|
||||
gtk_stack_switcher_new
|
||||
gtk_stack_switcher_set_stack
|
||||
gtk_stack_switcher_get_stack
|
||||
</SECTION>
|
||||
|
||||
<SECTION>
|
||||
<FILE>gtkrevealer</FILE>
|
||||
<TITLE>GtkRevealer</TITLE>
|
||||
GtkRevealer
|
||||
gtk_revealer_new
|
||||
gtk_revealer_get_reveal_child
|
||||
gtk_revealer_set_reveal_child
|
||||
gtk_revealer_get_child_revealed
|
||||
gtk_revealer_get_transition_duration
|
||||
gtk_revealer_set_transition_duration
|
||||
GtkRevealerTransitionType
|
||||
gtk_revealer_get_transition_type
|
||||
gtk_revealer_set_transition_type
|
||||
</SECTION>
|
||||
|
||||
@@ -81,7 +81,6 @@ gtk_grid_get_type
|
||||
gtk_handle_box_get_type
|
||||
gtk_hbox_get_type
|
||||
gtk_hbutton_box_get_type
|
||||
gtk_header_bar_get_type
|
||||
gtk_hpaned_get_type
|
||||
gtk_hscale_get_type
|
||||
gtk_hscrollbar_get_type
|
||||
@@ -120,8 +119,7 @@ gtk_page_setup_get_type
|
||||
@DISABLE_ON_W32@gtk_page_setup_unix_dialog_get_type
|
||||
gtk_paned_get_type
|
||||
gtk_paper_size_get_type
|
||||
gtk_places_sidebar_get_type
|
||||
@DISABLE_ON_W32@@DISABLE_ON_QUARTZ@@DISABLE_ON_WAYLAND@gtk_plug_get_type
|
||||
@DISABLE_ON_W32@@DISABLE_ON_QUARTZ@gtk_plug_get_type
|
||||
@DISABLE_ON_W32@gtk_printer_get_type
|
||||
gtk_print_context_get_type
|
||||
@DISABLE_ON_W32@gtk_print_job_get_type
|
||||
@@ -153,11 +151,9 @@ gtk_separator_menu_item_get_type
|
||||
gtk_separator_tool_item_get_type
|
||||
gtk_settings_get_type
|
||||
gtk_size_group_get_type
|
||||
@DISABLE_ON_W32@@DISABLE_ON_QUARTZ@@DISABLE_ON_WAYLAND@gtk_socket_get_type
|
||||
@DISABLE_ON_W32@@DISABLE_ON_QUARTZ@gtk_socket_get_type
|
||||
gtk_spin_button_get_type
|
||||
gtk_spinner_get_type
|
||||
gtk_stack_get_type
|
||||
gtk_stack_switcher_get_type
|
||||
gtk_statusbar_get_type
|
||||
gtk_status_icon_get_type
|
||||
gtk_switch_get_type
|
||||
|
||||
|
Before Width: | Height: | Size: 22 KiB After Width: | Height: | Size: 17 KiB |
|
Before Width: | Height: | Size: 3.5 KiB |
|
Before Width: | Height: | Size: 3.8 KiB After Width: | Height: | Size: 2.6 KiB |
|
Before Width: | Height: | Size: 16 KiB After Width: | Height: | Size: 67 KiB |
|
Before Width: | Height: | Size: 4.4 KiB |
|
Before Width: | Height: | Size: 3.5 KiB |
|
Before Width: | Height: | Size: 8.0 KiB After Width: | Height: | Size: 7.8 KiB |
|
Before Width: | Height: | Size: 14 KiB |
|
Before Width: | Height: | Size: 2.3 KiB |
|
Before Width: | Height: | Size: 3.6 KiB After Width: | Height: | Size: 2.8 KiB |
|
Before Width: | Height: | Size: 2.6 KiB After Width: | Height: | Size: 2.6 KiB |
|
Before Width: | Height: | Size: 2.7 KiB After Width: | Height: | Size: 2.6 KiB |
|
Before Width: | Height: | Size: 5.1 KiB |
|
Before Width: | Height: | Size: 5.8 KiB |
141
docs/reference/gtk/objects_grouped.sgml
Normal file
@@ -0,0 +1,141 @@
|
||||
<informaltable pgwide=1 frame="none">
|
||||
<tgroup cols="4">
|
||||
<colspec colwidth="1*">
|
||||
<colspec colwidth="1*">
|
||||
<colspec colwidth="1*">
|
||||
<colspec colwidth="1*">
|
||||
<tbody><row>
|
||||
<entry><literallayout>
|
||||
<emphasis>Windows & Dialogs</emphasis>
|
||||
<link linkend="GtkWindow">GtkWindow</link>
|
||||
<link linkend="GtkDialog">GtkDialog</link>
|
||||
<link linkend="GtkColorSelectionDialog">GtkColorSelectionDialog</link>
|
||||
<link linkend="GtkFileSelection">GtkFileSelection</link>
|
||||
<link linkend="GtkFontSelectionDialog">GtkFontSelectionDialog</link>
|
||||
<link linkend="GtkInputDialog">GtkInputDialog</link>
|
||||
|
||||
<emphasis>Containers</emphasis>
|
||||
<link linkend="GtkHBox">GtkHBox</link>
|
||||
<link linkend="GtkVBox">GtkVBox</link>
|
||||
<link linkend="GtkTable">GtkTable</link>
|
||||
<link linkend="GtkToolbar">GtkToolbar</link>
|
||||
<link linkend="GtkHandleBox">GtkHandleBox</link>
|
||||
<link linkend="GtkNotebook">GtkNotebook</link>
|
||||
<link linkend="GtkFrame">GtkFrame</link>
|
||||
<link linkend="GtkAspectFrame">GtkAspectFrame</link>
|
||||
<link linkend="GtkFixed">GtkFixed</link>
|
||||
<link linkend="GtkLayout">GtkLayout</link>
|
||||
<link linkend="GtkScrolledWindow">GtkScrolledWindow</link>
|
||||
<link linkend="GtkViewport">GtkViewport</link>
|
||||
<link linkend="GtkEventBox">GtkEventBox</link>
|
||||
<link linkend="GtkAlignment">GtkAlignment</link>
|
||||
<link linkend="GtkHButtonBox">GtkHButtonBox</link>
|
||||
<link linkend="GtkVButtonBox">GtkVButtonBox</link>
|
||||
<link linkend="GtkHPaned">GtkHPaned</link>
|
||||
<link linkend="GtkVPaned">GtkVPaned</link>
|
||||
</literallayout></entry>
|
||||
<entry><literallayout>
|
||||
<emphasis>Labels & Buttons</emphasis>
|
||||
<link linkend="GtkLabel">GtkLabel</link>
|
||||
<link linkend="GtkAccelLabel">GtkAccelLabel</link>
|
||||
<link linkend="GtkButton">GtkButton</link>
|
||||
<link linkend="GtkCheckButton">GtkCheckButton</link>
|
||||
<link linkend="GtkToggleButton">GtkToggleButton</link>
|
||||
<link linkend="GtkRadioButton">GtkRadioButton</link>
|
||||
|
||||
<emphasis>Data Entry Widgets</emphasis>
|
||||
<link linkend="GtkEntry">GtkEntry</link>
|
||||
<link linkend="GtkSpinButton">GtkSpinButton</link>
|
||||
<link linkend="GtkTextView">GtkTextView</link>
|
||||
<link linkend="GtkOptionMenu">GtkOptionMenu</link>
|
||||
<link linkend="GtkCombo">GtkCombo</link>
|
||||
<link linkend="GtkHScale">GtkHScale</link>
|
||||
<link linkend="GtkVScale">GtkVScale</link>
|
||||
|
||||
|
||||
<emphasis>Lists & Trees</emphasis>
|
||||
<link linkend="GtkCList">GtkCList</link>
|
||||
<link linkend="GtkCTree">GtkCTree</link>
|
||||
<link linkend="GtkList">GtkList</link>
|
||||
<link linkend="GtkListItem">GtkListItem</link>
|
||||
|
||||
<emphasis>Text Widget Objects</emphasis>
|
||||
<link linkend="GtkTextBuffer">GtkTextBuffer</link>
|
||||
<link linkend="GtkTextTag">GtkTextTag</link>
|
||||
<link linkend="GtkTextTagTable">GtkTextTagTable</link>
|
||||
<link linkend="GtkTextView">GtkTextView</link>
|
||||
|
||||
<emphasis>Tooltips</emphasis>
|
||||
<link linkend="GtkTooltips">GtkTooltips</link>
|
||||
<link linkend="GtkTipsQuery">GtkTipsQuery</link>
|
||||
</literallayout></entry>
|
||||
|
||||
<entry><literallayout>
|
||||
<emphasis>Menus & Menu Bars</emphasis>
|
||||
<link linkend="GtkMenuBar">GtkMenuBar</link>
|
||||
<link linkend="GtkMenu">GtkMenu</link>
|
||||
<link linkend="GtkMenuItem">GtkMenuItem</link>
|
||||
<link linkend="GtkCheckMenuItem">GtkCheckMenuItem</link>
|
||||
<link linkend="GtkRadioMenuItem">GtkRadioMenuItem</link>
|
||||
<link linkend="GtkTearoffMenuItem">GtkTearoffMenuItem</link>
|
||||
|
||||
<emphasis>Graphical Widgets</emphasis>
|
||||
<link linkend="GtkDrawingArea">GtkDrawingArea</link>
|
||||
<link linkend="GtkImage">GtkImage</link>
|
||||
<link linkend="GtkPixmap">GtkPixmap</link>
|
||||
<link linkend="GtkPreview">GtkPreview</link>
|
||||
|
||||
<emphasis>Misc. Widgets</emphasis>
|
||||
<link linkend="GtkArrow">GtkArrow</link>
|
||||
<link linkend="GtkCalendar">GtkCalendar</link>
|
||||
<link linkend="GtkProgressBar">GtkProgressBar</link>
|
||||
<link linkend="GtkStatusbar">GtkStatusbar</link>
|
||||
<link linkend="GtkStrengthBar">GtkStrengthBar</link>
|
||||
<link linkend="GtkHRuler">GtkHRuler</link>
|
||||
<link linkend="GtkVRuler">GtkVRuler</link>
|
||||
<link linkend="GtkHScrollbar">GtkHScrollbar</link>
|
||||
<link linkend="GtkVScrollbar">GtkVScrollbar</link>
|
||||
<link linkend="GtkHSeparator">GtkHSeparator</link>
|
||||
<link linkend="GtkVSeparator">GtkVSeparator</link>
|
||||
<link linkend="GtkColorSelection">GtkColorSelection</link>
|
||||
<link linkend="GtkFontSelection">GtkFontSelection</link>
|
||||
</literallayout></entry>
|
||||
|
||||
<entry><literallayout>
|
||||
<emphasis>Abstract Base Classes</emphasis>
|
||||
<link linkend="GtkWidget">GtkWidget</link>
|
||||
<link linkend="GtkObject">GtkObject</link>
|
||||
<link linkend="GtkContainer">GtkContainer</link>
|
||||
<link linkend="GtkBin">GtkBin</link>
|
||||
<link linkend="GtkBox">GtkBox</link>
|
||||
<link linkend="GtkButtonBox">GtkButtonBox</link>
|
||||
<link linkend="GtkData">GtkData</link>
|
||||
<link linkend="GtkEditable">GtkEditable</link>
|
||||
<link linkend="GtkItem">GtkItem</link>
|
||||
<link linkend="GtkMenuShell">GtkMenuShell</link>
|
||||
<link linkend="GtkMisc">GtkMisc</link>
|
||||
<link linkend="GtkPaned">GtkPaned</link>
|
||||
<link linkend="GtkProgress">GtkProgress</link>
|
||||
<link linkend="GtkRange">GtkRange</link>
|
||||
<link linkend="GtkRuler">GtkRuler</link>
|
||||
<link linkend="GtkScale">GtkScale</link>
|
||||
<link linkend="GtkScrollbar">GtkScrollbar</link>
|
||||
<link linkend="GtkSeparator">GtkSeparator</link>
|
||||
|
||||
<emphasis>Integrating with other X Applications</emphasis>
|
||||
<link linkend="GtkPlug">GtkPlug</link>
|
||||
<link linkend="GtkSocket">GtkSocket</link>
|
||||
|
||||
<emphasis>Misc. Objects</emphasis>
|
||||
<link linkend="GtkAdjustment">GtkAdjustment</link>
|
||||
<link linkend="GtkInvisible">GtkInvisible</link>
|
||||
</literallayout></entry>
|
||||
|
||||
<entry><literallayout>
|
||||
<emphasis>Deprecated Objects</emphasis>
|
||||
<link linkend="GtkText">GtkText</link>
|
||||
<link linkend="GtkTree">GtkTree</link>
|
||||
<link linkend="GtkTreeItem">GtkTreeItem</link>
|
||||
</literallayout></entry>
|
||||
</row>
|
||||
</tbody></tgroup></informaltable>
|
||||
@@ -461,9 +461,6 @@ nevertheless.
|
||||
</varlistentry>
|
||||
|
||||
</variablelist>
|
||||
Since 3.10, this environment variable can contain a comma-separated list
|
||||
of backend names, which are tried in order. The list may also contain
|
||||
a *, which means: try all remaining backends.
|
||||
For more information about selecting backends, see the gdk_display_manager_get() function.
|
||||
</para>
|
||||
</formalpara>
|
||||
|
||||
@@ -153,7 +153,7 @@ You can change the default attributes for a given #GtkTextView, and you can
|
||||
apply tags that change the attributes for a region of text. For text features
|
||||
that come from the theme — such as font and foreground color — use
|
||||
standard #GtkWidget functions such as gtk_widget_modify_font() or
|
||||
gtk_widget_override_color(). For other attributes there are dedicated methods on
|
||||
gtk_widget_override_text(). For other attributes there are dedicated methods on
|
||||
#GtkTextView such as gtk_text_view_set_tabs().
|
||||
|
||||
<informalexample><programlisting>
|
||||
|
||||
@@ -18,9 +18,6 @@
|
||||
<link linkend="GtkComboBox">
|
||||
<inlinegraphic fileref="combo-box.png" format="PNG"></inlinegraphic>
|
||||
</link>
|
||||
<link linkend="GtkComboBoxText">
|
||||
<inlinegraphic fileref="combo-box-text.png" format="PNG"></inlinegraphic>
|
||||
</link>
|
||||
<link linkend="GtkEntry">
|
||||
<inlinegraphic fileref="entry.png" format="PNG"></inlinegraphic>
|
||||
</link>
|
||||
@@ -150,25 +147,4 @@
|
||||
<link linkend="GtkFontChooserDialog">
|
||||
<inlinegraphic fileref="fontchooser.png" format="PNG"></inlinegraphic>
|
||||
</link>
|
||||
<link linkend="GtkAboutDialog">
|
||||
<inlinegraphic fileref="aboutdialog.png" format="PNG"></inlinegraphic>
|
||||
</link>
|
||||
<link linkend="GtkInfoBar">
|
||||
<inlinegraphic fileref="info-bar.png" format="PNG"></inlinegraphic>
|
||||
</link>
|
||||
<link linkend="GtkScrollbar">
|
||||
<inlinegraphic fileref="scrollbar.png" format="PNG"></inlinegraphic>
|
||||
</link>
|
||||
<link linkend="GtkHeaderBar">
|
||||
<inlinegraphic fileref="headerbar.png" format="PNG"></inlinegraphic>
|
||||
</link>
|
||||
<link linkend="GtkPlacesSidebar">
|
||||
<inlinegraphic fileref="placessidebar.png" format="PNG"></inlinegraphic>
|
||||
</link>
|
||||
<link linkend="GtkStack">
|
||||
<inlinegraphic fileref="stack.png" format="PNG"></inlinegraphic>
|
||||
</link>
|
||||
<link linkend="GtkStackSwitcher">
|
||||
<inlinegraphic fileref="stackswitcher.png" format="PNG"></inlinegraphic>
|
||||
</link>
|
||||
</para>
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN"
|
||||
"http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd" [
|
||||
]>
|
||||
<refentry id="gtk-wayland">
|
||||
<refentry id="gtk-osx">
|
||||
<refmeta>
|
||||
<refentrytitle>Using GTK+ with Wayland</refentrytitle>
|
||||
<manvolnum>3</manvolnum>
|
||||
|
||||
@@ -119,7 +119,6 @@ new_widget_info (const char *name,
|
||||
{
|
||||
info->window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
|
||||
gtk_window_set_has_resize_grip (GTK_WINDOW (info->window), FALSE);
|
||||
gtk_container_set_border_width (GTK_CONTAINER (info->window), 12);
|
||||
info->include_decorations = FALSE;
|
||||
gtk_widget_show_all (widget);
|
||||
gtk_container_add (GTK_CONTAINER (info->window), widget);
|
||||
@@ -128,6 +127,7 @@ new_widget_info (const char *name,
|
||||
|
||||
gtk_widget_set_app_paintable (info->window, TRUE);
|
||||
g_signal_connect (info->window, "focus", G_CALLBACK (gtk_true), NULL);
|
||||
gtk_container_set_border_width (GTK_CONTAINER (info->window), 12);
|
||||
|
||||
switch (size)
|
||||
{
|
||||
@@ -400,6 +400,11 @@ create_combo_box_entry (void)
|
||||
GtkWidget *align;
|
||||
GtkWidget *child;
|
||||
GtkTreeModel *model;
|
||||
|
||||
gtk_rc_parse_string ("style \"combo-box-entry-style\" {\n"
|
||||
" GtkComboBox::appears-as-list = 1\n"
|
||||
"}\n"
|
||||
"widget_class \"GtkComboBoxEntry\" style \"combo-box-entry-style\"\n" );
|
||||
|
||||
model = (GtkTreeModel *)gtk_list_store_new (1, G_TYPE_STRING);
|
||||
widget = g_object_new (GTK_TYPE_COMBO_BOX,
|
||||
@@ -422,22 +427,14 @@ create_combo_box (void)
|
||||
{
|
||||
GtkWidget *widget;
|
||||
GtkWidget *align;
|
||||
GtkCellRenderer *cell;
|
||||
GtkListStore *store;
|
||||
|
||||
widget = gtk_combo_box_new ();
|
||||
gtk_cell_layout_clear (GTK_CELL_LAYOUT (widget));
|
||||
cell = gtk_cell_renderer_pixbuf_new ();
|
||||
gtk_cell_layout_pack_start (GTK_CELL_LAYOUT (widget), cell, FALSE);
|
||||
gtk_cell_layout_set_attributes (GTK_CELL_LAYOUT (widget), cell, "icon-name", 0, NULL);
|
||||
cell = gtk_cell_renderer_text_new ();
|
||||
gtk_cell_layout_pack_start (GTK_CELL_LAYOUT (widget), cell, FALSE);
|
||||
gtk_cell_layout_set_attributes (GTK_CELL_LAYOUT (widget), cell, "text", 1, NULL);
|
||||
|
||||
store = gtk_list_store_new (2, G_TYPE_STRING, G_TYPE_STRING);
|
||||
gtk_list_store_insert_with_values (store, NULL, -1, 0, "edit-delete", 1, "Combo Box", -1);
|
||||
gtk_combo_box_set_model (GTK_COMBO_BOX (widget), GTK_TREE_MODEL (store));
|
||||
|
||||
gtk_rc_parse_string ("style \"combo-box-style\" {\n"
|
||||
" GtkComboBox::appears-as-list = 0\n"
|
||||
"}\n"
|
||||
"widget_class \"GtkComboBox\" style \"combo-box-style\"\n" );
|
||||
|
||||
widget = gtk_combo_box_text_new ();
|
||||
gtk_combo_box_text_append_text (GTK_COMBO_BOX_TEXT (widget), "Combo Box");
|
||||
gtk_combo_box_set_active (GTK_COMBO_BOX (widget), 0);
|
||||
align = gtk_alignment_new (0.5, 0.5, 0.0, 0.0);
|
||||
gtk_container_add (GTK_CONTAINER (align), widget);
|
||||
@@ -445,38 +442,6 @@ create_combo_box (void)
|
||||
return new_widget_info ("combo-box", align, SMALL);
|
||||
}
|
||||
|
||||
static WidgetInfo *
|
||||
create_combo_box_text (void)
|
||||
{
|
||||
GtkWidget *widget;
|
||||
GtkWidget *align;
|
||||
|
||||
widget = gtk_combo_box_text_new ();
|
||||
|
||||
gtk_combo_box_text_append_text (GTK_COMBO_BOX_TEXT (widget), "Combo Box Text");
|
||||
gtk_combo_box_set_active (GTK_COMBO_BOX (widget), 0);
|
||||
align = gtk_alignment_new (0.5, 0.5, 0.0, 0.0);
|
||||
gtk_container_add (GTK_CONTAINER (align), widget);
|
||||
|
||||
return new_widget_info ("combo-box-text", align, SMALL);
|
||||
}
|
||||
|
||||
static WidgetInfo *
|
||||
create_info_bar (void)
|
||||
{
|
||||
GtkWidget *widget;
|
||||
GtkWidget *align;
|
||||
|
||||
widget = gtk_info_bar_new_with_buttons ("Close", 0, NULL);
|
||||
gtk_info_bar_set_message_type (GTK_INFO_BAR (widget), GTK_MESSAGE_INFO);
|
||||
gtk_container_add (GTK_CONTAINER (gtk_info_bar_get_content_area (GTK_INFO_BAR (widget))),
|
||||
gtk_label_new ("Info Bar"));
|
||||
|
||||
align = gtk_alignment_new (0.5, 0.5, 0.0, 0.0);
|
||||
gtk_container_add (GTK_CONTAINER (align), widget);
|
||||
|
||||
return new_widget_info ("info-bar", align, SMALL);
|
||||
}
|
||||
static WidgetInfo *
|
||||
create_recent_chooser_dialog (void)
|
||||
{
|
||||
@@ -714,12 +679,12 @@ create_panes (void)
|
||||
pane = gtk_paned_new (GTK_ORIENTATION_HORIZONTAL);
|
||||
gtk_paned_pack1 (GTK_PANED (pane),
|
||||
g_object_new (GTK_TYPE_FRAME,
|
||||
"shadow-type", GTK_SHADOW_IN,
|
||||
"shadow", GTK_SHADOW_IN,
|
||||
NULL),
|
||||
FALSE, FALSE);
|
||||
gtk_paned_pack2 (GTK_PANED (pane),
|
||||
g_object_new (GTK_TYPE_FRAME,
|
||||
"shadow-type", GTK_SHADOW_IN,
|
||||
"shadow", GTK_SHADOW_IN,
|
||||
NULL),
|
||||
FALSE, FALSE);
|
||||
gtk_box_pack_start (GTK_BOX (hbox),
|
||||
@@ -728,12 +693,12 @@ create_panes (void)
|
||||
pane = gtk_paned_new (GTK_ORIENTATION_VERTICAL);
|
||||
gtk_paned_pack1 (GTK_PANED (pane),
|
||||
g_object_new (GTK_TYPE_FRAME,
|
||||
"shadow-type", GTK_SHADOW_IN,
|
||||
"shadow", GTK_SHADOW_IN,
|
||||
NULL),
|
||||
FALSE, FALSE);
|
||||
gtk_paned_pack2 (GTK_PANED (pane),
|
||||
g_object_new (GTK_TYPE_FRAME,
|
||||
"shadow-type", GTK_SHADOW_IN,
|
||||
"shadow", GTK_SHADOW_IN,
|
||||
NULL),
|
||||
FALSE, FALSE);
|
||||
gtk_box_pack_start (GTK_BOX (hbox),
|
||||
@@ -1057,8 +1022,6 @@ create_scrolledwindow (void)
|
||||
GtkWidget *scrolledwin, *label;
|
||||
|
||||
scrolledwin = gtk_scrolled_window_new (NULL, NULL);
|
||||
gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (scrolledwin),
|
||||
GTK_POLICY_ALWAYS, GTK_POLICY_ALWAYS);
|
||||
label = gtk_label_new ("Scrolled Window");
|
||||
|
||||
gtk_container_add (GTK_CONTAINER (scrolledwin), label);
|
||||
@@ -1066,26 +1029,6 @@ create_scrolledwindow (void)
|
||||
return new_widget_info ("scrolledwindow", scrolledwin, MEDIUM);
|
||||
}
|
||||
|
||||
static WidgetInfo *
|
||||
create_scrollbar (void)
|
||||
{
|
||||
GtkWidget *widget;
|
||||
GtkWidget *vbox, *align;
|
||||
|
||||
widget = gtk_scrollbar_new (GTK_ORIENTATION_HORIZONTAL, NULL);
|
||||
gtk_widget_set_size_request (widget, 100, -1);
|
||||
|
||||
vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 3);
|
||||
align = gtk_alignment_new (0.5, 0.5, 0.0, 0.0);
|
||||
gtk_container_add (GTK_CONTAINER (align), widget);
|
||||
gtk_box_pack_start (GTK_BOX (vbox), align, FALSE, FALSE, 0);
|
||||
gtk_box_pack_start (GTK_BOX (vbox),
|
||||
gtk_label_new ("Scrollbar"),
|
||||
FALSE, FALSE, 0);
|
||||
|
||||
return new_widget_info ("scrollbar", vbox, SMALL);
|
||||
}
|
||||
|
||||
static WidgetInfo *
|
||||
create_spinbutton (void)
|
||||
{
|
||||
@@ -1300,131 +1243,11 @@ create_colorchooserdialog (void)
|
||||
return info;
|
||||
}
|
||||
|
||||
static WidgetInfo *
|
||||
create_headerbar (void)
|
||||
{
|
||||
GtkWidget *window;
|
||||
GtkWidget *bar;
|
||||
GtkWidget *align;
|
||||
GtkWidget *view;
|
||||
GtkWidget *button;
|
||||
|
||||
window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
|
||||
gtk_container_set_border_width (GTK_CONTAINER (window), 0);
|
||||
view = gtk_text_view_new ();
|
||||
gtk_widget_show (view);
|
||||
gtk_widget_set_size_request (window, 220, 150);
|
||||
gtk_container_add (GTK_CONTAINER (window), view);
|
||||
bar = gtk_header_bar_new ();
|
||||
gtk_header_bar_set_title (GTK_HEADER_BAR (bar), "Header Bar");
|
||||
gtk_header_bar_set_subtitle (GTK_HEADER_BAR (bar), "(subtitle)");
|
||||
gtk_window_set_titlebar (GTK_WINDOW (window), bar);
|
||||
button = gtk_button_new ();
|
||||
gtk_container_add (GTK_CONTAINER (button), gtk_image_new_from_icon_name ("bookmark-new-symbolic", GTK_ICON_SIZE_BUTTON));
|
||||
gtk_widget_show_all (button);
|
||||
gtk_header_bar_pack_end (GTK_HEADER_BAR (bar), button);
|
||||
|
||||
return new_widget_info ("headerbar", window, ASIS);
|
||||
}
|
||||
|
||||
static WidgetInfo *
|
||||
create_placessidebar (void)
|
||||
{
|
||||
GtkWidget *bar;
|
||||
GtkWidget *vbox;
|
||||
GtkWidget *align;
|
||||
|
||||
bar = gtk_places_sidebar_new ();
|
||||
gtk_widget_set_size_request (bar, 150, 300);
|
||||
vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 3);
|
||||
align = gtk_alignment_new (0.5, 0.5, 0.0, 0.0);
|
||||
|
||||
gtk_container_add (GTK_CONTAINER (align), bar);
|
||||
gtk_box_pack_start (GTK_BOX (vbox), align, FALSE, FALSE, 0);
|
||||
gtk_box_pack_start (GTK_BOX (vbox),
|
||||
gtk_label_new ("Places Sidebar"),
|
||||
FALSE, FALSE, 0);
|
||||
|
||||
return new_widget_info ("placessidebar", vbox, ASIS);
|
||||
}
|
||||
|
||||
static WidgetInfo *
|
||||
create_stack (void)
|
||||
{
|
||||
GtkWidget *stack;
|
||||
GtkWidget *switcher;
|
||||
GtkWidget *vbox;
|
||||
GtkWidget *view;
|
||||
|
||||
stack = gtk_stack_new ();
|
||||
gtk_widget_set_margin_top (stack, 10);
|
||||
gtk_widget_set_margin_bottom (stack, 10);
|
||||
gtk_widget_set_size_request (stack, 120, 120);
|
||||
view = gtk_text_view_new ();
|
||||
gtk_widget_show (view);
|
||||
gtk_stack_add_titled (GTK_STACK (stack), view, "page1", "Page 1");
|
||||
view = gtk_text_view_new ();
|
||||
gtk_widget_show (view);
|
||||
gtk_stack_add_titled (GTK_STACK (stack), view, "page2", "Page 2");
|
||||
|
||||
switcher = gtk_stack_switcher_new ();
|
||||
gtk_stack_switcher_set_stack (GTK_STACK_SWITCHER (switcher), GTK_STACK (stack));
|
||||
gtk_widget_set_halign (switcher, GTK_ALIGN_CENTER);
|
||||
|
||||
vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
|
||||
|
||||
gtk_box_pack_start (GTK_BOX (vbox), switcher, FALSE, FALSE, 0);
|
||||
gtk_box_pack_start (GTK_BOX (vbox), stack, FALSE, FALSE, 0);
|
||||
gtk_box_pack_start (GTK_BOX (vbox),
|
||||
gtk_label_new ("Stack"),
|
||||
FALSE, FALSE, 0);
|
||||
|
||||
return new_widget_info ("stack", vbox, ASIS);
|
||||
}
|
||||
|
||||
static WidgetInfo *
|
||||
create_stack_switcher (void)
|
||||
{
|
||||
GtkWidget *stack;
|
||||
GtkWidget *switcher;
|
||||
GtkWidget *vbox;
|
||||
GtkWidget *view;
|
||||
|
||||
stack = gtk_stack_new ();
|
||||
gtk_widget_set_margin_top (stack, 10);
|
||||
gtk_widget_set_margin_bottom (stack, 10);
|
||||
gtk_widget_set_size_request (stack, 120, 120);
|
||||
view = gtk_text_view_new ();
|
||||
gtk_widget_show (view);
|
||||
gtk_stack_add_titled (GTK_STACK (stack), view, "page1", "Page 1");
|
||||
view = gtk_text_view_new ();
|
||||
gtk_widget_show (view);
|
||||
gtk_stack_add_titled (GTK_STACK (stack), view, "page2", "Page 2");
|
||||
|
||||
switcher = gtk_stack_switcher_new ();
|
||||
gtk_stack_switcher_set_stack (GTK_STACK_SWITCHER (switcher), GTK_STACK (stack));
|
||||
gtk_widget_set_halign (switcher, GTK_ALIGN_CENTER);
|
||||
|
||||
vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
|
||||
|
||||
gtk_box_pack_start (GTK_BOX (vbox), switcher, FALSE, FALSE, 0);
|
||||
gtk_box_pack_start (GTK_BOX (vbox), stack, FALSE, FALSE, 0);
|
||||
gtk_box_pack_start (GTK_BOX (vbox),
|
||||
gtk_label_new ("Stack Switcher"),
|
||||
FALSE, FALSE, 0);
|
||||
|
||||
return new_widget_info ("stackswitcher", vbox, ASIS);
|
||||
}
|
||||
|
||||
GList *
|
||||
get_all_widgets (void)
|
||||
{
|
||||
GList *retval = NULL;
|
||||
|
||||
retval = g_list_prepend (retval, create_headerbar ());
|
||||
retval = g_list_prepend (retval, create_placessidebar ());
|
||||
retval = g_list_prepend (retval, create_stack ());
|
||||
retval = g_list_prepend (retval, create_stack_switcher ());
|
||||
retval = g_list_prepend (retval, create_toolpalette ());
|
||||
retval = g_list_prepend (retval, create_spinner ());
|
||||
retval = g_list_prepend (retval, create_about_dialog ());
|
||||
@@ -1434,7 +1257,6 @@ get_all_widgets (void)
|
||||
retval = g_list_prepend (retval, create_color_button ());
|
||||
retval = g_list_prepend (retval, create_combo_box ());
|
||||
retval = g_list_prepend (retval, create_combo_box_entry ());
|
||||
retval = g_list_prepend (retval, create_combo_box_text ());
|
||||
retval = g_list_prepend (retval, create_entry ());
|
||||
retval = g_list_prepend (retval, create_file_button ());
|
||||
retval = g_list_prepend (retval, create_font_button ());
|
||||
@@ -1451,7 +1273,6 @@ get_all_widgets (void)
|
||||
retval = g_list_prepend (retval, create_radio ());
|
||||
retval = g_list_prepend (retval, create_scales ());
|
||||
retval = g_list_prepend (retval, create_scrolledwindow ());
|
||||
retval = g_list_prepend (retval, create_scrollbar ());
|
||||
retval = g_list_prepend (retval, create_separator ());
|
||||
retval = g_list_prepend (retval, create_spinbutton ());
|
||||
retval = g_list_prepend (retval, create_statusbar ());
|
||||
@@ -1477,7 +1298,6 @@ get_all_widgets (void)
|
||||
retval = g_list_prepend (retval, create_menu_button ());
|
||||
retval = g_list_prepend (retval, create_search_entry ());
|
||||
retval = g_list_prepend (retval, create_level_bar ());
|
||||
retval = g_list_prepend (retval, create_info_bar ());
|
||||
|
||||
return retval;
|
||||
}
|
||||
|
||||
@@ -34,29 +34,6 @@ change_fullscreen_state (GSimpleAction *action,
|
||||
g_simple_action_set_state (action, state);
|
||||
}
|
||||
|
||||
static void
|
||||
change_busy_state (GSimpleAction *action,
|
||||
GVariant *state,
|
||||
gpointer user_data)
|
||||
{
|
||||
GtkWindow *window = user_data;
|
||||
GApplication *application = G_APPLICATION (gtk_window_get_application (window));
|
||||
|
||||
/* do this twice to test multiple busy counter increases */
|
||||
if (g_variant_get_boolean (state))
|
||||
{
|
||||
g_application_mark_busy (application);
|
||||
g_application_mark_busy (application);
|
||||
}
|
||||
else
|
||||
{
|
||||
g_application_unmark_busy (application);
|
||||
g_application_unmark_busy (application);
|
||||
}
|
||||
|
||||
g_simple_action_set_state (action, state);
|
||||
}
|
||||
|
||||
static void
|
||||
change_justify_state (GSimpleAction *action,
|
||||
GVariant *state,
|
||||
@@ -117,7 +94,6 @@ static GActionEntry win_entries[] = {
|
||||
{ "copy", window_copy, NULL, NULL, NULL },
|
||||
{ "paste", window_paste, NULL, NULL, NULL },
|
||||
{ "fullscreen", activate_toggle, NULL, "false", change_fullscreen_state },
|
||||
{ "busy", activate_toggle, NULL, "false", change_busy_state },
|
||||
{ "justify", activate_radio, "s", "'left'", change_justify_state }
|
||||
};
|
||||
|
||||
@@ -380,10 +356,6 @@ bloat_pad_startup (GApplication *application)
|
||||
" <attribute name='action'>win.fullscreen</attribute>"
|
||||
" <attribute name='accel'>F11</attribute>"
|
||||
" </item>"
|
||||
" <item>"
|
||||
" <attribute name='label' translatable='yes'>_Look Busy</attribute>"
|
||||
" <attribute name='action'>win.busy</attribute>"
|
||||
" </item>"
|
||||
" </section>"
|
||||
" </submenu>"
|
||||
" <submenu id='time-menu'>"
|
||||
|
||||
@@ -9,9 +9,9 @@ INTROSPECTION_COMPILER_ARGS = \
|
||||
--includedir=$(srcdir) \
|
||||
--includedir=.
|
||||
|
||||
SUBDIRS = $(GDK_BACKENDS) .
|
||||
SUBDIRS = $(GDK_BACKENDS) . tests
|
||||
|
||||
DIST_SUBDIRS = win32 x11 quartz broadway wayland
|
||||
DIST_SUBDIRS = win32 x11 quartz broadway wayland tests
|
||||
|
||||
CLEANFILES =
|
||||
|
||||
@@ -23,12 +23,15 @@ EXTRA_DIST += \
|
||||
gen-keyname-table.pl \
|
||||
gdkconfig.h.win32 \
|
||||
gdkkeysyms-update.pl \
|
||||
gdk.def \
|
||||
gdkmarshalers.list \
|
||||
gdkwindowimpl.h \
|
||||
makefile.msc \
|
||||
gdk.symbols \
|
||||
gdkenumtypes.c.template \
|
||||
gdkenumtypes.h.template \
|
||||
gdkversionmacros.h.in
|
||||
gdkversionmacros.h.in \
|
||||
abicheck.sh
|
||||
|
||||
AM_CPPFLAGS = \
|
||||
-DG_LOG_DOMAIN=\"Gdk\" \
|
||||
@@ -51,7 +54,8 @@ LDADD = \
|
||||
-version-info $(LT_VERSION_INFO) \
|
||||
-export-dynamic \
|
||||
-rpath $(libdir) \
|
||||
$(no_undefined)
|
||||
$(no_undefined) \
|
||||
$(LIBTOOL_EXPORT_OPTIONS)
|
||||
|
||||
#
|
||||
# setup source file variables
|
||||
@@ -130,7 +134,6 @@ gdk_c_sources = \
|
||||
gdkframeclockidle.c \
|
||||
gdkpango.c \
|
||||
gdkpixbuf-drawable.c \
|
||||
gdkproperty.c \
|
||||
gdkrectangle.c \
|
||||
gdkrgba.c \
|
||||
gdkscreen.c \
|
||||
@@ -140,11 +143,11 @@ gdk_c_sources = \
|
||||
gdkwindowimpl.c
|
||||
|
||||
gdk_built_sources = \
|
||||
gdkenumtypes.h \
|
||||
gdkenumtypes.c \
|
||||
gdkmarshalers.h \
|
||||
gdkmarshalers.c \
|
||||
gdkversionmacros.h
|
||||
gdkversionmacros.h \
|
||||
gdkenumtypes.h
|
||||
|
||||
#
|
||||
# setup GDK sources and their dependencies
|
||||
@@ -162,7 +165,6 @@ common_sources = \
|
||||
gdkmarshalers.h
|
||||
|
||||
libgdk_3_la_SOURCES = $(common_sources)
|
||||
libgdk_3_la_CFLAGS = $(AM_CFLAGS) $(GDK_HIDDEN_VISIBILITY_CFLAGS)
|
||||
libgdk_3_la_LIBADD = $(GDK_DEP_LIBS)
|
||||
libgdk_3_la_LDFLAGS = $(LDADD)
|
||||
|
||||
@@ -171,7 +173,6 @@ libgdk_3_la_LIBADD += x11/libgdk-x11.la
|
||||
endif # USE_X11
|
||||
|
||||
if USE_QUARTZ
|
||||
libgdk_3_la_CFLAGS += -xobjective-c
|
||||
libgdk_3_la_LIBADD += quartz/libgdk-quartz.la
|
||||
endif # USE_QUARTZ
|
||||
|
||||
@@ -297,6 +298,16 @@ install-ms-lib:
|
||||
uninstall-ms-lib:
|
||||
endif
|
||||
|
||||
# This places the generated .def file in srcdir, since it is expected to be there.
|
||||
# (The one from a tarball is)
|
||||
gdk.def: gdk.symbols
|
||||
$(AM_V_GEN) (echo -e EXPORTS; $(CPP) -P -DGDK_WINDOWING_WIN32 - <$(srcdir)/gdk.symbols | sed -e '/^$$/d' -e 's/^/ /' -e 's/G_GNUC_[^ ]*//g') > $(srcdir)/gdk.def
|
||||
|
||||
TESTS_ENVIRONMENT = srcdir="$(srcdir)"
|
||||
if OS_LINUX
|
||||
TESTS = abicheck.sh
|
||||
endif
|
||||
|
||||
lib_LTLIBRARIES = libgdk-3.la
|
||||
|
||||
MAINTAINERCLEANFILES = $(gdk_built_sources) stamp-gdkenumtypes.h
|
||||
@@ -315,13 +326,13 @@ BUILT_SOURCES = \
|
||||
|
||||
gdkenumtypes.h: stamp-gdkenumtypes.h
|
||||
@true
|
||||
stamp-gdkenumtypes.h: $(gdk_public_h_sources) gdkenumtypes.h.template
|
||||
stamp-gdkenumtypes.h: @REBUILD@ $(gdk_public_h_sources) gdkenumtypes.h.template
|
||||
$(AM_V_GEN) ( cd $(srcdir) && $(GLIB_MKENUMS) --template gdkenumtypes.h.template \
|
||||
$(gdk_public_h_sources) ) >> xgen-geth \
|
||||
&& (cmp -s xgen-geth gdkenumtypes.h || cp xgen-geth gdkenumtypes.h ) \
|
||||
&& rm -f xgen-geth \
|
||||
&& echo timestamp > $(@F)
|
||||
gdkenumtypes.c: $(gdk_public_h_sources) gdkenumtypes.c.template
|
||||
gdkenumtypes.c: @REBUILD@ $(gdk_public_h_sources) gdkenumtypes.c.template
|
||||
$(AM_V_GEN) ( cd $(srcdir) && $(GLIB_MKENUMS) --template gdkenumtypes.c.template \
|
||||
$(gdk_public_h_sources) ) > xgen-getc \
|
||||
&& cp xgen-getc gdkenumtypes.c \
|
||||
@@ -330,11 +341,11 @@ gdkenumtypes.c: $(gdk_public_h_sources) gdkenumtypes.c.template
|
||||
#
|
||||
# Marshaller generation
|
||||
#
|
||||
gdkmarshalers.h: gdkmarshalers.list
|
||||
gdkmarshalers.h: @REBUILD@ gdkmarshalers.list
|
||||
$(AM_V_GEN) $(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: gdkmarshalers.list
|
||||
gdkmarshalers.c: @REBUILD@ gdkmarshalers.list
|
||||
$(AM_V_GEN) (echo "#include \"gdkmarshalers.h\""; \
|
||||
$(GLIB_GENMARSHAL) --prefix=_gdk_marshal $(srcdir)/gdkmarshalers.list --body) > gdkmarshalers-c.tmp \
|
||||
&& mv gdkmarshalers-c.tmp gdkmarshalers.c \
|
||||
@@ -358,7 +369,7 @@ dist-hook: ../build/win32/vs9/gdk.vcproj ../build/win32/vs10/gdk.vcxproj ../buil
|
||||
done >libgdk.sourcefiles
|
||||
$(CPP) -P - <$(top_srcdir)/build/win32/vs9/gdk.vcprojin >$@
|
||||
rm libgdk.sourcefiles
|
||||
|
||||
|
||||
../build/win32/vs10/gdk.vcxproj: ../build/win32/vs10/gdk.vcxprojin
|
||||
for F in $(libgdk_3_la_SOURCES); do \
|
||||
case $$F in \
|
||||
|
||||
5
gdk/abicheck.sh
Executable file
@@ -0,0 +1,5 @@
|
||||
#! /bin/sh
|
||||
|
||||
cpp -P -DGDK_WINDOWING_X11 ${srcdir:-.}/gdk.symbols | sed -e '/^$/d' -e 's/ G_GNUC.*$//' | sort | uniq > expected-abi
|
||||
nm -D -g --defined-only .libs/libgdk-3.so | cut -d ' ' -f 3 | egrep -v '^(__bss_start|_edata|_end)' | sort > actual-abi
|
||||
diff -u expected-abi actual-abi && rm -f expected-abi actual-abi
|
||||
@@ -4,14 +4,13 @@ include $(top_srcdir)/Makefile.decl
|
||||
libgdkincludedir = $(includedir)/gtk-3.0/gdk
|
||||
libgdkbroadwayincludedir = $(includedir)/gtk-3.0/gdk/broadway
|
||||
|
||||
AM_CPPFLAGS = \
|
||||
-DG_LOG_DOMAIN=\"Gdk\" \
|
||||
-DGDK_COMPILATION \
|
||||
-I$(top_srcdir) \
|
||||
-I$(top_srcdir)/gdk \
|
||||
-I$(top_builddir)/gdk \
|
||||
$(GDK_HIDDEN_VISIBILITY_CFLAGS) \
|
||||
$(GTK_DEBUG_FLAGS) \
|
||||
AM_CPPFLAGS = \
|
||||
-DG_LOG_DOMAIN=\"Gdk\" \
|
||||
-DGDK_COMPILATION \
|
||||
-I$(top_srcdir) \
|
||||
-I$(top_srcdir)/gdk \
|
||||
-I$(top_builddir)/gdk \
|
||||
$(GTK_DEBUG_FLAGS) \
|
||||
$(GDK_DEP_CFLAGS)
|
||||
|
||||
LDADDS = $(GDK_DEP_LIBS)
|
||||
@@ -24,6 +23,7 @@ libgdkinclude_HEADERS = \
|
||||
gdkbroadway.h
|
||||
|
||||
libgdkbroadwayinclude_HEADERS = \
|
||||
gdkbroadwaydisplaymanager.h \
|
||||
gdkbroadwaywindow.h \
|
||||
gdkbroadwaycursor.h \
|
||||
gdkbroadwayvisual.h
|
||||
@@ -55,11 +55,14 @@ libgdk_broadway_la_SOURCES = \
|
||||
gdkdevicemanager-broadway.c \
|
||||
gdkdisplay-broadway.c \
|
||||
gdkdisplay-broadway.h \
|
||||
gdkdisplaymanager-broadway.c \
|
||||
gdkdnd-broadway.c \
|
||||
gdkeventsource.c \
|
||||
gdkeventsource.h \
|
||||
gdkglobals-broadway.c \
|
||||
gdkim-broadway.c \
|
||||
gdkkeys-broadway.c \
|
||||
gdkmain-broadway.c \
|
||||
gdkproperty-broadway.c \
|
||||
gdkscreen-broadway.c \
|
||||
gdkscreen-broadway.h \
|
||||
@@ -80,7 +83,7 @@ broadwayd_SOURCES = \
|
||||
broadway-output.h \
|
||||
broadway-output.c
|
||||
|
||||
broadwayd_LDADD = $(GDK_DEP_LIBS) -lrt -lcrypt
|
||||
broadwayd_LDADD = $(GDK_DEP_LIBS) -lrt
|
||||
|
||||
MAINTAINERCLEANFILES = $(broadway_built_sources)
|
||||
EXTRA_DIST += $(broadway_built_sources)
|
||||
|
||||
@@ -317,13 +317,6 @@ broadway_output_get_next_serial (BroadwayOutput *output)
|
||||
return output->serial;
|
||||
}
|
||||
|
||||
void
|
||||
broadway_output_set_next_serial (BroadwayOutput *output,
|
||||
guint32 serial)
|
||||
{
|
||||
output->serial = serial;
|
||||
}
|
||||
|
||||
|
||||
/************************************************************************
|
||||
* Core rendering operations *
|
||||
@@ -478,24 +471,6 @@ broadway_output_new_surface(BroadwayOutput *output,
|
||||
append_bool (output, is_temp);
|
||||
}
|
||||
|
||||
void
|
||||
broadway_output_request_auth (BroadwayOutput *output)
|
||||
{
|
||||
write_header (output, BROADWAY_OP_REQUEST_AUTH);
|
||||
}
|
||||
|
||||
void
|
||||
broadway_output_auth_ok (BroadwayOutput *output)
|
||||
{
|
||||
write_header (output, BROADWAY_OP_AUTH_OK);
|
||||
}
|
||||
|
||||
void
|
||||
broadway_output_disconnected (BroadwayOutput *output)
|
||||
{
|
||||
write_header (output, BROADWAY_OP_DISCONNECTED);
|
||||
}
|
||||
|
||||
void
|
||||
broadway_output_show_surface(BroadwayOutput *output, int id)
|
||||
{
|
||||
|
||||
@@ -23,8 +23,6 @@ BroadwayOutput *broadway_output_new (GOutputStream *out,
|
||||
void broadway_output_free (BroadwayOutput *output);
|
||||
int broadway_output_flush (BroadwayOutput *output);
|
||||
int broadway_output_has_error (BroadwayOutput *output);
|
||||
void broadway_output_set_next_serial (BroadwayOutput *output,
|
||||
guint32 serial);
|
||||
guint32 broadway_output_get_next_serial (BroadwayOutput *output);
|
||||
void broadway_output_new_surface (BroadwayOutput *output,
|
||||
int id,
|
||||
@@ -33,9 +31,6 @@ void broadway_output_new_surface (BroadwayOutput *output,
|
||||
int w,
|
||||
int h,
|
||||
gboolean is_temp);
|
||||
void broadway_output_request_auth (BroadwayOutput *output);
|
||||
void broadway_output_auth_ok (BroadwayOutput *output);
|
||||
void broadway_output_disconnected (BroadwayOutput *output);
|
||||
void broadway_output_show_surface (BroadwayOutput *output,
|
||||
int id);
|
||||
void broadway_output_hide_surface (BroadwayOutput *output,
|
||||
|
||||
@@ -36,9 +36,6 @@ typedef enum {
|
||||
BROADWAY_OP_SET_TRANSIENT_FOR = 'p',
|
||||
BROADWAY_OP_PUT_RGB = 'i',
|
||||
BROADWAY_OP_FLUSH = 'f',
|
||||
BROADWAY_OP_REQUEST_AUTH = 'l',
|
||||
BROADWAY_OP_AUTH_OK = 'L',
|
||||
BROADWAY_OP_DISCONNECTED = 'D',
|
||||
} BroadwayOpType;
|
||||
|
||||
typedef struct {
|
||||
@@ -163,7 +160,7 @@ typedef struct {
|
||||
typedef struct {
|
||||
BroadwayRequestBase base;
|
||||
guint32 id;
|
||||
char name[36];
|
||||
char name[34];
|
||||
guint32 width;
|
||||
guint32 height;
|
||||
} BroadwayRequestUpdate;
|
||||
|
||||
@@ -2,8 +2,6 @@
|
||||
|
||||
#include "broadway-output.h"
|
||||
|
||||
#define _XOPEN_SOURCE /* for crypt */
|
||||
|
||||
#include <glib.h>
|
||||
#include <glib/gprintf.h>
|
||||
#include "gdktypes.h"
|
||||
@@ -11,10 +9,6 @@
|
||||
#include <string.h>
|
||||
#include <errno.h>
|
||||
#include <unistd.h>
|
||||
#include <crypt.h>
|
||||
#include <sys/mman.h>
|
||||
#include <sys/stat.h>
|
||||
#include <fcntl.h>
|
||||
#include <sys/types.h>
|
||||
#include <sys/socket.h>
|
||||
#include <netinet/in.h>
|
||||
@@ -25,7 +19,6 @@ typedef struct BroadwayWindow BroadwayWindow;
|
||||
struct _BroadwayServer {
|
||||
GObject parent_instance;
|
||||
|
||||
char *password;
|
||||
char *address;
|
||||
int port;
|
||||
GSocketService *service;
|
||||
@@ -76,7 +69,6 @@ typedef struct HttpRequest {
|
||||
|
||||
struct BroadwayInput {
|
||||
BroadwayServer *server;
|
||||
BroadwayOutput *output;
|
||||
GSocketConnection *connection;
|
||||
GByteArray *buffer;
|
||||
GSource *source;
|
||||
@@ -84,7 +76,6 @@ struct BroadwayInput {
|
||||
gint64 time_base;
|
||||
gboolean proto_v7_plus;
|
||||
gboolean binary;
|
||||
gboolean active;
|
||||
};
|
||||
|
||||
struct BroadwayWindow {
|
||||
@@ -99,9 +90,6 @@ struct BroadwayWindow {
|
||||
gint32 transient_for;
|
||||
|
||||
cairo_surface_t *last_surface;
|
||||
|
||||
char *cached_surface_name;
|
||||
cairo_surface_t *cached_surface;
|
||||
};
|
||||
|
||||
static void broadway_server_resync_windows (BroadwayServer *server);
|
||||
@@ -112,8 +100,6 @@ static void
|
||||
broadway_server_init (BroadwayServer *server)
|
||||
{
|
||||
BroadwayWindow *root;
|
||||
char *passwd_file;
|
||||
char *password, *p;
|
||||
|
||||
server->service = g_socket_service_new ();
|
||||
server->pointer_grab_window_id = -1;
|
||||
@@ -122,22 +108,6 @@ broadway_server_init (BroadwayServer *server)
|
||||
server->id_ht = g_hash_table_new (NULL, NULL);
|
||||
server->id_counter = 0;
|
||||
|
||||
passwd_file = g_build_filename (g_get_user_config_dir (),
|
||||
"broadway.passwd", NULL);
|
||||
|
||||
if (g_file_get_contents (passwd_file,
|
||||
&password, NULL, NULL))
|
||||
{
|
||||
p = strchr (password, '\n');
|
||||
if (p)
|
||||
*p = 0;
|
||||
g_strstrip (password);
|
||||
if (strlen (password) > 3)
|
||||
server->password = password;
|
||||
else
|
||||
g_free (password);
|
||||
}
|
||||
|
||||
root = g_new0 (BroadwayWindow, 1);
|
||||
root->id = server->id_counter++;
|
||||
root->width = 1024;
|
||||
@@ -169,7 +139,7 @@ broadway_server_class_init (BroadwayServerClass * class)
|
||||
object_class->finalize = broadway_server_finalize;
|
||||
}
|
||||
|
||||
static void start (BroadwayInput *input);
|
||||
static void start_output (HttpRequest *request, gboolean proto_v7_plus, gboolean binary);
|
||||
|
||||
static void
|
||||
http_request_free (HttpRequest *request)
|
||||
@@ -379,14 +349,6 @@ update_future_pointer_info (BroadwayServer *server, BroadwayInputPointerMsg *dat
|
||||
server->future_mouse_in_toplevel = data->mouse_window_id;
|
||||
}
|
||||
|
||||
static gboolean
|
||||
verify_password (BroadwayServer *server, const char *password)
|
||||
{
|
||||
char *hash;
|
||||
hash = crypt (password, server->password);
|
||||
return strcmp (hash, server->password) == 0;
|
||||
}
|
||||
|
||||
static void
|
||||
parse_input_message (BroadwayInput *input, const char *message)
|
||||
{
|
||||
@@ -395,22 +357,6 @@ parse_input_message (BroadwayInput *input, const char *message)
|
||||
char *p;
|
||||
gint64 time_;
|
||||
|
||||
if (!input->active)
|
||||
{
|
||||
/* The input has not been activated yet, handle auth/start */
|
||||
|
||||
if (message[0] != 'l' ||
|
||||
!verify_password (server, message+1))
|
||||
{
|
||||
broadway_output_request_auth (input->output);
|
||||
broadway_output_flush (input->output);
|
||||
}
|
||||
else
|
||||
start (input);
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
memset (&msg, 0, sizeof (msg));
|
||||
|
||||
p = (char *)message;
|
||||
@@ -624,7 +570,7 @@ parse_input (BroadwayInput *input)
|
||||
}
|
||||
break;
|
||||
case BROADWAY_WS_CNX_PING:
|
||||
broadway_output_pong (input->output);
|
||||
broadway_output_pong (server->output);
|
||||
break;
|
||||
case BROADWAY_WS_CNX_PONG:
|
||||
break; /* we never send pings, but tolerate pongs */
|
||||
@@ -650,8 +596,7 @@ parse_input (BroadwayInput *input)
|
||||
|
||||
if (buf[0] != 0)
|
||||
{
|
||||
if (server->input == input)
|
||||
server->input = NULL;
|
||||
server->input = NULL;
|
||||
broadway_input_free (input);
|
||||
return;
|
||||
}
|
||||
@@ -668,8 +613,7 @@ parse_input (BroadwayInput *input)
|
||||
|
||||
if (len > 0 && buf[0] != 0)
|
||||
{
|
||||
if (server->input == input)
|
||||
server->input = NULL;
|
||||
server->input = NULL;
|
||||
broadway_input_free (input);
|
||||
break;
|
||||
}
|
||||
@@ -696,16 +640,19 @@ queue_process_input_at_idle (BroadwayServer *server)
|
||||
}
|
||||
|
||||
static void
|
||||
broadway_server_read_all_input_nonblocking (BroadwayInput *input)
|
||||
broadway_server_read_all_input_nonblocking (BroadwayServer *server)
|
||||
{
|
||||
GInputStream *in;
|
||||
gssize res;
|
||||
guint8 buffer[1024];
|
||||
GError *error;
|
||||
BroadwayInput *input;
|
||||
|
||||
if (input == NULL)
|
||||
if (server->input == NULL)
|
||||
return;
|
||||
|
||||
input = server->input;
|
||||
|
||||
in = g_io_stream_get_input_stream (G_IO_STREAM (input->connection));
|
||||
|
||||
error = NULL;
|
||||
@@ -721,8 +668,7 @@ broadway_server_read_all_input_nonblocking (BroadwayInput *input)
|
||||
return;
|
||||
}
|
||||
|
||||
if (input->server->input == input)
|
||||
input->server->input = NULL;
|
||||
server->input = NULL;
|
||||
broadway_input_free (input);
|
||||
if (res < 0)
|
||||
{
|
||||
@@ -740,7 +686,7 @@ broadway_server_read_all_input_nonblocking (BroadwayInput *input)
|
||||
static void
|
||||
broadway_server_consume_all_input (BroadwayServer *server)
|
||||
{
|
||||
broadway_server_read_all_input_nonblocking (server->input);
|
||||
broadway_server_read_all_input_nonblocking (server);
|
||||
|
||||
/* Since we're parsing input but not processing the resulting messages
|
||||
we might not get a readable callback on the stream, so queue an idle to
|
||||
@@ -755,10 +701,9 @@ input_data_cb (GObject *stream,
|
||||
{
|
||||
BroadwayServer *server = input->server;
|
||||
|
||||
broadway_server_read_all_input_nonblocking (input);
|
||||
broadway_server_read_all_input_nonblocking (server);
|
||||
|
||||
if (input->active)
|
||||
process_input_messages (server);
|
||||
process_input_messages (server);
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
@@ -933,14 +878,15 @@ start_input (HttpRequest *request, gboolean binary)
|
||||
gsize len;
|
||||
GChecksum *checksum;
|
||||
char *origin, *host;
|
||||
BroadwayServer *server;
|
||||
BroadwayInput *input;
|
||||
const void *data_buffer;
|
||||
gsize data_buffer_size;
|
||||
GInputStream *in;
|
||||
char *key_v7;
|
||||
gboolean proto_v7_plus;
|
||||
GSocket *socket;
|
||||
int flag = 1;
|
||||
|
||||
server = request->server;
|
||||
|
||||
#ifdef DEBUG_WEBSOCKETS
|
||||
g_print ("incoming request:\n%s\n", request->request->str);
|
||||
@@ -1087,11 +1033,15 @@ start_input (HttpRequest *request, gboolean binary)
|
||||
proto_v7_plus = FALSE;
|
||||
}
|
||||
|
||||
socket = g_socket_connection_get_socket (request->connection);
|
||||
setsockopt (g_socket_get_fd (socket), IPPROTO_TCP,
|
||||
TCP_NODELAY, (char *) &flag, sizeof(int));
|
||||
|
||||
if (server->input != NULL)
|
||||
{
|
||||
broadway_input_free (server->input);
|
||||
server->input = NULL;
|
||||
}
|
||||
|
||||
input = g_new0 (BroadwayInput, 1);
|
||||
|
||||
input->server = request->server;
|
||||
input->connection = g_object_ref (request->connection);
|
||||
input->proto_v7_plus = proto_v7_plus;
|
||||
@@ -1101,9 +1051,9 @@ start_input (HttpRequest *request, gboolean binary)
|
||||
input->buffer = g_byte_array_sized_new (data_buffer_size);
|
||||
g_byte_array_append (input->buffer, data_buffer, data_buffer_size);
|
||||
|
||||
input->output =
|
||||
broadway_output_new (g_io_stream_get_output_stream (G_IO_STREAM (request->connection)),
|
||||
0, proto_v7_plus, binary);
|
||||
server->input = input;
|
||||
|
||||
start_output (request, proto_v7_plus, binary);
|
||||
|
||||
/* This will free and close the data input stream, but we got all the buffered content already */
|
||||
http_request_free (request);
|
||||
@@ -1113,53 +1063,35 @@ start_input (HttpRequest *request, gboolean binary)
|
||||
g_source_set_callback (input->source, (GSourceFunc)input_data_cb, input, NULL);
|
||||
g_source_attach (input->source, NULL);
|
||||
|
||||
if (input->server->password)
|
||||
{
|
||||
broadway_output_request_auth (input->output);
|
||||
broadway_output_flush (input->output);
|
||||
}
|
||||
else
|
||||
start (input);
|
||||
|
||||
/* Process any data in the pipe already */
|
||||
parse_input (input);
|
||||
process_input_messages (server);
|
||||
|
||||
g_strfreev (lines);
|
||||
}
|
||||
|
||||
static void
|
||||
start (BroadwayInput *input)
|
||||
start_output (HttpRequest *request, gboolean proto_v7_plus, gboolean binary)
|
||||
{
|
||||
GSocket *socket;
|
||||
BroadwayServer *server;
|
||||
int flag = 1;
|
||||
|
||||
input->active = TRUE;
|
||||
socket = g_socket_connection_get_socket (request->connection);
|
||||
setsockopt(g_socket_get_fd (socket), IPPROTO_TCP,
|
||||
TCP_NODELAY, (char *) &flag, sizeof(int));
|
||||
|
||||
server = BROADWAY_SERVER (input->server);
|
||||
|
||||
if (server->output)
|
||||
{
|
||||
broadway_output_disconnected (server->output);
|
||||
broadway_output_flush (server->output);
|
||||
}
|
||||
|
||||
if (server->input != NULL)
|
||||
{
|
||||
broadway_input_free (server->input);
|
||||
server->input = NULL;
|
||||
}
|
||||
|
||||
server->input = input;
|
||||
server = BROADWAY_SERVER (request->server);
|
||||
|
||||
if (server->output)
|
||||
{
|
||||
server->saved_serial = broadway_output_get_next_serial (server->output);
|
||||
broadway_output_free (server->output);
|
||||
}
|
||||
server->output = input->output;
|
||||
|
||||
broadway_output_set_next_serial (server->output, server->saved_serial);
|
||||
broadway_output_auth_ok (server->output);
|
||||
broadway_output_flush (server->output);
|
||||
server->output =
|
||||
broadway_output_new (g_io_stream_get_output_stream (G_IO_STREAM (request->connection)),
|
||||
server->saved_serial, proto_v7_plus, binary);
|
||||
|
||||
broadway_server_resync_windows (server);
|
||||
|
||||
@@ -1167,8 +1099,6 @@ start (BroadwayInput *input)
|
||||
broadway_output_grab_pointer (server->output,
|
||||
server->pointer_grab_window_id,
|
||||
server->pointer_grab_owner_events);
|
||||
|
||||
process_input_messages (server);
|
||||
}
|
||||
|
||||
static void
|
||||
@@ -1419,12 +1349,6 @@ broadway_server_destroy_window (BroadwayServer *server,
|
||||
server->toplevels = g_list_remove (server->toplevels, window);
|
||||
g_hash_table_remove (server->id_ht,
|
||||
GINT_TO_POINTER (id));
|
||||
|
||||
if (window->cached_surface_name != NULL)
|
||||
g_free (window->cached_surface_name);
|
||||
if (window->cached_surface != NULL)
|
||||
cairo_surface_destroy (window->cached_surface);
|
||||
|
||||
g_free (window);
|
||||
}
|
||||
}
|
||||
@@ -1659,11 +1583,6 @@ broadway_server_window_update (BroadwayServer *server,
|
||||
window->width,
|
||||
window->height);
|
||||
|
||||
g_assert (window->width == cairo_image_surface_get_width (window->last_surface));
|
||||
g_assert (window->width == cairo_image_surface_get_width (surface));
|
||||
g_assert (window->height == cairo_image_surface_get_height (window->last_surface));
|
||||
g_assert (window->height == cairo_image_surface_get_height (surface));
|
||||
|
||||
if (server->output != NULL)
|
||||
{
|
||||
if (window->last_synced)
|
||||
@@ -1820,86 +1739,6 @@ broadway_server_ungrab_pointer (BroadwayServer *server,
|
||||
return serial;
|
||||
}
|
||||
|
||||
static const cairo_user_data_key_t shm_cairo_key;
|
||||
|
||||
typedef struct {
|
||||
void *data;
|
||||
gsize data_size;
|
||||
} ShmSurfaceData;
|
||||
|
||||
static void
|
||||
shm_data_unmap (void *_data)
|
||||
{
|
||||
ShmSurfaceData *data = _data;
|
||||
munmap (data->data, data->data_size);
|
||||
g_free (data);
|
||||
}
|
||||
|
||||
cairo_surface_t *
|
||||
broadway_server_open_surface (BroadwayServer *server,
|
||||
guint32 id,
|
||||
char *name,
|
||||
int width,
|
||||
int height)
|
||||
{
|
||||
BroadwayWindow *window;
|
||||
ShmSurfaceData *data;
|
||||
cairo_surface_t *surface;
|
||||
gsize size;
|
||||
void *ptr;
|
||||
int fd;
|
||||
|
||||
window = g_hash_table_lookup (server->id_ht,
|
||||
GINT_TO_POINTER (id));
|
||||
if (window == NULL)
|
||||
return NULL;
|
||||
|
||||
if (window->cached_surface_name != NULL &&
|
||||
strcmp (name, window->cached_surface_name) == 0)
|
||||
return cairo_surface_reference (window->cached_surface);
|
||||
|
||||
size = width * height * sizeof (guint32);
|
||||
|
||||
fd = shm_open(name, O_RDONLY, 0600);
|
||||
if (fd == -1)
|
||||
{
|
||||
perror ("Failed to shm_open");
|
||||
return NULL;
|
||||
}
|
||||
|
||||
ptr = mmap(0, size, PROT_READ, MAP_SHARED, fd, 0);
|
||||
(void) close(fd);
|
||||
|
||||
shm_unlink (name);
|
||||
|
||||
if (ptr == NULL)
|
||||
return NULL;
|
||||
|
||||
data = g_new0 (ShmSurfaceData, 1);
|
||||
|
||||
data->data = ptr;
|
||||
data->data_size = size;
|
||||
|
||||
surface = cairo_image_surface_create_for_data ((guchar *)data->data,
|
||||
CAIRO_FORMAT_RGB24,
|
||||
width, height,
|
||||
width * sizeof (guint32));
|
||||
g_assert (surface != NULL);
|
||||
|
||||
cairo_surface_set_user_data (surface, &shm_cairo_key,
|
||||
data, shm_data_unmap);
|
||||
|
||||
if (window->cached_surface_name != NULL)
|
||||
g_free (window->cached_surface_name);
|
||||
window->cached_surface_name = g_strdup (name);
|
||||
|
||||
if (window->cached_surface != NULL)
|
||||
cairo_surface_destroy (window->cached_surface);
|
||||
window->cached_surface = cairo_surface_reference (surface);
|
||||
|
||||
return surface;
|
||||
}
|
||||
|
||||
guint32
|
||||
broadway_server_new_window (BroadwayServer *server,
|
||||
int x,
|
||||
|
||||
@@ -78,10 +78,5 @@ gboolean broadway_server_window_move_resize (BroadwayServer *
|
||||
int y,
|
||||
int width,
|
||||
int height);
|
||||
cairo_surface_t * broadway_server_open_surface (BroadwayServer *server,
|
||||
guint32 id,
|
||||
char *name,
|
||||
int width,
|
||||
int height);
|
||||
|
||||
#endif /* __BROADWAY_SERVER__ */
|
||||
|
||||
@@ -225,16 +225,34 @@ function flushSurface(surface)
|
||||
context.save();
|
||||
context.beginPath();
|
||||
|
||||
var minx;
|
||||
var miny;
|
||||
var maxx;
|
||||
var maxy;
|
||||
for (var j = 0; j < cmd.rects.length; j++) {
|
||||
var rect = cmd.rects[j];
|
||||
context.rect(rect.x, rect.y, rect.w, rect.h);
|
||||
if (j == 0) {
|
||||
minx = rect.x;
|
||||
miny = rect.y;
|
||||
maxx = rect.x + rect.w;
|
||||
maxy = rect.y + rect.h;
|
||||
} else {
|
||||
if (rect.x < minx)
|
||||
minx = rect.x;
|
||||
if (rect.y < miny)
|
||||
miny = rect.y;
|
||||
if (rect.x + rect.w > maxx)
|
||||
maxx = rect.x + rect.w;
|
||||
if (rect.y + rect.h > maxy)
|
||||
maxy = rect.y + rect.h;
|
||||
}
|
||||
}
|
||||
context.clip();
|
||||
// This seems to break chrome when src overlaps dest
|
||||
// But source-over should be fine for rgb surfaces anyway
|
||||
//context.globalCompositeOperation = "copy";
|
||||
context.drawImage(surface.canvas,
|
||||
cmd.dx, cmd.dy);
|
||||
context.globalCompositeOperation = "copy";
|
||||
context.drawImage(context.canvas,
|
||||
minx - cmd.dx, miny - cmd.dy, maxx - minx, maxy - miny,
|
||||
minx, miny, maxx - minx, maxy - miny);
|
||||
context.restore();
|
||||
break;
|
||||
|
||||
@@ -478,6 +496,12 @@ function cmdMoveResizeSurface(id, has_pos, x, y, has_size, w, h)
|
||||
var xOffset = surface.x;
|
||||
var yOffset = surface.y;
|
||||
|
||||
var transientToplevel = getTransientToplevel(surface);
|
||||
if (transientToplevel) {
|
||||
xOffset = surface.x - transientToplevel.x;
|
||||
yOffset = surface.y - transientToplevel.y;
|
||||
}
|
||||
|
||||
var element = surface.canvas;
|
||||
if (surface.frame) {
|
||||
element = surface.frame;
|
||||
@@ -519,21 +543,6 @@ function handleCommands(cmd)
|
||||
var command = cmd.get_char();
|
||||
lastSerial = cmd.get_32();
|
||||
switch (command) {
|
||||
case 'l':
|
||||
login ();
|
||||
break;
|
||||
|
||||
case 'L':
|
||||
if (loginDiv != null)
|
||||
loginDiv.parentNode.removeChild(loginDiv);
|
||||
start ();
|
||||
break;
|
||||
|
||||
case 'D':
|
||||
alert ("disconnected");
|
||||
inputSocket = null;
|
||||
break;
|
||||
|
||||
case 's': // create new surface
|
||||
id = cmd.get_16();
|
||||
x = cmd.get_16s();
|
||||
@@ -733,12 +742,8 @@ BinCommands.prototype.get_32 = function() {
|
||||
};
|
||||
BinCommands.prototype.get_image_url = function() {
|
||||
var size = this.get_32();
|
||||
var png_blob = new Blob ([new Uint8Array (this.arraybuffer, this.pos, size)], {type:"image/png"});
|
||||
var url;
|
||||
if (window.webkitURL)
|
||||
url = window.webkitURL.createObjectURL(png_blob);
|
||||
else
|
||||
url = window.URL.createObjectURL(png_blob, {oneTimeOnly: true});
|
||||
var png_blob = new Blob ([this.arraybuffer.slice (this.pos, this.pos + size)], {type:"image/png"});
|
||||
var url = URL.createObjectURL(png_blob, {oneTimeOnly: true});
|
||||
this.pos = this.pos + size;
|
||||
return url;
|
||||
};
|
||||
@@ -2585,7 +2590,7 @@ function onMouseWheel(ev)
|
||||
var id = getSurfaceId(ev);
|
||||
var pos = getPositionsFromEvent(ev, id);
|
||||
|
||||
var offset = ev.detail ? ev.detail : -ev.wheelDelta;
|
||||
var offset = ev.detail ? ev.detail : ev.wheelDelta;
|
||||
var dir = 0;
|
||||
if (offset > 0)
|
||||
dir = 1;
|
||||
@@ -2626,47 +2631,6 @@ function newWS(loc) {
|
||||
return ws;
|
||||
}
|
||||
|
||||
function start()
|
||||
{
|
||||
setupDocument(document);
|
||||
|
||||
var w, h;
|
||||
w = window.innerWidth;
|
||||
h = window.innerHeight;
|
||||
window.onresize = function(ev) {
|
||||
var w, h;
|
||||
w = window.innerWidth;
|
||||
h = window.innerHeight;
|
||||
sendInput ("d", [w, h]);
|
||||
};
|
||||
sendInput ("d", [w, h]);
|
||||
}
|
||||
|
||||
var loginDiv = null;
|
||||
function login()
|
||||
{
|
||||
if (loginDiv == null) {
|
||||
var div = document.createElement('div');
|
||||
document.body.appendChild(div);
|
||||
div.innerHTML = "Please enter password<br>";
|
||||
div.style.marginTop = "40px";
|
||||
div.style.textAlign = "center";
|
||||
|
||||
var input = document.createElement("input");
|
||||
input.setAttribute("type", "password");
|
||||
div.appendChild(input);
|
||||
input.focus ();
|
||||
input.onkeyup = function(e) {
|
||||
if (e.keyCode === 13 && input.value != "") {
|
||||
inputSocket.send ("l" + input.value);
|
||||
}
|
||||
}
|
||||
loginDiv = div;
|
||||
} else {
|
||||
alert ("Wrong password");
|
||||
}
|
||||
}
|
||||
|
||||
function connect()
|
||||
{
|
||||
var url = window.location.toString();
|
||||
@@ -2675,7 +2639,7 @@ function connect()
|
||||
var params = query_string[1].split("&");
|
||||
}
|
||||
|
||||
var loc = window.location.toString().replace("http:", "ws:").replace("https:", "wss:");
|
||||
var loc = window.location.toString().replace("http:", "ws:");
|
||||
loc = loc.substr(0, loc.lastIndexOf('/')) + "/socket";
|
||||
|
||||
var supports_binary = newWS (loc + "-test").binaryType == "blob";
|
||||
@@ -2688,13 +2652,23 @@ function connect()
|
||||
|
||||
ws.onopen = function() {
|
||||
inputSocket = ws;
|
||||
var w, h;
|
||||
w = window.innerWidth;
|
||||
h = window.innerHeight;
|
||||
window.onresize = function(ev) {
|
||||
var w, h;
|
||||
w = window.innerWidth;
|
||||
h = window.innerHeight;
|
||||
sendInput ("d", [w, h]);
|
||||
};
|
||||
sendInput ("d", [w, h]);
|
||||
};
|
||||
ws.onclose = function() {
|
||||
if (inputSocket != null)
|
||||
alert ("disconnected");
|
||||
inputSocket = null;
|
||||
};
|
||||
ws.onmessage = function(event) {
|
||||
handleMessage(event.data);
|
||||
};
|
||||
|
||||
setupDocument(document);
|
||||
}
|
||||
|
||||
@@ -140,6 +140,62 @@ region_from_rects (BroadwayRect *rects, int n_rects)
|
||||
return region;
|
||||
}
|
||||
|
||||
static const cairo_user_data_key_t shm_cairo_key;
|
||||
|
||||
typedef struct {
|
||||
void *data;
|
||||
gsize data_size;
|
||||
} ShmSurfaceData;
|
||||
|
||||
static void
|
||||
shm_data_unmap (void *_data)
|
||||
{
|
||||
ShmSurfaceData *data = _data;
|
||||
munmap (data->data, data->data_size);
|
||||
g_free (data);
|
||||
}
|
||||
|
||||
cairo_surface_t *
|
||||
open_surface (char *name, int width, int height)
|
||||
{
|
||||
ShmSurfaceData *data;
|
||||
cairo_surface_t *surface;
|
||||
gsize size;
|
||||
void *ptr;
|
||||
int fd;
|
||||
|
||||
size = width * height * sizeof (guint32);
|
||||
|
||||
fd = shm_open(name, O_RDONLY, 0600);
|
||||
if (fd == -1)
|
||||
{
|
||||
perror ("Failed to shm_open");
|
||||
return NULL;
|
||||
}
|
||||
|
||||
ptr = mmap(0, size, PROT_READ, MAP_SHARED, fd, 0);
|
||||
(void) close(fd);
|
||||
|
||||
if (ptr == NULL)
|
||||
return NULL;
|
||||
|
||||
data = g_new0 (ShmSurfaceData, 1);
|
||||
|
||||
data->data = ptr;
|
||||
data->data_size = size;
|
||||
|
||||
surface = cairo_image_surface_create_for_data ((guchar *)data->data,
|
||||
CAIRO_FORMAT_RGB24,
|
||||
width, height,
|
||||
width * sizeof (guint32));
|
||||
g_assert (surface != NULL);
|
||||
|
||||
cairo_surface_set_user_data (surface, &shm_cairo_key,
|
||||
data, shm_data_unmap);
|
||||
|
||||
return surface;
|
||||
}
|
||||
|
||||
void
|
||||
add_client_serial_mapping (BroadwayClient *client,
|
||||
guint32 client_serial,
|
||||
@@ -281,11 +337,9 @@ client_handle_request (BroadwayClient *client,
|
||||
cairo_region_destroy (area);
|
||||
break;
|
||||
case BROADWAY_REQUEST_UPDATE:
|
||||
surface = broadway_server_open_surface (server,
|
||||
request->update.id,
|
||||
request->update.name,
|
||||
request->update.width,
|
||||
request->update.height);
|
||||
surface = open_surface (request->update.name,
|
||||
request->update.width,
|
||||
request->update.height);
|
||||
if (surface != NULL)
|
||||
{
|
||||
broadway_server_window_update (server,
|
||||
@@ -355,6 +409,7 @@ client_fill_cb (GObject *source_object,
|
||||
guint32 size;
|
||||
gsize count, remaining;
|
||||
guint8 *buffer;
|
||||
BroadwayRequest request;
|
||||
|
||||
buffer = (guint8 *)g_buffered_input_stream_peek_buffer (client->in, &count);
|
||||
|
||||
@@ -362,10 +417,14 @@ client_fill_cb (GObject *source_object,
|
||||
while (remaining >= sizeof (guint32))
|
||||
{
|
||||
memcpy (&size, buffer, sizeof (guint32));
|
||||
|
||||
|
||||
if (size <= remaining)
|
||||
{
|
||||
client_handle_request (client, (BroadwayRequest *)buffer);
|
||||
g_assert (size >= sizeof (BroadwayRequestBase));
|
||||
g_assert (size <= sizeof (BroadwayRequest));
|
||||
|
||||
memcpy (&request, buffer, size);
|
||||
client_handle_request (client, &request);
|
||||
|
||||
remaining -= size;
|
||||
buffer += size;
|
||||
|
||||
@@ -506,7 +506,7 @@ make_valid_fs_char (char c)
|
||||
{
|
||||
char chars[] = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ01234567890";
|
||||
|
||||
return chars[c % (sizeof (chars) - 1)];
|
||||
return chars[c % sizeof (chars)];
|
||||
}
|
||||
|
||||
/* name must have at least space for 34 bytes */
|
||||
@@ -550,7 +550,7 @@ create_random_shm (char *name)
|
||||
static const cairo_user_data_key_t gdk_broadway_shm_cairo_key;
|
||||
|
||||
typedef struct {
|
||||
char name[36];
|
||||
char name[34];
|
||||
void *data;
|
||||
gsize data_size;
|
||||
} BroadwayShmSurfaceData;
|
||||
@@ -582,13 +582,6 @@ _gdk_broadway_server_create_surface (int width,
|
||||
res = ftruncate (fd, data->data_size);
|
||||
g_assert (res != -1);
|
||||
|
||||
res = posix_fallocate (fd, 0, data->data_size);
|
||||
if (res != 0)
|
||||
{
|
||||
shm_unlink (data->name);
|
||||
g_error ("Not enough shared memory for window surface");
|
||||
}
|
||||
|
||||
data->data = mmap(0, data->data_size, PROT_READ|PROT_WRITE, MAP_SHARED, fd, 0);
|
||||
(void) close(fd);
|
||||
|
||||
@@ -617,7 +610,7 @@ _gdk_broadway_server_window_update (GdkBroadwayServer *server,
|
||||
g_assert (data != NULL);
|
||||
|
||||
msg.id = id;
|
||||
memcpy (msg.name, data->name, 36);
|
||||
memcpy (msg.name, data->name, 34);
|
||||
msg.width = cairo_image_surface_get_width (surface);
|
||||
msg.height = cairo_image_surface_get_height (surface);
|
||||
|
||||
|
||||
@@ -32,6 +32,7 @@
|
||||
#include <gdk/broadway/gdkbroadwaywindow.h>
|
||||
#include <gdk/broadway/gdkbroadwaycursor.h>
|
||||
#include <gdk/broadway/gdkbroadwayvisual.h>
|
||||
#include <gdk/broadway/gdkbroadwaydisplaymanager.h>
|
||||
|
||||
#undef __GDKBROADWAY_H_INSIDE__
|
||||
|
||||
|
||||
@@ -47,7 +47,6 @@ typedef GdkCursor GdkBroadwayCursor;
|
||||
#endif
|
||||
typedef struct _GdkBroadwayCursorClass GdkBroadwayCursorClass;
|
||||
|
||||
GDK_AVAILABLE_IN_ALL
|
||||
GType gdk_broadway_cursor_get_type (void);
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
@@ -38,7 +38,6 @@ typedef GdkDisplayManager _GdkBroadwayDisplayManager;
|
||||
#endif
|
||||
typedef struct _GdkDisplayManagerClass GdkBroadwayDisplayManagerClass;
|
||||
|
||||
GDK_AVAILABLE_IN_ALL
|
||||
GType gdk_broadway_display_manager_get_type (void);
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
@@ -38,7 +38,6 @@ typedef GdkVisual GdkBroadwayVisual;
|
||||
typedef struct _GdkBroadwayVisualClass GdkBroadwayVisualClass;
|
||||
|
||||
|
||||
GDK_AVAILABLE_IN_ALL
|
||||
GType gdk_broadway_visual_get_type (void);
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
@@ -43,10 +43,8 @@ typedef GdkWindow GdkBroadwayWindow;
|
||||
#endif
|
||||
typedef struct _GdkBroadwayWindowClass GdkBroadwayWindowClass;
|
||||
|
||||
GDK_AVAILABLE_IN_ALL
|
||||
GType gdk_broadway_window_get_type (void);
|
||||
|
||||
GDK_AVAILABLE_IN_ALL
|
||||
guint32 gdk_broadway_get_last_seen_time (GdkWindow *window);
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
@@ -116,7 +116,7 @@ gdk_broadway_device_get_state (GdkDevice *device,
|
||||
{
|
||||
gint x_int, y_int;
|
||||
|
||||
gdk_window_get_device_position (window, device, &x_int, &y_int, mask);
|
||||
gdk_window_get_pointer (window, &x_int, &y_int, mask);
|
||||
|
||||
if (axes)
|
||||
{
|
||||
@@ -188,7 +188,7 @@ gdk_broadway_device_query_state (GdkDevice *device,
|
||||
if (root_y)
|
||||
*root_y = device_root_y;
|
||||
if (win_x)
|
||||
*win_x = device_root_x - toplevel->x;
|
||||
*win_x = device_root_y - toplevel->x;
|
||||
if (win_y)
|
||||
*win_y = device_root_y - toplevel->y;
|
||||
if (mask)
|
||||
@@ -211,29 +211,6 @@ gdk_broadway_device_query_state (GdkDevice *device,
|
||||
return;
|
||||
}
|
||||
|
||||
void
|
||||
_gdk_broadway_window_grab_check_unmap (GdkWindow *window,
|
||||
gulong serial)
|
||||
{
|
||||
GdkDisplay *display = gdk_window_get_display (window);
|
||||
GdkDeviceManager *device_manager;
|
||||
GList *devices, *d;
|
||||
|
||||
device_manager = gdk_display_get_device_manager (display);
|
||||
|
||||
/* Get all devices */
|
||||
devices = gdk_device_manager_list_devices (device_manager, GDK_DEVICE_TYPE_MASTER);
|
||||
devices = g_list_concat (devices, gdk_device_manager_list_devices (device_manager, GDK_DEVICE_TYPE_SLAVE));
|
||||
devices = g_list_concat (devices, gdk_device_manager_list_devices (device_manager, GDK_DEVICE_TYPE_FLOATING));
|
||||
|
||||
/* End all grabs on the newly hidden window */
|
||||
for (d = devices; d; d = d->next)
|
||||
_gdk_display_end_device_grab (display, d->data, serial, window, TRUE);
|
||||
|
||||
g_list_free (devices);
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
_gdk_broadway_window_grab_check_destroy (GdkWindow *window)
|
||||
{
|
||||
|
||||
@@ -55,6 +55,8 @@ G_DEFINE_TYPE (GdkBroadwayDisplay, gdk_broadway_display, GDK_TYPE_DISPLAY)
|
||||
static void
|
||||
gdk_broadway_display_init (GdkBroadwayDisplay *display)
|
||||
{
|
||||
_gdk_broadway_display_manager_add_display (gdk_display_manager_get (),
|
||||
GDK_DISPLAY_OBJECT (display));
|
||||
display->id_ht = g_hash_table_new (NULL, NULL);
|
||||
}
|
||||
|
||||
@@ -171,6 +173,7 @@ _gdk_broadway_display_open (const gchar *display_name)
|
||||
}
|
||||
|
||||
g_signal_emit_by_name (display, "opened");
|
||||
g_signal_emit_by_name (gdk_display_manager_get (), "display-opened", display);
|
||||
|
||||
return display;
|
||||
}
|
||||
@@ -183,6 +186,24 @@ gdk_broadway_display_get_name (GdkDisplay *display)
|
||||
return (gchar *) "Broadway";
|
||||
}
|
||||
|
||||
static gint
|
||||
gdk_broadway_display_get_n_screens (GdkDisplay *display)
|
||||
{
|
||||
g_return_val_if_fail (GDK_IS_DISPLAY (display), 0);
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
static GdkScreen *
|
||||
gdk_broadway_display_get_screen (GdkDisplay *display,
|
||||
gint screen_num)
|
||||
{
|
||||
g_return_val_if_fail (GDK_IS_DISPLAY (display), NULL);
|
||||
g_return_val_if_fail (screen_num == 0, NULL);
|
||||
|
||||
return GDK_BROADWAY_DISPLAY (display)->screens[screen_num];
|
||||
}
|
||||
|
||||
static GdkScreen *
|
||||
gdk_broadway_display_get_default_screen (GdkDisplay *display)
|
||||
{
|
||||
@@ -236,6 +257,9 @@ gdk_broadway_display_dispose (GObject *object)
|
||||
{
|
||||
GdkBroadwayDisplay *broadway_display = GDK_BROADWAY_DISPLAY (object);
|
||||
|
||||
_gdk_broadway_display_manager_remove_display (gdk_display_manager_get (),
|
||||
GDK_DISPLAY_OBJECT (object));
|
||||
|
||||
g_list_foreach (broadway_display->input_devices, (GFunc) g_object_run_dispose, NULL);
|
||||
|
||||
_gdk_screen_close (broadway_display->screens[0]);
|
||||
@@ -370,6 +394,8 @@ gdk_broadway_display_class_init (GdkBroadwayDisplayClass * class)
|
||||
display_class->window_type = GDK_TYPE_BROADWAY_WINDOW;
|
||||
|
||||
display_class->get_name = gdk_broadway_display_get_name;
|
||||
display_class->get_n_screens = gdk_broadway_display_get_n_screens;
|
||||
display_class->get_screen = gdk_broadway_display_get_screen;
|
||||
display_class->get_default_screen = gdk_broadway_display_get_default_screen;
|
||||
display_class->beep = gdk_broadway_display_beep;
|
||||
display_class->sync = gdk_broadway_display_sync;
|
||||
|
||||
@@ -66,8 +66,6 @@ struct _GdkBroadwayDisplay
|
||||
GdkWindow *active_offscreen_window;
|
||||
|
||||
GdkBroadwayServer *server;
|
||||
|
||||
gpointer move_resize_data;
|
||||
};
|
||||
|
||||
struct _GdkBroadwayDisplayClass
|
||||
|
||||
146
gdk/broadway/gdkdisplaymanager-broadway.c
Normal file
@@ -0,0 +1,146 @@
|
||||
/* GDK - The GIMP Drawing Kit
|
||||
* gdkdisplaymanager-broadway.c
|
||||
*
|
||||
* Copyright (C) 2005 Imendio AB
|
||||
* Copyright 2010 Red Hat, Inc.
|
||||
*
|
||||
* Author: Matthias clasen
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Library General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Library General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Library General Public
|
||||
* License along with this library. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include "config.h"
|
||||
|
||||
#include "gdkdisplay-broadway.h"
|
||||
#include "gdkbroadwaydisplaymanager.h"
|
||||
#include "gdkprivate-broadway.h"
|
||||
|
||||
#include "gdkdisplaymanagerprivate.h"
|
||||
#include "gdkinternals.h"
|
||||
|
||||
struct _GdkBroadwayDisplayManager
|
||||
{
|
||||
GdkDisplayManager parent;
|
||||
|
||||
GdkDisplay *default_display;
|
||||
GSList *displays;
|
||||
};
|
||||
|
||||
G_DEFINE_TYPE (GdkBroadwayDisplayManager, gdk_broadway_display_manager, GDK_TYPE_DISPLAY_MANAGER)
|
||||
|
||||
static GdkDisplay *
|
||||
gdk_broadway_display_manager_open_display (GdkDisplayManager *manager,
|
||||
const gchar *name)
|
||||
{
|
||||
return _gdk_broadway_display_open (name);
|
||||
}
|
||||
|
||||
static GSList *
|
||||
gdk_broadway_display_manager_list_displays (GdkDisplayManager *manager)
|
||||
{
|
||||
GdkBroadwayDisplayManager *manager_broadway = GDK_BROADWAY_DISPLAY_MANAGER (manager);
|
||||
|
||||
return g_slist_copy (manager_broadway->displays);
|
||||
}
|
||||
|
||||
static GdkDisplay *
|
||||
gdk_broadway_display_manager_get_default_display (GdkDisplayManager *manager)
|
||||
{
|
||||
return GDK_BROADWAY_DISPLAY_MANAGER (manager)->default_display;
|
||||
}
|
||||
|
||||
static void
|
||||
gdk_broadway_display_manager_set_default_display (GdkDisplayManager *manager,
|
||||
GdkDisplay *display)
|
||||
{
|
||||
GdkBroadwayDisplayManager *manager_broadway = GDK_BROADWAY_DISPLAY_MANAGER (manager);
|
||||
|
||||
manager_broadway->default_display = display;
|
||||
}
|
||||
|
||||
#include "../gdkkeynames.c"
|
||||
|
||||
static gchar *
|
||||
gdk_broadway_display_manager_get_keyval_name (GdkDisplayManager *manager,
|
||||
guint keyval)
|
||||
{
|
||||
return _gdk_keyval_name (keyval);
|
||||
}
|
||||
|
||||
static guint
|
||||
gdk_broadway_display_manager_lookup_keyval (GdkDisplayManager *manager,
|
||||
const gchar *name)
|
||||
{
|
||||
return _gdk_keyval_from_name (name);
|
||||
}
|
||||
|
||||
static void
|
||||
gdk_broadway_display_manager_init (GdkBroadwayDisplayManager *manager)
|
||||
{
|
||||
_gdk_broadway_windowing_init ();
|
||||
}
|
||||
|
||||
static void
|
||||
gdk_broadway_display_manager_finalize (GObject *object)
|
||||
{
|
||||
g_error ("A GdkBroadwayDisplayManager object was finalized. This should not happen");
|
||||
G_OBJECT_CLASS (gdk_broadway_display_manager_parent_class)->finalize (object);
|
||||
}
|
||||
|
||||
static void
|
||||
gdk_broadway_display_manager_class_init (GdkBroadwayDisplayManagerClass *class)
|
||||
{
|
||||
GObjectClass *object_class = G_OBJECT_CLASS (class);
|
||||
GdkDisplayManagerClass *manager_class = GDK_DISPLAY_MANAGER_CLASS (class);
|
||||
|
||||
object_class->finalize = gdk_broadway_display_manager_finalize;
|
||||
|
||||
manager_class->open_display = gdk_broadway_display_manager_open_display;
|
||||
manager_class->list_displays = gdk_broadway_display_manager_list_displays;
|
||||
manager_class->set_default_display = gdk_broadway_display_manager_set_default_display;
|
||||
manager_class->get_default_display = gdk_broadway_display_manager_get_default_display;
|
||||
manager_class->atom_intern = _gdk_broadway_display_manager_atom_intern;
|
||||
manager_class->get_atom_name = _gdk_broadway_display_manager_get_atom_name;
|
||||
manager_class->lookup_keyval = gdk_broadway_display_manager_lookup_keyval;
|
||||
manager_class->get_keyval_name = gdk_broadway_display_manager_get_keyval_name;
|
||||
}
|
||||
|
||||
void
|
||||
_gdk_broadway_display_manager_add_display (GdkDisplayManager *manager,
|
||||
GdkDisplay *display)
|
||||
{
|
||||
GdkBroadwayDisplayManager *manager_broadway = GDK_BROADWAY_DISPLAY_MANAGER (manager);
|
||||
|
||||
if (manager_broadway->displays == NULL)
|
||||
gdk_display_manager_set_default_display (manager, display);
|
||||
|
||||
manager_broadway->displays = g_slist_prepend (manager_broadway->displays, display);
|
||||
}
|
||||
|
||||
void
|
||||
_gdk_broadway_display_manager_remove_display (GdkDisplayManager *manager,
|
||||
GdkDisplay *display)
|
||||
{
|
||||
GdkBroadwayDisplayManager *manager_broadway = GDK_BROADWAY_DISPLAY_MANAGER (manager);
|
||||
|
||||
manager_broadway->displays = g_slist_remove (manager_broadway->displays, display);
|
||||
|
||||
if (manager_broadway->default_display == display)
|
||||
{
|
||||
if (manager_broadway->displays)
|
||||
gdk_display_manager_set_default_display (manager, manager_broadway->displays->data);
|
||||
else
|
||||
gdk_display_manager_set_default_display (manager, NULL);
|
||||
}
|
||||
}
|
||||
@@ -247,7 +247,7 @@ _gdk_broadway_events_got_input (BroadwayInputMsg *message)
|
||||
break;
|
||||
case BROADWAY_EVENT_GRAB_NOTIFY:
|
||||
case BROADWAY_EVENT_UNGRAB_NOTIFY:
|
||||
_gdk_display_device_grab_update (display, display->core_pointer, display->core_pointer, message->base.serial);
|
||||
_gdk_display_device_grab_update (display, display->core_pointer, NULL, message->base.serial);
|
||||
break;
|
||||
|
||||
case BROADWAY_EVENT_CONFIGURE_NOTIFY:
|
||||
@@ -256,6 +256,10 @@ _gdk_broadway_events_got_input (BroadwayInputMsg *message)
|
||||
{
|
||||
window->x = message->configure_notify.x;
|
||||
window->y = message->configure_notify.y;
|
||||
window->width = message->configure_notify.width;
|
||||
window->height = message->configure_notify.height;
|
||||
_gdk_window_update_size (window);
|
||||
_gdk_broadway_window_resize_surface (window);
|
||||
|
||||
event = gdk_event_new (GDK_CONFIGURE);
|
||||
event->configure.window = g_object_ref (window);
|
||||
|
||||
38
gdk/broadway/gdkim-broadway.c
Normal file
@@ -0,0 +1,38 @@
|
||||
/* GDK - The GIMP Drawing Kit
|
||||
* Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
/*
|
||||
* Modified by the GTK+ Team and others 1997-2000. See the AUTHORS
|
||||
* file for a list of people on the GTK+ Team. See the ChangeLog
|
||||
* files for a list of changes. These files are distributed with
|
||||
* GTK+ at ftp://ftp.gtk.org/pub/gtk/.
|
||||
*/
|
||||
|
||||
#include "config.h"
|
||||
|
||||
#include "gdkmain.h"
|
||||
#include "gdkinternals.h"
|
||||
#include "gdkdisplay-broadway.h"
|
||||
|
||||
#include <locale.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
void
|
||||
_gdk_broadway_initialize_locale (void)
|
||||
{
|
||||
}
|
||||
44
gdk/broadway/gdkmain-broadway.c
Normal file
@@ -0,0 +1,44 @@
|
||||
/* GDK - The GIMP Drawing Kit
|
||||
* Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
/*
|
||||
* Modified by the GTK+ Team and others 1997-2000. See the AUTHORS
|
||||
* file for a list of people on the GTK+ Team. See the ChangeLog
|
||||
* files for a list of changes. These files are distributed with
|
||||
* GTK+ at ftp://ftp.gtk.org/pub/gtk/.
|
||||
*/
|
||||
|
||||
#include "config.h"
|
||||
|
||||
#include "gdkdisplay-broadway.h"
|
||||
#include "gdkinternals.h"
|
||||
#include "gdkprivate-broadway.h"
|
||||
#include "gdkintl.h"
|
||||
#include "gdkdeviceprivate.h"
|
||||
|
||||
#include <glib/gprintf.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <unistd.h>
|
||||
#include <limits.h>
|
||||
#include <errno.h>
|
||||
|
||||
void
|
||||
_gdk_broadway_windowing_init (void)
|
||||
{
|
||||
_gdk_broadway_initialize_locale ();
|
||||
}
|
||||
@@ -40,6 +40,20 @@
|
||||
#include "gdkbroadwaywindow.h"
|
||||
|
||||
void _gdk_broadway_resync_windows (void);
|
||||
void _gdk_broadway_windowing_init (void);
|
||||
|
||||
gchar * _gdk_broadway_display_manager_get_atom_name (GdkDisplayManager *manager,
|
||||
GdkAtom atom);
|
||||
void _gdk_broadway_display_manager_add_display (GdkDisplayManager *manager,
|
||||
GdkDisplay *display);
|
||||
void _gdk_broadway_display_manager_remove_display (GdkDisplayManager *manager,
|
||||
GdkDisplay *display);
|
||||
GdkAtom _gdk_broadway_display_manager_atom_intern_static_string (GdkDisplayManager *manager,
|
||||
const gchar *atom_name);
|
||||
GdkAtom _gdk_broadway_display_manager_atom_intern (GdkDisplayManager *manager,
|
||||
const gchar *atom_name,
|
||||
gboolean only_if_exists);
|
||||
|
||||
|
||||
void _gdk_broadway_window_register_dnd (GdkWindow *window);
|
||||
GdkDragContext * _gdk_broadway_window_drag_begin (GdkWindow *window,
|
||||
@@ -78,8 +92,6 @@ gboolean _gdk_broadway_moveresize_configure_done (GdkDisplay *display,
|
||||
|
||||
void _gdk_broadway_selection_window_destroyed (GdkWindow *window);
|
||||
void _gdk_broadway_window_grab_check_destroy (GdkWindow *window);
|
||||
void _gdk_broadway_window_grab_check_unmap (GdkWindow *window,
|
||||
gulong serial);
|
||||
|
||||
void _gdk_keymap_keys_changed (GdkDisplay *display);
|
||||
gint _gdk_broadway_get_group_for_state (GdkDisplay *display,
|
||||
@@ -89,6 +101,8 @@ void _gdk_keymap_add_virtual_modifiers_compat (GdkKeymap *keymap,
|
||||
gboolean _gdk_keymap_key_is_modifier (GdkKeymap *keymap,
|
||||
guint keycode);
|
||||
|
||||
void _gdk_broadway_initialize_locale (void);
|
||||
|
||||
void _gdk_broadway_screen_events_init (GdkScreen *screen);
|
||||
GdkVisual *_gdk_broadway_screen_get_system_visual (GdkScreen * screen);
|
||||
gint _gdk_broadway_screen_visual_get_best_depth (GdkScreen * screen);
|
||||
@@ -203,6 +217,9 @@ void _gdk_broadway_window_resize_surface (GdkWindow *window);
|
||||
void _gdk_broadway_cursor_update_theme (GdkCursor *cursor);
|
||||
void _gdk_broadway_cursor_display_finalize (GdkDisplay *display);
|
||||
|
||||
#define GDK_SCREEN_DISPLAY(screen) (GDK_BROADWAY_SCREEN (screen)->display)
|
||||
#define GDK_WINDOW_SCREEN(win) (GDK_WINDOW_IMPL_BROADWAY (((GdkWindow *)win)->impl)->screen)
|
||||
#define GDK_WINDOW_DISPLAY(win) (GDK_BROADWAY_SCREEN (GDK_WINDOW_SCREEN (win))->display)
|
||||
#define GDK_WINDOW_IS_BROADWAY(win) (GDK_IS_WINDOW_IMPL_BROADWAY (((GdkWindow *)win)->impl))
|
||||
|
||||
#endif /* __GDK_PRIVATE_BROADWAY_H__ */
|
||||
|
||||
@@ -35,6 +35,34 @@
|
||||
|
||||
#include <string.h>
|
||||
|
||||
GdkAtom
|
||||
_gdk_broadway_display_manager_atom_intern (GdkDisplayManager *manager,
|
||||
const gchar *atom_name,
|
||||
gboolean only_if_exists)
|
||||
{
|
||||
return _GDK_MAKE_ATOM (g_quark_from_string (atom_name));
|
||||
}
|
||||
|
||||
GdkAtom
|
||||
_gdk_broadway_display_manager_atom_intern_static_string (GdkDisplayManager *manager,
|
||||
const gchar *atom_name)
|
||||
{
|
||||
return _GDK_MAKE_ATOM (g_quark_from_static_string (atom_name));
|
||||
}
|
||||
|
||||
static const char *
|
||||
get_atom_name (GdkAtom atom)
|
||||
{
|
||||
return g_quark_to_string (GPOINTER_TO_UINT(atom));
|
||||
}
|
||||
|
||||
gchar *
|
||||
_gdk_broadway_display_manager_get_atom_name (GdkDisplayManager *manager,
|
||||
GdkAtom atom)
|
||||
{
|
||||
return g_strdup (get_atom_name (atom));
|
||||
}
|
||||
|
||||
gboolean
|
||||
_gdk_broadway_window_get_property (GdkWindow *window,
|
||||
GdkAtom property,
|
||||
|
||||
@@ -83,16 +83,18 @@ G_DEFINE_TYPE (GdkWindowImplBroadway,
|
||||
gdk_window_impl_broadway,
|
||||
GDK_TYPE_WINDOW_IMPL)
|
||||
|
||||
static void
|
||||
update_dirty_windows_and_sync (void)
|
||||
static guint dirty_flush_id = 0;
|
||||
|
||||
static gboolean
|
||||
dirty_flush_idle (gpointer data)
|
||||
{
|
||||
GList *l;
|
||||
GdkBroadwayDisplay *display;
|
||||
gboolean updated_surface;
|
||||
|
||||
dirty_flush_id = 0;
|
||||
|
||||
display = GDK_BROADWAY_DISPLAY (gdk_display_get_default ());
|
||||
|
||||
updated_surface = FALSE;
|
||||
for (l = display->toplevels; l != NULL; l = l->next)
|
||||
{
|
||||
GdkWindowImplBroadway *impl = l->data;
|
||||
@@ -100,7 +102,6 @@ update_dirty_windows_and_sync (void)
|
||||
if (impl->dirty)
|
||||
{
|
||||
impl->dirty = FALSE;
|
||||
updated_surface = TRUE;
|
||||
_gdk_broadway_server_window_update (display->server,
|
||||
impl->id,
|
||||
impl->surface);
|
||||
@@ -109,32 +110,16 @@ update_dirty_windows_and_sync (void)
|
||||
|
||||
/* We sync here to ensure all references to the impl->surface memory
|
||||
is done, as we may later paint new data in them. */
|
||||
if (updated_surface)
|
||||
gdk_display_sync (GDK_DISPLAY (display));
|
||||
else
|
||||
gdk_display_flush (GDK_DISPLAY (display));
|
||||
}
|
||||
|
||||
static guint flush_id = 0;
|
||||
|
||||
static gboolean
|
||||
flush_idle (gpointer data)
|
||||
{
|
||||
flush_id = 0;
|
||||
|
||||
gdk_display_flush (gdk_display_get_default ());
|
||||
gdk_display_sync (GDK_DISPLAY (display));
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
/* We need to flush in an idle rather than AFTER_PAINT, as the clock
|
||||
is frozen during e.g. window resizes so the paint will not happen
|
||||
and the window resize request is never flushed. */
|
||||
static void
|
||||
queue_flush (GdkWindow *window)
|
||||
queue_dirty_flush (GdkBroadwayDisplay *display)
|
||||
{
|
||||
if (flush_id == 0)
|
||||
flush_id = gdk_threads_add_idle (flush_idle, NULL);
|
||||
if (dirty_flush_id == 0)
|
||||
dirty_flush_id = gdk_threads_add_idle (dirty_flush_idle, NULL);
|
||||
}
|
||||
|
||||
static void
|
||||
@@ -212,25 +197,6 @@ _gdk_broadway_screen_init_root_window (GdkScreen * screen)
|
||||
_gdk_window_update_size (broadway_screen->root_window);
|
||||
}
|
||||
|
||||
static void
|
||||
on_frame_clock_after_paint (GdkFrameClock *clock,
|
||||
GdkWindow *window)
|
||||
{
|
||||
update_dirty_windows_and_sync ();
|
||||
}
|
||||
|
||||
static void
|
||||
connect_frame_clock (GdkWindow *window)
|
||||
{
|
||||
if (WINDOW_IS_TOPLEVEL (window))
|
||||
{
|
||||
GdkFrameClock *frame_clock = gdk_window_get_frame_clock (window);
|
||||
|
||||
g_signal_connect (frame_clock, "after-paint",
|
||||
G_CALLBACK (on_frame_clock_after_paint), window);
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
_gdk_broadway_display_create_window_impl (GdkDisplay *display,
|
||||
GdkWindow *window,
|
||||
@@ -263,21 +229,22 @@ _gdk_broadway_display_create_window_impl (GdkDisplay *display,
|
||||
g_assert (GDK_WINDOW_TYPE (window->parent) == GDK_WINDOW_ROOT);
|
||||
|
||||
broadway_display->toplevels = g_list_prepend (broadway_display->toplevels, impl);
|
||||
|
||||
connect_frame_clock (window);
|
||||
}
|
||||
|
||||
void
|
||||
_gdk_broadway_window_resize_surface (GdkWindow *window)
|
||||
{
|
||||
GdkWindowImplBroadway *impl = GDK_WINDOW_IMPL_BROADWAY (window->impl);
|
||||
cairo_surface_t *old;
|
||||
|
||||
if (impl->surface)
|
||||
{
|
||||
cairo_surface_destroy (impl->surface);
|
||||
old = impl->surface;
|
||||
|
||||
impl->surface = _gdk_broadway_server_create_surface (gdk_window_get_width (impl->wrapper),
|
||||
gdk_window_get_height (impl->wrapper));
|
||||
|
||||
cairo_surface_destroy (old);
|
||||
}
|
||||
|
||||
if (impl->ref_surface)
|
||||
@@ -417,7 +384,7 @@ gdk_window_broadway_show (GdkWindow *window, gboolean already_mapped)
|
||||
|
||||
broadway_display = GDK_BROADWAY_DISPLAY (gdk_window_get_display (window));
|
||||
if (_gdk_broadway_server_window_show (broadway_display->server, impl->id))
|
||||
queue_flush (window);
|
||||
queue_dirty_flush (broadway_display);
|
||||
|
||||
}
|
||||
|
||||
@@ -437,12 +404,8 @@ gdk_window_broadway_hide (GdkWindow *window)
|
||||
_gdk_make_event (GDK_WINDOW (window), GDK_UNMAP, NULL, FALSE);
|
||||
|
||||
broadway_display = GDK_BROADWAY_DISPLAY (gdk_window_get_display (window));
|
||||
|
||||
_gdk_broadway_window_grab_check_unmap (window,
|
||||
_gdk_broadway_server_get_next_serial (broadway_display->server));
|
||||
|
||||
if (_gdk_broadway_server_window_hide (broadway_display->server, impl->id))
|
||||
queue_flush (window);
|
||||
queue_dirty_flush (broadway_display);
|
||||
|
||||
_gdk_window_clear_update_area (window);
|
||||
}
|
||||
@@ -497,7 +460,7 @@ gdk_window_broadway_move_resize (GdkWindow *window,
|
||||
with_move,
|
||||
x, y,
|
||||
window->width, window->height);
|
||||
queue_flush (window);
|
||||
queue_dirty_flush (broadway_display);
|
||||
if (size_changed)
|
||||
window->resize_count++;
|
||||
}
|
||||
@@ -582,12 +545,6 @@ gdk_broadway_window_set_geometry_hints (GdkWindow *window,
|
||||
const GdkGeometry *geometry,
|
||||
GdkWindowHints geom_mask)
|
||||
{
|
||||
GdkWindowImplBroadway *impl;
|
||||
|
||||
impl = GDK_WINDOW_IMPL_BROADWAY (window->impl);
|
||||
|
||||
impl->geometry_hints = *geometry;
|
||||
impl->geometry_hints_mask = geom_mask;
|
||||
}
|
||||
|
||||
static void
|
||||
@@ -653,7 +610,7 @@ gdk_window_broadway_set_device_cursor (GdkWindow *window,
|
||||
{
|
||||
_gdk_broadway_cursor_update_theme (cursor);
|
||||
g_hash_table_replace (impl->device_cursor,
|
||||
device, g_object_ref (cursor));
|
||||
device, gdk_cursor_ref (cursor));
|
||||
}
|
||||
|
||||
if (!GDK_WINDOW_DESTROYED (window))
|
||||
@@ -1035,8 +992,6 @@ struct _MoveResizeData
|
||||
gint moveresize_orig_width;
|
||||
gint moveresize_orig_height;
|
||||
long moveresize_process_time;
|
||||
GdkWindowHints moveresize_geom_mask;
|
||||
GdkGeometry moveresize_geometry;
|
||||
BroadwayInputMsg *moveresize_pending_event;
|
||||
};
|
||||
|
||||
@@ -1044,19 +999,20 @@ static MoveResizeData *
|
||||
get_move_resize_data (GdkDisplay *display,
|
||||
gboolean create)
|
||||
{
|
||||
GdkBroadwayDisplay *broadway_display;
|
||||
MoveResizeData *mv_resize;
|
||||
static GQuark move_resize_quark = 0;
|
||||
|
||||
broadway_display = GDK_BROADWAY_DISPLAY (display);
|
||||
if (!move_resize_quark)
|
||||
move_resize_quark = g_quark_from_static_string ("gdk-window-moveresize");
|
||||
|
||||
mv_resize = broadway_display->move_resize_data;
|
||||
mv_resize = g_object_get_qdata (G_OBJECT (display), move_resize_quark);
|
||||
|
||||
if (!mv_resize && create)
|
||||
{
|
||||
mv_resize = g_new0 (MoveResizeData, 1);
|
||||
mv_resize->display = display;
|
||||
|
||||
broadway_display->move_resize_data = mv_resize;
|
||||
g_object_set_qdata (G_OBJECT (display), move_resize_quark, mv_resize);
|
||||
}
|
||||
|
||||
return mv_resize;
|
||||
@@ -1125,13 +1081,6 @@ update_pos (MoveResizeData *mv_resize,
|
||||
w = MAX (w, 1);
|
||||
h = MAX (h, 1);
|
||||
|
||||
if (mv_resize->moveresize_geom_mask)
|
||||
{
|
||||
gdk_window_constrain_size (&mv_resize->moveresize_geometry,
|
||||
mv_resize->moveresize_geom_mask,
|
||||
w, h, &w, &h);
|
||||
}
|
||||
|
||||
gdk_window_move_resize (mv_resize->moveresize_window, x, y, w, h);
|
||||
}
|
||||
else
|
||||
@@ -1186,7 +1135,7 @@ _gdk_broadway_moveresize_handle_event (GdkDisplay *display,
|
||||
|
||||
switch (event->base.type)
|
||||
{
|
||||
case BROADWAY_EVENT_POINTER_MOVE:
|
||||
case 'm':
|
||||
if (mv_resize->moveresize_window->resize_count > 0)
|
||||
{
|
||||
if (mv_resize->moveresize_pending_event)
|
||||
@@ -1214,7 +1163,7 @@ _gdk_broadway_moveresize_handle_event (GdkDisplay *display,
|
||||
finish_drag (mv_resize);
|
||||
break;
|
||||
|
||||
case BROADWAY_EVENT_BUTTON_RELEASE:
|
||||
case 'B':
|
||||
update_pos (mv_resize,
|
||||
event->pointer.root_x,
|
||||
event->pointer.root_y);
|
||||
@@ -1275,7 +1224,6 @@ create_moveresize_window (MoveResizeData *mv_resize,
|
||||
|
||||
gdk_window_show (mv_resize->moveresize_emulation_window);
|
||||
|
||||
G_GNUC_BEGIN_IGNORE_DEPRECATIONS;
|
||||
status = gdk_pointer_grab (mv_resize->moveresize_emulation_window,
|
||||
FALSE,
|
||||
GDK_BUTTON_RELEASE_MASK |
|
||||
@@ -1283,7 +1231,6 @@ create_moveresize_window (MoveResizeData *mv_resize,
|
||||
NULL,
|
||||
NULL,
|
||||
timestamp);
|
||||
G_GNUC_END_IGNORE_DEPRECATIONS;
|
||||
|
||||
if (status != GDK_GRAB_SUCCESS)
|
||||
{
|
||||
@@ -1296,71 +1243,6 @@ create_moveresize_window (MoveResizeData *mv_resize,
|
||||
mv_resize->moveresize_process_time = 0;
|
||||
}
|
||||
|
||||
static void
|
||||
calculate_unmoving_origin (MoveResizeData *mv_resize)
|
||||
{
|
||||
GdkRectangle rect;
|
||||
gint width, height;
|
||||
|
||||
if (mv_resize->moveresize_geom_mask & GDK_HINT_WIN_GRAVITY &&
|
||||
mv_resize->moveresize_geometry.win_gravity == GDK_GRAVITY_STATIC)
|
||||
{
|
||||
gdk_window_get_origin (mv_resize->moveresize_window,
|
||||
&mv_resize->moveresize_orig_x,
|
||||
&mv_resize->moveresize_orig_y);
|
||||
}
|
||||
else
|
||||
{
|
||||
gdk_window_get_frame_extents (mv_resize->moveresize_window, &rect);
|
||||
gdk_window_get_geometry (mv_resize->moveresize_window,
|
||||
NULL, NULL, &width, &height);
|
||||
|
||||
switch (mv_resize->moveresize_geometry.win_gravity)
|
||||
{
|
||||
case GDK_GRAVITY_NORTH_WEST:
|
||||
mv_resize->moveresize_orig_x = rect.x;
|
||||
mv_resize->moveresize_orig_y = rect.y;
|
||||
break;
|
||||
case GDK_GRAVITY_NORTH:
|
||||
mv_resize->moveresize_orig_x = rect.x + rect.width / 2 - width / 2;
|
||||
mv_resize->moveresize_orig_y = rect.y;
|
||||
break;
|
||||
case GDK_GRAVITY_NORTH_EAST:
|
||||
mv_resize->moveresize_orig_x = rect.x + rect.width - width;
|
||||
mv_resize->moveresize_orig_y = rect.y;
|
||||
break;
|
||||
case GDK_GRAVITY_WEST:
|
||||
mv_resize->moveresize_orig_x = rect.x;
|
||||
mv_resize->moveresize_orig_y = rect.y + rect.height / 2 - height / 2;
|
||||
break;
|
||||
case GDK_GRAVITY_CENTER:
|
||||
mv_resize->moveresize_orig_x = rect.x + rect.width / 2 - width / 2;
|
||||
mv_resize->moveresize_orig_y = rect.y + rect.height / 2 - height / 2;
|
||||
break;
|
||||
case GDK_GRAVITY_EAST:
|
||||
mv_resize->moveresize_orig_x = rect.x + rect.width - width;
|
||||
mv_resize->moveresize_orig_y = rect.y + rect.height / 2 - height / 2;
|
||||
break;
|
||||
case GDK_GRAVITY_SOUTH_WEST:
|
||||
mv_resize->moveresize_orig_x = rect.x;
|
||||
mv_resize->moveresize_orig_y = rect.y + rect.height - height;
|
||||
break;
|
||||
case GDK_GRAVITY_SOUTH:
|
||||
mv_resize->moveresize_orig_x = rect.x + rect.width / 2 - width / 2;
|
||||
mv_resize->moveresize_orig_y = rect.y + rect.height - height;
|
||||
break;
|
||||
case GDK_GRAVITY_SOUTH_EAST:
|
||||
mv_resize->moveresize_orig_x = rect.x + rect.width - width;
|
||||
mv_resize->moveresize_orig_y = rect.y + rect.height - height;
|
||||
break;
|
||||
default:
|
||||
mv_resize->moveresize_orig_x = rect.x;
|
||||
mv_resize->moveresize_orig_y = rect.y;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
gdk_broadway_window_begin_resize_drag (GdkWindow *window,
|
||||
GdkWindowEdge edge,
|
||||
@@ -1371,15 +1253,12 @@ gdk_broadway_window_begin_resize_drag (GdkWindow *window,
|
||||
guint32 timestamp)
|
||||
{
|
||||
MoveResizeData *mv_resize;
|
||||
GdkWindowImplBroadway *impl;
|
||||
|
||||
impl = GDK_WINDOW_IMPL_BROADWAY (window->impl);
|
||||
|
||||
if (GDK_WINDOW_DESTROYED (window) ||
|
||||
!WINDOW_IS_TOPLEVEL_OR_FOREIGN (window))
|
||||
return;
|
||||
|
||||
mv_resize = get_move_resize_data (gdk_window_get_display (window), TRUE);
|
||||
mv_resize = get_move_resize_data (GDK_WINDOW_DISPLAY (window), TRUE);
|
||||
|
||||
mv_resize->is_resize = TRUE;
|
||||
mv_resize->moveresize_button = button;
|
||||
@@ -1388,14 +1267,12 @@ gdk_broadway_window_begin_resize_drag (GdkWindow *window,
|
||||
mv_resize->moveresize_y = root_y;
|
||||
mv_resize->moveresize_window = g_object_ref (window);
|
||||
|
||||
gdk_window_get_origin (mv_resize->moveresize_window,
|
||||
&mv_resize->moveresize_orig_x,
|
||||
&mv_resize->moveresize_orig_y);
|
||||
mv_resize->moveresize_orig_width = gdk_window_get_width (window);
|
||||
mv_resize->moveresize_orig_height = gdk_window_get_height (window);
|
||||
|
||||
mv_resize->moveresize_geom_mask = impl->geometry_hints_mask;
|
||||
mv_resize->moveresize_geometry = impl->geometry_hints;
|
||||
|
||||
calculate_unmoving_origin (mv_resize);
|
||||
|
||||
create_moveresize_window (mv_resize, timestamp);
|
||||
}
|
||||
|
||||
@@ -1451,6 +1328,7 @@ gdk_broadway_window_process_updates_recurse (GdkWindow *window,
|
||||
|
||||
impl = GDK_WINDOW_IMPL_BROADWAY (window->impl);
|
||||
impl->dirty = TRUE;
|
||||
queue_dirty_flush (GDK_BROADWAY_DISPLAY (gdk_window_get_display (window)));
|
||||
}
|
||||
|
||||
void
|
||||
@@ -1470,6 +1348,56 @@ _gdk_broadway_window_queue_antiexpose (GdkWindow *window,
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
static void
|
||||
copy_region (cairo_surface_t *surface,
|
||||
cairo_region_t *area,
|
||||
gint dx,
|
||||
gint dy)
|
||||
{
|
||||
cairo_t *cr;
|
||||
|
||||
cr = cairo_create (surface);
|
||||
|
||||
gdk_cairo_region (cr, area);
|
||||
cairo_clip (cr);
|
||||
|
||||
/* NB: This is a self-copy and Cairo doesn't support that yet.
|
||||
* So we do a litle trick.
|
||||
*/
|
||||
cairo_push_group (cr);
|
||||
|
||||
cairo_set_source_surface (cr, surface, dx, dy);
|
||||
cairo_paint (cr);
|
||||
|
||||
cairo_pop_group_to_source (cr);
|
||||
cairo_paint (cr);
|
||||
|
||||
cairo_destroy (cr);
|
||||
}
|
||||
|
||||
void
|
||||
_gdk_broadway_window_translate (GdkWindow *window,
|
||||
cairo_region_t *area,
|
||||
gint dx,
|
||||
gint dy)
|
||||
{
|
||||
GdkWindowImplBroadway *impl;
|
||||
GdkBroadwayDisplay *broadway_display;
|
||||
|
||||
impl = GDK_WINDOW_IMPL_BROADWAY (window->impl);
|
||||
|
||||
if (impl->surface)
|
||||
{
|
||||
copy_region (impl->surface, area, dx, dy);
|
||||
broadway_display = GDK_BROADWAY_DISPLAY (gdk_window_get_display (window));
|
||||
|
||||
if (_gdk_broadway_server_window_translate (broadway_display->server,
|
||||
impl->id,
|
||||
area, dx, dy))
|
||||
queue_dirty_flush (broadway_display);
|
||||
}
|
||||
}
|
||||
|
||||
guint32
|
||||
gdk_broadway_get_last_seen_time (GdkWindow *window)
|
||||
{
|
||||
@@ -1508,6 +1436,7 @@ gdk_window_impl_broadway_class_init (GdkWindowImplBroadwayClass *klass)
|
||||
impl_class->input_shape_combine_region = gdk_window_broadway_input_shape_combine_region;
|
||||
impl_class->set_static_gravities = gdk_window_broadway_set_static_gravities;
|
||||
impl_class->queue_antiexpose = _gdk_broadway_window_queue_antiexpose;
|
||||
impl_class->translate = _gdk_broadway_window_translate;
|
||||
impl_class->destroy = _gdk_broadway_window_destroy;
|
||||
impl_class->destroy_foreign = gdk_broadway_window_destroy_foreign;
|
||||
impl_class->resize_cairo_surface = gdk_window_broadway_resize_cairo_surface;
|
||||
|
||||
@@ -64,9 +64,6 @@ struct _GdkWindowImplBroadway
|
||||
gint8 toplevel_window_type;
|
||||
gboolean dirty;
|
||||
gboolean last_synced;
|
||||
|
||||
GdkGeometry geometry_hints;
|
||||
GdkWindowHints geometry_hints_mask;
|
||||
};
|
||||
|
||||
struct _GdkWindowImplBroadwayClass
|
||||
|
||||
@@ -42,15 +42,3 @@ isinf (double x)
|
||||
return (!_finite (x) && !_isnan (x));
|
||||
}
|
||||
#endif
|
||||
|
||||
/* Workaround for round() for non-GCC/non-C99 compilers */
|
||||
#ifndef HAVE_ROUND
|
||||
static inline double
|
||||
round (double x)
|
||||
{
|
||||
if (x >= 0)
|
||||
return floor (x + 0.5);
|
||||
else
|
||||
return ceil (x - 0.5);
|
||||
}
|
||||
#endif
|
||||
|
||||
34
gdk/gdk.c
@@ -26,7 +26,6 @@
|
||||
|
||||
#define GDK_DISABLE_DEPRECATION_WARNINGS 1
|
||||
|
||||
#include "gdkversionmacros.h"
|
||||
#include "gdkmain.h"
|
||||
|
||||
#include "gdkinternals.h"
|
||||
@@ -276,6 +275,9 @@ gdk_pre_parse_libgtk_only (void)
|
||||
else if (g_str_equal (rendering_mode, "recording"))
|
||||
_gdk_rendering_mode = GDK_RENDERING_MODE_RECORDING;
|
||||
}
|
||||
|
||||
/* Do any setup particular to the windowing system */
|
||||
gdk_display_manager_get ();
|
||||
}
|
||||
|
||||
|
||||
@@ -326,24 +328,6 @@ gdk_parse_args (int *argc,
|
||||
GDK_NOTE (MISC, g_message ("progname: \"%s\"", g_get_prgname ()));
|
||||
}
|
||||
|
||||
/**
|
||||
* gdk_get_display:
|
||||
*
|
||||
* Gets the name of the display, which usually comes from the
|
||||
* <envar>DISPLAY</envar> environment variable or the
|
||||
* <option>--display</option> command line option.
|
||||
*
|
||||
* Returns: the name of the display.
|
||||
*
|
||||
* Deprecated: 3.8: Call gdk_display_get_name (gdk_display_get_default ()))
|
||||
* instead.
|
||||
*/
|
||||
gchar *
|
||||
gdk_get_display (void)
|
||||
{
|
||||
return g_strdup (gdk_display_get_name (gdk_display_get_default ()));
|
||||
}
|
||||
|
||||
/**
|
||||
* gdk_get_display_arg_name:
|
||||
*
|
||||
@@ -369,7 +353,7 @@ gdk_get_display_arg_name (void)
|
||||
*
|
||||
* Opens the default display specified by command line arguments or
|
||||
* environment variables, sets it as the default display, and returns
|
||||
* it. gdk_parse_args() must have been called first. If the default
|
||||
* it. gdk_parse_args must have been called first. If the default
|
||||
* display has previously been set, simply returns that. An internal
|
||||
* function that should not be used by applications.
|
||||
*
|
||||
@@ -667,12 +651,12 @@ gdk_init (int *argc, char ***argv)
|
||||
* </informalexample>
|
||||
*
|
||||
* Unfortunately, all of the above documentation holds with the X11
|
||||
* backend only. With the Win32 or Quartz backends, GDK and GTK+ calls
|
||||
* must occur only in the main thread (see below). When using Python,
|
||||
* even on X11 combining the GDK lock with other locks such as the
|
||||
* Python global interpreter lock can be complicated.
|
||||
* backend only. With the Win32 backend, GDK and GTK+ calls should not
|
||||
* be attempted from multiple threads at all. Combining the GDK lock
|
||||
* with other locks such as the Python global interpreter lock can be
|
||||
* complicated.
|
||||
*
|
||||
* For these reasons, the threading support has been deprecated in
|
||||
* For these reason, the threading support has been deprecated in
|
||||
* GTK+ 3.6. Instead of calling GTK+ directly from multiple threads,
|
||||
* it is recommended to use g_idle_add(), g_main_context_invoke()
|
||||
* and similar functions to make these calls from the main thread
|
||||
|
||||
615
gdk/gdk.symbols
Normal file
@@ -0,0 +1,615 @@
|
||||
/* This file lists all exported symbols. It is used to generate
|
||||
* the gdk.def file used to control exports on Windows.
|
||||
*/
|
||||
gdk_add_option_entries_libgtk_only
|
||||
gdk_app_launch_context_get_type
|
||||
gdk_app_launch_context_new
|
||||
gdk_app_launch_context_set_desktop
|
||||
gdk_app_launch_context_set_display
|
||||
gdk_app_launch_context_set_icon
|
||||
gdk_app_launch_context_set_icon_name
|
||||
gdk_app_launch_context_set_screen
|
||||
gdk_app_launch_context_set_timestamp
|
||||
gdk_atom_intern
|
||||
gdk_atom_intern_static_string
|
||||
gdk_atom_name
|
||||
gdk_axis_use_get_type
|
||||
gdk_beep
|
||||
gdk_byte_order_get_type
|
||||
gdk_cairo_create
|
||||
gdk_cairo_get_clip_rectangle
|
||||
gdk_cairo_rectangle
|
||||
gdk_cairo_region
|
||||
gdk_cairo_region_create_from_surface
|
||||
gdk_cairo_set_source_color
|
||||
gdk_cairo_set_source_pixbuf
|
||||
gdk_cairo_set_source_rgba
|
||||
gdk_cairo_set_source_window
|
||||
gdk_color_copy
|
||||
gdk_color_equal
|
||||
gdk_color_free
|
||||
gdk_color_get_type
|
||||
gdk_color_hash
|
||||
gdk_color_parse
|
||||
gdk_color_to_string
|
||||
gdk_crossing_mode_get_type
|
||||
gdk_cursor_get_cursor_type
|
||||
gdk_cursor_get_display
|
||||
gdk_cursor_get_image
|
||||
gdk_cursor_get_type
|
||||
gdk_cursor_new
|
||||
gdk_cursor_new_for_display
|
||||
gdk_cursor_new_from_name
|
||||
gdk_cursor_new_from_pixbuf
|
||||
gdk_cursor_ref
|
||||
gdk_cursor_type_get_type
|
||||
gdk_cursor_unref
|
||||
gdk_device_free_history
|
||||
gdk_device_get_associated_device
|
||||
gdk_device_get_axis
|
||||
gdk_device_get_axis_use
|
||||
gdk_device_get_axis_value
|
||||
gdk_device_get_device_type
|
||||
gdk_device_get_display
|
||||
gdk_device_get_has_cursor
|
||||
gdk_device_get_history
|
||||
gdk_device_get_key
|
||||
gdk_device_get_mode
|
||||
gdk_device_get_name
|
||||
gdk_device_get_n_axes
|
||||
gdk_device_get_n_keys
|
||||
gdk_device_get_position
|
||||
gdk_device_get_source
|
||||
gdk_device_get_state
|
||||
gdk_device_get_type
|
||||
gdk_device_get_window_at_position
|
||||
gdk_device_grab
|
||||
gdk_device_grab_info_libgtk_only
|
||||
gdk_device_list_axes
|
||||
gdk_device_list_slave_devices
|
||||
gdk_device_manager_get_client_pointer
|
||||
gdk_device_manager_get_display
|
||||
gdk_device_manager_get_type
|
||||
gdk_device_manager_list_devices
|
||||
gdk_device_set_axis_use
|
||||
gdk_device_set_key
|
||||
gdk_device_set_mode
|
||||
gdk_device_type_get_type
|
||||
gdk_device_ungrab
|
||||
gdk_device_warp
|
||||
gdk_disable_multidevice
|
||||
gdk_display_beep
|
||||
gdk_display_close
|
||||
gdk_display_device_is_grabbed
|
||||
gdk_display_flush
|
||||
gdk_display_get_app_launch_context
|
||||
gdk_display_get_default
|
||||
gdk_display_get_default_cursor_size
|
||||
gdk_display_get_default_group
|
||||
gdk_display_get_default_screen
|
||||
gdk_display_get_device_manager
|
||||
gdk_display_get_event
|
||||
gdk_display_get_maximal_cursor_size
|
||||
gdk_display_get_name
|
||||
gdk_display_get_n_screens
|
||||
gdk_display_get_pointer
|
||||
gdk_display_get_screen
|
||||
gdk_display_get_type
|
||||
gdk_display_get_window_at_pointer
|
||||
gdk_display_has_pending
|
||||
gdk_display_is_closed
|
||||
gdk_display_keyboard_ungrab
|
||||
gdk_display_list_devices
|
||||
gdk_display_manager_get
|
||||
gdk_display_manager_get_default_display
|
||||
gdk_display_manager_get_type
|
||||
gdk_display_manager_list_displays
|
||||
gdk_display_manager_open_display
|
||||
gdk_display_manager_set_default_display
|
||||
gdk_display_notify_startup_complete
|
||||
gdk_display_open
|
||||
gdk_display_open_default_libgtk_only
|
||||
gdk_display_peek_event
|
||||
gdk_display_pointer_is_grabbed
|
||||
gdk_display_pointer_ungrab
|
||||
gdk_display_put_event
|
||||
gdk_display_request_selection_notification
|
||||
gdk_display_set_double_click_distance
|
||||
gdk_display_set_double_click_time
|
||||
gdk_display_store_clipboard
|
||||
gdk_display_supports_clipboard_persistence
|
||||
gdk_display_supports_composite
|
||||
gdk_display_supports_cursor_alpha
|
||||
gdk_display_supports_cursor_color
|
||||
gdk_display_supports_input_shapes
|
||||
gdk_display_supports_selection_notification
|
||||
gdk_display_supports_shapes
|
||||
gdk_display_sync
|
||||
gdk_display_warp_pointer
|
||||
gdk_drag_abort
|
||||
gdk_drag_action_get_type
|
||||
gdk_drag_begin
|
||||
gdk_drag_begin_for_device
|
||||
gdk_drag_context_get_actions
|
||||
gdk_drag_context_get_dest_window
|
||||
gdk_drag_context_get_device
|
||||
gdk_drag_context_get_protocol
|
||||
gdk_drag_context_get_selected_action
|
||||
gdk_drag_context_get_source_window
|
||||
gdk_drag_context_get_suggested_action
|
||||
gdk_drag_context_get_type
|
||||
gdk_drag_context_list_targets
|
||||
gdk_drag_context_set_device
|
||||
gdk_drag_drop
|
||||
gdk_drag_drop_succeeded
|
||||
gdk_drag_find_window_for_screen
|
||||
gdk_drag_get_selection
|
||||
gdk_drag_motion
|
||||
gdk_drag_protocol_get_type
|
||||
gdk_drag_status
|
||||
gdk_drop_finish
|
||||
gdk_drop_reply
|
||||
gdk_error_trap_pop
|
||||
gdk_error_trap_pop_ignored
|
||||
gdk_error_trap_push
|
||||
gdk_event_copy
|
||||
gdk_event_free
|
||||
gdk_event_get
|
||||
gdk_event_get_axis
|
||||
gdk_event_get_button
|
||||
gdk_event_get_click_count
|
||||
gdk_event_get_coords
|
||||
gdk_event_get_device
|
||||
gdk_event_get_keycode
|
||||
gdk_event_get_keyval
|
||||
gdk_event_get_root_coords
|
||||
gdk_event_get_screen
|
||||
gdk_event_get_scroll_direction
|
||||
gdk_event_get_scroll_deltas
|
||||
gdk_event_get_source_device
|
||||
gdk_event_get_state
|
||||
gdk_event_get_time
|
||||
gdk_event_get_event_sequence
|
||||
gdk_event_get_type
|
||||
gdk_event_handler_set
|
||||
gdk_event_mask_get_type
|
||||
gdk_event_new
|
||||
gdk_event_peek
|
||||
gdk_event_put
|
||||
gdk_event_request_motions
|
||||
gdk_event_set_device
|
||||
gdk_event_set_screen
|
||||
gdk_event_set_source_device
|
||||
gdk_event_triggers_context_menu
|
||||
gdk_events_get_angle
|
||||
gdk_events_get_center
|
||||
gdk_events_get_distance
|
||||
gdk_events_pending
|
||||
gdk_event_type_get_type
|
||||
gdk_filter_return_get_type
|
||||
gdk_flush
|
||||
gdk_frame_clock_begin_updating
|
||||
gdk_frame_clock_end_updating
|
||||
gdk_frame_clock_get_current_timings
|
||||
gdk_frame_clock_get_frame_counter
|
||||
gdk_frame_clock_get_frame_time
|
||||
gdk_frame_clock_get_history_start
|
||||
gdk_frame_clock_get_refresh_info
|
||||
gdk_frame_clock_get_timings
|
||||
gdk_frame_clock_get_type
|
||||
gdk_frame_clock_idle_get_type
|
||||
gdk_frame_clock_phase_get_type
|
||||
gdk_frame_clock_request_phase
|
||||
gdk_frame_timings_get_complete
|
||||
gdk_frame_timings_get_frame_counter
|
||||
gdk_frame_timings_get_frame_time
|
||||
gdk_frame_timings_get_predicted_presentation_time
|
||||
gdk_frame_timings_get_presentation_time
|
||||
gdk_frame_timings_get_refresh_interval
|
||||
gdk_frame_timings_get_type
|
||||
gdk_frame_timings_ref
|
||||
gdk_frame_timings_unref
|
||||
gdk_fullscreen_mode_get_type
|
||||
gdk_get_default_root_window
|
||||
gdk_get_display
|
||||
gdk_get_display_arg_name
|
||||
gdk_get_program_class
|
||||
gdk_get_show_events
|
||||
gdk_grab_ownership_get_type
|
||||
gdk_grab_status_get_type
|
||||
gdk_gravity_get_type
|
||||
gdk_init
|
||||
gdk_init_check
|
||||
gdk_input_mode_get_type
|
||||
gdk_input_source_get_type
|
||||
gdk_keyboard_grab
|
||||
gdk_keyboard_ungrab
|
||||
gdk_keymap_add_virtual_modifiers
|
||||
gdk_keymap_get_caps_lock_state
|
||||
gdk_keymap_get_default
|
||||
gdk_keymap_get_direction
|
||||
gdk_keymap_get_entries_for_keycode
|
||||
gdk_keymap_get_entries_for_keyval
|
||||
gdk_keymap_get_for_display
|
||||
gdk_keymap_get_modifier_mask
|
||||
gdk_keymap_get_modifier_state
|
||||
gdk_keymap_get_num_lock_state
|
||||
gdk_keymap_get_type
|
||||
gdk_keymap_have_bidi_layouts
|
||||
gdk_keymap_lookup_key
|
||||
gdk_keymap_map_virtual_modifiers
|
||||
gdk_keymap_translate_keyboard_state
|
||||
gdk_keyval_convert_case
|
||||
gdk_keyval_from_name
|
||||
gdk_keyval_is_lower
|
||||
gdk_keyval_is_upper
|
||||
gdk_keyval_name
|
||||
gdk_keyval_to_lower
|
||||
gdk_keyval_to_unicode
|
||||
gdk_keyval_to_upper
|
||||
gdk_list_visuals
|
||||
gdk_modifier_intent_get_type
|
||||
gdk_modifier_type_get_type
|
||||
gdk_notify_startup_complete
|
||||
gdk_notify_startup_complete_with_id
|
||||
gdk_notify_type_get_type
|
||||
gdk_offscreen_window_get_embedder
|
||||
gdk_offscreen_window_get_surface
|
||||
gdk_offscreen_window_get_type
|
||||
gdk_offscreen_window_set_embedder
|
||||
gdk_owner_change_get_type
|
||||
gdk_pango_context_get
|
||||
gdk_pango_context_get_for_screen
|
||||
gdk_pango_layout_get_clip_region
|
||||
gdk_pango_layout_line_get_clip_region
|
||||
gdk_parse_args
|
||||
gdk_pixbuf_get_from_surface
|
||||
gdk_pixbuf_get_from_window
|
||||
gdk_pointer_grab
|
||||
gdk_pointer_is_grabbed
|
||||
gdk_pointer_ungrab
|
||||
gdk_pre_parse_libgtk_only
|
||||
gdk_property_change
|
||||
gdk_property_delete
|
||||
gdk_property_get
|
||||
gdk_property_state_get_type
|
||||
gdk_prop_mode_get_type
|
||||
gdk_query_depths
|
||||
gdk_query_visual_types
|
||||
gdk_rectangle_get_type
|
||||
gdk_rectangle_intersect
|
||||
gdk_rectangle_union
|
||||
gdk_rgba_copy
|
||||
gdk_rgba_equal
|
||||
gdk_rgba_free
|
||||
gdk_rgba_get_type
|
||||
gdk_rgba_hash
|
||||
gdk_rgba_parse
|
||||
gdk_rgba_to_string
|
||||
gdk_screen_get_active_window
|
||||
gdk_screen_get_default
|
||||
gdk_screen_get_display
|
||||
gdk_screen_get_font_options
|
||||
gdk_screen_get_height
|
||||
gdk_screen_get_height_mm
|
||||
gdk_screen_get_monitor_at_point
|
||||
gdk_screen_get_monitor_at_window
|
||||
gdk_screen_get_monitor_geometry
|
||||
gdk_screen_get_monitor_workarea
|
||||
gdk_screen_get_monitor_height_mm
|
||||
gdk_screen_get_monitor_plug_name
|
||||
gdk_screen_get_monitor_width_mm
|
||||
gdk_screen_get_n_monitors
|
||||
gdk_screen_get_number
|
||||
gdk_screen_get_primary_monitor
|
||||
gdk_screen_get_resolution
|
||||
gdk_screen_get_rgba_visual
|
||||
gdk_screen_get_root_window
|
||||
gdk_screen_get_setting
|
||||
gdk_screen_get_system_visual
|
||||
gdk_screen_get_toplevel_windows
|
||||
gdk_screen_get_type
|
||||
gdk_screen_get_width
|
||||
gdk_screen_get_width_mm
|
||||
gdk_screen_get_window_stack
|
||||
gdk_screen_height
|
||||
gdk_screen_height_mm
|
||||
gdk_screen_is_composited
|
||||
gdk_screen_list_visuals
|
||||
gdk_screen_make_display_name
|
||||
gdk_screen_set_font_options
|
||||
gdk_screen_set_resolution
|
||||
gdk_screen_width
|
||||
gdk_screen_width_mm
|
||||
gdk_scroll_direction_get_type
|
||||
gdk_selection_convert
|
||||
gdk_selection_owner_get
|
||||
gdk_selection_owner_get_for_display
|
||||
gdk_selection_owner_set
|
||||
gdk_selection_owner_set_for_display
|
||||
gdk_selection_property_get
|
||||
gdk_selection_send_notify
|
||||
gdk_selection_send_notify_for_display
|
||||
gdk_set_double_click_time
|
||||
gdk_set_program_class
|
||||
gdk_set_show_events
|
||||
gdk_setting_action_get_type
|
||||
gdk_setting_get
|
||||
gdk_status_get_type
|
||||
gdk_synthesize_window_state
|
||||
gdk_test_render_sync
|
||||
gdk_test_simulate_button
|
||||
gdk_test_simulate_key
|
||||
gdk_text_property_to_utf8_list_for_display
|
||||
gdk_threads_add_idle
|
||||
gdk_threads_add_idle_full
|
||||
gdk_threads_add_timeout
|
||||
gdk_threads_add_timeout_full
|
||||
gdk_threads_add_timeout_seconds
|
||||
gdk_threads_add_timeout_seconds_full
|
||||
gdk_threads_enter
|
||||
gdk_threads_init
|
||||
gdk_threads_leave
|
||||
gdk_threads_set_lock_functions
|
||||
gdk_unicode_to_keyval
|
||||
gdk_utf8_to_string_target
|
||||
gdk_visibility_state_get_type
|
||||
gdk_visual_get_best
|
||||
gdk_visual_get_best_depth
|
||||
gdk_visual_get_best_type
|
||||
gdk_visual_get_best_with_both
|
||||
gdk_visual_get_best_with_depth
|
||||
gdk_visual_get_best_with_type
|
||||
gdk_visual_get_bits_per_rgb
|
||||
gdk_visual_get_blue_pixel_details
|
||||
gdk_visual_get_byte_order
|
||||
gdk_visual_get_colormap_size
|
||||
gdk_visual_get_depth
|
||||
gdk_visual_get_green_pixel_details
|
||||
gdk_visual_get_red_pixel_details
|
||||
gdk_visual_get_screen
|
||||
gdk_visual_get_system
|
||||
gdk_visual_get_type
|
||||
gdk_visual_get_visual_type
|
||||
gdk_visual_type_get_type
|
||||
#ifdef GDK_WINDOWING_WIN32
|
||||
gdk_win32_handle_table_lookup
|
||||
gdk_win32_icon_to_pixbuf_libgtk_only
|
||||
gdk_win32_pixbuf_to_hicon_libgtk_only
|
||||
gdk_win32_selection_add_targets
|
||||
gdk_win32_set_modal_dialog_libgtk_only
|
||||
gdk_win32_window_is_win32
|
||||
gdk_win32_window_get_impl_hwnd
|
||||
gdk_win32_window_get_handle
|
||||
gdk_win32_window_get_type
|
||||
gdk_win32_display_get_type
|
||||
gdk_win32_window_foreign_new_for_display
|
||||
gdk_win32_window_lookup_for_display
|
||||
#endif
|
||||
gdk_window_add_filter
|
||||
gdk_window_at_pointer
|
||||
gdk_window_attributes_type_get_type
|
||||
gdk_window_beep
|
||||
gdk_window_begin_move_drag
|
||||
gdk_window_begin_move_drag_for_device
|
||||
gdk_window_begin_paint_rect
|
||||
gdk_window_begin_paint_region
|
||||
gdk_window_begin_resize_drag
|
||||
gdk_window_begin_resize_drag_for_device
|
||||
gdk_window_window_class_get_type
|
||||
gdk_window_configure_finished
|
||||
gdk_window_constrain_size
|
||||
gdk_window_coords_from_parent
|
||||
gdk_window_coords_to_parent
|
||||
gdk_window_create_similar_surface
|
||||
gdk_window_deiconify
|
||||
gdk_window_destroy
|
||||
gdk_window_destroy_notify
|
||||
gdk_window_edge_get_type
|
||||
gdk_window_enable_synchronized_configure
|
||||
gdk_window_end_paint
|
||||
gdk_window_ensure_native
|
||||
gdk_window_flush
|
||||
gdk_window_focus
|
||||
gdk_window_freeze_toplevel_updates_libgtk_only
|
||||
gdk_window_freeze_updates
|
||||
gdk_window_fullscreen
|
||||
gdk_window_geometry_changed
|
||||
gdk_window_get_accept_focus
|
||||
gdk_window_get_background_pattern
|
||||
gdk_window_get_children
|
||||
gdk_window_get_clip_region
|
||||
gdk_window_get_composited
|
||||
gdk_window_get_cursor
|
||||
gdk_window_get_decorations
|
||||
gdk_window_get_device_cursor
|
||||
gdk_window_get_device_events
|
||||
gdk_window_get_device_position
|
||||
gdk_window_get_display
|
||||
gdk_window_get_drag_protocol
|
||||
gdk_window_get_effective_parent
|
||||
gdk_window_get_effective_toplevel
|
||||
gdk_window_get_events
|
||||
gdk_window_get_focus_on_map
|
||||
gdk_window_get_frame_clock
|
||||
gdk_window_get_frame_extents
|
||||
gdk_window_get_fullscreen_mode
|
||||
gdk_window_get_geometry
|
||||
gdk_window_get_group
|
||||
gdk_window_get_height
|
||||
gdk_window_get_modal_hint
|
||||
gdk_window_get_origin
|
||||
gdk_window_get_parent
|
||||
gdk_window_get_pointer
|
||||
gdk_window_get_position
|
||||
gdk_window_get_root_coords
|
||||
gdk_window_get_root_origin
|
||||
gdk_window_get_screen
|
||||
gdk_window_get_source_events
|
||||
gdk_window_get_state
|
||||
gdk_window_get_support_multidevice
|
||||
gdk_window_get_toplevel
|
||||
gdk_window_get_type
|
||||
gdk_window_get_type_hint
|
||||
gdk_window_get_update_area
|
||||
gdk_window_get_user_data
|
||||
gdk_window_get_visible_region
|
||||
gdk_window_get_visual
|
||||
gdk_window_get_width
|
||||
gdk_window_get_window_type
|
||||
gdk_window_has_native
|
||||
gdk_window_hide
|
||||
gdk_window_hints_get_type
|
||||
gdk_window_iconify
|
||||
gdk_window_impl_get_type
|
||||
#ifdef GDK_WINDOWING_X11
|
||||
gdk_window_impl_x11_get_type
|
||||
#endif
|
||||
gdk_window_input_shape_combine_region
|
||||
gdk_window_invalidate_maybe_recurse
|
||||
gdk_window_invalidate_rect
|
||||
gdk_window_invalidate_region
|
||||
gdk_window_is_destroyed
|
||||
gdk_window_is_input_only
|
||||
gdk_window_is_shaped
|
||||
gdk_window_is_viewable
|
||||
gdk_window_is_visible
|
||||
gdk_window_lower
|
||||
gdk_window_maximize
|
||||
gdk_window_merge_child_input_shapes
|
||||
gdk_window_merge_child_shapes
|
||||
gdk_window_move
|
||||
gdk_window_move_region
|
||||
gdk_window_move_resize
|
||||
gdk_window_new
|
||||
gdk_window_peek_children
|
||||
gdk_window_process_all_updates
|
||||
gdk_window_process_updates
|
||||
gdk_window_raise
|
||||
gdk_window_register_dnd
|
||||
gdk_window_remove_filter
|
||||
gdk_window_reparent
|
||||
gdk_window_resize
|
||||
gdk_window_restack
|
||||
gdk_window_scroll
|
||||
gdk_window_set_accept_focus
|
||||
gdk_window_set_background
|
||||
gdk_window_set_background_pattern
|
||||
gdk_window_set_background_rgba
|
||||
gdk_window_set_child_input_shapes
|
||||
gdk_window_set_child_shapes
|
||||
gdk_window_set_composited
|
||||
gdk_window_set_cursor
|
||||
gdk_window_set_debug_updates
|
||||
gdk_window_set_decorations
|
||||
gdk_window_set_device_cursor
|
||||
gdk_window_set_device_events
|
||||
gdk_window_set_events
|
||||
gdk_window_set_focus_on_map
|
||||
gdk_window_set_fullscreen_mode
|
||||
gdk_window_set_functions
|
||||
gdk_window_set_geometry_hints
|
||||
gdk_window_set_group
|
||||
gdk_window_set_icon_list
|
||||
gdk_window_set_icon_name
|
||||
gdk_window_set_keep_above
|
||||
gdk_window_set_keep_below
|
||||
gdk_window_set_modal_hint
|
||||
gdk_window_set_opacity
|
||||
gdk_window_set_override_redirect
|
||||
gdk_window_set_role
|
||||
gdk_window_set_skip_pager_hint
|
||||
gdk_window_set_skip_taskbar_hint
|
||||
gdk_window_set_source_events
|
||||
gdk_window_set_startup_id
|
||||
gdk_window_set_static_gravities
|
||||
gdk_window_set_support_multidevice
|
||||
gdk_window_set_title
|
||||
gdk_window_set_transient_for
|
||||
gdk_window_set_type_hint
|
||||
gdk_window_set_urgency_hint
|
||||
gdk_window_set_user_data
|
||||
gdk_window_shape_combine_region
|
||||
gdk_window_show
|
||||
gdk_window_show_unraised
|
||||
gdk_window_state_get_type
|
||||
gdk_window_stick
|
||||
gdk_window_thaw_toplevel_updates_libgtk_only
|
||||
gdk_window_thaw_updates
|
||||
gdk_window_type_get_type
|
||||
gdk_window_type_hint_get_type
|
||||
gdk_window_unfullscreen
|
||||
gdk_window_unmaximize
|
||||
gdk_window_unstick
|
||||
gdk_window_withdraw
|
||||
gdk_wm_decoration_get_type
|
||||
gdk_wm_function_get_type
|
||||
#ifdef GDK_WINDOWING_X11
|
||||
gdk_x11_app_launch_context_get_type
|
||||
gdk_x11_atom_to_xatom
|
||||
gdk_x11_atom_to_xatom_for_display
|
||||
gdk_x11_cursor_get_type
|
||||
gdk_x11_cursor_get_xcursor
|
||||
gdk_x11_cursor_get_xdisplay
|
||||
gdk_x11_device_core_get_type
|
||||
gdk_x11_device_get_id
|
||||
gdk_x11_device_manager_core_get_type
|
||||
gdk_x11_device_manager_lookup
|
||||
gdk_x11_device_manager_xi2_get_type
|
||||
gdk_x11_device_xi2_get_type
|
||||
gdk_x11_display_broadcast_startup_message
|
||||
gdk_x11_display_error_trap_pop
|
||||
gdk_x11_display_error_trap_pop_ignored
|
||||
gdk_x11_display_error_trap_push
|
||||
gdk_x11_display_get_startup_notification_id
|
||||
gdk_x11_display_get_type
|
||||
gdk_x11_display_get_user_time
|
||||
gdk_x11_display_get_xdisplay
|
||||
gdk_x11_display_grab
|
||||
gdk_x11_display_manager_get_type
|
||||
gdk_x11_display_set_cursor_theme
|
||||
gdk_x11_display_set_startup_notification_id
|
||||
gdk_x11_display_string_to_compound_text
|
||||
gdk_x11_display_text_property_to_text_list
|
||||
gdk_x11_display_ungrab
|
||||
gdk_x11_display_utf8_to_compound_text
|
||||
gdk_x11_drag_context_get_type
|
||||
gdk_x11_free_compound_text
|
||||
gdk_x11_free_text_list
|
||||
gdk_x11_get_default_root_xwindow
|
||||
gdk_x11_get_default_screen
|
||||
gdk_x11_get_default_xdisplay
|
||||
gdk_x11_get_server_time
|
||||
gdk_x11_get_xatom_by_name
|
||||
gdk_x11_get_xatom_by_name_for_display
|
||||
gdk_x11_get_xatom_name
|
||||
gdk_x11_get_xatom_name_for_display
|
||||
gdk_x11_grab_server
|
||||
gdk_x11_keymap_get_type
|
||||
gdk_x11_keymap_get_group_for_state
|
||||
gdk_x11_keymap_key_is_modifier
|
||||
gdk_x11_lookup_xdisplay
|
||||
gdk_x11_register_standard_event_type
|
||||
gdk_x11_screen_get_monitor_output
|
||||
gdk_x11_screen_get_screen_number
|
||||
gdk_x11_screen_get_type
|
||||
gdk_x11_screen_get_window_manager_name
|
||||
gdk_x11_screen_get_xscreen
|
||||
gdk_x11_screen_lookup_visual
|
||||
gdk_x11_screen_supports_net_wm_hint
|
||||
gdk_x11_set_sm_client_id
|
||||
gdk_x11_ungrab_server
|
||||
gdk_x11_visual_get_type
|
||||
gdk_x11_visual_get_xvisual
|
||||
gdk_x11_window_foreign_new_for_display
|
||||
gdk_x11_window_lookup_for_display
|
||||
gdk_x11_window_get_type
|
||||
gdk_x11_window_get_xid
|
||||
gdk_x11_window_move_to_current_desktop
|
||||
gdk_x11_window_set_theme_variant
|
||||
gdk_x11_window_set_hide_titlebar_when_maximized
|
||||
gdk_x11_window_set_user_time
|
||||
gdk_x11_window_set_utf8_property
|
||||
gdk_x11_xatom_to_atom
|
||||
gdk_x11_xatom_to_atom_for_display
|
||||
#endif
|
||||
@@ -37,7 +37,6 @@ G_BEGIN_DECLS
|
||||
#define GDK_IS_APP_LAUNCH_CONTEXT(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), GDK_TYPE_APP_LAUNCH_CONTEXT))
|
||||
|
||||
|
||||
GDK_AVAILABLE_IN_ALL
|
||||
GType gdk_app_launch_context_get_type (void);
|
||||
|
||||
GDK_DEPRECATED_IN_3_0_FOR(gdk_display_get_app_launch_context)
|
||||
@@ -45,19 +44,14 @@ GdkAppLaunchContext *gdk_app_launch_context_new (void);
|
||||
GDK_DEPRECATED_IN_3_0_FOR(gdk_display_get_app_launch_context)
|
||||
void gdk_app_launch_context_set_display (GdkAppLaunchContext *context,
|
||||
GdkDisplay *display);
|
||||
GDK_AVAILABLE_IN_ALL
|
||||
void gdk_app_launch_context_set_screen (GdkAppLaunchContext *context,
|
||||
GdkScreen *screen);
|
||||
GDK_AVAILABLE_IN_ALL
|
||||
void gdk_app_launch_context_set_desktop (GdkAppLaunchContext *context,
|
||||
gint desktop);
|
||||
GDK_AVAILABLE_IN_ALL
|
||||
void gdk_app_launch_context_set_timestamp (GdkAppLaunchContext *context,
|
||||
guint32 timestamp);
|
||||
GDK_AVAILABLE_IN_ALL
|
||||
void gdk_app_launch_context_set_icon (GdkAppLaunchContext *context,
|
||||
GIcon *icon);
|
||||
GDK_AVAILABLE_IN_ALL
|
||||
void gdk_app_launch_context_set_icon_name (GdkAppLaunchContext *context,
|
||||
const char *icon_name);
|
||||
|
||||
|
||||
@@ -30,34 +30,26 @@
|
||||
|
||||
G_BEGIN_DECLS
|
||||
|
||||
GDK_AVAILABLE_IN_ALL
|
||||
cairo_t * gdk_cairo_create (GdkWindow *window);
|
||||
GDK_AVAILABLE_IN_ALL
|
||||
gboolean gdk_cairo_get_clip_rectangle (cairo_t *cr,
|
||||
GdkRectangle *rect);
|
||||
|
||||
GDK_AVAILABLE_IN_ALL
|
||||
void gdk_cairo_set_source_rgba (cairo_t *cr,
|
||||
const GdkRGBA *rgba);
|
||||
GDK_AVAILABLE_IN_ALL
|
||||
void gdk_cairo_set_source_pixbuf (cairo_t *cr,
|
||||
const GdkPixbuf *pixbuf,
|
||||
gdouble pixbuf_x,
|
||||
gdouble pixbuf_y);
|
||||
GDK_AVAILABLE_IN_ALL
|
||||
void gdk_cairo_set_source_window (cairo_t *cr,
|
||||
GdkWindow *window,
|
||||
gdouble x,
|
||||
gdouble y);
|
||||
|
||||
GDK_AVAILABLE_IN_ALL
|
||||
void gdk_cairo_rectangle (cairo_t *cr,
|
||||
const GdkRectangle *rectangle);
|
||||
GDK_AVAILABLE_IN_ALL
|
||||
void gdk_cairo_region (cairo_t *cr,
|
||||
const cairo_region_t *region);
|
||||
|
||||
GDK_AVAILABLE_IN_ALL
|
||||
cairo_region_t *
|
||||
gdk_cairo_region_create_from_surface
|
||||
(cairo_surface_t *surface);
|
||||
|
||||