~audio-recorder/audio-recorder/trunk

189 by osmoma at gmail
Replaced all GTK3's deprecated methods with new syntax.
1
#ifndef _REC_WINDOW_H_
2
#define _REC_WINDOW_H_
1 by Osmo Antero Maatta
Initial import 17.jan.2011
3
4
#include <glib.h>
5
#include <gtk/gtk.h>
6
#include <gdk/gdk.h>
7
472.1.2 by Osmo Antero
GTK3+ has now a standard GtkLevelBar widget. I renamed our 'GtkLevelBar' widet to 'LevelBar'.
8
#include "levelbar.h"
173 by Osmo Antero
Support new systems; Ubuntu 12.10, Fedora 18. Improved timer and VAD-modules. Better gst-pipeline.
9
1 by Osmo Antero Maatta
Initial import 17.jan.2011
10
// Width of the settings window
22 by Osmo Antero Maatta
Formatted the code using astyle. See README for instructions.
11
#define PREF_WINDOW_WIDTH 300
1 by Osmo Antero Maatta
Initial import 17.jan.2011
12
472.1.2 by Osmo Antero
GTK3+ has now a standard GtkLevelBar widget. I renamed our 'GtkLevelBar' widet to 'LevelBar'.
13
// PULSE_TYPE: Type of pulse on the levelbar.
463 by Osmo Antero
Updated README and INSTALL files.
14
// Notice: This cannot be changed from the GUI.
451 by Osmo Antero
Some improvements in timer.c. Check priority if timer-text has several commands (that can fire). This needs more thinking and testing. Work continues.
15
// Use Gsettings/dconf-editor and find "level-bar-pulse-type" in apps -> audio-recorder.
198 by osmoma at gmail
Moving to Gstreamer 1.0 + other small changes.
16
typedef enum PULSE_TYPE {PULSE_PEAK, PULSE_RMS} PULSE_TYPE;
189 by osmoma at gmail
Replaced all GTK3's deprecated methods with new syntax.
17
36 by Osmo Antero Maatta
language updates
18
// Settings for main window
1 by Osmo Antero Maatta
Initial import 17.jan.2011
19
typedef struct {
22 by Osmo Antero Maatta
Formatted the code using astyle. See README for instructions.
20
#ifdef APP_HAS_MENU
1 by Osmo Antero Maatta
Initial import 17.jan.2011
21
    GtkUIManager *ui_manager;
22 by Osmo Antero Maatta
Formatted the code using astyle. See README for instructions.
22
#endif
23
    GtkWidget *window; // Main window
1 by Osmo Antero Maatta
Initial import 17.jan.2011
24
    GdkWindowState state; // Window's state
69 by Osmo Antero
Ported this application to GTK/GDK 3. Using now GSettings (and dconf) instead of GConf2
25
451 by Osmo Antero
Some improvements in timer.c. Check priority if timer-text has several commands (that can fire). This needs more thinking and testing. Work continues.
26
    GtkWidget *recorder_button; // Button to start/stop/pause/continue recording
69 by Osmo Antero
Ported this application to GTK/GDK 3. Using now GSettings (and dconf) instead of GConf2
27
450 by Osmo Antero
Fixed the level-bar widget (for GTK 3.14). User can change the bar by left/right clicking on the level widget.
28
    GtkWidget *time_label;  // Labels to show recording time and filesize
22 by Osmo Antero Maatta
Formatted the code using astyle. See README for instructions.
29
    GtkWidget *size_label;
198 by osmoma at gmail
Moving to Gstreamer 1.0 + other small changes.
30
    GtkWidget *level_bar; // Gtklevelbar widget
22 by Osmo Antero Maatta
Formatted the code using astyle. See README for instructions.
31
32
    GtkWidget *filename; // Current filename
198 by osmoma at gmail
Moving to Gstreamer 1.0 + other small changes.
33
    GtkWidget *add_to_file; // Add to current file?
22 by Osmo Antero Maatta
Formatted the code using astyle. See README for instructions.
34
35
    GtkWidget *timer_active;  // Timer settings
36
    GtkWidget *timer_text;
1 by Osmo Antero Maatta
Initial import 17.jan.2011
37
    GtkWidget *timer_save_button;
38
198 by osmoma at gmail
Moving to Gstreamer 1.0 + other small changes.
39
    GtkWidget *audio_device; // List of audio devices, media players/skype. Combobox.
450 by Osmo Antero
Fixed the level-bar widget (for GTK 3.14). User can change the bar by left/right clicking on the level widget.
40
    GtkWidget *media_format; // List of media formats; ogg, flac, mp3, avi, etc. Combobox.
1 by Osmo Antero Maatta
Initial import 17.jan.2011
41
42
    GtkWidget *error_box; // Show error messages here
43
44
    GtkWidget *settings_button; // Additional settings button
81 by Osmo Antero Maatta
New GtkLevelBar widget for the level indicator.
45
450 by Osmo Antero
Fixed the level-bar widget (for GTK 3.14). User can change the bar by left/right clicking on the level widget.
46
    PULSE_TYPE pulse_type;  // Value on the level-bar widget
47
35 by Osmo Antero Maatta
Mainly a small typo in auto-start.c
48
} MainWindow;
1 by Osmo Antero Maatta
Initial import 17.jan.2011
49
50
void win_create_window();
51
void win_show_window(gboolean show);
52
gboolean win_window_is_visible();
53
void win_close_button_cb(GtkButton *button, gpointer user_data);
54
void win_timer_save_text_cb(GtkWidget *widget, gpointer user_data);
56 by Osmo Antero
Version 0.5
55
void win_quit_application();
1 by Osmo Antero Maatta
Initial import 17.jan.2011
56
void win_hide_window();
57
void win_update_gui();
58
void win_set_error_text(gchar *error_txt);
59
void win_show_settings_dialog();
60
404 by Osmo Antero
Removed dependency to libpulse-dev. Using now Gstreamer to get the device list. Completed src/win-settings-pipe.[ch] module.
61
void win_refresh_device_list();
407 by Osmo Antero
Code cleanup.
62
void win_refresh_profile_list();
404 by Osmo Antero
Removed dependency to libpulse-dev. Using now Gstreamer to get the device list. Completed src/win-settings-pipe.[ch] module.
63
198 by osmoma at gmail
Moving to Gstreamer 1.0 + other small changes.
64
void win_update_level_bar(gdouble norm_rms, gdouble norm_peak);
1 by Osmo Antero Maatta
Initial import 17.jan.2011
65
void win_set_filename(gchar *filename);
66
void win_set_time_label(gchar *time_txt);
67
void win_set_size_label(gchar *size_txt);
68
69
void win_show_right_click_menu();
70
71
GdkWindowState win_get_window_state();
72
73
void systray_module_init();
74
void systray_module_exit();
317 by Osmo Antero
Fixing bug #1159341. Systray icon popped ON after reboot or logout.
75
void systray_icon_setup(gboolean show);
1 by Osmo Antero Maatta
Initial import 17.jan.2011
76
gboolean systray_icon_is_installed();
77
78
GtkWidget *systray_create_menu(gboolean for_tray_icon);
79
void systray_set_menu_items1(gint state);
80
void systray_set_menu_items2(gboolean show);
77 by Osmo Antero
Updated version (v0.7) for Fedora 16+ and Ubuntu 12.04.
81
1 by Osmo Antero Maatta
Initial import 17.jan.2011
82
#endif
83