Search Results

Search results 81-96 of 96.

This site uses cookies. By continuing to browse this site, you are agreeing to our Cookie Policy.

  • Quote: “"If you feel there is a function which does not work this way, please let us know. Thank you." ” It seems to me that at least two functions doesn't work this way: WM_SetCallBack() and IMAGE_SetBitmap(). I use WM_SetCallBack() to set a callback that set a specific color of an alpha-channel image by calling GUI_SetColor() in WM_PAINT message and after calling default IMAGE_Callback (as you suggested in another post). The color changes at run-time, so I continuously call WM_SetCallBack() to…

  • I created two simple wrappers functions that use window user data to save and restore the current bitmap of a Widget. Source Code (17 lines) The GUI usually shows many variables that could change at run-time. For example, a temperature value, the raising of an alarm, and so on. I found useful to have a gui_refresh() function that is called on a regular basis, for example every 20/100ms. In the gui_refresh() it would be simple to set the graphical parameters (text/colors of TEXT widgets, bitmap o…

  • Hello Thorsten, thank you for your answer, but I have some doubts yet. Suppose I have Window1 100x100 and one child Image1 10x10 that is transparent. Only Image1 is created with WM_CF_MEMDEV_ON_REDRAW. By calling IMAGE_SetBitmap(Image1, ...), the full 10x10 Image1 window is flagged as invalid. Because it is transparent, also the 10x10 rectangle of Window1 is flagged as invalid. On next GUI_Exec(), WM_PAINT for Window1 is raised and only the small 10x10 rectangle is really updated. Because Window…

  • I'm using emWin with a ILI9341-based TFT connected to the MCU through a 16-bits parallel bus. I don't have too much RAM, so I can't use a display data cache. Moreover, I usually don't use memory devices for windows (the library wouldn't be able to find sufficient memory space for memory device, so enabling this functionality for all windows isn't useful). But I have some small transparent images and I'd like to use memory devices when redrawing them. I specify WM_CF_MEMDEV_ON_REDRAW in IMAGE_Cre…

  • I have an IMAGE widget. The associated bitmap could change at runtime. I use IMAGE_SetBitmap() for that in the main loop. I'd like to avoid calling IMAGE_SetBitmap() if the bitmap is already correct. The immediate solution is to use a variable: Source Code (4 lines) I could avoid using the variable image_shown if the IMAGE widget API supports a IMAGE_GetBitmap() function, but it's not the case. I think it could be a good functionality to add. In this case, I could write: Source Code (5 lines) Ma…

  • ILI9341 display driver

    giusloq - - emWin related

    Post

    I'm using emWin pre-compiled libraries released by NXP with a TFT display based on ILI9341 controller. I'm using emWin ILI9341 driver and it works after some additional code. I noticed that display driver doesn't send the commands SLEEP OUT (0x11) and DISPLAY ON (0x29) during initialization. Without those command, ILI9341 doesn't show anything on the display. Moreover I'm using a 16-bits parallel bus, so I need to send COLMOD (0x3A) command too. I solved this problem by sending "manually" those …

  • "I would recommend you to invalidate just the rectangle which might change according to the variable. Also I would recommend to invalidate the rectangle only if the variable changed." Suppose I have an image in the rect (0,0)-(10,10). The image depends on the value of variable names status. Source Code (7 lines) Now, in the WM_PAINT event, what should I write? Should I have to redraw the entire window or only the image in the rect (0,0)-(10,10)? In the first case, will the GUI library avoid the …

  • I'm using a TFT display with integrated ILI9341 controller. The connection between MCU and TFT is 16-bits parallel. I'm confused about the best strategy to refresh the display when some parts change. Suppose I have a black background with one image at the center. Every 1 second, a variable is checked and depending on its value the image at the center changes accordingly. The variable is updated in another task. I can use the background window and call GUI_DrawBitmap() in WM_PAINT message. Every …

  • I have a single-color black background. At the center, I want a transparent image. On top of this image, there is a second image. It is an alpha channel image. Depending on some variables, this should be drawn in different colors. This second image is smaller than the first and completely inside the first. The system should react when the user touches the first bigger image. How to achieve this? I can use GUI_DrawBitmap() for both images, but I have to manage myself the user touch. Another possi…

  • What is the default background color used to paint a window that doesn't overwrite the default callback mechanism of emWin? Is it possible to change the background color of a window without writing a custom WM_PAINT code in the callback?

  • What is the default background color used to paint a window that doesn't overwrite the default callback mechanism of emWin? Is it possible to change the background color of a window without writing a custom WM_PAINT code in the callback?

  • I'm trying to use WM_SetDesktopColor() function to draw the background window with a green color, but it seems it doesn't work. The only solution is to specify a custom callback for desktop window through WM_SetCallback(WM_HBKWIN, cbBackgroundWin); and manually manage the WM_PAINT message with the following code: Source Code (7 lines)

  • I'm trying to use WM_SetDesktopColor() function to draw the background window with a green color, but it seems it doesn't work. The only solution is to specify a custom callback for desktop window through WM_SetCallback(WM_HBKWIN, cbBackgroundWin); and manually manage the WM_PAINT message with the following code: Source Code (7 lines)

  • Quote: “ "WM_DELETE is the last message sent to a window just before it gets deleted. WM_NOTIFY_PARENT / WM_WM_NOTIFICATION_CHILD_DELETED is the last notification regarding a certain window sent to its parent window just before the child window gets deleted. I assume you want to react to one of those messages in order to let the parent window know about the child being deleted." ” I try to reformulate the question again. I have two windows: Main Window and Aux Window. Both have a button. Main Bu…

  • emWin is too slow!?

    giusloq - - emWin related

    Post

    LPC4350 (Cortex-M4 running at 204MHz), 32-bits external SDRAM (running at 102MHz) where is the framebuffer and memory dedicated to emWin, TFT 320x240 connected directly to the TFT controller embedded in the processor through 16-bits RGB interface. I think it's a good system to have good performance. How is it possible to have the performance in this video? I'm drawing only 12 button widgets in a parent window that covers the entire display and call continuously WM_ShowWindow() and WM_HideWindow(…

  • I'm using emWin libraries on a NXP board with a single-task (polling loop). I have a visible/active window (Main Window) that covers all the display and a button inside. When the user press the button, I'd like to create and show another window (Slave Window), created on-the-fly in WM_NOTIFICATION_RELEASED message. The Slave Window covers the entire display and it should be on top of the Main Window. Source Code (22 lines) dialog_entercode_create() creates and returns the handle of the newly cre…