-
Notifications
You must be signed in to change notification settings - Fork 1
/
gtk_functions.h
58 lines (37 loc) · 1.21 KB
/
gtk_functions.h
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
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
//
// Created by Unknow on 08/11/2020.
//
#ifndef GTK_TP_GTK_FUNCTIONS_H
#define GTK_TP_GTK_FUNCTIONS_H
#include <gtk/gtk.h>
#include <stdio.h>
#include <stdlib.h>
//Construire GTK depuis le fichier glade
static GtkBuilder *builder;
typedef struct {
GtkWindow *window;
GtkEntry *entry_number_1;
GtkEntry *entry_number_2;
GtkComboBoxText *combo_operator;
GtkLabel *label_result;
GtkButton *button_calcul;
GtkLabel *label_statut;
} App_widgets;
static App_widgets *widgets;
///////////////////////////////////////////////////////////////////////////////////////
#if defined(__WIN32) || defined(WIN32)
G_MODULE_EXPORT void on_button_calcul_clicked();
#endif
///////////////////////////////////////////////////////////////////////////////////////
void onDestroy();
void startGTK(int *argc, char ***argv, char *gladeFile);
void connectWidgets();
void hide_statut_bar();
void show_statut_bar(const char *message);
void process_operation();
int validate_number(GtkEntry *entry);
void add(double number1, double number2);
void substract(double number1, double number2);
void multiply(double number1, double number2);
void divide(double number1, double number2);
#endif //GTK_TP_GTK_FUNCTIONS_H