Move get_shift_from_mask() to clipboard_win32 because this function is used for Windows clipboard.

This commit is contained in:
David Capello 2010-08-12 00:22:18 -03:00
parent 47fd3a17e5
commit 9f68fd459d
2 changed files with 9 additions and 11 deletions

View File

@ -48,8 +48,6 @@
#include "widgets/colbar.h"
#include "widgets/statebar.h"
//static ase_uint32 get_shift_from_mask(ase_uint32 mask);
#if defined ALLEGRO_WINDOWS
#include <winalleg.h>
#include "util/clipboard_win32.h"
@ -143,15 +141,6 @@ static bool copy_from_sprite(const Sprite* sprite)
return true;
}
// static ase_uint32 get_shift_from_mask(ase_uint32 mask)
// {
// ase_uint32 shift = 0;
// for (shift=0; shift<32; ++shift)
// if (mask & (1 << shift))
// return shift;
// return shift;
// }
bool clipboard::can_paste()
{
#ifdef ALLEGRO_WINDOWS

View File

@ -26,6 +26,15 @@
#define CF_DIBV5 17
#endif
static ase_uint32 get_shift_from_mask(ase_uint32 mask)
{
ase_uint32 shift = 0;
for (shift=0; shift<32; ++shift)
if (mask & (1 << shift))
return shift;
return shift;
}
/**
* Returns true if the Windows clipboard contains a bitmap (CF_DIB
* format).