mirror of
https://github.com/Ryujinx/GtkSharp.git
synced 2024-09-09 00:13:20 +02:00
![Mike Kestner](/assets/img/avatar_default.png)
* generator/CallbackGen.cs : implement new IAccessor iface so that callback fields on structs can now be accessed. * generator/ClassBase.cs : remove/abstract some methods incorrectly located here. * generator/ClassGen.cs : implement methods previously inherited from ClassBase incorrectly. * generator/HandleBase.cs : new base class for native ptr wrappers. Implements new IAccessor interface and code moved from ClassBase. * generator/IAccessor.cs : new iface to generate field/prop accessors. * generator/InterfaceGen.cs : derive from new ObjectBase. * generator/LPGen.cs : implement IAccessor. * generator/LPUGen.cs : implement IAccessor. * generator/ObjectBase.cs : new base class for Object/Iface types. * generator/ObjectGen.cs : derive from new ObjectBase. * generator/OpaqueGen.cs : derive from HandleBase. * generator/StructField.cs : refactor Generate method using new IAccessor interface. * */*.custom : add obsolete impls for some existing c_cased struct field accessors that are now StudlyNamed. svn path=/trunk/gtk-sharp/; revision=46878
100 lines
3.9 KiB
Plaintext
100 lines
3.9 KiB
Plaintext
Main Program
|
|
------------
|
|
|
|
CodeGenerator: Static class. Contains Main
|
|
GenerationInfo: Stores info passed in on the command line, such as the
|
|
assembly name and glue library name. Passed to
|
|
IGeneratable.Generate().
|
|
Parser: Reads the foo-api.xml file and creates IGeneratable objects
|
|
Statistics: Static class. Used by other classes to keep statistics on
|
|
generated classes
|
|
SymbolTable: Static class. Keeps track of the type hierarchy and the
|
|
mappings between C types and IGeneratable classes
|
|
|
|
|
|
IGeneratables
|
|
-------------
|
|
The IGeneratable interface is implemented by all classes that
|
|
represent types.
|
|
|
|
GenBase: Abstract base class for any api.xml element that will have
|
|
its own generated .cs file
|
|
|
|
CallbackGen: Handles <callback> elements by creating a public
|
|
delegate type for the public API (in NAME.cs), and an
|
|
internal type that wraps that delegate, to be passed
|
|
as the actual unmanaged callback (in
|
|
NAMESPACESharp.NAMENative.cs)
|
|
|
|
ClassBase: Abstract base class for types that will be converted
|
|
to C# classes, structs, or interfaces
|
|
|
|
ClassGen: Handles <class> elements (static classes)
|
|
|
|
HandleBase: base class for wrapped IntPtr reference types.
|
|
|
|
OpaqueGen: Handles <boxed> and <struct> elements with the
|
|
"opaque" flag (by creating C# classes)
|
|
|
|
ObjectBase: base class for GObject/GInterface types
|
|
|
|
InterfaceGen: Handles <interface> elements
|
|
|
|
ObjectGen: Handles <object> elements
|
|
|
|
StructBase: Abstract base class for types that will be
|
|
translated to C# structs.
|
|
|
|
BoxedGen: Handles non-opaque <boxed> elements
|
|
|
|
StructGen: Handles non-opaque <struct> elements
|
|
|
|
EnumGen: Handles <enum> elements.
|
|
|
|
SimpleBase: Abstract base class for types which aren't generated from
|
|
xml like simple types or manually wrapped/implemented types.
|
|
|
|
ByRefGen: Handles struct types that must be passed into C code by
|
|
reference (at the moment, only GValue/GLib.Value)
|
|
ManualGen: Handles types that must be manually marshalled between
|
|
managed and unmanaged code (by handwritten classes such
|
|
as GLib.List)
|
|
MarshalGen: Handles types that must be manually marshalled between
|
|
managed and unmanaged code via special CallByName/FromNative
|
|
syntax (eg time_t<->DateTime, gunichar<->char)
|
|
SimpleGen: Handles types that can be simply converted from an
|
|
unmanaged type to a managed type (int, byte, short, etc...)
|
|
LPGen : marshals system specific long and "size" types.
|
|
LPUGen : marshals system specific unsigned long and "size" types.
|
|
ConstStringGen: Handles conversion between "const char *" and
|
|
System.String
|
|
StringGen: Handles conversion between non-const "char *" and
|
|
System.String
|
|
|
|
AliasGen: Handles <alias> elements. "Generates" type aliases by
|
|
ignoring them (eg, outputting "Gdk.Rectangle" wherever the
|
|
API calls for a GtkAllocation).
|
|
|
|
|
|
Other code-generating classes used by IGeneratables
|
|
---------------------------------------------------
|
|
|
|
Ctor: Handles <constructor> elements
|
|
Field: Handle <field> elements (only used by StructBase, not
|
|
ClassBase)
|
|
Method: Handle <method> elements
|
|
Property: Handles <property> elements
|
|
ChildProperty: Handles <childprop> elements
|
|
Signal: Handles <signal> elements
|
|
|
|
ImportSignature: Represents a signature for an unmanaged method
|
|
ManagedCallString: Represents a call to a managed method from a
|
|
method that has unmanaged data
|
|
MethodBody: shared by Ctor and Method
|
|
Parameter: Represents the parameters to a method
|
|
SignalHandler: Used by Signal. Like CallbackGen, this creates an
|
|
internal type to wrap a signal-handler delegate.
|
|
Signature: Represents the signature of a method
|
|
VMSignature: Used by Signal. Represents the signature of a virtual
|
|
method.
|