MiniGUI API Reference (MiniGUI-Threads)  v5.0.6
A mature and proven cross-platform GUI system for embedded and smart IoT devices
Modules | Typedefs | Functions
GDI functions

Modules

 Region operations
 A Region is simply an area, as the name implies, and is implemented as a "y-x-banded" array of rectangles. To explain: Each Region is made up of a certain number of rectangles sorted by y coordinate first, and then by x coordinate.
 
 General DC operations
 DC means Device Context, just like Graphics Context (GC) of X Lib. DC represents a rectangle area on the actual screen or a virtual screen created in memory. We call the rectangle area as "surface" of the DC.
 
 DC attribute operations
 
 Palette operations
 
 General drawing functions
 
 Mapping Operations
 The mapping mode defines the unit of measure used to transform page-space units into device-space units, and also defines the orientation of the device's x and y axes.
 
 Clipping operations
 
 BITMAP and blitting operations
 Example:
 
 Icon operations
 
 Rectangle operations
 
 Logical font operations
 MiniGUI uses logical font to render text in a DC. You can create a logical font by using CreateLogFont and select it into a DC by using SelectFont, then you can use this logical font to render text by using TextOutLen or DrawTextEx.
 
 System charset and font operations
 MiniGUI creates a few system fonts to draw menu text, window caption, or other general items. MiniGUI at least creates two system fonts: one mono-space logical font for single-byte charset, and one mono-space logical font for multi-byte charset. For the multi-byte charset, the width of one multi-byte character should be equal to the width of two single-byte characters.
 
 Text parsing functions
 MiniGUI uses logical font to output text, also uses logical font to parsing the multi-byte characters and words in the text.
 
 BIDI types
 Values for BIDI types.
 
 Operators for Unicode character and string
 
 Text output functions
 
 Bitmap structure
 MiniGUI uses a MYBITMAP structure to represent a device-independent bitmap, and BITMAP structure to represent a device-dependent bitmap.
 
 Bitmap file load/save operations
 Example:
 
 Rendering Text in Complex/Mixed Scripts
 To lay out, shape, and render a text in mixed scripts, you should call GetUCharsUntilParagraphBoundary function first to convert a multi-byte string to a Unicode string under the specified white space rule, breaking rule, and transformation rule. For example, converting a general C string in UTF-8 or GB18030 to a Uchar32 string by calling this function. You can call CreateLogFontForMChar2UChar function to create a dummy logfont object for this purpose in order to expense a minimal memory.
 
 Functions for Linux DRM integration
 These functions can be used to get the DRM device file descriptor and the information of the hardware surface corresponding to the DC which is created by the Linux DRM engine. By using the information, we can integrate MiniGUI with other graphics libraries, such as Cairo (vector graphics) and Mesa (3D graphics).
 

Typedefs

typedef struct _BITMAP BITMAP
 
typedef BITMAPPBITMAP
 Data type of pointer to a BITMAP. More...
 
typedef struct _MYBITMAP MYBITMAP
 
typedef struct _MYBITMAPPMYBITMAP
 Data type of pointer to a struct _MYBITMAP. More...
 

Functions

MG_EXPORT GHANDLE GetVideoHandle (HDC hdc)
 

Detailed Description

Typedef Documentation

◆ BITMAP

typedef struct _BITMAP BITMAP
See also
_BITMAP

Definition at line 694 of file gdi.h.

◆ MYBITMAP

typedef struct _MYBITMAP MYBITMAP
See also
_MYBITMAP

Definition at line 709 of file gdi.h.

◆ PBITMAP

typedef BITMAP * PBITMAP

Data type of pointer to a BITMAP.

See also
BITMAP _BITMAP

Definition at line 701 of file gdi.h.

◆ PMYBITMAP

typedef struct _MYBITMAP * PMYBITMAP

Data type of pointer to a struct _MYBITMAP.

See also
MYBITMAP _MYBITMAP

Definition at line 716 of file gdi.h.

Function Documentation

◆ GetVideoHandle()

MG_EXPORT GHANDLE GetVideoHandle ( HDC  hdc)

This function gets the video handle which corresponds to the given device context.

Parameters
hdcThe device context.
Returns
The handle to the video; NULL on error.

Since 4.0.4