xtd 0.2.0
Loading...
Searching...
No Matches
icon.hpp
1#pragma once
3#if !defined(__XTD_DRAWING_NATIVE_LIBRARY__)
4#error "Do not include this file: Internal use only"
5#endif
7
8#include <cstdint>
9#include <istream>
10#include <vector>
11#include <xtd/static>
12#include <xtd/string>
13#include <xtd/drawing_native_export.hpp>
14
16namespace xtd {
18 namespace drawing {
20 class icon;
21 class image;
23
26 namespace native {
34 class drawing_native_export_ icon final static_ {
35 friend xtd::drawing::icon;
37 protected:
39
45 static intptr create(const xtd::string& filename);
52 static intptr create(const xtd::string& filename, int32 width, int32 height);
57 static intptr create(std::istream& stream);
64 static intptr create(std::istream& stream, int32 width, int32 height);
70 static intptr create(const char* const* bits);
78 static intptr create(const char* const* bits, int32 width, int32 height);
90 static intptr create(intptr icon, int32 width, int32 height);
91
95 static void destroy(intptr icon);
96
101 static intptr from_handle(intptr handle);
102
108
114
119 static void save(intptr icon, const xtd::string& filename);
124 static void save(intptr icon, std::ostream& stream, size_t raw_format);
125
132 };
133 }
134 }
135}
Represents text as a sequence of character units.
Definition basic_string.hpp:79
Represents a Windows icon, which is a small bitmap image that is used to represent an object....
Definition icon.hpp:28
An abstract base class that provides functionality for the bitmap and metafile descended classes.
Definition image.hpp:49
Contains icon native API.
Definition icon.hpp:34
static intptr create(intptr image)
Creates an icon from image.
static intptr create(std::istream &stream, int32 width, int32 height)
Creates an icon from specified std::stream, and size.
static void destroy(intptr icon)
Destroys the icon.
static intptr create(const xtd::string &filename, int32 width, int32 height)
Creates an icon from specified filename, and size.
static intptr create(std::istream &stream)
Creates an icon from specified std::stream.
static void save(intptr icon, std::ostream &stream, size_t raw_format)
Saves icon to the specified output std::ostream.
static intptr to_image(intptr icon)
Converts icon to an image.
static intptr create(intptr icon, int32 width, int32 height)
Creates an icon from specified icon, and size.
static int32 get_width(intptr icon)
Gets the width of icon.
static intptr create(const xtd::string &filename)
Creates an icon from specified filename.
static intptr create(const char *const *bits)
Creates an icon from bits.
static intptr from_handle(intptr handle)
Creates an icon from handle.
static intptr create(const char *const *bits, int32 width, int32 height)
Creates an icon from specified bits, and size.
static void save(intptr icon, const xtd::string &filename)
Saves icon to the specified output filename.
static int32 get_height(intptr icon)
Gets the height of icon.
Contains image native API.
Definition image.hpp:36
#define static_
This keyword is use to represent a static object. A static object can't be instantiated (constructors...
Definition static.hpp:37
int32_t int32
Represents a 32-bit signed integer.
Definition int32.hpp:23
intmax_t intptr
Represent a pointer or a handle.
Definition intptr.hpp:23
The xtd namespace contains all fundamental classes to access Hardware, Os, System,...
Definition xtd_about_box.hpp:10