Debian Codegraph @

inc/gprogress.h

raw symbols SCIP
1 /* Copyright (C) 2000-2012 by George Williams */
2 /*
3 * Redistribution and use in source and binary forms, with or without
4 * modification, are permitted provided that the following conditions are met:
5
6 * Redistributions of source code must retain the above copyright notice, this
7 * list of conditions and the following disclaimer.
8
9 * Redistributions in binary form must reproduce the above copyright notice,
10 * this list of conditions and the following disclaimer in the documentation
11 * and/or other materials provided with the distribution.
12
13 * The name of the author may not be used to endorse or promote products
14 * derived from this software without specific prior written permission.
15
16 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
17 * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
18 * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
19 * EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
20 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
21 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
22 * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
23 * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
24 * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
25 * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26 */
27
28 #ifndef FONTFORGE_GPROGRESS_H
29 #define FONTFORGE_GPROGRESS_H
30
31 #include "basics.h"
32 #include "intl.h"
33
34 extern void GProgressStartIndicator(
35 int delay, /* in tenths of seconds */
36 const unichar_t *win_title, /* for the window decoration */
37 const unichar_t *line1, /* First line of description */
38 const unichar_t *line2, /* Second line */
39 int tot, /* Number of sub-entities in the operation */
40 int stages /* Number of stages, each processing tot sub-entities */
41 );
42 extern void GProgressEndIndicator(void); /* Ends the topmost indicator */
43 extern void GProgressChangeLine1(const unichar_t *line1); /* Changes the text in the topmost */
44 extern void GProgressChangeLine2(const unichar_t *line2); /* Changes the text in the topmost */
45 extern void GProgressChangeTotal(int tot); /* Changes the expected length in the topmost */
46 extern void GProgressChangeStages(int stages); /* Changes the expected number of stages in the topmost */
47 extern void GProgressEnableStop(int enabled); /* Allows you to disable and enable the stop button if it can't be used in a section of code */
48 /* if any of the next routines returns false, then abort processing */
49 extern int GProgressNextStage(void); /* Move to the next stage in the topmost indicator */
50 extern int GProgressNext(void); /* Increment progress by one sub-entity */
51 extern int GProgressIncrementBy(int cnt); /* Increment progress by cnt sub-entities */
52 extern int GProgressReset(void); /* Set progress to 0 */
53 extern void GProgressPauseTimer(void); /* Don't bring up the progress dlg because of */
54 extern void GProgressResumeTimer(void); /* time spent between a pause and resume */
55 extern void GProgressShow(void); /* Display the damn thing whether we should or not */
56
57 extern void GProgressStartIndicator8(int delay, const char *title, const char *line1,
58 const char *line2, int tot, int stages);
59 extern void GProgressChangeLine1_8(const char *line1); /* Changes the text in the topmost */
60 extern void GProgressChangeLine2_8(const char *line2); /* Changes the text in the topmost */
61
62 #define gwwv_progress_start_indicator GProgressStartIndicator8
63 #define gwwv_progress_next GProgressNext
64 #define gwwv_progress_next_stage GProgressNextStage
65 #define gwwv_progress_end_indicator GProgressEndIndicator
66 #define gwwv_progress_show GProgressShow
67 #define gwwv_progress_change_line1 GProgressChangeLine1_8
68 #define gwwv_progress_change_line2 GProgressChangeLine2_8
69 #define gwwv_progress_change_total GProgressChangeTotal
70 #define gwwv_progress_change_stages GProgressChangeStages
71 #define gwwv_progress_increment GProgressIncrementBy
72 #define gwwv_progress_reset GProgressReset
73 #define gwwv_progress_pause_timer GProgressPauseTimer
74 #define gwwv_progress_resume_timer GProgressResumeTimer
75 #define gwwv_progress_enable_stop GProgressEnableStop
76
77 #endif /* FONTFORGE_GPROGRESS_H */