marco 1.29.1
Window manager
Loading...
Searching...
No Matches
ui.h File Reference
View source
#include "common.h"
#include "types.h"
#include <X11/Xlib.h>
#include <X11/Xutil.h>
#include <glib.h>
#include <gdk-pixbuf/gdk-pixbuf.h>
#include <cairo/cairo.h>
#include "tabpopup.h"
#include "tile-preview.h"
Include dependency graph for ui.h:
This graph shows which files directly or indirectly include this file:

Macros

#define META_PRIORITY_RESIZE   (G_PRIORITY_HIGH_IDLE + 15)
 

Typedefs

typedef struct _MetaUI MetaUI
 
typedef struct _MetaImageWindow MetaImageWindow
 
typedef gboolean(* MetaEventFunc) (XEvent *xevent, gpointer data)
 

Enumerations

enum  MetaUIDirection { META_UI_DIRECTION_LTR , META_UI_DIRECTION_RTL }
 

Functions

void meta_ui_init (int *argc, char ***argv)
 
Display * meta_ui_get_display (void)
 
void meta_ui_add_event_func (Display *xdisplay, MetaEventFunc func, gpointer data)
 
void meta_ui_remove_event_func (Display *xdisplay, MetaEventFunc func, gpointer data)
 
MetaUI * meta_ui_new (Display *xdisplay, Screen *screen)
 
void meta_ui_free (MetaUI *ui)
 
void meta_ui_theme_get_frame_borders (MetaUI *ui, MetaFrameType type, MetaFrameFlags flags, MetaFrameBorders *borders)
 
void meta_ui_get_frame_borders (MetaUI *ui, Window frame_xwindow, MetaFrameBorders *borders)
 
Window meta_ui_create_frame_window (MetaUI *ui, Display *xdisplay, Visual *xvisual, gint x, gint y, gint width, gint height)
 
void meta_ui_destroy_frame_window (MetaUI *ui, Window xwindow)
 
void meta_ui_move_resize_frame (MetaUI *ui, Window frame, int x, int y, int width, int height)
 
void meta_ui_map_frame (MetaUI *ui, Window xwindow)
 
void meta_ui_unmap_frame (MetaUI *ui, Window xwindow)
 
void meta_ui_apply_frame_shape (MetaUI *ui, MetaDisplay *display, Window xwindow, int new_window_width, int new_window_height, gboolean window_has_shape)
 
cairo_region_t * meta_ui_get_frame_bounds (MetaUI *ui, Window xwindow, int window_width, int window_height)
 
void meta_ui_get_corner_radiuses (MetaUI *ui, Window xwindow, float *top_left, float *top_right, float *bottom_left, float *bottom_right)
 
void meta_ui_queue_frame_draw (MetaUI *ui, Window xwindow)
 
void meta_ui_set_frame_title (MetaUI *ui, Window xwindow, const char *title)
 
void meta_ui_update_frame_style (MetaUI *ui, Window window)
 
void meta_ui_repaint_frame (MetaUI *ui, Window xwindow)
 
MetaWindowMenu * meta_ui_window_menu_new (MetaUI *ui, Window client_xwindow, MetaMenuOp ops, MetaMenuOp insensitive, unsigned long active_workspace, int n_workspaces, MetaWindowMenuFunc func, gpointer data)
 
void meta_ui_window_menu_popup (MetaWindowMenu *menu, int root_x, int root_y, int button, guint32 timestamp)
 
void meta_ui_window_menu_free (MetaWindowMenu *menu)
 
GdkPixbuf * meta_gdk_pixbuf_get_from_pixmap (GdkPixbuf *dest, Pixmap xpixmap, int src_x, int src_y, int dest_x, int dest_y, int width, int height)
 
void meta_ui_push_delay_exposes (MetaUI *ui)
 
void meta_ui_pop_delay_exposes (MetaUI *ui)
 
GdkPixbuf * meta_ui_get_default_window_icon (MetaUI *ui)
 
GdkPixbuf * meta_ui_get_default_mini_icon (MetaUI *ui)
 
GdkPixbuf * meta_ui_get_window_icon_from_desktop_id (MetaUI *ui, char *desktop_id)
 
GdkPixbuf * meta_ui_get_mini_icon_from_desktop_id (MetaUI *ui, char *desktop_id)
 
gboolean meta_ui_window_should_not_cause_focus (Display *xdisplay, Window xwindow)
 
void meta_ui_set_current_theme (const char *name, gboolean force_reload)
 
gboolean meta_ui_have_a_theme (void)
 
gboolean meta_ui_parse_accelerator (const char *accel, unsigned int *keysym, unsigned int *keycode, MetaVirtualModifier *mask)
 
gboolean meta_ui_parse_modifier (const char *accel, MetaVirtualModifier *mask)
 
gchar * meta_ui_accelerator_name (unsigned int keysym, MetaVirtualModifier mask)
 
gboolean meta_ui_window_is_widget (MetaUI *ui, Window xwindow)
 
int meta_ui_get_drag_threshold (MetaUI *ui)
 
MetaUIDirection meta_ui_get_direction (void)
 
GdkPixbuf * meta_ui_get_pixbuf_from_surface (cairo_surface_t *surface)
 

Macro Definition Documentation

◆ META_PRIORITY_RESIZE

#define META_PRIORITY_RESIZE   (G_PRIORITY_HIGH_IDLE + 15)

Typedef Documentation

◆ MetaEventFunc

typedef gboolean(* MetaEventFunc) (XEvent *xevent, gpointer data)

◆ MetaImageWindow

typedef struct _MetaImageWindow MetaImageWindow

◆ MetaUI

typedef struct _MetaUI MetaUI

Enumeration Type Documentation

◆ MetaUIDirection

Enumerator
META_UI_DIRECTION_LTR 
META_UI_DIRECTION_RTL 

Function Documentation

◆ meta_gdk_pixbuf_get_from_pixmap()

GdkPixbuf * meta_gdk_pixbuf_get_from_pixmap ( GdkPixbuf *  dest,
Pixmap  xpixmap,
int  src_x,
int  src_y,
int  dest_x,
int  dest_y,
int  width,
int  height 
)

References NULL.

Referenced by try_pixmap_and_mask().

◆ meta_ui_accelerator_name()

◆ meta_ui_add_event_func()

void meta_ui_add_event_func ( Display *  xdisplay,
MetaEventFunc  func,
gpointer  data 
)

References _EventFunc::data, ef, filter_func(), _EventFunc::func, and NULL.

Referenced by meta_display_open().

Here is the call graph for this function:

◆ meta_ui_apply_frame_shape()

void meta_ui_apply_frame_shape ( MetaUI *  ui,
MetaDisplay *  display,
Window  xwindow,
int  new_window_width,
int  new_window_height,
gboolean  window_has_shape 
)

References _MetaUI::frames, and meta_frames_apply_shapes().

Referenced by meta_window_ensure_frame(), and update_shape().

Here is the call graph for this function:

◆ meta_ui_create_frame_window()

Window meta_ui_create_frame_window ( MetaUI *  ui,
Display *  xdisplay,
Visual *  xvisual,
gint  x,
gint  y,
gint  width,
gint  height 
)

References FALSE, _MetaUI::frames, meta_frames_manage_window(), NULL, screen, and set_background_none().

Referenced by meta_window_ensure_frame().

Here is the call graph for this function:

◆ meta_ui_destroy_frame_window()

void meta_ui_destroy_frame_window ( MetaUI *  ui,
Window  xwindow 
)

References _MetaUI::frames, and meta_frames_unmanage_window().

Referenced by meta_window_destroy_frame().

Here is the call graph for this function:

◆ meta_ui_free()

void meta_ui_free ( MetaUI *  ui)

References _MetaUI::frames, NULL, and _MetaUI::xdisplay.

Referenced by meta_screen_free().

◆ meta_ui_get_corner_radiuses()

void meta_ui_get_corner_radiuses ( MetaUI *  ui,
Window  xwindow,
float *  top_left,
float *  top_right,
float *  bottom_left,
float *  bottom_right 
)

References _MetaUI::frames, and meta_frames_get_corner_radiuses().

Referenced by meta_frame_get_corner_radiuses().

Here is the call graph for this function:

◆ meta_ui_get_default_mini_icon()

GdkPixbuf * meta_ui_get_default_mini_icon ( MetaUI *  ui)

References _MetaUI::frames, load_default_window_icon(), META_MINI_ICON_WIDTH, and NULL.

Referenced by get_fallback_icons().

Here is the call graph for this function:

◆ meta_ui_get_default_window_icon()

GdkPixbuf * meta_ui_get_default_window_icon ( MetaUI *  ui)

References _MetaUI::frames, icon_size, load_default_window_icon(), meta_prefs_get_icon_size(), and NULL.

Referenced by get_fallback_icons().

Here is the call graph for this function:

◆ meta_ui_get_direction()

◆ meta_ui_get_display()

Display * meta_ui_get_display ( void  )

Referenced by meta_display_open().

◆ meta_ui_get_drag_threshold()

int meta_ui_get_drag_threshold ( MetaUI *  ui)

References _MetaUI::frames, and NULL.

Referenced by update_move().

◆ meta_ui_get_frame_borders()

void meta_ui_get_frame_borders ( MetaUI *  ui,
Window  frame_xwindow,
MetaFrameBorders *  borders 
)

References _MetaUI::frames, and meta_frames_get_borders().

Referenced by meta_frame_calc_borders().

Here is the call graph for this function:

◆ meta_ui_get_frame_bounds()

cairo_region_t * meta_ui_get_frame_bounds ( MetaUI *  ui,
Window  xwindow,
int  window_width,
int  window_height 
)

References _MetaUI::frames, and meta_frames_get_frame_bounds().

Referenced by meta_frame_get_frame_bounds().

Here is the call graph for this function:

◆ meta_ui_get_mini_icon_from_desktop_id()

GdkPixbuf * meta_ui_get_mini_icon_from_desktop_id ( MetaUI *  ui,
char *  desktop_id 
)

References _MetaUI::frames, load_window_icon_from_desktop_id(), and META_MINI_ICON_WIDTH.

Referenced by meta_read_icons().

Here is the call graph for this function:

◆ meta_ui_get_pixbuf_from_surface()

GdkPixbuf * meta_ui_get_pixbuf_from_surface ( cairo_surface_t *  surface)

◆ meta_ui_get_window_icon_from_desktop_id()

GdkPixbuf * meta_ui_get_window_icon_from_desktop_id ( MetaUI *  ui,
char *  desktop_id 
)

References _MetaUI::frames, load_window_icon_from_desktop_id(), and meta_prefs_get_icon_size().

Referenced by meta_read_icons().

Here is the call graph for this function:

◆ meta_ui_have_a_theme()

gboolean meta_ui_have_a_theme ( void  )

References meta_theme_get_current(), and NULL.

Referenced by main(), and meta_ui_theme_get_frame_borders().

Here is the call graph for this function:

◆ meta_ui_init()

void meta_ui_init ( int *  argc,
char ***  argv 
)

References meta_fatal(), and NULL.

Referenced by main().

Here is the call graph for this function:

◆ meta_ui_map_frame()

void meta_ui_map_frame ( MetaUI *  ui,
Window  xwindow 
)

References _MetaUI::xdisplay.

Referenced by meta_window_show().

◆ meta_ui_move_resize_frame()

void meta_ui_move_resize_frame ( MetaUI *  ui,
Window  frame,
int  x,
int  y,
int  width,
int  height 
)

References _MetaUI::frames, and meta_frames_move_resize_frame().

Referenced by meta_frame_sync_to_window().

Here is the call graph for this function:

◆ meta_ui_new()

MetaUI * meta_ui_new ( Display *  xdisplay,
Screen *  screen 
)

References _MetaUI::frames, meta_frames_new(), screen, _MetaUI::xdisplay, and _MetaUI::xscreen.

Referenced by meta_screen_new().

Here is the call graph for this function:

◆ meta_ui_parse_accelerator()

gboolean meta_ui_parse_accelerator ( const char *  accel,
unsigned int *  keysym,
unsigned int *  keycode,
MetaVirtualModifier *  mask 
)

References FALSE, meta_ui_accelerator_parse(), META_VIRTUAL_ALT_MASK, META_VIRTUAL_CONTROL_MASK, META_VIRTUAL_HYPER_MASK, META_VIRTUAL_META_MASK, META_VIRTUAL_MOD2_MASK, META_VIRTUAL_MOD3_MASK, META_VIRTUAL_MOD4_MASK, META_VIRTUAL_MOD5_MASK, META_VIRTUAL_SHIFT_MASK, META_VIRTUAL_SUPER_MASK, and TRUE.

Referenced by update_binding().

Here is the call graph for this function:

◆ meta_ui_parse_modifier()

gboolean meta_ui_parse_modifier ( const char *  accel,
MetaVirtualModifier *  mask 
)

References FALSE, meta_ui_accelerator_parse(), META_VIRTUAL_ALT_MASK, META_VIRTUAL_CONTROL_MASK, META_VIRTUAL_HYPER_MASK, META_VIRTUAL_META_MASK, META_VIRTUAL_MOD2_MASK, META_VIRTUAL_MOD3_MASK, META_VIRTUAL_MOD4_MASK, META_VIRTUAL_MOD5_MASK, META_VIRTUAL_SHIFT_MASK, META_VIRTUAL_SUPER_MASK, NULL, and TRUE.

Referenced by mouse_button_mods_handler().

Here is the call graph for this function:

◆ meta_ui_pop_delay_exposes()

void meta_ui_pop_delay_exposes ( MetaUI *  ui)

References _MetaUI::frames, and meta_frames_pop_delay_exposes().

Referenced by effects_draw_box_animation_timeout(), and meta_effects_end_wireframe().

Here is the call graph for this function:

◆ meta_ui_push_delay_exposes()

void meta_ui_push_delay_exposes ( MetaUI *  ui)

References _MetaUI::frames, and meta_frames_push_delay_exposes().

Referenced by draw_box_animation(), and meta_effects_begin_wireframe().

Here is the call graph for this function:

◆ meta_ui_queue_frame_draw()

void meta_ui_queue_frame_draw ( MetaUI *  ui,
Window  xwindow 
)

References _MetaUI::frames, and meta_frames_queue_draw().

Referenced by meta_frame_queue_draw(), and redraw_icon().

Here is the call graph for this function:

◆ meta_ui_remove_event_func()

void meta_ui_remove_event_func ( Display *  xdisplay,
MetaEventFunc  func,
gpointer  data 
)

References ef, filter_func(), and NULL.

Referenced by meta_display_close().

Here is the call graph for this function:

◆ meta_ui_repaint_frame()

void meta_ui_repaint_frame ( MetaUI *  ui,
Window  xwindow 
)

References _MetaUI::frames, and meta_frames_repaint_frame().

Referenced by meta_frame_sync_to_window().

Here is the call graph for this function:

◆ meta_ui_set_current_theme()

void meta_ui_set_current_theme ( const char *  name,
gboolean  force_reload 
)

References meta_invalidate_default_icons(), and meta_theme_set_current().

Referenced by event_callback(), main(), and prefs_changed_callback().

Here is the call graph for this function:

◆ meta_ui_set_frame_title()

void meta_ui_set_frame_title ( MetaUI *  ui,
Window  xwindow,
const char *  title 
)

References _MetaUI::frames, and meta_frames_set_title().

Referenced by meta_window_ensure_frame(), and set_window_title().

Here is the call graph for this function:

◆ meta_ui_theme_get_frame_borders()

void meta_ui_theme_get_frame_borders ( MetaUI *  ui,
MetaFrameType  type,
MetaFrameFlags  flags,
MetaFrameBorders *  borders 
)

References _MetaUI::frames, meta_frame_borders_clear(), meta_pango_font_desc_get_text_height(), meta_prefs_get_titlebar_font(), meta_theme_get_current(), meta_theme_get_frame_borders(), meta_ui_have_a_theme(), NULL, screen, and _MetaUI::xdisplay.

Referenced by process_request_frame_extents().

Here is the call graph for this function:

◆ meta_ui_unmap_frame()

void meta_ui_unmap_frame ( MetaUI *  ui,
Window  xwindow 
)

References _MetaUI::xdisplay.

Referenced by meta_window_hide().

◆ meta_ui_update_frame_style()

void meta_ui_update_frame_style ( MetaUI *  ui,
Window  window 
)

References _MetaUI::frames, and meta_frames_update_frame_style().

Referenced by meta_window_ensure_frame(), and reload_gtk_theme_variant().

Here is the call graph for this function:

◆ meta_ui_window_is_widget()

gboolean meta_ui_window_is_widget ( MetaUI *  ui,
Window  xwindow 
)

◆ meta_ui_window_menu_free()

void meta_ui_window_menu_free ( MetaWindowMenu *  menu)

References meta_window_menu_free().

Referenced by menu_callback(), meta_window_free(), and meta_window_show_menu().

Here is the call graph for this function:

◆ meta_ui_window_menu_new()

MetaWindowMenu * meta_ui_window_menu_new ( MetaUI *  ui,
Window  client_xwindow,
MetaMenuOp  ops,
MetaMenuOp  insensitive,
unsigned long  active_workspace,
int  n_workspaces,
MetaWindowMenuFunc  func,
gpointer  data 
)

References _MetaUI::frames, and meta_window_menu_new().

Referenced by meta_window_show_menu().

Here is the call graph for this function:

◆ meta_ui_window_menu_popup()

void meta_ui_window_menu_popup ( MetaWindowMenu *  menu,
int  root_x,
int  root_y,
int  button,
guint32  timestamp 
)

References meta_window_menu_popup().

Referenced by meta_window_show_menu().

Here is the call graph for this function:

◆ meta_ui_window_should_not_cause_focus()

gboolean meta_ui_window_should_not_cause_focus ( Display *  xdisplay,
Window  xwindow 
)

References FALSE, and TRUE.

Referenced by event_callback().