|
pnmixer
Volume mixer for the system tray
|
Popup menu subsystem. More...
#include <stdlib.h>#include <glib.h>#include <gtk/gtk.h>#include "audio.h"#include "support-log.h"#include "support-intl.h"#include "support-ui.h"#include "ui-popup-menu.h"#include "ui-about-dialog.h"#include "main.h"
Go to the source code of this file.
Data Structures | |
| struct | popup_menu |
Macros | |
| #define | POPUP_MENU_UI_FILE "popup-menu-gtk2.glade" |
Functions | |
| static void | update_mute_item (GtkCheckMenuItem *mute_item, GCallback handler_func, gpointer handler_data, gboolean has_mute, gboolean muted) |
| void | on_mute_item_activate (G_GNUC_UNUSED GtkCheckMenuItem *item, PopupMenu *menu) |
| void | on_mixer_item_activate (G_GNUC_UNUSED GtkMenuItem *item, G_GNUC_UNUSED PopupMenu *menu) |
| void | on_prefs_item_activate (G_GNUC_UNUSED GtkMenuItem *item, G_GNUC_UNUSED PopupMenu *menu) |
| void | on_reload_item_activate (G_GNUC_UNUSED GtkMenuItem *item, PopupMenu *menu) |
| void | on_about_item_activate (G_GNUC_UNUSED GtkMenuItem *item, G_GNUC_UNUSED PopupMenu *menu) |
| static void | on_audio_changed (G_GNUC_UNUSED Audio *audio, AudioEvent *event, gpointer data) |
| GtkWindow * | popup_menu_get_window (PopupMenu *menu) |
| void | popup_menu_show (PopupMenu *menu, GTK_3_22_UNUSED GtkMenuPositionFunc func, GTK_3_22_UNUSED gpointer data, GTK_3_22_UNUSED guint button, GTK_3_22_UNUSED guint activate_time) |
| void | popup_menu_destroy (PopupMenu *menu) |
| PopupMenu * | popup_menu_create (Audio *audio) |
Popup menu subsystem.
This file holds the ui-related code for the popup menu.
Definition in file ui-popup-menu.c.
| #define POPUP_MENU_UI_FILE "popup-menu-gtk2.glade" |
Definition at line 37 of file ui-popup-menu.c.
| void on_about_item_activate | ( | G_GNUC_UNUSED GtkMenuItem * | item, |
| G_GNUC_UNUSED PopupMenu * | menu | ||
| ) |
Handles a click on 'about_item', opening the About dialog.
| item | the object which received the signal. |
| menu | PopupMenu instance set when the signal handler was connected. |
Definition at line 174 of file ui-popup-menu.c.
|
static |
Handle signals from the audio subsystem.
| audio | the Audio instance that emitted the signal. |
| event | the AudioEvent containing useful information. |
| data | user supplied data. |
Definition at line 188 of file ui-popup-menu.c.
| void on_mixer_item_activate | ( | G_GNUC_UNUSED GtkMenuItem * | item, |
| G_GNUC_UNUSED PopupMenu * | menu | ||
| ) |
Handles a click on 'mixer_item', opening the specified mixer application.
| item | the object which received the signal. |
| menu | PopupMenu instance set when the signal handler was connected. |
Definition at line 135 of file ui-popup-menu.c.
| void on_mute_item_activate | ( | G_GNUC_UNUSED GtkCheckMenuItem * | item, |
| PopupMenu * | menu | ||
| ) |
Handles a click on 'mute_item', toggling the mute audio state.
| item | the object which received the signal. |
| menu | PopupMenu instance set when the signal handler was connected. |
Definition at line 121 of file ui-popup-menu.c.
| void on_prefs_item_activate | ( | G_GNUC_UNUSED GtkMenuItem * | item, |
| G_GNUC_UNUSED PopupMenu * | menu | ||
| ) |
Handles a click on 'prefs_item', opening the preferences window.
| item | the object which received the signal. |
| menu | PopupMenu instance set when the signal handler was connected. |
Definition at line 148 of file ui-popup-menu.c.
| void on_reload_item_activate | ( | G_GNUC_UNUSED GtkMenuItem * | item, |
| PopupMenu * | menu | ||
| ) |
Handles a click on 'reload_item', re-initializing the audio subsystem.
| item | the object which received the signal. |
| menu | PopupMenu instance set when the signal handler was connected. |
Definition at line 161 of file ui-popup-menu.c.
Creates the popup menu and connects all the signals.
| audio | pointer to this audio subsystem. |
Definition at line 261 of file ui-popup-menu.c.
| void popup_menu_destroy | ( | PopupMenu * | menu | ) |
Destroys the popup menu, freeing any resources.
| menu | a PopupMenu instance. |
Definition at line 245 of file ui-popup-menu.c.
| GtkWindow* popup_menu_get_window | ( | PopupMenu * | menu | ) |
Return a pointer toward the internal GtkWindow instance.
| menu | a PopupMenu instance. |
Definition at line 208 of file ui-popup-menu.c.
| void popup_menu_show | ( | PopupMenu * | menu, |
| GTK_3_22_UNUSED GtkMenuPositionFunc | func, | ||
| GTK_3_22_UNUSED gpointer | data, | ||
| GTK_3_22_UNUSED guint | button, | ||
| GTK_3_22_UNUSED guint | activate_time | ||
| ) |
Shows the popup menu. The weird prototype of this function comes from the underlying gtk_menu_popup() that is used to display the popup menu.
| menu | a PopupMenu instance. |
| func | a user supplied function used to position the menu, or NULL. |
| data | user supplied data to be passed to func. |
| button | the mouse button which was pressed to initiate the event. |
| activate_time | the time at which the activation event occurred. |
Definition at line 225 of file ui-popup-menu.c.
|
static |
Definition at line 68 of file ui-popup-menu.c.
1.8.14