include(convert_glib.m4) _EQUAL(gint8[],gint8*) _EQUAL(guchar,guint8) _EQUAL(guchar*,guint8*) _EQUAL(gfloat,float) # Enums _CONV_ENUM(Gdk,AxisUse) _CONV_ENUM(Gdk,ByteOrder) _CONV_ENUM(Gdk,CapStyle) _CONV_ENUM(Gdk,Colorspace) _CONV_ENUM(Gdk,CursorType) _CONV_ENUM(Gdk,DragAction) _CONV_ENUM(Gdk,DragProtocol) _CONV_ENUM(Gdk,EventMask) _CONV_ENUM(Gdk,EventType) _CONV_ENUM(Gdk,ExtensionMode) _CONV_ENUM(Gdk,Fill) _CONV_ENUM(Gdk,FillRule) _CONV_ENUM(Gdk,Function) _CONV_ENUM(Gdk,GCValuesMask) _CONV_ENUM(Gdk,Gravity) _CONV_ENUM(Gdk,ImageType) _CONV_ENUM(Gdk,InputCondition) _CONV_ENUM(Gdk,InputMode) _CONV_ENUM(Gdk,InputSource) _CONV_ENUM(Gdk,InterpType) _CONV_ENUM(Gdk,JoinStyle) _CONV_ENUM(Gdk,LineStyle) _CONV_ENUM(Gdk,ModifierType) _CONV_ENUM(Gdk,OverlapType) _CONV_ENUM(Gdk,PixbufAlphaMode) _CONV_ENUM(Gdk,RgbDither) _CONV_ENUM(Gdk,Status) _CONV_ENUM(Gdk,SubwindowMode) _CONV_ENUM(Gdk,VisualType) _CONV_ENUM(Gdk,WindowAttributesType) _CONV_ENUM(Gdk,WindowEdge) _CONV_ENUM(Gdk,WindowHints) _CONV_ENUM(Gdk,WindowState) _CONV_ENUM(Gdk,WindowType) _CONV_ENUM(Gdk,WindowTypeHint) _CONV_ENUM(Gdk,WMDecoration) _CONV_ENUM(Gdk,WMFunction) _CONV_ENUM(Gdk,GrabStatus) _CONV_ENUM(Gdk,PixbufRotation) _CONVERSION(`Gdk::EventMask',`gint',`$3') _CONVERSION(`gint',`Gdk::EventMask',`static_cast($3)') _CONVERSION(`ModifierType&',`GdkModifierType*',`(($2) &($3))') _CONVERSION(`WMDecoration&',`GdkWMDecoration*',`(($2) &($3))') _CONVERSION(`GdkDragProtocol&',`GdkDragProtocol*',`&($3)') _CONVERSION(`GdkRectangle&',`GdkRectangle*',`&$3',`*$3') _CONVERSION(`GdkRgbCmap&',`GdkRgbCmap*',`&$3',`*$3') _CONVERSION(`GdkKeymap*',`const GdkKeymap*',`$3') # for GtkStyle public struct members _CONVERSION(`Gdk::Color',`GdkColor', `(*($3).gobj())') _CONVERSION(`GdkColor',`Gdk::Color', `Gdk::Color(const_cast(&($3)), true)') # Ref (gdkmm) -> Ptr (gtk+) _CONVERSION(`Color&',`GdkColor*',($3).gobj()) _CONVERSION(`const Gdk::Color&',`const GdkColor*',`($3).gobj()') _CONVERSION(`const Color&',`const GdkColor*',`($3).gobj()') _CONVERSION(`Rectangle&',`GdkRectangle*',($3).gobj()) _CONVERSION(`Gdk::Rectangle&',`GdkRectangle*',($3).gobj()) _CONVERSION(`Font&',`GdkFont*',($3).gobj()) #_CONVERSION(`Region&',`GdkRegion*',($3).gobj()) _CONVERSION(`const Region&',`GdkRegion*',const_cast<$2>(($3).gobj())) _CONVERSION(`const Gdk::Region&',`GdkRegion*',const_cast<$2>(($3).gobj())) _CONVERSION(`const Glib::RefPtr&',`GdkColormap*',__CONVERT_REFPTR_TO_P) _CONVERSION(`const Glib::RefPtr&',`GdkPixmap*',__CONVERT_REFPTR_TO_P) _CONVERSION(`const Glib::RefPtr&',`GdkWindow*',__CONVERT_REFPTR_TO_P) _CONVERSION(`const Glib::RefPtr&',`GdkWindow*',__CONVERT_REFPTR_TO_P) _CONVERSION(`const Glib::RefPtr&',`GdkPixmap*',__CONVERT_REFPTR_TO_P) _CONVERSION(`const Glib::RefPtr&',`GdkPixmap*',__CONVERT_REFPTR_TO_P) _CONVERSION(`const Glib::RefPtr&',`GdkBitmap*',__CONVERT_REFPTR_TO_P) _CONVERSION(`const Glib::RefPtr&',`GdkBitmap*',__CONVERT_REFPTR_TO_P) _CONVERSION(`const Glib::RefPtr&',`GdkColormap*',__CONVERT_REFPTR_TO_P) _CONVERSION(`const Glib::RefPtr&',`GdkColormap*',__CONVERT_CONST_REFPTR_TO_P_SUN(Colormap)) _CONVERSION(`const Glib::RefPtr&',`GdkGC*',`Glib::unwrap($3)') _CONVERSION(`const Glib::RefPtr&',`GdkGC*',__CONVERT_CONST_REFPTR_TO_P_SUN(GC)) _CONVERSION(`const Glib::RefPtr&',`GdkGC*',__CONVERT_REFPTR_TO_P) _CONVERSION(`const Glib::RefPtr&',`GdkDrawable*',__CONVERT_REFPTR_TO_P) _CONVERSION(`const Glib::RefPtr&',`GdkDrawable*',__CONVERT_REFPTR_TO_P) _CONVERSION(`const Glib::RefPtr&',`GdkDrawable*',__CONVERT_CONST_REFPTR_TO_P_SUN(Drawable)) _CONVERSION(`const Glib::RefPtr&',`GdkImage*',__CONVERT_REFPTR_TO_P) _CONVERSION(`const Glib::RefPtr&',`GdkImage*',__CONVERT_CONST_REFPTR_TO_P_SUN(Image)) _CONVERSION(`const Glib::RefPtr&',`GdkImage*',__CONVERT_REFPTR_TO_P) _CONVERSION(`const Glib::RefPtr&',`GdkPixbuf*',__CONVERT_REFPTR_TO_P) _CONVERSION(`const Glib::RefPtr&',`GdkPixbuf*',__CONVERT_CONST_REFPTR_TO_P_SUN(Pixbuf)) _CONVERSION(`const Glib::RefPtr&',`GdkPixbuf*',__CONVERT_REFPTR_TO_P) _CONVERSION(`Glib::RefPtr',`GdkPixbuf*',__CONVERT_REFPTR_TO_P) _CONVERSION(`const Glib::RefPtr&',`GdkPixbufAnimation*',__CONVERT_REFPTR_TO_P) _CONVERSION(`const Glib::RefPtr&',`GdkPixbufAnimationIter*',__CONVERT_REFPTR_TO_P) _CONVERSION(`const Glib::RefPtr&',`GdkDragContext*',__CONVERT_REFPTR_TO_P) _CONVERSION(`const Glib::RefPtr&',`GdkDisplay*',__CONVERT_REFPTR_TO_P) _CONVERSION(`const Glib::RefPtr&',`GdkScreen*',__CONVERT_REFPTR_TO_P) _CONVERSION(`const Glib::RefPtr&',`GdkDisplay*',__CONVERT_REFPTR_TO_P) _CONVERSION(`const Glib::RefPtr&',`GdkScreen*',__CONVERT_REFPTR_TO_P) _CONVERSION(`const Glib::RefPtr&',`GdkDevice*',__CONVERT_REFPTR_TO_P) _CONVERSION(`const Glib::RefPtr&',`GdkScreen*',__CONVERT_CONST_REFPTR_TO_P_SUN(Gdk::Screen)) define(`__CFR2P',`const_cast<$`'2>($`'3.gobj())') _CONVERSION(const Font&,GdkFont*,__CFR2P) _CONVERSION(const Gdk::Color&,GdkColor*,__CFR2P) _CONVERSION(const Color&,GdkColor*,__CFR2P) _CONVERSION(const Gdk::Rectangle&,GdkRectangle*,__CFR2P) _CONVERSION(const Rectangle&,GdkRectangle*,__CFR2P) _CONVERSION(const Gdk::Geometry&,GdkGeometry*,const_cast<$2>(&($3))) _CONVERSION(const Geometry&,GdkGeometry*,const_cast<$2>(&($3))) _CONVERSION(const RgbCmap&,GdkRgbCmap*,__CFR2P) _CONVERSION(`Gdk::Rectangle*',`GdkRectangle*',`Glib::unwrap($3)') _CONVERSION(`const Gdk::Rectangle*',`GdkRectangle*',`Glib::unwrap(const_cast($3))') _CONVERSION(`GdkRectangle*',`Gdk::Rectangle*',`&Glib::wrap($3)') _CONVERSION(`GdkRectangle*',`const Gdk::Rectangle*',`&Glib::wrap($3)') _CONVERSION(`GdkRectangle*',`const Gdk::Rectangle&',`Glib::wrap($3)') # Special treatment for the Sun Forte compiler #_CONVERSION(const Glib::RefPtr&,GdkPixmap*,__CONVERT_CONST_REFPTR_TO_P) #_CONVERSION(const Glib::RefPtr&,GdkWindow*,__CONVERT_CONST_REFPTR_TO_P) #_CONVERSION(const Glib::RefPtr&,GdkColormap*,__CONVERT_CONST_REFPTR_TO_P) #_CONVERSION(const Glib::RefPtr&,GdkVisual*,__CONVERT_CONST_REFPTR_TO_P) #_CONVERSION(const Glib::RefPtr&,GdkBitmap*,__CONVERT_CONST_REFPTR_TO_P) #_CONVERSION(const Glib::RefPtr&,GdkImage*,__CONVERT_CONST_REFPTR_TO_P) #_CONVERSION(const Glib::RefPtr&,GdkGC*,__CONVERT_CONST_REFPTR_TO_P) _CONVERSION(`const Glib::RefPtr&', `GdkPixmap*',__CONVERT_CONST_REFPTR_TO_P_SUN(Gdk::Pixmap)) _CONVERSION(`const Glib::RefPtr&', `GdkWindow*',__CONVERT_CONST_REFPTR_TO_P_SUN(Gdk::Window)) _CONVERSION(`const Glib::RefPtr&', `GdkWindow*',__CONVERT_CONST_REFPTR_TO_P_SUN(Gdk::Window)) _CONVERSION(`const Glib::RefPtr&', `GdkColormap*',__CONVERT_CONST_REFPTR_TO_P_SUN(Gdk::Colormap)) _CONVERSION(`const Glib::RefPtr&', `GdkVisual*',__CONVERT_CONST_REFPTR_TO_P_SUN(Gdk::Visual)) _CONVERSION(`const Glib::RefPtr&', `GdkBitmap*',__CONVERT_CONST_REFPTR_TO_P_SUN(Gdk::Bitmap)) _CONVERSION(`const Glib::RefPtr&', `GdkImage*',__CONVERT_CONST_REFPTR_TO_P_SUN(Gdk::Image)) _CONVERSION(`const Glib::RefPtr&', `GdkImage*',__CONVERT_CONST_REFPTR_TO_P_SUN(Image)) _CONVERSION(`const Glib::RefPtr&', `GdkGC*',__CONVERT_CONST_REFPTR_TO_P_SUN(Gdk::GC)) _CONVERSION(`const Glib::RefPtr&', `GdkGC*',__CONVERT_CONST_REFPTR_TO_P_SUN(GC)) #_CONVERSION(`const Glib::RefPtr&', `GdkDrawable*',__CONVERT_CONST_REFPTR_TO_P_SUN(Gdk::Drawable)) #_CONVERSION(`const Glib::RefPtr&', `GdkDrawable*',__CONVERT_CONST_REFPTR_TO_P_SUN(Drawable)) #_CONVERSION(`const Glib::RefPtr&', `GdkDrawable*',__CONVERT_CONST_REFPTR_TO_P_SUN(Drawable)) _CONVERSION(`GdkWindow*',`Glib::RefPtr', `Glib::wrap((GdkWindowObject*)($3))') _CONVERSION(`GdkWindow*',`Glib::RefPtr', `Glib::wrap((GdkWindowObject*)($3))') _CONVERSION(`GdkWindow*',`Glib::RefPtr', `Glib::wrap((GdkWindowObject*)($3))') _CONVERSION(`GdkWindow*',`Glib::RefPtr', `Glib::wrap((GdkWindowObject*)($3))') _CONVERSION(`GdkPixmap*',`Glib::RefPtr', `Glib::wrap((GdkPixmapObject*)($3))') _CONVERSION(`GdkPixmap*',`Glib::RefPtr', `Glib::wrap((GdkPixmapObject*)($3))') _CONVERSION(`GdkPixmap*',`Glib::RefPtr', `Glib::wrap((GdkPixmapObject*)($3))') _CONVERSION(`GdkPixmap*',`Glib::RefPtr', `Glib::wrap((GdkPixmapObject*)($3))') _CONVERSION(`GdkColormap*',`Glib::RefPtr', `Glib::wrap($3)') _CONVERSION(`GdkColormap*',`Glib::RefPtr', `Glib::wrap($3)') _CONVERSION(`GdkColormap*',`Glib::RefPtr', `Glib::wrap($3)') _CONVERSION(`GdkVisual*',`Glib::RefPtr', `Glib::wrap($3)') _CONVERSION(`GdkVisual*',`Glib::RefPtr', `Glib::wrap($3)') _CONVERSION(`GdkVisual*',`Glib::RefPtr', `Glib::wrap($3)') _CONVERSION(`GdkImage*',`Glib::RefPtr', `Glib::wrap($3)') _CONVERSION(`GdkPixbuf*',`Glib::RefPtr', `Glib::wrap($3)') _CONVERSION(`GdkPixbuf*',`Glib::RefPtr', `Glib::wrap($3)') _CONVERSION(`GdkPixbuf*',`Glib::RefPtr', `Glib::wrap($3)') _CONVERSION(`GdkPixbufAnimationIter*',`Glib::RefPtr', `Glib::wrap($3)') _CONVERSION(`GdkPixbuf*',`Glib::RefPtr', Glib::wrap($3)) _CONVERSION(`GdkPixbufAnimation*',`Glib::RefPtr', `Glib::wrap($3)') _CONVERSION(`GdkPixbufAnimation*',`Glib::RefPtr', `Glib::wrap($3)') _CONVERSION(`GdkGC*',`Glib::RefPtr', `Glib::wrap($3)') _CONVERSION(`GdkGC*',`Glib::RefPtr', `Glib::wrap($3)') _CONVERSION(`GdkDisplay*',`Glib::RefPtr', `Glib::wrap($3)') _CONVERSION(`GdkDisplay*',`Glib::RefPtr', `Glib::wrap($3)') _CONVERSION(`GdkDisplay*',`Glib::RefPtr', `Glib::wrap($3)') _CONVERSION(`GdkDisplay*',`Glib::RefPtr', `Glib::wrap($3)') _CONVERSION(`GdkDisplayManager*',`Glib::RefPtr', `Glib::wrap($3)') _CONVERSION(`GdkDisplayManager*',`Glib::RefPtr', `Glib::wrap($3)') _CONVERSION(`GdkScreen*',`Glib::RefPtr', `Glib::wrap($3)') _CONVERSION(`GdkScreen*',`Glib::RefPtr', `Glib::wrap($3)') _CONVERSION(`GdkScreen*',`Glib::RefPtr', `Glib::wrap($3)') _CONVERSION(`GdkScreen*',`Glib::RefPtr', `Glib::wrap($3)') _CONVERSION(`GdkDevice*',`Glib::RefPtr', `Glib::wrap($3)') _CONVERSION(`GdkDevice*',`Glib::RefPtr', `Glib::wrap($3)') _CONVERSION(`GdkDevice*',`Glib::RefPtr', `Glib::wrap($3)') _CONVERSION(`GdkDevice*',`Glib::RefPtr', `Glib::wrap($3)') _CONVERSION(`gpointer',`const void*', `($2)($3)') # Glib::ListHandle<> (gdkmm) -> GList (gdk) _CONVERSION(`const Glib::ListHandle< Glib::RefPtr >&',`GList*',`$3.data()') _CONVERSION(`const Glib::ListHandle< Glib::RefPtr >&',`GList*',`$3.data()') # GList (gdk) -> Glib::ListHandle<> (gdkmm) _CONVERSION(`GList*',`Glib::ListHandle< Glib::RefPtr >',`$2($3, Glib::OWNERSHIP_SHALLOW)') _CONVERSION(`GList*',`Glib::ListHandle< Glib::RefPtr >',`$2($3, Glib::OWNERSHIP_SHALLOW)') _CONVERSION(`GList*',`Glib::ListHandle< Glib::RefPtr >',`$2($3, Glib::OWNERSHIP_NONE)') _CONVERSION(`GList*',`Glib::ListHandle< Glib::RefPtr >',`$2($3, Glib::OWNERSHIP_NONE)') _CONVERSION(`GList*',`Glib::ListHandle< Glib::RefPtr >',`$2($3, Glib::OWNERSHIP_SHALLOW)') _CONVERSION(`GList*',`Glib::ListHandle< Glib::RefPtr >',`$2($3, Glib::OWNERSHIP_SHALLOW)') _CONVERSION(`GList*',`Glib::ListHandle< Glib::RefPtr >',`$2($3, Glib::OWNERSHIP_SHALLOW)') _CONVERSION(`GList*',`Glib::ListHandle< Glib::RefPtr >',`$2($3, Glib::OWNERSHIP_SHALLOW)') _CONVERSION(`GSList*',`Glib::SListHandle< Glib::RefPtr >',`$2($3, Glib::OWNERSHIP_SHALLOW)') _CONVERSION(`GSList*',`Glib::SListHandle< Glib::RefPtr >',`$2($3, Glib::OWNERSHIP_SHALLOW)') _CONVERSION(`gchar**',`Glib::StringArrayHandle',`$2($3)') # XPM data _CONVERSION(`const char*const*',`const char**',`const_cast($3)',`$3') _CONVERSION(GdkFont*, Gdk::Font, `Gdk::Font($3)') _CONVERSION(GdkEvent*, Event, `Event($3)') _CONVERSION(GdkRegion*, Region, `Region($3)') _CONVERSION(GdkRegion*, Gdk::Region, `Gdk::Region($3)') _CONVERSION(`GdkTimeCoord**&',`GdkTimeCoord***',`&($3)') dnl _CONVERSION(GdkPixmap*,Gdk::Pixmap&,`Glib::unwrap_boxed($3)',`$3') dnl _CONVERSION(GdkBitmap*,Gdk::Bitmap&,`Glib::unwrap_boxed($3)',`$3') dnl Atom -> string and vice versa _CONVERSION(`GdkAtom',`Glib::ustring',`Gdk::AtomString::to_cpp_type($3)') _CONVERSION(`const Glib::ustring&', `GdkAtom', `Gdk::AtomString::to_c_type($3)') _CONVERSION(`Glib::ustring&',`GdkAtom',`Gdk::AtomString::to_c_type($3)') dnl NativeWindow _CONVERSION(`GdkNativeWindow',`Gdk::NativeWindow',`($2)($3)') _CONVERSION(`GdkNativeWindow',`NativeWindow',`($2)($3)') _CONVERSION(`Gdk::NativeWindow',`GdkNativeWindow',`($2)($3)') _CONVERSION(`NativeWindow',`GdkNativeWindow',`($2)($3)') _CONVERSION(`GdkEvent*',`const GdkEvent*',`($2)($3)') _CONVERSION(`GdkDragContext*',`Glib::RefPtr',Glib::wrap($3, true))