marco 1.29.1
Window manager
Loading...
Searching...
No Matches
util.c File Reference
View source
#include <config.h>
#include <glib/gi18n-lib.h>
#include "util.h"
#include "main.h"
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <errno.h>
#include <string.h>
#include <X11/Xlib.h>
#include <X11/Xutil.h>
Include dependency graph for util.c:

Macros

#define _GNU_SOURCE
 
#define _POSIX_C_SOURCE   200112L /* for fdopen() */
 

Functions

void meta_print_backtrace (void)
 
gboolean meta_is_verbose (void)
 
void meta_set_verbose (gboolean setting)
 
gboolean meta_is_debugging (void)
 
void meta_set_debugging (gboolean setting)
 
gboolean meta_get_replace_current_wm (void)
 
void meta_set_replace_current_wm (gboolean setting)
 
char * meta_g_utf8_strndup (const gchar *src, gsize n)
 
static int utf8_fputs (const char *str, FILE *f)
 
void meta_bug (const char *format,...)
 
void meta_warning (const char *format,...)
 
void meta_fatal (const char *format,...)
 
void meta_push_no_msg_prefix (void)
 
void meta_pop_no_msg_prefix (void)
 
void meta_exit (MetaExitCode code)
 
gint meta_unsigned_long_equal (gconstpointer v1, gconstpointer v2)
 
guint meta_unsigned_long_hash (gconstpointer v)
 
const char * meta_gravity_to_string (int gravity)
 
GPid meta_show_dialog (const char *type, const char *message, const char *timeout, const char *display, const char *ok_text, const char *cancel_text, const int transient_for, GSList *columns, GSList *entries)
 
GPid meta_show_entry_dialog (const char *message, gint *active_workspace_id, const char *entry_text, const char *display, const char *ok_text, const char *cancel_text, const int transient_for, const GIOFunc stdio_func_cb)
 

Variables

static gboolean is_verbose = FALSE
 
static gboolean is_debugging = FALSE
 
static gboolean replace_current = FALSE
 
static int no_prefix = 0
 

Macro Definition Documentation

◆ _GNU_SOURCE

#define _GNU_SOURCE

◆ _POSIX_C_SOURCE

#define _POSIX_C_SOURCE   200112L /* for fdopen() */

Function Documentation

◆ meta_bug()

◆ meta_exit()

void meta_exit ( MetaExitCode  code)

Referenced by main(), and meta_fatal().

◆ meta_fatal()

void meta_fatal ( const char *  format,
  ... 
)

References _, meta_exit(), META_EXIT_ERROR, no_prefix, NULL, and utf8_fputs().

Referenced by main(), meta_set_verbose(), and meta_ui_init().

Here is the call graph for this function:

◆ meta_g_utf8_strndup()

char * meta_g_utf8_strndup ( const gchar *  src,
gsize  n 
)

Referenced by set_title_text(), and tab_entry_new().

◆ meta_get_replace_current_wm()

gboolean meta_get_replace_current_wm ( void  )

References replace_current.

Referenced by meta_screen_new().

◆ meta_gravity_to_string()

const char * meta_gravity_to_string ( int  gravity)

◆ meta_is_debugging()

gboolean meta_is_debugging ( void  )

◆ meta_is_verbose()

◆ meta_pop_no_msg_prefix()

void meta_pop_no_msg_prefix ( void  )

◆ meta_print_backtrace()

void meta_print_backtrace ( void  )

◆ meta_push_no_msg_prefix()

void meta_push_no_msg_prefix ( void  )

◆ meta_set_debugging()

void meta_set_debugging ( gboolean  setting)

References is_debugging.

Referenced by main().

◆ meta_set_replace_current_wm()

void meta_set_replace_current_wm ( gboolean  setting)

References replace_current.

Referenced by main().

◆ meta_set_verbose()

void meta_set_verbose ( gboolean  setting)

References _, is_verbose, and meta_fatal().

Referenced by event_callback(), and main().

Here is the call graph for this function:

◆ meta_show_dialog()

GPid meta_show_dialog ( const char *  type,
const char *  message,
const char *  timeout,
const char *  display,
const char *  ok_text,
const char *  cancel_text,
const int  transient_for,
GSList *  columns,
GSList *  entries 
)

References _, meta_warning(), and NULL.

Referenced by delete_ping_timeout_func(), and error_on_command().

Here is the call graph for this function:

◆ meta_show_entry_dialog()

GPid meta_show_entry_dialog ( const char *  message,
gint *  active_workspace_id,
const char *  entry_text,
const char *  display,
const char *  ok_text,
const char *  cancel_text,
const int  transient_for,
const GIOFunc  stdio_func_cb 
)

References _, FALSE, META_DEBUG_KEYBINDINGS, meta_warning(), NULL, and TRUE.

Referenced by handle_rename_workspace().

Here is the call graph for this function:

◆ meta_unsigned_long_equal()

gint meta_unsigned_long_equal ( gconstpointer  v1,
gconstpointer  v2 
)

◆ meta_unsigned_long_hash()

guint meta_unsigned_long_hash ( gconstpointer  v)

◆ meta_warning()

void meta_warning ( const char *  format,
  ... 
)

References _, no_prefix, NULL, and utf8_fputs().

Referenced by complain_about_broken_client(), dynamic_workspaces_idle_callback(), effects_draw_box_animation_timeout(), enable_compositor(), ensure_work_areas_validated(), error_on_command(), event_callback(), handle_preference_init_int(), handle_preference_update_int(), handle_rename_workspace_callback(), log_handler(), main(), maybe_give_disable_workarounds_warning(), menu_callback(), merge_spanning_rects_in_region(), meta_change_keygrab(), meta_core_get(), meta_display_begin_grab_op(), meta_display_for_x_display(), meta_display_open(), meta_display_ping_window(), meta_frames_unmanage_window(), meta_rectangle_clamp_to_fit_into_region(), meta_rectangle_clip_to_region(), meta_rectangle_shove_into_region(), meta_screen_free(), meta_screen_new(), meta_screen_update_workspace_layout(), meta_show_dialog(), meta_show_entry_dialog(), meta_stack_set_positions(), meta_theme_earliest_version_with_button(), meta_theme_set_current(), meta_window_client_message(), meta_window_get_current_tile_area(), meta_window_kill(), meta_window_menu_popup(), meta_window_raise(), meta_workspace_focus_default_window(), mouse_button_mods_handler(), parse_size_unchecked(), parse_x_position_unchecked(), parse_y_position_unchecked(), process_request_frame_extents(), process_workspace_switch_grab(), recalc_window_features(), reload_net_wm_pid(), reload_transient_for(), safely_remove_workspaces(), sanity_check_timestamps(), timestamp_too_old(), titlebar_handler(), update_binding(), update_sm_hints(), utf8_list_from_results(), utf8_string_from_results(), validate_or_free_results(), and window_activate().

Here is the call graph for this function:

◆ utf8_fputs()

static int utf8_fputs ( const char *  str,
FILE *  f 
)
static

References NULL.

Referenced by meta_bug(), meta_fatal(), and meta_warning().

Variable Documentation

◆ is_debugging

gboolean is_debugging = FALSE
static

◆ is_verbose

gboolean is_verbose = FALSE
static

◆ no_prefix

◆ replace_current

gboolean replace_current = FALSE
static