Skip to content

Commit

Permalink
feat: add new format
Browse files Browse the repository at this point in the history
  • Loading branch information
AceofSpades5757 committed Apr 12, 2024
1 parent 2a57bdf commit dfb0623
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/clipboard/formats.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,10 @@
from enum import Enum
from enum import EnumMeta
from typing import Any
from typing import List
from typing import Optional

from clipboard._c_interface import CF_HTML
from clipboard._c_interface import CF_RTF
from clipboard._c_interface import EnumClipboardFormats
from clipboard._c_interface import GetClipboardFormatNameA


Expand All @@ -23,14 +21,21 @@ def __contains__(cls, item: Any):


class ClipboardFormat(Enum, metaclass=ExtendedEnum):
# Constants
CF_TEXT = 1
CF_UNICODETEXT = 13
CF_LOCALE = 16
CF_DIB = 8
"""A memory object containing a
[BITMAPINFO](https://learn.microsoft.com/en-us/windows/win32/api/wingdi/
ns-wingdi-bitmapinfo) structure followed by the bitmap bits."""

# Registered Formats
CF_HTML = CF_HTML
CF_RTF = CF_RTF
HTML_Format = 49418

# Aliases
text = CF_UNICODETEXT # alias
html = HTML_Format # alias
HTML = html # alias
Expand Down

0 comments on commit dfb0623

Please sign in to comment.