Include XPM under wxX11 for some samples; added comment about
non-working images in dragimag sample git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@14227 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
parent
eb90fb3ee8
commit
e334d0eac8
5 changed files with 581 additions and 520 deletions
|
|
@ -40,7 +40,7 @@
|
|||
// resources
|
||||
// --------------------------------------------------------------------------
|
||||
|
||||
#if defined(__WXGTK__) || defined(__WXMOTIF__) || defined(__WXMAC__)
|
||||
#if defined(__WXGTK__) || defined(__WXMOTIF__) || defined(__WXMAC__) || defined(__WXX11__)
|
||||
// logo for the about dialog
|
||||
#include "bitmaps/life.xpm"
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -41,7 +41,7 @@
|
|||
// resources
|
||||
// --------------------------------------------------------------------------
|
||||
|
||||
#if defined(__WXGTK__) || defined(__WXMOTIF__) || defined(__WXMAC__) || defined(__WXMGL__)
|
||||
#if defined(__WXGTK__) || defined(__WXMOTIF__) || defined(__WXMAC__) || defined(__WXMGL__) || defined(__WXX11__)
|
||||
// application icon
|
||||
#include "mondrian.xpm"
|
||||
|
||||
|
|
|
|||
|
|
@ -36,7 +36,7 @@
|
|||
|
||||
#include "dragimag.h"
|
||||
|
||||
#if defined(__WXGTK__) || defined(__WXMOTIF__) || defined(__WXMAC__) || defined(__WXMGL__)
|
||||
#if defined(__WXGTK__) || defined(__WXMOTIF__) || defined(__WXMAC__) || defined(__WXMGL__) || defined(__WXX11__)
|
||||
#include "mondrian.xpm"
|
||||
#include "dragicon.xpm"
|
||||
#endif
|
||||
|
|
@ -190,7 +190,7 @@ void MyCanvas::OnMouseEvent(wxMouseEvent& event)
|
|||
{
|
||||
// Can anyone explain why this test is necessary,
|
||||
// to prevent a gcc error?
|
||||
#ifdef __WXMOTIF__
|
||||
#if defined(__WXMOTIF__) || defined(__WXX11__)
|
||||
wxIcon icon(dragicon_xpm);
|
||||
#else
|
||||
wxIcon icon(wxICON(dragicon));
|
||||
|
|
@ -394,6 +394,9 @@ bool MyApp::OnInit()
|
|||
{
|
||||
wxString filename;
|
||||
filename.Printf(wxT("%s%d.png"), (const wxChar*)rootName, i);
|
||||
/* For some reason under wxX11, the 2nd LoadFile in this loop fails, with
|
||||
a BadMatch inside CreateFromImage (inside ConvertToBitmap). This happens even if you copy
|
||||
the first file over the second file. */
|
||||
if (image.LoadFile(filename, wxBITMAP_TYPE_PNG))
|
||||
{
|
||||
DragShape* newShape = new DragShape(image.ConvertToBitmap());
|
||||
|
|
|
|||
|
|
@ -614,6 +614,9 @@ bool wxBitmap::CreateFromImage( const wxImage& image, int depth )
|
|||
|
||||
GC gc = XCreateGC( xdisplay, (Pixmap) M_BMPDATA->m_pixmap, 0, NULL );
|
||||
XPutImage( xdisplay, (Pixmap) M_BMPDATA->m_pixmap, gc, data_image, 0, 0, 0, 0, width, height );
|
||||
#ifdef __WXDEBUG__
|
||||
XSync(wxGlobalDisplay(), False);
|
||||
#endif
|
||||
|
||||
XDestroyImage( data_image );
|
||||
XFreeGC( xdisplay, gc );
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue