Compare commits
1 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
d8ceffab5a |
2
HACKING
2
HACKING
@@ -13,7 +13,7 @@ fine GNU mirrors. Beta software can be found at alpha.gnu.org.
|
||||
Up-to-date instructions about developing GNOME applications and libraries
|
||||
can be found here:
|
||||
|
||||
http://library.gnome.org/devel/
|
||||
http://developer.gnome.org
|
||||
|
||||
Information about using git with GNOME can be found here:
|
||||
|
||||
|
||||
@@ -31,4 +31,5 @@ in the file:
|
||||
|
||||
Or online at:
|
||||
|
||||
http://library.gnome.org/devel/gtk/stable/gtk-building.html
|
||||
http://developer.gnome.org/doc/API/2.0/gtk/gtk-building.html
|
||||
|
||||
|
||||
47
NEWS
47
NEWS
@@ -1,50 +1,3 @@
|
||||
Overview of Changes from GTK+ 2.91.4 to 2.91.5
|
||||
==============================================
|
||||
|
||||
* GtkSwitch: a new widget that provides switch-like on/off functionality
|
||||
|
||||
* Deprecations and cleanups:
|
||||
- GtkCallbackMarshal and GtkFunction have been deprecated
|
||||
- gtk_init_add has been removed
|
||||
- The ::size-request signal has been removed
|
||||
- GtkRuler has been removed
|
||||
|
||||
* The default value for the GtkBox::fill property has been changed
|
||||
back to TRUE
|
||||
|
||||
* Bugs fixed:
|
||||
613942 Deprecate GtkRuler, GtkVruler and GtkHRuler
|
||||
629955 Deprecate / remove gtk_main and gtk_init_add / remove* API
|
||||
633324 Stop invoking size-request completely
|
||||
633896 Printing: Use XDG_DOCUMENTS_DIR as the default location...
|
||||
634474 infinite loop in gtk_icon_view_accessible_set_adjustment
|
||||
634558 Selecting "Search" should focus text box for keyboard entry
|
||||
634592 GtkNotebook doesn't expand (in a typical GtkDialog)
|
||||
634697 gdk: Add XSetting for "gtk-cursor-blink-timeout"
|
||||
634821 Fix a BadMatch when create an icon pixmap for an ARGB visual
|
||||
634987 add a switch widget
|
||||
635175 Leak in gtk_plug_realize
|
||||
635253 GtkRadioButton constructors don't mark group as "allow-none"
|
||||
635307 iconcache: Ensure we don't lose data on power loss
|
||||
635380 gdk_event_apply_filters is unsafe against changes in filter list
|
||||
635588 clicking URL to be opened freezes the application for 3-5 seconds
|
||||
635693 Bad pointer grab bug with GtkMenu/GtkComboBox
|
||||
635879 Change the gdk_rgba_parse() function to be usable from bindings
|
||||
|
||||
* Updated translations:
|
||||
Arabic
|
||||
British English
|
||||
Catalan
|
||||
Czech
|
||||
German
|
||||
Hungarian
|
||||
Indonesian
|
||||
Norwegian bokmål
|
||||
Romanian
|
||||
Thai
|
||||
Uyghur
|
||||
|
||||
|
||||
Overview of Changes from GTK+ 2.91.3 to 2.91.4
|
||||
==============================================
|
||||
|
||||
|
||||
@@ -254,7 +254,7 @@ Release notes for 2.10
|
||||
GTK_OBJECT_IS_FLOATING() will still work, but direct checking
|
||||
of the GTK_FLOATING flag will no longer detect the floating
|
||||
reference. Details about floating references can be found in the docs:
|
||||
http://library.gnome.org/devel/gobject/unstable/gobject-The-Base-Object-Type.html#floating-ref
|
||||
http://developer.gnome.org/doc/API/2.0/gobject/gobject-The-Base-Object-Type.html#floating-ref
|
||||
|
||||
* Accelerators like (_F) are now stripped from labels when they are
|
||||
displayed in toolbars. If this is not wanted, the feature can be
|
||||
|
||||
@@ -4,6 +4,9 @@ EXTRA_DIST += \
|
||||
README.txt \
|
||||
gtk+.sln \
|
||||
gtk+.vsprops \
|
||||
gdk-pixbuf.vcproj \
|
||||
gdk-pixbuf-csource.vcproj \
|
||||
gdk-pixbuf-query-loaders.vcproj \
|
||||
gdk-win32.vcproj \
|
||||
gdk.vcproj \
|
||||
gdk.vcprojin \
|
||||
|
||||
166
build/win32/vs9/gdk-pixbuf-csource.vcproj
Normal file
166
build/win32/vs9/gdk-pixbuf-csource.vcproj
Normal file
@@ -0,0 +1,166 @@
|
||||
<?xml version="1.0" encoding="Windows-1252"?>
|
||||
<VisualStudioProject
|
||||
ProjectType="Visual C++"
|
||||
Version="9,00"
|
||||
Name="gdk-pixbuf-csource"
|
||||
ProjectGUID="{FC5AADB5-95CD-4BF0-BA8B-0C16FE7073F8}"
|
||||
RootNamespace="gdkpixbufcsource"
|
||||
Keyword="Win32Proj"
|
||||
TargetFrameworkVersion="131072"
|
||||
>
|
||||
<Platforms>
|
||||
<Platform
|
||||
Name="Win32"
|
||||
/>
|
||||
<Platform
|
||||
Name="x64"
|
||||
/>
|
||||
</Platforms>
|
||||
<ToolFiles>
|
||||
</ToolFiles>
|
||||
<Configurations>
|
||||
<Configuration
|
||||
Name="Debug|Win32"
|
||||
ConfigurationType="1"
|
||||
InheritedPropertySheets=".\gtk+.vsprops"
|
||||
CharacterSet="2"
|
||||
>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
PreprocessorDefinitions="_CRT_NONSTDC_NO_WARNINGS;_CRT_SECURE_NO_WARNINGS"
|
||||
MinimalRebuild="true"
|
||||
BasicRuntimeChecks="3"
|
||||
RuntimeLibrary="2"
|
||||
UsePrecompiledHeader="0"
|
||||
WarningLevel="3"
|
||||
DebugInformationFormat="4"
|
||||
CompileAs="1"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
LinkIncremental="2"
|
||||
GenerateDebugInformation="true"
|
||||
SubSystem="1"
|
||||
RandomizedBaseAddress="1"
|
||||
DataExecutionPrevention="0"
|
||||
TargetMachine="1"
|
||||
/>
|
||||
</Configuration>
|
||||
<Configuration
|
||||
Name="Debug|x64"
|
||||
ConfigurationType="1"
|
||||
InheritedPropertySheets=".\gtk+.vsprops"
|
||||
CharacterSet="2"
|
||||
>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
PreprocessorDefinitions="_CRT_NONSTDC_NO_WARNINGS;_CRT_SECURE_NO_WARNINGS"
|
||||
MinimalRebuild="true"
|
||||
BasicRuntimeChecks="3"
|
||||
RuntimeLibrary="3"
|
||||
UsePrecompiledHeader="0"
|
||||
WarningLevel="3"
|
||||
DebugInformationFormat="3"
|
||||
CompileAs="1"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
LinkIncremental="2"
|
||||
GenerateDebugInformation="true"
|
||||
SubSystem="2"
|
||||
RandomizedBaseAddress="1"
|
||||
DataExecutionPrevention="0"
|
||||
TargetMachine="17"
|
||||
/>
|
||||
</Configuration>
|
||||
<Configuration
|
||||
Name="Release|Win32"
|
||||
ConfigurationType="1"
|
||||
InheritedPropertySheets=".\gtk+.vsprops"
|
||||
CharacterSet="2"
|
||||
WholeProgramOptimization="1"
|
||||
>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
PreprocessorDefinitions="_CRT_NONSTDC_NO_WARNINGS;_CRT_SECURE_NO_WARNINGS"
|
||||
RuntimeLibrary="2"
|
||||
UsePrecompiledHeader="0"
|
||||
WarningLevel="3"
|
||||
DebugInformationFormat="3"
|
||||
CompileAs="1"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
LinkIncremental="1"
|
||||
GenerateDebugInformation="true"
|
||||
SubSystem="2"
|
||||
OptimizeReferences="2"
|
||||
EnableCOMDATFolding="2"
|
||||
RandomizedBaseAddress="1"
|
||||
DataExecutionPrevention="0"
|
||||
TargetMachine="1"
|
||||
/>
|
||||
</Configuration>
|
||||
<Configuration
|
||||
Name="Release|x64"
|
||||
ConfigurationType="1"
|
||||
InheritedPropertySheets=".\gtk+.vsprops"
|
||||
CharacterSet="2"
|
||||
WholeProgramOptimization="1"
|
||||
>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
PreprocessorDefinitions="_CRT_NONSTDC_NO_WARNINGS;_CRT_SECURE_NO_WARNINGS"
|
||||
RuntimeLibrary="2"
|
||||
UsePrecompiledHeader="0"
|
||||
WarningLevel="3"
|
||||
DebugInformationFormat="3"
|
||||
CompileAs="1"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
LinkIncremental="1"
|
||||
GenerateDebugInformation="true"
|
||||
SubSystem="2"
|
||||
OptimizeReferences="2"
|
||||
EnableCOMDATFolding="2"
|
||||
RandomizedBaseAddress="1"
|
||||
DataExecutionPrevention="0"
|
||||
TargetMachine="17"
|
||||
/>
|
||||
</Configuration>
|
||||
</Configurations>
|
||||
<References>
|
||||
</References>
|
||||
<Files>
|
||||
<Filter
|
||||
Name="Source Files"
|
||||
Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
|
||||
UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
|
||||
>
|
||||
<File RelativePath="..\..\..\gdk-pixbuf\gdk-pixbuf-csource.c" />
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="Header Files"
|
||||
Filter="h;hpp;hxx;hm;inl;inc;xsd"
|
||||
UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
|
||||
>
|
||||
</Filter>
|
||||
</Files>
|
||||
<Globals>
|
||||
</Globals>
|
||||
</VisualStudioProject>
|
||||
166
build/win32/vs9/gdk-pixbuf-query-loaders.vcproj
Normal file
166
build/win32/vs9/gdk-pixbuf-query-loaders.vcproj
Normal file
@@ -0,0 +1,166 @@
|
||||
<?xml version="1.0" encoding="Windows-1252"?>
|
||||
<VisualStudioProject
|
||||
ProjectType="Visual C++"
|
||||
Version="9.00"
|
||||
Name="gdk-pixbuf-query-loaders"
|
||||
ProjectGUID="{FC5AADB5-95CD-4BF0-BA8B-0C16FE7073F9}"
|
||||
RootNamespace="gdkpixbufqueryloaders"
|
||||
Keyword="Win32Proj"
|
||||
TargetFrameworkVersion="131072"
|
||||
>
|
||||
<Platforms>
|
||||
<Platform
|
||||
Name="Win32"
|
||||
/>
|
||||
<Platform
|
||||
Name="x64"
|
||||
/>
|
||||
</Platforms>
|
||||
<ToolFiles>
|
||||
</ToolFiles>
|
||||
<Configurations>
|
||||
<Configuration
|
||||
Name="Debug|Win32"
|
||||
ConfigurationType="1"
|
||||
InheritedPropertySheets=".\gtk+.vsprops"
|
||||
CharacterSet="2"
|
||||
>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
PreprocessorDefinitions="_DEBUG;GDK_PIXBUF_COMPILATION;GDK_PIXBUF_ENABLE_BACKEND;$(GtkPrefixDefine);$(GdkPixbufLibdirDefine)"
|
||||
MinimalRebuild="true"
|
||||
BasicRuntimeChecks="3"
|
||||
RuntimeLibrary="2"
|
||||
UsePrecompiledHeader="0"
|
||||
WarningLevel="3"
|
||||
DebugInformationFormat="4"
|
||||
CompileAs="1"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
LinkIncremental="2"
|
||||
GenerateDebugInformation="true"
|
||||
SubSystem="1"
|
||||
RandomizedBaseAddress="1"
|
||||
DataExecutionPrevention="0"
|
||||
TargetMachine="1"
|
||||
/>
|
||||
</Configuration>
|
||||
<Configuration
|
||||
Name="Debug|x64"
|
||||
ConfigurationType="1"
|
||||
InheritedPropertySheets=".\gtk+.vsprops"
|
||||
CharacterSet="2"
|
||||
>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
PreprocessorDefinitions="_DEBUG;GDK_PIXBUF_COMPILATION;GDK_PIXBUF_ENABLE_BACKEND"
|
||||
MinimalRebuild="true"
|
||||
BasicRuntimeChecks="3"
|
||||
RuntimeLibrary="3"
|
||||
UsePrecompiledHeader="0"
|
||||
WarningLevel="3"
|
||||
DebugInformationFormat="3"
|
||||
CompileAs="1"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
LinkIncremental="2"
|
||||
GenerateDebugInformation="true"
|
||||
SubSystem="2"
|
||||
RandomizedBaseAddress="1"
|
||||
DataExecutionPrevention="0"
|
||||
TargetMachine="17"
|
||||
/>
|
||||
</Configuration>
|
||||
<Configuration
|
||||
Name="Release|Win32"
|
||||
ConfigurationType="1"
|
||||
InheritedPropertySheets=".\gtk+.vsprops"
|
||||
CharacterSet="2"
|
||||
WholeProgramOptimization="1"
|
||||
>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
PreprocessorDefinitions="GDK_PIXBUF_COMPILATION;GDK_PIXBUF_ENABLE_BACKEND"
|
||||
RuntimeLibrary="2"
|
||||
UsePrecompiledHeader="0"
|
||||
WarningLevel="3"
|
||||
DebugInformationFormat="3"
|
||||
CompileAs="1"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
LinkIncremental="1"
|
||||
GenerateDebugInformation="true"
|
||||
SubSystem="2"
|
||||
OptimizeReferences="2"
|
||||
EnableCOMDATFolding="2"
|
||||
RandomizedBaseAddress="1"
|
||||
DataExecutionPrevention="0"
|
||||
TargetMachine="1"
|
||||
/>
|
||||
</Configuration>
|
||||
<Configuration
|
||||
Name="Release|x64"
|
||||
ConfigurationType="1"
|
||||
InheritedPropertySheets=".\gtk+.vsprops"
|
||||
CharacterSet="2"
|
||||
WholeProgramOptimization="1"
|
||||
>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
PreprocessorDefinitions="GDK_PIXBUF_COMPILATION;GDK_PIXBUF_ENABLE_BACKEND"
|
||||
RuntimeLibrary="2"
|
||||
UsePrecompiledHeader="0"
|
||||
WarningLevel="3"
|
||||
DebugInformationFormat="3"
|
||||
CompileAs="1"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
LinkIncremental="1"
|
||||
GenerateDebugInformation="true"
|
||||
SubSystem="2"
|
||||
OptimizeReferences="2"
|
||||
EnableCOMDATFolding="2"
|
||||
RandomizedBaseAddress="1"
|
||||
DataExecutionPrevention="0"
|
||||
TargetMachine="17"
|
||||
/>
|
||||
</Configuration>
|
||||
</Configurations>
|
||||
<References>
|
||||
</References>
|
||||
<Files>
|
||||
<Filter
|
||||
Name="Source Files"
|
||||
Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
|
||||
UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
|
||||
>
|
||||
<File RelativePath="..\..\..\gdk-pixbuf\queryloaders.c" />
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="Header Files"
|
||||
Filter="h;hpp;hxx;hm;inl;inc;xsd"
|
||||
UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
|
||||
>
|
||||
</Filter>
|
||||
</Files>
|
||||
<Globals>
|
||||
</Globals>
|
||||
</VisualStudioProject>
|
||||
258
build/win32/vs9/gdk-pixbuf.vcproj
Normal file
258
build/win32/vs9/gdk-pixbuf.vcproj
Normal file
@@ -0,0 +1,258 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<VisualStudioProject
|
||||
ProjectType="Visual C++"
|
||||
Version="9.00"
|
||||
Name="gdk_pixbuf"
|
||||
ProjectGUID="{FC5AADB5-95CD-4BF0-BA8B-0C16FE7073F6}"
|
||||
RootNamespace="gdk_pixbuf"
|
||||
Keyword="Win32Proj"
|
||||
TargetFrameworkVersion="0"
|
||||
>
|
||||
<Platforms>
|
||||
<Platform
|
||||
Name="Win32"
|
||||
/>
|
||||
<Platform
|
||||
Name="x64"
|
||||
/>
|
||||
</Platforms>
|
||||
<ToolFiles>
|
||||
</ToolFiles>
|
||||
<Configurations>
|
||||
<Configuration
|
||||
Name="Debug|Win32"
|
||||
InheritedPropertySheets=".\gtk+.vsprops"
|
||||
ConfigurationType="2"
|
||||
CharacterSet="2"
|
||||
>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
PreprocessorDefinitions="_DEBUG;$(GdkPixbufDefines)"
|
||||
MinimalRebuild="true"
|
||||
BasicRuntimeChecks="3"
|
||||
RuntimeLibrary="2"
|
||||
UsePrecompiledHeader="0"
|
||||
WarningLevel="3"
|
||||
DebugInformationFormat="4"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalDependencies="libpng.lib"
|
||||
OutputFile="$(OutDir)\$(GtkDllPrefix)$(ProjectName)$(GtkDllSuffix).dll"
|
||||
LinkIncremental="2"
|
||||
ModuleDefinitionFile="$(IntDir)\gdk-pixbuf.def"
|
||||
GenerateDebugInformation="true"
|
||||
SubSystem="2"
|
||||
ImportLibrary="$(TargetDir)$(ProjectName)-$(GtkApiVersion).lib"
|
||||
TargetMachine="1"
|
||||
/>
|
||||
</Configuration>
|
||||
<Configuration
|
||||
Name="Release|Win32"
|
||||
InheritedPropertySheets=".\gtk+.vsprops"
|
||||
ConfigurationType="2"
|
||||
CharacterSet="2"
|
||||
>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
PreprocessorDefinitions="$(GdkPixbufDefines)"
|
||||
RuntimeLibrary="2"
|
||||
UsePrecompiledHeader="0"
|
||||
WarningLevel="3"
|
||||
DebugInformationFormat="3"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManagedResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalDependencies="libpng.lib"
|
||||
OutputFile="$(OutDir)\$(GtkDllPrefix)$(ProjectName)$(GtkDllSuffix).dll"
|
||||
LinkIncremental="2"
|
||||
ModuleDefinitionFile="$(IntDir)\gdk-pixbuf.def"
|
||||
GenerateDebugInformation="true"
|
||||
SubSystem="2"
|
||||
OptimizeReferences="2"
|
||||
EnableCOMDATFolding="2"
|
||||
ImportLibrary="$(TargetDir)$(ProjectName)-$(GtkApiVersion).lib"
|
||||
TargetMachine="1"
|
||||
/>
|
||||
</Configuration>
|
||||
<Configuration
|
||||
Name="Debug|x64"
|
||||
InheritedPropertySheets=".\gtk+.vsprops"
|
||||
ConfigurationType="2"
|
||||
CharacterSet="2"
|
||||
>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
PreprocessorDefinitions="_DEBUG;$(GdkPixbufDefines)"
|
||||
MinimalRebuild="true"
|
||||
BasicRuntimeChecks="3"
|
||||
RuntimeLibrary="3"
|
||||
UsePrecompiledHeader="0"
|
||||
WarningLevel="3"
|
||||
DebugInformationFormat="3"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalDependencies="libpng.lib"
|
||||
OutputFile="$(OutDir)\$(GtkDllPrefix)$(ProjectName)$(GtkDllSuffix).dll"
|
||||
LinkIncremental="2"
|
||||
ModuleDefinitionFile="$(IntDir)\gdk-pixbuf.def"
|
||||
GenerateDebugInformation="true"
|
||||
SubSystem="2"
|
||||
ImportLibrary="$(TargetDir)$(ProjectName)-$(GtkApiVersion).lib"
|
||||
TargetMachine="17"
|
||||
/>
|
||||
</Configuration>
|
||||
<Configuration
|
||||
Name="Release|x64"
|
||||
InheritedPropertySheets=".\gtk+.vsprops"
|
||||
ConfigurationType="2"
|
||||
CharacterSet="2"
|
||||
>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
PreprocessorDefinitions="$(GdkPixbufDefines)"
|
||||
RuntimeLibrary="2"
|
||||
UsePrecompiledHeader="0"
|
||||
WarningLevel="3"
|
||||
DebugInformationFormat="3"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalDependencies="libpng.lib"
|
||||
OutputFile="$(OutDir)\$(GtkDllPrefix)$(ProjectName)$(GtkDllSuffix).dll"
|
||||
LinkIncremental="2"
|
||||
ModuleDefinitionFile="$(IntDir)\gdk-pixbuf.def"
|
||||
GenerateDebugInformation="true"
|
||||
SubSystem="2"
|
||||
OptimizeReferences="2"
|
||||
EnableCOMDATFolding="2"
|
||||
ImportLibrary="$(TargetDir)$(ProjectName)-$(GtkApiVersion).lib"
|
||||
TargetMachine="17"
|
||||
/>
|
||||
</Configuration>
|
||||
</Configurations>
|
||||
<References>
|
||||
</References>
|
||||
<Files>
|
||||
<Filter
|
||||
Name="Header Files"
|
||||
Filter="h;hpp;hxx;hm;inl;inc;xsd"
|
||||
UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
|
||||
>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="Resource Files"
|
||||
Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx"
|
||||
UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"
|
||||
>
|
||||
<File
|
||||
RelativePath="..\..\..\gdk-pixbuf\gdk-pixbuf.symbols"
|
||||
>
|
||||
<FileConfiguration
|
||||
Name="Debug|Win32"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
Description="Generating gdk-pixbuf.def"
|
||||
CommandLine="$(GtkGenerateGdkPixbufDef)"
|
||||
Outputs="$(IntDir)\gdk-pixbuf.def"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="Debug|x64"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
Description="Generating gdk-pixbuf.def"
|
||||
CommandLine="$(GtkGenerateGdkPixbufDef)"
|
||||
Outputs="$(IntDir)\gdk-pixbuf.def"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="Release|Win32"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
Description="Generating gdk-pixbuf.def"
|
||||
CommandLine="$(GtkGenerateGdkPixbufDef)"
|
||||
Outputs="$(IntDir)\gdk-pixbuf.def"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="Release|x64"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
Description="Generating gdk-pixbuf.def"
|
||||
CommandLine="$(GtkGenerateGdkPixbufDef)"
|
||||
Outputs="$(IntDir)\gdk-pixbuf.def"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
</File>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="Source Files"
|
||||
Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
|
||||
UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
|
||||
>
|
||||
<File RelativePath="..\..\..\gdk-pixbuf\gdk-pixbuf.c" />
|
||||
<File RelativePath="..\..\..\gdk-pixbuf\gdk-pixbuf-aliasdef.c" />
|
||||
<File RelativePath="..\..\..\gdk-pixbuf\gdk-pixbuf-animation.c" />
|
||||
<File RelativePath="..\..\..\gdk-pixbuf\gdk-pixbuf-data.c" />
|
||||
<File RelativePath="..\..\..\gdk-pixbuf\gdk-pixbuf-enum-types.c" />
|
||||
<File RelativePath="..\..\..\gdk-pixbuf\gdk-pixbuf-io.c" />
|
||||
<File RelativePath="..\..\..\gdk-pixbuf\gdk-pixbuf-loader.c" />
|
||||
<File RelativePath="..\..\..\gdk-pixbuf\gdk-pixbuf-scale.c" />
|
||||
<File RelativePath="..\..\..\gdk-pixbuf\gdk-pixbuf-scaled-anim.c" />
|
||||
<File RelativePath="..\..\..\gdk-pixbuf\gdk-pixbuf-simple-anim.c" />
|
||||
<File RelativePath="..\..\..\gdk-pixbuf\gdk-pixbuf-util.c" />
|
||||
<File RelativePath="..\..\..\gdk-pixbuf\gdk-pixdata.c" />
|
||||
<File RelativePath="..\..\..\gdk-pixbuf\io-ani.c" />
|
||||
<File RelativePath="..\..\..\gdk-pixbuf\io-ani-animation.c" />
|
||||
<File RelativePath="..\..\..\gdk-pixbuf\io-gdip-utils.c" />
|
||||
<File RelativePath="..\..\..\gdk-pixbuf\io-gdip-animation.c" />
|
||||
<File RelativePath="..\..\..\gdk-pixbuf\io-gdip-bmp.c" />
|
||||
<File RelativePath="..\..\..\gdk-pixbuf\io-gdip-emf.c" />
|
||||
<File RelativePath="..\..\..\gdk-pixbuf\io-gdip-gif.c" />
|
||||
<File RelativePath="..\..\..\gdk-pixbuf\io-gdip-ico.c" />
|
||||
<File RelativePath="..\..\..\gdk-pixbuf\io-gdip-jpeg.c" />
|
||||
<File RelativePath="..\..\..\gdk-pixbuf\io-gdip-tiff.c" />
|
||||
<File RelativePath="..\..\..\gdk-pixbuf\io-gdip-wmf.c" />
|
||||
<File RelativePath="..\..\..\gdk-pixbuf\io-gif-animation.c" />
|
||||
<File RelativePath="..\..\..\gdk-pixbuf\io-icns.c" />
|
||||
<File RelativePath="..\..\..\gdk-pixbuf\io-pcx.c" />
|
||||
<File RelativePath="..\..\..\gdk-pixbuf\io-png.c" />
|
||||
<File RelativePath="..\..\..\gdk-pixbuf\io-pnm.c" />
|
||||
<File RelativePath="..\..\..\gdk-pixbuf\io-ras.c" />
|
||||
<File RelativePath="..\..\..\gdk-pixbuf\io-tga.c" />
|
||||
<File RelativePath="..\..\..\gdk-pixbuf\io-wbmp.c" />
|
||||
<File RelativePath="..\..\..\gdk-pixbuf\io-xbm.c" />
|
||||
<File RelativePath="..\..\..\gdk-pixbuf\io-xpm.c" />
|
||||
<File RelativePath="..\..\..\gdk-pixbuf\pixops\pixops.c" />
|
||||
</Filter>
|
||||
</Files>
|
||||
</VisualStudioProject>
|
||||
@@ -1,25 +1,43 @@
|
||||
Microsoft Visual Studio Solution File, Format Version 10.00
|
||||
# Visual Studio 2008
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "gdk-pixbuf", "gdk-pixbuf.vcproj", "{FC5AADB5-95CD-4BF0-BA8B-0C16FE7073F6}"
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "gdk-pixbuf-csource", "gdk-pixbuf-csource.vcproj", "{FC5AADB5-95CD-4BF0-BA8B-0C16FE7073F8}"
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
{FC5AADB5-95CD-4BF0-BA8B-0C16FE7073F6} = {FC5AADB5-95CD-4BF0-BA8B-0C16FE7073F6}
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "gdk-pixbuf-query-loaders", "gdk-pixbuf-query-loaders.vcproj", "{FC5AADB5-95CD-4BF0-BA8B-0C16FE7073F9}"
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
{FC5AADB5-95CD-4BF0-BA8B-0C16FE7073F6} = {FC5AADB5-95CD-4BF0-BA8B-0C16FE7073F6}
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "gdk-win32", "gdk-win32.vcproj", "{FC5AADB5-95CD-4BF0-BA8B-0C16FE7073FA}"
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "gdk", "gdk.vcproj", "{FC5AADB5-95CD-4BF0-BA8B-0C16FE7073F7}"
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
{FC5AADB5-95CD-4BF0-BA8B-0C16FE7073F6} = {FC5AADB5-95CD-4BF0-BA8B-0C16FE7073F6}
|
||||
{FC5AADB5-95CD-4BF0-BA8B-0C16FE7073FA} = {FC5AADB5-95CD-4BF0-BA8B-0C16FE7073FA}
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "gtk", "gtk.vcproj", "{FC5AADB5-95CD-4BF0-BA8B-0C16FE7073F5}"
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
{FC5AADB5-95CD-4BF0-BA8B-0C16FE7073F6} = {FC5AADB5-95CD-4BF0-BA8B-0C16FE7073F6}
|
||||
{FC5AADB5-95CD-4BF0-BA8B-0C16FE7073F7} = {FC5AADB5-95CD-4BF0-BA8B-0C16FE7073F7}
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "gtk-demo", "gtk-demo.vcproj", "{FC5AADB5-95CD-4BF0-BA8B-0C16FE7073FC}"
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
{FC5AADB5-95CD-4BF0-BA8B-0C16FE7073F6} = {FC5AADB5-95CD-4BF0-BA8B-0C16FE7073F6}
|
||||
{FC5AADB5-95CD-4BF0-BA8B-0C16FE7073F7} = {FC5AADB5-95CD-4BF0-BA8B-0C16FE7073F7}
|
||||
{FC5AADB5-95CD-4BF0-BA8B-0C16FE7073F5} = {FC5AADB5-95CD-4BF0-BA8B-0C16FE7073F5}
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "install", "install.vcproj", "{FC5AADB5-95CD-4BF0-BA8B-0C16FE7073FB}"
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
{FC5AADB5-95CD-4BF0-BA8B-0C16FE7073F6} = {FC5AADB5-95CD-4BF0-BA8B-0C16FE7073F6}
|
||||
{FC5AADB5-95CD-4BF0-BA8B-0C16FE7073F8} = {FC5AADB5-95CD-4BF0-BA8B-0C16FE7073F8}
|
||||
{FC5AADB5-95CD-4BF0-BA8B-0C16FE7073F9} = {FC5AADB5-95CD-4BF0-BA8B-0C16FE7073F9}
|
||||
{FC5AADB5-95CD-4BF0-BA8B-0C16FE7073F7} = {FC5AADB5-95CD-4BF0-BA8B-0C16FE7073F7}
|
||||
{FC5AADB5-95CD-4BF0-BA8B-0C16FE7073F5} = {FC5AADB5-95CD-4BF0-BA8B-0C16FE7073F5}
|
||||
{FC5AADB5-95CD-4BF0-BA8B-0C16FE7073FC} = {FC5AADB5-95CD-4BF0-BA8B-0C16FE7073FC}
|
||||
@@ -33,6 +51,30 @@ Global
|
||||
Release|x64 = Release|x64
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{FC5AADB5-95CD-4BF0-BA8B-0C16FE7073F6}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{FC5AADB5-95CD-4BF0-BA8B-0C16FE7073F6}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{FC5AADB5-95CD-4BF0-BA8B-0C16FE7073F6}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{FC5AADB5-95CD-4BF0-BA8B-0C16FE7073F6}.Debug|x64.Build.0 = Debug|x64
|
||||
{FC5AADB5-95CD-4BF0-BA8B-0C16FE7073F6}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{FC5AADB5-95CD-4BF0-BA8B-0C16FE7073F6}.Release|Win32.Build.0 = Release|Win32
|
||||
{FC5AADB5-95CD-4BF0-BA8B-0C16FE7073F6}.Release|x64.ActiveCfg = Release|x64
|
||||
{FC5AADB5-95CD-4BF0-BA8B-0C16FE7073F6}.Release|x64.Build.0 = Release|x64
|
||||
{FC5AADB5-95CD-4BF0-BA8B-0C16FE7073F8}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{FC5AADB5-95CD-4BF0-BA8B-0C16FE7073F8}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{FC5AADB5-95CD-4BF0-BA8B-0C16FE7073F8}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{FC5AADB5-95CD-4BF0-BA8B-0C16FE7073F8}.Debug|x64.Build.0 = Debug|x64
|
||||
{FC5AADB5-95CD-4BF0-BA8B-0C16FE7073F8}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{FC5AADB5-95CD-4BF0-BA8B-0C16FE7073F8}.Release|Win32.Build.0 = Release|Win32
|
||||
{FC5AADB5-95CD-4BF0-BA8B-0C16FE7073F8}.Release|x64.ActiveCfg = Release|x64
|
||||
{FC5AADB5-95CD-4BF0-BA8B-0C16FE7073F8}.Release|x64.Build.0 = Release|x64
|
||||
{FC5AADB5-95CD-4BF0-BA8B-0C16FE7073F9}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{FC5AADB5-95CD-4BF0-BA8B-0C16FE7073F9}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{FC5AADB5-95CD-4BF0-BA8B-0C16FE7073F9}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{FC5AADB5-95CD-4BF0-BA8B-0C16FE7073F9}.Debug|x64.Build.0 = Debug|x64
|
||||
{FC5AADB5-95CD-4BF0-BA8B-0C16FE7073F9}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{FC5AADB5-95CD-4BF0-BA8B-0C16FE7073F9}.Release|Win32.Build.0 = Release|Win32
|
||||
{FC5AADB5-95CD-4BF0-BA8B-0C16FE7073F9}.Release|x64.ActiveCfg = Release|x64
|
||||
{FC5AADB5-95CD-4BF0-BA8B-0C16FE7073F9}.Release|x64.Build.0 = Release|x64
|
||||
{FC5AADB5-95CD-4BF0-BA8B-0C16FE7073F7}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{FC5AADB5-95CD-4BF0-BA8B-0C16FE7073F7}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{FC5AADB5-95CD-4BF0-BA8B-0C16FE7073F7}.Debug|x64.ActiveCfg = Debug|x64
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
AdditionalIncludeDirectories="..\..\..;$(GlibEtcInstallRoot)\lib\glib-2.0\include;$(GlibEtcInstallRoot)\include\glib-2.0;$(GlibEtcInstallRoot)\include;$(GlibEtcInstallRoot)\include\cairo;$(GlibEtcInstallRoot)\include\atk-1.0;$(GlibEtcInstallRoot)\include\pango-1.0"
|
||||
AdditionalIncludeDirectories="..\..\..;$(GlibEtcInstallRoot)\lib\glib-2.0\include;$(GlibEtcInstallRoot)\include\glib-2.0;$(GlibEtcInstallRoot)\include;$(GlibEtcInstallRoot)\include\cairo;$(GlibEtcInstallRoot)\include\atk-1.0;$(GlibEtcInstallRoot)\include\pango-1.0;$(GlibEtcInstallRoot)\include\GdkPixbuf-2.0"
|
||||
PreprocessorDefinitions="HAVE_CONFIG_H;G_DISABLE_DEPRECATED;G_DISABLE_SINGLE_INCLUDES;ATK_DISABLE_SINGLE_INCLUDES;GDK_PIXBUF_DISABLE_SINGLE_INCLUDES;GTK_DISABLE_SINGLE_INCLUDES"
|
||||
ForcedIncludeFiles="msvc_recommended_pragmas.h"
|
||||
/>
|
||||
@@ -31,7 +31,7 @@ copy ..\..\..\gdk\gdkconfig.h.win32 ..\..\..\gdk\gdkconfig.h

|
||||
/>
|
||||
<UserMacro
|
||||
Name="GtkApiVersion"
|
||||
Value="3.0"
|
||||
Value="2.0"
|
||||
/>
|
||||
<UserMacro
|
||||
Name="GtkBinaryVersion"
|
||||
@@ -63,15 +63,16 @@ copy ..\..\..\gdk\gdkconfig.h.win32 ..\..\..\gdk\gdkconfig.h

|
||||
echo on

|
||||
mkdir $(OutDir)\bin

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

|
||||
copy $(ConfigurationName)\$(PlatformName)\bin\gtk-update-icon-cache.exe $(OutDir)\bin

|
||||
|
||||
mkdir $(OutDir)\bin\gtk3-demo

|
||||
copy $(ConfigurationName)\$(PlatformName)\bin\*.exe $(OutDir)\bin\gtk3-demo

|
||||
copy ..\..\..\demos\gtk-demo\*.c $(OutDir)\bin\gtk3-demo

|
||||
copy ..\..\..\demos\gtk-demo\*.h $(OutDir)\bin\gtk3-demo

|
||||
copy ..\..\..\demos\gtk-demo\*.ui $(OutDir)\bin\gtk3-demo

|
||||
copy ..\..\..\demos\gtk-demo\*.jpg $(OutDir)\bin\gtk3-demo

|
||||
copy ..\..\..\demos\gtk-demo\*.png $(OutDir)\bin\gtk3-demo

|
||||
copy ..\..\..\demos\gtk-demo\*.gif $(OutDir)\bin\gtk3-demo

|
||||
mkdir $(OutDir)\bin\gtk-demo

|
||||
copy $(ConfigurationName)\$(PlatformName)\bin\gtk-demo.exe $(OutDir)\bin\gtk-demo

|
||||
copy ..\..\..\demos\gtk-demo\*.c $(OutDir)\bin\gtk-demo

|
||||
copy ..\..\..\demos\gtk-demo\*.h $(OutDir)\bin\gtk-demo

|
||||
copy ..\..\..\demos\gtk-demo\*.gif $(OutDir)\bin\gtk-demo

|
||||
copy ..\..\..\demos\gtk-demo\*.jpg $(OutDir)\bin\gtk-demo

|
||||
copy ..\..\..\demos\gtk-demo\*.png $(OutDir)\bin\gtk-demo

|
||||
copy ..\..\..\demos\gtk-demo\*.ui $(OutDir)\bin\gtk-demo

|
||||
|
||||
mkdir $(OutDir)\lib

|
||||
copy $(ConfigurationName)\$(PlatformName)\bin\*-$(GtkApiVersion).lib $(OutDir)\lib

|
||||
@@ -82,29 +83,31 @@ copy ..\..\..\gdk\gdkapplaunchcontext.h $(OutDir)\include\gtk-$(GtkApiVersion)\g
|
||||
copy ..\..\..\gdk\gdkcairo.h $(OutDir)\include\gtk-$(GtkApiVersion)\gdk

|
||||
copy ..\..\..\gdk\gdkcolor.h $(OutDir)\include\gtk-$(GtkApiVersion)\gdk

|
||||
copy ..\..\..\gdk\gdkcursor.h $(OutDir)\include\gtk-$(GtkApiVersion)\gdk

|
||||
copy ..\..\..\gdk\gdkdevice.h $(OutDir)\include\gtk-$(GtkApiVersion)\gdk

|
||||
copy ..\..\..\gdk\gdkdevicemanager.h $(OutDir)\include\gtk-$(GtkApiVersion)\gdk

|
||||
copy ..\..\..\gdk\gdkdisplay.h $(OutDir)\include\gtk-$(GtkApiVersion)\gdk

|
||||
copy ..\..\..\gdk\gdkdisplaymanager.h $(OutDir)\include\gtk-$(GtkApiVersion)\gdk

|
||||
copy ..\..\..\gdk\gdkdnd.h $(OutDir)\include\gtk-$(GtkApiVersion)\gdk

|
||||
copy ..\..\..\gdk\gdkdrawable.h $(OutDir)\include\gtk-$(GtkApiVersion)\gdk

|
||||
copy ..\..\..\gdk\gdkenumtypes.h $(OutDir)\include\gtk-$(GtkApiVersion)\gdk

|
||||
copy ..\..\..\gdk\gdkevents.h $(OutDir)\include\gtk-$(GtkApiVersion)\gdk

|
||||
copy ..\..\..\gdk\gdkfont.h $(OutDir)\include\gtk-$(GtkApiVersion)\gdk

|
||||
copy ..\..\..\gdk\gdkgc.h $(OutDir)\include\gtk-$(GtkApiVersion)\gdk

|
||||
copy ..\..\..\gdk\gdki18n.h $(OutDir)\include\gtk-$(GtkApiVersion)\gdk

|
||||
copy ..\..\..\gdk\gdkimage.h $(OutDir)\include\gtk-$(GtkApiVersion)\gdk

|
||||
copy ..\..\..\gdk\gdkinput.h $(OutDir)\include\gtk-$(GtkApiVersion)\gdk

|
||||
copy ..\..\..\gdk\gdkkeys.h $(OutDir)\include\gtk-$(GtkApiVersion)\gdk

|
||||
copy ..\..\..\gdk\gdkkeysyms.h $(OutDir)\include\gtk-$(GtkApiVersion)\gdk

|
||||
copy ..\..\..\gdk\gdkmain.h $(OutDir)\include\gtk-$(GtkApiVersion)\gdk

|
||||
copy ..\..\..\gdk\gdkkeysyms-compat.h $(OutDir)\include\gtk-$(GtkApiVersion)\gdk

|
||||
copy ..\..\..\gdk\gdkpango.h $(OutDir)\include\gtk-$(GtkApiVersion)\gdk

|
||||
copy ..\..\..\gdk\gdkpixbuf.h $(OutDir)\include\gtk-$(GtkApiVersion)\gdk

|
||||
copy ..\..\..\gdk\gdkpixmap.h $(OutDir)\include\gtk-$(GtkApiVersion)\gdk

|
||||
copy ..\..\..\gdk\gdkprivate.h $(OutDir)\include\gtk-$(GtkApiVersion)\gdk

|
||||
copy ..\..\..\gdk\gdkproperty.h $(OutDir)\include\gtk-$(GtkApiVersion)\gdk

|
||||
copy ..\..\..\gdk\gdkrectangle.h $(OutDir)\include\gtk-$(GtkApiVersion)\gdk

|
||||
copy ..\..\..\gdk\gdkrgba.h $(OutDir)\include\gtk-$(GtkApiVersion)\gdk

|
||||
copy ..\..\..\gdk\gdkregion.h $(OutDir)\include\gtk-$(GtkApiVersion)\gdk

|
||||
copy ..\..\..\gdk\gdkrgb.h $(OutDir)\include\gtk-$(GtkApiVersion)\gdk

|
||||
copy ..\..\..\gdk\gdkscreen.h $(OutDir)\include\gtk-$(GtkApiVersion)\gdk

|
||||
copy ..\..\..\gdk\gdkselection.h $(OutDir)\include\gtk-$(GtkApiVersion)\gdk

|
||||
copy ..\..\..\gdk\gdkspawn.h $(OutDir)\include\gtk-$(GtkApiVersion)\gdk

|
||||
copy ..\..\..\gdk\gdktestutils.h $(OutDir)\include\gtk-$(GtkApiVersion)\gdk

|
||||
copy ..\..\..\gdk\gdkthreads.h $(OutDir)\include\gtk-$(GtkApiVersion)\gdk

|
||||
copy ..\..\..\gdk\gdktypes.h $(OutDir)\include\gtk-$(GtkApiVersion)\gdk

|
||||
copy ..\..\..\gdk\gdkvisual.h $(OutDir)\include\gtk-$(GtkApiVersion)\gdk

|
||||
copy ..\..\..\gdk\win32\gdkwin32.h $(OutDir)\include\gtk-$(GtkApiVersion)\gdk

|
||||
@@ -114,7 +117,6 @@ mkdir $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||
copy ..\..\..\gtk\gtk.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||
copy ..\..\..\gtk\gtkaboutdialog.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||
copy ..\..\..\gtk\gtkaccelgroup.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||
copy ..\..\..\gtk\gtkaccelgroupprivate.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||
copy ..\..\..\gtk\gtkaccellabel.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||
copy ..\..\..\gtk\gtkaccelmap.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||
copy ..\..\..\gtk\gtkaccessible.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||
@@ -123,7 +125,6 @@ copy ..\..\..\gtk\gtkactiongroup.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk&#x
|
||||
copy ..\..\..\gtk\gtkactivatable.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||
copy ..\..\..\gtk\gtkadjustment.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||
copy ..\..\..\gtk\gtkalignment.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||
copy ..\..\..\gtk\gtkapplication.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||
copy ..\..\..\gtk\gtkarrow.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||
copy ..\..\..\gtk\gtkaspectframe.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||
copy ..\..\..\gtk\gtkassistant.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||
@@ -150,12 +151,16 @@ copy ..\..\..\gtk\gtkcellview.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk
|
||||
copy ..\..\..\gtk\gtkcheckbutton.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||
copy ..\..\..\gtk\gtkcheckmenuitem.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||
copy ..\..\..\gtk\gtkclipboard.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||
copy ..\..\..\gtk\gtkclist.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||
copy ..\..\..\gtk\gtkcolorbutton.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||
copy ..\..\..\gtk\gtkcolorsel.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||
copy ..\..\..\gtk\gtkcolorseldialog.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||
copy ..\..\..\gtk\gtkcombo.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||
copy ..\..\..\gtk\gtkcombobox.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||
copy ..\..\..\gtk\gtkcomboboxtext.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||
copy ..\..\..\gtk\gtkcomboboxentry.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||
copy ..\..\..\gtk\gtkcontainer.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||
copy ..\..\..\gtk\gtkctree.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||
copy ..\..\..\gtk\gtkcurve.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||
copy ..\..\..\gtk\gtkdebug.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||
copy ..\..\..\gtk\gtkdialog.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||
copy ..\..\..\gtk\gtkdnd.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||
@@ -172,11 +177,13 @@ copy ..\..\..\gtk\gtkfilechooserbutton.h $(OutDir)\include\gtk-$(GtkApiVersion)\
|
||||
copy ..\..\..\gtk\gtkfilechooserdialog.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||
copy ..\..\..\gtk\gtkfilechooserwidget.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||
copy ..\..\..\gtk\gtkfilefilter.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||
copy ..\..\..\gtk\gtkfilesel.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||
copy ..\..\..\gtk\gtkfixed.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||
copy ..\..\..\gtk\gtkfontbutton.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||
copy ..\..\..\gtk\gtkfontsel.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||
copy ..\..\..\gtk\gtkframe.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||
copy ..\..\..\gtk\gtkgrid.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||
copy ..\..\..\gtk\gtkgamma.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||
copy ..\..\..\gtk\gtkgc.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||
copy ..\..\..\gtk\gtkhandlebox.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||
copy ..\..\..\gtk\gtkhbbox.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||
copy ..\..\..\gtk\gtkhbox.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||
@@ -196,12 +203,18 @@ copy ..\..\..\gtk\gtkimcontextsimple.h $(OutDir)\include\gtk-$(GtkApiVersion)\gt
|
||||
copy ..\..\..\gtk\gtkimmodule.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||
copy ..\..\..\gtk\gtkimmulticontext.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||
copy ..\..\..\gtk\gtkinfobar.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||
copy ..\..\..\gtk\gtkinputdialog.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||
copy ..\..\..\gtk\gtkinvisible.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||
copy ..\..\..\gtk\gtkitem.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||
copy ..\..\..\gtk\gtkitemfactory.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||
copy ..\..\..\gtk\gtklabel.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||
copy ..\..\..\gtk\gtklayout.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||
copy ..\..\..\gtk\gtklinkbutton.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||
copy ..\..\..\gtk\gtklist.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||
copy ..\..\..\gtk\gtklistitem.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||
copy ..\..\..\gtk\gtkliststore.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||
copy ..\..\..\gtk\gtkmain.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||
copy ..\..\..\gtk\gtkmarshal.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||
copy ..\..\..\gtk\gtkmenu.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||
copy ..\..\..\gtk\gtkmenubar.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||
copy ..\..\..\gtk\gtkmenuitem.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||
@@ -212,17 +225,23 @@ copy ..\..\..\gtk\gtkmisc.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk
�
|
||||
copy ..\..\..\gtk\gtkmodules.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||
copy ..\..\..\gtk\gtkmountoperation.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||
copy ..\..\..\gtk\gtknotebook.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||
copy ..\..\..\gtk\gtkobject.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||
copy ..\..\..\gtk\gtkoffscreenwindow.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||
copy ..\..\..\gtk\gtkoldeditable.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||
copy ..\..\..\gtk\gtkoptionmenu.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||
copy ..\..\..\gtk\gtkorientable.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||
copy ..\..\..\gtk\gtkpagesetup.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||
copy ..\..\..\gtk\gtkpaned.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||
copy ..\..\..\gtk\gtkpapersize.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||
copy ..\..\..\gtk\gtkpixmap.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||
copy ..\..\..\gtk\gtkplug.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||
copy ..\..\..\gtk\gtkpreview.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||
copy ..\..\..\gtk\gtkprintcontext.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||
copy ..\..\..\gtk\gtkprintoperation.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||
copy ..\..\..\gtk\gtkprintoperationpreview.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||
copy ..\..\..\gtk\gtkprintsettings.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||
copy ..\..\..\gtk\gtkprivate.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||
copy ..\..\..\gtk\gtkprogress.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||
copy ..\..\..\gtk\gtkprogressbar.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||
copy ..\..\..\gtk\gtkradioaction.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||
copy ..\..\..\gtk\gtkradiobutton.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||
@@ -240,7 +259,6 @@ copy ..\..\..\gtk\gtkrecentmanager.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk&
|
||||
copy ..\..\..\gtk\gtkruler.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||
copy ..\..\..\gtk\gtkscale.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||
copy ..\..\..\gtk\gtkscalebutton.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||
copy ..\..\..\gtk\gtkscrollable.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||
copy ..\..\..\gtk\gtkscrollbar.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||
copy ..\..\..\gtk\gtkscrolledwindow.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||
copy ..\..\..\gtk\gtkselection.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||
@@ -249,11 +267,11 @@ copy ..\..\..\gtk\gtkseparatormenuitem.h $(OutDir)\include\gtk-$(GtkApiVersion)\
|
||||
copy ..\..\..\gtk\gtkseparatortoolitem.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||
copy ..\..\..\gtk\gtksettings.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||
copy ..\..\..\gtk\gtkshow.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||
copy ..\..\..\gtk\gtksignal.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||
copy ..\..\..\gtk\gtksizegroup.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||
copy ..\..\..\gtk\gtksizerequest.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||
copy ..\..\..\gtk\gtksocket.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||
copy ..\..\..\gtk\gtkspinbutton.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||
copy ..\..\..\gtk\gtkspinner.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||
copy ..\..\..\gtk\gtkspinbutton.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||
copy ..\..\..\gtk\gtkstatusbar.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||
copy ..\..\..\gtk\gtkstatusicon.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||
copy ..\..\..\gtk\gtkstock.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||
@@ -261,6 +279,7 @@ copy ..\..\..\gtk\gtkstyle.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk
&#x
|
||||
copy ..\..\..\gtk\gtktable.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||
copy ..\..\..\gtk\gtktearoffmenuitem.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||
copy ..\..\..\gtk\gtktestutils.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||
copy ..\..\..\gtk\gtktext.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||
copy ..\..\..\gtk\gtktextbuffer.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||
copy ..\..\..\gtk\gtktextbufferrichtext.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||
copy ..\..\..\gtk\gtktextchild.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||
@@ -271,6 +290,7 @@ copy ..\..\..\gtk\gtktextmark.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk
|
||||
copy ..\..\..\gtk\gtktexttag.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||
copy ..\..\..\gtk\gtktexttagtable.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||
copy ..\..\..\gtk\gtktextview.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||
copy ..\..\..\gtk\gtktipsquery.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||
copy ..\..\..\gtk\gtktoggleaction.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||
copy ..\..\..\gtk\gtktogglebutton.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||
copy ..\..\..\gtk\gtktoggletoolbutton.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||
@@ -281,7 +301,10 @@ copy ..\..\..\gtk\gtktoolitemgroup.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk&
|
||||
copy ..\..\..\gtk\gtktoolpalette.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||
copy ..\..\..\gtk\gtktoolshell.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||
copy ..\..\..\gtk\gtktooltip.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||
copy ..\..\..\gtk\gtktooltips.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||
copy ..\..\..\gtk\gtktree.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||
copy ..\..\..\gtk\gtktreednd.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||
copy ..\..\..\gtk\gtktreeitem.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||
copy ..\..\..\gtk\gtktreemodel.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||
copy ..\..\..\gtk\gtktreemodelfilter.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||
copy ..\..\..\gtk\gtktreemodelsort.h $(OutDir)\include\gtk-$(GtkApiVersion)\gtk

|
||||
@@ -334,17 +357,17 @@ copy $(ConfigurationName)\$(PlatformName)\bin\*-$(GtkApiVersion).lib $(OutDir)\l
|
||||
/>
|
||||
<UserMacro
|
||||
Name="GtkSeparateVS9DllSuffix"
|
||||
Value="-3-vs9"
|
||||
Value="-2-vs9"
|
||||
/>
|
||||
<!-- Change these two to GtkLibtoolCompatibleDllPrefix and
|
||||
GtkLibtoolCompatibleDllSuffix if that is what you want -->
|
||||
<UserMacro
|
||||
Name="GtkDllPrefix"
|
||||
Value="$(GtkSeparateVS9DllPrefix)"
|
||||
Value="$(GtkLibtoolCompatibleDllPrefix)"
|
||||
/>
|
||||
<UserMacro
|
||||
Name="GtkDllSuffix"
|
||||
Value="$(GtkSeparateVS9DllSuffix)"
|
||||
Value="$(GtkLibtoolCompatibleDllSuffix)"
|
||||
/>
|
||||
<UserMacro
|
||||
Name="GlibEtcInstallRoot"
|
||||
|
||||
@@ -208,7 +208,6 @@
|
||||
/>
|
||||
</FileConfiguration>
|
||||
</File>
|
||||
<File RelativePath="..\..\..\gtk\gtk-win32.rc" />
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="Source Files"
|
||||
|
||||
25
configure.ac
25
configure.ac
@@ -1,4 +1,14 @@
|
||||
# Process this file with autoconf to produce a configure script.
|
||||
# require autoconf 2.54
|
||||
AC_PREREQ([2.62])
|
||||
|
||||
AC_INIT([gtk+], [gtk_version],
|
||||
[http://bugzilla.gnome.org/enter_bug.cgi?product=gtk%2B],
|
||||
[gtk+])
|
||||
|
||||
AC_CONFIG_HEADER([config.h])
|
||||
AC_CONFIG_SRCDIR([gdk/gdktypes.h])
|
||||
AC_CONFIG_MACRO_DIR([m4])
|
||||
|
||||
# Making releases:
|
||||
# GTK_MICRO_VERSION += 1;
|
||||
@@ -10,7 +20,7 @@
|
||||
|
||||
m4_define([gtk_major_version], [2])
|
||||
m4_define([gtk_minor_version], [91])
|
||||
m4_define([gtk_micro_version], [6])
|
||||
m4_define([gtk_micro_version], [4])
|
||||
m4_define([gtk_interface_age], [0])
|
||||
m4_define([gtk_binary_age],
|
||||
[m4_eval(100 * gtk_minor_version + gtk_micro_version)])
|
||||
@@ -19,15 +29,6 @@ m4_define([gtk_version],
|
||||
# This is the X.Y used in -lgtk-FOO-X.Y
|
||||
m4_define([gtk_api_version], [3.0])
|
||||
|
||||
AC_PREREQ([2.64])
|
||||
AC_INIT([gtk+], [gtk_version],
|
||||
[http://bugzilla.gnome.org/enter_bug.cgi?product=gtk%2B],
|
||||
[gtk+])
|
||||
|
||||
AC_CONFIG_HEADER([config.h])
|
||||
AC_CONFIG_SRCDIR([gdk/gdktypes.h])
|
||||
AC_CONFIG_MACRO_DIR([m4])
|
||||
|
||||
# Define a string for the earliest version that this release has
|
||||
# backwards binary compatibility with for all interfaces a module
|
||||
# might. Unless we add module-only API with lower stability
|
||||
@@ -61,8 +62,8 @@ cflags_set=${CFLAGS+set}
|
||||
AM_INIT_AUTOMAKE([1.10 no-define -Wno-portability dist-bzip2])
|
||||
AM_MAINTAINER_MODE([enable])
|
||||
|
||||
# Support silent build rules, requires at least automake-1.11. Disable
|
||||
# by either passing --disable-silent-rules to configure or passing V=1
|
||||
# Support silent build rules, requires at least automake-1.11. Enable
|
||||
# by either passing --enable-silent-rules to configure or passing V=0
|
||||
# to make
|
||||
m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
|
||||
|
||||
|
||||
@@ -437,26 +437,7 @@ do_combobox (GtkWidget *do_widget)
|
||||
|
||||
gtk_container_remove (GTK_CONTAINER (combo), gtk_bin_get_child (GTK_BIN (combo)));
|
||||
gtk_container_add (GTK_CONTAINER (combo), entry);
|
||||
|
||||
/* A combobox with string IDs */
|
||||
frame = gtk_frame_new ("String IDs");
|
||||
gtk_box_pack_start (GTK_BOX (vbox), frame, FALSE, FALSE, 0);
|
||||
|
||||
box = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
|
||||
gtk_container_set_border_width (GTK_CONTAINER (box), 5);
|
||||
gtk_container_add (GTK_CONTAINER (frame), box);
|
||||
|
||||
combo = gtk_combo_box_text_new ();
|
||||
gtk_combo_box_text_append (GTK_COMBO_BOX_TEXT (combo), "never", "Not visible");
|
||||
gtk_combo_box_text_append (GTK_COMBO_BOX_TEXT (combo), "when-active", "Visible when active");
|
||||
gtk_combo_box_text_append (GTK_COMBO_BOX_TEXT (combo), "always", "Always visible");
|
||||
gtk_container_add (GTK_CONTAINER (box), combo);
|
||||
|
||||
entry = gtk_entry_new ();
|
||||
g_object_bind_property (combo, "active-id",
|
||||
entry, "text",
|
||||
G_BINDING_BIDIRECTIONAL);
|
||||
gtk_container_add (GTK_CONTAINER (box), entry);
|
||||
|
||||
}
|
||||
|
||||
if (!gtk_widget_get_visible (window))
|
||||
|
||||
@@ -39,12 +39,8 @@ void gtk_rotated_bin_set_angle (GtkRotatedBin *bin,
|
||||
|
||||
static void gtk_rotated_bin_realize (GtkWidget *widget);
|
||||
static void gtk_rotated_bin_unrealize (GtkWidget *widget);
|
||||
static void gtk_rotated_bin_get_preferred_width (GtkWidget *widget,
|
||||
gint *minimum,
|
||||
gint *natural);
|
||||
static void gtk_rotated_bin_get_preferred_height (GtkWidget *widget,
|
||||
gint *minimum,
|
||||
gint *natural);
|
||||
static void gtk_rotated_bin_size_request (GtkWidget *widget,
|
||||
GtkRequisition *requisition);
|
||||
static void gtk_rotated_bin_size_allocate (GtkWidget *widget,
|
||||
GtkAllocation *allocation);
|
||||
static gboolean gtk_rotated_bin_damage (GtkWidget *widget,
|
||||
@@ -152,8 +148,7 @@ gtk_rotated_bin_class_init (GtkRotatedBinClass *klass)
|
||||
|
||||
widget_class->realize = gtk_rotated_bin_realize;
|
||||
widget_class->unrealize = gtk_rotated_bin_unrealize;
|
||||
widget_class->get_preferred_width = gtk_rotated_bin_get_preferred_width;
|
||||
widget_class->get_preferred_height = gtk_rotated_bin_get_preferred_height;
|
||||
widget_class->size_request = gtk_rotated_bin_size_request;
|
||||
widget_class->size_allocate = gtk_rotated_bin_size_allocate;
|
||||
widget_class->draw = gtk_rotated_bin_draw;
|
||||
|
||||
@@ -409,30 +404,6 @@ gtk_rotated_bin_size_request (GtkWidget *widget,
|
||||
requisition->height = border_width * 2 + h;
|
||||
}
|
||||
|
||||
static void
|
||||
gtk_rotated_bin_get_preferred_width (GtkWidget *widget,
|
||||
gint *minimum,
|
||||
gint *natural)
|
||||
{
|
||||
GtkRequisition requisition;
|
||||
|
||||
gtk_rotated_bin_size_request (widget, &requisition);
|
||||
|
||||
*minimum = *natural = requisition.width;
|
||||
}
|
||||
|
||||
static void
|
||||
gtk_rotated_bin_get_preferred_height (GtkWidget *widget,
|
||||
gint *minimum,
|
||||
gint *natural)
|
||||
{
|
||||
GtkRequisition requisition;
|
||||
|
||||
gtk_rotated_bin_size_request (widget, &requisition);
|
||||
|
||||
*minimum = *natural = requisition.height;
|
||||
}
|
||||
|
||||
static void
|
||||
gtk_rotated_bin_size_allocate (GtkWidget *widget,
|
||||
GtkAllocation *allocation)
|
||||
|
||||
@@ -35,12 +35,8 @@ GtkWidget* gtk_mirror_bin_new (void);
|
||||
|
||||
static void gtk_mirror_bin_realize (GtkWidget *widget);
|
||||
static void gtk_mirror_bin_unrealize (GtkWidget *widget);
|
||||
static void gtk_mirror_bin_get_preferred_width (GtkWidget *widget,
|
||||
gint *minimum,
|
||||
gint *natural);
|
||||
static void gtk_mirror_bin_get_preferred_height (GtkWidget *widget,
|
||||
gint *minimum,
|
||||
gint *natural);
|
||||
static void gtk_mirror_bin_size_request (GtkWidget *widget,
|
||||
GtkRequisition *requisition);
|
||||
static void gtk_mirror_bin_size_allocate (GtkWidget *widget,
|
||||
GtkAllocation *allocation);
|
||||
static gboolean gtk_mirror_bin_damage (GtkWidget *widget,
|
||||
@@ -90,8 +86,7 @@ gtk_mirror_bin_class_init (GtkMirrorBinClass *klass)
|
||||
|
||||
widget_class->realize = gtk_mirror_bin_realize;
|
||||
widget_class->unrealize = gtk_mirror_bin_unrealize;
|
||||
widget_class->get_preferred_width = gtk_mirror_bin_get_preferred_width;
|
||||
widget_class->get_preferred_height = gtk_mirror_bin_get_preferred_height;
|
||||
widget_class->size_request = gtk_mirror_bin_size_request;
|
||||
widget_class->size_allocate = gtk_mirror_bin_size_allocate;
|
||||
widget_class->draw = gtk_mirror_bin_draw;
|
||||
|
||||
@@ -328,30 +323,6 @@ gtk_mirror_bin_size_request (GtkWidget *widget,
|
||||
requisition->height = border_width * 2 + child_requisition.height * 2 + 10;
|
||||
}
|
||||
|
||||
static void
|
||||
gtk_mirror_bin_get_preferred_width (GtkWidget *widget,
|
||||
gint *minimum,
|
||||
gint *natural)
|
||||
{
|
||||
GtkRequisition requisition;
|
||||
|
||||
gtk_mirror_bin_size_request (widget, &requisition);
|
||||
|
||||
*minimum = *natural = requisition.width;
|
||||
}
|
||||
|
||||
static void
|
||||
gtk_mirror_bin_get_preferred_height (GtkWidget *widget,
|
||||
gint *minimum,
|
||||
gint *natural)
|
||||
{
|
||||
GtkRequisition requisition;
|
||||
|
||||
gtk_mirror_bin_size_request (widget, &requisition);
|
||||
|
||||
*minimum = *natural = requisition.width;
|
||||
}
|
||||
|
||||
static void
|
||||
gtk_mirror_bin_size_allocate (GtkWidget *widget,
|
||||
GtkAllocation *allocation)
|
||||
|
||||
@@ -30,99 +30,99 @@ create_tags (GtkTextBuffer *buffer)
|
||||
* new copies of the same tags for every buffer.
|
||||
*
|
||||
* Tags are assigned default priorities in order of addition to the
|
||||
* tag table. That is, tags created later that affect the same text
|
||||
* tag table. That is, tags created later that affect the same text
|
||||
* property affected by an earlier tag will override the earlier
|
||||
* tag. You can modify tag priorities with
|
||||
* gtk_text_tag_set_priority().
|
||||
*/
|
||||
|
||||
gtk_text_buffer_create_tag (buffer, "heading",
|
||||
"weight", PANGO_WEIGHT_BOLD,
|
||||
"size", 15 * PANGO_SCALE,
|
||||
NULL);
|
||||
|
||||
"weight", PANGO_WEIGHT_BOLD,
|
||||
"size", 15 * PANGO_SCALE,
|
||||
NULL);
|
||||
|
||||
gtk_text_buffer_create_tag (buffer, "italic",
|
||||
"style", PANGO_STYLE_ITALIC, NULL);
|
||||
"style", PANGO_STYLE_ITALIC, NULL);
|
||||
|
||||
gtk_text_buffer_create_tag (buffer, "bold",
|
||||
"weight", PANGO_WEIGHT_BOLD, NULL);
|
||||
|
||||
"weight", PANGO_WEIGHT_BOLD, NULL);
|
||||
|
||||
gtk_text_buffer_create_tag (buffer, "big",
|
||||
/* points times the PANGO_SCALE factor */
|
||||
"size", 20 * PANGO_SCALE, NULL);
|
||||
/* points times the PANGO_SCALE factor */
|
||||
"size", 20 * PANGO_SCALE, NULL);
|
||||
|
||||
gtk_text_buffer_create_tag (buffer, "xx-small",
|
||||
"scale", PANGO_SCALE_XX_SMALL, NULL);
|
||||
"scale", PANGO_SCALE_XX_SMALL, NULL);
|
||||
|
||||
gtk_text_buffer_create_tag (buffer, "x-large",
|
||||
"scale", PANGO_SCALE_X_LARGE, NULL);
|
||||
|
||||
"scale", PANGO_SCALE_X_LARGE, NULL);
|
||||
|
||||
gtk_text_buffer_create_tag (buffer, "monospace",
|
||||
"family", "monospace", NULL);
|
||||
|
||||
"family", "monospace", NULL);
|
||||
|
||||
gtk_text_buffer_create_tag (buffer, "blue_foreground",
|
||||
"foreground", "blue", NULL);
|
||||
"foreground", "blue", NULL);
|
||||
|
||||
gtk_text_buffer_create_tag (buffer, "red_background",
|
||||
"background", "red", NULL);
|
||||
"background", "red", NULL);
|
||||
|
||||
gtk_text_buffer_create_tag (buffer, "big_gap_before_line",
|
||||
"pixels_above_lines", 30, NULL);
|
||||
"pixels_above_lines", 30, NULL);
|
||||
|
||||
gtk_text_buffer_create_tag (buffer, "big_gap_after_line",
|
||||
"pixels_below_lines", 30, NULL);
|
||||
"pixels_below_lines", 30, NULL);
|
||||
|
||||
gtk_text_buffer_create_tag (buffer, "double_spaced_line",
|
||||
"pixels_inside_wrap", 10, NULL);
|
||||
"pixels_inside_wrap", 10, NULL);
|
||||
|
||||
gtk_text_buffer_create_tag (buffer, "not_editable",
|
||||
"editable", FALSE, NULL);
|
||||
|
||||
"editable", FALSE, NULL);
|
||||
|
||||
gtk_text_buffer_create_tag (buffer, "word_wrap",
|
||||
"wrap_mode", GTK_WRAP_WORD, NULL);
|
||||
"wrap_mode", GTK_WRAP_WORD, NULL);
|
||||
|
||||
gtk_text_buffer_create_tag (buffer, "char_wrap",
|
||||
"wrap_mode", GTK_WRAP_CHAR, NULL);
|
||||
"wrap_mode", GTK_WRAP_CHAR, NULL);
|
||||
|
||||
gtk_text_buffer_create_tag (buffer, "no_wrap",
|
||||
"wrap_mode", GTK_WRAP_NONE, NULL);
|
||||
|
||||
"wrap_mode", GTK_WRAP_NONE, NULL);
|
||||
|
||||
gtk_text_buffer_create_tag (buffer, "center",
|
||||
"justification", GTK_JUSTIFY_CENTER, NULL);
|
||||
"justification", GTK_JUSTIFY_CENTER, NULL);
|
||||
|
||||
gtk_text_buffer_create_tag (buffer, "right_justify",
|
||||
"justification", GTK_JUSTIFY_RIGHT, NULL);
|
||||
"justification", GTK_JUSTIFY_RIGHT, NULL);
|
||||
|
||||
gtk_text_buffer_create_tag (buffer, "wide_margins",
|
||||
"left_margin", 50, "right_margin", 50,
|
||||
NULL);
|
||||
|
||||
"left_margin", 50, "right_margin", 50,
|
||||
NULL);
|
||||
|
||||
gtk_text_buffer_create_tag (buffer, "strikethrough",
|
||||
"strikethrough", TRUE, NULL);
|
||||
|
||||
"strikethrough", TRUE, NULL);
|
||||
|
||||
gtk_text_buffer_create_tag (buffer, "underline",
|
||||
"underline", PANGO_UNDERLINE_SINGLE, NULL);
|
||||
"underline", PANGO_UNDERLINE_SINGLE, NULL);
|
||||
|
||||
gtk_text_buffer_create_tag (buffer, "double_underline",
|
||||
"underline", PANGO_UNDERLINE_DOUBLE, NULL);
|
||||
"underline", PANGO_UNDERLINE_DOUBLE, NULL);
|
||||
|
||||
gtk_text_buffer_create_tag (buffer, "superscript",
|
||||
"rise", 10 * PANGO_SCALE, /* 10 pixels */
|
||||
"size", 8 * PANGO_SCALE, /* 8 points */
|
||||
NULL);
|
||||
|
||||
"rise", 10 * PANGO_SCALE, /* 10 pixels */
|
||||
"size", 8 * PANGO_SCALE, /* 8 points */
|
||||
NULL);
|
||||
|
||||
gtk_text_buffer_create_tag (buffer, "subscript",
|
||||
"rise", -10 * PANGO_SCALE, /* 10 pixels */
|
||||
"size", 8 * PANGO_SCALE, /* 8 points */
|
||||
NULL);
|
||||
"rise", -10 * PANGO_SCALE, /* 10 pixels */
|
||||
"size", 8 * PANGO_SCALE, /* 8 points */
|
||||
NULL);
|
||||
|
||||
gtk_text_buffer_create_tag (buffer, "rtl_quote",
|
||||
"wrap_mode", GTK_WRAP_WORD,
|
||||
"direction", GTK_TEXT_DIR_RTL,
|
||||
"indent", 30,
|
||||
"left_margin", 20,
|
||||
"right_margin", 20,
|
||||
NULL);
|
||||
"wrap_mode", GTK_WRAP_WORD,
|
||||
"direction", GTK_TEXT_DIR_RTL,
|
||||
"indent", 30,
|
||||
"left_margin", 20,
|
||||
"right_margin", 20,
|
||||
NULL);
|
||||
}
|
||||
|
||||
static void
|
||||
@@ -156,99 +156,90 @@ insert_text (GtkTextBuffer *buffer)
|
||||
scaled = gdk_pixbuf_scale_simple (pixbuf, 32, 32, GDK_INTERP_BILINEAR);
|
||||
g_object_unref (pixbuf);
|
||||
pixbuf = scaled;
|
||||
|
||||
|
||||
/* get start of buffer; each insertion will revalidate the
|
||||
* iterator to point to just after the inserted text.
|
||||
*/
|
||||
gtk_text_buffer_get_iter_at_offset (buffer, &iter, 0);
|
||||
|
||||
gtk_text_buffer_insert (buffer, &iter,
|
||||
"The text widget can display text with all kinds of nifty attributes. "
|
||||
"It also supports multiple views of the same buffer; this demo is "
|
||||
"showing the same buffer in two places.\n\n", -1);
|
||||
|
||||
gtk_text_buffer_insert_with_tags_by_name (buffer, &iter,
|
||||
"Font styles. ", -1,
|
||||
"heading", NULL);
|
||||
gtk_text_buffer_insert (buffer, &iter, "The text widget can display text with all kinds of nifty attributes. It also supports multiple views of the same buffer; this demo is showing the same buffer in two places.\n\n", -1);
|
||||
|
||||
gtk_text_buffer_insert_with_tags_by_name (buffer, &iter, "Font styles. ", -1,
|
||||
"heading", NULL);
|
||||
|
||||
gtk_text_buffer_insert (buffer, &iter, "For example, you can have ", -1);
|
||||
gtk_text_buffer_insert_with_tags_by_name (buffer, &iter,
|
||||
"italic", -1,
|
||||
"italic", NULL);
|
||||
gtk_text_buffer_insert (buffer, &iter, ", ", -1);
|
||||
"italic", -1,
|
||||
"italic", NULL);
|
||||
gtk_text_buffer_insert (buffer, &iter, ", ", -1);
|
||||
gtk_text_buffer_insert_with_tags_by_name (buffer, &iter,
|
||||
"bold", -1,
|
||||
"bold", NULL);
|
||||
"bold", -1,
|
||||
"bold", NULL);
|
||||
gtk_text_buffer_insert (buffer, &iter, ", or ", -1);
|
||||
gtk_text_buffer_insert_with_tags_by_name (buffer, &iter,
|
||||
"monospace (typewriter)", -1,
|
||||
"monospace", NULL);
|
||||
"monospace (typewriter)", -1,
|
||||
"monospace", NULL);
|
||||
gtk_text_buffer_insert (buffer, &iter, ", or ", -1);
|
||||
gtk_text_buffer_insert_with_tags_by_name (buffer, &iter,
|
||||
"big", -1,
|
||||
"big", NULL);
|
||||
"big", -1,
|
||||
"big", NULL);
|
||||
gtk_text_buffer_insert (buffer, &iter, " text. ", -1);
|
||||
gtk_text_buffer_insert (buffer, &iter,
|
||||
"It's best not to hardcode specific text sizes; you can use relative "
|
||||
"sizes as with CSS, such as ", -1);
|
||||
gtk_text_buffer_insert (buffer, &iter, "It's best not to hardcode specific text sizes; you can use relative sizes as with CSS, such as ", -1);
|
||||
gtk_text_buffer_insert_with_tags_by_name (buffer, &iter,
|
||||
"xx-small", -1,
|
||||
"xx-small", NULL);
|
||||
"xx-small", -1,
|
||||
"xx-small", NULL);
|
||||
gtk_text_buffer_insert (buffer, &iter, " or ", -1);
|
||||
gtk_text_buffer_insert_with_tags_by_name (buffer, &iter,
|
||||
"x-large", -1,
|
||||
"x-large", NULL);
|
||||
gtk_text_buffer_insert (buffer, &iter,
|
||||
" to ensure that your program properly adapts if the user changes the "
|
||||
"default font size.\n\n", -1);
|
||||
|
||||
"x-large", -1,
|
||||
"x-large", NULL);
|
||||
gtk_text_buffer_insert (buffer, &iter, " to ensure that your program properly adapts if the user changes the default font size.\n\n", -1);
|
||||
|
||||
gtk_text_buffer_insert_with_tags_by_name (buffer, &iter, "Colors. ", -1,
|
||||
"heading", NULL);
|
||||
"heading", NULL);
|
||||
|
||||
gtk_text_buffer_insert (buffer, &iter, "Colors such as ", -1);
|
||||
gtk_text_buffer_insert_with_tags_by_name (buffer, &iter,
|
||||
"a blue foreground", -1,
|
||||
"blue_foreground", NULL);
|
||||
gtk_text_buffer_insert (buffer, &iter, " or ", -1);
|
||||
gtk_text_buffer_insert_with_tags_by_name (buffer, &iter,
|
||||
"a red background", -1,
|
||||
"red_background", NULL);
|
||||
gtk_text_buffer_insert (buffer, &iter, " or even ", -1);
|
||||
gtk_text_buffer_insert_with_tags_by_name (buffer, &iter,
|
||||
"a blue foreground on red background", -1,
|
||||
"blue_foreground",
|
||||
"red_background",
|
||||
NULL);
|
||||
gtk_text_buffer_insert (buffer, &iter, " (select that to read it) can be used.\n\n", -1);
|
||||
|
||||
gtk_text_buffer_insert (buffer, &iter, "Colors such as ", -1);
|
||||
gtk_text_buffer_insert_with_tags_by_name (buffer, &iter, "Underline, strikethrough, and rise. ", -1,
|
||||
"heading", NULL);
|
||||
|
||||
gtk_text_buffer_insert_with_tags_by_name (buffer, &iter,
|
||||
"a blue foreground", -1,
|
||||
"blue_foreground", NULL);
|
||||
gtk_text_buffer_insert (buffer, &iter, " or ", -1);
|
||||
gtk_text_buffer_insert_with_tags_by_name (buffer, &iter,
|
||||
"a red background", -1,
|
||||
"red_background", NULL);
|
||||
gtk_text_buffer_insert (buffer, &iter, " or even ", -1);
|
||||
gtk_text_buffer_insert_with_tags_by_name (buffer, &iter,
|
||||
"a blue foreground on red background", -1,
|
||||
"blue_foreground",
|
||||
"red_background",
|
||||
NULL);
|
||||
gtk_text_buffer_insert (buffer, &iter, " (select that to read it) can be used.\n\n", -1);
|
||||
|
||||
gtk_text_buffer_insert_with_tags_by_name (buffer, &iter,
|
||||
"Underline, strikethrough, and rise. ", -1,
|
||||
"heading", NULL);
|
||||
|
||||
gtk_text_buffer_insert_with_tags_by_name (buffer, &iter,
|
||||
"Strikethrough", -1,
|
||||
"strikethrough", NULL);
|
||||
"Strikethrough", -1,
|
||||
"strikethrough", NULL);
|
||||
gtk_text_buffer_insert (buffer, &iter, ", ", -1);
|
||||
gtk_text_buffer_insert_with_tags_by_name (buffer, &iter,
|
||||
"underline", -1,
|
||||
"underline", NULL);
|
||||
"underline", -1,
|
||||
"underline", NULL);
|
||||
gtk_text_buffer_insert (buffer, &iter, ", ", -1);
|
||||
gtk_text_buffer_insert_with_tags_by_name (buffer, &iter,
|
||||
"double underline", -1,
|
||||
"double_underline", NULL);
|
||||
"double underline", -1,
|
||||
"double_underline", NULL);
|
||||
gtk_text_buffer_insert (buffer, &iter, ", ", -1);
|
||||
gtk_text_buffer_insert_with_tags_by_name (buffer, &iter,
|
||||
"superscript", -1,
|
||||
"superscript", NULL);
|
||||
"superscript", -1,
|
||||
"superscript", NULL);
|
||||
gtk_text_buffer_insert (buffer, &iter, ", and ", -1);
|
||||
gtk_text_buffer_insert_with_tags_by_name (buffer, &iter,
|
||||
"subscript", -1,
|
||||
"subscript", NULL);
|
||||
"subscript", -1,
|
||||
"subscript", NULL);
|
||||
gtk_text_buffer_insert (buffer, &iter, " are all supported.\n\n", -1);
|
||||
|
||||
gtk_text_buffer_insert_with_tags_by_name (buffer, &iter, "Images. ", -1,
|
||||
"heading", NULL);
|
||||
|
||||
"heading", NULL);
|
||||
|
||||
gtk_text_buffer_insert (buffer, &iter, "The buffer can have images in it: ", -1);
|
||||
gtk_text_buffer_insert_pixbuf (buffer, &iter, pixbuf);
|
||||
gtk_text_buffer_insert_pixbuf (buffer, &iter, pixbuf);
|
||||
@@ -256,126 +247,70 @@ insert_text (GtkTextBuffer *buffer)
|
||||
gtk_text_buffer_insert (buffer, &iter, " for example.\n\n", -1);
|
||||
|
||||
gtk_text_buffer_insert_with_tags_by_name (buffer, &iter, "Spacing. ", -1,
|
||||
"heading", NULL);
|
||||
"heading", NULL);
|
||||
|
||||
gtk_text_buffer_insert (buffer, &iter, "You can adjust the amount of space before each line.\n", -1);
|
||||
|
||||
gtk_text_buffer_insert_with_tags_by_name (buffer, &iter,
|
||||
"This line has a whole lot of space before it.\n", -1,
|
||||
"big_gap_before_line", "wide_margins", NULL);
|
||||
gtk_text_buffer_insert_with_tags_by_name (buffer, &iter,
|
||||
"You can also adjust the amount of space after each line; this line has a whole lot of space after it.\n", -1,
|
||||
"big_gap_after_line", "wide_margins", NULL);
|
||||
|
||||
gtk_text_buffer_insert_with_tags_by_name (buffer, &iter,
|
||||
"You can also adjust the amount of space between wrapped lines; this line has extra space between each wrapped line in the same paragraph. To show off wrapping, some filler text: the quick brown fox jumped over the lazy dog. Blah blah blah blah blah blah blah blah blah.\n", -1,
|
||||
"double_spaced_line", "wide_margins", NULL);
|
||||
|
||||
gtk_text_buffer_insert (buffer, &iter, "Also note that those lines have extra-wide margins.\n\n", -1);
|
||||
|
||||
gtk_text_buffer_insert_with_tags_by_name (buffer, &iter, "Editability. ", -1,
|
||||
"heading", NULL);
|
||||
|
||||
gtk_text_buffer_insert_with_tags_by_name (buffer, &iter,
|
||||
"This line is 'locked down' and can't be edited by the user - just try it! You can't delete this line.\n\n", -1,
|
||||
"not_editable", NULL);
|
||||
|
||||
gtk_text_buffer_insert_with_tags_by_name (buffer, &iter, "Wrapping. ", -1,
|
||||
"heading", NULL);
|
||||
|
||||
gtk_text_buffer_insert (buffer, &iter,
|
||||
"You can adjust the amount of space before each line.\n", -1);
|
||||
"This line (and most of the others in this buffer) is word-wrapped, using the proper Unicode algorithm. Word wrap should work in all scripts and languages that GTK+ supports. Let's make this a long paragraph to demonstrate: blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah\n\n", -1);
|
||||
|
||||
gtk_text_buffer_insert_with_tags_by_name (buffer, &iter,
|
||||
"This line has character-based wrapping, and can wrap between any two character glyphs. Let's make this a long paragraph to demonstrate: blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah\n\n", -1,
|
||||
"char_wrap", NULL);
|
||||
|
||||
gtk_text_buffer_insert_with_tags_by_name (buffer, &iter,
|
||||
"This line has all wrapping turned off, so it makes the horizontal scrollbar appear.\n\n\n", -1,
|
||||
"no_wrap", NULL);
|
||||
|
||||
gtk_text_buffer_insert_with_tags_by_name (buffer, &iter, "Justification. ", -1,
|
||||
"heading", NULL);
|
||||
|
||||
gtk_text_buffer_insert_with_tags_by_name (buffer, &iter,
|
||||
"\nThis line has center justification.\n", -1,
|
||||
"center", NULL);
|
||||
|
||||
gtk_text_buffer_insert_with_tags_by_name (buffer, &iter,
|
||||
"This line has a whole lot of space before it.\n", -1,
|
||||
"big_gap_before_line", "wide_margins", NULL);
|
||||
gtk_text_buffer_insert_with_tags_by_name (buffer, &iter,
|
||||
"You can also adjust the amount of space after each line; "
|
||||
"this line has a whole lot of space after it.\n", -1,
|
||||
"big_gap_after_line", "wide_margins", NULL);
|
||||
"This line has right justification.\n", -1,
|
||||
"right_justify", NULL);
|
||||
|
||||
gtk_text_buffer_insert_with_tags_by_name (buffer, &iter,
|
||||
"You can also adjust the amount of space between wrapped lines; "
|
||||
"this line has extra space between each wrapped line in the same "
|
||||
"paragraph. To show off wrapping, some filler text: the quick "
|
||||
"brown fox jumped over the lazy dog. Blah blah blah blah blah "
|
||||
"blah blah blah blah.\n", -1,
|
||||
"double_spaced_line", "wide_margins", NULL);
|
||||
"\nThis line has big wide margins. Text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text.\n", -1,
|
||||
"wide_margins", NULL);
|
||||
|
||||
gtk_text_buffer_insert_with_tags_by_name (buffer, &iter, "Internationalization. ", -1,
|
||||
"heading", NULL);
|
||||
|
||||
gtk_text_buffer_insert (buffer, &iter,
|
||||
"Also note that those lines have extra-wide margins.\n\n", -1);
|
||||
"You can put all sorts of Unicode text in the buffer.\n\nGerman (Deutsch S\303\274d) Gr\303\274\303\237 Gott\nGreek (\316\225\316\273\316\273\316\267\316\275\316\271\316\272\316\254) \316\223\316\265\316\271\316\254 \317\203\316\261\317\202\nHebrew \327\251\327\234\327\225\327\235\nJapanese (\346\227\245\346\234\254\350\252\236)\n\nThe widget properly handles bidirectional text, word wrapping, DOS/UNIX/Unicode paragraph separators, grapheme boundaries, and so on using the Pango internationalization framework.\n", -1);
|
||||
|
||||
gtk_text_buffer_insert_with_tags_by_name (buffer, &iter,
|
||||
"Editability. ", -1,
|
||||
"heading", NULL);
|
||||
|
||||
gtk_text_buffer_insert_with_tags_by_name (buffer, &iter,
|
||||
"This line is 'locked down' and can't be edited by the user - just "
|
||||
"try it! You can't delete this line.\n\n", -1,
|
||||
"not_editable", NULL);
|
||||
|
||||
gtk_text_buffer_insert_with_tags_by_name (buffer, &iter,
|
||||
"Wrapping. ", -1,
|
||||
"heading", NULL);
|
||||
|
||||
gtk_text_buffer_insert (buffer, &iter,
|
||||
"This line (and most of the others in this buffer) is word-wrapped, "
|
||||
"using the proper Unicode algorithm. Word wrap should work in all "
|
||||
"scripts and languages that GTK+ supports. Let's make this a long "
|
||||
"paragraph to demonstrate: blah blah blah blah blah blah blah blah "
|
||||
"blah blah blah blah blah blah blah blah blah blah blah\n\n", -1);
|
||||
|
||||
gtk_text_buffer_insert_with_tags_by_name (buffer, &iter,
|
||||
"This line has character-based wrapping, and can wrap between any two "
|
||||
"character glyphs. Let's make this a long paragraph to demonstrate: "
|
||||
"blah blah blah blah blah blah blah blah blah blah blah blah blah blah "
|
||||
"blah blah blah blah blah\n\n", -1, "char_wrap", NULL);
|
||||
|
||||
gtk_text_buffer_insert_with_tags_by_name (buffer, &iter,
|
||||
"This line has all wrapping turned off, so it makes the horizontal "
|
||||
"scrollbar appear.\n\n\n", -1, "no_wrap", NULL);
|
||||
|
||||
gtk_text_buffer_insert_with_tags_by_name (buffer, &iter,
|
||||
"Justification. ", -1,
|
||||
"heading", NULL);
|
||||
|
||||
gtk_text_buffer_insert_with_tags_by_name (buffer, &iter,
|
||||
"\nThis line has center justification.\n", -1,
|
||||
"center", NULL);
|
||||
|
||||
gtk_text_buffer_insert_with_tags_by_name (buffer, &iter,
|
||||
"This line has right justification.\n", -1,
|
||||
"right_justify", NULL);
|
||||
|
||||
gtk_text_buffer_insert_with_tags_by_name (buffer, &iter,
|
||||
"\nThis line has big wide margins. Text text text text text text text "
|
||||
"text text text text text text text text text text text text text text "
|
||||
"text text text text text text text text text text text text text text "
|
||||
"text.\n", -1, "wide_margins", NULL);
|
||||
|
||||
gtk_text_buffer_insert_with_tags_by_name (buffer, &iter,
|
||||
"Internationalization. ", -1,
|
||||
"heading", NULL);
|
||||
|
||||
gtk_text_buffer_insert (buffer, &iter,
|
||||
"You can put all sorts of Unicode text in the buffer.\n\nGerman "
|
||||
"(Deutsch S\303\274d) Gr\303\274\303\237 Gott\nGreek "
|
||||
"(\316\225\316\273\316\273\316\267\316\275\316\271\316\272\316\254) "
|
||||
"\316\223\316\265\316\271\316\254 \317\203\316\261\317\202\nHebrew "
|
||||
"\327\251\327\234\327\225\327\235\nJapanese "
|
||||
"(\346\227\245\346\234\254\350\252\236)\n\nThe widget properly handles "
|
||||
"bidirectional text, word wrapping, DOS/UNIX/Unicode paragraph separators, "
|
||||
"grapheme boundaries, and so on using the Pango internationalization "
|
||||
"framework.\n", -1);
|
||||
|
||||
gtk_text_buffer_insert (buffer, &iter,
|
||||
"Here's a word-wrapped quote in a right-to-left language:\n", -1);
|
||||
gtk_text_buffer_insert_with_tags_by_name (buffer, &iter,
|
||||
"\331\210\331\202\330\257 \330\250\330\257\330\243 "
|
||||
"\330\253\331\204\330\247\330\253 \331\205\331\206 "
|
||||
"\330\243\331\203\330\253\330\261 \330\247\331\204\331\205\330\244\330\263\330\263\330\247\330\252 "
|
||||
"\330\252\331\202\330\257\331\205\330\247 \331\201\331\212 "
|
||||
"\330\264\330\250\331\203\330\251 \330\247\331\203\330\263\331\212\331\210\331\206 "
|
||||
"\330\250\330\261\330\247\331\205\330\254\331\207\330\247 "
|
||||
"\331\203\331\205\331\206\330\270\331\205\330\247\330\252 "
|
||||
"\331\204\330\247 \330\252\330\263\330\271\331\211 \331\204\331\204\330\261\330\250\330\255\330\214 "
|
||||
"\330\253\331\205 \330\252\330\255\331\210\331\204\330\252 "
|
||||
"\331\201\331\212 \330\247\331\204\330\263\331\206\331\210\330\247\330\252 "
|
||||
"\330\247\331\204\330\256\331\205\330\263 \330\247\331\204\331\205\330\247\330\266\331\212\330\251 "
|
||||
"\330\245\331\204\331\211 \331\205\330\244\330\263\330\263\330\247\330\252 "
|
||||
"\331\205\330\247\331\204\331\212\330\251 \331\205\331\206\330\270\331\205\330\251\330\214 "
|
||||
"\331\210\330\250\330\247\330\252\330\252 \330\254\330\262\330\241\330\247 "
|
||||
"\331\205\331\206 \330\247\331\204\331\206\330\270\330\247\331\205 "
|
||||
"\330\247\331\204\331\205\330\247\331\204\331\212 \331\201\331\212 "
|
||||
"\330\250\331\204\330\257\330\247\331\206\331\207\330\247\330\214 "
|
||||
"\331\210\331\204\331\203\331\206\331\207\330\247 \330\252\330\252\330\256\330\265\330\265 "
|
||||
"\331\201\331\212 \330\256\330\257\331\205\330\251 \331\202\330\267\330\247\330\271 "
|
||||
"\330\247\331\204\331\205\330\264\330\261\331\210\330\271\330\247\330\252 "
|
||||
"\330\247\331\204\330\265\330\272\331\212\330\261\330\251. \331\210\330\243\330\255\330\257 "
|
||||
"\330\243\331\203\330\253\330\261 \331\207\330\260\331\207 "
|
||||
"\330\247\331\204\331\205\330\244\330\263\330\263\330\247\330\252 "
|
||||
"\331\206\330\254\330\247\330\255\330\247 \331\207\331\210 "
|
||||
"\302\273\330\250\330\247\331\206\331\203\331\210\330\263\331\210\331\204\302\253 "
|
||||
"\331\201\331\212 \330\250\331\210\331\204\331\212\331\201\331\212\330\247.\n\n", -1,
|
||||
"rtl_quote", NULL);
|
||||
|
||||
gtk_text_buffer_insert (buffer, &iter,
|
||||
"You can put widgets in the buffer: Here's a button: ", -1);
|
||||
gtk_text_buffer_insert (buffer, &iter, "Here's a word-wrapped quote in a right-to-left language:\n", -1);
|
||||
gtk_text_buffer_insert_with_tags_by_name (buffer, &iter, "\331\210\331\202\330\257 \330\250\330\257\330\243 \330\253\331\204\330\247\330\253 \331\205\331\206 \330\243\331\203\330\253\330\261 \330\247\331\204\331\205\330\244\330\263\330\263\330\247\330\252 \330\252\331\202\330\257\331\205\330\247 \331\201\331\212 \330\264\330\250\331\203\330\251 \330\247\331\203\330\263\331\212\331\210\331\206 \330\250\330\261\330\247\331\205\330\254\331\207\330\247 \331\203\331\205\331\206\330\270\331\205\330\247\330\252 \331\204\330\247 \330\252\330\263\330\271\331\211 \331\204\331\204\330\261\330\250\330\255\330\214 \330\253\331\205 \330\252\330\255\331\210\331\204\330\252 \331\201\331\212 \330\247\331\204\330\263\331\206\331\210\330\247\330\252 \330\247\331\204\330\256\331\205\330\263 \330\247\331\204\331\205\330\247\330\266\331\212\330\251 \330\245\331\204\331\211 \331\205\330\244\330\263\330\263\330\247\330\252 \331\205\330\247\331\204\331\212\330\251 \331\205\331\206\330\270\331\205\330\251\330\214 \331\210\330\250\330\247\330\252\330\252 \330\254\330\262\330\241\330\247 \331\205\331\206 \330\247\331\204\331\206\330\270\330\247\331\205 \330\247\331\204\331\205\330\247\331\204\331\212 \331\201\331\212 \330\250\331\204\330\257\330\247\331\206\331\207\330\247\330\214 \331\210\331\204\331\203\331\206\331\207\330\247 \330\252\330\252\330\256\330\265\330\265 \331\201\331\212 \330\256\330\257\331\205\330\251 \331\202\330\267\330\247\330\271 \330\247\331\204\331\205\330\264\330\261\331\210\330\271\330\247\330\252 \330\247\331\204\330\265\330\272\331\212\330\261\330\251. \331\210\330\243\330\255\330\257 \330\243\331\203\330\253\330\261 \331\207\330\260\331\207 \330\247\331\204\331\205\330\244\330\263\330\263\330\247\330\252 \331\206\330\254\330\247\330\255\330\247 \331\207\331\210 \302\273\330\250\330\247\331\206\331\203\331\210\330\263\331\210\331\204\302\253 \331\201\331\212 \330\250\331\210\331\204\331\212\331\201\331\212\330\247.\n\n", -1,
|
||||
"rtl_quote", NULL);
|
||||
|
||||
gtk_text_buffer_insert (buffer, &iter, "You can put widgets in the buffer: Here's a button: ", -1);
|
||||
anchor = gtk_text_buffer_create_child_anchor (buffer, &iter);
|
||||
gtk_text_buffer_insert (buffer, &iter, " and a menu: ", -1);
|
||||
anchor = gtk_text_buffer_create_child_anchor (buffer, &iter);
|
||||
@@ -386,12 +321,8 @@ insert_text (GtkTextBuffer *buffer)
|
||||
gtk_text_buffer_insert (buffer, &iter, " finally a text entry: ", -1);
|
||||
anchor = gtk_text_buffer_create_child_anchor (buffer, &iter);
|
||||
gtk_text_buffer_insert (buffer, &iter, ".\n", -1);
|
||||
|
||||
gtk_text_buffer_insert (buffer, &iter,
|
||||
"\n\nThis demo doesn't demonstrate all the GtkTextBuffer features; "
|
||||
"it leaves out, for example: invisible/hidden text, tab stops, "
|
||||
"application-drawn areas on the sides of the widget for displaying "
|
||||
"breakpoints and such...", -1);
|
||||
|
||||
gtk_text_buffer_insert (buffer, &iter, "\n\nThis demo doesn't demonstrate all the GtkTextBuffer features; it leaves out, for example: invisible/hidden text, tab stops, application-drawn areas on the sides of the widget for displaying breakpoints and such...", -1);
|
||||
|
||||
/* Apply word_wrap tag to whole buffer */
|
||||
gtk_text_buffer_get_bounds (buffer, &start, &end);
|
||||
@@ -417,7 +348,7 @@ attach_widgets (GtkTextView *text_view)
|
||||
GtkTextIter iter;
|
||||
GtkTextBuffer *buffer;
|
||||
int i;
|
||||
|
||||
|
||||
buffer = gtk_text_view_get_buffer (text_view);
|
||||
|
||||
gtk_text_buffer_get_start_iter (buffer, &iter);
|
||||
@@ -427,7 +358,7 @@ attach_widgets (GtkTextView *text_view)
|
||||
{
|
||||
GtkTextChildAnchor *anchor;
|
||||
GtkWidget *widget;
|
||||
|
||||
|
||||
anchor = gtk_text_iter_get_child_anchor (&iter);
|
||||
|
||||
if (i == 0)
|
||||
@@ -454,9 +385,9 @@ attach_widgets (GtkTextView *text_view)
|
||||
}
|
||||
else if (i == 3)
|
||||
{
|
||||
gchar *filename = demo_find_file ("floppybuddy.gif", NULL);
|
||||
widget = gtk_image_new_from_file (filename);
|
||||
g_free (filename);
|
||||
gchar *filename = demo_find_file ("floppybuddy.gif", NULL);
|
||||
widget = gtk_image_new_from_file (filename);
|
||||
g_free (filename);
|
||||
}
|
||||
else if (i == 4)
|
||||
{
|
||||
@@ -490,15 +421,15 @@ do_textview (GtkWidget *do_widget)
|
||||
GtkWidget *view2;
|
||||
GtkWidget *sw;
|
||||
GtkTextBuffer *buffer;
|
||||
|
||||
|
||||
window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
|
||||
gtk_window_set_screen (GTK_WINDOW (window),
|
||||
gtk_widget_get_screen (do_widget));
|
||||
gtk_widget_get_screen (do_widget));
|
||||
gtk_window_set_default_size (GTK_WINDOW (window),
|
||||
450, 450);
|
||||
|
||||
450, 450);
|
||||
|
||||
g_signal_connect (window, "destroy",
|
||||
G_CALLBACK (gtk_widget_destroyed), &window);
|
||||
G_CALLBACK (gtk_widget_destroyed), &window);
|
||||
|
||||
gtk_window_set_title (GTK_WINDOW (window), "TextView");
|
||||
gtk_container_set_border_width (GTK_CONTAINER (window), 0);
|
||||
@@ -515,19 +446,19 @@ do_textview (GtkWidget *do_widget)
|
||||
view1 = gtk_text_view_new ();
|
||||
buffer = gtk_text_view_get_buffer (GTK_TEXT_VIEW (view1));
|
||||
view2 = gtk_text_view_new_with_buffer (buffer);
|
||||
|
||||
|
||||
sw = gtk_scrolled_window_new (NULL, NULL);
|
||||
gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (sw),
|
||||
GTK_POLICY_AUTOMATIC,
|
||||
GTK_POLICY_AUTOMATIC);
|
||||
GTK_POLICY_AUTOMATIC,
|
||||
GTK_POLICY_AUTOMATIC);
|
||||
gtk_paned_add1 (GTK_PANED (vpaned), sw);
|
||||
|
||||
gtk_container_add (GTK_CONTAINER (sw), view1);
|
||||
|
||||
sw = gtk_scrolled_window_new (NULL, NULL);
|
||||
gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (sw),
|
||||
GTK_POLICY_AUTOMATIC,
|
||||
GTK_POLICY_AUTOMATIC);
|
||||
GTK_POLICY_AUTOMATIC,
|
||||
GTK_POLICY_AUTOMATIC);
|
||||
gtk_paned_add2 (GTK_PANED (vpaned), sw);
|
||||
|
||||
gtk_container_add (GTK_CONTAINER (sw), view2);
|
||||
@@ -537,7 +468,7 @@ do_textview (GtkWidget *do_widget)
|
||||
|
||||
attach_widgets (GTK_TEXT_VIEW (view1));
|
||||
attach_widgets (GTK_TEXT_VIEW (view2));
|
||||
|
||||
|
||||
gtk_widget_show_all (vpaned);
|
||||
}
|
||||
|
||||
@@ -563,10 +494,10 @@ recursive_attach_view (int depth,
|
||||
GtkWidget *event_box;
|
||||
GdkColor color;
|
||||
GtkWidget *align;
|
||||
|
||||
|
||||
if (depth > 4)
|
||||
return;
|
||||
|
||||
|
||||
child_view = gtk_text_view_new_with_buffer (gtk_text_view_get_buffer (view));
|
||||
|
||||
/* Event box is to add a black border around each child view */
|
||||
@@ -576,10 +507,10 @@ recursive_attach_view (int depth,
|
||||
|
||||
align = gtk_alignment_new (0.5, 0.5, 1.0, 1.0);
|
||||
gtk_container_set_border_width (GTK_CONTAINER (align), 1);
|
||||
|
||||
|
||||
gtk_container_add (GTK_CONTAINER (event_box), align);
|
||||
gtk_container_add (GTK_CONTAINER (align), child_view);
|
||||
|
||||
|
||||
gtk_text_view_add_child_at_anchor (view, event_box, anchor);
|
||||
|
||||
recursive_attach_view (depth + 1, GTK_TEXT_VIEW (child_view), anchor);
|
||||
@@ -602,21 +533,21 @@ easter_egg_callback (GtkWidget *button,
|
||||
gtk_window_present (GTK_WINDOW (window));
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
buffer = gtk_text_buffer_new (NULL);
|
||||
|
||||
gtk_text_buffer_get_start_iter (buffer, &iter);
|
||||
|
||||
gtk_text_buffer_insert (buffer, &iter,
|
||||
"This buffer is shared by a set of nested text views.\n Nested view:\n", -1);
|
||||
"This buffer is shared by a set of nested text views.\n Nested view:\n", -1);
|
||||
anchor = gtk_text_buffer_create_child_anchor (buffer, &iter);
|
||||
gtk_text_buffer_insert (buffer, &iter,
|
||||
"\nDon't do this in real applications, please.\n", -1);
|
||||
|
||||
view = gtk_text_view_new_with_buffer (buffer);
|
||||
|
||||
|
||||
recursive_attach_view (0, GTK_TEXT_VIEW (view), anchor);
|
||||
|
||||
|
||||
g_object_unref (buffer);
|
||||
|
||||
window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
|
||||
@@ -632,7 +563,7 @@ easter_egg_callback (GtkWidget *button,
|
||||
g_object_add_weak_pointer (G_OBJECT (window), window_ptr);
|
||||
|
||||
gtk_window_set_default_size (GTK_WINDOW (window), 300, 400);
|
||||
|
||||
|
||||
gtk_widget_show_all (window);
|
||||
}
|
||||
|
||||
|
||||
17
docs/reference/gdk/tmpl/.gitignore
vendored
17
docs/reference/gdk/tmpl/.gitignore
vendored
@@ -1,23 +1,6 @@
|
||||
cairo_interaction.sgml
|
||||
colors.sgml
|
||||
cursors.sgml
|
||||
dnd.sgml
|
||||
drawing.sgml
|
||||
events.sgml
|
||||
event_structs.sgml
|
||||
gdkapplaunchcontext.sgml
|
||||
gdkdisplay.sgml
|
||||
gdkdisplaymanager.sgml
|
||||
gdkscreen.sgml
|
||||
gdktesting.sgml
|
||||
general.sgml
|
||||
keys.sgml
|
||||
pango_interaction.sgml
|
||||
properties.sgml
|
||||
pixbufs.sgml
|
||||
regions.sgml
|
||||
selections.sgml
|
||||
threads.sgml
|
||||
visuals.sgml
|
||||
windows.sgml
|
||||
x_interaction.sgml
|
||||
|
||||
214
docs/reference/gdk/tmpl/cursors.sgml
Normal file
214
docs/reference/gdk/tmpl/cursors.sgml
Normal file
@@ -0,0 +1,214 @@
|
||||
<!-- ##### SECTION Title ##### -->
|
||||
Cursors
|
||||
|
||||
<!-- ##### SECTION Short_Description ##### -->
|
||||
Standard and pixmap cursors
|
||||
|
||||
<!-- ##### SECTION Long_Description ##### -->
|
||||
<para>
|
||||
These functions are used to create and destroy cursors.
|
||||
There is a number of standard cursors, but it is also
|
||||
possible to construct new cursors from pixbufs. There
|
||||
may be limitations as to what kinds of cursors can be
|
||||
constructed on a given display, see
|
||||
gdk_display_supports_cursor_alpha(),
|
||||
gdk_display_supports_cursor_color(),
|
||||
gdk_display_get_default_cursor_size() and
|
||||
gdk_display_get_maximal_cursor_size().
|
||||
</para>
|
||||
<para>
|
||||
Cursors by themselves are not very interesting, they must be be
|
||||
bound to a window for users to see them. This is done with
|
||||
gdk_window_set_cursor() or by setting the cursor member of the
|
||||
#GdkWindowAttr struct passed to gdk_window_new().
|
||||
</para>
|
||||
|
||||
<!-- ##### SECTION See_Also ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### SECTION Stability_Level ##### -->
|
||||
|
||||
|
||||
<!-- ##### SECTION Image ##### -->
|
||||
|
||||
|
||||
<!-- ##### STRUCT GdkCursor ##### -->
|
||||
<para>
|
||||
A <type>GdkCursor</type> structure represents a cursor.
|
||||
</para>
|
||||
|
||||
|
||||
<!-- ##### ENUM GdkCursorType ##### -->
|
||||
<para>
|
||||
The standard cursors available.
|
||||
</para>
|
||||
|
||||
@GDK_X_CURSOR: <inlinegraphic format="PNG" fileref="X_cursor.png"></inlinegraphic>
|
||||
@GDK_ARROW: <inlinegraphic format="PNG" fileref="arrow.png"></inlinegraphic>
|
||||
@GDK_BASED_ARROW_DOWN: <inlinegraphic format="PNG" fileref="based_arrow_down.png"></inlinegraphic>
|
||||
@GDK_BASED_ARROW_UP: <inlinegraphic format="PNG" fileref="based_arrow_up.png"></inlinegraphic>
|
||||
@GDK_BOAT: <inlinegraphic format="PNG" fileref="boat.png"></inlinegraphic>
|
||||
@GDK_BOGOSITY: <inlinegraphic format="PNG" fileref="bogosity.png"></inlinegraphic>
|
||||
@GDK_BOTTOM_LEFT_CORNER: <inlinegraphic format="PNG" fileref="bottom_left_corner.png"></inlinegraphic>
|
||||
@GDK_BOTTOM_RIGHT_CORNER: <inlinegraphic format="PNG" fileref="bottom_right_corner.png"></inlinegraphic>
|
||||
@GDK_BOTTOM_SIDE: <inlinegraphic format="PNG" fileref="bottom_side.png"></inlinegraphic>
|
||||
@GDK_BOTTOM_TEE: <inlinegraphic format="PNG" fileref="bottom_tee.png"></inlinegraphic>
|
||||
@GDK_BOX_SPIRAL: <inlinegraphic format="PNG" fileref="box_spiral.png"></inlinegraphic>
|
||||
@GDK_CENTER_PTR: <inlinegraphic format="PNG" fileref="center_ptr.png"></inlinegraphic>
|
||||
@GDK_CIRCLE: <inlinegraphic format="PNG" fileref="circle.png"></inlinegraphic>
|
||||
@GDK_CLOCK: <inlinegraphic format="PNG" fileref="clock.png"></inlinegraphic>
|
||||
@GDK_COFFEE_MUG: <inlinegraphic format="PNG" fileref="coffee_mug.png"></inlinegraphic>
|
||||
@GDK_CROSS: <inlinegraphic format="PNG" fileref="cross.png"></inlinegraphic>
|
||||
@GDK_CROSS_REVERSE: <inlinegraphic format="PNG" fileref="cross_reverse.png"></inlinegraphic>
|
||||
@GDK_CROSSHAIR: <inlinegraphic format="PNG" fileref="crosshair.png"></inlinegraphic>
|
||||
@GDK_DIAMOND_CROSS: <inlinegraphic format="PNG" fileref="diamond_cross.png"></inlinegraphic>
|
||||
@GDK_DOT: <inlinegraphic format="PNG" fileref="dot.png"></inlinegraphic>
|
||||
@GDK_DOTBOX: <inlinegraphic format="PNG" fileref="dotbox.png"></inlinegraphic>
|
||||
@GDK_DOUBLE_ARROW: <inlinegraphic format="PNG" fileref="double_arrow.png"></inlinegraphic>
|
||||
@GDK_DRAFT_LARGE: <inlinegraphic format="PNG" fileref="draft_large.png"></inlinegraphic>
|
||||
@GDK_DRAFT_SMALL: <inlinegraphic format="PNG" fileref="draft_small.png"></inlinegraphic>
|
||||
@GDK_DRAPED_BOX: <inlinegraphic format="PNG" fileref="draped_box.png"></inlinegraphic>
|
||||
@GDK_EXCHANGE: <inlinegraphic format="PNG" fileref="exchange.png"></inlinegraphic>
|
||||
@GDK_FLEUR: <inlinegraphic format="PNG" fileref="fleur.png"></inlinegraphic>
|
||||
@GDK_GOBBLER: <inlinegraphic format="PNG" fileref="gobbler.png"></inlinegraphic>
|
||||
@GDK_GUMBY: <inlinegraphic format="PNG" fileref="gumby.png"></inlinegraphic>
|
||||
@GDK_HAND1: <inlinegraphic format="PNG" fileref="hand1.png"></inlinegraphic>
|
||||
@GDK_HAND2: <inlinegraphic format="PNG" fileref="hand2.png"></inlinegraphic>
|
||||
@GDK_HEART: <inlinegraphic format="PNG" fileref="heart.png"></inlinegraphic>
|
||||
@GDK_ICON: <inlinegraphic format="PNG" fileref="icon.png"></inlinegraphic>
|
||||
@GDK_IRON_CROSS: <inlinegraphic format="PNG" fileref="iron_cross.png"></inlinegraphic>
|
||||
@GDK_LEFT_PTR: <inlinegraphic format="PNG" fileref="left_ptr.png"></inlinegraphic>
|
||||
@GDK_LEFT_SIDE: <inlinegraphic format="PNG" fileref="left_side.png"></inlinegraphic>
|
||||
@GDK_LEFT_TEE: <inlinegraphic format="PNG" fileref="left_tee.png"></inlinegraphic>
|
||||
@GDK_LEFTBUTTON: <inlinegraphic format="PNG" fileref="leftbutton.png"></inlinegraphic>
|
||||
@GDK_LL_ANGLE: <inlinegraphic format="PNG" fileref="ll_angle.png"></inlinegraphic>
|
||||
@GDK_LR_ANGLE: <inlinegraphic format="PNG" fileref="lr_angle.png"></inlinegraphic>
|
||||
@GDK_MAN: <inlinegraphic format="PNG" fileref="man.png"></inlinegraphic>
|
||||
@GDK_MIDDLEBUTTON: <inlinegraphic format="PNG" fileref="middlebutton.png"></inlinegraphic>
|
||||
@GDK_MOUSE: <inlinegraphic format="PNG" fileref="mouse.png"></inlinegraphic>
|
||||
@GDK_PENCIL: <inlinegraphic format="PNG" fileref="pencil.png"></inlinegraphic>
|
||||
@GDK_PIRATE: <inlinegraphic format="PNG" fileref="pirate.png"></inlinegraphic>
|
||||
@GDK_PLUS: <inlinegraphic format="PNG" fileref="plus.png"></inlinegraphic>
|
||||
@GDK_QUESTION_ARROW: <inlinegraphic format="PNG" fileref="question_arrow.png"></inlinegraphic>
|
||||
@GDK_RIGHT_PTR: <inlinegraphic format="PNG" fileref="right_ptr.png"></inlinegraphic>
|
||||
@GDK_RIGHT_SIDE: <inlinegraphic format="PNG" fileref="right_side.png"></inlinegraphic>
|
||||
@GDK_RIGHT_TEE: <inlinegraphic format="PNG" fileref="right_tee.png"></inlinegraphic>
|
||||
@GDK_RIGHTBUTTON: <inlinegraphic format="PNG" fileref="rightbutton.png"></inlinegraphic>
|
||||
@GDK_RTL_LOGO: <inlinegraphic format="PNG" fileref="rtl_logo.png"></inlinegraphic>
|
||||
@GDK_SAILBOAT: <inlinegraphic format="PNG" fileref="sailboat.png"></inlinegraphic>
|
||||
@GDK_SB_DOWN_ARROW: <inlinegraphic format="PNG" fileref="sb_down_arrow.png"></inlinegraphic>
|
||||
@GDK_SB_H_DOUBLE_ARROW: <inlinegraphic format="PNG" fileref="sb_h_double_arrow.png"></inlinegraphic>
|
||||
@GDK_SB_LEFT_ARROW: <inlinegraphic format="PNG" fileref="sb_left_arrow.png"></inlinegraphic>
|
||||
@GDK_SB_RIGHT_ARROW: <inlinegraphic format="PNG" fileref="sb_right_arrow.png"></inlinegraphic>
|
||||
@GDK_SB_UP_ARROW: <inlinegraphic format="PNG" fileref="sb_up_arrow.png"></inlinegraphic>
|
||||
@GDK_SB_V_DOUBLE_ARROW: <inlinegraphic format="PNG" fileref="sb_v_double_arrow.png"></inlinegraphic>
|
||||
@GDK_SHUTTLE: <inlinegraphic format="PNG" fileref="shuttle.png"></inlinegraphic>
|
||||
@GDK_SIZING: <inlinegraphic format="PNG" fileref="sizing.png"></inlinegraphic>
|
||||
@GDK_SPIDER: <inlinegraphic format="PNG" fileref="spider.png"></inlinegraphic>
|
||||
@GDK_SPRAYCAN: <inlinegraphic format="PNG" fileref="spraycan.png"></inlinegraphic>
|
||||
@GDK_STAR: <inlinegraphic format="PNG" fileref="star.png"></inlinegraphic>
|
||||
@GDK_TARGET: <inlinegraphic format="PNG" fileref="target.png"></inlinegraphic>
|
||||
@GDK_TCROSS: <inlinegraphic format="PNG" fileref="tcross.png"></inlinegraphic>
|
||||
@GDK_TOP_LEFT_ARROW: <inlinegraphic format="PNG" fileref="top_left_arrow.png"></inlinegraphic>
|
||||
@GDK_TOP_LEFT_CORNER: <inlinegraphic format="PNG" fileref="top_left_corner.png"></inlinegraphic>
|
||||
@GDK_TOP_RIGHT_CORNER: <inlinegraphic format="PNG" fileref="top_right_corner.png"></inlinegraphic>
|
||||
@GDK_TOP_SIDE: <inlinegraphic format="PNG" fileref="top_side.png"></inlinegraphic>
|
||||
@GDK_TOP_TEE: <inlinegraphic format="PNG" fileref="top_tee.png"></inlinegraphic>
|
||||
@GDK_TREK: <inlinegraphic format="PNG" fileref="trek.png"></inlinegraphic>
|
||||
@GDK_UL_ANGLE: <inlinegraphic format="PNG" fileref="ul_angle.png"></inlinegraphic>
|
||||
@GDK_UMBRELLA: <inlinegraphic format="PNG" fileref="umbrella.png"></inlinegraphic>
|
||||
@GDK_UR_ANGLE: <inlinegraphic format="PNG" fileref="ur_angle.png"></inlinegraphic>
|
||||
@GDK_WATCH: <inlinegraphic format="PNG" fileref="watch.png"></inlinegraphic>
|
||||
@GDK_XTERM: <inlinegraphic format="PNG" fileref="xterm.png"></inlinegraphic>
|
||||
@GDK_LAST_CURSOR: last cursor type
|
||||
@GDK_BLANK_CURSOR: Blank cursor. Since 2.16
|
||||
@GDK_CURSOR_IS_PIXMAP: type of cursors constructed with
|
||||
gdk_cursor_new_from_pixbuf()
|
||||
|
||||
<!-- ##### FUNCTION gdk_cursor_new ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@cursor_type:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_cursor_new_from_pixbuf ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@display:
|
||||
@pixbuf:
|
||||
@x:
|
||||
@y:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_cursor_new_from_name ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@display:
|
||||
@name:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_cursor_new_for_display ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@display:
|
||||
@cursor_type:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_cursor_get_display ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@cursor:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_cursor_get_image ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@cursor:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_cursor_get_cursor_type ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@cursor:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_cursor_ref ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@cursor:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_cursor_unref ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@cursor:
|
||||
|
||||
|
||||
65
docs/reference/gdk/tmpl/drawing.sgml
Normal file
65
docs/reference/gdk/tmpl/drawing.sgml
Normal file
@@ -0,0 +1,65 @@
|
||||
<!-- ##### SECTION Title ##### -->
|
||||
Drawing Primitives
|
||||
|
||||
<!-- ##### SECTION Short_Description ##### -->
|
||||
Functions for drawing points, lines, arcs, and text
|
||||
|
||||
<!-- ##### SECTION Long_Description ##### -->
|
||||
<para>
|
||||
These functions provide support for drawing points, lines, arcs and text
|
||||
onto what are called 'drawables'. Drawables, as the name suggests, are things
|
||||
which support drawing onto them, and are either #GdkWindow or #GdkPixmap
|
||||
objects.
|
||||
</para>
|
||||
<para>
|
||||
Many of the drawing operations take a #GdkGC argument, which represents a
|
||||
graphics context. This #GdkGC contains a number of drawing attributes such
|
||||
as foreground color, background color and line width, and is used to reduce
|
||||
the number of arguments needed for each drawing operation. See the
|
||||
<link linkend="gdk-Graphics-Contexts">Graphics Contexts</link> section for
|
||||
more information.
|
||||
</para>
|
||||
<para id="pango-data-structures">
|
||||
Some of the drawing operations take Pango data structures like #PangoContext,
|
||||
#PangoLayout or #PangoLayoutLine as arguments. If you're using GTK+, the ususal
|
||||
way to obtain these structures is via gtk_widget_create_pango_context() or
|
||||
gtk_widget_create_pango_layout().
|
||||
</para>
|
||||
|
||||
<!-- ##### SECTION See_Also ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### SECTION Stability_Level ##### -->
|
||||
|
||||
|
||||
<!-- ##### SECTION Image ##### -->
|
||||
|
||||
|
||||
<!-- ##### STRUCT GdkDrawable ##### -->
|
||||
<para>
|
||||
An opaque structure representing an object that can be
|
||||
drawn onto. This can be a #GdkPixmap, a #GdkBitmap,
|
||||
or a #GdkWindow.
|
||||
</para>
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_drawable_get_clip_region ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@drawable:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_drawable_get_visible_region ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@drawable:
|
||||
@Returns:
|
||||
|
||||
|
||||
548
docs/reference/gdk/tmpl/event_structs.sgml
Normal file
548
docs/reference/gdk/tmpl/event_structs.sgml
Normal file
@@ -0,0 +1,548 @@
|
||||
<!-- ##### SECTION Title ##### -->
|
||||
Event Structures
|
||||
|
||||
<!-- ##### SECTION Short_Description ##### -->
|
||||
Data structures specific to each type of event
|
||||
|
||||
<!-- ##### SECTION Long_Description ##### -->
|
||||
<para>
|
||||
The event structs contain data specific to each type of event in GDK.
|
||||
</para>
|
||||
<note>
|
||||
<para>
|
||||
A common mistake is to forget to set the event mask of a widget so that the
|
||||
required events are received. See gtk_widget_set_events().
|
||||
</para>
|
||||
</note>
|
||||
|
||||
<!-- ##### SECTION See_Also ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### SECTION Stability_Level ##### -->
|
||||
|
||||
|
||||
<!-- ##### SECTION Image ##### -->
|
||||
|
||||
|
||||
<!-- ##### UNION GdkEvent ##### -->
|
||||
<para>
|
||||
The #GdkEvent struct contains a union of all of the event structs,
|
||||
and allows access to the data fields in a number of ways.
|
||||
</para>
|
||||
<para>
|
||||
The event type is always the first field in all of the event structs, and
|
||||
can always be accessed with the following code, no matter what type of event
|
||||
it is:
|
||||
<informalexample>
|
||||
<programlisting>
|
||||
GdkEvent *event;
|
||||
GdkEventType type;
|
||||
|
||||
type = event->type;
|
||||
</programlisting>
|
||||
</informalexample>
|
||||
</para>
|
||||
|
||||
<para>
|
||||
To access other fields of the event structs, the pointer to the event can be
|
||||
cast to the appropriate event struct pointer, or the union member name can be
|
||||
used. For example if the event type is %GDK_BUTTON_PRESS then the x coordinate
|
||||
of the button press can be accessed with:
|
||||
<informalexample>
|
||||
<programlisting>
|
||||
GdkEvent *event;
|
||||
gdouble x;
|
||||
|
||||
x = ((GdkEventButton*)event)->x;
|
||||
</programlisting>
|
||||
</informalexample>
|
||||
or:
|
||||
<informalexample>
|
||||
<programlisting>
|
||||
GdkEvent *event;
|
||||
gdouble x;
|
||||
|
||||
x = event->button.x;
|
||||
</programlisting>
|
||||
</informalexample>
|
||||
</para>
|
||||
|
||||
|
||||
<!-- ##### STRUCT GdkEventAny ##### -->
|
||||
<para>
|
||||
Contains the fields which are common to all event structs.
|
||||
Any event pointer can safely be cast to a pointer to a #GdkEventAny to access
|
||||
these fields.
|
||||
</para>
|
||||
|
||||
@type: the type of the event.
|
||||
@window: the window which received the event.
|
||||
@send_event: %TRUE if the event was sent explicitly (e.g. using
|
||||
<function>XSendEvent</function>).
|
||||
|
||||
<!-- ##### STRUCT GdkEventKey ##### -->
|
||||
<para>
|
||||
Describes a key press or key release event.
|
||||
</para>
|
||||
|
||||
@type: the type of the event (%GDK_KEY_PRESS or %GDK_KEY_RELEASE).
|
||||
@window: the window which received the event.
|
||||
@send_event: %TRUE if the event was sent explicitly (e.g. using
|
||||
<function>XSendEvent</function>).
|
||||
@time: the time of the event in milliseconds.
|
||||
@state: a bit-mask representing the state of the modifier keys (e.g. Control,
|
||||
Shift and Alt) and the pointer buttons. See #GdkModifierType.
|
||||
@keyval: the key that was pressed or released. See the
|
||||
<filename><gdk/gdkkeysyms.h></filename>
|
||||
header file for a complete list of GDK key codes.
|
||||
@length: the length of @string.
|
||||
@string: a string containing the an approximation of the text that
|
||||
would result from this keypress. The only correct way to handle text
|
||||
input of text is using input methods (see #GtkIMContext), so this
|
||||
field is deprecated and should never be used.
|
||||
(gdk_unicode_to_keyval() provides a non-deprecated way of getting
|
||||
an approximate translation for a key.) The string is encoded in the encoding
|
||||
of the current locale (Note: this for backwards compatibility:
|
||||
strings in GTK+ and GDK are typically in UTF-8.) and NUL-terminated.
|
||||
In some cases, the translation of the key code will be a single
|
||||
NUL byte, in which case looking at @length is necessary to distinguish
|
||||
it from the an empty translation.
|
||||
@hardware_keycode: the raw code of the key that was pressed or released.
|
||||
@group: the keyboard group.
|
||||
@is_modifier: a flag that indicates if @hardware_keycode is mapped to a
|
||||
modifier. Since 2.10
|
||||
|
||||
<!-- ##### STRUCT GdkEventButton ##### -->
|
||||
<para>
|
||||
Used for button press and button release events. The
|
||||
<structfield>type</structfield> field will be one of %GDK_BUTTON_PRESS,
|
||||
%GDK_2BUTTON_PRESS, %GDK_3BUTTON_PRESS, and %GDK_BUTTON_RELEASE.
|
||||
</para>
|
||||
<para>
|
||||
Double and triple-clicks result in a sequence of events being received.
|
||||
For double-clicks the order of events will be:
|
||||
<orderedlist>
|
||||
<listitem><para>%GDK_BUTTON_PRESS</para></listitem>
|
||||
<listitem><para>%GDK_BUTTON_RELEASE</para></listitem>
|
||||
<listitem><para>%GDK_BUTTON_PRESS</para></listitem>
|
||||
<listitem><para>%GDK_2BUTTON_PRESS</para></listitem>
|
||||
<listitem><para>%GDK_BUTTON_RELEASE</para></listitem>
|
||||
</orderedlist>
|
||||
Note that the first click is received just like a normal
|
||||
button press, while the second click results in a %GDK_2BUTTON_PRESS being
|
||||
received just after the %GDK_BUTTON_PRESS.
|
||||
</para>
|
||||
<para>
|
||||
Triple-clicks are very similar to double-clicks, except that %GDK_3BUTTON_PRESS
|
||||
is inserted after the third click. The order of the events is:
|
||||
<orderedlist>
|
||||
<listitem><para>%GDK_BUTTON_PRESS</para></listitem>
|
||||
<listitem><para>%GDK_BUTTON_RELEASE</para></listitem>
|
||||
<listitem><para>%GDK_BUTTON_PRESS</para></listitem>
|
||||
<listitem><para>%GDK_2BUTTON_PRESS</para></listitem>
|
||||
<listitem><para>%GDK_BUTTON_RELEASE</para></listitem>
|
||||
<listitem><para>%GDK_BUTTON_PRESS</para></listitem>
|
||||
<listitem><para>%GDK_3BUTTON_PRESS</para></listitem>
|
||||
<listitem><para>%GDK_BUTTON_RELEASE</para></listitem>
|
||||
</orderedlist>
|
||||
</para>
|
||||
<para>
|
||||
For a double click to occur, the second button press must occur within 1/4 of
|
||||
a second of the first. For a triple click to occur, the third button press
|
||||
must also occur within 1/2 second of the first button press.
|
||||
</para>
|
||||
|
||||
@type: the type of the event (%GDK_BUTTON_PRESS, %GDK_2BUTTON_PRESS,
|
||||
%GDK_3BUTTON_PRESS or %GDK_BUTTON_RELEASE).
|
||||
@window: the window which received the event.
|
||||
@send_event: %TRUE if the event was sent explicitly (e.g. using
|
||||
<function>XSendEvent</function>).
|
||||
@time: the time of the event in milliseconds.
|
||||
@x: the x coordinate of the pointer relative to the window.
|
||||
@y: the y coordinate of the pointer relative to the window.
|
||||
@axes: @x, @y translated to the axes of @device, or %NULL if @device is
|
||||
the mouse.
|
||||
@state: a bit-mask representing the state of the modifier keys (e.g. Control,
|
||||
Shift and Alt) and the pointer buttons. See #GdkModifierType.
|
||||
@button: the button which was pressed or released, numbered from 1 to 5.
|
||||
Normally button 1 is the left mouse button, 2 is the middle button,
|
||||
and 3 is the right button. On 2-button mice, the middle button can often
|
||||
be simulated by pressing both mouse buttons together.
|
||||
@device: the device where the event originated.
|
||||
@x_root: the x coordinate of the pointer relative to the root of the screen.
|
||||
@y_root: the y coordinate of the pointer relative to the root of the screen.
|
||||
|
||||
<!-- ##### STRUCT GdkEventScroll ##### -->
|
||||
<para>
|
||||
Generated from button presses for the buttons 4 to 7. Wheel mice are
|
||||
usually configured to generate button press events for buttons 4 and 5
|
||||
when the wheel is turned.
|
||||
</para>
|
||||
|
||||
@type: the type of the event (%GDK_SCROLL).
|
||||
@window: the window which received the event.
|
||||
@send_event: %TRUE if the event was sent explicitly (e.g. using
|
||||
<function>XSendEvent</function>).
|
||||
@time: the time of the event in milliseconds.
|
||||
@x: the x coordinate of the pointer relative to the window.
|
||||
@y: the y coordinate of the pointer relative to the window.
|
||||
@state: a bit-mask representing the state of the modifier keys (e.g. Control,
|
||||
Shift and Alt) and the pointer buttons. See #GdkModifierType.
|
||||
@direction: the direction to scroll to (one of %GDK_SCROLL_UP,
|
||||
%GDK_SCROLL_DOWN, %GDK_SCROLL_LEFT and %GDK_SCROLL_RIGHT).
|
||||
@device: the device where the event originated.
|
||||
@x_root: the x coordinate of the pointer relative to the root of the screen.
|
||||
@y_root: the y coordinate of the pointer relative to the root of the screen.
|
||||
|
||||
<!-- ##### STRUCT GdkEventMotion ##### -->
|
||||
<para>
|
||||
Generated when the pointer moves.
|
||||
</para>
|
||||
|
||||
@type: the type of the event.
|
||||
@window: the window which received the event.
|
||||
@send_event: %TRUE if the event was sent explicitly (e.g. using
|
||||
<function>XSendEvent</function>).
|
||||
@time: the time of the event in milliseconds.
|
||||
@x: the x coordinate of the pointer relative to the window.
|
||||
@y: the y coordinate of the pointer relative to the window.
|
||||
@axes: @x, @y translated to the axes of @device, or %NULL if @device is
|
||||
the mouse.
|
||||
@state: a bit-mask representing the state of the modifier keys (e.g. Control,
|
||||
Shift and Alt) and the pointer buttons. See #GdkModifierType.
|
||||
@is_hint: set to 1 if this event is just a hint, see the %GDK_POINTER_MOTION_HINT_MASK
|
||||
value of #GdkEventMask.
|
||||
@device: the device where the event originated.
|
||||
@x_root: the x coordinate of the pointer relative to the root of the screen.
|
||||
@y_root: the y coordinate of the pointer relative to the root of the screen.
|
||||
|
||||
<!-- ##### STRUCT GdkEventExpose ##### -->
|
||||
<para>
|
||||
Generated when all or part of a window becomes visible and needs to be
|
||||
redrawn.
|
||||
</para>
|
||||
|
||||
@type: the type of the event (%GDK_EXPOSE or %GDK_DAMAGE).
|
||||
@window: the window which received the event.
|
||||
@send_event: %TRUE if the event was sent explicitly (e.g. using
|
||||
<function>XSendEvent</function>).
|
||||
@area: bounding box of @region.
|
||||
@region: the region that needs to be redrawn.
|
||||
@count: the number of contiguous %GDK_EXPOSE events following this one.
|
||||
The only use for this is "exposure compression", i.e. handling all contiguous
|
||||
%GDK_EXPOSE events in one go, though GDK performs some exposure compression
|
||||
so this is not normally needed.
|
||||
|
||||
<!-- ##### STRUCT GdkEventVisibility ##### -->
|
||||
<para>
|
||||
Generated when the window visibility status has changed.
|
||||
</para>
|
||||
|
||||
@type: the type of the event (%GDK_VISIBILITY_NOTIFY).
|
||||
@window: the window which received the event.
|
||||
@send_event: %TRUE if the event was sent explicitly (e.g. using
|
||||
<function>XSendEvent</function>).
|
||||
@state: the new visibility state (%GDK_VISIBILITY_FULLY_OBSCURED,
|
||||
%GDK_VISIBILITY_PARTIAL or %GDK_VISIBILITY_UNOBSCURED).
|
||||
|
||||
<!-- ##### STRUCT GdkEventCrossing ##### -->
|
||||
<para>
|
||||
Generated when the pointer enters or leaves a window.
|
||||
</para>
|
||||
|
||||
@type: the type of the event (%GDK_ENTER_NOTIFY or %GDK_LEAVE_NOTIFY).
|
||||
@window: the window which received the event.
|
||||
@send_event: %TRUE if the event was sent explicitly (e.g. using
|
||||
<function>XSendEvent</function>).
|
||||
@subwindow: the window that was entered or left.
|
||||
@time: the time of the event in milliseconds.
|
||||
@x: the x coordinate of the pointer relative to the window.
|
||||
@y: the y coordinate of the pointer relative to the window.
|
||||
@x_root: the x coordinate of the pointer relative to the root of the screen.
|
||||
@y_root: the y coordinate of the pointer relative to the root of the screen.
|
||||
@mode: the crossing mode (%GDK_CROSSING_NORMAL, %GDK_CROSSING_GRAB,
|
||||
%GDK_CROSSING_UNGRAB, %GDK_CROSSING_GTK_GRAB, %GDK_CROSSING_GTK_UNGRAB or
|
||||
%GDK_CROSSING_STATE_CHANGED). %GDK_CROSSING_GTK_GRAB, %GDK_CROSSING_GTK_UNGRAB,
|
||||
and %GDK_CROSSING_STATE_CHANGED were added in 2.14 and are always synthesized,
|
||||
never native.
|
||||
@detail: the kind of crossing that happened (%GDK_NOTIFY_INFERIOR,
|
||||
%GDK_NOTIFY_ANCESTOR, %GDK_NOTIFY_VIRTUAL, %GDK_NOTIFY_NONLINEAR or
|
||||
%GDK_NOTIFY_NONLINEAR_VIRTUAL).
|
||||
@focus: %TRUE if @window is the focus window or an inferior.
|
||||
@state: a bit-mask representing the state of the modifier keys (e.g. Control,
|
||||
Shift and Alt) and the pointer buttons. See #GdkModifierType.
|
||||
|
||||
<!-- ##### STRUCT GdkEventFocus ##### -->
|
||||
<para>
|
||||
Describes a change of keyboard focus.
|
||||
</para>
|
||||
|
||||
@type: the type of the event (%GDK_FOCUS_CHANGE).
|
||||
@window: the window which received the event.
|
||||
@send_event: %TRUE if the event was sent explicitly (e.g. using <function>XSendEvent</function>).
|
||||
@in: %TRUE if the window has gained the keyboard focus, %FALSE if it has lost
|
||||
the focus.
|
||||
|
||||
<!-- ##### STRUCT GdkEventConfigure ##### -->
|
||||
<para>
|
||||
Generated when a window size or position has changed.
|
||||
</para>
|
||||
|
||||
@type: the type of the event (%GDK_CONFIGURE).
|
||||
@window: the window which received the event.
|
||||
@send_event: %TRUE if the event was sent explicitly (e.g. using <function>XSendEvent</function>).
|
||||
@x: the new x coordinate of the window, relative to its parent.
|
||||
@y: the new y coordinate of the window, relative to its parent.
|
||||
@width: the new width of the window.
|
||||
@height: the new height of the window.
|
||||
|
||||
<!-- ##### STRUCT GdkEventProperty ##### -->
|
||||
<para>
|
||||
Describes a property change on a window.
|
||||
</para>
|
||||
|
||||
@type: the type of the event (%GDK_PROPERTY_NOTIFY).
|
||||
@window: the window which received the event.
|
||||
@send_event: %TRUE if the event was sent explicitly (e.g. using <function>XSendEvent</function>).
|
||||
@atom: the property that was changed.
|
||||
@time: the time of the event in milliseconds.
|
||||
@state: whether the property was changed (%GDK_PROPERTY_NEW_VALUE) or
|
||||
deleted (%GDK_PROPERTY_DELETE).
|
||||
|
||||
<!-- ##### STRUCT GdkEventSelection ##### -->
|
||||
<para>
|
||||
Generated when a selection is requested or ownership of a selection
|
||||
is taken over by another client application.
|
||||
</para>
|
||||
|
||||
@type: the type of the event (%GDK_SELECTION_CLEAR, %GDK_SELECTION_NOTIFY or
|
||||
%GDK_SELECTION_REQUEST).
|
||||
@window: the window which received the event.
|
||||
@send_event: %TRUE if the event was sent explicitly (e.g. using <function>XSendEvent</function>).
|
||||
@selection: the selection.
|
||||
@target: the target to which the selection should be converted.
|
||||
@property: the property in which to place the result of the conversion.
|
||||
@time: the time of the event in milliseconds.
|
||||
@requestor: the native window on which to place @property.
|
||||
|
||||
<!-- ##### TYPEDEF GdkNativeWindow ##### -->
|
||||
<para>
|
||||
Used to represent native windows (<type>Window</type>s for the X11 backend,
|
||||
<type>HWND</type>s for Win32).
|
||||
</para>
|
||||
|
||||
|
||||
<!-- ##### STRUCT GdkEventDND ##### -->
|
||||
<para>
|
||||
Generated during DND operations.
|
||||
</para>
|
||||
|
||||
@type: the type of the event (%GDK_DRAG_ENTER, %GDK_DRAG_LEAVE,
|
||||
%GDK_DRAG_MOTION, %GDK_DRAG_STATUS, %GDK_DROP_START or %GDK_DROP_FINISHED).
|
||||
@window: the window which received the event.
|
||||
@send_event: %TRUE if the event was sent explicitly (e.g. using <function>XSendEvent</function>).
|
||||
@context: the #GdkDragContext for the current DND operation.
|
||||
@time: the time of the event in milliseconds.
|
||||
@x_root: the x coordinate of the pointer relative to the root of the screen,
|
||||
only set for %GDK_DRAG_MOTION and %GDK_DROP_START.
|
||||
@y_root: the y coordinate of the pointer relative to the root of the screen,
|
||||
only set for %GDK_DRAG_MOTION and %GDK_DROP_START.
|
||||
|
||||
<!-- ##### STRUCT GdkEventProximity ##### -->
|
||||
<para>
|
||||
Proximity events are generated when using GDK's wrapper for the
|
||||
XInput extension. The XInput extension is an add-on for standard X
|
||||
that allows you to use nonstandard devices such as graphics tablets.
|
||||
A proximity event indicates that the stylus has moved in or out of
|
||||
contact with the tablet, or perhaps that the user's finger has moved
|
||||
in or out of contact with a touch screen.
|
||||
</para>
|
||||
|
||||
@type: the type of the event (%GDK_PROXIMITY_IN or %GDK_PROXIMITY_OUT).
|
||||
@window: the window which received the event.
|
||||
@send_event: %TRUE if the event was sent explicitly (e.g. using <function>XSendEvent</function>).
|
||||
@time: the time of the event in milliseconds.
|
||||
@device: the device where the event originated.
|
||||
|
||||
<!-- ##### STRUCT GdkEventClient ##### -->
|
||||
<para>
|
||||
An event sent by another client application.
|
||||
</para>
|
||||
|
||||
@type: the type of the event (%GDK_CLIENT_EVENT).
|
||||
@window: the window which received the event.
|
||||
@send_event: %TRUE if the event was sent explicitly (e.g. using <function>XSendEvent</function>).
|
||||
@message_type: the type of the message, which can be defined by the
|
||||
application.
|
||||
@data_format: the format of the data, given as the number of bits in each
|
||||
data element, i.e. 8, 16, or 32. 8-bit data uses the b array of the data
|
||||
union, 16-bit data uses the s array, and 32-bit data uses the l array.
|
||||
|
||||
<!-- ##### STRUCT GdkEventNoExpose ##### -->
|
||||
<para>
|
||||
Generated when the area of a #GdkDrawable being copied was completely available.
|
||||
</para>
|
||||
<para>
|
||||
FIXME: add more here.
|
||||
</para>
|
||||
|
||||
@type: the type of the event (%GDK_NO_EXPOSE).
|
||||
@window: the window which received the event.
|
||||
@send_event: %TRUE if the event was sent explicitly (e.g. using <function>XSendEvent</function>).
|
||||
|
||||
<!-- ##### STRUCT GdkEventWindowState ##### -->
|
||||
<para>
|
||||
Generated when the state of a toplevel window changes.
|
||||
</para>
|
||||
|
||||
@type: the type of the event (%GDK_WINDOW_STATE).
|
||||
@window: the window which received the event.
|
||||
@send_event: %TRUE if the event was sent explicitly (e.g. using <function>XSendEvent</function>).
|
||||
@changed_mask: mask specifying what flags have changed.
|
||||
@new_window_state: the new window state, a combination of #GdkWindowState bits.
|
||||
|
||||
<!-- ##### STRUCT GdkEventSetting ##### -->
|
||||
<para>
|
||||
Generated when a setting is modified.
|
||||
</para>
|
||||
|
||||
@type: the type of the event (%GDK_SETTING).
|
||||
@window: the window which received the event.
|
||||
@send_event: %TRUE if the event was sent explicitly (e.g. using <function>XSendEvent</function>).
|
||||
@action: what happened to the setting (%GDK_SETTING_ACTION_NEW,
|
||||
%GDK_SETTING_ACTION_CHANGED or %GDK_SETTING_ACTION_DELETED).
|
||||
@name: the name of the setting.
|
||||
|
||||
<!-- ##### STRUCT GdkEventOwnerChange ##### -->
|
||||
<para>
|
||||
Generated when the owner of a selection changes. On X11, this information is
|
||||
only available if the X server supports the XFIXES extension.
|
||||
</para>
|
||||
|
||||
@type: the type of the event (%GDK_OWNER_CHANGE).
|
||||
@window: the window which received the event
|
||||
@send_event: %TRUE if the event was sent explicitly (e.g. using <function>XSendEvent</function>).
|
||||
@owner: the new owner of the selection
|
||||
@reason: the reason for the ownership change as a #GdkOwnerChange value
|
||||
@selection: the atom identifying the selection
|
||||
@time: the timestamp of the event
|
||||
@selection_time: the time at which the selection ownership was taken over
|
||||
@Since: 2.6
|
||||
|
||||
<!-- ##### STRUCT GdkEventGrabBroken ##### -->
|
||||
<para>
|
||||
Generated when a pointer or keyboard grab is broken. On X11, this happens
|
||||
when the grab window becomes unviewable (i.e. it or one of its ancestors
|
||||
is unmapped), or if the same application grabs the pointer or keyboard
|
||||
again. Note that implicit grabs (which are initiated by button presses)
|
||||
can also cause #GdkEventGrabBroken events.
|
||||
</para>
|
||||
|
||||
@type: the type of the event (%GDK_GRAB_BROKEN)
|
||||
@window: the window which received the event, i.e. the window
|
||||
that previously owned the grab
|
||||
@send_event: %TRUE if the event was sent explicitly (e.g. using <function>XSendEvent</function>).
|
||||
@keyboard: %TRUE if a keyboard grab was broken, %FALSE if a pointer
|
||||
grab was broken
|
||||
@implicit: %TRUE if the broken grab was implicit
|
||||
@grab_window: If this event is caused by another grab in the same
|
||||
application, @grab_window contains the new grab window. Otherwise
|
||||
@grab_window is %NULL.
|
||||
@Since: 2.8
|
||||
|
||||
<!-- ##### ENUM GdkScrollDirection ##### -->
|
||||
<para>
|
||||
Specifies the direction for #GdkEventScroll.
|
||||
</para>
|
||||
|
||||
@GDK_SCROLL_UP: the window is scrolled up.
|
||||
@GDK_SCROLL_DOWN: the window is scrolled down.
|
||||
@GDK_SCROLL_LEFT: the window is scrolled to the left.
|
||||
@GDK_SCROLL_RIGHT: the window is scrolled to the right.
|
||||
|
||||
<!-- ##### ENUM GdkVisibilityState ##### -->
|
||||
<para>
|
||||
Specifies the visiblity status of a window for a #GdkEventVisibility.
|
||||
</para>
|
||||
|
||||
@GDK_VISIBILITY_UNOBSCURED: the window is completely visible.
|
||||
@GDK_VISIBILITY_PARTIAL: the window is partially visible.
|
||||
@GDK_VISIBILITY_FULLY_OBSCURED: the window is not visible at all.
|
||||
|
||||
<!-- ##### ENUM GdkCrossingMode ##### -->
|
||||
<para>
|
||||
Specifies the crossing mode for #GdkEventCrossing.
|
||||
</para>
|
||||
|
||||
@GDK_CROSSING_NORMAL: crossing because of pointer motion.
|
||||
@GDK_CROSSING_GRAB: crossing because a grab is activated.
|
||||
@GDK_CROSSING_UNGRAB: crossing because a grab is deactivated.
|
||||
@GDK_CROSSING_GTK_GRAB: crossing because a GTK+ grab is activated.
|
||||
@GDK_CROSSING_GTK_UNGRAB: crossing because a GTK+ grab is deactivated.
|
||||
@GDK_CROSSING_STATE_CHANGED: crossing because a GTK+ widget changed state (e.g.
|
||||
sensitivity).
|
||||
|
||||
<!-- ##### ENUM GdkNotifyType ##### -->
|
||||
<para>
|
||||
Specifies the kind of crossing for #GdkEventCrossing.
|
||||
</para>
|
||||
<para>
|
||||
See the X11 protocol specification of <type>LeaveNotify</type> for
|
||||
full details of crossing event generation.
|
||||
</para>
|
||||
|
||||
@GDK_NOTIFY_ANCESTOR: the window is entered from an ancestor or
|
||||
left towards an ancestor.
|
||||
@GDK_NOTIFY_VIRTUAL: the pointer moves between an ancestor and an
|
||||
inferior of the window.
|
||||
@GDK_NOTIFY_INFERIOR: the window is entered from an inferior or
|
||||
left towards an inferior.
|
||||
@GDK_NOTIFY_NONLINEAR: the window is entered from or left towards
|
||||
a window which is neither an ancestor nor an inferior.
|
||||
@GDK_NOTIFY_NONLINEAR_VIRTUAL: the pointer moves between two windows
|
||||
which are not ancestors of each other and the window is part of
|
||||
the ancestor chain between one of these windows and their least
|
||||
common ancestor.
|
||||
@GDK_NOTIFY_UNKNOWN: an unknown type of enter/leave event occurred.
|
||||
|
||||
<!-- ##### ENUM GdkPropertyState ##### -->
|
||||
<para>
|
||||
Specifies the type of a property change for a #GdkEventProperty.
|
||||
</para>
|
||||
|
||||
@GDK_PROPERTY_NEW_VALUE: the property value was changed.
|
||||
@GDK_PROPERTY_DELETE: the property was deleted.
|
||||
|
||||
<!-- ##### ENUM GdkWindowState ##### -->
|
||||
<para>
|
||||
Specifies the state of a toplevel window.
|
||||
</para>
|
||||
|
||||
@GDK_WINDOW_STATE_WITHDRAWN: the window is not shown.
|
||||
@GDK_WINDOW_STATE_ICONIFIED: the window is minimized.
|
||||
@GDK_WINDOW_STATE_MAXIMIZED: the window is maximized.
|
||||
@GDK_WINDOW_STATE_STICKY: the window is sticky.
|
||||
@GDK_WINDOW_STATE_FULLSCREEN: the window is maximized without decorations.
|
||||
@GDK_WINDOW_STATE_ABOVE: the window is kept above other windows.
|
||||
@GDK_WINDOW_STATE_BELOW: the window is kept below other windows.
|
||||
|
||||
<!-- ##### ENUM GdkSettingAction ##### -->
|
||||
<para>
|
||||
Specifies the kind of modification applied to a setting in a #GdkEventSetting.
|
||||
</para>
|
||||
|
||||
@GDK_SETTING_ACTION_NEW: a setting was added.
|
||||
@GDK_SETTING_ACTION_CHANGED: a setting was changed.
|
||||
@GDK_SETTING_ACTION_DELETED: a setting was deleted.
|
||||
|
||||
<!-- ##### ENUM GdkOwnerChange ##### -->
|
||||
<para>
|
||||
Specifies why a selection ownership was changed.
|
||||
</para>
|
||||
|
||||
@GDK_OWNER_CHANGE_NEW_OWNER: some other app claimed the ownership
|
||||
@GDK_OWNER_CHANGE_DESTROY: the window was destroyed
|
||||
@GDK_OWNER_CHANGE_CLOSE: the client was closed
|
||||
|
||||
430
docs/reference/gdk/tmpl/events.sgml
Normal file
430
docs/reference/gdk/tmpl/events.sgml
Normal file
@@ -0,0 +1,430 @@
|
||||
<!-- ##### SECTION Title ##### -->
|
||||
Events
|
||||
|
||||
<!-- ##### SECTION Short_Description ##### -->
|
||||
Functions for handling events from the window system
|
||||
|
||||
<!-- ##### SECTION Long_Description ##### -->
|
||||
<para>
|
||||
This section describes functions dealing with events from the window system.
|
||||
</para>
|
||||
<para>
|
||||
In GTK+ applications the events are handled automatically in
|
||||
gtk_main_do_event() and passed on to the appropriate widgets, so these
|
||||
functions are rarely needed. Though some of the fields in the
|
||||
<link linkend="gdk-Event-Structures">Event Structures</link> are useful.
|
||||
</para>
|
||||
|
||||
<!-- ##### SECTION See_Also ##### -->
|
||||
<para>
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><link linkend="gdk-Event-Structures">Event Structures</link></term>
|
||||
<listitem><para>
|
||||
The structs used for each type of event.
|
||||
</para></listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</para>
|
||||
|
||||
<!-- ##### SECTION Stability_Level ##### -->
|
||||
|
||||
|
||||
<!-- ##### SECTION Image ##### -->
|
||||
|
||||
|
||||
<!-- ##### ENUM GdkEventType ##### -->
|
||||
<para>
|
||||
Specifies the type of the event.
|
||||
</para>
|
||||
<para>
|
||||
Do not confuse these events with the signals that GTK+ widgets emit.
|
||||
Although many of these events result in corresponding signals being emitted,
|
||||
the events are often transformed or filtered along the way.
|
||||
</para>
|
||||
|
||||
@GDK_NOTHING: a special code to indicate a null event.
|
||||
@GDK_DELETE: the window manager has requested that the toplevel window be
|
||||
hidden or destroyed, usually when the user clicks on a special icon in the
|
||||
title bar.
|
||||
@GDK_DESTROY: the window has been destroyed.
|
||||
@GDK_EXPOSE: all or part of the window has become visible and needs to be
|
||||
redrawn.
|
||||
@GDK_MOTION_NOTIFY: the pointer (usually a mouse) has moved.
|
||||
@GDK_BUTTON_PRESS: a mouse button has been pressed.
|
||||
@GDK_2BUTTON_PRESS: a mouse button has been double-clicked (clicked twice
|
||||
within a short period of time). Note that each click also generates a
|
||||
%GDK_BUTTON_PRESS event.
|
||||
@GDK_3BUTTON_PRESS: a mouse button has been clicked 3 times in a short period
|
||||
of time. Note that each click also generates a %GDK_BUTTON_PRESS event.
|
||||
@GDK_BUTTON_RELEASE: a mouse button has been released.
|
||||
@GDK_KEY_PRESS: a key has been pressed.
|
||||
@GDK_KEY_RELEASE: a key has been released.
|
||||
@GDK_ENTER_NOTIFY: the pointer has entered the window.
|
||||
@GDK_LEAVE_NOTIFY: the pointer has left the window.
|
||||
@GDK_FOCUS_CHANGE: the keyboard focus has entered or left the window.
|
||||
@GDK_CONFIGURE: the size, position or stacking order of the window has changed.
|
||||
Note that GTK+ discards these events for %GDK_WINDOW_CHILD windows.
|
||||
@GDK_MAP: the window has been mapped.
|
||||
@GDK_UNMAP: the window has been unmapped.
|
||||
@GDK_PROPERTY_NOTIFY: a property on the window has been changed or deleted.
|
||||
@GDK_SELECTION_CLEAR: the application has lost ownership of a selection.
|
||||
@GDK_SELECTION_REQUEST: another application has requested a selection.
|
||||
@GDK_SELECTION_NOTIFY: a selection has been received.
|
||||
@GDK_PROXIMITY_IN: an input device has moved into contact with a sensing
|
||||
surface (e.g. a touchscreen or graphics tablet).
|
||||
@GDK_PROXIMITY_OUT: an input device has moved out of contact with a sensing
|
||||
surface.
|
||||
@GDK_DRAG_ENTER: the mouse has entered the window while a drag is in progress.
|
||||
@GDK_DRAG_LEAVE: the mouse has left the window while a drag is in progress.
|
||||
@GDK_DRAG_MOTION: the mouse has moved in the window while a drag is in
|
||||
progress.
|
||||
@GDK_DRAG_STATUS: the status of the drag operation initiated by the window
|
||||
has changed.
|
||||
@GDK_DROP_START: a drop operation onto the window has started.
|
||||
@GDK_DROP_FINISHED: the drop operation initiated by the window has completed.
|
||||
@GDK_CLIENT_EVENT: a message has been received from another application.
|
||||
@GDK_VISIBILITY_NOTIFY: the window visibility status has changed.
|
||||
@GDK_NO_EXPOSE: indicates that the source region was completely available
|
||||
when parts of a drawable were copied. This is not very useful.
|
||||
@GDK_SCROLL: the scroll wheel was turned
|
||||
@GDK_WINDOW_STATE: the state of a window has changed. See #GdkWindowState
|
||||
for the possible window states
|
||||
@GDK_SETTING: a setting has been modified.
|
||||
@GDK_OWNER_CHANGE: the owner of a selection has changed. This event type
|
||||
was added in 2.6
|
||||
@GDK_GRAB_BROKEN: a pointer or keyboard grab was broken. This event type
|
||||
was added in 2.8.
|
||||
@GDK_DAMAGE: the content of the window has been changed. This event type
|
||||
was added in 2.14.
|
||||
@GDK_EVENT_LAST: marks the end of the GdkEventType enumeration. Added in 2.18
|
||||
|
||||
<!-- ##### ENUM GdkEventMask ##### -->
|
||||
<para>
|
||||
A set of bit-flags to indicate which events a window is to receive.
|
||||
Most of these masks map onto one or more of the #GdkEventType event types
|
||||
above.
|
||||
</para>
|
||||
<para>
|
||||
%GDK_POINTER_MOTION_HINT_MASK is a special mask which is used to reduce the
|
||||
number of %GDK_MOTION_NOTIFY events received. Normally a %GDK_MOTION_NOTIFY
|
||||
event is received each time the mouse moves. However, if the application
|
||||
spends a lot of time processing the event (updating the display, for example),
|
||||
it can lag behind the position of the mouse. When using
|
||||
%GDK_POINTER_MOTION_HINT_MASK, fewer %GDK_MOTION_NOTIFY events will be sent,
|
||||
some of which are marked as a hint (the is_hint member is %TRUE).
|
||||
To receive more motion events after a motion hint event, the application
|
||||
needs to asks for more, by calling gdk_event_request_motions().
|
||||
</para>
|
||||
|
||||
@GDK_EXPOSURE_MASK: receive expose events
|
||||
@GDK_POINTER_MOTION_MASK: receive all pointer motion events
|
||||
@GDK_POINTER_MOTION_HINT_MASK: see the explanation above
|
||||
@GDK_BUTTON_MOTION_MASK: receive pointer motion events while any button is pressed
|
||||
@GDK_BUTTON1_MOTION_MASK: receive pointer motion events while 1 button is pressed
|
||||
@GDK_BUTTON2_MOTION_MASK: receive pointer motion events while 2 button is pressed
|
||||
@GDK_BUTTON3_MOTION_MASK: receive pointer motion events while 3 button is pressed
|
||||
@GDK_BUTTON_PRESS_MASK: receive button press events
|
||||
@GDK_BUTTON_RELEASE_MASK: receive button release events
|
||||
@GDK_KEY_PRESS_MASK: receive key press events
|
||||
@GDK_KEY_RELEASE_MASK: receive key release events
|
||||
@GDK_ENTER_NOTIFY_MASK: receive window enter events
|
||||
@GDK_LEAVE_NOTIFY_MASK: receive window leave events
|
||||
@GDK_FOCUS_CHANGE_MASK: receive focus change events
|
||||
@GDK_STRUCTURE_MASK: receive events about window configuration change
|
||||
@GDK_PROPERTY_CHANGE_MASK: receive property change events
|
||||
@GDK_VISIBILITY_NOTIFY_MASK: receive visibility change events
|
||||
@GDK_PROXIMITY_IN_MASK: receive proximity in events
|
||||
@GDK_PROXIMITY_OUT_MASK: receive proximity out events
|
||||
@GDK_SUBSTRUCTURE_MASK: receive events about window configuration changes of
|
||||
child windows
|
||||
@GDK_SCROLL_MASK: receive scroll events
|
||||
@GDK_ALL_EVENTS_MASK: the combination of all the above event masks.
|
||||
|
||||
<!-- ##### MACRO GDK_CURRENT_TIME ##### -->
|
||||
<para>
|
||||
Represents the current time, and can be used anywhere a time is expected.
|
||||
</para>
|
||||
|
||||
|
||||
|
||||
<!-- ##### MACRO GDK_PRIORITY_EVENTS ##### -->
|
||||
<para>
|
||||
This is the priority that events from the X server are given in the
|
||||
<link linkend="glib-The-Main-Event-Loop">GLib Main Loop</link>.
|
||||
</para>
|
||||
|
||||
|
||||
|
||||
<!-- ##### MACRO GDK_PRIORITY_REDRAW ##### -->
|
||||
<para>
|
||||
This is the priority that the idle handler processing window updates
|
||||
is given in the <link linkend="glib-The-Main-Event-Loop">GLib Main Loop</link>.
|
||||
</para>
|
||||
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_events_pending ##### -->
|
||||
<para>
|
||||
</para>
|
||||
|
||||
@void:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_event_peek ##### -->
|
||||
<para>
|
||||
</para>
|
||||
|
||||
@void:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_event_get ##### -->
|
||||
<para>
|
||||
</para>
|
||||
|
||||
@void:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_event_put ##### -->
|
||||
<para>
|
||||
</para>
|
||||
|
||||
@event:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_event_new ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@type:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_event_copy ##### -->
|
||||
<para>
|
||||
</para>
|
||||
|
||||
@event:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_event_free ##### -->
|
||||
<para>
|
||||
</para>
|
||||
|
||||
@event: a #GdkEvent.
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_event_get_time ##### -->
|
||||
<para>
|
||||
</para>
|
||||
|
||||
@event:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_event_get_state ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@event:
|
||||
@state:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_event_get_axis ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@event:
|
||||
@axis_use:
|
||||
@value:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_event_get_coords ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@event:
|
||||
@x_win:
|
||||
@y_win:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_event_get_root_coords ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@event:
|
||||
@x_root:
|
||||
@y_root:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_event_request_motions ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@event:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_events_get_angle ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@event1:
|
||||
@event2:
|
||||
@angle:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_events_get_center ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@event1:
|
||||
@event2:
|
||||
@x:
|
||||
@y:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_events_get_distance ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@event1:
|
||||
@event2:
|
||||
@distance:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_event_handler_set ##### -->
|
||||
<para>
|
||||
</para>
|
||||
|
||||
@func:
|
||||
@data:
|
||||
@notify:
|
||||
|
||||
|
||||
<!-- ##### USER_FUNCTION GdkEventFunc ##### -->
|
||||
<para>
|
||||
Specifies the type of function passed to gdk_event_handler_set() to handle
|
||||
all GDK events.
|
||||
</para>
|
||||
|
||||
@event: the #GdkEvent to process.
|
||||
@data: user data set when the event handler was installed with
|
||||
gdk_event_handler_set().
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_event_send_client_message ##### -->
|
||||
<para>
|
||||
</para>
|
||||
|
||||
@event:
|
||||
@winid:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_event_send_client_message_for_display ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@display:
|
||||
@event:
|
||||
@winid:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_event_send_clientmessage_toall ##### -->
|
||||
<para>
|
||||
</para>
|
||||
|
||||
@event:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_add_client_message_filter ##### -->
|
||||
<para>
|
||||
</para>
|
||||
|
||||
@message_type:
|
||||
@func:
|
||||
@data:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_get_show_events ##### -->
|
||||
<para>
|
||||
</para>
|
||||
|
||||
@void:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_set_show_events ##### -->
|
||||
<para>
|
||||
</para>
|
||||
|
||||
@show_events:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_event_set_screen ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@event:
|
||||
@screen:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_event_get_screen ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@event:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_event_get_device ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@event:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_event_set_device ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@event:
|
||||
@device:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_setting_get ##### -->
|
||||
<para>
|
||||
</para>
|
||||
|
||||
@name:
|
||||
@value:
|
||||
@Returns:
|
||||
|
||||
|
||||
986
docs/reference/gdk/tmpl/gdk-unused.sgml
Normal file
986
docs/reference/gdk/tmpl/gdk-unused.sgml
Normal file
@@ -0,0 +1,986 @@
|
||||
<!-- ##### SECTION ./tmpl/color_contexts.sgml:Long_Description ##### -->
|
||||
<para>
|
||||
The #GdkColorContext type is used for allocating groups of colors.
|
||||
</para>
|
||||
<para>
|
||||
It is now deprecated in favor of the gdk_colormap_*() functions described in
|
||||
the <link linkend="gdk-Colormaps-and-Colors">Colormaps and Colors</link>
|
||||
section.
|
||||
</para>
|
||||
|
||||
|
||||
<!-- ##### SECTION ./tmpl/color_contexts.sgml:See_Also ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
|
||||
<!-- ##### SECTION ./tmpl/color_contexts.sgml:Short_Description ##### -->
|
||||
routines for allocating colors (deprecated).
|
||||
|
||||
|
||||
<!-- ##### SECTION ./tmpl/color_contexts.sgml:Title ##### -->
|
||||
Color Contexts
|
||||
|
||||
|
||||
<!-- ##### SECTION ./tmpl/input_contexts.sgml:Long_Description ##### -->
|
||||
<para>
|
||||
A #GdkIC input context is used for each user interface element which supports
|
||||
internationalized text input. See the
|
||||
<link linkend="gdk-Input-Methods">Input Methods</link> section for an overview
|
||||
of how internationalized text input works in GTK+.
|
||||
</para>
|
||||
|
||||
|
||||
<!-- ##### SECTION ./tmpl/input_contexts.sgml:See_Also ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
|
||||
<!-- ##### SECTION ./tmpl/input_contexts.sgml:Short_Description ##### -->
|
||||
internationalized text input properties.
|
||||
|
||||
|
||||
<!-- ##### SECTION ./tmpl/input_contexts.sgml:Title ##### -->
|
||||
Input Contexts
|
||||
|
||||
|
||||
<!-- ##### SECTION ./tmpl/input_methods.sgml:Long_Description ##### -->
|
||||
<para>
|
||||
Input Methods provide a way for complex character sets to be used in GTK+.
|
||||
Languages such as Chinese, Japanese, and Korean (often abbreviated to CJK)
|
||||
use a large number of ideographs, making it impossible to support all
|
||||
characters with a simple keyboard. Instead, text is usually
|
||||
<emphasis>pre-edited</emphasis> using a phonetic alphabet and then
|
||||
<emphasis>composed</emphasis> to form the ideographs.
|
||||
</para>
|
||||
<para>
|
||||
GTK+ makes use of the input method mechanism provided by the X Windows
|
||||
platform. When a GTK+ application is started, it opens a connection to the
|
||||
input method appropriate for the current locale (if any).
|
||||
</para>
|
||||
<para>
|
||||
Widgets which handle textual input, such as #GtkEntry, need to do a number of
|
||||
things to support internationalized text input:
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term>When the widget is realized:</term>
|
||||
<listitem><para>Check if an input method is being used with gdk_im_ready().
|
||||
If it is, create a new <link linkend="gdk-Input-Contexts">Input Context</link>
|
||||
using gdk_ic_new(). Find out which events the
|
||||
<link linkend="gdk-Input-Contexts">Input Context</link> needs to receive
|
||||
with gdk_ic_get_events(), and make sure that the widget's window receives
|
||||
these events using gdk_window_set_events().
|
||||
</para></listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term>When the widget's size, state or cursor position changes:</term>
|
||||
<listitem><para>
|
||||
Update the appropriate
|
||||
<link linkend="gdk-Input-Contexts">Input Context</link> attributes
|
||||
using gdk_ic_set_attr().
|
||||
</para></listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term>When the keyboard focus enters or leaves the widget:</term>
|
||||
<listitem><para>
|
||||
Call gdk_im_begin() or gdk_im_end() to start or finish editing the text.
|
||||
</para></listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term>When the widget receives a key_press event:</term>
|
||||
<listitem><para>
|
||||
The <structfield>string</structfield> and <structfield>length</structfield>
|
||||
fields of the #GdkEventKey struct should be used to insert the composed text
|
||||
into the widget.
|
||||
</para></listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term>When the widget is unrealized:</term>
|
||||
<listitem><para>
|
||||
Destroy the <link linkend="gdk-Input-Contexts">Input Context</link>.
|
||||
</para></listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
|
||||
</para>
|
||||
<para>
|
||||
See the XLib reference manual for more detailed information on input methods,
|
||||
and the #GtkEntry and #GtkText widgets for some example code.
|
||||
</para>
|
||||
|
||||
|
||||
<!-- ##### SECTION ./tmpl/input_methods.sgml:See_Also ##### -->
|
||||
<para>
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><link linkend="gdk-Input-Contexts">Input Contexts</link></term>
|
||||
<listitem><para>
|
||||
Used for each widget that handles internationalized text input using the
|
||||
global input method.
|
||||
</para></listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
|
||||
</para>
|
||||
|
||||
|
||||
<!-- ##### SECTION ./tmpl/input_methods.sgml:Short_Description ##### -->
|
||||
support for internationalized text input.
|
||||
|
||||
|
||||
<!-- ##### SECTION ./tmpl/input_methods.sgml:Title ##### -->
|
||||
Input Methods
|
||||
|
||||
|
||||
<!-- ##### MACRO GDK_CORE_POINTER ##### -->
|
||||
<para>
|
||||
This macro contains an integer value representing
|
||||
the device ID for the core pointer device.
|
||||
</para>
|
||||
|
||||
|
||||
<!-- ##### MACRO GDK_GC_X11 ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@object:
|
||||
|
||||
<!-- ##### MACRO GDK_GC_X11_GET_CLASS ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@obj:
|
||||
|
||||
<!-- ##### MACRO GDK_WINDOWING_FB ##### -->
|
||||
<para>
|
||||
This macro is defined if GDK is configured to use the Linux framebuffer backend.
|
||||
</para>
|
||||
|
||||
|
||||
<!-- ##### MACRO GDK_WINDOWING_NANOX ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
|
||||
<!-- ##### STRUCT GdkColorContext ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@visual:
|
||||
@colormap:
|
||||
@num_colors:
|
||||
@max_colors:
|
||||
@num_allocated:
|
||||
@mode:
|
||||
@need_to_free_colormap:
|
||||
@std_cmap_atom:
|
||||
@clut:
|
||||
@cmap:
|
||||
@color_hash:
|
||||
@palette:
|
||||
@num_palette:
|
||||
@fast_dither:
|
||||
|
||||
<!-- ##### STRUCT GdkColorContextDither ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@fast_rgb:
|
||||
@fast_err:
|
||||
@fast_erg:
|
||||
@fast_erb:
|
||||
|
||||
<!-- ##### ENUM GdkColorContextMode ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@GDK_CC_MODE_UNDEFINED:
|
||||
@GDK_CC_MODE_BW:
|
||||
@GDK_CC_MODE_STD_CMAP:
|
||||
@GDK_CC_MODE_TRUE:
|
||||
@GDK_CC_MODE_MY_GRAY:
|
||||
@GDK_CC_MODE_PALETTE:
|
||||
|
||||
<!-- ##### STRUCT GdkDeviceClass ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
|
||||
<!-- ##### STRUCT GdkDeviceInfo ##### -->
|
||||
<para>
|
||||
The #GdkDeviceInfo structure contains information about a
|
||||
device. It has the following fields:
|
||||
</para>
|
||||
|
||||
@deviceid: a unique integer ID for this device.
|
||||
@name: the human-readable name for the device.
|
||||
@source: the type of device.
|
||||
@mode: a value indicating whether the device is enabled and
|
||||
how the device coordinates map to the screen.
|
||||
@has_cursor: if %TRUE, a cursor will be displayed indicating
|
||||
the current on-screen location to the user. Otherwise,
|
||||
the application is responsible for drawing a cursor
|
||||
itself.
|
||||
@num_axes: the number of axes for this device.
|
||||
@axes: a pointer to an array of GdkAxisUse values which
|
||||
give the mapping of axes onto the possible valuators
|
||||
for a GDK device.
|
||||
@num_keys: the number of macro buttons.
|
||||
@keys: a pointer to an array of #GdkDeviceKey structures
|
||||
which describe what key press events are generated
|
||||
for each macro button.
|
||||
|
||||
<!-- ##### STRUCT GdkDrawableClass ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
|
||||
<!-- ##### STRUCT GdkGCClass ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
|
||||
<!-- ##### STRUCT GdkIC ##### -->
|
||||
<para>
|
||||
The #GdkIC struct is an opaque structure representing an input context
|
||||
for use with the global <link linkend="gdk-Input-Methods">Input Method</link>.
|
||||
</para>
|
||||
|
||||
|
||||
<!-- ##### STRUCT GdkICAttr ##### -->
|
||||
<para>
|
||||
The #GdkICAttr struct is used when getting and setting attributes of the
|
||||
input context. It is used together with a #GdkICAttributesType mask which
|
||||
specifies which of the fields are being set or returned.
|
||||
</para>
|
||||
|
||||
@style: the pre-edit and status style. This attribute is required when
|
||||
creating the #GdkIC, and cannot be changed.
|
||||
@client_window: the #GdkWindow in which the input method will display its
|
||||
pre-edit and status areas or create subwindows.
|
||||
The preedit_area and status_area attributes are specified relative to this
|
||||
window. This attribute is required when creating the #GdkIC, and cannot be
|
||||
changed.
|
||||
@focus_window: the #GdkWindow which is to be used when editing text.
|
||||
gdk_im_begin() sets this attribute before starting the text input process,
|
||||
so it is normally not necessary to set it elsewhere.
|
||||
@filter_events: the mask of events that the input method requires.
|
||||
See the gdk_ic_get_events() function. This attribute is read-only and is
|
||||
never changed.
|
||||
@spot_location: the position of the insertion cursor, for use with the
|
||||
%GDK_IM_PREEDIT_POSITION style. The y coordinate specifies the baseline of
|
||||
the text.
|
||||
@line_spacing: the line spacing to be used in the pre-edit and status areas
|
||||
when displaying multi-line text.
|
||||
@cursor: the cursor to use in the input method's windows.
|
||||
If this attribute isn't set it is determined by the input method.
|
||||
@preedit_fontset: the font to use for the pre-edit area.
|
||||
If this attribute isn't set it is determined by the input method.
|
||||
@preedit_area: the area in which the input method will display pre-editing
|
||||
data, used for the %GDK_IM_PREEDIT_POSITION and %GDK_IM_PREEDIT_AREA styles.
|
||||
@preedit_area_needed: the area that the input method requests for displaying
|
||||
pre-editing data, used for the %GDK_IM_PREEDIT_POSITION and
|
||||
%GDK_IM_PREEDIT_AREA styles.
|
||||
@preedit_foreground: the foreground color to use for the pre-edit area.
|
||||
This color must already be allocated in the preedit_colormap.
|
||||
If this attribute isn't set it is determined by the input method.
|
||||
@preedit_background: the background color to use for the pre-edit area.
|
||||
This color must already be allocated in the preedit_colormap.
|
||||
If this attribute isn't set it is determined by the input method.
|
||||
@preedit_pixmap: the background pixmap to use for the pre-edit area.
|
||||
If this attribute isn't set it is determined by the input method.
|
||||
@preedit_colormap: the colormap the input method should use to allocate colors.
|
||||
The default value is the colormap of client_window.
|
||||
@status_fontset: the font to use for the status area.
|
||||
If this attribute isn't set it is determined by the input method.
|
||||
@status_area: the are that the input method will display status information in.
|
||||
This is used for the %GDK_IM_STATUS_AREA style.
|
||||
@status_area_needed: the size that the input method requests for displaying
|
||||
status information, for the %GDK_IM_STATUS_AREA style.
|
||||
@status_foreground: the foreground color to use for the status area.
|
||||
This color must already be allocated in the status_colormap.
|
||||
If this attribute isn't set it is determined by the input method.
|
||||
@status_background: the background color to use for the status area.
|
||||
This color must already be allocated in the status_colormap.
|
||||
If this attribute isn't set it is determined by the input method.
|
||||
@status_pixmap: the background pixmap to use for the status area.
|
||||
If this attribute isn't set it is determined by the input method.
|
||||
@status_colormap: the colormap the input method should use to allocate colors.
|
||||
The default value is the colormap of client_window.
|
||||
|
||||
<!-- ##### ENUM GdkICAttributesType ##### -->
|
||||
<para>
|
||||
The #GdkICAttributesType contains a set of bit-flags which are used to
|
||||
specify which of the attributes in a #GdkICAttr are being set or returned.
|
||||
</para>
|
||||
<para>
|
||||
It also contains several combinations of the flags which specify required
|
||||
attributes for the various styles:
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term>%GDK_IC_ALL_REQ:</term>
|
||||
<listitem><para>
|
||||
the set of attributes required for all styles.
|
||||
</para></listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term>%GDK_IC_PREEDIT_AREA_REQ:</term>
|
||||
<listitem><para>
|
||||
the set of additional attributes required for the
|
||||
%GDK_IM_PREEDIT_AREA pre-edit style.
|
||||
</para></listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term>%GDK_IC_PREEDIT_POSITION_REQ:</term>
|
||||
<listitem><para>
|
||||
the set of additional attributes required for the
|
||||
%GDK_IM_PREEDIT_POSITION pre-edit style.
|
||||
</para></listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term>%GDK_IC_STATUS_AREA_REQ:</term>
|
||||
<listitem><para>
|
||||
the set of additional attributes required for the
|
||||
%GDK_IM_STATUS_AREA status style.
|
||||
</para></listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</para>
|
||||
|
||||
@GDK_IC_STYLE:
|
||||
@GDK_IC_CLIENT_WINDOW:
|
||||
@GDK_IC_FOCUS_WINDOW:
|
||||
@GDK_IC_FILTER_EVENTS:
|
||||
@GDK_IC_SPOT_LOCATION:
|
||||
@GDK_IC_LINE_SPACING:
|
||||
@GDK_IC_CURSOR:
|
||||
@GDK_IC_PREEDIT_FONTSET:
|
||||
@GDK_IC_PREEDIT_AREA:
|
||||
@GDK_IC_PREEDIT_AREA_NEEDED:
|
||||
@GDK_IC_PREEDIT_FOREGROUND:
|
||||
@GDK_IC_PREEDIT_BACKGROUND:
|
||||
@GDK_IC_PREEDIT_PIXMAP:
|
||||
@GDK_IC_PREEDIT_COLORMAP:
|
||||
@GDK_IC_STATUS_FONTSET:
|
||||
@GDK_IC_STATUS_AREA:
|
||||
@GDK_IC_STATUS_AREA_NEEDED:
|
||||
@GDK_IC_STATUS_FOREGROUND:
|
||||
@GDK_IC_STATUS_BACKGROUND:
|
||||
@GDK_IC_STATUS_PIXMAP:
|
||||
@GDK_IC_STATUS_COLORMAP:
|
||||
@GDK_IC_ALL_REQ:
|
||||
@GDK_IC_PREEDIT_AREA_REQ:
|
||||
@GDK_IC_PREEDIT_POSITION_REQ:
|
||||
@GDK_IC_STATUS_AREA_REQ:
|
||||
|
||||
<!-- ##### ENUM GdkIMStyle ##### -->
|
||||
<para>
|
||||
A set of bit-flags used to specify the input method styles which are supported
|
||||
or which are currently in use. The flags can be divided into 2 groups, the
|
||||
pre-edit flags and the status flags.
|
||||
</para>
|
||||
<para>
|
||||
The pre-edit flags specify how pre-editing data is displayed.
|
||||
For example, this could display the text being typed in the phonetic
|
||||
alphabet before it is composed and inserted as an ideograph.
|
||||
</para>
|
||||
<para>
|
||||
The status flags specify how status information is displayed.
|
||||
The status information can be thought of as an extension of the
|
||||
standard keyboard mode indicators, such as the Caps Lock indicator.
|
||||
</para>
|
||||
<note>
|
||||
<para>
|
||||
The %GDK_IM_PREEDIT_CALLBACKS and %GDK_IM_STATUS_CALLBACKS styles are not
|
||||
currently supported in GTK+.
|
||||
</para>
|
||||
</note>
|
||||
|
||||
@GDK_IM_PREEDIT_AREA: The application provides the input method with an area
|
||||
in which to perform <emphasis>off-the-spot</emphasis> pre-editing.
|
||||
@GDK_IM_PREEDIT_CALLBACKS: The application registers a number of callback
|
||||
functions which are used to display pre-editing data.
|
||||
@GDK_IM_PREEDIT_POSITION: The application provides the input method with the
|
||||
position of the insertion cursor, for <emphasis>over-the-spot</emphasis>
|
||||
pre-editing. The input method creates its own window over the widget to
|
||||
display the pre-editing data.
|
||||
@GDK_IM_PREEDIT_NOTHING: The input method uses the root X window to perform
|
||||
pre-editing, so the application does not need to do anything.
|
||||
@GDK_IM_PREEDIT_NONE: No pre-editing is done by the input method, or no
|
||||
pre-editing data needs to be displayed.
|
||||
@GDK_IM_PREEDIT_MASK: A bit-mask containing all the pre-edit flags.
|
||||
@GDK_IM_STATUS_AREA: The application provides the input method with an area
|
||||
in which to display status information.
|
||||
@GDK_IM_STATUS_CALLBACKS: The applications registers a number of callback
|
||||
functions which are used to display status information.
|
||||
@GDK_IM_STATUS_NOTHING: The input method uses the root X window to display
|
||||
status information, so the application does not need to do anything.
|
||||
@GDK_IM_STATUS_NONE: The input method does not display status information.
|
||||
@GDK_IM_STATUS_MASK: A bit-mask containing all the status flags.
|
||||
|
||||
<!-- ##### STRUCT GdkKeyInfo ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@keycode:
|
||||
@group:
|
||||
@level:
|
||||
|
||||
<!-- ##### STRUCT GdkKeymapClass ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
|
||||
<!-- ##### ENUM GdkPixbufAlphaMode ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@GDK_PIXBUF_ALPHA_BILEVEL:
|
||||
@GDK_PIXBUF_ALPHA_FULL:
|
||||
|
||||
<!-- ##### STRUCT GdkWindowRedirect ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_color_context_add_palette ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@cc:
|
||||
@palette:
|
||||
@num_palette:
|
||||
@Returns:
|
||||
|
||||
<!-- ##### FUNCTION gdk_color_context_free ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@cc:
|
||||
|
||||
<!-- ##### FUNCTION gdk_color_context_free_dither ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@cc:
|
||||
|
||||
<!-- ##### FUNCTION gdk_color_context_get_index_from_palette ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@cc:
|
||||
@red:
|
||||
@green:
|
||||
@blue:
|
||||
@failed:
|
||||
@Returns:
|
||||
|
||||
<!-- ##### FUNCTION gdk_color_context_get_pixel ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@cc:
|
||||
@red:
|
||||
@green:
|
||||
@blue:
|
||||
@failed:
|
||||
@Returns:
|
||||
|
||||
<!-- ##### FUNCTION gdk_color_context_get_pixel_from_palette ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@cc:
|
||||
@red:
|
||||
@green:
|
||||
@blue:
|
||||
@failed:
|
||||
@Returns:
|
||||
|
||||
<!-- ##### FUNCTION gdk_color_context_get_pixels ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@cc:
|
||||
@reds:
|
||||
@greens:
|
||||
@blues:
|
||||
@ncolors:
|
||||
@colors:
|
||||
@nallocated:
|
||||
|
||||
<!-- ##### FUNCTION gdk_color_context_get_pixels_incremental ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@cc:
|
||||
@reds:
|
||||
@greens:
|
||||
@blues:
|
||||
@ncolors:
|
||||
@used:
|
||||
@colors:
|
||||
@nallocated:
|
||||
|
||||
<!-- ##### FUNCTION gdk_color_context_init_dither ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@cc:
|
||||
|
||||
<!-- ##### FUNCTION gdk_color_context_new ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@visual:
|
||||
@colormap:
|
||||
@Returns:
|
||||
|
||||
<!-- ##### FUNCTION gdk_color_context_new_mono ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@visual:
|
||||
@colormap:
|
||||
@Returns:
|
||||
|
||||
<!-- ##### FUNCTION gdk_color_context_query_color ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@cc:
|
||||
@color:
|
||||
@Returns:
|
||||
|
||||
<!-- ##### FUNCTION gdk_color_context_query_colors ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@cc:
|
||||
@colors:
|
||||
@num_colors:
|
||||
@Returns:
|
||||
|
||||
<!-- ##### VARIABLE gdk_core_pointer ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
|
||||
<!-- ##### VARIABLE gdk_display_name ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_display_set_sm_client_id ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@display:
|
||||
@sm_client_id:
|
||||
|
||||
<!-- ##### FUNCTION gdk_font_full_name_free ##### -->
|
||||
<para>
|
||||
Frees a full font name obtained from gdk_font_full_name_get().
|
||||
</para>
|
||||
|
||||
@name: a full font name.
|
||||
|
||||
<!-- ##### FUNCTION gdk_font_full_name_get ##### -->
|
||||
<para>
|
||||
Returns a comma-separated list of XLFDs for the
|
||||
fonts making up a given #GdkFont.
|
||||
</para>
|
||||
|
||||
@font: a #GdkFont
|
||||
@Returns: a newly-allocated string containing a list of XLFDs,
|
||||
should be freed with gdk_font_full_name_free() when no longer needed.
|
||||
|
||||
<!-- ##### FUNCTION gdk_get_client_window ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@dpy:
|
||||
@win:
|
||||
@Returns:
|
||||
|
||||
<!-- ##### FUNCTION gdk_get_default_display ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@Returns:
|
||||
|
||||
<!-- ##### FUNCTION gdk_get_default_screen ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@Returns:
|
||||
|
||||
<!-- ##### FUNCTION gdk_ic_attr_destroy ##### -->
|
||||
<para>
|
||||
Destroys the given #GdkICAttr struct, freeing the allocated memory.
|
||||
</para>
|
||||
|
||||
@attr: a #GdkICAttr struct.
|
||||
|
||||
<!-- ##### FUNCTION gdk_ic_attr_new ##### -->
|
||||
<para>
|
||||
Creates a new #GdkICAttr struct, with all fields set to 0.
|
||||
The #GdkICAttr struct should be freed with gdk_ic_attr_destroy() when no
|
||||
longer needed.
|
||||
</para>
|
||||
|
||||
@Returns: a new #GdkICAttr struct.
|
||||
|
||||
<!-- ##### FUNCTION gdk_ic_destroy ##### -->
|
||||
<para>
|
||||
Destroys the input context.
|
||||
</para>
|
||||
|
||||
@ic: a #GdkIC.
|
||||
|
||||
<!-- ##### FUNCTION gdk_ic_get_attr ##### -->
|
||||
<para>
|
||||
Gets attributes of a #GdkIC.
|
||||
</para>
|
||||
|
||||
@ic: a #GdkIC.
|
||||
@attr: a #GdkICAttr struct to contain the returned attributes.
|
||||
@mask: a #GdkICAttributesType mask specifying which attributes to get.
|
||||
@Returns: a #GdkICAttributesType mask specifying which of the attributes
|
||||
were not retrieved succesfully.
|
||||
|
||||
<!-- ##### FUNCTION gdk_ic_get_events ##### -->
|
||||
<para>
|
||||
Returns the mask of events that the input method needs to function properly.
|
||||
This is typically called in a widget's realize method after creating the
|
||||
#GdkIC. The returned event mask is then combined with the widget's
|
||||
own event mask and applied using gdk_window_set_events().
|
||||
</para>
|
||||
|
||||
@ic: a #GdkIC.
|
||||
@Returns: the mask of events that the input method needs to function
|
||||
properly.
|
||||
|
||||
<!-- ##### FUNCTION gdk_ic_get_style ##### -->
|
||||
<para>
|
||||
Returns the pre-edit and status style of the #GdkIC.
|
||||
</para>
|
||||
|
||||
@ic: a #GdkIC.
|
||||
@Returns: the pre-edit and status style of the #GdkIC.
|
||||
|
||||
<!-- ##### FUNCTION gdk_ic_new ##### -->
|
||||
<para>
|
||||
Creates a new #GdkIC using the given attributes.
|
||||
</para>
|
||||
|
||||
@attr: a #GdkICAttr struct containing attributes to use for the input context.
|
||||
@mask: a #GdkICAttributesType mask specifying which of the attributes in @attr
|
||||
are set.
|
||||
@Returns: a new #GdkIC.
|
||||
|
||||
<!-- ##### FUNCTION gdk_ic_set_attr ##### -->
|
||||
<para>
|
||||
Sets attributes of the #GdkIC.
|
||||
</para>
|
||||
<para>
|
||||
Note that the GDK_IC_STYLE and GDK_IC_CLIENT_WINDOW attributes can only be set
|
||||
when creating the #GdkIC, and the GDK_IC_FILTER_EVENTS attribute is read-only.
|
||||
</para>
|
||||
|
||||
@ic: a #GdkIC.
|
||||
@attr: a #GdkICAttr struct containing attributes to use for the input context.
|
||||
@mask: a #GdkICAttributesType mask specifying which of the attributes in @attr
|
||||
are set.
|
||||
@Returns: a #GdkICAttributesType mask indicating which of the attributes
|
||||
were not set successfully.
|
||||
|
||||
<!-- ##### FUNCTION gdk_im_begin ##### -->
|
||||
<para>
|
||||
Starts editing, using the given input context and #GdkWindow.
|
||||
This should be called when the widget receives the input focus, typically in
|
||||
the widget's focus_in_event method.
|
||||
</para>
|
||||
|
||||
@ic: a #GdkIC.
|
||||
@window: the #GdkWindow which will be receiving the key press events.
|
||||
|
||||
<!-- ##### FUNCTION gdk_im_decide_style ##### -->
|
||||
<para>
|
||||
Decides which input method style should be used, by comparing the styles given
|
||||
in @supported_style with those of the available input method.
|
||||
</para>
|
||||
|
||||
@supported_style: styles which are supported by the widget.
|
||||
@Returns: the best style in @supported_style that is also supported by the
|
||||
available input method.
|
||||
|
||||
<!-- ##### FUNCTION gdk_im_end ##### -->
|
||||
<para>
|
||||
Stops editing using the input method.
|
||||
This should be called when the widget loses the input focus, typically in
|
||||
the widget's focus_out_event method.
|
||||
</para>
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_im_ready ##### -->
|
||||
<para>
|
||||
Checks if an input method is to be used for the current locale.
|
||||
If GTK+ has been compiled without support for input methods, or the current
|
||||
locale doesn't need an input method, then this will return FALSE.
|
||||
</para>
|
||||
|
||||
@Returns: TRUE if an input method is available and should be used.
|
||||
|
||||
<!-- ##### FUNCTION gdk_im_set_best_style ##### -->
|
||||
<para>
|
||||
Sets the best pre-edit and/or status style which should be used.
|
||||
This will affect the style chosen in gdk_im_decide_style().
|
||||
</para>
|
||||
<para>
|
||||
The order of the pre-edit styles is (from worst to best):
|
||||
%GDK_IM_PREEDIT_NONE, %GDK_IM_PREEDIT_NOTHING, %GDK_IM_PREEDIT_AREA,
|
||||
%GDK_IM_PREEDIT_POSITION, %GDK_IM_PREEDIT_CALLBACKS.
|
||||
The order of the status styles is:
|
||||
%GDK_IM_STATUS_NONE, %GDK_IM_STATUS_NOTHING, %GDK_IM_STATUS_AREA,
|
||||
%GDK_IM_STATUS_CALLBACKS.
|
||||
</para>
|
||||
<para>
|
||||
So, for example, to set the best allowed pre-edit style to %GDK_IM_PREEDIT_AREA
|
||||
you would do this:
|
||||
|
||||
<informalexample>
|
||||
<programlisting>
|
||||
gdk_im_set_best_style (GDK_IM_PREEDIT_AREA);
|
||||
</programlisting>
|
||||
</informalexample>
|
||||
|
||||
Or to set the best allowed pre-edit style to %GDK_IM_PREEDIT_POSITION and the
|
||||
best allowed status style to %GDK_IM_STATUS_NOTHING you can do this:
|
||||
|
||||
<informalexample>
|
||||
<programlisting>
|
||||
gdk_im_set_best_style (GDK_IM_PREEDIT_POSITION | GDK_IM_STATUS_NOTHING);
|
||||
</programlisting>
|
||||
</informalexample>
|
||||
</para>
|
||||
|
||||
@best_allowed_style: a bit-mask with the best pre-edit style and/or the best
|
||||
status style to use. If 0 is used, then the current bit-mask of all allowed
|
||||
styles is returned.
|
||||
@Returns: a bit-mask of all the styles allowed.
|
||||
|
||||
<!-- ##### FUNCTION gdk_input_list_devices ##### -->
|
||||
<para>
|
||||
Lists all available input devices, along with their
|
||||
configuration information.
|
||||
</para>
|
||||
|
||||
@Returns: A #GList of #GdkDeviceInfo structures. This list
|
||||
is internal data of GTK+ and should not be modified
|
||||
or freed.
|
||||
|
||||
<!-- ##### FUNCTION gdk_input_motion_events ##### -->
|
||||
<para>
|
||||
Retrieves the motion history for a given device/window pair.
|
||||
</para>
|
||||
|
||||
@window: a #GdkWindow.
|
||||
@deviceid: the device for which to retrieve motion history.
|
||||
@start: the start time.
|
||||
@stop: the stop time.
|
||||
@nevents_return: location to store the number of events returned.
|
||||
@Returns: a newly allocated array containing all the events
|
||||
from @start to @stop. This array should be freed
|
||||
with g_free() when you are finished using it.
|
||||
|
||||
<!-- ##### FUNCTION gdk_input_set_axes ##### -->
|
||||
<para>
|
||||
Sets the mapping of the axes (valuators) of a device
|
||||
onto the predefined valuator types that GTK+ understands.
|
||||
</para>
|
||||
|
||||
@deviceid: the device to configure.
|
||||
@axes: an array of GdkAxisUse. This length of this array
|
||||
must match the number of axes for the device.
|
||||
|
||||
<!-- ##### FUNCTION gdk_input_set_key ##### -->
|
||||
<para>
|
||||
Sets the key event generated when a macro button is pressed.
|
||||
</para>
|
||||
|
||||
@deviceid: the device to configure.
|
||||
@index_: the index of the macro button.
|
||||
@keyval: the key value for the #GdkKeypressEvent to generate.
|
||||
(a value of 0 means no event will be generated.)
|
||||
@modifiers: the modifier field for the generated
|
||||
#GdkKeyPressEvent.
|
||||
|
||||
<!-- ##### FUNCTION gdk_input_set_mode ##### -->
|
||||
<para>
|
||||
Enables or disables a device, and determines how the
|
||||
device maps onto the screen.
|
||||
</para>
|
||||
|
||||
@deviceid: the device to configure.
|
||||
@mode: the new mode.
|
||||
@Returns: %TRUE if the device supports the given mode, otherwise
|
||||
%FALSE and the device's mode is unchanged.
|
||||
|
||||
<!-- ##### FUNCTION gdk_input_set_source ##### -->
|
||||
<para>
|
||||
Sets the source type for a device.
|
||||
</para>
|
||||
|
||||
@deviceid: the device to configure
|
||||
@source: the new source type.
|
||||
|
||||
<!-- ##### FUNCTION gdk_input_window_get_pointer ##### -->
|
||||
<para>
|
||||
Returns information about the current position of the pointer
|
||||
within a window, including extended device information.
|
||||
Any of the return parameters may be %NULL, in which case,
|
||||
they will be ignored.
|
||||
</para>
|
||||
|
||||
@window: a #GdkWindow.
|
||||
@deviceid: a device ID.
|
||||
@x: location to store current x postion.
|
||||
@y: location to store current y postion.
|
||||
@pressure: location to store current pressure.
|
||||
@xtilt: location to store current tilt in the x direction.
|
||||
@ytilt: location to store current tilt in the y direction.
|
||||
@mask: location to store the current modifier state.
|
||||
|
||||
<!-- ##### VARIABLE gdk_leader_window ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_open_display ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@display_name:
|
||||
@Returns:
|
||||
|
||||
<!-- ##### FUNCTION gdk_pixbuf_set_as_cairo_source ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@pixbuf:
|
||||
@cr:
|
||||
@pixbuf_x:
|
||||
@pixbuf_y:
|
||||
|
||||
<!-- ##### VARIABLE gdk_progclass ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
|
||||
<!-- ##### MACRO gdk_rgb_get_cmap ##### -->
|
||||
<para>
|
||||
Gets the colormap set by GdkRGB. This colormap and the corresponding
|
||||
visual should be used when creating windows that will be drawn in by GdkRGB.
|
||||
</para>
|
||||
|
||||
@Returns: The #GdkColormap set by GdkRGB.
|
||||
|
||||
<!-- ##### VARIABLE gdk_screen ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_screen_close ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@screen:
|
||||
|
||||
<!-- ##### FUNCTION gdk_screen_get_window_at_pointer ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@screen:
|
||||
@win_x:
|
||||
@win_y:
|
||||
@Returns:
|
||||
|
||||
<!-- ##### FUNCTION gdk_screen_use_virtual_screen ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@screen:
|
||||
@Returns:
|
||||
|
||||
<!-- ##### VARIABLE gdk_selection_property ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_set_default_display ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@display:
|
||||
|
||||
<!-- ##### FUNCTION gdkx_visual_get_for_screen ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@screen:
|
||||
@xvisualid:
|
||||
@Returns:
|
||||
|
||||
110
docs/reference/gdk/tmpl/gdkapplaunchcontext.sgml
Normal file
110
docs/reference/gdk/tmpl/gdkapplaunchcontext.sgml
Normal file
@@ -0,0 +1,110 @@
|
||||
<!-- ##### SECTION Title ##### -->
|
||||
Application launching
|
||||
|
||||
<!-- ##### SECTION Short_Description ##### -->
|
||||
Startup notification for applications
|
||||
|
||||
<!-- ##### SECTION Long_Description ##### -->
|
||||
<para>
|
||||
GdkAppLaunchContext is an implementation of #GAppLaunchContext that
|
||||
handles launching an application in a graphical context. It provides
|
||||
startup notification and allows to launch applications on a specific
|
||||
screen or workspace.
|
||||
</para>
|
||||
<example>
|
||||
<title>Launching an application</title>
|
||||
<programlisting>
|
||||
GdkAppLaunchContext *context;
|
||||
|
||||
context = gdk_app_launch_context_new (<!-- -->);
|
||||
|
||||
gdk_app_launch_context_set_screen (my_screen);
|
||||
gdk_app_launch_context_set_timestamp (event->time);
|
||||
|
||||
if (!g_app_info_launch_default_for_uri ("http://www.gtk.org", context, &error))
|
||||
g_warning ("Launching failed: %s\n", error->message);
|
||||
|
||||
g_object_unref (context);
|
||||
</programlisting>
|
||||
</example>
|
||||
|
||||
<!-- ##### SECTION See_Also ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### SECTION Stability_Level ##### -->
|
||||
|
||||
|
||||
<!-- ##### SECTION Image ##### -->
|
||||
|
||||
|
||||
<!-- ##### TYPEDEF GdkAppLaunchContext ##### -->
|
||||
<para>
|
||||
An opaque structure representing an application launch context.
|
||||
</para>
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_app_launch_context_new ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@void:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_app_launch_context_set_display ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@context:
|
||||
@display:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_app_launch_context_set_screen ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@context:
|
||||
@screen:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_app_launch_context_set_desktop ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@context:
|
||||
@desktop:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_app_launch_context_set_timestamp ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@context:
|
||||
@timestamp:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_app_launch_context_set_icon ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@context:
|
||||
@icon:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_app_launch_context_set_icon_name ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@context:
|
||||
@icon_name:
|
||||
|
||||
|
||||
502
docs/reference/gdk/tmpl/gdkdisplay.sgml
Normal file
502
docs/reference/gdk/tmpl/gdkdisplay.sgml
Normal file
@@ -0,0 +1,502 @@
|
||||
<!-- ##### SECTION Title ##### -->
|
||||
GdkDisplay
|
||||
|
||||
<!-- ##### SECTION Short_Description ##### -->
|
||||
Controls the keyboard/mouse pointer grabs and a set of <type>GdkScreen</type>s
|
||||
|
||||
<!-- ##### SECTION Long_Description ##### -->
|
||||
<para>
|
||||
#GdkDisplay objects purpose are two fold:
|
||||
<itemizedlist>
|
||||
<listitem><para>To grab/ungrab keyboard focus and mouse pointer</para></listitem>
|
||||
<listitem><para>To manage and provide information about the #GdkScreen(s)
|
||||
available for this #GdkDisplay
|
||||
</para></listitem>
|
||||
</itemizedlist>
|
||||
</para>
|
||||
<para>
|
||||
#GdkDisplay objects are the GDK representation of the X Display which can be
|
||||
described as <emphasis>a workstation consisting of a keyboard a pointing
|
||||
device (such as a mouse) and one or more screens</emphasis>.
|
||||
It is used to open and keep track of various #GdkScreen objects currently
|
||||
instanciated by the application. It is also used to grab and release the keyboard
|
||||
and the mouse pointer.
|
||||
</para>
|
||||
|
||||
<!-- ##### SECTION See_Also ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### SECTION Stability_Level ##### -->
|
||||
|
||||
|
||||
<!-- ##### SECTION Image ##### -->
|
||||
|
||||
|
||||
<!-- ##### STRUCT GdkDisplay ##### -->
|
||||
<para>
|
||||
The <structname>GdkDisplay</structname> struct is the GDK representation
|
||||
of an X display. All its fields are private and should not be accessed directly.
|
||||
</para>
|
||||
|
||||
@Since: 2.2
|
||||
|
||||
<!-- ##### SIGNAL GdkDisplay::closed ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@gdkdisplay: the object which received the signal.
|
||||
@arg1:
|
||||
|
||||
<!-- ##### SIGNAL GdkDisplay::opened ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@gdkdisplay: the object which received the signal.
|
||||
|
||||
<!-- ##### FUNCTION gdk_display_open ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@display_name:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_display_get_default ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@void:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_display_get_name ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@display:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_display_get_n_screens ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@display:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_display_get_screen ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@display:
|
||||
@screen_num:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_display_get_default_screen ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@display:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_display_get_device_manager ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@display:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_display_pointer_ungrab ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@display:
|
||||
@time_:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_display_keyboard_ungrab ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@display:
|
||||
@time_:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_display_pointer_is_grabbed ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@display:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_display_device_is_grabbed ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@display:
|
||||
@device:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_display_beep ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@display:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_display_sync ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@display:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_display_flush ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@display:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_display_close ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@display:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_display_is_closed ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@display:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_display_list_devices ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@display:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_display_get_event ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@display:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_display_peek_event ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@display:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_display_put_event ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@display:
|
||||
@event:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_display_add_client_message_filter ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@display:
|
||||
@message_type:
|
||||
@func:
|
||||
@data:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_display_set_double_click_time ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@display:
|
||||
@msec:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_display_set_double_click_distance ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@display:
|
||||
@distance:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_display_get_pointer ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@display:
|
||||
@screen:
|
||||
@x:
|
||||
@y:
|
||||
@mask:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_display_get_device_state ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@display:
|
||||
@device:
|
||||
@screen:
|
||||
@x:
|
||||
@y:
|
||||
@mask:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_display_get_window_at_pointer ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@display:
|
||||
@win_x:
|
||||
@win_y:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_display_get_window_at_device_position ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@display:
|
||||
@device:
|
||||
@win_x:
|
||||
@win_y:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### STRUCT GdkDisplayPointerHooks ##### -->
|
||||
<para>
|
||||
A table of pointers to functions for getting quantities related to
|
||||
the current pointer position. Each #GdkDisplay has a table of this type,
|
||||
which can be set using gdk_display_set_pointer_hooks().
|
||||
</para>
|
||||
<para>
|
||||
This is only useful for such low-level tools as an event recorder.
|
||||
Applications should never have any reason to use this facility
|
||||
</para>
|
||||
|
||||
@get_pointer: Obtains the current pointer position and modifier state.
|
||||
The position is given in coordinates relative to the window containing
|
||||
the pointer, which is returned in @window.
|
||||
@window_get_pointer: Obtains the window underneath the mouse pointer.
|
||||
Current pointer position and modifier state are returned in @x, @y and
|
||||
@mask. The position is given in coordinates relative to @window.
|
||||
@window_at_pointer: Obtains the window underneath the mouse pointer,
|
||||
returning the location of that window in @win_x, @win_y. Returns %NULL
|
||||
if the window under the mouse pointer is not known to GDK (for example,
|
||||
belongs to another application).
|
||||
@Since: 2.2
|
||||
|
||||
<!-- ##### FUNCTION gdk_display_set_pointer_hooks ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@display:
|
||||
@new_hooks:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### STRUCT GdkDisplayDeviceHooks ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@get_device_state:
|
||||
@window_get_device_position:
|
||||
@window_at_device_position:
|
||||
|
||||
<!-- ##### FUNCTION gdk_display_set_device_hooks ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@display:
|
||||
@new_hooks:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_display_warp_pointer ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@display:
|
||||
@screen:
|
||||
@x:
|
||||
@y:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_display_warp_device ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@display:
|
||||
@device:
|
||||
@screen:
|
||||
@x:
|
||||
@y:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_display_supports_cursor_color ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@display:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_display_supports_cursor_alpha ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@display:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_display_get_default_cursor_size ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@display:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_display_get_maximal_cursor_size ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@display:
|
||||
@width:
|
||||
@height:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_display_get_default_group ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@display:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_display_supports_selection_notification ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@display:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_display_request_selection_notification ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@display:
|
||||
@selection:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_display_supports_clipboard_persistence ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@display:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_display_store_clipboard ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@display:
|
||||
@clipboard_window:
|
||||
@time_:
|
||||
@targets:
|
||||
@n_targets:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_display_supports_shapes ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@display:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_display_supports_input_shapes ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@display:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_display_supports_composite ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@display:
|
||||
@Returns:
|
||||
|
||||
|
||||
90
docs/reference/gdk/tmpl/gdkdisplaymanager.sgml
Normal file
90
docs/reference/gdk/tmpl/gdkdisplaymanager.sgml
Normal file
@@ -0,0 +1,90 @@
|
||||
<!-- ##### SECTION Title ##### -->
|
||||
GdkDisplayManager
|
||||
|
||||
<!-- ##### SECTION Short_Description ##### -->
|
||||
Maintains a list of all open <type>GdkDisplay</type>s
|
||||
|
||||
<!-- ##### SECTION Long_Description ##### -->
|
||||
<para>
|
||||
The purpose of the #GdkDisplayManager singleton object is to offer
|
||||
notification when displays appear or disappear or the default display
|
||||
changes.
|
||||
</para>
|
||||
|
||||
<!-- ##### SECTION See_Also ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### SECTION Stability_Level ##### -->
|
||||
|
||||
|
||||
<!-- ##### SECTION Image ##### -->
|
||||
|
||||
|
||||
<!-- ##### STRUCT GdkDisplayManager ##### -->
|
||||
<para>
|
||||
The <structname>GdkDisplayManager</structname> struct has no interesting
|
||||
fields.
|
||||
</para>
|
||||
|
||||
@Since: 2.2
|
||||
|
||||
<!-- ##### SIGNAL GdkDisplayManager::display-opened ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@gdkdisplaymanager: the object which received the signal.
|
||||
@arg1:
|
||||
|
||||
<!-- ##### ARG GdkDisplayManager:default-display ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### FUNCTION gdk_display_manager_get ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@void:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_display_manager_get_default_display ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@display_manager:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_display_manager_set_default_display ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@display_manager:
|
||||
@display:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_display_manager_list_displays ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@display_manager:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_display_get_core_pointer ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@display:
|
||||
@Returns:
|
||||
|
||||
|
||||
397
docs/reference/gdk/tmpl/gdkscreen.sgml
Normal file
397
docs/reference/gdk/tmpl/gdkscreen.sgml
Normal file
@@ -0,0 +1,397 @@
|
||||
<!-- ##### SECTION Title ##### -->
|
||||
GdkScreen
|
||||
|
||||
<!-- ##### SECTION Short_Description ##### -->
|
||||
Object representing a physical screen
|
||||
|
||||
<!-- ##### SECTION Long_Description ##### -->
|
||||
<para>
|
||||
#GdkScreen objects are the GDK representation of a physical screen. It is used
|
||||
throughout GDK and GTK+ to specify which screen the top level windows
|
||||
are to be displayed on.
|
||||
It is also used to query the screen specification and default settings such as
|
||||
the default colormap (gdk_screen_get_default_colormap()),
|
||||
the screen width (gdk_screen_get_width()), etc.
|
||||
</para>
|
||||
<para>Note that a screen may consist of multiple monitors which are merged to
|
||||
form a large screen area.
|
||||
</para>
|
||||
|
||||
<!-- ##### SECTION See_Also ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### SECTION Stability_Level ##### -->
|
||||
|
||||
|
||||
<!-- ##### SECTION Image ##### -->
|
||||
|
||||
|
||||
<!-- ##### STRUCT GdkScreen ##### -->
|
||||
<para>
|
||||
This is a currently just a placeholder typedef for the first argument of
|
||||
the @window_at_pointer function in #GdkPointerHooks. It will be used
|
||||
when GDK gets multihead support.
|
||||
</para>
|
||||
|
||||
@Since: 2.2
|
||||
|
||||
<!-- ##### SIGNAL GdkScreen::composited-changed ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@gdkscreen: the object which received the signal.
|
||||
|
||||
<!-- ##### SIGNAL GdkScreen::monitors-changed ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@gdkscreen: the object which received the signal.
|
||||
|
||||
<!-- ##### SIGNAL GdkScreen::size-changed ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@gdkscreen: the object which received the signal.
|
||||
|
||||
<!-- ##### ARG GdkScreen:font-options ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### ARG GdkScreen:resolution ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### FUNCTION gdk_screen_get_default ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@void:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_screen_get_system_visual ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@screen:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_screen_get_rgba_visual ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@screen:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_screen_is_composited ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@screen:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_screen_get_root_window ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@screen:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_screen_get_display ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@screen:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_screen_get_number ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@screen:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_screen_get_width ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@screen:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_screen_get_height ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@screen:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_screen_get_width_mm ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@screen:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_screen_get_height_mm ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@screen:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_screen_list_visuals ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@screen:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_screen_get_toplevel_windows ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@screen:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_screen_make_display_name ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@screen:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_screen_get_n_monitors ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@screen:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_screen_get_primary_monitor ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@screen:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_screen_get_monitor_geometry ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@screen:
|
||||
@monitor_num:
|
||||
@dest:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_screen_get_monitor_at_point ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@screen:
|
||||
@x:
|
||||
@y:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_screen_get_monitor_at_window ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@screen:
|
||||
@window:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_screen_get_monitor_height_mm ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@screen:
|
||||
@monitor_num:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_screen_get_monitor_width_mm ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@screen:
|
||||
@monitor_num:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_screen_get_monitor_plug_name ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@screen:
|
||||
@monitor_num:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_screen_broadcast_client_message ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@screen:
|
||||
@event:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_screen_get_setting ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@screen:
|
||||
@name:
|
||||
@value:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_screen_get_font_options ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@screen:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_screen_set_font_options ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@screen:
|
||||
@options:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_screen_get_resolution ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@screen:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_screen_set_resolution ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@screen:
|
||||
@dpi:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_screen_get_active_window ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@screen:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_screen_get_window_stack ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@screen:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_spawn_on_screen ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@screen:
|
||||
@working_directory:
|
||||
@argv:
|
||||
@envp:
|
||||
@flags:
|
||||
@child_setup:
|
||||
@user_data:
|
||||
@child_pid:
|
||||
@error:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_spawn_on_screen_with_pipes ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@screen:
|
||||
@working_directory:
|
||||
@argv:
|
||||
@envp:
|
||||
@flags:
|
||||
@child_setup:
|
||||
@user_data:
|
||||
@child_pid:
|
||||
@standard_input:
|
||||
@standard_output:
|
||||
@standard_error:
|
||||
@error:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_spawn_command_line_on_screen ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@screen:
|
||||
@command_line:
|
||||
@error:
|
||||
@Returns:
|
||||
|
||||
|
||||
59
docs/reference/gdk/tmpl/gdktesting.sgml
Normal file
59
docs/reference/gdk/tmpl/gdktesting.sgml
Normal file
@@ -0,0 +1,59 @@
|
||||
<!-- ##### SECTION Title ##### -->
|
||||
Testing
|
||||
|
||||
<!-- ##### SECTION Short_Description ##### -->
|
||||
Test utilities
|
||||
|
||||
<!-- ##### SECTION Long_Description ##### -->
|
||||
<para>
|
||||
The functions in this section are intended to be used in test programs.
|
||||
They allow to simulate some user input.
|
||||
</para>
|
||||
|
||||
<!-- ##### SECTION See_Also ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### SECTION Stability_Level ##### -->
|
||||
|
||||
|
||||
<!-- ##### SECTION Image ##### -->
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_test_render_sync ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@window:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_test_simulate_button ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@window:
|
||||
@x:
|
||||
@y:
|
||||
@button:
|
||||
@modifiers:
|
||||
@button_pressrelease:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_test_simulate_key ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@window:
|
||||
@x:
|
||||
@y:
|
||||
@keyval:
|
||||
@modifiers:
|
||||
@key_pressrelease:
|
||||
@Returns:
|
||||
|
||||
|
||||
366
docs/reference/gdk/tmpl/general.sgml
Normal file
366
docs/reference/gdk/tmpl/general.sgml
Normal file
@@ -0,0 +1,366 @@
|
||||
<!-- ##### SECTION Title ##### -->
|
||||
General
|
||||
|
||||
<!-- ##### SECTION Short_Description ##### -->
|
||||
Library initialization and miscellaneous functions
|
||||
|
||||
<!-- ##### SECTION Long_Description ##### -->
|
||||
<para>
|
||||
This section describes the GDK initialization functions and miscellaneous
|
||||
utility functions.
|
||||
</para>
|
||||
|
||||
<!-- ##### SECTION See_Also ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### SECTION Stability_Level ##### -->
|
||||
|
||||
|
||||
<!-- ##### SECTION Image ##### -->
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_init ##### -->
|
||||
<para>
|
||||
Initializes the GDK library and connects to the X server.
|
||||
If initialization fails, a warning message is output and the application
|
||||
terminates with a call to <literal>exit(1)</literal>.
|
||||
</para>
|
||||
<para>
|
||||
Any arguments used by GDK are removed from the array and @argc and @argv are
|
||||
updated accordingly.
|
||||
</para>
|
||||
<para>
|
||||
GTK+ initializes GDK in gtk_init() and so this function is not usually needed
|
||||
by GTK+ applications.
|
||||
</para>
|
||||
|
||||
@argc: the number of command line arguments.
|
||||
@argv: the array of command line arguments.
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_init_check ##### -->
|
||||
<para>
|
||||
Initializes the GDK library and connects to the X server, returning %TRUE on
|
||||
success.
|
||||
</para>
|
||||
<para>
|
||||
Any arguments used by GDK are removed from the array and @argc and @argv are
|
||||
updated accordingly.
|
||||
</para>
|
||||
<para>
|
||||
GTK+ initializes GDK in gtk_init() and so this function is not usually needed
|
||||
by GTK+ applications.
|
||||
</para>
|
||||
|
||||
@argc: the number of command line arguments.
|
||||
@argv: the array of command line arguments.
|
||||
@Returns: %TRUE if initialization succeeded.
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_parse_args ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@argc:
|
||||
@argv:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_get_display_arg_name ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@void:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_set_locale ##### -->
|
||||
<para>
|
||||
Initializes the support for internationalization by calling the <function>setlocale()</function>
|
||||
system call. This function is called by gtk_set_locale() and so GTK+
|
||||
applications should use that instead.
|
||||
</para>
|
||||
<para>
|
||||
The locale to use is determined by the <envar>LANG</envar> environment variable,
|
||||
so to run an application in a certain locale you can do something like this:
|
||||
<informalexample>
|
||||
<programlisting>
|
||||
export LANG="fr"
|
||||
... run application ...
|
||||
</programlisting>
|
||||
</informalexample>
|
||||
</para>
|
||||
<para>
|
||||
If the locale is not supported by X then it is reset to the standard "C"
|
||||
locale.
|
||||
</para>
|
||||
|
||||
@void:
|
||||
@Returns: the resulting locale.
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_set_sm_client_id ##### -->
|
||||
<para>
|
||||
</para>
|
||||
|
||||
@sm_client_id:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_notify_startup_complete ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@void:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_notify_startup_complete_with_id ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@startup_id:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_get_program_class ##### -->
|
||||
<para>
|
||||
Gets the program class. Unless the program class has explicitly
|
||||
been set with gdk_set_program_class() or with the <option>--class</option>
|
||||
commandline option, the default value is the program name (determined
|
||||
with g_get_prgname()) with the first character converted to uppercase.
|
||||
</para>
|
||||
|
||||
@void:
|
||||
@Returns: the program class.
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_set_program_class ##### -->
|
||||
<para>
|
||||
Sets the program class. The X11 backend uses the program class to set
|
||||
the class name part of the <literal>WM_CLASS</literal> property on
|
||||
toplevel windows; see the ICCCM.
|
||||
</para>
|
||||
|
||||
@program_class: a string.
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_get_display ##### -->
|
||||
<para>
|
||||
Gets the name of the display, which usually comes from the <envar>DISPLAY</envar>
|
||||
environment variable or the <option>--display</option> command line option.
|
||||
</para>
|
||||
|
||||
@void:
|
||||
@Returns: the name of the display.
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_flush ##### -->
|
||||
<para>
|
||||
Flushes the X output buffer and waits until all requests have been processed
|
||||
by the server. This is rarely needed by applications. It's main use is for
|
||||
trapping X errors with gdk_error_trap_push() and gdk_error_trap_pop().
|
||||
</para>
|
||||
|
||||
@void:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_screen_width ##### -->
|
||||
<para>
|
||||
</para>
|
||||
|
||||
@void:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_screen_height ##### -->
|
||||
<para>
|
||||
</para>
|
||||
|
||||
@void:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_screen_width_mm ##### -->
|
||||
<para>
|
||||
</para>
|
||||
|
||||
@void:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_screen_height_mm ##### -->
|
||||
<para>
|
||||
</para>
|
||||
|
||||
@void:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_pointer_grab ##### -->
|
||||
<para>
|
||||
Grabs the pointer (usually a mouse) so that all events are passed to this
|
||||
application until the pointer is ungrabbed with gdk_pointer_ungrab(), or
|
||||
the grab window becomes unviewable.
|
||||
This overrides any previous pointer grab by this client.
|
||||
</para>
|
||||
<para>
|
||||
Pointer grabs are used for operations which need complete control over mouse
|
||||
events, even if the mouse leaves the application.
|
||||
For example in GTK+ it is used for Drag and Drop, for dragging the handle in
|
||||
the #GtkHPaned and #GtkVPaned widgets, and for resizing columns in #GtkCList
|
||||
widgets.
|
||||
</para>
|
||||
<para>
|
||||
Note that if the event mask of an X window has selected both button press and
|
||||
button release events, then a button press event will cause an automatic
|
||||
pointer grab until the button is released.
|
||||
X does this automatically since most applications expect to receive button
|
||||
press and release events in pairs.
|
||||
It is equivalent to a pointer grab on the window with @owner_events set to
|
||||
%TRUE.
|
||||
</para>
|
||||
<para>
|
||||
If you set up anything at the time you take the grab that needs to be cleaned
|
||||
up when the grab ends, you should handle the #GdkEventGrabBroken events that
|
||||
are emitted when the grab ends unvoluntarily.
|
||||
</para>
|
||||
|
||||
@window: the #GdkWindow which will own the grab (the grab window).
|
||||
@owner_events: if %FALSE then all pointer events are reported with respect to
|
||||
@window and are only reported if selected by @event_mask. If %TRUE then pointer
|
||||
events for this application are reported as normal, but pointer events outside
|
||||
this application are reported with respect to @window and only if selected by
|
||||
@event_mask. In either mode, unreported events are discarded.
|
||||
@event_mask: specifies the event mask, which is used in accordance with
|
||||
@owner_events. Note that only pointer events (i.e. button and motion events)
|
||||
may be selected.
|
||||
@confine_to: If non-%NULL, the pointer will be confined to this
|
||||
window during the grab. If the pointer is outside @confine_to, it will
|
||||
automatically be moved to the closest edge of @confine_to and enter
|
||||
and leave events will be generated as necessary.
|
||||
@cursor: the cursor to display while the grab is active. If this is %NULL then
|
||||
the normal cursors are used for @window and its descendants, and the cursor
|
||||
for @window is used for all other windows.
|
||||
@time_: the timestamp of the event which led to this pointer grab. This usually
|
||||
comes from a #GdkEventButton struct, though %GDK_CURRENT_TIME can be used if
|
||||
the time isn't known.
|
||||
@Returns: %GDK_GRAB_SUCCESS if the grab was successful.
|
||||
|
||||
|
||||
<!-- ##### ENUM GdkGrabStatus ##### -->
|
||||
<para>
|
||||
Returned by gdk_pointer_grab() and gdk_keyboard_grab() to indicate
|
||||
success or the reason for the failure of the grab attempt.
|
||||
</para>
|
||||
|
||||
@GDK_GRAB_SUCCESS: the resource was successfully grabbed.
|
||||
@GDK_GRAB_ALREADY_GRABBED: the resource is actively grabbed by another client.
|
||||
@GDK_GRAB_INVALID_TIME: the resource was grabbed more recently than the
|
||||
specified time.
|
||||
@GDK_GRAB_NOT_VIEWABLE: the grab window or the @confine_to window are not
|
||||
viewable.
|
||||
@GDK_GRAB_FROZEN: the resource is frozen by an active grab of another client.
|
||||
|
||||
<!-- ##### FUNCTION gdk_pointer_ungrab ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@time_:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_pointer_is_grabbed ##### -->
|
||||
<para>
|
||||
</para>
|
||||
<para>
|
||||
</para>
|
||||
|
||||
@void:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_set_double_click_time ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@msec:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_keyboard_grab ##### -->
|
||||
<para>
|
||||
Grabs the keyboard so that all events are passed to this
|
||||
application until the keyboard is ungrabbed with gdk_keyboard_ungrab().
|
||||
This overrides any previous keyboard grab by this client.
|
||||
</para>
|
||||
<para>
|
||||
If you set up anything at the time you take the grab that needs to be cleaned
|
||||
up when the grab ends, you should handle the #GdkEventGrabBroken events that
|
||||
are emitted when the grab ends unvoluntarily.
|
||||
</para>
|
||||
|
||||
@window: the #GdkWindow which will own the grab (the grab window).
|
||||
@owner_events: if %FALSE then all keyboard events are reported with respect to
|
||||
@window. If %TRUE then keyboard events for this application are reported as
|
||||
normal, but keyboard events outside this application are reported with respect
|
||||
to @window. Both key press and key release events are always reported,
|
||||
independant of the event mask set by the application.
|
||||
@time_: a timestamp from a #GdkEvent, or %GDK_CURRENT_TIME if no timestamp is
|
||||
available.
|
||||
@Returns: %GDK_GRAB_SUCCESS if the grab was successful.
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_keyboard_ungrab ##### -->
|
||||
<para>
|
||||
</para>
|
||||
|
||||
@time_:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_beep ##### -->
|
||||
<para>
|
||||
</para>
|
||||
|
||||
@void:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_error_trap_push ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@void:
|
||||
|
||||
|
||||
<!-- ##### MACRO gdk_error_trap_pop ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_error_trap_pop_ignored ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@void:
|
||||
|
||||
|
||||
<!-- ##### MACRO GDK_WINDOWING_X11 ##### -->
|
||||
<para>
|
||||
This macro is defined if GDK is configured to use the X11 backend.
|
||||
</para>
|
||||
|
||||
|
||||
|
||||
<!-- ##### MACRO GDK_WINDOWING_WIN32 ##### -->
|
||||
<para>
|
||||
This macro is defined if GDK is configured to use the win32 backend.
|
||||
</para>
|
||||
|
||||
|
||||
|
||||
357
docs/reference/gdk/tmpl/keys.sgml
Normal file
357
docs/reference/gdk/tmpl/keys.sgml
Normal file
@@ -0,0 +1,357 @@
|
||||
<!-- ##### SECTION Title ##### -->
|
||||
Key Values
|
||||
|
||||
<!-- ##### SECTION Short_Description ##### -->
|
||||
Functions for manipulating keyboard codes
|
||||
|
||||
<!-- ##### SECTION Long_Description ##### -->
|
||||
<para>
|
||||
Key values are the codes which are sent whenever a key is pressed or released.
|
||||
They appear in the <structfield>keyval</structfield> field of the
|
||||
#GdkEventKey structure, which is passed to signal handlers for the
|
||||
"key-press-event" and "key-release-event" signals.
|
||||
The complete list of key values can be found in the <filename><gdk/gdkkeysyms.h></filename>
|
||||
header file.
|
||||
</para>
|
||||
<para>
|
||||
Key values are regularly updated from the upstream X.org X11 implementation,
|
||||
so new values are added regularly. They will be prefixed with GDK_KEY_ rather
|
||||
than XF86XK_ or XK_ (for older symbols).
|
||||
</para>
|
||||
<para>
|
||||
Key values can be converted into a string representation using
|
||||
gdk_keyval_name(). The reverse function, converting a string to a key value,
|
||||
is provided by gdk_keyval_from_name().
|
||||
</para>
|
||||
<para>
|
||||
The case of key values can be determined using gdk_keyval_is_upper() and
|
||||
gdk_keyval_is_lower(). Key values can be converted to upper or lower case
|
||||
using gdk_keyval_to_upper() and gdk_keyval_to_lower().
|
||||
</para>
|
||||
<para>
|
||||
When it makes sense, key values can be converted to and from
|
||||
Unicode characters with gdk_keyval_to_unicode() and gdk_unicode_to_keyval().
|
||||
</para>
|
||||
|
||||
<para id="key-group-explanation">
|
||||
One #GdkKeymap object exists for each user display. gdk_keymap_get_default()
|
||||
returns the #GdkKeymap for the default display; to obtain keymaps for other
|
||||
displays, use gdk_keymap_get_for_display(). A keymap
|
||||
is a mapping from #GdkKeymapKey to key values. You can think of a #GdkKeymapKey
|
||||
as a representation of a symbol printed on a physical keyboard key. That is, it
|
||||
contains three pieces of information. First, it contains the hardware keycode;
|
||||
this is an identifying number for a physical key. Second, it contains the
|
||||
<firstterm>level</firstterm> of the key. The level indicates which symbol on the
|
||||
key will be used, in a vertical direction. So on a standard US keyboard, the key
|
||||
with the number "1" on it also has the exclamation point ("!") character on
|
||||
it. The level indicates whether to use the "1" or the "!" symbol. The letter
|
||||
keys are considered to have a lowercase letter at level 0, and an uppercase
|
||||
letter at level 1, though only the uppercase letter is printed. Third, the
|
||||
#GdkKeymapKey contains a group; groups are not used on standard US keyboards,
|
||||
but are used in many other countries. On a keyboard with groups, there can be 3
|
||||
or 4 symbols printed on a single key. The group indicates movement in a
|
||||
horizontal direction. Usually groups are used for two different languages. In
|
||||
group 0, a key might have two English characters, and in group 1 it might have
|
||||
two Hebrew characters. The Hebrew characters will be printed on the key next to
|
||||
the English characters.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
In order to use a keymap to interpret a key event, it's necessary to first
|
||||
convert the keyboard state into an effective group and level. This is done via a
|
||||
set of rules that varies widely according to type of keyboard and user
|
||||
configuration. The function gdk_keymap_translate_keyboard_state() accepts a
|
||||
keyboard state -- consisting of hardware keycode pressed, active modifiers, and
|
||||
active group -- applies the appropriate rules, and returns the group/level to be
|
||||
used to index the keymap, along with the modifiers which did not affect the
|
||||
group and level. i.e. it returns "unconsumed modifiers." The keyboard group may
|
||||
differ from the effective group used for keymap lookups because some keys don't
|
||||
have multiple groups - e.g. the Enter key is always in group 0 regardless of
|
||||
keyboard state.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
Note that gdk_keymap_translate_keyboard_state() also returns the keyval, i.e. it
|
||||
goes ahead and performs the keymap lookup in addition to telling you which
|
||||
effective group/level values were used for the lookup. #GdkEventKey already
|
||||
contains this keyval, however, so you don't normally need to call
|
||||
gdk_keymap_translate_keyboard_state() just to get the keyval.
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### SECTION See_Also ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### SECTION Stability_Level ##### -->
|
||||
|
||||
|
||||
<!-- ##### SECTION Image ##### -->
|
||||
|
||||
|
||||
<!-- ##### STRUCT GdkKeymap ##### -->
|
||||
<para>
|
||||
A <structname>GdkKeymap</structname> defines the translation from keyboard state
|
||||
(including a hardware key, a modifier mask, and active keyboard group)
|
||||
to a keyval. This translation has two phases. The first phase is
|
||||
to determine the effective keyboard group and level for the keyboard
|
||||
state; the second phase is to look up the keycode/group/level triplet
|
||||
in the keymap and see what keyval it corresponds to.
|
||||
</para>
|
||||
|
||||
|
||||
<!-- ##### SIGNAL GdkKeymap::direction-changed ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@keymap: the object which received the signal.
|
||||
|
||||
<!-- ##### SIGNAL GdkKeymap::keys-changed ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@keymap: the object which received the signal.
|
||||
|
||||
<!-- ##### SIGNAL GdkKeymap::state-changed ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@gdkkeymap: the object which received the signal.
|
||||
|
||||
<!-- ##### STRUCT GdkKeymapKey ##### -->
|
||||
<para>
|
||||
A <structname>GdkKeymapKey</structname> is a hardware key that can
|
||||
be mapped to a keyval.
|
||||
</para>
|
||||
|
||||
@keycode: the hardware keycode. This is an identifying number for a
|
||||
physical key.
|
||||
@group: indicates movement in a horizontal direction. Usually groups are used
|
||||
for two different languages. In group 0, a key might have two English
|
||||
characters, and in group 1 it might have two Hebrew characters. The Hebrew
|
||||
characters will be printed on the key next to the English characters.
|
||||
@level: indicates which symbol on the key will be used, in a vertical direction. So on a standard US keyboard, the key with the number "1" on it also has the
|
||||
exclamation point ("!") character on it. The level indicates whether to use
|
||||
the "1" or the "!" symbol. The letter keys are considered to have a lowercase
|
||||
letter at level 0, and an uppercase letter at level 1, though only the
|
||||
uppercase letter is printed.
|
||||
|
||||
<!-- ##### FUNCTION gdk_keymap_get_default ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@void:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_keymap_get_for_display ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@display:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_keymap_lookup_key ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@keymap:
|
||||
@key:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_keymap_translate_keyboard_state ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@keymap:
|
||||
@hardware_keycode:
|
||||
@state:
|
||||
@group:
|
||||
@keyval:
|
||||
@effective_group:
|
||||
@level:
|
||||
@consumed_modifiers:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_keymap_get_entries_for_keyval ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@keymap:
|
||||
@keyval:
|
||||
@keys:
|
||||
@n_keys:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_keymap_get_entries_for_keycode ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@keymap:
|
||||
@hardware_keycode:
|
||||
@keys:
|
||||
@keyvals:
|
||||
@n_entries:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_keymap_get_direction ##### -->
|
||||
<para>
|
||||
Returns the direction of the keymap.
|
||||
</para>
|
||||
|
||||
@keymap: a #GdkKeymap or %NULL to use the default keymap.
|
||||
Returns: %PANGO_DIRECTION_LTR or %PANGO_DIRECTION_RTL.
|
||||
@Returns: the direction of the keymap.
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_keymap_have_bidi_layouts ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@keymap:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_keymap_get_caps_lock_state ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@keymap:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_keymap_get_num_lock_state ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@keymap:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_keymap_add_virtual_modifiers ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@keymap:
|
||||
@state:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_keymap_map_virtual_modifiers ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@keymap:
|
||||
@state:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_keyval_name ##### -->
|
||||
<para>
|
||||
Converts a key value into a symbolic name.
|
||||
The names are the same as those in the <filename><gdk/gdkkeysyms.h></filename> header file
|
||||
but without the leading "GDK_KEY_".
|
||||
</para>
|
||||
|
||||
@keyval: a key value.
|
||||
@Returns: a string containing the name of the key, or %NULL if @keyval is not
|
||||
a valid key. The string should not be modified.
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_keyval_from_name ##### -->
|
||||
<para>
|
||||
Converts a key name to a key value.
|
||||
</para>
|
||||
|
||||
@keyval_name: a key name.
|
||||
@Returns: the corresponding key value, or %GDK_VoidSymbol if the key name is
|
||||
not a valid key.
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_keyval_convert_case ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@symbol:
|
||||
@lower:
|
||||
@upper:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_keyval_to_upper ##### -->
|
||||
<para>
|
||||
Converts a key value to upper case, if applicable.
|
||||
</para>
|
||||
|
||||
@keyval: a key value.
|
||||
@Returns: the upper case form of @keyval, or @keyval itself if it is already
|
||||
in upper case or it is not subject to case conversion.
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_keyval_to_lower ##### -->
|
||||
<para>
|
||||
Converts a key value to lower case, if applicable.
|
||||
</para>
|
||||
|
||||
@keyval: a key value.
|
||||
@Returns: the lower case form of @keyval, or @keyval itself if it is already
|
||||
in lower case or it is not subject to case conversion.
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_keyval_is_upper ##### -->
|
||||
<para>
|
||||
Returns %TRUE if the given key value is in upper case.
|
||||
</para>
|
||||
|
||||
@keyval: a key value.
|
||||
@Returns: %TRUE if @keyval is in upper case, or if @keyval is not subject to
|
||||
case conversion.
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_keyval_is_lower ##### -->
|
||||
<para>
|
||||
Returns %TRUE if the given key value is in lower case.
|
||||
</para>
|
||||
|
||||
@keyval: a key value.
|
||||
@Returns: %TRUE if @keyval is in lower case, or if @keyval is not subject to
|
||||
case conversion.
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_keyval_to_unicode ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@keyval:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_unicode_to_keyval ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@wc:
|
||||
@Returns:
|
||||
|
||||
|
||||
158
docs/reference/gdk/tmpl/pango_interaction.sgml
Normal file
158
docs/reference/gdk/tmpl/pango_interaction.sgml
Normal file
@@ -0,0 +1,158 @@
|
||||
<!-- ##### SECTION Title ##### -->
|
||||
Pango Interaction
|
||||
|
||||
<!-- ##### SECTION Short_Description ##### -->
|
||||
Using Pango in GDK
|
||||
|
||||
<!-- ##### SECTION Long_Description ##### -->
|
||||
<para>
|
||||
Pango is the text layout system used by GDK and GTK+. The functions
|
||||
and types in this section are used to obtain clip regions for
|
||||
#PangoLayouts, and to get #PangoContexts that can be used with
|
||||
GDK.
|
||||
</para>
|
||||
<para>
|
||||
Creating a #PangoLayout object is the first step in rendering text,
|
||||
and requires getting a handle to a #PangoContext. For GTK+ programs,
|
||||
you'll usually want to use gtk_widget_get_pango_context(), or
|
||||
gtk_widget_create_pango_layout(), rather than using the lowlevel
|
||||
gdk_pango_context_get_for_screen(). Once you have a #PangoLayout, you
|
||||
can set the text and attributes of it with Pango functions like
|
||||
pango_layout_set_text() and get its size with pango_layout_get_size().
|
||||
(Note that Pango uses a fixed point system internally, so converting
|
||||
between Pango units and pixels using <link
|
||||
linkend="PANGO-SCALE-CAPS">PANGO_SCALE</link> or the PANGO_PIXELS() macro.)
|
||||
</para>
|
||||
<para>
|
||||
Rendering a Pango layout is done most simply with pango_cairo_show_layout();
|
||||
you can also draw pieces of the layout with pango_cairo_show_layout_line().
|
||||
</para>
|
||||
<example id="rotated-example">
|
||||
<title>Draw transformed text with Pango and cairo</title>
|
||||
<!-- Note that this example is basically the same as
|
||||
demos/gtk-demo/rotated_text.c -->
|
||||
<programlisting>
|
||||
#define RADIUS 100
|
||||
#define N_WORDS 10
|
||||
#define FONT "Sans Bold 18"
|
||||
|
||||
PangoContext *context;
|
||||
PangoLayout *layout;
|
||||
PangoFontDescription *desc;
|
||||
|
||||
double radius;
|
||||
int width, height;
|
||||
int i;
|
||||
|
||||
/* Set up a transformation matrix so that the user space coordinates for
|
||||
* where we are drawing are [-RADIUS, RADIUS], [-RADIUS, RADIUS]
|
||||
* We first center, then change the scale */
|
||||
|
||||
width = gdk_window_get_width (window);
|
||||
height = gdk_window_get_height (window);
|
||||
radius = MIN (width, height) / 2.;
|
||||
|
||||
cairo_translate (cr,
|
||||
radius + (width - 2 * radius) / 2,
|
||||
radius + (height - 2 * radius) / 2);
|
||||
cairo_scale (cr, radius / RADIUS, radius / RADIUS);
|
||||
|
||||
/* Create a PangoLayout, set the font and text */
|
||||
context = gdk_pango_context_get_for_screen (screen);
|
||||
layout = pango_layout_new (context);
|
||||
pango_layout_set_text (layout, "Text", -1);
|
||||
desc = pango_font_description_from_string (FONT);
|
||||
pango_layout_set_font_description (layout, desc);
|
||||
pango_font_description_free (desc);
|
||||
|
||||
/* Draw the layout N_WORDS times in a circle */
|
||||
for (i = 0; i < N_WORDS; i++)
|
||||
{
|
||||
double red, green, blue;
|
||||
double angle = 2 * G_PI * i / n_words;
|
||||
|
||||
cairo_save (cr);
|
||||
|
||||
/* Gradient from red at angle == 60 to blue at angle == 300 */
|
||||
red = (1 + cos (angle - 60)) / 2;
|
||||
green = 0;
|
||||
blue = 1 - red;
|
||||
|
||||
cairo_set_source_rgb (cr, red, green, blue);
|
||||
cairo_rotate (cr, angle);
|
||||
|
||||
/* Inform Pango to re-layout the text with the new transformation matrix */
|
||||
pango_cairo_update_layout (cr, layout);
|
||||
|
||||
pango_layout_get_size (layout, &width, &height);
|
||||
|
||||
cairo_move_to (cr, - width / 2 / PANGO_SCALE, - DEFAULT_TEXT_RADIUS);
|
||||
pango_cairo_show_layout (cr, layout);
|
||||
|
||||
cairo_restore (cr);
|
||||
}
|
||||
|
||||
g_object_unref (layout);
|
||||
g_object_unref (context);
|
||||
</programlisting>
|
||||
</example>
|
||||
<figure>
|
||||
<title>Output of <xref linkend="rotated-example"/></title>
|
||||
<graphic fileref="rotated-text.png" format="PNG"/>
|
||||
</figure>
|
||||
|
||||
<!-- ##### SECTION See_Also ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### SECTION Stability_Level ##### -->
|
||||
|
||||
|
||||
<!-- ##### SECTION Image ##### -->
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_pango_layout_get_clip_region ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@layout:
|
||||
@x_origin:
|
||||
@y_origin:
|
||||
@index_ranges:
|
||||
@n_ranges:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_pango_layout_line_get_clip_region ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@line:
|
||||
@x_origin:
|
||||
@y_origin:
|
||||
@index_ranges:
|
||||
@n_ranges:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_pango_context_get ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@void:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_pango_context_get_for_screen ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@screen:
|
||||
@Returns:
|
||||
|
||||
|
||||
60
docs/reference/gdk/tmpl/pixmaps.sgml
Normal file
60
docs/reference/gdk/tmpl/pixmaps.sgml
Normal file
@@ -0,0 +1,60 @@
|
||||
<!-- ##### SECTION Title ##### -->
|
||||
Bitmaps and Pixmaps
|
||||
|
||||
<!-- ##### SECTION Short_Description ##### -->
|
||||
Offscreen drawables
|
||||
|
||||
<!-- ##### SECTION Long_Description ##### -->
|
||||
<para>
|
||||
Pixmaps are offscreen drawables. They can be drawn upon with the
|
||||
standard drawing primitives, then copied to another drawable (such as
|
||||
a #GdkWindow). The depth of a pixmap
|
||||
is the number of bits per pixels. Bitmaps are simply pixmaps
|
||||
with a depth of 1. (That is, they are monochrome bitmaps - each
|
||||
pixel can be either on or off).
|
||||
</para>
|
||||
|
||||
<!-- ##### SECTION See_Also ##### -->
|
||||
<para>
|
||||
</para>
|
||||
|
||||
<!-- ##### SECTION Stability_Level ##### -->
|
||||
|
||||
|
||||
<!-- ##### SECTION Image ##### -->
|
||||
|
||||
|
||||
<!-- ##### STRUCT GdkPixmap ##### -->
|
||||
<para>
|
||||
An opaque structure representing an offscreen drawable.
|
||||
Pointers to structures of type #GdkPixmap, #GdkBitmap,
|
||||
and #GdkWindow, can often be used interchangeably.
|
||||
The type #GdkDrawable refers generically to any of
|
||||
these types.
|
||||
</para>
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_pixmap_new ##### -->
|
||||
<para>
|
||||
Create a new pixmap with a given size and depth.
|
||||
</para>
|
||||
|
||||
@drawable: A #GdkDrawable, used to determine default values
|
||||
for the new pixmap. Can be %NULL if @depth is specified,
|
||||
@width: The width of the new pixmap in pixels.
|
||||
@height: The height of the new pixmap in pixels.
|
||||
@depth: The depth (number of bits per pixel) of the new pixmap.
|
||||
If -1, and @drawable is not %NULL, the depth of the new
|
||||
pixmap will be equal to that of @drawable.
|
||||
@Returns: the #GdkPixmap
|
||||
|
||||
|
||||
<!-- ##### TYPEDEF GdkBitmap ##### -->
|
||||
<para>
|
||||
An opaque structure representing an offscreen drawable of depth
|
||||
1. Pointers to structures of type #GdkPixmap, #GdkBitmap, and
|
||||
#GdkWindow, can often be used interchangeably. The type #GdkDrawable
|
||||
refers generically to any of these types.
|
||||
</para>
|
||||
|
||||
|
||||
357
docs/reference/gdk/tmpl/properties.sgml
Normal file
357
docs/reference/gdk/tmpl/properties.sgml
Normal file
@@ -0,0 +1,357 @@
|
||||
<!-- ##### SECTION Title ##### -->
|
||||
Properties and Atoms
|
||||
|
||||
<!-- ##### SECTION Short_Description ##### -->
|
||||
Functions to manipulate properties on windows
|
||||
|
||||
<!-- ##### SECTION Long_Description ##### -->
|
||||
<para>
|
||||
Each window under X can have any number of associated
|
||||
<firstterm>properties</firstterm> attached to it.
|
||||
Properties are arbitrary chunks of data identified by
|
||||
<firstterm>atom</firstterm>s. (An <firstterm>atom</firstterm>
|
||||
is a numeric index into a string table on the X server. They are used
|
||||
to transfer strings efficiently between clients without
|
||||
having to transfer the entire string.) A property
|
||||
has an associated type, which is also identified
|
||||
using an atom.
|
||||
</para>
|
||||
<para>
|
||||
A property has an associated <firstterm>format</firstterm>,
|
||||
an integer describing how many bits are in each unit
|
||||
of data inside the property. It must be 8, 16, or 32.
|
||||
When data is transferred between the server and client,
|
||||
if they are of different endianesses it will be byteswapped
|
||||
as necessary according to the format of the property.
|
||||
Note that on the client side, properties of format 32
|
||||
will be stored with one unit per <emphasis>long</emphasis>,
|
||||
even if a long integer has more than 32 bits on the platform.
|
||||
(This decision was apparently made for Xlib to maintain
|
||||
compatibility with programs that assumed longs were 32
|
||||
bits, at the expense of programs that knew better.)
|
||||
</para>
|
||||
<para>
|
||||
The functions in this section are used to add, remove
|
||||
and change properties on windows, to convert atoms
|
||||
to and from strings and to manipulate some types of
|
||||
data commonly stored in X window properties.
|
||||
</para>
|
||||
|
||||
<!-- ##### SECTION See_Also ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### SECTION Stability_Level ##### -->
|
||||
|
||||
|
||||
<!-- ##### SECTION Image ##### -->
|
||||
|
||||
|
||||
<!-- ##### STRUCT GdkAtom ##### -->
|
||||
<para>
|
||||
An opaque type representing a string as an index into a table
|
||||
of strings on the X server.
|
||||
</para>
|
||||
|
||||
|
||||
<!-- ##### MACRO GDK_ATOM_TO_POINTER ##### -->
|
||||
<para>
|
||||
Converts a #GdkAtom into a pointer type.
|
||||
</para>
|
||||
|
||||
@atom: a #GdkAtom.
|
||||
|
||||
|
||||
<!-- ##### MACRO GDK_POINTER_TO_ATOM ##### -->
|
||||
<para>
|
||||
Extracts a #GdkAtom from a pointer. The #GdkAtom must have been
|
||||
stored in the pointer with GDK_ATOM_TO_POINTER().
|
||||
</para>
|
||||
|
||||
@ptr: a pointer containing a #GdkAtom.
|
||||
|
||||
|
||||
<!-- ##### MACRO GDK_NONE ##### -->
|
||||
<para>
|
||||
A null value for #GdkAtom, used in a similar way as <literal>None</literal>
|
||||
in the Xlib API.
|
||||
</para>
|
||||
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_text_property_to_text_list ##### -->
|
||||
<para>
|
||||
Converts a text string from the encoding as it is stored in
|
||||
a property into an array of strings in the encoding of
|
||||
the current local. (The elements of the array represent
|
||||
the nul-separated elements of the original text string.)
|
||||
</para>
|
||||
|
||||
@encoding: an atom representing the encoding. The most common
|
||||
values for this are <literal>STRING</literal>,
|
||||
or <literal>COMPOUND_TEXT</literal>. This is
|
||||
value used as the type for the property.
|
||||
@format: the format of the property.
|
||||
@text: the text data.
|
||||
@length: the length of the property, in items.
|
||||
@list: location to store a terminated array of strings
|
||||
in the encoding of the current locale. This
|
||||
array should be freed using gdk_free_text_list().
|
||||
@Returns: the number of strings stored in @list, or 0,
|
||||
if the conversion failed.
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_text_property_to_text_list_for_display ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@display:
|
||||
@encoding:
|
||||
@format:
|
||||
@text:
|
||||
@length:
|
||||
@list:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_free_text_list ##### -->
|
||||
<para>
|
||||
Frees the array of strings created by
|
||||
gdk_text_property_to_text_list().
|
||||
</para>
|
||||
|
||||
@list: the value stored in the @list parameter by
|
||||
a call to gdk_text_property_to_text_list().
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_text_property_to_utf8_list ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@encoding:
|
||||
@format:
|
||||
@text:
|
||||
@length:
|
||||
@list:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_text_property_to_utf8_list_for_display ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@display:
|
||||
@encoding:
|
||||
@format:
|
||||
@text:
|
||||
@length:
|
||||
@list:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_string_to_compound_text ##### -->
|
||||
<para>
|
||||
Converts a string from the encoding of the current locale
|
||||
into a form suitable for storing in a window property.
|
||||
</para>
|
||||
|
||||
@str: a nul-terminated string.
|
||||
@encoding: location to store the encoding atom (to be used as the type for the property).
|
||||
@format: location to store the format for the property.
|
||||
@ctext: location to store newly allocated data for the property.
|
||||
@length: location to store the length of @ctext in items.
|
||||
@Returns: 0 upon sucess, non-zero upon failure.
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_string_to_compound_text_for_display ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@display:
|
||||
@str:
|
||||
@encoding:
|
||||
@format:
|
||||
@ctext:
|
||||
@length:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_free_compound_text ##### -->
|
||||
<para>
|
||||
Frees the data returned from gdk_string_to_compound_text().
|
||||
</para>
|
||||
|
||||
@ctext: The pointer stored in @ctext from a call to gdk_string_to_compound_text().
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_utf8_to_string_target ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@str:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_utf8_to_compound_text ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@str:
|
||||
@encoding:
|
||||
@format:
|
||||
@ctext:
|
||||
@length:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_utf8_to_compound_text_for_display ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@display:
|
||||
@str:
|
||||
@encoding:
|
||||
@format:
|
||||
@ctext:
|
||||
@length:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_atom_intern ##### -->
|
||||
<para>
|
||||
Finds or creates an atom corresponding to a given string.
|
||||
</para>
|
||||
|
||||
@atom_name: a string.
|
||||
@only_if_exists: if %TRUE, GDK is allowed to not create a new atom, but
|
||||
just return %GDK_NONE if the requested atom doesn't already
|
||||
exists. Currently, the flag is ignored, since checking the
|
||||
existance of an atom is as expensive as creating it.
|
||||
@Returns: the atom corresponding to @atom_name.
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_atom_intern_static_string ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@atom_name:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_atom_name ##### -->
|
||||
<para>
|
||||
Determines the string corresponding to an atom.
|
||||
</para>
|
||||
|
||||
@atom: a #GdkAtom.
|
||||
@Returns: a newly-allocated string containing the string
|
||||
corresponding to @atom. When you are done
|
||||
with the return value, you should free it
|
||||
using g_free().
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_property_get ##### -->
|
||||
<para>
|
||||
Retrieves a portion of the contents of a property. If the
|
||||
property does not exist, then the function returns %FALSE,
|
||||
and %GDK_NONE will be stored in @actual_property_type.
|
||||
</para>
|
||||
<note>
|
||||
<para>
|
||||
The XGetWindowProperty() function that gdk_property_get()
|
||||
uses has a very confusing and complicated set of semantics.
|
||||
Unfortunately, gdk_property_get() makes the situation
|
||||
worse instead of better (the semantics should be considered
|
||||
undefined), and also prints warnings to stderr in cases where it
|
||||
should return a useful error to the program. You are advised to use
|
||||
XGetWindowProperty() directly until a replacement function for
|
||||
gdk_property_get()
|
||||
is provided.
|
||||
</para>
|
||||
</note>
|
||||
|
||||
@window: a #GdkWindow.
|
||||
@property: the property to retrieve.
|
||||
@type: the desired property type, or %GDK_NONE, if any type of data
|
||||
is acceptable. If this does not match the actual
|
||||
type, then @actual_format and @actual_length will
|
||||
be filled in, a warning will be printed to stderr
|
||||
and no data will be returned.
|
||||
@offset: the offset into the property at which to begin
|
||||
retrieving data, in 4 byte units.
|
||||
@length: the length of the data to retrieve in bytes. Data is
|
||||
considered to be retrieved in 4 byte chunks, so @length
|
||||
will be rounded up to the next highest 4 byte boundary
|
||||
(so be careful not to pass a value that might overflow
|
||||
when rounded up).
|
||||
@pdelete: if %TRUE, delete the property after retrieving the
|
||||
data.
|
||||
@actual_property_type: location to store the actual type of
|
||||
the property.
|
||||
@actual_format: location to store the actual return format of the
|
||||
data; either 8, 16 or 32 bits.
|
||||
@actual_length: location to store the length of the retrieved data, in
|
||||
bytes. Data returned in the 32 bit format is stored
|
||||
in a long variable, so the actual number of 32 bit
|
||||
elements should be be calculated via
|
||||
@actual_length/sizeof(glong) to ensure portability to
|
||||
64 bit systems.
|
||||
@data: location to store a pointer to the data. The retrieved
|
||||
data should be freed with g_free() when you are finished
|
||||
using it.
|
||||
@Returns: %TRUE if data was successfully received and stored
|
||||
in @data, otherwise %FALSE.
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_property_change ##### -->
|
||||
<para>
|
||||
Changes the contents of a property on a window.
|
||||
</para>
|
||||
|
||||
@window: a #GdkWindow.
|
||||
@property: the property to change.
|
||||
@type: the new type for the property. If @mode is
|
||||
%GDK_PROP_MODE_PREPEND or %GDK_PROP_MODE_APPEND, then this
|
||||
must match the existing type or an error will occur.
|
||||
@format: the new format for the property. If @mode is
|
||||
%GDK_PROP_MODE_PREPEND or %GDK_PROP_MODE_APPEND, then this
|
||||
must match the existing format or an error will occur.
|
||||
@mode: a value describing how the new data is to be combined
|
||||
with the current data.
|
||||
@data: the data
|
||||
(a <literal>guchar *</literal>
|
||||
<literal>gushort *</literal>, or
|
||||
<literal>gulong *</literal>, depending on @format), cast to a
|
||||
<literal>guchar *</literal>.
|
||||
@nelements: the number of elements of size determined by the format,
|
||||
contained in @data.
|
||||
|
||||
|
||||
<!-- ##### ENUM GdkPropMode ##### -->
|
||||
<para>
|
||||
Describes how existing data is combined with new data when
|
||||
using gdk_property_change().
|
||||
</para>
|
||||
|
||||
@GDK_PROP_MODE_REPLACE: the new data replaces the existing data.
|
||||
@GDK_PROP_MODE_PREPEND: the new data is prepended to the existing data.
|
||||
@GDK_PROP_MODE_APPEND: the new data is appended to the existing data.
|
||||
|
||||
<!-- ##### FUNCTION gdk_property_delete ##### -->
|
||||
<para>
|
||||
Deletes a property from a window.
|
||||
</para>
|
||||
|
||||
@window: a #GdkWindow.
|
||||
@property: the property to delete.
|
||||
|
||||
|
||||
279
docs/reference/gdk/tmpl/selections.sgml
Normal file
279
docs/reference/gdk/tmpl/selections.sgml
Normal file
@@ -0,0 +1,279 @@
|
||||
<!-- ##### SECTION Title ##### -->
|
||||
Selections
|
||||
|
||||
<!-- ##### SECTION Short_Description ##### -->
|
||||
Functions for transfering data via the X selection mechanism
|
||||
|
||||
<!-- ##### SECTION Long_Description ##### -->
|
||||
<para>
|
||||
The X selection mechanism provides a way to transfer
|
||||
arbitrary chunks of data between programs.
|
||||
A <firstterm>selection</firstterm> is a essentially
|
||||
a named clipboard, identified by a string interned
|
||||
as a #GdkAtom. By claiming ownership of a selection,
|
||||
an application indicates that it will be responsible
|
||||
for supplying its contents. The most common
|
||||
selections are <literal>PRIMARY</literal> and
|
||||
<literal>CLIPBOARD</literal>.
|
||||
</para>
|
||||
<para>
|
||||
The contents of a selection can be represented in
|
||||
a number of formats, called <firstterm>targets</firstterm>.
|
||||
Each target is identified by an atom. A list of
|
||||
all possible targets supported by the selection owner
|
||||
can be retrieved by requesting the special target
|
||||
<literal>TARGETS</literal>. When a selection is
|
||||
retrieved, the data is accompanied by a type
|
||||
(an atom), and a format (an integer, representing
|
||||
the number of bits per item).
|
||||
See <link linkend="gdk-Properties-and-Atoms">Properties and Atoms</link>
|
||||
for more information.
|
||||
</para>
|
||||
<para>
|
||||
The functions in this section only contain the lowlevel
|
||||
parts of the selection protocol. A considerably more
|
||||
complicated implementation is needed on top of this.
|
||||
GTK+ contains such an implementation in the functions
|
||||
in <literal>gtkselection.h</literal> and programmers
|
||||
should use those functions instead of the ones presented
|
||||
here. If you plan to implement selection handling
|
||||
directly on top of the functions here, you should refer
|
||||
to the X Inter-client Communication Conventions Manual
|
||||
(ICCCM).
|
||||
</para>
|
||||
|
||||
<!-- ##### SECTION See_Also ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### SECTION Stability_Level ##### -->
|
||||
|
||||
|
||||
<!-- ##### SECTION Image ##### -->
|
||||
|
||||
|
||||
<!-- ##### MACRO GDK_SELECTION_PRIMARY ##### -->
|
||||
<para>
|
||||
A #GdkAtom representing the <literal>PRIMARY</literal> selection.
|
||||
</para>
|
||||
|
||||
|
||||
|
||||
<!-- ##### MACRO GDK_SELECTION_SECONDARY ##### -->
|
||||
<para>
|
||||
A #GdkAtom representing the <literal>SECONDARY</literal> selection.
|
||||
</para>
|
||||
|
||||
|
||||
|
||||
<!-- ##### MACRO GDK_SELECTION_CLIPBOARD ##### -->
|
||||
<para>
|
||||
A #GdkAtom representing the <literal>CLIPBOARD</literal> selection.
|
||||
</para>
|
||||
|
||||
|
||||
|
||||
<!-- ##### MACRO GDK_TARGET_BITMAP ##### -->
|
||||
<para>
|
||||
A #GdkAtom representing the <literal>BITMAP</literal> selection target.
|
||||
</para>
|
||||
|
||||
|
||||
|
||||
<!-- ##### MACRO GDK_TARGET_COLORMAP ##### -->
|
||||
<para>
|
||||
A #GdkAtom representing the <literal>COLORMAP</literal> selection target.
|
||||
</para>
|
||||
|
||||
|
||||
|
||||
<!-- ##### MACRO GDK_TARGET_DRAWABLE ##### -->
|
||||
<para>
|
||||
A #GdkAtom representing the <literal>DRAWABLE</literal> selection target.
|
||||
</para>
|
||||
|
||||
|
||||
|
||||
<!-- ##### MACRO GDK_TARGET_PIXMAP ##### -->
|
||||
<para>
|
||||
A #GdkAtom representing the <literal>PIXMAP</literal> selection target.
|
||||
</para>
|
||||
|
||||
|
||||
|
||||
<!-- ##### MACRO GDK_TARGET_STRING ##### -->
|
||||
<para>
|
||||
A #GdkAtom representing the <literal>STRING</literal> selection target.
|
||||
</para>
|
||||
|
||||
|
||||
|
||||
<!-- ##### MACRO GDK_SELECTION_TYPE_ATOM ##### -->
|
||||
<para>
|
||||
A #GdkAtom representing the <literal>ATOM</literal> selection type.
|
||||
</para>
|
||||
|
||||
|
||||
|
||||
<!-- ##### MACRO GDK_SELECTION_TYPE_BITMAP ##### -->
|
||||
<para>
|
||||
A #GdkAtom representing the <literal>BITMAP</literal> selection type.
|
||||
</para>
|
||||
|
||||
|
||||
|
||||
<!-- ##### MACRO GDK_SELECTION_TYPE_COLORMAP ##### -->
|
||||
<para>
|
||||
A #GdkAtom representing the <literal>COLORMAP</literal> selection type.
|
||||
</para>
|
||||
|
||||
|
||||
|
||||
<!-- ##### MACRO GDK_SELECTION_TYPE_DRAWABLE ##### -->
|
||||
<para>
|
||||
A #GdkAtom representing the <literal>DRAWABLE</literal> selection type.
|
||||
</para>
|
||||
|
||||
|
||||
|
||||
<!-- ##### MACRO GDK_SELECTION_TYPE_INTEGER ##### -->
|
||||
<para>
|
||||
A #GdkAtom representing the <literal>INTEGER</literal> selection type.
|
||||
</para>
|
||||
|
||||
|
||||
|
||||
<!-- ##### MACRO GDK_SELECTION_TYPE_PIXMAP ##### -->
|
||||
<para>
|
||||
A #GdkAtom representing the <literal>PIXMAP</literal> selection type.
|
||||
</para>
|
||||
|
||||
|
||||
|
||||
<!-- ##### MACRO GDK_SELECTION_TYPE_WINDOW ##### -->
|
||||
<para>
|
||||
A #GdkAtom representing the <literal>WINDOW</literal> selection type.
|
||||
</para>
|
||||
|
||||
|
||||
|
||||
<!-- ##### MACRO GDK_SELECTION_TYPE_STRING ##### -->
|
||||
<para>
|
||||
A #GdkAtom representing the <literal>STRING</literal> selection type.
|
||||
</para>
|
||||
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_selection_owner_set ##### -->
|
||||
<para>
|
||||
Sets the owner of the given selection.
|
||||
</para>
|
||||
|
||||
@owner: a #GdkWindow or %NULL to indicate that the
|
||||
the owner for the given should be unset.
|
||||
@selection: an atom identifying a selection.
|
||||
@time_: timestamp to use when setting the selection.
|
||||
If this is older than the timestamp given last
|
||||
time the owner was set for the given selection, the
|
||||
request will be ignored.
|
||||
@send_event: if %TRUE, and the new owner is different
|
||||
from the current owner, the current owner
|
||||
will be sent a SelectionClear event.
|
||||
@Returns: %TRUE if the selection owner was successfully
|
||||
changed to @owner, otherwise %FALSE.
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_selection_owner_set_for_display ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@display:
|
||||
@owner:
|
||||
@selection:
|
||||
@time_:
|
||||
@send_event:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_selection_owner_get ##### -->
|
||||
<para>
|
||||
Determines the owner of the given selection.
|
||||
</para>
|
||||
|
||||
@selection: an atom indentifying a selection.
|
||||
@Returns: if there is a selection owner for this window,
|
||||
and it is a window known to the current process,
|
||||
the #GdkWindow that owns the selection, otherwise
|
||||
%NULL. Note that the return value may be owned
|
||||
by a different process if a foreign window
|
||||
was previously created for that window, but
|
||||
a new foreign window will never be created by
|
||||
this call.
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_selection_owner_get_for_display ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@display:
|
||||
@selection:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_selection_convert ##### -->
|
||||
<para>
|
||||
Retrieves the contents of a selection in a given
|
||||
form.
|
||||
</para>
|
||||
|
||||
@requestor: a #GdkWindow.
|
||||
@selection: an atom identifying the selection to get the
|
||||
contents of.
|
||||
@target: the form in which to retrieve the selection.
|
||||
@time_: the timestamp to use when retrieving the
|
||||
selection. The selection owner may refuse the
|
||||
request if it did not own the selection at
|
||||
the time indicated by the timestamp.
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_selection_property_get ##### -->
|
||||
<para>
|
||||
</para>
|
||||
|
||||
@requestor:
|
||||
@data:
|
||||
@prop_type:
|
||||
@prop_format:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_selection_send_notify ##### -->
|
||||
<para>
|
||||
Sends a response to SelectionRequest event.
|
||||
</para>
|
||||
|
||||
@requestor: window to which to deliver response.
|
||||
@selection: selection that was requested.
|
||||
@target: target that was selected.
|
||||
@property: property in which the selection owner stored the
|
||||
data, or %GDK_NONE to indicate that the request
|
||||
was rejected.
|
||||
@time_: timestamp.
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_selection_send_notify_for_display ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@display:
|
||||
@requestor:
|
||||
@selection:
|
||||
@target:
|
||||
@property:
|
||||
@time_:
|
||||
|
||||
|
||||
381
docs/reference/gdk/tmpl/threads.sgml
Normal file
381
docs/reference/gdk/tmpl/threads.sgml
Normal file
@@ -0,0 +1,381 @@
|
||||
<!-- ##### SECTION Title ##### -->
|
||||
Threads
|
||||
|
||||
<!-- ##### SECTION Short_Description ##### -->
|
||||
Functions for using GDK in multi-threaded programs
|
||||
|
||||
<!-- ##### SECTION Long_Description ##### -->
|
||||
<para>
|
||||
For thread safety, GDK relies on the thread primitives in GLib,
|
||||
and on the thread-safe GLib main loop.
|
||||
</para>
|
||||
<para>
|
||||
GLib is completely thread safe (all global data is automatically
|
||||
locked), but individual data structure instances are not automatically
|
||||
locked for performance reasons. So e.g. you must coordinate
|
||||
accesses to the same #GHashTable from multiple threads.
|
||||
</para>
|
||||
<para>
|
||||
GTK+ is "thread aware" but not thread safe — it provides a
|
||||
global lock controlled by gdk_threads_enter()/gdk_threads_leave()
|
||||
which protects all use of GTK+. That is, only one thread can use GTK+
|
||||
at any given time.
|
||||
</para>
|
||||
<para>
|
||||
Unfortunately the above holds with the X11 backend only. With the
|
||||
Win32 backend, GDK calls should not be attempted from multiple threads
|
||||
at all.
|
||||
</para>
|
||||
<para>
|
||||
You must call g_thread_init() and gdk_threads_init() before executing
|
||||
any other GTK+ or GDK functions in a threaded GTK+ program.
|
||||
</para>
|
||||
<para>
|
||||
Idles, timeouts, and input functions from GLib, such as g_idle_add(), are
|
||||
executed outside of the main GTK+ lock.
|
||||
So, if you need to call GTK+ inside of such a callback, you must surround
|
||||
the callback with a gdk_threads_enter()/gdk_threads_leave() pair or use
|
||||
gdk_threads_add_idle_full() which does this for you.
|
||||
However, event dispatching from the mainloop is still executed within
|
||||
the main GTK+ lock, so callback functions connected to event signals
|
||||
like GtkWidget::button-press-event, do not need thread protection.
|
||||
</para>
|
||||
<para>
|
||||
In particular, this means, if you are writing widgets that might
|
||||
be used in threaded programs, you <emphasis>must</emphasis> surround
|
||||
timeouts and idle functions in this matter.
|
||||
</para>
|
||||
<para>
|
||||
As always, you must also surround any calls to GTK+ not made within
|
||||
a signal handler with a gdk_threads_enter()/gdk_threads_leave() pair.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
Before calling gdk_threads_leave() from a thread other
|
||||
than your main thread, you probably want to call gdk_flush()
|
||||
to send all pending commands to the windowing system.
|
||||
(The reason you don't need to do this from the main thread
|
||||
is that GDK always automatically flushes pending commands
|
||||
when it runs out of incoming events to process and has
|
||||
to sleep while waiting for more events.)
|
||||
</para>
|
||||
|
||||
<para>A minimal main program for a threaded GTK+ application
|
||||
looks like:</para>
|
||||
|
||||
<informalexample>
|
||||
<programlisting role="C">
|
||||
int
|
||||
main (int argc, char *argv[])
|
||||
{
|
||||
GtkWidget *window;
|
||||
|
||||
g_thread_init (NULL);
|
||||
gdk_threads_init (<!-- -->);
|
||||
gdk_threads_enter (<!-- -->);
|
||||
|
||||
gtk_init (&argc, &argv);
|
||||
|
||||
window = create_window (<!-- -->);
|
||||
gtk_widget_show (window);
|
||||
|
||||
gtk_main (<!-- -->);
|
||||
gdk_threads_leave (<!-- -->);
|
||||
|
||||
return 0;
|
||||
}
|
||||
</programlisting>
|
||||
</informalexample>
|
||||
|
||||
<para>
|
||||
Callbacks require a bit of attention. Callbacks from GTK+ signals
|
||||
are made within the GTK+ lock. However callbacks from GLib (timeouts,
|
||||
IO callbacks, and idle functions) are made outside of the GTK+
|
||||
lock. So, within a signal handler you do not need to call
|
||||
gdk_threads_enter(), but within the other types of callbacks, you
|
||||
do.
|
||||
</para>
|
||||
|
||||
<para>Erik Mouw contributed the following code example to
|
||||
illustrate how to use threads within GTK+ programs.
|
||||
</para>
|
||||
|
||||
<informalexample>
|
||||
<programlisting role="C">
|
||||
/*-------------------------------------------------------------------------
|
||||
* Filename: gtk-thread.c
|
||||
* Version: 0.99.1
|
||||
* Copyright: Copyright (C) 1999, Erik Mouw
|
||||
* Author: Erik Mouw <J.A.K.Mouw@its.tudelft.nl>
|
||||
* Description: GTK threads example.
|
||||
* Created at: Sun Oct 17 21:27:09 1999
|
||||
* Modified by: Erik Mouw <J.A.K.Mouw@its.tudelft.nl>
|
||||
* Modified at: Sun Oct 24 17:21:41 1999
|
||||
*-----------------------------------------------------------------------*/
|
||||
/*
|
||||
* Compile with:
|
||||
*
|
||||
* cc -o gtk-thread gtk-thread.c `gtk-config --cflags --libs gthread`
|
||||
*
|
||||
* Thanks to Sebastian Wilhelmi and Owen Taylor for pointing out some
|
||||
* bugs.
|
||||
*
|
||||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <unistd.h>
|
||||
#include <time.h>
|
||||
#include <gtk/gtk.h>
|
||||
#include <glib.h>
|
||||
#include <pthread.h>
|
||||
|
||||
#define YES_IT_IS (1)
|
||||
#define NO_IT_IS_NOT (0)
|
||||
|
||||
typedef struct
|
||||
{
|
||||
GtkWidget *label;
|
||||
int what;
|
||||
} yes_or_no_args;
|
||||
|
||||
G_LOCK_DEFINE_STATIC (yes_or_no);
|
||||
static volatile int yes_or_no = YES_IT_IS;
|
||||
|
||||
void destroy (GtkWidget *widget, gpointer data)
|
||||
{
|
||||
gtk_main_quit (<!-- -->);
|
||||
}
|
||||
|
||||
void *argument_thread (void *args)
|
||||
{
|
||||
yes_or_no_args *data = (yes_or_no_args *)args;
|
||||
gboolean say_something;
|
||||
|
||||
for (;;)
|
||||
{
|
||||
/* sleep a while */
|
||||
sleep(rand(<!-- -->) / (RAND_MAX / 3) + 1);
|
||||
|
||||
/* lock the yes_or_no_variable */
|
||||
G_LOCK(yes_or_no);
|
||||
|
||||
/* do we have to say something? */
|
||||
say_something = (yes_or_no != data->what);
|
||||
|
||||
if(say_something)
|
||||
{
|
||||
/* set the variable */
|
||||
yes_or_no = data->what;
|
||||
}
|
||||
|
||||
/* Unlock the yes_or_no variable */
|
||||
G_UNLOCK (yes_or_no);
|
||||
|
||||
if (say_something)
|
||||
{
|
||||
/* get GTK thread lock */
|
||||
gdk_threads_enter (<!-- -->);
|
||||
|
||||
/* set label text */
|
||||
if(data->what == YES_IT_IS)
|
||||
gtk_label_set_text (GTK_LABEL (data->label), "O yes, it is!");
|
||||
else
|
||||
gtk_label_set_text (GTK_LABEL (data->label), "O no, it isn't!");
|
||||
|
||||
/* release GTK thread lock */
|
||||
gdk_threads_leave (<!-- -->);
|
||||
}
|
||||
}
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
int main (int argc, char *argv[])
|
||||
{
|
||||
GtkWidget *window;
|
||||
GtkWidget *label;
|
||||
yes_or_no_args yes_args, no_args;
|
||||
pthread_t no_tid, yes_tid;
|
||||
|
||||
/* init threads */
|
||||
g_thread_init (NULL);
|
||||
gdk_threads_init (<!-- -->);
|
||||
gdk_threads_enter (<!-- -->);
|
||||
|
||||
/* init gtk */
|
||||
gtk_init(&argc, &argv);
|
||||
|
||||
/* init random number generator */
|
||||
srand ((unsigned int) time (NULL));
|
||||
|
||||
/* create a window */
|
||||
window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
|
||||
|
||||
g_signal_connect (window, "destroy", G_CALLBACK (destroy), NULL);
|
||||
|
||||
gtk_container_set_border_width (GTK_CONTAINER (window), 10);
|
||||
|
||||
/* create a label */
|
||||
label = gtk_label_new ("And now for something completely different ...");
|
||||
gtk_container_add (GTK_CONTAINER (window), label);
|
||||
|
||||
/* show everything */
|
||||
gtk_widget_show (label);
|
||||
gtk_widget_show (window);
|
||||
|
||||
/* create the threads */
|
||||
yes_args.label = label;
|
||||
yes_args.what = YES_IT_IS;
|
||||
pthread_create (&yes_tid, NULL, argument_thread, &yes_args);
|
||||
|
||||
no_args.label = label;
|
||||
no_args.what = NO_IT_IS_NOT;
|
||||
pthread_create (&no_tid, NULL, argument_thread, &no_args);
|
||||
|
||||
/* enter the GTK main loop */
|
||||
gtk_main (<!-- -->);
|
||||
gdk_threads_leave (<!-- -->);
|
||||
|
||||
return 0;
|
||||
}
|
||||
</programlisting>
|
||||
</informalexample>
|
||||
|
||||
<!-- ##### SECTION See_Also ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### SECTION Stability_Level ##### -->
|
||||
|
||||
|
||||
<!-- ##### SECTION Image ##### -->
|
||||
|
||||
|
||||
<!-- ##### MACRO GDK_THREADS_ENTER ##### -->
|
||||
<para>
|
||||
This macro marks the beginning of a critical section in which GDK and
|
||||
GTK+ functions can be called safely and without causing race
|
||||
conditions. Only one thread at a time can be in such a critial
|
||||
section. The macro expands to a no-op if #G_THREADS_ENABLED has not
|
||||
been defined. Typically gdk_threads_enter() should be used instead of
|
||||
this macro.
|
||||
</para>
|
||||
|
||||
|
||||
|
||||
<!-- ##### MACRO GDK_THREADS_LEAVE ##### -->
|
||||
<para>
|
||||
This macro marks the end of a critical section
|
||||
begun with #GDK_THREADS_ENTER.
|
||||
</para>
|
||||
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_threads_init ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@void:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_threads_enter ##### -->
|
||||
<para>
|
||||
This macro marks the beginning of a critical section in which GDK and
|
||||
GTK+ functions can be called safely and without causing race
|
||||
conditions. Only one thread at a time can be in such a critial
|
||||
section.
|
||||
</para>
|
||||
|
||||
@void:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_threads_leave ##### -->
|
||||
<para>
|
||||
Leaves a critical region begun with gdk_threads_enter().
|
||||
</para>
|
||||
|
||||
@void:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_threads_set_lock_functions ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@enter_fn:
|
||||
@leave_fn:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_threads_add_idle ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@function:
|
||||
@data:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_threads_add_idle_full ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@priority:
|
||||
@function:
|
||||
@data:
|
||||
@notify:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_threads_add_timeout ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@interval:
|
||||
@function:
|
||||
@data:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_threads_add_timeout_full ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@priority:
|
||||
@interval:
|
||||
@function:
|
||||
@data:
|
||||
@notify:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_threads_add_timeout_seconds ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@interval:
|
||||
@function:
|
||||
@data:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_threads_add_timeout_seconds_full ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@priority:
|
||||
@interval:
|
||||
@function:
|
||||
@data:
|
||||
@notify:
|
||||
@Returns:
|
||||
|
||||
|
||||
283
docs/reference/gdk/tmpl/visuals.sgml
Normal file
283
docs/reference/gdk/tmpl/visuals.sgml
Normal file
@@ -0,0 +1,283 @@
|
||||
<!-- ##### SECTION Title ##### -->
|
||||
Visuals
|
||||
|
||||
<!-- ##### SECTION Short_Description ##### -->
|
||||
|
||||
Low-level display hardware information
|
||||
|
||||
<!-- ##### SECTION Long_Description ##### -->
|
||||
<para>
|
||||
A #GdkVisual describes a particular video hardware display format. It includes
|
||||
information about the number of bits used for each color, the way the bits are
|
||||
translated into an RGB value for display, and the way the bits are stored in
|
||||
memory. For example, a piece of display hardware might support 24-bit color,
|
||||
16-bit color, or 8-bit color; meaning 24/16/8-bit pixel sizes. For a given
|
||||
pixel size, pixels can be in different formats; for example the "red" element
|
||||
of an RGB pixel may be in the top 8 bits of the pixel, or may be in the lower
|
||||
4 bits.
|
||||
</para>
|
||||
<para>
|
||||
There are several standard visuals. The visual returned
|
||||
by gdk_screen_get_system_visual() is the system's default
|
||||
visual.
|
||||
</para>
|
||||
<para>
|
||||
A number of functions are provided for determining
|
||||
the "best" available visual. For the purposes of
|
||||
making this determination, higher bit depths are
|
||||
considered better, and for visuals of the same
|
||||
bit depth, %GDK_VISUAL_PSEUDO_COLOR is preferred at
|
||||
8bpp, otherwise, the visual types are ranked in the
|
||||
order of (highest to lowest) %GDK_VISUAL_DIRECT_COLOR,
|
||||
%GDK_VISUAL_TRUE_COLOR, %GDK_VISUAL_PSEUDO_COLOR,
|
||||
%GDK_VISUAL_STATIC_COLOR, %GDK_VISUAL_GRAYSCALE,
|
||||
then %GDK_VISUAL_STATIC_GRAY.
|
||||
</para>
|
||||
|
||||
<!-- ##### SECTION See_Also ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### SECTION Stability_Level ##### -->
|
||||
|
||||
|
||||
<!-- ##### SECTION Image ##### -->
|
||||
|
||||
|
||||
<!-- ##### STRUCT GdkVisual ##### -->
|
||||
<para>
|
||||
The <type>GdkVisual</type> structure contains information about
|
||||
a particular visual.
|
||||
</para>
|
||||
|
||||
<example id="rgbmask">
|
||||
<title>Constructing a pixel value from components</title>
|
||||
<programlisting>
|
||||
guint
|
||||
pixel_from_rgb (GdkVisual *visual,
|
||||
guchar r, guchar b, guchar g)
|
||||
{
|
||||
return ((r >> (16 - visual->red_prec)) << visual->red_shift) |
|
||||
((g >> (16 - visual->green_prec)) << visual->green_shift) |
|
||||
((r >> (16 - visual->blue_prec)) << visual->blue_shift);
|
||||
}
|
||||
</programlisting>
|
||||
</example>
|
||||
|
||||
@parent_instance: inherited portion from #GObject
|
||||
|
||||
<!-- ##### ENUM GdkVisualType ##### -->
|
||||
<para>
|
||||
A set of values that describe the manner in which the
|
||||
pixel values for a visual are converted into RGB
|
||||
values for display.
|
||||
</para>
|
||||
|
||||
@GDK_VISUAL_STATIC_GRAY: Each pixel value indexes a grayscale value directly.
|
||||
@GDK_VISUAL_GRAYSCALE: Each pixel is an index into a color map that maps pixel
|
||||
values into grayscale values. The color map can be changed by an application.
|
||||
@GDK_VISUAL_STATIC_COLOR: Each pixel value is an index into a predefined,
|
||||
unmodifiable color map that maps pixel values into RGB values.
|
||||
@GDK_VISUAL_PSEUDO_COLOR: Each pixel is an index into a color map that maps
|
||||
pixel values into rgb values. The color map can be changed by an application.
|
||||
@GDK_VISUAL_TRUE_COLOR: Each pixel value directly contains red, green,
|
||||
and blue components. The <structfield>red_mask</structfield>,
|
||||
<structfield>green_mask</structfield>, and
|
||||
<structfield>blue_mask</structfield> fields of the #GdkVisual
|
||||
structure describe how the components are assembled into a pixel value.
|
||||
@GDK_VISUAL_DIRECT_COLOR: Each pixel value contains red, green, and blue
|
||||
components as for %GDK_VISUAL_TRUE_COLOR, but the components are mapped via a
|
||||
color table into the final output table instead of being converted directly.
|
||||
|
||||
<!-- ##### ENUM GdkByteOrder ##### -->
|
||||
<para>
|
||||
A set of values describing the possible byte-orders
|
||||
for storing pixel values in memory.
|
||||
</para>
|
||||
|
||||
@GDK_LSB_FIRST: The values are stored with the least-significant byte
|
||||
first. For instance, the 32-bit value 0xffeecc would be stored
|
||||
in memory as 0xcc, 0xee, 0xff, 0x00.
|
||||
@GDK_MSB_FIRST: The values are stored with the most-significant byte
|
||||
first. For instance, the 32-bit value 0xffeecc would be stored
|
||||
in memory as 0x00, 0xcc, 0xee, 0xff.
|
||||
|
||||
<!-- ##### FUNCTION gdk_query_depths ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@depths:
|
||||
@count:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_query_visual_types ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@visual_types:
|
||||
@count:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_list_visuals ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@void:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_visual_get_bits_per_rgb ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@visual:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_visual_get_blue_pixel_details ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@visual:
|
||||
@mask:
|
||||
@shift:
|
||||
@precision:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_visual_get_byte_order ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@visual:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_visual_get_colormap_size ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@visual:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_visual_get_depth ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@visual:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_visual_get_green_pixel_details ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@visual:
|
||||
@mask:
|
||||
@shift:
|
||||
@precision:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_visual_get_red_pixel_details ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@visual:
|
||||
@mask:
|
||||
@shift:
|
||||
@precision:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_visual_get_visual_type ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@visual:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_visual_get_best_depth ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@void:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_visual_get_best_type ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@void:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_visual_get_system ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@void:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_visual_get_best ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@void:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_visual_get_best_with_depth ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@depth:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_visual_get_best_with_type ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@visual_type:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_visual_get_best_with_both ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@depth:
|
||||
@visual_type:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_visual_get_screen ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@visual:
|
||||
@Returns:
|
||||
|
||||
|
||||
555
docs/reference/gdk/tmpl/x_interaction.sgml
Normal file
555
docs/reference/gdk/tmpl/x_interaction.sgml
Normal file
@@ -0,0 +1,555 @@
|
||||
<!-- ##### SECTION Title ##### -->
|
||||
X Window System Interaction
|
||||
|
||||
<!-- ##### SECTION Short_Description ##### -->
|
||||
X backend-specific functions
|
||||
|
||||
<!-- ##### SECTION Long_Description ##### -->
|
||||
<para>
|
||||
The functions in this section are specific to the GDK X11 backend.
|
||||
To use them, you need to include the <literal><gdk/gdkx.h></literal>
|
||||
header and use the X11-specific pkg-config files to build your application
|
||||
(either <literal>gdk-x11-3.0</literal> or <literal>gtk+-x11-3.0</literal>.
|
||||
To make your code compile with other GDK backends, guard backend-specific
|
||||
calls by an ifdef as follows:
|
||||
<informalexample><programlisting>
|
||||
#ifdef GDK_WINDOWING_X11
|
||||
/* X11-specific calls here... */
|
||||
#endif
|
||||
</programlisting></informalexample>
|
||||
</para>
|
||||
|
||||
<!-- ##### SECTION See_Also ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### SECTION Stability_Level ##### -->
|
||||
|
||||
|
||||
<!-- ##### SECTION Image ##### -->
|
||||
|
||||
|
||||
<!-- ##### MACRO GDK_ROOT_WINDOW ##### -->
|
||||
<para>
|
||||
Obtains the Xlib window id of the root window of the current screen.
|
||||
</para>
|
||||
|
||||
|
||||
|
||||
<!-- ##### MACRO GDK_WINDOW_XDISPLAY ##### -->
|
||||
<para>
|
||||
Returns the display of a #GdkWindow.
|
||||
</para>
|
||||
|
||||
@win: a #GdkWindow.
|
||||
@Returns: an Xlib <type>Display*</type>.
|
||||
|
||||
|
||||
<!-- ##### MACRO GDK_WINDOW_XID ##### -->
|
||||
<para>
|
||||
Returns the X window belonging to a #GdkWindow.
|
||||
</para>
|
||||
|
||||
@win: a #GdkWindow.
|
||||
@Returns: the Xlib <type>Window</type> of @win.
|
||||
|
||||
|
||||
<!-- ##### MACRO GDK_DISPLAY_XDISPLAY ##### -->
|
||||
<para>
|
||||
Returns the display of a #GdkDisplay.
|
||||
</para>
|
||||
|
||||
@display: a #GdkDisplay.
|
||||
|
||||
|
||||
<!-- ##### MACRO GDK_DRAWABLE_XDISPLAY ##### -->
|
||||
<para>
|
||||
Returns the display of a #GdkDrawable.
|
||||
</para>
|
||||
|
||||
@win: a #GdkDrawable.
|
||||
@Returns: an Xlib <type>Display*</type>.
|
||||
|
||||
|
||||
<!-- ##### MACRO GDK_DRAWABLE_XID ##### -->
|
||||
<para>
|
||||
Returns the X resource (window or pixmap) belonging to a #GdkDrawable.
|
||||
</para>
|
||||
|
||||
@win: a #GdkDrawable.
|
||||
@Returns: the ID of @win's X resource.
|
||||
|
||||
|
||||
<!-- ##### MACRO GDK_SCREEN_XDISPLAY ##### -->
|
||||
<para>
|
||||
Returns the display of a #GdkScreen.
|
||||
</para>
|
||||
|
||||
@screen: a #GdkScreen.
|
||||
@Returns: an Xlib <type>Display*</type>.
|
||||
|
||||
|
||||
<!-- ##### MACRO GDK_SCREEN_XNUMBER ##### -->
|
||||
<para>
|
||||
Returns the index of a #GdkScreen.
|
||||
</para>
|
||||
|
||||
@screen: a #GdkScreen
|
||||
@Returns: the position of @screen among the screens of
|
||||
its display.
|
||||
|
||||
|
||||
<!-- ##### MACRO GDK_SCREEN_XSCREEN ##### -->
|
||||
<para>
|
||||
Returns the screen of a #GdkScreen.
|
||||
</para>
|
||||
|
||||
@screen: a #GdkScreen
|
||||
@Returns: an Xlib <type>Screen*</type>.
|
||||
|
||||
|
||||
<!-- ##### MACRO GDK_CURSOR_XCURSOR ##### -->
|
||||
<para>
|
||||
Returns the X cursor belonging to a #GdkCursor.
|
||||
</para>
|
||||
|
||||
@cursor: a #GdkCursor.
|
||||
@Returns: an Xlib <type>Cursor</type>.
|
||||
|
||||
|
||||
<!-- ##### MACRO GDK_CURSOR_XDISPLAY ##### -->
|
||||
<para>
|
||||
Returns the display of a #GdkCursor.
|
||||
</para>
|
||||
|
||||
@cursor: a #GdkCursor.
|
||||
@Returns: an Xlib <type>Display*</type>.
|
||||
|
||||
|
||||
<!-- ##### MACRO GDK_WINDOW_XWINDOW ##### -->
|
||||
<para>
|
||||
Another name for GDK_DRAWABLE_XID().
|
||||
</para>
|
||||
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdkx_visual_get ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@xvisualid:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_window_foreign_new ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@anid:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_window_foreign_new_for_display ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@display:
|
||||
@anid:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_xid_table_lookup ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@xid:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_xid_table_lookup_for_display ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@display:
|
||||
@xid:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_window_lookup ##### -->
|
||||
<para>
|
||||
</para>
|
||||
|
||||
@anid:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_window_lookup_for_display ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@display:
|
||||
@anid:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_x11_lookup_xdisplay ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@xdisplay:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_x11_get_server_time ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@window:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_net_wm_supports ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@property:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_x11_screen_supports_net_wm_hint ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@screen:
|
||||
@property:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_x11_screen_get_window_manager_name ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@screen:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_x11_screen_get_monitor_output ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@screen:
|
||||
@monitor_num:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_x11_screen_lookup_visual ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@screen:
|
||||
@xvisualid:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_x11_window_set_user_time ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@window:
|
||||
@timestamp:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_x11_window_move_to_current_desktop ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@window:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_x11_display_get_user_time ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@display:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_x11_cursor_get_xcursor ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@cursor:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_x11_cursor_get_xdisplay ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@cursor:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_x11_display_broadcast_startup_message ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@display:
|
||||
@message_type:
|
||||
@Varargs:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_x11_display_get_startup_notification_id ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@display:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_x11_display_get_xdisplay ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@display:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_x11_display_grab ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@display:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_x11_display_ungrab ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@display:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_x11_display_error_trap_push ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@display:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_x11_display_error_trap_pop_ignored ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@display:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_x11_display_set_cursor_theme ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@display:
|
||||
@theme:
|
||||
@size:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_x11_register_standard_event_type ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@display:
|
||||
@event_base:
|
||||
@n_events:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_x11_drawable_get_xdisplay ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@drawable:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_x11_drawable_get_xid ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@drawable:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_x11_get_default_root_xwindow ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@void:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_x11_get_default_screen ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@void:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_x11_get_default_xdisplay ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@void:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_x11_grab_server ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@void:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_x11_screen_get_screen_number ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@screen:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_x11_screen_get_xscreen ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@screen:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_x11_ungrab_server ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@void:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_x11_visual_get_xvisual ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@visual:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_x11_atom_to_xatom ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@atom:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_x11_atom_to_xatom_for_display ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@display:
|
||||
@atom:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_x11_xatom_to_atom ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@xatom:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_x11_xatom_to_atom_for_display ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@display:
|
||||
@xatom:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_x11_get_xatom_by_name ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@atom_name:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_x11_get_xatom_by_name_for_display ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@display:
|
||||
@atom_name:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_x11_get_xatom_name ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@xatom:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_x11_get_xatom_name_for_display ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@display:
|
||||
@xatom:
|
||||
@Returns:
|
||||
|
||||
|
||||
@@ -322,8 +322,7 @@ HTML_IMAGES = \
|
||||
$(srcdir)/images/layout-tblr.png \
|
||||
$(srcdir)/images/layout-tbrl.png \
|
||||
$(srcdir)/images/window-default.png \
|
||||
$(srcdir)/images/hello-world.png \
|
||||
$(srcdir)/images/switch.png
|
||||
$(srcdir)/images/hello-world.png
|
||||
|
||||
# Extra options to supply to gtkdoc-fixref
|
||||
FIXXREF_OPTIONS=--extra-dir=../gdk/html \
|
||||
|
||||
@@ -97,7 +97,6 @@
|
||||
<xi:include href="xml/gtklinkbutton.xml" />
|
||||
<xi:include href="xml/gtkscalebutton.xml" />
|
||||
<xi:include href="xml/gtkvolumebutton.xml" />
|
||||
<xi:include href="xml/gtkswitch.xml" />
|
||||
</chapter>
|
||||
|
||||
<chapter id="NumericEntry">
|
||||
@@ -287,6 +286,13 @@
|
||||
<xi:include href="xml/gtksocket.xml" />
|
||||
</chapter>
|
||||
|
||||
<chapter id="SpecialObjects">
|
||||
<title>Special-purpose features</title>
|
||||
<xi:include href="xml/gtkruler.xml" />
|
||||
<xi:include href="xml/gtkhruler.xml" />
|
||||
<xi:include href="xml/gtkvruler.xml" />
|
||||
</chapter>
|
||||
|
||||
<chapter id="RecentDocuments">
|
||||
<title>Recently Used Documents</title>
|
||||
<xi:include href="xml/gtkrecentmanager.xml" />
|
||||
|
||||
@@ -371,8 +371,6 @@ gtk_assistant_add_action_widget
|
||||
gtk_assistant_remove_action_widget
|
||||
gtk_assistant_update_buttons_state
|
||||
gtk_assistant_commit
|
||||
gtk_assistant_next_page
|
||||
gtk_assistant_previous_page
|
||||
|
||||
<SUBSECTION Standard>
|
||||
GtkAssistantClass
|
||||
@@ -419,7 +417,6 @@ GTK_ASPECT_FRAME_CLASS
|
||||
GTK_IS_ASPECT_FRAME_CLASS
|
||||
GTK_ASPECT_FRAME_GET_CLASS
|
||||
<SUBSECTION Private>
|
||||
GtkAspectFramePrivate
|
||||
gtk_aspect_frame_get_type
|
||||
</SECTION>
|
||||
|
||||
@@ -440,7 +437,6 @@ GTK_BUTTON_BOX_CLASS
|
||||
GTK_IS_BUTTON_BOX_CLASS
|
||||
GTK_BUTTON_BOX_GET_CLASS
|
||||
<SUBSECTION Private>
|
||||
GtkButtonBoxPrivate
|
||||
gtk_button_box_get_type
|
||||
</SECTION>
|
||||
|
||||
@@ -457,7 +453,6 @@ GTK_BIN_CLASS
|
||||
GTK_IS_BIN_CLASS
|
||||
GTK_BIN_GET_CLASS
|
||||
<SUBSECTION Private>
|
||||
GtkBinPrivate
|
||||
gtk_bin_get_type
|
||||
</SECTION>
|
||||
|
||||
@@ -483,7 +478,6 @@ GTK_BOX_CLASS
|
||||
GTK_IS_BOX_CLASS
|
||||
GTK_BOX_GET_CLASS
|
||||
<SUBSECTION Private>
|
||||
GtkBoxPrivate
|
||||
gtk_box_get_type
|
||||
</SECTION>
|
||||
|
||||
@@ -584,7 +578,6 @@ GTK_BUTTON_CLASS
|
||||
GTK_IS_BUTTON_CLASS
|
||||
GTK_BUTTON_GET_CLASS
|
||||
<SUBSECTION Private>
|
||||
GtkButtonPrivate
|
||||
gtk_button_get_type
|
||||
</SECTION>
|
||||
|
||||
@@ -669,7 +662,6 @@ GTK_CHECK_MENU_ITEM_CLASS
|
||||
GTK_IS_CHECK_MENU_ITEM_CLASS
|
||||
GTK_CHECK_MENU_ITEM_GET_CLASS
|
||||
<SUBSECTION Private>
|
||||
GtkCheckMenuItemPrivate
|
||||
gtk_check_menu_item_get_type
|
||||
</SECTION>
|
||||
|
||||
@@ -722,7 +714,6 @@ GTK_IS_HSV
|
||||
GTK_IS_HSV_CLASS
|
||||
GTK_HSV_GET_CLASS
|
||||
<SUBSECTION Private>
|
||||
GtkHSVPrivate
|
||||
gtk_hsv_get_type
|
||||
</SECTION>
|
||||
|
||||
@@ -761,7 +752,6 @@ GTK_COLOR_SELECTION_CLASS
|
||||
GTK_IS_COLOR_SELECTION_CLASS
|
||||
GTK_COLOR_SELECTION_GET_CLASS
|
||||
<SUBSECTION Private>
|
||||
GtkColorSelectionPrivate
|
||||
gtk_color_selection_get_type
|
||||
</SECTION>
|
||||
|
||||
@@ -779,7 +769,6 @@ GTK_COLOR_SELECTION_DIALOG_CLASS
|
||||
GTK_IS_COLOR_SELECTION_DIALOG_CLASS
|
||||
GTK_COLOR_SELECTION_DIALOG_GET_CLASS
|
||||
<SUBSECTION Private>
|
||||
GtkColorSelectionDialogPrivate
|
||||
gtk_color_selection_dialog_get_type
|
||||
</SECTION>
|
||||
|
||||
@@ -801,10 +790,6 @@ gtk_combo_box_get_active
|
||||
gtk_combo_box_set_active
|
||||
gtk_combo_box_get_active_iter
|
||||
gtk_combo_box_set_active_iter
|
||||
gtk_combo_box_get_id_column
|
||||
gtk_combo_box_set_id_column
|
||||
gtk_combo_box_get_active_id
|
||||
gtk_combo_box_set_active_id
|
||||
gtk_combo_box_get_model
|
||||
gtk_combo_box_set_model
|
||||
gtk_combo_box_popup_for_device
|
||||
@@ -844,12 +829,9 @@ gtk_combo_box_get_type
|
||||
GtkComboBoxText
|
||||
gtk_combo_box_text_new
|
||||
gtk_combo_box_text_new_with_entry
|
||||
gtk_combo_box_text_append
|
||||
gtk_combo_box_text_prepend
|
||||
gtk_combo_box_text_insert
|
||||
gtk_combo_box_text_append_text
|
||||
gtk_combo_box_text_prepend_text
|
||||
gtk_combo_box_text_insert_text
|
||||
gtk_combo_box_text_prepend_text
|
||||
gtk_combo_box_text_remove
|
||||
gtk_combo_box_text_remove_all
|
||||
gtk_combo_box_text_get_active_text
|
||||
@@ -916,7 +898,6 @@ GTK_CONTAINER_CLASS
|
||||
GTK_IS_CONTAINER_CLASS
|
||||
GTK_CONTAINER_GET_CLASS
|
||||
<SUBSECTION Private>
|
||||
GtkContainerPrivate
|
||||
gtk_container_get_type
|
||||
</SECTION>
|
||||
|
||||
@@ -952,7 +933,6 @@ GTK_DIALOG_CLASS
|
||||
GTK_IS_DIALOG_CLASS
|
||||
GTK_DIALOG_GET_CLASS
|
||||
<SUBSECTION Private>
|
||||
GtkDialogPrivate
|
||||
gtk_dialog_get_type
|
||||
</SECTION>
|
||||
|
||||
@@ -1078,7 +1058,6 @@ GTK_ENTRY_CLASS
|
||||
GTK_IS_ENTRY_CLASS
|
||||
GTK_ENTRY_GET_CLASS
|
||||
<SUBSECTION Private>
|
||||
GtkEntryPrivate
|
||||
gtk_entry_get_type
|
||||
</SECTION>
|
||||
|
||||
@@ -1378,7 +1357,6 @@ GTK_FIXED_CLASS
|
||||
GTK_IS_FIXED_CLASS
|
||||
GTK_FIXED_GET_CLASS
|
||||
<SUBSECTION Private>
|
||||
GtkFixedPrivate
|
||||
GtkFixedChild
|
||||
gtk_fixed_get_type
|
||||
</SECTION>
|
||||
@@ -1439,7 +1417,6 @@ GTK_FONT_SELECTION_CLASS
|
||||
GTK_IS_FONT_SELECTION_CLASS
|
||||
GTK_FONT_SELECTION_GET_CLASS
|
||||
<SUBSECTION Private>
|
||||
GtkFontSelectionPrivate
|
||||
gtk_font_selection_get_type
|
||||
</SECTION>
|
||||
|
||||
@@ -1464,7 +1441,6 @@ GTK_FONT_SELECTION_DIALOG_CLASS
|
||||
GTK_IS_FONT_SELECTION_DIALOG_CLASS
|
||||
GTK_FONT_SELECTION_DIALOG_GET_CLASS
|
||||
<SUBSECTION Private>
|
||||
GtkFontSelectionDialogPrivate
|
||||
gtk_font_selection_dialog_get_type
|
||||
</SECTION>
|
||||
|
||||
@@ -1489,7 +1465,6 @@ GTK_FRAME_CLASS
|
||||
GTK_IS_FRAME_CLASS
|
||||
GTK_FRAME_GET_CLASS
|
||||
<SUBSECTION Private>
|
||||
GtkFramePrivate
|
||||
gtk_frame_get_type
|
||||
</SECTION>
|
||||
|
||||
@@ -1513,7 +1488,6 @@ GTK_HANDLE_BOX_CLASS
|
||||
GTK_IS_HANDLE_BOX_CLASS
|
||||
GTK_HANDLE_BOX_GET_CLASS
|
||||
<SUBSECTION Private>
|
||||
GtkHandleBoxPrivate
|
||||
gtk_handle_box_get_type
|
||||
</SECTION>
|
||||
|
||||
@@ -1565,6 +1539,22 @@ GTK_HPANED_GET_CLASS
|
||||
gtk_hpaned_get_type
|
||||
</SECTION>
|
||||
|
||||
<SECTION>
|
||||
<FILE>gtkhruler</FILE>
|
||||
<TITLE>GtkHRuler</TITLE>
|
||||
GtkHRuler
|
||||
gtk_hruler_new
|
||||
<SUBSECTION Standard>
|
||||
GTK_HRULER
|
||||
GTK_IS_HRULER
|
||||
GTK_TYPE_HRULER
|
||||
GTK_HRULER_CLASS
|
||||
GTK_IS_HRULER_CLASS
|
||||
GTK_HRULER_GET_CLASS
|
||||
<SUBSECTION Private>
|
||||
gtk_hruler_get_type
|
||||
</SECTION>
|
||||
|
||||
<SECTION>
|
||||
<FILE>gtkhscale</FILE>
|
||||
<TITLE>GtkHScale</TITLE>
|
||||
@@ -1732,7 +1722,6 @@ GTK_IMAGE_CLASS
|
||||
GTK_IS_IMAGE_CLASS
|
||||
GTK_IMAGE_GET_CLASS
|
||||
<SUBSECTION Private>
|
||||
GtkImagePrivate
|
||||
gtk_image_get_type
|
||||
GtkImageIconSetData
|
||||
GtkImageImageData
|
||||
@@ -1768,7 +1757,6 @@ GTK_IS_IMAGE_MENU_ITEM
|
||||
GTK_IS_IMAGE_MENU_ITEM_CLASS
|
||||
GTK_TYPE_IMAGE_MENU_ITEM
|
||||
<SUBSECTION Private>
|
||||
GtkImageMenuItemPrivate
|
||||
gtk_image_menu_item_get_type
|
||||
</SECTION>
|
||||
|
||||
@@ -1815,7 +1803,6 @@ GTK_IM_CONTEXT_SIMPLE_CLASS
|
||||
GTK_IS_IM_CONTEXT_SIMPLE_CLASS
|
||||
GTK_IM_CONTEXT_SIMPLE_GET_CLASS
|
||||
<SUBSECTION Private>
|
||||
GtkIMContextSimplePrivate
|
||||
gtk_im_context_simple_get_type
|
||||
</SECTION>
|
||||
|
||||
@@ -1856,7 +1843,6 @@ GTK_IS_INVISIBLE_CLASS
|
||||
GTK_INVISIBLE_GET_CLASS
|
||||
<SUBSECTION Private>
|
||||
gtk_invisible_get_type
|
||||
GtkInvisiblePrivate
|
||||
</SECTION>
|
||||
|
||||
<SECTION>
|
||||
@@ -1916,7 +1902,6 @@ GTK_IS_LABEL_CLASS
|
||||
GTK_LABEL_GET_CLASS
|
||||
<SUBSECTION Private>
|
||||
gtk_label_get_type
|
||||
GtkLabelPrivate
|
||||
GtkLabelSelectionInfo
|
||||
</SECTION>
|
||||
|
||||
@@ -1942,7 +1927,6 @@ GTK_LAYOUT_CLASS
|
||||
GTK_IS_LAYOUT_CLASS
|
||||
GTK_LAYOUT_GET_CLASS
|
||||
<SUBSECTION Private>
|
||||
GtkLayoutPrivate
|
||||
gtk_layout_get_type
|
||||
</SECTION>
|
||||
|
||||
@@ -2480,7 +2464,6 @@ GTK_IS_RANGE_CLASS
|
||||
GTK_RANGE_GET_CLASS
|
||||
<SUBSECTION Private>
|
||||
gtk_range_get_type
|
||||
GtkRangePrivate
|
||||
GtkRangeLayout
|
||||
GtkRangeStepTimer
|
||||
</SECTION>
|
||||
@@ -2702,6 +2685,28 @@ GtkRecentActionPrivate
|
||||
gtk_recent_action_get_type
|
||||
</SECTION>
|
||||
|
||||
<SECTION>
|
||||
<FILE>gtkruler</FILE>
|
||||
<TITLE>GtkRuler</TITLE>
|
||||
GtkRuler
|
||||
GtkRulerMetric
|
||||
gtk_ruler_new
|
||||
gtk_ruler_set_metric
|
||||
gtk_ruler_set_range
|
||||
gtk_ruler_get_metric
|
||||
gtk_ruler_get_range
|
||||
<SUBSECTION Standard>
|
||||
GTK_RULER
|
||||
GTK_IS_RULER
|
||||
GTK_TYPE_RULER
|
||||
GTK_RULER_CLASS
|
||||
GTK_IS_RULER_CLASS
|
||||
GTK_RULER_GET_CLASS
|
||||
<SUBSECTION Private>
|
||||
GtkRulerPrivate
|
||||
gtk_ruler_get_type
|
||||
</SECTION>
|
||||
|
||||
<SECTION>
|
||||
<FILE>gtkscale</FILE>
|
||||
<TITLE>GtkScale</TITLE>
|
||||
@@ -2763,12 +2768,6 @@ gtk_scrollable_get_hadjustment
|
||||
gtk_scrollable_set_hadjustment
|
||||
gtk_scrollable_get_vadjustment
|
||||
gtk_scrollable_set_vadjustment
|
||||
GtkScrollablePolicy
|
||||
gtk_scrollable_get_hscroll_policy
|
||||
gtk_scrollable_set_hscroll_policy
|
||||
gtk_scrollable_get_vscroll_policy
|
||||
gtk_scrollable_set_vscroll_policy
|
||||
|
||||
|
||||
<SUBSECTION Standard>
|
||||
GtkScrollableIface
|
||||
@@ -2832,7 +2831,6 @@ GTK_IS_SCROLLED_WINDOW_CLASS
|
||||
GTK_SCROLLED_WINDOW_GET_CLASS
|
||||
<SUBSECTION Private>
|
||||
gtk_scrolled_window_get_type
|
||||
GtkScrolledWindowPrivate
|
||||
</SECTION>
|
||||
|
||||
<SECTION>
|
||||
@@ -2849,7 +2847,6 @@ GTK_IS_SEPARATOR_CLASS
|
||||
GTK_SEPARATOR_GET_CLASS
|
||||
<SUBSECTION Private>
|
||||
gtk_separator_get_type
|
||||
GtkSeparatorPrivate
|
||||
</SECTION>
|
||||
|
||||
<SECTION>
|
||||
@@ -3547,7 +3544,6 @@ GTK_IS_TOGGLE_BUTTON_CLASS
|
||||
GTK_TOGGLE_BUTTON_GET_CLASS
|
||||
<SUBSECTION Private>
|
||||
gtk_toggle_button_get_type
|
||||
GtkToggleButtonPrivate
|
||||
</SECTION>
|
||||
|
||||
<SECTION>
|
||||
@@ -4420,7 +4416,6 @@ GTK_CELL_RENDERER_CLASS
|
||||
GTK_IS_CELL_RENDERER_CLASS
|
||||
GTK_CELL_RENDERER_GET_CLASS
|
||||
<SUBSECTION Private>
|
||||
GtkCellRendererPrivate
|
||||
gtk_cell_renderer_get_type
|
||||
</SECTION>
|
||||
|
||||
@@ -4456,7 +4451,6 @@ GTK_IS_CELL_RENDERER_COMBO_CLASS
|
||||
GTK_CELL_RENDERER_COMBO_GET_CLASS
|
||||
<SUBSECTION Private>
|
||||
gtk_cell_renderer_combo_get_type
|
||||
GtkCellRendererComboPrivate
|
||||
</SECTION>
|
||||
|
||||
<SECTION>
|
||||
@@ -4507,7 +4501,6 @@ GTK_IS_CELL_RENDERER_PIXBUF_CLASS
|
||||
GTK_CELL_RENDERER_PIXBUF_GET_CLASS
|
||||
<SUBSECTION Private>
|
||||
gtk_cell_renderer_pixbuf_get_type
|
||||
GtkCellRendererPixbufPrivate
|
||||
</SECTION>
|
||||
|
||||
<SECTION>
|
||||
@@ -4525,7 +4518,6 @@ GTK_IS_CELL_RENDERER_TEXT_CLASS
|
||||
GTK_CELL_RENDERER_TEXT_GET_CLASS
|
||||
<SUBSECTION Private>
|
||||
gtk_cell_renderer_text_get_type
|
||||
GtkCellRendererTextPrivate
|
||||
</SECTION>
|
||||
|
||||
<SECTION>
|
||||
@@ -4549,7 +4541,6 @@ GTK_IS_CELL_RENDERER_TOGGLE_CLASS
|
||||
GTK_CELL_RENDERER_TOGGLE_GET_CLASS
|
||||
<SUBSECTION Private>
|
||||
gtk_cell_renderer_toggle_get_type
|
||||
GtkCellRendererTogglePrivate
|
||||
</SECTION>
|
||||
|
||||
<SECTION>
|
||||
@@ -4585,7 +4576,6 @@ GTK_IS_CELL_RENDERER_ACCEL_CLASS
|
||||
GTK_CELL_RENDERER_ACCEL_GET_CLASS
|
||||
<SUBSECTION Private>
|
||||
gtk_cell_renderer_accel_get_type
|
||||
GtkCellRendererAccelPrivate
|
||||
</SECTION>
|
||||
|
||||
<SECTION>
|
||||
@@ -4715,6 +4705,22 @@ gtk_vpaned_get_type
|
||||
GtkPanedPrivate
|
||||
</SECTION>
|
||||
|
||||
<SECTION>
|
||||
<FILE>gtkvruler</FILE>
|
||||
<TITLE>GtkVRuler</TITLE>
|
||||
GtkVRuler
|
||||
gtk_vruler_new
|
||||
<SUBSECTION Standard>
|
||||
GTK_VRULER
|
||||
GTK_IS_VRULER
|
||||
GTK_TYPE_VRULER
|
||||
GTK_VRULER_CLASS
|
||||
GTK_IS_VRULER_CLASS
|
||||
GTK_VRULER_GET_CLASS
|
||||
<SUBSECTION Private>
|
||||
gtk_vruler_get_type
|
||||
</SECTION>
|
||||
|
||||
<SECTION>
|
||||
<FILE>gtkvscale</FILE>
|
||||
<TITLE>GtkVScale</TITLE>
|
||||
@@ -5196,6 +5202,7 @@ gtk_device_grab_remove
|
||||
|
||||
<SUBSECTION>
|
||||
GtkFunction
|
||||
gtk_init_add
|
||||
gtk_quit_add_destroy
|
||||
gtk_quit_add
|
||||
GtkCallbackMarshal
|
||||
@@ -5542,6 +5549,7 @@ GtkExpanderStyle
|
||||
GtkIMPreeditStyle
|
||||
GtkIMStatusStyle
|
||||
GtkJustification
|
||||
GtkMetricType
|
||||
GtkMovementStep
|
||||
GtkOrientation
|
||||
GtkPackType
|
||||
@@ -5802,7 +5810,6 @@ GTK_IS_ICON_FACTORY_CLASS
|
||||
GTK_TYPE_ICON_SET
|
||||
GTK_TYPE_ICON_SOURCE
|
||||
<SUBSECTION Private>
|
||||
GtkIconFactoryPrivate
|
||||
gtk_icon_factory_get_type
|
||||
gtk_icon_set_get_type
|
||||
gtk_icon_source_get_type
|
||||
@@ -6389,24 +6396,3 @@ GTK_GRID_GET_CLASS
|
||||
GtkGridPrivate
|
||||
gtk_grid_get_type
|
||||
</SECTION>
|
||||
|
||||
<SECTION>
|
||||
<FILE>gtkswitch</FILE>
|
||||
GtkSwitch
|
||||
gtk_switch_new
|
||||
gtk_switch_set_active
|
||||
gtk_switch_get_active
|
||||
|
||||
<SUBSECTION Standard>
|
||||
GtkSwitchClass
|
||||
GTK_TYPE_SWITCH
|
||||
GTK_SWITCH
|
||||
GTK_SWITCH_CLASS
|
||||
GTK_IS_SWITCH
|
||||
GTK_IS_SWITCH_CLASS
|
||||
GTK_SWITCH_GET_CLASS
|
||||
|
||||
<SUBSECTION Private>
|
||||
GtkSwitchPrivate
|
||||
gtk_switch_get_type
|
||||
</SECTION>
|
||||
|
||||
@@ -66,6 +66,7 @@ gtk_handle_box_get_type
|
||||
gtk_hbox_get_type
|
||||
gtk_hbutton_box_get_type
|
||||
gtk_hpaned_get_type
|
||||
gtk_hruler_get_type
|
||||
gtk_hscale_get_type
|
||||
gtk_hscrollbar_get_type
|
||||
gtk_hseparator_get_type
|
||||
@@ -120,6 +121,7 @@ gtk_recent_chooser_dialog_get_type
|
||||
gtk_recent_chooser_menu_get_type
|
||||
gtk_recent_chooser_widget_get_type
|
||||
gtk_recent_manager_get_type
|
||||
gtk_ruler_get_type
|
||||
gtk_scale_button_get_type
|
||||
gtk_scale_get_type
|
||||
gtk_scrollable_get_type
|
||||
@@ -135,7 +137,6 @@ gtk_spin_button_get_type
|
||||
gtk_spinner_get_type
|
||||
gtk_statusbar_get_type
|
||||
gtk_status_icon_get_type
|
||||
gtk_switch_get_type
|
||||
gtk_style_get_type
|
||||
gtk_table_get_type
|
||||
gtk_tearoff_menu_item_get_type
|
||||
@@ -170,6 +171,7 @@ gtk_vbutton_box_get_type
|
||||
gtk_viewport_get_type
|
||||
gtk_volume_button_get_type
|
||||
gtk_vpaned_get_type
|
||||
gtk_vruler_get_type
|
||||
gtk_vscale_get_type
|
||||
gtk_vscrollbar_get_type
|
||||
gtk_vseparator_get_type
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 1.8 KiB |
@@ -355,11 +355,9 @@ cairo_destroy (cr);
|
||||
#GtkWidgetClass. The replacement for size_request() can
|
||||
take several levels of sophistication:
|
||||
<itemizedlist>
|
||||
<listitem>
|
||||
<para>
|
||||
As a minimal replacement to keep current functionality,
|
||||
you can simply implement the #GtkWidgetClass.get_preferred_width() and
|
||||
#GtkWidgetClass.get_preferred_height() vfuncs by calling your existing
|
||||
<listitem>As a minimal replacement to keep current functionality,
|
||||
you can simply implement the get_preferred_width() and
|
||||
get_preferred_height() vfuncs by calling your existing
|
||||
size_request() function. So you go from
|
||||
<informalexample><programlisting>
|
||||
static void
|
||||
@@ -374,9 +372,7 @@ my_widget_class_init (MyWidgetClass *class)
|
||||
/* ... */
|
||||
}
|
||||
</programlisting></informalexample>
|
||||
<para>
|
||||
to something that looks more like this:
|
||||
</para>
|
||||
<informalexample><programlisting>
|
||||
static void
|
||||
my_widget_get_preferred_width (GtkWidget *widget,
|
||||
@@ -418,11 +414,9 @@ my_widget_class_init (MyWidgetClass *class)
|
||||
|
||||
}
|
||||
</programlisting></informalexample>
|
||||
<para>
|
||||
Sometimes you can make things a little more streamlined
|
||||
by replacing your existing size_request() implementation by
|
||||
one that takes an orientation parameter:
|
||||
</para>
|
||||
<informalexample><programlisting>
|
||||
static void
|
||||
my_widget_get_preferred_size (GtkWidget *widget,
|
||||
@@ -471,14 +465,11 @@ my_widget_get_preferred_height (GtkWidget *widget,
|
||||
|
||||
/* ... */
|
||||
</programlisting></informalexample>
|
||||
</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>If your widget can cope with a small size,
|
||||
<listitem>If your widget can cope with a small size,
|
||||
but would appreciate getting some more space (a common
|
||||
example would be that it contains ellipsizable labels),
|
||||
you can do that by making your #GtkWidgetClass.get_preferred_width() /
|
||||
#GtkWidgetClass.get_preferred_height()
|
||||
you can do that by making your get_preferred_width()/height()
|
||||
functions return a smaller value for @minimal than for @natural.
|
||||
For @minimal, you probably want to return the same value
|
||||
that your size_request() function returned before (since
|
||||
@@ -517,28 +508,19 @@ gtk_fixed_get_preferred_height (GtkWidget *widget,
|
||||
}
|
||||
}
|
||||
</programlisting></informalexample>
|
||||
</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>
|
||||
Note that the #GtkWidgetClass.get_preferred_width() /
|
||||
#GtkWidgetClass.get_preferred_height() functions
|
||||
<listitem>Note that the get_preferred_width()/height() functions
|
||||
only allow you to deal with one dimension at a time. If your
|
||||
size_request() handler is doing things that involve both
|
||||
width and height at the same time (e.g. limiting the aspect
|
||||
ratio), you will have to implement
|
||||
#GtkWidgetClass.get_preferred_height_for_width()
|
||||
and #GtkWidgetClass.get_preferred_width_for_height().
|
||||
</para>
|
||||
ratio), you will have to implement get_preferred_height_for_width()
|
||||
and get_preferred_width_for_height().
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>
|
||||
To make full use of the new capabilities of the
|
||||
<listitem>To make full use of the new capabilities of the
|
||||
height-for-width geometry management, you need to additionally
|
||||
implement the #GtkWidgetClass.get_preferred_height_for_width() and
|
||||
#GtkWidgetClass.get_preferred_width_for_height(). For details on
|
||||
these functions, see <xref linkend="geometry-management"/>.
|
||||
</para>
|
||||
implement the get_preferred_height_for_width() and
|
||||
get_preferred_width_for_height(). For details on these functions,
|
||||
see <xref linkend="geometry-management"/>.
|
||||
</listitem>
|
||||
</itemizedlist>
|
||||
</para>
|
||||
|
||||
@@ -39,7 +39,7 @@ The GTK+ <ulink url="http://www.gtk.org">website</ulink> offers a
|
||||
<ulink url="http://www.gtk.org/tutorial">tutorial</ulink> and a
|
||||
<ulink url="http://www.gtk.org/faq">FAQ</ulink>. More documentation ranging
|
||||
from whitepapers to online books can be found at the
|
||||
<ulink url="http://library.gnome.org/devel/">GNOME developer's site</ulink>.
|
||||
<ulink url="http://developer.gnome.org/doc">GNOME developer's site</ulink>.
|
||||
After studying these materials you should be well prepared to come back to
|
||||
this reference manual for details.
|
||||
</para></answer>
|
||||
@@ -469,9 +469,9 @@ Do not use the deprecated #GdkFont and gdk_draw_text().
|
||||
</para>
|
||||
|
||||
<para>
|
||||
See also the
|
||||
<ulink url="http://library.gnome.org/devel/pango/stable/pango-Cairo-Rendering.html">Cairo Rendering</ulink>
|
||||
section of <ulink url="http://library.gnome.org/devel/pango/stable/">Pango manual</ulink>.
|
||||
See also the "Text Handling in GTK 2" section of
|
||||
<ulink url="http://developer.gnome.org/dotplan/porting/">Porting applications
|
||||
to the GNOME 2.0 platform</ulink>.
|
||||
</para>
|
||||
</answer>
|
||||
|
||||
@@ -502,9 +502,9 @@ Do not use the deprecated function gdk_text_width().
|
||||
</para>
|
||||
|
||||
<para>
|
||||
See also the
|
||||
<ulink url="http://library.gnome.org/devel/pango/stable/pango-Layout-Objects.html">Layout Objects</ulink>
|
||||
section of <ulink url="http://library.gnome.org/devel/pango/stable/">Pango manual</ulink>.
|
||||
See also the "Text Handling in GTK 2" section of
|
||||
<ulink url="http://developer.gnome.org/dotplan/porting/">Porting applications
|
||||
to the GNOME 2.0 platform</ulink>.
|
||||
</para>
|
||||
</answer>
|
||||
</qandaentry>
|
||||
|
||||
@@ -155,6 +155,15 @@ Used for justifying the text inside a #GtkLabel widget. (See also
|
||||
@GTK_JUSTIFY_CENTER: The text is placed in the center of the label.
|
||||
@GTK_JUSTIFY_FILL: The text is placed is distributed across the label.
|
||||
|
||||
<!-- ##### ENUM GtkMetricType ##### -->
|
||||
<para>
|
||||
Used to indicate which metric is used by a #GtkRuler.
|
||||
</para>
|
||||
|
||||
@GTK_PIXELS: Pixels.
|
||||
@GTK_INCHES: Inches.
|
||||
@GTK_CENTIMETERS: Centimeters.
|
||||
|
||||
<!-- ##### ENUM GtkMovementStep ##### -->
|
||||
<para>
|
||||
|
||||
|
||||
@@ -439,6 +439,16 @@ If @widget does not have the grab, this function does nothing.
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_init_add ##### -->
|
||||
<para>
|
||||
Registers a function to be called when the mainloop is started.
|
||||
</para>
|
||||
|
||||
@function: Function to invoke when gtk_main() is called next.
|
||||
@data: Data to pass to that function.
|
||||
@Deprecated: This function is going to be removed in GTK+ 3.0
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_quit_add_destroy ##### -->
|
||||
<para>
|
||||
Trigger destruction of @object in case the mainloop at level @main_level
|
||||
|
||||
@@ -6,13 +6,7 @@ Limit the effect of grabs
|
||||
|
||||
<!-- ##### SECTION Long_Description ##### -->
|
||||
<para>
|
||||
#GtkWindowGroup objects are referenced by each window in the group,
|
||||
so once you have added all windows to a #GtkWindowGroup, you can drop
|
||||
the initial reference to the window group with g_object_unref(). If the
|
||||
windows in the window group are subsequently destroyed, then they will
|
||||
be removed from the window group and drop their references on the window
|
||||
group; when all window have been removed, the window group will be
|
||||
freed.
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### SECTION See_Also ##### -->
|
||||
|
||||
@@ -123,7 +123,4 @@
|
||||
<link linkend="GtkFileChooserDialog">
|
||||
<inlinegraphic fileref="filechooser.png" format="PNG"></inlinegraphic>
|
||||
</link>
|
||||
<link linkend="GtkSwitch">
|
||||
<inlinegraphic fileref="switch.png" format="PNG"></inlinegraphic>
|
||||
</link>
|
||||
</para>
|
||||
|
||||
@@ -115,7 +115,6 @@ new_widget_info (const char *name,
|
||||
else
|
||||
{
|
||||
info->window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
|
||||
gtk_window_set_has_resize_grip (GTK_WINDOW (info->window), FALSE);
|
||||
info->include_decorations = FALSE;
|
||||
gtk_widget_show_all (widget);
|
||||
gtk_container_add (GTK_CONTAINER (info->window), widget);
|
||||
@@ -160,26 +159,6 @@ create_button (void)
|
||||
return new_widget_info ("button", align, SMALL);
|
||||
}
|
||||
|
||||
static WidgetInfo *
|
||||
create_switch (void)
|
||||
{
|
||||
GtkWidget *widget;
|
||||
GtkWidget *align;
|
||||
GtkWidget *sw;
|
||||
|
||||
widget = gtk_box_new (GTK_ORIENTATION_VERTICAL, 3);
|
||||
sw = gtk_switch_new ();
|
||||
gtk_switch_set_active (GTK_SWITCH (sw), TRUE);
|
||||
gtk_box_pack_start (GTK_BOX (widget), sw, TRUE, TRUE, 0);
|
||||
sw = gtk_switch_new ();
|
||||
gtk_box_pack_start (GTK_BOX (widget), sw, TRUE, TRUE, 0);
|
||||
|
||||
align = gtk_alignment_new (0.5, 0.5, 0.0, 0.0);
|
||||
gtk_container_add (GTK_CONTAINER (align), widget);
|
||||
|
||||
return new_widget_info ("switch", align, SMALL);
|
||||
}
|
||||
|
||||
static WidgetInfo *
|
||||
create_toggle_button (void)
|
||||
{
|
||||
@@ -1116,7 +1095,6 @@ get_all_widgets (void)
|
||||
retval = g_list_prepend (retval, create_page_setup_dialog ());
|
||||
retval = g_list_prepend (retval, create_print_dialog ());
|
||||
retval = g_list_prepend (retval, create_volume_button ());
|
||||
retval = g_list_prepend (retval, create_switch ());
|
||||
|
||||
return retval;
|
||||
}
|
||||
|
||||
@@ -33,12 +33,8 @@ static void gtk_dial_class_init (GtkDialClass *klass);
|
||||
static void gtk_dial_init (GtkDial *dial);
|
||||
static void gtk_dial_destroy (GtkWidget *widget);
|
||||
static void gtk_dial_realize (GtkWidget *widget);
|
||||
static void gtk_dial_get_preferred_width (GtkWidget *widget,
|
||||
gint *minimum,
|
||||
gint *natural);
|
||||
static void gtk_dial_get_preferred_heigh (GtkWidget *widget,
|
||||
gint *minimum,
|
||||
gint *natural);
|
||||
static void gtk_dial_size_request (GtkWidget *widget,
|
||||
GtkRequisition *requisition);
|
||||
static void gtk_dial_size_allocate (GtkWidget *widget,
|
||||
GtkAllocation *allocation);
|
||||
static gboolean gtk_dial_expose (GtkWidget *widget,
|
||||
@@ -100,8 +96,7 @@ gtk_dial_class_init (GtkDialClass *class)
|
||||
widget_class->destroy = gtk_dial_destroy;
|
||||
widget_class->realize = gtk_dial_realize;
|
||||
widget_class->expose_event = gtk_dial_expose;
|
||||
widget_class->get_preferred_width = gtk_dial_get_preferred_width;
|
||||
widget_class->get_preferred_height = gtk_dial_get_preferred_height;
|
||||
widget_class->size_request = gtk_dial_size_request;
|
||||
widget_class->size_allocate = gtk_dial_size_allocate;
|
||||
widget_class->button_press_event = gtk_dial_button_press;
|
||||
widget_class->button_release_event = gtk_dial_button_release;
|
||||
@@ -242,20 +237,12 @@ gtk_dial_realize (GtkWidget *widget)
|
||||
gtk_style_set_background (widget->style, widget->window, GTK_STATE_ACTIVE);
|
||||
}
|
||||
|
||||
static void
|
||||
gtk_dial_get_preferred_width (GtkWidget *widget,
|
||||
gint *minimum,
|
||||
gint *natural);
|
||||
static void
|
||||
gtk_dial_size_request (GtkWidget *widget,
|
||||
GtkRequisition *requisition)
|
||||
{
|
||||
*minimum = *natural = DIAL_DEFAULT_SIZE;
|
||||
}
|
||||
|
||||
static void
|
||||
gtk_dial_get_preferred_heigh (GtkWidget *widget,
|
||||
gint *minimum,
|
||||
gint *natural);
|
||||
{
|
||||
*minimum = *natural = DIAL_DEFAULT_SIZE;
|
||||
requisition->width = DIAL_DEFAULT_SIZE;
|
||||
requisition->height = DIAL_DEFAULT_SIZE;
|
||||
}
|
||||
|
||||
static void
|
||||
|
||||
@@ -278,7 +278,7 @@ 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
|
||||
(echo -e EXPORTS; $(CPP) -P -DGDK_WINDOWING_WIN32 - <$(srcdir)/gdk.symbols | sed -e '/^$$/d' -e 's/^/ /' -e 's/G_GNUC_[^ ]*//g') > $(srcdir)/gdk.def
|
||||
(echo -e EXPORTS; $(CPP) -P -DALL_FILES -DGDK_WINDOWING_WIN32 -DINCLUDE_VARIABLES - <$(srcdir)/gdk.symbols | sed -e '/^$$/d' -e 's/^/ /' -e 's/G_GNUC_[^ ]*//g') > $(srcdir)/gdk.def
|
||||
|
||||
TESTS_ENVIRONMENT = srcdir="$(srcdir)"
|
||||
if OS_LINUX
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#! /bin/sh
|
||||
|
||||
cpp -P -DGDK_ENABLE_BROKEN -include ../config.h -include ./gdkconfig.h ${srcdir:-.}/gdk.symbols | sed -e '/^$/d' -e 's/ G_GNUC.*$//' | sort | uniq > expected-abi
|
||||
cpp -DINCLUDE_VARIABLES -P -DALL_FILES -DGDK_ENABLE_BROKEN -include ../config.h -include ./gdkconfig.h ${srcdir:-.}/gdk.symbols | sed -e '/^$/d' -e 's/ G_GNUC.*$//' | sort | uniq > expected-abi
|
||||
nm -D -g --defined-only .libs/libgdk-x11-3.0.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
|
||||
|
||||
317
gdk/gdk.c
317
gdk/gdk.c
@@ -38,17 +38,6 @@
|
||||
#include <string.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
|
||||
/**
|
||||
* SECTION:general
|
||||
* @Short_description: Library initialization and miscellaneous functions
|
||||
* @Title: General
|
||||
*
|
||||
* This section describes the GDK initialization functions and miscellaneous
|
||||
* utility functions.
|
||||
*/
|
||||
|
||||
|
||||
typedef struct _GdkPredicate GdkPredicate;
|
||||
|
||||
struct _GdkPredicate
|
||||
@@ -316,8 +305,8 @@ gdk_get_display_arg_name (void)
|
||||
* display has previously been set, simply returns that. An internal
|
||||
* function that should not be used by applications.
|
||||
*
|
||||
* Return value: (transfer none): the default display, if it could be
|
||||
* opened, otherwise %NULL.
|
||||
* Return value: the default display, if it could be opened,
|
||||
* otherwise %NULL.
|
||||
**/
|
||||
GdkDisplay *
|
||||
gdk_display_open_default_libgtk_only (void)
|
||||
@@ -349,19 +338,25 @@ gdk_display_open_default_libgtk_only (void)
|
||||
|
||||
/**
|
||||
* gdk_init_check:
|
||||
* @argc: (inout): the number of command line arguments.
|
||||
* @argv: (array length=argc) (inout): the array of command line arguments.
|
||||
* @argc: (inout):
|
||||
* @argv: (array length=argc) (inout):
|
||||
*
|
||||
* Initializes the GDK library and connects to the X server, returning %TRUE on
|
||||
* success.
|
||||
* Initialize the library for use.
|
||||
*
|
||||
* Any arguments used by GDK are removed from the array and @argc and @argv are
|
||||
* updated accordingly.
|
||||
* Arguments:
|
||||
* "argc" is the number of arguments.
|
||||
* "argv" is an array of strings.
|
||||
*
|
||||
* GTK+ initializes GDK in gtk_init() and so this function is not usually needed
|
||||
* by GTK+ applications.
|
||||
* Results:
|
||||
* "argc" and "argv" are modified to reflect any arguments
|
||||
* which were not handled. (Such arguments should either
|
||||
* be handled by the application or dismissed). If initialization
|
||||
* fails, returns FALSE, otherwise TRUE.
|
||||
*
|
||||
* Returns: %TRUE if initialization succeeded.
|
||||
* Side effects:
|
||||
* The library is initialized.
|
||||
*
|
||||
*--------------------------------------------------------------
|
||||
*/
|
||||
gboolean
|
||||
gdk_init_check (int *argc,
|
||||
@@ -375,18 +370,8 @@ gdk_init_check (int *argc,
|
||||
|
||||
/**
|
||||
* gdk_init:
|
||||
* @argc: (inout): the number of command line arguments.
|
||||
* @argv: (array length=argc) (inout): the array of command line arguments.
|
||||
*
|
||||
* Initializes the GDK library and connects to the X server.
|
||||
* If initialization fails, a warning message is output and the application
|
||||
* terminates with a call to <literal>exit(1)</literal>.
|
||||
*
|
||||
* Any arguments used by GDK are removed from the array and @argc and @argv are
|
||||
* updated accordingly.
|
||||
*
|
||||
* GTK+ initializes GDK in gtk_init() and so this function is not usually needed
|
||||
* by GTK+ applications.
|
||||
* @argc: (inout):
|
||||
* @argv: (array length=argc) (inout):
|
||||
*/
|
||||
void
|
||||
gdk_init (int *argc, char ***argv)
|
||||
@@ -399,244 +384,6 @@ gdk_init (int *argc, char ***argv)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* SECTION:threads
|
||||
* @Short_description: Functions for using GDK in multi-threaded programs
|
||||
* @Title: Threads
|
||||
*
|
||||
* For thread safety, GDK relies on the thread primitives in GLib,
|
||||
* and on the thread-safe GLib main loop.
|
||||
*
|
||||
* GLib is completely thread safe (all global data is automatically
|
||||
* locked), but individual data structure instances are not automatically
|
||||
* locked for performance reasons. So e.g. you must coordinate
|
||||
* accesses to the same #GHashTable from multiple threads.
|
||||
*
|
||||
* GTK+ is "thread aware" but not thread safe — it provides a
|
||||
* global lock controlled by gdk_threads_enter()/gdk_threads_leave()
|
||||
* which protects all use of GTK+. That is, only one thread can use GTK+
|
||||
* at any given time.
|
||||
*
|
||||
* Unfortunately the above holds with the X11 backend only. With the
|
||||
* Win32 backend, GDK calls should not be attempted from multiple threads
|
||||
* at all.
|
||||
*
|
||||
* You must call g_thread_init() and gdk_threads_init() before executing
|
||||
* any other GTK+ or GDK functions in a threaded GTK+ program.
|
||||
*
|
||||
* Idles, timeouts, and input functions from GLib, such as g_idle_add(), are
|
||||
* executed outside of the main GTK+ lock.
|
||||
* So, if you need to call GTK+ inside of such a callback, you must surround
|
||||
* the callback with a gdk_threads_enter()/gdk_threads_leave() pair or use
|
||||
* gdk_threads_add_idle_full() which does this for you.
|
||||
* However, event dispatching from the mainloop is still executed within
|
||||
* the main GTK+ lock, so callback functions connected to event signals
|
||||
* like #GtkWidget::button-press-event, do not need thread protection.
|
||||
*
|
||||
* In particular, this means, if you are writing widgets that might
|
||||
* be used in threaded programs, you <emphasis>must</emphasis> surround
|
||||
* timeouts and idle functions in this matter.
|
||||
*
|
||||
* As always, you must also surround any calls to GTK+ not made within
|
||||
* a signal handler with a gdk_threads_enter()/gdk_threads_leave() pair.
|
||||
*
|
||||
* Before calling gdk_threads_leave() from a thread other
|
||||
* than your main thread, you probably want to call gdk_flush()
|
||||
* to send all pending commands to the windowing system.
|
||||
* (The reason you don't need to do this from the main thread
|
||||
* is that GDK always automatically flushes pending commands
|
||||
* when it runs out of incoming events to process and has
|
||||
* to sleep while waiting for more events.)
|
||||
*
|
||||
* A minimal main program for a threaded GTK+ application
|
||||
* looks like:
|
||||
* <informalexample>
|
||||
* <programlisting role="C">
|
||||
* int
|
||||
* main (int argc, char *argv[])
|
||||
* {
|
||||
* GtkWidget *window;
|
||||
*
|
||||
* g_thread_init (NULL);
|
||||
* gdk_threads_init (<!-- -->);
|
||||
* gdk_threads_enter (<!-- -->);
|
||||
*
|
||||
* gtk_init (&argc, &argv);
|
||||
*
|
||||
* window = create_window (<!-- -->);
|
||||
* gtk_widget_show (window);
|
||||
*
|
||||
* gtk_main (<!-- -->);
|
||||
* gdk_threads_leave (<!-- -->);
|
||||
*
|
||||
* return 0;
|
||||
* }
|
||||
* </programlisting>
|
||||
* </informalexample>
|
||||
*
|
||||
* Callbacks require a bit of attention. Callbacks from GTK+ signals
|
||||
* are made within the GTK+ lock. However callbacks from GLib (timeouts,
|
||||
* IO callbacks, and idle functions) are made outside of the GTK+
|
||||
* lock. So, within a signal handler you do not need to call
|
||||
* gdk_threads_enter(), but within the other types of callbacks, you
|
||||
* do.
|
||||
*
|
||||
* Erik Mouw contributed the following code example to
|
||||
* illustrate how to use threads within GTK+ programs.
|
||||
* <informalexample>
|
||||
* <programlisting role="C">
|
||||
* /<!---->*-------------------------------------------------------------------------
|
||||
* * Filename: gtk-thread.c
|
||||
* * Version: 0.99.1
|
||||
* * Copyright: Copyright (C) 1999, Erik Mouw
|
||||
* * Author: Erik Mouw <J.A.K.Mouw@its.tudelft.nl>
|
||||
* * Description: GTK threads example.
|
||||
* * Created at: Sun Oct 17 21:27:09 1999
|
||||
* * Modified by: Erik Mouw <J.A.K.Mouw@its.tudelft.nl>
|
||||
* * Modified at: Sun Oct 24 17:21:41 1999
|
||||
* *-----------------------------------------------------------------------*<!---->/
|
||||
* /<!---->*
|
||||
* * Compile with:
|
||||
* *
|
||||
* * cc -o gtk-thread gtk-thread.c `gtk-config --cflags --libs gthread`
|
||||
* *
|
||||
* * Thanks to Sebastian Wilhelmi and Owen Taylor for pointing out some
|
||||
* * bugs.
|
||||
* *
|
||||
* *<!---->/
|
||||
*
|
||||
* #include <stdio.h>
|
||||
* #include <stdlib.h>
|
||||
* #include <unistd.h>
|
||||
* #include <time.h>
|
||||
* #include <gtk/gtk.h>
|
||||
* #include <glib.h>
|
||||
* #include <pthread.h>
|
||||
*
|
||||
* #define YES_IT_IS (1)
|
||||
* #define NO_IT_IS_NOT (0)
|
||||
*
|
||||
* typedef struct
|
||||
* {
|
||||
* GtkWidget *label;
|
||||
* int what;
|
||||
* } yes_or_no_args;
|
||||
*
|
||||
* G_LOCK_DEFINE_STATIC (yes_or_no);
|
||||
* static volatile int yes_or_no = YES_IT_IS;
|
||||
*
|
||||
* void destroy (GtkWidget *widget, gpointer data)
|
||||
* {
|
||||
* gtk_main_quit (<!-- -->);
|
||||
* }
|
||||
*
|
||||
* void *argument_thread (void *args)
|
||||
* {
|
||||
* yes_or_no_args *data = (yes_or_no_args *)args;
|
||||
* gboolean say_something;
|
||||
*
|
||||
* for (;;)
|
||||
* {
|
||||
* /<!---->* sleep a while *<!---->/
|
||||
* sleep(rand(<!-- -->) / (RAND_MAX / 3) + 1);
|
||||
*
|
||||
* /<!---->* lock the yes_or_no_variable *<!---->/
|
||||
* G_LOCK(yes_or_no);
|
||||
*
|
||||
* /<!---->* do we have to say something? *<!---->/
|
||||
* say_something = (yes_or_no != data->what);
|
||||
*
|
||||
* if(say_something)
|
||||
* {
|
||||
* /<!---->* set the variable *<!---->/
|
||||
* yes_or_no = data->what;
|
||||
* }
|
||||
*
|
||||
* /<!---->* Unlock the yes_or_no variable *<!---->/
|
||||
* G_UNLOCK (yes_or_no);
|
||||
*
|
||||
* if (say_something)
|
||||
* {
|
||||
* /<!---->* get GTK thread lock *<!---->/
|
||||
* gdk_threads_enter (<!-- -->);
|
||||
*
|
||||
* /<!---->* set label text *<!---->/
|
||||
* if(data->what == YES_IT_IS)
|
||||
* gtk_label_set_text (GTK_LABEL (data->label), "O yes, it is!");
|
||||
* else
|
||||
* gtk_label_set_text (GTK_LABEL (data->label), "O no, it isn't!");
|
||||
*
|
||||
* /<!---->* release GTK thread lock *<!---->/
|
||||
* gdk_threads_leave (<!-- -->);
|
||||
* }
|
||||
* }
|
||||
*
|
||||
* return NULL;
|
||||
* }
|
||||
*
|
||||
* int main (int argc, char *argv[])
|
||||
* {
|
||||
* GtkWidget *window;
|
||||
* GtkWidget *label;
|
||||
* yes_or_no_args yes_args, no_args;
|
||||
* pthread_t no_tid, yes_tid;
|
||||
*
|
||||
* /<!---->* init threads *<!---->/
|
||||
* g_thread_init (NULL);
|
||||
* gdk_threads_init (<!-- -->);
|
||||
* gdk_threads_enter (<!-- -->);
|
||||
*
|
||||
* /<!---->* init gtk *<!---->/
|
||||
* gtk_init(&argc, &argv);
|
||||
*
|
||||
* /<!---->* init random number generator *<!---->/
|
||||
* srand ((unsigned int) time (NULL));
|
||||
*
|
||||
* /<!---->* create a window *<!---->/
|
||||
* window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
|
||||
*
|
||||
* g_signal_connect (window, "destroy", G_CALLBACK (destroy), NULL);
|
||||
*
|
||||
* gtk_container_set_border_width (GTK_CONTAINER (window), 10);
|
||||
*
|
||||
* /<!---->* create a label *<!---->/
|
||||
* label = gtk_label_new ("And now for something completely different ...");
|
||||
* gtk_container_add (GTK_CONTAINER (window), label);
|
||||
*
|
||||
* /<!---->* show everything *<!---->/
|
||||
* gtk_widget_show (label);
|
||||
* gtk_widget_show (window);
|
||||
*
|
||||
* /<!---->* create the threads *<!---->/
|
||||
* yes_args.label = label;
|
||||
* yes_args.what = YES_IT_IS;
|
||||
* pthread_create (&yes_tid, NULL, argument_thread, &yes_args);
|
||||
*
|
||||
* no_args.label = label;
|
||||
* no_args.what = NO_IT_IS_NOT;
|
||||
* pthread_create (&no_tid, NULL, argument_thread, &no_args);
|
||||
*
|
||||
* /<!---->* enter the GTK main loop *<!---->/
|
||||
* gtk_main (<!-- -->);
|
||||
* gdk_threads_leave (<!-- -->);
|
||||
*
|
||||
* return 0;
|
||||
* }
|
||||
* </programlisting>
|
||||
* </informalexample>
|
||||
*/
|
||||
|
||||
|
||||
/**
|
||||
* gdk_threads_enter:
|
||||
*
|
||||
* This macro marks the beginning of a critical section in which GDK and
|
||||
* GTK+ functions can be called safely and without causing race
|
||||
* conditions. Only one thread at a time can be in such a critial
|
||||
* section.
|
||||
*/
|
||||
void
|
||||
gdk_threads_enter (void)
|
||||
{
|
||||
@@ -644,11 +391,6 @@ gdk_threads_enter (void)
|
||||
(*gdk_threads_lock) ();
|
||||
}
|
||||
|
||||
/**
|
||||
* gdk_threads_leave:
|
||||
*
|
||||
* Leaves a critical region begun with gdk_threads_enter().
|
||||
*/
|
||||
void
|
||||
gdk_threads_leave (void)
|
||||
{
|
||||
@@ -672,7 +414,7 @@ gdk_threads_impl_unlock (void)
|
||||
|
||||
/**
|
||||
* gdk_threads_init:
|
||||
*
|
||||
*
|
||||
* Initializes GDK so that it can be used from multiple threads
|
||||
* in conjunction with gdk_threads_enter() and gdk_threads_leave().
|
||||
* g_thread_init() must be called previous to this function.
|
||||
@@ -1030,30 +772,13 @@ gdk_threads_add_timeout_seconds (guint interval,
|
||||
interval, function, data, NULL);
|
||||
}
|
||||
|
||||
/**
|
||||
* gdk_get_program_class:
|
||||
*
|
||||
* Gets the program class. Unless the program class has explicitly
|
||||
* been set with gdk_set_program_class() or with the <option>--class</option>
|
||||
* commandline option, the default value is the program name (determined
|
||||
* with g_get_prgname()) with the first character converted to uppercase.
|
||||
*
|
||||
* Returns: the program class.
|
||||
*/
|
||||
|
||||
G_CONST_RETURN char *
|
||||
gdk_get_program_class (void)
|
||||
{
|
||||
return gdk_progclass;
|
||||
}
|
||||
|
||||
/**
|
||||
* gdk_set_program_class:
|
||||
* @program_class: a string.
|
||||
*
|
||||
* Sets the program class. The X11 backend uses the program class to set
|
||||
* the class name part of the <literal>WM_CLASS</literal> property on
|
||||
* toplevel windows; see the ICCCM.
|
||||
*/
|
||||
void
|
||||
gdk_set_program_class (const char *program_class)
|
||||
{
|
||||
|
||||
1430
gdk/gdk.symbols
1430
gdk/gdk.symbols
File diff suppressed because it is too large
Load Diff
@@ -29,34 +29,6 @@
|
||||
#include "gdkintl.h"
|
||||
|
||||
|
||||
/**
|
||||
* SECTION:gdkapplaunchcontext
|
||||
* @Short_description: Startup notification for applications
|
||||
* @Title: Application launching
|
||||
*
|
||||
* GdkAppLaunchContext is an implementation of #GAppLaunchContext that
|
||||
* handles launching an application in a graphical context. It provides
|
||||
* startup notification and allows to launch applications on a specific
|
||||
* screen or workspace.
|
||||
* <example>
|
||||
* <title>Launching an application</title>
|
||||
* <programlisting>
|
||||
* GdkAppLaunchContext *context;
|
||||
*
|
||||
* context = gdk_app_launch_context_new (<!-- -->);
|
||||
*
|
||||
* gdk_app_launch_context_set_screen (my_screen);
|
||||
* gdk_app_launch_context_set_timestamp (event->time);
|
||||
*
|
||||
* if (!g_app_info_launch_default_for_uri ("http://www.gtk.org", context, &error))
|
||||
* g_warning ("Launching failed: %s\n", error->message);
|
||||
*
|
||||
* g_object_unref (context);
|
||||
* </programlisting>
|
||||
* </example>
|
||||
*/
|
||||
|
||||
|
||||
static void gdk_app_launch_context_finalize (GObject *object);
|
||||
static gchar * gdk_app_launch_context_get_display (GAppLaunchContext *context,
|
||||
GAppInfo *info,
|
||||
|
||||
@@ -32,28 +32,6 @@
|
||||
#include "gdkinternals.h"
|
||||
|
||||
|
||||
/**
|
||||
* SECTION:cursors
|
||||
* @Short_description: Standard and pixmap cursors
|
||||
* @Title: Cursors
|
||||
*
|
||||
* These functions are used to create and destroy cursors.
|
||||
* There is a number of standard cursors, but it is also
|
||||
* possible to construct new cursors from pixbufs. There
|
||||
* may be limitations as to what kinds of cursors can be
|
||||
* constructed on a given display, see
|
||||
* gdk_display_supports_cursor_alpha(),
|
||||
* gdk_display_supports_cursor_color(),
|
||||
* gdk_display_get_default_cursor_size() and
|
||||
* gdk_display_get_maximal_cursor_size().
|
||||
*
|
||||
* Cursors by themselves are not very interesting, they must be be
|
||||
* bound to a window for users to see them. This is done with
|
||||
* gdk_window_set_cursor() or by setting the cursor member of the
|
||||
* #GdkWindowAttr struct passed to gdk_window_new().
|
||||
*/
|
||||
|
||||
|
||||
G_DEFINE_BOXED_TYPE (GdkCursor, gdk_cursor,
|
||||
gdk_cursor_ref,
|
||||
gdk_cursor_unref)
|
||||
@@ -128,6 +106,5 @@ GdkCursorType
|
||||
gdk_cursor_get_cursor_type (GdkCursor *cursor)
|
||||
{
|
||||
g_return_val_if_fail (cursor != NULL, GDK_BLANK_CURSOR);
|
||||
|
||||
return cursor->type;
|
||||
}
|
||||
|
||||
@@ -38,91 +38,7 @@ G_BEGIN_DECLS
|
||||
|
||||
#define GDK_TYPE_CURSOR (gdk_cursor_get_type ())
|
||||
|
||||
/**
|
||||
* GdkCursorType:
|
||||
* @GDK_X_CURSOR: <inlinegraphic format="PNG" fileref="X_cursor.png"></inlinegraphic>
|
||||
* @GDK_ARROW: <inlinegraphic format="PNG" fileref="arrow.png"></inlinegraphic>
|
||||
* @GDK_BASED_ARROW_DOWN: <inlinegraphic format="PNG" fileref="based_arrow_down.png"></inlinegraphic>
|
||||
* @GDK_BASED_ARROW_UP: <inlinegraphic format="PNG" fileref="based_arrow_up.png"></inlinegraphic>
|
||||
* @GDK_BOAT: <inlinegraphic format="PNG" fileref="boat.png"></inlinegraphic>
|
||||
* @GDK_BOGOSITY: <inlinegraphic format="PNG" fileref="bogosity.png"></inlinegraphic>
|
||||
* @GDK_BOTTOM_LEFT_CORNER: <inlinegraphic format="PNG" fileref="bottom_left_corner.png"></inlinegraphic>
|
||||
* @GDK_BOTTOM_RIGHT_CORNER: <inlinegraphic format="PNG" fileref="bottom_right_corner.png"></inlinegraphic>
|
||||
* @GDK_BOTTOM_SIDE: <inlinegraphic format="PNG" fileref="bottom_side.png"></inlinegraphic>
|
||||
* @GDK_BOTTOM_TEE: <inlinegraphic format="PNG" fileref="bottom_tee.png"></inlinegraphic>
|
||||
* @GDK_BOX_SPIRAL: <inlinegraphic format="PNG" fileref="box_spiral.png"></inlinegraphic>
|
||||
* @GDK_CENTER_PTR: <inlinegraphic format="PNG" fileref="center_ptr.png"></inlinegraphic>
|
||||
* @GDK_CIRCLE: <inlinegraphic format="PNG" fileref="circle.png"></inlinegraphic>
|
||||
* @GDK_CLOCK: <inlinegraphic format="PNG" fileref="clock.png"></inlinegraphic>
|
||||
* @GDK_COFFEE_MUG: <inlinegraphic format="PNG" fileref="coffee_mug.png"></inlinegraphic>
|
||||
* @GDK_CROSS: <inlinegraphic format="PNG" fileref="cross.png"></inlinegraphic>
|
||||
* @GDK_CROSS_REVERSE: <inlinegraphic format="PNG" fileref="cross_reverse.png"></inlinegraphic>
|
||||
* @GDK_CROSSHAIR: <inlinegraphic format="PNG" fileref="crosshair.png"></inlinegraphic>
|
||||
* @GDK_DIAMOND_CROSS: <inlinegraphic format="PNG" fileref="diamond_cross.png"></inlinegraphic>
|
||||
* @GDK_DOT: <inlinegraphic format="PNG" fileref="dot.png"></inlinegraphic>
|
||||
* @GDK_DOTBOX: <inlinegraphic format="PNG" fileref="dotbox.png"></inlinegraphic>
|
||||
* @GDK_DOUBLE_ARROW: <inlinegraphic format="PNG" fileref="double_arrow.png"></inlinegraphic>
|
||||
* @GDK_DRAFT_LARGE: <inlinegraphic format="PNG" fileref="draft_large.png"></inlinegraphic>
|
||||
* @GDK_DRAFT_SMALL: <inlinegraphic format="PNG" fileref="draft_small.png"></inlinegraphic>
|
||||
* @GDK_DRAPED_BOX: <inlinegraphic format="PNG" fileref="draped_box.png"></inlinegraphic>
|
||||
* @GDK_EXCHANGE: <inlinegraphic format="PNG" fileref="exchange.png"></inlinegraphic>
|
||||
* @GDK_FLEUR: <inlinegraphic format="PNG" fileref="fleur.png"></inlinegraphic>
|
||||
* @GDK_GOBBLER: <inlinegraphic format="PNG" fileref="gobbler.png"></inlinegraphic>
|
||||
* @GDK_GUMBY: <inlinegraphic format="PNG" fileref="gumby.png"></inlinegraphic>
|
||||
* @GDK_HAND1: <inlinegraphic format="PNG" fileref="hand1.png"></inlinegraphic>
|
||||
* @GDK_HAND2: <inlinegraphic format="PNG" fileref="hand2.png"></inlinegraphic>
|
||||
* @GDK_HEART: <inlinegraphic format="PNG" fileref="heart.png"></inlinegraphic>
|
||||
* @GDK_ICON: <inlinegraphic format="PNG" fileref="icon.png"></inlinegraphic>
|
||||
* @GDK_IRON_CROSS: <inlinegraphic format="PNG" fileref="iron_cross.png"></inlinegraphic>
|
||||
* @GDK_LEFT_PTR: <inlinegraphic format="PNG" fileref="left_ptr.png"></inlinegraphic>
|
||||
* @GDK_LEFT_SIDE: <inlinegraphic format="PNG" fileref="left_side.png"></inlinegraphic>
|
||||
* @GDK_LEFT_TEE: <inlinegraphic format="PNG" fileref="left_tee.png"></inlinegraphic>
|
||||
* @GDK_LEFTBUTTON: <inlinegraphic format="PNG" fileref="leftbutton.png"></inlinegraphic>
|
||||
* @GDK_LL_ANGLE: <inlinegraphic format="PNG" fileref="ll_angle.png"></inlinegraphic>
|
||||
* @GDK_LR_ANGLE: <inlinegraphic format="PNG" fileref="lr_angle.png"></inlinegraphic>
|
||||
* @GDK_MAN: <inlinegraphic format="PNG" fileref="man.png"></inlinegraphic>
|
||||
* @GDK_MIDDLEBUTTON: <inlinegraphic format="PNG" fileref="middlebutton.png"></inlinegraphic>
|
||||
* @GDK_MOUSE: <inlinegraphic format="PNG" fileref="mouse.png"></inlinegraphic>
|
||||
* @GDK_PENCIL: <inlinegraphic format="PNG" fileref="pencil.png"></inlinegraphic>
|
||||
* @GDK_PIRATE: <inlinegraphic format="PNG" fileref="pirate.png"></inlinegraphic>
|
||||
* @GDK_PLUS: <inlinegraphic format="PNG" fileref="plus.png"></inlinegraphic>
|
||||
* @GDK_QUESTION_ARROW: <inlinegraphic format="PNG" fileref="question_arrow.png"></inlinegraphic>
|
||||
* @GDK_RIGHT_PTR: <inlinegraphic format="PNG" fileref="right_ptr.png"></inlinegraphic>
|
||||
* @GDK_RIGHT_SIDE: <inlinegraphic format="PNG" fileref="right_side.png"></inlinegraphic>
|
||||
* @GDK_RIGHT_TEE: <inlinegraphic format="PNG" fileref="right_tee.png"></inlinegraphic>
|
||||
* @GDK_RIGHTBUTTON: <inlinegraphic format="PNG" fileref="rightbutton.png"></inlinegraphic>
|
||||
* @GDK_RTL_LOGO: <inlinegraphic format="PNG" fileref="rtl_logo.png"></inlinegraphic>
|
||||
* @GDK_SAILBOAT: <inlinegraphic format="PNG" fileref="sailboat.png"></inlinegraphic>
|
||||
* @GDK_SB_DOWN_ARROW: <inlinegraphic format="PNG" fileref="sb_down_arrow.png"></inlinegraphic>
|
||||
* @GDK_SB_H_DOUBLE_ARROW: <inlinegraphic format="PNG" fileref="sb_h_double_arrow.png"></inlinegraphic>
|
||||
* @GDK_SB_LEFT_ARROW: <inlinegraphic format="PNG" fileref="sb_left_arrow.png"></inlinegraphic>
|
||||
* @GDK_SB_RIGHT_ARROW: <inlinegraphic format="PNG" fileref="sb_right_arrow.png"></inlinegraphic>
|
||||
* @GDK_SB_UP_ARROW: <inlinegraphic format="PNG" fileref="sb_up_arrow.png"></inlinegraphic>
|
||||
* @GDK_SB_V_DOUBLE_ARROW: <inlinegraphic format="PNG" fileref="sb_v_double_arrow.png"></inlinegraphic>
|
||||
* @GDK_SHUTTLE: <inlinegraphic format="PNG" fileref="shuttle.png"></inlinegraphic>
|
||||
* @GDK_SIZING: <inlinegraphic format="PNG" fileref="sizing.png"></inlinegraphic>
|
||||
* @GDK_SPIDER: <inlinegraphic format="PNG" fileref="spider.png"></inlinegraphic>
|
||||
* @GDK_SPRAYCAN: <inlinegraphic format="PNG" fileref="spraycan.png"></inlinegraphic>
|
||||
* @GDK_STAR: <inlinegraphic format="PNG" fileref="star.png"></inlinegraphic>
|
||||
* @GDK_TARGET: <inlinegraphic format="PNG" fileref="target.png"></inlinegraphic>
|
||||
* @GDK_TCROSS: <inlinegraphic format="PNG" fileref="tcross.png"></inlinegraphic>
|
||||
* @GDK_TOP_LEFT_ARROW: <inlinegraphic format="PNG" fileref="top_left_arrow.png"></inlinegraphic>
|
||||
* @GDK_TOP_LEFT_CORNER: <inlinegraphic format="PNG" fileref="top_left_corner.png"></inlinegraphic>
|
||||
* @GDK_TOP_RIGHT_CORNER: <inlinegraphic format="PNG" fileref="top_right_corner.png"></inlinegraphic>
|
||||
* @GDK_TOP_SIDE: <inlinegraphic format="PNG" fileref="top_side.png"></inlinegraphic>
|
||||
* @GDK_TOP_TEE: <inlinegraphic format="PNG" fileref="top_tee.png"></inlinegraphic>
|
||||
* @GDK_TREK: <inlinegraphic format="PNG" fileref="trek.png"></inlinegraphic>
|
||||
* @GDK_UL_ANGLE: <inlinegraphic format="PNG" fileref="ul_angle.png"></inlinegraphic>
|
||||
* @GDK_UMBRELLA: <inlinegraphic format="PNG" fileref="umbrella.png"></inlinegraphic>
|
||||
* @GDK_UR_ANGLE: <inlinegraphic format="PNG" fileref="ur_angle.png"></inlinegraphic>
|
||||
* @GDK_WATCH: <inlinegraphic format="PNG" fileref="watch.png"></inlinegraphic>
|
||||
* @GDK_XTERM: <inlinegraphic format="PNG" fileref="xterm.png"></inlinegraphic>
|
||||
* @GDK_LAST_CURSOR: last cursor type
|
||||
* @GDK_BLANK_CURSOR: Blank cursor. Since 2.16
|
||||
* @GDK_CURSOR_IS_PIXMAP: type of cursors constructed with
|
||||
* gdk_cursor_new_from_pixbuf()
|
||||
*
|
||||
* The standard cursors available.
|
||||
/* Cursor types.
|
||||
*/
|
||||
typedef enum
|
||||
{
|
||||
@@ -208,15 +124,10 @@ typedef enum
|
||||
GDK_CURSOR_IS_PIXMAP = -1
|
||||
} GdkCursorType;
|
||||
|
||||
/**
|
||||
* GdkCursor:
|
||||
*
|
||||
* A #GdkCursor structure represents a cursor.
|
||||
*/
|
||||
struct _GdkCursor
|
||||
{
|
||||
/*< private >*/
|
||||
GdkCursorType GSEAL (type);
|
||||
/*< private >*/
|
||||
guint GSEAL (ref_count);
|
||||
};
|
||||
|
||||
|
||||
158
gdk/gdkdevice.c
158
gdk/gdkdevice.c
@@ -26,14 +26,6 @@
|
||||
#include "gdkinternals.h"
|
||||
|
||||
|
||||
typedef struct _GdkDeviceKey GdkDeviceKey;
|
||||
|
||||
struct _GdkDeviceKey
|
||||
{
|
||||
guint keyval;
|
||||
GdkModifierType modifiers;
|
||||
};
|
||||
|
||||
typedef struct _GdkAxisInfo GdkAxisInfo;
|
||||
|
||||
struct _GdkAxisInfo
|
||||
@@ -51,12 +43,6 @@ struct _GdkAxisInfo
|
||||
|
||||
struct _GdkDevicePrivate
|
||||
{
|
||||
gchar *name;
|
||||
GdkInputSource source;
|
||||
GdkInputMode mode;
|
||||
gboolean has_cursor;
|
||||
gint num_keys;
|
||||
GdkDeviceKey *keys;
|
||||
GdkDeviceManager *device_manager;
|
||||
GdkDisplay *display;
|
||||
GdkDevice *associated;
|
||||
@@ -275,11 +261,13 @@ gdk_device_dispose (GObject *object)
|
||||
priv->axes = NULL;
|
||||
}
|
||||
|
||||
g_free (priv->name);
|
||||
g_free (priv->keys);
|
||||
g_free (device->name);
|
||||
g_free (device->keys);
|
||||
g_free (device->axes);
|
||||
|
||||
priv->name = NULL;
|
||||
priv->keys = NULL;
|
||||
device->name = NULL;
|
||||
device->keys = NULL;
|
||||
device->axes = NULL;
|
||||
|
||||
G_OBJECT_CLASS (gdk_device_parent_class)->dispose (object);
|
||||
}
|
||||
@@ -302,22 +290,22 @@ gdk_device_set_property (GObject *object,
|
||||
priv->device_manager = g_value_get_object (value);
|
||||
break;
|
||||
case PROP_NAME:
|
||||
if (priv->name)
|
||||
g_free (priv->name);
|
||||
if (device->name)
|
||||
g_free (device->name);
|
||||
|
||||
priv->name = g_value_dup_string (value);
|
||||
device->name = g_value_dup_string (value);
|
||||
break;
|
||||
case PROP_TYPE:
|
||||
priv->type = g_value_get_enum (value);
|
||||
break;
|
||||
case PROP_INPUT_SOURCE:
|
||||
priv->source = g_value_get_enum (value);
|
||||
device->source = g_value_get_enum (value);
|
||||
break;
|
||||
case PROP_INPUT_MODE:
|
||||
gdk_device_set_mode (device, g_value_get_enum (value));
|
||||
break;
|
||||
case PROP_HAS_CURSOR:
|
||||
priv->has_cursor = g_value_get_boolean (value);
|
||||
device->has_cursor = g_value_get_boolean (value);
|
||||
break;
|
||||
default:
|
||||
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
|
||||
@@ -346,19 +334,21 @@ gdk_device_get_property (GObject *object,
|
||||
g_value_set_object (value, priv->associated);
|
||||
break;
|
||||
case PROP_NAME:
|
||||
g_value_set_string (value, priv->name);
|
||||
g_value_set_string (value,
|
||||
device->name);
|
||||
break;
|
||||
case PROP_TYPE:
|
||||
g_value_set_enum (value, priv->type);
|
||||
break;
|
||||
case PROP_INPUT_SOURCE:
|
||||
g_value_set_enum (value, priv->source);
|
||||
g_value_set_enum (value, device->source);
|
||||
break;
|
||||
case PROP_INPUT_MODE:
|
||||
g_value_set_enum (value, priv->mode);
|
||||
g_value_set_enum (value, device->mode);
|
||||
break;
|
||||
case PROP_HAS_CURSOR:
|
||||
g_value_set_boolean (value, priv->has_cursor);
|
||||
g_value_set_boolean (value,
|
||||
device->has_cursor);
|
||||
break;
|
||||
case PROP_N_AXES:
|
||||
g_value_set_uint (value, priv->axes->len);
|
||||
@@ -448,7 +438,7 @@ _gdk_device_allocate_history (GdkDevice *device,
|
||||
|
||||
for (i = 0; i < n_events; i++)
|
||||
result[i] = g_malloc (sizeof (GdkTimeCoord) -
|
||||
sizeof (double) * (GDK_MAX_TIMECOORD_AXES - device->priv->axes->len));
|
||||
sizeof (double) * (GDK_MAX_TIMECOORD_AXES - device->num_axes));
|
||||
return result;
|
||||
}
|
||||
|
||||
@@ -486,7 +476,7 @@ gdk_device_get_name (GdkDevice *device)
|
||||
{
|
||||
g_return_val_if_fail (GDK_IS_DEVICE (device), NULL);
|
||||
|
||||
return device->priv->name;
|
||||
return device->name;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -504,7 +494,7 @@ gdk_device_get_has_cursor (GdkDevice *device)
|
||||
{
|
||||
g_return_val_if_fail (GDK_IS_DEVICE (device), FALSE);
|
||||
|
||||
return device->priv->has_cursor;
|
||||
return device->has_cursor;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -522,7 +512,7 @@ gdk_device_get_source (GdkDevice *device)
|
||||
{
|
||||
g_return_val_if_fail (GDK_IS_DEVICE (device), 0);
|
||||
|
||||
return device->priv->source;
|
||||
return device->source;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -538,8 +528,7 @@ gdk_device_set_source (GdkDevice *device,
|
||||
{
|
||||
g_return_if_fail (GDK_IS_DEVICE (device));
|
||||
|
||||
device->priv->source = source;
|
||||
g_object_notify (G_OBJECT (device), "input-source");
|
||||
device->source = source;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -557,7 +546,7 @@ gdk_device_get_mode (GdkDevice *device)
|
||||
{
|
||||
g_return_val_if_fail (GDK_IS_DEVICE (device), 0);
|
||||
|
||||
return device->priv->mode;
|
||||
return device->mode;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -577,7 +566,7 @@ gdk_device_set_mode (GdkDevice *device,
|
||||
{
|
||||
g_return_val_if_fail (GDK_IS_DEVICE (device), FALSE);
|
||||
|
||||
if (device->priv->mode == mode)
|
||||
if (device->mode == mode)
|
||||
return TRUE;
|
||||
|
||||
if (mode == GDK_MODE_DISABLED &&
|
||||
@@ -586,7 +575,7 @@ gdk_device_set_mode (GdkDevice *device,
|
||||
|
||||
/* FIXME: setting has_cursor when mode is window? */
|
||||
|
||||
device->priv->mode = mode;
|
||||
device->mode = mode;
|
||||
g_object_notify (G_OBJECT (device), "input-mode");
|
||||
|
||||
if (gdk_device_get_device_type (device) != GDK_DEVICE_TYPE_MASTER)
|
||||
@@ -595,24 +584,6 @@ gdk_device_set_mode (GdkDevice *device,
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
/**
|
||||
* gdk_device_get_n_keys:
|
||||
* @device: a #GdkDevice
|
||||
*
|
||||
* Returns the number of keys the device currently has.
|
||||
*
|
||||
* Returns: the number of keys.
|
||||
*
|
||||
* Since: 2.24
|
||||
**/
|
||||
gint
|
||||
gdk_device_get_n_keys (GdkDevice *device)
|
||||
{
|
||||
g_return_val_if_fail (GDK_IS_DEVICE (device), 0);
|
||||
|
||||
return device->priv->num_keys;
|
||||
}
|
||||
|
||||
/**
|
||||
* gdk_device_get_key:
|
||||
* @device: a #GdkDevice.
|
||||
@@ -634,17 +605,17 @@ gdk_device_get_key (GdkDevice *device,
|
||||
GdkModifierType *modifiers)
|
||||
{
|
||||
g_return_val_if_fail (GDK_IS_DEVICE (device), FALSE);
|
||||
g_return_val_if_fail (index_ < device->priv->num_keys, FALSE);
|
||||
g_return_val_if_fail (index_ < device->num_keys, FALSE);
|
||||
|
||||
if (!device->priv->keys[index_].keyval &&
|
||||
!device->priv->keys[index_].modifiers)
|
||||
if (!device->keys[index_].keyval &&
|
||||
!device->keys[index_].modifiers)
|
||||
return FALSE;
|
||||
|
||||
if (keyval)
|
||||
*keyval = device->priv->keys[index_].keyval;
|
||||
*keyval = device->keys[index_].keyval;
|
||||
|
||||
if (modifiers)
|
||||
*modifiers = device->priv->keys[index_].modifiers;
|
||||
*modifiers = device->keys[index_].modifiers;
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
@@ -666,10 +637,10 @@ gdk_device_set_key (GdkDevice *device,
|
||||
GdkModifierType modifiers)
|
||||
{
|
||||
g_return_if_fail (GDK_IS_DEVICE (device));
|
||||
g_return_if_fail (index_ < device->priv->num_keys);
|
||||
g_return_if_fail (index_ < device->num_keys);
|
||||
|
||||
device->priv->keys[index_].keyval = keyval;
|
||||
device->priv->keys[index_].modifiers = modifiers;
|
||||
device->keys[index_].keyval = keyval;
|
||||
device->keys[index_].modifiers = modifiers;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -687,14 +658,10 @@ GdkAxisUse
|
||||
gdk_device_get_axis_use (GdkDevice *device,
|
||||
guint index_)
|
||||
{
|
||||
GdkAxisInfo *info;
|
||||
|
||||
g_return_val_if_fail (GDK_IS_DEVICE (device), GDK_AXIS_IGNORE);
|
||||
g_return_val_if_fail (index_ < device->priv->axes->len, GDK_AXIS_IGNORE);
|
||||
g_return_val_if_fail (index_ < device->num_axes, GDK_AXIS_IGNORE);
|
||||
|
||||
info = &g_array_index (device->priv->axes, GdkAxisInfo, index_);
|
||||
|
||||
return info->use;
|
||||
return device->axes[index_].use;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -714,27 +681,29 @@ gdk_device_set_axis_use (GdkDevice *device,
|
||||
GdkAxisInfo *info;
|
||||
|
||||
g_return_if_fail (GDK_IS_DEVICE (device));
|
||||
g_return_if_fail (index_ < device->priv->axes->len);
|
||||
g_return_if_fail (index_ < device->num_axes);
|
||||
|
||||
priv = device->priv;
|
||||
info = &g_array_index (priv->axes, GdkAxisInfo, index_);
|
||||
info->use = use;
|
||||
|
||||
device->axes[index_].use = use;
|
||||
|
||||
switch (use)
|
||||
{
|
||||
case GDK_AXIS_X:
|
||||
case GDK_AXIS_Y:
|
||||
info->min_axis = 0;
|
||||
info->max_axis = 0;
|
||||
device->axes[index_].min = info->min_axis = 0;
|
||||
device->axes[index_].max = info->max_axis = 0;
|
||||
break;
|
||||
case GDK_AXIS_XTILT:
|
||||
case GDK_AXIS_YTILT:
|
||||
info->min_axis = -1;
|
||||
info->max_axis = 1;
|
||||
device->axes[index_].min = info->min_axis = -1;
|
||||
device->axes[index_].max = info->max_axis = 1;
|
||||
break;
|
||||
default:
|
||||
info->min_axis = 0;
|
||||
info->max_axis = 1;
|
||||
device->axes[index_].min = info->min_axis = 0;
|
||||
device->axes[index_].max = info->max_axis = 1;
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -745,8 +714,8 @@ gdk_device_set_axis_use (GdkDevice *device,
|
||||
*
|
||||
* Returns the #GdkDisplay to which @device pertains.
|
||||
*
|
||||
* Returns: (transfer none): a #GdkDisplay. This memory is owned
|
||||
* by GTK+, and must not be freed or unreffed.
|
||||
* Returns: a #GdkDisplay. This memory is owned by GTK+,
|
||||
* and must not be freed or unreffed.
|
||||
*
|
||||
* Since: 3.0
|
||||
**/
|
||||
@@ -776,7 +745,7 @@ gdk_device_get_display (GdkDevice *device)
|
||||
* If @device is of type %GDK_DEVICE_TYPE_FLOATING, %NULL will be
|
||||
* returned, as there is no associated device.
|
||||
*
|
||||
* Returns: (transfer none): The associated device, or %NULL
|
||||
* Returns: The associated device, or %NULL
|
||||
*
|
||||
* Since: 3.0
|
||||
**/
|
||||
@@ -848,12 +817,12 @@ gdk_device_get_device_type (GdkDevice *device)
|
||||
*
|
||||
* Since: 3.0
|
||||
**/
|
||||
gint
|
||||
guint
|
||||
gdk_device_get_n_axes (GdkDevice *device)
|
||||
{
|
||||
g_return_val_if_fail (GDK_IS_DEVICE (device), 0);
|
||||
|
||||
return device->priv->axes->len;
|
||||
return device->num_axes;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -1124,6 +1093,10 @@ _gdk_device_reset_axes (GdkDevice *device)
|
||||
g_array_remove_index (priv->axes, i);
|
||||
|
||||
g_object_notify (G_OBJECT (device), "n-axes");
|
||||
|
||||
/* This is done for backwards compatibility */
|
||||
g_free (device->axes);
|
||||
device->axes = NULL;
|
||||
}
|
||||
|
||||
guint
|
||||
@@ -1165,7 +1138,16 @@ _gdk_device_add_axis (GdkDevice *device,
|
||||
}
|
||||
|
||||
priv->axes = g_array_append_val (priv->axes, axis_info);
|
||||
pos = device->priv->axes->len - 1;
|
||||
device->num_axes = priv->axes->len;
|
||||
pos = device->num_axes - 1;
|
||||
|
||||
/* This is done for backwards compatibility, since the public
|
||||
* struct doesn't actually store the device data.
|
||||
*/
|
||||
device->axes = g_realloc (device->axes, sizeof (GdkDeviceAxis) * priv->axes->len);
|
||||
device->axes[pos].use = axis_info.use;
|
||||
device->axes[pos].min = axis_info.min_axis;
|
||||
device->axes[pos].max = axis_info.max_axis;
|
||||
|
||||
g_object_notify (G_OBJECT (device), "n-axes");
|
||||
|
||||
@@ -1176,11 +1158,11 @@ void
|
||||
_gdk_device_set_keys (GdkDevice *device,
|
||||
guint num_keys)
|
||||
{
|
||||
if (device->priv->keys)
|
||||
g_free (device->priv->keys);
|
||||
if (device->keys)
|
||||
g_free (device->keys);
|
||||
|
||||
device->priv->num_keys = num_keys;
|
||||
device->priv->keys = g_new0 (GdkDeviceKey, num_keys);
|
||||
device->num_keys = num_keys;
|
||||
device->keys = g_new0 (GdkDeviceKey, num_keys);
|
||||
}
|
||||
|
||||
static GdkAxisInfo *
|
||||
@@ -1339,14 +1321,16 @@ _gdk_device_translate_screen_coord (GdkDevice *device,
|
||||
gdouble value,
|
||||
gdouble *axis_value)
|
||||
{
|
||||
GdkDevicePrivate *priv = device->priv;
|
||||
GdkDevicePrivate *priv;
|
||||
GdkAxisInfo axis_info;
|
||||
gdouble axis_width, scale, offset;
|
||||
GdkWindowObject *window_private;
|
||||
|
||||
if (priv->mode != GDK_MODE_SCREEN)
|
||||
if (device->mode != GDK_MODE_SCREEN)
|
||||
return FALSE;
|
||||
|
||||
priv = device->priv;
|
||||
|
||||
if (index_ >= priv->axes->len)
|
||||
return FALSE;
|
||||
|
||||
|
||||
@@ -35,6 +35,9 @@ G_BEGIN_DECLS
|
||||
|
||||
typedef struct _GdkDevice GdkDevice;
|
||||
typedef struct _GdkDevicePrivate GdkDevicePrivate;
|
||||
|
||||
typedef struct _GdkDeviceKey GdkDeviceKey;
|
||||
typedef struct _GdkDeviceAxis GdkDeviceAxis;
|
||||
typedef struct _GdkTimeCoord GdkTimeCoord;
|
||||
|
||||
/**
|
||||
@@ -138,6 +141,37 @@ typedef enum {
|
||||
GDK_DEVICE_TYPE_FLOATING
|
||||
} GdkDeviceType;
|
||||
|
||||
/**
|
||||
* GdkDeviceKey:
|
||||
* @keyval: the keyval to generate when the macro button is pressed.
|
||||
* If this is 0, no keypress will be generated.
|
||||
* @modifiers: the modifiers set for the generated key event.
|
||||
*
|
||||
* The <structname>GdkDeviceKey</structname> structure contains information
|
||||
* about the mapping of one device macro button onto a normal X key event.
|
||||
*/
|
||||
struct _GdkDeviceKey
|
||||
{
|
||||
guint keyval;
|
||||
GdkModifierType modifiers;
|
||||
};
|
||||
|
||||
/**
|
||||
* GdkDeviceAxis:
|
||||
* @use: specifies how the axis is used.
|
||||
* @min: the minimal value that will be reported by this axis.
|
||||
* @max: the maximal value that will be reported by this axis.
|
||||
*
|
||||
* The <structname>GdkDeviceAxis</structname> structure contains information
|
||||
* about the range and mapping of a device axis.
|
||||
*/
|
||||
struct _GdkDeviceAxis
|
||||
{
|
||||
GdkAxisUse use;
|
||||
gdouble min;
|
||||
gdouble max;
|
||||
};
|
||||
|
||||
/* We don't allocate each coordinate this big, but we use it to
|
||||
* be ANSI compliant and avoid accessing past the defined limits.
|
||||
*/
|
||||
@@ -160,6 +194,18 @@ struct _GdkDevice
|
||||
{
|
||||
GObject parent_instance;
|
||||
|
||||
/* All fields are read-only */
|
||||
gchar *GSEAL (name);
|
||||
GdkInputSource GSEAL (source);
|
||||
GdkInputMode GSEAL (mode);
|
||||
gboolean GSEAL (has_cursor); /* TRUE if a X pointer follows device motion */
|
||||
|
||||
gint GSEAL (num_axes);
|
||||
GdkDeviceAxis *GSEAL (axes);
|
||||
|
||||
gint GSEAL (num_keys);
|
||||
GdkDeviceKey *GSEAL (keys);
|
||||
|
||||
/*< private >*/
|
||||
GdkDevicePrivate *priv;
|
||||
};
|
||||
@@ -178,7 +224,6 @@ GdkInputMode gdk_device_get_mode (GdkDevice *device);
|
||||
gboolean gdk_device_set_mode (GdkDevice *device,
|
||||
GdkInputMode mode);
|
||||
|
||||
gint gdk_device_get_n_keys (GdkDevice *device);
|
||||
gboolean gdk_device_get_key (GdkDevice *device,
|
||||
guint index_,
|
||||
guint *keyval,
|
||||
@@ -208,7 +253,7 @@ gboolean gdk_device_get_history (GdkDevice *device,
|
||||
void gdk_device_free_history (GdkTimeCoord **events,
|
||||
gint n_events);
|
||||
|
||||
gint gdk_device_get_n_axes (GdkDevice *device);
|
||||
guint gdk_device_get_n_axes (GdkDevice *device);
|
||||
GList * gdk_device_list_axes (GdkDevice *device);
|
||||
gboolean gdk_device_get_axis_value (GdkDevice *device,
|
||||
gdouble *axes,
|
||||
|
||||
@@ -260,9 +260,8 @@ gdk_device_manager_get_property (GObject *object,
|
||||
*
|
||||
* Gets the #GdkDisplay associated to @device_manager.
|
||||
*
|
||||
* Returns: (transfer none): the #GdkDisplay to which @device_manager is
|
||||
* associated to, or #NULL. This memory is owned by GDK and
|
||||
* must not be freed or unreferenced.
|
||||
* Returns: the #GdkDisplay to which @device_manager is
|
||||
* associated to, or #NULL.
|
||||
*
|
||||
* Since: 3.0
|
||||
**/
|
||||
@@ -313,8 +312,7 @@ gdk_device_manager_list_devices (GdkDeviceManager *device_manager,
|
||||
* You should use this function sheldomly, only in code that isn't triggered by a #GdkEvent
|
||||
* and there aren't other means to get a meaningful #GdkDevice to operate on.
|
||||
*
|
||||
* Returns: (transfer none): The client pointer. This memory is
|
||||
* owned by GDK and must not be freed or unreferenced.
|
||||
* Returns: The client pointer.
|
||||
*
|
||||
* Since: 3.0
|
||||
**/
|
||||
|
||||
@@ -34,32 +34,6 @@
|
||||
#include <glib.h>
|
||||
#include <math.h>
|
||||
|
||||
|
||||
/**
|
||||
* SECTION:gdkdisplay
|
||||
* @Short_description: Controls the keyboard/mouse pointer grabs and a set of <type>GdkScreen</type>s
|
||||
* @Title: GdkDisplay
|
||||
*
|
||||
* #GdkDisplay objects purpose are two fold:
|
||||
* <itemizedlist>
|
||||
* <listitem><para>
|
||||
* To grab/ungrab keyboard focus and mouse pointer
|
||||
* </para></listitem>
|
||||
* <listitem><para>
|
||||
* To manage and provide information about the #GdkScreen(s)
|
||||
* available for this #GdkDisplay
|
||||
* </para></listitem>
|
||||
* </itemizedlist>
|
||||
*
|
||||
* #GdkDisplay objects are the GDK representation of the X Display which can be
|
||||
* described as <emphasis>a workstation consisting of a keyboard a pointing
|
||||
* device (such as a mouse) and one or more screens</emphasis>.
|
||||
* It is used to open and keep track of various #GdkScreen objects currently
|
||||
* instanciated by the application. It is also used to grab and release the keyboard
|
||||
* and the mouse pointer.
|
||||
*/
|
||||
|
||||
|
||||
enum {
|
||||
OPENED,
|
||||
CLOSED,
|
||||
@@ -494,7 +468,7 @@ gdk_display_pointer_ungrab (GdkDisplay *display,
|
||||
{
|
||||
device = dev->data;
|
||||
|
||||
if (gdk_device_get_source (device) != GDK_SOURCE_MOUSE)
|
||||
if (device->source != GDK_SOURCE_MOUSE)
|
||||
continue;
|
||||
|
||||
gdk_device_ungrab (device, time_);
|
||||
@@ -570,7 +544,7 @@ gdk_display_keyboard_ungrab (GdkDisplay *display,
|
||||
{
|
||||
device = dev->data;
|
||||
|
||||
if (gdk_device_get_source (device) != GDK_SOURCE_KEYBOARD)
|
||||
if (device->source != GDK_SOURCE_KEYBOARD)
|
||||
continue;
|
||||
|
||||
gdk_device_ungrab (device, time);
|
||||
@@ -654,8 +628,8 @@ gdk_event_send_clientmessage_toall (GdkEvent *event)
|
||||
*
|
||||
* Returns the core pointer device for the default display.
|
||||
*
|
||||
* Return value: (transfer none): the core pointer device; this is owned
|
||||
* by the display and should not be freed.
|
||||
* Return value: the core pointer device; this is owned by the
|
||||
* display and should not be freed.
|
||||
*
|
||||
* Deprecated: 3.0: Use gdk_device_manager_get_client_pointer() instead, or
|
||||
* gdk_event_get_device() if a #GdkEvent with pointer device
|
||||
@@ -673,7 +647,7 @@ gdk_device_get_core_pointer (void)
|
||||
*
|
||||
* Returns the core pointer device for the given display
|
||||
*
|
||||
* Return value: (transfer none): the core pointer device; this is owned by the
|
||||
* Return value: the core pointer device; this is owned by the
|
||||
* display and should not be freed.
|
||||
*
|
||||
* Since: 2.2
|
||||
@@ -810,7 +784,7 @@ gdk_display_get_device_state (GdkDisplay *display,
|
||||
* Obtains the window underneath @device, returning the location of the device in @win_x and @win_y. Returns
|
||||
* %NULL if the window tree under @device is not known to GDK (for example, belongs to another application).
|
||||
*
|
||||
* Returns: (transfer none): the #GdkWindow under the device position, or %NULL.
|
||||
* Returns: the #GdkWindow under the device position, or %NULL.
|
||||
*
|
||||
* Since: 3.0
|
||||
**/
|
||||
@@ -846,7 +820,7 @@ gdk_display_get_window_at_device_position (GdkDisplay *display,
|
||||
* #GdkDevice on a particular #GdkDisplay. This is only useful for such low-level tools as
|
||||
* an event recorder. Applications should never have any reason to use this facility.
|
||||
*
|
||||
* Returns: (transfer none): The previous device hook table.
|
||||
* Returns: The previous device hook table.
|
||||
*
|
||||
* Since: 3.0
|
||||
**/
|
||||
@@ -1067,7 +1041,7 @@ multihead_default_window_at_pointer (GdkDisplay *display,
|
||||
* event recorder. Applications should never have any
|
||||
* reason to use this facility.
|
||||
*
|
||||
* Return value: (transfer none): the previous pointer hook table
|
||||
* Return value: the previous pointer hook table
|
||||
*
|
||||
* Since: 2.2
|
||||
*
|
||||
@@ -1209,7 +1183,7 @@ generate_grab_broken_event (GdkWindow *window,
|
||||
event->grab_broken.implicit = implicit;
|
||||
event->grab_broken.grab_window = grab_window;
|
||||
gdk_event_set_device (event, device);
|
||||
event->grab_broken.keyboard = (gdk_device_get_source (device) == GDK_SOURCE_KEYBOARD) ? TRUE : FALSE;
|
||||
event->grab_broken.keyboard = (device->source == GDK_SOURCE_KEYBOARD) ? TRUE : FALSE;
|
||||
|
||||
gdk_event_put (event);
|
||||
gdk_event_free (event);
|
||||
@@ -1538,7 +1512,7 @@ _gdk_display_device_grab_update (GdkDisplay *display,
|
||||
|
||||
if (!current_grab->activated)
|
||||
{
|
||||
if (gdk_device_get_source (device) != GDK_SOURCE_KEYBOARD)
|
||||
if (device->source != GDK_SOURCE_KEYBOARD)
|
||||
switch_to_pointer_grab (display, device, current_grab, NULL, time, current_serial);
|
||||
}
|
||||
|
||||
@@ -1566,7 +1540,7 @@ _gdk_display_device_grab_update (GdkDisplay *display,
|
||||
grabs = g_list_delete_link (grabs, grabs);
|
||||
g_hash_table_insert (display->device_grabs, device, grabs);
|
||||
|
||||
if (gdk_device_get_source (device) != GDK_SOURCE_KEYBOARD)
|
||||
if (device->source != GDK_SOURCE_KEYBOARD)
|
||||
switch_to_pointer_grab (display, device,
|
||||
next_grab, current_grab,
|
||||
time, current_serial);
|
||||
@@ -1663,7 +1637,7 @@ _gdk_display_check_grab_ownership (GdkDisplay *display,
|
||||
|
||||
g_hash_table_iter_init (&iter, display->device_grabs);
|
||||
higher_ownership = device_ownership = GDK_OWNERSHIP_NONE;
|
||||
device_is_keyboard = (gdk_device_get_source (device) == GDK_SOURCE_KEYBOARD);
|
||||
device_is_keyboard = (device->source == GDK_SOURCE_KEYBOARD);
|
||||
|
||||
while (g_hash_table_iter_next (&iter, &key, &value))
|
||||
{
|
||||
@@ -1679,8 +1653,8 @@ _gdk_display_check_grab_ownership (GdkDisplay *display,
|
||||
continue;
|
||||
|
||||
/* Discard device if it's not of the same type */
|
||||
if ((device_is_keyboard && gdk_device_get_source (dev) != GDK_SOURCE_KEYBOARD) ||
|
||||
(!device_is_keyboard && gdk_device_get_source (dev) == GDK_SOURCE_KEYBOARD))
|
||||
if ((device_is_keyboard && dev->source != GDK_SOURCE_KEYBOARD) ||
|
||||
(!device_is_keyboard && dev->source == GDK_SOURCE_KEYBOARD))
|
||||
continue;
|
||||
|
||||
grab = grabs->data;
|
||||
@@ -1813,7 +1787,7 @@ gdk_display_pointer_is_grabbed (GdkDisplay *display)
|
||||
{
|
||||
device = dev->data;
|
||||
|
||||
if (gdk_device_get_source (device) == GDK_SOURCE_MOUSE &&
|
||||
if (device->source == GDK_SOURCE_MOUSE &&
|
||||
gdk_display_device_is_grabbed (display, device))
|
||||
return TRUE;
|
||||
}
|
||||
@@ -1853,7 +1827,7 @@ gdk_display_device_is_grabbed (GdkDisplay *display,
|
||||
*
|
||||
* Returns the #GdkDeviceManager associated to @display.
|
||||
*
|
||||
* Returns: (transfer none): A #GdkDeviceManager, or %NULL. This memory is
|
||||
* Returns: A #GdkDeviceManager, or %NULL. This memory is
|
||||
* owned by GDK and must not be freed or unreferenced.
|
||||
*
|
||||
* Since: 3.0
|
||||
|
||||
@@ -132,28 +132,6 @@ struct _GdkDisplayClass
|
||||
gboolean is_error);
|
||||
};
|
||||
|
||||
/**
|
||||
* GdkDisplayPointerHooks:
|
||||
* @get_pointer: Obtains the current pointer position and modifier state.
|
||||
* The position is given in coordinates relative to the screen containing
|
||||
* the pointer, which is returned in @screen.
|
||||
* @window_get_pointer: Obtains the window underneath the mouse pointer.
|
||||
* Current pointer position and modifier state are returned in @x, @y and
|
||||
* @mask. The position is given in coordinates relative to @window.
|
||||
* @window_at_pointer: Obtains the window underneath the mouse pointer,
|
||||
* returning the location of that window in @win_x, @win_y. Returns %NULL
|
||||
* if the window under the mouse pointer is not known to GDK (for example,
|
||||
* belongs to another application).
|
||||
*
|
||||
* A table of pointers to functions for getting quantities related to
|
||||
* the current pointer position. Each #GdkDisplay has a table of this type,
|
||||
* which can be set using gdk_display_set_pointer_hooks().
|
||||
*
|
||||
* This is only useful for such low-level tools as an event recorder.
|
||||
* Applications should never have any reason to use this facility
|
||||
*
|
||||
* Since: 2.2
|
||||
*/
|
||||
struct _GdkDisplayPointerHooks
|
||||
{
|
||||
void (*get_pointer) (GdkDisplay *display,
|
||||
|
||||
@@ -35,19 +35,14 @@
|
||||
#include "gdkintl.h"
|
||||
|
||||
|
||||
/**
|
||||
* SECTION:gdkdisplaymanager
|
||||
* @Short_description: Maintains a list of all open GdkDisplays
|
||||
* @Title: GdkDisplayManager
|
||||
*
|
||||
* The purpose of the #GdkDisplayManager singleton object is to offer
|
||||
* notification when displays appear or disappear or the default display
|
||||
* changes.
|
||||
*/
|
||||
|
||||
struct _GdkDisplayManager
|
||||
{
|
||||
GObject parent_instance;
|
||||
};
|
||||
|
||||
enum {
|
||||
PROP_0,
|
||||
|
||||
PROP_DEFAULT_DISPLAY
|
||||
};
|
||||
|
||||
|
||||
@@ -36,6 +36,8 @@
|
||||
|
||||
G_BEGIN_DECLS
|
||||
|
||||
typedef struct _GdkDisplayManager GdkDisplayManager;
|
||||
typedef struct _GdkDisplayManagerClass GdkDisplayManagerClass;
|
||||
|
||||
#define GDK_TYPE_DISPLAY_MANAGER (gdk_display_manager_get_type ())
|
||||
#define GDK_DISPLAY_MANAGER(object) (G_TYPE_CHECK_INSTANCE_CAST ((object), GDK_TYPE_DISPLAY_MANAGER, GdkDisplayManager))
|
||||
@@ -44,14 +46,6 @@ G_BEGIN_DECLS
|
||||
#define GDK_IS_DISPLAY_MANAGER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GDK_TYPE_DISPLAY_MANAGER))
|
||||
#define GDK_DISPLAY_MANAGER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GDK_TYPE_DISPLAY_MANAGER, GdkDisplayManagerClass))
|
||||
|
||||
typedef struct _GdkDisplayManager GdkDisplayManager;
|
||||
typedef struct _GdkDisplayManagerClass GdkDisplayManagerClass;
|
||||
|
||||
struct _GdkDisplayManager
|
||||
{
|
||||
GObject parent_instance;
|
||||
};
|
||||
|
||||
struct _GdkDisplayManagerClass
|
||||
{
|
||||
GObjectClass parent_class;
|
||||
|
||||
@@ -47,12 +47,6 @@ typedef struct _GdkDrawableClass GdkDrawableClass;
|
||||
#define GDK_IS_DRAWABLE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GDK_TYPE_DRAWABLE))
|
||||
#define GDK_DRAWABLE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GDK_TYPE_DRAWABLE, GdkDrawableClass))
|
||||
|
||||
/**
|
||||
* GdkDrawable:
|
||||
*
|
||||
* An opaque structure representing an object that can be
|
||||
* drawn onto.
|
||||
*/
|
||||
struct _GdkDrawable
|
||||
{
|
||||
GObject parent_instance;
|
||||
|
||||
@@ -31,23 +31,6 @@
|
||||
#include <string.h>
|
||||
#include <math.h>
|
||||
|
||||
|
||||
/**
|
||||
* SECTION:events
|
||||
* @Short_description: Functions for handling events from the window system
|
||||
* @Title: Events
|
||||
* @See_also: <link linkend="gdk-Event-Structures">Event Structures</link>
|
||||
*
|
||||
* This section describes functions dealing with events from the window
|
||||
* system.
|
||||
*
|
||||
* In GTK+ applications the events are handled automatically in
|
||||
* gtk_main_do_event() and passed on to the appropriate widgets, so these
|
||||
* functions are rarely needed. Though some of the fields in the
|
||||
* <link linkend="gdk-Event-Structures">Event Structures</link> are useful.
|
||||
*/
|
||||
|
||||
|
||||
typedef struct _GdkIOClosure GdkIOClosure;
|
||||
|
||||
struct _GdkIOClosure
|
||||
@@ -499,16 +482,17 @@ gdk_event_copy (const GdkEvent *event)
|
||||
case GDK_BUTTON_PRESS:
|
||||
case GDK_BUTTON_RELEASE:
|
||||
if (event->button.axes)
|
||||
new_event->button.axes = g_memdup (event->button.axes,
|
||||
sizeof (gdouble) * gdk_device_get_n_axes (event->button.device));
|
||||
new_event->button.axes = g_memdup (event->button.axes,
|
||||
sizeof (gdouble) * event->button.device->num_axes);
|
||||
break;
|
||||
|
||||
case GDK_MOTION_NOTIFY:
|
||||
if (event->motion.axes)
|
||||
new_event->motion.axes = g_memdup (event->motion.axes,
|
||||
sizeof (gdouble) * gdk_device_get_n_axes (event->motion.device));
|
||||
new_event->motion.axes = g_memdup (event->motion.axes,
|
||||
sizeof (gdouble) * event->motion.device->num_axes);
|
||||
|
||||
break;
|
||||
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
@@ -1277,7 +1261,7 @@ gdk_event_set_screen (GdkEvent *event,
|
||||
* to which <literal>event->motion.x_root</literal> and
|
||||
* <literal>event->motion.y_root</literal> are relative.
|
||||
*
|
||||
* Return value: (transfer none): the screen for the event
|
||||
* Return value: the screen for the event
|
||||
*
|
||||
* Since: 2.2
|
||||
**/
|
||||
|
||||
644
gdk/gdkevents.h
644
gdk/gdkevents.h
@@ -38,40 +38,9 @@
|
||||
|
||||
G_BEGIN_DECLS
|
||||
|
||||
|
||||
/**
|
||||
* SECTION:event_structs
|
||||
* @Short_description: Data structures specific to each type of event
|
||||
* @Title: Event Structures
|
||||
*
|
||||
* The event structs contain data specific to each type of event in GDK.
|
||||
*
|
||||
* <note>
|
||||
* <para>
|
||||
* A common mistake is to forget to set the event mask of a widget so that
|
||||
* the required events are received. See gtk_widget_set_events().
|
||||
* </para>
|
||||
* </note>
|
||||
*/
|
||||
|
||||
|
||||
#define GDK_TYPE_EVENT (gdk_event_get_type ())
|
||||
|
||||
/**
|
||||
* GDK_PRIORITY_EVENTS:
|
||||
*
|
||||
* This is the priority that events from the X server are given in the
|
||||
* <link linkend="glib-The-Main-Event-Loop">GLib Main Loop</link>.
|
||||
*/
|
||||
#define GDK_PRIORITY_EVENTS (G_PRIORITY_DEFAULT)
|
||||
|
||||
/**
|
||||
* GDK_PRIORITY_REDRAW:
|
||||
*
|
||||
* This is the priority that the idle handler processing window updates
|
||||
* is given in the
|
||||
* <link linkend="glib-The-Main-Event-Loop">GLib Main Loop</link>.
|
||||
*/
|
||||
#define GDK_PRIORITY_REDRAW (G_PRIORITY_HIGH_IDLE + 20)
|
||||
|
||||
|
||||
@@ -98,15 +67,6 @@ typedef struct _GdkEventGrabBroken GdkEventGrabBroken;
|
||||
|
||||
typedef union _GdkEvent GdkEvent;
|
||||
|
||||
/**
|
||||
* GdkEventFunc:
|
||||
* @event: the #GdkEvent to process.
|
||||
* @data: user data set when the event handler was installed with
|
||||
* gdk_event_handler_set().
|
||||
*
|
||||
* Specifies the type of function passed to gdk_event_handler_set() to
|
||||
* handle all GDK events.
|
||||
*/
|
||||
typedef void (*GdkEventFunc) (GdkEvent *event,
|
||||
gpointer data);
|
||||
|
||||
@@ -161,69 +121,28 @@ typedef GdkFilterReturn (*GdkFilterFunc) (GdkXEvent *xevent,
|
||||
gpointer data);
|
||||
|
||||
|
||||
/**
|
||||
* GdkEventType:
|
||||
* @GDK_NOTHING: a special code to indicate a null event.
|
||||
* @GDK_DELETE: the window manager has requested that the toplevel window be
|
||||
* hidden or destroyed, usually when the user clicks on a special icon in the
|
||||
* title bar.
|
||||
* @GDK_DESTROY: the window has been destroyed.
|
||||
* @GDK_EXPOSE: all or part of the window has become visible and needs to be
|
||||
* redrawn.
|
||||
* @GDK_MOTION_NOTIFY: the pointer (usually a mouse) has moved.
|
||||
* @GDK_BUTTON_PRESS: a mouse button has been pressed.
|
||||
* @GDK_2BUTTON_PRESS: a mouse button has been double-clicked (clicked twice
|
||||
* within a short period of time). Note that each click also generates a
|
||||
* %GDK_BUTTON_PRESS event.
|
||||
* @GDK_3BUTTON_PRESS: a mouse button has been clicked 3 times in a short period
|
||||
* of time. Note that each click also generates a %GDK_BUTTON_PRESS event.
|
||||
* @GDK_BUTTON_RELEASE: a mouse button has been released.
|
||||
* @GDK_KEY_PRESS: a key has been pressed.
|
||||
* @GDK_KEY_RELEASE: a key has been released.
|
||||
* @GDK_ENTER_NOTIFY: the pointer has entered the window.
|
||||
* @GDK_LEAVE_NOTIFY: the pointer has left the window.
|
||||
* @GDK_FOCUS_CHANGE: the keyboard focus has entered or left the window.
|
||||
* @GDK_CONFIGURE: the size, position or stacking order of the window has changed.
|
||||
* Note that GTK+ discards these events for %GDK_WINDOW_CHILD windows.
|
||||
* @GDK_MAP: the window has been mapped.
|
||||
* @GDK_UNMAP: the window has been unmapped.
|
||||
* @GDK_PROPERTY_NOTIFY: a property on the window has been changed or deleted.
|
||||
* @GDK_SELECTION_CLEAR: the application has lost ownership of a selection.
|
||||
* @GDK_SELECTION_REQUEST: another application has requested a selection.
|
||||
* @GDK_SELECTION_NOTIFY: a selection has been received.
|
||||
* @GDK_PROXIMITY_IN: an input device has moved into contact with a sensing
|
||||
* surface (e.g. a touchscreen or graphics tablet).
|
||||
* @GDK_PROXIMITY_OUT: an input device has moved out of contact with a sensing
|
||||
* surface.
|
||||
* @GDK_DRAG_ENTER: the mouse has entered the window while a drag is in progress.
|
||||
* @GDK_DRAG_LEAVE: the mouse has left the window while a drag is in progress.
|
||||
* @GDK_DRAG_MOTION: the mouse has moved in the window while a drag is in
|
||||
* progress.
|
||||
* @GDK_DRAG_STATUS: the status of the drag operation initiated by the window
|
||||
* has changed.
|
||||
* @GDK_DROP_START: a drop operation onto the window has started.
|
||||
* @GDK_DROP_FINISHED: the drop operation initiated by the window has completed.
|
||||
* @GDK_CLIENT_EVENT: a message has been received from another application.
|
||||
* @GDK_VISIBILITY_NOTIFY: the window visibility status has changed.
|
||||
* @GDK_NO_EXPOSE: indicates that the source region was completely available
|
||||
* when parts of a drawable were copied. This is not very useful.
|
||||
* @GDK_SCROLL: the scroll wheel was turned
|
||||
* @GDK_WINDOW_STATE: the state of a window has changed. See #GdkWindowState
|
||||
* for the possible window states
|
||||
* @GDK_SETTING: a setting has been modified.
|
||||
* @GDK_OWNER_CHANGE: the owner of a selection has changed. This event type
|
||||
* was added in 2.6
|
||||
* @GDK_GRAB_BROKEN: a pointer or keyboard grab was broken. This event type
|
||||
* was added in 2.8.
|
||||
* @GDK_DAMAGE: the content of the window has been changed. This event type
|
||||
* was added in 2.14.
|
||||
* @GDK_EVENT_LAST: marks the end of the GdkEventType enumeration. Added in 2.18
|
||||
*
|
||||
* Specifies the type of the event.
|
||||
*
|
||||
* Do not confuse these events with the signals that GTK+ widgets emit.
|
||||
* Although many of these events result in corresponding signals being emitted,
|
||||
* the events are often transformed or filtered along the way.
|
||||
/* Event types.
|
||||
* Nothing: No event occurred.
|
||||
* Delete: A window delete event was sent by the window manager.
|
||||
* The specified window should be deleted.
|
||||
* Destroy: A window has been destroyed.
|
||||
* Expose: Part of a window has been uncovered.
|
||||
* NoExpose: Same as expose, but no expose event was generated.
|
||||
* VisibilityNotify: A window has become fully/partially/not obscured.
|
||||
* MotionNotify: The mouse has moved.
|
||||
* ButtonPress: A mouse button was pressed.
|
||||
* ButtonRelease: A mouse button was release.
|
||||
* KeyPress: A key was pressed.
|
||||
* KeyRelease: A key was released.
|
||||
* EnterNotify: A window was entered.
|
||||
* LeaveNotify: A window was exited.
|
||||
* FocusChange: The focus window has changed. (The focus window gets
|
||||
* keyboard events).
|
||||
* Resize: A window has been resized.
|
||||
* Map: A window has been mapped. (It is now visible on the screen).
|
||||
* Unmap: A window has been unmapped. (It is no longer visible on
|
||||
* the screen).
|
||||
* Scroll: A mouse wheel was scrolled either up or down.
|
||||
*/
|
||||
typedef enum
|
||||
{
|
||||
@@ -268,14 +187,6 @@ typedef enum
|
||||
GDK_EVENT_LAST /* helper variable for decls */
|
||||
} GdkEventType;
|
||||
|
||||
/**
|
||||
* GdkVisibilityState:
|
||||
* @GDK_VISIBILITY_UNOBSCURED: the window is completely visible.
|
||||
* @GDK_VISIBILITY_PARTIAL: the window is partially visible.
|
||||
* @GDK_VISIBILITY_FULLY_OBSCURED: the window is not visible at all.
|
||||
*
|
||||
* Specifies the visiblity status of a window for a #GdkEventVisibility.
|
||||
*/
|
||||
typedef enum
|
||||
{
|
||||
GDK_VISIBILITY_UNOBSCURED,
|
||||
@@ -283,15 +194,6 @@ typedef enum
|
||||
GDK_VISIBILITY_FULLY_OBSCURED
|
||||
} GdkVisibilityState;
|
||||
|
||||
/**
|
||||
* GdkScrollDirection:
|
||||
* @GDK_SCROLL_UP: the window is scrolled up.
|
||||
* @GDK_SCROLL_DOWN: the window is scrolled down.
|
||||
* @GDK_SCROLL_LEFT: the window is scrolled to the left.
|
||||
* @GDK_SCROLL_RIGHT: the window is scrolled to the right.
|
||||
*
|
||||
* Specifies the direction for #GdkEventScroll.
|
||||
*/
|
||||
typedef enum
|
||||
{
|
||||
GDK_SCROLL_UP,
|
||||
@@ -300,26 +202,13 @@ typedef enum
|
||||
GDK_SCROLL_RIGHT
|
||||
} GdkScrollDirection;
|
||||
|
||||
/**
|
||||
* GdkNotifyType:
|
||||
* @GDK_NOTIFY_ANCESTOR: the window is entered from an ancestor or
|
||||
* left towards an ancestor.
|
||||
* @GDK_NOTIFY_VIRTUAL: the pointer moves between an ancestor and an
|
||||
* inferior of the window.
|
||||
* @GDK_NOTIFY_INFERIOR: the window is entered from an inferior or
|
||||
* left towards an inferior.
|
||||
* @GDK_NOTIFY_NONLINEAR: the window is entered from or left towards
|
||||
* a window which is neither an ancestor nor an inferior.
|
||||
* @GDK_NOTIFY_NONLINEAR_VIRTUAL: the pointer moves between two windows
|
||||
* which are not ancestors of each other and the window is part of
|
||||
* the ancestor chain between one of these windows and their least
|
||||
* common ancestor.
|
||||
* @GDK_NOTIFY_UNKNOWN: an unknown type of enter/leave event occurred.
|
||||
*
|
||||
* Specifies the kind of crossing for #GdkEventCrossing.
|
||||
*
|
||||
* See the X11 protocol specification of <type>LeaveNotify</type> for
|
||||
* full details of crossing event generation.
|
||||
/* Types of enter/leave notifications.
|
||||
* Ancestor:
|
||||
* Virtual:
|
||||
* Inferior:
|
||||
* Nonlinear:
|
||||
* NonlinearVirtual:
|
||||
* Unknown: An unknown type of enter/leave event occurred.
|
||||
*/
|
||||
typedef enum
|
||||
{
|
||||
@@ -331,17 +220,10 @@ typedef enum
|
||||
GDK_NOTIFY_UNKNOWN = 5
|
||||
} GdkNotifyType;
|
||||
|
||||
/**
|
||||
* GdkCrossingMode:
|
||||
* @GDK_CROSSING_NORMAL: crossing because of pointer motion.
|
||||
* @GDK_CROSSING_GRAB: crossing because a grab is activated.
|
||||
* @GDK_CROSSING_UNGRAB: crossing because a grab is deactivated.
|
||||
* @GDK_CROSSING_GTK_GRAB: crossing because a GTK+ grab is activated.
|
||||
* @GDK_CROSSING_GTK_UNGRAB: crossing because a GTK+ grab is deactivated.
|
||||
* @GDK_CROSSING_STATE_CHANGED: crossing because a GTK+ widget changed
|
||||
* state (e.g. sensitivity).
|
||||
*
|
||||
* Specifies the crossing mode for #GdkEventCrossing.
|
||||
/* Enter/leave event modes.
|
||||
* NotifyNormal
|
||||
* NotifyGrab
|
||||
* NotifyUngrab
|
||||
*/
|
||||
typedef enum
|
||||
{
|
||||
@@ -353,32 +235,12 @@ typedef enum
|
||||
GDK_CROSSING_STATE_CHANGED
|
||||
} GdkCrossingMode;
|
||||
|
||||
/**
|
||||
* GdkPropertyState:
|
||||
* @GDK_PROPERTY_NEW_VALUE: the property value was changed.
|
||||
* @GDK_PROPERTY_DELETE: the property was deleted.
|
||||
*
|
||||
* Specifies the type of a property change for a #GdkEventProperty.
|
||||
*/
|
||||
typedef enum
|
||||
{
|
||||
GDK_PROPERTY_NEW_VALUE,
|
||||
GDK_PROPERTY_DELETE
|
||||
} GdkPropertyState;
|
||||
|
||||
/**
|
||||
* GdkWindowState:
|
||||
* @GDK_WINDOW_STATE_WITHDRAWN: the window is not shown.
|
||||
* @GDK_WINDOW_STATE_ICONIFIED: the window is minimized.
|
||||
* @GDK_WINDOW_STATE_MAXIMIZED: the window is maximized.
|
||||
* @GDK_WINDOW_STATE_STICKY: the window is sticky.
|
||||
* @GDK_WINDOW_STATE_FULLSCREEN: the window is maximized without
|
||||
* decorations.
|
||||
* @GDK_WINDOW_STATE_ABOVE: the window is kept above other windows.
|
||||
* @GDK_WINDOW_STATE_BELOW: the window is kept below other windows.
|
||||
*
|
||||
* Specifies the state of a toplevel window.
|
||||
*/
|
||||
typedef enum
|
||||
{
|
||||
GDK_WINDOW_STATE_WITHDRAWN = 1 << 0,
|
||||
@@ -390,15 +252,6 @@ typedef enum
|
||||
GDK_WINDOW_STATE_BELOW = 1 << 6
|
||||
} GdkWindowState;
|
||||
|
||||
/**
|
||||
* GdkSettingAction:
|
||||
* @GDK_SETTING_ACTION_NEW: a setting was added.
|
||||
* @GDK_SETTING_ACTION_CHANGED: a setting was changed.
|
||||
* @GDK_SETTING_ACTION_DELETED: a setting was deleted.
|
||||
*
|
||||
* Specifies the kind of modification applied to a setting in a
|
||||
* #GdkEventSetting.
|
||||
*/
|
||||
typedef enum
|
||||
{
|
||||
GDK_SETTING_ACTION_NEW,
|
||||
@@ -406,14 +259,6 @@ typedef enum
|
||||
GDK_SETTING_ACTION_DELETED
|
||||
} GdkSettingAction;
|
||||
|
||||
/**
|
||||
* GdkOwnerChange:
|
||||
* @GDK_OWNER_CHANGE_NEW_OWNER: some other app claimed the ownership
|
||||
* @GDK_OWNER_CHANGE_DESTROY: the window was destroyed
|
||||
* @GDK_OWNER_CHANGE_CLOSE: the client was closed
|
||||
*
|
||||
* Specifies why a selection ownership was changed.
|
||||
*/
|
||||
typedef enum
|
||||
{
|
||||
GDK_OWNER_CHANGE_NEW_OWNER,
|
||||
@@ -421,17 +266,6 @@ typedef enum
|
||||
GDK_OWNER_CHANGE_CLOSE
|
||||
} GdkOwnerChange;
|
||||
|
||||
/**
|
||||
* GdkEventAny:
|
||||
* @type: the type of the event.
|
||||
* @window: the window which received the event.
|
||||
* @send_event: %TRUE if the event was sent explicitly (e.g. using
|
||||
* <function>XSendEvent</function>).
|
||||
*
|
||||
* Contains the fields which are common to all event structs.
|
||||
* Any event pointer can safely be cast to a pointer to a #GdkEventAny to
|
||||
* access these fields.
|
||||
*/
|
||||
struct _GdkEventAny
|
||||
{
|
||||
GdkEventType type;
|
||||
@@ -439,22 +273,6 @@ struct _GdkEventAny
|
||||
gint8 send_event;
|
||||
};
|
||||
|
||||
/**
|
||||
* GdkEventExpose:
|
||||
* @type: the type of the event (%GDK_EXPOSE or %GDK_DAMAGE).
|
||||
* @window: the window which received the event.
|
||||
* @send_event: %TRUE if the event was sent explicitly (e.g. using
|
||||
* <function>XSendEvent</function>).
|
||||
* @area: bounding box of @region.
|
||||
* @region: the region that needs to be redrawn.
|
||||
* @count: the number of contiguous %GDK_EXPOSE events following this one.
|
||||
* The only use for this is "exposure compression", i.e. handling all
|
||||
* contiguous %GDK_EXPOSE events in one go, though GDK performs some
|
||||
* exposure compression so this is not normally needed.
|
||||
*
|
||||
* Generated when all or part of a window becomes visible and needs to be
|
||||
* redrawn.
|
||||
*/
|
||||
struct _GdkEventExpose
|
||||
{
|
||||
GdkEventType type;
|
||||
@@ -465,16 +283,6 @@ struct _GdkEventExpose
|
||||
gint count; /* If non-zero, how many more events follow. */
|
||||
};
|
||||
|
||||
/**
|
||||
* GdkEventNoExpose:
|
||||
* @type: the type of the event (%GDK_NO_EXPOSE).
|
||||
* @window: the window which received the event.
|
||||
* @send_event: %TRUE if the event was sent explicitly (e.g. using
|
||||
* <function>XSendEvent</function>).
|
||||
*
|
||||
* Generated when the area of a #GdkDrawable being copied was completely
|
||||
* available.
|
||||
*/
|
||||
struct _GdkEventNoExpose
|
||||
{
|
||||
GdkEventType type;
|
||||
@@ -482,17 +290,6 @@ struct _GdkEventNoExpose
|
||||
gint8 send_event;
|
||||
};
|
||||
|
||||
/**
|
||||
* GdkEventVisibility:
|
||||
* @type: the type of the event (%GDK_VISIBILITY_NOTIFY).
|
||||
* @window: the window which received the event.
|
||||
* @send_event: %TRUE if the event was sent explicitly (e.g. using
|
||||
* <function>XSendEvent</function>).
|
||||
* @state: the new visibility state (%GDK_VISIBILITY_FULLY_OBSCURED,
|
||||
* %GDK_VISIBILITY_PARTIAL or %GDK_VISIBILITY_UNOBSCURED).
|
||||
*
|
||||
* Generated when the window visibility status has changed.
|
||||
*/
|
||||
struct _GdkEventVisibility
|
||||
{
|
||||
GdkEventType type;
|
||||
@@ -501,29 +298,6 @@ struct _GdkEventVisibility
|
||||
GdkVisibilityState state;
|
||||
};
|
||||
|
||||
/**
|
||||
* GdkEventMotion:
|
||||
* @type: the type of the event.
|
||||
* @window: the window which received the event.
|
||||
* @send_event: %TRUE if the event was sent explicitly (e.g. using
|
||||
* <function>XSendEvent</function>).
|
||||
* @time: the time of the event in milliseconds.
|
||||
* @x: the x coordinate of the pointer relative to the window.
|
||||
* @y: the y coordinate of the pointer relative to the window.
|
||||
* @axes: @x, @y translated to the axes of @device, or %NULL if @device is
|
||||
* the mouse.
|
||||
* @state: a bit-mask representing the state of the modifier keys (e.g.
|
||||
* Control, Shift and Alt) and the pointer buttons. See #GdkModifierType.
|
||||
* @is_hint: set to 1 if this event is just a hint, see the
|
||||
* %GDK_POINTER_MOTION_HINT_MASK value of #GdkEventMask.
|
||||
* @device: the device where the event originated.
|
||||
* @x_root: the x coordinate of the pointer relative to the root of the
|
||||
* screen.
|
||||
* @y_root: the y coordinate of the pointer relative to the root of the
|
||||
* screen.
|
||||
*
|
||||
* Generated when the pointer moves.
|
||||
*/
|
||||
struct _GdkEventMotion
|
||||
{
|
||||
GdkEventType type;
|
||||
@@ -539,65 +313,6 @@ struct _GdkEventMotion
|
||||
gdouble x_root, y_root;
|
||||
};
|
||||
|
||||
/**
|
||||
* GdkEventButton:
|
||||
* @type: the type of the event (%GDK_BUTTON_PRESS, %GDK_2BUTTON_PRESS,
|
||||
* %GDK_3BUTTON_PRESS or %GDK_BUTTON_RELEASE).
|
||||
* @window: the window which received the event.
|
||||
* @send_event: %TRUE if the event was sent explicitly (e.g. using
|
||||
* <function>XSendEvent</function>).
|
||||
* @time: the time of the event in milliseconds.
|
||||
* @x: the x coordinate of the pointer relative to the window.
|
||||
* @y: the y coordinate of the pointer relative to the window.
|
||||
* @axes: @x, @y translated to the axes of @device, or %NULL if @device is
|
||||
* the mouse.
|
||||
* @state: a bit-mask representing the state of the modifier keys (e.g.
|
||||
* Control, Shift and Alt) and the pointer buttons. See #GdkModifierType.
|
||||
* @button: the button which was pressed or released, numbered from 1 to 5.
|
||||
* Normally button 1 is the left mouse button, 2 is the middle button,
|
||||
* and 3 is the right button. On 2-button mice, the middle button can
|
||||
* often be simulated by pressing both mouse buttons together.
|
||||
* @device: the device where the event originated.
|
||||
* @x_root: the x coordinate of the pointer relative to the root of the
|
||||
* screen.
|
||||
* @y_root: the y coordinate of the pointer relative to the root of the
|
||||
* screen.
|
||||
*
|
||||
* Used for button press and button release events. The
|
||||
* @type field will be one of %GDK_BUTTON_PRESS,
|
||||
* %GDK_2BUTTON_PRESS, %GDK_3BUTTON_PRESS, and %GDK_BUTTON_RELEASE.
|
||||
*
|
||||
* Double and triple-clicks result in a sequence of events being received.
|
||||
* For double-clicks the order of events will be:
|
||||
* <orderedlist>
|
||||
* <listitem><para>%GDK_BUTTON_PRESS</para></listitem>
|
||||
* <listitem><para>%GDK_BUTTON_RELEASE</para></listitem>
|
||||
* <listitem><para>%GDK_BUTTON_PRESS</para></listitem>
|
||||
* <listitem><para>%GDK_2BUTTON_PRESS</para></listitem>
|
||||
* <listitem><para>%GDK_BUTTON_RELEASE</para></listitem>
|
||||
* </orderedlist>
|
||||
* Note that the first click is received just like a normal
|
||||
* button press, while the second click results in a %GDK_2BUTTON_PRESS
|
||||
* being received just after the %GDK_BUTTON_PRESS.
|
||||
*
|
||||
* Triple-clicks are very similar to double-clicks, except that
|
||||
* %GDK_3BUTTON_PRESS is inserted after the third click. The order of the
|
||||
* events is:
|
||||
* <orderedlist>
|
||||
* <listitem><para>%GDK_BUTTON_PRESS</para></listitem>
|
||||
* <listitem><para>%GDK_BUTTON_RELEASE</para></listitem>
|
||||
* <listitem><para>%GDK_BUTTON_PRESS</para></listitem>
|
||||
* <listitem><para>%GDK_2BUTTON_PRESS</para></listitem>
|
||||
* <listitem><para>%GDK_BUTTON_RELEASE</para></listitem>
|
||||
* <listitem><para>%GDK_BUTTON_PRESS</para></listitem>
|
||||
* <listitem><para>%GDK_3BUTTON_PRESS</para></listitem>
|
||||
* <listitem><para>%GDK_BUTTON_RELEASE</para></listitem>
|
||||
* </orderedlist>
|
||||
*
|
||||
* For a double click to occur, the second button press must occur within
|
||||
* 1/4 of a second of the first. For a triple click to occur, the third
|
||||
* button press must also occur within 1/2 second of the first button press.
|
||||
*/
|
||||
struct _GdkEventButton
|
||||
{
|
||||
GdkEventType type;
|
||||
@@ -613,29 +328,6 @@ struct _GdkEventButton
|
||||
gdouble x_root, y_root;
|
||||
};
|
||||
|
||||
/**
|
||||
* GdkEventScroll:
|
||||
* @type: the type of the event (%GDK_SCROLL).
|
||||
* @window: the window which received the event.
|
||||
* @send_event: %TRUE if the event was sent explicitly (e.g. using
|
||||
* <function>XSendEvent</function>).
|
||||
* @time: the time of the event in milliseconds.
|
||||
* @x: the x coordinate of the pointer relative to the window.
|
||||
* @y: the y coordinate of the pointer relative to the window.
|
||||
* @state: a bit-mask representing the state of the modifier keys (e.g.
|
||||
* Control, Shift and Alt) and the pointer buttons. See #GdkModifierType.
|
||||
* @direction: the direction to scroll to (one of %GDK_SCROLL_UP,
|
||||
* %GDK_SCROLL_DOWN, %GDK_SCROLL_LEFT and %GDK_SCROLL_RIGHT).
|
||||
* @device: the device where the event originated.
|
||||
* @x_root: the x coordinate of the pointer relative to the root of the
|
||||
* screen.
|
||||
* @y_root: the y coordinate of the pointer relative to the root of the
|
||||
* screen.
|
||||
*
|
||||
* Generated from button presses for the buttons 4 to 7. Wheel mice are
|
||||
* usually configured to generate button press events for buttons 4 and 5
|
||||
* when the wheel is turned.
|
||||
*/
|
||||
struct _GdkEventScroll
|
||||
{
|
||||
GdkEventType type;
|
||||
@@ -650,37 +342,6 @@ struct _GdkEventScroll
|
||||
gdouble x_root, y_root;
|
||||
};
|
||||
|
||||
/**
|
||||
* GdkEventKey:
|
||||
* @type: the type of the event (%GDK_KEY_PRESS or %GDK_KEY_RELEASE).
|
||||
* @window: the window which received the event.
|
||||
* @send_event: %TRUE if the event was sent explicitly (e.g. using
|
||||
* <function>XSendEvent</function>).
|
||||
* @time: the time of the event in milliseconds.
|
||||
* @state: a bit-mask representing the state of the modifier keys (e.g.
|
||||
* Control, Shift and Alt) and the pointer buttons. See #GdkModifierType.
|
||||
* @keyval: the key that was pressed or released. See the
|
||||
* <filename><gdk/gdkkeysyms.h></filename> header file for a
|
||||
* complete list of GDK key codes.
|
||||
* @length: the length of @string.
|
||||
* @string: a string containing the an approximation of the text that
|
||||
* would result from this keypress. The only correct way to handle text
|
||||
* input of text is using input methods (see #GtkIMContext), so this
|
||||
* field is deprecated and should never be used.
|
||||
* (gdk_unicode_to_keyval() provides a non-deprecated way of getting
|
||||
* an approximate translation for a key.) The string is encoded in the
|
||||
* encoding of the current locale (Note: this for backwards compatibility:
|
||||
* strings in GTK+ and GDK are typically in UTF-8.) and NUL-terminated.
|
||||
* In some cases, the translation of the key code will be a single
|
||||
* NUL byte, in which case looking at @length is necessary to distinguish
|
||||
* it from the an empty translation.
|
||||
* @hardware_keycode: the raw code of the key that was pressed or released.
|
||||
* @group: the keyboard group.
|
||||
* @is_modifier: a flag that indicates if @hardware_keycode is mapped to a
|
||||
* modifier. Since 2.10
|
||||
*
|
||||
* Describes a key press or key release event.
|
||||
*/
|
||||
struct _GdkEventKey
|
||||
{
|
||||
GdkEventType type;
|
||||
@@ -696,32 +357,6 @@ struct _GdkEventKey
|
||||
guint is_modifier : 1;
|
||||
};
|
||||
|
||||
/**
|
||||
* GdkEventCrossing:
|
||||
* @type: the type of the event (%GDK_ENTER_NOTIFY or %GDK_LEAVE_NOTIFY).
|
||||
* @window: the window which received the event.
|
||||
* @send_event: %TRUE if the event was sent explicitly (e.g. using
|
||||
* <function>XSendEvent</function>).
|
||||
* @subwindow: the window that was entered or left.
|
||||
* @time: the time of the event in milliseconds.
|
||||
* @x: the x coordinate of the pointer relative to the window.
|
||||
* @y: the y coordinate of the pointer relative to the window.
|
||||
* @x_root: the x coordinate of the pointer relative to the root of the screen.
|
||||
* @y_root: the y coordinate of the pointer relative to the root of the screen.
|
||||
* @mode: the crossing mode (%GDK_CROSSING_NORMAL, %GDK_CROSSING_GRAB,
|
||||
* %GDK_CROSSING_UNGRAB, %GDK_CROSSING_GTK_GRAB, %GDK_CROSSING_GTK_UNGRAB or
|
||||
* %GDK_CROSSING_STATE_CHANGED). %GDK_CROSSING_GTK_GRAB, %GDK_CROSSING_GTK_UNGRAB,
|
||||
* and %GDK_CROSSING_STATE_CHANGED were added in 2.14 and are always synthesized,
|
||||
* never native.
|
||||
* @detail: the kind of crossing that happened (%GDK_NOTIFY_INFERIOR,
|
||||
* %GDK_NOTIFY_ANCESTOR, %GDK_NOTIFY_VIRTUAL, %GDK_NOTIFY_NONLINEAR or
|
||||
* %GDK_NOTIFY_NONLINEAR_VIRTUAL).
|
||||
* @focus: %TRUE if @window is the focus window or an inferior.
|
||||
* @state: a bit-mask representing the state of the modifier keys (e.g. Control,
|
||||
* Shift and Alt) and the pointer buttons. See #GdkModifierType.
|
||||
*
|
||||
* Generated when the pointer enters or leaves a window.
|
||||
*/
|
||||
struct _GdkEventCrossing
|
||||
{
|
||||
GdkEventType type;
|
||||
@@ -739,17 +374,6 @@ struct _GdkEventCrossing
|
||||
guint state;
|
||||
};
|
||||
|
||||
/**
|
||||
* GdkEventFocus:
|
||||
* @type: the type of the event (%GDK_FOCUS_CHANGE).
|
||||
* @window: the window which received the event.
|
||||
* @send_event: %TRUE if the event was sent explicitly (e.g. using
|
||||
* <function>XSendEvent</function>).
|
||||
* @in: %TRUE if the window has gained the keyboard focus, %FALSE if
|
||||
* it has lost the focus.
|
||||
*
|
||||
* Describes a change of keyboard focus.
|
||||
*/
|
||||
struct _GdkEventFocus
|
||||
{
|
||||
GdkEventType type;
|
||||
@@ -758,19 +382,6 @@ struct _GdkEventFocus
|
||||
gint16 in;
|
||||
};
|
||||
|
||||
/**
|
||||
* GdkEventConfigure:
|
||||
* @type: the type of the event (%GDK_CONFIGURE).
|
||||
* @window: the window which received the event.
|
||||
* @send_event: %TRUE if the event was sent explicitly (e.g. using
|
||||
* <function>XSendEvent</function>).
|
||||
* @x: the new x coordinate of the window, relative to its parent.
|
||||
* @y: the new y coordinate of the window, relative to its parent.
|
||||
* @width: the new width of the window.
|
||||
* @height: the new height of the window.
|
||||
*
|
||||
* Generated when a window size or position has changed.
|
||||
*/
|
||||
struct _GdkEventConfigure
|
||||
{
|
||||
GdkEventType type;
|
||||
@@ -781,19 +392,6 @@ struct _GdkEventConfigure
|
||||
gint height;
|
||||
};
|
||||
|
||||
/**
|
||||
* GdkEventProperty:
|
||||
* @type: the type of the event (%GDK_PROPERTY_NOTIFY).
|
||||
* @window: the window which received the event.
|
||||
* @send_event: %TRUE if the event was sent explicitly (e.g. using
|
||||
* <function>XSendEvent</function>).
|
||||
* @atom: the property that was changed.
|
||||
* @time: the time of the event in milliseconds.
|
||||
* @state: whether the property was changed (%GDK_PROPERTY_NEW_VALUE) or
|
||||
* deleted (%GDK_PROPERTY_DELETE).
|
||||
*
|
||||
* Describes a property change on a window.
|
||||
*/
|
||||
struct _GdkEventProperty
|
||||
{
|
||||
GdkEventType type;
|
||||
@@ -804,22 +402,6 @@ struct _GdkEventProperty
|
||||
guint state;
|
||||
};
|
||||
|
||||
/**
|
||||
* GdkEventSelection:
|
||||
* @type: the type of the event (%GDK_SELECTION_CLEAR,
|
||||
* %GDK_SELECTION_NOTIFY or %GDK_SELECTION_REQUEST).
|
||||
* @window: the window which received the event.
|
||||
* @send_event: %TRUE if the event was sent explicitly (e.g. using
|
||||
* <function>XSendEvent</function>).
|
||||
* @selection: the selection.
|
||||
* @target: the target to which the selection should be converted.
|
||||
* @property: the property in which to place the result of the conversion.
|
||||
* @time: the time of the event in milliseconds.
|
||||
* @requestor: the native window on which to place @property.
|
||||
*
|
||||
* Generated when a selection is requested or ownership of a selection
|
||||
* is taken over by another client application.
|
||||
*/
|
||||
struct _GdkEventSelection
|
||||
{
|
||||
GdkEventType type;
|
||||
@@ -832,25 +414,6 @@ struct _GdkEventSelection
|
||||
GdkNativeWindow requestor;
|
||||
};
|
||||
|
||||
/**
|
||||
* GdkEventOwnerChange:
|
||||
* @type: the type of the event (%GDK_OWNER_CHANGE).
|
||||
* @window: the window which received the event.
|
||||
* @send_event: %TRUE if the event was sent explicitly (e.g. using
|
||||
* <function>XSendEvent</function>).
|
||||
* @owner: the new owner of the selection.
|
||||
* @reason: the reason for the ownership change as a #GdkOwnerChange value.
|
||||
* @selection: the atom identifying the selection.
|
||||
* @time: the timestamp of the event.
|
||||
* @selection_time: the time at which the selection ownership was taken
|
||||
* over.
|
||||
*
|
||||
* Generated when the owner of a selection changes. On X11, this
|
||||
* information is only available if the X server supports the XFIXES
|
||||
* extension.
|
||||
*
|
||||
* Since: 2.6
|
||||
*/
|
||||
struct _GdkEventOwnerChange
|
||||
{
|
||||
GdkEventType type;
|
||||
@@ -863,24 +426,9 @@ struct _GdkEventOwnerChange
|
||||
guint32 selection_time;
|
||||
};
|
||||
|
||||
/**
|
||||
* GdkEventProximity:
|
||||
* @type: the type of the event (%GDK_PROXIMITY_IN or %GDK_PROXIMITY_OUT).
|
||||
* @window: the window which received the event.
|
||||
* @send_event: %TRUE if the event was sent explicitly (e.g. using <function>XSendEvent</function>).
|
||||
* @time: the time of the event in milliseconds.
|
||||
* @device: the device where the event originated.
|
||||
*
|
||||
* Proximity events are generated when using GDK's wrapper for the
|
||||
* XInput extension. The XInput extension is an add-on for standard X
|
||||
* that allows you to use nonstandard devices such as graphics tablets.
|
||||
* A proximity event indicates that the stylus has moved in or out of
|
||||
* contact with the tablet, or perhaps that the user's finger has moved
|
||||
* in or out of contact with a touch screen.
|
||||
*
|
||||
* This event type will be used pretty rarely. It only is important for
|
||||
* XInput aware programs that are drawing their own cursor.
|
||||
*/
|
||||
/* This event type will be used pretty rarely. It only is important
|
||||
for XInput aware programs that are drawing their own cursor */
|
||||
|
||||
struct _GdkEventProximity
|
||||
{
|
||||
GdkEventType type;
|
||||
@@ -890,21 +438,6 @@ struct _GdkEventProximity
|
||||
GdkDevice *device;
|
||||
};
|
||||
|
||||
/**
|
||||
* GdkEventClient:
|
||||
* @type: the type of the event (%GDK_CLIENT_EVENT).
|
||||
* @window: the window which received the event.
|
||||
* @send_event: %TRUE if the event was sent explicitly (e.g. using
|
||||
* <function>XSendEvent</function>).
|
||||
* @message_type: the type of the message, which can be defined by the
|
||||
* application.
|
||||
* @data_format: the format of the data, given as the number of bits in each
|
||||
* data element, i.e. 8, 16, or 32. 8-bit data uses the b array of the
|
||||
* data union, 16-bit data uses the s array, and 32-bit data uses the l
|
||||
* array.
|
||||
*
|
||||
* An event sent by another client application.
|
||||
*/
|
||||
struct _GdkEventClient
|
||||
{
|
||||
GdkEventType type;
|
||||
@@ -919,18 +452,6 @@ struct _GdkEventClient
|
||||
} data;
|
||||
};
|
||||
|
||||
/**
|
||||
* GdkEventSetting:
|
||||
* @type: the type of the event (%GDK_SETTING).
|
||||
* @window: the window which received the event.
|
||||
* @send_event: %TRUE if the event was sent explicitly (e.g. using
|
||||
* <function>XSendEvent</function>).
|
||||
* @action: what happened to the setting (%GDK_SETTING_ACTION_NEW,
|
||||
* %GDK_SETTING_ACTION_CHANGED or %GDK_SETTING_ACTION_DELETED).
|
||||
* @name: the name of the setting.
|
||||
*
|
||||
* Generated when a setting is modified.
|
||||
*/
|
||||
struct _GdkEventSetting
|
||||
{
|
||||
GdkEventType type;
|
||||
@@ -940,18 +461,6 @@ struct _GdkEventSetting
|
||||
char *name;
|
||||
};
|
||||
|
||||
/**
|
||||
* GdkEventWindowState:
|
||||
* @type: the type of the event (%GDK_WINDOW_STATE).
|
||||
* @window: the window which received the event.
|
||||
* @send_event: %TRUE if the event was sent explicitly (e.g. using
|
||||
* <function>XSendEvent</function>).
|
||||
* @changed_mask: mask specifying what flags have changed.
|
||||
* @new_window_state: the new window state, a combination of
|
||||
* #GdkWindowState bits.
|
||||
*
|
||||
* Generated when the state of a toplevel window changes.
|
||||
*/
|
||||
struct _GdkEventWindowState
|
||||
{
|
||||
GdkEventType type;
|
||||
@@ -961,28 +470,6 @@ struct _GdkEventWindowState
|
||||
GdkWindowState new_window_state;
|
||||
};
|
||||
|
||||
/**
|
||||
* GdkEventGrabBroken:
|
||||
* @type: the type of the event (%GDK_GRAB_BROKEN)
|
||||
* @window: the window which received the event, i.e. the window
|
||||
* that previously owned the grab
|
||||
* @send_event: %TRUE if the event was sent explicitly (e.g. using
|
||||
* <function>XSendEvent</function>).
|
||||
* @keyboard: %TRUE if a keyboard grab was broken, %FALSE if a pointer
|
||||
* grab was broken
|
||||
* @implicit: %TRUE if the broken grab was implicit
|
||||
* @grab_window: If this event is caused by another grab in the same
|
||||
* application, @grab_window contains the new grab window. Otherwise
|
||||
* @grab_window is %NULL.
|
||||
*
|
||||
* Generated when a pointer or keyboard grab is broken. On X11, this happens
|
||||
* when the grab window becomes unviewable (i.e. it or one of its ancestors
|
||||
* is unmapped), or if the same application grabs the pointer or keyboard
|
||||
* again. Note that implicit grabs (which are initiated by button presses)
|
||||
* can also cause #GdkEventGrabBroken events.
|
||||
*
|
||||
* Since: 2.8
|
||||
*/
|
||||
struct _GdkEventGrabBroken {
|
||||
GdkEventType type;
|
||||
GdkWindow *window;
|
||||
@@ -992,23 +479,8 @@ struct _GdkEventGrabBroken {
|
||||
GdkWindow *grab_window;
|
||||
};
|
||||
|
||||
/**
|
||||
* GdkEventDND:
|
||||
* @type: the type of the event (%GDK_DRAG_ENTER, %GDK_DRAG_LEAVE,
|
||||
* %GDK_DRAG_MOTION, %GDK_DRAG_STATUS, %GDK_DROP_START or
|
||||
* %GDK_DROP_FINISHED).
|
||||
* @window: the window which received the event.
|
||||
* @send_event: %TRUE if the event was sent explicitly (e.g. using
|
||||
* <function>XSendEvent</function>).
|
||||
* @context: the #GdkDragContext for the current DND operation.
|
||||
* @time: the time of the event in milliseconds.
|
||||
* @x_root: the x coordinate of the pointer relative to the root of the
|
||||
* screen, only set for %GDK_DRAG_MOTION and %GDK_DROP_START.
|
||||
* @y_root: the y coordinate of the pointer relative to the root of the
|
||||
* screen, only set for %GDK_DRAG_MOTION and %GDK_DROP_START.
|
||||
*
|
||||
* Generated during DND operations.
|
||||
*/
|
||||
/* Event types for DND */
|
||||
|
||||
struct _GdkEventDND {
|
||||
GdkEventType type;
|
||||
GdkWindow *window;
|
||||
@@ -1019,46 +491,6 @@ struct _GdkEventDND {
|
||||
gshort x_root, y_root;
|
||||
};
|
||||
|
||||
/**
|
||||
* GdkEvent:
|
||||
*
|
||||
* The #GdkEvent struct contains a union of all of the event structs,
|
||||
* and allows access to the data fields in a number of ways.
|
||||
*
|
||||
* The event type is always the first field in all of the event structs, and
|
||||
* can always be accessed with the following code, no matter what type of
|
||||
* event it is:
|
||||
* <informalexample>
|
||||
* <programlisting>
|
||||
* GdkEvent *event;
|
||||
* GdkEventType type;
|
||||
*
|
||||
* type = event->type;
|
||||
* </programlisting>
|
||||
* </informalexample>
|
||||
*
|
||||
* To access other fields of the event structs, the pointer to the event
|
||||
* can be cast to the appropriate event struct pointer, or the union member
|
||||
* name can be used. For example if the event type is %GDK_BUTTON_PRESS
|
||||
* then the x coordinate of the button press can be accessed with:
|
||||
* <informalexample>
|
||||
* <programlisting>
|
||||
* GdkEvent *event;
|
||||
* gdouble x;
|
||||
*
|
||||
* x = ((GdkEventButton*)event)->x;
|
||||
* </programlisting>
|
||||
* </informalexample>
|
||||
* or:
|
||||
* <informalexample>
|
||||
* <programlisting>
|
||||
* GdkEvent *event;
|
||||
* gdouble x;
|
||||
*
|
||||
* x = event->button.x;
|
||||
* </programlisting>
|
||||
* </informalexample>
|
||||
*/
|
||||
union _GdkEvent
|
||||
{
|
||||
GdkEventType type;
|
||||
|
||||
@@ -59,15 +59,9 @@ struct _GdkColorInfo
|
||||
guint ref_count;
|
||||
};
|
||||
|
||||
typedef enum {
|
||||
GDK_EVENT_FILTER_REMOVED = 1 << 0
|
||||
} GdkEventFilterFlags;
|
||||
|
||||
struct _GdkEventFilter {
|
||||
GdkFilterFunc function;
|
||||
gpointer data;
|
||||
GdkEventFilterFlags flags;
|
||||
guint ref_count;
|
||||
};
|
||||
|
||||
struct _GdkClientFilter {
|
||||
|
||||
111
gdk/gdkkeys.c
111
gdk/gdkkeys.c
@@ -31,76 +31,6 @@
|
||||
#include "gdkdisplay.h"
|
||||
|
||||
|
||||
/**
|
||||
* SECTION:keys
|
||||
* @Short_description: Functions for manipulating keyboard codes
|
||||
* @Title: Key Values
|
||||
*
|
||||
* Key values are the codes which are sent whenever a key is pressed or released.
|
||||
* They appear in the #GdkEventKey.keyval field of the
|
||||
* #GdkEventKey structure, which is passed to signal handlers for the
|
||||
* #GtkWidget::key-press-event and #GtkWidget::key-release-event signals.
|
||||
* The complete list of key values can be found in the
|
||||
* <filename><gdk/gdkkeysyms.h></filename> header file.
|
||||
*
|
||||
* Key values are regularly updated from the upstream X.org X11 implementation,
|
||||
* so new values are added regularly. They will be prefixed with GDK_KEY_ rather
|
||||
* than XF86XK_ or XK_ (for older symbols).
|
||||
*
|
||||
* Key values can be converted into a string representation using
|
||||
* gdk_keyval_name(). The reverse function, converting a string to a key value,
|
||||
* is provided by gdk_keyval_from_name().
|
||||
*
|
||||
* The case of key values can be determined using gdk_keyval_is_upper() and
|
||||
* gdk_keyval_is_lower(). Key values can be converted to upper or lower case
|
||||
* using gdk_keyval_to_upper() and gdk_keyval_to_lower().
|
||||
*
|
||||
* When it makes sense, key values can be converted to and from
|
||||
* Unicode characters with gdk_keyval_to_unicode() and gdk_unicode_to_keyval().
|
||||
*
|
||||
* <para id="key-group-explanation">
|
||||
* One #GdkKeymap object exists for each user display. gdk_keymap_get_default()
|
||||
* returns the #GdkKeymap for the default display; to obtain keymaps for other
|
||||
* displays, use gdk_keymap_get_for_display(). A keymap
|
||||
* is a mapping from #GdkKeymapKey to key values. You can think of a #GdkKeymapKey
|
||||
* as a representation of a symbol printed on a physical keyboard key. That is, it
|
||||
* contains three pieces of information. First, it contains the hardware keycode;
|
||||
* this is an identifying number for a physical key. Second, it contains the
|
||||
* <firstterm>level</firstterm> of the key. The level indicates which symbol on the
|
||||
* key will be used, in a vertical direction. So on a standard US keyboard, the key
|
||||
* with the number "1" on it also has the exclamation point ("!") character on
|
||||
* it. The level indicates whether to use the "1" or the "!" symbol. The letter
|
||||
* keys are considered to have a lowercase letter at level 0, and an uppercase
|
||||
* letter at level 1, though only the uppercase letter is printed. Third, the
|
||||
* #GdkKeymapKey contains a group; groups are not used on standard US keyboards,
|
||||
* but are used in many other countries. On a keyboard with groups, there can be 3
|
||||
* or 4 symbols printed on a single key. The group indicates movement in a
|
||||
* horizontal direction. Usually groups are used for two different languages. In
|
||||
* group 0, a key might have two English characters, and in group 1 it might have
|
||||
* two Hebrew characters. The Hebrew characters will be printed on the key next to
|
||||
* the English characters.
|
||||
* </para>
|
||||
*
|
||||
* In order to use a keymap to interpret a key event, it's necessary to first
|
||||
* convert the keyboard state into an effective group and level. This is done via a
|
||||
* set of rules that varies widely according to type of keyboard and user
|
||||
* configuration. The function gdk_keymap_translate_keyboard_state() accepts a
|
||||
* keyboard state -- consisting of hardware keycode pressed, active modifiers, and
|
||||
* active group -- applies the appropriate rules, and returns the group/level to be
|
||||
* used to index the keymap, along with the modifiers which did not affect the
|
||||
* group and level. i.e. it returns "unconsumed modifiers." The keyboard group may
|
||||
* differ from the effective group used for keymap lookups because some keys don't
|
||||
* have multiple groups - e.g. the Enter key is always in group 0 regardless of
|
||||
* keyboard state.
|
||||
*
|
||||
* Note that gdk_keymap_translate_keyboard_state() also returns the keyval, i.e. it
|
||||
* goes ahead and performs the keymap lookup in addition to telling you which
|
||||
* effective group/level values were used for the lookup. #GdkEventKey already
|
||||
* contains this keyval, however, so you don't normally need to call
|
||||
* gdk_keymap_translate_keyboard_state() just to get the keyval.
|
||||
*/
|
||||
|
||||
|
||||
enum {
|
||||
DIRECTION_CHANGED,
|
||||
KEYS_CHANGED,
|
||||
@@ -325,15 +255,6 @@ gdk_keyval_convert_case (guint symbol,
|
||||
}
|
||||
#endif
|
||||
|
||||
/**
|
||||
* gdk_keyval_to_upper:
|
||||
* @keyval: a key value.
|
||||
*
|
||||
* Converts a key value to upper case, if applicable.
|
||||
*
|
||||
* Returns: the upper case form of @keyval, or @keyval itself if it is already
|
||||
* in upper case or it is not subject to case conversion.
|
||||
*/
|
||||
guint
|
||||
gdk_keyval_to_upper (guint keyval)
|
||||
{
|
||||
@@ -344,15 +265,6 @@ gdk_keyval_to_upper (guint keyval)
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* gdk_keyval_to_lower:
|
||||
* @keyval: a key value.
|
||||
*
|
||||
* Converts a key value to lower case, if applicable.
|
||||
*
|
||||
* Returns: the lower case form of @keyval, or @keyval itself if it is already
|
||||
* in lower case or it is not subject to case conversion.
|
||||
*/
|
||||
guint
|
||||
gdk_keyval_to_lower (guint keyval)
|
||||
{
|
||||
@@ -363,15 +275,6 @@ gdk_keyval_to_lower (guint keyval)
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* gdk_keyval_is_upper:
|
||||
* @keyval: a key value.
|
||||
*
|
||||
* Returns %TRUE if the given key value is in upper case.
|
||||
*
|
||||
* Returns: %TRUE if @keyval is in upper case, or if @keyval is not subject to
|
||||
* case conversion.
|
||||
*/
|
||||
gboolean
|
||||
gdk_keyval_is_upper (guint keyval)
|
||||
{
|
||||
@@ -385,15 +288,6 @@ gdk_keyval_is_upper (guint keyval)
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
/**
|
||||
* gdk_keyval_is_lower:
|
||||
* @keyval: a key value.
|
||||
*
|
||||
* Returns %TRUE if the given key value is in lower case.
|
||||
*
|
||||
* Returns: %TRUE if @keyval is in lower case, or if @keyval is not
|
||||
* subject to case conversion.
|
||||
*/
|
||||
gboolean
|
||||
gdk_keyval_is_lower (guint keyval)
|
||||
{
|
||||
@@ -409,11 +303,10 @@ gdk_keyval_is_lower (guint keyval)
|
||||
|
||||
/**
|
||||
* gdk_keymap_get_default:
|
||||
* @returns: the #GdkKeymap attached to the default display.
|
||||
*
|
||||
* Returns the #GdkKeymap attached to the default display.
|
||||
*
|
||||
* Returns: (transfer none): the #GdkKeymap attached to the default display.
|
||||
*/
|
||||
**/
|
||||
GdkKeymap*
|
||||
gdk_keymap_get_default (void)
|
||||
{
|
||||
|
||||
@@ -35,26 +35,9 @@
|
||||
|
||||
G_BEGIN_DECLS
|
||||
|
||||
|
||||
typedef struct _GdkKeymapKey GdkKeymapKey;
|
||||
|
||||
/**
|
||||
* GdkKeymapKey:
|
||||
* @keycode: the hardware keycode. This is an identifying number for a
|
||||
* physical key.
|
||||
* @group: indicates movement in a horizontal direction. Usually groups are used
|
||||
* for two different languages. In group 0, a key might have two English
|
||||
* characters, and in group 1 it might have two Hebrew characters. The Hebrew
|
||||
* characters will be printed on the key next to the English characters.
|
||||
* @level: indicates which symbol on the key will be used, in a vertical direction.
|
||||
* So on a standard US keyboard, the key with the number "1" on it also has the
|
||||
* exclamation point ("!") character on it. The level indicates whether to use
|
||||
* the "1" or the "!" symbol. The letter keys are considered to have a lowercase
|
||||
* letter at level 0, and an uppercase letter at level 1, though only the
|
||||
* uppercase letter is printed.
|
||||
*
|
||||
* A #GdkKeymapKey is a hardware key that can be mapped to a keyval.
|
||||
*/
|
||||
/* GdkKeymapKey is a hardware key that can be mapped to a keyval */
|
||||
struct _GdkKeymapKey
|
||||
{
|
||||
guint keycode;
|
||||
@@ -62,6 +45,16 @@ struct _GdkKeymapKey
|
||||
gint level;
|
||||
};
|
||||
|
||||
/* A GdkKeymap defines the translation from keyboard state
|
||||
* (including a hardware key, a modifier mask, and active keyboard group)
|
||||
* to a keyval. This translation has two phases. The first phase is
|
||||
* to determine the effective keyboard group and level for the keyboard
|
||||
* state; the second phase is to look up the keycode/group/level triplet
|
||||
* in the keymap and see what keyval it corresponds to.
|
||||
*/
|
||||
|
||||
typedef struct _GdkKeymap GdkKeymap;
|
||||
typedef struct _GdkKeymapClass GdkKeymapClass;
|
||||
|
||||
#define GDK_TYPE_KEYMAP (gdk_keymap_get_type ())
|
||||
#define GDK_KEYMAP(object) (G_TYPE_CHECK_INSTANCE_CAST ((object), GDK_TYPE_KEYMAP, GdkKeymap))
|
||||
@@ -70,19 +63,6 @@ struct _GdkKeymapKey
|
||||
#define GDK_IS_KEYMAP_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GDK_TYPE_KEYMAP))
|
||||
#define GDK_KEYMAP_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GDK_TYPE_KEYMAP, GdkKeymapClass))
|
||||
|
||||
typedef struct _GdkKeymap GdkKeymap;
|
||||
typedef struct _GdkKeymapClass GdkKeymapClass;
|
||||
|
||||
/**
|
||||
* GdkKeymap:
|
||||
*
|
||||
* A #GdkKeymap defines the translation from keyboard state
|
||||
* (including a hardware key, a modifier mask, and active keyboard group)
|
||||
* to a keyval. This translation has two phases. The first phase is
|
||||
* to determine the effective keyboard group and level for the keyboard
|
||||
* state; the second phase is to look up the keycode/group/level triplet
|
||||
* in the keymap and see what keyval it corresponds to.
|
||||
*/
|
||||
struct _GdkKeymap
|
||||
{
|
||||
GObject parent_instance;
|
||||
@@ -125,16 +105,6 @@ gboolean gdk_keymap_get_entries_for_keycode (GdkKeymap *keymap,
|
||||
GdkKeymapKey **keys,
|
||||
guint **keyvals,
|
||||
gint *n_entries);
|
||||
|
||||
/**
|
||||
* gdk_keymap_get_direction:
|
||||
* @keymap: a #GdkKeymap or %NULL to use the default keymap.
|
||||
*
|
||||
* Returns the direction of the keymap.
|
||||
*
|
||||
* Returns: the direction of the keymap, %PANGO_DIRECTION_LTR or
|
||||
* %PANGO_DIRECTION_RTL.
|
||||
*/
|
||||
PangoDirection gdk_keymap_get_direction (GdkKeymap *keymap);
|
||||
gboolean gdk_keymap_have_bidi_layouts (GdkKeymap *keymap);
|
||||
gboolean gdk_keymap_get_caps_lock_state (GdkKeymap *keymap);
|
||||
@@ -147,16 +117,6 @@ gboolean gdk_keymap_map_virtual_modifiers (GdkKeymap *keymap,
|
||||
/* Key values
|
||||
*/
|
||||
gchar* gdk_keyval_name (guint keyval) G_GNUC_CONST;
|
||||
|
||||
/**
|
||||
* gdk_keyval_from_name:
|
||||
* @keyval_name: a key name.
|
||||
*
|
||||
* Converts a key name to a key value.
|
||||
*
|
||||
* Returns: the corresponding key value, or %GDK_VoidSymbol if the key name is
|
||||
* not a valid key.
|
||||
*/
|
||||
guint gdk_keyval_from_name (const gchar *keyval_name);
|
||||
void gdk_keyval_convert_case (guint symbol,
|
||||
guint *lower,
|
||||
|
||||
@@ -50,27 +50,6 @@ gboolean gdk_init_check (gint *argc,
|
||||
void gdk_add_option_entries_libgtk_only (GOptionGroup *group);
|
||||
void gdk_pre_parse_libgtk_only (void);
|
||||
|
||||
/**
|
||||
* gdk_set_locale:
|
||||
*
|
||||
* Initializes the support for internationalization by calling the <function>setlocale()</function>
|
||||
* system call. This function is called by gtk_set_locale() and so GTK+
|
||||
* applications should use that instead.
|
||||
*
|
||||
* The locale to use is determined by the <envar>LANG</envar> environment variable,
|
||||
* so to run an application in a certain locale you can do something like this:
|
||||
* <informalexample>
|
||||
* <programlisting>
|
||||
* export LANG="fr"
|
||||
* ... run application ...
|
||||
* </programlisting>
|
||||
* </informalexample>
|
||||
*
|
||||
* If the locale is not supported by X then it is reset to the standard "C"
|
||||
* locale.
|
||||
*
|
||||
* Returns: the resulting locale.
|
||||
*/
|
||||
gchar* gdk_set_locale (void);
|
||||
void gdk_enable_multidevice (void);
|
||||
|
||||
@@ -89,15 +68,6 @@ void gdk_error_trap_pop_ignored (void);
|
||||
|
||||
|
||||
G_CONST_RETURN gchar *gdk_get_display_arg_name (void);
|
||||
|
||||
/**
|
||||
* 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.
|
||||
*/
|
||||
gchar* gdk_get_display (void);
|
||||
|
||||
#ifndef GDK_MULTIDEVICE_SAFE
|
||||
@@ -132,13 +102,6 @@ void gdk_beep (void);
|
||||
|
||||
#endif /* GDK_MULTIHEAD_SAFE */
|
||||
|
||||
/**
|
||||
* gdk_flush:
|
||||
*
|
||||
* Flushes the X output buffer and waits until all requests have been processed
|
||||
* by the server. This is rarely needed by applications. It's main use is for
|
||||
* trapping X errors with gdk_error_trap_push() and gdk_error_trap_pop().
|
||||
*/
|
||||
void gdk_flush (void);
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
@@ -703,8 +703,8 @@ gdk_offscreen_window_set_embedder (GdkWindow *window,
|
||||
*
|
||||
* Gets the window that @window is embedded in.
|
||||
*
|
||||
* Returns: (transfer none): the embedding #GdkWindow, or %NULL
|
||||
* if @window is not an mbedded offscreen window
|
||||
* Returns: the embedding #GdkWindow, or %NULL if @window is not an
|
||||
* embedded offscreen window
|
||||
*
|
||||
* Since: 2.18
|
||||
*/
|
||||
|
||||
103
gdk/gdkpango.c
103
gdk/gdkpango.c
@@ -27,105 +27,6 @@
|
||||
#include <math.h>
|
||||
#include <pango/pangocairo.h>
|
||||
|
||||
|
||||
/**
|
||||
* SECTION:pango_interaction
|
||||
* @Short_description: Using Pango in GDK
|
||||
* @Title: Pango Interaction
|
||||
*
|
||||
* Pango is the text layout system used by GDK and GTK+. The functions
|
||||
* and types in this section are used to obtain clip regions for
|
||||
* #PangoLayouts, and to get #PangoContexts that can be used with
|
||||
* GDK.
|
||||
*
|
||||
* Creating a #PangoLayout object is the first step in rendering text,
|
||||
* and requires getting a handle to a #PangoContext. For GTK+ programs,
|
||||
* you'll usually want to use gtk_widget_get_pango_context(), or
|
||||
* gtk_widget_create_pango_layout(), rather than using the lowlevel
|
||||
* gdk_pango_context_get_for_screen(). Once you have a #PangoLayout, you
|
||||
* can set the text and attributes of it with Pango functions like
|
||||
* pango_layout_set_text() and get its size with pango_layout_get_size().
|
||||
* (Note that Pango uses a fixed point system internally, so converting
|
||||
* between Pango units and pixels using <link
|
||||
* linkend="PANGO-SCALE-CAPS">PANGO_SCALE</link> or the PANGO_PIXELS() macro.)
|
||||
*
|
||||
* Rendering a Pango layout is done most simply with pango_cairo_show_layout();
|
||||
* you can also draw pieces of the layout with pango_cairo_show_layout_line().
|
||||
* <example id="rotated-example">
|
||||
* <title>Draw transformed text with Pango and cairo</title>
|
||||
* <!-- Note that this example is basically the same as
|
||||
* demos/gtk-demo/rotated_text.c -->
|
||||
* <programlisting>
|
||||
* #define RADIUS 100
|
||||
* #define N_WORDS 10
|
||||
* #define FONT "Sans Bold 18"
|
||||
*
|
||||
* PangoContext *context;
|
||||
* PangoLayout *layout;
|
||||
* PangoFontDescription *desc;
|
||||
*
|
||||
* double radius;
|
||||
* int width, height;
|
||||
* int i;
|
||||
*
|
||||
* /<!---->* Set up a transformation matrix so that the user space coordinates for
|
||||
* * where we are drawing are [-RADIUS, RADIUS], [-RADIUS, RADIUS]
|
||||
* * We first center, then change the scale *<!---->/
|
||||
*
|
||||
* width = gdk_window_get_width (window);
|
||||
* height = gdk_window_get_height (window);
|
||||
* radius = MIN (width, height) / 2.;
|
||||
*
|
||||
* cairo_translate (cr,
|
||||
* radius + (width - 2 * radius) / 2,
|
||||
* radius + (height - 2 * radius) / 2);
|
||||
* cairo_scale (cr, radius / RADIUS, radius / RADIUS);
|
||||
*
|
||||
* /<!---->* Create a PangoLayout, set the font and text *<!---->/
|
||||
* context = gdk_pango_context_get_for_screen (screen);
|
||||
* layout = pango_layout_new (context);
|
||||
* pango_layout_set_text (layout, "Text", -1);
|
||||
* desc = pango_font_description_from_string (FONT);
|
||||
* pango_layout_set_font_description (layout, desc);
|
||||
* pango_font_description_free (desc);
|
||||
*
|
||||
* /<!---->* Draw the layout N_WORDS times in a circle *<!---->/
|
||||
* for (i = 0; i < N_WORDS; i++)
|
||||
* {
|
||||
* double red, green, blue;
|
||||
* double angle = 2 * G_PI * i / n_words;
|
||||
*
|
||||
* cairo_save (cr);
|
||||
*
|
||||
* /<!---->* Gradient from red at angle == 60 to blue at angle == 300 *<!---->/
|
||||
* red = (1 + cos (angle - 60)) / 2;
|
||||
* green = 0;
|
||||
* blue = 1 - red;
|
||||
*
|
||||
* cairo_set_source_rgb (cr, red, green, blue);
|
||||
* cairo_rotate (cr, angle);
|
||||
*
|
||||
* /<!---->* Inform Pango to re-layout the text with the new transformation matrix *<!---->/
|
||||
* pango_cairo_update_layout (cr, layout);
|
||||
*
|
||||
* pango_layout_get_size (layout, &width, &height);
|
||||
*
|
||||
* cairo_move_to (cr, - width / 2 / PANGO_SCALE, - DEFAULT_TEXT_RADIUS);
|
||||
* pango_cairo_show_layout (cr, layout);
|
||||
*
|
||||
* cairo_restore (cr);
|
||||
* }
|
||||
*
|
||||
* g_object_unref (layout);
|
||||
* g_object_unref (context);
|
||||
* </programlisting>
|
||||
* </example>
|
||||
* <figure>
|
||||
* <title>Output of <xref linkend="rotated-example"/></title>
|
||||
* <graphic fileref="rotated-text.png" format="PNG"/>
|
||||
* </figure>
|
||||
*/
|
||||
|
||||
/* Get a clip region to draw only part of a layout. index_ranges
|
||||
* contains alternating range starts/stops. The region is the
|
||||
* region which contains the given ranges, i.e. if you draw with the
|
||||
@@ -317,7 +218,7 @@ gdk_pango_layout_get_clip_region (PangoLayout *layout,
|
||||
* is more convenient if you want to keep a context around and track
|
||||
* changes to the screen's font rendering settings.
|
||||
*
|
||||
* Return value: (transfer full): a new #PangoContext for the default display
|
||||
* Return value: a new #PangoContext for the default display
|
||||
**/
|
||||
PangoContext *
|
||||
gdk_pango_context_get (void)
|
||||
@@ -343,7 +244,7 @@ gdk_pango_context_get (void)
|
||||
* is more convenient if you want to keep a context around and track
|
||||
* changes to the screen's font rendering settings.
|
||||
*
|
||||
* Return value: (transfer full): a new #PangoContext for @screen
|
||||
* Return value: a new #PangoContext for @screen
|
||||
*
|
||||
* Since: 2.2
|
||||
**/
|
||||
|
||||
@@ -35,16 +35,6 @@
|
||||
|
||||
G_BEGIN_DECLS
|
||||
|
||||
|
||||
/**
|
||||
* GdkPropMode:
|
||||
* @GDK_PROP_MODE_REPLACE: the new data replaces the existing data.
|
||||
* @GDK_PROP_MODE_PREPEND: the new data is prepended to the existing data.
|
||||
* @GDK_PROP_MODE_APPEND: the new data is appended to the existing data.
|
||||
*
|
||||
* Describes how existing data is combined with new data when
|
||||
* using gdk_property_change().
|
||||
*/
|
||||
typedef enum
|
||||
{
|
||||
GDK_PROP_MODE_REPLACE,
|
||||
@@ -52,13 +42,11 @@ typedef enum
|
||||
GDK_PROP_MODE_APPEND
|
||||
} GdkPropMode;
|
||||
|
||||
|
||||
GdkAtom gdk_atom_intern (const gchar *atom_name,
|
||||
gboolean only_if_exists);
|
||||
GdkAtom gdk_atom_intern_static_string (const gchar *atom_name);
|
||||
gchar* gdk_atom_name (GdkAtom atom);
|
||||
|
||||
|
||||
gboolean gdk_property_get (GdkWindow *window,
|
||||
GdkAtom property,
|
||||
GdkAtom type,
|
||||
@@ -78,7 +66,6 @@ void gdk_property_change (GdkWindow *window,
|
||||
gint nelements);
|
||||
void gdk_property_delete (GdkWindow *window,
|
||||
GdkAtom property);
|
||||
|
||||
#ifndef GDK_MULTIHEAD_SAFE
|
||||
gint gdk_text_property_to_text_list (GdkAtom encoding,
|
||||
gint format,
|
||||
@@ -100,7 +87,7 @@ gint gdk_string_to_compound_text (const gchar *str,
|
||||
gint *format,
|
||||
guchar **ctext,
|
||||
gint *length);
|
||||
#endif /* GDK_MULTIHEAD_SAFE */
|
||||
#endif
|
||||
|
||||
gint gdk_text_property_to_text_list_for_display (GdkDisplay *display,
|
||||
GdkAtom encoding,
|
||||
|
||||
@@ -45,8 +45,6 @@ G_DEFINE_BOXED_TYPE (GdkRGBA, gdk_rgba,
|
||||
* through gdk_rgba_free().
|
||||
*
|
||||
* Returns: A newly allocated #GdkRGBA
|
||||
*
|
||||
* Since: 3.0
|
||||
**/
|
||||
GdkRGBA *
|
||||
gdk_rgba_copy (GdkRGBA *rgba)
|
||||
@@ -67,8 +65,6 @@ gdk_rgba_copy (GdkRGBA *rgba)
|
||||
* @rgba: a #GdkRGBA
|
||||
*
|
||||
* Frees a #GdkRGBA struct created with gdk_rgba_copy()
|
||||
*
|
||||
* Since: 3.0
|
||||
**/
|
||||
void
|
||||
gdk_rgba_free (GdkRGBA *rgba)
|
||||
@@ -115,8 +111,8 @@ parse_rgb_value (const char *str,
|
||||
|
||||
/**
|
||||
* gdk_rgba_parse:
|
||||
* @rgba: the #GdkRGBA struct to fill in
|
||||
* @spec: the string specifying the color
|
||||
* @rgba: the #GdkRGBA struct to fill in
|
||||
*
|
||||
* Parses a textual representation of a color, filling in
|
||||
* the <structfield>red</structfield>, <structfield>green</structfield>,
|
||||
@@ -146,12 +142,10 @@ parse_rgb_value (const char *str,
|
||||
* a is a floating point value in the range 0 to 1.
|
||||
*
|
||||
* Returns: %TRUE if the parsing succeeded
|
||||
*
|
||||
* Since: 3.0
|
||||
**/
|
||||
gboolean
|
||||
gdk_rgba_parse (GdkRGBA *rgba,
|
||||
const gchar *spec)
|
||||
gdk_rgba_parse (const gchar *spec,
|
||||
GdkRGBA *rgba)
|
||||
{
|
||||
gboolean has_alpha;
|
||||
gdouble r, g, b, a;
|
||||
@@ -258,8 +252,6 @@ gdk_rgba_parse (GdkRGBA *rgba,
|
||||
* table that stores #GdkRGBA<!-- -->s.
|
||||
*
|
||||
* Return value: The hash function applied to @p
|
||||
*
|
||||
* Since: 3.0
|
||||
**/
|
||||
guint
|
||||
gdk_rgba_hash (gconstpointer p)
|
||||
@@ -280,8 +272,6 @@ gdk_rgba_hash (gconstpointer p)
|
||||
* Compares two RGBA colors.
|
||||
*
|
||||
* Return value: %TRUE if the two colors compare equal
|
||||
*
|
||||
* Since: 3.0
|
||||
**/
|
||||
gboolean
|
||||
gdk_rgba_equal (gconstpointer p1,
|
||||
@@ -314,8 +304,6 @@ gdk_rgba_equal (gconstpointer p1,
|
||||
* (These string forms are string forms those supported by the CSS3 colors module)
|
||||
*
|
||||
* Returns: A newly allocated text string
|
||||
*
|
||||
* Since: 3.0
|
||||
**/
|
||||
gchar *
|
||||
gdk_rgba_to_string (const GdkRGBA *rgba)
|
||||
|
||||
@@ -48,8 +48,8 @@ struct _GdkRGBA
|
||||
GdkRGBA * gdk_rgba_copy (GdkRGBA *rgba);
|
||||
void gdk_rgba_free (GdkRGBA *rgba);
|
||||
|
||||
gboolean gdk_rgba_parse (GdkRGBA *rgba,
|
||||
const gchar *spec);
|
||||
gboolean gdk_rgba_parse (const gchar *spec,
|
||||
GdkRGBA *rgba);
|
||||
|
||||
guint gdk_rgba_hash (gconstpointer p);
|
||||
gboolean gdk_rgba_equal (gconstpointer p1,
|
||||
|
||||
@@ -30,22 +30,6 @@
|
||||
#include "gdkintl.h"
|
||||
|
||||
|
||||
/**
|
||||
* SECTION:gdkscreen
|
||||
* @Short_description: Object representing a physical screen
|
||||
* @Title: GdkScreen
|
||||
*
|
||||
* #GdkScreen objects are the GDK representation of a physical screen. It is used
|
||||
* throughout GDK and GTK+ to specify which screen the top level windows
|
||||
* are to be displayed on.
|
||||
* It is also used to query the screen specification and default settings such as
|
||||
* the screen width (gdk_screen_get_width()), etc.
|
||||
*
|
||||
* Note that a screen may consist of multiple monitors which are merged to
|
||||
* form a large screen area.
|
||||
*/
|
||||
|
||||
|
||||
static void gdk_screen_finalize (GObject *object);
|
||||
static void gdk_screen_set_property (GObject *object,
|
||||
guint prop_id,
|
||||
|
||||
@@ -43,15 +43,6 @@ typedef struct _GdkScreenClass GdkScreenClass;
|
||||
#define GDK_IS_SCREEN_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GDK_TYPE_SCREEN))
|
||||
#define GDK_SCREEN_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GDK_TYPE_SCREEN, GdkScreenClass))
|
||||
|
||||
/**
|
||||
* GdkScreen:
|
||||
*
|
||||
* This is a currently just a placeholder typedef for the first argument of
|
||||
* the #GdkPointerHooks.window_at_pointer function in #GdkPointerHooks.
|
||||
* It will be used when GDK gets multihead support.
|
||||
*
|
||||
* Since: 2.2
|
||||
*/
|
||||
struct _GdkScreen
|
||||
{
|
||||
GObject parent_instance;
|
||||
|
||||
@@ -32,54 +32,6 @@
|
||||
#include "gdkdisplay.h"
|
||||
|
||||
|
||||
/**
|
||||
* SECTION:selections
|
||||
* @Short_description: Functions for transfering data via the X selection mechanism
|
||||
* @Title: Selections
|
||||
*
|
||||
* The X selection mechanism provides a way to transfer arbitrary chunks of
|
||||
* data between programs. A <firstterm>selection</firstterm> is a essentially
|
||||
* a named clipboard, identified by a string interned as a #GdkAtom. By
|
||||
* claiming ownership of a selection, an application indicates that it will
|
||||
* be responsible for supplying its contents. The most common selections are
|
||||
* <literal>PRIMARY</literal> and <literal>CLIPBOARD</literal>.
|
||||
*
|
||||
* The contents of a selection can be represented in a number of formats,
|
||||
* called <firstterm>targets</firstterm>. Each target is identified by an atom.
|
||||
* A list of all possible targets supported by the selection owner can be
|
||||
* retrieved by requesting the special target <literal>TARGETS</literal>. When
|
||||
* a selection is retrieved, the data is accompanied by a type (an atom), and
|
||||
* a format (an integer, representing the number of bits per item).
|
||||
* See <link linkend="gdk-Properties-and-Atoms">Properties and Atoms</link>
|
||||
* for more information.
|
||||
*
|
||||
* The functions in this section only contain the lowlevel parts of the
|
||||
* selection protocol. A considerably more complicated implementation is needed
|
||||
* on top of this. GTK+ contains such an implementation in the functions in
|
||||
* <literal>gtkselection.h</literal> and programmers should use those functions
|
||||
* instead of the ones presented here. If you plan to implement selection
|
||||
* handling directly on top of the functions here, you should refer to the
|
||||
* X Inter-client Communication Conventions Manual (ICCCM).
|
||||
*/
|
||||
|
||||
/**
|
||||
* gdk_selection_owner_set:
|
||||
* @owner: a #GdkWindow or %NULL to indicate that the
|
||||
* the owner for the given should be unset.
|
||||
* @selection: an atom identifying a selection.
|
||||
* @time_: timestamp to use when setting the selection.
|
||||
* If this is older than the timestamp given last
|
||||
* time the owner was set for the given selection, the
|
||||
* request will be ignored.
|
||||
* @send_event: if %TRUE, and the new owner is different
|
||||
* from the current owner, the current owner
|
||||
* will be sent a SelectionClear event.
|
||||
*
|
||||
* Sets the owner of the given selection.
|
||||
*
|
||||
* Returns: %TRUE if the selection owner was successfully
|
||||
* changed to @owner, otherwise %FALSE.
|
||||
*/
|
||||
gboolean
|
||||
gdk_selection_owner_set (GdkWindow *owner,
|
||||
GdkAtom selection,
|
||||
@@ -91,21 +43,6 @@ gdk_selection_owner_set (GdkWindow *owner,
|
||||
time, send_event);
|
||||
}
|
||||
|
||||
/**
|
||||
* gdk_selection_owner_get:
|
||||
* @selection: an atom indentifying a selection.
|
||||
*
|
||||
* Determines the owner of the given selection.
|
||||
*
|
||||
* Returns: (transfer none): if there is a selection owner for
|
||||
* this window, and it is a window known to the current
|
||||
* process, the #GdkWindow that owns the selection, otherwise
|
||||
* %NULL. Note that the return value may be owned
|
||||
* by a different process if a foreign window
|
||||
* was previously created for that window, but
|
||||
* a new foreign window will never be created by
|
||||
* this call.
|
||||
*/
|
||||
GdkWindow*
|
||||
gdk_selection_owner_get (GdkAtom selection)
|
||||
{
|
||||
@@ -113,18 +50,6 @@ gdk_selection_owner_get (GdkAtom selection)
|
||||
selection);
|
||||
}
|
||||
|
||||
/**
|
||||
* gdk_selection_send_notify:
|
||||
* @requestor: window to which to deliver response.
|
||||
* @selection: selection that was requested.
|
||||
* @target: target that was selected.
|
||||
* @property: property in which the selection owner stored the
|
||||
* data, or %GDK_NONE to indicate that the request
|
||||
* was rejected.
|
||||
* @time_: timestamp.
|
||||
*
|
||||
* Sends a response to SelectionRequest event.
|
||||
*/
|
||||
void
|
||||
gdk_selection_send_notify (GdkNativeWindow requestor,
|
||||
GdkAtom selection,
|
||||
@@ -137,27 +62,6 @@ gdk_selection_send_notify (GdkNativeWindow requestor,
|
||||
target, property, time);
|
||||
}
|
||||
|
||||
/**
|
||||
* gdk_text_property_to_text_list:
|
||||
* @encoding: an atom representing the encoding. The most common
|
||||
* values for this are <literal>STRING</literal>,
|
||||
* or <literal>COMPOUND_TEXT</literal>. This is
|
||||
* value used as the type for the property.
|
||||
* @format: the format of the property.
|
||||
* @text: the text data.
|
||||
* @length: the length of the property, in items.
|
||||
* @list: location to store a terminated array of strings
|
||||
* in the encoding of the current locale. This
|
||||
* array should be freed using gdk_free_text_list().
|
||||
*
|
||||
* Converts a text string from the encoding as it is stored in
|
||||
* a property into an array of strings in the encoding of
|
||||
* the current local. (The elements of the array represent
|
||||
* the nul-separated elements of the original text string.)
|
||||
*
|
||||
* Returns: the number of strings stored in @list, or 0,
|
||||
* if the conversion failed.
|
||||
*/
|
||||
gint
|
||||
gdk_text_property_to_text_list (GdkAtom encoding,
|
||||
gint format,
|
||||
@@ -195,20 +99,6 @@ gdk_text_property_to_utf8_list (GdkAtom encoding,
|
||||
encoding, format, text, length, list);
|
||||
}
|
||||
|
||||
/**
|
||||
* gdk_string_to_compound_text:
|
||||
* @str: a nul-terminated string.
|
||||
* @encoding: location to store the encoding atom (to be used as
|
||||
* the type for the property).
|
||||
* @format: location to store the format for the property.
|
||||
* @ctext: location to store newly allocated data for the property.
|
||||
* @length: location to store the length of @ctext in items.
|
||||
*
|
||||
* Converts a string from the encoding of the current locale
|
||||
* into a form suitable for storing in a window property.
|
||||
*
|
||||
* Returns: 0 upon sucess, non-zero upon failure.
|
||||
*/
|
||||
gint
|
||||
gdk_string_to_compound_text (const gchar *str,
|
||||
GdkAtom *encoding,
|
||||
|
||||
@@ -38,116 +38,21 @@ G_BEGIN_DECLS
|
||||
/* Predefined atoms relating to selections. In general, one will need to use
|
||||
* gdk_intern_atom
|
||||
*/
|
||||
/**
|
||||
* GDK_SELECTION_PRIMARY:
|
||||
*
|
||||
* A #GdkAtom representing the <literal>PRIMARY</literal> selection.
|
||||
*/
|
||||
#define GDK_SELECTION_PRIMARY _GDK_MAKE_ATOM (1)
|
||||
|
||||
/**
|
||||
* GDK_SELECTION_SECONDARY:
|
||||
*
|
||||
* A #GdkAtom representing the <literal>SECONDARY</literal> selection.
|
||||
*/
|
||||
#define GDK_SELECTION_SECONDARY _GDK_MAKE_ATOM (2)
|
||||
|
||||
/**
|
||||
* GDK_SELECTION_CLIPBOARD:
|
||||
*
|
||||
* A #GdkAtom representing the <literal>CLIPBOARD</literal> selection.
|
||||
*/
|
||||
#define GDK_SELECTION_CLIPBOARD _GDK_MAKE_ATOM (69)
|
||||
|
||||
/**
|
||||
* GDK_TARGET_BITMAP:
|
||||
*
|
||||
* A #GdkAtom representing the <literal>BITMAP</literal> selection target.
|
||||
*/
|
||||
#define GDK_TARGET_BITMAP _GDK_MAKE_ATOM (5)
|
||||
|
||||
/**
|
||||
* GDK_TARGET_COLORMAP:
|
||||
*
|
||||
* A #GdkAtom representing the <literal>COLORMAP</literal> selection target.
|
||||
*/
|
||||
#define GDK_TARGET_COLORMAP _GDK_MAKE_ATOM (7)
|
||||
|
||||
/**
|
||||
* GDK_TARGET_DRAWABLE:
|
||||
*
|
||||
* A #GdkAtom representing the <literal>DRAWABLE</literal> selection target.
|
||||
*/
|
||||
#define GDK_TARGET_DRAWABLE _GDK_MAKE_ATOM (17)
|
||||
|
||||
/**
|
||||
* GDK_TARGET_PIXMAP:
|
||||
*
|
||||
* A #GdkAtom representing the <literal>PIXMAP</literal> selection target.
|
||||
*/
|
||||
#define GDK_TARGET_PIXMAP _GDK_MAKE_ATOM (20)
|
||||
|
||||
/**
|
||||
* GDK_TARGET_STRING:
|
||||
*
|
||||
* A #GdkAtom representing the <literal>STRING</literal> selection target.
|
||||
*/
|
||||
#define GDK_TARGET_STRING _GDK_MAKE_ATOM (31)
|
||||
|
||||
/**
|
||||
* GDK_SELECTION_TYPE_ATOM:
|
||||
*
|
||||
* A #GdkAtom representing the <literal>ATOM</literal> selection type.
|
||||
*/
|
||||
#define GDK_SELECTION_TYPE_ATOM _GDK_MAKE_ATOM (4)
|
||||
|
||||
/**
|
||||
* GDK_SELECTION_TYPE_BITMAP:
|
||||
*
|
||||
* A #GdkAtom representing the <literal>BITMAP</literal> selection type.
|
||||
*/
|
||||
#define GDK_SELECTION_TYPE_BITMAP _GDK_MAKE_ATOM (5)
|
||||
|
||||
/**
|
||||
* GDK_SELECTION_TYPE_COLORMAP:
|
||||
*
|
||||
* A #GdkAtom representing the <literal>COLORMAP</literal> selection type.
|
||||
*/
|
||||
#define GDK_SELECTION_TYPE_COLORMAP _GDK_MAKE_ATOM (7)
|
||||
|
||||
/**
|
||||
* GDK_SELECTION_TYPE_DRAWABLE:
|
||||
*
|
||||
* A #GdkAtom representing the <literal>DRAWABLE</literal> selection type.
|
||||
*/
|
||||
#define GDK_SELECTION_TYPE_DRAWABLE _GDK_MAKE_ATOM (17)
|
||||
|
||||
/**
|
||||
* GDK_SELECTION_TYPE_INTEGER:
|
||||
*
|
||||
* A #GdkAtom representing the <literal>INTEGER</literal> selection type.
|
||||
*/
|
||||
#define GDK_SELECTION_TYPE_INTEGER _GDK_MAKE_ATOM (19)
|
||||
|
||||
/**
|
||||
* GDK_SELECTION_TYPE_PIXMAP:
|
||||
*
|
||||
* A #GdkAtom representing the <literal>PIXMAP</literal> selection type.
|
||||
*/
|
||||
#define GDK_SELECTION_TYPE_PIXMAP _GDK_MAKE_ATOM (20)
|
||||
|
||||
/**
|
||||
* GDK_SELECTION_TYPE_WINDOW:
|
||||
*
|
||||
* A #GdkAtom representing the <literal>WINDOW</literal> selection type.
|
||||
*/
|
||||
#define GDK_SELECTION_TYPE_WINDOW _GDK_MAKE_ATOM (33)
|
||||
|
||||
/**
|
||||
* GDK_SELECTION_TYPE_STRING:
|
||||
*
|
||||
* A #GdkAtom representing the <literal>STRING</literal> selection type.
|
||||
*/
|
||||
#define GDK_SELECTION_TYPE_STRING _GDK_MAKE_ATOM (31)
|
||||
|
||||
/* Selections
|
||||
@@ -169,20 +74,6 @@ gboolean gdk_selection_owner_set_for_display (GdkDisplay *display,
|
||||
GdkWindow *gdk_selection_owner_get_for_display (GdkDisplay *display,
|
||||
GdkAtom selection);
|
||||
|
||||
/**
|
||||
* gdk_selection_convert:
|
||||
* @requestor: a #GdkWindow.
|
||||
* @selection: an atom identifying the selection to get the
|
||||
* contents of.
|
||||
* @target: the form in which to retrieve the selection.
|
||||
* @time_: the timestamp to use when retrieving the
|
||||
* selection. The selection owner may refuse the
|
||||
* request if it did not own the selection at
|
||||
* the time indicated by the timestamp.
|
||||
*
|
||||
* Retrieves the contents of a selection in a given
|
||||
* form.
|
||||
*/
|
||||
void gdk_selection_convert (GdkWindow *requestor,
|
||||
GdkAtom selection,
|
||||
GdkAtom target,
|
||||
|
||||
@@ -29,17 +29,6 @@
|
||||
|
||||
G_BEGIN_DECLS
|
||||
|
||||
|
||||
/**
|
||||
* SECTION:gdktesting
|
||||
* @Short_description: Test utilities
|
||||
* @Title: Testing
|
||||
*
|
||||
* The functions in this section are intended to be used in test programs.
|
||||
* They allow to simulate some user input.
|
||||
*/
|
||||
|
||||
|
||||
/* --- Gdk Test Utility API --- */
|
||||
void gdk_test_render_sync (GdkWindow *window);
|
||||
gboolean gdk_test_simulate_key (GdkWindow *window,
|
||||
|
||||
@@ -64,24 +64,7 @@ guint gdk_threads_add_timeout_seconds (guint interval,
|
||||
GSourceFunc function,
|
||||
gpointer data);
|
||||
|
||||
/**
|
||||
* GDK_THREADS_ENTER:
|
||||
*
|
||||
* This macro marks the beginning of a critical section in which GDK and
|
||||
* GTK+ functions can be called safely and without causing race
|
||||
* conditions. Only one thread at a time can be in such a critial
|
||||
* section. The macro expands to a no-op if #G_THREADS_ENABLED has not
|
||||
* been defined. Typically gdk_threads_enter() should be used instead of
|
||||
* this macro.
|
||||
*/
|
||||
#define GDK_THREADS_ENTER() gdk_threads_enter()
|
||||
|
||||
/**
|
||||
* GDK_THREADS_LEAVE:
|
||||
*
|
||||
* This macro marks the end of a critical section
|
||||
* begun with #GDK_THREADS_ENTER.
|
||||
*/
|
||||
#define GDK_THREADS_LEAVE() gdk_threads_leave()
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
109
gdk/gdktypes.h
109
gdk/gdktypes.h
@@ -46,12 +46,6 @@
|
||||
#include <gdkconfig.h>
|
||||
|
||||
/* some common magic values */
|
||||
|
||||
/**
|
||||
* GDK_CURRENT_TIME:
|
||||
*
|
||||
* Represents the current time, and can be used anywhere a time is expected.
|
||||
*/
|
||||
#define GDK_CURRENT_TIME 0L
|
||||
|
||||
/**
|
||||
@@ -79,29 +73,9 @@ typedef struct _GdkPoint GdkPoint;
|
||||
*/
|
||||
typedef cairo_rectangle_int_t GdkRectangle;
|
||||
|
||||
/**
|
||||
* GdkAtom:
|
||||
*
|
||||
* An opaque type representing a string as an index into a table
|
||||
* of strings on the X server.
|
||||
*/
|
||||
typedef struct _GdkAtom *GdkAtom;
|
||||
|
||||
/**
|
||||
* GDK_ATOM_TO_POINTER:
|
||||
* @atom: a #GdkAtom.
|
||||
*
|
||||
* Converts a #GdkAtom into a pointer type.
|
||||
*/
|
||||
#define GDK_ATOM_TO_POINTER(atom) (atom)
|
||||
|
||||
/**
|
||||
* GDK_POINTER_TO_ATOM:
|
||||
* @ptr: a pointer containing a #GdkAtom.
|
||||
*
|
||||
* Extracts a #GdkAtom from a pointer. The #GdkAtom must have been
|
||||
* stored in the pointer with GDK_ATOM_TO_POINTER().
|
||||
*/
|
||||
#define GDK_POINTER_TO_ATOM(ptr) ((GdkAtom)(ptr))
|
||||
|
||||
#ifdef GDK_NATIVE_WINDOW_POINTER
|
||||
@@ -111,21 +85,8 @@ typedef struct _GdkAtom *GdkAtom;
|
||||
#endif
|
||||
|
||||
#define _GDK_MAKE_ATOM(val) ((GdkAtom)GUINT_TO_POINTER(val))
|
||||
|
||||
/**
|
||||
* GDK_NONE:
|
||||
*
|
||||
* A null value for #GdkAtom, used in a similar way as
|
||||
* <literal>None</literal> in the Xlib API.
|
||||
*/
|
||||
#define GDK_NONE _GDK_MAKE_ATOM (0)
|
||||
|
||||
/**
|
||||
* GdkNativeWindow:
|
||||
*
|
||||
* Used to represent native windows (<type>Window</type>s for the X11
|
||||
* backend, <type>HWND</type>s for Win32).
|
||||
*/
|
||||
#ifdef GDK_NATIVE_WINDOW_POINTER
|
||||
typedef gpointer GdkNativeWindow;
|
||||
#else
|
||||
@@ -150,18 +111,6 @@ typedef struct _GdkDrawable GdkWindow;
|
||||
typedef struct _GdkDisplay GdkDisplay;
|
||||
typedef struct _GdkScreen GdkScreen;
|
||||
|
||||
/**
|
||||
* GdkByteOrder:
|
||||
* @GDK_LSB_FIRST: The values are stored with the least-significant byte
|
||||
* first. For instance, the 32-bit value 0xffeecc would be stored
|
||||
* in memory as 0xcc, 0xee, 0xff, 0x00.
|
||||
* @GDK_MSB_FIRST: The values are stored with the most-significant byte
|
||||
* first. For instance, the 32-bit value 0xffeecc would be stored
|
||||
* in memory as 0x00, 0xcc, 0xee, 0xff.
|
||||
*
|
||||
* A set of values describing the possible byte-orders
|
||||
* for storing pixel values in memory.
|
||||
*/
|
||||
typedef enum
|
||||
{
|
||||
GDK_LSB_FIRST,
|
||||
@@ -247,18 +196,9 @@ typedef enum
|
||||
GDK_ERROR_MEM = -4
|
||||
} GdkStatus;
|
||||
|
||||
/**
|
||||
* GdkGrabStatus:
|
||||
* @GDK_GRAB_SUCCESS: the resource was successfully grabbed.
|
||||
* @GDK_GRAB_ALREADY_GRABBED: the resource is actively grabbed by another client.
|
||||
* @GDK_GRAB_INVALID_TIME: the resource was grabbed more recently than the
|
||||
* specified time.
|
||||
* @GDK_GRAB_NOT_VIEWABLE: the grab window or the @confine_to window are not
|
||||
* viewable.
|
||||
* @GDK_GRAB_FROZEN: the resource is frozen by an active grab of another client.
|
||||
*
|
||||
* Returned by gdk_pointer_grab() and gdk_keyboard_grab() to indicate
|
||||
* success or the reason for the failure of the grab attempt.
|
||||
/* We define specific numeric values for these constants,
|
||||
* since old application code may depend on them matching the X values
|
||||
* We don't actually depend on the matchup ourselves.
|
||||
*/
|
||||
typedef enum
|
||||
{
|
||||
@@ -284,46 +224,9 @@ typedef enum
|
||||
GDK_OWNERSHIP_APPLICATION
|
||||
} GdkGrabOwnership;
|
||||
|
||||
/**
|
||||
* GdkEventMask:
|
||||
* @GDK_EXPOSURE_MASK: receive expose events
|
||||
* @GDK_POINTER_MOTION_MASK: receive all pointer motion events
|
||||
* @GDK_POINTER_MOTION_HINT_MASK: see the explanation above
|
||||
* @GDK_BUTTON_MOTION_MASK: receive pointer motion events while any button is pressed
|
||||
* @GDK_BUTTON1_MOTION_MASK: receive pointer motion events while 1 button is pressed
|
||||
* @GDK_BUTTON2_MOTION_MASK: receive pointer motion events while 2 button is pressed
|
||||
* @GDK_BUTTON3_MOTION_MASK: receive pointer motion events while 3 button is pressed
|
||||
* @GDK_BUTTON_PRESS_MASK: receive button press events
|
||||
* @GDK_BUTTON_RELEASE_MASK: receive button release events
|
||||
* @GDK_KEY_PRESS_MASK: receive key press events
|
||||
* @GDK_KEY_RELEASE_MASK: receive key release events
|
||||
* @GDK_ENTER_NOTIFY_MASK: receive window enter events
|
||||
* @GDK_LEAVE_NOTIFY_MASK: receive window leave events
|
||||
* @GDK_FOCUS_CHANGE_MASK: receive focus change events
|
||||
* @GDK_STRUCTURE_MASK: receive events about window configuration change
|
||||
* @GDK_PROPERTY_CHANGE_MASK: receive property change events
|
||||
* @GDK_VISIBILITY_NOTIFY_MASK: receive visibility change events
|
||||
* @GDK_PROXIMITY_IN_MASK: receive proximity in events
|
||||
* @GDK_PROXIMITY_OUT_MASK: receive proximity out events
|
||||
* @GDK_SUBSTRUCTURE_MASK: receive events about window configuration changes of
|
||||
* child windows
|
||||
* @GDK_SCROLL_MASK: receive scroll events
|
||||
* @GDK_ALL_EVENTS_MASK: the combination of all the above event masks.
|
||||
*
|
||||
* A set of bit-flags to indicate which events a window is to receive.
|
||||
* Most of these masks map onto one or more of the #GdkEventType event types
|
||||
* above.
|
||||
*
|
||||
* %GDK_POINTER_MOTION_HINT_MASK is a special mask which is used to reduce the
|
||||
* number of %GDK_MOTION_NOTIFY events received. Normally a %GDK_MOTION_NOTIFY
|
||||
* event is received each time the mouse moves. However, if the application
|
||||
* spends a lot of time processing the event (updating the display, for example),
|
||||
* it can lag behind the position of the mouse. When using
|
||||
* %GDK_POINTER_MOTION_HINT_MASK, fewer %GDK_MOTION_NOTIFY events will be sent,
|
||||
* some of which are marked as a hint (the is_hint member is %TRUE).
|
||||
* To receive more motion events after a motion hint event, the application
|
||||
* needs to asks for more, by calling gdk_event_request_motions().
|
||||
*/
|
||||
/* Event masks. (Used to select what types of events a window
|
||||
* * will receive).
|
||||
* */
|
||||
typedef enum
|
||||
{
|
||||
GDK_EXPOSURE_MASK = 1 << 1,
|
||||
|
||||
@@ -28,33 +28,6 @@
|
||||
#include "gdkscreen.h"
|
||||
|
||||
|
||||
/**
|
||||
* SECTION:visuals
|
||||
* @Short_description: Low-level display hardware information
|
||||
* @Title: Visuals
|
||||
*
|
||||
* A #GdkVisual describes a particular video hardware display format. It includes
|
||||
* information about the number of bits used for each color, the way the bits are
|
||||
* translated into an RGB value for display, and the way the bits are stored in
|
||||
* memory. For example, a piece of display hardware might support 24-bit color,
|
||||
* 16-bit color, or 8-bit color; meaning 24/16/8-bit pixel sizes. For a given
|
||||
* pixel size, pixels can be in different formats; for example the "red" element
|
||||
* of an RGB pixel may be in the top 8 bits of the pixel, or may be in the lower
|
||||
* 4 bits.
|
||||
*
|
||||
* There are several standard visuals. The visual returned by
|
||||
* gdk_screen_get_system_visual() is the system's default visual.
|
||||
*
|
||||
* A number of functions are provided for determining the "best" available visual.
|
||||
* For the purposes of making this determination, higher bit depths are considered
|
||||
* better, and for visuals of the same bit depth, %GDK_VISUAL_PSEUDO_COLOR is
|
||||
* preferred at 8bpp, otherwise, the visual types are ranked in the order of
|
||||
* (highest to lowest) %GDK_VISUAL_DIRECT_COLOR, %GDK_VISUAL_TRUE_COLOR,
|
||||
* %GDK_VISUAL_PSEUDO_COLOR, %GDK_VISUAL_STATIC_COLOR, %GDK_VISUAL_GRAYSCALE,
|
||||
* then %GDK_VISUAL_STATIC_GRAY.
|
||||
*/
|
||||
|
||||
|
||||
/**
|
||||
* gdk_list_visuals:
|
||||
*
|
||||
|
||||
@@ -79,44 +79,29 @@ typedef enum
|
||||
GDK_VISUAL_DIRECT_COLOR
|
||||
} GdkVisualType;
|
||||
|
||||
/**
|
||||
* GdkVisual:
|
||||
*
|
||||
* The #GdkVisual structure contains information about
|
||||
* a particular visual.
|
||||
*
|
||||
* <example id="rgbmask">
|
||||
* <title>Constructing a pixel value from components</title>
|
||||
* <programlisting>
|
||||
* guint
|
||||
* pixel_from_rgb (GdkVisual *visual,
|
||||
* guchar r, guchar b, guchar g)
|
||||
* {
|
||||
* return ((r >> (16 - visual->red_prec)) << visual->red_shift) |
|
||||
* ((g >> (16 - visual->green_prec)) << visual->green_shift) |
|
||||
* ((r >> (16 - visual->blue_prec)) << visual->blue_shift);
|
||||
* }
|
||||
* </programlisting>
|
||||
* </example>
|
||||
/* The visual type.
|
||||
* "type" is the type of visual this is (PseudoColor, TrueColor, etc).
|
||||
* "depth" is the bit depth of this visual.
|
||||
* "colormap_size" is the size of a colormap for this visual.
|
||||
* "bits_per_rgb" is the number of significant bits per red, green and blue.
|
||||
* The red, green and blue masks, shifts and precisions refer
|
||||
* to value needed to calculate pixel values in TrueColor and DirectColor
|
||||
* visuals. The "mask" is the significant bits within the pixel. The
|
||||
* "shift" is the number of bits left we must shift a primary for it
|
||||
* to be in position (according to the "mask"). "prec" refers to how
|
||||
* much precision the pixel value contains for a particular primary.
|
||||
*/
|
||||
struct _GdkVisual
|
||||
{
|
||||
/*< private >*/
|
||||
GObject parent_instance;
|
||||
|
||||
GdkVisualType GSEAL (type); /* Type of visual this is (PseudoColor, TrueColor, etc) */
|
||||
gint GSEAL (depth); /* Bit depth of this visual */
|
||||
/*< private >*/
|
||||
GdkVisualType GSEAL (type);
|
||||
gint GSEAL (depth);
|
||||
GdkByteOrder GSEAL (byte_order);
|
||||
gint GSEAL (colormap_size); /* Size of a colormap for this visual */
|
||||
gint GSEAL (bits_per_rgb); /* Number of significant bits per red, green and blue. */
|
||||
gint GSEAL (colormap_size);
|
||||
gint GSEAL (bits_per_rgb);
|
||||
|
||||
/* The red, green and blue masks, shifts and precisions refer
|
||||
* to value needed to calculate pixel values in TrueColor and DirectColor
|
||||
* visuals. The "mask" is the significant bits within the pixel. The
|
||||
* "shift" is the number of bits left we must shift a primary for it
|
||||
* to be in position (according to the "mask"). "prec" refers to how
|
||||
* much precision the pixel value contains for a particular primary.
|
||||
*/
|
||||
guint32 GSEAL (red_mask);
|
||||
gint GSEAL (red_shift);
|
||||
gint GSEAL (red_prec);
|
||||
|
||||
@@ -2212,7 +2212,7 @@ gdk_window_get_window_type (GdkWindow *window)
|
||||
*
|
||||
* Gets the #GdkVisual describing the pixel format of @window.
|
||||
*
|
||||
* Return value: (transfer none): a #GdkVisual
|
||||
* Return value: a #GdkVisual
|
||||
*
|
||||
* Since: 2.24
|
||||
**/
|
||||
@@ -2234,7 +2234,7 @@ gdk_window_get_visual (GdkWindow *window)
|
||||
*
|
||||
* Gets the #GdkScreen associated with a #GdkWindow.
|
||||
*
|
||||
* Return value: (transfer none): the #GdkScreen associated with @window
|
||||
* Return value: the #GdkScreen associated with @window
|
||||
*
|
||||
* Since: 2.24
|
||||
**/
|
||||
@@ -2256,7 +2256,7 @@ gdk_window_get_screen (GdkWindow *window)
|
||||
*
|
||||
* Gets the #GdkDisplay associated with a #GdkWindow.
|
||||
*
|
||||
* Return value: (transfer none): the #GdkDisplay associated with @window
|
||||
* Return value: the #GdkDisplay associated with @window
|
||||
*
|
||||
* Since: 2.24
|
||||
**/
|
||||
@@ -2577,18 +2577,13 @@ gdk_window_add_filter (GdkWindow *window,
|
||||
{
|
||||
filter = (GdkEventFilter *)tmp_list->data;
|
||||
if ((filter->function == function) && (filter->data == data))
|
||||
{
|
||||
filter->ref_count++;
|
||||
return;
|
||||
}
|
||||
return;
|
||||
tmp_list = tmp_list->next;
|
||||
}
|
||||
|
||||
filter = g_new (GdkEventFilter, 1);
|
||||
filter->function = function;
|
||||
filter->data = data;
|
||||
filter->ref_count = 1;
|
||||
filter->flags = 0;
|
||||
|
||||
if (private)
|
||||
private->filters = g_list_append (private->filters, filter);
|
||||
@@ -2631,11 +2626,6 @@ gdk_window_remove_filter (GdkWindow *window,
|
||||
|
||||
if ((filter->function == function) && (filter->data == data))
|
||||
{
|
||||
filter->flags |= GDK_EVENT_FILTER_REMOVED;
|
||||
filter->ref_count--;
|
||||
if (filter->ref_count != 0)
|
||||
return;
|
||||
|
||||
if (private)
|
||||
private->filters = g_list_remove_link (private->filters, node);
|
||||
else
|
||||
@@ -5130,7 +5120,7 @@ gdk_window_at_pointer (gint *win_x,
|
||||
* Obtains the root window (parent all other windows are inside)
|
||||
* for the default display and screen.
|
||||
*
|
||||
* Return value: (transfer none): the default root window
|
||||
* Return value: the default root window
|
||||
**/
|
||||
GdkWindow *
|
||||
gdk_get_default_root_window (void)
|
||||
@@ -5148,8 +5138,8 @@ gdk_get_default_root_window (void)
|
||||
* For example in the X backend, a native window handle is an Xlib
|
||||
* <type>XID</type>.
|
||||
*
|
||||
* Return value: (transfer full): the newly-created #GdkWindow wrapper
|
||||
* for the native window, or %NULL if the window has been destroyed.
|
||||
* Return value: the newly-created #GdkWindow wrapper for the
|
||||
* native window or %NULL if the window has been destroyed.
|
||||
**/
|
||||
GdkWindow *
|
||||
gdk_window_foreign_new (GdkNativeWindow anid)
|
||||
@@ -8589,7 +8579,7 @@ send_crossing_event (GdkDisplay *display,
|
||||
}
|
||||
|
||||
if (gdk_device_get_device_type (device) == GDK_DEVICE_TYPE_MASTER &&
|
||||
gdk_device_get_mode (device) != GDK_MODE_DISABLED &&
|
||||
device->mode != GDK_MODE_DISABLED &&
|
||||
!g_list_find (window->devices_inside, device))
|
||||
window->devices_inside = g_list_prepend (window->devices_inside, device);
|
||||
}
|
||||
@@ -8874,7 +8864,8 @@ _gdk_display_set_window_under_pointer (GdkDisplay *display,
|
||||
* Pointer grabs are used for operations which need complete control over mouse
|
||||
* events, even if the mouse leaves the application.
|
||||
* For example in GTK+ it is used for Drag and Drop, for dragging the handle in
|
||||
* the #GtkHPaned and #GtkVPaned widgets.
|
||||
* the #GtkHPaned and #GtkVPaned widgets, and for resizing columns in #GtkCList
|
||||
* widgets.
|
||||
*
|
||||
* Note that if the event mask of an X window has selected both button press and
|
||||
* button release events, then a button press event will cause an automatic
|
||||
@@ -8955,7 +8946,7 @@ gdk_pointer_grab (GdkWindow * window,
|
||||
{
|
||||
device = dev->data;
|
||||
|
||||
if (gdk_device_get_source (device) != GDK_SOURCE_MOUSE)
|
||||
if (device->source != GDK_SOURCE_MOUSE)
|
||||
continue;
|
||||
|
||||
res = _gdk_windowing_device_grab (device,
|
||||
@@ -8991,13 +8982,13 @@ gdk_pointer_grab (GdkWindow * window,
|
||||
* gdk_keyboard_grab:
|
||||
* @window: the #GdkWindow which will own the grab (the grab window).
|
||||
* @owner_events: if %FALSE then all keyboard events are reported with respect to
|
||||
* @window. If %TRUE then keyboard events for this application are
|
||||
* reported as normal, but keyboard events outside this application
|
||||
* are reported with respect to @window. Both key press and key
|
||||
* release events are always reported, independant of the event mask
|
||||
* set by the application.
|
||||
* @time_: a timestamp from a #GdkEvent, or %GDK_CURRENT_TIME if no timestamp is
|
||||
* available.
|
||||
* @window. If %TRUE then keyboard events for this application are
|
||||
* reported as normal, but keyboard events outside this application
|
||||
* are reported with respect to @window. Both key press and key
|
||||
* release events are always reported, independant of the event mask
|
||||
* set by the application.
|
||||
* @time: a timestamp from a #GdkEvent, or %GDK_CURRENT_TIME if no timestamp is
|
||||
available.
|
||||
*
|
||||
* Grabs the keyboard so that all events are passed to this
|
||||
* application until the keyboard is ungrabbed with gdk_keyboard_ungrab().
|
||||
@@ -9060,7 +9051,7 @@ gdk_keyboard_grab (GdkWindow *window,
|
||||
{
|
||||
device = dev->data;
|
||||
|
||||
if (gdk_device_get_source (device) != GDK_SOURCE_KEYBOARD)
|
||||
if (device->source != GDK_SOURCE_KEYBOARD)
|
||||
continue;
|
||||
|
||||
res = _gdk_windowing_device_grab (device,
|
||||
@@ -9448,7 +9439,7 @@ proxy_pointer_event (GdkDisplay *display,
|
||||
event->motion.is_hint = is_hint;
|
||||
event->motion.device = source_event->motion.device;
|
||||
event->motion.axes = g_memdup (source_event->motion.axes,
|
||||
sizeof (gdouble) * gdk_device_get_n_axes (source_event->motion.device));
|
||||
sizeof (gdouble) * source_event->motion.device->num_axes);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -9557,7 +9548,7 @@ proxy_button_event (GdkEvent *source_event,
|
||||
event->button.state = state;
|
||||
event->button.device = source_event->button.device;
|
||||
event->button.axes = g_memdup (source_event->button.axes,
|
||||
sizeof (gdouble) * gdk_device_get_n_axes (source_event->button.device));
|
||||
sizeof (gdouble) * source_event->button.device->num_axes);
|
||||
|
||||
if (type == GDK_BUTTON_PRESS)
|
||||
_gdk_event_button_generate (display, event);
|
||||
|
||||
@@ -132,7 +132,7 @@ gdkconfig.h : gdkconfig.h.win32
|
||||
|
||||
gdk.def: gdk.symbols
|
||||
echo EXPORTS > gdk.def
|
||||
cl /EP -DG_OS_WIN32 -DGDK_WINDOWING_WIN32 \
|
||||
cl /EP -DINCLUDE_VARIABLES -DG_OS_WIN32 -DGDK_WINDOWING_WIN32 -DALL_FILES \
|
||||
-DG_GNUC_CONST= \
|
||||
gdk.symbols >> gdk.def
|
||||
|
||||
|
||||
@@ -171,40 +171,19 @@ append_event (GdkEvent *event,
|
||||
static gint
|
||||
gdk_event_apply_filters (NSEvent *nsevent,
|
||||
GdkEvent *event,
|
||||
GList **filters)
|
||||
GList *filters)
|
||||
{
|
||||
GList *tmp_list;
|
||||
GdkFilterReturn result;
|
||||
|
||||
tmp_list = *filters;
|
||||
tmp_list = filters;
|
||||
|
||||
while (tmp_list)
|
||||
{
|
||||
GdkEventFilter *filter = (GdkEventFilter*) tmp_list->data;
|
||||
GList *node;
|
||||
|
||||
if ((filter->flags & GDK_EVENT_FILTER_REMOVED) != 0)
|
||||
{
|
||||
tmp_list = tmp_list->next;
|
||||
continue;
|
||||
}
|
||||
|
||||
filter->ref_count++;
|
||||
result = filter->function (nsevent, event, filter->data);
|
||||
|
||||
/* get the next node after running the function since the
|
||||
function may add or remove a next node */
|
||||
node = tmp_list;
|
||||
|
||||
tmp_list = tmp_list->next;
|
||||
|
||||
filter->ref_count--;
|
||||
if (filter->ref_count == 0)
|
||||
{
|
||||
*filters = g_list_remove_link (*filters, node);
|
||||
g_list_free_1 (node);
|
||||
g_free (filter);
|
||||
}
|
||||
|
||||
result = filter->function (nsevent, event, filter->data);
|
||||
if (result != GDK_FILTER_CONTINUE)
|
||||
return result;
|
||||
}
|
||||
@@ -571,7 +550,7 @@ find_toplevel_for_keyboard_event (NSEvent *nsevent)
|
||||
GdkDeviceGrabInfo *grab;
|
||||
GdkDevice *device = l->data;
|
||||
|
||||
if (gdk_device_get_source(device) != GDK_SOURCE_KEYBOARD)
|
||||
if (device->source != GDK_SOURCE_KEYBOARD)
|
||||
continue;
|
||||
|
||||
grab = _gdk_display_get_last_device_grab (display, device);
|
||||
@@ -1186,7 +1165,7 @@ gdk_event_translate (GdkEvent *event,
|
||||
/* Apply global filters */
|
||||
GdkFilterReturn result;
|
||||
|
||||
result = gdk_event_apply_filters (nsevent, event, &_gdk_default_filters);
|
||||
result = gdk_event_apply_filters (nsevent, event, _gdk_default_filters);
|
||||
if (result != GDK_FILTER_CONTINUE)
|
||||
{
|
||||
return_val = (result == GDK_FILTER_TRANSLATE) ? TRUE : FALSE;
|
||||
@@ -1227,7 +1206,7 @@ gdk_event_translate (GdkEvent *event,
|
||||
{
|
||||
g_object_ref (window);
|
||||
|
||||
result = gdk_event_apply_filters (nsevent, event, &filter_private->filters);
|
||||
result = gdk_event_apply_filters (nsevent, event, filter_private->filters);
|
||||
|
||||
g_object_unref (window);
|
||||
|
||||
|
||||
@@ -228,7 +228,7 @@ _gdk_input_init (void)
|
||||
{
|
||||
GdkDevice *device = l->data;
|
||||
|
||||
if (gdk_device_get_source(device) == GDK_SOURCE_KEYBOARD)
|
||||
if (device->source == GDK_SOURCE_KEYBOARD)
|
||||
continue;
|
||||
|
||||
_gdk_input_devices = g_list_prepend (_gdk_input_devices, l->data);
|
||||
@@ -245,7 +245,7 @@ _gdk_input_init (void)
|
||||
{
|
||||
GdkDevice *device = list->data;
|
||||
|
||||
if (gdk_device_get_source(device) != GDK_SOURCE_MOUSE)
|
||||
if (device->source != GDK_SOURCE_MOUSE)
|
||||
continue;
|
||||
|
||||
_gdk_display->core_pointer = device;
|
||||
@@ -273,7 +273,11 @@ _gdk_input_exit (void)
|
||||
if (gdkdev != (GdkDevicePrivate *)_gdk_core_pointer)
|
||||
{
|
||||
gdk_device_set_mode ((GdkDevice *)gdkdev, GDK_MODE_DISABLED);
|
||||
g_object_unref(gdkdev);
|
||||
|
||||
g_free (gdkdev->info.name);
|
||||
g_free (gdkdev->info.axes);
|
||||
g_free (gdkdev->info.keys);
|
||||
g_free (gdkdev);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -8,17 +8,17 @@ test_color_parse (void)
|
||||
GdkRGBA expected;
|
||||
gboolean res;
|
||||
|
||||
res = gdk_rgba_parse (&color, "foo");
|
||||
res = gdk_rgba_parse ("foo", &color);
|
||||
g_assert (!res);
|
||||
|
||||
res = gdk_rgba_parse (&color, "");
|
||||
res = gdk_rgba_parse ("", &color);
|
||||
g_assert (!res);
|
||||
|
||||
expected.red = 100/255.;
|
||||
expected.green = 90/255.;
|
||||
expected.blue = 80/255.;
|
||||
expected.alpha = 0.1;
|
||||
res = gdk_rgba_parse (&color, "rgba(100,90,80,0.1)");
|
||||
res = gdk_rgba_parse ("rgba(100,90,80,0.1)", &color);
|
||||
g_assert (res);
|
||||
g_assert (gdk_rgba_equal (&color, &expected));
|
||||
|
||||
@@ -26,11 +26,11 @@ test_color_parse (void)
|
||||
expected.green = 0.3;
|
||||
expected.blue = 0.2;
|
||||
expected.alpha = 0.1;
|
||||
res = gdk_rgba_parse (&color, "rgba(40%,30%,20%,0.1)");
|
||||
res = gdk_rgba_parse ("rgba(40%,30%,20%,0.1)", &color);
|
||||
g_assert (res);
|
||||
g_assert (gdk_rgba_equal (&color, &expected));
|
||||
|
||||
res = gdk_rgba_parse (&color, "rgba( 40 % , 30 % , 20 % , 0.1 )");
|
||||
res = gdk_rgba_parse ("rgba( 40 % , 30 % , 20 % , 0.1 )", &color);
|
||||
g_assert (res);
|
||||
g_assert (gdk_rgba_equal (&color, &expected));
|
||||
|
||||
@@ -38,7 +38,7 @@ test_color_parse (void)
|
||||
expected.green = 0.0;
|
||||
expected.blue = 0.0;
|
||||
expected.alpha = 1.0;
|
||||
res = gdk_rgba_parse (&color, "red");
|
||||
res = gdk_rgba_parse ("red", &color);
|
||||
g_assert (res);
|
||||
g_assert (gdk_rgba_equal (&color, &expected));
|
||||
|
||||
@@ -46,7 +46,7 @@ test_color_parse (void)
|
||||
expected.green = 0x8080 / 65535.;
|
||||
expected.blue = 1.0;
|
||||
expected.alpha = 1.0;
|
||||
res = gdk_rgba_parse (&color, "#0080ff");
|
||||
res = gdk_rgba_parse ("#0080ff", &color);
|
||||
g_assert (res);
|
||||
g_assert (gdk_rgba_equal (&color, &expected));
|
||||
}
|
||||
@@ -71,7 +71,7 @@ test_color_to_string (void)
|
||||
|
||||
orig = g_strdup (setlocale (LC_ALL, NULL));
|
||||
res = gdk_rgba_to_string (&rgba);
|
||||
gdk_rgba_parse (&out, res);
|
||||
gdk_rgba_parse (res, &out);
|
||||
g_assert (gdk_rgba_equal (&rgba, &out));
|
||||
|
||||
setlocale (LC_ALL, "de_DE.utf-8");
|
||||
|
||||
@@ -319,7 +319,7 @@ gdk_device_win32_grab (GdkDevice *device,
|
||||
GdkCursor *cursor,
|
||||
guint32 time_)
|
||||
{
|
||||
if (gdk_device_get_source (device) != GDK_SOURCE_KEYBOARD)
|
||||
if (device->source != GDK_SOURCE_KEYBOARD)
|
||||
SetCapture (GDK_WINDOW_HWND (window));
|
||||
|
||||
return GDK_GRAB_SUCCESS;
|
||||
@@ -333,7 +333,7 @@ gdk_device_win32_ungrab (GdkDevice *device,
|
||||
|
||||
display = gdk_device_get_display (device);
|
||||
|
||||
if (gdk_device_get_source (device) != GDK_SOURCE_KEYBOARD)
|
||||
if (device->source != GDK_SOURCE_KEYBOARD)
|
||||
ReleaseCapture ();
|
||||
}
|
||||
|
||||
|
||||
@@ -322,7 +322,7 @@ _gdk_device_wintab_translate_axes (GdkDeviceWintab *device_wintab,
|
||||
if (!_gdk_device_wintab_get_window_coords (impl_window, &root_x, &root_y))
|
||||
return;
|
||||
|
||||
for (i = 0; i < gdk_device_get_n_axes (device); i++)
|
||||
for (i = 0; i < device->num_axes; i++)
|
||||
{
|
||||
GdkAxisUse use;
|
||||
|
||||
|
||||
@@ -1025,7 +1025,7 @@ fill_key_event_string (GdkEvent *event)
|
||||
static GdkFilterReturn
|
||||
apply_event_filters (GdkWindow *window,
|
||||
MSG *msg,
|
||||
GList **filters)
|
||||
GList *filters)
|
||||
{
|
||||
GdkFilterReturn result = GDK_FILTER_CONTINUE;
|
||||
GdkEvent *event;
|
||||
@@ -1043,34 +1043,13 @@ apply_event_filters (GdkWindow *window,
|
||||
*/
|
||||
node = _gdk_event_queue_append (_gdk_display, event);
|
||||
|
||||
tmp_list = *filters;
|
||||
tmp_list = filters;
|
||||
while (tmp_list)
|
||||
{
|
||||
GdkEventFilter *filter = (GdkEventFilter *) tmp_list->data;
|
||||
GList *node;
|
||||
|
||||
if ((filter->flags & GDK_EVENT_FILTER_REMOVED) != 0)
|
||||
{
|
||||
tmp_list = tmp_list->next;
|
||||
continue;
|
||||
}
|
||||
|
||||
filter->ref_count++;
|
||||
result = filter->function (msg, event, filter->data);
|
||||
|
||||
/* get the next node after running the function since the
|
||||
function may add or remove a next node */
|
||||
node = tmp_list;
|
||||
|
||||
tmp_list = tmp_list->next;
|
||||
|
||||
filter->ref_count--;
|
||||
if (filter->ref_count == 0)
|
||||
{
|
||||
*filters = g_list_remove_link (*filters, node);
|
||||
g_list_free_1 (node);
|
||||
g_free (filter);
|
||||
}
|
||||
|
||||
result = filter->function (msg, event, filter->data);
|
||||
if (result != GDK_FILTER_CONTINUE)
|
||||
break;
|
||||
}
|
||||
@@ -1777,7 +1756,7 @@ gdk_event_translate (MSG *msg,
|
||||
{
|
||||
/* Apply global filters */
|
||||
|
||||
GdkFilterReturn result = apply_event_filters (NULL, msg, &_gdk_default_filters);
|
||||
GdkFilterReturn result = apply_event_filters (NULL, msg, _gdk_default_filters);
|
||||
|
||||
/* If result is GDK_FILTER_CONTINUE, we continue as if nothing
|
||||
* happened. If it is GDK_FILTER_REMOVE or GDK_FILTER_TRANSLATE,
|
||||
@@ -1843,7 +1822,7 @@ gdk_event_translate (MSG *msg,
|
||||
{
|
||||
/* Apply per-window filters */
|
||||
|
||||
GdkFilterReturn result = apply_event_filters (window, msg, &((GdkWindowObject *) window)->filters);
|
||||
GdkFilterReturn result = apply_event_filters (window, msg, ((GdkWindowObject *) window)->filters);
|
||||
|
||||
if (result == GDK_FILTER_REMOVE || result == GDK_FILTER_TRANSLATE)
|
||||
{
|
||||
|
||||
@@ -322,7 +322,6 @@ gdk_property_delete (GdkWindow *window,
|
||||
"Gtk/ButtonImages\0" "gtk-button-images\0"
|
||||
"Gtk/MenuImages\0" "gtk-menu-images\0"
|
||||
"Gtk/MenuBarAccel\0" "gtk-menu-bar-accel\0"
|
||||
"Gtk/CursorBlinkTimeout\0" "gtk-cursor-blink-timeout\0"
|
||||
"Gtk/CursorThemeName\0" "gtk-cursor-theme-name\0"
|
||||
"Gtk/CursorThemeSize\0" "gtk-cursor-theme-size\0"
|
||||
"Gtk/ShowInputMethodMenu\0" "gtk-show-input-method-menu\0"
|
||||
|
||||
@@ -36,43 +36,54 @@
|
||||
#include <unistd.h>
|
||||
|
||||
static char *
|
||||
get_display_name (GFile *file,
|
||||
GFileInfo *info)
|
||||
get_display_name (GFile *file)
|
||||
{
|
||||
GFileInfo *info;
|
||||
char *name, *tmp;
|
||||
|
||||
/* This does sync I/O, which isn't ideal.
|
||||
* It should probably use the NautilusFile machinery
|
||||
*/
|
||||
|
||||
name = NULL;
|
||||
info = g_file_query_info (file,
|
||||
G_FILE_ATTRIBUTE_STANDARD_DISPLAY_NAME, 0, NULL, NULL);
|
||||
if (info)
|
||||
name = g_strdup (g_file_info_get_display_name (info));
|
||||
{
|
||||
name = g_strdup (g_file_info_get_display_name (info));
|
||||
g_object_unref (info);
|
||||
}
|
||||
|
||||
if (name == NULL)
|
||||
{
|
||||
name = g_file_get_basename (file);
|
||||
if (!g_utf8_validate (name, -1, NULL))
|
||||
{
|
||||
tmp = name;
|
||||
name =
|
||||
g_uri_escape_string (name, G_URI_RESERVED_CHARS_ALLOWED_IN_PATH, TRUE);
|
||||
g_free (tmp);
|
||||
}
|
||||
{
|
||||
tmp = name;
|
||||
name =
|
||||
g_uri_escape_string (name, G_URI_RESERVED_CHARS_ALLOWED_IN_PATH,
|
||||
TRUE);
|
||||
g_free (tmp);
|
||||
}
|
||||
}
|
||||
|
||||
return name;
|
||||
}
|
||||
|
||||
static GIcon *
|
||||
get_icon (GFile *file,
|
||||
GFileInfo *info)
|
||||
get_icon (GFile *file)
|
||||
{
|
||||
GFileInfo *info;
|
||||
GIcon *icon;
|
||||
|
||||
icon = NULL;
|
||||
|
||||
info = g_file_query_info (file, G_FILE_ATTRIBUTE_STANDARD_ICON, 0, NULL, NULL);
|
||||
if (info)
|
||||
{
|
||||
icon = g_file_info_get_icon (info);
|
||||
if (icon)
|
||||
g_object_ref (icon);
|
||||
g_object_ref (icon);
|
||||
g_object_unref (info);
|
||||
}
|
||||
|
||||
return icon;
|
||||
@@ -88,13 +99,13 @@ gicon_to_string (GIcon *icon)
|
||||
{
|
||||
file = g_file_icon_get_file (G_FILE_ICON (icon));
|
||||
if (file)
|
||||
return g_file_get_path (file);
|
||||
return g_file_get_path (file);
|
||||
}
|
||||
else if (G_IS_THEMED_ICON (icon))
|
||||
{
|
||||
names = g_themed_icon_get_names (G_THEMED_ICON (icon));
|
||||
if (names)
|
||||
return g_strdup (names[0]);
|
||||
return g_strdup (names[0]);
|
||||
}
|
||||
else if (G_IS_EMBLEMED_ICON (icon))
|
||||
{
|
||||
@@ -110,11 +121,11 @@ gicon_to_string (GIcon *icon)
|
||||
|
||||
static void
|
||||
end_startup_notification (GdkDisplay *display,
|
||||
const char *startup_id)
|
||||
const char *startup_id)
|
||||
{
|
||||
gdk_x11_display_broadcast_startup_message (display, "remove",
|
||||
"ID", startup_id,
|
||||
NULL);
|
||||
"ID", startup_id,
|
||||
NULL);
|
||||
}
|
||||
|
||||
|
||||
@@ -199,19 +210,19 @@ startup_timeout (void *data)
|
||||
next = tmp->next;
|
||||
|
||||
elapsed =
|
||||
((((double) now.tv_sec - sn_data->time.tv_sec) * G_USEC_PER_SEC +
|
||||
(now.tv_usec - sn_data->time.tv_usec))) / 1000.0;
|
||||
((((double) now.tv_sec - sn_data->time.tv_sec) * G_USEC_PER_SEC +
|
||||
(now.tv_usec - sn_data->time.tv_usec))) / 1000.0;
|
||||
|
||||
if (elapsed >= STARTUP_TIMEOUT_LENGTH)
|
||||
{
|
||||
std->contexts = g_slist_remove (std->contexts, sn_data);
|
||||
end_startup_notification (sn_data->display, sn_data->startup_id);
|
||||
free_startup_notification_data (sn_data);
|
||||
}
|
||||
{
|
||||
std->contexts = g_slist_remove (std->contexts, sn_data);
|
||||
end_startup_notification (sn_data->display, sn_data->startup_id);
|
||||
free_startup_notification_data (sn_data);
|
||||
}
|
||||
else
|
||||
{
|
||||
min_timeout = MIN (min_timeout, (STARTUP_TIMEOUT_LENGTH - elapsed));
|
||||
}
|
||||
{
|
||||
min_timeout = MIN (min_timeout, (STARTUP_TIMEOUT_LENGTH - elapsed));
|
||||
}
|
||||
|
||||
tmp = next;
|
||||
}
|
||||
@@ -228,7 +239,7 @@ startup_timeout (void *data)
|
||||
|
||||
static void
|
||||
add_startup_timeout (GdkScreen *screen,
|
||||
const char *startup_id)
|
||||
const char *startup_id)
|
||||
{
|
||||
StartupTimeoutData *data;
|
||||
StartupNotificationData *sn_data;
|
||||
@@ -242,7 +253,7 @@ add_startup_timeout (GdkScreen *screen,
|
||||
data->timeout_id = 0;
|
||||
|
||||
g_object_set_data_full (G_OBJECT (screen), "appinfo-startup-data",
|
||||
data, free_startup_timeout);
|
||||
data, free_startup_timeout);
|
||||
}
|
||||
|
||||
sn_data = g_new (StartupNotificationData, 1);
|
||||
@@ -254,14 +265,14 @@ add_startup_timeout (GdkScreen *screen,
|
||||
|
||||
if (data->timeout_id == 0)
|
||||
data->timeout_id = g_timeout_add_seconds (STARTUP_TIMEOUT_LENGTH_SECONDS,
|
||||
startup_timeout, data);
|
||||
startup_timeout, data);
|
||||
}
|
||||
|
||||
|
||||
char *
|
||||
_gdk_windowing_get_startup_notify_id (GAppLaunchContext *context,
|
||||
GAppInfo *info,
|
||||
GList *files)
|
||||
GAppInfo *info,
|
||||
GList *files)
|
||||
{
|
||||
static int sequence = 0;
|
||||
GdkAppLaunchContextPrivate *priv;
|
||||
@@ -277,7 +288,6 @@ _gdk_windowing_get_startup_notify_id (GAppLaunchContext *context,
|
||||
GIcon *icon;
|
||||
guint32 timestamp;
|
||||
char *startup_id;
|
||||
GFileInfo *fileinfo;
|
||||
|
||||
priv = GDK_APP_LAUNCH_CONTEXT (context)->priv;
|
||||
|
||||
@@ -297,32 +307,20 @@ _gdk_windowing_get_startup_notify_id (GAppLaunchContext *context,
|
||||
screen = gdk_display_get_default_screen (display);
|
||||
}
|
||||
|
||||
fileinfo = NULL;
|
||||
|
||||
files_count = g_list_length (files);
|
||||
if (files_count == 0)
|
||||
{
|
||||
description = g_strdup_printf (_("Starting %s"), g_app_info_get_name (info));
|
||||
}
|
||||
description = g_strdup_printf (_("Starting %s"), g_app_info_get_name (info));
|
||||
else if (files_count == 1)
|
||||
{
|
||||
gchar *display_name;
|
||||
|
||||
if (g_file_is_native (files->data))
|
||||
fileinfo = g_file_query_info (files->data,
|
||||
G_FILE_ATTRIBUTE_STANDARD_DISPLAY_NAME ","
|
||||
G_FILE_ATTRIBUTE_STANDARD_ICON,
|
||||
0, NULL, NULL);
|
||||
|
||||
display_name = get_display_name (files->data, fileinfo);
|
||||
gchar *display_name = get_display_name (files->data);
|
||||
description = g_strdup_printf (_("Opening %s"), display_name);
|
||||
g_free (display_name);
|
||||
}
|
||||
else
|
||||
description = g_strdup_printf (g_dngettext (GETTEXT_PACKAGE,
|
||||
"Opening %d Item",
|
||||
"Opening %d Items",
|
||||
files_count), files_count);
|
||||
"Opening %d Item",
|
||||
"Opening %d Items",
|
||||
files_count), files_count);
|
||||
|
||||
icon_name = NULL;
|
||||
if (priv->icon_name)
|
||||
@@ -332,18 +330,18 @@ _gdk_windowing_get_startup_notify_id (GAppLaunchContext *context,
|
||||
icon = NULL;
|
||||
|
||||
if (priv->icon != NULL)
|
||||
icon = g_object_ref (priv->icon);
|
||||
icon = g_object_ref (priv->icon);
|
||||
else if (files_count == 1)
|
||||
icon = get_icon (files->data, fileinfo);
|
||||
icon = get_icon (files->data);
|
||||
|
||||
if (icon == NULL)
|
||||
{
|
||||
icon = g_app_info_get_icon (info);
|
||||
g_object_ref (icon);
|
||||
}
|
||||
{
|
||||
icon = g_app_info_get_icon (info);
|
||||
g_object_ref (icon);
|
||||
}
|
||||
|
||||
if (icon)
|
||||
icon_name = gicon_to_string (icon);
|
||||
icon_name = gicon_to_string (icon);
|
||||
|
||||
g_object_unref (icon);
|
||||
}
|
||||
@@ -355,7 +353,7 @@ _gdk_windowing_get_startup_notify_id (GAppLaunchContext *context,
|
||||
timestamp = gdk_x11_display_get_user_time (display);
|
||||
|
||||
screen_str = g_strdup_printf ("%d", gdk_screen_get_number (screen));
|
||||
if (priv->workspace > -1)
|
||||
if (priv->workspace > -1)
|
||||
workspace_str = g_strdup_printf ("%d", priv->workspace);
|
||||
else
|
||||
workspace_str = NULL;
|
||||
@@ -366,31 +364,30 @@ _gdk_windowing_get_startup_notify_id (GAppLaunchContext *context,
|
||||
application_id = NULL;
|
||||
|
||||
startup_id = g_strdup_printf ("%s-%lu-%s-%s-%d_TIME%lu",
|
||||
g_get_prgname (),
|
||||
(unsigned long)getpid (),
|
||||
g_get_host_name (),
|
||||
binary_name,
|
||||
sequence++,
|
||||
(unsigned long)timestamp);
|
||||
g_get_prgname (),
|
||||
(unsigned long)getpid (),
|
||||
g_get_host_name (),
|
||||
binary_name,
|
||||
sequence++,
|
||||
(unsigned long)timestamp);
|
||||
|
||||
|
||||
gdk_x11_display_broadcast_startup_message (display, "new",
|
||||
"ID", startup_id,
|
||||
"NAME", g_app_info_get_name (info),
|
||||
"SCREEN", screen_str,
|
||||
"BIN", binary_name,
|
||||
"ICON", icon_name,
|
||||
"DESKTOP", workspace_str,
|
||||
"DESCRIPTION", description,
|
||||
"WMCLASS", NULL, /* FIXME */
|
||||
"APPLICATION_ID", application_id,
|
||||
NULL);
|
||||
"ID", startup_id,
|
||||
"NAME", g_app_info_get_name (info),
|
||||
"SCREEN", screen_str,
|
||||
"BIN", binary_name,
|
||||
"ICON", icon_name,
|
||||
"DESKTOP", workspace_str,
|
||||
"DESCRIPTION", description,
|
||||
"WMCLASS", NULL, /* FIXME */
|
||||
"APPLICATION_ID", application_id,
|
||||
NULL);
|
||||
|
||||
g_free (description);
|
||||
g_free (screen_str);
|
||||
g_free (workspace_str);
|
||||
g_free (icon_name);
|
||||
if (fileinfo)
|
||||
g_object_unref (fileinfo);
|
||||
|
||||
add_startup_timeout (screen, startup_id);
|
||||
|
||||
@@ -399,8 +396,8 @@ _gdk_windowing_get_startup_notify_id (GAppLaunchContext *context,
|
||||
|
||||
|
||||
void
|
||||
_gdk_windowing_launch_failed (GAppLaunchContext *context,
|
||||
const char *startup_notify_id)
|
||||
_gdk_windowing_launch_failed (GAppLaunchContext *context,
|
||||
const char *startup_notify_id)
|
||||
{
|
||||
GdkAppLaunchContextPrivate *priv;
|
||||
GdkScreen *screen;
|
||||
@@ -422,22 +419,22 @@ _gdk_windowing_launch_failed (GAppLaunchContext *context,
|
||||
if (data)
|
||||
{
|
||||
for (l = data->contexts; l != NULL; l = l->next)
|
||||
{
|
||||
sn_data = l->data;
|
||||
if (strcmp (startup_notify_id, sn_data->startup_id) == 0)
|
||||
{
|
||||
data->contexts = g_slist_remove (data->contexts, sn_data);
|
||||
end_startup_notification (sn_data->display, sn_data->startup_id);
|
||||
free_startup_notification_data (sn_data);
|
||||
|
||||
break;
|
||||
}
|
||||
}
|
||||
{
|
||||
sn_data = l->data;
|
||||
if (strcmp (startup_notify_id, sn_data->startup_id) == 0)
|
||||
{
|
||||
data->contexts = g_slist_remove (data->contexts, sn_data);
|
||||
end_startup_notification (sn_data->display, sn_data->startup_id);
|
||||
free_startup_notification_data (sn_data);
|
||||
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (data->contexts == NULL)
|
||||
{
|
||||
g_source_remove (data->timeout_id);
|
||||
data->timeout_id = 0;
|
||||
}
|
||||
{
|
||||
g_source_remove (data->timeout_id);
|
||||
data->timeout_id = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -362,7 +362,7 @@ gdk_x11_cursor_get_xcursor (GdkCursor *cursor)
|
||||
*
|
||||
* Returns the display on which the #GdkCursor is defined.
|
||||
*
|
||||
* Returns: (transfer none): the #GdkDisplay associated to @cursor
|
||||
* Returns: the #GdkDisplay associated to @cursor
|
||||
*
|
||||
* Since: 2.2
|
||||
*/
|
||||
@@ -387,7 +387,7 @@ gdk_cursor_get_display (GdkCursor *cursor)
|
||||
* on the cursor, GDK may not be able to obtain the image data. In this
|
||||
* case, %NULL is returned.
|
||||
*
|
||||
* Returns: (transfer full): a #GdkPixbuf representing @cursor, or %NULL
|
||||
* Returns: a #GdkPixbuf representing @cursor, or %NULL
|
||||
*
|
||||
* Since: 2.8
|
||||
*/
|
||||
|
||||
@@ -313,7 +313,7 @@ gdk_device_core_grab (GdkDevice *device,
|
||||
else
|
||||
xconfine_to = GDK_WINDOW_XID (confine_to);
|
||||
|
||||
if (gdk_device_get_source (device) == GDK_SOURCE_KEYBOARD)
|
||||
if (device->source == GDK_SOURCE_KEYBOARD)
|
||||
{
|
||||
/* Device is a keyboard */
|
||||
status = XGrabKeyboard (GDK_DISPLAY_XDISPLAY (display),
|
||||
@@ -371,7 +371,7 @@ gdk_device_core_ungrab (GdkDevice *device,
|
||||
|
||||
display = gdk_device_get_display (device);
|
||||
|
||||
if (gdk_device_get_source (device) == GDK_SOURCE_KEYBOARD)
|
||||
if (device->source == GDK_SOURCE_KEYBOARD)
|
||||
XUngrabKeyboard (GDK_DISPLAY_XDISPLAY (display), time_);
|
||||
else
|
||||
XUngrabPointer (GDK_DISPLAY_XDISPLAY (display), time_);
|
||||
|
||||
@@ -155,8 +155,7 @@ gdk_device_xi_constructed (GObject *object)
|
||||
device->device_id);
|
||||
|
||||
if (gdk_error_trap_pop ())
|
||||
g_warning ("Device %s can't be opened",
|
||||
gdk_device_get_name (GDK_DEVICE (device)));
|
||||
g_warning ("Device %s can't be opened", GDK_DEVICE (device)->name);
|
||||
|
||||
if (G_OBJECT_CLASS (gdk_device_xi_parent_class)->constructed)
|
||||
G_OBJECT_CLASS (gdk_device_xi_parent_class)->constructed (object);
|
||||
@@ -557,11 +556,10 @@ gdk_device_xi_update_axes (GdkDevice *device,
|
||||
int i;
|
||||
|
||||
device_xi = GDK_DEVICE_XI (device);
|
||||
g_return_if_fail (first_axis >= 0 &&
|
||||
first_axis + axes_count <= gdk_device_get_n_axes (device));
|
||||
g_return_if_fail (first_axis >= 0 && first_axis + axes_count <= device->num_axes);
|
||||
|
||||
if (!device_xi->axis_data)
|
||||
device_xi->axis_data = g_new0 (gint, gdk_device_get_n_axes (device));
|
||||
device_xi->axis_data = g_new0 (gint, device->num_axes);
|
||||
|
||||
for (i = 0; i < axes_count; i++)
|
||||
device_xi->axis_data[first_axis + i] = axis_data[i];
|
||||
@@ -579,7 +577,6 @@ gdk_device_xi_translate_axes (GdkDevice *device,
|
||||
GdkWindow *impl_window;
|
||||
gdouble root_x, root_y;
|
||||
gdouble temp_x, temp_y;
|
||||
gint n_axes;
|
||||
gint i;
|
||||
|
||||
device_xi = GDK_DEVICE_XI (device);
|
||||
@@ -589,9 +586,7 @@ gdk_device_xi_translate_axes (GdkDevice *device,
|
||||
if (!gdk_device_xi_get_window_info (impl_window, &root_x, &root_y))
|
||||
return;
|
||||
|
||||
n_axes = gdk_device_get_n_axes (device);
|
||||
|
||||
for (i = 0; i < n_axes; i++)
|
||||
for (i = 0; i < device->num_axes; i++)
|
||||
{
|
||||
GdkAxisUse use;
|
||||
|
||||
@@ -601,7 +596,7 @@ gdk_device_xi_translate_axes (GdkDevice *device,
|
||||
{
|
||||
case GDK_AXIS_X:
|
||||
case GDK_AXIS_Y:
|
||||
if (gdk_device_get_mode (device) == GDK_MODE_WINDOW)
|
||||
if (device->mode == GDK_MODE_WINDOW)
|
||||
_gdk_device_translate_window_coord (device, window,
|
||||
i, axis_data[i],
|
||||
&axes[i]);
|
||||
|
||||
@@ -205,7 +205,7 @@ gdk_device_xi2_get_state (GdkDevice *device,
|
||||
case GDK_AXIS_X:
|
||||
case GDK_AXIS_Y:
|
||||
case GDK_AXIS_IGNORE:
|
||||
if (gdk_device_get_mode (device) == GDK_MODE_WINDOW)
|
||||
if (device->mode == GDK_MODE_WINDOW)
|
||||
_gdk_device_translate_window_coord (device, window, j, value, &axes[j]);
|
||||
else
|
||||
{
|
||||
|
||||
@@ -441,7 +441,7 @@ gdk_device_manager_xi_translate_event (GdkEventTranslator *translator,
|
||||
event->button.x_root = (gdouble) xdbe->x_root;
|
||||
event->button.y_root = (gdouble) xdbe->y_root;
|
||||
|
||||
event->button.axes = g_new0 (gdouble, gdk_device_get_n_axes (device));
|
||||
event->button.axes = g_new0 (gdouble, device->num_axes);
|
||||
gdk_device_xi_update_axes (device, xdbe->axes_count,
|
||||
xdbe->first_axis, xdbe->axis_data);
|
||||
gdk_device_xi_translate_axes (device, window,
|
||||
@@ -487,15 +487,13 @@ gdk_device_manager_xi_translate_event (GdkEventTranslator *translator,
|
||||
xdke->keycode));
|
||||
|
||||
if (xdke->keycode < device_xi->min_keycode ||
|
||||
xdke->keycode >= device_xi->min_keycode + gdk_device_get_n_keys (device))
|
||||
xdke->keycode >= device_xi->min_keycode + device->num_keys)
|
||||
{
|
||||
g_warning ("Invalid device key code received");
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
gdk_device_get_key (device, xdke->keycode - device_xi->min_keycode,
|
||||
&event->key.keyval,
|
||||
&event->key.state);
|
||||
event->key.keyval = device->keys[xdke->keycode - device_xi->min_keycode].keyval;
|
||||
|
||||
if (event->key.keyval == 0)
|
||||
{
|
||||
@@ -511,7 +509,8 @@ gdk_device_manager_xi_translate_event (GdkEventTranslator *translator,
|
||||
event->key.window = g_object_ref (window);
|
||||
event->key.time = xdke->time;
|
||||
|
||||
event->key.state |= translate_state (xdke->state, xdke->device_state);
|
||||
event->key.state = translate_state (xdke->state, xdke->device_state)
|
||||
| device->keys[xdke->keycode - device_xi->min_keycode].modifiers;
|
||||
|
||||
/* Add a string translation for the key event */
|
||||
if ((event->key.keyval >= 0x20) && (event->key.keyval <= 0xFF))
|
||||
@@ -553,7 +552,7 @@ gdk_device_manager_xi_translate_event (GdkEventTranslator *translator,
|
||||
event->motion.x_root = (gdouble) xdme->x_root;
|
||||
event->motion.y_root = (gdouble) xdme->y_root;
|
||||
|
||||
event->motion.axes = g_new0 (gdouble, gdk_device_get_n_axes (device));
|
||||
event->motion.axes = g_new0 (gdouble, device->num_axes);
|
||||
gdk_device_xi_update_axes (device, xdme->axes_count,
|
||||
xdme->first_axis, xdme->axis_data);
|
||||
gdk_device_xi_translate_axes (device, window,
|
||||
@@ -627,7 +626,7 @@ gdk_device_manager_xi_translate_event (GdkEventTranslator *translator,
|
||||
for (i = 0; i < xdse->num_classes; i++)
|
||||
{
|
||||
if (input_class->class == ValuatorClass)
|
||||
gdk_device_xi_update_axes (device, gdk_device_get_n_axes (device), 0,
|
||||
gdk_device_xi_update_axes (device, device->num_axes, 0,
|
||||
((XValuatorState *)input_class)->valuators);
|
||||
|
||||
input_class = (XInputClass *)(((char *)input_class)+input_class->length);
|
||||
|
||||
@@ -268,7 +268,7 @@ add_device (GdkDeviceManagerXI2 *device_manager,
|
||||
else if (dev->use == XIFloatingSlave)
|
||||
device_manager->floating_devices = g_list_append (device_manager->floating_devices, device);
|
||||
else
|
||||
g_warning ("Unhandled device: %s\n", gdk_device_get_name (device));
|
||||
g_warning ("Unhandled device: %s\n", device->name);
|
||||
|
||||
if (emit_signal)
|
||||
g_signal_emit_by_name (device_manager, "device-added", device);
|
||||
@@ -755,7 +755,7 @@ translate_axes (GdkDevice *device,
|
||||
{
|
||||
case GDK_AXIS_X:
|
||||
case GDK_AXIS_Y:
|
||||
if (gdk_device_get_mode (device) == GDK_MODE_WINDOW)
|
||||
if (device->mode == GDK_MODE_WINDOW)
|
||||
_gdk_device_translate_window_coord (device, window, i, val, &axes[i]);
|
||||
else
|
||||
{
|
||||
@@ -1010,7 +1010,7 @@ gdk_device_manager_xi2_translate_event (GdkEventTranslator *translator,
|
||||
event->button.window,
|
||||
&xev->valuators);
|
||||
|
||||
if (gdk_device_get_mode (event->button.device) == GDK_MODE_WINDOW)
|
||||
if (event->button.device->mode == GDK_MODE_WINDOW)
|
||||
{
|
||||
GdkDevice *device = event->button.device;
|
||||
|
||||
@@ -1061,7 +1061,7 @@ gdk_device_manager_xi2_translate_event (GdkEventTranslator *translator,
|
||||
event->motion.window,
|
||||
&xev->valuators);
|
||||
|
||||
if (gdk_device_get_mode (event->motion.device) == GDK_MODE_WINDOW)
|
||||
if (event->motion.device->mode == GDK_MODE_WINDOW)
|
||||
{
|
||||
GdkDevice *device = event->motion.device;
|
||||
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user