emWin Examples

From SEGGER Wiki
Revision as of 18:00, 31 March 2020 by Florian (talk | contribs) (Created page with "The emWin examples have the purpose to explain and visualize emWin's features in a straight-forward and simplified way. Thus, most of these examples do not have elaborate grap...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

The emWin examples have the purpose to explain and visualize emWin's features in a straight-forward and simplified way. Thus, most of these examples do not have elaborate graphics, but instead have code that is easy to read and understand.

How to use the examples

The examples are ready-to-run and can be run on most hardware targets and in the Windows simulation. All of the examples are stand-alone, meaning only one C file is required to run the application, with the exception of samples that include file access to external files. For the latter type of samples, the external file referred to in the sample is required as well.

File header

Every example file has a header at the beginning of the file. This header states the file name of the example, a small description about the example and how it should be used and a list of required emWin add-ons that are necessary to run the example.

File        : GUI_VNC_FileTransfer.c
Purpose     : Sample that demonstrates how to use a VNC server with
              emWin and use it for file transfer.
Requirements: WindowManager - ( )
              MemoryDevices - ( )
              AntiAliasing  - ( )
              VNC-Server    - (x)
              PNG-Library   - ( )
              TrueTypeFonts - ( )

For example, the VNC server add-on is required for the VNC-related emWin examples.

List of examples

File(s) Description Download
2D graphic operations
GUI_DIRTYDEVICE_Usage.c Demonstrates how to use DIRTYDEVICES. A DIRTYDEVICE monitors the area on the screen that is 'dirty', meaning the area where screen changes happened. Download
GUI_Polygon.c Demonstrates how to draw polygons and what can be done with them. Download
GUI_QRCode.c Shows how to draw a QR code with emWin. Download
GUI_SPLINE.c Demonstrates how splines can be drawn with emWin. Download
Animations
GUI_AdvancedAnimation.c This sample demonstrates how more advanced animations can be created with emWin. The advanced animation makes use of slice callbacks, custom position calculation and several animation items. Download
GUI_SimpleAnimation.c Shows how to perform simple animations using emWin. This example shows the basic steps for creating an animation, such as creating and running it, adding animation items and using a delete callback routine. Download
Bitmaps and images
GUI_CreateBitmapFromStream.c
segger-logo.dta
Creates and draws a streamed bitmap from an external .dta file. The example supports both the usage of Windows file system and emFile, if run on a target. Download
GUI_DrawAnimatedGIFBin.c Draws an animated GIF image after it has been converted into binary form using Bin2C. Download
GUI_DrawAnimatedSprite.c Draws an animated GIF image after it has been converted into an animated sprite using the Bitmap Converter. Download
GUI_DrawExternalImage_BMP.c
segger-logo.bmp
Shows how to draw BMP images in emWin from external memory. Supports both the usage of Windows file system and emFile. Download
GUI_DrawExternalImage_GIF.c
segger-logo.gif
Shows how to draw GIF images in emWin from external memory. Supports both the usage of Windows file system and emFile. Download
GUI_DrawExternalImage_JPG.c
segger-logo.jpg
Shows how to draw JPG images in emWin from external memory. Supports both the usage of Windows file system and emFile. Download
GUI_DrawExternalImage_PNG.c
segger-logo.png
Shows how to draw PNG images in emWin from external memory. Supports both the usage of Windows file system and emFile. Download
GUI_DrawStreamedBitmap.c
segger-logo.dta
Demonstrates how streamed bitmaps can be drawn from external .dta files. Supports both the usage of Windows file system and emFile. Download
GUI_SerializeBMP.c Example that shows how screenshots can be created by serializing the LCD contents into a .bmp file. Supports both the usage of Windows file system and emFile. Download
Fonts
GUI_SetExternalFont_TTF.c
Roboto.ttf
Shows how to create a custom font from an external .ttf file. Supports both the usage of Windows file system and emFile. Download
GUI_SetExternalFont_XBF.c
Roboto30.xbf
Shows how to create a custom font from an external .xbf file. Supports both the usage of Windows file system and emFile. Download
Timers
GUI_Timers.c Demonstrates how to use timers without the use of the WindowManager in emWin. Download
MultiTouch
GUI_MultiTouch.c Shows how multi-touch points can be polled with emWin. Download
Dialogs
CALENDAR_Usage.c Demonstrates the usage of CALENDAR dialogs. Download
CHOOSECOLOR_Usage.c Demonstrates the usage of CHOOSECOLOR dialogs. Download
CHOOSEFILE_Usage.c Demonstrates the usage of CHOOSEFILE dialogs. Download
DIALOG_CreateDialogs.c Shows how custom dialogs can be created. Download
GUI_Messagebox.c Demonstrates the usage of MESSAGEBOX dialogs. Download
DIALOG_Keypad.c
DIALOG_Keypad.h
DIALOG_Keypad_Usage.c
The files DIALOG_Keypad.c and DIALOG_Keypad.h provide a QWERTY keyboard dialog, that can be integrated into an emWin application. The file DIALOG_Keypad_Usage.c shows how the keyboard dialog can be integrated and used. Download
Language Support
GUI_LANG_BiDiArabic.c Demonstrates how arabic text can be displayed/used via bi-directional text support. Download
GUI_LANG_ReadCSV.c Shows how to read different languages from a .csv file that has been converted into binary form. Download
GUI_LANG_ReadCSVEx.c
SampleCSV.csv
Shows how to read different languages from a .csv file that is located in external memory. Supports both the usage of Windows file system and emFile. Download
GUI_LANG_Thai.c Demonstrates how thai text can be displayed/used via thai text support. Download
Memory Devices
GUI_MEMDEV_BlurringAndBlending.c Shows how blurring and blending operations are done using memory devices. Download
GUI_MEMDEV_Container.c
seggerlogo.jpg
Shows how memory devices can be used as a container to pre-load JPEG images (or something else) to avoid flickering. Download
GUI_MEMDEV_Fading.c Demonstrates how a fading animation between two windows can be executed using memory devices. Download
GUI_MEMDEV_Rotate.c Shows how to rotate images using memory devices. Download
GUI_MEMDEV_SerializeBMP.c Shows how bitmap files can be created from the contents of a memory device. Supports both the usage of Windows file system and emFile. Download
Movies
GUI_MOVIE_CreateMovie.c Demonstrates how to display an emWin movie from accessable memory. Download
GUI_MOVIE_CreateMovieEx.c
Video.emf
Demonstrates how to display an emWin movie from external memory. Download
VNC
GUI_VNC_FileTransfer.c Shows how to use a VNC server with emWin to transfer files. Download
GUI_VNC_StartServer.c Shows how to use a VNC server with emWin. Download
Widgets
BUTTON_Custom.c Custom drawing of a BUTTON widget. Download
BUTTON_Usage.c Usage of a BUTTON widget. Download
CHECKBOX_Custom.c Custom drawing of a CHECKBOX widget. Download
CHECKBOX_Usage.c Usage of a CHECKBOX widget. Download
DROPDOWN_Custom.c Custom drawing of a DROPDOWN widget. Download
DROPDOWN_Usage.c Usage of a DROPDOWN widget. Download
FRAMEWIN_Custom.c Custom drawing of a FRAMEWIN widget. Download
FRAMEWIN_Usage.c Usage of a FRAMEWIN widget. Download
GRAPH_Custom.c Custom drawing of a GRAPH widget. Download
GRAPH_Usage.c Usage of a GRAPH widget. Download
ICONVIEW_Custom.c Custom drawing of a ICONVIEW widget. Download
ICONVIEW_Usage.c Usage of a ICONVIEW widget. Download
LISTBOX_Custom.c Custom drawing of a LISTBOX widget. Download
LISTBOX_Usage.c Usage of a LISTBOX widget. Download
LISTVIEW_Custom.c Custom drawing of a LISTVIEW widget. Download
LISTVIEW_Usage.c Usage of a LISTVIEW widget. Download
LISTWHEEL_Custom.c Custom drawing of a LISTWHEEL widget. Download
LISTWHEEL_Usage.c Usage of a LISTWHEEL widget. Download
MULTIPAGE_Custom.c Custom drawing of a MULTIPAGE widget. Download
MULTIPAGE_Usage.c Usage of a MULTIPAGE widget. Download
PROGBAR_Custom.c Custom drawing of a PROGBAR widget. Download
PROGBAR_Usage.c Usage of a PROGBAR widget. Download
RADIO_Custom.c Custom drawing of a RADIO widget. Download
RADIO_Usage.c Usage of a RADIO widget. Download
ROTARY_Usage.c Usage and custom drawing of a ROTARY widget. Download
SLIDER_Custom.c Custom drawing of a SLIDER widget. Download
SLIDER_Usage.c Usage of a SLIDER widget. Download
SPINBOX_Custom.c Custom drawing of a SPINBOX widget. Download
SPINBOX_Usage.c Usage of a SPINBOX widget. Download
SWIPELIST_Custom.c Custom drawing of a SWIPELIST widget. Download
SWIPELIST_Usage.c Usage of a SWIPELIST widget. Download
SWITCH_Usage.c Usage and custom drawing of a SWITCH widget. Download
TREEVIEW_Custom.c Custom drawing of a TREEVIEW widget. Download
TREEVIEW_Usage.c Usage of a TREEVIEW widget. Download
WIDGET_CustomCallback.c Explains how the callback of a widget can be overwritten. Download
WIDGET_OwnerDraw.c Shows how OwnerDraw routines can be set for widgets that support OwnerDraw. Download
WIDGET_ReactOnMessages.c Demonstrates how the application can react on messages sent by widgets. Download
WIDGET_SkinningProps.c Shows how the appearance of widgets can be changed using skinning properties. This can only be done for widgets that support skinning. Download
WIDGET_SkinningRoutine.c Shows how the appearance of widgets can be changed using a skinning routine. This can only be done for widgets that support skinning. Download
Window Manager
WM_AllMessages.c Example that shows all window messages that can be used. Download
WM_ChildWindows.c Demonstrates how child windows work and how they are created. Download
WM_Clipping.c Shows how clipping is performed in emWin. Download
WM_CreateWindows.c Demonstrates how to create windows. Download
WM_CustomMessage.c Demonstrates how custom messages can be sent between windows. Download
WM_FocusableWindow.c Shows how a window can accept focus like most other widgets. Download
WM_LateClipping.c Demonstrates the difference between late and early clipping. Download
WM_MOTION_MoveContent.c Shows how motion support works for movable content, such as text that can be scrolled. Download
WM_MOTION_MoveWindows.c Shows how motion support can be used for moving windows. Download
WM_SetUntouchable.c Demonstrates how windows can be marked as "untouchable". Download
WM_SetUserData.c Example that shows how to set extra data to a window or widget. User data are extra bytes that are allocated upon creation of the window or widget. This can be utilized to transfer data between windows. Download
WM_SimpleTimer.c Sample that demonstrates how to use timers with the Window Manager. Download
WM_TransparentWindows.c Shows how transparent windows can be created. Download