|
marco 1.29.1
Window manager
|
#include <config.h>#include "util.h"#include "core.h"#include "tabpopup.h"#include "theme.h"#include "prefs.h"#include "screen.h"#include "../core/workspace.h"#include "../core/frame-private.h"#include "draw-workspace.h"#include <gtk/gtk.h>#include <gtk/gtk-a11y.h>#include <gdk/gdkx.h>#include <math.h>Data Structures | |
| struct | _TabEntry |
| struct | _MetaTabPopup |
| struct | _MetaSelectImage |
| struct | _MetaSelectImageClass |
| struct | _MetaSelectWorkspace |
| struct | _MetaSelectWorkspaceClass |
Macros | |
| #define | OUTSIDE_SELECT_RECT 8 |
| #define | INSIDE_SELECT_RECT 8 |
| #define | META_TYPE_SELECT_IMAGE (meta_select_image_get_type ()) |
| #define | META_SELECT_IMAGE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), META_TYPE_SELECT_IMAGE, MetaSelectImage)) |
| #define | META_TYPE_SELECT_WORKSPACE (meta_select_workspace_get_type ()) |
| #define | META_SELECT_WORKSPACE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), META_TYPE_SELECT_WORKSPACE, MetaSelectWorkspace)) |
| #define | SELECT_OUTLINE_WIDTH 2 |
| #define | MINI_WORKSPACE_SCREEN_FRACTION 0.33 |
Typedefs | |
| typedef struct _TabEntry | TabEntry |
| typedef GtkWindowAccessibleClass | MetaTabPopupWindowAccessibleClass |
| typedef GtkWindowAccessible | MetaTabPopupWindowAccessible |
| typedef GtkWindowClass | MetaTabPopupWindowClass |
| typedef GtkWindow | MetaTabPopupWindow |
| typedef struct _MetaSelectImage | MetaSelectImage |
| typedef struct _MetaSelectImageClass | MetaSelectImageClass |
| typedef struct _MetaSelectWorkspace | MetaSelectWorkspace |
| typedef struct _MetaSelectWorkspaceClass | MetaSelectWorkspaceClass |
Functions | |
| static GType | meta_tab_popup_window_get_type (void) |
| static GType | meta_tab_popup_window_accessible_get_type (void) |
| static GtkWidget * | selectable_image_new (GdkPixbuf *pixbuf, cairo_surface_t *win_surface) |
| static void | select_image (GtkWidget *widget) |
| static void | unselect_image (GtkWidget *widget) |
| static GtkWidget * | selectable_workspace_new (MetaWorkspace *workspace, int entry_count) |
| static void | select_workspace (GtkWidget *widget) |
| static void | unselect_workspace (GtkWidget *widget) |
| static AtkStateSet * | meta_tab_popup_window_accessible_ref_state_set (AtkObject *accessible) |
| static void | meta_tab_popup_window_accessible_class_init (MetaTabPopupWindowAccessibleClass *cls) |
| static void | meta_tab_popup_window_accessible_init (MetaTabPopupWindowAccessible *self) |
| static void | meta_tab_popup_window_class_init (MetaTabPopupWindowClass *cls) |
| static void | meta_tab_popup_window_init (MetaTabPopupWindow *self) |
| static GtkWidget * | meta_tab_popup_window_new (void) |
| static gboolean | outline_window_draw (GtkWidget *widget, cairo_t *cr, gpointer data) |
| static void | popup_window_screen_changed (GtkWidget *widget, GdkScreen *old_screen, gpointer data) |
| static GdkPixbuf * | dimm_icon (GdkPixbuf *pixbuf) |
| static TabEntry * | tab_entry_new (const MetaTabEntry *entry, gboolean outline, gint scale) |
| static gboolean | screen_use_osd_style (MetaScreen *screen) |
| MetaTabPopup * | meta_ui_tab_popup_new (const MetaTabEntry *entries, MetaScreen *meta_screen, int entry_count, int width, gboolean expand_for_titles, gint border) |
| static void | free_tab_entry (gpointer data, gpointer user_data) |
| void | meta_ui_tab_popup_free (MetaTabPopup *popup) |
| void | meta_ui_tab_popup_set_showing (MetaTabPopup *popup, gboolean showing) |
| static void | display_entry (MetaTabPopup *popup, TabEntry *te) |
| void | meta_ui_tab_popup_forward (MetaTabPopup *popup) |
| void | meta_ui_tab_popup_backward (MetaTabPopup *popup) |
| static void | display_widget (MetaTabPopup *popup, GtkWidget *w) |
| void | meta_ui_tab_popup_down (MetaTabPopup *popup) |
| void | meta_ui_tab_popup_up (MetaTabPopup *popup) |
| MetaTabEntryKey | meta_ui_tab_popup_get_selected (MetaTabPopup *popup) |
| void | meta_ui_tab_popup_select (MetaTabPopup *popup, MetaTabEntryKey key) |
| GtkWidget * | meta_ui_tab_popup_get_widget (MetaTabPopup *popup) |
| void | meta_ui_tab_popup_mouse_press (MetaTabPopup *popup, gint x, gint y) |
| static GType | meta_select_image_get_type (void) |
| static void | meta_select_image_class_init (MetaSelectImageClass *klass, void *data) |
| static gboolean | meta_select_image_draw (GtkWidget *widget, cairo_t *cr) |
| static void | meta_select_image_get_preferred_width (GtkWidget *widget, gint *minimum_width, gint *natural_width) |
| static void | meta_select_image_get_preferred_height (GtkWidget *widget, gint *minimum_height, gint *natural_height) |
| static GType | meta_select_workspace_get_type (void) |
| static void | meta_select_workspace_class_init (MetaSelectWorkspaceClass *klass, void *data) |
| static gboolean | meta_select_workspace_draw (GtkWidget *widget, cairo_t *cr) |
| static WnckWindowDisplayInfo | meta_convert_meta_to_wnck (MetaWindow *window, MetaScreen *screen) |
| meta_convert_meta_to_wnck() converts a MetaWindow to a WnckWindowDisplayInfo window that is used to build a thumbnail of a workspace. | |
Variables | |
| static GtkImageClass * | parent_class |
| #define INSIDE_SELECT_RECT 8 |
| #define META_SELECT_IMAGE | ( | obj | ) | (G_TYPE_CHECK_INSTANCE_CAST ((obj), META_TYPE_SELECT_IMAGE, MetaSelectImage)) |
| #define META_SELECT_WORKSPACE | ( | obj | ) | (G_TYPE_CHECK_INSTANCE_CAST ((obj), META_TYPE_SELECT_WORKSPACE, MetaSelectWorkspace)) |
| #define META_TYPE_SELECT_IMAGE (meta_select_image_get_type ()) |
| #define META_TYPE_SELECT_WORKSPACE (meta_select_workspace_get_type ()) |
| #define MINI_WORKSPACE_SCREEN_FRACTION 0.33 |
| #define OUTSIDE_SELECT_RECT 8 |
| #define SELECT_OUTLINE_WIDTH 2 |
| typedef struct _MetaSelectImage MetaSelectImage |
| typedef struct _MetaSelectImageClass MetaSelectImageClass |
| typedef struct _MetaSelectWorkspace MetaSelectWorkspace |
| typedef struct _MetaSelectWorkspaceClass MetaSelectWorkspaceClass |
| typedef GtkWindow MetaTabPopupWindow |
| typedef GtkWindowAccessible MetaTabPopupWindowAccessible |
| typedef GtkWindowAccessibleClass MetaTabPopupWindowAccessibleClass |
| typedef GtkWindowClass MetaTabPopupWindowClass |
|
static |
References FALSE.
Referenced by tab_entry_new().
|
static |
References _MetaTabPopup::border, BORDER_OUTLINE_TAB, BORDER_OUTLINE_WINDOW, _MetaTabPopup::current_selected_entry, _TabEntry::inner_rect, _MetaTabPopup::label, meta_core_increment_event_serial(), _MetaTabPopup::outline_window, _TabEntry::rect, select_image(), select_workspace(), _TabEntry::title, unselect_image(), unselect_workspace(), and _TabEntry::widget.
Referenced by display_widget(), meta_ui_tab_popup_backward(), meta_ui_tab_popup_forward(), meta_ui_tab_popup_mouse_press(), and meta_ui_tab_popup_select().
|
static |
References _MetaTabPopup::current, display_entry(), _MetaTabPopup::entries, and NULL.
Referenced by meta_ui_tab_popup_down(), and meta_ui_tab_popup_up().
|
static |
References _TabEntry::dimmed_icon, _TabEntry::icon, and _TabEntry::title.
Referenced by meta_ui_tab_popup_free().
|
static |
meta_convert_meta_to_wnck() converts a MetaWindow to a WnckWindowDisplayInfo window that is used to build a thumbnail of a workspace.
References _MetaWindow::display, _MetaDisplay::expected_focus_window, FALSE, _MetaWindow::frame, _MetaRectangle::height, WnckWindowDisplayInfo::height, _MetaWindow::icon, WnckWindowDisplayInfo::icon, WnckWindowDisplayInfo::is_active, _MetaWindow::mini_icon, WnckWindowDisplayInfo::mini_icon, _MetaFrame::rect, _MetaWindow::rect, TRUE, _MetaRectangle::width, WnckWindowDisplayInfo::width, _MetaRectangle::x, WnckWindowDisplayInfo::x, _MetaRectangle::y, and WnckWindowDisplayInfo::y.
Referenced by meta_select_workspace_draw().
|
static |
References meta_select_image_draw(), meta_select_image_get_preferred_height(), meta_select_image_get_preferred_width(), and parent_class.
Referenced by meta_select_image_get_type().
|
static |
References INSIDE_SELECT_RECT, meta_gtk_style_get_dark_color(), meta_gtk_style_get_light_color(), meta_screen_for_x_screen(), META_SELECT_IMAGE, OUTSIDE_SELECT_RECT, parent_class, screen, and screen_use_osd_style().
Referenced by meta_select_image_class_init().
|
static |
References INSIDE_SELECT_RECT, OUTSIDE_SELECT_RECT, and parent_class.
Referenced by meta_select_image_class_init().
|
static |
References INSIDE_SELECT_RECT, OUTSIDE_SELECT_RECT, and parent_class.
Referenced by meta_select_image_class_init().
|
static |
References meta_select_image_class_init(), and NULL.
Referenced by selectable_image_new().
|
static |
References meta_select_workspace_draw().
Referenced by meta_select_workspace_get_type().
|
static |
References _MetaScreen::active_workspace, _MetaRectangle::height, meta_convert_meta_to_wnck(), meta_gtk_style_get_dark_color(), meta_gtk_style_get_light_color(), META_SELECT_WORKSPACE, meta_stack_list_windows(), meta_window_showing_on_its_workspace(), NULL, _MetaWindow::on_all_workspaces, _MetaScreen::rect, _MetaWorkspace::screen, screen, screen_use_osd_style(), SELECT_OUTLINE_WIDTH, _MetaWindow::skip_pager, _MetaScreen::stack, TRUE, _MetaWindow::unmaps_pending, _MetaRectangle::width, windows, and wnck_draw_workspace().
Referenced by meta_select_workspace_class_init().
|
static |
References meta_select_workspace_class_init(), and NULL.
Referenced by selectable_workspace_new().
|
static |
References meta_tab_popup_window_accessible_ref_state_set().
|
static |
Referenced by meta_tab_popup_window_class_init().
|
static |
|
static |
References NULL.
Referenced by meta_tab_popup_window_accessible_class_init().
|
static |
|
static |
Referenced by meta_tab_popup_window_new().
|
static |
|
static |
References meta_tab_popup_window_get_type(), and NULL.
Referenced by meta_ui_tab_popup_new().
| void meta_ui_tab_popup_backward | ( | MetaTabPopup * | popup | ) |
References _MetaTabPopup::current, display_entry(), _MetaTabPopup::entries, and NULL.
Referenced by process_tab_grab().
| void meta_ui_tab_popup_down | ( | MetaTabPopup * | popup | ) |
References _MetaTabPopup::current, display_widget(), _MetaTabPopup::grid, _TabEntry::grid_left, _TabEntry::grid_top, and NULL.
Referenced by process_tab_grab().
| void meta_ui_tab_popup_forward | ( | MetaTabPopup * | popup | ) |
References _MetaTabPopup::current, display_entry(), _MetaTabPopup::entries, and NULL.
Referenced by process_tab_grab().
| void meta_ui_tab_popup_free | ( | MetaTabPopup * | popup | ) |
References _MetaTabPopup::entries, free_tab_entry(), NULL, _MetaTabPopup::outline_window, and _MetaTabPopup::window.
Referenced by meta_display_end_grab_op(), and on_monitors_changed().
| MetaTabEntryKey meta_ui_tab_popup_get_selected | ( | MetaTabPopup * | popup | ) |
References _MetaTabPopup::current, and _TabEntry::key.
Referenced by process_tab_grab(), and process_workspace_switch_grab().
| GtkWidget * meta_ui_tab_popup_get_widget | ( | MetaTabPopup * | popup | ) |
References NULL, and _MetaTabPopup::window.
Referenced by mouse_event_is_in_tab_popup().
| void meta_ui_tab_popup_mouse_press | ( | MetaTabPopup * | popup, |
| gint | x, | ||
| gint | y | ||
| ) |
References _MetaTabPopup::current, display_entry(), _MetaTabPopup::entries, FALSE, NULL, _TabEntry::widget, and _MetaTabPopup::window.
Referenced by event_callback().
| MetaTabPopup * meta_ui_tab_popup_new | ( | const MetaTabEntry * | entries, |
| MetaScreen * | meta_screen, | ||
| int | entry_count, | ||
| int | width, | ||
| gboolean | expand_for_titles, | ||
| gint | border | ||
| ) |
References _TabEntry::blank, _MetaTabPopup::border, BORDER_OUTLINE_TAB, BORDER_OUTLINE_WINDOW, _MetaTabPopup::current, _MetaTabPopup::current_selected_entry, _TabEntry::dimmed_icon, _MetaTabPopup::entries, FALSE, _MetaTabPopup::grid, _TabEntry::grid_left, _TabEntry::grid_top, _TabEntry::icon, _TabEntry::key, _MetaTabPopup::label, meta_tab_popup_window_new(), NULL, _MetaTabPopup::outline_window, outline_window_draw(), popup_window_screen_changed(), screen, screen_use_osd_style(), selectable_image_new(), selectable_workspace_new(), tab_entry_new(), _TabEntry::title, TRUE, _TabEntry::widget, _TabEntry::win_surface, and _MetaTabPopup::window.
| void meta_ui_tab_popup_select | ( | MetaTabPopup * | popup, |
| MetaTabEntryKey | key | ||
| ) |
References _MetaTabPopup::current, display_entry(), _MetaTabPopup::entries, _TabEntry::key, and NULL.
Referenced by do_choose_window(), handle_workspace_switch_or_move(), and process_workspace_switch_grab().
| void meta_ui_tab_popup_set_showing | ( | MetaTabPopup * | popup, |
| gboolean | showing | ||
| ) |
References meta_core_increment_event_serial(), and _MetaTabPopup::window.
Referenced by do_choose_window(), and handle_workspace_switch_or_move().
| void meta_ui_tab_popup_up | ( | MetaTabPopup * | popup | ) |
References _MetaTabPopup::current, display_widget(), _MetaTabPopup::grid, _TabEntry::grid_left, _TabEntry::grid_top, and NULL.
Referenced by process_tab_grab().
|
static |
References _MetaTabPopup::border, BORDER_OUTLINE_WORKSPACE, _MetaTabPopup::current_selected_entry, FALSE, _TabEntry::inner_rect, NULL, and _TabEntry::rect.
Referenced by meta_ui_tab_popup_new().
|
static |
References screen.
Referenced by meta_ui_tab_popup_new().
|
static |
References meta_display_get_compositor(), meta_prefs_get_compositing_manager(), meta_screen_get_display(), and screen.
Referenced by meta_select_image_draw(), meta_select_workspace_draw(), and meta_ui_tab_popup_new().
|
static |
References META_SELECT_IMAGE, and TRUE.
Referenced by display_entry().
|
static |
References META_SELECT_WORKSPACE, and TRUE.
Referenced by display_entry().
|
static |
References meta_select_image_get_type(), and NULL.
Referenced by meta_ui_tab_popup_new().
|
static |
References _MetaRectangle::height, meta_screen_get_current_xinerama(), META_SELECT_WORKSPACE, meta_select_workspace_get_type(), MINI_WORKSPACE_SCREEN_FRACTION, NULL, _MetaXineramaScreenInfo::rect, _MetaScreen::rect, _MetaWorkspace::screen, SELECT_OUTLINE_WIDTH, and _MetaRectangle::width.
Referenced by meta_ui_tab_popup_new().
|
static |
References _MetaTabEntry::blank, _TabEntry::blank, _MetaTabEntry::demands_attention, dimm_icon(), _TabEntry::dimmed_icon, _MetaRectangle::height, _MetaTabEntry::hidden, _MetaTabEntry::icon, _TabEntry::icon, _MetaTabEntry::inner_rect, _TabEntry::inner_rect, _MetaTabEntry::key, _TabEntry::key, meta_g_utf8_strndup(), NULL, _MetaTabEntry::rect, _TabEntry::rect, _MetaTabEntry::title, _TabEntry::title, _TabEntry::widget, _MetaRectangle::width, _MetaTabEntry::win_surface, _TabEntry::win_surface, _MetaRectangle::x, and _MetaRectangle::y.
Referenced by meta_ui_tab_popup_new().
|
static |
References FALSE, and META_SELECT_IMAGE.
Referenced by display_entry().
|
static |
References FALSE, and META_SELECT_WORKSPACE.
Referenced by display_entry().
|
static |