This is the mail archive of the
java@gcc.gnu.org
mailing list for the Java project.
Re: CNI for C
On Wednesday 07 April 2004 20:45, Tom Tromey wrote:
> Geert> What I do know is that the easy C integration is making Mono and C#
> Geert> gaining more and more momentum, while a perfectly functional
> Geert> free-from-patents technology exist with GCJ. As I see it, easy
> Geert> integration with C is a minor addition to what is already a very
> stable Geert> and comprehensive platform.
Personally I think creating a binding assuming a one-to-one correspondance
between java or C# methods calls onto the method calls of the api being
wrapped isn't the best way. I am using MarshallByRefObjects or
ContextBoundObjects (they're much the same as java Dynamic proxies) for the
Qt#/Kimono C# bindings, and the entire api is constructed in terms of those.
Both java and C# use the language independent Smoke library.
I've attached a couple of sample C# files with the Proxy calls. Here is how
the Proxy is created in QFont.cs:
protected Object _interceptor = null;
...
protected void CreateQFontProxy() {
SmokeInvocation realProxy = new
SmokeInvocation(typeof(QFont), this);
_interceptor = (QFont)
realProxy.GetTransparentProxy();
}
private QFont proxyQFont() {
return (QFont) _interceptor;
}
...
And a method call looks like this:
public void SetPixelSize(int arg1) {
proxyQFont().SetPixelSize(arg1);
}
All 20000+ Qt/KDE method calls in the api are funneled to a single Invoke()
call, in SmokeInvocation.cs:
public override IMessage Invoke(IMessage myMessage) {
Console.WriteLine("MyProxy 'Invoke method'
Called...");
if (myMessage is IMethodCallMessage) {
Console.WriteLine("IMethodCallMessage");
}
if (myMessage is IMethodReturnMessage) {
Console.WriteLine("IMethodReturnMessage");
}
if (myMessage is IConstructionCallMessage) {
}
}
So the next thing to be done is to add code to look up the method to call in
the Smoke runtime, then marshall the args in a Object[] array into the C++
types. Then call the C++ method, and marshall the return value from C++ to
C#.
I've attached the a version of QFont.cs which was part of the older Qt#
bindings, and it used p/invoke. Finally, I've attached QFont.java which shows
how the same technique looks using java. A few weeks ago I posted a similar
description of the java ones on java@gcc.gnu.org.
It's my understanding of this link that MS intends you to construct components
this way if you want to take advantage of Aspect Oriented features in you
language binding:
http://msdn.microsoft.com/msdnmag/issues/03/03/ContextsinNET/
You can't do that fancy stuff with just straight calls to p/invoke. Maybe you
could use libffi inside Proxy.invoke() to dynamically look up Gnome C
methods.
> Yes, I think we've been quite bad at pushing our technology. Are gcj
> and Java perfect? No, of course not. But I think they are attractive
> along many axes: there is a lot of free Java code, including
> development environments and other "big" things; gcj is quite mature,
> has good performance, and is not only extremely portable but in fact
> very widely ported.
>
> So, how can we get the word out more effectively? I don't know. I
> think we need some evangelists in the Gnome world (and other
> communities) to help out. And I think we need to listen to those
> folks when they talk about what it is they need.
>
> Considerations like these are why I think java-gnome is such an
> important project. Other bindings would also be useful, to make it
> easier to write Gnome-ish applications.
>
> Another complaint I hear sometimes is that our release cycle is too
> slow, since we're tied to gcc. We could probably start doing more
> frequent libgcj releases if that would help.
I'm very keen on using gcj with the KDE Koala java bindings. For me the FOSDEM
talk about gcj was my favourite - I don't think people realise how impressive
the gcj/gij environment is - and I learned a lot - thanks! We've just about
finished getting the kde java bindings working as debian packages which
should make them more widely available and easy to use.
-- Richard
//Auto-generated by kalyptus. DO NOT EDIT.
namespace Qt {
using System;
using System.Collections;
using System.Text;
public class QFont : MarshalByRefObject, IDisposable {
protected Object _interceptor = null;
protected QFont(Type dummy) {}
interface IQFontProxy {
bool op_equals(QFont lhs, QFont arg1);
string Substitute(string arg1);
ArrayList Substitutes(string arg1);
ArrayList Substitutions();
void InsertSubstitution(string arg1, string arg2);
void InsertSubstitutions(string arg1, string[] arg2);
void RemoveSubstitution(string arg1);
void Initialize();
void Cleanup();
void CacheStatistics();
QFont DefaultFont();
void SetDefaultFont(QFont arg1);
}
protected void CreateQFontProxy() {
SmokeInvocation realProxy = new SmokeInvocation(typeof(QFont), this);
_interceptor = (QFont) realProxy.GetTransparentProxy();
}
private QFont ProxyQFont() {
return (QFont) _interceptor;
}
private static Object _staticInterceptor = null;
static QFont() {
SmokeInvocation realProxy = new SmokeInvocation(typeof(IQFontProxy), null);
_staticInterceptor = (IQFontProxy) realProxy.GetTransparentProxy();
}
private static IQFontProxy StaticQFont() {
return (IQFontProxy) _staticInterceptor;
}
enum E_StyleHint {
Helvetica = 0,
SansSerif = Helvetica,
Times = 1,
Serif = Times,
Courier = 2,
TypeWriter = Courier,
OldEnglish = 3,
Decorative = OldEnglish,
System = 4,
AnyStyle = 5,
}
enum E_StyleStrategy {
PreferDefault = 0x0001,
PreferBitmap = 0x0002,
PreferDevice = 0x0004,
PreferOutline = 0x0008,
ForceOutline = 0x0010,
PreferMatch = 0x0020,
PreferQuality = 0x0040,
PreferAntialias = 0x0080,
NoAntialias = 0x0100,
OpenGLCompatible = 0x0200,
}
enum E_Weight {
Light = 25,
Normal = 50,
DemiBold = 63,
Bold = 75,
Black = 87,
}
enum E_Stretch {
UltraCondensed = 50,
ExtraCondensed = 62,
Condensed = 75,
SemiCondensed = 87,
Unstretched = 100,
SemiExpanded = 112,
Expanded = 125,
ExtraExpanded = 150,
UltraExpanded = 200,
}
enum E_Script {
Latin = 0,
Greek = 1,
Cyrillic = 2,
Armenian = 3,
Georgian = 4,
Runic = 5,
Ogham = 6,
SpacingModifiers = 7,
CombiningMarks = 8,
Hebrew = 9,
Arabic = 10,
Syriac = 11,
Thaana = 12,
Devanagari = 13,
Bengali = 14,
Gurmukhi = 15,
Gujarati = 16,
Oriya = 17,
Tamil = 18,
Telugu = 19,
Kannada = 20,
Malayalam = 21,
Sinhala = 22,
Thai = 23,
Lao = 24,
Tibetan = 25,
Myanmar = 26,
Khmer = 27,
Han = 28,
Hiragana = 29,
Katakana = 30,
Hangul = 31,
Bopomofo = 32,
Yi = 33,
Ethiopic = 34,
Cherokee = 35,
CanadianAboriginal = 36,
Mongolian = 37,
CurrencySymbols = 38,
LetterlikeSymbols = 39,
NumberForms = 40,
MathematicalOperators = 41,
TechnicalSymbols = 42,
GeometricSymbols = 43,
MiscellaneousSymbols = 44,
EnclosedAndSquare = 45,
Braille = 46,
Unicode = 47,
Tagalog = 48,
Hanunoo = 49,
Buhid = 50,
Tagbanwa = 51,
KatakanaHalfWidth = 52,
Limbu = 53,
TaiLe = 54,
NScripts = 55,
UnknownScript = NScripts,
NoScript = 56,
Han_Japanese = 57,
Han_SimplifiedChinese = 58,
Han_TraditionalChinese = 59,
Han_Korean = 60,
LastPrivateScript = 61,
}
public QFont() : this((Type) null) {
CreateQFontProxy();
NewQFont();
}
private void NewQFont() {
ProxyQFont().NewQFont();
}
public QFont(string family, int pointSize, int weight, bool italic) : this((Type) null) {
CreateQFontProxy();
NewQFont(family,pointSize,weight,italic);
}
private void NewQFont(string family, int pointSize, int weight, bool italic) {
ProxyQFont().NewQFont(family,pointSize,weight,italic);
}
public QFont(string family, int pointSize, int weight) : this((Type) null) {
CreateQFontProxy();
NewQFont(family,pointSize,weight);
}
private void NewQFont(string family, int pointSize, int weight) {
ProxyQFont().NewQFont(family,pointSize,weight);
}
public QFont(string family, int pointSize) : this((Type) null) {
CreateQFontProxy();
NewQFont(family,pointSize);
}
private void NewQFont(string family, int pointSize) {
ProxyQFont().NewQFont(family,pointSize);
}
public QFont(string family) : this((Type) null) {
CreateQFontProxy();
NewQFont(family);
}
private void NewQFont(string family) {
ProxyQFont().NewQFont(family);
}
public QFont(QFont arg1) : this((Type) null) {
CreateQFontProxy();
NewQFont(arg1);
}
private void NewQFont(QFont arg1) {
ProxyQFont().NewQFont(arg1);
}
public string Family() {
return ProxyQFont().Family();
}
public void SetFamily(string arg1) {
ProxyQFont().SetFamily(arg1);
}
public int PointSize() {
return ProxyQFont().PointSize();
}
public float PointSizeFloat() {
return ProxyQFont().PointSizeFloat();
}
public void SetPointSize(int arg1) {
ProxyQFont().SetPointSize(arg1);
}
public void SetPointSizeFloat(float arg1) {
ProxyQFont().SetPointSizeFloat(arg1);
}
public int PixelSize() {
return ProxyQFont().PixelSize();
}
public void SetPixelSize(int arg1) {
ProxyQFont().SetPixelSize(arg1);
}
public void SetPixelSizeFloat(float arg1) {
ProxyQFont().SetPixelSizeFloat(arg1);
}
public int Weight() {
return ProxyQFont().Weight();
}
public void SetWeight(int arg1) {
ProxyQFont().SetWeight(arg1);
}
public bool Bold() {
return ProxyQFont().Bold();
}
public void SetBold(bool arg1) {
ProxyQFont().SetBold(arg1);
}
public bool Italic() {
return ProxyQFont().Italic();
}
public void SetItalic(bool arg1) {
ProxyQFont().SetItalic(arg1);
}
public bool Underline() {
return ProxyQFont().Underline();
}
public void SetUnderline(bool arg1) {
ProxyQFont().SetUnderline(arg1);
}
public bool Overline() {
return ProxyQFont().Overline();
}
public void SetOverline(bool arg1) {
ProxyQFont().SetOverline(arg1);
}
public bool StrikeOut() {
return ProxyQFont().StrikeOut();
}
public void SetStrikeOut(bool arg1) {
ProxyQFont().SetStrikeOut(arg1);
}
public bool FixedPitch() {
return ProxyQFont().FixedPitch();
}
public void SetFixedPitch(bool arg1) {
ProxyQFont().SetFixedPitch(arg1);
}
public int StyleHint() {
return ProxyQFont().StyleHint();
}
public int StyleStrategy() {
return ProxyQFont().StyleStrategy();
}
public void SetStyleHint(int arg1, int arg2) {
ProxyQFont().SetStyleHint(arg1,arg2);
}
public void SetStyleHint(int arg1) {
ProxyQFont().SetStyleHint(arg1);
}
public void SetStyleStrategy(int s) {
ProxyQFont().SetStyleStrategy(s);
}
public int Stretch() {
return ProxyQFont().Stretch();
}
public void SetStretch(int arg1) {
ProxyQFont().SetStretch(arg1);
}
public bool RawMode() {
return ProxyQFont().RawMode();
}
public void SetRawMode(bool arg1) {
ProxyQFont().SetRawMode(arg1);
}
public bool ExactMatch() {
return ProxyQFont().ExactMatch();
}
public static bool operator==(QFont lhs, QFont arg1) {
return StaticQFont().op_equals(lhs,arg1);
}
public static bool operator!=(QFont lhs, QFont arg1) {
return !StaticQFont().op_equals(lhs,arg1);
}
public override bool Equals(object o) {
if (!(o is QFont)) { return false; }
return this == (QFont) o;
}
public bool IsCopyOf(QFont arg1) {
return ProxyQFont().IsCopyOf(arg1);
}
public uint Handle() {
return ProxyQFont().Handle();
}
public void SetRawName(string arg1) {
ProxyQFont().SetRawName(arg1);
}
public string RawName() {
return ProxyQFont().RawName();
}
public string Key() {
return ProxyQFont().Key();
}
public new string ToString() {
return ProxyQFont().ToString();
}
public bool FromString(string arg1) {
return ProxyQFont().FromString(arg1);
}
public string DefaultFamily() {
return ProxyQFont().DefaultFamily();
}
public string LastResortFamily() {
return ProxyQFont().LastResortFamily();
}
public string LastResortFont() {
return ProxyQFont().LastResortFont();
}
public QFont Resolve(QFont arg1) {
return ProxyQFont().Resolve(arg1);
}
public static string Substitute(string arg1) {
return StaticQFont().Substitute(arg1);
}
public static ArrayList Substitutes(string arg1) {
return StaticQFont().Substitutes(arg1);
}
public static ArrayList Substitutions() {
return StaticQFont().Substitutions();
}
public static void InsertSubstitution(string arg1, string arg2) {
StaticQFont().InsertSubstitution(arg1,arg2);
}
public static void InsertSubstitutions(string arg1, string[] arg2) {
StaticQFont().InsertSubstitutions(arg1,arg2);
}
public static void RemoveSubstitution(string arg1) {
StaticQFont().RemoveSubstitution(arg1);
}
public static void Initialize() {
StaticQFont().Initialize();
}
public static void Cleanup() {
StaticQFont().Cleanup();
}
public static void CacheStatistics() {
StaticQFont().CacheStatistics();
}
public static QFont DefaultFont() {
return StaticQFont().DefaultFont();
}
public static void SetDefaultFont(QFont arg1) {
StaticQFont().SetDefaultFont(arg1);
}
protected bool Dirty() {
return ProxyQFont().Dirty();
}
protected int DeciPointSize() {
return ProxyQFont().DeciPointSize();
}
~QFont() {
ProxyQFont().Dispose();
}
public void Dispose() {
ProxyQFont().Dispose();
}
}
}
//Auto-generated by kalyptus. DO NOT EDIT.
package org.kde.qt;
import java.lang.reflect.Proxy;
import org.kde.qt.SmokeInvocation;
import org.kde.qt.Qt;
import java.util.ArrayList;
public class QFont implements QtSupport {
protected Object _proxy = null;
interface QFontProxyInterface {
void newQFont();
void newQFont(String family, int pointSize, int weight, boolean italic);
void newQFont(String family, int pointSize, int weight);
void newQFont(String family, int pointSize);
void newQFont(String family);
void newQFont(QFont arg1);
String family();
void setFamily(String arg1);
int pointSize();
float pointSizeFloat();
void setPointSize(int arg1);
void setPointSizeFloat(float arg1);
int pixelSize();
void setPixelSize(int arg1);
void setPixelSizeFloat(float arg1);
int weight();
void setWeight(int arg1);
boolean bold();
void setBold(boolean arg1);
boolean italic();
void setItalic(boolean arg1);
boolean underline();
void setUnderline(boolean arg1);
boolean overline();
void setOverline(boolean arg1);
boolean strikeOut();
void setStrikeOut(boolean arg1);
boolean fixedPitch();
void setFixedPitch(boolean arg1);
int styleHint();
int styleStrategy();
void setStyleHint(int arg1, int arg2);
void setStyleHint(int arg1);
void setStyleStrategy(int s);
int stretch();
void setStretch(int arg1);
boolean rawMode();
void setRawMode(boolean arg1);
boolean exactMatch();
boolean op_equals(QFont arg1);
boolean op_not_equals(QFont arg1);
boolean isCopyOf(QFont arg1);
int handle();
void setRawName(String arg1);
String rawName();
String key();
String toString();
boolean fromString(String arg1);
String defaultFamily();
String lastResortFamily();
String lastResortFont();
QFont resolve(QFont arg1);
String substitute(String arg1);
ArrayList substitutes(String arg1);
ArrayList substitutions();
void insertSubstitution(String arg1, String arg2);
void insertSubstitutions(String arg1, String[] arg2);
void removeSubstitution(String arg1);
void initialize();
void cleanup();
void cacheStatistics();
QFont defaultFont();
void setDefaultFont(QFont arg1);
boolean dirty();
int deciPointSize();
void dispose();
boolean isDisposed();
}
protected QFont(Class[] interfaces, int index) {
interfaces[index] = QFontProxyInterface.class;
_proxy = Proxy.newProxyInstance(QFont.class.getClassLoader(),
interfaces,
new SmokeInvocation(this) );
}
private QFontProxyInterface proxyQFont() {
return (QFontProxyInterface) _proxy;
}
private static Object _static_proxy = null;
static {
_static_proxy = Proxy.newProxyInstance(QFont.class.getClassLoader(),
new Class[] { QFontProxyInterface.class },
new SmokeInvocation() );
}
private static QFontProxyInterface staticQFont() {
return (QFontProxyInterface) _static_proxy;
}
public static final int Helvetica = 0;
public static final int SansSerif = Helvetica;
public static final int Times = 1;
public static final int Serif = Times;
public static final int Courier = 2;
public static final int TypeWriter = Courier;
public static final int OldEnglish = 3;
public static final int Decorative = OldEnglish;
public static final int System = 4;
public static final int AnyStyle = 5;
public static final int PreferDefault = 0x0001;
public static final int PreferBitmap = 0x0002;
public static final int PreferDevice = 0x0004;
public static final int PreferOutline = 0x0008;
public static final int ForceOutline = 0x0010;
public static final int PreferMatch = 0x0020;
public static final int PreferQuality = 0x0040;
public static final int PreferAntialias = 0x0080;
public static final int NoAntialias = 0x0100;
public static final int OpenGLCompatible = 0x0200;
public static final int Light = 25;
public static final int Normal = 50;
public static final int DemiBold = 63;
public static final int Bold = 75;
public static final int Black = 87;
public static final int UltraCondensed = 50;
public static final int ExtraCondensed = 62;
public static final int Condensed = 75;
public static final int SemiCondensed = 87;
public static final int Unstretched = 100;
public static final int SemiExpanded = 112;
public static final int Expanded = 125;
public static final int ExtraExpanded = 150;
public static final int UltraExpanded = 200;
public static final int Latin = 0;
public static final int Greek = 1;
public static final int Cyrillic = 2;
public static final int Armenian = 3;
public static final int Georgian = 4;
public static final int Runic = 5;
public static final int Ogham = 6;
public static final int SpacingModifiers = 7;
public static final int CombiningMarks = 8;
public static final int Hebrew = 9;
public static final int Arabic = 10;
public static final int Syriac = 11;
public static final int Thaana = 12;
public static final int Devanagari = 13;
public static final int Bengali = 14;
public static final int Gurmukhi = 15;
public static final int Gujarati = 16;
public static final int Oriya = 17;
public static final int Tamil = 18;
public static final int Telugu = 19;
public static final int Kannada = 20;
public static final int Malayalam = 21;
public static final int Sinhala = 22;
public static final int Thai = 23;
public static final int Lao = 24;
public static final int Tibetan = 25;
public static final int Myanmar = 26;
public static final int Khmer = 27;
public static final int Han = 28;
public static final int Hiragana = 29;
public static final int Katakana = 30;
public static final int Hangul = 31;
public static final int Bopomofo = 32;
public static final int Yi = 33;
public static final int Ethiopic = 34;
public static final int Cherokee = 35;
public static final int CanadianAboriginal = 36;
public static final int Mongolian = 37;
public static final int CurrencySymbols = 38;
public static final int LetterlikeSymbols = 39;
public static final int NumberForms = 40;
public static final int MathematicalOperators = 41;
public static final int TechnicalSymbols = 42;
public static final int GeometricSymbols = 43;
public static final int MiscellaneousSymbols = 44;
public static final int EnclosedAndSquare = 45;
public static final int Braille = 46;
public static final int Unicode = 47;
public static final int Tagalog = 48;
public static final int Hanunoo = 49;
public static final int Buhid = 50;
public static final int Tagbanwa = 51;
public static final int KatakanaHalfWidth = 52;
public static final int Limbu = 53;
public static final int TaiLe = 54;
public static final int NScripts = 55;
public static final int UnknownScript = NScripts;
public static final int NoScript = 56;
public static final int Han_Japanese = 57;
public static final int Han_SimplifiedChinese = 58;
public static final int Han_TraditionalChinese = 59;
public static final int Han_Korean = 60;
public static final int LastPrivateScript = 61;
public QFont() {
this(new Class[] { null }, 0);
newQFont();
}
protected void newQFont() {
proxyQFont().newQFont();
}
public QFont(String family, int pointSize, int weight, boolean italic) {
this(new Class[] { null }, 0);
newQFont(family,pointSize,weight,italic);
}
protected void newQFont(String family, int pointSize, int weight, boolean italic) {
proxyQFont().newQFont(family,pointSize,weight,italic);
}
public QFont(String family, int pointSize, int weight) {
this(new Class[] { null }, 0);
newQFont(family,pointSize,weight);
}
protected void newQFont(String family, int pointSize, int weight) {
proxyQFont().newQFont(family,pointSize,weight);
}
public QFont(String family, int pointSize) {
this(new Class[] { null }, 0);
newQFont(family,pointSize);
}
protected void newQFont(String family, int pointSize) {
proxyQFont().newQFont(family,pointSize);
}
public QFont(String family) {
this(new Class[] { null }, 0);
newQFont(family);
}
protected void newQFont(String family) {
proxyQFont().newQFont(family);
}
public QFont(QFont arg1) {
this(new Class[] { null }, 0);
newQFont(arg1);
}
protected void newQFont(QFont arg1) {
proxyQFont().newQFont(arg1);
}
public String family() {
return proxyQFont().family();
}
public void setFamily(String arg1) {
proxyQFont().setFamily(arg1);
}
public int pointSize() {
return proxyQFont().pointSize();
}
public float pointSizeFloat() {
return proxyQFont().pointSizeFloat();
}
public void setPointSize(int arg1) {
proxyQFont().setPointSize(arg1);
}
public void setPointSizeFloat(float arg1) {
proxyQFont().setPointSizeFloat(arg1);
}
public int pixelSize() {
return proxyQFont().pixelSize();
}
public void setPixelSize(int arg1) {
proxyQFont().setPixelSize(arg1);
}
public void setPixelSizeFloat(float arg1) {
proxyQFont().setPixelSizeFloat(arg1);
}
public int weight() {
return proxyQFont().weight();
}
public void setWeight(int arg1) {
proxyQFont().setWeight(arg1);
}
public boolean bold() {
return proxyQFont().bold();
}
public void setBold(boolean arg1) {
proxyQFont().setBold(arg1);
}
public boolean italic() {
return proxyQFont().italic();
}
public void setItalic(boolean arg1) {
proxyQFont().setItalic(arg1);
}
public boolean underline() {
return proxyQFont().underline();
}
public void setUnderline(boolean arg1) {
proxyQFont().setUnderline(arg1);
}
public boolean overline() {
return proxyQFont().overline();
}
public void setOverline(boolean arg1) {
proxyQFont().setOverline(arg1);
}
public boolean strikeOut() {
return proxyQFont().strikeOut();
}
public void setStrikeOut(boolean arg1) {
proxyQFont().setStrikeOut(arg1);
}
public boolean fixedPitch() {
return proxyQFont().fixedPitch();
}
public void setFixedPitch(boolean arg1) {
proxyQFont().setFixedPitch(arg1);
}
public int styleHint() {
return proxyQFont().styleHint();
}
public int styleStrategy() {
return proxyQFont().styleStrategy();
}
public void setStyleHint(int arg1, int arg2) {
proxyQFont().setStyleHint(arg1,arg2);
}
public void setStyleHint(int arg1) {
proxyQFont().setStyleHint(arg1);
}
public void setStyleStrategy(int s) {
proxyQFont().setStyleStrategy(s);
}
public int stretch() {
return proxyQFont().stretch();
}
public void setStretch(int arg1) {
proxyQFont().setStretch(arg1);
}
public boolean rawMode() {
return proxyQFont().rawMode();
}
public void setRawMode(boolean arg1) {
proxyQFont().setRawMode(arg1);
}
public boolean exactMatch() {
return proxyQFont().exactMatch();
}
public boolean op_equals(QFont arg1) {
return proxyQFont().op_equals(arg1);
}
public boolean op_not_equals(QFont arg1) {
return proxyQFont().op_not_equals(arg1);
}
public boolean isCopyOf(QFont arg1) {
return proxyQFont().isCopyOf(arg1);
}
public int handle() {
return proxyQFont().handle();
}
public void setRawName(String arg1) {
proxyQFont().setRawName(arg1);
}
public String rawName() {
return proxyQFont().rawName();
}
public String key() {
return proxyQFont().key();
}
public String toString() {
return proxyQFont().toString();
}
public boolean fromString(String arg1) {
return proxyQFont().fromString(arg1);
}
public String defaultFamily() {
return proxyQFont().defaultFamily();
}
public String lastResortFamily() {
return proxyQFont().lastResortFamily();
}
public String lastResortFont() {
return proxyQFont().lastResortFont();
}
public QFont resolve(QFont arg1) {
return proxyQFont().resolve(arg1);
}
public static String substitute(String arg1) {
return staticQFont().substitute(arg1);
}
public static ArrayList substitutes(String arg1) {
return staticQFont().substitutes(arg1);
}
public static ArrayList substitutions() {
return staticQFont().substitutions();
}
public static void insertSubstitution(String arg1, String arg2) {
staticQFont().insertSubstitution(arg1,arg2);
}
public static void insertSubstitutions(String arg1, String[] arg2) {
staticQFont().insertSubstitutions(arg1,arg2);
}
public static void removeSubstitution(String arg1) {
staticQFont().removeSubstitution(arg1);
}
public static void initialize() {
staticQFont().initialize();
}
public static void cleanup() {
staticQFont().cleanup();
}
public static void cacheStatistics() {
staticQFont().cacheStatistics();
}
public static QFont defaultFont() {
return staticQFont().defaultFont();
}
public static void setDefaultFont(QFont arg1) {
staticQFont().setDefaultFont(arg1);
}
protected boolean dirty() {
return proxyQFont().dirty();
}
protected int deciPointSize() {
return proxyQFont().deciPointSize();
}
protected void finalize() throws InternalError {
proxyQFont().dispose();
}
public void dispose() {
proxyQFont().dispose();
}
public boolean isDisposed() {
return proxyQFont().isDisposed();
}
}
namespace Qt {
using System;
using System.Runtime.Remoting.Proxies;
using System.Runtime.Remoting.Messaging;
using Qt;
public class SmokeInvocation : RealProxy {
private Object _instance;
public SmokeInvocation(Type classToProxy, Object instance)
: base(classToProxy) {
_instance = instance;
}
public override IMessage Invoke(IMessage myMessage) {
Console.WriteLine("MyProxy 'Invoke method' Called...");
if (myMessage is IMethodCallMessage) {
Console.WriteLine("IMethodCallMessage");
}
if (myMessage is IMethodReturnMessage) {
Console.WriteLine("IMethodReturnMessage");
}
/*
if (myMessage is IConstructionCallMessage) {
}
*/
return null;
}
}
}