1
/* gtktiemu - a TI89/92/92+ emulator
2
* (c) Copyright 2000-2001, Romain Lievin and Thomas Corvazier
3
* (c) Copyright 2001-2002, Romain Lievin
5
* This program is free software; you can redistribute it and/or modify
6
* it under the terms of the GNU General Public License as published by
7
* the Free Software Foundation; either version 2 of the License, or
8
* (at your option) any later version.
10
* This program is distributed in the hope that it will be useful,
11
* but WITHOUT ANY WARRANTY; without even the implied warranty of
12
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13
* GNU General Public License for more details.
15
* You should have received a copy of the GNU General Public License
16
* along with this program; if not, write to the Free Software
17
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
23
extern Ti68kInfoUpdate *iupdate; // defined in lib68k.c
25
/* Functions for updating */
27
void (*start) (void); // Init internal variables
28
void (*msg_box) (const char *t, char *s); // Display a message box
29
void (*pbar) (void); // Refresh the progress bar
30
void (*label) (void); // Refresh the label
31
void (*refresh) (void); // Pass control to GUI for refresh
32
int (*choose) (char *cur_name,
33
char *new_name); // Display choice box (skip, rename, overwrite, ... )
38
Macros: they check that function pointer is good and then
39
call the pointer itself
41
#define iupdate_start() if(iupdate && iupdate->start) iupdate->start()
42
#define iupdate_msgbox(t, s) if(iupdate && iupdate->msg_box) iupdate->msg_box(t, s)
43
#define iupdate_pbar() if(iupdate && iupdate->pbar) iupdate->pbar()
44
#define iupdate_label() if(iupdate && iupdate->label) iupdate->label()
45
#define iupdate_refresh() if(iupdate && iupdate->refresh) iupdate->refresh()
46
#define iupdate_stop() if(iupdate && iupdate->stop) iupdate->stop()
48
int inline iupdate_choose(char* c, char* n)
49
{ if(iupdate && iupdate->choose) return iupdate->choose(c, n); else return 0; }