/
main.c
25 lines (19 loc) · 790 Bytes
/
main.c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
#include <stdlib.h>
#include <iup.h>
#include "about.h"
Ihandle *mainDlg, *aboutDlg;
void led_load();
void main_about(){ //Callback for the about button of the main dialog
IupPopup(aboutDlg, IUP_CENTERPARENT, IUP_CENTERPARENT); //Shows the "about" window
}
int main(int argc, char **argv){
IupOpen(&argc, &argv);
led_load(); //Loads the GUI compiled from LED files.
mainDlg = IupGetHandle("mainDlg"); //Get the window named "mainDlg"
IupShowXY(mainDlg, IUP_CENTER, IUP_CENTER); //Shows the main window
aboutDlg = about_init(); //Get the window named "aboutDlg"
IupSetCallback(IupGetHandle("about"), "ACTION", (Icallback)main_about); //Callback: Associates the click action of the button "about" with the "about" function.
IupMainLoop();
IupClose();
return EXIT_SUCCESS;
}