factoring out common carbon/non-carbon clipboard support code
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_4_BRANCH@19062 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -214,6 +214,10 @@ OSStatus UMAGetHelpMenu(
|
|||||||
|
|
||||||
OSStatus UMADrawThemePlacard( const Rect *inRect , ThemeDrawState inState ) ;
|
OSStatus UMADrawThemePlacard( const Rect *inRect , ThemeDrawState inState ) ;
|
||||||
|
|
||||||
|
// clipboard
|
||||||
|
|
||||||
|
OSStatus UMAPutScrap( Size size , OSType type , void *data ) ;
|
||||||
|
|
||||||
// accessor helpers
|
// accessor helpers
|
||||||
|
|
||||||
#if !TARGET_CARBON
|
#if !TARGET_CARBON
|
||||||
|
@@ -1,5 +1,8 @@
|
|||||||
#include "wx/defs.h"
|
#include "wx/defs.h"
|
||||||
#include "wx/dc.h"
|
#include "wx/dc.h"
|
||||||
|
#ifndef __DARWIN__
|
||||||
|
#include <Scrap.h>
|
||||||
|
#endif
|
||||||
#include "wx/mac/uma.h"
|
#include "wx/mac/uma.h"
|
||||||
#include <MacTextEditor.h>
|
#include <MacTextEditor.h>
|
||||||
|
|
||||||
@@ -788,3 +791,18 @@ wxMacPortStateHelper::~wxMacPortStateHelper()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
OSStatus UMAPutScrap( Size size , OSType type , void *data )
|
||||||
|
{
|
||||||
|
OSStatus err = noErr ;
|
||||||
|
#if !TARGET_CARBON
|
||||||
|
err = PutScrap( size , type , data ) ;
|
||||||
|
#else
|
||||||
|
ScrapRef scrap;
|
||||||
|
err = GetCurrentScrap (&scrap);
|
||||||
|
if ( !err )
|
||||||
|
{
|
||||||
|
err = PutScrapFlavor (scrap, type , 0, size, data);
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
return err ;
|
||||||
|
}
|
||||||
|
@@ -1,5 +1,8 @@
|
|||||||
#include "wx/defs.h"
|
#include "wx/defs.h"
|
||||||
#include "wx/dc.h"
|
#include "wx/dc.h"
|
||||||
|
#ifndef __DARWIN__
|
||||||
|
#include <Scrap.h>
|
||||||
|
#endif
|
||||||
#include "wx/mac/uma.h"
|
#include "wx/mac/uma.h"
|
||||||
#include <MacTextEditor.h>
|
#include <MacTextEditor.h>
|
||||||
|
|
||||||
@@ -788,3 +791,18 @@ wxMacPortStateHelper::~wxMacPortStateHelper()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
OSStatus UMAPutScrap( Size size , OSType type , void *data )
|
||||||
|
{
|
||||||
|
OSStatus err = noErr ;
|
||||||
|
#if !TARGET_CARBON
|
||||||
|
err = PutScrap( size , type , data ) ;
|
||||||
|
#else
|
||||||
|
ScrapRef scrap;
|
||||||
|
err = GetCurrentScrap (&scrap);
|
||||||
|
if ( !err )
|
||||||
|
{
|
||||||
|
err = PutScrapFlavor (scrap, type , 0, size, data);
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
return err ;
|
||||||
|
}
|
||||||
|
Reference in New Issue
Block a user