* add the EmptyClipboard() function as requested by tocer (http://sourceforge.net/users/tocer/) in SourceForge issue 2937981.
This commit is contained in:
parent
6699d0fb02
commit
0af4d0c0e4
@ -118,6 +118,15 @@ def GetData(format = win32defines.CF_UNICODETEXT):
|
||||
|
||||
return data
|
||||
|
||||
|
||||
#====================================================================
|
||||
def EmptyClipboard():
|
||||
if not win32functions.OpenClipboard(0):
|
||||
raise RuntimeError("Couldn't open clipboard")
|
||||
win32functions.EmptyClipboard()
|
||||
win32functions.CloseClipboard()
|
||||
|
||||
|
||||
#====================================================================
|
||||
# Todo: Implement setting clipboard data
|
||||
#def SetData(data, formats = [win32defines.CF_UNICODETEXT, ]):
|
||||
|
@ -158,6 +158,7 @@ GetModuleFileNameEx = ctypes.windll.psapi.GetModuleFileNameExW
|
||||
|
||||
GetClipboardData = ctypes.windll.user32.GetClipboardData
|
||||
OpenClipboard = ctypes.windll.user32.OpenClipboard
|
||||
EmptyClipboard = ctypes.windll.user32.EmptyClipboard
|
||||
CloseClipboard = ctypes.windll.user32.CloseClipboard
|
||||
CountClipboardFormats = ctypes.windll.user32.CountClipboardFormats
|
||||
EnumClipboardFormats = ctypes.windll.user32.EnumClipboardFormats
|
||||
|
Loading…
Reference in New Issue
Block a user