Skip to content

Commit

Permalink
v2 First drop for #6
Browse files Browse the repository at this point in the history
  • Loading branch information
DoumanAsh committed Feb 25, 2017
1 parent b61b618 commit 8a8aa0d
Show file tree
Hide file tree
Showing 13 changed files with 698 additions and 726 deletions.
8 changes: 0 additions & 8 deletions .travis.yml

This file was deleted.

17 changes: 12 additions & 5 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,18 +1,25 @@
[package]
name = "clipboard-win"
version = "1.8.1"
version = "2.0.0"
authors = ["Douman <[email protected]>"]
description = "Library to interact with Windows clipboard."
repository = "https://github.com/DoumanAsh/clipboard-win"
documentation = "https://docs.rs/crate/clipboard-win/"
description = "Provides simple way to interact with Windows clipboard."
license = "MIT"

keywords = ["Windows", "winapi", "clipboard"]
categories = []

repository = "https://github.com/DoumanAsh/clipboard-win"
documentation = "https://docs.rs/crate/clipboard-win/"

readme = "README.md"

[badges]
appveyor = { repository = "https://github.com/DoumanAsh/clipboard-win", branch = "master", service = "github" }

[target.'cfg(windows)'.dependencies]
winapi = "^0.2.5"
user32-sys = "^0.2.0"
kernel32-sys = "^0.2.1"
windows-error = "^1.0.0"

[lib]
name = "clipboard_win"
Expand Down
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,6 @@ clipboard-win

[![Build status](https://ci.appveyor.com/api/projects/status/5mkbp9mh5vwpohtn?svg=true)](https://ci.appveyor.com/project/DoumanAsh/clipboard-win)

Library to interact with Windows clipboard.
[Documentation](https://docs.rs/clipboard-win/1.8.1/x86_64-pc-windows-msvc/clipboard_win/)

Provides simple way to interact with Windows clipboard.
15 changes: 8 additions & 7 deletions appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,25 +7,26 @@ branches:
environment:
matrix:
- TARGET: x86_64-pc-windows-msvc
CHANNEL: beta
- TARGET: i686-pc-windows-gnu
CHANNEL: beta
- TARGET: x86_64-pc-windows-gnu
CHANNEL: beta
api:
secure: ZQiyxjBbshVpIVZbZl9h23yGuqlq+8j615c0B2z7VxdEAW1wggIfkebJqpgZclk2
git_token:
secure: H5PQSeh6rHOoDLktlYlVLYu/iJMTwzzNVk8Wr//nqbYC7xrJuGDwKwiev/0Bl2d3

install:
- ps: Start-FileDownload "https://static.rust-lang.org/dist/rust-beta-${env:TARGET}.exe"
- rust-beta-%TARGET%.exe /VERYSILENT /NORESTART /DIR="C:\Rust"
- ps: Remove-Item "rust-beta-$env:TARGET.exe"
- ps: $env:PATH="$env:PATH;C:\Rust\bin"
- curl -sSf -o rustup-init.exe https://win.rustup.rs
- rustup-init.exe --default-host %TARGET% --default-toolchain %CHANNEL% -y
- set PATH=%PATH%;C:\Users\appveyor\.cargo\bin
- rustc -Vv
- cargo -V

build: false

test_script:
- ps: $env:RUST_TEST_THREADS=1
- ps: echo "let's save some clipboard!" | Clip
- cargo test

on_success:
- powershell -version 3 -File build.ps1 bot
102 changes: 0 additions & 102 deletions build.ps1

This file was deleted.

10 changes: 0 additions & 10 deletions src/constants.rs

This file was deleted.

144 changes: 72 additions & 72 deletions src/clipboard_formats.rs → src/formats.rs
Original file line number Diff line number Diff line change
@@ -1,72 +1,72 @@
#![allow(dead_code)]
//! Standart clipboard formats.
//!
//! Header: Winuser.h
//!
//! Description is taken from [Standart Clipboard Formats](https://msdn.microsoft.com/en-us/library/windows/desktop/ff729168%28v=vs.85%29.aspx)

///A handle to a bitmap (HBITMAP).
pub const CF_BITMAP: u32 = 2;
///A memory object containing a <b>BITMAPINFO</b> structure followed by the bitmap bits.
pub const CF_DIB: u32 = 8;
///A memory object containing a <b>BITMAPV5HEADER</b> structure followed by the bitmap color space
///information and the bitmap bits.
pub const CF_DIBV5: u32 = 17;
///Software Arts' Data Interchange Format.
pub const CF_DIF: u32 = 5;
///Bitmap display format associated with a private format. The hMem parameter must be a handle to
///data that can be displayed in bitmap format in lieu of the privately formatted data.
pub const CF_DSPBITMAP: u32 = 0x0082;
///Enhanced metafile display format associated with a private format. The *hMem* parameter must be a
///handle to data that can be displayed in enhanced metafile format in lieu of the privately
///formatted data.
pub const CF_DSPENHMETAFILE: u32 = 0x008E;
///Metafile-picture display format associated with a private format. The hMem parameter must be a
///handle to data that can be displayed in metafile-picture format in lieu of the privately
///formatted data.
pub const CF_DSPMETAFILEPICT: u32 = 0x0083;
///Text display format associated with a private format. The *hMem* parameter must be a handle to
///data that can be displayed in text format in lieu of the privately formatted data.
pub const CF_DSPTEXT: u32 = 0x0081;
///A handle to an enhanced metafile (<b>HENHMETAFILE</b>).
pub const CF_ENHMETAFILE: u32 = 14;
///Start of a range of integer values for application-defined GDI object clipboard formats.
pub const CF_GDIOBJFIRST: u32 = 0x0300;
///End of a range of integer values for application-defined GDI object clipboard formats.
pub const CF_GDIOBJLAST: u32 = 0x03FF;
///A handle to type <b>HDROP</b> that identifies a list of files.
pub const CF_HDROP: u32 = 15;
///The data is a handle to the locale identifier associated with text in the clipboard.
///
///For details see [Standart Clipboard Formats](https://msdn.microsoft.com/en-us/library/windows/desktop/ff729168%28v=vs.85%29.aspx)
pub const CF_LOCALE: u32 = 16;
///Handle to a metafile picture format as defined by the <b>METAFILEPICT</b> structure.
pub const CF_METAFILEPICT: u32 = 3;
///Text format containing characters in the OEM character set.
pub const CF_OEMTEXT: u32 = 7;
///Owner-display format.
///
///For details see [Standart Clipboard Formats](https://msdn.microsoft.com/en-us/library/windows/desktop/ff729168%28v=vs.85%29.aspx)
pub const CF_OWNERDISPLAY: u32 = 0x0080;
///Handle to a color palette.
///
///For details see [Standart Clipboard Formats](https://msdn.microsoft.com/en-us/library/windows/desktop/ff729168%28v=vs.85%29.aspx)
pub const CF_PALETTE: u32 = 9;
///Data for the pen extensions to the Microsoft Windows for Pen Computing.
pub const CF_PENDATA: u32 = 10;
///Start of a range of integer values for private clipboard formats.
pub const CF_PRIVATEFIRST: u32 = 0x0200;
///End of a range of integer values for private clipboard formats.
pub const CF_PRIVATELAST: u32 = 0x02FF;
///Represents audio data more complex than can be represented in a ```CF_WAVE``` standard wave format.
pub const CF_RIFF: u32 = 11;
///Microsoft Symbolic Link (SYLK) format.
pub const CF_SYLK: u32 = 4;
///ANSI text format.
pub const CF_TEXT: u32 = 1;
///Tagged-image file format.
pub const CF_TIFF: u32 = 6;
///UTF16 text format.
pub const CF_UNICODETEXT: u32 = 13;
///Represents audio data in one of the standard wave formats.
pub const CF_WAVE: u32 = 12;
#![allow(dead_code)]
//! Standard clipboard formats.
//!
//! Header: Winuser.h
//!
//! Description is taken from [Standard Clipboard Formats](https://msdn.microsoft.com/en-us/library/windows/desktop/ff729168%28v=vs.85%29.aspx)

///A handle to a bitmap (HBITMAP).
pub const CF_BITMAP: u32 = 2;
///A memory object containing a <b>BITMAPINFO</b> structure followed by the bitmap bits.
pub const CF_DIB: u32 = 8;
///A memory object containing a <b>BITMAPV5HEADER</b> structure followed by the bitmap color space
///information and the bitmap bits.
pub const CF_DIBV5: u32 = 17;
///Software Arts' Data Interchange Format.
pub const CF_DIF: u32 = 5;
///Bitmap display format associated with a private format. The hMem parameter must be a handle to
///data that can be displayed in bitmap format in lieu of the privately formatted data.
pub const CF_DSPBITMAP: u32 = 0x0082;
///Enhanced metafile display format associated with a private format. The *hMem* parameter must be a
///handle to data that can be displayed in enhanced metafile format in lieu of the privately
///formatted data.
pub const CF_DSPENHMETAFILE: u32 = 0x008E;
///Metafile-picture display format associated with a private format. The hMem parameter must be a
///handle to data that can be displayed in metafile-picture format in lieu of the privately
///formatted data.
pub const CF_DSPMETAFILEPICT: u32 = 0x0083;
///Text display format associated with a private format. The *hMem* parameter must be a handle to
///data that can be displayed in text format in lieu of the privately formatted data.
pub const CF_DSPTEXT: u32 = 0x0081;
///A handle to an enhanced metafile (<b>HENHMETAFILE</b>).
pub const CF_ENHMETAFILE: u32 = 14;
///Start of a range of integer values for application-defined GDI object clipboard formats.
pub const CF_GDIOBJFIRST: u32 = 0x0300;
///End of a range of integer values for application-defined GDI object clipboard formats.
pub const CF_GDIOBJLAST: u32 = 0x03FF;
///A handle to type <b>HDROP</b> that identifies a list of files.
pub const CF_HDROP: u32 = 15;
///The data is a handle to the locale identifier associated with text in the clipboard.
///
///For details see [Standart Clipboard Formats](https://msdn.microsoft.com/en-us/library/windows/desktop/ff729168%28v=vs.85%29.aspx)
pub const CF_LOCALE: u32 = 16;
///Handle to a metafile picture format as defined by the <b>METAFILEPICT</b> structure.
pub const CF_METAFILEPICT: u32 = 3;
///Text format containing characters in the OEM character set.
pub const CF_OEMTEXT: u32 = 7;
///Owner-display format.
///
///For details see [Standart Clipboard Formats](https://msdn.microsoft.com/en-us/library/windows/desktop/ff729168%28v=vs.85%29.aspx)
pub const CF_OWNERDISPLAY: u32 = 0x0080;
///Handle to a color palette.
///
///For details see [Standart Clipboard Formats](https://msdn.microsoft.com/en-us/library/windows/desktop/ff729168%28v=vs.85%29.aspx)
pub const CF_PALETTE: u32 = 9;
///Data for the pen extensions to the Microsoft Windows for Pen Computing.
pub const CF_PENDATA: u32 = 10;
///Start of a range of integer values for private clipboard formats.
pub const CF_PRIVATEFIRST: u32 = 0x0200;
///End of a range of integer values for private clipboard formats.
pub const CF_PRIVATELAST: u32 = 0x02FF;
///Represents audio data more complex than can be represented in a ```CF_WAVE``` standard wave format.
pub const CF_RIFF: u32 = 11;
///Microsoft Symbolic Link (SYLK) format.
pub const CF_SYLK: u32 = 4;
///ANSI text format.
pub const CF_TEXT: u32 = 1;
///Tagged-image file format.
pub const CF_TIFF: u32 = 6;
///UTF16 text format.
pub const CF_UNICODETEXT: u32 = 13;
///Represents audio data in one of the standard wave formats.
pub const CF_WAVE: u32 = 12;
Loading

0 comments on commit 8a8aa0d

Please sign in to comment.