Prusa MINI Firmware overview
window_dlg_popup.h File Reference
#include "window.h"
#include "marlin_server.h"

Go to the source code of this file.

Classes

struct  _window_dlg_popup_t
 
struct  _window_class_dlg_popup_t
 

Typedefs

typedef struct _window_dlg_popup_t window_dlg_popup_t
 
typedef struct _window_class_dlg_popup_t window_class_dlg_popup_t
 

Functions

void gui_pop_up (void)
 

Variables

int16_t WINDOW_CLS_DLG_POPUP
 
const window_class_dlg_popup_t window_class_dlg_popup
 

Typedef Documentation

◆ window_dlg_popup_t

◆ window_class_dlg_popup_t

Function Documentation

◆ gui_pop_up()

void gui_pop_up ( void  )
62  {
63 
64  static uint8_t opened = 0;
65  if (opened == 1)
66  return;
67  opened = 1;
68 
70 
71  int16_t id_capture = window_capture();
72  int16_t id = window_create_ptr(WINDOW_CLS_DLG_POPUP, 0, rect_ui16(0, 32, 240, 120), &dlg);
73  strncpy(dlg.text, msg_stack.msg_data[0], MSG_MAX_LENGTH);
74  dlg.text[MSG_MAX_LENGTH - 1] = '\0';
75  window_1 = (window_t *)&dlg;
78 
79  dlg.timer = HAL_GetTick();
80 
81  while ((HAL_GetTick() - dlg.timer) < POPUP_DELAY_MS) {
82  gui_loop();
83  }
84 
85  window_destroy(id);
86  window_set_capture(id_capture);
88  opened = 0;
89 }
Here is the call graph for this function:

Variable Documentation

◆ WINDOW_CLS_DLG_POPUP

int16_t WINDOW_CLS_DLG_POPUP

◆ window_class_dlg_popup

const window_class_dlg_popup_t window_class_dlg_popup
window_capture
int16_t window_capture(void)
Definition: window.c:169
msg_stack
Definition: marlin_server.h:26
window_1
window_t * window_1
Definition: window.c:14
window_invalidate
void window_invalidate(int16_t id)
Definition: window.c:304
rect_ui16
static rect_ui16_t rect_ui16(uint16_t x, uint16_t y, uint16_t w, uint16_t h)
Definition: guitypes.h:159
window_destroy
void window_destroy(int16_t id)
Definition: window.c:132
_window_dlg_popup_t::timer
uint32_t timer
Definition: window_dlg_popup.h:28
_window_dlg_popup_t::text
char text[MSG_MAX_LENGTH]
Definition: window_dlg_popup.h:30
HAL_GetTick
uint32_t HAL_GetTick(void)
Provides a tick value in millisecond.
Definition: stm32f4xx_hal.c:339
msg_stack::msg_data
char msg_data[MSG_STACK_SIZE][MSG_MAX_LENGTH]
Definition: marlin_server.h:28
gui_invalidate
void gui_invalidate(void)
Definition: gui.c:66
_window_t
Definition: window.h:76
window_set_capture
void window_set_capture(int16_t id)
Definition: window.c:500
WINDOW_CLS_DLG_POPUP
int16_t WINDOW_CLS_DLG_POPUP
Definition: window_dlg_popup.c:16
uint8_t
const uint8_t[]
Definition: 404_html.c:3
POPUP_DELAY_MS
#define POPUP_DELAY_MS
Definition: window_dlg_popup.c:14
MSG_MAX_LENGTH
#define MSG_MAX_LENGTH
Definition: marlin_server.h:19
window_create_ptr
int16_t window_create_ptr(int16_t cls_id, int16_t id_parent, rect_ui16_t rect, void *ptr)
Definition: window.c:102
_window_dlg_popup_t
Definition: window_dlg_popup.h:21