Electronics & Programming

develissimo

Open Source electronics development and programming

  • You are not logged in.
  • Root
  • » KiCAD
  • » [Kicad-developers] [PATCH] wxWidgets 2.8 under Graphics Abstraction Layer Lib (GAL) [RSS Feed]

#1 Dec. 13, 2010 19:50:07

Dick H.
Registered: 2009-11-02
Reputation: +  0  -
Profile   Send e-mail  

[Kicad-developers] [PATCH] wxWidgets 2.8 under Graphics Abstraction Layer Lib (GAL)


Wayne and Torsten,

Here is a patch that allows the GAL to compile and run on Ubuntu Lucid x86_64

with *version wxWidgets 2.8.x*

The key thing is the wxWidgets version. The repo seems to be dependent on 2.9.


Moving forward, we're going to need write access to a branch holding this
stuff. I
think we should keep it a separate branch. Kicad's Cmake can be told to do a
checkout
later.

Thanks again to Torsten for what looks to be:

1) great work,
2) conforming to the coding standards, and
3) for patience in the supreme.


Regards,


Dick=== modified file 'gal/cairo_gal.cpp'
--- gal/cairo_gal.cpp 2010-10-17 22:57:11 +0000
+++ gal/cairo_gal.cpp 2010-12-13 19:39:57 +0000
@@ -149,15 +149,26 @@
#if defined( __WXGTK__ )
// Create a new wxClientDC and get the native implementation
m_clientDC = new wxClientDC( this );
+
+#if wxCHECK_VERSION( 2, 9, 0 )
+
m_clientDCimpl = new wxClientDCImpl( m_bufferedDC, this );
m_drawable = m_clientDCimpl -> m_gdkwindow;
+
+#elif wxCHECK_VERSION( 2,8,0 )
+ m_clientDCimpl = new wxClientDC( this );
+ m_drawable = m_clientDCimpl -> m_window;
+#else
+#error "need wx widgets 2.8 as a minimum"
+#endif
+
m_cairoImage = gdk_cairo_create( m_buffer );
#endif

#if defined(__WXMSW__)
// Get the handle of the current window
m_clientDC = new wxClientDC( this );
- m_hdc = ( ( HDC )( m_clientDC->GetHDC() ) );
+ m_hdc = (HDC) m_clientDC->GetHDC();

// Create a buffer
m_dcBuffer = CreateCompatibleDC( m_hdc );

=== modified file 'gal/cairo_gal.h'
--- gal/cairo_gal.h 2010-10-17 22:57:11 +0000
+++ gal/cairo_gal.h 2010-12-03 08:50:29 +0000
@@ -217,7 +217,7 @@
wxClientDC* m_clientDC; //!< Client device context; required because drawing outside the paint event
wxBufferedDC* m_bufferedDC; //!< The buffered drawing context
GdkPixmap* m_buffer; //!< The GDK pixmap
- wxClientDCImpl* m_clientDCimpl; //< The system dependent implementation of a ClientDC
+ wxClientDC* m_clientDCimpl; //< The system dependent implementation of a ClientDC
GdkDrawable* m_drawable; //!< Gdk Drawable (Drawables are either GdkWindow or GdkPixmap objects)
#endif


=== modified file 'gal/opengl_gal.cpp'
--- gal/opengl_gal.cpp 2010-10-17 22:57:11 +0000
+++ gal/opengl_gal.cpp 2010-12-03 09:31:29 +0000
@@ -44,7 +44,7 @@
#endif

OPENGL_GAL::OPENGL_GAL( wxFrame* aParent, wxSize aScreenSize ) :
- wxGLCanvas( aParent, wxID_ANY, glAttributes, wxDefaultPosition, wxDefaultSize, 0, wxT(
+ wxGLCanvas( aParent, wxID_ANY, (int*) glAttributes, wxDefaultPosition, wxDefaultSize, 0, wxT(
"GLCanvas" ) )

{

=== modified file 'gal/test/test_gal.cpp'
--- gal/test/test_gal.cpp 2010-10-17 22:57:11 +0000
+++ gal/test/test_gal.cpp 2010-12-03 09:32:41 +0000
@@ -618,7 +618,7 @@
wxCMD_LINE_PARAM,
NULL,
NULL,
- "",
+ wxT(""),
wxCMD_LINE_VAL_STRING, wxCMD_LINE_PARAM_MULTIPLE },
{ wxCMD_LINE_NONE } };_______________________________________________
Mailing list:https://launchpad.net/~kicad-developersPost to : kicad-developers@lists.launchpad.net
Unsubscribe :https://launchpad.net/~kicad-developersMore help :https://help.launchpad.net/ListHelp

Offline

  • Root
  • » KiCAD
  • » [Kicad-developers] [PATCH] wxWidgets 2.8 under Graphics Abstraction Layer Lib (GAL) [RSS Feed]

Board footer

Moderator control

Enjoy the 17th of October
PoweredBy

The Forums are managed by develissimo stuff members, if you find any issues or misplaced content please help us to fix it. Thank you! Tell us via Contact Options
Leave a Message
Welcome to Develissimo Live Support