xtd 0.2.0
Loading...
Searching...
No Matches
icon.h
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.h>
12#include <xtd/string.h>
13#include <xtd/drawing_native_export.h>
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.h:79
Represents a Windows icon, which is a small bitmap image that is used to represent an object....
Definition icon.h:28
An abstract base class that provides functionality for the bitmap and metafile descended classes.
Definition image.h:49
Contains icon native API.
Definition icon.h: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.h:36
#define static_
This keyword is use to represent a static object. A static object can't be instantiated (constructors...
Definition static.h:37
int32_t int32
Represents a 32-bit signed integer.
Definition int32.h:23
intmax_t intptr
Represent a pointer or a handle.
Definition intptr.h:23
The xtd namespace contains all fundamental classes to access Hardware, Os, System,...
Definition xtd_about_box.h:10
Contains xtd::static_object class.
Contains xtd::string alias.