mirror of
https://github.com/Ryujinx/GtkSharp.git
synced 2024-12-24 00:35:36 +00:00
* generator/GUnicharGen.cs: generatable for gunichar, using
GLib.Marshaller.CharToGUnichar and .GUnicharToChar [#70704] * generator/SymbolTable.cs (SymbolTable): add a GUnicharGen. * generator/Makefile.am (sources): add GUnicharGen.cs * parser/gapi2xml.pl (addPropElem): g_param_spec_unichar() has type "gunichar" not "unichar". * gtk/gtk-api.raw: Regen * glib/Marshaller.cs: Import CharToGUnichar's glue method by the right name svn path=/trunk/gtk-sharp/; revision=37998
This commit is contained in:
parent
99735b0d7e
commit
a610fb9a79
17
ChangeLog
17
ChangeLog
|
@ -1,3 +1,20 @@
|
|||
2004-12-20 Dan Winship <danw@novell.com>
|
||||
|
||||
* generator/GUnicharGen.cs: generatable for gunichar, using
|
||||
GLib.Marshaller.CharToGUnichar and .GUnicharToChar [#70704]
|
||||
|
||||
* generator/SymbolTable.cs (SymbolTable): add a GUnicharGen.
|
||||
|
||||
* generator/Makefile.am (sources): add GUnicharGen.cs
|
||||
|
||||
* parser/gapi2xml.pl (addPropElem): g_param_spec_unichar() has
|
||||
type "gunichar" not "unichar".
|
||||
|
||||
* gtk/gtk-api.raw: Regen
|
||||
|
||||
* glib/Marshaller.cs: Import CharToGUnichar's glue method by the
|
||||
right name
|
||||
|
||||
2004-12-20 Dan Winship <danw@novell.com>
|
||||
|
||||
* gtk/Gtk.metadata: Don't rename GtkStock to StockManager, hide
|
||||
|
|
|
@ -1,3 +1,15 @@
|
|||
2004-12-20 Dan Winship <danw@novell.com>
|
||||
|
||||
* en/Gtk/TextCharPredicate.xml: update signature... this is usable now
|
||||
|
||||
* en/Atk/NoOpObject.xml (GetCharacterAtOffset):
|
||||
* en/Atk/Text.xml (GetCharacterAtOffset):
|
||||
* en/Gtk/Entry.xml (InvisibleChar):
|
||||
* en/Pango/Global.xml (UnicharDirection, ScriptForUnichar):
|
||||
* en/Vte/Terminal.xml (IsWordChar):
|
||||
* en/Vte/TerminalAccessible.xml (GetCharacterAtOffset): document
|
||||
newly-wrapped methods
|
||||
|
||||
2004-12-20 Dan Winship <danw@novell.com>
|
||||
|
||||
* en/Gtk/StockManager.xml: gone
|
||||
|
|
|
@ -1892,5 +1892,21 @@
|
|||
<remarks>To be added</remarks>
|
||||
</Docs>
|
||||
</Member>
|
||||
<Member MemberName="GetCharacterAtOffset">
|
||||
<MemberSignature Language="C#" Value="public virtual char GetCharacterAtOffset (int offset);" />
|
||||
<MemberType>Method</MemberType>
|
||||
<ReturnValue>
|
||||
<ReturnType>System.Char</ReturnType>
|
||||
</ReturnValue>
|
||||
<Parameters>
|
||||
<Parameter Name="offset" Type="System.Int32" />
|
||||
</Parameters>
|
||||
<Docs>
|
||||
<summary>Gets the specified text.</summary>
|
||||
<param name="offset">position</param>
|
||||
<returns>the character at <paramref name="offset" />.</returns>
|
||||
<remarks></remarks>
|
||||
</Docs>
|
||||
</Member>
|
||||
</Members>
|
||||
</Type>
|
|
@ -513,5 +513,21 @@ If the <paramref name="boundary_type" /> is <see cref="F:Atk.TextBoundary.LineEn
|
|||
<remarks>To be added</remarks>
|
||||
</Docs>
|
||||
</Member>
|
||||
<Member MemberName="GetCharacterAtOffset">
|
||||
<MemberSignature Language="C#" Value="public virtual char GetCharacterAtOffset (int offset);" />
|
||||
<MemberType>Method</MemberType>
|
||||
<ReturnValue>
|
||||
<ReturnType>System.Char</ReturnType>
|
||||
</ReturnValue>
|
||||
<Parameters>
|
||||
<Parameter Name="offset" Type="System.Int32" />
|
||||
</Parameters>
|
||||
<Docs>
|
||||
<summary>Gets the specified text.</summary>
|
||||
<param name="offset">position</param>
|
||||
<returns>the character at <paramref name="offset" />.</returns>
|
||||
<remarks></remarks>
|
||||
</Docs>
|
||||
</Member>
|
||||
</Members>
|
||||
</Type>
|
|
@ -1105,5 +1105,18 @@ The horizontal alignment, from 0 (left) to 1 (right). Reversed for RTL layouts
|
|||
</remarks>
|
||||
</Docs>
|
||||
</Member>
|
||||
<Member MemberName="InvisibleChar">
|
||||
<MemberSignature Language="C#" Value="public char InvisibleChar { set; get; };" />
|
||||
<MemberType>Property</MemberType>
|
||||
<ReturnValue>
|
||||
<ReturnType>System.Char</ReturnType>
|
||||
</ReturnValue>
|
||||
<Parameters />
|
||||
<Docs>
|
||||
<summary>The character to display when <see cref="P:Gtk.Entry.Visibility" /> is <see langword="false" /></summary>
|
||||
<returns>a <see cref="T:System.Char" /></returns>
|
||||
<remarks>The is the character displayed in the entry in place of the actual characters of <see cref="P:Gtk.Entry.Text" /> when <see cref="P:Gtk.Entry.Visibility" /> is <see langword="false" />. The default invisible character is an asterisk ('*'). If you set this to 0, then no characters will be displayed at all.</remarks>
|
||||
</Docs>
|
||||
</Member>
|
||||
</Members>
|
||||
</Type>
|
|
@ -1,5 +1,5 @@
|
|||
<Type Name="TextCharPredicate" FullName="Gtk.TextCharPredicate">
|
||||
<TypeSignature Language="C#" Maintainer="auto" Value="public sealed delegate bool TextCharPredicate ();" />
|
||||
<TypeSignature Language="C#" Maintainer="auto" Value="public sealed delegate bool TextCharPredicate (char ch);" />
|
||||
<AssemblyInfo>
|
||||
<AssemblyName>gtk-sharp</AssemblyName>
|
||||
<AssemblyVersion>0.0.0.0</AssemblyVersion>
|
||||
|
|
|
@ -327,5 +327,37 @@ If no delimiters are found, both <paramref name="paragraph_delimiter_index" /> a
|
|||
<remarks>To be added</remarks>
|
||||
</Docs>
|
||||
</Member>
|
||||
<Member MemberName="UnicharDirection">
|
||||
<MemberSignature Language="C#" Value="public static Pango.Direction UnicharDirection (char ch);" />
|
||||
<MemberType>Method</MemberType>
|
||||
<ReturnValue>
|
||||
<ReturnType>Pango.Direction</ReturnType>
|
||||
</ReturnValue>
|
||||
<Parameters>
|
||||
<Parameter Name="ch" Type="System.Char" />
|
||||
</Parameters>
|
||||
<Docs>
|
||||
<summary>Determines the direction of a character</summary>
|
||||
<param name="ch">a <see cref="T:System.Char" /></param>
|
||||
<returns>the direction of the character according to the Unicode bidi algorithm</returns>
|
||||
<remarks>To be added</remarks>
|
||||
</Docs>
|
||||
</Member>
|
||||
<Member MemberName="ScriptForUnichar">
|
||||
<MemberSignature Language="C#" Value="public static Pango.Script ScriptForUnichar (char ch);" />
|
||||
<MemberType>Method</MemberType>
|
||||
<ReturnValue>
|
||||
<ReturnType>Pango.Script</ReturnType>
|
||||
</ReturnValue>
|
||||
<Parameters>
|
||||
<Parameter Name="ch" Type="System.Char" />
|
||||
</Parameters>
|
||||
<Docs>
|
||||
<summary>Determines the script for a character</summary>
|
||||
<param name="ch">a <see cref="T:System.Char" /></param>
|
||||
<returns>the script for the character according to Unicode Technical Report 24</returns>
|
||||
<remarks>No check is made that <paramref name="ch" /> is valid. If you pass in an invalid character, you will get back an invalid result.</remarks>
|
||||
</Docs>
|
||||
</Member>
|
||||
</Members>
|
||||
</Type>
|
|
@ -1741,5 +1741,21 @@ class T
|
|||
<remarks>TERM is automatically set to reflect the terminal widget's emulation setting. If lastlog, utmp, or wtmp are <see langword="true" />, logs the session to the specified system log files.</remarks>
|
||||
</Docs>
|
||||
</Member>
|
||||
<Member MemberName="IsWordChar">
|
||||
<MemberSignature Language="C#" Value="public bool IsWordChar (char c);" />
|
||||
<MemberType>Method</MemberType>
|
||||
<ReturnValue>
|
||||
<ReturnType>System.Boolean</ReturnType>
|
||||
</ReturnValue>
|
||||
<Parameters>
|
||||
<Parameter Name="c" Type="System.Char" />
|
||||
</Parameters>
|
||||
<Docs>
|
||||
<summary>Determines if a character is considered to be part of a word</summary>
|
||||
<param name="c">a <see cref="T:System.Char" /></param>
|
||||
<returns><see langword="true" /> if <paramref name="c" /> is considered to be a word character according to the current value of <see cref="P:Vte.Terminal.WordChars" />.</returns>
|
||||
<remarks></remarks>
|
||||
</Docs>
|
||||
</Member>
|
||||
</Members>
|
||||
</Type>
|
|
@ -768,5 +768,21 @@
|
|||
<remarks>To be added</remarks>
|
||||
</Docs>
|
||||
</Member>
|
||||
<Member MemberName="GetCharacterAtOffset">
|
||||
<MemberSignature Language="C#" Value="public virtual char GetCharacterAtOffset (int offset);" />
|
||||
<MemberType>Method</MemberType>
|
||||
<ReturnValue>
|
||||
<ReturnType>System.Char</ReturnType>
|
||||
</ReturnValue>
|
||||
<Parameters>
|
||||
<Parameter Name="offset" Type="System.Int32" />
|
||||
</Parameters>
|
||||
<Docs>
|
||||
<summary>Gets the specified text.</summary>
|
||||
<param name="offset">position</param>
|
||||
<returns>the character at <paramref name="offset" />.</returns>
|
||||
<remarks></remarks>
|
||||
</Docs>
|
||||
</Member>
|
||||
</Members>
|
||||
</Type>
|
93
generator/GUnicharGen.cs
Normal file
93
generator/GUnicharGen.cs
Normal file
|
@ -0,0 +1,93 @@
|
|||
// GtkSharp.Generation.GUnicharGen.cs - The gunichar Generatable.
|
||||
//
|
||||
// Author: Mike Kestner <mkestner@novell.com>
|
||||
//
|
||||
// Copyright (c) 2004 Novell, Inc.
|
||||
//
|
||||
// This program is free software; you can redistribute it and/or
|
||||
// modify it under the terms of version 2 of the GNU General Public
|
||||
// License as published by the Free Software Foundation.
|
||||
//
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
// General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public
|
||||
// License along with this program; if not, write to the
|
||||
// Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||
// Boston, MA 02111-1307, USA.
|
||||
|
||||
|
||||
namespace GtkSharp.Generation {
|
||||
|
||||
using System;
|
||||
|
||||
public class GUnicharGen : IGeneratable {
|
||||
|
||||
public string CName {
|
||||
get {
|
||||
return "gunichar";
|
||||
}
|
||||
}
|
||||
|
||||
public string Name {
|
||||
get {
|
||||
return "char";
|
||||
}
|
||||
}
|
||||
|
||||
public string QualifiedName {
|
||||
get {
|
||||
return "char";
|
||||
}
|
||||
}
|
||||
|
||||
public string MarshalType {
|
||||
get {
|
||||
return "uint";
|
||||
}
|
||||
}
|
||||
|
||||
public string MarshalReturnType {
|
||||
get {
|
||||
return MarshalType;
|
||||
}
|
||||
}
|
||||
|
||||
public string ToNativeReturnType {
|
||||
get {
|
||||
return MarshalType;
|
||||
}
|
||||
}
|
||||
|
||||
public string CallByName (string var_name)
|
||||
{
|
||||
return "GLib.Marshaller.CharToGUnichar (" + var_name + ")";
|
||||
}
|
||||
|
||||
public virtual string FromNative(string var)
|
||||
{
|
||||
return "GLib.Marshaller.GUnicharToChar (" + var + ")";
|
||||
}
|
||||
|
||||
public virtual string FromNativeReturn(string var)
|
||||
{
|
||||
return FromNative (var);
|
||||
}
|
||||
|
||||
public virtual string ToNativeReturn(string var)
|
||||
{
|
||||
return CallByName (var);
|
||||
}
|
||||
|
||||
public void Generate ()
|
||||
{
|
||||
}
|
||||
|
||||
public void Generate (GenerationInfo gen_info)
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -24,6 +24,7 @@ sources = \
|
|||
GenerationInfo.cs \
|
||||
GObjectGen.cs \
|
||||
GStringGen.cs \
|
||||
GUnicharGen.cs \
|
||||
IGeneratable.cs \
|
||||
ImportSignature.cs \
|
||||
InterfaceGen.cs \
|
||||
|
|
|
@ -91,6 +91,7 @@ namespace GtkSharp.Generation {
|
|||
AddType (new AliasGen ("off_t", "size_t"));
|
||||
AddType (new SizeTGen ());
|
||||
AddType (new SSizeTGen ());
|
||||
AddType (new GUnicharGen ());
|
||||
|
||||
// FIXME: These ought to be handled properly.
|
||||
AddType (new SimpleGen ("GMemChunk", "IntPtr"));
|
||||
|
|
|
@ -187,11 +187,11 @@ namespace GLib {
|
|||
}
|
||||
|
||||
[DllImport("glibsharpglue-2")]
|
||||
static extern uint glibsharp_utf16_to_gunichar (ushort c);
|
||||
static extern uint glibsharp_utf16_to_unichar (ushort c);
|
||||
|
||||
public static uint CharToGUnichar (char c)
|
||||
{
|
||||
return glibsharp_utf16_to_gunichar ((ushort) c);
|
||||
return glibsharp_utf16_to_unichar ((ushort) c);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -5194,7 +5194,7 @@
|
|||
<property name="MaxLength" cname="max_length" type="gint" readable="true" writeable="true"/>
|
||||
<property name="Visibility" cname="visibility" type="gboolean" readable="true" writeable="true"/>
|
||||
<property name="HasFrame" cname="has_frame" type="gboolean" readable="true" writeable="true"/>
|
||||
<property name="InvisibleChar" cname="invisible_char" type="unichar" readable="true" writeable="true"/>
|
||||
<property name="InvisibleChar" cname="invisible_char" type="gunichar" readable="true" writeable="true"/>
|
||||
<property name="ActivatesDefault" cname="activates_default" type="gboolean" readable="true" writeable="true"/>
|
||||
<property name="WidthChars" cname="width_chars" type="gint" readable="true" writeable="true"/>
|
||||
<property name="ScrollOffset" cname="scroll_offset" type="gint" readable="true"/>
|
||||
|
|
|
@ -801,7 +801,7 @@ sub addPropElem
|
|||
|
||||
$mode = $params[$#params];
|
||||
|
||||
if ($type =~ /boolean|float|double|^u?int|pointer/) {
|
||||
if ($type =~ /boolean|float|double|^u?int|pointer|unichar/) {
|
||||
$type = "g$type";
|
||||
} elsif ($type =~ /string/) {
|
||||
$type = "gchar*";
|
||||
|
|
Loading…
Reference in a new issue