File: miscDesignDlg.h

package info (click to toggle)
dfcgen-gtk 0.6-2
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, forky, sid, trixie
  • size: 2,456 kB
  • sloc: ansic: 9,688; sh: 4,936; makefile: 207; sed: 16
file content (124 lines) | stat: -rw-r--r-- 4,719 bytes parent folder | download
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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
/**
 * \file        miscDesignDlg.h
 * \brief       Miscellaneous FIR/IIR design dialogs.
 * \note        Includes raw filters (filters without a design, except \f$f_{Sample}\f$).
 * \copyright   Copyright (C) 2006-2022 Ralf Hoppe <ralf.hoppe@dfcgen.de>
 */

#ifndef MISCFLT_DESIGNDLG_H
#define MISCFLT_DESIGNDLG_H


/* INCLUDE FILES **************************************************************/

#include "gui.h"
#include "cfgSettings.h"


#ifdef  __cplusplus
extern "C" {
#endif


/* GLOBAL TYPE DECLARATIONS ***************************************************/



/* GLOBAL CONSTANT DECLARATIONS ***********************************************/


/* GLOBAL VARIABLE DECLARATIONS ***********************************************/


/* GLOBAL MACRO DEFINITIONS ***************************************************/


/* EXPORTED FUNCTIONS *********************************************************/


/* FUNCTION *******************************************************************/
/** Misc filter design dialog creation function.
 *
 *  \note There is no design for raw filters (except the cutoff frequency).
 *
 *  \param topWidget    Toplevel widget.
 *  \param boxDesignDlg The box widget to be used for the filter dialog.
 *  \param pPrefs       Pointer to desktop preferences.
 *
 ******************************************************************************/
    void miscDesignDlgCreate (GtkWidget *topWidget, GtkWidget *boxDesignDlg,
                              const CFG_DESKTOP* pPrefs);


/* FUNCTION *******************************************************************/
/** Misc filter design dialog preset function. Restores all states of dialog
 *  elements from design data of a Misc filter.
 *
 *  \param topWidget    Toplevel widget.
 *  \param pDesign      Pointer to misc filter design data.
 *  \param pFilter      Pointer to filter coefficients (only member \a f0 used).
 *  \param pPrefs       Pointer to desktop preferences.
 *
 ******************************************************************************/
    void miscDesignDlgPreset (GtkWidget *topWidget,
                              const MISCFLT_DESIGN *pDesign,
                              const FLTCOEFF *pFilter,
                              const CFG_DESKTOP* pPrefs);


/* FUNCTION *******************************************************************/
/** Raw filter design dialog destroy function.
 *
 *  \note If the dialog is not active the function does nothing.
 *
 *  \param topWidget    Toplevel widget.
 *
 ******************************************************************************/
    void miscDesignDlgDestroy (GtkWidget *topWidget);


/* FUNCTION *******************************************************************/
/** Checks whether the misc filter design dialog is active or not.
 *
 *  \param topWidget    Toplevel widget.
 *
 *  \return             TRUE if the dialog is active (the main-widget of
 *                      misc dialog found), else FALSE.
 ******************************************************************************/
    BOOL miscDesignDlgActive (GtkWidget *topWidget);


/* FUNCTION *******************************************************************/
/** Miscellaneous FIR/IIR filter design dialog \e Apply function.
 *
 *  \param topWidget    Toplevel widget.
 *
 *  \return             - 0 (or GSL_SUCCESS) if okay and nothing has changed.
 *                      - a negative number (typically GSL_CONTINUE) if a
 *                        coefficient or the degree has changed, but the filter
 *                        is valid. You can use the FLTERR_WARNING macro from
 *                        filterSupport.h to check this condition.
 *                      - a positive error number (typically from from errno.h
 *                        or gsl_errno.h) that something is wrong and the
 *                        filter can't be created. You can use the
 *                        FLTERR_CRITICAL macro from filterSupport.h to check
 *                        this condition. If the value is INT_MAX then an
 *                        error message box was displayed by function
 *                        miscDesignDlgApply(), means the caller should not
 *                        popup a (second) message box.
 ******************************************************************************/
    int miscDesignDlgApply (GtkWidget *topWidget, const CFG_DESKTOP* pPrefs);


#ifdef  __cplusplus
}
#endif


#endif /* MISCFLT_DESIGNDLG_H */


/******************************************************************************/
/* END OF FILE                                                                */
/******************************************************************************/