marco 1.29.1
Window manager
Loading...
Searching...
No Matches
frames.c File Reference
View source
#include <config.h>
#include <glib/gi18n-lib.h>
#include <math.h>
#include <string.h>
#include "boxes.h"
#include "frames.h"
#include "util.h"
#include "core.h"
#include "menu.h"
#include "fixedtip.h"
#include "theme.h"
#include "prefs.h"
#include "ui.h"
#include "display.h"
#include <cairo-xlib.h>
Include dependency graph for frames.c:

Data Structures

struct  CachedFramePiece
 
struct  CachedPixels
 

Macros

#define DEFAULT_INNER_BUTTON_BORDER   3
 
#define TIP_DELAY   450
 
#define DECORATING_BORDER   100
 
#define RESIZE_EXTENDS   15
 
#define TOP_RESIZE_HEIGHT   4
 

Functions

 G_DEFINE_TYPE (MetaFrames, meta_frames, GTK_TYPE_WINDOW)
 
static void meta_frames_class_init (MetaFramesClass *klass)
 
static void meta_frames_init (MetaFrames *frames)
 
static void meta_frames_destroy (GtkWidget *object)
 
static void meta_frames_finalize (GObject *object)
 
static void meta_frames_style_updated (GtkWidget *widget)
 
static void meta_frames_update_prelit_control (MetaFrames *frames, MetaUIFrame *frame, MetaFrameControl control)
 
static gboolean meta_frames_button_press_event (GtkWidget *widget, GdkEventButton *event)
 
static gboolean meta_frames_button_release_event (GtkWidget *widget, GdkEventButton *event)
 
static gboolean meta_frames_motion_notify_event (GtkWidget *widget, GdkEventMotion *event)
 
static gboolean meta_frames_destroy_event (GtkWidget *widget, GdkEventAny *event)
 
static gboolean meta_frames_draw (GtkWidget *widget, cairo_t *cr)
 
static gboolean meta_frames_enter_notify_event (GtkWidget *widget, GdkEventCrossing *event)
 
static gboolean meta_frames_leave_notify_event (GtkWidget *widget, GdkEventCrossing *event)
 
static void meta_frames_attach_style (MetaFrames *frames, MetaUIFrame *frame)
 
static void meta_frames_paint_to_drawable (MetaFrames *frames, MetaUIFrame *frame, cairo_t *cr)
 
static void meta_frames_calc_geometry (MetaFrames *frames, MetaUIFrame *frame, MetaFrameGeometry *fgeom)
 
static void meta_frames_ensure_layout (MetaFrames *frames, MetaUIFrame *frame)
 
static MetaUIFrame * meta_frames_lookup_window (MetaFrames *frames, Window xwindow)
 
static void meta_frames_font_changed (MetaFrames *frames)
 
static void meta_frames_button_layout_changed (MetaFrames *frames)
 
static GdkRectangle * control_rect (MetaFrameControl control, MetaFrameGeometry *fgeom)
 
static MetaFrameControl get_control (MetaFrames *frames, MetaUIFrame *frame, int x, int y)
 
static void clear_tip (MetaFrames *frames)
 
static void invalidate_all_caches (MetaFrames *frames)
 
static void invalidate_whole_window (MetaFrames *frames, MetaUIFrame *frame)
 
static GObject * meta_frames_constructor (GType gtype, guint n_properties, GObjectConstructParam *properties)
 
static gint unsigned_long_equal (gconstpointer v1, gconstpointer v2)
 
static guint unsigned_long_hash (gconstpointer v)
 
static void prefs_changed_callback (MetaPreference pref, void *data)
 
static GtkStyleContext * create_style_context (MetaFrames *frames, const gchar *variant)
 
static GtkStyleContext * meta_frames_get_theme_variant (MetaFrames *frames, const gchar *variant)
 
static void update_style_contexts (MetaFrames *frames)
 
static void listify_func (gpointer key, gpointer value, gpointer data)
 
static CachedPixels * get_cache (MetaFrames *frames, MetaUIFrame *frame)
 
static void invalidate_cache (MetaFrames *frames, MetaUIFrame *frame)
 
static gboolean invalidate_cache_timeout (gpointer data)
 
static void queue_recalc_func (gpointer key, gpointer value, gpointer data)
 
static void queue_draw_func (gpointer key, gpointer value, gpointer data)
 
static void reattach_style_func (gpointer key, gpointer value, gpointer data)
 
MetaFrames * meta_frames_new (void)
 
void meta_frames_manage_window (MetaFrames *frames, Window xwindow, GdkWindow *window)
 
void meta_frames_unmanage_window (MetaFrames *frames, Window xwindow)
 
static void meta_ui_frame_get_borders (MetaFrames *frames, MetaUIFrame *frame, MetaFrameBorders *borders)
 
void meta_frames_get_borders (MetaFrames *frames, Window xwindow, MetaFrameBorders *borders)
 
static void meta_ui_frame_get_corner_radiuses (MetaFrames *frames, MetaUIFrame *frame, float *top_left, float *top_right, float *bottom_left, float *bottom_right)
 
void meta_frames_get_corner_radiuses (MetaFrames *frames, Window xwindow, float *top_left, float *top_right, float *bottom_left, float *bottom_right)
 
static void get_client_rect (MetaFrameGeometry *fgeom, int window_width, int window_height, cairo_rectangle_int_t *rect)
 
static void get_visible_frame_rect (MetaFrameGeometry *fgeom, int window_width, int window_height, cairo_rectangle_int_t *rect)
 
static cairo_region_t * get_visible_region (MetaFrames *frames, MetaUIFrame *frame, MetaFrameGeometry *fgeom, int window_width, int window_height)
 
void meta_frames_apply_shapes (MetaFrames *frames, MetaDisplay *meta_display, Window xwindow, int new_window_width, int new_window_height, gboolean window_has_shape)
 
cairo_region_t * meta_frames_get_frame_bounds (MetaFrames *frames, Window xwindow, int window_width, int window_height)
 
void meta_frames_move_resize_frame (MetaFrames *frames, Window xwindow, int x, int y, int width, int height)
 
void meta_frames_queue_draw (MetaFrames *frames, Window xwindow)
 
void meta_frames_set_title (MetaFrames *frames, Window xwindow, const char *title)
 
void meta_frames_update_frame_style (MetaFrames *frames, Window xwindow)
 
void meta_frames_repaint_frame (MetaFrames *frames, Window xwindow)
 
static void show_tip_now (MetaFrames *frames)
 
static gboolean tip_timeout_func (gpointer data)
 
static void queue_tip (MetaFrames *frames)
 
static void redraw_control (MetaFrames *frames, MetaUIFrame *frame, MetaFrameControl control)
 
static gboolean meta_frame_titlebar_event (MetaUIFrame *frame, GdkEventButton *event, int action)
 
static gboolean meta_frame_double_click_event (MetaUIFrame *frame, GdkEventButton *event)
 
static gboolean meta_frame_middle_click_event (MetaUIFrame *frame, GdkEventButton *event)
 
static gboolean meta_frame_right_click_event (MetaUIFrame *frame, GdkEventButton *event)
 
static gboolean meta_frame_scroll_up_event (MetaUIFrame *frame, GdkEventButton *event)
 
static gboolean meta_frame_scroll_down_event (MetaUIFrame *frame, GdkEventButton *event)
 
void meta_frames_notify_menu_hide (MetaFrames *frames)
 
static cairo_surface_t * generate_pixmap (MetaFrames *frames, MetaUIFrame *frame, cairo_rectangle_int_t *rect)
 
static void populate_cache (MetaFrames *frames, MetaUIFrame *frame)
 
static void clip_to_screen (cairo_region_t *region, MetaUIFrame *frame)
 
static void subtract_client_area (cairo_region_t *region, MetaUIFrame *frame)
 
static void cached_pixels_draw (CachedPixels *pixels, cairo_t *cr, cairo_region_t *region)
 
static MetaUIFrame * find_frame_to_draw (MetaFrames *frames, cairo_t *cr)
 
void meta_frames_push_delay_exposes (MetaFrames *frames)
 
static void queue_pending_exposes_func (gpointer key, gpointer value, gpointer data)
 
void meta_frames_pop_delay_exposes (MetaFrames *frames)
 

Macro Definition Documentation

◆ DECORATING_BORDER

#define DECORATING_BORDER   100

◆ DEFAULT_INNER_BUTTON_BORDER

#define DEFAULT_INNER_BUTTON_BORDER   3

◆ RESIZE_EXTENDS

#define RESIZE_EXTENDS   15

◆ TIP_DELAY

#define TIP_DELAY   450

◆ TOP_RESIZE_HEIGHT

#define TOP_RESIZE_HEIGHT   4

Function Documentation

◆ cached_pixels_draw()

static void cached_pixels_draw ( CachedPixels *  pixels,
cairo_t *  cr,
cairo_region_t *  region 
)
static

◆ clear_tip()

static void clear_tip ( MetaFrames *  frames)
static

References meta_fixed_tip_hide(), and _MetaFrames::tooltip_timeout.

Referenced by meta_frames_button_press_event(), meta_frames_button_release_event(), meta_frames_destroy(), meta_frames_leave_notify_event(), meta_frames_motion_notify_event(), meta_frames_unmanage_window(), and queue_tip().

Here is the call graph for this function:

◆ clip_to_screen()

static void clip_to_screen ( cairo_region_t *  region,
MetaUIFrame *  frame 
)
static

References meta_core_get(), META_CORE_GET_END, META_CORE_GET_FRAME_HEIGHT, META_CORE_GET_FRAME_WIDTH, META_CORE_GET_FRAME_X, META_CORE_GET_FRAME_Y, META_CORE_GET_SCREEN_HEIGHT, META_CORE_GET_SCREEN_WIDTH, and _MetaUIFrame::xwindow.

Referenced by meta_frames_draw().

Here is the call graph for this function:

◆ control_rect()

◆ create_style_context()

static GtkStyleContext * create_style_context ( MetaFrames *  frames,
const gchar *  variant 
)
static

◆ find_frame_to_draw()

static MetaUIFrame * find_frame_to_draw ( MetaFrames *  frames,
cairo_t *  cr 
)
static

◆ G_DEFINE_TYPE()

G_DEFINE_TYPE ( MetaFrames  ,
meta_frames  ,
GTK_TYPE_WINDOW   
)

◆ generate_pixmap()

static cairo_surface_t * generate_pixmap ( MetaFrames *  frames,
MetaUIFrame *  frame,
cairo_rectangle_int_t *  rect 
)
static

References meta_frames_paint_to_drawable(), NULL, and _MetaUIFrame::window.

Referenced by populate_cache().

Here is the call graph for this function:

◆ get_cache()

static CachedPixels * get_cache ( MetaFrames *  frames,
MetaUIFrame *  frame 
)
static

◆ get_client_rect()

static void get_client_rect ( MetaFrameGeometry *  fgeom,
int  window_width,
int  window_height,
cairo_rectangle_int_t *  rect 
)
static

◆ get_control()

static MetaFrameControl get_control ( MetaFrames *  frames,
MetaUIFrame *  frame,
int  x,
int  y 
)
static

References _MetaFrameGeometry::above_rect, _MetaFrameGeometry::appmenu_rect, _MetaFrameGeometry::borders, _MetaButtonSpace::clickable, _MetaFrameGeometry::close_rect, get_client_rect(), _MetaFrameGeometry::height, _MetaFrameBorders::invisible, _MetaFrameGeometry::max_rect, _MetaFrameGeometry::menu_rect, meta_core_get(), META_CORE_GET_END, META_CORE_GET_FRAME_FLAGS, META_FRAME_ALLOWS_HORIZONTAL_RESIZE, META_FRAME_ALLOWS_VERTICAL_RESIZE, META_FRAME_CONTROL_ABOVE, META_FRAME_CONTROL_APPMENU, META_FRAME_CONTROL_CLIENT_AREA, META_FRAME_CONTROL_DELETE, META_FRAME_CONTROL_MAXIMIZE, META_FRAME_CONTROL_MENU, META_FRAME_CONTROL_MINIMIZE, META_FRAME_CONTROL_NONE, META_FRAME_CONTROL_RESIZE_E, META_FRAME_CONTROL_RESIZE_N, META_FRAME_CONTROL_RESIZE_NE, META_FRAME_CONTROL_RESIZE_NW, META_FRAME_CONTROL_RESIZE_S, META_FRAME_CONTROL_RESIZE_SE, META_FRAME_CONTROL_RESIZE_SW, META_FRAME_CONTROL_RESIZE_W, META_FRAME_CONTROL_SHADE, META_FRAME_CONTROL_STICK, META_FRAME_CONTROL_TITLE, META_FRAME_CONTROL_UNABOVE, META_FRAME_CONTROL_UNMAXIMIZE, META_FRAME_CONTROL_UNSHADE, META_FRAME_CONTROL_UNSTICK, META_FRAME_MAXIMIZED, meta_frames_calc_geometry(), _MetaFrameGeometry::min_rect, POINT_IN_RECT, RESIZE_EXTENDS, _MetaFrameGeometry::shade_rect, _MetaFrameGeometry::stick_rect, _MetaFrameGeometry::title_rect, TOP_RESIZE_HEIGHT, _MetaFrameBorders::total, _MetaFrameGeometry::unabove_rect, _MetaFrameGeometry::unshade_rect, _MetaFrameGeometry::unstick_rect, _MetaFrameGeometry::width, _MetaUIFrame::window, and _MetaUIFrame::xwindow.

Referenced by meta_frames_button_press_event(), meta_frames_button_release_event(), meta_frames_enter_notify_event(), meta_frames_motion_notify_event(), and show_tip_now().

Here is the call graph for this function:

◆ get_visible_frame_rect()

static void get_visible_frame_rect ( MetaFrameGeometry *  fgeom,
int  window_width,
int  window_height,
cairo_rectangle_int_t *  rect 
)
static

◆ get_visible_region()

static cairo_region_t * get_visible_region ( MetaFrames *  frames,
MetaUIFrame *  frame,
MetaFrameGeometry *  fgeom,
int  window_width,
int  window_height 
)
static

◆ invalidate_all_caches()

static void invalidate_all_caches ( MetaFrames *  frames)
static

References invalidate_cache(), _MetaFrames::invalidate_frames, and NULL.

Referenced by invalidate_cache_timeout(), meta_frames_finalize(), and meta_frames_unmanage_window().

Here is the call graph for this function:

◆ invalidate_cache()

static void invalidate_cache ( MetaFrames *  frames,
MetaUIFrame *  frame 
)
static

References _MetaFrames::cache, get_cache(), CachedPixels::piece, and CachedFramePiece::pixmap.

Referenced by invalidate_all_caches(), invalidate_whole_window(), and redraw_control().

Here is the call graph for this function:

◆ invalidate_cache_timeout()

static gboolean invalidate_cache_timeout ( gpointer  data)
static

References FALSE, invalidate_all_caches(), and _MetaFrames::invalidate_cache_timeout_id.

Referenced by populate_cache().

Here is the call graph for this function:

◆ invalidate_whole_window()

static void invalidate_whole_window ( MetaFrames *  frames,
MetaUIFrame *  frame 
)
static

References FALSE, invalidate_cache(), NULL, and _MetaUIFrame::window.

Referenced by meta_frames_move_resize_frame(), meta_frames_queue_draw(), meta_frames_set_title(), meta_frames_update_frame_style(), queue_draw_func(), queue_pending_exposes_func(), and queue_recalc_func().

Here is the call graph for this function:

◆ listify_func()

static void listify_func ( gpointer  key,
gpointer  value,
gpointer  data 
)
static

Referenced by meta_frames_destroy().

◆ meta_frame_double_click_event()

static gboolean meta_frame_double_click_event ( MetaUIFrame *  frame,
GdkEventButton *  event 
)
static

References meta_frame_titlebar_event(), and meta_prefs_get_action_double_click_titlebar().

Referenced by meta_frames_button_press_event().

Here is the call graph for this function:

◆ meta_frame_middle_click_event()

static gboolean meta_frame_middle_click_event ( MetaUIFrame *  frame,
GdkEventButton *  event 
)
static

References meta_frame_titlebar_event(), and meta_prefs_get_action_middle_click_titlebar().

Referenced by meta_frames_button_press_event().

Here is the call graph for this function:

◆ meta_frame_right_click_event()

static gboolean meta_frame_right_click_event ( MetaUIFrame *  frame,
GdkEventButton *  event 
)
static

References meta_frame_titlebar_event(), and meta_prefs_get_action_right_click_titlebar().

Referenced by meta_frames_button_press_event().

Here is the call graph for this function:

◆ meta_frame_scroll_down_event()

static gboolean meta_frame_scroll_down_event ( MetaUIFrame *  frame,
GdkEventButton *  event 
)
static

References meta_frame_titlebar_event(), and meta_prefs_get_action_scroll_down_titlebar().

Referenced by meta_frames_button_press_event().

Here is the call graph for this function:

◆ meta_frame_scroll_up_event()

static gboolean meta_frame_scroll_up_event ( MetaUIFrame *  frame,
GdkEventButton *  event 
)
static

References meta_frame_titlebar_event(), and meta_prefs_get_action_scroll_up_titlebar().

Referenced by meta_frames_button_press_event().

Here is the call graph for this function:

◆ meta_frame_titlebar_event()

static gboolean meta_frame_titlebar_event ( MetaUIFrame *  frame,
GdkEventButton *  event,
int  action 
)
static

◆ meta_frames_apply_shapes()

void meta_frames_apply_shapes ( MetaFrames *  frames,
MetaDisplay *  meta_display,
Window  xwindow,
int  new_window_width,
int  new_window_height,
gboolean  window_has_shape 
)

◆ meta_frames_attach_style()

static void meta_frames_attach_style ( MetaFrames *  frames,
MetaUIFrame *  frame 
)
static

References meta_core_get(), META_CORE_GET_END, META_CORE_GET_THEME_VARIANT, META_CORE_WINDOW_HAS_FRAME, meta_frames_get_theme_variant(), _MetaFrames::normal_style, NULL, _MetaUIFrame::style, and _MetaUIFrame::xwindow.

Referenced by meta_frames_update_frame_style(), and reattach_style_func().

Here is the call graph for this function:

◆ meta_frames_button_layout_changed()

static void meta_frames_button_layout_changed ( MetaFrames *  frames)
static

References _MetaFrames::frames, and queue_draw_func().

Referenced by prefs_changed_callback().

Here is the call graph for this function:

◆ meta_frames_button_press_event()

static gboolean meta_frames_button_press_event ( GtkWidget *  widget,
GdkEventButton *  event 
)
static

References clear_tip(), control_rect(), FALSE, get_control(), meta_core_begin_grab_op(), meta_core_end_grab_op(), meta_core_get(), META_CORE_GET_END, META_CORE_GET_FRAME_FLAGS, meta_core_get_grab_op(), meta_core_show_window_menu(), meta_core_user_focus(), META_DEBUG_FOCUS, META_FRAME_ALLOWS_MOVE, META_FRAME_CONTROL_ABOVE, META_FRAME_CONTROL_APPMENU, META_FRAME_CONTROL_CLIENT_AREA, META_FRAME_CONTROL_DELETE, META_FRAME_CONTROL_MAXIMIZE, META_FRAME_CONTROL_MENU, META_FRAME_CONTROL_MINIMIZE, META_FRAME_CONTROL_RESIZE_E, META_FRAME_CONTROL_RESIZE_N, META_FRAME_CONTROL_RESIZE_NE, META_FRAME_CONTROL_RESIZE_NW, META_FRAME_CONTROL_RESIZE_S, META_FRAME_CONTROL_RESIZE_SE, META_FRAME_CONTROL_RESIZE_SW, META_FRAME_CONTROL_RESIZE_W, META_FRAME_CONTROL_SHADE, META_FRAME_CONTROL_STICK, META_FRAME_CONTROL_TITLE, META_FRAME_CONTROL_UNABOVE, META_FRAME_CONTROL_UNMAXIMIZE, META_FRAME_CONTROL_UNSHADE, META_FRAME_CONTROL_UNSTICK, meta_frame_double_click_event(), meta_frame_middle_click_event(), meta_frame_right_click_event(), meta_frame_scroll_down_event(), meta_frame_scroll_up_event(), META_FRAMES, meta_frames_calc_geometry(), meta_frames_lookup_window(), META_GRAB_OP_CLICKING_ABOVE, META_GRAB_OP_CLICKING_APPMENU, META_GRAB_OP_CLICKING_DELETE, META_GRAB_OP_CLICKING_MAXIMIZE, META_GRAB_OP_CLICKING_MAXIMIZE_HORIZONTAL, META_GRAB_OP_CLICKING_MENU, META_GRAB_OP_CLICKING_MINIMIZE, META_GRAB_OP_CLICKING_SHADE, META_GRAB_OP_CLICKING_STICK, META_GRAB_OP_CLICKING_UNABOVE, META_GRAB_OP_CLICKING_UNMAXIMIZE, META_GRAB_OP_CLICKING_UNSHADE, META_GRAB_OP_CLICKING_UNSTICK, META_GRAB_OP_MOVING, META_GRAB_OP_NONE, META_GRAB_OP_RESIZING_E, META_GRAB_OP_RESIZING_N, META_GRAB_OP_RESIZING_NE, META_GRAB_OP_RESIZING_NW, META_GRAB_OP_RESIZING_S, META_GRAB_OP_RESIZING_SE, META_GRAB_OP_RESIZING_SW, META_GRAB_OP_RESIZING_W, META_UI_DIRECTION_RTL, meta_ui_get_direction(), NULL, _MetaUIFrame::prelit_control, redraw_control(), TRUE, and _MetaUIFrame::xwindow.

Referenced by meta_frames_class_init().

Here is the call graph for this function:

◆ meta_frames_button_release_event()

static gboolean meta_frames_button_release_event ( GtkWidget *  widget,
GdkEventButton *  event 
)
static

References clear_tip(), FALSE, get_control(), meta_core_delete(), meta_core_end_grab_op(), meta_core_get_grab_button(), meta_core_get_grab_frame(), meta_core_get_grab_op(), meta_core_make_above(), meta_core_maximize(), meta_core_minimize(), meta_core_shade(), meta_core_stick(), meta_core_toggle_maximize_horizontally(), meta_core_toggle_maximize_vertically(), meta_core_unmake_above(), meta_core_unmaximize(), meta_core_unshade(), meta_core_unstick(), meta_core_user_focus(), META_FRAME_CONTROL_ABOVE, META_FRAME_CONTROL_DELETE, META_FRAME_CONTROL_MAXIMIZE, META_FRAME_CONTROL_MINIMIZE, META_FRAME_CONTROL_SHADE, META_FRAME_CONTROL_STICK, META_FRAME_CONTROL_UNABOVE, META_FRAME_CONTROL_UNMAXIMIZE, META_FRAME_CONTROL_UNSHADE, META_FRAME_CONTROL_UNSTICK, META_FRAMES, meta_frames_lookup_window(), meta_frames_update_prelit_control(), META_GRAB_OP_CLICKING_ABOVE, META_GRAB_OP_CLICKING_APPMENU, META_GRAB_OP_CLICKING_DELETE, META_GRAB_OP_CLICKING_MAXIMIZE, META_GRAB_OP_CLICKING_MAXIMIZE_HORIZONTAL, META_GRAB_OP_CLICKING_MAXIMIZE_VERTICAL, META_GRAB_OP_CLICKING_MENU, META_GRAB_OP_CLICKING_MINIMIZE, META_GRAB_OP_CLICKING_SHADE, META_GRAB_OP_CLICKING_STICK, META_GRAB_OP_CLICKING_UNABOVE, META_GRAB_OP_CLICKING_UNMAXIMIZE, META_GRAB_OP_CLICKING_UNMAXIMIZE_HORIZONTAL, META_GRAB_OP_CLICKING_UNMAXIMIZE_VERTICAL, META_GRAB_OP_CLICKING_UNSHADE, META_GRAB_OP_CLICKING_UNSTICK, META_GRAB_OP_NONE, NULL, TRUE, and _MetaUIFrame::xwindow.

Referenced by meta_frames_class_init().

Here is the call graph for this function:

◆ meta_frames_calc_geometry()

◆ meta_frames_class_init()

static void meta_frames_class_init ( MetaFramesClass *  klass)
static

◆ meta_frames_constructor()

static GObject * meta_frames_constructor ( GType  gtype,
guint  n_properties,
GObjectConstructParam *  properties 
)
static

Referenced by meta_frames_class_init().

◆ meta_frames_destroy()

static void meta_frames_destroy ( GtkWidget *  object)
static

References clear_tip(), _MetaFrames::frames, listify_func(), META_FRAMES, meta_frames_unmanage_window(), _MetaFrames::normal_style, NULL, _MetaFrames::style_variants, and _MetaUIFrame::xwindow.

Referenced by meta_frames_class_init().

Here is the call graph for this function:

◆ meta_frames_destroy_event()

static gboolean meta_frames_destroy_event ( GtkWidget *  widget,
GdkEventAny *  event 
)
static

References FALSE, META_FRAMES, meta_frames_lookup_window(), NULL, and TRUE.

Referenced by meta_frames_class_init().

Here is the call graph for this function:

◆ meta_frames_draw()

static gboolean meta_frames_draw ( GtkWidget *  widget,
cairo_t *  cr 
)
static

References cached_pixels_draw(), clip_to_screen(), _MetaFrames::expose_delay_count, _MetaUIFrame::expose_delayed, FALSE, find_frame_to_draw(), get_cache(), META_FRAMES, meta_frames_paint_to_drawable(), NULL, populate_cache(), subtract_client_area(), and TRUE.

Referenced by meta_frames_class_init().

Here is the call graph for this function:

◆ meta_frames_ensure_layout()

◆ meta_frames_enter_notify_event()

static gboolean meta_frames_enter_notify_event ( GtkWidget *  widget,
GdkEventCrossing *  event 
)
static

References FALSE, get_control(), META_FRAMES, meta_frames_lookup_window(), meta_frames_update_prelit_control(), NULL, and TRUE.

Referenced by meta_frames_class_init().

Here is the call graph for this function:

◆ meta_frames_finalize()

static void meta_frames_finalize ( GObject *  object)
static

References _MetaFrames::cache, _MetaFrames::frames, invalidate_all_caches(), _MetaFrames::invalidate_cache_timeout_id, META_FRAMES, meta_prefs_remove_listener(), prefs_changed_callback(), and _MetaFrames::text_heights.

Referenced by meta_frames_class_init().

Here is the call graph for this function:

◆ meta_frames_font_changed()

static void meta_frames_font_changed ( MetaFrames *  frames)
static

References _MetaFrames::frames, NULL, queue_recalc_func(), and _MetaFrames::text_heights.

Referenced by meta_frames_style_updated(), and prefs_changed_callback().

Here is the call graph for this function:

◆ meta_frames_get_borders()

void meta_frames_get_borders ( MetaFrames *  frames,
Window  xwindow,
MetaFrameBorders *  borders 
)

References meta_frames_lookup_window(), meta_ui_frame_get_borders(), and NULL.

Referenced by meta_ui_get_frame_borders().

Here is the call graph for this function:

◆ meta_frames_get_corner_radiuses()

void meta_frames_get_corner_radiuses ( MetaFrames *  frames,
Window  xwindow,
float *  top_left,
float *  top_right,
float *  bottom_left,
float *  bottom_right 
)

References meta_frames_lookup_window(), and meta_ui_frame_get_corner_radiuses().

Referenced by meta_ui_get_corner_radiuses().

Here is the call graph for this function:

◆ meta_frames_get_frame_bounds()

cairo_region_t * meta_frames_get_frame_bounds ( MetaFrames *  frames,
Window  xwindow,
int  window_width,
int  window_height 
)

References get_visible_region(), meta_frames_calc_geometry(), meta_frames_lookup_window(), and NULL.

Referenced by meta_ui_get_frame_bounds().

Here is the call graph for this function:

◆ meta_frames_get_theme_variant()

static GtkStyleContext * meta_frames_get_theme_variant ( MetaFrames *  frames,
const gchar *  variant 
)
static

References create_style_context(), NULL, and _MetaFrames::style_variants.

Referenced by meta_frames_attach_style().

Here is the call graph for this function:

◆ meta_frames_init()

static void meta_frames_init ( MetaFrames *  frames)
static

◆ meta_frames_leave_notify_event()

static gboolean meta_frames_leave_notify_event ( GtkWidget *  widget,
GdkEventCrossing *  event 
)
static

References clear_tip(), FALSE, META_FRAME_CONTROL_NONE, META_FRAMES, meta_frames_lookup_window(), meta_frames_update_prelit_control(), NULL, and TRUE.

Referenced by meta_frames_class_init().

Here is the call graph for this function:

◆ meta_frames_lookup_window()

◆ meta_frames_manage_window()

void meta_frames_manage_window ( MetaFrames *  frames,
Window  xwindow,
GdkWindow *  window 
)

◆ meta_frames_motion_notify_event()

◆ meta_frames_move_resize_frame()

void meta_frames_move_resize_frame ( MetaFrames *  frames,
Window  xwindow,
int  x,
int  y,
int  width,
int  height 
)

References invalidate_whole_window(), meta_frames_lookup_window(), and _MetaUIFrame::window.

Referenced by meta_ui_move_resize_frame().

Here is the call graph for this function:

◆ meta_frames_new()

MetaFrames * meta_frames_new ( void  )

References META_TYPE_FRAMES, NULL, and screen.

Referenced by meta_ui_new().

◆ meta_frames_notify_menu_hide()

void meta_frames_notify_menu_hide ( MetaFrames *  frames)

References meta_core_end_grab_op(), meta_core_get_grab_frame(), meta_core_get_grab_op(), META_FRAME_CONTROL_MENU, meta_frames_lookup_window(), META_GRAB_OP_CLICKING_MENU, and redraw_control().

Referenced by activate_cb(), and menu_closed().

Here is the call graph for this function:

◆ meta_frames_paint_to_drawable()

static void meta_frames_paint_to_drawable ( MetaFrames *  frames,
MetaUIFrame *  frame,
cairo_t *  cr 
)
static

References button_layout, META_BUTTON_STATE_NORMAL, META_BUTTON_STATE_PRELIGHT, META_BUTTON_STATE_PRESSED, META_BUTTON_TYPE_ABOVE, META_BUTTON_TYPE_APPMENU, META_BUTTON_TYPE_CLOSE, META_BUTTON_TYPE_LAST, META_BUTTON_TYPE_MAXIMIZE, META_BUTTON_TYPE_MENU, META_BUTTON_TYPE_MINIMIZE, META_BUTTON_TYPE_SHADE, META_BUTTON_TYPE_STICK, META_BUTTON_TYPE_UNABOVE, META_BUTTON_TYPE_UNSHADE, META_BUTTON_TYPE_UNSTICK, meta_core_get(), META_CORE_GET_CLIENT_HEIGHT, META_CORE_GET_CLIENT_WIDTH, META_CORE_GET_END, META_CORE_GET_FRAME_FLAGS, META_CORE_GET_FRAME_TYPE, meta_core_get_grab_frame(), meta_core_get_grab_op(), META_CORE_GET_ICON, META_CORE_GET_MINI_ICON, META_FRAME_CONTROL_ABOVE, META_FRAME_CONTROL_APPMENU, META_FRAME_CONTROL_DELETE, META_FRAME_CONTROL_MAXIMIZE, META_FRAME_CONTROL_MENU, META_FRAME_CONTROL_MINIMIZE, META_FRAME_CONTROL_SHADE, META_FRAME_CONTROL_STICK, META_FRAME_CONTROL_UNABOVE, META_FRAME_CONTROL_UNMAXIMIZE, META_FRAME_CONTROL_UNSHADE, META_FRAME_CONTROL_UNSTICK, meta_frames_ensure_layout(), META_GRAB_OP_CLICKING_ABOVE, META_GRAB_OP_CLICKING_DELETE, META_GRAB_OP_CLICKING_MAXIMIZE, META_GRAB_OP_CLICKING_MAXIMIZE_HORIZONTAL, META_GRAB_OP_CLICKING_MAXIMIZE_VERTICAL, META_GRAB_OP_CLICKING_MENU, META_GRAB_OP_CLICKING_MINIMIZE, META_GRAB_OP_CLICKING_SHADE, META_GRAB_OP_CLICKING_STICK, META_GRAB_OP_CLICKING_UNABOVE, META_GRAB_OP_CLICKING_UNMAXIMIZE, META_GRAB_OP_CLICKING_UNMAXIMIZE_HORIZONTAL, META_GRAB_OP_CLICKING_UNMAXIMIZE_VERTICAL, META_GRAB_OP_CLICKING_UNSHADE, META_GRAB_OP_CLICKING_UNSTICK, META_GRAB_OP_NONE, meta_prefs_get_button_layout(), meta_theme_draw_frame(), meta_theme_get_current(), _MetaUIFrame::prelit_control, _MetaUIFrame::style, _MetaUIFrame::text_height, _MetaUIFrame::text_layout, _MetaUIFrame::window, and _MetaUIFrame::xwindow.

Referenced by generate_pixmap(), and meta_frames_draw().

Here is the call graph for this function:

◆ meta_frames_pop_delay_exposes()

void meta_frames_pop_delay_exposes ( MetaFrames *  frames)

References _MetaFrames::expose_delay_count, _MetaFrames::frames, and queue_pending_exposes_func().

Referenced by meta_ui_pop_delay_exposes().

Here is the call graph for this function:

◆ meta_frames_push_delay_exposes()

void meta_frames_push_delay_exposes ( MetaFrames *  frames)

◆ meta_frames_queue_draw()

void meta_frames_queue_draw ( MetaFrames *  frames,
Window  xwindow 
)

References invalidate_whole_window(), and meta_frames_lookup_window().

Referenced by meta_ui_queue_frame_draw().

Here is the call graph for this function:

◆ meta_frames_repaint_frame()

void meta_frames_repaint_frame ( MetaFrames *  frames,
Window  xwindow 
)

References meta_frames_lookup_window().

Referenced by meta_ui_repaint_frame().

Here is the call graph for this function:

◆ meta_frames_set_title()

void meta_frames_set_title ( MetaFrames *  frames,
Window  xwindow,
const char *  title 
)

References invalidate_whole_window(), meta_frames_lookup_window(), _MetaUIFrame::text_layout, and _MetaUIFrame::title.

Referenced by meta_ui_set_frame_title().

Here is the call graph for this function:

◆ meta_frames_style_updated()

static void meta_frames_style_updated ( GtkWidget *  widget)
static

References _MetaFrames::frames, META_FRAMES, meta_frames_font_changed(), reattach_style_func(), and update_style_contexts().

Referenced by meta_frames_class_init().

Here is the call graph for this function:

◆ meta_frames_unmanage_window()

void meta_frames_unmanage_window ( MetaFrames *  frames,
Window  xwindow 
)

References clear_tip(), _MetaFrames::frames, invalidate_all_caches(), _MetaFrames::last_motion_frame, meta_core_set_screen_cursor(), META_CURSOR_DEFAULT, meta_warning(), NULL, _MetaUIFrame::style, _MetaUIFrame::text_layout, _MetaUIFrame::title, _MetaUIFrame::window, and _MetaUIFrame::xwindow.

Referenced by meta_frames_destroy(), and meta_ui_destroy_frame_window().

Here is the call graph for this function:

◆ meta_frames_update_frame_style()

void meta_frames_update_frame_style ( MetaFrames *  frames,
Window  xwindow 
)

References invalidate_whole_window(), meta_frames_attach_style(), and meta_frames_lookup_window().

Referenced by meta_ui_update_frame_style().

Here is the call graph for this function:

◆ meta_frames_update_prelit_control()

◆ meta_ui_frame_get_borders()

static void meta_ui_frame_get_borders ( MetaFrames *  frames,
MetaUIFrame *  frame,
MetaFrameBorders *  borders 
)
static

◆ meta_ui_frame_get_corner_radiuses()

static void meta_ui_frame_get_corner_radiuses ( MetaFrames *  frames,
MetaUIFrame *  frame,
float *  top_left,
float *  top_right,
float *  bottom_left,
float *  bottom_right 
)
static

References _MetaFrameGeometry::bottom_left_corner_rounded_radius, _MetaFrameGeometry::bottom_right_corner_rounded_radius, meta_frames_calc_geometry(), _MetaFrameGeometry::top_left_corner_rounded_radius, and _MetaFrameGeometry::top_right_corner_rounded_radius.

Referenced by meta_frames_get_corner_radiuses().

Here is the call graph for this function:

◆ populate_cache()

◆ prefs_changed_callback()

static void prefs_changed_callback ( MetaPreference  pref,
void *  data 
)
static

References META_FRAMES, meta_frames_button_layout_changed(), meta_frames_font_changed(), META_PREF_BUTTON_LAYOUT, and META_PREF_TITLEBAR_FONT.

Referenced by meta_frames_finalize(), and meta_frames_init().

Here is the call graph for this function:

◆ queue_draw_func()

static void queue_draw_func ( gpointer  key,
gpointer  value,
gpointer  data 
)
static

References invalidate_whole_window(), and META_FRAMES.

Referenced by meta_frames_button_layout_changed().

Here is the call graph for this function:

◆ queue_pending_exposes_func()

static void queue_pending_exposes_func ( gpointer  key,
gpointer  value,
gpointer  data 
)
static

References _MetaUIFrame::expose_delayed, FALSE, invalidate_whole_window(), and META_FRAMES.

Referenced by meta_frames_pop_delay_exposes().

Here is the call graph for this function:

◆ queue_recalc_func()

static void queue_recalc_func ( gpointer  key,
gpointer  value,
gpointer  data 
)
static

References invalidate_whole_window(), meta_core_queue_frame_resize(), META_FRAMES, _MetaUIFrame::text_layout, _MetaUIFrame::title, and _MetaUIFrame::xwindow.

Referenced by meta_frames_font_changed().

Here is the call graph for this function:

◆ queue_tip()

static void queue_tip ( MetaFrames *  frames)
static

References clear_tip(), TIP_DELAY, tip_timeout_func(), and _MetaFrames::tooltip_timeout.

Referenced by meta_frames_motion_notify_event().

Here is the call graph for this function:

◆ reattach_style_func()

static void reattach_style_func ( gpointer  key,
gpointer  value,
gpointer  data 
)
static

References META_FRAMES, and meta_frames_attach_style().

Referenced by meta_frames_style_updated().

Here is the call graph for this function:

◆ redraw_control()

static void redraw_control ( MetaFrames *  frames,
MetaUIFrame *  frame,
MetaFrameControl  control 
)
static

References control_rect(), FALSE, invalidate_cache(), meta_frames_calc_geometry(), and _MetaUIFrame::window.

Referenced by meta_frames_button_press_event(), meta_frames_notify_menu_hide(), and meta_frames_update_prelit_control().

Here is the call graph for this function:

◆ show_tip_now()

◆ subtract_client_area()

static void subtract_client_area ( cairo_region_t *  region,
MetaUIFrame *  frame 
)
static

◆ tip_timeout_func()

static gboolean tip_timeout_func ( gpointer  data)
static

References FALSE, show_tip_now(), and _MetaFrames::tooltip_timeout.

Referenced by queue_tip().

Here is the call graph for this function:

◆ unsigned_long_equal()

static gint unsigned_long_equal ( gconstpointer  v1,
gconstpointer  v2 
)
static

Referenced by meta_frames_init().

◆ unsigned_long_hash()

static guint unsigned_long_hash ( gconstpointer  v)
static

Referenced by meta_frames_init().

◆ update_style_contexts()

static void update_style_contexts ( MetaFrames *  frames)
static

References create_style_context(), _MetaFrames::normal_style, NULL, and _MetaFrames::style_variants.

Referenced by meta_frames_init(), and meta_frames_style_updated().

Here is the call graph for this function: